/* Generated by Cython 3.2.4 */

#ifndef PY_SSIZE_T_CLEAN
#define PY_SSIZE_T_CLEAN
#endif /* PY_SSIZE_T_CLEAN */
/* InitLimitedAPI */
#if defined(Py_LIMITED_API)
  #if !defined(CYTHON_LIMITED_API)
  #define CYTHON_LIMITED_API 1
  #endif
#elif defined(CYTHON_LIMITED_API)
  #ifdef _MSC_VER
  #pragma message ("Limited API usage is enabled with 'CYTHON_LIMITED_API' but 'Py_LIMITED_API' does not define a Python target version. Consider setting 'Py_LIMITED_API' instead.")
  #else
  #warning Limited API usage is enabled with 'CYTHON_LIMITED_API' but 'Py_LIMITED_API' does not define a Python target version. Consider setting 'Py_LIMITED_API' instead.
  #endif
#endif

#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 < 0x03080000
    #error Cython requires Python 3.8+.
#else
#define __PYX_ABI_VERSION "3_2_4"
#define CYTHON_HEX_VERSION 0x030204F0
#define CYTHON_FUTURE_DIVISION 1
/* CModulePreamble */
#include <stddef.h>
#ifndef offsetof
  #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
#endif
#if !defined(_WIN32) && !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 PY_LONG_LONG
  #define PY_LONG_LONG LONG_LONG
#endif
#ifndef Py_HUGE_VAL
  #define Py_HUGE_VAL HUGE_VAL
#endif
#define __PYX_LIMITED_VERSION_HEX PY_VERSION_HEX
#if defined(GRAALVM_PYTHON)
  /* For very preliminary testing purposes. Most variables are set the same as PyPy.
     The existence of this section does not imply that anything works or is even tested */
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #define CYTHON_COMPILING_IN_LIMITED_API 0
  #define CYTHON_COMPILING_IN_GRAAL 1
  #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0
  #undef CYTHON_USE_TYPE_SLOTS
  #define CYTHON_USE_TYPE_SLOTS 0
  #undef CYTHON_USE_TYPE_SPECS
  #define CYTHON_USE_TYPE_SPECS 0
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #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_AVOID_THREAD_UNSAFE_BORROWED_REFS
  #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0
  #undef CYTHON_ASSUME_SAFE_MACROS
  #define CYTHON_ASSUME_SAFE_MACROS 0
  #undef CYTHON_ASSUME_SAFE_SIZE
  #define CYTHON_ASSUME_SAFE_SIZE 0
  #undef CYTHON_UNPACK_METHODS
  #define CYTHON_UNPACK_METHODS 0
  #undef CYTHON_FAST_THREAD_STATE
  #define CYTHON_FAST_THREAD_STATE 0
  #undef CYTHON_FAST_GIL
  #define CYTHON_FAST_GIL 0
  #undef CYTHON_METH_FASTCALL
  #define CYTHON_METH_FASTCALL 0
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #ifndef CYTHON_PEP487_INIT_SUBCLASS
    #define CYTHON_PEP487_INIT_SUBCLASS 1
  #endif
  #undef CYTHON_PEP489_MULTI_PHASE_INIT
  #define CYTHON_PEP489_MULTI_PHASE_INIT 1
  #undef CYTHON_USE_MODULE_STATE
  #define CYTHON_USE_MODULE_STATE 0
  #undef CYTHON_USE_SYS_MONITORING
  #define CYTHON_USE_SYS_MONITORING 0
  #undef CYTHON_USE_TP_FINALIZE
  #define CYTHON_USE_TP_FINALIZE 0
  #undef CYTHON_USE_AM_SEND
  #define CYTHON_USE_AM_SEND 0
  #undef CYTHON_USE_DICT_VERSIONS
  #define CYTHON_USE_DICT_VERSIONS 0
  #undef CYTHON_USE_EXC_INFO_STACK
  #define CYTHON_USE_EXC_INFO_STACK 1
  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
    #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
  #endif
  #undef CYTHON_USE_FREELISTS
  #define CYTHON_USE_FREELISTS 0
  #undef CYTHON_IMMORTAL_CONSTANTS
  #define CYTHON_IMMORTAL_CONSTANTS 0
#elif defined(PYPY_VERSION)
  #define CYTHON_COMPILING_IN_PYPY 1
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #define CYTHON_COMPILING_IN_LIMITED_API 0
  #define CYTHON_COMPILING_IN_GRAAL 0
  #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0
  #undef CYTHON_USE_TYPE_SLOTS
  #define CYTHON_USE_TYPE_SLOTS 1
  #ifndef CYTHON_USE_TYPE_SPECS
    #define CYTHON_USE_TYPE_SPECS 0
  #endif
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #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_AVOID_THREAD_UNSAFE_BORROWED_REFS
  #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1
  #undef CYTHON_ASSUME_SAFE_MACROS
  #define CYTHON_ASSUME_SAFE_MACROS 0
  #ifndef CYTHON_ASSUME_SAFE_SIZE
    #define CYTHON_ASSUME_SAFE_SIZE 1
  #endif
  #undef CYTHON_UNPACK_METHODS
  #define CYTHON_UNPACK_METHODS 0
  #undef CYTHON_FAST_THREAD_STATE
  #define CYTHON_FAST_THREAD_STATE 0
  #undef CYTHON_FAST_GIL
  #define CYTHON_FAST_GIL 0
  #undef CYTHON_METH_FASTCALL
  #define CYTHON_METH_FASTCALL 0
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #ifndef CYTHON_PEP487_INIT_SUBCLASS
    #define CYTHON_PEP487_INIT_SUBCLASS 1
  #endif
  #if PY_VERSION_HEX < 0x03090000
    #undef CYTHON_PEP489_MULTI_PHASE_INIT
    #define CYTHON_PEP489_MULTI_PHASE_INIT 0
  #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT)
    #define CYTHON_PEP489_MULTI_PHASE_INIT 1
  #endif
  #undef CYTHON_USE_MODULE_STATE
  #define CYTHON_USE_MODULE_STATE 0
  #undef CYTHON_USE_SYS_MONITORING
  #define CYTHON_USE_SYS_MONITORING 0
  #ifndef CYTHON_USE_TP_FINALIZE
    #define CYTHON_USE_TP_FINALIZE (PYPY_VERSION_NUM >= 0x07030C00)
  #endif
  #undef CYTHON_USE_AM_SEND
  #define CYTHON_USE_AM_SEND 0
  #undef CYTHON_USE_DICT_VERSIONS
  #define CYTHON_USE_DICT_VERSIONS 0
  #undef CYTHON_USE_EXC_INFO_STACK
  #define CYTHON_USE_EXC_INFO_STACK 0
  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
    #define CYTHON_UPDATE_DESCRIPTOR_DOC (PYPY_VERSION_NUM >= 0x07031100)
  #endif
  #undef CYTHON_USE_FREELISTS
  #define CYTHON_USE_FREELISTS 0
  #undef CYTHON_IMMORTAL_CONSTANTS
  #define CYTHON_IMMORTAL_CONSTANTS 0
#elif defined(CYTHON_LIMITED_API)
  #ifdef Py_LIMITED_API
    #undef __PYX_LIMITED_VERSION_HEX
    #define __PYX_LIMITED_VERSION_HEX Py_LIMITED_API
  #endif
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #define CYTHON_COMPILING_IN_LIMITED_API 1
  #define CYTHON_COMPILING_IN_GRAAL 0
  #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0
  #undef CYTHON_USE_TYPE_SLOTS
  #define CYTHON_USE_TYPE_SLOTS 0
  #undef CYTHON_USE_TYPE_SPECS
  #define CYTHON_USE_TYPE_SPECS 1
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #undef CYTHON_USE_PYLIST_INTERNALS
  #define CYTHON_USE_PYLIST_INTERNALS 0
  #undef CYTHON_USE_UNICODE_INTERNALS
  #define CYTHON_USE_UNICODE_INTERNALS 0
  #ifndef CYTHON_USE_UNICODE_WRITER
    #define CYTHON_USE_UNICODE_WRITER 0
  #endif
  #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_AVOID_THREAD_UNSAFE_BORROWED_REFS
    #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0
  #endif
  #undef CYTHON_ASSUME_SAFE_MACROS
  #define CYTHON_ASSUME_SAFE_MACROS 0
  #undef CYTHON_ASSUME_SAFE_SIZE
  #define CYTHON_ASSUME_SAFE_SIZE 0
  #undef CYTHON_UNPACK_METHODS
  #define CYTHON_UNPACK_METHODS 0
  #undef CYTHON_FAST_THREAD_STATE
  #define CYTHON_FAST_THREAD_STATE 0
  #undef CYTHON_FAST_GIL
  #define CYTHON_FAST_GIL 0
  #undef CYTHON_METH_FASTCALL
  #define CYTHON_METH_FASTCALL (__PYX_LIMITED_VERSION_HEX >= 0x030C0000)
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #ifndef CYTHON_PEP487_INIT_SUBCLASS
    #define CYTHON_PEP487_INIT_SUBCLASS 1
  #endif
  #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
    #define CYTHON_PEP489_MULTI_PHASE_INIT 1
  #endif
  #ifndef CYTHON_USE_MODULE_STATE
    #define CYTHON_USE_MODULE_STATE 0
  #endif
  #undef CYTHON_USE_SYS_MONITORING
  #define CYTHON_USE_SYS_MONITORING 0
  #ifndef CYTHON_USE_TP_FINALIZE
    #define CYTHON_USE_TP_FINALIZE 0
  #endif
  #ifndef CYTHON_USE_AM_SEND
    #define CYTHON_USE_AM_SEND (__PYX_LIMITED_VERSION_HEX >= 0x030A0000)
  #endif
  #undef CYTHON_USE_DICT_VERSIONS
  #define CYTHON_USE_DICT_VERSIONS 0
  #undef CYTHON_USE_EXC_INFO_STACK
  #define CYTHON_USE_EXC_INFO_STACK 0
  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
    #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
  #endif
  #ifndef CYTHON_USE_FREELISTS
  #define CYTHON_USE_FREELISTS 1
  #endif
  #undef CYTHON_IMMORTAL_CONSTANTS
  #define CYTHON_IMMORTAL_CONSTANTS 0
#else
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_CPYTHON 1
  #define CYTHON_COMPILING_IN_LIMITED_API 0
  #define CYTHON_COMPILING_IN_GRAAL 0
  #ifdef Py_GIL_DISABLED
    #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 1
  #else
    #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0
  #endif
  #if PY_VERSION_HEX < 0x030A0000
    #undef CYTHON_USE_TYPE_SLOTS
    #define CYTHON_USE_TYPE_SLOTS 1
  #elif !defined(CYTHON_USE_TYPE_SLOTS)
    #define CYTHON_USE_TYPE_SLOTS 1
  #endif
  #ifndef CYTHON_USE_TYPE_SPECS
    #define CYTHON_USE_TYPE_SPECS 0
  #endif
  #ifndef CYTHON_USE_PYTYPE_LOOKUP
    #define CYTHON_USE_PYTYPE_LOOKUP 1
  #endif
  #ifndef CYTHON_USE_PYLONG_INTERNALS
    #define CYTHON_USE_PYLONG_INTERNALS 1
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    #undef CYTHON_USE_PYLIST_INTERNALS
    #define CYTHON_USE_PYLIST_INTERNALS 0
  #elif !defined(CYTHON_USE_PYLIST_INTERNALS)
    #define CYTHON_USE_PYLIST_INTERNALS 1
  #endif
  #ifndef CYTHON_USE_UNICODE_INTERNALS
    #define CYTHON_USE_UNICODE_INTERNALS 1
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING || PY_VERSION_HEX >= 0x030B00A2
    #undef CYTHON_USE_UNICODE_WRITER
    #define CYTHON_USE_UNICODE_WRITER 0
  #elif !defined(CYTHON_USE_UNICODE_WRITER)
    #define CYTHON_USE_UNICODE_WRITER 1
  #endif
  #ifndef CYTHON_AVOID_BORROWED_REFS
    #define CYTHON_AVOID_BORROWED_REFS 0
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
    #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1
  #elif !defined(CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS)
    #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0
  #endif
  #ifndef CYTHON_ASSUME_SAFE_MACROS
    #define CYTHON_ASSUME_SAFE_MACROS 1
  #endif
  #ifndef CYTHON_ASSUME_SAFE_SIZE
    #define CYTHON_ASSUME_SAFE_SIZE 1
  #endif
  #ifndef CYTHON_UNPACK_METHODS
    #define CYTHON_UNPACK_METHODS 1
  #endif
  #ifndef CYTHON_FAST_THREAD_STATE
    #define CYTHON_FAST_THREAD_STATE 1
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    #undef CYTHON_FAST_GIL
    #define CYTHON_FAST_GIL 0
  #elif !defined(CYTHON_FAST_GIL)
    #define CYTHON_FAST_GIL (PY_VERSION_HEX < 0x030C00A6)
  #endif
  #ifndef CYTHON_METH_FASTCALL
    #define CYTHON_METH_FASTCALL 1
  #endif
  #ifndef CYTHON_FAST_PYCALL
    #define CYTHON_FAST_PYCALL 1
  #endif
  #ifndef CYTHON_PEP487_INIT_SUBCLASS
    #define CYTHON_PEP487_INIT_SUBCLASS 1
  #endif
  #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
    #define CYTHON_PEP489_MULTI_PHASE_INIT 1
  #endif
  #ifndef CYTHON_USE_MODULE_STATE
    #define CYTHON_USE_MODULE_STATE 0
  #endif
  #ifndef CYTHON_USE_SYS_MONITORING
    #define CYTHON_USE_SYS_MONITORING (PY_VERSION_HEX >= 0x030d00B1)
  #endif
  #ifndef CYTHON_USE_TP_FINALIZE
    #define CYTHON_USE_TP_FINALIZE 1
  #endif
  #ifndef CYTHON_USE_AM_SEND
    #define CYTHON_USE_AM_SEND 1
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    #undef CYTHON_USE_DICT_VERSIONS
    #define CYTHON_USE_DICT_VERSIONS 0
  #elif !defined(CYTHON_USE_DICT_VERSIONS)
    #define CYTHON_USE_DICT_VERSIONS  (PY_VERSION_HEX < 0x030C00A5 && !CYTHON_USE_MODULE_STATE)
  #endif
  #ifndef CYTHON_USE_EXC_INFO_STACK
    #define CYTHON_USE_EXC_INFO_STACK 1
  #endif
  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
    #define CYTHON_UPDATE_DESCRIPTOR_DOC 1
  #endif
  #ifndef CYTHON_USE_FREELISTS
    #define CYTHON_USE_FREELISTS (!CYTHON_COMPILING_IN_CPYTHON_FREETHREADING)
  #endif
  #if defined(CYTHON_IMMORTAL_CONSTANTS) && PY_VERSION_HEX < 0x030C0000
    #undef CYTHON_IMMORTAL_CONSTANTS
    #define CYTHON_IMMORTAL_CONSTANTS 0  // definitely won't work
  #elif !defined(CYTHON_IMMORTAL_CONSTANTS)
    #define CYTHON_IMMORTAL_CONSTANTS (PY_VERSION_HEX >= 0x030C0000 && !CYTHON_USE_MODULE_STATE && CYTHON_COMPILING_IN_CPYTHON_FREETHREADING)
  #endif
#endif
#ifndef CYTHON_COMPRESS_STRINGS
  #define CYTHON_COMPRESS_STRINGS 1
#endif
#ifndef CYTHON_FAST_PYCCALL
#define CYTHON_FAST_PYCCALL  CYTHON_FAST_PYCALL
#endif
#ifndef CYTHON_VECTORCALL
#if CYTHON_COMPILING_IN_LIMITED_API
#define CYTHON_VECTORCALL  (__PYX_LIMITED_VERSION_HEX >= 0x030C0000)
#else
#define CYTHON_VECTORCALL  (CYTHON_FAST_PYCCALL)
#endif
#endif
#if CYTHON_USE_PYLONG_INTERNALS
  #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(__cplusplus)
    /* for clang __has_cpp_attribute(maybe_unused) is true even before C++17
     * but leads to warnings with -pedantic, since it is a C++17 feature */
    #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L)
      #if __has_cpp_attribute(maybe_unused)
        #define CYTHON_UNUSED [[maybe_unused]]
      #endif
    #endif
  #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_UNUSED_VAR
#  if defined(__cplusplus)
     template<class T> void CYTHON_UNUSED_VAR( const T& ) { }
#  else
#    define CYTHON_UNUSED_VAR(x) (void)(x)
#  endif
#endif
#ifndef CYTHON_MAYBE_UNUSED_VAR
  #define CYTHON_MAYBE_UNUSED_VAR(x) CYTHON_UNUSED_VAR(x)
#endif
#ifndef CYTHON_NCP_UNUSED
# if CYTHON_COMPILING_IN_CPYTHON && !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
#  define CYTHON_NCP_UNUSED
# else
#  define CYTHON_NCP_UNUSED CYTHON_UNUSED
# endif
#endif
#ifndef CYTHON_USE_CPP_STD_MOVE
  #if defined(__cplusplus) && (\
    __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1600))
    #define CYTHON_USE_CPP_STD_MOVE 1
  #else
    #define CYTHON_USE_CPP_STD_MOVE 0
  #endif
#endif
#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
#include <stdint.h>
typedef uintptr_t  __pyx_uintptr_t;
#ifndef CYTHON_FALLTHROUGH
  #if defined(__cplusplus)
    /* for clang __has_cpp_attribute(fallthrough) is true even before C++17
     * but leads to warnings with -pedantic, since it is a C++17 feature */
    #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L)
      #if __has_cpp_attribute(fallthrough)
        #define CYTHON_FALLTHROUGH [[fallthrough]]
      #endif
    #endif
    #ifndef CYTHON_FALLTHROUGH
      #if __has_cpp_attribute(clang::fallthrough)
        #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
      #elif __has_cpp_attribute(gnu::fallthrough)
        #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
      #endif
    #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 Py_UNREACHABLE
  #define Py_UNREACHABLE()  assert(0); abort()
#endif
#ifdef __cplusplus
  template <typename T>
  struct __PYX_IS_UNSIGNED_IMPL {static const bool value = T(0) < T(-1);};
  #define __PYX_IS_UNSIGNED(type) (__PYX_IS_UNSIGNED_IMPL<type>::value)
#else
  #define __PYX_IS_UNSIGNED(type) (((type)-1) > 0)
#endif
#if CYTHON_COMPILING_IN_PYPY == 1
  #define __PYX_NEED_TP_PRINT_SLOT  (PY_VERSION_HEX < 0x030A0000)
#else
  #define __PYX_NEED_TP_PRINT_SLOT  (PY_VERSION_HEX < 0x03090000)
#endif
#define __PYX_REINTERPRET_FUNCION(func_pointer, other_pointer) ((func_pointer)(void(*)(void))(other_pointer))

/* CppInitCode */
#ifndef __cplusplus
  #error "Cython files generated with the C++ option must be compiled with a C++ compiler."
#endif
#ifndef CYTHON_INLINE
  #if defined(__clang__)
    #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
  #else
    #define CYTHON_INLINE inline
  #endif
#endif
template<typename T>
void __Pyx_call_destructor(T& x) {
    x.~T();
}
template<typename T>
class __Pyx_FakeReference {
  public:
    __Pyx_FakeReference() : ptr(NULL) { }
    __Pyx_FakeReference(const T& ref) : ptr(const_cast<T*>(&ref)) { }
    T *operator->() { return ptr; }
    T *operator&() { return ptr; }
    operator T&() { return *ptr; }
    template<typename U> bool operator ==(const U& other) const { return *ptr == other; }
    template<typename U> bool operator !=(const U& other) const { return *ptr != other; }
    template<typename U> bool operator==(const __Pyx_FakeReference<U>& other) const { return *ptr == *other.ptr; }
    template<typename U> bool operator!=(const __Pyx_FakeReference<U>& other) const { return *ptr != *other.ptr; }
  private:
    T *ptr;
};

/* PythonCompatibility */
#define __PYX_BUILD_PY_SSIZE_T "n"
#define CYTHON_FORMAT_SSIZE_T "z"
#define __Pyx_BUILTIN_MODULE_NAME "builtins"
#define __Pyx_DefaultClassType PyType_Type
#if CYTHON_COMPILING_IN_LIMITED_API
    #ifndef CO_OPTIMIZED
    static int CO_OPTIMIZED;
    #endif
    #ifndef CO_NEWLOCALS
    static int CO_NEWLOCALS;
    #endif
    #ifndef CO_VARARGS
    static int CO_VARARGS;
    #endif
    #ifndef CO_VARKEYWORDS
    static int CO_VARKEYWORDS;
    #endif
    #ifndef CO_ASYNC_GENERATOR
    static int CO_ASYNC_GENERATOR;
    #endif
    #ifndef CO_GENERATOR
    static int CO_GENERATOR;
    #endif
    #ifndef CO_COROUTINE
    static int CO_COROUTINE;
    #endif
#else
    #ifndef CO_COROUTINE
      #define CO_COROUTINE 0x80
    #endif
    #ifndef CO_ASYNC_GENERATOR
      #define CO_ASYNC_GENERATOR 0x200
    #endif
#endif
static int __Pyx_init_co_variables(void);
#if PY_VERSION_HEX >= 0x030900A4 || defined(Py_IS_TYPE)
  #define __Pyx_IS_TYPE(ob, type) Py_IS_TYPE(ob, type)
#else
  #define __Pyx_IS_TYPE(ob, type) (((const PyObject*)ob)->ob_type == (type))
#endif
#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_Is)
  #define __Pyx_Py_Is(x, y)  Py_Is(x, y)
#else
  #define __Pyx_Py_Is(x, y) ((x) == (y))
#endif
#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsNone)
  #define __Pyx_Py_IsNone(ob) Py_IsNone(ob)
#else
  #define __Pyx_Py_IsNone(ob) __Pyx_Py_Is((ob), Py_None)
#endif
#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsTrue)
  #define __Pyx_Py_IsTrue(ob) Py_IsTrue(ob)
#else
  #define __Pyx_Py_IsTrue(ob) __Pyx_Py_Is((ob), Py_True)
#endif
#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsFalse)
  #define __Pyx_Py_IsFalse(ob) Py_IsFalse(ob)
#else
  #define __Pyx_Py_IsFalse(ob) __Pyx_Py_Is((ob), Py_False)
#endif
#define __Pyx_NoneAsNull(obj)  (__Pyx_Py_IsNone(obj) ? NULL : (obj))
#if PY_VERSION_HEX >= 0x030900F0 && !CYTHON_COMPILING_IN_PYPY
  #define __Pyx_PyObject_GC_IsFinalized(o) PyObject_GC_IsFinalized(o)
#else
  #define __Pyx_PyObject_GC_IsFinalized(o) _PyGC_FINALIZED(o)
#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 Py_TPFLAGS_SEQUENCE
  #define Py_TPFLAGS_SEQUENCE 0
#endif
#ifndef Py_TPFLAGS_MAPPING
  #define Py_TPFLAGS_MAPPING 0
#endif
#ifndef Py_TPFLAGS_IMMUTABLETYPE
  #define Py_TPFLAGS_IMMUTABLETYPE (1UL << 8)
#endif
#ifndef Py_TPFLAGS_DISALLOW_INSTANTIATION
  #define Py_TPFLAGS_DISALLOW_INSTANTIATION (1UL << 7)
#endif
#ifndef METH_STACKLESS
  #define METH_STACKLESS 0
#endif
#ifndef 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
  #if PY_VERSION_HEX >= 0x030d00A4
  #  define __Pyx_PyCFunctionFast PyCFunctionFast
  #  define __Pyx_PyCFunctionFastWithKeywords PyCFunctionFastWithKeywords
  #else
  #  define __Pyx_PyCFunctionFast _PyCFunctionFast
  #  define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
  #endif
#endif
#if CYTHON_METH_FASTCALL
  #define __Pyx_METH_FASTCALL METH_FASTCALL
  #define __Pyx_PyCFunction_FastCall __Pyx_PyCFunctionFast
  #define __Pyx_PyCFunction_FastCallWithKeywords __Pyx_PyCFunctionFastWithKeywords
#else
  #define __Pyx_METH_FASTCALL METH_VARARGS
  #define __Pyx_PyCFunction_FastCall PyCFunction
  #define __Pyx_PyCFunction_FastCallWithKeywords PyCFunctionWithKeywords
#endif
#if CYTHON_VECTORCALL
  #define __pyx_vectorcallfunc vectorcallfunc
  #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET  PY_VECTORCALL_ARGUMENTS_OFFSET
  #define __Pyx_PyVectorcall_NARGS(n)  PyVectorcall_NARGS((size_t)(n))
#else
  #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET  0
  #define __Pyx_PyVectorcall_NARGS(n)  ((Py_ssize_t)(n))
#endif
#if PY_VERSION_HEX >= 0x030900B1
#define __Pyx_PyCFunction_CheckExact(func)  PyCFunction_CheckExact(func)
#else
#define __Pyx_PyCFunction_CheckExact(func)  PyCFunction_Check(func)
#endif
#define __Pyx_CyOrPyCFunction_Check(func)  PyCFunction_Check(func)
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func)  (((PyCFunctionObject*)(func))->m_ml->ml_meth)
#elif !CYTHON_COMPILING_IN_LIMITED_API
#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func)  PyCFunction_GET_FUNCTION(func)
#endif
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_CyOrPyCFunction_GET_FLAGS(func)  (((PyCFunctionObject*)(func))->m_ml->ml_flags)
static CYTHON_INLINE PyObject* __Pyx_CyOrPyCFunction_GET_SELF(PyObject *func) {
    return (__Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_STATIC) ? NULL : ((PyCFunctionObject*)func)->m_self;
}
#endif
static CYTHON_INLINE int __Pyx__IsSameCFunction(PyObject *func, void (*cfunc)(void)) {
#if CYTHON_COMPILING_IN_LIMITED_API
    return PyCFunction_Check(func) && PyCFunction_GetFunction(func) == (PyCFunction) cfunc;
#else
    return PyCFunction_Check(func) && PyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc;
#endif
}
#define __Pyx_IsSameCFunction(func, cfunc)   __Pyx__IsSameCFunction(func, cfunc)
#if PY_VERSION_HEX < 0x03090000 || (CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000)
  #define __Pyx_PyType_FromModuleAndSpec(m, s, b)  ((void)m, PyType_FromSpecWithBases(s, b))
  typedef PyObject *(*__Pyx_PyCMethod)(PyObject *, PyTypeObject *, PyObject *const *, size_t, PyObject *);
#else
  #define __Pyx_PyType_FromModuleAndSpec(m, s, b)  PyType_FromModuleAndSpec(m, s, b)
  #define __Pyx_PyCMethod  PyCMethod
#endif
#ifndef METH_METHOD
  #define METH_METHOD 0x200
#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_LIMITED_API
  #define __Pyx_PyFrame_SetLineNumber(frame, lineno)
#elif CYTHON_COMPILING_IN_GRAAL && defined(GRAALPY_VERSION_NUM) && GRAALPY_VERSION_NUM > 0x19000000
  #define __Pyx_PyCode_HasFreeVars(co)  (PyCode_GetNumFree(co) > 0)
  #define __Pyx_PyFrame_SetLineNumber(frame, lineno) GraalPyFrame_SetLineNumber((frame), (lineno))
#elif CYTHON_COMPILING_IN_GRAAL
  #define __Pyx_PyCode_HasFreeVars(co)  (PyCode_GetNumFree(co) > 0)
  #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_COMPILING_IN_LIMITED_API
  #define __Pyx_PyThreadState_Current PyThreadState_Get()
#elif !CYTHON_FAST_THREAD_STATE
  #define __Pyx_PyThreadState_Current PyThreadState_GET()
#elif PY_VERSION_HEX >= 0x030d00A1
  #define __Pyx_PyThreadState_Current PyThreadState_GetUnchecked()
#else
  #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
#endif
#if CYTHON_USE_MODULE_STATE
static CYTHON_INLINE void *__Pyx__PyModule_GetState(PyObject *op)
{
    void *result;
    result = PyModule_GetState(op);
    if (!result)
        Py_FatalError("Couldn't find the module state");
    return result;
}
#define __Pyx_PyModule_GetState(o) (__pyx_mstatetype *)__Pyx__PyModule_GetState(o)
#else
#define __Pyx_PyModule_GetState(op) ((void)op,__pyx_mstate_global)
#endif
#define __Pyx_PyObject_GetSlot(obj, name, func_ctype)  __Pyx_PyType_GetSlot(Py_TYPE((PyObject *) obj), name, func_ctype)
#define __Pyx_PyObject_TryGetSlot(obj, name, func_ctype) __Pyx_PyType_TryGetSlot(Py_TYPE(obj), name, func_ctype)
#define __Pyx_PyObject_GetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_GetSubSlot(Py_TYPE(obj), sub, name, func_ctype)
#define __Pyx_PyObject_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSubSlot(Py_TYPE(obj), sub, name, func_ctype)
#if CYTHON_USE_TYPE_SLOTS
  #define __Pyx_PyType_GetSlot(type, name, func_ctype)  ((type)->name)
  #define __Pyx_PyType_TryGetSlot(type, name, func_ctype) __Pyx_PyType_GetSlot(type, name, func_ctype)
  #define __Pyx_PyType_GetSubSlot(type, sub, name, func_ctype) (((type)->sub) ? ((type)->sub->name) : NULL)
  #define __Pyx_PyType_TryGetSubSlot(type, sub, name, func_ctype) __Pyx_PyType_GetSubSlot(type, sub, name, func_ctype)
#else
  #define __Pyx_PyType_GetSlot(type, name, func_ctype)  ((func_ctype) PyType_GetSlot((type), Py_##name))
  #define __Pyx_PyType_TryGetSlot(type, name, func_ctype)\
    ((__PYX_LIMITED_VERSION_HEX >= 0x030A0000 ||\
     (PyType_GetFlags(type) & Py_TPFLAGS_HEAPTYPE) || __Pyx_get_runtime_version() >= 0x030A0000) ?\
     __Pyx_PyType_GetSlot(type, name, func_ctype) : NULL)
  #define __Pyx_PyType_GetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_GetSlot(obj, name, func_ctype)
  #define __Pyx_PyType_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSlot(obj, name, func_ctype)
#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
#define __Pyx_PyNumber_Divide(x,y)         PyNumber_TrueDivide(x,y)
#define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceTrueDivide(x,y)
#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_UNICODE_INTERNALS
#define __Pyx_PyDict_GetItemStrWithError(dict, name)  _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash)
static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStr(PyObject *dict, PyObject *name) {
    PyObject *res = __Pyx_PyDict_GetItemStrWithError(dict, name);
    if (res == NULL) PyErr_Clear();
    return res;
}
#elif !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07020000
#define __Pyx_PyDict_GetItemStrWithError  PyDict_GetItemWithError
#define __Pyx_PyDict_GetItemStr           PyDict_GetItem
#else
static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict, PyObject *name) {
#if CYTHON_COMPILING_IN_PYPY
    return PyDict_GetItem(dict, name);
#else
    PyDictEntry *ep;
    PyDictObject *mp = (PyDictObject*) dict;
    long hash = ((PyStringObject *) name)->ob_shash;
    assert(hash != -1);
    ep = (mp->ma_lookup)(mp, name, hash);
    if (ep == NULL) {
        return NULL;
    }
    return ep->me_value;
#endif
}
#define __Pyx_PyDict_GetItemStr           PyDict_GetItem
#endif
#if CYTHON_USE_TYPE_SLOTS
  #define __Pyx_PyType_GetFlags(tp)   (((PyTypeObject *)tp)->tp_flags)
  #define __Pyx_PyType_HasFeature(type, feature)  ((__Pyx_PyType_GetFlags(type) & (feature)) != 0)
#else
  #define __Pyx_PyType_GetFlags(tp)   (PyType_GetFlags((PyTypeObject *)tp))
  #define __Pyx_PyType_HasFeature(type, feature)  PyType_HasFeature(type, feature)
#endif
#define __Pyx_PyObject_GetIterNextFunc(iterator)  __Pyx_PyObject_GetSlot(iterator, tp_iternext, iternextfunc)
#if CYTHON_USE_TYPE_SPECS
#define __Pyx_PyHeapTypeObject_GC_Del(obj)  {\
    PyTypeObject *type = Py_TYPE((PyObject*)obj);\
    assert(__Pyx_PyType_HasFeature(type, Py_TPFLAGS_HEAPTYPE));\
    PyObject_GC_Del(obj);\
    Py_DECREF(type);\
}
#else
#define __Pyx_PyHeapTypeObject_GC_Del(obj)  PyObject_GC_Del(obj)
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
  #define __Pyx_PyUnicode_READY(op)       (0)
  #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_ReadChar(u, i)
  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   ((void)u, 1114111U)
  #define __Pyx_PyUnicode_KIND(u)         ((void)u, (0))
  #define __Pyx_PyUnicode_DATA(u)         ((void*)u)
  #define __Pyx_PyUnicode_READ(k, d, i)   ((void)k, PyUnicode_ReadChar((PyObject*)(d), i))
  #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != PyUnicode_GetLength(u))
#else
  #if PY_VERSION_HEX >= 0x030C0000
    #define __Pyx_PyUnicode_READY(op)       (0)
  #else
    #define __Pyx_PyUnicode_READY(op)       (likely(PyUnicode_IS_READY(op)) ?\
                                                0 : _PyUnicode_Ready((PyObject *)(op)))
  #endif
  #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)         ((int)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, (Py_UCS4) ch)
  #if PY_VERSION_HEX >= 0x030C0000
    #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != PyUnicode_GET_LENGTH(u))
  #else
    #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000
    #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length))
    #else
    #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
    #endif
  #endif
#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
  #if !defined(PyUnicode_DecodeUnicodeEscape)
    #define PyUnicode_DecodeUnicodeEscape(s, size, errors)  PyUnicode_Decode(s, size, "unicode_escape", errors)
  #endif
  #if !defined(PyUnicode_Contains)
    #define PyUnicode_Contains(u, s)  PySequence_Contains(u, s)
  #endif
  #if !defined(PyByteArray_Check)
    #define PyByteArray_Check(obj)  PyObject_TypeCheck(obj, &PyByteArray_Type)
  #endif
  #if !defined(PyObject_Format)
    #define PyObject_Format(obj, fmt)  PyObject_CallMethod(obj, "__format__", "O", fmt)
  #endif
#endif
#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 CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  #define __Pyx_PySequence_ListKeepNew(obj)\
    (likely(PyList_CheckExact(obj) && PyUnstable_Object_IsUniquelyReferenced(obj)) ? __Pyx_NewRef(obj) : PySequence_List(obj))
#elif CYTHON_COMPILING_IN_CPYTHON
  #define __Pyx_PySequence_ListKeepNew(obj)\
    (likely(PyList_CheckExact(obj) && Py_REFCNT(obj) == 1) ? __Pyx_NewRef(obj) : PySequence_List(obj))
#else
  #define __Pyx_PySequence_ListKeepNew(obj)  PySequence_List(obj)
#endif
#ifndef PySet_CheckExact
  #define PySet_CheckExact(obj)        __Pyx_IS_TYPE(obj, &PySet_Type)
#endif
#if PY_VERSION_HEX >= 0x030900A4
  #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt)
  #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size)
#else
  #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt)
  #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size)
#endif
enum __Pyx_ReferenceSharing {
  __Pyx_ReferenceSharing_DefinitelyUnique, // We created it so we know it's unshared - no need to check
  __Pyx_ReferenceSharing_OwnStrongReference,
  __Pyx_ReferenceSharing_FunctionArgument,
  __Pyx_ReferenceSharing_SharedReference, // Never trust it to be unshared because it's a global or similar
};
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && PY_VERSION_HEX >= 0x030E0000
#define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing)\
    (sharing == __Pyx_ReferenceSharing_DefinitelyUnique ? 1 :\
      (sharing == __Pyx_ReferenceSharing_FunctionArgument ? PyUnstable_Object_IsUniqueReferencedTemporary(o) :\
      (sharing == __Pyx_ReferenceSharing_OwnStrongReference ? PyUnstable_Object_IsUniquelyReferenced(o) : 0)))
#elif (CYTHON_COMPILING_IN_CPYTHON && !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING) || CYTHON_COMPILING_IN_LIMITED_API
#define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing) (((void)sharing), Py_REFCNT(o) == 1)
#else
#define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing) (((void)o), ((void)sharing), 0)
#endif
#if CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
  #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
    #define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i)
  #elif CYTHON_COMPILING_IN_LIMITED_API || !CYTHON_ASSUME_SAFE_MACROS
    #define __Pyx_PyList_GetItemRef(o, i) (likely((i) >= 0) ? PySequence_GetItem(o, i) : (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
  #else
    #define __Pyx_PyList_GetItemRef(o, i) PySequence_ITEM(o, i)
  #endif
#elif CYTHON_COMPILING_IN_LIMITED_API || !CYTHON_ASSUME_SAFE_MACROS
  #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
    #define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i)
  #else
    #define __Pyx_PyList_GetItemRef(o, i) __Pyx_XNewRef(PyList_GetItem(o, i))
  #endif
#else
  #define __Pyx_PyList_GetItemRef(o, i) __Pyx_NewRef(PyList_GET_ITEM(o, i))
#endif
#if CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS && !CYTHON_COMPILING_IN_LIMITED_API && CYTHON_ASSUME_SAFE_MACROS
  #define __Pyx_PyList_GetItemRefFast(o, i, unsafe_shared) (__Pyx_IS_UNIQUELY_REFERENCED(o, unsafe_shared) ?\
    __Pyx_NewRef(PyList_GET_ITEM(o, i)) : __Pyx_PyList_GetItemRef(o, i))
#else
  #define __Pyx_PyList_GetItemRefFast(o, i, unsafe_shared) __Pyx_PyList_GetItemRef(o, i)
#endif
#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
#define __Pyx_PyDict_GetItemRef(dict, key, result) PyDict_GetItemRef(dict, key, result)
#elif CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
static CYTHON_INLINE int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) {
  *result = PyObject_GetItem(dict, key);
  if (*result == NULL) {
    if (PyErr_ExceptionMatches(PyExc_KeyError)) {
      PyErr_Clear();
      return 0;
    }
    return -1;
  }
  return 1;
}
#else
static CYTHON_INLINE int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) {
  *result = PyDict_GetItemWithError(dict, key);
  if (*result == NULL) {
    return PyErr_Occurred() ? -1 : 0;
  }
  Py_INCREF(*result);
  return 1;
}
#endif
#if defined(CYTHON_DEBUG_VISIT_CONST) && CYTHON_DEBUG_VISIT_CONST
  #define __Pyx_VISIT_CONST(obj)  Py_VISIT(obj)
#else
  #define __Pyx_VISIT_CONST(obj)
#endif
#if CYTHON_ASSUME_SAFE_MACROS
  #define __Pyx_PySequence_ITEM(o, i) PySequence_ITEM(o, i)
  #define __Pyx_PySequence_SIZE(seq)  Py_SIZE(seq)
  #define __Pyx_PyTuple_SET_ITEM(o, i, v) (PyTuple_SET_ITEM(o, i, v), (0))
  #define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GET_ITEM(o, i)
  #define __Pyx_PyList_SET_ITEM(o, i, v) (PyList_SET_ITEM(o, i, v), (0))
  #define __Pyx_PyList_GET_ITEM(o, i) PyList_GET_ITEM(o, i)
#else
  #define __Pyx_PySequence_ITEM(o, i) PySequence_GetItem(o, i)
  #define __Pyx_PySequence_SIZE(seq)  PySequence_Size(seq)
  #define __Pyx_PyTuple_SET_ITEM(o, i, v) PyTuple_SetItem(o, i, v)
  #define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GetItem(o, i)
  #define __Pyx_PyList_SET_ITEM(o, i, v) PyList_SetItem(o, i, v)
  #define __Pyx_PyList_GET_ITEM(o, i) PyList_GetItem(o, i)
#endif
#if CYTHON_ASSUME_SAFE_SIZE
  #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_GET_SIZE(o)
  #define __Pyx_PyList_GET_SIZE(o) PyList_GET_SIZE(o)
  #define __Pyx_PySet_GET_SIZE(o) PySet_GET_SIZE(o)
  #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_GET_SIZE(o)
  #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_GET_SIZE(o)
  #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GET_LENGTH(o)
#else
  #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_Size(o)
  #define __Pyx_PyList_GET_SIZE(o) PyList_Size(o)
  #define __Pyx_PySet_GET_SIZE(o) PySet_Size(o)
  #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_Size(o)
  #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_Size(o)
  #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GetLength(o)
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_InternFromString)
  #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
#endif
#define __Pyx_PyLong_FromHash_t PyLong_FromSsize_t
#define __Pyx_PyLong_AsHash_t   __Pyx_PyIndex_AsSsize_t
#if __PYX_LIMITED_VERSION_HEX >= 0x030A0000
    #define __Pyx_PySendResult PySendResult
#else
    typedef enum {
        PYGEN_RETURN = 0,
        PYGEN_ERROR = -1,
        PYGEN_NEXT = 1,
    } __Pyx_PySendResult;
#endif
#if CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX < 0x030A00A3
  typedef __Pyx_PySendResult (*__Pyx_pyiter_sendfunc)(PyObject *iter, PyObject *value, PyObject **result);
#else
  #define __Pyx_pyiter_sendfunc sendfunc
#endif
#if !CYTHON_USE_AM_SEND
#define __PYX_HAS_PY_AM_SEND 0
#elif __PYX_LIMITED_VERSION_HEX >= 0x030A0000
#define __PYX_HAS_PY_AM_SEND 1
#else
#define __PYX_HAS_PY_AM_SEND 2  // our own backported implementation
#endif
#if __PYX_HAS_PY_AM_SEND < 2
    #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
#else
    typedef struct {
        unaryfunc am_await;
        unaryfunc am_aiter;
        unaryfunc am_anext;
        __Pyx_pyiter_sendfunc am_send;
    } __Pyx_PyAsyncMethodsStruct;
    #define __Pyx_SlotTpAsAsync(s) ((PyAsyncMethods*)(s))
#endif
#if CYTHON_USE_AM_SEND && PY_VERSION_HEX < 0x030A00F0
    #define __Pyx_TPFLAGS_HAVE_AM_SEND (1UL << 21)
#else
    #define __Pyx_TPFLAGS_HAVE_AM_SEND (0)
#endif
#if PY_VERSION_HEX >= 0x03090000
#define __Pyx_PyInterpreterState_Get() PyInterpreterState_Get()
#else
#define __Pyx_PyInterpreterState_Get() PyThreadState_Get()->interp
#endif
#if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030A0000
#ifdef __cplusplus
extern "C"
#endif
PyAPI_FUNC(void *) PyMem_Calloc(size_t nelem, size_t elsize);
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
static int __Pyx_init_co_variable(PyObject *inspect, const char* name, int *write_to) {
    int value;
    PyObject *py_value = PyObject_GetAttrString(inspect, name);
    if (!py_value) return 0;
    value = (int) PyLong_AsLong(py_value);
    Py_DECREF(py_value);
    *write_to = value;
    return value != -1 || !PyErr_Occurred();
}
static int __Pyx_init_co_variables(void) {
    PyObject *inspect;
    int result;
    inspect = PyImport_ImportModule("inspect");
    result =
#if !defined(CO_OPTIMIZED)
        __Pyx_init_co_variable(inspect, "CO_OPTIMIZED", &CO_OPTIMIZED) &&
#endif
#if !defined(CO_NEWLOCALS)
        __Pyx_init_co_variable(inspect, "CO_NEWLOCALS", &CO_NEWLOCALS) &&
#endif
#if !defined(CO_VARARGS)
        __Pyx_init_co_variable(inspect, "CO_VARARGS", &CO_VARARGS) &&
#endif
#if !defined(CO_VARKEYWORDS)
        __Pyx_init_co_variable(inspect, "CO_VARKEYWORDS", &CO_VARKEYWORDS) &&
#endif
#if !defined(CO_ASYNC_GENERATOR)
        __Pyx_init_co_variable(inspect, "CO_ASYNC_GENERATOR", &CO_ASYNC_GENERATOR) &&
#endif
#if !defined(CO_GENERATOR)
        __Pyx_init_co_variable(inspect, "CO_GENERATOR", &CO_GENERATOR) &&
#endif
#if !defined(CO_COROUTINE)
        __Pyx_init_co_variable(inspect, "CO_COROUTINE", &CO_COROUTINE) &&
#endif
        1;
    Py_DECREF(inspect);
    return result ? 0 : -1;
}
#else
static int __Pyx_init_co_variables(void) {
    return 0;  // It's a limited API-only feature
}
#endif

/* MathInitCode */
#if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)
  #ifndef _USE_MATH_DEFINES
    #define _USE_MATH_DEFINES
  #endif
#endif
#include <math.h>
#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
#define __Pyx_truncl trunc
#else
#define __Pyx_truncl truncl
#endif

#ifndef CYTHON_CLINE_IN_TRACEBACK_RUNTIME
#define CYTHON_CLINE_IN_TRACEBACK_RUNTIME 0
#endif
#ifndef CYTHON_CLINE_IN_TRACEBACK
#define CYTHON_CLINE_IN_TRACEBACK CYTHON_CLINE_IN_TRACEBACK_RUNTIME
#endif
#if CYTHON_CLINE_IN_TRACEBACK
#define __PYX_MARK_ERR_POS(f_index, lineno)  { __pyx_filename = __pyx_f[f_index]; (void) __pyx_filename; __pyx_lineno = lineno; (void) __pyx_lineno; __pyx_clineno = __LINE__; (void) __pyx_clineno; }
#else
#define __PYX_MARK_ERR_POS(f_index, lineno)  { __pyx_filename = __pyx_f[f_index]; (void) __pyx_filename; __pyx_lineno = lineno; (void) __pyx_lineno; (void) __pyx_clineno; }
#endif
#define __PYX_ERR(f_index, lineno, Ln_error) \
    { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; }

#ifdef CYTHON_EXTERN_C
    #undef __PYX_EXTERN_C
    #define __PYX_EXTERN_C CYTHON_EXTERN_C
#elif defined(__PYX_EXTERN_C)
    #ifdef _MSC_VER
    #pragma message ("Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.")
    #else
    #warning Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.
    #endif
#else
    #define __PYX_EXTERN_C extern "C++"
#endif

#define __PYX_HAVE__pyarrow__lib
#define __PYX_HAVE_API__pyarrow__lib
/* Early includes */
#include <string.h>
#include <stdio.h>

    #if __PYX_LIMITED_VERSION_HEX < 0x030d0000
    static CYTHON_INLINE PyObject *
    __Pyx_CAPI_PyList_GetItemRef(PyObject *list, Py_ssize_t index)
    {
        PyObject *item = PyList_GetItem(list, index);
        Py_XINCREF(item);
        return item;
    }
    #else
    #define __Pyx_CAPI_PyList_GetItemRef PyList_GetItemRef
    #endif

    #if CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX < 0x030d0000
    static CYTHON_INLINE int
    __Pyx_CAPI_PyList_Extend(PyObject *list, PyObject *iterable)
    {
        return PyList_SetSlice(list, PY_SSIZE_T_MAX, PY_SSIZE_T_MAX, iterable);
    }

    static CYTHON_INLINE int
    __Pyx_CAPI_PyList_Clear(PyObject *list)
    {
        return PyList_SetSlice(list, 0, PY_SSIZE_T_MAX, NULL);
    }
    #else
    #define __Pyx_CAPI_PyList_Extend PyList_Extend
    #define __Pyx_CAPI_PyList_Clear PyList_Clear
    #endif
    

    #if PY_MAJOR_VERSION >= 3
      #define __Pyx_PyFloat_FromString(obj)  PyFloat_FromString(obj)
    #else
      #define __Pyx_PyFloat_FromString(obj)  PyFloat_FromString(obj, NULL)
    #endif
    
#include <stddef.h>

    #if PY_MAJOR_VERSION <= 2
    #define PyDict_GetItemWithError _PyDict_GetItemWithError
    #endif

    #if __PYX_LIMITED_VERSION_HEX < 0x030d0000
    static CYTHON_INLINE int
    __Pyx_CAPI_PyDict_GetItemStringRef(PyObject *mp, const char *key, PyObject **result)
    {
        int res;
        PyObject *key_obj = PyUnicode_FromString(key);
        if (key_obj == NULL) {
            *result = NULL;
            return -1;
        }
        res = __Pyx_PyDict_GetItemRef(mp, key_obj, result);
        Py_DECREF(key_obj);
        return res;
    }
    #else
    #define __Pyx_CAPI_PyDict_GetItemStringRef PyDict_GetItemStringRef
    #endif
    #if PY_VERSION_HEX < 0x030d0000 || (CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030F0000)
    static CYTHON_INLINE int
    __Pyx_CAPI_PyDict_SetDefaultRef(PyObject *d, PyObject *key, PyObject *default_value,
                        PyObject **result)
    {
        PyObject *value;
        if (__Pyx_PyDict_GetItemRef(d, key, &value) < 0) {
            // get error
            if (result) {
                *result = NULL;
            }
            return -1;
        }
        if (value != NULL) {
            // present
            if (result) {
                *result = value;
            }
            else {
                Py_DECREF(value);
            }
            return 1;
        }

        // missing: set the item
        if (PyDict_SetItem(d, key, default_value) < 0) {
            // set error
            if (result) {
                *result = NULL;
            }
            return -1;
        }
        if (result) {
            Py_INCREF(default_value);
            *result = default_value;
        }
        return 0;
    }
    #else
    #define __Pyx_CAPI_PyDict_SetDefaultRef PyDict_SetDefaultRef
    #endif
    

    #if PY_VERSION_HEX < 0x030d0000
    static CYTHON_INLINE int __Pyx_PyWeakref_GetRef(PyObject *ref, PyObject **pobj)
    {
        PyObject *obj = PyWeakref_GetObject(ref);
        if (obj == NULL) {
            // SystemError if ref is NULL
            *pobj = NULL;
            return -1;
        }
        if (obj == Py_None) {
            *pobj = NULL;
            return 0;
        }
        Py_INCREF(obj);
        *pobj = obj;
        return 1;
    }
    #else
    #define __Pyx_PyWeakref_GetRef PyWeakref_GetRef
    #endif
    
#include "pythread.h"

    #if (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM < 0x07030600) && !defined(PyContextVar_Get)
    #define PyContextVar_Get(var, d, v)         ((d) ?             ((void)(var), Py_INCREF(d), (v)[0] = (d), 0) :             ((v)[0] = NULL, 0)         )
    #endif
    
#include "ios"
#include "new"
#include "stdexcept"
#include "typeinfo"
#include <memory>
#include <utility>

    #if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1600)
    // move should be defined for these versions of MSVC, but __cplusplus isn't set usefully
    #include <type_traits>

    namespace cython_std {
    template <typename T> typename std::remove_reference<T>::type&& move(T& t) noexcept { return std::move(t); }
    template <typename T> typename std::remove_reference<T>::type&& move(T&& t) noexcept { return std::move(t); }
    }

    #endif
    
#include <stdint.h>
#include <functional>
#include <optional>
#include <string_view>
#include <string>
#include <vector>
#include <unordered_map>
#include <unordered_set>

    #if CYTHON_COMPILING_IN_LIMITED_API
    #ifdef _MSC_VER
    #pragma message ("This module uses CPython specific internals of 'datetime.datetime', which are not available in the limited API.")
    #else
    #warning This module uses CPython specific internals of 'datetime.datetime', which are not available in the limited API.
    #endif
    #endif
    
#include "datetime.h"

    #define __Pyx_DateTime_DateTimeWithFold(year, month, day, hour, minute, second, microsecond, tz, fold)         PyDateTimeAPI->DateTime_FromDateAndTimeAndFold(year, month, day, hour, minute, second,             microsecond, tz, fold, PyDateTimeAPI->DateTimeType)
    #define __Pyx_DateTime_TimeWithFold(hour, minute, second, microsecond, tz, fold)         PyDateTimeAPI->Time_FromTimeAndFold(hour, minute, second, microsecond, tz, fold, PyDateTimeAPI->TimeType)

    #define __Pyx_TimeZone_UTC PyDateTime_TimeZone_UTC
    #define __Pyx_TimeZone_FromOffsetAndName(offset, name) PyTimeZone_FromOffsetAndName(offset, name)

    /* Backport for Python < 3.10 */
    #if PY_VERSION_HEX < 0x030a00a1
        #ifndef PyDateTime_TIME_GET_TZINFO
            #define PyDateTime_TIME_GET_TZINFO(o)                 ((((PyDateTime_Time*)o)->hastzinfo) ? ((PyDateTime_Time*)o)->tzinfo : Py_None)
        #endif
        #ifndef PyDateTime_DATE_GET_TZINFO
            #define PyDateTime_DATE_GET_TZINFO(o)                 ((((PyDateTime_DateTime*)o)->hastzinfo) ? ((PyDateTime_DateTime*)o)->tzinfo : Py_None)
        #endif
    #endif
    

    #include <memory>
    #include <string>
    #include <string_view>
    #include <utility>

    namespace arrow {
    namespace py {

    template <typename T>
    std::shared_ptr<T> to_shared(std::unique_ptr<T>& t) {
        return std::move(t);
    }
    template <typename T>
    std::shared_ptr<T> to_shared(std::unique_ptr<T>&& t) {
        return std::move(t);
    }

    // Needed until https://github.com/cython/cython/issues/6651 is fixed
    inline std::string to_string(std::string_view s) {
        return std::string(s);
    }

    }  // namespace py
    }  // namespace arrow
    
#include "arrow/python/platform.h"
#include <Python.h>
#include "arrow/api.h"
#include "arrow/result.h"
#include "arrow/util/future.h"
#include "arrow/python/async.h"
#include "arrow/python/common.h"
#include "arrow/util/key_value_metadata.h"
#include "arrow/util/decimal.h"
#include "arrow/config.h"
#include <variant>
#include "arrow/c/dlpack_abi.h"
#include "arrow/c/dlpack.h"
#include "arrow/builder.h"
#include "arrow/util/cancel.h"
#include "arrow/io/api.h"
#include "arrow/ipc/api.h"
#include "arrow/util/value_parsing.h"
#include "arrow/csv/api.h"
#include "arrow/json/options.h"
#include "arrow/json/reader.h"
#include "arrow/util/thread_pool.h"
#include "arrow/compute/api.h"

    #include "arrow/compute/function.h"
    namespace arrow {
    namespace compute {
    namespace internal {
    Result<std::unique_ptr<FunctionOptions>> DeserializeFunctionOptions(
        const Buffer& buffer);
    } //  namespace internal
    } //  namespace compute
    } //  namespace arrow
    

    #include <unordered_map>

    #include "arrow/type.h"
    #include "arrow/datum.h"

    namespace arrow {
    namespace compute {
    struct KnownFieldValues {
      std::unordered_map<FieldRef, Datum, FieldRef::Hash> map;
    };
    } //  namespace compute
    } //  namespace arrow
    
#include "arrow/compute/expression.h"
#include "arrow/extension_type.h"
#include "arrow/extension/json.h"
#include "arrow/extension/uuid.h"
#include "arrow/extension/fixed_shape_tensor.h"
#include "arrow/extension/opaque.h"
#include "arrow/extension/bool8.h"
#include "arrow/util/compression.h"
#include "arrow/util/io_util.h"
#include "arrow/util/iterator.h"
#include "arrow/util/secure_string.h"
#include "arrow/array/concatenate.h"
#include "arrow/c/abi.h"
#include "arrow/c/bridge.h"
#include "arrow/util/byte_size.h"
#include "arrow/python/udf.h"
#include "arrow/compute/cast.h"
#include "arrow/python/csv.h"
#include "arrow/python/api.h"
#include "arrow/python/arrow_to_pandas.h"
#include "arrow/python/numpy_init.h"
#include "arrow/python/pyarrow.h"
#include "arrow/python/inference.h"
#include "arrow/python/ipc.h"
#include "arrow/python/extension_type.h"
#include "arrow/python/benchmark.h"
#include "arrow/python/gdb.h"
#include "arrow/python/helpers.h"
#include "arrow/python/config.h"
#include <stdlib.h>
#ifdef _OPENMP
#include <omp.h>
#endif /* _OPENMP */

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

#ifdef CYTHON_FREETHREADING_COMPATIBLE
#if CYTHON_FREETHREADING_COMPATIBLE
#define __Pyx_FREETHREADING_COMPATIBLE Py_MOD_GIL_NOT_USED
#else
#define __Pyx_FREETHREADING_COMPATIBLE Py_MOD_GIL_USED
#endif
#else
#define __Pyx_FREETHREADING_COMPATIBLE Py_MOD_GIL_NOT_USED
#endif
#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
#define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0
#define __PYX_DEFAULT_STRING_ENCODING ""
#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
#define __Pyx_uchar_cast(c) ((unsigned char)c)
#define __Pyx_long_cast(x) ((long)x)
#define __Pyx_fits_Py_ssize_t(v, type, is_signed)  (\
    (sizeof(type) < sizeof(Py_ssize_t))  ||\
    (sizeof(type) > sizeof(Py_ssize_t) &&\
          likely(v < (type)PY_SSIZE_T_MAX ||\
                 v == (type)PY_SSIZE_T_MAX)  &&\
          (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
                                v == (type)PY_SSIZE_T_MIN)))  ||\
    (sizeof(type) == sizeof(Py_ssize_t) &&\
          (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
                               v == (type)PY_SSIZE_T_MAX)))  )
static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) {
    return (size_t) i < (size_t) limit;
}
#if defined (__cplusplus) && __cplusplus >= 201103L
    #include <cstdlib>
    #define __Pyx_sst_abs(value) std::abs(value)
#elif SIZEOF_INT >= SIZEOF_SIZE_T
    #define __Pyx_sst_abs(value) abs(value)
#elif SIZEOF_LONG >= SIZEOF_SIZE_T
    #define __Pyx_sst_abs(value) labs(value)
#elif defined (_MSC_VER)
    #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define __Pyx_sst_abs(value) llabs(value)
#elif defined (__GNUC__)
    #define __Pyx_sst_abs(value) __builtin_llabs(value)
#else
    #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
#endif
static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s);
static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char*);
#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 CYTHON_ASSUME_SAFE_MACROS
    #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_PyByteArray_AsString(s) PyByteArray_AS_STRING(s)
#else
    #define __Pyx_PyBytes_AsWritableString(s)     ((char*) PyBytes_AsString(s))
    #define __Pyx_PyBytes_AsWritableSString(s)    ((signed char*) PyBytes_AsString(s))
    #define __Pyx_PyBytes_AsWritableUString(s)    ((unsigned char*) PyBytes_AsString(s))
    #define __Pyx_PyBytes_AsString(s)     ((const char*) PyBytes_AsString(s))
    #define __Pyx_PyBytes_AsSString(s)    ((const signed char*) PyBytes_AsString(s))
    #define __Pyx_PyBytes_AsUString(s)    ((const unsigned char*) PyBytes_AsString(s))
    #define __Pyx_PyByteArray_AsString(s) PyByteArray_AsString(s)
#endif
#define __Pyx_PyObject_AsWritableString(s)    ((char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsWritableSString(s)    ((signed char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsWritableUString(s)    ((unsigned char*)(__pyx_uintptr_t) __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_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
#define __Pyx_PyUnicode_FromOrdinal(o)       PyUnicode_FromOrdinal((int)o)
#define __Pyx_PyUnicode_AsUnicode            PyUnicode_AsUnicode
static CYTHON_INLINE PyObject *__Pyx_NewRef(PyObject *obj) {
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_NewRef)
    return Py_NewRef(obj);
#else
    Py_INCREF(obj);
    return obj;
#endif
}
static CYTHON_INLINE PyObject *__Pyx_XNewRef(PyObject *obj) {
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_XNewRef)
    return Py_XNewRef(obj);
#else
    Py_XINCREF(obj);
    return obj;
#endif
}
static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b);
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_Long(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_PyLong_FromSize_t(size_t);
static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*);
#if CYTHON_ASSUME_SAFE_MACROS
#define __Pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
#define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AS_DOUBLE(x)
#else
#define __Pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
#define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AsDouble(x)
#endif
#define __Pyx_PyFloat_AsFloat(x) ((float) __Pyx_PyFloat_AsDouble(x))
#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
#if CYTHON_USE_PYLONG_INTERNALS
  #if PY_VERSION_HEX >= 0x030C00A7
  #ifndef _PyLong_SIGN_MASK
    #define _PyLong_SIGN_MASK 3
  #endif
  #ifndef _PyLong_NON_SIZE_BITS
    #define _PyLong_NON_SIZE_BITS 3
  #endif
  #define __Pyx_PyLong_Sign(x)  (((PyLongObject*)x)->long_value.lv_tag & _PyLong_SIGN_MASK)
  #define __Pyx_PyLong_IsNeg(x)  ((__Pyx_PyLong_Sign(x) & 2) != 0)
  #define __Pyx_PyLong_IsNonNeg(x)  (!__Pyx_PyLong_IsNeg(x))
  #define __Pyx_PyLong_IsZero(x)  (__Pyx_PyLong_Sign(x) & 1)
  #define __Pyx_PyLong_IsPos(x)  (__Pyx_PyLong_Sign(x) == 0)
  #define __Pyx_PyLong_CompactValueUnsigned(x)  (__Pyx_PyLong_Digits(x)[0])
  #define __Pyx_PyLong_DigitCount(x)  ((Py_ssize_t) (((PyLongObject*)x)->long_value.lv_tag >> _PyLong_NON_SIZE_BITS))
  #define __Pyx_PyLong_SignedDigitCount(x)\
        ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * __Pyx_PyLong_DigitCount(x))
  #if defined(PyUnstable_Long_IsCompact) && defined(PyUnstable_Long_CompactValue)
    #define __Pyx_PyLong_IsCompact(x)     PyUnstable_Long_IsCompact((PyLongObject*) x)
    #define __Pyx_PyLong_CompactValue(x)  PyUnstable_Long_CompactValue((PyLongObject*) x)
  #else
    #define __Pyx_PyLong_IsCompact(x)     (((PyLongObject*)x)->long_value.lv_tag < (2 << _PyLong_NON_SIZE_BITS))
    #define __Pyx_PyLong_CompactValue(x)  ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * (Py_ssize_t) __Pyx_PyLong_Digits(x)[0])
  #endif
  typedef Py_ssize_t  __Pyx_compact_pylong;
  typedef size_t  __Pyx_compact_upylong;
  #else
  #define __Pyx_PyLong_IsNeg(x)  (Py_SIZE(x) < 0)
  #define __Pyx_PyLong_IsNonNeg(x)  (Py_SIZE(x) >= 0)
  #define __Pyx_PyLong_IsZero(x)  (Py_SIZE(x) == 0)
  #define __Pyx_PyLong_IsPos(x)  (Py_SIZE(x) > 0)
  #define __Pyx_PyLong_CompactValueUnsigned(x)  ((Py_SIZE(x) == 0) ? 0 : __Pyx_PyLong_Digits(x)[0])
  #define __Pyx_PyLong_DigitCount(x)  __Pyx_sst_abs(Py_SIZE(x))
  #define __Pyx_PyLong_SignedDigitCount(x)  Py_SIZE(x)
  #define __Pyx_PyLong_IsCompact(x)  (Py_SIZE(x) == 0 || Py_SIZE(x) == 1 || Py_SIZE(x) == -1)
  #define __Pyx_PyLong_CompactValue(x)\
        ((Py_SIZE(x) == 0) ? (sdigit) 0 : ((Py_SIZE(x) < 0) ? -(sdigit)__Pyx_PyLong_Digits(x)[0] : (sdigit)__Pyx_PyLong_Digits(x)[0]))
  typedef sdigit  __Pyx_compact_pylong;
  typedef digit  __Pyx_compact_upylong;
  #endif
  #if PY_VERSION_HEX >= 0x030C00A5
  #define __Pyx_PyLong_Digits(x)  (((PyLongObject*)x)->long_value.ob_digit)
  #else
  #define __Pyx_PyLong_Digits(x)  (((PyLongObject*)x)->ob_digit)
  #endif
#endif
#if __PYX_DEFAULT_STRING_ENCODING_IS_UTF8
  #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
#elif __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
  #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeASCII(c_str, size, NULL)
#else
  #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
#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__ */
/* PretendToInitialize */
#ifdef __cplusplus
#if __cplusplus > 201103L
#include <type_traits>
#endif
template <typename T>
static void __Pyx_pretend_to_initialize(T* ptr) {
#if __cplusplus > 201103L
    if ((std::is_trivially_default_constructible<T>::value))
#endif
        *ptr = T();
    (void)ptr;
}
#else
static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }
#endif


#if !CYTHON_USE_MODULE_STATE
static PyObject *__pyx_m = NULL;
#endif
static int __pyx_lineno;
static int __pyx_clineno = 0;
static const char * const __pyx_cfilenm = __FILE__;
static const char *__pyx_filename;

/* #### Code section: filename_table ### */

static const char* const __pyx_f[] = {
  "pyarrow/lib.pyx",
  "pyarrow/types.pxi",
  "pyarrow/error.pxi",
  "pyarrow/scalar.pxi",
  "pyarrow/array.pxi",
  "pyarrow/tensor.pxi",
  "pyarrow/io.pxi",
  "EnumTypeToPy",
  "cpython/contextvars.pxd",
  "cpython/datetime.pxd",
  "pyarrow/compat.pxi",
  "pyarrow/config.pxi",
  "pyarrow/pandas-shim.pxi",
  "pyarrow/memory.pxi",
  "pyarrow/device.pxi",
  "pyarrow/lib.pxd",
  "pyarrow/builder.pxi",
  "pyarrow/table.pxi",
  "pyarrow/_dlpack.pxi",
  "pyarrow/ipc.pxi",
  "pyarrow/benchmark.pxi",
  "pyarrow/public-api.pxi",
  "cpython/type.pxd",
  "cpython/bool.pxd",
  "cpython/complex.pxd",
};
/* #### Code section: utility_code_proto_before_types ### */
/* Atomics.proto (used by UnpackUnboundCMethod) */
#include <pythread.h>
#ifndef CYTHON_ATOMICS
    #define CYTHON_ATOMICS 1
#endif
#define __PYX_CYTHON_ATOMICS_ENABLED() CYTHON_ATOMICS
#define __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING() CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
#define __pyx_atomic_int_type int
#define __pyx_nonatomic_int_type int
#if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\
                        (__STDC_VERSION__ >= 201112L) &&\
                        !defined(__STDC_NO_ATOMICS__))
    #include <stdatomic.h>
#elif CYTHON_ATOMICS && (defined(__cplusplus) && (\
                    (__cplusplus >= 201103L) ||\
                    (defined(_MSC_VER) && _MSC_VER >= 1700)))
    #include <atomic>
#endif
#if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\
                        (__STDC_VERSION__ >= 201112L) &&\
                        !defined(__STDC_NO_ATOMICS__) &&\
                       ATOMIC_INT_LOCK_FREE == 2)
    #undef __pyx_atomic_int_type
    #define __pyx_atomic_int_type atomic_int
    #define __pyx_atomic_ptr_type atomic_uintptr_t
    #define __pyx_nonatomic_ptr_type uintptr_t
    #define __pyx_atomic_incr_relaxed(value) atomic_fetch_add_explicit(value, 1, memory_order_relaxed)
    #define __pyx_atomic_incr_acq_rel(value) atomic_fetch_add_explicit(value, 1, memory_order_acq_rel)
    #define __pyx_atomic_decr_acq_rel(value) atomic_fetch_sub_explicit(value, 1, memory_order_acq_rel)
    #define __pyx_atomic_sub(value, arg) atomic_fetch_sub(value, arg)
    #define __pyx_atomic_int_cmp_exchange(value, expected, desired) atomic_compare_exchange_strong(value, expected, desired)
    #define __pyx_atomic_load(value) atomic_load(value)
    #define __pyx_atomic_store(value, new_value) atomic_store(value, new_value)
    #define __pyx_atomic_pointer_load_relaxed(value) atomic_load_explicit(value, memory_order_relaxed)
    #define __pyx_atomic_pointer_load_acquire(value) atomic_load_explicit(value, memory_order_acquire)
    #define __pyx_atomic_pointer_exchange(value, new_value) atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value)
    #define __pyx_atomic_pointer_cmp_exchange(value, expected, desired) atomic_compare_exchange_strong(value, expected, desired)
    #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER)
        #pragma message ("Using standard C atomics")
    #elif defined(__PYX_DEBUG_ATOMICS)
        #warning "Using standard C atomics"
    #endif
#elif CYTHON_ATOMICS && (defined(__cplusplus) && (\
                    (__cplusplus >= 201103L) ||\
\
                    (defined(_MSC_VER) && _MSC_VER >= 1700)) &&\
                    ATOMIC_INT_LOCK_FREE == 2)
    #undef __pyx_atomic_int_type
    #define __pyx_atomic_int_type std::atomic_int
    #define __pyx_atomic_ptr_type std::atomic_uintptr_t
    #define __pyx_nonatomic_ptr_type uintptr_t
    #define __pyx_atomic_incr_relaxed(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_relaxed)
    #define __pyx_atomic_incr_acq_rel(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_acq_rel)
    #define __pyx_atomic_decr_acq_rel(value) std::atomic_fetch_sub_explicit(value, 1, std::memory_order_acq_rel)
    #define __pyx_atomic_sub(value, arg) std::atomic_fetch_sub(value, arg)
    #define __pyx_atomic_int_cmp_exchange(value, expected, desired) std::atomic_compare_exchange_strong(value, expected, desired)
    #define __pyx_atomic_load(value) std::atomic_load(value)
    #define __pyx_atomic_store(value, new_value) std::atomic_store(value, new_value)
    #define __pyx_atomic_pointer_load_relaxed(value) std::atomic_load_explicit(value, std::memory_order_relaxed)
    #define __pyx_atomic_pointer_load_acquire(value) std::atomic_load_explicit(value, std::memory_order_acquire)
    #define __pyx_atomic_pointer_exchange(value, new_value) std::atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value)
    #define __pyx_atomic_pointer_cmp_exchange(value, expected, desired) std::atomic_compare_exchange_strong(value, expected, desired)
    #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER)
        #pragma message ("Using standard C++ atomics")
    #elif defined(__PYX_DEBUG_ATOMICS)
        #warning "Using standard C++ atomics"
    #endif
#elif CYTHON_ATOMICS && (__GNUC__ >= 5 || (__GNUC__ == 4 &&\
                    (__GNUC_MINOR__ > 1 ||\
                    (__GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ >= 2))))
    #define __pyx_atomic_ptr_type void*
    #define __pyx_nonatomic_ptr_type void*
    #define __pyx_atomic_incr_relaxed(value) __sync_fetch_and_add(value, 1)
    #define __pyx_atomic_incr_acq_rel(value) __sync_fetch_and_add(value, 1)
    #define __pyx_atomic_decr_acq_rel(value) __sync_fetch_and_sub(value, 1)
    #define __pyx_atomic_sub(value, arg) __sync_fetch_and_sub(value, arg)
    static CYTHON_INLINE int __pyx_atomic_int_cmp_exchange(__pyx_atomic_int_type* value, __pyx_nonatomic_int_type* expected, __pyx_nonatomic_int_type desired) {
        __pyx_nonatomic_int_type old = __sync_val_compare_and_swap(value, *expected, desired);
        int result = old == *expected;
        *expected = old;
        return result;
    }
    #define __pyx_atomic_load(value) __sync_fetch_and_add(value, 0)
    #define __pyx_atomic_store(value, new_value) __sync_lock_test_and_set(value, new_value)
    #define __pyx_atomic_pointer_load_relaxed(value) __sync_fetch_and_add(value, 0)
    #define __pyx_atomic_pointer_load_acquire(value) __sync_fetch_and_add(value, 0)
    #define __pyx_atomic_pointer_exchange(value, new_value) __sync_lock_test_and_set(value, (__pyx_atomic_ptr_type)new_value)
    static CYTHON_INLINE int __pyx_atomic_pointer_cmp_exchange(__pyx_atomic_ptr_type* value, __pyx_nonatomic_ptr_type* expected, __pyx_nonatomic_ptr_type desired) {
        __pyx_nonatomic_ptr_type old = __sync_val_compare_and_swap(value, *expected, desired);
        int result = old == *expected;
        *expected = old;
        return result;
    }
    #ifdef __PYX_DEBUG_ATOMICS
        #warning "Using GNU atomics"
    #endif
#elif CYTHON_ATOMICS && defined(_MSC_VER)
    #include <intrin.h>
    #undef __pyx_atomic_int_type
    #define __pyx_atomic_int_type long
    #define __pyx_atomic_ptr_type void*
    #undef __pyx_nonatomic_int_type
    #define __pyx_nonatomic_int_type long
    #define __pyx_nonatomic_ptr_type void*
    #pragma intrinsic (_InterlockedExchangeAdd, _InterlockedExchange, _InterlockedCompareExchange, _InterlockedCompareExchangePointer, _InterlockedExchangePointer)
    #define __pyx_atomic_incr_relaxed(value) _InterlockedExchangeAdd(value, 1)
    #define __pyx_atomic_incr_acq_rel(value) _InterlockedExchangeAdd(value, 1)
    #define __pyx_atomic_decr_acq_rel(value) _InterlockedExchangeAdd(value, -1)
    #define __pyx_atomic_sub(value, arg) _InterlockedExchangeAdd(value, -arg)
    static CYTHON_INLINE int __pyx_atomic_int_cmp_exchange(__pyx_atomic_int_type* value, __pyx_nonatomic_int_type* expected, __pyx_nonatomic_int_type desired) {
        __pyx_nonatomic_int_type old = _InterlockedCompareExchange(value, desired, *expected);
        int result = old == *expected;
        *expected = old;
        return result;
    }
    #define __pyx_atomic_load(value) _InterlockedExchangeAdd(value, 0)
    #define __pyx_atomic_store(value, new_value) _InterlockedExchange(value, new_value)
    #define __pyx_atomic_pointer_load_relaxed(value) *(void * volatile *)value
    #define __pyx_atomic_pointer_load_acquire(value) _InterlockedCompareExchangePointer(value, 0, 0)
    #define __pyx_atomic_pointer_exchange(value, new_value) _InterlockedExchangePointer(value, (__pyx_atomic_ptr_type)new_value)
    static CYTHON_INLINE int __pyx_atomic_pointer_cmp_exchange(__pyx_atomic_ptr_type* value, __pyx_nonatomic_ptr_type* expected, __pyx_nonatomic_ptr_type desired) {
        __pyx_atomic_ptr_type old = _InterlockedCompareExchangePointer(value, desired, *expected);
        int result = old == *expected;
        *expected = old;
        return result;
    }
    #ifdef __PYX_DEBUG_ATOMICS
        #pragma message ("Using MSVC atomics")
    #endif
#else
    #undef CYTHON_ATOMICS
    #define CYTHON_ATOMICS 0
    #ifdef __PYX_DEBUG_ATOMICS
        #warning "Not using atomics"
    #endif
#endif

/* CriticalSectionsDefinition.proto (used by CriticalSections) */
#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
#define __Pyx_PyCriticalSection void*
#define __Pyx_PyCriticalSection2 void*
#define __Pyx_PyCriticalSection_End(cs)
#define __Pyx_PyCriticalSection2_End(cs)
#else
#define __Pyx_PyCriticalSection PyCriticalSection
#define __Pyx_PyCriticalSection2 PyCriticalSection2
#define __Pyx_PyCriticalSection_End PyCriticalSection_End
#define __Pyx_PyCriticalSection2_End PyCriticalSection2_End
#endif

/* CriticalSections.proto (used by ParseKeywordsImpl) */
#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
#define __Pyx_PyCriticalSection_Begin(cs, arg) (void)(cs)
#define __Pyx_PyCriticalSection2_Begin(cs, arg1, arg2) (void)(cs)
#else
#define __Pyx_PyCriticalSection_Begin PyCriticalSection_Begin
#define __Pyx_PyCriticalSection2_Begin PyCriticalSection2_Begin
#endif
#if PY_VERSION_HEX < 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API
#define __Pyx_BEGIN_CRITICAL_SECTION(o) {
#define __Pyx_END_CRITICAL_SECTION() }
#else
#define __Pyx_BEGIN_CRITICAL_SECTION Py_BEGIN_CRITICAL_SECTION
#define __Pyx_END_CRITICAL_SECTION Py_END_CRITICAL_SECTION
#endif

/* ForceInitThreads.proto */
#ifndef __PYX_FORCE_INIT_THREADS
  #define __PYX_FORCE_INIT_THREADS 0
#endif

/* NoFastGil.proto */
#define __Pyx_PyGILState_Ensure PyGILState_Ensure
#define __Pyx_PyGILState_Release PyGILState_Release
#define __Pyx_FastGIL_Remember()
#define __Pyx_FastGIL_Forget()
#define __Pyx_FastGilFuncInit()

/* IncludeStructmemberH.proto (used by FixUpExtensionType) */
#include <structmember.h>

/* #### Code section: numeric_typedefs ### */
/* #### Code section: complex_type_declarations ### */
/* #### Code section: type_declarations ### */

/*--- Type declarations ---*/
struct __pyx_obj_7pyarrow_3lib__Weakrefable;
struct __pyx_obj_7pyarrow_3lib_IpcWriteOptions;
struct __pyx_obj_7pyarrow_3lib_IpcReadOptions;
struct __pyx_obj_7pyarrow_3lib_Message;
struct __pyx_obj_7pyarrow_3lib_MemoryPool;
struct __pyx_obj_7pyarrow_3lib_DataType;
struct __pyx_obj_7pyarrow_3lib_ListType;
struct __pyx_obj_7pyarrow_3lib_LargeListType;
struct __pyx_obj_7pyarrow_3lib_ListViewType;
struct __pyx_obj_7pyarrow_3lib_LargeListViewType;
struct __pyx_obj_7pyarrow_3lib_MapType;
struct __pyx_obj_7pyarrow_3lib_FixedSizeListType;
struct __pyx_obj_7pyarrow_3lib_StructType;
struct __pyx_obj_7pyarrow_3lib_DictionaryMemo;
struct __pyx_obj_7pyarrow_3lib_DictionaryType;
struct __pyx_obj_7pyarrow_3lib_TimestampType;
struct __pyx_obj_7pyarrow_3lib_Time32Type;
struct __pyx_obj_7pyarrow_3lib_Time64Type;
struct __pyx_obj_7pyarrow_3lib_DurationType;
struct __pyx_obj_7pyarrow_3lib_FixedSizeBinaryType;
struct __pyx_obj_7pyarrow_3lib_Decimal32Type;
struct __pyx_obj_7pyarrow_3lib_Decimal64Type;
struct __pyx_obj_7pyarrow_3lib_Decimal128Type;
struct __pyx_obj_7pyarrow_3lib_Decimal256Type;
struct __pyx_obj_7pyarrow_3lib_RunEndEncodedType;
struct __pyx_obj_7pyarrow_3lib_BaseExtensionType;
struct __pyx_obj_7pyarrow_3lib_ExtensionType;
struct __pyx_obj_7pyarrow_3lib_FixedShapeTensorType;
struct __pyx_obj_7pyarrow_3lib_Bool8Type;
struct __pyx_obj_7pyarrow_3lib_OpaqueType;
struct __pyx_obj_7pyarrow_3lib_UuidType;
struct __pyx_obj_7pyarrow_3lib_JsonType;
struct __pyx_obj_7pyarrow_3lib__Metadata;
struct __pyx_obj_7pyarrow_3lib_KeyValueMetadata;
struct __pyx_obj_7pyarrow_3lib_Field;
struct __pyx_obj_7pyarrow_3lib_Schema;
struct __pyx_obj_7pyarrow_3lib_Scalar;
struct __pyx_obj_7pyarrow_3lib_ArrayStatistics;
struct __pyx_obj_7pyarrow_3lib__PandasConvertible;
struct __pyx_obj_7pyarrow_3lib_Array;
struct __pyx_obj_7pyarrow_3lib_Tensor;
struct __pyx_obj_7pyarrow_3lib_SparseCSRMatrix;
struct __pyx_obj_7pyarrow_3lib_SparseCSCMatrix;
struct __pyx_obj_7pyarrow_3lib_SparseCOOTensor;
struct __pyx_obj_7pyarrow_3lib_SparseCSFTensor;
struct __pyx_obj_7pyarrow_3lib_NullArray;
struct __pyx_obj_7pyarrow_3lib_BooleanArray;
struct __pyx_obj_7pyarrow_3lib_NumericArray;
struct __pyx_obj_7pyarrow_3lib_IntegerArray;
struct __pyx_obj_7pyarrow_3lib_FloatingPointArray;
struct __pyx_obj_7pyarrow_3lib_Int8Array;
struct __pyx_obj_7pyarrow_3lib_UInt8Array;
struct __pyx_obj_7pyarrow_3lib_Int16Array;
struct __pyx_obj_7pyarrow_3lib_UInt16Array;
struct __pyx_obj_7pyarrow_3lib_Int32Array;
struct __pyx_obj_7pyarrow_3lib_UInt32Array;
struct __pyx_obj_7pyarrow_3lib_Int64Array;
struct __pyx_obj_7pyarrow_3lib_UInt64Array;
struct __pyx_obj_7pyarrow_3lib_HalfFloatArray;
struct __pyx_obj_7pyarrow_3lib_FloatArray;
struct __pyx_obj_7pyarrow_3lib_DoubleArray;
struct __pyx_obj_7pyarrow_3lib_FixedSizeBinaryArray;
struct __pyx_obj_7pyarrow_3lib_Decimal32Array;
struct __pyx_obj_7pyarrow_3lib_Decimal64Array;
struct __pyx_obj_7pyarrow_3lib_Decimal128Array;
struct __pyx_obj_7pyarrow_3lib_Decimal256Array;
struct __pyx_obj_7pyarrow_3lib_StructArray;
struct __pyx_obj_7pyarrow_3lib_BaseListArray;
struct __pyx_obj_7pyarrow_3lib_ListArray;
struct __pyx_obj_7pyarrow_3lib_LargeListArray;
struct __pyx_obj_7pyarrow_3lib_ListViewArray;
struct __pyx_obj_7pyarrow_3lib_LargeListViewArray;
struct __pyx_obj_7pyarrow_3lib_MapArray;
struct __pyx_obj_7pyarrow_3lib_FixedSizeListArray;
struct __pyx_obj_7pyarrow_3lib_UnionArray;
struct __pyx_obj_7pyarrow_3lib_StringArray;
struct __pyx_obj_7pyarrow_3lib_BinaryArray;
struct __pyx_obj_7pyarrow_3lib_StringViewArray;
struct __pyx_obj_7pyarrow_3lib_BinaryViewArray;
struct __pyx_obj_7pyarrow_3lib_DictionaryArray;
struct __pyx_obj_7pyarrow_3lib_ExtensionArray;
struct __pyx_obj_7pyarrow_3lib_MonthDayNanoIntervalArray;
struct __pyx_obj_7pyarrow_3lib_ChunkedArray;
struct __pyx_obj_7pyarrow_3lib__Tabular;
struct __pyx_obj_7pyarrow_3lib_Table;
struct __pyx_obj_7pyarrow_3lib_RecordBatch;
struct __pyx_obj_7pyarrow_3lib_Device;
struct __pyx_obj_7pyarrow_3lib_MemoryManager;
struct __pyx_obj_7pyarrow_3lib_Buffer;
struct __pyx_obj_7pyarrow_3lib_ResizableBuffer;
struct __pyx_obj_7pyarrow_3lib_NativeFile;
struct __pyx_obj_7pyarrow_3lib_BufferedInputStream;
struct __pyx_obj_7pyarrow_3lib_BufferedOutputStream;
struct __pyx_obj_7pyarrow_3lib_CompressedInputStream;
struct __pyx_obj_7pyarrow_3lib_CompressedOutputStream;
struct __pyx_obj_7pyarrow_3lib__CRecordBatchWriter;
struct __pyx_obj_7pyarrow_3lib_RecordBatchReader;
struct __pyx_obj_7pyarrow_3lib_CacheOptions;
struct __pyx_obj_7pyarrow_3lib_Codec;
struct __pyx_obj_7pyarrow_3lib_StopToken;
struct __pyx_obj_7pyarrow_3lib_SignalStopHandler;
struct __pyx_obj_7pyarrow_3lib__PandasAPIShim;
struct __pyx_obj_7pyarrow_3lib_LoggingMemoryPool;
struct __pyx_obj_7pyarrow_3lib_ProxyMemoryPool;
struct __pyx_obj_7pyarrow_3lib_UnionType;
struct __pyx_obj_7pyarrow_3lib_SparseUnionType;
struct __pyx_obj_7pyarrow_3lib_DenseUnionType;
struct __pyx_obj_7pyarrow_3lib_UnknownExtensionType;
struct __pyx_obj_7pyarrow_3lib__ExtensionRegistryNanny;
struct __pyx_obj_7pyarrow_3lib_NullScalar;
struct __pyx_obj_7pyarrow_3lib_BooleanScalar;
struct __pyx_obj_7pyarrow_3lib_UInt8Scalar;
struct __pyx_obj_7pyarrow_3lib_Int8Scalar;
struct __pyx_obj_7pyarrow_3lib_UInt16Scalar;
struct __pyx_obj_7pyarrow_3lib_Int16Scalar;
struct __pyx_obj_7pyarrow_3lib_UInt32Scalar;
struct __pyx_obj_7pyarrow_3lib_Int32Scalar;
struct __pyx_obj_7pyarrow_3lib_UInt64Scalar;
struct __pyx_obj_7pyarrow_3lib_Int64Scalar;
struct __pyx_obj_7pyarrow_3lib_HalfFloatScalar;
struct __pyx_obj_7pyarrow_3lib_FloatScalar;
struct __pyx_obj_7pyarrow_3lib_DoubleScalar;
struct __pyx_obj_7pyarrow_3lib_Decimal32Scalar;
struct __pyx_obj_7pyarrow_3lib_Decimal64Scalar;
struct __pyx_obj_7pyarrow_3lib_Decimal128Scalar;
struct __pyx_obj_7pyarrow_3lib_Decimal256Scalar;
struct __pyx_obj_7pyarrow_3lib_Date32Scalar;
struct __pyx_obj_7pyarrow_3lib_Date64Scalar;
struct __pyx_obj_7pyarrow_3lib_Time32Scalar;
struct __pyx_obj_7pyarrow_3lib_Time64Scalar;
struct __pyx_obj_7pyarrow_3lib_TimestampScalar;
struct __pyx_obj_7pyarrow_3lib_DurationScalar;
struct __pyx_obj_7pyarrow_3lib_MonthDayNanoIntervalScalar;
struct __pyx_obj_7pyarrow_3lib_BinaryScalar;
struct __pyx_obj_7pyarrow_3lib_LargeBinaryScalar;
struct __pyx_obj_7pyarrow_3lib_FixedSizeBinaryScalar;
struct __pyx_obj_7pyarrow_3lib_StringScalar;
struct __pyx_obj_7pyarrow_3lib_LargeStringScalar;
struct __pyx_obj_7pyarrow_3lib_BinaryViewScalar;
struct __pyx_obj_7pyarrow_3lib_StringViewScalar;
struct __pyx_obj_7pyarrow_3lib_ListScalar;
struct __pyx_obj_7pyarrow_3lib_FixedSizeListScalar;
struct __pyx_obj_7pyarrow_3lib_LargeListScalar;
struct __pyx_obj_7pyarrow_3lib_ListViewScalar;
struct __pyx_obj_7pyarrow_3lib_LargeListViewScalar;
struct __pyx_obj_7pyarrow_3lib_StructScalar;
struct __pyx_obj_7pyarrow_3lib_MapScalar;
struct __pyx_obj_7pyarrow_3lib_DictionaryScalar;
struct __pyx_obj_7pyarrow_3lib_RunEndEncodedScalar;
struct __pyx_obj_7pyarrow_3lib_UnionScalar;
struct __pyx_obj_7pyarrow_3lib_ExtensionScalar;
struct __pyx_obj_7pyarrow_3lib_FixedShapeTensorScalar;
struct __pyx_obj_7pyarrow_3lib_OpaqueScalar;
struct __pyx_obj_7pyarrow_3lib_Bool8Scalar;
struct __pyx_obj_7pyarrow_3lib_Date32Array;
struct __pyx_obj_7pyarrow_3lib_Date64Array;
struct __pyx_obj_7pyarrow_3lib_TimestampArray;
struct __pyx_obj_7pyarrow_3lib_Time32Array;
struct __pyx_obj_7pyarrow_3lib_Time64Array;
struct __pyx_obj_7pyarrow_3lib_DurationArray;
struct __pyx_obj_7pyarrow_3lib_Decima32Array;
struct __pyx_obj_7pyarrow_3lib_LargeStringArray;
struct __pyx_obj_7pyarrow_3lib_LargeBinaryArray;
struct __pyx_obj_7pyarrow_3lib_RunEndEncodedArray;
struct __pyx_obj_7pyarrow_3lib_FixedShapeTensorArray;
struct __pyx_obj_7pyarrow_3lib_OpaqueArray;
struct __pyx_obj_7pyarrow_3lib_Bool8Array;
struct __pyx_obj_7pyarrow_3lib_StringBuilder;
struct __pyx_obj_7pyarrow_3lib_StringViewBuilder;
struct __pyx_obj_7pyarrow_3lib_PythonFile;
struct __pyx_obj_7pyarrow_3lib_MemoryMappedFile;
struct __pyx_obj_7pyarrow_3lib_OSFile;
struct __pyx_obj_7pyarrow_3lib_FixedSizeBufferWriter;
struct __pyx_obj_7pyarrow_3lib_BufferOutputStream;
struct __pyx_obj_7pyarrow_3lib_MockOutputStream;
struct __pyx_obj_7pyarrow_3lib_BufferReader;
struct __pyx_obj_7pyarrow_3lib_TransformInputStream;
struct __pyx_obj_7pyarrow_3lib_MessageReader;
struct __pyx_obj_7pyarrow_3lib__RecordBatchStreamWriter;
struct __pyx_obj_7pyarrow_3lib__RecordBatchStreamReader;
struct __pyx_obj_7pyarrow_3lib__RecordBatchFileWriter;
struct __pyx_obj_7pyarrow_3lib__RecordBatchFileReader;
struct __pyx_defaults;
struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct____iter__;
struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_1___iter__;
struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_2_genexpr;
struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_3_keys;
struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_4_values;
struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_5_items;
struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_6___iter__;
struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_7___iter__;
struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_8_items;
struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_9_genexpr;
struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_10___iter__;
struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_11___iter__;
struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_12_genexpr;
struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_13___iter__;
struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_14_iterchunks;
struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_15_itercolumns;
struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_16_genexpr;
struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_17_genexpr;
struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_18_genexpr;
struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_19_genexpr;
struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_20_genexpr;
struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_21_download;
struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_22__download_nothreads;
struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_23_upload;
struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_24_iter_batches_with_custom_metadata;
struct __pyx_opt_args_7cpython_11contextvars_get_value;
struct __pyx_opt_args_7cpython_11contextvars_get_value_no_default;

/* "cpython/contextvars.pxd":116
 * 
 * @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API")
 * cdef inline object get_value(var, default_value=None):             # <<<<<<<<<<<<<<
 *     """Return a new reference to the value of the context variable,
 *     or the default value of the context variable,
*/
struct __pyx_opt_args_7cpython_11contextvars_get_value {
  int __pyx_n;
  PyObject *default_value;
};

/* "cpython/contextvars.pxd":134
 * 
 * @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API")
 * cdef inline object get_value_no_default(var, default_value=None):             # <<<<<<<<<<<<<<
 *     """Return a new reference to the value of the context variable,
 *     or the provided default value if no such value was found.
*/
struct __pyx_opt_args_7cpython_11contextvars_get_value_no_default {
  int __pyx_n;
  PyObject *default_value;
};
struct __pyx_opt_args_7cpython_8datetime_time_new;
struct __pyx_opt_args_7cpython_8datetime_datetime_new;
struct __pyx_opt_args_7cpython_8datetime_timezone_new;
struct __pyx_opt_args_7cpython_8datetime_datetime_from_timestamp;

/* "cpython/datetime.pxd":265
 * # Create time object using DateTime CAPI factory function
 * # Note, there are no range checks for any of the arguments.
 * cdef inline time time_new(int hour, int minute, int second, int microsecond, object tz, int fold=0):             # <<<<<<<<<<<<<<
 *     return __Pyx_DateTime_TimeWithFold(hour, minute, second, microsecond, tz, fold)
 * 
*/
struct __pyx_opt_args_7cpython_8datetime_time_new {
  int __pyx_n;
  int fold;
};

/* "cpython/datetime.pxd":270
 * # Create datetime object using DateTime CAPI factory function.
 * # Note, there are no range checks for any of the arguments.
 * cdef inline datetime datetime_new(int year, int month, int day, int hour, int minute, int second, int microsecond, object tz, int fold=0):             # <<<<<<<<<<<<<<
 *     return __Pyx_DateTime_DateTimeWithFold(year, month, day, hour, minute, second, microsecond, tz, fold)
 * 
*/
struct __pyx_opt_args_7cpython_8datetime_datetime_new {
  int __pyx_n;
  int fold;
};

/* "cpython/datetime.pxd":279
 * 
 * # Create timedelta object using DateTime CAPI factory function.
 * cdef inline object timezone_new(object offset, object name=None):             # <<<<<<<<<<<<<<
 *     return __Pyx_TimeZone_FromOffsetAndName(offset, <PyObject*>name if name is not None else NULL)
 * 
*/
struct __pyx_opt_args_7cpython_8datetime_timezone_new {
  int __pyx_n;
  PyObject *name;
};

/* "cpython/datetime.pxd":283
 * 
 * # Create datetime object using DB API constructor.
 * cdef inline datetime datetime_from_timestamp(timestamp, tz=None):             # <<<<<<<<<<<<<<
 *     return PyDateTimeAPI.DateTime_FromTimestamp(
 *         <PyObject*>PyDateTimeAPI.DateTimeType, (timestamp, tz) if tz is not None else (timestamp,), NULL)
*/
struct __pyx_opt_args_7cpython_8datetime_datetime_from_timestamp {
  int __pyx_n;
  PyObject *tz;
};

/* "pyarrow/includes/libarrow.pxd":1560
 * 
 * # Use typedef to emulate syntax for std::function<void(..)>
 * ctypedef void CallbackTransform(object, const shared_ptr[CBuffer]& src,             # <<<<<<<<<<<<<<
 *                                 shared_ptr[CBuffer]* dest)
 * 
*/
typedef void __pyx_t_7pyarrow_8includes_8libarrow_CallbackTransform(PyObject *, std::shared_ptr< arrow::Buffer>  const &, std::shared_ptr< arrow::Buffer>  *);

/* "pyarrow/includes/libarrow.pxd":1563
 *                                 shared_ptr[CBuffer]* dest)
 * 
 * ctypedef CResult[shared_ptr[CInputStream]] StreamWrapFunc(             # <<<<<<<<<<<<<<
 *     shared_ptr[CInputStream])
 * 
*/
typedef arrow::Result<std::shared_ptr< arrow::io::InputStream> >  __pyx_t_7pyarrow_8includes_8libarrow_StreamWrapFunc(std::shared_ptr< arrow::io::InputStream> );

/* "pyarrow/includes/libarrow.pxd":3239
 *     int64_t TotalBufferSize(const CTable& table)
 * 
 * ctypedef PyObject* CallbackUdf(object user_function, const CUdfContext& context, object inputs)             # <<<<<<<<<<<<<<
 * 
 * 
*/
typedef PyObject *__pyx_t_7pyarrow_8includes_8libarrow_CallbackUdf(PyObject *,  arrow::py::UdfContext const &, PyObject *);

/* "pyarrow/includes/libarrow_python.pxd":24
 * 
 * 
 * ctypedef CInvalidRowResult PyInvalidRowCallback(object,             # <<<<<<<<<<<<<<
 *                                                 const CCSVInvalidRow&)
 * 
*/
typedef  arrow::csv::InvalidRowResult __pyx_t_7pyarrow_8includes_15libarrow_python_PyInvalidRowCallback(PyObject *,  arrow::csv::InvalidRow const &);
struct __pyx_opt_args_7pyarrow_3lib_ensure_type;
struct __pyx_opt_args_7pyarrow_3lib_14_PandasAPIShim__check_import;
struct __pyx_opt_args_7pyarrow_3lib__as_c_pointer;
struct __pyx_opt_args_7pyarrow_3lib_ensure_metadata;
struct __pyx_opt_args_7pyarrow_3lib_decimal32;
struct __pyx_opt_args_7pyarrow_3lib_decimal64;
struct __pyx_opt_args_7pyarrow_3lib_decimal128;
struct __pyx_opt_args_7pyarrow_3lib_decimal256;
struct __pyx_opt_args_7pyarrow_3lib_map_;
struct __pyx_opt_args_7pyarrow_3lib_dictionary;
struct __pyx_opt_args_7pyarrow_3lib_6OSFile__open_writable;

/* "pyarrow/lib.pxd":676
 * 
 * # Default is allow_none=False
 * cpdef DataType ensure_type(object type, bint allow_none=*)             # <<<<<<<<<<<<<<
 * 
 * cdef DataType primitive_type(Type type)
*/
struct __pyx_opt_args_7pyarrow_3lib_ensure_type {
  int __pyx_n;
  int allow_none;
};

/* "pyarrow/device.pxi":23
 * 
 * 
 * cpdef enum DeviceAllocationType:             # <<<<<<<<<<<<<<
 *     CPU = <char> CDeviceAllocationType_kCPU
 *     CUDA = <char> CDeviceAllocationType_kCUDA
*/
enum __pyx_t_7pyarrow_3lib_DeviceAllocationType {

  /* "pyarrow/device.pxi":37
 *     ONEAPI = <char> CDeviceAllocationType_kONEAPI
 *     WEBGPU = <char> CDeviceAllocationType_kWEBGPU
 *     HEXAGON = <char> CDeviceAllocationType_kHEXAGON             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_e_7pyarrow_3lib_CPU = ((char)arrow::DeviceAllocationType::kCPU),
  __pyx_e_7pyarrow_3lib_CUDA = ((char)arrow::DeviceAllocationType::kCUDA),
  __pyx_e_7pyarrow_3lib_CUDA_HOST = ((char)arrow::DeviceAllocationType::kCUDA_HOST),
  __pyx_e_7pyarrow_3lib_OPENCL = ((char)arrow::DeviceAllocationType::kOPENCL),
  __pyx_e_7pyarrow_3lib_VULKAN = ((char)arrow::DeviceAllocationType::kVULKAN),
  __pyx_e_7pyarrow_3lib_METAL = ((char)arrow::DeviceAllocationType::kMETAL),
  __pyx_e_7pyarrow_3lib_VPI = ((char)arrow::DeviceAllocationType::kVPI),
  __pyx_e_7pyarrow_3lib_ROCM = ((char)arrow::DeviceAllocationType::kROCM),
  __pyx_e_7pyarrow_3lib_ROCM_HOST = ((char)arrow::DeviceAllocationType::kROCM_HOST),
  __pyx_e_7pyarrow_3lib_EXT_DEV = ((char)arrow::DeviceAllocationType::kEXT_DEV),
  __pyx_e_7pyarrow_3lib_CUDA_MANAGED = ((char)arrow::DeviceAllocationType::kCUDA_MANAGED),
  __pyx_e_7pyarrow_3lib_ONEAPI = ((char)arrow::DeviceAllocationType::kONEAPI),
  __pyx_e_7pyarrow_3lib_WEBGPU = ((char)arrow::DeviceAllocationType::kWEBGPU),
  __pyx_e_7pyarrow_3lib_HEXAGON = ((char)arrow::DeviceAllocationType::kHEXAGON)
};

/* "pyarrow/ipc.pxi":24
 * from cython import sizeof
 * 
 * cpdef enum MetadataVersion:             # <<<<<<<<<<<<<<
 *     V1 = <char> CMetadataVersion_V1
 *     V2 = <char> CMetadataVersion_V2
*/
enum __pyx_t_7pyarrow_3lib_MetadataVersion {

  /* "pyarrow/ipc.pxi":29
 *     V3 = <char> CMetadataVersion_V3
 *     V4 = <char> CMetadataVersion_V4
 *     V5 = <char> CMetadataVersion_V5             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_e_7pyarrow_3lib_V1 = ((char) arrow::ipc::MetadataVersion::V1),
  __pyx_e_7pyarrow_3lib_V2 = ((char) arrow::ipc::MetadataVersion::V2),
  __pyx_e_7pyarrow_3lib_V3 = ((char) arrow::ipc::MetadataVersion::V3),
  __pyx_e_7pyarrow_3lib_V4 = ((char) arrow::ipc::MetadataVersion::V4),
  __pyx_e_7pyarrow_3lib_V5 = ((char) arrow::ipc::MetadataVersion::V5)
};

/* "pyarrow/ipc.pxi":51
 * 
 * 
 * cpdef enum Alignment:             # <<<<<<<<<<<<<<
 *     Any = <int64_t> CAlignment_Any
 *     DataTypeSpecific = <int64_t> CAlignment_DataTypeSpecific
*/
enum __pyx_t_7pyarrow_3lib_Alignment {

  /* "pyarrow/ipc.pxi":54
 *     Any = <int64_t> CAlignment_Any
 *     DataTypeSpecific = <int64_t> CAlignment_DataTypeSpecific
 *     At64Byte = <int64_t> CAlignment_64Byte             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_e_7pyarrow_3lib_Any = ((int64_t) arrow::ipc::Alignment::kAnyAlignment),
  __pyx_e_7pyarrow_3lib_DataTypeSpecific = ((int64_t) arrow::ipc::Alignment::kDataTypeSpecificAlignment),
  __pyx_e_7pyarrow_3lib_At64Byte = ((int64_t) arrow::ipc::Alignment::k64ByteAlignment)
};

/* "pyarrow/pandas-shim.pxi":105
 *         self.has_sparse = False
 * 
 *     cdef inline _check_import(self, bint raise_=True):             # <<<<<<<<<<<<<<
 *         if not self._tried_importing_pandas:
 *             with self._lock:
*/
struct __pyx_opt_args_7pyarrow_3lib_14_PandasAPIShim__check_import {
  int __pyx_n;
  int raise_;
};

/* "pyarrow/types.pxi":120
 * 
 * 
 * cdef void* _as_c_pointer(v, allow_null=False) except *:             # <<<<<<<<<<<<<<
 *     """
 *     Convert a Python object to a raw C pointer.
*/
struct __pyx_opt_args_7pyarrow_3lib__as_c_pointer {
  int __pyx_n;
  PyObject *allow_null;
};

/* "pyarrow/types.pxi":206
 * # Workaround for Cython parsing bug
 * # https://github.com/cython/cython/issues/2143
 * ctypedef CFixedWidthType* _CFixedWidthTypePtr             # <<<<<<<<<<<<<<
 * 
 * 
*/
typedef  arrow::FixedWidthType *__pyx_t_7pyarrow_3lib__CFixedWidthTypePtr;

/* "pyarrow/types.pxi":2446
 * 
 * 
 * cpdef KeyValueMetadata ensure_metadata(object meta, c_bool allow_none=False):             # <<<<<<<<<<<<<<
 *     if allow_none and meta is None:
 *         return None
*/
struct __pyx_opt_args_7pyarrow_3lib_ensure_metadata {
  int __pyx_n;
  bool allow_none;
};

/* "pyarrow/types.pxi":4538
 * 
 * 
 * cpdef DataType decimal32(int precision, int scale=0):             # <<<<<<<<<<<<<<
 *     """
 *     Create decimal type with precision and scale and 32-bit width.
*/
struct __pyx_opt_args_7pyarrow_3lib_decimal32 {
  int __pyx_n;
  int scale;
};

/* "pyarrow/types.pxi":4593
 * 
 * 
 * cpdef DataType decimal64(int precision, int scale=0):             # <<<<<<<<<<<<<<
 *     """
 *     Create decimal type with precision and scale and 64-bit width.
*/
struct __pyx_opt_args_7pyarrow_3lib_decimal64 {
  int __pyx_n;
  int scale;
};

/* "pyarrow/types.pxi":4648
 * 
 * 
 * cpdef DataType decimal128(int precision, int scale=0):             # <<<<<<<<<<<<<<
 *     """
 *     Create decimal type with precision and scale and 128-bit width.
*/
struct __pyx_opt_args_7pyarrow_3lib_decimal128 {
  int __pyx_n;
  int scale;
};

/* "pyarrow/types.pxi":4703
 * 
 * 
 * cpdef DataType decimal256(int precision, int scale=0):             # <<<<<<<<<<<<<<
 *     """
 *     Create decimal type with precision and scale and 256-bit width.
*/
struct __pyx_opt_args_7pyarrow_3lib_decimal256 {
  int __pyx_n;
  int scale;
};

/* "pyarrow/types.pxi":5150
 * 
 * 
 * cpdef MapType map_(key_type, item_type, keys_sorted=False):             # <<<<<<<<<<<<<<
 *     """
 *     Create MapType instance from key and item data types or fields.
*/
struct __pyx_opt_args_7pyarrow_3lib_map_ {
  int __pyx_n;
  PyObject *keys_sorted;
};

/* "pyarrow/types.pxi":5225
 * 
 * 
 * cpdef DictionaryType dictionary(index_type, value_type, bint ordered=False):             # <<<<<<<<<<<<<<
 *     """
 *     Dictionary (categorical, or simply encoded) type.
*/
struct __pyx_opt_args_7pyarrow_3lib_dictionary {
  int __pyx_n;
  int ordered;
};

/* "pyarrow/tensor.pxi":343
 * 
 * 
 * ctypedef CSparseCOOIndex* _CSparseCOOIndexPtr             # <<<<<<<<<<<<<<
 * 
 * 
*/
typedef  arrow::SparseCOOIndex *__pyx_t_7pyarrow_3lib__CSparseCOOIndexPtr;

/* "pyarrow/io.pxi":1257
 *         self.set_random_access_file(<shared_ptr[CRandomAccessFile]> handle)
 * 
 *     cdef _open_writable(self, c_string path, c_bool append=False):             # <<<<<<<<<<<<<<
 *         with nogil:
 *             self.output_stream = GetResultValue(
*/
struct __pyx_opt_args_7pyarrow_3lib_6OSFile__open_writable {
  int __pyx_n;
  bool append;
};

/* "pyarrow/io.pxi":1840
 * 
 * 
 * ctypedef CBufferedInputStream* _CBufferedInputStreamPtr             # <<<<<<<<<<<<<<
 * ctypedef CBufferedOutputStream* _CBufferedOutputStreamPtr
 * ctypedef CRandomAccessFile* _RandomAccessFilePtr
*/
typedef  arrow::io::BufferedInputStream *__pyx_t_7pyarrow_3lib__CBufferedInputStreamPtr;

/* "pyarrow/io.pxi":1841
 * 
 * ctypedef CBufferedInputStream* _CBufferedInputStreamPtr
 * ctypedef CBufferedOutputStream* _CBufferedOutputStreamPtr             # <<<<<<<<<<<<<<
 * ctypedef CRandomAccessFile* _RandomAccessFilePtr
 * 
*/
typedef  arrow::io::BufferedOutputStream *__pyx_t_7pyarrow_3lib__CBufferedOutputStreamPtr;

/* "pyarrow/io.pxi":1842
 * ctypedef CBufferedInputStream* _CBufferedInputStreamPtr
 * ctypedef CBufferedOutputStream* _CBufferedOutputStreamPtr
 * ctypedef CRandomAccessFile* _RandomAccessFilePtr             # <<<<<<<<<<<<<<
 * 
 * 
*/
typedef  arrow::io::RandomAccessFile *__pyx_t_7pyarrow_3lib__RandomAccessFilePtr;

/* "pyarrow/public-api.pxi":71
 * # Workaround for Cython parsing bug
 * # https://github.com/cython/cython/issues/2143
 * ctypedef const CPyExtensionType* _CPyExtensionTypePtr             # <<<<<<<<<<<<<<
 * 
 * 
*/
typedef  arrow::py::PyExtensionType const *__pyx_t_7pyarrow_3lib__CPyExtensionTypePtr;

/* "pyarrow/lib.pxd":37
 * 
 * 
 * cdef class _Weakrefable:             # <<<<<<<<<<<<<<
 *     cdef object __weakref__
 * 
*/
struct __pyx_obj_7pyarrow_3lib__Weakrefable {
  PyObject_HEAD
  PyObject *__weakref__;
};


/* "pyarrow/lib.pxd":41
 * 
 * 
 * cdef class IpcWriteOptions(_Weakrefable):             # <<<<<<<<<<<<<<
 *     cdef:
 *         CIpcWriteOptions c_options
*/
struct __pyx_obj_7pyarrow_3lib_IpcWriteOptions {
  struct __pyx_obj_7pyarrow_3lib__Weakrefable __pyx_base;
   arrow::ipc::IpcWriteOptions c_options;
};


/* "pyarrow/lib.pxd":49
 * 
 * 
 * cdef class IpcReadOptions(_Weakrefable):             # <<<<<<<<<<<<<<
 *     cdef:
 *         CIpcReadOptions c_options
*/
struct __pyx_obj_7pyarrow_3lib_IpcReadOptions {
  struct __pyx_obj_7pyarrow_3lib__Weakrefable __pyx_base;
   arrow::ipc::IpcReadOptions c_options;
};


/* "pyarrow/lib.pxd":60
 * 
 * 
 * cdef class Message(_Weakrefable):             # <<<<<<<<<<<<<<
 *     cdef:
 *         unique_ptr[CMessage] message
*/
struct __pyx_obj_7pyarrow_3lib_Message {
  struct __pyx_obj_7pyarrow_3lib__Weakrefable __pyx_base;
  std::unique_ptr< arrow::ipc::Message>  message;
};


/* "pyarrow/lib.pxd":65
 * 
 * 
 * cdef class MemoryPool(_Weakrefable):             # <<<<<<<<<<<<<<
 *     cdef:
 *         CMemoryPool* pool
*/
struct __pyx_obj_7pyarrow_3lib_MemoryPool {
  struct __pyx_obj_7pyarrow_3lib__Weakrefable __pyx_base;
  struct __pyx_vtabstruct_7pyarrow_3lib_MemoryPool *__pyx_vtab;
   arrow::MemoryPool *pool;
};


/* "pyarrow/lib.pxd":78
 * 
 * 
 * cdef class DataType(_Weakrefable):             # <<<<<<<<<<<<<<
 *     cdef:
 *         shared_ptr[CDataType] sp_type
*/
struct __pyx_obj_7pyarrow_3lib_DataType {
  struct __pyx_obj_7pyarrow_3lib__Weakrefable __pyx_base;
  struct __pyx_vtabstruct_7pyarrow_3lib_DataType *__pyx_vtab;
  std::shared_ptr< arrow::DataType>  sp_type;
   arrow::DataType *type;
  PyObject *pep3118_format;
};


/* "pyarrow/lib.pxd":88
 * 
 * 
 * cdef class ListType(DataType):             # <<<<<<<<<<<<<<
 *     cdef:
 *         const CListType* list_type
*/
struct __pyx_obj_7pyarrow_3lib_ListType {
  struct __pyx_obj_7pyarrow_3lib_DataType __pyx_base;
   arrow::ListType const *list_type;
};


/* "pyarrow/lib.pxd":93
 * 
 * 
 * cdef class LargeListType(DataType):             # <<<<<<<<<<<<<<
 *     cdef:
 *         const CLargeListType* list_type
*/
struct __pyx_obj_7pyarrow_3lib_LargeListType {
  struct __pyx_obj_7pyarrow_3lib_DataType __pyx_base;
   arrow::LargeListType const *list_type;
};


/* "pyarrow/lib.pxd":98
 * 
 * 
 * cdef class ListViewType(DataType):             # <<<<<<<<<<<<<<
 *     cdef:
 *         const CListViewType* list_view_type
*/
struct __pyx_obj_7pyarrow_3lib_ListViewType {
  struct __pyx_obj_7pyarrow_3lib_DataType __pyx_base;
   arrow::ListViewType const *list_view_type;
};


/* "pyarrow/lib.pxd":103
 * 
 * 
 * cdef class LargeListViewType(DataType):             # <<<<<<<<<<<<<<
 *     cdef:
 *         const CLargeListViewType* list_view_type
*/
struct __pyx_obj_7pyarrow_3lib_LargeListViewType {
  struct __pyx_obj_7pyarrow_3lib_DataType __pyx_base;
   arrow::LargeListViewType const *list_view_type;
};


/* "pyarrow/lib.pxd":108
 * 
 * 
 * cdef class MapType(DataType):             # <<<<<<<<<<<<<<
 *     cdef:
 *         const CMapType* map_type
*/
struct __pyx_obj_7pyarrow_3lib_MapType {
  struct __pyx_obj_7pyarrow_3lib_DataType __pyx_base;
   arrow::MapType const *map_type;
};


/* "pyarrow/lib.pxd":113
 * 
 * 
 * cdef class FixedSizeListType(DataType):             # <<<<<<<<<<<<<<
 *     cdef:
 *         const CFixedSizeListType* list_type
*/
struct __pyx_obj_7pyarrow_3lib_FixedSizeListType {
  struct __pyx_obj_7pyarrow_3lib_DataType __pyx_base;
   arrow::FixedSizeListType const *list_type;
};


/* "pyarrow/lib.pxd":118
 * 
 * 
 * cdef class StructType(DataType):             # <<<<<<<<<<<<<<
 *     cdef:
 *         const CStructType* struct_type
*/
struct __pyx_obj_7pyarrow_3lib_StructType {
  struct __pyx_obj_7pyarrow_3lib_DataType __pyx_base;
   arrow::StructType const *struct_type;
};


/* "pyarrow/lib.pxd":125
 * 
 * 
 * cdef class DictionaryMemo(_Weakrefable):             # <<<<<<<<<<<<<<
 *     cdef:
 *         # Even though the CDictionaryMemo instance is private, we allocate
*/
struct __pyx_obj_7pyarrow_3lib_DictionaryMemo {
  struct __pyx_obj_7pyarrow_3lib__Weakrefable __pyx_base;
  std::shared_ptr< arrow::ipc::DictionaryMemo>  sp_memo;
   arrow::ipc::DictionaryMemo *memo;
};


/* "pyarrow/lib.pxd":133
 * 
 * 
 * cdef class DictionaryType(DataType):             # <<<<<<<<<<<<<<
 *     cdef:
 *         const CDictionaryType* dict_type
*/
struct __pyx_obj_7pyarrow_3lib_DictionaryType {
  struct __pyx_obj_7pyarrow_3lib_DataType __pyx_base;
   arrow::DictionaryType const *dict_type;
};


/* "pyarrow/lib.pxd":138
 * 
 * 
 * cdef class TimestampType(DataType):             # <<<<<<<<<<<<<<
 *     cdef:
 *         const CTimestampType* ts_type
*/
struct __pyx_obj_7pyarrow_3lib_TimestampType {
  struct __pyx_obj_7pyarrow_3lib_DataType __pyx_base;
   arrow::TimestampType const *ts_type;
};


/* "pyarrow/lib.pxd":143
 * 
 * 
 * cdef class Time32Type(DataType):             # <<<<<<<<<<<<<<
 *     cdef:
 *         const CTime32Type* time_type
*/
struct __pyx_obj_7pyarrow_3lib_Time32Type {
  struct __pyx_obj_7pyarrow_3lib_DataType __pyx_base;
   arrow::Time32Type const *time_type;
};


/* "pyarrow/lib.pxd":148
 * 
 * 
 * cdef class Time64Type(DataType):             # <<<<<<<<<<<<<<
 *     cdef:
 *         const CTime64Type* time_type
*/
struct __pyx_obj_7pyarrow_3lib_Time64Type {
  struct __pyx_obj_7pyarrow_3lib_DataType __pyx_base;
   arrow::Time64Type const *time_type;
};


/* "pyarrow/lib.pxd":153
 * 
 * 
 * cdef class DurationType(DataType):             # <<<<<<<<<<<<<<
 *     cdef:
 *         const CDurationType* duration_type
*/
struct __pyx_obj_7pyarrow_3lib_DurationType {
  struct __pyx_obj_7pyarrow_3lib_DataType __pyx_base;
   arrow::DurationType const *duration_type;
};


/* "pyarrow/lib.pxd":158
 * 
 * 
 * cdef class FixedSizeBinaryType(DataType):             # <<<<<<<<<<<<<<
 *     cdef:
 *         const CFixedSizeBinaryType* fixed_size_binary_type
*/
struct __pyx_obj_7pyarrow_3lib_FixedSizeBinaryType {
  struct __pyx_obj_7pyarrow_3lib_DataType __pyx_base;
   arrow::FixedSizeBinaryType const *fixed_size_binary_type;
};


/* "pyarrow/lib.pxd":163
 * 
 * 
 * cdef class Decimal32Type(FixedSizeBinaryType):             # <<<<<<<<<<<<<<
 *     cdef:
 *         const CDecimal32Type* decimal32_type
*/
struct __pyx_obj_7pyarrow_3lib_Decimal32Type {
  struct __pyx_obj_7pyarrow_3lib_FixedSizeBinaryType __pyx_base;
   arrow::Decimal32Type const *decimal32_type;
};


/* "pyarrow/lib.pxd":168
 * 
 * 
 * cdef class Decimal64Type(FixedSizeBinaryType):             # <<<<<<<<<<<<<<
 *     cdef:
 *         const CDecimal64Type* decimal64_type
*/
struct __pyx_obj_7pyarrow_3lib_Decimal64Type {
  struct __pyx_obj_7pyarrow_3lib_FixedSizeBinaryType __pyx_base;
   arrow::Decimal64Type const *decimal64_type;
};


/* "pyarrow/lib.pxd":173
 * 
 * 
 * cdef class Decimal128Type(FixedSizeBinaryType):             # <<<<<<<<<<<<<<
 *     cdef:
 *         const CDecimal128Type* decimal128_type
*/
struct __pyx_obj_7pyarrow_3lib_Decimal128Type {
  struct __pyx_obj_7pyarrow_3lib_FixedSizeBinaryType __pyx_base;
   arrow::Decimal128Type const *decimal128_type;
};


/* "pyarrow/lib.pxd":178
 * 
 * 
 * cdef class Decimal256Type(FixedSizeBinaryType):             # <<<<<<<<<<<<<<
 *     cdef:
 *         const CDecimal256Type* decimal256_type
*/
struct __pyx_obj_7pyarrow_3lib_Decimal256Type {
  struct __pyx_obj_7pyarrow_3lib_FixedSizeBinaryType __pyx_base;
   arrow::Decimal256Type const *decimal256_type;
};


/* "pyarrow/lib.pxd":183
 * 
 * 
 * cdef class RunEndEncodedType(DataType):             # <<<<<<<<<<<<<<
 *     cdef:
 *         const CRunEndEncodedType* run_end_encoded_type
*/
struct __pyx_obj_7pyarrow_3lib_RunEndEncodedType {
  struct __pyx_obj_7pyarrow_3lib_DataType __pyx_base;
   arrow::RunEndEncodedType const *run_end_encoded_type;
};


/* "pyarrow/lib.pxd":188
 * 
 * 
 * cdef class BaseExtensionType(DataType):             # <<<<<<<<<<<<<<
 *     cdef:
 *         const CExtensionType* ext_type
*/
struct __pyx_obj_7pyarrow_3lib_BaseExtensionType {
  struct __pyx_obj_7pyarrow_3lib_DataType __pyx_base;
   arrow::ExtensionType const *ext_type;
};


/* "pyarrow/lib.pxd":193
 * 
 * 
 * cdef class ExtensionType(BaseExtensionType):             # <<<<<<<<<<<<<<
 *     cdef:
 *         const CPyExtensionType* cpy_ext_type
*/
struct __pyx_obj_7pyarrow_3lib_ExtensionType {
  struct __pyx_obj_7pyarrow_3lib_BaseExtensionType __pyx_base;
   arrow::py::PyExtensionType const *cpy_ext_type;
};


/* "pyarrow/lib.pxd":198
 * 
 * 
 * cdef class FixedShapeTensorType(BaseExtensionType):             # <<<<<<<<<<<<<<
 *     cdef:
 *         const CFixedShapeTensorType* tensor_ext_type
*/
struct __pyx_obj_7pyarrow_3lib_FixedShapeTensorType {
  struct __pyx_obj_7pyarrow_3lib_BaseExtensionType __pyx_base;
   arrow::extension::FixedShapeTensorType const *tensor_ext_type;
};


/* "pyarrow/lib.pxd":202
 *         const CFixedShapeTensorType* tensor_ext_type
 * 
 * cdef class Bool8Type(BaseExtensionType):             # <<<<<<<<<<<<<<
 *     cdef:
 *         const CBool8Type* bool8_ext_type
*/
struct __pyx_obj_7pyarrow_3lib_Bool8Type {
  struct __pyx_obj_7pyarrow_3lib_BaseExtensionType __pyx_base;
   arrow::extension::Bool8Type const *bool8_ext_type;
};


/* "pyarrow/lib.pxd":206
 *         const CBool8Type* bool8_ext_type
 * 
 * cdef class OpaqueType(BaseExtensionType):             # <<<<<<<<<<<<<<
 *     cdef:
 *         const COpaqueType* opaque_ext_type
*/
struct __pyx_obj_7pyarrow_3lib_OpaqueType {
  struct __pyx_obj_7pyarrow_3lib_BaseExtensionType __pyx_base;
   arrow::extension::OpaqueType const *opaque_ext_type;
};


/* "pyarrow/lib.pxd":210
 *         const COpaqueType* opaque_ext_type
 * 
 * cdef class UuidType(BaseExtensionType):             # <<<<<<<<<<<<<<
 *     cdef:
 *         const CUuidType* uuid_ext_type
*/
struct __pyx_obj_7pyarrow_3lib_UuidType {
  struct __pyx_obj_7pyarrow_3lib_BaseExtensionType __pyx_base;
   arrow::extension::UuidType const *uuid_ext_type;
};


/* "pyarrow/lib.pxd":214
 *         const CUuidType* uuid_ext_type
 * 
 * cdef class JsonType(BaseExtensionType):             # <<<<<<<<<<<<<<
 *     cdef:
 *         const CJsonType* json_ext_type
*/
struct __pyx_obj_7pyarrow_3lib_JsonType {
  struct __pyx_obj_7pyarrow_3lib_BaseExtensionType __pyx_base;
   arrow::extension::JsonExtensionType const *json_ext_type;
};


/* "pyarrow/lib.pxd":219
 * 
 * 
 * cdef class _Metadata(_Weakrefable):             # <<<<<<<<<<<<<<
 *     # required because KeyValueMetadata also extends collections.abc.Mapping
 *     # and the first parent class must be an extension type
*/
struct __pyx_obj_7pyarrow_3lib__Metadata {
  struct __pyx_obj_7pyarrow_3lib__Weakrefable __pyx_base;
};


/* "pyarrow/lib.pxd":225
 * 
 * 
 * cdef class KeyValueMetadata(_Metadata):             # <<<<<<<<<<<<<<
 *     cdef:
 *         shared_ptr[const CKeyValueMetadata] wrapped
*/
struct __pyx_obj_7pyarrow_3lib_KeyValueMetadata {
  struct __pyx_obj_7pyarrow_3lib__Metadata __pyx_base;
  struct __pyx_vtabstruct_7pyarrow_3lib_KeyValueMetadata *__pyx_vtab;
  std::shared_ptr< arrow::KeyValueMetadata const >  wrapped;
   arrow::KeyValueMetadata const *metadata;
};


/* "pyarrow/lib.pxd":237
 * 
 * 
 * cdef class Field(_Weakrefable):             # <<<<<<<<<<<<<<
 *     cdef:
 *         shared_ptr[CField] sp_field
*/
struct __pyx_obj_7pyarrow_3lib_Field {
  struct __pyx_obj_7pyarrow_3lib__Weakrefable __pyx_base;
  struct __pyx_vtabstruct_7pyarrow_3lib_Field *__pyx_vtab;
  std::shared_ptr< arrow::Field>  sp_field;
   arrow::Field *field;
  struct __pyx_obj_7pyarrow_3lib_DataType *type;
};


/* "pyarrow/lib.pxd":248
 * 
 * 
 * cdef class Schema(_Weakrefable):             # <<<<<<<<<<<<<<
 *     cdef:
 *         shared_ptr[CSchema] sp_schema
*/
struct __pyx_obj_7pyarrow_3lib_Schema {
  struct __pyx_obj_7pyarrow_3lib__Weakrefable __pyx_base;
  struct __pyx_vtabstruct_7pyarrow_3lib_Schema *__pyx_vtab;
  std::shared_ptr< arrow::Schema>  sp_schema;
   arrow::Schema *schema;
};


/* "pyarrow/lib.pxd":257
 * 
 * 
 * cdef class Scalar(_Weakrefable):             # <<<<<<<<<<<<<<
 *     cdef:
 *         shared_ptr[CScalar] wrapped
*/
struct __pyx_obj_7pyarrow_3lib_Scalar {
  struct __pyx_obj_7pyarrow_3lib__Weakrefable __pyx_base;
  struct __pyx_vtabstruct_7pyarrow_3lib_Scalar *__pyx_vtab;
  std::shared_ptr< arrow::Scalar>  wrapped;
};


/* "pyarrow/lib.pxd":269
 * 
 * 
 * cdef class ArrayStatistics(_Weakrefable):             # <<<<<<<<<<<<<<
 *     cdef:
 *         shared_ptr[CArrayStatistics] sp_statistics
*/
struct __pyx_obj_7pyarrow_3lib_ArrayStatistics {
  struct __pyx_obj_7pyarrow_3lib__Weakrefable __pyx_base;
  struct __pyx_vtabstruct_7pyarrow_3lib_ArrayStatistics *__pyx_vtab;
  std::shared_ptr< arrow::ArrayStatistics>  sp_statistics;
};


/* "pyarrow/lib.pxd":277
 * 
 * 
 * cdef class _PandasConvertible(_Weakrefable):             # <<<<<<<<<<<<<<
 *     pass
 * 
*/
struct __pyx_obj_7pyarrow_3lib__PandasConvertible {
  struct __pyx_obj_7pyarrow_3lib__Weakrefable __pyx_base;
};


/* "pyarrow/lib.pxd":281
 * 
 * 
 * cdef class Array(_PandasConvertible):             # <<<<<<<<<<<<<<
 *     cdef:
 *         shared_ptr[CArray] sp_array
*/
struct __pyx_obj_7pyarrow_3lib_Array {
  struct __pyx_obj_7pyarrow_3lib__PandasConvertible __pyx_base;
  struct __pyx_vtabstruct_7pyarrow_3lib_Array *__pyx_vtab;
  std::shared_ptr< arrow::Array>  sp_array;
   arrow::Array *ap;
  struct __pyx_obj_7pyarrow_3lib_DataType *type;
  PyObject *_name;
};


/* "pyarrow/lib.pxd":297
 * 
 * 
 * cdef class Tensor(_Weakrefable):             # <<<<<<<<<<<<<<
 *     cdef:
 *         shared_ptr[CTensor] sp_tensor
*/
struct __pyx_obj_7pyarrow_3lib_Tensor {
  struct __pyx_obj_7pyarrow_3lib__Weakrefable __pyx_base;
  struct __pyx_vtabstruct_7pyarrow_3lib_Tensor *__pyx_vtab;
  std::shared_ptr< arrow::Tensor>  sp_tensor;
   arrow::Tensor *tp;
  struct __pyx_obj_7pyarrow_3lib_DataType *type;
  PyObject *_ssize_t_shape;
  PyObject *_ssize_t_strides;
};


/* "pyarrow/lib.pxd":310
 * 
 * 
 * cdef class SparseCSRMatrix(_Weakrefable):             # <<<<<<<<<<<<<<
 *     cdef:
 *         shared_ptr[CSparseCSRMatrix] sp_sparse_tensor
*/
struct __pyx_obj_7pyarrow_3lib_SparseCSRMatrix {
  struct __pyx_obj_7pyarrow_3lib__Weakrefable __pyx_base;
  struct __pyx_vtabstruct_7pyarrow_3lib_SparseCSRMatrix *__pyx_vtab;
  std::shared_ptr< arrow::SparseCSRMatrix>  sp_sparse_tensor;
   arrow::SparseCSRMatrix *stp;
  struct __pyx_obj_7pyarrow_3lib_DataType *type;
};


/* "pyarrow/lib.pxd":321
 * 
 * 
 * cdef class SparseCSCMatrix(_Weakrefable):             # <<<<<<<<<<<<<<
 *     cdef:
 *         shared_ptr[CSparseCSCMatrix] sp_sparse_tensor
*/
struct __pyx_obj_7pyarrow_3lib_SparseCSCMatrix {
  struct __pyx_obj_7pyarrow_3lib__Weakrefable __pyx_base;
  struct __pyx_vtabstruct_7pyarrow_3lib_SparseCSCMatrix *__pyx_vtab;
  std::shared_ptr< arrow::SparseCSCMatrix>  sp_sparse_tensor;
   arrow::SparseCSCMatrix *stp;
  struct __pyx_obj_7pyarrow_3lib_DataType *type;
};


/* "pyarrow/lib.pxd":332
 * 
 * 
 * cdef class SparseCOOTensor(_Weakrefable):             # <<<<<<<<<<<<<<
 *     cdef:
 *         shared_ptr[CSparseCOOTensor] sp_sparse_tensor
*/
struct __pyx_obj_7pyarrow_3lib_SparseCOOTensor {
  struct __pyx_obj_7pyarrow_3lib__Weakrefable __pyx_base;
  struct __pyx_vtabstruct_7pyarrow_3lib_SparseCOOTensor *__pyx_vtab;
  std::shared_ptr< arrow::SparseCOOTensor>  sp_sparse_tensor;
   arrow::SparseCOOTensor *stp;
  struct __pyx_obj_7pyarrow_3lib_DataType *type;
};


/* "pyarrow/lib.pxd":343
 * 
 * 
 * cdef class SparseCSFTensor(_Weakrefable):             # <<<<<<<<<<<<<<
 *     cdef:
 *         shared_ptr[CSparseCSFTensor] sp_sparse_tensor
*/
struct __pyx_obj_7pyarrow_3lib_SparseCSFTensor {
  struct __pyx_obj_7pyarrow_3lib__Weakrefable __pyx_base;
  struct __pyx_vtabstruct_7pyarrow_3lib_SparseCSFTensor *__pyx_vtab;
  std::shared_ptr< arrow::SparseCSFTensor>  sp_sparse_tensor;
   arrow::SparseCSFTensor *stp;
  struct __pyx_obj_7pyarrow_3lib_DataType *type;
};


/* "pyarrow/lib.pxd":354
 * 
 * 
 * cdef class NullArray(Array):             # <<<<<<<<<<<<<<
 *     pass
 * 
*/
struct __pyx_obj_7pyarrow_3lib_NullArray {
  struct __pyx_obj_7pyarrow_3lib_Array __pyx_base;
};


/* "pyarrow/lib.pxd":358
 * 
 * 
 * cdef class BooleanArray(Array):             # <<<<<<<<<<<<<<
 *     pass
 * 
*/
struct __pyx_obj_7pyarrow_3lib_BooleanArray {
  struct __pyx_obj_7pyarrow_3lib_Array __pyx_base;
};


/* "pyarrow/lib.pxd":362
 * 
 * 
 * cdef class NumericArray(Array):             # <<<<<<<<<<<<<<
 *     pass
 * 
*/
struct __pyx_obj_7pyarrow_3lib_NumericArray {
  struct __pyx_obj_7pyarrow_3lib_Array __pyx_base;
};


/* "pyarrow/lib.pxd":366
 * 
 * 
 * cdef class IntegerArray(NumericArray):             # <<<<<<<<<<<<<<
 *     pass
 * 
*/
struct __pyx_obj_7pyarrow_3lib_IntegerArray {
  struct __pyx_obj_7pyarrow_3lib_NumericArray __pyx_base;
};


/* "pyarrow/lib.pxd":370
 * 
 * 
 * cdef class FloatingPointArray(NumericArray):             # <<<<<<<<<<<<<<
 *     pass
 * 
*/
struct __pyx_obj_7pyarrow_3lib_FloatingPointArray {
  struct __pyx_obj_7pyarrow_3lib_NumericArray __pyx_base;
};


/* "pyarrow/lib.pxd":374
 * 
 * 
 * cdef class Int8Array(IntegerArray):             # <<<<<<<<<<<<<<
 *     pass
 * 
*/
struct __pyx_obj_7pyarrow_3lib_Int8Array {
  struct __pyx_obj_7pyarrow_3lib_IntegerArray __pyx_base;
};


/* "pyarrow/lib.pxd":378
 * 
 * 
 * cdef class UInt8Array(IntegerArray):             # <<<<<<<<<<<<<<
 *     pass
 * 
*/
struct __pyx_obj_7pyarrow_3lib_UInt8Array {
  struct __pyx_obj_7pyarrow_3lib_IntegerArray __pyx_base;
};


/* "pyarrow/lib.pxd":382
 * 
 * 
 * cdef class Int16Array(IntegerArray):             # <<<<<<<<<<<<<<
 *     pass
 * 
*/
struct __pyx_obj_7pyarrow_3lib_Int16Array {
  struct __pyx_obj_7pyarrow_3lib_IntegerArray __pyx_base;
};


/* "pyarrow/lib.pxd":386
 * 
 * 
 * cdef class UInt16Array(IntegerArray):             # <<<<<<<<<<<<<<
 *     pass
 * 
*/
struct __pyx_obj_7pyarrow_3lib_UInt16Array {
  struct __pyx_obj_7pyarrow_3lib_IntegerArray __pyx_base;
};


/* "pyarrow/lib.pxd":390
 * 
 * 
 * cdef class Int32Array(IntegerArray):             # <<<<<<<<<<<<<<
 *     pass
 * 
*/
struct __pyx_obj_7pyarrow_3lib_Int32Array {
  struct __pyx_obj_7pyarrow_3lib_IntegerArray __pyx_base;
};


/* "pyarrow/lib.pxd":394
 * 
 * 
 * cdef class UInt32Array(IntegerArray):             # <<<<<<<<<<<<<<
 *     pass
 * 
*/
struct __pyx_obj_7pyarrow_3lib_UInt32Array {
  struct __pyx_obj_7pyarrow_3lib_IntegerArray __pyx_base;
};


/* "pyarrow/lib.pxd":398
 * 
 * 
 * cdef class Int64Array(IntegerArray):             # <<<<<<<<<<<<<<
 *     pass
 * 
*/
struct __pyx_obj_7pyarrow_3lib_Int64Array {
  struct __pyx_obj_7pyarrow_3lib_IntegerArray __pyx_base;
};


/* "pyarrow/lib.pxd":402
 * 
 * 
 * cdef class UInt64Array(IntegerArray):             # <<<<<<<<<<<<<<
 *     pass
 * 
*/
struct __pyx_obj_7pyarrow_3lib_UInt64Array {
  struct __pyx_obj_7pyarrow_3lib_IntegerArray __pyx_base;
};


/* "pyarrow/lib.pxd":406
 * 
 * 
 * cdef class HalfFloatArray(FloatingPointArray):             # <<<<<<<<<<<<<<
 *     pass
 * 
*/
struct __pyx_obj_7pyarrow_3lib_HalfFloatArray {
  struct __pyx_obj_7pyarrow_3lib_FloatingPointArray __pyx_base;
};


/* "pyarrow/lib.pxd":410
 * 
 * 
 * cdef class FloatArray(FloatingPointArray):             # <<<<<<<<<<<<<<
 *     pass
 * 
*/
struct __pyx_obj_7pyarrow_3lib_FloatArray {
  struct __pyx_obj_7pyarrow_3lib_FloatingPointArray __pyx_base;
};


/* "pyarrow/lib.pxd":414
 * 
 * 
 * cdef class DoubleArray(FloatingPointArray):             # <<<<<<<<<<<<<<
 *     pass
 * 
*/
struct __pyx_obj_7pyarrow_3lib_DoubleArray {
  struct __pyx_obj_7pyarrow_3lib_FloatingPointArray __pyx_base;
};


/* "pyarrow/lib.pxd":418
 * 
 * 
 * cdef class FixedSizeBinaryArray(Array):             # <<<<<<<<<<<<<<
 *     pass
 * 
*/
struct __pyx_obj_7pyarrow_3lib_FixedSizeBinaryArray {
  struct __pyx_obj_7pyarrow_3lib_Array __pyx_base;
};


/* "pyarrow/lib.pxd":422
 * 
 * 
 * cdef class Decimal32Array(FixedSizeBinaryArray):             # <<<<<<<<<<<<<<
 *     pass
 * 
*/
struct __pyx_obj_7pyarrow_3lib_Decimal32Array {
  struct __pyx_obj_7pyarrow_3lib_FixedSizeBinaryArray __pyx_base;
};


/* "pyarrow/lib.pxd":426
 * 
 * 
 * cdef class Decimal64Array(FixedSizeBinaryArray):             # <<<<<<<<<<<<<<
 *     pass
 * 
*/
struct __pyx_obj_7pyarrow_3lib_Decimal64Array {
  struct __pyx_obj_7pyarrow_3lib_FixedSizeBinaryArray __pyx_base;
};


/* "pyarrow/lib.pxd":430
 * 
 * 
 * cdef class Decimal128Array(FixedSizeBinaryArray):             # <<<<<<<<<<<<<<
 *     pass
 * 
*/
struct __pyx_obj_7pyarrow_3lib_Decimal128Array {
  struct __pyx_obj_7pyarrow_3lib_FixedSizeBinaryArray __pyx_base;
};


/* "pyarrow/lib.pxd":434
 * 
 * 
 * cdef class Decimal256Array(FixedSizeBinaryArray):             # <<<<<<<<<<<<<<
 *     pass
 * 
*/
struct __pyx_obj_7pyarrow_3lib_Decimal256Array {
  struct __pyx_obj_7pyarrow_3lib_FixedSizeBinaryArray __pyx_base;
};


/* "pyarrow/lib.pxd":438
 * 
 * 
 * cdef class StructArray(Array):             # <<<<<<<<<<<<<<
 *     pass
 * 
*/
struct __pyx_obj_7pyarrow_3lib_StructArray {
  struct __pyx_obj_7pyarrow_3lib_Array __pyx_base;
};


/* "pyarrow/lib.pxd":442
 * 
 * 
 * cdef class BaseListArray(Array):             # <<<<<<<<<<<<<<
 *     pass
 * 
*/
struct __pyx_obj_7pyarrow_3lib_BaseListArray {
  struct __pyx_obj_7pyarrow_3lib_Array __pyx_base;
};


/* "pyarrow/lib.pxd":446
 * 
 * 
 * cdef class ListArray(BaseListArray):             # <<<<<<<<<<<<<<
 *     pass
 * 
*/
struct __pyx_obj_7pyarrow_3lib_ListArray {
  struct __pyx_obj_7pyarrow_3lib_BaseListArray __pyx_base;
};


/* "pyarrow/lib.pxd":450
 * 
 * 
 * cdef class LargeListArray(BaseListArray):             # <<<<<<<<<<<<<<
 *     pass
 * 
*/
struct __pyx_obj_7pyarrow_3lib_LargeListArray {
  struct __pyx_obj_7pyarrow_3lib_BaseListArray __pyx_base;
};


/* "pyarrow/lib.pxd":454
 * 
 * 
 * cdef class ListViewArray(BaseListArray):             # <<<<<<<<<<<<<<
 *     pass
 * 
*/
struct __pyx_obj_7pyarrow_3lib_ListViewArray {
  struct __pyx_obj_7pyarrow_3lib_BaseListArray __pyx_base;
};


/* "pyarrow/lib.pxd":458
 * 
 * 
 * cdef class LargeListViewArray(BaseListArray):             # <<<<<<<<<<<<<<
 *     pass
 * 
*/
struct __pyx_obj_7pyarrow_3lib_LargeListViewArray {
  struct __pyx_obj_7pyarrow_3lib_BaseListArray __pyx_base;
};


/* "pyarrow/lib.pxd":462
 * 
 * 
 * cdef class MapArray(ListArray):             # <<<<<<<<<<<<<<
 *     pass
 * 
*/
struct __pyx_obj_7pyarrow_3lib_MapArray {
  struct __pyx_obj_7pyarrow_3lib_ListArray __pyx_base;
};


/* "pyarrow/lib.pxd":466
 * 
 * 
 * cdef class FixedSizeListArray(BaseListArray):             # <<<<<<<<<<<<<<
 *     pass
 * 
*/
struct __pyx_obj_7pyarrow_3lib_FixedSizeListArray {
  struct __pyx_obj_7pyarrow_3lib_BaseListArray __pyx_base;
};


/* "pyarrow/lib.pxd":470
 * 
 * 
 * cdef class UnionArray(Array):             # <<<<<<<<<<<<<<
 *     pass
 * 
*/
struct __pyx_obj_7pyarrow_3lib_UnionArray {
  struct __pyx_obj_7pyarrow_3lib_Array __pyx_base;
};


/* "pyarrow/lib.pxd":474
 * 
 * 
 * cdef class StringArray(Array):             # <<<<<<<<<<<<<<
 *     pass
 * 
*/
struct __pyx_obj_7pyarrow_3lib_StringArray {
  struct __pyx_obj_7pyarrow_3lib_Array __pyx_base;
};


/* "pyarrow/lib.pxd":478
 * 
 * 
 * cdef class BinaryArray(Array):             # <<<<<<<<<<<<<<
 *     pass
 * 
*/
struct __pyx_obj_7pyarrow_3lib_BinaryArray {
  struct __pyx_obj_7pyarrow_3lib_Array __pyx_base;
};


/* "pyarrow/lib.pxd":482
 * 
 * 
 * cdef class StringViewArray(Array):             # <<<<<<<<<<<<<<
 *     pass
 * 
*/
struct __pyx_obj_7pyarrow_3lib_StringViewArray {
  struct __pyx_obj_7pyarrow_3lib_Array __pyx_base;
};


/* "pyarrow/lib.pxd":486
 * 
 * 
 * cdef class BinaryViewArray(Array):             # <<<<<<<<<<<<<<
 *     pass
 * 
*/
struct __pyx_obj_7pyarrow_3lib_BinaryViewArray {
  struct __pyx_obj_7pyarrow_3lib_Array __pyx_base;
};


/* "pyarrow/lib.pxd":490
 * 
 * 
 * cdef class DictionaryArray(Array):             # <<<<<<<<<<<<<<
 *     cdef:
 *         object _indices, _dictionary
*/
struct __pyx_obj_7pyarrow_3lib_DictionaryArray {
  struct __pyx_obj_7pyarrow_3lib_Array __pyx_base;
  PyObject *_indices;
  PyObject *_dictionary;
};


/* "pyarrow/lib.pxd":495
 * 
 * 
 * cdef class ExtensionArray(Array):             # <<<<<<<<<<<<<<
 *     pass
 * 
*/
struct __pyx_obj_7pyarrow_3lib_ExtensionArray {
  struct __pyx_obj_7pyarrow_3lib_Array __pyx_base;
};


/* "pyarrow/lib.pxd":499
 * 
 * 
 * cdef class MonthDayNanoIntervalArray(Array):             # <<<<<<<<<<<<<<
 *     pass
 * 
*/
struct __pyx_obj_7pyarrow_3lib_MonthDayNanoIntervalArray {
  struct __pyx_obj_7pyarrow_3lib_Array __pyx_base;
};


/* "pyarrow/lib.pxd":507
 * 
 * 
 * cdef class ChunkedArray(_PandasConvertible):             # <<<<<<<<<<<<<<
 *     cdef:
 *         shared_ptr[CChunkedArray] sp_chunked_array
*/
struct __pyx_obj_7pyarrow_3lib_ChunkedArray {
  struct __pyx_obj_7pyarrow_3lib__PandasConvertible __pyx_base;
  struct __pyx_vtabstruct_7pyarrow_3lib_ChunkedArray *__pyx_vtab;
  std::shared_ptr< arrow::ChunkedArray>  sp_chunked_array;
   arrow::ChunkedArray *chunked_array;
  bool _is_cpu;
  bool _init_is_cpu;
  PyObject *_name;
};


/* "pyarrow/lib.pxd":522
 * 
 * 
 * cdef class _Tabular(_PandasConvertible):             # <<<<<<<<<<<<<<
 *     cdef void _assert_cpu(self) except *
 * 
*/
struct __pyx_obj_7pyarrow_3lib__Tabular {
  struct __pyx_obj_7pyarrow_3lib__PandasConvertible __pyx_base;
  struct __pyx_vtabstruct_7pyarrow_3lib__Tabular *__pyx_vtab;
};


/* "pyarrow/lib.pxd":526
 * 
 * 
 * cdef class Table(_Tabular):             # <<<<<<<<<<<<<<
 *     cdef:
 *         shared_ptr[CTable] sp_table
*/
struct __pyx_obj_7pyarrow_3lib_Table {
  struct __pyx_obj_7pyarrow_3lib__Tabular __pyx_base;
  std::shared_ptr< arrow::Table>  sp_table;
   arrow::Table *table;
  bool _is_cpu;
  bool _init_is_cpu;
};


/* "pyarrow/lib.pxd":536
 * 
 * 
 * cdef class RecordBatch(_Tabular):             # <<<<<<<<<<<<<<
 *     cdef:
 *         shared_ptr[CRecordBatch] sp_batch
*/
struct __pyx_obj_7pyarrow_3lib_RecordBatch {
  struct __pyx_obj_7pyarrow_3lib__Tabular __pyx_base;
  std::shared_ptr< arrow::RecordBatch>  sp_batch;
   arrow::RecordBatch *batch;
  struct __pyx_obj_7pyarrow_3lib_Schema *_schema;
};


/* "pyarrow/lib.pxd":545
 * 
 * 
 * cdef class Device(_Weakrefable):             # <<<<<<<<<<<<<<
 *     cdef:
 *         shared_ptr[CDevice] device
*/
struct __pyx_obj_7pyarrow_3lib_Device {
  struct __pyx_obj_7pyarrow_3lib__Weakrefable __pyx_base;
  struct __pyx_vtabstruct_7pyarrow_3lib_Device *__pyx_vtab;
  std::shared_ptr< arrow::Device>  device;
};


/* "pyarrow/lib.pxd":557
 * 
 * 
 * cdef class MemoryManager(_Weakrefable):             # <<<<<<<<<<<<<<
 *     cdef:
 *         shared_ptr[CMemoryManager] memory_manager
*/
struct __pyx_obj_7pyarrow_3lib_MemoryManager {
  struct __pyx_obj_7pyarrow_3lib__Weakrefable __pyx_base;
  struct __pyx_vtabstruct_7pyarrow_3lib_MemoryManager *__pyx_vtab;
  std::shared_ptr< arrow::MemoryManager>  memory_manager;
};


/* "pyarrow/lib.pxd":569
 * 
 * 
 * cdef class Buffer(_Weakrefable):             # <<<<<<<<<<<<<<
 *     cdef:
 *         shared_ptr[CBuffer] buffer
*/
struct __pyx_obj_7pyarrow_3lib_Buffer {
  struct __pyx_obj_7pyarrow_3lib__Weakrefable __pyx_base;
  struct __pyx_vtabstruct_7pyarrow_3lib_Buffer *__pyx_vtab;
  std::shared_ptr< arrow::Buffer>  buffer;
  Py_ssize_t shape[1];
  Py_ssize_t strides[1];
};


/* "pyarrow/lib.pxd":579
 * 
 * 
 * cdef class ResizableBuffer(Buffer):             # <<<<<<<<<<<<<<
 * 
 *     cdef void init_rz(self, const shared_ptr[CResizableBuffer]& buffer)
*/
struct __pyx_obj_7pyarrow_3lib_ResizableBuffer {
  struct __pyx_obj_7pyarrow_3lib_Buffer __pyx_base;
};


/* "pyarrow/lib.pxd":584
 * 
 * 
 * cdef class NativeFile(_Weakrefable):             # <<<<<<<<<<<<<<
 *     cdef:
 *         shared_ptr[CInputStream] input_stream
*/
struct __pyx_obj_7pyarrow_3lib_NativeFile {
  struct __pyx_obj_7pyarrow_3lib__Weakrefable __pyx_base;
  struct __pyx_vtabstruct_7pyarrow_3lib_NativeFile *__pyx_vtab;
  std::shared_ptr< arrow::io::InputStream>  input_stream;
  std::shared_ptr< arrow::io::RandomAccessFile>  random_access;
  std::shared_ptr< arrow::io::OutputStream>  output_stream;
  int is_readable;
  int is_writable;
  int is_seekable;
  int _is_appending;
  int own_file;
};


/* "pyarrow/lib.pxd":608
 * 
 * 
 * cdef class BufferedInputStream(NativeFile):             # <<<<<<<<<<<<<<
 *     pass
 * 
*/
struct __pyx_obj_7pyarrow_3lib_BufferedInputStream {
  struct __pyx_obj_7pyarrow_3lib_NativeFile __pyx_base;
};


/* "pyarrow/lib.pxd":612
 * 
 * 
 * cdef class BufferedOutputStream(NativeFile):             # <<<<<<<<<<<<<<
 *     pass
 * 
*/
struct __pyx_obj_7pyarrow_3lib_BufferedOutputStream {
  struct __pyx_obj_7pyarrow_3lib_NativeFile __pyx_base;
};


/* "pyarrow/lib.pxd":616
 * 
 * 
 * cdef class CompressedInputStream(NativeFile):             # <<<<<<<<<<<<<<
 *     pass
 * 
*/
struct __pyx_obj_7pyarrow_3lib_CompressedInputStream {
  struct __pyx_obj_7pyarrow_3lib_NativeFile __pyx_base;
};


/* "pyarrow/lib.pxd":620
 * 
 * 
 * cdef class CompressedOutputStream(NativeFile):             # <<<<<<<<<<<<<<
 *     pass
 * 
*/
struct __pyx_obj_7pyarrow_3lib_CompressedOutputStream {
  struct __pyx_obj_7pyarrow_3lib_NativeFile __pyx_base;
};


/* "pyarrow/lib.pxd":624
 * 
 * 
 * cdef class _CRecordBatchWriter(_Weakrefable):             # <<<<<<<<<<<<<<
 *     cdef:
 *         SharedPtrNoGIL[CRecordBatchWriter] writer
*/
struct __pyx_obj_7pyarrow_3lib__CRecordBatchWriter {
  struct __pyx_obj_7pyarrow_3lib__Weakrefable __pyx_base;
  arrow::py::SharedPtrNoGIL< arrow::ipc::RecordBatchWriter>  writer;
};


/* "pyarrow/lib.pxd":629
 * 
 * 
 * cdef class RecordBatchReader(_Weakrefable):             # <<<<<<<<<<<<<<
 *     cdef:
 *         SharedPtrNoGIL[CRecordBatchReader] reader
*/
struct __pyx_obj_7pyarrow_3lib_RecordBatchReader {
  struct __pyx_obj_7pyarrow_3lib__Weakrefable __pyx_base;
  arrow::py::SharedPtrNoGIL< arrow::RecordBatchReader>  reader;
};


/* "pyarrow/lib.pxd":634
 * 
 * 
 * cdef class CacheOptions(_Weakrefable):             # <<<<<<<<<<<<<<
 *     cdef:
 *         CCacheOptions wrapped
*/
struct __pyx_obj_7pyarrow_3lib_CacheOptions {
  struct __pyx_obj_7pyarrow_3lib__Weakrefable __pyx_base;
  struct __pyx_vtabstruct_7pyarrow_3lib_CacheOptions *__pyx_vtab;
  arrow::io::CacheOptions wrapped;
};


/* "pyarrow/lib.pxd":646
 * 
 * 
 * cdef class Codec(_Weakrefable):             # <<<<<<<<<<<<<<
 *     cdef:
 *         shared_ptr[CCodec] wrapped
*/
struct __pyx_obj_7pyarrow_3lib_Codec {
  struct __pyx_obj_7pyarrow_3lib__Weakrefable __pyx_base;
  struct __pyx_vtabstruct_7pyarrow_3lib_Codec *__pyx_vtab;
  std::shared_ptr< arrow::util::Codec>  wrapped;
};


/* "pyarrow/lib.pxd":654
 * 
 * # This class is only used internally for now
 * cdef class StopToken:             # <<<<<<<<<<<<<<
 *     cdef:
 *         CStopToken stop_token
*/
struct __pyx_obj_7pyarrow_3lib_StopToken {
  PyObject_HEAD
  struct __pyx_vtabstruct_7pyarrow_3lib_StopToken *__pyx_vtab;
  arrow::StopToken stop_token;
};


/* "pyarrow/error.pxi":196
 *                         sys.version_info[:2] == (3, 10))
 * 
 * cdef class SignalStopHandler:             # <<<<<<<<<<<<<<
 *     cdef:
 *         StopToken _stop_token
*/
struct __pyx_obj_7pyarrow_3lib_SignalStopHandler {
  PyObject_HEAD
  struct __pyx_obj_7pyarrow_3lib_StopToken *_stop_token;
  std::vector<int>  _signals;
  bool _enabled;
};


/* "pyarrow/pandas-shim.pxi":24
 * 
 * 
 * cdef class _PandasAPIShim(object):             # <<<<<<<<<<<<<<
 *     """
 *     Lazy pandas importer that isolates usages of pandas APIs and avoids
*/
struct __pyx_obj_7pyarrow_3lib__PandasAPIShim {
  PyObject_HEAD
  struct __pyx_vtabstruct_7pyarrow_3lib__PandasAPIShim *__pyx_vtab;
  int _tried_importing_pandas;
  int _have_pandas;
  PyObject *_loose_version;
  PyObject *_version;
  PyObject *_pd;
  PyObject *_types_api;
  PyObject *_compat_module;
  PyObject *_data_frame;
  PyObject *_index;
  PyObject *_series;
  PyObject *_categorical_type;
  PyObject *_datetimetz_type;
  PyObject *_extension_array;
  PyObject *_extension_dtype;
  PyObject *_array_like_types;
  PyObject *_is_extension_array_dtype;
  PyObject *_lock;
  int has_sparse;
  int _pd024;
  int _is_v1;
  int _is_ge_v21;
  int _is_ge_v23;
  int _is_ge_v3;
  int _is_ge_v3_strict;
};


/* "pyarrow/memory.pxi":123
 * 
 * 
 * cdef class LoggingMemoryPool(MemoryPool):             # <<<<<<<<<<<<<<
 *     cdef:
 *         unique_ptr[CLoggingMemoryPool] logging_pool
*/
struct __pyx_obj_7pyarrow_3lib_LoggingMemoryPool {
  struct __pyx_obj_7pyarrow_3lib_MemoryPool __pyx_base;
  std::unique_ptr< arrow::LoggingMemoryPool>  logging_pool;
};


/* "pyarrow/memory.pxi":132
 * 
 * 
 * cdef class ProxyMemoryPool(MemoryPool):             # <<<<<<<<<<<<<<
 *     """
 *     Memory pool implementation that tracks the number of bytes and
*/
struct __pyx_obj_7pyarrow_3lib_ProxyMemoryPool {
  struct __pyx_obj_7pyarrow_3lib_MemoryPool __pyx_base;
  std::unique_ptr< arrow::ProxyMemoryPool>  proxy_pool;
};


/* "pyarrow/types.pxi":1088
 *         return list(self)
 * 
 * cdef class UnionType(DataType):             # <<<<<<<<<<<<<<
 *     """
 *     Base class for union data types.
*/
struct __pyx_obj_7pyarrow_3lib_UnionType {
  struct __pyx_obj_7pyarrow_3lib_DataType __pyx_base;
};


/* "pyarrow/types.pxi":1205
 * 
 * 
 * cdef class SparseUnionType(UnionType):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for sparse union types.
*/
struct __pyx_obj_7pyarrow_3lib_SparseUnionType {
  struct __pyx_obj_7pyarrow_3lib_UnionType __pyx_base;
};


/* "pyarrow/types.pxi":1225
 * 
 * 
 * cdef class DenseUnionType(UnionType):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for dense union types.
*/
struct __pyx_obj_7pyarrow_3lib_DenseUnionType {
  struct __pyx_obj_7pyarrow_3lib_UnionType __pyx_base;
};


/* "pyarrow/types.pxi":2138
 * 
 * 
 * cdef class UnknownExtensionType(ExtensionType):             # <<<<<<<<<<<<<<
 *     """
 *     A concrete class for Python-defined extension types that refer to
*/
struct __pyx_obj_7pyarrow_3lib_UnknownExtensionType {
  struct __pyx_obj_7pyarrow_3lib_ExtensionType __pyx_base;
  PyObject *serialized;
};


/* "pyarrow/types.pxi":6012
 * 
 * 
 * cdef class _ExtensionRegistryNanny(_Weakrefable):             # <<<<<<<<<<<<<<
 *     # Keep the registry alive until we have unregistered PyExtensionType
 *     cdef:
*/
struct __pyx_obj_7pyarrow_3lib__ExtensionRegistryNanny {
  struct __pyx_obj_7pyarrow_3lib__Weakrefable __pyx_base;
  std::shared_ptr< arrow::ExtensionTypeRegistry>  registry;
};


/* "pyarrow/scalar.pxi":175
 * 
 * 
 * cdef class NullScalar(Scalar):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for null scalars.
*/
struct __pyx_obj_7pyarrow_3lib_NullScalar {
  struct __pyx_obj_7pyarrow_3lib_Scalar __pyx_base;
};


/* "pyarrow/scalar.pxi":205
 * 
 * 
 * cdef class BooleanScalar(Scalar):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for boolean scalars.
*/
struct __pyx_obj_7pyarrow_3lib_BooleanScalar {
  struct __pyx_obj_7pyarrow_3lib_Scalar __pyx_base;
};


/* "pyarrow/scalar.pxi":226
 *         return self.as_py() or False
 * 
 * cdef class UInt8Scalar(Scalar):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for uint8 scalars.
*/
struct __pyx_obj_7pyarrow_3lib_UInt8Scalar {
  struct __pyx_obj_7pyarrow_3lib_Scalar __pyx_base;
};


/* "pyarrow/scalar.pxi":248
 * 
 * 
 * cdef class Int8Scalar(Scalar):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for int8 scalars.
*/
struct __pyx_obj_7pyarrow_3lib_Int8Scalar {
  struct __pyx_obj_7pyarrow_3lib_Scalar __pyx_base;
};


/* "pyarrow/scalar.pxi":270
 * 
 * 
 * cdef class UInt16Scalar(Scalar):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for uint16 scalars.
*/
struct __pyx_obj_7pyarrow_3lib_UInt16Scalar {
  struct __pyx_obj_7pyarrow_3lib_Scalar __pyx_base;
};


/* "pyarrow/scalar.pxi":292
 * 
 * 
 * cdef class Int16Scalar(Scalar):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for int16 scalars.
*/
struct __pyx_obj_7pyarrow_3lib_Int16Scalar {
  struct __pyx_obj_7pyarrow_3lib_Scalar __pyx_base;
};


/* "pyarrow/scalar.pxi":314
 * 
 * 
 * cdef class UInt32Scalar(Scalar):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for uint32 scalars.
*/
struct __pyx_obj_7pyarrow_3lib_UInt32Scalar {
  struct __pyx_obj_7pyarrow_3lib_Scalar __pyx_base;
};


/* "pyarrow/scalar.pxi":336
 * 
 * 
 * cdef class Int32Scalar(Scalar):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for int32 scalars.
*/
struct __pyx_obj_7pyarrow_3lib_Int32Scalar {
  struct __pyx_obj_7pyarrow_3lib_Scalar __pyx_base;
};


/* "pyarrow/scalar.pxi":358
 * 
 * 
 * cdef class UInt64Scalar(Scalar):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for uint64 scalars.
*/
struct __pyx_obj_7pyarrow_3lib_UInt64Scalar {
  struct __pyx_obj_7pyarrow_3lib_Scalar __pyx_base;
};


/* "pyarrow/scalar.pxi":380
 * 
 * 
 * cdef class Int64Scalar(Scalar):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for int64 scalars.
*/
struct __pyx_obj_7pyarrow_3lib_Int64Scalar {
  struct __pyx_obj_7pyarrow_3lib_Scalar __pyx_base;
};


/* "pyarrow/scalar.pxi":402
 * 
 * 
 * cdef class HalfFloatScalar(Scalar):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for float scalars.
*/
struct __pyx_obj_7pyarrow_3lib_HalfFloatScalar {
  struct __pyx_obj_7pyarrow_3lib_Scalar __pyx_base;
};


/* "pyarrow/scalar.pxi":427
 * 
 * 
 * cdef class FloatScalar(Scalar):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for float scalars.
*/
struct __pyx_obj_7pyarrow_3lib_FloatScalar {
  struct __pyx_obj_7pyarrow_3lib_Scalar __pyx_base;
};


/* "pyarrow/scalar.pxi":452
 * 
 * 
 * cdef class DoubleScalar(Scalar):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for double scalars.
*/
struct __pyx_obj_7pyarrow_3lib_DoubleScalar {
  struct __pyx_obj_7pyarrow_3lib_Scalar __pyx_base;
};


/* "pyarrow/scalar.pxi":477
 * 
 * 
 * cdef class Decimal32Scalar(Scalar):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for decimal32 scalars.
*/
struct __pyx_obj_7pyarrow_3lib_Decimal32Scalar {
  struct __pyx_obj_7pyarrow_3lib_Scalar __pyx_base;
};


/* "pyarrow/scalar.pxi":503
 * 
 * 
 * cdef class Decimal64Scalar(Scalar):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for decimal64 scalars.
*/
struct __pyx_obj_7pyarrow_3lib_Decimal64Scalar {
  struct __pyx_obj_7pyarrow_3lib_Scalar __pyx_base;
};


/* "pyarrow/scalar.pxi":529
 * 
 * 
 * cdef class Decimal128Scalar(Scalar):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for decimal128 scalars.
*/
struct __pyx_obj_7pyarrow_3lib_Decimal128Scalar {
  struct __pyx_obj_7pyarrow_3lib_Scalar __pyx_base;
};


/* "pyarrow/scalar.pxi":555
 * 
 * 
 * cdef class Decimal256Scalar(Scalar):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for decimal256 scalars.
*/
struct __pyx_obj_7pyarrow_3lib_Decimal256Scalar {
  struct __pyx_obj_7pyarrow_3lib_Scalar __pyx_base;
};


/* "pyarrow/scalar.pxi":581
 * 
 * 
 * cdef class Date32Scalar(Scalar):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for date32 scalars.
*/
struct __pyx_obj_7pyarrow_3lib_Date32Scalar {
  struct __pyx_obj_7pyarrow_3lib_Scalar __pyx_base;
};


/* "pyarrow/scalar.pxi":612
 * 
 * 
 * cdef class Date64Scalar(Scalar):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for date64 scalars.
*/
struct __pyx_obj_7pyarrow_3lib_Date64Scalar {
  struct __pyx_obj_7pyarrow_3lib_Scalar __pyx_base;
};


/* "pyarrow/scalar.pxi":672
 * 
 * 
 * cdef class Time32Scalar(Scalar):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for time32 scalars.
*/
struct __pyx_obj_7pyarrow_3lib_Time32Scalar {
  struct __pyx_obj_7pyarrow_3lib_Scalar __pyx_base;
};


/* "pyarrow/scalar.pxi":702
 * 
 * 
 * cdef class Time64Scalar(Scalar):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for time64 scalars.
*/
struct __pyx_obj_7pyarrow_3lib_Time64Scalar {
  struct __pyx_obj_7pyarrow_3lib_Scalar __pyx_base;
};


/* "pyarrow/scalar.pxi":732
 * 
 * 
 * cdef class TimestampScalar(Scalar):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for timestamp scalars.
*/
struct __pyx_obj_7pyarrow_3lib_TimestampScalar {
  struct __pyx_obj_7pyarrow_3lib_Scalar __pyx_base;
};


/* "pyarrow/scalar.pxi":784
 * 
 * 
 * cdef class DurationScalar(Scalar):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for duration scalars.
*/
struct __pyx_obj_7pyarrow_3lib_DurationScalar {
  struct __pyx_obj_7pyarrow_3lib_Scalar __pyx_base;
};


/* "pyarrow/scalar.pxi":835
 * 
 * 
 * cdef class MonthDayNanoIntervalScalar(Scalar):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for month, day, nanosecond interval scalars.
*/
struct __pyx_obj_7pyarrow_3lib_MonthDayNanoIntervalScalar {
  struct __pyx_obj_7pyarrow_3lib_Scalar __pyx_base;
};


/* "pyarrow/scalar.pxi":866
 * 
 * 
 * cdef class BinaryScalar(Scalar):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for binary-like scalars.
*/
struct __pyx_obj_7pyarrow_3lib_BinaryScalar {
  struct __pyx_obj_7pyarrow_3lib_Scalar __pyx_base;
};


/* "pyarrow/scalar.pxi":901
 * 
 * 
 * cdef class LargeBinaryScalar(BinaryScalar):             # <<<<<<<<<<<<<<
 *     pass
 * 
*/
struct __pyx_obj_7pyarrow_3lib_LargeBinaryScalar {
  struct __pyx_obj_7pyarrow_3lib_BinaryScalar __pyx_base;
};


/* "pyarrow/scalar.pxi":905
 * 
 * 
 * cdef class FixedSizeBinaryScalar(BinaryScalar):             # <<<<<<<<<<<<<<
 *     pass
 * 
*/
struct __pyx_obj_7pyarrow_3lib_FixedSizeBinaryScalar {
  struct __pyx_obj_7pyarrow_3lib_BinaryScalar __pyx_base;
};


/* "pyarrow/scalar.pxi":909
 * 
 * 
 * cdef class StringScalar(BinaryScalar):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for string-like (utf8) scalars.
*/
struct __pyx_obj_7pyarrow_3lib_StringScalar {
  struct __pyx_obj_7pyarrow_3lib_BinaryScalar __pyx_base;
};


/* "pyarrow/scalar.pxi":928
 * 
 * 
 * cdef class LargeStringScalar(StringScalar):             # <<<<<<<<<<<<<<
 *     pass
 * 
*/
struct __pyx_obj_7pyarrow_3lib_LargeStringScalar {
  struct __pyx_obj_7pyarrow_3lib_StringScalar __pyx_base;
};


/* "pyarrow/scalar.pxi":932
 * 
 * 
 * cdef class BinaryViewScalar(BinaryScalar):             # <<<<<<<<<<<<<<
 *     pass
 * 
*/
struct __pyx_obj_7pyarrow_3lib_BinaryViewScalar {
  struct __pyx_obj_7pyarrow_3lib_BinaryScalar __pyx_base;
};


/* "pyarrow/scalar.pxi":936
 * 
 * 
 * cdef class StringViewScalar(StringScalar):             # <<<<<<<<<<<<<<
 *     pass
 * 
*/
struct __pyx_obj_7pyarrow_3lib_StringViewScalar {
  struct __pyx_obj_7pyarrow_3lib_StringScalar __pyx_base;
};


/* "pyarrow/scalar.pxi":940
 * 
 * 
 * cdef class ListScalar(Scalar, Sequence):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for list-like scalars.
*/
struct __pyx_obj_7pyarrow_3lib_ListScalar {
  struct __pyx_obj_7pyarrow_3lib_Scalar __pyx_base;
};


/* "pyarrow/scalar.pxi":993
 * 
 * 
 * cdef class FixedSizeListScalar(ListScalar):             # <<<<<<<<<<<<<<
 *     pass
 * 
*/
struct __pyx_obj_7pyarrow_3lib_FixedSizeListScalar {
  struct __pyx_obj_7pyarrow_3lib_ListScalar __pyx_base;
};


/* "pyarrow/scalar.pxi":997
 * 
 * 
 * cdef class LargeListScalar(ListScalar):             # <<<<<<<<<<<<<<
 *     pass
 * 
*/
struct __pyx_obj_7pyarrow_3lib_LargeListScalar {
  struct __pyx_obj_7pyarrow_3lib_ListScalar __pyx_base;
};


/* "pyarrow/scalar.pxi":1001
 * 
 * 
 * cdef class ListViewScalar(ListScalar):             # <<<<<<<<<<<<<<
 *     pass
 * 
*/
struct __pyx_obj_7pyarrow_3lib_ListViewScalar {
  struct __pyx_obj_7pyarrow_3lib_ListScalar __pyx_base;
};


/* "pyarrow/scalar.pxi":1005
 * 
 * 
 * cdef class LargeListViewScalar(ListScalar):             # <<<<<<<<<<<<<<
 *     pass
 * 
*/
struct __pyx_obj_7pyarrow_3lib_LargeListViewScalar {
  struct __pyx_obj_7pyarrow_3lib_ListScalar __pyx_base;
};


/* "pyarrow/scalar.pxi":1009
 * 
 * 
 * cdef class StructScalar(Scalar, Mapping):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for struct scalars.
*/
struct __pyx_obj_7pyarrow_3lib_StructScalar {
  struct __pyx_obj_7pyarrow_3lib_Scalar __pyx_base;
};


/* "pyarrow/scalar.pxi":1108
 * 
 * 
 * cdef class MapScalar(ListScalar, Mapping):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for map scalars.
*/
struct __pyx_obj_7pyarrow_3lib_MapScalar {
  struct __pyx_obj_7pyarrow_3lib_ListScalar __pyx_base;
};


/* "pyarrow/scalar.pxi":1203
 * 
 * 
 * cdef class DictionaryScalar(Scalar):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for dictionary-encoded scalars.
*/
struct __pyx_obj_7pyarrow_3lib_DictionaryScalar {
  struct __pyx_obj_7pyarrow_3lib_Scalar __pyx_base;
};


/* "pyarrow/scalar.pxi":1294
 * 
 * 
 * cdef class RunEndEncodedScalar(Scalar):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for RunEndEncoded scalars.
*/
struct __pyx_obj_7pyarrow_3lib_RunEndEncodedScalar {
  struct __pyx_obj_7pyarrow_3lib_Scalar __pyx_base;
};


/* "pyarrow/scalar.pxi":1327
 * 
 * 
 * cdef class UnionScalar(Scalar):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for Union scalars.
*/
struct __pyx_obj_7pyarrow_3lib_UnionScalar {
  struct __pyx_obj_7pyarrow_3lib_Scalar __pyx_base;
};


/* "pyarrow/scalar.pxi":1376
 * 
 * 
 * cdef class ExtensionScalar(Scalar):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for Extension scalars.
*/
struct __pyx_obj_7pyarrow_3lib_ExtensionScalar {
  struct __pyx_obj_7pyarrow_3lib_Scalar __pyx_base;
};


/* "pyarrow/scalar.pxi":1476
 * 
 * 
 * cdef class FixedShapeTensorScalar(ExtensionScalar):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for fixed shape tensor extension scalar.
*/
struct __pyx_obj_7pyarrow_3lib_FixedShapeTensorScalar {
  struct __pyx_obj_7pyarrow_3lib_ExtensionScalar __pyx_base;
};


/* "pyarrow/scalar.pxi":1518
 * 
 * 
 * cdef class OpaqueScalar(ExtensionScalar):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for opaque extension scalar.
*/
struct __pyx_obj_7pyarrow_3lib_OpaqueScalar {
  struct __pyx_obj_7pyarrow_3lib_ExtensionScalar __pyx_base;
};


/* "pyarrow/scalar.pxi":1524
 * 
 * 
 * cdef class Bool8Scalar(ExtensionScalar):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for bool8 extension scalar.
*/
struct __pyx_obj_7pyarrow_3lib_Bool8Scalar {
  struct __pyx_obj_7pyarrow_3lib_ExtensionScalar __pyx_base;
};


/* "pyarrow/array.pxi":2422
 * 
 * 
 * cdef class Date32Array(NumericArray):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for Arrow arrays of date32 data type.
*/
struct __pyx_obj_7pyarrow_3lib_Date32Array {
  struct __pyx_obj_7pyarrow_3lib_NumericArray __pyx_base;
};


/* "pyarrow/array.pxi":2428
 * 
 * 
 * cdef class Date64Array(NumericArray):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for Arrow arrays of date64 data type.
*/
struct __pyx_obj_7pyarrow_3lib_Date64Array {
  struct __pyx_obj_7pyarrow_3lib_NumericArray __pyx_base;
};


/* "pyarrow/array.pxi":2434
 * 
 * 
 * cdef class TimestampArray(NumericArray):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for Arrow arrays of timestamp data type.
*/
struct __pyx_obj_7pyarrow_3lib_TimestampArray {
  struct __pyx_obj_7pyarrow_3lib_NumericArray __pyx_base;
};


/* "pyarrow/array.pxi":2440
 * 
 * 
 * cdef class Time32Array(NumericArray):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for Arrow arrays of time32 data type.
*/
struct __pyx_obj_7pyarrow_3lib_Time32Array {
  struct __pyx_obj_7pyarrow_3lib_NumericArray __pyx_base;
};


/* "pyarrow/array.pxi":2446
 * 
 * 
 * cdef class Time64Array(NumericArray):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for Arrow arrays of time64 data type.
*/
struct __pyx_obj_7pyarrow_3lib_Time64Array {
  struct __pyx_obj_7pyarrow_3lib_NumericArray __pyx_base;
};


/* "pyarrow/array.pxi":2452
 * 
 * 
 * cdef class DurationArray(NumericArray):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for Arrow arrays of duration data type.
*/
struct __pyx_obj_7pyarrow_3lib_DurationArray {
  struct __pyx_obj_7pyarrow_3lib_NumericArray __pyx_base;
};


/* "pyarrow/array.pxi":2512
 *     """
 * 
 * cdef class Decima32Array(FixedSizeBinaryArray):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for Arrow arrays of decimal32 data type.
*/
struct __pyx_obj_7pyarrow_3lib_Decima32Array {
  struct __pyx_obj_7pyarrow_3lib_FixedSizeBinaryArray __pyx_base;
};


/* "pyarrow/array.pxi":3903
 * 
 * 
 * cdef class LargeStringArray(Array):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for Arrow arrays of large string (or utf8) data type.
*/
struct __pyx_obj_7pyarrow_3lib_LargeStringArray {
  struct __pyx_obj_7pyarrow_3lib_Array __pyx_base;
};


/* "pyarrow/array.pxi":3954
 * 
 * 
 * cdef class LargeBinaryArray(Array):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for Arrow arrays of large variable-sized binary data type.
*/
struct __pyx_obj_7pyarrow_3lib_LargeBinaryArray {
  struct __pyx_obj_7pyarrow_3lib_Array __pyx_base;
};


/* "pyarrow/array.pxi":4338
 * 
 * 
 * cdef class RunEndEncodedArray(Array):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for Arrow run-end encoded arrays.
*/
struct __pyx_obj_7pyarrow_3lib_RunEndEncodedArray {
  struct __pyx_obj_7pyarrow_3lib_Array __pyx_base;
};


/* "pyarrow/array.pxi":4576
 * 
 * 
 * cdef class FixedShapeTensorArray(ExtensionArray):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for fixed shape tensor extension arrays.
*/
struct __pyx_obj_7pyarrow_3lib_FixedShapeTensorArray {
  struct __pyx_obj_7pyarrow_3lib_ExtensionArray __pyx_base;
};


/* "pyarrow/array.pxi":4737
 * 
 * 
 * cdef class OpaqueArray(ExtensionArray):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for opaque extension arrays.
*/
struct __pyx_obj_7pyarrow_3lib_OpaqueArray {
  struct __pyx_obj_7pyarrow_3lib_ExtensionArray __pyx_base;
};


/* "pyarrow/array.pxi":4765
 * 
 * 
 * cdef class Bool8Array(ExtensionArray):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for bool8 extension arrays.
*/
struct __pyx_obj_7pyarrow_3lib_Bool8Array {
  struct __pyx_obj_7pyarrow_3lib_ExtensionArray __pyx_base;
};


/* "pyarrow/builder.pxi":21
 * 
 * 
 * cdef class StringBuilder(_Weakrefable):             # <<<<<<<<<<<<<<
 *     """
 *     Builder class for UTF8 strings.
*/
struct __pyx_obj_7pyarrow_3lib_StringBuilder {
  struct __pyx_obj_7pyarrow_3lib__Weakrefable __pyx_base;
  std::unique_ptr< arrow::StringBuilder>  builder;
};


/* "pyarrow/builder.pxi":87
 * 
 * 
 * cdef class StringViewBuilder(_Weakrefable):             # <<<<<<<<<<<<<<
 *     """
 *     Builder class for UTF8 string views.
*/
struct __pyx_obj_7pyarrow_3lib_StringViewBuilder {
  struct __pyx_obj_7pyarrow_3lib__Weakrefable __pyx_base;
  std::unique_ptr< arrow::StringViewBuilder>  builder;
};


/* "pyarrow/io.pxi":879
 * 
 * 
 * cdef class PythonFile(NativeFile):             # <<<<<<<<<<<<<<
 *     """
 *     A stream backed by a Python file object.
*/
struct __pyx_obj_7pyarrow_3lib_PythonFile {
  struct __pyx_obj_7pyarrow_3lib_NativeFile __pyx_base;
  PyObject *handle;
};


/* "pyarrow/io.pxi":1011
 * 
 * 
 * cdef class MemoryMappedFile(NativeFile):             # <<<<<<<<<<<<<<
 *     """
 *     A stream that represents a memory-mapped file.
*/
struct __pyx_obj_7pyarrow_3lib_MemoryMappedFile {
  struct __pyx_obj_7pyarrow_3lib_NativeFile __pyx_base;
  std::shared_ptr< arrow::io::MemoryMappedFile>  handle;
  PyObject *path;
};


/* "pyarrow/io.pxi":1182
 * 
 * 
 * cdef class OSFile(NativeFile):             # <<<<<<<<<<<<<<
 *     """
 *     A stream backed by a regular file descriptor.
*/
struct __pyx_obj_7pyarrow_3lib_OSFile {
  struct __pyx_obj_7pyarrow_3lib_NativeFile __pyx_base;
  PyObject *path;
};


/* "pyarrow/io.pxi":1270
 * 
 * 
 * cdef class FixedSizeBufferWriter(NativeFile):             # <<<<<<<<<<<<<<
 *     """
 *     A stream writing to a Arrow buffer.
*/
struct __pyx_obj_7pyarrow_3lib_FixedSizeBufferWriter {
  struct __pyx_obj_7pyarrow_3lib_NativeFile __pyx_base;
};


/* "pyarrow/io.pxi":1650
 * 
 * 
 * cdef class BufferOutputStream(NativeFile):             # <<<<<<<<<<<<<<
 *     """
 *     An output stream that writes to a resizable buffer.
*/
struct __pyx_obj_7pyarrow_3lib_BufferOutputStream {
  struct __pyx_obj_7pyarrow_3lib_NativeFile __pyx_base;
  std::shared_ptr< arrow::ResizableBuffer>  buffer;
};


/* "pyarrow/io.pxi":1695
 * 
 * 
 * cdef class MockOutputStream(NativeFile):             # <<<<<<<<<<<<<<
 * 
 *     def __cinit__(self):
*/
struct __pyx_obj_7pyarrow_3lib_MockOutputStream {
  struct __pyx_obj_7pyarrow_3lib_NativeFile __pyx_base;
};


/* "pyarrow/io.pxi":1706
 * 
 * 
 * cdef class BufferReader(NativeFile):             # <<<<<<<<<<<<<<
 *     """
 *     Zero-copy reader from objects convertible to Arrow buffer.
*/
struct __pyx_obj_7pyarrow_3lib_BufferReader {
  struct __pyx_obj_7pyarrow_3lib_NativeFile __pyx_base;
  struct __pyx_obj_7pyarrow_3lib_Buffer *buffer;
};


/* "pyarrow/io.pxi":1972
 * 
 * 
 * cdef class TransformInputStream(NativeFile):             # <<<<<<<<<<<<<<
 *     """
 *     Transform an input stream.
*/
struct __pyx_obj_7pyarrow_3lib_TransformInputStream {
  struct __pyx_obj_7pyarrow_3lib_NativeFile __pyx_base;
};


/* "pyarrow/ipc.pxi":488
 * 
 * 
 * cdef class MessageReader(_Weakrefable):             # <<<<<<<<<<<<<<
 *     """
 *     Interface for reading Message objects from some source (like an
*/
struct __pyx_obj_7pyarrow_3lib_MessageReader {
  struct __pyx_obj_7pyarrow_3lib__Weakrefable __pyx_base;
  std::unique_ptr< arrow::ipc::MessageReader>  reader;
};


/* "pyarrow/ipc.pxi":642
 * 
 * 
 * cdef class _RecordBatchStreamWriter(_CRecordBatchWriter):             # <<<<<<<<<<<<<<
 *     cdef:
 *         CIpcWriteOptions options
*/
struct __pyx_obj_7pyarrow_3lib__RecordBatchStreamWriter {
  struct __pyx_obj_7pyarrow_3lib__CRecordBatchWriter __pyx_base;
   arrow::ipc::IpcWriteOptions options;
  int closed;
};


/* "pyarrow/ipc.pxi":1077
 * 
 * 
 * cdef class _RecordBatchStreamReader(RecordBatchReader):             # <<<<<<<<<<<<<<
 *     cdef:
 *         shared_ptr[CInputStream] in_stream
*/
struct __pyx_obj_7pyarrow_3lib__RecordBatchStreamReader {
  struct __pyx_obj_7pyarrow_3lib_RecordBatchReader __pyx_base;
  std::shared_ptr< arrow::io::InputStream>  in_stream;
   arrow::ipc::IpcReadOptions options;
   arrow::ipc::RecordBatchStreamReader *stream_reader;
};


/* "pyarrow/ipc.pxi":1106
 * 
 * 
 * cdef class _RecordBatchFileWriter(_RecordBatchStreamWriter):             # <<<<<<<<<<<<<<
 * 
 *     def _open(self, sink, Schema schema not None,
*/
struct __pyx_obj_7pyarrow_3lib__RecordBatchFileWriter {
  struct __pyx_obj_7pyarrow_3lib__RecordBatchStreamWriter __pyx_base;
};


/* "pyarrow/ipc.pxi":1147
 * 
 * 
 * cdef class _RecordBatchFileReader(_Weakrefable):             # <<<<<<<<<<<<<<
 *     cdef:
 *         SharedPtrNoGIL[CRecordBatchFileReader] reader
*/
struct __pyx_obj_7pyarrow_3lib__RecordBatchFileReader {
  struct __pyx_obj_7pyarrow_3lib__Weakrefable __pyx_base;
  arrow::py::SharedPtrNoGIL< arrow::ipc::RecordBatchFileReader>  reader;
  std::shared_ptr< arrow::io::RandomAccessFile>  file;
   arrow::ipc::IpcReadOptions options;
  struct __pyx_obj_7pyarrow_3lib_Schema *schema;
};


/* "pyarrow/types.pxi":5506
 * 
 * 
 * def json_(DataType storage_type=utf8()):             # <<<<<<<<<<<<<<
 *     """
 *     Create instance of JSON extension type.
*/
struct __pyx_defaults {
  PyObject_HEAD
  struct __pyx_obj_7pyarrow_3lib_DataType *arg0;
};


/* "pyarrow/types.pxi":1042
 *         return self.type.num_fields()
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterate over struct fields, in order.
*/
struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct____iter__ {
  PyObject_HEAD
  Py_ssize_t __pyx_v_i;
  struct __pyx_obj_7pyarrow_3lib_StructType *__pyx_v_self;
  Py_ssize_t __pyx_t_0;
  Py_ssize_t __pyx_t_1;
  Py_ssize_t __pyx_t_2;
};


/* "pyarrow/types.pxi":1162
 *         return self.type.num_fields()
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterate over union members, in order.
*/
struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_1___iter__ {
  PyObject_HEAD
  Py_ssize_t __pyx_v_i;
  struct __pyx_obj_7pyarrow_3lib_UnionType *__pyx_v_self;
  Py_ssize_t __pyx_t_0;
  Py_ssize_t __pyx_t_1;
  Py_ssize_t __pyx_t_2;
};


/* "pyarrow/types.pxi":2304
 *             other = (__arg0__.items() if isinstance(__arg0__, Mapping)
 *                      else __arg0__)
 *             items.extend((tobytes(k), v) for k, v in other)             # <<<<<<<<<<<<<<
 * 
 *         prior_keys = {k for k, v in items}
*/
struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_2_genexpr {
  PyObject_HEAD
  PyObject *__pyx_genexpr_arg_0;
  PyObject *__pyx_v_k;
  PyObject *__pyx_v_v;
  PyObject *__pyx_t_0;
  Py_ssize_t __pyx_t_1;
  PyObject *(*__pyx_t_2)(PyObject *);
};


/* "pyarrow/types.pxi":2407
 *         return self.metadata.value(i)
 * 
 *     def keys(self):             # <<<<<<<<<<<<<<
 *         for i in range(self.metadata.size()):
 *             yield self.metadata.key(i)
*/
struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_3_keys {
  PyObject_HEAD
  int64_t __pyx_v_i;
  struct __pyx_obj_7pyarrow_3lib_KeyValueMetadata *__pyx_v_self;
  int64_t __pyx_t_0;
  int64_t __pyx_t_1;
  int64_t __pyx_t_2;
};


/* "pyarrow/types.pxi":2411
 *             yield self.metadata.key(i)
 * 
 *     def values(self):             # <<<<<<<<<<<<<<
 *         for i in range(self.metadata.size()):
 *             yield self.metadata.value(i)
*/
struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_4_values {
  PyObject_HEAD
  int64_t __pyx_v_i;
  struct __pyx_obj_7pyarrow_3lib_KeyValueMetadata *__pyx_v_self;
  int64_t __pyx_t_0;
  int64_t __pyx_t_1;
  int64_t __pyx_t_2;
};


/* "pyarrow/types.pxi":2415
 *             yield self.metadata.value(i)
 * 
 *     def items(self):             # <<<<<<<<<<<<<<
 *         for i in range(self.metadata.size()):
 *             yield (self.metadata.key(i), self.metadata.value(i))
*/
struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_5_items {
  PyObject_HEAD
  int64_t __pyx_v_i;
  struct __pyx_obj_7pyarrow_3lib_KeyValueMetadata *__pyx_v_self;
  int64_t __pyx_t_0;
  int64_t __pyx_t_1;
  int64_t __pyx_t_2;
};


/* "pyarrow/types.pxi":2905
 *         return self._field(key)
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         for i in range(len(self)):
 *             yield self[i]
*/
struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_6___iter__ {
  PyObject_HEAD
  Py_ssize_t __pyx_v_i;
  struct __pyx_obj_7pyarrow_3lib_Schema *__pyx_v_self;
  Py_ssize_t __pyx_t_0;
  Py_ssize_t __pyx_t_1;
  Py_ssize_t __pyx_t_2;
};


/* "pyarrow/scalar.pxi":1018
 *         return sp.value.size()
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         cdef:
 *             CStructScalar* sp = <CStructScalar*> self.wrapped.get()
*/
struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_7___iter__ {
  PyObject_HEAD
   arrow::StructType *__pyx_v_dtype;
  std::vector<std::shared_ptr< arrow::Field> >  __pyx_v_fields;
  int __pyx_v_i;
  struct __pyx_obj_7pyarrow_3lib_StructScalar *__pyx_v_self;
   arrow::StructScalar *__pyx_v_sp;
  int __pyx_t_0;
  int __pyx_t_1;
  int __pyx_t_2;
};


/* "pyarrow/scalar.pxi":1027
 *             yield frombytes(fields[i].get().name())
 * 
 *     def items(self):             # <<<<<<<<<<<<<<
 *         return ((key, self[i]) for i, key in enumerate(self))
 * 
*/
struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_8_items {
  PyObject_HEAD
  struct __pyx_obj_7pyarrow_3lib_StructScalar *__pyx_v_self;
};


/* "pyarrow/scalar.pxi":1028
 * 
 *     def items(self):
 *         return ((key, self[i]) for i, key in enumerate(self))             # <<<<<<<<<<<<<<
 * 
 *     def __contains__(self, key):
*/
struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_9_genexpr {
  PyObject_HEAD
  struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_8_items *__pyx_outer_scope;
  struct __pyx_obj_7pyarrow_3lib_StructScalar *__pyx_genexpr_arg_0;
  PyObject *__pyx_v_i;
  PyObject *__pyx_v_key;
  PyObject *__pyx_t_0;
  PyObject *__pyx_t_1;
  Py_ssize_t __pyx_t_2;
  PyObject *(*__pyx_t_3)(PyObject *);
};


/* "pyarrow/scalar.pxi":1137
 *         return (dct[key_field], dct[item_field])
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterate over this element's values.
*/
struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_10___iter__ {
  PyObject_HEAD
  PyObject *__pyx_v_arr;
  PyObject *__pyx_v_k;
  struct __pyx_obj_7pyarrow_3lib_MapScalar *__pyx_v_self;
  PyObject *__pyx_v_v;
  PyObject *__pyx_t_0;
  Py_ssize_t __pyx_t_1;
  PyObject *(*__pyx_t_2)(PyObject *);
};


/* "pyarrow/array.pxi":1409
 *         return super(Array, self).__sizeof__() + self.nbytes
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         self._assert_cpu()
 *         for i in range(len(self)):
*/
struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_11___iter__ {
  PyObject_HEAD
  Py_ssize_t __pyx_v_i;
  struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self;
  Py_ssize_t __pyx_t_0;
  Py_ssize_t __pyx_t_1;
  Py_ssize_t __pyx_t_2;
};


/* "pyarrow/array.pxi":4717
 *                      )
 *                 )
 *             if not all(isinstance(name, str) for name in dim_names):             # <<<<<<<<<<<<<<
 *                 raise TypeError("Each element of dim_names must be a string")
 * 
*/
struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_12_genexpr {
  PyObject_HEAD
  PyObject *__pyx_genexpr_arg_0;
  PyObject *__pyx_v_name;
};


/* "pyarrow/table.pxi":293
 *         return super(ChunkedArray, self).__sizeof__() + self.nbytes
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         for chunk in self.iterchunks():
 *             for item in chunk:
*/
struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_13___iter__ {
  PyObject_HEAD
  PyObject *__pyx_v_chunk;
  PyObject *__pyx_v_item;
  struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_self;
  PyObject *__pyx_t_0;
  PyObject *__pyx_t_1;
  Py_ssize_t __pyx_t_2;
  PyObject *(*__pyx_t_3)(PyObject *);
  Py_ssize_t __pyx_t_4;
  PyObject *(*__pyx_t_5)(PyObject *);
};


/* "pyarrow/table.pxi":1338
 *         return list(self.iterchunks())
 * 
 *     def iterchunks(self):             # <<<<<<<<<<<<<<
 *         """
 *         Convert to an iterator of ChunkArrays.
*/
struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_14_iterchunks {
  PyObject_HEAD
  PyObject *__pyx_v_i;
  struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_self;
  PyObject *__pyx_t_0;
  PyObject *(*__pyx_t_1)(PyObject *);
};


/* "pyarrow/table.pxi":2054
 *                             metadata=metadata)
 * 
 *     def itercolumns(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over all columns in their numerical order.
*/
struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_15_itercolumns {
  PyObject_HEAD
  PyObject *__pyx_v_i;
  struct __pyx_obj_7pyarrow_3lib__Tabular *__pyx_v_self;
  PyObject *__pyx_t_0;
  PyObject *(*__pyx_t_1)(PyObject *);
};


/* "pyarrow/table.pxi":5892
 *         """
 *         if not self._init_is_cpu:
 *             self._is_cpu = all(c.is_cpu for c in self.itercolumns())             # <<<<<<<<<<<<<<
 *             self._init_is_cpu = True
 *         return self._is_cpu
*/
struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_16_genexpr {
  PyObject_HEAD
  PyObject *__pyx_genexpr_arg_0;
  PyObject *__pyx_v_c;
};


/* "pyarrow/tensor.pxi":635
 *     def dim_names(self):
 *         names_tuple = tuple(self.stp.dim_names())
 *         return tuple(frombytes(x) for x in names_tuple)             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_17_genexpr {
  PyObject_HEAD
  PyObject *__pyx_genexpr_arg_0;
  PyObject *__pyx_v_x;
  PyObject *__pyx_t_0;
  Py_ssize_t __pyx_t_1;
};


/* "pyarrow/tensor.pxi":886
 *     def dim_names(self):
 *         names_tuple = tuple(self.stp.dim_names())
 *         return tuple(frombytes(x) for x in names_tuple)             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_18_genexpr {
  PyObject_HEAD
  PyObject *__pyx_genexpr_arg_0;
  PyObject *__pyx_v_x;
  PyObject *__pyx_t_0;
  Py_ssize_t __pyx_t_1;
};


/* "pyarrow/tensor.pxi":1128
 *     def dim_names(self):
 *         names_tuple = tuple(self.stp.dim_names())
 *         return tuple(frombytes(x) for x in names_tuple)             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_19_genexpr {
  PyObject_HEAD
  PyObject *__pyx_genexpr_arg_0;
  PyObject *__pyx_v_x;
  PyObject *__pyx_t_0;
  Py_ssize_t __pyx_t_1;
};


/* "pyarrow/tensor.pxi":1347
 *     def dim_names(self):
 *         names_tuple = tuple(self.stp.dim_names())
 *         return tuple(frombytes(x) for x in names_tuple)             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_20_genexpr {
  PyObject_HEAD
  PyObject *__pyx_genexpr_arg_0;
  PyObject *__pyx_v_x;
  PyObject *__pyx_t_0;
  Py_ssize_t __pyx_t_1;
};


/* "pyarrow/io.pxi":642
 *             self.write(line)
 * 
 *     def download(self, stream_or_path, buffer_size=None):             # <<<<<<<<<<<<<<
 *         """
 *         Read this file completely to a local path or destination stream.
*/
struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_21_download {
  PyObject_HEAD
  PyObject *__pyx_v_cleanup;
  int __pyx_v_done;
  PyObject *__pyx_v_stream;
  PyObject *__pyx_v_write_queue;
};


/* "pyarrow/io.pxi":741
 *             raise exc_info[0], exc_info[1], exc_info[2]
 * 
 *     def _download_nothreads(self, stream_or_path, buffer_size=None):             # <<<<<<<<<<<<<<
 *         """
 *         Internal method to do a download without separate threads, queues etc.
*/
struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_22__download_nothreads {
  PyObject_HEAD
  PyObject *__pyx_v_stream;
};


/* "pyarrow/io.pxi":797
 *             cleanup()
 * 
 *     def upload(self, stream, buffer_size=None):             # <<<<<<<<<<<<<<
 *         """
 *         Write from a source stream to this file.
*/
struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_23_upload {
  PyObject_HEAD
  int __pyx_v_done;
  struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_self;
  PyObject *__pyx_v_write_queue;
};


/* "pyarrow/ipc.pxi":823
 *         return _wrap_record_batch_with_metadata(batch_with_metadata)
 * 
 *     def iter_batches_with_custom_metadata(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterate over record batches from the stream along with their custom
*/
struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_24_iter_batches_with_custom_metadata {
  PyObject_HEAD
  struct __pyx_obj_7pyarrow_3lib_RecordBatchReader *__pyx_v_self;
  PyObject *__pyx_t_0;
  PyObject *__pyx_t_1;
  PyObject *__pyx_t_2;
};



/* "pyarrow/memory.pxi":23
 * 
 * 
 * cdef class MemoryPool(_Weakrefable):             # <<<<<<<<<<<<<<
 *     """
 *     Base class for memory allocation.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_MemoryPool {
  void (*init)(struct __pyx_obj_7pyarrow_3lib_MemoryPool *,  arrow::MemoryPool *);
};
static struct __pyx_vtabstruct_7pyarrow_3lib_MemoryPool *__pyx_vtabptr_7pyarrow_3lib_MemoryPool;


/* "pyarrow/types.pxi":209
 * 
 * 
 * cdef class DataType(_Weakrefable):             # <<<<<<<<<<<<<<
 *     """
 *     Base class of all Arrow data types.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_DataType {
  void (*init)(struct __pyx_obj_7pyarrow_3lib_DataType *, std::shared_ptr< arrow::DataType>  const &);
  struct __pyx_obj_7pyarrow_3lib_Field *(*field)(struct __pyx_obj_7pyarrow_3lib_DataType *, PyObject *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_7pyarrow_3lib_DataType *__pyx_vtabptr_7pyarrow_3lib_DataType;


/* "pyarrow/types.pxi":548
 * 
 * 
 * cdef class ListType(DataType):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for list data types.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_ListType {
  struct __pyx_vtabstruct_7pyarrow_3lib_DataType __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_ListType *__pyx_vtabptr_7pyarrow_3lib_ListType;


/* "pyarrow/types.pxi":595
 * 
 * 
 * cdef class LargeListType(DataType):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for large list data types
*/

struct __pyx_vtabstruct_7pyarrow_3lib_LargeListType {
  struct __pyx_vtabstruct_7pyarrow_3lib_DataType __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_LargeListType *__pyx_vtabptr_7pyarrow_3lib_LargeListType;


/* "pyarrow/types.pxi":634
 * 
 * 
 * cdef class ListViewType(DataType):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for list view data types.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_ListViewType {
  struct __pyx_vtabstruct_7pyarrow_3lib_DataType __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_ListViewType *__pyx_vtabptr_7pyarrow_3lib_ListViewType;


/* "pyarrow/types.pxi":681
 * 
 * 
 * cdef class LargeListViewType(DataType):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for large list view data types
*/

struct __pyx_vtabstruct_7pyarrow_3lib_LargeListViewType {
  struct __pyx_vtabstruct_7pyarrow_3lib_DataType __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_LargeListViewType *__pyx_vtabptr_7pyarrow_3lib_LargeListViewType;


/* "pyarrow/types.pxi":729
 * 
 * 
 * cdef class MapType(DataType):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for map data types.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_MapType {
  struct __pyx_vtabstruct_7pyarrow_3lib_DataType __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_MapType *__pyx_vtabptr_7pyarrow_3lib_MapType;


/* "pyarrow/types.pxi":817
 * 
 * 
 * cdef class FixedSizeListType(DataType):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for fixed size list data types.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_FixedSizeListType {
  struct __pyx_vtabstruct_7pyarrow_3lib_DataType __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_FixedSizeListType *__pyx_vtabptr_7pyarrow_3lib_FixedSizeListType;


/* "pyarrow/types.pxi":877
 * 
 * 
 * cdef class StructType(DataType):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for struct data types.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_StructType {
  struct __pyx_vtabstruct_7pyarrow_3lib_DataType __pyx_base;
  struct __pyx_obj_7pyarrow_3lib_Field *(*field_by_name)(struct __pyx_obj_7pyarrow_3lib_StructType *, PyObject *);
};
static struct __pyx_vtabstruct_7pyarrow_3lib_StructType *__pyx_vtabptr_7pyarrow_3lib_StructType;


/* "pyarrow/types.pxi":485
 * 
 * 
 * cdef class DictionaryType(DataType):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for dictionary data types.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_DictionaryType {
  struct __pyx_vtabstruct_7pyarrow_3lib_DataType __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_DictionaryType *__pyx_vtabptr_7pyarrow_3lib_DictionaryType;


/* "pyarrow/types.pxi":1245
 * 
 * 
 * cdef class TimestampType(DataType):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for timestamp data types.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_TimestampType {
  struct __pyx_vtabstruct_7pyarrow_3lib_DataType __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_TimestampType *__pyx_vtabptr_7pyarrow_3lib_TimestampType;


/* "pyarrow/types.pxi":1303
 * 
 * 
 * cdef class Time32Type(DataType):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for time32 data types.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_Time32Type {
  struct __pyx_vtabstruct_7pyarrow_3lib_DataType __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_Time32Type *__pyx_vtabptr_7pyarrow_3lib_Time32Type;


/* "pyarrow/types.pxi":1338
 * 
 * 
 * cdef class Time64Type(DataType):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for time64 data types.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_Time64Type {
  struct __pyx_vtabstruct_7pyarrow_3lib_DataType __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_Time64Type *__pyx_vtabptr_7pyarrow_3lib_Time64Type;


/* "pyarrow/types.pxi":1373
 * 
 * 
 * cdef class DurationType(DataType):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for duration data types.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_DurationType {
  struct __pyx_vtabstruct_7pyarrow_3lib_DataType __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_DurationType *__pyx_vtabptr_7pyarrow_3lib_DurationType;


/* "pyarrow/types.pxi":1405
 * 
 * 
 * cdef class FixedSizeBinaryType(DataType):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for fixed-size binary data types.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_FixedSizeBinaryType {
  struct __pyx_vtabstruct_7pyarrow_3lib_DataType __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_FixedSizeBinaryType *__pyx_vtabptr_7pyarrow_3lib_FixedSizeBinaryType;


/* "pyarrow/types.pxi":1427
 * 
 * 
 * cdef class Decimal32Type(FixedSizeBinaryType):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for decimal32 data types.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_Decimal32Type {
  struct __pyx_vtabstruct_7pyarrow_3lib_FixedSizeBinaryType __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_Decimal32Type *__pyx_vtabptr_7pyarrow_3lib_Decimal32Type;


/* "pyarrow/types.pxi":1476
 * 
 * 
 * cdef class Decimal64Type(FixedSizeBinaryType):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for decimal64 data types.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_Decimal64Type {
  struct __pyx_vtabstruct_7pyarrow_3lib_FixedSizeBinaryType __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_Decimal64Type *__pyx_vtabptr_7pyarrow_3lib_Decimal64Type;


/* "pyarrow/types.pxi":1525
 * 
 * 
 * cdef class Decimal128Type(FixedSizeBinaryType):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for decimal128 data types.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_Decimal128Type {
  struct __pyx_vtabstruct_7pyarrow_3lib_FixedSizeBinaryType __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_Decimal128Type *__pyx_vtabptr_7pyarrow_3lib_Decimal128Type;


/* "pyarrow/types.pxi":1574
 * 
 * 
 * cdef class Decimal256Type(FixedSizeBinaryType):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for decimal256 data types.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_Decimal256Type {
  struct __pyx_vtabstruct_7pyarrow_3lib_FixedSizeBinaryType __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_Decimal256Type *__pyx_vtabptr_7pyarrow_3lib_Decimal256Type;


/* "pyarrow/types.pxi":1623
 * 
 * 
 * cdef class RunEndEncodedType(DataType):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for run-end encoded types.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_RunEndEncodedType {
  struct __pyx_vtabstruct_7pyarrow_3lib_DataType __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_RunEndEncodedType *__pyx_vtabptr_7pyarrow_3lib_RunEndEncodedType;


/* "pyarrow/types.pxi":1644
 * 
 * 
 * cdef class BaseExtensionType(DataType):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete base class for extension types.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_BaseExtensionType {
  struct __pyx_vtabstruct_7pyarrow_3lib_DataType __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_BaseExtensionType *__pyx_vtabptr_7pyarrow_3lib_BaseExtensionType;


/* "pyarrow/types.pxi":1737
 * 
 * 
 * cdef class ExtensionType(BaseExtensionType):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete base class for Python-defined extension types.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_ExtensionType {
  struct __pyx_vtabstruct_7pyarrow_3lib_BaseExtensionType __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_ExtensionType *__pyx_vtabptr_7pyarrow_3lib_ExtensionType;


/* "pyarrow/types.pxi":1991
 * 
 * 
 * cdef class FixedShapeTensorType(BaseExtensionType):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for fixed shape tensor extension type.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_FixedShapeTensorType {
  struct __pyx_vtabstruct_7pyarrow_3lib_BaseExtensionType __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_FixedShapeTensorType *__pyx_vtabptr_7pyarrow_3lib_FixedShapeTensorType;


/* "pyarrow/types.pxi":2063
 * 
 * 
 * cdef class Bool8Type(BaseExtensionType):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for bool8 extension type.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_Bool8Type {
  struct __pyx_vtabstruct_7pyarrow_3lib_BaseExtensionType __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_Bool8Type *__pyx_vtabptr_7pyarrow_3lib_Bool8Type;


/* "pyarrow/types.pxi":2094
 * 
 * 
 * cdef class OpaqueType(BaseExtensionType):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for opaque extension type.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_OpaqueType {
  struct __pyx_vtabstruct_7pyarrow_3lib_BaseExtensionType __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_OpaqueType *__pyx_vtabptr_7pyarrow_3lib_OpaqueType;


/* "pyarrow/types.pxi":1972
 * 
 * 
 * cdef class UuidType(BaseExtensionType):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for UUID extension type.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_UuidType {
  struct __pyx_vtabstruct_7pyarrow_3lib_BaseExtensionType __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_UuidType *__pyx_vtabptr_7pyarrow_3lib_UuidType;


/* "pyarrow/types.pxi":1935
 * 
 * 
 * cdef class JsonType(BaseExtensionType):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for JSON extension type.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_JsonType {
  struct __pyx_vtabstruct_7pyarrow_3lib_BaseExtensionType __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_JsonType *__pyx_vtabptr_7pyarrow_3lib_JsonType;


/* "pyarrow/types.pxi":2283
 * 
 * 
 * cdef class KeyValueMetadata(_Metadata, Mapping):             # <<<<<<<<<<<<<<
 *     """
 *     KeyValueMetadata
*/

struct __pyx_vtabstruct_7pyarrow_3lib_KeyValueMetadata {
  void (*init)(struct __pyx_obj_7pyarrow_3lib_KeyValueMetadata *, std::shared_ptr< arrow::KeyValueMetadata const >  const &);
  PyObject *(*wrap)(std::shared_ptr< arrow::KeyValueMetadata const >  const &);
  std::shared_ptr< arrow::KeyValueMetadata const >  (*unwrap)(struct __pyx_obj_7pyarrow_3lib_KeyValueMetadata *);
};
static struct __pyx_vtabstruct_7pyarrow_3lib_KeyValueMetadata *__pyx_vtabptr_7pyarrow_3lib_KeyValueMetadata;
static CYTHON_INLINE std::shared_ptr< arrow::KeyValueMetadata const >  __pyx_f_7pyarrow_3lib_16KeyValueMetadata_unwrap(struct __pyx_obj_7pyarrow_3lib_KeyValueMetadata *);


/* "pyarrow/types.pxi":2455
 * 
 * 
 * cdef class Field(_Weakrefable):             # <<<<<<<<<<<<<<
 *     """
 *     A named field, with a data type, nullability, and optional metadata.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_Field {
  void (*init)(struct __pyx_obj_7pyarrow_3lib_Field *, std::shared_ptr< arrow::Field>  const &);
};
static struct __pyx_vtabstruct_7pyarrow_3lib_Field *__pyx_vtabptr_7pyarrow_3lib_Field;


/* "pyarrow/types.pxi":2853
 * 
 * 
 * cdef class Schema(_Weakrefable):             # <<<<<<<<<<<<<<
 *     """
 *     A named collection of types a.k.a schema. A schema defines the
*/

struct __pyx_vtabstruct_7pyarrow_3lib_Schema {
  void (*init)(struct __pyx_obj_7pyarrow_3lib_Schema *, std::vector<std::shared_ptr< arrow::Field> >  const &);
  void (*init_schema)(struct __pyx_obj_7pyarrow_3lib_Schema *, std::shared_ptr< arrow::Schema>  const &);
};
static struct __pyx_vtabstruct_7pyarrow_3lib_Schema *__pyx_vtabptr_7pyarrow_3lib_Schema;


/* "pyarrow/scalar.pxi":24
 * 
 * 
 * cdef class Scalar(_Weakrefable):             # <<<<<<<<<<<<<<
 *     """
 *     The base class for scalars.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_Scalar {
  void (*init)(struct __pyx_obj_7pyarrow_3lib_Scalar *, std::shared_ptr< arrow::Scalar>  const &);
  PyObject *(*wrap)(std::shared_ptr< arrow::Scalar>  const &);
  std::shared_ptr< arrow::Scalar>  (*unwrap)(struct __pyx_obj_7pyarrow_3lib_Scalar *);
};
static struct __pyx_vtabstruct_7pyarrow_3lib_Scalar *__pyx_vtabptr_7pyarrow_3lib_Scalar;
static CYTHON_INLINE std::shared_ptr< arrow::Scalar>  __pyx_f_7pyarrow_3lib_6Scalar_unwrap(struct __pyx_obj_7pyarrow_3lib_Scalar *);


/* "pyarrow/array.pxi":743
 * 
 * 
 * cdef class ArrayStatistics(_Weakrefable):             # <<<<<<<<<<<<<<
 *     """
 *     The class for statistics of an array.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_ArrayStatistics {
  void (*init)(struct __pyx_obj_7pyarrow_3lib_ArrayStatistics *, std::shared_ptr< arrow::ArrayStatistics>  const &);
  PyObject *(*_get_value)(struct __pyx_obj_7pyarrow_3lib_ArrayStatistics *, std::optional< std::variant<bool, int64_t, uint64_t, double, std::string>>  const &);
};
static struct __pyx_vtabstruct_7pyarrow_3lib_ArrayStatistics *__pyx_vtabptr_7pyarrow_3lib_ArrayStatistics;


/* "pyarrow/array.pxi":1083
 * 
 * 
 * cdef class Array(_PandasConvertible):             # <<<<<<<<<<<<<<
 *     """
 *     The base class for all Arrow arrays.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_Array {
  void (*init)(struct __pyx_obj_7pyarrow_3lib_Array *, std::shared_ptr< arrow::Array>  const &);
  PyObject *(*getitem)(struct __pyx_obj_7pyarrow_3lib_Array *, int64_t);
  int64_t (*length)(struct __pyx_obj_7pyarrow_3lib_Array *);
  void (*_assert_cpu)(struct __pyx_obj_7pyarrow_3lib_Array *);
};
static struct __pyx_vtabstruct_7pyarrow_3lib_Array *__pyx_vtabptr_7pyarrow_3lib_Array;


/* "pyarrow/tensor.pxi":22
 * 
 * 
 * cdef class Tensor(_Weakrefable):             # <<<<<<<<<<<<<<
 *     """
 *     A n-dimensional array a.k.a Tensor.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_Tensor {
  void (*init)(struct __pyx_obj_7pyarrow_3lib_Tensor *, std::shared_ptr< arrow::Tensor>  const &);
};
static struct __pyx_vtabstruct_7pyarrow_3lib_Tensor *__pyx_vtabptr_7pyarrow_3lib_Tensor;


/* "pyarrow/tensor.pxi":651
 *         return True
 * 
 * cdef class SparseCSRMatrix(_Weakrefable):             # <<<<<<<<<<<<<<
 *     """
 *     A sparse CSR matrix.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_SparseCSRMatrix {
  void (*init)(struct __pyx_obj_7pyarrow_3lib_SparseCSRMatrix *, std::shared_ptr< arrow::SparseCSRMatrix>  const &);
};
static struct __pyx_vtabstruct_7pyarrow_3lib_SparseCSRMatrix *__pyx_vtabptr_7pyarrow_3lib_SparseCSRMatrix;


/* "pyarrow/tensor.pxi":892
 *         return self.stp.non_zero_length()
 * 
 * cdef class SparseCSCMatrix(_Weakrefable):             # <<<<<<<<<<<<<<
 *     """
 *     A sparse CSC matrix.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_SparseCSCMatrix {
  void (*init)(struct __pyx_obj_7pyarrow_3lib_SparseCSCMatrix *, std::shared_ptr< arrow::SparseCSCMatrix>  const &);
};
static struct __pyx_vtabstruct_7pyarrow_3lib_SparseCSCMatrix *__pyx_vtabptr_7pyarrow_3lib_SparseCSCMatrix;


/* "pyarrow/tensor.pxi":346
 * 
 * 
 * cdef class SparseCOOTensor(_Weakrefable):             # <<<<<<<<<<<<<<
 *     """
 *     A sparse COO tensor.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_SparseCOOTensor {
  void (*init)(struct __pyx_obj_7pyarrow_3lib_SparseCOOTensor *, std::shared_ptr< arrow::SparseCOOTensor>  const &);
};
static struct __pyx_vtabstruct_7pyarrow_3lib_SparseCOOTensor *__pyx_vtabptr_7pyarrow_3lib_SparseCOOTensor;


/* "pyarrow/tensor.pxi":1135
 * 
 * 
 * cdef class SparseCSFTensor(_Weakrefable):             # <<<<<<<<<<<<<<
 *     """
 *     A sparse CSF tensor.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_SparseCSFTensor {
  void (*init)(struct __pyx_obj_7pyarrow_3lib_SparseCSFTensor *, std::shared_ptr< arrow::SparseCSFTensor>  const &);
};
static struct __pyx_vtabstruct_7pyarrow_3lib_SparseCSFTensor *__pyx_vtabptr_7pyarrow_3lib_SparseCSFTensor;


/* "pyarrow/array.pxi":2337
 * 
 * 
 * cdef class NullArray(Array):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for Arrow arrays of null data type.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_NullArray {
  struct __pyx_vtabstruct_7pyarrow_3lib_Array __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_NullArray *__pyx_vtabptr_7pyarrow_3lib_NullArray;


/* "pyarrow/array.pxi":2343
 * 
 * 
 * cdef class BooleanArray(Array):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for Arrow arrays of boolean data type.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_BooleanArray {
  struct __pyx_vtabstruct_7pyarrow_3lib_Array __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_BooleanArray *__pyx_vtabptr_7pyarrow_3lib_BooleanArray;


/* "pyarrow/array.pxi":2356
 * 
 * 
 * cdef class NumericArray(Array):             # <<<<<<<<<<<<<<
 *     """
 *     A base class for Arrow numeric arrays.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_NumericArray {
  struct __pyx_vtabstruct_7pyarrow_3lib_Array __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_NumericArray *__pyx_vtabptr_7pyarrow_3lib_NumericArray;


/* "pyarrow/array.pxi":2362
 * 
 * 
 * cdef class IntegerArray(NumericArray):             # <<<<<<<<<<<<<<
 *     """
 *     A base class for Arrow integer arrays.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_IntegerArray {
  struct __pyx_vtabstruct_7pyarrow_3lib_NumericArray __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_IntegerArray *__pyx_vtabptr_7pyarrow_3lib_IntegerArray;


/* "pyarrow/array.pxi":2368
 * 
 * 
 * cdef class FloatingPointArray(NumericArray):             # <<<<<<<<<<<<<<
 *     """
 *     A base class for Arrow floating-point arrays.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_FloatingPointArray {
  struct __pyx_vtabstruct_7pyarrow_3lib_NumericArray __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_FloatingPointArray *__pyx_vtabptr_7pyarrow_3lib_FloatingPointArray;


/* "pyarrow/array.pxi":2374
 * 
 * 
 * cdef class Int8Array(IntegerArray):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for Arrow arrays of int8 data type.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_Int8Array {
  struct __pyx_vtabstruct_7pyarrow_3lib_IntegerArray __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_Int8Array *__pyx_vtabptr_7pyarrow_3lib_Int8Array;


/* "pyarrow/array.pxi":2380
 * 
 * 
 * cdef class UInt8Array(IntegerArray):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for Arrow arrays of uint8 data type.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_UInt8Array {
  struct __pyx_vtabstruct_7pyarrow_3lib_IntegerArray __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_UInt8Array *__pyx_vtabptr_7pyarrow_3lib_UInt8Array;


/* "pyarrow/array.pxi":2386
 * 
 * 
 * cdef class Int16Array(IntegerArray):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for Arrow arrays of int16 data type.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_Int16Array {
  struct __pyx_vtabstruct_7pyarrow_3lib_IntegerArray __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_Int16Array *__pyx_vtabptr_7pyarrow_3lib_Int16Array;


/* "pyarrow/array.pxi":2392
 * 
 * 
 * cdef class UInt16Array(IntegerArray):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for Arrow arrays of uint16 data type.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_UInt16Array {
  struct __pyx_vtabstruct_7pyarrow_3lib_IntegerArray __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_UInt16Array *__pyx_vtabptr_7pyarrow_3lib_UInt16Array;


/* "pyarrow/array.pxi":2398
 * 
 * 
 * cdef class Int32Array(IntegerArray):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for Arrow arrays of int32 data type.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_Int32Array {
  struct __pyx_vtabstruct_7pyarrow_3lib_IntegerArray __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_Int32Array *__pyx_vtabptr_7pyarrow_3lib_Int32Array;


/* "pyarrow/array.pxi":2404
 * 
 * 
 * cdef class UInt32Array(IntegerArray):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for Arrow arrays of uint32 data type.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_UInt32Array {
  struct __pyx_vtabstruct_7pyarrow_3lib_IntegerArray __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_UInt32Array *__pyx_vtabptr_7pyarrow_3lib_UInt32Array;


/* "pyarrow/array.pxi":2410
 * 
 * 
 * cdef class Int64Array(IntegerArray):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for Arrow arrays of int64 data type.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_Int64Array {
  struct __pyx_vtabstruct_7pyarrow_3lib_IntegerArray __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_Int64Array *__pyx_vtabptr_7pyarrow_3lib_Int64Array;


/* "pyarrow/array.pxi":2416
 * 
 * 
 * cdef class UInt64Array(IntegerArray):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for Arrow arrays of uint64 data type.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_UInt64Array {
  struct __pyx_vtabstruct_7pyarrow_3lib_IntegerArray __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_UInt64Array *__pyx_vtabptr_7pyarrow_3lib_UInt64Array;


/* "pyarrow/array.pxi":2489
 * 
 * 
 * cdef class HalfFloatArray(FloatingPointArray):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for Arrow arrays of float16 data type.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_HalfFloatArray {
  struct __pyx_vtabstruct_7pyarrow_3lib_FloatingPointArray __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_HalfFloatArray *__pyx_vtabptr_7pyarrow_3lib_HalfFloatArray;


/* "pyarrow/array.pxi":2495
 * 
 * 
 * cdef class FloatArray(FloatingPointArray):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for Arrow arrays of float32 data type.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_FloatArray {
  struct __pyx_vtabstruct_7pyarrow_3lib_FloatingPointArray __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_FloatArray *__pyx_vtabptr_7pyarrow_3lib_FloatArray;


/* "pyarrow/array.pxi":2501
 * 
 * 
 * cdef class DoubleArray(FloatingPointArray):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for Arrow arrays of float64 data type.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_DoubleArray {
  struct __pyx_vtabstruct_7pyarrow_3lib_FloatingPointArray __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_DoubleArray *__pyx_vtabptr_7pyarrow_3lib_DoubleArray;


/* "pyarrow/array.pxi":2507
 * 
 * 
 * cdef class FixedSizeBinaryArray(Array):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for Arrow arrays of a fixed-size binary data type.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_FixedSizeBinaryArray {
  struct __pyx_vtabstruct_7pyarrow_3lib_Array __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_FixedSizeBinaryArray *__pyx_vtabptr_7pyarrow_3lib_FixedSizeBinaryArray;


/* "pyarrow/lib.pxd":422
 * 
 * 
 * cdef class Decimal32Array(FixedSizeBinaryArray):             # <<<<<<<<<<<<<<
 *     pass
 * 
*/

struct __pyx_vtabstruct_7pyarrow_3lib_Decimal32Array {
  struct __pyx_vtabstruct_7pyarrow_3lib_FixedSizeBinaryArray __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_Decimal32Array *__pyx_vtabptr_7pyarrow_3lib_Decimal32Array;


/* "pyarrow/array.pxi":2517
 *     """
 * 
 * cdef class Decimal64Array(FixedSizeBinaryArray):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for Arrow arrays of decimal64 data type.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_Decimal64Array {
  struct __pyx_vtabstruct_7pyarrow_3lib_FixedSizeBinaryArray __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_Decimal64Array *__pyx_vtabptr_7pyarrow_3lib_Decimal64Array;


/* "pyarrow/array.pxi":2522
 *     """
 * 
 * cdef class Decimal128Array(FixedSizeBinaryArray):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for Arrow arrays of decimal128 data type.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_Decimal128Array {
  struct __pyx_vtabstruct_7pyarrow_3lib_FixedSizeBinaryArray __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_Decimal128Array *__pyx_vtabptr_7pyarrow_3lib_Decimal128Array;


/* "pyarrow/array.pxi":2528
 * 
 * 
 * cdef class Decimal256Array(FixedSizeBinaryArray):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for Arrow arrays of decimal256 data type.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_Decimal256Array {
  struct __pyx_vtabstruct_7pyarrow_3lib_FixedSizeBinaryArray __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_Decimal256Array *__pyx_vtabptr_7pyarrow_3lib_Decimal256Array;


/* "pyarrow/array.pxi":4126
 * 
 * 
 * cdef class StructArray(Array):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for Arrow arrays of a struct data type.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_StructArray {
  struct __pyx_vtabstruct_7pyarrow_3lib_Array __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_StructArray *__pyx_vtabptr_7pyarrow_3lib_StructArray;


/* "pyarrow/array.pxi":2533
 *     """
 * 
 * cdef class BaseListArray(Array):             # <<<<<<<<<<<<<<
 * 
 *     def flatten(self, recursive=False):
*/

struct __pyx_vtabstruct_7pyarrow_3lib_BaseListArray {
  struct __pyx_vtabstruct_7pyarrow_3lib_Array __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_BaseListArray *__pyx_vtabptr_7pyarrow_3lib_BaseListArray;


/* "pyarrow/array.pxi":2673
 * 
 * 
 * cdef class ListArray(BaseListArray):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for Arrow arrays of a list data type.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_ListArray {
  struct __pyx_vtabstruct_7pyarrow_3lib_BaseListArray __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_ListArray *__pyx_vtabptr_7pyarrow_3lib_ListArray;


/* "pyarrow/array.pxi":2856
 * 
 * 
 * cdef class LargeListArray(BaseListArray):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for Arrow arrays of a large list data type.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_LargeListArray {
  struct __pyx_vtabstruct_7pyarrow_3lib_BaseListArray __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_LargeListArray *__pyx_vtabptr_7pyarrow_3lib_LargeListArray;


/* "pyarrow/array.pxi":2998
 * 
 * 
 * cdef class ListViewArray(BaseListArray):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for Arrow arrays of a list view data type.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_ListViewArray {
  struct __pyx_vtabstruct_7pyarrow_3lib_BaseListArray __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_ListViewArray *__pyx_vtabptr_7pyarrow_3lib_ListViewArray;


/* "pyarrow/array.pxi":3219
 * 
 * 
 * cdef class LargeListViewArray(BaseListArray):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for Arrow arrays of a large list view data type.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_LargeListViewArray {
  struct __pyx_vtabstruct_7pyarrow_3lib_BaseListArray __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_LargeListViewArray *__pyx_vtabptr_7pyarrow_3lib_LargeListViewArray;


/* "pyarrow/array.pxi":3448
 * 
 * 
 * cdef class MapArray(ListArray):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for Arrow arrays of a map data type.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_MapArray {
  struct __pyx_vtabstruct_7pyarrow_3lib_ListArray __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_MapArray *__pyx_vtabptr_7pyarrow_3lib_MapArray;


/* "pyarrow/array.pxi":3585
 * 
 * 
 * cdef class FixedSizeListArray(BaseListArray):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for Arrow arrays of a fixed size list data type.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_FixedSizeListArray {
  struct __pyx_vtabstruct_7pyarrow_3lib_BaseListArray __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_FixedSizeListArray *__pyx_vtabptr_7pyarrow_3lib_FixedSizeListArray;


/* "pyarrow/array.pxi":3717
 * 
 * 
 * cdef class UnionArray(Array):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for Arrow arrays of a Union data type.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_UnionArray {
  struct __pyx_vtabstruct_7pyarrow_3lib_Array __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_UnionArray *__pyx_vtabptr_7pyarrow_3lib_UnionArray;


/* "pyarrow/array.pxi":3871
 * 
 * 
 * cdef class StringArray(Array):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for Arrow arrays of string (or utf8) data type.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_StringArray {
  struct __pyx_vtabstruct_7pyarrow_3lib_Array __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_StringArray *__pyx_vtabptr_7pyarrow_3lib_StringArray;


/* "pyarrow/array.pxi":3941
 * 
 * 
 * cdef class BinaryArray(Array):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for Arrow arrays of variable-sized binary data type.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_BinaryArray {
  struct __pyx_vtabstruct_7pyarrow_3lib_Array __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_BinaryArray *__pyx_vtabptr_7pyarrow_3lib_BinaryArray;


/* "pyarrow/array.pxi":3935
 * 
 * 
 * cdef class StringViewArray(Array):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for Arrow arrays of string (or utf8) view data type.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_StringViewArray {
  struct __pyx_vtabstruct_7pyarrow_3lib_Array __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_StringViewArray *__pyx_vtabptr_7pyarrow_3lib_StringViewArray;


/* "pyarrow/array.pxi":3967
 * 
 * 
 * cdef class BinaryViewArray(Array):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for Arrow arrays of variable-sized binary view data type.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_BinaryViewArray {
  struct __pyx_vtabstruct_7pyarrow_3lib_Array __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_BinaryViewArray *__pyx_vtabptr_7pyarrow_3lib_BinaryViewArray;


/* "pyarrow/array.pxi":3973
 * 
 * 
 * cdef class DictionaryArray(Array):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for dictionary-encoded Arrow arrays.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_DictionaryArray {
  struct __pyx_vtabstruct_7pyarrow_3lib_Array __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_DictionaryArray *__pyx_vtabptr_7pyarrow_3lib_DictionaryArray;


/* "pyarrow/array.pxi":4502
 * 
 * 
 * cdef class ExtensionArray(Array):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for Arrow extension arrays.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_ExtensionArray {
  struct __pyx_vtabstruct_7pyarrow_3lib_Array __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_ExtensionArray *__pyx_vtabptr_7pyarrow_3lib_ExtensionArray;


/* "pyarrow/array.pxi":2458
 * 
 * 
 * cdef class MonthDayNanoIntervalArray(Array):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for Arrow arrays of interval[MonthDayNano] type.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_MonthDayNanoIntervalArray {
  struct __pyx_vtabstruct_7pyarrow_3lib_Array __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_MonthDayNanoIntervalArray *__pyx_vtabptr_7pyarrow_3lib_MonthDayNanoIntervalArray;


/* "pyarrow/table.pxi":24
 * from cython import sizeof
 * 
 * cdef class ChunkedArray(_PandasConvertible):             # <<<<<<<<<<<<<<
 *     """
 *     An array-like composed from a (possibly empty) collection of pyarrow.Arrays
*/

struct __pyx_vtabstruct_7pyarrow_3lib_ChunkedArray {
  void (*init)(struct __pyx_obj_7pyarrow_3lib_ChunkedArray *, std::shared_ptr< arrow::ChunkedArray>  const &);
  PyObject *(*getitem)(struct __pyx_obj_7pyarrow_3lib_ChunkedArray *, int64_t);
};
static struct __pyx_vtabstruct_7pyarrow_3lib_ChunkedArray *__pyx_vtabptr_7pyarrow_3lib_ChunkedArray;


/* "pyarrow/table.pxi":1630
 *     return converted_arrays
 * 
 * cdef class _Tabular(_PandasConvertible):             # <<<<<<<<<<<<<<
 *     """Internal: An interface for common operations on tabular objects."""
 * 
*/

struct __pyx_vtabstruct_7pyarrow_3lib__Tabular {
  void (*_assert_cpu)(struct __pyx_obj_7pyarrow_3lib__Tabular *);
};
static struct __pyx_vtabstruct_7pyarrow_3lib__Tabular *__pyx_vtabptr_7pyarrow_3lib__Tabular;


/* "pyarrow/table.pxi":4112
 * 
 * 
 * cdef class Table(_Tabular):             # <<<<<<<<<<<<<<
 *     """
 *     A collection of top-level named, equal length Arrow arrays.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_Table {
  struct __pyx_vtabstruct_7pyarrow_3lib__Tabular __pyx_base;
  void (*init)(struct __pyx_obj_7pyarrow_3lib_Table *, std::shared_ptr< arrow::Table>  const &);
};
static struct __pyx_vtabstruct_7pyarrow_3lib_Table *__pyx_vtabptr_7pyarrow_3lib_Table;


/* "pyarrow/table.pxi":2500
 * 
 * 
 * cdef class RecordBatch(_Tabular):             # <<<<<<<<<<<<<<
 *     """
 *     Batch of rows of columns of equal length
*/

struct __pyx_vtabstruct_7pyarrow_3lib_RecordBatch {
  struct __pyx_vtabstruct_7pyarrow_3lib__Tabular __pyx_base;
  void (*init)(struct __pyx_obj_7pyarrow_3lib_RecordBatch *, std::shared_ptr< arrow::RecordBatch>  const &);
};
static struct __pyx_vtabstruct_7pyarrow_3lib_RecordBatch *__pyx_vtabptr_7pyarrow_3lib_RecordBatch;


/* "pyarrow/device.pxi":44
 * 
 * 
 * cdef class Device(_Weakrefable):             # <<<<<<<<<<<<<<
 *     """
 *     Abstract interface for hardware devices
*/

struct __pyx_vtabstruct_7pyarrow_3lib_Device {
  void (*init)(struct __pyx_obj_7pyarrow_3lib_Device *, std::shared_ptr< arrow::Device>  const &);
  PyObject *(*wrap)(std::shared_ptr< arrow::Device>  const &);
  std::shared_ptr< arrow::Device>  (*unwrap)(struct __pyx_obj_7pyarrow_3lib_Device *);
};
static struct __pyx_vtabstruct_7pyarrow_3lib_Device *__pyx_vtabptr_7pyarrow_3lib_Device;
static CYTHON_INLINE std::shared_ptr< arrow::Device>  __pyx_f_7pyarrow_3lib_6Device_unwrap(struct __pyx_obj_7pyarrow_3lib_Device *);


/* "pyarrow/device.pxi":113
 * 
 * 
 * cdef class MemoryManager(_Weakrefable):             # <<<<<<<<<<<<<<
 *     """
 *     An object that provides memory management primitives.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_MemoryManager {
  void (*init)(struct __pyx_obj_7pyarrow_3lib_MemoryManager *, std::shared_ptr< arrow::MemoryManager>  const &);
  PyObject *(*wrap)(std::shared_ptr< arrow::MemoryManager>  const &);
  std::shared_ptr< arrow::MemoryManager>  (*unwrap)(struct __pyx_obj_7pyarrow_3lib_MemoryManager *);
};
static struct __pyx_vtabstruct_7pyarrow_3lib_MemoryManager *__pyx_vtabptr_7pyarrow_3lib_MemoryManager;
static CYTHON_INLINE std::shared_ptr< arrow::MemoryManager>  __pyx_f_7pyarrow_3lib_13MemoryManager_unwrap(struct __pyx_obj_7pyarrow_3lib_MemoryManager *);


/* "pyarrow/io.pxi":1334
 * 
 * 
 * cdef class Buffer(_Weakrefable):             # <<<<<<<<<<<<<<
 *     """
 *     The base class for all Arrow buffers.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_Buffer {
  void (*init)(struct __pyx_obj_7pyarrow_3lib_Buffer *, std::shared_ptr< arrow::Buffer>  const &);
  PyObject *(*getitem)(struct __pyx_obj_7pyarrow_3lib_Buffer *, int64_t);
};
static struct __pyx_vtabstruct_7pyarrow_3lib_Buffer *__pyx_vtabptr_7pyarrow_3lib_Buffer;


/* "pyarrow/io.pxi":1583
 * 
 * 
 * cdef class ResizableBuffer(Buffer):             # <<<<<<<<<<<<<<
 *     """
 *     A base class for buffers that can be resized.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_ResizableBuffer {
  struct __pyx_vtabstruct_7pyarrow_3lib_Buffer __pyx_base;
  void (*init_rz)(struct __pyx_obj_7pyarrow_3lib_ResizableBuffer *, std::shared_ptr< arrow::ResizableBuffer>  const &);
};
static struct __pyx_vtabstruct_7pyarrow_3lib_ResizableBuffer *__pyx_vtabptr_7pyarrow_3lib_ResizableBuffer;


/* "pyarrow/io.pxi":101
 * 
 * 
 * cdef class NativeFile(_Weakrefable):             # <<<<<<<<<<<<<<
 *     """
 *     The base class for all Arrow streams.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_NativeFile {
  PyObject *(*set_random_access_file)(struct __pyx_obj_7pyarrow_3lib_NativeFile *, std::shared_ptr< arrow::io::RandomAccessFile> );
  PyObject *(*set_input_stream)(struct __pyx_obj_7pyarrow_3lib_NativeFile *, std::shared_ptr< arrow::io::InputStream> );
  PyObject *(*set_output_stream)(struct __pyx_obj_7pyarrow_3lib_NativeFile *, std::shared_ptr< arrow::io::OutputStream> );
  std::shared_ptr< arrow::io::RandomAccessFile>  (*get_random_access_file)(struct __pyx_obj_7pyarrow_3lib_NativeFile *);
  std::shared_ptr< arrow::io::InputStream>  (*get_input_stream)(struct __pyx_obj_7pyarrow_3lib_NativeFile *);
  std::shared_ptr< arrow::io::OutputStream>  (*get_output_stream)(struct __pyx_obj_7pyarrow_3lib_NativeFile *);
};
static struct __pyx_vtabstruct_7pyarrow_3lib_NativeFile *__pyx_vtabptr_7pyarrow_3lib_NativeFile;


/* "pyarrow/io.pxi":1845
 * 
 * 
 * cdef class BufferedInputStream(NativeFile):             # <<<<<<<<<<<<<<
 *     """
 *     An input stream that performs buffered reads from
*/

struct __pyx_vtabstruct_7pyarrow_3lib_BufferedInputStream {
  struct __pyx_vtabstruct_7pyarrow_3lib_NativeFile __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_BufferedInputStream *__pyx_vtabptr_7pyarrow_3lib_BufferedInputStream;


/* "pyarrow/io.pxi":1909
 * 
 * 
 * cdef class BufferedOutputStream(NativeFile):             # <<<<<<<<<<<<<<
 *     """
 *     An output stream that performs buffered reads from
*/

struct __pyx_vtabstruct_7pyarrow_3lib_BufferedOutputStream {
  struct __pyx_vtabstruct_7pyarrow_3lib_NativeFile __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_BufferedOutputStream *__pyx_vtabptr_7pyarrow_3lib_BufferedOutputStream;


/* "pyarrow/io.pxi":1746
 * 
 * 
 * cdef class CompressedInputStream(NativeFile):             # <<<<<<<<<<<<<<
 *     """
 *     An input stream wrapper which decompresses data on the fly.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_CompressedInputStream {
  struct __pyx_vtabstruct_7pyarrow_3lib_NativeFile __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_CompressedInputStream *__pyx_vtabptr_7pyarrow_3lib_CompressedInputStream;


/* "pyarrow/io.pxi":1803
 * 
 * 
 * cdef class CompressedOutputStream(NativeFile):             # <<<<<<<<<<<<<<
 *     """
 *     An output stream wrapper which compresses data on the fly.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_CompressedOutputStream {
  struct __pyx_vtabstruct_7pyarrow_3lib_NativeFile __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_CompressedOutputStream *__pyx_vtabptr_7pyarrow_3lib_CompressedOutputStream;


/* "pyarrow/io.pxi":2249
 * 
 * 
 * cdef class CacheOptions(_Weakrefable):             # <<<<<<<<<<<<<<
 *     """
 *     Cache options for a pre-buffered fragment scan.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_CacheOptions {
  void (*init)(struct __pyx_obj_7pyarrow_3lib_CacheOptions *, arrow::io::CacheOptions);
  arrow::io::CacheOptions (*unwrap)(struct __pyx_obj_7pyarrow_3lib_CacheOptions *);
  PyObject *(*wrap)(arrow::io::CacheOptions const );
};
static struct __pyx_vtabstruct_7pyarrow_3lib_CacheOptions *__pyx_vtabptr_7pyarrow_3lib_CacheOptions;
static CYTHON_INLINE arrow::io::CacheOptions __pyx_f_7pyarrow_3lib_12CacheOptions_unwrap(struct __pyx_obj_7pyarrow_3lib_CacheOptions *);


/* "pyarrow/io.pxi":2382
 * 
 * 
 * cdef class Codec(_Weakrefable):             # <<<<<<<<<<<<<<
 *     """
 *     Compression codec.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_Codec {
   arrow::util::Codec *(*unwrap)(struct __pyx_obj_7pyarrow_3lib_Codec *);
};
static struct __pyx_vtabstruct_7pyarrow_3lib_Codec *__pyx_vtabptr_7pyarrow_3lib_Codec;
static CYTHON_INLINE  arrow::util::Codec *__pyx_f_7pyarrow_3lib_5Codec_unwrap(struct __pyx_obj_7pyarrow_3lib_Codec *);


/* "pyarrow/error.pxi":161
 * 
 * 
 * cdef class StopToken:             # <<<<<<<<<<<<<<
 *     cdef void init(self, CStopToken stop_token):
 *         self.stop_token = move(stop_token)
*/

struct __pyx_vtabstruct_7pyarrow_3lib_StopToken {
  void (*init)(struct __pyx_obj_7pyarrow_3lib_StopToken *, arrow::StopToken);
};
static struct __pyx_vtabstruct_7pyarrow_3lib_StopToken *__pyx_vtabptr_7pyarrow_3lib_StopToken;


/* "pyarrow/pandas-shim.pxi":24
 * 
 * 
 * cdef class _PandasAPIShim(object):             # <<<<<<<<<<<<<<
 *     """
 *     Lazy pandas importer that isolates usages of pandas APIs and avoids
*/

struct __pyx_vtabstruct_7pyarrow_3lib__PandasAPIShim {
  PyObject *(*_import_pandas)(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *, int);
  PyObject *(*_check_import)(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *, struct __pyx_opt_args_7pyarrow_3lib_14_PandasAPIShim__check_import *__pyx_optional_args);
  int (*_have_pandas_internal)(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *);
  PyObject *(*infer_dtype)(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*pandas_dtype)(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*is_array_like)(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*is_categorical)(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*is_datetimetz)(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*is_extension_array_dtype)(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*is_sparse)(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*is_data_frame)(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*is_series)(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*is_index)(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*get_values)(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *, PyObject *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_7pyarrow_3lib__PandasAPIShim *__pyx_vtabptr_7pyarrow_3lib__PandasAPIShim;
static CYTHON_INLINE PyObject *__pyx_f_7pyarrow_3lib_14_PandasAPIShim__check_import(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *, struct __pyx_opt_args_7pyarrow_3lib_14_PandasAPIShim__check_import *__pyx_optional_args);
static CYTHON_INLINE int __pyx_f_7pyarrow_3lib_14_PandasAPIShim__have_pandas_internal(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *);


/* "pyarrow/memory.pxi":123
 * 
 * 
 * cdef class LoggingMemoryPool(MemoryPool):             # <<<<<<<<<<<<<<
 *     cdef:
 *         unique_ptr[CLoggingMemoryPool] logging_pool
*/

struct __pyx_vtabstruct_7pyarrow_3lib_LoggingMemoryPool {
  struct __pyx_vtabstruct_7pyarrow_3lib_MemoryPool __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_LoggingMemoryPool *__pyx_vtabptr_7pyarrow_3lib_LoggingMemoryPool;


/* "pyarrow/memory.pxi":132
 * 
 * 
 * cdef class ProxyMemoryPool(MemoryPool):             # <<<<<<<<<<<<<<
 *     """
 *     Memory pool implementation that tracks the number of bytes and
*/

struct __pyx_vtabstruct_7pyarrow_3lib_ProxyMemoryPool {
  struct __pyx_vtabstruct_7pyarrow_3lib_MemoryPool __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_ProxyMemoryPool *__pyx_vtabptr_7pyarrow_3lib_ProxyMemoryPool;


/* "pyarrow/types.pxi":1088
 *         return list(self)
 * 
 * cdef class UnionType(DataType):             # <<<<<<<<<<<<<<
 *     """
 *     Base class for union data types.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_UnionType {
  struct __pyx_vtabstruct_7pyarrow_3lib_DataType __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_UnionType *__pyx_vtabptr_7pyarrow_3lib_UnionType;


/* "pyarrow/types.pxi":1205
 * 
 * 
 * cdef class SparseUnionType(UnionType):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for sparse union types.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_SparseUnionType {
  struct __pyx_vtabstruct_7pyarrow_3lib_UnionType __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_SparseUnionType *__pyx_vtabptr_7pyarrow_3lib_SparseUnionType;


/* "pyarrow/types.pxi":1225
 * 
 * 
 * cdef class DenseUnionType(UnionType):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for dense union types.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_DenseUnionType {
  struct __pyx_vtabstruct_7pyarrow_3lib_UnionType __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_DenseUnionType *__pyx_vtabptr_7pyarrow_3lib_DenseUnionType;


/* "pyarrow/types.pxi":2138
 * 
 * 
 * cdef class UnknownExtensionType(ExtensionType):             # <<<<<<<<<<<<<<
 *     """
 *     A concrete class for Python-defined extension types that refer to
*/

struct __pyx_vtabstruct_7pyarrow_3lib_UnknownExtensionType {
  struct __pyx_vtabstruct_7pyarrow_3lib_ExtensionType __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_UnknownExtensionType *__pyx_vtabptr_7pyarrow_3lib_UnknownExtensionType;


/* "pyarrow/scalar.pxi":175
 * 
 * 
 * cdef class NullScalar(Scalar):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for null scalars.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_NullScalar {
  struct __pyx_vtabstruct_7pyarrow_3lib_Scalar __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_NullScalar *__pyx_vtabptr_7pyarrow_3lib_NullScalar;


/* "pyarrow/scalar.pxi":205
 * 
 * 
 * cdef class BooleanScalar(Scalar):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for boolean scalars.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_BooleanScalar {
  struct __pyx_vtabstruct_7pyarrow_3lib_Scalar __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_BooleanScalar *__pyx_vtabptr_7pyarrow_3lib_BooleanScalar;


/* "pyarrow/scalar.pxi":226
 *         return self.as_py() or False
 * 
 * cdef class UInt8Scalar(Scalar):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for uint8 scalars.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_UInt8Scalar {
  struct __pyx_vtabstruct_7pyarrow_3lib_Scalar __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_UInt8Scalar *__pyx_vtabptr_7pyarrow_3lib_UInt8Scalar;


/* "pyarrow/scalar.pxi":248
 * 
 * 
 * cdef class Int8Scalar(Scalar):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for int8 scalars.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_Int8Scalar {
  struct __pyx_vtabstruct_7pyarrow_3lib_Scalar __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_Int8Scalar *__pyx_vtabptr_7pyarrow_3lib_Int8Scalar;


/* "pyarrow/scalar.pxi":270
 * 
 * 
 * cdef class UInt16Scalar(Scalar):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for uint16 scalars.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_UInt16Scalar {
  struct __pyx_vtabstruct_7pyarrow_3lib_Scalar __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_UInt16Scalar *__pyx_vtabptr_7pyarrow_3lib_UInt16Scalar;


/* "pyarrow/scalar.pxi":292
 * 
 * 
 * cdef class Int16Scalar(Scalar):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for int16 scalars.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_Int16Scalar {
  struct __pyx_vtabstruct_7pyarrow_3lib_Scalar __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_Int16Scalar *__pyx_vtabptr_7pyarrow_3lib_Int16Scalar;


/* "pyarrow/scalar.pxi":314
 * 
 * 
 * cdef class UInt32Scalar(Scalar):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for uint32 scalars.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_UInt32Scalar {
  struct __pyx_vtabstruct_7pyarrow_3lib_Scalar __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_UInt32Scalar *__pyx_vtabptr_7pyarrow_3lib_UInt32Scalar;


/* "pyarrow/scalar.pxi":336
 * 
 * 
 * cdef class Int32Scalar(Scalar):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for int32 scalars.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_Int32Scalar {
  struct __pyx_vtabstruct_7pyarrow_3lib_Scalar __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_Int32Scalar *__pyx_vtabptr_7pyarrow_3lib_Int32Scalar;


/* "pyarrow/scalar.pxi":358
 * 
 * 
 * cdef class UInt64Scalar(Scalar):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for uint64 scalars.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_UInt64Scalar {
  struct __pyx_vtabstruct_7pyarrow_3lib_Scalar __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_UInt64Scalar *__pyx_vtabptr_7pyarrow_3lib_UInt64Scalar;


/* "pyarrow/scalar.pxi":380
 * 
 * 
 * cdef class Int64Scalar(Scalar):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for int64 scalars.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_Int64Scalar {
  struct __pyx_vtabstruct_7pyarrow_3lib_Scalar __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_Int64Scalar *__pyx_vtabptr_7pyarrow_3lib_Int64Scalar;


/* "pyarrow/scalar.pxi":402
 * 
 * 
 * cdef class HalfFloatScalar(Scalar):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for float scalars.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_HalfFloatScalar {
  struct __pyx_vtabstruct_7pyarrow_3lib_Scalar __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_HalfFloatScalar *__pyx_vtabptr_7pyarrow_3lib_HalfFloatScalar;


/* "pyarrow/scalar.pxi":427
 * 
 * 
 * cdef class FloatScalar(Scalar):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for float scalars.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_FloatScalar {
  struct __pyx_vtabstruct_7pyarrow_3lib_Scalar __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_FloatScalar *__pyx_vtabptr_7pyarrow_3lib_FloatScalar;


/* "pyarrow/scalar.pxi":452
 * 
 * 
 * cdef class DoubleScalar(Scalar):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for double scalars.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_DoubleScalar {
  struct __pyx_vtabstruct_7pyarrow_3lib_Scalar __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_DoubleScalar *__pyx_vtabptr_7pyarrow_3lib_DoubleScalar;


/* "pyarrow/scalar.pxi":477
 * 
 * 
 * cdef class Decimal32Scalar(Scalar):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for decimal32 scalars.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_Decimal32Scalar {
  struct __pyx_vtabstruct_7pyarrow_3lib_Scalar __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_Decimal32Scalar *__pyx_vtabptr_7pyarrow_3lib_Decimal32Scalar;


/* "pyarrow/scalar.pxi":503
 * 
 * 
 * cdef class Decimal64Scalar(Scalar):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for decimal64 scalars.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_Decimal64Scalar {
  struct __pyx_vtabstruct_7pyarrow_3lib_Scalar __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_Decimal64Scalar *__pyx_vtabptr_7pyarrow_3lib_Decimal64Scalar;


/* "pyarrow/scalar.pxi":529
 * 
 * 
 * cdef class Decimal128Scalar(Scalar):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for decimal128 scalars.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_Decimal128Scalar {
  struct __pyx_vtabstruct_7pyarrow_3lib_Scalar __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_Decimal128Scalar *__pyx_vtabptr_7pyarrow_3lib_Decimal128Scalar;


/* "pyarrow/scalar.pxi":555
 * 
 * 
 * cdef class Decimal256Scalar(Scalar):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for decimal256 scalars.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_Decimal256Scalar {
  struct __pyx_vtabstruct_7pyarrow_3lib_Scalar __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_Decimal256Scalar *__pyx_vtabptr_7pyarrow_3lib_Decimal256Scalar;


/* "pyarrow/scalar.pxi":581
 * 
 * 
 * cdef class Date32Scalar(Scalar):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for date32 scalars.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_Date32Scalar {
  struct __pyx_vtabstruct_7pyarrow_3lib_Scalar __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_Date32Scalar *__pyx_vtabptr_7pyarrow_3lib_Date32Scalar;


/* "pyarrow/scalar.pxi":612
 * 
 * 
 * cdef class Date64Scalar(Scalar):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for date64 scalars.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_Date64Scalar {
  struct __pyx_vtabstruct_7pyarrow_3lib_Scalar __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_Date64Scalar *__pyx_vtabptr_7pyarrow_3lib_Date64Scalar;


/* "pyarrow/scalar.pxi":672
 * 
 * 
 * cdef class Time32Scalar(Scalar):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for time32 scalars.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_Time32Scalar {
  struct __pyx_vtabstruct_7pyarrow_3lib_Scalar __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_Time32Scalar *__pyx_vtabptr_7pyarrow_3lib_Time32Scalar;


/* "pyarrow/scalar.pxi":702
 * 
 * 
 * cdef class Time64Scalar(Scalar):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for time64 scalars.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_Time64Scalar {
  struct __pyx_vtabstruct_7pyarrow_3lib_Scalar __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_Time64Scalar *__pyx_vtabptr_7pyarrow_3lib_Time64Scalar;


/* "pyarrow/scalar.pxi":732
 * 
 * 
 * cdef class TimestampScalar(Scalar):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for timestamp scalars.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_TimestampScalar {
  struct __pyx_vtabstruct_7pyarrow_3lib_Scalar __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_TimestampScalar *__pyx_vtabptr_7pyarrow_3lib_TimestampScalar;


/* "pyarrow/scalar.pxi":784
 * 
 * 
 * cdef class DurationScalar(Scalar):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for duration scalars.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_DurationScalar {
  struct __pyx_vtabstruct_7pyarrow_3lib_Scalar __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_DurationScalar *__pyx_vtabptr_7pyarrow_3lib_DurationScalar;


/* "pyarrow/scalar.pxi":835
 * 
 * 
 * cdef class MonthDayNanoIntervalScalar(Scalar):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for month, day, nanosecond interval scalars.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_MonthDayNanoIntervalScalar {
  struct __pyx_vtabstruct_7pyarrow_3lib_Scalar __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_MonthDayNanoIntervalScalar *__pyx_vtabptr_7pyarrow_3lib_MonthDayNanoIntervalScalar;


/* "pyarrow/scalar.pxi":866
 * 
 * 
 * cdef class BinaryScalar(Scalar):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for binary-like scalars.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_BinaryScalar {
  struct __pyx_vtabstruct_7pyarrow_3lib_Scalar __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_BinaryScalar *__pyx_vtabptr_7pyarrow_3lib_BinaryScalar;


/* "pyarrow/scalar.pxi":901
 * 
 * 
 * cdef class LargeBinaryScalar(BinaryScalar):             # <<<<<<<<<<<<<<
 *     pass
 * 
*/

struct __pyx_vtabstruct_7pyarrow_3lib_LargeBinaryScalar {
  struct __pyx_vtabstruct_7pyarrow_3lib_BinaryScalar __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_LargeBinaryScalar *__pyx_vtabptr_7pyarrow_3lib_LargeBinaryScalar;


/* "pyarrow/scalar.pxi":905
 * 
 * 
 * cdef class FixedSizeBinaryScalar(BinaryScalar):             # <<<<<<<<<<<<<<
 *     pass
 * 
*/

struct __pyx_vtabstruct_7pyarrow_3lib_FixedSizeBinaryScalar {
  struct __pyx_vtabstruct_7pyarrow_3lib_BinaryScalar __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_FixedSizeBinaryScalar *__pyx_vtabptr_7pyarrow_3lib_FixedSizeBinaryScalar;


/* "pyarrow/scalar.pxi":909
 * 
 * 
 * cdef class StringScalar(BinaryScalar):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for string-like (utf8) scalars.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_StringScalar {
  struct __pyx_vtabstruct_7pyarrow_3lib_BinaryScalar __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_StringScalar *__pyx_vtabptr_7pyarrow_3lib_StringScalar;


/* "pyarrow/scalar.pxi":928
 * 
 * 
 * cdef class LargeStringScalar(StringScalar):             # <<<<<<<<<<<<<<
 *     pass
 * 
*/

struct __pyx_vtabstruct_7pyarrow_3lib_LargeStringScalar {
  struct __pyx_vtabstruct_7pyarrow_3lib_StringScalar __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_LargeStringScalar *__pyx_vtabptr_7pyarrow_3lib_LargeStringScalar;


/* "pyarrow/scalar.pxi":932
 * 
 * 
 * cdef class BinaryViewScalar(BinaryScalar):             # <<<<<<<<<<<<<<
 *     pass
 * 
*/

struct __pyx_vtabstruct_7pyarrow_3lib_BinaryViewScalar {
  struct __pyx_vtabstruct_7pyarrow_3lib_BinaryScalar __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_BinaryViewScalar *__pyx_vtabptr_7pyarrow_3lib_BinaryViewScalar;


/* "pyarrow/scalar.pxi":936
 * 
 * 
 * cdef class StringViewScalar(StringScalar):             # <<<<<<<<<<<<<<
 *     pass
 * 
*/

struct __pyx_vtabstruct_7pyarrow_3lib_StringViewScalar {
  struct __pyx_vtabstruct_7pyarrow_3lib_StringScalar __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_StringViewScalar *__pyx_vtabptr_7pyarrow_3lib_StringViewScalar;


/* "pyarrow/scalar.pxi":940
 * 
 * 
 * cdef class ListScalar(Scalar, Sequence):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for list-like scalars.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_ListScalar {
  struct __pyx_vtabstruct_7pyarrow_3lib_Scalar __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_ListScalar *__pyx_vtabptr_7pyarrow_3lib_ListScalar;


/* "pyarrow/scalar.pxi":993
 * 
 * 
 * cdef class FixedSizeListScalar(ListScalar):             # <<<<<<<<<<<<<<
 *     pass
 * 
*/

struct __pyx_vtabstruct_7pyarrow_3lib_FixedSizeListScalar {
  struct __pyx_vtabstruct_7pyarrow_3lib_ListScalar __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_FixedSizeListScalar *__pyx_vtabptr_7pyarrow_3lib_FixedSizeListScalar;


/* "pyarrow/scalar.pxi":997
 * 
 * 
 * cdef class LargeListScalar(ListScalar):             # <<<<<<<<<<<<<<
 *     pass
 * 
*/

struct __pyx_vtabstruct_7pyarrow_3lib_LargeListScalar {
  struct __pyx_vtabstruct_7pyarrow_3lib_ListScalar __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_LargeListScalar *__pyx_vtabptr_7pyarrow_3lib_LargeListScalar;


/* "pyarrow/scalar.pxi":1001
 * 
 * 
 * cdef class ListViewScalar(ListScalar):             # <<<<<<<<<<<<<<
 *     pass
 * 
*/

struct __pyx_vtabstruct_7pyarrow_3lib_ListViewScalar {
  struct __pyx_vtabstruct_7pyarrow_3lib_ListScalar __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_ListViewScalar *__pyx_vtabptr_7pyarrow_3lib_ListViewScalar;


/* "pyarrow/scalar.pxi":1005
 * 
 * 
 * cdef class LargeListViewScalar(ListScalar):             # <<<<<<<<<<<<<<
 *     pass
 * 
*/

struct __pyx_vtabstruct_7pyarrow_3lib_LargeListViewScalar {
  struct __pyx_vtabstruct_7pyarrow_3lib_ListScalar __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_LargeListViewScalar *__pyx_vtabptr_7pyarrow_3lib_LargeListViewScalar;


/* "pyarrow/scalar.pxi":1009
 * 
 * 
 * cdef class StructScalar(Scalar, Mapping):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for struct scalars.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_StructScalar {
  struct __pyx_vtabstruct_7pyarrow_3lib_Scalar __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_StructScalar *__pyx_vtabptr_7pyarrow_3lib_StructScalar;


/* "pyarrow/scalar.pxi":1108
 * 
 * 
 * cdef class MapScalar(ListScalar, Mapping):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for map scalars.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_MapScalar {
  struct __pyx_vtabstruct_7pyarrow_3lib_ListScalar __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_MapScalar *__pyx_vtabptr_7pyarrow_3lib_MapScalar;


/* "pyarrow/scalar.pxi":1203
 * 
 * 
 * cdef class DictionaryScalar(Scalar):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for dictionary-encoded scalars.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_DictionaryScalar {
  struct __pyx_vtabstruct_7pyarrow_3lib_Scalar __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_DictionaryScalar *__pyx_vtabptr_7pyarrow_3lib_DictionaryScalar;


/* "pyarrow/scalar.pxi":1294
 * 
 * 
 * cdef class RunEndEncodedScalar(Scalar):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for RunEndEncoded scalars.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_RunEndEncodedScalar {
  struct __pyx_vtabstruct_7pyarrow_3lib_Scalar __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_RunEndEncodedScalar *__pyx_vtabptr_7pyarrow_3lib_RunEndEncodedScalar;


/* "pyarrow/scalar.pxi":1327
 * 
 * 
 * cdef class UnionScalar(Scalar):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for Union scalars.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_UnionScalar {
  struct __pyx_vtabstruct_7pyarrow_3lib_Scalar __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_UnionScalar *__pyx_vtabptr_7pyarrow_3lib_UnionScalar;


/* "pyarrow/scalar.pxi":1376
 * 
 * 
 * cdef class ExtensionScalar(Scalar):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for Extension scalars.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_ExtensionScalar {
  struct __pyx_vtabstruct_7pyarrow_3lib_Scalar __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_ExtensionScalar *__pyx_vtabptr_7pyarrow_3lib_ExtensionScalar;


/* "pyarrow/scalar.pxi":1476
 * 
 * 
 * cdef class FixedShapeTensorScalar(ExtensionScalar):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for fixed shape tensor extension scalar.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_FixedShapeTensorScalar {
  struct __pyx_vtabstruct_7pyarrow_3lib_ExtensionScalar __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_FixedShapeTensorScalar *__pyx_vtabptr_7pyarrow_3lib_FixedShapeTensorScalar;


/* "pyarrow/scalar.pxi":1518
 * 
 * 
 * cdef class OpaqueScalar(ExtensionScalar):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for opaque extension scalar.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_OpaqueScalar {
  struct __pyx_vtabstruct_7pyarrow_3lib_ExtensionScalar __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_OpaqueScalar *__pyx_vtabptr_7pyarrow_3lib_OpaqueScalar;


/* "pyarrow/scalar.pxi":1524
 * 
 * 
 * cdef class Bool8Scalar(ExtensionScalar):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for bool8 extension scalar.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_Bool8Scalar {
  struct __pyx_vtabstruct_7pyarrow_3lib_ExtensionScalar __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_Bool8Scalar *__pyx_vtabptr_7pyarrow_3lib_Bool8Scalar;


/* "pyarrow/array.pxi":2422
 * 
 * 
 * cdef class Date32Array(NumericArray):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for Arrow arrays of date32 data type.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_Date32Array {
  struct __pyx_vtabstruct_7pyarrow_3lib_NumericArray __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_Date32Array *__pyx_vtabptr_7pyarrow_3lib_Date32Array;


/* "pyarrow/array.pxi":2428
 * 
 * 
 * cdef class Date64Array(NumericArray):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for Arrow arrays of date64 data type.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_Date64Array {
  struct __pyx_vtabstruct_7pyarrow_3lib_NumericArray __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_Date64Array *__pyx_vtabptr_7pyarrow_3lib_Date64Array;


/* "pyarrow/array.pxi":2434
 * 
 * 
 * cdef class TimestampArray(NumericArray):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for Arrow arrays of timestamp data type.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_TimestampArray {
  struct __pyx_vtabstruct_7pyarrow_3lib_NumericArray __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_TimestampArray *__pyx_vtabptr_7pyarrow_3lib_TimestampArray;


/* "pyarrow/array.pxi":2440
 * 
 * 
 * cdef class Time32Array(NumericArray):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for Arrow arrays of time32 data type.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_Time32Array {
  struct __pyx_vtabstruct_7pyarrow_3lib_NumericArray __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_Time32Array *__pyx_vtabptr_7pyarrow_3lib_Time32Array;


/* "pyarrow/array.pxi":2446
 * 
 * 
 * cdef class Time64Array(NumericArray):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for Arrow arrays of time64 data type.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_Time64Array {
  struct __pyx_vtabstruct_7pyarrow_3lib_NumericArray __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_Time64Array *__pyx_vtabptr_7pyarrow_3lib_Time64Array;


/* "pyarrow/array.pxi":2452
 * 
 * 
 * cdef class DurationArray(NumericArray):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for Arrow arrays of duration data type.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_DurationArray {
  struct __pyx_vtabstruct_7pyarrow_3lib_NumericArray __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_DurationArray *__pyx_vtabptr_7pyarrow_3lib_DurationArray;


/* "pyarrow/array.pxi":2512
 *     """
 * 
 * cdef class Decima32Array(FixedSizeBinaryArray):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for Arrow arrays of decimal32 data type.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_Decima32Array {
  struct __pyx_vtabstruct_7pyarrow_3lib_FixedSizeBinaryArray __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_Decima32Array *__pyx_vtabptr_7pyarrow_3lib_Decima32Array;


/* "pyarrow/array.pxi":3903
 * 
 * 
 * cdef class LargeStringArray(Array):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for Arrow arrays of large string (or utf8) data type.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_LargeStringArray {
  struct __pyx_vtabstruct_7pyarrow_3lib_Array __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_LargeStringArray *__pyx_vtabptr_7pyarrow_3lib_LargeStringArray;


/* "pyarrow/array.pxi":3954
 * 
 * 
 * cdef class LargeBinaryArray(Array):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for Arrow arrays of large variable-sized binary data type.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_LargeBinaryArray {
  struct __pyx_vtabstruct_7pyarrow_3lib_Array __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_LargeBinaryArray *__pyx_vtabptr_7pyarrow_3lib_LargeBinaryArray;


/* "pyarrow/array.pxi":4338
 * 
 * 
 * cdef class RunEndEncodedArray(Array):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for Arrow run-end encoded arrays.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_RunEndEncodedArray {
  struct __pyx_vtabstruct_7pyarrow_3lib_Array __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_RunEndEncodedArray *__pyx_vtabptr_7pyarrow_3lib_RunEndEncodedArray;


/* "pyarrow/array.pxi":4576
 * 
 * 
 * cdef class FixedShapeTensorArray(ExtensionArray):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for fixed shape tensor extension arrays.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_FixedShapeTensorArray {
  struct __pyx_vtabstruct_7pyarrow_3lib_ExtensionArray __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_FixedShapeTensorArray *__pyx_vtabptr_7pyarrow_3lib_FixedShapeTensorArray;


/* "pyarrow/array.pxi":4737
 * 
 * 
 * cdef class OpaqueArray(ExtensionArray):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for opaque extension arrays.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_OpaqueArray {
  struct __pyx_vtabstruct_7pyarrow_3lib_ExtensionArray __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_OpaqueArray *__pyx_vtabptr_7pyarrow_3lib_OpaqueArray;


/* "pyarrow/array.pxi":4765
 * 
 * 
 * cdef class Bool8Array(ExtensionArray):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for bool8 extension arrays.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_Bool8Array {
  struct __pyx_vtabstruct_7pyarrow_3lib_ExtensionArray __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_Bool8Array *__pyx_vtabptr_7pyarrow_3lib_Bool8Array;


/* "pyarrow/io.pxi":879
 * 
 * 
 * cdef class PythonFile(NativeFile):             # <<<<<<<<<<<<<<
 *     """
 *     A stream backed by a Python file object.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_PythonFile {
  struct __pyx_vtabstruct_7pyarrow_3lib_NativeFile __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_PythonFile *__pyx_vtabptr_7pyarrow_3lib_PythonFile;


/* "pyarrow/io.pxi":1011
 * 
 * 
 * cdef class MemoryMappedFile(NativeFile):             # <<<<<<<<<<<<<<
 *     """
 *     A stream that represents a memory-mapped file.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_MemoryMappedFile {
  struct __pyx_vtabstruct_7pyarrow_3lib_NativeFile __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_MemoryMappedFile *__pyx_vtabptr_7pyarrow_3lib_MemoryMappedFile;


/* "pyarrow/io.pxi":1182
 * 
 * 
 * cdef class OSFile(NativeFile):             # <<<<<<<<<<<<<<
 *     """
 *     A stream backed by a regular file descriptor.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_OSFile {
  struct __pyx_vtabstruct_7pyarrow_3lib_NativeFile __pyx_base;
  PyObject *(*_open_readable)(struct __pyx_obj_7pyarrow_3lib_OSFile *, std::string,  arrow::MemoryPool *);
  PyObject *(*_open_writable)(struct __pyx_obj_7pyarrow_3lib_OSFile *, std::string, struct __pyx_opt_args_7pyarrow_3lib_6OSFile__open_writable *__pyx_optional_args);
};
static struct __pyx_vtabstruct_7pyarrow_3lib_OSFile *__pyx_vtabptr_7pyarrow_3lib_OSFile;


/* "pyarrow/io.pxi":1270
 * 
 * 
 * cdef class FixedSizeBufferWriter(NativeFile):             # <<<<<<<<<<<<<<
 *     """
 *     A stream writing to a Arrow buffer.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_FixedSizeBufferWriter {
  struct __pyx_vtabstruct_7pyarrow_3lib_NativeFile __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_FixedSizeBufferWriter *__pyx_vtabptr_7pyarrow_3lib_FixedSizeBufferWriter;


/* "pyarrow/io.pxi":1650
 * 
 * 
 * cdef class BufferOutputStream(NativeFile):             # <<<<<<<<<<<<<<
 *     """
 *     An output stream that writes to a resizable buffer.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_BufferOutputStream {
  struct __pyx_vtabstruct_7pyarrow_3lib_NativeFile __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_BufferOutputStream *__pyx_vtabptr_7pyarrow_3lib_BufferOutputStream;


/* "pyarrow/io.pxi":1695
 * 
 * 
 * cdef class MockOutputStream(NativeFile):             # <<<<<<<<<<<<<<
 * 
 *     def __cinit__(self):
*/

struct __pyx_vtabstruct_7pyarrow_3lib_MockOutputStream {
  struct __pyx_vtabstruct_7pyarrow_3lib_NativeFile __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_MockOutputStream *__pyx_vtabptr_7pyarrow_3lib_MockOutputStream;


/* "pyarrow/io.pxi":1706
 * 
 * 
 * cdef class BufferReader(NativeFile):             # <<<<<<<<<<<<<<
 *     """
 *     Zero-copy reader from objects convertible to Arrow buffer.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_BufferReader {
  struct __pyx_vtabstruct_7pyarrow_3lib_NativeFile __pyx_base;
};
static struct __pyx_vtabstruct_7pyarrow_3lib_BufferReader *__pyx_vtabptr_7pyarrow_3lib_BufferReader;


/* "pyarrow/io.pxi":1972
 * 
 * 
 * cdef class TransformInputStream(NativeFile):             # <<<<<<<<<<<<<<
 *     """
 *     Transform an input stream.
*/

struct __pyx_vtabstruct_7pyarrow_3lib_TransformInputStream {
  struct __pyx_vtabstruct_7pyarrow_3lib_NativeFile __pyx_base;
  std::shared_ptr< arrow::io::InputStream>  (*make_native)(std::shared_ptr< arrow::io::InputStream> , PyObject *);
};
static struct __pyx_vtabstruct_7pyarrow_3lib_TransformInputStream *__pyx_vtabptr_7pyarrow_3lib_TransformInputStream;
/* #### Code section: utility_code_proto ### */

/* --- Runtime support code (head) --- */
/* Refnanny.proto */
#ifndef CYTHON_REFNANNY
  #define CYTHON_REFNANNY 0
#endif
#if CYTHON_REFNANNY
  typedef struct {
    void (*INCREF)(void*, PyObject*, Py_ssize_t);
    void (*DECREF)(void*, PyObject*, Py_ssize_t);
    void (*GOTREF)(void*, PyObject*, Py_ssize_t);
    void (*GIVEREF)(void*, PyObject*, Py_ssize_t);
    void* (*SetupContext)(const char*, Py_ssize_t, 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;
  #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__));\
          }
  #define __Pyx_RefNannyFinishContextNogil() {\
              PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
              __Pyx_RefNannyFinishContext();\
              PyGILState_Release(__pyx_gilstate_save);\
          }
  #define __Pyx_RefNannyFinishContextNogil() {\
              PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
              __Pyx_RefNannyFinishContext();\
              PyGILState_Release(__pyx_gilstate_save);\
          }
  #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); else {__Pyx_INCREF(r); }} while(0)
  #define __Pyx_XDECREF(r)  do { if((r) == NULL); else {__Pyx_DECREF(r); }} while(0)
  #define __Pyx_XGOTREF(r)  do { if((r) == NULL); else {__Pyx_GOTREF(r); }} while(0)
  #define __Pyx_XGIVEREF(r) do { if((r) == NULL); else {__Pyx_GIVEREF(r);}} while(0)
#else
  #define __Pyx_RefNannyDeclarations
  #define __Pyx_RefNannySetupContext(name, acquire_gil)
  #define __Pyx_RefNannyFinishContextNogil()
  #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_Py_XDECREF_SET(r, v) do {\
        PyObject *tmp = (PyObject *) r;\
        r = v; Py_XDECREF(tmp);\
    } while (0)
#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)

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

/* PyThreadStateGet.proto (used by PyErrFetchRestore) */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyThreadState_declare  PyThreadState *__pyx_tstate;
#define __Pyx_PyThreadState_assign  __pyx_tstate = __Pyx_PyThreadState_Current;
#if PY_VERSION_HEX >= 0x030C00A6
#define __Pyx_PyErr_Occurred()  (__pyx_tstate->current_exception != NULL)
#define __Pyx_PyErr_CurrentExceptionType()  (__pyx_tstate->current_exception ? (PyObject*) Py_TYPE(__pyx_tstate->current_exception) : (PyObject*) NULL)
#else
#define __Pyx_PyErr_Occurred()  (__pyx_tstate->curexc_type != NULL)
#define __Pyx_PyErr_CurrentExceptionType()  (__pyx_tstate->curexc_type)
#endif
#else
#define __Pyx_PyThreadState_declare
#define __Pyx_PyThreadState_assign
#define __Pyx_PyErr_Occurred()  (PyErr_Occurred() != NULL)
#define __Pyx_PyErr_CurrentExceptionType()  PyErr_Occurred()
#endif

/* PyErrFetchRestore.proto (used by PyObjectGetAttrStrNoError) */
#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 && PY_VERSION_HEX < 0x030C00A6
#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

/* PyObjectGetAttrStr.proto (used by PyObjectGetAttrStrNoError) */
#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

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

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

/* PyDictVersioning.proto (used by GetModuleGlobalName) */
#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_XNewRef(__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)  do {\
    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_mstate_global->__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);\
} while(0)
#define __Pyx_GetModuleGlobalNameUncached(var, name)  do {\
    PY_UINT64_T __pyx_dict_version;\
    PyObject *__pyx_dict_cached_value;\
    (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
} while(0)
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

/* PyObjectCall.proto (used by PyObjectFastCall) */
#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 (used by PyObjectFastCall) */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
#endif

/* PyObjectFastCall.proto */
#define __Pyx_PyObject_FastCall(func, args, nargs)  __Pyx_PyObject_FastCallDict(func, args, (size_t)(nargs), NULL)
static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs);

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

/* TupleAndListFromArray.proto (used by fastcall) */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n);
#endif
#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_METH_FASTCALL
static CYTHON_INLINE PyObject* __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n);
#endif

/* IncludeStringH.proto (used by BytesEquals) */
#include <string.h>

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

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

/* fastcall.proto */
#if CYTHON_AVOID_BORROWED_REFS
    #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_PySequence_ITEM(args, i)
#elif CYTHON_ASSUME_SAFE_MACROS
    #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_NewRef(__Pyx_PyTuple_GET_ITEM(args, i))
#else
    #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_XNewRef(PyTuple_GetItem(args, i))
#endif
#define __Pyx_NumKwargs_VARARGS(kwds) PyDict_Size(kwds)
#define __Pyx_KwValues_VARARGS(args, nargs) NULL
#define __Pyx_GetKwValue_VARARGS(kw, kwvalues, s) __Pyx_PyDict_GetItemStrWithError(kw, s)
#define __Pyx_KwargsAsDict_VARARGS(kw, kwvalues) PyDict_Copy(kw)
#if CYTHON_METH_FASTCALL
    #define __Pyx_ArgRef_FASTCALL(args, i) __Pyx_NewRef(args[i])
    #define __Pyx_NumKwargs_FASTCALL(kwds) __Pyx_PyTuple_GET_SIZE(kwds)
    #define __Pyx_KwValues_FASTCALL(args, nargs) ((args) + (nargs))
    static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API
    CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues);
  #else
    #define __Pyx_KwargsAsDict_FASTCALL(kw, kwvalues) _PyStack_AsDict(kwvalues, kw)
  #endif
#else
    #define __Pyx_ArgRef_FASTCALL __Pyx_ArgRef_VARARGS
    #define __Pyx_NumKwargs_FASTCALL __Pyx_NumKwargs_VARARGS
    #define __Pyx_KwValues_FASTCALL __Pyx_KwValues_VARARGS
    #define __Pyx_GetKwValue_FASTCALL __Pyx_GetKwValue_VARARGS
    #define __Pyx_KwargsAsDict_FASTCALL __Pyx_KwargsAsDict_VARARGS
#endif
#define __Pyx_ArgsSlice_VARARGS(args, start, stop) PyTuple_GetSlice(args, start, stop)
#if CYTHON_METH_FASTCALL || (CYTHON_COMPILING_IN_CPYTHON && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
#define __Pyx_ArgsSlice_FASTCALL(args, start, stop) __Pyx_PyTuple_FromArray(args + start, stop - start)
#else
#define __Pyx_ArgsSlice_FASTCALL(args, start, stop) PyTuple_GetSlice(args, start, stop)
#endif

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

/* CallCFunction.proto (used by CallUnboundCMethod0) */
#define __Pyx_CallCFunction(cfunc, self, args)\
    ((PyCFunction)(void(*)(void))(cfunc)->func)(self, args)
#define __Pyx_CallCFunctionWithKeywords(cfunc, self, args, kwargs)\
    ((PyCFunctionWithKeywords)(void(*)(void))(cfunc)->func)(self, args, kwargs)
#define __Pyx_CallCFunctionFast(cfunc, self, args, nargs)\
    ((__Pyx_PyCFunctionFast)(void(*)(void))(PyCFunction)(cfunc)->func)(self, args, nargs)
#define __Pyx_CallCFunctionFastWithKeywords(cfunc, self, args, nargs, kwnames)\
    ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))(PyCFunction)(cfunc)->func)(self, args, nargs, kwnames)

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

/* UnpackUnboundCMethod.proto (used by CallUnboundCMethod0) */
typedef struct {
    PyObject *type;
    PyObject **method_name;
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && CYTHON_ATOMICS
    __pyx_atomic_int_type initialized;
#endif
    PyCFunction func;
    PyObject *method;
    int flag;
} __Pyx_CachedCFunction;
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
static CYTHON_INLINE int __Pyx_CachedCFunction_GetAndSetInitializing(__Pyx_CachedCFunction *cfunc) {
#if !CYTHON_ATOMICS
    return 1;
#else
    __pyx_nonatomic_int_type expected = 0;
    if (__pyx_atomic_int_cmp_exchange(&cfunc->initialized, &expected, 1)) {
        return 0;
    }
    return expected;
#endif
}
static CYTHON_INLINE void __Pyx_CachedCFunction_SetFinishedInitializing(__Pyx_CachedCFunction *cfunc) {
#if CYTHON_ATOMICS
    __pyx_atomic_store(&cfunc->initialized, 2);
#endif
}
#else
#define __Pyx_CachedCFunction_GetAndSetInitializing(cfunc) 2
#define __Pyx_CachedCFunction_SetFinishedInitializing(cfunc)
#endif

/* CallUnboundCMethod0.proto */
CYTHON_UNUSED
static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self);
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self);
#else
#define __Pyx_CallUnboundCMethod0(cfunc, self)  __Pyx__CallUnboundCMethod0(cfunc, self)
#endif

/* py_dict_values.proto (used by OwnedDictNext) */
static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d);

/* OwnedDictNext.proto (used by ParseKeywordsImpl) */
#if CYTHON_AVOID_BORROWED_REFS
static int __Pyx_PyDict_NextRef(PyObject *p, PyObject **ppos, PyObject **pkey, PyObject **pvalue);
#else
CYTHON_INLINE
static int __Pyx_PyDict_NextRef(PyObject *p, Py_ssize_t *ppos, PyObject **pkey, PyObject **pvalue);
#endif

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

/* ParseKeywordsImpl.export */
static int __Pyx_ParseKeywordsTuple(
    PyObject *kwds,
    PyObject * const *kwvalues,
    PyObject ** const argnames[],
    PyObject *kwds2,
    PyObject *values[],
    Py_ssize_t num_pos_args,
    Py_ssize_t num_kwargs,
    const char* function_name,
    int ignore_unknown_kwargs
);
static int __Pyx_ParseKeywordDictToDict(
    PyObject *kwds,
    PyObject ** const argnames[],
    PyObject *kwds2,
    PyObject *values[],
    Py_ssize_t num_pos_args,
    const char* function_name
);
static int __Pyx_ParseKeywordDict(
    PyObject *kwds,
    PyObject ** const argnames[],
    PyObject *values[],
    Py_ssize_t num_pos_args,
    Py_ssize_t num_kwargs,
    const char* function_name,
    int ignore_unknown_kwargs
);

/* CallUnboundCMethod2.proto */
CYTHON_UNUSED
static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2);
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2);
#else
#define __Pyx_CallUnboundCMethod2(cfunc, self, arg1, arg2)  __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2)
#endif

/* ParseKeywords.proto */
static CYTHON_INLINE int __Pyx_ParseKeywords(
    PyObject *kwds, PyObject *const *kwvalues, PyObject ** const argnames[],
    PyObject *kwds2, PyObject *values[],
    Py_ssize_t num_pos_args, Py_ssize_t num_kwargs,
    const char* function_name,
    int ignore_unknown_kwargs
);

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

/* PyValueError_Check.proto */
#define __Pyx_PyExc_ValueError_Check(obj)  __Pyx_TypeCheck(obj, PyExc_ValueError)

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

/* HasAttr.proto (used by ImportImpl) */
#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
#define __Pyx_HasAttr(o, n)  PyObject_HasAttrWithError(o, n)
#else
static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *);
#endif

/* ImportImpl.export */
static PyObject *__Pyx__Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, PyObject *moddict, int level);

/* Import.proto */
static CYTHON_INLINE PyObject *__Pyx_Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, int level);

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

/* PyImportError_Check.proto */
#define __Pyx_PyExc_ImportError_Check(obj)  __Pyx_TypeCheck(obj, PyExc_ImportError)

/* GetTopmostException.proto (used by SaveResetException) */
#if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE
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

/* PyObject_Unicode.proto */
#define __Pyx_PyObject_Unicode(obj)\
    (likely(PyUnicode_CheckExact(obj)) ? __Pyx_NewRef(obj) : PyObject_Str(obj))

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

/* PyObjectFormatSimple.proto */
#if CYTHON_COMPILING_IN_PYPY
    #define __Pyx_PyObject_FormatSimple(s, f) (\
        likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\
        PyObject_Format(s, f))
#elif CYTHON_USE_TYPE_SLOTS
    #define __Pyx_PyObject_FormatSimple(s, f) (\
        likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\
        likely(PyLong_CheckExact(s)) ? PyLong_Type.tp_repr(s) :\
        likely(PyFloat_CheckExact(s)) ? PyFloat_Type.tp_repr(s) :\
        PyObject_Format(s, f))
#else
    #define __Pyx_PyObject_FormatSimple(s, f) (\
        likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\
        PyObject_Format(s, f))
#endif

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

/* PyObjectFastCallMethod.proto */
#if CYTHON_VECTORCALL && PY_VERSION_HEX >= 0x03090000
#define __Pyx_PyObject_FastCallMethod(name, args, nargsf) PyObject_VectorcallMethod(name, args, nargsf, NULL)
#else
static PyObject *__Pyx_PyObject_FastCallMethod(PyObject *name, PyObject *const *args, size_t nargsf);
#endif

/* PyObjectVectorCallKwBuilder.proto (used by PyObjectVectorCallMethodKwBuilder) */
CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n);
#if CYTHON_VECTORCALL
#if PY_VERSION_HEX >= 0x03090000
#define __Pyx_Object_Vectorcall_CallFromBuilder PyObject_Vectorcall
#else
#define __Pyx_Object_Vectorcall_CallFromBuilder _PyObject_Vectorcall
#endif
#define __Pyx_MakeVectorcallBuilderKwds(n) PyTuple_New(n)
static int __Pyx_VectorcallBuilder_AddArg(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n);
static int __Pyx_VectorcallBuilder_AddArgStr(const char *key, PyObject *value, PyObject *builder, PyObject **args, int n);
#else
#define __Pyx_Object_Vectorcall_CallFromBuilder __Pyx_PyObject_FastCallDict
#define __Pyx_MakeVectorcallBuilderKwds(n) __Pyx_PyDict_NewPresized(n)
#define __Pyx_VectorcallBuilder_AddArg(key, value, builder, args, n) PyDict_SetItem(builder, key, value)
#define __Pyx_VectorcallBuilder_AddArgStr(key, value, builder, args, n) PyDict_SetItemString(builder, key, value)
#endif

/* PyObjectVectorCallMethodKwBuilder.proto */
#if CYTHON_VECTORCALL && PY_VERSION_HEX >= 0x03090000
#define __Pyx_Object_VectorcallMethod_CallFromBuilder PyObject_VectorcallMethod
#else
static PyObject *__Pyx_Object_VectorcallMethod_CallFromBuilder(PyObject *name, PyObject *const *args, size_t nargsf, PyObject *kwnames);
#endif

/* PyObjectDelAttr.proto (used by PyObjectSetAttrStr) */
#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000
#define __Pyx_PyObject_DelAttr(o, n) PyObject_SetAttr(o, n, NULL)
#else
#define __Pyx_PyObject_DelAttr(o, n) PyObject_DelAttr(o, n)
#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)   __Pyx_PyObject_DelAttr(o,n)
#define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v)
#endif

/* PyIOError_Check.proto */
#define __Pyx_PyExc_IOError_Check(obj)  __Pyx_TypeCheck(obj, PyExc_IOError)

/* RejectKeywords.export */
static void __Pyx_RejectKeywords(const char* function_name, PyObject *kwds);

/* PyTypeError_Check.proto */
#define __Pyx_PyExc_TypeError_Check(obj)  __Pyx_TypeCheck(obj, PyExc_TypeError)

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

/* MoveIfSupported.proto */
#if CYTHON_USE_CPP_STD_MOVE
  #include <utility>
  #define __PYX_STD_MOVE_IF_SUPPORTED(x) std::move(x)
#else
  #define __PYX_STD_MOVE_IF_SUPPORTED(x) x
#endif

/* FastTypeChecks.proto */
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
#define __Pyx_TypeCheck2(obj, type1, type2) __Pyx_IsAnySubtype2(Py_TYPE(obj), (PyTypeObject *)type1, (PyTypeObject *)type2)
static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, 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_TypeCheck2(obj, type1, type2) (PyObject_TypeCheck(obj, (PyTypeObject *)type1) || PyObject_TypeCheck(obj, (PyTypeObject *)type2))
#define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2) {
    return PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2);
}
#endif
#define __Pyx_PyErr_ExceptionMatches2(err1, err2)  __Pyx_PyErr_GivenExceptionMatches2(__Pyx_PyErr_CurrentExceptionType(), err1, err2)
#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
#ifdef PyExceptionInstance_Check
  #define __Pyx_PyBaseException_Check(obj) PyExceptionInstance_Check(obj)
#else
  #define __Pyx_PyBaseException_Check(obj) __Pyx_TypeCheck(obj, PyExc_BaseException)
#endif

/* WriteUnraisableException.proto */
static void __Pyx_WriteUnraisable(const char *name, int clineno,
                                  int lineno, const char *filename,
                                  int full_traceback, int nogil);

/* IncludeCppStringH.proto (used by decode_cpp_string) */
#include <string>

/* decode_c_string_utf16.proto (used by decode_c_bytes) */
static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16(const char *s, Py_ssize_t size, const char *errors) {
    int byteorder = 0;
    return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
}
static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16LE(const char *s, Py_ssize_t size, const char *errors) {
    int byteorder = -1;
    return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
}
static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16BE(const char *s, Py_ssize_t size, const char *errors) {
    int byteorder = 1;
    return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
}

/* decode_c_bytes.proto (used by decode_cpp_string) */
static CYTHON_INLINE PyObject* __Pyx_decode_c_bytes(
         const char* cstring, Py_ssize_t length, Py_ssize_t start, Py_ssize_t stop,
         const char* encoding, const char* errors,
         PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors));

/* decode_cpp_string.proto */
static CYTHON_INLINE PyObject* __Pyx_decode_cpp_string(
         std::string cppstring, Py_ssize_t start, Py_ssize_t stop,
         const char* encoding, const char* errors,
         PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) {
    return __Pyx_decode_c_bytes(
        cppstring.data(), (Py_ssize_t) cppstring.size(), start, stop, encoding, errors, decode_func);
}

/* PyObjectLookupSpecial.proto */
#if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
#define __Pyx_PyObject_LookupSpecialNoError(obj, attr_name)  __Pyx__PyObject_LookupSpecial(obj, attr_name, 0)
#define __Pyx_PyObject_LookupSpecial(obj, attr_name)  __Pyx__PyObject_LookupSpecial(obj, attr_name, 1)
static CYTHON_INLINE PyObject* __Pyx__PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name, int with_error);
#else
#define __Pyx_PyObject_LookupSpecialNoError(o,n) __Pyx_PyObject_GetAttrStrNoError(o,n)
#define __Pyx_PyObject_LookupSpecial(o,n) __Pyx_PyObject_GetAttrStr(o,n)
#endif

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

/* PyAttributeError_Check.proto */
#define __Pyx_PyExc_AttributeError_Check(obj)  __Pyx_TypeCheck(obj, PyExc_AttributeError)

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

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

/* RaiseUnexpectedTypeError.proto */
static int __Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj);

/* PyObjectCallNoArg.proto */
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);

/* ArgTypeTestFunc.export */
static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact);

/* ArgTypeTest.proto */
#define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\
    ((likely(__Pyx_IS_TYPE(obj, type) | (none_allowed && (obj == Py_None)))) ? 1 :\
        __Pyx__ArgTypeTest(obj, type, name, exact))

/* PyObjectCall2Args.proto (used by CallUnboundCMethod1) */
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2);

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

/* DictGetItem.proto */
#if !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

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

/* PyKeyError_Check.proto */
#define __Pyx_PyExc_KeyError_Check(obj)  __Pyx_TypeCheck(obj, PyExc_KeyError)

/* PyUserWarning_Check.proto */
#define __Pyx_PyExc_UserWarning_Check(obj)  __Pyx_TypeCheck(obj, PyExc_UserWarning)

/* decode_c_string.proto */
static CYTHON_INLINE PyObject* __Pyx_decode_c_string(
         const char* cstring, Py_ssize_t start, Py_ssize_t stop,
         const char* encoding, const char* errors,
         PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors));

/* PyObjectFormatAndDecref.proto */
static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatSimpleAndDecref(PyObject* s, PyObject* f);
static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatAndDecref(PyObject* s, PyObject* f);

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

/* PyNotImplementedError_Check.proto */
#define __Pyx_PyExc_NotImplementedError_Check(obj)  __Pyx_TypeCheck(obj, PyExc_NotImplementedError)

/* AssertionsEnabled.proto */
#if CYTHON_COMPILING_IN_LIMITED_API  ||  PY_VERSION_HEX >= 0x030C0000
  static int __pyx_assertions_enabled_flag;
  #define __pyx_assertions_enabled() (__pyx_assertions_enabled_flag)
  #if __clang__ || __GNUC__
  __attribute__((no_sanitize("thread")))
  #endif
  static int __Pyx_init_assertions_enabled(void) {
    PyObject *builtins, *debug, *debug_str;
    int flag;
    builtins = PyEval_GetBuiltins();
    if (!builtins) goto bad;
    debug_str = PyUnicode_FromStringAndSize("__debug__", 9);
    if (!debug_str) goto bad;
    debug = PyObject_GetItem(builtins, debug_str);
    Py_DECREF(debug_str);
    if (!debug) goto bad;
    flag = PyObject_IsTrue(debug);
    Py_DECREF(debug);
    if (flag == -1) goto bad;
    __pyx_assertions_enabled_flag = flag;
    return 0;
  bad:
    __pyx_assertions_enabled_flag = 1;
    return -1;
  }
#else
  #define __Pyx_init_assertions_enabled()  (0)
  #define __pyx_assertions_enabled()  (!Py_OptimizeFlag)
#endif

/* PyAssertionError_Check.proto */
#define __Pyx_PyExc_AssertionError_Check(obj)  __Pyx_TypeCheck(obj, PyExc_AssertionError)

/* PyLongCompare.proto */
static CYTHON_INLINE int __Pyx_PyLong_BoolNeObjC(PyObject *op1, PyObject *op2, long intval, long inplace);

/* ErrOccurredWithGIL.proto */
static CYTHON_INLINE int __Pyx_ErrOccurredWithGIL(void);

/* GetItemInt.proto */
#define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck, has_gil, unsafe_shared)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck, unsafe_shared) :\
    (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, has_gil, unsafe_shared)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck, unsafe_shared) :\
    (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, int unsafe_shared);
#define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck, has_gil, unsafe_shared)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck, unsafe_shared) :\
    (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, int unsafe_shared);
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, int unsafe_shared);

/* pep479.proto */
static void __Pyx_Generator_Replace_StopIteration(int in_async_gen);

/* PyUnicode_Unicode.proto */
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_Unicode(PyObject *obj);

/* ListAppend.proto (used by append) */
#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);
        #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000
        L->ob_item[len] = x;
        #else
        PyList_SET_ITEM(list, len, x);
        #endif
        __Pyx_SET_SIZE(list, len + 1);
        return 0;
    }
    return PyList_Append(list, x);
}
#else
#define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
#endif

/* PyObjectGetMethod.proto (used by PyObjectCallMethod1) */
#if !(CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000)))
static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method);
#endif

/* PyObjectCallMethod1.proto (used by append) */
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);

/* RaiseUnboundLocalError.proto */
static 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);

/* ListExtend.proto */
static CYTHON_INLINE int __Pyx_PyList_Extend(PyObject* L, PyObject* v) {
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00a2
    return PyList_Extend(L, v);
#elif CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030d0000
    PyObject* none = _PyList_Extend((PyListObject*)L, v);
    if (unlikely(!none))
        return -1;
    Py_DECREF(none);
    return 0;
#else
    return PyList_SetSlice(L, PY_SSIZE_T_MAX, PY_SSIZE_T_MAX, v);
#endif
}

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

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

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

/* UnpackTuple2.proto (used by dict_iter) */
static CYTHON_INLINE int __Pyx_unpack_tuple2(
    PyObject* tuple, PyObject** value1, PyObject** value2, int is_tuple, int has_known_size, int decref_tuple);
static CYTHON_INLINE int __Pyx_unpack_tuple2_exact(
    PyObject* tuple, PyObject** value1, PyObject** value2, int decref_tuple);
static int __Pyx_unpack_tuple2_generic(
    PyObject* tuple, PyObject** value1, PyObject** value2, int has_known_size, int decref_tuple);

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

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

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

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

/* PyFutureWarning_Check.proto */
#define __Pyx_PyExc_FutureWarning_Check(obj)  __Pyx_TypeCheck(obj, PyExc_FutureWarning)

/* PyRange_Check.proto */
#if CYTHON_COMPILING_IN_PYPY && !defined(PyRange_Check)
  #define PyRange_Check(obj)  __Pyx_TypeCheck((obj), &PyRange_Type)
#endif

/* PyRuntimeError_Check.proto */
#define __Pyx_PyExc_RuntimeError_Check(obj)  __Pyx_TypeCheck(obj, PyExc_RuntimeError)

/* pybytes_as_double.proto (used by pynumber_float) */
static double __Pyx_SlowPyString_AsDouble(PyObject *obj);
static double __Pyx__PyBytes_AsDouble(PyObject *obj, const char* start, Py_ssize_t length);
static CYTHON_INLINE double __Pyx_PyBytes_AsDouble(PyObject *obj) {
    char* as_c_string;
    Py_ssize_t size;
#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE
    as_c_string = PyBytes_AS_STRING(obj);
    size = PyBytes_GET_SIZE(obj);
#else
    if (PyBytes_AsStringAndSize(obj, &as_c_string, &size) < 0) {
        return (double)-1;
    }
#endif
    return __Pyx__PyBytes_AsDouble(obj, as_c_string, size);
}
static CYTHON_INLINE double __Pyx_PyByteArray_AsDouble(PyObject *obj) {
    char* as_c_string;
    Py_ssize_t size;
#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE
    as_c_string = PyByteArray_AS_STRING(obj);
    size = PyByteArray_GET_SIZE(obj);
#else
    as_c_string = PyByteArray_AsString(obj);
    if (as_c_string == NULL) {
        return (double)-1;
    }
    size = PyByteArray_Size(obj);
#endif
    return __Pyx__PyBytes_AsDouble(obj, as_c_string, size);
}

/* pyunicode_as_double.proto (used by pynumber_float) */
#if !CYTHON_COMPILING_IN_PYPY && CYTHON_ASSUME_SAFE_MACROS
static const char* __Pyx__PyUnicode_AsDouble_Copy(const void* data, const int kind, char* buffer, Py_ssize_t start, Py_ssize_t end) {
    int last_was_punctuation;
    Py_ssize_t i;
    last_was_punctuation = 1;
    for (i=start; i <= end; i++) {
        Py_UCS4 chr = PyUnicode_READ(kind, data, i);
        int is_punctuation = (chr == '_') | (chr == '.');
        *buffer = (char)chr;
        buffer += (chr != '_');
        if (unlikely(chr > 127)) goto parse_failure;
        if (unlikely(last_was_punctuation & is_punctuation)) goto parse_failure;
        last_was_punctuation = is_punctuation;
    }
    if (unlikely(last_was_punctuation)) goto parse_failure;
    *buffer = '\0';
    return buffer;
parse_failure:
    return NULL;
}
static double __Pyx__PyUnicode_AsDouble_inf_nan(const void* data, int kind, Py_ssize_t start, Py_ssize_t length) {
    int matches = 1;
    Py_UCS4 chr;
    Py_UCS4 sign = PyUnicode_READ(kind, data, start);
    int is_signed = (sign == '-') | (sign == '+');
    start += is_signed;
    length -= is_signed;
    switch (PyUnicode_READ(kind, data, start)) {
        #ifdef Py_NAN
        case 'n':
        case 'N':
            if (unlikely(length != 3)) goto parse_failure;
            chr = PyUnicode_READ(kind, data, start+1);
            matches &= (chr == 'a') | (chr == 'A');
            chr = PyUnicode_READ(kind, data, start+2);
            matches &= (chr == 'n') | (chr == 'N');
            if (unlikely(!matches)) goto parse_failure;
            return (sign == '-') ? -Py_NAN : Py_NAN;
        #endif
        case 'i':
        case 'I':
            if (unlikely(length < 3)) goto parse_failure;
            chr = PyUnicode_READ(kind, data, start+1);
            matches &= (chr == 'n') | (chr == 'N');
            chr = PyUnicode_READ(kind, data, start+2);
            matches &= (chr == 'f') | (chr == 'F');
            if (likely(length == 3 && matches))
                return (sign == '-') ? -Py_HUGE_VAL : Py_HUGE_VAL;
            if (unlikely(length != 8)) goto parse_failure;
            chr = PyUnicode_READ(kind, data, start+3);
            matches &= (chr == 'i') | (chr == 'I');
            chr = PyUnicode_READ(kind, data, start+4);
            matches &= (chr == 'n') | (chr == 'N');
            chr = PyUnicode_READ(kind, data, start+5);
            matches &= (chr == 'i') | (chr == 'I');
            chr = PyUnicode_READ(kind, data, start+6);
            matches &= (chr == 't') | (chr == 'T');
            chr = PyUnicode_READ(kind, data, start+7);
            matches &= (chr == 'y') | (chr == 'Y');
            if (unlikely(!matches)) goto parse_failure;
            return (sign == '-') ? -Py_HUGE_VAL : Py_HUGE_VAL;
        case '.': case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9':
            break;
        default:
            goto parse_failure;
    }
    return 0.0;
parse_failure:
    return -1.0;
}
static double __Pyx_PyUnicode_AsDouble_WithSpaces(PyObject *obj) {
    double value;
    const char *last;
    char *end;
    Py_ssize_t start, length = PyUnicode_GET_LENGTH(obj);
    const int kind = PyUnicode_KIND(obj);
    const void* data = PyUnicode_DATA(obj);
    start = 0;
    while (Py_UNICODE_ISSPACE(PyUnicode_READ(kind, data, start)))
        start++;
    while (start < length - 1 && Py_UNICODE_ISSPACE(PyUnicode_READ(kind, data, length - 1)))
        length--;
    length -= start;
    if (unlikely(length <= 0)) goto fallback;
    value = __Pyx__PyUnicode_AsDouble_inf_nan(data, kind, start, length);
    if (unlikely(value == -1.0)) goto fallback;
    if (value != 0.0) return value;
    if (length < 40) {
        char number[40];
        last = __Pyx__PyUnicode_AsDouble_Copy(data, kind, number, start, start + length);
        if (unlikely(!last)) goto fallback;
        value = PyOS_string_to_double(number, &end, NULL);
    } else {
        char *number = (char*) PyMem_Malloc((length + 1) * sizeof(char));
        if (unlikely(!number)) goto fallback;
        last = __Pyx__PyUnicode_AsDouble_Copy(data, kind, number, start, start + length);
        if (unlikely(!last)) {
            PyMem_Free(number);
            goto fallback;
        }
        value = PyOS_string_to_double(number, &end, NULL);
        PyMem_Free(number);
    }
    if (likely(end == last) || (value == (double)-1 && PyErr_Occurred())) {
        return value;
    }
fallback:
    return __Pyx_SlowPyString_AsDouble(obj);
}
#endif
static CYTHON_INLINE double __Pyx_PyUnicode_AsDouble(PyObject *obj) {
#if !CYTHON_COMPILING_IN_PYPY && CYTHON_ASSUME_SAFE_MACROS
    if (unlikely(__Pyx_PyUnicode_READY(obj) == -1))
        return (double)-1;
    if (likely(PyUnicode_IS_ASCII(obj))) {
        const char *s;
        Py_ssize_t length;
        s = PyUnicode_AsUTF8AndSize(obj, &length);
        return __Pyx__PyBytes_AsDouble(obj, s, length);
    }
    return __Pyx_PyUnicode_AsDouble_WithSpaces(obj);
#else
    return __Pyx_SlowPyString_AsDouble(obj);
#endif
}

/* pynumber_float.proto */
static CYTHON_INLINE PyObject* __Pyx__PyNumber_Float(PyObject* obj);
#define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : __Pyx__PyNumber_Float(x))

/* ModInt[int64_t].proto */
static CYTHON_INLINE int64_t __Pyx_mod_int64_t(int64_t, int64_t, int b_is_constant);

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

/* COrdinalToPyUnicode.proto (used by CIntToPyUnicode) */
static CYTHON_INLINE int __Pyx_CheckUnicodeValue(int value);
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromOrdinal_Padded(int value, Py_ssize_t width, char padding_char);

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

/* IncludeStdlibH.proto (used by CIntToPyUnicode) */
#include <stdlib.h>

/* CIntToPyUnicode.proto */
#define __Pyx_PyUnicode_From_int64_t(value, width, padding_char, format_char) (\
    ((format_char) == ('c')) ?\
        __Pyx_uchar___Pyx_PyUnicode_From_int64_t(value, width, padding_char) :\
        __Pyx____Pyx_PyUnicode_From_int64_t(value, width, padding_char, format_char)\
    )
static CYTHON_INLINE PyObject* __Pyx_uchar___Pyx_PyUnicode_From_int64_t(int64_t value, Py_ssize_t width, char padding_char);
static CYTHON_INLINE PyObject* __Pyx____Pyx_PyUnicode_From_int64_t(int64_t value, Py_ssize_t width, char padding_char, char format_char);

/* DivInt[int64_t].proto */
static CYTHON_INLINE int64_t __Pyx_div_int64_t(int64_t, int64_t, int b_is_constant);

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

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

/* PyIndexError_Check.proto */
#define __Pyx_PyExc_IndexError_Check(obj)  __Pyx_TypeCheck(obj, PyExc_IndexError)

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

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

/* PyLongCompare.proto */
static CYTHON_INLINE int __Pyx_PyLong_BoolEqObjC(PyObject *op1, PyObject *op2, long intval, long inplace);

/* CIntToPyUnicode.proto */
#define __Pyx_PyUnicode_From_Py_ssize_t(value, width, padding_char, format_char) (\
    ((format_char) == ('c')) ?\
        __Pyx_uchar___Pyx_PyUnicode_From_Py_ssize_t(value, width, padding_char) :\
        __Pyx____Pyx_PyUnicode_From_Py_ssize_t(value, width, padding_char, format_char)\
    )
static CYTHON_INLINE PyObject* __Pyx_uchar___Pyx_PyUnicode_From_Py_ssize_t(Py_ssize_t value, Py_ssize_t width, char padding_char);
static CYTHON_INLINE PyObject* __Pyx____Pyx_PyUnicode_From_Py_ssize_t(Py_ssize_t value, Py_ssize_t width, char padding_char, char format_char);

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

/* CIntToPyUnicode.proto */
#define __Pyx_PyUnicode_From_int(value, width, padding_char, format_char) (\
    ((format_char) == ('c')) ?\
        __Pyx_uchar___Pyx_PyUnicode_From_int(value, width, padding_char) :\
        __Pyx____Pyx_PyUnicode_From_int(value, width, padding_char, format_char)\
    )
static CYTHON_INLINE PyObject* __Pyx_uchar___Pyx_PyUnicode_From_int(int value, Py_ssize_t width, char padding_char);
static CYTHON_INLINE PyObject* __Pyx____Pyx_PyUnicode_From_int(int value, Py_ssize_t width, char padding_char, char format_char);

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

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

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

/* UnicodeConcatInPlace.proto */
# if CYTHON_COMPILING_IN_CPYTHON
    #if CYTHON_REFNANNY
        #define __Pyx_PyUnicode_ConcatInPlace(left, right, unsafe_shared) __Pyx_PyUnicode_ConcatInPlaceImpl(&left, right, unsafe_shared, __pyx_refnanny)
    #else
        #define __Pyx_PyUnicode_ConcatInPlace(left, right, unsafe_shared) __Pyx_PyUnicode_ConcatInPlaceImpl(&left, right, unsafe_shared)
    #endif
    #define __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_DefinitelyUniqueInPlace(left, right) __Pyx_PyUnicode_ConcatInPlace(left, right, __Pyx_ReferenceSharing_DefinitelyUnique)
    #define __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(left, right) __Pyx_PyUnicode_ConcatInPlace(left, right, __Pyx_ReferenceSharing_OwnStrongReference)
    #define __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_FunctionArgumentInPlace(left, right) __Pyx_PyUnicode_ConcatInPlace(left, right, __Pyx_ReferenceSharing_DefinitelyUnique)
    #define __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_SharedReferenceInPlace(left, right) __Pyx_PyUnicode_ConcatInPlace(left, right, __Pyx_ReferenceSharing_SharedReference)
    static CYTHON_INLINE PyObject *__Pyx_PyUnicode_ConcatInPlaceImpl(PyObject **p_left, PyObject *right, int unsafe_shared
        #if CYTHON_REFNANNY
        , void* __pyx_refnanny
        #endif
    );
#else
#define __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_DefinitelyUniqueInPlace __Pyx_PyUnicode_Concat
#define __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace __Pyx_PyUnicode_Concat
#define __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_FunctionArgumentInPlace __Pyx_PyUnicode_Concat
#define __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_SharedReferenceInPlace __Pyx_PyUnicode_Concat
#endif
#define __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_DefinitelyUniqueInPlaceSafe(left, right)\
    ((unlikely((left) == Py_None) || unlikely((right) == Py_None)) ?\
    PyNumber_InPlaceAdd(left, right) : __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_DefinitelyUniqueInPlace(left, right))
#define __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlaceSafe(left, right)\
    ((unlikely((left) == Py_None) || unlikely((right) == Py_None)) ?\
    PyNumber_InPlaceAdd(left, right) : __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(left, right))
#define __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_FunctionArgumentInPlaceSafe(left, right)\
    ((unlikely((left) == Py_None) || unlikely((right) == Py_None)) ?\
    PyNumber_InPlaceAdd(left, right) : __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_FunctionArgumentInPlace(left, right))
#define __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_SharedReferenceInPlaceSafe(left, right)\
    ((unlikely((left) == Py_None) || unlikely((right) == Py_None)) ?\
    PyNumber_InPlaceAdd(left, right) : __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_SharedReferenceInPlace(left, right))

/* PyLongBinop.proto */
#if !CYTHON_COMPILING_IN_PYPY
static CYTHON_INLINE PyObject* __Pyx_PyLong_FloorDivideObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
#else
#define __Pyx_PyLong_FloorDivideObjC(op1, op2, intval, inplace, zerodivision_check)\
    (inplace ? PyNumber_InPlaceFloorDivide(op1, op2) : PyNumber_FloorDivide(op1, op2))
#endif

/* CBIntToPyUnicode.proto */
#define __Pyx_PyUnicode_FromBInt_bint(value)\
    ((value) ? __Pyx_NewRef(__pyx_mstate_global->__pyx_n_u_True) : __Pyx_NewRef(__pyx_mstate_global->__pyx_n_u_False))

/* StringJoin.proto */
static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* values);

/* dict_setdefault.proto (used by FetchCommonType) */
static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value);

/* LimitedApiGetTypeDict.proto (used by SetItemOnTypeDict) */
#if CYTHON_COMPILING_IN_LIMITED_API
static PyObject *__Pyx_GetTypeDict(PyTypeObject *tp);
#endif

/* SetItemOnTypeDict.proto (used by FixUpExtensionType) */
static int __Pyx__SetItemOnTypeDict(PyTypeObject *tp, PyObject *k, PyObject *v);
#define __Pyx_SetItemOnTypeDict(tp, k, v) __Pyx__SetItemOnTypeDict((PyTypeObject*)tp, k, v)

/* FixUpExtensionType.proto (used by FetchCommonType) */
static CYTHON_INLINE int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type);

/* AddModuleRef.proto (used by FetchSharedCythonModule) */
#if ((CYTHON_COMPILING_IN_CPYTHON_FREETHREADING ) ||\
     __PYX_LIMITED_VERSION_HEX < 0x030d0000)
  static PyObject *__Pyx_PyImport_AddModuleRef(const char *name);
#else
  #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name)
#endif

/* FetchSharedCythonModule.proto (used by FetchCommonType) */
static PyObject *__Pyx_FetchSharedCythonABIModule(void);

/* FetchCommonType.proto (used by CommonTypesMetaclass) */
static PyTypeObject* __Pyx_FetchCommonTypeFromSpec(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases);

/* CommonTypesMetaclass.proto (used by CythonFunctionShared) */
static int __pyx_CommonTypesMetaclass_init(PyObject *module);
#define __Pyx_CommonTypesMetaclass_USED

/* CallTypeTraverse.proto (used by CythonFunctionShared) */
#if !CYTHON_USE_TYPE_SPECS || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x03090000)
#define __Pyx_call_type_traverse(o, always_call, visit, arg) 0
#else
static int __Pyx_call_type_traverse(PyObject *o, int always_call, visitproc visit, void *arg);
#endif

/* PyMethodNew.proto (used by CythonFunctionShared) */
static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ);

/* PyVectorcallFastCallDict.proto (used by CythonFunctionShared) */
#if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL
static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw);
#endif

/* CythonFunctionShared.proto (used by CythonFunction) */
#define __Pyx_CyFunction_USED
#define __Pyx_CYFUNCTION_STATICMETHOD  0x01
#define __Pyx_CYFUNCTION_CLASSMETHOD   0x02
#define __Pyx_CYFUNCTION_CCLASS        0x04
#define __Pyx_CYFUNCTION_COROUTINE     0x08
#define __Pyx_CyFunction_GetClosure(f)\
    (((__pyx_CyFunctionObject *) (f))->func_closure)
#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
  #define __Pyx_CyFunction_GetClassObj(f)\
      (((__pyx_CyFunctionObject *) (f))->func_classobj)
#else
  #define __Pyx_CyFunction_GetClassObj(f)\
      ((PyObject*) ((PyCMethodObject *) (f))->mm_class)
#endif
#define __Pyx_CyFunction_SetClassObj(f, classobj)\
    __Pyx__CyFunction_SetClassObj((__pyx_CyFunctionObject *) (f), (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 {
#if CYTHON_COMPILING_IN_LIMITED_API
    PyObject_HEAD
    PyObject *func;
#elif PY_VERSION_HEX < 0x030900B1
    PyCFunctionObject func;
#else
    PyCMethodObject func;
#endif
#if CYTHON_COMPILING_IN_LIMITED_API && CYTHON_METH_FASTCALL
    __pyx_vectorcallfunc func_vectorcall;
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
    PyObject *func_weakreflist;
#endif
#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API
    PyObject *func_dict;
#endif
    PyObject *func_name;
    PyObject *func_qualname;
    PyObject *func_doc;
    PyObject *func_globals;
    PyObject *func_code;
    PyObject *func_closure;
#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
    PyObject *func_classobj;
#endif
    PyObject *defaults;
    int flags;
    PyObject *defaults_tuple;
    PyObject *defaults_kwdict;
    PyObject *(*defaults_getter)(PyObject *);
    PyObject *func_annotations;
    PyObject *func_is_coroutine;
} __pyx_CyFunctionObject;
#undef __Pyx_CyOrPyCFunction_Check
#define __Pyx_CyFunction_Check(obj)  __Pyx_TypeCheck(obj, __pyx_mstate_global->__pyx_CyFunctionType)
#define __Pyx_CyOrPyCFunction_Check(obj)  __Pyx_TypeCheck2(obj, __pyx_mstate_global->__pyx_CyFunctionType, &PyCFunction_Type)
#define __Pyx_CyFunction_CheckExact(obj)  __Pyx_IS_TYPE(obj, __pyx_mstate_global->__pyx_CyFunctionType)
static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void));
#undef __Pyx_IsSameCFunction
#define __Pyx_IsSameCFunction(func, cfunc)   __Pyx__IsSameCyOrCFunction(func, cfunc)
static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject* op, PyMethodDef *ml,
                                      int flags, PyObject* qualname,
                                      PyObject *closure,
                                      PyObject *module, PyObject *globals,
                                      PyObject* code);
static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj);
static CYTHON_INLINE PyObject *__Pyx_CyFunction_InitDefaults(PyObject *func,
                                                         PyTypeObject *defaults_type);
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(PyObject *module);
#if CYTHON_METH_FASTCALL
static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
#if CYTHON_COMPILING_IN_LIMITED_API
#define __Pyx_CyFunction_func_vectorcall(f) (((__pyx_CyFunctionObject*)f)->func_vectorcall)
#else
#define __Pyx_CyFunction_func_vectorcall(f) (((PyCFunctionObject*)f)->vectorcall)
#endif
#endif

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

/* PyMemoryError_Check.proto */
#define __Pyx_PyExc_MemoryError_Check(obj)  __Pyx_TypeCheck(obj, PyExc_MemoryError)

/* PyNumber_Hex.proto */
#define __Pyx_PyNumber_Hex(obj) PyNumber_ToBase((obj), 16)

/* PyBufferError_Check.proto */
#define __Pyx_PyExc_BufferError_Check(obj)  __Pyx_TypeCheck(obj, PyExc_BufferError)

/* PyStopIteration_Check.proto */
#define __Pyx_PyExc_StopIteration_Check(obj)  __Pyx_TypeCheck(obj, PyExc_StopIteration)

/* PyEOFError_Check.proto */
#define __Pyx_PyExc_EOFError_Check(obj)  __Pyx_TypeCheck(obj, PyExc_EOFError)

/* AllocateExtensionType.proto */
static PyObject *__Pyx_AllocateExtensionType(PyTypeObject *t, int is_final);

/* DefaultPlacementNew.proto */
#include <new>
template<typename T>
void __Pyx_default_placement_construct(T* x) {
    new (static_cast<void*>(x)) T();
}

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

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

/* CheckTypeForFreelists.proto */
#if CYTHON_USE_FREELISTS
#if CYTHON_USE_TYPE_SPECS
#define __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, expected_tp, expected_size) ((int) ((t) == (expected_tp)))
#define __PYX_CHECK_TYPE_FOR_FREELIST_FLAGS  Py_TPFLAGS_IS_ABSTRACT
#else
#define __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, expected_tp, expected_size) ((int) ((t)->tp_basicsize == (expected_size)))
#define __PYX_CHECK_TYPE_FOR_FREELIST_FLAGS  (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)
#endif
#define __PYX_CHECK_TYPE_FOR_FREELISTS(t, expected_tp, expected_size)\
    (__PYX_CHECK_FINAL_TYPE_FOR_FREELISTS((t), (expected_tp), (expected_size)) &\
     (int) (!__Pyx_PyType_HasFeature((t), __PYX_CHECK_TYPE_FOR_FREELIST_FLAGS)))
#endif

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

/* GetApiDict.proto */
static PyObject *__Pyx_ApiExport_GetApiDict(void);

/* ValidateBasesTuple.proto (used by PyType_Ready) */
#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS
static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases);
#endif

/* PyType_Ready.proto */
CYTHON_UNUSED static int __Pyx_PyType_Ready(PyTypeObject *t);

/* DelItemOnTypeDict.proto (used by SetupReduce) */
static int __Pyx__DelItemOnTypeDict(PyTypeObject *tp, PyObject *k);
#define __Pyx_DelItemOnTypeDict(tp, k) __Pyx__DelItemOnTypeDict((PyTypeObject*)tp, k)

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

/* SetVTable.proto */
static int __Pyx_SetVtable(PyTypeObject* typeptr , void* vtable);

/* GetVTable.proto (used by MergeVTables) */
static void* __Pyx_GetVtable(PyTypeObject *type);

/* MergeVTables.proto */
static int __Pyx_MergeVtables(PyTypeObject *type);

/* TypeImport.proto */
#ifndef __PYX_HAVE_RT_ImportType_proto_3_2_4
#define __PYX_HAVE_RT_ImportType_proto_3_2_4
#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
#include <stdalign.h>
#endif
#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || __cplusplus >= 201103L
#define __PYX_GET_STRUCT_ALIGNMENT_3_2_4(s) alignof(s)
#else
#define __PYX_GET_STRUCT_ALIGNMENT_3_2_4(s) sizeof(void*)
#endif
enum __Pyx_ImportType_CheckSize_3_2_4 {
   __Pyx_ImportType_CheckSize_Error_3_2_4 = 0,
   __Pyx_ImportType_CheckSize_Warn_3_2_4 = 1,
   __Pyx_ImportType_CheckSize_Ignore_3_2_4 = 2
};
static PyTypeObject *__Pyx_ImportType_3_2_4(PyObject* module, const char *module_name, const char *class_name, size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_2_4 check_size);
#endif

/* ListPack.proto */
static PyObject *__Pyx_PyList_Pack(Py_ssize_t n, ...);

/* Globals.proto */
static PyObject* __Pyx_Globals(void);

/* Py3UpdateBases.proto */
static PyObject* __Pyx_PEP560_update_bases(PyObject *bases);

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

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

/* SetNameInClass.proto */
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030d0000
#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

/* CyFunctionClassCell.proto */
static int __Pyx_CyFunction_InitClassCell(PyObject *cyfunctions, PyObject *classobj);

/* GetNameInClass.proto */
#define __Pyx_GetNameInClass(var, nmspace, name)  (var) = __Pyx__GetNameInClass(nmspace, name)
static PyObject *__Pyx__GetNameInClass(PyObject *nmspace, PyObject *name);

/* ClassMethod.proto */
#if !CYTHON_COMPILING_IN_LIMITED_API
#include "descrobject.h"
#endif
CYTHON_UNUSED static PyObject* __Pyx_Method_ClassMethod(PyObject *method);

/* CLineInTraceback.proto (used by AddTraceback) */
#if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME
static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
#else
#define __Pyx_CLineForTraceback(tstate, c_line)  (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
#endif

/* CodeObjectCache.proto (used by AddTraceback) */
#if CYTHON_COMPILING_IN_LIMITED_API
typedef PyObject __Pyx_CachedCodeObjectType;
#else
typedef PyCodeObject __Pyx_CachedCodeObjectType;
#endif
typedef struct {
    __Pyx_CachedCodeObjectType* code_object;
    int code_line;
} __Pyx_CodeObjectCacheEntry;
struct __Pyx_CodeObjectCache {
    int count;
    int max_count;
    __Pyx_CodeObjectCacheEntry* entries;
  #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    __pyx_atomic_int_type accessor_count;
  #endif
};
static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
static __Pyx_CachedCodeObjectType *__pyx_find_code_object(int code_line);
static void __pyx_insert_code_object(int code_line, __Pyx_CachedCodeObjectType* code_object);

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

/* CheckUnpickleChecksum.proto */
static CYTHON_INLINE int __Pyx_CheckUnpickleChecksum(long checksum, long checksum1, long checksum2, long checksum3, const char *members);

/* LengthHint.proto */
#if CYTHON_COMPILING_IN_LIMITED_API
#define __Pyx_PyObject_LengthHint(o, defaultval)  (defaultval)
#else
#define __Pyx_PyObject_LengthHint(o, defaultval)  PyObject_LengthHint(o, defaultval)
#endif

/* CppExceptionConversion.proto */
#ifndef __Pyx_CppExn2PyErr
#include <new>
#include <typeinfo>
#include <stdexcept>
#include <ios>
static void __Pyx_CppExn2PyErr() {
  try {
    if (PyErr_Occurred())
      ; // let the latest Python exn pass through and ignore the current one
    else
      throw;
  } catch (const std::bad_alloc& exn) {
    PyErr_SetString(PyExc_MemoryError, exn.what());
  } catch (const std::bad_cast& exn) {
    PyErr_SetString(PyExc_TypeError, exn.what());
  } catch (const std::bad_typeid& exn) {
    PyErr_SetString(PyExc_TypeError, exn.what());
  } catch (const std::domain_error& exn) {
    PyErr_SetString(PyExc_ValueError, exn.what());
  } catch (const std::invalid_argument& exn) {
    PyErr_SetString(PyExc_ValueError, exn.what());
  } catch (const std::ios_base::failure& exn) {
    PyErr_SetString(PyExc_IOError, exn.what());
  } catch (const std::out_of_range& exn) {
    PyErr_SetString(PyExc_IndexError, exn.what());
  } catch (const std::overflow_error& exn) {
    PyErr_SetString(PyExc_OverflowError, exn.what());
  } catch (const std::range_error& exn) {
    PyErr_SetString(PyExc_ArithmeticError, exn.what());
  } catch (const std::underflow_error& exn) {
    PyErr_SetString(PyExc_ArithmeticError, exn.what());
  } catch (const std::exception& exn) {
    PyErr_SetString(PyExc_RuntimeError, exn.what());
  }
  catch (...)
  {
    PyErr_SetString(PyExc_RuntimeError, "Unknown exception");
  }
}
#endif

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

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type(enum  arrow::Type::type value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_enum____arrow_3a__3a_UnionMode_3a__3a_type(enum  arrow::UnionMode::type value);

/* CIntFromPy.proto */
static CYTHON_INLINE enum  arrow::Type::type __Pyx_PyLong_As_enum____arrow_3a__3a_Type_3a__3a_type(PyObject *);

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

/* CIntFromPy.proto */
static CYTHON_INLINE int64_t __Pyx_PyLong_As_int64_t(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE enum  arrow::TimeUnit::type __Pyx_PyLong_As_enum____arrow_3a__3a_TimeUnit_3a__3a_type(PyObject *);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_int64_t(int64_t value);

/* CIntFromPy.proto */
static CYTHON_INLINE enum __pyx_t_7pyarrow_3lib_Alignment __Pyx_PyLong_As_enum____pyx_t_7pyarrow_3lib_Alignment(PyObject *);

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

/* CIntFromPy.proto */
static CYTHON_INLINE uint64_t __Pyx_PyLong_As_uint64_t(PyObject *);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_char(char value);

/* CIntFromPy.proto */
static CYTHON_INLINE size_t __Pyx_PyLong_As_size_t(PyObject *);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_int32_t(int32_t value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_int8_t(int8_t value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_enum____arrow_3a__3a_TimeUnit_3a__3a_type(enum  arrow::TimeUnit::type value);

/* CIntFromPy.proto */
static CYTHON_INLINE int8_t __Pyx_PyLong_As_int8_t(PyObject *);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_uint8_t(uint8_t value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_uint16_t(uint16_t value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_int16_t(int16_t value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_uint32_t(uint32_t value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_uint64_t(uint64_t value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_DLDeviceType(DLDeviceType value);

/* CIntFromPy.proto */
static CYTHON_INLINE int32_t __Pyx_PyLong_As_int32_t(PyObject *);

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

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From___arrow_3a__3a_ipc_3a__3a_Alignment( arrow::ipc::Alignment value);

/* CIntFromPy.proto */
static CYTHON_INLINE enum __pyx_t_7pyarrow_3lib_MetadataVersion __Pyx_PyLong_As_enum____pyx_t_7pyarrow_3lib_MetadataVersion(PyObject *);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From___arrow_3a__3a_ipc_3a__3a_MetadataVersion( arrow::ipc::MetadataVersion value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_Alignment(enum __pyx_t_7pyarrow_3lib_Alignment value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_DeviceAllocationType(enum __pyx_t_7pyarrow_3lib_DeviceAllocationType value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_MetadataVersion(enum __pyx_t_7pyarrow_3lib_MetadataVersion value);

/* UpdateUnpickledDict.proto */
static int __Pyx_UpdateUnpickledDict(PyObject *obj, PyObject *state, Py_ssize_t index);

/* FormatTypeName.proto */
#if CYTHON_COMPILING_IN_LIMITED_API
typedef PyObject *__Pyx_TypeName;
#define __Pyx_FMT_TYPENAME "%U"
#define __Pyx_DECREF_TypeName(obj) Py_XDECREF(obj)
#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
#define __Pyx_PyType_GetFullyQualifiedName PyType_GetFullyQualifiedName
#else
static __Pyx_TypeName __Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp);
#endif
#else  // !LIMITED_API
typedef const char *__Pyx_TypeName;
#define __Pyx_FMT_TYPENAME "%.200s"
#define __Pyx_PyType_GetFullyQualifiedName(tp) ((tp)->tp_name)
#define __Pyx_DECREF_TypeName(obj)
#endif

/* GetRuntimeVersion.proto */
#if __PYX_LIMITED_VERSION_HEX < 0x030b0000
static unsigned long __Pyx_cached_runtime_version = 0;
static void __Pyx_init_runtime_version(void);
#else
#define __Pyx_init_runtime_version()
#endif
static unsigned long __Pyx_get_runtime_version(void);

/* IterNextPlain.proto (used by CoroutineBase) */
static CYTHON_INLINE PyObject *__Pyx_PyIter_Next_Plain(PyObject *iterator);
#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
static PyObject *__Pyx_GetBuiltinNext_LimitedAPI(void);
#endif

/* ReturnWithStopIteration.proto (used by CoroutineBase) */
static CYTHON_INLINE void __Pyx_ReturnWithStopIteration(PyObject* value, int async, int iternext);

/* CoroutineBase.proto (used by Generator) */
struct __pyx_CoroutineObject;
typedef PyObject *(*__pyx_coroutine_body_t)(struct __pyx_CoroutineObject *, PyThreadState *, PyObject *);
#if CYTHON_USE_EXC_INFO_STACK
#define __Pyx_ExcInfoStruct  _PyErr_StackItem
#else
typedef struct {
    PyObject *exc_type;
    PyObject *exc_value;
    PyObject *exc_traceback;
} __Pyx_ExcInfoStruct;
#endif
typedef struct __pyx_CoroutineObject {
    PyObject_HEAD
    __pyx_coroutine_body_t body;
    PyObject *closure;
    __Pyx_ExcInfoStruct gi_exc_state;
#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API
    PyObject *gi_weakreflist;
#endif
    PyObject *classobj;
    PyObject *yieldfrom;
    __Pyx_pyiter_sendfunc yieldfrom_am_send;
    PyObject *gi_name;
    PyObject *gi_qualname;
    PyObject *gi_modulename;
    PyObject *gi_code;
    PyObject *gi_frame;
#if CYTHON_USE_SYS_MONITORING && (CYTHON_PROFILE || CYTHON_TRACE)
    PyMonitoringState __pyx_pymonitoring_state[__Pyx_MonitoringEventTypes_CyGen_count];
    uint64_t __pyx_pymonitoring_version;
#endif
    int resume_label;
    char is_running;
} __pyx_CoroutineObject;
static __pyx_CoroutineObject *__Pyx__Coroutine_New(
    PyTypeObject *type, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
    PyObject *name, PyObject *qualname, PyObject *module_name);
static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit(
            __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
            PyObject *name, PyObject *qualname, PyObject *module_name);
static CYTHON_INLINE void __Pyx_Coroutine_ExceptionClear(__Pyx_ExcInfoStruct *self);
static int __Pyx_Coroutine_clear(PyObject *self);
static __Pyx_PySendResult __Pyx_Coroutine_AmSend(PyObject *self, PyObject *value, PyObject **retval);
static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value);
static __Pyx_PySendResult __Pyx_Coroutine_Close(PyObject *self, PyObject **retval);
static PyObject *__Pyx_Coroutine_Throw(PyObject *gen, PyObject *args);
#if CYTHON_USE_EXC_INFO_STACK
#define __Pyx_Coroutine_SwapException(self)
#define __Pyx_Coroutine_ResetAndClearException(self)  __Pyx_Coroutine_ExceptionClear(&(self)->gi_exc_state)
#else
#define __Pyx_Coroutine_SwapException(self) {\
    __Pyx_ExceptionSwap(&(self)->gi_exc_state.exc_type, &(self)->gi_exc_state.exc_value, &(self)->gi_exc_state.exc_traceback);\
    __Pyx_Coroutine_ResetFrameBackpointer(&(self)->gi_exc_state);\
    }
#define __Pyx_Coroutine_ResetAndClearException(self) {\
    __Pyx_ExceptionReset((self)->gi_exc_state.exc_type, (self)->gi_exc_state.exc_value, (self)->gi_exc_state.exc_traceback);\
    (self)->gi_exc_state.exc_type = (self)->gi_exc_state.exc_value = (self)->gi_exc_state.exc_traceback = NULL;\
    }
#endif
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyGen_FetchStopIterationValue(pvalue)\
    __Pyx_PyGen__FetchStopIterationValue(__pyx_tstate, pvalue)
#else
#define __Pyx_PyGen_FetchStopIterationValue(pvalue)\
    __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, pvalue)
#endif
static int __Pyx_PyGen__FetchStopIterationValue(PyThreadState *tstate, PyObject **pvalue);
static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__Pyx_ExcInfoStruct *exc_state);
static char __Pyx_Coroutine_test_and_set_is_running(__pyx_CoroutineObject *gen);
static void __Pyx_Coroutine_unset_is_running(__pyx_CoroutineObject *gen);
static char __Pyx_Coroutine_get_is_running(__pyx_CoroutineObject *gen);
static PyObject *__Pyx_Coroutine_get_is_running_getter(PyObject *gen, void *closure);
#if __PYX_HAS_PY_AM_SEND == 2
static void __Pyx_SetBackportTypeAmSend(PyTypeObject *type, __Pyx_PyAsyncMethodsStruct *static_amsend_methods, __Pyx_pyiter_sendfunc am_send);
#endif
static PyObject *__Pyx_Coroutine_fail_reduce_ex(PyObject *self, PyObject *arg);

/* Generator.proto */
#define __Pyx_Generator_USED
#define __Pyx_Generator_CheckExact(obj) __Pyx_IS_TYPE(obj, __pyx_mstate_global->__pyx_GeneratorType)
#define __Pyx_Generator_New(body, code, closure, name, qualname, module_name)\
    __Pyx__Coroutine_New(__pyx_mstate_global->__pyx_GeneratorType, body, code, closure, name, qualname, module_name)
static PyObject *__Pyx_Generator_Next(PyObject *self);
static int __pyx_Generator_init(PyObject *module);
static CYTHON_INLINE PyObject *__Pyx_Generator_GetInlinedResult(PyObject *self);

/* CheckBinaryVersion.proto */
static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer);

/* DecompressString.proto */
static PyObject *__Pyx_DecompressString(const char *s, Py_ssize_t length, int algo);

/* MultiPhaseInitModuleState.proto */
#if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE
static PyObject *__Pyx_State_FindModule(void*);
static int __Pyx_State_AddModule(PyObject* module, void*);
static int __Pyx_State_RemoveModule(void*);
#elif CYTHON_USE_MODULE_STATE
#define __Pyx_State_FindModule PyState_FindModule
#define __Pyx_State_AddModule PyState_AddModule
#define __Pyx_State_RemoveModule PyState_RemoveModule
#endif

/* #### Code section: module_declarations ### */
/* CythonABIVersion.proto */
#if CYTHON_COMPILING_IN_LIMITED_API
    #if CYTHON_METH_FASTCALL
        #define __PYX_FASTCALL_ABI_SUFFIX  "_fastcall"
    #else
        #define __PYX_FASTCALL_ABI_SUFFIX
    #endif
    #define __PYX_LIMITED_ABI_SUFFIX "limited" __PYX_FASTCALL_ABI_SUFFIX __PYX_AM_SEND_ABI_SUFFIX
#else
    #define __PYX_LIMITED_ABI_SUFFIX
#endif
#if __PYX_HAS_PY_AM_SEND == 1
    #define __PYX_AM_SEND_ABI_SUFFIX
#elif __PYX_HAS_PY_AM_SEND == 2
    #define __PYX_AM_SEND_ABI_SUFFIX "amsendbackport"
#else
    #define __PYX_AM_SEND_ABI_SUFFIX "noamsend"
#endif
#ifndef __PYX_MONITORING_ABI_SUFFIX
    #define __PYX_MONITORING_ABI_SUFFIX
#endif
#if CYTHON_USE_TP_FINALIZE
    #define __PYX_TP_FINALIZE_ABI_SUFFIX
#else
    #define __PYX_TP_FINALIZE_ABI_SUFFIX "nofinalize"
#endif
#if CYTHON_USE_FREELISTS || !defined(__Pyx_AsyncGen_USED)
    #define __PYX_FREELISTS_ABI_SUFFIX
#else
    #define __PYX_FREELISTS_ABI_SUFFIX "nofreelists"
#endif
#define CYTHON_ABI  __PYX_ABI_VERSION __PYX_LIMITED_ABI_SUFFIX __PYX_MONITORING_ABI_SUFFIX __PYX_TP_FINALIZE_ABI_SUFFIX __PYX_FREELISTS_ABI_SUFFIX __PYX_AM_SEND_ABI_SUFFIX
#define __PYX_ABI_MODULE_NAME "_cython_" CYTHON_ABI
#define __PYX_TYPE_MODULE_PREFIX __PYX_ABI_MODULE_NAME "."

#if !CYTHON_COMPILING_IN_LIMITED_API
static CYTHON_INLINE double __pyx_f_7cpython_7complex_7complex_4real_real(PyComplexObject *__pyx_v_self); /* proto*/
#endif
#if !CYTHON_COMPILING_IN_LIMITED_API
static CYTHON_INLINE double __pyx_f_7cpython_7complex_7complex_4imag_imag(PyComplexObject *__pyx_v_self); /* proto*/
#endif
static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4date_4year_year(PyDateTime_Date *__pyx_v_self); /* proto*/
static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4date_5month_month(PyDateTime_Date *__pyx_v_self); /* proto*/
static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4date_3day_day(PyDateTime_Date *__pyx_v_self); /* proto*/
static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4time_4hour_hour(PyDateTime_Time *__pyx_v_self); /* proto*/
static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4time_6minute_minute(PyDateTime_Time *__pyx_v_self); /* proto*/
static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4time_6second_second(PyDateTime_Time *__pyx_v_self); /* proto*/
static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4time_11microsecond_microsecond(PyDateTime_Time *__pyx_v_self); /* proto*/
static CYTHON_INLINE PyObject *__pyx_f_7cpython_8datetime_4time_6tzinfo_tzinfo(PyDateTime_Time *__pyx_v_self); /* proto*/
static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4time_4fold_fold(PyDateTime_Time *__pyx_v_self); /* proto*/
static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_4year_year(PyDateTime_DateTime *__pyx_v_self); /* proto*/
static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_5month_month(PyDateTime_DateTime *__pyx_v_self); /* proto*/
static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_3day_day(PyDateTime_DateTime *__pyx_v_self); /* proto*/
static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_4hour_hour(PyDateTime_DateTime *__pyx_v_self); /* proto*/
static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_6minute_minute(PyDateTime_DateTime *__pyx_v_self); /* proto*/
static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_6second_second(PyDateTime_DateTime *__pyx_v_self); /* proto*/
static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_11microsecond_microsecond(PyDateTime_DateTime *__pyx_v_self); /* proto*/
static CYTHON_INLINE PyObject *__pyx_f_7cpython_8datetime_8datetime_6tzinfo_tzinfo(PyDateTime_DateTime *__pyx_v_self); /* proto*/
static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_4fold_fold(PyDateTime_DateTime *__pyx_v_self); /* proto*/
static CYTHON_INLINE int __pyx_f_7cpython_8datetime_9timedelta_3day_day(PyDateTime_Delta *__pyx_v_self); /* proto*/
static CYTHON_INLINE int __pyx_f_7cpython_8datetime_9timedelta_6second_second(PyDateTime_Delta *__pyx_v_self); /* proto*/
static CYTHON_INLINE int __pyx_f_7cpython_8datetime_9timedelta_11microsecond_microsecond(PyDateTime_Delta *__pyx_v_self); /* proto*/
static void __pyx_f_7pyarrow_3lib_9StopToken_init(struct __pyx_obj_7pyarrow_3lib_StopToken *__pyx_v_self, arrow::StopToken __pyx_v_stop_token); /* proto*/
static PyObject *__pyx_f_7pyarrow_3lib_14_PandasAPIShim__import_pandas(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self, int __pyx_v_raise_); /* proto*/
static CYTHON_INLINE PyObject *__pyx_f_7pyarrow_3lib_14_PandasAPIShim__check_import(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self, struct __pyx_opt_args_7pyarrow_3lib_14_PandasAPIShim__check_import *__pyx_optional_args); /* proto*/
static CYTHON_INLINE int __pyx_f_7pyarrow_3lib_14_PandasAPIShim__have_pandas_internal(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self); /* proto*/
static PyObject *__pyx_f_7pyarrow_3lib_14_PandasAPIShim_infer_dtype(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_7pyarrow_3lib_14_PandasAPIShim_pandas_dtype(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self, PyObject *__pyx_v_dtype, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_7pyarrow_3lib_14_PandasAPIShim_is_array_like(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_7pyarrow_3lib_14_PandasAPIShim_is_categorical(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_7pyarrow_3lib_14_PandasAPIShim_is_datetimetz(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_7pyarrow_3lib_14_PandasAPIShim_is_extension_array_dtype(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_7pyarrow_3lib_14_PandasAPIShim_is_sparse(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_7pyarrow_3lib_14_PandasAPIShim_is_data_frame(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_7pyarrow_3lib_14_PandasAPIShim_is_series(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_7pyarrow_3lib_14_PandasAPIShim_is_index(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_7pyarrow_3lib_14_PandasAPIShim_get_values(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_skip_dispatch); /* proto*/
static void __pyx_f_7pyarrow_3lib_10MemoryPool_init(struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_self,  arrow::MemoryPool *__pyx_v_pool); /* proto*/
static void __pyx_f_7pyarrow_3lib_6Device_init(struct __pyx_obj_7pyarrow_3lib_Device *__pyx_v_self, std::shared_ptr< arrow::Device>  const &__pyx_v_device); /* proto*/
static PyObject *__pyx_f_7pyarrow_3lib_6Device_wrap(std::shared_ptr< arrow::Device>  const &__pyx_v_device); /* proto*/
static CYTHON_INLINE std::shared_ptr< arrow::Device>  __pyx_f_7pyarrow_3lib_6Device_unwrap(struct __pyx_obj_7pyarrow_3lib_Device *__pyx_v_self); /* proto*/
static void __pyx_f_7pyarrow_3lib_13MemoryManager_init(struct __pyx_obj_7pyarrow_3lib_MemoryManager *__pyx_v_self, std::shared_ptr< arrow::MemoryManager>  const &__pyx_v_mm); /* proto*/
static PyObject *__pyx_f_7pyarrow_3lib_13MemoryManager_wrap(std::shared_ptr< arrow::MemoryManager>  const &__pyx_v_mm); /* proto*/
static CYTHON_INLINE std::shared_ptr< arrow::MemoryManager>  __pyx_f_7pyarrow_3lib_13MemoryManager_unwrap(struct __pyx_obj_7pyarrow_3lib_MemoryManager *__pyx_v_self); /* proto*/
static void __pyx_f_7pyarrow_3lib_8DataType_init(struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v_self, std::shared_ptr< arrow::DataType>  const &__pyx_v_type); /* proto*/
static struct __pyx_obj_7pyarrow_3lib_Field *__pyx_f_7pyarrow_3lib_8DataType_field(struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v_self, PyObject *__pyx_v_i, int __pyx_skip_dispatch); /* proto*/
static void __pyx_f_7pyarrow_3lib_14DictionaryType_init(struct __pyx_obj_7pyarrow_3lib_DictionaryType *__pyx_v_self, std::shared_ptr< arrow::DataType>  const &__pyx_v_type); /* proto*/
static void __pyx_f_7pyarrow_3lib_8ListType_init(struct __pyx_obj_7pyarrow_3lib_ListType *__pyx_v_self, std::shared_ptr< arrow::DataType>  const &__pyx_v_type); /* proto*/
static void __pyx_f_7pyarrow_3lib_13LargeListType_init(struct __pyx_obj_7pyarrow_3lib_LargeListType *__pyx_v_self, std::shared_ptr< arrow::DataType>  const &__pyx_v_type); /* proto*/
static void __pyx_f_7pyarrow_3lib_12ListViewType_init(struct __pyx_obj_7pyarrow_3lib_ListViewType *__pyx_v_self, std::shared_ptr< arrow::DataType>  const &__pyx_v_type); /* proto*/
static void __pyx_f_7pyarrow_3lib_17LargeListViewType_init(struct __pyx_obj_7pyarrow_3lib_LargeListViewType *__pyx_v_self, std::shared_ptr< arrow::DataType>  const &__pyx_v_type); /* proto*/
static void __pyx_f_7pyarrow_3lib_7MapType_init(struct __pyx_obj_7pyarrow_3lib_MapType *__pyx_v_self, std::shared_ptr< arrow::DataType>  const &__pyx_v_type); /* proto*/
static void __pyx_f_7pyarrow_3lib_17FixedSizeListType_init(struct __pyx_obj_7pyarrow_3lib_FixedSizeListType *__pyx_v_self, std::shared_ptr< arrow::DataType>  const &__pyx_v_type); /* proto*/
static void __pyx_f_7pyarrow_3lib_10StructType_init(struct __pyx_obj_7pyarrow_3lib_StructType *__pyx_v_self, std::shared_ptr< arrow::DataType>  const &__pyx_v_type); /* proto*/
static struct __pyx_obj_7pyarrow_3lib_Field *__pyx_f_7pyarrow_3lib_10StructType_field_by_name(struct __pyx_obj_7pyarrow_3lib_StructType *__pyx_v_self, PyObject *__pyx_v_name); /* proto*/
static struct __pyx_obj_7pyarrow_3lib_Field *__pyx_f_7pyarrow_3lib_10StructType_field(struct __pyx_obj_7pyarrow_3lib_StructType *__pyx_v_self, PyObject *__pyx_v_i, int __pyx_skip_dispatch); /* proto*/
static void __pyx_f_7pyarrow_3lib_9UnionType_init(struct __pyx_obj_7pyarrow_3lib_UnionType *__pyx_v_self, std::shared_ptr< arrow::DataType>  const &__pyx_v_type); /* proto*/
static struct __pyx_obj_7pyarrow_3lib_Field *__pyx_f_7pyarrow_3lib_9UnionType_field(struct __pyx_obj_7pyarrow_3lib_UnionType *__pyx_v_self, PyObject *__pyx_v_i, int __pyx_skip_dispatch); /* proto*/
static void __pyx_f_7pyarrow_3lib_13TimestampType_init(struct __pyx_obj_7pyarrow_3lib_TimestampType *__pyx_v_self, std::shared_ptr< arrow::DataType>  const &__pyx_v_type); /* proto*/
static void __pyx_f_7pyarrow_3lib_10Time32Type_init(struct __pyx_obj_7pyarrow_3lib_Time32Type *__pyx_v_self, std::shared_ptr< arrow::DataType>  const &__pyx_v_type); /* proto*/
static void __pyx_f_7pyarrow_3lib_10Time64Type_init(struct __pyx_obj_7pyarrow_3lib_Time64Type *__pyx_v_self, std::shared_ptr< arrow::DataType>  const &__pyx_v_type); /* proto*/
static void __pyx_f_7pyarrow_3lib_12DurationType_init(struct __pyx_obj_7pyarrow_3lib_DurationType *__pyx_v_self, std::shared_ptr< arrow::DataType>  const &__pyx_v_type); /* proto*/
static void __pyx_f_7pyarrow_3lib_19FixedSizeBinaryType_init(struct __pyx_obj_7pyarrow_3lib_FixedSizeBinaryType *__pyx_v_self, std::shared_ptr< arrow::DataType>  const &__pyx_v_type); /* proto*/
static void __pyx_f_7pyarrow_3lib_13Decimal32Type_init(struct __pyx_obj_7pyarrow_3lib_Decimal32Type *__pyx_v_self, std::shared_ptr< arrow::DataType>  const &__pyx_v_type); /* proto*/
static void __pyx_f_7pyarrow_3lib_13Decimal64Type_init(struct __pyx_obj_7pyarrow_3lib_Decimal64Type *__pyx_v_self, std::shared_ptr< arrow::DataType>  const &__pyx_v_type); /* proto*/
static void __pyx_f_7pyarrow_3lib_14Decimal128Type_init(struct __pyx_obj_7pyarrow_3lib_Decimal128Type *__pyx_v_self, std::shared_ptr< arrow::DataType>  const &__pyx_v_type); /* proto*/
static void __pyx_f_7pyarrow_3lib_14Decimal256Type_init(struct __pyx_obj_7pyarrow_3lib_Decimal256Type *__pyx_v_self, std::shared_ptr< arrow::DataType>  const &__pyx_v_type); /* proto*/
static void __pyx_f_7pyarrow_3lib_17RunEndEncodedType_init(struct __pyx_obj_7pyarrow_3lib_RunEndEncodedType *__pyx_v_self, std::shared_ptr< arrow::DataType>  const &__pyx_v_type); /* proto*/
static void __pyx_f_7pyarrow_3lib_17BaseExtensionType_init(struct __pyx_obj_7pyarrow_3lib_BaseExtensionType *__pyx_v_self, std::shared_ptr< arrow::DataType>  const &__pyx_v_type); /* proto*/
static void __pyx_f_7pyarrow_3lib_13ExtensionType_init(struct __pyx_obj_7pyarrow_3lib_ExtensionType *__pyx_v_self, std::shared_ptr< arrow::DataType>  const &__pyx_v_type); /* proto*/
static void __pyx_f_7pyarrow_3lib_8JsonType_init(struct __pyx_obj_7pyarrow_3lib_JsonType *__pyx_v_self, std::shared_ptr< arrow::DataType>  const &__pyx_v_type); /* proto*/
static void __pyx_f_7pyarrow_3lib_8UuidType_init(struct __pyx_obj_7pyarrow_3lib_UuidType *__pyx_v_self, std::shared_ptr< arrow::DataType>  const &__pyx_v_type); /* proto*/
static void __pyx_f_7pyarrow_3lib_20FixedShapeTensorType_init(struct __pyx_obj_7pyarrow_3lib_FixedShapeTensorType *__pyx_v_self, std::shared_ptr< arrow::DataType>  const &__pyx_v_type); /* proto*/
static void __pyx_f_7pyarrow_3lib_9Bool8Type_init(struct __pyx_obj_7pyarrow_3lib_Bool8Type *__pyx_v_self, std::shared_ptr< arrow::DataType>  const &__pyx_v_type); /* proto*/
static void __pyx_f_7pyarrow_3lib_10OpaqueType_init(struct __pyx_obj_7pyarrow_3lib_OpaqueType *__pyx_v_self, std::shared_ptr< arrow::DataType>  const &__pyx_v_type); /* proto*/
static void __pyx_f_7pyarrow_3lib_16KeyValueMetadata_init(struct __pyx_obj_7pyarrow_3lib_KeyValueMetadata *__pyx_v_self, std::shared_ptr< arrow::KeyValueMetadata const >  const &__pyx_v_wrapped); /* proto*/
static PyObject *__pyx_f_7pyarrow_3lib_16KeyValueMetadata_wrap(std::shared_ptr< arrow::KeyValueMetadata const >  const &__pyx_v_sp); /* proto*/
static CYTHON_INLINE std::shared_ptr< arrow::KeyValueMetadata const >  __pyx_f_7pyarrow_3lib_16KeyValueMetadata_unwrap(struct __pyx_obj_7pyarrow_3lib_KeyValueMetadata *__pyx_v_self); /* proto*/
static void __pyx_f_7pyarrow_3lib_5Field_init(struct __pyx_obj_7pyarrow_3lib_Field *__pyx_v_self, std::shared_ptr< arrow::Field>  const &__pyx_v_field); /* proto*/
static void __pyx_f_7pyarrow_3lib_6Schema_init(struct __pyx_obj_7pyarrow_3lib_Schema *__pyx_v_self, std::vector<std::shared_ptr< arrow::Field> >  const &__pyx_v_fields); /* proto*/
static void __pyx_f_7pyarrow_3lib_6Schema_init_schema(struct __pyx_obj_7pyarrow_3lib_Schema *__pyx_v_self, std::shared_ptr< arrow::Schema>  const &__pyx_v_schema); /* proto*/
static void __pyx_f_7pyarrow_3lib_6Scalar_init(struct __pyx_obj_7pyarrow_3lib_Scalar *__pyx_v_self, std::shared_ptr< arrow::Scalar>  const &__pyx_v_wrapped); /* proto*/
static PyObject *__pyx_f_7pyarrow_3lib_6Scalar_wrap(std::shared_ptr< arrow::Scalar>  const &__pyx_v_wrapped); /* proto*/
static CYTHON_INLINE std::shared_ptr< arrow::Scalar>  __pyx_f_7pyarrow_3lib_6Scalar_unwrap(struct __pyx_obj_7pyarrow_3lib_Scalar *__pyx_v_self); /* proto*/
static void __pyx_f_7pyarrow_3lib_15ArrayStatistics_init(struct __pyx_obj_7pyarrow_3lib_ArrayStatistics *__pyx_v_self, std::shared_ptr< arrow::ArrayStatistics>  const &__pyx_v_sp_statistics); /* proto*/
static PyObject *__pyx_f_7pyarrow_3lib_15ArrayStatistics__get_value(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_ArrayStatistics *__pyx_v_self, std::optional< std::variant<bool, int64_t, uint64_t, double, std::string>>  const &__pyx_v_optional_value); /* proto*/
static void __pyx_f_7pyarrow_3lib_5Array_init(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self, std::shared_ptr< arrow::Array>  const &__pyx_v_sp_array); /* proto*/
static int64_t __pyx_f_7pyarrow_3lib_5Array_length(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self); /* proto*/
static PyObject *__pyx_f_7pyarrow_3lib_5Array_getitem(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self, int64_t __pyx_v_i); /* proto*/
static void __pyx_f_7pyarrow_3lib_5Array__assert_cpu(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self); /* proto*/
static void __pyx_f_7pyarrow_3lib_12ChunkedArray_init(struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_self, std::shared_ptr< arrow::ChunkedArray>  const &__pyx_v_chunked_array); /* proto*/
static PyObject *__pyx_f_7pyarrow_3lib_12ChunkedArray_getitem(struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_self, int64_t __pyx_v_i); /* proto*/
static void __pyx_f_7pyarrow_3lib_8_Tabular__assert_cpu(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib__Tabular *__pyx_v_self); /* proto*/
static void __pyx_f_7pyarrow_3lib_11RecordBatch_init(struct __pyx_obj_7pyarrow_3lib_RecordBatch *__pyx_v_self, std::shared_ptr< arrow::RecordBatch>  const &__pyx_v_batch); /* proto*/
static void __pyx_f_7pyarrow_3lib_11RecordBatch__assert_cpu(struct __pyx_obj_7pyarrow_3lib_RecordBatch *__pyx_v_self); /* proto*/
static void __pyx_f_7pyarrow_3lib_5Table_init(struct __pyx_obj_7pyarrow_3lib_Table *__pyx_v_self, std::shared_ptr< arrow::Table>  const &__pyx_v_table); /* proto*/
static void __pyx_f_7pyarrow_3lib_5Table__assert_cpu(struct __pyx_obj_7pyarrow_3lib_Table *__pyx_v_self); /* proto*/
static void __pyx_f_7pyarrow_3lib_6Tensor_init(struct __pyx_obj_7pyarrow_3lib_Tensor *__pyx_v_self, std::shared_ptr< arrow::Tensor>  const &__pyx_v_sp_tensor); /* proto*/
static void __pyx_f_7pyarrow_3lib_15SparseCOOTensor_init(struct __pyx_obj_7pyarrow_3lib_SparseCOOTensor *__pyx_v_self, std::shared_ptr< arrow::SparseCOOTensor>  const &__pyx_v_sp_sparse_tensor); /* proto*/
static void __pyx_f_7pyarrow_3lib_15SparseCSRMatrix_init(struct __pyx_obj_7pyarrow_3lib_SparseCSRMatrix *__pyx_v_self, std::shared_ptr< arrow::SparseCSRMatrix>  const &__pyx_v_sp_sparse_tensor); /* proto*/
static void __pyx_f_7pyarrow_3lib_15SparseCSCMatrix_init(struct __pyx_obj_7pyarrow_3lib_SparseCSCMatrix *__pyx_v_self, std::shared_ptr< arrow::SparseCSCMatrix>  const &__pyx_v_sp_sparse_tensor); /* proto*/
static void __pyx_f_7pyarrow_3lib_15SparseCSFTensor_init(struct __pyx_obj_7pyarrow_3lib_SparseCSFTensor *__pyx_v_self, std::shared_ptr< arrow::SparseCSFTensor>  const &__pyx_v_sp_sparse_tensor); /* proto*/
static PyObject *__pyx_f_7pyarrow_3lib_10NativeFile_set_random_access_file(struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_self, std::shared_ptr< arrow::io::RandomAccessFile>  __pyx_v_handle); /* proto*/
static PyObject *__pyx_f_7pyarrow_3lib_10NativeFile_set_input_stream(struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_self, std::shared_ptr< arrow::io::InputStream>  __pyx_v_handle); /* proto*/
static PyObject *__pyx_f_7pyarrow_3lib_10NativeFile_set_output_stream(struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_self, std::shared_ptr< arrow::io::OutputStream>  __pyx_v_handle); /* proto*/
static std::shared_ptr< arrow::io::RandomAccessFile>  __pyx_f_7pyarrow_3lib_10NativeFile_get_random_access_file(struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_self); /* proto*/
static std::shared_ptr< arrow::io::InputStream>  __pyx_f_7pyarrow_3lib_10NativeFile_get_input_stream(struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_self); /* proto*/
static std::shared_ptr< arrow::io::OutputStream>  __pyx_f_7pyarrow_3lib_10NativeFile_get_output_stream(struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_self); /* proto*/
static PyObject *__pyx_f_7pyarrow_3lib_6OSFile__open_readable(struct __pyx_obj_7pyarrow_3lib_OSFile *__pyx_v_self, std::string __pyx_v_path,  arrow::MemoryPool *__pyx_v_pool); /* proto*/
static PyObject *__pyx_f_7pyarrow_3lib_6OSFile__open_writable(struct __pyx_obj_7pyarrow_3lib_OSFile *__pyx_v_self, std::string __pyx_v_path, struct __pyx_opt_args_7pyarrow_3lib_6OSFile__open_writable *__pyx_optional_args); /* proto*/
static void __pyx_f_7pyarrow_3lib_6Buffer_init(struct __pyx_obj_7pyarrow_3lib_Buffer *__pyx_v_self, std::shared_ptr< arrow::Buffer>  const &__pyx_v_buffer); /* proto*/
static PyObject *__pyx_f_7pyarrow_3lib_6Buffer_getitem(struct __pyx_obj_7pyarrow_3lib_Buffer *__pyx_v_self, int64_t __pyx_v_i); /* proto*/
static void __pyx_f_7pyarrow_3lib_15ResizableBuffer_init_rz(struct __pyx_obj_7pyarrow_3lib_ResizableBuffer *__pyx_v_self, std::shared_ptr< arrow::ResizableBuffer>  const &__pyx_v_buffer); /* proto*/
static std::shared_ptr< arrow::io::InputStream>  __pyx_f_7pyarrow_3lib_20TransformInputStream_make_native(std::shared_ptr< arrow::io::InputStream>  __pyx_v_stream, PyObject *__pyx_v_transform_func); /* proto*/
static void __pyx_f_7pyarrow_3lib_12CacheOptions_init(struct __pyx_obj_7pyarrow_3lib_CacheOptions *__pyx_v_self, arrow::io::CacheOptions __pyx_v_options); /* proto*/
static CYTHON_INLINE arrow::io::CacheOptions __pyx_f_7pyarrow_3lib_12CacheOptions_unwrap(struct __pyx_obj_7pyarrow_3lib_CacheOptions *__pyx_v_self); /* proto*/
static PyObject *__pyx_f_7pyarrow_3lib_12CacheOptions_wrap(arrow::io::CacheOptions __pyx_v_options); /* proto*/
static CYTHON_INLINE  arrow::util::Codec *__pyx_f_7pyarrow_3lib_5Codec_unwrap(struct __pyx_obj_7pyarrow_3lib_Codec *__pyx_v_self); /* proto*/

/* Module declarations from "cpython.version" */

/* Module declarations from "__builtin__" */

/* Module declarations from "cpython.type" */

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

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

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

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

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

/* Module declarations from "cpython.module" */

/* Module declarations from "cpython.mem" */

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

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

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

/* Module declarations from "cpython.mapping" */

/* Module declarations from "cpython.iterator" */

/* Module declarations from "cpython.number" */

/* Module declarations from "__builtin__" */

/* Module declarations from "cpython.bool" */

/* Module declarations from "cpython.long" */

/* Module declarations from "cpython.float" */

/* Module declarations from "cython" */

/* Module declarations from "__builtin__" */

/* Module declarations from "cpython.complex" */

/* Module declarations from "libc.stddef" */

/* Module declarations from "cpython.unicode" */

/* Module declarations from "cpython.pyport" */

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

/* Module declarations from "cpython.instance" */

/* Module declarations from "cpython.function" */

/* Module declarations from "cpython.method" */

/* Module declarations from "cpython.weakref" */

/* Module declarations from "cpython.getargs" */

/* Module declarations from "cpython.pythread" */

/* Module declarations from "cpython.pystate" */

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

/* Module declarations from "cpython.buffer" */

/* Module declarations from "cpython.bytes" */

/* Module declarations from "cpython.pycapsule" */

/* Module declarations from "cpython.contextvars" */

/* Module declarations from "cpython" */

/* Module declarations from "cpython.slice" */

/* Module declarations from "libcpp" */

/* Module declarations from "libcpp.cast" */

/* Module declarations from "libcpp.memory" */

/* Module declarations from "libcpp.utility" */

/* Module declarations from "libc.stdint" */

/* Module declarations from "libcpp.functional" */

/* Module declarations from "libcpp.optional" */

/* Module declarations from "libcpp.string_view" */

/* Module declarations from "libcpp.string" */

/* Module declarations from "libcpp.vector" */

/* Module declarations from "libcpp.unordered_map" */

/* Module declarations from "libcpp.unordered_set" */

/* Module declarations from "datetime" */

/* Module declarations from "cpython.datetime" */

/* Module declarations from "pyarrow.includes.common" */
static CYTHON_INLINE PyObject *__pyx_f_7pyarrow_8includes_6common_PyObject_to_object(PyObject *); /*proto*/

/* Module declarations from "pyarrow.includes.libarrow" */

/* Module declarations from "pyarrow.includes.libarrow_python" */

/* Module declarations from "libc.stdlib" */

/* Module declarations from "cpython.bytearray" */

/* Module declarations from "pyarrow.lib" */
static bool __pyx_v_7pyarrow_3lib_signal_handlers_enabled;
static struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_7pyarrow_3lib_pandas_api = 0;
static struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_7pyarrow_3lib__default_memory_pool = 0;
static struct __pyx_obj_7pyarrow_3lib_LoggingMemoryPool *__pyx_v_7pyarrow_3lib__logging_memory_pool = 0;
static PyObject *__pyx_v_7pyarrow_3lib__pandas_type_map = 0;
static PyObject *__pyx_v_7pyarrow_3lib__pep3118_type_map = 0;
static PyObject *__pyx_v_7pyarrow_3lib__type_cache = 0;
static PyObject *__pyx_v_7pyarrow_3lib_PRIMITIVE_TYPES = 0;
static PyObject *__pyx_v_7pyarrow_3lib__timestamp_type_cache = 0;
static PyObject *__pyx_v_7pyarrow_3lib__time_type_cache = 0;
static PyObject *__pyx_v_7pyarrow_3lib__duration_type_cache = 0;
static PyObject *__pyx_v_7pyarrow_3lib__type_aliases = 0;
static PyObject *__pyx_v_7pyarrow_3lib__scalar_classes = 0;
static PyObject *__pyx_v_7pyarrow_3lib__array_classes = 0;
static PyObject *__Pyx_EnumBase = 0;
static PyObject *__Pyx_FlagBase = 0;
static int __pyx_f_7pyarrow_3lib_check_status(arrow::Status const &); /*proto*/
static PyObject *__pyx_f_7pyarrow_3lib_convert_status(arrow::Status const &); /*proto*/
static PyObject *__pyx_f_7pyarrow_3lib__wrap_read_stats( arrow::ipc::ReadStats); /*proto*/
static  arrow::MemoryPool *__pyx_f_7pyarrow_3lib_maybe_unbox_memory_pool(struct __pyx_obj_7pyarrow_3lib_MemoryPool *); /*proto*/
static PyObject *__pyx_f_7pyarrow_3lib_box_memory_pool( arrow::MemoryPool *); /*proto*/
static PyObject *__pyx_f_7pyarrow_3lib_wrap_array_output(PyObject *); /*proto*/
static PyObject *__pyx_f_7pyarrow_3lib_get_input_stream(PyObject *, bool, std::shared_ptr< arrow::io::InputStream>  *); /*proto*/
static PyObject *__pyx_f_7pyarrow_3lib_get_reader(PyObject *, bool, std::shared_ptr< arrow::io::RandomAccessFile>  *); /*proto*/
static PyObject *__pyx_f_7pyarrow_3lib_get_writer(PyObject *, std::shared_ptr< arrow::io::OutputStream>  *); /*proto*/
static struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_f_7pyarrow_3lib_get_native_file(PyObject *, bool); /*proto*/
static struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_f_7pyarrow_3lib_ensure_type(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7pyarrow_3lib_ensure_type *__pyx_optional_args); /*proto*/
static struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_f_7pyarrow_3lib_primitive_type(enum  arrow::Type::type); /*proto*/
static PyObject *__pyx_f_7pyarrow_3lib_timeunit_to_string(enum  arrow::TimeUnit::type); /*proto*/
static enum  arrow::TimeUnit::type __pyx_f_7pyarrow_3lib_string_to_timeunit(PyObject *); /*proto*/
static std::shared_ptr< arrow::KeyValueMetadata const >  __pyx_f_7pyarrow_3lib_pyarrow_unwrap_metadata(PyObject *); /*proto*/
static PyObject *__pyx_f_7pyarrow_3lib_pyarrow_wrap_metadata(std::shared_ptr< arrow::KeyValueMetadata const >  const &); /*proto*/
static  arrow::Field::MergeOptions __pyx_f_7pyarrow_3lib__parse_field_merge_options(PyObject *); /*proto*/
__PYX_EXTERN_C PyObject *pyarrow_wrap_buffer(std::shared_ptr< arrow::Buffer>  const &); /*proto*/
__PYX_EXTERN_C PyObject *pyarrow_wrap_resizable_buffer(std::shared_ptr< arrow::ResizableBuffer>  const &); /*proto*/
__PYX_EXTERN_C PyObject *pyarrow_wrap_data_type(std::shared_ptr< arrow::DataType>  const &); /*proto*/
__PYX_EXTERN_C PyObject *pyarrow_wrap_field(std::shared_ptr< arrow::Field>  const &); /*proto*/
__PYX_EXTERN_C PyObject *pyarrow_wrap_schema(std::shared_ptr< arrow::Schema>  const &); /*proto*/
__PYX_EXTERN_C PyObject *pyarrow_wrap_scalar(std::shared_ptr< arrow::Scalar>  const &); /*proto*/
__PYX_EXTERN_C PyObject *pyarrow_wrap_array(std::shared_ptr< arrow::Array>  const &); /*proto*/
__PYX_EXTERN_C PyObject *pyarrow_wrap_chunked_array(std::shared_ptr< arrow::ChunkedArray>  const &); /*proto*/
__PYX_EXTERN_C PyObject *pyarrow_wrap_sparse_coo_tensor(std::shared_ptr< arrow::SparseCOOTensor>  const &); /*proto*/
__PYX_EXTERN_C PyObject *pyarrow_wrap_sparse_csc_matrix(std::shared_ptr< arrow::SparseCSCMatrix>  const &); /*proto*/
__PYX_EXTERN_C PyObject *pyarrow_wrap_sparse_csf_tensor(std::shared_ptr< arrow::SparseCSFTensor>  const &); /*proto*/
__PYX_EXTERN_C PyObject *pyarrow_wrap_sparse_csr_matrix(std::shared_ptr< arrow::SparseCSRMatrix>  const &); /*proto*/
__PYX_EXTERN_C PyObject *pyarrow_wrap_tensor(std::shared_ptr< arrow::Tensor>  const &); /*proto*/
__PYX_EXTERN_C PyObject *pyarrow_wrap_batch(std::shared_ptr< arrow::RecordBatch>  const &); /*proto*/
__PYX_EXTERN_C PyObject *pyarrow_wrap_table(std::shared_ptr< arrow::Table>  const &); /*proto*/
__PYX_EXTERN_C std::shared_ptr< arrow::Buffer>  pyarrow_unwrap_buffer(PyObject *); /*proto*/
__PYX_EXTERN_C std::shared_ptr< arrow::DataType>  pyarrow_unwrap_data_type(PyObject *); /*proto*/
__PYX_EXTERN_C std::shared_ptr< arrow::Field>  pyarrow_unwrap_field(PyObject *); /*proto*/
__PYX_EXTERN_C std::shared_ptr< arrow::Schema>  pyarrow_unwrap_schema(PyObject *); /*proto*/
__PYX_EXTERN_C std::shared_ptr< arrow::Scalar>  pyarrow_unwrap_scalar(PyObject *); /*proto*/
__PYX_EXTERN_C std::shared_ptr< arrow::Array>  pyarrow_unwrap_array(PyObject *); /*proto*/
__PYX_EXTERN_C std::shared_ptr< arrow::ChunkedArray>  pyarrow_unwrap_chunked_array(PyObject *); /*proto*/
__PYX_EXTERN_C std::shared_ptr< arrow::SparseCOOTensor>  pyarrow_unwrap_sparse_coo_tensor(PyObject *); /*proto*/
__PYX_EXTERN_C std::shared_ptr< arrow::SparseCSCMatrix>  pyarrow_unwrap_sparse_csc_matrix(PyObject *); /*proto*/
__PYX_EXTERN_C std::shared_ptr< arrow::SparseCSFTensor>  pyarrow_unwrap_sparse_csf_tensor(PyObject *); /*proto*/
__PYX_EXTERN_C std::shared_ptr< arrow::SparseCSRMatrix>  pyarrow_unwrap_sparse_csr_matrix(PyObject *); /*proto*/
__PYX_EXTERN_C std::shared_ptr< arrow::Tensor>  pyarrow_unwrap_tensor(PyObject *); /*proto*/
__PYX_EXTERN_C std::shared_ptr< arrow::RecordBatch>  pyarrow_unwrap_batch(PyObject *); /*proto*/
__PYX_EXTERN_C std::shared_ptr< arrow::Table>  pyarrow_unwrap_table(PyObject *); /*proto*/
static int __pyx_f_7pyarrow_3lib_pyarrow_internal_check_status(arrow::Status const &); /*proto*/
static PyObject *__pyx_f_7pyarrow_3lib_pyarrow_internal_convert_status(arrow::Status const &); /*proto*/
static PyObject *__pyx_f_7pyarrow_3lib__wrap_device_allocation_type(arrow::DeviceAllocationType); /*proto*/
static PyObject *__pyx_f_7pyarrow_3lib__datatype_to_pep3118( arrow::DataType *); /*proto*/
static void *__pyx_f_7pyarrow_3lib__as_c_pointer(PyObject *, struct __pyx_opt_args_7pyarrow_3lib__as_c_pointer *__pyx_optional_args); /*proto*/
static struct __pyx_obj_7pyarrow_3lib_KeyValueMetadata *__pyx_f_7pyarrow_3lib_ensure_metadata(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7pyarrow_3lib_ensure_metadata *__pyx_optional_args); /*proto*/
static struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_f_7pyarrow_3lib_decimal32(int, int __pyx_skip_dispatch, struct __pyx_opt_args_7pyarrow_3lib_decimal32 *__pyx_optional_args); /*proto*/
static struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_f_7pyarrow_3lib_decimal64(int, int __pyx_skip_dispatch, struct __pyx_opt_args_7pyarrow_3lib_decimal64 *__pyx_optional_args); /*proto*/
static struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_f_7pyarrow_3lib_decimal128(int, int __pyx_skip_dispatch, struct __pyx_opt_args_7pyarrow_3lib_decimal128 *__pyx_optional_args); /*proto*/
static struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_f_7pyarrow_3lib_decimal256(int, int __pyx_skip_dispatch, struct __pyx_opt_args_7pyarrow_3lib_decimal256 *__pyx_optional_args); /*proto*/
static struct __pyx_obj_7pyarrow_3lib_LargeListType *__pyx_f_7pyarrow_3lib_large_list(PyObject *, int __pyx_skip_dispatch); /*proto*/
static struct __pyx_obj_7pyarrow_3lib_ListViewType *__pyx_f_7pyarrow_3lib_list_view(PyObject *, int __pyx_skip_dispatch); /*proto*/
static struct __pyx_obj_7pyarrow_3lib_LargeListViewType *__pyx_f_7pyarrow_3lib_large_list_view(PyObject *, int __pyx_skip_dispatch); /*proto*/
static struct __pyx_obj_7pyarrow_3lib_MapType *__pyx_f_7pyarrow_3lib_map_(PyObject *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7pyarrow_3lib_map_ *__pyx_optional_args); /*proto*/
static struct __pyx_obj_7pyarrow_3lib_DictionaryType *__pyx_f_7pyarrow_3lib_dictionary(PyObject *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7pyarrow_3lib_dictionary *__pyx_optional_args); /*proto*/
static PyObject *__pyx_f_7pyarrow_3lib__extract_union_params(PyObject *, PyObject *, std::vector<std::shared_ptr< arrow::Field> >  *, std::vector<int8_t>  *); /*proto*/
static void __pyx_f_7pyarrow_3lib_pycapsule_schema_deleter(PyObject *); /*proto*/
static PyObject *__pyx_f_7pyarrow_3lib_alloc_c_schema(struct ArrowSchema **); /*proto*/
static void __pyx_f_7pyarrow_3lib_pycapsule_array_deleter(PyObject *); /*proto*/
static PyObject *__pyx_f_7pyarrow_3lib_alloc_c_array(struct ArrowArray **); /*proto*/
static void __pyx_f_7pyarrow_3lib_pycapsule_stream_deleter(PyObject *); /*proto*/
static PyObject *__pyx_f_7pyarrow_3lib_alloc_c_stream(struct ArrowArrayStream **); /*proto*/
static void __pyx_f_7pyarrow_3lib_pycapsule_device_array_deleter(PyObject *); /*proto*/
static PyObject *__pyx_f_7pyarrow_3lib_alloc_c_device_array(struct ArrowDeviceArray **); /*proto*/
static PyObject *__pyx_f_7pyarrow_3lib_get_scalar_class_from_type(std::shared_ptr< arrow::DataType>  const &); /*proto*/
static PyObject *__pyx_f_7pyarrow_3lib__sequence_to_array(PyObject *, PyObject *, PyObject *, struct __pyx_obj_7pyarrow_3lib_DataType *,  arrow::MemoryPool *, bool); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_7pyarrow_3lib__is_array_like(PyObject *); /*proto*/
static std::shared_ptr< arrow::DataType>  __pyx_f_7pyarrow_3lib__ndarray_to_type(PyObject *, struct __pyx_obj_7pyarrow_3lib_DataType *); /*proto*/
static PyObject *__pyx_f_7pyarrow_3lib__ndarray_to_array(PyObject *, PyObject *, struct __pyx_obj_7pyarrow_3lib_DataType *, bool, bool,  arrow::MemoryPool *); /*proto*/
static PyObject *__pyx_f_7pyarrow_3lib__codes_to_indices(PyObject *, PyObject *, struct __pyx_obj_7pyarrow_3lib_DataType *, struct __pyx_obj_7pyarrow_3lib_MemoryPool *); /*proto*/
static Py_ssize_t __pyx_f_7pyarrow_3lib__normalize_index(Py_ssize_t, Py_ssize_t); /*proto*/
static PyObject *__pyx_f_7pyarrow_3lib__append_array_buffers( arrow::ArrayData const *, PyObject *); /*proto*/
static PyObject *__pyx_f_7pyarrow_3lib__reduce_array_data( arrow::ArrayData const *); /*proto*/
static std::shared_ptr< arrow::ArrayData>  __pyx_f_7pyarrow_3lib__reconstruct_array_data(PyObject *); /*proto*/
static arrow::py::PandasOptions __pyx_f_7pyarrow_3lib__convert_pandas_options(PyObject *); /*proto*/
static PyObject *__pyx_f_7pyarrow_3lib__array_like_to_pandas(PyObject *, PyObject *, PyObject *); /*proto*/
static CYTHON_INLINE std::shared_ptr< arrow::Buffer>  __pyx_f_7pyarrow_3lib_c_mask_inverted_from_obj(PyObject *, struct __pyx_obj_7pyarrow_3lib_MemoryPool *); /*proto*/
static PyObject *__pyx_f_7pyarrow_3lib_get_array_class_from_type(std::shared_ptr< arrow::DataType>  const &); /*proto*/
static PyObject *__pyx_f_7pyarrow_3lib_get_values(PyObject *, int *); /*proto*/
static PyObject *__pyx_f_7pyarrow_3lib__schema_from_arrays(PyObject *, PyObject *, PyObject *, std::shared_ptr< arrow::Schema>  *); /*proto*/
static PyObject *__pyx_f_7pyarrow_3lib__sanitize_arrays(PyObject *, PyObject *, PyObject *, PyObject *, std::shared_ptr< arrow::Schema>  *); /*proto*/
static void __pyx_f_7pyarrow_3lib_dlpack_pycapsule_deleter(PyObject *); /*proto*/
static PyObject *__pyx_f_7pyarrow_3lib__check_is_file(PyObject *); /*proto*/
static std::shared_ptr< arrow::ResizableBuffer>  __pyx_f_7pyarrow_3lib__allocate_buffer( arrow::MemoryPool *); /*proto*/
static void __pyx_f_7pyarrow_3lib__cb_transform(PyObject *, std::shared_ptr< arrow::Buffer>  const &, std::shared_ptr< arrow::Buffer>  *); /*proto*/
static std::shared_ptr< arrow::Buffer>  __pyx_f_7pyarrow_3lib_as_c_buffer(PyObject *); /*proto*/
static enum  arrow::Compression::type __pyx_f_7pyarrow_3lib__ensure_compression(PyObject *); /*proto*/
static PyObject *__pyx_f_7pyarrow_3lib__wrap_metadata_version( arrow::ipc::MetadataVersion); /*proto*/
static  arrow::ipc::MetadataVersion __pyx_f_7pyarrow_3lib__unwrap_metadata_version(enum __pyx_t_7pyarrow_3lib_MetadataVersion); /*proto*/
static PyObject *__pyx_f_7pyarrow_3lib__wrap_alignment( arrow::ipc::Alignment); /*proto*/
static  arrow::ipc::Alignment __pyx_f_7pyarrow_3lib__unwrap_alignment(enum __pyx_t_7pyarrow_3lib_Alignment); /*proto*/
static PyObject *__pyx_f_7pyarrow_3lib__wrap_write_stats( arrow::ipc::WriteStats); /*proto*/
static PyObject *__pyx_f_7pyarrow_3lib__get_compression_from_codec(std::shared_ptr< arrow::util::Codec> ); /*proto*/
static PyObject *__pyx_f_7pyarrow_3lib__get_input_stream(PyObject *, std::shared_ptr< arrow::io::InputStream>  *); /*proto*/
static PyObject *__pyx_f_7pyarrow_3lib__wrap_record_batch_with_metadata( arrow::RecordBatchWithMetadata); /*proto*/
static struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_f_7pyarrow_3lib_as_native_file(PyObject *); /*proto*/
static int __pyx_f_7pyarrow_3lib_pyarrow_is_buffer(PyObject *); /*proto*/
static int __pyx_f_7pyarrow_3lib_pyarrow_is_data_type(PyObject *); /*proto*/
static int __pyx_f_7pyarrow_3lib_pyarrow_is_metadata(PyObject *); /*proto*/
static int __pyx_f_7pyarrow_3lib_pyarrow_is_field(PyObject *); /*proto*/
static int __pyx_f_7pyarrow_3lib_pyarrow_is_schema(PyObject *); /*proto*/
static int __pyx_f_7pyarrow_3lib_pyarrow_is_array(PyObject *); /*proto*/
static int __pyx_f_7pyarrow_3lib_pyarrow_is_chunked_array(PyObject *); /*proto*/
static int __pyx_f_7pyarrow_3lib_pyarrow_is_scalar(PyObject *); /*proto*/
static int __pyx_f_7pyarrow_3lib_pyarrow_is_tensor(PyObject *); /*proto*/
static int __pyx_f_7pyarrow_3lib_pyarrow_is_sparse_coo_tensor(PyObject *); /*proto*/
static int __pyx_f_7pyarrow_3lib_pyarrow_is_sparse_csr_matrix(PyObject *); /*proto*/
static int __pyx_f_7pyarrow_3lib_pyarrow_is_sparse_csc_matrix(PyObject *); /*proto*/
static int __pyx_f_7pyarrow_3lib_pyarrow_is_sparse_csf_tensor(PyObject *); /*proto*/
static int __pyx_f_7pyarrow_3lib_pyarrow_is_table(PyObject *); /*proto*/
static int __pyx_f_7pyarrow_3lib_pyarrow_is_batch(PyObject *); /*proto*/
static PyObject *__pyx_f_7pyarrow_3lib___pyx_unpickle__PandasAPIShim__set_state(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *, PyObject *); /*proto*/
static PyObject *__pyx_f_7pyarrow_3lib___pyx_unpickle__PandasConvertible__set_state(struct __pyx_obj_7pyarrow_3lib__PandasConvertible *, PyObject *); /*proto*/
static PyObject *__pyx_f_7pyarrow_3lib___pyx_unpickle__Tabular__set_state(struct __pyx_obj_7pyarrow_3lib__Tabular *, PyObject *); /*proto*/
static PyObject *__Pyx_Enum_7pyarrow_3lib_enum__dunderpyx_t_7pyarrow_3lib_MetadataVersion_to_py(enum __pyx_t_7pyarrow_3lib_MetadataVersion); /*proto*/
static CYTHON_INLINE PyObject *__pyx_convert_PyObject_string_to_py_6libcpp_6string_std__in_string(std::string const &); /*proto*/
static CYTHON_INLINE PyObject *__pyx_convert_PyUnicode_string_to_py_6libcpp_6string_std__in_string(std::string const &); /*proto*/
static CYTHON_INLINE PyObject *__pyx_convert_PyBytes_string_to_py_6libcpp_6string_std__in_string(std::string const &); /*proto*/
static CYTHON_INLINE PyObject *__pyx_convert_PyByteArray_string_to_py_6libcpp_6string_std__in_string(std::string const &); /*proto*/
static std::string __pyx_convert_string_from_py_6libcpp_6string_std__in_string(PyObject *); /*proto*/
static PyObject *__pyx_convert_vector_to_py_int(std::vector<int>  const &); /*proto*/
static PyObject *__pyx_convert_vector_to_py_int8_t(std::vector<int8_t>  const &); /*proto*/
static PyObject *__pyx_convert_vector_to_py_int64_t(std::vector<int64_t>  const &); /*proto*/
static PyObject *__pyx_convert_vector_to_py_std_3a__3a_string(std::vector<std::string>  const &); /*proto*/
static PyObject *__Pyx_Enum_230530__7pyarrow_3lib_enum__dunderpyx_t_7pyarrow_3lib___etc_to_py(enum __pyx_t_7pyarrow_3lib_DeviceAllocationType); /*proto*/
static std::unordered_set<std::string>  __pyx_convert_unordered_set_from_py_std_3a__3a_string(PyObject *); /*proto*/
static PyObject *__Pyx_Enum_7pyarrow_3lib_enum__dunderpyx_t_7pyarrow_3lib_Alignment_to_py(enum __pyx_t_7pyarrow_3lib_Alignment); /*proto*/
static std::vector<int>  __pyx_convert_vector_from_py_int(PyObject *); /*proto*/
static std::vector<int8_t>  __pyx_convert_vector_from_py_int8_t(PyObject *); /*proto*/
/* #### Code section: typeinfo ### */
/* #### Code section: before_global_var ### */
#define __Pyx_MODULE_NAME "pyarrow.lib"
extern int __pyx_module_is_main_pyarrow__lib;
int __pyx_module_is_main_pyarrow__lib = 0;

/* Implementation of "pyarrow.lib" */
/* #### Code section: global_var ### */
static PyObject *__pyx_builtin_staticmethod;
static PyObject *__pyx_builtin_super;
static PyObject *__pyx_builtin_NotImplemented;
static PyObject *__pyx_builtin_zip;
static PyObject *__pyx_builtin_enumerate;
static PyObject *__pyx_builtin_object;
static PyObject *__pyx_builtin_any;
static PyObject *__pyx_builtin_open;
/* #### Code section: string_decls ### */
static const char __pyx_k__15[] = "";
static const char __pyx_k_dltensor[] = "dltensor";
static const char __pyx_k_arrow_json[] = "arrow.json";
static const char __pyx_k_arrow_uuid[] = "arrow.uuid";
static const char __pyx_k_arrow_array[] = "arrow_array";
static const char __pyx_k_arrow_bool8[] = "arrow.bool8";
static const char __pyx_k_arrow_opaque[] = "arrow.opaque";
static const char __pyx_k_arrow_schema[] = "arrow_schema";
static const char __pyx_k_used_dltensor[] = "used_dltensor";
static const char __pyx_k_arrow_array_stream[] = "arrow_array_stream";
static const char __pyx_k_arrow_device_array[] = "arrow_device_array";
static const char __pyx_k_arrow_fixed_shape_tensor[] = "arrow.fixed_shape_tensor";
static const char __pyx_k_array_like_types__categorical_t[] = "_array_like_types, _categorical_type, _compat_module, _data_frame, _datetimetz_type, _extension_array, _extension_dtype, _have_pandas, _index, _is_extension_array_dtype, _is_ge_v21, _is_ge_v23, _is_ge_v3, _is_ge_v3_strict, _is_v1, _lock, _loose_version, _pd, _pd024, _series, _tried_importing_pandas, _types_api, _version, has_sparse";
/* #### Code section: decls ### */
static PyObject *__pyx_pf_7pyarrow_3lib_cpu_count(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_2set_cpu_count(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_count); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_4is_threading_enabled(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_6_pc(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_8_pac(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_10_ensure_cuda_loaded(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_12_gdb_test_session(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_14encode_file_path(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_path); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_16tobytes(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_o); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_18frombytes(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_o, PyObject *__pyx_v_safe); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_13ArrowKeyError___str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_14ArrowCancelled___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_message, PyObject *__pyx_v_signum); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_9StopToken___reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_StopToken *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_9StopToken_2__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_StopToken *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_20enable_signal_handlers(CYTHON_UNUSED PyObject *__pyx_self, bool __pyx_v_enable); /* proto */
static int __pyx_pf_7pyarrow_3lib_17SignalStopHandler___cinit__(struct __pyx_obj_7pyarrow_3lib_SignalStopHandler *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_17SignalStopHandler_2_init_signals(struct __pyx_obj_7pyarrow_3lib_SignalStopHandler *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_17SignalStopHandler_4__enter__(struct __pyx_obj_7pyarrow_3lib_SignalStopHandler *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_17SignalStopHandler_6__exit__(struct __pyx_obj_7pyarrow_3lib_SignalStopHandler *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_exc_type, PyObject *__pyx_v_exc_value, CYTHON_UNUSED PyObject *__pyx_v_exc_tb); /* proto */
static void __pyx_pf_7pyarrow_3lib_17SignalStopHandler_8__dealloc__(struct __pyx_obj_7pyarrow_3lib_SignalStopHandler *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_17SignalStopHandler_10stop_token___get__(struct __pyx_obj_7pyarrow_3lib_SignalStopHandler *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_17SignalStopHandler_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_SignalStopHandler *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_17SignalStopHandler_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_SignalStopHandler *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_22runtime_info(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_24_build_info(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_26set_timezone_db_path(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_path); /* proto */
static int __pyx_pf_7pyarrow_3lib_14_PandasAPIShim___init__(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_14_PandasAPIShim_2series(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_14_PandasAPIShim_4data_frame(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_14_PandasAPIShim_11have_pandas___get__(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_14_PandasAPIShim_6compat___get__(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_14_PandasAPIShim_2pd___get__(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_14_PandasAPIShim_6infer_dtype(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self, PyObject *__pyx_v_obj); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_14_PandasAPIShim_8pandas_dtype(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self, PyObject *__pyx_v_dtype); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_14_PandasAPIShim_13loose_version___get__(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_14_PandasAPIShim_7version___get__(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_14_PandasAPIShim_10is_v1(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_14_PandasAPIShim_12is_ge_v21(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_14_PandasAPIShim_14is_ge_v23(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_14_PandasAPIShim_16is_ge_v3(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_14_PandasAPIShim_18is_ge_v3_strict(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_14_PandasAPIShim_20uses_string_dtype(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_14_PandasAPIShim_16categorical_type___get__(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_14_PandasAPIShim_15datetimetz_type___get__(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_14_PandasAPIShim_15extension_dtype___get__(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_14_PandasAPIShim_22is_array_like(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self, PyObject *__pyx_v_obj); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_14_PandasAPIShim_24is_categorical(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self, PyObject *__pyx_v_obj); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_14_PandasAPIShim_26is_datetimetz(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self, PyObject *__pyx_v_obj); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_14_PandasAPIShim_28is_extension_array_dtype(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self, PyObject *__pyx_v_obj); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_14_PandasAPIShim_30is_sparse(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self, PyObject *__pyx_v_obj); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_14_PandasAPIShim_32is_data_frame(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self, PyObject *__pyx_v_obj); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_14_PandasAPIShim_34is_series(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self, PyObject *__pyx_v_obj); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_14_PandasAPIShim_36is_index(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self, PyObject *__pyx_v_obj); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_14_PandasAPIShim_38get_values(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self, PyObject *__pyx_v_obj); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_14_PandasAPIShim_40get_rangeindex_attribute(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self, PyObject *__pyx_v_level, PyObject *__pyx_v_name); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_14_PandasAPIShim_14_loose_version___get__(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_14_PandasAPIShim_8_version___get__(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_14_PandasAPIShim_3_pd___get__(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_14_PandasAPIShim_10_types_api___get__(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_14_PandasAPIShim_14_compat_module___get__(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_14_PandasAPIShim_11_data_frame___get__(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_14_PandasAPIShim_6_index___get__(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_14_PandasAPIShim_7_series___get__(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_14_PandasAPIShim_17_categorical_type___get__(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_14_PandasAPIShim_16_datetimetz_type___get__(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_14_PandasAPIShim_16_extension_array___get__(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_14_PandasAPIShim_16_extension_dtype___get__(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_14_PandasAPIShim_17_array_like_types___get__(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_14_PandasAPIShim_25_is_extension_array_dtype___get__(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_14_PandasAPIShim_5_lock___get__(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_14_PandasAPIShim_10has_sparse___get__(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_14_PandasAPIShim_6_pd024___get__(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_14_PandasAPIShim_6_is_v1___get__(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_14_PandasAPIShim_10_is_ge_v21___get__(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_14_PandasAPIShim_10_is_ge_v23___get__(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_14_PandasAPIShim_9_is_ge_v3___get__(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_14_PandasAPIShim_16_is_ge_v3_strict___get__(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_14_PandasAPIShim_42__reduce_cython__(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_14_PandasAPIShim_44__setstate_cython__(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_7pyarrow_3lib_10MemoryPool___init__(struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_10MemoryPool_2release_unused(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_10MemoryPool_4bytes_allocated(struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_10MemoryPool_6total_bytes_allocated(struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_10MemoryPool_8max_memory(struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_10MemoryPool_10num_allocations(struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_10MemoryPool_12print_stats(struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_10MemoryPool_12backend_name___get__(struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_10MemoryPool_14__repr__(struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_10MemoryPool_16__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_10MemoryPool_18__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_7pyarrow_3lib_17LoggingMemoryPool___init__(struct __pyx_obj_7pyarrow_3lib_LoggingMemoryPool *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_17LoggingMemoryPool_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_LoggingMemoryPool *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_17LoggingMemoryPool_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_LoggingMemoryPool *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_7pyarrow_3lib_15ProxyMemoryPool___init__(struct __pyx_obj_7pyarrow_3lib_ProxyMemoryPool *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15ProxyMemoryPool_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_ProxyMemoryPool *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15ProxyMemoryPool_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_ProxyMemoryPool *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_28default_memory_pool(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_30proxy_memory_pool(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_parent); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_32logging_memory_pool(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_parent); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_34system_memory_pool(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_36jemalloc_memory_pool(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_38mimalloc_memory_pool(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_40set_memory_pool(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_pool); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_42log_memory_allocations(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_enable); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_44total_allocated_bytes(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_46jemalloc_set_decay_ms(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_decay_ms); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_48supported_memory_backends(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static int __pyx_pf_7pyarrow_3lib_6Device___init__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_Device *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_6Device_2__eq__(struct __pyx_obj_7pyarrow_3lib_Device *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_6Device_4__repr__(struct __pyx_obj_7pyarrow_3lib_Device *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_6Device_9type_name___get__(struct __pyx_obj_7pyarrow_3lib_Device *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_6Device_9device_id___get__(struct __pyx_obj_7pyarrow_3lib_Device *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_6Device_6is_cpu___get__(struct __pyx_obj_7pyarrow_3lib_Device *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_6Device_11device_type___get__(struct __pyx_obj_7pyarrow_3lib_Device *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_6Device_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_Device *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_6Device_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_Device *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_7pyarrow_3lib_13MemoryManager___init__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_MemoryManager *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_13MemoryManager_2__repr__(struct __pyx_obj_7pyarrow_3lib_MemoryManager *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_13MemoryManager_6device___get__(struct __pyx_obj_7pyarrow_3lib_MemoryManager *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_13MemoryManager_6is_cpu___get__(struct __pyx_obj_7pyarrow_3lib_MemoryManager *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_13MemoryManager_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_MemoryManager *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_13MemoryManager_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_MemoryManager *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_50default_cpu_memory_manager(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_52_get_pandas_type_map(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_54_is_primitive(CYTHON_UNUSED PyObject *__pyx_self, enum  arrow::Type::type __pyx_v_type); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_56_get_pandas_type(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_arrow_type, PyObject *__pyx_v_coerce_to_ns); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_58_get_pandas_tz_type(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_arrow_type, PyObject *__pyx_v_coerce_to_ns); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_60_to_pandas_dtype(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_arrow_type, PyObject *__pyx_v_options); /* proto */
static int __pyx_pf_7pyarrow_3lib_8DataType___cinit__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v_self); /* proto */
static int __pyx_pf_7pyarrow_3lib_8DataType_2__init__(struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_8DataType_4field(struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v_self, PyObject *__pyx_v_i); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_8DataType_2id___get__(struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_8DataType_9bit_width___get__(struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_8DataType_10byte_width___get__(struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_8DataType_10num_fields___get__(struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_8DataType_11num_buffers___get__(struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_8DataType_20has_variadic_buffers___get__(struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_8DataType_6__str__(struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v_self); /* proto */
static Py_hash_t __pyx_pf_7pyarrow_3lib_8DataType_8__hash__(struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_8DataType_10__reduce__(struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_8DataType_12__repr__(struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_8DataType_14__eq__(struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_8DataType_16equals(struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_check_metadata); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_8DataType_18to_pandas_dtype(struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_8DataType_20_export_to_c(struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v_self, PyObject *__pyx_v_out_ptr); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_8DataType_22_import_from_c(PyObject *__pyx_v_in_ptr); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_8DataType_24__arrow_c_schema__(struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_8DataType_26_import_from_c_capsule(PyObject *__pyx_v_schema); /* proto */
static int __pyx_pf_7pyarrow_3lib_14DictionaryMemo___cinit__(struct __pyx_obj_7pyarrow_3lib_DictionaryMemo *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_14DictionaryMemo_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_DictionaryMemo *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_14DictionaryMemo_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_DictionaryMemo *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_14DictionaryType___reduce__(struct __pyx_obj_7pyarrow_3lib_DictionaryType *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_14DictionaryType_7ordered___get__(struct __pyx_obj_7pyarrow_3lib_DictionaryType *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_14DictionaryType_10index_type___get__(struct __pyx_obj_7pyarrow_3lib_DictionaryType *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_14DictionaryType_10value_type___get__(struct __pyx_obj_7pyarrow_3lib_DictionaryType *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_8ListType___reduce__(struct __pyx_obj_7pyarrow_3lib_ListType *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_8ListType_11value_field___get__(struct __pyx_obj_7pyarrow_3lib_ListType *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_8ListType_10value_type___get__(struct __pyx_obj_7pyarrow_3lib_ListType *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_13LargeListType___reduce__(struct __pyx_obj_7pyarrow_3lib_LargeListType *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_13LargeListType_11value_field___get__(struct __pyx_obj_7pyarrow_3lib_LargeListType *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_13LargeListType_10value_type___get__(struct __pyx_obj_7pyarrow_3lib_LargeListType *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_12ListViewType___reduce__(struct __pyx_obj_7pyarrow_3lib_ListViewType *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_12ListViewType_11value_field___get__(struct __pyx_obj_7pyarrow_3lib_ListViewType *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_12ListViewType_10value_type___get__(struct __pyx_obj_7pyarrow_3lib_ListViewType *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_17LargeListViewType___reduce__(struct __pyx_obj_7pyarrow_3lib_LargeListViewType *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_17LargeListViewType_11value_field___get__(struct __pyx_obj_7pyarrow_3lib_LargeListViewType *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_17LargeListViewType_10value_type___get__(struct __pyx_obj_7pyarrow_3lib_LargeListViewType *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_7MapType___reduce__(struct __pyx_obj_7pyarrow_3lib_MapType *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_7MapType_9key_field___get__(struct __pyx_obj_7pyarrow_3lib_MapType *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_7MapType_8key_type___get__(struct __pyx_obj_7pyarrow_3lib_MapType *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_7MapType_10item_field___get__(struct __pyx_obj_7pyarrow_3lib_MapType *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_7MapType_9item_type___get__(struct __pyx_obj_7pyarrow_3lib_MapType *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_7MapType_11keys_sorted___get__(struct __pyx_obj_7pyarrow_3lib_MapType *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_17FixedSizeListType___reduce__(struct __pyx_obj_7pyarrow_3lib_FixedSizeListType *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_17FixedSizeListType_11value_field___get__(struct __pyx_obj_7pyarrow_3lib_FixedSizeListType *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_17FixedSizeListType_10value_type___get__(struct __pyx_obj_7pyarrow_3lib_FixedSizeListType *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_17FixedSizeListType_9list_size___get__(struct __pyx_obj_7pyarrow_3lib_FixedSizeListType *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_10StructType_get_field_index(struct __pyx_obj_7pyarrow_3lib_StructType *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_10StructType_2field(struct __pyx_obj_7pyarrow_3lib_StructType *__pyx_v_self, PyObject *__pyx_v_i); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_10StructType_4get_all_field_indices(struct __pyx_obj_7pyarrow_3lib_StructType *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
static Py_ssize_t __pyx_pf_7pyarrow_3lib_10StructType_6__len__(struct __pyx_obj_7pyarrow_3lib_StructType *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_10StructType_8__iter__(struct __pyx_obj_7pyarrow_3lib_StructType *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_10StructType_11__getitem__(struct __pyx_obj_7pyarrow_3lib_StructType *__pyx_v_self, PyObject *__pyx_v_i); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_10StructType_13__reduce__(struct __pyx_obj_7pyarrow_3lib_StructType *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_10StructType_5names___get__(struct __pyx_obj_7pyarrow_3lib_StructType *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_10StructType_6fields___get__(struct __pyx_obj_7pyarrow_3lib_StructType *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_9UnionType_4mode___get__(struct __pyx_obj_7pyarrow_3lib_UnionType *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_9UnionType_10type_codes___get__(struct __pyx_obj_7pyarrow_3lib_UnionType *__pyx_v_self); /* proto */
static Py_ssize_t __pyx_pf_7pyarrow_3lib_9UnionType___len__(struct __pyx_obj_7pyarrow_3lib_UnionType *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_9UnionType_2__iter__(struct __pyx_obj_7pyarrow_3lib_UnionType *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_9UnionType_5field(struct __pyx_obj_7pyarrow_3lib_UnionType *__pyx_v_self, PyObject *__pyx_v_i); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_9UnionType_7__getitem__(struct __pyx_obj_7pyarrow_3lib_UnionType *__pyx_v_self, PyObject *__pyx_v_i); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_9UnionType_9__reduce__(struct __pyx_obj_7pyarrow_3lib_UnionType *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_13TimestampType_4unit___get__(struct __pyx_obj_7pyarrow_3lib_TimestampType *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_13TimestampType_2tz___get__(struct __pyx_obj_7pyarrow_3lib_TimestampType *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_13TimestampType___reduce__(struct __pyx_obj_7pyarrow_3lib_TimestampType *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_10Time32Type_4unit___get__(struct __pyx_obj_7pyarrow_3lib_Time32Type *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_10Time64Type_4unit___get__(struct __pyx_obj_7pyarrow_3lib_Time64Type *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_12DurationType_4unit___get__(struct __pyx_obj_7pyarrow_3lib_DurationType *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_19FixedSizeBinaryType___reduce__(struct __pyx_obj_7pyarrow_3lib_FixedSizeBinaryType *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_13Decimal32Type___reduce__(struct __pyx_obj_7pyarrow_3lib_Decimal32Type *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_13Decimal32Type_9precision___get__(struct __pyx_obj_7pyarrow_3lib_Decimal32Type *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_13Decimal32Type_5scale___get__(struct __pyx_obj_7pyarrow_3lib_Decimal32Type *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_13Decimal64Type___reduce__(struct __pyx_obj_7pyarrow_3lib_Decimal64Type *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_13Decimal64Type_9precision___get__(struct __pyx_obj_7pyarrow_3lib_Decimal64Type *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_13Decimal64Type_5scale___get__(struct __pyx_obj_7pyarrow_3lib_Decimal64Type *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_14Decimal128Type___reduce__(struct __pyx_obj_7pyarrow_3lib_Decimal128Type *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_14Decimal128Type_9precision___get__(struct __pyx_obj_7pyarrow_3lib_Decimal128Type *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_14Decimal128Type_5scale___get__(struct __pyx_obj_7pyarrow_3lib_Decimal128Type *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_14Decimal256Type___reduce__(struct __pyx_obj_7pyarrow_3lib_Decimal256Type *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_14Decimal256Type_9precision___get__(struct __pyx_obj_7pyarrow_3lib_Decimal256Type *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_14Decimal256Type_5scale___get__(struct __pyx_obj_7pyarrow_3lib_Decimal256Type *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_17RunEndEncodedType___reduce__(struct __pyx_obj_7pyarrow_3lib_RunEndEncodedType *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_17RunEndEncodedType_12run_end_type___get__(struct __pyx_obj_7pyarrow_3lib_RunEndEncodedType *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_17RunEndEncodedType_10value_type___get__(struct __pyx_obj_7pyarrow_3lib_RunEndEncodedType *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_17BaseExtensionType___arrow_ext_class__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_BaseExtensionType *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_17BaseExtensionType_2__arrow_ext_scalar_class__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_BaseExtensionType *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_17BaseExtensionType_14extension_name___get__(struct __pyx_obj_7pyarrow_3lib_BaseExtensionType *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_17BaseExtensionType_12storage_type___get__(struct __pyx_obj_7pyarrow_3lib_BaseExtensionType *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_17BaseExtensionType_10byte_width___get__(struct __pyx_obj_7pyarrow_3lib_BaseExtensionType *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_17BaseExtensionType_9bit_width___get__(struct __pyx_obj_7pyarrow_3lib_BaseExtensionType *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_17BaseExtensionType_4wrap_array(struct __pyx_obj_7pyarrow_3lib_BaseExtensionType *__pyx_v_self, PyObject *__pyx_v_storage); /* proto */
static int __pyx_pf_7pyarrow_3lib_13ExtensionType___cinit__(struct __pyx_obj_7pyarrow_3lib_ExtensionType *__pyx_v_self); /* proto */
static int __pyx_pf_7pyarrow_3lib_13ExtensionType_2__init__(struct __pyx_obj_7pyarrow_3lib_ExtensionType *__pyx_v_self, struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v_storage_type, PyObject *__pyx_v_extension_name); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_13ExtensionType_4__eq__(struct __pyx_obj_7pyarrow_3lib_ExtensionType *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_13ExtensionType_6__repr__(struct __pyx_obj_7pyarrow_3lib_ExtensionType *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_13ExtensionType_8__arrow_ext_serialize__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_ExtensionType *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_13ExtensionType_10__arrow_ext_deserialize__(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, CYTHON_UNUSED PyObject *__pyx_v_storage_type, CYTHON_UNUSED PyObject *__pyx_v_serialized); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_13ExtensionType_12__reduce__(struct __pyx_obj_7pyarrow_3lib_ExtensionType *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_13ExtensionType_14__arrow_ext_class__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_ExtensionType *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_13ExtensionType_16__arrow_ext_scalar_class__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_ExtensionType *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_8JsonType___arrow_ext_class__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_JsonType *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_8JsonType_2__reduce__(struct __pyx_obj_7pyarrow_3lib_JsonType *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_8JsonType_4__arrow_ext_scalar_class__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_JsonType *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_8UuidType___arrow_ext_class__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_UuidType *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_8UuidType_2__reduce__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_UuidType *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_8UuidType_4__arrow_ext_scalar_class__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_UuidType *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_20FixedShapeTensorType_10value_type___get__(struct __pyx_obj_7pyarrow_3lib_FixedShapeTensorType *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_20FixedShapeTensorType_5shape___get__(struct __pyx_obj_7pyarrow_3lib_FixedShapeTensorType *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_20FixedShapeTensorType_9dim_names___get__(struct __pyx_obj_7pyarrow_3lib_FixedShapeTensorType *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_20FixedShapeTensorType_11permutation___get__(struct __pyx_obj_7pyarrow_3lib_FixedShapeTensorType *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_20FixedShapeTensorType___arrow_ext_class__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_FixedShapeTensorType *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_20FixedShapeTensorType_2__reduce__(struct __pyx_obj_7pyarrow_3lib_FixedShapeTensorType *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_20FixedShapeTensorType_4__arrow_ext_scalar_class__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_FixedShapeTensorType *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_9Bool8Type___arrow_ext_class__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_Bool8Type *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_9Bool8Type_2__reduce__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_Bool8Type *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_9Bool8Type_4__arrow_ext_scalar_class__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_Bool8Type *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_10OpaqueType_9type_name___get__(struct __pyx_obj_7pyarrow_3lib_OpaqueType *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_10OpaqueType_11vendor_name___get__(struct __pyx_obj_7pyarrow_3lib_OpaqueType *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_10OpaqueType___arrow_ext_class__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_OpaqueType *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_10OpaqueType_2__reduce__(struct __pyx_obj_7pyarrow_3lib_OpaqueType *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_10OpaqueType_4__arrow_ext_scalar_class__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_OpaqueType *__pyx_v_self); /* proto */
static int __pyx_pf_7pyarrow_3lib_20UnknownExtensionType___init__(struct __pyx_obj_7pyarrow_3lib_UnknownExtensionType *__pyx_v_self, struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v_storage_type, PyObject *__pyx_v_serialized); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_20UnknownExtensionType_2__arrow_ext_serialize__(struct __pyx_obj_7pyarrow_3lib_UnknownExtensionType *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_20UnknownExtensionType_4__arrow_ext_deserialize__(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, CYTHON_UNUSED PyObject *__pyx_v_storage_type, CYTHON_UNUSED PyObject *__pyx_v_serialized); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_62register_extension_type(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_ext_type); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_64unregister_extension_type(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_type_name); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_16KeyValueMetadata_8__init___genexpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0); /* proto */
static int __pyx_pf_7pyarrow_3lib_16KeyValueMetadata___init__(struct __pyx_obj_7pyarrow_3lib_KeyValueMetadata *__pyx_v_self, PyObject *__pyx_v___arg0__, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_16KeyValueMetadata_2equals(struct __pyx_obj_7pyarrow_3lib_KeyValueMetadata *__pyx_v_self, struct __pyx_obj_7pyarrow_3lib_KeyValueMetadata *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_16KeyValueMetadata_4__repr__(struct __pyx_obj_7pyarrow_3lib_KeyValueMetadata *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_16KeyValueMetadata_6__str__(struct __pyx_obj_7pyarrow_3lib_KeyValueMetadata *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_16KeyValueMetadata_8__eq__(struct __pyx_obj_7pyarrow_3lib_KeyValueMetadata *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
static Py_ssize_t __pyx_pf_7pyarrow_3lib_16KeyValueMetadata_10__len__(struct __pyx_obj_7pyarrow_3lib_KeyValueMetadata *__pyx_v_self); /* proto */
static int __pyx_pf_7pyarrow_3lib_16KeyValueMetadata_12__contains__(struct __pyx_obj_7pyarrow_3lib_KeyValueMetadata *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_16KeyValueMetadata_14__getitem__(struct __pyx_obj_7pyarrow_3lib_KeyValueMetadata *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_16KeyValueMetadata_16__iter__(struct __pyx_obj_7pyarrow_3lib_KeyValueMetadata *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_16KeyValueMetadata_18__reduce__(struct __pyx_obj_7pyarrow_3lib_KeyValueMetadata *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_16KeyValueMetadata_20key(struct __pyx_obj_7pyarrow_3lib_KeyValueMetadata *__pyx_v_self, PyObject *__pyx_v_i); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_16KeyValueMetadata_22value(struct __pyx_obj_7pyarrow_3lib_KeyValueMetadata *__pyx_v_self, PyObject *__pyx_v_i); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_16KeyValueMetadata_24keys(struct __pyx_obj_7pyarrow_3lib_KeyValueMetadata *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_16KeyValueMetadata_27values(struct __pyx_obj_7pyarrow_3lib_KeyValueMetadata *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_16KeyValueMetadata_30items(struct __pyx_obj_7pyarrow_3lib_KeyValueMetadata *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_16KeyValueMetadata_33get_all(struct __pyx_obj_7pyarrow_3lib_KeyValueMetadata *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_16KeyValueMetadata_35to_dict(struct __pyx_obj_7pyarrow_3lib_KeyValueMetadata *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_66ensure_metadata(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_meta, bool __pyx_v_allow_none); /* proto */
static int __pyx_pf_7pyarrow_3lib_5Field___cinit__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_Field *__pyx_v_self); /* proto */
static int __pyx_pf_7pyarrow_3lib_5Field_2__init__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_Field *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Field_4equals(struct __pyx_obj_7pyarrow_3lib_Field *__pyx_v_self, struct __pyx_obj_7pyarrow_3lib_Field *__pyx_v_other, int __pyx_v_check_metadata); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Field_6__eq__(struct __pyx_obj_7pyarrow_3lib_Field *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Field_8__reduce__(struct __pyx_obj_7pyarrow_3lib_Field *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Field_10__str__(struct __pyx_obj_7pyarrow_3lib_Field *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Field_12__repr__(struct __pyx_obj_7pyarrow_3lib_Field *__pyx_v_self); /* proto */
static Py_hash_t __pyx_pf_7pyarrow_3lib_5Field_14__hash__(struct __pyx_obj_7pyarrow_3lib_Field *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Field_8nullable___get__(struct __pyx_obj_7pyarrow_3lib_Field *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Field_4name___get__(struct __pyx_obj_7pyarrow_3lib_Field *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Field_8metadata___get__(struct __pyx_obj_7pyarrow_3lib_Field *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Field_16with_metadata(struct __pyx_obj_7pyarrow_3lib_Field *__pyx_v_self, PyObject *__pyx_v_metadata); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Field_18remove_metadata(struct __pyx_obj_7pyarrow_3lib_Field *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Field_20with_type(struct __pyx_obj_7pyarrow_3lib_Field *__pyx_v_self, struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v_new_type); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Field_22with_name(struct __pyx_obj_7pyarrow_3lib_Field *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Field_24with_nullable(struct __pyx_obj_7pyarrow_3lib_Field *__pyx_v_self, PyObject *__pyx_v_nullable); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Field_26flatten(struct __pyx_obj_7pyarrow_3lib_Field *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Field_28_export_to_c(struct __pyx_obj_7pyarrow_3lib_Field *__pyx_v_self, PyObject *__pyx_v_out_ptr); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Field_30_import_from_c(PyObject *__pyx_v_in_ptr); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Field_32__arrow_c_schema__(struct __pyx_obj_7pyarrow_3lib_Field *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Field_34_import_from_c_capsule(PyObject *__pyx_v_schema); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Field_4type___get__(struct __pyx_obj_7pyarrow_3lib_Field *__pyx_v_self); /* proto */
static int __pyx_pf_7pyarrow_3lib_6Schema___cinit__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_Schema *__pyx_v_self); /* proto */
static int __pyx_pf_7pyarrow_3lib_6Schema_2__init__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_Schema *__pyx_v_self); /* proto */
static Py_ssize_t __pyx_pf_7pyarrow_3lib_6Schema_4__len__(struct __pyx_obj_7pyarrow_3lib_Schema *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_6Schema_6__getitem__(struct __pyx_obj_7pyarrow_3lib_Schema *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_6Schema_8__iter__(struct __pyx_obj_7pyarrow_3lib_Schema *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_6Schema_11__reduce__(struct __pyx_obj_7pyarrow_3lib_Schema *__pyx_v_self); /* proto */
static Py_hash_t __pyx_pf_7pyarrow_3lib_6Schema_13__hash__(struct __pyx_obj_7pyarrow_3lib_Schema *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_6Schema_15__sizeof__(struct __pyx_obj_7pyarrow_3lib_Schema *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_6Schema_15pandas_metadata___get__(struct __pyx_obj_7pyarrow_3lib_Schema *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_6Schema_5names___get__(struct __pyx_obj_7pyarrow_3lib_Schema *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_6Schema_5types___get__(struct __pyx_obj_7pyarrow_3lib_Schema *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_6Schema_8metadata___get__(struct __pyx_obj_7pyarrow_3lib_Schema *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_6Schema_17__eq__(struct __pyx_obj_7pyarrow_3lib_Schema *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_6Schema_19empty_table(struct __pyx_obj_7pyarrow_3lib_Schema *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_6Schema_21equals(struct __pyx_obj_7pyarrow_3lib_Schema *__pyx_v_self, struct __pyx_obj_7pyarrow_3lib_Schema *__pyx_v_other, int __pyx_v_check_metadata); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_6Schema_23from_pandas(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_df, PyObject *__pyx_v_preserve_index); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_6Schema_25field(struct __pyx_obj_7pyarrow_3lib_Schema *__pyx_v_self, PyObject *__pyx_v_i); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_6Schema_27_field(struct __pyx_obj_7pyarrow_3lib_Schema *__pyx_v_self, int __pyx_v_i); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_6Schema_29field_by_name(struct __pyx_obj_7pyarrow_3lib_Schema *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_6Schema_31get_field_index(struct __pyx_obj_7pyarrow_3lib_Schema *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_6Schema_33get_all_field_indices(struct __pyx_obj_7pyarrow_3lib_Schema *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_6Schema_35append(struct __pyx_obj_7pyarrow_3lib_Schema *__pyx_v_self, struct __pyx_obj_7pyarrow_3lib_Field *__pyx_v_field); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_6Schema_37insert(struct __pyx_obj_7pyarrow_3lib_Schema *__pyx_v_self, int __pyx_v_i, struct __pyx_obj_7pyarrow_3lib_Field *__pyx_v_field); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_6Schema_39remove(struct __pyx_obj_7pyarrow_3lib_Schema *__pyx_v_self, int __pyx_v_i); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_6Schema_41set(struct __pyx_obj_7pyarrow_3lib_Schema *__pyx_v_self, int __pyx_v_i, struct __pyx_obj_7pyarrow_3lib_Field *__pyx_v_field); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_6Schema_43add_metadata(struct __pyx_obj_7pyarrow_3lib_Schema *__pyx_v_self, PyObject *__pyx_v_metadata); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_6Schema_45with_metadata(struct __pyx_obj_7pyarrow_3lib_Schema *__pyx_v_self, PyObject *__pyx_v_metadata); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_6Schema_47serialize(struct __pyx_obj_7pyarrow_3lib_Schema *__pyx_v_self, PyObject *__pyx_v_memory_pool); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_6Schema_49remove_metadata(struct __pyx_obj_7pyarrow_3lib_Schema *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_6Schema_51to_string(struct __pyx_obj_7pyarrow_3lib_Schema *__pyx_v_self, PyObject *__pyx_v_truncate_metadata, PyObject *__pyx_v_show_field_metadata, PyObject *__pyx_v_show_schema_metadata, PyObject *__pyx_v_element_size_limit); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_6Schema_53_export_to_c(struct __pyx_obj_7pyarrow_3lib_Schema *__pyx_v_self, PyObject *__pyx_v_out_ptr); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_6Schema_55_import_from_c(PyObject *__pyx_v_in_ptr); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_6Schema_57__str__(struct __pyx_obj_7pyarrow_3lib_Schema *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_6Schema_59__repr__(struct __pyx_obj_7pyarrow_3lib_Schema *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_6Schema_61__arrow_c_schema__(struct __pyx_obj_7pyarrow_3lib_Schema *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_6Schema_63_import_from_c_capsule(PyObject *__pyx_v_schema); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_68unify_schemas(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_schemas, PyObject *__pyx_v_promote_options); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_70field(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name, PyObject *__pyx_v_type, PyObject *__pyx_v_nullable, PyObject *__pyx_v_metadata); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_72null(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_74bool_(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_76uint8(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_78int8(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_80uint16(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_82int16(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_84uint32(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_86int32(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_88uint64(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_90int64(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_92tzinfo_to_string(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_tz); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_94string_to_tzinfo(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_96timestamp(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_unit, PyObject *__pyx_v_tz); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_98time32(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_unit); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_100time64(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_unit); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_102duration(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_unit); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_104month_day_nano_interval(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_106date32(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_108date64(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_110float16(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_112float32(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_114float64(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_116decimal32(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_precision, int __pyx_v_scale); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_118decimal64(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_precision, int __pyx_v_scale); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_120decimal128(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_precision, int __pyx_v_scale); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_122decimal256(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_precision, int __pyx_v_scale); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_124string(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_126utf8(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_128binary(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_length); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_130large_binary(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_132large_string(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_134large_utf8(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_136binary_view(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_138string_view(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_140list_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_value_type, int __pyx_v_list_size); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_142large_list(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_value_type); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_144list_view(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_value_type); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_146large_list_view(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_value_type); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_148map_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_key_type, PyObject *__pyx_v_item_type, PyObject *__pyx_v_keys_sorted); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_150dictionary(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_index_type, PyObject *__pyx_v_value_type, int __pyx_v_ordered); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_152struct(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_fields); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_154sparse_union(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_child_fields, PyObject *__pyx_v_type_codes); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_156dense_union(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_child_fields, PyObject *__pyx_v_type_codes); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_158union(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_child_fields, PyObject *__pyx_v_mode, PyObject *__pyx_v_type_codes); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_160run_end_encoded(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_run_end_type, PyObject *__pyx_v_value_type); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_286__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_162json_(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v_storage_type); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_164uuid(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_166fixed_shape_tensor(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v_value_type, PyObject *__pyx_v_shape, PyObject *__pyx_v_dim_names, PyObject *__pyx_v_permutation); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_168bool8(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_170opaque(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v_storage_type, PyObject *__pyx_v_type_name, PyObject *__pyx_v_vendor_name); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_172type_for_alias(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_174ensure_type(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_ty, int __pyx_v_allow_none); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_176schema(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_fields, PyObject *__pyx_v_metadata); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_178from_numpy_dtype(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dtype); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_180is_boolean_value(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_182is_integer_value(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_184is_float_value(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
static int __pyx_pf_7pyarrow_3lib_23_ExtensionRegistryNanny___cinit__(struct __pyx_obj_7pyarrow_3lib__ExtensionRegistryNanny *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_23_ExtensionRegistryNanny_2release_registry(struct __pyx_obj_7pyarrow_3lib__ExtensionRegistryNanny *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_23_ExtensionRegistryNanny_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib__ExtensionRegistryNanny *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_23_ExtensionRegistryNanny_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib__ExtensionRegistryNanny *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_7pyarrow_3lib_6Scalar___init__(struct __pyx_obj_7pyarrow_3lib_Scalar *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_6Scalar_4type___get__(struct __pyx_obj_7pyarrow_3lib_Scalar *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_6Scalar_8is_valid___get__(struct __pyx_obj_7pyarrow_3lib_Scalar *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_6Scalar_2cast(struct __pyx_obj_7pyarrow_3lib_Scalar *__pyx_v_self, PyObject *__pyx_v_target_type, PyObject *__pyx_v_safe, PyObject *__pyx_v_options, PyObject *__pyx_v_memory_pool); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_6Scalar_4validate(struct __pyx_obj_7pyarrow_3lib_Scalar *__pyx_v_self, PyObject *__pyx_v_full); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_6Scalar_6__repr__(struct __pyx_obj_7pyarrow_3lib_Scalar *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_6Scalar_8__str__(struct __pyx_obj_7pyarrow_3lib_Scalar *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_6Scalar_10equals(struct __pyx_obj_7pyarrow_3lib_Scalar *__pyx_v_self, struct __pyx_obj_7pyarrow_3lib_Scalar *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_6Scalar_12__eq__(struct __pyx_obj_7pyarrow_3lib_Scalar *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
static Py_hash_t __pyx_pf_7pyarrow_3lib_6Scalar_14__hash__(struct __pyx_obj_7pyarrow_3lib_Scalar *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_6Scalar_16__reduce__(struct __pyx_obj_7pyarrow_3lib_Scalar *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_6Scalar_18as_py(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_Scalar *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_maps_as_pydicts); /* proto */
static int __pyx_pf_7pyarrow_3lib_10NullScalar___cinit__(struct __pyx_obj_7pyarrow_3lib_NullScalar *__pyx_v_self); /* proto */
static int __pyx_pf_7pyarrow_3lib_10NullScalar_2__init__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_NullScalar *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_10NullScalar_4as_py(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_NullScalar *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_maps_as_pydicts); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_13BooleanScalar_as_py(struct __pyx_obj_7pyarrow_3lib_BooleanScalar *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_maps_as_pydicts); /* proto */
static int __pyx_pf_7pyarrow_3lib_13BooleanScalar_2__bool__(struct __pyx_obj_7pyarrow_3lib_BooleanScalar *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_11UInt8Scalar_as_py(struct __pyx_obj_7pyarrow_3lib_UInt8Scalar *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_maps_as_pydicts); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_11UInt8Scalar_2__index__(struct __pyx_obj_7pyarrow_3lib_UInt8Scalar *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_10Int8Scalar_as_py(struct __pyx_obj_7pyarrow_3lib_Int8Scalar *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_maps_as_pydicts); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_10Int8Scalar_2__index__(struct __pyx_obj_7pyarrow_3lib_Int8Scalar *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_12UInt16Scalar_as_py(struct __pyx_obj_7pyarrow_3lib_UInt16Scalar *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_maps_as_pydicts); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_12UInt16Scalar_2__index__(struct __pyx_obj_7pyarrow_3lib_UInt16Scalar *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_11Int16Scalar_as_py(struct __pyx_obj_7pyarrow_3lib_Int16Scalar *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_maps_as_pydicts); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_11Int16Scalar_2__index__(struct __pyx_obj_7pyarrow_3lib_Int16Scalar *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_12UInt32Scalar_as_py(struct __pyx_obj_7pyarrow_3lib_UInt32Scalar *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_maps_as_pydicts); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_12UInt32Scalar_2__index__(struct __pyx_obj_7pyarrow_3lib_UInt32Scalar *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_11Int32Scalar_as_py(struct __pyx_obj_7pyarrow_3lib_Int32Scalar *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_maps_as_pydicts); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_11Int32Scalar_2__index__(struct __pyx_obj_7pyarrow_3lib_Int32Scalar *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_12UInt64Scalar_as_py(struct __pyx_obj_7pyarrow_3lib_UInt64Scalar *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_maps_as_pydicts); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_12UInt64Scalar_2__index__(struct __pyx_obj_7pyarrow_3lib_UInt64Scalar *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_11Int64Scalar_as_py(struct __pyx_obj_7pyarrow_3lib_Int64Scalar *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_maps_as_pydicts); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_11Int64Scalar_2__index__(struct __pyx_obj_7pyarrow_3lib_Int64Scalar *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15HalfFloatScalar_as_py(struct __pyx_obj_7pyarrow_3lib_HalfFloatScalar *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_maps_as_pydicts); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15HalfFloatScalar_2__float__(struct __pyx_obj_7pyarrow_3lib_HalfFloatScalar *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15HalfFloatScalar_4__int__(struct __pyx_obj_7pyarrow_3lib_HalfFloatScalar *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_11FloatScalar_as_py(struct __pyx_obj_7pyarrow_3lib_FloatScalar *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_maps_as_pydicts); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_11FloatScalar_2__float__(struct __pyx_obj_7pyarrow_3lib_FloatScalar *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_11FloatScalar_4__int__(struct __pyx_obj_7pyarrow_3lib_FloatScalar *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_12DoubleScalar_as_py(struct __pyx_obj_7pyarrow_3lib_DoubleScalar *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_maps_as_pydicts); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_12DoubleScalar_2__float__(struct __pyx_obj_7pyarrow_3lib_DoubleScalar *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_12DoubleScalar_4__int__(struct __pyx_obj_7pyarrow_3lib_DoubleScalar *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15Decimal32Scalar_as_py(struct __pyx_obj_7pyarrow_3lib_Decimal32Scalar *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_maps_as_pydicts); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15Decimal64Scalar_as_py(struct __pyx_obj_7pyarrow_3lib_Decimal64Scalar *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_maps_as_pydicts); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_16Decimal128Scalar_as_py(struct __pyx_obj_7pyarrow_3lib_Decimal128Scalar *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_maps_as_pydicts); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_16Decimal256Scalar_as_py(struct __pyx_obj_7pyarrow_3lib_Decimal256Scalar *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_maps_as_pydicts); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_12Date32Scalar_5value___get__(struct __pyx_obj_7pyarrow_3lib_Date32Scalar *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_12Date32Scalar_as_py(struct __pyx_obj_7pyarrow_3lib_Date32Scalar *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_maps_as_pydicts); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_12Date64Scalar_5value___get__(struct __pyx_obj_7pyarrow_3lib_Date64Scalar *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_12Date64Scalar_as_py(struct __pyx_obj_7pyarrow_3lib_Date64Scalar *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_maps_as_pydicts); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_186_datetime_from_int(CYTHON_UNUSED PyObject *__pyx_self, int64_t __pyx_v_value, enum  arrow::TimeUnit::type __pyx_v_unit, PyObject *__pyx_v_tzinfo); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_12Time32Scalar_5value___get__(struct __pyx_obj_7pyarrow_3lib_Time32Scalar *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_12Time32Scalar_as_py(struct __pyx_obj_7pyarrow_3lib_Time32Scalar *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_maps_as_pydicts); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_12Time64Scalar_5value___get__(struct __pyx_obj_7pyarrow_3lib_Time64Scalar *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_12Time64Scalar_as_py(struct __pyx_obj_7pyarrow_3lib_Time64Scalar *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_maps_as_pydicts); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15TimestampScalar_5value___get__(struct __pyx_obj_7pyarrow_3lib_TimestampScalar *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15TimestampScalar_as_py(struct __pyx_obj_7pyarrow_3lib_TimestampScalar *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_maps_as_pydicts); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15TimestampScalar_2__repr__(struct __pyx_obj_7pyarrow_3lib_TimestampScalar *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_14DurationScalar_5value___get__(struct __pyx_obj_7pyarrow_3lib_DurationScalar *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_14DurationScalar_as_py(struct __pyx_obj_7pyarrow_3lib_DurationScalar *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_maps_as_pydicts); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_26MonthDayNanoIntervalScalar_5value___get__(struct __pyx_obj_7pyarrow_3lib_MonthDayNanoIntervalScalar *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_26MonthDayNanoIntervalScalar_as_py(struct __pyx_obj_7pyarrow_3lib_MonthDayNanoIntervalScalar *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_maps_as_pydicts); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_12BinaryScalar_as_buffer(struct __pyx_obj_7pyarrow_3lib_BinaryScalar *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_12BinaryScalar_2as_py(struct __pyx_obj_7pyarrow_3lib_BinaryScalar *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_maps_as_pydicts); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_12BinaryScalar_4__bytes__(struct __pyx_obj_7pyarrow_3lib_BinaryScalar *__pyx_v_self); /* proto */
static int __pyx_pf_7pyarrow_3lib_12BinaryScalar_6__getbuffer__(struct __pyx_obj_7pyarrow_3lib_BinaryScalar *__pyx_v_self, Py_buffer *__pyx_v_buffer, int __pyx_v_flags); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_12StringScalar_as_py(struct __pyx_obj_7pyarrow_3lib_StringScalar *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_maps_as_pydicts); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_10ListScalar_6values___get__(struct __pyx_obj_7pyarrow_3lib_ListScalar *__pyx_v_self); /* proto */
static Py_ssize_t __pyx_pf_7pyarrow_3lib_10ListScalar___len__(struct __pyx_obj_7pyarrow_3lib_ListScalar *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_10ListScalar_2__getitem__(struct __pyx_obj_7pyarrow_3lib_ListScalar *__pyx_v_self, PyObject *__pyx_v_i); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_10ListScalar_4__iter__(struct __pyx_obj_7pyarrow_3lib_ListScalar *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_10ListScalar_6as_py(struct __pyx_obj_7pyarrow_3lib_ListScalar *__pyx_v_self, PyObject *__pyx_v_maps_as_pydicts); /* proto */
static Py_ssize_t __pyx_pf_7pyarrow_3lib_12StructScalar___len__(struct __pyx_obj_7pyarrow_3lib_StructScalar *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_12StructScalar_2__iter__(struct __pyx_obj_7pyarrow_3lib_StructScalar *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_12StructScalar_5items_genexpr(PyObject *__pyx_self, struct __pyx_obj_7pyarrow_3lib_StructScalar *__pyx_genexpr_arg_0); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_12StructScalar_5items(struct __pyx_obj_7pyarrow_3lib_StructScalar *__pyx_v_self); /* proto */
static int __pyx_pf_7pyarrow_3lib_12StructScalar_7__contains__(struct __pyx_obj_7pyarrow_3lib_StructScalar *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_12StructScalar_9__getitem__(struct __pyx_obj_7pyarrow_3lib_StructScalar *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_12StructScalar_11as_py(struct __pyx_obj_7pyarrow_3lib_StructScalar *__pyx_v_self, PyObject *__pyx_v_maps_as_pydicts); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_12StructScalar_13_as_py_tuple(struct __pyx_obj_7pyarrow_3lib_StructScalar *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_12StructScalar_15__repr__(struct __pyx_obj_7pyarrow_3lib_StructScalar *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_12StructScalar_17__str__(struct __pyx_obj_7pyarrow_3lib_StructScalar *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_9MapScalar___getitem__(struct __pyx_obj_7pyarrow_3lib_MapScalar *__pyx_v_self, PyObject *__pyx_v_i); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_9MapScalar_2__iter__(struct __pyx_obj_7pyarrow_3lib_MapScalar *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_9MapScalar_5as_py(struct __pyx_obj_7pyarrow_3lib_MapScalar *__pyx_v_self, PyObject *__pyx_v_maps_as_pydicts); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_9MapScalar_7keys(struct __pyx_obj_7pyarrow_3lib_MapScalar *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_16DictionaryScalar__reconstruct(PyObject *__pyx_v_type, PyObject *__pyx_v_is_valid, PyObject *__pyx_v_index, PyObject *__pyx_v_dictionary); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_16DictionaryScalar_2__reduce__(struct __pyx_obj_7pyarrow_3lib_DictionaryScalar *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_16DictionaryScalar_5index___get__(struct __pyx_obj_7pyarrow_3lib_DictionaryScalar *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_16DictionaryScalar_5value___get__(struct __pyx_obj_7pyarrow_3lib_DictionaryScalar *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_16DictionaryScalar_10dictionary___get__(struct __pyx_obj_7pyarrow_3lib_DictionaryScalar *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_16DictionaryScalar_4as_py(struct __pyx_obj_7pyarrow_3lib_DictionaryScalar *__pyx_v_self, PyObject *__pyx_v_maps_as_pydicts); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_19RunEndEncodedScalar_5value___get__(struct __pyx_obj_7pyarrow_3lib_RunEndEncodedScalar *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_19RunEndEncodedScalar_as_py(struct __pyx_obj_7pyarrow_3lib_RunEndEncodedScalar *__pyx_v_self, PyObject *__pyx_v_maps_as_pydicts); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_11UnionScalar_5value___get__(struct __pyx_obj_7pyarrow_3lib_UnionScalar *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_11UnionScalar_as_py(struct __pyx_obj_7pyarrow_3lib_UnionScalar *__pyx_v_self, PyObject *__pyx_v_maps_as_pydicts); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_11UnionScalar_9type_code___get__(struct __pyx_obj_7pyarrow_3lib_UnionScalar *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15ExtensionScalar_5value___get__(struct __pyx_obj_7pyarrow_3lib_ExtensionScalar *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15ExtensionScalar_as_py(struct __pyx_obj_7pyarrow_3lib_ExtensionScalar *__pyx_v_self, PyObject *__pyx_v_maps_as_pydicts); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15ExtensionScalar_2from_storage(struct __pyx_obj_7pyarrow_3lib_BaseExtensionType *__pyx_v_typ, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_10UuidScalar_as_py(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_maps_as_pydicts); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_22FixedShapeTensorScalar_to_numpy(struct __pyx_obj_7pyarrow_3lib_FixedShapeTensorScalar *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_22FixedShapeTensorScalar_2to_tensor(struct __pyx_obj_7pyarrow_3lib_FixedShapeTensorScalar *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_11Bool8Scalar_as_py(struct __pyx_obj_7pyarrow_3lib_Bool8Scalar *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_maps_as_pydicts); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_188scalar(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_value, PyObject *__pyx_v_type, PyObject *__pyx_v_from_pandas, struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_memory_pool); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_190_ndarray_to_arrow_type(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_values, struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v_type); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_192_handle_arrow_array_protocol(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_type, PyObject *__pyx_v_mask, PyObject *__pyx_v_size); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_194array(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_type, PyObject *__pyx_v_mask, PyObject *__pyx_v_size, PyObject *__pyx_v_from_pandas, int __pyx_v_safe, struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_memory_pool); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_196asarray(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_values, PyObject *__pyx_v_type); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_198nulls(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_size, PyObject *__pyx_v_type, struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_memory_pool); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_200repeat(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_value, PyObject *__pyx_v_size, struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_memory_pool); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_202infer_type(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_values, PyObject *__pyx_v_mask, PyObject *__pyx_v_from_pandas); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_204arange(CYTHON_UNUSED PyObject *__pyx_self, int64_t __pyx_v_start, int64_t __pyx_v_stop, int64_t __pyx_v_step, PyObject *__pyx_v_memory_pool); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_206_normalize_slice(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_arrow_obj, PyObject *__pyx_v_key); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_208_restore_array(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_data); /* proto */
static int __pyx_pf_7pyarrow_3lib_15ArrayStatistics___init__(struct __pyx_obj_7pyarrow_3lib_ArrayStatistics *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15ArrayStatistics_2__repr__(struct __pyx_obj_7pyarrow_3lib_ArrayStatistics *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15ArrayStatistics_10null_count___get__(struct __pyx_obj_7pyarrow_3lib_ArrayStatistics *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15ArrayStatistics_19is_null_count_exact___get__(struct __pyx_obj_7pyarrow_3lib_ArrayStatistics *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15ArrayStatistics_14distinct_count___get__(struct __pyx_obj_7pyarrow_3lib_ArrayStatistics *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15ArrayStatistics_23is_distinct_count_exact___get__(struct __pyx_obj_7pyarrow_3lib_ArrayStatistics *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15ArrayStatistics_3min___get__(struct __pyx_obj_7pyarrow_3lib_ArrayStatistics *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15ArrayStatistics_12is_min_exact___get__(struct __pyx_obj_7pyarrow_3lib_ArrayStatistics *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15ArrayStatistics_3max___get__(struct __pyx_obj_7pyarrow_3lib_ArrayStatistics *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15ArrayStatistics_12is_max_exact___get__(struct __pyx_obj_7pyarrow_3lib_ArrayStatistics *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15ArrayStatistics_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_ArrayStatistics *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15ArrayStatistics_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_ArrayStatistics *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_18_PandasConvertible_to_pandas(struct __pyx_obj_7pyarrow_3lib__PandasConvertible *__pyx_v_self, PyObject *__pyx_v_memory_pool, PyObject *__pyx_v_categories, int __pyx_v_strings_to_categorical, int __pyx_v_zero_copy_only, int __pyx_v_integer_object_nulls, int __pyx_v_date_as_object, int __pyx_v_timestamp_as_object, int __pyx_v_use_threads, int __pyx_v_deduplicate_objects, int __pyx_v_ignore_metadata, int __pyx_v_safe, int __pyx_v_split_blocks, int __pyx_v_self_destruct, PyObject *__pyx_v_maps_as_pydicts, PyObject *__pyx_v_types_mapper, int __pyx_v_coerce_temporal_nanoseconds); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_18_PandasConvertible_2__reduce_cython__(struct __pyx_obj_7pyarrow_3lib__PandasConvertible *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_18_PandasConvertible_4__setstate_cython__(struct __pyx_obj_7pyarrow_3lib__PandasConvertible *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_7pyarrow_3lib_5Array___init__(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Array_2_debug_print(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Array_4diff(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self, struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Array_6cast(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self, PyObject *__pyx_v_target_type, PyObject *__pyx_v_safe, PyObject *__pyx_v_options, PyObject *__pyx_v_memory_pool); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Array_8view(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self, PyObject *__pyx_v_target_type); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Array_10sum(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Array_12unique(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Array_14dictionary_encode(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self, PyObject *__pyx_v_null_encoding); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Array_16value_counts(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Array_18from_pandas(PyObject *__pyx_v_obj, PyObject *__pyx_v_mask, PyObject *__pyx_v_type, int __pyx_v_safe, struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_memory_pool); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Array_20__reduce__(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Array_22from_buffers(struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v_type, PyObject *__pyx_v_length, PyObject *__pyx_v_buffers, PyObject *__pyx_v_null_count, PyObject *__pyx_v_offset, PyObject *__pyx_v_children); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Array_10null_count___get__(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Array_6nbytes___get__(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Array_24get_total_buffer_size(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Array_26__sizeof__(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Array_28__iter__(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Array_31__repr__(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Array_33to_string(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self, int __pyx_v_indent, int __pyx_v_top_level_indent, int __pyx_v_window, CYTHON_UNUSED int __pyx_v_container_window, bool __pyx_v_skip_new_lines, int __pyx_v_element_size_limit); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Array_35__str__(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Array_37__eq__(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Array_39equals(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self, struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_other); /* proto */
static Py_ssize_t __pyx_pf_7pyarrow_3lib_5Array_41__len__(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Array_43is_null(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self, PyObject *__pyx_v_nan_is_null); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Array_45is_nan(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Array_47is_valid(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Array_49fill_null(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self, PyObject *__pyx_v_fill_value); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Array_51__getitem__(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Array_53slice(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self, PyObject *__pyx_v_offset, PyObject *__pyx_v_length); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Array_55take(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self, PyObject *__pyx_v_indices); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Array_57drop_null(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Array_59filter(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self, PyObject *__pyx_v_mask, PyObject *__pyx_v_null_selection_behavior); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Array_61index(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self, PyObject *__pyx_v_value, PyObject *__pyx_v_start, PyObject *__pyx_v_end, PyObject *__pyx_v_memory_pool); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Array_63sort(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self, PyObject *__pyx_v_order, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Array_65_to_pandas(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self, PyObject *__pyx_v_options, PyObject *__pyx_v_types_mapper, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Array_67__array__(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self, PyObject *__pyx_v_dtype, PyObject *__pyx_v_copy); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Array_69to_numpy(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self, PyObject *__pyx_v_zero_copy_only, PyObject *__pyx_v_writable); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Array_71to_pylist(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self, PyObject *__pyx_v_maps_as_pydicts); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Array_73tolist(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Array_75validate(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self, PyObject *__pyx_v_full); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Array_6offset___get__(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Array_77buffers(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Array_79copy_to(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self, PyObject *__pyx_v_destination); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Array_81_export_to_c(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self, PyObject *__pyx_v_out_ptr, PyObject *__pyx_v_out_schema_ptr); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Array_83_import_from_c(PyObject *__pyx_v_in_ptr, PyObject *__pyx_v_type); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Array_85__arrow_c_array__(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self, PyObject *__pyx_v_requested_schema); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Array_87_import_from_c_capsule(PyObject *__pyx_v_schema_capsule, PyObject *__pyx_v_array_capsule); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Array_89_export_to_c_device(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self, PyObject *__pyx_v_out_ptr, PyObject *__pyx_v_out_schema_ptr); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Array_91_import_from_c_device(PyObject *__pyx_v_in_ptr, PyObject *__pyx_v_type); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Array_93__arrow_c_device_array__(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self, PyObject *__pyx_v_requested_schema, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Array_95_import_from_c_device_capsule(PyObject *__pyx_v_schema_capsule, PyObject *__pyx_v_array_capsule); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Array_97__dlpack__(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self, PyObject *__pyx_v_stream); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Array_99__dlpack_device__(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Array_11device_type___get__(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Array_6is_cpu___get__(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Array_10statistics___get__(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Array_4type___get__(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Array_5_name___get__(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_12BooleanArray_11false_count___get__(struct __pyx_obj_7pyarrow_3lib_BooleanArray *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_12BooleanArray_10true_count___get__(struct __pyx_obj_7pyarrow_3lib_BooleanArray *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_25MonthDayNanoIntervalArray_to_pylist(struct __pyx_obj_7pyarrow_3lib_MonthDayNanoIntervalArray *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_maps_as_pydicts); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_13BaseListArray_flatten(struct __pyx_obj_7pyarrow_3lib_BaseListArray *__pyx_v_self, PyObject *__pyx_v_recursive); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_13BaseListArray_2value_parent_indices(struct __pyx_obj_7pyarrow_3lib_BaseListArray *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_13BaseListArray_4value_lengths(struct __pyx_obj_7pyarrow_3lib_BaseListArray *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_9ListArray_from_arrays(PyObject *__pyx_v_offsets, PyObject *__pyx_v_values, struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v_type, struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_pool, PyObject *__pyx_v_mask); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_9ListArray_6values___get__(struct __pyx_obj_7pyarrow_3lib_ListArray *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_9ListArray_7offsets___get__(struct __pyx_obj_7pyarrow_3lib_ListArray *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_14LargeListArray_from_arrays(PyObject *__pyx_v_offsets, PyObject *__pyx_v_values, struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v_type, struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_pool, PyObject *__pyx_v_mask); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_14LargeListArray_6values___get__(struct __pyx_obj_7pyarrow_3lib_LargeListArray *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_14LargeListArray_7offsets___get__(struct __pyx_obj_7pyarrow_3lib_LargeListArray *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_13ListViewArray_from_arrays(PyObject *__pyx_v_offsets, PyObject *__pyx_v_sizes, PyObject *__pyx_v_values, struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v_type, struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_pool, PyObject *__pyx_v_mask); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_13ListViewArray_6values___get__(struct __pyx_obj_7pyarrow_3lib_ListViewArray *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_13ListViewArray_7offsets___get__(struct __pyx_obj_7pyarrow_3lib_ListViewArray *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_13ListViewArray_5sizes___get__(struct __pyx_obj_7pyarrow_3lib_ListViewArray *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_18LargeListViewArray_from_arrays(PyObject *__pyx_v_offsets, PyObject *__pyx_v_sizes, PyObject *__pyx_v_values, struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v_type, struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_pool, PyObject *__pyx_v_mask); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_18LargeListViewArray_6values___get__(struct __pyx_obj_7pyarrow_3lib_LargeListViewArray *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_18LargeListViewArray_7offsets___get__(struct __pyx_obj_7pyarrow_3lib_LargeListViewArray *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_18LargeListViewArray_5sizes___get__(struct __pyx_obj_7pyarrow_3lib_LargeListViewArray *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_8MapArray_from_arrays(PyObject *__pyx_v_offsets, PyObject *__pyx_v_keys, PyObject *__pyx_v_items, struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v_type, struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_pool, PyObject *__pyx_v_mask); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_8MapArray_4keys___get__(struct __pyx_obj_7pyarrow_3lib_MapArray *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_8MapArray_5items___get__(struct __pyx_obj_7pyarrow_3lib_MapArray *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_18FixedSizeListArray_from_arrays(PyObject *__pyx_v_values, PyObject *__pyx_v_list_size, struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v_type, PyObject *__pyx_v_mask); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_18FixedSizeListArray_6values___get__(struct __pyx_obj_7pyarrow_3lib_FixedSizeListArray *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_10UnionArray_child(struct __pyx_obj_7pyarrow_3lib_UnionArray *__pyx_v_self, int __pyx_v_pos); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_10UnionArray_2field(struct __pyx_obj_7pyarrow_3lib_UnionArray *__pyx_v_self, int __pyx_v_pos); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_10UnionArray_10type_codes___get__(struct __pyx_obj_7pyarrow_3lib_UnionArray *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_10UnionArray_7offsets___get__(struct __pyx_obj_7pyarrow_3lib_UnionArray *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_10UnionArray_4from_dense(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_types, struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_value_offsets, PyObject *__pyx_v_children, PyObject *__pyx_v_field_names, PyObject *__pyx_v_type_codes); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_10UnionArray_6from_sparse(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_types, PyObject *__pyx_v_children, PyObject *__pyx_v_field_names, PyObject *__pyx_v_type_codes); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_11StringArray_from_buffers(int __pyx_v_length, struct __pyx_obj_7pyarrow_3lib_Buffer *__pyx_v_value_offsets, struct __pyx_obj_7pyarrow_3lib_Buffer *__pyx_v_data, struct __pyx_obj_7pyarrow_3lib_Buffer *__pyx_v_null_bitmap, int __pyx_v_null_count, int __pyx_v_offset); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_16LargeStringArray_from_buffers(int __pyx_v_length, struct __pyx_obj_7pyarrow_3lib_Buffer *__pyx_v_value_offsets, struct __pyx_obj_7pyarrow_3lib_Buffer *__pyx_v_data, struct __pyx_obj_7pyarrow_3lib_Buffer *__pyx_v_null_bitmap, int __pyx_v_null_count, int __pyx_v_offset); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_11BinaryArray_19total_values_length___get__(struct __pyx_obj_7pyarrow_3lib_BinaryArray *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_16LargeBinaryArray_19total_values_length___get__(struct __pyx_obj_7pyarrow_3lib_LargeBinaryArray *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15DictionaryArray_dictionary_encode(struct __pyx_obj_7pyarrow_3lib_DictionaryArray *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15DictionaryArray_2dictionary_decode(struct __pyx_obj_7pyarrow_3lib_DictionaryArray *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15DictionaryArray_10dictionary___get__(struct __pyx_obj_7pyarrow_3lib_DictionaryArray *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15DictionaryArray_7indices___get__(struct __pyx_obj_7pyarrow_3lib_DictionaryArray *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15DictionaryArray_4from_buffers(struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v_type, int64_t __pyx_v_length, PyObject *__pyx_v_buffers, struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_dictionary, int64_t __pyx_v_null_count, int64_t __pyx_v_offset); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15DictionaryArray_6from_arrays(PyObject *__pyx_v_indices, PyObject *__pyx_v_dictionary, PyObject *__pyx_v_mask, int __pyx_v_ordered, int __pyx_v_from_pandas, int __pyx_v_safe, struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_memory_pool); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_11StructArray_field(struct __pyx_obj_7pyarrow_3lib_StructArray *__pyx_v_self, PyObject *__pyx_v_index); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_11StructArray_2_flattened_field(struct __pyx_obj_7pyarrow_3lib_StructArray *__pyx_v_self, PyObject *__pyx_v_index, struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_memory_pool); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_11StructArray_4flatten(struct __pyx_obj_7pyarrow_3lib_StructArray *__pyx_v_self, struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_memory_pool); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_11StructArray_6from_arrays(PyObject *__pyx_v_arrays, PyObject *__pyx_v_names, PyObject *__pyx_v_fields, PyObject *__pyx_v_mask, PyObject *__pyx_v_memory_pool, PyObject *__pyx_v_type); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_11StructArray_8sort(struct __pyx_obj_7pyarrow_3lib_StructArray *__pyx_v_self, PyObject *__pyx_v_order, PyObject *__pyx_v_by, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_18RunEndEncodedArray__from_arrays(PyObject *__pyx_v_type, PyObject *__pyx_v_allow_none_for_type, PyObject *__pyx_v_logical_length, PyObject *__pyx_v_run_ends, PyObject *__pyx_v_values, PyObject *__pyx_v_logical_offset); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_18RunEndEncodedArray_2from_arrays(PyObject *__pyx_v_run_ends, PyObject *__pyx_v_values, PyObject *__pyx_v_type); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_18RunEndEncodedArray_4from_buffers(struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v_type, PyObject *__pyx_v_length, PyObject *__pyx_v_buffers, PyObject *__pyx_v_null_count, PyObject *__pyx_v_offset, PyObject *__pyx_v_children); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_18RunEndEncodedArray_8run_ends___get__(struct __pyx_obj_7pyarrow_3lib_RunEndEncodedArray *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_18RunEndEncodedArray_6values___get__(struct __pyx_obj_7pyarrow_3lib_RunEndEncodedArray *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_18RunEndEncodedArray_6find_physical_offset(struct __pyx_obj_7pyarrow_3lib_RunEndEncodedArray *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_18RunEndEncodedArray_8find_physical_length(struct __pyx_obj_7pyarrow_3lib_RunEndEncodedArray *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_14ExtensionArray_7storage___get__(struct __pyx_obj_7pyarrow_3lib_ExtensionArray *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_14ExtensionArray_from_storage(struct __pyx_obj_7pyarrow_3lib_BaseExtensionType *__pyx_v_typ, struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_storage); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_21FixedShapeTensorArray_to_numpy_ndarray(struct __pyx_obj_7pyarrow_3lib_FixedShapeTensorArray *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_21FixedShapeTensorArray_2to_tensor(struct __pyx_obj_7pyarrow_3lib_FixedShapeTensorArray *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_21FixedShapeTensorArray_18from_numpy_ndarray_genexpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_21FixedShapeTensorArray_4from_numpy_ndarray(PyObject *__pyx_v_obj, PyObject *__pyx_v_dim_names); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_10Bool8Array_to_numpy(struct __pyx_obj_7pyarrow_3lib_Bool8Array *__pyx_v_self, PyObject *__pyx_v_zero_copy_only, PyObject *__pyx_v_writable); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_10Bool8Array_2from_storage(struct __pyx_obj_7pyarrow_3lib_Int8Array *__pyx_v_storage); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_10Bool8Array_4from_numpy(PyObject *__pyx_v_obj); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_210concat_arrays(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_arrays, struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_memory_pool); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_212_empty_array(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v_type); /* proto */
static int __pyx_pf_7pyarrow_3lib_13StringBuilder___cinit__(struct __pyx_obj_7pyarrow_3lib_StringBuilder *__pyx_v_self, struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_memory_pool); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_13StringBuilder_2append(struct __pyx_obj_7pyarrow_3lib_StringBuilder *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_13StringBuilder_4append_values(struct __pyx_obj_7pyarrow_3lib_StringBuilder *__pyx_v_self, PyObject *__pyx_v_values); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_13StringBuilder_6finish(struct __pyx_obj_7pyarrow_3lib_StringBuilder *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_13StringBuilder_10null_count___get__(struct __pyx_obj_7pyarrow_3lib_StringBuilder *__pyx_v_self); /* proto */
static Py_ssize_t __pyx_pf_7pyarrow_3lib_13StringBuilder_8__len__(struct __pyx_obj_7pyarrow_3lib_StringBuilder *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_13StringBuilder_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_StringBuilder *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_13StringBuilder_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_StringBuilder *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_7pyarrow_3lib_17StringViewBuilder___cinit__(struct __pyx_obj_7pyarrow_3lib_StringViewBuilder *__pyx_v_self, struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_memory_pool); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_17StringViewBuilder_2append(struct __pyx_obj_7pyarrow_3lib_StringViewBuilder *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_17StringViewBuilder_4append_values(struct __pyx_obj_7pyarrow_3lib_StringViewBuilder *__pyx_v_self, PyObject *__pyx_v_values); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_17StringViewBuilder_6finish(struct __pyx_obj_7pyarrow_3lib_StringViewBuilder *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_17StringViewBuilder_10null_count___get__(struct __pyx_obj_7pyarrow_3lib_StringViewBuilder *__pyx_v_self); /* proto */
static Py_ssize_t __pyx_pf_7pyarrow_3lib_17StringViewBuilder_8__len__(struct __pyx_obj_7pyarrow_3lib_StringViewBuilder *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_17StringViewBuilder_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_StringViewBuilder *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_17StringViewBuilder_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_StringViewBuilder *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_7pyarrow_3lib_12ChunkedArray___cinit__(struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_self); /* proto */
static int __pyx_pf_7pyarrow_3lib_12ChunkedArray_2__init__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_12ChunkedArray_4__reduce__(struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_12ChunkedArray_4data___get__(struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_12ChunkedArray_4type___get__(struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_12ChunkedArray_6length(struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_self); /* proto */
static Py_ssize_t __pyx_pf_7pyarrow_3lib_12ChunkedArray_8__len__(struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_12ChunkedArray_10__repr__(struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_12ChunkedArray_12to_string(struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_self, int __pyx_v_indent, int __pyx_v_window, int __pyx_v_container_window, bool __pyx_v_skip_new_lines, int __pyx_v_element_size_limit); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_12ChunkedArray_14format(struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_self, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_12ChunkedArray_16__str__(struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_12ChunkedArray_18validate(struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_self, PyObject *__pyx_v_full); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_12ChunkedArray_10null_count___get__(struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_12ChunkedArray_6nbytes___get__(struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_12ChunkedArray_20get_total_buffer_size(struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_12ChunkedArray_22__sizeof__(struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_12ChunkedArray_24__iter__(struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_12ChunkedArray_27__getitem__(struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_12ChunkedArray_29is_null(struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_self, PyObject *__pyx_v_nan_is_null); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_12ChunkedArray_31is_nan(struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_12ChunkedArray_33is_valid(struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_12ChunkedArray_35__eq__(struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_12ChunkedArray_37fill_null(struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_self, PyObject *__pyx_v_fill_value); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_12ChunkedArray_39equals(struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_self, struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_12ChunkedArray_41_to_pandas(struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_self, PyObject *__pyx_v_options, PyObject *__pyx_v_types_mapper, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_12ChunkedArray_43to_numpy(struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_self, PyObject *__pyx_v_zero_copy_only); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_12ChunkedArray_45__array__(struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_self, PyObject *__pyx_v_dtype, PyObject *__pyx_v_copy); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_12ChunkedArray_47cast(struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_self, PyObject *__pyx_v_target_type, PyObject *__pyx_v_safe, PyObject *__pyx_v_options); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_12ChunkedArray_49dictionary_encode(struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_self, PyObject *__pyx_v_null_encoding); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_12ChunkedArray_51flatten(struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_self, struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_memory_pool); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_12ChunkedArray_53combine_chunks(struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_self, CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_memory_pool); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_12ChunkedArray_55unique(struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_12ChunkedArray_57value_counts(struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_12ChunkedArray_59slice(struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_self, PyObject *__pyx_v_offset, PyObject *__pyx_v_length); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_12ChunkedArray_61filter(struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_self, PyObject *__pyx_v_mask, PyObject *__pyx_v_null_selection_behavior); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_12ChunkedArray_63index(struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_self, PyObject *__pyx_v_value, PyObject *__pyx_v_start, PyObject *__pyx_v_end, PyObject *__pyx_v_memory_pool); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_12ChunkedArray_65take(struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_self, PyObject *__pyx_v_indices); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_12ChunkedArray_67drop_null(struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_12ChunkedArray_69sort(struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_self, PyObject *__pyx_v_order, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_12ChunkedArray_71unify_dictionaries(struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_self, struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_memory_pool); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_12ChunkedArray_10num_chunks___get__(struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_12ChunkedArray_73chunk(struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_self, PyObject *__pyx_v_i); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_12ChunkedArray_6chunks___get__(struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_12ChunkedArray_75iterchunks(struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_12ChunkedArray_78to_pylist(struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_self, PyObject *__pyx_v_maps_as_pydicts); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_12ChunkedArray_80__arrow_c_stream__(struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_self, PyObject *__pyx_v_requested_schema); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_12ChunkedArray_82_import_from_c_capsule(PyObject *__pyx_v_stream); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_12ChunkedArray_6is_cpu___get__(struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_12ChunkedArray_84_assert_cpu(struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_12ChunkedArray_5_name___get__(struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_214chunked_array(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_arrays, PyObject *__pyx_v_type); /* proto */
static int __pyx_pf_7pyarrow_3lib_8_Tabular___init__(struct __pyx_obj_7pyarrow_3lib__Tabular *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_8_Tabular_2__array__(struct __pyx_obj_7pyarrow_3lib__Tabular *__pyx_v_self, PyObject *__pyx_v_dtype, PyObject *__pyx_v_copy); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_8_Tabular_4__dataframe__(struct __pyx_obj_7pyarrow_3lib__Tabular *__pyx_v_self, int __pyx_v_nan_as_null, int __pyx_v_allow_copy); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_8_Tabular_6__eq__(struct __pyx_obj_7pyarrow_3lib__Tabular *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_8_Tabular_8__getitem__(struct __pyx_obj_7pyarrow_3lib__Tabular *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
static Py_ssize_t __pyx_pf_7pyarrow_3lib_8_Tabular_10__len__(struct __pyx_obj_7pyarrow_3lib__Tabular *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_8_Tabular_12__repr__(struct __pyx_obj_7pyarrow_3lib__Tabular *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_8_Tabular_14_column(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib__Tabular *__pyx_v_self, CYTHON_UNUSED int __pyx_v_i); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_8_Tabular_16_ensure_integer_index(struct __pyx_obj_7pyarrow_3lib__Tabular *__pyx_v_self, PyObject *__pyx_v_i); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_8_Tabular_18_is_initialized(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib__Tabular *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_8_Tabular_20column(struct __pyx_obj_7pyarrow_3lib__Tabular *__pyx_v_self, PyObject *__pyx_v_i); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_8_Tabular_12column_names___get__(struct __pyx_obj_7pyarrow_3lib__Tabular *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_8_Tabular_7columns___get__(struct __pyx_obj_7pyarrow_3lib__Tabular *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_8_Tabular_22drop_null(struct __pyx_obj_7pyarrow_3lib__Tabular *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_8_Tabular_24field(struct __pyx_obj_7pyarrow_3lib__Tabular *__pyx_v_self, PyObject *__pyx_v_i); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_8_Tabular_26from_pydict(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_mapping, PyObject *__pyx_v_schema, PyObject *__pyx_v_metadata); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_8_Tabular_28from_pylist(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_mapping, PyObject *__pyx_v_schema, PyObject *__pyx_v_metadata); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_8_Tabular_30itercolumns(struct __pyx_obj_7pyarrow_3lib__Tabular *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_8_Tabular_11num_columns___get__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib__Tabular *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_8_Tabular_8num_rows___get__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib__Tabular *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_8_Tabular_5shape___get__(struct __pyx_obj_7pyarrow_3lib__Tabular *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_8_Tabular_6schema___get__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib__Tabular *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_8_Tabular_33sort_by(struct __pyx_obj_7pyarrow_3lib__Tabular *__pyx_v_self, PyObject *__pyx_v_sorting, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_8_Tabular_35take(struct __pyx_obj_7pyarrow_3lib__Tabular *__pyx_v_self, PyObject *__pyx_v_indices); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_8_Tabular_37filter(struct __pyx_obj_7pyarrow_3lib__Tabular *__pyx_v_self, PyObject *__pyx_v_mask, PyObject *__pyx_v_null_selection_behavior); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_8_Tabular_39to_pydict(struct __pyx_obj_7pyarrow_3lib__Tabular *__pyx_v_self, PyObject *__pyx_v_maps_as_pydicts); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_8_Tabular_41to_pylist(struct __pyx_obj_7pyarrow_3lib__Tabular *__pyx_v_self, PyObject *__pyx_v_maps_as_pydicts); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_8_Tabular_43to_string(struct __pyx_obj_7pyarrow_3lib__Tabular *__pyx_v_self, PyObject *__pyx_v_show_metadata, PyObject *__pyx_v_preview_cols); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_8_Tabular_45remove_column(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib__Tabular *__pyx_v_self, CYTHON_UNUSED int __pyx_v_i); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_8_Tabular_47drop_columns(struct __pyx_obj_7pyarrow_3lib__Tabular *__pyx_v_self, PyObject *__pyx_v_columns); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_8_Tabular_49add_column(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib__Tabular *__pyx_v_self, CYTHON_UNUSED int __pyx_v_i, CYTHON_UNUSED PyObject *__pyx_v_field_, CYTHON_UNUSED PyObject *__pyx_v_column); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_8_Tabular_51append_column(struct __pyx_obj_7pyarrow_3lib__Tabular *__pyx_v_self, PyObject *__pyx_v_field_, PyObject *__pyx_v_column); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_8_Tabular_53__reduce_cython__(struct __pyx_obj_7pyarrow_3lib__Tabular *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_8_Tabular_55__setstate_cython__(struct __pyx_obj_7pyarrow_3lib__Tabular *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_7pyarrow_3lib_11RecordBatch___cinit__(struct __pyx_obj_7pyarrow_3lib_RecordBatch *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_11RecordBatch_2_is_initialized(struct __pyx_obj_7pyarrow_3lib_RecordBatch *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_11RecordBatch_4__reduce__(struct __pyx_obj_7pyarrow_3lib_RecordBatch *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_11RecordBatch_6validate(struct __pyx_obj_7pyarrow_3lib_RecordBatch *__pyx_v_self, PyObject *__pyx_v_full); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_11RecordBatch_8replace_schema_metadata(struct __pyx_obj_7pyarrow_3lib_RecordBatch *__pyx_v_self, PyObject *__pyx_v_metadata); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_11RecordBatch_11num_columns___get__(struct __pyx_obj_7pyarrow_3lib_RecordBatch *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_11RecordBatch_8num_rows___get__(struct __pyx_obj_7pyarrow_3lib_RecordBatch *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_11RecordBatch_6schema___get__(struct __pyx_obj_7pyarrow_3lib_RecordBatch *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_11RecordBatch_10_column(struct __pyx_obj_7pyarrow_3lib_RecordBatch *__pyx_v_self, int __pyx_v_i); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_11RecordBatch_6nbytes___get__(struct __pyx_obj_7pyarrow_3lib_RecordBatch *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_11RecordBatch_12get_total_buffer_size(struct __pyx_obj_7pyarrow_3lib_RecordBatch *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_11RecordBatch_14__sizeof__(struct __pyx_obj_7pyarrow_3lib_RecordBatch *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_11RecordBatch_16add_column(struct __pyx_obj_7pyarrow_3lib_RecordBatch *__pyx_v_self, int __pyx_v_i, PyObject *__pyx_v_field_, PyObject *__pyx_v_column); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_11RecordBatch_18remove_column(struct __pyx_obj_7pyarrow_3lib_RecordBatch *__pyx_v_self, int __pyx_v_i); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_11RecordBatch_20set_column(struct __pyx_obj_7pyarrow_3lib_RecordBatch *__pyx_v_self, int __pyx_v_i, PyObject *__pyx_v_field_, PyObject *__pyx_v_column); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_11RecordBatch_22rename_columns(struct __pyx_obj_7pyarrow_3lib_RecordBatch *__pyx_v_self, PyObject *__pyx_v_names); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_11RecordBatch_24serialize(struct __pyx_obj_7pyarrow_3lib_RecordBatch *__pyx_v_self, PyObject *__pyx_v_memory_pool); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_11RecordBatch_26slice(struct __pyx_obj_7pyarrow_3lib_RecordBatch *__pyx_v_self, PyObject *__pyx_v_offset, PyObject *__pyx_v_length); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_11RecordBatch_28equals(struct __pyx_obj_7pyarrow_3lib_RecordBatch *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_check_metadata); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_11RecordBatch_30select(struct __pyx_obj_7pyarrow_3lib_RecordBatch *__pyx_v_self, PyObject *__pyx_v_columns); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_11RecordBatch_32cast(struct __pyx_obj_7pyarrow_3lib_RecordBatch *__pyx_v_self, struct __pyx_obj_7pyarrow_3lib_Schema *__pyx_v_target_schema, PyObject *__pyx_v_safe, PyObject *__pyx_v_options); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_11RecordBatch_34_to_pandas(struct __pyx_obj_7pyarrow_3lib_RecordBatch *__pyx_v_self, PyObject *__pyx_v_options, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_11RecordBatch_36from_pandas(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_df, struct __pyx_obj_7pyarrow_3lib_Schema *__pyx_v_schema, PyObject *__pyx_v_preserve_index, PyObject *__pyx_v_nthreads, PyObject *__pyx_v_columns); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_11RecordBatch_38from_arrays(PyObject *__pyx_v_arrays, PyObject *__pyx_v_names, PyObject *__pyx_v_schema, PyObject *__pyx_v_metadata); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_11RecordBatch_40from_struct_array(struct __pyx_obj_7pyarrow_3lib_StructArray *__pyx_v_struct_array); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_11RecordBatch_42to_struct_array(struct __pyx_obj_7pyarrow_3lib_RecordBatch *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_11RecordBatch_44to_tensor(struct __pyx_obj_7pyarrow_3lib_RecordBatch *__pyx_v_self, bool __pyx_v_null_to_nan, bool __pyx_v_row_major, struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_memory_pool); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_11RecordBatch_46copy_to(struct __pyx_obj_7pyarrow_3lib_RecordBatch *__pyx_v_self, PyObject *__pyx_v_destination); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_11RecordBatch_48_export_to_c(struct __pyx_obj_7pyarrow_3lib_RecordBatch *__pyx_v_self, PyObject *__pyx_v_out_ptr, PyObject *__pyx_v_out_schema_ptr); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_11RecordBatch_50_import_from_c(PyObject *__pyx_v_in_ptr, PyObject *__pyx_v_schema); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_11RecordBatch_52__arrow_c_array__(struct __pyx_obj_7pyarrow_3lib_RecordBatch *__pyx_v_self, PyObject *__pyx_v_requested_schema); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_11RecordBatch_54__arrow_c_stream__(struct __pyx_obj_7pyarrow_3lib_RecordBatch *__pyx_v_self, PyObject *__pyx_v_requested_schema); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_11RecordBatch_56_import_from_c_capsule(PyObject *__pyx_v_schema_capsule, PyObject *__pyx_v_array_capsule); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_11RecordBatch_58_export_to_c_device(struct __pyx_obj_7pyarrow_3lib_RecordBatch *__pyx_v_self, PyObject *__pyx_v_out_ptr, PyObject *__pyx_v_out_schema_ptr); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_11RecordBatch_60_import_from_c_device(PyObject *__pyx_v_in_ptr, PyObject *__pyx_v_schema); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_11RecordBatch_62__arrow_c_device_array__(struct __pyx_obj_7pyarrow_3lib_RecordBatch *__pyx_v_self, PyObject *__pyx_v_requested_schema, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_11RecordBatch_64_import_from_c_device_capsule(PyObject *__pyx_v_schema_capsule, PyObject *__pyx_v_array_capsule); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_11RecordBatch_11device_type___get__(struct __pyx_obj_7pyarrow_3lib_RecordBatch *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_11RecordBatch_6is_cpu___get__(struct __pyx_obj_7pyarrow_3lib_RecordBatch *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_216_reconstruct_record_batch(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_columns, PyObject *__pyx_v_schema); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_218table_to_blocks(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_options, struct __pyx_obj_7pyarrow_3lib_Table *__pyx_v_table, PyObject *__pyx_v_categories, PyObject *__pyx_v_extension_columns); /* proto */
static int __pyx_pf_7pyarrow_3lib_5Table___cinit__(struct __pyx_obj_7pyarrow_3lib_Table *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Table_2_is_initialized(struct __pyx_obj_7pyarrow_3lib_Table *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Table_4validate(struct __pyx_obj_7pyarrow_3lib_Table *__pyx_v_self, PyObject *__pyx_v_full); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Table_6__reduce__(struct __pyx_obj_7pyarrow_3lib_Table *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Table_8slice(struct __pyx_obj_7pyarrow_3lib_Table *__pyx_v_self, PyObject *__pyx_v_offset, PyObject *__pyx_v_length); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Table_10select(struct __pyx_obj_7pyarrow_3lib_Table *__pyx_v_self, PyObject *__pyx_v_columns); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Table_12replace_schema_metadata(struct __pyx_obj_7pyarrow_3lib_Table *__pyx_v_self, PyObject *__pyx_v_metadata); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Table_14flatten(struct __pyx_obj_7pyarrow_3lib_Table *__pyx_v_self, struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_memory_pool); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Table_16combine_chunks(struct __pyx_obj_7pyarrow_3lib_Table *__pyx_v_self, struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_memory_pool); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Table_18unify_dictionaries(struct __pyx_obj_7pyarrow_3lib_Table *__pyx_v_self, struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_memory_pool); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Table_20equals(struct __pyx_obj_7pyarrow_3lib_Table *__pyx_v_self, struct __pyx_obj_7pyarrow_3lib_Table *__pyx_v_other, int __pyx_v_check_metadata); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Table_22cast(struct __pyx_obj_7pyarrow_3lib_Table *__pyx_v_self, struct __pyx_obj_7pyarrow_3lib_Schema *__pyx_v_target_schema, PyObject *__pyx_v_safe, PyObject *__pyx_v_options); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Table_24from_pandas(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_df, struct __pyx_obj_7pyarrow_3lib_Schema *__pyx_v_schema, PyObject *__pyx_v_preserve_index, PyObject *__pyx_v_nthreads, PyObject *__pyx_v_columns, int __pyx_v_safe); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Table_26from_arrays(PyObject *__pyx_v_arrays, PyObject *__pyx_v_names, PyObject *__pyx_v_schema, PyObject *__pyx_v_metadata); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Table_28from_struct_array(PyObject *__pyx_v_struct_array); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Table_30to_struct_array(struct __pyx_obj_7pyarrow_3lib_Table *__pyx_v_self, PyObject *__pyx_v_max_chunksize); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Table_32from_batches(PyObject *__pyx_v_batches, struct __pyx_obj_7pyarrow_3lib_Schema *__pyx_v_schema); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Table_34to_batches(struct __pyx_obj_7pyarrow_3lib_Table *__pyx_v_self, PyObject *__pyx_v_max_chunksize); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Table_36to_reader(struct __pyx_obj_7pyarrow_3lib_Table *__pyx_v_self, PyObject *__pyx_v_max_chunksize); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Table_38_to_pandas(struct __pyx_obj_7pyarrow_3lib_Table *__pyx_v_self, PyObject *__pyx_v_options, PyObject *__pyx_v_categories, PyObject *__pyx_v_ignore_metadata, PyObject *__pyx_v_types_mapper); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Table_6schema___get__(struct __pyx_obj_7pyarrow_3lib_Table *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Table_40_column(struct __pyx_obj_7pyarrow_3lib_Table *__pyx_v_self, int __pyx_v_i); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Table_11num_columns___get__(struct __pyx_obj_7pyarrow_3lib_Table *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Table_8num_rows___get__(struct __pyx_obj_7pyarrow_3lib_Table *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Table_6nbytes___get__(struct __pyx_obj_7pyarrow_3lib_Table *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Table_42get_total_buffer_size(struct __pyx_obj_7pyarrow_3lib_Table *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Table_44__sizeof__(struct __pyx_obj_7pyarrow_3lib_Table *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Table_46add_column(struct __pyx_obj_7pyarrow_3lib_Table *__pyx_v_self, int __pyx_v_i, PyObject *__pyx_v_field_, PyObject *__pyx_v_column); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Table_48remove_column(struct __pyx_obj_7pyarrow_3lib_Table *__pyx_v_self, int __pyx_v_i); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Table_50set_column(struct __pyx_obj_7pyarrow_3lib_Table *__pyx_v_self, int __pyx_v_i, PyObject *__pyx_v_field_, PyObject *__pyx_v_column); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Table_52rename_columns(struct __pyx_obj_7pyarrow_3lib_Table *__pyx_v_self, PyObject *__pyx_v_names); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Table_54drop(struct __pyx_obj_7pyarrow_3lib_Table *__pyx_v_self, PyObject *__pyx_v_columns); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Table_56group_by(struct __pyx_obj_7pyarrow_3lib_Table *__pyx_v_self, PyObject *__pyx_v_keys, PyObject *__pyx_v_use_threads); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Table_58join(struct __pyx_obj_7pyarrow_3lib_Table *__pyx_v_self, PyObject *__pyx_v_right_table, PyObject *__pyx_v_keys, PyObject *__pyx_v_right_keys, PyObject *__pyx_v_join_type, PyObject *__pyx_v_left_suffix, PyObject *__pyx_v_right_suffix, PyObject *__pyx_v_coalesce_keys, PyObject *__pyx_v_use_threads, PyObject *__pyx_v_filter_expression); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Table_60join_asof(struct __pyx_obj_7pyarrow_3lib_Table *__pyx_v_self, PyObject *__pyx_v_right_table, PyObject *__pyx_v_on, PyObject *__pyx_v_by, PyObject *__pyx_v_tolerance, PyObject *__pyx_v_right_on, PyObject *__pyx_v_right_by); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Table_62__arrow_c_stream__(struct __pyx_obj_7pyarrow_3lib_Table *__pyx_v_self, PyObject *__pyx_v_requested_schema); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Table_6is_cpu_7__get___genexpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Table_6is_cpu___get__(struct __pyx_obj_7pyarrow_3lib_Table *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_220_reconstruct_table(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_arrays, PyObject *__pyx_v_schema); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_222record_batch(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_data, PyObject *__pyx_v_names, PyObject *__pyx_v_schema, PyObject *__pyx_v_metadata); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_224table(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_data, PyObject *__pyx_v_names, PyObject *__pyx_v_schema, PyObject *__pyx_v_metadata, PyObject *__pyx_v_nthreads); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_226concat_tables(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_tables, struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_memory_pool, PyObject *__pyx_v_promote_options, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_228concat_batches(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_recordbatches, struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_memory_pool); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_230_from_pydict(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_mapping, PyObject *__pyx_v_schema, PyObject *__pyx_v_metadata); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_232_from_pylist(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_mapping, PyObject *__pyx_v_schema, PyObject *__pyx_v_metadata); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_12TableGroupBy___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_table, PyObject *__pyx_v_keys, PyObject *__pyx_v_use_threads); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_12TableGroupBy_2aggregate(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_aggregations); /* proto */
static int __pyx_pf_7pyarrow_3lib_6Tensor___init__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_Tensor *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_6Tensor_2_make_shape_or_strides_buffer(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_Tensor *__pyx_v_self, PyObject *__pyx_v_values); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_6Tensor_4__repr__(struct __pyx_obj_7pyarrow_3lib_Tensor *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_6Tensor_6from_numpy(PyObject *__pyx_v_obj, PyObject *__pyx_v_dim_names); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_6Tensor_8to_numpy(struct __pyx_obj_7pyarrow_3lib_Tensor *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_6Tensor_10equals(struct __pyx_obj_7pyarrow_3lib_Tensor *__pyx_v_self, struct __pyx_obj_7pyarrow_3lib_Tensor *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_6Tensor_12__eq__(struct __pyx_obj_7pyarrow_3lib_Tensor *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_6Tensor_14dim_name(struct __pyx_obj_7pyarrow_3lib_Tensor *__pyx_v_self, PyObject *__pyx_v_i); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_6Tensor_9dim_names___get__(struct __pyx_obj_7pyarrow_3lib_Tensor *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_6Tensor_10is_mutable___get__(struct __pyx_obj_7pyarrow_3lib_Tensor *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_6Tensor_13is_contiguous___get__(struct __pyx_obj_7pyarrow_3lib_Tensor *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_6Tensor_4ndim___get__(struct __pyx_obj_7pyarrow_3lib_Tensor *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_6Tensor_4size___get__(struct __pyx_obj_7pyarrow_3lib_Tensor *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_6Tensor_5shape___get__(struct __pyx_obj_7pyarrow_3lib_Tensor *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_6Tensor_7strides___get__(struct __pyx_obj_7pyarrow_3lib_Tensor *__pyx_v_self); /* proto */
static int __pyx_pf_7pyarrow_3lib_6Tensor_16__getbuffer__(struct __pyx_obj_7pyarrow_3lib_Tensor *__pyx_v_self, Py_buffer *__pyx_v_buffer, CYTHON_UNUSED int __pyx_v_flags); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_6Tensor_18__dlpack__(struct __pyx_obj_7pyarrow_3lib_Tensor *__pyx_v_self, PyObject *__pyx_v_stream); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_6Tensor_20__dlpack_device__(struct __pyx_obj_7pyarrow_3lib_Tensor *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_6Tensor_4type___get__(struct __pyx_obj_7pyarrow_3lib_Tensor *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_6Tensor_14_ssize_t_shape___get__(struct __pyx_obj_7pyarrow_3lib_Tensor *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_6Tensor_16_ssize_t_strides___get__(struct __pyx_obj_7pyarrow_3lib_Tensor *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_6Tensor_22__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_Tensor *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_6Tensor_24__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_Tensor *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_7pyarrow_3lib_15SparseCOOTensor___init__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_SparseCOOTensor *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCOOTensor_2__repr__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_SparseCOOTensor *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCOOTensor_4from_dense_numpy(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_obj, PyObject *__pyx_v_dim_names); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCOOTensor_6from_numpy(PyObject *__pyx_v_data, PyObject *__pyx_v_coords, PyObject *__pyx_v_shape, PyObject *__pyx_v_dim_names); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCOOTensor_8from_scipy(PyObject *__pyx_v_obj, PyObject *__pyx_v_dim_names); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCOOTensor_10from_pydata_sparse(PyObject *__pyx_v_obj, PyObject *__pyx_v_dim_names); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCOOTensor_12from_tensor(PyObject *__pyx_v_obj); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCOOTensor_14to_numpy(struct __pyx_obj_7pyarrow_3lib_SparseCOOTensor *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCOOTensor_16to_scipy(struct __pyx_obj_7pyarrow_3lib_SparseCOOTensor *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCOOTensor_18to_pydata_sparse(struct __pyx_obj_7pyarrow_3lib_SparseCOOTensor *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCOOTensor_20to_tensor(struct __pyx_obj_7pyarrow_3lib_SparseCOOTensor *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCOOTensor_22equals(struct __pyx_obj_7pyarrow_3lib_SparseCOOTensor *__pyx_v_self, struct __pyx_obj_7pyarrow_3lib_SparseCOOTensor *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCOOTensor_24__eq__(struct __pyx_obj_7pyarrow_3lib_SparseCOOTensor *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCOOTensor_10is_mutable___get__(struct __pyx_obj_7pyarrow_3lib_SparseCOOTensor *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCOOTensor_4ndim___get__(struct __pyx_obj_7pyarrow_3lib_SparseCOOTensor *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCOOTensor_5shape___get__(struct __pyx_obj_7pyarrow_3lib_SparseCOOTensor *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCOOTensor_4size___get__(struct __pyx_obj_7pyarrow_3lib_SparseCOOTensor *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCOOTensor_26dim_name(struct __pyx_obj_7pyarrow_3lib_SparseCOOTensor *__pyx_v_self, PyObject *__pyx_v_i); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCOOTensor_9dim_names_7__get___genexpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCOOTensor_9dim_names___get__(struct __pyx_obj_7pyarrow_3lib_SparseCOOTensor *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCOOTensor_15non_zero_length___get__(struct __pyx_obj_7pyarrow_3lib_SparseCOOTensor *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCOOTensor_20has_canonical_format___get__(struct __pyx_obj_7pyarrow_3lib_SparseCOOTensor *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCOOTensor_4type___get__(struct __pyx_obj_7pyarrow_3lib_SparseCOOTensor *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCOOTensor_28__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_SparseCOOTensor *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCOOTensor_30__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_SparseCOOTensor *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_7pyarrow_3lib_15SparseCSRMatrix___init__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_SparseCSRMatrix *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSRMatrix_2__repr__(struct __pyx_obj_7pyarrow_3lib_SparseCSRMatrix *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSRMatrix_4from_dense_numpy(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_obj, PyObject *__pyx_v_dim_names); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSRMatrix_6from_numpy(PyObject *__pyx_v_data, PyObject *__pyx_v_indptr, PyObject *__pyx_v_indices, PyObject *__pyx_v_shape, PyObject *__pyx_v_dim_names); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSRMatrix_8from_scipy(PyObject *__pyx_v_obj, PyObject *__pyx_v_dim_names); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSRMatrix_10from_tensor(PyObject *__pyx_v_obj); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSRMatrix_12to_numpy(struct __pyx_obj_7pyarrow_3lib_SparseCSRMatrix *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSRMatrix_14to_scipy(struct __pyx_obj_7pyarrow_3lib_SparseCSRMatrix *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSRMatrix_16to_tensor(struct __pyx_obj_7pyarrow_3lib_SparseCSRMatrix *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSRMatrix_18equals(struct __pyx_obj_7pyarrow_3lib_SparseCSRMatrix *__pyx_v_self, struct __pyx_obj_7pyarrow_3lib_SparseCSRMatrix *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSRMatrix_20__eq__(struct __pyx_obj_7pyarrow_3lib_SparseCSRMatrix *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSRMatrix_10is_mutable___get__(struct __pyx_obj_7pyarrow_3lib_SparseCSRMatrix *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSRMatrix_4ndim___get__(struct __pyx_obj_7pyarrow_3lib_SparseCSRMatrix *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSRMatrix_5shape___get__(struct __pyx_obj_7pyarrow_3lib_SparseCSRMatrix *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSRMatrix_4size___get__(struct __pyx_obj_7pyarrow_3lib_SparseCSRMatrix *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSRMatrix_22dim_name(struct __pyx_obj_7pyarrow_3lib_SparseCSRMatrix *__pyx_v_self, PyObject *__pyx_v_i); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSRMatrix_9dim_names_7__get___genexpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSRMatrix_9dim_names___get__(struct __pyx_obj_7pyarrow_3lib_SparseCSRMatrix *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSRMatrix_15non_zero_length___get__(struct __pyx_obj_7pyarrow_3lib_SparseCSRMatrix *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSRMatrix_4type___get__(struct __pyx_obj_7pyarrow_3lib_SparseCSRMatrix *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSRMatrix_24__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_SparseCSRMatrix *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSRMatrix_26__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_SparseCSRMatrix *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_7pyarrow_3lib_15SparseCSCMatrix___init__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_SparseCSCMatrix *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSCMatrix_2__repr__(struct __pyx_obj_7pyarrow_3lib_SparseCSCMatrix *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSCMatrix_4from_dense_numpy(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_obj, PyObject *__pyx_v_dim_names); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSCMatrix_6from_numpy(PyObject *__pyx_v_data, PyObject *__pyx_v_indptr, PyObject *__pyx_v_indices, PyObject *__pyx_v_shape, PyObject *__pyx_v_dim_names); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSCMatrix_8from_scipy(PyObject *__pyx_v_obj, PyObject *__pyx_v_dim_names); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSCMatrix_10from_tensor(PyObject *__pyx_v_obj); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSCMatrix_12to_numpy(struct __pyx_obj_7pyarrow_3lib_SparseCSCMatrix *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSCMatrix_14to_scipy(struct __pyx_obj_7pyarrow_3lib_SparseCSCMatrix *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSCMatrix_16to_tensor(struct __pyx_obj_7pyarrow_3lib_SparseCSCMatrix *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSCMatrix_18equals(struct __pyx_obj_7pyarrow_3lib_SparseCSCMatrix *__pyx_v_self, struct __pyx_obj_7pyarrow_3lib_SparseCSCMatrix *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSCMatrix_20__eq__(struct __pyx_obj_7pyarrow_3lib_SparseCSCMatrix *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSCMatrix_10is_mutable___get__(struct __pyx_obj_7pyarrow_3lib_SparseCSCMatrix *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSCMatrix_4ndim___get__(struct __pyx_obj_7pyarrow_3lib_SparseCSCMatrix *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSCMatrix_5shape___get__(struct __pyx_obj_7pyarrow_3lib_SparseCSCMatrix *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSCMatrix_4size___get__(struct __pyx_obj_7pyarrow_3lib_SparseCSCMatrix *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSCMatrix_22dim_name(struct __pyx_obj_7pyarrow_3lib_SparseCSCMatrix *__pyx_v_self, PyObject *__pyx_v_i); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSCMatrix_9dim_names_7__get___genexpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSCMatrix_9dim_names___get__(struct __pyx_obj_7pyarrow_3lib_SparseCSCMatrix *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSCMatrix_15non_zero_length___get__(struct __pyx_obj_7pyarrow_3lib_SparseCSCMatrix *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSCMatrix_4type___get__(struct __pyx_obj_7pyarrow_3lib_SparseCSCMatrix *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSCMatrix_24__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_SparseCSCMatrix *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSCMatrix_26__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_SparseCSCMatrix *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_7pyarrow_3lib_15SparseCSFTensor___init__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_SparseCSFTensor *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSFTensor_2__repr__(struct __pyx_obj_7pyarrow_3lib_SparseCSFTensor *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSFTensor_4from_dense_numpy(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_obj, PyObject *__pyx_v_dim_names); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSFTensor_6from_numpy(PyObject *__pyx_v_data, PyObject *__pyx_v_indptr, PyObject *__pyx_v_indices, PyObject *__pyx_v_shape, PyObject *__pyx_v_axis_order, PyObject *__pyx_v_dim_names); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSFTensor_8from_tensor(PyObject *__pyx_v_obj); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSFTensor_10to_numpy(struct __pyx_obj_7pyarrow_3lib_SparseCSFTensor *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSFTensor_12to_tensor(struct __pyx_obj_7pyarrow_3lib_SparseCSFTensor *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSFTensor_14equals(struct __pyx_obj_7pyarrow_3lib_SparseCSFTensor *__pyx_v_self, struct __pyx_obj_7pyarrow_3lib_SparseCSFTensor *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSFTensor_16__eq__(struct __pyx_obj_7pyarrow_3lib_SparseCSFTensor *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSFTensor_10is_mutable___get__(struct __pyx_obj_7pyarrow_3lib_SparseCSFTensor *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSFTensor_4ndim___get__(struct __pyx_obj_7pyarrow_3lib_SparseCSFTensor *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSFTensor_5shape___get__(struct __pyx_obj_7pyarrow_3lib_SparseCSFTensor *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSFTensor_4size___get__(struct __pyx_obj_7pyarrow_3lib_SparseCSFTensor *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSFTensor_18dim_name(struct __pyx_obj_7pyarrow_3lib_SparseCSFTensor *__pyx_v_self, PyObject *__pyx_v_i); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSFTensor_9dim_names_7__get___genexpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSFTensor_9dim_names___get__(struct __pyx_obj_7pyarrow_3lib_SparseCSFTensor *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSFTensor_15non_zero_length___get__(struct __pyx_obj_7pyarrow_3lib_SparseCSFTensor *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSFTensor_4type___get__(struct __pyx_obj_7pyarrow_3lib_SparseCSFTensor *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSFTensor_20__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_SparseCSFTensor *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSFTensor_22__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_SparseCSFTensor *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_234have_libhdfs(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_236io_thread_count(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_238set_io_thread_count(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_count); /* proto */
static int __pyx_pf_7pyarrow_3lib_10NativeFile___cinit__(struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_self); /* proto */
static void __pyx_pf_7pyarrow_3lib_10NativeFile_2__dealloc__(struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_10NativeFile_4__enter__(struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_10NativeFile_6__exit__(struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_exc_type, CYTHON_UNUSED PyObject *__pyx_v_exc_value, CYTHON_UNUSED PyObject *__pyx_v_tb); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_10NativeFile_8__repr__(struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_10NativeFile_4mode___get__(struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_10NativeFile_10readable(struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_10NativeFile_12writable(struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_10NativeFile_14seekable(struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_10NativeFile_16isatty(struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_10NativeFile_18fileno(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_10NativeFile_6closed___get__(struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_10NativeFile_20close(struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_10NativeFile_22_assert_open(struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_10NativeFile_24_assert_readable(struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_10NativeFile_26_assert_writable(struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_10NativeFile_28_assert_seekable(struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_10NativeFile_30size(struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_10NativeFile_32metadata(struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_10NativeFile_34tell(struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_10NativeFile_36seek(struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_self, int64_t __pyx_v_position, int __pyx_v_whence); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_10NativeFile_38flush(struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_10NativeFile_40write(struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_self, PyObject *__pyx_v_data); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_10NativeFile_42read(struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_self, PyObject *__pyx_v_nbytes); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_10NativeFile_44get_stream(struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_self, PyObject *__pyx_v_file_offset, PyObject *__pyx_v_nbytes); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_10NativeFile_46read_at(struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_self, PyObject *__pyx_v_nbytes, PyObject *__pyx_v_offset); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_10NativeFile_48read1(struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_self, PyObject *__pyx_v_nbytes); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_10NativeFile_50readall(struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_10NativeFile_52readinto(struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_self, PyObject *__pyx_v_b); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_10NativeFile_54readline(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_size); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_10NativeFile_56readlines(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_hint); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_10NativeFile_58__iter__(struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_10NativeFile_60__next__(struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_10NativeFile_62read_buffer(struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_self, PyObject *__pyx_v_nbytes); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_10NativeFile_64truncate(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_10NativeFile_66writelines(struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_self, PyObject *__pyx_v_lines); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_10NativeFile_8download_cleanup(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_10NativeFile_8download_2cleanup(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_10NativeFile_8download_4bg_write(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_10NativeFile_68download(struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_self, PyObject *__pyx_v_stream_or_path, PyObject *__pyx_v_buffer_size); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_10NativeFile_19_download_nothreads_cleanup(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_10NativeFile_19_download_nothreads_2cleanup(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_10NativeFile_70_download_nothreads(struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_self, PyObject *__pyx_v_stream_or_path, PyObject *__pyx_v_buffer_size); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_10NativeFile_6upload_bg_write(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_10NativeFile_72upload(struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_self, PyObject *__pyx_v_stream, PyObject *__pyx_v_buffer_size); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_10NativeFile_74_upload_nothreads(struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_self, PyObject *__pyx_v_stream, PyObject *__pyx_v_buffer_size); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_10NativeFile_76__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_10NativeFile_78__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_7pyarrow_3lib_10PythonFile___cinit__(struct __pyx_obj_7pyarrow_3lib_PythonFile *__pyx_v_self, PyObject *__pyx_v_handle, PyObject *__pyx_v_mode); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_10PythonFile_2truncate(struct __pyx_obj_7pyarrow_3lib_PythonFile *__pyx_v_self, PyObject *__pyx_v_pos); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_10PythonFile_4readline(struct __pyx_obj_7pyarrow_3lib_PythonFile *__pyx_v_self, PyObject *__pyx_v_size); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_10PythonFile_6readlines(struct __pyx_obj_7pyarrow_3lib_PythonFile *__pyx_v_self, PyObject *__pyx_v_hint); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_10PythonFile_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_PythonFile *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_10PythonFile_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_PythonFile *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_16MemoryMappedFile_create(PyObject *__pyx_v_path, PyObject *__pyx_v_size); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_16MemoryMappedFile_2_open(struct __pyx_obj_7pyarrow_3lib_MemoryMappedFile *__pyx_v_self, PyObject *__pyx_v_path, PyObject *__pyx_v_mode); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_16MemoryMappedFile_4resize(struct __pyx_obj_7pyarrow_3lib_MemoryMappedFile *__pyx_v_self, PyObject *__pyx_v_new_size); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_16MemoryMappedFile_6fileno(struct __pyx_obj_7pyarrow_3lib_MemoryMappedFile *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_16MemoryMappedFile_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_MemoryMappedFile *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_16MemoryMappedFile_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_MemoryMappedFile *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_240memory_map(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_path, PyObject *__pyx_v_mode); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_242create_memory_map(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_path, PyObject *__pyx_v_size); /* proto */
static int __pyx_pf_7pyarrow_3lib_6OSFile___cinit__(struct __pyx_obj_7pyarrow_3lib_OSFile *__pyx_v_self, PyObject *__pyx_v_path, PyObject *__pyx_v_mode, struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_memory_pool); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_6OSFile_2fileno(struct __pyx_obj_7pyarrow_3lib_OSFile *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_6OSFile_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_OSFile *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_6OSFile_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_OSFile *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_7pyarrow_3lib_21FixedSizeBufferWriter___cinit__(struct __pyx_obj_7pyarrow_3lib_FixedSizeBufferWriter *__pyx_v_self, struct __pyx_obj_7pyarrow_3lib_Buffer *__pyx_v_buffer); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_21FixedSizeBufferWriter_2set_memcopy_threads(struct __pyx_obj_7pyarrow_3lib_FixedSizeBufferWriter *__pyx_v_self, int __pyx_v_num_threads); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_21FixedSizeBufferWriter_4set_memcopy_blocksize(struct __pyx_obj_7pyarrow_3lib_FixedSizeBufferWriter *__pyx_v_self, int64_t __pyx_v_blocksize); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_21FixedSizeBufferWriter_6set_memcopy_threshold(struct __pyx_obj_7pyarrow_3lib_FixedSizeBufferWriter *__pyx_v_self, int64_t __pyx_v_threshold); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_21FixedSizeBufferWriter_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_FixedSizeBufferWriter *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_21FixedSizeBufferWriter_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_FixedSizeBufferWriter *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_7pyarrow_3lib_6Buffer___cinit__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_Buffer *__pyx_v_self); /* proto */
static int __pyx_pf_7pyarrow_3lib_6Buffer_2__init__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_Buffer *__pyx_v_self); /* proto */
static Py_ssize_t __pyx_pf_7pyarrow_3lib_6Buffer_4__len__(struct __pyx_obj_7pyarrow_3lib_Buffer *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_6Buffer_6__repr__(struct __pyx_obj_7pyarrow_3lib_Buffer *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_6Buffer_8_assert_cpu(struct __pyx_obj_7pyarrow_3lib_Buffer *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_6Buffer_4size___get__(struct __pyx_obj_7pyarrow_3lib_Buffer *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_6Buffer_7address___get__(struct __pyx_obj_7pyarrow_3lib_Buffer *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_6Buffer_10hex(struct __pyx_obj_7pyarrow_3lib_Buffer *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_6Buffer_10is_mutable___get__(struct __pyx_obj_7pyarrow_3lib_Buffer *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_6Buffer_6is_cpu___get__(struct __pyx_obj_7pyarrow_3lib_Buffer *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_6Buffer_6device___get__(struct __pyx_obj_7pyarrow_3lib_Buffer *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_6Buffer_14memory_manager___get__(struct __pyx_obj_7pyarrow_3lib_Buffer *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_6Buffer_11device_type___get__(struct __pyx_obj_7pyarrow_3lib_Buffer *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_6Buffer_6parent___get__(struct __pyx_obj_7pyarrow_3lib_Buffer *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_6Buffer_12__getitem__(struct __pyx_obj_7pyarrow_3lib_Buffer *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_6Buffer_14slice(struct __pyx_obj_7pyarrow_3lib_Buffer *__pyx_v_self, PyObject *__pyx_v_offset, PyObject *__pyx_v_length); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_6Buffer_16equals(struct __pyx_obj_7pyarrow_3lib_Buffer *__pyx_v_self, struct __pyx_obj_7pyarrow_3lib_Buffer *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_6Buffer_18__eq__(struct __pyx_obj_7pyarrow_3lib_Buffer *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_6Buffer_20__reduce_ex__(struct __pyx_obj_7pyarrow_3lib_Buffer *__pyx_v_self, PyObject *__pyx_v_protocol); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_6Buffer_22to_pybytes(struct __pyx_obj_7pyarrow_3lib_Buffer *__pyx_v_self); /* proto */
static int __pyx_pf_7pyarrow_3lib_6Buffer_24__getbuffer__(struct __pyx_obj_7pyarrow_3lib_Buffer *__pyx_v_self, Py_buffer *__pyx_v_buffer, int __pyx_v_flags); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15ResizableBuffer_resize(struct __pyx_obj_7pyarrow_3lib_ResizableBuffer *__pyx_v_self, int64_t __pyx_v_new_size, PyObject *__pyx_v_shrink_to_fit); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_244allocate_buffer(CYTHON_UNUSED PyObject *__pyx_self, int64_t __pyx_v_size, struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_memory_pool, PyObject *__pyx_v_resizable); /* proto */
static int __pyx_pf_7pyarrow_3lib_18BufferOutputStream___cinit__(struct __pyx_obj_7pyarrow_3lib_BufferOutputStream *__pyx_v_self, struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_memory_pool); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_18BufferOutputStream_2getvalue(struct __pyx_obj_7pyarrow_3lib_BufferOutputStream *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_18BufferOutputStream_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_BufferOutputStream *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_18BufferOutputStream_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_BufferOutputStream *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_7pyarrow_3lib_16MockOutputStream___cinit__(struct __pyx_obj_7pyarrow_3lib_MockOutputStream *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_16MockOutputStream_2size(struct __pyx_obj_7pyarrow_3lib_MockOutputStream *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_16MockOutputStream_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_MockOutputStream *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_16MockOutputStream_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_MockOutputStream *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_7pyarrow_3lib_12BufferReader___init__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_BufferReader *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_obj); /* proto */
static int __pyx_pf_7pyarrow_3lib_12BufferReader_2__cinit__(struct __pyx_obj_7pyarrow_3lib_BufferReader *__pyx_v_self, PyObject *__pyx_v_obj); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_12BufferReader_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_BufferReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_12BufferReader_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_BufferReader *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_7pyarrow_3lib_21CompressedInputStream___init__(struct __pyx_obj_7pyarrow_3lib_CompressedInputStream *__pyx_v_self, PyObject *__pyx_v_stream, PyObject *__pyx_v_compression); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_21CompressedInputStream_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_CompressedInputStream *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_21CompressedInputStream_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_CompressedInputStream *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_7pyarrow_3lib_22CompressedOutputStream___init__(struct __pyx_obj_7pyarrow_3lib_CompressedOutputStream *__pyx_v_self, PyObject *__pyx_v_stream, PyObject *__pyx_v_compression); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_22CompressedOutputStream_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_CompressedOutputStream *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_22CompressedOutputStream_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_CompressedOutputStream *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_7pyarrow_3lib_19BufferedInputStream___init__(struct __pyx_obj_7pyarrow_3lib_BufferedInputStream *__pyx_v_self, struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_stream, int __pyx_v_buffer_size, struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_memory_pool); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_19BufferedInputStream_2detach(struct __pyx_obj_7pyarrow_3lib_BufferedInputStream *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_19BufferedInputStream_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_BufferedInputStream *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_19BufferedInputStream_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_BufferedInputStream *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_7pyarrow_3lib_20BufferedOutputStream___init__(struct __pyx_obj_7pyarrow_3lib_BufferedOutputStream *__pyx_v_self, struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_stream, int __pyx_v_buffer_size, struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_memory_pool); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_20BufferedOutputStream_2detach(struct __pyx_obj_7pyarrow_3lib_BufferedOutputStream *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_20BufferedOutputStream_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_BufferedOutputStream *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_20BufferedOutputStream_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_BufferedOutputStream *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_7pyarrow_3lib_20TransformInputStream___init__(struct __pyx_obj_7pyarrow_3lib_TransformInputStream *__pyx_v_self, struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_stream, PyObject *__pyx_v_transform_func); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_20TransformInputStream_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_TransformInputStream *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_20TransformInputStream_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_TransformInputStream *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_10Transcoder___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_decoder, PyObject *__pyx_v_encoder); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_10Transcoder_2__call__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_buf); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_246transcoding_input_stream(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_stream, PyObject *__pyx_v_src_encoding, PyObject *__pyx_v_dest_encoding); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_248py_buffer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_250foreign_buffer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_address, PyObject *__pyx_v_size, PyObject *__pyx_v_base); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_252as_buffer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_o); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_254_detect_compression(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_path); /* proto */
static int __pyx_pf_7pyarrow_3lib_12CacheOptions___init__(struct __pyx_obj_7pyarrow_3lib_CacheOptions *__pyx_v_self, PyObject *__pyx_v_hole_size_limit, PyObject *__pyx_v_range_size_limit, PyObject *__pyx_v_lazy, PyObject *__pyx_v_prefetch_limit); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_12CacheOptions_15hole_size_limit___get__(struct __pyx_obj_7pyarrow_3lib_CacheOptions *__pyx_v_self); /* proto */
static int __pyx_pf_7pyarrow_3lib_12CacheOptions_15hole_size_limit_2__set__(struct __pyx_obj_7pyarrow_3lib_CacheOptions *__pyx_v_self, PyObject *__pyx_v_hole_size_limit); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_12CacheOptions_16range_size_limit___get__(struct __pyx_obj_7pyarrow_3lib_CacheOptions *__pyx_v_self); /* proto */
static int __pyx_pf_7pyarrow_3lib_12CacheOptions_16range_size_limit_2__set__(struct __pyx_obj_7pyarrow_3lib_CacheOptions *__pyx_v_self, PyObject *__pyx_v_range_size_limit); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_12CacheOptions_4lazy___get__(struct __pyx_obj_7pyarrow_3lib_CacheOptions *__pyx_v_self); /* proto */
static int __pyx_pf_7pyarrow_3lib_12CacheOptions_4lazy_2__set__(struct __pyx_obj_7pyarrow_3lib_CacheOptions *__pyx_v_self, PyObject *__pyx_v_lazy); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_12CacheOptions_14prefetch_limit___get__(struct __pyx_obj_7pyarrow_3lib_CacheOptions *__pyx_v_self); /* proto */
static int __pyx_pf_7pyarrow_3lib_12CacheOptions_14prefetch_limit_2__set__(struct __pyx_obj_7pyarrow_3lib_CacheOptions *__pyx_v_self, PyObject *__pyx_v_prefetch_limit); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_12CacheOptions_2__eq__(struct __pyx_obj_7pyarrow_3lib_CacheOptions *__pyx_v_self, struct __pyx_obj_7pyarrow_3lib_CacheOptions *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_12CacheOptions_4from_network_metrics(PyObject *__pyx_v_time_to_first_byte_millis, PyObject *__pyx_v_transfer_bandwidth_mib_per_sec, PyObject *__pyx_v_ideal_bandwidth_utilization_frac, PyObject *__pyx_v_max_ideal_request_size_mib); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_12CacheOptions_6_reconstruct(PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_12CacheOptions_8__reduce__(struct __pyx_obj_7pyarrow_3lib_CacheOptions *__pyx_v_self); /* proto */
static int __pyx_pf_7pyarrow_3lib_5Codec___init__(struct __pyx_obj_7pyarrow_3lib_Codec *__pyx_v_self, PyObject *__pyx_v_compression, PyObject *__pyx_v_compression_level); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Codec_2detect(PyObject *__pyx_v_path); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Codec_4is_available(PyObject *__pyx_v_compression); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Codec_6supports_compression_level(PyObject *__pyx_v_compression); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Codec_8default_compression_level(PyObject *__pyx_v_compression); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Codec_10minimum_compression_level(PyObject *__pyx_v_compression); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Codec_12maximum_compression_level(PyObject *__pyx_v_compression); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Codec_4name___get__(struct __pyx_obj_7pyarrow_3lib_Codec *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Codec_17compression_level___get__(struct __pyx_obj_7pyarrow_3lib_Codec *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Codec_14compress(struct __pyx_obj_7pyarrow_3lib_Codec *__pyx_v_self, PyObject *__pyx_v_buf, PyObject *__pyx_v_asbytes, PyObject *__pyx_v_memory_pool); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Codec_16decompress(struct __pyx_obj_7pyarrow_3lib_Codec *__pyx_v_self, PyObject *__pyx_v_buf, PyObject *__pyx_v_decompressed_size, PyObject *__pyx_v_asbytes, PyObject *__pyx_v_memory_pool); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Codec_18__repr__(struct __pyx_obj_7pyarrow_3lib_Codec *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Codec_20__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_Codec *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_5Codec_22__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_Codec *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_256compress(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_buf, PyObject *__pyx_v_codec, PyObject *__pyx_v_asbytes, PyObject *__pyx_v_memory_pool); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_258decompress(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_buf, PyObject *__pyx_v_decompressed_size, PyObject *__pyx_v_codec, PyObject *__pyx_v_asbytes, PyObject *__pyx_v_memory_pool); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_260input_stream(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_source, PyObject *__pyx_v_compression, PyObject *__pyx_v_buffer_size); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_262output_stream(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_source, PyObject *__pyx_v_compression, PyObject *__pyx_v_buffer_size); /* proto */
static int __pyx_pf_7pyarrow_3lib_14IpcReadOptions___init__(struct __pyx_obj_7pyarrow_3lib_IpcReadOptions *__pyx_v_self, int __pyx_v_ensure_native_endian, enum __pyx_t_7pyarrow_3lib_Alignment __pyx_v_ensure_alignment, int __pyx_v_use_threads, PyObject *__pyx_v_included_fields); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_14IpcReadOptions_20ensure_native_endian___get__(struct __pyx_obj_7pyarrow_3lib_IpcReadOptions *__pyx_v_self); /* proto */
static int __pyx_pf_7pyarrow_3lib_14IpcReadOptions_20ensure_native_endian_2__set__(struct __pyx_obj_7pyarrow_3lib_IpcReadOptions *__pyx_v_self, int __pyx_v_value); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_14IpcReadOptions_16ensure_alignment___get__(struct __pyx_obj_7pyarrow_3lib_IpcReadOptions *__pyx_v_self); /* proto */
static int __pyx_pf_7pyarrow_3lib_14IpcReadOptions_16ensure_alignment_2__set__(struct __pyx_obj_7pyarrow_3lib_IpcReadOptions *__pyx_v_self, enum __pyx_t_7pyarrow_3lib_Alignment __pyx_v_value); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_14IpcReadOptions_11use_threads___get__(struct __pyx_obj_7pyarrow_3lib_IpcReadOptions *__pyx_v_self); /* proto */
static int __pyx_pf_7pyarrow_3lib_14IpcReadOptions_11use_threads_2__set__(struct __pyx_obj_7pyarrow_3lib_IpcReadOptions *__pyx_v_self, int __pyx_v_value); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_14IpcReadOptions_15included_fields___get__(struct __pyx_obj_7pyarrow_3lib_IpcReadOptions *__pyx_v_self); /* proto */
static int __pyx_pf_7pyarrow_3lib_14IpcReadOptions_15included_fields_2__set__(struct __pyx_obj_7pyarrow_3lib_IpcReadOptions *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_14IpcReadOptions_2__repr__(struct __pyx_obj_7pyarrow_3lib_IpcReadOptions *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_14IpcReadOptions_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_IpcReadOptions *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_14IpcReadOptions_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_IpcReadOptions *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_7pyarrow_3lib_15IpcWriteOptions___init__(struct __pyx_obj_7pyarrow_3lib_IpcWriteOptions *__pyx_v_self, PyObject *__pyx_v_metadata_version, int __pyx_v_allow_64bit, PyObject *__pyx_v_use_legacy_format, PyObject *__pyx_v_compression, int __pyx_v_use_threads, int __pyx_v_emit_dictionary_deltas, int __pyx_v_unify_dictionaries); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15IpcWriteOptions_11allow_64bit___get__(struct __pyx_obj_7pyarrow_3lib_IpcWriteOptions *__pyx_v_self); /* proto */
static int __pyx_pf_7pyarrow_3lib_15IpcWriteOptions_11allow_64bit_2__set__(struct __pyx_obj_7pyarrow_3lib_IpcWriteOptions *__pyx_v_self, int __pyx_v_value); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15IpcWriteOptions_17use_legacy_format___get__(struct __pyx_obj_7pyarrow_3lib_IpcWriteOptions *__pyx_v_self); /* proto */
static int __pyx_pf_7pyarrow_3lib_15IpcWriteOptions_17use_legacy_format_2__set__(struct __pyx_obj_7pyarrow_3lib_IpcWriteOptions *__pyx_v_self, int __pyx_v_value); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15IpcWriteOptions_16metadata_version___get__(struct __pyx_obj_7pyarrow_3lib_IpcWriteOptions *__pyx_v_self); /* proto */
static int __pyx_pf_7pyarrow_3lib_15IpcWriteOptions_16metadata_version_2__set__(struct __pyx_obj_7pyarrow_3lib_IpcWriteOptions *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15IpcWriteOptions_11compression___get__(struct __pyx_obj_7pyarrow_3lib_IpcWriteOptions *__pyx_v_self); /* proto */
static int __pyx_pf_7pyarrow_3lib_15IpcWriteOptions_11compression_2__set__(struct __pyx_obj_7pyarrow_3lib_IpcWriteOptions *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15IpcWriteOptions_11use_threads___get__(struct __pyx_obj_7pyarrow_3lib_IpcWriteOptions *__pyx_v_self); /* proto */
static int __pyx_pf_7pyarrow_3lib_15IpcWriteOptions_11use_threads_2__set__(struct __pyx_obj_7pyarrow_3lib_IpcWriteOptions *__pyx_v_self, int __pyx_v_value); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15IpcWriteOptions_22emit_dictionary_deltas___get__(struct __pyx_obj_7pyarrow_3lib_IpcWriteOptions *__pyx_v_self); /* proto */
static int __pyx_pf_7pyarrow_3lib_15IpcWriteOptions_22emit_dictionary_deltas_2__set__(struct __pyx_obj_7pyarrow_3lib_IpcWriteOptions *__pyx_v_self, int __pyx_v_value); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15IpcWriteOptions_18unify_dictionaries___get__(struct __pyx_obj_7pyarrow_3lib_IpcWriteOptions *__pyx_v_self); /* proto */
static int __pyx_pf_7pyarrow_3lib_15IpcWriteOptions_18unify_dictionaries_2__set__(struct __pyx_obj_7pyarrow_3lib_IpcWriteOptions *__pyx_v_self, int __pyx_v_value); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15IpcWriteOptions_2__repr__(struct __pyx_obj_7pyarrow_3lib_IpcWriteOptions *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15IpcWriteOptions_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_IpcWriteOptions *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_15IpcWriteOptions_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_IpcWriteOptions *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_7pyarrow_3lib_7Message___cinit__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_Message *__pyx_v_self); /* proto */
static int __pyx_pf_7pyarrow_3lib_7Message_2__init__(struct __pyx_obj_7pyarrow_3lib_Message *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_7Message_4type___get__(struct __pyx_obj_7pyarrow_3lib_Message *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_7Message_8metadata___get__(struct __pyx_obj_7pyarrow_3lib_Message *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_7Message_16metadata_version___get__(struct __pyx_obj_7pyarrow_3lib_Message *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_7Message_4body___get__(struct __pyx_obj_7pyarrow_3lib_Message *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_7Message_4equals(struct __pyx_obj_7pyarrow_3lib_Message *__pyx_v_self, struct __pyx_obj_7pyarrow_3lib_Message *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_7Message_6serialize_to(struct __pyx_obj_7pyarrow_3lib_Message *__pyx_v_self, struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_sink, PyObject *__pyx_v_alignment, CYTHON_UNUSED PyObject *__pyx_v_memory_pool); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_7Message_8serialize(struct __pyx_obj_7pyarrow_3lib_Message *__pyx_v_self, PyObject *__pyx_v_alignment, PyObject *__pyx_v_memory_pool); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_7Message_10__repr__(struct __pyx_obj_7pyarrow_3lib_Message *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_7Message_12__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_Message *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_7Message_14__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_Message *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_7pyarrow_3lib_13MessageReader___cinit__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_MessageReader *__pyx_v_self); /* proto */
static int __pyx_pf_7pyarrow_3lib_13MessageReader_2__init__(struct __pyx_obj_7pyarrow_3lib_MessageReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_13MessageReader_4open_stream(PyObject *__pyx_v_source); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_13MessageReader_6__iter__(struct __pyx_obj_7pyarrow_3lib_MessageReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_13MessageReader_8__next__(struct __pyx_obj_7pyarrow_3lib_MessageReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_13MessageReader_10read_next_message(struct __pyx_obj_7pyarrow_3lib_MessageReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_13MessageReader_12__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_MessageReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_13MessageReader_14__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_MessageReader *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_19_CRecordBatchWriter_write(struct __pyx_obj_7pyarrow_3lib__CRecordBatchWriter *__pyx_v_self, PyObject *__pyx_v_table_or_batch); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_19_CRecordBatchWriter_2write_batch(struct __pyx_obj_7pyarrow_3lib__CRecordBatchWriter *__pyx_v_self, struct __pyx_obj_7pyarrow_3lib_RecordBatch *__pyx_v_batch, PyObject *__pyx_v_custom_metadata); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_19_CRecordBatchWriter_4write_table(struct __pyx_obj_7pyarrow_3lib__CRecordBatchWriter *__pyx_v_self, struct __pyx_obj_7pyarrow_3lib_Table *__pyx_v_table, PyObject *__pyx_v_max_chunksize); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_19_CRecordBatchWriter_6close(struct __pyx_obj_7pyarrow_3lib__CRecordBatchWriter *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_19_CRecordBatchWriter_8__enter__(struct __pyx_obj_7pyarrow_3lib__CRecordBatchWriter *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_19_CRecordBatchWriter_10__exit__(struct __pyx_obj_7pyarrow_3lib__CRecordBatchWriter *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_exc_type, CYTHON_UNUSED PyObject *__pyx_v_exc_val, CYTHON_UNUSED PyObject *__pyx_v_exc_tb); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_19_CRecordBatchWriter_5stats___get__(struct __pyx_obj_7pyarrow_3lib__CRecordBatchWriter *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_19_CRecordBatchWriter_12__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib__CRecordBatchWriter *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_19_CRecordBatchWriter_14__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib__CRecordBatchWriter *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_7pyarrow_3lib_24_RecordBatchStreamWriter___cinit__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib__RecordBatchStreamWriter *__pyx_v_self); /* proto */
static void __pyx_pf_7pyarrow_3lib_24_RecordBatchStreamWriter_2__dealloc__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib__RecordBatchStreamWriter *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_24_RecordBatchStreamWriter_18_use_legacy_format___get__(struct __pyx_obj_7pyarrow_3lib__RecordBatchStreamWriter *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_24_RecordBatchStreamWriter_17_metadata_version___get__(struct __pyx_obj_7pyarrow_3lib__RecordBatchStreamWriter *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_24_RecordBatchStreamWriter_4_open(struct __pyx_obj_7pyarrow_3lib__RecordBatchStreamWriter *__pyx_v_self, PyObject *__pyx_v_sink, struct __pyx_obj_7pyarrow_3lib_Schema *__pyx_v_schema, struct __pyx_obj_7pyarrow_3lib_IpcWriteOptions *__pyx_v_options); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_24_RecordBatchStreamWriter_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib__RecordBatchStreamWriter *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_24_RecordBatchStreamWriter_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib__RecordBatchStreamWriter *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_16_ReadPandasMixin_read_pandas(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_options); /* proto */
static int __pyx_pf_7pyarrow_3lib_17RecordBatchReader___init__(struct __pyx_obj_7pyarrow_3lib_RecordBatchReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_17RecordBatchReader_2__iter__(struct __pyx_obj_7pyarrow_3lib_RecordBatchReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_17RecordBatchReader_4__next__(struct __pyx_obj_7pyarrow_3lib_RecordBatchReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_17RecordBatchReader_6schema___get__(struct __pyx_obj_7pyarrow_3lib_RecordBatchReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_17RecordBatchReader_6read_next_batch(struct __pyx_obj_7pyarrow_3lib_RecordBatchReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_17RecordBatchReader_8read_next_batch_with_custom_metadata(struct __pyx_obj_7pyarrow_3lib_RecordBatchReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_17RecordBatchReader_10iter_batches_with_custom_metadata(struct __pyx_obj_7pyarrow_3lib_RecordBatchReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_17RecordBatchReader_13read_all(struct __pyx_obj_7pyarrow_3lib_RecordBatchReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_17RecordBatchReader_15close(struct __pyx_obj_7pyarrow_3lib_RecordBatchReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_17RecordBatchReader_17__enter__(struct __pyx_obj_7pyarrow_3lib_RecordBatchReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_17RecordBatchReader_19__exit__(struct __pyx_obj_7pyarrow_3lib_RecordBatchReader *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_exc_type, CYTHON_UNUSED PyObject *__pyx_v_exc_val, CYTHON_UNUSED PyObject *__pyx_v_exc_tb); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_17RecordBatchReader_21cast(struct __pyx_obj_7pyarrow_3lib_RecordBatchReader *__pyx_v_self, PyObject *__pyx_v_target_schema); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_17RecordBatchReader_23_export_to_c(struct __pyx_obj_7pyarrow_3lib_RecordBatchReader *__pyx_v_self, PyObject *__pyx_v_out_ptr); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_17RecordBatchReader_25_import_from_c(PyObject *__pyx_v_in_ptr); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_17RecordBatchReader_27__arrow_c_stream__(struct __pyx_obj_7pyarrow_3lib_RecordBatchReader *__pyx_v_self, PyObject *__pyx_v_requested_schema); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_17RecordBatchReader_29_import_from_c_capsule(PyObject *__pyx_v_stream); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_17RecordBatchReader_31from_stream(PyObject *__pyx_v_data, PyObject *__pyx_v_schema); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_17RecordBatchReader_33from_batches(struct __pyx_obj_7pyarrow_3lib_Schema *__pyx_v_schema, PyObject *__pyx_v_batches); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_17RecordBatchReader_35__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_RecordBatchReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_17RecordBatchReader_37__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_RecordBatchReader *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_7pyarrow_3lib_24_RecordBatchStreamReader___cinit__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib__RecordBatchStreamReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_24_RecordBatchStreamReader_2_open(struct __pyx_obj_7pyarrow_3lib__RecordBatchStreamReader *__pyx_v_self, PyObject *__pyx_v_source, struct __pyx_obj_7pyarrow_3lib_IpcReadOptions *__pyx_v_options, struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_memory_pool); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_24_RecordBatchStreamReader_5stats___get__(struct __pyx_obj_7pyarrow_3lib__RecordBatchStreamReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_24_RecordBatchStreamReader_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib__RecordBatchStreamReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_24_RecordBatchStreamReader_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib__RecordBatchStreamReader *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_22_RecordBatchFileWriter__open(struct __pyx_obj_7pyarrow_3lib__RecordBatchFileWriter *__pyx_v_self, PyObject *__pyx_v_sink, struct __pyx_obj_7pyarrow_3lib_Schema *__pyx_v_schema, struct __pyx_obj_7pyarrow_3lib_IpcWriteOptions *__pyx_v_options, PyObject *__pyx_v_metadata); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_22_RecordBatchFileWriter_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib__RecordBatchFileWriter *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_22_RecordBatchFileWriter_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib__RecordBatchFileWriter *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_7pyarrow_3lib_22_RecordBatchFileReader___cinit__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib__RecordBatchFileReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_22_RecordBatchFileReader_2_open(struct __pyx_obj_7pyarrow_3lib__RecordBatchFileReader *__pyx_v_self, PyObject *__pyx_v_source, PyObject *__pyx_v_footer_offset, struct __pyx_obj_7pyarrow_3lib_IpcReadOptions *__pyx_v_options, struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_memory_pool); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_22_RecordBatchFileReader_18num_record_batches___get__(struct __pyx_obj_7pyarrow_3lib__RecordBatchFileReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_22_RecordBatchFileReader_4get_batch(struct __pyx_obj_7pyarrow_3lib__RecordBatchFileReader *__pyx_v_self, int __pyx_v_i); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_22_RecordBatchFileReader_6get_batch_with_custom_metadata(struct __pyx_obj_7pyarrow_3lib__RecordBatchFileReader *__pyx_v_self, int __pyx_v_i); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_22_RecordBatchFileReader_8read_all(struct __pyx_obj_7pyarrow_3lib__RecordBatchFileReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_22_RecordBatchFileReader_10__enter__(struct __pyx_obj_7pyarrow_3lib__RecordBatchFileReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_22_RecordBatchFileReader_12__exit__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib__RecordBatchFileReader *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_exc_type, CYTHON_UNUSED PyObject *__pyx_v_exc_value, CYTHON_UNUSED PyObject *__pyx_v_traceback); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_22_RecordBatchFileReader_5stats___get__(struct __pyx_obj_7pyarrow_3lib__RecordBatchFileReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_22_RecordBatchFileReader_8metadata___get__(struct __pyx_obj_7pyarrow_3lib__RecordBatchFileReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_22_RecordBatchFileReader_6schema___get__(struct __pyx_obj_7pyarrow_3lib__RecordBatchFileReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_22_RecordBatchFileReader_14__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib__RecordBatchFileReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_22_RecordBatchFileReader_16__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib__RecordBatchFileReader *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_264get_tensor_size(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_7pyarrow_3lib_Tensor *__pyx_v_tensor); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_266get_record_batch_size(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_7pyarrow_3lib_RecordBatch *__pyx_v_batch); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_268write_tensor(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_7pyarrow_3lib_Tensor *__pyx_v_tensor, struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_dest); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_270read_tensor(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_source); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_272read_message(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_source); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_274read_schema(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, struct __pyx_obj_7pyarrow_3lib_DictionaryMemo *__pyx_v_dictionary_memo); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_276read_record_batch(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, struct __pyx_obj_7pyarrow_3lib_Schema *__pyx_v_schema, struct __pyx_obj_7pyarrow_3lib_DictionaryMemo *__pyx_v_dictionary_memo); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_278benchmark_PandasObjectIsNull(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_280__pyx_unpickle__PandasAPIShim(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_282__pyx_unpickle__PandasConvertible(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_7pyarrow_3lib_284__pyx_unpickle__Tabular(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_tp_new_7pyarrow_3lib__Weakrefable(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_IpcWriteOptions(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_IpcReadOptions(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_Message(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_MemoryPool(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_DataType(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_ListType(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_LargeListType(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_ListViewType(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_LargeListViewType(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_MapType(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_FixedSizeListType(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_StructType(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_DictionaryMemo(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_DictionaryType(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_TimestampType(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_Time32Type(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_Time64Type(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_DurationType(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_FixedSizeBinaryType(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_Decimal32Type(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_Decimal64Type(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_Decimal128Type(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_Decimal256Type(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_RunEndEncodedType(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_BaseExtensionType(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_ExtensionType(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_FixedShapeTensorType(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_Bool8Type(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_OpaqueType(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_UuidType(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_JsonType(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_KeyValueMetadata(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_Field(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_Schema(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_Scalar(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_ArrayStatistics(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_Array(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_Tensor(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_SparseCSRMatrix(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_SparseCSCMatrix(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_SparseCOOTensor(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_SparseCSFTensor(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_NullArray(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_BooleanArray(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_NumericArray(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_IntegerArray(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_FloatingPointArray(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_Int8Array(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_UInt8Array(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_Int16Array(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_UInt16Array(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_Int32Array(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_UInt32Array(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_Int64Array(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_UInt64Array(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_HalfFloatArray(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_FloatArray(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_DoubleArray(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_FixedSizeBinaryArray(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_Decimal32Array(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_Decimal64Array(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_Decimal128Array(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_Decimal256Array(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_StructArray(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_BaseListArray(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_ListArray(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_LargeListArray(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_ListViewArray(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_LargeListViewArray(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_MapArray(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_FixedSizeListArray(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_UnionArray(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_StringArray(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_BinaryArray(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_StringViewArray(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_BinaryViewArray(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_DictionaryArray(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_ExtensionArray(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_MonthDayNanoIntervalArray(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_ChunkedArray(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib__Tabular(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_Table(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_RecordBatch(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_Device(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_MemoryManager(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_Buffer(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_ResizableBuffer(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_NativeFile(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_BufferedInputStream(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_BufferedOutputStream(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_CompressedInputStream(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_CompressedOutputStream(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib__CRecordBatchWriter(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_RecordBatchReader(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_CacheOptions(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_Codec(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_StopToken(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_SignalStopHandler(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib__PandasAPIShim(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_LoggingMemoryPool(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_ProxyMemoryPool(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_UnionType(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_SparseUnionType(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_DenseUnionType(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_UnknownExtensionType(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib__ExtensionRegistryNanny(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_NullScalar(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_BooleanScalar(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_UInt8Scalar(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_Int8Scalar(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_UInt16Scalar(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_Int16Scalar(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_UInt32Scalar(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_Int32Scalar(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_UInt64Scalar(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_Int64Scalar(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_HalfFloatScalar(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_FloatScalar(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_DoubleScalar(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_Decimal32Scalar(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_Decimal64Scalar(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_Decimal128Scalar(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_Decimal256Scalar(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_Date32Scalar(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_Date64Scalar(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_Time32Scalar(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_Time64Scalar(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_TimestampScalar(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_DurationScalar(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_MonthDayNanoIntervalScalar(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_BinaryScalar(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_LargeBinaryScalar(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_FixedSizeBinaryScalar(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_StringScalar(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_LargeStringScalar(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_BinaryViewScalar(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_StringViewScalar(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_ListScalar(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_FixedSizeListScalar(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_LargeListScalar(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_ListViewScalar(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_LargeListViewScalar(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_StructScalar(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_MapScalar(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_DictionaryScalar(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_RunEndEncodedScalar(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_UnionScalar(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_ExtensionScalar(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_FixedShapeTensorScalar(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_OpaqueScalar(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_Bool8Scalar(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_Date32Array(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_Date64Array(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_TimestampArray(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_Time32Array(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_Time64Array(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_DurationArray(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_Decima32Array(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_LargeStringArray(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_LargeBinaryArray(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_RunEndEncodedArray(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_FixedShapeTensorArray(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_OpaqueArray(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_Bool8Array(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_StringBuilder(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_StringViewBuilder(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_PythonFile(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_MemoryMappedFile(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_OSFile(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_FixedSizeBufferWriter(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_BufferOutputStream(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_MockOutputStream(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_BufferReader(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_TransformInputStream(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib_MessageReader(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib__RecordBatchStreamWriter(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib__RecordBatchStreamReader(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib__RecordBatchFileReader(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib___pyx_defaults(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib___pyx_scope_struct____iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_1___iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_2_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_3_keys(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_4_values(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_5_items(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_6___iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_7___iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_8_items(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_9_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_10___iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_11___iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_12_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_13___iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_14_iterchunks(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_15_itercolumns(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_16_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_17_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_18_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_19_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_20_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_21_download(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_22__download_nothreads(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_23_upload(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_24_iter_batches_with_custom_metadata(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
/* #### Code section: late_includes ### */
/* #### Code section: module_state ### */
/* SmallCodeConfig */
#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

typedef struct {
  PyObject *__pyx_d;
  PyObject *__pyx_b;
  PyObject *__pyx_cython_runtime;
  PyObject *__pyx_empty_tuple;
  PyObject *__pyx_empty_bytes;
  PyObject *__pyx_empty_unicode;
  PyTypeObject *__pyx_ptype_7cpython_4type_type;
  PyTypeObject *__pyx_ptype_7cpython_4bool_bool;
  PyTypeObject *__pyx_ptype_7cpython_7complex_complex;
  PyTypeObject *__pyx_ptype_7cpython_8datetime_date;
  PyTypeObject *__pyx_ptype_7cpython_8datetime_time;
  PyTypeObject *__pyx_ptype_7cpython_8datetime_datetime;
  PyTypeObject *__pyx_ptype_7cpython_8datetime_timedelta;
  PyTypeObject *__pyx_ptype_7cpython_8datetime_tzinfo;
  PyObject *__pyx_type_7pyarrow_3lib__Weakrefable;
  PyObject *__pyx_type_7pyarrow_3lib_IpcWriteOptions;
  PyObject *__pyx_type_7pyarrow_3lib_IpcReadOptions;
  PyObject *__pyx_type_7pyarrow_3lib_Message;
  PyObject *__pyx_type_7pyarrow_3lib_MemoryPool;
  PyObject *__pyx_type_7pyarrow_3lib_DataType;
  PyObject *__pyx_type_7pyarrow_3lib_ListType;
  PyObject *__pyx_type_7pyarrow_3lib_LargeListType;
  PyObject *__pyx_type_7pyarrow_3lib_ListViewType;
  PyObject *__pyx_type_7pyarrow_3lib_LargeListViewType;
  PyObject *__pyx_type_7pyarrow_3lib_MapType;
  PyObject *__pyx_type_7pyarrow_3lib_FixedSizeListType;
  PyObject *__pyx_type_7pyarrow_3lib_StructType;
  PyObject *__pyx_type_7pyarrow_3lib_DictionaryMemo;
  PyObject *__pyx_type_7pyarrow_3lib_DictionaryType;
  PyObject *__pyx_type_7pyarrow_3lib_TimestampType;
  PyObject *__pyx_type_7pyarrow_3lib_Time32Type;
  PyObject *__pyx_type_7pyarrow_3lib_Time64Type;
  PyObject *__pyx_type_7pyarrow_3lib_DurationType;
  PyObject *__pyx_type_7pyarrow_3lib_FixedSizeBinaryType;
  PyObject *__pyx_type_7pyarrow_3lib_Decimal32Type;
  PyObject *__pyx_type_7pyarrow_3lib_Decimal64Type;
  PyObject *__pyx_type_7pyarrow_3lib_Decimal128Type;
  PyObject *__pyx_type_7pyarrow_3lib_Decimal256Type;
  PyObject *__pyx_type_7pyarrow_3lib_RunEndEncodedType;
  PyObject *__pyx_type_7pyarrow_3lib_BaseExtensionType;
  PyObject *__pyx_type_7pyarrow_3lib_ExtensionType;
  PyObject *__pyx_type_7pyarrow_3lib_FixedShapeTensorType;
  PyObject *__pyx_type_7pyarrow_3lib_Bool8Type;
  PyObject *__pyx_type_7pyarrow_3lib_OpaqueType;
  PyObject *__pyx_type_7pyarrow_3lib_UuidType;
  PyObject *__pyx_type_7pyarrow_3lib_JsonType;
  PyObject *__pyx_type_7pyarrow_3lib__Metadata;
  PyObject *__pyx_type_7pyarrow_3lib_KeyValueMetadata;
  PyObject *__pyx_type_7pyarrow_3lib_Field;
  PyObject *__pyx_type_7pyarrow_3lib_Schema;
  PyObject *__pyx_type_7pyarrow_3lib_Scalar;
  PyObject *__pyx_type_7pyarrow_3lib_ArrayStatistics;
  PyObject *__pyx_type_7pyarrow_3lib__PandasConvertible;
  PyObject *__pyx_type_7pyarrow_3lib_Array;
  PyObject *__pyx_type_7pyarrow_3lib_Tensor;
  PyObject *__pyx_type_7pyarrow_3lib_SparseCSRMatrix;
  PyObject *__pyx_type_7pyarrow_3lib_SparseCSCMatrix;
  PyObject *__pyx_type_7pyarrow_3lib_SparseCOOTensor;
  PyObject *__pyx_type_7pyarrow_3lib_SparseCSFTensor;
  PyObject *__pyx_type_7pyarrow_3lib_NullArray;
  PyObject *__pyx_type_7pyarrow_3lib_BooleanArray;
  PyObject *__pyx_type_7pyarrow_3lib_NumericArray;
  PyObject *__pyx_type_7pyarrow_3lib_IntegerArray;
  PyObject *__pyx_type_7pyarrow_3lib_FloatingPointArray;
  PyObject *__pyx_type_7pyarrow_3lib_Int8Array;
  PyObject *__pyx_type_7pyarrow_3lib_UInt8Array;
  PyObject *__pyx_type_7pyarrow_3lib_Int16Array;
  PyObject *__pyx_type_7pyarrow_3lib_UInt16Array;
  PyObject *__pyx_type_7pyarrow_3lib_Int32Array;
  PyObject *__pyx_type_7pyarrow_3lib_UInt32Array;
  PyObject *__pyx_type_7pyarrow_3lib_Int64Array;
  PyObject *__pyx_type_7pyarrow_3lib_UInt64Array;
  PyObject *__pyx_type_7pyarrow_3lib_HalfFloatArray;
  PyObject *__pyx_type_7pyarrow_3lib_FloatArray;
  PyObject *__pyx_type_7pyarrow_3lib_DoubleArray;
  PyObject *__pyx_type_7pyarrow_3lib_FixedSizeBinaryArray;
  PyObject *__pyx_type_7pyarrow_3lib_Decimal32Array;
  PyObject *__pyx_type_7pyarrow_3lib_Decimal64Array;
  PyObject *__pyx_type_7pyarrow_3lib_Decimal128Array;
  PyObject *__pyx_type_7pyarrow_3lib_Decimal256Array;
  PyObject *__pyx_type_7pyarrow_3lib_StructArray;
  PyObject *__pyx_type_7pyarrow_3lib_BaseListArray;
  PyObject *__pyx_type_7pyarrow_3lib_ListArray;
  PyObject *__pyx_type_7pyarrow_3lib_LargeListArray;
  PyObject *__pyx_type_7pyarrow_3lib_ListViewArray;
  PyObject *__pyx_type_7pyarrow_3lib_LargeListViewArray;
  PyObject *__pyx_type_7pyarrow_3lib_MapArray;
  PyObject *__pyx_type_7pyarrow_3lib_FixedSizeListArray;
  PyObject *__pyx_type_7pyarrow_3lib_UnionArray;
  PyObject *__pyx_type_7pyarrow_3lib_StringArray;
  PyObject *__pyx_type_7pyarrow_3lib_BinaryArray;
  PyObject *__pyx_type_7pyarrow_3lib_StringViewArray;
  PyObject *__pyx_type_7pyarrow_3lib_BinaryViewArray;
  PyObject *__pyx_type_7pyarrow_3lib_DictionaryArray;
  PyObject *__pyx_type_7pyarrow_3lib_ExtensionArray;
  PyObject *__pyx_type_7pyarrow_3lib_MonthDayNanoIntervalArray;
  PyObject *__pyx_type_7pyarrow_3lib_ChunkedArray;
  PyObject *__pyx_type_7pyarrow_3lib__Tabular;
  PyObject *__pyx_type_7pyarrow_3lib_Table;
  PyObject *__pyx_type_7pyarrow_3lib_RecordBatch;
  PyObject *__pyx_type_7pyarrow_3lib_Device;
  PyObject *__pyx_type_7pyarrow_3lib_MemoryManager;
  PyObject *__pyx_type_7pyarrow_3lib_Buffer;
  PyObject *__pyx_type_7pyarrow_3lib_ResizableBuffer;
  PyObject *__pyx_type_7pyarrow_3lib_NativeFile;
  PyObject *__pyx_type_7pyarrow_3lib_BufferedInputStream;
  PyObject *__pyx_type_7pyarrow_3lib_BufferedOutputStream;
  PyObject *__pyx_type_7pyarrow_3lib_CompressedInputStream;
  PyObject *__pyx_type_7pyarrow_3lib_CompressedOutputStream;
  PyObject *__pyx_type_7pyarrow_3lib__CRecordBatchWriter;
  PyObject *__pyx_type_7pyarrow_3lib_RecordBatchReader;
  PyObject *__pyx_type_7pyarrow_3lib_CacheOptions;
  PyObject *__pyx_type_7pyarrow_3lib_Codec;
  PyObject *__pyx_type_7pyarrow_3lib_StopToken;
  PyObject *__pyx_type_7pyarrow_3lib_SignalStopHandler;
  PyObject *__pyx_type_7pyarrow_3lib__PandasAPIShim;
  PyObject *__pyx_type_7pyarrow_3lib_LoggingMemoryPool;
  PyObject *__pyx_type_7pyarrow_3lib_ProxyMemoryPool;
  PyObject *__pyx_type_7pyarrow_3lib_UnionType;
  PyObject *__pyx_type_7pyarrow_3lib_SparseUnionType;
  PyObject *__pyx_type_7pyarrow_3lib_DenseUnionType;
  PyObject *__pyx_type_7pyarrow_3lib_UnknownExtensionType;
  PyObject *__pyx_type_7pyarrow_3lib__ExtensionRegistryNanny;
  PyObject *__pyx_type_7pyarrow_3lib_NullScalar;
  PyObject *__pyx_type_7pyarrow_3lib_BooleanScalar;
  PyObject *__pyx_type_7pyarrow_3lib_UInt8Scalar;
  PyObject *__pyx_type_7pyarrow_3lib_Int8Scalar;
  PyObject *__pyx_type_7pyarrow_3lib_UInt16Scalar;
  PyObject *__pyx_type_7pyarrow_3lib_Int16Scalar;
  PyObject *__pyx_type_7pyarrow_3lib_UInt32Scalar;
  PyObject *__pyx_type_7pyarrow_3lib_Int32Scalar;
  PyObject *__pyx_type_7pyarrow_3lib_UInt64Scalar;
  PyObject *__pyx_type_7pyarrow_3lib_Int64Scalar;
  PyObject *__pyx_type_7pyarrow_3lib_HalfFloatScalar;
  PyObject *__pyx_type_7pyarrow_3lib_FloatScalar;
  PyObject *__pyx_type_7pyarrow_3lib_DoubleScalar;
  PyObject *__pyx_type_7pyarrow_3lib_Decimal32Scalar;
  PyObject *__pyx_type_7pyarrow_3lib_Decimal64Scalar;
  PyObject *__pyx_type_7pyarrow_3lib_Decimal128Scalar;
  PyObject *__pyx_type_7pyarrow_3lib_Decimal256Scalar;
  PyObject *__pyx_type_7pyarrow_3lib_Date32Scalar;
  PyObject *__pyx_type_7pyarrow_3lib_Date64Scalar;
  PyObject *__pyx_type_7pyarrow_3lib_Time32Scalar;
  PyObject *__pyx_type_7pyarrow_3lib_Time64Scalar;
  PyObject *__pyx_type_7pyarrow_3lib_TimestampScalar;
  PyObject *__pyx_type_7pyarrow_3lib_DurationScalar;
  PyObject *__pyx_type_7pyarrow_3lib_MonthDayNanoIntervalScalar;
  PyObject *__pyx_type_7pyarrow_3lib_BinaryScalar;
  PyObject *__pyx_type_7pyarrow_3lib_LargeBinaryScalar;
  PyObject *__pyx_type_7pyarrow_3lib_FixedSizeBinaryScalar;
  PyObject *__pyx_type_7pyarrow_3lib_StringScalar;
  PyObject *__pyx_type_7pyarrow_3lib_LargeStringScalar;
  PyObject *__pyx_type_7pyarrow_3lib_BinaryViewScalar;
  PyObject *__pyx_type_7pyarrow_3lib_StringViewScalar;
  PyObject *__pyx_type_7pyarrow_3lib_ListScalar;
  PyObject *__pyx_type_7pyarrow_3lib_FixedSizeListScalar;
  PyObject *__pyx_type_7pyarrow_3lib_LargeListScalar;
  PyObject *__pyx_type_7pyarrow_3lib_ListViewScalar;
  PyObject *__pyx_type_7pyarrow_3lib_LargeListViewScalar;
  PyObject *__pyx_type_7pyarrow_3lib_StructScalar;
  PyObject *__pyx_type_7pyarrow_3lib_MapScalar;
  PyObject *__pyx_type_7pyarrow_3lib_DictionaryScalar;
  PyObject *__pyx_type_7pyarrow_3lib_RunEndEncodedScalar;
  PyObject *__pyx_type_7pyarrow_3lib_UnionScalar;
  PyObject *__pyx_type_7pyarrow_3lib_ExtensionScalar;
  PyObject *__pyx_type_7pyarrow_3lib_FixedShapeTensorScalar;
  PyObject *__pyx_type_7pyarrow_3lib_OpaqueScalar;
  PyObject *__pyx_type_7pyarrow_3lib_Bool8Scalar;
  PyObject *__pyx_type_7pyarrow_3lib_Date32Array;
  PyObject *__pyx_type_7pyarrow_3lib_Date64Array;
  PyObject *__pyx_type_7pyarrow_3lib_TimestampArray;
  PyObject *__pyx_type_7pyarrow_3lib_Time32Array;
  PyObject *__pyx_type_7pyarrow_3lib_Time64Array;
  PyObject *__pyx_type_7pyarrow_3lib_DurationArray;
  PyObject *__pyx_type_7pyarrow_3lib_Decima32Array;
  PyObject *__pyx_type_7pyarrow_3lib_LargeStringArray;
  PyObject *__pyx_type_7pyarrow_3lib_LargeBinaryArray;
  PyObject *__pyx_type_7pyarrow_3lib_RunEndEncodedArray;
  PyObject *__pyx_type_7pyarrow_3lib_FixedShapeTensorArray;
  PyObject *__pyx_type_7pyarrow_3lib_OpaqueArray;
  PyObject *__pyx_type_7pyarrow_3lib_Bool8Array;
  PyObject *__pyx_type_7pyarrow_3lib_StringBuilder;
  PyObject *__pyx_type_7pyarrow_3lib_StringViewBuilder;
  PyObject *__pyx_type_7pyarrow_3lib_PythonFile;
  PyObject *__pyx_type_7pyarrow_3lib_MemoryMappedFile;
  PyObject *__pyx_type_7pyarrow_3lib_OSFile;
  PyObject *__pyx_type_7pyarrow_3lib_FixedSizeBufferWriter;
  PyObject *__pyx_type_7pyarrow_3lib_BufferOutputStream;
  PyObject *__pyx_type_7pyarrow_3lib_MockOutputStream;
  PyObject *__pyx_type_7pyarrow_3lib_BufferReader;
  PyObject *__pyx_type_7pyarrow_3lib_TransformInputStream;
  PyObject *__pyx_type_7pyarrow_3lib_MessageReader;
  PyObject *__pyx_type_7pyarrow_3lib__RecordBatchStreamWriter;
  PyObject *__pyx_type_7pyarrow_3lib__RecordBatchStreamReader;
  PyObject *__pyx_type_7pyarrow_3lib__RecordBatchFileWriter;
  PyObject *__pyx_type_7pyarrow_3lib__RecordBatchFileReader;
  PyObject *__pyx_type_7pyarrow_3lib___pyx_defaults;
  PyObject *__pyx_type_7pyarrow_3lib___pyx_scope_struct____iter__;
  PyObject *__pyx_type_7pyarrow_3lib___pyx_scope_struct_1___iter__;
  PyObject *__pyx_type_7pyarrow_3lib___pyx_scope_struct_2_genexpr;
  PyObject *__pyx_type_7pyarrow_3lib___pyx_scope_struct_3_keys;
  PyObject *__pyx_type_7pyarrow_3lib___pyx_scope_struct_4_values;
  PyObject *__pyx_type_7pyarrow_3lib___pyx_scope_struct_5_items;
  PyObject *__pyx_type_7pyarrow_3lib___pyx_scope_struct_6___iter__;
  PyObject *__pyx_type_7pyarrow_3lib___pyx_scope_struct_7___iter__;
  PyObject *__pyx_type_7pyarrow_3lib___pyx_scope_struct_8_items;
  PyObject *__pyx_type_7pyarrow_3lib___pyx_scope_struct_9_genexpr;
  PyObject *__pyx_type_7pyarrow_3lib___pyx_scope_struct_10___iter__;
  PyObject *__pyx_type_7pyarrow_3lib___pyx_scope_struct_11___iter__;
  PyObject *__pyx_type_7pyarrow_3lib___pyx_scope_struct_12_genexpr;
  PyObject *__pyx_type_7pyarrow_3lib___pyx_scope_struct_13___iter__;
  PyObject *__pyx_type_7pyarrow_3lib___pyx_scope_struct_14_iterchunks;
  PyObject *__pyx_type_7pyarrow_3lib___pyx_scope_struct_15_itercolumns;
  PyObject *__pyx_type_7pyarrow_3lib___pyx_scope_struct_16_genexpr;
  PyObject *__pyx_type_7pyarrow_3lib___pyx_scope_struct_17_genexpr;
  PyObject *__pyx_type_7pyarrow_3lib___pyx_scope_struct_18_genexpr;
  PyObject *__pyx_type_7pyarrow_3lib___pyx_scope_struct_19_genexpr;
  PyObject *__pyx_type_7pyarrow_3lib___pyx_scope_struct_20_genexpr;
  PyObject *__pyx_type_7pyarrow_3lib___pyx_scope_struct_21_download;
  PyObject *__pyx_type_7pyarrow_3lib___pyx_scope_struct_22__download_nothreads;
  PyObject *__pyx_type_7pyarrow_3lib___pyx_scope_struct_23_upload;
  PyObject *__pyx_type_7pyarrow_3lib___pyx_scope_struct_24_iter_batches_with_custom_metadata;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib__Weakrefable;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_IpcWriteOptions;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_IpcReadOptions;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_Message;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_MemoryPool;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_DataType;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_ListType;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_LargeListType;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_ListViewType;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_LargeListViewType;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_MapType;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_FixedSizeListType;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_StructType;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_DictionaryMemo;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_DictionaryType;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_TimestampType;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_Time32Type;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_Time64Type;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_DurationType;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_FixedSizeBinaryType;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_Decimal32Type;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_Decimal64Type;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_Decimal128Type;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_Decimal256Type;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_RunEndEncodedType;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_BaseExtensionType;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_ExtensionType;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_FixedShapeTensorType;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_Bool8Type;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_OpaqueType;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_UuidType;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_JsonType;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib__Metadata;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_KeyValueMetadata;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_Field;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_Schema;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_Scalar;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_ArrayStatistics;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib__PandasConvertible;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_Array;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_Tensor;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_SparseCSRMatrix;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_SparseCSCMatrix;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_SparseCOOTensor;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_SparseCSFTensor;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_NullArray;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_BooleanArray;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_NumericArray;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_IntegerArray;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_FloatingPointArray;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_Int8Array;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_UInt8Array;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_Int16Array;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_UInt16Array;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_Int32Array;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_UInt32Array;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_Int64Array;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_UInt64Array;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_HalfFloatArray;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_FloatArray;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_DoubleArray;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_FixedSizeBinaryArray;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_Decimal32Array;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_Decimal64Array;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_Decimal128Array;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_Decimal256Array;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_StructArray;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_BaseListArray;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_ListArray;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_LargeListArray;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_ListViewArray;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_LargeListViewArray;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_MapArray;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_FixedSizeListArray;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_UnionArray;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_StringArray;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_BinaryArray;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_StringViewArray;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_BinaryViewArray;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_DictionaryArray;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_ExtensionArray;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_MonthDayNanoIntervalArray;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_ChunkedArray;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib__Tabular;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_Table;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_RecordBatch;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_Device;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_MemoryManager;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_Buffer;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_ResizableBuffer;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_NativeFile;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_BufferedInputStream;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_BufferedOutputStream;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_CompressedInputStream;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_CompressedOutputStream;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib__CRecordBatchWriter;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_RecordBatchReader;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_CacheOptions;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_Codec;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_StopToken;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_SignalStopHandler;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib__PandasAPIShim;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_LoggingMemoryPool;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_ProxyMemoryPool;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_UnionType;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_SparseUnionType;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_DenseUnionType;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_UnknownExtensionType;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib__ExtensionRegistryNanny;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_NullScalar;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_BooleanScalar;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_UInt8Scalar;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_Int8Scalar;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_UInt16Scalar;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_Int16Scalar;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_UInt32Scalar;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_Int32Scalar;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_UInt64Scalar;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_Int64Scalar;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_HalfFloatScalar;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_FloatScalar;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_DoubleScalar;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_Decimal32Scalar;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_Decimal64Scalar;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_Decimal128Scalar;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_Decimal256Scalar;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_Date32Scalar;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_Date64Scalar;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_Time32Scalar;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_Time64Scalar;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_TimestampScalar;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_DurationScalar;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_MonthDayNanoIntervalScalar;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_BinaryScalar;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_LargeBinaryScalar;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_FixedSizeBinaryScalar;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_StringScalar;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_LargeStringScalar;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_BinaryViewScalar;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_StringViewScalar;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_ListScalar;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_FixedSizeListScalar;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_LargeListScalar;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_ListViewScalar;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_LargeListViewScalar;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_StructScalar;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_MapScalar;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_DictionaryScalar;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_RunEndEncodedScalar;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_UnionScalar;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_ExtensionScalar;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_FixedShapeTensorScalar;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_OpaqueScalar;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_Bool8Scalar;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_Date32Array;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_Date64Array;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_TimestampArray;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_Time32Array;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_Time64Array;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_DurationArray;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_Decima32Array;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_LargeStringArray;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_LargeBinaryArray;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_RunEndEncodedArray;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_FixedShapeTensorArray;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_OpaqueArray;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_Bool8Array;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_StringBuilder;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_StringViewBuilder;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_PythonFile;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_MemoryMappedFile;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_OSFile;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_FixedSizeBufferWriter;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_BufferOutputStream;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_MockOutputStream;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_BufferReader;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_TransformInputStream;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib_MessageReader;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib__RecordBatchStreamWriter;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib__RecordBatchStreamReader;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib__RecordBatchFileWriter;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib__RecordBatchFileReader;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib___pyx_defaults;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib___pyx_scope_struct____iter__;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_1___iter__;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_2_genexpr;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_3_keys;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_4_values;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_5_items;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_6___iter__;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_7___iter__;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_8_items;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_9_genexpr;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_10___iter__;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_11___iter__;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_12_genexpr;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_13___iter__;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_14_iterchunks;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_15_itercolumns;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_16_genexpr;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_17_genexpr;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_18_genexpr;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_19_genexpr;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_20_genexpr;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_21_download;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_22__download_nothreads;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_23_upload;
  PyTypeObject *__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_24_iter_batches_with_custom_metadata;
  __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_get;
  __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_items;
  __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_pop;
  __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_values;
  __Pyx_CachedCFunction __pyx_umethod_PyDict_Type__update;
  __Pyx_CachedCFunction __pyx_umethod_PySlice_Type__indices;
  __Pyx_CachedCFunction __pyx_umethod_PyUnicode_Type__upper;
  enum __pyx_t_7pyarrow_3lib_Alignment __pyx_k__19;
  PyObject *__pyx_k__20;
  struct __pyx_obj_7pyarrow_3lib_IpcWriteOptions *__pyx_k__23;
  struct __pyx_obj_7pyarrow_3lib_IpcReadOptions *__pyx_k__24;
  struct __pyx_obj_7pyarrow_3lib_IpcWriteOptions *__pyx_k__25;
  struct __pyx_obj_7pyarrow_3lib_IpcReadOptions *__pyx_k__26;
  PyObject *__pyx_slice[4];
  PyObject *__pyx_tuple[58];
  PyObject *__pyx_codeobj_tab[784];
  PyObject *__pyx_string_tab[3699];
  PyObject *__pyx_number_tab[19];
/* #### Code section: module_state_contents ### */
/* CommonTypesMetaclass.module_state_decls */
PyTypeObject *__pyx_CommonTypesMetaclassType;

/* CachedMethodType.module_state_decls */
#if CYTHON_COMPILING_IN_LIMITED_API
PyObject *__Pyx_CachedMethodType;
#endif

/* CythonFunctionShared.module_state_decls */
PyTypeObject *__pyx_CyFunctionType;


#if CYTHON_USE_FREELISTS
struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct____iter__ *__pyx_freelist_7pyarrow_3lib___pyx_scope_struct____iter__[8];
int __pyx_freecount_7pyarrow_3lib___pyx_scope_struct____iter__;
#endif

#if CYTHON_USE_FREELISTS
struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_1___iter__ *__pyx_freelist_7pyarrow_3lib___pyx_scope_struct_1___iter__[8];
int __pyx_freecount_7pyarrow_3lib___pyx_scope_struct_1___iter__;
#endif

#if CYTHON_USE_FREELISTS
struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_2_genexpr *__pyx_freelist_7pyarrow_3lib___pyx_scope_struct_2_genexpr[8];
int __pyx_freecount_7pyarrow_3lib___pyx_scope_struct_2_genexpr;
#endif

#if CYTHON_USE_FREELISTS
struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_3_keys *__pyx_freelist_7pyarrow_3lib___pyx_scope_struct_3_keys[8];
int __pyx_freecount_7pyarrow_3lib___pyx_scope_struct_3_keys;
#endif

#if CYTHON_USE_FREELISTS
struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_4_values *__pyx_freelist_7pyarrow_3lib___pyx_scope_struct_4_values[8];
int __pyx_freecount_7pyarrow_3lib___pyx_scope_struct_4_values;
#endif

#if CYTHON_USE_FREELISTS
struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_5_items *__pyx_freelist_7pyarrow_3lib___pyx_scope_struct_5_items[8];
int __pyx_freecount_7pyarrow_3lib___pyx_scope_struct_5_items;
#endif

#if CYTHON_USE_FREELISTS
struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_6___iter__ *__pyx_freelist_7pyarrow_3lib___pyx_scope_struct_6___iter__[8];
int __pyx_freecount_7pyarrow_3lib___pyx_scope_struct_6___iter__;
#endif

#if CYTHON_USE_FREELISTS
struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_7___iter__ *__pyx_freelist_7pyarrow_3lib___pyx_scope_struct_7___iter__[8];
int __pyx_freecount_7pyarrow_3lib___pyx_scope_struct_7___iter__;
#endif

#if CYTHON_USE_FREELISTS
struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_8_items *__pyx_freelist_7pyarrow_3lib___pyx_scope_struct_8_items[8];
int __pyx_freecount_7pyarrow_3lib___pyx_scope_struct_8_items;
#endif

#if CYTHON_USE_FREELISTS
struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_9_genexpr *__pyx_freelist_7pyarrow_3lib___pyx_scope_struct_9_genexpr[8];
int __pyx_freecount_7pyarrow_3lib___pyx_scope_struct_9_genexpr;
#endif

#if CYTHON_USE_FREELISTS
struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_10___iter__ *__pyx_freelist_7pyarrow_3lib___pyx_scope_struct_10___iter__[8];
int __pyx_freecount_7pyarrow_3lib___pyx_scope_struct_10___iter__;
#endif

#if CYTHON_USE_FREELISTS
struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_11___iter__ *__pyx_freelist_7pyarrow_3lib___pyx_scope_struct_11___iter__[8];
int __pyx_freecount_7pyarrow_3lib___pyx_scope_struct_11___iter__;
#endif

#if CYTHON_USE_FREELISTS
struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_12_genexpr *__pyx_freelist_7pyarrow_3lib___pyx_scope_struct_12_genexpr[8];
int __pyx_freecount_7pyarrow_3lib___pyx_scope_struct_12_genexpr;
#endif

#if CYTHON_USE_FREELISTS
struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_13___iter__ *__pyx_freelist_7pyarrow_3lib___pyx_scope_struct_13___iter__[8];
int __pyx_freecount_7pyarrow_3lib___pyx_scope_struct_13___iter__;
#endif

#if CYTHON_USE_FREELISTS
struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_14_iterchunks *__pyx_freelist_7pyarrow_3lib___pyx_scope_struct_14_iterchunks[8];
int __pyx_freecount_7pyarrow_3lib___pyx_scope_struct_14_iterchunks;
#endif

#if CYTHON_USE_FREELISTS
struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_15_itercolumns *__pyx_freelist_7pyarrow_3lib___pyx_scope_struct_15_itercolumns[8];
int __pyx_freecount_7pyarrow_3lib___pyx_scope_struct_15_itercolumns;
#endif

#if CYTHON_USE_FREELISTS
struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_16_genexpr *__pyx_freelist_7pyarrow_3lib___pyx_scope_struct_16_genexpr[8];
int __pyx_freecount_7pyarrow_3lib___pyx_scope_struct_16_genexpr;
#endif

#if CYTHON_USE_FREELISTS
struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_17_genexpr *__pyx_freelist_7pyarrow_3lib___pyx_scope_struct_17_genexpr[8];
int __pyx_freecount_7pyarrow_3lib___pyx_scope_struct_17_genexpr;
#endif

#if CYTHON_USE_FREELISTS
struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_18_genexpr *__pyx_freelist_7pyarrow_3lib___pyx_scope_struct_18_genexpr[8];
int __pyx_freecount_7pyarrow_3lib___pyx_scope_struct_18_genexpr;
#endif

#if CYTHON_USE_FREELISTS
struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_19_genexpr *__pyx_freelist_7pyarrow_3lib___pyx_scope_struct_19_genexpr[8];
int __pyx_freecount_7pyarrow_3lib___pyx_scope_struct_19_genexpr;
#endif

#if CYTHON_USE_FREELISTS
struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_20_genexpr *__pyx_freelist_7pyarrow_3lib___pyx_scope_struct_20_genexpr[8];
int __pyx_freecount_7pyarrow_3lib___pyx_scope_struct_20_genexpr;
#endif

#if CYTHON_USE_FREELISTS
struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_21_download *__pyx_freelist_7pyarrow_3lib___pyx_scope_struct_21_download[8];
int __pyx_freecount_7pyarrow_3lib___pyx_scope_struct_21_download;
#endif

#if CYTHON_USE_FREELISTS
struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_22__download_nothreads *__pyx_freelist_7pyarrow_3lib___pyx_scope_struct_22__download_nothreads[8];
int __pyx_freecount_7pyarrow_3lib___pyx_scope_struct_22__download_nothreads;
#endif

#if CYTHON_USE_FREELISTS
struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_23_upload *__pyx_freelist_7pyarrow_3lib___pyx_scope_struct_23_upload[8];
int __pyx_freecount_7pyarrow_3lib___pyx_scope_struct_23_upload;
#endif

#if CYTHON_USE_FREELISTS
struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_24_iter_batches_with_custom_metadata *__pyx_freelist_7pyarrow_3lib___pyx_scope_struct_24_iter_batches_with_custom_metadata[8];
int __pyx_freecount_7pyarrow_3lib___pyx_scope_struct_24_iter_batches_with_custom_metadata;
#endif
/* CodeObjectCache.module_state_decls */
struct __Pyx_CodeObjectCache __pyx_code_cache;

/* IterNextPlain.module_state_decls */
#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
PyObject *__Pyx_GetBuiltinNext_LimitedAPI_cache;
#endif

/* Generator.module_state_decls */
PyTypeObject *__pyx_GeneratorType;

/* #### Code section: module_state_end ### */
} __pyx_mstatetype;

#if CYTHON_USE_MODULE_STATE
#ifdef __cplusplus
namespace {
extern struct PyModuleDef __pyx_moduledef;
} /* anonymous namespace */
#else
static struct PyModuleDef __pyx_moduledef;
#endif

#define __pyx_mstate_global (__Pyx_PyModule_GetState(__Pyx_State_FindModule(&__pyx_moduledef)))

#define __pyx_m (__Pyx_State_FindModule(&__pyx_moduledef))
#else
static __pyx_mstatetype __pyx_mstate_global_static =
#ifdef __cplusplus
    {};
#else
    {0};
#endif
static __pyx_mstatetype * const __pyx_mstate_global = &__pyx_mstate_global_static;
#endif
/* #### Code section: constant_name_defines ### */
#define __pyx_kp_u_ __pyx_string_tab[0]
#define __pyx_kp_u_1_0_0 __pyx_string_tab[1]
#define __pyx_kp_u_2_0_0 __pyx_string_tab[2]
#define __pyx_kp_u_2_1_0 __pyx_string_tab[3]
#define __pyx_kp_u_2_3_0_dev0 __pyx_string_tab[4]
#define __pyx_kp_u_3_0_0 __pyx_string_tab[5]
#define __pyx_kp_u_3_0_0_dev0 __pyx_string_tab[6]
#define __pyx_kp_u_A_copy_of_this_field_with_the_r __pyx_string_tab[7]
#define __pyx_kp_u_A_copy_of_this_field_with_the_r_2 __pyx_string_tab[8]
#define __pyx_kp_u_A_copy_of_this_field_with_the_r_3 __pyx_string_tab[9]
#define __pyx_kp_u_A_grouping_of_columns_in_a_tabl __pyx_string_tab[10]
#define __pyx_kp_u_A_null_type_field_may_not_be_non __pyx_string_tab[11]
#define __pyx_kp_u_Add_a_field_at_position_i_to_th __pyx_string_tab[12]
#define __pyx_kp_u_Add_column_to_RecordBatch_at_po __pyx_string_tab[13]
#define __pyx_kp_u_Add_column_to_Table_at_position __pyx_string_tab[14]
#define __pyx_kp_u_Add_metadata_as_dict_of_string __pyx_string_tab[15]
#define __pyx_kp_u_Add_metadata_as_dict_of_string_2 __pyx_string_tab[16]
#define __pyx_kp_u_Alias_for_large_string_Examples __pyx_string_tab[17]
#define __pyx_kp_u_Alias_for_string_Examples_Creat __pyx_string_tab[18]
#define __pyx_kp_u_Append_a_field_at_the_end_of_th __pyx_string_tab[19]
#define __pyx_kp_u_Append_column_at_end_of_columns __pyx_string_tab[20]
#define __pyx_kp_u_Argument_destination_has_incorre __pyx_string_tab[21]
#define __pyx_kp_u_Array_data_type_was_NULL __pyx_string_tab[22]
#define __pyx_kp_u_Array_diff_line_1102 __pyx_string_tab[23]
#define __pyx_kp_u_Array_dtype __pyx_string_tab[24]
#define __pyx_kp_u_Array_was_NULL __pyx_string_tab[25]
#define __pyx_kp_u_Arrays_were_not_all_the_same_len __pyx_string_tab[26]
#define __pyx_kp_u_BaseListArray_flatten_line_2535 __pyx_string_tab[27]
#define __pyx_kp_u_BaseListArray_value_lengths_line __pyx_string_tab[28]
#define __pyx_kp_u_BaseListArray_value_parent_indic_2 __pyx_string_tab[29]
#define __pyx_kp_u_Batch_number __pyx_string_tab[30]
#define __pyx_kp_u_Bit_width_for_fixed_width_type __pyx_string_tab[31]
#define __pyx_kp_u_Bool8Array_from_numpy_line_4839 __pyx_string_tab[32]
#define __pyx_kp_u_Buffer_size_must_be_larger_than __pyx_string_tab[33]
#define __pyx_kp_u_Byte_width_for_fixed_width_type __pyx_string_tab[34]
#define __pyx_kp_u_CPU_count_must_be_strictly_posit __pyx_string_tab[35]
#define __pyx_kp_u_Calling_data_on_ChunkedArray_is __pyx_string_tab[36]
#define __pyx_kp_u_Can_only_get_value_offsets_for_d __pyx_string_tab[37]
#define __pyx_kp_u_Can_only_instantiate_subclasses __pyx_string_tab[38]
#define __pyx_kp_u_Can_t_convert_PyCapsule_with_nam __pyx_string_tab[39]
#define __pyx_kp_u_Cannot_convert __pyx_string_tab[40]
#define __pyx_kp_u_Cannot_convert_1D_array_or_scala __pyx_string_tab[41]
#define __pyx_kp_u_Cannot_create_multiple_NullScala __pyx_string_tab[42]
#define __pyx_kp_u_Cannot_export_buffer_from_null_A __pyx_string_tab[43]
#define __pyx_kp_u_Cannot_pass_a_numpy_masked_array __pyx_string_tab[44]
#define __pyx_kp_u_Cannot_pass_both_schema_and_meta __pyx_string_tab[45]
#define __pyx_kp_u_Cannot_pass_both_schema_and_name __pyx_string_tab[46]
#define __pyx_kp_u_Cannot_return_a_numpy_ndarray_if __pyx_string_tab[47]
#define __pyx_kp_u_Cannot_return_a_writable_array_i __pyx_string_tab[48]
#define __pyx_kp_u_Cannot_specify_a_mask_or_a_size __pyx_string_tab[49]
#define __pyx_kp_u_Cannot_specify_both_list_size_an __pyx_string_tab[50]
#define __pyx_kp_u_Cast_array_values_to_another_da __pyx_string_tab[51]
#define __pyx_kp_u_Cast_record_batch_values_to_ano __pyx_string_tab[52]
#define __pyx_kp_u_Cast_table_values_to_another_sc __pyx_string_tab[53]
#define __pyx_kp_u_Casting_field __pyx_string_tab[54]
#define __pyx_kp_u_Casting_to_a_requested_schema_is __pyx_string_tab[55]
#define __pyx_kp_u_Check_if_contents_of_two_record __pyx_string_tab[56]
#define __pyx_kp_u_Check_if_contents_of_two_tables __pyx_string_tab[57]
#define __pyx_kp_u_Chunk_index_out_of_range __pyx_string_tab[58]
#define __pyx_kp_u_ChunkedArray_cast_line_564 __pyx_string_tab[59]
#define __pyx_kp_u_ChunkedArray_chunk_line_1271 __pyx_string_tab[60]
#define __pyx_kp_u_ChunkedArray_chunks___get___line __pyx_string_tab[61]
#define __pyx_kp_u_ChunkedArray_combine_chunks_line __pyx_string_tab[62]
#define __pyx_kp_u_ChunkedArray_data_type_was_NULL __pyx_string_tab[63]
#define __pyx_kp_u_ChunkedArray_dictionary_encode_l __pyx_string_tab[64]
#define __pyx_kp_u_ChunkedArray_drop_null_line_1085 __pyx_string_tab[65]
#define __pyx_kp_u_ChunkedArray_equals_line_450 __pyx_string_tab[66]
#define __pyx_kp_u_ChunkedArray_fill_null_line_413 __pyx_string_tab[67]
#define __pyx_kp_u_ChunkedArray_filter_line_925 __pyx_string_tab[68]
#define __pyx_kp_u_ChunkedArray_flatten_line_663 __pyx_string_tab[69]
#define __pyx_kp_u_ChunkedArray_format_is_deprecate __pyx_string_tab[70]
#define __pyx_kp_u_ChunkedArray_get_total_buffer_si_2 __pyx_string_tab[71]
#define __pyx_kp_u_ChunkedArray_index_line_990 __pyx_string_tab[72]
#define __pyx_kp_u_ChunkedArray_is_nan_line_356 __pyx_string_tab[73]
#define __pyx_kp_u_ChunkedArray_is_null_line_322 __pyx_string_tab[74]
#define __pyx_kp_u_ChunkedArray_is_valid_line_381 __pyx_string_tab[75]
#define __pyx_kp_u_ChunkedArray_iterchunks_line_133 __pyx_string_tab[76]
#define __pyx_kp_u_ChunkedArray_length_line_99 __pyx_string_tab[77]
#define __pyx_kp_u_ChunkedArray_nbytes___get___line __pyx_string_tab[78]
#define __pyx_kp_u_ChunkedArray_null_count___get __pyx_string_tab[79]
#define __pyx_kp_u_ChunkedArray_num_chunks___get __pyx_string_tab[80]
#define __pyx_kp_u_ChunkedArray_slice_line_867 __pyx_string_tab[81]
#define __pyx_kp_u_ChunkedArray_take_line_1038 __pyx_string_tab[82]
#define __pyx_kp_u_ChunkedArray_to_numpy_line_494 __pyx_string_tab[83]
#define __pyx_kp_u_ChunkedArray_to_pylist_line_1356 __pyx_string_tab[84]
#define __pyx_kp_u_ChunkedArray_to_string_line_119 __pyx_string_tab[85]
#define __pyx_kp_u_ChunkedArray_type___get___line_8 __pyx_string_tab[86]
#define __pyx_kp_u_ChunkedArray_unify_dictionaries_2 __pyx_string_tab[87]
#define __pyx_kp_u_ChunkedArray_unique_line_782 __pyx_string_tab[88]
#define __pyx_kp_u_ChunkedArray_value_counts_line_8 __pyx_string_tab[89]
#define __pyx_kp_u_ChunkedArray_was_NULL __pyx_string_tab[90]
#define __pyx_kp_u_Column __pyx_string_tab[91]
#define __pyx_kp_u_Compare_contents_of_this_array __pyx_string_tab[92]
#define __pyx_kp_u_Compression_type_must_be_lz4_zst __pyx_string_tab[93]
#define __pyx_kp_u_Compute_counts_of_unique_elemen __pyx_string_tab[94]
#define __pyx_kp_u_Compute_dictionary_encoded_repr __pyx_string_tab[95]
#define __pyx_kp_u_Compute_distinct_elements_in_ar __pyx_string_tab[96]
#define __pyx_kp_u_Compute_zero_copy_slice_of_this __pyx_string_tab[97]
#define __pyx_kp_u_Compute_zero_copy_slice_of_this_2 __pyx_string_tab[98]
#define __pyx_kp_u_Compute_zero_copy_slice_of_this_3 __pyx_string_tab[99]
#define __pyx_kp_u_Concatenate_pyarrow_RecordBatch __pyx_string_tab[100]
#define __pyx_kp_u_Concatenate_pyarrow_Table_objec __pyx_string_tab[101]
#define __pyx_kp_u_Concatenate_the_given_arrays_Th __pyx_string_tab[102]
#define __pyx_kp_u_Concrete_class_for_Arrow_arrays __pyx_string_tab[103]
#define __pyx_kp_u_Concrete_class_for_Arrow_arrays_2 __pyx_string_tab[104]
#define __pyx_kp_u_Concrete_class_for_JSON_extensi __pyx_string_tab[105]
#define __pyx_kp_u_Concrete_class_for_Uuid_extensi __pyx_string_tab[106]
#define __pyx_kp_u_Construct_FixedSizeListArray_fr __pyx_string_tab[107]
#define __pyx_kp_u_Construct_LargeListViewArray_fr __pyx_string_tab[108]
#define __pyx_kp_u_Construct_ListArray_from_arrays __pyx_string_tab[109]
#define __pyx_kp_u_Construct_ListViewArray_from_ar __pyx_string_tab[110]
#define __pyx_kp_u_Construct_MapArray_from_arrays __pyx_string_tab[111]
#define __pyx_kp_u_Construct_a_RecordBatch_from_a __pyx_string_tab[112]
#define __pyx_kp_u_Construct_a_RecordBatch_from_mu __pyx_string_tab[113]
#define __pyx_kp_u_Construct_a_Table_from_Arrow_ar __pyx_string_tab[114]
#define __pyx_kp_u_Construct_a_Table_from_a_Struct __pyx_string_tab[115]
#define __pyx_kp_u_Construct_a_Table_from_a_sequen __pyx_string_tab[116]
#define __pyx_kp_u_Construct_a_Table_or_RecordBatc __pyx_string_tab[117]
#define __pyx_kp_u_Construct_a_Table_or_RecordBatc_2 __pyx_string_tab[118]
#define __pyx_kp_u_Construct_chunked_array_from_li __pyx_string_tab[119]
#define __pyx_kp_u_Construct_pyarrow_Schema_from_c __pyx_string_tab[120]
#define __pyx_kp_u_Convert_NumPy_dtype_to_pyarrow __pyx_string_tab[121]
#define __pyx_kp_u_Convert_Table_to_a_list_of_Reco __pyx_string_tab[122]
#define __pyx_kp_u_Convert_arrow_Tensor_to_numpy_n __pyx_string_tab[123]
#define __pyx_kp_u_Convert_numpy_array_to_a_bool8 __pyx_string_tab[124]
#define __pyx_kp_u_Convert_numpy_tensors_ndarrays __pyx_string_tab[125]
#define __pyx_kp_u_Convert_pandas_DataFrame_to_an __pyx_string_tab[126]
#define __pyx_kp_u_Convert_pandas_DataFrame_to_an_2 __pyx_string_tab[127]
#define __pyx_kp_u_Convert_the_Table_or_RecordBatc __pyx_string_tab[128]
#define __pyx_kp_u_Convert_the_Table_or_RecordBatc_2 __pyx_string_tab[129]
#define __pyx_kp_u_Convert_the_Table_to_a_RecordBa __pyx_string_tab[130]
#define __pyx_kp_u_Convert_to_a_class_pyarrow_Tens __pyx_string_tab[131]
#define __pyx_kp_u_Convert_to_a_list_of_native_Pyt __pyx_string_tab[132]
#define __pyx_kp_u_Convert_to_a_list_of_single_chu __pyx_string_tab[133]
#define __pyx_kp_u_Convert_to_a_pandas_compatible __pyx_string_tab[134]
#define __pyx_kp_u_Convert_to_an_iterator_of_Chunk __pyx_string_tab[135]
#define __pyx_kp_u_Converting_to_Python_dictionary __pyx_string_tab[136]
#define __pyx_kp_u_Converting_to_Python_dictionary_2 __pyx_string_tab[137]
#define __pyx_kp_u_Could_not_cast __pyx_string_tab[138]
#define __pyx_kp_u_Create_LargeListType_instance_f __pyx_string_tab[139]
#define __pyx_kp_u_Create_LargeListViewType_instan __pyx_string_tab[140]
#define __pyx_kp_u_Create_ListType_instance_from_c __pyx_string_tab[141]
#define __pyx_kp_u_Create_ListViewType_instance_fr __pyx_string_tab[142]
#define __pyx_kp_u_Create_MapType_instance_from_ke __pyx_string_tab[143]
#define __pyx_kp_u_Create_StructType_instance_from __pyx_string_tab[144]
#define __pyx_kp_u_Create_UTF8_variable_length_str __pyx_string_tab[145]
#define __pyx_kp_u_Create_UTF8_variable_length_str_2 __pyx_string_tab[146]
#define __pyx_kp_u_Create_a_Tensor_from_a_numpy_ar __pyx_string_tab[147]
#define __pyx_kp_u_Create_a_file_of_the_given_size __pyx_string_tab[148]
#define __pyx_kp_u_Create_a_pyarrow_Field_instance __pyx_string_tab[149]
#define __pyx_kp_u_Create_a_pyarrow_RecordBatch_fr __pyx_string_tab[150]
#define __pyx_kp_u_Create_a_pyarrow_Scalar_instanc __pyx_string_tab[151]
#define __pyx_kp_u_Create_a_pyarrow_Table_from_a_P __pyx_string_tab[152]
#define __pyx_kp_u_Create_a_strongly_typed_Array_i __pyx_string_tab[153]
#define __pyx_kp_u_Create_a_variable_length_binary __pyx_string_tab[154]
#define __pyx_kp_u_Create_an_Array_instance_whose __pyx_string_tab[155]
#define __pyx_kp_u_Create_an_Arrow_input_stream_Pa __pyx_string_tab[156]
#define __pyx_kp_u_Create_an_Arrow_output_stream_P __pyx_string_tab[157]
#define __pyx_kp_u_Create_decimal_type_with_precis __pyx_string_tab[158]
#define __pyx_kp_u_Create_decimal_type_with_precis_2 __pyx_string_tab[159]
#define __pyx_kp_u_Create_decimal_type_with_precis_3 __pyx_string_tab[160]
#define __pyx_kp_u_Create_double_precision_floatin __pyx_string_tab[161]
#define __pyx_kp_u_Create_half_precision_floating __pyx_string_tab[162]
#define __pyx_kp_u_Create_instance_of_32_bit_date __pyx_string_tab[163]
#define __pyx_kp_u_Create_instance_of_32_bit_time __pyx_string_tab[164]
#define __pyx_kp_u_Create_instance_of_64_bit_date __pyx_string_tab[165]
#define __pyx_kp_u_Create_instance_of_64_bit_time __pyx_string_tab[166]
#define __pyx_kp_u_Create_instance_of_JSON_extensi __pyx_string_tab[167]
#define __pyx_kp_u_Create_instance_of_a_duration_t __pyx_string_tab[168]
#define __pyx_kp_u_Create_instance_of_an_interval __pyx_string_tab[169]
#define __pyx_kp_u_Create_instance_of_bool8_extens __pyx_string_tab[170]
#define __pyx_kp_u_Create_instance_of_boolean_type __pyx_string_tab[171]
#define __pyx_kp_u_Create_instance_of_fixed_shape __pyx_string_tab[172]
#define __pyx_kp_u_Create_instance_of_null_type_Ex __pyx_string_tab[173]
#define __pyx_kp_u_Create_instance_of_opaque_exten __pyx_string_tab[174]
#define __pyx_kp_u_Create_instance_of_signed_int16 __pyx_string_tab[175]
#define __pyx_kp_u_Create_instance_of_signed_int32 __pyx_string_tab[176]
#define __pyx_kp_u_Create_instance_of_signed_int64 __pyx_string_tab[177]
#define __pyx_kp_u_Create_instance_of_signed_int8 __pyx_string_tab[178]
#define __pyx_kp_u_Create_instance_of_timestamp_ty __pyx_string_tab[179]
#define __pyx_kp_u_Create_instance_of_unsigned_int __pyx_string_tab[180]
#define __pyx_kp_u_Create_instance_of_unsigned_uin __pyx_string_tab[181]
#define __pyx_kp_u_Create_instance_of_unsigned_uin_2 __pyx_string_tab[182]
#define __pyx_kp_u_Create_instance_of_unsigned_uin_3 __pyx_string_tab[183]
#define __pyx_kp_u_Create_large_UTF8_variable_leng __pyx_string_tab[184]
#define __pyx_kp_u_Create_large_variable_length_bi __pyx_string_tab[185]
#define __pyx_kp_u_Create_new_RecordBatch_with_the __pyx_string_tab[186]
#define __pyx_kp_u_Create_new_Table_with_the_indic __pyx_string_tab[187]
#define __pyx_kp_u_Create_new_field_without_metada __pyx_string_tab[188]
#define __pyx_kp_u_Create_new_record_batch_with_co __pyx_string_tab[189]
#define __pyx_kp_u_Create_new_schema_without_metad __pyx_string_tab[190]
#define __pyx_kp_u_Create_new_table_with_columns_r __pyx_string_tab[191]
#define __pyx_kp_u_Create_pyarrow_Array_instance_f __pyx_string_tab[192]
#define __pyx_kp_u_Create_shallow_copy_of_record_b __pyx_string_tab[193]
#define __pyx_kp_u_Create_shallow_copy_of_table_by __pyx_string_tab[194]
#define __pyx_kp_u_Create_single_precision_floatin __pyx_string_tab[195]
#define __pyx_kp_u_Create_variable_length_or_fixed __pyx_string_tab[196]
#define __pyx_kp_u_D_array_to_bool8_array __pyx_string_tab[197]
#define __pyx_kp_u_DataType_bit_width___get___line __pyx_string_tab[198]
#define __pyx_kp_u_DataType_byte_width___get___line __pyx_string_tab[199]
#define __pyx_kp_u_DataType_equals_line_370 __pyx_string_tab[200]
#define __pyx_kp_u_DataType_expected_got __pyx_string_tab[201]
#define __pyx_kp_u_DataType_has_variadic_buffers __pyx_string_tab[202]
#define __pyx_kp_u_DataType_num_buffers___get___lin __pyx_string_tab[203]
#define __pyx_kp_u_DataType_num_fields___get___line __pyx_string_tab[204]
#define __pyx_kp_u_DataType_to_pandas_dtype_line_40 __pyx_string_tab[205]
#define __pyx_kp_u_Decimal128Type_precision___get __pyx_string_tab[206]
#define __pyx_kp_u_Decimal128Type_scale___get___lin __pyx_string_tab[207]
#define __pyx_kp_u_Decimal256Type_precision___get __pyx_string_tab[208]
#define __pyx_kp_u_Decimal256Type_scale___get___lin __pyx_string_tab[209]
#define __pyx_kp_u_Decimal32Type_precision___get __pyx_string_tab[210]
#define __pyx_kp_u_Decimal32Type_scale___get___line __pyx_string_tab[211]
#define __pyx_kp_u_Decimal64Type_precision___get __pyx_string_tab[212]
#define __pyx_kp_u_Decimal64Type_scale___get___line __pyx_string_tab[213]
#define __pyx_kp_u_Declare_a_grouping_over_the_col __pyx_string_tab[214]
#define __pyx_kp_u_Detail __pyx_string_tab[215]
#define __pyx_kp_u_Device_on_which_the_data_resides __pyx_string_tab[216]
#define __pyx_kp_u_DictionaryType_index_type___get __pyx_string_tab[217]
#define __pyx_kp_u_DictionaryType_ordered___get___l __pyx_string_tab[218]
#define __pyx_kp_u_DictionaryType_value_type___get __pyx_string_tab[219]
#define __pyx_kp_u_Dictionary_categorical_or_simpl __pyx_string_tab[220]
#define __pyx_kp_u_Dimensions_of_the_table_or_reco __pyx_string_tab[221]
#define __pyx_kp_u_Do_not_call __pyx_string_tab[222]
#define __pyx_kp_u_Do_not_call_Buffer_s_constructor __pyx_string_tab[223]
#define __pyx_kp_u_Do_not_call_ChunkedArray_s_const __pyx_string_tab[224]
#define __pyx_kp_u_Do_not_call_Device_s_constructor __pyx_string_tab[225]
#define __pyx_kp_u_Do_not_call_Field_s_constructor __pyx_string_tab[226]
#define __pyx_kp_u_Do_not_call_MemoryManager_s_cons __pyx_string_tab[227]
#define __pyx_kp_u_Do_not_call_Schema_s_constructor __pyx_string_tab[228]
#define __pyx_kp_u_Do_not_call_SparseCOOTensor_s_co __pyx_string_tab[229]
#define __pyx_kp_u_Do_not_call_SparseCSCMatrix_s_co __pyx_string_tab[230]
#define __pyx_kp_u_Do_not_call_SparseCSFTensor_s_co __pyx_string_tab[231]
#define __pyx_kp_u_Do_not_call_SparseCSRMatrix_s_co __pyx_string_tab[232]
#define __pyx_kp_u_Do_not_call_Tensor_s_constructor __pyx_string_tab[233]
#define __pyx_kp_u_Drop_one_or_more_columns_and_re __pyx_string_tab[234]
#define __pyx_kp_u_Duplicate_key_use_pass_all_items __pyx_string_tab[235]
#define __pyx_kp_u_DurationType_unit___get___line_1 __pyx_string_tab[236]
#define __pyx_kp_u_Each_element_of_dim_names_must_b __pyx_string_tab[237]
#define __pyx_kp_u_Encountered_key __pyx_string_tab[238]
#define __pyx_kp_u_End_of_Arrow_stream __pyx_string_tab[239]
#define __pyx_kp_u_Expected_1_dimensional_array_for __pyx_string_tab[240]
#define __pyx_kp_u_Expected_1_dimensional_array_for_2 __pyx_string_tab[241]
#define __pyx_kp_u_Expected_1_dimensional_array_for_3 __pyx_string_tab[242]
#define __pyx_kp_u_Expected_1_dimensional_array_for_4 __pyx_string_tab[243]
#define __pyx_kp_u_Expected_2_dimensional_array_for __pyx_string_tab[244]
#define __pyx_kp_u_Expected_Array_got __pyx_string_tab[245]
#define __pyx_kp_u_Expected_Schema_got __pyx_string_tab[246]
#define __pyx_kp_u_Expected_a_list_of_1_dimensional __pyx_string_tab[247]
#define __pyx_kp_u_Expected_a_list_of_1_dimensional_2 __pyx_string_tab[248]
#define __pyx_kp_u_Expected_a_non_empty_ndarray __pyx_string_tab[249]
#define __pyx_kp_u_Expected_a_pointer_value_got __pyx_string_tab[250]
#define __pyx_kp_u_Expected_an_object_implementing __pyx_string_tab[251]
#define __pyx_kp_u_Expected_an_object_implementing_2 __pyx_string_tab[252]
#define __pyx_kp_u_Expected_array_or_chunked_array __pyx_string_tab[253]
#define __pyx_kp_u_Expected_file_path_but __pyx_string_tab[254]
#define __pyx_kp_u_Expected_int_index_got_type __pyx_string_tab[255]
#define __pyx_kp_u_Expected_integer __pyx_string_tab[256]
#define __pyx_kp_u_Expected_integer_or_string_index __pyx_string_tab[257]
#define __pyx_kp_u_Expected_list_of __pyx_string_tab[258]
#define __pyx_kp_u_Expected_list_or_tuple_got __pyx_string_tab[259]
#define __pyx_kp_u_Expected_pandas_DataFrame_or_lis __pyx_string_tab[260]
#define __pyx_kp_u_Expected_pandas_DataFrame_python __pyx_string_tab[261]
#define __pyx_kp_u_Expected_scipy_sparse_coo_array __pyx_string_tab[262]
#define __pyx_kp_u_Expected_scipy_sparse_csc_array __pyx_string_tab[263]
#define __pyx_kp_u_Expected_scipy_sparse_csr_array __pyx_string_tab[264]
#define __pyx_kp_u_Expected_sparse_COO_got __pyx_string_tab[265]
#define __pyx_kp_u_Failed_to_allocate __pyx_string_tab[266]
#define __pyx_kp_u_Field __pyx_string_tab[267]
#define __pyx_kp_u_Field_equals_line_2497 __pyx_string_tab[268]
#define __pyx_kp_u_Field_flatten_line_2761 __pyx_string_tab[269]
#define __pyx_kp_u_Field_metadata___get___line_2572 __pyx_string_tab[270]
#define __pyx_kp_u_Field_name___get___line_2558 __pyx_string_tab[271]
#define __pyx_kp_u_Field_nullable___get___line_2541 __pyx_string_tab[272]
#define __pyx_kp_u_Field_remove_metadata_line_2629 __pyx_string_tab[273]
#define __pyx_kp_u_Field_with_metadata_line_2595 __pyx_string_tab[274]
#define __pyx_kp_u_Field_with_name_line_2690 __pyx_string_tab[275]
#define __pyx_kp_u_Field_with_nullable_line_2722 __pyx_string_tab[276]
#define __pyx_kp_u_Field_with_type_line_2655 __pyx_string_tab[277]
#define __pyx_kp_u_File_object_is_malformed_has_no __pyx_string_tab[278]
#define __pyx_kp_u_Find_the_first_index_of_a_value __pyx_string_tab[279]
#define __pyx_kp_u_First_stride_needs_to_be_largest __pyx_string_tab[280]
#define __pyx_kp_u_FixedShapeTensorArray_from_numpy_2 __pyx_string_tab[281]
#define __pyx_kp_u_FixedSizeListArray_from_arrays_l __pyx_string_tab[282]
#define __pyx_kp_u_FixedSizeListArray_values___get __pyx_string_tab[283]
#define __pyx_kp_u_FixedSizeListType_list_size___ge __pyx_string_tab[284]
#define __pyx_kp_u_FixedSizeListType_value_field __pyx_string_tab[285]
#define __pyx_kp_u_FixedSizeListType_value_type___g __pyx_string_tab[286]
#define __pyx_kp_u_Flatten_this_ChunkedArray_If_it __pyx_string_tab[287]
#define __pyx_kp_u_Flatten_this_ChunkedArray_into __pyx_string_tab[288]
#define __pyx_kp_u_Flatten_this_Table_Each_column __pyx_string_tab[289]
#define __pyx_kp_u_Flatten_this_field_If_a_struct __pyx_string_tab[290]
#define __pyx_kp_u_For_now_ignoring_the_specified __pyx_string_tab[291]
#define __pyx_kp_u_IO_thread_count_must_be_strictly __pyx_string_tab[292]
#define __pyx_kp_u_IPC_read_statistics_Parameters_n __pyx_string_tab[293]
#define __pyx_kp_u_IPC_write_statistics_Parameters __pyx_string_tab[294]
#define __pyx_kp_u_I_O_operation_on_closed_file __pyx_string_tab[295]
#define __pyx_kp_u_If_True_the_number_of_expected __pyx_string_tab[296]
#define __pyx_kp_u_Implemented_only_for_data_on_CPU __pyx_string_tab[297]
#define __pyx_kp_u_Implemented_only_for_data_on_CPU_2 __pyx_string_tab[298]
#define __pyx_kp_u_Incompatible_storage_type __pyx_string_tab[299]
#define __pyx_kp_u_Incompatible_storage_type_for __pyx_string_tab[300]
#define __pyx_kp_u_Index_must_either_be_string_or_i __pyx_string_tab[301]
#define __pyx_kp_u_Indices_must_be_integer_type __pyx_string_tab[302]
#define __pyx_kp_u_Invalid_file_mode __pyx_string_tab[303]
#define __pyx_kp_u_Invalid_promote_options __pyx_string_tab[304]
#define __pyx_kp_u_Invalid_time_unit __pyx_string_tab[305]
#define __pyx_kp_u_Invalid_time_unit_for_time32 __pyx_string_tab[306]
#define __pyx_kp_u_Invalid_time_unit_for_time64 __pyx_string_tab[307]
#define __pyx_kp_u_Invalid_union_mode __pyx_string_tab[308]
#define __pyx_kp_u_Invalid_value_for_compression __pyx_string_tab[309]
#define __pyx_kp_u_Invalid_value_for_maps_as_pydict __pyx_string_tab[310]
#define __pyx_kp_u_Invalid_value_for_maps_as_pydict_2 __pyx_string_tab[311]
#define __pyx_kp_u_Invalid_value_of_whence __pyx_string_tab[312]
#define __pyx_kp_u_Is_this_tensor_contiguous_in_me __pyx_string_tab[313]
#define __pyx_kp_u_Is_this_tensor_mutable_or_immut __pyx_string_tab[314]
#define __pyx_kp_u_Iterable_should_contain_Array_ob __pyx_string_tab[315]
#define __pyx_kp_u_Iterator_over_all_columns_in_th __pyx_string_tab[316]
#define __pyx_kp_u_LargeListArray_values___get___li __pyx_string_tab[317]
#define __pyx_kp_u_LargeListType_value_type___get __pyx_string_tab[318]
#define __pyx_kp_u_LargeListViewArray_from_arrays_l __pyx_string_tab[319]
#define __pyx_kp_u_LargeListViewArray_offsets___get __pyx_string_tab[320]
#define __pyx_kp_u_LargeListViewArray_sizes___get __pyx_string_tab[321]
#define __pyx_kp_u_LargeListViewArray_values___get __pyx_string_tab[322]
#define __pyx_kp_u_LargeListViewType_value_field __pyx_string_tab[323]
#define __pyx_kp_u_LargeListViewType_value_type___g __pyx_string_tab[324]
#define __pyx_kp_u_LargeListView_requires_DataType __pyx_string_tab[325]
#define __pyx_kp_u_Length_must_be_non_negative __pyx_string_tab[326]
#define __pyx_kp_u_Length_of_names __pyx_string_tab[327]
#define __pyx_kp_u_Less_than_one_byte __pyx_string_tab[328]
#define __pyx_kp_u_ListArray_from_arrays_line_2678 __pyx_string_tab[329]
#define __pyx_kp_u_ListArray_offsets___get___line_2 __pyx_string_tab[330]
#define __pyx_kp_u_ListArray_values___get___line_27 __pyx_string_tab[331]
#define __pyx_kp_u_ListType_value_field___get___lin __pyx_string_tab[332]
#define __pyx_kp_u_ListType_value_type___get___line __pyx_string_tab[333]
#define __pyx_kp_u_ListViewArray_from_arrays_line_3 __pyx_string_tab[334]
#define __pyx_kp_u_ListViewArray_offsets___get___li __pyx_string_tab[335]
#define __pyx_kp_u_ListViewArray_sizes___get___line __pyx_string_tab[336]
#define __pyx_kp_u_ListViewArray_values___get___lin __pyx_string_tab[337]
#define __pyx_kp_u_ListViewType_value_field___get __pyx_string_tab[338]
#define __pyx_kp_u_ListViewType_value_type___get __pyx_string_tab[339]
#define __pyx_kp_u_ListView_requires_DataType_or_Fi __pyx_string_tab[340]
#define __pyx_kp_u_List_of_all_columns_in_numerica __pyx_string_tab[341]
#define __pyx_kp_u_List_requires_DataType_or_Field __pyx_string_tab[342]
#define __pyx_kp_u_Lists_all_fields_within_the_Str __pyx_string_tab[343]
#define __pyx_kp_u_Lists_the_field_names_Examples __pyx_string_tab[344]
#define __pyx_kp_u_Make_a_new_table_by_combining_t __pyx_string_tab[345]
#define __pyx_kp_u_MapArray_from_arrays_line_3453 __pyx_string_tab[346]
#define __pyx_kp_u_MapType_item_field___get___line __pyx_string_tab[347]
#define __pyx_kp_u_MapType_item_type___get___line_7 __pyx_string_tab[348]
#define __pyx_kp_u_MapType_key_field___get___line_7 __pyx_string_tab[349]
#define __pyx_kp_u_MapType_key_type___get___line_76 __pyx_string_tab[350]
#define __pyx_kp_u_MapType_keys_sorted___get___line __pyx_string_tab[351]
#define __pyx_kp_u_Map_key_field_should_be_non_null __pyx_string_tab[352]
#define __pyx_kp_u_Mask_is_a_different_length_from __pyx_string_tab[353]
#define __pyx_kp_u_Mask_must_be_1D_array __pyx_string_tab[354]
#define __pyx_kp_u_Mask_must_be_a_numpy_array_when __pyx_string_tab[355]
#define __pyx_kp_u_Mask_must_be_a_pyarrow_Array_of __pyx_string_tab[356]
#define __pyx_kp_u_Mask_must_be_boolean_dtype __pyx_string_tab[357]
#define __pyx_kp_u_Mask_must_not_contain_nulls __pyx_string_tab[358]
#define __pyx_kp_u_Must_pass_a_DictionaryType_insta __pyx_string_tab[359]
#define __pyx_kp_u_Must_pass_decompressed_size __pyx_string_tab[360]
#define __pyx_kp_u_Must_pass_either_fields_or_type __pyx_string_tab[361]
#define __pyx_kp_u_Must_pass_either_names_or_fields __pyx_string_tab[362]
#define __pyx_kp_u_Must_pass_either_names_or_fields_2 __pyx_string_tab[363]
#define __pyx_kp_u_Must_pass_names_or_schema_when_c __pyx_string_tab[364]
#define __pyx_kp_u_Must_pass_schema_or_at_least_one __pyx_string_tab[365]
#define __pyx_kp_u_Names_of_the_Table_or_RecordBat __pyx_string_tab[366]
#define __pyx_kp_u_Names_of_this_tensor_dimensions __pyx_string_tab[367]
#define __pyx_kp_u_Nanosecond_duration __pyx_string_tab[368]
#define __pyx_kp_u_Nanosecond_resolution_temporal_t __pyx_string_tab[369]
#define __pyx_kp_u_No_type_alias_for __pyx_string_tab[370]
#define __pyx_kp_u_Non_fixed_width_type __pyx_string_tab[371]
#define __pyx_kp_u_None __pyx_string_tab[372]
#define __pyx_kp_u_Not_a_metadata_version __pyx_string_tab[373]
#define __pyx_kp_u_Not_an_ArrowSchema_object __pyx_string_tab[374]
#define __pyx_kp_u_Not_an_alignment __pyx_string_tab[375]
#define __pyx_kp_u_Note_that_Cython_is_deliberately __pyx_string_tab[376]
#define __pyx_kp_u_Null_pointer_value_before_cast __pyx_string_tab[377]
#define __pyx_kp_u_Number_of_columns_Returns_int_E __pyx_string_tab[378]
#define __pyx_kp_u_Number_of_columns_in_this_table __pyx_string_tab[379]
#define __pyx_kp_u_Number_of_data_buffers_required __pyx_string_tab[380]
#define __pyx_kp_u_Number_of_null_entries_Returns __pyx_string_tab[381]
#define __pyx_kp_u_Number_of_rows_Due_to_the_defin __pyx_string_tab[382]
#define __pyx_kp_u_Number_of_rows_in_this_table_Du __pyx_string_tab[383]
#define __pyx_kp_u_Number_of_underlying_chunks_Ret __pyx_string_tab[384]
#define __pyx_kp_u_Offset_must_be_non_negative __pyx_string_tab[385]
#define __pyx_kp_u_Only_extension_types_can_be_regi __pyx_string_tab[386]
#define __pyx_kp_u_Only_stream_None_is_supported __pyx_string_tab[387]
#define __pyx_kp_u_Open_memory_map_at_file_path_Si __pyx_string_tab[388]
#define __pyx_kp_u_Operation_on_closed_reader __pyx_string_tab[389]
#define __pyx_kp_u_Operation_on_closed_writer __pyx_string_tab[390]
#define __pyx_kp_u_PandasConvertible_to_pandas_lin __pyx_string_tab[391]
#define __pyx_kp_u_Passing_a_pointer_value_as_a_flo __pyx_string_tab[392]
#define __pyx_kp_u_Perform_a_join_between_this_tab __pyx_string_tab[393]
#define __pyx_kp_u_Perform_an_aggregation_over_the __pyx_string_tab[394]
#define __pyx_kp_u_Perform_an_asof_join_between_th __pyx_string_tab[395]
#define __pyx_kp_u_Property_compression_must_be_Non __pyx_string_tab[396]
#define __pyx_kp_u_Provide_an_empty_table_accordin __pyx_string_tab[397]
#define __pyx_kp_u_Received_unsupported_keyword_arg __pyx_string_tab[398]
#define __pyx_kp_u_RecordBatch_add_column_line_2836 __pyx_string_tab[399]
#define __pyx_kp_u_RecordBatch_cast_line_3301 __pyx_string_tab[400]
#define __pyx_kp_u_RecordBatch_equals_line_3198 __pyx_string_tab[401]
#define __pyx_kp_u_RecordBatch_from_arrays_line_346 __pyx_string_tab[402]
#define __pyx_kp_u_RecordBatch_from_pandas_line_336 __pyx_string_tab[403]
#define __pyx_kp_u_RecordBatch_from_struct_array_li __pyx_string_tab[404]
#define __pyx_kp_u_RecordBatch_get_total_buffer_siz_2 __pyx_string_tab[405]
#define __pyx_kp_u_RecordBatch_nbytes___get___line __pyx_string_tab[406]
#define __pyx_kp_u_RecordBatch_num_columns___get __pyx_string_tab[407]
#define __pyx_kp_u_RecordBatch_num_rows___get___lin __pyx_string_tab[408]
#define __pyx_kp_u_RecordBatch_remove_column_line_2 __pyx_string_tab[409]
#define __pyx_kp_u_RecordBatch_rename_columns_line __pyx_string_tab[410]
#define __pyx_kp_u_RecordBatch_replace_schema_metad_2 __pyx_string_tab[411]
#define __pyx_kp_u_RecordBatch_schema___get___line __pyx_string_tab[412]
#define __pyx_kp_u_RecordBatch_select_line_3247 __pyx_string_tab[413]
#define __pyx_kp_u_RecordBatch_serialize_line_3092 __pyx_string_tab[414]
#define __pyx_kp_u_RecordBatch_set_column_line_2951 __pyx_string_tab[415]
#define __pyx_kp_u_RecordBatch_slice_line_3141 __pyx_string_tab[416]
#define __pyx_kp_u_RecordBatch_to_tensor_line_3612 __pyx_string_tab[417]
#define __pyx_kp_u_RecordBatch_with_its_custom_meta __pyx_string_tab[418]
#define __pyx_kp_u_Register_a_Python_extension_typ __pyx_string_tab[419]
#define __pyx_kp_u_Remove_missing_values_from_a_ch __pyx_string_tab[420]
#define __pyx_kp_u_Remove_rows_that_contain_missin __pyx_string_tab[421]
#define __pyx_kp_u_Remove_the_field_at_index_i_fro __pyx_string_tab[422]
#define __pyx_kp_u_Render_a_pretty_printed_string __pyx_string_tab[423]
#define __pyx_kp_u_Replace_a_field_at_position_i_i __pyx_string_tab[424]
#define __pyx_kp_u_Replace_column_in_RecordBatch_a __pyx_string_tab[425]
#define __pyx_kp_u_Replace_column_in_Table_at_posi __pyx_string_tab[426]
#define __pyx_kp_u_Replace_each_null_element_in_va __pyx_string_tab[427]
#define __pyx_kp_u_Return_a_NumPy_copy_of_this_arr __pyx_string_tab[428]
#define __pyx_kp_u_Return_a_child_field_by_its_num __pyx_string_tab[429]
#define __pyx_kp_u_Return_array_of_same_length_as __pyx_string_tab[430]
#define __pyx_kp_u_Return_boolean_array_indicating __pyx_string_tab[431]
#define __pyx_kp_u_Return_boolean_array_indicating_2 __pyx_string_tab[432]
#define __pyx_kp_u_Return_boolean_array_indicating_3 __pyx_string_tab[433]
#define __pyx_kp_u_Return_data_type_of_a_ChunkedAr __pyx_string_tab[434]
#define __pyx_kp_u_Return_deserialized_from_JSON_p __pyx_string_tab[435]
#define __pyx_kp_u_Return_index_of_the_unique_fiel __pyx_string_tab[436]
#define __pyx_kp_u_Return_index_of_the_unique_fiel_2 __pyx_string_tab[437]
#define __pyx_kp_u_Return_integers_array_with_valu __pyx_string_tab[438]
#define __pyx_kp_u_Return_length_of_a_ChunkedArray __pyx_string_tab[439]
#define __pyx_kp_u_Return_sorted_list_of_indices_f __pyx_string_tab[440]
#define __pyx_kp_u_Return_sorted_list_of_indices_f_2 __pyx_string_tab[441]
#define __pyx_kp_u_Return_the_equivalent_NumPy_Pan __pyx_string_tab[442]
#define __pyx_kp_u_Return_the_list_offsets_as_an_i __pyx_string_tab[443]
#define __pyx_kp_u_Return_the_list_offsets_as_an_i_2 __pyx_string_tab[444]
#define __pyx_kp_u_Return_the_list_sizes_as_an_int __pyx_string_tab[445]
#define __pyx_kp_u_Return_the_list_view_offsets_as __pyx_string_tab[446]
#define __pyx_kp_u_Return_the_list_view_sizes_as_a __pyx_string_tab[447]
#define __pyx_kp_u_Return_the_process_global_memor __pyx_string_tab[448]
#define __pyx_kp_u_Return_the_underlying_array_of __pyx_string_tab[449]
#define __pyx_kp_u_Return_the_underlying_array_of_2 __pyx_string_tab[450]
#define __pyx_kp_u_Return_the_underlying_array_of_3 __pyx_string_tab[451]
#define __pyx_kp_u_Return_the_underlying_array_of_4 __pyx_string_tab[452]
#define __pyx_kp_u_Return_the_underlying_array_of_5 __pyx_string_tab[453]
#define __pyx_kp_u_Return_true_if_the_tensors_cont __pyx_string_tab[454]
#define __pyx_kp_u_Return_true_if_type_is_equivale __pyx_string_tab[455]
#define __pyx_kp_u_Return_whether_the_contents_of __pyx_string_tab[456]
#define __pyx_kp_u_Returns_implied_schema_from_dat __pyx_string_tab[457]
#define __pyx_kp_u_Returns_the_name_of_the_i_th_te __pyx_string_tab[458]
#define __pyx_kp_u_RunEndEncodedType_expects_None_a __pyx_string_tab[459]
#define __pyx_kp_u_RunEndEncodedType_s_expected_nul __pyx_string_tab[460]
#define __pyx_kp_u_RunEndEncodedType_s_expected_num __pyx_string_tab[461]
#define __pyx_kp_u_RunEndEncodedType_s_expected_num_2 __pyx_string_tab[462]
#define __pyx_kp_u_Scalar_data_type_was_NULL __pyx_string_tab[463]
#define __pyx_kp_u_Scalar_type_not_supported __pyx_string_tab[464]
#define __pyx_kp_u_Scalar_was_NULL __pyx_string_tab[465]
#define __pyx_kp_u_Schema_and_number_of_arrays_uneq __pyx_string_tab[466]
#define __pyx_kp_u_Schema_append_line_3309 __pyx_string_tab[467]
#define __pyx_kp_u_Schema_empty_table_line_3044 __pyx_string_tab[468]
#define __pyx_kp_u_Schema_equals_line_3072 __pyx_string_tab[469]
#define __pyx_kp_u_Schema_field_line_3157 __pyx_string_tab[470]
#define __pyx_kp_u_Schema_field_name_corresponds_to __pyx_string_tab[471]
#define __pyx_kp_u_Schema_from_pandas_line_3111 __pyx_string_tab[472]
#define __pyx_kp_u_Schema_get_all_field_indices_lin __pyx_string_tab[473]
#define __pyx_kp_u_Schema_get_field_index_line_3241 __pyx_string_tab[474]
#define __pyx_kp_u_Schema_insert_line_3348 __pyx_string_tab[475]
#define __pyx_kp_u_Schema_metadata___get___line_301 __pyx_string_tab[476]
#define __pyx_kp_u_Schema_must_be_an_instance_of_py __pyx_string_tab[477]
#define __pyx_kp_u_Schema_names___get___line_2959 __pyx_string_tab[478]
#define __pyx_kp_u_Schema_of_the_RecordBatch_and_i __pyx_string_tab[479]
#define __pyx_kp_u_Schema_of_the_table_and_its_col __pyx_string_tab[480]
#define __pyx_kp_u_Schema_pandas_metadata___get___l __pyx_string_tab[481]
#define __pyx_kp_u_Schema_passed_to_names_option_pl __pyx_string_tab[482]
#define __pyx_kp_u_Schema_remove_line_3386 __pyx_string_tab[483]
#define __pyx_kp_u_Schema_remove_metadata_line_3537 __pyx_string_tab[484]
#define __pyx_kp_u_Schema_serialize_line_3503 __pyx_string_tab[485]
#define __pyx_kp_u_Schema_set_line_3417 __pyx_string_tab[486]
#define __pyx_kp_u_Schema_types___get___line_2987 __pyx_string_tab[487]
#define __pyx_kp_u_Schema_with_metadata_line_3467 __pyx_string_tab[488]
#define __pyx_kp_u_Select_a_chunk_by_its_index_Par __pyx_string_tab[489]
#define __pyx_kp_u_Select_a_field_by_its_column_na __pyx_string_tab[490]
#define __pyx_kp_u_Select_a_field_by_its_column_na_2 __pyx_string_tab[491]
#define __pyx_kp_u_Select_a_schema_field_by_its_co __pyx_string_tab[492]
#define __pyx_kp_u_Select_columns_of_the_RecordBat __pyx_string_tab[493]
#define __pyx_kp_u_Select_columns_of_the_Table_Ret __pyx_string_tab[494]
#define __pyx_kp_u_Select_rows_from_a_Table_or_Rec __pyx_string_tab[495]
#define __pyx_kp_u_Select_rows_from_the_table_or_r __pyx_string_tab[496]
#define __pyx_kp_u_Select_single_column_from_Table __pyx_string_tab[497]
#define __pyx_kp_u_Select_values_from_the_chunked __pyx_string_tab[498]
#define __pyx_kp_u_Select_values_from_the_chunked_2 __pyx_string_tab[499]
#define __pyx_kp_u_Should_specify_one_of_list_size __pyx_string_tab[500]
#define __pyx_kp_u_Should_the_entries_be_sorted_ac __pyx_string_tab[501]
#define __pyx_kp_u_Sort_the_Table_or_RecordBatch_b __pyx_string_tab[502]
#define __pyx_kp_u_SparseCOOTensor_was_NULL __pyx_string_tab[503]
#define __pyx_kp_u_SparseCSCMatrix_was_NULL __pyx_string_tab[504]
#define __pyx_kp_u_SparseCSFTensor_was_NULL __pyx_string_tab[505]
#define __pyx_kp_u_SparseCSRMatrix_was_NULL __pyx_string_tab[506]
#define __pyx_kp_u_Strides_of_this_tensor_Examples __pyx_string_tab[507]
#define __pyx_kp_u_StringBuilder_only_accepts_strin __pyx_string_tab[508]
#define __pyx_kp_u_StringViewBuilder_only_accepts_s __pyx_string_tab[509]
#define __pyx_kp_u_StructType_field_line_979 __pyx_string_tab[510]
#define __pyx_kp_u_StructType_fields___get___line_1 __pyx_string_tab[511]
#define __pyx_kp_u_StructType_get_all_field_indices_2 __pyx_string_tab[512]
#define __pyx_kp_u_StructType_get_field_index_line __pyx_string_tab[513]
#define __pyx_kp_u_StructType_names___get___line_10 __pyx_string_tab[514]
#define __pyx_kp_u_Struct_field_name_corresponds_to __pyx_string_tab[515]
#define __pyx_kp_u_TableGroupBy_aggregate_line_6512 __pyx_string_tab[516]
#define __pyx_kp_u_Table_add_column_line_5338 __pyx_string_tab[517]
#define __pyx_kp_u_Table_cast_line_4670 __pyx_string_tab[518]
#define __pyx_kp_u_Table_combine_chunks_line_4511 __pyx_string_tab[519]
#define __pyx_kp_u_Table_equals_line_4621 __pyx_string_tab[520]
#define __pyx_kp_u_Table_flatten_line_4445 __pyx_string_tab[521]
#define __pyx_kp_u_Table_from_arrays_line_4813 __pyx_string_tab[522]
#define __pyx_kp_u_Table_from_batches_line_4972 __pyx_string_tab[523]
#define __pyx_kp_u_Table_from_pandas_line_4733 __pyx_string_tab[524]
#define __pyx_kp_u_Table_from_struct_array_line_491 __pyx_string_tab[525]
#define __pyx_kp_u_Table_get_total_buffer_size_line __pyx_string_tab[526]
#define __pyx_kp_u_Table_group_by_line_5597 __pyx_string_tab[527]
#define __pyx_kp_u_Table_join_asof_line_5775 __pyx_string_tab[528]
#define __pyx_kp_u_Table_join_line_5640 __pyx_string_tab[529]
#define __pyx_kp_u_Table_nbytes___get___line_5272 __pyx_string_tab[530]
#define __pyx_kp_u_Table_num_columns___get___line_5 __pyx_string_tab[531]
#define __pyx_kp_u_Table_num_rows___get___line_5248 __pyx_string_tab[532]
#define __pyx_kp_u_Table_remove_column_line_5412 __pyx_string_tab[533]
#define __pyx_kp_u_Table_rename_columns_line_5505 __pyx_string_tab[534]
#define __pyx_kp_u_Table_replace_schema_metadata_li __pyx_string_tab[535]
#define __pyx_kp_u_Table_schema___get___line_5184 __pyx_string_tab[536]
#define __pyx_kp_u_Table_select_line_4331 __pyx_string_tab[537]
#define __pyx_kp_u_Table_set_column_line_5446 __pyx_string_tab[538]
#define __pyx_kp_u_Table_slice_line_4266 __pyx_string_tab[539]
#define __pyx_kp_u_Table_to_batches_line_5045 __pyx_string_tab[540]
#define __pyx_kp_u_Table_to_reader_line_5115 __pyx_string_tab[541]
#define __pyx_kp_u_Table_unify_dictionaries_line_45 __pyx_string_tab[542]
#define __pyx_kp_u_Tabular_append_column_line_2456 __pyx_string_tab[543]
#define __pyx_kp_u_Tabular_column_line_1747 __pyx_string_tab[544]
#define __pyx_kp_u_Tabular_column_names___get___li __pyx_string_tab[545]
#define __pyx_kp_u_Tabular_columns___get___line_18 __pyx_string_tab[546]
#define __pyx_kp_u_Tabular_drop_columns_line_2389 __pyx_string_tab[547]
#define __pyx_kp_u_Tabular_drop_null_line_1859 __pyx_string_tab[548]
#define __pyx_kp_u_Tabular_field_line_1894 __pyx_string_tab[549]
#define __pyx_kp_u_Tabular_filter_line_2202 __pyx_string_tab[550]
#define __pyx_kp_u_Tabular_from_pydict_line_1923 __pyx_string_tab[551]
#define __pyx_kp_u_Tabular_from_pylist_line_1990 __pyx_string_tab[552]
#define __pyx_kp_u_Tabular_itercolumns_line_2054 __pyx_string_tab[553]
#define __pyx_kp_u_Tabular_shape___get___line_2088 __pyx_string_tab[554]
#define __pyx_kp_u_Tabular_sort_by_line_2112 __pyx_string_tab[555]
#define __pyx_kp_u_Tabular_take_line_2163 __pyx_string_tab[556]
#define __pyx_kp_u_Tabular_to_pydict_line_2275 __pyx_string_tab[557]
#define __pyx_kp_u_Tabular_to_pylist_line_2315 __pyx_string_tab[558]
#define __pyx_kp_u_Target_schema_s_field_names_are __pyx_string_tab[559]
#define __pyx_kp_u_Target_schema_s_field_names_are_2 __pyx_string_tab[560]
#define __pyx_kp_u_Tensor_dim_name_line_148 __pyx_string_tab[561]
#define __pyx_kp_u_Tensor_dim_names___get___line_17 __pyx_string_tab[562]
#define __pyx_kp_u_Tensor_equals_line_118 __pyx_string_tab[563]
#define __pyx_kp_u_Tensor_from_numpy_line_61 __pyx_string_tab[564]
#define __pyx_kp_u_Tensor_is_contiguous___get___lin __pyx_string_tab[565]
#define __pyx_kp_u_Tensor_is_mutable___get___line_1 __pyx_string_tab[566]
#define __pyx_kp_u_Tensor_ndim___get___line_218 __pyx_string_tab[567]
#define __pyx_kp_u_Tensor_shape___get___line_250 __pyx_string_tab[568]
#define __pyx_kp_u_Tensor_size___get___line_234 __pyx_string_tab[569]
#define __pyx_kp_u_Tensor_strides___get___line_267 __pyx_string_tab[570]
#define __pyx_kp_u_Tensor_to_numpy_line_96 __pyx_string_tab[571]
#define __pyx_kp_u_Tensor_was_NULL __pyx_string_tab[572]
#define __pyx_kp_u_Test_if_this_field_is_equal_to __pyx_string_tab[573]
#define __pyx_kp_u_Test_if_this_schema_is_equal_to __pyx_string_tab[574]
#define __pyx_kp_u_The_Array_passed_as_dictionary_m __pyx_string_tab[575]
#define __pyx_kp_u_The_Scalar_value_passed_as_index __pyx_string_tab[576]
#define __pyx_kp_u_The_add_metadata_method_is_depre __pyx_string_tab[577]
#define __pyx_kp_u_The_column_must_be_allocated_on __pyx_string_tab[578]
#define __pyx_kp_u_The_data_type_of_dictionary_ind __pyx_string_tab[579]
#define __pyx_kp_u_The_data_type_of_items_in_the_m __pyx_string_tab[580]
#define __pyx_kp_u_The_data_type_of_keys_in_the_ma __pyx_string_tab[581]
#define __pyx_kp_u_The_data_type_of_large_list_val __pyx_string_tab[582]
#define __pyx_kp_u_The_data_type_of_large_list_val_2 __pyx_string_tab[583]
#define __pyx_kp_u_The_data_type_of_large_list_vie __pyx_string_tab[584]
#define __pyx_kp_u_The_data_type_of_list_values_Ex __pyx_string_tab[585]
#define __pyx_kp_u_The_data_type_of_list_view_valu __pyx_string_tab[586]
#define __pyx_kp_u_The_decimal_precision_in_number __pyx_string_tab[587]
#define __pyx_kp_u_The_decimal_precision_in_number_2 __pyx_string_tab[588]
#define __pyx_kp_u_The_decimal_precision_in_number_3 __pyx_string_tab[589]
#define __pyx_kp_u_The_decimal_precision_in_number_4 __pyx_string_tab[590]
#define __pyx_kp_u_The_decimal_scale_an_integer_Ex __pyx_string_tab[591]
#define __pyx_kp_u_The_decimal_scale_an_integer_Ex_2 __pyx_string_tab[592]
#define __pyx_kp_u_The_decimal_scale_an_integer_Ex_3 __pyx_string_tab[593]
#define __pyx_kp_u_The_decimal_scale_an_integer_Ex_4 __pyx_string_tab[594]
#define __pyx_kp_u_The_dictionary_index_type_should __pyx_string_tab[595]
#define __pyx_kp_u_The_dictionary_value_type_The_d __pyx_string_tab[596]
#define __pyx_kp_u_The_dimension_n_of_this_tensor __pyx_string_tab[597]
#define __pyx_kp_u_The_dtype_of_the_categories_of_t __pyx_string_tab[598]
#define __pyx_kp_u_The_duration_unit_s_ms_us_or_ns __pyx_string_tab[599]
#define __pyx_kp_u_The_field_by_name_method_is_depr __pyx_string_tab[600]
#define __pyx_kp_u_The_field_for_items_in_the_map __pyx_string_tab[601]
#define __pyx_kp_u_The_field_for_keys_in_the_map_e __pyx_string_tab[602]
#define __pyx_kp_u_The_field_for_large_list_view_v __pyx_string_tab[603]
#define __pyx_kp_u_The_field_for_list_values_Examp __pyx_string_tab[604]
#define __pyx_kp_u_The_field_for_list_values_Examp_2 __pyx_string_tab[605]
#define __pyx_kp_u_The_field_for_list_view_values __pyx_string_tab[606]
#define __pyx_kp_u_The_field_metadata_if_any_is_se __pyx_string_tab[607]
#define __pyx_kp_u_The_field_name_Examples_import __pyx_string_tab[608]
#define __pyx_kp_u_The_field_nullability_Examples __pyx_string_tab[609]
#define __pyx_kp_u_The_length_of_dim_names __pyx_string_tab[610]
#define __pyx_kp_u_The_mode_of_the_union_dense_or __pyx_string_tab[611]
#define __pyx_kp_u_The_names_and_metadata_arguments __pyx_string_tab[612]
#define __pyx_kp_u_The_names_and_metadata_arguments_2 __pyx_string_tab[613]
#define __pyx_kp_u_The_names_argument_is_not_valid __pyx_string_tab[614]
#define __pyx_kp_u_The_number_of_child_fields_Exam __pyx_string_tab[615]
#define __pyx_kp_u_The_object_s___arrow_array___met __pyx_string_tab[616]
#define __pyx_kp_u_The_ordered_flag_of_the_passed_c __pyx_string_tab[617]
#define __pyx_kp_u_The_passed_mapping_doesn_t_conta __pyx_string_tab[618]
#define __pyx_kp_u_The_run_end_type_should_be_int16 __pyx_string_tab[619]
#define __pyx_kp_u_The_schema_s_field_names_Return __pyx_string_tab[620]
#define __pyx_kp_u_The_schema_s_field_types_Return __pyx_string_tab[621]
#define __pyx_kp_u_The_schema_s_metadata_if_any_is __pyx_string_tab[622]
#define __pyx_kp_u_The_shape_of_this_tensor_Exampl __pyx_string_tab[623]
#define __pyx_kp_u_The_size_of_the_fixed_size_list __pyx_string_tab[624]
#define __pyx_kp_u_The_size_of_this_tensor_Example __pyx_string_tab[625]
#define __pyx_kp_u_The_sum_of_bytes_in_each_buffer __pyx_string_tab[626]
#define __pyx_kp_u_The_sum_of_bytes_in_each_buffer_2 __pyx_string_tab[627]
#define __pyx_kp_u_The_sum_of_bytes_in_each_buffer_3 __pyx_string_tab[628]
#define __pyx_kp_u_The_time_unit_s_or_ms_Examples __pyx_string_tab[629]
#define __pyx_kp_u_The_time_unit_us_or_ns_Examples __pyx_string_tab[630]
#define __pyx_kp_u_The_timestamp_time_zone_if_any __pyx_string_tab[631]
#define __pyx_kp_u_The_timestamp_unit_s_ms_us_or_n __pyx_string_tab[632]
#define __pyx_kp_u_The_type_code_to_indicate_each __pyx_string_tab[633]
#define __pyx_kp_u_This_object_s_internal_pointer_i __pyx_string_tab[634]
#define __pyx_kp_u_Time32Type_unit___get___line_132 __pyx_string_tab[635]
#define __pyx_kp_u_Time64Type_unit___get___line_135 __pyx_string_tab[636]
#define __pyx_kp_u_TimestampType_tz___get___line_12 __pyx_string_tab[637]
#define __pyx_kp_u_TimestampType_unit___get___line __pyx_string_tab[638]
#define __pyx_kp_u_Total_number_of_bytes_consumed __pyx_string_tab[639]
#define __pyx_kp_u_Total_number_of_bytes_consumed_2 __pyx_string_tab[640]
#define __pyx_kp_u_Total_number_of_bytes_consumed_3 __pyx_string_tab[641]
#define __pyx_kp_u_Trying_to_import_data_on_a_CUDA __pyx_string_tab[642]
#define __pyx_kp_u_Type_s_expected_number_of_buffer __pyx_string_tab[643]
#define __pyx_kp_u_Type_s_expected_number_of_buffer_2 __pyx_string_tab[644]
#define __pyx_kp_u_Type_s_expected_number_of_childr __pyx_string_tab[645]
#define __pyx_kp_u_Unable_to_avoid_a_copy_while_cre __pyx_string_tab[646]
#define __pyx_kp_u_Unable_to_avoid_a_copy_while_cre_2 __pyx_string_tab[647]
#define __pyx_kp_u_Unable_to_avoid_a_copy_while_cre_3 __pyx_string_tab[648]
#define __pyx_kp_u_Unable_to_read_message_from_obje __pyx_string_tab[649]
#define __pyx_kp_u_Unable_to_wrap_Datum_in_a_Python __pyx_string_tab[650]
#define __pyx_kp_u_Unable_to_write_to_object_of_typ __pyx_string_tab[651]
#define __pyx_kp_u_Unify_dictionaries_across_all_c __pyx_string_tab[652]
#define __pyx_kp_u_Unify_dictionaries_across_all_c_2 __pyx_string_tab[653]
#define __pyx_kp_u_UnionArray_does_not_have_child __pyx_string_tab[654]
#define __pyx_kp_u_UnionType_field_line_1169 __pyx_string_tab[655]
#define __pyx_kp_u_UnionType_mode___get___line_1121 __pyx_string_tab[656]
#define __pyx_kp_u_UnionType_type_codes___get___lin __pyx_string_tab[657]
#define __pyx_kp_u_Unnest_this_Large_ListArray_Lar __pyx_string_tab[658]
#define __pyx_kp_u_Unregister_a_Python_extension_t __pyx_string_tab[659]
#define __pyx_kp_u_Whether_the_dictionary_is_order __pyx_string_tab[660]
#define __pyx_kp_u_Wrapping_scalar_of_type __pyx_string_tab[661]
#define __pyx_kp_u_Writable_buffer_requested_but_Ar __pyx_string_tab[662]
#define __pyx_kp_u_Write_RecordBatch_to_Buffer_as __pyx_string_tab[663]
#define __pyx_kp_u_Write_Schema_to_Buffer_as_encap __pyx_string_tab[664]
#define __pyx_kp_u_Y_m_dT_H_M_S_z __pyx_string_tab[665]
#define __pyx_kp_u__10 __pyx_string_tab[666]
#define __pyx_kp_u__11 __pyx_string_tab[667]
#define __pyx_kp_u__12 __pyx_string_tab[668]
#define __pyx_kp_u__13 __pyx_string_tab[669]
#define __pyx_kp_u__14 __pyx_string_tab[670]
#define __pyx_kp_u__15 __pyx_string_tab[671]
#define __pyx_kp_u__16 __pyx_string_tab[672]
#define __pyx_kp_u__17 __pyx_string_tab[673]
#define __pyx_kp_u__18 __pyx_string_tab[674]
#define __pyx_kp_u__2 __pyx_string_tab[675]
#define __pyx_kp_u__21 __pyx_string_tab[676]
#define __pyx_kp_u__22 __pyx_string_tab[677]
#define __pyx_kp_u__27 __pyx_string_tab[678]
#define __pyx_kp_u__4 __pyx_string_tab[679]
#define __pyx_kp_u__5 __pyx_string_tab[680]
#define __pyx_kp_u__7 __pyx_string_tab[681]
#define __pyx_kp_u__8 __pyx_string_tab[682]
#define __pyx_kp_u__9 __pyx_string_tab[683]
#define __pyx_kp_u_add_note __pyx_string_tab[684]
#define __pyx_kp_u_address __pyx_string_tab[685]
#define __pyx_kp_u_always_results_in_a_copy_If_usi __pyx_string_tab[686]
#define __pyx_kp_u_and __pyx_string_tab[687]
#define __pyx_kp_u_array_line_129 __pyx_string_tab[688]
#define __pyx_kp_u_arrow_ArrayStatistics_null_count __pyx_string_tab[689]
#define __pyx_kp_u_backend_name __pyx_string_tab[690]
#define __pyx_kp_u_binary_file_expected_got_text_fi __pyx_string_tab[691]
#define __pyx_kp_u_binary_line_4784 __pyx_string_tab[692]
#define __pyx_kp_u_binary_view_line_4921 __pyx_string_tab[693]
#define __pyx_kp_u_body_length __pyx_string_tab[694]
#define __pyx_kp_u_bool8_line_5660 __pyx_string_tab[695]
#define __pyx_kp_u_bool__line_3880 __pyx_string_tab[696]
#define __pyx_kp_u_but_expected __pyx_string_tab[697]
#define __pyx_kp_u_but_the_passed_number_is __pyx_string_tab[698]
#define __pyx_kp_u_bytes_2 __pyx_string_tab[699]
#define __pyx_kp_u_bytes_allocated __pyx_string_tab[700]
#define __pyx_kp_u_bz2 __pyx_string_tab[701]
#define __pyx_kp_u_cannot_specify_type_when_creatin __pyx_string_tab[702]
#define __pyx_kp_u_child_is_deprecated_use_field __pyx_string_tab[703]
#define __pyx_kp_u_chunked_array_line_1475 __pyx_string_tab[704]
#define __pyx_kp_u_closed __pyx_string_tab[705]
#define __pyx_kp_u_compression_2 __pyx_string_tab[706]
#define __pyx_kp_u_compression_level_2 __pyx_string_tab[707]
#define __pyx_kp_u_concat_arrays_line_4970 __pyx_string_tab[708]
#define __pyx_kp_u_concat_batches_line_6327 __pyx_string_tab[709]
#define __pyx_kp_u_concat_tables_line_6247 __pyx_string_tab[710]
#define __pyx_kp_u_could_not_infer_open_mode_for_fi __pyx_string_tab[711]
#define __pyx_kp_u_create_memory_map_line_1152 __pyx_string_tab[712]
#define __pyx_kp_u_date32_day __pyx_string_tab[713]
#define __pyx_kp_u_date32_line_4408 __pyx_string_tab[714]
#define __pyx_kp_u_date64_line_4429 __pyx_string_tab[715]
#define __pyx_kp_u_date64_ms __pyx_string_tab[716]
#define __pyx_kp_u_datetime64_ms __pyx_string_tab[717]
#define __pyx_kp_u_datetime64_ns __pyx_string_tab[718]
#define __pyx_kp_u_datetime64_s __pyx_string_tab[719]
#define __pyx_kp_u_datetime64_us __pyx_string_tab[720]
#define __pyx_kp_u_decimal128_line_4648 __pyx_string_tab[721]
#define __pyx_kp_u_decimal32_line_4538 __pyx_string_tab[722]
#define __pyx_kp_u_decimal64_line_4593 __pyx_string_tab[723]
#define __pyx_kp_u_default_memory_pool_line_146 __pyx_string_tab[724]
#define __pyx_kp_u_dictionary_line_5225 __pyx_string_tab[725]
#define __pyx_kp_u_did_not_match_the_passed_number __pyx_string_tab[726]
#define __pyx_kp_u_dim_names_must_be_a_tuple_or_lis __pyx_string_tab[727]
#define __pyx_kp_u_disable __pyx_string_tab[728]
#define __pyx_kp_u_distinct_count __pyx_string_tab[729]
#define __pyx_kp_u_does_not_exist_in_schema __pyx_string_tab[730]
#define __pyx_kp_u_does_not_exist_in_schema_2 __pyx_string_tab[731]
#define __pyx_kp_u_does_not_match_length_of_arrays __pyx_string_tab[732]
#define __pyx_kp_u_does_not_match_the_specified_ty __pyx_string_tab[733]
#define __pyx_kp_u_does_not_matchthe_number_of_ten __pyx_string_tab[734]
#define __pyx_kp_u_duration_line_4337 __pyx_string_tab[735]
#define __pyx_kp_u_duration_ms __pyx_string_tab[736]
#define __pyx_kp_u_duration_ns __pyx_string_tab[737]
#define __pyx_kp_u_duration_s __pyx_string_tab[738]
#define __pyx_kp_u_duration_us __pyx_string_tab[739]
#define __pyx_kp_u_emit_dictionary_deltas_2 __pyx_string_tab[740]
#define __pyx_kp_u_enable __pyx_string_tab[741]
#define __pyx_kp_u_ensure_alignment_2 __pyx_string_tab[742]
#define __pyx_kp_u_exists __pyx_string_tab[743]
#define __pyx_kp_u_expected __pyx_string_tab[744]
#define __pyx_kp_u_field_line_3761 __pyx_string_tab[745]
#define __pyx_kp_u_field_or_tuple_expected_got_None __pyx_string_tab[746]
#define __pyx_kp_u_fixed_shape_tensor_line_5559 __pyx_string_tab[747]
#define __pyx_kp_u_float16_line_4450 __pyx_string_tab[748]
#define __pyx_kp_u_float32_line_4484 __pyx_string_tab[749]
#define __pyx_kp_u_float64_line_4511 __pyx_string_tab[750]
#define __pyx_kp_u_for_extension_type __pyx_string_tab[751]
#define __pyx_kp_u_from__functions_instead __pyx_string_tab[752]
#define __pyx_kp_u_from_numpy_dtype_line_5948 __pyx_string_tab[753]
#define __pyx_kp_u_gc __pyx_string_tab[754]
#define __pyx_kp_u_got __pyx_string_tab[755]
#define __pyx_kp_u_got_null_buffer __pyx_string_tab[756]
#define __pyx_kp_u_gz __pyx_string_tab[757]
#define __pyx_kp_u_included_fields_2 __pyx_string_tab[758]
#define __pyx_kp_u_incompatible_with_bool8_storage __pyx_string_tab[759]
#define __pyx_kp_u_index_out_of_bounds __pyx_string_tab[760]
#define __pyx_kp_u_input_stream_line_2738 __pyx_string_tab[761]
#define __pyx_kp_u_instead __pyx_string_tab[762]
#define __pyx_kp_u_int16_line_3984 __pyx_string_tab[763]
#define __pyx_kp_u_int32_line_4038 __pyx_string_tab[764]
#define __pyx_kp_u_int64_line_4092 __pyx_string_tab[765]
#define __pyx_kp_u_int8_line_3930 __pyx_string_tab[766]
#define __pyx_kp_u_is_a_directory __pyx_string_tab[767]
#define __pyx_kp_u_is_cpu_2 __pyx_string_tab[768]
#define __pyx_kp_u_is_installed __pyx_string_tab[769]
#define __pyx_kp_u_is_installed_Therefore_pandas_s __pyx_string_tab[770]
#define __pyx_kp_u_is_max_exact __pyx_string_tab[771]
#define __pyx_kp_u_is_min_exact __pyx_string_tab[772]
#define __pyx_kp_u_is_mutable __pyx_string_tab[773]
#define __pyx_kp_u_is_not_safely_convertible_to_mi __pyx_string_tab[774]
#define __pyx_kp_u_is_not_safely_convertible_to_mi_2 __pyx_string_tab[775]
#define __pyx_kp_u_is_readable __pyx_string_tab[776]
#define __pyx_kp_u_is_seekable __pyx_string_tab[777]
#define __pyx_kp_u_is_writable __pyx_string_tab[778]
#define __pyx_kp_u_isenabled __pyx_string_tab[779]
#define __pyx_kp_u_json__line_5506 __pyx_string_tab[780]
#define __pyx_kp_u_large_binary_line_4836 __pyx_string_tab[781]
#define __pyx_kp_u_large_list_line_5017 __pyx_string_tab[782]
#define __pyx_kp_u_large_list_view_line_5112 __pyx_string_tab[783]
#define __pyx_kp_u_large_string_line_4864 __pyx_string_tab[784]
#define __pyx_kp_u_large_utf8_line_4894 __pyx_string_tab[785]
#define __pyx_kp_u_left_outer __pyx_string_tab[786]
#define __pyx_kp_u_list__line_4951 __pyx_string_tab[787]
#define __pyx_kp_u_list_size_should_be_a_positive_i __pyx_string_tab[788]
#define __pyx_kp_u_list_view_line_5074 __pyx_string_tab[789]
#define __pyx_kp_u_lz4 __pyx_string_tab[790]
#define __pyx_kp_u_map__line_5150 __pyx_string_tab[791]
#define __pyx_kp_u_mask_not_implemented_with_Arrow __pyx_string_tab[792]
#define __pyx_kp_u_max __pyx_string_tab[793]
#define __pyx_kp_u_max_chunksize_should_be_strictl __pyx_string_tab[794]
#define __pyx_kp_u_max_memory __pyx_string_tab[795]
#define __pyx_kp_u_memory_map_line_1111 __pyx_string_tab[796]
#define __pyx_kp_u_metadata_length __pyx_string_tab[797]
#define __pyx_kp_u_metadata_version_2 __pyx_string_tab[798]
#define __pyx_kp_u_min __pyx_string_tab[799]
#define __pyx_kp_u_month_day_nano_interval_line_438 __pyx_string_tab[800]
#define __pyx_kp_u_name_4 __pyx_string_tab[801]
#define __pyx_kp_u_names_must_be_a_list_or_dict_not __pyx_string_tab[802]
#define __pyx_kp_u_no_default___reduce___due_to_non __pyx_string_tab[803]
#define __pyx_kp_u_not_found __pyx_string_tab[804]
#define __pyx_kp_u_not_supported_for_buffer_protoc __pyx_string_tab[805]
#define __pyx_kp_u_np_arrays_for_SparseCSFTensor_i __pyx_string_tab[806]
#define __pyx_kp_u_np_arrays_for_SparseCSFTensor_i_2 __pyx_string_tab[807]
#define __pyx_kp_u_null_line_3858 __pyx_string_tab[808]
#define __pyx_kp_u_nulls_line_408 __pyx_string_tab[809]
#define __pyx_kp_u_only_slices_with_step_1_supporte __pyx_string_tab[810]
#define __pyx_kp_u_only_valid_on_readable_files __pyx_string_tab[811]
#define __pyx_kp_u_only_valid_on_seekable_files __pyx_string_tab[812]
#define __pyx_kp_u_only_valid_on_writable_files __pyx_string_tab[813]
#define __pyx_kp_u_opaque_line_5703 __pyx_string_tab[814]
#define __pyx_kp_u_out_of_range __pyx_string_tab[815]
#define __pyx_kp_u_output_stream_line_2824 __pyx_string_tab[816]
#define __pyx_kp_u_own_file __pyx_string_tab[817]
#define __pyx_kp_u_pa_input_stream_called_with_inst __pyx_string_tab[818]
#define __pyx_kp_u_pa_output_stream_called_with_ins __pyx_string_tab[819]
#define __pyx_kp_u_please_pass_it_explicitly __pyx_string_tab[820]
#define __pyx_kp_u_precision_should_be_between_1_an __pyx_string_tab[821]
#define __pyx_kp_u_precision_should_be_between_1_an_2 __pyx_string_tab[822]
#define __pyx_kp_u_precision_should_be_between_1_an_3 __pyx_string_tab[823]
#define __pyx_kp_u_precision_should_be_between_1_an_4 __pyx_string_tab[824]
#define __pyx_kp_u_promote_has_been_superseded_by_p __pyx_string_tab[825]
#define __pyx_kp_u_pyarrow __pyx_string_tab[826]
#define __pyx_kp_u_pyarrow_2 __pyx_string_tab[827]
#define __pyx_kp_u_pyarrow_Device __pyx_string_tab[828]
#define __pyx_kp_u_pyarrow_Field __pyx_string_tab[829]
#define __pyx_kp_u_pyarrow_MemoryManager_device __pyx_string_tab[830]
#define __pyx_kp_u_pyarrow_Message_type __pyx_string_tab[831]
#define __pyx_kp_u_pyarrow_Message_uninitialized __pyx_string_tab[832]
#define __pyx_kp_u_pyarrow_SparseCOOTensor_type_se __pyx_string_tab[833]
#define __pyx_kp_u_pyarrow_SparseCSCMatrix_type __pyx_string_tab[834]
#define __pyx_kp_u_pyarrow_SparseCSFTensor_type __pyx_string_tab[835]
#define __pyx_kp_u_pyarrow_SparseCSRMatrix_type __pyx_string_tab[836]
#define __pyx_kp_u_pyarrow_Tensor_type __pyx_string_tab[837]
#define __pyx_kp_u_pyarrow_array_pxi __pyx_string_tab[838]
#define __pyx_kp_u_pyarrow_benchmark_pxi __pyx_string_tab[839]
#define __pyx_kp_u_pyarrow_builder_pxi __pyx_string_tab[840]
#define __pyx_kp_u_pyarrow_compat_pxi __pyx_string_tab[841]
#define __pyx_kp_u_pyarrow_config_pxi __pyx_string_tab[842]
#define __pyx_kp_u_pyarrow_device_pxi __pyx_string_tab[843]
#define __pyx_kp_u_pyarrow_error_pxi __pyx_string_tab[844]
#define __pyx_kp_u_pyarrow_io_pxi __pyx_string_tab[845]
#define __pyx_kp_u_pyarrow_ipc_IpcReadOptions_ensu __pyx_string_tab[846]
#define __pyx_kp_u_pyarrow_ipc_IpcWriteOptions_all __pyx_string_tab[847]
#define __pyx_kp_u_pyarrow_ipc_pxi __pyx_string_tab[848]
#define __pyx_kp_u_pyarrow_lib __pyx_string_tab[849]
#define __pyx_kp_u_pyarrow_lib_pyx __pyx_string_tab[850]
#define __pyx_kp_u_pyarrow_memory_pxi __pyx_string_tab[851]
#define __pyx_kp_u_pyarrow_pandas_shim_pxi __pyx_string_tab[852]
#define __pyx_kp_u_pyarrow_requires_pandas_1_0_0_or __pyx_string_tab[853]
#define __pyx_kp_u_pyarrow_scalar_pxi __pyx_string_tab[854]
#define __pyx_kp_u_pyarrow_table_pxi __pyx_string_tab[855]
#define __pyx_kp_u_pyarrow_tensor_pxi __pyx_string_tab[856]
#define __pyx_kp_u_pyarrow_types_pxi __pyx_string_tab[857]
#define __pyx_kp_u_pyarrow_unknown __pyx_string_tab[858]
#define __pyx_kp_u_r_2 __pyx_string_tab[859]
#define __pyx_kp_u_r_b __pyx_string_tab[860]
#define __pyx_kp_u_rb __pyx_string_tab[861]
#define __pyx_kp_u_readable_file_expected __pyx_string_tab[862]
#define __pyx_kp_u_record_batch_line_5908 __pyx_string_tab[863]
#define __pyx_kp_u_register_extension_type_line_216 __pyx_string_tab[864]
#define __pyx_kp_u_repeat_line_458 __pyx_string_tab[865]
#define __pyx_kp_u_s_constructor_directly __pyx_string_tab[866]
#define __pyx_kp_u_s_constructor_directly_use_one __pyx_string_tab[867]
#define __pyx_kp_u_s_constructor_directly_use_one_2 __pyx_string_tab[868]
#define __pyx_kp_u_s_constructor_directly_use_one_3 __pyx_string_tab[869]
#define __pyx_kp_u_s_constructor_directly_use_pa_s __pyx_string_tab[870]
#define __pyx_kp_u_s_constructor_directly_use_publ __pyx_string_tab[871]
#define __pyx_kp_u_s_constructor_directly_use_pyar __pyx_string_tab[872]
#define __pyx_kp_u_s_constructor_directly_use_pyar_2 __pyx_string_tab[873]
#define __pyx_kp_u_s_constructor_directly_use_pyar_3 __pyx_string_tab[874]
#define __pyx_kp_u_s_constructor_directly_use_pyar_4 __pyx_string_tab[875]
#define __pyx_kp_u_s_constructor_directly_use_pyar_5 __pyx_string_tab[876]
#define __pyx_kp_u_scalar_line_1601 __pyx_string_tab[877]
#define __pyx_kp_u_schema_line_5855 __pyx_string_tab[878]
#define __pyx_kp_u_self_c_options_cannot_be_convert __pyx_string_tab[879]
#define __pyx_kp_u_self_device_cannot_be_converted __pyx_string_tab[880]
#define __pyx_kp_u_self_logging_pool_self_pool_cann __pyx_string_tab[881]
#define __pyx_kp_u_self_memory_manager_cannot_be_co __pyx_string_tab[882]
#define __pyx_kp_u_self_pool_cannot_be_converted_to __pyx_string_tab[883]
#define __pyx_kp_u_self_pool_self_proxy_pool_cannot __pyx_string_tab[884]
#define __pyx_kp_u_self_reader_cannot_be_converted __pyx_string_tab[885]
#define __pyx_kp_u_self_sp_sparse_tensor_self_stp_c __pyx_string_tab[886]
#define __pyx_kp_u_self_sp_statistics_cannot_be_con __pyx_string_tab[887]
#define __pyx_kp_u_self_sp_tensor_self_tp_cannot_be __pyx_string_tab[888]
#define __pyx_kp_u_self_stop_token_cannot_be_conver __pyx_string_tab[889]
#define __pyx_kp_u_self_wrapped_cannot_be_converted __pyx_string_tab[890]
#define __pyx_kp_u_self_writer_cannot_be_converted __pyx_string_tab[891]
#define __pyx_kp_u_shape_2 __pyx_string_tab[892]
#define __pyx_kp_u_size_2 __pyx_string_tab[893]
#define __pyx_kp_u_strides_2 __pyx_string_tab[894]
#define __pyx_kp_u_string_line_4734 __pyx_string_tab[895]
#define __pyx_kp_u_string_view_line_4936 __pyx_string_tab[896]
#define __pyx_kp_u_struct_line_5284 __pyx_string_tab[897]
#define __pyx_kp_u_table_line_6085 __pyx_string_tab[898]
#define __pyx_kp_u_time32_line_4251 __pyx_string_tab[899]
#define __pyx_kp_u_time32_ms __pyx_string_tab[900]
#define __pyx_kp_u_time32_s __pyx_string_tab[901]
#define __pyx_kp_u_time64_line_4294 __pyx_string_tab[902]
#define __pyx_kp_u_time64_ns __pyx_string_tab[903]
#define __pyx_kp_u_time64_us __pyx_string_tab[904]
#define __pyx_kp_u_timedelta64_ms __pyx_string_tab[905]
#define __pyx_kp_u_timedelta64_ns __pyx_string_tab[906]
#define __pyx_kp_u_timedelta64_s __pyx_string_tab[907]
#define __pyx_kp_u_timedelta64_us __pyx_string_tab[908]
#define __pyx_kp_u_times_in_schema __pyx_string_tab[909]
#define __pyx_kp_u_timestamp_line_4192 __pyx_string_tab[910]
#define __pyx_kp_u_timestamp_ms __pyx_string_tab[911]
#define __pyx_kp_u_timestamp_ns __pyx_string_tab[912]
#define __pyx_kp_u_timestamp_s __pyx_string_tab[913]
#define __pyx_kp_u_timestamp_us __pyx_string_tab[914]
#define __pyx_kp_u_to_pointer_address __pyx_string_tab[915]
#define __pyx_kp_u_to_requested_schema __pyx_string_tab[916]
#define __pyx_kp_u_to_requested_type __pyx_string_tab[917]
#define __pyx_kp_u_tree_fragment __pyx_string_tab[918]
#define __pyx_kp_u_type_2 __pyx_string_tab[919]
#define __pyx_kp_u_type_codes_should_have_the_same __pyx_string_tab[920]
#define __pyx_kp_u_uint16_line_3957 __pyx_string_tab[921]
#define __pyx_kp_u_uint32_line_4011 __pyx_string_tab[922]
#define __pyx_kp_u_uint64_line_4065 __pyx_string_tab[923]
#define __pyx_kp_u_uint8_line_3903 __pyx_string_tab[924]
#define __pyx_kp_u_unify_dictionaries_2 __pyx_string_tab[925]
#define __pyx_kp_u_unregister_extension_type_line_2 __pyx_string_tab[926]
#define __pyx_kp_u_use_legacy_format_2 __pyx_string_tab[927]
#define __pyx_kp_u_use_threads_3 __pyx_string_tab[928]
#define __pyx_kp_u_use_threads_4 __pyx_string_tab[929]
#define __pyx_kp_u_utf8_line_4759 __pyx_string_tab[930]
#define __pyx_kp_u_utf_8 __pyx_string_tab[931]
#define __pyx_kp_u_vs __pyx_string_tab[932]
#define __pyx_kp_u_which_was_already_encountered __pyx_string_tab[933]
#define __pyx_kp_u_with_null_values_to_non_nullabl __pyx_string_tab[934]
#define __pyx_kp_u_writable_file_expected __pyx_string_tab[935]
#define __pyx_kp_u_zero_copy_only_must_be_False_for __pyx_string_tab[936]
#define __pyx_kp_u_zst __pyx_string_tab[937]
#define __pyx_n_u_Alignment __pyx_string_tab[938]
#define __pyx_n_u_Any __pyx_string_tab[939]
#define __pyx_n_u_Array __pyx_string_tab[940]
#define __pyx_n_u_ArrayStatistics __pyx_string_tab[941]
#define __pyx_n_u_ArrayStatistics___reduce_cython __pyx_string_tab[942]
#define __pyx_n_u_ArrayStatistics___setstate_cytho __pyx_string_tab[943]
#define __pyx_n_u_Array___array __pyx_string_tab[944]
#define __pyx_n_u_Array___arrow_c_array __pyx_string_tab[945]
#define __pyx_n_u_Array___arrow_c_device_array __pyx_string_tab[946]
#define __pyx_n_u_Array___dlpack __pyx_string_tab[947]
#define __pyx_n_u_Array___dlpack_device __pyx_string_tab[948]
#define __pyx_n_u_Array___iter __pyx_string_tab[949]
#define __pyx_n_u_Array___reduce __pyx_string_tab[950]
#define __pyx_n_u_Array___sizeof __pyx_string_tab[951]
#define __pyx_n_u_Array__debug_print __pyx_string_tab[952]
#define __pyx_n_u_Array__export_to_c __pyx_string_tab[953]
#define __pyx_n_u_Array__export_to_c_device __pyx_string_tab[954]
#define __pyx_n_u_Array__import_from_c __pyx_string_tab[955]
#define __pyx_n_u_Array__import_from_c_capsule __pyx_string_tab[956]
#define __pyx_n_u_Array__import_from_c_device __pyx_string_tab[957]
#define __pyx_n_u_Array__import_from_c_device_caps __pyx_string_tab[958]
#define __pyx_n_u_Array__to_pandas __pyx_string_tab[959]
#define __pyx_n_u_Array_buffers __pyx_string_tab[960]
#define __pyx_n_u_Array_cast __pyx_string_tab[961]
#define __pyx_n_u_Array_copy_to __pyx_string_tab[962]
#define __pyx_n_u_Array_dictionary_encode __pyx_string_tab[963]
#define __pyx_n_u_Array_diff __pyx_string_tab[964]
#define __pyx_n_u_Array_drop_null __pyx_string_tab[965]
#define __pyx_n_u_Array_equals __pyx_string_tab[966]
#define __pyx_n_u_Array_fill_null __pyx_string_tab[967]
#define __pyx_n_u_Array_filter __pyx_string_tab[968]
#define __pyx_n_u_Array_from_buffers __pyx_string_tab[969]
#define __pyx_n_u_Array_from_pandas __pyx_string_tab[970]
#define __pyx_n_u_Array_get_total_buffer_size __pyx_string_tab[971]
#define __pyx_n_u_Array_index __pyx_string_tab[972]
#define __pyx_n_u_Array_is_nan __pyx_string_tab[973]
#define __pyx_n_u_Array_is_null __pyx_string_tab[974]
#define __pyx_n_u_Array_is_valid __pyx_string_tab[975]
#define __pyx_n_u_Array_slice __pyx_string_tab[976]
#define __pyx_n_u_Array_sort __pyx_string_tab[977]
#define __pyx_n_u_Array_sum __pyx_string_tab[978]
#define __pyx_n_u_Array_take __pyx_string_tab[979]
#define __pyx_n_u_Array_to_numpy __pyx_string_tab[980]
#define __pyx_n_u_Array_to_pylist __pyx_string_tab[981]
#define __pyx_n_u_Array_to_string __pyx_string_tab[982]
#define __pyx_n_u_Array_tolist __pyx_string_tab[983]
#define __pyx_n_u_Array_unique __pyx_string_tab[984]
#define __pyx_n_u_Array_validate __pyx_string_tab[985]
#define __pyx_n_u_Array_value_counts __pyx_string_tab[986]
#define __pyx_n_u_Array_view __pyx_string_tab[987]
#define __pyx_n_u_ArrowCancelled __pyx_string_tab[988]
#define __pyx_n_u_ArrowCancelled___init __pyx_string_tab[989]
#define __pyx_n_u_ArrowCapacityError __pyx_string_tab[990]
#define __pyx_n_u_ArrowException __pyx_string_tab[991]
#define __pyx_n_u_ArrowIOError __pyx_string_tab[992]
#define __pyx_n_u_ArrowIndexError __pyx_string_tab[993]
#define __pyx_n_u_ArrowInvalid __pyx_string_tab[994]
#define __pyx_n_u_ArrowKeyError __pyx_string_tab[995]
#define __pyx_n_u_ArrowKeyError___str __pyx_string_tab[996]
#define __pyx_n_u_ArrowMemoryError __pyx_string_tab[997]
#define __pyx_n_u_ArrowNotImplementedError __pyx_string_tab[998]
#define __pyx_n_u_ArrowSerializationError __pyx_string_tab[999]
#define __pyx_n_u_ArrowTypeError __pyx_string_tab[1000]
#define __pyx_n_u_At64Byte __pyx_string_tab[1001]
#define __pyx_n_u_BROTLI __pyx_string_tab[1002]
#define __pyx_n_u_BZ2 __pyx_string_tab[1003]
#define __pyx_n_u_BaseExtensionType __pyx_string_tab[1004]
#define __pyx_n_u_BaseExtensionType___arrow_ext_cl __pyx_string_tab[1005]
#define __pyx_n_u_BaseExtensionType___arrow_ext_sc __pyx_string_tab[1006]
#define __pyx_n_u_BaseExtensionType_wrap_array __pyx_string_tab[1007]
#define __pyx_n_u_BaseListArray __pyx_string_tab[1008]
#define __pyx_n_u_BaseListArray_flatten __pyx_string_tab[1009]
#define __pyx_n_u_BaseListArray_value_lengths __pyx_string_tab[1010]
#define __pyx_n_u_BaseListArray_value_parent_indic __pyx_string_tab[1011]
#define __pyx_n_u_BinaryArray __pyx_string_tab[1012]
#define __pyx_n_u_BinaryScalar __pyx_string_tab[1013]
#define __pyx_n_u_BinaryScalar___bytes __pyx_string_tab[1014]
#define __pyx_n_u_BinaryScalar_as_buffer __pyx_string_tab[1015]
#define __pyx_n_u_BinaryScalar_as_py __pyx_string_tab[1016]
#define __pyx_n_u_BinaryViewArray __pyx_string_tab[1017]
#define __pyx_n_u_BinaryViewScalar __pyx_string_tab[1018]
#define __pyx_n_u_Bool8Array __pyx_string_tab[1019]
#define __pyx_n_u_Bool8Array_from_numpy __pyx_string_tab[1020]
#define __pyx_n_u_Bool8Array_from_storage __pyx_string_tab[1021]
#define __pyx_n_u_Bool8Array_to_numpy __pyx_string_tab[1022]
#define __pyx_n_u_Bool8Scalar __pyx_string_tab[1023]
#define __pyx_n_u_Bool8Scalar_as_py __pyx_string_tab[1024]
#define __pyx_n_u_Bool8Type __pyx_string_tab[1025]
#define __pyx_n_u_Bool8Type___arrow_ext_class __pyx_string_tab[1026]
#define __pyx_n_u_Bool8Type___arrow_ext_scalar_cla __pyx_string_tab[1027]
#define __pyx_n_u_Bool8Type___reduce __pyx_string_tab[1028]
#define __pyx_n_u_BooleanArray __pyx_string_tab[1029]
#define __pyx_n_u_BooleanScalar __pyx_string_tab[1030]
#define __pyx_n_u_BooleanScalar_as_py __pyx_string_tab[1031]
#define __pyx_n_u_Buffer __pyx_string_tab[1032]
#define __pyx_n_u_BufferOutputStream __pyx_string_tab[1033]
#define __pyx_n_u_BufferOutputStream___reduce_cyth __pyx_string_tab[1034]
#define __pyx_n_u_BufferOutputStream___setstate_cy __pyx_string_tab[1035]
#define __pyx_n_u_BufferOutputStream_getvalue __pyx_string_tab[1036]
#define __pyx_n_u_BufferReader __pyx_string_tab[1037]
#define __pyx_n_u_BufferReader___reduce_cython __pyx_string_tab[1038]
#define __pyx_n_u_BufferReader___setstate_cython __pyx_string_tab[1039]
#define __pyx_n_u_Buffer___reduce_ex __pyx_string_tab[1040]
#define __pyx_n_u_Buffer__assert_cpu __pyx_string_tab[1041]
#define __pyx_n_u_Buffer_equals __pyx_string_tab[1042]
#define __pyx_n_u_Buffer_hex __pyx_string_tab[1043]
#define __pyx_n_u_Buffer_slice __pyx_string_tab[1044]
#define __pyx_n_u_Buffer_to_pybytes __pyx_string_tab[1045]
#define __pyx_n_u_BufferedIOBase __pyx_string_tab[1046]
#define __pyx_n_u_BufferedInputStream __pyx_string_tab[1047]
#define __pyx_n_u_BufferedInputStream___reduce_cyt __pyx_string_tab[1048]
#define __pyx_n_u_BufferedInputStream___setstate_c __pyx_string_tab[1049]
#define __pyx_n_u_BufferedInputStream_detach __pyx_string_tab[1050]
#define __pyx_n_u_BufferedOutputStream __pyx_string_tab[1051]
#define __pyx_n_u_BufferedOutputStream___reduce_cy __pyx_string_tab[1052]
#define __pyx_n_u_BufferedOutputStream___setstate __pyx_string_tab[1053]
#define __pyx_n_u_BufferedOutputStream_detach __pyx_string_tab[1054]
#define __pyx_n_u_BuildInfo __pyx_string_tab[1055]
#define __pyx_n_u_C __pyx_string_tab[1056]
#define __pyx_n_u_COO __pyx_string_tab[1057]
#define __pyx_n_u_CPU __pyx_string_tab[1058]
#define __pyx_n_u_CRecordBatchWriter __pyx_string_tab[1059]
#define __pyx_n_u_CRecordBatchWriter___enter __pyx_string_tab[1060]
#define __pyx_n_u_CRecordBatchWriter___exit __pyx_string_tab[1061]
#define __pyx_n_u_CRecordBatchWriter___reduce_cyt __pyx_string_tab[1062]
#define __pyx_n_u_CRecordBatchWriter___setstate_c __pyx_string_tab[1063]
#define __pyx_n_u_CRecordBatchWriter_close __pyx_string_tab[1064]
#define __pyx_n_u_CRecordBatchWriter_write __pyx_string_tab[1065]
#define __pyx_n_u_CRecordBatchWriter_write_batch __pyx_string_tab[1066]
#define __pyx_n_u_CRecordBatchWriter_write_table __pyx_string_tab[1067]
#define __pyx_n_u_CUDA __pyx_string_tab[1068]
#define __pyx_n_u_CUDA_HOST __pyx_string_tab[1069]
#define __pyx_n_u_CUDA_MANAGED __pyx_string_tab[1070]
#define __pyx_n_u_CacheOptions __pyx_string_tab[1071]
#define __pyx_n_u_CacheOptions___reduce __pyx_string_tab[1072]
#define __pyx_n_u_CacheOptions__reconstruct __pyx_string_tab[1073]
#define __pyx_n_u_CacheOptions_from_network_metric __pyx_string_tab[1074]
#define __pyx_n_u_Categorical __pyx_string_tab[1075]
#define __pyx_n_u_ChunkedArray __pyx_string_tab[1076]
#define __pyx_n_u_ChunkedArray___array __pyx_string_tab[1077]
#define __pyx_n_u_ChunkedArray___arrow_c_stream __pyx_string_tab[1078]
#define __pyx_n_u_ChunkedArray___iter __pyx_string_tab[1079]
#define __pyx_n_u_ChunkedArray___reduce __pyx_string_tab[1080]
#define __pyx_n_u_ChunkedArray___sizeof __pyx_string_tab[1081]
#define __pyx_n_u_ChunkedArray__assert_cpu __pyx_string_tab[1082]
#define __pyx_n_u_ChunkedArray__import_from_c_caps __pyx_string_tab[1083]
#define __pyx_n_u_ChunkedArray__to_pandas __pyx_string_tab[1084]
#define __pyx_n_u_ChunkedArray_cast __pyx_string_tab[1085]
#define __pyx_n_u_ChunkedArray_chunk __pyx_string_tab[1086]
#define __pyx_n_u_ChunkedArray_combine_chunks __pyx_string_tab[1087]
#define __pyx_n_u_ChunkedArray_dictionary_encode __pyx_string_tab[1088]
#define __pyx_n_u_ChunkedArray_drop_null __pyx_string_tab[1089]
#define __pyx_n_u_ChunkedArray_equals __pyx_string_tab[1090]
#define __pyx_n_u_ChunkedArray_fill_null __pyx_string_tab[1091]
#define __pyx_n_u_ChunkedArray_filter __pyx_string_tab[1092]
#define __pyx_n_u_ChunkedArray_flatten __pyx_string_tab[1093]
#define __pyx_n_u_ChunkedArray_format __pyx_string_tab[1094]
#define __pyx_n_u_ChunkedArray_get_total_buffer_si __pyx_string_tab[1095]
#define __pyx_n_u_ChunkedArray_index __pyx_string_tab[1096]
#define __pyx_n_u_ChunkedArray_is_nan __pyx_string_tab[1097]
#define __pyx_n_u_ChunkedArray_is_null __pyx_string_tab[1098]
#define __pyx_n_u_ChunkedArray_is_valid __pyx_string_tab[1099]
#define __pyx_n_u_ChunkedArray_iterchunks __pyx_string_tab[1100]
#define __pyx_n_u_ChunkedArray_length __pyx_string_tab[1101]
#define __pyx_n_u_ChunkedArray_slice __pyx_string_tab[1102]
#define __pyx_n_u_ChunkedArray_sort __pyx_string_tab[1103]
#define __pyx_n_u_ChunkedArray_take __pyx_string_tab[1104]
#define __pyx_n_u_ChunkedArray_to_numpy __pyx_string_tab[1105]
#define __pyx_n_u_ChunkedArray_to_pylist __pyx_string_tab[1106]
#define __pyx_n_u_ChunkedArray_to_string __pyx_string_tab[1107]
#define __pyx_n_u_ChunkedArray_unify_dictionaries __pyx_string_tab[1108]
#define __pyx_n_u_ChunkedArray_unique __pyx_string_tab[1109]
#define __pyx_n_u_ChunkedArray_validate __pyx_string_tab[1110]
#define __pyx_n_u_ChunkedArray_value_counts __pyx_string_tab[1111]
#define __pyx_n_u_Codec __pyx_string_tab[1112]
#define __pyx_n_u_Codec___reduce_cython __pyx_string_tab[1113]
#define __pyx_n_u_Codec___setstate_cython __pyx_string_tab[1114]
#define __pyx_n_u_Codec_compress __pyx_string_tab[1115]
#define __pyx_n_u_Codec_decompress __pyx_string_tab[1116]
#define __pyx_n_u_Codec_default_compression_level __pyx_string_tab[1117]
#define __pyx_n_u_Codec_detect __pyx_string_tab[1118]
#define __pyx_n_u_Codec_is_available __pyx_string_tab[1119]
#define __pyx_n_u_Codec_maximum_compression_level __pyx_string_tab[1120]
#define __pyx_n_u_Codec_minimum_compression_level __pyx_string_tab[1121]
#define __pyx_n_u_Codec_supports_compression_level __pyx_string_tab[1122]
#define __pyx_n_u_CompressedInputStream __pyx_string_tab[1123]
#define __pyx_n_u_CompressedInputStream___reduce_c __pyx_string_tab[1124]
#define __pyx_n_u_CompressedInputStream___setstate __pyx_string_tab[1125]
#define __pyx_n_u_CompressedOutputStream __pyx_string_tab[1126]
#define __pyx_n_u_CompressedOutputStream___reduce __pyx_string_tab[1127]
#define __pyx_n_u_CompressedOutputStream___setstat __pyx_string_tab[1128]
#define __pyx_n_u_CppBuildInfo __pyx_string_tab[1129]
#define __pyx_n_u_DEFAULT_BUFFER_SIZE __pyx_string_tab[1130]
#define __pyx_n_u_DataFrame __pyx_string_tab[1131]
#define __pyx_n_u_DataType __pyx_string_tab[1132]
#define __pyx_n_u_DataTypeSpecific __pyx_string_tab[1133]
#define __pyx_n_u_DataType___arrow_c_schema __pyx_string_tab[1134]
#define __pyx_n_u_DataType___reduce __pyx_string_tab[1135]
#define __pyx_n_u_DataType__export_to_c __pyx_string_tab[1136]
#define __pyx_n_u_DataType__import_from_c __pyx_string_tab[1137]
#define __pyx_n_u_DataType__import_from_c_capsule __pyx_string_tab[1138]
#define __pyx_n_u_DataType_equals __pyx_string_tab[1139]
#define __pyx_n_u_DataType_field __pyx_string_tab[1140]
#define __pyx_n_u_DataType_to_pandas_dtype __pyx_string_tab[1141]
#define __pyx_n_u_Date32Array __pyx_string_tab[1142]
#define __pyx_n_u_Date32Scalar __pyx_string_tab[1143]
#define __pyx_n_u_Date32Scalar_as_py __pyx_string_tab[1144]
#define __pyx_n_u_Date64Array __pyx_string_tab[1145]
#define __pyx_n_u_Date64Scalar __pyx_string_tab[1146]
#define __pyx_n_u_Date64Scalar_as_py __pyx_string_tab[1147]
#define __pyx_n_u_DatetimeTZDtype __pyx_string_tab[1148]
#define __pyx_n_u_Decima32Array __pyx_string_tab[1149]
#define __pyx_n_u_Decimal __pyx_string_tab[1150]
#define __pyx_n_u_Decimal128Array __pyx_string_tab[1151]
#define __pyx_n_u_Decimal128Scalar __pyx_string_tab[1152]
#define __pyx_n_u_Decimal128Scalar_as_py __pyx_string_tab[1153]
#define __pyx_n_u_Decimal128Type __pyx_string_tab[1154]
#define __pyx_n_u_Decimal128Type___reduce __pyx_string_tab[1155]
#define __pyx_n_u_Decimal256Array __pyx_string_tab[1156]
#define __pyx_n_u_Decimal256Scalar __pyx_string_tab[1157]
#define __pyx_n_u_Decimal256Scalar_as_py __pyx_string_tab[1158]
#define __pyx_n_u_Decimal256Type __pyx_string_tab[1159]
#define __pyx_n_u_Decimal256Type___reduce __pyx_string_tab[1160]
#define __pyx_n_u_Decimal32Array __pyx_string_tab[1161]
#define __pyx_n_u_Decimal32Scalar __pyx_string_tab[1162]
#define __pyx_n_u_Decimal32Scalar_as_py __pyx_string_tab[1163]
#define __pyx_n_u_Decimal32Type __pyx_string_tab[1164]
#define __pyx_n_u_Decimal32Type___reduce __pyx_string_tab[1165]
#define __pyx_n_u_Decimal64Array __pyx_string_tab[1166]
#define __pyx_n_u_Decimal64Scalar __pyx_string_tab[1167]
#define __pyx_n_u_Decimal64Scalar_as_py __pyx_string_tab[1168]
#define __pyx_n_u_Decimal64Type __pyx_string_tab[1169]
#define __pyx_n_u_Decimal64Type___reduce __pyx_string_tab[1170]
#define __pyx_n_u_DenseUnionType __pyx_string_tab[1171]
#define __pyx_n_u_Device __pyx_string_tab[1172]
#define __pyx_n_u_DeviceAllocationType __pyx_string_tab[1173]
#define __pyx_n_u_Device___reduce_cython __pyx_string_tab[1174]
#define __pyx_n_u_Device___setstate_cython __pyx_string_tab[1175]
#define __pyx_n_u_DictionaryArray __pyx_string_tab[1176]
#define __pyx_n_u_DictionaryArray_dictionary_decod __pyx_string_tab[1177]
#define __pyx_n_u_DictionaryArray_dictionary_encod __pyx_string_tab[1178]
#define __pyx_n_u_DictionaryArray_from_arrays __pyx_string_tab[1179]
#define __pyx_n_u_DictionaryArray_from_buffers __pyx_string_tab[1180]
#define __pyx_n_u_DictionaryEncodeOptions __pyx_string_tab[1181]
#define __pyx_n_u_DictionaryMemo __pyx_string_tab[1182]
#define __pyx_n_u_DictionaryMemo___reduce_cython __pyx_string_tab[1183]
#define __pyx_n_u_DictionaryMemo___setstate_cython __pyx_string_tab[1184]
#define __pyx_n_u_DictionaryScalar __pyx_string_tab[1185]
#define __pyx_n_u_DictionaryScalar___reduce __pyx_string_tab[1186]
#define __pyx_n_u_DictionaryScalar__reconstruct __pyx_string_tab[1187]
#define __pyx_n_u_DictionaryScalar_as_py __pyx_string_tab[1188]
#define __pyx_n_u_DictionaryType __pyx_string_tab[1189]
#define __pyx_n_u_DictionaryType___reduce __pyx_string_tab[1190]
#define __pyx_n_u_DoubleArray __pyx_string_tab[1191]
#define __pyx_n_u_DoubleScalar __pyx_string_tab[1192]
#define __pyx_n_u_DoubleScalar_as_py __pyx_string_tab[1193]
#define __pyx_n_u_DurationArray __pyx_string_tab[1194]
#define __pyx_n_u_DurationScalar __pyx_string_tab[1195]
#define __pyx_n_u_DurationScalar_as_py __pyx_string_tab[1196]
#define __pyx_n_u_DurationType __pyx_string_tab[1197]
#define __pyx_n_u_EXT_DEV __pyx_string_tab[1198]
#define __pyx_n_u_Empty __pyx_string_tab[1199]
#define __pyx_n_u_Expression __pyx_string_tab[1200]
#define __pyx_n_u_ExtensionArray __pyx_string_tab[1201]
#define __pyx_n_u_ExtensionArray_from_storage __pyx_string_tab[1202]
#define __pyx_n_u_ExtensionDtype __pyx_string_tab[1203]
#define __pyx_n_u_ExtensionRegistryNanny __pyx_string_tab[1204]
#define __pyx_n_u_ExtensionRegistryNanny___reduce __pyx_string_tab[1205]
#define __pyx_n_u_ExtensionRegistryNanny___setsta __pyx_string_tab[1206]
#define __pyx_n_u_ExtensionRegistryNanny_release __pyx_string_tab[1207]
#define __pyx_n_u_ExtensionScalar __pyx_string_tab[1208]
#define __pyx_n_u_ExtensionScalar_as_py __pyx_string_tab[1209]
#define __pyx_n_u_ExtensionScalar_from_storage __pyx_string_tab[1210]
#define __pyx_n_u_ExtensionType __pyx_string_tab[1211]
#define __pyx_n_u_ExtensionType___arrow_ext_class __pyx_string_tab[1212]
#define __pyx_n_u_ExtensionType___arrow_ext_deseri __pyx_string_tab[1213]
#define __pyx_n_u_ExtensionType___arrow_ext_scalar __pyx_string_tab[1214]
#define __pyx_n_u_ExtensionType___arrow_ext_serial __pyx_string_tab[1215]
#define __pyx_n_u_ExtensionType___reduce __pyx_string_tab[1216]
#define __pyx_n_u_False __pyx_string_tab[1217]
#define __pyx_n_u_Field_2 __pyx_string_tab[1218]
#define __pyx_n_u_Field___arrow_c_schema __pyx_string_tab[1219]
#define __pyx_n_u_Field___reduce __pyx_string_tab[1220]
#define __pyx_n_u_Field__export_to_c __pyx_string_tab[1221]
#define __pyx_n_u_Field__import_from_c __pyx_string_tab[1222]
#define __pyx_n_u_Field__import_from_c_capsule __pyx_string_tab[1223]
#define __pyx_n_u_Field_equals __pyx_string_tab[1224]
#define __pyx_n_u_Field_flatten __pyx_string_tab[1225]
#define __pyx_n_u_Field_remove_metadata __pyx_string_tab[1226]
#define __pyx_n_u_Field_with_metadata __pyx_string_tab[1227]
#define __pyx_n_u_Field_with_name __pyx_string_tab[1228]
#define __pyx_n_u_Field_with_nullable __pyx_string_tab[1229]
#define __pyx_n_u_Field_with_type __pyx_string_tab[1230]
#define __pyx_n_u_FixedShapeTensorArray __pyx_string_tab[1231]
#define __pyx_n_u_FixedShapeTensorArray_from_numpy __pyx_string_tab[1232]
#define __pyx_n_u_FixedShapeTensorArray_to_numpy_n __pyx_string_tab[1233]
#define __pyx_n_u_FixedShapeTensorArray_to_tensor __pyx_string_tab[1234]
#define __pyx_n_u_FixedShapeTensorScalar __pyx_string_tab[1235]
#define __pyx_n_u_FixedShapeTensorScalar_to_numpy __pyx_string_tab[1236]
#define __pyx_n_u_FixedShapeTensorScalar_to_tensor __pyx_string_tab[1237]
#define __pyx_n_u_FixedShapeTensorType __pyx_string_tab[1238]
#define __pyx_n_u_FixedShapeTensorType___arrow_ext __pyx_string_tab[1239]
#define __pyx_n_u_FixedShapeTensorType___arrow_ext_2 __pyx_string_tab[1240]
#define __pyx_n_u_FixedShapeTensorType___reduce __pyx_string_tab[1241]
#define __pyx_n_u_FixedSizeBinaryArray __pyx_string_tab[1242]
#define __pyx_n_u_FixedSizeBinaryScalar __pyx_string_tab[1243]
#define __pyx_n_u_FixedSizeBinaryType __pyx_string_tab[1244]
#define __pyx_n_u_FixedSizeBinaryType___reduce __pyx_string_tab[1245]
#define __pyx_n_u_FixedSizeBufferWriter __pyx_string_tab[1246]
#define __pyx_n_u_FixedSizeBufferWriter___reduce_c __pyx_string_tab[1247]
#define __pyx_n_u_FixedSizeBufferWriter___setstate __pyx_string_tab[1248]
#define __pyx_n_u_FixedSizeBufferWriter_set_memcop __pyx_string_tab[1249]
#define __pyx_n_u_FixedSizeBufferWriter_set_memcop_2 __pyx_string_tab[1250]
#define __pyx_n_u_FixedSizeBufferWriter_set_memcop_3 __pyx_string_tab[1251]
#define __pyx_n_u_FixedSizeListArray __pyx_string_tab[1252]
#define __pyx_n_u_FixedSizeListArray_from_arrays __pyx_string_tab[1253]
#define __pyx_n_u_FixedSizeListScalar __pyx_string_tab[1254]
#define __pyx_n_u_FixedSizeListType __pyx_string_tab[1255]
#define __pyx_n_u_FixedSizeListType___reduce __pyx_string_tab[1256]
#define __pyx_n_u_FloatArray __pyx_string_tab[1257]
#define __pyx_n_u_FloatScalar __pyx_string_tab[1258]
#define __pyx_n_u_FloatScalar_as_py __pyx_string_tab[1259]
#define __pyx_n_u_FloatingPointArray __pyx_string_tab[1260]
#define __pyx_n_u_GZIP __pyx_string_tab[1261]
#define __pyx_n_u_HEXAGON __pyx_string_tab[1262]
#define __pyx_n_u_HalfFloatArray __pyx_string_tab[1263]
#define __pyx_n_u_HalfFloatScalar __pyx_string_tab[1264]
#define __pyx_n_u_HalfFloatScalar_as_py __pyx_string_tab[1265]
#define __pyx_n_u_IOBase __pyx_string_tab[1266]
#define __pyx_n_u_Index __pyx_string_tab[1267]
#define __pyx_n_u_Int16Array __pyx_string_tab[1268]
#define __pyx_n_u_Int16Scalar __pyx_string_tab[1269]
#define __pyx_n_u_Int16Scalar_as_py __pyx_string_tab[1270]
#define __pyx_n_u_Int32Array __pyx_string_tab[1271]
#define __pyx_n_u_Int32Scalar __pyx_string_tab[1272]
#define __pyx_n_u_Int32Scalar_as_py __pyx_string_tab[1273]
#define __pyx_n_u_Int64Array __pyx_string_tab[1274]
#define __pyx_n_u_Int64Scalar __pyx_string_tab[1275]
#define __pyx_n_u_Int64Scalar_as_py __pyx_string_tab[1276]
#define __pyx_n_u_Int8Array __pyx_string_tab[1277]
#define __pyx_n_u_Int8Scalar __pyx_string_tab[1278]
#define __pyx_n_u_Int8Scalar_as_py __pyx_string_tab[1279]
#define __pyx_n_u_IntEnum __pyx_string_tab[1280]
#define __pyx_n_u_IntFlag __pyx_string_tab[1281]
#define __pyx_n_u_IntegerArray __pyx_string_tab[1282]
#define __pyx_n_u_IntervalDtype __pyx_string_tab[1283]
#define __pyx_n_u_IpcReadOptions __pyx_string_tab[1284]
#define __pyx_n_u_IpcReadOptions___reduce_cython __pyx_string_tab[1285]
#define __pyx_n_u_IpcReadOptions___setstate_cython __pyx_string_tab[1286]
#define __pyx_n_u_IpcWriteOptions __pyx_string_tab[1287]
#define __pyx_n_u_IpcWriteOptions___reduce_cython __pyx_string_tab[1288]
#define __pyx_n_u_IpcWriteOptions___setstate_cytho __pyx_string_tab[1289]
#define __pyx_n_u_JsonArray __pyx_string_tab[1290]
#define __pyx_n_u_JsonScalar __pyx_string_tab[1291]
#define __pyx_n_u_JsonType __pyx_string_tab[1292]
#define __pyx_n_u_JsonType___arrow_ext_class __pyx_string_tab[1293]
#define __pyx_n_u_JsonType___arrow_ext_scalar_clas __pyx_string_tab[1294]
#define __pyx_n_u_JsonType___reduce __pyx_string_tab[1295]
#define __pyx_n_u_K __pyx_string_tab[1296]
#define __pyx_n_u_KeyValueMetadata __pyx_string_tab[1297]
#define __pyx_n_u_KeyValueMetadata___reduce __pyx_string_tab[1298]
#define __pyx_n_u_KeyValueMetadata_equals __pyx_string_tab[1299]
#define __pyx_n_u_KeyValueMetadata_get_all __pyx_string_tab[1300]
#define __pyx_n_u_KeyValueMetadata_items __pyx_string_tab[1301]
#define __pyx_n_u_KeyValueMetadata_key __pyx_string_tab[1302]
#define __pyx_n_u_KeyValueMetadata_keys __pyx_string_tab[1303]
#define __pyx_n_u_KeyValueMetadata_to_dict __pyx_string_tab[1304]
#define __pyx_n_u_KeyValueMetadata_value __pyx_string_tab[1305]
#define __pyx_n_u_KeyValueMetadata_values __pyx_string_tab[1306]
#define __pyx_n_u_LZ4 __pyx_string_tab[1307]
#define __pyx_n_u_LZ4_FRAME __pyx_string_tab[1308]
#define __pyx_n_u_LZ4_RAW __pyx_string_tab[1309]
#define __pyx_n_u_LargeBinaryArray __pyx_string_tab[1310]
#define __pyx_n_u_LargeBinaryScalar __pyx_string_tab[1311]
#define __pyx_n_u_LargeListArray __pyx_string_tab[1312]
#define __pyx_n_u_LargeListArray_from_arrays __pyx_string_tab[1313]
#define __pyx_n_u_LargeListScalar __pyx_string_tab[1314]
#define __pyx_n_u_LargeListType __pyx_string_tab[1315]
#define __pyx_n_u_LargeListType___reduce __pyx_string_tab[1316]
#define __pyx_n_u_LargeListViewArray __pyx_string_tab[1317]
#define __pyx_n_u_LargeListViewArray_from_arrays __pyx_string_tab[1318]
#define __pyx_n_u_LargeListViewScalar __pyx_string_tab[1319]
#define __pyx_n_u_LargeListViewType __pyx_string_tab[1320]
#define __pyx_n_u_LargeListViewType___reduce __pyx_string_tab[1321]
#define __pyx_n_u_LargeStringArray __pyx_string_tab[1322]
#define __pyx_n_u_LargeStringArray_from_buffers __pyx_string_tab[1323]
#define __pyx_n_u_LargeStringScalar __pyx_string_tab[1324]
#define __pyx_n_u_ListArray __pyx_string_tab[1325]
#define __pyx_n_u_ListArray_from_arrays __pyx_string_tab[1326]
#define __pyx_n_u_ListFlattenOptions __pyx_string_tab[1327]
#define __pyx_n_u_ListScalar __pyx_string_tab[1328]
#define __pyx_n_u_ListScalar_as_py __pyx_string_tab[1329]
#define __pyx_n_u_ListType __pyx_string_tab[1330]
#define __pyx_n_u_ListType___reduce __pyx_string_tab[1331]
#define __pyx_n_u_ListViewArray __pyx_string_tab[1332]
#define __pyx_n_u_ListViewArray_from_arrays __pyx_string_tab[1333]
#define __pyx_n_u_ListViewScalar __pyx_string_tab[1334]
#define __pyx_n_u_ListViewType __pyx_string_tab[1335]
#define __pyx_n_u_ListViewType___reduce __pyx_string_tab[1336]
#define __pyx_n_u_Lock __pyx_string_tab[1337]
#define __pyx_n_u_LoggingMemoryPool __pyx_string_tab[1338]
#define __pyx_n_u_LoggingMemoryPool___reduce_cytho __pyx_string_tab[1339]
#define __pyx_n_u_LoggingMemoryPool___setstate_cyt __pyx_string_tab[1340]
#define __pyx_n_u_M __pyx_string_tab[1341]
#define __pyx_n_u_METAL __pyx_string_tab[1342]
#define __pyx_n_u_MapArray __pyx_string_tab[1343]
#define __pyx_n_u_MapArray_from_arrays __pyx_string_tab[1344]
#define __pyx_n_u_MapScalar __pyx_string_tab[1345]
#define __pyx_n_u_MapScalar___iter __pyx_string_tab[1346]
#define __pyx_n_u_MapScalar_as_py __pyx_string_tab[1347]
#define __pyx_n_u_MapScalar_keys __pyx_string_tab[1348]
#define __pyx_n_u_MapType __pyx_string_tab[1349]
#define __pyx_n_u_MapType___reduce __pyx_string_tab[1350]
#define __pyx_n_u_Mapping __pyx_string_tab[1351]
#define __pyx_n_u_MaskedArray __pyx_string_tab[1352]
#define __pyx_n_u_MemoryManager __pyx_string_tab[1353]
#define __pyx_n_u_MemoryManager___reduce_cython __pyx_string_tab[1354]
#define __pyx_n_u_MemoryManager___setstate_cython __pyx_string_tab[1355]
#define __pyx_n_u_MemoryMappedFile __pyx_string_tab[1356]
#define __pyx_n_u_MemoryMappedFile___reduce_cython __pyx_string_tab[1357]
#define __pyx_n_u_MemoryMappedFile___setstate_cyth __pyx_string_tab[1358]
#define __pyx_n_u_MemoryMappedFile__open __pyx_string_tab[1359]
#define __pyx_n_u_MemoryMappedFile_create __pyx_string_tab[1360]
#define __pyx_n_u_MemoryMappedFile_fileno __pyx_string_tab[1361]
#define __pyx_n_u_MemoryMappedFile_resize __pyx_string_tab[1362]
#define __pyx_n_u_MemoryPool __pyx_string_tab[1363]
#define __pyx_n_u_MemoryPool___reduce_cython __pyx_string_tab[1364]
#define __pyx_n_u_MemoryPool___setstate_cython __pyx_string_tab[1365]
#define __pyx_n_u_MemoryPool_bytes_allocated __pyx_string_tab[1366]
#define __pyx_n_u_MemoryPool_max_memory __pyx_string_tab[1367]
#define __pyx_n_u_MemoryPool_num_allocations __pyx_string_tab[1368]
#define __pyx_n_u_MemoryPool_print_stats __pyx_string_tab[1369]
#define __pyx_n_u_MemoryPool_release_unused __pyx_string_tab[1370]
#define __pyx_n_u_MemoryPool_total_bytes_allocated __pyx_string_tab[1371]
#define __pyx_n_u_Message __pyx_string_tab[1372]
#define __pyx_n_u_MessageReader __pyx_string_tab[1373]
#define __pyx_n_u_MessageReader___reduce_cython __pyx_string_tab[1374]
#define __pyx_n_u_MessageReader___setstate_cython __pyx_string_tab[1375]
#define __pyx_n_u_MessageReader_open_stream __pyx_string_tab[1376]
#define __pyx_n_u_MessageReader_read_next_message __pyx_string_tab[1377]
#define __pyx_n_u_Message___reduce_cython __pyx_string_tab[1378]
#define __pyx_n_u_Message___setstate_cython __pyx_string_tab[1379]
#define __pyx_n_u_Message_equals __pyx_string_tab[1380]
#define __pyx_n_u_Message_serialize __pyx_string_tab[1381]
#define __pyx_n_u_Message_serialize_to __pyx_string_tab[1382]
#define __pyx_n_u_Metadata __pyx_string_tab[1383]
#define __pyx_n_u_MetadataVersion __pyx_string_tab[1384]
#define __pyx_n_u_MockOutputStream __pyx_string_tab[1385]
#define __pyx_n_u_MockOutputStream___reduce_cython __pyx_string_tab[1386]
#define __pyx_n_u_MockOutputStream___setstate_cyth __pyx_string_tab[1387]
#define __pyx_n_u_MockOutputStream_size __pyx_string_tab[1388]
#define __pyx_n_u_MonthDayNano __pyx_string_tab[1389]
#define __pyx_n_u_MonthDayNanoIntervalArray __pyx_string_tab[1390]
#define __pyx_n_u_MonthDayNanoIntervalArray_to_pyl __pyx_string_tab[1391]
#define __pyx_n_u_MonthDayNanoIntervalScalar __pyx_string_tab[1392]
#define __pyx_n_u_MonthDayNanoIntervalScalar_as_py __pyx_string_tab[1393]
#define __pyx_n_u_NA __pyx_string_tab[1394]
#define __pyx_n_u_NULL __pyx_string_tab[1395]
#define __pyx_n_u_NativeFile __pyx_string_tab[1396]
#define __pyx_n_u_NativeFile___enter __pyx_string_tab[1397]
#define __pyx_n_u_NativeFile___exit __pyx_string_tab[1398]
#define __pyx_n_u_NativeFile___reduce_cython __pyx_string_tab[1399]
#define __pyx_n_u_NativeFile___setstate_cython __pyx_string_tab[1400]
#define __pyx_n_u_NativeFile__assert_open __pyx_string_tab[1401]
#define __pyx_n_u_NativeFile__assert_readable __pyx_string_tab[1402]
#define __pyx_n_u_NativeFile__assert_seekable __pyx_string_tab[1403]
#define __pyx_n_u_NativeFile__assert_writable __pyx_string_tab[1404]
#define __pyx_n_u_NativeFile__download_nothreads __pyx_string_tab[1405]
#define __pyx_n_u_NativeFile__upload_nothreads __pyx_string_tab[1406]
#define __pyx_n_u_NativeFile_close __pyx_string_tab[1407]
#define __pyx_n_u_NativeFile_download __pyx_string_tab[1408]
#define __pyx_n_u_NativeFile_fileno __pyx_string_tab[1409]
#define __pyx_n_u_NativeFile_flush __pyx_string_tab[1410]
#define __pyx_n_u_NativeFile_get_stream __pyx_string_tab[1411]
#define __pyx_n_u_NativeFile_isatty __pyx_string_tab[1412]
#define __pyx_n_u_NativeFile_metadata __pyx_string_tab[1413]
#define __pyx_n_u_NativeFile_read __pyx_string_tab[1414]
#define __pyx_n_u_NativeFile_read1 __pyx_string_tab[1415]
#define __pyx_n_u_NativeFile_read_at __pyx_string_tab[1416]
#define __pyx_n_u_NativeFile_read_buffer __pyx_string_tab[1417]
#define __pyx_n_u_NativeFile_readable __pyx_string_tab[1418]
#define __pyx_n_u_NativeFile_readall __pyx_string_tab[1419]
#define __pyx_n_u_NativeFile_readinto __pyx_string_tab[1420]
#define __pyx_n_u_NativeFile_readline __pyx_string_tab[1421]
#define __pyx_n_u_NativeFile_readlines __pyx_string_tab[1422]
#define __pyx_n_u_NativeFile_seek __pyx_string_tab[1423]
#define __pyx_n_u_NativeFile_seekable __pyx_string_tab[1424]
#define __pyx_n_u_NativeFile_size __pyx_string_tab[1425]
#define __pyx_n_u_NativeFile_tell __pyx_string_tab[1426]
#define __pyx_n_u_NativeFile_truncate __pyx_string_tab[1427]
#define __pyx_n_u_NativeFile_upload __pyx_string_tab[1428]
#define __pyx_n_u_NativeFile_writable __pyx_string_tab[1429]
#define __pyx_n_u_NativeFile_write __pyx_string_tab[1430]
#define __pyx_n_u_NativeFile_writelines __pyx_string_tab[1431]
#define __pyx_n_u_NotImplemented __pyx_string_tab[1432]
#define __pyx_n_u_NullArray __pyx_string_tab[1433]
#define __pyx_n_u_NullOptions __pyx_string_tab[1434]
#define __pyx_n_u_NullScalar __pyx_string_tab[1435]
#define __pyx_n_u_NullScalar_as_py __pyx_string_tab[1436]
#define __pyx_n_u_NumericArray __pyx_string_tab[1437]
#define __pyx_n_u_ONEAPI __pyx_string_tab[1438]
#define __pyx_n_u_OPENCL __pyx_string_tab[1439]
#define __pyx_n_u_OSFile __pyx_string_tab[1440]
#define __pyx_n_u_OSFile___reduce_cython __pyx_string_tab[1441]
#define __pyx_n_u_OSFile___setstate_cython __pyx_string_tab[1442]
#define __pyx_n_u_OSFile_fileno __pyx_string_tab[1443]
#define __pyx_n_u_OpaqueArray __pyx_string_tab[1444]
#define __pyx_n_u_OpaqueScalar __pyx_string_tab[1445]
#define __pyx_n_u_OpaqueType __pyx_string_tab[1446]
#define __pyx_n_u_OpaqueType___arrow_ext_class __pyx_string_tab[1447]
#define __pyx_n_u_OpaqueType___arrow_ext_scalar_cl __pyx_string_tab[1448]
#define __pyx_n_u_OpaqueType___reduce __pyx_string_tab[1449]
#define __pyx_n_u_PYARROW_IGNORE_TIMEZONE __pyx_string_tab[1450]
#define __pyx_n_u_PandasAPIShim __pyx_string_tab[1451]
#define __pyx_n_u_PandasAPIShim___reduce_cython __pyx_string_tab[1452]
#define __pyx_n_u_PandasAPIShim___setstate_cython __pyx_string_tab[1453]
#define __pyx_n_u_PandasAPIShim_data_frame __pyx_string_tab[1454]
#define __pyx_n_u_PandasAPIShim_get_rangeindex_at __pyx_string_tab[1455]
#define __pyx_n_u_PandasAPIShim_get_values __pyx_string_tab[1456]
#define __pyx_n_u_PandasAPIShim_infer_dtype __pyx_string_tab[1457]
#define __pyx_n_u_PandasAPIShim_is_array_like __pyx_string_tab[1458]
#define __pyx_n_u_PandasAPIShim_is_categorical __pyx_string_tab[1459]
#define __pyx_n_u_PandasAPIShim_is_data_frame __pyx_string_tab[1460]
#define __pyx_n_u_PandasAPIShim_is_datetimetz __pyx_string_tab[1461]
#define __pyx_n_u_PandasAPIShim_is_extension_arra __pyx_string_tab[1462]
#define __pyx_n_u_PandasAPIShim_is_ge_v21 __pyx_string_tab[1463]
#define __pyx_n_u_PandasAPIShim_is_ge_v23 __pyx_string_tab[1464]
#define __pyx_n_u_PandasAPIShim_is_ge_v3 __pyx_string_tab[1465]
#define __pyx_n_u_PandasAPIShim_is_ge_v3_strict __pyx_string_tab[1466]
#define __pyx_n_u_PandasAPIShim_is_index __pyx_string_tab[1467]
#define __pyx_n_u_PandasAPIShim_is_series __pyx_string_tab[1468]
#define __pyx_n_u_PandasAPIShim_is_sparse __pyx_string_tab[1469]
#define __pyx_n_u_PandasAPIShim_is_v1 __pyx_string_tab[1470]
#define __pyx_n_u_PandasAPIShim_pandas_dtype __pyx_string_tab[1471]
#define __pyx_n_u_PandasAPIShim_series __pyx_string_tab[1472]
#define __pyx_n_u_PandasAPIShim_uses_string_dtype __pyx_string_tab[1473]
#define __pyx_n_u_PandasConvertible __pyx_string_tab[1474]
#define __pyx_n_u_PandasConvertible___reduce_cyth __pyx_string_tab[1475]
#define __pyx_n_u_PandasConvertible___setstate_cy __pyx_string_tab[1476]
#define __pyx_n_u_PandasConvertible_to_pandas __pyx_string_tab[1477]
#define __pyx_n_u_PeriodDtype __pyx_string_tab[1478]
#define __pyx_n_u_PickleBuffer __pyx_string_tab[1479]
#define __pyx_n_u_ProxyMemoryPool __pyx_string_tab[1480]
#define __pyx_n_u_ProxyMemoryPool___reduce_cython __pyx_string_tab[1481]
#define __pyx_n_u_ProxyMemoryPool___setstate_cytho __pyx_string_tab[1482]
#define __pyx_n_u_PyArrowDataFrame __pyx_string_tab[1483]
#define __pyx_n_u_PythonFile __pyx_string_tab[1484]
#define __pyx_n_u_PythonFile___reduce_cython __pyx_string_tab[1485]
#define __pyx_n_u_PythonFile___setstate_cython __pyx_string_tab[1486]
#define __pyx_n_u_PythonFile_readline __pyx_string_tab[1487]
#define __pyx_n_u_PythonFile_readlines __pyx_string_tab[1488]
#define __pyx_n_u_PythonFile_truncate __pyx_string_tab[1489]
#define __pyx_n_u_Pyx_PyDict_NextRef __pyx_string_tab[1490]
#define __pyx_n_u_Queue __pyx_string_tab[1491]
#define __pyx_n_u_QueueEmpty __pyx_string_tab[1492]
#define __pyx_n_u_ROCM __pyx_string_tab[1493]
#define __pyx_n_u_ROCM_HOST __pyx_string_tab[1494]
#define __pyx_n_u_ReadPandasMixin __pyx_string_tab[1495]
#define __pyx_n_u_ReadPandasMixin_read_pandas __pyx_string_tab[1496]
#define __pyx_n_u_ReadStats __pyx_string_tab[1497]
#define __pyx_n_u_ReadStats_2 __pyx_string_tab[1498]
#define __pyx_n_u_RecordBatch __pyx_string_tab[1499]
#define __pyx_n_u_RecordBatchFileReader __pyx_string_tab[1500]
#define __pyx_n_u_RecordBatchFileReader___enter __pyx_string_tab[1501]
#define __pyx_n_u_RecordBatchFileReader___exit __pyx_string_tab[1502]
#define __pyx_n_u_RecordBatchFileReader___reduce __pyx_string_tab[1503]
#define __pyx_n_u_RecordBatchFileReader___setstat __pyx_string_tab[1504]
#define __pyx_n_u_RecordBatchFileReader__open __pyx_string_tab[1505]
#define __pyx_n_u_RecordBatchFileReader_get_batch __pyx_string_tab[1506]
#define __pyx_n_u_RecordBatchFileReader_get_batch_2 __pyx_string_tab[1507]
#define __pyx_n_u_RecordBatchFileReader_read_all __pyx_string_tab[1508]
#define __pyx_n_u_RecordBatchFileWriter __pyx_string_tab[1509]
#define __pyx_n_u_RecordBatchFileWriter___reduce __pyx_string_tab[1510]
#define __pyx_n_u_RecordBatchFileWriter___setstat __pyx_string_tab[1511]
#define __pyx_n_u_RecordBatchFileWriter__open __pyx_string_tab[1512]
#define __pyx_n_u_RecordBatchReader __pyx_string_tab[1513]
#define __pyx_n_u_RecordBatchReader___arrow_c_stre __pyx_string_tab[1514]
#define __pyx_n_u_RecordBatchReader___enter __pyx_string_tab[1515]
#define __pyx_n_u_RecordBatchReader___exit __pyx_string_tab[1516]
#define __pyx_n_u_RecordBatchReader___reduce_cytho __pyx_string_tab[1517]
#define __pyx_n_u_RecordBatchReader___setstate_cyt __pyx_string_tab[1518]
#define __pyx_n_u_RecordBatchReader__export_to_c __pyx_string_tab[1519]
#define __pyx_n_u_RecordBatchReader__import_from_c __pyx_string_tab[1520]
#define __pyx_n_u_RecordBatchReader__import_from_c_2 __pyx_string_tab[1521]
#define __pyx_n_u_RecordBatchReader_cast __pyx_string_tab[1522]
#define __pyx_n_u_RecordBatchReader_close __pyx_string_tab[1523]
#define __pyx_n_u_RecordBatchReader_from_batches __pyx_string_tab[1524]
#define __pyx_n_u_RecordBatchReader_from_stream __pyx_string_tab[1525]
#define __pyx_n_u_RecordBatchReader_iter_batches_w __pyx_string_tab[1526]
#define __pyx_n_u_RecordBatchReader_read_all __pyx_string_tab[1527]
#define __pyx_n_u_RecordBatchReader_read_next_batc __pyx_string_tab[1528]
#define __pyx_n_u_RecordBatchReader_read_next_batc_2 __pyx_string_tab[1529]
#define __pyx_n_u_RecordBatchStreamReader __pyx_string_tab[1530]
#define __pyx_n_u_RecordBatchStreamReader___reduc __pyx_string_tab[1531]
#define __pyx_n_u_RecordBatchStreamReader___setst __pyx_string_tab[1532]
#define __pyx_n_u_RecordBatchStreamReader__open __pyx_string_tab[1533]
#define __pyx_n_u_RecordBatchStreamWriter __pyx_string_tab[1534]
#define __pyx_n_u_RecordBatchStreamWriter___reduc __pyx_string_tab[1535]
#define __pyx_n_u_RecordBatchStreamWriter___setst __pyx_string_tab[1536]
#define __pyx_n_u_RecordBatchStreamWriter__open __pyx_string_tab[1537]
#define __pyx_n_u_RecordBatchWithMetadata __pyx_string_tab[1538]
#define __pyx_n_u_RecordBatchWithMetadata_2 __pyx_string_tab[1539]
#define __pyx_n_u_RecordBatch___arrow_c_array __pyx_string_tab[1540]
#define __pyx_n_u_RecordBatch___arrow_c_device_arr __pyx_string_tab[1541]
#define __pyx_n_u_RecordBatch___arrow_c_stream __pyx_string_tab[1542]
#define __pyx_n_u_RecordBatch___reduce __pyx_string_tab[1543]
#define __pyx_n_u_RecordBatch___sizeof __pyx_string_tab[1544]
#define __pyx_n_u_RecordBatch__column __pyx_string_tab[1545]
#define __pyx_n_u_RecordBatch__export_to_c __pyx_string_tab[1546]
#define __pyx_n_u_RecordBatch__export_to_c_device __pyx_string_tab[1547]
#define __pyx_n_u_RecordBatch__import_from_c __pyx_string_tab[1548]
#define __pyx_n_u_RecordBatch__import_from_c_capsu __pyx_string_tab[1549]
#define __pyx_n_u_RecordBatch__import_from_c_devic __pyx_string_tab[1550]
#define __pyx_n_u_RecordBatch__import_from_c_devic_2 __pyx_string_tab[1551]
#define __pyx_n_u_RecordBatch__is_initialized __pyx_string_tab[1552]
#define __pyx_n_u_RecordBatch__to_pandas __pyx_string_tab[1553]
#define __pyx_n_u_RecordBatch_add_column __pyx_string_tab[1554]
#define __pyx_n_u_RecordBatch_cast __pyx_string_tab[1555]
#define __pyx_n_u_RecordBatch_copy_to __pyx_string_tab[1556]
#define __pyx_n_u_RecordBatch_equals __pyx_string_tab[1557]
#define __pyx_n_u_RecordBatch_from_arrays __pyx_string_tab[1558]
#define __pyx_n_u_RecordBatch_from_pandas __pyx_string_tab[1559]
#define __pyx_n_u_RecordBatch_from_struct_array __pyx_string_tab[1560]
#define __pyx_n_u_RecordBatch_get_total_buffer_siz __pyx_string_tab[1561]
#define __pyx_n_u_RecordBatch_remove_column __pyx_string_tab[1562]
#define __pyx_n_u_RecordBatch_rename_columns __pyx_string_tab[1563]
#define __pyx_n_u_RecordBatch_replace_schema_metad __pyx_string_tab[1564]
#define __pyx_n_u_RecordBatch_select __pyx_string_tab[1565]
#define __pyx_n_u_RecordBatch_serialize __pyx_string_tab[1566]
#define __pyx_n_u_RecordBatch_set_column __pyx_string_tab[1567]
#define __pyx_n_u_RecordBatch_slice __pyx_string_tab[1568]
#define __pyx_n_u_RecordBatch_to_struct_array __pyx_string_tab[1569]
#define __pyx_n_u_RecordBatch_to_tensor __pyx_string_tab[1570]
#define __pyx_n_u_RecordBatch_validate __pyx_string_tab[1571]
#define __pyx_n_u_ResizableBuffer __pyx_string_tab[1572]
#define __pyx_n_u_ResizableBuffer_resize __pyx_string_tab[1573]
#define __pyx_n_u_RunEndEncodedArray __pyx_string_tab[1574]
#define __pyx_n_u_RunEndEncodedArray__from_arrays __pyx_string_tab[1575]
#define __pyx_n_u_RunEndEncodedArray_find_physical __pyx_string_tab[1576]
#define __pyx_n_u_RunEndEncodedArray_find_physical_2 __pyx_string_tab[1577]
#define __pyx_n_u_RunEndEncodedArray_from_arrays __pyx_string_tab[1578]
#define __pyx_n_u_RunEndEncodedArray_from_buffers __pyx_string_tab[1579]
#define __pyx_n_u_RunEndEncodedScalar __pyx_string_tab[1580]
#define __pyx_n_u_RunEndEncodedScalar_as_py __pyx_string_tab[1581]
#define __pyx_n_u_RunEndEncodedType __pyx_string_tab[1582]
#define __pyx_n_u_RunEndEncodedType___reduce __pyx_string_tab[1583]
#define __pyx_n_u_RuntimeInfo __pyx_string_tab[1584]
#define __pyx_n_u_SIGINT __pyx_string_tab[1585]
#define __pyx_n_u_SIGTERM __pyx_string_tab[1586]
#define __pyx_n_u_SIG_DFL __pyx_string_tab[1587]
#define __pyx_n_u_SIG_IGN __pyx_string_tab[1588]
#define __pyx_n_u_SNAPPY __pyx_string_tab[1589]
#define __pyx_n_u_Scalar __pyx_string_tab[1590]
#define __pyx_n_u_ScalarAggregateOptions __pyx_string_tab[1591]
#define __pyx_n_u_Scalar___reduce __pyx_string_tab[1592]
#define __pyx_n_u_Scalar_as_py __pyx_string_tab[1593]
#define __pyx_n_u_Scalar_cast __pyx_string_tab[1594]
#define __pyx_n_u_Scalar_equals __pyx_string_tab[1595]
#define __pyx_n_u_Scalar_validate __pyx_string_tab[1596]
#define __pyx_n_u_Schema __pyx_string_tab[1597]
#define __pyx_n_u_Schema___arrow_c_schema __pyx_string_tab[1598]
#define __pyx_n_u_Schema___iter __pyx_string_tab[1599]
#define __pyx_n_u_Schema___reduce __pyx_string_tab[1600]
#define __pyx_n_u_Schema___sizeof __pyx_string_tab[1601]
#define __pyx_n_u_Schema__export_to_c __pyx_string_tab[1602]
#define __pyx_n_u_Schema__field __pyx_string_tab[1603]
#define __pyx_n_u_Schema__import_from_c __pyx_string_tab[1604]
#define __pyx_n_u_Schema__import_from_c_capsule __pyx_string_tab[1605]
#define __pyx_n_u_Schema_add_metadata __pyx_string_tab[1606]
#define __pyx_n_u_Schema_append __pyx_string_tab[1607]
#define __pyx_n_u_Schema_empty_table __pyx_string_tab[1608]
#define __pyx_n_u_Schema_equals __pyx_string_tab[1609]
#define __pyx_n_u_Schema_field __pyx_string_tab[1610]
#define __pyx_n_u_Schema_field_by_name __pyx_string_tab[1611]
#define __pyx_n_u_Schema_from_pandas __pyx_string_tab[1612]
#define __pyx_n_u_Schema_get_all_field_indices __pyx_string_tab[1613]
#define __pyx_n_u_Schema_get_field_index __pyx_string_tab[1614]
#define __pyx_n_u_Schema_insert __pyx_string_tab[1615]
#define __pyx_n_u_Schema_remove __pyx_string_tab[1616]
#define __pyx_n_u_Schema_remove_metadata __pyx_string_tab[1617]
#define __pyx_n_u_Schema_serialize __pyx_string_tab[1618]
#define __pyx_n_u_Schema_set __pyx_string_tab[1619]
#define __pyx_n_u_Schema_to_string __pyx_string_tab[1620]
#define __pyx_n_u_Schema_with_metadata __pyx_string_tab[1621]
#define __pyx_n_u_Sequence __pyx_string_tab[1622]
#define __pyx_n_u_Series __pyx_string_tab[1623]
#define __pyx_n_u_SignalStopHandler __pyx_string_tab[1624]
#define __pyx_n_u_SignalStopHandler___enter __pyx_string_tab[1625]
#define __pyx_n_u_SignalStopHandler___exit __pyx_string_tab[1626]
#define __pyx_n_u_SignalStopHandler___reduce_cytho __pyx_string_tab[1627]
#define __pyx_n_u_SignalStopHandler___setstate_cyt __pyx_string_tab[1628]
#define __pyx_n_u_SignalStopHandler__init_signals __pyx_string_tab[1629]
#define __pyx_n_u_SortOptions __pyx_string_tab[1630]
#define __pyx_n_u_SparseCOOTensor __pyx_string_tab[1631]
#define __pyx_n_u_SparseCOOTensor___get___locals_g __pyx_string_tab[1632]
#define __pyx_n_u_SparseCOOTensor___reduce_cython __pyx_string_tab[1633]
#define __pyx_n_u_SparseCOOTensor___setstate_cytho __pyx_string_tab[1634]
#define __pyx_n_u_SparseCOOTensor_dim_name __pyx_string_tab[1635]
#define __pyx_n_u_SparseCOOTensor_equals __pyx_string_tab[1636]
#define __pyx_n_u_SparseCOOTensor_from_dense_numpy __pyx_string_tab[1637]
#define __pyx_n_u_SparseCOOTensor_from_numpy __pyx_string_tab[1638]
#define __pyx_n_u_SparseCOOTensor_from_pydata_spar __pyx_string_tab[1639]
#define __pyx_n_u_SparseCOOTensor_from_scipy __pyx_string_tab[1640]
#define __pyx_n_u_SparseCOOTensor_from_tensor __pyx_string_tab[1641]
#define __pyx_n_u_SparseCOOTensor_to_numpy __pyx_string_tab[1642]
#define __pyx_n_u_SparseCOOTensor_to_pydata_sparse __pyx_string_tab[1643]
#define __pyx_n_u_SparseCOOTensor_to_scipy __pyx_string_tab[1644]
#define __pyx_n_u_SparseCOOTensor_to_tensor __pyx_string_tab[1645]
#define __pyx_n_u_SparseCSCMatrix __pyx_string_tab[1646]
#define __pyx_n_u_SparseCSCMatrix___get___locals_g __pyx_string_tab[1647]
#define __pyx_n_u_SparseCSCMatrix___reduce_cython __pyx_string_tab[1648]
#define __pyx_n_u_SparseCSCMatrix___setstate_cytho __pyx_string_tab[1649]
#define __pyx_n_u_SparseCSCMatrix_dim_name __pyx_string_tab[1650]
#define __pyx_n_u_SparseCSCMatrix_equals __pyx_string_tab[1651]
#define __pyx_n_u_SparseCSCMatrix_from_dense_numpy __pyx_string_tab[1652]
#define __pyx_n_u_SparseCSCMatrix_from_numpy __pyx_string_tab[1653]
#define __pyx_n_u_SparseCSCMatrix_from_scipy __pyx_string_tab[1654]
#define __pyx_n_u_SparseCSCMatrix_from_tensor __pyx_string_tab[1655]
#define __pyx_n_u_SparseCSCMatrix_to_numpy __pyx_string_tab[1656]
#define __pyx_n_u_SparseCSCMatrix_to_scipy __pyx_string_tab[1657]
#define __pyx_n_u_SparseCSCMatrix_to_tensor __pyx_string_tab[1658]
#define __pyx_n_u_SparseCSFTensor __pyx_string_tab[1659]
#define __pyx_n_u_SparseCSFTensor___get___locals_g __pyx_string_tab[1660]
#define __pyx_n_u_SparseCSFTensor___reduce_cython __pyx_string_tab[1661]
#define __pyx_n_u_SparseCSFTensor___setstate_cytho __pyx_string_tab[1662]
#define __pyx_n_u_SparseCSFTensor_dim_name __pyx_string_tab[1663]
#define __pyx_n_u_SparseCSFTensor_equals __pyx_string_tab[1664]
#define __pyx_n_u_SparseCSFTensor_from_dense_numpy __pyx_string_tab[1665]
#define __pyx_n_u_SparseCSFTensor_from_numpy __pyx_string_tab[1666]
#define __pyx_n_u_SparseCSFTensor_from_tensor __pyx_string_tab[1667]
#define __pyx_n_u_SparseCSFTensor_to_numpy __pyx_string_tab[1668]
#define __pyx_n_u_SparseCSFTensor_to_tensor __pyx_string_tab[1669]
#define __pyx_n_u_SparseCSRMatrix __pyx_string_tab[1670]
#define __pyx_n_u_SparseCSRMatrix___get___locals_g __pyx_string_tab[1671]
#define __pyx_n_u_SparseCSRMatrix___reduce_cython __pyx_string_tab[1672]
#define __pyx_n_u_SparseCSRMatrix___setstate_cytho __pyx_string_tab[1673]
#define __pyx_n_u_SparseCSRMatrix_dim_name __pyx_string_tab[1674]
#define __pyx_n_u_SparseCSRMatrix_equals __pyx_string_tab[1675]
#define __pyx_n_u_SparseCSRMatrix_from_dense_numpy __pyx_string_tab[1676]
#define __pyx_n_u_SparseCSRMatrix_from_numpy __pyx_string_tab[1677]
#define __pyx_n_u_SparseCSRMatrix_from_scipy __pyx_string_tab[1678]
#define __pyx_n_u_SparseCSRMatrix_from_tensor __pyx_string_tab[1679]
#define __pyx_n_u_SparseCSRMatrix_to_numpy __pyx_string_tab[1680]
#define __pyx_n_u_SparseCSRMatrix_to_scipy __pyx_string_tab[1681]
#define __pyx_n_u_SparseCSRMatrix_to_tensor __pyx_string_tab[1682]
#define __pyx_n_u_SparseDtype __pyx_string_tab[1683]
#define __pyx_n_u_SparseUnionType __pyx_string_tab[1684]
#define __pyx_n_u_StopToken __pyx_string_tab[1685]
#define __pyx_n_u_StopToken___reduce_cython __pyx_string_tab[1686]
#define __pyx_n_u_StopToken___setstate_cython __pyx_string_tab[1687]
#define __pyx_n_u_StringArray __pyx_string_tab[1688]
#define __pyx_n_u_StringArray_from_buffers __pyx_string_tab[1689]
#define __pyx_n_u_StringBuilder __pyx_string_tab[1690]
#define __pyx_n_u_StringBuilder___reduce_cython __pyx_string_tab[1691]
#define __pyx_n_u_StringBuilder___setstate_cython __pyx_string_tab[1692]
#define __pyx_n_u_StringBuilder_append __pyx_string_tab[1693]
#define __pyx_n_u_StringBuilder_append_values __pyx_string_tab[1694]
#define __pyx_n_u_StringBuilder_finish __pyx_string_tab[1695]
#define __pyx_n_u_StringScalar __pyx_string_tab[1696]
#define __pyx_n_u_StringScalar_as_py __pyx_string_tab[1697]
#define __pyx_n_u_StringViewArray __pyx_string_tab[1698]
#define __pyx_n_u_StringViewBuilder __pyx_string_tab[1699]
#define __pyx_n_u_StringViewBuilder___reduce_cytho __pyx_string_tab[1700]
#define __pyx_n_u_StringViewBuilder___setstate_cyt __pyx_string_tab[1701]
#define __pyx_n_u_StringViewBuilder_append __pyx_string_tab[1702]
#define __pyx_n_u_StringViewBuilder_append_values __pyx_string_tab[1703]
#define __pyx_n_u_StringViewBuilder_finish __pyx_string_tab[1704]
#define __pyx_n_u_StringViewScalar __pyx_string_tab[1705]
#define __pyx_n_u_StructArray __pyx_string_tab[1706]
#define __pyx_n_u_StructArray__flattened_field __pyx_string_tab[1707]
#define __pyx_n_u_StructArray_field __pyx_string_tab[1708]
#define __pyx_n_u_StructArray_flatten __pyx_string_tab[1709]
#define __pyx_n_u_StructArray_from_arrays __pyx_string_tab[1710]
#define __pyx_n_u_StructArray_sort __pyx_string_tab[1711]
#define __pyx_n_u_StructScalar __pyx_string_tab[1712]
#define __pyx_n_u_StructScalar___iter __pyx_string_tab[1713]
#define __pyx_n_u_StructScalar__as_py_tuple __pyx_string_tab[1714]
#define __pyx_n_u_StructScalar_as_py __pyx_string_tab[1715]
#define __pyx_n_u_StructScalar_items __pyx_string_tab[1716]
#define __pyx_n_u_StructType __pyx_string_tab[1717]
#define __pyx_n_u_StructType___iter __pyx_string_tab[1718]
#define __pyx_n_u_StructType___reduce __pyx_string_tab[1719]
#define __pyx_n_u_StructType_field __pyx_string_tab[1720]
#define __pyx_n_u_StructType_get_all_field_indices __pyx_string_tab[1721]
#define __pyx_n_u_StructType_get_field_index __pyx_string_tab[1722]
#define __pyx_n_u_T __pyx_string_tab[1723]
#define __pyx_n_u_Table __pyx_string_tab[1724]
#define __pyx_n_u_TableGroupBy __pyx_string_tab[1725]
#define __pyx_n_u_TableGroupBy___init __pyx_string_tab[1726]
#define __pyx_n_u_TableGroupBy_aggregate __pyx_string_tab[1727]
#define __pyx_n_u_Table___arrow_c_stream __pyx_string_tab[1728]
#define __pyx_n_u_Table___get___locals_genexpr __pyx_string_tab[1729]
#define __pyx_n_u_Table___reduce __pyx_string_tab[1730]
#define __pyx_n_u_Table___sizeof __pyx_string_tab[1731]
#define __pyx_n_u_Table__column __pyx_string_tab[1732]
#define __pyx_n_u_Table__is_initialized __pyx_string_tab[1733]
#define __pyx_n_u_Table__to_pandas __pyx_string_tab[1734]
#define __pyx_n_u_Table_add_column __pyx_string_tab[1735]
#define __pyx_n_u_Table_cast __pyx_string_tab[1736]
#define __pyx_n_u_Table_combine_chunks __pyx_string_tab[1737]
#define __pyx_n_u_Table_drop __pyx_string_tab[1738]
#define __pyx_n_u_Table_equals __pyx_string_tab[1739]
#define __pyx_n_u_Table_flatten __pyx_string_tab[1740]
#define __pyx_n_u_Table_from_arrays __pyx_string_tab[1741]
#define __pyx_n_u_Table_from_batches __pyx_string_tab[1742]
#define __pyx_n_u_Table_from_pandas __pyx_string_tab[1743]
#define __pyx_n_u_Table_from_struct_array __pyx_string_tab[1744]
#define __pyx_n_u_Table_get_total_buffer_size __pyx_string_tab[1745]
#define __pyx_n_u_Table_group_by __pyx_string_tab[1746]
#define __pyx_n_u_Table_join __pyx_string_tab[1747]
#define __pyx_n_u_Table_join_asof __pyx_string_tab[1748]
#define __pyx_n_u_Table_remove_column __pyx_string_tab[1749]
#define __pyx_n_u_Table_rename_columns __pyx_string_tab[1750]
#define __pyx_n_u_Table_replace_schema_metadata __pyx_string_tab[1751]
#define __pyx_n_u_Table_select __pyx_string_tab[1752]
#define __pyx_n_u_Table_set_column __pyx_string_tab[1753]
#define __pyx_n_u_Table_slice __pyx_string_tab[1754]
#define __pyx_n_u_Table_to_batches __pyx_string_tab[1755]
#define __pyx_n_u_Table_to_reader __pyx_string_tab[1756]
#define __pyx_n_u_Table_to_struct_array __pyx_string_tab[1757]
#define __pyx_n_u_Table_unify_dictionaries __pyx_string_tab[1758]
#define __pyx_n_u_Table_validate __pyx_string_tab[1759]
#define __pyx_n_u_Tabular __pyx_string_tab[1760]
#define __pyx_n_u_Tabular___array __pyx_string_tab[1761]
#define __pyx_n_u_Tabular___dataframe __pyx_string_tab[1762]
#define __pyx_n_u_Tabular___reduce_cython __pyx_string_tab[1763]
#define __pyx_n_u_Tabular___setstate_cython __pyx_string_tab[1764]
#define __pyx_n_u_Tabular__column __pyx_string_tab[1765]
#define __pyx_n_u_Tabular__ensure_integer_index __pyx_string_tab[1766]
#define __pyx_n_u_Tabular__is_initialized __pyx_string_tab[1767]
#define __pyx_n_u_Tabular_add_column __pyx_string_tab[1768]
#define __pyx_n_u_Tabular_append_column __pyx_string_tab[1769]
#define __pyx_n_u_Tabular_column __pyx_string_tab[1770]
#define __pyx_n_u_Tabular_drop_columns __pyx_string_tab[1771]
#define __pyx_n_u_Tabular_drop_null __pyx_string_tab[1772]
#define __pyx_n_u_Tabular_field __pyx_string_tab[1773]
#define __pyx_n_u_Tabular_filter __pyx_string_tab[1774]
#define __pyx_n_u_Tabular_from_pydict __pyx_string_tab[1775]
#define __pyx_n_u_Tabular_from_pylist __pyx_string_tab[1776]
#define __pyx_n_u_Tabular_itercolumns __pyx_string_tab[1777]
#define __pyx_n_u_Tabular_remove_column __pyx_string_tab[1778]
#define __pyx_n_u_Tabular_sort_by __pyx_string_tab[1779]
#define __pyx_n_u_Tabular_take __pyx_string_tab[1780]
#define __pyx_n_u_Tabular_to_pydict __pyx_string_tab[1781]
#define __pyx_n_u_Tabular_to_pylist __pyx_string_tab[1782]
#define __pyx_n_u_Tabular_to_string __pyx_string_tab[1783]
#define __pyx_n_u_Tensor __pyx_string_tab[1784]
#define __pyx_n_u_Tensor___dlpack __pyx_string_tab[1785]
#define __pyx_n_u_Tensor___dlpack_device __pyx_string_tab[1786]
#define __pyx_n_u_Tensor___reduce_cython __pyx_string_tab[1787]
#define __pyx_n_u_Tensor___setstate_cython __pyx_string_tab[1788]
#define __pyx_n_u_Tensor__make_shape_or_strides_bu __pyx_string_tab[1789]
#define __pyx_n_u_Tensor_dim_name __pyx_string_tab[1790]
#define __pyx_n_u_Tensor_equals __pyx_string_tab[1791]
#define __pyx_n_u_Tensor_from_numpy __pyx_string_tab[1792]
#define __pyx_n_u_Tensor_to_numpy __pyx_string_tab[1793]
#define __pyx_n_u_TextIOBase __pyx_string_tab[1794]
#define __pyx_n_u_Thread __pyx_string_tab[1795]
#define __pyx_n_u_Time32Array __pyx_string_tab[1796]
#define __pyx_n_u_Time32Scalar __pyx_string_tab[1797]
#define __pyx_n_u_Time32Scalar_as_py __pyx_string_tab[1798]
#define __pyx_n_u_Time32Type __pyx_string_tab[1799]
#define __pyx_n_u_Time64Array __pyx_string_tab[1800]
#define __pyx_n_u_Time64Scalar __pyx_string_tab[1801]
#define __pyx_n_u_Time64Scalar_as_py __pyx_string_tab[1802]
#define __pyx_n_u_Time64Type __pyx_string_tab[1803]
#define __pyx_n_u_Timedelta __pyx_string_tab[1804]
#define __pyx_n_u_Timestamp __pyx_string_tab[1805]
#define __pyx_n_u_TimestampArray __pyx_string_tab[1806]
#define __pyx_n_u_TimestampScalar __pyx_string_tab[1807]
#define __pyx_n_u_TimestampScalar_as_py __pyx_string_tab[1808]
#define __pyx_n_u_TimestampType __pyx_string_tab[1809]
#define __pyx_n_u_TimestampType___reduce __pyx_string_tab[1810]
#define __pyx_n_u_Transcoder __pyx_string_tab[1811]
#define __pyx_n_u_Transcoder___call __pyx_string_tab[1812]
#define __pyx_n_u_Transcoder___init __pyx_string_tab[1813]
#define __pyx_n_u_TransformInputStream __pyx_string_tab[1814]
#define __pyx_n_u_TransformInputStream___reduce_cy __pyx_string_tab[1815]
#define __pyx_n_u_TransformInputStream___setstate __pyx_string_tab[1816]
#define __pyx_n_u_True __pyx_string_tab[1817]
#define __pyx_n_u_Type_BINARY __pyx_string_tab[1818]
#define __pyx_n_u_Type_BINARY_VIEW __pyx_string_tab[1819]
#define __pyx_n_u_Type_BOOL __pyx_string_tab[1820]
#define __pyx_n_u_Type_DATE32 __pyx_string_tab[1821]
#define __pyx_n_u_Type_DATE64 __pyx_string_tab[1822]
#define __pyx_n_u_Type_DECIMAL128 __pyx_string_tab[1823]
#define __pyx_n_u_Type_DECIMAL256 __pyx_string_tab[1824]
#define __pyx_n_u_Type_DECIMAL32 __pyx_string_tab[1825]
#define __pyx_n_u_Type_DECIMAL64 __pyx_string_tab[1826]
#define __pyx_n_u_Type_DENSE_UNION __pyx_string_tab[1827]
#define __pyx_n_u_Type_DICTIONARY __pyx_string_tab[1828]
#define __pyx_n_u_Type_DOUBLE __pyx_string_tab[1829]
#define __pyx_n_u_Type_DURATION __pyx_string_tab[1830]
#define __pyx_n_u_Type_FIXED_SIZE_BINARY __pyx_string_tab[1831]
#define __pyx_n_u_Type_FIXED_SIZE_LIST __pyx_string_tab[1832]
#define __pyx_n_u_Type_FLOAT __pyx_string_tab[1833]
#define __pyx_n_u_Type_HALF_FLOAT __pyx_string_tab[1834]
#define __pyx_n_u_Type_INT16 __pyx_string_tab[1835]
#define __pyx_n_u_Type_INT32 __pyx_string_tab[1836]
#define __pyx_n_u_Type_INT64 __pyx_string_tab[1837]
#define __pyx_n_u_Type_INT8 __pyx_string_tab[1838]
#define __pyx_n_u_Type_INTERVAL_DAY_TIME __pyx_string_tab[1839]
#define __pyx_n_u_Type_INTERVAL_MONTHS __pyx_string_tab[1840]
#define __pyx_n_u_Type_INTERVAL_MONTH_DAY_NANO __pyx_string_tab[1841]
#define __pyx_n_u_Type_LARGE_BINARY __pyx_string_tab[1842]
#define __pyx_n_u_Type_LARGE_LIST __pyx_string_tab[1843]
#define __pyx_n_u_Type_LARGE_LIST_VIEW __pyx_string_tab[1844]
#define __pyx_n_u_Type_LARGE_STRING __pyx_string_tab[1845]
#define __pyx_n_u_Type_LIST __pyx_string_tab[1846]
#define __pyx_n_u_Type_LIST_VIEW __pyx_string_tab[1847]
#define __pyx_n_u_Type_MAP __pyx_string_tab[1848]
#define __pyx_n_u_Type_NA __pyx_string_tab[1849]
#define __pyx_n_u_Type_RUN_END_ENCODED __pyx_string_tab[1850]
#define __pyx_n_u_Type_SPARSE_UNION __pyx_string_tab[1851]
#define __pyx_n_u_Type_STRING __pyx_string_tab[1852]
#define __pyx_n_u_Type_STRING_VIEW __pyx_string_tab[1853]
#define __pyx_n_u_Type_STRUCT __pyx_string_tab[1854]
#define __pyx_n_u_Type_TIME32 __pyx_string_tab[1855]
#define __pyx_n_u_Type_TIME64 __pyx_string_tab[1856]
#define __pyx_n_u_Type_TIMESTAMP __pyx_string_tab[1857]
#define __pyx_n_u_Type_UINT16 __pyx_string_tab[1858]
#define __pyx_n_u_Type_UINT32 __pyx_string_tab[1859]
#define __pyx_n_u_Type_UINT64 __pyx_string_tab[1860]
#define __pyx_n_u_Type_UINT8 __pyx_string_tab[1861]
#define __pyx_n_u_UInt16Array __pyx_string_tab[1862]
#define __pyx_n_u_UInt16Scalar __pyx_string_tab[1863]
#define __pyx_n_u_UInt16Scalar_as_py __pyx_string_tab[1864]
#define __pyx_n_u_UInt32Array __pyx_string_tab[1865]
#define __pyx_n_u_UInt32Scalar __pyx_string_tab[1866]
#define __pyx_n_u_UInt32Scalar_as_py __pyx_string_tab[1867]
#define __pyx_n_u_UInt64Array __pyx_string_tab[1868]
#define __pyx_n_u_UInt64Scalar __pyx_string_tab[1869]
#define __pyx_n_u_UInt64Scalar_as_py __pyx_string_tab[1870]
#define __pyx_n_u_UInt8Array __pyx_string_tab[1871]
#define __pyx_n_u_UInt8Scalar __pyx_string_tab[1872]
#define __pyx_n_u_UInt8Scalar_as_py __pyx_string_tab[1873]
#define __pyx_n_u_UUID __pyx_string_tab[1874]
#define __pyx_n_u_UnionArray __pyx_string_tab[1875]
#define __pyx_n_u_UnionArray_child __pyx_string_tab[1876]
#define __pyx_n_u_UnionArray_field __pyx_string_tab[1877]
#define __pyx_n_u_UnionArray_from_dense __pyx_string_tab[1878]
#define __pyx_n_u_UnionArray_from_sparse __pyx_string_tab[1879]
#define __pyx_n_u_UnionMode_DENSE __pyx_string_tab[1880]
#define __pyx_n_u_UnionMode_SPARSE __pyx_string_tab[1881]
#define __pyx_n_u_UnionScalar __pyx_string_tab[1882]
#define __pyx_n_u_UnionScalar_as_py __pyx_string_tab[1883]
#define __pyx_n_u_UnionType __pyx_string_tab[1884]
#define __pyx_n_u_UnionType___iter __pyx_string_tab[1885]
#define __pyx_n_u_UnionType___reduce __pyx_string_tab[1886]
#define __pyx_n_u_UnionType_field __pyx_string_tab[1887]
#define __pyx_n_u_UnknownExtensionType __pyx_string_tab[1888]
#define __pyx_n_u_UnknownExtensionType___arrow_ext __pyx_string_tab[1889]
#define __pyx_n_u_UnknownExtensionType___arrow_ext_2 __pyx_string_tab[1890]
#define __pyx_n_u_UnsupportedOperation __pyx_string_tab[1891]
#define __pyx_n_u_UuidArray __pyx_string_tab[1892]
#define __pyx_n_u_UuidScalar __pyx_string_tab[1893]
#define __pyx_n_u_UuidScalar_as_py __pyx_string_tab[1894]
#define __pyx_n_u_UuidType __pyx_string_tab[1895]
#define __pyx_n_u_UuidType___arrow_ext_class __pyx_string_tab[1896]
#define __pyx_n_u_UuidType___arrow_ext_scalar_clas __pyx_string_tab[1897]
#define __pyx_n_u_UuidType___reduce __pyx_string_tab[1898]
#define __pyx_n_u_V1 __pyx_string_tab[1899]
#define __pyx_n_u_V2 __pyx_string_tab[1900]
#define __pyx_n_u_V3 __pyx_string_tab[1901]
#define __pyx_n_u_V4 __pyx_string_tab[1902]
#define __pyx_n_u_V5 __pyx_string_tab[1903]
#define __pyx_n_u_VPI __pyx_string_tab[1904]
#define __pyx_n_u_VULKAN __pyx_string_tab[1905]
#define __pyx_n_u_Version __pyx_string_tab[1906]
#define __pyx_n_u_VersionInfo __pyx_string_tab[1907]
#define __pyx_n_u_WEBGPU __pyx_string_tab[1908]
#define __pyx_n_u_Weakrefable __pyx_string_tab[1909]
#define __pyx_n_u_WriteStats __pyx_string_tab[1910]
#define __pyx_n_u_WriteStats_2 __pyx_string_tab[1911]
#define __pyx_n_u_ZSTD __pyx_string_tab[1912]
#define __pyx_n_u__3 __pyx_string_tab[1913]
#define __pyx_n_u_a __pyx_string_tab[1914]
#define __pyx_n_u_ab __pyx_string_tab[1915]
#define __pyx_n_u_acero __pyx_string_tab[1916]
#define __pyx_n_u_ad __pyx_string_tab[1917]
#define __pyx_n_u_add_column __pyx_string_tab[1918]
#define __pyx_n_u_add_metadata __pyx_string_tab[1919]
#define __pyx_n_u_address_2 __pyx_string_tab[1920]
#define __pyx_n_u_aggr __pyx_string_tab[1921]
#define __pyx_n_u_aggr_name __pyx_string_tab[1922]
#define __pyx_n_u_aggregate __pyx_string_tab[1923]
#define __pyx_n_u_aggregations __pyx_string_tab[1924]
#define __pyx_n_u_alias __pyx_string_tab[1925]
#define __pyx_n_u_alignment __pyx_string_tab[1926]
#define __pyx_n_u_allocate_buffer __pyx_string_tab[1927]
#define __pyx_n_u_allow_64bit __pyx_string_tab[1928]
#define __pyx_n_u_allow_copy __pyx_string_tab[1929]
#define __pyx_n_u_allow_none __pyx_string_tab[1930]
#define __pyx_n_u_allow_none_for_type __pyx_string_tab[1931]
#define __pyx_n_u_any __pyx_string_tab[1932]
#define __pyx_n_u_api __pyx_string_tab[1933]
#define __pyx_n_u_append __pyx_string_tab[1934]
#define __pyx_n_u_append_column __pyx_string_tab[1935]
#define __pyx_n_u_append_values __pyx_string_tab[1936]
#define __pyx_n_u_arange __pyx_string_tab[1937]
#define __pyx_n_u_arg0 __pyx_string_tab[1938]
#define __pyx_n_u_arg_dict_memo __pyx_string_tab[1939]
#define __pyx_n_u_args __pyx_string_tab[1940]
#define __pyx_n_u_argsort __pyx_string_tab[1941]
#define __pyx_n_u_arr __pyx_string_tab[1942]
#define __pyx_n_u_array __pyx_string_tab[1943]
#define __pyx_n_u_array_2 __pyx_string_tab[1944]
#define __pyx_n_u_array_capsule __pyx_string_tab[1945]
#define __pyx_n_u_array_data __pyx_string_tab[1946]
#define __pyx_n_u_arrays __pyx_string_tab[1947]
#define __pyx_n_u_arrow_array_2 __pyx_string_tab[1948]
#define __pyx_n_u_arrow_c_array __pyx_string_tab[1949]
#define __pyx_n_u_arrow_c_device_array __pyx_string_tab[1950]
#define __pyx_n_u_arrow_c_schema __pyx_string_tab[1951]
#define __pyx_n_u_arrow_c_stream __pyx_string_tab[1952]
#define __pyx_n_u_arrow_ext_class __pyx_string_tab[1953]
#define __pyx_n_u_arrow_ext_deserialize __pyx_string_tab[1954]
#define __pyx_n_u_arrow_ext_scalar_class __pyx_string_tab[1955]
#define __pyx_n_u_arrow_ext_serialize __pyx_string_tab[1956]
#define __pyx_n_u_arrow_obj __pyx_string_tab[1957]
#define __pyx_n_u_arrow_type __pyx_string_tab[1958]
#define __pyx_n_u_as_buffer __pyx_string_tab[1959]
#define __pyx_n_u_as_py __pyx_string_tab[1960]
#define __pyx_n_u_as_py_tuple __pyx_string_tab[1961]
#define __pyx_n_u_asarray __pyx_string_tab[1962]
#define __pyx_n_u_asbytes __pyx_string_tab[1963]
#define __pyx_n_u_ascending __pyx_string_tab[1964]
#define __pyx_n_u_assert_cpu __pyx_string_tab[1965]
#define __pyx_n_u_assert_open __pyx_string_tab[1966]
#define __pyx_n_u_assert_readable __pyx_string_tab[1967]
#define __pyx_n_u_assert_seekable __pyx_string_tab[1968]
#define __pyx_n_u_assert_writable __pyx_string_tab[1969]
#define __pyx_n_u_astimezone __pyx_string_tab[1970]
#define __pyx_n_u_astype __pyx_string_tab[1971]
#define __pyx_n_u_asyncio_coroutines __pyx_string_tab[1972]
#define __pyx_n_u_atexit __pyx_string_tab[1973]
#define __pyx_n_u_axis __pyx_string_tab[1974]
#define __pyx_n_u_axis_order __pyx_string_tab[1975]
#define __pyx_n_u_b __pyx_string_tab[1976]
#define __pyx_n_u_backend __pyx_string_tab[1977]
#define __pyx_n_u_backend_name_2 __pyx_string_tab[1978]
#define __pyx_n_u_backends __pyx_string_tab[1979]
#define __pyx_n_u_base __pyx_string_tab[1980]
#define __pyx_n_u_batch __pyx_string_tab[1981]
#define __pyx_n_u_batch_with_metadata __pyx_string_tab[1982]
#define __pyx_n_u_batches __pyx_string_tab[1983]
#define __pyx_n_u_benchmark_PandasObjectIsNull __pyx_string_tab[1984]
#define __pyx_n_u_bg_write __pyx_string_tab[1985]
#define __pyx_n_u_binary __pyx_string_tab[1986]
#define __pyx_n_u_binary_view __pyx_string_tab[1987]
#define __pyx_n_u_bit_width __pyx_string_tab[1988]
#define __pyx_n_u_blocksize __pyx_string_tab[1989]
#define __pyx_n_u_body __pyx_string_tab[1990]
#define __pyx_n_u_body_length_2 __pyx_string_tab[1991]
#define __pyx_n_u_bool __pyx_string_tab[1992]
#define __pyx_n_u_bool8 __pyx_string_tab[1993]
#define __pyx_n_u_bool_2 __pyx_string_tab[1994]
#define __pyx_n_u_boolean __pyx_string_tab[1995]
#define __pyx_n_u_break_traceback_cycle_from_fram __pyx_string_tab[1996]
#define __pyx_n_u_bs __pyx_string_tab[1997]
#define __pyx_n_u_buf __pyx_string_tab[1998]
#define __pyx_n_u_buf_len __pyx_string_tab[1999]
#define __pyx_n_u_buffer __pyx_string_tab[2000]
#define __pyx_n_u_buffer_size __pyx_string_tab[2001]
#define __pyx_n_u_buffered __pyx_string_tab[2002]
#define __pyx_n_u_buffers __pyx_string_tab[2003]
#define __pyx_n_u_bufobj __pyx_string_tab[2004]
#define __pyx_n_u_build_info __pyx_string_tab[2005]
#define __pyx_n_u_build_info_2 __pyx_string_tab[2006]
#define __pyx_n_u_build_type __pyx_string_tab[2007]
#define __pyx_n_u_by __pyx_string_tab[2008]
#define __pyx_n_u_byte_width __pyx_string_tab[2009]
#define __pyx_n_u_bytes __pyx_string_tab[2010]
#define __pyx_n_u_bytes_3 __pyx_string_tab[2011]
#define __pyx_n_u_bytes_allocated_2 __pyx_string_tab[2012]
#define __pyx_n_u_bytes_read __pyx_string_tab[2013]
#define __pyx_n_u_bz2_2 __pyx_string_tab[2014]
#define __pyx_n_u_c __pyx_string_tab[2015]
#define __pyx_n_u_c_addr __pyx_string_tab[2016]
#define __pyx_n_u_c_arr __pyx_string_tab[2017]
#define __pyx_n_u_c_array __pyx_string_tab[2018]
#define __pyx_n_u_c_arrays __pyx_string_tab[2019]
#define __pyx_n_u_c_axis_order __pyx_string_tab[2020]
#define __pyx_n_u_c_batch __pyx_string_tab[2021]
#define __pyx_n_u_c_batches __pyx_string_tab[2022]
#define __pyx_n_u_c_buf __pyx_string_tab[2023]
#define __pyx_n_u_c_buffer __pyx_string_tab[2024]
#define __pyx_n_u_c_buffer_size __pyx_string_tab[2025]
#define __pyx_n_u_c_buffers __pyx_string_tab[2026]
#define __pyx_n_u_c_check_metadata __pyx_string_tab[2027]
#define __pyx_n_u_c_child_data __pyx_string_tab[2028]
#define __pyx_n_u_c_chunked_array __pyx_string_tab[2029]
#define __pyx_n_u_c_concatenated __pyx_string_tab[2030]
#define __pyx_n_u_c_cpp_info __pyx_string_tab[2031]
#define __pyx_n_u_c_data __pyx_string_tab[2032]
#define __pyx_n_u_c_datatype __pyx_string_tab[2033]
#define __pyx_n_u_c_device_array __pyx_string_tab[2034]
#define __pyx_n_u_c_dim_names __pyx_string_tab[2035]
#define __pyx_n_u_c_field __pyx_string_tab[2036]
#define __pyx_n_u_c_field_names __pyx_string_tab[2037]
#define __pyx_n_u_c_fields __pyx_string_tab[2038]
#define __pyx_n_u_c_file_offset __pyx_string_tab[2039]
#define __pyx_n_u_c_from_pandas __pyx_string_tab[2040]
#define __pyx_n_u_c_indices __pyx_string_tab[2041]
#define __pyx_n_u_c_info __pyx_string_tab[2042]
#define __pyx_n_u_c_json_ext_type __pyx_string_tab[2043]
#define __pyx_n_u_c_mask __pyx_string_tab[2044]
#define __pyx_n_u_c_max_chunksize __pyx_string_tab[2045]
#define __pyx_n_u_c_memory_manager __pyx_string_tab[2046]
#define __pyx_n_u_c_meta __pyx_string_tab[2047]
#define __pyx_n_u_c_metadata __pyx_string_tab[2048]
#define __pyx_n_u_c_mode __pyx_string_tab[2049]
#define __pyx_n_u_c_names __pyx_string_tab[2050]
#define __pyx_n_u_c_nbytes __pyx_string_tab[2051]
#define __pyx_n_u_c_nullable __pyx_string_tab[2052]
#define __pyx_n_u_c_offset __pyx_string_tab[2053]
#define __pyx_n_u_c_opaque_type __pyx_string_tab[2054]
#define __pyx_n_u_c_options __pyx_string_tab[2055]
#define __pyx_n_u_c_ordered __pyx_string_tab[2056]
#define __pyx_n_u_c_path __pyx_string_tab[2057]
#define __pyx_n_u_c_permutation __pyx_string_tab[2058]
#define __pyx_n_u_c_pool __pyx_string_tab[2059]
#define __pyx_n_u_c_ptr __pyx_string_tab[2060]
#define __pyx_n_u_c_raw __pyx_string_tab[2061]
#define __pyx_n_u_c_reader __pyx_string_tab[2062]
#define __pyx_n_u_c_record_batch __pyx_string_tab[2063]
#define __pyx_n_u_c_recordbatches __pyx_string_tab[2064]
#define __pyx_n_u_c_result __pyx_string_tab[2065]
#define __pyx_n_u_c_result_recordbatch __pyx_string_tab[2066]
#define __pyx_n_u_c_result_table __pyx_string_tab[2067]
#define __pyx_n_u_c_rz_buffer __pyx_string_tab[2068]
#define __pyx_n_u_c_scalar __pyx_string_tab[2069]
#define __pyx_n_u_c_schema __pyx_string_tab[2070]
#define __pyx_n_u_c_schema_ptr __pyx_string_tab[2071]
#define __pyx_n_u_c_schemas __pyx_string_tab[2072]
#define __pyx_n_u_c_shape __pyx_string_tab[2073]
#define __pyx_n_u_c_shrink_to_fit __pyx_string_tab[2074]
#define __pyx_n_u_c_sink __pyx_string_tab[2075]
#define __pyx_n_u_c_size __pyx_string_tab[2076]
#define __pyx_n_u_c_storage_type __pyx_string_tab[2077]
#define __pyx_n_u_c_stream __pyx_string_tab[2078]
#define __pyx_n_u_c_table __pyx_string_tab[2079]
#define __pyx_n_u_c_tables __pyx_string_tab[2080]
#define __pyx_n_u_c_tensor __pyx_string_tab[2081]
#define __pyx_n_u_c_tensor_ext_type __pyx_string_tab[2082]
#define __pyx_n_u_c_timezone __pyx_string_tab[2083]
#define __pyx_n_u_c_type __pyx_string_tab[2084]
#define __pyx_n_u_c_type_codes __pyx_string_tab[2085]
#define __pyx_n_u_c_type_name __pyx_string_tab[2086]
#define __pyx_n_u_c_type_ptr __pyx_string_tab[2087]
#define __pyx_n_u_c_uuid_ext_type __pyx_string_tab[2088]
#define __pyx_n_u_c_vendor_name __pyx_string_tab[2089]
#define __pyx_n_u_call __pyx_string_tab[2090]
#define __pyx_n_u_call_function __pyx_string_tab[2091]
#define __pyx_n_u_capsule __pyx_string_tab[2092]
#define __pyx_n_u_cast __pyx_string_tab[2093]
#define __pyx_n_u_casted __pyx_string_tab[2094]
#define __pyx_n_u_casted_array __pyx_string_tab[2095]
#define __pyx_n_u_casted_batch __pyx_string_tab[2096]
#define __pyx_n_u_cat __pyx_string_tab[2097]
#define __pyx_n_u_categorical_type __pyx_string_tab[2098]
#define __pyx_n_u_categories __pyx_string_tab[2099]
#define __pyx_n_u_check_metadata __pyx_string_tab[2100]
#define __pyx_n_u_child __pyx_string_tab[2101]
#define __pyx_n_u_child_fields __pyx_string_tab[2102]
#define __pyx_n_u_children __pyx_string_tab[2103]
#define __pyx_n_u_chunk __pyx_string_tab[2104]
#define __pyx_n_u_chunked __pyx_string_tab[2105]
#define __pyx_n_u_chunked_array __pyx_string_tab[2106]
#define __pyx_n_u_chunks __pyx_string_tab[2107]
#define __pyx_n_u_class __pyx_string_tab[2108]
#define __pyx_n_u_class_getitem __pyx_string_tab[2109]
#define __pyx_n_u_cleanup __pyx_string_tab[2110]
#define __pyx_n_u_cline_in_traceback __pyx_string_tab[2111]
#define __pyx_n_u_close __pyx_string_tab[2112]
#define __pyx_n_u_closed_2 __pyx_string_tab[2113]
#define __pyx_n_u_cloudpickle __pyx_string_tab[2114]
#define __pyx_n_u_cls __pyx_string_tab[2115]
#define __pyx_n_u_coalesce_keys __pyx_string_tab[2116]
#define __pyx_n_u_codec __pyx_string_tab[2117]
#define __pyx_n_u_codecs __pyx_string_tab[2118]
#define __pyx_n_u_coder __pyx_string_tab[2119]
#define __pyx_n_u_codes __pyx_string_tab[2120]
#define __pyx_n_u_coerce_temporal_nanoseconds __pyx_string_tab[2121]
#define __pyx_n_u_coerce_to_ns __pyx_string_tab[2122]
#define __pyx_n_u_col __pyx_string_tab[2123]
#define __pyx_n_u_collections __pyx_string_tab[2124]
#define __pyx_n_u_collections_abc __pyx_string_tab[2125]
#define __pyx_n_u_column __pyx_string_tab[2126]
#define __pyx_n_u_column_2 __pyx_string_tab[2127]
#define __pyx_n_u_column_arrays __pyx_string_tab[2128]
#define __pyx_n_u_column_names __pyx_string_tab[2129]
#define __pyx_n_u_columns __pyx_string_tab[2130]
#define __pyx_n_u_combine_chunks __pyx_string_tab[2131]
#define __pyx_n_u_combined __pyx_string_tab[2132]
#define __pyx_n_u_compat __pyx_string_tab[2133]
#define __pyx_n_u_compiler_flags __pyx_string_tab[2134]
#define __pyx_n_u_compiler_id __pyx_string_tab[2135]
#define __pyx_n_u_compiler_version __pyx_string_tab[2136]
#define __pyx_n_u_compress __pyx_string_tab[2137]
#define __pyx_n_u_compression __pyx_string_tab[2138]
#define __pyx_n_u_compression_level __pyx_string_tab[2139]
#define __pyx_n_u_compute __pyx_string_tab[2140]
#define __pyx_n_u_concat_arrays __pyx_string_tab[2141]
#define __pyx_n_u_concat_batches __pyx_string_tab[2142]
#define __pyx_n_u_concat_tables __pyx_string_tab[2143]
#define __pyx_n_u_container_window __pyx_string_tab[2144]
#define __pyx_n_u_contextlib __pyx_string_tab[2145]
#define __pyx_n_u_contextmanager __pyx_string_tab[2146]
#define __pyx_n_u_converted_arrays __pyx_string_tab[2147]
#define __pyx_n_u_coo_array __pyx_string_tab[2148]
#define __pyx_n_u_coo_matrix __pyx_string_tab[2149]
#define __pyx_n_u_coords __pyx_string_tab[2150]
#define __pyx_n_u_copy __pyx_string_tab[2151]
#define __pyx_n_u_copy_to __pyx_string_tab[2152]
#define __pyx_n_u_count __pyx_string_tab[2153]
#define __pyx_n_u_cpool __pyx_string_tab[2154]
#define __pyx_n_u_cpp_build_info __pyx_string_tab[2155]
#define __pyx_n_u_cpp_file __pyx_string_tab[2156]
#define __pyx_n_u_cpp_version __pyx_string_tab[2157]
#define __pyx_n_u_cpp_version_info __pyx_string_tab[2158]
#define __pyx_n_u_cpu_count __pyx_string_tab[2159]
#define __pyx_n_u_create __pyx_string_tab[2160]
#define __pyx_n_u_create_memory_map __pyx_string_tab[2161]
#define __pyx_n_u_csc_array __pyx_string_tab[2162]
#define __pyx_n_u_csc_matrix __pyx_string_tab[2163]
#define __pyx_n_u_csparse_tensor __pyx_string_tab[2164]
#define __pyx_n_u_csr_array __pyx_string_tab[2165]
#define __pyx_n_u_csr_matrix __pyx_string_tab[2166]
#define __pyx_n_u_ctensor __pyx_string_tab[2167]
#define __pyx_n_u_cuda_loaded __pyx_string_tab[2168]
#define __pyx_n_u_current_thread __pyx_string_tab[2169]
#define __pyx_n_u_custom_metadata __pyx_string_tab[2170]
#define __pyx_n_u_data __pyx_string_tab[2171]
#define __pyx_n_u_data_frame __pyx_string_tab[2172]
#define __pyx_n_u_dataframe __pyx_string_tab[2173]
#define __pyx_n_u_dataframe_to_arrays __pyx_string_tab[2174]
#define __pyx_n_u_dataframe_to_types __pyx_string_tab[2175]
#define __pyx_n_u_date __pyx_string_tab[2176]
#define __pyx_n_u_date32 __pyx_string_tab[2177]
#define __pyx_n_u_date64 __pyx_string_tab[2178]
#define __pyx_n_u_date_as_object __pyx_string_tab[2179]
#define __pyx_n_u_datetime __pyx_string_tab[2180]
#define __pyx_n_u_datetime_from_int __pyx_string_tab[2181]
#define __pyx_n_u_days __pyx_string_tab[2182]
#define __pyx_n_u_debug_print __pyx_string_tab[2183]
#define __pyx_n_u_decay_ms __pyx_string_tab[2184]
#define __pyx_n_u_decimal __pyx_string_tab[2185]
#define __pyx_n_u_decimal128 __pyx_string_tab[2186]
#define __pyx_n_u_decimal256 __pyx_string_tab[2187]
#define __pyx_n_u_decimal32 __pyx_string_tab[2188]
#define __pyx_n_u_decimal64 __pyx_string_tab[2189]
#define __pyx_n_u_decode __pyx_string_tab[2190]
#define __pyx_n_u_decoder __pyx_string_tab[2191]
#define __pyx_n_u_decoder_2 __pyx_string_tab[2192]
#define __pyx_n_u_decompress __pyx_string_tab[2193]
#define __pyx_n_u_decompressed_size __pyx_string_tab[2194]
#define __pyx_n_u_deduplicate_objects __pyx_string_tab[2195]
#define __pyx_n_u_default __pyx_string_tab[2196]
#define __pyx_n_u_default_chunk_size __pyx_string_tab[2197]
#define __pyx_n_u_default_compression_level __pyx_string_tab[2198]
#define __pyx_n_u_default_cpu_memory_manager __pyx_string_tab[2199]
#define __pyx_n_u_default_memory_pool __pyx_string_tab[2200]
#define __pyx_n_u_delta __pyx_string_tab[2201]
#define __pyx_n_u_dense __pyx_string_tab[2202]
#define __pyx_n_u_dense_union __pyx_string_tab[2203]
#define __pyx_n_u_dest __pyx_string_tab[2204]
#define __pyx_n_u_dest_codec __pyx_string_tab[2205]
#define __pyx_n_u_dest_encoding __pyx_string_tab[2206]
#define __pyx_n_u_destination __pyx_string_tab[2207]
#define __pyx_n_u_detach __pyx_string_tab[2208]
#define __pyx_n_u_detect __pyx_string_tab[2209]
#define __pyx_n_u_detect_compression __pyx_string_tab[2210]
#define __pyx_n_u_detected_simd_level __pyx_string_tab[2211]
#define __pyx_n_u_device __pyx_string_tab[2212]
#define __pyx_n_u_device_type __pyx_string_tab[2213]
#define __pyx_n_u_df __pyx_string_tab[2214]
#define __pyx_n_u_dict __pyx_string_tab[2215]
#define __pyx_n_u_dict_2 __pyx_string_tab[2216]
#define __pyx_n_u_dictionary __pyx_string_tab[2217]
#define __pyx_n_u_dictionary_2 __pyx_string_tab[2218]
#define __pyx_n_u_dictionary_3 __pyx_string_tab[2219]
#define __pyx_n_u_dictionary_decode __pyx_string_tab[2220]
#define __pyx_n_u_dictionary_encode __pyx_string_tab[2221]
#define __pyx_n_u_dictionary_memo __pyx_string_tab[2222]
#define __pyx_n_u_diff __pyx_string_tab[2223]
#define __pyx_n_u_dim_name __pyx_string_tab[2224]
#define __pyx_n_u_dim_names __pyx_string_tab[2225]
#define __pyx_n_u_distinct_count_2 __pyx_string_tab[2226]
#define __pyx_n_u_dlm_tensor __pyx_string_tab[2227]
#define __pyx_n_u_dlpack __pyx_string_tab[2228]
#define __pyx_n_u_dlpack_device __pyx_string_tab[2229]
#define __pyx_n_u_doc __pyx_string_tab[2230]
#define __pyx_n_u_done __pyx_string_tab[2231]
#define __pyx_n_u_double __pyx_string_tab[2232]
#define __pyx_n_u_download __pyx_string_tab[2233]
#define __pyx_n_u_download_locals_bg_write __pyx_string_tab[2234]
#define __pyx_n_u_download_locals_cleanup __pyx_string_tab[2235]
#define __pyx_n_u_download_nothreads __pyx_string_tab[2236]
#define __pyx_n_u_download_nothreads_locals_clean __pyx_string_tab[2237]
#define __pyx_n_u_drop __pyx_string_tab[2238]
#define __pyx_n_u_drop_columns __pyx_string_tab[2239]
#define __pyx_n_u_drop_null __pyx_string_tab[2240]
#define __pyx_n_u_dt __pyx_string_tab[2241]
#define __pyx_n_u_dtype __pyx_string_tab[2242]
#define __pyx_n_u_duration __pyx_string_tab[2243]
#define __pyx_n_u_e __pyx_string_tab[2244]
#define __pyx_n_u_element_size_limit __pyx_string_tab[2245]
#define __pyx_n_u_emit_dictionary_deltas __pyx_string_tab[2246]
#define __pyx_n_u_empty __pyx_string_tab[2247]
#define __pyx_n_u_empty_array __pyx_string_tab[2248]
#define __pyx_n_u_empty_table __pyx_string_tab[2249]
#define __pyx_n_u_enable __pyx_string_tab[2250]
#define __pyx_n_u_enable_signal_handlers __pyx_string_tab[2251]
#define __pyx_n_u_encode __pyx_string_tab[2252]
#define __pyx_n_u_encode_file_path __pyx_string_tab[2253]
#define __pyx_n_u_encoded_path __pyx_string_tab[2254]
#define __pyx_n_u_encoder __pyx_string_tab[2255]
#define __pyx_n_u_encoder_2 __pyx_string_tab[2256]
#define __pyx_n_u_end __pyx_string_tab[2257]
#define __pyx_n_u_endswith __pyx_string_tab[2258]
#define __pyx_n_u_ensure_alignment __pyx_string_tab[2259]
#define __pyx_n_u_ensure_cuda_loaded __pyx_string_tab[2260]
#define __pyx_n_u_ensure_integer_index __pyx_string_tab[2261]
#define __pyx_n_u_ensure_metadata __pyx_string_tab[2262]
#define __pyx_n_u_ensure_native_endian __pyx_string_tab[2263]
#define __pyx_n_u_ensure_type __pyx_string_tab[2264]
#define __pyx_n_u_enter __pyx_string_tab[2265]
#define __pyx_n_u_entries __pyx_string_tab[2266]
#define __pyx_n_u_enum __pyx_string_tab[2267]
#define __pyx_n_u_enumerate __pyx_string_tab[2268]
#define __pyx_n_u_environ __pyx_string_tab[2269]
#define __pyx_n_u_equals __pyx_string_tab[2270]
#define __pyx_n_u_errors __pyx_string_tab[2271]
#define __pyx_n_u_exc __pyx_string_tab[2272]
#define __pyx_n_u_exc_info __pyx_string_tab[2273]
#define __pyx_n_u_exc_tb __pyx_string_tab[2274]
#define __pyx_n_u_exc_type __pyx_string_tab[2275]
#define __pyx_n_u_exc_val __pyx_string_tab[2276]
#define __pyx_n_u_exc_value __pyx_string_tab[2277]
#define __pyx_n_u_exit __pyx_string_tab[2278]
#define __pyx_n_u_export_to_c __pyx_string_tab[2279]
#define __pyx_n_u_export_to_c_device __pyx_string_tab[2280]
#define __pyx_n_u_ext_array __pyx_string_tab[2281]
#define __pyx_n_u_ext_scalar __pyx_string_tab[2282]
#define __pyx_n_u_ext_type __pyx_string_tab[2283]
#define __pyx_n_u_extension_columns __pyx_string_tab[2284]
#define __pyx_n_u_extension_name __pyx_string_tab[2285]
#define __pyx_n_u_extension_type __pyx_string_tab[2286]
#define __pyx_n_u_extensions __pyx_string_tab[2287]
#define __pyx_n_u_f __pyx_string_tab[2288]
#define __pyx_n_u_f2 __pyx_string_tab[2289]
#define __pyx_n_u_f4 __pyx_string_tab[2290]
#define __pyx_n_u_f8 __pyx_string_tab[2291]
#define __pyx_n_u_field __pyx_string_tab[2292]
#define __pyx_n_u_field_2 __pyx_string_tab[2293]
#define __pyx_n_u_field_3 __pyx_string_tab[2294]
#define __pyx_n_u_field_by_name __pyx_string_tab[2295]
#define __pyx_n_u_field_index __pyx_string_tab[2296]
#define __pyx_n_u_field_indices __pyx_string_tab[2297]
#define __pyx_n_u_field_names __pyx_string_tab[2298]
#define __pyx_n_u_fields __pyx_string_tab[2299]
#define __pyx_n_u_file_descriptor __pyx_string_tab[2300]
#define __pyx_n_u_file_offset __pyx_string_tab[2301]
#define __pyx_n_u_fileno __pyx_string_tab[2302]
#define __pyx_n_u_fill_null __pyx_string_tab[2303]
#define __pyx_n_u_fill_value __pyx_string_tab[2304]
#define __pyx_n_u_filter __pyx_string_tab[2305]
#define __pyx_n_u_filter_expression __pyx_string_tab[2306]
#define __pyx_n_u_filter_table __pyx_string_tab[2307]
#define __pyx_n_u_final __pyx_string_tab[2308]
#define __pyx_n_u_find_physical_length __pyx_string_tab[2309]
#define __pyx_n_u_find_physical_offset __pyx_string_tab[2310]
#define __pyx_n_u_finish __pyx_string_tab[2311]
#define __pyx_n_u_fixed_shape_tensor __pyx_string_tab[2312]
#define __pyx_n_u_fixed_size_binary_type __pyx_string_tab[2313]
#define __pyx_n_u_flags __pyx_string_tab[2314]
#define __pyx_n_u_flatten __pyx_string_tab[2315]
#define __pyx_n_u_flattened __pyx_string_tab[2316]
#define __pyx_n_u_flattened_field __pyx_string_tab[2317]
#define __pyx_n_u_float __pyx_string_tab[2318]
#define __pyx_n_u_float16 __pyx_string_tab[2319]
#define __pyx_n_u_float32 __pyx_string_tab[2320]
#define __pyx_n_u_float64 __pyx_string_tab[2321]
#define __pyx_n_u_flush __pyx_string_tab[2322]
#define __pyx_n_u_footer_offset __pyx_string_tab[2323]
#define __pyx_n_u_foreign_buffer __pyx_string_tab[2324]
#define __pyx_n_u_format __pyx_string_tab[2325]
#define __pyx_n_u_from_arrays __pyx_string_tab[2326]
#define __pyx_n_u_from_arrays_2 __pyx_string_tab[2327]
#define __pyx_n_u_from_arrow __pyx_string_tab[2328]
#define __pyx_n_u_from_batches __pyx_string_tab[2329]
#define __pyx_n_u_from_buffers __pyx_string_tab[2330]
#define __pyx_n_u_from_codes __pyx_string_tab[2331]
#define __pyx_n_u_from_dense __pyx_string_tab[2332]
#define __pyx_n_u_from_dense_numpy __pyx_string_tab[2333]
#define __pyx_n_u_from_network_metrics __pyx_string_tab[2334]
#define __pyx_n_u_from_numpy __pyx_string_tab[2335]
#define __pyx_n_u_from_numpy_dtype __pyx_string_tab[2336]
#define __pyx_n_u_from_numpy_ndarray __pyx_string_tab[2337]
#define __pyx_n_u_from_numpy_ndarray_locals_genexp __pyx_string_tab[2338]
#define __pyx_n_u_from_pandas __pyx_string_tab[2339]
#define __pyx_n_u_from_pydata_sparse __pyx_string_tab[2340]
#define __pyx_n_u_from_pydict __pyx_string_tab[2341]
#define __pyx_n_u_from_pydict_2 __pyx_string_tab[2342]
#define __pyx_n_u_from_pylist __pyx_string_tab[2343]
#define __pyx_n_u_from_pylist_2 __pyx_string_tab[2344]
#define __pyx_n_u_from_scipy __pyx_string_tab[2345]
#define __pyx_n_u_from_sparse __pyx_string_tab[2346]
#define __pyx_n_u_from_storage __pyx_string_tab[2347]
#define __pyx_n_u_from_stream __pyx_string_tab[2348]
#define __pyx_n_u_from_struct_array __pyx_string_tab[2349]
#define __pyx_n_u_from_tensor __pyx_string_tab[2350]
#define __pyx_n_u_frombytes __pyx_string_tab[2351]
#define __pyx_n_u_full __pyx_string_tab[2352]
#define __pyx_n_u_full_so_version __pyx_string_tab[2353]
#define __pyx_n_u_func __pyx_string_tab[2354]
#define __pyx_n_u_func_2 __pyx_string_tab[2355]
#define __pyx_n_u_func_nohash __pyx_string_tab[2356]
#define __pyx_n_u_future __pyx_string_tab[2357]
#define __pyx_n_u_gdb_test_session __pyx_string_tab[2358]
#define __pyx_n_u_genexpr __pyx_string_tab[2359]
#define __pyx_n_u_get __pyx_string_tab[2360]
#define __pyx_n_u_get_all __pyx_string_tab[2361]
#define __pyx_n_u_get_all_field_indices __pyx_string_tab[2362]
#define __pyx_n_u_get_batch __pyx_string_tab[2363]
#define __pyx_n_u_get_batch_with_custom_metadata __pyx_string_tab[2364]
#define __pyx_n_u_get_datetimetz_type __pyx_string_tab[2365]
#define __pyx_n_u_get_field_index __pyx_string_tab[2366]
#define __pyx_n_u_get_pandas_type __pyx_string_tab[2367]
#define __pyx_n_u_get_pandas_type_map __pyx_string_tab[2368]
#define __pyx_n_u_get_pandas_tz_type __pyx_string_tab[2369]
#define __pyx_n_u_get_rangeindex_attribute __pyx_string_tab[2370]
#define __pyx_n_u_get_record_batch __pyx_string_tab[2371]
#define __pyx_n_u_get_record_batch_size __pyx_string_tab[2372]
#define __pyx_n_u_get_stream __pyx_string_tab[2373]
#define __pyx_n_u_get_tensor_size __pyx_string_tab[2374]
#define __pyx_n_u_get_total_buffer_size __pyx_string_tab[2375]
#define __pyx_n_u_get_values __pyx_string_tab[2376]
#define __pyx_n_u_getframe __pyx_string_tab[2377]
#define __pyx_n_u_getsignal __pyx_string_tab[2378]
#define __pyx_n_u_getsizeof __pyx_string_tab[2379]
#define __pyx_n_u_getstate __pyx_string_tab[2380]
#define __pyx_n_u_getvalue __pyx_string_tab[2381]
#define __pyx_n_u_git_description __pyx_string_tab[2382]
#define __pyx_n_u_git_id __pyx_string_tab[2383]
#define __pyx_n_u_group_by __pyx_string_tab[2384]
#define __pyx_n_u_group_by_2 __pyx_string_tab[2385]
#define __pyx_n_u_group_by_aggrs __pyx_string_tab[2386]
#define __pyx_n_u_gzip __pyx_string_tab[2387]
#define __pyx_n_u_halffloat __pyx_string_tab[2388]
#define __pyx_n_u_handle __pyx_string_tab[2389]
#define __pyx_n_u_handle_arrow_array_protocol __pyx_string_tab[2390]
#define __pyx_n_u_has_canonical_format __pyx_string_tab[2391]
#define __pyx_n_u_has_variadic_buffers __pyx_string_tab[2392]
#define __pyx_n_u_hash __pyx_string_tab[2393]
#define __pyx_n_u_have_libhdfs __pyx_string_tab[2394]
#define __pyx_n_u_have_pandas __pyx_string_tab[2395]
#define __pyx_n_u_have_signal_refcycle __pyx_string_tab[2396]
#define __pyx_n_u_hex __pyx_string_tab[2397]
#define __pyx_n_u_hint __pyx_string_tab[2398]
#define __pyx_n_u_hole_size_limit __pyx_string_tab[2399]
#define __pyx_n_u_i __pyx_string_tab[2400]
#define __pyx_n_u_i1 __pyx_string_tab[2401]
#define __pyx_n_u_i2 __pyx_string_tab[2402]
#define __pyx_n_u_i4 __pyx_string_tab[2403]
#define __pyx_n_u_i8 __pyx_string_tab[2404]
#define __pyx_n_u_id __pyx_string_tab[2405]
#define __pyx_n_u_ideal_bandwidth_utilization_frac __pyx_string_tab[2406]
#define __pyx_n_u_ident __pyx_string_tab[2407]
#define __pyx_n_u_idx __pyx_string_tab[2408]
#define __pyx_n_u_idx_to_new_name __pyx_string_tab[2409]
#define __pyx_n_u_ignore_metadata __pyx_string_tab[2410]
#define __pyx_n_u_import_from_c __pyx_string_tab[2411]
#define __pyx_n_u_import_from_c_capsule __pyx_string_tab[2412]
#define __pyx_n_u_import_from_c_device __pyx_string_tab[2413]
#define __pyx_n_u_import_from_c_device_capsule __pyx_string_tab[2414]
#define __pyx_n_u_in_ptr __pyx_string_tab[2415]
#define __pyx_n_u_in_stream __pyx_string_tab[2416]
#define __pyx_n_u_included_fields __pyx_string_tab[2417]
#define __pyx_n_u_incrementaldecoder __pyx_string_tab[2418]
#define __pyx_n_u_incrementalencoder __pyx_string_tab[2419]
#define __pyx_n_u_indent __pyx_string_tab[2420]
#define __pyx_n_u_index __pyx_string_tab[2421]
#define __pyx_n_u_index_2 __pyx_string_tab[2422]
#define __pyx_n_u_index_type __pyx_string_tab[2423]
#define __pyx_n_u_indices __pyx_string_tab[2424]
#define __pyx_n_u_indices_2 __pyx_string_tab[2425]
#define __pyx_n_u_indptr __pyx_string_tab[2426]
#define __pyx_n_u_infer_dtype __pyx_string_tab[2427]
#define __pyx_n_u_infer_string __pyx_string_tab[2428]
#define __pyx_n_u_infer_type __pyx_string_tab[2429]
#define __pyx_n_u_init __pyx_string_tab[2430]
#define __pyx_n_u_init___locals_genexpr __pyx_string_tab[2431]
#define __pyx_n_u_init_signals __pyx_string_tab[2432]
#define __pyx_n_u_inner_array __pyx_string_tab[2433]
#define __pyx_n_u_inner_batch __pyx_string_tab[2434]
#define __pyx_n_u_input_stream __pyx_string_tab[2435]
#define __pyx_n_u_insert __pyx_string_tab[2436]
#define __pyx_n_u_int16 __pyx_string_tab[2437]
#define __pyx_n_u_int32 __pyx_string_tab[2438]
#define __pyx_n_u_int64 __pyx_string_tab[2439]
#define __pyx_n_u_int8 __pyx_string_tab[2440]
#define __pyx_n_u_int_index __pyx_string_tab[2441]
#define __pyx_n_u_integer_object_nulls __pyx_string_tab[2442]
#define __pyx_n_u_invert __pyx_string_tab[2443]
#define __pyx_n_u_io __pyx_string_tab[2444]
#define __pyx_n_u_io_thread_count __pyx_string_tab[2445]
#define __pyx_n_u_is_alive __pyx_string_tab[2446]
#define __pyx_n_u_is_array_like __pyx_string_tab[2447]
#define __pyx_n_u_is_available __pyx_string_tab[2448]
#define __pyx_n_u_is_boolean_value __pyx_string_tab[2449]
#define __pyx_n_u_is_categorical __pyx_string_tab[2450]
#define __pyx_n_u_is_coroutine __pyx_string_tab[2451]
#define __pyx_n_u_is_cpu __pyx_string_tab[2452]
#define __pyx_n_u_is_data_frame __pyx_string_tab[2453]
#define __pyx_n_u_is_datetimetz __pyx_string_tab[2454]
#define __pyx_n_u_is_extension_array_dtype __pyx_string_tab[2455]
#define __pyx_n_u_is_float_value __pyx_string_tab[2456]
#define __pyx_n_u_is_ge_v21 __pyx_string_tab[2457]
#define __pyx_n_u_is_ge_v23 __pyx_string_tab[2458]
#define __pyx_n_u_is_ge_v3 __pyx_string_tab[2459]
#define __pyx_n_u_is_ge_v3_strict __pyx_string_tab[2460]
#define __pyx_n_u_is_index __pyx_string_tab[2461]
#define __pyx_n_u_is_initialized __pyx_string_tab[2462]
#define __pyx_n_u_is_integer_value __pyx_string_tab[2463]
#define __pyx_n_u_is_max_exact_2 __pyx_string_tab[2464]
#define __pyx_n_u_is_min_exact_2 __pyx_string_tab[2465]
#define __pyx_n_u_is_mutable_2 __pyx_string_tab[2466]
#define __pyx_n_u_is_nan __pyx_string_tab[2467]
#define __pyx_n_u_is_null __pyx_string_tab[2468]
#define __pyx_n_u_is_pandas_object __pyx_string_tab[2469]
#define __pyx_n_u_is_path_like __pyx_string_tab[2470]
#define __pyx_n_u_is_primitive __pyx_string_tab[2471]
#define __pyx_n_u_is_series __pyx_string_tab[2472]
#define __pyx_n_u_is_sparse __pyx_string_tab[2473]
#define __pyx_n_u_is_threading_enabled __pyx_string_tab[2474]
#define __pyx_n_u_is_v1 __pyx_string_tab[2475]
#define __pyx_n_u_is_valid __pyx_string_tab[2476]
#define __pyx_n_u_isatty __pyx_string_tab[2477]
#define __pyx_n_u_isdir __pyx_string_tab[2478]
#define __pyx_n_u_isnan __pyx_string_tab[2479]
#define __pyx_n_u_item __pyx_string_tab[2480]
#define __pyx_n_u_item_field __pyx_string_tab[2481]
#define __pyx_n_u_item_type __pyx_string_tab[2482]
#define __pyx_n_u_items __pyx_string_tab[2483]
#define __pyx_n_u_items_2 __pyx_string_tab[2484]
#define __pyx_n_u_items_locals_genexpr __pyx_string_tab[2485]
#define __pyx_n_u_iter __pyx_string_tab[2486]
#define __pyx_n_u_iter_batches_with_custom_metadat __pyx_string_tab[2487]
#define __pyx_n_u_iterchunks __pyx_string_tab[2488]
#define __pyx_n_u_itercolumns __pyx_string_tab[2489]
#define __pyx_n_u_jemalloc_memory_pool __pyx_string_tab[2490]
#define __pyx_n_u_jemalloc_set_decay_ms __pyx_string_tab[2491]
#define __pyx_n_u_join __pyx_string_tab[2492]
#define __pyx_n_u_join_asof __pyx_string_tab[2493]
#define __pyx_n_u_join_type __pyx_string_tab[2494]
#define __pyx_n_u_json __pyx_string_tab[2495]
#define __pyx_n_u_json_2 __pyx_string_tab[2496]
#define __pyx_n_u_k __pyx_string_tab[2497]
#define __pyx_n_u_key __pyx_string_tab[2498]
#define __pyx_n_u_key_field __pyx_string_tab[2499]
#define __pyx_n_u_key_type __pyx_string_tab[2500]
#define __pyx_n_u_keys __pyx_string_tab[2501]
#define __pyx_n_u_keys_2 __pyx_string_tab[2502]
#define __pyx_n_u_keys_sorted __pyx_string_tab[2503]
#define __pyx_n_u_kind __pyx_string_tab[2504]
#define __pyx_n_u_kwargs __pyx_string_tab[2505]
#define __pyx_n_u_large_binary __pyx_string_tab[2506]
#define __pyx_n_u_large_list __pyx_string_tab[2507]
#define __pyx_n_u_large_list_view __pyx_string_tab[2508]
#define __pyx_n_u_large_str __pyx_string_tab[2509]
#define __pyx_n_u_large_string __pyx_string_tab[2510]
#define __pyx_n_u_large_utf8 __pyx_string_tab[2511]
#define __pyx_n_u_lazy __pyx_string_tab[2512]
#define __pyx_n_u_left_suffix __pyx_string_tab[2513]
#define __pyx_n_u_length __pyx_string_tab[2514]
#define __pyx_n_u_level __pyx_string_tab[2515]
#define __pyx_n_u_lexsort __pyx_string_tab[2516]
#define __pyx_n_u_lib __pyx_string_tab[2517]
#define __pyx_n_u_line __pyx_string_tab[2518]
#define __pyx_n_u_lines __pyx_string_tab[2519]
#define __pyx_n_u_list __pyx_string_tab[2520]
#define __pyx_n_u_list_flatten __pyx_string_tab[2521]
#define __pyx_n_u_list_parent_indices __pyx_string_tab[2522]
#define __pyx_n_u_list_size __pyx_string_tab[2523]
#define __pyx_n_u_list_size_2 __pyx_string_tab[2524]
#define __pyx_n_u_list_type __pyx_string_tab[2525]
#define __pyx_n_u_list_value_length __pyx_string_tab[2526]
#define __pyx_n_u_list_view __pyx_string_tab[2527]
#define __pyx_n_u_loads __pyx_string_tab[2528]
#define __pyx_n_u_log_memory_allocations __pyx_string_tab[2529]
#define __pyx_n_u_logging_memory_pool __pyx_string_tab[2530]
#define __pyx_n_u_logical_length __pyx_string_tab[2531]
#define __pyx_n_u_logical_length_2 __pyx_string_tab[2532]
#define __pyx_n_u_logical_offset __pyx_string_tab[2533]
#define __pyx_n_u_logical_offset_2 __pyx_string_tab[2534]
#define __pyx_n_u_lookup __pyx_string_tab[2535]
#define __pyx_n_u_lossy __pyx_string_tab[2536]
#define __pyx_n_u_lower __pyx_string_tab[2537]
#define __pyx_n_u_lz4_2 __pyx_string_tab[2538]
#define __pyx_n_u_ma __pyx_string_tab[2539]
#define __pyx_n_u_main __pyx_string_tab[2540]
#define __pyx_n_u_main_thread __pyx_string_tab[2541]
#define __pyx_n_u_major __pyx_string_tab[2542]
#define __pyx_n_u_make_datetimetz __pyx_string_tab[2543]
#define __pyx_n_u_make_shape_or_strides_buffer __pyx_string_tab[2544]
#define __pyx_n_u_make_tz_aware __pyx_string_tab[2545]
#define __pyx_n_u_map __pyx_string_tab[2546]
#define __pyx_n_u_mapping __pyx_string_tab[2547]
#define __pyx_n_u_maps_as_pydicts __pyx_string_tab[2548]
#define __pyx_n_u_mask __pyx_string_tab[2549]
#define __pyx_n_u_math __pyx_string_tab[2550]
#define __pyx_n_u_max_2 __pyx_string_tab[2551]
#define __pyx_n_u_max_chunksize __pyx_string_tab[2552]
#define __pyx_n_u_max_ideal_request_size_mib __pyx_string_tab[2553]
#define __pyx_n_u_max_memory_2 __pyx_string_tab[2554]
#define __pyx_n_u_max_output_size __pyx_string_tab[2555]
#define __pyx_n_u_maximum_compression_level __pyx_string_tab[2556]
#define __pyx_n_u_maybe_py_list __pyx_string_tab[2557]
#define __pyx_n_u_member_names __pyx_string_tab[2558]
#define __pyx_n_u_members __pyx_string_tab[2559]
#define __pyx_n_u_memory_map __pyx_string_tab[2560]
#define __pyx_n_u_memory_pool __pyx_string_tab[2561]
#define __pyx_n_u_message __pyx_string_tab[2562]
#define __pyx_n_u_meta __pyx_string_tab[2563]
#define __pyx_n_u_metaclass __pyx_string_tab[2564]
#define __pyx_n_u_metadata __pyx_string_tab[2565]
#define __pyx_n_u_metadata_length_2 __pyx_string_tab[2566]
#define __pyx_n_u_metadata_version __pyx_string_tab[2567]
#define __pyx_n_u_microseconds __pyx_string_tab[2568]
#define __pyx_n_u_milliseconds __pyx_string_tab[2569]
#define __pyx_n_u_mimalloc_memory_pool __pyx_string_tab[2570]
#define __pyx_n_u_min_2 __pyx_string_tab[2571]
#define __pyx_n_u_minimum_compression_level __pyx_string_tab[2572]
#define __pyx_n_u_minor __pyx_string_tab[2573]
#define __pyx_n_u_missing __pyx_string_tab[2574]
#define __pyx_n_u_mmap __pyx_string_tab[2575]
#define __pyx_n_u_mode __pyx_string_tab[2576]
#define __pyx_n_u_module __pyx_string_tab[2577]
#define __pyx_n_u_module_2 __pyx_string_tab[2578]
#define __pyx_n_u_month_day_nano_interval __pyx_string_tab[2579]
#define __pyx_n_u_mro_entries __pyx_string_tab[2580]
#define __pyx_n_u_ms __pyx_string_tab[2581]
#define __pyx_n_u_n __pyx_string_tab[2582]
#define __pyx_n_u_n_rows __pyx_string_tab[2583]
#define __pyx_n_u_name __pyx_string_tab[2584]
#define __pyx_n_u_name_2 __pyx_string_tab[2585]
#define __pyx_n_u_name_3 __pyx_string_tab[2586]
#define __pyx_n_u_namedtuple __pyx_string_tab[2587]
#define __pyx_n_u_names __pyx_string_tab[2588]
#define __pyx_n_u_nan_as_null __pyx_string_tab[2589]
#define __pyx_n_u_nan_is_null __pyx_string_tab[2590]
#define __pyx_n_u_nbatches __pyx_string_tab[2591]
#define __pyx_n_u_nbytes __pyx_string_tab[2592]
#define __pyx_n_u_ndarray __pyx_string_tab[2593]
#define __pyx_n_u_ndarray_to_arrow_type __pyx_string_tab[2594]
#define __pyx_n_u_ndim __pyx_string_tab[2595]
#define __pyx_n_u_new __pyx_string_tab[2596]
#define __pyx_n_u_new_field __pyx_string_tab[2597]
#define __pyx_n_u_new_name __pyx_string_tab[2598]
#define __pyx_n_u_new_schema __pyx_string_tab[2599]
#define __pyx_n_u_new_size __pyx_string_tab[2600]
#define __pyx_n_u_new_type __pyx_string_tab[2601]
#define __pyx_n_u_newcols __pyx_string_tab[2602]
#define __pyx_n_u_next __pyx_string_tab[2603]
#define __pyx_n_u_nf __pyx_string_tab[2604]
#define __pyx_n_u_nomask __pyx_string_tab[2605]
#define __pyx_n_u_non_default_kwargs __pyx_string_tab[2606]
#define __pyx_n_u_none __pyx_string_tab[2607]
#define __pyx_n_u_normalize_slice __pyx_string_tab[2608]
#define __pyx_n_u_not_equal __pyx_string_tab[2609]
#define __pyx_n_u_np __pyx_string_tab[2610]
#define __pyx_n_u_ns __pyx_string_tab[2611]
#define __pyx_n_u_nt __pyx_string_tab[2612]
#define __pyx_n_u_nthreads __pyx_string_tab[2613]
#define __pyx_n_u_null __pyx_string_tab[2614]
#define __pyx_n_u_null_bitmap __pyx_string_tab[2615]
#define __pyx_n_u_null_count __pyx_string_tab[2616]
#define __pyx_n_u_null_encoding __pyx_string_tab[2617]
#define __pyx_n_u_null_selection_behavior __pyx_string_tab[2618]
#define __pyx_n_u_null_to_nan __pyx_string_tab[2619]
#define __pyx_n_u_nullable __pyx_string_tab[2620]
#define __pyx_n_u_nulls __pyx_string_tab[2621]
#define __pyx_n_u_num_allocations __pyx_string_tab[2622]
#define __pyx_n_u_num_arrays __pyx_string_tab[2623]
#define __pyx_n_u_num_buffers __pyx_string_tab[2624]
#define __pyx_n_u_num_chunks __pyx_string_tab[2625]
#define __pyx_n_u_num_columns __pyx_string_tab[2626]
#define __pyx_n_u_num_dictionary_batches __pyx_string_tab[2627]
#define __pyx_n_u_num_dictionary_deltas __pyx_string_tab[2628]
#define __pyx_n_u_num_fields __pyx_string_tab[2629]
#define __pyx_n_u_num_messages __pyx_string_tab[2630]
#define __pyx_n_u_num_record_batches __pyx_string_tab[2631]
#define __pyx_n_u_num_replaced_dictionaries __pyx_string_tab[2632]
#define __pyx_n_u_num_rows __pyx_string_tab[2633]
#define __pyx_n_u_num_threads __pyx_string_tab[2634]
#define __pyx_n_u_numpy __pyx_string_tab[2635]
#define __pyx_n_u_o __pyx_string_tab[2636]
#define __pyx_n_u_obj __pyx_string_tab[2637]
#define __pyx_n_u_object __pyx_string_tab[2638]
#define __pyx_n_u_object_2 __pyx_string_tab[2639]
#define __pyx_n_u_offset __pyx_string_tab[2640]
#define __pyx_n_u_offsets __pyx_string_tab[2641]
#define __pyx_n_u_offsets_2 __pyx_string_tab[2642]
#define __pyx_n_u_on __pyx_string_tab[2643]
#define __pyx_n_u_opaque __pyx_string_tab[2644]
#define __pyx_n_u_open __pyx_string_tab[2645]
#define __pyx_n_u_open_2 __pyx_string_tab[2646]
#define __pyx_n_u_open_stream __pyx_string_tab[2647]
#define __pyx_n_u_opt __pyx_string_tab[2648]
#define __pyx_n_u_options __pyx_string_tab[2649]
#define __pyx_n_u_order __pyx_string_tab[2650]
#define __pyx_n_u_ordered __pyx_string_tab[2651]
#define __pyx_n_u_ordered_dict __pyx_string_tab[2652]
#define __pyx_n_u_os __pyx_string_tab[2653]
#define __pyx_n_u_other __pyx_string_tab[2654]
#define __pyx_n_u_other_arr __pyx_string_tab[2655]
#define __pyx_n_u_other_batch __pyx_string_tab[2656]
#define __pyx_n_u_other_table __pyx_string_tab[2657]
#define __pyx_n_u_other_type __pyx_string_tab[2658]
#define __pyx_n_u_out __pyx_string_tab[2659]
#define __pyx_n_u_out_array __pyx_string_tab[2660]
#define __pyx_n_u_out_buf __pyx_string_tab[2661]
#define __pyx_n_u_out_coords __pyx_string_tab[2662]
#define __pyx_n_u_out_data __pyx_string_tab[2663]
#define __pyx_n_u_out_indices __pyx_string_tab[2664]
#define __pyx_n_u_out_indptr __pyx_string_tab[2665]
#define __pyx_n_u_out_ptr __pyx_string_tab[2666]
#define __pyx_n_u_out_schema __pyx_string_tab[2667]
#define __pyx_n_u_out_schema_ptr __pyx_string_tab[2668]
#define __pyx_n_u_output __pyx_string_tab[2669]
#define __pyx_n_u_output_buffer __pyx_string_tab[2670]
#define __pyx_n_u_output_length __pyx_string_tab[2671]
#define __pyx_n_u_output_size __pyx_string_tab[2672]
#define __pyx_n_u_output_stream __pyx_string_tab[2673]
#define __pyx_n_u_output_type __pyx_string_tab[2674]
#define __pyx_n_u_owned_buf __pyx_string_tab[2675]
#define __pyx_n_u_pac __pyx_string_tab[2676]
#define __pyx_n_u_pac_2 __pyx_string_tab[2677]
#define __pyx_n_u_pac_3 __pyx_string_tab[2678]
#define __pyx_n_u_pack __pyx_string_tab[2679]
#define __pyx_n_u_package_kind __pyx_string_tab[2680]
#define __pyx_n_u_pandas __pyx_string_tab[2681]
#define __pyx_n_u_pandas_api __pyx_string_tab[2682]
#define __pyx_n_u_pandas_compat __pyx_string_tab[2683]
#define __pyx_n_u_pandas_dtype __pyx_string_tab[2684]
#define __pyx_n_u_pandas_type __pyx_string_tab[2685]
#define __pyx_n_u_pandas_type_map __pyx_string_tab[2686]
#define __pyx_n_u_parent __pyx_string_tab[2687]
#define __pyx_n_u_patch __pyx_string_tab[2688]
#define __pyx_n_u_path __pyx_string_tab[2689]
#define __pyx_n_u_pc __pyx_string_tab[2690]
#define __pyx_n_u_pc_2 __pyx_string_tab[2691]
#define __pyx_n_u_pc_3 __pyx_string_tab[2692]
#define __pyx_n_u_pd __pyx_string_tab[2693]
#define __pyx_n_u_perform_join __pyx_string_tab[2694]
#define __pyx_n_u_perform_join_asof __pyx_string_tab[2695]
#define __pyx_n_u_permissive __pyx_string_tab[2696]
#define __pyx_n_u_permutation __pyx_string_tab[2697]
#define __pyx_n_u_pickle __pyx_string_tab[2698]
#define __pyx_n_u_pieces __pyx_string_tab[2699]
#define __pyx_n_u_pool __pyx_string_tab[2700]
#define __pyx_n_u_pop __pyx_string_tab[2701]
#define __pyx_n_u_pos __pyx_string_tab[2702]
#define __pyx_n_u_position __pyx_string_tab[2703]
#define __pyx_n_u_precision __pyx_string_tab[2704]
#define __pyx_n_u_prefetch_limit __pyx_string_tab[2705]
#define __pyx_n_u_prepare __pyx_string_tab[2706]
#define __pyx_n_u_present __pyx_string_tab[2707]
#define __pyx_n_u_preserve_index __pyx_string_tab[2708]
#define __pyx_n_u_preview_cols __pyx_string_tab[2709]
#define __pyx_n_u_print_stats __pyx_string_tab[2710]
#define __pyx_n_u_prod __pyx_string_tab[2711]
#define __pyx_n_u_promote __pyx_string_tab[2712]
#define __pyx_n_u_promote_options __pyx_string_tab[2713]
#define __pyx_n_u_protocol __pyx_string_tab[2714]
#define __pyx_n_u_proxy_memory_pool __pyx_string_tab[2715]
#define __pyx_n_u_put_nowait __pyx_string_tab[2716]
#define __pyx_n_u_py_buf __pyx_string_tab[2717]
#define __pyx_n_u_py_buffer __pyx_string_tab[2718]
#define __pyx_n_u_py_field __pyx_string_tab[2719]
#define __pyx_n_u_py_list __pyx_string_tab[2720]
#define __pyx_n_u_py_val __pyx_string_tab[2721]
#define __pyx_n_u_pyarrow_3 __pyx_string_tab[2722]
#define __pyx_n_u_pyarrow_acero __pyx_string_tab[2723]
#define __pyx_n_u_pyarrow_compute __pyx_string_tab[2724]
#define __pyx_n_u_pyarrow_cuda __pyx_string_tab[2725]
#define __pyx_n_u_pyarrow_interchange_dataframe __pyx_string_tab[2726]
#define __pyx_n_u_pyarrow_lib __pyx_string_tab[2727]
#define __pyx_n_u_pyarrow_pandas_compat __pyx_string_tab[2728]
#define __pyx_n_u_pyarrow_util __pyx_string_tab[2729]
#define __pyx_n_u_pyarrow_vendored_version __pyx_string_tab[2730]
#define __pyx_n_u_pybuf __pyx_string_tab[2731]
#define __pyx_n_u_pydecimal __pyx_string_tab[2732]
#define __pyx_n_u_pydict __pyx_string_tab[2733]
#define __pyx_n_u_pylist __pyx_string_tab[2734]
#define __pyx_n_u_pyobj __pyx_string_tab[2735]
#define __pyx_n_u_python_extension_types_registry __pyx_string_tab[2736]
#define __pyx_n_u_pyx_capi __pyx_string_tab[2737]
#define __pyx_n_u_pyx_checksum __pyx_string_tab[2738]
#define __pyx_n_u_pyx_result __pyx_string_tab[2739]
#define __pyx_n_u_pyx_state __pyx_string_tab[2740]
#define __pyx_n_u_pyx_type __pyx_string_tab[2741]
#define __pyx_n_u_pyx_unpickle__PandasAPIShim __pyx_string_tab[2742]
#define __pyx_n_u_pyx_unpickle__PandasConvertibl __pyx_string_tab[2743]
#define __pyx_n_u_pyx_unpickle__Tabular __pyx_string_tab[2744]
#define __pyx_n_u_pyx_vtable __pyx_string_tab[2745]
#define __pyx_n_u_qsize __pyx_string_tab[2746]
#define __pyx_n_u_qualname __pyx_string_tab[2747]
#define __pyx_n_u_queue __pyx_string_tab[2748]
#define __pyx_n_u_r __pyx_string_tab[2749]
#define __pyx_n_u_range_size_limit __pyx_string_tab[2750]
#define __pyx_n_u_ravel __pyx_string_tab[2751]
#define __pyx_n_u_raw __pyx_string_tab[2752]
#define __pyx_n_u_rb_2 __pyx_string_tab[2753]
#define __pyx_n_u_rd_handle __pyx_string_tab[2754]
#define __pyx_n_u_re __pyx_string_tab[2755]
#define __pyx_n_u_read __pyx_string_tab[2756]
#define __pyx_n_u_read1 __pyx_string_tab[2757]
#define __pyx_n_u_read_all __pyx_string_tab[2758]
#define __pyx_n_u_read_at __pyx_string_tab[2759]
#define __pyx_n_u_read_buffer __pyx_string_tab[2760]
#define __pyx_n_u_read_message __pyx_string_tab[2761]
#define __pyx_n_u_read_next_batch __pyx_string_tab[2762]
#define __pyx_n_u_read_next_batch_with_custom_meta __pyx_string_tab[2763]
#define __pyx_n_u_read_next_message __pyx_string_tab[2764]
#define __pyx_n_u_read_pandas __pyx_string_tab[2765]
#define __pyx_n_u_read_record_batch __pyx_string_tab[2766]
#define __pyx_n_u_read_schema __pyx_string_tab[2767]
#define __pyx_n_u_read_tensor __pyx_string_tab[2768]
#define __pyx_n_u_readable __pyx_string_tab[2769]
#define __pyx_n_u_readall __pyx_string_tab[2770]
#define __pyx_n_u_reader __pyx_string_tab[2771]
#define __pyx_n_u_readinto __pyx_string_tab[2772]
#define __pyx_n_u_readline __pyx_string_tab[2773]
#define __pyx_n_u_readlines __pyx_string_tab[2774]
#define __pyx_n_u_reconstruct __pyx_string_tab[2775]
#define __pyx_n_u_reconstruct_record_batch __pyx_string_tab[2776]
#define __pyx_n_u_reconstruct_table __pyx_string_tab[2777]
#define __pyx_n_u_record_batch __pyx_string_tab[2778]
#define __pyx_n_u_recordbatch __pyx_string_tab[2779]
#define __pyx_n_u_recordbatches __pyx_string_tab[2780]
#define __pyx_n_u_recursive __pyx_string_tab[2781]
#define __pyx_n_u_reduce __pyx_string_tab[2782]
#define __pyx_n_u_reduce_cython __pyx_string_tab[2783]
#define __pyx_n_u_reduce_ex __pyx_string_tab[2784]
#define __pyx_n_u_ree_array __pyx_string_tab[2785]
#define __pyx_n_u_ree_type __pyx_string_tab[2786]
#define __pyx_n_u_register __pyx_string_tab[2787]
#define __pyx_n_u_register_extension_type __pyx_string_tab[2788]
#define __pyx_n_u_registry_nanny __pyx_string_tab[2789]
#define __pyx_n_u_release_registry __pyx_string_tab[2790]
#define __pyx_n_u_release_unused __pyx_string_tab[2791]
#define __pyx_n_u_remove __pyx_string_tab[2792]
#define __pyx_n_u_remove_column __pyx_string_tab[2793]
#define __pyx_n_u_remove_metadata __pyx_string_tab[2794]
#define __pyx_n_u_rename_columns __pyx_string_tab[2795]
#define __pyx_n_u_repeat __pyx_string_tab[2796]
#define __pyx_n_u_replace __pyx_string_tab[2797]
#define __pyx_n_u_replace_schema_metadata __pyx_string_tab[2798]
#define __pyx_n_u_repr __pyx_string_tab[2799]
#define __pyx_n_u_requested __pyx_string_tab[2800]
#define __pyx_n_u_requested_schema __pyx_string_tab[2801]
#define __pyx_n_u_requested_type __pyx_string_tab[2802]
#define __pyx_n_u_require __pyx_string_tab[2803]
#define __pyx_n_u_requirements __pyx_string_tab[2804]
#define __pyx_n_u_res __pyx_string_tab[2805]
#define __pyx_n_u_resizable __pyx_string_tab[2806]
#define __pyx_n_u_resize __pyx_string_tab[2807]
#define __pyx_n_u_restore_array __pyx_string_tab[2808]
#define __pyx_n_u_result __pyx_string_tab[2809]
#define __pyx_n_u_result_dict __pyx_string_tab[2810]
#define __pyx_n_u_result_obj __pyx_string_tab[2811]
#define __pyx_n_u_results __pyx_string_tab[2812]
#define __pyx_n_u_ret __pyx_string_tab[2813]
#define __pyx_n_u_return __pyx_string_tab[2814]
#define __pyx_n_u_right_by __pyx_string_tab[2815]
#define __pyx_n_u_right_keys __pyx_string_tab[2816]
#define __pyx_n_u_right_on __pyx_string_tab[2817]
#define __pyx_n_u_right_suffix __pyx_string_tab[2818]
#define __pyx_n_u_right_table __pyx_string_tab[2819]
#define __pyx_n_u_row __pyx_string_tab[2820]
#define __pyx_n_u_row_major __pyx_string_tab[2821]
#define __pyx_n_u_run_end_encode __pyx_string_tab[2822]
#define __pyx_n_u_run_end_encoded __pyx_string_tab[2823]
#define __pyx_n_u_run_end_type __pyx_string_tab[2824]
#define __pyx_n_u_run_end_type_2 __pyx_string_tab[2825]
#define __pyx_n_u_run_ends __pyx_string_tab[2826]
#define __pyx_n_u_run_ends_2 __pyx_string_tab[2827]
#define __pyx_n_u_runtime_info __pyx_string_tab[2828]
#define __pyx_n_u_s __pyx_string_tab[2829]
#define __pyx_n_u_safe __pyx_string_tab[2830]
#define __pyx_n_u_sarr __pyx_string_tab[2831]
#define __pyx_n_u_scalar __pyx_string_tab[2832]
#define __pyx_n_u_scale __pyx_string_tab[2833]
#define __pyx_n_u_schema __pyx_string_tab[2834]
#define __pyx_n_u_schema_as_string __pyx_string_tab[2835]
#define __pyx_n_u_schema_capsule __pyx_string_tab[2836]
#define __pyx_n_u_schemas __pyx_string_tab[2837]
#define __pyx_n_u_scipy __pyx_string_tab[2838]
#define __pyx_n_u_scipy_sparse __pyx_string_tab[2839]
#define __pyx_n_u_seconds __pyx_string_tab[2840]
#define __pyx_n_u_seek __pyx_string_tab[2841]
#define __pyx_n_u_seekable __pyx_string_tab[2842]
#define __pyx_n_u_select __pyx_string_tab[2843]
#define __pyx_n_u_self __pyx_string_tab[2844]
#define __pyx_n_u_self_destruct __pyx_string_tab[2845]
#define __pyx_n_u_send __pyx_string_tab[2846]
#define __pyx_n_u_serialize __pyx_string_tab[2847]
#define __pyx_n_u_serialize_to __pyx_string_tab[2848]
#define __pyx_n_u_serialized __pyx_string_tab[2849]
#define __pyx_n_u_series __pyx_string_tab[2850]
#define __pyx_n_u_set __pyx_string_tab[2851]
#define __pyx_n_u_set_column __pyx_string_tab[2852]
#define __pyx_n_u_set_cpu_count __pyx_string_tab[2853]
#define __pyx_n_u_set_io_thread_count __pyx_string_tab[2854]
#define __pyx_n_u_set_memcopy_blocksize __pyx_string_tab[2855]
#define __pyx_n_u_set_memcopy_threads __pyx_string_tab[2856]
#define __pyx_n_u_set_memcopy_threshold __pyx_string_tab[2857]
#define __pyx_n_u_set_memory_pool __pyx_string_tab[2858]
#define __pyx_n_u_set_name __pyx_string_tab[2859]
#define __pyx_n_u_set_timezone_db_path __pyx_string_tab[2860]
#define __pyx_n_u_setdefault __pyx_string_tab[2861]
#define __pyx_n_u_setstate __pyx_string_tab[2862]
#define __pyx_n_u_setstate_cython __pyx_string_tab[2863]
#define __pyx_n_u_shape __pyx_string_tab[2864]
#define __pyx_n_u_show_field_metadata __pyx_string_tab[2865]
#define __pyx_n_u_show_metadata __pyx_string_tab[2866]
#define __pyx_n_u_show_schema_metadata __pyx_string_tab[2867]
#define __pyx_n_u_shrink_to_fit __pyx_string_tab[2868]
#define __pyx_n_u_sig __pyx_string_tab[2869]
#define __pyx_n_u_signal __pyx_string_tab[2870]
#define __pyx_n_u_signum __pyx_string_tab[2871]
#define __pyx_n_u_simd_level __pyx_string_tab[2872]
#define __pyx_n_u_sink __pyx_string_tab[2873]
#define __pyx_n_u_size __pyx_string_tab[2874]
#define __pyx_n_u_sizeof __pyx_string_tab[2875]
#define __pyx_n_u_sizes __pyx_string_tab[2876]
#define __pyx_n_u_sizes_2 __pyx_string_tab[2877]
#define __pyx_n_u_skip_new_lines __pyx_string_tab[2878]
#define __pyx_n_u_skipna __pyx_string_tab[2879]
#define __pyx_n_u_sleep __pyx_string_tab[2880]
#define __pyx_n_u_slice __pyx_string_tab[2881]
#define __pyx_n_u_slots __pyx_string_tab[2882]
#define __pyx_n_u_snappy __pyx_string_tab[2883]
#define __pyx_n_u_so_version __pyx_string_tab[2884]
#define __pyx_n_u_sort __pyx_string_tab[2885]
#define __pyx_n_u_sort_by __pyx_string_tab[2886]
#define __pyx_n_u_sort_indices __pyx_string_tab[2887]
#define __pyx_n_u_sort_keys __pyx_string_tab[2888]
#define __pyx_n_u_sorting __pyx_string_tab[2889]
#define __pyx_n_u_source __pyx_string_tab[2890]
#define __pyx_n_u_source_path __pyx_string_tab[2891]
#define __pyx_n_u_sp __pyx_string_tab[2892]
#define __pyx_n_u_sp_scalar __pyx_string_tab[2893]
#define __pyx_n_u_sp_storage __pyx_string_tab[2894]
#define __pyx_n_u_sp_tensor __pyx_string_tab[2895]
#define __pyx_n_u_sparse __pyx_string_tab[2896]
#define __pyx_n_u_sparse_union __pyx_string_tab[2897]
#define __pyx_n_u_split_blocks __pyx_string_tab[2898]
#define __pyx_n_u_src_codec __pyx_string_tab[2899]
#define __pyx_n_u_src_encoding __pyx_string_tab[2900]
#define __pyx_n_u_stable __pyx_string_tab[2901]
#define __pyx_n_u_stack __pyx_string_tab[2902]
#define __pyx_n_u_stacklevel __pyx_string_tab[2903]
#define __pyx_n_u_start __pyx_string_tab[2904]
#define __pyx_n_u_startswith __pyx_string_tab[2905]
#define __pyx_n_u_state __pyx_string_tab[2906]
#define __pyx_n_u_staticmethod __pyx_string_tab[2907]
#define __pyx_n_u_step __pyx_string_tab[2908]
#define __pyx_n_u_stop __pyx_string_tab[2909]
#define __pyx_n_u_storage __pyx_string_tab[2910]
#define __pyx_n_u_storage_arr __pyx_string_tab[2911]
#define __pyx_n_u_storage_type __pyx_string_tab[2912]
#define __pyx_n_u_str __pyx_string_tab[2913]
#define __pyx_n_u_str_2 __pyx_string_tab[2914]
#define __pyx_n_u_stream __pyx_string_tab[2915]
#define __pyx_n_u_stream_capsule __pyx_string_tab[2916]
#define __pyx_n_u_stream_or_path __pyx_string_tab[2917]
#define __pyx_n_u_strftime __pyx_string_tab[2918]
#define __pyx_n_u_strict __pyx_string_tab[2919]
#define __pyx_n_u_strides __pyx_string_tab[2920]
#define __pyx_n_u_string __pyx_string_tab[2921]
#define __pyx_n_u_string_to_tzinfo __pyx_string_tab[2922]
#define __pyx_n_u_string_view __pyx_string_tab[2923]
#define __pyx_n_u_stringify_path __pyx_string_tab[2924]
#define __pyx_n_u_strings_to_categorical __pyx_string_tab[2925]
#define __pyx_n_u_struct __pyx_string_tab[2926]
#define __pyx_n_u_struct_2 __pyx_string_tab[2927]
#define __pyx_n_u_struct_array __pyx_string_tab[2928]
#define __pyx_n_u_struct_type __pyx_string_tab[2929]
#define __pyx_n_u_sum __pyx_string_tab[2930]
#define __pyx_n_u_sum_duplicates __pyx_string_tab[2931]
#define __pyx_n_u_super __pyx_string_tab[2932]
#define __pyx_n_u_supported_memory_backends __pyx_string_tab[2933]
#define __pyx_n_u_supports_compression_level __pyx_string_tab[2934]
#define __pyx_n_u_sys __pyx_string_tab[2935]
#define __pyx_n_u_system_memory_pool __pyx_string_tab[2936]
#define __pyx_n_u_t_reader __pyx_string_tab[2937]
#define __pyx_n_u_table __pyx_string_tab[2938]
#define __pyx_n_u_table_2 __pyx_string_tab[2939]
#define __pyx_n_u_table_or_batch __pyx_string_tab[2940]
#define __pyx_n_u_table_to_blocks __pyx_string_tab[2941]
#define __pyx_n_u_table_to_dataframe __pyx_string_tab[2942]
#define __pyx_n_u_tables __pyx_string_tab[2943]
#define __pyx_n_u_take __pyx_string_tab[2944]
#define __pyx_n_u_target __pyx_string_tab[2945]
#define __pyx_n_u_target_schema __pyx_string_tab[2946]
#define __pyx_n_u_target_type __pyx_string_tab[2947]
#define __pyx_n_u_tb __pyx_string_tab[2948]
#define __pyx_n_u_tell __pyx_string_tab[2949]
#define __pyx_n_u_temp_memo __pyx_string_tab[2950]
#define __pyx_n_u_tensor __pyx_string_tab[2951]
#define __pyx_n_u_test __pyx_string_tab[2952]
#define __pyx_n_u_this_arr __pyx_string_tab[2953]
#define __pyx_n_u_this_batch __pyx_string_tab[2954]
#define __pyx_n_u_this_table __pyx_string_tab[2955]
#define __pyx_n_u_threading __pyx_string_tab[2956]
#define __pyx_n_u_threshold __pyx_string_tab[2957]
#define __pyx_n_u_throw __pyx_string_tab[2958]
#define __pyx_n_u_time __pyx_string_tab[2959]
#define __pyx_n_u_time32 __pyx_string_tab[2960]
#define __pyx_n_u_time64 __pyx_string_tab[2961]
#define __pyx_n_u_time_to_first_byte_millis __pyx_string_tab[2962]
#define __pyx_n_u_timedelta __pyx_string_tab[2963]
#define __pyx_n_u_timeout __pyx_string_tab[2964]
#define __pyx_n_u_timestamp __pyx_string_tab[2965]
#define __pyx_n_u_timestamp_as_object __pyx_string_tab[2966]
#define __pyx_n_u_timezone __pyx_string_tab[2967]
#define __pyx_n_u_title __pyx_string_tab[2968]
#define __pyx_n_u_to_batches __pyx_string_tab[2969]
#define __pyx_n_u_to_dict __pyx_string_tab[2970]
#define __pyx_n_u_to_numpy __pyx_string_tab[2971]
#define __pyx_n_u_to_numpy_ndarray __pyx_string_tab[2972]
#define __pyx_n_u_to_pandas __pyx_string_tab[2973]
#define __pyx_n_u_to_pandas_2 __pyx_string_tab[2974]
#define __pyx_n_u_to_pandas_dtype __pyx_string_tab[2975]
#define __pyx_n_u_to_pandas_dtype_2 __pyx_string_tab[2976]
#define __pyx_n_u_to_pybytes __pyx_string_tab[2977]
#define __pyx_n_u_to_pydata_sparse __pyx_string_tab[2978]
#define __pyx_n_u_to_pydict __pyx_string_tab[2979]
#define __pyx_n_u_to_pylist __pyx_string_tab[2980]
#define __pyx_n_u_to_reader __pyx_string_tab[2981]
#define __pyx_n_u_to_scipy __pyx_string_tab[2982]
#define __pyx_n_u_to_string __pyx_string_tab[2983]
#define __pyx_n_u_to_struct_array __pyx_string_tab[2984]
#define __pyx_n_u_to_tensor __pyx_string_tab[2985]
#define __pyx_n_u_tobytes __pyx_string_tab[2986]
#define __pyx_n_u_tolerance __pyx_string_tab[2987]
#define __pyx_n_u_tolist __pyx_string_tab[2988]
#define __pyx_n_u_top_level_indent __pyx_string_tab[2989]
#define __pyx_n_u_tosort __pyx_string_tab[2990]
#define __pyx_n_u_total_allocated_bytes __pyx_string_tab[2991]
#define __pyx_n_u_total_buffer_size __pyx_string_tab[2992]
#define __pyx_n_u_total_bytes __pyx_string_tab[2993]
#define __pyx_n_u_total_bytes_allocated __pyx_string_tab[2994]
#define __pyx_n_u_traceback __pyx_string_tab[2995]
#define __pyx_n_u_transcoding_input_stream __pyx_string_tab[2996]
#define __pyx_n_u_transfer_bandwidth_mib_per_sec __pyx_string_tab[2997]
#define __pyx_n_u_transform_func __pyx_string_tab[2998]
#define __pyx_n_u_truncate __pyx_string_tab[2999]
#define __pyx_n_u_truncate_metadata __pyx_string_tab[3000]
#define __pyx_n_u_ty __pyx_string_tab[3001]
#define __pyx_n_u_typ __pyx_string_tab[3002]
#define __pyx_n_u_type __pyx_string_tab[3003]
#define __pyx_n_u_type_3 __pyx_string_tab[3004]
#define __pyx_n_u_type_4 __pyx_string_tab[3005]
#define __pyx_n_u_type_codes __pyx_string_tab[3006]
#define __pyx_n_u_type_for_alias __pyx_string_tab[3007]
#define __pyx_n_u_type_id __pyx_string_tab[3008]
#define __pyx_n_u_type_name __pyx_string_tab[3009]
#define __pyx_n_u_types __pyx_string_tab[3010]
#define __pyx_n_u_types_mapper __pyx_string_tab[3011]
#define __pyx_n_u_tz __pyx_string_tab[3012]
#define __pyx_n_u_tzinfo __pyx_string_tab[3013]
#define __pyx_n_u_tzinfo_to_string __pyx_string_tab[3014]
#define __pyx_n_u_u1 __pyx_string_tab[3015]
#define __pyx_n_u_u2 __pyx_string_tab[3016]
#define __pyx_n_u_u4 __pyx_string_tab[3017]
#define __pyx_n_u_u8 __pyx_string_tab[3018]
#define __pyx_n_u_uint16 __pyx_string_tab[3019]
#define __pyx_n_u_uint32 __pyx_string_tab[3020]
#define __pyx_n_u_uint64 __pyx_string_tab[3021]
#define __pyx_n_u_uint8 __pyx_string_tab[3022]
#define __pyx_n_u_unify_dictionaries __pyx_string_tab[3023]
#define __pyx_n_u_unify_schemas __pyx_string_tab[3024]
#define __pyx_n_u_union __pyx_string_tab[3025]
#define __pyx_n_u_unique __pyx_string_tab[3026]
#define __pyx_n_u_unit __pyx_string_tab[3027]
#define __pyx_n_u_unit_code __pyx_string_tab[3028]
#define __pyx_n_u_unregister_extension_type __pyx_string_tab[3029]
#define __pyx_n_u_update __pyx_string_tab[3030]
#define __pyx_n_u_upload __pyx_string_tab[3031]
#define __pyx_n_u_upload_locals_bg_write __pyx_string_tab[3032]
#define __pyx_n_u_upload_nothreads __pyx_string_tab[3033]
#define __pyx_n_u_upper __pyx_string_tab[3034]
#define __pyx_n_u_us __pyx_string_tab[3035]
#define __pyx_n_u_use_legacy_format __pyx_string_tab[3036]
#define __pyx_n_u_use_pandas_sentinels __pyx_string_tab[3037]
#define __pyx_n_u_use_setstate __pyx_string_tab[3038]
#define __pyx_n_u_use_threads __pyx_string_tab[3039]
#define __pyx_n_u_use_threads_2 __pyx_string_tab[3040]
#define __pyx_n_u_uses_string_dtype __pyx_string_tab[3041]
#define __pyx_n_u_utc __pyx_string_tab[3042]
#define __pyx_n_u_utf8 __pyx_string_tab[3043]
#define __pyx_n_u_uuid __pyx_string_tab[3044]
#define __pyx_n_u_v __pyx_string_tab[3045]
#define __pyx_n_u_val __pyx_string_tab[3046]
#define __pyx_n_u_validate __pyx_string_tab[3047]
#define __pyx_n_u_value __pyx_string_tab[3048]
#define __pyx_n_u_value_counts __pyx_string_tab[3049]
#define __pyx_n_u_value_field __pyx_string_tab[3050]
#define __pyx_n_u_value_lengths __pyx_string_tab[3051]
#define __pyx_n_u_value_offsets __pyx_string_tab[3052]
#define __pyx_n_u_value_parent_indices __pyx_string_tab[3053]
#define __pyx_n_u_value_type __pyx_string_tab[3054]
#define __pyx_n_u_value_type_2 __pyx_string_tab[3055]
#define __pyx_n_u_values __pyx_string_tab[3056]
#define __pyx_n_u_values_2 __pyx_string_tab[3057]
#define __pyx_n_u_vendor_name __pyx_string_tab[3058]
#define __pyx_n_u_version __pyx_string_tab[3059]
#define __pyx_n_u_version_2 __pyx_string_tab[3060]
#define __pyx_n_u_version_info __pyx_string_tab[3061]
#define __pyx_n_u_view __pyx_string_tab[3062]
#define __pyx_n_u_vstack __pyx_string_tab[3063]
#define __pyx_n_u_w __pyx_string_tab[3064]
#define __pyx_n_u_warn __pyx_string_tab[3065]
#define __pyx_n_u_warnings __pyx_string_tab[3066]
#define __pyx_n_u_wb __pyx_string_tab[3067]
#define __pyx_n_u_whence __pyx_string_tab[3068]
#define __pyx_n_u_window __pyx_string_tab[3069]
#define __pyx_n_u_with_metadata __pyx_string_tab[3070]
#define __pyx_n_u_with_name __pyx_string_tab[3071]
#define __pyx_n_u_with_nullable __pyx_string_tab[3072]
#define __pyx_n_u_with_type __pyx_string_tab[3073]
#define __pyx_n_u_wr_handle __pyx_string_tab[3074]
#define __pyx_n_u_wrap_array __pyx_string_tab[3075]
#define __pyx_n_u_wrapped __pyx_string_tab[3076]
#define __pyx_n_u_writable __pyx_string_tab[3077]
#define __pyx_n_u_write __pyx_string_tab[3078]
#define __pyx_n_u_write_batch __pyx_string_tab[3079]
#define __pyx_n_u_write_queue __pyx_string_tab[3080]
#define __pyx_n_u_write_table __pyx_string_tab[3081]
#define __pyx_n_u_write_tensor __pyx_string_tab[3082]
#define __pyx_n_u_writeable __pyx_string_tab[3083]
#define __pyx_n_u_writelines __pyx_string_tab[3084]
#define __pyx_n_u_writer __pyx_string_tab[3085]
#define __pyx_n_u_writer_thread __pyx_string_tab[3086]
#define __pyx_n_u_x __pyx_string_tab[3087]
#define __pyx_n_u_zero_copy_only __pyx_string_tab[3088]
#define __pyx_n_u_zip __pyx_string_tab[3089]
#define __pyx_n_u_zstd __pyx_string_tab[3090]
#define __pyx_kp_b__15 __pyx_string_tab[3091]
#define __pyx_kp_b__6 __pyx_string_tab[3092]
#define __pyx_kp_b_arrow_Field_MergeOptions_PyObje __pyx_string_tab[3093]
#define __pyx_kp_b_iso88591_0 __pyx_string_tab[3094]
#define __pyx_kp_b_iso88591_0C7_4_2_A __pyx_string_tab[3095]
#define __pyx_kp_b_iso88591_0_0_A_wc_1_q_d_E_1_q_d_HA_A_t2U __pyx_string_tab[3096]
#define __pyx_kp_b_iso88591_0_BfAQ_1B_1 __pyx_string_tab[3097]
#define __pyx_kp_b_iso88591_0_q __pyx_string_tab[3098]
#define __pyx_kp_b_iso88591_0_q_2 __pyx_string_tab[3099]
#define __pyx_kp_b_iso88591_0_x_oQa_a_z_WA_q_Q_1IXQ_ay_1_1 __pyx_string_tab[3100]
#define __pyx_kp_b_iso88591_1 __pyx_string_tab[3101]
#define __pyx_kp_b_iso88591_11A_1_t_L_c_t2_1_vV_1_a __pyx_string_tab[3102]
#define __pyx_kp_b_iso88591_12_L_E_at1_d_Q_a_q __pyx_string_tab[3103]
#define __pyx_kp_b_iso88591_18_4AQ_q_vV1_Qa __pyx_string_tab[3104]
#define __pyx_kp_b_iso88591_1A_M_K_1_vYa __pyx_string_tab[3105]
#define __pyx_kp_b_iso88591_1B_E_at1_4vQb_T_Ja_7q_7_F_1A __pyx_string_tab[3106]
#define __pyx_kp_b_iso88591_1B_Zq_0_G1_86_t_Q_gU_4q_q __pyx_string_tab[3107]
#define __pyx_kp_b_iso88591_1B_waxq_av5H_9G1_V_q_z_vQ_QfA_u __pyx_string_tab[3108]
#define __pyx_kp_b_iso88591_1D_31A_a_uCq_t1_nA_AT_Qa __pyx_string_tab[3109]
#define __pyx_kp_b_iso88591_1G7_T_A __pyx_string_tab[3110]
#define __pyx_kp_b_iso88591_1Ja_Q_EQ_EQ_Yaz_2_1Ja_iq_39A_0 __pyx_string_tab[3111]
#define __pyx_kp_b_iso88591_1X_wd_Qa_9 __pyx_string_tab[3112]
#define __pyx_kp_b_iso88591_1_7_Q_T_t5 __pyx_string_tab[3113]
#define __pyx_kp_b_iso88591_1_G9AQ __pyx_string_tab[3114]
#define __pyx_kp_b_iso88591_1_L_G1_9_3d_3b_QfM_a_6aq_q_A_Gq __pyx_string_tab[3115]
#define __pyx_kp_b_iso88591_1_L_G1_F_9_S_A_4uA_E_6aq_q_A_K1 __pyx_string_tab[3116]
#define __pyx_kp_b_iso88591_1_L_q_q_9_U __pyx_string_tab[3117]
#define __pyx_kp_b_iso88591_1_Qk_AQ_aq __pyx_string_tab[3118]
#define __pyx_kp_b_iso88591_1_T_a_9 __pyx_string_tab[3119]
#define __pyx_kp_b_iso88591_1_a_9AV1_IQfA __pyx_string_tab[3120]
#define __pyx_kp_b_iso88591_1_q_q_q __pyx_string_tab[3121]
#define __pyx_kp_b_iso88591_2 __pyx_string_tab[3122]
#define __pyx_kp_b_iso88591_2_1_F_1_uAS_T_1 __pyx_string_tab[3123]
#define __pyx_kp_b_iso88591_2_81 __pyx_string_tab[3124]
#define __pyx_kp_b_iso88591_2_G1_6aq_t83a_t5_q_q_0_Ya_q __pyx_string_tab[3125]
#define __pyx_kp_b_iso88591_2_L_G1_9_3d_d_q_U_q_A_Gq_VWWX_a __pyx_string_tab[3126]
#define __pyx_kp_b_iso88591_2_L_t_R_2_1 __pyx_string_tab[3127]
#define __pyx_kp_b_iso88591_2_L_uM_6_AQ __pyx_string_tab[3128]
#define __pyx_kp_b_iso88591_2_Z_a_1_Q_uG5_D_Cq_t1_Qa_7_1_81 __pyx_string_tab[3129]
#define __pyx_kp_b_iso88591_2_b_z_2S_A_j_a_Q __pyx_string_tab[3130]
#define __pyx_kp_b_iso88591_2_uCq_A_c_A_j_9_z_A_q_HAQ_uAWAQ __pyx_string_tab[3131]
#define __pyx_kp_b_iso88591_312_z_2S_A_j_a_a __pyx_string_tab[3132]
#define __pyx_kp_b_iso88591_31_4_1_4_1_A_a_l_Q_e1A_4wa_q_T __pyx_string_tab[3133]
#define __pyx_kp_b_iso88591_31_Kwa_HO_1_Yaq_87_4q_a_Q_wc_Jn __pyx_string_tab[3134]
#define __pyx_kp_b_iso88591_31_a_aq_7_Qe89L_0 __pyx_string_tab[3135]
#define __pyx_kp_b_iso88591_31_q_aq_6_Q_9 __pyx_string_tab[3136]
#define __pyx_kp_b_iso88591_31_q_aq_AV4q_31_4A __pyx_string_tab[3137]
#define __pyx_kp_b_iso88591_31b_z_2S_A_j_a_a __pyx_string_tab[3138]
#define __pyx_kp_b_iso88591_33C1X_gQ_6_Q_z_7_E_1A_z_E_z_8_N __pyx_string_tab[3139]
#define __pyx_kp_b_iso88591_3_Kwa_HO_1_4q_A_a_L_A_T_A __pyx_string_tab[3140]
#define __pyx_kp_b_iso88591_3gQ_L_5Qe2T_L_b_WG4y_A_R_A_HCr __pyx_string_tab[3141]
#define __pyx_kp_b_iso88591_4AQ_q_1N_q_a_AQ_y_q_avQ_1 __pyx_string_tab[3142]
#define __pyx_kp_b_iso88591_4AR_L_7q_Qd_aq __pyx_string_tab[3143]
#define __pyx_kp_b_iso88591_4AT_L_4_3a_5_U_a_Q __pyx_string_tab[3144]
#define __pyx_kp_b_iso88591_4A_Q_l_Q_Qa_t1_aq __pyx_string_tab[3145]
#define __pyx_kp_b_iso88591_4A_xwa_q_q_83a_2V1A_r_q_z_q_wa __pyx_string_tab[3146]
#define __pyx_kp_b_iso88591_4Al_gXQa_z_A_81_1A_Q_U_7_Q_C1_A __pyx_string_tab[3147]
#define __pyx_kp_b_iso88591_4_1_4_e1A_Q_l_Q_q_1_V1_fE_4q_U __pyx_string_tab[3148]
#define __pyx_kp_b_iso88591_4vQ_Qa_j_Qa_z_q_5 __pyx_string_tab[3149]
#define __pyx_kp_b_iso88591_5Q_a_d_Q_1 __pyx_string_tab[3150]
#define __pyx_kp_b_iso88591_5Q_q_a_WD_Qe6_67 __pyx_string_tab[3151]
#define __pyx_kp_b_iso88591_5Q_uCq_81_c_c_a_c_1G3he1_6_5_1 __pyx_string_tab[3152]
#define __pyx_kp_b_iso88591_5_AXWA __pyx_string_tab[3153]
#define __pyx_kp_b_iso88591_6 __pyx_string_tab[3154]
#define __pyx_kp_b_iso88591_6_2 __pyx_string_tab[3155]
#define __pyx_kp_b_iso88591_6_7_6 __pyx_string_tab[3156]
#define __pyx_kp_b_iso88591_6_z_a_axq_1L_iq_1F __pyx_string_tab[3157]
#define __pyx_kp_b_iso88591_6_z_a_axq_1L_iq_avQ __pyx_string_tab[3158]
#define __pyx_kp_b_iso88591_6a0_t6_uIQ __pyx_string_tab[3159]
#define __pyx_kp_b_iso88591_6aF_L_6_A_1_Q_q_Zwav_1_q __pyx_string_tab[3160]
#define __pyx_kp_b_iso88591_6a_c_A_q_1D_q_1D_Qa_iq_1_aq __pyx_string_tab[3161]
#define __pyx_kp_b_iso88591_6oQ_A_A_d_Bd_XT_Qe9AQ __pyx_string_tab[3162]
#define __pyx_kp_b_iso88591_7_1 __pyx_string_tab[3163]
#define __pyx_kp_b_iso88591_7_Q_Q_Kq_Q_S_A_a_1_0_q_M_1A_oQm __pyx_string_tab[3164]
#define __pyx_kp_b_iso88591_7_Q_q_1D_Q __pyx_string_tab[3165]
#define __pyx_kp_b_iso88591_7_Q_q_AT_Q __pyx_string_tab[3166]
#define __pyx_kp_b_iso88591_7_Q_t4q_T_D_Qa_t1_s_q_t5_2T_a_q __pyx_string_tab[3167]
#define __pyx_kp_b_iso88591_7qF_L_t1_33Gq_4q_1_Zwav_1_q __pyx_string_tab[3168]
#define __pyx_kp_b_iso88591_7qj_31A_a_z_A_Q_a_6_S_a_5_A_S_A __pyx_string_tab[3169]
#define __pyx_kp_b_iso88591_81A __pyx_string_tab[3170]
#define __pyx_kp_b_iso88591_8_8_Q_V9F_3fG1_1_Q_AQ_G1_9_3d_4 __pyx_string_tab[3171]
#define __pyx_kp_b_iso88591_8_8_Q_V9F_3fG1_1_Q_AQ_G1_F_9_S __pyx_string_tab[3172]
#define __pyx_kp_b_iso88591_8_L_7q_8_1_d_1 __pyx_string_tab[3173]
#define __pyx_kp_b_iso88591_8_z_L_7q_88J_q __pyx_string_tab[3174]
#define __pyx_kp_b_iso88591_9AQ __pyx_string_tab[3175]
#define __pyx_kp_b_iso88591_9A_1N_a __pyx_string_tab[3176]
#define __pyx_kp_b_iso88591_9_3LA_1AWAU_gQ_k1J_1AWAU_gQ_z_q __pyx_string_tab[3177]
#define __pyx_kp_b_iso88591_A __pyx_string_tab[3178]
#define __pyx_kp_b_iso88591_A0_2S_L_2Rq_AQ_nF_1 __pyx_string_tab[3179]
#define __pyx_kp_b_iso88591_A0_F_q_3d_q __pyx_string_tab[3180]
#define __pyx_kp_b_iso88591_A23_E_Qa_WA_Q_QgQa_81HF_Q_6_s_AQ __pyx_string_tab[3181]
#define __pyx_kp_b_iso88591_A2_auG4y_uL __pyx_string_tab[3182]
#define __pyx_kp_b_iso88591_A3I_TU0_9_7_9E_5_q_nA_5Q_Jhc_gS __pyx_string_tab[3183]
#define __pyx_kp_b_iso88591_A3I_TUp_9_7_9E_5_q_nA_0_Jhc_gS_W __pyx_string_tab[3184]
#define __pyx_kp_b_iso88591_A4_L_6_A_1_d_uA_XWAV1_q __pyx_string_tab[3185]
#define __pyx_kp_b_iso88591_A4_q_G_q_1 __pyx_string_tab[3186]
#define __pyx_kp_b_iso88591_A4_t7_QgQa __pyx_string_tab[3187]
#define __pyx_kp_b_iso88591_A6_7q_1O1F_a45_1 __pyx_string_tab[3188]
#define __pyx_kp_b_iso88591_A6_QnA_5_Qa_2DAQ_5_Qa_Qa_I __pyx_string_tab[3189]
#define __pyx_kp_b_iso88591_A6_t7 __pyx_string_tab[3190]
#define __pyx_kp_b_iso88591_A8NkYZ_9_7_9E_q_5_q_nA_q_Jha_k_n __pyx_string_tab[3191]
#define __pyx_kp_b_iso88591_A8_3fCq_A_as_3gXRxr_1N_3a_e1CuAR __pyx_string_tab[3192]
#define __pyx_kp_b_iso88591_A8_Qd_4_Qa_q_1_6_1A __pyx_string_tab[3193]
#define __pyx_kp_b_iso88591_A8_WO1_1 __pyx_string_tab[3194]
#define __pyx_kp_b_iso88591_A8_a_4A_d_Qd __pyx_string_tab[3195]
#define __pyx_kp_b_iso88591_A8_fIQgQa __pyx_string_tab[3196]
#define __pyx_kp_b_iso88591_AAB_IQ_Zq_Q_wa_Q_Zq_q_gQ_Q_Jaq_2 __pyx_string_tab[3197]
#define __pyx_kp_b_iso88591_AAK1_9Cq_4_3c_AQ_Q_AQ_3ay_1_aq_7 __pyx_string_tab[3198]
#define __pyx_kp_b_iso88591_AAK1_D_9Cq_4_3c_AQ_Q_AQ_4q_t_Qa __pyx_string_tab[3199]
#define __pyx_kp_b_iso88591_AB_T_d_Qa __pyx_string_tab[3200]
#define __pyx_kp_b_iso88591_AD_L_s_JavQ __pyx_string_tab[3201]
#define __pyx_kp_b_iso88591_AF_L_s_N_Qa __pyx_string_tab[3202]
#define __pyx_kp_b_iso88591_AH_L_s_E __pyx_string_tab[3203]
#define __pyx_kp_b_iso88591_AJ_L_s_Jaq __pyx_string_tab[3204]
#define __pyx_kp_b_iso88591_AJ_t7_4wk_Q __pyx_string_tab[3205]
#define __pyx_kp_b_iso88591_AL_t7 __pyx_string_tab[3206]
#define __pyx_kp_b_iso88591_AL_t_at __pyx_string_tab[3207]
#define __pyx_kp_b_iso88591_AN_L_8_5Qa_1_AV4y_1 __pyx_string_tab[3208]
#define __pyx_kp_b_iso88591_AP_1_1_s_Q_5_1A_S_Qm1_4z_wa_WAQ __pyx_string_tab[3209]
#define __pyx_kp_b_iso88591_AQ_Qiq __pyx_string_tab[3210]
#define __pyx_kp_b_iso88591_AR_G1_AQ_5_A_Zq_a_nAT_Qd_1 __pyx_string_tab[3211]
#define __pyx_kp_b_iso88591_AR_L_Qiq_b_R_A_Cr_Qj_1_t5 __pyx_string_tab[3212]
#define __pyx_kp_b_iso88591_AT_1_IT_q_Qha_A_E_s_y_Bl_1A_Qe1 __pyx_string_tab[3213]
#define __pyx_kp_b_iso88591_AV1 __pyx_string_tab[3214]
#define __pyx_kp_b_iso88591_AV_Qha_A_M_Qha_a_e1HE_nAT_z_7_U __pyx_string_tab[3215]
#define __pyx_kp_b_iso88591_AX_G1_AQ_5_A_Zq_a_nAT_Qd_1 __pyx_string_tab[3216]
#define __pyx_kp_b_iso88591_AX_L_s_E __pyx_string_tab[3217]
#define __pyx_kp_b_iso88591_AX_L_s_N_31A __pyx_string_tab[3218]
#define __pyx_kp_b_iso88591_AX_Qiq_aq_G1_g_Qa_t4q_hay_7_1_uA __pyx_string_tab[3219]
#define __pyx_kp_b_iso88591_A_0_1_Qa __pyx_string_tab[3220]
#define __pyx_kp_b_iso88591_A_0_A_QhgQ_C_awaq_vS_haq_q_q_CvQ __pyx_string_tab[3221]
#define __pyx_kp_b_iso88591_A_0_B_qPQ_c_q_7_Q_aq_Q_6oQ_Q_6a __pyx_string_tab[3222]
#define __pyx_kp_b_iso88591_A_0_B_qPQ_c_q_9Cq_A_O1_A __pyx_string_tab[3223]
#define __pyx_kp_b_iso88591_A_0_IQ_Zq_Q_wa_Q_Zq_q_gQ_Q_Jaq_1 __pyx_string_tab[3224]
#define __pyx_kp_b_iso88591_A_1 __pyx_string_tab[3225]
#define __pyx_kp_b_iso88591_A_10J_a_iy __pyx_string_tab[3226]
#define __pyx_kp_b_iso88591_A_1A __pyx_string_tab[3227]
#define __pyx_kp_b_iso88591_A_1E_A_t9G1D_ha __pyx_string_tab[3228]
#define __pyx_kp_b_iso88591_A_1F_fA __pyx_string_tab[3229]
#define __pyx_kp_b_iso88591_A_1F_ha_q __pyx_string_tab[3230]
#define __pyx_kp_b_iso88591_A_1Kq_q __pyx_string_tab[3231]
#define __pyx_kp_b_iso88591_A_1L_1 __pyx_string_tab[3232]
#define __pyx_kp_b_iso88591_A_1L_7_d_wa_AQ_5_q_Q_gQa_6_E_WCq __pyx_string_tab[3233]
#define __pyx_kp_b_iso88591_A_1_1_A_5_q_q_t1_gQhe4q_Qa_N_e1 __pyx_string_tab[3234]
#define __pyx_kp_b_iso88591_A_1_1_A_QfA_M_1IQ_q_d_A_z_1_b_aq __pyx_string_tab[3235]
#define __pyx_kp_b_iso88591_A_1_4A_81_1_r_8_3l_87 __pyx_string_tab[3236]
#define __pyx_kp_b_iso88591_A_1_5_q_ha_q __pyx_string_tab[3237]
#define __pyx_kp_b_iso88591_A_1_A_Q_q_q_1_q_oQ_q __pyx_string_tab[3238]
#define __pyx_kp_b_iso88591_A_1_A_Qd2EQ_z_1A_AU_d_gV4vT_q __pyx_string_tab[3239]
#define __pyx_kp_b_iso88591_A_1_G1_Zq_5Qa_uA_q_b_j_RuA_F_q_a __pyx_string_tab[3240]
#define __pyx_kp_b_iso88591_A_1_Q_4z_1A_QgQ_t5_WAT_iq_Q_V1G5 __pyx_string_tab[3241]
#define __pyx_kp_b_iso88591_A_1x_4A_1_1_Q_A_1_Q_2Yg_1_3l_87 __pyx_string_tab[3242]
#define __pyx_kp_b_iso88591_A_2 __pyx_string_tab[3243]
#define __pyx_kp_b_iso88591_A_2Rr_Bc_Q_A_AQ_G4r_C1A_q __pyx_string_tab[3244]
#define __pyx_kp_b_iso88591_A_2Rr_Bc_Q_A_AQ_N_4wd_4DAQ __pyx_string_tab[3245]
#define __pyx_kp_b_iso88591_A_2_a __pyx_string_tab[3246]
#define __pyx_kp_b_iso88591_A_3 __pyx_string_tab[3247]
#define __pyx_kp_b_iso88591_A_3a __pyx_string_tab[3248]
#define __pyx_kp_b_iso88591_A_3c_Q_A_AT_V1A __pyx_string_tab[3249]
#define __pyx_kp_b_iso88591_A_3c_Q_A_Qd2EQ_z_q __pyx_string_tab[3250]
#define __pyx_kp_b_iso88591_A_3c_Q_A_Qd2EQ_z_q_1 __pyx_string_tab[3251]
#define __pyx_kp_b_iso88591_A_4 __pyx_string_tab[3252]
#define __pyx_kp_b_iso88591_A_4O1L_3axr_s_6_q_QgQ_E_Q_A_1HG8 __pyx_string_tab[3253]
#define __pyx_kp_b_iso88591_A_4_1_6axq_1Jaq_Qa __pyx_string_tab[3254]
#define __pyx_kp_b_iso88591_A_4_4q __pyx_string_tab[3255]
#define __pyx_kp_b_iso88591_A_4_A_6axq_1L_1 __pyx_string_tab[3256]
#define __pyx_kp_b_iso88591_A_4_A_6axq_nA __pyx_string_tab[3257]
#define __pyx_kp_b_iso88591_A_4_Q_Qc_S_1 __pyx_string_tab[3258]
#define __pyx_kp_b_iso88591_A_4_Q_Qe4q_1 __pyx_string_tab[3259]
#define __pyx_kp_b_iso88591_A_4_WA_Q_QgQa_A_A_a_2_1_1 __pyx_string_tab[3260]
#define __pyx_kp_b_iso88591_A_4_q_1_t_S_D_87_q_q __pyx_string_tab[3261]
#define __pyx_kp_b_iso88591_A_4q __pyx_string_tab[3262]
#define __pyx_kp_b_iso88591_A_4q_2U_ar_t4s_1_1 __pyx_string_tab[3263]
#define __pyx_kp_b_iso88591_A_4q_31_4r_a_a_4r_a_q __pyx_string_tab[3264]
#define __pyx_kp_b_iso88591_A_4q_8_Q_q __pyx_string_tab[3265]
#define __pyx_kp_b_iso88591_A_4q_AQ __pyx_string_tab[3266]
#define __pyx_kp_b_iso88591_A_4q_Q_S_AT_Q_Q_A_Qk_y_2V3a_ay_a __pyx_string_tab[3267]
#define __pyx_kp_b_iso88591_A_4q_waq_U_1_q_1D_t1_AQ_N_WL_AQ __pyx_string_tab[3268]
#define __pyx_kp_b_iso88591_A_4r_q_9_Q __pyx_string_tab[3269]
#define __pyx_kp_b_iso88591_A_4t1_4q_b_a_4r_q __pyx_string_tab[3270]
#define __pyx_kp_b_iso88591_A_4t1_Qa __pyx_string_tab[3271]
#define __pyx_kp_b_iso88591_A_4wavQ_1_at1A_7_t7_81_iq_4q_1_7 __pyx_string_tab[3272]
#define __pyx_kp_b_iso88591_A_4wd __pyx_string_tab[3273]
#define __pyx_kp_b_iso88591_A_4wgS_Q_AQ_8_WA_Q_5_xq_Q_q __pyx_string_tab[3274]
#define __pyx_kp_b_iso88591_A_4xs_q_A_4w_auG1_4t1_t9CuA_Q_T __pyx_string_tab[3275]
#define __pyx_kp_b_iso88591_A_4z_Q_1_AT_q_4uKq_e6 __pyx_string_tab[3276]
#define __pyx_kp_b_iso88591_A_4z_WL_WA_1_RRSSWWXXY_E_A_Qa_WA __pyx_string_tab[3277]
#define __pyx_kp_b_iso88591_A_4z_WL_WA_1_RRSSWWXXY_E_A_Qa_WA_2 __pyx_string_tab[3278]
#define __pyx_kp_b_iso88591_A_4z_vQ_1_1D_E_A_Qa_WA_Q_QgQa_81 __pyx_string_tab[3279]
#define __pyx_kp_b_iso88591_A_5 __pyx_string_tab[3280]
#define __pyx_kp_b_iso88591_A_5Q_Kwa_6_8_axv_Zq __pyx_string_tab[3281]
#define __pyx_kp_b_iso88591_A_5Q_Kwa_6_q_Q __pyx_string_tab[3282]
#define __pyx_kp_b_iso88591_A_5_A __pyx_string_tab[3283]
#define __pyx_kp_b_iso88591_A_6 __pyx_string_tab[3284]
#define __pyx_kp_b_iso88591_A_6_A_a_q_q_uF_S_iq_AU_56a_a_fAW __pyx_string_tab[3285]
#define __pyx_kp_b_iso88591_A_6_vQa_1 __pyx_string_tab[3286]
#define __pyx_kp_b_iso88591_A_6a7Gq_1_N_4AYa __pyx_string_tab[3287]
#define __pyx_kp_b_iso88591_A_6a7Gq_1_N_9A __pyx_string_tab[3288]
#define __pyx_kp_b_iso88591_A_6a7Gq_4A_A_N_ay __pyx_string_tab[3289]
#define __pyx_kp_b_iso88591_A_6a7Gq_4A_A_nA_6ay __pyx_string_tab[3290]
#define __pyx_kp_b_iso88591_A_6e1_a_Ja_q __pyx_string_tab[3291]
#define __pyx_kp_b_iso88591_A_7_3a_1_8_12_K_0_JgQ_a_DA_iq_q __pyx_string_tab[3292]
#define __pyx_kp_b_iso88591_A_7q __pyx_string_tab[3293]
#define __pyx_kp_b_iso88591_A_7q_W_AQ __pyx_string_tab[3294]
#define __pyx_kp_b_iso88591_A_7q_W_AQ_2 __pyx_string_tab[3295]
#define __pyx_kp_b_iso88591_A_7q_aq __pyx_string_tab[3296]
#define __pyx_kp_b_iso88591_A_8_t_1D_A_1_Q __pyx_string_tab[3297]
#define __pyx_kp_b_iso88591_A_8_z_1D_A_1_Q __pyx_string_tab[3298]
#define __pyx_kp_b_iso88591_A_9_B_uAU_vU_V_q __pyx_string_tab[3299]
#define __pyx_kp_b_iso88591_A_9_T_y_1_N_87_j_Qe4t3a_a_DAQ_q __pyx_string_tab[3300]
#define __pyx_kp_b_iso88591_A_AT_BgQa __pyx_string_tab[3301]
#define __pyx_kp_b_iso88591_A_AV4y_q __pyx_string_tab[3302]
#define __pyx_kp_b_iso88591_A_AZq_d_AQ __pyx_string_tab[3303]
#define __pyx_kp_b_iso88591_A_A_3i_1_A_D_q_ivQ_6_1E_q17z __pyx_string_tab[3304]
#define __pyx_kp_b_iso88591_A_A_6a_Qiq_uG1_q_q_AYfF_5_v_Ql_q __pyx_string_tab[3305]
#define __pyx_kp_b_iso88591_A_A_A_1_aq __pyx_string_tab[3306]
#define __pyx_kp_b_iso88591_A_A_Bha_q __pyx_string_tab[3307]
#define __pyx_kp_b_iso88591_A_A_Q_Qa_Ja_q __pyx_string_tab[3308]
#define __pyx_kp_b_iso88591_A_A_Qd2EQ_z_1A_V6_T_t1_D_E_gV4q __pyx_string_tab[3309]
#define __pyx_kp_b_iso88591_A_A_Qd2EQ_z_q_1A_AQ_D_D_A_q __pyx_string_tab[3310]
#define __pyx_kp_b_iso88591_A_A_nA_q_81A_E_q __pyx_string_tab[3311]
#define __pyx_kp_b_iso88591_A_A_t1_0_Qa __pyx_string_tab[3312]
#define __pyx_kp_b_iso88591_A_BgQaq __pyx_string_tab[3313]
#define __pyx_kp_b_iso88591_A_D __pyx_string_tab[3314]
#define __pyx_kp_b_iso88591_A_D_D __pyx_string_tab[3315]
#define __pyx_kp_b_iso88591_A_D_T_D __pyx_string_tab[3316]
#define __pyx_kp_b_iso88591_A_D_T_d __pyx_string_tab[3317]
#define __pyx_kp_b_iso88591_A_ET_y_1 __pyx_string_tab[3318]
#define __pyx_kp_b_iso88591_A_ET_y_1_2 __pyx_string_tab[3319]
#define __pyx_kp_b_iso88591_A_E_Qa_4q_81A_E_1_WA_Q_QgQa_5_9F __pyx_string_tab[3320]
#define __pyx_kp_b_iso88591_A_E_Qa_WA_Q_QgQa_81HF_HAYfA_6_s __pyx_string_tab[3321]
#define __pyx_kp_b_iso88591_A_F __pyx_string_tab[3322]
#define __pyx_kp_b_iso88591_A_F_2 __pyx_string_tab[3323]
#define __pyx_kp_b_iso88591_A_F_wk_31_1_F_3awa_q_a_vQha __pyx_string_tab[3324]
#define __pyx_kp_b_iso88591_A_Fa_B_S_4_M_j_Qm __pyx_string_tab[3325]
#define __pyx_kp_b_iso88591_A_G1F_a_vWE_Q_q_q_q_34q_QR_34q __pyx_string_tab[3326]
#define __pyx_kp_b_iso88591_A_G1F_a_vWE_Q_q_q_q_Qg_q_Qg __pyx_string_tab[3327]
#define __pyx_kp_b_iso88591_A_IQ_q __pyx_string_tab[3328]
#define __pyx_kp_b_iso88591_A_IQ_uJc __pyx_string_tab[3329]
#define __pyx_kp_b_iso88591_A_IV1 __pyx_string_tab[3330]
#define __pyx_kp_b_iso88591_A_L_1D_5_Q __pyx_string_tab[3331]
#define __pyx_kp_b_iso88591_A_L_1_WD_q_t2U __pyx_string_tab[3332]
#define __pyx_kp_b_iso88591_A_L_4t7_a_IT __pyx_string_tab[3333]
#define __pyx_kp_b_iso88591_A_L_4z_Q __pyx_string_tab[3334]
#define __pyx_kp_b_iso88591_A_L_9Cq_V_Bk_2_T_Be1_G4r_a_T_A_1 __pyx_string_tab[3335]
#define __pyx_kp_b_iso88591_A_L_L __pyx_string_tab[3336]
#define __pyx_kp_b_iso88591_A_L_O1F_a_q __pyx_string_tab[3337]
#define __pyx_kp_b_iso88591_A_L_O1F_a_q_2 __pyx_string_tab[3338]
#define __pyx_kp_b_iso88591_A_L_O1F_a_q_3 __pyx_string_tab[3339]
#define __pyx_kp_b_iso88591_A_L_Qa_nA_V_PQ __pyx_string_tab[3340]
#define __pyx_kp_b_iso88591_A_L_R_c_s_N_7_7 __pyx_string_tab[3341]
#define __pyx_kp_b_iso88591_A_L_T_E_Q_y_a __pyx_string_tab[3342]
#define __pyx_kp_b_iso88591_A_L_q_AXU_Q __pyx_string_tab[3343]
#define __pyx_kp_b_iso88591_A_L_q_q_IT_5_a __pyx_string_tab[3344]
#define __pyx_kp_b_iso88591_A_L_s_E __pyx_string_tab[3345]
#define __pyx_kp_b_iso88591_A_L_s_G1A __pyx_string_tab[3346]
#define __pyx_kp_b_iso88591_A_L_s_IQa __pyx_string_tab[3347]
#define __pyx_kp_b_iso88591_A_L_s_IQa_2 __pyx_string_tab[3348]
#define __pyx_kp_b_iso88591_A_L_s_Jaq __pyx_string_tab[3349]
#define __pyx_kp_b_iso88591_A_L_s_Jaq_2 __pyx_string_tab[3350]
#define __pyx_kp_b_iso88591_A_L_s_JavQ __pyx_string_tab[3351]
#define __pyx_kp_b_iso88591_A_L_s_N_31A __pyx_string_tab[3352]
#define __pyx_kp_b_iso88591_A_L_s_N_Qa __pyx_string_tab[3353]
#define __pyx_kp_b_iso88591_A_L_s_N_Qa_2 __pyx_string_tab[3354]
#define __pyx_kp_b_iso88591_A_L_t3gQfE __pyx_string_tab[3355]
#define __pyx_kp_b_iso88591_A_L_t7_b_A __pyx_string_tab[3356]
#define __pyx_kp_b_iso88591_A_L_t9D __pyx_string_tab[3357]
#define __pyx_kp_b_iso88591_A_L_uAWE_Cr_Q __pyx_string_tab[3358]
#define __pyx_kp_b_iso88591_A_L_uM_6_A __pyx_string_tab[3359]
#define __pyx_kp_b_iso88591_A_M_4q_T_1_AV4r_q __pyx_string_tab[3360]
#define __pyx_kp_b_iso88591_A_M_4t1 __pyx_string_tab[3361]
#define __pyx_kp_b_iso88591_A_M_4t1_2 __pyx_string_tab[3362]
#define __pyx_kp_b_iso88591_A_M_q __pyx_string_tab[3363]
#define __pyx_kp_b_iso88591_A_M_t1 __pyx_string_tab[3364]
#define __pyx_kp_b_iso88591_A_M_t7 __pyx_string_tab[3365]
#define __pyx_kp_b_iso88591_A_M_t7_b_0 __pyx_string_tab[3366]
#define __pyx_kp_b_iso88591_A_N_4_auG1_4t4_1A __pyx_string_tab[3367]
#define __pyx_kp_b_iso88591_A_N_4_q_1 __pyx_string_tab[3368]
#define __pyx_kp_b_iso88591_A_N_4q_4_1_1 __pyx_string_tab[3369]
#define __pyx_kp_b_iso88591_A_N_7_7_7_7_wawd_A __pyx_string_tab[3370]
#define __pyx_kp_b_iso88591_A_N_Qc_c_V1_c_V1_3a_s __pyx_string_tab[3371]
#define __pyx_kp_b_iso88591_A_N_t1 __pyx_string_tab[3372]
#define __pyx_kp_b_iso88591_A_N_t82XQ __pyx_string_tab[3373]
#define __pyx_kp_b_iso88591_A_N_t_r __pyx_string_tab[3374]
#define __pyx_kp_b_iso88591_A_N_z_t1 __pyx_string_tab[3375]
#define __pyx_kp_b_iso88591_A_PP_8_7_9E_Q_5_q_nA_4A_Jhc_fCq __pyx_string_tab[3376]
#define __pyx_kp_b_iso88591_A_PP_8_7_9E_Q_5_q_nA_9_Jhc_fCq_G __pyx_string_tab[3377]
#define __pyx_kp_b_iso88591_A_PQd_L_9Cq_q_9Cq_q_t2_t1_6j_4L __pyx_string_tab[3378]
#define __pyx_kp_b_iso88591_A_Q __pyx_string_tab[3379]
#define __pyx_kp_b_iso88591_A_Q_5_q_z_j_d_A_z_A_j_k_l_a_Qa_i __pyx_string_tab[3380]
#define __pyx_kp_b_iso88591_A_Q_8_t6 __pyx_string_tab[3381]
#define __pyx_kp_b_iso88591_A_Q_D_T_Q_4q_1 __pyx_string_tab[3382]
#define __pyx_kp_b_iso88591_A_Q_E_at9E_it1A_t7_awd_6_q __pyx_string_tab[3383]
#define __pyx_kp_b_iso88591_A_Q_HA_aq __pyx_string_tab[3384]
#define __pyx_kp_b_iso88591_A_Q_a_AQ_q_AQ_AT __pyx_string_tab[3385]
#define __pyx_kp_b_iso88591_A_Q_a_g_0_7_s_Q_1_E_Ba_E_1_QgQa __pyx_string_tab[3386]
#define __pyx_kp_b_iso88591_A_Q_q_1_t2_s_b_Q __pyx_string_tab[3387]
#define __pyx_kp_b_iso88591_A_Qa1_1_t __pyx_string_tab[3388]
#define __pyx_kp_b_iso88591_A_Qa_d __pyx_string_tab[3389]
#define __pyx_kp_b_iso88591_A_Qa_t_S __pyx_string_tab[3390]
#define __pyx_kp_b_iso88591_A_Qc_6_1A __pyx_string_tab[3391]
#define __pyx_kp_b_iso88591_A_Qd_D_Qa_s_Q_hay_A_Ba_ha_Qk_Qa __pyx_string_tab[3392]
#define __pyx_kp_b_iso88591_A_Qd_aq_2Q_hay_t7_1_q_1_4waq_1A __pyx_string_tab[3393]
#define __pyx_kp_b_iso88591_A_QfA_1A_Ja_HA_A __pyx_string_tab[3394]
#define __pyx_kp_b_iso88591_A_QfD_q __pyx_string_tab[3395]
#define __pyx_kp_b_iso88591_A_QhgQ_BgQgQa_3e3d_Bk_1A __pyx_string_tab[3396]
#define __pyx_kp_b_iso88591_A_Qiq_hhc_a_q_oX_5_1_7q_q_4_T_7 __pyx_string_tab[3397]
#define __pyx_kp_b_iso88591_A_Qm1_G2T_CZZ_q_Q_7_1_7q_AQ_nAT __pyx_string_tab[3398]
#define __pyx_kp_b_iso88591_A_Qm1_G2T_CZZ_q_Q_7_1_7q_AQ_nAT_2 __pyx_string_tab[3399]
#define __pyx_kp_b_iso88591_A_T_3as_A_A_2U_3hc_AQ_WA_t_Qk_iq __pyx_string_tab[3400]
#define __pyx_kp_b_iso88591_A_T_RwavU_a_q __pyx_string_tab[3401]
#define __pyx_kp_b_iso88591_A_T_q_7_Q_Qa_ha_8 __pyx_string_tab[3402]
#define __pyx_kp_b_iso88591_A_WD __pyx_string_tab[3403]
#define __pyx_kp_b_iso88591_A_WD_1AQ_5_Cs __pyx_string_tab[3404]
#define __pyx_kp_b_iso88591_A_WD_1_fD_3a_q __pyx_string_tab[3405]
#define __pyx_kp_b_iso88591_A_WD_F_1A __pyx_string_tab[3406]
#define __pyx_kp_b_iso88591_A_XQa __pyx_string_tab[3407]
#define __pyx_kp_b_iso88591_A__2_5_EQ_q_a __pyx_string_tab[3408]
#define __pyx_kp_b_iso88591_A__D __pyx_string_tab[3409]
#define __pyx_kp_b_iso88591_A_a __pyx_string_tab[3410]
#define __pyx_kp_b_iso88591_A_a_1_fG4r_a_q_d_E_1_q __pyx_string_tab[3411]
#define __pyx_kp_b_iso88591_A_a_2 __pyx_string_tab[3412]
#define __pyx_kp_b_iso88591_A_a_4A_t7_q_G1_1 __pyx_string_tab[3413]
#define __pyx_kp_b_iso88591_A_a_8_Zq_6_1 __pyx_string_tab[3414]
#define __pyx_kp_b_iso88591_A_a_Qd_4r_b_D_q __pyx_string_tab[3415]
#define __pyx_kp_b_iso88591_A_a_q_d_M_1_T_Cq_U_T_5_T_4q_d_F __pyx_string_tab[3416]
#define __pyx_kp_b_iso88591_A_a_uM_D_q_a __pyx_string_tab[3417]
#define __pyx_kp_b_iso88591_A_a_uM_d_q_a __pyx_string_tab[3418]
#define __pyx_kp_b_iso88591_A_a_vS_1HG81_Q_xq_HA_z_z_a_a_1F __pyx_string_tab[3419]
#define __pyx_kp_b_iso88591_A_aab_HD_A_22EE_aaeef_nAV_aq_1 __pyx_string_tab[3420]
#define __pyx_kp_b_iso88591_A_aq_Q_5WAXQ_7q_ha_oQ_oQ_Q_Q_Fa __pyx_string_tab[3421]
#define __pyx_kp_b_iso88591_A_at6 __pyx_string_tab[3422]
#define __pyx_kp_b_iso88591_A_d_4s_1_D_Zq_q_s_e3fAQ __pyx_string_tab[3423]
#define __pyx_kp_b_iso88591_A_d_A_1 __pyx_string_tab[3424]
#define __pyx_kp_b_iso88591_A_d_A_AQ __pyx_string_tab[3425]
#define __pyx_kp_b_iso88591_A_d_A_v_1 __pyx_string_tab[3426]
#define __pyx_kp_b_iso88591_A_d_wd_WA __pyx_string_tab[3427]
#define __pyx_kp_b_iso88591_A_d_y_1_N_87_j_Qa_q __pyx_string_tab[3428]
#define __pyx_kp_b_iso88591_A_fA __pyx_string_tab[3429]
#define __pyx_kp_b_iso88591_A_gQa_q_c_d_3b_1 __pyx_string_tab[3430]
#define __pyx_kp_b_iso88591_A_gXQa_T_WD_1A_6_S_1_q __pyx_string_tab[3431]
#define __pyx_kp_b_iso88591_A_h_a_1_1_1_A_t_ay_1_q_A __pyx_string_tab[3432]
#define __pyx_kp_b_iso88591_A_hd_2 __pyx_string_tab[3433]
#define __pyx_kp_b_iso88591_A_nAT_AQ __pyx_string_tab[3434]
#define __pyx_kp_b_iso88591_A_nAT_Ya_1 __pyx_string_tab[3435]
#define __pyx_kp_b_iso88591_A_nAT_Ya_1_2 __pyx_string_tab[3436]
#define __pyx_kp_b_iso88591_A_nJe1L_uAQ_1 __pyx_string_tab[3437]
#define __pyx_kp_b_iso88591_A_n_IQ_Zq_Q_7_Q_y_S_1_j_y_4r_vQ __pyx_string_tab[3438]
#define __pyx_kp_b_iso88591_A_q __pyx_string_tab[3439]
#define __pyx_kp_b_iso88591_A_q_0_I_1 __pyx_string_tab[3440]
#define __pyx_kp_b_iso88591_A_q_1_8_Qa __pyx_string_tab[3441]
#define __pyx_kp_b_iso88591_A_q_2 __pyx_string_tab[3442]
#define __pyx_kp_b_iso88591_A_q_3 __pyx_string_tab[3443]
#define __pyx_kp_b_iso88591_A_q_4 __pyx_string_tab[3444]
#define __pyx_kp_b_iso88591_A_q_4q_Q_gQa_it7_6_q __pyx_string_tab[3445]
#define __pyx_kp_b_iso88591_A_q_4q_Yd_6_Qa_Qa_uBe1HE_A __pyx_string_tab[3446]
#define __pyx_kp_b_iso88591_A_q_4q_at6_it7_6_q __pyx_string_tab[3447]
#define __pyx_kp_b_iso88591_A_q_4wk_gV1A __pyx_string_tab[3448]
#define __pyx_kp_b_iso88591_A_q_5 __pyx_string_tab[3449]
#define __pyx_kp_b_iso88591_A_q_7_Q_aq_A_A_156 __pyx_string_tab[3450]
#define __pyx_kp_b_iso88591_A_q_9Cq_A __pyx_string_tab[3451]
#define __pyx_kp_b_iso88591_A_q_AT_v_6 __pyx_string_tab[3452]
#define __pyx_kp_b_iso88591_A_q_Q_Q_A_Ja_q __pyx_string_tab[3453]
#define __pyx_kp_b_iso88591_A_q_V6_AZr_PQ_avV1_9 __pyx_string_tab[3454]
#define __pyx_kp_b_iso88591_A_q_e9AQ_1 __pyx_string_tab[3455]
#define __pyx_kp_b_iso88591_A_q_q __pyx_string_tab[3456]
#define __pyx_kp_b_iso88591_A_q_q_G9AS_1 __pyx_string_tab[3457]
#define __pyx_kp_b_iso88591_A_q_q_G9AS_1_2 __pyx_string_tab[3458]
#define __pyx_kp_b_iso88591_A_q_q_q_q_q_q __pyx_string_tab[3459]
#define __pyx_kp_b_iso88591_A_q_t_d_a __pyx_string_tab[3460]
#define __pyx_kp_b_iso88591_A_s __pyx_string_tab[3461]
#define __pyx_kp_b_iso88591_A_s_aq __pyx_string_tab[3462]
#define __pyx_kp_b_iso88591_A_s_av_j __pyx_string_tab[3463]
#define __pyx_kp_b_iso88591_A_t __pyx_string_tab[3464]
#define __pyx_kp_b_iso88591_A_t1 __pyx_string_tab[3465]
#define __pyx_kp_b_iso88591_A_t3gQfE __pyx_string_tab[3466]
#define __pyx_kp_b_iso88591_A_t4wavU __pyx_string_tab[3467]
#define __pyx_kp_b_iso88591_A_t5 __pyx_string_tab[3468]
#define __pyx_kp_b_iso88591_A_t5_2 __pyx_string_tab[3469]
#define __pyx_kp_b_iso88591_A_t5_a __pyx_string_tab[3470]
#define __pyx_kp_b_iso88591_A_t6 __pyx_string_tab[3471]
#define __pyx_kp_b_iso88591_A_t7_1A __pyx_string_tab[3472]
#define __pyx_kp_b_iso88591_A_t7_Q __pyx_string_tab[3473]
#define __pyx_kp_b_iso88591_A_t84r_gRt2Qa __pyx_string_tab[3474]
#define __pyx_kp_b_iso88591_A_t9D __pyx_string_tab[3475]
#define __pyx_kp_b_iso88591_A_t9F_1 __pyx_string_tab[3476]
#define __pyx_kp_b_iso88591_A_t9G1F_q __pyx_string_tab[3477]
#define __pyx_kp_b_iso88591_A_t_0_O4G __pyx_string_tab[3478]
#define __pyx_kp_b_iso88591_A_t_2 __pyx_string_tab[3479]
#define __pyx_kp_b_iso88591_A_t_2_7_1 __pyx_string_tab[3480]
#define __pyx_kp_b_iso88591_A_t_Q __pyx_string_tab[3481]
#define __pyx_kp_b_iso88591_A_t_QgQa __pyx_string_tab[3482]
#define __pyx_kp_b_iso88591_A_t_Ry __pyx_string_tab[3483]
#define __pyx_kp_b_iso88591_A_t_Ry_2 __pyx_string_tab[3484]
#define __pyx_kp_b_iso88591_A_t_e1D __pyx_string_tab[3485]
#define __pyx_kp_b_iso88591_A_uA __pyx_string_tab[3486]
#define __pyx_kp_b_iso88591_A_uAWE_Cr_Q __pyx_string_tab[3487]
#define __pyx_kp_b_iso88591_A_uA_5_3b_A __pyx_string_tab[3488]
#define __pyx_kp_b_iso88591_A_uA_Rt1 __pyx_string_tab[3489]
#define __pyx_kp_b_iso88591_A_vQ __pyx_string_tab[3490]
#define __pyx_kp_b_iso88591_A_wa __pyx_string_tab[3491]
#define __pyx_kp_b_iso88591_A_wd_d __pyx_string_tab[3492]
#define __pyx_kp_b_iso88591_A_we1Bas __pyx_string_tab[3493]
#define __pyx_kp_b_iso88591_A_xt1 __pyx_string_tab[3494]
#define __pyx_kp_b_iso88591_A_xt1G4wd __pyx_string_tab[3495]
#define __pyx_kp_b_iso88591_A_xt7_gT_D __pyx_string_tab[3496]
#define __pyx_kp_b_iso88591_A_xt_A __pyx_string_tab[3497]
#define __pyx_kp_b_iso88591_A_y_A __pyx_string_tab[3498]
#define __pyx_kp_b_iso88591_A_y_AQ __pyx_string_tab[3499]
#define __pyx_kp_b_iso88591_A_y_AWD __pyx_string_tab[3500]
#define __pyx_kp_b_iso88591_A_y_Bl_S_Qa_1_A __pyx_string_tab[3501]
#define __pyx_kp_b_iso88591_A_y_F_d __pyx_string_tab[3502]
#define __pyx_kp_b_iso88591_A_y_O4_4q __pyx_string_tab[3503]
#define __pyx_kp_b_iso88591_A_y_S __pyx_string_tab[3504]
#define __pyx_kp_b_iso88591_A_y_T_1 __pyx_string_tab[3505]
#define __pyx_kp_b_iso88591_A_z_7_5_uD_F_waq_V5_q_uAXU __pyx_string_tab[3506]
#define __pyx_kp_b_iso88591_Ab_t81D_6aq __pyx_string_tab[3507]
#define __pyx_kp_b_iso88591_Ad_QhfA_z_q_q_a_l_vQ_g_1A_4q_9AQ __pyx_string_tab[3508]
#define __pyx_kp_b_iso88591_Ad_QhfA_z_q_q_a_l_vQ_g_1A_4q_9AQ_2 __pyx_string_tab[3509]
#define __pyx_kp_b_iso88591_Ar_1_IT_q_Qha_A_E_s_y_Bl_1A_Qe1 __pyx_string_tab[3510]
#define __pyx_kp_b_iso88591_Ar_HA_s_6_A_q_a_fA_t_QivQ_s_4wb __pyx_string_tab[3511]
#define __pyx_kp_b_iso88591_At_Qha_A_M_Qha_a_e1HE_nAT_z_7_U __pyx_string_tab[3512]
#define __pyx_kp_b_iso88591_C1_L_q_V1_A_q __pyx_string_tab[3513]
#define __pyx_kp_b_iso88591_CC_aH_L_7q_Qa_Q_fO9AQMXXY_1 __pyx_string_tab[3514]
#define __pyx_kp_b_iso88591_DA_9A_z_A_a_q_Q_1_a_Q_y_a __pyx_string_tab[3515]
#define __pyx_kp_b_iso88591_D_1_e1_uAQ_1 __pyx_string_tab[3516]
#define __pyx_kp_b_iso88591_EQT_B_B_81A_a_1_M_a_iq_V1_q_1_3 __pyx_string_tab[3517]
#define __pyx_kp_b_iso88591_F_L_QfCr_4r_q_a_3b_q_fA __pyx_string_tab[3518]
#define __pyx_kp_b_iso88591_Fa_e3a_q_1F_q_q __pyx_string_tab[3519]
#define __pyx_kp_b_iso88591_HAQ_Q_1 __pyx_string_tab[3520]
#define __pyx_kp_b_iso88591_HAQ_Q_q_1 __pyx_string_tab[3521]
#define __pyx_kp_b_iso88591_HAQ_q_Qa_1 __pyx_string_tab[3522]
#define __pyx_kp_b_iso88591_HD_t1_K8ST_6_D_a_6a_wa_6_1L_Q_t __pyx_string_tab[3523]
#define __pyx_kp_b_iso88591_H_t_T_7_6_a __pyx_string_tab[3524]
#define __pyx_kp_b_iso88591_J_1_z_A_1A_L_uAYaq_a_1 __pyx_string_tab[3525]
#define __pyx_kp_b_iso88591_J_z_WCq_z_q_avV7_0_1F_6_A_avWHI __pyx_string_tab[3526]
#define __pyx_kp_b_iso88591_L_31A_4z_1A_4q_q_q_1Ja_Qa __pyx_string_tab[3527]
#define __pyx_kp_b_iso88591_L_R_A_Cr_Qj_k_t5 __pyx_string_tab[3528]
#define __pyx_kp_b_iso88591_L_s_F_6_uL __pyx_string_tab[3529]
#define __pyx_kp_b_iso88591_L_s_G1F __pyx_string_tab[3530]
#define __pyx_kp_b_iso88591_M_f_z_WCq_z_q_uL_vWG1_1F_6_A_uL __pyx_string_tab[3531]
#define __pyx_kp_b_iso88591_N_31A_q_z_Q_Q_A_6a_Qa __pyx_string_tab[3532]
#define __pyx_kp_b_iso88591_N_31A_t_QgQ_awl_wa_q_k_Qa __pyx_string_tab[3533]
#define __pyx_kp_b_iso88591_P_L_1F_A __pyx_string_tab[3534]
#define __pyx_kp_b_iso88591_Q_0_A_7q_QhgQ_E_1_z_1_haq_q_q_C __pyx_string_tab[3535]
#define __pyx_kp_b_iso88591_Q_1_1_avQ_1 __pyx_string_tab[3536]
#define __pyx_kp_b_iso88591_Q_2 __pyx_string_tab[3537]
#define __pyx_kp_b_iso88591_Q_3 __pyx_string_tab[3538]
#define __pyx_kp_b_iso88591_Q_4 __pyx_string_tab[3539]
#define __pyx_kp_b_iso88591_Q_4wj_4q_1_U_t_gQ_at6_HAT_QgSP __pyx_string_tab[3540]
#define __pyx_kp_b_iso88591_Q_7_A_AQ_7_Q_1O1D_1O1D_45_1 __pyx_string_tab[3541]
#define __pyx_kp_b_iso88591_Q_7_A_AQ_AS_7_Q_T_F_1_wb_j_T_F __pyx_string_tab[3542]
#define __pyx_kp_b_iso88591_Q_7_A_AQ_AS_7_Q_T_vQa_T_vQha __pyx_string_tab[3543]
#define __pyx_kp_b_iso88591_Q_7_A_AQ_AS_7_Q_T_vQa_T_vQha_2 __pyx_string_tab[3544]
#define __pyx_kp_b_iso88591_Q_7q_1_Q_1D_q_5_G1 __pyx_string_tab[3545]
#define __pyx_kp_b_iso88591_Q_L_R_1L_s_N_awa __pyx_string_tab[3546]
#define __pyx_kp_b_iso88591_Q_L_R_1L_s_N_awa_2 __pyx_string_tab[3547]
#define __pyx_kp_b_iso88591_Q_L_s_G1F_4A __pyx_string_tab[3548]
#define __pyx_kp_b_iso88591_Q_q_WD_6_iq __pyx_string_tab[3549]
#define __pyx_kp_b_iso88591_Q_t7_AQ __pyx_string_tab[3550]
#define __pyx_kp_b_iso88591_Q_wa_q_z_q_1Ja_gXT_a_5_q_1Jaxt4 __pyx_string_tab[3551]
#define __pyx_kp_b_iso88591_Q_wc_1_D_5_E_AV2S_d_s_axwiq_Qha __pyx_string_tab[3552]
#define __pyx_kp_b_iso88591_Q_wc_CuG6_s_axwiq_1HA_IQ_G1E_q __pyx_string_tab[3553]
#define __pyx_kp_b_iso88591_Qd __pyx_string_tab[3554]
#define __pyx_kp_b_iso88591_Ql_7_A_AQ_AS_7_Q_T_vQa_T_vQha __pyx_string_tab[3555]
#define __pyx_kp_b_iso88591_Qp_L_7q_at6 __pyx_string_tab[3556]
#define __pyx_kp_b_iso88591_Qz_L_7q_at_q_5_G1 __pyx_string_tab[3557]
#define __pyx_kp_b_iso88591_Ry_Ja __pyx_string_tab[3558]
#define __pyx_kp_b_iso88591_S_A_a_Cq_WA_k_EQa __pyx_string_tab[3559]
#define __pyx_kp_b_iso88591_T_1_A_q_fF_A_1_2Q __pyx_string_tab[3560]
#define __pyx_kp_b_iso88591_T_T_TARRVVddhh_S_S_W_W_j_j_n_n __pyx_string_tab[3561]
#define __pyx_kp_b_iso88591_V_M_z_a_axq_1L_iq_V1_avQ_uAQ_1 __pyx_string_tab[3562]
#define __pyx_kp_b_iso88591_Z_L_s_F_6_uL __pyx_string_tab[3563]
#define __pyx_kp_b_iso88591__28 __pyx_string_tab[3564]
#define __pyx_kp_b_iso88591__29 __pyx_string_tab[3565]
#define __pyx_kp_b_iso88591__30 __pyx_string_tab[3566]
#define __pyx_kp_b_iso88591__31 __pyx_string_tab[3567]
#define __pyx_kp_b_iso88591__32 __pyx_string_tab[3568]
#define __pyx_kp_b_iso88591__33 __pyx_string_tab[3569]
#define __pyx_kp_b_iso88591__34 __pyx_string_tab[3570]
#define __pyx_kp_b_iso88591__35 __pyx_string_tab[3571]
#define __pyx_kp_b_iso88591__36 __pyx_string_tab[3572]
#define __pyx_kp_b_iso88591__37 __pyx_string_tab[3573]
#define __pyx_kp_b_iso88591__38 __pyx_string_tab[3574]
#define __pyx_kp_b_iso88591__39 __pyx_string_tab[3575]
#define __pyx_kp_b_iso88591__40 __pyx_string_tab[3576]
#define __pyx_kp_b_iso88591__41 __pyx_string_tab[3577]
#define __pyx_kp_b_iso88591_a0_z_5_1_A_2_1_5_1_1_Q_1_A_2_1 __pyx_string_tab[3578]
#define __pyx_kp_b_iso88591_a4_1_t5_q_j __pyx_string_tab[3579]
#define __pyx_kp_b_iso88591_aN_4z_1_31D_1_1_1_a_a_1Kq __pyx_string_tab[3580]
#define __pyx_kp_b_iso88591_a_0_Q_D_MQ_1_j_q __pyx_string_tab[3581]
#define __pyx_kp_b_iso88591_a_2 __pyx_string_tab[3582]
#define __pyx_kp_b_iso88591_a_3 __pyx_string_tab[3583]
#define __pyx_kp_b_iso88591_a_4_q __pyx_string_tab[3584]
#define __pyx_kp_b_iso88591_a_7_Q_t4q_y_U_t5_2T_a_q_1F_b_1A __pyx_string_tab[3585]
#define __pyx_kp_b_iso88591_a_L_3c_Q_1_A_Q_1_Q_1A_Qha_RuAV1 __pyx_string_tab[3586]
#define __pyx_kp_b_iso88591_a_L_R_q_s_N_8 __pyx_string_tab[3587]
#define __pyx_kp_b_iso88591_a_Q __pyx_string_tab[3588]
#define __pyx_kp_b_iso88591_a_Q_Kq_Q_hd_Q_d_uA_1_31F_M_1IQ __pyx_string_tab[3589]
#define __pyx_kp_b_iso88591_a_Qa_1D_D __pyx_string_tab[3590]
#define __pyx_kp_b_iso88591_a_Qd_Qa __pyx_string_tab[3591]
#define __pyx_kp_b_iso88591_a_a_l_Q_4wa_q_T_Q_E_k_q_4s_Q_31 __pyx_string_tab[3592]
#define __pyx_kp_b_iso88591_a_uG5_D_6_1_r_q_fA_q_a __pyx_string_tab[3593]
#define __pyx_kp_b_iso88591_a_z_5_q_T_4A_Q_1A_4AQ_5_uD_fCq __pyx_string_tab[3594]
#define __pyx_kp_b_iso88591_ab_z_a_axq_1L_iq_z_Q_q_QfA_Rq_A __pyx_string_tab[3595]
#define __pyx_kp_b_iso88591_aq_aq __pyx_string_tab[3596]
#define __pyx_kp_b_iso88591_aq_r_D_N_Qa_aq __pyx_string_tab[3597]
#define __pyx_kp_b_iso88591_avQ __pyx_string_tab[3598]
#define __pyx_kp_b_iso88591_ax_L_R_q_s_N_8 __pyx_string_tab[3599]
#define __pyx_kp_b_iso88591_b_wavQ_5_q_A_AT1DA_9G1_E_q_9G1 __pyx_string_tab[3600]
#define __pyx_kp_b_iso88591_d_s_V3b_k_Qha_3iq_q __pyx_string_tab[3601]
#define __pyx_kp_b_iso88591_d_s_V3b_k_Qha_aq_3iq __pyx_string_tab[3602]
#define __pyx_kp_b_iso88591_f_A_t_QgQ_iq_q_8_Q_G1A __pyx_string_tab[3603]
#define __pyx_kp_b_iso88591_f_z_vQ_QfA_uBa_q_81_vQoQa __pyx_string_tab[3604]
#define __pyx_kp_b_iso88591_gQa_waq_y_c_1_q_q_94Gq_55H __pyx_string_tab[3605]
#define __pyx_kp_b_iso88591_haq_QfA_uAS_4q_1 __pyx_string_tab[3606]
#define __pyx_kp_b_iso88591_k_Kq_P_31A_a_Q_uG5_D_Cq_t1_3a_z __pyx_string_tab[3607]
#define __pyx_kp_b_iso88591_k_L_5_1_A_Ya_6_A_1_vWAWE __pyx_string_tab[3608]
#define __pyx_kp_b_iso88591_k_L_5_1_A_Zq_hat7_4vWD_U_4q_1_F __pyx_string_tab[3609]
#define __pyx_kp_b_iso88591_k_L_5_1_Ya_a_j_2V1HF_a_Ya_a_5_5 __pyx_string_tab[3610]
#define __pyx_kp_b_iso88591_k_QQR_L_s_E_U_q __pyx_string_tab[3611]
#define __pyx_kp_b_iso88591_k_QQR_s_E_U_q __pyx_string_tab[3612]
#define __pyx_kp_b_iso88591_k_q_L_s_E_U __pyx_string_tab[3613]
#define __pyx_kp_b_iso88591_l_9G1 __pyx_string_tab[3614]
#define __pyx_kp_b_iso88591_n4LA_FaF_Q_q_1_a_Q_y_a __pyx_string_tab[3615]
#define __pyx_kp_b_iso88591_nAX_L_1_4wgS_Q_AQ_8_WKqP_HIS_Q __pyx_string_tab[3616]
#define __pyx_kp_b_iso88591_nA_1_4wgS_Q_AQ_q_G_VWWdde_HIS_Q __pyx_string_tab[3617]
#define __pyx_kp_b_iso88591_nA_B_1_Q_1_a_Q_y_a __pyx_string_tab[3618]
#define __pyx_kp_b_iso88591_nJe1_uAQ_1 __pyx_string_tab[3619]
#define __pyx_kp_b_iso88591_oQ6_L_3c_Q_a_A_1_Q_Qk_Q_4AQ_1_9 __pyx_string_tab[3620]
#define __pyx_kp_b_iso88591_oQ_4q_t89Be1Ba_1_1_s_Jat_Ry_HXX __pyx_string_tab[3621]
#define __pyx_kp_b_iso88591_oQ_uAQ_5_xy_A __pyx_string_tab[3622]
#define __pyx_kp_b_iso88591_q6_Qa_AT_T __pyx_string_tab[3623]
#define __pyx_kp_b_iso88591_qN_8_d_6aq __pyx_string_tab[3624]
#define __pyx_kp_b_iso88591_q_0_HD_r_2_A __pyx_string_tab[3625]
#define __pyx_kp_b_iso88591_q_0_kQR_7_0_1B_PQ_1 __pyx_string_tab[3626]
#define __pyx_kp_b_iso88591_q_0_kQR_881A_7_nA_1 __pyx_string_tab[3627]
#define __pyx_kp_b_iso88591_q_0_kQR_XQa_7_4A5J_XY_1 __pyx_string_tab[3628]
#define __pyx_kp_b_iso88591_q_1_AT_R_A_AT_Ry __pyx_string_tab[3629]
#define __pyx_kp_b_iso88591_q_1_A_AT_2_b_Q_AT_2_b __pyx_string_tab[3630]
#define __pyx_kp_b_iso88591_q_1_A_AT_A_AT_y __pyx_string_tab[3631]
#define __pyx_kp_b_iso88591_q_1_A_AT_M_AT_IQ __pyx_string_tab[3632]
#define __pyx_kp_b_iso88591_q_1_XT_t1_2Q_Qb_U_s_q_1 __pyx_string_tab[3633]
#define __pyx_kp_b_iso88591_q_2 __pyx_string_tab[3634]
#define __pyx_kp_b_iso88591_q_2_hd_2Q_QfCs_5_1_1 __pyx_string_tab[3635]
#define __pyx_kp_b_iso88591_q_2_hd_2Q_QfCs_HJauBa_1 __pyx_string_tab[3636]
#define __pyx_kp_b_iso88591_q_2_hd_r_2_A __pyx_string_tab[3637]
#define __pyx_kp_b_iso88591_q_3 __pyx_string_tab[3638]
#define __pyx_kp_b_iso88591_q_4D_A_r_2_A __pyx_string_tab[3639]
#define __pyx_kp_b_iso88591_q_4q_q_4q_99J_eSWW_j_1 __pyx_string_tab[3640]
#define __pyx_kp_b_iso88591_q_5T_Q_4Be4q_E_a_4r_1_5_1_8_Qhb __pyx_string_tab[3641]
#define __pyx_kp_b_iso88591_q_7t84q_6b_T_2Q_XQ_F_1E_q_1 __pyx_string_tab[3642]
#define __pyx_kp_b_iso88591_q_7t84q_6b_T_4r_1_4uIRvQ_Qiq_Ya __pyx_string_tab[3643]
#define __pyx_kp_b_iso88591_q_86_A_Qa_4t1_1_4q_4q_a_4xs_1_E __pyx_string_tab[3644]
#define __pyx_kp_b_iso88591_q_8_HD_q_R_a __pyx_string_tab[3645]
#define __pyx_kp_b_iso88591_q_9_XT_8_t1_2Q_XQ_F_1E_q_1 __pyx_string_tab[3646]
#define __pyx_kp_b_iso88591_q_A_xvS_vQ6Fa __pyx_string_tab[3647]
#define __pyx_kp_b_iso88591_q_HA_aq_5_E_Q_q_e1_Q_q_fG1_Q_q __pyx_string_tab[3648]
#define __pyx_kp_b_iso88591_q_L_AV_A __pyx_string_tab[3649]
#define __pyx_kp_b_iso88591_q_Zq_xwc_3axq __pyx_string_tab[3650]
#define __pyx_kp_b_iso88591_q_Zq_xwc_6_A __pyx_string_tab[3651]
#define __pyx_kp_b_iso88591_q_aq_0_d_a_G __pyx_string_tab[3652]
#define __pyx_kp_b_iso88591_q_aq_d_a_G __pyx_string_tab[3653]
#define __pyx_kp_b_iso88591_q_b_a_xwc_7_Q __pyx_string_tab[3654]
#define __pyx_kp_b_iso88591_q_d_a_r_2_A __pyx_string_tab[3655]
#define __pyx_kp_b_iso88591_q_d_xt3j_Q6Fa __pyx_string_tab[3656]
#define __pyx_kp_b_iso88591_q_fA_A_t_1_j_a_b_aq_AV4r_1A_uD __pyx_string_tab[3657]
#define __pyx_kp_b_iso88591_q_q __pyx_string_tab[3658]
#define __pyx_kp_b_iso88591_q_r_D_k_Q_az1Fa_vYc_haq_1 __pyx_string_tab[3659]
#define __pyx_kp_b_iso88591_q_t6_q_0 __pyx_string_tab[3660]
#define __pyx_kp_b_iso88591_q_t6_q_00DD_WX __pyx_string_tab[3661]
#define __pyx_kp_b_iso88591_q_t84q_nA_A __pyx_string_tab[3662]
#define __pyx_kp_b_iso88591_q_xt7_Zt1F_fF __pyx_string_tab[3663]
#define __pyx_kp_b_iso88591_q_xt7_Zt6_q_PPQ __pyx_string_tab[3664]
#define __pyx_kp_b_iso88591_ql_oQa_a_z_WA_q_Q_1IXQ_Qiq_1_1H __pyx_string_tab[3665]
#define __pyx_kp_b_iso88591_qp_8_d_6aq __pyx_string_tab[3666]
#define __pyx_kp_b_iso88591_s_1_6_81A_uCq_y_QfAWF_AU_G1_y_a __pyx_string_tab[3667]
#define __pyx_kp_b_iso88591_t1_q_b_1_1_1_1_A_A_A_b_1_A_F_1 __pyx_string_tab[3668]
#define __pyx_kp_b_iso88591_t4s_o_q_A_D_e1D_Q_1 __pyx_string_tab[3669]
#define __pyx_kp_b_iso88591_uCq_q_1 __pyx_string_tab[3670]
#define __pyx_kp_b_iso88591_uG1_WAQ_1A __pyx_string_tab[3671]
#define __pyx_kp_b_iso88591_uG5_5_q_j_Qe1_t_QfG1_iq_z_T_Kr __pyx_string_tab[3672]
#define __pyx_kp_b_iso88591_vRq_j __pyx_string_tab[3673]
#define __pyx_kp_b_iso88591_vRq_j_2 __pyx_string_tab[3674]
#define __pyx_kp_b_iso88591_vS_1 __pyx_string_tab[3675]
#define __pyx_kp_b_iso88591_v_R_1_s_M __pyx_string_tab[3676]
#define __pyx_kp_b_iso88591_waq_0_q_RRSST_81A_uAQ_1 __pyx_string_tab[3677]
#define __pyx_kp_b_iso88591_waq_1 __pyx_string_tab[3678]
#define __pyx_kp_b_iso88591_z_4y_1_1_1_1_1_1_1 __pyx_string_tab[3679]
#define __pyx_kp_b_iso88591_z_Q_q_9AQ __pyx_string_tab[3680]
#define __pyx_kp_b_iso88591_z_Q_q_q_q __pyx_string_tab[3681]
#define __pyx_kp_b_iso88591_z_q_aq_wa_q_q_1F_Q_4A_Qa __pyx_string_tab[3682]
#define __pyx_kp_b_iso88591_z_t7_1_q_1 __pyx_string_tab[3683]
#define __pyx_n_b_B __pyx_string_tab[3684]
#define __pyx_n_b_H __pyx_string_tab[3685]
#define __pyx_n_b_I __pyx_string_tab[3686]
#define __pyx_n_b_None __pyx_string_tab[3687]
#define __pyx_n_b_Q __pyx_string_tab[3688]
#define __pyx_n_b_b __pyx_string_tab[3689]
#define __pyx_n_b_bBhHiIqQ __pyx_string_tab[3690]
#define __pyx_n_b_d __pyx_string_tab[3691]
#define __pyx_n_b_e __pyx_string_tab[3692]
#define __pyx_n_b_f __pyx_string_tab[3693]
#define __pyx_n_b_h __pyx_string_tab[3694]
#define __pyx_n_b_i __pyx_string_tab[3695]
#define __pyx_n_b_pandas __pyx_string_tab[3696]
#define __pyx_n_b_q __pyx_string_tab[3697]
#define __pyx_n_b_r_extptr __pyx_string_tab[3698]
#define __pyx_float_0_9 __pyx_number_tab[0]
#define __pyx_float_0_01 __pyx_number_tab[1]
#define __pyx_int_0 __pyx_number_tab[2]
#define __pyx_int_neg_1 __pyx_number_tab[3]
#define __pyx_int_1 __pyx_number_tab[4]
#define __pyx_int_2 __pyx_number_tab[5]
#define __pyx_int_3 __pyx_number_tab[6]
#define __pyx_int_5 __pyx_number_tab[7]
#define __pyx_int_8 __pyx_number_tab[8]
#define __pyx_int_9 __pyx_number_tab[9]
#define __pyx_int_10 __pyx_number_tab[10]
#define __pyx_int_50 __pyx_number_tab[11]
#define __pyx_int_64 __pyx_number_tab[12]
#define __pyx_int_100 __pyx_number_tab[13]
#define __pyx_int_1970 __pyx_number_tab[14]
#define __pyx_int_65536 __pyx_number_tab[15]
#define __pyx_int_262144 __pyx_number_tab[16]
#define __pyx_int_65821749 __pyx_number_tab[17]
#define __pyx_int_238750788 __pyx_number_tab[18]
/* #### Code section: module_state_clear ### */
#if CYTHON_USE_MODULE_STATE
static CYTHON_SMALL_CODE int __pyx_m_clear(PyObject *m) {
  __pyx_mstatetype *clear_module_state = __Pyx_PyModule_GetState(m);
  if (!clear_module_state) return 0;
  Py_CLEAR(clear_module_state->__pyx_d);
  Py_CLEAR(clear_module_state->__pyx_b);
  Py_CLEAR(clear_module_state->__pyx_cython_runtime);
  Py_CLEAR(clear_module_state->__pyx_empty_tuple);
  Py_CLEAR(clear_module_state->__pyx_empty_bytes);
  Py_CLEAR(clear_module_state->__pyx_empty_unicode);
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  __Pyx_State_RemoveModule(NULL);
  #endif
  Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_4type_type);
  Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_4bool_bool);
  Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_7complex_complex);
  Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_8datetime_date);
  Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_8datetime_time);
  Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_8datetime_datetime);
  Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_8datetime_timedelta);
  Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_8datetime_tzinfo);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib__Weakrefable);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib__Weakrefable);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_IpcWriteOptions);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_IpcWriteOptions);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_IpcReadOptions);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_IpcReadOptions);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_Message);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_Message);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_MemoryPool);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_MemoryPool);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_DataType);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_DataType);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_ListType);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_ListType);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_LargeListType);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_LargeListType);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_ListViewType);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_ListViewType);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_LargeListViewType);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_LargeListViewType);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_MapType);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_MapType);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_FixedSizeListType);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_FixedSizeListType);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_StructType);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_StructType);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_DictionaryMemo);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_DictionaryMemo);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_DictionaryType);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_DictionaryType);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_TimestampType);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_TimestampType);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_Time32Type);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_Time32Type);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_Time64Type);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_Time64Type);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_DurationType);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_DurationType);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_FixedSizeBinaryType);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_FixedSizeBinaryType);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_Decimal32Type);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_Decimal32Type);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_Decimal64Type);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_Decimal64Type);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_Decimal128Type);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_Decimal128Type);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_Decimal256Type);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_Decimal256Type);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_RunEndEncodedType);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_RunEndEncodedType);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_BaseExtensionType);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_BaseExtensionType);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_ExtensionType);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_ExtensionType);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_FixedShapeTensorType);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_FixedShapeTensorType);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_Bool8Type);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_Bool8Type);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_OpaqueType);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_OpaqueType);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_UuidType);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_UuidType);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_JsonType);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_JsonType);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib__Metadata);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib__Metadata);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_KeyValueMetadata);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_KeyValueMetadata);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_Field);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_Field);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_Schema);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_Schema);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_Scalar);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_Scalar);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_ArrayStatistics);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_ArrayStatistics);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib__PandasConvertible);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib__PandasConvertible);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_Array);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_Array);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_Tensor);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_Tensor);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_SparseCSRMatrix);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_SparseCSRMatrix);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_SparseCSCMatrix);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_SparseCSCMatrix);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_SparseCOOTensor);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_SparseCOOTensor);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_SparseCSFTensor);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_SparseCSFTensor);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_NullArray);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_NullArray);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_BooleanArray);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_BooleanArray);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_NumericArray);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_NumericArray);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_IntegerArray);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_IntegerArray);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_FloatingPointArray);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_FloatingPointArray);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_Int8Array);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_Int8Array);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_UInt8Array);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_UInt8Array);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_Int16Array);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_Int16Array);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_UInt16Array);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_UInt16Array);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_Int32Array);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_Int32Array);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_UInt32Array);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_UInt32Array);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_Int64Array);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_Int64Array);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_UInt64Array);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_UInt64Array);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_HalfFloatArray);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_HalfFloatArray);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_FloatArray);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_FloatArray);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_DoubleArray);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_DoubleArray);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_FixedSizeBinaryArray);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_FixedSizeBinaryArray);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_Decimal32Array);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_Decimal32Array);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_Decimal64Array);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_Decimal64Array);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_Decimal128Array);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_Decimal128Array);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_Decimal256Array);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_Decimal256Array);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_StructArray);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_StructArray);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_BaseListArray);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_BaseListArray);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_ListArray);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_ListArray);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_LargeListArray);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_LargeListArray);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_ListViewArray);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_ListViewArray);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_LargeListViewArray);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_LargeListViewArray);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_MapArray);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_MapArray);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_FixedSizeListArray);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_FixedSizeListArray);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_UnionArray);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_UnionArray);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_StringArray);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_StringArray);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_BinaryArray);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_BinaryArray);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_StringViewArray);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_StringViewArray);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_BinaryViewArray);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_BinaryViewArray);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_DictionaryArray);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_DictionaryArray);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_ExtensionArray);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_ExtensionArray);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_MonthDayNanoIntervalArray);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_MonthDayNanoIntervalArray);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_ChunkedArray);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_ChunkedArray);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib__Tabular);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib__Tabular);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_Table);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_Table);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_RecordBatch);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_RecordBatch);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_Device);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_Device);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_MemoryManager);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_MemoryManager);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_Buffer);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_Buffer);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_ResizableBuffer);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_ResizableBuffer);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_NativeFile);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_NativeFile);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_BufferedInputStream);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_BufferedInputStream);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_BufferedOutputStream);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_BufferedOutputStream);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_CompressedInputStream);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_CompressedInputStream);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_CompressedOutputStream);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_CompressedOutputStream);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib__CRecordBatchWriter);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib__CRecordBatchWriter);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_RecordBatchReader);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_RecordBatchReader);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_CacheOptions);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_CacheOptions);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_Codec);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_Codec);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_StopToken);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_StopToken);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_SignalStopHandler);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_SignalStopHandler);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib__PandasAPIShim);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib__PandasAPIShim);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_LoggingMemoryPool);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_LoggingMemoryPool);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_ProxyMemoryPool);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_ProxyMemoryPool);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_UnionType);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_UnionType);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_SparseUnionType);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_SparseUnionType);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_DenseUnionType);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_DenseUnionType);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_UnknownExtensionType);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_UnknownExtensionType);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib__ExtensionRegistryNanny);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib__ExtensionRegistryNanny);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_NullScalar);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_NullScalar);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_BooleanScalar);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_BooleanScalar);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_UInt8Scalar);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_UInt8Scalar);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_Int8Scalar);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_Int8Scalar);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_UInt16Scalar);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_UInt16Scalar);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_Int16Scalar);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_Int16Scalar);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_UInt32Scalar);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_UInt32Scalar);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_Int32Scalar);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_Int32Scalar);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_UInt64Scalar);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_UInt64Scalar);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_Int64Scalar);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_Int64Scalar);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_HalfFloatScalar);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_HalfFloatScalar);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_FloatScalar);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_FloatScalar);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_DoubleScalar);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_DoubleScalar);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_Decimal32Scalar);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_Decimal32Scalar);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_Decimal64Scalar);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_Decimal64Scalar);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_Decimal128Scalar);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_Decimal128Scalar);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_Decimal256Scalar);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_Decimal256Scalar);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_Date32Scalar);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_Date32Scalar);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_Date64Scalar);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_Date64Scalar);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_Time32Scalar);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_Time32Scalar);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_Time64Scalar);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_Time64Scalar);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_TimestampScalar);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_TimestampScalar);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_DurationScalar);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_DurationScalar);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_MonthDayNanoIntervalScalar);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_MonthDayNanoIntervalScalar);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_BinaryScalar);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_BinaryScalar);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_LargeBinaryScalar);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_LargeBinaryScalar);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_FixedSizeBinaryScalar);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_FixedSizeBinaryScalar);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_StringScalar);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_StringScalar);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_LargeStringScalar);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_LargeStringScalar);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_BinaryViewScalar);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_BinaryViewScalar);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_StringViewScalar);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_StringViewScalar);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_ListScalar);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_ListScalar);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_FixedSizeListScalar);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_FixedSizeListScalar);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_LargeListScalar);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_LargeListScalar);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_ListViewScalar);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_ListViewScalar);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_LargeListViewScalar);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_LargeListViewScalar);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_StructScalar);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_StructScalar);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_MapScalar);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_MapScalar);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_DictionaryScalar);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_DictionaryScalar);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_RunEndEncodedScalar);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_RunEndEncodedScalar);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_UnionScalar);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_UnionScalar);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_ExtensionScalar);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_ExtensionScalar);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_FixedShapeTensorScalar);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_FixedShapeTensorScalar);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_OpaqueScalar);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_OpaqueScalar);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_Bool8Scalar);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_Bool8Scalar);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_Date32Array);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_Date32Array);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_Date64Array);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_Date64Array);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_TimestampArray);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_TimestampArray);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_Time32Array);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_Time32Array);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_Time64Array);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_Time64Array);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_DurationArray);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_DurationArray);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_Decima32Array);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_Decima32Array);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_LargeStringArray);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_LargeStringArray);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_LargeBinaryArray);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_LargeBinaryArray);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_RunEndEncodedArray);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_RunEndEncodedArray);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_FixedShapeTensorArray);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_FixedShapeTensorArray);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_OpaqueArray);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_OpaqueArray);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_Bool8Array);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_Bool8Array);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_StringBuilder);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_StringBuilder);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_StringViewBuilder);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_StringViewBuilder);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_PythonFile);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_PythonFile);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_MemoryMappedFile);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_MemoryMappedFile);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_OSFile);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_OSFile);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_FixedSizeBufferWriter);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_FixedSizeBufferWriter);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_BufferOutputStream);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_BufferOutputStream);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_MockOutputStream);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_MockOutputStream);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_BufferReader);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_BufferReader);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_TransformInputStream);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_TransformInputStream);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib_MessageReader);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib_MessageReader);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib__RecordBatchStreamWriter);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib__RecordBatchStreamWriter);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib__RecordBatchStreamReader);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib__RecordBatchStreamReader);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib__RecordBatchFileWriter);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib__RecordBatchFileWriter);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib__RecordBatchFileReader);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib__RecordBatchFileReader);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib___pyx_defaults);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib___pyx_defaults);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct____iter__);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib___pyx_scope_struct____iter__);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_1___iter__);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib___pyx_scope_struct_1___iter__);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_2_genexpr);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib___pyx_scope_struct_2_genexpr);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_3_keys);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib___pyx_scope_struct_3_keys);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_4_values);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib___pyx_scope_struct_4_values);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_5_items);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib___pyx_scope_struct_5_items);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_6___iter__);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib___pyx_scope_struct_6___iter__);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_7___iter__);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib___pyx_scope_struct_7___iter__);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_8_items);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib___pyx_scope_struct_8_items);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_9_genexpr);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib___pyx_scope_struct_9_genexpr);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_10___iter__);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib___pyx_scope_struct_10___iter__);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_11___iter__);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib___pyx_scope_struct_11___iter__);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_12_genexpr);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib___pyx_scope_struct_12_genexpr);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_13___iter__);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib___pyx_scope_struct_13___iter__);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_14_iterchunks);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib___pyx_scope_struct_14_iterchunks);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_15_itercolumns);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib___pyx_scope_struct_15_itercolumns);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_16_genexpr);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib___pyx_scope_struct_16_genexpr);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_17_genexpr);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib___pyx_scope_struct_17_genexpr);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_18_genexpr);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib___pyx_scope_struct_18_genexpr);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_19_genexpr);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib___pyx_scope_struct_19_genexpr);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_20_genexpr);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib___pyx_scope_struct_20_genexpr);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_21_download);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib___pyx_scope_struct_21_download);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_22__download_nothreads);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib___pyx_scope_struct_22__download_nothreads);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_23_upload);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib___pyx_scope_struct_23_upload);
  Py_CLEAR(clear_module_state->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_24_iter_batches_with_custom_metadata);
  Py_CLEAR(clear_module_state->__pyx_type_7pyarrow_3lib___pyx_scope_struct_24_iter_batches_with_custom_metadata);
  Py_CLEAR(clear_module_state->__pyx_k__20);
  Py_CLEAR(clear_module_state->__pyx_k__23);
  Py_CLEAR(clear_module_state->__pyx_k__24);
  Py_CLEAR(clear_module_state->__pyx_k__25);
  Py_CLEAR(clear_module_state->__pyx_k__26);
  for (int i=0; i<4; ++i) { Py_CLEAR(clear_module_state->__pyx_slice[i]); }
  for (int i=0; i<58; ++i) { Py_CLEAR(clear_module_state->__pyx_tuple[i]); }
  for (int i=0; i<784; ++i) { Py_CLEAR(clear_module_state->__pyx_codeobj_tab[i]); }
  for (int i=0; i<3699; ++i) { Py_CLEAR(clear_module_state->__pyx_string_tab[i]); }
  for (int i=0; i<19; ++i) { Py_CLEAR(clear_module_state->__pyx_number_tab[i]); }
/* #### Code section: module_state_clear_contents ### */
/* CommonTypesMetaclass.module_state_clear */
Py_CLEAR(clear_module_state->__pyx_CommonTypesMetaclassType);

/* CythonFunctionShared.module_state_clear */
Py_CLEAR(clear_module_state->__pyx_CyFunctionType);

/* Generator.module_state_clear */
Py_CLEAR(clear_module_state->__pyx_GeneratorType);

/* #### Code section: module_state_clear_end ### */
return 0;
}
#endif
/* #### Code section: module_state_traverse ### */
#if CYTHON_USE_MODULE_STATE
static CYTHON_SMALL_CODE int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) {
  __pyx_mstatetype *traverse_module_state = __Pyx_PyModule_GetState(m);
  if (!traverse_module_state) return 0;
  Py_VISIT(traverse_module_state->__pyx_d);
  Py_VISIT(traverse_module_state->__pyx_b);
  Py_VISIT(traverse_module_state->__pyx_cython_runtime);
  __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_tuple);
  __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_bytes);
  __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_unicode);
  Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_4type_type);
  Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_4bool_bool);
  Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_7complex_complex);
  Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_8datetime_date);
  Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_8datetime_time);
  Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_8datetime_datetime);
  Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_8datetime_timedelta);
  Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_8datetime_tzinfo);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib__Weakrefable);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib__Weakrefable);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_IpcWriteOptions);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_IpcWriteOptions);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_IpcReadOptions);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_IpcReadOptions);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_Message);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_Message);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_MemoryPool);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_MemoryPool);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_DataType);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_DataType);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_ListType);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_ListType);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_LargeListType);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_LargeListType);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_ListViewType);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_ListViewType);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_LargeListViewType);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_LargeListViewType);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_MapType);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_MapType);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_FixedSizeListType);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_FixedSizeListType);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_StructType);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_StructType);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_DictionaryMemo);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_DictionaryMemo);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_DictionaryType);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_DictionaryType);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_TimestampType);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_TimestampType);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_Time32Type);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_Time32Type);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_Time64Type);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_Time64Type);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_DurationType);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_DurationType);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_FixedSizeBinaryType);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_FixedSizeBinaryType);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_Decimal32Type);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_Decimal32Type);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_Decimal64Type);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_Decimal64Type);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_Decimal128Type);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_Decimal128Type);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_Decimal256Type);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_Decimal256Type);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_RunEndEncodedType);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_RunEndEncodedType);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_BaseExtensionType);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_BaseExtensionType);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_ExtensionType);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_ExtensionType);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_FixedShapeTensorType);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_FixedShapeTensorType);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_Bool8Type);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_Bool8Type);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_OpaqueType);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_OpaqueType);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_UuidType);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_UuidType);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_JsonType);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_JsonType);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib__Metadata);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib__Metadata);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_KeyValueMetadata);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_KeyValueMetadata);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_Field);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_Field);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_Schema);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_Schema);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_Scalar);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_Scalar);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_ArrayStatistics);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_ArrayStatistics);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib__PandasConvertible);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib__PandasConvertible);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_Array);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_Array);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_Tensor);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_Tensor);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_SparseCSRMatrix);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_SparseCSRMatrix);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_SparseCSCMatrix);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_SparseCSCMatrix);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_SparseCOOTensor);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_SparseCOOTensor);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_SparseCSFTensor);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_SparseCSFTensor);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_NullArray);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_NullArray);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_BooleanArray);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_BooleanArray);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_NumericArray);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_NumericArray);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_IntegerArray);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_IntegerArray);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_FloatingPointArray);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_FloatingPointArray);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_Int8Array);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_Int8Array);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_UInt8Array);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_UInt8Array);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_Int16Array);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_Int16Array);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_UInt16Array);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_UInt16Array);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_Int32Array);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_Int32Array);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_UInt32Array);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_UInt32Array);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_Int64Array);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_Int64Array);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_UInt64Array);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_UInt64Array);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_HalfFloatArray);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_HalfFloatArray);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_FloatArray);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_FloatArray);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_DoubleArray);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_DoubleArray);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_FixedSizeBinaryArray);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_FixedSizeBinaryArray);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_Decimal32Array);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_Decimal32Array);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_Decimal64Array);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_Decimal64Array);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_Decimal128Array);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_Decimal128Array);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_Decimal256Array);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_Decimal256Array);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_StructArray);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_StructArray);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_BaseListArray);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_BaseListArray);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_ListArray);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_ListArray);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_LargeListArray);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_LargeListArray);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_ListViewArray);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_ListViewArray);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_LargeListViewArray);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_LargeListViewArray);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_MapArray);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_MapArray);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_FixedSizeListArray);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_FixedSizeListArray);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_UnionArray);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_UnionArray);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_StringArray);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_StringArray);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_BinaryArray);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_BinaryArray);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_StringViewArray);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_StringViewArray);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_BinaryViewArray);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_BinaryViewArray);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_DictionaryArray);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_DictionaryArray);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_ExtensionArray);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_ExtensionArray);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_MonthDayNanoIntervalArray);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_MonthDayNanoIntervalArray);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_ChunkedArray);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_ChunkedArray);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib__Tabular);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib__Tabular);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_Table);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_Table);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_RecordBatch);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_RecordBatch);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_Device);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_Device);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_MemoryManager);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_MemoryManager);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_Buffer);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_Buffer);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_ResizableBuffer);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_ResizableBuffer);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_NativeFile);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_NativeFile);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_BufferedInputStream);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_BufferedInputStream);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_BufferedOutputStream);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_BufferedOutputStream);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_CompressedInputStream);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_CompressedInputStream);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_CompressedOutputStream);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_CompressedOutputStream);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib__CRecordBatchWriter);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib__CRecordBatchWriter);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_RecordBatchReader);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_RecordBatchReader);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_CacheOptions);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_CacheOptions);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_Codec);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_Codec);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_StopToken);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_StopToken);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_SignalStopHandler);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_SignalStopHandler);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib__PandasAPIShim);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib__PandasAPIShim);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_LoggingMemoryPool);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_LoggingMemoryPool);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_ProxyMemoryPool);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_ProxyMemoryPool);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_UnionType);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_UnionType);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_SparseUnionType);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_SparseUnionType);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_DenseUnionType);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_DenseUnionType);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_UnknownExtensionType);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_UnknownExtensionType);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib__ExtensionRegistryNanny);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib__ExtensionRegistryNanny);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_NullScalar);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_NullScalar);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_BooleanScalar);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_BooleanScalar);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_UInt8Scalar);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_UInt8Scalar);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_Int8Scalar);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_Int8Scalar);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_UInt16Scalar);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_UInt16Scalar);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_Int16Scalar);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_Int16Scalar);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_UInt32Scalar);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_UInt32Scalar);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_Int32Scalar);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_Int32Scalar);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_UInt64Scalar);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_UInt64Scalar);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_Int64Scalar);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_Int64Scalar);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_HalfFloatScalar);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_HalfFloatScalar);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_FloatScalar);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_FloatScalar);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_DoubleScalar);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_DoubleScalar);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_Decimal32Scalar);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_Decimal32Scalar);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_Decimal64Scalar);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_Decimal64Scalar);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_Decimal128Scalar);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_Decimal128Scalar);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_Decimal256Scalar);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_Decimal256Scalar);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_Date32Scalar);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_Date32Scalar);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_Date64Scalar);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_Date64Scalar);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_Time32Scalar);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_Time32Scalar);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_Time64Scalar);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_Time64Scalar);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_TimestampScalar);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_TimestampScalar);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_DurationScalar);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_DurationScalar);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_MonthDayNanoIntervalScalar);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_MonthDayNanoIntervalScalar);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_BinaryScalar);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_BinaryScalar);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_LargeBinaryScalar);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_LargeBinaryScalar);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_FixedSizeBinaryScalar);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_FixedSizeBinaryScalar);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_StringScalar);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_StringScalar);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_LargeStringScalar);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_LargeStringScalar);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_BinaryViewScalar);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_BinaryViewScalar);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_StringViewScalar);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_StringViewScalar);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_ListScalar);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_ListScalar);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_FixedSizeListScalar);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_FixedSizeListScalar);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_LargeListScalar);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_LargeListScalar);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_ListViewScalar);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_ListViewScalar);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_LargeListViewScalar);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_LargeListViewScalar);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_StructScalar);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_StructScalar);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_MapScalar);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_MapScalar);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_DictionaryScalar);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_DictionaryScalar);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_RunEndEncodedScalar);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_RunEndEncodedScalar);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_UnionScalar);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_UnionScalar);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_ExtensionScalar);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_ExtensionScalar);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_FixedShapeTensorScalar);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_FixedShapeTensorScalar);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_OpaqueScalar);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_OpaqueScalar);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_Bool8Scalar);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_Bool8Scalar);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_Date32Array);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_Date32Array);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_Date64Array);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_Date64Array);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_TimestampArray);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_TimestampArray);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_Time32Array);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_Time32Array);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_Time64Array);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_Time64Array);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_DurationArray);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_DurationArray);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_Decima32Array);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_Decima32Array);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_LargeStringArray);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_LargeStringArray);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_LargeBinaryArray);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_LargeBinaryArray);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_RunEndEncodedArray);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_RunEndEncodedArray);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_FixedShapeTensorArray);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_FixedShapeTensorArray);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_OpaqueArray);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_OpaqueArray);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_Bool8Array);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_Bool8Array);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_StringBuilder);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_StringBuilder);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_StringViewBuilder);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_StringViewBuilder);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_PythonFile);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_PythonFile);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_MemoryMappedFile);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_MemoryMappedFile);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_OSFile);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_OSFile);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_FixedSizeBufferWriter);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_FixedSizeBufferWriter);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_BufferOutputStream);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_BufferOutputStream);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_MockOutputStream);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_MockOutputStream);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_BufferReader);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_BufferReader);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_TransformInputStream);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_TransformInputStream);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib_MessageReader);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib_MessageReader);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib__RecordBatchStreamWriter);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib__RecordBatchStreamWriter);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib__RecordBatchStreamReader);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib__RecordBatchStreamReader);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib__RecordBatchFileWriter);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib__RecordBatchFileWriter);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib__RecordBatchFileReader);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib__RecordBatchFileReader);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib___pyx_defaults);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib___pyx_defaults);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct____iter__);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib___pyx_scope_struct____iter__);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_1___iter__);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib___pyx_scope_struct_1___iter__);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_2_genexpr);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib___pyx_scope_struct_2_genexpr);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_3_keys);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib___pyx_scope_struct_3_keys);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_4_values);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib___pyx_scope_struct_4_values);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_5_items);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib___pyx_scope_struct_5_items);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_6___iter__);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib___pyx_scope_struct_6___iter__);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_7___iter__);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib___pyx_scope_struct_7___iter__);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_8_items);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib___pyx_scope_struct_8_items);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_9_genexpr);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib___pyx_scope_struct_9_genexpr);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_10___iter__);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib___pyx_scope_struct_10___iter__);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_11___iter__);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib___pyx_scope_struct_11___iter__);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_12_genexpr);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib___pyx_scope_struct_12_genexpr);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_13___iter__);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib___pyx_scope_struct_13___iter__);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_14_iterchunks);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib___pyx_scope_struct_14_iterchunks);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_15_itercolumns);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib___pyx_scope_struct_15_itercolumns);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_16_genexpr);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib___pyx_scope_struct_16_genexpr);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_17_genexpr);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib___pyx_scope_struct_17_genexpr);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_18_genexpr);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib___pyx_scope_struct_18_genexpr);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_19_genexpr);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib___pyx_scope_struct_19_genexpr);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_20_genexpr);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib___pyx_scope_struct_20_genexpr);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_21_download);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib___pyx_scope_struct_21_download);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_22__download_nothreads);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib___pyx_scope_struct_22__download_nothreads);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_23_upload);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib___pyx_scope_struct_23_upload);
  Py_VISIT(traverse_module_state->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_24_iter_batches_with_custom_metadata);
  Py_VISIT(traverse_module_state->__pyx_type_7pyarrow_3lib___pyx_scope_struct_24_iter_batches_with_custom_metadata);
  Py_VISIT(traverse_module_state->__pyx_k__20);
  Py_VISIT(traverse_module_state->__pyx_k__23);
  Py_VISIT(traverse_module_state->__pyx_k__24);
  Py_VISIT(traverse_module_state->__pyx_k__25);
  Py_VISIT(traverse_module_state->__pyx_k__26);
  for (int i=0; i<4; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_slice[i]); }
  for (int i=0; i<58; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_tuple[i]); }
  for (int i=0; i<784; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_codeobj_tab[i]); }
  for (int i=0; i<3699; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_string_tab[i]); }
  for (int i=0; i<19; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_number_tab[i]); }
/* #### Code section: module_state_traverse_contents ### */
/* CommonTypesMetaclass.module_state_traverse */
Py_VISIT(traverse_module_state->__pyx_CommonTypesMetaclassType);

/* CythonFunctionShared.module_state_traverse */
Py_VISIT(traverse_module_state->__pyx_CyFunctionType);

/* Generator.module_state_traverse */
Py_VISIT(traverse_module_state->__pyx_GeneratorType);

/* #### Code section: module_state_traverse_end ### */
return 0;
}
#endif
/* #### Code section: module_code ### */

/* "EnumTypeToPy":2
 * 
 * @cname("__Pyx_Enum_7pyarrow_3lib_enum__dunderpyx_t_7pyarrow_3lib_MetadataVersion_to_py")             # <<<<<<<<<<<<<<
 * cdef __Pyx_Enum_7pyarrow_3lib_enum__dunderpyx_t_7pyarrow_3lib_MetadataVersion_to_py(MetadataVersion c_val):
 *     cdef object __pyx_enum
*/

static PyObject *__Pyx_Enum_7pyarrow_3lib_enum__dunderpyx_t_7pyarrow_3lib_MetadataVersion_to_py(enum __pyx_t_7pyarrow_3lib_MetadataVersion __pyx_v_c_val) {
  PyObject *__pyx_v___pyx_enum = 0;
  int __pyx_v_underlying_c_val;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_Enum_7pyarrow_3lib_enum__dunderpyx_t_7pyarrow_3lib_MetadataVersion_to_py", 0);

  /* "EnumTypeToPy":5
 * cdef __Pyx_Enum_7pyarrow_3lib_enum__dunderpyx_t_7pyarrow_3lib_MetadataVersion_to_py(MetadataVersion c_val):
 *     cdef object __pyx_enum
 *     __pyx_enum = MetadataVersion             # <<<<<<<<<<<<<<
 * 
 *     if 0:
*/
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_MetadataVersion); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v___pyx_enum = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "EnumTypeToPy":9
 *     if 0:
 *         pass
 *     elif c_val == MetadataVersion.V1:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.V1
 *     elif c_val == MetadataVersion.V2:
*/
  __pyx_t_2 = (__pyx_v_c_val == __pyx_e_7pyarrow_3lib_V1);
  if (__pyx_t_2) {

    /* "EnumTypeToPy":10
 *         pass
 *     elif c_val == MetadataVersion.V1:
 *         return __pyx_enum.V1             # <<<<<<<<<<<<<<
 *     elif c_val == MetadataVersion.V2:
 *         return __pyx_enum.V2
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_V1); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 10, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":9
 *     if 0:
 *         pass
 *     elif c_val == MetadataVersion.V1:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.V1
 *     elif c_val == MetadataVersion.V2:
*/
  }

  /* "EnumTypeToPy":11
 *     elif c_val == MetadataVersion.V1:
 *         return __pyx_enum.V1
 *     elif c_val == MetadataVersion.V2:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.V2
 *     elif c_val == MetadataVersion.V3:
*/
  __pyx_t_2 = (__pyx_v_c_val == __pyx_e_7pyarrow_3lib_V2);
  if (__pyx_t_2) {

    /* "EnumTypeToPy":12
 *         return __pyx_enum.V1
 *     elif c_val == MetadataVersion.V2:
 *         return __pyx_enum.V2             # <<<<<<<<<<<<<<
 *     elif c_val == MetadataVersion.V3:
 *         return __pyx_enum.V3
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_V2); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 12, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":11
 *     elif c_val == MetadataVersion.V1:
 *         return __pyx_enum.V1
 *     elif c_val == MetadataVersion.V2:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.V2
 *     elif c_val == MetadataVersion.V3:
*/
  }

  /* "EnumTypeToPy":13
 *     elif c_val == MetadataVersion.V2:
 *         return __pyx_enum.V2
 *     elif c_val == MetadataVersion.V3:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.V3
 *     elif c_val == MetadataVersion.V4:
*/
  __pyx_t_2 = (__pyx_v_c_val == __pyx_e_7pyarrow_3lib_V3);
  if (__pyx_t_2) {

    /* "EnumTypeToPy":14
 *         return __pyx_enum.V2
 *     elif c_val == MetadataVersion.V3:
 *         return __pyx_enum.V3             # <<<<<<<<<<<<<<
 *     elif c_val == MetadataVersion.V4:
 *         return __pyx_enum.V4
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_V3); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":13
 *     elif c_val == MetadataVersion.V2:
 *         return __pyx_enum.V2
 *     elif c_val == MetadataVersion.V3:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.V3
 *     elif c_val == MetadataVersion.V4:
*/
  }

  /* "EnumTypeToPy":15
 *     elif c_val == MetadataVersion.V3:
 *         return __pyx_enum.V3
 *     elif c_val == MetadataVersion.V4:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.V4
 *     elif c_val == MetadataVersion.V5:
*/
  __pyx_t_2 = (__pyx_v_c_val == __pyx_e_7pyarrow_3lib_V4);
  if (__pyx_t_2) {

    /* "EnumTypeToPy":16
 *         return __pyx_enum.V3
 *     elif c_val == MetadataVersion.V4:
 *         return __pyx_enum.V4             # <<<<<<<<<<<<<<
 *     elif c_val == MetadataVersion.V5:
 *         return __pyx_enum.V5
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_V4); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 16, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":15
 *     elif c_val == MetadataVersion.V3:
 *         return __pyx_enum.V3
 *     elif c_val == MetadataVersion.V4:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.V4
 *     elif c_val == MetadataVersion.V5:
*/
  }

  /* "EnumTypeToPy":17
 *     elif c_val == MetadataVersion.V4:
 *         return __pyx_enum.V4
 *     elif c_val == MetadataVersion.V5:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.V5
 *     else:
*/
  __pyx_t_2 = (__pyx_v_c_val == __pyx_e_7pyarrow_3lib_V5);
  if (__pyx_t_2) {

    /* "EnumTypeToPy":18
 *         return __pyx_enum.V4
 *     elif c_val == MetadataVersion.V5:
 *         return __pyx_enum.V5             # <<<<<<<<<<<<<<
 *     else:
 *         underlying_c_val = <int>c_val
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_V5); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 18, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":17
 *     elif c_val == MetadataVersion.V4:
 *         return __pyx_enum.V4
 *     elif c_val == MetadataVersion.V5:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.V5
 *     else:
*/
  }

  /* "EnumTypeToPy":20
 *         return __pyx_enum.V5
 *     else:
 *         underlying_c_val = <int>c_val             # <<<<<<<<<<<<<<
 *         return __pyx_enum(underlying_c_val)
*/
  /*else*/ {
    __pyx_v_underlying_c_val = ((int)__pyx_v_c_val);

    /* "EnumTypeToPy":21
 *     else:
 *         underlying_c_val = <int>c_val
 *         return __pyx_enum(underlying_c_val)             # <<<<<<<<<<<<<<
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_v___pyx_enum);
    __pyx_t_4 = __pyx_v___pyx_enum; 
    __pyx_t_5 = __Pyx_PyLong_From_int(__pyx_v_underlying_c_val); if (unlikely(!__pyx_t_5)) __PYX_ERR(7, 21, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
      assert(__pyx_t_3);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
      __pyx_t_6 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 21, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }

  /* "EnumTypeToPy":2
 * 
 * @cname("__Pyx_Enum_7pyarrow_3lib_enum__dunderpyx_t_7pyarrow_3lib_MetadataVersion_to_py")             # <<<<<<<<<<<<<<
 * cdef __Pyx_Enum_7pyarrow_3lib_enum__dunderpyx_t_7pyarrow_3lib_MetadataVersion_to_py(MetadataVersion c_val):
 *     cdef object __pyx_enum
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("EnumTypeToPy.__Pyx_Enum_7pyarrow_3lib_enum__dunderpyx_t_7pyarrow_3lib_MetadataVersion_to_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_enum);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "string.to_py":31
 *     cdef object __Pyx_PyObject_FromStringAndSize(const char*, size_t)
 * 
 * @cname("__pyx_convert_PyObject_string_to_py_6libcpp_6string_std__in_string")             # <<<<<<<<<<<<<<
 * cdef inline object __pyx_convert_PyObject_string_to_py_6libcpp_6string_std__in_string(const string& s):
 *     if s.size() > <size_t> PY_SSIZE_T_MAX:
*/

static CYTHON_INLINE PyObject *__pyx_convert_PyObject_string_to_py_6libcpp_6string_std__in_string(std::string const &__pyx_v_s) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_convert_PyObject_string_to_py_6libcpp_6string_std__in_string", 0);

  /* "string.to_py":33
 * @cname("__pyx_convert_PyObject_string_to_py_6libcpp_6string_std__in_string")
 * cdef inline object __pyx_convert_PyObject_string_to_py_6libcpp_6string_std__in_string(const string& s):
 *     if s.size() > <size_t> PY_SSIZE_T_MAX:             # <<<<<<<<<<<<<<
 *         raise MemoryError()
 *     return __Pyx_PyObject_FromStringAndSize(s.data(), <Py_ssize_t> s.size())
*/
  __pyx_t_1 = (__pyx_v_s.size() > ((size_t)PY_SSIZE_T_MAX));
  if (unlikely(__pyx_t_1)) {

    /* "string.to_py":34
 * cdef inline object __pyx_convert_PyObject_string_to_py_6libcpp_6string_std__in_string(const string& s):
 *     if s.size() > <size_t> PY_SSIZE_T_MAX:
 *         raise MemoryError()             # <<<<<<<<<<<<<<
 *     return __Pyx_PyObject_FromStringAndSize(s.data(), <Py_ssize_t> s.size())
 * cdef extern from *:
*/
    PyErr_NoMemory(); __PYX_ERR(7, 34, __pyx_L1_error)

    /* "string.to_py":33
 * @cname("__pyx_convert_PyObject_string_to_py_6libcpp_6string_std__in_string")
 * cdef inline object __pyx_convert_PyObject_string_to_py_6libcpp_6string_std__in_string(const string& s):
 *     if s.size() > <size_t> PY_SSIZE_T_MAX:             # <<<<<<<<<<<<<<
 *         raise MemoryError()
 *     return __Pyx_PyObject_FromStringAndSize(s.data(), <Py_ssize_t> s.size())
*/
  }

  /* "string.to_py":35
 *     if s.size() > <size_t> PY_SSIZE_T_MAX:
 *         raise MemoryError()
 *     return __Pyx_PyObject_FromStringAndSize(s.data(), <Py_ssize_t> s.size())             # <<<<<<<<<<<<<<
 * cdef extern from *:
 *     cdef object __Pyx_PyUnicode_FromStringAndSize(const char*, size_t)
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_FromStringAndSize(__pyx_v_s.data(), ((Py_ssize_t)__pyx_v_s.size())); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 35, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "string.to_py":31
 *     cdef object __Pyx_PyObject_FromStringAndSize(const char*, size_t)
 * 
 * @cname("__pyx_convert_PyObject_string_to_py_6libcpp_6string_std__in_string")             # <<<<<<<<<<<<<<
 * cdef inline object __pyx_convert_PyObject_string_to_py_6libcpp_6string_std__in_string(const string& s):
 *     if s.size() > <size_t> PY_SSIZE_T_MAX:
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("string.to_py.__pyx_convert_PyObject_string_to_py_6libcpp_6string_std__in_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "string.to_py":39
 *     cdef object __Pyx_PyUnicode_FromStringAndSize(const char*, size_t)
 * 
 * @cname("__pyx_convert_PyUnicode_string_to_py_6libcpp_6string_std__in_string")             # <<<<<<<<<<<<<<
 * cdef inline object __pyx_convert_PyUnicode_string_to_py_6libcpp_6string_std__in_string(const string& s):
 *     if s.size() > <size_t> PY_SSIZE_T_MAX:
*/

static CYTHON_INLINE PyObject *__pyx_convert_PyUnicode_string_to_py_6libcpp_6string_std__in_string(std::string const &__pyx_v_s) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_convert_PyUnicode_string_to_py_6libcpp_6string_std__in_string", 0);

  /* "string.to_py":41
 * @cname("__pyx_convert_PyUnicode_string_to_py_6libcpp_6string_std__in_string")
 * cdef inline object __pyx_convert_PyUnicode_string_to_py_6libcpp_6string_std__in_string(const string& s):
 *     if s.size() > <size_t> PY_SSIZE_T_MAX:             # <<<<<<<<<<<<<<
 *         raise MemoryError()
 *     return __Pyx_PyUnicode_FromStringAndSize(s.data(), <Py_ssize_t> s.size())
*/
  __pyx_t_1 = (__pyx_v_s.size() > ((size_t)PY_SSIZE_T_MAX));
  if (unlikely(__pyx_t_1)) {

    /* "string.to_py":42
 * cdef inline object __pyx_convert_PyUnicode_string_to_py_6libcpp_6string_std__in_string(const string& s):
 *     if s.size() > <size_t> PY_SSIZE_T_MAX:
 *         raise MemoryError()             # <<<<<<<<<<<<<<
 *     return __Pyx_PyUnicode_FromStringAndSize(s.data(), <Py_ssize_t> s.size())
 * cdef extern from *:
*/
    PyErr_NoMemory(); __PYX_ERR(7, 42, __pyx_L1_error)

    /* "string.to_py":41
 * @cname("__pyx_convert_PyUnicode_string_to_py_6libcpp_6string_std__in_string")
 * cdef inline object __pyx_convert_PyUnicode_string_to_py_6libcpp_6string_std__in_string(const string& s):
 *     if s.size() > <size_t> PY_SSIZE_T_MAX:             # <<<<<<<<<<<<<<
 *         raise MemoryError()
 *     return __Pyx_PyUnicode_FromStringAndSize(s.data(), <Py_ssize_t> s.size())
*/
  }

  /* "string.to_py":43
 *     if s.size() > <size_t> PY_SSIZE_T_MAX:
 *         raise MemoryError()
 *     return __Pyx_PyUnicode_FromStringAndSize(s.data(), <Py_ssize_t> s.size())             # <<<<<<<<<<<<<<
 * cdef extern from *:
 *     cdef object __Pyx_PyBytes_FromStringAndSize(const char*, size_t)
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyUnicode_FromStringAndSize(__pyx_v_s.data(), ((Py_ssize_t)__pyx_v_s.size())); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 43, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "string.to_py":39
 *     cdef object __Pyx_PyUnicode_FromStringAndSize(const char*, size_t)
 * 
 * @cname("__pyx_convert_PyUnicode_string_to_py_6libcpp_6string_std__in_string")             # <<<<<<<<<<<<<<
 * cdef inline object __pyx_convert_PyUnicode_string_to_py_6libcpp_6string_std__in_string(const string& s):
 *     if s.size() > <size_t> PY_SSIZE_T_MAX:
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("string.to_py.__pyx_convert_PyUnicode_string_to_py_6libcpp_6string_std__in_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "string.to_py":47
 *     cdef object __Pyx_PyBytes_FromStringAndSize(const char*, size_t)
 * 
 * @cname("__pyx_convert_PyBytes_string_to_py_6libcpp_6string_std__in_string")             # <<<<<<<<<<<<<<
 * cdef inline object __pyx_convert_PyBytes_string_to_py_6libcpp_6string_std__in_string(const string& s):
 *     if s.size() > <size_t> PY_SSIZE_T_MAX:
*/

static CYTHON_INLINE PyObject *__pyx_convert_PyBytes_string_to_py_6libcpp_6string_std__in_string(std::string const &__pyx_v_s) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_convert_PyBytes_string_to_py_6libcpp_6string_std__in_string", 0);

  /* "string.to_py":49
 * @cname("__pyx_convert_PyBytes_string_to_py_6libcpp_6string_std__in_string")
 * cdef inline object __pyx_convert_PyBytes_string_to_py_6libcpp_6string_std__in_string(const string& s):
 *     if s.size() > <size_t> PY_SSIZE_T_MAX:             # <<<<<<<<<<<<<<
 *         raise MemoryError()
 *     return __Pyx_PyBytes_FromStringAndSize(s.data(), <Py_ssize_t> s.size())
*/
  __pyx_t_1 = (__pyx_v_s.size() > ((size_t)PY_SSIZE_T_MAX));
  if (unlikely(__pyx_t_1)) {

    /* "string.to_py":50
 * cdef inline object __pyx_convert_PyBytes_string_to_py_6libcpp_6string_std__in_string(const string& s):
 *     if s.size() > <size_t> PY_SSIZE_T_MAX:
 *         raise MemoryError()             # <<<<<<<<<<<<<<
 *     return __Pyx_PyBytes_FromStringAndSize(s.data(), <Py_ssize_t> s.size())
 * cdef extern from *:
*/
    PyErr_NoMemory(); __PYX_ERR(7, 50, __pyx_L1_error)

    /* "string.to_py":49
 * @cname("__pyx_convert_PyBytes_string_to_py_6libcpp_6string_std__in_string")
 * cdef inline object __pyx_convert_PyBytes_string_to_py_6libcpp_6string_std__in_string(const string& s):
 *     if s.size() > <size_t> PY_SSIZE_T_MAX:             # <<<<<<<<<<<<<<
 *         raise MemoryError()
 *     return __Pyx_PyBytes_FromStringAndSize(s.data(), <Py_ssize_t> s.size())
*/
  }

  /* "string.to_py":51
 *     if s.size() > <size_t> PY_SSIZE_T_MAX:
 *         raise MemoryError()
 *     return __Pyx_PyBytes_FromStringAndSize(s.data(), <Py_ssize_t> s.size())             # <<<<<<<<<<<<<<
 * cdef extern from *:
 *     cdef object __Pyx_PyByteArray_FromStringAndSize(const char*, size_t)
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_s.data(), ((Py_ssize_t)__pyx_v_s.size())); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 51, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "string.to_py":47
 *     cdef object __Pyx_PyBytes_FromStringAndSize(const char*, size_t)
 * 
 * @cname("__pyx_convert_PyBytes_string_to_py_6libcpp_6string_std__in_string")             # <<<<<<<<<<<<<<
 * cdef inline object __pyx_convert_PyBytes_string_to_py_6libcpp_6string_std__in_string(const string& s):
 *     if s.size() > <size_t> PY_SSIZE_T_MAX:
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("string.to_py.__pyx_convert_PyBytes_string_to_py_6libcpp_6string_std__in_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "string.to_py":55
 *     cdef object __Pyx_PyByteArray_FromStringAndSize(const char*, size_t)
 * 
 * @cname("__pyx_convert_PyByteArray_string_to_py_6libcpp_6string_std__in_string")             # <<<<<<<<<<<<<<
 * cdef inline object __pyx_convert_PyByteArray_string_to_py_6libcpp_6string_std__in_string(const string& s):
 *     if s.size() > <size_t> PY_SSIZE_T_MAX:
*/

static CYTHON_INLINE PyObject *__pyx_convert_PyByteArray_string_to_py_6libcpp_6string_std__in_string(std::string const &__pyx_v_s) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_convert_PyByteArray_string_to_py_6libcpp_6string_std__in_string", 0);

  /* "string.to_py":57
 * @cname("__pyx_convert_PyByteArray_string_to_py_6libcpp_6string_std__in_string")
 * cdef inline object __pyx_convert_PyByteArray_string_to_py_6libcpp_6string_std__in_string(const string& s):
 *     if s.size() > <size_t> PY_SSIZE_T_MAX:             # <<<<<<<<<<<<<<
 *         raise MemoryError()
 *     return __Pyx_PyByteArray_FromStringAndSize(s.data(), <Py_ssize_t> s.size())
*/
  __pyx_t_1 = (__pyx_v_s.size() > ((size_t)PY_SSIZE_T_MAX));
  if (unlikely(__pyx_t_1)) {

    /* "string.to_py":58
 * cdef inline object __pyx_convert_PyByteArray_string_to_py_6libcpp_6string_std__in_string(const string& s):
 *     if s.size() > <size_t> PY_SSIZE_T_MAX:
 *         raise MemoryError()             # <<<<<<<<<<<<<<
 *     return __Pyx_PyByteArray_FromStringAndSize(s.data(), <Py_ssize_t> s.size())
*/
    PyErr_NoMemory(); __PYX_ERR(7, 58, __pyx_L1_error)

    /* "string.to_py":57
 * @cname("__pyx_convert_PyByteArray_string_to_py_6libcpp_6string_std__in_string")
 * cdef inline object __pyx_convert_PyByteArray_string_to_py_6libcpp_6string_std__in_string(const string& s):
 *     if s.size() > <size_t> PY_SSIZE_T_MAX:             # <<<<<<<<<<<<<<
 *         raise MemoryError()
 *     return __Pyx_PyByteArray_FromStringAndSize(s.data(), <Py_ssize_t> s.size())
*/
  }

  /* "string.to_py":59
 *     if s.size() > <size_t> PY_SSIZE_T_MAX:
 *         raise MemoryError()
 *     return __Pyx_PyByteArray_FromStringAndSize(s.data(), <Py_ssize_t> s.size())             # <<<<<<<<<<<<<<
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyByteArray_FromStringAndSize(__pyx_v_s.data(), ((Py_ssize_t)__pyx_v_s.size())); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 59, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "string.to_py":55
 *     cdef object __Pyx_PyByteArray_FromStringAndSize(const char*, size_t)
 * 
 * @cname("__pyx_convert_PyByteArray_string_to_py_6libcpp_6string_std__in_string")             # <<<<<<<<<<<<<<
 * cdef inline object __pyx_convert_PyByteArray_string_to_py_6libcpp_6string_std__in_string(const string& s):
 *     if s.size() > <size_t> PY_SSIZE_T_MAX:
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("string.to_py.__pyx_convert_PyByteArray_string_to_py_6libcpp_6string_std__in_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "string.from_py":12
 *     cdef const char* __Pyx_PyObject_AsStringAndSize(object, Py_ssize_t*) except NULL
 * 
 * @cname("__pyx_convert_string_from_py_6libcpp_6string_std__in_string")             # <<<<<<<<<<<<<<
 * cdef string __pyx_convert_string_from_py_6libcpp_6string_std__in_string(object o) except *:
 *     cdef Py_ssize_t length = 0
*/

static std::string __pyx_convert_string_from_py_6libcpp_6string_std__in_string(PyObject *__pyx_v_o) {
  Py_ssize_t __pyx_v_length;
  char const *__pyx_v_data;
  std::string __pyx_r;
  char const *__pyx_t_1;
  std::string __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "string.from_py":14
 * @cname("__pyx_convert_string_from_py_6libcpp_6string_std__in_string")
 * cdef string __pyx_convert_string_from_py_6libcpp_6string_std__in_string(object o) except *:
 *     cdef Py_ssize_t length = 0             # <<<<<<<<<<<<<<
 *     cdef const char* data = __Pyx_PyObject_AsStringAndSize(o, &length)
 *     return string(data, <size_t> length)
*/
  __pyx_v_length = 0;

  /* "string.from_py":15
 * cdef string __pyx_convert_string_from_py_6libcpp_6string_std__in_string(object o) except *:
 *     cdef Py_ssize_t length = 0
 *     cdef const char* data = __Pyx_PyObject_AsStringAndSize(o, &length)             # <<<<<<<<<<<<<<
 *     return string(data, <size_t> length)
 * 
*/
  __pyx_t_1 = __Pyx_PyObject_AsStringAndSize(__pyx_v_o, (&__pyx_v_length)); if (unlikely(__pyx_t_1 == ((void *)NULL))) __PYX_ERR(7, 15, __pyx_L1_error)
  __pyx_v_data = __pyx_t_1;

  /* "string.from_py":16
 *     cdef Py_ssize_t length = 0
 *     cdef const char* data = __Pyx_PyObject_AsStringAndSize(o, &length)
 *     return string(data, <size_t> length)             # <<<<<<<<<<<<<<
 * 
*/
  try {
    __pyx_t_2 = std::string(__pyx_v_data, ((size_t)__pyx_v_length));
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(7, 16, __pyx_L1_error)
  }
  __pyx_r = __pyx_t_2;
  goto __pyx_L0;

  /* "string.from_py":12
 *     cdef const char* __Pyx_PyObject_AsStringAndSize(object, Py_ssize_t*) except NULL
 * 
 * @cname("__pyx_convert_string_from_py_6libcpp_6string_std__in_string")             # <<<<<<<<<<<<<<
 * cdef string __pyx_convert_string_from_py_6libcpp_6string_std__in_string(object o) except *:
 *     cdef Py_ssize_t length = 0
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("string.from_py.__pyx_convert_string_from_py_6libcpp_6string_std__in_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_pretend_to_initialize(&__pyx_r);
  __pyx_L0:;
  return __pyx_r;
}

/* "vector.to_py":79
 *     const Py_ssize_t PY_SSIZE_T_MAX
 * 
 * @cname("__pyx_convert_vector_to_py_int")             # <<<<<<<<<<<<<<
 * cdef object __pyx_convert_vector_to_py_int(const vector[X]& v):
 *     if v.size() > <size_t> PY_SSIZE_T_MAX:
*/

static PyObject *__pyx_convert_vector_to_py_int(std::vector<int>  const &__pyx_v_v) {
  Py_ssize_t __pyx_v_v_size_signed;
  PyObject *__pyx_v_o = NULL;
  Py_ssize_t __pyx_v_i;
  PyObject *__pyx_v_item = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_convert_vector_to_py_int", 0);

  /* "vector.to_py":81
 * @cname("__pyx_convert_vector_to_py_int")
 * cdef object __pyx_convert_vector_to_py_int(const vector[X]& v):
 *     if v.size() > <size_t> PY_SSIZE_T_MAX:             # <<<<<<<<<<<<<<
 *         raise MemoryError()
 *     v_size_signed = <Py_ssize_t> v.size()
*/
  __pyx_t_1 = (__pyx_v_v.size() > ((size_t)PY_SSIZE_T_MAX));
  if (unlikely(__pyx_t_1)) {

    /* "vector.to_py":82
 * cdef object __pyx_convert_vector_to_py_int(const vector[X]& v):
 *     if v.size() > <size_t> PY_SSIZE_T_MAX:
 *         raise MemoryError()             # <<<<<<<<<<<<<<
 *     v_size_signed = <Py_ssize_t> v.size()
 * 
*/
    PyErr_NoMemory(); __PYX_ERR(7, 82, __pyx_L1_error)

    /* "vector.to_py":81
 * @cname("__pyx_convert_vector_to_py_int")
 * cdef object __pyx_convert_vector_to_py_int(const vector[X]& v):
 *     if v.size() > <size_t> PY_SSIZE_T_MAX:             # <<<<<<<<<<<<<<
 *         raise MemoryError()
 *     v_size_signed = <Py_ssize_t> v.size()
*/
  }

  /* "vector.to_py":83
 *     if v.size() > <size_t> PY_SSIZE_T_MAX:
 *         raise MemoryError()
 *     v_size_signed = <Py_ssize_t> v.size()             # <<<<<<<<<<<<<<
 * 
 *     o = PyList_New(v_size_signed)
*/
  __pyx_v_v_size_signed = ((Py_ssize_t)__pyx_v_v.size());

  /* "vector.to_py":85
 *     v_size_signed = <Py_ssize_t> v.size()
 * 
 *     o = PyList_New(v_size_signed)             # <<<<<<<<<<<<<<
 * 
 *     cdef Py_ssize_t i
*/
  __pyx_t_2 = PyList_New(__pyx_v_v_size_signed); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 85, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_o = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "vector.to_py":90
 *     cdef object item
 * 
 *     for i in range(v_size_signed):             # <<<<<<<<<<<<<<
 *         item = v[i]
 *         Py_INCREF(item)
*/
  __pyx_t_3 = __pyx_v_v_size_signed;
  __pyx_t_4 = __pyx_t_3;
  for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
    __pyx_v_i = __pyx_t_5;

    /* "vector.to_py":91
 * 
 *     for i in range(v_size_signed):
 *         item = v[i]             # <<<<<<<<<<<<<<
 *         Py_INCREF(item)
 *         __Pyx_PyList_SET_ITEM(o, i, item)
*/
    __pyx_t_2 = __Pyx_PyLong_From_int((__pyx_v_v[__pyx_v_i])); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 91, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "vector.to_py":92
 *     for i in range(v_size_signed):
 *         item = v[i]
 *         Py_INCREF(item)             # <<<<<<<<<<<<<<
 *         __Pyx_PyList_SET_ITEM(o, i, item)
 * 
*/
    Py_INCREF(__pyx_v_item);

    /* "vector.to_py":93
 *         item = v[i]
 *         Py_INCREF(item)
 *         __Pyx_PyList_SET_ITEM(o, i, item)             # <<<<<<<<<<<<<<
 * 
 *     return o
*/
    __pyx_t_6 = __Pyx_PyList_SET_ITEM(__pyx_v_o, __pyx_v_i, __pyx_v_item); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(7, 93, __pyx_L1_error)
  }

  /* "vector.to_py":95
 *         __Pyx_PyList_SET_ITEM(o, i, item)
 * 
 *     return o             # <<<<<<<<<<<<<<
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_o);
  __pyx_r = __pyx_v_o;
  goto __pyx_L0;

  /* "vector.to_py":79
 *     const Py_ssize_t PY_SSIZE_T_MAX
 * 
 * @cname("__pyx_convert_vector_to_py_int")             # <<<<<<<<<<<<<<
 * cdef object __pyx_convert_vector_to_py_int(const vector[X]& v):
 *     if v.size() > <size_t> PY_SSIZE_T_MAX:
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("vector.to_py.__pyx_convert_vector_to_py_int", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_o);
  __Pyx_XDECREF(__pyx_v_item);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_convert_vector_to_py_int8_t(std::vector<int8_t>  const &__pyx_v_v) {
  Py_ssize_t __pyx_v_v_size_signed;
  PyObject *__pyx_v_o = NULL;
  Py_ssize_t __pyx_v_i;
  PyObject *__pyx_v_item = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_convert_vector_to_py_int8_t", 0);

  /* "vector.to_py":81
 * @cname("__pyx_convert_vector_to_py_int8_t")
 * cdef object __pyx_convert_vector_to_py_int8_t(const vector[X]& v):
 *     if v.size() > <size_t> PY_SSIZE_T_MAX:             # <<<<<<<<<<<<<<
 *         raise MemoryError()
 *     v_size_signed = <Py_ssize_t> v.size()
*/
  __pyx_t_1 = (__pyx_v_v.size() > ((size_t)PY_SSIZE_T_MAX));
  if (unlikely(__pyx_t_1)) {

    /* "vector.to_py":82
 * cdef object __pyx_convert_vector_to_py_int8_t(const vector[X]& v):
 *     if v.size() > <size_t> PY_SSIZE_T_MAX:
 *         raise MemoryError()             # <<<<<<<<<<<<<<
 *     v_size_signed = <Py_ssize_t> v.size()
 * 
*/
    PyErr_NoMemory(); __PYX_ERR(7, 82, __pyx_L1_error)

    /* "vector.to_py":81
 * @cname("__pyx_convert_vector_to_py_int8_t")
 * cdef object __pyx_convert_vector_to_py_int8_t(const vector[X]& v):
 *     if v.size() > <size_t> PY_SSIZE_T_MAX:             # <<<<<<<<<<<<<<
 *         raise MemoryError()
 *     v_size_signed = <Py_ssize_t> v.size()
*/
  }

  /* "vector.to_py":83
 *     if v.size() > <size_t> PY_SSIZE_T_MAX:
 *         raise MemoryError()
 *     v_size_signed = <Py_ssize_t> v.size()             # <<<<<<<<<<<<<<
 * 
 *     o = PyList_New(v_size_signed)
*/
  __pyx_v_v_size_signed = ((Py_ssize_t)__pyx_v_v.size());

  /* "vector.to_py":85
 *     v_size_signed = <Py_ssize_t> v.size()
 * 
 *     o = PyList_New(v_size_signed)             # <<<<<<<<<<<<<<
 * 
 *     cdef Py_ssize_t i
*/
  __pyx_t_2 = PyList_New(__pyx_v_v_size_signed); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 85, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_o = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "vector.to_py":90
 *     cdef object item
 * 
 *     for i in range(v_size_signed):             # <<<<<<<<<<<<<<
 *         item = v[i]
 *         Py_INCREF(item)
*/
  __pyx_t_3 = __pyx_v_v_size_signed;
  __pyx_t_4 = __pyx_t_3;
  for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
    __pyx_v_i = __pyx_t_5;

    /* "vector.to_py":91
 * 
 *     for i in range(v_size_signed):
 *         item = v[i]             # <<<<<<<<<<<<<<
 *         Py_INCREF(item)
 *         __Pyx_PyList_SET_ITEM(o, i, item)
*/
    __pyx_t_2 = __Pyx_PyLong_From_int8_t((__pyx_v_v[__pyx_v_i])); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 91, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "vector.to_py":92
 *     for i in range(v_size_signed):
 *         item = v[i]
 *         Py_INCREF(item)             # <<<<<<<<<<<<<<
 *         __Pyx_PyList_SET_ITEM(o, i, item)
 * 
*/
    Py_INCREF(__pyx_v_item);

    /* "vector.to_py":93
 *         item = v[i]
 *         Py_INCREF(item)
 *         __Pyx_PyList_SET_ITEM(o, i, item)             # <<<<<<<<<<<<<<
 * 
 *     return o
*/
    __pyx_t_6 = __Pyx_PyList_SET_ITEM(__pyx_v_o, __pyx_v_i, __pyx_v_item); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(7, 93, __pyx_L1_error)
  }

  /* "vector.to_py":95
 *         __Pyx_PyList_SET_ITEM(o, i, item)
 * 
 *     return o             # <<<<<<<<<<<<<<
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_o);
  __pyx_r = __pyx_v_o;
  goto __pyx_L0;

  /* "vector.to_py":79
 *     const Py_ssize_t PY_SSIZE_T_MAX
 * 
 * @cname("__pyx_convert_vector_to_py_int8_t")             # <<<<<<<<<<<<<<
 * cdef object __pyx_convert_vector_to_py_int8_t(const vector[X]& v):
 *     if v.size() > <size_t> PY_SSIZE_T_MAX:
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("vector.to_py.__pyx_convert_vector_to_py_int8_t", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_o);
  __Pyx_XDECREF(__pyx_v_item);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_convert_vector_to_py_int64_t(std::vector<int64_t>  const &__pyx_v_v) {
  Py_ssize_t __pyx_v_v_size_signed;
  PyObject *__pyx_v_o = NULL;
  Py_ssize_t __pyx_v_i;
  PyObject *__pyx_v_item = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_convert_vector_to_py_int64_t", 0);

  /* "vector.to_py":81
 * @cname("__pyx_convert_vector_to_py_int64_t")
 * cdef object __pyx_convert_vector_to_py_int64_t(const vector[X]& v):
 *     if v.size() > <size_t> PY_SSIZE_T_MAX:             # <<<<<<<<<<<<<<
 *         raise MemoryError()
 *     v_size_signed = <Py_ssize_t> v.size()
*/
  __pyx_t_1 = (__pyx_v_v.size() > ((size_t)PY_SSIZE_T_MAX));
  if (unlikely(__pyx_t_1)) {

    /* "vector.to_py":82
 * cdef object __pyx_convert_vector_to_py_int64_t(const vector[X]& v):
 *     if v.size() > <size_t> PY_SSIZE_T_MAX:
 *         raise MemoryError()             # <<<<<<<<<<<<<<
 *     v_size_signed = <Py_ssize_t> v.size()
 * 
*/
    PyErr_NoMemory(); __PYX_ERR(7, 82, __pyx_L1_error)

    /* "vector.to_py":81
 * @cname("__pyx_convert_vector_to_py_int64_t")
 * cdef object __pyx_convert_vector_to_py_int64_t(const vector[X]& v):
 *     if v.size() > <size_t> PY_SSIZE_T_MAX:             # <<<<<<<<<<<<<<
 *         raise MemoryError()
 *     v_size_signed = <Py_ssize_t> v.size()
*/
  }

  /* "vector.to_py":83
 *     if v.size() > <size_t> PY_SSIZE_T_MAX:
 *         raise MemoryError()
 *     v_size_signed = <Py_ssize_t> v.size()             # <<<<<<<<<<<<<<
 * 
 *     o = PyList_New(v_size_signed)
*/
  __pyx_v_v_size_signed = ((Py_ssize_t)__pyx_v_v.size());

  /* "vector.to_py":85
 *     v_size_signed = <Py_ssize_t> v.size()
 * 
 *     o = PyList_New(v_size_signed)             # <<<<<<<<<<<<<<
 * 
 *     cdef Py_ssize_t i
*/
  __pyx_t_2 = PyList_New(__pyx_v_v_size_signed); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 85, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_o = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "vector.to_py":90
 *     cdef object item
 * 
 *     for i in range(v_size_signed):             # <<<<<<<<<<<<<<
 *         item = v[i]
 *         Py_INCREF(item)
*/
  __pyx_t_3 = __pyx_v_v_size_signed;
  __pyx_t_4 = __pyx_t_3;
  for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
    __pyx_v_i = __pyx_t_5;

    /* "vector.to_py":91
 * 
 *     for i in range(v_size_signed):
 *         item = v[i]             # <<<<<<<<<<<<<<
 *         Py_INCREF(item)
 *         __Pyx_PyList_SET_ITEM(o, i, item)
*/
    __pyx_t_2 = __Pyx_PyLong_From_int64_t((__pyx_v_v[__pyx_v_i])); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 91, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "vector.to_py":92
 *     for i in range(v_size_signed):
 *         item = v[i]
 *         Py_INCREF(item)             # <<<<<<<<<<<<<<
 *         __Pyx_PyList_SET_ITEM(o, i, item)
 * 
*/
    Py_INCREF(__pyx_v_item);

    /* "vector.to_py":93
 *         item = v[i]
 *         Py_INCREF(item)
 *         __Pyx_PyList_SET_ITEM(o, i, item)             # <<<<<<<<<<<<<<
 * 
 *     return o
*/
    __pyx_t_6 = __Pyx_PyList_SET_ITEM(__pyx_v_o, __pyx_v_i, __pyx_v_item); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(7, 93, __pyx_L1_error)
  }

  /* "vector.to_py":95
 *         __Pyx_PyList_SET_ITEM(o, i, item)
 * 
 *     return o             # <<<<<<<<<<<<<<
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_o);
  __pyx_r = __pyx_v_o;
  goto __pyx_L0;

  /* "vector.to_py":79
 *     const Py_ssize_t PY_SSIZE_T_MAX
 * 
 * @cname("__pyx_convert_vector_to_py_int64_t")             # <<<<<<<<<<<<<<
 * cdef object __pyx_convert_vector_to_py_int64_t(const vector[X]& v):
 *     if v.size() > <size_t> PY_SSIZE_T_MAX:
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("vector.to_py.__pyx_convert_vector_to_py_int64_t", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_o);
  __Pyx_XDECREF(__pyx_v_item);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_convert_vector_to_py_std_3a__3a_string(std::vector<std::string>  const &__pyx_v_v) {
  Py_ssize_t __pyx_v_v_size_signed;
  PyObject *__pyx_v_o = NULL;
  Py_ssize_t __pyx_v_i;
  PyObject *__pyx_v_item = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_convert_vector_to_py_std_3a__3a_string", 0);

  /* "vector.to_py":81
 * @cname("__pyx_convert_vector_to_py_std_3a__3a_string")
 * cdef object __pyx_convert_vector_to_py_std_3a__3a_string(const vector[X]& v):
 *     if v.size() > <size_t> PY_SSIZE_T_MAX:             # <<<<<<<<<<<<<<
 *         raise MemoryError()
 *     v_size_signed = <Py_ssize_t> v.size()
*/
  __pyx_t_1 = (__pyx_v_v.size() > ((size_t)PY_SSIZE_T_MAX));
  if (unlikely(__pyx_t_1)) {

    /* "vector.to_py":82
 * cdef object __pyx_convert_vector_to_py_std_3a__3a_string(const vector[X]& v):
 *     if v.size() > <size_t> PY_SSIZE_T_MAX:
 *         raise MemoryError()             # <<<<<<<<<<<<<<
 *     v_size_signed = <Py_ssize_t> v.size()
 * 
*/
    PyErr_NoMemory(); __PYX_ERR(7, 82, __pyx_L1_error)

    /* "vector.to_py":81
 * @cname("__pyx_convert_vector_to_py_std_3a__3a_string")
 * cdef object __pyx_convert_vector_to_py_std_3a__3a_string(const vector[X]& v):
 *     if v.size() > <size_t> PY_SSIZE_T_MAX:             # <<<<<<<<<<<<<<
 *         raise MemoryError()
 *     v_size_signed = <Py_ssize_t> v.size()
*/
  }

  /* "vector.to_py":83
 *     if v.size() > <size_t> PY_SSIZE_T_MAX:
 *         raise MemoryError()
 *     v_size_signed = <Py_ssize_t> v.size()             # <<<<<<<<<<<<<<
 * 
 *     o = PyList_New(v_size_signed)
*/
  __pyx_v_v_size_signed = ((Py_ssize_t)__pyx_v_v.size());

  /* "vector.to_py":85
 *     v_size_signed = <Py_ssize_t> v.size()
 * 
 *     o = PyList_New(v_size_signed)             # <<<<<<<<<<<<<<
 * 
 *     cdef Py_ssize_t i
*/
  __pyx_t_2 = PyList_New(__pyx_v_v_size_signed); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 85, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_o = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "vector.to_py":90
 *     cdef object item
 * 
 *     for i in range(v_size_signed):             # <<<<<<<<<<<<<<
 *         item = v[i]
 *         Py_INCREF(item)
*/
  __pyx_t_3 = __pyx_v_v_size_signed;
  __pyx_t_4 = __pyx_t_3;
  for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
    __pyx_v_i = __pyx_t_5;

    /* "vector.to_py":91
 * 
 *     for i in range(v_size_signed):
 *         item = v[i]             # <<<<<<<<<<<<<<
 *         Py_INCREF(item)
 *         __Pyx_PyList_SET_ITEM(o, i, item)
*/
    __pyx_t_2 = __pyx_convert_PyBytes_string_to_py_6libcpp_6string_std__in_string((__pyx_v_v[__pyx_v_i])); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 91, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "vector.to_py":92
 *     for i in range(v_size_signed):
 *         item = v[i]
 *         Py_INCREF(item)             # <<<<<<<<<<<<<<
 *         __Pyx_PyList_SET_ITEM(o, i, item)
 * 
*/
    Py_INCREF(__pyx_v_item);

    /* "vector.to_py":93
 *         item = v[i]
 *         Py_INCREF(item)
 *         __Pyx_PyList_SET_ITEM(o, i, item)             # <<<<<<<<<<<<<<
 * 
 *     return o
*/
    __pyx_t_6 = __Pyx_PyList_SET_ITEM(__pyx_v_o, __pyx_v_i, __pyx_v_item); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(7, 93, __pyx_L1_error)
  }

  /* "vector.to_py":95
 *         __Pyx_PyList_SET_ITEM(o, i, item)
 * 
 *     return o             # <<<<<<<<<<<<<<
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_o);
  __pyx_r = __pyx_v_o;
  goto __pyx_L0;

  /* "vector.to_py":79
 *     const Py_ssize_t PY_SSIZE_T_MAX
 * 
 * @cname("__pyx_convert_vector_to_py_std_3a__3a_string")             # <<<<<<<<<<<<<<
 * cdef object __pyx_convert_vector_to_py_std_3a__3a_string(const vector[X]& v):
 *     if v.size() > <size_t> PY_SSIZE_T_MAX:
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("vector.to_py.__pyx_convert_vector_to_py_std_3a__3a_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_o);
  __Pyx_XDECREF(__pyx_v_item);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "EnumTypeToPy":2
 * 
 * @cname("__Pyx_Enum_230530__7pyarrow_3lib_enum__dunderpyx_t_7pyarrow_3lib___etc_to_py")             # <<<<<<<<<<<<<<
 * cdef __Pyx_Enum_230530__7pyarrow_3lib_enum__dunderpyx_t_7pyarrow_3lib___etc_to_py(DeviceAllocationType c_val):
 *     cdef object __pyx_enum
*/

static PyObject *__Pyx_Enum_230530__7pyarrow_3lib_enum__dunderpyx_t_7pyarrow_3lib___etc_to_py(enum __pyx_t_7pyarrow_3lib_DeviceAllocationType __pyx_v_c_val) {
  PyObject *__pyx_v___pyx_enum = 0;
  int __pyx_v_underlying_c_val;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_Enum_230530__7pyarrow_3lib_enum__dunderpyx_t_7pyarrow_3lib___etc_to_py", 0);

  /* "EnumTypeToPy":5
 * cdef __Pyx_Enum_230530__7pyarrow_3lib_enum__dunderpyx_t_7pyarrow_3lib___etc_to_py(DeviceAllocationType c_val):
 *     cdef object __pyx_enum
 *     __pyx_enum = DeviceAllocationType             # <<<<<<<<<<<<<<
 * 
 *     if 0:
*/
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_DeviceAllocationType); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v___pyx_enum = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "EnumTypeToPy":9
 *     if 0:
 *         pass
 *     elif c_val == DeviceAllocationType.CPU:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.CPU
 *     elif c_val == DeviceAllocationType.CUDA:
*/
  __pyx_t_2 = (__pyx_v_c_val == __pyx_e_7pyarrow_3lib_CPU);
  if (__pyx_t_2) {

    /* "EnumTypeToPy":10
 *         pass
 *     elif c_val == DeviceAllocationType.CPU:
 *         return __pyx_enum.CPU             # <<<<<<<<<<<<<<
 *     elif c_val == DeviceAllocationType.CUDA:
 *         return __pyx_enum.CUDA
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_CPU); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 10, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":9
 *     if 0:
 *         pass
 *     elif c_val == DeviceAllocationType.CPU:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.CPU
 *     elif c_val == DeviceAllocationType.CUDA:
*/
  }

  /* "EnumTypeToPy":11
 *     elif c_val == DeviceAllocationType.CPU:
 *         return __pyx_enum.CPU
 *     elif c_val == DeviceAllocationType.CUDA:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.CUDA
 *     elif c_val == DeviceAllocationType.CUDA_HOST:
*/
  __pyx_t_2 = (__pyx_v_c_val == __pyx_e_7pyarrow_3lib_CUDA);
  if (__pyx_t_2) {

    /* "EnumTypeToPy":12
 *         return __pyx_enum.CPU
 *     elif c_val == DeviceAllocationType.CUDA:
 *         return __pyx_enum.CUDA             # <<<<<<<<<<<<<<
 *     elif c_val == DeviceAllocationType.CUDA_HOST:
 *         return __pyx_enum.CUDA_HOST
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_CUDA); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 12, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":11
 *     elif c_val == DeviceAllocationType.CPU:
 *         return __pyx_enum.CPU
 *     elif c_val == DeviceAllocationType.CUDA:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.CUDA
 *     elif c_val == DeviceAllocationType.CUDA_HOST:
*/
  }

  /* "EnumTypeToPy":13
 *     elif c_val == DeviceAllocationType.CUDA:
 *         return __pyx_enum.CUDA
 *     elif c_val == DeviceAllocationType.CUDA_HOST:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.CUDA_HOST
 *     elif c_val == DeviceAllocationType.OPENCL:
*/
  __pyx_t_2 = (__pyx_v_c_val == __pyx_e_7pyarrow_3lib_CUDA_HOST);
  if (__pyx_t_2) {

    /* "EnumTypeToPy":14
 *         return __pyx_enum.CUDA
 *     elif c_val == DeviceAllocationType.CUDA_HOST:
 *         return __pyx_enum.CUDA_HOST             # <<<<<<<<<<<<<<
 *     elif c_val == DeviceAllocationType.OPENCL:
 *         return __pyx_enum.OPENCL
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_CUDA_HOST); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":13
 *     elif c_val == DeviceAllocationType.CUDA:
 *         return __pyx_enum.CUDA
 *     elif c_val == DeviceAllocationType.CUDA_HOST:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.CUDA_HOST
 *     elif c_val == DeviceAllocationType.OPENCL:
*/
  }

  /* "EnumTypeToPy":15
 *     elif c_val == DeviceAllocationType.CUDA_HOST:
 *         return __pyx_enum.CUDA_HOST
 *     elif c_val == DeviceAllocationType.OPENCL:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.OPENCL
 *     elif c_val == DeviceAllocationType.VULKAN:
*/
  __pyx_t_2 = (__pyx_v_c_val == __pyx_e_7pyarrow_3lib_OPENCL);
  if (__pyx_t_2) {

    /* "EnumTypeToPy":16
 *         return __pyx_enum.CUDA_HOST
 *     elif c_val == DeviceAllocationType.OPENCL:
 *         return __pyx_enum.OPENCL             # <<<<<<<<<<<<<<
 *     elif c_val == DeviceAllocationType.VULKAN:
 *         return __pyx_enum.VULKAN
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_OPENCL); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 16, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":15
 *     elif c_val == DeviceAllocationType.CUDA_HOST:
 *         return __pyx_enum.CUDA_HOST
 *     elif c_val == DeviceAllocationType.OPENCL:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.OPENCL
 *     elif c_val == DeviceAllocationType.VULKAN:
*/
  }

  /* "EnumTypeToPy":17
 *     elif c_val == DeviceAllocationType.OPENCL:
 *         return __pyx_enum.OPENCL
 *     elif c_val == DeviceAllocationType.VULKAN:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.VULKAN
 *     elif c_val == DeviceAllocationType.METAL:
*/
  __pyx_t_2 = (__pyx_v_c_val == __pyx_e_7pyarrow_3lib_VULKAN);
  if (__pyx_t_2) {

    /* "EnumTypeToPy":18
 *         return __pyx_enum.OPENCL
 *     elif c_val == DeviceAllocationType.VULKAN:
 *         return __pyx_enum.VULKAN             # <<<<<<<<<<<<<<
 *     elif c_val == DeviceAllocationType.METAL:
 *         return __pyx_enum.METAL
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_VULKAN); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 18, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":17
 *     elif c_val == DeviceAllocationType.OPENCL:
 *         return __pyx_enum.OPENCL
 *     elif c_val == DeviceAllocationType.VULKAN:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.VULKAN
 *     elif c_val == DeviceAllocationType.METAL:
*/
  }

  /* "EnumTypeToPy":19
 *     elif c_val == DeviceAllocationType.VULKAN:
 *         return __pyx_enum.VULKAN
 *     elif c_val == DeviceAllocationType.METAL:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.METAL
 *     elif c_val == DeviceAllocationType.VPI:
*/
  __pyx_t_2 = (__pyx_v_c_val == __pyx_e_7pyarrow_3lib_METAL);
  if (__pyx_t_2) {

    /* "EnumTypeToPy":20
 *         return __pyx_enum.VULKAN
 *     elif c_val == DeviceAllocationType.METAL:
 *         return __pyx_enum.METAL             # <<<<<<<<<<<<<<
 *     elif c_val == DeviceAllocationType.VPI:
 *         return __pyx_enum.VPI
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_METAL); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 20, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":19
 *     elif c_val == DeviceAllocationType.VULKAN:
 *         return __pyx_enum.VULKAN
 *     elif c_val == DeviceAllocationType.METAL:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.METAL
 *     elif c_val == DeviceAllocationType.VPI:
*/
  }

  /* "EnumTypeToPy":21
 *     elif c_val == DeviceAllocationType.METAL:
 *         return __pyx_enum.METAL
 *     elif c_val == DeviceAllocationType.VPI:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.VPI
 *     elif c_val == DeviceAllocationType.ROCM:
*/
  __pyx_t_2 = (__pyx_v_c_val == __pyx_e_7pyarrow_3lib_VPI);
  if (__pyx_t_2) {

    /* "EnumTypeToPy":22
 *         return __pyx_enum.METAL
 *     elif c_val == DeviceAllocationType.VPI:
 *         return __pyx_enum.VPI             # <<<<<<<<<<<<<<
 *     elif c_val == DeviceAllocationType.ROCM:
 *         return __pyx_enum.ROCM
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_VPI); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 22, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":21
 *     elif c_val == DeviceAllocationType.METAL:
 *         return __pyx_enum.METAL
 *     elif c_val == DeviceAllocationType.VPI:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.VPI
 *     elif c_val == DeviceAllocationType.ROCM:
*/
  }

  /* "EnumTypeToPy":23
 *     elif c_val == DeviceAllocationType.VPI:
 *         return __pyx_enum.VPI
 *     elif c_val == DeviceAllocationType.ROCM:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.ROCM
 *     elif c_val == DeviceAllocationType.ROCM_HOST:
*/
  __pyx_t_2 = (__pyx_v_c_val == __pyx_e_7pyarrow_3lib_ROCM);
  if (__pyx_t_2) {

    /* "EnumTypeToPy":24
 *         return __pyx_enum.VPI
 *     elif c_val == DeviceAllocationType.ROCM:
 *         return __pyx_enum.ROCM             # <<<<<<<<<<<<<<
 *     elif c_val == DeviceAllocationType.ROCM_HOST:
 *         return __pyx_enum.ROCM_HOST
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_ROCM); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 24, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":23
 *     elif c_val == DeviceAllocationType.VPI:
 *         return __pyx_enum.VPI
 *     elif c_val == DeviceAllocationType.ROCM:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.ROCM
 *     elif c_val == DeviceAllocationType.ROCM_HOST:
*/
  }

  /* "EnumTypeToPy":25
 *     elif c_val == DeviceAllocationType.ROCM:
 *         return __pyx_enum.ROCM
 *     elif c_val == DeviceAllocationType.ROCM_HOST:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.ROCM_HOST
 *     elif c_val == DeviceAllocationType.EXT_DEV:
*/
  __pyx_t_2 = (__pyx_v_c_val == __pyx_e_7pyarrow_3lib_ROCM_HOST);
  if (__pyx_t_2) {

    /* "EnumTypeToPy":26
 *         return __pyx_enum.ROCM
 *     elif c_val == DeviceAllocationType.ROCM_HOST:
 *         return __pyx_enum.ROCM_HOST             # <<<<<<<<<<<<<<
 *     elif c_val == DeviceAllocationType.EXT_DEV:
 *         return __pyx_enum.EXT_DEV
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_ROCM_HOST); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 26, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":25
 *     elif c_val == DeviceAllocationType.ROCM:
 *         return __pyx_enum.ROCM
 *     elif c_val == DeviceAllocationType.ROCM_HOST:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.ROCM_HOST
 *     elif c_val == DeviceAllocationType.EXT_DEV:
*/
  }

  /* "EnumTypeToPy":27
 *     elif c_val == DeviceAllocationType.ROCM_HOST:
 *         return __pyx_enum.ROCM_HOST
 *     elif c_val == DeviceAllocationType.EXT_DEV:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.EXT_DEV
 *     elif c_val == DeviceAllocationType.CUDA_MANAGED:
*/
  __pyx_t_2 = (__pyx_v_c_val == __pyx_e_7pyarrow_3lib_EXT_DEV);
  if (__pyx_t_2) {

    /* "EnumTypeToPy":28
 *         return __pyx_enum.ROCM_HOST
 *     elif c_val == DeviceAllocationType.EXT_DEV:
 *         return __pyx_enum.EXT_DEV             # <<<<<<<<<<<<<<
 *     elif c_val == DeviceAllocationType.CUDA_MANAGED:
 *         return __pyx_enum.CUDA_MANAGED
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_EXT_DEV); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 28, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":27
 *     elif c_val == DeviceAllocationType.ROCM_HOST:
 *         return __pyx_enum.ROCM_HOST
 *     elif c_val == DeviceAllocationType.EXT_DEV:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.EXT_DEV
 *     elif c_val == DeviceAllocationType.CUDA_MANAGED:
*/
  }

  /* "EnumTypeToPy":29
 *     elif c_val == DeviceAllocationType.EXT_DEV:
 *         return __pyx_enum.EXT_DEV
 *     elif c_val == DeviceAllocationType.CUDA_MANAGED:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.CUDA_MANAGED
 *     elif c_val == DeviceAllocationType.ONEAPI:
*/
  __pyx_t_2 = (__pyx_v_c_val == __pyx_e_7pyarrow_3lib_CUDA_MANAGED);
  if (__pyx_t_2) {

    /* "EnumTypeToPy":30
 *         return __pyx_enum.EXT_DEV
 *     elif c_val == DeviceAllocationType.CUDA_MANAGED:
 *         return __pyx_enum.CUDA_MANAGED             # <<<<<<<<<<<<<<
 *     elif c_val == DeviceAllocationType.ONEAPI:
 *         return __pyx_enum.ONEAPI
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_CUDA_MANAGED); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 30, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":29
 *     elif c_val == DeviceAllocationType.EXT_DEV:
 *         return __pyx_enum.EXT_DEV
 *     elif c_val == DeviceAllocationType.CUDA_MANAGED:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.CUDA_MANAGED
 *     elif c_val == DeviceAllocationType.ONEAPI:
*/
  }

  /* "EnumTypeToPy":31
 *     elif c_val == DeviceAllocationType.CUDA_MANAGED:
 *         return __pyx_enum.CUDA_MANAGED
 *     elif c_val == DeviceAllocationType.ONEAPI:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.ONEAPI
 *     elif c_val == DeviceAllocationType.WEBGPU:
*/
  __pyx_t_2 = (__pyx_v_c_val == __pyx_e_7pyarrow_3lib_ONEAPI);
  if (__pyx_t_2) {

    /* "EnumTypeToPy":32
 *         return __pyx_enum.CUDA_MANAGED
 *     elif c_val == DeviceAllocationType.ONEAPI:
 *         return __pyx_enum.ONEAPI             # <<<<<<<<<<<<<<
 *     elif c_val == DeviceAllocationType.WEBGPU:
 *         return __pyx_enum.WEBGPU
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_ONEAPI); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 32, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":31
 *     elif c_val == DeviceAllocationType.CUDA_MANAGED:
 *         return __pyx_enum.CUDA_MANAGED
 *     elif c_val == DeviceAllocationType.ONEAPI:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.ONEAPI
 *     elif c_val == DeviceAllocationType.WEBGPU:
*/
  }

  /* "EnumTypeToPy":33
 *     elif c_val == DeviceAllocationType.ONEAPI:
 *         return __pyx_enum.ONEAPI
 *     elif c_val == DeviceAllocationType.WEBGPU:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.WEBGPU
 *     elif c_val == DeviceAllocationType.HEXAGON:
*/
  __pyx_t_2 = (__pyx_v_c_val == __pyx_e_7pyarrow_3lib_WEBGPU);
  if (__pyx_t_2) {

    /* "EnumTypeToPy":34
 *         return __pyx_enum.ONEAPI
 *     elif c_val == DeviceAllocationType.WEBGPU:
 *         return __pyx_enum.WEBGPU             # <<<<<<<<<<<<<<
 *     elif c_val == DeviceAllocationType.HEXAGON:
 *         return __pyx_enum.HEXAGON
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_WEBGPU); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 34, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":33
 *     elif c_val == DeviceAllocationType.ONEAPI:
 *         return __pyx_enum.ONEAPI
 *     elif c_val == DeviceAllocationType.WEBGPU:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.WEBGPU
 *     elif c_val == DeviceAllocationType.HEXAGON:
*/
  }

  /* "EnumTypeToPy":35
 *     elif c_val == DeviceAllocationType.WEBGPU:
 *         return __pyx_enum.WEBGPU
 *     elif c_val == DeviceAllocationType.HEXAGON:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.HEXAGON
 *     else:
*/
  __pyx_t_2 = (__pyx_v_c_val == __pyx_e_7pyarrow_3lib_HEXAGON);
  if (__pyx_t_2) {

    /* "EnumTypeToPy":36
 *         return __pyx_enum.WEBGPU
 *     elif c_val == DeviceAllocationType.HEXAGON:
 *         return __pyx_enum.HEXAGON             # <<<<<<<<<<<<<<
 *     else:
 *         underlying_c_val = <int>c_val
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_HEXAGON); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 36, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":35
 *     elif c_val == DeviceAllocationType.WEBGPU:
 *         return __pyx_enum.WEBGPU
 *     elif c_val == DeviceAllocationType.HEXAGON:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.HEXAGON
 *     else:
*/
  }

  /* "EnumTypeToPy":38
 *         return __pyx_enum.HEXAGON
 *     else:
 *         underlying_c_val = <int>c_val             # <<<<<<<<<<<<<<
 *         return __pyx_enum(underlying_c_val)
*/
  /*else*/ {
    __pyx_v_underlying_c_val = ((int)__pyx_v_c_val);

    /* "EnumTypeToPy":39
 *     else:
 *         underlying_c_val = <int>c_val
 *         return __pyx_enum(underlying_c_val)             # <<<<<<<<<<<<<<
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_v___pyx_enum);
    __pyx_t_4 = __pyx_v___pyx_enum; 
    __pyx_t_5 = __Pyx_PyLong_From_int(__pyx_v_underlying_c_val); if (unlikely(!__pyx_t_5)) __PYX_ERR(7, 39, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
      assert(__pyx_t_3);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
      __pyx_t_6 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 39, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }

  /* "EnumTypeToPy":2
 * 
 * @cname("__Pyx_Enum_230530__7pyarrow_3lib_enum__dunderpyx_t_7pyarrow_3lib___etc_to_py")             # <<<<<<<<<<<<<<
 * cdef __Pyx_Enum_230530__7pyarrow_3lib_enum__dunderpyx_t_7pyarrow_3lib___etc_to_py(DeviceAllocationType c_val):
 *     cdef object __pyx_enum
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("EnumTypeToPy.__Pyx_Enum_230530__7pyarrow_3lib_enum__dunderpyx_t_7pyarrow_3lib___etc_to_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_enum);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "set.from_py":158
 *         void insert(T&) except +
 * 
 * @cname("__pyx_convert_unordered_set_from_py_std_3a__3a_string")             # <<<<<<<<<<<<<<
 * cdef set[X] __pyx_convert_unordered_set_from_py_std_3a__3a_string(object o) except *:
 *     cdef set[X] s
*/

static std::unordered_set<std::string>  __pyx_convert_unordered_set_from_py_std_3a__3a_string(PyObject *__pyx_v_o) {
  std::unordered_set<std::string>  __pyx_v_s;
  PyObject *__pyx_v_item = NULL;
  std::unordered_set<std::string>  __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *(*__pyx_t_3)(PyObject *);
  PyObject *__pyx_t_4 = NULL;
  std::string __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_convert_unordered_set_from_py_std_3a__3a_string", 0);

  /* "set.from_py":161
 * cdef set[X] __pyx_convert_unordered_set_from_py_std_3a__3a_string(object o) except *:
 *     cdef set[X] s
 *     for item in o:             # <<<<<<<<<<<<<<
 *         s.insert(<X>item)
 *     return s
*/
  if (likely(PyList_CheckExact(__pyx_v_o)) || PyTuple_CheckExact(__pyx_v_o)) {
    __pyx_t_1 = __pyx_v_o; __Pyx_INCREF(__pyx_t_1);
    __pyx_t_2 = 0;
    __pyx_t_3 = NULL;
  } else {
    __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_o); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 161, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 161, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_3)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
          #if !CYTHON_ASSUME_SAFE_SIZE
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(7, 161, __pyx_L1_error)
          #endif
          if (__pyx_t_2 >= __pyx_temp) break;
        }
        __pyx_t_4 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_2, __Pyx_ReferenceSharing_OwnStrongReference);
        ++__pyx_t_2;
      } else {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
          #if !CYTHON_ASSUME_SAFE_SIZE
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(7, 161, __pyx_L1_error)
          #endif
          if (__pyx_t_2 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2));
        #else
        __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2);
        #endif
        ++__pyx_t_2;
      }
      if (unlikely(!__pyx_t_4)) __PYX_ERR(7, 161, __pyx_L1_error)
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(7, 161, __pyx_L1_error)
          PyErr_Clear();
        }
        break;
      }
    }
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "set.from_py":162
 *     cdef set[X] s
 *     for item in o:
 *         s.insert(<X>item)             # <<<<<<<<<<<<<<
 *     return s
 * 
*/
    __pyx_t_5 = __pyx_convert_string_from_py_6libcpp_6string_std__in_string(__pyx_v_item); if (unlikely(PyErr_Occurred())) __PYX_ERR(7, 162, __pyx_L1_error)
    try {
      __pyx_v_s.insert(((std::string)__pyx_t_5));
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(7, 162, __pyx_L1_error)
    }

    /* "set.from_py":161
 * cdef set[X] __pyx_convert_unordered_set_from_py_std_3a__3a_string(object o) except *:
 *     cdef set[X] s
 *     for item in o:             # <<<<<<<<<<<<<<
 *         s.insert(<X>item)
 *     return s
*/
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "set.from_py":163
 *     for item in o:
 *         s.insert(<X>item)
 *     return s             # <<<<<<<<<<<<<<
 * 
*/
  __pyx_r = __pyx_v_s;
  goto __pyx_L0;

  /* "set.from_py":158
 *         void insert(T&) except +
 * 
 * @cname("__pyx_convert_unordered_set_from_py_std_3a__3a_string")             # <<<<<<<<<<<<<<
 * cdef set[X] __pyx_convert_unordered_set_from_py_std_3a__3a_string(object o) except *:
 *     cdef set[X] s
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("set.from_py.__pyx_convert_unordered_set_from_py_std_3a__3a_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_pretend_to_initialize(&__pyx_r);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_item);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "EnumTypeToPy":2
 * 
 * @cname("__Pyx_Enum_7pyarrow_3lib_enum__dunderpyx_t_7pyarrow_3lib_Alignment_to_py")             # <<<<<<<<<<<<<<
 * cdef __Pyx_Enum_7pyarrow_3lib_enum__dunderpyx_t_7pyarrow_3lib_Alignment_to_py(Alignment c_val):
 *     cdef object __pyx_enum
*/

static PyObject *__Pyx_Enum_7pyarrow_3lib_enum__dunderpyx_t_7pyarrow_3lib_Alignment_to_py(enum __pyx_t_7pyarrow_3lib_Alignment __pyx_v_c_val) {
  PyObject *__pyx_v___pyx_enum = 0;
  int __pyx_v_underlying_c_val;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_Enum_7pyarrow_3lib_enum__dunderpyx_t_7pyarrow_3lib_Alignment_to_py", 0);

  /* "EnumTypeToPy":5
 * cdef __Pyx_Enum_7pyarrow_3lib_enum__dunderpyx_t_7pyarrow_3lib_Alignment_to_py(Alignment c_val):
 *     cdef object __pyx_enum
 *     __pyx_enum = Alignment             # <<<<<<<<<<<<<<
 * 
 *     if 0:
*/
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_Alignment); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v___pyx_enum = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "EnumTypeToPy":9
 *     if 0:
 *         pass
 *     elif c_val == Alignment.Any:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.Any
 *     elif c_val == Alignment.DataTypeSpecific:
*/
  __pyx_t_2 = (__pyx_v_c_val == __pyx_e_7pyarrow_3lib_Any);
  if (__pyx_t_2) {

    /* "EnumTypeToPy":10
 *         pass
 *     elif c_val == Alignment.Any:
 *         return __pyx_enum.Any             # <<<<<<<<<<<<<<
 *     elif c_val == Alignment.DataTypeSpecific:
 *         return __pyx_enum.DataTypeSpecific
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_Any); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 10, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":9
 *     if 0:
 *         pass
 *     elif c_val == Alignment.Any:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.Any
 *     elif c_val == Alignment.DataTypeSpecific:
*/
  }

  /* "EnumTypeToPy":11
 *     elif c_val == Alignment.Any:
 *         return __pyx_enum.Any
 *     elif c_val == Alignment.DataTypeSpecific:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.DataTypeSpecific
 *     elif c_val == Alignment.At64Byte:
*/
  __pyx_t_2 = (__pyx_v_c_val == __pyx_e_7pyarrow_3lib_DataTypeSpecific);
  if (__pyx_t_2) {

    /* "EnumTypeToPy":12
 *         return __pyx_enum.Any
 *     elif c_val == Alignment.DataTypeSpecific:
 *         return __pyx_enum.DataTypeSpecific             # <<<<<<<<<<<<<<
 *     elif c_val == Alignment.At64Byte:
 *         return __pyx_enum.At64Byte
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_DataTypeSpecific); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 12, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":11
 *     elif c_val == Alignment.Any:
 *         return __pyx_enum.Any
 *     elif c_val == Alignment.DataTypeSpecific:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.DataTypeSpecific
 *     elif c_val == Alignment.At64Byte:
*/
  }

  /* "EnumTypeToPy":13
 *     elif c_val == Alignment.DataTypeSpecific:
 *         return __pyx_enum.DataTypeSpecific
 *     elif c_val == Alignment.At64Byte:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.At64Byte
 *     else:
*/
  __pyx_t_2 = (__pyx_v_c_val == __pyx_e_7pyarrow_3lib_At64Byte);
  if (__pyx_t_2) {

    /* "EnumTypeToPy":14
 *         return __pyx_enum.DataTypeSpecific
 *     elif c_val == Alignment.At64Byte:
 *         return __pyx_enum.At64Byte             # <<<<<<<<<<<<<<
 *     else:
 *         underlying_c_val = <int>c_val
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v___pyx_enum, __pyx_mstate_global->__pyx_n_u_At64Byte); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "EnumTypeToPy":13
 *     elif c_val == Alignment.DataTypeSpecific:
 *         return __pyx_enum.DataTypeSpecific
 *     elif c_val == Alignment.At64Byte:             # <<<<<<<<<<<<<<
 *         return __pyx_enum.At64Byte
 *     else:
*/
  }

  /* "EnumTypeToPy":16
 *         return __pyx_enum.At64Byte
 *     else:
 *         underlying_c_val = <int>c_val             # <<<<<<<<<<<<<<
 *         return __pyx_enum(underlying_c_val)
*/
  /*else*/ {
    __pyx_v_underlying_c_val = ((int)__pyx_v_c_val);

    /* "EnumTypeToPy":17
 *     else:
 *         underlying_c_val = <int>c_val
 *         return __pyx_enum(underlying_c_val)             # <<<<<<<<<<<<<<
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_v___pyx_enum);
    __pyx_t_4 = __pyx_v___pyx_enum; 
    __pyx_t_5 = __Pyx_PyLong_From_int(__pyx_v_underlying_c_val); if (unlikely(!__pyx_t_5)) __PYX_ERR(7, 17, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
      assert(__pyx_t_3);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
      __pyx_t_6 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 17, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }

  /* "EnumTypeToPy":2
 * 
 * @cname("__Pyx_Enum_7pyarrow_3lib_enum__dunderpyx_t_7pyarrow_3lib_Alignment_to_py")             # <<<<<<<<<<<<<<
 * cdef __Pyx_Enum_7pyarrow_3lib_enum__dunderpyx_t_7pyarrow_3lib_Alignment_to_py(Alignment c_val):
 *     cdef object __pyx_enum
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("EnumTypeToPy.__Pyx_Enum_7pyarrow_3lib_enum__dunderpyx_t_7pyarrow_3lib_Alignment_to_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_enum);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vector.from_py":51
 *     cdef Py_ssize_t __Pyx_PyObject_LengthHint(object o, Py_ssize_t defaultval) except -1
 * 
 * @cname("__pyx_convert_vector_from_py_int")             # <<<<<<<<<<<<<<
 * cdef vector[X] __pyx_convert_vector_from_py_int(object o) except *:
 * 
*/

static std::vector<int>  __pyx_convert_vector_from_py_int(PyObject *__pyx_v_o) {
  std::vector<int>  __pyx_v_v;
  Py_ssize_t __pyx_v_s;
  PyObject *__pyx_v_item = NULL;
  std::vector<int>  __pyx_r;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *(*__pyx_t_4)(PyObject *);
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_convert_vector_from_py_int", 0);

  /* "vector.from_py":55
 * 
 *     cdef vector[X] v
 *     cdef Py_ssize_t s = __Pyx_PyObject_LengthHint(o, 0)             # <<<<<<<<<<<<<<
 * 
 *     if s > 0:
*/
  __pyx_t_1 = __Pyx_PyObject_LengthHint(__pyx_v_o, 0); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1L))) __PYX_ERR(7, 55, __pyx_L1_error)
  __pyx_v_s = __pyx_t_1;

  /* "vector.from_py":57
 *     cdef Py_ssize_t s = __Pyx_PyObject_LengthHint(o, 0)
 * 
 *     if s > 0:             # <<<<<<<<<<<<<<
 *         v.reserve(<size_t> s)
 * 
*/
  __pyx_t_2 = (__pyx_v_s > 0);
  if (__pyx_t_2) {

    /* "vector.from_py":58
 * 
 *     if s > 0:
 *         v.reserve(<size_t> s)             # <<<<<<<<<<<<<<
 * 
 *     for item in o:
*/
    try {
      __pyx_v_v.reserve(((size_t)__pyx_v_s));
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(7, 58, __pyx_L1_error)
    }

    /* "vector.from_py":57
 *     cdef Py_ssize_t s = __Pyx_PyObject_LengthHint(o, 0)
 * 
 *     if s > 0:             # <<<<<<<<<<<<<<
 *         v.reserve(<size_t> s)
 * 
*/
  }

  /* "vector.from_py":60
 *         v.reserve(<size_t> s)
 * 
 *     for item in o:             # <<<<<<<<<<<<<<
 *         v.push_back(<X>item)
 * 
*/
  if (likely(PyList_CheckExact(__pyx_v_o)) || PyTuple_CheckExact(__pyx_v_o)) {
    __pyx_t_3 = __pyx_v_o; __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_1 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_o); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 60, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(7, 60, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_3))) {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3);
          #if !CYTHON_ASSUME_SAFE_SIZE
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(7, 60, __pyx_L1_error)
          #endif
          if (__pyx_t_1 >= __pyx_temp) break;
        }
        __pyx_t_5 = __Pyx_PyList_GetItemRefFast(__pyx_t_3, __pyx_t_1, __Pyx_ReferenceSharing_OwnStrongReference);
        ++__pyx_t_1;
      } else {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3);
          #if !CYTHON_ASSUME_SAFE_SIZE
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(7, 60, __pyx_L1_error)
          #endif
          if (__pyx_t_1 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_5 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_1));
        #else
        __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_1);
        #endif
        ++__pyx_t_1;
      }
      if (unlikely(!__pyx_t_5)) __PYX_ERR(7, 60, __pyx_L1_error)
    } else {
      __pyx_t_5 = __pyx_t_4(__pyx_t_3);
      if (unlikely(!__pyx_t_5)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(7, 60, __pyx_L1_error)
          PyErr_Clear();
        }
        break;
      }
    }
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "vector.from_py":61
 * 
 *     for item in o:
 *         v.push_back(<X>item)             # <<<<<<<<<<<<<<
 * 
 *     return v
*/
    __pyx_t_6 = __Pyx_PyLong_As_int(__pyx_v_item); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 61, __pyx_L1_error)
    try {
      __pyx_v_v.push_back(((int)__pyx_t_6));
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(7, 61, __pyx_L1_error)
    }

    /* "vector.from_py":60
 *         v.reserve(<size_t> s)
 * 
 *     for item in o:             # <<<<<<<<<<<<<<
 *         v.push_back(<X>item)
 * 
*/
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "vector.from_py":63
 *         v.push_back(<X>item)
 * 
 *     return v             # <<<<<<<<<<<<<<
 * 
*/
  __pyx_r = __pyx_v_v;
  goto __pyx_L0;

  /* "vector.from_py":51
 *     cdef Py_ssize_t __Pyx_PyObject_LengthHint(object o, Py_ssize_t defaultval) except -1
 * 
 * @cname("__pyx_convert_vector_from_py_int")             # <<<<<<<<<<<<<<
 * cdef vector[X] __pyx_convert_vector_from_py_int(object o) except *:
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("vector.from_py.__pyx_convert_vector_from_py_int", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_pretend_to_initialize(&__pyx_r);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_item);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static std::vector<int8_t>  __pyx_convert_vector_from_py_int8_t(PyObject *__pyx_v_o) {
  std::vector<int8_t>  __pyx_v_v;
  Py_ssize_t __pyx_v_s;
  PyObject *__pyx_v_item = NULL;
  std::vector<int8_t>  __pyx_r;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *(*__pyx_t_4)(PyObject *);
  PyObject *__pyx_t_5 = NULL;
  int8_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_convert_vector_from_py_int8_t", 0);

  /* "vector.from_py":55
 * 
 *     cdef vector[X] v
 *     cdef Py_ssize_t s = __Pyx_PyObject_LengthHint(o, 0)             # <<<<<<<<<<<<<<
 * 
 *     if s > 0:
*/
  __pyx_t_1 = __Pyx_PyObject_LengthHint(__pyx_v_o, 0); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1L))) __PYX_ERR(7, 55, __pyx_L1_error)
  __pyx_v_s = __pyx_t_1;

  /* "vector.from_py":57
 *     cdef Py_ssize_t s = __Pyx_PyObject_LengthHint(o, 0)
 * 
 *     if s > 0:             # <<<<<<<<<<<<<<
 *         v.reserve(<size_t> s)
 * 
*/
  __pyx_t_2 = (__pyx_v_s > 0);
  if (__pyx_t_2) {

    /* "vector.from_py":58
 * 
 *     if s > 0:
 *         v.reserve(<size_t> s)             # <<<<<<<<<<<<<<
 * 
 *     for item in o:
*/
    try {
      __pyx_v_v.reserve(((size_t)__pyx_v_s));
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(7, 58, __pyx_L1_error)
    }

    /* "vector.from_py":57
 *     cdef Py_ssize_t s = __Pyx_PyObject_LengthHint(o, 0)
 * 
 *     if s > 0:             # <<<<<<<<<<<<<<
 *         v.reserve(<size_t> s)
 * 
*/
  }

  /* "vector.from_py":60
 *         v.reserve(<size_t> s)
 * 
 *     for item in o:             # <<<<<<<<<<<<<<
 *         v.push_back(<X>item)
 * 
*/
  if (likely(PyList_CheckExact(__pyx_v_o)) || PyTuple_CheckExact(__pyx_v_o)) {
    __pyx_t_3 = __pyx_v_o; __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_1 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_o); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 60, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(7, 60, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_3))) {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3);
          #if !CYTHON_ASSUME_SAFE_SIZE
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(7, 60, __pyx_L1_error)
          #endif
          if (__pyx_t_1 >= __pyx_temp) break;
        }
        __pyx_t_5 = __Pyx_PyList_GetItemRefFast(__pyx_t_3, __pyx_t_1, __Pyx_ReferenceSharing_OwnStrongReference);
        ++__pyx_t_1;
      } else {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3);
          #if !CYTHON_ASSUME_SAFE_SIZE
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(7, 60, __pyx_L1_error)
          #endif
          if (__pyx_t_1 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_5 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_1));
        #else
        __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_1);
        #endif
        ++__pyx_t_1;
      }
      if (unlikely(!__pyx_t_5)) __PYX_ERR(7, 60, __pyx_L1_error)
    } else {
      __pyx_t_5 = __pyx_t_4(__pyx_t_3);
      if (unlikely(!__pyx_t_5)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(7, 60, __pyx_L1_error)
          PyErr_Clear();
        }
        break;
      }
    }
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "vector.from_py":61
 * 
 *     for item in o:
 *         v.push_back(<X>item)             # <<<<<<<<<<<<<<
 * 
 *     return v
*/
    __pyx_t_6 = __Pyx_PyLong_As_int8_t(__pyx_v_item); if (unlikely((__pyx_t_6 == ((int8_t)-1)) && PyErr_Occurred())) __PYX_ERR(7, 61, __pyx_L1_error)
    try {
      __pyx_v_v.push_back(((int8_t)__pyx_t_6));
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(7, 61, __pyx_L1_error)
    }

    /* "vector.from_py":60
 *         v.reserve(<size_t> s)
 * 
 *     for item in o:             # <<<<<<<<<<<<<<
 *         v.push_back(<X>item)
 * 
*/
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "vector.from_py":63
 *         v.push_back(<X>item)
 * 
 *     return v             # <<<<<<<<<<<<<<
 * 
*/
  __pyx_r = __pyx_v_v;
  goto __pyx_L0;

  /* "vector.from_py":51
 *     cdef Py_ssize_t __Pyx_PyObject_LengthHint(object o, Py_ssize_t defaultval) except -1
 * 
 * @cname("__pyx_convert_vector_from_py_int8_t")             # <<<<<<<<<<<<<<
 * cdef vector[X] __pyx_convert_vector_from_py_int8_t(object o) except *:
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("vector.from_py.__pyx_convert_vector_from_py_int8_t", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_pretend_to_initialize(&__pyx_r);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_item);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cpython/complex.pxd":20
 * 
 *         # unavailable in limited API
 *         @property             # <<<<<<<<<<<<<<
 *         @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API")
 *         cdef inline double real(self) noexcept:
*/

#if !CYTHON_COMPILING_IN_LIMITED_API
static CYTHON_INLINE double __pyx_f_7cpython_7complex_7complex_4real_real(PyComplexObject *__pyx_v_self) {
  double __pyx_r;

  /* "cpython/complex.pxd":23
 *         @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API")
 *         cdef inline double real(self) noexcept:
 *             return self.cval.real             # <<<<<<<<<<<<<<
 * 
 *         # unavailable in limited API
*/
  __pyx_r = __pyx_v_self->cval.real;
  goto __pyx_L0;

  /* "cpython/complex.pxd":20
 * 
 *         # unavailable in limited API
 *         @property             # <<<<<<<<<<<<<<
 *         @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API")
 *         cdef inline double real(self) noexcept:
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}
#endif /*!(#if !CYTHON_COMPILING_IN_LIMITED_API)*/

/* "cpython/complex.pxd":26
 * 
 *         # unavailable in limited API
 *         @property             # <<<<<<<<<<<<<<
 *         @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API")
 *         cdef inline double imag(self) noexcept:
*/

#if !CYTHON_COMPILING_IN_LIMITED_API
static CYTHON_INLINE double __pyx_f_7cpython_7complex_7complex_4imag_imag(PyComplexObject *__pyx_v_self) {
  double __pyx_r;

  /* "cpython/complex.pxd":29
 *         @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API")
 *         cdef inline double imag(self) noexcept:
 *             return self.cval.imag             # <<<<<<<<<<<<<<
 * 
 *     # PyTypeObject PyComplex_Type
*/
  __pyx_r = __pyx_v_self->cval.imag;
  goto __pyx_L0;

  /* "cpython/complex.pxd":26
 * 
 *         # unavailable in limited API
 *         @property             # <<<<<<<<<<<<<<
 *         @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API")
 *         cdef inline double imag(self) noexcept:
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}
#endif /*!(#if !CYTHON_COMPILING_IN_LIMITED_API)*/

/* "cpython/contextvars.pxd":115
 * 
 * 
 * @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API")             # <<<<<<<<<<<<<<
 * cdef inline object get_value(var, default_value=None):
 *     """Return a new reference to the value of the context variable,
*/

#if !CYTHON_COMPILING_IN_LIMITED_API
static CYTHON_INLINE PyObject *__pyx_f_7cpython_11contextvars_get_value(PyObject *__pyx_v_var, struct __pyx_opt_args_7cpython_11contextvars_get_value *__pyx_optional_args) {

  /* "cpython/contextvars.pxd":116
 * 
 * @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API")
 * cdef inline object get_value(var, default_value=None):             # <<<<<<<<<<<<<<
 *     """Return a new reference to the value of the context variable,
 *     or the default value of the context variable,
*/
  PyObject *__pyx_v_default_value = ((PyObject *)Py_None);
  PyObject *__pyx_v_value;
  PyObject *__pyx_v_pyvalue = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_value", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_default_value = __pyx_optional_args->default_value;
    }
  }

  /* "cpython/contextvars.pxd":121
 *     or None if no such value or default was found.
 *     """
 *     cdef PyObject *value = NULL             # <<<<<<<<<<<<<<
 *     PyContextVar_Get(var, NULL, &value)
 *     if value is NULL:
*/
  __pyx_v_value = NULL;

  /* "cpython/contextvars.pxd":122
 *     """
 *     cdef PyObject *value = NULL
 *     PyContextVar_Get(var, NULL, &value)             # <<<<<<<<<<<<<<
 *     if value is NULL:
 *         # context variable does not have a default
*/
  __pyx_t_1 = PyContextVar_Get(__pyx_v_var, NULL, (&__pyx_v_value)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(8, 122, __pyx_L1_error)

  /* "cpython/contextvars.pxd":123
 *     cdef PyObject *value = NULL
 *     PyContextVar_Get(var, NULL, &value)
 *     if value is NULL:             # <<<<<<<<<<<<<<
 *         # context variable does not have a default
 *         pyvalue = default_value
*/
  __pyx_t_2 = (__pyx_v_value == NULL);
  if (__pyx_t_2) {

    /* "cpython/contextvars.pxd":125
 *     if value is NULL:
 *         # context variable does not have a default
 *         pyvalue = default_value             # <<<<<<<<<<<<<<
 *     else:
 *         # value or default value of context variable
*/
    __Pyx_INCREF(__pyx_v_default_value);
    __pyx_v_pyvalue = __pyx_v_default_value;

    /* "cpython/contextvars.pxd":123
 *     cdef PyObject *value = NULL
 *     PyContextVar_Get(var, NULL, &value)
 *     if value is NULL:             # <<<<<<<<<<<<<<
 *         # context variable does not have a default
 *         pyvalue = default_value
*/
    goto __pyx_L3;
  }

  /* "cpython/contextvars.pxd":128
 *     else:
 *         # value or default value of context variable
 *         pyvalue = <object>value             # <<<<<<<<<<<<<<
 *         Py_XDECREF(value)  # PyContextVar_Get() returned an owned reference as 'PyObject*'
 *     return pyvalue
*/
  /*else*/ {
    __pyx_t_3 = ((PyObject *)__pyx_v_value);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_v_pyvalue = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cpython/contextvars.pxd":129
 *         # value or default value of context variable
 *         pyvalue = <object>value
 *         Py_XDECREF(value)  # PyContextVar_Get() returned an owned reference as 'PyObject*'             # <<<<<<<<<<<<<<
 *     return pyvalue
 * 
*/
    Py_XDECREF(__pyx_v_value);
  }
  __pyx_L3:;

  /* "cpython/contextvars.pxd":130
 *         pyvalue = <object>value
 *         Py_XDECREF(value)  # PyContextVar_Get() returned an owned reference as 'PyObject*'
 *     return pyvalue             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_pyvalue);
  __pyx_r = __pyx_v_pyvalue;
  goto __pyx_L0;

  /* "cpython/contextvars.pxd":115
 * 
 * 
 * @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API")             # <<<<<<<<<<<<<<
 * cdef inline object get_value(var, default_value=None):
 *     """Return a new reference to the value of the context variable,
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cpython.contextvars.get_value", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pyvalue);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
#endif /*!(#if !CYTHON_COMPILING_IN_LIMITED_API)*/

/* "cpython/contextvars.pxd":133
 * 
 * 
 * @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API")             # <<<<<<<<<<<<<<
 * cdef inline object get_value_no_default(var, default_value=None):
 *     """Return a new reference to the value of the context variable,
*/

#if !CYTHON_COMPILING_IN_LIMITED_API
static CYTHON_INLINE PyObject *__pyx_f_7cpython_11contextvars_get_value_no_default(PyObject *__pyx_v_var, struct __pyx_opt_args_7cpython_11contextvars_get_value_no_default *__pyx_optional_args) {

  /* "cpython/contextvars.pxd":134
 * 
 * @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API")
 * cdef inline object get_value_no_default(var, default_value=None):             # <<<<<<<<<<<<<<
 *     """Return a new reference to the value of the context variable,
 *     or the provided default value if no such value was found.
*/
  PyObject *__pyx_v_default_value = ((PyObject *)Py_None);
  PyObject *__pyx_v_value;
  PyObject *__pyx_v_pyvalue = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_value_no_default", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_default_value = __pyx_optional_args->default_value;
    }
  }

  /* "cpython/contextvars.pxd":140
 *     Ignores the default value of the context variable, if any.
 *     """
 *     cdef PyObject *value = NULL             # <<<<<<<<<<<<<<
 *     PyContextVar_Get(var, <PyObject*>default_value, &value)
 *     # value of context variable or 'default_value'
*/
  __pyx_v_value = NULL;

  /* "cpython/contextvars.pxd":141
 *     """
 *     cdef PyObject *value = NULL
 *     PyContextVar_Get(var, <PyObject*>default_value, &value)             # <<<<<<<<<<<<<<
 *     # value of context variable or 'default_value'
 *     pyvalue = <object>value
*/
  __pyx_t_1 = PyContextVar_Get(__pyx_v_var, ((PyObject *)__pyx_v_default_value), (&__pyx_v_value)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(8, 141, __pyx_L1_error)

  /* "cpython/contextvars.pxd":143
 *     PyContextVar_Get(var, <PyObject*>default_value, &value)
 *     # value of context variable or 'default_value'
 *     pyvalue = <object>value             # <<<<<<<<<<<<<<
 *     Py_XDECREF(value)  # PyContextVar_Get() returned an owned reference as 'PyObject*'
 *     return pyvalue
*/
  __pyx_t_2 = ((PyObject *)__pyx_v_value);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_v_pyvalue = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "cpython/contextvars.pxd":144
 *     # value of context variable or 'default_value'
 *     pyvalue = <object>value
 *     Py_XDECREF(value)  # PyContextVar_Get() returned an owned reference as 'PyObject*'             # <<<<<<<<<<<<<<
 *     return pyvalue
*/
  Py_XDECREF(__pyx_v_value);

  /* "cpython/contextvars.pxd":145
 *     pyvalue = <object>value
 *     Py_XDECREF(value)  # PyContextVar_Get() returned an owned reference as 'PyObject*'
 *     return pyvalue             # <<<<<<<<<<<<<<
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_pyvalue);
  __pyx_r = __pyx_v_pyvalue;
  goto __pyx_L0;

  /* "cpython/contextvars.pxd":133
 * 
 * 
 * @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API")             # <<<<<<<<<<<<<<
 * cdef inline object get_value_no_default(var, default_value=None):
 *     """Return a new reference to the value of the context variable,
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cpython.contextvars.get_value_no_default", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pyvalue);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
#endif /*!(#if !CYTHON_COMPILING_IN_LIMITED_API)*/

/* "cpython/datetime.pxd":44
 * 
 *     ctypedef extern class datetime.date[object PyDateTime_Date]:
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int year(self) noexcept:
 *             return PyDateTime_GET_YEAR(self)
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4date_4year_year(PyDateTime_Date *__pyx_v_self) {
  int __pyx_r;

  /* "cpython/datetime.pxd":46
 *         @property
 *         cdef inline int year(self) noexcept:
 *             return PyDateTime_GET_YEAR(self)             # <<<<<<<<<<<<<<
 * 
 *         @property
*/
  __pyx_r = PyDateTime_GET_YEAR(((PyObject *)__pyx_v_self));
  goto __pyx_L0;

  /* "cpython/datetime.pxd":44
 * 
 *     ctypedef extern class datetime.date[object PyDateTime_Date]:
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int year(self) noexcept:
 *             return PyDateTime_GET_YEAR(self)
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "cpython/datetime.pxd":48
 *             return PyDateTime_GET_YEAR(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int month(self) noexcept:
 *             return PyDateTime_GET_MONTH(self)
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4date_5month_month(PyDateTime_Date *__pyx_v_self) {
  int __pyx_r;

  /* "cpython/datetime.pxd":50
 *         @property
 *         cdef inline int month(self) noexcept:
 *             return PyDateTime_GET_MONTH(self)             # <<<<<<<<<<<<<<
 * 
 *         @property
*/
  __pyx_r = PyDateTime_GET_MONTH(((PyObject *)__pyx_v_self));
  goto __pyx_L0;

  /* "cpython/datetime.pxd":48
 *             return PyDateTime_GET_YEAR(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int month(self) noexcept:
 *             return PyDateTime_GET_MONTH(self)
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "cpython/datetime.pxd":52
 *             return PyDateTime_GET_MONTH(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int day(self) noexcept:
 *             return PyDateTime_GET_DAY(self)
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4date_3day_day(PyDateTime_Date *__pyx_v_self) {
  int __pyx_r;

  /* "cpython/datetime.pxd":54
 *         @property
 *         cdef inline int day(self) noexcept:
 *             return PyDateTime_GET_DAY(self)             # <<<<<<<<<<<<<<
 * 
 *     ctypedef extern class datetime.time[object PyDateTime_Time]:
*/
  __pyx_r = PyDateTime_GET_DAY(((PyObject *)__pyx_v_self));
  goto __pyx_L0;

  /* "cpython/datetime.pxd":52
 *             return PyDateTime_GET_MONTH(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int day(self) noexcept:
 *             return PyDateTime_GET_DAY(self)
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "cpython/datetime.pxd":57
 * 
 *     ctypedef extern class datetime.time[object PyDateTime_Time]:
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int hour(self) noexcept:
 *             return PyDateTime_TIME_GET_HOUR(self)
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4time_4hour_hour(PyDateTime_Time *__pyx_v_self) {
  int __pyx_r;

  /* "cpython/datetime.pxd":59
 *         @property
 *         cdef inline int hour(self) noexcept:
 *             return PyDateTime_TIME_GET_HOUR(self)             # <<<<<<<<<<<<<<
 * 
 *         @property
*/
  __pyx_r = PyDateTime_TIME_GET_HOUR(((PyObject *)__pyx_v_self));
  goto __pyx_L0;

  /* "cpython/datetime.pxd":57
 * 
 *     ctypedef extern class datetime.time[object PyDateTime_Time]:
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int hour(self) noexcept:
 *             return PyDateTime_TIME_GET_HOUR(self)
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "cpython/datetime.pxd":61
 *             return PyDateTime_TIME_GET_HOUR(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int minute(self) noexcept:
 *             return PyDateTime_TIME_GET_MINUTE(self)
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4time_6minute_minute(PyDateTime_Time *__pyx_v_self) {
  int __pyx_r;

  /* "cpython/datetime.pxd":63
 *         @property
 *         cdef inline int minute(self) noexcept:
 *             return PyDateTime_TIME_GET_MINUTE(self)             # <<<<<<<<<<<<<<
 * 
 *         @property
*/
  __pyx_r = PyDateTime_TIME_GET_MINUTE(((PyObject *)__pyx_v_self));
  goto __pyx_L0;

  /* "cpython/datetime.pxd":61
 *             return PyDateTime_TIME_GET_HOUR(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int minute(self) noexcept:
 *             return PyDateTime_TIME_GET_MINUTE(self)
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "cpython/datetime.pxd":65
 *             return PyDateTime_TIME_GET_MINUTE(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int second(self) noexcept:
 *             return PyDateTime_TIME_GET_SECOND(self)
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4time_6second_second(PyDateTime_Time *__pyx_v_self) {
  int __pyx_r;

  /* "cpython/datetime.pxd":67
 *         @property
 *         cdef inline int second(self) noexcept:
 *             return PyDateTime_TIME_GET_SECOND(self)             # <<<<<<<<<<<<<<
 * 
 *         @property
*/
  __pyx_r = PyDateTime_TIME_GET_SECOND(((PyObject *)__pyx_v_self));
  goto __pyx_L0;

  /* "cpython/datetime.pxd":65
 *             return PyDateTime_TIME_GET_MINUTE(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int second(self) noexcept:
 *             return PyDateTime_TIME_GET_SECOND(self)
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "cpython/datetime.pxd":69
 *             return PyDateTime_TIME_GET_SECOND(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int microsecond(self) noexcept:
 *             return PyDateTime_TIME_GET_MICROSECOND(self)
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4time_11microsecond_microsecond(PyDateTime_Time *__pyx_v_self) {
  int __pyx_r;

  /* "cpython/datetime.pxd":71
 *         @property
 *         cdef inline int microsecond(self) noexcept:
 *             return PyDateTime_TIME_GET_MICROSECOND(self)             # <<<<<<<<<<<<<<
 * 
 *         @property
*/
  __pyx_r = PyDateTime_TIME_GET_MICROSECOND(((PyObject *)__pyx_v_self));
  goto __pyx_L0;

  /* "cpython/datetime.pxd":69
 *             return PyDateTime_TIME_GET_SECOND(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int microsecond(self) noexcept:
 *             return PyDateTime_TIME_GET_MICROSECOND(self)
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "cpython/datetime.pxd":73
 *             return PyDateTime_TIME_GET_MICROSECOND(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline object tzinfo(self):
 *             return <object>PyDateTime_TIME_GET_TZINFO(self)
*/

static CYTHON_INLINE PyObject *__pyx_f_7cpython_8datetime_4time_6tzinfo_tzinfo(PyDateTime_Time *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1;
  __Pyx_RefNannySetupContext("tzinfo", 0);

  /* "cpython/datetime.pxd":75
 *         @property
 *         cdef inline object tzinfo(self):
 *             return <object>PyDateTime_TIME_GET_TZINFO(self)             # <<<<<<<<<<<<<<
 * 
 *         @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyDateTime_TIME_GET_TZINFO(((PyObject *)__pyx_v_self));
  __Pyx_INCREF(((PyObject *)__pyx_t_1));
  __pyx_r = ((PyObject *)__pyx_t_1);
  goto __pyx_L0;

  /* "cpython/datetime.pxd":73
 *             return PyDateTime_TIME_GET_MICROSECOND(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline object tzinfo(self):
 *             return <object>PyDateTime_TIME_GET_TZINFO(self)
*/

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

/* "cpython/datetime.pxd":77
 *             return <object>PyDateTime_TIME_GET_TZINFO(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int fold(self) noexcept:
 *             # For Python < 3.6 this returns 0 no matter what
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4time_4fold_fold(PyDateTime_Time *__pyx_v_self) {
  int __pyx_r;

  /* "cpython/datetime.pxd":80
 *         cdef inline int fold(self) noexcept:
 *             # For Python < 3.6 this returns 0 no matter what
 *             return PyDateTime_TIME_GET_FOLD(self)             # <<<<<<<<<<<<<<
 * 
 *     ctypedef extern class datetime.datetime[object PyDateTime_DateTime]:
*/
  __pyx_r = PyDateTime_TIME_GET_FOLD(((PyObject *)__pyx_v_self));
  goto __pyx_L0;

  /* "cpython/datetime.pxd":77
 *             return <object>PyDateTime_TIME_GET_TZINFO(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int fold(self) noexcept:
 *             # For Python < 3.6 this returns 0 no matter what
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "cpython/datetime.pxd":83
 * 
 *     ctypedef extern class datetime.datetime[object PyDateTime_DateTime]:
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int year(self) noexcept:
 *             return PyDateTime_GET_YEAR(self)
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_4year_year(PyDateTime_DateTime *__pyx_v_self) {
  int __pyx_r;

  /* "cpython/datetime.pxd":85
 *         @property
 *         cdef inline int year(self) noexcept:
 *             return PyDateTime_GET_YEAR(self)             # <<<<<<<<<<<<<<
 * 
 *         @property
*/
  __pyx_r = PyDateTime_GET_YEAR(((PyObject *)__pyx_v_self));
  goto __pyx_L0;

  /* "cpython/datetime.pxd":83
 * 
 *     ctypedef extern class datetime.datetime[object PyDateTime_DateTime]:
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int year(self) noexcept:
 *             return PyDateTime_GET_YEAR(self)
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "cpython/datetime.pxd":87
 *             return PyDateTime_GET_YEAR(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int month(self) noexcept:
 *             return PyDateTime_GET_MONTH(self)
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_5month_month(PyDateTime_DateTime *__pyx_v_self) {
  int __pyx_r;

  /* "cpython/datetime.pxd":89
 *         @property
 *         cdef inline int month(self) noexcept:
 *             return PyDateTime_GET_MONTH(self)             # <<<<<<<<<<<<<<
 * 
 *         @property
*/
  __pyx_r = PyDateTime_GET_MONTH(((PyObject *)__pyx_v_self));
  goto __pyx_L0;

  /* "cpython/datetime.pxd":87
 *             return PyDateTime_GET_YEAR(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int month(self) noexcept:
 *             return PyDateTime_GET_MONTH(self)
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "cpython/datetime.pxd":91
 *             return PyDateTime_GET_MONTH(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int day(self) noexcept:
 *             return PyDateTime_GET_DAY(self)
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_3day_day(PyDateTime_DateTime *__pyx_v_self) {
  int __pyx_r;

  /* "cpython/datetime.pxd":93
 *         @property
 *         cdef inline int day(self) noexcept:
 *             return PyDateTime_GET_DAY(self)             # <<<<<<<<<<<<<<
 * 
 *         @property
*/
  __pyx_r = PyDateTime_GET_DAY(((PyObject *)__pyx_v_self));
  goto __pyx_L0;

  /* "cpython/datetime.pxd":91
 *             return PyDateTime_GET_MONTH(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int day(self) noexcept:
 *             return PyDateTime_GET_DAY(self)
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "cpython/datetime.pxd":95
 *             return PyDateTime_GET_DAY(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int hour(self) noexcept:
 *             return PyDateTime_DATE_GET_HOUR(self)
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_4hour_hour(PyDateTime_DateTime *__pyx_v_self) {
  int __pyx_r;

  /* "cpython/datetime.pxd":97
 *         @property
 *         cdef inline int hour(self) noexcept:
 *             return PyDateTime_DATE_GET_HOUR(self)             # <<<<<<<<<<<<<<
 * 
 *         @property
*/
  __pyx_r = PyDateTime_DATE_GET_HOUR(((PyObject *)__pyx_v_self));
  goto __pyx_L0;

  /* "cpython/datetime.pxd":95
 *             return PyDateTime_GET_DAY(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int hour(self) noexcept:
 *             return PyDateTime_DATE_GET_HOUR(self)
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "cpython/datetime.pxd":99
 *             return PyDateTime_DATE_GET_HOUR(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int minute(self) noexcept:
 *             return PyDateTime_DATE_GET_MINUTE(self)
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_6minute_minute(PyDateTime_DateTime *__pyx_v_self) {
  int __pyx_r;

  /* "cpython/datetime.pxd":101
 *         @property
 *         cdef inline int minute(self) noexcept:
 *             return PyDateTime_DATE_GET_MINUTE(self)             # <<<<<<<<<<<<<<
 * 
 *         @property
*/
  __pyx_r = PyDateTime_DATE_GET_MINUTE(((PyObject *)__pyx_v_self));
  goto __pyx_L0;

  /* "cpython/datetime.pxd":99
 *             return PyDateTime_DATE_GET_HOUR(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int minute(self) noexcept:
 *             return PyDateTime_DATE_GET_MINUTE(self)
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "cpython/datetime.pxd":103
 *             return PyDateTime_DATE_GET_MINUTE(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int second(self) noexcept:
 *             return PyDateTime_DATE_GET_SECOND(self)
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_6second_second(PyDateTime_DateTime *__pyx_v_self) {
  int __pyx_r;

  /* "cpython/datetime.pxd":105
 *         @property
 *         cdef inline int second(self) noexcept:
 *             return PyDateTime_DATE_GET_SECOND(self)             # <<<<<<<<<<<<<<
 * 
 *         @property
*/
  __pyx_r = PyDateTime_DATE_GET_SECOND(((PyObject *)__pyx_v_self));
  goto __pyx_L0;

  /* "cpython/datetime.pxd":103
 *             return PyDateTime_DATE_GET_MINUTE(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int second(self) noexcept:
 *             return PyDateTime_DATE_GET_SECOND(self)
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "cpython/datetime.pxd":107
 *             return PyDateTime_DATE_GET_SECOND(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int microsecond(self) noexcept:
 *             return PyDateTime_DATE_GET_MICROSECOND(self)
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_11microsecond_microsecond(PyDateTime_DateTime *__pyx_v_self) {
  int __pyx_r;

  /* "cpython/datetime.pxd":109
 *         @property
 *         cdef inline int microsecond(self) noexcept:
 *             return PyDateTime_DATE_GET_MICROSECOND(self)             # <<<<<<<<<<<<<<
 * 
 *         @property
*/
  __pyx_r = PyDateTime_DATE_GET_MICROSECOND(((PyObject *)__pyx_v_self));
  goto __pyx_L0;

  /* "cpython/datetime.pxd":107
 *             return PyDateTime_DATE_GET_SECOND(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int microsecond(self) noexcept:
 *             return PyDateTime_DATE_GET_MICROSECOND(self)
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "cpython/datetime.pxd":111
 *             return PyDateTime_DATE_GET_MICROSECOND(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline object tzinfo(self):
 *             return <object>PyDateTime_DATE_GET_TZINFO(self)
*/

static CYTHON_INLINE PyObject *__pyx_f_7cpython_8datetime_8datetime_6tzinfo_tzinfo(PyDateTime_DateTime *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1;
  __Pyx_RefNannySetupContext("tzinfo", 0);

  /* "cpython/datetime.pxd":113
 *         @property
 *         cdef inline object tzinfo(self):
 *             return <object>PyDateTime_DATE_GET_TZINFO(self)             # <<<<<<<<<<<<<<
 * 
 *         @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyDateTime_DATE_GET_TZINFO(((PyObject *)__pyx_v_self));
  __Pyx_INCREF(((PyObject *)__pyx_t_1));
  __pyx_r = ((PyObject *)__pyx_t_1);
  goto __pyx_L0;

  /* "cpython/datetime.pxd":111
 *             return PyDateTime_DATE_GET_MICROSECOND(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline object tzinfo(self):
 *             return <object>PyDateTime_DATE_GET_TZINFO(self)
*/

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

/* "cpython/datetime.pxd":115
 *             return <object>PyDateTime_DATE_GET_TZINFO(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int fold(self) noexcept:
 *             # For Python < 3.6 this returns 0 no matter what
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_4fold_fold(PyDateTime_DateTime *__pyx_v_self) {
  int __pyx_r;

  /* "cpython/datetime.pxd":118
 *         cdef inline int fold(self) noexcept:
 *             # For Python < 3.6 this returns 0 no matter what
 *             return PyDateTime_DATE_GET_FOLD(self)             # <<<<<<<<<<<<<<
 * 
 *     ctypedef extern class datetime.timedelta[object PyDateTime_Delta]:
*/
  __pyx_r = PyDateTime_DATE_GET_FOLD(((PyObject *)__pyx_v_self));
  goto __pyx_L0;

  /* "cpython/datetime.pxd":115
 *             return <object>PyDateTime_DATE_GET_TZINFO(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int fold(self) noexcept:
 *             # For Python < 3.6 this returns 0 no matter what
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "cpython/datetime.pxd":121
 * 
 *     ctypedef extern class datetime.timedelta[object PyDateTime_Delta]:
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int day(self) noexcept:
 *             return PyDateTime_DELTA_GET_DAYS(self)
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_9timedelta_3day_day(PyDateTime_Delta *__pyx_v_self) {
  int __pyx_r;

  /* "cpython/datetime.pxd":123
 *         @property
 *         cdef inline int day(self) noexcept:
 *             return PyDateTime_DELTA_GET_DAYS(self)             # <<<<<<<<<<<<<<
 * 
 *         @property
*/
  __pyx_r = PyDateTime_DELTA_GET_DAYS(((PyObject *)__pyx_v_self));
  goto __pyx_L0;

  /* "cpython/datetime.pxd":121
 * 
 *     ctypedef extern class datetime.timedelta[object PyDateTime_Delta]:
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int day(self) noexcept:
 *             return PyDateTime_DELTA_GET_DAYS(self)
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "cpython/datetime.pxd":125
 *             return PyDateTime_DELTA_GET_DAYS(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int second(self) noexcept:
 *             return PyDateTime_DELTA_GET_SECONDS(self)
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_9timedelta_6second_second(PyDateTime_Delta *__pyx_v_self) {
  int __pyx_r;

  /* "cpython/datetime.pxd":127
 *         @property
 *         cdef inline int second(self) noexcept:
 *             return PyDateTime_DELTA_GET_SECONDS(self)             # <<<<<<<<<<<<<<
 * 
 *         @property
*/
  __pyx_r = PyDateTime_DELTA_GET_SECONDS(((PyObject *)__pyx_v_self));
  goto __pyx_L0;

  /* "cpython/datetime.pxd":125
 *             return PyDateTime_DELTA_GET_DAYS(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int second(self) noexcept:
 *             return PyDateTime_DELTA_GET_SECONDS(self)
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "cpython/datetime.pxd":129
 *             return PyDateTime_DELTA_GET_SECONDS(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int microsecond(self) noexcept:
 *             return PyDateTime_DELTA_GET_MICROSECONDS(self)
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_9timedelta_11microsecond_microsecond(PyDateTime_Delta *__pyx_v_self) {
  int __pyx_r;

  /* "cpython/datetime.pxd":131
 *         @property
 *         cdef inline int microsecond(self) noexcept:
 *             return PyDateTime_DELTA_GET_MICROSECONDS(self)             # <<<<<<<<<<<<<<
 * 
 *     ctypedef extern class datetime.tzinfo[object PyDateTime_TZInfo]:
*/
  __pyx_r = PyDateTime_DELTA_GET_MICROSECONDS(((PyObject *)__pyx_v_self));
  goto __pyx_L0;

  /* "cpython/datetime.pxd":129
 *             return PyDateTime_DELTA_GET_SECONDS(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int microsecond(self) noexcept:
 *             return PyDateTime_DELTA_GET_MICROSECONDS(self)
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "cpython/datetime.pxd":255
 * # Datetime C API initialization function.
 * # You have to call it before any usage of DateTime CAPI functions.
 * cdef inline void import_datetime() noexcept:             # <<<<<<<<<<<<<<
 *     PyDateTime_IMPORT
 * 
*/

static CYTHON_INLINE void __pyx_f_7cpython_8datetime_import_datetime(void) {

  /* "cpython/datetime.pxd":256
 * # You have to call it before any usage of DateTime CAPI functions.
 * cdef inline void import_datetime() noexcept:
 *     PyDateTime_IMPORT             # <<<<<<<<<<<<<<
 * 
 * # Create date object using DateTime CAPI factory function.
*/
  (void)(PyDateTime_IMPORT);

  /* "cpython/datetime.pxd":255
 * # Datetime C API initialization function.
 * # You have to call it before any usage of DateTime CAPI functions.
 * cdef inline void import_datetime() noexcept:             # <<<<<<<<<<<<<<
 *     PyDateTime_IMPORT
 * 
*/

  /* function exit code */
}

/* "cpython/datetime.pxd":260
 * # Create date object using DateTime CAPI factory function.
 * # Note, there are no range checks for any of the arguments.
 * cdef inline date date_new(int year, int month, int day):             # <<<<<<<<<<<<<<
 *     return PyDateTimeAPI.Date_FromDate(year, month, day, PyDateTimeAPI.DateType)
 * 
*/

static CYTHON_INLINE PyDateTime_Date *__pyx_f_7cpython_8datetime_date_new(int __pyx_v_year, int __pyx_v_month, int __pyx_v_day) {
  PyDateTime_Date *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("date_new", 0);

  /* "cpython/datetime.pxd":261
 * # Note, there are no range checks for any of the arguments.
 * cdef inline date date_new(int year, int month, int day):
 *     return PyDateTimeAPI.Date_FromDate(year, month, day, PyDateTimeAPI.DateType)             # <<<<<<<<<<<<<<
 * 
 * # Create time object using DateTime CAPI factory function
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_1 = ((PyObject *)PyDateTimeAPI->Date_FromDate(__pyx_v_year, __pyx_v_month, __pyx_v_day, PyDateTimeAPI->DateType)); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 261, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((PyDateTime_Date *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cpython/datetime.pxd":260
 * # Create date object using DateTime CAPI factory function.
 * # Note, there are no range checks for any of the arguments.
 * cdef inline date date_new(int year, int month, int day):             # <<<<<<<<<<<<<<
 *     return PyDateTimeAPI.Date_FromDate(year, month, day, PyDateTimeAPI.DateType)
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cpython.datetime.date_new", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cpython/datetime.pxd":265
 * # Create time object using DateTime CAPI factory function
 * # Note, there are no range checks for any of the arguments.
 * cdef inline time time_new(int hour, int minute, int second, int microsecond, object tz, int fold=0):             # <<<<<<<<<<<<<<
 *     return __Pyx_DateTime_TimeWithFold(hour, minute, second, microsecond, tz, fold)
 * 
*/

static CYTHON_INLINE PyDateTime_Time *__pyx_f_7cpython_8datetime_time_new(int __pyx_v_hour, int __pyx_v_minute, int __pyx_v_second, int __pyx_v_microsecond, PyObject *__pyx_v_tz, struct __pyx_opt_args_7cpython_8datetime_time_new *__pyx_optional_args) {
  int __pyx_v_fold = ((int)0);
  PyDateTime_Time *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("time_new", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_fold = __pyx_optional_args->fold;
    }
  }

  /* "cpython/datetime.pxd":266
 * # Note, there are no range checks for any of the arguments.
 * cdef inline time time_new(int hour, int minute, int second, int microsecond, object tz, int fold=0):
 *     return __Pyx_DateTime_TimeWithFold(hour, minute, second, microsecond, tz, fold)             # <<<<<<<<<<<<<<
 * 
 * # Create datetime object using DateTime CAPI factory function.
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_1 = ((PyObject *)__Pyx_DateTime_TimeWithFold(__pyx_v_hour, __pyx_v_minute, __pyx_v_second, __pyx_v_microsecond, __pyx_v_tz, __pyx_v_fold)); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 266, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_time))))) __PYX_ERR(9, 266, __pyx_L1_error)
  __pyx_r = ((PyDateTime_Time *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cpython/datetime.pxd":265
 * # Create time object using DateTime CAPI factory function
 * # Note, there are no range checks for any of the arguments.
 * cdef inline time time_new(int hour, int minute, int second, int microsecond, object tz, int fold=0):             # <<<<<<<<<<<<<<
 *     return __Pyx_DateTime_TimeWithFold(hour, minute, second, microsecond, tz, fold)
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cpython.datetime.time_new", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cpython/datetime.pxd":270
 * # Create datetime object using DateTime CAPI factory function.
 * # Note, there are no range checks for any of the arguments.
 * cdef inline datetime datetime_new(int year, int month, int day, int hour, int minute, int second, int microsecond, object tz, int fold=0):             # <<<<<<<<<<<<<<
 *     return __Pyx_DateTime_DateTimeWithFold(year, month, day, hour, minute, second, microsecond, tz, fold)
 * 
*/

static CYTHON_INLINE PyDateTime_DateTime *__pyx_f_7cpython_8datetime_datetime_new(int __pyx_v_year, int __pyx_v_month, int __pyx_v_day, int __pyx_v_hour, int __pyx_v_minute, int __pyx_v_second, int __pyx_v_microsecond, PyObject *__pyx_v_tz, struct __pyx_opt_args_7cpython_8datetime_datetime_new *__pyx_optional_args) {
  int __pyx_v_fold = ((int)0);
  PyDateTime_DateTime *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("datetime_new", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_fold = __pyx_optional_args->fold;
    }
  }

  /* "cpython/datetime.pxd":271
 * # Note, there are no range checks for any of the arguments.
 * cdef inline datetime datetime_new(int year, int month, int day, int hour, int minute, int second, int microsecond, object tz, int fold=0):
 *     return __Pyx_DateTime_DateTimeWithFold(year, month, day, hour, minute, second, microsecond, tz, fold)             # <<<<<<<<<<<<<<
 * 
 * # Create timedelta object using DateTime CAPI factory function.
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_1 = ((PyObject *)__Pyx_DateTime_DateTimeWithFold(__pyx_v_year, __pyx_v_month, __pyx_v_day, __pyx_v_hour, __pyx_v_minute, __pyx_v_second, __pyx_v_microsecond, __pyx_v_tz, __pyx_v_fold)); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 271, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((PyDateTime_DateTime *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cpython/datetime.pxd":270
 * # Create datetime object using DateTime CAPI factory function.
 * # Note, there are no range checks for any of the arguments.
 * cdef inline datetime datetime_new(int year, int month, int day, int hour, int minute, int second, int microsecond, object tz, int fold=0):             # <<<<<<<<<<<<<<
 *     return __Pyx_DateTime_DateTimeWithFold(year, month, day, hour, minute, second, microsecond, tz, fold)
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cpython.datetime.datetime_new", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cpython/datetime.pxd":275
 * # Create timedelta object using DateTime CAPI factory function.
 * # Note, there are no range checks for any of the arguments.
 * cdef inline timedelta timedelta_new(int days, int seconds, int useconds):             # <<<<<<<<<<<<<<
 *     return PyDateTimeAPI.Delta_FromDelta(days, seconds, useconds, 1, PyDateTimeAPI.DeltaType)
 * 
*/

static CYTHON_INLINE PyDateTime_Delta *__pyx_f_7cpython_8datetime_timedelta_new(int __pyx_v_days, int __pyx_v_seconds, int __pyx_v_useconds) {
  PyDateTime_Delta *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("timedelta_new", 0);

  /* "cpython/datetime.pxd":276
 * # Note, there are no range checks for any of the arguments.
 * cdef inline timedelta timedelta_new(int days, int seconds, int useconds):
 *     return PyDateTimeAPI.Delta_FromDelta(days, seconds, useconds, 1, PyDateTimeAPI.DeltaType)             # <<<<<<<<<<<<<<
 * 
 * # Create timedelta object using DateTime CAPI factory function.
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_1 = ((PyObject *)PyDateTimeAPI->Delta_FromDelta(__pyx_v_days, __pyx_v_seconds, __pyx_v_useconds, 1, PyDateTimeAPI->DeltaType)); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 276, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((PyDateTime_Delta *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cpython/datetime.pxd":275
 * # Create timedelta object using DateTime CAPI factory function.
 * # Note, there are no range checks for any of the arguments.
 * cdef inline timedelta timedelta_new(int days, int seconds, int useconds):             # <<<<<<<<<<<<<<
 *     return PyDateTimeAPI.Delta_FromDelta(days, seconds, useconds, 1, PyDateTimeAPI.DeltaType)
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cpython.datetime.timedelta_new", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cpython/datetime.pxd":279
 * 
 * # Create timedelta object using DateTime CAPI factory function.
 * cdef inline object timezone_new(object offset, object name=None):             # <<<<<<<<<<<<<<
 *     return __Pyx_TimeZone_FromOffsetAndName(offset, <PyObject*>name if name is not None else NULL)
 * 
*/

static CYTHON_INLINE PyObject *__pyx_f_7cpython_8datetime_timezone_new(PyObject *__pyx_v_offset, struct __pyx_opt_args_7cpython_8datetime_timezone_new *__pyx_optional_args) {
  PyObject *__pyx_v_name = ((PyObject *)Py_None);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("timezone_new", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_name = __pyx_optional_args->name;
    }
  }

  /* "cpython/datetime.pxd":280
 * # Create timedelta object using DateTime CAPI factory function.
 * cdef inline object timezone_new(object offset, object name=None):
 *     return __Pyx_TimeZone_FromOffsetAndName(offset, <PyObject*>name if name is not None else NULL)             # <<<<<<<<<<<<<<
 * 
 * # Create datetime object using DB API constructor.
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = (__pyx_v_name != Py_None);
  if (__pyx_t_2) {
    __pyx_t_1 = ((PyObject *)__pyx_v_name);
  } else {
    __pyx_t_1 = NULL;
  }
  __pyx_t_3 = __Pyx_TimeZone_FromOffsetAndName(__pyx_v_offset, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 280, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cpython/datetime.pxd":279
 * 
 * # Create timedelta object using DateTime CAPI factory function.
 * cdef inline object timezone_new(object offset, object name=None):             # <<<<<<<<<<<<<<
 *     return __Pyx_TimeZone_FromOffsetAndName(offset, <PyObject*>name if name is not None else NULL)
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cpython.datetime.timezone_new", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cpython/datetime.pxd":283
 * 
 * # Create datetime object using DB API constructor.
 * cdef inline datetime datetime_from_timestamp(timestamp, tz=None):             # <<<<<<<<<<<<<<
 *     return PyDateTimeAPI.DateTime_FromTimestamp(
 *         <PyObject*>PyDateTimeAPI.DateTimeType, (timestamp, tz) if tz is not None else (timestamp,), NULL)
*/

static CYTHON_INLINE PyDateTime_DateTime *__pyx_f_7cpython_8datetime_datetime_from_timestamp(PyObject *__pyx_v_timestamp, struct __pyx_opt_args_7cpython_8datetime_datetime_from_timestamp *__pyx_optional_args) {
  PyObject *__pyx_v_tz = ((PyObject *)Py_None);
  PyDateTime_DateTime *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("datetime_from_timestamp", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_tz = __pyx_optional_args->tz;
    }
  }

  /* "cpython/datetime.pxd":284
 * # Create datetime object using DB API constructor.
 * cdef inline datetime datetime_from_timestamp(timestamp, tz=None):
 *     return PyDateTimeAPI.DateTime_FromTimestamp(             # <<<<<<<<<<<<<<
 *         <PyObject*>PyDateTimeAPI.DateTimeType, (timestamp, tz) if tz is not None else (timestamp,), NULL)
 * 
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);

  /* "cpython/datetime.pxd":285
 * cdef inline datetime datetime_from_timestamp(timestamp, tz=None):
 *     return PyDateTimeAPI.DateTime_FromTimestamp(
 *         <PyObject*>PyDateTimeAPI.DateTimeType, (timestamp, tz) if tz is not None else (timestamp,), NULL)             # <<<<<<<<<<<<<<
 * 
 * # Create date object using DB API constructor.
*/
  __pyx_t_2 = (__pyx_v_tz != Py_None);
  if (__pyx_t_2) {
    __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 285, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_timestamp);
    __Pyx_GIVEREF(__pyx_v_timestamp);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_timestamp) != (0)) __PYX_ERR(9, 285, __pyx_L1_error);
    __Pyx_INCREF(__pyx_v_tz);
    __Pyx_GIVEREF(__pyx_v_tz);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_tz) != (0)) __PYX_ERR(9, 285, __pyx_L1_error);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 285, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_timestamp);
    __Pyx_GIVEREF(__pyx_v_timestamp);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_timestamp) != (0)) __PYX_ERR(9, 285, __pyx_L1_error);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  }

  /* "cpython/datetime.pxd":284
 * # Create datetime object using DB API constructor.
 * cdef inline datetime datetime_from_timestamp(timestamp, tz=None):
 *     return PyDateTimeAPI.DateTime_FromTimestamp(             # <<<<<<<<<<<<<<
 *         <PyObject*>PyDateTimeAPI.DateTimeType, (timestamp, tz) if tz is not None else (timestamp,), NULL)
 * 
*/
  __pyx_t_3 = ((PyObject *)PyDateTimeAPI->DateTime_FromTimestamp(((PyObject *)PyDateTimeAPI->DateTimeType), __pyx_t_1, NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 284, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = ((PyDateTime_DateTime *)__pyx_t_3);
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cpython/datetime.pxd":283
 * 
 * # Create datetime object using DB API constructor.
 * cdef inline datetime datetime_from_timestamp(timestamp, tz=None):             # <<<<<<<<<<<<<<
 *     return PyDateTimeAPI.DateTime_FromTimestamp(
 *         <PyObject*>PyDateTimeAPI.DateTimeType, (timestamp, tz) if tz is not None else (timestamp,), NULL)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cpython.datetime.datetime_from_timestamp", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cpython/datetime.pxd":288
 * 
 * # Create date object using DB API constructor.
 * cdef inline date date_from_timestamp(timestamp):             # <<<<<<<<<<<<<<
 *     return PyDateTimeAPI.Date_FromTimestamp(<PyObject*>PyDateTimeAPI.DateType, (timestamp,))
 * 
*/

static CYTHON_INLINE PyDateTime_Date *__pyx_f_7cpython_8datetime_date_from_timestamp(PyObject *__pyx_v_timestamp) {
  PyDateTime_Date *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("date_from_timestamp", 0);

  /* "cpython/datetime.pxd":289
 * # Create date object using DB API constructor.
 * cdef inline date date_from_timestamp(timestamp):
 *     return PyDateTimeAPI.Date_FromTimestamp(<PyObject*>PyDateTimeAPI.DateType, (timestamp,))             # <<<<<<<<<<<<<<
 * 
 * # More recognizable getters for date/time/datetime/timedelta.
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 289, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_timestamp);
  __Pyx_GIVEREF(__pyx_v_timestamp);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_timestamp) != (0)) __PYX_ERR(9, 289, __pyx_L1_error);
  __pyx_t_2 = ((PyObject *)PyDateTimeAPI->Date_FromTimestamp(((PyObject *)PyDateTimeAPI->DateType), __pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 289, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = ((PyDateTime_Date *)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "cpython/datetime.pxd":288
 * 
 * # Create date object using DB API constructor.
 * cdef inline date date_from_timestamp(timestamp):             # <<<<<<<<<<<<<<
 *     return PyDateTimeAPI.Date_FromTimestamp(<PyObject*>PyDateTimeAPI.DateType, (timestamp,))
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cpython.datetime.date_from_timestamp", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cpython/datetime.pxd":297
 * 
 * # Get UTC singleton
 * cdef inline object get_utc():             # <<<<<<<<<<<<<<
 *     return <object>__Pyx_TimeZone_UTC
 * 
*/

static CYTHON_INLINE PyObject *__pyx_f_7cpython_8datetime_get_utc(void) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_utc", 0);

  /* "cpython/datetime.pxd":298
 * # Get UTC singleton
 * cdef inline object get_utc():
 *     return <object>__Pyx_TimeZone_UTC             # <<<<<<<<<<<<<<
 * 
 * # Get tzinfo of time
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__Pyx_TimeZone_UTC));
  __pyx_r = ((PyObject *)__Pyx_TimeZone_UTC);
  goto __pyx_L0;

  /* "cpython/datetime.pxd":297
 * 
 * # Get UTC singleton
 * cdef inline object get_utc():             # <<<<<<<<<<<<<<
 *     return <object>__Pyx_TimeZone_UTC
 * 
*/

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

/* "cpython/datetime.pxd":301
 * 
 * # Get tzinfo of time
 * cdef inline object time_tzinfo(object o):             # <<<<<<<<<<<<<<
 *     return <object>PyDateTime_TIME_GET_TZINFO(o)
 * 
*/

static CYTHON_INLINE PyObject *__pyx_f_7cpython_8datetime_time_tzinfo(PyObject *__pyx_v_o) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1;
  __Pyx_RefNannySetupContext("time_tzinfo", 0);

  /* "cpython/datetime.pxd":302
 * # Get tzinfo of time
 * cdef inline object time_tzinfo(object o):
 *     return <object>PyDateTime_TIME_GET_TZINFO(o)             # <<<<<<<<<<<<<<
 * 
 * # Get tzinfo of datetime
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyDateTime_TIME_GET_TZINFO(__pyx_v_o);
  __Pyx_INCREF(((PyObject *)__pyx_t_1));
  __pyx_r = ((PyObject *)__pyx_t_1);
  goto __pyx_L0;

  /* "cpython/datetime.pxd":301
 * 
 * # Get tzinfo of time
 * cdef inline object time_tzinfo(object o):             # <<<<<<<<<<<<<<
 *     return <object>PyDateTime_TIME_GET_TZINFO(o)
 * 
*/

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

/* "cpython/datetime.pxd":305
 * 
 * # Get tzinfo of datetime
 * cdef inline object datetime_tzinfo(object o):             # <<<<<<<<<<<<<<
 *     return <object>PyDateTime_DATE_GET_TZINFO(o)
 * 
*/

static CYTHON_INLINE PyObject *__pyx_f_7cpython_8datetime_datetime_tzinfo(PyObject *__pyx_v_o) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1;
  __Pyx_RefNannySetupContext("datetime_tzinfo", 0);

  /* "cpython/datetime.pxd":306
 * # Get tzinfo of datetime
 * cdef inline object datetime_tzinfo(object o):
 *     return <object>PyDateTime_DATE_GET_TZINFO(o)             # <<<<<<<<<<<<<<
 * 
 * # Get year of date
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyDateTime_DATE_GET_TZINFO(__pyx_v_o);
  __Pyx_INCREF(((PyObject *)__pyx_t_1));
  __pyx_r = ((PyObject *)__pyx_t_1);
  goto __pyx_L0;

  /* "cpython/datetime.pxd":305
 * 
 * # Get tzinfo of datetime
 * cdef inline object datetime_tzinfo(object o):             # <<<<<<<<<<<<<<
 *     return <object>PyDateTime_DATE_GET_TZINFO(o)
 * 
*/

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

/* "cpython/datetime.pxd":309
 * 
 * # Get year of date
 * cdef inline int date_year(object o) noexcept:             # <<<<<<<<<<<<<<
 *     return PyDateTime_GET_YEAR(o)
 * 
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_date_year(PyObject *__pyx_v_o) {
  int __pyx_r;

  /* "cpython/datetime.pxd":310
 * # Get year of date
 * cdef inline int date_year(object o) noexcept:
 *     return PyDateTime_GET_YEAR(o)             # <<<<<<<<<<<<<<
 * 
 * # Get month of date
*/
  __pyx_r = PyDateTime_GET_YEAR(__pyx_v_o);
  goto __pyx_L0;

  /* "cpython/datetime.pxd":309
 * 
 * # Get year of date
 * cdef inline int date_year(object o) noexcept:             # <<<<<<<<<<<<<<
 *     return PyDateTime_GET_YEAR(o)
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "cpython/datetime.pxd":313
 * 
 * # Get month of date
 * cdef inline int date_month(object o) noexcept:             # <<<<<<<<<<<<<<
 *     return PyDateTime_GET_MONTH(o)
 * 
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_date_month(PyObject *__pyx_v_o) {
  int __pyx_r;

  /* "cpython/datetime.pxd":314
 * # Get month of date
 * cdef inline int date_month(object o) noexcept:
 *     return PyDateTime_GET_MONTH(o)             # <<<<<<<<<<<<<<
 * 
 * # Get day of date
*/
  __pyx_r = PyDateTime_GET_MONTH(__pyx_v_o);
  goto __pyx_L0;

  /* "cpython/datetime.pxd":313
 * 
 * # Get month of date
 * cdef inline int date_month(object o) noexcept:             # <<<<<<<<<<<<<<
 *     return PyDateTime_GET_MONTH(o)
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "cpython/datetime.pxd":317
 * 
 * # Get day of date
 * cdef inline int date_day(object o) noexcept:             # <<<<<<<<<<<<<<
 *     return PyDateTime_GET_DAY(o)
 * 
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_date_day(PyObject *__pyx_v_o) {
  int __pyx_r;

  /* "cpython/datetime.pxd":318
 * # Get day of date
 * cdef inline int date_day(object o) noexcept:
 *     return PyDateTime_GET_DAY(o)             # <<<<<<<<<<<<<<
 * 
 * # Get year of datetime
*/
  __pyx_r = PyDateTime_GET_DAY(__pyx_v_o);
  goto __pyx_L0;

  /* "cpython/datetime.pxd":317
 * 
 * # Get day of date
 * cdef inline int date_day(object o) noexcept:             # <<<<<<<<<<<<<<
 *     return PyDateTime_GET_DAY(o)
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "cpython/datetime.pxd":321
 * 
 * # Get year of datetime
 * cdef inline int datetime_year(object o) noexcept:             # <<<<<<<<<<<<<<
 *     return PyDateTime_GET_YEAR(o)
 * 
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_datetime_year(PyObject *__pyx_v_o) {
  int __pyx_r;

  /* "cpython/datetime.pxd":322
 * # Get year of datetime
 * cdef inline int datetime_year(object o) noexcept:
 *     return PyDateTime_GET_YEAR(o)             # <<<<<<<<<<<<<<
 * 
 * # Get month of datetime
*/
  __pyx_r = PyDateTime_GET_YEAR(__pyx_v_o);
  goto __pyx_L0;

  /* "cpython/datetime.pxd":321
 * 
 * # Get year of datetime
 * cdef inline int datetime_year(object o) noexcept:             # <<<<<<<<<<<<<<
 *     return PyDateTime_GET_YEAR(o)
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "cpython/datetime.pxd":325
 * 
 * # Get month of datetime
 * cdef inline int datetime_month(object o) noexcept:             # <<<<<<<<<<<<<<
 *     return PyDateTime_GET_MONTH(o)
 * 
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_datetime_month(PyObject *__pyx_v_o) {
  int __pyx_r;

  /* "cpython/datetime.pxd":326
 * # Get month of datetime
 * cdef inline int datetime_month(object o) noexcept:
 *     return PyDateTime_GET_MONTH(o)             # <<<<<<<<<<<<<<
 * 
 * # Get day of datetime
*/
  __pyx_r = PyDateTime_GET_MONTH(__pyx_v_o);
  goto __pyx_L0;

  /* "cpython/datetime.pxd":325
 * 
 * # Get month of datetime
 * cdef inline int datetime_month(object o) noexcept:             # <<<<<<<<<<<<<<
 *     return PyDateTime_GET_MONTH(o)
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "cpython/datetime.pxd":329
 * 
 * # Get day of datetime
 * cdef inline int datetime_day(object o) noexcept:             # <<<<<<<<<<<<<<
 *     return PyDateTime_GET_DAY(o)
 * 
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_datetime_day(PyObject *__pyx_v_o) {
  int __pyx_r;

  /* "cpython/datetime.pxd":330
 * # Get day of datetime
 * cdef inline int datetime_day(object o) noexcept:
 *     return PyDateTime_GET_DAY(o)             # <<<<<<<<<<<<<<
 * 
 * # Get hour of time
*/
  __pyx_r = PyDateTime_GET_DAY(__pyx_v_o);
  goto __pyx_L0;

  /* "cpython/datetime.pxd":329
 * 
 * # Get day of datetime
 * cdef inline int datetime_day(object o) noexcept:             # <<<<<<<<<<<<<<
 *     return PyDateTime_GET_DAY(o)
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "cpython/datetime.pxd":333
 * 
 * # Get hour of time
 * cdef inline int time_hour(object o) noexcept:             # <<<<<<<<<<<<<<
 *     return PyDateTime_TIME_GET_HOUR(o)
 * 
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_time_hour(PyObject *__pyx_v_o) {
  int __pyx_r;

  /* "cpython/datetime.pxd":334
 * # Get hour of time
 * cdef inline int time_hour(object o) noexcept:
 *     return PyDateTime_TIME_GET_HOUR(o)             # <<<<<<<<<<<<<<
 * 
 * # Get minute of time
*/
  __pyx_r = PyDateTime_TIME_GET_HOUR(__pyx_v_o);
  goto __pyx_L0;

  /* "cpython/datetime.pxd":333
 * 
 * # Get hour of time
 * cdef inline int time_hour(object o) noexcept:             # <<<<<<<<<<<<<<
 *     return PyDateTime_TIME_GET_HOUR(o)
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "cpython/datetime.pxd":337
 * 
 * # Get minute of time
 * cdef inline int time_minute(object o) noexcept:             # <<<<<<<<<<<<<<
 *     return PyDateTime_TIME_GET_MINUTE(o)
 * 
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_time_minute(PyObject *__pyx_v_o) {
  int __pyx_r;

  /* "cpython/datetime.pxd":338
 * # Get minute of time
 * cdef inline int time_minute(object o) noexcept:
 *     return PyDateTime_TIME_GET_MINUTE(o)             # <<<<<<<<<<<<<<
 * 
 * # Get second of time
*/
  __pyx_r = PyDateTime_TIME_GET_MINUTE(__pyx_v_o);
  goto __pyx_L0;

  /* "cpython/datetime.pxd":337
 * 
 * # Get minute of time
 * cdef inline int time_minute(object o) noexcept:             # <<<<<<<<<<<<<<
 *     return PyDateTime_TIME_GET_MINUTE(o)
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "cpython/datetime.pxd":341
 * 
 * # Get second of time
 * cdef inline int time_second(object o) noexcept:             # <<<<<<<<<<<<<<
 *     return PyDateTime_TIME_GET_SECOND(o)
 * 
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_time_second(PyObject *__pyx_v_o) {
  int __pyx_r;

  /* "cpython/datetime.pxd":342
 * # Get second of time
 * cdef inline int time_second(object o) noexcept:
 *     return PyDateTime_TIME_GET_SECOND(o)             # <<<<<<<<<<<<<<
 * 
 * # Get microsecond of time
*/
  __pyx_r = PyDateTime_TIME_GET_SECOND(__pyx_v_o);
  goto __pyx_L0;

  /* "cpython/datetime.pxd":341
 * 
 * # Get second of time
 * cdef inline int time_second(object o) noexcept:             # <<<<<<<<<<<<<<
 *     return PyDateTime_TIME_GET_SECOND(o)
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "cpython/datetime.pxd":345
 * 
 * # Get microsecond of time
 * cdef inline int time_microsecond(object o) noexcept:             # <<<<<<<<<<<<<<
 *     return PyDateTime_TIME_GET_MICROSECOND(o)
 * 
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_time_microsecond(PyObject *__pyx_v_o) {
  int __pyx_r;

  /* "cpython/datetime.pxd":346
 * # Get microsecond of time
 * cdef inline int time_microsecond(object o) noexcept:
 *     return PyDateTime_TIME_GET_MICROSECOND(o)             # <<<<<<<<<<<<<<
 * 
 * # Get fold of time
*/
  __pyx_r = PyDateTime_TIME_GET_MICROSECOND(__pyx_v_o);
  goto __pyx_L0;

  /* "cpython/datetime.pxd":345
 * 
 * # Get microsecond of time
 * cdef inline int time_microsecond(object o) noexcept:             # <<<<<<<<<<<<<<
 *     return PyDateTime_TIME_GET_MICROSECOND(o)
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "cpython/datetime.pxd":349
 * 
 * # Get fold of time
 * cdef inline int time_fold(object o) noexcept:             # <<<<<<<<<<<<<<
 *     # For Python < 3.6 this returns 0 no matter what
 *     return PyDateTime_TIME_GET_FOLD(o)
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_time_fold(PyObject *__pyx_v_o) {
  int __pyx_r;

  /* "cpython/datetime.pxd":351
 * cdef inline int time_fold(object o) noexcept:
 *     # For Python < 3.6 this returns 0 no matter what
 *     return PyDateTime_TIME_GET_FOLD(o)             # <<<<<<<<<<<<<<
 * 
 * # Get hour of datetime
*/
  __pyx_r = PyDateTime_TIME_GET_FOLD(__pyx_v_o);
  goto __pyx_L0;

  /* "cpython/datetime.pxd":349
 * 
 * # Get fold of time
 * cdef inline int time_fold(object o) noexcept:             # <<<<<<<<<<<<<<
 *     # For Python < 3.6 this returns 0 no matter what
 *     return PyDateTime_TIME_GET_FOLD(o)
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "cpython/datetime.pxd":354
 * 
 * # Get hour of datetime
 * cdef inline int datetime_hour(object o) noexcept:             # <<<<<<<<<<<<<<
 *     return PyDateTime_DATE_GET_HOUR(o)
 * 
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_datetime_hour(PyObject *__pyx_v_o) {
  int __pyx_r;

  /* "cpython/datetime.pxd":355
 * # Get hour of datetime
 * cdef inline int datetime_hour(object o) noexcept:
 *     return PyDateTime_DATE_GET_HOUR(o)             # <<<<<<<<<<<<<<
 * 
 * # Get minute of datetime
*/
  __pyx_r = PyDateTime_DATE_GET_HOUR(__pyx_v_o);
  goto __pyx_L0;

  /* "cpython/datetime.pxd":354
 * 
 * # Get hour of datetime
 * cdef inline int datetime_hour(object o) noexcept:             # <<<<<<<<<<<<<<
 *     return PyDateTime_DATE_GET_HOUR(o)
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "cpython/datetime.pxd":358
 * 
 * # Get minute of datetime
 * cdef inline int datetime_minute(object o) noexcept:             # <<<<<<<<<<<<<<
 *     return PyDateTime_DATE_GET_MINUTE(o)
 * 
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_datetime_minute(PyObject *__pyx_v_o) {
  int __pyx_r;

  /* "cpython/datetime.pxd":359
 * # Get minute of datetime
 * cdef inline int datetime_minute(object o) noexcept:
 *     return PyDateTime_DATE_GET_MINUTE(o)             # <<<<<<<<<<<<<<
 * 
 * # Get second of datetime
*/
  __pyx_r = PyDateTime_DATE_GET_MINUTE(__pyx_v_o);
  goto __pyx_L0;

  /* "cpython/datetime.pxd":358
 * 
 * # Get minute of datetime
 * cdef inline int datetime_minute(object o) noexcept:             # <<<<<<<<<<<<<<
 *     return PyDateTime_DATE_GET_MINUTE(o)
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "cpython/datetime.pxd":362
 * 
 * # Get second of datetime
 * cdef inline int datetime_second(object o) noexcept:             # <<<<<<<<<<<<<<
 *     return PyDateTime_DATE_GET_SECOND(o)
 * 
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_datetime_second(PyObject *__pyx_v_o) {
  int __pyx_r;

  /* "cpython/datetime.pxd":363
 * # Get second of datetime
 * cdef inline int datetime_second(object o) noexcept:
 *     return PyDateTime_DATE_GET_SECOND(o)             # <<<<<<<<<<<<<<
 * 
 * # Get microsecond of datetime
*/
  __pyx_r = PyDateTime_DATE_GET_SECOND(__pyx_v_o);
  goto __pyx_L0;

  /* "cpython/datetime.pxd":362
 * 
 * # Get second of datetime
 * cdef inline int datetime_second(object o) noexcept:             # <<<<<<<<<<<<<<
 *     return PyDateTime_DATE_GET_SECOND(o)
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "cpython/datetime.pxd":366
 * 
 * # Get microsecond of datetime
 * cdef inline int datetime_microsecond(object o) noexcept:             # <<<<<<<<<<<<<<
 *     return PyDateTime_DATE_GET_MICROSECOND(o)
 * 
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_datetime_microsecond(PyObject *__pyx_v_o) {
  int __pyx_r;

  /* "cpython/datetime.pxd":367
 * # Get microsecond of datetime
 * cdef inline int datetime_microsecond(object o) noexcept:
 *     return PyDateTime_DATE_GET_MICROSECOND(o)             # <<<<<<<<<<<<<<
 * 
 * # Get fold of datetime
*/
  __pyx_r = PyDateTime_DATE_GET_MICROSECOND(__pyx_v_o);
  goto __pyx_L0;

  /* "cpython/datetime.pxd":366
 * 
 * # Get microsecond of datetime
 * cdef inline int datetime_microsecond(object o) noexcept:             # <<<<<<<<<<<<<<
 *     return PyDateTime_DATE_GET_MICROSECOND(o)
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "cpython/datetime.pxd":370
 * 
 * # Get fold of datetime
 * cdef inline int datetime_fold(object o) noexcept:             # <<<<<<<<<<<<<<
 *     # For Python < 3.6 this returns 0 no matter what
 *     return PyDateTime_DATE_GET_FOLD(o)
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_datetime_fold(PyObject *__pyx_v_o) {
  int __pyx_r;

  /* "cpython/datetime.pxd":372
 * cdef inline int datetime_fold(object o) noexcept:
 *     # For Python < 3.6 this returns 0 no matter what
 *     return PyDateTime_DATE_GET_FOLD(o)             # <<<<<<<<<<<<<<
 * 
 * # Get days of timedelta
*/
  __pyx_r = PyDateTime_DATE_GET_FOLD(__pyx_v_o);
  goto __pyx_L0;

  /* "cpython/datetime.pxd":370
 * 
 * # Get fold of datetime
 * cdef inline int datetime_fold(object o) noexcept:             # <<<<<<<<<<<<<<
 *     # For Python < 3.6 this returns 0 no matter what
 *     return PyDateTime_DATE_GET_FOLD(o)
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "cpython/datetime.pxd":375
 * 
 * # Get days of timedelta
 * cdef inline int timedelta_days(object o) noexcept:             # <<<<<<<<<<<<<<
 *     return PyDateTime_DELTA_GET_DAYS(o)
 * 
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_timedelta_days(PyObject *__pyx_v_o) {
  int __pyx_r;

  /* "cpython/datetime.pxd":376
 * # Get days of timedelta
 * cdef inline int timedelta_days(object o) noexcept:
 *     return PyDateTime_DELTA_GET_DAYS(o)             # <<<<<<<<<<<<<<
 * 
 * # Get seconds of timedelta
*/
  __pyx_r = PyDateTime_DELTA_GET_DAYS(__pyx_v_o);
  goto __pyx_L0;

  /* "cpython/datetime.pxd":375
 * 
 * # Get days of timedelta
 * cdef inline int timedelta_days(object o) noexcept:             # <<<<<<<<<<<<<<
 *     return PyDateTime_DELTA_GET_DAYS(o)
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "cpython/datetime.pxd":379
 * 
 * # Get seconds of timedelta
 * cdef inline int timedelta_seconds(object o) noexcept:             # <<<<<<<<<<<<<<
 *     return PyDateTime_DELTA_GET_SECONDS(o)
 * 
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_timedelta_seconds(PyObject *__pyx_v_o) {
  int __pyx_r;

  /* "cpython/datetime.pxd":380
 * # Get seconds of timedelta
 * cdef inline int timedelta_seconds(object o) noexcept:
 *     return PyDateTime_DELTA_GET_SECONDS(o)             # <<<<<<<<<<<<<<
 * 
 * # Get microseconds of timedelta
*/
  __pyx_r = PyDateTime_DELTA_GET_SECONDS(__pyx_v_o);
  goto __pyx_L0;

  /* "cpython/datetime.pxd":379
 * 
 * # Get seconds of timedelta
 * cdef inline int timedelta_seconds(object o) noexcept:             # <<<<<<<<<<<<<<
 *     return PyDateTime_DELTA_GET_SECONDS(o)
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "cpython/datetime.pxd":383
 * 
 * # Get microseconds of timedelta
 * cdef inline int timedelta_microseconds(object o) noexcept:             # <<<<<<<<<<<<<<
 *     return PyDateTime_DELTA_GET_MICROSECONDS(o)
 * 
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_timedelta_microseconds(PyObject *__pyx_v_o) {
  int __pyx_r;

  /* "cpython/datetime.pxd":384
 * # Get microseconds of timedelta
 * cdef inline int timedelta_microseconds(object o) noexcept:
 *     return PyDateTime_DELTA_GET_MICROSECONDS(o)             # <<<<<<<<<<<<<<
 * 
 * cdef inline double total_seconds(timedelta obj) noexcept:
*/
  __pyx_r = PyDateTime_DELTA_GET_MICROSECONDS(__pyx_v_o);
  goto __pyx_L0;

  /* "cpython/datetime.pxd":383
 * 
 * # Get microseconds of timedelta
 * cdef inline int timedelta_microseconds(object o) noexcept:             # <<<<<<<<<<<<<<
 *     return PyDateTime_DELTA_GET_MICROSECONDS(o)
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "cpython/datetime.pxd":386
 *     return PyDateTime_DELTA_GET_MICROSECONDS(o)
 * 
 * cdef inline double total_seconds(timedelta obj) noexcept:             # <<<<<<<<<<<<<<
 *     # Mirrors the "timedelta.total_seconds()" method.
 *     # Note that this implementation is not guaranteed to give *exactly* the same
*/

static CYTHON_INLINE double __pyx_f_7cpython_8datetime_total_seconds(PyDateTime_Delta *__pyx_v_obj) {
  double __pyx_v_days;
  double __pyx_v_seconds;
  double __pyx_v_micros;
  double __pyx_r;

  /* "cpython/datetime.pxd":392
 *     cdef:
 *         double days, seconds, micros
 *     days = <double>PyDateTime_DELTA_GET_DAYS(obj)             # <<<<<<<<<<<<<<
 *     seconds = <double>PyDateTime_DELTA_GET_SECONDS(obj)
 *     micros = <double>PyDateTime_DELTA_GET_MICROSECONDS(obj)
*/
  __pyx_v_days = ((double)PyDateTime_DELTA_GET_DAYS(((PyObject *)__pyx_v_obj)));

  /* "cpython/datetime.pxd":393
 *         double days, seconds, micros
 *     days = <double>PyDateTime_DELTA_GET_DAYS(obj)
 *     seconds = <double>PyDateTime_DELTA_GET_SECONDS(obj)             # <<<<<<<<<<<<<<
 *     micros = <double>PyDateTime_DELTA_GET_MICROSECONDS(obj)
 *     return days * 24 * 3600 + seconds + micros / 1_000_000
*/
  __pyx_v_seconds = ((double)PyDateTime_DELTA_GET_SECONDS(((PyObject *)__pyx_v_obj)));

  /* "cpython/datetime.pxd":394
 *     days = <double>PyDateTime_DELTA_GET_DAYS(obj)
 *     seconds = <double>PyDateTime_DELTA_GET_SECONDS(obj)
 *     micros = <double>PyDateTime_DELTA_GET_MICROSECONDS(obj)             # <<<<<<<<<<<<<<
 *     return days * 24 * 3600 + seconds + micros / 1_000_000
*/
  __pyx_v_micros = ((double)PyDateTime_DELTA_GET_MICROSECONDS(((PyObject *)__pyx_v_obj)));

  /* "cpython/datetime.pxd":395
 *     seconds = <double>PyDateTime_DELTA_GET_SECONDS(obj)
 *     micros = <double>PyDateTime_DELTA_GET_MICROSECONDS(obj)
 *     return days * 24 * 3600 + seconds + micros / 1_000_000             # <<<<<<<<<<<<<<
*/
  __pyx_r = ((((__pyx_v_days * 24.0) * 3600.0) + __pyx_v_seconds) + (__pyx_v_micros / 1000000.0));
  goto __pyx_L0;

  /* "cpython/datetime.pxd":386
 *     return PyDateTime_DELTA_GET_MICROSECONDS(o)
 * 
 * cdef inline double total_seconds(timedelta obj) noexcept:             # <<<<<<<<<<<<<<
 *     # Mirrors the "timedelta.total_seconds()" method.
 *     # Note that this implementation is not guaranteed to give *exactly* the same
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "pyarrow/includes/common.pxd":151
 * 
 * 
 * cdef inline object PyObject_to_object(PyObject* o):             # <<<<<<<<<<<<<<
 *     # Cast to "object" increments reference count
 *     cdef object result = <object> o
*/

static CYTHON_INLINE PyObject *__pyx_f_7pyarrow_8includes_6common_PyObject_to_object(PyObject *__pyx_v_o) {
  PyObject *__pyx_v_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("PyObject_to_object", 0);

  /* "pyarrow/includes/common.pxd":153
 * cdef inline object PyObject_to_object(PyObject* o):
 *     # Cast to "object" increments reference count
 *     cdef object result = <object> o             # <<<<<<<<<<<<<<
 *     cpython.Py_DECREF(result)
 *     return result
*/
  __pyx_t_1 = ((PyObject *)__pyx_v_o);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_result = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyarrow/includes/common.pxd":154
 *     # Cast to "object" increments reference count
 *     cdef object result = <object> o
 *     cpython.Py_DECREF(result)             # <<<<<<<<<<<<<<
 *     return result
*/
  Py_DECREF(__pyx_v_result);

  /* "pyarrow/includes/common.pxd":155
 *     cdef object result = <object> o
 *     cpython.Py_DECREF(result)
 *     return result             # <<<<<<<<<<<<<<
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "pyarrow/includes/common.pxd":151
 * 
 * 
 * cdef inline object PyObject_to_object(PyObject* o):             # <<<<<<<<<<<<<<
 *     # Cast to "object" increments reference count
 *     cdef object result = <object> o
*/

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

/* "pyarrow/lib.pyx":51
 * 
 * 
 * def cpu_count():             # <<<<<<<<<<<<<<
 *     """
 *     Return the number of threads to use in parallel operations.
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_1cpu_count(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_cpu_count, "cpu_count()\n\nReturn the number of threads to use in parallel operations.\n\nThe number of threads is determined at startup by inspecting the\n``OMP_NUM_THREADS`` and ``OMP_THREAD_LIMIT`` environment variables.\nIf neither is present, it will default to the number of hardware threads\non the system. It can be modified at runtime by calling\n:func:`set_cpu_count()`.\n\nSee Also\n--------\nset_cpu_count : Modify the size of this pool.\nio_thread_count : The analogous function for the I/O thread pool.");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_1cpu_count = {"cpu_count", (PyCFunction)__pyx_pw_7pyarrow_3lib_1cpu_count, METH_NOARGS, __pyx_doc_7pyarrow_3lib_cpu_count};
static PyObject *__pyx_pw_7pyarrow_3lib_1cpu_count(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cpu_count (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_cpu_count(__pyx_self);

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

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

  /* "pyarrow/lib.pyx":66
 *     io_thread_count : The analogous function for the I/O thread pool.
 *     """
 *     return GetCpuThreadPoolCapacity()             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_int(arrow::GetCpuThreadPoolCapacity()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 66, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/lib.pyx":51
 * 
 * 
 * def cpu_count():             # <<<<<<<<<<<<<<
 *     """
 *     Return the number of threads to use in parallel operations.
*/

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

/* "pyarrow/lib.pyx":69
 * 
 * 
 * def set_cpu_count(int count):             # <<<<<<<<<<<<<<
 *     """
 *     Set the number of threads to use in parallel operations.
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_3set_cpu_count(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_2set_cpu_count, "set_cpu_count(int count)\n\nSet the number of threads to use in parallel operations.\n\nParameters\n----------\ncount : int\n    The number of concurrent threads that should be used.\n\nSee Also\n--------\ncpu_count : Get the size of this pool.\nset_io_thread_count : The analogous function for the I/O thread pool.");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_3set_cpu_count = {"set_cpu_count", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_3set_cpu_count, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_2set_cpu_count};
static PyObject *__pyx_pw_7pyarrow_3lib_3set_cpu_count(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  int __pyx_v_count;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_cpu_count (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_count,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 69, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 69, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "set_cpu_count", 0) < (0)) __PYX_ERR(0, 69, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("set_cpu_count", 1, 1, 1, i); __PYX_ERR(0, 69, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 69, __pyx_L3_error)
    }
    __pyx_v_count = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_count == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 69, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("set_cpu_count", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 69, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("pyarrow.lib.set_cpu_count", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyarrow_3lib_2set_cpu_count(__pyx_self, __pyx_v_count);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7pyarrow_3lib_2set_cpu_count(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_count) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_cpu_count", 0);

  /* "pyarrow/lib.pyx":83
 *     set_io_thread_count : The analogous function for the I/O thread pool.
 *     """
 *     if count < 1:             # <<<<<<<<<<<<<<
 *         raise ValueError("CPU count must be strictly positive")
 *     check_status(SetCpuThreadPoolCapacity(count))
*/
  __pyx_t_1 = (__pyx_v_count < 1);
  if (unlikely(__pyx_t_1)) {

    /* "pyarrow/lib.pyx":84
 *     """
 *     if count < 1:
 *         raise ValueError("CPU count must be strictly positive")             # <<<<<<<<<<<<<<
 *     check_status(SetCpuThreadPoolCapacity(count))
 * 
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_CPU_count_must_be_strictly_posit};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 84, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 84, __pyx_L1_error)

    /* "pyarrow/lib.pyx":83
 *     set_io_thread_count : The analogous function for the I/O thread pool.
 *     """
 *     if count < 1:             # <<<<<<<<<<<<<<
 *         raise ValueError("CPU count must be strictly positive")
 *     check_status(SetCpuThreadPoolCapacity(count))
*/
  }

  /* "pyarrow/lib.pyx":85
 *     if count < 1:
 *         raise ValueError("CPU count must be strictly positive")
 *     check_status(SetCpuThreadPoolCapacity(count))             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_t_5 = __pyx_f_7pyarrow_3lib_check_status(arrow::SetCpuThreadPoolCapacity(__pyx_v_count)); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 85, __pyx_L1_error)

  /* "pyarrow/lib.pyx":69
 * 
 * 
 * def set_cpu_count(int count):             # <<<<<<<<<<<<<<
 *     """
 *     Set the number of threads to use in parallel operations.
*/

  /* 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_AddTraceback("pyarrow.lib.set_cpu_count", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/lib.pyx":88
 * 
 * 
 * def is_threading_enabled() -> bool:             # <<<<<<<<<<<<<<
 *     """
 *     Returns True if threading is enabled in libarrow.
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_5is_threading_enabled(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_4is_threading_enabled, "is_threading_enabled() -> bool\n\nReturns True if threading is enabled in libarrow.\n\nIf it isn't enabled, then python shouldn't create any\nthreads either, because we're probably on a system where\nthreading doesn't work (e.g. Emscripten).");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_5is_threading_enabled = {"is_threading_enabled", (PyCFunction)__pyx_pw_7pyarrow_3lib_5is_threading_enabled, METH_NOARGS, __pyx_doc_7pyarrow_3lib_4is_threading_enabled};
static PyObject *__pyx_pw_7pyarrow_3lib_5is_threading_enabled(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_threading_enabled (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_4is_threading_enabled(__pyx_self);

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

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

  /* "pyarrow/lib.pyx":96
 *     threading doesn't work (e.g. Emscripten).
 *     """
 *     return libarrow_python.IsThreadingEnabled()             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(arrow::py::internal::IsThreadingEnabled()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 96, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/lib.pyx":88
 * 
 * 
 * def is_threading_enabled() -> bool:             # <<<<<<<<<<<<<<
 *     """
 *     Returns True if threading is enabled in libarrow.
*/

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

/* "pyarrow/lib.pyx":152
 * 
 * 
 * def _pc():             # <<<<<<<<<<<<<<
 *     global __pc
 *     if __pc is None:
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_7_pc(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_6_pc, "_pc()");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_7_pc = {"_pc", (PyCFunction)__pyx_pw_7pyarrow_3lib_7_pc, METH_NOARGS, __pyx_doc_7pyarrow_3lib_6_pc};
static PyObject *__pyx_pw_7pyarrow_3lib_7_pc(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_pc (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_6_pc(__pyx_self);

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

static PyObject *__pyx_pf_7pyarrow_3lib_6_pc(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_v_pc = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_pc", 0);

  /* "pyarrow/lib.pyx":154
 * def _pc():
 *     global __pc
 *     if __pc is None:             # <<<<<<<<<<<<<<
 *         import pyarrow.compute as pc
 *         __pc = pc
*/
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_pc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 154, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__pyx_t_1 == Py_None);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "pyarrow/lib.pyx":155
 *     global __pc
 *     if __pc is None:
 *         import pyarrow.compute as pc             # <<<<<<<<<<<<<<
 *         __pc = pc
 *     return __pc
*/
    __pyx_t_3 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_pyarrow_compute, 0, 0, NULL, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 155, __pyx_L1_error)
    __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_compute);
    Py_DECREF(__pyx_t_3);
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 155, __pyx_L1_error)
    __pyx_t_3 = __pyx_t_4;
    __pyx_t_1 = __pyx_t_3;
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_pc = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "pyarrow/lib.pyx":156
 *     if __pc is None:
 *         import pyarrow.compute as pc
 *         __pc = pc             # <<<<<<<<<<<<<<
 *     return __pc
 * 
*/
    if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pc, __pyx_v_pc) < (0)) __PYX_ERR(0, 156, __pyx_L1_error)

    /* "pyarrow/lib.pyx":154
 * def _pc():
 *     global __pc
 *     if __pc is None:             # <<<<<<<<<<<<<<
 *         import pyarrow.compute as pc
 *         __pc = pc
*/
  }

  /* "pyarrow/lib.pyx":157
 *         import pyarrow.compute as pc
 *         __pc = pc
 *     return __pc             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_pc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 157, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/lib.pyx":152
 * 
 * 
 * def _pc():             # <<<<<<<<<<<<<<
 *     global __pc
 *     if __pc is None:
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib._pc", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pc);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/lib.pyx":160
 * 
 * 
 * def _pac():             # <<<<<<<<<<<<<<
 *     global __pac
 *     if __pac is None:
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_9_pac(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_8_pac, "_pac()");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_9_pac = {"_pac", (PyCFunction)__pyx_pw_7pyarrow_3lib_9_pac, METH_NOARGS, __pyx_doc_7pyarrow_3lib_8_pac};
static PyObject *__pyx_pw_7pyarrow_3lib_9_pac(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_pac (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_8_pac(__pyx_self);

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

static PyObject *__pyx_pf_7pyarrow_3lib_8_pac(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_v_pac = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_pac", 0);

  /* "pyarrow/lib.pyx":162
 * def _pac():
 *     global __pac
 *     if __pac is None:             # <<<<<<<<<<<<<<
 *         import pyarrow.acero as pac
 *         __pac = pac
*/
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_pac); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 162, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__pyx_t_1 == Py_None);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "pyarrow/lib.pyx":163
 *     global __pac
 *     if __pac is None:
 *         import pyarrow.acero as pac             # <<<<<<<<<<<<<<
 *         __pac = pac
 *     return __pac
*/
    __pyx_t_3 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_pyarrow_acero, 0, 0, NULL, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 163, __pyx_L1_error)
    __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_acero);
    Py_DECREF(__pyx_t_3);
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 163, __pyx_L1_error)
    __pyx_t_3 = __pyx_t_4;
    __pyx_t_1 = __pyx_t_3;
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_pac = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "pyarrow/lib.pyx":164
 *     if __pac is None:
 *         import pyarrow.acero as pac
 *         __pac = pac             # <<<<<<<<<<<<<<
 *     return __pac
 * 
*/
    if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pac, __pyx_v_pac) < (0)) __PYX_ERR(0, 164, __pyx_L1_error)

    /* "pyarrow/lib.pyx":162
 * def _pac():
 *     global __pac
 *     if __pac is None:             # <<<<<<<<<<<<<<
 *         import pyarrow.acero as pac
 *         __pac = pac
*/
  }

  /* "pyarrow/lib.pyx":165
 *         import pyarrow.acero as pac
 *         __pac = pac
 *     return __pac             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_pac); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 165, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/lib.pyx":160
 * 
 * 
 * def _pac():             # <<<<<<<<<<<<<<
 *     global __pac
 *     if __pac is None:
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib._pac", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pac);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/lib.pyx":168
 * 
 * 
 * def _ensure_cuda_loaded():             # <<<<<<<<<<<<<<
 *     # Try importing the cuda module to ensure libarrow_cuda gets loaded
 *     # to register the CUDA device for the C Data Interface import
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_11_ensure_cuda_loaded(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_10_ensure_cuda_loaded, "_ensure_cuda_loaded()");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_11_ensure_cuda_loaded = {"_ensure_cuda_loaded", (PyCFunction)__pyx_pw_7pyarrow_3lib_11_ensure_cuda_loaded, METH_NOARGS, __pyx_doc_7pyarrow_3lib_10_ensure_cuda_loaded};
static PyObject *__pyx_pw_7pyarrow_3lib_11_ensure_cuda_loaded(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_ensure_cuda_loaded (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_10_ensure_cuda_loaded(__pyx_self);

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

static PyObject *__pyx_pf_7pyarrow_3lib_10_ensure_cuda_loaded(CYTHON_UNUSED PyObject *__pyx_self) {
  CYTHON_UNUSED PyObject *__pyx_v_pyarrow = NULL;
  PyObject *__pyx_v_exc = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_t_11;
  char const *__pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18[3];
  size_t __pyx_t_19;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_ensure_cuda_loaded", 0);

  /* "pyarrow/lib.pyx":172
 *     # to register the CUDA device for the C Data Interface import
 *     global __cuda_loaded
 *     if __cuda_loaded is None:             # <<<<<<<<<<<<<<
 *         try:
 *             import pyarrow.cuda  # no-cython-lint
*/
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_cuda_loaded); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 172, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__pyx_t_1 == Py_None);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "pyarrow/lib.pyx":173
 *     global __cuda_loaded
 *     if __cuda_loaded is None:
 *         try:             # <<<<<<<<<<<<<<
 *             import pyarrow.cuda  # no-cython-lint
 *             __cuda_loaded = True
*/
    {
      __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:*/ {

        /* "pyarrow/lib.pyx":174
 *     if __cuda_loaded is None:
 *         try:
 *             import pyarrow.cuda  # no-cython-lint             # <<<<<<<<<<<<<<
 *             __cuda_loaded = True
 *         except ImportError as exc:
*/
        __pyx_t_6 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_pyarrow_cuda, 0, 0, NULL, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 174, __pyx_L4_error)
        __pyx_t_1 = __pyx_t_6;
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_v_pyarrow = __pyx_t_1;
        __pyx_t_1 = 0;

        /* "pyarrow/lib.pyx":175
 *         try:
 *             import pyarrow.cuda  # no-cython-lint
 *             __cuda_loaded = True             # <<<<<<<<<<<<<<
 *         except ImportError as exc:
 *             __cuda_loaded = str(exc)
*/
        if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_cuda_loaded, Py_True) < (0)) __PYX_ERR(0, 175, __pyx_L4_error)

        /* "pyarrow/lib.pyx":173
 *     global __cuda_loaded
 *     if __cuda_loaded is None:
 *         try:             # <<<<<<<<<<<<<<
 *             import pyarrow.cuda  # no-cython-lint
 *             __cuda_loaded = True
*/
      }
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      goto __pyx_L9_try_end;
      __pyx_L4_error:;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "pyarrow/lib.pyx":176
 *             import pyarrow.cuda  # no-cython-lint
 *             __cuda_loaded = True
 *         except ImportError as exc:             # <<<<<<<<<<<<<<
 *             __cuda_loaded = str(exc)
 * 
*/
      __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_ImportError))));
      if (__pyx_t_7) {
        __Pyx_AddTraceback("pyarrow.lib._ensure_cuda_loaded", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_8, &__pyx_t_9) < 0) __PYX_ERR(0, 176, __pyx_L6_except_error)
        __Pyx_XGOTREF(__pyx_t_1);
        __Pyx_XGOTREF(__pyx_t_8);
        __Pyx_XGOTREF(__pyx_t_9);
        __Pyx_INCREF(__pyx_t_8);
        __pyx_v_exc = __pyx_t_8;
        /*try:*/ {

          /* "pyarrow/lib.pyx":177
 *             __cuda_loaded = True
 *         except ImportError as exc:
 *             __cuda_loaded = str(exc)             # <<<<<<<<<<<<<<
 * 
 *     if __cuda_loaded is not True:
*/
          __pyx_t_10 = __Pyx_PyObject_Unicode(__pyx_v_exc); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 177, __pyx_L15_error)
          __Pyx_GOTREF(__pyx_t_10);
          if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_cuda_loaded, __pyx_t_10) < (0)) __PYX_ERR(0, 177, __pyx_L15_error)
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        }

        /* "pyarrow/lib.pyx":176
 *             import pyarrow.cuda  # no-cython-lint
 *             __cuda_loaded = True
 *         except ImportError as exc:             # <<<<<<<<<<<<<<
 *             __cuda_loaded = str(exc)
 * 
*/
        /*finally:*/ {
          /*normal exit:*/{
            __Pyx_DECREF(__pyx_v_exc); __pyx_v_exc = 0;
            goto __pyx_L16;
          }
          __pyx_L15_error:;
          /*exception exit:*/{
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __pyx_t_6 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
             __Pyx_ExceptionSwap(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17);
            if ( unlikely(__Pyx_GetException(&__pyx_t_6, &__pyx_t_13, &__pyx_t_14) < 0)) __Pyx_ErrFetch(&__pyx_t_6, &__pyx_t_13, &__pyx_t_14);
            __Pyx_XGOTREF(__pyx_t_6);
            __Pyx_XGOTREF(__pyx_t_13);
            __Pyx_XGOTREF(__pyx_t_14);
            __Pyx_XGOTREF(__pyx_t_15);
            __Pyx_XGOTREF(__pyx_t_16);
            __Pyx_XGOTREF(__pyx_t_17);
            __pyx_t_7 = __pyx_lineno; __pyx_t_11 = __pyx_clineno; __pyx_t_12 = __pyx_filename;
            {
              __Pyx_DECREF(__pyx_v_exc); __pyx_v_exc = 0;
            }
            __Pyx_XGIVEREF(__pyx_t_15);
            __Pyx_XGIVEREF(__pyx_t_16);
            __Pyx_XGIVEREF(__pyx_t_17);
            __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17);
            __Pyx_XGIVEREF(__pyx_t_6);
            __Pyx_XGIVEREF(__pyx_t_13);
            __Pyx_XGIVEREF(__pyx_t_14);
            __Pyx_ErrRestore(__pyx_t_6, __pyx_t_13, __pyx_t_14);
            __pyx_t_6 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0;
            __pyx_lineno = __pyx_t_7; __pyx_clineno = __pyx_t_11; __pyx_filename = __pyx_t_12;
            goto __pyx_L6_except_error;
          }
          __pyx_L16:;
        }
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        goto __pyx_L5_exception_handled;
      }
      goto __pyx_L6_except_error;

      /* "pyarrow/lib.pyx":173
 *     global __cuda_loaded
 *     if __cuda_loaded is None:
 *         try:             # <<<<<<<<<<<<<<
 *             import pyarrow.cuda  # no-cython-lint
 *             __cuda_loaded = True
*/
      __pyx_L6_except_error:;
      __Pyx_XGIVEREF(__pyx_t_3);
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_XGIVEREF(__pyx_t_5);
      __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
      goto __pyx_L1_error;
      __pyx_L5_exception_handled:;
      __Pyx_XGIVEREF(__pyx_t_3);
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_XGIVEREF(__pyx_t_5);
      __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
      __pyx_L9_try_end:;
    }

    /* "pyarrow/lib.pyx":172
 *     # to register the CUDA device for the C Data Interface import
 *     global __cuda_loaded
 *     if __cuda_loaded is None:             # <<<<<<<<<<<<<<
 *         try:
 *             import pyarrow.cuda  # no-cython-lint
*/
  }

  /* "pyarrow/lib.pyx":179
 *             __cuda_loaded = str(exc)
 * 
 *     if __cuda_loaded is not True:             # <<<<<<<<<<<<<<
 *         raise ImportError(
 *             "Trying to import data on a CUDA device, but PyArrow is not built with "
*/
  __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_cuda_loaded); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 179, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_2 = (__pyx_t_9 != Py_True);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (unlikely(__pyx_t_2)) {

    /* "pyarrow/lib.pyx":180
 * 
 *     if __cuda_loaded is not True:
 *         raise ImportError(             # <<<<<<<<<<<<<<
 *             "Trying to import data on a CUDA device, but PyArrow is not built with "
 *             f"CUDA support.\n(importing 'pyarrow.cuda' resulted in \"{__cuda_loaded}\")."
*/
    __pyx_t_8 = NULL;

    /* "pyarrow/lib.pyx":182
 *         raise ImportError(
 *             "Trying to import data on a CUDA device, but PyArrow is not built with "
 *             f"CUDA support.\n(importing 'pyarrow.cuda' resulted in \"{__cuda_loaded}\")."             # <<<<<<<<<<<<<<
 *         )
 * 
*/
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_cuda_loaded); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 182, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_10 = __Pyx_PyObject_FormatSimple(__pyx_t_1, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 182, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_18[0] = __pyx_mstate_global->__pyx_kp_u_Trying_to_import_data_on_a_CUDA;
    __pyx_t_18[1] = __pyx_t_10;
    __pyx_t_18[2] = __pyx_mstate_global->__pyx_kp_u__2;

    /* "pyarrow/lib.pyx":181
 *     if __cuda_loaded is not True:
 *         raise ImportError(
 *             "Trying to import data on a CUDA device, but PyArrow is not built with "             # <<<<<<<<<<<<<<
 *             f"CUDA support.\n(importing 'pyarrow.cuda' resulted in \"{__cuda_loaded}\")."
 *         )
*/
    __pyx_t_1 = __Pyx_PyUnicode_Join(__pyx_t_18, 3, 123 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_10) + 3, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_10));
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 181, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_19 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_1};
      __pyx_t_9 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ImportError)), __pyx_callargs+__pyx_t_19, (2-__pyx_t_19) | (__pyx_t_19*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 180, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
    }
    __Pyx_Raise(__pyx_t_9, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __PYX_ERR(0, 180, __pyx_L1_error)

    /* "pyarrow/lib.pyx":179
 *             __cuda_loaded = str(exc)
 * 
 *     if __cuda_loaded is not True:             # <<<<<<<<<<<<<<
 *         raise ImportError(
 *             "Trying to import data on a CUDA device, but PyArrow is not built with "
*/
  }

  /* "pyarrow/lib.pyx":168
 * 
 * 
 * def _ensure_cuda_loaded():             # <<<<<<<<<<<<<<
 *     # Try importing the cuda module to ensure libarrow_cuda gets loaded
 *     # to register the CUDA device for the C Data Interface import
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("pyarrow.lib._ensure_cuda_loaded", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pyarrow);
  __Pyx_XDECREF(__pyx_v_exc);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/lib.pyx":186
 * 
 * 
 * def _gdb_test_session():             # <<<<<<<<<<<<<<
 *     GdbTestSession()
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_13_gdb_test_session(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_12_gdb_test_session, "_gdb_test_session()");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_13_gdb_test_session = {"_gdb_test_session", (PyCFunction)__pyx_pw_7pyarrow_3lib_13_gdb_test_session, METH_NOARGS, __pyx_doc_7pyarrow_3lib_12_gdb_test_session};
static PyObject *__pyx_pw_7pyarrow_3lib_13_gdb_test_session(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_gdb_test_session (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_12_gdb_test_session(__pyx_self);

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

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

  /* "pyarrow/lib.pyx":187
 * 
 * def _gdb_test_session():
 *     GdbTestSession()             # <<<<<<<<<<<<<<
 * 
 * 
*/
  arrow::gdb::TestSession();

  /* "pyarrow/lib.pyx":186
 * 
 * 
 * def _gdb_test_session():             # <<<<<<<<<<<<<<
 *     GdbTestSession()
 * 
*/

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

/* "pyarrow/compat.pxi":19
 * 
 * 
 * def encode_file_path(path):             # <<<<<<<<<<<<<<
 *     if isinstance(path, str):
 *         # POSIX systems can handle utf-8. UTF8 is converted to utf16-le in
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_15encode_file_path(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_14encode_file_path, "encode_file_path(path)");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_15encode_file_path = {"encode_file_path", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15encode_file_path, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_14encode_file_path};
static PyObject *__pyx_pw_7pyarrow_3lib_15encode_file_path(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_path = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("encode_file_path (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_path,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(10, 19, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(10, 19, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "encode_file_path", 0) < (0)) __PYX_ERR(10, 19, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("encode_file_path", 1, 1, 1, i); __PYX_ERR(10, 19, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(10, 19, __pyx_L3_error)
    }
    __pyx_v_path = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("encode_file_path", 1, 1, 1, __pyx_nargs); __PYX_ERR(10, 19, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("pyarrow.lib.encode_file_path", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyarrow_3lib_14encode_file_path(__pyx_self, __pyx_v_path);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7pyarrow_3lib_14encode_file_path(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_path) {
  PyObject *__pyx_v_encoded_path = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("encode_file_path", 0);

  /* "pyarrow/compat.pxi":20
 * 
 * def encode_file_path(path):
 *     if isinstance(path, str):             # <<<<<<<<<<<<<<
 *         # POSIX systems can handle utf-8. UTF8 is converted to utf16-le in
 *         # libarrow
*/
  __pyx_t_1 = PyUnicode_Check(__pyx_v_path); 
  if (__pyx_t_1) {

    /* "pyarrow/compat.pxi":23
 *         # POSIX systems can handle utf-8. UTF8 is converted to utf16-le in
 *         # libarrow
 *         encoded_path = path.encode('utf-8')             # <<<<<<<<<<<<<<
 *     else:
 *         encoded_path = path
*/
    __pyx_t_3 = __pyx_v_path;
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_4 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_utf_8};
      __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_encode, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 23, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __pyx_v_encoded_path = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "pyarrow/compat.pxi":20
 * 
 * def encode_file_path(path):
 *     if isinstance(path, str):             # <<<<<<<<<<<<<<
 *         # POSIX systems can handle utf-8. UTF8 is converted to utf16-le in
 *         # libarrow
*/
    goto __pyx_L3;
  }

  /* "pyarrow/compat.pxi":25
 *         encoded_path = path.encode('utf-8')
 *     else:
 *         encoded_path = path             # <<<<<<<<<<<<<<
 * 
 *     # Windows file system requires utf-16le for file names; Arrow C++ libraries
*/
  /*else*/ {
    __Pyx_INCREF(__pyx_v_path);
    __pyx_v_encoded_path = __pyx_v_path;
  }
  __pyx_L3:;

  /* "pyarrow/compat.pxi":29
 *     # Windows file system requires utf-16le for file names; Arrow C++ libraries
 *     # will convert utf8 to utf16
 *     return encoded_path             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_encoded_path);
  __pyx_r = __pyx_v_encoded_path;
  goto __pyx_L0;

  /* "pyarrow/compat.pxi":19
 * 
 * 
 * def encode_file_path(path):             # <<<<<<<<<<<<<<
 *     if isinstance(path, str):
 *         # POSIX systems can handle utf-8. UTF8 is converted to utf16-le in
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyarrow.lib.encode_file_path", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_encoded_path);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/compat.pxi":42
 * 
 * 
 * def tobytes(o):             # <<<<<<<<<<<<<<
 *     """
 *     Encode a unicode or bytes string to bytes.
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_17tobytes(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_16tobytes, "tobytes(o)\n\nEncode a unicode or bytes string to bytes.\n\nParameters\n----------\no : str or bytes\n    Input string.");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_17tobytes = {"tobytes", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_17tobytes, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_16tobytes};
static PyObject *__pyx_pw_7pyarrow_3lib_17tobytes(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_o = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("tobytes (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_o,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(10, 42, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(10, 42, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "tobytes", 0) < (0)) __PYX_ERR(10, 42, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("tobytes", 1, 1, 1, i); __PYX_ERR(10, 42, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(10, 42, __pyx_L3_error)
    }
    __pyx_v_o = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("tobytes", 1, 1, 1, __pyx_nargs); __PYX_ERR(10, 42, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("pyarrow.lib.tobytes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyarrow_3lib_16tobytes(__pyx_self, __pyx_v_o);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7pyarrow_3lib_16tobytes(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_o) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("tobytes", 0);

  /* "pyarrow/compat.pxi":51
 *         Input string.
 *     """
 *     if isinstance(o, str):             # <<<<<<<<<<<<<<
 *         return o.encode('utf8')
 *     else:
*/
  __pyx_t_1 = PyUnicode_Check(__pyx_v_o); 
  if (__pyx_t_1) {

    /* "pyarrow/compat.pxi":52
 *     """
 *     if isinstance(o, str):
 *         return o.encode('utf8')             # <<<<<<<<<<<<<<
 *     else:
 *         return o
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __pyx_v_o;
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_4 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_n_u_utf8};
      __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_encode, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 52, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pyarrow/compat.pxi":51
 *         Input string.
 *     """
 *     if isinstance(o, str):             # <<<<<<<<<<<<<<
 *         return o.encode('utf8')
 *     else:
*/
  }

  /* "pyarrow/compat.pxi":54
 *         return o.encode('utf8')
 *     else:
 *         return o             # <<<<<<<<<<<<<<
 * 
 * 
*/
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_o);
    __pyx_r = __pyx_v_o;
    goto __pyx_L0;
  }

  /* "pyarrow/compat.pxi":42
 * 
 * 
 * def tobytes(o):             # <<<<<<<<<<<<<<
 *     """
 *     Encode a unicode or bytes string to bytes.
*/

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

/* "pyarrow/compat.pxi":57
 * 
 * 
 * def frombytes(o, *, safe=False):             # <<<<<<<<<<<<<<
 *     """
 *     Decode the given bytestring to unicode.
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_19frombytes(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_18frombytes, "frombytes(o, *, safe=False)\n\nDecode the given bytestring to unicode.\n\nParameters\n----------\no : bytes-like\n    Input object.\nsafe : bool, default False\n    If true, raise on encoding errors.");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_19frombytes = {"frombytes", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_19frombytes, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_18frombytes};
static PyObject *__pyx_pw_7pyarrow_3lib_19frombytes(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_o = 0;
  PyObject *__pyx_v_safe = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("frombytes (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_o,&__pyx_mstate_global->__pyx_n_u_safe,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(10, 57, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(10, 57, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "frombytes", 0) < (0)) __PYX_ERR(10, 57, __pyx_L3_error)
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False)));
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("frombytes", 1, 1, 1, i); __PYX_ERR(10, 57, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(10, 57, __pyx_L3_error)
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False)));
    }
    __pyx_v_o = values[0];
    __pyx_v_safe = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("frombytes", 1, 1, 1, __pyx_nargs); __PYX_ERR(10, 57, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("pyarrow.lib.frombytes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyarrow_3lib_18frombytes(__pyx_self, __pyx_v_o, __pyx_v_safe);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7pyarrow_3lib_18frombytes(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_o, PyObject *__pyx_v_safe) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("frombytes", 0);

  /* "pyarrow/compat.pxi":68
 *         If true, raise on encoding errors.
 *     """
 *     if safe:             # <<<<<<<<<<<<<<
 *         return o.decode('utf8', errors='replace')
 *     else:
*/
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_safe); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(10, 68, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "pyarrow/compat.pxi":69
 *     """
 *     if safe:
 *         return o.decode('utf8', errors='replace')             # <<<<<<<<<<<<<<
 *     else:
 *         return o.decode('utf8')
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __pyx_v_o;
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_4 = 0;
    {
      PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_3, __pyx_mstate_global->__pyx_n_u_utf8};
      __pyx_t_5 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(10, 69, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_errors, __pyx_mstate_global->__pyx_n_u_replace, __pyx_t_5, __pyx_callargs+2, 0) < (0)) __PYX_ERR(10, 69, __pyx_L1_error)
      __pyx_t_2 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_decode, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_5);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 69, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pyarrow/compat.pxi":68
 *         If true, raise on encoding errors.
 *     """
 *     if safe:             # <<<<<<<<<<<<<<
 *         return o.decode('utf8', errors='replace')
 *     else:
*/
  }

  /* "pyarrow/compat.pxi":71
 *         return o.decode('utf8', errors='replace')
 *     else:
 *         return o.decode('utf8')             # <<<<<<<<<<<<<<
*/
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_5 = __pyx_v_o;
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_4 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_n_u_utf8};
      __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_decode, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 71, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }

  /* "pyarrow/compat.pxi":57
 * 
 * 
 * def frombytes(o, *, safe=False):             # <<<<<<<<<<<<<<
 *     """
 *     Decode the given bytestring to unicode.
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pyarrow.lib.frombytes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/error.pxi":46
 * 
 * class ArrowKeyError(KeyError, ArrowException):
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         # Override KeyError.__str__, as it uses the repr() of the key
 *         return ArrowException.__str__(self)
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_13ArrowKeyError_1__str__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_13ArrowKeyError___str__, "ArrowKeyError.__str__(self)");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_13ArrowKeyError_1__str__ = {"__str__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_13ArrowKeyError_1__str__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_13ArrowKeyError___str__};
static PyObject *__pyx_pw_7pyarrow_3lib_13ArrowKeyError_1__str__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(2, 46, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 46, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__str__", 0) < (0)) __PYX_ERR(2, 46, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__str__", 1, 1, 1, i); __PYX_ERR(2, 46, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 46, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__str__", 1, 1, 1, __pyx_nargs); __PYX_ERR(2, 46, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("pyarrow.lib.ArrowKeyError.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyarrow_3lib_13ArrowKeyError___str__(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7pyarrow_3lib_13ArrowKeyError___str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__str__", 0);

  /* "pyarrow/error.pxi":48
 *     def __str__(self):
 *         # Override KeyError.__str__, as it uses the repr() of the key
 *         return ArrowException.__str__(self)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ArrowException); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 48, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_str); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 48, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_self};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 48, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/error.pxi":46
 * 
 * class ArrowKeyError(KeyError, ArrowException):
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         # Override KeyError.__str__, as it uses the repr() of the key
 *         return ArrowException.__str__(self)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pyarrow.lib.ArrowKeyError.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/error.pxi":72
 * 
 * class ArrowCancelled(ArrowException):
 *     def __init__(self, message, signum=None):             # <<<<<<<<<<<<<<
 *         super().__init__(message)
 *         self.signum = signum
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_14ArrowCancelled_1__init__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_14ArrowCancelled___init__, "ArrowCancelled.__init__(self, message, signum=None)");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_14ArrowCancelled_1__init__ = {"__init__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_14ArrowCancelled_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_14ArrowCancelled___init__};
static PyObject *__pyx_pw_7pyarrow_3lib_14ArrowCancelled_1__init__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_message = 0;
  PyObject *__pyx_v_signum = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_message,&__pyx_mstate_global->__pyx_n_u_signum,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(2, 72, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(2, 72, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(2, 72, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 72, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(2, 72, __pyx_L3_error)
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, i); __PYX_ERR(2, 72, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(2, 72, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(2, 72, __pyx_L3_error)
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 72, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_self = values[0];
    __pyx_v_message = values[1];
    __pyx_v_signum = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, __pyx_nargs); __PYX_ERR(2, 72, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("pyarrow.lib.ArrowCancelled.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyarrow_3lib_14ArrowCancelled___init__(__pyx_self, __pyx_v_self, __pyx_v_message, __pyx_v_signum);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7pyarrow_3lib_14ArrowCancelled___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_message, PyObject *__pyx_v_signum) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "pyarrow/error.pxi":73
 * class ArrowCancelled(ArrowException):
 *     def __init__(self, message, signum=None):
 *         super().__init__(message)             # <<<<<<<<<<<<<<
 *         self.signum = signum
 * 
*/
  __pyx_t_4 = NULL;
  __pyx_t_5 = __Pyx_CyFunction_GetClassObj(__pyx_self);
  if (!__pyx_t_5) { PyErr_SetString(PyExc_RuntimeError, "super(): empty __class__ cell"); __PYX_ERR(2, 73, __pyx_L1_error) }
  __Pyx_INCREF(__pyx_t_5);
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_t_5, __pyx_v_self};
    __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_super, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 73, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  }
  __pyx_t_2 = __pyx_t_3;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_6 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_message};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_init, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 73, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyarrow/error.pxi":74
 *     def __init__(self, message, signum=None):
 *         super().__init__(message)
 *         self.signum = signum             # <<<<<<<<<<<<<<
 * 
 * 
*/
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_signum, __pyx_v_signum) < (0)) __PYX_ERR(2, 74, __pyx_L1_error)

  /* "pyarrow/error.pxi":72
 * 
 * class ArrowCancelled(ArrowException):
 *     def __init__(self, message, signum=None):             # <<<<<<<<<<<<<<
 *         super().__init__(message)
 *         self.signum = signum
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pyarrow.lib.ArrowCancelled.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/error.pxi":83
 * # check_status() and convert_status() could be written directly in C++
 * # if we didn't define Arrow-specific subclasses (ArrowInvalid etc.)
 * cdef int check_status(const CStatus& status) except -1 nogil:             # <<<<<<<<<<<<<<
 *     if status.ok():
 *         return 0
*/

static int __pyx_f_7pyarrow_3lib_check_status(arrow::Status const &__pyx_v_status) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyGILState_STATE __pyx_gilstate_save;
  __Pyx_RefNannySetupContext("check_status", 1);

  /* "pyarrow/error.pxi":84
 * # if we didn't define Arrow-specific subclasses (ArrowInvalid etc.)
 * cdef int check_status(const CStatus& status) except -1 nogil:
 *     if status.ok():             # <<<<<<<<<<<<<<
 *         return 0
 * 
*/
  __pyx_t_1 = (__pyx_v_status.ok() != 0);
  if (__pyx_t_1) {

    /* "pyarrow/error.pxi":85
 * cdef int check_status(const CStatus& status) except -1 nogil:
 *     if status.ok():
 *         return 0             # <<<<<<<<<<<<<<
 * 
 *     with gil:
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "pyarrow/error.pxi":84
 * # if we didn't define Arrow-specific subclasses (ArrowInvalid etc.)
 * cdef int check_status(const CStatus& status) except -1 nogil:
 *     if status.ok():             # <<<<<<<<<<<<<<
 *         return 0
 * 
*/
  }

  /* "pyarrow/error.pxi":87
 *         return 0
 * 
 *     with gil:             # <<<<<<<<<<<<<<
 *         if IsPyError(status):
 *             RestorePyError(status)
*/
  {
      PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      /*try:*/ {

        /* "pyarrow/error.pxi":88
 * 
 *     with gil:
 *         if IsPyError(status):             # <<<<<<<<<<<<<<
 *             RestorePyError(status)
 *             return -1
*/
        __pyx_t_1 = (arrow::py::IsPyError(__pyx_v_status) != 0);
        if (__pyx_t_1) {

          /* "pyarrow/error.pxi":89
 *     with gil:
 *         if IsPyError(status):
 *             RestorePyError(status)             # <<<<<<<<<<<<<<
 *             return -1
 * 
*/
          arrow::py::RestorePyError(__pyx_v_status); if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 89, __pyx_L5_error)

          /* "pyarrow/error.pxi":90
 *         if IsPyError(status):
 *             RestorePyError(status)
 *             return -1             # <<<<<<<<<<<<<<
 * 
 *         raise convert_status(status)
*/
          __pyx_r = -1;
          goto __pyx_L4_return;

          /* "pyarrow/error.pxi":88
 * 
 *     with gil:
 *         if IsPyError(status):             # <<<<<<<<<<<<<<
 *             RestorePyError(status)
 *             return -1
*/
        }

        /* "pyarrow/error.pxi":92
 *             return -1
 * 
 *         raise convert_status(status)             # <<<<<<<<<<<<<<
 * 
 * 
*/
        __pyx_t_2 = __pyx_f_7pyarrow_3lib_convert_status(__pyx_v_status); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 92, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_Raise(__pyx_t_2, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __PYX_ERR(2, 92, __pyx_L5_error)
      }

      /* "pyarrow/error.pxi":87
 *         return 0
 * 
 *     with gil:             # <<<<<<<<<<<<<<
 *         if IsPyError(status):
 *             RestorePyError(status)
*/
      /*finally:*/ {
        __pyx_L4_return: {
          __Pyx_PyGILState_Release(__pyx_gilstate_save);
          goto __pyx_L0;
        }
        __pyx_L5_error: {
          __Pyx_PyGILState_Release(__pyx_gilstate_save);
          goto __pyx_L1_error;
        }
      }
  }

  /* "pyarrow/error.pxi":83
 * # check_status() and convert_status() could be written directly in C++
 * # if we didn't define Arrow-specific subclasses (ArrowInvalid etc.)
 * cdef int check_status(const CStatus& status) except -1 nogil:             # <<<<<<<<<<<<<<
 *     if status.ok():
 *         return 0
*/

  /* function exit code */
  __pyx_L1_error:;
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pyarrow.lib.check_status", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  __pyx_L0:;
  __Pyx_RefNannyFinishContextNogil()
  return __pyx_r;
}

/* "pyarrow/error.pxi":95
 * 
 * 
 * cdef object convert_status(const CStatus& status):             # <<<<<<<<<<<<<<
 *     if IsPyError(status):
 *         try:
*/

static PyObject *__pyx_f_7pyarrow_3lib_convert_status(arrow::Status const &__pyx_v_status) {
  PyObject *__pyx_v_e = NULL;
  PyObject *__pyx_v_message = NULL;
  std::shared_ptr<arrow::StatusDetail>  __pyx_v_detail;
  int __pyx_v_errno;
  int __pyx_v_winerror;
  int __pyx_v_signum;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  size_t __pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("convert_status", 0);

  /* "pyarrow/error.pxi":96
 * 
 * cdef object convert_status(const CStatus& status):
 *     if IsPyError(status):             # <<<<<<<<<<<<<<
 *         try:
 *             RestorePyError(status)
*/
  __pyx_t_1 = (arrow::py::IsPyError(__pyx_v_status) != 0);
  if (__pyx_t_1) {

    /* "pyarrow/error.pxi":97
 * cdef object convert_status(const CStatus& status):
 *     if IsPyError(status):
 *         try:             # <<<<<<<<<<<<<<
 *             RestorePyError(status)
 *         except BaseException as e:
*/
    {
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4);
      __Pyx_XGOTREF(__pyx_t_2);
      __Pyx_XGOTREF(__pyx_t_3);
      __Pyx_XGOTREF(__pyx_t_4);
      /*try:*/ {

        /* "pyarrow/error.pxi":98
 *     if IsPyError(status):
 *         try:
 *             RestorePyError(status)             # <<<<<<<<<<<<<<
 *         except BaseException as e:
 *             return e
*/
        arrow::py::RestorePyError(__pyx_v_status); if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 98, __pyx_L4_error)

        /* "pyarrow/error.pxi":97
 * cdef object convert_status(const CStatus& status):
 *     if IsPyError(status):
 *         try:             # <<<<<<<<<<<<<<
 *             RestorePyError(status)
 *         except BaseException as e:
*/
      }
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      goto __pyx_L9_try_end;
      __pyx_L4_error:;

      /* "pyarrow/error.pxi":99
 *         try:
 *             RestorePyError(status)
 *         except BaseException as e:             # <<<<<<<<<<<<<<
 *             return e
 * 
*/
      __pyx_t_5 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_BaseException))));
      if (__pyx_t_5) {
        __Pyx_AddTraceback("pyarrow.lib.convert_status", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8) < 0) __PYX_ERR(2, 99, __pyx_L6_except_error)
        __Pyx_XGOTREF(__pyx_t_6);
        __Pyx_XGOTREF(__pyx_t_7);
        __Pyx_XGOTREF(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_7);
        __pyx_v_e = __pyx_t_7;
        /*try:*/ {

          /* "pyarrow/error.pxi":100
 *             RestorePyError(status)
 *         except BaseException as e:
 *             return e             # <<<<<<<<<<<<<<
 * 
 *     # We don't use Status::ToString() as it would redundantly include
*/
          __Pyx_XDECREF(__pyx_r);
          __Pyx_INCREF(__pyx_v_e);
          __pyx_r = __pyx_v_e;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          goto __pyx_L14_return;
        }

        /* "pyarrow/error.pxi":99
 *         try:
 *             RestorePyError(status)
 *         except BaseException as e:             # <<<<<<<<<<<<<<
 *             return e
 * 
*/
        /*finally:*/ {
          __pyx_L14_return: {
            __pyx_t_9 = __pyx_r;
            __pyx_r = 0;
            __Pyx_DECREF(__pyx_v_e); __pyx_v_e = 0;
            __pyx_r = __pyx_t_9;
            __pyx_t_9 = 0;
            goto __pyx_L7_except_return;
          }
        }
      }
      goto __pyx_L6_except_error;

      /* "pyarrow/error.pxi":97
 * cdef object convert_status(const CStatus& status):
 *     if IsPyError(status):
 *         try:             # <<<<<<<<<<<<<<
 *             RestorePyError(status)
 *         except BaseException as e:
*/
      __pyx_L6_except_error:;
      __Pyx_XGIVEREF(__pyx_t_2);
      __Pyx_XGIVEREF(__pyx_t_3);
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
      goto __pyx_L1_error;
      __pyx_L7_except_return:;
      __Pyx_XGIVEREF(__pyx_t_2);
      __Pyx_XGIVEREF(__pyx_t_3);
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
      goto __pyx_L0;
      __pyx_L9_try_end:;
    }

    /* "pyarrow/error.pxi":96
 * 
 * cdef object convert_status(const CStatus& status):
 *     if IsPyError(status):             # <<<<<<<<<<<<<<
 *         try:
 *             RestorePyError(status)
*/
  }

  /* "pyarrow/error.pxi":104
 *     # We don't use Status::ToString() as it would redundantly include
 *     # the C++ class name.
 *     message = frombytes(status.message(), safe=True)             # <<<<<<<<<<<<<<
 *     detail = status.detail()
 *     if detail != nullptr:
*/
  __pyx_t_7 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_frombytes); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 104, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_10 = __pyx_convert_PyBytes_string_to_py_6libcpp_6string_std__in_string(__pyx_v_status.message()); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 104, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_11 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
    assert(__pyx_t_7);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
    __Pyx_INCREF(__pyx_t_7);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
    __pyx_t_11 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_7, __pyx_t_10};
    __pyx_t_12 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(2, 104, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_safe, Py_True, __pyx_t_12, __pyx_callargs+2, 0) < (0)) __PYX_ERR(2, 104, __pyx_L1_error)
    __pyx_t_8 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (__pyx_t_11*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_12);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 104, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
  }
  __pyx_v_message = __pyx_t_8;
  __pyx_t_8 = 0;

  /* "pyarrow/error.pxi":105
 *     # the C++ class name.
 *     message = frombytes(status.message(), safe=True)
 *     detail = status.detail()             # <<<<<<<<<<<<<<
 *     if detail != nullptr:
 *         message += ". Detail: " + frombytes(detail.get().ToString(),
*/
  __pyx_v_detail = __pyx_v_status.detail();

  /* "pyarrow/error.pxi":106
 *     message = frombytes(status.message(), safe=True)
 *     detail = status.detail()
 *     if detail != nullptr:             # <<<<<<<<<<<<<<
 *         message += ". Detail: " + frombytes(detail.get().ToString(),
 *                                             safe=True)
*/
  __pyx_t_1 = ((__pyx_v_detail != nullptr) != 0);
  if (__pyx_t_1) {

    /* "pyarrow/error.pxi":107
 *     detail = status.detail()
 *     if detail != nullptr:
 *         message += ". Detail: " + frombytes(detail.get().ToString(),             # <<<<<<<<<<<<<<
 *                                             safe=True)
 * 
*/
    __pyx_t_6 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_frombytes); if (unlikely(!__pyx_t_12)) __PYX_ERR(2, 107, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __pyx_t_10 = __pyx_convert_PyBytes_string_to_py_6libcpp_6string_std__in_string(__pyx_v_detail.get()->ToString()); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 107, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);

    /* "pyarrow/error.pxi":108
 *     if detail != nullptr:
 *         message += ". Detail: " + frombytes(detail.get().ToString(),
 *                                             safe=True)             # <<<<<<<<<<<<<<
 * 
 *     if status.IsInvalid():
*/
    __pyx_t_11 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_12))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_12);
      assert(__pyx_t_6);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_12);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_12, __pyx__function);
      __pyx_t_11 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_6, __pyx_t_10};
      __pyx_t_7 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 107, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_safe, Py_True, __pyx_t_7, __pyx_callargs+2, 0) < (0)) __PYX_ERR(2, 107, __pyx_L1_error)
      __pyx_t_8 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_12, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (__pyx_t_11*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_7);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 107, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
    }

    /* "pyarrow/error.pxi":107
 *     detail = status.detail()
 *     if detail != nullptr:
 *         message += ". Detail: " + frombytes(detail.get().ToString(),             # <<<<<<<<<<<<<<
 *                                             safe=True)
 * 
*/
    __pyx_t_12 = PyNumber_Add(__pyx_mstate_global->__pyx_kp_u_Detail, __pyx_t_8); if (unlikely(!__pyx_t_12)) __PYX_ERR(2, 107, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = PyNumber_InPlaceAdd(__pyx_v_message, __pyx_t_12); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 107, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_DECREF_SET(__pyx_v_message, __pyx_t_8);
    __pyx_t_8 = 0;

    /* "pyarrow/error.pxi":106
 *     message = frombytes(status.message(), safe=True)
 *     detail = status.detail()
 *     if detail != nullptr:             # <<<<<<<<<<<<<<
 *         message += ". Detail: " + frombytes(detail.get().ToString(),
 *                                             safe=True)
*/
  }

  /* "pyarrow/error.pxi":110
 *                                             safe=True)
 * 
 *     if status.IsInvalid():             # <<<<<<<<<<<<<<
 *         return ArrowInvalid(message)
 *     elif status.IsIOError():
*/
  __pyx_t_1 = (__pyx_v_status.IsInvalid() != 0);
  if (__pyx_t_1) {

    /* "pyarrow/error.pxi":111
 * 
 *     if status.IsInvalid():
 *         return ArrowInvalid(message)             # <<<<<<<<<<<<<<
 *     elif status.IsIOError():
 *         # Note: OSError constructor is
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_12 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_ArrowInvalid); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 111, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_11 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_7);
      assert(__pyx_t_12);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_12);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
      __pyx_t_11 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_v_message};
      __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (__pyx_t_11*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 111, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
    }
    __pyx_r = __pyx_t_8;
    __pyx_t_8 = 0;
    goto __pyx_L0;

    /* "pyarrow/error.pxi":110
 *                                             safe=True)
 * 
 *     if status.IsInvalid():             # <<<<<<<<<<<<<<
 *         return ArrowInvalid(message)
 *     elif status.IsIOError():
*/
  }

  /* "pyarrow/error.pxi":112
 *     if status.IsInvalid():
 *         return ArrowInvalid(message)
 *     elif status.IsIOError():             # <<<<<<<<<<<<<<
 *         # Note: OSError constructor is
 *         #   OSError(message)
*/
  __pyx_t_1 = (__pyx_v_status.IsIOError() != 0);
  if (__pyx_t_1) {

    /* "pyarrow/error.pxi":119
 *         # or (on Windows)
 *         #   OSError(errno, message, filename, winerror)
 *         errno = ErrnoFromStatus(status)             # <<<<<<<<<<<<<<
 *         winerror = WinErrorFromStatus(status)
 *         if winerror != 0:
*/
    __pyx_v_errno = arrow::internal::ErrnoFromStatus(__pyx_v_status);

    /* "pyarrow/error.pxi":120
 *         #   OSError(errno, message, filename, winerror)
 *         errno = ErrnoFromStatus(status)
 *         winerror = WinErrorFromStatus(status)             # <<<<<<<<<<<<<<
 *         if winerror != 0:
 *             return IOError(errno, message, None, winerror)
*/
    __pyx_v_winerror = arrow::internal::WinErrorFromStatus(__pyx_v_status);

    /* "pyarrow/error.pxi":121
 *         errno = ErrnoFromStatus(status)
 *         winerror = WinErrorFromStatus(status)
 *         if winerror != 0:             # <<<<<<<<<<<<<<
 *             return IOError(errno, message, None, winerror)
 *         elif errno != 0:
*/
    __pyx_t_1 = (__pyx_v_winerror != 0);
    if (__pyx_t_1) {

      /* "pyarrow/error.pxi":122
 *         winerror = WinErrorFromStatus(status)
 *         if winerror != 0:
 *             return IOError(errno, message, None, winerror)             # <<<<<<<<<<<<<<
 *         elif errno != 0:
 *             return IOError(errno, message)
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_7 = NULL;
      __pyx_t_12 = __Pyx_PyLong_From_int(__pyx_v_errno); if (unlikely(!__pyx_t_12)) __PYX_ERR(2, 122, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __pyx_t_10 = __Pyx_PyLong_From_int(__pyx_v_winerror); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 122, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_11 = 1;
      {
        PyObject *__pyx_callargs[5] = {__pyx_t_7, __pyx_t_12, __pyx_v_message, Py_None, __pyx_t_10};
        __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_IOError)), __pyx_callargs+__pyx_t_11, (5-__pyx_t_11) | (__pyx_t_11*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 122, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
      }
      __pyx_r = __pyx_t_8;
      __pyx_t_8 = 0;
      goto __pyx_L0;

      /* "pyarrow/error.pxi":121
 *         errno = ErrnoFromStatus(status)
 *         winerror = WinErrorFromStatus(status)
 *         if winerror != 0:             # <<<<<<<<<<<<<<
 *             return IOError(errno, message, None, winerror)
 *         elif errno != 0:
*/
    }

    /* "pyarrow/error.pxi":123
 *         if winerror != 0:
 *             return IOError(errno, message, None, winerror)
 *         elif errno != 0:             # <<<<<<<<<<<<<<
 *             return IOError(errno, message)
 *         else:
*/
    __pyx_t_1 = (__pyx_v_errno != 0);
    if (__pyx_t_1) {

      /* "pyarrow/error.pxi":124
 *             return IOError(errno, message, None, winerror)
 *         elif errno != 0:
 *             return IOError(errno, message)             # <<<<<<<<<<<<<<
 *         else:
 *             return IOError(message)
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_10 = NULL;
      __pyx_t_12 = __Pyx_PyLong_From_int(__pyx_v_errno); if (unlikely(!__pyx_t_12)) __PYX_ERR(2, 124, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __pyx_t_11 = 1;
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_10, __pyx_t_12, __pyx_v_message};
        __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_IOError)), __pyx_callargs+__pyx_t_11, (3-__pyx_t_11) | (__pyx_t_11*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 124, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
      }
      __pyx_r = __pyx_t_8;
      __pyx_t_8 = 0;
      goto __pyx_L0;

      /* "pyarrow/error.pxi":123
 *         if winerror != 0:
 *             return IOError(errno, message, None, winerror)
 *         elif errno != 0:             # <<<<<<<<<<<<<<
 *             return IOError(errno, message)
 *         else:
*/
    }

    /* "pyarrow/error.pxi":126
 *             return IOError(errno, message)
 *         else:
 *             return IOError(message)             # <<<<<<<<<<<<<<
 *     elif status.IsOutOfMemory():
 *         return ArrowMemoryError(message)
*/
    /*else*/ {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_12 = NULL;
      __pyx_t_11 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_v_message};
        __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_IOError)), __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (__pyx_t_11*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
        if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 126, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
      }
      __pyx_r = __pyx_t_8;
      __pyx_t_8 = 0;
      goto __pyx_L0;
    }

    /* "pyarrow/error.pxi":112
 *     if status.IsInvalid():
 *         return ArrowInvalid(message)
 *     elif status.IsIOError():             # <<<<<<<<<<<<<<
 *         # Note: OSError constructor is
 *         #   OSError(message)
*/
  }

  /* "pyarrow/error.pxi":127
 *         else:
 *             return IOError(message)
 *     elif status.IsOutOfMemory():             # <<<<<<<<<<<<<<
 *         return ArrowMemoryError(message)
 *     elif status.IsKeyError():
*/
  __pyx_t_1 = (__pyx_v_status.IsOutOfMemory() != 0);
  if (__pyx_t_1) {

    /* "pyarrow/error.pxi":128
 *             return IOError(message)
 *     elif status.IsOutOfMemory():
 *         return ArrowMemoryError(message)             # <<<<<<<<<<<<<<
 *     elif status.IsKeyError():
 *         return ArrowKeyError(message)
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_12 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_ArrowMemoryError); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 128, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_11 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_10))) {
      __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
      assert(__pyx_t_12);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_10);
      __Pyx_INCREF(__pyx_t_12);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_10, __pyx__function);
      __pyx_t_11 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_v_message};
      __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_10, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (__pyx_t_11*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 128, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
    }
    __pyx_r = __pyx_t_8;
    __pyx_t_8 = 0;
    goto __pyx_L0;

    /* "pyarrow/error.pxi":127
 *         else:
 *             return IOError(message)
 *     elif status.IsOutOfMemory():             # <<<<<<<<<<<<<<
 *         return ArrowMemoryError(message)
 *     elif status.IsKeyError():
*/
  }

  /* "pyarrow/error.pxi":129
 *     elif status.IsOutOfMemory():
 *         return ArrowMemoryError(message)
 *     elif status.IsKeyError():             # <<<<<<<<<<<<<<
 *         return ArrowKeyError(message)
 *     elif status.IsNotImplemented():
*/
  __pyx_t_1 = (__pyx_v_status.IsKeyError() != 0);
  if (__pyx_t_1) {

    /* "pyarrow/error.pxi":130
 *         return ArrowMemoryError(message)
 *     elif status.IsKeyError():
 *         return ArrowKeyError(message)             # <<<<<<<<<<<<<<
 *     elif status.IsNotImplemented():
 *         return ArrowNotImplementedError(message)
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_ArrowKeyError); if (unlikely(!__pyx_t_12)) __PYX_ERR(2, 130, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __pyx_t_11 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_12))) {
      __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_12);
      assert(__pyx_t_10);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_12);
      __Pyx_INCREF(__pyx_t_10);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_12, __pyx__function);
      __pyx_t_11 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_v_message};
      __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_12, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (__pyx_t_11*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 130, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
    }
    __pyx_r = __pyx_t_8;
    __pyx_t_8 = 0;
    goto __pyx_L0;

    /* "pyarrow/error.pxi":129
 *     elif status.IsOutOfMemory():
 *         return ArrowMemoryError(message)
 *     elif status.IsKeyError():             # <<<<<<<<<<<<<<
 *         return ArrowKeyError(message)
 *     elif status.IsNotImplemented():
*/
  }

  /* "pyarrow/error.pxi":131
 *     elif status.IsKeyError():
 *         return ArrowKeyError(message)
 *     elif status.IsNotImplemented():             # <<<<<<<<<<<<<<
 *         return ArrowNotImplementedError(message)
 *     elif status.IsTypeError():
*/
  __pyx_t_1 = (__pyx_v_status.IsNotImplemented() != 0);
  if (__pyx_t_1) {

    /* "pyarrow/error.pxi":132
 *         return ArrowKeyError(message)
 *     elif status.IsNotImplemented():
 *         return ArrowNotImplementedError(message)             # <<<<<<<<<<<<<<
 *     elif status.IsTypeError():
 *         return ArrowTypeError(message)
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_12 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_ArrowNotImplementedError); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 132, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_11 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_10))) {
      __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
      assert(__pyx_t_12);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_10);
      __Pyx_INCREF(__pyx_t_12);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_10, __pyx__function);
      __pyx_t_11 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_v_message};
      __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_10, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (__pyx_t_11*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 132, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
    }
    __pyx_r = __pyx_t_8;
    __pyx_t_8 = 0;
    goto __pyx_L0;

    /* "pyarrow/error.pxi":131
 *     elif status.IsKeyError():
 *         return ArrowKeyError(message)
 *     elif status.IsNotImplemented():             # <<<<<<<<<<<<<<
 *         return ArrowNotImplementedError(message)
 *     elif status.IsTypeError():
*/
  }

  /* "pyarrow/error.pxi":133
 *     elif status.IsNotImplemented():
 *         return ArrowNotImplementedError(message)
 *     elif status.IsTypeError():             # <<<<<<<<<<<<<<
 *         return ArrowTypeError(message)
 *     elif status.IsCapacityError():
*/
  __pyx_t_1 = (__pyx_v_status.IsTypeError() != 0);
  if (__pyx_t_1) {

    /* "pyarrow/error.pxi":134
 *         return ArrowNotImplementedError(message)
 *     elif status.IsTypeError():
 *         return ArrowTypeError(message)             # <<<<<<<<<<<<<<
 *     elif status.IsCapacityError():
 *         return ArrowCapacityError(message)
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_ArrowTypeError); if (unlikely(!__pyx_t_12)) __PYX_ERR(2, 134, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __pyx_t_11 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_12))) {
      __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_12);
      assert(__pyx_t_10);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_12);
      __Pyx_INCREF(__pyx_t_10);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_12, __pyx__function);
      __pyx_t_11 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_v_message};
      __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_12, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (__pyx_t_11*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 134, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
    }
    __pyx_r = __pyx_t_8;
    __pyx_t_8 = 0;
    goto __pyx_L0;

    /* "pyarrow/error.pxi":133
 *     elif status.IsNotImplemented():
 *         return ArrowNotImplementedError(message)
 *     elif status.IsTypeError():             # <<<<<<<<<<<<<<
 *         return ArrowTypeError(message)
 *     elif status.IsCapacityError():
*/
  }

  /* "pyarrow/error.pxi":135
 *     elif status.IsTypeError():
 *         return ArrowTypeError(message)
 *     elif status.IsCapacityError():             # <<<<<<<<<<<<<<
 *         return ArrowCapacityError(message)
 *     elif status.IsIndexError():
*/
  __pyx_t_1 = (__pyx_v_status.IsCapacityError() != 0);
  if (__pyx_t_1) {

    /* "pyarrow/error.pxi":136
 *         return ArrowTypeError(message)
 *     elif status.IsCapacityError():
 *         return ArrowCapacityError(message)             # <<<<<<<<<<<<<<
 *     elif status.IsIndexError():
 *         return ArrowIndexError(message)
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_12 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_ArrowCapacityError); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 136, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_11 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_10))) {
      __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
      assert(__pyx_t_12);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_10);
      __Pyx_INCREF(__pyx_t_12);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_10, __pyx__function);
      __pyx_t_11 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_v_message};
      __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_10, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (__pyx_t_11*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 136, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
    }
    __pyx_r = __pyx_t_8;
    __pyx_t_8 = 0;
    goto __pyx_L0;

    /* "pyarrow/error.pxi":135
 *     elif status.IsTypeError():
 *         return ArrowTypeError(message)
 *     elif status.IsCapacityError():             # <<<<<<<<<<<<<<
 *         return ArrowCapacityError(message)
 *     elif status.IsIndexError():
*/
  }

  /* "pyarrow/error.pxi":137
 *     elif status.IsCapacityError():
 *         return ArrowCapacityError(message)
 *     elif status.IsIndexError():             # <<<<<<<<<<<<<<
 *         return ArrowIndexError(message)
 *     elif status.IsSerializationError():
*/
  __pyx_t_1 = (__pyx_v_status.IsIndexError() != 0);
  if (__pyx_t_1) {

    /* "pyarrow/error.pxi":138
 *         return ArrowCapacityError(message)
 *     elif status.IsIndexError():
 *         return ArrowIndexError(message)             # <<<<<<<<<<<<<<
 *     elif status.IsSerializationError():
 *         return ArrowSerializationError(message)
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_ArrowIndexError); if (unlikely(!__pyx_t_12)) __PYX_ERR(2, 138, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __pyx_t_11 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_12))) {
      __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_12);
      assert(__pyx_t_10);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_12);
      __Pyx_INCREF(__pyx_t_10);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_12, __pyx__function);
      __pyx_t_11 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_v_message};
      __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_12, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (__pyx_t_11*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 138, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
    }
    __pyx_r = __pyx_t_8;
    __pyx_t_8 = 0;
    goto __pyx_L0;

    /* "pyarrow/error.pxi":137
 *     elif status.IsCapacityError():
 *         return ArrowCapacityError(message)
 *     elif status.IsIndexError():             # <<<<<<<<<<<<<<
 *         return ArrowIndexError(message)
 *     elif status.IsSerializationError():
*/
  }

  /* "pyarrow/error.pxi":139
 *     elif status.IsIndexError():
 *         return ArrowIndexError(message)
 *     elif status.IsSerializationError():             # <<<<<<<<<<<<<<
 *         return ArrowSerializationError(message)
 *     elif status.IsCancelled():
*/
  __pyx_t_1 = (__pyx_v_status.IsSerializationError() != 0);
  if (__pyx_t_1) {

    /* "pyarrow/error.pxi":140
 *         return ArrowIndexError(message)
 *     elif status.IsSerializationError():
 *         return ArrowSerializationError(message)             # <<<<<<<<<<<<<<
 *     elif status.IsCancelled():
 *         signum = SignalFromStatus(status)
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_12 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_ArrowSerializationError); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 140, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_11 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_10))) {
      __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
      assert(__pyx_t_12);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_10);
      __Pyx_INCREF(__pyx_t_12);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_10, __pyx__function);
      __pyx_t_11 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_v_message};
      __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_10, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (__pyx_t_11*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 140, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
    }
    __pyx_r = __pyx_t_8;
    __pyx_t_8 = 0;
    goto __pyx_L0;

    /* "pyarrow/error.pxi":139
 *     elif status.IsIndexError():
 *         return ArrowIndexError(message)
 *     elif status.IsSerializationError():             # <<<<<<<<<<<<<<
 *         return ArrowSerializationError(message)
 *     elif status.IsCancelled():
*/
  }

  /* "pyarrow/error.pxi":141
 *     elif status.IsSerializationError():
 *         return ArrowSerializationError(message)
 *     elif status.IsCancelled():             # <<<<<<<<<<<<<<
 *         signum = SignalFromStatus(status)
 *         if signum > 0:
*/
  __pyx_t_1 = (__pyx_v_status.IsCancelled() != 0);
  if (__pyx_t_1) {

    /* "pyarrow/error.pxi":142
 *         return ArrowSerializationError(message)
 *     elif status.IsCancelled():
 *         signum = SignalFromStatus(status)             # <<<<<<<<<<<<<<
 *         if signum > 0:
 *             return ArrowCancelled(message, signum)
*/
    __pyx_v_signum = arrow::internal::SignalFromStatus(__pyx_v_status);

    /* "pyarrow/error.pxi":143
 *     elif status.IsCancelled():
 *         signum = SignalFromStatus(status)
 *         if signum > 0:             # <<<<<<<<<<<<<<
 *             return ArrowCancelled(message, signum)
 *         else:
*/
    __pyx_t_1 = (__pyx_v_signum > 0);
    if (__pyx_t_1) {

      /* "pyarrow/error.pxi":144
 *         signum = SignalFromStatus(status)
 *         if signum > 0:
 *             return ArrowCancelled(message, signum)             # <<<<<<<<<<<<<<
 *         else:
 *             return ArrowCancelled(message)
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_10 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_ArrowCancelled); if (unlikely(!__pyx_t_12)) __PYX_ERR(2, 144, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __pyx_t_7 = __Pyx_PyLong_From_int(__pyx_v_signum); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 144, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_11 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_12))) {
        __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_12);
        assert(__pyx_t_10);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_12);
        __Pyx_INCREF(__pyx_t_10);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_12, __pyx__function);
        __pyx_t_11 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_10, __pyx_v_message, __pyx_t_7};
        __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_12, __pyx_callargs+__pyx_t_11, (3-__pyx_t_11) | (__pyx_t_11*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 144, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
      }
      __pyx_r = __pyx_t_8;
      __pyx_t_8 = 0;
      goto __pyx_L0;

      /* "pyarrow/error.pxi":143
 *     elif status.IsCancelled():
 *         signum = SignalFromStatus(status)
 *         if signum > 0:             # <<<<<<<<<<<<<<
 *             return ArrowCancelled(message, signum)
 *         else:
*/
    }

    /* "pyarrow/error.pxi":146
 *             return ArrowCancelled(message, signum)
 *         else:
 *             return ArrowCancelled(message)             # <<<<<<<<<<<<<<
 *     else:
 *         message = frombytes(status.ToString(), safe=True)
*/
    /*else*/ {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_12 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_ArrowCancelled); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 146, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_11 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_7);
        assert(__pyx_t_12);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_12);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
        __pyx_t_11 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_v_message};
        __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (__pyx_t_11*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 146, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
      }
      __pyx_r = __pyx_t_8;
      __pyx_t_8 = 0;
      goto __pyx_L0;
    }

    /* "pyarrow/error.pxi":141
 *     elif status.IsSerializationError():
 *         return ArrowSerializationError(message)
 *     elif status.IsCancelled():             # <<<<<<<<<<<<<<
 *         signum = SignalFromStatus(status)
 *         if signum > 0:
*/
  }

  /* "pyarrow/error.pxi":148
 *             return ArrowCancelled(message)
 *     else:
 *         message = frombytes(status.ToString(), safe=True)             # <<<<<<<<<<<<<<
 *         return ArrowException(message)
 * 
*/
  /*else*/ {
    __pyx_t_7 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_frombytes); if (unlikely(!__pyx_t_12)) __PYX_ERR(2, 148, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __pyx_t_10 = __pyx_convert_PyBytes_string_to_py_6libcpp_6string_std__in_string(__pyx_v_status.ToString()); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 148, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_11 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_12))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_12);
      assert(__pyx_t_7);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_12);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_12, __pyx__function);
      __pyx_t_11 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_7, __pyx_t_10};
      __pyx_t_6 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 148, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_safe, Py_True, __pyx_t_6, __pyx_callargs+2, 0) < (0)) __PYX_ERR(2, 148, __pyx_L1_error)
      __pyx_t_8 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_12, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (__pyx_t_11*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_6);
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 148, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
    }
    __Pyx_DECREF_SET(__pyx_v_message, __pyx_t_8);
    __pyx_t_8 = 0;

    /* "pyarrow/error.pxi":149
 *     else:
 *         message = frombytes(status.ToString(), safe=True)
 *         return ArrowException(message)             # <<<<<<<<<<<<<<
 * 
 * 
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_12 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_ArrowException); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 149, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_11 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_6);
      assert(__pyx_t_12);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_12);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
      __pyx_t_11 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_v_message};
      __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (__pyx_t_11*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 149, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
    }
    __pyx_r = __pyx_t_8;
    __pyx_t_8 = 0;
    goto __pyx_L0;
  }

  /* "pyarrow/error.pxi":95
 * 
 * 
 * cdef object convert_status(const CStatus& status):             # <<<<<<<<<<<<<<
 *     if IsPyError(status):
 *         try:
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("pyarrow.lib.convert_status", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_XDECREF(__pyx_v_message);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/error.pxi":153
 * 
 * # These are API functions for C++ PyArrow
 * cdef api int pyarrow_internal_check_status(const CStatus& status) \             # <<<<<<<<<<<<<<
 *         except -1 nogil:
 *     return check_status(status)
*/

static int __pyx_f_7pyarrow_3lib_pyarrow_internal_check_status(arrow::Status const &__pyx_v_status) {
  int __pyx_r;
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyGILState_STATE __pyx_gilstate_save;

  /* "pyarrow/error.pxi":155
 * cdef api int pyarrow_internal_check_status(const CStatus& status) \
 *         except -1 nogil:
 *     return check_status(status)             # <<<<<<<<<<<<<<
 * 
 * cdef api object pyarrow_internal_convert_status(const CStatus& status):
*/
  __pyx_t_1 = __pyx_f_7pyarrow_3lib_check_status(__pyx_v_status); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(2, 155, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "pyarrow/error.pxi":153
 * 
 * # These are API functions for C++ PyArrow
 * cdef api int pyarrow_internal_check_status(const CStatus& status) \             # <<<<<<<<<<<<<<
 *         except -1 nogil:
 *     return check_status(status)
*/

  /* function exit code */
  __pyx_L1_error:;
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  __Pyx_AddTraceback("pyarrow.lib.pyarrow_internal_check_status", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  __pyx_L0:;
  return __pyx_r;
}

/* "pyarrow/error.pxi":157
 *     return check_status(status)
 * 
 * cdef api object pyarrow_internal_convert_status(const CStatus& status):             # <<<<<<<<<<<<<<
 *     return convert_status(status)
 * 
*/

static PyObject *__pyx_f_7pyarrow_3lib_pyarrow_internal_convert_status(arrow::Status const &__pyx_v_status) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("pyarrow_internal_convert_status", 0);

  /* "pyarrow/error.pxi":158
 * 
 * cdef api object pyarrow_internal_convert_status(const CStatus& status):
 *     return convert_status(status)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_7pyarrow_3lib_convert_status(__pyx_v_status); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 158, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/error.pxi":157
 *     return check_status(status)
 * 
 * cdef api object pyarrow_internal_convert_status(const CStatus& status):             # <<<<<<<<<<<<<<
 *     return convert_status(status)
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib.pyarrow_internal_convert_status", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/error.pxi":162
 * 
 * cdef class StopToken:
 *     cdef void init(self, CStopToken stop_token):             # <<<<<<<<<<<<<<
 *         self.stop_token = move(stop_token)
 * 
*/

static void __pyx_f_7pyarrow_3lib_9StopToken_init(struct __pyx_obj_7pyarrow_3lib_StopToken *__pyx_v_self, arrow::StopToken __pyx_v_stop_token) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "pyarrow/error.pxi":163
 * cdef class StopToken:
 *     cdef void init(self, CStopToken stop_token):
 *         self.stop_token = move(stop_token)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "stop_token");
    __PYX_ERR(2, 163, __pyx_L1_error)
  }
  __pyx_v_self->stop_token = cython_std::move<arrow::StopToken>(__pyx_v_stop_token);

  /* "pyarrow/error.pxi":162
 * 
 * cdef class StopToken:
 *     cdef void init(self, CStopToken stop_token):             # <<<<<<<<<<<<<<
 *         self.stop_token = move(stop_token)
 * 
*/

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyarrow.lib.StopToken.init", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.stop_token cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_9StopToken_1__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_9StopToken___reduce_cython__, "StopToken.__reduce_cython__(self)");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_9StopToken_1__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_9StopToken_1__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_9StopToken___reduce_cython__};
static PyObject *__pyx_pw_7pyarrow_3lib_9StopToken_1__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7pyarrow_3lib_9StopToken___reduce_cython__(((struct __pyx_obj_7pyarrow_3lib_StopToken *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_9StopToken___reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_StopToken *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "self.stop_token cannot be converted to a Python object for pickling"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "self.stop_token cannot be converted to a Python object for pickling"
*/
  __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_self_stop_token_cannot_be_conver, 0, 0);
  __PYX_ERR(7, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.stop_token cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyarrow.lib.StopToken.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "self.stop_token cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.stop_token cannot be converted to a Python object for pickling"
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_9StopToken_3__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_9StopToken_2__setstate_cython__, "StopToken.__setstate_cython__(self, __pyx_state)");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_9StopToken_3__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_9StopToken_3__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_9StopToken_2__setstate_cython__};
static PyObject *__pyx_pw_7pyarrow_3lib_9StopToken_3__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(7, 3, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(7, 3, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(7, 3, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(7, 3, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(7, 3, __pyx_L3_error)
    }
    __pyx_v___pyx_state = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(7, 3, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("pyarrow.lib.StopToken.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyarrow_3lib_9StopToken_2__setstate_cython__(((struct __pyx_obj_7pyarrow_3lib_StopToken *)__pyx_v_self), __pyx_v___pyx_state);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

  /* "(tree fragment)":4
 *     raise TypeError, "self.stop_token cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "self.stop_token cannot be converted to a Python object for pickling"             # <<<<<<<<<<<<<<
*/
  __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_self_stop_token_cannot_be_conver, 0, 0);
  __PYX_ERR(7, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "self.stop_token cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.stop_token cannot be converted to a Python object for pickling"
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyarrow.lib.StopToken.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/error.pxi":169
 * 
 * 
 * def enable_signal_handlers(c_bool enable):             # <<<<<<<<<<<<<<
 *     """
 *     Enable or disable interruption of long-running operations.
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_21enable_signal_handlers(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_20enable_signal_handlers, "enable_signal_handlers(bool enable)\n\nEnable or disable interruption of long-running operations.\n\nBy default, certain long running operations will detect user\ninterruptions, such as by pressing Ctrl-C.  This detection relies\non setting a signal handler for the duration of the long-running\noperation, and may therefore interfere with other frameworks or\nlibraries (such as an event loop).\n\nParameters\n----------\nenable : bool\n    Whether to enable user interruption by setting a temporary\n    signal handler.");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_21enable_signal_handlers = {"enable_signal_handlers", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_21enable_signal_handlers, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_20enable_signal_handlers};
static PyObject *__pyx_pw_7pyarrow_3lib_21enable_signal_handlers(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  bool __pyx_v_enable;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("enable_signal_handlers (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_enable,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(2, 169, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 169, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "enable_signal_handlers", 0) < (0)) __PYX_ERR(2, 169, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("enable_signal_handlers", 1, 1, 1, i); __PYX_ERR(2, 169, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 169, __pyx_L3_error)
    }
    __pyx_v_enable = __Pyx_PyObject_IsTrue(values[0]); if (unlikely((__pyx_v_enable == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(2, 169, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("enable_signal_handlers", 1, 1, 1, __pyx_nargs); __PYX_ERR(2, 169, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("pyarrow.lib.enable_signal_handlers", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyarrow_3lib_20enable_signal_handlers(__pyx_self, __pyx_v_enable);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7pyarrow_3lib_20enable_signal_handlers(CYTHON_UNUSED PyObject *__pyx_self, bool __pyx_v_enable) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("enable_signal_handlers", 0);

  /* "pyarrow/error.pxi":186
 *     """
 *     global signal_handlers_enabled
 *     signal_handlers_enabled = enable             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_v_7pyarrow_3lib_signal_handlers_enabled = __pyx_v_enable;

  /* "pyarrow/error.pxi":169
 * 
 * 
 * def enable_signal_handlers(c_bool enable):             # <<<<<<<<<<<<<<
 *     """
 *     Enable or disable interruption of long-running operations.
*/

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

/* "pyarrow/error.pxi":202
 *         c_bool _enabled
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self._enabled = False
 * 
*/

/* Python wrapper */
static int __pyx_pw_7pyarrow_3lib_17SignalStopHandler_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_7pyarrow_3lib_17SignalStopHandler_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, __pyx_nargs); return -1; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return -1;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__cinit__", __pyx_kwds); return -1;}
  __pyx_r = __pyx_pf_7pyarrow_3lib_17SignalStopHandler___cinit__(((struct __pyx_obj_7pyarrow_3lib_SignalStopHandler *)__pyx_v_self));

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

static int __pyx_pf_7pyarrow_3lib_17SignalStopHandler___cinit__(struct __pyx_obj_7pyarrow_3lib_SignalStopHandler *__pyx_v_self) {
  arrow::Result<arrow::StopSource *>  __pyx_v_maybe_source;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  size_t __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  bool __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "pyarrow/error.pxi":203
 * 
 *     def __cinit__(self):
 *         self._enabled = False             # <<<<<<<<<<<<<<
 * 
 *         self._init_signals()
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_enabled");
    __PYX_ERR(2, 203, __pyx_L1_error)
  }
  __pyx_v_self->_enabled = 0;

  /* "pyarrow/error.pxi":205
 *         self._enabled = False
 * 
 *         self._init_signals()             # <<<<<<<<<<<<<<
 *         if have_signal_refcycle:
 *             _break_traceback_cycle_from_frame(sys._getframe(0))
*/
  __pyx_t_2 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_init_signals, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 205, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyarrow/error.pxi":206
 * 
 *         self._init_signals()
 *         if have_signal_refcycle:             # <<<<<<<<<<<<<<
 *             _break_traceback_cycle_from_frame(sys._getframe(0))
 * 
*/
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_have_signal_refcycle); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 206, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(2, 206, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_4) {

    /* "pyarrow/error.pxi":207
 *         self._init_signals()
 *         if have_signal_refcycle:
 *             _break_traceback_cycle_from_frame(sys._getframe(0))             # <<<<<<<<<<<<<<
 * 
 *         self._stop_token = StopToken()
*/
    __pyx_t_2 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_break_traceback_cycle_from_fram); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 207, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_7 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_sys); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 207, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_getframe); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 207, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_3 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_9))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_9);
      assert(__pyx_t_7);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_9, __pyx__function);
      __pyx_t_3 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_mstate_global->__pyx_int_0};
      __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 207, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
    }
    __pyx_t_3 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5);
      assert(__pyx_t_2);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
      __pyx_t_3 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_6};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 207, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyarrow/error.pxi":206
 * 
 *         self._init_signals()
 *         if have_signal_refcycle:             # <<<<<<<<<<<<<<
 *             _break_traceback_cycle_from_frame(sys._getframe(0))
 * 
*/
  }

  /* "pyarrow/error.pxi":209
 *             _break_traceback_cycle_from_frame(sys._getframe(0))
 * 
 *         self._stop_token = StopToken()             # <<<<<<<<<<<<<<
 * 
 *         if not self._signals.empty():
*/
  __pyx_t_5 = NULL;
  __pyx_t_3 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_StopToken, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 209, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_1);
  }
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_stop_token");
    __PYX_ERR(2, 209, __pyx_L1_error)
  }
  __Pyx_GIVEREF((PyObject *)__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->_stop_token);
  __Pyx_DECREF((PyObject *)__pyx_v_self->_stop_token);
  __pyx_v_self->_stop_token = ((struct __pyx_obj_7pyarrow_3lib_StopToken *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyarrow/error.pxi":211
 *         self._stop_token = StopToken()
 * 
 *         if not self._signals.empty():             # <<<<<<<<<<<<<<
 *             maybe_source = SetSignalStopSource()
 *             if not maybe_source.ok():
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_signals");
    __PYX_ERR(2, 211, __pyx_L1_error)
  }
  __pyx_t_4 = (!__pyx_v_self->_signals.empty());
  if (__pyx_t_4) {

    /* "pyarrow/error.pxi":212
 * 
 *         if not self._signals.empty():
 *             maybe_source = SetSignalStopSource()             # <<<<<<<<<<<<<<
 *             if not maybe_source.ok():
 *                 # See ARROW-11841 / ARROW-17173: in complex interaction
*/
    __pyx_v_maybe_source = arrow::SetSignalStopSource();

    /* "pyarrow/error.pxi":213
 *         if not self._signals.empty():
 *             maybe_source = SetSignalStopSource()
 *             if not maybe_source.ok():             # <<<<<<<<<<<<<<
 *                 # See ARROW-11841 / ARROW-17173: in complex interaction
 *                 # scenarios (such as R calling into Python), SetSignalStopSource()
*/
    __pyx_t_4 = (!(__pyx_v_maybe_source.ok() != 0));
    if (__pyx_t_4) {

      /* "pyarrow/error.pxi":218
 *                 # may have already activated a signal-receiving StopSource.
 *                 # Just warn instead of erroring out.
 *                 maybe_source.status().Warn()             # <<<<<<<<<<<<<<
 *             else:
 *                 self._stop_token.init(deref(maybe_source).token())
*/
      __pyx_v_maybe_source.status().Warn();

      /* "pyarrow/error.pxi":213
 *         if not self._signals.empty():
 *             maybe_source = SetSignalStopSource()
 *             if not maybe_source.ok():             # <<<<<<<<<<<<<<
 *                 # See ARROW-11841 / ARROW-17173: in complex interaction
 *                 # scenarios (such as R calling into Python), SetSignalStopSource()
*/
      goto __pyx_L5;
    }

    /* "pyarrow/error.pxi":220
 *                 maybe_source.status().Warn()
 *             else:
 *                 self._stop_token.init(deref(maybe_source).token())             # <<<<<<<<<<<<<<
 *                 # signals don't work on Emscripten without threads.
 *                 # and possibly other single-thread environments.
*/
    /*else*/ {
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_stop_token");
        __PYX_ERR(2, 220, __pyx_L1_error)
      }
      if (unlikely(((PyObject *)__pyx_v_self->_stop_token) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "init");
        __PYX_ERR(2, 220, __pyx_L1_error)
      }
      ((struct __pyx_vtabstruct_7pyarrow_3lib_StopToken *)__pyx_v_self->_stop_token->__pyx_vtab)->init(__pyx_v_self->_stop_token, (*__pyx_v_maybe_source)->token()); if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 220, __pyx_L1_error)

      /* "pyarrow/error.pxi":223
 *                 # signals don't work on Emscripten without threads.
 *                 # and possibly other single-thread environments.
 *                 self._enabled = is_threading_enabled()             # <<<<<<<<<<<<<<
 * 
 *     def _init_signals(self):
*/
      __pyx_t_5 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_is_threading_enabled); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 223, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_3 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
        assert(__pyx_t_5);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
        __pyx_t_3 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 223, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_10 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(2, 223, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_enabled");
        __PYX_ERR(2, 223, __pyx_L1_error)
      }
      __pyx_v_self->_enabled = __pyx_t_10;
    }
    __pyx_L5:;

    /* "pyarrow/error.pxi":211
 *         self._stop_token = StopToken()
 * 
 *         if not self._signals.empty():             # <<<<<<<<<<<<<<
 *             maybe_source = SetSignalStopSource()
 *             if not maybe_source.ok():
*/
  }

  /* "pyarrow/error.pxi":202
 *         c_bool _enabled
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self._enabled = False
 * 
*/

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("pyarrow.lib.SignalStopHandler.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/error.pxi":225
 *                 self._enabled = is_threading_enabled()
 * 
 *     def _init_signals(self):             # <<<<<<<<<<<<<<
 *         if (signal_handlers_enabled and
 *                 threading.current_thread() is threading.main_thread()):
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_17SignalStopHandler_3_init_signals(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_17SignalStopHandler_2_init_signals, "SignalStopHandler._init_signals(self)");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_17SignalStopHandler_3_init_signals = {"_init_signals", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_17SignalStopHandler_3_init_signals, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_17SignalStopHandler_2_init_signals};
static PyObject *__pyx_pw_7pyarrow_3lib_17SignalStopHandler_3_init_signals(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_init_signals (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("_init_signals", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("_init_signals", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7pyarrow_3lib_17SignalStopHandler_2_init_signals(((struct __pyx_obj_7pyarrow_3lib_SignalStopHandler *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_17SignalStopHandler_2_init_signals(struct __pyx_obj_7pyarrow_3lib_SignalStopHandler *__pyx_v_self) {
  PyObject *__pyx_7genexpr__pyx_v_sig = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  size_t __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  Py_ssize_t __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  std::vector<int>  __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_init_signals", 0);

  /* "pyarrow/error.pxi":226
 * 
 *     def _init_signals(self):
 *         if (signal_handlers_enabled and             # <<<<<<<<<<<<<<
 *                 threading.current_thread() is threading.main_thread()):
 *             self._signals = [
*/
  __pyx_t_2 = (__pyx_v_7pyarrow_3lib_signal_handlers_enabled != 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }

  /* "pyarrow/error.pxi":227
 *     def _init_signals(self):
 *         if (signal_handlers_enabled and
 *                 threading.current_thread() is threading.main_thread()):             # <<<<<<<<<<<<<<
 *             self._signals = [
 *                 sig for sig in (signal.SIGINT, signal.SIGTERM)
*/
  __pyx_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_threading); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 227, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_current_thread); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 227, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_7 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
    __pyx_t_7 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 227, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  }
  __pyx_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_threading); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 227, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_main_thread); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 227, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_7 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_8))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_8);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_8, __pyx__function);
    __pyx_t_7 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 227, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
  }
  __pyx_t_2 = (__pyx_t_3 == __pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;

  /* "pyarrow/error.pxi":226
 * 
 *     def _init_signals(self):
 *         if (signal_handlers_enabled and             # <<<<<<<<<<<<<<
 *                 threading.current_thread() is threading.main_thread()):
 *             self._signals = [
*/
  if (__pyx_t_1) {

    /* "pyarrow/error.pxi":228
 *         if (signal_handlers_enabled and
 *                 threading.current_thread() is threading.main_thread()):
 *             self._signals = [             # <<<<<<<<<<<<<<
 *                 sig for sig in (signal.SIGINT, signal.SIGTERM)
 *                 if signal.getsignal(sig) not in (signal.SIG_DFL,
*/
    { /* enter inner scope */
      __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 228, __pyx_L8_error)
      __Pyx_GOTREF(__pyx_t_6);

      /* "pyarrow/error.pxi":229
 *                 threading.current_thread() is threading.main_thread()):
 *             self._signals = [
 *                 sig for sig in (signal.SIGINT, signal.SIGTERM)             # <<<<<<<<<<<<<<
 *                 if signal.getsignal(sig) not in (signal.SIG_DFL,
 *                                                  signal.SIG_IGN, None)]
*/
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_signal); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 229, __pyx_L8_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_SIGINT); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 229, __pyx_L8_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_signal); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 229, __pyx_L8_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_SIGTERM); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 229, __pyx_L8_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 229, __pyx_L8_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_8);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_8) != (0)) __PYX_ERR(2, 229, __pyx_L8_error);
      __Pyx_GIVEREF(__pyx_t_4);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_4) != (0)) __PYX_ERR(2, 229, __pyx_L8_error);
      __pyx_t_8 = 0;
      __pyx_t_4 = 0;
      __pyx_t_4 = __pyx_t_3; __Pyx_INCREF(__pyx_t_4);
      __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      for (;;) {
        if (__pyx_t_9 >= 2) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_3 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_9));
        #else
        __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_9);
        #endif
        ++__pyx_t_9;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 229, __pyx_L8_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_XDECREF_SET(__pyx_7genexpr__pyx_v_sig, __pyx_t_3);
        __pyx_t_3 = 0;

        /* "pyarrow/error.pxi":230
 *             self._signals = [
 *                 sig for sig in (signal.SIGINT, signal.SIGTERM)
 *                 if signal.getsignal(sig) not in (signal.SIG_DFL,             # <<<<<<<<<<<<<<
 *                                                  signal.SIG_IGN, None)]
 * 
*/
        __pyx_t_8 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_signal); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 230, __pyx_L8_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_getsignal); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 230, __pyx_L8_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_7 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_10))) {
          __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_10);
          assert(__pyx_t_8);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_10);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_10, __pyx__function);
          __pyx_t_7 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_7genexpr__pyx_v_sig};
          __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_10, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 230, __pyx_L8_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_signal); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 230, __pyx_L8_error)
        __Pyx_GOTREF(__pyx_t_10);
        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_SIG_DFL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 230, __pyx_L8_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __pyx_t_10 = PyObject_RichCompare(__pyx_t_3, __pyx_t_8, Py_NE); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 230, __pyx_L8_error)
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(2, 230, __pyx_L8_error)
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        if (__pyx_t_2) {
        } else {
          __pyx_t_1 = __pyx_t_2;
          goto __pyx_L12_bool_binop_done;
        }

        /* "pyarrow/error.pxi":231
 *                 sig for sig in (signal.SIGINT, signal.SIGTERM)
 *                 if signal.getsignal(sig) not in (signal.SIG_DFL,
 *                                                  signal.SIG_IGN, None)]             # <<<<<<<<<<<<<<
 * 
 *     def __enter__(self):
*/
        __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_signal); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 231, __pyx_L8_error)
        __Pyx_GOTREF(__pyx_t_10);
        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_SIG_IGN); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 231, __pyx_L8_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __pyx_t_10 = PyObject_RichCompare(__pyx_t_3, __pyx_t_8, Py_NE); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 230, __pyx_L8_error)
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

        /* "pyarrow/error.pxi":230
 *             self._signals = [
 *                 sig for sig in (signal.SIGINT, signal.SIGTERM)
 *                 if signal.getsignal(sig) not in (signal.SIG_DFL,             # <<<<<<<<<<<<<<
 *                                                  signal.SIG_IGN, None)]
 * 
*/
        __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(2, 230, __pyx_L8_error)
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        if (__pyx_t_2) {
        } else {
          __pyx_t_1 = __pyx_t_2;
          goto __pyx_L12_bool_binop_done;
        }

        /* "pyarrow/error.pxi":231
 *                 sig for sig in (signal.SIGINT, signal.SIGTERM)
 *                 if signal.getsignal(sig) not in (signal.SIG_DFL,
 *                                                  signal.SIG_IGN, None)]             # <<<<<<<<<<<<<<
 * 
 *     def __enter__(self):
*/
        __pyx_t_10 = PyObject_RichCompare(__pyx_t_3, Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 230, __pyx_L8_error)

        /* "pyarrow/error.pxi":230
 *             self._signals = [
 *                 sig for sig in (signal.SIGINT, signal.SIGTERM)
 *                 if signal.getsignal(sig) not in (signal.SIG_DFL,             # <<<<<<<<<<<<<<
 *                                                  signal.SIG_IGN, None)]
 * 
*/
        __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(2, 230, __pyx_L8_error)
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __pyx_t_1 = __pyx_t_2;
        __pyx_L12_bool_binop_done:;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_2 = __pyx_t_1;
        if (__pyx_t_2) {

          /* "pyarrow/error.pxi":229
 *                 threading.current_thread() is threading.main_thread()):
 *             self._signals = [
 *                 sig for sig in (signal.SIGINT, signal.SIGTERM)             # <<<<<<<<<<<<<<
 *                 if signal.getsignal(sig) not in (signal.SIG_DFL,
 *                                                  signal.SIG_IGN, None)]
*/
          if (unlikely(__Pyx_ListComp_Append(__pyx_t_6, (PyObject*)__pyx_7genexpr__pyx_v_sig))) __PYX_ERR(2, 228, __pyx_L8_error)

          /* "pyarrow/error.pxi":230
 *             self._signals = [
 *                 sig for sig in (signal.SIGINT, signal.SIGTERM)
 *                 if signal.getsignal(sig) not in (signal.SIG_DFL,             # <<<<<<<<<<<<<<
 *                                                  signal.SIG_IGN, None)]
 * 
*/
        }

        /* "pyarrow/error.pxi":229
 *                 threading.current_thread() is threading.main_thread()):
 *             self._signals = [
 *                 sig for sig in (signal.SIGINT, signal.SIGTERM)             # <<<<<<<<<<<<<<
 *                 if signal.getsignal(sig) not in (signal.SIG_DFL,
 *                                                  signal.SIG_IGN, None)]
*/
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_7genexpr__pyx_v_sig); __pyx_7genexpr__pyx_v_sig = 0;
      goto __pyx_L16_exit_scope;
      __pyx_L8_error:;
      __Pyx_XDECREF(__pyx_7genexpr__pyx_v_sig); __pyx_7genexpr__pyx_v_sig = 0;
      goto __pyx_L1_error;
      __pyx_L16_exit_scope:;
    } /* exit inner scope */

    /* "pyarrow/error.pxi":228
 *         if (signal_handlers_enabled and
 *                 threading.current_thread() is threading.main_thread()):
 *             self._signals = [             # <<<<<<<<<<<<<<
 *                 sig for sig in (signal.SIGINT, signal.SIGTERM)
 *                 if signal.getsignal(sig) not in (signal.SIG_DFL,
*/
    __pyx_t_11 = __pyx_convert_vector_from_py_int(__pyx_t_6); if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 228, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_signals");
      __PYX_ERR(2, 228, __pyx_L1_error)
    }
    __pyx_v_self->_signals = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_11);

    /* "pyarrow/error.pxi":226
 * 
 *     def _init_signals(self):
 *         if (signal_handlers_enabled and             # <<<<<<<<<<<<<<
 *                 threading.current_thread() is threading.main_thread()):
 *             self._signals = [
*/
  }

  /* "pyarrow/error.pxi":225
 *                 self._enabled = is_threading_enabled()
 * 
 *     def _init_signals(self):             # <<<<<<<<<<<<<<
 *         if (signal_handlers_enabled and
 *                 threading.current_thread() is threading.main_thread()):
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("pyarrow.lib.SignalStopHandler._init_signals", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_7genexpr__pyx_v_sig);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/error.pxi":233
 *                                                  signal.SIG_IGN, None)]
 * 
 *     def __enter__(self):             # <<<<<<<<<<<<<<
 *         if self._enabled:
 *             check_status(RegisterCancellingSignalHandler(self._signals))
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_17SignalStopHandler_5__enter__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_17SignalStopHandler_4__enter__, "SignalStopHandler.__enter__(self)");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_17SignalStopHandler_5__enter__ = {"__enter__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_17SignalStopHandler_5__enter__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_17SignalStopHandler_4__enter__};
static PyObject *__pyx_pw_7pyarrow_3lib_17SignalStopHandler_5__enter__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__enter__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__enter__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__enter__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7pyarrow_3lib_17SignalStopHandler_4__enter__(((struct __pyx_obj_7pyarrow_3lib_SignalStopHandler *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_17SignalStopHandler_4__enter__(struct __pyx_obj_7pyarrow_3lib_SignalStopHandler *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__enter__", 0);

  /* "pyarrow/error.pxi":234
 * 
 *     def __enter__(self):
 *         if self._enabled:             # <<<<<<<<<<<<<<
 *             check_status(RegisterCancellingSignalHandler(self._signals))
 *         return self
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_enabled");
    __PYX_ERR(2, 234, __pyx_L1_error)
  }
  __pyx_t_1 = (__pyx_v_self->_enabled != 0);
  if (__pyx_t_1) {

    /* "pyarrow/error.pxi":235
 *     def __enter__(self):
 *         if self._enabled:
 *             check_status(RegisterCancellingSignalHandler(self._signals))             # <<<<<<<<<<<<<<
 *         return self
 * 
*/
    if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_signals");
      __PYX_ERR(2, 235, __pyx_L1_error)
    }
    __pyx_t_2 = __pyx_f_7pyarrow_3lib_check_status(arrow::RegisterCancellingSignalHandler(__pyx_v_self->_signals)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(2, 235, __pyx_L1_error)

    /* "pyarrow/error.pxi":234
 * 
 *     def __enter__(self):
 *         if self._enabled:             # <<<<<<<<<<<<<<
 *             check_status(RegisterCancellingSignalHandler(self._signals))
 *         return self
*/
  }

  /* "pyarrow/error.pxi":236
 *         if self._enabled:
 *             check_status(RegisterCancellingSignalHandler(self._signals))
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def __exit__(self, exc_type, exc_value, exc_tb):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_self);
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "pyarrow/error.pxi":233
 *                                                  signal.SIG_IGN, None)]
 * 
 *     def __enter__(self):             # <<<<<<<<<<<<<<
 *         if self._enabled:
 *             check_status(RegisterCancellingSignalHandler(self._signals))
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyarrow.lib.SignalStopHandler.__enter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/error.pxi":238
 *         return self
 * 
 *     def __exit__(self, exc_type, exc_value, exc_tb):             # <<<<<<<<<<<<<<
 *         if self._enabled:
 *             UnregisterCancellingSignalHandler()
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_17SignalStopHandler_7__exit__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_17SignalStopHandler_6__exit__, "SignalStopHandler.__exit__(self, exc_type, exc_value, exc_tb)");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_17SignalStopHandler_7__exit__ = {"__exit__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_17SignalStopHandler_7__exit__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_17SignalStopHandler_6__exit__};
static PyObject *__pyx_pw_7pyarrow_3lib_17SignalStopHandler_7__exit__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_exc_type = 0;
  PyObject *__pyx_v_exc_value = 0;
  CYTHON_UNUSED PyObject *__pyx_v_exc_tb = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__exit__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_exc_type,&__pyx_mstate_global->__pyx_n_u_exc_value,&__pyx_mstate_global->__pyx_n_u_exc_tb,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(2, 238, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(2, 238, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(2, 238, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 238, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__exit__", 0) < (0)) __PYX_ERR(2, 238, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, i); __PYX_ERR(2, 238, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 238, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(2, 238, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(2, 238, __pyx_L3_error)
    }
    __pyx_v_exc_type = values[0];
    __pyx_v_exc_value = values[1];
    __pyx_v_exc_tb = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, __pyx_nargs); __PYX_ERR(2, 238, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("pyarrow.lib.SignalStopHandler.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyarrow_3lib_17SignalStopHandler_6__exit__(((struct __pyx_obj_7pyarrow_3lib_SignalStopHandler *)__pyx_v_self), __pyx_v_exc_type, __pyx_v_exc_value, __pyx_v_exc_tb);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7pyarrow_3lib_17SignalStopHandler_6__exit__(struct __pyx_obj_7pyarrow_3lib_SignalStopHandler *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_exc_type, PyObject *__pyx_v_exc_value, CYTHON_UNUSED PyObject *__pyx_v_exc_tb) {
  PyObject *__pyx_v_e = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  size_t __pyx_t_10;
  uint64_t __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__exit__", 0);
  __Pyx_INCREF(__pyx_v_exc_value);

  /* "pyarrow/error.pxi":239
 * 
 *     def __exit__(self, exc_type, exc_value, exc_tb):
 *         if self._enabled:             # <<<<<<<<<<<<<<
 *             UnregisterCancellingSignalHandler()
 *         if exc_value is None:
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_enabled");
    __PYX_ERR(2, 239, __pyx_L1_error)
  }
  __pyx_t_1 = (__pyx_v_self->_enabled != 0);
  if (__pyx_t_1) {

    /* "pyarrow/error.pxi":240
 *     def __exit__(self, exc_type, exc_value, exc_tb):
 *         if self._enabled:
 *             UnregisterCancellingSignalHandler()             # <<<<<<<<<<<<<<
 *         if exc_value is None:
 *             # Make sure we didn't lose a signal
*/
    arrow::UnregisterCancellingSignalHandler();

    /* "pyarrow/error.pxi":239
 * 
 *     def __exit__(self, exc_type, exc_value, exc_tb):
 *         if self._enabled:             # <<<<<<<<<<<<<<
 *             UnregisterCancellingSignalHandler()
 *         if exc_value is None:
*/
  }

  /* "pyarrow/error.pxi":241
 *         if self._enabled:
 *             UnregisterCancellingSignalHandler()
 *         if exc_value is None:             # <<<<<<<<<<<<<<
 *             # Make sure we didn't lose a signal
 *             try:
*/
  __pyx_t_1 = (__pyx_v_exc_value == Py_None);
  if (__pyx_t_1) {

    /* "pyarrow/error.pxi":243
 *         if exc_value is None:
 *             # Make sure we didn't lose a signal
 *             try:             # <<<<<<<<<<<<<<
 *                 check_status(self._stop_token.stop_token.Poll())
 *             except ArrowCancelled as e:
*/
    {
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4);
      __Pyx_XGOTREF(__pyx_t_2);
      __Pyx_XGOTREF(__pyx_t_3);
      __Pyx_XGOTREF(__pyx_t_4);
      /*try:*/ {

        /* "pyarrow/error.pxi":244
 *             # Make sure we didn't lose a signal
 *             try:
 *                 check_status(self._stop_token.stop_token.Poll())             # <<<<<<<<<<<<<<
 *             except ArrowCancelled as e:
 *                 exc_value = e
*/
        if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_stop_token");
          __PYX_ERR(2, 244, __pyx_L5_error)
        }
        if (unlikely(((PyObject *)__pyx_v_self->_stop_token) == Py_None)) {
          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "stop_token");
          __PYX_ERR(2, 244, __pyx_L5_error)
        }
        __pyx_t_5 = __pyx_f_7pyarrow_3lib_check_status(__pyx_v_self->_stop_token->stop_token.Poll()); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(2, 244, __pyx_L5_error)

        /* "pyarrow/error.pxi":243
 *         if exc_value is None:
 *             # Make sure we didn't lose a signal
 *             try:             # <<<<<<<<<<<<<<
 *                 check_status(self._stop_token.stop_token.Poll())
 *             except ArrowCancelled as e:
*/
      }
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      goto __pyx_L10_try_end;
      __pyx_L5_error:;

      /* "pyarrow/error.pxi":245
 *             try:
 *                 check_status(self._stop_token.stop_token.Poll())
 *             except ArrowCancelled as e:             # <<<<<<<<<<<<<<
 *                 exc_value = e
 *         if isinstance(exc_value, ArrowCancelled):
*/
      __Pyx_ErrFetch(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
      __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_ArrowCancelled); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 245, __pyx_L7_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_5 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_6, __pyx_t_9);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_ErrRestore(__pyx_t_6, __pyx_t_7, __pyx_t_8);
      __pyx_t_6 = 0; __pyx_t_7 = 0; __pyx_t_8 = 0;
      if (__pyx_t_5) {
        __Pyx_AddTraceback("pyarrow.lib.SignalStopHandler.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_7, &__pyx_t_6) < 0) __PYX_ERR(2, 245, __pyx_L7_except_error)
        __Pyx_XGOTREF(__pyx_t_8);
        __Pyx_XGOTREF(__pyx_t_7);
        __Pyx_XGOTREF(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        __pyx_v_e = __pyx_t_7;
        /*try:*/ {

          /* "pyarrow/error.pxi":246
 *                 check_status(self._stop_token.stop_token.Poll())
 *             except ArrowCancelled as e:
 *                 exc_value = e             # <<<<<<<<<<<<<<
 *         if isinstance(exc_value, ArrowCancelled):
 *             if exc_value.signum:
*/
          __Pyx_INCREF(__pyx_v_e);
          __Pyx_DECREF_SET(__pyx_v_exc_value, __pyx_v_e);
        }

        /* "pyarrow/error.pxi":245
 *             try:
 *                 check_status(self._stop_token.stop_token.Poll())
 *             except ArrowCancelled as e:             # <<<<<<<<<<<<<<
 *                 exc_value = e
 *         if isinstance(exc_value, ArrowCancelled):
*/
        /*finally:*/ {
          /*normal exit:*/{
            __Pyx_DECREF(__pyx_v_e); __pyx_v_e = 0;
            goto __pyx_L17;
          }
          __pyx_L17:;
        }
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        goto __pyx_L6_exception_handled;
      }
      goto __pyx_L7_except_error;

      /* "pyarrow/error.pxi":243
 *         if exc_value is None:
 *             # Make sure we didn't lose a signal
 *             try:             # <<<<<<<<<<<<<<
 *                 check_status(self._stop_token.stop_token.Poll())
 *             except ArrowCancelled as e:
*/
      __pyx_L7_except_error:;
      __Pyx_XGIVEREF(__pyx_t_2);
      __Pyx_XGIVEREF(__pyx_t_3);
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
      goto __pyx_L1_error;
      __pyx_L6_exception_handled:;
      __Pyx_XGIVEREF(__pyx_t_2);
      __Pyx_XGIVEREF(__pyx_t_3);
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
      __pyx_L10_try_end:;
    }

    /* "pyarrow/error.pxi":241
 *         if self._enabled:
 *             UnregisterCancellingSignalHandler()
 *         if exc_value is None:             # <<<<<<<<<<<<<<
 *             # Make sure we didn't lose a signal
 *             try:
*/
  }

  /* "pyarrow/error.pxi":247
 *             except ArrowCancelled as e:
 *                 exc_value = e
 *         if isinstance(exc_value, ArrowCancelled):             # <<<<<<<<<<<<<<
 *             if exc_value.signum:
 *                 # Re-emit the exact same signal. We restored the Python signal
*/
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_ArrowCancelled); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 247, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_1 = PyObject_IsInstance(__pyx_v_exc_value, __pyx_t_6); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(2, 247, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__pyx_t_1) {

    /* "pyarrow/error.pxi":248
 *                 exc_value = e
 *         if isinstance(exc_value, ArrowCancelled):
 *             if exc_value.signum:             # <<<<<<<<<<<<<<
 *                 # Re-emit the exact same signal. We restored the Python signal
 *                 # handler above, so it should receive it.
*/
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_exc_value, __pyx_mstate_global->__pyx_n_u_signum); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 248, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(2, 248, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (__pyx_t_1) {

      /* "pyarrow/error.pxi":251
 *                 # Re-emit the exact same signal. We restored the Python signal
 *                 # handler above, so it should receive it.
 *                 if os.name == 'nt':             # <<<<<<<<<<<<<<
 *                     SendSignal(exc_value.signum)
 *                 else:
*/
      __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_os); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 251, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 251, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_nt, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(2, 251, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (__pyx_t_1) {

        /* "pyarrow/error.pxi":252
 *                 # handler above, so it should receive it.
 *                 if os.name == 'nt':
 *                     SendSignal(exc_value.signum)             # <<<<<<<<<<<<<<
 *                 else:
 *                     SendSignalToThread(exc_value.signum,
*/
        __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_exc_value, __pyx_mstate_global->__pyx_n_u_signum); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 252, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_5 = __Pyx_PyLong_As_int(__pyx_t_7); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 252, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        (void)(arrow::internal::SendSignal(__pyx_t_5));

        /* "pyarrow/error.pxi":251
 *                 # Re-emit the exact same signal. We restored the Python signal
 *                 # handler above, so it should receive it.
 *                 if os.name == 'nt':             # <<<<<<<<<<<<<<
 *                     SendSignal(exc_value.signum)
 *                 else:
*/
        goto __pyx_L20;
      }

      /* "pyarrow/error.pxi":254
 *                     SendSignal(exc_value.signum)
 *                 else:
 *                     SendSignalToThread(exc_value.signum,             # <<<<<<<<<<<<<<
 *                                        threading.main_thread().ident)
 *             else:
*/
      /*else*/ {
        __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_exc_value, __pyx_mstate_global->__pyx_n_u_signum); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 254, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_5 = __Pyx_PyLong_As_int(__pyx_t_7); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 254, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

        /* "pyarrow/error.pxi":255
 *                 else:
 *                     SendSignalToThread(exc_value.signum,
 *                                        threading.main_thread().ident)             # <<<<<<<<<<<<<<
 *             else:
 *                 # Simulate Python receiving a SIGINT
*/
        __pyx_t_6 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_threading); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 255, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_main_thread); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 255, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_t_10 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_9))) {
          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_9);
          assert(__pyx_t_6);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_9);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_9, __pyx__function);
          __pyx_t_10 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
          __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_10, (1-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 255, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
        }
        __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_ident); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 255, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_11 = __Pyx_PyLong_As_uint64_t(__pyx_t_9); if (unlikely((__pyx_t_11 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(2, 255, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

        /* "pyarrow/error.pxi":254
 *                     SendSignal(exc_value.signum)
 *                 else:
 *                     SendSignalToThread(exc_value.signum,             # <<<<<<<<<<<<<<
 *                                        threading.main_thread().ident)
 *             else:
*/
        (void)(arrow::internal::SendSignalToThread(__pyx_t_5, __pyx_t_11));
      }
      __pyx_L20:;

      /* "pyarrow/error.pxi":248
 *                 exc_value = e
 *         if isinstance(exc_value, ArrowCancelled):
 *             if exc_value.signum:             # <<<<<<<<<<<<<<
 *                 # Re-emit the exact same signal. We restored the Python signal
 *                 # handler above, so it should receive it.
*/
      goto __pyx_L19;
    }

    /* "pyarrow/error.pxi":260
 *                 # (see https://bugs.python.org/issue43356 for why we can't
 *                 #  simulate the exact signal number)
 *                 PyErr_SetInterrupt()             # <<<<<<<<<<<<<<
 *             # Maximize chances of the Python signal handler being executed now.
 *             # Otherwise a potential KeyboardInterrupt might be missed by an
*/
    /*else*/ {
      PyErr_SetInterrupt();
    }
    __pyx_L19:;

    /* "pyarrow/error.pxi":264
 *             # Otherwise a potential KeyboardInterrupt might be missed by an
 *             # immediately enclosing try/except block.
 *             PyErr_CheckSignals()             # <<<<<<<<<<<<<<
 *             # ArrowCancelled will be re-raised if PyErr_CheckSignals()
 *             # returned successfully.
*/
    __pyx_t_5 = PyErr_CheckSignals(); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(2, 264, __pyx_L1_error)

    /* "pyarrow/error.pxi":247
 *             except ArrowCancelled as e:
 *                 exc_value = e
 *         if isinstance(exc_value, ArrowCancelled):             # <<<<<<<<<<<<<<
 *             if exc_value.signum:
 *                 # Re-emit the exact same signal. We restored the Python signal
*/
  }

  /* "pyarrow/error.pxi":238
 *         return self
 * 
 *     def __exit__(self, exc_type, exc_value, exc_tb):             # <<<<<<<<<<<<<<
 *         if self._enabled:
 *             UnregisterCancellingSignalHandler()
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("pyarrow.lib.SignalStopHandler.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_XDECREF(__pyx_v_exc_value);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/error.pxi":268
 *             # returned successfully.
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         if self._enabled:
 *             ResetSignalStopSource()
*/

/* Python wrapper */
static void __pyx_pw_7pyarrow_3lib_17SignalStopHandler_9__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_7pyarrow_3lib_17SignalStopHandler_9__dealloc__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_pf_7pyarrow_3lib_17SignalStopHandler_8__dealloc__(((struct __pyx_obj_7pyarrow_3lib_SignalStopHandler *)__pyx_v_self));

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

static void __pyx_pf_7pyarrow_3lib_17SignalStopHandler_8__dealloc__(struct __pyx_obj_7pyarrow_3lib_SignalStopHandler *__pyx_v_self) {
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "pyarrow/error.pxi":269
 * 
 *     def __dealloc__(self):
 *         if self._enabled:             # <<<<<<<<<<<<<<
 *             ResetSignalStopSource()
 * 
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_enabled");
    __PYX_ERR(2, 269, __pyx_L1_error)
  }
  __pyx_t_1 = (__pyx_v_self->_enabled != 0);
  if (__pyx_t_1) {

    /* "pyarrow/error.pxi":270
 *     def __dealloc__(self):
 *         if self._enabled:
 *             ResetSignalStopSource()             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
    arrow::ResetSignalStopSource();

    /* "pyarrow/error.pxi":269
 * 
 *     def __dealloc__(self):
 *         if self._enabled:             # <<<<<<<<<<<<<<
 *             ResetSignalStopSource()
 * 
*/
  }

  /* "pyarrow/error.pxi":268
 *             # returned successfully.
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         if self._enabled:
 *             ResetSignalStopSource()
*/

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("pyarrow.lib.SignalStopHandler.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
}

/* "pyarrow/error.pxi":272
 *             ResetSignalStopSource()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def stop_token(self):
 *         return self._stop_token
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_17SignalStopHandler_10stop_token_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_17SignalStopHandler_10stop_token_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_17SignalStopHandler_10stop_token___get__(((struct __pyx_obj_7pyarrow_3lib_SignalStopHandler *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_17SignalStopHandler_10stop_token___get__(struct __pyx_obj_7pyarrow_3lib_SignalStopHandler *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyarrow/error.pxi":274
 *     @property
 *     def stop_token(self):
 *         return self._stop_token             # <<<<<<<<<<<<<<
*/
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_stop_token");
    __PYX_ERR(2, 274, __pyx_L1_error)
  }
  __Pyx_INCREF((PyObject *)__pyx_v_self->_stop_token);
  __pyx_r = ((PyObject *)__pyx_v_self->_stop_token);
  goto __pyx_L0;

  /* "pyarrow/error.pxi":272
 *             ResetSignalStopSource()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def stop_token(self):
 *         return self._stop_token
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyarrow.lib.SignalStopHandler.stop_token.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_17SignalStopHandler_11__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_17SignalStopHandler_10__reduce_cython__, "SignalStopHandler.__reduce_cython__(self)");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_17SignalStopHandler_11__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_17SignalStopHandler_11__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_17SignalStopHandler_10__reduce_cython__};
static PyObject *__pyx_pw_7pyarrow_3lib_17SignalStopHandler_11__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7pyarrow_3lib_17SignalStopHandler_10__reduce_cython__(((struct __pyx_obj_7pyarrow_3lib_SignalStopHandler *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_17SignalStopHandler_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_SignalStopHandler *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/
  __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(7, 2, __pyx_L1_error)

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

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyarrow.lib.SignalStopHandler.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_17SignalStopHandler_13__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_17SignalStopHandler_12__setstate_cython__, "SignalStopHandler.__setstate_cython__(self, __pyx_state)");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_17SignalStopHandler_13__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_17SignalStopHandler_13__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_17SignalStopHandler_12__setstate_cython__};
static PyObject *__pyx_pw_7pyarrow_3lib_17SignalStopHandler_13__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(7, 3, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(7, 3, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(7, 3, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(7, 3, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(7, 3, __pyx_L3_error)
    }
    __pyx_v___pyx_state = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(7, 3, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("pyarrow.lib.SignalStopHandler.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyarrow_3lib_17SignalStopHandler_12__setstate_cython__(((struct __pyx_obj_7pyarrow_3lib_SignalStopHandler *)__pyx_v_self), __pyx_v___pyx_state);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

  /* "(tree fragment)":4
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
*/
  __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(7, 4, __pyx_L1_error)

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

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyarrow.lib.SignalStopHandler.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/config.pxi":31
 * 
 * 
 * def runtime_info():             # <<<<<<<<<<<<<<
 *     """
 *     Get runtime information.
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_23runtime_info(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_22runtime_info, "runtime_info()\n\nGet runtime information.\n\nReturns\n-------\ninfo : pyarrow.RuntimeInfo");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_23runtime_info = {"runtime_info", (PyCFunction)__pyx_pw_7pyarrow_3lib_23runtime_info, METH_NOARGS, __pyx_doc_7pyarrow_3lib_22runtime_info};
static PyObject *__pyx_pw_7pyarrow_3lib_23runtime_info(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("runtime_info (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_22runtime_info(__pyx_self);

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

static PyObject *__pyx_pf_7pyarrow_3lib_22runtime_info(CYTHON_UNUSED PyObject *__pyx_self) {
   arrow::RuntimeInfo __pyx_v_c_info;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("runtime_info", 0);

  /* "pyarrow/config.pxi":42
 *         CRuntimeInfo c_info
 * 
 *     c_info = GetRuntimeInfo()             # <<<<<<<<<<<<<<
 * 
 *     return RuntimeInfo(
*/
  __pyx_v_c_info = arrow::GetRuntimeInfo();

  /* "pyarrow/config.pxi":44
 *     c_info = GetRuntimeInfo()
 * 
 *     return RuntimeInfo(             # <<<<<<<<<<<<<<
 *         simd_level=frombytes(c_info.simd_level),
 *         detected_simd_level=frombytes(c_info.detected_simd_level))
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_RuntimeInfo); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 44, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "pyarrow/config.pxi":45
 * 
 *     return RuntimeInfo(
 *         simd_level=frombytes(c_info.simd_level),             # <<<<<<<<<<<<<<
 *         detected_simd_level=frombytes(c_info.detected_simd_level))
 * 
*/
  __pyx_t_5 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_frombytes); if (unlikely(!__pyx_t_6)) __PYX_ERR(11, 45, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __pyx_convert_PyBytes_string_to_py_6libcpp_6string_std__in_string(__pyx_v_c_info.simd_level); if (unlikely(!__pyx_t_7)) __PYX_ERR(11, 45, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
    assert(__pyx_t_5);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_7};
    __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(11, 45, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }

  /* "pyarrow/config.pxi":46
 *     return RuntimeInfo(
 *         simd_level=frombytes(c_info.simd_level),
 *         detected_simd_level=frombytes(c_info.detected_simd_level))             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_t_7 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_frombytes); if (unlikely(!__pyx_t_5)) __PYX_ERR(11, 46, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_9 = __pyx_convert_PyBytes_string_to_py_6libcpp_6string_std__in_string(__pyx_v_c_info.detected_simd_level); if (unlikely(!__pyx_t_9)) __PYX_ERR(11, 46, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_7);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_7);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_9};
    __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(11, 46, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
  }
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_2, NULL};
    __pyx_t_5 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(11, 44, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_simd_level, __pyx_t_4, __pyx_t_5, __pyx_callargs+1, 0) < (0)) __PYX_ERR(11, 44, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_detected_simd_level, __pyx_t_6, __pyx_t_5, __pyx_callargs+1, 1) < (0)) __PYX_ERR(11, 44, __pyx_L1_error)
    __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_5);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 44, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/config.pxi":31
 * 
 * 
 * def runtime_info():             # <<<<<<<<<<<<<<
 *     """
 *     Get runtime information.
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("pyarrow.lib.runtime_info", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/config.pxi":60
 * 
 * 
 * def _build_info():             # <<<<<<<<<<<<<<
 *     """
 *     Get PyArrow build information.
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_25_build_info(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_24_build_info, "_build_info()\n\nGet PyArrow build information.\n\nReturns\n-------\ninfo : pyarrow.BuildInfo");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_25_build_info = {"_build_info", (PyCFunction)__pyx_pw_7pyarrow_3lib_25_build_info, METH_NOARGS, __pyx_doc_7pyarrow_3lib_24_build_info};
static PyObject *__pyx_pw_7pyarrow_3lib_25_build_info(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_build_info (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_24_build_info(__pyx_self);

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

static PyObject *__pyx_pf_7pyarrow_3lib_24_build_info(CYTHON_UNUSED PyObject *__pyx_self) {
  arrow::py::BuildInfo const *__pyx_v_c_info;
  arrow::BuildInfo const *__pyx_v_c_cpp_info;
  PyObject *__pyx_v_cpp_build_info = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  PyObject *__pyx_t_19 = NULL;
  PyObject *__pyx_t_20 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_build_info", 0);

  /* "pyarrow/config.pxi":72
 *         const libarrow.CCppBuildInfo* c_cpp_info
 * 
 *     c_info = &libarrow_python.GetBuildInfo()             # <<<<<<<<<<<<<<
 *     c_cpp_info = &libarrow.GetCppBuildInfo()
 * 
*/
  __pyx_v_c_info = (&arrow::py::GetBuildInfo());

  /* "pyarrow/config.pxi":73
 * 
 *     c_info = &libarrow_python.GetBuildInfo()
 *     c_cpp_info = &libarrow.GetCppBuildInfo()             # <<<<<<<<<<<<<<
 * 
 *     cpp_build_info = CppBuildInfo(version=frombytes(c_cpp_info.version_string),
*/
  __pyx_v_c_cpp_info = (&arrow::GetBuildInfo());

  /* "pyarrow/config.pxi":75
 *     c_cpp_info = &libarrow.GetCppBuildInfo()
 * 
 *     cpp_build_info = CppBuildInfo(version=frombytes(c_cpp_info.version_string),             # <<<<<<<<<<<<<<
 *                                   version_info=VersionInfo(c_cpp_info.version_major,
 *                                                            c_cpp_info.version_minor,
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_CppBuildInfo); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 75, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_frombytes); if (unlikely(!__pyx_t_6)) __PYX_ERR(11, 75, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __pyx_convert_PyBytes_string_to_py_6libcpp_6string_std__in_string(__pyx_v_c_cpp_info->version_string); if (unlikely(!__pyx_t_7)) __PYX_ERR(11, 75, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
    assert(__pyx_t_5);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_7};
    __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(11, 75, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }

  /* "pyarrow/config.pxi":76
 * 
 *     cpp_build_info = CppBuildInfo(version=frombytes(c_cpp_info.version_string),
 *                                   version_info=VersionInfo(c_cpp_info.version_major,             # <<<<<<<<<<<<<<
 *                                                            c_cpp_info.version_minor,
 *                                                            c_cpp_info.version_patch),
*/
  __pyx_t_7 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_VersionInfo); if (unlikely(!__pyx_t_5)) __PYX_ERR(11, 76, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_9 = __Pyx_PyLong_From_int(__pyx_v_c_cpp_info->version_major); if (unlikely(!__pyx_t_9)) __PYX_ERR(11, 76, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);

  /* "pyarrow/config.pxi":77
 *     cpp_build_info = CppBuildInfo(version=frombytes(c_cpp_info.version_string),
 *                                   version_info=VersionInfo(c_cpp_info.version_major,
 *                                                            c_cpp_info.version_minor,             # <<<<<<<<<<<<<<
 *                                                            c_cpp_info.version_patch),
 *                                   so_version=frombytes(c_cpp_info.so_version),
*/
  __pyx_t_10 = __Pyx_PyLong_From_int(__pyx_v_c_cpp_info->version_minor); if (unlikely(!__pyx_t_10)) __PYX_ERR(11, 77, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);

  /* "pyarrow/config.pxi":78
 *                                   version_info=VersionInfo(c_cpp_info.version_major,
 *                                                            c_cpp_info.version_minor,
 *                                                            c_cpp_info.version_patch),             # <<<<<<<<<<<<<<
 *                                   so_version=frombytes(c_cpp_info.so_version),
 *                                   full_so_version=frombytes(c_cpp_info.full_so_version),
*/
  __pyx_t_11 = __Pyx_PyLong_From_int(__pyx_v_c_cpp_info->version_patch); if (unlikely(!__pyx_t_11)) __PYX_ERR(11, 78, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_7);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_7);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_7, __pyx_t_9, __pyx_t_10, __pyx_t_11};
    __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_8, (4-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(11, 76, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
  }

  /* "pyarrow/config.pxi":79
 *                                                            c_cpp_info.version_minor,
 *                                                            c_cpp_info.version_patch),
 *                                   so_version=frombytes(c_cpp_info.so_version),             # <<<<<<<<<<<<<<
 *                                   full_so_version=frombytes(c_cpp_info.full_so_version),
 *                                   compiler_id=frombytes(c_cpp_info.compiler_id),
*/
  __pyx_t_11 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_frombytes); if (unlikely(!__pyx_t_10)) __PYX_ERR(11, 79, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_9 = __pyx_convert_PyBytes_string_to_py_6libcpp_6string_std__in_string(__pyx_v_c_cpp_info->so_version); if (unlikely(!__pyx_t_9)) __PYX_ERR(11, 79, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_10))) {
    __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_10);
    assert(__pyx_t_11);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_10);
    __Pyx_INCREF(__pyx_t_11);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_10, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_t_9};
    __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_10, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(11, 79, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
  }

  /* "pyarrow/config.pxi":80
 *                                                            c_cpp_info.version_patch),
 *                                   so_version=frombytes(c_cpp_info.so_version),
 *                                   full_so_version=frombytes(c_cpp_info.full_so_version),             # <<<<<<<<<<<<<<
 *                                   compiler_id=frombytes(c_cpp_info.compiler_id),
 *                                   compiler_version=frombytes(
*/
  __pyx_t_9 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_frombytes); if (unlikely(!__pyx_t_11)) __PYX_ERR(11, 80, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_7 = __pyx_convert_PyBytes_string_to_py_6libcpp_6string_std__in_string(__pyx_v_c_cpp_info->full_so_version); if (unlikely(!__pyx_t_7)) __PYX_ERR(11, 80, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_11))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_11);
    assert(__pyx_t_9);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_11);
    __Pyx_INCREF(__pyx_t_9);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_11, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_7};
    __pyx_t_10 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_11, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    if (unlikely(!__pyx_t_10)) __PYX_ERR(11, 80, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
  }

  /* "pyarrow/config.pxi":81
 *                                   so_version=frombytes(c_cpp_info.so_version),
 *                                   full_so_version=frombytes(c_cpp_info.full_so_version),
 *                                   compiler_id=frombytes(c_cpp_info.compiler_id),             # <<<<<<<<<<<<<<
 *                                   compiler_version=frombytes(
 *                                       c_cpp_info.compiler_version),
*/
  __pyx_t_7 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_frombytes); if (unlikely(!__pyx_t_9)) __PYX_ERR(11, 81, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_12 = __pyx_convert_PyBytes_string_to_py_6libcpp_6string_std__in_string(__pyx_v_c_cpp_info->compiler_id); if (unlikely(!__pyx_t_12)) __PYX_ERR(11, 81, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_9))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_9);
    assert(__pyx_t_7);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_9);
    __Pyx_INCREF(__pyx_t_7);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_9, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_12};
    __pyx_t_11 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_11)) __PYX_ERR(11, 81, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
  }

  /* "pyarrow/config.pxi":82
 *                                   full_so_version=frombytes(c_cpp_info.full_so_version),
 *                                   compiler_id=frombytes(c_cpp_info.compiler_id),
 *                                   compiler_version=frombytes(             # <<<<<<<<<<<<<<
 *                                       c_cpp_info.compiler_version),
 *                                   compiler_flags=frombytes(c_cpp_info.compiler_flags),
*/
  __pyx_t_12 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_frombytes); if (unlikely(!__pyx_t_7)) __PYX_ERR(11, 82, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);

  /* "pyarrow/config.pxi":83
 *                                   compiler_id=frombytes(c_cpp_info.compiler_id),
 *                                   compiler_version=frombytes(
 *                                       c_cpp_info.compiler_version),             # <<<<<<<<<<<<<<
 *                                   compiler_flags=frombytes(c_cpp_info.compiler_flags),
 *                                   git_id=frombytes(c_cpp_info.git_id),
*/
  __pyx_t_13 = __pyx_convert_PyBytes_string_to_py_6libcpp_6string_std__in_string(__pyx_v_c_cpp_info->compiler_version); if (unlikely(!__pyx_t_13)) __PYX_ERR(11, 83, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_7);
    assert(__pyx_t_12);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_12);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_t_13};
    __pyx_t_9 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_9)) __PYX_ERR(11, 82, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
  }

  /* "pyarrow/config.pxi":84
 *                                   compiler_version=frombytes(
 *                                       c_cpp_info.compiler_version),
 *                                   compiler_flags=frombytes(c_cpp_info.compiler_flags),             # <<<<<<<<<<<<<<
 *                                   git_id=frombytes(c_cpp_info.git_id),
 *                                   git_description=frombytes(c_cpp_info.git_description),
*/
  __pyx_t_13 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_frombytes); if (unlikely(!__pyx_t_12)) __PYX_ERR(11, 84, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_14 = __pyx_convert_PyBytes_string_to_py_6libcpp_6string_std__in_string(__pyx_v_c_cpp_info->compiler_flags); if (unlikely(!__pyx_t_14)) __PYX_ERR(11, 84, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_12))) {
    __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_12);
    assert(__pyx_t_13);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_12);
    __Pyx_INCREF(__pyx_t_13);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_12, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_13, __pyx_t_14};
    __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_12, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    if (unlikely(!__pyx_t_7)) __PYX_ERR(11, 84, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
  }

  /* "pyarrow/config.pxi":85
 *                                       c_cpp_info.compiler_version),
 *                                   compiler_flags=frombytes(c_cpp_info.compiler_flags),
 *                                   git_id=frombytes(c_cpp_info.git_id),             # <<<<<<<<<<<<<<
 *                                   git_description=frombytes(c_cpp_info.git_description),
 *                                   package_kind=frombytes(c_cpp_info.package_kind),
*/
  __pyx_t_14 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_frombytes); if (unlikely(!__pyx_t_13)) __PYX_ERR(11, 85, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __pyx_t_15 = __pyx_convert_PyBytes_string_to_py_6libcpp_6string_std__in_string(__pyx_v_c_cpp_info->git_id); if (unlikely(!__pyx_t_15)) __PYX_ERR(11, 85, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_13))) {
    __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_13);
    assert(__pyx_t_14);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_13);
    __Pyx_INCREF(__pyx_t_14);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_13, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_14, __pyx_t_15};
    __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_13, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    if (unlikely(!__pyx_t_12)) __PYX_ERR(11, 85, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
  }

  /* "pyarrow/config.pxi":86
 *                                   compiler_flags=frombytes(c_cpp_info.compiler_flags),
 *                                   git_id=frombytes(c_cpp_info.git_id),
 *                                   git_description=frombytes(c_cpp_info.git_description),             # <<<<<<<<<<<<<<
 *                                   package_kind=frombytes(c_cpp_info.package_kind),
 *                                   build_type=frombytes(c_cpp_info.build_type).lower(),
*/
  __pyx_t_15 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_frombytes); if (unlikely(!__pyx_t_14)) __PYX_ERR(11, 86, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __pyx_t_16 = __pyx_convert_PyBytes_string_to_py_6libcpp_6string_std__in_string(__pyx_v_c_cpp_info->git_description); if (unlikely(!__pyx_t_16)) __PYX_ERR(11, 86, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_16);
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_14))) {
    __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_14);
    assert(__pyx_t_15);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_14);
    __Pyx_INCREF(__pyx_t_15);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_14, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_15, __pyx_t_16};
    __pyx_t_13 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_14, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    if (unlikely(!__pyx_t_13)) __PYX_ERR(11, 86, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
  }

  /* "pyarrow/config.pxi":87
 *                                   git_id=frombytes(c_cpp_info.git_id),
 *                                   git_description=frombytes(c_cpp_info.git_description),
 *                                   package_kind=frombytes(c_cpp_info.package_kind),             # <<<<<<<<<<<<<<
 *                                   build_type=frombytes(c_cpp_info.build_type).lower(),
 *                                   )
*/
  __pyx_t_16 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_15, __pyx_mstate_global->__pyx_n_u_frombytes); if (unlikely(!__pyx_t_15)) __PYX_ERR(11, 87, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  __pyx_t_17 = __pyx_convert_PyBytes_string_to_py_6libcpp_6string_std__in_string(__pyx_v_c_cpp_info->package_kind); if (unlikely(!__pyx_t_17)) __PYX_ERR(11, 87, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_17);
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_15))) {
    __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_15);
    assert(__pyx_t_16);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_15);
    __Pyx_INCREF(__pyx_t_16);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_15, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_16, __pyx_t_17};
    __pyx_t_14 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_15, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
    __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    if (unlikely(!__pyx_t_14)) __PYX_ERR(11, 87, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
  }

  /* "pyarrow/config.pxi":88
 *                                   git_description=frombytes(c_cpp_info.git_description),
 *                                   package_kind=frombytes(c_cpp_info.package_kind),
 *                                   build_type=frombytes(c_cpp_info.build_type).lower(),             # <<<<<<<<<<<<<<
 *                                   )
 * 
*/
  __pyx_t_18 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_19, __pyx_mstate_global->__pyx_n_u_frombytes); if (unlikely(!__pyx_t_19)) __PYX_ERR(11, 88, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __pyx_t_20 = __pyx_convert_PyBytes_string_to_py_6libcpp_6string_std__in_string(__pyx_v_c_cpp_info->build_type); if (unlikely(!__pyx_t_20)) __PYX_ERR(11, 88, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_20);
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_19))) {
    __pyx_t_18 = PyMethod_GET_SELF(__pyx_t_19);
    assert(__pyx_t_18);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_19);
    __Pyx_INCREF(__pyx_t_18);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_19, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_18, __pyx_t_20};
    __pyx_t_16 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_19, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
    __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
    __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
    if (unlikely(!__pyx_t_16)) __PYX_ERR(11, 88, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);
  }
  __pyx_t_17 = __pyx_t_16;
  __Pyx_INCREF(__pyx_t_17);
  __pyx_t_8 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_17, NULL};
    __pyx_t_15 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_lower, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
    if (unlikely(!__pyx_t_15)) __PYX_ERR(11, 88, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_15);
  }
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 11 : 0)] = {__pyx_t_2, NULL};
    __pyx_t_16 = __Pyx_MakeVectorcallBuilderKwds(11); if (unlikely(!__pyx_t_16)) __PYX_ERR(11, 75, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_version, __pyx_t_4, __pyx_t_16, __pyx_callargs+1, 0) < (0)) __PYX_ERR(11, 75, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_version_info, __pyx_t_6, __pyx_t_16, __pyx_callargs+1, 1) < (0)) __PYX_ERR(11, 75, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_so_version, __pyx_t_5, __pyx_t_16, __pyx_callargs+1, 2) < (0)) __PYX_ERR(11, 75, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_full_so_version, __pyx_t_10, __pyx_t_16, __pyx_callargs+1, 3) < (0)) __PYX_ERR(11, 75, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_compiler_id, __pyx_t_11, __pyx_t_16, __pyx_callargs+1, 4) < (0)) __PYX_ERR(11, 75, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_compiler_version, __pyx_t_9, __pyx_t_16, __pyx_callargs+1, 5) < (0)) __PYX_ERR(11, 75, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_compiler_flags, __pyx_t_7, __pyx_t_16, __pyx_callargs+1, 6) < (0)) __PYX_ERR(11, 75, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_git_id, __pyx_t_12, __pyx_t_16, __pyx_callargs+1, 7) < (0)) __PYX_ERR(11, 75, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_git_description, __pyx_t_13, __pyx_t_16, __pyx_callargs+1, 8) < (0)) __PYX_ERR(11, 75, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_package_kind, __pyx_t_14, __pyx_t_16, __pyx_callargs+1, 9) < (0)) __PYX_ERR(11, 75, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_build_type, __pyx_t_15, __pyx_t_16, __pyx_callargs+1, 10) < (0)) __PYX_ERR(11, 75, __pyx_L1_error)
    __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_16);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 75, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_cpp_build_info = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyarrow/config.pxi":91
 *                                   )
 * 
 *     return BuildInfo(build_type=c_info.build_type.decode('utf-8').lower(),             # <<<<<<<<<<<<<<
 *                      cpp_build_info=cpp_build_info)
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_16, __pyx_mstate_global->__pyx_n_u_BuildInfo); if (unlikely(!__pyx_t_16)) __PYX_ERR(11, 91, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_16);
  __pyx_t_13 = __Pyx_decode_cpp_string(__pyx_v_c_info->build_type, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_13)) __PYX_ERR(11, 91, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __pyx_t_14 = __pyx_t_13;
  __Pyx_INCREF(__pyx_t_14);
  __pyx_t_8 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_14, NULL};
    __pyx_t_15 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_lower, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    if (unlikely(!__pyx_t_15)) __PYX_ERR(11, 91, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_15);
  }

  /* "pyarrow/config.pxi":92
 * 
 *     return BuildInfo(build_type=c_info.build_type.decode('utf-8').lower(),
 *                      cpp_build_info=cpp_build_info)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_16))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_16);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_16);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_16, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_3, NULL};
    __pyx_t_13 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_13)) __PYX_ERR(11, 91, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_build_type, __pyx_t_15, __pyx_t_13, __pyx_callargs+1, 0) < (0)) __PYX_ERR(11, 91, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_cpp_build_info, __pyx_v_cpp_build_info, __pyx_t_13, __pyx_callargs+1, 1) < (0)) __PYX_ERR(11, 91, __pyx_L1_error)
    __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_16, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_13);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 91, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/config.pxi":60
 * 
 * 
 * def _build_info():             # <<<<<<<<<<<<<<
 *     """
 *     Get PyArrow build information.
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_XDECREF(__pyx_t_17);
  __Pyx_XDECREF(__pyx_t_18);
  __Pyx_XDECREF(__pyx_t_19);
  __Pyx_XDECREF(__pyx_t_20);
  __Pyx_AddTraceback("pyarrow.lib._build_info", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_cpp_build_info);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/config.pxi":101
 * 
 * 
 * def set_timezone_db_path(path):             # <<<<<<<<<<<<<<
 *     """
 *     Configure the path to text timezone database on Windows.
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_27set_timezone_db_path(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_26set_timezone_db_path, "set_timezone_db_path(path)\n\nConfigure the path to text timezone database on Windows.\n\nParameters\n----------\npath : str\n    Path to text timezone database.");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_27set_timezone_db_path = {"set_timezone_db_path", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_27set_timezone_db_path, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_26set_timezone_db_path};
static PyObject *__pyx_pw_7pyarrow_3lib_27set_timezone_db_path(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_path = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_timezone_db_path (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_path,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(11, 101, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(11, 101, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "set_timezone_db_path", 0) < (0)) __PYX_ERR(11, 101, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("set_timezone_db_path", 1, 1, 1, i); __PYX_ERR(11, 101, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(11, 101, __pyx_L3_error)
    }
    __pyx_v_path = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("set_timezone_db_path", 1, 1, 1, __pyx_nargs); __PYX_ERR(11, 101, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("pyarrow.lib.set_timezone_db_path", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyarrow_3lib_26set_timezone_db_path(__pyx_self, __pyx_v_path);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7pyarrow_3lib_26set_timezone_db_path(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_path) {
   arrow::GlobalOptions __pyx_v_options;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  std::string __pyx_t_6;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_timezone_db_path", 0);

  /* "pyarrow/config.pxi":113
 *         CGlobalOptions options
 * 
 *     if path is not None:             # <<<<<<<<<<<<<<
 *         options.timezone_db_path = <c_string>tobytes(path)
 * 
*/
  __pyx_t_1 = (__pyx_v_path != Py_None);
  if (__pyx_t_1) {

    /* "pyarrow/config.pxi":114
 * 
 *     if path is not None:
 *         options.timezone_db_path = <c_string>tobytes(path)             # <<<<<<<<<<<<<<
 * 
 *     check_status(Initialize(options))
*/
    __pyx_t_3 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_tobytes); if (unlikely(!__pyx_t_4)) __PYX_ERR(11, 114, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
      assert(__pyx_t_3);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
      __pyx_t_5 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_path};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 114, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __pyx_t_6 = __pyx_convert_string_from_py_6libcpp_6string_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(11, 114, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_options.timezone_db_path = ((std::optional<std::string> )((std::string)__pyx_t_6));

    /* "pyarrow/config.pxi":113
 *         CGlobalOptions options
 * 
 *     if path is not None:             # <<<<<<<<<<<<<<
 *         options.timezone_db_path = <c_string>tobytes(path)
 * 
*/
  }

  /* "pyarrow/config.pxi":116
 *         options.timezone_db_path = <c_string>tobytes(path)
 * 
 *     check_status(Initialize(options))             # <<<<<<<<<<<<<<
*/
  __pyx_t_7 = __pyx_f_7pyarrow_3lib_check_status(arrow::Initialize(__pyx_v_options)); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(11, 116, __pyx_L1_error)

  /* "pyarrow/config.pxi":101
 * 
 * 
 * def set_timezone_db_path(path):             # <<<<<<<<<<<<<<
 *     """
 *     Configure the path to text timezone database on Windows.
*/

  /* 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("pyarrow.lib.set_timezone_db_path", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/pandas-shim.pxi":43
 *         bint _is_v1, _is_ge_v21, _is_ge_v23, _is_ge_v3, _is_ge_v3_strict
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         self._lock = Lock()
 *         self._tried_importing_pandas = False
*/

/* Python wrapper */
static int __pyx_pw_7pyarrow_3lib_14_PandasAPIShim_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_7pyarrow_3lib_14_PandasAPIShim_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, __pyx_nargs); return -1; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return -1;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__init__", __pyx_kwds); return -1;}
  __pyx_r = __pyx_pf_7pyarrow_3lib_14_PandasAPIShim___init__(((struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *)__pyx_v_self));

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

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

  /* "pyarrow/pandas-shim.pxi":44
 * 
 *     def __init__(self):
 *         self._lock = Lock()             # <<<<<<<<<<<<<<
 *         self._tried_importing_pandas = False
 *         self._have_pandas = 0
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Lock); if (unlikely(!__pyx_t_3)) __PYX_ERR(12, 44, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 44, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_lock");
    __PYX_ERR(12, 44, __pyx_L1_error)
  }
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_lock);
  __Pyx_DECREF(__pyx_v_self->_lock);
  __pyx_v_self->_lock = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyarrow/pandas-shim.pxi":45
 *     def __init__(self):
 *         self._lock = Lock()
 *         self._tried_importing_pandas = False             # <<<<<<<<<<<<<<
 *         self._have_pandas = 0
 * 
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_tried_importing_pandas");
    __PYX_ERR(12, 45, __pyx_L1_error)
  }
  __pyx_v_self->_tried_importing_pandas = 0;

  /* "pyarrow/pandas-shim.pxi":46
 *         self._lock = Lock()
 *         self._tried_importing_pandas = False
 *         self._have_pandas = 0             # <<<<<<<<<<<<<<
 * 
 *     cdef _import_pandas(self, bint raise_):
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_have_pandas");
    __PYX_ERR(12, 46, __pyx_L1_error)
  }
  __pyx_v_self->_have_pandas = 0;

  /* "pyarrow/pandas-shim.pxi":43
 *         bint _is_v1, _is_ge_v21, _is_ge_v23, _is_ge_v3, _is_ge_v3_strict
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         self._lock = Lock()
 *         self._tried_importing_pandas = False
*/

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

/* "pyarrow/pandas-shim.pxi":48
 *         self._have_pandas = 0
 * 
 *     cdef _import_pandas(self, bint raise_):             # <<<<<<<<<<<<<<
 *         try:
 *             import pandas as pd
*/

static PyObject *__pyx_f_7pyarrow_3lib_14_PandasAPIShim__import_pandas(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self, int __pyx_v_raise_) {
  PyObject *__pyx_v_pd = NULL;
  PyObject *__pyx_v_pdcompat = NULL;
  PyObject *__pyx_v_Version = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  Py_ssize_t __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  size_t __pyx_t_12;
  int __pyx_t_13;
  PyObject *__pyx_t_14[3];
  PyObject *__pyx_t_15 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_import_pandas", 0);

  /* "pyarrow/pandas-shim.pxi":49
 * 
 *     cdef _import_pandas(self, bint raise_):
 *         try:             # <<<<<<<<<<<<<<
 *             import pandas as pd
 *             import pyarrow.pandas_compat as pdcompat
*/
  {
    __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:*/ {

      /* "pyarrow/pandas-shim.pxi":50
 *     cdef _import_pandas(self, bint raise_):
 *         try:
 *             import pandas as pd             # <<<<<<<<<<<<<<
 *             import pyarrow.pandas_compat as pdcompat
 *         except ImportError:
*/
      __pyx_t_5 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_pandas, 0, 0, NULL, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(12, 50, __pyx_L3_error)
      __pyx_t_4 = __pyx_t_5;
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_v_pd = __pyx_t_4;
      __pyx_t_4 = 0;

      /* "pyarrow/pandas-shim.pxi":51
 *         try:
 *             import pandas as pd
 *             import pyarrow.pandas_compat as pdcompat             # <<<<<<<<<<<<<<
 *         except ImportError:
 *             self._have_pandas = False
*/
      __pyx_t_5 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_pyarrow_pandas_compat, 0, 0, NULL, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(12, 51, __pyx_L3_error)
      __pyx_t_6 = __Pyx_ImportFrom(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pandas_compat);
      Py_DECREF(__pyx_t_5);
      if (unlikely(!__pyx_t_6)) __PYX_ERR(12, 51, __pyx_L3_error)
      __pyx_t_5 = __pyx_t_6;
      __pyx_t_4 = __pyx_t_5;
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_v_pdcompat = __pyx_t_4;
      __pyx_t_4 = 0;

      /* "pyarrow/pandas-shim.pxi":49
 * 
 *     cdef _import_pandas(self, bint raise_):
 *         try:             # <<<<<<<<<<<<<<
 *             import pandas as pd
 *             import pyarrow.pandas_compat as pdcompat
*/
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L8_try_end;
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "pyarrow/pandas-shim.pxi":52
 *             import pandas as pd
 *             import pyarrow.pandas_compat as pdcompat
 *         except ImportError:             # <<<<<<<<<<<<<<
 *             self._have_pandas = False
 *             if raise_:
*/
    __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_ImportError))));
    if (__pyx_t_7) {
      __Pyx_AddTraceback("pyarrow.lib._PandasAPIShim._import_pandas", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_8, &__pyx_t_9) < 0) __PYX_ERR(12, 52, __pyx_L5_except_error)
      __Pyx_XGOTREF(__pyx_t_4);
      __Pyx_XGOTREF(__pyx_t_8);
      __Pyx_XGOTREF(__pyx_t_9);

      /* "pyarrow/pandas-shim.pxi":53
 *             import pyarrow.pandas_compat as pdcompat
 *         except ImportError:
 *             self._have_pandas = False             # <<<<<<<<<<<<<<
 *             if raise_:
 *                 raise
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_have_pandas");
        __PYX_ERR(12, 53, __pyx_L5_except_error)
      }
      __pyx_v_self->_have_pandas = 0;

      /* "pyarrow/pandas-shim.pxi":54
 *         except ImportError:
 *             self._have_pandas = False
 *             if raise_:             # <<<<<<<<<<<<<<
 *                 raise
 *             else:
*/
      if (unlikely(__pyx_v_raise_)) {

        /* "pyarrow/pandas-shim.pxi":55
 *             self._have_pandas = False
 *             if raise_:
 *                 raise             # <<<<<<<<<<<<<<
 *             else:
 *                 return
*/
        __Pyx_GIVEREF(__pyx_t_4);
        __Pyx_GIVEREF(__pyx_t_8);
        __Pyx_XGIVEREF(__pyx_t_9);
        __Pyx_ErrRestoreWithState(__pyx_t_4, __pyx_t_8, __pyx_t_9);
        __pyx_t_4 = 0;  __pyx_t_8 = 0;  __pyx_t_9 = 0; 
        __PYX_ERR(12, 55, __pyx_L5_except_error)

        /* "pyarrow/pandas-shim.pxi":54
 *         except ImportError:
 *             self._have_pandas = False
 *             if raise_:             # <<<<<<<<<<<<<<
 *                 raise
 *             else:
*/
      }

      /* "pyarrow/pandas-shim.pxi":57
 *                 raise
 *             else:
 *                 return             # <<<<<<<<<<<<<<
 * 
 *         from pyarrow.vendored.version import Version
*/
      /*else*/ {
        __Pyx_XDECREF(__pyx_r);
        __pyx_r = Py_None; __Pyx_INCREF(Py_None);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        goto __pyx_L6_except_return;
      }
    }
    goto __pyx_L5_except_error;

    /* "pyarrow/pandas-shim.pxi":49
 * 
 *     cdef _import_pandas(self, bint raise_):
 *         try:             # <<<<<<<<<<<<<<
 *             import pandas as pd
 *             import pyarrow.pandas_compat as pdcompat
*/
    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L6_except_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
    __pyx_L8_try_end:;
  }

  /* "pyarrow/pandas-shim.pxi":59
 *                 return
 * 
 *         from pyarrow.vendored.version import Version             # <<<<<<<<<<<<<<
 * 
 *         self._pd = pd
*/
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Version};
    __pyx_t_3 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_pyarrow_vendored_version, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(12, 59, __pyx_L1_error)
  }
  __pyx_t_9 = __pyx_t_3;
  __Pyx_GOTREF(__pyx_t_9);
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Version};
    __pyx_t_10 = 0; {
      __pyx_t_8 = __Pyx_ImportFrom(__pyx_t_9, __pyx_imported_names[__pyx_t_10]); if (unlikely(!__pyx_t_8)) __PYX_ERR(12, 59, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      switch (__pyx_t_10) {
        case 0:
        __Pyx_INCREF(__pyx_t_8);
        __pyx_v_Version = __pyx_t_8;
        break;
        default:;
      }
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "pyarrow/pandas-shim.pxi":61
 *         from pyarrow.vendored.version import Version
 * 
 *         self._pd = pd             # <<<<<<<<<<<<<<
 *         self._version = pd.__version__
 *         self._loose_version = Version(pd.__version__)
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_pd");
    __PYX_ERR(12, 61, __pyx_L1_error)
  }
  __Pyx_INCREF(__pyx_v_pd);
  __Pyx_GIVEREF(__pyx_v_pd);
  __Pyx_GOTREF(__pyx_v_self->_pd);
  __Pyx_DECREF(__pyx_v_self->_pd);
  __pyx_v_self->_pd = __pyx_v_pd;

  /* "pyarrow/pandas-shim.pxi":62
 * 
 *         self._pd = pd
 *         self._version = pd.__version__             # <<<<<<<<<<<<<<
 *         self._loose_version = Version(pd.__version__)
 *         self._is_v1 = False
*/
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_pd, __pyx_mstate_global->__pyx_n_u_version_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(12, 62, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_version");
    __PYX_ERR(12, 62, __pyx_L1_error)
  }
  __Pyx_GIVEREF(__pyx_t_9);
  __Pyx_GOTREF(__pyx_v_self->_version);
  __Pyx_DECREF(__pyx_v_self->_version);
  __pyx_v_self->_version = __pyx_t_9;
  __pyx_t_9 = 0;

  /* "pyarrow/pandas-shim.pxi":63
 *         self._pd = pd
 *         self._version = pd.__version__
 *         self._loose_version = Version(pd.__version__)             # <<<<<<<<<<<<<<
 *         self._is_v1 = False
 * 
*/
  __pyx_t_8 = NULL;
  __Pyx_INCREF(__pyx_v_Version);
  __pyx_t_4 = __pyx_v_Version; 
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_pd, __pyx_mstate_global->__pyx_n_u_version_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(12, 63, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_12 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_8);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_8);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_12 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_11};
    __pyx_t_9 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_9)) __PYX_ERR(12, 63, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
  }
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_loose_version");
    __PYX_ERR(12, 63, __pyx_L1_error)
  }
  __Pyx_GIVEREF(__pyx_t_9);
  __Pyx_GOTREF(__pyx_v_self->_loose_version);
  __Pyx_DECREF(__pyx_v_self->_loose_version);
  __pyx_v_self->_loose_version = __pyx_t_9;
  __pyx_t_9 = 0;

  /* "pyarrow/pandas-shim.pxi":64
 *         self._version = pd.__version__
 *         self._loose_version = Version(pd.__version__)
 *         self._is_v1 = False             # <<<<<<<<<<<<<<
 * 
 *         if self._loose_version < Version('1.0.0'):
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_is_v1");
    __PYX_ERR(12, 64, __pyx_L1_error)
  }
  __pyx_v_self->_is_v1 = 0;

  /* "pyarrow/pandas-shim.pxi":66
 *         self._is_v1 = False
 * 
 *         if self._loose_version < Version('1.0.0'):             # <<<<<<<<<<<<<<
 *             self._have_pandas = False
 *             if raise_:
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_loose_version");
    __PYX_ERR(12, 66, __pyx_L1_error)
  }
  __pyx_t_4 = NULL;
  __Pyx_INCREF(__pyx_v_Version);
  __pyx_t_11 = __pyx_v_Version; 
  __pyx_t_12 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_11))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_11);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_11);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_11, __pyx__function);
    __pyx_t_12 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_1_0_0};
    __pyx_t_9 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_11, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    if (unlikely(!__pyx_t_9)) __PYX_ERR(12, 66, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
  }
  __pyx_t_11 = PyObject_RichCompare(__pyx_v_self->_loose_version, __pyx_t_9, Py_LT); __Pyx_XGOTREF(__pyx_t_11); if (unlikely(!__pyx_t_11)) __PYX_ERR(12, 66, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(12, 66, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  if (__pyx_t_13) {

    /* "pyarrow/pandas-shim.pxi":67
 * 
 *         if self._loose_version < Version('1.0.0'):
 *             self._have_pandas = False             # <<<<<<<<<<<<<<
 *             if raise_:
 *                 raise ImportError(
*/
    if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_have_pandas");
      __PYX_ERR(12, 67, __pyx_L1_error)
    }
    __pyx_v_self->_have_pandas = 0;

    /* "pyarrow/pandas-shim.pxi":68
 *         if self._loose_version < Version('1.0.0'):
 *             self._have_pandas = False
 *             if raise_:             # <<<<<<<<<<<<<<
 *                 raise ImportError(
 *                     f"pyarrow requires pandas 1.0.0 or above, pandas {self._version} is "
*/
    if (unlikely(__pyx_v_raise_)) {

      /* "pyarrow/pandas-shim.pxi":69
 *             self._have_pandas = False
 *             if raise_:
 *                 raise ImportError(             # <<<<<<<<<<<<<<
 *                     f"pyarrow requires pandas 1.0.0 or above, pandas {self._version} is "
 *                     "installed"
*/
      __pyx_t_9 = NULL;

      /* "pyarrow/pandas-shim.pxi":70
 *             if raise_:
 *                 raise ImportError(
 *                     f"pyarrow requires pandas 1.0.0 or above, pandas {self._version} is "             # <<<<<<<<<<<<<<
 *                     "installed"
 *                 )
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_version");
        __PYX_ERR(12, 70, __pyx_L1_error)
      }
      __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_v_self->_version, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(12, 70, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_14[0] = __pyx_mstate_global->__pyx_kp_u_pyarrow_requires_pandas_1_0_0_or;
      __pyx_t_14[1] = __pyx_t_4;
      __pyx_t_14[2] = __pyx_mstate_global->__pyx_kp_u_is_installed;
      __pyx_t_8 = __Pyx_PyUnicode_Join(__pyx_t_14, 3, 47 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + 13, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4));
      if (unlikely(!__pyx_t_8)) __PYX_ERR(12, 70, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_12 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_8};
        __pyx_t_11 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ImportError)), __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (unlikely(!__pyx_t_11)) __PYX_ERR(12, 69, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
      }
      __Pyx_Raise(__pyx_t_11, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __PYX_ERR(12, 69, __pyx_L1_error)

      /* "pyarrow/pandas-shim.pxi":68
 *         if self._loose_version < Version('1.0.0'):
 *             self._have_pandas = False
 *             if raise_:             # <<<<<<<<<<<<<<
 *                 raise ImportError(
 *                     f"pyarrow requires pandas 1.0.0 or above, pandas {self._version} is "
*/
    }

    /* "pyarrow/pandas-shim.pxi":74
 *                 )
 *             else:
 *                 warnings.warn(             # <<<<<<<<<<<<<<
 *                     f"pyarrow requires pandas 1.0.0 or above, pandas {self._version} is "
 *                     "installed. Therefore, pandas-specific integration is not "
*/
    /*else*/ {
      __pyx_t_8 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_warnings); if (unlikely(!__pyx_t_9)) __PYX_ERR(12, 74, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_warn); if (unlikely(!__pyx_t_4)) __PYX_ERR(12, 74, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

      /* "pyarrow/pandas-shim.pxi":75
 *             else:
 *                 warnings.warn(
 *                     f"pyarrow requires pandas 1.0.0 or above, pandas {self._version} is "             # <<<<<<<<<<<<<<
 *                     "installed. Therefore, pandas-specific integration is not "
 *                     "used.",
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_version");
        __PYX_ERR(12, 75, __pyx_L1_error)
      }
      __pyx_t_9 = __Pyx_PyObject_FormatSimple(__pyx_v_self->_version, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(12, 75, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_14[0] = __pyx_mstate_global->__pyx_kp_u_pyarrow_requires_pandas_1_0_0_or;
      __pyx_t_14[1] = __pyx_t_9;
      __pyx_t_14[2] = __pyx_mstate_global->__pyx_kp_u_is_installed_Therefore_pandas_s;
      __pyx_t_15 = __Pyx_PyUnicode_Join(__pyx_t_14, 3, 47 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9) + 66, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9));
      if (unlikely(!__pyx_t_15)) __PYX_ERR(12, 75, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_15);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_12 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4);
        assert(__pyx_t_8);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
        __pyx_t_12 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_8, __pyx_t_15};
        __pyx_t_9 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(12, 74, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_stacklevel, __pyx_mstate_global->__pyx_int_2, __pyx_t_9, __pyx_callargs+2, 0) < (0)) __PYX_ERR(12, 74, __pyx_L1_error)
        __pyx_t_11 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_9);
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_11)) __PYX_ERR(12, 74, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
      }
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

      /* "pyarrow/pandas-shim.pxi":80
 *                     stacklevel=2
 *                 )
 *                 return             # <<<<<<<<<<<<<<
 * 
 *         self._is_v1 = self._loose_version < Version('2.0.0')
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      goto __pyx_L0;
    }

    /* "pyarrow/pandas-shim.pxi":66
 *         self._is_v1 = False
 * 
 *         if self._loose_version < Version('1.0.0'):             # <<<<<<<<<<<<<<
 *             self._have_pandas = False
 *             if raise_:
*/
  }

  /* "pyarrow/pandas-shim.pxi":82
 *                 return
 * 
 *         self._is_v1 = self._loose_version < Version('2.0.0')             # <<<<<<<<<<<<<<
 *         self._is_ge_v21 = self._loose_version >= Version('2.1.0')
 *         self._is_ge_v23 = self._loose_version >= Version('2.3.0.dev0')
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_loose_version");
    __PYX_ERR(12, 82, __pyx_L1_error)
  }
  __pyx_t_4 = NULL;
  __Pyx_INCREF(__pyx_v_Version);
  __pyx_t_9 = __pyx_v_Version; 
  __pyx_t_12 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_9))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_9);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_9);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_9, __pyx__function);
    __pyx_t_12 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_2_0_0};
    __pyx_t_11 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_11)) __PYX_ERR(12, 82, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
  }
  __pyx_t_9 = PyObject_RichCompare(__pyx_v_self->_loose_version, __pyx_t_11, Py_LT); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(12, 82, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) __PYX_ERR(12, 82, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_is_v1");
    __PYX_ERR(12, 82, __pyx_L1_error)
  }
  __pyx_v_self->_is_v1 = __pyx_t_13;

  /* "pyarrow/pandas-shim.pxi":83
 * 
 *         self._is_v1 = self._loose_version < Version('2.0.0')
 *         self._is_ge_v21 = self._loose_version >= Version('2.1.0')             # <<<<<<<<<<<<<<
 *         self._is_ge_v23 = self._loose_version >= Version('2.3.0.dev0')
 *         self._is_ge_v3 = self._loose_version >= Version('3.0.0.dev0')
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_loose_version");
    __PYX_ERR(12, 83, __pyx_L1_error)
  }
  __pyx_t_11 = NULL;
  __Pyx_INCREF(__pyx_v_Version);
  __pyx_t_4 = __pyx_v_Version; 
  __pyx_t_12 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_11);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_11);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_12 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_mstate_global->__pyx_kp_u_2_1_0};
    __pyx_t_9 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_9)) __PYX_ERR(12, 83, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
  }
  __pyx_t_4 = PyObject_RichCompare(__pyx_v_self->_loose_version, __pyx_t_9, Py_GE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(12, 83, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) __PYX_ERR(12, 83, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_is_ge_v21");
    __PYX_ERR(12, 83, __pyx_L1_error)
  }
  __pyx_v_self->_is_ge_v21 = __pyx_t_13;

  /* "pyarrow/pandas-shim.pxi":84
 *         self._is_v1 = self._loose_version < Version('2.0.0')
 *         self._is_ge_v21 = self._loose_version >= Version('2.1.0')
 *         self._is_ge_v23 = self._loose_version >= Version('2.3.0.dev0')             # <<<<<<<<<<<<<<
 *         self._is_ge_v3 = self._loose_version >= Version('3.0.0.dev0')
 *         self._is_ge_v3_strict = self._loose_version >= Version('3.0.0')
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_loose_version");
    __PYX_ERR(12, 84, __pyx_L1_error)
  }
  __pyx_t_9 = NULL;
  __Pyx_INCREF(__pyx_v_Version);
  __pyx_t_11 = __pyx_v_Version; 
  __pyx_t_12 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_11))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_11);
    assert(__pyx_t_9);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_11);
    __Pyx_INCREF(__pyx_t_9);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_11, __pyx__function);
    __pyx_t_12 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_mstate_global->__pyx_kp_u_2_3_0_dev0};
    __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_11, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(12, 84, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  __pyx_t_11 = PyObject_RichCompare(__pyx_v_self->_loose_version, __pyx_t_4, Py_GE); __Pyx_XGOTREF(__pyx_t_11); if (unlikely(!__pyx_t_11)) __PYX_ERR(12, 84, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) __PYX_ERR(12, 84, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_is_ge_v23");
    __PYX_ERR(12, 84, __pyx_L1_error)
  }
  __pyx_v_self->_is_ge_v23 = __pyx_t_13;

  /* "pyarrow/pandas-shim.pxi":85
 *         self._is_ge_v21 = self._loose_version >= Version('2.1.0')
 *         self._is_ge_v23 = self._loose_version >= Version('2.3.0.dev0')
 *         self._is_ge_v3 = self._loose_version >= Version('3.0.0.dev0')             # <<<<<<<<<<<<<<
 *         self._is_ge_v3_strict = self._loose_version >= Version('3.0.0')
 * 
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_loose_version");
    __PYX_ERR(12, 85, __pyx_L1_error)
  }
  __pyx_t_4 = NULL;
  __Pyx_INCREF(__pyx_v_Version);
  __pyx_t_9 = __pyx_v_Version; 
  __pyx_t_12 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_9))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_9);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_9);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_9, __pyx__function);
    __pyx_t_12 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_3_0_0_dev0};
    __pyx_t_11 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_11)) __PYX_ERR(12, 85, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
  }
  __pyx_t_9 = PyObject_RichCompare(__pyx_v_self->_loose_version, __pyx_t_11, Py_GE); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(12, 85, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) __PYX_ERR(12, 85, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_is_ge_v3");
    __PYX_ERR(12, 85, __pyx_L1_error)
  }
  __pyx_v_self->_is_ge_v3 = __pyx_t_13;

  /* "pyarrow/pandas-shim.pxi":86
 *         self._is_ge_v23 = self._loose_version >= Version('2.3.0.dev0')
 *         self._is_ge_v3 = self._loose_version >= Version('3.0.0.dev0')
 *         self._is_ge_v3_strict = self._loose_version >= Version('3.0.0')             # <<<<<<<<<<<<<<
 * 
 *         self._compat_module = pdcompat
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_loose_version");
    __PYX_ERR(12, 86, __pyx_L1_error)
  }
  __pyx_t_11 = NULL;
  __Pyx_INCREF(__pyx_v_Version);
  __pyx_t_4 = __pyx_v_Version; 
  __pyx_t_12 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_11);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_11);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_12 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_mstate_global->__pyx_kp_u_3_0_0};
    __pyx_t_9 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_9)) __PYX_ERR(12, 86, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
  }
  __pyx_t_4 = PyObject_RichCompare(__pyx_v_self->_loose_version, __pyx_t_9, Py_GE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(12, 86, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) __PYX_ERR(12, 86, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_is_ge_v3_strict");
    __PYX_ERR(12, 86, __pyx_L1_error)
  }
  __pyx_v_self->_is_ge_v3_strict = __pyx_t_13;

  /* "pyarrow/pandas-shim.pxi":88
 *         self._is_ge_v3_strict = self._loose_version >= Version('3.0.0')
 * 
 *         self._compat_module = pdcompat             # <<<<<<<<<<<<<<
 *         self._data_frame = pd.DataFrame
 *         self._index = pd.Index
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_compat_module");
    __PYX_ERR(12, 88, __pyx_L1_error)
  }
  __Pyx_INCREF(__pyx_v_pdcompat);
  __Pyx_GIVEREF(__pyx_v_pdcompat);
  __Pyx_GOTREF(__pyx_v_self->_compat_module);
  __Pyx_DECREF(__pyx_v_self->_compat_module);
  __pyx_v_self->_compat_module = __pyx_v_pdcompat;

  /* "pyarrow/pandas-shim.pxi":89
 * 
 *         self._compat_module = pdcompat
 *         self._data_frame = pd.DataFrame             # <<<<<<<<<<<<<<
 *         self._index = pd.Index
 *         self._categorical_type = pd.Categorical
*/
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_pd, __pyx_mstate_global->__pyx_n_u_DataFrame); if (unlikely(!__pyx_t_4)) __PYX_ERR(12, 89, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_data_frame");
    __PYX_ERR(12, 89, __pyx_L1_error)
  }
  __Pyx_GIVEREF(__pyx_t_4);
  __Pyx_GOTREF(__pyx_v_self->_data_frame);
  __Pyx_DECREF(__pyx_v_self->_data_frame);
  __pyx_v_self->_data_frame = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "pyarrow/pandas-shim.pxi":90
 *         self._compat_module = pdcompat
 *         self._data_frame = pd.DataFrame
 *         self._index = pd.Index             # <<<<<<<<<<<<<<
 *         self._categorical_type = pd.Categorical
 *         self._series = pd.Series
*/
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_pd, __pyx_mstate_global->__pyx_n_u_Index); if (unlikely(!__pyx_t_4)) __PYX_ERR(12, 90, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_index");
    __PYX_ERR(12, 90, __pyx_L1_error)
  }
  __Pyx_GIVEREF(__pyx_t_4);
  __Pyx_GOTREF(__pyx_v_self->_index);
  __Pyx_DECREF(__pyx_v_self->_index);
  __pyx_v_self->_index = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "pyarrow/pandas-shim.pxi":91
 *         self._data_frame = pd.DataFrame
 *         self._index = pd.Index
 *         self._categorical_type = pd.Categorical             # <<<<<<<<<<<<<<
 *         self._series = pd.Series
 *         self._extension_array = pd.api.extensions.ExtensionArray
*/
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_pd, __pyx_mstate_global->__pyx_n_u_Categorical); if (unlikely(!__pyx_t_4)) __PYX_ERR(12, 91, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_categorical_type");
    __PYX_ERR(12, 91, __pyx_L1_error)
  }
  __Pyx_GIVEREF(__pyx_t_4);
  __Pyx_GOTREF(__pyx_v_self->_categorical_type);
  __Pyx_DECREF(__pyx_v_self->_categorical_type);
  __pyx_v_self->_categorical_type = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "pyarrow/pandas-shim.pxi":92
 *         self._index = pd.Index
 *         self._categorical_type = pd.Categorical
 *         self._series = pd.Series             # <<<<<<<<<<<<<<
 *         self._extension_array = pd.api.extensions.ExtensionArray
 *         self._array_like_types = (
*/
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_pd, __pyx_mstate_global->__pyx_n_u_Series); if (unlikely(!__pyx_t_4)) __PYX_ERR(12, 92, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_series");
    __PYX_ERR(12, 92, __pyx_L1_error)
  }
  __Pyx_GIVEREF(__pyx_t_4);
  __Pyx_GOTREF(__pyx_v_self->_series);
  __Pyx_DECREF(__pyx_v_self->_series);
  __pyx_v_self->_series = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "pyarrow/pandas-shim.pxi":93
 *         self._categorical_type = pd.Categorical
 *         self._series = pd.Series
 *         self._extension_array = pd.api.extensions.ExtensionArray             # <<<<<<<<<<<<<<
 *         self._array_like_types = (
 *             self._series, self._index, self._categorical_type,
*/
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_pd, __pyx_mstate_global->__pyx_n_u_api); if (unlikely(!__pyx_t_4)) __PYX_ERR(12, 93, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_extensions); if (unlikely(!__pyx_t_9)) __PYX_ERR(12, 93, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_ExtensionArray); if (unlikely(!__pyx_t_4)) __PYX_ERR(12, 93, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_extension_array");
    __PYX_ERR(12, 93, __pyx_L1_error)
  }
  __Pyx_GIVEREF(__pyx_t_4);
  __Pyx_GOTREF(__pyx_v_self->_extension_array);
  __Pyx_DECREF(__pyx_v_self->_extension_array);
  __pyx_v_self->_extension_array = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "pyarrow/pandas-shim.pxi":95
 *         self._extension_array = pd.api.extensions.ExtensionArray
 *         self._array_like_types = (
 *             self._series, self._index, self._categorical_type,             # <<<<<<<<<<<<<<
 *             self._extension_array)
 *         self._extension_dtype = pd.api.extensions.ExtensionDtype
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_series");
    __PYX_ERR(12, 95, __pyx_L1_error)
  }
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_index");
    __PYX_ERR(12, 95, __pyx_L1_error)
  }
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_categorical_type");
    __PYX_ERR(12, 95, __pyx_L1_error)
  }

  /* "pyarrow/pandas-shim.pxi":96
 *         self._array_like_types = (
 *             self._series, self._index, self._categorical_type,
 *             self._extension_array)             # <<<<<<<<<<<<<<
 *         self._extension_dtype = pd.api.extensions.ExtensionDtype
 *         self._is_extension_array_dtype = (
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_extension_array");
    __PYX_ERR(12, 96, __pyx_L1_error)
  }

  /* "pyarrow/pandas-shim.pxi":95
 *         self._extension_array = pd.api.extensions.ExtensionArray
 *         self._array_like_types = (
 *             self._series, self._index, self._categorical_type,             # <<<<<<<<<<<<<<
 *             self._extension_array)
 *         self._extension_dtype = pd.api.extensions.ExtensionDtype
*/
  __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(12, 95, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_v_self->_series);
  __Pyx_GIVEREF(__pyx_v_self->_series);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_self->_series) != (0)) __PYX_ERR(12, 95, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_self->_index);
  __Pyx_GIVEREF(__pyx_v_self->_index);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_self->_index) != (0)) __PYX_ERR(12, 95, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_self->_categorical_type);
  __Pyx_GIVEREF(__pyx_v_self->_categorical_type);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_self->_categorical_type) != (0)) __PYX_ERR(12, 95, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_self->_extension_array);
  __Pyx_GIVEREF(__pyx_v_self->_extension_array);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_v_self->_extension_array) != (0)) __PYX_ERR(12, 95, __pyx_L1_error);

  /* "pyarrow/pandas-shim.pxi":94
 *         self._series = pd.Series
 *         self._extension_array = pd.api.extensions.ExtensionArray
 *         self._array_like_types = (             # <<<<<<<<<<<<<<
 *             self._series, self._index, self._categorical_type,
 *             self._extension_array)
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_array_like_types");
    __PYX_ERR(12, 94, __pyx_L1_error)
  }
  __Pyx_GIVEREF(__pyx_t_4);
  __Pyx_GOTREF(__pyx_v_self->_array_like_types);
  __Pyx_DECREF(__pyx_v_self->_array_like_types);
  __pyx_v_self->_array_like_types = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "pyarrow/pandas-shim.pxi":97
 *             self._series, self._index, self._categorical_type,
 *             self._extension_array)
 *         self._extension_dtype = pd.api.extensions.ExtensionDtype             # <<<<<<<<<<<<<<
 *         self._is_extension_array_dtype = (
 *             pd.api.types.is_extension_array_dtype)
*/
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_pd, __pyx_mstate_global->__pyx_n_u_api); if (unlikely(!__pyx_t_4)) __PYX_ERR(12, 97, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_extensions); if (unlikely(!__pyx_t_9)) __PYX_ERR(12, 97, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_ExtensionDtype); if (unlikely(!__pyx_t_4)) __PYX_ERR(12, 97, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_extension_dtype");
    __PYX_ERR(12, 97, __pyx_L1_error)
  }
  __Pyx_GIVEREF(__pyx_t_4);
  __Pyx_GOTREF(__pyx_v_self->_extension_dtype);
  __Pyx_DECREF(__pyx_v_self->_extension_dtype);
  __pyx_v_self->_extension_dtype = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "pyarrow/pandas-shim.pxi":99
 *         self._extension_dtype = pd.api.extensions.ExtensionDtype
 *         self._is_extension_array_dtype = (
 *             pd.api.types.is_extension_array_dtype)             # <<<<<<<<<<<<<<
 *         self._types_api = pd.api.types
 *         self._datetimetz_type = pd.api.types.DatetimeTZDtype
*/
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_pd, __pyx_mstate_global->__pyx_n_u_api); if (unlikely(!__pyx_t_4)) __PYX_ERR(12, 99, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_types); if (unlikely(!__pyx_t_9)) __PYX_ERR(12, 99, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_is_extension_array_dtype); if (unlikely(!__pyx_t_4)) __PYX_ERR(12, 99, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "pyarrow/pandas-shim.pxi":98
 *             self._extension_array)
 *         self._extension_dtype = pd.api.extensions.ExtensionDtype
 *         self._is_extension_array_dtype = (             # <<<<<<<<<<<<<<
 *             pd.api.types.is_extension_array_dtype)
 *         self._types_api = pd.api.types
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_is_extension_array_dtype");
    __PYX_ERR(12, 98, __pyx_L1_error)
  }
  __Pyx_GIVEREF(__pyx_t_4);
  __Pyx_GOTREF(__pyx_v_self->_is_extension_array_dtype);
  __Pyx_DECREF(__pyx_v_self->_is_extension_array_dtype);
  __pyx_v_self->_is_extension_array_dtype = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "pyarrow/pandas-shim.pxi":100
 *         self._is_extension_array_dtype = (
 *             pd.api.types.is_extension_array_dtype)
 *         self._types_api = pd.api.types             # <<<<<<<<<<<<<<
 *         self._datetimetz_type = pd.api.types.DatetimeTZDtype
 *         self._have_pandas = True
*/
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_pd, __pyx_mstate_global->__pyx_n_u_api); if (unlikely(!__pyx_t_4)) __PYX_ERR(12, 100, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_types); if (unlikely(!__pyx_t_9)) __PYX_ERR(12, 100, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_types_api");
    __PYX_ERR(12, 100, __pyx_L1_error)
  }
  __Pyx_GIVEREF(__pyx_t_9);
  __Pyx_GOTREF(__pyx_v_self->_types_api);
  __Pyx_DECREF(__pyx_v_self->_types_api);
  __pyx_v_self->_types_api = __pyx_t_9;
  __pyx_t_9 = 0;

  /* "pyarrow/pandas-shim.pxi":101
 *             pd.api.types.is_extension_array_dtype)
 *         self._types_api = pd.api.types
 *         self._datetimetz_type = pd.api.types.DatetimeTZDtype             # <<<<<<<<<<<<<<
 *         self._have_pandas = True
 *         self.has_sparse = False
*/
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_pd, __pyx_mstate_global->__pyx_n_u_api); if (unlikely(!__pyx_t_9)) __PYX_ERR(12, 101, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_types); if (unlikely(!__pyx_t_4)) __PYX_ERR(12, 101, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_DatetimeTZDtype); if (unlikely(!__pyx_t_9)) __PYX_ERR(12, 101, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_datetimetz_type");
    __PYX_ERR(12, 101, __pyx_L1_error)
  }
  __Pyx_GIVEREF(__pyx_t_9);
  __Pyx_GOTREF(__pyx_v_self->_datetimetz_type);
  __Pyx_DECREF(__pyx_v_self->_datetimetz_type);
  __pyx_v_self->_datetimetz_type = __pyx_t_9;
  __pyx_t_9 = 0;

  /* "pyarrow/pandas-shim.pxi":102
 *         self._types_api = pd.api.types
 *         self._datetimetz_type = pd.api.types.DatetimeTZDtype
 *         self._have_pandas = True             # <<<<<<<<<<<<<<
 *         self.has_sparse = False
 * 
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_have_pandas");
    __PYX_ERR(12, 102, __pyx_L1_error)
  }
  __pyx_v_self->_have_pandas = 1;

  /* "pyarrow/pandas-shim.pxi":103
 *         self._datetimetz_type = pd.api.types.DatetimeTZDtype
 *         self._have_pandas = True
 *         self.has_sparse = False             # <<<<<<<<<<<<<<
 * 
 *     cdef inline _check_import(self, bint raise_=True):
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "has_sparse");
    __PYX_ERR(12, 103, __pyx_L1_error)
  }
  __pyx_v_self->has_sparse = 0;

  /* "pyarrow/pandas-shim.pxi":48
 *         self._have_pandas = 0
 * 
 *     cdef _import_pandas(self, bint raise_):             # <<<<<<<<<<<<<<
 *         try:
 *             import pandas as pd
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_AddTraceback("pyarrow.lib._PandasAPIShim._import_pandas", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pd);
  __Pyx_XDECREF(__pyx_v_pdcompat);
  __Pyx_XDECREF(__pyx_v_Version);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/pandas-shim.pxi":105
 *         self.has_sparse = False
 * 
 *     cdef inline _check_import(self, bint raise_=True):             # <<<<<<<<<<<<<<
 *         if not self._tried_importing_pandas:
 *             with self._lock:
*/

static CYTHON_INLINE PyObject *__pyx_f_7pyarrow_3lib_14_PandasAPIShim__check_import(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self, struct __pyx_opt_args_7pyarrow_3lib_14_PandasAPIShim__check_import *__pyx_optional_args) {
  int __pyx_v_raise_ = ((int)1);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  int __pyx_t_11;
  char const *__pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  PyObject *__pyx_t_19 = NULL;
  int __pyx_t_20;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_check_import", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_raise_ = __pyx_optional_args->raise_;
    }
  }

  /* "pyarrow/pandas-shim.pxi":106
 * 
 *     cdef inline _check_import(self, bint raise_=True):
 *         if not self._tried_importing_pandas:             # <<<<<<<<<<<<<<
 *             with self._lock:
 *                 if not self._tried_importing_pandas:
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_tried_importing_pandas");
    __PYX_ERR(12, 106, __pyx_L1_error)
  }
  __pyx_t_1 = (!__pyx_v_self->_tried_importing_pandas);
  if (__pyx_t_1) {

    /* "pyarrow/pandas-shim.pxi":107
 *     cdef inline _check_import(self, bint raise_=True):
 *         if not self._tried_importing_pandas:
 *             with self._lock:             # <<<<<<<<<<<<<<
 *                 if not self._tried_importing_pandas:
 *                     try:
*/
    /*with:*/ {
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_lock");
        __PYX_ERR(12, 107, __pyx_L1_error)
      }
      __pyx_t_2 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->_lock, __pyx_mstate_global->__pyx_n_u_exit); if (unlikely(!__pyx_t_2)) __PYX_ERR(12, 107, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4 = NULL;
      __pyx_t_5 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->_lock, __pyx_mstate_global->__pyx_n_u_enter); if (unlikely(!__pyx_t_5)) __PYX_ERR(12, 107, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = 1;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
        assert(__pyx_t_4);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
        __pyx_t_6 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
        __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(12, 107, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      /*try:*/ {
        {
          __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:*/ {

            /* "pyarrow/pandas-shim.pxi":108
 *         if not self._tried_importing_pandas:
 *             with self._lock:
 *                 if not self._tried_importing_pandas:             # <<<<<<<<<<<<<<
 *                     try:
 *                         self._import_pandas(raise_)
*/
            if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_tried_importing_pandas");
              __PYX_ERR(12, 108, __pyx_L8_error)
            }
            __pyx_t_1 = (!__pyx_v_self->_tried_importing_pandas);
            if (__pyx_t_1) {

              /* "pyarrow/pandas-shim.pxi":109
 *             with self._lock:
 *                 if not self._tried_importing_pandas:
 *                     try:             # <<<<<<<<<<<<<<
 *                         self._import_pandas(raise_)
 *                     finally:
*/
              /*try:*/ {

                /* "pyarrow/pandas-shim.pxi":110
 *                 if not self._tried_importing_pandas:
 *                     try:
 *                         self._import_pandas(raise_)             # <<<<<<<<<<<<<<
 *                     finally:
 *                         self._tried_importing_pandas = True
*/
                if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                  PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_import_pandas");
                  __PYX_ERR(12, 110, __pyx_L16_error)
                }
                __pyx_t_3 = ((struct __pyx_vtabstruct_7pyarrow_3lib__PandasAPIShim *)__pyx_v_self->__pyx_vtab)->_import_pandas(__pyx_v_self, __pyx_v_raise_); if (unlikely(!__pyx_t_3)) __PYX_ERR(12, 110, __pyx_L16_error)
                __Pyx_GOTREF(__pyx_t_3);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }

              /* "pyarrow/pandas-shim.pxi":112
 *                         self._import_pandas(raise_)
 *                     finally:
 *                         self._tried_importing_pandas = True             # <<<<<<<<<<<<<<
 *                     return
 * 
*/
              /*finally:*/ {
                /*normal exit:*/{
                  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_tried_importing_pandas");
                    __PYX_ERR(12, 112, __pyx_L8_error)
                  }
                  __pyx_v_self->_tried_importing_pandas = 1;
                  goto __pyx_L17;
                }
                __pyx_L16_error:;
                /*exception exit:*/{
                  __Pyx_PyThreadState_declare
                  __Pyx_PyThreadState_assign
                  __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0;
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
                   __Pyx_ExceptionSwap(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18);
                  if ( unlikely(__Pyx_GetException(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15) < 0)) __Pyx_ErrFetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
                  __Pyx_XGOTREF(__pyx_t_13);
                  __Pyx_XGOTREF(__pyx_t_14);
                  __Pyx_XGOTREF(__pyx_t_15);
                  __Pyx_XGOTREF(__pyx_t_16);
                  __Pyx_XGOTREF(__pyx_t_17);
                  __Pyx_XGOTREF(__pyx_t_18);
                  __pyx_t_10 = __pyx_lineno; __pyx_t_11 = __pyx_clineno; __pyx_t_12 = __pyx_filename;
                  {
                    if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_tried_importing_pandas");
                      __PYX_ERR(12, 112, __pyx_L19_error)
                    }
                    __pyx_v_self->_tried_importing_pandas = 1;
                  }
                  __Pyx_XGIVEREF(__pyx_t_16);
                  __Pyx_XGIVEREF(__pyx_t_17);
                  __Pyx_XGIVEREF(__pyx_t_18);
                  __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18);
                  __Pyx_XGIVEREF(__pyx_t_13);
                  __Pyx_XGIVEREF(__pyx_t_14);
                  __Pyx_XGIVEREF(__pyx_t_15);
                  __Pyx_ErrRestore(__pyx_t_13, __pyx_t_14, __pyx_t_15);
                  __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0;
                  __pyx_lineno = __pyx_t_10; __pyx_clineno = __pyx_t_11; __pyx_filename = __pyx_t_12;
                  goto __pyx_L8_error;
                  __pyx_L19_error:;
                  __Pyx_XGIVEREF(__pyx_t_16);
                  __Pyx_XGIVEREF(__pyx_t_17);
                  __Pyx_XGIVEREF(__pyx_t_18);
                  __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18);
                  __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
                  __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
                  __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
                  __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0;
                  goto __pyx_L8_error;
                }
                __pyx_L17:;
              }

              /* "pyarrow/pandas-shim.pxi":113
 *                     finally:
 *                         self._tried_importing_pandas = True
 *                     return             # <<<<<<<<<<<<<<
 * 
 *         if not self._have_pandas and raise_:
*/
              __Pyx_XDECREF(__pyx_r);
              __pyx_r = Py_None; __Pyx_INCREF(Py_None);
              goto __pyx_L12_try_return;

              /* "pyarrow/pandas-shim.pxi":108
 *         if not self._tried_importing_pandas:
 *             with self._lock:
 *                 if not self._tried_importing_pandas:             # <<<<<<<<<<<<<<
 *                     try:
 *                         self._import_pandas(raise_)
*/
            }

            /* "pyarrow/pandas-shim.pxi":107
 *     cdef inline _check_import(self, bint raise_=True):
 *         if not self._tried_importing_pandas:
 *             with self._lock:             # <<<<<<<<<<<<<<
 *                 if not self._tried_importing_pandas:
 *                     try:
*/
          }
          __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_L8_error:;
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          /*except:*/ {
            __Pyx_AddTraceback("pyarrow.lib._PandasAPIShim._check_import", __pyx_clineno, __pyx_lineno, __pyx_filename);
            if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_5, &__pyx_t_4) < 0) __PYX_ERR(12, 107, __pyx_L10_except_error)
            __Pyx_XGOTREF(__pyx_t_3);
            __Pyx_XGOTREF(__pyx_t_5);
            __Pyx_XGOTREF(__pyx_t_4);
            __pyx_t_19 = PyTuple_Pack(3, __pyx_t_3, __pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_19)) __PYX_ERR(12, 107, __pyx_L10_except_error)
            __Pyx_GOTREF(__pyx_t_19);
            __pyx_t_18 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_19, NULL);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
            if (unlikely(!__pyx_t_18)) __PYX_ERR(12, 107, __pyx_L10_except_error)
            __Pyx_GOTREF(__pyx_t_18);
            __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_18);
            __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
            if (__pyx_t_1 < (0)) __PYX_ERR(12, 107, __pyx_L10_except_error)
            __pyx_t_20 = (!__pyx_t_1);
            if (unlikely(__pyx_t_20)) {
              __Pyx_GIVEREF(__pyx_t_3);
              __Pyx_GIVEREF(__pyx_t_5);
              __Pyx_XGIVEREF(__pyx_t_4);
              __Pyx_ErrRestoreWithState(__pyx_t_3, __pyx_t_5, __pyx_t_4);
              __pyx_t_3 = 0;  __pyx_t_5 = 0;  __pyx_t_4 = 0; 
              __PYX_ERR(12, 107, __pyx_L10_except_error)
            }
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
            goto __pyx_L9_exception_handled;
          }
          __pyx_L10_except_error:;
          __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_L12_try_return:;
          __Pyx_XGIVEREF(__pyx_t_7);
          __Pyx_XGIVEREF(__pyx_t_8);
          __Pyx_XGIVEREF(__pyx_t_9);
          __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
          goto __pyx_L5_return;
          __pyx_L9_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:;
        }
      }
      /*finally:*/ {
        /*normal exit:*/{
          if (__pyx_t_2) {
            __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[0], NULL);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            if (unlikely(!__pyx_t_9)) __PYX_ERR(12, 107, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_9);
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          }
          goto __pyx_L7;
        }
        __pyx_L5_return: {
          __pyx_t_9 = __pyx_r;
          __pyx_r = 0;
          if (__pyx_t_2) {
            __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[0], NULL);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            if (unlikely(!__pyx_t_8)) __PYX_ERR(12, 107, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_8);
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          }
          __pyx_r = __pyx_t_9;
          __pyx_t_9 = 0;
          goto __pyx_L0;
        }
        __pyx_L7:;
      }
      goto __pyx_L23;
      __pyx_L4_error:;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      goto __pyx_L1_error;
      __pyx_L23:;
    }

    /* "pyarrow/pandas-shim.pxi":106
 * 
 *     cdef inline _check_import(self, bint raise_=True):
 *         if not self._tried_importing_pandas:             # <<<<<<<<<<<<<<
 *             with self._lock:
 *                 if not self._tried_importing_pandas:
*/
  }

  /* "pyarrow/pandas-shim.pxi":115
 *                     return
 * 
 *         if not self._have_pandas and raise_:             # <<<<<<<<<<<<<<
 *             self._import_pandas(raise_)
 * 
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_have_pandas");
    __PYX_ERR(12, 115, __pyx_L1_error)
  }
  __pyx_t_1 = (!__pyx_v_self->_have_pandas);
  if (__pyx_t_1) {
  } else {
    __pyx_t_20 = __pyx_t_1;
    goto __pyx_L25_bool_binop_done;
  }
  __pyx_t_20 = __pyx_v_raise_;
  __pyx_L25_bool_binop_done:;
  if (__pyx_t_20) {

    /* "pyarrow/pandas-shim.pxi":116
 * 
 *         if not self._have_pandas and raise_:
 *             self._import_pandas(raise_)             # <<<<<<<<<<<<<<
 * 
 *     def series(self, *args, **kwargs):
*/
    if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_import_pandas");
      __PYX_ERR(12, 116, __pyx_L1_error)
    }
    __pyx_t_4 = ((struct __pyx_vtabstruct_7pyarrow_3lib__PandasAPIShim *)__pyx_v_self->__pyx_vtab)->_import_pandas(__pyx_v_self, __pyx_v_raise_); if (unlikely(!__pyx_t_4)) __PYX_ERR(12, 116, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "pyarrow/pandas-shim.pxi":115
 *                     return
 * 
 *         if not self._have_pandas and raise_:             # <<<<<<<<<<<<<<
 *             self._import_pandas(raise_)
 * 
*/
  }

  /* "pyarrow/pandas-shim.pxi":105
 *         self.has_sparse = False
 * 
 *     cdef inline _check_import(self, bint raise_=True):             # <<<<<<<<<<<<<<
 *         if not self._tried_importing_pandas:
 *             with self._lock:
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_19);
  __Pyx_AddTraceback("pyarrow.lib._PandasAPIShim._check_import", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/pandas-shim.pxi":118
 *             self._import_pandas(raise_)
 * 
 *     def series(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         self._check_import()
 *         return self._series(*args, **kwargs)
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_3series(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_14_PandasAPIShim_2series, "_PandasAPIShim.series(self, *args, **kwargs)");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_14_PandasAPIShim_3series = {"series", (PyCFunction)(void(*)(void))(PyCFunctionWithKeywords)__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_3series, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_14_PandasAPIShim_2series};
static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_3series(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_args = 0;
  PyObject *__pyx_v_kwargs = 0;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("series (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (__pyx_kwds_len > 0) {
    if (unlikely(__Pyx_CheckKeywordStrings("series", __pyx_kwds) == -1)) return NULL;
    __pyx_v_kwargs = __Pyx_KwargsAsDict_VARARGS(__pyx_kwds, __pyx_kwvalues);
    if (unlikely(!__pyx_v_kwargs)) return NULL;
    __Pyx_GOTREF(__pyx_v_kwargs);
  } else {
    __pyx_v_kwargs = PyDict_New();
    if (unlikely(!__pyx_v_kwargs)) return NULL;
    __Pyx_GOTREF(__pyx_v_kwargs);
  }
  __Pyx_INCREF(__pyx_args);
  __pyx_v_args = __pyx_args;
  __pyx_r = __pyx_pf_7pyarrow_3lib_14_PandasAPIShim_2series(((struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);

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

static PyObject *__pyx_pf_7pyarrow_3lib_14_PandasAPIShim_2series(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("series", 0);

  /* "pyarrow/pandas-shim.pxi":119
 * 
 *     def series(self, *args, **kwargs):
 *         self._check_import()             # <<<<<<<<<<<<<<
 *         return self._series(*args, **kwargs)
 * 
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_import");
    __PYX_ERR(12, 119, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_7pyarrow_3lib_14_PandasAPIShim__check_import(__pyx_v_self, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 119, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyarrow/pandas-shim.pxi":120
 *     def series(self, *args, **kwargs):
 *         self._check_import()
 *         return self._series(*args, **kwargs)             # <<<<<<<<<<<<<<
 * 
 *     def data_frame(self, *args, **kwargs):
*/
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_series");
    __PYX_ERR(12, 120, __pyx_L1_error)
  }
  __pyx_t_1 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 120, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_v_self->_series, __pyx_v_args, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(12, 120, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "pyarrow/pandas-shim.pxi":118
 *             self._import_pandas(raise_)
 * 
 *     def series(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         self._check_import()
 *         return self._series(*args, **kwargs)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pyarrow.lib._PandasAPIShim.series", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/pandas-shim.pxi":122
 *         return self._series(*args, **kwargs)
 * 
 *     def data_frame(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         self._check_import()
 *         return self._data_frame(*args, **kwargs)
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_5data_frame(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_14_PandasAPIShim_4data_frame, "_PandasAPIShim.data_frame(self, *args, **kwargs)");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_14_PandasAPIShim_5data_frame = {"data_frame", (PyCFunction)(void(*)(void))(PyCFunctionWithKeywords)__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_5data_frame, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_14_PandasAPIShim_4data_frame};
static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_5data_frame(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_args = 0;
  PyObject *__pyx_v_kwargs = 0;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("data_frame (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (__pyx_kwds_len > 0) {
    if (unlikely(__Pyx_CheckKeywordStrings("data_frame", __pyx_kwds) == -1)) return NULL;
    __pyx_v_kwargs = __Pyx_KwargsAsDict_VARARGS(__pyx_kwds, __pyx_kwvalues);
    if (unlikely(!__pyx_v_kwargs)) return NULL;
    __Pyx_GOTREF(__pyx_v_kwargs);
  } else {
    __pyx_v_kwargs = PyDict_New();
    if (unlikely(!__pyx_v_kwargs)) return NULL;
    __Pyx_GOTREF(__pyx_v_kwargs);
  }
  __Pyx_INCREF(__pyx_args);
  __pyx_v_args = __pyx_args;
  __pyx_r = __pyx_pf_7pyarrow_3lib_14_PandasAPIShim_4data_frame(((struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);

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

static PyObject *__pyx_pf_7pyarrow_3lib_14_PandasAPIShim_4data_frame(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("data_frame", 0);

  /* "pyarrow/pandas-shim.pxi":123
 * 
 *     def data_frame(self, *args, **kwargs):
 *         self._check_import()             # <<<<<<<<<<<<<<
 *         return self._data_frame(*args, **kwargs)
 * 
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_import");
    __PYX_ERR(12, 123, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_7pyarrow_3lib_14_PandasAPIShim__check_import(__pyx_v_self, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 123, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyarrow/pandas-shim.pxi":124
 *     def data_frame(self, *args, **kwargs):
 *         self._check_import()
 *         return self._data_frame(*args, **kwargs)             # <<<<<<<<<<<<<<
 * 
 *     cdef inline bint _have_pandas_internal(self):
*/
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_data_frame");
    __PYX_ERR(12, 124, __pyx_L1_error)
  }
  __pyx_t_1 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 124, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_v_self->_data_frame, __pyx_v_args, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(12, 124, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "pyarrow/pandas-shim.pxi":122
 *         return self._series(*args, **kwargs)
 * 
 *     def data_frame(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         self._check_import()
 *         return self._data_frame(*args, **kwargs)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pyarrow.lib._PandasAPIShim.data_frame", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/pandas-shim.pxi":126
 *         return self._data_frame(*args, **kwargs)
 * 
 *     cdef inline bint _have_pandas_internal(self):             # <<<<<<<<<<<<<<
 *         if not self._tried_importing_pandas:
 *             self._check_import(raise_=False)
*/

static CYTHON_INLINE int __pyx_f_7pyarrow_3lib_14_PandasAPIShim__have_pandas_internal(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  struct __pyx_opt_args_7pyarrow_3lib_14_PandasAPIShim__check_import __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_have_pandas_internal", 0);

  /* "pyarrow/pandas-shim.pxi":127
 * 
 *     cdef inline bint _have_pandas_internal(self):
 *         if not self._tried_importing_pandas:             # <<<<<<<<<<<<<<
 *             self._check_import(raise_=False)
 *         return self._have_pandas
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_tried_importing_pandas");
    __PYX_ERR(12, 127, __pyx_L1_error)
  }
  __pyx_t_1 = (!__pyx_v_self->_tried_importing_pandas);
  if (__pyx_t_1) {

    /* "pyarrow/pandas-shim.pxi":128
 *     cdef inline bint _have_pandas_internal(self):
 *         if not self._tried_importing_pandas:
 *             self._check_import(raise_=False)             # <<<<<<<<<<<<<<
 *         return self._have_pandas
 * 
*/
    if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_import");
      __PYX_ERR(12, 128, __pyx_L1_error)
    }
    __pyx_t_3.__pyx_n = 1;
    __pyx_t_3.raise_ = 0;
    __pyx_t_2 = __pyx_f_7pyarrow_3lib_14_PandasAPIShim__check_import(__pyx_v_self, &__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(12, 128, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyarrow/pandas-shim.pxi":127
 * 
 *     cdef inline bint _have_pandas_internal(self):
 *         if not self._tried_importing_pandas:             # <<<<<<<<<<<<<<
 *             self._check_import(raise_=False)
 *         return self._have_pandas
*/
  }

  /* "pyarrow/pandas-shim.pxi":129
 *         if not self._tried_importing_pandas:
 *             self._check_import(raise_=False)
 *         return self._have_pandas             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_have_pandas");
    __PYX_ERR(12, 129, __pyx_L1_error)
  }
  __pyx_r = __pyx_v_self->_have_pandas;
  goto __pyx_L0;

  /* "pyarrow/pandas-shim.pxi":126
 *         return self._data_frame(*args, **kwargs)
 * 
 *     cdef inline bint _have_pandas_internal(self):             # <<<<<<<<<<<<<<
 *         if not self._tried_importing_pandas:
 *             self._check_import(raise_=False)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pyarrow.lib._PandasAPIShim._have_pandas_internal", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/pandas-shim.pxi":131
 *         return self._have_pandas
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def have_pandas(self):
 *         return self._have_pandas_internal()
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_11have_pandas_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_11have_pandas_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_14_PandasAPIShim_11have_pandas___get__(((struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_14_PandasAPIShim_11have_pandas___get__(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyarrow/pandas-shim.pxi":133
 *     @property
 *     def have_pandas(self):
 *         return self._have_pandas_internal()             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_have_pandas_internal");
    __PYX_ERR(12, 133, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_7pyarrow_3lib_14_PandasAPIShim__have_pandas_internal(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(12, 133, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(12, 133, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "pyarrow/pandas-shim.pxi":131
 *         return self._have_pandas
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def have_pandas(self):
 *         return self._have_pandas_internal()
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pyarrow.lib._PandasAPIShim.have_pandas.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/pandas-shim.pxi":135
 *         return self._have_pandas_internal()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def compat(self):
 *         self._check_import()
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_6compat_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_6compat_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_14_PandasAPIShim_6compat___get__(((struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_14_PandasAPIShim_6compat___get__(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyarrow/pandas-shim.pxi":137
 *     @property
 *     def compat(self):
 *         self._check_import()             # <<<<<<<<<<<<<<
 *         return self._compat_module
 * 
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_import");
    __PYX_ERR(12, 137, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_7pyarrow_3lib_14_PandasAPIShim__check_import(__pyx_v_self, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 137, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyarrow/pandas-shim.pxi":138
 *     def compat(self):
 *         self._check_import()
 *         return self._compat_module             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_compat_module");
    __PYX_ERR(12, 138, __pyx_L1_error)
  }
  __Pyx_INCREF(__pyx_v_self->_compat_module);
  __pyx_r = __pyx_v_self->_compat_module;
  goto __pyx_L0;

  /* "pyarrow/pandas-shim.pxi":135
 *         return self._have_pandas_internal()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def compat(self):
 *         self._check_import()
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib._PandasAPIShim.compat.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/pandas-shim.pxi":140
 *         return self._compat_module
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def pd(self):
 *         self._check_import()
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_2pd_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_2pd_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_14_PandasAPIShim_2pd___get__(((struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_14_PandasAPIShim_2pd___get__(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyarrow/pandas-shim.pxi":142
 *     @property
 *     def pd(self):
 *         self._check_import()             # <<<<<<<<<<<<<<
 *         return self._pd
 * 
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_import");
    __PYX_ERR(12, 142, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_7pyarrow_3lib_14_PandasAPIShim__check_import(__pyx_v_self, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 142, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyarrow/pandas-shim.pxi":143
 *     def pd(self):
 *         self._check_import()
 *         return self._pd             # <<<<<<<<<<<<<<
 * 
 *     cpdef infer_dtype(self, obj):
*/
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_pd");
    __PYX_ERR(12, 143, __pyx_L1_error)
  }
  __Pyx_INCREF(__pyx_v_self->_pd);
  __pyx_r = __pyx_v_self->_pd;
  goto __pyx_L0;

  /* "pyarrow/pandas-shim.pxi":140
 *         return self._compat_module
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def pd(self):
 *         self._check_import()
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib._PandasAPIShim.pd.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/pandas-shim.pxi":145
 *         return self._pd
 * 
 *     cpdef infer_dtype(self, obj):             # <<<<<<<<<<<<<<
 *         self._check_import()
 *         try:
*/

static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_7infer_dtype(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_7pyarrow_3lib_14_PandasAPIShim_infer_dtype(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("infer_dtype", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__PandasAPIShim &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_infer_dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 145, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7pyarrow_3lib_14_PandasAPIShim_7infer_dtype)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_obj};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(12, 145, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyarrow/pandas-shim.pxi":146
 * 
 *     cpdef infer_dtype(self, obj):
 *         self._check_import()             # <<<<<<<<<<<<<<
 *         try:
 *             return self._types_api.infer_dtype(obj, skipna=False)
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_import");
    __PYX_ERR(12, 146, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_7pyarrow_3lib_14_PandasAPIShim__check_import(__pyx_v_self, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 146, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyarrow/pandas-shim.pxi":147
 *     cpdef infer_dtype(self, obj):
 *         self._check_import()
 *         try:             # <<<<<<<<<<<<<<
 *             return self._types_api.infer_dtype(obj, skipna=False)
 *         except AttributeError:
*/
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
    __Pyx_XGOTREF(__pyx_t_6);
    __Pyx_XGOTREF(__pyx_t_7);
    __Pyx_XGOTREF(__pyx_t_8);
    /*try:*/ {

      /* "pyarrow/pandas-shim.pxi":148
 *         self._check_import()
 *         try:
 *             return self._types_api.infer_dtype(obj, skipna=False)             # <<<<<<<<<<<<<<
 *         except AttributeError:
 *             return self._pd.lib.infer_dtype(obj)
*/
      __Pyx_XDECREF(__pyx_r);
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_types_api");
        __PYX_ERR(12, 148, __pyx_L3_error)
      }
      __pyx_t_2 = __pyx_v_self->_types_api;
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_5 = 0;
      {
        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, __pyx_v_obj};
        __pyx_t_4 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(12, 148, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_4);
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_skipna, Py_False, __pyx_t_4, __pyx_callargs+2, 0) < (0)) __PYX_ERR(12, 148, __pyx_L3_error)
        __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_infer_dtype, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_4);
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 148, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L7_try_return;

      /* "pyarrow/pandas-shim.pxi":147
 *     cpdef infer_dtype(self, obj):
 *         self._check_import()
 *         try:             # <<<<<<<<<<<<<<
 *             return self._types_api.infer_dtype(obj, skipna=False)
 *         except AttributeError:
*/
    }
    __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;

    /* "pyarrow/pandas-shim.pxi":149
 *         try:
 *             return self._types_api.infer_dtype(obj, skipna=False)
 *         except AttributeError:             # <<<<<<<<<<<<<<
 *             return self._pd.lib.infer_dtype(obj)
 * 
*/
    __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_AttributeError))));
    if (__pyx_t_9) {
      __Pyx_AddTraceback("pyarrow.lib._PandasAPIShim.infer_dtype", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_4, &__pyx_t_2) < 0) __PYX_ERR(12, 149, __pyx_L5_except_error)
      __Pyx_XGOTREF(__pyx_t_1);
      __Pyx_XGOTREF(__pyx_t_4);
      __Pyx_XGOTREF(__pyx_t_2);

      /* "pyarrow/pandas-shim.pxi":150
 *             return self._types_api.infer_dtype(obj, skipna=False)
 *         except AttributeError:
 *             return self._pd.lib.infer_dtype(obj)             # <<<<<<<<<<<<<<
 * 
 *     cpdef pandas_dtype(self, dtype):
*/
      __Pyx_XDECREF(__pyx_r);
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_pd");
        __PYX_ERR(12, 150, __pyx_L5_except_error)
      }
      __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_pd, __pyx_mstate_global->__pyx_n_u_lib); if (unlikely(!__pyx_t_11)) __PYX_ERR(12, 150, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_10 = __pyx_t_11;
      __Pyx_INCREF(__pyx_t_10);
      __pyx_t_5 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_v_obj};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_infer_dtype, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(12, 150, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      goto __pyx_L6_except_return;
    }
    goto __pyx_L5_except_error;

    /* "pyarrow/pandas-shim.pxi":147
 *     cpdef infer_dtype(self, obj):
 *         self._check_import()
 *         try:             # <<<<<<<<<<<<<<
 *             return self._types_api.infer_dtype(obj, skipna=False)
 *         except AttributeError:
*/
    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
    goto __pyx_L1_error;
    __pyx_L7_try_return:;
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
    goto __pyx_L0;
    __pyx_L6_except_return:;
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
    goto __pyx_L0;
  }

  /* "pyarrow/pandas-shim.pxi":145
 *         return self._pd
 * 
 *     cpdef infer_dtype(self, obj):             # <<<<<<<<<<<<<<
 *         self._check_import()
 *         try:
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("pyarrow.lib._PandasAPIShim.infer_dtype", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_7infer_dtype(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_14_PandasAPIShim_6infer_dtype, "_PandasAPIShim.infer_dtype(self, obj)");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_14_PandasAPIShim_7infer_dtype = {"infer_dtype", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_7infer_dtype, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_14_PandasAPIShim_6infer_dtype};
static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_7infer_dtype(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_obj = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("infer_dtype (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_obj,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(12, 145, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(12, 145, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "infer_dtype", 0) < (0)) __PYX_ERR(12, 145, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("infer_dtype", 1, 1, 1, i); __PYX_ERR(12, 145, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(12, 145, __pyx_L3_error)
    }
    __pyx_v_obj = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("infer_dtype", 1, 1, 1, __pyx_nargs); __PYX_ERR(12, 145, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("pyarrow.lib._PandasAPIShim.infer_dtype", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyarrow_3lib_14_PandasAPIShim_6infer_dtype(((struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *)__pyx_v_self), __pyx_v_obj);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7pyarrow_3lib_14_PandasAPIShim_6infer_dtype(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self, PyObject *__pyx_v_obj) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("infer_dtype", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_7pyarrow_3lib_14_PandasAPIShim_infer_dtype(__pyx_v_self, __pyx_v_obj, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 145, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib._PandasAPIShim.infer_dtype", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/pandas-shim.pxi":152
 *             return self._pd.lib.infer_dtype(obj)
 * 
 *     cpdef pandas_dtype(self, dtype):             # <<<<<<<<<<<<<<
 *         self._check_import()
 *         try:
*/

static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_9pandas_dtype(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_7pyarrow_3lib_14_PandasAPIShim_pandas_dtype(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self, PyObject *__pyx_v_dtype, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("pandas_dtype", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__PandasAPIShim &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_pandas_dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 152, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7pyarrow_3lib_14_PandasAPIShim_9pandas_dtype)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_dtype};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(12, 152, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyarrow/pandas-shim.pxi":153
 * 
 *     cpdef pandas_dtype(self, dtype):
 *         self._check_import()             # <<<<<<<<<<<<<<
 *         try:
 *             return self._types_api.pandas_dtype(dtype)
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_import");
    __PYX_ERR(12, 153, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_7pyarrow_3lib_14_PandasAPIShim__check_import(__pyx_v_self, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 153, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyarrow/pandas-shim.pxi":154
 *     cpdef pandas_dtype(self, dtype):
 *         self._check_import()
 *         try:             # <<<<<<<<<<<<<<
 *             return self._types_api.pandas_dtype(dtype)
 *         except AttributeError:
*/
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
    __Pyx_XGOTREF(__pyx_t_6);
    __Pyx_XGOTREF(__pyx_t_7);
    __Pyx_XGOTREF(__pyx_t_8);
    /*try:*/ {

      /* "pyarrow/pandas-shim.pxi":155
 *         self._check_import()
 *         try:
 *             return self._types_api.pandas_dtype(dtype)             # <<<<<<<<<<<<<<
 *         except AttributeError:
 *             return None
*/
      __Pyx_XDECREF(__pyx_r);
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_types_api");
        __PYX_ERR(12, 155, __pyx_L3_error)
      }
      __pyx_t_2 = __pyx_v_self->_types_api;
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_5 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_dtype};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_pandas_dtype, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 155, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L7_try_return;

      /* "pyarrow/pandas-shim.pxi":154
 *     cpdef pandas_dtype(self, dtype):
 *         self._check_import()
 *         try:             # <<<<<<<<<<<<<<
 *             return self._types_api.pandas_dtype(dtype)
 *         except AttributeError:
*/
    }
    __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;

    /* "pyarrow/pandas-shim.pxi":156
 *         try:
 *             return self._types_api.pandas_dtype(dtype)
 *         except AttributeError:             # <<<<<<<<<<<<<<
 *             return None
 * 
*/
    __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_AttributeError))));
    if (__pyx_t_9) {
      __Pyx_ErrRestore(0,0,0);

      /* "pyarrow/pandas-shim.pxi":157
 *             return self._types_api.pandas_dtype(dtype)
 *         except AttributeError:
 *             return None             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      goto __pyx_L6_except_return;
    }
    goto __pyx_L5_except_error;

    /* "pyarrow/pandas-shim.pxi":154
 *     cpdef pandas_dtype(self, dtype):
 *         self._check_import()
 *         try:             # <<<<<<<<<<<<<<
 *             return self._types_api.pandas_dtype(dtype)
 *         except AttributeError:
*/
    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
    goto __pyx_L1_error;
    __pyx_L7_try_return:;
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
    goto __pyx_L0;
    __pyx_L6_except_return:;
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
    goto __pyx_L0;
  }

  /* "pyarrow/pandas-shim.pxi":152
 *             return self._pd.lib.infer_dtype(obj)
 * 
 *     cpdef pandas_dtype(self, dtype):             # <<<<<<<<<<<<<<
 *         self._check_import()
 *         try:
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pyarrow.lib._PandasAPIShim.pandas_dtype", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_9pandas_dtype(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_14_PandasAPIShim_8pandas_dtype, "_PandasAPIShim.pandas_dtype(self, dtype)");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_14_PandasAPIShim_9pandas_dtype = {"pandas_dtype", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_9pandas_dtype, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_14_PandasAPIShim_8pandas_dtype};
static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_9pandas_dtype(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_dtype = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("pandas_dtype (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_dtype,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(12, 152, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(12, 152, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "pandas_dtype", 0) < (0)) __PYX_ERR(12, 152, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("pandas_dtype", 1, 1, 1, i); __PYX_ERR(12, 152, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(12, 152, __pyx_L3_error)
    }
    __pyx_v_dtype = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("pandas_dtype", 1, 1, 1, __pyx_nargs); __PYX_ERR(12, 152, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("pyarrow.lib._PandasAPIShim.pandas_dtype", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyarrow_3lib_14_PandasAPIShim_8pandas_dtype(((struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *)__pyx_v_self), __pyx_v_dtype);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7pyarrow_3lib_14_PandasAPIShim_8pandas_dtype(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self, PyObject *__pyx_v_dtype) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("pandas_dtype", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_7pyarrow_3lib_14_PandasAPIShim_pandas_dtype(__pyx_v_self, __pyx_v_dtype, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 152, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib._PandasAPIShim.pandas_dtype", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/pandas-shim.pxi":159
 *             return None
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def loose_version(self):
 *         self._check_import()
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_13loose_version_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_13loose_version_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_14_PandasAPIShim_13loose_version___get__(((struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_14_PandasAPIShim_13loose_version___get__(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyarrow/pandas-shim.pxi":161
 *     @property
 *     def loose_version(self):
 *         self._check_import()             # <<<<<<<<<<<<<<
 *         return self._loose_version
 * 
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_import");
    __PYX_ERR(12, 161, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_7pyarrow_3lib_14_PandasAPIShim__check_import(__pyx_v_self, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 161, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyarrow/pandas-shim.pxi":162
 *     def loose_version(self):
 *         self._check_import()
 *         return self._loose_version             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_loose_version");
    __PYX_ERR(12, 162, __pyx_L1_error)
  }
  __Pyx_INCREF(__pyx_v_self->_loose_version);
  __pyx_r = __pyx_v_self->_loose_version;
  goto __pyx_L0;

  /* "pyarrow/pandas-shim.pxi":159
 *             return None
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def loose_version(self):
 *         self._check_import()
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib._PandasAPIShim.loose_version.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/pandas-shim.pxi":164
 *         return self._loose_version
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def version(self):
 *         self._check_import()
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_7version_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_7version_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_14_PandasAPIShim_7version___get__(((struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_14_PandasAPIShim_7version___get__(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyarrow/pandas-shim.pxi":166
 *     @property
 *     def version(self):
 *         self._check_import()             # <<<<<<<<<<<<<<
 *         return self._version
 * 
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_import");
    __PYX_ERR(12, 166, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_7pyarrow_3lib_14_PandasAPIShim__check_import(__pyx_v_self, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 166, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyarrow/pandas-shim.pxi":167
 *     def version(self):
 *         self._check_import()
 *         return self._version             # <<<<<<<<<<<<<<
 * 
 *     def is_v1(self):
*/
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_version");
    __PYX_ERR(12, 167, __pyx_L1_error)
  }
  __Pyx_INCREF(__pyx_v_self->_version);
  __pyx_r = __pyx_v_self->_version;
  goto __pyx_L0;

  /* "pyarrow/pandas-shim.pxi":164
 *         return self._loose_version
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def version(self):
 *         self._check_import()
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib._PandasAPIShim.version.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/pandas-shim.pxi":169
 *         return self._version
 * 
 *     def is_v1(self):             # <<<<<<<<<<<<<<
 *         self._check_import()
 *         return self._is_v1
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_11is_v1(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_14_PandasAPIShim_10is_v1, "_PandasAPIShim.is_v1(self)");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_14_PandasAPIShim_11is_v1 = {"is_v1", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_11is_v1, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_14_PandasAPIShim_10is_v1};
static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_11is_v1(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_v1 (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("is_v1", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("is_v1", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7pyarrow_3lib_14_PandasAPIShim_10is_v1(((struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_14_PandasAPIShim_10is_v1(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_v1", 0);

  /* "pyarrow/pandas-shim.pxi":170
 * 
 *     def is_v1(self):
 *         self._check_import()             # <<<<<<<<<<<<<<
 *         return self._is_v1
 * 
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_import");
    __PYX_ERR(12, 170, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_7pyarrow_3lib_14_PandasAPIShim__check_import(__pyx_v_self, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 170, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyarrow/pandas-shim.pxi":171
 *     def is_v1(self):
 *         self._check_import()
 *         return self._is_v1             # <<<<<<<<<<<<<<
 * 
 *     def is_ge_v21(self):
*/
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_is_v1");
    __PYX_ERR(12, 171, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->_is_v1); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 171, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/pandas-shim.pxi":169
 *         return self._version
 * 
 *     def is_v1(self):             # <<<<<<<<<<<<<<
 *         self._check_import()
 *         return self._is_v1
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib._PandasAPIShim.is_v1", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/pandas-shim.pxi":173
 *         return self._is_v1
 * 
 *     def is_ge_v21(self):             # <<<<<<<<<<<<<<
 *         self._check_import()
 *         return self._is_ge_v21
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_13is_ge_v21(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_14_PandasAPIShim_12is_ge_v21, "_PandasAPIShim.is_ge_v21(self)");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_14_PandasAPIShim_13is_ge_v21 = {"is_ge_v21", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_13is_ge_v21, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_14_PandasAPIShim_12is_ge_v21};
static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_13is_ge_v21(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_ge_v21 (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("is_ge_v21", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("is_ge_v21", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7pyarrow_3lib_14_PandasAPIShim_12is_ge_v21(((struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_14_PandasAPIShim_12is_ge_v21(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_ge_v21", 0);

  /* "pyarrow/pandas-shim.pxi":174
 * 
 *     def is_ge_v21(self):
 *         self._check_import()             # <<<<<<<<<<<<<<
 *         return self._is_ge_v21
 * 
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_import");
    __PYX_ERR(12, 174, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_7pyarrow_3lib_14_PandasAPIShim__check_import(__pyx_v_self, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 174, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyarrow/pandas-shim.pxi":175
 *     def is_ge_v21(self):
 *         self._check_import()
 *         return self._is_ge_v21             # <<<<<<<<<<<<<<
 * 
 *     def is_ge_v23(self):
*/
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_is_ge_v21");
    __PYX_ERR(12, 175, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->_is_ge_v21); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 175, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/pandas-shim.pxi":173
 *         return self._is_v1
 * 
 *     def is_ge_v21(self):             # <<<<<<<<<<<<<<
 *         self._check_import()
 *         return self._is_ge_v21
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib._PandasAPIShim.is_ge_v21", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/pandas-shim.pxi":177
 *         return self._is_ge_v21
 * 
 *     def is_ge_v23(self):             # <<<<<<<<<<<<<<
 *         self._check_import()
 *         return self._is_ge_v23
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_15is_ge_v23(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_14_PandasAPIShim_14is_ge_v23, "_PandasAPIShim.is_ge_v23(self)");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_14_PandasAPIShim_15is_ge_v23 = {"is_ge_v23", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_15is_ge_v23, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_14_PandasAPIShim_14is_ge_v23};
static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_15is_ge_v23(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_ge_v23 (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("is_ge_v23", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("is_ge_v23", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7pyarrow_3lib_14_PandasAPIShim_14is_ge_v23(((struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_14_PandasAPIShim_14is_ge_v23(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_ge_v23", 0);

  /* "pyarrow/pandas-shim.pxi":178
 * 
 *     def is_ge_v23(self):
 *         self._check_import()             # <<<<<<<<<<<<<<
 *         return self._is_ge_v23
 * 
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_import");
    __PYX_ERR(12, 178, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_7pyarrow_3lib_14_PandasAPIShim__check_import(__pyx_v_self, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 178, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyarrow/pandas-shim.pxi":179
 *     def is_ge_v23(self):
 *         self._check_import()
 *         return self._is_ge_v23             # <<<<<<<<<<<<<<
 * 
 *     def is_ge_v3(self):
*/
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_is_ge_v23");
    __PYX_ERR(12, 179, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->_is_ge_v23); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 179, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/pandas-shim.pxi":177
 *         return self._is_ge_v21
 * 
 *     def is_ge_v23(self):             # <<<<<<<<<<<<<<
 *         self._check_import()
 *         return self._is_ge_v23
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib._PandasAPIShim.is_ge_v23", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/pandas-shim.pxi":181
 *         return self._is_ge_v23
 * 
 *     def is_ge_v3(self):             # <<<<<<<<<<<<<<
 *         self._check_import()
 *         return self._is_ge_v3
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_17is_ge_v3(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_14_PandasAPIShim_16is_ge_v3, "_PandasAPIShim.is_ge_v3(self)");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_14_PandasAPIShim_17is_ge_v3 = {"is_ge_v3", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_17is_ge_v3, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_14_PandasAPIShim_16is_ge_v3};
static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_17is_ge_v3(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_ge_v3 (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("is_ge_v3", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("is_ge_v3", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7pyarrow_3lib_14_PandasAPIShim_16is_ge_v3(((struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_14_PandasAPIShim_16is_ge_v3(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_ge_v3", 0);

  /* "pyarrow/pandas-shim.pxi":182
 * 
 *     def is_ge_v3(self):
 *         self._check_import()             # <<<<<<<<<<<<<<
 *         return self._is_ge_v3
 * 
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_import");
    __PYX_ERR(12, 182, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_7pyarrow_3lib_14_PandasAPIShim__check_import(__pyx_v_self, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 182, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyarrow/pandas-shim.pxi":183
 *     def is_ge_v3(self):
 *         self._check_import()
 *         return self._is_ge_v3             # <<<<<<<<<<<<<<
 * 
 *     def is_ge_v3_strict(self):
*/
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_is_ge_v3");
    __PYX_ERR(12, 183, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->_is_ge_v3); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 183, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/pandas-shim.pxi":181
 *         return self._is_ge_v23
 * 
 *     def is_ge_v3(self):             # <<<<<<<<<<<<<<
 *         self._check_import()
 *         return self._is_ge_v3
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib._PandasAPIShim.is_ge_v3", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/pandas-shim.pxi":185
 *         return self._is_ge_v3
 * 
 *     def is_ge_v3_strict(self):             # <<<<<<<<<<<<<<
 *         self._check_import()
 *         return self._is_ge_v3_strict
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_19is_ge_v3_strict(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_14_PandasAPIShim_18is_ge_v3_strict, "_PandasAPIShim.is_ge_v3_strict(self)");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_14_PandasAPIShim_19is_ge_v3_strict = {"is_ge_v3_strict", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_19is_ge_v3_strict, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_14_PandasAPIShim_18is_ge_v3_strict};
static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_19is_ge_v3_strict(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_ge_v3_strict (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("is_ge_v3_strict", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("is_ge_v3_strict", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7pyarrow_3lib_14_PandasAPIShim_18is_ge_v3_strict(((struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_14_PandasAPIShim_18is_ge_v3_strict(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_ge_v3_strict", 0);

  /* "pyarrow/pandas-shim.pxi":186
 * 
 *     def is_ge_v3_strict(self):
 *         self._check_import()             # <<<<<<<<<<<<<<
 *         return self._is_ge_v3_strict
 * 
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_import");
    __PYX_ERR(12, 186, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_7pyarrow_3lib_14_PandasAPIShim__check_import(__pyx_v_self, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 186, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyarrow/pandas-shim.pxi":187
 *     def is_ge_v3_strict(self):
 *         self._check_import()
 *         return self._is_ge_v3_strict             # <<<<<<<<<<<<<<
 * 
 *     def uses_string_dtype(self):
*/
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_is_ge_v3_strict");
    __PYX_ERR(12, 187, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->_is_ge_v3_strict); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 187, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/pandas-shim.pxi":185
 *         return self._is_ge_v3
 * 
 *     def is_ge_v3_strict(self):             # <<<<<<<<<<<<<<
 *         self._check_import()
 *         return self._is_ge_v3_strict
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib._PandasAPIShim.is_ge_v3_strict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/pandas-shim.pxi":189
 *         return self._is_ge_v3_strict
 * 
 *     def uses_string_dtype(self):             # <<<<<<<<<<<<<<
 *         if self.is_ge_v3_strict():
 *             return True
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_21uses_string_dtype(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_14_PandasAPIShim_20uses_string_dtype, "_PandasAPIShim.uses_string_dtype(self)");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_14_PandasAPIShim_21uses_string_dtype = {"uses_string_dtype", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_21uses_string_dtype, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_14_PandasAPIShim_20uses_string_dtype};
static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_21uses_string_dtype(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("uses_string_dtype (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("uses_string_dtype", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("uses_string_dtype", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7pyarrow_3lib_14_PandasAPIShim_20uses_string_dtype(((struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *)__pyx_v_self));

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

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

  /* "pyarrow/pandas-shim.pxi":190
 * 
 *     def uses_string_dtype(self):
 *         if self.is_ge_v3_strict():             # <<<<<<<<<<<<<<
 *             return True
 *         try:
*/
  __pyx_t_2 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_is_ge_v3_strict, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 190, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(12, 190, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_4) {

    /* "pyarrow/pandas-shim.pxi":191
 *     def uses_string_dtype(self):
 *         if self.is_ge_v3_strict():
 *             return True             # <<<<<<<<<<<<<<
 *         try:
 *             if self.is_ge_v23() and self.pd.options.future.infer_string:
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_True);
    __pyx_r = Py_True;
    goto __pyx_L0;

    /* "pyarrow/pandas-shim.pxi":190
 * 
 *     def uses_string_dtype(self):
 *         if self.is_ge_v3_strict():             # <<<<<<<<<<<<<<
 *             return True
 *         try:
*/
  }

  /* "pyarrow/pandas-shim.pxi":192
 *         if self.is_ge_v3_strict():
 *             return True
 *         try:             # <<<<<<<<<<<<<<
 *             if self.is_ge_v23() and self.pd.options.future.infer_string:
 *                 return True
*/
  {
    __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:*/ {

      /* "pyarrow/pandas-shim.pxi":193
 *             return True
 *         try:
 *             if self.is_ge_v23() and self.pd.options.future.infer_string:             # <<<<<<<<<<<<<<
 *                 return True
 *         except:
*/
      __pyx_t_2 = ((PyObject *)__pyx_v_self);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_3 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_is_ge_v23, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 193, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(12, 193, __pyx_L4_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (__pyx_t_8) {
      } else {
        __pyx_t_4 = __pyx_t_8;
        goto __pyx_L11_bool_binop_done;
      }
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_pd); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 193, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_options); if (unlikely(!__pyx_t_2)) __PYX_ERR(12, 193, __pyx_L4_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_mstate_global->__pyx_n_u_future); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 193, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_infer_string); if (unlikely(!__pyx_t_2)) __PYX_ERR(12, 193, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_2);
      __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(12, 193, __pyx_L4_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_4 = __pyx_t_8;
      __pyx_L11_bool_binop_done:;
      if (__pyx_t_4) {

        /* "pyarrow/pandas-shim.pxi":194
 *         try:
 *             if self.is_ge_v23() and self.pd.options.future.infer_string:
 *                 return True             # <<<<<<<<<<<<<<
 *         except:
 *             pass
*/
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(Py_True);
        __pyx_r = Py_True;
        goto __pyx_L8_try_return;

        /* "pyarrow/pandas-shim.pxi":193
 *             return True
 *         try:
 *             if self.is_ge_v23() and self.pd.options.future.infer_string:             # <<<<<<<<<<<<<<
 *                 return True
 *         except:
*/
      }

      /* "pyarrow/pandas-shim.pxi":192
 *         if self.is_ge_v3_strict():
 *             return True
 *         try:             # <<<<<<<<<<<<<<
 *             if self.is_ge_v23() and self.pd.options.future.infer_string:
 *                 return True
*/
    }
    __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_L9_try_end;
    __pyx_L4_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyarrow/pandas-shim.pxi":195
 *             if self.is_ge_v23() and self.pd.options.future.infer_string:
 *                 return True
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         return False
*/
    /*except:*/ {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L5_exception_handled;
    }

    /* "pyarrow/pandas-shim.pxi":192
 *         if self.is_ge_v3_strict():
 *             return True
 *         try:             # <<<<<<<<<<<<<<
 *             if self.is_ge_v23() and self.pd.options.future.infer_string:
 *                 return True
*/
    __pyx_L8_try_return:;
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
    goto __pyx_L0;
    __pyx_L5_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_L9_try_end:;
  }

  /* "pyarrow/pandas-shim.pxi":197
 *         except:
 *             pass
 *         return False             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_False);
  __pyx_r = Py_False;
  goto __pyx_L0;

  /* "pyarrow/pandas-shim.pxi":189
 *         return self._is_ge_v3_strict
 * 
 *     def uses_string_dtype(self):             # <<<<<<<<<<<<<<
 *         if self.is_ge_v3_strict():
 *             return True
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pyarrow.lib._PandasAPIShim.uses_string_dtype", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/pandas-shim.pxi":199
 *         return False
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def categorical_type(self):
 *         self._check_import()
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_16categorical_type_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_16categorical_type_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_14_PandasAPIShim_16categorical_type___get__(((struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_14_PandasAPIShim_16categorical_type___get__(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyarrow/pandas-shim.pxi":201
 *     @property
 *     def categorical_type(self):
 *         self._check_import()             # <<<<<<<<<<<<<<
 *         return self._categorical_type
 * 
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_import");
    __PYX_ERR(12, 201, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_7pyarrow_3lib_14_PandasAPIShim__check_import(__pyx_v_self, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 201, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyarrow/pandas-shim.pxi":202
 *     def categorical_type(self):
 *         self._check_import()
 *         return self._categorical_type             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_categorical_type");
    __PYX_ERR(12, 202, __pyx_L1_error)
  }
  __Pyx_INCREF(__pyx_v_self->_categorical_type);
  __pyx_r = __pyx_v_self->_categorical_type;
  goto __pyx_L0;

  /* "pyarrow/pandas-shim.pxi":199
 *         return False
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def categorical_type(self):
 *         self._check_import()
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib._PandasAPIShim.categorical_type.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/pandas-shim.pxi":204
 *         return self._categorical_type
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def datetimetz_type(self):
 *         self._check_import()
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_15datetimetz_type_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_15datetimetz_type_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_14_PandasAPIShim_15datetimetz_type___get__(((struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_14_PandasAPIShim_15datetimetz_type___get__(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyarrow/pandas-shim.pxi":206
 *     @property
 *     def datetimetz_type(self):
 *         self._check_import()             # <<<<<<<<<<<<<<
 *         return self._datetimetz_type
 * 
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_import");
    __PYX_ERR(12, 206, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_7pyarrow_3lib_14_PandasAPIShim__check_import(__pyx_v_self, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 206, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyarrow/pandas-shim.pxi":207
 *     def datetimetz_type(self):
 *         self._check_import()
 *         return self._datetimetz_type             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_datetimetz_type");
    __PYX_ERR(12, 207, __pyx_L1_error)
  }
  __Pyx_INCREF(__pyx_v_self->_datetimetz_type);
  __pyx_r = __pyx_v_self->_datetimetz_type;
  goto __pyx_L0;

  /* "pyarrow/pandas-shim.pxi":204
 *         return self._categorical_type
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def datetimetz_type(self):
 *         self._check_import()
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib._PandasAPIShim.datetimetz_type.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/pandas-shim.pxi":209
 *         return self._datetimetz_type
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def extension_dtype(self):
 *         self._check_import()
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_15extension_dtype_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_15extension_dtype_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_14_PandasAPIShim_15extension_dtype___get__(((struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_14_PandasAPIShim_15extension_dtype___get__(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyarrow/pandas-shim.pxi":211
 *     @property
 *     def extension_dtype(self):
 *         self._check_import()             # <<<<<<<<<<<<<<
 *         return self._extension_dtype
 * 
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_import");
    __PYX_ERR(12, 211, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_7pyarrow_3lib_14_PandasAPIShim__check_import(__pyx_v_self, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 211, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyarrow/pandas-shim.pxi":212
 *     def extension_dtype(self):
 *         self._check_import()
 *         return self._extension_dtype             # <<<<<<<<<<<<<<
 * 
 *     cpdef is_array_like(self, obj):
*/
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_extension_dtype");
    __PYX_ERR(12, 212, __pyx_L1_error)
  }
  __Pyx_INCREF(__pyx_v_self->_extension_dtype);
  __pyx_r = __pyx_v_self->_extension_dtype;
  goto __pyx_L0;

  /* "pyarrow/pandas-shim.pxi":209
 *         return self._datetimetz_type
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def extension_dtype(self):
 *         self._check_import()
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib._PandasAPIShim.extension_dtype.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/pandas-shim.pxi":214
 *         return self._extension_dtype
 * 
 *     cpdef is_array_like(self, obj):             # <<<<<<<<<<<<<<
 *         self._check_import()
 *         return isinstance(obj, self._array_like_types)
*/

static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_23is_array_like(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_7pyarrow_3lib_14_PandasAPIShim_is_array_like(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_array_like", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__PandasAPIShim &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_is_array_like); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 214, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7pyarrow_3lib_14_PandasAPIShim_23is_array_like)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_obj};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(12, 214, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyarrow/pandas-shim.pxi":215
 * 
 *     cpdef is_array_like(self, obj):
 *         self._check_import()             # <<<<<<<<<<<<<<
 *         return isinstance(obj, self._array_like_types)
 * 
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_import");
    __PYX_ERR(12, 215, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_7pyarrow_3lib_14_PandasAPIShim__check_import(__pyx_v_self, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 215, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyarrow/pandas-shim.pxi":216
 *     cpdef is_array_like(self, obj):
 *         self._check_import()
 *         return isinstance(obj, self._array_like_types)             # <<<<<<<<<<<<<<
 * 
 *     cpdef is_categorical(self, obj):
*/
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_array_like_types");
    __PYX_ERR(12, 216, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_v_self->_array_like_types;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_6 = PyObject_IsInstance(__pyx_v_obj, __pyx_t_1); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(12, 216, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 216, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/pandas-shim.pxi":214
 *         return self._extension_dtype
 * 
 *     cpdef is_array_like(self, obj):             # <<<<<<<<<<<<<<
 *         self._check_import()
 *         return isinstance(obj, self._array_like_types)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pyarrow.lib._PandasAPIShim.is_array_like", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_23is_array_like(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_14_PandasAPIShim_22is_array_like, "_PandasAPIShim.is_array_like(self, obj)");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_14_PandasAPIShim_23is_array_like = {"is_array_like", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_23is_array_like, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_14_PandasAPIShim_22is_array_like};
static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_23is_array_like(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_obj = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_array_like (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_obj,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(12, 214, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(12, 214, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "is_array_like", 0) < (0)) __PYX_ERR(12, 214, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("is_array_like", 1, 1, 1, i); __PYX_ERR(12, 214, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(12, 214, __pyx_L3_error)
    }
    __pyx_v_obj = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_array_like", 1, 1, 1, __pyx_nargs); __PYX_ERR(12, 214, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("pyarrow.lib._PandasAPIShim.is_array_like", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyarrow_3lib_14_PandasAPIShim_22is_array_like(((struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *)__pyx_v_self), __pyx_v_obj);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7pyarrow_3lib_14_PandasAPIShim_22is_array_like(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self, PyObject *__pyx_v_obj) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_array_like", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_7pyarrow_3lib_14_PandasAPIShim_is_array_like(__pyx_v_self, __pyx_v_obj, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 214, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib._PandasAPIShim.is_array_like", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/pandas-shim.pxi":218
 *         return isinstance(obj, self._array_like_types)
 * 
 *     cpdef is_categorical(self, obj):             # <<<<<<<<<<<<<<
 *         if self._have_pandas_internal():
 *             return isinstance(obj, self._categorical_type)
*/

static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_25is_categorical(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_7pyarrow_3lib_14_PandasAPIShim_is_categorical(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_categorical", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__PandasAPIShim &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_is_categorical); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 218, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7pyarrow_3lib_14_PandasAPIShim_25is_categorical)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_obj};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(12, 218, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyarrow/pandas-shim.pxi":219
 * 
 *     cpdef is_categorical(self, obj):
 *         if self._have_pandas_internal():             # <<<<<<<<<<<<<<
 *             return isinstance(obj, self._categorical_type)
 *         else:
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_have_pandas_internal");
    __PYX_ERR(12, 219, __pyx_L1_error)
  }
  __pyx_t_6 = __pyx_f_7pyarrow_3lib_14_PandasAPIShim__have_pandas_internal(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(12, 219, __pyx_L1_error)
  if (__pyx_t_6) {

    /* "pyarrow/pandas-shim.pxi":220
 *     cpdef is_categorical(self, obj):
 *         if self._have_pandas_internal():
 *             return isinstance(obj, self._categorical_type)             # <<<<<<<<<<<<<<
 *         else:
 *             return False
*/
    __Pyx_XDECREF(__pyx_r);
    if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_categorical_type");
      __PYX_ERR(12, 220, __pyx_L1_error)
    }
    __pyx_t_1 = __pyx_v_self->_categorical_type;
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_6 = PyObject_IsInstance(__pyx_v_obj, __pyx_t_1); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(12, 220, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 220, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "pyarrow/pandas-shim.pxi":219
 * 
 *     cpdef is_categorical(self, obj):
 *         if self._have_pandas_internal():             # <<<<<<<<<<<<<<
 *             return isinstance(obj, self._categorical_type)
 *         else:
*/
  }

  /* "pyarrow/pandas-shim.pxi":222
 *             return isinstance(obj, self._categorical_type)
 *         else:
 *             return False             # <<<<<<<<<<<<<<
 * 
 *     cpdef is_datetimetz(self, obj):
*/
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_False);
    __pyx_r = Py_False;
    goto __pyx_L0;
  }

  /* "pyarrow/pandas-shim.pxi":218
 *         return isinstance(obj, self._array_like_types)
 * 
 *     cpdef is_categorical(self, obj):             # <<<<<<<<<<<<<<
 *         if self._have_pandas_internal():
 *             return isinstance(obj, self._categorical_type)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pyarrow.lib._PandasAPIShim.is_categorical", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_25is_categorical(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_14_PandasAPIShim_24is_categorical, "_PandasAPIShim.is_categorical(self, obj)");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_14_PandasAPIShim_25is_categorical = {"is_categorical", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_25is_categorical, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_14_PandasAPIShim_24is_categorical};
static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_25is_categorical(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_obj = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_categorical (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_obj,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(12, 218, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(12, 218, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "is_categorical", 0) < (0)) __PYX_ERR(12, 218, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("is_categorical", 1, 1, 1, i); __PYX_ERR(12, 218, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(12, 218, __pyx_L3_error)
    }
    __pyx_v_obj = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_categorical", 1, 1, 1, __pyx_nargs); __PYX_ERR(12, 218, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("pyarrow.lib._PandasAPIShim.is_categorical", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyarrow_3lib_14_PandasAPIShim_24is_categorical(((struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *)__pyx_v_self), __pyx_v_obj);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7pyarrow_3lib_14_PandasAPIShim_24is_categorical(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self, PyObject *__pyx_v_obj) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_categorical", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_7pyarrow_3lib_14_PandasAPIShim_is_categorical(__pyx_v_self, __pyx_v_obj, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 218, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib._PandasAPIShim.is_categorical", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/pandas-shim.pxi":224
 *             return False
 * 
 *     cpdef is_datetimetz(self, obj):             # <<<<<<<<<<<<<<
 *         if self._have_pandas_internal():
 *             return isinstance(obj, self._datetimetz_type)
*/

static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_27is_datetimetz(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_7pyarrow_3lib_14_PandasAPIShim_is_datetimetz(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_datetimetz", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__PandasAPIShim &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_is_datetimetz); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 224, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7pyarrow_3lib_14_PandasAPIShim_27is_datetimetz)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_obj};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(12, 224, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyarrow/pandas-shim.pxi":225
 * 
 *     cpdef is_datetimetz(self, obj):
 *         if self._have_pandas_internal():             # <<<<<<<<<<<<<<
 *             return isinstance(obj, self._datetimetz_type)
 *         else:
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_have_pandas_internal");
    __PYX_ERR(12, 225, __pyx_L1_error)
  }
  __pyx_t_6 = __pyx_f_7pyarrow_3lib_14_PandasAPIShim__have_pandas_internal(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(12, 225, __pyx_L1_error)
  if (__pyx_t_6) {

    /* "pyarrow/pandas-shim.pxi":226
 *     cpdef is_datetimetz(self, obj):
 *         if self._have_pandas_internal():
 *             return isinstance(obj, self._datetimetz_type)             # <<<<<<<<<<<<<<
 *         else:
 *             return False
*/
    __Pyx_XDECREF(__pyx_r);
    if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_datetimetz_type");
      __PYX_ERR(12, 226, __pyx_L1_error)
    }
    __pyx_t_1 = __pyx_v_self->_datetimetz_type;
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_6 = PyObject_IsInstance(__pyx_v_obj, __pyx_t_1); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(12, 226, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 226, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "pyarrow/pandas-shim.pxi":225
 * 
 *     cpdef is_datetimetz(self, obj):
 *         if self._have_pandas_internal():             # <<<<<<<<<<<<<<
 *             return isinstance(obj, self._datetimetz_type)
 *         else:
*/
  }

  /* "pyarrow/pandas-shim.pxi":228
 *             return isinstance(obj, self._datetimetz_type)
 *         else:
 *             return False             # <<<<<<<<<<<<<<
 * 
 *     cpdef is_extension_array_dtype(self, obj):
*/
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_False);
    __pyx_r = Py_False;
    goto __pyx_L0;
  }

  /* "pyarrow/pandas-shim.pxi":224
 *             return False
 * 
 *     cpdef is_datetimetz(self, obj):             # <<<<<<<<<<<<<<
 *         if self._have_pandas_internal():
 *             return isinstance(obj, self._datetimetz_type)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pyarrow.lib._PandasAPIShim.is_datetimetz", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_27is_datetimetz(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_14_PandasAPIShim_26is_datetimetz, "_PandasAPIShim.is_datetimetz(self, obj)");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_14_PandasAPIShim_27is_datetimetz = {"is_datetimetz", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_27is_datetimetz, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_14_PandasAPIShim_26is_datetimetz};
static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_27is_datetimetz(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_obj = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_datetimetz (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_obj,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(12, 224, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(12, 224, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "is_datetimetz", 0) < (0)) __PYX_ERR(12, 224, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("is_datetimetz", 1, 1, 1, i); __PYX_ERR(12, 224, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(12, 224, __pyx_L3_error)
    }
    __pyx_v_obj = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_datetimetz", 1, 1, 1, __pyx_nargs); __PYX_ERR(12, 224, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("pyarrow.lib._PandasAPIShim.is_datetimetz", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyarrow_3lib_14_PandasAPIShim_26is_datetimetz(((struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *)__pyx_v_self), __pyx_v_obj);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7pyarrow_3lib_14_PandasAPIShim_26is_datetimetz(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self, PyObject *__pyx_v_obj) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_datetimetz", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_7pyarrow_3lib_14_PandasAPIShim_is_datetimetz(__pyx_v_self, __pyx_v_obj, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 224, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib._PandasAPIShim.is_datetimetz", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/pandas-shim.pxi":230
 *             return False
 * 
 *     cpdef is_extension_array_dtype(self, obj):             # <<<<<<<<<<<<<<
 *         self._check_import()
 *         if self._is_extension_array_dtype:
*/

static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_29is_extension_array_dtype(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_7pyarrow_3lib_14_PandasAPIShim_is_extension_array_dtype(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_extension_array_dtype", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__PandasAPIShim &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_is_extension_array_dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 230, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7pyarrow_3lib_14_PandasAPIShim_29is_extension_array_dtype)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_obj};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(12, 230, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyarrow/pandas-shim.pxi":231
 * 
 *     cpdef is_extension_array_dtype(self, obj):
 *         self._check_import()             # <<<<<<<<<<<<<<
 *         if self._is_extension_array_dtype:
 *             return self._is_extension_array_dtype(obj)
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_import");
    __PYX_ERR(12, 231, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_7pyarrow_3lib_14_PandasAPIShim__check_import(__pyx_v_self, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 231, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyarrow/pandas-shim.pxi":232
 *     cpdef is_extension_array_dtype(self, obj):
 *         self._check_import()
 *         if self._is_extension_array_dtype:             # <<<<<<<<<<<<<<
 *             return self._is_extension_array_dtype(obj)
 *         else:
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_is_extension_array_dtype");
    __PYX_ERR(12, 232, __pyx_L1_error)
  }
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_self->_is_extension_array_dtype); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(12, 232, __pyx_L1_error)
  if (__pyx_t_6) {

    /* "pyarrow/pandas-shim.pxi":233
 *         self._check_import()
 *         if self._is_extension_array_dtype:
 *             return self._is_extension_array_dtype(obj)             # <<<<<<<<<<<<<<
 *         else:
 *             return False
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = NULL;
    if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_is_extension_array_dtype");
      __PYX_ERR(12, 233, __pyx_L1_error)
    }
    __Pyx_INCREF(__pyx_v_self->_is_extension_array_dtype);
    __pyx_t_4 = __pyx_v_self->_is_extension_array_dtype; 
    __pyx_t_5 = 1;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
      assert(__pyx_t_2);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
      __pyx_t_5 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_obj};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 233, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "pyarrow/pandas-shim.pxi":232
 *     cpdef is_extension_array_dtype(self, obj):
 *         self._check_import()
 *         if self._is_extension_array_dtype:             # <<<<<<<<<<<<<<
 *             return self._is_extension_array_dtype(obj)
 *         else:
*/
  }

  /* "pyarrow/pandas-shim.pxi":235
 *             return self._is_extension_array_dtype(obj)
 *         else:
 *             return False             # <<<<<<<<<<<<<<
 * 
 *     cpdef is_sparse(self, obj):
*/
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_False);
    __pyx_r = Py_False;
    goto __pyx_L0;
  }

  /* "pyarrow/pandas-shim.pxi":230
 *             return False
 * 
 *     cpdef is_extension_array_dtype(self, obj):             # <<<<<<<<<<<<<<
 *         self._check_import()
 *         if self._is_extension_array_dtype:
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pyarrow.lib._PandasAPIShim.is_extension_array_dtype", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_29is_extension_array_dtype(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_14_PandasAPIShim_28is_extension_array_dtype, "_PandasAPIShim.is_extension_array_dtype(self, obj)");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_14_PandasAPIShim_29is_extension_array_dtype = {"is_extension_array_dtype", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_29is_extension_array_dtype, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_14_PandasAPIShim_28is_extension_array_dtype};
static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_29is_extension_array_dtype(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_obj = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_extension_array_dtype (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_obj,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(12, 230, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(12, 230, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "is_extension_array_dtype", 0) < (0)) __PYX_ERR(12, 230, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("is_extension_array_dtype", 1, 1, 1, i); __PYX_ERR(12, 230, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(12, 230, __pyx_L3_error)
    }
    __pyx_v_obj = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_extension_array_dtype", 1, 1, 1, __pyx_nargs); __PYX_ERR(12, 230, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("pyarrow.lib._PandasAPIShim.is_extension_array_dtype", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyarrow_3lib_14_PandasAPIShim_28is_extension_array_dtype(((struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *)__pyx_v_self), __pyx_v_obj);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7pyarrow_3lib_14_PandasAPIShim_28is_extension_array_dtype(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self, PyObject *__pyx_v_obj) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_extension_array_dtype", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_7pyarrow_3lib_14_PandasAPIShim_is_extension_array_dtype(__pyx_v_self, __pyx_v_obj, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 230, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib._PandasAPIShim.is_extension_array_dtype", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/pandas-shim.pxi":237
 *             return False
 * 
 *     cpdef is_sparse(self, obj):             # <<<<<<<<<<<<<<
 *         if self._have_pandas_internal():
 *             return isinstance(obj.dtype, self.pd.SparseDtype)
*/

static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_31is_sparse(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_7pyarrow_3lib_14_PandasAPIShim_is_sparse(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_sparse", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__PandasAPIShim &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_is_sparse); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 237, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7pyarrow_3lib_14_PandasAPIShim_31is_sparse)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_obj};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(12, 237, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyarrow/pandas-shim.pxi":238
 * 
 *     cpdef is_sparse(self, obj):
 *         if self._have_pandas_internal():             # <<<<<<<<<<<<<<
 *             return isinstance(obj.dtype, self.pd.SparseDtype)
 *         else:
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_have_pandas_internal");
    __PYX_ERR(12, 238, __pyx_L1_error)
  }
  __pyx_t_6 = __pyx_f_7pyarrow_3lib_14_PandasAPIShim__have_pandas_internal(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(12, 238, __pyx_L1_error)
  if (__pyx_t_6) {

    /* "pyarrow/pandas-shim.pxi":239
 *     cpdef is_sparse(self, obj):
 *         if self._have_pandas_internal():
 *             return isinstance(obj.dtype, self.pd.SparseDtype)             # <<<<<<<<<<<<<<
 *         else:
 *             return False
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_mstate_global->__pyx_n_u_dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 239, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_pd); if (unlikely(!__pyx_t_2)) __PYX_ERR(12, 239, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_SparseDtype); if (unlikely(!__pyx_t_4)) __PYX_ERR(12, 239, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_6 = PyObject_IsInstance(__pyx_t_1, __pyx_t_4); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(12, 239, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(12, 239, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;

    /* "pyarrow/pandas-shim.pxi":238
 * 
 *     cpdef is_sparse(self, obj):
 *         if self._have_pandas_internal():             # <<<<<<<<<<<<<<
 *             return isinstance(obj.dtype, self.pd.SparseDtype)
 *         else:
*/
  }

  /* "pyarrow/pandas-shim.pxi":241
 *             return isinstance(obj.dtype, self.pd.SparseDtype)
 *         else:
 *             return False             # <<<<<<<<<<<<<<
 * 
 *     cpdef is_data_frame(self, obj):
*/
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_False);
    __pyx_r = Py_False;
    goto __pyx_L0;
  }

  /* "pyarrow/pandas-shim.pxi":237
 *             return False
 * 
 *     cpdef is_sparse(self, obj):             # <<<<<<<<<<<<<<
 *         if self._have_pandas_internal():
 *             return isinstance(obj.dtype, self.pd.SparseDtype)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pyarrow.lib._PandasAPIShim.is_sparse", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_31is_sparse(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_14_PandasAPIShim_30is_sparse, "_PandasAPIShim.is_sparse(self, obj)");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_14_PandasAPIShim_31is_sparse = {"is_sparse", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_31is_sparse, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_14_PandasAPIShim_30is_sparse};
static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_31is_sparse(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_obj = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_sparse (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_obj,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(12, 237, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(12, 237, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "is_sparse", 0) < (0)) __PYX_ERR(12, 237, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("is_sparse", 1, 1, 1, i); __PYX_ERR(12, 237, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(12, 237, __pyx_L3_error)
    }
    __pyx_v_obj = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_sparse", 1, 1, 1, __pyx_nargs); __PYX_ERR(12, 237, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("pyarrow.lib._PandasAPIShim.is_sparse", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyarrow_3lib_14_PandasAPIShim_30is_sparse(((struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *)__pyx_v_self), __pyx_v_obj);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7pyarrow_3lib_14_PandasAPIShim_30is_sparse(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self, PyObject *__pyx_v_obj) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_sparse", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_7pyarrow_3lib_14_PandasAPIShim_is_sparse(__pyx_v_self, __pyx_v_obj, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 237, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib._PandasAPIShim.is_sparse", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/pandas-shim.pxi":243
 *             return False
 * 
 *     cpdef is_data_frame(self, obj):             # <<<<<<<<<<<<<<
 *         if self._have_pandas_internal():
 *             return isinstance(obj, self._data_frame)
*/

static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_33is_data_frame(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_7pyarrow_3lib_14_PandasAPIShim_is_data_frame(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_data_frame", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__PandasAPIShim &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_is_data_frame); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 243, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7pyarrow_3lib_14_PandasAPIShim_33is_data_frame)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_obj};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(12, 243, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyarrow/pandas-shim.pxi":244
 * 
 *     cpdef is_data_frame(self, obj):
 *         if self._have_pandas_internal():             # <<<<<<<<<<<<<<
 *             return isinstance(obj, self._data_frame)
 *         else:
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_have_pandas_internal");
    __PYX_ERR(12, 244, __pyx_L1_error)
  }
  __pyx_t_6 = __pyx_f_7pyarrow_3lib_14_PandasAPIShim__have_pandas_internal(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(12, 244, __pyx_L1_error)
  if (__pyx_t_6) {

    /* "pyarrow/pandas-shim.pxi":245
 *     cpdef is_data_frame(self, obj):
 *         if self._have_pandas_internal():
 *             return isinstance(obj, self._data_frame)             # <<<<<<<<<<<<<<
 *         else:
 *             return False
*/
    __Pyx_XDECREF(__pyx_r);
    if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_data_frame");
      __PYX_ERR(12, 245, __pyx_L1_error)
    }
    __pyx_t_1 = __pyx_v_self->_data_frame;
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_6 = PyObject_IsInstance(__pyx_v_obj, __pyx_t_1); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(12, 245, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 245, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "pyarrow/pandas-shim.pxi":244
 * 
 *     cpdef is_data_frame(self, obj):
 *         if self._have_pandas_internal():             # <<<<<<<<<<<<<<
 *             return isinstance(obj, self._data_frame)
 *         else:
*/
  }

  /* "pyarrow/pandas-shim.pxi":247
 *             return isinstance(obj, self._data_frame)
 *         else:
 *             return False             # <<<<<<<<<<<<<<
 * 
 *     cpdef is_series(self, obj):
*/
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_False);
    __pyx_r = Py_False;
    goto __pyx_L0;
  }

  /* "pyarrow/pandas-shim.pxi":243
 *             return False
 * 
 *     cpdef is_data_frame(self, obj):             # <<<<<<<<<<<<<<
 *         if self._have_pandas_internal():
 *             return isinstance(obj, self._data_frame)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pyarrow.lib._PandasAPIShim.is_data_frame", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_33is_data_frame(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_14_PandasAPIShim_32is_data_frame, "_PandasAPIShim.is_data_frame(self, obj)");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_14_PandasAPIShim_33is_data_frame = {"is_data_frame", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_33is_data_frame, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_14_PandasAPIShim_32is_data_frame};
static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_33is_data_frame(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_obj = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_data_frame (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_obj,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(12, 243, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(12, 243, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "is_data_frame", 0) < (0)) __PYX_ERR(12, 243, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("is_data_frame", 1, 1, 1, i); __PYX_ERR(12, 243, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(12, 243, __pyx_L3_error)
    }
    __pyx_v_obj = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_data_frame", 1, 1, 1, __pyx_nargs); __PYX_ERR(12, 243, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("pyarrow.lib._PandasAPIShim.is_data_frame", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyarrow_3lib_14_PandasAPIShim_32is_data_frame(((struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *)__pyx_v_self), __pyx_v_obj);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7pyarrow_3lib_14_PandasAPIShim_32is_data_frame(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self, PyObject *__pyx_v_obj) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_data_frame", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_7pyarrow_3lib_14_PandasAPIShim_is_data_frame(__pyx_v_self, __pyx_v_obj, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 243, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib._PandasAPIShim.is_data_frame", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/pandas-shim.pxi":249
 *             return False
 * 
 *     cpdef is_series(self, obj):             # <<<<<<<<<<<<<<
 *         if self._have_pandas_internal():
 *             return isinstance(obj, self._series)
*/

static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_35is_series(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_7pyarrow_3lib_14_PandasAPIShim_is_series(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_series", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__PandasAPIShim &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_is_series); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 249, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7pyarrow_3lib_14_PandasAPIShim_35is_series)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_obj};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(12, 249, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyarrow/pandas-shim.pxi":250
 * 
 *     cpdef is_series(self, obj):
 *         if self._have_pandas_internal():             # <<<<<<<<<<<<<<
 *             return isinstance(obj, self._series)
 *         else:
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_have_pandas_internal");
    __PYX_ERR(12, 250, __pyx_L1_error)
  }
  __pyx_t_6 = __pyx_f_7pyarrow_3lib_14_PandasAPIShim__have_pandas_internal(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(12, 250, __pyx_L1_error)
  if (__pyx_t_6) {

    /* "pyarrow/pandas-shim.pxi":251
 *     cpdef is_series(self, obj):
 *         if self._have_pandas_internal():
 *             return isinstance(obj, self._series)             # <<<<<<<<<<<<<<
 *         else:
 *             return False
*/
    __Pyx_XDECREF(__pyx_r);
    if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_series");
      __PYX_ERR(12, 251, __pyx_L1_error)
    }
    __pyx_t_1 = __pyx_v_self->_series;
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_6 = PyObject_IsInstance(__pyx_v_obj, __pyx_t_1); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(12, 251, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 251, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "pyarrow/pandas-shim.pxi":250
 * 
 *     cpdef is_series(self, obj):
 *         if self._have_pandas_internal():             # <<<<<<<<<<<<<<
 *             return isinstance(obj, self._series)
 *         else:
*/
  }

  /* "pyarrow/pandas-shim.pxi":253
 *             return isinstance(obj, self._series)
 *         else:
 *             return False             # <<<<<<<<<<<<<<
 * 
 *     cpdef is_index(self, obj):
*/
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_False);
    __pyx_r = Py_False;
    goto __pyx_L0;
  }

  /* "pyarrow/pandas-shim.pxi":249
 *             return False
 * 
 *     cpdef is_series(self, obj):             # <<<<<<<<<<<<<<
 *         if self._have_pandas_internal():
 *             return isinstance(obj, self._series)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pyarrow.lib._PandasAPIShim.is_series", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_35is_series(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_14_PandasAPIShim_34is_series, "_PandasAPIShim.is_series(self, obj)");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_14_PandasAPIShim_35is_series = {"is_series", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_35is_series, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_14_PandasAPIShim_34is_series};
static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_35is_series(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_obj = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_series (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_obj,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(12, 249, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(12, 249, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "is_series", 0) < (0)) __PYX_ERR(12, 249, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("is_series", 1, 1, 1, i); __PYX_ERR(12, 249, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(12, 249, __pyx_L3_error)
    }
    __pyx_v_obj = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_series", 1, 1, 1, __pyx_nargs); __PYX_ERR(12, 249, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("pyarrow.lib._PandasAPIShim.is_series", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyarrow_3lib_14_PandasAPIShim_34is_series(((struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *)__pyx_v_self), __pyx_v_obj);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7pyarrow_3lib_14_PandasAPIShim_34is_series(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self, PyObject *__pyx_v_obj) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_series", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_7pyarrow_3lib_14_PandasAPIShim_is_series(__pyx_v_self, __pyx_v_obj, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 249, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib._PandasAPIShim.is_series", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/pandas-shim.pxi":255
 *             return False
 * 
 *     cpdef is_index(self, obj):             # <<<<<<<<<<<<<<
 *         if self._have_pandas_internal():
 *             return isinstance(obj, self._index)
*/

static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_37is_index(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_7pyarrow_3lib_14_PandasAPIShim_is_index(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_index", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__PandasAPIShim &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_is_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 255, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7pyarrow_3lib_14_PandasAPIShim_37is_index)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_obj};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(12, 255, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyarrow/pandas-shim.pxi":256
 * 
 *     cpdef is_index(self, obj):
 *         if self._have_pandas_internal():             # <<<<<<<<<<<<<<
 *             return isinstance(obj, self._index)
 *         else:
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_have_pandas_internal");
    __PYX_ERR(12, 256, __pyx_L1_error)
  }
  __pyx_t_6 = __pyx_f_7pyarrow_3lib_14_PandasAPIShim__have_pandas_internal(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(12, 256, __pyx_L1_error)
  if (__pyx_t_6) {

    /* "pyarrow/pandas-shim.pxi":257
 *     cpdef is_index(self, obj):
 *         if self._have_pandas_internal():
 *             return isinstance(obj, self._index)             # <<<<<<<<<<<<<<
 *         else:
 *             return False
*/
    __Pyx_XDECREF(__pyx_r);
    if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_index");
      __PYX_ERR(12, 257, __pyx_L1_error)
    }
    __pyx_t_1 = __pyx_v_self->_index;
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_6 = PyObject_IsInstance(__pyx_v_obj, __pyx_t_1); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(12, 257, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 257, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "pyarrow/pandas-shim.pxi":256
 * 
 *     cpdef is_index(self, obj):
 *         if self._have_pandas_internal():             # <<<<<<<<<<<<<<
 *             return isinstance(obj, self._index)
 *         else:
*/
  }

  /* "pyarrow/pandas-shim.pxi":259
 *             return isinstance(obj, self._index)
 *         else:
 *             return False             # <<<<<<<<<<<<<<
 * 
 *     cpdef get_values(self, obj):
*/
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_False);
    __pyx_r = Py_False;
    goto __pyx_L0;
  }

  /* "pyarrow/pandas-shim.pxi":255
 *             return False
 * 
 *     cpdef is_index(self, obj):             # <<<<<<<<<<<<<<
 *         if self._have_pandas_internal():
 *             return isinstance(obj, self._index)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pyarrow.lib._PandasAPIShim.is_index", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_37is_index(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_14_PandasAPIShim_36is_index, "_PandasAPIShim.is_index(self, obj)");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_14_PandasAPIShim_37is_index = {"is_index", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_37is_index, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_14_PandasAPIShim_36is_index};
static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_37is_index(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_obj = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_index (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_obj,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(12, 255, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(12, 255, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "is_index", 0) < (0)) __PYX_ERR(12, 255, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("is_index", 1, 1, 1, i); __PYX_ERR(12, 255, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(12, 255, __pyx_L3_error)
    }
    __pyx_v_obj = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_index", 1, 1, 1, __pyx_nargs); __PYX_ERR(12, 255, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("pyarrow.lib._PandasAPIShim.is_index", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyarrow_3lib_14_PandasAPIShim_36is_index(((struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *)__pyx_v_self), __pyx_v_obj);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7pyarrow_3lib_14_PandasAPIShim_36is_index(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self, PyObject *__pyx_v_obj) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_index", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_7pyarrow_3lib_14_PandasAPIShim_is_index(__pyx_v_self, __pyx_v_obj, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 255, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib._PandasAPIShim.is_index", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/pandas-shim.pxi":261
 *             return False
 * 
 *     cpdef get_values(self, obj):             # <<<<<<<<<<<<<<
 *         """
 *         Get the underlying array values of a pandas Series or Index in the
*/

static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_39get_values(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_7pyarrow_3lib_14_PandasAPIShim_get_values(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_values", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__PandasAPIShim &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_get_values); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 261, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7pyarrow_3lib_14_PandasAPIShim_39get_values)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_obj};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(12, 261, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyarrow/pandas-shim.pxi":268
 *         Assumes obj is a pandas Series or Index.
 *         """
 *         self._check_import()             # <<<<<<<<<<<<<<
 *         if isinstance(obj.dtype, (self.pd.api.types.IntervalDtype,
 *                                   self.pd.api.types.PeriodDtype)):
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_import");
    __PYX_ERR(12, 268, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_7pyarrow_3lib_14_PandasAPIShim__check_import(__pyx_v_self, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 268, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyarrow/pandas-shim.pxi":269
 *         """
 *         self._check_import()
 *         if isinstance(obj.dtype, (self.pd.api.types.IntervalDtype,             # <<<<<<<<<<<<<<
 *                                   self.pd.api.types.PeriodDtype)):
 *             return obj.array
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_mstate_global->__pyx_n_u_dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 269, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_pd); if (unlikely(!__pyx_t_2)) __PYX_ERR(12, 269, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_api); if (unlikely(!__pyx_t_4)) __PYX_ERR(12, 269, __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_mstate_global->__pyx_n_u_types); if (unlikely(!__pyx_t_2)) __PYX_ERR(12, 269, __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_mstate_global->__pyx_n_u_IntervalDtype); if (unlikely(!__pyx_t_4)) __PYX_ERR(12, 269, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyarrow/pandas-shim.pxi":270
 *         self._check_import()
 *         if isinstance(obj.dtype, (self.pd.api.types.IntervalDtype,
 *                                   self.pd.api.types.PeriodDtype)):             # <<<<<<<<<<<<<<
 *             return obj.array
 *         return obj.values
*/
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_pd); if (unlikely(!__pyx_t_2)) __PYX_ERR(12, 270, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_api); if (unlikely(!__pyx_t_3)) __PYX_ERR(12, 270, __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_mstate_global->__pyx_n_u_types); if (unlikely(!__pyx_t_2)) __PYX_ERR(12, 270, __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_mstate_global->__pyx_n_u_PeriodDtype); if (unlikely(!__pyx_t_3)) __PYX_ERR(12, 270, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyarrow/pandas-shim.pxi":269
 *         """
 *         self._check_import()
 *         if isinstance(obj.dtype, (self.pd.api.types.IntervalDtype,             # <<<<<<<<<<<<<<
 *                                   self.pd.api.types.PeriodDtype)):
 *             return obj.array
*/
  __pyx_t_7 = PyObject_IsInstance(__pyx_t_1, __pyx_t_4); 
  if (!__pyx_t_7) {
  } else {
    __pyx_t_6 = __pyx_t_7;
    goto __pyx_L4_bool_binop_done;
  }

  /* "pyarrow/pandas-shim.pxi":270
 *         self._check_import()
 *         if isinstance(obj.dtype, (self.pd.api.types.IntervalDtype,
 *                                   self.pd.api.types.PeriodDtype)):             # <<<<<<<<<<<<<<
 *             return obj.array
 *         return obj.values
*/
  __pyx_t_7 = PyObject_IsInstance(__pyx_t_1, __pyx_t_3); 
  __pyx_t_6 = __pyx_t_7;
  __pyx_L4_bool_binop_done:;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyarrow/pandas-shim.pxi":269
 *         """
 *         self._check_import()
 *         if isinstance(obj.dtype, (self.pd.api.types.IntervalDtype,             # <<<<<<<<<<<<<<
 *                                   self.pd.api.types.PeriodDtype)):
 *             return obj.array
*/
  if (__pyx_t_6) {

    /* "pyarrow/pandas-shim.pxi":271
 *         if isinstance(obj.dtype, (self.pd.api.types.IntervalDtype,
 *                                   self.pd.api.types.PeriodDtype)):
 *             return obj.array             # <<<<<<<<<<<<<<
 *         return obj.values
 * 
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_mstate_global->__pyx_n_u_array); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 271, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "pyarrow/pandas-shim.pxi":269
 *         """
 *         self._check_import()
 *         if isinstance(obj.dtype, (self.pd.api.types.IntervalDtype,             # <<<<<<<<<<<<<<
 *                                   self.pd.api.types.PeriodDtype)):
 *             return obj.array
*/
  }

  /* "pyarrow/pandas-shim.pxi":272
 *                                   self.pd.api.types.PeriodDtype)):
 *             return obj.array
 *         return obj.values             # <<<<<<<<<<<<<<
 * 
 *     def get_rangeindex_attribute(self, level, name):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_mstate_global->__pyx_n_u_values); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 272, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/pandas-shim.pxi":261
 *             return False
 * 
 *     cpdef get_values(self, obj):             # <<<<<<<<<<<<<<
 *         """
 *         Get the underlying array values of a pandas Series or Index in the
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pyarrow.lib._PandasAPIShim.get_values", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_39get_values(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_14_PandasAPIShim_38get_values, "_PandasAPIShim.get_values(self, obj)\n\nGet the underlying array values of a pandas Series or Index in the\nformat (np.ndarray or pandas ExtensionArray) as we need them.\n\nAssumes obj is a pandas Series or Index.");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_14_PandasAPIShim_39get_values = {"get_values", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_39get_values, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_14_PandasAPIShim_38get_values};
static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_39get_values(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_obj = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_values (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_obj,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(12, 261, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(12, 261, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "get_values", 0) < (0)) __PYX_ERR(12, 261, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("get_values", 1, 1, 1, i); __PYX_ERR(12, 261, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(12, 261, __pyx_L3_error)
    }
    __pyx_v_obj = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("get_values", 1, 1, 1, __pyx_nargs); __PYX_ERR(12, 261, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("pyarrow.lib._PandasAPIShim.get_values", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyarrow_3lib_14_PandasAPIShim_38get_values(((struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *)__pyx_v_self), __pyx_v_obj);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7pyarrow_3lib_14_PandasAPIShim_38get_values(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self, PyObject *__pyx_v_obj) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_values", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_7pyarrow_3lib_14_PandasAPIShim_get_values(__pyx_v_self, __pyx_v_obj, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 261, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib._PandasAPIShim.get_values", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/pandas-shim.pxi":274
 *         return obj.values
 * 
 *     def get_rangeindex_attribute(self, level, name):             # <<<<<<<<<<<<<<
 *         # public start/stop/step attributes added in pandas 0.25.0
 *         self._check_import()
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_41get_rangeindex_attribute(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_14_PandasAPIShim_40get_rangeindex_attribute, "_PandasAPIShim.get_rangeindex_attribute(self, level, name)");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_14_PandasAPIShim_41get_rangeindex_attribute = {"get_rangeindex_attribute", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_41get_rangeindex_attribute, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_14_PandasAPIShim_40get_rangeindex_attribute};
static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_41get_rangeindex_attribute(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_level = 0;
  PyObject *__pyx_v_name = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_rangeindex_attribute (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_level,&__pyx_mstate_global->__pyx_n_u_name,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(12, 274, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(12, 274, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(12, 274, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "get_rangeindex_attribute", 0) < (0)) __PYX_ERR(12, 274, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("get_rangeindex_attribute", 1, 2, 2, i); __PYX_ERR(12, 274, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(12, 274, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(12, 274, __pyx_L3_error)
    }
    __pyx_v_level = values[0];
    __pyx_v_name = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("get_rangeindex_attribute", 1, 2, 2, __pyx_nargs); __PYX_ERR(12, 274, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("pyarrow.lib._PandasAPIShim.get_rangeindex_attribute", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyarrow_3lib_14_PandasAPIShim_40get_rangeindex_attribute(((struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *)__pyx_v_self), __pyx_v_level, __pyx_v_name);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7pyarrow_3lib_14_PandasAPIShim_40get_rangeindex_attribute(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self, PyObject *__pyx_v_level, PyObject *__pyx_v_name) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_rangeindex_attribute", 0);

  /* "pyarrow/pandas-shim.pxi":276
 *     def get_rangeindex_attribute(self, level, name):
 *         # public start/stop/step attributes added in pandas 0.25.0
 *         self._check_import()             # <<<<<<<<<<<<<<
 *         if hasattr(level, name):
 *             return getattr(level, name)
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_import");
    __PYX_ERR(12, 276, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_7pyarrow_3lib_14_PandasAPIShim__check_import(__pyx_v_self, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 276, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyarrow/pandas-shim.pxi":277
 *         # public start/stop/step attributes added in pandas 0.25.0
 *         self._check_import()
 *         if hasattr(level, name):             # <<<<<<<<<<<<<<
 *             return getattr(level, name)
 *         return getattr(level, '_' + name)
*/
  __pyx_t_2 = __Pyx_HasAttr(__pyx_v_level, __pyx_v_name); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(12, 277, __pyx_L1_error)
  if (__pyx_t_2) {

    /* "pyarrow/pandas-shim.pxi":278
 *         self._check_import()
 *         if hasattr(level, name):
 *             return getattr(level, name)             # <<<<<<<<<<<<<<
 *         return getattr(level, '_' + name)
 * 
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_GetAttr(__pyx_v_level, __pyx_v_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 278, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "pyarrow/pandas-shim.pxi":277
 *         # public start/stop/step attributes added in pandas 0.25.0
 *         self._check_import()
 *         if hasattr(level, name):             # <<<<<<<<<<<<<<
 *             return getattr(level, name)
 *         return getattr(level, '_' + name)
*/
  }

  /* "pyarrow/pandas-shim.pxi":279
 *         if hasattr(level, name):
 *             return getattr(level, name)
 *         return getattr(level, '_' + name)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyNumber_Add(__pyx_mstate_global->__pyx_n_u__3, __pyx_v_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 279, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_GetAttr(__pyx_v_level, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(12, 279, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "pyarrow/pandas-shim.pxi":274
 *         return obj.values
 * 
 *     def get_rangeindex_attribute(self, level, name):             # <<<<<<<<<<<<<<
 *         # public start/stop/step attributes added in pandas 0.25.0
 *         self._check_import()
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyarrow.lib._PandasAPIShim.get_rangeindex_attribute", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/pandas-shim.pxi":34
 * 
 *     cdef readonly:
 *         object _loose_version, _version             # <<<<<<<<<<<<<<
 *         object _pd, _types_api, _compat_module
 *         object _data_frame, _index, _series, _categorical_type
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_14_loose_version_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_14_loose_version_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_14_PandasAPIShim_14_loose_version___get__(((struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_14_PandasAPIShim_14_loose_version___get__(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_loose_version");
    __PYX_ERR(12, 34, __pyx_L1_error)
  }
  __Pyx_INCREF(__pyx_v_self->_loose_version);
  __pyx_r = __pyx_v_self->_loose_version;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyarrow.lib._PandasAPIShim._loose_version.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_8_version_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_8_version_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_14_PandasAPIShim_8_version___get__(((struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_14_PandasAPIShim_8_version___get__(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_version");
    __PYX_ERR(12, 34, __pyx_L1_error)
  }
  __Pyx_INCREF(__pyx_v_self->_version);
  __pyx_r = __pyx_v_self->_version;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyarrow.lib._PandasAPIShim._version.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/pandas-shim.pxi":35
 *     cdef readonly:
 *         object _loose_version, _version
 *         object _pd, _types_api, _compat_module             # <<<<<<<<<<<<<<
 *         object _data_frame, _index, _series, _categorical_type
 *         object _datetimetz_type, _extension_array, _extension_dtype
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_3_pd_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_3_pd_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_14_PandasAPIShim_3_pd___get__(((struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_14_PandasAPIShim_3_pd___get__(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_pd");
    __PYX_ERR(12, 35, __pyx_L1_error)
  }
  __Pyx_INCREF(__pyx_v_self->_pd);
  __pyx_r = __pyx_v_self->_pd;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyarrow.lib._PandasAPIShim._pd.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_10_types_api_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_10_types_api_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_14_PandasAPIShim_10_types_api___get__(((struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_14_PandasAPIShim_10_types_api___get__(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_types_api");
    __PYX_ERR(12, 35, __pyx_L1_error)
  }
  __Pyx_INCREF(__pyx_v_self->_types_api);
  __pyx_r = __pyx_v_self->_types_api;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyarrow.lib._PandasAPIShim._types_api.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_14_compat_module_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_14_compat_module_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_14_PandasAPIShim_14_compat_module___get__(((struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_14_PandasAPIShim_14_compat_module___get__(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_compat_module");
    __PYX_ERR(12, 35, __pyx_L1_error)
  }
  __Pyx_INCREF(__pyx_v_self->_compat_module);
  __pyx_r = __pyx_v_self->_compat_module;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyarrow.lib._PandasAPIShim._compat_module.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/pandas-shim.pxi":36
 *         object _loose_version, _version
 *         object _pd, _types_api, _compat_module
 *         object _data_frame, _index, _series, _categorical_type             # <<<<<<<<<<<<<<
 *         object _datetimetz_type, _extension_array, _extension_dtype
 *         object _array_like_types, _is_extension_array_dtype, _lock
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_11_data_frame_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_11_data_frame_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_14_PandasAPIShim_11_data_frame___get__(((struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_14_PandasAPIShim_11_data_frame___get__(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_data_frame");
    __PYX_ERR(12, 36, __pyx_L1_error)
  }
  __Pyx_INCREF(__pyx_v_self->_data_frame);
  __pyx_r = __pyx_v_self->_data_frame;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyarrow.lib._PandasAPIShim._data_frame.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_6_index_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_6_index_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_14_PandasAPIShim_6_index___get__(((struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_14_PandasAPIShim_6_index___get__(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_index");
    __PYX_ERR(12, 36, __pyx_L1_error)
  }
  __Pyx_INCREF(__pyx_v_self->_index);
  __pyx_r = __pyx_v_self->_index;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyarrow.lib._PandasAPIShim._index.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_7_series_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_7_series_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_14_PandasAPIShim_7_series___get__(((struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_14_PandasAPIShim_7_series___get__(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_series");
    __PYX_ERR(12, 36, __pyx_L1_error)
  }
  __Pyx_INCREF(__pyx_v_self->_series);
  __pyx_r = __pyx_v_self->_series;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyarrow.lib._PandasAPIShim._series.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_17_categorical_type_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_17_categorical_type_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_14_PandasAPIShim_17_categorical_type___get__(((struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_14_PandasAPIShim_17_categorical_type___get__(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_categorical_type");
    __PYX_ERR(12, 36, __pyx_L1_error)
  }
  __Pyx_INCREF(__pyx_v_self->_categorical_type);
  __pyx_r = __pyx_v_self->_categorical_type;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyarrow.lib._PandasAPIShim._categorical_type.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/pandas-shim.pxi":37
 *         object _pd, _types_api, _compat_module
 *         object _data_frame, _index, _series, _categorical_type
 *         object _datetimetz_type, _extension_array, _extension_dtype             # <<<<<<<<<<<<<<
 *         object _array_like_types, _is_extension_array_dtype, _lock
 *         bint has_sparse
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_16_datetimetz_type_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_16_datetimetz_type_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_14_PandasAPIShim_16_datetimetz_type___get__(((struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_14_PandasAPIShim_16_datetimetz_type___get__(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_datetimetz_type");
    __PYX_ERR(12, 37, __pyx_L1_error)
  }
  __Pyx_INCREF(__pyx_v_self->_datetimetz_type);
  __pyx_r = __pyx_v_self->_datetimetz_type;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyarrow.lib._PandasAPIShim._datetimetz_type.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_16_extension_array_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_16_extension_array_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_14_PandasAPIShim_16_extension_array___get__(((struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_14_PandasAPIShim_16_extension_array___get__(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_extension_array");
    __PYX_ERR(12, 37, __pyx_L1_error)
  }
  __Pyx_INCREF(__pyx_v_self->_extension_array);
  __pyx_r = __pyx_v_self->_extension_array;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyarrow.lib._PandasAPIShim._extension_array.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_16_extension_dtype_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_16_extension_dtype_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_14_PandasAPIShim_16_extension_dtype___get__(((struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_14_PandasAPIShim_16_extension_dtype___get__(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_extension_dtype");
    __PYX_ERR(12, 37, __pyx_L1_error)
  }
  __Pyx_INCREF(__pyx_v_self->_extension_dtype);
  __pyx_r = __pyx_v_self->_extension_dtype;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyarrow.lib._PandasAPIShim._extension_dtype.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/pandas-shim.pxi":38
 *         object _data_frame, _index, _series, _categorical_type
 *         object _datetimetz_type, _extension_array, _extension_dtype
 *         object _array_like_types, _is_extension_array_dtype, _lock             # <<<<<<<<<<<<<<
 *         bint has_sparse
 *         bint _pd024
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_17_array_like_types_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_17_array_like_types_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_14_PandasAPIShim_17_array_like_types___get__(((struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_14_PandasAPIShim_17_array_like_types___get__(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_array_like_types");
    __PYX_ERR(12, 38, __pyx_L1_error)
  }
  __Pyx_INCREF(__pyx_v_self->_array_like_types);
  __pyx_r = __pyx_v_self->_array_like_types;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyarrow.lib._PandasAPIShim._array_like_types.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_25_is_extension_array_dtype_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_25_is_extension_array_dtype_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_14_PandasAPIShim_25_is_extension_array_dtype___get__(((struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_14_PandasAPIShim_25_is_extension_array_dtype___get__(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_is_extension_array_dtype");
    __PYX_ERR(12, 38, __pyx_L1_error)
  }
  __Pyx_INCREF(__pyx_v_self->_is_extension_array_dtype);
  __pyx_r = __pyx_v_self->_is_extension_array_dtype;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyarrow.lib._PandasAPIShim._is_extension_array_dtype.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_5_lock_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_5_lock_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_14_PandasAPIShim_5_lock___get__(((struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_14_PandasAPIShim_5_lock___get__(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_lock");
    __PYX_ERR(12, 38, __pyx_L1_error)
  }
  __Pyx_INCREF(__pyx_v_self->_lock);
  __pyx_r = __pyx_v_self->_lock;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyarrow.lib._PandasAPIShim._lock.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/pandas-shim.pxi":39
 *         object _datetimetz_type, _extension_array, _extension_dtype
 *         object _array_like_types, _is_extension_array_dtype, _lock
 *         bint has_sparse             # <<<<<<<<<<<<<<
 *         bint _pd024
 *         bint _is_v1, _is_ge_v21, _is_ge_v23, _is_ge_v3, _is_ge_v3_strict
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_10has_sparse_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_10has_sparse_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_14_PandasAPIShim_10has_sparse___get__(((struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_14_PandasAPIShim_10has_sparse___get__(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "has_sparse");
    __PYX_ERR(12, 39, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->has_sparse); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 39, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib._PandasAPIShim.has_sparse.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/pandas-shim.pxi":40
 *         object _array_like_types, _is_extension_array_dtype, _lock
 *         bint has_sparse
 *         bint _pd024             # <<<<<<<<<<<<<<
 *         bint _is_v1, _is_ge_v21, _is_ge_v23, _is_ge_v3, _is_ge_v3_strict
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_6_pd024_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_6_pd024_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_14_PandasAPIShim_6_pd024___get__(((struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_14_PandasAPIShim_6_pd024___get__(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_pd024");
    __PYX_ERR(12, 40, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->_pd024); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 40, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib._PandasAPIShim._pd024.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/pandas-shim.pxi":41
 *         bint has_sparse
 *         bint _pd024
 *         bint _is_v1, _is_ge_v21, _is_ge_v23, _is_ge_v3, _is_ge_v3_strict             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self):
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_6_is_v1_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_6_is_v1_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_14_PandasAPIShim_6_is_v1___get__(((struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_14_PandasAPIShim_6_is_v1___get__(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_is_v1");
    __PYX_ERR(12, 41, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->_is_v1); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 41, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib._PandasAPIShim._is_v1.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_10_is_ge_v21_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_10_is_ge_v21_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_14_PandasAPIShim_10_is_ge_v21___get__(((struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_14_PandasAPIShim_10_is_ge_v21___get__(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_is_ge_v21");
    __PYX_ERR(12, 41, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->_is_ge_v21); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 41, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib._PandasAPIShim._is_ge_v21.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_10_is_ge_v23_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_10_is_ge_v23_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_14_PandasAPIShim_10_is_ge_v23___get__(((struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_14_PandasAPIShim_10_is_ge_v23___get__(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_is_ge_v23");
    __PYX_ERR(12, 41, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->_is_ge_v23); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 41, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib._PandasAPIShim._is_ge_v23.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_9_is_ge_v3_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_9_is_ge_v3_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_14_PandasAPIShim_9_is_ge_v3___get__(((struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_14_PandasAPIShim_9_is_ge_v3___get__(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_is_ge_v3");
    __PYX_ERR(12, 41, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->_is_ge_v3); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 41, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib._PandasAPIShim._is_ge_v3.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_16_is_ge_v3_strict_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_16_is_ge_v3_strict_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_14_PandasAPIShim_16_is_ge_v3_strict___get__(((struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_14_PandasAPIShim_16_is_ge_v3_strict___get__(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_is_ge_v3_strict");
    __PYX_ERR(12, 41, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->_is_ge_v3_strict); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 41, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib._PandasAPIShim._is_ge_v3_strict.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_43__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_14_PandasAPIShim_42__reduce_cython__, "_PandasAPIShim.__reduce_cython__(self)");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_14_PandasAPIShim_43__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_43__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_14_PandasAPIShim_42__reduce_cython__};
static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_43__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7pyarrow_3lib_14_PandasAPIShim_42__reduce_cython__(((struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *)__pyx_v_self));

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

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

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self._array_like_types, self._categorical_type, self._compat_module, self._data_frame, self._datetimetz_type, self._extension_array, self._extension_dtype, self._have_pandas, self._index, self._is_extension_array_dtype, self._is_ge_v21, self._is_ge_v23, self._is_ge_v3, self._is_ge_v3_strict, self._is_v1, self._lock, self._loose_version, self._pd, self._pd024, self._series, self._tried_importing_pandas, self._types_api, self._version, self.has_sparse)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None and _dict:
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_array_like_types");
    __PYX_ERR(7, 5, __pyx_L1_error)
  }
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_categorical_type");
    __PYX_ERR(7, 5, __pyx_L1_error)
  }
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_compat_module");
    __PYX_ERR(7, 5, __pyx_L1_error)
  }
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_data_frame");
    __PYX_ERR(7, 5, __pyx_L1_error)
  }
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_datetimetz_type");
    __PYX_ERR(7, 5, __pyx_L1_error)
  }
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_extension_array");
    __PYX_ERR(7, 5, __pyx_L1_error)
  }
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_extension_dtype");
    __PYX_ERR(7, 5, __pyx_L1_error)
  }
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_have_pandas");
    __PYX_ERR(7, 5, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->_have_pandas); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_index");
    __PYX_ERR(7, 5, __pyx_L1_error)
  }
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_is_extension_array_dtype");
    __PYX_ERR(7, 5, __pyx_L1_error)
  }
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_is_ge_v21");
    __PYX_ERR(7, 5, __pyx_L1_error)
  }
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_self->_is_ge_v21); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_is_ge_v23");
    __PYX_ERR(7, 5, __pyx_L1_error)
  }
  __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_self->_is_ge_v23); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_is_ge_v3");
    __PYX_ERR(7, 5, __pyx_L1_error)
  }
  __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_self->_is_ge_v3); if (unlikely(!__pyx_t_4)) __PYX_ERR(7, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_is_ge_v3_strict");
    __PYX_ERR(7, 5, __pyx_L1_error)
  }
  __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_self->_is_ge_v3_strict); if (unlikely(!__pyx_t_5)) __PYX_ERR(7, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_is_v1");
    __PYX_ERR(7, 5, __pyx_L1_error)
  }
  __pyx_t_6 = __Pyx_PyBool_FromLong(__pyx_v_self->_is_v1); if (unlikely(!__pyx_t_6)) __PYX_ERR(7, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_lock");
    __PYX_ERR(7, 5, __pyx_L1_error)
  }
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_loose_version");
    __PYX_ERR(7, 5, __pyx_L1_error)
  }
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_pd");
    __PYX_ERR(7, 5, __pyx_L1_error)
  }
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_pd024");
    __PYX_ERR(7, 5, __pyx_L1_error)
  }
  __pyx_t_7 = __Pyx_PyBool_FromLong(__pyx_v_self->_pd024); if (unlikely(!__pyx_t_7)) __PYX_ERR(7, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_series");
    __PYX_ERR(7, 5, __pyx_L1_error)
  }
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_tried_importing_pandas");
    __PYX_ERR(7, 5, __pyx_L1_error)
  }
  __pyx_t_8 = __Pyx_PyBool_FromLong(__pyx_v_self->_tried_importing_pandas); if (unlikely(!__pyx_t_8)) __PYX_ERR(7, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_types_api");
    __PYX_ERR(7, 5, __pyx_L1_error)
  }
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_version");
    __PYX_ERR(7, 5, __pyx_L1_error)
  }
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "has_sparse");
    __PYX_ERR(7, 5, __pyx_L1_error)
  }
  __pyx_t_9 = __Pyx_PyBool_FromLong(__pyx_v_self->has_sparse); if (unlikely(!__pyx_t_9)) __PYX_ERR(7, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_10 = PyTuple_New(24); if (unlikely(!__pyx_t_10)) __PYX_ERR(7, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_INCREF(__pyx_v_self->_array_like_types);
  __Pyx_GIVEREF(__pyx_v_self->_array_like_types);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_self->_array_like_types) != (0)) __PYX_ERR(7, 5, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_self->_categorical_type);
  __Pyx_GIVEREF(__pyx_v_self->_categorical_type);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_v_self->_categorical_type) != (0)) __PYX_ERR(7, 5, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_self->_compat_module);
  __Pyx_GIVEREF(__pyx_v_self->_compat_module);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_v_self->_compat_module) != (0)) __PYX_ERR(7, 5, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_self->_data_frame);
  __Pyx_GIVEREF(__pyx_v_self->_data_frame);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 3, __pyx_v_self->_data_frame) != (0)) __PYX_ERR(7, 5, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_self->_datetimetz_type);
  __Pyx_GIVEREF(__pyx_v_self->_datetimetz_type);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 4, __pyx_v_self->_datetimetz_type) != (0)) __PYX_ERR(7, 5, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_self->_extension_array);
  __Pyx_GIVEREF(__pyx_v_self->_extension_array);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 5, __pyx_v_self->_extension_array) != (0)) __PYX_ERR(7, 5, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_self->_extension_dtype);
  __Pyx_GIVEREF(__pyx_v_self->_extension_dtype);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 6, __pyx_v_self->_extension_dtype) != (0)) __PYX_ERR(7, 5, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 7, __pyx_t_1) != (0)) __PYX_ERR(7, 5, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_self->_index);
  __Pyx_GIVEREF(__pyx_v_self->_index);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 8, __pyx_v_self->_index) != (0)) __PYX_ERR(7, 5, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_self->_is_extension_array_dtype);
  __Pyx_GIVEREF(__pyx_v_self->_is_extension_array_dtype);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 9, __pyx_v_self->_is_extension_array_dtype) != (0)) __PYX_ERR(7, 5, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 10, __pyx_t_2) != (0)) __PYX_ERR(7, 5, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 11, __pyx_t_3) != (0)) __PYX_ERR(7, 5, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_4);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 12, __pyx_t_4) != (0)) __PYX_ERR(7, 5, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_5);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 13, __pyx_t_5) != (0)) __PYX_ERR(7, 5, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_6);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 14, __pyx_t_6) != (0)) __PYX_ERR(7, 5, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_self->_lock);
  __Pyx_GIVEREF(__pyx_v_self->_lock);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 15, __pyx_v_self->_lock) != (0)) __PYX_ERR(7, 5, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_self->_loose_version);
  __Pyx_GIVEREF(__pyx_v_self->_loose_version);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 16, __pyx_v_self->_loose_version) != (0)) __PYX_ERR(7, 5, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_self->_pd);
  __Pyx_GIVEREF(__pyx_v_self->_pd);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 17, __pyx_v_self->_pd) != (0)) __PYX_ERR(7, 5, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_7);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 18, __pyx_t_7) != (0)) __PYX_ERR(7, 5, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_self->_series);
  __Pyx_GIVEREF(__pyx_v_self->_series);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 19, __pyx_v_self->_series) != (0)) __PYX_ERR(7, 5, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_8);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 20, __pyx_t_8) != (0)) __PYX_ERR(7, 5, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_self->_types_api);
  __Pyx_GIVEREF(__pyx_v_self->_types_api);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 21, __pyx_v_self->_types_api) != (0)) __PYX_ERR(7, 5, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_self->_version);
  __Pyx_GIVEREF(__pyx_v_self->_version);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 22, __pyx_v_self->_version) != (0)) __PYX_ERR(7, 5, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_9);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 23, __pyx_t_9) != (0)) __PYX_ERR(7, 5, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_5 = 0;
  __pyx_t_6 = 0;
  __pyx_t_7 = 0;
  __pyx_t_8 = 0;
  __pyx_t_9 = 0;
  __pyx_v_state = ((PyObject*)__pyx_t_10);
  __pyx_t_10 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self._array_like_types, self._categorical_type, self._compat_module, self._data_frame, self._datetimetz_type, self._extension_array, self._extension_dtype, self._have_pandas, self._index, self._is_extension_array_dtype, self._is_ge_v21, self._is_ge_v23, self._is_ge_v3, self._is_ge_v3_strict, self._is_v1, self._lock, self._loose_version, self._pd, self._pd024, self._series, self._tried_importing_pandas, self._types_api, self._version, self.has_sparse)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None and _dict:
 *         state += (_dict,)
*/
  __pyx_t_10 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dict, Py_None); if (unlikely(!__pyx_t_10)) __PYX_ERR(7, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_v__dict = __pyx_t_10;
  __pyx_t_10 = 0;

  /* "(tree fragment)":7
 *     state = (self._array_like_types, self._categorical_type, self._compat_module, self._data_frame, self._datetimetz_type, self._extension_array, self._extension_dtype, self._have_pandas, self._index, self._is_extension_array_dtype, self._is_ge_v21, self._is_ge_v23, self._is_ge_v3, self._is_ge_v3_strict, self._is_v1, self._lock, self._loose_version, self._pd, self._pd024, self._series, self._tried_importing_pandas, self._types_api, self._version, self.has_sparse)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None and _dict:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
*/
  __pyx_t_12 = (__pyx_v__dict != Py_None);
  if (__pyx_t_12) {
  } else {
    __pyx_t_11 = __pyx_t_12;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v__dict); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(7, 7, __pyx_L1_error)
  __pyx_t_11 = __pyx_t_12;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_11) {

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

    /* "(tree fragment)":9
 *     if _dict is not None and _dict:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self._array_like_types is not None or self._categorical_type is not None or self._compat_module is not None or self._data_frame is not None or self._datetimetz_type is not None or self._extension_array is not None or self._extension_dtype is not None or self._index is not None or self._is_extension_array_dtype is not None or self._lock is not None or self._loose_version is not None or self._pd is not None or self._series is not None or self._types_api is not None or self._version is not None
*/
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self._array_like_types, self._categorical_type, self._compat_module, self._data_frame, self._datetimetz_type, self._extension_array, self._extension_dtype, self._have_pandas, self._index, self._is_extension_array_dtype, self._is_ge_v21, self._is_ge_v23, self._is_ge_v3, self._is_ge_v3_strict, self._is_v1, self._lock, self._loose_version, self._pd, self._pd024, self._series, self._tried_importing_pandas, self._types_api, self._version, self.has_sparse)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None and _dict:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
*/
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self._array_like_types is not None or self._categorical_type is not None or self._compat_module is not None or self._data_frame is not None or self._datetimetz_type is not None or self._extension_array is not None or self._extension_dtype is not None or self._index is not None or self._is_extension_array_dtype is not None or self._lock is not None or self._loose_version is not None or self._pd is not None or self._series is not None or self._types_api is not None or self._version is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle__PandasAPIShim, (type(self), 0x3ec5c35, None), state
*/
  /*else*/ {
    if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_array_like_types");
      __PYX_ERR(7, 11, __pyx_L1_error)
    }
    __pyx_t_12 = (__pyx_v_self->_array_like_types != Py_None);
    if (!__pyx_t_12) {
    } else {
      __pyx_t_11 = __pyx_t_12;
      goto __pyx_L6_bool_binop_done;
    }
    if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_categorical_type");
      __PYX_ERR(7, 11, __pyx_L1_error)
    }
    __pyx_t_12 = (__pyx_v_self->_categorical_type != Py_None);
    if (!__pyx_t_12) {
    } else {
      __pyx_t_11 = __pyx_t_12;
      goto __pyx_L6_bool_binop_done;
    }
    if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_compat_module");
      __PYX_ERR(7, 11, __pyx_L1_error)
    }
    __pyx_t_12 = (__pyx_v_self->_compat_module != Py_None);
    if (!__pyx_t_12) {
    } else {
      __pyx_t_11 = __pyx_t_12;
      goto __pyx_L6_bool_binop_done;
    }
    if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_data_frame");
      __PYX_ERR(7, 11, __pyx_L1_error)
    }
    __pyx_t_12 = (__pyx_v_self->_data_frame != Py_None);
    if (!__pyx_t_12) {
    } else {
      __pyx_t_11 = __pyx_t_12;
      goto __pyx_L6_bool_binop_done;
    }
    if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_datetimetz_type");
      __PYX_ERR(7, 11, __pyx_L1_error)
    }
    __pyx_t_12 = (__pyx_v_self->_datetimetz_type != Py_None);
    if (!__pyx_t_12) {
    } else {
      __pyx_t_11 = __pyx_t_12;
      goto __pyx_L6_bool_binop_done;
    }
    if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_extension_array");
      __PYX_ERR(7, 11, __pyx_L1_error)
    }
    __pyx_t_12 = (__pyx_v_self->_extension_array != Py_None);
    if (!__pyx_t_12) {
    } else {
      __pyx_t_11 = __pyx_t_12;
      goto __pyx_L6_bool_binop_done;
    }
    if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_extension_dtype");
      __PYX_ERR(7, 11, __pyx_L1_error)
    }
    __pyx_t_12 = (__pyx_v_self->_extension_dtype != Py_None);
    if (!__pyx_t_12) {
    } else {
      __pyx_t_11 = __pyx_t_12;
      goto __pyx_L6_bool_binop_done;
    }
    if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_index");
      __PYX_ERR(7, 11, __pyx_L1_error)
    }
    __pyx_t_12 = (__pyx_v_self->_index != Py_None);
    if (!__pyx_t_12) {
    } else {
      __pyx_t_11 = __pyx_t_12;
      goto __pyx_L6_bool_binop_done;
    }
    if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_is_extension_array_dtype");
      __PYX_ERR(7, 11, __pyx_L1_error)
    }
    __pyx_t_12 = (__pyx_v_self->_is_extension_array_dtype != Py_None);
    if (!__pyx_t_12) {
    } else {
      __pyx_t_11 = __pyx_t_12;
      goto __pyx_L6_bool_binop_done;
    }
    if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_lock");
      __PYX_ERR(7, 11, __pyx_L1_error)
    }
    __pyx_t_12 = (__pyx_v_self->_lock != Py_None);
    if (!__pyx_t_12) {
    } else {
      __pyx_t_11 = __pyx_t_12;
      goto __pyx_L6_bool_binop_done;
    }
    if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_loose_version");
      __PYX_ERR(7, 11, __pyx_L1_error)
    }
    __pyx_t_12 = (__pyx_v_self->_loose_version != Py_None);
    if (!__pyx_t_12) {
    } else {
      __pyx_t_11 = __pyx_t_12;
      goto __pyx_L6_bool_binop_done;
    }
    if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_pd");
      __PYX_ERR(7, 11, __pyx_L1_error)
    }
    __pyx_t_12 = (__pyx_v_self->_pd != Py_None);
    if (!__pyx_t_12) {
    } else {
      __pyx_t_11 = __pyx_t_12;
      goto __pyx_L6_bool_binop_done;
    }
    if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_series");
      __PYX_ERR(7, 11, __pyx_L1_error)
    }
    __pyx_t_12 = (__pyx_v_self->_series != Py_None);
    if (!__pyx_t_12) {
    } else {
      __pyx_t_11 = __pyx_t_12;
      goto __pyx_L6_bool_binop_done;
    }
    if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_types_api");
      __PYX_ERR(7, 11, __pyx_L1_error)
    }
    __pyx_t_12 = (__pyx_v_self->_types_api != Py_None);
    if (!__pyx_t_12) {
    } else {
      __pyx_t_11 = __pyx_t_12;
      goto __pyx_L6_bool_binop_done;
    }
    if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_version");
      __PYX_ERR(7, 11, __pyx_L1_error)
    }
    __pyx_t_12 = (__pyx_v_self->_version != Py_None);
    __pyx_t_11 = __pyx_t_12;
    __pyx_L6_bool_binop_done:;
    __pyx_v_use_setstate = __pyx_t_11;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._array_like_types is not None or self._categorical_type is not None or self._compat_module is not None or self._data_frame is not None or self._datetimetz_type is not None or self._extension_array is not None or self._extension_dtype is not None or self._index is not None or self._is_extension_array_dtype is not None or self._lock is not None or self._loose_version is not None or self._pd is not None or self._series is not None or self._types_api is not None or self._version is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle__PandasAPIShim, (type(self), 0x3ec5c35, None), state
 *     else:
*/
  if (__pyx_v_use_setstate) {

    /* "(tree fragment)":13
 *         use_setstate = self._array_like_types is not None or self._categorical_type is not None or self._compat_module is not None or self._data_frame is not None or self._datetimetz_type is not None or self._extension_array is not None or self._extension_dtype is not None or self._index is not None or self._is_extension_array_dtype is not None or self._lock is not None or self._loose_version is not None or self._pd is not None or self._series is not None or self._types_api is not None or self._version is not None
 *     if use_setstate:
 *         return __pyx_unpickle__PandasAPIShim, (type(self), 0x3ec5c35, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle__PandasAPIShim, (type(self), 0x3ec5c35, state)
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_pyx_unpickle__PandasAPIShim); if (unlikely(!__pyx_t_9)) __PYX_ERR(7, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_10 = PyTuple_New(3); if (unlikely(!__pyx_t_10)) __PYX_ERR(7, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(7, 13, __pyx_L1_error);
    __Pyx_INCREF(__pyx_mstate_global->__pyx_int_65821749);
    __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_65821749);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_mstate_global->__pyx_int_65821749) != (0)) __PYX_ERR(7, 13, __pyx_L1_error);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 2, Py_None) != (0)) __PYX_ERR(7, 13, __pyx_L1_error);
    __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(7, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_9);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_9) != (0)) __PYX_ERR(7, 13, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_10);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_10) != (0)) __PYX_ERR(7, 13, __pyx_L1_error);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_v_state) != (0)) __PYX_ERR(7, 13, __pyx_L1_error);
    __pyx_t_9 = 0;
    __pyx_t_10 = 0;
    __pyx_r = __pyx_t_8;
    __pyx_t_8 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._array_like_types is not None or self._categorical_type is not None or self._compat_module is not None or self._data_frame is not None or self._datetimetz_type is not None or self._extension_array is not None or self._extension_dtype is not None or self._index is not None or self._is_extension_array_dtype is not None or self._lock is not None or self._loose_version is not None or self._pd is not None or self._series is not None or self._types_api is not None or self._version is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle__PandasAPIShim, (type(self), 0x3ec5c35, None), state
 *     else:
*/
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle__PandasAPIShim, (type(self), 0x3ec5c35, None), state
 *     else:
 *         return __pyx_unpickle__PandasAPIShim, (type(self), 0x3ec5c35, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle__PandasAPIShim__set_state(self, __pyx_state)
*/
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_pyx_unpickle__PandasAPIShim); if (unlikely(!__pyx_t_8)) __PYX_ERR(7, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_10 = PyTuple_New(3); if (unlikely(!__pyx_t_10)) __PYX_ERR(7, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(7, 15, __pyx_L1_error);
    __Pyx_INCREF(__pyx_mstate_global->__pyx_int_65821749);
    __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_65821749);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_mstate_global->__pyx_int_65821749) != (0)) __PYX_ERR(7, 15, __pyx_L1_error);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_v_state) != (0)) __PYX_ERR(7, 15, __pyx_L1_error);
    __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(7, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_GIVEREF(__pyx_t_8);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8) != (0)) __PYX_ERR(7, 15, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_10);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_10) != (0)) __PYX_ERR(7, 15, __pyx_L1_error);
    __pyx_t_8 = 0;
    __pyx_t_10 = 0;
    __pyx_r = __pyx_t_9;
    __pyx_t_9 = 0;
    goto __pyx_L0;
  }

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

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

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle__PandasAPIShim, (type(self), 0x3ec5c35, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle__PandasAPIShim__set_state(self, __pyx_state)
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_45__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_14_PandasAPIShim_44__setstate_cython__, "_PandasAPIShim.__setstate_cython__(self, __pyx_state)");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_14_PandasAPIShim_45__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_45__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_14_PandasAPIShim_44__setstate_cython__};
static PyObject *__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_45__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(7, 16, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(7, 16, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(7, 16, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(7, 16, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(7, 16, __pyx_L3_error)
    }
    __pyx_v___pyx_state = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(7, 16, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("pyarrow.lib._PandasAPIShim.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyarrow_3lib_14_PandasAPIShim_44__setstate_cython__(((struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *)__pyx_v_self), __pyx_v___pyx_state);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

  /* "(tree fragment)":17
 *         return __pyx_unpickle__PandasAPIShim, (type(self), 0x3ec5c35, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle__PandasAPIShim__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
*/
  __pyx_t_1 = __pyx_v___pyx_state;
  __Pyx_INCREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(7, 17, __pyx_L1_error)
  if (unlikely(__pyx_t_1 == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'");
    __PYX_ERR(7, 17, __pyx_L1_error)
  }
  __pyx_t_2 = __pyx_f_7pyarrow_3lib___pyx_unpickle__PandasAPIShim__set_state(__pyx_v_self, ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 17, __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;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle__PandasAPIShim, (type(self), 0x3ec5c35, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle__PandasAPIShim__set_state(self, __pyx_state)
*/

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

/* "pyarrow/memory.pxi":31
 *     """
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         raise TypeError(f"Do not call {self.__class__.__name__}'s constructor directly, "
 *                         "use pyarrow.*_memory_pool instead.")
*/

/* Python wrapper */
static int __pyx_pw_7pyarrow_3lib_10MemoryPool_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_7pyarrow_3lib_10MemoryPool_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, __pyx_nargs); return -1; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return -1;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__init__", __pyx_kwds); return -1;}
  __pyx_r = __pyx_pf_7pyarrow_3lib_10MemoryPool___init__(((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)__pyx_v_self));

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

static int __pyx_pf_7pyarrow_3lib_10MemoryPool___init__(struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5[3];
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "pyarrow/memory.pxi":32
 * 
 *     def __init__(self):
 *         raise TypeError(f"Do not call {self.__class__.__name__}'s constructor directly, "             # <<<<<<<<<<<<<<
 *                         "use pyarrow.*_memory_pool instead.")
 * 
*/
  __pyx_t_2 = NULL;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(13, 32, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_name_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(13, 32, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(13, 32, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_5[0] = __pyx_mstate_global->__pyx_kp_u_Do_not_call;
  __pyx_t_5[1] = __pyx_t_3;
  __pyx_t_5[2] = __pyx_mstate_global->__pyx_kp_u_s_constructor_directly_use_pyar;
  __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_5, 3, 12 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + 59, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3));
  if (unlikely(!__pyx_t_4)) __PYX_ERR(13, 32, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 32, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(13, 32, __pyx_L1_error)

  /* "pyarrow/memory.pxi":31
 *     """
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         raise TypeError(f"Do not call {self.__class__.__name__}'s constructor directly, "
 *                         "use pyarrow.*_memory_pool instead.")
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pyarrow.lib.MemoryPool.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/memory.pxi":35
 *                         "use pyarrow.*_memory_pool instead.")
 * 
 *     cdef void init(self, CMemoryPool* pool):             # <<<<<<<<<<<<<<
 *         self.pool = pool
 * 
*/

static void __pyx_f_7pyarrow_3lib_10MemoryPool_init(struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_self,  arrow::MemoryPool *__pyx_v_pool) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "pyarrow/memory.pxi":36
 * 
 *     cdef void init(self, CMemoryPool* pool):
 *         self.pool = pool             # <<<<<<<<<<<<<<
 * 
 *     def release_unused(self):
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "pool");
    __PYX_ERR(13, 36, __pyx_L1_error)
  }
  __pyx_v_self->pool = __pyx_v_pool;

  /* "pyarrow/memory.pxi":35
 *                         "use pyarrow.*_memory_pool instead.")
 * 
 *     cdef void init(self, CMemoryPool* pool):             # <<<<<<<<<<<<<<
 *         self.pool = pool
 * 
*/

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyarrow.lib.MemoryPool.init", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
}

/* "pyarrow/memory.pxi":38
 *         self.pool = pool
 * 
 *     def release_unused(self):             # <<<<<<<<<<<<<<
 *         """
 *         Attempt to return to the OS any memory being held onto by the pool.
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_10MemoryPool_3release_unused(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_10MemoryPool_2release_unused, "MemoryPool.release_unused(self)\n\nAttempt to return to the OS any memory being held onto by the pool.\n\nThis function should not be called except potentially for\nbenchmarking or debugging as it could be expensive and detrimental to\nperformance.\n\nThis is best effort and may not have any effect on some memory pools\nor in some situations (e.g. fragmentation).");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_10MemoryPool_3release_unused = {"release_unused", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10MemoryPool_3release_unused, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10MemoryPool_2release_unused};
static PyObject *__pyx_pw_7pyarrow_3lib_10MemoryPool_3release_unused(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("release_unused (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("release_unused", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("release_unused", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7pyarrow_3lib_10MemoryPool_2release_unused(((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_10MemoryPool_2release_unused(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_self) {
   arrow::MemoryPool *__pyx_v_pool;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("release_unused", 0);

  /* "pyarrow/memory.pxi":49
 *         or in some situations (e.g. fragmentation).
 *         """
 *         cdef CMemoryPool* pool = c_get_memory_pool()             # <<<<<<<<<<<<<<
 *         with nogil:
 *             pool.ReleaseUnused()
*/
  __pyx_v_pool =  arrow::py::get_memory_pool();

  /* "pyarrow/memory.pxi":50
 *         """
 *         cdef CMemoryPool* pool = c_get_memory_pool()
 *         with nogil:             # <<<<<<<<<<<<<<
 *             pool.ReleaseUnused()
 * 
*/
  {
      PyThreadState * _save;
      _save = PyEval_SaveThread();
      __Pyx_FastGIL_Remember();
      /*try:*/ {

        /* "pyarrow/memory.pxi":51
 *         cdef CMemoryPool* pool = c_get_memory_pool()
 *         with nogil:
 *             pool.ReleaseUnused()             # <<<<<<<<<<<<<<
 * 
 *     def bytes_allocated(self):
*/
        __pyx_v_pool->ReleaseUnused();
      }

      /* "pyarrow/memory.pxi":50
 *         """
 *         cdef CMemoryPool* pool = c_get_memory_pool()
 *         with nogil:             # <<<<<<<<<<<<<<
 *             pool.ReleaseUnused()
 * 
*/
      /*finally:*/ {
        /*normal exit:*/{
          __Pyx_FastGIL_Forget();
          PyEval_RestoreThread(_save);
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "pyarrow/memory.pxi":38
 *         self.pool = pool
 * 
 *     def release_unused(self):             # <<<<<<<<<<<<<<
 *         """
 *         Attempt to return to the OS any memory being held onto by the pool.
*/

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

/* "pyarrow/memory.pxi":53
 *             pool.ReleaseUnused()
 * 
 *     def bytes_allocated(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the number of bytes that are currently allocated from this
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_10MemoryPool_5bytes_allocated(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_10MemoryPool_4bytes_allocated, "MemoryPool.bytes_allocated(self)\n\nReturn the number of bytes that are currently allocated from this\nmemory pool.");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_10MemoryPool_5bytes_allocated = {"bytes_allocated", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10MemoryPool_5bytes_allocated, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10MemoryPool_4bytes_allocated};
static PyObject *__pyx_pw_7pyarrow_3lib_10MemoryPool_5bytes_allocated(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("bytes_allocated (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("bytes_allocated", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("bytes_allocated", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7pyarrow_3lib_10MemoryPool_4bytes_allocated(((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_10MemoryPool_4bytes_allocated(struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("bytes_allocated", 0);

  /* "pyarrow/memory.pxi":58
 *         memory pool.
 *         """
 *         return self.pool.bytes_allocated()             # <<<<<<<<<<<<<<
 * 
 *     def total_bytes_allocated(self):
*/
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "pool");
    __PYX_ERR(13, 58, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyLong_From_int64_t(__pyx_v_self->pool->bytes_allocated()); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 58, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/memory.pxi":53
 *             pool.ReleaseUnused()
 * 
 *     def bytes_allocated(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the number of bytes that are currently allocated from this
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib.MemoryPool.bytes_allocated", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/memory.pxi":60
 *         return self.pool.bytes_allocated()
 * 
 *     def total_bytes_allocated(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the total number of bytes that have been allocated from this
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_10MemoryPool_7total_bytes_allocated(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_10MemoryPool_6total_bytes_allocated, "MemoryPool.total_bytes_allocated(self)\n\nReturn the total number of bytes that have been allocated from this\nmemory pool.");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_10MemoryPool_7total_bytes_allocated = {"total_bytes_allocated", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10MemoryPool_7total_bytes_allocated, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10MemoryPool_6total_bytes_allocated};
static PyObject *__pyx_pw_7pyarrow_3lib_10MemoryPool_7total_bytes_allocated(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("total_bytes_allocated (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("total_bytes_allocated", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("total_bytes_allocated", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7pyarrow_3lib_10MemoryPool_6total_bytes_allocated(((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_10MemoryPool_6total_bytes_allocated(struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("total_bytes_allocated", 0);

  /* "pyarrow/memory.pxi":65
 *         memory pool.
 *         """
 *         return self.pool.total_bytes_allocated()             # <<<<<<<<<<<<<<
 * 
 *     def max_memory(self):
*/
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "pool");
    __PYX_ERR(13, 65, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyLong_From_int64_t(__pyx_v_self->pool->total_bytes_allocated()); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 65, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/memory.pxi":60
 *         return self.pool.bytes_allocated()
 * 
 *     def total_bytes_allocated(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the total number of bytes that have been allocated from this
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib.MemoryPool.total_bytes_allocated", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/memory.pxi":67
 *         return self.pool.total_bytes_allocated()
 * 
 *     def max_memory(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the peak memory allocation in this memory pool.
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_10MemoryPool_9max_memory(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_10MemoryPool_8max_memory, "MemoryPool.max_memory(self)\n\nReturn the peak memory allocation in this memory pool.\nThis can be an approximate number in multi-threaded applications.\n\nNone is returned if the pool implementation doesn't know how to\ncompute this number.");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_10MemoryPool_9max_memory = {"max_memory", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10MemoryPool_9max_memory, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10MemoryPool_8max_memory};
static PyObject *__pyx_pw_7pyarrow_3lib_10MemoryPool_9max_memory(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("max_memory (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("max_memory", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("max_memory", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7pyarrow_3lib_10MemoryPool_8max_memory(((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_10MemoryPool_8max_memory(struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_self) {
  int64_t __pyx_v_ret;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("max_memory", 0);

  /* "pyarrow/memory.pxi":75
 *         compute this number.
 *         """
 *         ret = self.pool.max_memory()             # <<<<<<<<<<<<<<
 *         return ret if ret >= 0 else None
 * 
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "pool");
    __PYX_ERR(13, 75, __pyx_L1_error)
  }
  __pyx_v_ret = __pyx_v_self->pool->max_memory();

  /* "pyarrow/memory.pxi":76
 *         """
 *         ret = self.pool.max_memory()
 *         return ret if ret >= 0 else None             # <<<<<<<<<<<<<<
 * 
 *     def num_allocations(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = (__pyx_v_ret >= 0);
  if (__pyx_t_2) {
    __pyx_t_3 = __Pyx_PyLong_From_int64_t(__pyx_v_ret); if (unlikely(!__pyx_t_3)) __PYX_ERR(13, 76, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/memory.pxi":67
 *         return self.pool.total_bytes_allocated()
 * 
 *     def max_memory(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the peak memory allocation in this memory pool.
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyarrow.lib.MemoryPool.max_memory", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/memory.pxi":78
 *         return ret if ret >= 0 else None
 * 
 *     def num_allocations(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the number of allocations or reallocations that were made
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_10MemoryPool_11num_allocations(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_10MemoryPool_10num_allocations, "MemoryPool.num_allocations(self)\n\nReturn the number of allocations or reallocations that were made\nusing this memory pool.");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_10MemoryPool_11num_allocations = {"num_allocations", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10MemoryPool_11num_allocations, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10MemoryPool_10num_allocations};
static PyObject *__pyx_pw_7pyarrow_3lib_10MemoryPool_11num_allocations(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("num_allocations (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("num_allocations", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("num_allocations", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7pyarrow_3lib_10MemoryPool_10num_allocations(((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_10MemoryPool_10num_allocations(struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("num_allocations", 0);

  /* "pyarrow/memory.pxi":83
 *         using this memory pool.
 *         """
 *         return self.pool.num_allocations()             # <<<<<<<<<<<<<<
 * 
 *     def print_stats(self):
*/
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "pool");
    __PYX_ERR(13, 83, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyLong_From_int64_t(__pyx_v_self->pool->num_allocations()); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 83, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/memory.pxi":78
 *         return ret if ret >= 0 else None
 * 
 *     def num_allocations(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the number of allocations or reallocations that were made
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib.MemoryPool.num_allocations", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/memory.pxi":85
 *         return self.pool.num_allocations()
 * 
 *     def print_stats(self):             # <<<<<<<<<<<<<<
 *         """
 *         Print statistics about this memory pool.
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_10MemoryPool_13print_stats(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_10MemoryPool_12print_stats, "MemoryPool.print_stats(self)\n\nPrint statistics about this memory pool.\n\nThe output format is implementation-specific. Not all memory pools\nimplement this method.");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_10MemoryPool_13print_stats = {"print_stats", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10MemoryPool_13print_stats, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10MemoryPool_12print_stats};
static PyObject *__pyx_pw_7pyarrow_3lib_10MemoryPool_13print_stats(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("print_stats (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("print_stats", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("print_stats", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7pyarrow_3lib_10MemoryPool_12print_stats(((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_10MemoryPool_12print_stats(struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("print_stats", 0);

  /* "pyarrow/memory.pxi":92
 *         implement this method.
 *         """
 *         with nogil:             # <<<<<<<<<<<<<<
 *             self.pool.PrintStats()
 * 
*/
  {
      PyThreadState * _save;
      _save = PyEval_SaveThread();
      __Pyx_FastGIL_Remember();
      /*try:*/ {

        /* "pyarrow/memory.pxi":93
 *         """
 *         with nogil:
 *             self.pool.PrintStats()             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
        if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "pool");
          __Pyx_PyGILState_Release(__pyx_gilstate_save);
          __PYX_ERR(13, 93, __pyx_L4_error)
        }
        __pyx_v_self->pool->PrintStats();
      }

      /* "pyarrow/memory.pxi":92
 *         implement this method.
 *         """
 *         with nogil:             # <<<<<<<<<<<<<<
 *             self.pool.PrintStats()
 * 
*/
      /*finally:*/ {
        /*normal exit:*/{
          __Pyx_FastGIL_Forget();
          PyEval_RestoreThread(_save);
          goto __pyx_L5;
        }
        __pyx_L4_error: {
          __Pyx_FastGIL_Forget();
          PyEval_RestoreThread(_save);
          goto __pyx_L1_error;
        }
        __pyx_L5:;
      }
  }

  /* "pyarrow/memory.pxi":85
 *         return self.pool.num_allocations()
 * 
 *     def print_stats(self):             # <<<<<<<<<<<<<<
 *         """
 *         Print statistics about this memory pool.
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyarrow.lib.MemoryPool.print_stats", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/memory.pxi":95
 *             self.pool.PrintStats()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def backend_name(self):
 *         """
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_10MemoryPool_12backend_name_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_10MemoryPool_12backend_name_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_10MemoryPool_12backend_name___get__(((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_10MemoryPool_12backend_name___get__(struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyarrow/memory.pxi":100
 *         The name of the backend used by this MemoryPool (e.g. "jemalloc").
 *         """
 *         return frombytes(self.pool.backend_name())             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_frombytes); if (unlikely(!__pyx_t_3)) __PYX_ERR(13, 100, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "pool");
    __PYX_ERR(13, 100, __pyx_L1_error)
  }
  __pyx_t_4 = __pyx_convert_PyBytes_string_to_py_6libcpp_6string_std__in_string(__pyx_v_self->pool->backend_name()); if (unlikely(!__pyx_t_4)) __PYX_ERR(13, 100, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 100, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/memory.pxi":95
 *             self.pool.PrintStats()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def backend_name(self):
 *         """
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pyarrow.lib.MemoryPool.backend_name.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/memory.pxi":102
 *         return frombytes(self.pool.backend_name())
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         name = f"pyarrow.{self.__class__.__name__}"
 *         return (f"<{name} "
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_10MemoryPool_15__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_10MemoryPool_15__repr__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_10MemoryPool_14__repr__(((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_10MemoryPool_14__repr__(struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_self) {
  PyObject *__pyx_v_name = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5[9];
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);

  /* "pyarrow/memory.pxi":103
 * 
 *     def __repr__(self):
 *         name = f"pyarrow.{self.__class__.__name__}"             # <<<<<<<<<<<<<<
 *         return (f"<{name} "
 *                 f"backend_name={self.backend_name} "
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 103, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_name_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 103, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_t_2, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 103, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_pyarrow, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 103, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_name = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pyarrow/memory.pxi":104
 *     def __repr__(self):
 *         name = f"pyarrow.{self.__class__.__name__}"
 *         return (f"<{name} "             # <<<<<<<<<<<<<<
 *                 f"backend_name={self.backend_name} "
 *                 f"bytes_allocated={self.bytes_allocated()} "
*/
  __Pyx_XDECREF(__pyx_r);

  /* "pyarrow/memory.pxi":105
 *         name = f"pyarrow.{self.__class__.__name__}"
 *         return (f"<{name} "
 *                 f"backend_name={self.backend_name} "             # <<<<<<<<<<<<<<
 *                 f"bytes_allocated={self.bytes_allocated()} "
 *                 f"max_memory={self.max_memory()}>")
*/
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_backend_name_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 105, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_t_2, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 105, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyarrow/memory.pxi":106
 *         return (f"<{name} "
 *                 f"backend_name={self.backend_name} "
 *                 f"bytes_allocated={self.bytes_allocated()} "             # <<<<<<<<<<<<<<
 *                 f"max_memory={self.max_memory()}>")
 * 
*/
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_bytes_allocated_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 106, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(13, 106, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_FormatSimple(__pyx_t_3, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 106, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pyarrow/memory.pxi":107
 *                 f"backend_name={self.backend_name} "
 *                 f"bytes_allocated={self.bytes_allocated()} "
 *                 f"max_memory={self.max_memory()}>")             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_max_memory_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(13, 107, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(13, 107, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(13, 107, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_5[0] = __pyx_mstate_global->__pyx_kp_u__4;
  __pyx_t_5[1] = __pyx_v_name;
  __pyx_t_5[2] = __pyx_mstate_global->__pyx_kp_u_backend_name;
  __pyx_t_5[3] = __pyx_t_1;
  __pyx_t_5[4] = __pyx_mstate_global->__pyx_kp_u_bytes_allocated;
  __pyx_t_5[5] = __pyx_t_2;
  __pyx_t_5[6] = __pyx_mstate_global->__pyx_kp_u_max_memory;
  __pyx_t_5[7] = __pyx_t_3;
  __pyx_t_5[8] = __pyx_mstate_global->__pyx_kp_u__5;

  /* "pyarrow/memory.pxi":104
 *     def __repr__(self):
 *         name = f"pyarrow.{self.__class__.__name__}"
 *         return (f"<{name} "             # <<<<<<<<<<<<<<
 *                 f"backend_name={self.backend_name} "
 *                 f"bytes_allocated={self.bytes_allocated()} "
*/
  __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_5, 9, 1 * 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_v_name) + 14 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1) + 17 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2) + 12 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_v_name) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3));
  if (unlikely(!__pyx_t_4)) __PYX_ERR(13, 104, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "pyarrow/memory.pxi":102
 *         return frombytes(self.pool.backend_name())
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         name = f"pyarrow.{self.__class__.__name__}"
 *         return (f"<{name} "
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pyarrow.lib.MemoryPool.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_name);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.pool cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_10MemoryPool_17__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_10MemoryPool_16__reduce_cython__, "MemoryPool.__reduce_cython__(self)");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_10MemoryPool_17__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10MemoryPool_17__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10MemoryPool_16__reduce_cython__};
static PyObject *__pyx_pw_7pyarrow_3lib_10MemoryPool_17__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7pyarrow_3lib_10MemoryPool_16__reduce_cython__(((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_10MemoryPool_16__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "self.pool cannot be converted to a Python object for pickling"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "self.pool cannot be converted to a Python object for pickling"
*/
  __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_self_pool_cannot_be_converted_to, 0, 0);
  __PYX_ERR(7, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.pool cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyarrow.lib.MemoryPool.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "self.pool cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.pool cannot be converted to a Python object for pickling"
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_10MemoryPool_19__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_10MemoryPool_18__setstate_cython__, "MemoryPool.__setstate_cython__(self, __pyx_state)");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_10MemoryPool_19__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10MemoryPool_19__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10MemoryPool_18__setstate_cython__};
static PyObject *__pyx_pw_7pyarrow_3lib_10MemoryPool_19__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(7, 3, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(7, 3, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(7, 3, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(7, 3, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(7, 3, __pyx_L3_error)
    }
    __pyx_v___pyx_state = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(7, 3, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("pyarrow.lib.MemoryPool.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyarrow_3lib_10MemoryPool_18__setstate_cython__(((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)__pyx_v_self), __pyx_v___pyx_state);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

  /* "(tree fragment)":4
 *     raise TypeError, "self.pool cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "self.pool cannot be converted to a Python object for pickling"             # <<<<<<<<<<<<<<
*/
  __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_self_pool_cannot_be_converted_to, 0, 0);
  __PYX_ERR(7, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "self.pool cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.pool cannot be converted to a Python object for pickling"
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyarrow.lib.MemoryPool.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/memory.pxi":110
 * 
 * 
 * cdef CMemoryPool* maybe_unbox_memory_pool(MemoryPool memory_pool):             # <<<<<<<<<<<<<<
 *     if memory_pool is None:
 *         return c_get_memory_pool()
*/

static  arrow::MemoryPool *__pyx_f_7pyarrow_3lib_maybe_unbox_memory_pool(struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_memory_pool) {
   arrow::MemoryPool *__pyx_r;
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "pyarrow/memory.pxi":111
 * 
 * cdef CMemoryPool* maybe_unbox_memory_pool(MemoryPool memory_pool):
 *     if memory_pool is None:             # <<<<<<<<<<<<<<
 *         return c_get_memory_pool()
 *     else:
*/
  __pyx_t_1 = (((PyObject *)__pyx_v_memory_pool) == Py_None);
  if (__pyx_t_1) {

    /* "pyarrow/memory.pxi":112
 * cdef CMemoryPool* maybe_unbox_memory_pool(MemoryPool memory_pool):
 *     if memory_pool is None:
 *         return c_get_memory_pool()             # <<<<<<<<<<<<<<
 *     else:
 *         return memory_pool.pool
*/
    __pyx_r =  arrow::py::get_memory_pool();
    goto __pyx_L0;

    /* "pyarrow/memory.pxi":111
 * 
 * cdef CMemoryPool* maybe_unbox_memory_pool(MemoryPool memory_pool):
 *     if memory_pool is None:             # <<<<<<<<<<<<<<
 *         return c_get_memory_pool()
 *     else:
*/
  }

  /* "pyarrow/memory.pxi":114
 *         return c_get_memory_pool()
 *     else:
 *         return memory_pool.pool             # <<<<<<<<<<<<<<
 * 
 * 
*/
  /*else*/ {
    if (unlikely(((PyObject *)__pyx_v_memory_pool) == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "pool");
      __PYX_ERR(13, 114, __pyx_L1_error)
    }
    __pyx_r = __pyx_v_memory_pool->pool;
    goto __pyx_L0;
  }

  /* "pyarrow/memory.pxi":110
 * 
 * 
 * cdef CMemoryPool* maybe_unbox_memory_pool(MemoryPool memory_pool):             # <<<<<<<<<<<<<<
 *     if memory_pool is None:
 *         return c_get_memory_pool()
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyarrow.lib.maybe_unbox_memory_pool", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  return __pyx_r;
}

/* "pyarrow/memory.pxi":117
 * 
 * 
 * cdef api object box_memory_pool(CMemoryPool *c_pool):             # <<<<<<<<<<<<<<
 *     cdef MemoryPool pool = MemoryPool.__new__(MemoryPool)
 *     pool.init(c_pool)
*/

static PyObject *__pyx_f_7pyarrow_3lib_box_memory_pool( arrow::MemoryPool *__pyx_v_c_pool) {
  struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_pool = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("box_memory_pool", 0);

  /* "pyarrow/memory.pxi":118
 * 
 * cdef api object box_memory_pool(CMemoryPool *c_pool):
 *     cdef MemoryPool pool = MemoryPool.__new__(MemoryPool)             # <<<<<<<<<<<<<<
 *     pool.init(c_pool)
 *     return pool
*/
  __pyx_t_1 = ((PyObject *)__pyx_tp_new_7pyarrow_3lib_MemoryPool(((PyTypeObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_MemoryPool), __pyx_mstate_global->__pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 118, __pyx_L1_error)
  __Pyx_GOTREF((PyObject *)__pyx_t_1);
  __pyx_v_pool = ((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyarrow/memory.pxi":119
 * cdef api object box_memory_pool(CMemoryPool *c_pool):
 *     cdef MemoryPool pool = MemoryPool.__new__(MemoryPool)
 *     pool.init(c_pool)             # <<<<<<<<<<<<<<
 *     return pool
 * 
*/
  if (unlikely(((PyObject *)__pyx_v_pool) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "init");
    __PYX_ERR(13, 119, __pyx_L1_error)
  }
  ((struct __pyx_vtabstruct_7pyarrow_3lib_MemoryPool *)__pyx_v_pool->__pyx_vtab)->init(__pyx_v_pool, __pyx_v_c_pool); if (unlikely(PyErr_Occurred())) __PYX_ERR(13, 119, __pyx_L1_error)

  /* "pyarrow/memory.pxi":120
 *     cdef MemoryPool pool = MemoryPool.__new__(MemoryPool)
 *     pool.init(c_pool)
 *     return pool             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_pool);
  __pyx_r = ((PyObject *)__pyx_v_pool);
  goto __pyx_L0;

  /* "pyarrow/memory.pxi":117
 * 
 * 
 * cdef api object box_memory_pool(CMemoryPool *c_pool):             # <<<<<<<<<<<<<<
 *     cdef MemoryPool pool = MemoryPool.__new__(MemoryPool)
 *     pool.init(c_pool)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib.box_memory_pool", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_pool);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/memory.pxi":127
 *         unique_ptr[CLoggingMemoryPool] logging_pool
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         raise TypeError(f"Do not call {self.__class__.__name__}'s constructor directly, "
 *                         "use pyarrow.logging_memory_pool instead.")
*/

/* Python wrapper */
static int __pyx_pw_7pyarrow_3lib_17LoggingMemoryPool_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_7pyarrow_3lib_17LoggingMemoryPool_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, __pyx_nargs); return -1; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return -1;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__init__", __pyx_kwds); return -1;}
  __pyx_r = __pyx_pf_7pyarrow_3lib_17LoggingMemoryPool___init__(((struct __pyx_obj_7pyarrow_3lib_LoggingMemoryPool *)__pyx_v_self));

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

static int __pyx_pf_7pyarrow_3lib_17LoggingMemoryPool___init__(struct __pyx_obj_7pyarrow_3lib_LoggingMemoryPool *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5[3];
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "pyarrow/memory.pxi":128
 * 
 *     def __init__(self):
 *         raise TypeError(f"Do not call {self.__class__.__name__}'s constructor directly, "             # <<<<<<<<<<<<<<
 *                         "use pyarrow.logging_memory_pool instead.")
 * 
*/
  __pyx_t_2 = NULL;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(13, 128, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_name_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(13, 128, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(13, 128, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_5[0] = __pyx_mstate_global->__pyx_kp_u_Do_not_call;
  __pyx_t_5[1] = __pyx_t_3;
  __pyx_t_5[2] = __pyx_mstate_global->__pyx_kp_u_s_constructor_directly_use_pyar_2;
  __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_5, 3, 12 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + 65, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3));
  if (unlikely(!__pyx_t_4)) __PYX_ERR(13, 128, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 128, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(13, 128, __pyx_L1_error)

  /* "pyarrow/memory.pxi":127
 *         unique_ptr[CLoggingMemoryPool] logging_pool
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         raise TypeError(f"Do not call {self.__class__.__name__}'s constructor directly, "
 *                         "use pyarrow.logging_memory_pool instead.")
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pyarrow.lib.LoggingMemoryPool.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.logging_pool,self.pool cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_17LoggingMemoryPool_3__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_17LoggingMemoryPool_2__reduce_cython__, "LoggingMemoryPool.__reduce_cython__(self)");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_17LoggingMemoryPool_3__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_17LoggingMemoryPool_3__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_17LoggingMemoryPool_2__reduce_cython__};
static PyObject *__pyx_pw_7pyarrow_3lib_17LoggingMemoryPool_3__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7pyarrow_3lib_17LoggingMemoryPool_2__reduce_cython__(((struct __pyx_obj_7pyarrow_3lib_LoggingMemoryPool *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_17LoggingMemoryPool_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_LoggingMemoryPool *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "self.logging_pool,self.pool cannot be converted to a Python object for pickling"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "self.logging_pool,self.pool cannot be converted to a Python object for pickling"
*/
  __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_self_logging_pool_self_pool_cann, 0, 0);
  __PYX_ERR(7, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.logging_pool,self.pool cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyarrow.lib.LoggingMemoryPool.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "self.logging_pool,self.pool cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.logging_pool,self.pool cannot be converted to a Python object for pickling"
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_17LoggingMemoryPool_5__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_17LoggingMemoryPool_4__setstate_cython__, "LoggingMemoryPool.__setstate_cython__(self, __pyx_state)");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_17LoggingMemoryPool_5__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_17LoggingMemoryPool_5__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_17LoggingMemoryPool_4__setstate_cython__};
static PyObject *__pyx_pw_7pyarrow_3lib_17LoggingMemoryPool_5__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(7, 3, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(7, 3, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(7, 3, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(7, 3, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(7, 3, __pyx_L3_error)
    }
    __pyx_v___pyx_state = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(7, 3, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("pyarrow.lib.LoggingMemoryPool.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyarrow_3lib_17LoggingMemoryPool_4__setstate_cython__(((struct __pyx_obj_7pyarrow_3lib_LoggingMemoryPool *)__pyx_v_self), __pyx_v___pyx_state);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

  /* "(tree fragment)":4
 *     raise TypeError, "self.logging_pool,self.pool cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "self.logging_pool,self.pool cannot be converted to a Python object for pickling"             # <<<<<<<<<<<<<<
*/
  __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_self_logging_pool_self_pool_cann, 0, 0);
  __PYX_ERR(7, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "self.logging_pool,self.pool cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.logging_pool,self.pool cannot be converted to a Python object for pickling"
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyarrow.lib.LoggingMemoryPool.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/memory.pxi":141
 *         unique_ptr[CProxyMemoryPool] proxy_pool
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         raise TypeError(f"Do not call {self.__class__.__name__}'s constructor directly, "
 *                         "use pyarrow.proxy_memory_pool instead.")
*/

/* Python wrapper */
static int __pyx_pw_7pyarrow_3lib_15ProxyMemoryPool_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_7pyarrow_3lib_15ProxyMemoryPool_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, __pyx_nargs); return -1; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return -1;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__init__", __pyx_kwds); return -1;}
  __pyx_r = __pyx_pf_7pyarrow_3lib_15ProxyMemoryPool___init__(((struct __pyx_obj_7pyarrow_3lib_ProxyMemoryPool *)__pyx_v_self));

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

static int __pyx_pf_7pyarrow_3lib_15ProxyMemoryPool___init__(struct __pyx_obj_7pyarrow_3lib_ProxyMemoryPool *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5[3];
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "pyarrow/memory.pxi":142
 * 
 *     def __init__(self):
 *         raise TypeError(f"Do not call {self.__class__.__name__}'s constructor directly, "             # <<<<<<<<<<<<<<
 *                         "use pyarrow.proxy_memory_pool instead.")
 * 
*/
  __pyx_t_2 = NULL;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(13, 142, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_name_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(13, 142, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(13, 142, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_5[0] = __pyx_mstate_global->__pyx_kp_u_Do_not_call;
  __pyx_t_5[1] = __pyx_t_3;
  __pyx_t_5[2] = __pyx_mstate_global->__pyx_kp_u_s_constructor_directly_use_pyar_3;
  __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_5, 3, 12 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + 63, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3));
  if (unlikely(!__pyx_t_4)) __PYX_ERR(13, 142, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 142, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(13, 142, __pyx_L1_error)

  /* "pyarrow/memory.pxi":141
 *         unique_ptr[CProxyMemoryPool] proxy_pool
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         raise TypeError(f"Do not call {self.__class__.__name__}'s constructor directly, "
 *                         "use pyarrow.proxy_memory_pool instead.")
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pyarrow.lib.ProxyMemoryPool.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.pool,self.proxy_pool cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_15ProxyMemoryPool_3__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_15ProxyMemoryPool_2__reduce_cython__, "ProxyMemoryPool.__reduce_cython__(self)");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_15ProxyMemoryPool_3__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15ProxyMemoryPool_3__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15ProxyMemoryPool_2__reduce_cython__};
static PyObject *__pyx_pw_7pyarrow_3lib_15ProxyMemoryPool_3__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7pyarrow_3lib_15ProxyMemoryPool_2__reduce_cython__(((struct __pyx_obj_7pyarrow_3lib_ProxyMemoryPool *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_15ProxyMemoryPool_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_ProxyMemoryPool *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "self.pool,self.proxy_pool cannot be converted to a Python object for pickling"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "self.pool,self.proxy_pool cannot be converted to a Python object for pickling"
*/
  __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_self_pool_self_proxy_pool_cannot, 0, 0);
  __PYX_ERR(7, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.pool,self.proxy_pool cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyarrow.lib.ProxyMemoryPool.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "self.pool,self.proxy_pool cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.pool,self.proxy_pool cannot be converted to a Python object for pickling"
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_15ProxyMemoryPool_5__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_15ProxyMemoryPool_4__setstate_cython__, "ProxyMemoryPool.__setstate_cython__(self, __pyx_state)");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_15ProxyMemoryPool_5__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15ProxyMemoryPool_5__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15ProxyMemoryPool_4__setstate_cython__};
static PyObject *__pyx_pw_7pyarrow_3lib_15ProxyMemoryPool_5__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(7, 3, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(7, 3, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(7, 3, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(7, 3, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(7, 3, __pyx_L3_error)
    }
    __pyx_v___pyx_state = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(7, 3, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("pyarrow.lib.ProxyMemoryPool.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyarrow_3lib_15ProxyMemoryPool_4__setstate_cython__(((struct __pyx_obj_7pyarrow_3lib_ProxyMemoryPool *)__pyx_v_self), __pyx_v___pyx_state);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

  /* "(tree fragment)":4
 *     raise TypeError, "self.pool,self.proxy_pool cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "self.pool,self.proxy_pool cannot be converted to a Python object for pickling"             # <<<<<<<<<<<<<<
*/
  __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_self_pool_self_proxy_pool_cannot, 0, 0);
  __PYX_ERR(7, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "self.pool,self.proxy_pool cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.pool,self.proxy_pool cannot be converted to a Python object for pickling"
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyarrow.lib.ProxyMemoryPool.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/memory.pxi":146
 * 
 * 
 * def default_memory_pool():             # <<<<<<<<<<<<<<
 *     """
 *     Return the process-global memory pool.
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_29default_memory_pool(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_28default_memory_pool, "default_memory_pool()\n\nReturn the process-global memory pool.\n\nExamples\n--------\n>>> default_memory_pool()\n<pyarrow.MemoryPool backend_name=... bytes_allocated=0 max_memory=...>");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_29default_memory_pool = {"default_memory_pool", (PyCFunction)__pyx_pw_7pyarrow_3lib_29default_memory_pool, METH_NOARGS, __pyx_doc_7pyarrow_3lib_28default_memory_pool};
static PyObject *__pyx_pw_7pyarrow_3lib_29default_memory_pool(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("default_memory_pool (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_28default_memory_pool(__pyx_self);

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

static PyObject *__pyx_pf_7pyarrow_3lib_28default_memory_pool(CYTHON_UNUSED PyObject *__pyx_self) {
  struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_pool = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("default_memory_pool", 0);

  /* "pyarrow/memory.pxi":156
 *     """
 *     cdef:
 *         MemoryPool pool = MemoryPool.__new__(MemoryPool)             # <<<<<<<<<<<<<<
 *     pool.init(c_get_memory_pool())
 *     return pool
*/
  __pyx_t_1 = ((PyObject *)__pyx_tp_new_7pyarrow_3lib_MemoryPool(((PyTypeObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_MemoryPool), __pyx_mstate_global->__pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 156, __pyx_L1_error)
  __Pyx_GOTREF((PyObject *)__pyx_t_1);
  __pyx_v_pool = ((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyarrow/memory.pxi":157
 *     cdef:
 *         MemoryPool pool = MemoryPool.__new__(MemoryPool)
 *     pool.init(c_get_memory_pool())             # <<<<<<<<<<<<<<
 *     return pool
 * 
*/
  if (unlikely(((PyObject *)__pyx_v_pool) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "init");
    __PYX_ERR(13, 157, __pyx_L1_error)
  }
  ((struct __pyx_vtabstruct_7pyarrow_3lib_MemoryPool *)__pyx_v_pool->__pyx_vtab)->init(__pyx_v_pool,  arrow::py::get_memory_pool()); if (unlikely(PyErr_Occurred())) __PYX_ERR(13, 157, __pyx_L1_error)

  /* "pyarrow/memory.pxi":158
 *         MemoryPool pool = MemoryPool.__new__(MemoryPool)
 *     pool.init(c_get_memory_pool())
 *     return pool             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_pool);
  __pyx_r = ((PyObject *)__pyx_v_pool);
  goto __pyx_L0;

  /* "pyarrow/memory.pxi":146
 * 
 * 
 * def default_memory_pool():             # <<<<<<<<<<<<<<
 *     """
 *     Return the process-global memory pool.
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib.default_memory_pool", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_pool);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/memory.pxi":161
 * 
 * 
 * def proxy_memory_pool(MemoryPool parent):             # <<<<<<<<<<<<<<
 *     """
 *     Create and return a MemoryPool instance that redirects to the
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_31proxy_memory_pool(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_30proxy_memory_pool, "proxy_memory_pool(MemoryPool parent)\n\nCreate and return a MemoryPool instance that redirects to the\n*parent*, but with separate allocation statistics.\n\nParameters\n----------\nparent : MemoryPool\n    The real memory pool that should be used for allocations.");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_31proxy_memory_pool = {"proxy_memory_pool", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_31proxy_memory_pool, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_30proxy_memory_pool};
static PyObject *__pyx_pw_7pyarrow_3lib_31proxy_memory_pool(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_parent = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("proxy_memory_pool (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_parent,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(13, 161, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(13, 161, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "proxy_memory_pool", 0) < (0)) __PYX_ERR(13, 161, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("proxy_memory_pool", 1, 1, 1, i); __PYX_ERR(13, 161, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(13, 161, __pyx_L3_error)
    }
    __pyx_v_parent = ((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("proxy_memory_pool", 1, 1, 1, __pyx_nargs); __PYX_ERR(13, 161, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("pyarrow.lib.proxy_memory_pool", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_parent), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_MemoryPool, 1, "parent", 0))) __PYX_ERR(13, 161, __pyx_L1_error)
  __pyx_r = __pyx_pf_7pyarrow_3lib_30proxy_memory_pool(__pyx_self, __pyx_v_parent);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7pyarrow_3lib_30proxy_memory_pool(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_parent) {
  struct __pyx_obj_7pyarrow_3lib_ProxyMemoryPool *__pyx_v_out = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("proxy_memory_pool", 0);

  /* "pyarrow/memory.pxi":171
 *         The real memory pool that should be used for allocations.
 *     """
 *     cdef ProxyMemoryPool out = ProxyMemoryPool.__new__(ProxyMemoryPool)             # <<<<<<<<<<<<<<
 *     out.proxy_pool.reset(new CProxyMemoryPool(parent.pool))
 *     out.init(out.proxy_pool.get())
*/
  __pyx_t_1 = ((PyObject *)__pyx_tp_new_7pyarrow_3lib_ProxyMemoryPool(((PyTypeObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ProxyMemoryPool), __pyx_mstate_global->__pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 171, __pyx_L1_error)
  __Pyx_GOTREF((PyObject *)__pyx_t_1);
  __pyx_v_out = ((struct __pyx_obj_7pyarrow_3lib_ProxyMemoryPool *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyarrow/memory.pxi":172
 *     """
 *     cdef ProxyMemoryPool out = ProxyMemoryPool.__new__(ProxyMemoryPool)
 *     out.proxy_pool.reset(new CProxyMemoryPool(parent.pool))             # <<<<<<<<<<<<<<
 *     out.init(out.proxy_pool.get())
 *     return out
*/
  if (unlikely(((PyObject *)__pyx_v_out) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "proxy_pool");
    __PYX_ERR(13, 172, __pyx_L1_error)
  }
  if (unlikely(((PyObject *)__pyx_v_parent) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "pool");
    __PYX_ERR(13, 172, __pyx_L1_error)
  }
  __pyx_v_out->proxy_pool.reset(new  arrow::ProxyMemoryPool(__pyx_v_parent->pool));

  /* "pyarrow/memory.pxi":173
 *     cdef ProxyMemoryPool out = ProxyMemoryPool.__new__(ProxyMemoryPool)
 *     out.proxy_pool.reset(new CProxyMemoryPool(parent.pool))
 *     out.init(out.proxy_pool.get())             # <<<<<<<<<<<<<<
 *     return out
 * 
*/
  if (unlikely(((PyObject *)__pyx_v_out) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "init");
    __PYX_ERR(13, 173, __pyx_L1_error)
  }
  if (unlikely(((PyObject *)__pyx_v_out) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "proxy_pool");
    __PYX_ERR(13, 173, __pyx_L1_error)
  }
  ((struct __pyx_vtabstruct_7pyarrow_3lib_ProxyMemoryPool *)__pyx_v_out->__pyx_base.__pyx_vtab)->__pyx_base.init(((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)__pyx_v_out), __pyx_v_out->proxy_pool.get()); if (unlikely(PyErr_Occurred())) __PYX_ERR(13, 173, __pyx_L1_error)

  /* "pyarrow/memory.pxi":174
 *     out.proxy_pool.reset(new CProxyMemoryPool(parent.pool))
 *     out.init(out.proxy_pool.get())
 *     return out             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = ((PyObject *)__pyx_v_out);
  goto __pyx_L0;

  /* "pyarrow/memory.pxi":161
 * 
 * 
 * def proxy_memory_pool(MemoryPool parent):             # <<<<<<<<<<<<<<
 *     """
 *     Create and return a MemoryPool instance that redirects to the
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib.proxy_memory_pool", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/memory.pxi":177
 * 
 * 
 * def logging_memory_pool(MemoryPool parent):             # <<<<<<<<<<<<<<
 *     """
 *     Create and return a MemoryPool instance that redirects to the
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_33logging_memory_pool(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_32logging_memory_pool, "logging_memory_pool(MemoryPool parent)\n\nCreate and return a MemoryPool instance that redirects to the\n*parent*, but also dumps allocation logs on stderr.\n\nParameters\n----------\nparent : MemoryPool\n    The real memory pool that should be used for allocations.");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_33logging_memory_pool = {"logging_memory_pool", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_33logging_memory_pool, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_32logging_memory_pool};
static PyObject *__pyx_pw_7pyarrow_3lib_33logging_memory_pool(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_parent = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("logging_memory_pool (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_parent,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(13, 177, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(13, 177, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "logging_memory_pool", 0) < (0)) __PYX_ERR(13, 177, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("logging_memory_pool", 1, 1, 1, i); __PYX_ERR(13, 177, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(13, 177, __pyx_L3_error)
    }
    __pyx_v_parent = ((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("logging_memory_pool", 1, 1, 1, __pyx_nargs); __PYX_ERR(13, 177, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("pyarrow.lib.logging_memory_pool", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_parent), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_MemoryPool, 1, "parent", 0))) __PYX_ERR(13, 177, __pyx_L1_error)
  __pyx_r = __pyx_pf_7pyarrow_3lib_32logging_memory_pool(__pyx_self, __pyx_v_parent);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7pyarrow_3lib_32logging_memory_pool(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_parent) {
  struct __pyx_obj_7pyarrow_3lib_LoggingMemoryPool *__pyx_v_out = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("logging_memory_pool", 0);

  /* "pyarrow/memory.pxi":187
 *         The real memory pool that should be used for allocations.
 *     """
 *     cdef LoggingMemoryPool out = LoggingMemoryPool.__new__(             # <<<<<<<<<<<<<<
 *         LoggingMemoryPool, parent)
 *     out.logging_pool.reset(new CLoggingMemoryPool(parent.pool))
*/
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 187, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF((PyObject *)__pyx_v_parent);
  __Pyx_GIVEREF((PyObject *)__pyx_v_parent);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_parent)) != (0)) __PYX_ERR(13, 187, __pyx_L1_error);
  __pyx_t_2 = ((PyObject *)__pyx_tp_new_7pyarrow_3lib_LoggingMemoryPool(((PyTypeObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_LoggingMemoryPool), __pyx_t_1, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 187, __pyx_L1_error)
  __Pyx_GOTREF((PyObject *)__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_out = ((struct __pyx_obj_7pyarrow_3lib_LoggingMemoryPool *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pyarrow/memory.pxi":189
 *     cdef LoggingMemoryPool out = LoggingMemoryPool.__new__(
 *         LoggingMemoryPool, parent)
 *     out.logging_pool.reset(new CLoggingMemoryPool(parent.pool))             # <<<<<<<<<<<<<<
 *     out.init(out.logging_pool.get())
 *     return out
*/
  if (unlikely(((PyObject *)__pyx_v_out) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "logging_pool");
    __PYX_ERR(13, 189, __pyx_L1_error)
  }
  if (unlikely(((PyObject *)__pyx_v_parent) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "pool");
    __PYX_ERR(13, 189, __pyx_L1_error)
  }
  __pyx_v_out->logging_pool.reset(new  arrow::LoggingMemoryPool(__pyx_v_parent->pool));

  /* "pyarrow/memory.pxi":190
 *         LoggingMemoryPool, parent)
 *     out.logging_pool.reset(new CLoggingMemoryPool(parent.pool))
 *     out.init(out.logging_pool.get())             # <<<<<<<<<<<<<<
 *     return out
 * 
*/
  if (unlikely(((PyObject *)__pyx_v_out) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "init");
    __PYX_ERR(13, 190, __pyx_L1_error)
  }
  if (unlikely(((PyObject *)__pyx_v_out) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "logging_pool");
    __PYX_ERR(13, 190, __pyx_L1_error)
  }
  ((struct __pyx_vtabstruct_7pyarrow_3lib_LoggingMemoryPool *)__pyx_v_out->__pyx_base.__pyx_vtab)->__pyx_base.init(((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)__pyx_v_out), __pyx_v_out->logging_pool.get()); if (unlikely(PyErr_Occurred())) __PYX_ERR(13, 190, __pyx_L1_error)

  /* "pyarrow/memory.pxi":191
 *     out.logging_pool.reset(new CLoggingMemoryPool(parent.pool))
 *     out.init(out.logging_pool.get())
 *     return out             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = ((PyObject *)__pyx_v_out);
  goto __pyx_L0;

  /* "pyarrow/memory.pxi":177
 * 
 * 
 * def logging_memory_pool(MemoryPool parent):             # <<<<<<<<<<<<<<
 *     """
 *     Create and return a MemoryPool instance that redirects to the
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pyarrow.lib.logging_memory_pool", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/memory.pxi":194
 * 
 * 
 * def system_memory_pool():             # <<<<<<<<<<<<<<
 *     """
 *     Return a memory pool based on the C malloc heap.
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_35system_memory_pool(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_34system_memory_pool, "system_memory_pool()\n\nReturn a memory pool based on the C malloc heap.");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_35system_memory_pool = {"system_memory_pool", (PyCFunction)__pyx_pw_7pyarrow_3lib_35system_memory_pool, METH_NOARGS, __pyx_doc_7pyarrow_3lib_34system_memory_pool};
static PyObject *__pyx_pw_7pyarrow_3lib_35system_memory_pool(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("system_memory_pool (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_34system_memory_pool(__pyx_self);

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

static PyObject *__pyx_pf_7pyarrow_3lib_34system_memory_pool(CYTHON_UNUSED PyObject *__pyx_self) {
  struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_pool = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("system_memory_pool", 0);

  /* "pyarrow/memory.pxi":199
 *     """
 *     cdef:
 *         MemoryPool pool = MemoryPool.__new__(MemoryPool)             # <<<<<<<<<<<<<<
 *     pool.init(c_system_memory_pool())
 *     return pool
*/
  __pyx_t_1 = ((PyObject *)__pyx_tp_new_7pyarrow_3lib_MemoryPool(((PyTypeObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_MemoryPool), __pyx_mstate_global->__pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 199, __pyx_L1_error)
  __Pyx_GOTREF((PyObject *)__pyx_t_1);
  __pyx_v_pool = ((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyarrow/memory.pxi":200
 *     cdef:
 *         MemoryPool pool = MemoryPool.__new__(MemoryPool)
 *     pool.init(c_system_memory_pool())             # <<<<<<<<<<<<<<
 *     return pool
 * 
*/
  if (unlikely(((PyObject *)__pyx_v_pool) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "init");
    __PYX_ERR(13, 200, __pyx_L1_error)
  }
  ((struct __pyx_vtabstruct_7pyarrow_3lib_MemoryPool *)__pyx_v_pool->__pyx_vtab)->init(__pyx_v_pool,  arrow::system_memory_pool()); if (unlikely(PyErr_Occurred())) __PYX_ERR(13, 200, __pyx_L1_error)

  /* "pyarrow/memory.pxi":201
 *         MemoryPool pool = MemoryPool.__new__(MemoryPool)
 *     pool.init(c_system_memory_pool())
 *     return pool             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_pool);
  __pyx_r = ((PyObject *)__pyx_v_pool);
  goto __pyx_L0;

  /* "pyarrow/memory.pxi":194
 * 
 * 
 * def system_memory_pool():             # <<<<<<<<<<<<<<
 *     """
 *     Return a memory pool based on the C malloc heap.
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib.system_memory_pool", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_pool);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/memory.pxi":204
 * 
 * 
 * def jemalloc_memory_pool():             # <<<<<<<<<<<<<<
 *     """
 *     Return a memory pool based on the jemalloc heap.
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_37jemalloc_memory_pool(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_36jemalloc_memory_pool, "jemalloc_memory_pool()\n\nReturn a memory pool based on the jemalloc heap.\n\nNotImplementedError is raised if jemalloc support is not enabled.");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_37jemalloc_memory_pool = {"jemalloc_memory_pool", (PyCFunction)__pyx_pw_7pyarrow_3lib_37jemalloc_memory_pool, METH_NOARGS, __pyx_doc_7pyarrow_3lib_36jemalloc_memory_pool};
static PyObject *__pyx_pw_7pyarrow_3lib_37jemalloc_memory_pool(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("jemalloc_memory_pool (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_36jemalloc_memory_pool(__pyx_self);

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

static PyObject *__pyx_pf_7pyarrow_3lib_36jemalloc_memory_pool(CYTHON_UNUSED PyObject *__pyx_self) {
   arrow::MemoryPool *__pyx_v_c_pool;
  struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_pool = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("jemalloc_memory_pool", 0);

  /* "pyarrow/memory.pxi":212
 *     cdef:
 *         CMemoryPool* c_pool
 *         MemoryPool pool = MemoryPool.__new__(MemoryPool)             # <<<<<<<<<<<<<<
 *     check_status(c_jemalloc_memory_pool(&c_pool))
 *     pool.init(c_pool)
*/
  __pyx_t_1 = ((PyObject *)__pyx_tp_new_7pyarrow_3lib_MemoryPool(((PyTypeObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_MemoryPool), __pyx_mstate_global->__pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 212, __pyx_L1_error)
  __Pyx_GOTREF((PyObject *)__pyx_t_1);
  __pyx_v_pool = ((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyarrow/memory.pxi":213
 *         CMemoryPool* c_pool
 *         MemoryPool pool = MemoryPool.__new__(MemoryPool)
 *     check_status(c_jemalloc_memory_pool(&c_pool))             # <<<<<<<<<<<<<<
 *     pool.init(c_pool)
 *     return pool
*/
  __pyx_t_2 = __pyx_f_7pyarrow_3lib_check_status( arrow::jemalloc_memory_pool((&__pyx_v_c_pool))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(13, 213, __pyx_L1_error)

  /* "pyarrow/memory.pxi":214
 *         MemoryPool pool = MemoryPool.__new__(MemoryPool)
 *     check_status(c_jemalloc_memory_pool(&c_pool))
 *     pool.init(c_pool)             # <<<<<<<<<<<<<<
 *     return pool
 * 
*/
  if (unlikely(((PyObject *)__pyx_v_pool) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "init");
    __PYX_ERR(13, 214, __pyx_L1_error)
  }
  ((struct __pyx_vtabstruct_7pyarrow_3lib_MemoryPool *)__pyx_v_pool->__pyx_vtab)->init(__pyx_v_pool, __pyx_v_c_pool); if (unlikely(PyErr_Occurred())) __PYX_ERR(13, 214, __pyx_L1_error)

  /* "pyarrow/memory.pxi":215
 *     check_status(c_jemalloc_memory_pool(&c_pool))
 *     pool.init(c_pool)
 *     return pool             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_pool);
  __pyx_r = ((PyObject *)__pyx_v_pool);
  goto __pyx_L0;

  /* "pyarrow/memory.pxi":204
 * 
 * 
 * def jemalloc_memory_pool():             # <<<<<<<<<<<<<<
 *     """
 *     Return a memory pool based on the jemalloc heap.
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib.jemalloc_memory_pool", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_pool);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/memory.pxi":218
 * 
 * 
 * def mimalloc_memory_pool():             # <<<<<<<<<<<<<<
 *     """
 *     Return a memory pool based on the mimalloc heap.
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_39mimalloc_memory_pool(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_38mimalloc_memory_pool, "mimalloc_memory_pool()\n\nReturn a memory pool based on the mimalloc heap.\n\nNotImplementedError is raised if mimalloc support is not enabled.");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_39mimalloc_memory_pool = {"mimalloc_memory_pool", (PyCFunction)__pyx_pw_7pyarrow_3lib_39mimalloc_memory_pool, METH_NOARGS, __pyx_doc_7pyarrow_3lib_38mimalloc_memory_pool};
static PyObject *__pyx_pw_7pyarrow_3lib_39mimalloc_memory_pool(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("mimalloc_memory_pool (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_38mimalloc_memory_pool(__pyx_self);

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

static PyObject *__pyx_pf_7pyarrow_3lib_38mimalloc_memory_pool(CYTHON_UNUSED PyObject *__pyx_self) {
   arrow::MemoryPool *__pyx_v_c_pool;
  struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_pool = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("mimalloc_memory_pool", 0);

  /* "pyarrow/memory.pxi":226
 *     cdef:
 *         CMemoryPool* c_pool
 *         MemoryPool pool = MemoryPool.__new__(MemoryPool)             # <<<<<<<<<<<<<<
 *     check_status(c_mimalloc_memory_pool(&c_pool))
 *     pool.init(c_pool)
*/
  __pyx_t_1 = ((PyObject *)__pyx_tp_new_7pyarrow_3lib_MemoryPool(((PyTypeObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_MemoryPool), __pyx_mstate_global->__pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 226, __pyx_L1_error)
  __Pyx_GOTREF((PyObject *)__pyx_t_1);
  __pyx_v_pool = ((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyarrow/memory.pxi":227
 *         CMemoryPool* c_pool
 *         MemoryPool pool = MemoryPool.__new__(MemoryPool)
 *     check_status(c_mimalloc_memory_pool(&c_pool))             # <<<<<<<<<<<<<<
 *     pool.init(c_pool)
 *     return pool
*/
  __pyx_t_2 = __pyx_f_7pyarrow_3lib_check_status( arrow::mimalloc_memory_pool((&__pyx_v_c_pool))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(13, 227, __pyx_L1_error)

  /* "pyarrow/memory.pxi":228
 *         MemoryPool pool = MemoryPool.__new__(MemoryPool)
 *     check_status(c_mimalloc_memory_pool(&c_pool))
 *     pool.init(c_pool)             # <<<<<<<<<<<<<<
 *     return pool
 * 
*/
  if (unlikely(((PyObject *)__pyx_v_pool) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "init");
    __PYX_ERR(13, 228, __pyx_L1_error)
  }
  ((struct __pyx_vtabstruct_7pyarrow_3lib_MemoryPool *)__pyx_v_pool->__pyx_vtab)->init(__pyx_v_pool, __pyx_v_c_pool); if (unlikely(PyErr_Occurred())) __PYX_ERR(13, 228, __pyx_L1_error)

  /* "pyarrow/memory.pxi":229
 *     check_status(c_mimalloc_memory_pool(&c_pool))
 *     pool.init(c_pool)
 *     return pool             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_pool);
  __pyx_r = ((PyObject *)__pyx_v_pool);
  goto __pyx_L0;

  /* "pyarrow/memory.pxi":218
 * 
 * 
 * def mimalloc_memory_pool():             # <<<<<<<<<<<<<<
 *     """
 *     Return a memory pool based on the mimalloc heap.
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib.mimalloc_memory_pool", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_pool);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/memory.pxi":232
 * 
 * 
 * def set_memory_pool(MemoryPool pool):             # <<<<<<<<<<<<<<
 *     """
 *     Set the default memory pool.
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_41set_memory_pool(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_40set_memory_pool, "set_memory_pool(MemoryPool pool)\n\nSet the default memory pool.\n\nParameters\n----------\npool : MemoryPool\n    The memory pool that should be used by default.");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_41set_memory_pool = {"set_memory_pool", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_41set_memory_pool, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_40set_memory_pool};
static PyObject *__pyx_pw_7pyarrow_3lib_41set_memory_pool(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_pool = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_memory_pool (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pool,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(13, 232, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(13, 232, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "set_memory_pool", 0) < (0)) __PYX_ERR(13, 232, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("set_memory_pool", 1, 1, 1, i); __PYX_ERR(13, 232, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(13, 232, __pyx_L3_error)
    }
    __pyx_v_pool = ((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("set_memory_pool", 1, 1, 1, __pyx_nargs); __PYX_ERR(13, 232, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("pyarrow.lib.set_memory_pool", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pool), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_MemoryPool, 1, "pool", 0))) __PYX_ERR(13, 232, __pyx_L1_error)
  __pyx_r = __pyx_pf_7pyarrow_3lib_40set_memory_pool(__pyx_self, __pyx_v_pool);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7pyarrow_3lib_40set_memory_pool(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_pool) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_memory_pool", 0);

  /* "pyarrow/memory.pxi":241
 *         The memory pool that should be used by default.
 *     """
 *     c_set_default_memory_pool(pool.pool)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  if (unlikely(((PyObject *)__pyx_v_pool) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "pool");
    __PYX_ERR(13, 241, __pyx_L1_error)
  }
   arrow::py::set_default_memory_pool(__pyx_v_pool->pool);

  /* "pyarrow/memory.pxi":232
 * 
 * 
 * def set_memory_pool(MemoryPool pool):             # <<<<<<<<<<<<<<
 *     """
 *     Set the default memory pool.
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyarrow.lib.set_memory_pool", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/memory.pxi":249
 * 
 * 
 * def log_memory_allocations(enable=True):             # <<<<<<<<<<<<<<
 *     """
 *     Enable or disable memory allocator logging for debugging purposes
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_43log_memory_allocations(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_42log_memory_allocations, "log_memory_allocations(enable=True)\n\nEnable or disable memory allocator logging for debugging purposes\n\nParameters\n----------\nenable : bool, default True\n    Pass False to disable logging");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_43log_memory_allocations = {"log_memory_allocations", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_43log_memory_allocations, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_42log_memory_allocations};
static PyObject *__pyx_pw_7pyarrow_3lib_43log_memory_allocations(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_enable = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("log_memory_allocations (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_enable,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(13, 249, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(13, 249, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "log_memory_allocations", 0) < (0)) __PYX_ERR(13, 249, __pyx_L3_error)
      if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_True)));
    } else {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(13, 249, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_True)));
    }
    __pyx_v_enable = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("log_memory_allocations", 0, 0, 1, __pyx_nargs); __PYX_ERR(13, 249, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("pyarrow.lib.log_memory_allocations", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyarrow_3lib_42log_memory_allocations(__pyx_self, __pyx_v_enable);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7pyarrow_3lib_42log_memory_allocations(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_enable) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("log_memory_allocations", 0);

  /* "pyarrow/memory.pxi":258
 *         Pass False to disable logging
 *     """
 *     if enable:             # <<<<<<<<<<<<<<
 *         set_memory_pool(_logging_memory_pool)
 *     else:
*/
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_enable); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(13, 258, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "pyarrow/memory.pxi":259
 *     """
 *     if enable:
 *         set_memory_pool(_logging_memory_pool)             # <<<<<<<<<<<<<<
 *     else:
 *         set_memory_pool(_default_memory_pool)
*/
    __pyx_t_3 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_set_memory_pool); if (unlikely(!__pyx_t_4)) __PYX_ERR(13, 259, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
      assert(__pyx_t_3);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
      __pyx_t_5 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, ((PyObject *)__pyx_v_7pyarrow_3lib__logging_memory_pool)};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 259, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyarrow/memory.pxi":258
 *         Pass False to disable logging
 *     """
 *     if enable:             # <<<<<<<<<<<<<<
 *         set_memory_pool(_logging_memory_pool)
 *     else:
*/
    goto __pyx_L3;
  }

  /* "pyarrow/memory.pxi":261
 *         set_memory_pool(_logging_memory_pool)
 *     else:
 *         set_memory_pool(_default_memory_pool)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  /*else*/ {
    __pyx_t_4 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_set_memory_pool); if (unlikely(!__pyx_t_3)) __PYX_ERR(13, 261, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      assert(__pyx_t_4);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
      __pyx_t_5 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, ((PyObject *)__pyx_v_7pyarrow_3lib__default_memory_pool)};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 261, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_L3:;

  /* "pyarrow/memory.pxi":249
 * 
 * 
 * def log_memory_allocations(enable=True):             # <<<<<<<<<<<<<<
 *     """
 *     Enable or disable memory allocator logging for debugging purposes
*/

  /* 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("pyarrow.lib.log_memory_allocations", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/memory.pxi":264
 * 
 * 
 * def total_allocated_bytes():             # <<<<<<<<<<<<<<
 *     """
 *     Return the currently allocated bytes from the default memory pool.
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_45total_allocated_bytes(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_44total_allocated_bytes, "total_allocated_bytes()\n\nReturn the currently allocated bytes from the default memory pool.\nOther memory pools may not be accounted for.");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_45total_allocated_bytes = {"total_allocated_bytes", (PyCFunction)__pyx_pw_7pyarrow_3lib_45total_allocated_bytes, METH_NOARGS, __pyx_doc_7pyarrow_3lib_44total_allocated_bytes};
static PyObject *__pyx_pw_7pyarrow_3lib_45total_allocated_bytes(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("total_allocated_bytes (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_44total_allocated_bytes(__pyx_self);

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

static PyObject *__pyx_pf_7pyarrow_3lib_44total_allocated_bytes(CYTHON_UNUSED PyObject *__pyx_self) {
   arrow::MemoryPool *__pyx_v_pool;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("total_allocated_bytes", 0);

  /* "pyarrow/memory.pxi":269
 *     Other memory pools may not be accounted for.
 *     """
 *     cdef CMemoryPool* pool = c_get_memory_pool()             # <<<<<<<<<<<<<<
 *     return pool.bytes_allocated()
 * 
*/
  __pyx_v_pool =  arrow::py::get_memory_pool();

  /* "pyarrow/memory.pxi":270
 *     """
 *     cdef CMemoryPool* pool = c_get_memory_pool()
 *     return pool.bytes_allocated()             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_int64_t(__pyx_v_pool->bytes_allocated()); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 270, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/memory.pxi":264
 * 
 * 
 * def total_allocated_bytes():             # <<<<<<<<<<<<<<
 *     """
 *     Return the currently allocated bytes from the default memory pool.
*/

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

/* "pyarrow/memory.pxi":273
 * 
 * 
 * def jemalloc_set_decay_ms(decay_ms):             # <<<<<<<<<<<<<<
 *     """
 *     Set arenas.dirty_decay_ms and arenas.muzzy_decay_ms to indicated number of
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_47jemalloc_set_decay_ms(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_46jemalloc_set_decay_ms, "jemalloc_set_decay_ms(decay_ms)\n\nSet arenas.dirty_decay_ms and arenas.muzzy_decay_ms to indicated number of\nmilliseconds. A value of 0 (the default) results in dirty / muzzy memory\npages being released right away to the OS, while a higher value will result\nin a time-based decay. See the jemalloc docs for more information\n\nIt's best to set this at the start of your application.\n\nParameters\n----------\ndecay_ms : int\n    Number of milliseconds to set for jemalloc decay conf parameters. Note\n    that this change will only affect future memory arenas");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_47jemalloc_set_decay_ms = {"jemalloc_set_decay_ms", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_47jemalloc_set_decay_ms, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_46jemalloc_set_decay_ms};
static PyObject *__pyx_pw_7pyarrow_3lib_47jemalloc_set_decay_ms(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_decay_ms = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("jemalloc_set_decay_ms (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_decay_ms,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(13, 273, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(13, 273, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "jemalloc_set_decay_ms", 0) < (0)) __PYX_ERR(13, 273, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("jemalloc_set_decay_ms", 1, 1, 1, i); __PYX_ERR(13, 273, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(13, 273, __pyx_L3_error)
    }
    __pyx_v_decay_ms = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("jemalloc_set_decay_ms", 1, 1, 1, __pyx_nargs); __PYX_ERR(13, 273, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("pyarrow.lib.jemalloc_set_decay_ms", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyarrow_3lib_46jemalloc_set_decay_ms(__pyx_self, __pyx_v_decay_ms);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

  /* "pyarrow/memory.pxi":288
 *         that this change will only affect future memory arenas
 *     """
 *     check_status(c_jemalloc_set_decay_ms(decay_ms))             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_t_1 = __Pyx_PyLong_As_int(__pyx_v_decay_ms); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(13, 288, __pyx_L1_error)
  __pyx_t_2 = __pyx_f_7pyarrow_3lib_check_status( arrow::jemalloc_set_decay_ms(__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(13, 288, __pyx_L1_error)

  /* "pyarrow/memory.pxi":273
 * 
 * 
 * def jemalloc_set_decay_ms(decay_ms):             # <<<<<<<<<<<<<<
 *     """
 *     Set arenas.dirty_decay_ms and arenas.muzzy_decay_ms to indicated number of
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyarrow.lib.jemalloc_set_decay_ms", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/memory.pxi":291
 * 
 * 
 * def supported_memory_backends():             # <<<<<<<<<<<<<<
 *     """
 *     Return a list of available memory pool backends
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_49supported_memory_backends(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_48supported_memory_backends, "supported_memory_backends()\n\nReturn a list of available memory pool backends");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_49supported_memory_backends = {"supported_memory_backends", (PyCFunction)__pyx_pw_7pyarrow_3lib_49supported_memory_backends, METH_NOARGS, __pyx_doc_7pyarrow_3lib_48supported_memory_backends};
static PyObject *__pyx_pw_7pyarrow_3lib_49supported_memory_backends(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("supported_memory_backends (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_48supported_memory_backends(__pyx_self);

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

static PyObject *__pyx_pf_7pyarrow_3lib_48supported_memory_backends(CYTHON_UNUSED PyObject *__pyx_self) {
  std::vector<std::string>  __pyx_v_backends;
  std::string __pyx_8genexpr1__pyx_v_backend;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  std::vector<std::string> ::iterator __pyx_t_2;
  std::string __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("supported_memory_backends", 0);

  /* "pyarrow/memory.pxi":295
 *     Return a list of available memory pool backends
 *     """
 *     cdef vector[c_string] backends = c_supported_memory_backends()             # <<<<<<<<<<<<<<
 *     return [backend.decode() for backend in backends]
*/
  __pyx_v_backends =  arrow::SupportedMemoryBackendNames();

  /* "pyarrow/memory.pxi":296
 *     """
 *     cdef vector[c_string] backends = c_supported_memory_backends()
 *     return [backend.decode() for backend in backends]             # <<<<<<<<<<<<<<
*/
  __Pyx_XDECREF(__pyx_r);
  { /* enter inner scope */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 296, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __pyx_v_backends.begin();
    for (; __pyx_t_2 != __pyx_v_backends.end(); ++__pyx_t_2) {
      __pyx_t_3 = *__pyx_t_2;
      __pyx_8genexpr1__pyx_v_backend = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_3);
      __pyx_t_4 = __Pyx_decode_cpp_string(__pyx_8genexpr1__pyx_v_backend, 0, PY_SSIZE_T_MAX, NULL, NULL, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(13, 296, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_4))) __PYX_ERR(13, 296, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  } /* exit inner scope */
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/memory.pxi":291
 * 
 * 
 * def supported_memory_backends():             # <<<<<<<<<<<<<<
 *     """
 *     Return a list of available memory pool backends
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pyarrow.lib.supported_memory_backends", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/device.pxi":40
 * 
 * 
 * cdef object _wrap_device_allocation_type(CDeviceAllocationType device_type):             # <<<<<<<<<<<<<<
 *     return DeviceAllocationType(<char> device_type)
 * 
*/

static PyObject *__pyx_f_7pyarrow_3lib__wrap_device_allocation_type(arrow::DeviceAllocationType __pyx_v_device_type) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_wrap_device_allocation_type", 0);

  /* "pyarrow/device.pxi":41
 * 
 * cdef object _wrap_device_allocation_type(CDeviceAllocationType device_type):
 *     return DeviceAllocationType(<char> device_type)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_DeviceAllocationType); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 41, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyLong_From_char(((char)__pyx_v_device_type)); if (unlikely(!__pyx_t_4)) __PYX_ERR(14, 41, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 41, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/device.pxi":40
 * 
 * 
 * cdef object _wrap_device_allocation_type(CDeviceAllocationType device_type):             # <<<<<<<<<<<<<<
 *     return DeviceAllocationType(<char> device_type)
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pyarrow.lib._wrap_device_allocation_type", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/device.pxi":54
 *     """
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         raise TypeError("Do not call Device's constructor directly, "
 *                         "use the device attribute of the MemoryManager instead.")
*/

/* Python wrapper */
static int __pyx_pw_7pyarrow_3lib_6Device_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_7pyarrow_3lib_6Device_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, __pyx_nargs); return -1; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return -1;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__init__", __pyx_kwds); return -1;}
  __pyx_r = __pyx_pf_7pyarrow_3lib_6Device___init__(((struct __pyx_obj_7pyarrow_3lib_Device *)__pyx_v_self));

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

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

  /* "pyarrow/device.pxi":55
 * 
 *     def __init__(self):
 *         raise TypeError("Do not call Device's constructor directly, "             # <<<<<<<<<<<<<<
 *                         "use the device attribute of the MemoryManager instead.")
 * 
*/
  __pyx_t_2 = NULL;
  __pyx_t_3 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Do_not_call_Device_s_constructor};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 55, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(14, 55, __pyx_L1_error)

  /* "pyarrow/device.pxi":54
 *     """
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         raise TypeError("Do not call Device's constructor directly, "
 *                         "use the device attribute of the MemoryManager instead.")
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pyarrow.lib.Device.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/device.pxi":58
 *                         "use the device attribute of the MemoryManager instead.")
 * 
 *     cdef void init(self, const shared_ptr[CDevice]& device):             # <<<<<<<<<<<<<<
 *         self.device = device
 * 
*/

static void __pyx_f_7pyarrow_3lib_6Device_init(struct __pyx_obj_7pyarrow_3lib_Device *__pyx_v_self, std::shared_ptr< arrow::Device>  const &__pyx_v_device) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "pyarrow/device.pxi":59
 * 
 *     cdef void init(self, const shared_ptr[CDevice]& device):
 *         self.device = device             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "device");
    __PYX_ERR(14, 59, __pyx_L1_error)
  }
  __pyx_v_self->device = __pyx_v_device;

  /* "pyarrow/device.pxi":58
 *                         "use the device attribute of the MemoryManager instead.")
 * 
 *     cdef void init(self, const shared_ptr[CDevice]& device):             # <<<<<<<<<<<<<<
 *         self.device = device
 * 
*/

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyarrow.lib.Device.init", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
}

/* "pyarrow/device.pxi":61
 *         self.device = device
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     cdef wrap(const shared_ptr[CDevice]& device):
 *         cdef Device self = Device.__new__(Device)
*/

static PyObject *__pyx_f_7pyarrow_3lib_6Device_wrap(std::shared_ptr< arrow::Device>  const &__pyx_v_device) {
  struct __pyx_obj_7pyarrow_3lib_Device *__pyx_v_self = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("wrap", 0);

  /* "pyarrow/device.pxi":63
 *     @staticmethod
 *     cdef wrap(const shared_ptr[CDevice]& device):
 *         cdef Device self = Device.__new__(Device)             # <<<<<<<<<<<<<<
 *         self.init(device)
 *         return self
*/
  __pyx_t_1 = ((PyObject *)__pyx_tp_new_7pyarrow_3lib_Device(((PyTypeObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Device), __pyx_mstate_global->__pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 63, __pyx_L1_error)
  __Pyx_GOTREF((PyObject *)__pyx_t_1);
  __pyx_v_self = ((struct __pyx_obj_7pyarrow_3lib_Device *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyarrow/device.pxi":64
 *     cdef wrap(const shared_ptr[CDevice]& device):
 *         cdef Device self = Device.__new__(Device)
 *         self.init(device)             # <<<<<<<<<<<<<<
 *         return self
 * 
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "init");
    __PYX_ERR(14, 64, __pyx_L1_error)
  }
  ((struct __pyx_vtabstruct_7pyarrow_3lib_Device *)__pyx_v_self->__pyx_vtab)->init(__pyx_v_self, __pyx_v_device); if (unlikely(PyErr_Occurred())) __PYX_ERR(14, 64, __pyx_L1_error)

  /* "pyarrow/device.pxi":65
 *         cdef Device self = Device.__new__(Device)
 *         self.init(device)
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     cdef inline shared_ptr[CDevice] unwrap(self) nogil:
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_self);
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "pyarrow/device.pxi":61
 *         self.device = device
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     cdef wrap(const shared_ptr[CDevice]& device):
 *         cdef Device self = Device.__new__(Device)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib.Device.wrap", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_self);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/device.pxi":67
 *         return self
 * 
 *     cdef inline shared_ptr[CDevice] unwrap(self) nogil:             # <<<<<<<<<<<<<<
 *         return self.device
 * 
*/

static CYTHON_INLINE std::shared_ptr< arrow::Device>  __pyx_f_7pyarrow_3lib_6Device_unwrap(struct __pyx_obj_7pyarrow_3lib_Device *__pyx_v_self) {
  std::shared_ptr< arrow::Device>  __pyx_r;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyGILState_STATE __pyx_gilstate_save;

  /* "pyarrow/device.pxi":68
 * 
 *     cdef inline shared_ptr[CDevice] unwrap(self) nogil:
 *         return self.device             # <<<<<<<<<<<<<<
 * 
 *     def __eq__(self, other):
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "device");
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    __PYX_ERR(14, 68, __pyx_L1_error)
  }
  __pyx_r = __pyx_v_self->device;
  goto __pyx_L0;

  /* "pyarrow/device.pxi":67
 *         return self
 * 
 *     cdef inline shared_ptr[CDevice] unwrap(self) nogil:             # <<<<<<<<<<<<<<
 *         return self.device
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  __Pyx_AddTraceback("pyarrow.lib.Device.unwrap", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_pretend_to_initialize(&__pyx_r);
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  __pyx_L0:;
  return __pyx_r;
}

/* "pyarrow/device.pxi":70
 *         return self.device
 * 
 *     def __eq__(self, other):             # <<<<<<<<<<<<<<
 *         if not isinstance(other, Device):
 *             return False
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_6Device_3__eq__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_6Device_3__eq__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__eq__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_6Device_2__eq__(((struct __pyx_obj_7pyarrow_3lib_Device *)__pyx_v_self), ((PyObject *)__pyx_v_other));

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

static PyObject *__pyx_pf_7pyarrow_3lib_6Device_2__eq__(struct __pyx_obj_7pyarrow_3lib_Device *__pyx_v_self, PyObject *__pyx_v_other) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__eq__", 0);

  /* "pyarrow/device.pxi":71
 * 
 *     def __eq__(self, other):
 *         if not isinstance(other, Device):             # <<<<<<<<<<<<<<
 *             return False
 *         return self.device.get().Equals(deref((<Device>other).device.get()))
*/
  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_other, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Device); 
  __pyx_t_2 = (!__pyx_t_1);
  if (__pyx_t_2) {

    /* "pyarrow/device.pxi":72
 *     def __eq__(self, other):
 *         if not isinstance(other, Device):
 *             return False             # <<<<<<<<<<<<<<
 *         return self.device.get().Equals(deref((<Device>other).device.get()))
 * 
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_False);
    __pyx_r = Py_False;
    goto __pyx_L0;

    /* "pyarrow/device.pxi":71
 * 
 *     def __eq__(self, other):
 *         if not isinstance(other, Device):             # <<<<<<<<<<<<<<
 *             return False
 *         return self.device.get().Equals(deref((<Device>other).device.get()))
*/
  }

  /* "pyarrow/device.pxi":73
 *         if not isinstance(other, Device):
 *             return False
 *         return self.device.get().Equals(deref((<Device>other).device.get()))             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
*/
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "device");
    __PYX_ERR(14, 73, __pyx_L1_error)
  }
  if (unlikely(__pyx_v_other == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "device");
    __PYX_ERR(14, 73, __pyx_L1_error)
  }
  __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_self->device.get()->Equals((*((struct __pyx_obj_7pyarrow_3lib_Device *)__pyx_v_other)->device.get()))); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 73, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "pyarrow/device.pxi":70
 *         return self.device
 * 
 *     def __eq__(self, other):             # <<<<<<<<<<<<<<
 *         if not isinstance(other, Device):
 *             return False
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyarrow.lib.Device.__eq__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/device.pxi":75
 *         return self.device.get().Equals(deref((<Device>other).device.get()))
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return f"<pyarrow.Device: {frombytes(self.device.get().ToString())}>"
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_6Device_5__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_6Device_5__repr__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_6Device_4__repr__(((struct __pyx_obj_7pyarrow_3lib_Device *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_6Device_4__repr__(struct __pyx_obj_7pyarrow_3lib_Device *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4[3];
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);

  /* "pyarrow/device.pxi":76
 * 
 *     def __repr__(self):
 *         return f"<pyarrow.Device: {frombytes(self.device.get().ToString())}>"             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_frombytes); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 76, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "device");
    __PYX_ERR(14, 76, __pyx_L1_error)
  }
  __pyx_t_2 = __pyx_convert_PyBytes_string_to_py_6libcpp_6string_std__in_string(__pyx_v_self->device.get()->ToString()); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 76, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 76, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_FormatSimple(__pyx_t_3, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 76, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_4[0] = __pyx_mstate_global->__pyx_kp_u_pyarrow_Device;
  __pyx_t_4[1] = __pyx_t_2;
  __pyx_t_4[2] = __pyx_mstate_global->__pyx_kp_u__5;
  __pyx_t_3 = __Pyx_PyUnicode_Join(__pyx_t_4, 3, 17 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2));
  if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 76, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "pyarrow/device.pxi":75
 *         return self.device.get().Equals(deref((<Device>other).device.get()))
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return f"<pyarrow.Device: {frombytes(self.device.get().ToString())}>"
 * 
*/

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

/* "pyarrow/device.pxi":78
 *         return f"<pyarrow.Device: {frombytes(self.device.get().ToString())}>"
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def type_name(self):
 *         """
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_6Device_9type_name_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_6Device_9type_name_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_6Device_9type_name___get__(((struct __pyx_obj_7pyarrow_3lib_Device *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_6Device_9type_name___get__(struct __pyx_obj_7pyarrow_3lib_Device *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyarrow/device.pxi":83
 *         A shorthand for this device's type.
 *         """
 *         return frombytes(self.device.get().type_name())             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_frombytes); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 83, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "device");
    __PYX_ERR(14, 83, __pyx_L1_error)
  }
  __pyx_t_4 = __Pyx_PyBytes_FromString(__pyx_v_self->device.get()->type_name()); if (unlikely(!__pyx_t_4)) __PYX_ERR(14, 83, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 83, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/device.pxi":78
 *         return f"<pyarrow.Device: {frombytes(self.device.get().ToString())}>"
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def type_name(self):
 *         """
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pyarrow.lib.Device.type_name.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/device.pxi":85
 *         return frombytes(self.device.get().type_name())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def device_id(self):
 *         """
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_6Device_9device_id_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_6Device_9device_id_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_6Device_9device_id___get__(((struct __pyx_obj_7pyarrow_3lib_Device *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_6Device_9device_id___get__(struct __pyx_obj_7pyarrow_3lib_Device *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyarrow/device.pxi":93
 *         non-numa systems) returns -1.
 *         """
 *         return self.device.get().device_id()             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "device");
    __PYX_ERR(14, 93, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyLong_From_int64_t(__pyx_v_self->device.get()->device_id()); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 93, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/device.pxi":85
 *         return frombytes(self.device.get().type_name())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def device_id(self):
 *         """
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib.Device.device_id.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/device.pxi":95
 *         return self.device.get().device_id()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_cpu(self):
 *         """
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_6Device_6is_cpu_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_6Device_6is_cpu_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_6Device_6is_cpu___get__(((struct __pyx_obj_7pyarrow_3lib_Device *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_6Device_6is_cpu___get__(struct __pyx_obj_7pyarrow_3lib_Device *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyarrow/device.pxi":103
 *         is CPU-accessible.
 *         """
 *         return self.device.get().is_cpu()             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "device");
    __PYX_ERR(14, 103, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->device.get()->is_cpu()); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 103, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/device.pxi":95
 *         return self.device.get().device_id()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_cpu(self):
 *         """
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib.Device.is_cpu.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/device.pxi":105
 *         return self.device.get().is_cpu()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def device_type(self):
 *         """
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_6Device_11device_type_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_6Device_11device_type_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_6Device_11device_type___get__(((struct __pyx_obj_7pyarrow_3lib_Device *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_6Device_11device_type___get__(struct __pyx_obj_7pyarrow_3lib_Device *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyarrow/device.pxi":110
 *         Return the DeviceAllocationType of this device.
 *         """
 *         return _wrap_device_allocation_type(self.device.get().device_type())             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "device");
    __PYX_ERR(14, 110, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_7pyarrow_3lib__wrap_device_allocation_type(__pyx_v_self->device.get()->device_type()); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 110, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/device.pxi":105
 *         return self.device.get().is_cpu()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def device_type(self):
 *         """
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib.Device.device_type.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.device cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_6Device_7__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_6Device_6__reduce_cython__, "Device.__reduce_cython__(self)");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_6Device_7__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_6Device_7__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_6Device_6__reduce_cython__};
static PyObject *__pyx_pw_7pyarrow_3lib_6Device_7__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7pyarrow_3lib_6Device_6__reduce_cython__(((struct __pyx_obj_7pyarrow_3lib_Device *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_6Device_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_Device *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "self.device cannot be converted to a Python object for pickling"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "self.device cannot be converted to a Python object for pickling"
*/
  __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_self_device_cannot_be_converted, 0, 0);
  __PYX_ERR(7, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.device cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyarrow.lib.Device.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "self.device cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.device cannot be converted to a Python object for pickling"
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_6Device_9__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_6Device_8__setstate_cython__, "Device.__setstate_cython__(self, __pyx_state)");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_6Device_9__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_6Device_9__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_6Device_8__setstate_cython__};
static PyObject *__pyx_pw_7pyarrow_3lib_6Device_9__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(7, 3, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(7, 3, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(7, 3, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(7, 3, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(7, 3, __pyx_L3_error)
    }
    __pyx_v___pyx_state = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(7, 3, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("pyarrow.lib.Device.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyarrow_3lib_6Device_8__setstate_cython__(((struct __pyx_obj_7pyarrow_3lib_Device *)__pyx_v_self), __pyx_v___pyx_state);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

  /* "(tree fragment)":4
 *     raise TypeError, "self.device cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "self.device cannot be converted to a Python object for pickling"             # <<<<<<<<<<<<<<
*/
  __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_self_device_cannot_be_converted, 0, 0);
  __PYX_ERR(7, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "self.device cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.device cannot be converted to a Python object for pickling"
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyarrow.lib.Device.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/device.pxi":123
 *     """
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         raise TypeError("Do not call MemoryManager's constructor directly, "
 *                         "use pyarrow.default_cpu_memory_manager() instead.")
*/

/* Python wrapper */
static int __pyx_pw_7pyarrow_3lib_13MemoryManager_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_7pyarrow_3lib_13MemoryManager_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, __pyx_nargs); return -1; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return -1;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__init__", __pyx_kwds); return -1;}
  __pyx_r = __pyx_pf_7pyarrow_3lib_13MemoryManager___init__(((struct __pyx_obj_7pyarrow_3lib_MemoryManager *)__pyx_v_self));

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

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

  /* "pyarrow/device.pxi":124
 * 
 *     def __init__(self):
 *         raise TypeError("Do not call MemoryManager's constructor directly, "             # <<<<<<<<<<<<<<
 *                         "use pyarrow.default_cpu_memory_manager() instead.")
 * 
*/
  __pyx_t_2 = NULL;
  __pyx_t_3 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Do_not_call_MemoryManager_s_cons};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 124, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(14, 124, __pyx_L1_error)

  /* "pyarrow/device.pxi":123
 *     """
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         raise TypeError("Do not call MemoryManager's constructor directly, "
 *                         "use pyarrow.default_cpu_memory_manager() instead.")
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pyarrow.lib.MemoryManager.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/device.pxi":127
 *                         "use pyarrow.default_cpu_memory_manager() instead.")
 * 
 *     cdef void init(self, const shared_ptr[CMemoryManager]& mm):             # <<<<<<<<<<<<<<
 *         self.memory_manager = mm
 * 
*/

static void __pyx_f_7pyarrow_3lib_13MemoryManager_init(struct __pyx_obj_7pyarrow_3lib_MemoryManager *__pyx_v_self, std::shared_ptr< arrow::MemoryManager>  const &__pyx_v_mm) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "pyarrow/device.pxi":128
 * 
 *     cdef void init(self, const shared_ptr[CMemoryManager]& mm):
 *         self.memory_manager = mm             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "memory_manager");
    __PYX_ERR(14, 128, __pyx_L1_error)
  }
  __pyx_v_self->memory_manager = __pyx_v_mm;

  /* "pyarrow/device.pxi":127
 *                         "use pyarrow.default_cpu_memory_manager() instead.")
 * 
 *     cdef void init(self, const shared_ptr[CMemoryManager]& mm):             # <<<<<<<<<<<<<<
 *         self.memory_manager = mm
 * 
*/

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyarrow.lib.MemoryManager.init", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
}

/* "pyarrow/device.pxi":130
 *         self.memory_manager = mm
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     cdef wrap(const shared_ptr[CMemoryManager]& mm):
 *         cdef MemoryManager self = MemoryManager.__new__(MemoryManager)
*/

static PyObject *__pyx_f_7pyarrow_3lib_13MemoryManager_wrap(std::shared_ptr< arrow::MemoryManager>  const &__pyx_v_mm) {
  struct __pyx_obj_7pyarrow_3lib_MemoryManager *__pyx_v_self = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("wrap", 0);

  /* "pyarrow/device.pxi":132
 *     @staticmethod
 *     cdef wrap(const shared_ptr[CMemoryManager]& mm):
 *         cdef MemoryManager self = MemoryManager.__new__(MemoryManager)             # <<<<<<<<<<<<<<
 *         self.init(mm)
 *         return self
*/
  __pyx_t_1 = ((PyObject *)__pyx_tp_new_7pyarrow_3lib_MemoryManager(((PyTypeObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_MemoryManager), __pyx_mstate_global->__pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 132, __pyx_L1_error)
  __Pyx_GOTREF((PyObject *)__pyx_t_1);
  __pyx_v_self = ((struct __pyx_obj_7pyarrow_3lib_MemoryManager *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyarrow/device.pxi":133
 *     cdef wrap(const shared_ptr[CMemoryManager]& mm):
 *         cdef MemoryManager self = MemoryManager.__new__(MemoryManager)
 *         self.init(mm)             # <<<<<<<<<<<<<<
 *         return self
 * 
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "init");
    __PYX_ERR(14, 133, __pyx_L1_error)
  }
  ((struct __pyx_vtabstruct_7pyarrow_3lib_MemoryManager *)__pyx_v_self->__pyx_vtab)->init(__pyx_v_self, __pyx_v_mm); if (unlikely(PyErr_Occurred())) __PYX_ERR(14, 133, __pyx_L1_error)

  /* "pyarrow/device.pxi":134
 *         cdef MemoryManager self = MemoryManager.__new__(MemoryManager)
 *         self.init(mm)
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     cdef inline shared_ptr[CMemoryManager] unwrap(self) nogil:
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_self);
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "pyarrow/device.pxi":130
 *         self.memory_manager = mm
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     cdef wrap(const shared_ptr[CMemoryManager]& mm):
 *         cdef MemoryManager self = MemoryManager.__new__(MemoryManager)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib.MemoryManager.wrap", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_self);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/device.pxi":136
 *         return self
 * 
 *     cdef inline shared_ptr[CMemoryManager] unwrap(self) nogil:             # <<<<<<<<<<<<<<
 *         return self.memory_manager
 * 
*/

static CYTHON_INLINE std::shared_ptr< arrow::MemoryManager>  __pyx_f_7pyarrow_3lib_13MemoryManager_unwrap(struct __pyx_obj_7pyarrow_3lib_MemoryManager *__pyx_v_self) {
  std::shared_ptr< arrow::MemoryManager>  __pyx_r;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyGILState_STATE __pyx_gilstate_save;

  /* "pyarrow/device.pxi":137
 * 
 *     cdef inline shared_ptr[CMemoryManager] unwrap(self) nogil:
 *         return self.memory_manager             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "memory_manager");
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    __PYX_ERR(14, 137, __pyx_L1_error)
  }
  __pyx_r = __pyx_v_self->memory_manager;
  goto __pyx_L0;

  /* "pyarrow/device.pxi":136
 *         return self
 * 
 *     cdef inline shared_ptr[CMemoryManager] unwrap(self) nogil:             # <<<<<<<<<<<<<<
 *         return self.memory_manager
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  __Pyx_AddTraceback("pyarrow.lib.MemoryManager.unwrap", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_pretend_to_initialize(&__pyx_r);
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  __pyx_L0:;
  return __pyx_r;
}

/* "pyarrow/device.pxi":139
 *         return self.memory_manager
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         device_str = frombytes(self.memory_manager.get().device().get().ToString())
 *         return f"<pyarrow.MemoryManager device: {device_str}>"
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_13MemoryManager_3__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_13MemoryManager_3__repr__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_13MemoryManager_2__repr__(((struct __pyx_obj_7pyarrow_3lib_MemoryManager *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_13MemoryManager_2__repr__(struct __pyx_obj_7pyarrow_3lib_MemoryManager *__pyx_v_self) {
  PyObject *__pyx_v_device_str = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  PyObject *__pyx_t_6[3];
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);

  /* "pyarrow/device.pxi":140
 * 
 *     def __repr__(self):
 *         device_str = frombytes(self.memory_manager.get().device().get().ToString())             # <<<<<<<<<<<<<<
 *         return f"<pyarrow.MemoryManager device: {device_str}>"
 * 
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_frombytes); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 140, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "memory_manager");
    __PYX_ERR(14, 140, __pyx_L1_error)
  }
  __pyx_t_4 = __pyx_convert_PyBytes_string_to_py_6libcpp_6string_std__in_string(__pyx_v_self->memory_manager.get()->device().get()->ToString()); if (unlikely(!__pyx_t_4)) __PYX_ERR(14, 140, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 140, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_device_str = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyarrow/device.pxi":141
 *     def __repr__(self):
 *         device_str = frombytes(self.memory_manager.get().device().get().ToString())
 *         return f"<pyarrow.MemoryManager device: {device_str}>"             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_v_device_str, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 141, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6[0] = __pyx_mstate_global->__pyx_kp_u_pyarrow_MemoryManager_device;
  __pyx_t_6[1] = __pyx_t_1;
  __pyx_t_6[2] = __pyx_mstate_global->__pyx_kp_u__5;
  __pyx_t_3 = __Pyx_PyUnicode_Join(__pyx_t_6, 3, 31 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1));
  if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 141, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "pyarrow/device.pxi":139
 *         return self.memory_manager
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         device_str = frombytes(self.memory_manager.get().device().get().ToString())
 *         return f"<pyarrow.MemoryManager device: {device_str}>"
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pyarrow.lib.MemoryManager.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_device_str);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/device.pxi":143
 *         return f"<pyarrow.MemoryManager device: {device_str}>"
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def device(self):
 *         """
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_13MemoryManager_6device_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_13MemoryManager_6device_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_13MemoryManager_6device___get__(((struct __pyx_obj_7pyarrow_3lib_MemoryManager *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_13MemoryManager_6device___get__(struct __pyx_obj_7pyarrow_3lib_MemoryManager *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyarrow/device.pxi":148
 *         The device this MemoryManager is tied to.
 *         """
 *         return Device.wrap(self.memory_manager.get().device())             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "memory_manager");
    __PYX_ERR(14, 148, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_7pyarrow_3lib_6Device_wrap(__pyx_v_self->memory_manager.get()->device()); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 148, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/device.pxi":143
 *         return f"<pyarrow.MemoryManager device: {device_str}>"
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def device(self):
 *         """
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib.MemoryManager.device.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/device.pxi":150
 *         return Device.wrap(self.memory_manager.get().device())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_cpu(self):
 *         """
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_13MemoryManager_6is_cpu_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_13MemoryManager_6is_cpu_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_13MemoryManager_6is_cpu___get__(((struct __pyx_obj_7pyarrow_3lib_MemoryManager *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_13MemoryManager_6is_cpu___get__(struct __pyx_obj_7pyarrow_3lib_MemoryManager *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyarrow/device.pxi":158
 *         address is CPU-accessible.
 *         """
 *         return self.memory_manager.get().is_cpu()             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "memory_manager");
    __PYX_ERR(14, 158, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->memory_manager.get()->is_cpu()); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 158, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/device.pxi":150
 *         return Device.wrap(self.memory_manager.get().device())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_cpu(self):
 *         """
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib.MemoryManager.is_cpu.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.memory_manager cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_13MemoryManager_5__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_13MemoryManager_4__reduce_cython__, "MemoryManager.__reduce_cython__(self)");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_13MemoryManager_5__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_13MemoryManager_5__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_13MemoryManager_4__reduce_cython__};
static PyObject *__pyx_pw_7pyarrow_3lib_13MemoryManager_5__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7pyarrow_3lib_13MemoryManager_4__reduce_cython__(((struct __pyx_obj_7pyarrow_3lib_MemoryManager *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_13MemoryManager_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_MemoryManager *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "self.memory_manager cannot be converted to a Python object for pickling"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "self.memory_manager cannot be converted to a Python object for pickling"
*/
  __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_self_memory_manager_cannot_be_co, 0, 0);
  __PYX_ERR(7, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.memory_manager cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyarrow.lib.MemoryManager.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "self.memory_manager cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.memory_manager cannot be converted to a Python object for pickling"
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_13MemoryManager_7__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_13MemoryManager_6__setstate_cython__, "MemoryManager.__setstate_cython__(self, __pyx_state)");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_13MemoryManager_7__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_13MemoryManager_7__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_13MemoryManager_6__setstate_cython__};
static PyObject *__pyx_pw_7pyarrow_3lib_13MemoryManager_7__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(7, 3, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(7, 3, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(7, 3, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(7, 3, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(7, 3, __pyx_L3_error)
    }
    __pyx_v___pyx_state = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(7, 3, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("pyarrow.lib.MemoryManager.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyarrow_3lib_13MemoryManager_6__setstate_cython__(((struct __pyx_obj_7pyarrow_3lib_MemoryManager *)__pyx_v_self), __pyx_v___pyx_state);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

  /* "(tree fragment)":4
 *     raise TypeError, "self.memory_manager cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "self.memory_manager cannot be converted to a Python object for pickling"             # <<<<<<<<<<<<<<
*/
  __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_self_memory_manager_cannot_be_co, 0, 0);
  __PYX_ERR(7, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "self.memory_manager cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.memory_manager cannot be converted to a Python object for pickling"
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyarrow.lib.MemoryManager.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/device.pxi":161
 * 
 * 
 * def default_cpu_memory_manager():             # <<<<<<<<<<<<<<
 *     """
 *     Return the default CPU MemoryManager instance.
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_51default_cpu_memory_manager(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_50default_cpu_memory_manager, "default_cpu_memory_manager()\n\nReturn the default CPU MemoryManager instance.\n\nThe returned singleton instance uses the default MemoryPool.");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_51default_cpu_memory_manager = {"default_cpu_memory_manager", (PyCFunction)__pyx_pw_7pyarrow_3lib_51default_cpu_memory_manager, METH_NOARGS, __pyx_doc_7pyarrow_3lib_50default_cpu_memory_manager};
static PyObject *__pyx_pw_7pyarrow_3lib_51default_cpu_memory_manager(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("default_cpu_memory_manager (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_50default_cpu_memory_manager(__pyx_self);

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

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

  /* "pyarrow/device.pxi":167
 *     The returned singleton instance uses the default MemoryPool.
 *     """
 *     return MemoryManager.wrap(c_default_cpu_memory_manager())             # <<<<<<<<<<<<<<
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_7pyarrow_3lib_13MemoryManager_wrap( arrow::default_cpu_memory_manager()); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 167, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/device.pxi":161
 * 
 * 
 * def default_cpu_memory_manager():             # <<<<<<<<<<<<<<
 *     """
 *     Return the default CPU MemoryManager instance.
*/

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

/* "pyarrow/types.pxi":39
 * 
 * 
 * def _get_pandas_type_map():             # <<<<<<<<<<<<<<
 *     global _pandas_type_map
 *     if not _pandas_type_map:
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_53_get_pandas_type_map(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_52_get_pandas_type_map, "_get_pandas_type_map()");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_53_get_pandas_type_map = {"_get_pandas_type_map", (PyCFunction)__pyx_pw_7pyarrow_3lib_53_get_pandas_type_map, METH_NOARGS, __pyx_doc_7pyarrow_3lib_52_get_pandas_type_map};
static PyObject *__pyx_pw_7pyarrow_3lib_53_get_pandas_type_map(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_get_pandas_type_map (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_52_get_pandas_type_map(__pyx_self);

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

static PyObject *__pyx_pf_7pyarrow_3lib_52_get_pandas_type_map(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  size_t __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_get_pandas_type_map", 0);

  /* "pyarrow/types.pxi":41
 * def _get_pandas_type_map():
 *     global _pandas_type_map
 *     if not _pandas_type_map:             # <<<<<<<<<<<<<<
 *         _pandas_type_map.update({
 *             _Type_NA: np.object_,  # NaNs
*/
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_7pyarrow_3lib__pandas_type_map); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 41, __pyx_L1_error)
  __pyx_t_2 = (!__pyx_t_1);
  if (__pyx_t_2) {

    /* "pyarrow/types.pxi":43
 *     if not _pandas_type_map:
 *         _pandas_type_map.update({
 *             _Type_NA: np.object_,  # NaNs             # <<<<<<<<<<<<<<
 *             _Type_BOOL: np.bool_,
 *             _Type_INT8: np.int8,
*/
    __pyx_t_3 = __Pyx_PyDict_NewPresized(30); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 43, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::NA); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 43, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 43, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_object_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 43, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (PyDict_SetItem(__pyx_t_3, __pyx_t_4, __pyx_t_6) < (0)) __PYX_ERR(1, 43, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "pyarrow/types.pxi":44
 *         _pandas_type_map.update({
 *             _Type_NA: np.object_,  # NaNs
 *             _Type_BOOL: np.bool_,             # <<<<<<<<<<<<<<
 *             _Type_INT8: np.int8,
 *             _Type_INT16: np.int16,
*/
    __pyx_t_6 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::BOOL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 44, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 44, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_bool); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 44, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (PyDict_SetItem(__pyx_t_3, __pyx_t_6, __pyx_t_5) < (0)) __PYX_ERR(1, 43, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "pyarrow/types.pxi":45
 *             _Type_NA: np.object_,  # NaNs
 *             _Type_BOOL: np.bool_,
 *             _Type_INT8: np.int8,             # <<<<<<<<<<<<<<
 *             _Type_INT16: np.int16,
 *             _Type_INT32: np.int32,
*/
    __pyx_t_5 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::INT8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 45, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 45, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_int8); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 45, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (PyDict_SetItem(__pyx_t_3, __pyx_t_5, __pyx_t_4) < (0)) __PYX_ERR(1, 43, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "pyarrow/types.pxi":46
 *             _Type_BOOL: np.bool_,
 *             _Type_INT8: np.int8,
 *             _Type_INT16: np.int16,             # <<<<<<<<<<<<<<
 *             _Type_INT32: np.int32,
 *             _Type_INT64: np.int64,
*/
    __pyx_t_4 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::INT16); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 46, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 46, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_int16); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 46, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (PyDict_SetItem(__pyx_t_3, __pyx_t_4, __pyx_t_6) < (0)) __PYX_ERR(1, 43, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "pyarrow/types.pxi":47
 *             _Type_INT8: np.int8,
 *             _Type_INT16: np.int16,
 *             _Type_INT32: np.int32,             # <<<<<<<<<<<<<<
 *             _Type_INT64: np.int64,
 *             _Type_UINT8: np.uint8,
*/
    __pyx_t_6 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::INT32); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 47, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 47, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_int32); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 47, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (PyDict_SetItem(__pyx_t_3, __pyx_t_6, __pyx_t_5) < (0)) __PYX_ERR(1, 43, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "pyarrow/types.pxi":48
 *             _Type_INT16: np.int16,
 *             _Type_INT32: np.int32,
 *             _Type_INT64: np.int64,             # <<<<<<<<<<<<<<
 *             _Type_UINT8: np.uint8,
 *             _Type_UINT16: np.uint16,
*/
    __pyx_t_5 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::INT64); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 48, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 48, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_int64); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 48, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (PyDict_SetItem(__pyx_t_3, __pyx_t_5, __pyx_t_4) < (0)) __PYX_ERR(1, 43, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "pyarrow/types.pxi":49
 *             _Type_INT32: np.int32,
 *             _Type_INT64: np.int64,
 *             _Type_UINT8: np.uint8,             # <<<<<<<<<<<<<<
 *             _Type_UINT16: np.uint16,
 *             _Type_UINT32: np.uint32,
*/
    __pyx_t_4 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::UINT8); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 49, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 49, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_uint8); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 49, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (PyDict_SetItem(__pyx_t_3, __pyx_t_4, __pyx_t_6) < (0)) __PYX_ERR(1, 43, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "pyarrow/types.pxi":50
 *             _Type_INT64: np.int64,
 *             _Type_UINT8: np.uint8,
 *             _Type_UINT16: np.uint16,             # <<<<<<<<<<<<<<
 *             _Type_UINT32: np.uint32,
 *             _Type_UINT64: np.uint64,
*/
    __pyx_t_6 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::UINT16); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 50, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 50, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_uint16); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 50, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (PyDict_SetItem(__pyx_t_3, __pyx_t_6, __pyx_t_5) < (0)) __PYX_ERR(1, 43, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "pyarrow/types.pxi":51
 *             _Type_UINT8: np.uint8,
 *             _Type_UINT16: np.uint16,
 *             _Type_UINT32: np.uint32,             # <<<<<<<<<<<<<<
 *             _Type_UINT64: np.uint64,
 *             _Type_HALF_FLOAT: np.float16,
*/
    __pyx_t_5 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::UINT32); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 51, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 51, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_uint32); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 51, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (PyDict_SetItem(__pyx_t_3, __pyx_t_5, __pyx_t_4) < (0)) __PYX_ERR(1, 43, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "pyarrow/types.pxi":52
 *             _Type_UINT16: np.uint16,
 *             _Type_UINT32: np.uint32,
 *             _Type_UINT64: np.uint64,             # <<<<<<<<<<<<<<
 *             _Type_HALF_FLOAT: np.float16,
 *             _Type_FLOAT: np.float32,
*/
    __pyx_t_4 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::UINT64); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 52, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 52, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_uint64); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 52, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (PyDict_SetItem(__pyx_t_3, __pyx_t_4, __pyx_t_6) < (0)) __PYX_ERR(1, 43, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "pyarrow/types.pxi":53
 *             _Type_UINT32: np.uint32,
 *             _Type_UINT64: np.uint64,
 *             _Type_HALF_FLOAT: np.float16,             # <<<<<<<<<<<<<<
 *             _Type_FLOAT: np.float32,
 *             _Type_DOUBLE: np.float64,
*/
    __pyx_t_6 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::HALF_FLOAT); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 53, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 53, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_float16); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 53, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (PyDict_SetItem(__pyx_t_3, __pyx_t_6, __pyx_t_5) < (0)) __PYX_ERR(1, 43, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "pyarrow/types.pxi":54
 *             _Type_UINT64: np.uint64,
 *             _Type_HALF_FLOAT: np.float16,
 *             _Type_FLOAT: np.float32,             # <<<<<<<<<<<<<<
 *             _Type_DOUBLE: np.float64,
 *             # Pandas does not support [D]ay, so default to [ms] for date32
*/
    __pyx_t_5 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::FLOAT); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 54, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 54, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_float32); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 54, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (PyDict_SetItem(__pyx_t_3, __pyx_t_5, __pyx_t_4) < (0)) __PYX_ERR(1, 43, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "pyarrow/types.pxi":55
 *             _Type_HALF_FLOAT: np.float16,
 *             _Type_FLOAT: np.float32,
 *             _Type_DOUBLE: np.float64,             # <<<<<<<<<<<<<<
 *             # Pandas does not support [D]ay, so default to [ms] for date32
 *             _Type_DATE32: np.dtype('datetime64[ms]'),
*/
    __pyx_t_4 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::DOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 55, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 55, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_float64); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 55, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (PyDict_SetItem(__pyx_t_3, __pyx_t_4, __pyx_t_6) < (0)) __PYX_ERR(1, 43, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "pyarrow/types.pxi":57
 *             _Type_DOUBLE: np.float64,
 *             # Pandas does not support [D]ay, so default to [ms] for date32
 *             _Type_DATE32: np.dtype('datetime64[ms]'),             # <<<<<<<<<<<<<<
 *             _Type_DATE64: np.dtype('datetime64[ms]'),
 *             _Type_TIMESTAMP: {
*/
    __pyx_t_6 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::DATE32); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 57, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_5 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 57, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_dtype); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 57, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_9 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_8);
      assert(__pyx_t_5);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_8, __pyx__function);
      __pyx_t_9 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_datetime64_ms};
      __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 57, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    if (PyDict_SetItem(__pyx_t_3, __pyx_t_6, __pyx_t_4) < (0)) __PYX_ERR(1, 43, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "pyarrow/types.pxi":58
 *             # Pandas does not support [D]ay, so default to [ms] for date32
 *             _Type_DATE32: np.dtype('datetime64[ms]'),
 *             _Type_DATE64: np.dtype('datetime64[ms]'),             # <<<<<<<<<<<<<<
 *             _Type_TIMESTAMP: {
 *                 's': np.dtype('datetime64[s]'),
*/
    __pyx_t_4 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::DATE64); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 58, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_8 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 58, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_dtype); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 58, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_9 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      assert(__pyx_t_8);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
      __pyx_t_9 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_mstate_global->__pyx_kp_u_datetime64_ms};
      __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 58, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
    }
    if (PyDict_SetItem(__pyx_t_3, __pyx_t_4, __pyx_t_6) < (0)) __PYX_ERR(1, 43, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "pyarrow/types.pxi":59
 *             _Type_DATE32: np.dtype('datetime64[ms]'),
 *             _Type_DATE64: np.dtype('datetime64[ms]'),
 *             _Type_TIMESTAMP: {             # <<<<<<<<<<<<<<
 *                 's': np.dtype('datetime64[s]'),
 *                 'ms': np.dtype('datetime64[ms]'),
*/
    __pyx_t_6 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::TIMESTAMP); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 59, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);

    /* "pyarrow/types.pxi":60
 *             _Type_DATE64: np.dtype('datetime64[ms]'),
 *             _Type_TIMESTAMP: {
 *                 's': np.dtype('datetime64[s]'),             # <<<<<<<<<<<<<<
 *                 'ms': np.dtype('datetime64[ms]'),
 *                 'us': np.dtype('datetime64[us]'),
*/
    __pyx_t_4 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 60, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_8 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 60, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_dtype); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 60, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_9 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_10))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_10);
      assert(__pyx_t_8);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_10);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_10, __pyx__function);
      __pyx_t_9 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_mstate_global->__pyx_kp_u_datetime64_s};
      __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_10, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 60, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
    }
    if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_s, __pyx_t_7) < (0)) __PYX_ERR(1, 60, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "pyarrow/types.pxi":61
 *             _Type_TIMESTAMP: {
 *                 's': np.dtype('datetime64[s]'),
 *                 'ms': np.dtype('datetime64[ms]'),             # <<<<<<<<<<<<<<
 *                 'us': np.dtype('datetime64[us]'),
 *                 'ns': np.dtype('datetime64[ns]'),
*/
    __pyx_t_10 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 61, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_dtype); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 61, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_9 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_5);
      assert(__pyx_t_10);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_10);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
      __pyx_t_9 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_mstate_global->__pyx_kp_u_datetime64_ms};
      __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 61, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
    }
    if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ms, __pyx_t_7) < (0)) __PYX_ERR(1, 60, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "pyarrow/types.pxi":62
 *                 's': np.dtype('datetime64[s]'),
 *                 'ms': np.dtype('datetime64[ms]'),
 *                 'us': np.dtype('datetime64[us]'),             # <<<<<<<<<<<<<<
 *                 'ns': np.dtype('datetime64[ns]'),
 *             },
*/
    __pyx_t_5 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 62, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_dtype); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 62, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_9 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_8);
      assert(__pyx_t_5);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_8, __pyx__function);
      __pyx_t_9 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_datetime64_us};
      __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 62, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
    }
    if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_us, __pyx_t_7) < (0)) __PYX_ERR(1, 60, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "pyarrow/types.pxi":63
 *                 'ms': np.dtype('datetime64[ms]'),
 *                 'us': np.dtype('datetime64[us]'),
 *                 'ns': np.dtype('datetime64[ns]'),             # <<<<<<<<<<<<<<
 *             },
 *             _Type_DURATION: {
*/
    __pyx_t_8 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 63, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_dtype); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 63, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_9 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_10))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_10);
      assert(__pyx_t_8);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_10);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_10, __pyx__function);
      __pyx_t_9 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_mstate_global->__pyx_kp_u_datetime64_ns};
      __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_10, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 63, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
    }
    if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ns, __pyx_t_7) < (0)) __PYX_ERR(1, 60, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (PyDict_SetItem(__pyx_t_3, __pyx_t_6, __pyx_t_4) < (0)) __PYX_ERR(1, 43, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "pyarrow/types.pxi":65
 *                 'ns': np.dtype('datetime64[ns]'),
 *             },
 *             _Type_DURATION: {             # <<<<<<<<<<<<<<
 *                 's': np.dtype('timedelta64[s]'),
 *                 'ms': np.dtype('timedelta64[ms]'),
*/
    __pyx_t_4 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::DURATION); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 65, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);

    /* "pyarrow/types.pxi":66
 *             },
 *             _Type_DURATION: {
 *                 's': np.dtype('timedelta64[s]'),             # <<<<<<<<<<<<<<
 *                 'ms': np.dtype('timedelta64[ms]'),
 *                 'us': np.dtype('timedelta64[us]'),
*/
    __pyx_t_6 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 66, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_10 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 66, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_dtype); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 66, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_9 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_5);
      assert(__pyx_t_10);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_10);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
      __pyx_t_9 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_mstate_global->__pyx_kp_u_timedelta64_s};
      __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 66, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
    }
    if (PyDict_SetItem(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_s, __pyx_t_7) < (0)) __PYX_ERR(1, 66, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "pyarrow/types.pxi":67
 *             _Type_DURATION: {
 *                 's': np.dtype('timedelta64[s]'),
 *                 'ms': np.dtype('timedelta64[ms]'),             # <<<<<<<<<<<<<<
 *                 'us': np.dtype('timedelta64[us]'),
 *                 'ns': np.dtype('timedelta64[ns]'),
*/
    __pyx_t_5 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 67, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_dtype); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 67, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_9 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_8);
      assert(__pyx_t_5);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_8, __pyx__function);
      __pyx_t_9 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_timedelta64_ms};
      __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 67, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
    }
    if (PyDict_SetItem(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_ms, __pyx_t_7) < (0)) __PYX_ERR(1, 66, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "pyarrow/types.pxi":68
 *                 's': np.dtype('timedelta64[s]'),
 *                 'ms': np.dtype('timedelta64[ms]'),
 *                 'us': np.dtype('timedelta64[us]'),             # <<<<<<<<<<<<<<
 *                 'ns': np.dtype('timedelta64[ns]'),
 *             },
*/
    __pyx_t_8 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 68, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_dtype); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 68, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_9 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_10))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_10);
      assert(__pyx_t_8);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_10);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_10, __pyx__function);
      __pyx_t_9 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_mstate_global->__pyx_kp_u_timedelta64_us};
      __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_10, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 68, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
    }
    if (PyDict_SetItem(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_us, __pyx_t_7) < (0)) __PYX_ERR(1, 66, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "pyarrow/types.pxi":69
 *                 'ms': np.dtype('timedelta64[ms]'),
 *                 'us': np.dtype('timedelta64[us]'),
 *                 'ns': np.dtype('timedelta64[ns]'),             # <<<<<<<<<<<<<<
 *             },
 *             _Type_BINARY: np.object_,
*/
    __pyx_t_10 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 69, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_dtype); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 69, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_9 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_5);
      assert(__pyx_t_10);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_10);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
      __pyx_t_9 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_mstate_global->__pyx_kp_u_timedelta64_ns};
      __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 69, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
    }
    if (PyDict_SetItem(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_ns, __pyx_t_7) < (0)) __PYX_ERR(1, 66, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (PyDict_SetItem(__pyx_t_3, __pyx_t_4, __pyx_t_6) < (0)) __PYX_ERR(1, 43, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "pyarrow/types.pxi":71
 *                 'ns': np.dtype('timedelta64[ns]'),
 *             },
 *             _Type_BINARY: np.object_,             # <<<<<<<<<<<<<<
 *             _Type_LARGE_BINARY: np.object_,
 *             _Type_BINARY_VIEW: np.object_,
*/
    __pyx_t_6 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::BINARY); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 71, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 71, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_object_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 71, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (PyDict_SetItem(__pyx_t_3, __pyx_t_6, __pyx_t_7) < (0)) __PYX_ERR(1, 43, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "pyarrow/types.pxi":72
 *             },
 *             _Type_BINARY: np.object_,
 *             _Type_LARGE_BINARY: np.object_,             # <<<<<<<<<<<<<<
 *             _Type_BINARY_VIEW: np.object_,
 *             _Type_FIXED_SIZE_BINARY: np.object_,
*/
    __pyx_t_7 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::LARGE_BINARY); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 72, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 72, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_object_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 72, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (PyDict_SetItem(__pyx_t_3, __pyx_t_7, __pyx_t_4) < (0)) __PYX_ERR(1, 43, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "pyarrow/types.pxi":73
 *             _Type_BINARY: np.object_,
 *             _Type_LARGE_BINARY: np.object_,
 *             _Type_BINARY_VIEW: np.object_,             # <<<<<<<<<<<<<<
 *             _Type_FIXED_SIZE_BINARY: np.object_,
 *             _Type_STRING: np.object_,
*/
    __pyx_t_4 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::BINARY_VIEW); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 73, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 73, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_object_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 73, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (PyDict_SetItem(__pyx_t_3, __pyx_t_4, __pyx_t_6) < (0)) __PYX_ERR(1, 43, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "pyarrow/types.pxi":74
 *             _Type_LARGE_BINARY: np.object_,
 *             _Type_BINARY_VIEW: np.object_,
 *             _Type_FIXED_SIZE_BINARY: np.object_,             # <<<<<<<<<<<<<<
 *             _Type_STRING: np.object_,
 *             _Type_LARGE_STRING: np.object_,
*/
    __pyx_t_6 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::FIXED_SIZE_BINARY); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 74, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 74, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_object_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 74, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (PyDict_SetItem(__pyx_t_3, __pyx_t_6, __pyx_t_7) < (0)) __PYX_ERR(1, 43, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "pyarrow/types.pxi":75
 *             _Type_BINARY_VIEW: np.object_,
 *             _Type_FIXED_SIZE_BINARY: np.object_,
 *             _Type_STRING: np.object_,             # <<<<<<<<<<<<<<
 *             _Type_LARGE_STRING: np.object_,
 *             _Type_STRING_VIEW: np.object_,
*/
    __pyx_t_7 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::STRING); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 75, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 75, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_object_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 75, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (PyDict_SetItem(__pyx_t_3, __pyx_t_7, __pyx_t_4) < (0)) __PYX_ERR(1, 43, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "pyarrow/types.pxi":76
 *             _Type_FIXED_SIZE_BINARY: np.object_,
 *             _Type_STRING: np.object_,
 *             _Type_LARGE_STRING: np.object_,             # <<<<<<<<<<<<<<
 *             _Type_STRING_VIEW: np.object_,
 *             _Type_LIST: np.object_,
*/
    __pyx_t_4 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::LARGE_STRING); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 76, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 76, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_object_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 76, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (PyDict_SetItem(__pyx_t_3, __pyx_t_4, __pyx_t_6) < (0)) __PYX_ERR(1, 43, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "pyarrow/types.pxi":77
 *             _Type_STRING: np.object_,
 *             _Type_LARGE_STRING: np.object_,
 *             _Type_STRING_VIEW: np.object_,             # <<<<<<<<<<<<<<
 *             _Type_LIST: np.object_,
 *             _Type_MAP: np.object_,
*/
    __pyx_t_6 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::STRING_VIEW); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 77, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 77, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_object_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 77, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (PyDict_SetItem(__pyx_t_3, __pyx_t_6, __pyx_t_7) < (0)) __PYX_ERR(1, 43, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "pyarrow/types.pxi":78
 *             _Type_LARGE_STRING: np.object_,
 *             _Type_STRING_VIEW: np.object_,
 *             _Type_LIST: np.object_,             # <<<<<<<<<<<<<<
 *             _Type_MAP: np.object_,
 *             _Type_DECIMAL32: np.object_,
*/
    __pyx_t_7 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::LIST); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 78, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 78, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_object_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 78, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (PyDict_SetItem(__pyx_t_3, __pyx_t_7, __pyx_t_4) < (0)) __PYX_ERR(1, 43, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "pyarrow/types.pxi":79
 *             _Type_STRING_VIEW: np.object_,
 *             _Type_LIST: np.object_,
 *             _Type_MAP: np.object_,             # <<<<<<<<<<<<<<
 *             _Type_DECIMAL32: np.object_,
 *             _Type_DECIMAL64: np.object_,
*/
    __pyx_t_4 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::MAP); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 79, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 79, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_object_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 79, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (PyDict_SetItem(__pyx_t_3, __pyx_t_4, __pyx_t_6) < (0)) __PYX_ERR(1, 43, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "pyarrow/types.pxi":80
 *             _Type_LIST: np.object_,
 *             _Type_MAP: np.object_,
 *             _Type_DECIMAL32: np.object_,             # <<<<<<<<<<<<<<
 *             _Type_DECIMAL64: np.object_,
 *             _Type_DECIMAL128: np.object_,
*/
    __pyx_t_6 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::DECIMAL32); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 80, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 80, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_object_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 80, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (PyDict_SetItem(__pyx_t_3, __pyx_t_6, __pyx_t_7) < (0)) __PYX_ERR(1, 43, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "pyarrow/types.pxi":81
 *             _Type_MAP: np.object_,
 *             _Type_DECIMAL32: np.object_,
 *             _Type_DECIMAL64: np.object_,             # <<<<<<<<<<<<<<
 *             _Type_DECIMAL128: np.object_,
 *             _Type_DECIMAL256: np.object_,
*/
    __pyx_t_7 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::DECIMAL64); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 81, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 81, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_object_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 81, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (PyDict_SetItem(__pyx_t_3, __pyx_t_7, __pyx_t_4) < (0)) __PYX_ERR(1, 43, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "pyarrow/types.pxi":82
 *             _Type_DECIMAL32: np.object_,
 *             _Type_DECIMAL64: np.object_,
 *             _Type_DECIMAL128: np.object_,             # <<<<<<<<<<<<<<
 *             _Type_DECIMAL256: np.object_,
 *         })
*/
    __pyx_t_4 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::DECIMAL128); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 82, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 82, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_object_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 82, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (PyDict_SetItem(__pyx_t_3, __pyx_t_4, __pyx_t_6) < (0)) __PYX_ERR(1, 43, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "pyarrow/types.pxi":83
 *             _Type_DECIMAL64: np.object_,
 *             _Type_DECIMAL128: np.object_,
 *             _Type_DECIMAL256: np.object_,             # <<<<<<<<<<<<<<
 *         })
 *     return _pandas_type_map
*/
    __pyx_t_6 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::DECIMAL256); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 83, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 83, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_object_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 83, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (PyDict_SetItem(__pyx_t_3, __pyx_t_6, __pyx_t_7) < (0)) __PYX_ERR(1, 43, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "pyarrow/types.pxi":42
 *     global _pandas_type_map
 *     if not _pandas_type_map:
 *         _pandas_type_map.update({             # <<<<<<<<<<<<<<
 *             _Type_NA: np.object_,  # NaNs
 *             _Type_BOOL: np.bool_,
*/
    __pyx_t_7 = __Pyx_CallUnboundCMethod1(&__pyx_mstate_global->__pyx_umethod_PyDict_Type__update, __pyx_v_7pyarrow_3lib__pandas_type_map, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 42, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "pyarrow/types.pxi":41
 * def _get_pandas_type_map():
 *     global _pandas_type_map
 *     if not _pandas_type_map:             # <<<<<<<<<<<<<<
 *         _pandas_type_map.update({
 *             _Type_NA: np.object_,  # NaNs
*/
  }

  /* "pyarrow/types.pxi":85
 *             _Type_DECIMAL256: np.object_,
 *         })
 *     return _pandas_type_map             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_7pyarrow_3lib__pandas_type_map);
  __pyx_r = __pyx_v_7pyarrow_3lib__pandas_type_map;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":39
 * 
 * 
 * def _get_pandas_type_map():             # <<<<<<<<<<<<<<
 *     global _pandas_type_map
 *     if not _pandas_type_map:
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("pyarrow.lib._get_pandas_type_map", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":103
 * 
 * 
 * cdef bytes _datatype_to_pep3118(CDataType* type):             # <<<<<<<<<<<<<<
 *     """
 *     Construct a PEP 3118 format string describing the given datatype.
*/

static PyObject *__pyx_f_7pyarrow_3lib__datatype_to_pep3118( arrow::DataType *__pyx_v_type) {
  PyObject *__pyx_v_char = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_datatype_to_pep3118", 0);

  /* "pyarrow/types.pxi":108
 *     None is returned for unsupported types.
 *     """
 *     try:             # <<<<<<<<<<<<<<
 *         char = _pep3118_type_map[type.id()]
 *     except KeyError:
*/
  {
    __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:*/ {

      /* "pyarrow/types.pxi":109
 *     """
 *     try:
 *         char = _pep3118_type_map[type.id()]             # <<<<<<<<<<<<<<
 *     except KeyError:
 *         return None
*/
      if (unlikely(__pyx_v_7pyarrow_3lib__pep3118_type_map == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(1, 109, __pyx_L3_error)
      }
      __pyx_t_4 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type(__pyx_v_type->id()); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 109, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = __Pyx_PyDict_GetItem(__pyx_v_7pyarrow_3lib__pep3118_type_map, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 109, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_v_char = __pyx_t_5;
      __pyx_t_5 = 0;

      /* "pyarrow/types.pxi":108
 *     None is returned for unsupported types.
 *     """
 *     try:             # <<<<<<<<<<<<<<
 *         char = _pep3118_type_map[type.id()]
 *     except KeyError:
*/
    }

    /* "pyarrow/types.pxi":113
 *         return None
 *     else:
 *         if char in b'bBhHiIqQ':             # <<<<<<<<<<<<<<
 *             # Use "standard" int widths, not native
 *             return b'=' + char
*/
    /*else:*/ {
      __pyx_t_6 = (__Pyx_PySequence_ContainsTF(__pyx_v_char, __pyx_mstate_global->__pyx_n_b_bBhHiIqQ, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(1, 113, __pyx_L5_except_error)
      if (__pyx_t_6) {

        /* "pyarrow/types.pxi":115
 *         if char in b'bBhHiIqQ':
 *             # Use "standard" int widths, not native
 *             return b'=' + char             # <<<<<<<<<<<<<<
 *         else:
 *             return char
*/
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_5 = PyNumber_Add(__pyx_mstate_global->__pyx_kp_b__6, __pyx_v_char); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 115, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_5);
        if (!(likely(PyBytes_CheckExact(__pyx_t_5))||((__pyx_t_5) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_5))) __PYX_ERR(1, 115, __pyx_L5_except_error)
        __pyx_r = ((PyObject*)__pyx_t_5);
        __pyx_t_5 = 0;
        goto __pyx_L6_except_return;

        /* "pyarrow/types.pxi":113
 *         return None
 *     else:
 *         if char in b'bBhHiIqQ':             # <<<<<<<<<<<<<<
 *             # Use "standard" int widths, not native
 *             return b'=' + char
*/
      }

      /* "pyarrow/types.pxi":117
 *             return b'=' + char
 *         else:
 *             return char             # <<<<<<<<<<<<<<
 * 
 * 
*/
      /*else*/ {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_5 = __pyx_v_char;
        __Pyx_INCREF(__pyx_t_5);
        if (!(likely(PyBytes_CheckExact(__pyx_t_5))||((__pyx_t_5) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_5))) __PYX_ERR(1, 117, __pyx_L5_except_error)
        __pyx_r = ((PyObject*)__pyx_t_5);
        __pyx_t_5 = 0;
        goto __pyx_L6_except_return;
      }
    }
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "pyarrow/types.pxi":110
 *     try:
 *         char = _pep3118_type_map[type.id()]
 *     except KeyError:             # <<<<<<<<<<<<<<
 *         return None
 *     else:
*/
    __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_KeyError))));
    if (__pyx_t_7) {
      __Pyx_ErrRestore(0,0,0);

      /* "pyarrow/types.pxi":111
 *         char = _pep3118_type_map[type.id()]
 *     except KeyError:
 *         return None             # <<<<<<<<<<<<<<
 *     else:
 *         if char in b'bBhHiIqQ':
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_r = ((PyObject*)Py_None); __Pyx_INCREF(Py_None);
      goto __pyx_L6_except_return;
    }
    goto __pyx_L5_except_error;

    /* "pyarrow/types.pxi":108
 *     None is returned for unsupported types.
 *     """
 *     try:             # <<<<<<<<<<<<<<
 *         char = _pep3118_type_map[type.id()]
 *     except KeyError:
*/
    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L6_except_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
  }

  /* "pyarrow/types.pxi":103
 * 
 * 
 * cdef bytes _datatype_to_pep3118(CDataType* type):             # <<<<<<<<<<<<<<
 *     """
 *     Construct a PEP 3118 format string describing the given datatype.
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pyarrow.lib._datatype_to_pep3118", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_char);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":120
 * 
 * 
 * cdef void* _as_c_pointer(v, allow_null=False) except *:             # <<<<<<<<<<<<<<
 *     """
 *     Convert a Python object to a raw C pointer.
*/

static void *__pyx_f_7pyarrow_3lib__as_c_pointer(PyObject *__pyx_v_v, struct __pyx_opt_args_7pyarrow_3lib__as_c_pointer *__pyx_optional_args) {
  PyObject *__pyx_v_allow_null = ((PyObject *)Py_False);
  void *__pyx_v_c_ptr;
  char const *__pyx_v_capsule_name;
  PyObject *__pyx_v_capsule_name_str = NULL;
  void *__pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  uintptr_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  size_t __pyx_t_7;
  char const *__pyx_t_8;
  int __pyx_t_9;
  void *__pyx_t_10;
  Py_ssize_t __pyx_t_11;
  PyObject *__pyx_t_12[3];
  int __pyx_t_13;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_as_c_pointer", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_allow_null = __pyx_optional_args->allow_null;
    }
  }

  /* "pyarrow/types.pxi":130
 *     cdef void* c_ptr
 *     cdef const char* capsule_name
 *     if isinstance(v, int):             # <<<<<<<<<<<<<<
 *         c_ptr = <void*> <uintptr_t > v
 *     elif isinstance(v, float):
*/
  __pyx_t_1 = PyLong_Check(__pyx_v_v); 
  if (__pyx_t_1) {

    /* "pyarrow/types.pxi":131
 *     cdef const char* capsule_name
 *     if isinstance(v, int):
 *         c_ptr = <void*> <uintptr_t > v             # <<<<<<<<<<<<<<
 *     elif isinstance(v, float):
 *         warnings.warn(
*/
    __pyx_t_2 = __Pyx_PyLong_As_size_t(__pyx_v_v); if (unlikely((__pyx_t_2 == ((uintptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(1, 131, __pyx_L1_error)
    __pyx_v_c_ptr = ((void *)((uintptr_t)__pyx_t_2));

    /* "pyarrow/types.pxi":130
 *     cdef void* c_ptr
 *     cdef const char* capsule_name
 *     if isinstance(v, int):             # <<<<<<<<<<<<<<
 *         c_ptr = <void*> <uintptr_t > v
 *     elif isinstance(v, float):
*/
    goto __pyx_L3;
  }

  /* "pyarrow/types.pxi":132
 *     if isinstance(v, int):
 *         c_ptr = <void*> <uintptr_t > v
 *     elif isinstance(v, float):             # <<<<<<<<<<<<<<
 *         warnings.warn(
 *             "Passing a pointer value as a float is unsafe and only "
*/
  __pyx_t_1 = PyFloat_Check(__pyx_v_v); 
  if (__pyx_t_1) {

    /* "pyarrow/types.pxi":133
 *         c_ptr = <void*> <uintptr_t > v
 *     elif isinstance(v, float):
 *         warnings.warn(             # <<<<<<<<<<<<<<
 *             "Passing a pointer value as a float is unsafe and only "
 *             "supported for compatibility with older versions of the R "
*/
    __pyx_t_4 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_warnings); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 133, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_warn); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 133, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "pyarrow/types.pxi":136
 *             "Passing a pointer value as a float is unsafe and only "
 *             "supported for compatibility with older versions of the R "
 *             "Arrow library", UserWarning, stacklevel=2)             # <<<<<<<<<<<<<<
 *         c_ptr = <void*> <uintptr_t > v
 *     elif PyCapsule_CheckExact(v):
*/
    __pyx_t_7 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
      assert(__pyx_t_4);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
      __pyx_t_7 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[3 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Passing_a_pointer_value_as_a_flo, ((PyObject *)(((PyTypeObject*)PyExc_UserWarning)))};
      __pyx_t_5 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 133, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_stacklevel, __pyx_mstate_global->__pyx_int_2, __pyx_t_5, __pyx_callargs+3, 0) < (0)) __PYX_ERR(1, 133, __pyx_L1_error)
      __pyx_t_3 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_7, (3-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_5);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 133, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "pyarrow/types.pxi":137
 *             "supported for compatibility with older versions of the R "
 *             "Arrow library", UserWarning, stacklevel=2)
 *         c_ptr = <void*> <uintptr_t > v             # <<<<<<<<<<<<<<
 *     elif PyCapsule_CheckExact(v):
 *         # An R external pointer was how the R bindings passed pointer values to
*/
    __pyx_t_2 = __Pyx_PyLong_As_size_t(__pyx_v_v); if (unlikely((__pyx_t_2 == ((uintptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(1, 137, __pyx_L1_error)
    __pyx_v_c_ptr = ((void *)((uintptr_t)__pyx_t_2));

    /* "pyarrow/types.pxi":132
 *     if isinstance(v, int):
 *         c_ptr = <void*> <uintptr_t > v
 *     elif isinstance(v, float):             # <<<<<<<<<<<<<<
 *         warnings.warn(
 *             "Passing a pointer value as a float is unsafe and only "
*/
    goto __pyx_L3;
  }

  /* "pyarrow/types.pxi":138
 *             "Arrow library", UserWarning, stacklevel=2)
 *         c_ptr = <void*> <uintptr_t > v
 *     elif PyCapsule_CheckExact(v):             # <<<<<<<<<<<<<<
 *         # An R external pointer was how the R bindings passed pointer values to
 *         # Python from versions 7 to 15 (inclusive); however, the reticulate 1.35.0
*/
  __pyx_t_1 = PyCapsule_CheckExact(__pyx_v_v);
  if (likely(__pyx_t_1)) {

    /* "pyarrow/types.pxi":145
 *         # workaround ensures that old versions of the R package continue to work
 *         # with newer versions of pyarrow.
 *         capsule_name = PyCapsule_GetName(v)             # <<<<<<<<<<<<<<
 *         if capsule_name == NULL or capsule_name == b"r_extptr":
 *             c_ptr = PyCapsule_GetPointer(v, capsule_name)
*/
    __pyx_t_8 = PyCapsule_GetName(__pyx_v_v); if (unlikely(__pyx_t_8 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(1, 145, __pyx_L1_error)
    __pyx_v_capsule_name = __pyx_t_8;

    /* "pyarrow/types.pxi":146
 *         # with newer versions of pyarrow.
 *         capsule_name = PyCapsule_GetName(v)
 *         if capsule_name == NULL or capsule_name == b"r_extptr":             # <<<<<<<<<<<<<<
 *             c_ptr = PyCapsule_GetPointer(v, capsule_name)
 *         else:
*/
    __pyx_t_9 = (__pyx_v_capsule_name == NULL);
    if (!__pyx_t_9) {
    } else {
      __pyx_t_1 = __pyx_t_9;
      goto __pyx_L5_bool_binop_done;
    }
    __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_capsule_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 146, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_9 = (__Pyx_PyBytes_Equals(__pyx_t_3, __pyx_mstate_global->__pyx_n_b_r_extptr, Py_EQ)); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(1, 146, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_1 = __pyx_t_9;
    __pyx_L5_bool_binop_done:;
    if (likely(__pyx_t_1)) {

      /* "pyarrow/types.pxi":147
 *         capsule_name = PyCapsule_GetName(v)
 *         if capsule_name == NULL or capsule_name == b"r_extptr":
 *             c_ptr = PyCapsule_GetPointer(v, capsule_name)             # <<<<<<<<<<<<<<
 *         else:
 *             capsule_name_str = capsule_name.decode()
*/
      __pyx_t_10 = PyCapsule_GetPointer(__pyx_v_v, __pyx_v_capsule_name); if (unlikely(__pyx_t_10 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(1, 147, __pyx_L1_error)
      __pyx_v_c_ptr = __pyx_t_10;

      /* "pyarrow/types.pxi":146
 *         # with newer versions of pyarrow.
 *         capsule_name = PyCapsule_GetName(v)
 *         if capsule_name == NULL or capsule_name == b"r_extptr":             # <<<<<<<<<<<<<<
 *             c_ptr = PyCapsule_GetPointer(v, capsule_name)
 *         else:
*/
      goto __pyx_L4;
    }

    /* "pyarrow/types.pxi":149
 *             c_ptr = PyCapsule_GetPointer(v, capsule_name)
 *         else:
 *             capsule_name_str = capsule_name.decode()             # <<<<<<<<<<<<<<
 *             raise ValueError(
 *                 f"Can't convert PyCapsule with name '{capsule_name_str}' to pointer address"
*/
    /*else*/ {
      __pyx_t_11 = __Pyx_ssize_strlen(__pyx_v_capsule_name); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(1, 149, __pyx_L1_error)
      __pyx_t_3 = __Pyx_decode_c_string(__pyx_v_capsule_name, 0, __pyx_t_11, NULL, NULL, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 149, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_v_capsule_name_str = __pyx_t_3;
      __pyx_t_3 = 0;

      /* "pyarrow/types.pxi":150
 *         else:
 *             capsule_name_str = capsule_name.decode()
 *             raise ValueError(             # <<<<<<<<<<<<<<
 *                 f"Can't convert PyCapsule with name '{capsule_name_str}' to pointer address"
 *             )
*/
      __pyx_t_6 = NULL;

      /* "pyarrow/types.pxi":151
 *             capsule_name_str = capsule_name.decode()
 *             raise ValueError(
 *                 f"Can't convert PyCapsule with name '{capsule_name_str}' to pointer address"             # <<<<<<<<<<<<<<
 *             )
 *     else:
*/
      __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_v_capsule_name_str, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 151, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_12[0] = __pyx_mstate_global->__pyx_kp_u_Can_t_convert_PyCapsule_with_nam;
      __pyx_t_12[1] = __pyx_t_5;
      __pyx_t_12[2] = __pyx_mstate_global->__pyx_kp_u_to_pointer_address;
      __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_12, 3, 35 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + 20, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5));
      if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 151, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_7 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_4};
        __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 150, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      __Pyx_Raise(__pyx_t_3, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __PYX_ERR(1, 150, __pyx_L1_error)
    }
    __pyx_L4:;

    /* "pyarrow/types.pxi":138
 *             "Arrow library", UserWarning, stacklevel=2)
 *         c_ptr = <void*> <uintptr_t > v
 *     elif PyCapsule_CheckExact(v):             # <<<<<<<<<<<<<<
 *         # An R external pointer was how the R bindings passed pointer values to
 *         # Python from versions 7 to 15 (inclusive); however, the reticulate 1.35.0
*/
    goto __pyx_L3;
  }

  /* "pyarrow/types.pxi":154
 *             )
 *     else:
 *         raise TypeError(f"Expected a pointer value, got {type(v)!r}")             # <<<<<<<<<<<<<<
 *     if not allow_null and c_ptr == NULL:
 *         raise ValueError(f"Null pointer (value before cast = {v!r})")
*/
  /*else*/ {
    __pyx_t_4 = NULL;
    __pyx_t_6 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(((PyObject *)Py_TYPE(__pyx_v_v))), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 154, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_Expected_a_pointer_value_got, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 154, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_5};
      __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 154, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    }
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(1, 154, __pyx_L1_error)
  }
  __pyx_L3:;

  /* "pyarrow/types.pxi":155
 *     else:
 *         raise TypeError(f"Expected a pointer value, got {type(v)!r}")
 *     if not allow_null and c_ptr == NULL:             # <<<<<<<<<<<<<<
 *         raise ValueError(f"Null pointer (value before cast = {v!r})")
 *     return c_ptr
*/
  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_allow_null); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(1, 155, __pyx_L1_error)
  __pyx_t_13 = (!__pyx_t_9);
  if (__pyx_t_13) {
  } else {
    __pyx_t_1 = __pyx_t_13;
    goto __pyx_L8_bool_binop_done;
  }
  __pyx_t_13 = (__pyx_v_c_ptr == NULL);
  __pyx_t_1 = __pyx_t_13;
  __pyx_L8_bool_binop_done:;
  if (unlikely(__pyx_t_1)) {

    /* "pyarrow/types.pxi":156
 *         raise TypeError(f"Expected a pointer value, got {type(v)!r}")
 *     if not allow_null and c_ptr == NULL:
 *         raise ValueError(f"Null pointer (value before cast = {v!r})")             # <<<<<<<<<<<<<<
 *     return c_ptr
 * 
*/
    __pyx_t_5 = NULL;
    __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_v), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 156, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_12[0] = __pyx_mstate_global->__pyx_kp_u_Null_pointer_value_before_cast;
    __pyx_t_12[1] = __pyx_t_4;
    __pyx_t_12[2] = __pyx_mstate_global->__pyx_kp_u__7;
    __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_12, 3, 34 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4));
    if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 156, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_6};
      __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 156, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    }
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(1, 156, __pyx_L1_error)

    /* "pyarrow/types.pxi":155
 *     else:
 *         raise TypeError(f"Expected a pointer value, got {type(v)!r}")
 *     if not allow_null and c_ptr == NULL:             # <<<<<<<<<<<<<<
 *         raise ValueError(f"Null pointer (value before cast = {v!r})")
 *     return c_ptr
*/
  }

  /* "pyarrow/types.pxi":157
 *     if not allow_null and c_ptr == NULL:
 *         raise ValueError(f"Null pointer (value before cast = {v!r})")
 *     return c_ptr             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_r = __pyx_v_c_ptr;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":120
 * 
 * 
 * cdef void* _as_c_pointer(v, allow_null=False) except *:             # <<<<<<<<<<<<<<
 *     """
 *     Convert a Python object to a raw C pointer.
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pyarrow.lib._as_c_pointer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_capsule_name_str);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":160
 * 
 * 
 * def _is_primitive(Type type):             # <<<<<<<<<<<<<<
 *     # This is simply a redirect, the official API is in pyarrow.types.
 *     return is_primitive(type)
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_55_is_primitive(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_54_is_primitive, "_is_primitive(Type type)");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_55_is_primitive = {"_is_primitive", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_55_is_primitive, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_54_is_primitive};
static PyObject *__pyx_pw_7pyarrow_3lib_55_is_primitive(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  enum  arrow::Type::type __pyx_v_type;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_is_primitive (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_type,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 160, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 160, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_is_primitive", 0) < (0)) __PYX_ERR(1, 160, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_is_primitive", 1, 1, 1, i); __PYX_ERR(1, 160, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 160, __pyx_L3_error)
    }
    __pyx_v_type = ((enum  arrow::Type::type)__Pyx_PyLong_As_enum____arrow_3a__3a_Type_3a__3a_type(values[0])); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 160, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_is_primitive", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 160, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("pyarrow.lib._is_primitive", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyarrow_3lib_54_is_primitive(__pyx_self, __pyx_v_type);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7pyarrow_3lib_54_is_primitive(CYTHON_UNUSED PyObject *__pyx_self, enum  arrow::Type::type __pyx_v_type) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_is_primitive", 0);

  /* "pyarrow/types.pxi":162
 * def _is_primitive(Type type):
 *     # This is simply a redirect, the official API is in pyarrow.types.
 *     return is_primitive(type)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(arrow::is_primitive(__pyx_v_type)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 162, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":160
 * 
 * 
 * def _is_primitive(Type type):             # <<<<<<<<<<<<<<
 *     # This is simply a redirect, the official API is in pyarrow.types.
 *     return is_primitive(type)
*/

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

/* "pyarrow/types.pxi":165
 * 
 * 
 * def _get_pandas_type(arrow_type, coerce_to_ns=False):             # <<<<<<<<<<<<<<
 *     cdef Type type_id = arrow_type.id
 *     cdef dict pandas_type_map = _get_pandas_type_map()
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_57_get_pandas_type(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_56_get_pandas_type, "_get_pandas_type(arrow_type, coerce_to_ns=False)");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_57_get_pandas_type = {"_get_pandas_type", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_57_get_pandas_type, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_56_get_pandas_type};
static PyObject *__pyx_pw_7pyarrow_3lib_57_get_pandas_type(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_arrow_type = 0;
  PyObject *__pyx_v_coerce_to_ns = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_get_pandas_type (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_arrow_type,&__pyx_mstate_global->__pyx_n_u_coerce_to_ns,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 165, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 165, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 165, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_get_pandas_type", 0) < (0)) __PYX_ERR(1, 165, __pyx_L3_error)
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False)));
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_get_pandas_type", 0, 1, 2, i); __PYX_ERR(1, 165, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 165, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 165, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False)));
    }
    __pyx_v_arrow_type = values[0];
    __pyx_v_coerce_to_ns = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_get_pandas_type", 0, 1, 2, __pyx_nargs); __PYX_ERR(1, 165, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("pyarrow.lib._get_pandas_type", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyarrow_3lib_56_get_pandas_type(__pyx_self, __pyx_v_arrow_type, __pyx_v_coerce_to_ns);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7pyarrow_3lib_56_get_pandas_type(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_arrow_type, PyObject *__pyx_v_coerce_to_ns) {
  enum  arrow::Type::type __pyx_v_type_id;
  PyObject *__pyx_v_pandas_type_map = 0;
  PyObject *__pyx_v_pandas_type = NULL;
  PyObject *__pyx_v_unit = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  enum  arrow::Type::type __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_get_pandas_type", 0);

  /* "pyarrow/types.pxi":166
 * 
 * def _get_pandas_type(arrow_type, coerce_to_ns=False):
 *     cdef Type type_id = arrow_type.id             # <<<<<<<<<<<<<<
 *     cdef dict pandas_type_map = _get_pandas_type_map()
 *     if type_id not in pandas_type_map:
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_arrow_type, __pyx_mstate_global->__pyx_n_u_id); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 166, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = ((enum  arrow::Type::type)__Pyx_PyLong_As_enum____arrow_3a__3a_Type_3a__3a_type(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 166, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_type_id = __pyx_t_2;

  /* "pyarrow/types.pxi":167
 * def _get_pandas_type(arrow_type, coerce_to_ns=False):
 *     cdef Type type_id = arrow_type.id
 *     cdef dict pandas_type_map = _get_pandas_type_map()             # <<<<<<<<<<<<<<
 *     if type_id not in pandas_type_map:
 *         return None
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_get_pandas_type_map); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 167, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 167, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(PyDict_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("dict", __pyx_t_1))) __PYX_ERR(1, 167, __pyx_L1_error)
  __pyx_v_pandas_type_map = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyarrow/types.pxi":168
 *     cdef Type type_id = arrow_type.id
 *     cdef dict pandas_type_map = _get_pandas_type_map()
 *     if type_id not in pandas_type_map:             # <<<<<<<<<<<<<<
 *         return None
 *     if coerce_to_ns:
*/
  __pyx_t_1 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type(__pyx_v_type_id); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 168, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely(__pyx_v_pandas_type_map == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    __PYX_ERR(1, 168, __pyx_L1_error)
  }
  __pyx_t_6 = (__Pyx_PyDict_ContainsTF(__pyx_t_1, __pyx_v_pandas_type_map, Py_NE)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(1, 168, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_6) {

    /* "pyarrow/types.pxi":169
 *     cdef dict pandas_type_map = _get_pandas_type_map()
 *     if type_id not in pandas_type_map:
 *         return None             # <<<<<<<<<<<<<<
 *     if coerce_to_ns:
 *         # ARROW-3789: Coerce date/timestamp types to datetime64[ns]
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "pyarrow/types.pxi":168
 *     cdef Type type_id = arrow_type.id
 *     cdef dict pandas_type_map = _get_pandas_type_map()
 *     if type_id not in pandas_type_map:             # <<<<<<<<<<<<<<
 *         return None
 *     if coerce_to_ns:
*/
  }

  /* "pyarrow/types.pxi":170
 *     if type_id not in pandas_type_map:
 *         return None
 *     if coerce_to_ns:             # <<<<<<<<<<<<<<
 *         # ARROW-3789: Coerce date/timestamp types to datetime64[ns]
 *         if type_id == _Type_DURATION:
*/
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_coerce_to_ns); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(1, 170, __pyx_L1_error)
  if (__pyx_t_6) {

    /* "pyarrow/types.pxi":172
 *     if coerce_to_ns:
 *         # ARROW-3789: Coerce date/timestamp types to datetime64[ns]
 *         if type_id == _Type_DURATION:             # <<<<<<<<<<<<<<
 *             return np.dtype('timedelta64[ns]')
 *         return np.dtype('datetime64[ns]')
*/
    __pyx_t_6 = (__pyx_v_type_id ==  arrow::Type::DURATION);
    if (__pyx_t_6) {

      /* "pyarrow/types.pxi":173
 *         # ARROW-3789: Coerce date/timestamp types to datetime64[ns]
 *         if type_id == _Type_DURATION:
 *             return np.dtype('timedelta64[ns]')             # <<<<<<<<<<<<<<
 *         return np.dtype('datetime64[ns]')
 *     pandas_type = pandas_type_map[type_id]
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_4 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 173, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_dtype); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 173, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_5 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_7);
        assert(__pyx_t_4);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
        __pyx_t_5 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_timedelta64_ns};
        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 173, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/types.pxi":172
 *     if coerce_to_ns:
 *         # ARROW-3789: Coerce date/timestamp types to datetime64[ns]
 *         if type_id == _Type_DURATION:             # <<<<<<<<<<<<<<
 *             return np.dtype('timedelta64[ns]')
 *         return np.dtype('datetime64[ns]')
*/
    }

    /* "pyarrow/types.pxi":174
 *         if type_id == _Type_DURATION:
 *             return np.dtype('timedelta64[ns]')
 *         return np.dtype('datetime64[ns]')             # <<<<<<<<<<<<<<
 *     pandas_type = pandas_type_map[type_id]
 *     if isinstance(pandas_type, dict):
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 174, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_dtype); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 174, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_5 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3);
      assert(__pyx_t_7);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
      __pyx_t_5 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_datetime64_ns};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 174, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "pyarrow/types.pxi":170
 *     if type_id not in pandas_type_map:
 *         return None
 *     if coerce_to_ns:             # <<<<<<<<<<<<<<
 *         # ARROW-3789: Coerce date/timestamp types to datetime64[ns]
 *         if type_id == _Type_DURATION:
*/
  }

  /* "pyarrow/types.pxi":175
 *             return np.dtype('timedelta64[ns]')
 *         return np.dtype('datetime64[ns]')
 *     pandas_type = pandas_type_map[type_id]             # <<<<<<<<<<<<<<
 *     if isinstance(pandas_type, dict):
 *         unit = getattr(arrow_type, 'unit', None)
*/
  if (unlikely(__pyx_v_pandas_type_map == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 175, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type(__pyx_v_type_id); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 175, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_pandas_type_map, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 175, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_pandas_type = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "pyarrow/types.pxi":176
 *         return np.dtype('datetime64[ns]')
 *     pandas_type = pandas_type_map[type_id]
 *     if isinstance(pandas_type, dict):             # <<<<<<<<<<<<<<
 *         unit = getattr(arrow_type, 'unit', None)
 *         pandas_type = pandas_type.get(unit, None)
*/
  __pyx_t_6 = PyDict_Check(__pyx_v_pandas_type); 
  if (__pyx_t_6) {

    /* "pyarrow/types.pxi":177
 *     pandas_type = pandas_type_map[type_id]
 *     if isinstance(pandas_type, dict):
 *         unit = getattr(arrow_type, 'unit', None)             # <<<<<<<<<<<<<<
 *         pandas_type = pandas_type.get(unit, None)
 *     return pandas_type
*/
    __pyx_t_3 = __Pyx_GetAttr3(__pyx_v_arrow_type, __pyx_mstate_global->__pyx_n_u_unit, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 177, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_unit = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "pyarrow/types.pxi":178
 *     if isinstance(pandas_type, dict):
 *         unit = getattr(arrow_type, 'unit', None)
 *         pandas_type = pandas_type.get(unit, None)             # <<<<<<<<<<<<<<
 *     return pandas_type
 * 
*/
    __pyx_t_1 = __pyx_v_pandas_type;
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_5 = 0;
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_1, __pyx_v_unit, Py_None};
      __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 178, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    }
    __Pyx_DECREF_SET(__pyx_v_pandas_type, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "pyarrow/types.pxi":176
 *         return np.dtype('datetime64[ns]')
 *     pandas_type = pandas_type_map[type_id]
 *     if isinstance(pandas_type, dict):             # <<<<<<<<<<<<<<
 *         unit = getattr(arrow_type, 'unit', None)
 *         pandas_type = pandas_type.get(unit, None)
*/
  }

  /* "pyarrow/types.pxi":179
 *         unit = getattr(arrow_type, 'unit', None)
 *         pandas_type = pandas_type.get(unit, None)
 *     return pandas_type             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_pandas_type);
  __pyx_r = __pyx_v_pandas_type;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":165
 * 
 * 
 * def _get_pandas_type(arrow_type, coerce_to_ns=False):             # <<<<<<<<<<<<<<
 *     cdef Type type_id = arrow_type.id
 *     cdef dict pandas_type_map = _get_pandas_type_map()
*/

  /* 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_AddTraceback("pyarrow.lib._get_pandas_type", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pandas_type_map);
  __Pyx_XDECREF(__pyx_v_pandas_type);
  __Pyx_XDECREF(__pyx_v_unit);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":182
 * 
 * 
 * def _get_pandas_tz_type(arrow_type, coerce_to_ns=False):             # <<<<<<<<<<<<<<
 *     from pyarrow.pandas_compat import make_datetimetz
 *     unit = 'ns' if coerce_to_ns else arrow_type.unit
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_59_get_pandas_tz_type(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_58_get_pandas_tz_type, "_get_pandas_tz_type(arrow_type, coerce_to_ns=False)");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_59_get_pandas_tz_type = {"_get_pandas_tz_type", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_59_get_pandas_tz_type, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_58_get_pandas_tz_type};
static PyObject *__pyx_pw_7pyarrow_3lib_59_get_pandas_tz_type(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_arrow_type = 0;
  PyObject *__pyx_v_coerce_to_ns = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_get_pandas_tz_type (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_arrow_type,&__pyx_mstate_global->__pyx_n_u_coerce_to_ns,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 182, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 182, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 182, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_get_pandas_tz_type", 0) < (0)) __PYX_ERR(1, 182, __pyx_L3_error)
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False)));
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_get_pandas_tz_type", 0, 1, 2, i); __PYX_ERR(1, 182, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 182, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 182, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False)));
    }
    __pyx_v_arrow_type = values[0];
    __pyx_v_coerce_to_ns = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_get_pandas_tz_type", 0, 1, 2, __pyx_nargs); __PYX_ERR(1, 182, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("pyarrow.lib._get_pandas_tz_type", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyarrow_3lib_58_get_pandas_tz_type(__pyx_self, __pyx_v_arrow_type, __pyx_v_coerce_to_ns);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7pyarrow_3lib_58_get_pandas_tz_type(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_arrow_type, PyObject *__pyx_v_coerce_to_ns) {
  PyObject *__pyx_v_make_datetimetz = NULL;
  PyObject *__pyx_v_unit = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_get_pandas_tz_type", 0);

  /* "pyarrow/types.pxi":183
 * 
 * def _get_pandas_tz_type(arrow_type, coerce_to_ns=False):
 *     from pyarrow.pandas_compat import make_datetimetz             # <<<<<<<<<<<<<<
 *     unit = 'ns' if coerce_to_ns else arrow_type.unit
 *     return make_datetimetz(unit, arrow_type.tz)
*/
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_make_datetimetz};
    __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_pyarrow_pandas_compat, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 183, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_make_datetimetz};
    __pyx_t_3 = 0; {
      __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_1, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 183, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      switch (__pyx_t_3) {
        case 0:
        __Pyx_INCREF(__pyx_t_4);
        __pyx_v_make_datetimetz = __pyx_t_4;
        break;
        default:;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyarrow/types.pxi":184
 * def _get_pandas_tz_type(arrow_type, coerce_to_ns=False):
 *     from pyarrow.pandas_compat import make_datetimetz
 *     unit = 'ns' if coerce_to_ns else arrow_type.unit             # <<<<<<<<<<<<<<
 *     return make_datetimetz(unit, arrow_type.tz)
 * 
*/
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_coerce_to_ns); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(1, 184, __pyx_L1_error)
  if (__pyx_t_5) {
    __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_ns);
    __pyx_t_1 = __pyx_mstate_global->__pyx_n_u_ns;
  } else {
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_arrow_type, __pyx_mstate_global->__pyx_n_u_unit); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 184, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = __pyx_t_4;
    __pyx_t_4 = 0;
  }
  __pyx_v_unit = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyarrow/types.pxi":185
 *     from pyarrow.pandas_compat import make_datetimetz
 *     unit = 'ns' if coerce_to_ns else arrow_type.unit
 *     return make_datetimetz(unit, arrow_type.tz)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = NULL;
  __Pyx_INCREF(__pyx_v_make_datetimetz);
  __pyx_t_6 = __pyx_v_make_datetimetz; 
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_arrow_type, __pyx_mstate_global->__pyx_n_u_tz); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 185, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_v_unit, __pyx_t_7};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_8, (3-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 185, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":182
 * 
 * 
 * def _get_pandas_tz_type(arrow_type, coerce_to_ns=False):             # <<<<<<<<<<<<<<
 *     from pyarrow.pandas_compat import make_datetimetz
 *     unit = 'ns' if coerce_to_ns else arrow_type.unit
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("pyarrow.lib._get_pandas_tz_type", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_make_datetimetz);
  __Pyx_XDECREF(__pyx_v_unit);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":188
 * 
 * 
 * def _to_pandas_dtype(arrow_type, options=None):             # <<<<<<<<<<<<<<
 *     coerce_to_ns = (options and options.get('coerce_temporal_nanoseconds', False)) or (
 *         _pandas_api.is_v1() and arrow_type.id in
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_61_to_pandas_dtype(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_60_to_pandas_dtype, "_to_pandas_dtype(arrow_type, options=None)");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_61_to_pandas_dtype = {"_to_pandas_dtype", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_61_to_pandas_dtype, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_60_to_pandas_dtype};
static PyObject *__pyx_pw_7pyarrow_3lib_61_to_pandas_dtype(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_arrow_type = 0;
  PyObject *__pyx_v_options = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_to_pandas_dtype (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_arrow_type,&__pyx_mstate_global->__pyx_n_u_options,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 188, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 188, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 188, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_to_pandas_dtype", 0) < (0)) __PYX_ERR(1, 188, __pyx_L3_error)
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_to_pandas_dtype", 0, 1, 2, i); __PYX_ERR(1, 188, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 188, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 188, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_arrow_type = values[0];
    __pyx_v_options = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_to_pandas_dtype", 0, 1, 2, __pyx_nargs); __PYX_ERR(1, 188, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("pyarrow.lib._to_pandas_dtype", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyarrow_3lib_60_to_pandas_dtype(__pyx_self, __pyx_v_arrow_type, __pyx_v_options);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7pyarrow_3lib_60_to_pandas_dtype(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_arrow_type, PyObject *__pyx_v_options) {
  PyObject *__pyx_v_coerce_to_ns = NULL;
  PyObject *__pyx_v_dtype = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  size_t __pyx_t_7;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_to_pandas_dtype", 0);

  /* "pyarrow/types.pxi":189
 * 
 * def _to_pandas_dtype(arrow_type, options=None):
 *     coerce_to_ns = (options and options.get('coerce_temporal_nanoseconds', False)) or (             # <<<<<<<<<<<<<<
 *         _pandas_api.is_v1() and arrow_type.id in
 *         [_Type_DATE32, _Type_DATE64, _Type_TIMESTAMP, _Type_DURATION])
*/
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_options); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(1, 189, __pyx_L1_error)
  if (!__pyx_t_2) {
    goto __pyx_L4_next_or;
  } else {
  }
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_options, __pyx_mstate_global->__pyx_n_u_get); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 189, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_mstate_global->__pyx_tuple[1], NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 189, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(1, 189, __pyx_L1_error)
  if (!__pyx_t_2) {
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else {
    __Pyx_INCREF(__pyx_t_4);
    __pyx_t_1 = __pyx_t_4;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_L4_next_or:;

  /* "pyarrow/types.pxi":190
 * def _to_pandas_dtype(arrow_type, options=None):
 *     coerce_to_ns = (options and options.get('coerce_temporal_nanoseconds', False)) or (
 *         _pandas_api.is_v1() and arrow_type.id in             # <<<<<<<<<<<<<<
 *         [_Type_DATE32, _Type_DATE64, _Type_TIMESTAMP, _Type_DURATION])
 * 
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pandas_api); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 190, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_is_v1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 190, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_7 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
    __pyx_t_7 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 190, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(1, 190, __pyx_L1_error)
  if (__pyx_t_2) {
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else {
    __Pyx_INCREF(__pyx_t_4);
    __pyx_t_1 = __pyx_t_4;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_arrow_type, __pyx_mstate_global->__pyx_n_u_id); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 190, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "pyarrow/types.pxi":191
 *     coerce_to_ns = (options and options.get('coerce_temporal_nanoseconds', False)) or (
 *         _pandas_api.is_v1() and arrow_type.id in
 *         [_Type_DATE32, _Type_DATE64, _Type_TIMESTAMP, _Type_DURATION])             # <<<<<<<<<<<<<<
 * 
 *     if getattr(arrow_type, 'tz', None):
*/
  __pyx_t_6 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::DATE32); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 191, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_4, __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 190, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyarrow/types.pxi":190
 * def _to_pandas_dtype(arrow_type, options=None):
 *     coerce_to_ns = (options and options.get('coerce_temporal_nanoseconds', False)) or (
 *         _pandas_api.is_v1() and arrow_type.id in             # <<<<<<<<<<<<<<
 *         [_Type_DATE32, _Type_DATE64, _Type_TIMESTAMP, _Type_DURATION])
 * 
*/
  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(1, 190, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (!__pyx_t_8) {
  } else {
    __pyx_t_2 = __pyx_t_8;
    goto __pyx_L7_bool_binop_done;
  }

  /* "pyarrow/types.pxi":191
 *     coerce_to_ns = (options and options.get('coerce_temporal_nanoseconds', False)) or (
 *         _pandas_api.is_v1() and arrow_type.id in
 *         [_Type_DATE32, _Type_DATE64, _Type_TIMESTAMP, _Type_DURATION])             # <<<<<<<<<<<<<<
 * 
 *     if getattr(arrow_type, 'tz', None):
*/
  __pyx_t_3 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::DATE64); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 191, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = PyObject_RichCompare(__pyx_t_4, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 190, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pyarrow/types.pxi":190
 * def _to_pandas_dtype(arrow_type, options=None):
 *     coerce_to_ns = (options and options.get('coerce_temporal_nanoseconds', False)) or (
 *         _pandas_api.is_v1() and arrow_type.id in             # <<<<<<<<<<<<<<
 *         [_Type_DATE32, _Type_DATE64, _Type_TIMESTAMP, _Type_DURATION])
 * 
*/
  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(1, 190, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (!__pyx_t_8) {
  } else {
    __pyx_t_2 = __pyx_t_8;
    goto __pyx_L7_bool_binop_done;
  }

  /* "pyarrow/types.pxi":191
 *     coerce_to_ns = (options and options.get('coerce_temporal_nanoseconds', False)) or (
 *         _pandas_api.is_v1() and arrow_type.id in
 *         [_Type_DATE32, _Type_DATE64, _Type_TIMESTAMP, _Type_DURATION])             # <<<<<<<<<<<<<<
 * 
 *     if getattr(arrow_type, 'tz', None):
*/
  __pyx_t_6 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::TIMESTAMP); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 191, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_4, __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 190, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyarrow/types.pxi":190
 * def _to_pandas_dtype(arrow_type, options=None):
 *     coerce_to_ns = (options and options.get('coerce_temporal_nanoseconds', False)) or (
 *         _pandas_api.is_v1() and arrow_type.id in             # <<<<<<<<<<<<<<
 *         [_Type_DATE32, _Type_DATE64, _Type_TIMESTAMP, _Type_DURATION])
 * 
*/
  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(1, 190, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (!__pyx_t_8) {
  } else {
    __pyx_t_2 = __pyx_t_8;
    goto __pyx_L7_bool_binop_done;
  }

  /* "pyarrow/types.pxi":191
 *     coerce_to_ns = (options and options.get('coerce_temporal_nanoseconds', False)) or (
 *         _pandas_api.is_v1() and arrow_type.id in
 *         [_Type_DATE32, _Type_DATE64, _Type_TIMESTAMP, _Type_DURATION])             # <<<<<<<<<<<<<<
 * 
 *     if getattr(arrow_type, 'tz', None):
*/
  __pyx_t_3 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::DURATION); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 191, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = PyObject_RichCompare(__pyx_t_4, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 190, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pyarrow/types.pxi":190
 * def _to_pandas_dtype(arrow_type, options=None):
 *     coerce_to_ns = (options and options.get('coerce_temporal_nanoseconds', False)) or (
 *         _pandas_api.is_v1() and arrow_type.id in             # <<<<<<<<<<<<<<
 *         [_Type_DATE32, _Type_DATE64, _Type_TIMESTAMP, _Type_DURATION])
 * 
*/
  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(1, 190, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_2 = __pyx_t_8;
  __pyx_L7_bool_binop_done:;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_8 = __pyx_t_2;
  __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 190, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = __pyx_t_4;
  __pyx_t_4 = 0;
  __pyx_L3_bool_binop_done:;
  __pyx_v_coerce_to_ns = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyarrow/types.pxi":193
 *         [_Type_DATE32, _Type_DATE64, _Type_TIMESTAMP, _Type_DURATION])
 * 
 *     if getattr(arrow_type, 'tz', None):             # <<<<<<<<<<<<<<
 *         dtype = _get_pandas_tz_type(arrow_type, coerce_to_ns)
 *     else:
*/
  __pyx_t_1 = __Pyx_GetAttr3(__pyx_v_arrow_type, __pyx_mstate_global->__pyx_n_u_tz, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 193, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(1, 193, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_8) {

    /* "pyarrow/types.pxi":194
 * 
 *     if getattr(arrow_type, 'tz', None):
 *         dtype = _get_pandas_tz_type(arrow_type, coerce_to_ns)             # <<<<<<<<<<<<<<
 *     else:
 *         dtype = _get_pandas_type(arrow_type, coerce_to_ns)
*/
    __pyx_t_4 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_get_pandas_tz_type); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 194, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
      assert(__pyx_t_4);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
      __pyx_t_7 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_v_arrow_type, __pyx_v_coerce_to_ns};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_7, (3-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 194, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __pyx_v_dtype = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "pyarrow/types.pxi":193
 *         [_Type_DATE32, _Type_DATE64, _Type_TIMESTAMP, _Type_DURATION])
 * 
 *     if getattr(arrow_type, 'tz', None):             # <<<<<<<<<<<<<<
 *         dtype = _get_pandas_tz_type(arrow_type, coerce_to_ns)
 *     else:
*/
    goto __pyx_L11;
  }

  /* "pyarrow/types.pxi":196
 *         dtype = _get_pandas_tz_type(arrow_type, coerce_to_ns)
 *     else:
 *         dtype = _get_pandas_type(arrow_type, coerce_to_ns)             # <<<<<<<<<<<<<<
 * 
 *     if not dtype:
*/
  /*else*/ {
    __pyx_t_6 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_get_pandas_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 196, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_7 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
      assert(__pyx_t_6);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
      __pyx_t_7 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_6, __pyx_v_arrow_type, __pyx_v_coerce_to_ns};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_7, (3-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 196, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __pyx_v_dtype = __pyx_t_1;
    __pyx_t_1 = 0;
  }
  __pyx_L11:;

  /* "pyarrow/types.pxi":198
 *         dtype = _get_pandas_type(arrow_type, coerce_to_ns)
 * 
 *     if not dtype:             # <<<<<<<<<<<<<<
 *         raise NotImplementedError(str(arrow_type))
 * 
*/
  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_dtype); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(1, 198, __pyx_L1_error)
  __pyx_t_2 = (!__pyx_t_8);
  if (unlikely(__pyx_t_2)) {

    /* "pyarrow/types.pxi":199
 * 
 *     if not dtype:
 *         raise NotImplementedError(str(arrow_type))             # <<<<<<<<<<<<<<
 * 
 *     return dtype
*/
    __pyx_t_4 = NULL;
    __pyx_t_6 = __Pyx_PyObject_Unicode(__pyx_v_arrow_type); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 199, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_6};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_NotImplementedError)), __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 199, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(1, 199, __pyx_L1_error)

    /* "pyarrow/types.pxi":198
 *         dtype = _get_pandas_type(arrow_type, coerce_to_ns)
 * 
 *     if not dtype:             # <<<<<<<<<<<<<<
 *         raise NotImplementedError(str(arrow_type))
 * 
*/
  }

  /* "pyarrow/types.pxi":201
 *         raise NotImplementedError(str(arrow_type))
 * 
 *     return dtype             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_dtype);
  __pyx_r = __pyx_v_dtype;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":188
 * 
 * 
 * def _to_pandas_dtype(arrow_type, options=None):             # <<<<<<<<<<<<<<
 *     coerce_to_ns = (options and options.get('coerce_temporal_nanoseconds', False)) or (
 *         _pandas_api.is_v1() and arrow_type.id in
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pyarrow.lib._to_pandas_dtype", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_coerce_to_ns);
  __Pyx_XDECREF(__pyx_v_dtype);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":224
 *     """
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         pass
 * 
*/

/* Python wrapper */
static int __pyx_pw_7pyarrow_3lib_8DataType_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_7pyarrow_3lib_8DataType_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, __pyx_nargs); return -1; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return -1;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__cinit__", __pyx_kwds); return -1;}
  __pyx_r = __pyx_pf_7pyarrow_3lib_8DataType___cinit__(((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_v_self));

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

static int __pyx_pf_7pyarrow_3lib_8DataType___cinit__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v_self) {
  int __pyx_r;

  /* function exit code */
  __pyx_r = 0;
  return __pyx_r;
}

/* "pyarrow/types.pxi":227
 *         pass
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         raise TypeError(f"Do not call {self.__class__.__name__}'s constructor directly, use public "
 *                         "functions like pyarrow.int64, pyarrow.list_, etc. "
*/

/* Python wrapper */
static int __pyx_pw_7pyarrow_3lib_8DataType_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_7pyarrow_3lib_8DataType_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, __pyx_nargs); return -1; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return -1;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__init__", __pyx_kwds); return -1;}
  __pyx_r = __pyx_pf_7pyarrow_3lib_8DataType_2__init__(((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_v_self));

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

static int __pyx_pf_7pyarrow_3lib_8DataType_2__init__(struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5[3];
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "pyarrow/types.pxi":228
 * 
 *     def __init__(self):
 *         raise TypeError(f"Do not call {self.__class__.__name__}'s constructor directly, use public "             # <<<<<<<<<<<<<<
 *                         "functions like pyarrow.int64, pyarrow.list_, etc. "
 *                         "instead.")
*/
  __pyx_t_2 = NULL;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 228, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_name_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 228, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 228, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_5[0] = __pyx_mstate_global->__pyx_kp_u_Do_not_call;
  __pyx_t_5[1] = __pyx_t_3;
  __pyx_t_5[2] = __pyx_mstate_global->__pyx_kp_u_s_constructor_directly_use_publ;
  __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_5, 3, 12 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + 94, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3));
  if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 228, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 228, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 228, __pyx_L1_error)

  /* "pyarrow/types.pxi":227
 *         pass
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         raise TypeError(f"Do not call {self.__class__.__name__}'s constructor directly, use public "
 *                         "functions like pyarrow.int64, pyarrow.list_, etc. "
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pyarrow.lib.DataType.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":232
 *                         "instead.")
 * 
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:             # <<<<<<<<<<<<<<
 *         assert type != nullptr
 *         self.sp_type = type
*/

static void __pyx_f_7pyarrow_3lib_8DataType_init(struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v_self, std::shared_ptr< arrow::DataType>  const &__pyx_v_type) {
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("init", 0);

  /* "pyarrow/types.pxi":233
 * 
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:
 *         assert type != nullptr             # <<<<<<<<<<<<<<
 *         self.sp_type = type
 *         self.type = type.get()
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_1 = ((__pyx_v_type != nullptr) != 0);
    if (unlikely(!__pyx_t_1)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(1, 233, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(1, 233, __pyx_L1_error)
  #endif

  /* "pyarrow/types.pxi":234
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:
 *         assert type != nullptr
 *         self.sp_type = type             # <<<<<<<<<<<<<<
 *         self.type = type.get()
 *         self.pep3118_format = _datatype_to_pep3118(self.type)
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_type");
    __PYX_ERR(1, 234, __pyx_L1_error)
  }
  __pyx_v_self->sp_type = __pyx_v_type;

  /* "pyarrow/types.pxi":235
 *         assert type != nullptr
 *         self.sp_type = type
 *         self.type = type.get()             # <<<<<<<<<<<<<<
 *         self.pep3118_format = _datatype_to_pep3118(self.type)
 * 
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "type");
    __PYX_ERR(1, 235, __pyx_L1_error)
  }
  __pyx_v_self->type = __pyx_v_type.get();

  /* "pyarrow/types.pxi":236
 *         self.sp_type = type
 *         self.type = type.get()
 *         self.pep3118_format = _datatype_to_pep3118(self.type)             # <<<<<<<<<<<<<<
 * 
 *     cpdef Field field(self, i):
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "type");
    __PYX_ERR(1, 236, __pyx_L1_error)
  }
  __pyx_t_2 = __pyx_f_7pyarrow_3lib__datatype_to_pep3118(__pyx_v_self->type); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 236, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "pep3118_format");
    __PYX_ERR(1, 236, __pyx_L1_error)
  }
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->pep3118_format);
  __Pyx_DECREF(__pyx_v_self->pep3118_format);
  __pyx_v_self->pep3118_format = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pyarrow/types.pxi":232
 *                         "instead.")
 * 
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:             # <<<<<<<<<<<<<<
 *         assert type != nullptr
 *         self.sp_type = type
*/

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pyarrow.lib.DataType.init", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* "pyarrow/types.pxi":238
 *         self.pep3118_format = _datatype_to_pep3118(self.type)
 * 
 *     cpdef Field field(self, i):             # <<<<<<<<<<<<<<
 *         """
 *         Parameters
*/

static PyObject *__pyx_pw_7pyarrow_3lib_8DataType_5field(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_7pyarrow_3lib_Field *__pyx_f_7pyarrow_3lib_8DataType_field(struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v_self, PyObject *__pyx_v_i, int __pyx_skip_dispatch) {
  int __pyx_v_index;
  struct __pyx_obj_7pyarrow_3lib_Field *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  PyObject *__pyx_t_8[3];
  Py_ssize_t __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("field", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_field); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 238, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7pyarrow_3lib_8DataType_5field)) {
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_i};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 238, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Field))))) __PYX_ERR(1, 238, __pyx_L1_error)
        __pyx_r = ((struct __pyx_obj_7pyarrow_3lib_Field *)__pyx_t_2);
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyarrow/types.pxi":248
 *         pyarrow.Field
 *         """
 *         if not isinstance(i, int):             # <<<<<<<<<<<<<<
 *             raise TypeError(f"Expected int index, got type '{type(i)}'")
 *         cdef int index = <int> _normalize_index(i, self.type.num_fields())
*/
  __pyx_t_6 = PyLong_Check(__pyx_v_i); 
  __pyx_t_7 = (!__pyx_t_6);
  if (unlikely(__pyx_t_7)) {

    /* "pyarrow/types.pxi":249
 *         """
 *         if not isinstance(i, int):
 *             raise TypeError(f"Expected int index, got type '{type(i)}'")             # <<<<<<<<<<<<<<
 *         cdef int index = <int> _normalize_index(i, self.type.num_fields())
 *         return pyarrow_wrap_field(self.type.field(index))
*/
    __pyx_t_2 = NULL;
    __pyx_t_4 = __Pyx_PyObject_FormatSimple(((PyObject *)Py_TYPE(__pyx_v_i)), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 249, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_8[0] = __pyx_mstate_global->__pyx_kp_u_Expected_int_index_got_type;
    __pyx_t_8[1] = __pyx_t_4;
    __pyx_t_8[2] = __pyx_mstate_global->__pyx_kp_u__8;
    __pyx_t_3 = __Pyx_PyUnicode_Join(__pyx_t_8, 3, 30 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4));
    if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 249, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 249, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(1, 249, __pyx_L1_error)

    /* "pyarrow/types.pxi":248
 *         pyarrow.Field
 *         """
 *         if not isinstance(i, int):             # <<<<<<<<<<<<<<
 *             raise TypeError(f"Expected int index, got type '{type(i)}'")
 *         cdef int index = <int> _normalize_index(i, self.type.num_fields())
*/
  }

  /* "pyarrow/types.pxi":250
 *         if not isinstance(i, int):
 *             raise TypeError(f"Expected int index, got type '{type(i)}'")
 *         cdef int index = <int> _normalize_index(i, self.type.num_fields())             # <<<<<<<<<<<<<<
 *         return pyarrow_wrap_field(self.type.field(index))
 * 
*/
  __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 250, __pyx_L1_error)
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "type");
    __PYX_ERR(1, 250, __pyx_L1_error)
  }
  __pyx_t_10 = __pyx_f_7pyarrow_3lib__normalize_index(__pyx_t_9, __pyx_v_self->type->num_fields()); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1L))) __PYX_ERR(1, 250, __pyx_L1_error)
  __pyx_v_index = ((int)__pyx_t_10);

  /* "pyarrow/types.pxi":251
 *             raise TypeError(f"Expected int index, got type '{type(i)}'")
 *         cdef int index = <int> _normalize_index(i, self.type.num_fields())
 *         return pyarrow_wrap_field(self.type.field(index))             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "type");
    __PYX_ERR(1, 251, __pyx_L1_error)
  }
  __pyx_t_1 = pyarrow_wrap_field(__pyx_v_self->type->field(__pyx_v_index)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 251, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Field))))) __PYX_ERR(1, 251, __pyx_L1_error)
  __pyx_r = ((struct __pyx_obj_7pyarrow_3lib_Field *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":238
 *         self.pep3118_format = _datatype_to_pep3118(self.type)
 * 
 *     cpdef Field field(self, i):             # <<<<<<<<<<<<<<
 *         """
 *         Parameters
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pyarrow.lib.DataType.field", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_8DataType_5field(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_8DataType_4field, "DataType.field(self, i) -> Field\n\nParameters\n----------\ni : int\n\nReturns\n-------\npyarrow.Field");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_8DataType_5field = {"field", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_8DataType_5field, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_8DataType_4field};
static PyObject *__pyx_pw_7pyarrow_3lib_8DataType_5field(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_i = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("field (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_i,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 238, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 238, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "field", 0) < (0)) __PYX_ERR(1, 238, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("field", 1, 1, 1, i); __PYX_ERR(1, 238, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 238, __pyx_L3_error)
    }
    __pyx_v_i = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("field", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 238, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("pyarrow.lib.DataType.field", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyarrow_3lib_8DataType_4field(((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_v_self), __pyx_v_i);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7pyarrow_3lib_8DataType_4field(struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v_self, PyObject *__pyx_v_i) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("field", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_7pyarrow_3lib_8DataType_field(__pyx_v_self, __pyx_v_i, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 238, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib.DataType.field", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":253
 *         return pyarrow_wrap_field(self.type.field(index))
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def id(self):
 *         return self.type.id()
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_8DataType_2id_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_8DataType_2id_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_8DataType_2id___get__(((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_8DataType_2id___get__(struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyarrow/types.pxi":255
 *     @property
 *     def id(self):
 *         return self.type.id()             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "type");
    __PYX_ERR(1, 255, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type(__pyx_v_self->type->id()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 255, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":253
 *         return pyarrow_wrap_field(self.type.field(index))
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def id(self):
 *         return self.type.id()
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib.DataType.id.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":257
 *         return self.type.id()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def bit_width(self):
 *         """
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_8DataType_9bit_width_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_8DataType_9bit_width_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_8DataType_9bit_width___get__(((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_8DataType_9bit_width___get__(struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v_self) {
  __pyx_t_7pyarrow_3lib__CFixedWidthTypePtr __pyx_v_ty;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __pyx_t_7pyarrow_3lib__CFixedWidthTypePtr __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyarrow/types.pxi":271
 *         """
 *         cdef _CFixedWidthTypePtr ty
 *         ty = dynamic_cast[_CFixedWidthTypePtr](self.type)             # <<<<<<<<<<<<<<
 *         if ty == nullptr:
 *             raise ValueError("Non-fixed width type")
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "type");
    __PYX_ERR(1, 271, __pyx_L1_error)
  }
  try {
    __pyx_t_1 = dynamic_cast<__pyx_t_7pyarrow_3lib__CFixedWidthTypePtr>(__pyx_v_self->type);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 271, __pyx_L1_error)
  }
  __pyx_v_ty = __pyx_t_1;

  /* "pyarrow/types.pxi":272
 *         cdef _CFixedWidthTypePtr ty
 *         ty = dynamic_cast[_CFixedWidthTypePtr](self.type)
 *         if ty == nullptr:             # <<<<<<<<<<<<<<
 *             raise ValueError("Non-fixed width type")
 *         return ty.bit_width()
*/
  __pyx_t_2 = (__pyx_v_ty == nullptr);
  if (unlikely(__pyx_t_2)) {

    /* "pyarrow/types.pxi":273
 *         ty = dynamic_cast[_CFixedWidthTypePtr](self.type)
 *         if ty == nullptr:
 *             raise ValueError("Non-fixed width type")             # <<<<<<<<<<<<<<
 *         return ty.bit_width()
 * 
*/
    __pyx_t_4 = NULL;
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Non_fixed_width_type};
      __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 273, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    }
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(1, 273, __pyx_L1_error)

    /* "pyarrow/types.pxi":272
 *         cdef _CFixedWidthTypePtr ty
 *         ty = dynamic_cast[_CFixedWidthTypePtr](self.type)
 *         if ty == nullptr:             # <<<<<<<<<<<<<<
 *             raise ValueError("Non-fixed width type")
 *         return ty.bit_width()
*/
  }

  /* "pyarrow/types.pxi":274
 *         if ty == nullptr:
 *             raise ValueError("Non-fixed width type")
 *         return ty.bit_width()             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyLong_From_int(__pyx_v_ty->bit_width()); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 274, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":257
 *         return self.type.id()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def bit_width(self):
 *         """
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pyarrow.lib.DataType.bit_width.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":276
 *         return ty.bit_width()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def byte_width(self):
 *         """
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_8DataType_10byte_width_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_8DataType_10byte_width_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_8DataType_10byte_width___get__(((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_8DataType_10byte_width___get__(struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v_self) {
  __pyx_t_7pyarrow_3lib__CFixedWidthTypePtr __pyx_v_ty;
  int __pyx_v_byte_width;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __pyx_t_7pyarrow_3lib__CFixedWidthTypePtr __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyarrow/types.pxi":290
 *         """
 *         cdef _CFixedWidthTypePtr ty
 *         ty = dynamic_cast[_CFixedWidthTypePtr](self.type)             # <<<<<<<<<<<<<<
 *         if ty == nullptr:
 *             raise ValueError("Non-fixed width type")
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "type");
    __PYX_ERR(1, 290, __pyx_L1_error)
  }
  try {
    __pyx_t_1 = dynamic_cast<__pyx_t_7pyarrow_3lib__CFixedWidthTypePtr>(__pyx_v_self->type);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 290, __pyx_L1_error)
  }
  __pyx_v_ty = __pyx_t_1;

  /* "pyarrow/types.pxi":291
 *         cdef _CFixedWidthTypePtr ty
 *         ty = dynamic_cast[_CFixedWidthTypePtr](self.type)
 *         if ty == nullptr:             # <<<<<<<<<<<<<<
 *             raise ValueError("Non-fixed width type")
 *         byte_width = ty.byte_width()
*/
  __pyx_t_2 = (__pyx_v_ty == nullptr);
  if (unlikely(__pyx_t_2)) {

    /* "pyarrow/types.pxi":292
 *         ty = dynamic_cast[_CFixedWidthTypePtr](self.type)
 *         if ty == nullptr:
 *             raise ValueError("Non-fixed width type")             # <<<<<<<<<<<<<<
 *         byte_width = ty.byte_width()
 *         if byte_width == 0 and self.bit_width != 0:
*/
    __pyx_t_4 = NULL;
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Non_fixed_width_type};
      __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 292, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    }
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(1, 292, __pyx_L1_error)

    /* "pyarrow/types.pxi":291
 *         cdef _CFixedWidthTypePtr ty
 *         ty = dynamic_cast[_CFixedWidthTypePtr](self.type)
 *         if ty == nullptr:             # <<<<<<<<<<<<<<
 *             raise ValueError("Non-fixed width type")
 *         byte_width = ty.byte_width()
*/
  }

  /* "pyarrow/types.pxi":293
 *         if ty == nullptr:
 *             raise ValueError("Non-fixed width type")
 *         byte_width = ty.byte_width()             # <<<<<<<<<<<<<<
 *         if byte_width == 0 and self.bit_width != 0:
 *             raise ValueError("Less than one byte")
*/
  __pyx_v_byte_width = __pyx_v_ty->byte_width();

  /* "pyarrow/types.pxi":294
 *             raise ValueError("Non-fixed width type")
 *         byte_width = ty.byte_width()
 *         if byte_width == 0 and self.bit_width != 0:             # <<<<<<<<<<<<<<
 *             raise ValueError("Less than one byte")
 *         return byte_width
*/
  __pyx_t_6 = (__pyx_v_byte_width == 0);
  if (__pyx_t_6) {
  } else {
    __pyx_t_2 = __pyx_t_6;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_bit_width); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 294, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = (__Pyx_PyLong_BoolNeObjC(__pyx_t_3, __pyx_mstate_global->__pyx_int_0, 0, 0)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(1, 294, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_2 = __pyx_t_6;
  __pyx_L5_bool_binop_done:;
  if (unlikely(__pyx_t_2)) {

    /* "pyarrow/types.pxi":295
 *         byte_width = ty.byte_width()
 *         if byte_width == 0 and self.bit_width != 0:
 *             raise ValueError("Less than one byte")             # <<<<<<<<<<<<<<
 *         return byte_width
 * 
*/
    __pyx_t_4 = NULL;
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Less_than_one_byte};
      __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 295, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    }
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(1, 295, __pyx_L1_error)

    /* "pyarrow/types.pxi":294
 *             raise ValueError("Non-fixed width type")
 *         byte_width = ty.byte_width()
 *         if byte_width == 0 and self.bit_width != 0:             # <<<<<<<<<<<<<<
 *             raise ValueError("Less than one byte")
 *         return byte_width
*/
  }

  /* "pyarrow/types.pxi":296
 *         if byte_width == 0 and self.bit_width != 0:
 *             raise ValueError("Less than one byte")
 *         return byte_width             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyLong_From_int(__pyx_v_byte_width); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 296, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":276
 *         return ty.bit_width()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def byte_width(self):
 *         """
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pyarrow.lib.DataType.byte_width.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":298
 *         return byte_width
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def num_fields(self):
 *         """
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_8DataType_10num_fields_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_8DataType_10num_fields_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_8DataType_10num_fields___get__(((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_8DataType_10num_fields___get__(struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyarrow/types.pxi":318
 *         2
 *         """
 *         return self.type.num_fields()             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "type");
    __PYX_ERR(1, 318, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_v_self->type->num_fields()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 318, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":298
 *         return byte_width
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def num_fields(self):
 *         """
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib.DataType.num_fields.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":320
 *         return self.type.num_fields()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def num_buffers(self):
 *         """
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_8DataType_11num_buffers_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_8DataType_11num_buffers_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_8DataType_11num_buffers___get__(((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_8DataType_11num_buffers___get__(struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyarrow/types.pxi":334
 *         3
 *         """
 *         return self.type.layout().buffers.size()             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "type");
    __PYX_ERR(1, 334, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyLong_FromSize_t(__pyx_v_self->type->layout().buffers.size()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 334, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":320
 *         return self.type.num_fields()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def num_buffers(self):
 *         """
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib.DataType.num_buffers.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":336
 *         return self.type.layout().buffers.size()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def has_variadic_buffers(self):
 *         """
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_8DataType_20has_variadic_buffers_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_8DataType_20has_variadic_buffers_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_8DataType_20has_variadic_buffers___get__(((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_8DataType_20has_variadic_buffers___get__(struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyarrow/types.pxi":350
 *         True
 *         """
 *         return self.type.layout().variadic_spec.has_value()             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
*/
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "type");
    __PYX_ERR(1, 350, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->type->layout().variadic_spec.has_value()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 350, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":336
 *         return self.type.layout().buffers.size()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def has_variadic_buffers(self):
 *         """
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib.DataType.has_variadic_buffers.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":352
 *         return self.type.layout().variadic_spec.has_value()
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return frombytes(self.type.ToString(), safe=True)
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_8DataType_7__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_8DataType_7__str__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_8DataType_6__str__(((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_8DataType_6__str__(struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__str__", 0);

  /* "pyarrow/types.pxi":353
 * 
 *     def __str__(self):
 *         return frombytes(self.type.ToString(), safe=True)             # <<<<<<<<<<<<<<
 * 
 *     def __hash__(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_frombytes); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 353, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "type");
    __PYX_ERR(1, 353, __pyx_L1_error)
  }
  __pyx_t_4 = __pyx_convert_PyBytes_string_to_py_6libcpp_6string_std__in_string(__pyx_v_self->type->ToString()); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 353, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, __pyx_t_4};
    __pyx_t_6 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 353, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_safe, Py_True, __pyx_t_6, __pyx_callargs+2, 0) < (0)) __PYX_ERR(1, 353, __pyx_L1_error)
    __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_6);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 353, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":352
 *         return self.type.layout().variadic_spec.has_value()
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return frombytes(self.type.ToString(), safe=True)
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pyarrow.lib.DataType.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":355
 *         return frombytes(self.type.ToString(), safe=True)
 * 
 *     def __hash__(self):             # <<<<<<<<<<<<<<
 *         return hash(str(self))
 * 
*/

/* Python wrapper */
static Py_hash_t __pyx_pw_7pyarrow_3lib_8DataType_9__hash__(PyObject *__pyx_v_self); /*proto*/
static Py_hash_t __pyx_pw_7pyarrow_3lib_8DataType_9__hash__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  Py_hash_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__hash__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_8DataType_8__hash__(((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_v_self));

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

static Py_hash_t __pyx_pf_7pyarrow_3lib_8DataType_8__hash__(struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v_self) {
  Py_hash_t __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_hash_t __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__hash__", 0);

  /* "pyarrow/types.pxi":356
 * 
 *     def __hash__(self):
 *         return hash(str(self))             # <<<<<<<<<<<<<<
 * 
 *     def __reduce__(self):
*/
  __pyx_t_1 = __Pyx_PyObject_Unicode(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 356, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Hash(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_hash_t)-1))) __PYX_ERR(1, 356, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":355
 *         return frombytes(self.type.ToString(), safe=True)
 * 
 *     def __hash__(self):             # <<<<<<<<<<<<<<
 *         return hash(str(self))
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib.DataType.__hash__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  if (unlikely(__pyx_r == -1) && !PyErr_Occurred()) __pyx_r = -2;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":358
 *         return hash(str(self))
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         return type_for_alias, (str(self),)
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_8DataType_11__reduce__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_8DataType_10__reduce__, "DataType.__reduce__(self)");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_8DataType_11__reduce__ = {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_8DataType_11__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_8DataType_10__reduce__};
static PyObject *__pyx_pw_7pyarrow_3lib_8DataType_11__reduce__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7pyarrow_3lib_8DataType_10__reduce__(((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_v_self));

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

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

  /* "pyarrow/types.pxi":359
 * 
 *     def __reduce__(self):
 *         return type_for_alias, (str(self),)             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_type_for_alias); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 359, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Unicode(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 359, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 359, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2) != (0)) __PYX_ERR(1, 359, __pyx_L1_error);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 359, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1) != (0)) __PYX_ERR(1, 359, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3) != (0)) __PYX_ERR(1, 359, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":358
 *         return hash(str(self))
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         return type_for_alias, (str(self),)
 * 
*/

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

/* "pyarrow/types.pxi":361
 *         return type_for_alias, (str(self),)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return f'{self.__class__.__name__}({self})'
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_8DataType_13__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_8DataType_13__repr__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_8DataType_12__repr__(((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_8DataType_12__repr__(struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3[4];
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);

  /* "pyarrow/types.pxi":362
 * 
 *     def __repr__(self):
 *         return f'{self.__class__.__name__}({self})'             # <<<<<<<<<<<<<<
 * 
 *     def __eq__(self, other):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 362, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_name_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 362, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_t_2, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 362, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_FormatSimple(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 362, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3[0] = __pyx_t_1;
  __pyx_t_3[1] = __pyx_mstate_global->__pyx_kp_u__9;
  __pyx_t_3[2] = __pyx_t_2;
  __pyx_t_3[3] = __pyx_mstate_global->__pyx_kp_u__7;
  __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_3, 4, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1) + 1 * 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2));
  if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 362, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":361
 *         return type_for_alias, (str(self),)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return f'{self.__class__.__name__}({self})'
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pyarrow.lib.DataType.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":364
 *         return f'{self.__class__.__name__}({self})'
 * 
 *     def __eq__(self, other):             # <<<<<<<<<<<<<<
 *         try:
 *             return self.equals(other)
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_8DataType_15__eq__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_8DataType_15__eq__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__eq__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_8DataType_14__eq__(((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_v_self), ((PyObject *)__pyx_v_other));

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

static PyObject *__pyx_pf_7pyarrow_3lib_8DataType_14__eq__(struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v_self, PyObject *__pyx_v_other) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__eq__", 0);

  /* "pyarrow/types.pxi":365
 * 
 *     def __eq__(self, other):
 *         try:             # <<<<<<<<<<<<<<
 *             return self.equals(other)
 *         except (TypeError, ValueError):
*/
  {
    __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:*/ {

      /* "pyarrow/types.pxi":366
 *     def __eq__(self, other):
 *         try:
 *             return self.equals(other)             # <<<<<<<<<<<<<<
 *         except (TypeError, ValueError):
 *             return NotImplemented
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_5 = ((PyObject *)__pyx_v_self);
      __Pyx_INCREF(__pyx_t_5);
      __pyx_t_6 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_other};
        __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_equals, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 366, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_4);
      }
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L7_try_return;

      /* "pyarrow/types.pxi":365
 * 
 *     def __eq__(self, other):
 *         try:             # <<<<<<<<<<<<<<
 *             return self.equals(other)
 *         except (TypeError, ValueError):
*/
    }
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "pyarrow/types.pxi":367
 *         try:
 *             return self.equals(other)
 *         except (TypeError, ValueError):             # <<<<<<<<<<<<<<
 *             return NotImplemented
 * 
*/
    __pyx_t_7 = __Pyx_PyErr_ExceptionMatches2(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), ((PyObject *)(((PyTypeObject*)PyExc_ValueError))));
    if (__pyx_t_7) {
      __Pyx_AddTraceback("pyarrow.lib.DataType.__eq__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_8) < 0) __PYX_ERR(1, 367, __pyx_L5_except_error)
      __Pyx_XGOTREF(__pyx_t_4);
      __Pyx_XGOTREF(__pyx_t_5);
      __Pyx_XGOTREF(__pyx_t_8);

      /* "pyarrow/types.pxi":368
 *             return self.equals(other)
 *         except (TypeError, ValueError):
 *             return NotImplemented             # <<<<<<<<<<<<<<
 * 
 *     def equals(self, other, *, check_metadata=False):
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_builtin_NotImplemented);
      __pyx_r = __pyx_builtin_NotImplemented;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      goto __pyx_L6_except_return;
    }
    goto __pyx_L5_except_error;

    /* "pyarrow/types.pxi":365
 * 
 *     def __eq__(self, other):
 *         try:             # <<<<<<<<<<<<<<
 *             return self.equals(other)
 *         except (TypeError, ValueError):
*/
    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L7_try_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
    __pyx_L6_except_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
  }

  /* "pyarrow/types.pxi":364
 *         return f'{self.__class__.__name__}({self})'
 * 
 *     def __eq__(self, other):             # <<<<<<<<<<<<<<
 *         try:
 *             return self.equals(other)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("pyarrow.lib.DataType.__eq__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":370
 *             return NotImplemented
 * 
 *     def equals(self, other, *, check_metadata=False):             # <<<<<<<<<<<<<<
 *         """
 *         Return true if type is equivalent to passed value.
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_8DataType_17equals(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_8DataType_16equals, "DataType.equals(self, other, *, check_metadata=False)\n\nReturn true if type is equivalent to passed value.\n\nParameters\n----------\nother : DataType or string convertible to DataType\ncheck_metadata : bool\n    Whether nested Field metadata equality should be checked as well.\n\nReturns\n-------\nis_equal : bool\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> pa.int64().equals(pa.string())\nFalse\n>>> pa.int64().equals(pa.int64())\nTrue");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_8DataType_17equals = {"equals", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_8DataType_17equals, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_8DataType_16equals};
static PyObject *__pyx_pw_7pyarrow_3lib_8DataType_17equals(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_other = 0;
  PyObject *__pyx_v_check_metadata = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("equals (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_other,&__pyx_mstate_global->__pyx_n_u_check_metadata,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 370, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 370, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "equals", 0) < (0)) __PYX_ERR(1, 370, __pyx_L3_error)
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_False));
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("equals", 1, 1, 1, i); __PYX_ERR(1, 370, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 370, __pyx_L3_error)
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_False));
    }
    __pyx_v_other = values[0];
    __pyx_v_check_metadata = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("equals", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 370, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("pyarrow.lib.DataType.equals", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyarrow_3lib_8DataType_16equals(((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_v_self), __pyx_v_other, __pyx_v_check_metadata);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7pyarrow_3lib_8DataType_16equals(struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_check_metadata) {
  struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v_other_type = 0;
  bool __pyx_v_c_check_metadata;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  bool __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("equals", 0);

  /* "pyarrow/types.pxi":396
 *             c_bool c_check_metadata
 * 
 *         other_type = ensure_type(other)             # <<<<<<<<<<<<<<
 *         c_check_metadata = check_metadata
 *         return self.type.Equals(deref(other_type.type), c_check_metadata)
*/
  __pyx_t_1 = ((PyObject *)__pyx_f_7pyarrow_3lib_ensure_type(__pyx_v_other, 0, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 396, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_other_type = ((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyarrow/types.pxi":397
 * 
 *         other_type = ensure_type(other)
 *         c_check_metadata = check_metadata             # <<<<<<<<<<<<<<
 *         return self.type.Equals(deref(other_type.type), c_check_metadata)
 * 
*/
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_check_metadata); if (unlikely((__pyx_t_2 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(1, 397, __pyx_L1_error)
  __pyx_v_c_check_metadata = __pyx_t_2;

  /* "pyarrow/types.pxi":398
 *         other_type = ensure_type(other)
 *         c_check_metadata = check_metadata
 *         return self.type.Equals(deref(other_type.type), c_check_metadata)             # <<<<<<<<<<<<<<
 * 
 *     def to_pandas_dtype(self):
*/
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "type");
    __PYX_ERR(1, 398, __pyx_L1_error)
  }
  if (unlikely(((PyObject *)__pyx_v_other_type) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "type");
    __PYX_ERR(1, 398, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->type->Equals((*__pyx_v_other_type->type), __pyx_v_c_check_metadata)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 398, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":370
 *             return NotImplemented
 * 
 *     def equals(self, other, *, check_metadata=False):             # <<<<<<<<<<<<<<
 *         """
 *         Return true if type is equivalent to passed value.
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib.DataType.equals", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_other_type);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":400
 *         return self.type.Equals(deref(other_type.type), c_check_metadata)
 * 
 *     def to_pandas_dtype(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the equivalent NumPy / Pandas dtype.
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_8DataType_19to_pandas_dtype(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_8DataType_18to_pandas_dtype, "DataType.to_pandas_dtype(self)\n\nReturn the equivalent NumPy / Pandas dtype.\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> pa.int64().to_pandas_dtype()\n<class 'numpy.int64'>");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_8DataType_19to_pandas_dtype = {"to_pandas_dtype", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_8DataType_19to_pandas_dtype, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_8DataType_18to_pandas_dtype};
static PyObject *__pyx_pw_7pyarrow_3lib_8DataType_19to_pandas_dtype(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("to_pandas_dtype (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("to_pandas_dtype", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("to_pandas_dtype", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7pyarrow_3lib_8DataType_18to_pandas_dtype(((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_8DataType_18to_pandas_dtype(struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("to_pandas_dtype", 0);

  /* "pyarrow/types.pxi":410
 *         <class 'numpy.int64'>
 *         """
 *         return _to_pandas_dtype(self)             # <<<<<<<<<<<<<<
 * 
 *     def _export_to_c(self, out_ptr):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_to_pandas_dtype); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 410, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, ((PyObject *)__pyx_v_self)};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 410, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":400
 *         return self.type.Equals(deref(other_type.type), c_check_metadata)
 * 
 *     def to_pandas_dtype(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the equivalent NumPy / Pandas dtype.
*/

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

/* "pyarrow/types.pxi":412
 *         return _to_pandas_dtype(self)
 * 
 *     def _export_to_c(self, out_ptr):             # <<<<<<<<<<<<<<
 *         """
 *         Export to a C ArrowSchema struct, given its pointer.
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_8DataType_21_export_to_c(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_8DataType_20_export_to_c, "DataType._export_to_c(self, out_ptr)\n\nExport to a C ArrowSchema struct, given its pointer.\n\nBe careful: if you don't pass the ArrowSchema struct to a consumer,\nits memory will leak.  This is a low-level function intended for\nexpert users.");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_8DataType_21_export_to_c = {"_export_to_c", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_8DataType_21_export_to_c, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_8DataType_20_export_to_c};
static PyObject *__pyx_pw_7pyarrow_3lib_8DataType_21_export_to_c(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_out_ptr = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_export_to_c (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_out_ptr,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 412, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 412, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_export_to_c", 0) < (0)) __PYX_ERR(1, 412, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_export_to_c", 1, 1, 1, i); __PYX_ERR(1, 412, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 412, __pyx_L3_error)
    }
    __pyx_v_out_ptr = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_export_to_c", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 412, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("pyarrow.lib.DataType._export_to_c", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyarrow_3lib_8DataType_20_export_to_c(((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_v_self), __pyx_v_out_ptr);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7pyarrow_3lib_8DataType_20_export_to_c(struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v_self, PyObject *__pyx_v_out_ptr) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  void *__pyx_t_1;
  int __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_export_to_c", 0);

  /* "pyarrow/types.pxi":420
 *         expert users.
 *         """
 *         check_status(ExportType(deref(self.type),             # <<<<<<<<<<<<<<
 *                                 <ArrowSchema*> _as_c_pointer(out_ptr)))
 * 
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "type");
    __PYX_ERR(1, 420, __pyx_L1_error)
  }

  /* "pyarrow/types.pxi":421
 *         """
 *         check_status(ExportType(deref(self.type),
 *                                 <ArrowSchema*> _as_c_pointer(out_ptr)))             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
*/
  __pyx_t_1 = __pyx_f_7pyarrow_3lib__as_c_pointer(__pyx_v_out_ptr, NULL); if (unlikely(__pyx_t_1 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(1, 421, __pyx_L1_error)

  /* "pyarrow/types.pxi":420
 *         expert users.
 *         """
 *         check_status(ExportType(deref(self.type),             # <<<<<<<<<<<<<<
 *                                 <ArrowSchema*> _as_c_pointer(out_ptr)))
 * 
*/
  __pyx_t_2 = __pyx_f_7pyarrow_3lib_check_status(arrow::ExportType((*__pyx_v_self->type), ((struct ArrowSchema *)__pyx_t_1))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(1, 420, __pyx_L1_error)

  /* "pyarrow/types.pxi":412
 *         return _to_pandas_dtype(self)
 * 
 *     def _export_to_c(self, out_ptr):             # <<<<<<<<<<<<<<
 *         """
 *         Export to a C ArrowSchema struct, given its pointer.
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyarrow.lib.DataType._export_to_c", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":423
 *                                 <ArrowSchema*> _as_c_pointer(out_ptr)))
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def _import_from_c(in_ptr):
 *         """
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_8DataType_23_import_from_c(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_8DataType_22_import_from_c, "DataType._import_from_c(in_ptr)\n\nImport DataType from a C ArrowSchema struct, given its pointer.\n\nThis is a low-level function intended for expert users.");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_8DataType_23_import_from_c = {"_import_from_c", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_8DataType_23_import_from_c, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_8DataType_22_import_from_c};
static PyObject *__pyx_pw_7pyarrow_3lib_8DataType_23_import_from_c(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_in_ptr = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_import_from_c (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_in_ptr,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 423, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 423, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_import_from_c", 0) < (0)) __PYX_ERR(1, 423, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_import_from_c", 1, 1, 1, i); __PYX_ERR(1, 423, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 423, __pyx_L3_error)
    }
    __pyx_v_in_ptr = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_import_from_c", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 423, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("pyarrow.lib.DataType._import_from_c", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyarrow_3lib_8DataType_22_import_from_c(__pyx_v_in_ptr);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7pyarrow_3lib_8DataType_22_import_from_c(PyObject *__pyx_v_in_ptr) {
  std::shared_ptr< arrow::DataType>  __pyx_v_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  void *__pyx_t_1;
  std::shared_ptr< arrow::DataType>  __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_import_from_c", 0);

  /* "pyarrow/types.pxi":431
 *         """
 *         result = GetResultValue(ImportType(<ArrowSchema*>
 *                                            _as_c_pointer(in_ptr)))             # <<<<<<<<<<<<<<
 *         return pyarrow_wrap_data_type(result)
 * 
*/
  __pyx_t_1 = __pyx_f_7pyarrow_3lib__as_c_pointer(__pyx_v_in_ptr, NULL); if (unlikely(__pyx_t_1 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(1, 431, __pyx_L1_error)

  /* "pyarrow/types.pxi":430
 *         This is a low-level function intended for expert users.
 *         """
 *         result = GetResultValue(ImportType(<ArrowSchema*>             # <<<<<<<<<<<<<<
 *                                            _as_c_pointer(in_ptr)))
 *         return pyarrow_wrap_data_type(result)
*/
  __pyx_t_2 = arrow::py::GetResultValue<std::shared_ptr< arrow::DataType> >(arrow::ImportType(((struct ArrowSchema *)__pyx_t_1))); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 430, __pyx_L1_error)
  __pyx_v_result = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_2);

  /* "pyarrow/types.pxi":432
 *         result = GetResultValue(ImportType(<ArrowSchema*>
 *                                            _as_c_pointer(in_ptr)))
 *         return pyarrow_wrap_data_type(result)             # <<<<<<<<<<<<<<
 * 
 *     def __arrow_c_schema__(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = pyarrow_wrap_data_type(__pyx_v_result); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 432, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":423
 *                                 <ArrowSchema*> _as_c_pointer(out_ptr)))
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def _import_from_c(in_ptr):
 *         """
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyarrow.lib.DataType._import_from_c", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":434
 *         return pyarrow_wrap_data_type(result)
 * 
 *     def __arrow_c_schema__(self):             # <<<<<<<<<<<<<<
 *         """
 *         Export to a ArrowSchema PyCapsule
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_8DataType_25__arrow_c_schema__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_8DataType_24__arrow_c_schema__, "DataType.__arrow_c_schema__(self)\n\nExport to a ArrowSchema PyCapsule\n\nUnlike _export_to_c, this will not leak memory if the capsule is not used.");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_8DataType_25__arrow_c_schema__ = {"__arrow_c_schema__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_8DataType_25__arrow_c_schema__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_8DataType_24__arrow_c_schema__};
static PyObject *__pyx_pw_7pyarrow_3lib_8DataType_25__arrow_c_schema__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__arrow_c_schema__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__arrow_c_schema__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__arrow_c_schema__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7pyarrow_3lib_8DataType_24__arrow_c_schema__(((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_8DataType_24__arrow_c_schema__(struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v_self) {
  struct ArrowSchema *__pyx_v_c_schema;
  PyObject *__pyx_v_capsule = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__arrow_c_schema__", 0);

  /* "pyarrow/types.pxi":441
 *         """
 *         cdef ArrowSchema* c_schema
 *         capsule = alloc_c_schema(&c_schema)             # <<<<<<<<<<<<<<
 * 
 *         with nogil:
*/
  __pyx_t_1 = __pyx_f_7pyarrow_3lib_alloc_c_schema((&__pyx_v_c_schema)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 441, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_capsule = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyarrow/types.pxi":443
 *         capsule = alloc_c_schema(&c_schema)
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             check_status(ExportType(deref(self.type), c_schema))
 * 
*/
  {
      PyThreadState * _save;
      _save = PyEval_SaveThread();
      __Pyx_FastGIL_Remember();
      /*try:*/ {

        /* "pyarrow/types.pxi":444
 * 
 *         with nogil:
 *             check_status(ExportType(deref(self.type), c_schema))             # <<<<<<<<<<<<<<
 * 
 *         return capsule
*/
        if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "type");
          __Pyx_PyGILState_Release(__pyx_gilstate_save);
          __PYX_ERR(1, 444, __pyx_L4_error)
        }
        __pyx_t_2 = __pyx_f_7pyarrow_3lib_check_status(arrow::ExportType((*__pyx_v_self->type), __pyx_v_c_schema)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(1, 444, __pyx_L4_error)
      }

      /* "pyarrow/types.pxi":443
 *         capsule = alloc_c_schema(&c_schema)
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             check_status(ExportType(deref(self.type), c_schema))
 * 
*/
      /*finally:*/ {
        /*normal exit:*/{
          __Pyx_FastGIL_Forget();
          PyEval_RestoreThread(_save);
          goto __pyx_L5;
        }
        __pyx_L4_error: {
          __Pyx_FastGIL_Forget();
          PyEval_RestoreThread(_save);
          goto __pyx_L1_error;
        }
        __pyx_L5:;
      }
  }

  /* "pyarrow/types.pxi":446
 *             check_status(ExportType(deref(self.type), c_schema))
 * 
 *         return capsule             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_capsule);
  __pyx_r = __pyx_v_capsule;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":434
 *         return pyarrow_wrap_data_type(result)
 * 
 *     def __arrow_c_schema__(self):             # <<<<<<<<<<<<<<
 *         """
 *         Export to a ArrowSchema PyCapsule
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib.DataType.__arrow_c_schema__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_capsule);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":448
 *         return capsule
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def _import_from_c_capsule(schema):
 *         """
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_8DataType_27_import_from_c_capsule(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_8DataType_26_import_from_c_capsule, "DataType._import_from_c_capsule(schema)\n\nImport a DataType from a ArrowSchema PyCapsule\n\nParameters\n----------\nschema : PyCapsule\n    A valid PyCapsule with name 'arrow_schema' containing an\n    ArrowSchema pointer.");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_8DataType_27_import_from_c_capsule = {"_import_from_c_capsule", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_8DataType_27_import_from_c_capsule, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_8DataType_26_import_from_c_capsule};
static PyObject *__pyx_pw_7pyarrow_3lib_8DataType_27_import_from_c_capsule(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_schema = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_import_from_c_capsule (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_schema,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 448, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 448, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_import_from_c_capsule", 0) < (0)) __PYX_ERR(1, 448, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_import_from_c_capsule", 1, 1, 1, i); __PYX_ERR(1, 448, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 448, __pyx_L3_error)
    }
    __pyx_v_schema = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_import_from_c_capsule", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 448, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("pyarrow.lib.DataType._import_from_c_capsule", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyarrow_3lib_8DataType_26_import_from_c_capsule(__pyx_v_schema);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7pyarrow_3lib_8DataType_26_import_from_c_capsule(PyObject *__pyx_v_schema) {
  struct ArrowSchema *__pyx_v_c_schema;
  std::shared_ptr< arrow::DataType>  __pyx_v_c_type;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  void *__pyx_t_5;
  std::shared_ptr< arrow::DataType>  __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_import_from_c_capsule", 0);

  /* "pyarrow/types.pxi":463
 *             shared_ptr[CDataType] c_type
 * 
 *         if not PyCapsule_IsValid(schema, 'arrow_schema'):             # <<<<<<<<<<<<<<
 *             raise TypeError(
 *                 "Not an ArrowSchema object"
*/
  __pyx_t_1 = (!PyCapsule_IsValid(__pyx_v_schema, __pyx_k_arrow_schema));
  if (unlikely(__pyx_t_1)) {

    /* "pyarrow/types.pxi":464
 * 
 *         if not PyCapsule_IsValid(schema, 'arrow_schema'):
 *             raise TypeError(             # <<<<<<<<<<<<<<
 *                 "Not an ArrowSchema object"
 *             )
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Not_an_ArrowSchema_object};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 464, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(1, 464, __pyx_L1_error)

    /* "pyarrow/types.pxi":463
 *             shared_ptr[CDataType] c_type
 * 
 *         if not PyCapsule_IsValid(schema, 'arrow_schema'):             # <<<<<<<<<<<<<<
 *             raise TypeError(
 *                 "Not an ArrowSchema object"
*/
  }

  /* "pyarrow/types.pxi":467
 *                 "Not an ArrowSchema object"
 *             )
 *         c_schema = <ArrowSchema*> PyCapsule_GetPointer(schema, 'arrow_schema')             # <<<<<<<<<<<<<<
 * 
 *         with nogil:
*/
  __pyx_t_5 = PyCapsule_GetPointer(__pyx_v_schema, __pyx_k_arrow_schema); if (unlikely(__pyx_t_5 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(1, 467, __pyx_L1_error)
  __pyx_v_c_schema = ((struct ArrowSchema *)__pyx_t_5);

  /* "pyarrow/types.pxi":469
 *         c_schema = <ArrowSchema*> PyCapsule_GetPointer(schema, 'arrow_schema')
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             c_type = GetResultValue(ImportType(c_schema))
 * 
*/
  {
      PyThreadState * _save;
      _save = PyEval_SaveThread();
      __Pyx_FastGIL_Remember();
      /*try:*/ {

        /* "pyarrow/types.pxi":470
 * 
 *         with nogil:
 *             c_type = GetResultValue(ImportType(c_schema))             # <<<<<<<<<<<<<<
 * 
 *         return pyarrow_wrap_data_type(c_type)
*/
        __pyx_t_6 = arrow::py::GetResultValue<std::shared_ptr< arrow::DataType> >(arrow::ImportType(__pyx_v_c_schema)); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 470, __pyx_L5_error)
        __pyx_v_c_type = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_6);
      }

      /* "pyarrow/types.pxi":469
 *         c_schema = <ArrowSchema*> PyCapsule_GetPointer(schema, 'arrow_schema')
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             c_type = GetResultValue(ImportType(c_schema))
 * 
*/
      /*finally:*/ {
        /*normal exit:*/{
          __Pyx_FastGIL_Forget();
          PyEval_RestoreThread(_save);
          goto __pyx_L6;
        }
        __pyx_L5_error: {
          __Pyx_FastGIL_Forget();
          PyEval_RestoreThread(_save);
          goto __pyx_L1_error;
        }
        __pyx_L6:;
      }
  }

  /* "pyarrow/types.pxi":472
 *             c_type = GetResultValue(ImportType(c_schema))
 * 
 *         return pyarrow_wrap_data_type(c_type)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = pyarrow_wrap_data_type(__pyx_v_c_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 472, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":448
 *         return capsule
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def _import_from_c_capsule(schema):
 *         """
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyarrow.lib.DataType._import_from_c_capsule", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":480
 *     """
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self.sp_memo.reset(new CDictionaryMemo())
 *         self.memo = self.sp_memo.get()
*/

/* Python wrapper */
static int __pyx_pw_7pyarrow_3lib_14DictionaryMemo_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_7pyarrow_3lib_14DictionaryMemo_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, __pyx_nargs); return -1; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return -1;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__cinit__", __pyx_kwds); return -1;}
  __pyx_r = __pyx_pf_7pyarrow_3lib_14DictionaryMemo___cinit__(((struct __pyx_obj_7pyarrow_3lib_DictionaryMemo *)__pyx_v_self));

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

static int __pyx_pf_7pyarrow_3lib_14DictionaryMemo___cinit__(struct __pyx_obj_7pyarrow_3lib_DictionaryMemo *__pyx_v_self) {
  int __pyx_r;
   arrow::ipc::DictionaryMemo *__pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "pyarrow/types.pxi":481
 * 
 *     def __cinit__(self):
 *         self.sp_memo.reset(new CDictionaryMemo())             # <<<<<<<<<<<<<<
 *         self.memo = self.sp_memo.get()
 * 
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_memo");
    __PYX_ERR(1, 481, __pyx_L1_error)
  }
  try {
    __pyx_t_1 = new  arrow::ipc::DictionaryMemo();
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 481, __pyx_L1_error)
  }
  __pyx_v_self->sp_memo.reset(__pyx_t_1);

  /* "pyarrow/types.pxi":482
 *     def __cinit__(self):
 *         self.sp_memo.reset(new CDictionaryMemo())
 *         self.memo = self.sp_memo.get()             # <<<<<<<<<<<<<<
 * 
 * 
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_memo");
    __PYX_ERR(1, 482, __pyx_L1_error)
  }
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "memo");
    __PYX_ERR(1, 482, __pyx_L1_error)
  }
  __pyx_v_self->memo = __pyx_v_self->sp_memo.get();

  /* "pyarrow/types.pxi":480
 *     """
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self.sp_memo.reset(new CDictionaryMemo())
 *         self.memo = self.sp_memo.get()
*/

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyarrow.lib.DictionaryMemo.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  return __pyx_r;
}

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

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_14DictionaryMemo_3__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_14DictionaryMemo_2__reduce_cython__, "DictionaryMemo.__reduce_cython__(self)");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_14DictionaryMemo_3__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_14DictionaryMemo_3__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_14DictionaryMemo_2__reduce_cython__};
static PyObject *__pyx_pw_7pyarrow_3lib_14DictionaryMemo_3__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7pyarrow_3lib_14DictionaryMemo_2__reduce_cython__(((struct __pyx_obj_7pyarrow_3lib_DictionaryMemo *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_14DictionaryMemo_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_DictionaryMemo *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/
  __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(7, 2, __pyx_L1_error)

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

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyarrow.lib.DictionaryMemo.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_14DictionaryMemo_5__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_14DictionaryMemo_4__setstate_cython__, "DictionaryMemo.__setstate_cython__(self, __pyx_state)");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_14DictionaryMemo_5__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_14DictionaryMemo_5__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_14DictionaryMemo_4__setstate_cython__};
static PyObject *__pyx_pw_7pyarrow_3lib_14DictionaryMemo_5__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(7, 3, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(7, 3, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(7, 3, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(7, 3, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(7, 3, __pyx_L3_error)
    }
    __pyx_v___pyx_state = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(7, 3, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("pyarrow.lib.DictionaryMemo.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyarrow_3lib_14DictionaryMemo_4__setstate_cython__(((struct __pyx_obj_7pyarrow_3lib_DictionaryMemo *)__pyx_v_self), __pyx_v___pyx_state);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

  /* "(tree fragment)":4
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
*/
  __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(7, 4, __pyx_L1_error)

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

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyarrow.lib.DictionaryMemo.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":498
 *     """
 * 
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:             # <<<<<<<<<<<<<<
 *         DataType.init(self, type)
 *         self.dict_type = <const CDictionaryType*> type.get()
*/

static void __pyx_f_7pyarrow_3lib_14DictionaryType_init(struct __pyx_obj_7pyarrow_3lib_DictionaryType *__pyx_v_self, std::shared_ptr< arrow::DataType>  const &__pyx_v_type) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "pyarrow/types.pxi":499
 * 
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:
 *         DataType.init(self, type)             # <<<<<<<<<<<<<<
 *         self.dict_type = <const CDictionaryType*> type.get()
 * 
*/
  __pyx_f_7pyarrow_3lib_8DataType_init(((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_v_self), __pyx_v_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 499, __pyx_L1_error)

  /* "pyarrow/types.pxi":500
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:
 *         DataType.init(self, type)
 *         self.dict_type = <const CDictionaryType*> type.get()             # <<<<<<<<<<<<<<
 * 
 *     def __reduce__(self):
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "dict_type");
    __PYX_ERR(1, 500, __pyx_L1_error)
  }
  __pyx_v_self->dict_type = (( arrow::DictionaryType const *)__pyx_v_type.get());

  /* "pyarrow/types.pxi":498
 *     """
 * 
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:             # <<<<<<<<<<<<<<
 *         DataType.init(self, type)
 *         self.dict_type = <const CDictionaryType*> type.get()
*/

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyarrow.lib.DictionaryType.init", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
}

/* "pyarrow/types.pxi":502
 *         self.dict_type = <const CDictionaryType*> type.get()
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         return dictionary, (self.index_type, self.value_type, self.ordered)
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_14DictionaryType_1__reduce__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_14DictionaryType___reduce__, "DictionaryType.__reduce__(self)");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_14DictionaryType_1__reduce__ = {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_14DictionaryType_1__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_14DictionaryType___reduce__};
static PyObject *__pyx_pw_7pyarrow_3lib_14DictionaryType_1__reduce__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7pyarrow_3lib_14DictionaryType___reduce__(((struct __pyx_obj_7pyarrow_3lib_DictionaryType *)__pyx_v_self));

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

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

  /* "pyarrow/types.pxi":503
 * 
 *     def __reduce__(self):
 *         return dictionary, (self.index_type, self.value_type, self.ordered)             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_dictionary); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 503, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_index_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 503, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_value_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 503, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_ordered); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 503, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 503, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2) != (0)) __PYX_ERR(1, 503, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3) != (0)) __PYX_ERR(1, 503, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_4);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_4) != (0)) __PYX_ERR(1, 503, __pyx_L1_error);
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 503, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1) != (0)) __PYX_ERR(1, 503, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_5);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_5) != (0)) __PYX_ERR(1, 503, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":502
 *         self.dict_type = <const CDictionaryType*> type.get()
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         return dictionary, (self.index_type, self.value_type, self.ordered)
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pyarrow.lib.DictionaryType.__reduce__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":505
 *         return dictionary, (self.index_type, self.value_type, self.ordered)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def ordered(self):
 *         """
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_14DictionaryType_7ordered_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_14DictionaryType_7ordered_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_14DictionaryType_7ordered___get__(((struct __pyx_obj_7pyarrow_3lib_DictionaryType *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_14DictionaryType_7ordered___get__(struct __pyx_obj_7pyarrow_3lib_DictionaryType *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyarrow/types.pxi":517
 *         False
 *         """
 *         return self.dict_type.ordered()             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "dict_type");
    __PYX_ERR(1, 517, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->dict_type->ordered()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 517, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":505
 *         return dictionary, (self.index_type, self.value_type, self.ordered)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def ordered(self):
 *         """
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib.DictionaryType.ordered.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":519
 *         return self.dict_type.ordered()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def index_type(self):
 *         """
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_14DictionaryType_10index_type_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_14DictionaryType_10index_type_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_14DictionaryType_10index_type___get__(((struct __pyx_obj_7pyarrow_3lib_DictionaryType *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_14DictionaryType_10index_type___get__(struct __pyx_obj_7pyarrow_3lib_DictionaryType *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyarrow/types.pxi":530
 *         DataType(int16)
 *         """
 *         return pyarrow_wrap_data_type(self.dict_type.index_type())             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "dict_type");
    __PYX_ERR(1, 530, __pyx_L1_error)
  }
  __pyx_t_1 = pyarrow_wrap_data_type(__pyx_v_self->dict_type->index_type()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 530, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":519
 *         return self.dict_type.ordered()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def index_type(self):
 *         """
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib.DictionaryType.index_type.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":532
 *         return pyarrow_wrap_data_type(self.dict_type.index_type())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def value_type(self):
 *         """
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_14DictionaryType_10value_type_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_14DictionaryType_10value_type_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_14DictionaryType_10value_type___get__(((struct __pyx_obj_7pyarrow_3lib_DictionaryType *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_14DictionaryType_10value_type___get__(struct __pyx_obj_7pyarrow_3lib_DictionaryType *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyarrow/types.pxi":545
 *         DataType(string)
 *         """
 *         return pyarrow_wrap_data_type(self.dict_type.value_type())             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "dict_type");
    __PYX_ERR(1, 545, __pyx_L1_error)
  }
  __pyx_t_1 = pyarrow_wrap_data_type(__pyx_v_self->dict_type->value_type()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 545, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":532
 *         return pyarrow_wrap_data_type(self.dict_type.index_type())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def value_type(self):
 *         """
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib.DictionaryType.value_type.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":561
 *     """
 * 
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:             # <<<<<<<<<<<<<<
 *         DataType.init(self, type)
 *         self.list_type = <const CListType*> type.get()
*/

static void __pyx_f_7pyarrow_3lib_8ListType_init(struct __pyx_obj_7pyarrow_3lib_ListType *__pyx_v_self, std::shared_ptr< arrow::DataType>  const &__pyx_v_type) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "pyarrow/types.pxi":562
 * 
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:
 *         DataType.init(self, type)             # <<<<<<<<<<<<<<
 *         self.list_type = <const CListType*> type.get()
 * 
*/
  __pyx_f_7pyarrow_3lib_8DataType_init(((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_v_self), __pyx_v_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 562, __pyx_L1_error)

  /* "pyarrow/types.pxi":563
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:
 *         DataType.init(self, type)
 *         self.list_type = <const CListType*> type.get()             # <<<<<<<<<<<<<<
 * 
 *     def __reduce__(self):
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "list_type");
    __PYX_ERR(1, 563, __pyx_L1_error)
  }
  __pyx_v_self->list_type = (( arrow::ListType const *)__pyx_v_type.get());

  /* "pyarrow/types.pxi":561
 *     """
 * 
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:             # <<<<<<<<<<<<<<
 *         DataType.init(self, type)
 *         self.list_type = <const CListType*> type.get()
*/

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyarrow.lib.ListType.init", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
}

/* "pyarrow/types.pxi":565
 *         self.list_type = <const CListType*> type.get()
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         return list_, (self.value_field,)
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_8ListType_1__reduce__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_8ListType___reduce__, "ListType.__reduce__(self)");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_8ListType_1__reduce__ = {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_8ListType_1__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_8ListType___reduce__};
static PyObject *__pyx_pw_7pyarrow_3lib_8ListType_1__reduce__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7pyarrow_3lib_8ListType___reduce__(((struct __pyx_obj_7pyarrow_3lib_ListType *)__pyx_v_self));

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

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

  /* "pyarrow/types.pxi":566
 * 
 *     def __reduce__(self):
 *         return list_, (self.value_field,)             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_list); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 566, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_value_field); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 566, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 566, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2) != (0)) __PYX_ERR(1, 566, __pyx_L1_error);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 566, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1) != (0)) __PYX_ERR(1, 566, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3) != (0)) __PYX_ERR(1, 566, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":565
 *         self.list_type = <const CListType*> type.get()
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         return list_, (self.value_field,)
 * 
*/

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

/* "pyarrow/types.pxi":568
 *         return list_, (self.value_field,)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def value_field(self):
 *         """
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_8ListType_11value_field_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_8ListType_11value_field_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_8ListType_11value_field___get__(((struct __pyx_obj_7pyarrow_3lib_ListType *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_8ListType_11value_field___get__(struct __pyx_obj_7pyarrow_3lib_ListType *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyarrow/types.pxi":579
 *         pyarrow.Field<item: string>
 *         """
 *         return pyarrow_wrap_field(self.list_type.value_field())             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "list_type");
    __PYX_ERR(1, 579, __pyx_L1_error)
  }
  __pyx_t_1 = pyarrow_wrap_field(__pyx_v_self->list_type->value_field()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 579, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":568
 *         return list_, (self.value_field,)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def value_field(self):
 *         """
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib.ListType.value_field.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":581
 *         return pyarrow_wrap_field(self.list_type.value_field())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def value_type(self):
 *         """
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_8ListType_10value_type_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_8ListType_10value_type_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_8ListType_10value_type___get__(((struct __pyx_obj_7pyarrow_3lib_ListType *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_8ListType_10value_type___get__(struct __pyx_obj_7pyarrow_3lib_ListType *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyarrow/types.pxi":592
 *         DataType(string)
 *         """
 *         return pyarrow_wrap_data_type(self.list_type.value_type())             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "list_type");
    __PYX_ERR(1, 592, __pyx_L1_error)
  }
  __pyx_t_1 = pyarrow_wrap_data_type(__pyx_v_self->list_type->value_type()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 592, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":581
 *         return pyarrow_wrap_field(self.list_type.value_field())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def value_type(self):
 *         """
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib.ListType.value_type.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":609
 *     """
 * 
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:             # <<<<<<<<<<<<<<
 *         DataType.init(self, type)
 *         self.list_type = <const CLargeListType*> type.get()
*/

static void __pyx_f_7pyarrow_3lib_13LargeListType_init(struct __pyx_obj_7pyarrow_3lib_LargeListType *__pyx_v_self, std::shared_ptr< arrow::DataType>  const &__pyx_v_type) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "pyarrow/types.pxi":610
 * 
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:
 *         DataType.init(self, type)             # <<<<<<<<<<<<<<
 *         self.list_type = <const CLargeListType*> type.get()
 * 
*/
  __pyx_f_7pyarrow_3lib_8DataType_init(((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_v_self), __pyx_v_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 610, __pyx_L1_error)

  /* "pyarrow/types.pxi":611
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:
 *         DataType.init(self, type)
 *         self.list_type = <const CLargeListType*> type.get()             # <<<<<<<<<<<<<<
 * 
 *     def __reduce__(self):
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "list_type");
    __PYX_ERR(1, 611, __pyx_L1_error)
  }
  __pyx_v_self->list_type = (( arrow::LargeListType const *)__pyx_v_type.get());

  /* "pyarrow/types.pxi":609
 *     """
 * 
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:             # <<<<<<<<<<<<<<
 *         DataType.init(self, type)
 *         self.list_type = <const CLargeListType*> type.get()
*/

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyarrow.lib.LargeListType.init", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
}

/* "pyarrow/types.pxi":613
 *         self.list_type = <const CLargeListType*> type.get()
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         return large_list, (self.value_field,)
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_13LargeListType_1__reduce__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_13LargeListType___reduce__, "LargeListType.__reduce__(self)");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_13LargeListType_1__reduce__ = {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_13LargeListType_1__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_13LargeListType___reduce__};
static PyObject *__pyx_pw_7pyarrow_3lib_13LargeListType_1__reduce__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7pyarrow_3lib_13LargeListType___reduce__(((struct __pyx_obj_7pyarrow_3lib_LargeListType *)__pyx_v_self));

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

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

  /* "pyarrow/types.pxi":614
 * 
 *     def __reduce__(self):
 *         return large_list, (self.value_field,)             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_large_list); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 614, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_value_field); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 614, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 614, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2) != (0)) __PYX_ERR(1, 614, __pyx_L1_error);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 614, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1) != (0)) __PYX_ERR(1, 614, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3) != (0)) __PYX_ERR(1, 614, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":613
 *         self.list_type = <const CLargeListType*> type.get()
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         return large_list, (self.value_field,)
 * 
*/

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

/* "pyarrow/types.pxi":616
 *         return large_list, (self.value_field,)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def value_field(self):
 *         return pyarrow_wrap_field(self.list_type.value_field())
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_13LargeListType_11value_field_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_13LargeListType_11value_field_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_13LargeListType_11value_field___get__(((struct __pyx_obj_7pyarrow_3lib_LargeListType *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_13LargeListType_11value_field___get__(struct __pyx_obj_7pyarrow_3lib_LargeListType *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyarrow/types.pxi":618
 *     @property
 *     def value_field(self):
 *         return pyarrow_wrap_field(self.list_type.value_field())             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "list_type");
    __PYX_ERR(1, 618, __pyx_L1_error)
  }
  __pyx_t_1 = pyarrow_wrap_field(__pyx_v_self->list_type->value_field()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 618, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":616
 *         return large_list, (self.value_field,)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def value_field(self):
 *         return pyarrow_wrap_field(self.list_type.value_field())
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib.LargeListType.value_field.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":620
 *         return pyarrow_wrap_field(self.list_type.value_field())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def value_type(self):
 *         """
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_13LargeListType_10value_type_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_13LargeListType_10value_type_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_13LargeListType_10value_type___get__(((struct __pyx_obj_7pyarrow_3lib_LargeListType *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_13LargeListType_10value_type___get__(struct __pyx_obj_7pyarrow_3lib_LargeListType *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyarrow/types.pxi":631
 *         DataType(string)
 *         """
 *         return pyarrow_wrap_data_type(self.list_type.value_type())             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "list_type");
    __PYX_ERR(1, 631, __pyx_L1_error)
  }
  __pyx_t_1 = pyarrow_wrap_data_type(__pyx_v_self->list_type->value_type()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 631, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":620
 *         return pyarrow_wrap_field(self.list_type.value_field())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def value_type(self):
 *         """
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib.LargeListType.value_type.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":647
 *     """
 * 
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:             # <<<<<<<<<<<<<<
 *         DataType.init(self, type)
 *         self.list_view_type = <const CListViewType*> type.get()
*/

static void __pyx_f_7pyarrow_3lib_12ListViewType_init(struct __pyx_obj_7pyarrow_3lib_ListViewType *__pyx_v_self, std::shared_ptr< arrow::DataType>  const &__pyx_v_type) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "pyarrow/types.pxi":648
 * 
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:
 *         DataType.init(self, type)             # <<<<<<<<<<<<<<
 *         self.list_view_type = <const CListViewType*> type.get()
 * 
*/
  __pyx_f_7pyarrow_3lib_8DataType_init(((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_v_self), __pyx_v_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 648, __pyx_L1_error)

  /* "pyarrow/types.pxi":649
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:
 *         DataType.init(self, type)
 *         self.list_view_type = <const CListViewType*> type.get()             # <<<<<<<<<<<<<<
 * 
 *     def __reduce__(self):
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "list_view_type");
    __PYX_ERR(1, 649, __pyx_L1_error)
  }
  __pyx_v_self->list_view_type = (( arrow::ListViewType const *)__pyx_v_type.get());

  /* "pyarrow/types.pxi":647
 *     """
 * 
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:             # <<<<<<<<<<<<<<
 *         DataType.init(self, type)
 *         self.list_view_type = <const CListViewType*> type.get()
*/

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyarrow.lib.ListViewType.init", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
}

/* "pyarrow/types.pxi":651
 *         self.list_view_type = <const CListViewType*> type.get()
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         return list_view, (self.value_field,)
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_12ListViewType_1__reduce__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_12ListViewType___reduce__, "ListViewType.__reduce__(self)");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_12ListViewType_1__reduce__ = {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12ListViewType_1__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12ListViewType___reduce__};
static PyObject *__pyx_pw_7pyarrow_3lib_12ListViewType_1__reduce__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7pyarrow_3lib_12ListViewType___reduce__(((struct __pyx_obj_7pyarrow_3lib_ListViewType *)__pyx_v_self));

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

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

  /* "pyarrow/types.pxi":652
 * 
 *     def __reduce__(self):
 *         return list_view, (self.value_field,)             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_list_view); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 652, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_value_field); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 652, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 652, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2) != (0)) __PYX_ERR(1, 652, __pyx_L1_error);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 652, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1) != (0)) __PYX_ERR(1, 652, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3) != (0)) __PYX_ERR(1, 652, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":651
 *         self.list_view_type = <const CListViewType*> type.get()
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         return list_view, (self.value_field,)
 * 
*/

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

/* "pyarrow/types.pxi":654
 *         return list_view, (self.value_field,)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def value_field(self):
 *         """
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_12ListViewType_11value_field_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_12ListViewType_11value_field_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_12ListViewType_11value_field___get__(((struct __pyx_obj_7pyarrow_3lib_ListViewType *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_12ListViewType_11value_field___get__(struct __pyx_obj_7pyarrow_3lib_ListViewType *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyarrow/types.pxi":665
 *         pyarrow.Field<item: string>
 *         """
 *         return pyarrow_wrap_field(self.list_view_type.value_field())             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "list_view_type");
    __PYX_ERR(1, 665, __pyx_L1_error)
  }
  __pyx_t_1 = pyarrow_wrap_field(__pyx_v_self->list_view_type->value_field()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 665, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":654
 *         return list_view, (self.value_field,)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def value_field(self):
 *         """
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib.ListViewType.value_field.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":667
 *         return pyarrow_wrap_field(self.list_view_type.value_field())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def value_type(self):
 *         """
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_12ListViewType_10value_type_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_12ListViewType_10value_type_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_12ListViewType_10value_type___get__(((struct __pyx_obj_7pyarrow_3lib_ListViewType *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_12ListViewType_10value_type___get__(struct __pyx_obj_7pyarrow_3lib_ListViewType *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyarrow/types.pxi":678
 *         DataType(string)
 *         """
 *         return pyarrow_wrap_data_type(self.list_view_type.value_type())             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "list_view_type");
    __PYX_ERR(1, 678, __pyx_L1_error)
  }
  __pyx_t_1 = pyarrow_wrap_data_type(__pyx_v_self->list_view_type->value_type()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 678, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":667
 *         return pyarrow_wrap_field(self.list_view_type.value_field())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def value_type(self):
 *         """
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib.ListViewType.value_type.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":695
 *     """
 * 
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:             # <<<<<<<<<<<<<<
 *         DataType.init(self, type)
 *         self.list_view_type = <const CLargeListViewType*> type.get()
*/

static void __pyx_f_7pyarrow_3lib_17LargeListViewType_init(struct __pyx_obj_7pyarrow_3lib_LargeListViewType *__pyx_v_self, std::shared_ptr< arrow::DataType>  const &__pyx_v_type) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "pyarrow/types.pxi":696
 * 
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:
 *         DataType.init(self, type)             # <<<<<<<<<<<<<<
 *         self.list_view_type = <const CLargeListViewType*> type.get()
 * 
*/
  __pyx_f_7pyarrow_3lib_8DataType_init(((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_v_self), __pyx_v_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 696, __pyx_L1_error)

  /* "pyarrow/types.pxi":697
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:
 *         DataType.init(self, type)
 *         self.list_view_type = <const CLargeListViewType*> type.get()             # <<<<<<<<<<<<<<
 * 
 *     def __reduce__(self):
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "list_view_type");
    __PYX_ERR(1, 697, __pyx_L1_error)
  }
  __pyx_v_self->list_view_type = (( arrow::LargeListViewType const *)__pyx_v_type.get());

  /* "pyarrow/types.pxi":695
 *     """
 * 
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:             # <<<<<<<<<<<<<<
 *         DataType.init(self, type)
 *         self.list_view_type = <const CLargeListViewType*> type.get()
*/

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyarrow.lib.LargeListViewType.init", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
}

/* "pyarrow/types.pxi":699
 *         self.list_view_type = <const CLargeListViewType*> type.get()
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         return large_list_view, (self.value_field,)
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_17LargeListViewType_1__reduce__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_17LargeListViewType___reduce__, "LargeListViewType.__reduce__(self)");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_17LargeListViewType_1__reduce__ = {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_17LargeListViewType_1__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_17LargeListViewType___reduce__};
static PyObject *__pyx_pw_7pyarrow_3lib_17LargeListViewType_1__reduce__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7pyarrow_3lib_17LargeListViewType___reduce__(((struct __pyx_obj_7pyarrow_3lib_LargeListViewType *)__pyx_v_self));

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

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

  /* "pyarrow/types.pxi":700
 * 
 *     def __reduce__(self):
 *         return large_list_view, (self.value_field,)             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_large_list_view); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 700, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_value_field); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 700, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 700, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2) != (0)) __PYX_ERR(1, 700, __pyx_L1_error);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 700, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1) != (0)) __PYX_ERR(1, 700, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3) != (0)) __PYX_ERR(1, 700, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":699
 *         self.list_view_type = <const CLargeListViewType*> type.get()
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         return large_list_view, (self.value_field,)
 * 
*/

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

/* "pyarrow/types.pxi":702
 *         return large_list_view, (self.value_field,)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def value_field(self):
 *         """
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_17LargeListViewType_11value_field_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_17LargeListViewType_11value_field_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_17LargeListViewType_11value_field___get__(((struct __pyx_obj_7pyarrow_3lib_LargeListViewType *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_17LargeListViewType_11value_field___get__(struct __pyx_obj_7pyarrow_3lib_LargeListViewType *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyarrow/types.pxi":713
 *         pyarrow.Field<item: string>
 *         """
 *         return pyarrow_wrap_field(self.list_view_type.value_field())             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "list_view_type");
    __PYX_ERR(1, 713, __pyx_L1_error)
  }
  __pyx_t_1 = pyarrow_wrap_field(__pyx_v_self->list_view_type->value_field()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 713, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":702
 *         return large_list_view, (self.value_field,)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def value_field(self):
 *         """
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib.LargeListViewType.value_field.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":715
 *         return pyarrow_wrap_field(self.list_view_type.value_field())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def value_type(self):
 *         """
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_17LargeListViewType_10value_type_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_17LargeListViewType_10value_type_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_17LargeListViewType_10value_type___get__(((struct __pyx_obj_7pyarrow_3lib_LargeListViewType *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_17LargeListViewType_10value_type___get__(struct __pyx_obj_7pyarrow_3lib_LargeListViewType *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyarrow/types.pxi":726
 *         DataType(string)
 *         """
 *         return pyarrow_wrap_data_type(self.list_view_type.value_type())             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "list_view_type");
    __PYX_ERR(1, 726, __pyx_L1_error)
  }
  __pyx_t_1 = pyarrow_wrap_data_type(__pyx_v_self->list_view_type->value_type()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 726, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":715
 *         return pyarrow_wrap_field(self.list_view_type.value_field())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def value_type(self):
 *         """
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib.LargeListViewType.value_type.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":744
 *     """
 * 
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:             # <<<<<<<<<<<<<<
 *         DataType.init(self, type)
 *         self.map_type = <const CMapType*> type.get()
*/

static void __pyx_f_7pyarrow_3lib_7MapType_init(struct __pyx_obj_7pyarrow_3lib_MapType *__pyx_v_self, std::shared_ptr< arrow::DataType>  const &__pyx_v_type) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "pyarrow/types.pxi":745
 * 
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:
 *         DataType.init(self, type)             # <<<<<<<<<<<<<<
 *         self.map_type = <const CMapType*> type.get()
 * 
*/
  __pyx_f_7pyarrow_3lib_8DataType_init(((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_v_self), __pyx_v_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 745, __pyx_L1_error)

  /* "pyarrow/types.pxi":746
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:
 *         DataType.init(self, type)
 *         self.map_type = <const CMapType*> type.get()             # <<<<<<<<<<<<<<
 * 
 *     def __reduce__(self):
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "map_type");
    __PYX_ERR(1, 746, __pyx_L1_error)
  }
  __pyx_v_self->map_type = (( arrow::MapType const *)__pyx_v_type.get());

  /* "pyarrow/types.pxi":744
 *     """
 * 
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:             # <<<<<<<<<<<<<<
 *         DataType.init(self, type)
 *         self.map_type = <const CMapType*> type.get()
*/

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyarrow.lib.MapType.init", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
}

/* "pyarrow/types.pxi":748
 *         self.map_type = <const CMapType*> type.get()
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         return map_, (self.key_field, self.item_field)
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_7MapType_1__reduce__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_7MapType___reduce__, "MapType.__reduce__(self)");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_7MapType_1__reduce__ = {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_7MapType_1__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_7MapType___reduce__};
static PyObject *__pyx_pw_7pyarrow_3lib_7MapType_1__reduce__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7pyarrow_3lib_7MapType___reduce__(((struct __pyx_obj_7pyarrow_3lib_MapType *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_7MapType___reduce__(struct __pyx_obj_7pyarrow_3lib_MapType *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce__", 0);

  /* "pyarrow/types.pxi":749
 * 
 *     def __reduce__(self):
 *         return map_, (self.key_field, self.item_field)             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_map); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 749, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_key_field); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 749, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_item_field); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 749, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 749, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2) != (0)) __PYX_ERR(1, 749, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3) != (0)) __PYX_ERR(1, 749, __pyx_L1_error);
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 749, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1) != (0)) __PYX_ERR(1, 749, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_4);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_4) != (0)) __PYX_ERR(1, 749, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_4 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":748
 *         self.map_type = <const CMapType*> type.get()
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         return map_, (self.key_field, self.item_field)
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pyarrow.lib.MapType.__reduce__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":751
 *         return map_, (self.key_field, self.item_field)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def key_field(self):
 *         """
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_7MapType_9key_field_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_7MapType_9key_field_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_7MapType_9key_field___get__(((struct __pyx_obj_7pyarrow_3lib_MapType *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_7MapType_9key_field___get__(struct __pyx_obj_7pyarrow_3lib_MapType *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyarrow/types.pxi":762
 *         pyarrow.Field<key: string not null>
 *         """
 *         return pyarrow_wrap_field(self.map_type.key_field())             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "map_type");
    __PYX_ERR(1, 762, __pyx_L1_error)
  }
  __pyx_t_1 = pyarrow_wrap_field(__pyx_v_self->map_type->key_field()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 762, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":751
 *         return map_, (self.key_field, self.item_field)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def key_field(self):
 *         """
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib.MapType.key_field.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":764
 *         return pyarrow_wrap_field(self.map_type.key_field())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def key_type(self):
 *         """
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_7MapType_8key_type_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_7MapType_8key_type_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_7MapType_8key_type___get__(((struct __pyx_obj_7pyarrow_3lib_MapType *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_7MapType_8key_type___get__(struct __pyx_obj_7pyarrow_3lib_MapType *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyarrow/types.pxi":775
 *         DataType(string)
 *         """
 *         return pyarrow_wrap_data_type(self.map_type.key_type())             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "map_type");
    __PYX_ERR(1, 775, __pyx_L1_error)
  }
  __pyx_t_1 = pyarrow_wrap_data_type(__pyx_v_self->map_type->key_type()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 775, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":764
 *         return pyarrow_wrap_field(self.map_type.key_field())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def key_type(self):
 *         """
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib.MapType.key_type.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":777
 *         return pyarrow_wrap_data_type(self.map_type.key_type())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def item_field(self):
 *         """
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_7MapType_10item_field_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_7MapType_10item_field_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_7MapType_10item_field___get__(((struct __pyx_obj_7pyarrow_3lib_MapType *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_7MapType_10item_field___get__(struct __pyx_obj_7pyarrow_3lib_MapType *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyarrow/types.pxi":788
 *         pyarrow.Field<value: int32>
 *         """
 *         return pyarrow_wrap_field(self.map_type.item_field())             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "map_type");
    __PYX_ERR(1, 788, __pyx_L1_error)
  }
  __pyx_t_1 = pyarrow_wrap_field(__pyx_v_self->map_type->item_field()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 788, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":777
 *         return pyarrow_wrap_data_type(self.map_type.key_type())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def item_field(self):
 *         """
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib.MapType.item_field.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":790
 *         return pyarrow_wrap_field(self.map_type.item_field())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def item_type(self):
 *         """
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_7MapType_9item_type_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_7MapType_9item_type_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_7MapType_9item_type___get__(((struct __pyx_obj_7pyarrow_3lib_MapType *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_7MapType_9item_type___get__(struct __pyx_obj_7pyarrow_3lib_MapType *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyarrow/types.pxi":801
 *         DataType(int32)
 *         """
 *         return pyarrow_wrap_data_type(self.map_type.item_type())             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "map_type");
    __PYX_ERR(1, 801, __pyx_L1_error)
  }
  __pyx_t_1 = pyarrow_wrap_data_type(__pyx_v_self->map_type->item_type()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 801, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":790
 *         return pyarrow_wrap_field(self.map_type.item_field())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def item_type(self):
 *         """
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib.MapType.item_type.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":803
 *         return pyarrow_wrap_data_type(self.map_type.item_type())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def keys_sorted(self):
 *         """
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_7MapType_11keys_sorted_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_7MapType_11keys_sorted_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_7MapType_11keys_sorted___get__(((struct __pyx_obj_7pyarrow_3lib_MapType *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_7MapType_11keys_sorted___get__(struct __pyx_obj_7pyarrow_3lib_MapType *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyarrow/types.pxi":814
 *         True
 *         """
 *         return self.map_type.keys_sorted()             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "map_type");
    __PYX_ERR(1, 814, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->map_type->keys_sorted()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 814, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":803
 *         return pyarrow_wrap_data_type(self.map_type.item_type())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def keys_sorted(self):
 *         """
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib.MapType.keys_sorted.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":830
 *     """
 * 
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:             # <<<<<<<<<<<<<<
 *         DataType.init(self, type)
 *         self.list_type = <const CFixedSizeListType*> type.get()
*/

static void __pyx_f_7pyarrow_3lib_17FixedSizeListType_init(struct __pyx_obj_7pyarrow_3lib_FixedSizeListType *__pyx_v_self, std::shared_ptr< arrow::DataType>  const &__pyx_v_type) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "pyarrow/types.pxi":831
 * 
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:
 *         DataType.init(self, type)             # <<<<<<<<<<<<<<
 *         self.list_type = <const CFixedSizeListType*> type.get()
 * 
*/
  __pyx_f_7pyarrow_3lib_8DataType_init(((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_v_self), __pyx_v_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 831, __pyx_L1_error)

  /* "pyarrow/types.pxi":832
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:
 *         DataType.init(self, type)
 *         self.list_type = <const CFixedSizeListType*> type.get()             # <<<<<<<<<<<<<<
 * 
 *     def __reduce__(self):
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "list_type");
    __PYX_ERR(1, 832, __pyx_L1_error)
  }
  __pyx_v_self->list_type = (( arrow::FixedSizeListType const *)__pyx_v_type.get());

  /* "pyarrow/types.pxi":830
 *     """
 * 
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:             # <<<<<<<<<<<<<<
 *         DataType.init(self, type)
 *         self.list_type = <const CFixedSizeListType*> type.get()
*/

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyarrow.lib.FixedSizeListType.init", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
}

/* "pyarrow/types.pxi":834
 *         self.list_type = <const CFixedSizeListType*> type.get()
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         return list_, (self.value_type, self.list_size)
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_17FixedSizeListType_1__reduce__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_17FixedSizeListType___reduce__, "FixedSizeListType.__reduce__(self)");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_17FixedSizeListType_1__reduce__ = {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_17FixedSizeListType_1__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_17FixedSizeListType___reduce__};
static PyObject *__pyx_pw_7pyarrow_3lib_17FixedSizeListType_1__reduce__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7pyarrow_3lib_17FixedSizeListType___reduce__(((struct __pyx_obj_7pyarrow_3lib_FixedSizeListType *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_17FixedSizeListType___reduce__(struct __pyx_obj_7pyarrow_3lib_FixedSizeListType *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce__", 0);

  /* "pyarrow/types.pxi":835
 * 
 *     def __reduce__(self):
 *         return list_, (self.value_type, self.list_size)             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_list); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 835, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_value_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 835, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_list_size); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 835, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 835, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2) != (0)) __PYX_ERR(1, 835, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3) != (0)) __PYX_ERR(1, 835, __pyx_L1_error);
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 835, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1) != (0)) __PYX_ERR(1, 835, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_4);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_4) != (0)) __PYX_ERR(1, 835, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_4 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":834
 *         self.list_type = <const CFixedSizeListType*> type.get()
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         return list_, (self.value_type, self.list_size)
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pyarrow.lib.FixedSizeListType.__reduce__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":837
 *         return list_, (self.value_type, self.list_size)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def value_field(self):
 *         """
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_17FixedSizeListType_11value_field_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_17FixedSizeListType_11value_field_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_17FixedSizeListType_11value_field___get__(((struct __pyx_obj_7pyarrow_3lib_FixedSizeListType *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_17FixedSizeListType_11value_field___get__(struct __pyx_obj_7pyarrow_3lib_FixedSizeListType *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyarrow/types.pxi":848
 *         pyarrow.Field<item: int32>
 *         """
 *         return pyarrow_wrap_field(self.list_type.value_field())             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "list_type");
    __PYX_ERR(1, 848, __pyx_L1_error)
  }
  __pyx_t_1 = pyarrow_wrap_field(__pyx_v_self->list_type->value_field()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 848, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":837
 *         return list_, (self.value_type, self.list_size)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def value_field(self):
 *         """
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib.FixedSizeListType.value_field.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":850
 *         return pyarrow_wrap_field(self.list_type.value_field())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def value_type(self):
 *         """
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_17FixedSizeListType_10value_type_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_17FixedSizeListType_10value_type_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_17FixedSizeListType_10value_type___get__(((struct __pyx_obj_7pyarrow_3lib_FixedSizeListType *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_17FixedSizeListType_10value_type___get__(struct __pyx_obj_7pyarrow_3lib_FixedSizeListType *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyarrow/types.pxi":861
 *         DataType(int32)
 *         """
 *         return pyarrow_wrap_data_type(self.list_type.value_type())             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "list_type");
    __PYX_ERR(1, 861, __pyx_L1_error)
  }
  __pyx_t_1 = pyarrow_wrap_data_type(__pyx_v_self->list_type->value_type()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 861, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":850
 *         return pyarrow_wrap_field(self.list_type.value_field())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def value_type(self):
 *         """
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib.FixedSizeListType.value_type.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":863
 *         return pyarrow_wrap_data_type(self.list_type.value_type())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def list_size(self):
 *         """
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_17FixedSizeListType_9list_size_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_17FixedSizeListType_9list_size_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_17FixedSizeListType_9list_size___get__(((struct __pyx_obj_7pyarrow_3lib_FixedSizeListType *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_17FixedSizeListType_9list_size___get__(struct __pyx_obj_7pyarrow_3lib_FixedSizeListType *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyarrow/types.pxi":874
 *         2
 *         """
 *         return self.list_type.list_size()             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "list_type");
    __PYX_ERR(1, 874, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyLong_From_int32_t(__pyx_v_self->list_type->list_size()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 874, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":863
 *         return pyarrow_wrap_data_type(self.list_type.value_type())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def list_size(self):
 *         """
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib.FixedSizeListType.list_size.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":910
 *     """
 * 
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:             # <<<<<<<<<<<<<<
 *         DataType.init(self, type)
 *         self.struct_type = <const CStructType*> type.get()
*/

static void __pyx_f_7pyarrow_3lib_10StructType_init(struct __pyx_obj_7pyarrow_3lib_StructType *__pyx_v_self, std::shared_ptr< arrow::DataType>  const &__pyx_v_type) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "pyarrow/types.pxi":911
 * 
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:
 *         DataType.init(self, type)             # <<<<<<<<<<<<<<
 *         self.struct_type = <const CStructType*> type.get()
 * 
*/
  __pyx_f_7pyarrow_3lib_8DataType_init(((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_v_self), __pyx_v_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 911, __pyx_L1_error)

  /* "pyarrow/types.pxi":912
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:
 *         DataType.init(self, type)
 *         self.struct_type = <const CStructType*> type.get()             # <<<<<<<<<<<<<<
 * 
 *     cdef Field field_by_name(self, name):
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "struct_type");
    __PYX_ERR(1, 912, __pyx_L1_error)
  }
  __pyx_v_self->struct_type = (( arrow::StructType const *)__pyx_v_type.get());

  /* "pyarrow/types.pxi":910
 *     """
 * 
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:             # <<<<<<<<<<<<<<
 *         DataType.init(self, type)
 *         self.struct_type = <const CStructType*> type.get()
*/

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyarrow.lib.StructType.init", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
}

/* "pyarrow/types.pxi":914
 *         self.struct_type = <const CStructType*> type.get()
 * 
 *     cdef Field field_by_name(self, name):             # <<<<<<<<<<<<<<
 *         """
 *         Return a child field by its name.
*/

static struct __pyx_obj_7pyarrow_3lib_Field *__pyx_f_7pyarrow_3lib_10StructType_field_by_name(struct __pyx_obj_7pyarrow_3lib_StructType *__pyx_v_self, PyObject *__pyx_v_name) {
  std::vector<std::shared_ptr< arrow::Field> >  __pyx_v_fields;
  struct __pyx_obj_7pyarrow_3lib_Field *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  std::string __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("field_by_name", 0);

  /* "pyarrow/types.pxi":936
 *         cdef vector[shared_ptr[CField]] fields
 * 
 *         fields = self.struct_type.GetAllFieldsByName(tobytes(name))             # <<<<<<<<<<<<<<
 *         if fields.size() == 0:
 *             raise KeyError(name)
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "struct_type");
    __PYX_ERR(1, 936, __pyx_L1_error)
  }
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_tobytes); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 936, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_name};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 936, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_t_5 = __pyx_convert_string_from_py_6libcpp_6string_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 936, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_fields = __pyx_v_self->struct_type->GetAllFieldsByName(__pyx_t_5);

  /* "pyarrow/types.pxi":937
 * 
 *         fields = self.struct_type.GetAllFieldsByName(tobytes(name))
 *         if fields.size() == 0:             # <<<<<<<<<<<<<<
 *             raise KeyError(name)
 *         elif fields.size() > 1:
*/
  __pyx_t_6 = (__pyx_v_fields.size() == 0);
  if (unlikely(__pyx_t_6)) {

    /* "pyarrow/types.pxi":938
 *         fields = self.struct_type.GetAllFieldsByName(tobytes(name))
 *         if fields.size() == 0:
 *             raise KeyError(name)             # <<<<<<<<<<<<<<
 *         elif fields.size() > 1:
 *             warnings.warn("Struct field name corresponds to more "
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_name};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_KeyError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 938, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(1, 938, __pyx_L1_error)

    /* "pyarrow/types.pxi":937
 * 
 *         fields = self.struct_type.GetAllFieldsByName(tobytes(name))
 *         if fields.size() == 0:             # <<<<<<<<<<<<<<
 *             raise KeyError(name)
 *         elif fields.size() > 1:
*/
  }

  /* "pyarrow/types.pxi":939
 *         if fields.size() == 0:
 *             raise KeyError(name)
 *         elif fields.size() > 1:             # <<<<<<<<<<<<<<
 *             warnings.warn("Struct field name corresponds to more "
 *                           "than one field", UserWarning)
*/
  __pyx_t_6 = (__pyx_v_fields.size() > 1);
  if (unlikely(__pyx_t_6)) {

    /* "pyarrow/types.pxi":940
 *             raise KeyError(name)
 *         elif fields.size() > 1:
 *             warnings.warn("Struct field name corresponds to more "             # <<<<<<<<<<<<<<
 *                           "than one field", UserWarning)
 *             raise KeyError(name)
*/
    __pyx_t_3 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_warnings); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 940, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_warn); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 940, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyarrow/types.pxi":941
 *         elif fields.size() > 1:
 *             warnings.warn("Struct field name corresponds to more "
 *                           "than one field", UserWarning)             # <<<<<<<<<<<<<<
 *             raise KeyError(name)
 *         else:
*/
    __pyx_t_4 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_7);
      assert(__pyx_t_3);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
      __pyx_t_4 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Struct_field_name_corresponds_to, ((PyObject *)(((PyTypeObject*)PyExc_UserWarning)))};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 940, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyarrow/types.pxi":942
 *             warnings.warn("Struct field name corresponds to more "
 *                           "than one field", UserWarning)
 *             raise KeyError(name)             # <<<<<<<<<<<<<<
 *         else:
 *             return pyarrow_wrap_field(fields[0])
*/
    __pyx_t_7 = NULL;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_name};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_KeyError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 942, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(1, 942, __pyx_L1_error)

    /* "pyarrow/types.pxi":939
 *         if fields.size() == 0:
 *             raise KeyError(name)
 *         elif fields.size() > 1:             # <<<<<<<<<<<<<<
 *             warnings.warn("Struct field name corresponds to more "
 *                           "than one field", UserWarning)
*/
  }

  /* "pyarrow/types.pxi":944
 *             raise KeyError(name)
 *         else:
 *             return pyarrow_wrap_field(fields[0])             # <<<<<<<<<<<<<<
 * 
 *     def get_field_index(self, name):
*/
  /*else*/ {
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_1 = pyarrow_wrap_field((__pyx_v_fields[0])); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 944, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Field))))) __PYX_ERR(1, 944, __pyx_L1_error)
    __pyx_r = ((struct __pyx_obj_7pyarrow_3lib_Field *)__pyx_t_1);
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }

  /* "pyarrow/types.pxi":914
 *         self.struct_type = <const CStructType*> type.get()
 * 
 *     cdef Field field_by_name(self, name):             # <<<<<<<<<<<<<<
 *         """
 *         Return a child field by its name.
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("pyarrow.lib.StructType.field_by_name", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":946
 *             return pyarrow_wrap_field(fields[0])
 * 
 *     def get_field_index(self, name):             # <<<<<<<<<<<<<<
 *         """
 *         Return index of the unique field with the given name.
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_10StructType_1get_field_index(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_10StructType_get_field_index, "StructType.get_field_index(self, name)\n\nReturn index of the unique field with the given name.\n\nParameters\n----------\nname : str\n    The name of the field to look up.\n\nReturns\n-------\nindex : int\n    The index of the field with the given name; -1 if the\n    name isn't found or there are several fields with the given\n    name.\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> struct_type = pa.struct({'x': pa.int32(), 'y': pa.string()})\n\nIndex of the field with a name 'y':\n\n>>> struct_type.get_field_index('y')\n1\n\nIndex of the field that does not exist:\n\n>>> struct_type.get_field_index('z')\n-1");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_10StructType_1get_field_index = {"get_field_index", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10StructType_1get_field_index, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10StructType_get_field_index};
static PyObject *__pyx_pw_7pyarrow_3lib_10StructType_1get_field_index(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_name = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_field_index (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_name,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 946, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 946, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "get_field_index", 0) < (0)) __PYX_ERR(1, 946, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("get_field_index", 1, 1, 1, i); __PYX_ERR(1, 946, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 946, __pyx_L3_error)
    }
    __pyx_v_name = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("get_field_index", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 946, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("pyarrow.lib.StructType.get_field_index", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyarrow_3lib_10StructType_get_field_index(((struct __pyx_obj_7pyarrow_3lib_StructType *)__pyx_v_self), __pyx_v_name);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7pyarrow_3lib_10StructType_get_field_index(struct __pyx_obj_7pyarrow_3lib_StructType *__pyx_v_self, PyObject *__pyx_v_name) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  std::string __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_field_index", 0);

  /* "pyarrow/types.pxi":977
 *         -1
 *         """
 *         return self.struct_type.GetFieldIndex(tobytes(name))             # <<<<<<<<<<<<<<
 * 
 *     cpdef Field field(self, i):
*/
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "struct_type");
    __PYX_ERR(1, 977, __pyx_L1_error)
  }
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_tobytes); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 977, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_name};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 977, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_t_5 = __pyx_convert_string_from_py_6libcpp_6string_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 977, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_v_self->struct_type->GetFieldIndex(__pyx_t_5)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 977, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":946
 *             return pyarrow_wrap_field(fields[0])
 * 
 *     def get_field_index(self, name):             # <<<<<<<<<<<<<<
 *         """
 *         Return index of the unique field with the given name.
*/

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

/* "pyarrow/types.pxi":979
 *         return self.struct_type.GetFieldIndex(tobytes(name))
 * 
 *     cpdef Field field(self, i):             # <<<<<<<<<<<<<<
 *         """
 *         Select a field by its column name or numeric index.
*/

static PyObject *__pyx_pw_7pyarrow_3lib_10StructType_3field(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_7pyarrow_3lib_Field *__pyx_f_7pyarrow_3lib_10StructType_field(struct __pyx_obj_7pyarrow_3lib_StructType *__pyx_v_self, PyObject *__pyx_v_i, int __pyx_skip_dispatch) {
  struct __pyx_obj_7pyarrow_3lib_Field *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("field", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_StructType &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_field); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 979, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7pyarrow_3lib_10StructType_3field)) {
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_i};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 979, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Field))))) __PYX_ERR(1, 979, __pyx_L1_error)
        __pyx_r = ((struct __pyx_obj_7pyarrow_3lib_Field *)__pyx_t_2);
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyarrow/types.pxi":1007
 *         pyarrow.Field<x: int32>
 *         """
 *         if isinstance(i, (bytes, str)):             # <<<<<<<<<<<<<<
 *             return self.field_by_name(i)
 *         elif isinstance(i, int):
*/
  __pyx_t_7 = PyBytes_Check(__pyx_v_i); 
  if (!__pyx_t_7) {
  } else {
    __pyx_t_6 = __pyx_t_7;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_7 = PyUnicode_Check(__pyx_v_i); 
  __pyx_t_6 = __pyx_t_7;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_6) {

    /* "pyarrow/types.pxi":1008
 *         """
 *         if isinstance(i, (bytes, str)):
 *             return self.field_by_name(i)             # <<<<<<<<<<<<<<
 *         elif isinstance(i, int):
 *             return DataType.field(self, i)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "field_by_name");
      __PYX_ERR(1, 1008, __pyx_L1_error)
    }
    __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7pyarrow_3lib_StructType *)__pyx_v_self->__pyx_base.__pyx_vtab)->field_by_name(__pyx_v_self, __pyx_v_i)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1008, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = ((struct __pyx_obj_7pyarrow_3lib_Field *)__pyx_t_1);
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "pyarrow/types.pxi":1007
 *         pyarrow.Field<x: int32>
 *         """
 *         if isinstance(i, (bytes, str)):             # <<<<<<<<<<<<<<
 *             return self.field_by_name(i)
 *         elif isinstance(i, int):
*/
  }

  /* "pyarrow/types.pxi":1009
 *         if isinstance(i, (bytes, str)):
 *             return self.field_by_name(i)
 *         elif isinstance(i, int):             # <<<<<<<<<<<<<<
 *             return DataType.field(self, i)
 *         else:
*/
  __pyx_t_6 = PyLong_Check(__pyx_v_i); 
  if (likely(__pyx_t_6)) {

    /* "pyarrow/types.pxi":1010
 *             return self.field_by_name(i)
 *         elif isinstance(i, int):
 *             return DataType.field(self, i)             # <<<<<<<<<<<<<<
 *         else:
 *             raise TypeError('Expected integer or string index')
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_1 = ((PyObject *)__pyx_f_7pyarrow_3lib_8DataType_field(((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_v_self), __pyx_v_i, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1010, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = ((struct __pyx_obj_7pyarrow_3lib_Field *)__pyx_t_1);
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "pyarrow/types.pxi":1009
 *         if isinstance(i, (bytes, str)):
 *             return self.field_by_name(i)
 *         elif isinstance(i, int):             # <<<<<<<<<<<<<<
 *             return DataType.field(self, i)
 *         else:
*/
  }

  /* "pyarrow/types.pxi":1012
 *             return DataType.field(self, i)
 *         else:
 *             raise TypeError('Expected integer or string index')             # <<<<<<<<<<<<<<
 * 
 *     def get_all_field_indices(self, name):
*/
  /*else*/ {
    __pyx_t_2 = NULL;
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Expected_integer_or_string_index};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1012, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(1, 1012, __pyx_L1_error)
  }

  /* "pyarrow/types.pxi":979
 *         return self.struct_type.GetFieldIndex(tobytes(name))
 * 
 *     cpdef Field field(self, i):             # <<<<<<<<<<<<<<
 *         """
 *         Select a field by its column name or numeric index.
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pyarrow.lib.StructType.field", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_10StructType_3field(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_10StructType_2field, "StructType.field(self, i) -> Field\n\nSelect a field by its column name or numeric index.\n\nParameters\n----------\ni : int or str\n\nReturns\n-------\npyarrow.Field\n\nExamples\n--------\n\n>>> import pyarrow as pa\n>>> struct_type = pa.struct({'x': pa.int32(), 'y': pa.string()})\n\nSelect the second field:\n\n>>> struct_type.field(1)\npyarrow.Field<y: string>\n\nSelect the field named 'x':\n\n>>> struct_type.field('x')\npyarrow.Field<x: int32>");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_10StructType_3field = {"field", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10StructType_3field, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10StructType_2field};
static PyObject *__pyx_pw_7pyarrow_3lib_10StructType_3field(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_i = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("field (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_i,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 979, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 979, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "field", 0) < (0)) __PYX_ERR(1, 979, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("field", 1, 1, 1, i); __PYX_ERR(1, 979, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 979, __pyx_L3_error)
    }
    __pyx_v_i = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("field", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 979, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("pyarrow.lib.StructType.field", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyarrow_3lib_10StructType_2field(((struct __pyx_obj_7pyarrow_3lib_StructType *)__pyx_v_self), __pyx_v_i);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7pyarrow_3lib_10StructType_2field(struct __pyx_obj_7pyarrow_3lib_StructType *__pyx_v_self, PyObject *__pyx_v_i) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("field", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_7pyarrow_3lib_10StructType_field(__pyx_v_self, __pyx_v_i, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 979, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib.StructType.field", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":1014
 *             raise TypeError('Expected integer or string index')
 * 
 *     def get_all_field_indices(self, name):             # <<<<<<<<<<<<<<
 *         """
 *         Return sorted list of indices for the fields with the given name.
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_10StructType_5get_all_field_indices(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_10StructType_4get_all_field_indices, "StructType.get_all_field_indices(self, name)\n\nReturn sorted list of indices for the fields with the given name.\n\nParameters\n----------\nname : str\n    The name of the field to look up.\n\nReturns\n-------\nindices : List[int]\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> struct_type = pa.struct({'x': pa.int32(), 'y': pa.string()})\n>>> struct_type.get_all_field_indices('x')\n[0]");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_10StructType_5get_all_field_indices = {"get_all_field_indices", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10StructType_5get_all_field_indices, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10StructType_4get_all_field_indices};
static PyObject *__pyx_pw_7pyarrow_3lib_10StructType_5get_all_field_indices(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_name = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_all_field_indices (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_name,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 1014, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 1014, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "get_all_field_indices", 0) < (0)) __PYX_ERR(1, 1014, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("get_all_field_indices", 1, 1, 1, i); __PYX_ERR(1, 1014, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 1014, __pyx_L3_error)
    }
    __pyx_v_name = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("get_all_field_indices", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 1014, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("pyarrow.lib.StructType.get_all_field_indices", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyarrow_3lib_10StructType_4get_all_field_indices(((struct __pyx_obj_7pyarrow_3lib_StructType *)__pyx_v_self), __pyx_v_name);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7pyarrow_3lib_10StructType_4get_all_field_indices(struct __pyx_obj_7pyarrow_3lib_StructType *__pyx_v_self, PyObject *__pyx_v_name) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  std::string __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_all_field_indices", 0);

  /* "pyarrow/types.pxi":1034
 *         [0]
 *         """
 *         return self.struct_type.GetAllFieldIndices(tobytes(name))             # <<<<<<<<<<<<<<
 * 
 *     def __len__(self):
*/
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "struct_type");
    __PYX_ERR(1, 1034, __pyx_L1_error)
  }
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_tobytes); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1034, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_name};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1034, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_t_5 = __pyx_convert_string_from_py_6libcpp_6string_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1034, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __pyx_convert_vector_to_py_int(__pyx_v_self->struct_type->GetAllFieldIndices(__pyx_t_5)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1034, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":1014
 *             raise TypeError('Expected integer or string index')
 * 
 *     def get_all_field_indices(self, name):             # <<<<<<<<<<<<<<
 *         """
 *         Return sorted list of indices for the fields with the given name.
*/

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

/* "pyarrow/types.pxi":1036
 *         return self.struct_type.GetAllFieldIndices(tobytes(name))
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         """
 *         Like num_fields().
*/

/* Python wrapper */
static Py_ssize_t __pyx_pw_7pyarrow_3lib_10StructType_7__len__(PyObject *__pyx_v_self); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_10StructType_6__len__, "StructType.__len__(self)\n\nLike num_fields().");
#if CYTHON_UPDATE_DESCRIPTOR_DOC
struct wrapperbase __pyx_wrapperbase_7pyarrow_3lib_10StructType_6__len__;
#endif
static Py_ssize_t __pyx_pw_7pyarrow_3lib_10StructType_7__len__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_10StructType_6__len__(((struct __pyx_obj_7pyarrow_3lib_StructType *)__pyx_v_self));

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

static Py_ssize_t __pyx_pf_7pyarrow_3lib_10StructType_6__len__(struct __pyx_obj_7pyarrow_3lib_StructType *__pyx_v_self) {
  Py_ssize_t __pyx_r;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "pyarrow/types.pxi":1040
 *         Like num_fields().
 *         """
 *         return self.type.num_fields()             # <<<<<<<<<<<<<<
 * 
 *     def __iter__(self):
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "type");
    __PYX_ERR(1, 1040, __pyx_L1_error)
  }
  __pyx_r = __pyx_v_self->__pyx_base.type->num_fields();
  goto __pyx_L0;

  /* "pyarrow/types.pxi":1036
 *         return self.struct_type.GetAllFieldIndices(tobytes(name))
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         """
 *         Like num_fields().
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyarrow.lib.StructType.__len__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  return __pyx_r;
}
static PyObject *__pyx_gb_7pyarrow_3lib_10StructType_10generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "pyarrow/types.pxi":1042
 *         return self.type.num_fields()
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterate over struct fields, in order.
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_10StructType_9__iter__(PyObject *__pyx_v_self); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_10StructType_8__iter__, "StructType.__iter__(self)\n\nIterate over struct fields, in order.");
#if CYTHON_UPDATE_DESCRIPTOR_DOC
struct wrapperbase __pyx_wrapperbase_7pyarrow_3lib_10StructType_8__iter__;
#endif
static PyObject *__pyx_pw_7pyarrow_3lib_10StructType_9__iter__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_10StructType_8__iter__(((struct __pyx_obj_7pyarrow_3lib_StructType *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_10StructType_8__iter__(struct __pyx_obj_7pyarrow_3lib_StructType *__pyx_v_self) {
  struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct____iter__ *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__iter__", 0);
  __pyx_cur_scope = (struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct____iter__ *)__pyx_tp_new_7pyarrow_3lib___pyx_scope_struct____iter__(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct____iter__, __pyx_mstate_global->__pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct____iter__ *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(1, 1042, __pyx_L1_error)
  } else {
    __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7pyarrow_3lib_10StructType_10generator, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[0]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_iter, __pyx_mstate_global->__pyx_n_u_StructType___iter, __pyx_mstate_global->__pyx_n_u_pyarrow_lib); if (unlikely(!gen)) __PYX_ERR(1, 1042, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyarrow.lib.StructType.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF((PyObject *)__pyx_cur_scope);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_7pyarrow_3lib_10StructType_10generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct____iter__ *__pyx_cur_scope = ((struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct____iter__ *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  Py_ssize_t __pyx_t_1;
  Py_ssize_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L6_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(__pyx_sent_value != Py_None)) {
    if (unlikely(__pyx_sent_value)) PyErr_SetString(PyExc_TypeError, "can't send non-None value to a just-started generator");
    __PYX_ERR(1, 1042, __pyx_L1_error)
  }

  /* "pyarrow/types.pxi":1046
 *         Iterate over struct fields, in order.
 *         """
 *         for i in range(len(self)):             # <<<<<<<<<<<<<<
 *             yield self[i]
 * 
*/
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_cur_scope->__pyx_v_self)); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1046, __pyx_L1_error)
  __pyx_t_2 = __pyx_t_1;
  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
    __pyx_cur_scope->__pyx_v_i = __pyx_t_3;

    /* "pyarrow/types.pxi":1047
 *         """
 *         for i in range(len(self)):
 *             yield self[i]             # <<<<<<<<<<<<<<
 * 
 *     def __getitem__(self, i):
*/
    if (unlikely(((PyObject *)__pyx_cur_scope->__pyx_v_self) == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 1047, __pyx_L1_error)
    }
    __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_cur_scope->__pyx_v_i, Py_ssize_t, 1, PyLong_FromSsize_t, 0, 1, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1047, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
    __pyx_cur_scope->__pyx_t_1 = __pyx_t_2;
    __pyx_cur_scope->__pyx_t_2 = __pyx_t_3;
    __Pyx_XGIVEREF(__pyx_r);
    __Pyx_RefNannyFinishContext();
    __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
    /* return from generator, yielding value */
    __pyx_generator->resume_label = 1;
    return __pyx_r;
    __pyx_L6_resume_from_yield:;
    __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
    __pyx_t_2 = __pyx_cur_scope->__pyx_t_1;
    __pyx_t_3 = __pyx_cur_scope->__pyx_t_2;
    if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 1047, __pyx_L1_error)
  }
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* "pyarrow/types.pxi":1042
 *         return self.type.num_fields()
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterate over struct fields, in order.
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  if (__Pyx_PyErr_Occurred()) {
    __Pyx_Generator_Replace_StopIteration(0);
    __Pyx_AddTraceback("__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  }
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":1049
 *             yield self[i]
 * 
 *     def __getitem__(self, i):             # <<<<<<<<<<<<<<
 *         """
 *         Return the struct field with the given index or name.
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_10StructType_12__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_i); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_10StructType_11__getitem__, "StructType.__getitem__(self, i)\n\nReturn the struct field with the given index or name.\n\nAlias of ``field``.");
#if CYTHON_UPDATE_DESCRIPTOR_DOC
struct wrapperbase __pyx_wrapperbase_7pyarrow_3lib_10StructType_11__getitem__;
#endif
static PyObject *__pyx_pw_7pyarrow_3lib_10StructType_12__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_i) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_10StructType_11__getitem__(((struct __pyx_obj_7pyarrow_3lib_StructType *)__pyx_v_self), ((PyObject *)__pyx_v_i));

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

static PyObject *__pyx_pf_7pyarrow_3lib_10StructType_11__getitem__(struct __pyx_obj_7pyarrow_3lib_StructType *__pyx_v_self, PyObject *__pyx_v_i) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__getitem__", 0);

  /* "pyarrow/types.pxi":1055
 *         Alias of ``field``.
 *         """
 *         return self.field(i)             # <<<<<<<<<<<<<<
 * 
 *     def __reduce__(self):
*/
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "field");
    __PYX_ERR(1, 1055, __pyx_L1_error)
  }
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7pyarrow_3lib_StructType *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.field(((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_v_self), __pyx_v_i, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1055, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":1049
 *             yield self[i]
 * 
 *     def __getitem__(self, i):             # <<<<<<<<<<<<<<
 *         """
 *         Return the struct field with the given index or name.
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib.StructType.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":1057
 *         return self.field(i)
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         return struct, (list(self),)
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_10StructType_14__reduce__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_10StructType_13__reduce__, "StructType.__reduce__(self)");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_10StructType_14__reduce__ = {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10StructType_14__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10StructType_13__reduce__};
static PyObject *__pyx_pw_7pyarrow_3lib_10StructType_14__reduce__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7pyarrow_3lib_10StructType_13__reduce__(((struct __pyx_obj_7pyarrow_3lib_StructType *)__pyx_v_self));

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

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

  /* "pyarrow/types.pxi":1058
 * 
 *     def __reduce__(self):
 *         return struct, (list(self),)             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_struct); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1058, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PySequence_List(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1058, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1058, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2) != (0)) __PYX_ERR(1, 1058, __pyx_L1_error);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1058, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1) != (0)) __PYX_ERR(1, 1058, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3) != (0)) __PYX_ERR(1, 1058, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":1057
 *         return self.field(i)
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         return struct, (list(self),)
 * 
*/

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

/* "pyarrow/types.pxi":1060
 *         return struct, (list(self),)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def names(self):
 *         """
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_10StructType_5names_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_10StructType_5names_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_10StructType_5names___get__(((struct __pyx_obj_7pyarrow_3lib_StructType *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_10StructType_5names___get__(struct __pyx_obj_7pyarrow_3lib_StructType *__pyx_v_self) {
  PyObject *__pyx_8genexpr2__pyx_v_f = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyarrow/types.pxi":1072
 *         ['a', 'b', 'c']
 *         """
 *         return [f.name for f in self]             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  { /* enter inner scope */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1072, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (likely(PyList_CheckExact(((PyObject *)__pyx_v_self))) || PyTuple_CheckExact(((PyObject *)__pyx_v_self))) {
      __pyx_t_2 = ((PyObject *)__pyx_v_self); __Pyx_INCREF(__pyx_t_2);
      __pyx_t_3 = 0;
      __pyx_t_4 = NULL;
    } else {
      __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1072, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1072, __pyx_L5_error)
    }
    for (;;) {
      if (likely(!__pyx_t_4)) {
        if (likely(PyList_CheckExact(__pyx_t_2))) {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2);
            #if !CYTHON_ASSUME_SAFE_SIZE
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 1072, __pyx_L5_error)
            #endif
            if (__pyx_t_3 >= __pyx_temp) break;
          }
          __pyx_t_5 = __Pyx_PyList_GetItemRefFast(__pyx_t_2, __pyx_t_3, __Pyx_ReferenceSharing_OwnStrongReference);
          ++__pyx_t_3;
        } else {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2);
            #if !CYTHON_ASSUME_SAFE_SIZE
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 1072, __pyx_L5_error)
            #endif
            if (__pyx_t_3 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_5 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3));
          #else
          __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_3);
          #endif
          ++__pyx_t_3;
        }
        if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1072, __pyx_L5_error)
      } else {
        __pyx_t_5 = __pyx_t_4(__pyx_t_2);
        if (unlikely(!__pyx_t_5)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(1, 1072, __pyx_L5_error)
            PyErr_Clear();
          }
          break;
        }
      }
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_XDECREF_SET(__pyx_8genexpr2__pyx_v_f, __pyx_t_5);
      __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_8genexpr2__pyx_v_f, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1072, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(1, 1072, __pyx_L5_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_8genexpr2__pyx_v_f); __pyx_8genexpr2__pyx_v_f = 0;
    goto __pyx_L9_exit_scope;
    __pyx_L5_error:;
    __Pyx_XDECREF(__pyx_8genexpr2__pyx_v_f); __pyx_8genexpr2__pyx_v_f = 0;
    goto __pyx_L1_error;
    __pyx_L9_exit_scope:;
  } /* exit inner scope */
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":1060
 *         return struct, (list(self),)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def names(self):
 *         """
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pyarrow.lib.StructType.names.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_8genexpr2__pyx_v_f);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":1074
 *         return [f.name for f in self]
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def fields(self):
 *         """
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_10StructType_6fields_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_10StructType_6fields_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_10StructType_6fields___get__(((struct __pyx_obj_7pyarrow_3lib_StructType *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_10StructType_6fields___get__(struct __pyx_obj_7pyarrow_3lib_StructType *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyarrow/types.pxi":1086
 *         [pyarrow.Field<a: int64>, pyarrow.Field<b: double>, pyarrow.Field<c: string>]
 *         """
 *         return list(self)             # <<<<<<<<<<<<<<
 * 
 * cdef class UnionType(DataType):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PySequence_List(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1086, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":1074
 *         return [f.name for f in self]
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def fields(self):
 *         """
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib.StructType.fields.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":1118
 *     """
 * 
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:             # <<<<<<<<<<<<<<
 *         DataType.init(self, type)
 * 
*/

static void __pyx_f_7pyarrow_3lib_9UnionType_init(struct __pyx_obj_7pyarrow_3lib_UnionType *__pyx_v_self, std::shared_ptr< arrow::DataType>  const &__pyx_v_type) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "pyarrow/types.pxi":1119
 * 
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:
 *         DataType.init(self, type)             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __pyx_f_7pyarrow_3lib_8DataType_init(((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_v_self), __pyx_v_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1119, __pyx_L1_error)

  /* "pyarrow/types.pxi":1118
 *     """
 * 
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:             # <<<<<<<<<<<<<<
 *         DataType.init(self, type)
 * 
*/

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyarrow.lib.UnionType.init", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
}

/* "pyarrow/types.pxi":1121
 *         DataType.init(self, type)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def mode(self):
 *         """
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_9UnionType_4mode_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_9UnionType_4mode_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_9UnionType_4mode___get__(((struct __pyx_obj_7pyarrow_3lib_UnionType *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_9UnionType_4mode___get__(struct __pyx_obj_7pyarrow_3lib_UnionType *__pyx_v_self) {
   arrow::UnionType *__pyx_v_type;
  int __pyx_v_mode;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyarrow/types.pxi":1133
 *         'sparse'
 *         """
 *         cdef CUnionType* type = <CUnionType*> self.sp_type.get()             # <<<<<<<<<<<<<<
 *         cdef int mode = type.mode()
 *         if mode == _UnionMode_DENSE:
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_type");
    __PYX_ERR(1, 1133, __pyx_L1_error)
  }
  __pyx_v_type = (( arrow::UnionType *)__pyx_v_self->__pyx_base.sp_type.get());

  /* "pyarrow/types.pxi":1134
 *         """
 *         cdef CUnionType* type = <CUnionType*> self.sp_type.get()
 *         cdef int mode = type.mode()             # <<<<<<<<<<<<<<
 *         if mode == _UnionMode_DENSE:
 *             return 'dense'
*/
  __pyx_v_mode = __pyx_v_type->mode();

  /* "pyarrow/types.pxi":1135
 *         cdef CUnionType* type = <CUnionType*> self.sp_type.get()
 *         cdef int mode = type.mode()
 *         if mode == _UnionMode_DENSE:             # <<<<<<<<<<<<<<
 *             return 'dense'
 *         if mode == _UnionMode_SPARSE:
*/
  __pyx_t_1 = (__pyx_v_mode ==  arrow::UnionMode::DENSE);
  if (__pyx_t_1) {

    /* "pyarrow/types.pxi":1136
 *         cdef int mode = type.mode()
 *         if mode == _UnionMode_DENSE:
 *             return 'dense'             # <<<<<<<<<<<<<<
 *         if mode == _UnionMode_SPARSE:
 *             return 'sparse'
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_dense);
    __pyx_r = __pyx_mstate_global->__pyx_n_u_dense;
    goto __pyx_L0;

    /* "pyarrow/types.pxi":1135
 *         cdef CUnionType* type = <CUnionType*> self.sp_type.get()
 *         cdef int mode = type.mode()
 *         if mode == _UnionMode_DENSE:             # <<<<<<<<<<<<<<
 *             return 'dense'
 *         if mode == _UnionMode_SPARSE:
*/
  }

  /* "pyarrow/types.pxi":1137
 *         if mode == _UnionMode_DENSE:
 *             return 'dense'
 *         if mode == _UnionMode_SPARSE:             # <<<<<<<<<<<<<<
 *             return 'sparse'
 *         assert 0
*/
  __pyx_t_1 = (__pyx_v_mode ==  arrow::UnionMode::SPARSE);
  if (__pyx_t_1) {

    /* "pyarrow/types.pxi":1138
 *             return 'dense'
 *         if mode == _UnionMode_SPARSE:
 *             return 'sparse'             # <<<<<<<<<<<<<<
 *         assert 0
 * 
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_sparse);
    __pyx_r = __pyx_mstate_global->__pyx_n_u_sparse;
    goto __pyx_L0;

    /* "pyarrow/types.pxi":1137
 *         if mode == _UnionMode_DENSE:
 *             return 'dense'
 *         if mode == _UnionMode_SPARSE:             # <<<<<<<<<<<<<<
 *             return 'sparse'
 *         assert 0
*/
  }

  /* "pyarrow/types.pxi":1139
 *         if mode == _UnionMode_SPARSE:
 *             return 'sparse'
 *         assert 0             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    if (unlikely(!0)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(1, 1139, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(1, 1139, __pyx_L1_error)
  #endif

  /* "pyarrow/types.pxi":1121
 *         DataType.init(self, type)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def mode(self):
 *         """
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyarrow.lib.UnionType.mode.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":1141
 *         assert 0
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def type_codes(self):
 *         """
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_9UnionType_10type_codes_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_9UnionType_10type_codes_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_9UnionType_10type_codes___get__(((struct __pyx_obj_7pyarrow_3lib_UnionType *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_9UnionType_10type_codes___get__(struct __pyx_obj_7pyarrow_3lib_UnionType *__pyx_v_self) {
   arrow::UnionType *__pyx_v_type;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyarrow/types.pxi":1153
 *         [0, 1]
 *         """
 *         cdef CUnionType* type = <CUnionType*> self.sp_type.get()             # <<<<<<<<<<<<<<
 *         return type.type_codes()
 * 
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_type");
    __PYX_ERR(1, 1153, __pyx_L1_error)
  }
  __pyx_v_type = (( arrow::UnionType *)__pyx_v_self->__pyx_base.sp_type.get());

  /* "pyarrow/types.pxi":1154
 *         """
 *         cdef CUnionType* type = <CUnionType*> self.sp_type.get()
 *         return type.type_codes()             # <<<<<<<<<<<<<<
 * 
 *     def __len__(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_convert_vector_to_py_int8_t(__pyx_v_type->type_codes()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1154, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":1141
 *         assert 0
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def type_codes(self):
 *         """
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib.UnionType.type_codes.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":1156
 *         return type.type_codes()
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         """
 *         Like num_fields().
*/

/* Python wrapper */
static Py_ssize_t __pyx_pw_7pyarrow_3lib_9UnionType_1__len__(PyObject *__pyx_v_self); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_9UnionType___len__, "UnionType.__len__(self)\n\nLike num_fields().");
#if CYTHON_UPDATE_DESCRIPTOR_DOC
struct wrapperbase __pyx_wrapperbase_7pyarrow_3lib_9UnionType___len__;
#endif
static Py_ssize_t __pyx_pw_7pyarrow_3lib_9UnionType_1__len__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_9UnionType___len__(((struct __pyx_obj_7pyarrow_3lib_UnionType *)__pyx_v_self));

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

static Py_ssize_t __pyx_pf_7pyarrow_3lib_9UnionType___len__(struct __pyx_obj_7pyarrow_3lib_UnionType *__pyx_v_self) {
  Py_ssize_t __pyx_r;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "pyarrow/types.pxi":1160
 *         Like num_fields().
 *         """
 *         return self.type.num_fields()             # <<<<<<<<<<<<<<
 * 
 *     def __iter__(self):
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "type");
    __PYX_ERR(1, 1160, __pyx_L1_error)
  }
  __pyx_r = __pyx_v_self->__pyx_base.type->num_fields();
  goto __pyx_L0;

  /* "pyarrow/types.pxi":1156
 *         return type.type_codes()
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         """
 *         Like num_fields().
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyarrow.lib.UnionType.__len__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  return __pyx_r;
}
static PyObject *__pyx_gb_7pyarrow_3lib_9UnionType_4generator1(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "pyarrow/types.pxi":1162
 *         return self.type.num_fields()
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterate over union members, in order.
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_9UnionType_3__iter__(PyObject *__pyx_v_self); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_9UnionType_2__iter__, "UnionType.__iter__(self)\n\nIterate over union members, in order.");
#if CYTHON_UPDATE_DESCRIPTOR_DOC
struct wrapperbase __pyx_wrapperbase_7pyarrow_3lib_9UnionType_2__iter__;
#endif
static PyObject *__pyx_pw_7pyarrow_3lib_9UnionType_3__iter__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_9UnionType_2__iter__(((struct __pyx_obj_7pyarrow_3lib_UnionType *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_9UnionType_2__iter__(struct __pyx_obj_7pyarrow_3lib_UnionType *__pyx_v_self) {
  struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_1___iter__ *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__iter__", 0);
  __pyx_cur_scope = (struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_1___iter__ *)__pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_1___iter__(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_1___iter__, __pyx_mstate_global->__pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_1___iter__ *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(1, 1162, __pyx_L1_error)
  } else {
    __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7pyarrow_3lib_9UnionType_4generator1, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[1]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_iter, __pyx_mstate_global->__pyx_n_u_UnionType___iter, __pyx_mstate_global->__pyx_n_u_pyarrow_lib); if (unlikely(!gen)) __PYX_ERR(1, 1162, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyarrow.lib.UnionType.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF((PyObject *)__pyx_cur_scope);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_7pyarrow_3lib_9UnionType_4generator1(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_1___iter__ *__pyx_cur_scope = ((struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_1___iter__ *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  Py_ssize_t __pyx_t_1;
  Py_ssize_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L6_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(__pyx_sent_value != Py_None)) {
    if (unlikely(__pyx_sent_value)) PyErr_SetString(PyExc_TypeError, "can't send non-None value to a just-started generator");
    __PYX_ERR(1, 1162, __pyx_L1_error)
  }

  /* "pyarrow/types.pxi":1166
 *         Iterate over union members, in order.
 *         """
 *         for i in range(len(self)):             # <<<<<<<<<<<<<<
 *             yield self[i]
 * 
*/
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_cur_scope->__pyx_v_self)); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1166, __pyx_L1_error)
  __pyx_t_2 = __pyx_t_1;
  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
    __pyx_cur_scope->__pyx_v_i = __pyx_t_3;

    /* "pyarrow/types.pxi":1167
 *         """
 *         for i in range(len(self)):
 *             yield self[i]             # <<<<<<<<<<<<<<
 * 
 *     cpdef Field field(self, i):
*/
    if (unlikely(((PyObject *)__pyx_cur_scope->__pyx_v_self) == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 1167, __pyx_L1_error)
    }
    __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_cur_scope->__pyx_v_i, Py_ssize_t, 1, PyLong_FromSsize_t, 0, 1, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1167, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
    __pyx_cur_scope->__pyx_t_1 = __pyx_t_2;
    __pyx_cur_scope->__pyx_t_2 = __pyx_t_3;
    __Pyx_XGIVEREF(__pyx_r);
    __Pyx_RefNannyFinishContext();
    __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
    /* return from generator, yielding value */
    __pyx_generator->resume_label = 1;
    return __pyx_r;
    __pyx_L6_resume_from_yield:;
    __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
    __pyx_t_2 = __pyx_cur_scope->__pyx_t_1;
    __pyx_t_3 = __pyx_cur_scope->__pyx_t_2;
    if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 1167, __pyx_L1_error)
  }
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* "pyarrow/types.pxi":1162
 *         return self.type.num_fields()
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterate over union members, in order.
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  if (__Pyx_PyErr_Occurred()) {
    __Pyx_Generator_Replace_StopIteration(0);
    __Pyx_AddTraceback("__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  }
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":1169
 *             yield self[i]
 * 
 *     cpdef Field field(self, i):             # <<<<<<<<<<<<<<
 *         """
 *         Return a child field by its numeric index.
*/

static PyObject *__pyx_pw_7pyarrow_3lib_9UnionType_6field(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_7pyarrow_3lib_Field *__pyx_f_7pyarrow_3lib_9UnionType_field(struct __pyx_obj_7pyarrow_3lib_UnionType *__pyx_v_self, PyObject *__pyx_v_i, int __pyx_skip_dispatch) {
  struct __pyx_obj_7pyarrow_3lib_Field *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("field", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_UnionType &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_field); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1169, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7pyarrow_3lib_9UnionType_6field)) {
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_i};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1169, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Field))))) __PYX_ERR(1, 1169, __pyx_L1_error)
        __pyx_r = ((struct __pyx_obj_7pyarrow_3lib_Field *)__pyx_t_2);
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyarrow/types.pxi":1188
 *         pyarrow.Field<a: fixed_size_binary[10]>
 *         """
 *         if isinstance(i, int):             # <<<<<<<<<<<<<<
 *             return DataType.field(self, i)
 *         else:
*/
  __pyx_t_6 = PyLong_Check(__pyx_v_i); 
  if (likely(__pyx_t_6)) {

    /* "pyarrow/types.pxi":1189
 *         """
 *         if isinstance(i, int):
 *             return DataType.field(self, i)             # <<<<<<<<<<<<<<
 *         else:
 *             raise TypeError('Expected integer')
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_1 = ((PyObject *)__pyx_f_7pyarrow_3lib_8DataType_field(((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_v_self), __pyx_v_i, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1189, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = ((struct __pyx_obj_7pyarrow_3lib_Field *)__pyx_t_1);
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "pyarrow/types.pxi":1188
 *         pyarrow.Field<a: fixed_size_binary[10]>
 *         """
 *         if isinstance(i, int):             # <<<<<<<<<<<<<<
 *             return DataType.field(self, i)
 *         else:
*/
  }

  /* "pyarrow/types.pxi":1191
 *             return DataType.field(self, i)
 *         else:
 *             raise TypeError('Expected integer')             # <<<<<<<<<<<<<<
 * 
 *     def __getitem__(self, i):
*/
  /*else*/ {
    __pyx_t_2 = NULL;
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Expected_integer};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1191, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(1, 1191, __pyx_L1_error)
  }

  /* "pyarrow/types.pxi":1169
 *             yield self[i]
 * 
 *     cpdef Field field(self, i):             # <<<<<<<<<<<<<<
 *         """
 *         Return a child field by its numeric index.
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pyarrow.lib.UnionType.field", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_9UnionType_6field(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_9UnionType_5field, "UnionType.field(self, i) -> Field\n\nReturn a child field by its numeric index.\n\nParameters\n----------\ni : int\n\nReturns\n-------\npyarrow.Field\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> union = pa.sparse_union([pa.field('a', pa.binary(10)), pa.field('b', pa.string())])\n>>> union[0]\npyarrow.Field<a: fixed_size_binary[10]>");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_9UnionType_6field = {"field", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_9UnionType_6field, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_9UnionType_5field};
static PyObject *__pyx_pw_7pyarrow_3lib_9UnionType_6field(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_i = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("field (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_i,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 1169, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 1169, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "field", 0) < (0)) __PYX_ERR(1, 1169, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("field", 1, 1, 1, i); __PYX_ERR(1, 1169, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 1169, __pyx_L3_error)
    }
    __pyx_v_i = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("field", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 1169, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("pyarrow.lib.UnionType.field", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyarrow_3lib_9UnionType_5field(((struct __pyx_obj_7pyarrow_3lib_UnionType *)__pyx_v_self), __pyx_v_i);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7pyarrow_3lib_9UnionType_5field(struct __pyx_obj_7pyarrow_3lib_UnionType *__pyx_v_self, PyObject *__pyx_v_i) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("field", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_7pyarrow_3lib_9UnionType_field(__pyx_v_self, __pyx_v_i, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1169, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib.UnionType.field", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":1193
 *             raise TypeError('Expected integer')
 * 
 *     def __getitem__(self, i):             # <<<<<<<<<<<<<<
 *         """
 *         Return a child field by its index.
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_9UnionType_8__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_i); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_9UnionType_7__getitem__, "UnionType.__getitem__(self, i)\n\nReturn a child field by its index.\n\nAlias of ``field``.");
#if CYTHON_UPDATE_DESCRIPTOR_DOC
struct wrapperbase __pyx_wrapperbase_7pyarrow_3lib_9UnionType_7__getitem__;
#endif
static PyObject *__pyx_pw_7pyarrow_3lib_9UnionType_8__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_i) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_9UnionType_7__getitem__(((struct __pyx_obj_7pyarrow_3lib_UnionType *)__pyx_v_self), ((PyObject *)__pyx_v_i));

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

static PyObject *__pyx_pf_7pyarrow_3lib_9UnionType_7__getitem__(struct __pyx_obj_7pyarrow_3lib_UnionType *__pyx_v_self, PyObject *__pyx_v_i) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__getitem__", 0);

  /* "pyarrow/types.pxi":1199
 *         Alias of ``field``.
 *         """
 *         return self.field(i)             # <<<<<<<<<<<<<<
 * 
 *     def __reduce__(self):
*/
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "field");
    __PYX_ERR(1, 1199, __pyx_L1_error)
  }
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7pyarrow_3lib_UnionType *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.field(((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_v_self), __pyx_v_i, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1199, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":1193
 *             raise TypeError('Expected integer')
 * 
 *     def __getitem__(self, i):             # <<<<<<<<<<<<<<
 *         """
 *         Return a child field by its index.
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib.UnionType.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":1201
 *         return self.field(i)
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         return union, (list(self), self.mode, self.type_codes)
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_9UnionType_10__reduce__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_9UnionType_9__reduce__, "UnionType.__reduce__(self)");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_9UnionType_10__reduce__ = {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_9UnionType_10__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_9UnionType_9__reduce__};
static PyObject *__pyx_pw_7pyarrow_3lib_9UnionType_10__reduce__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7pyarrow_3lib_9UnionType_9__reduce__(((struct __pyx_obj_7pyarrow_3lib_UnionType *)__pyx_v_self));

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

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

  /* "pyarrow/types.pxi":1202
 * 
 *     def __reduce__(self):
 *         return union, (list(self), self.mode, self.type_codes)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_union); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1202, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PySequence_List(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1202, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_mode); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1202, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_type_codes); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1202, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1202, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2) != (0)) __PYX_ERR(1, 1202, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3) != (0)) __PYX_ERR(1, 1202, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_4);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_4) != (0)) __PYX_ERR(1, 1202, __pyx_L1_error);
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1202, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1) != (0)) __PYX_ERR(1, 1202, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_5);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_5) != (0)) __PYX_ERR(1, 1202, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":1201
 *         return self.field(i)
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         return union, (list(self), self.mode, self.type_codes)
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pyarrow.lib.UnionType.__reduce__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":1264
 *     """
 * 
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:             # <<<<<<<<<<<<<<
 *         DataType.init(self, type)
 *         self.ts_type = <const CTimestampType*> type.get()
*/

static void __pyx_f_7pyarrow_3lib_13TimestampType_init(struct __pyx_obj_7pyarrow_3lib_TimestampType *__pyx_v_self, std::shared_ptr< arrow::DataType>  const &__pyx_v_type) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "pyarrow/types.pxi":1265
 * 
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:
 *         DataType.init(self, type)             # <<<<<<<<<<<<<<
 *         self.ts_type = <const CTimestampType*> type.get()
 * 
*/
  __pyx_f_7pyarrow_3lib_8DataType_init(((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_v_self), __pyx_v_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1265, __pyx_L1_error)

  /* "pyarrow/types.pxi":1266
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:
 *         DataType.init(self, type)
 *         self.ts_type = <const CTimestampType*> type.get()             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "ts_type");
    __PYX_ERR(1, 1266, __pyx_L1_error)
  }
  __pyx_v_self->ts_type = (( arrow::TimestampType const *)__pyx_v_type.get());

  /* "pyarrow/types.pxi":1264
 *     """
 * 
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:             # <<<<<<<<<<<<<<
 *         DataType.init(self, type)
 *         self.ts_type = <const CTimestampType*> type.get()
*/

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyarrow.lib.TimestampType.init", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
}

/* "pyarrow/types.pxi":1268
 *         self.ts_type = <const CTimestampType*> type.get()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def unit(self):
 *         """
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_13TimestampType_4unit_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_13TimestampType_4unit_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_13TimestampType_4unit___get__(((struct __pyx_obj_7pyarrow_3lib_TimestampType *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_13TimestampType_4unit___get__(struct __pyx_obj_7pyarrow_3lib_TimestampType *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyarrow/types.pxi":1280
 *         'us'
 *         """
 *         return timeunit_to_string(self.ts_type.unit())             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "ts_type");
    __PYX_ERR(1, 1280, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_7pyarrow_3lib_timeunit_to_string(__pyx_v_self->ts_type->unit()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1280, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":1268
 *         self.ts_type = <const CTimestampType*> type.get()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def unit(self):
 *         """
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib.TimestampType.unit.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":1282
 *         return timeunit_to_string(self.ts_type.unit())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def tz(self):
 *         """
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_13TimestampType_2tz_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_13TimestampType_2tz_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_13TimestampType_2tz___get__(((struct __pyx_obj_7pyarrow_3lib_TimestampType *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_13TimestampType_2tz___get__(struct __pyx_obj_7pyarrow_3lib_TimestampType *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyarrow/types.pxi":1294
 *         'UTC'
 *         """
 *         if self.ts_type.timezone().size() > 0:             # <<<<<<<<<<<<<<
 *             return frombytes(self.ts_type.timezone())
 *         else:
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "ts_type");
    __PYX_ERR(1, 1294, __pyx_L1_error)
  }
  __pyx_t_1 = (__pyx_v_self->ts_type->timezone().size() > 0);
  if (__pyx_t_1) {

    /* "pyarrow/types.pxi":1295
 *         """
 *         if self.ts_type.timezone().size() > 0:
 *             return frombytes(self.ts_type.timezone())             # <<<<<<<<<<<<<<
 *         else:
 *             return None
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_frombytes); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1295, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "ts_type");
      __PYX_ERR(1, 1295, __pyx_L1_error)
    }
    __pyx_t_5 = __pyx_convert_PyBytes_string_to_py_6libcpp_6string_std__in_string(__pyx_v_self->ts_type->timezone()); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1295, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
      assert(__pyx_t_3);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
      __pyx_t_6 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1295, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pyarrow/types.pxi":1294
 *         'UTC'
 *         """
 *         if self.ts_type.timezone().size() > 0:             # <<<<<<<<<<<<<<
 *             return frombytes(self.ts_type.timezone())
 *         else:
*/
  }

  /* "pyarrow/types.pxi":1297
 *             return frombytes(self.ts_type.timezone())
 *         else:
 *             return None             # <<<<<<<<<<<<<<
 * 
 *     def __reduce__(self):
*/
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;
  }

  /* "pyarrow/types.pxi":1282
 *         return timeunit_to_string(self.ts_type.unit())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def tz(self):
 *         """
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pyarrow.lib.TimestampType.tz.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":1299
 *             return None
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         return timestamp, (self.unit, self.tz)
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_13TimestampType_1__reduce__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_13TimestampType___reduce__, "TimestampType.__reduce__(self)");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_13TimestampType_1__reduce__ = {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_13TimestampType_1__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_13TimestampType___reduce__};
static PyObject *__pyx_pw_7pyarrow_3lib_13TimestampType_1__reduce__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7pyarrow_3lib_13TimestampType___reduce__(((struct __pyx_obj_7pyarrow_3lib_TimestampType *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_13TimestampType___reduce__(struct __pyx_obj_7pyarrow_3lib_TimestampType *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce__", 0);

  /* "pyarrow/types.pxi":1300
 * 
 *     def __reduce__(self):
 *         return timestamp, (self.unit, self.tz)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_timestamp); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1300, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_unit); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1300, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_tz); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1300, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1300, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2) != (0)) __PYX_ERR(1, 1300, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3) != (0)) __PYX_ERR(1, 1300, __pyx_L1_error);
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1300, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1) != (0)) __PYX_ERR(1, 1300, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_4);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_4) != (0)) __PYX_ERR(1, 1300, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_4 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":1299
 *             return None
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         return timestamp, (self.unit, self.tz)
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pyarrow.lib.TimestampType.__reduce__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":1319
 *     """
 * 
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:             # <<<<<<<<<<<<<<
 *         DataType.init(self, type)
 *         self.time_type = <const CTime32Type*> type.get()
*/

static void __pyx_f_7pyarrow_3lib_10Time32Type_init(struct __pyx_obj_7pyarrow_3lib_Time32Type *__pyx_v_self, std::shared_ptr< arrow::DataType>  const &__pyx_v_type) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "pyarrow/types.pxi":1320
 * 
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:
 *         DataType.init(self, type)             # <<<<<<<<<<<<<<
 *         self.time_type = <const CTime32Type*> type.get()
 * 
*/
  __pyx_f_7pyarrow_3lib_8DataType_init(((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_v_self), __pyx_v_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1320, __pyx_L1_error)

  /* "pyarrow/types.pxi":1321
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:
 *         DataType.init(self, type)
 *         self.time_type = <const CTime32Type*> type.get()             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "time_type");
    __PYX_ERR(1, 1321, __pyx_L1_error)
  }
  __pyx_v_self->time_type = (( arrow::Time32Type const *)__pyx_v_type.get());

  /* "pyarrow/types.pxi":1319
 *     """
 * 
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:             # <<<<<<<<<<<<<<
 *         DataType.init(self, type)
 *         self.time_type = <const CTime32Type*> type.get()
*/

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyarrow.lib.Time32Type.init", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
}

/* "pyarrow/types.pxi":1323
 *         self.time_type = <const CTime32Type*> type.get()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def unit(self):
 *         """
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_10Time32Type_4unit_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_10Time32Type_4unit_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_10Time32Type_4unit___get__(((struct __pyx_obj_7pyarrow_3lib_Time32Type *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_10Time32Type_4unit___get__(struct __pyx_obj_7pyarrow_3lib_Time32Type *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyarrow/types.pxi":1335
 *         'ms'
 *         """
 *         return timeunit_to_string(self.time_type.unit())             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "time_type");
    __PYX_ERR(1, 1335, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_7pyarrow_3lib_timeunit_to_string(__pyx_v_self->time_type->unit()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1335, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":1323
 *         self.time_type = <const CTime32Type*> type.get()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def unit(self):
 *         """
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib.Time32Type.unit.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":1354
 *     """
 * 
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:             # <<<<<<<<<<<<<<
 *         DataType.init(self, type)
 *         self.time_type = <const CTime64Type*> type.get()
*/

static void __pyx_f_7pyarrow_3lib_10Time64Type_init(struct __pyx_obj_7pyarrow_3lib_Time64Type *__pyx_v_self, std::shared_ptr< arrow::DataType>  const &__pyx_v_type) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "pyarrow/types.pxi":1355
 * 
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:
 *         DataType.init(self, type)             # <<<<<<<<<<<<<<
 *         self.time_type = <const CTime64Type*> type.get()
 * 
*/
  __pyx_f_7pyarrow_3lib_8DataType_init(((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_v_self), __pyx_v_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1355, __pyx_L1_error)

  /* "pyarrow/types.pxi":1356
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:
 *         DataType.init(self, type)
 *         self.time_type = <const CTime64Type*> type.get()             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "time_type");
    __PYX_ERR(1, 1356, __pyx_L1_error)
  }
  __pyx_v_self->time_type = (( arrow::Time64Type const *)__pyx_v_type.get());

  /* "pyarrow/types.pxi":1354
 *     """
 * 
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:             # <<<<<<<<<<<<<<
 *         DataType.init(self, type)
 *         self.time_type = <const CTime64Type*> type.get()
*/

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyarrow.lib.Time64Type.init", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
}

/* "pyarrow/types.pxi":1358
 *         self.time_type = <const CTime64Type*> type.get()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def unit(self):
 *         """
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_10Time64Type_4unit_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_10Time64Type_4unit_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_10Time64Type_4unit___get__(((struct __pyx_obj_7pyarrow_3lib_Time64Type *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_10Time64Type_4unit___get__(struct __pyx_obj_7pyarrow_3lib_Time64Type *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyarrow/types.pxi":1370
 *         'us'
 *         """
 *         return timeunit_to_string(self.time_type.unit())             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "time_type");
    __PYX_ERR(1, 1370, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_7pyarrow_3lib_timeunit_to_string(__pyx_v_self->time_type->unit()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1370, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":1358
 *         self.time_type = <const CTime64Type*> type.get()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def unit(self):
 *         """
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib.Time64Type.unit.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":1386
 *     """
 * 
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:             # <<<<<<<<<<<<<<
 *         DataType.init(self, type)
 *         self.duration_type = <const CDurationType*> type.get()
*/

static void __pyx_f_7pyarrow_3lib_12DurationType_init(struct __pyx_obj_7pyarrow_3lib_DurationType *__pyx_v_self, std::shared_ptr< arrow::DataType>  const &__pyx_v_type) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "pyarrow/types.pxi":1387
 * 
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:
 *         DataType.init(self, type)             # <<<<<<<<<<<<<<
 *         self.duration_type = <const CDurationType*> type.get()
 * 
*/
  __pyx_f_7pyarrow_3lib_8DataType_init(((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_v_self), __pyx_v_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1387, __pyx_L1_error)

  /* "pyarrow/types.pxi":1388
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:
 *         DataType.init(self, type)
 *         self.duration_type = <const CDurationType*> type.get()             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "duration_type");
    __PYX_ERR(1, 1388, __pyx_L1_error)
  }
  __pyx_v_self->duration_type = (( arrow::DurationType const *)__pyx_v_type.get());

  /* "pyarrow/types.pxi":1386
 *     """
 * 
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:             # <<<<<<<<<<<<<<
 *         DataType.init(self, type)
 *         self.duration_type = <const CDurationType*> type.get()
*/

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyarrow.lib.DurationType.init", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
}

/* "pyarrow/types.pxi":1390
 *         self.duration_type = <const CDurationType*> type.get()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def unit(self):
 *         """
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_12DurationType_4unit_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_12DurationType_4unit_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_12DurationType_4unit___get__(((struct __pyx_obj_7pyarrow_3lib_DurationType *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_12DurationType_4unit___get__(struct __pyx_obj_7pyarrow_3lib_DurationType *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyarrow/types.pxi":1402
 *         's'
 *         """
 *         return timeunit_to_string(self.duration_type.unit())             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "duration_type");
    __PYX_ERR(1, 1402, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_7pyarrow_3lib_timeunit_to_string(__pyx_v_self->duration_type->unit()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1402, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":1390
 *         self.duration_type = <const CDurationType*> type.get()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def unit(self):
 *         """
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib.DurationType.unit.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":1418
 *     """
 * 
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:             # <<<<<<<<<<<<<<
 *         DataType.init(self, type)
 *         self.fixed_size_binary_type = (
*/

static void __pyx_f_7pyarrow_3lib_19FixedSizeBinaryType_init(struct __pyx_obj_7pyarrow_3lib_FixedSizeBinaryType *__pyx_v_self, std::shared_ptr< arrow::DataType>  const &__pyx_v_type) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "pyarrow/types.pxi":1419
 * 
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:
 *         DataType.init(self, type)             # <<<<<<<<<<<<<<
 *         self.fixed_size_binary_type = (
 *             <const CFixedSizeBinaryType*> type.get())
*/
  __pyx_f_7pyarrow_3lib_8DataType_init(((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_v_self), __pyx_v_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1419, __pyx_L1_error)

  /* "pyarrow/types.pxi":1420
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:
 *         DataType.init(self, type)
 *         self.fixed_size_binary_type = (             # <<<<<<<<<<<<<<
 *             <const CFixedSizeBinaryType*> type.get())
 * 
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "fixed_size_binary_type");
    __PYX_ERR(1, 1420, __pyx_L1_error)
  }
  __pyx_v_self->fixed_size_binary_type = (( arrow::FixedSizeBinaryType const *)__pyx_v_type.get());

  /* "pyarrow/types.pxi":1418
 *     """
 * 
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:             # <<<<<<<<<<<<<<
 *         DataType.init(self, type)
 *         self.fixed_size_binary_type = (
*/

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyarrow.lib.FixedSizeBinaryType.init", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
}

/* "pyarrow/types.pxi":1423
 *             <const CFixedSizeBinaryType*> type.get())
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         return binary, (self.byte_width,)
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_19FixedSizeBinaryType_1__reduce__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_19FixedSizeBinaryType___reduce__, "FixedSizeBinaryType.__reduce__(self)");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_19FixedSizeBinaryType_1__reduce__ = {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_19FixedSizeBinaryType_1__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_19FixedSizeBinaryType___reduce__};
static PyObject *__pyx_pw_7pyarrow_3lib_19FixedSizeBinaryType_1__reduce__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7pyarrow_3lib_19FixedSizeBinaryType___reduce__(((struct __pyx_obj_7pyarrow_3lib_FixedSizeBinaryType *)__pyx_v_self));

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

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

  /* "pyarrow/types.pxi":1424
 * 
 *     def __reduce__(self):
 *         return binary, (self.byte_width,)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_binary); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1424, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_byte_width); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1424, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1424, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2) != (0)) __PYX_ERR(1, 1424, __pyx_L1_error);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1424, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1) != (0)) __PYX_ERR(1, 1424, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3) != (0)) __PYX_ERR(1, 1424, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":1423
 *             <const CFixedSizeBinaryType*> type.get())
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         return binary, (self.byte_width,)
 * 
*/

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

/* "pyarrow/types.pxi":1440
 *     """
 * 
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:             # <<<<<<<<<<<<<<
 *         FixedSizeBinaryType.init(self, type)
 *         self.decimal32_type = <const CDecimal32Type*> type.get()
*/

static void __pyx_f_7pyarrow_3lib_13Decimal32Type_init(struct __pyx_obj_7pyarrow_3lib_Decimal32Type *__pyx_v_self, std::shared_ptr< arrow::DataType>  const &__pyx_v_type) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "pyarrow/types.pxi":1441
 * 
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:
 *         FixedSizeBinaryType.init(self, type)             # <<<<<<<<<<<<<<
 *         self.decimal32_type = <const CDecimal32Type*> type.get()
 * 
*/
  __pyx_f_7pyarrow_3lib_19FixedSizeBinaryType_init(((struct __pyx_obj_7pyarrow_3lib_FixedSizeBinaryType *)__pyx_v_self), __pyx_v_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1441, __pyx_L1_error)

  /* "pyarrow/types.pxi":1442
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:
 *         FixedSizeBinaryType.init(self, type)
 *         self.decimal32_type = <const CDecimal32Type*> type.get()             # <<<<<<<<<<<<<<
 * 
 *     def __reduce__(self):
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decimal32_type");
    __PYX_ERR(1, 1442, __pyx_L1_error)
  }
  __pyx_v_self->decimal32_type = (( arrow::Decimal32Type const *)__pyx_v_type.get());

  /* "pyarrow/types.pxi":1440
 *     """
 * 
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:             # <<<<<<<<<<<<<<
 *         FixedSizeBinaryType.init(self, type)
 *         self.decimal32_type = <const CDecimal32Type*> type.get()
*/

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyarrow.lib.Decimal32Type.init", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
}

/* "pyarrow/types.pxi":1444
 *         self.decimal32_type = <const CDecimal32Type*> type.get()
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         return decimal32, (self.precision, self.scale)
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_13Decimal32Type_1__reduce__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_13Decimal32Type___reduce__, "Decimal32Type.__reduce__(self)");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_13Decimal32Type_1__reduce__ = {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_13Decimal32Type_1__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_13Decimal32Type___reduce__};
static PyObject *__pyx_pw_7pyarrow_3lib_13Decimal32Type_1__reduce__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7pyarrow_3lib_13Decimal32Type___reduce__(((struct __pyx_obj_7pyarrow_3lib_Decimal32Type *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_13Decimal32Type___reduce__(struct __pyx_obj_7pyarrow_3lib_Decimal32Type *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce__", 0);

  /* "pyarrow/types.pxi":1445
 * 
 *     def __reduce__(self):
 *         return decimal32, (self.precision, self.scale)             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_decimal32); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1445, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_precision); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1445, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_scale); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1445, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1445, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2) != (0)) __PYX_ERR(1, 1445, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3) != (0)) __PYX_ERR(1, 1445, __pyx_L1_error);
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1445, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1) != (0)) __PYX_ERR(1, 1445, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_4);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_4) != (0)) __PYX_ERR(1, 1445, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_4 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":1444
 *         self.decimal32_type = <const CDecimal32Type*> type.get()
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         return decimal32, (self.precision, self.scale)
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pyarrow.lib.Decimal32Type.__reduce__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":1447
 *         return decimal32, (self.precision, self.scale)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def precision(self):
 *         """
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_13Decimal32Type_9precision_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_13Decimal32Type_9precision_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_13Decimal32Type_9precision___get__(((struct __pyx_obj_7pyarrow_3lib_Decimal32Type *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_13Decimal32Type_9precision___get__(struct __pyx_obj_7pyarrow_3lib_Decimal32Type *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyarrow/types.pxi":1459
 *         5
 *         """
 *         return self.decimal32_type.precision()             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decimal32_type");
    __PYX_ERR(1, 1459, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_v_self->decimal32_type->precision()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1459, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":1447
 *         return decimal32, (self.precision, self.scale)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def precision(self):
 *         """
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib.Decimal32Type.precision.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":1461
 *         return self.decimal32_type.precision()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def scale(self):
 *         """
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_13Decimal32Type_5scale_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_13Decimal32Type_5scale_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_13Decimal32Type_5scale___get__(((struct __pyx_obj_7pyarrow_3lib_Decimal32Type *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_13Decimal32Type_5scale___get__(struct __pyx_obj_7pyarrow_3lib_Decimal32Type *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyarrow/types.pxi":1473
 *         2
 *         """
 *         return self.decimal32_type.scale()             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decimal32_type");
    __PYX_ERR(1, 1473, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_v_self->decimal32_type->scale()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1473, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":1461
 *         return self.decimal32_type.precision()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def scale(self):
 *         """
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib.Decimal32Type.scale.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":1489
 *     """
 * 
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:             # <<<<<<<<<<<<<<
 *         FixedSizeBinaryType.init(self, type)
 *         self.decimal64_type = <const CDecimal64Type*> type.get()
*/

static void __pyx_f_7pyarrow_3lib_13Decimal64Type_init(struct __pyx_obj_7pyarrow_3lib_Decimal64Type *__pyx_v_self, std::shared_ptr< arrow::DataType>  const &__pyx_v_type) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "pyarrow/types.pxi":1490
 * 
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:
 *         FixedSizeBinaryType.init(self, type)             # <<<<<<<<<<<<<<
 *         self.decimal64_type = <const CDecimal64Type*> type.get()
 * 
*/
  __pyx_f_7pyarrow_3lib_19FixedSizeBinaryType_init(((struct __pyx_obj_7pyarrow_3lib_FixedSizeBinaryType *)__pyx_v_self), __pyx_v_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1490, __pyx_L1_error)

  /* "pyarrow/types.pxi":1491
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:
 *         FixedSizeBinaryType.init(self, type)
 *         self.decimal64_type = <const CDecimal64Type*> type.get()             # <<<<<<<<<<<<<<
 * 
 *     def __reduce__(self):
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decimal64_type");
    __PYX_ERR(1, 1491, __pyx_L1_error)
  }
  __pyx_v_self->decimal64_type = (( arrow::Decimal64Type const *)__pyx_v_type.get());

  /* "pyarrow/types.pxi":1489
 *     """
 * 
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:             # <<<<<<<<<<<<<<
 *         FixedSizeBinaryType.init(self, type)
 *         self.decimal64_type = <const CDecimal64Type*> type.get()
*/

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyarrow.lib.Decimal64Type.init", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
}

/* "pyarrow/types.pxi":1493
 *         self.decimal64_type = <const CDecimal64Type*> type.get()
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         return decimal64, (self.precision, self.scale)
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_13Decimal64Type_1__reduce__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_13Decimal64Type___reduce__, "Decimal64Type.__reduce__(self)");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_13Decimal64Type_1__reduce__ = {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_13Decimal64Type_1__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_13Decimal64Type___reduce__};
static PyObject *__pyx_pw_7pyarrow_3lib_13Decimal64Type_1__reduce__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7pyarrow_3lib_13Decimal64Type___reduce__(((struct __pyx_obj_7pyarrow_3lib_Decimal64Type *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_13Decimal64Type___reduce__(struct __pyx_obj_7pyarrow_3lib_Decimal64Type *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce__", 0);

  /* "pyarrow/types.pxi":1494
 * 
 *     def __reduce__(self):
 *         return decimal64, (self.precision, self.scale)             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_decimal64); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1494, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_precision); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1494, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_scale); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1494, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1494, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2) != (0)) __PYX_ERR(1, 1494, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3) != (0)) __PYX_ERR(1, 1494, __pyx_L1_error);
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1494, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1) != (0)) __PYX_ERR(1, 1494, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_4);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_4) != (0)) __PYX_ERR(1, 1494, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_4 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":1493
 *         self.decimal64_type = <const CDecimal64Type*> type.get()
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         return decimal64, (self.precision, self.scale)
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pyarrow.lib.Decimal64Type.__reduce__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":1496
 *         return decimal64, (self.precision, self.scale)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def precision(self):
 *         """
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_13Decimal64Type_9precision_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_13Decimal64Type_9precision_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_13Decimal64Type_9precision___get__(((struct __pyx_obj_7pyarrow_3lib_Decimal64Type *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_13Decimal64Type_9precision___get__(struct __pyx_obj_7pyarrow_3lib_Decimal64Type *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyarrow/types.pxi":1508
 *         5
 *         """
 *         return self.decimal64_type.precision()             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decimal64_type");
    __PYX_ERR(1, 1508, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_v_self->decimal64_type->precision()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1508, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":1496
 *         return decimal64, (self.precision, self.scale)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def precision(self):
 *         """
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib.Decimal64Type.precision.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":1510
 *         return self.decimal64_type.precision()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def scale(self):
 *         """
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_13Decimal64Type_5scale_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_13Decimal64Type_5scale_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_13Decimal64Type_5scale___get__(((struct __pyx_obj_7pyarrow_3lib_Decimal64Type *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_13Decimal64Type_5scale___get__(struct __pyx_obj_7pyarrow_3lib_Decimal64Type *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyarrow/types.pxi":1522
 *         2
 *         """
 *         return self.decimal64_type.scale()             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decimal64_type");
    __PYX_ERR(1, 1522, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_v_self->decimal64_type->scale()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1522, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":1510
 *         return self.decimal64_type.precision()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def scale(self):
 *         """
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib.Decimal64Type.scale.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":1538
 *     """
 * 
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:             # <<<<<<<<<<<<<<
 *         FixedSizeBinaryType.init(self, type)
 *         self.decimal128_type = <const CDecimal128Type*> type.get()
*/

static void __pyx_f_7pyarrow_3lib_14Decimal128Type_init(struct __pyx_obj_7pyarrow_3lib_Decimal128Type *__pyx_v_self, std::shared_ptr< arrow::DataType>  const &__pyx_v_type) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "pyarrow/types.pxi":1539
 * 
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:
 *         FixedSizeBinaryType.init(self, type)             # <<<<<<<<<<<<<<
 *         self.decimal128_type = <const CDecimal128Type*> type.get()
 * 
*/
  __pyx_f_7pyarrow_3lib_19FixedSizeBinaryType_init(((struct __pyx_obj_7pyarrow_3lib_FixedSizeBinaryType *)__pyx_v_self), __pyx_v_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1539, __pyx_L1_error)

  /* "pyarrow/types.pxi":1540
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:
 *         FixedSizeBinaryType.init(self, type)
 *         self.decimal128_type = <const CDecimal128Type*> type.get()             # <<<<<<<<<<<<<<
 * 
 *     def __reduce__(self):
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decimal128_type");
    __PYX_ERR(1, 1540, __pyx_L1_error)
  }
  __pyx_v_self->decimal128_type = (( arrow::Decimal128Type const *)__pyx_v_type.get());

  /* "pyarrow/types.pxi":1538
 *     """
 * 
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:             # <<<<<<<<<<<<<<
 *         FixedSizeBinaryType.init(self, type)
 *         self.decimal128_type = <const CDecimal128Type*> type.get()
*/

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyarrow.lib.Decimal128Type.init", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
}

/* "pyarrow/types.pxi":1542
 *         self.decimal128_type = <const CDecimal128Type*> type.get()
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         return decimal128, (self.precision, self.scale)
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_14Decimal128Type_1__reduce__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_14Decimal128Type___reduce__, "Decimal128Type.__reduce__(self)");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_14Decimal128Type_1__reduce__ = {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_14Decimal128Type_1__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_14Decimal128Type___reduce__};
static PyObject *__pyx_pw_7pyarrow_3lib_14Decimal128Type_1__reduce__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7pyarrow_3lib_14Decimal128Type___reduce__(((struct __pyx_obj_7pyarrow_3lib_Decimal128Type *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_14Decimal128Type___reduce__(struct __pyx_obj_7pyarrow_3lib_Decimal128Type *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce__", 0);

  /* "pyarrow/types.pxi":1543
 * 
 *     def __reduce__(self):
 *         return decimal128, (self.precision, self.scale)             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_decimal128); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1543, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_precision); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1543, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_scale); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1543, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1543, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2) != (0)) __PYX_ERR(1, 1543, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3) != (0)) __PYX_ERR(1, 1543, __pyx_L1_error);
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1543, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1) != (0)) __PYX_ERR(1, 1543, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_4);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_4) != (0)) __PYX_ERR(1, 1543, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_4 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":1542
 *         self.decimal128_type = <const CDecimal128Type*> type.get()
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         return decimal128, (self.precision, self.scale)
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pyarrow.lib.Decimal128Type.__reduce__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":1545
 *         return decimal128, (self.precision, self.scale)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def precision(self):
 *         """
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_14Decimal128Type_9precision_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_14Decimal128Type_9precision_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_14Decimal128Type_9precision___get__(((struct __pyx_obj_7pyarrow_3lib_Decimal128Type *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_14Decimal128Type_9precision___get__(struct __pyx_obj_7pyarrow_3lib_Decimal128Type *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyarrow/types.pxi":1557
 *         5
 *         """
 *         return self.decimal128_type.precision()             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decimal128_type");
    __PYX_ERR(1, 1557, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_v_self->decimal128_type->precision()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1557, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":1545
 *         return decimal128, (self.precision, self.scale)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def precision(self):
 *         """
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib.Decimal128Type.precision.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":1559
 *         return self.decimal128_type.precision()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def scale(self):
 *         """
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_14Decimal128Type_5scale_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_14Decimal128Type_5scale_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_14Decimal128Type_5scale___get__(((struct __pyx_obj_7pyarrow_3lib_Decimal128Type *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_14Decimal128Type_5scale___get__(struct __pyx_obj_7pyarrow_3lib_Decimal128Type *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyarrow/types.pxi":1571
 *         2
 *         """
 *         return self.decimal128_type.scale()             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decimal128_type");
    __PYX_ERR(1, 1571, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_v_self->decimal128_type->scale()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1571, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":1559
 *         return self.decimal128_type.precision()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def scale(self):
 *         """
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib.Decimal128Type.scale.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":1587
 *     """
 * 
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:             # <<<<<<<<<<<<<<
 *         FixedSizeBinaryType.init(self, type)
 *         self.decimal256_type = <const CDecimal256Type*> type.get()
*/

static void __pyx_f_7pyarrow_3lib_14Decimal256Type_init(struct __pyx_obj_7pyarrow_3lib_Decimal256Type *__pyx_v_self, std::shared_ptr< arrow::DataType>  const &__pyx_v_type) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "pyarrow/types.pxi":1588
 * 
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:
 *         FixedSizeBinaryType.init(self, type)             # <<<<<<<<<<<<<<
 *         self.decimal256_type = <const CDecimal256Type*> type.get()
 * 
*/
  __pyx_f_7pyarrow_3lib_19FixedSizeBinaryType_init(((struct __pyx_obj_7pyarrow_3lib_FixedSizeBinaryType *)__pyx_v_self), __pyx_v_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1588, __pyx_L1_error)

  /* "pyarrow/types.pxi":1589
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:
 *         FixedSizeBinaryType.init(self, type)
 *         self.decimal256_type = <const CDecimal256Type*> type.get()             # <<<<<<<<<<<<<<
 * 
 *     def __reduce__(self):
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decimal256_type");
    __PYX_ERR(1, 1589, __pyx_L1_error)
  }
  __pyx_v_self->decimal256_type = (( arrow::Decimal256Type const *)__pyx_v_type.get());

  /* "pyarrow/types.pxi":1587
 *     """
 * 
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:             # <<<<<<<<<<<<<<
 *         FixedSizeBinaryType.init(self, type)
 *         self.decimal256_type = <const CDecimal256Type*> type.get()
*/

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyarrow.lib.Decimal256Type.init", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
}

/* "pyarrow/types.pxi":1591
 *         self.decimal256_type = <const CDecimal256Type*> type.get()
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         return decimal256, (self.precision, self.scale)
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_14Decimal256Type_1__reduce__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_14Decimal256Type___reduce__, "Decimal256Type.__reduce__(self)");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_14Decimal256Type_1__reduce__ = {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_14Decimal256Type_1__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_14Decimal256Type___reduce__};
static PyObject *__pyx_pw_7pyarrow_3lib_14Decimal256Type_1__reduce__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7pyarrow_3lib_14Decimal256Type___reduce__(((struct __pyx_obj_7pyarrow_3lib_Decimal256Type *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_14Decimal256Type___reduce__(struct __pyx_obj_7pyarrow_3lib_Decimal256Type *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce__", 0);

  /* "pyarrow/types.pxi":1592
 * 
 *     def __reduce__(self):
 *         return decimal256, (self.precision, self.scale)             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_decimal256); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1592, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_precision); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1592, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_scale); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1592, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1592, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2) != (0)) __PYX_ERR(1, 1592, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3) != (0)) __PYX_ERR(1, 1592, __pyx_L1_error);
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1592, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1) != (0)) __PYX_ERR(1, 1592, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_4);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_4) != (0)) __PYX_ERR(1, 1592, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_4 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":1591
 *         self.decimal256_type = <const CDecimal256Type*> type.get()
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         return decimal256, (self.precision, self.scale)
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pyarrow.lib.Decimal256Type.__reduce__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":1594
 *         return decimal256, (self.precision, self.scale)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def precision(self):
 *         """
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_14Decimal256Type_9precision_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_14Decimal256Type_9precision_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_14Decimal256Type_9precision___get__(((struct __pyx_obj_7pyarrow_3lib_Decimal256Type *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_14Decimal256Type_9precision___get__(struct __pyx_obj_7pyarrow_3lib_Decimal256Type *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyarrow/types.pxi":1606
 *         76
 *         """
 *         return self.decimal256_type.precision()             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decimal256_type");
    __PYX_ERR(1, 1606, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_v_self->decimal256_type->precision()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1606, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":1594
 *         return decimal256, (self.precision, self.scale)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def precision(self):
 *         """
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib.Decimal256Type.precision.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":1608
 *         return self.decimal256_type.precision()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def scale(self):
 *         """
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_14Decimal256Type_5scale_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_14Decimal256Type_5scale_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_14Decimal256Type_5scale___get__(((struct __pyx_obj_7pyarrow_3lib_Decimal256Type *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_14Decimal256Type_5scale___get__(struct __pyx_obj_7pyarrow_3lib_Decimal256Type *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyarrow/types.pxi":1620
 *         38
 *         """
 *         return self.decimal256_type.scale()             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decimal256_type");
    __PYX_ERR(1, 1620, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_v_self->decimal256_type->scale()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1620, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":1608
 *         return self.decimal256_type.precision()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def scale(self):
 *         """
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib.Decimal256Type.scale.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":1628
 *     """
 * 
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:             # <<<<<<<<<<<<<<
 *         DataType.init(self, type)
 *         self.run_end_encoded_type = <const CRunEndEncodedType*> type.get()
*/

static void __pyx_f_7pyarrow_3lib_17RunEndEncodedType_init(struct __pyx_obj_7pyarrow_3lib_RunEndEncodedType *__pyx_v_self, std::shared_ptr< arrow::DataType>  const &__pyx_v_type) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "pyarrow/types.pxi":1629
 * 
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:
 *         DataType.init(self, type)             # <<<<<<<<<<<<<<
 *         self.run_end_encoded_type = <const CRunEndEncodedType*> type.get()
 * 
*/
  __pyx_f_7pyarrow_3lib_8DataType_init(((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_v_self), __pyx_v_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1629, __pyx_L1_error)

  /* "pyarrow/types.pxi":1630
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:
 *         DataType.init(self, type)
 *         self.run_end_encoded_type = <const CRunEndEncodedType*> type.get()             # <<<<<<<<<<<<<<
 * 
 *     def __reduce__(self):
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "run_end_encoded_type");
    __PYX_ERR(1, 1630, __pyx_L1_error)
  }
  __pyx_v_self->run_end_encoded_type = (( arrow::RunEndEncodedType const *)__pyx_v_type.get());

  /* "pyarrow/types.pxi":1628
 *     """
 * 
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:             # <<<<<<<<<<<<<<
 *         DataType.init(self, type)
 *         self.run_end_encoded_type = <const CRunEndEncodedType*> type.get()
*/

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyarrow.lib.RunEndEncodedType.init", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
}

/* "pyarrow/types.pxi":1632
 *         self.run_end_encoded_type = <const CRunEndEncodedType*> type.get()
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         return run_end_encoded, (self.run_end_type, self.value_type)
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_17RunEndEncodedType_1__reduce__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_17RunEndEncodedType___reduce__, "RunEndEncodedType.__reduce__(self)");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_17RunEndEncodedType_1__reduce__ = {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_17RunEndEncodedType_1__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_17RunEndEncodedType___reduce__};
static PyObject *__pyx_pw_7pyarrow_3lib_17RunEndEncodedType_1__reduce__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7pyarrow_3lib_17RunEndEncodedType___reduce__(((struct __pyx_obj_7pyarrow_3lib_RunEndEncodedType *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_17RunEndEncodedType___reduce__(struct __pyx_obj_7pyarrow_3lib_RunEndEncodedType *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce__", 0);

  /* "pyarrow/types.pxi":1633
 * 
 *     def __reduce__(self):
 *         return run_end_encoded, (self.run_end_type, self.value_type)             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_run_end_encoded); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1633, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_run_end_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1633, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_value_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1633, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1633, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2) != (0)) __PYX_ERR(1, 1633, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3) != (0)) __PYX_ERR(1, 1633, __pyx_L1_error);
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1633, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1) != (0)) __PYX_ERR(1, 1633, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_4);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_4) != (0)) __PYX_ERR(1, 1633, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_4 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":1632
 *         self.run_end_encoded_type = <const CRunEndEncodedType*> type.get()
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         return run_end_encoded, (self.run_end_type, self.value_type)
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pyarrow.lib.RunEndEncodedType.__reduce__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":1635
 *         return run_end_encoded, (self.run_end_type, self.value_type)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def run_end_type(self):
 *         return pyarrow_wrap_data_type(self.run_end_encoded_type.run_end_type())
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_17RunEndEncodedType_12run_end_type_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_17RunEndEncodedType_12run_end_type_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_17RunEndEncodedType_12run_end_type___get__(((struct __pyx_obj_7pyarrow_3lib_RunEndEncodedType *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_17RunEndEncodedType_12run_end_type___get__(struct __pyx_obj_7pyarrow_3lib_RunEndEncodedType *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyarrow/types.pxi":1637
 *     @property
 *     def run_end_type(self):
 *         return pyarrow_wrap_data_type(self.run_end_encoded_type.run_end_type())             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "run_end_encoded_type");
    __PYX_ERR(1, 1637, __pyx_L1_error)
  }
  __pyx_t_1 = pyarrow_wrap_data_type(__pyx_v_self->run_end_encoded_type->run_end_type()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1637, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":1635
 *         return run_end_encoded, (self.run_end_type, self.value_type)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def run_end_type(self):
 *         return pyarrow_wrap_data_type(self.run_end_encoded_type.run_end_type())
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib.RunEndEncodedType.run_end_type.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":1639
 *         return pyarrow_wrap_data_type(self.run_end_encoded_type.run_end_type())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def value_type(self):
 *         return pyarrow_wrap_data_type(self.run_end_encoded_type.value_type())
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_17RunEndEncodedType_10value_type_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_17RunEndEncodedType_10value_type_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_17RunEndEncodedType_10value_type___get__(((struct __pyx_obj_7pyarrow_3lib_RunEndEncodedType *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_17RunEndEncodedType_10value_type___get__(struct __pyx_obj_7pyarrow_3lib_RunEndEncodedType *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyarrow/types.pxi":1641
 *     @property
 *     def value_type(self):
 *         return pyarrow_wrap_data_type(self.run_end_encoded_type.value_type())             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "run_end_encoded_type");
    __PYX_ERR(1, 1641, __pyx_L1_error)
  }
  __pyx_t_1 = pyarrow_wrap_data_type(__pyx_v_self->run_end_encoded_type->value_type()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1641, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":1639
 *         return pyarrow_wrap_data_type(self.run_end_encoded_type.run_end_type())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def value_type(self):
 *         return pyarrow_wrap_data_type(self.run_end_encoded_type.value_type())
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib.RunEndEncodedType.value_type.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":1649
 *     """
 * 
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:             # <<<<<<<<<<<<<<
 *         DataType.init(self, type)
 *         self.ext_type = <const CExtensionType*> type.get()
*/

static void __pyx_f_7pyarrow_3lib_17BaseExtensionType_init(struct __pyx_obj_7pyarrow_3lib_BaseExtensionType *__pyx_v_self, std::shared_ptr< arrow::DataType>  const &__pyx_v_type) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "pyarrow/types.pxi":1650
 * 
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:
 *         DataType.init(self, type)             # <<<<<<<<<<<<<<
 *         self.ext_type = <const CExtensionType*> type.get()
 * 
*/
  __pyx_f_7pyarrow_3lib_8DataType_init(((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_v_self), __pyx_v_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1650, __pyx_L1_error)

  /* "pyarrow/types.pxi":1651
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:
 *         DataType.init(self, type)
 *         self.ext_type = <const CExtensionType*> type.get()             # <<<<<<<<<<<<<<
 * 
 *     def __arrow_ext_class__(self):
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "ext_type");
    __PYX_ERR(1, 1651, __pyx_L1_error)
  }
  __pyx_v_self->ext_type = (( arrow::ExtensionType const *)__pyx_v_type.get());

  /* "pyarrow/types.pxi":1649
 *     """
 * 
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:             # <<<<<<<<<<<<<<
 *         DataType.init(self, type)
 *         self.ext_type = <const CExtensionType*> type.get()
*/

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyarrow.lib.BaseExtensionType.init", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
}

/* "pyarrow/types.pxi":1653
 *         self.ext_type = <const CExtensionType*> type.get()
 * 
 *     def __arrow_ext_class__(self):             # <<<<<<<<<<<<<<
 *         """
 *         The associated array extension class
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_17BaseExtensionType_1__arrow_ext_class__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_17BaseExtensionType___arrow_ext_class__, "BaseExtensionType.__arrow_ext_class__(self)\n\nThe associated array extension class");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_17BaseExtensionType_1__arrow_ext_class__ = {"__arrow_ext_class__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_17BaseExtensionType_1__arrow_ext_class__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_17BaseExtensionType___arrow_ext_class__};
static PyObject *__pyx_pw_7pyarrow_3lib_17BaseExtensionType_1__arrow_ext_class__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__arrow_ext_class__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__arrow_ext_class__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__arrow_ext_class__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7pyarrow_3lib_17BaseExtensionType___arrow_ext_class__(((struct __pyx_obj_7pyarrow_3lib_BaseExtensionType *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_17BaseExtensionType___arrow_ext_class__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_BaseExtensionType *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__arrow_ext_class__", 0);

  /* "pyarrow/types.pxi":1657
 *         The associated array extension class
 *         """
 *         return ExtensionArray             # <<<<<<<<<<<<<<
 * 
 *     def __arrow_ext_scalar_class__(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ExtensionArray);
  __pyx_r = ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ExtensionArray);
  goto __pyx_L0;

  /* "pyarrow/types.pxi":1653
 *         self.ext_type = <const CExtensionType*> type.get()
 * 
 *     def __arrow_ext_class__(self):             # <<<<<<<<<<<<<<
 *         """
 *         The associated array extension class
*/

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

/* "pyarrow/types.pxi":1659
 *         return ExtensionArray
 * 
 *     def __arrow_ext_scalar_class__(self):             # <<<<<<<<<<<<<<
 *         """
 *         The associated scalar class
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_17BaseExtensionType_3__arrow_ext_scalar_class__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_17BaseExtensionType_2__arrow_ext_scalar_class__, "BaseExtensionType.__arrow_ext_scalar_class__(self)\n\nThe associated scalar class");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_17BaseExtensionType_3__arrow_ext_scalar_class__ = {"__arrow_ext_scalar_class__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_17BaseExtensionType_3__arrow_ext_scalar_class__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_17BaseExtensionType_2__arrow_ext_scalar_class__};
static PyObject *__pyx_pw_7pyarrow_3lib_17BaseExtensionType_3__arrow_ext_scalar_class__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__arrow_ext_scalar_class__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__arrow_ext_scalar_class__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__arrow_ext_scalar_class__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7pyarrow_3lib_17BaseExtensionType_2__arrow_ext_scalar_class__(((struct __pyx_obj_7pyarrow_3lib_BaseExtensionType *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_17BaseExtensionType_2__arrow_ext_scalar_class__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_BaseExtensionType *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__arrow_ext_scalar_class__", 0);

  /* "pyarrow/types.pxi":1663
 *         The associated scalar class
 *         """
 *         return ExtensionScalar             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ExtensionScalar);
  __pyx_r = ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ExtensionScalar);
  goto __pyx_L0;

  /* "pyarrow/types.pxi":1659
 *         return ExtensionArray
 * 
 *     def __arrow_ext_scalar_class__(self):             # <<<<<<<<<<<<<<
 *         """
 *         The associated scalar class
*/

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

/* "pyarrow/types.pxi":1665
 *         return ExtensionScalar
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def extension_name(self):
 *         """
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_17BaseExtensionType_14extension_name_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_17BaseExtensionType_14extension_name_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_17BaseExtensionType_14extension_name___get__(((struct __pyx_obj_7pyarrow_3lib_BaseExtensionType *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_17BaseExtensionType_14extension_name___get__(struct __pyx_obj_7pyarrow_3lib_BaseExtensionType *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyarrow/types.pxi":1670
 *         The extension type name.
 *         """
 *         return frombytes(self.ext_type.extension_name())             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_frombytes); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1670, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "ext_type");
    __PYX_ERR(1, 1670, __pyx_L1_error)
  }
  __pyx_t_4 = __pyx_convert_PyBytes_string_to_py_6libcpp_6string_std__in_string(__pyx_v_self->ext_type->extension_name()); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1670, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1670, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":1665
 *         return ExtensionScalar
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def extension_name(self):
 *         """
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pyarrow.lib.BaseExtensionType.extension_name.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":1672
 *         return frombytes(self.ext_type.extension_name())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def storage_type(self):
 *         """
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_17BaseExtensionType_12storage_type_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_17BaseExtensionType_12storage_type_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_17BaseExtensionType_12storage_type___get__(((struct __pyx_obj_7pyarrow_3lib_BaseExtensionType *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_17BaseExtensionType_12storage_type___get__(struct __pyx_obj_7pyarrow_3lib_BaseExtensionType *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyarrow/types.pxi":1677
 *         The underlying storage type.
 *         """
 *         return pyarrow_wrap_data_type(self.ext_type.storage_type())             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "ext_type");
    __PYX_ERR(1, 1677, __pyx_L1_error)
  }
  __pyx_t_1 = pyarrow_wrap_data_type(__pyx_v_self->ext_type->storage_type()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1677, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":1672
 *         return frombytes(self.ext_type.extension_name())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def storage_type(self):
 *         """
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib.BaseExtensionType.storage_type.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":1679
 *         return pyarrow_wrap_data_type(self.ext_type.storage_type())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def byte_width(self):
 *         """
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_17BaseExtensionType_10byte_width_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_17BaseExtensionType_10byte_width_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_17BaseExtensionType_10byte_width___get__(((struct __pyx_obj_7pyarrow_3lib_BaseExtensionType *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_17BaseExtensionType_10byte_width___get__(struct __pyx_obj_7pyarrow_3lib_BaseExtensionType *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyarrow/types.pxi":1684
 *         The byte width of the extension type.
 *         """
 *         if self.ext_type.byte_width() == -1:             # <<<<<<<<<<<<<<
 *             raise ValueError("Non-fixed width type")
 *         return self.ext_type.byte_width()
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "ext_type");
    __PYX_ERR(1, 1684, __pyx_L1_error)
  }
  __pyx_t_1 = (__pyx_v_self->ext_type->byte_width() == -1L);
  if (unlikely(__pyx_t_1)) {

    /* "pyarrow/types.pxi":1685
 *         """
 *         if self.ext_type.byte_width() == -1:
 *             raise ValueError("Non-fixed width type")             # <<<<<<<<<<<<<<
 *         return self.ext_type.byte_width()
 * 
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Non_fixed_width_type};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1685, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(1, 1685, __pyx_L1_error)

    /* "pyarrow/types.pxi":1684
 *         The byte width of the extension type.
 *         """
 *         if self.ext_type.byte_width() == -1:             # <<<<<<<<<<<<<<
 *             raise ValueError("Non-fixed width type")
 *         return self.ext_type.byte_width()
*/
  }

  /* "pyarrow/types.pxi":1686
 *         if self.ext_type.byte_width() == -1:
 *             raise ValueError("Non-fixed width type")
 *         return self.ext_type.byte_width()             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "ext_type");
    __PYX_ERR(1, 1686, __pyx_L1_error)
  }
  __pyx_t_2 = __Pyx_PyLong_From_int(__pyx_v_self->ext_type->byte_width()); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1686, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":1679
 *         return pyarrow_wrap_data_type(self.ext_type.storage_type())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def byte_width(self):
 *         """
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyarrow.lib.BaseExtensionType.byte_width.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":1688
 *         return self.ext_type.byte_width()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def bit_width(self):
 *         """
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_17BaseExtensionType_9bit_width_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_17BaseExtensionType_9bit_width_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_17BaseExtensionType_9bit_width___get__(((struct __pyx_obj_7pyarrow_3lib_BaseExtensionType *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_17BaseExtensionType_9bit_width___get__(struct __pyx_obj_7pyarrow_3lib_BaseExtensionType *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyarrow/types.pxi":1693
 *         The bit width of the extension type.
 *         """
 *         if self.ext_type.bit_width() == -1:             # <<<<<<<<<<<<<<
 *             raise ValueError("Non-fixed width type")
 *         return self.ext_type.bit_width()
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "ext_type");
    __PYX_ERR(1, 1693, __pyx_L1_error)
  }
  __pyx_t_1 = (__pyx_v_self->ext_type->bit_width() == -1L);
  if (unlikely(__pyx_t_1)) {

    /* "pyarrow/types.pxi":1694
 *         """
 *         if self.ext_type.bit_width() == -1:
 *             raise ValueError("Non-fixed width type")             # <<<<<<<<<<<<<<
 *         return self.ext_type.bit_width()
 * 
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Non_fixed_width_type};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1694, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(1, 1694, __pyx_L1_error)

    /* "pyarrow/types.pxi":1693
 *         The bit width of the extension type.
 *         """
 *         if self.ext_type.bit_width() == -1:             # <<<<<<<<<<<<<<
 *             raise ValueError("Non-fixed width type")
 *         return self.ext_type.bit_width()
*/
  }

  /* "pyarrow/types.pxi":1695
 *         if self.ext_type.bit_width() == -1:
 *             raise ValueError("Non-fixed width type")
 *         return self.ext_type.bit_width()             # <<<<<<<<<<<<<<
 * 
 *     def wrap_array(self, storage):
*/
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "ext_type");
    __PYX_ERR(1, 1695, __pyx_L1_error)
  }
  __pyx_t_2 = __Pyx_PyLong_From_int(__pyx_v_self->ext_type->bit_width()); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1695, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":1688
 *         return self.ext_type.byte_width()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def bit_width(self):
 *         """
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyarrow.lib.BaseExtensionType.bit_width.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":1697
 *         return self.ext_type.bit_width()
 * 
 *     def wrap_array(self, storage):             # <<<<<<<<<<<<<<
 *         """
 *         Wrap the given storage array as an extension array.
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_17BaseExtensionType_5wrap_array(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_17BaseExtensionType_4wrap_array, "BaseExtensionType.wrap_array(self, storage)\n\nWrap the given storage array as an extension array.\n\nParameters\n----------\nstorage : Array or ChunkedArray\n\nReturns\n-------\narray : Array or ChunkedArray\n    Extension array wrapping the storage array");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_17BaseExtensionType_5wrap_array = {"wrap_array", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_17BaseExtensionType_5wrap_array, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_17BaseExtensionType_4wrap_array};
static PyObject *__pyx_pw_7pyarrow_3lib_17BaseExtensionType_5wrap_array(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_storage = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("wrap_array (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_storage,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 1697, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 1697, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "wrap_array", 0) < (0)) __PYX_ERR(1, 1697, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("wrap_array", 1, 1, 1, i); __PYX_ERR(1, 1697, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 1697, __pyx_L3_error)
    }
    __pyx_v_storage = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("wrap_array", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 1697, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("pyarrow.lib.BaseExtensionType.wrap_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyarrow_3lib_17BaseExtensionType_4wrap_array(((struct __pyx_obj_7pyarrow_3lib_BaseExtensionType *)__pyx_v_self), __pyx_v_storage);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7pyarrow_3lib_17BaseExtensionType_4wrap_array(struct __pyx_obj_7pyarrow_3lib_BaseExtensionType *__pyx_v_self, PyObject *__pyx_v_storage) {
  std::shared_ptr< arrow::DataType>  __pyx_v_c_storage_type;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9[6];
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("wrap_array", 0);

  /* "pyarrow/types.pxi":1713
 *             shared_ptr[CDataType] c_storage_type
 * 
 *         if isinstance(storage, Array):             # <<<<<<<<<<<<<<
 *             c_storage_type = (<Array> storage).ap.type()
 *         elif isinstance(storage, ChunkedArray):
*/
  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_storage, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array); 
  if (__pyx_t_1) {

    /* "pyarrow/types.pxi":1714
 * 
 *         if isinstance(storage, Array):
 *             c_storage_type = (<Array> storage).ap.type()             # <<<<<<<<<<<<<<
 *         elif isinstance(storage, ChunkedArray):
 *             c_storage_type = (<ChunkedArray> storage).chunked_array.type()
*/
    if (unlikely(__pyx_v_storage == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "ap");
      __PYX_ERR(1, 1714, __pyx_L1_error)
    }
    __pyx_v_c_storage_type = ((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_v_storage)->ap->type();

    /* "pyarrow/types.pxi":1713
 *             shared_ptr[CDataType] c_storage_type
 * 
 *         if isinstance(storage, Array):             # <<<<<<<<<<<<<<
 *             c_storage_type = (<Array> storage).ap.type()
 *         elif isinstance(storage, ChunkedArray):
*/
    goto __pyx_L3;
  }

  /* "pyarrow/types.pxi":1715
 *         if isinstance(storage, Array):
 *             c_storage_type = (<Array> storage).ap.type()
 *         elif isinstance(storage, ChunkedArray):             # <<<<<<<<<<<<<<
 *             c_storage_type = (<ChunkedArray> storage).chunked_array.type()
 *         else:
*/
  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_storage, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ChunkedArray); 
  if (likely(__pyx_t_1)) {

    /* "pyarrow/types.pxi":1716
 *             c_storage_type = (<Array> storage).ap.type()
 *         elif isinstance(storage, ChunkedArray):
 *             c_storage_type = (<ChunkedArray> storage).chunked_array.type()             # <<<<<<<<<<<<<<
 *         else:
 *             raise TypeError(
*/
    if (unlikely(__pyx_v_storage == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "chunked_array");
      __PYX_ERR(1, 1716, __pyx_L1_error)
    }
    __pyx_v_c_storage_type = ((struct __pyx_obj_7pyarrow_3lib_ChunkedArray *)__pyx_v_storage)->chunked_array->type();

    /* "pyarrow/types.pxi":1715
 *         if isinstance(storage, Array):
 *             c_storage_type = (<Array> storage).ap.type()
 *         elif isinstance(storage, ChunkedArray):             # <<<<<<<<<<<<<<
 *             c_storage_type = (<ChunkedArray> storage).chunked_array.type()
 *         else:
*/
    goto __pyx_L3;
  }

  /* "pyarrow/types.pxi":1718
 *             c_storage_type = (<ChunkedArray> storage).chunked_array.type()
 *         else:
 *             raise TypeError(             # <<<<<<<<<<<<<<
 *                 f"Expected array or chunked array, got {storage.__class__}")
 * 
*/
  /*else*/ {
    __pyx_t_3 = NULL;

    /* "pyarrow/types.pxi":1719
 *         else:
 *             raise TypeError(
 *                 f"Expected array or chunked array, got {storage.__class__}")             # <<<<<<<<<<<<<<
 * 
 *         if not c_storage_type.get().Equals(deref(self.ext_type)
*/
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_storage, __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1719, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1719, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_Expected_array_or_chunked_array, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1719, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_6 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1718, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(1, 1718, __pyx_L1_error)
  }
  __pyx_L3:;

  /* "pyarrow/types.pxi":1721
 *                 f"Expected array or chunked array, got {storage.__class__}")
 * 
 *         if not c_storage_type.get().Equals(deref(self.ext_type)             # <<<<<<<<<<<<<<
 *                                            .storage_type(), False):
 *             raise TypeError(
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "ext_type");
    __PYX_ERR(1, 1721, __pyx_L1_error)
  }

  /* "pyarrow/types.pxi":1722
 * 
 *         if not c_storage_type.get().Equals(deref(self.ext_type)
 *                                            .storage_type(), False):             # <<<<<<<<<<<<<<
 *             raise TypeError(
 *                 f"Incompatible storage type for {self}: "
*/
  __pyx_t_1 = (!(__pyx_v_c_storage_type.get()->Equals((*__pyx_v_self->ext_type).storage_type(), 0) != 0));

  /* "pyarrow/types.pxi":1721
 *                 f"Expected array or chunked array, got {storage.__class__}")
 * 
 *         if not c_storage_type.get().Equals(deref(self.ext_type)             # <<<<<<<<<<<<<<
 *                                            .storage_type(), False):
 *             raise TypeError(
*/
  if (unlikely(__pyx_t_1)) {

    /* "pyarrow/types.pxi":1723
 *         if not c_storage_type.get().Equals(deref(self.ext_type)
 *                                            .storage_type(), False):
 *             raise TypeError(             # <<<<<<<<<<<<<<
 *                 f"Incompatible storage type for {self}: "
 *                 f"expected {self.storage_type}, got {storage.type}")
*/
    __pyx_t_4 = NULL;

    /* "pyarrow/types.pxi":1724
 *                                            .storage_type(), False):
 *             raise TypeError(
 *                 f"Incompatible storage type for {self}: "             # <<<<<<<<<<<<<<
 *                 f"expected {self.storage_type}, got {storage.type}")
 * 
*/
    __pyx_t_3 = __Pyx_PyObject_FormatSimple(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1724, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);

    /* "pyarrow/types.pxi":1725
 *             raise TypeError(
 *                 f"Incompatible storage type for {self}: "
 *                 f"expected {self.storage_type}, got {storage.type}")             # <<<<<<<<<<<<<<
 * 
 *         if isinstance(storage, Array):
*/
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_storage_type); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1725, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1725, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_storage, __pyx_mstate_global->__pyx_n_u_type); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1725, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_8 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1725, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_9[0] = __pyx_mstate_global->__pyx_kp_u_Incompatible_storage_type_for;
    __pyx_t_9[1] = __pyx_t_3;
    __pyx_t_9[2] = __pyx_mstate_global->__pyx_kp_u_expected;
    __pyx_t_9[3] = __pyx_t_7;
    __pyx_t_9[4] = __pyx_mstate_global->__pyx_kp_u_got;
    __pyx_t_9[5] = __pyx_t_8;

    /* "pyarrow/types.pxi":1724
 *                                            .storage_type(), False):
 *             raise TypeError(
 *                 f"Incompatible storage type for {self}: "             # <<<<<<<<<<<<<<
 *                 f"expected {self.storage_type}, got {storage.type}")
 * 
*/
    __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_9, 6, 30 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + 11 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7) + 6 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8));
    if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1724, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_6 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1723, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(1, 1723, __pyx_L1_error)

    /* "pyarrow/types.pxi":1721
 *                 f"Expected array or chunked array, got {storage.__class__}")
 * 
 *         if not c_storage_type.get().Equals(deref(self.ext_type)             # <<<<<<<<<<<<<<
 *                                            .storage_type(), False):
 *             raise TypeError(
*/
  }

  /* "pyarrow/types.pxi":1727
 *                 f"expected {self.storage_type}, got {storage.type}")
 * 
 *         if isinstance(storage, Array):             # <<<<<<<<<<<<<<
 *             return pyarrow_wrap_array(
 *                 self.ext_type.WrapArray(
*/
  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_storage, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array); 
  if (__pyx_t_1) {

    /* "pyarrow/types.pxi":1728
 * 
 *         if isinstance(storage, Array):
 *             return pyarrow_wrap_array(             # <<<<<<<<<<<<<<
 *                 self.ext_type.WrapArray(
 *                     self.sp_type, (<Array> storage).sp_array))
*/
    __Pyx_XDECREF(__pyx_r);

    /* "pyarrow/types.pxi":1729
 *         if isinstance(storage, Array):
 *             return pyarrow_wrap_array(
 *                 self.ext_type.WrapArray(             # <<<<<<<<<<<<<<
 *                     self.sp_type, (<Array> storage).sp_array))
 *         else:
*/
    if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "ext_type");
      __PYX_ERR(1, 1729, __pyx_L1_error)
    }

    /* "pyarrow/types.pxi":1730
 *             return pyarrow_wrap_array(
 *                 self.ext_type.WrapArray(
 *                     self.sp_type, (<Array> storage).sp_array))             # <<<<<<<<<<<<<<
 *         else:
 *             return pyarrow_wrap_chunked_array(
*/
    if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_type");
      __PYX_ERR(1, 1730, __pyx_L1_error)
    }
    if (unlikely(__pyx_v_storage == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_array");
      __PYX_ERR(1, 1730, __pyx_L1_error)
    }

    /* "pyarrow/types.pxi":1728
 * 
 *         if isinstance(storage, Array):
 *             return pyarrow_wrap_array(             # <<<<<<<<<<<<<<
 *                 self.ext_type.WrapArray(
 *                     self.sp_type, (<Array> storage).sp_array))
*/
    __pyx_t_2 = pyarrow_wrap_array(__pyx_v_self->ext_type->WrapArray(__pyx_v_self->__pyx_base.sp_type, ((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_v_storage)->sp_array)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1728, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pyarrow/types.pxi":1727
 *                 f"expected {self.storage_type}, got {storage.type}")
 * 
 *         if isinstance(storage, Array):             # <<<<<<<<<<<<<<
 *             return pyarrow_wrap_array(
 *                 self.ext_type.WrapArray(
*/
  }

  /* "pyarrow/types.pxi":1732
 *                     self.sp_type, (<Array> storage).sp_array))
 *         else:
 *             return pyarrow_wrap_chunked_array(             # <<<<<<<<<<<<<<
 *                 self.ext_type.WrapArray(
 *                     self.sp_type, (<ChunkedArray> storage).sp_chunked_array))
*/
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);

    /* "pyarrow/types.pxi":1733
 *         else:
 *             return pyarrow_wrap_chunked_array(
 *                 self.ext_type.WrapArray(             # <<<<<<<<<<<<<<
 *                     self.sp_type, (<ChunkedArray> storage).sp_chunked_array))
 * 
*/
    if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "ext_type");
      __PYX_ERR(1, 1733, __pyx_L1_error)
    }

    /* "pyarrow/types.pxi":1734
 *             return pyarrow_wrap_chunked_array(
 *                 self.ext_type.WrapArray(
 *                     self.sp_type, (<ChunkedArray> storage).sp_chunked_array))             # <<<<<<<<<<<<<<
 * 
 * 
*/
    if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_type");
      __PYX_ERR(1, 1734, __pyx_L1_error)
    }
    if (unlikely(__pyx_v_storage == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_chunked_array");
      __PYX_ERR(1, 1734, __pyx_L1_error)
    }

    /* "pyarrow/types.pxi":1732
 *                     self.sp_type, (<Array> storage).sp_array))
 *         else:
 *             return pyarrow_wrap_chunked_array(             # <<<<<<<<<<<<<<
 *                 self.ext_type.WrapArray(
 *                     self.sp_type, (<ChunkedArray> storage).sp_chunked_array))
*/
    __pyx_t_2 = pyarrow_wrap_chunked_array(__pyx_v_self->ext_type->WrapArray(__pyx_v_self->__pyx_base.sp_type, ((struct __pyx_obj_7pyarrow_3lib_ChunkedArray *)__pyx_v_storage)->sp_chunked_array)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1732, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }

  /* "pyarrow/types.pxi":1697
 *         return self.ext_type.bit_width()
 * 
 *     def wrap_array(self, storage):             # <<<<<<<<<<<<<<
 *         """
 *         Wrap the given storage array as an extension array.
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("pyarrow.lib.BaseExtensionType.wrap_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":1844
 *     """
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         if type(self) is ExtensionType:
 *             raise TypeError("Can only instantiate subclasses of "
*/

/* Python wrapper */
static int __pyx_pw_7pyarrow_3lib_13ExtensionType_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_7pyarrow_3lib_13ExtensionType_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, __pyx_nargs); return -1; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return -1;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__cinit__", __pyx_kwds); return -1;}
  __pyx_r = __pyx_pf_7pyarrow_3lib_13ExtensionType___cinit__(((struct __pyx_obj_7pyarrow_3lib_ExtensionType *)__pyx_v_self));

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

static int __pyx_pf_7pyarrow_3lib_13ExtensionType___cinit__(struct __pyx_obj_7pyarrow_3lib_ExtensionType *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "pyarrow/types.pxi":1845
 * 
 *     def __cinit__(self):
 *         if type(self) is ExtensionType:             # <<<<<<<<<<<<<<
 *             raise TypeError("Can only instantiate subclasses of "
 *                             "ExtensionType")
*/
  __pyx_t_1 = (((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))) == ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ExtensionType));
  if (unlikely(__pyx_t_1)) {

    /* "pyarrow/types.pxi":1846
 *     def __cinit__(self):
 *         if type(self) is ExtensionType:
 *             raise TypeError("Can only instantiate subclasses of "             # <<<<<<<<<<<<<<
 *                             "ExtensionType")
 * 
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Can_only_instantiate_subclasses};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1846, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(1, 1846, __pyx_L1_error)

    /* "pyarrow/types.pxi":1845
 * 
 *     def __cinit__(self):
 *         if type(self) is ExtensionType:             # <<<<<<<<<<<<<<
 *             raise TypeError("Can only instantiate subclasses of "
 *                             "ExtensionType")
*/
  }

  /* "pyarrow/types.pxi":1844
 *     """
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         if type(self) is ExtensionType:
 *             raise TypeError("Can only instantiate subclasses of "
*/

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyarrow.lib.ExtensionType.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":1849
 *                             "ExtensionType")
 * 
 *     def __init__(self, DataType storage_type, extension_name):             # <<<<<<<<<<<<<<
 *         """
 *         Initialize an extension type instance.
*/

/* Python wrapper */
static int __pyx_pw_7pyarrow_3lib_13ExtensionType_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_13ExtensionType_2__init__, "\n        Initialize an extension type instance.\n\n        This should be called at the end of the subclass'\n        ``__init__`` method.\n        ");
#if CYTHON_UPDATE_DESCRIPTOR_DOC
struct wrapperbase __pyx_wrapperbase_7pyarrow_3lib_13ExtensionType_2__init__;
#endif
static int __pyx_pw_7pyarrow_3lib_13ExtensionType_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v_storage_type = 0;
  PyObject *__pyx_v_extension_name = 0;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_storage_type,&__pyx_mstate_global->__pyx_n_u_extension_name,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 1849, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 1849, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 1849, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(1, 1849, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, i); __PYX_ERR(1, 1849, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 1849, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 1849, __pyx_L3_error)
    }
    __pyx_v_storage_type = ((struct __pyx_obj_7pyarrow_3lib_DataType *)values[0]);
    __pyx_v_extension_name = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, __pyx_nargs); __PYX_ERR(1, 1849, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("pyarrow.lib.ExtensionType.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_storage_type), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType, 1, "storage_type", 0))) __PYX_ERR(1, 1849, __pyx_L1_error)
  __pyx_r = __pyx_pf_7pyarrow_3lib_13ExtensionType_2__init__(((struct __pyx_obj_7pyarrow_3lib_ExtensionType *)__pyx_v_self), __pyx_v_storage_type, __pyx_v_extension_name);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7pyarrow_3lib_13ExtensionType_2__init__(struct __pyx_obj_7pyarrow_3lib_ExtensionType *__pyx_v_self, struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v_storage_type, PyObject *__pyx_v_extension_name) {
  std::shared_ptr< arrow::ExtensionType>  __pyx_v_cpy_ext_type;
  std::string __pyx_v_c_extension_name;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  std::string __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "pyarrow/types.pxi":1860
 *             c_string c_extension_name
 * 
 *         c_extension_name = tobytes(extension_name)             # <<<<<<<<<<<<<<
 * 
 *         assert storage_type is not None
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_tobytes); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1860, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_extension_name};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1860, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_t_5 = __pyx_convert_string_from_py_6libcpp_6string_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1860, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_c_extension_name = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_5);

  /* "pyarrow/types.pxi":1862
 *         c_extension_name = tobytes(extension_name)
 * 
 *         assert storage_type is not None             # <<<<<<<<<<<<<<
 *         check_status(CPyExtensionType.FromClass(
 *             storage_type.sp_type, c_extension_name, type(self),
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_6 = (((PyObject *)__pyx_v_storage_type) != Py_None);
    if (unlikely(!__pyx_t_6)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(1, 1862, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(1, 1862, __pyx_L1_error)
  #endif

  /* "pyarrow/types.pxi":1864
 *         assert storage_type is not None
 *         check_status(CPyExtensionType.FromClass(
 *             storage_type.sp_type, c_extension_name, type(self),             # <<<<<<<<<<<<<<
 *             &cpy_ext_type))
 *         self.init(<shared_ptr[CDataType]> cpy_ext_type)
*/
  if (unlikely(((PyObject *)__pyx_v_storage_type) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_type");
    __PYX_ERR(1, 1864, __pyx_L1_error)
  }

  /* "pyarrow/types.pxi":1863
 * 
 *         assert storage_type is not None
 *         check_status(CPyExtensionType.FromClass(             # <<<<<<<<<<<<<<
 *             storage_type.sp_type, c_extension_name, type(self),
 *             &cpy_ext_type))
*/
  __pyx_t_7 = __pyx_f_7pyarrow_3lib_check_status( arrow::py::PyExtensionType::FromClass(__pyx_v_storage_type->sp_type, __pyx_v_c_extension_name, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))), (&__pyx_v_cpy_ext_type))); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(1, 1863, __pyx_L1_error)

  /* "pyarrow/types.pxi":1866
 *             storage_type.sp_type, c_extension_name, type(self),
 *             &cpy_ext_type))
 *         self.init(<shared_ptr[CDataType]> cpy_ext_type)             # <<<<<<<<<<<<<<
 * 
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "init");
    __PYX_ERR(1, 1866, __pyx_L1_error)
  }
  ((struct __pyx_vtabstruct_7pyarrow_3lib_ExtensionType *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.init(((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_v_self), ((std::shared_ptr< arrow::DataType> )__pyx_v_cpy_ext_type)); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1866, __pyx_L1_error)

  /* "pyarrow/types.pxi":1849
 *                             "ExtensionType")
 * 
 *     def __init__(self, DataType storage_type, extension_name):             # <<<<<<<<<<<<<<
 *         """
 *         Initialize an extension type instance.
*/

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

/* "pyarrow/types.pxi":1868
 *         self.init(<shared_ptr[CDataType]> cpy_ext_type)
 * 
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:             # <<<<<<<<<<<<<<
 *         BaseExtensionType.init(self, type)
 *         self.cpy_ext_type = <const CPyExtensionType*> type.get()
*/

static void __pyx_f_7pyarrow_3lib_13ExtensionType_init(struct __pyx_obj_7pyarrow_3lib_ExtensionType *__pyx_v_self, std::shared_ptr< arrow::DataType>  const &__pyx_v_type) {
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "pyarrow/types.pxi":1869
 * 
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:
 *         BaseExtensionType.init(self, type)             # <<<<<<<<<<<<<<
 *         self.cpy_ext_type = <const CPyExtensionType*> type.get()
 *         # Store weakref and serialized version of self on C++ type instance
*/
  __pyx_f_7pyarrow_3lib_17BaseExtensionType_init(((struct __pyx_obj_7pyarrow_3lib_BaseExtensionType *)__pyx_v_self), __pyx_v_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1869, __pyx_L1_error)

  /* "pyarrow/types.pxi":1870
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:
 *         BaseExtensionType.init(self, type)
 *         self.cpy_ext_type = <const CPyExtensionType*> type.get()             # <<<<<<<<<<<<<<
 *         # Store weakref and serialized version of self on C++ type instance
 *         check_status(self.cpy_ext_type.SetInstance(self))
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "cpy_ext_type");
    __PYX_ERR(1, 1870, __pyx_L1_error)
  }
  __pyx_v_self->cpy_ext_type = (( arrow::py::PyExtensionType const *)__pyx_v_type.get());

  /* "pyarrow/types.pxi":1872
 *         self.cpy_ext_type = <const CPyExtensionType*> type.get()
 *         # Store weakref and serialized version of self on C++ type instance
 *         check_status(self.cpy_ext_type.SetInstance(self))             # <<<<<<<<<<<<<<
 * 
 *     def __eq__(self, other):
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "cpy_ext_type");
    __PYX_ERR(1, 1872, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_7pyarrow_3lib_check_status(__pyx_v_self->cpy_ext_type->SetInstance(((PyObject *)__pyx_v_self))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 1872, __pyx_L1_error)

  /* "pyarrow/types.pxi":1868
 *         self.init(<shared_ptr[CDataType]> cpy_ext_type)
 * 
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:             # <<<<<<<<<<<<<<
 *         BaseExtensionType.init(self, type)
 *         self.cpy_ext_type = <const CPyExtensionType*> type.get()
*/

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyarrow.lib.ExtensionType.init", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
}

/* "pyarrow/types.pxi":1874
 *         check_status(self.cpy_ext_type.SetInstance(self))
 * 
 *     def __eq__(self, other):             # <<<<<<<<<<<<<<
 *         # Default implementation to avoid infinite recursion through
 *         # DataType.__eq__ -> ExtensionType::ExtensionEquals -> DataType.__eq__
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_13ExtensionType_5__eq__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_13ExtensionType_5__eq__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__eq__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_13ExtensionType_4__eq__(((struct __pyx_obj_7pyarrow_3lib_ExtensionType *)__pyx_v_self), ((PyObject *)__pyx_v_other));

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

static PyObject *__pyx_pf_7pyarrow_3lib_13ExtensionType_4__eq__(struct __pyx_obj_7pyarrow_3lib_ExtensionType *__pyx_v_self, PyObject *__pyx_v_other) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__eq__", 0);

  /* "pyarrow/types.pxi":1877
 *         # Default implementation to avoid infinite recursion through
 *         # DataType.__eq__ -> ExtensionType::ExtensionEquals -> DataType.__eq__
 *         if isinstance(other, ExtensionType):             # <<<<<<<<<<<<<<
 *             return (type(self) == type(other) and
 *                     self.extension_name == other.extension_name and
*/
  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_other, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ExtensionType); 
  if (__pyx_t_1) {

    /* "pyarrow/types.pxi":1878
 *         # DataType.__eq__ -> ExtensionType::ExtensionEquals -> DataType.__eq__
 *         if isinstance(other, ExtensionType):
 *             return (type(self) == type(other) and             # <<<<<<<<<<<<<<
 *                     self.extension_name == other.extension_name and
 *                     self.storage_type == other.storage_type)
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = PyObject_RichCompare(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))), ((PyObject *)Py_TYPE(__pyx_v_other)), Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1878, __pyx_L1_error)
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 1878, __pyx_L1_error)
    if (__pyx_t_1) {
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else {
      __Pyx_INCREF(__pyx_t_3);
      __pyx_t_2 = __pyx_t_3;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      goto __pyx_L4_bool_binop_done;
    }

    /* "pyarrow/types.pxi":1879
 *         if isinstance(other, ExtensionType):
 *             return (type(self) == type(other) and
 *                     self.extension_name == other.extension_name and             # <<<<<<<<<<<<<<
 *                     self.storage_type == other.storage_type)
 *         else:
*/
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_extension_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1879, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_mstate_global->__pyx_n_u_extension_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1879, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1879, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 1879, __pyx_L1_error)
    if (__pyx_t_1) {
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else {
      __Pyx_INCREF(__pyx_t_5);
      __pyx_t_2 = __pyx_t_5;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      goto __pyx_L4_bool_binop_done;
    }

    /* "pyarrow/types.pxi":1880
 *             return (type(self) == type(other) and
 *                     self.extension_name == other.extension_name and
 *                     self.storage_type == other.storage_type)             # <<<<<<<<<<<<<<
 *         else:
 *             return NotImplemented
*/
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_storage_type); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1880, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_mstate_global->__pyx_n_u_storage_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1880, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = PyObject_RichCompare(__pyx_t_5, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1880, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_2 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_L4_bool_binop_done:;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pyarrow/types.pxi":1877
 *         # Default implementation to avoid infinite recursion through
 *         # DataType.__eq__ -> ExtensionType::ExtensionEquals -> DataType.__eq__
 *         if isinstance(other, ExtensionType):             # <<<<<<<<<<<<<<
 *             return (type(self) == type(other) and
 *                     self.extension_name == other.extension_name and
*/
  }

  /* "pyarrow/types.pxi":1882
 *                     self.storage_type == other.storage_type)
 *         else:
 *             return NotImplemented             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
*/
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_builtin_NotImplemented);
    __pyx_r = __pyx_builtin_NotImplemented;
    goto __pyx_L0;
  }

  /* "pyarrow/types.pxi":1874
 *         check_status(self.cpy_ext_type.SetInstance(self))
 * 
 *     def __eq__(self, other):             # <<<<<<<<<<<<<<
 *         # Default implementation to avoid infinite recursion through
 *         # DataType.__eq__ -> ExtensionType::ExtensionEquals -> DataType.__eq__
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pyarrow.lib.ExtensionType.__eq__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":1884
 *             return NotImplemented
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return f'{self.__class__.__name__}({repr(self.storage_type)})'
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_13ExtensionType_7__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_13ExtensionType_7__repr__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_13ExtensionType_6__repr__(((struct __pyx_obj_7pyarrow_3lib_ExtensionType *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_13ExtensionType_6__repr__(struct __pyx_obj_7pyarrow_3lib_ExtensionType *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4[4];
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);

  /* "pyarrow/types.pxi":1885
 * 
 *     def __repr__(self):
 *         return f'{self.__class__.__name__}({repr(self.storage_type)})'             # <<<<<<<<<<<<<<
 * 
 *     def __arrow_ext_serialize__(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1885, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_name_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1885, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_t_2, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1885, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_storage_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1885, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_Repr(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1885, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyUnicode_Unicode(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1885, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_4[0] = __pyx_t_1;
  __pyx_t_4[1] = __pyx_mstate_global->__pyx_kp_u__9;
  __pyx_t_4[2] = __pyx_t_2;
  __pyx_t_4[3] = __pyx_mstate_global->__pyx_kp_u__7;
  __pyx_t_3 = __Pyx_PyUnicode_Join(__pyx_t_4, 4, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1) + 1 * 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2));
  if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1885, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":1884
 *             return NotImplemented
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return f'{self.__class__.__name__}({repr(self.storage_type)})'
 * 
*/

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

/* "pyarrow/types.pxi":1887
 *         return f'{self.__class__.__name__}({repr(self.storage_type)})'
 * 
 *     def __arrow_ext_serialize__(self):             # <<<<<<<<<<<<<<
 *         """
 *         Serialized representation of metadata to reconstruct the type object.
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_13ExtensionType_9__arrow_ext_serialize__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_13ExtensionType_8__arrow_ext_serialize__, "ExtensionType.__arrow_ext_serialize__(self)\n\nSerialized representation of metadata to reconstruct the type object.\n\nThis method should return a bytes object, and those serialized bytes\nare stored in the custom metadata of the Field holding an extension\ntype in an IPC message.\nThe bytes are passed to ``__arrow_ext_deserialize`` and should hold\nsufficient information to reconstruct the data type instance.");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_13ExtensionType_9__arrow_ext_serialize__ = {"__arrow_ext_serialize__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_13ExtensionType_9__arrow_ext_serialize__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_13ExtensionType_8__arrow_ext_serialize__};
static PyObject *__pyx_pw_7pyarrow_3lib_13ExtensionType_9__arrow_ext_serialize__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__arrow_ext_serialize__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__arrow_ext_serialize__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__arrow_ext_serialize__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7pyarrow_3lib_13ExtensionType_8__arrow_ext_serialize__(((struct __pyx_obj_7pyarrow_3lib_ExtensionType *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_13ExtensionType_8__arrow_ext_serialize__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_ExtensionType *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__arrow_ext_serialize__", 0);

  /* "pyarrow/types.pxi":1897
 *         sufficient information to reconstruct the data type instance.
 *         """
 *         return NotImplementedError             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)(((PyTypeObject*)PyExc_NotImplementedError)));
  __pyx_r = ((PyObject *)(((PyTypeObject*)PyExc_NotImplementedError)));
  goto __pyx_L0;

  /* "pyarrow/types.pxi":1887
 *         return f'{self.__class__.__name__}({repr(self.storage_type)})'
 * 
 *     def __arrow_ext_serialize__(self):             # <<<<<<<<<<<<<<
 *         """
 *         Serialized representation of metadata to reconstruct the type object.
*/

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

/* "pyarrow/types.pxi":1899
 *         return NotImplementedError
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def __arrow_ext_deserialize__(cls, storage_type, serialized):
 *         """
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_13ExtensionType_11__arrow_ext_deserialize__(PyObject *__pyx_v_cls, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_13ExtensionType_10__arrow_ext_deserialize__, "ExtensionType.__arrow_ext_deserialize__(cls, storage_type, serialized)\n\nReturn an extension type instance from the storage type and serialized\nmetadata.\n\nThis method should return an instance of the ExtensionType subclass\nthat matches the passed storage type and serialized metadata (the\nreturn value of ``__arrow_ext_serialize__``).");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_13ExtensionType_11__arrow_ext_deserialize__ = {"__arrow_ext_deserialize__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_13ExtensionType_11__arrow_ext_deserialize__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_13ExtensionType_10__arrow_ext_deserialize__};
static PyObject *__pyx_pw_7pyarrow_3lib_13ExtensionType_11__arrow_ext_deserialize__(PyObject *__pyx_v_cls, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_storage_type = 0;
  CYTHON_UNUSED PyObject *__pyx_v_serialized = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__arrow_ext_deserialize__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_storage_type,&__pyx_mstate_global->__pyx_n_u_serialized,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 1899, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 1899, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 1899, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__arrow_ext_deserialize__", 0) < (0)) __PYX_ERR(1, 1899, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__arrow_ext_deserialize__", 1, 2, 2, i); __PYX_ERR(1, 1899, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 1899, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 1899, __pyx_L3_error)
    }
    __pyx_v_storage_type = values[0];
    __pyx_v_serialized = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__arrow_ext_deserialize__", 1, 2, 2, __pyx_nargs); __PYX_ERR(1, 1899, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("pyarrow.lib.ExtensionType.__arrow_ext_deserialize__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyarrow_3lib_13ExtensionType_10__arrow_ext_deserialize__(((PyTypeObject*)__pyx_v_cls), __pyx_v_storage_type, __pyx_v_serialized);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7pyarrow_3lib_13ExtensionType_10__arrow_ext_deserialize__(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, CYTHON_UNUSED PyObject *__pyx_v_storage_type, CYTHON_UNUSED PyObject *__pyx_v_serialized) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__arrow_ext_deserialize__", 0);

  /* "pyarrow/types.pxi":1909
 *         return value of ``__arrow_ext_serialize__``).
 *         """
 *         return NotImplementedError             # <<<<<<<<<<<<<<
 * 
 *     def __reduce__(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)(((PyTypeObject*)PyExc_NotImplementedError)));
  __pyx_r = ((PyObject *)(((PyTypeObject*)PyExc_NotImplementedError)));
  goto __pyx_L0;

  /* "pyarrow/types.pxi":1899
 *         return NotImplementedError
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def __arrow_ext_deserialize__(cls, storage_type, serialized):
 *         """
*/

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

/* "pyarrow/types.pxi":1911
 *         return NotImplementedError
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         return self.__arrow_ext_deserialize__, (self.storage_type, self.__arrow_ext_serialize__())
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_13ExtensionType_13__reduce__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_13ExtensionType_12__reduce__, "ExtensionType.__reduce__(self)");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_13ExtensionType_13__reduce__ = {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_13ExtensionType_13__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_13ExtensionType_12__reduce__};
static PyObject *__pyx_pw_7pyarrow_3lib_13ExtensionType_13__reduce__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7pyarrow_3lib_13ExtensionType_12__reduce__(((struct __pyx_obj_7pyarrow_3lib_ExtensionType *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_13ExtensionType_12__reduce__(struct __pyx_obj_7pyarrow_3lib_ExtensionType *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce__", 0);

  /* "pyarrow/types.pxi":1912
 * 
 *     def __reduce__(self):
 *         return self.__arrow_ext_deserialize__, (self.storage_type, self.__arrow_ext_serialize__())             # <<<<<<<<<<<<<<
 * 
 *     def __arrow_ext_class__(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_arrow_ext_deserialize); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1912, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_storage_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1912, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_arrow_ext_serialize, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1912, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  }
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1912, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2) != (0)) __PYX_ERR(1, 1912, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3) != (0)) __PYX_ERR(1, 1912, __pyx_L1_error);
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1912, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1) != (0)) __PYX_ERR(1, 1912, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_4);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_4) != (0)) __PYX_ERR(1, 1912, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_4 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":1911
 *         return NotImplementedError
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         return self.__arrow_ext_deserialize__, (self.storage_type, self.__arrow_ext_serialize__())
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pyarrow.lib.ExtensionType.__reduce__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":1914
 *         return self.__arrow_ext_deserialize__, (self.storage_type, self.__arrow_ext_serialize__())
 * 
 *     def __arrow_ext_class__(self):             # <<<<<<<<<<<<<<
 *         """Return an extension array class to be used for building or
 *         deserializing arrays with this extension type.
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_13ExtensionType_15__arrow_ext_class__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_13ExtensionType_14__arrow_ext_class__, "ExtensionType.__arrow_ext_class__(self)\n\nReturn an extension array class to be used for building or\ndeserializing arrays with this extension type.\n\nThis method should return a subclass of the ExtensionArray class. By\ndefault, if not specialized in the extension implementation, an\nextension type array will be a built-in ExtensionArray instance.");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_13ExtensionType_15__arrow_ext_class__ = {"__arrow_ext_class__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_13ExtensionType_15__arrow_ext_class__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_13ExtensionType_14__arrow_ext_class__};
static PyObject *__pyx_pw_7pyarrow_3lib_13ExtensionType_15__arrow_ext_class__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__arrow_ext_class__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__arrow_ext_class__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__arrow_ext_class__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7pyarrow_3lib_13ExtensionType_14__arrow_ext_class__(((struct __pyx_obj_7pyarrow_3lib_ExtensionType *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_13ExtensionType_14__arrow_ext_class__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_ExtensionType *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__arrow_ext_class__", 0);

  /* "pyarrow/types.pxi":1922
 *         extension type array will be a built-in ExtensionArray instance.
 *         """
 *         return ExtensionArray             # <<<<<<<<<<<<<<
 * 
 *     def __arrow_ext_scalar_class__(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ExtensionArray);
  __pyx_r = ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ExtensionArray);
  goto __pyx_L0;

  /* "pyarrow/types.pxi":1914
 *         return self.__arrow_ext_deserialize__, (self.storage_type, self.__arrow_ext_serialize__())
 * 
 *     def __arrow_ext_class__(self):             # <<<<<<<<<<<<<<
 *         """Return an extension array class to be used for building or
 *         deserializing arrays with this extension type.
*/

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

/* "pyarrow/types.pxi":1924
 *         return ExtensionArray
 * 
 *     def __arrow_ext_scalar_class__(self):             # <<<<<<<<<<<<<<
 *         """Return an extension scalar class for building scalars with this
 *         extension type.
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_13ExtensionType_17__arrow_ext_scalar_class__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_13ExtensionType_16__arrow_ext_scalar_class__, "ExtensionType.__arrow_ext_scalar_class__(self)\n\nReturn an extension scalar class for building scalars with this\nextension type.\n\nThis method should return subclass of the ExtensionScalar class. By\ndefault, if not specialized in the extension implementation, an\nextension type scalar will be a built-in ExtensionScalar instance.");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_13ExtensionType_17__arrow_ext_scalar_class__ = {"__arrow_ext_scalar_class__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_13ExtensionType_17__arrow_ext_scalar_class__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_13ExtensionType_16__arrow_ext_scalar_class__};
static PyObject *__pyx_pw_7pyarrow_3lib_13ExtensionType_17__arrow_ext_scalar_class__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__arrow_ext_scalar_class__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__arrow_ext_scalar_class__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__arrow_ext_scalar_class__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7pyarrow_3lib_13ExtensionType_16__arrow_ext_scalar_class__(((struct __pyx_obj_7pyarrow_3lib_ExtensionType *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_13ExtensionType_16__arrow_ext_scalar_class__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_ExtensionType *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__arrow_ext_scalar_class__", 0);

  /* "pyarrow/types.pxi":1932
 *         extension type scalar will be a built-in ExtensionScalar instance.
 *         """
 *         return ExtensionScalar             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ExtensionScalar);
  __pyx_r = ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ExtensionScalar);
  goto __pyx_L0;

  /* "pyarrow/types.pxi":1924
 *         return ExtensionArray
 * 
 *     def __arrow_ext_scalar_class__(self):             # <<<<<<<<<<<<<<
 *         """Return an extension scalar class for building scalars with this
 *         extension type.
*/

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

/* "pyarrow/types.pxi":1958
 *     """
 * 
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:             # <<<<<<<<<<<<<<
 *         BaseExtensionType.init(self, type)
 *         self.json_ext_type = <const CJsonType*> type.get()
*/

static void __pyx_f_7pyarrow_3lib_8JsonType_init(struct __pyx_obj_7pyarrow_3lib_JsonType *__pyx_v_self, std::shared_ptr< arrow::DataType>  const &__pyx_v_type) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "pyarrow/types.pxi":1959
 * 
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:
 *         BaseExtensionType.init(self, type)             # <<<<<<<<<<<<<<
 *         self.json_ext_type = <const CJsonType*> type.get()
 * 
*/
  __pyx_f_7pyarrow_3lib_17BaseExtensionType_init(((struct __pyx_obj_7pyarrow_3lib_BaseExtensionType *)__pyx_v_self), __pyx_v_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1959, __pyx_L1_error)

  /* "pyarrow/types.pxi":1960
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:
 *         BaseExtensionType.init(self, type)
 *         self.json_ext_type = <const CJsonType*> type.get()             # <<<<<<<<<<<<<<
 * 
 *     def __arrow_ext_class__(self):
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "json_ext_type");
    __PYX_ERR(1, 1960, __pyx_L1_error)
  }
  __pyx_v_self->json_ext_type = (( arrow::extension::JsonExtensionType const *)__pyx_v_type.get());

  /* "pyarrow/types.pxi":1958
 *     """
 * 
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:             # <<<<<<<<<<<<<<
 *         BaseExtensionType.init(self, type)
 *         self.json_ext_type = <const CJsonType*> type.get()
*/

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyarrow.lib.JsonType.init", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
}

/* "pyarrow/types.pxi":1962
 *         self.json_ext_type = <const CJsonType*> type.get()
 * 
 *     def __arrow_ext_class__(self):             # <<<<<<<<<<<<<<
 *         return JsonArray
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_8JsonType_1__arrow_ext_class__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_8JsonType___arrow_ext_class__, "JsonType.__arrow_ext_class__(self)");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_8JsonType_1__arrow_ext_class__ = {"__arrow_ext_class__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_8JsonType_1__arrow_ext_class__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_8JsonType___arrow_ext_class__};
static PyObject *__pyx_pw_7pyarrow_3lib_8JsonType_1__arrow_ext_class__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__arrow_ext_class__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__arrow_ext_class__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__arrow_ext_class__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7pyarrow_3lib_8JsonType___arrow_ext_class__(((struct __pyx_obj_7pyarrow_3lib_JsonType *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_8JsonType___arrow_ext_class__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_JsonType *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__arrow_ext_class__", 0);

  /* "pyarrow/types.pxi":1963
 * 
 *     def __arrow_ext_class__(self):
 *         return JsonArray             # <<<<<<<<<<<<<<
 * 
 *     def __reduce__(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_JsonArray); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1963, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":1962
 *         self.json_ext_type = <const CJsonType*> type.get()
 * 
 *     def __arrow_ext_class__(self):             # <<<<<<<<<<<<<<
 *         return JsonArray
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib.JsonType.__arrow_ext_class__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":1965
 *         return JsonArray
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         return json_, (self.storage_type,)
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_8JsonType_3__reduce__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_8JsonType_2__reduce__, "JsonType.__reduce__(self)");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_8JsonType_3__reduce__ = {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_8JsonType_3__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_8JsonType_2__reduce__};
static PyObject *__pyx_pw_7pyarrow_3lib_8JsonType_3__reduce__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7pyarrow_3lib_8JsonType_2__reduce__(((struct __pyx_obj_7pyarrow_3lib_JsonType *)__pyx_v_self));

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

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

  /* "pyarrow/types.pxi":1966
 * 
 *     def __reduce__(self):
 *         return json_, (self.storage_type,)             # <<<<<<<<<<<<<<
 * 
 *     def __arrow_ext_scalar_class__(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1966, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_storage_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1966, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1966, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2) != (0)) __PYX_ERR(1, 1966, __pyx_L1_error);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1966, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1) != (0)) __PYX_ERR(1, 1966, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3) != (0)) __PYX_ERR(1, 1966, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":1965
 *         return JsonArray
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         return json_, (self.storage_type,)
 * 
*/

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

/* "pyarrow/types.pxi":1968
 *         return json_, (self.storage_type,)
 * 
 *     def __arrow_ext_scalar_class__(self):             # <<<<<<<<<<<<<<
 *         return JsonScalar
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_8JsonType_5__arrow_ext_scalar_class__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_8JsonType_4__arrow_ext_scalar_class__, "JsonType.__arrow_ext_scalar_class__(self)");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_8JsonType_5__arrow_ext_scalar_class__ = {"__arrow_ext_scalar_class__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_8JsonType_5__arrow_ext_scalar_class__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_8JsonType_4__arrow_ext_scalar_class__};
static PyObject *__pyx_pw_7pyarrow_3lib_8JsonType_5__arrow_ext_scalar_class__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__arrow_ext_scalar_class__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__arrow_ext_scalar_class__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__arrow_ext_scalar_class__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7pyarrow_3lib_8JsonType_4__arrow_ext_scalar_class__(((struct __pyx_obj_7pyarrow_3lib_JsonType *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_8JsonType_4__arrow_ext_scalar_class__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_JsonType *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__arrow_ext_scalar_class__", 0);

  /* "pyarrow/types.pxi":1969
 * 
 *     def __arrow_ext_scalar_class__(self):
 *         return JsonScalar             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_JsonScalar); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1969, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":1968
 *         return json_, (self.storage_type,)
 * 
 *     def __arrow_ext_scalar_class__(self):             # <<<<<<<<<<<<<<
 *         return JsonScalar
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib.JsonType.__arrow_ext_scalar_class__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":1977
 *     """
 * 
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:             # <<<<<<<<<<<<<<
 *         BaseExtensionType.init(self, type)
 *         self.uuid_ext_type = <const CUuidType*> type.get()
*/

static void __pyx_f_7pyarrow_3lib_8UuidType_init(struct __pyx_obj_7pyarrow_3lib_UuidType *__pyx_v_self, std::shared_ptr< arrow::DataType>  const &__pyx_v_type) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "pyarrow/types.pxi":1978
 * 
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:
 *         BaseExtensionType.init(self, type)             # <<<<<<<<<<<<<<
 *         self.uuid_ext_type = <const CUuidType*> type.get()
 * 
*/
  __pyx_f_7pyarrow_3lib_17BaseExtensionType_init(((struct __pyx_obj_7pyarrow_3lib_BaseExtensionType *)__pyx_v_self), __pyx_v_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1978, __pyx_L1_error)

  /* "pyarrow/types.pxi":1979
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:
 *         BaseExtensionType.init(self, type)
 *         self.uuid_ext_type = <const CUuidType*> type.get()             # <<<<<<<<<<<<<<
 * 
 *     def __arrow_ext_class__(self):
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "uuid_ext_type");
    __PYX_ERR(1, 1979, __pyx_L1_error)
  }
  __pyx_v_self->uuid_ext_type = (( arrow::extension::UuidType const *)__pyx_v_type.get());

  /* "pyarrow/types.pxi":1977
 *     """
 * 
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:             # <<<<<<<<<<<<<<
 *         BaseExtensionType.init(self, type)
 *         self.uuid_ext_type = <const CUuidType*> type.get()
*/

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyarrow.lib.UuidType.init", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
}

/* "pyarrow/types.pxi":1981
 *         self.uuid_ext_type = <const CUuidType*> type.get()
 * 
 *     def __arrow_ext_class__(self):             # <<<<<<<<<<<<<<
 *         return UuidArray
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_8UuidType_1__arrow_ext_class__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_8UuidType___arrow_ext_class__, "UuidType.__arrow_ext_class__(self)");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_8UuidType_1__arrow_ext_class__ = {"__arrow_ext_class__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_8UuidType_1__arrow_ext_class__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_8UuidType___arrow_ext_class__};
static PyObject *__pyx_pw_7pyarrow_3lib_8UuidType_1__arrow_ext_class__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__arrow_ext_class__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__arrow_ext_class__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__arrow_ext_class__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7pyarrow_3lib_8UuidType___arrow_ext_class__(((struct __pyx_obj_7pyarrow_3lib_UuidType *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_8UuidType___arrow_ext_class__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_UuidType *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__arrow_ext_class__", 0);

  /* "pyarrow/types.pxi":1982
 * 
 *     def __arrow_ext_class__(self):
 *         return UuidArray             # <<<<<<<<<<<<<<
 * 
 *     def __reduce__(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_UuidArray); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1982, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":1981
 *         self.uuid_ext_type = <const CUuidType*> type.get()
 * 
 *     def __arrow_ext_class__(self):             # <<<<<<<<<<<<<<
 *         return UuidArray
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib.UuidType.__arrow_ext_class__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":1984
 *         return UuidArray
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         return uuid, ()
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_8UuidType_3__reduce__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_8UuidType_2__reduce__, "UuidType.__reduce__(self)");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_8UuidType_3__reduce__ = {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_8UuidType_3__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_8UuidType_2__reduce__};
static PyObject *__pyx_pw_7pyarrow_3lib_8UuidType_3__reduce__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7pyarrow_3lib_8UuidType_2__reduce__(((struct __pyx_obj_7pyarrow_3lib_UuidType *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_8UuidType_2__reduce__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_UuidType *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce__", 0);

  /* "pyarrow/types.pxi":1985
 * 
 *     def __reduce__(self):
 *         return uuid, ()             # <<<<<<<<<<<<<<
 * 
 *     def __arrow_ext_scalar_class__(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_uuid); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1985, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1985, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1) != (0)) __PYX_ERR(1, 1985, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_empty_tuple);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_empty_tuple);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_mstate_global->__pyx_empty_tuple) != (0)) __PYX_ERR(1, 1985, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":1984
 *         return UuidArray
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         return uuid, ()
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pyarrow.lib.UuidType.__reduce__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":1987
 *         return uuid, ()
 * 
 *     def __arrow_ext_scalar_class__(self):             # <<<<<<<<<<<<<<
 *         return UuidScalar
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_8UuidType_5__arrow_ext_scalar_class__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_8UuidType_4__arrow_ext_scalar_class__, "UuidType.__arrow_ext_scalar_class__(self)");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_8UuidType_5__arrow_ext_scalar_class__ = {"__arrow_ext_scalar_class__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_8UuidType_5__arrow_ext_scalar_class__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_8UuidType_4__arrow_ext_scalar_class__};
static PyObject *__pyx_pw_7pyarrow_3lib_8UuidType_5__arrow_ext_scalar_class__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__arrow_ext_scalar_class__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__arrow_ext_scalar_class__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__arrow_ext_scalar_class__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7pyarrow_3lib_8UuidType_4__arrow_ext_scalar_class__(((struct __pyx_obj_7pyarrow_3lib_UuidType *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_8UuidType_4__arrow_ext_scalar_class__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_UuidType *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__arrow_ext_scalar_class__", 0);

  /* "pyarrow/types.pxi":1988
 * 
 *     def __arrow_ext_scalar_class__(self):
 *         return UuidScalar             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_UuidScalar); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1988, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":1987
 *         return uuid, ()
 * 
 *     def __arrow_ext_scalar_class__(self):             # <<<<<<<<<<<<<<
 *         return UuidScalar
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib.UuidType.__arrow_ext_scalar_class__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":2012
 *     """
 * 
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:             # <<<<<<<<<<<<<<
 *         BaseExtensionType.init(self, type)
 *         self.tensor_ext_type = <const CFixedShapeTensorType*> type.get()
*/

static void __pyx_f_7pyarrow_3lib_20FixedShapeTensorType_init(struct __pyx_obj_7pyarrow_3lib_FixedShapeTensorType *__pyx_v_self, std::shared_ptr< arrow::DataType>  const &__pyx_v_type) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "pyarrow/types.pxi":2013
 * 
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:
 *         BaseExtensionType.init(self, type)             # <<<<<<<<<<<<<<
 *         self.tensor_ext_type = <const CFixedShapeTensorType*> type.get()
 * 
*/
  __pyx_f_7pyarrow_3lib_17BaseExtensionType_init(((struct __pyx_obj_7pyarrow_3lib_BaseExtensionType *)__pyx_v_self), __pyx_v_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 2013, __pyx_L1_error)

  /* "pyarrow/types.pxi":2014
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:
 *         BaseExtensionType.init(self, type)
 *         self.tensor_ext_type = <const CFixedShapeTensorType*> type.get()             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "tensor_ext_type");
    __PYX_ERR(1, 2014, __pyx_L1_error)
  }
  __pyx_v_self->tensor_ext_type = (( arrow::extension::FixedShapeTensorType const *)__pyx_v_type.get());

  /* "pyarrow/types.pxi":2012
 *     """
 * 
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:             # <<<<<<<<<<<<<<
 *         BaseExtensionType.init(self, type)
 *         self.tensor_ext_type = <const CFixedShapeTensorType*> type.get()
*/

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyarrow.lib.FixedShapeTensorType.init", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
}

/* "pyarrow/types.pxi":2016
 *         self.tensor_ext_type = <const CFixedShapeTensorType*> type.get()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def value_type(self):
 *         """
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_20FixedShapeTensorType_10value_type_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_20FixedShapeTensorType_10value_type_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_20FixedShapeTensorType_10value_type___get__(((struct __pyx_obj_7pyarrow_3lib_FixedShapeTensorType *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_20FixedShapeTensorType_10value_type___get__(struct __pyx_obj_7pyarrow_3lib_FixedShapeTensorType *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyarrow/types.pxi":2021
 *         Data type of an individual tensor.
 *         """
 *         return pyarrow_wrap_data_type(self.tensor_ext_type.value_type())             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "tensor_ext_type");
    __PYX_ERR(1, 2021, __pyx_L1_error)
  }
  __pyx_t_1 = pyarrow_wrap_data_type(__pyx_v_self->tensor_ext_type->value_type()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2021, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":2016
 *         self.tensor_ext_type = <const CFixedShapeTensorType*> type.get()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def value_type(self):
 *         """
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib.FixedShapeTensorType.value_type.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":2023
 *         return pyarrow_wrap_data_type(self.tensor_ext_type.value_type())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def shape(self):
 *         """
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_20FixedShapeTensorType_5shape_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_20FixedShapeTensorType_5shape_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_20FixedShapeTensorType_5shape___get__(((struct __pyx_obj_7pyarrow_3lib_FixedShapeTensorType *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_20FixedShapeTensorType_5shape___get__(struct __pyx_obj_7pyarrow_3lib_FixedShapeTensorType *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyarrow/types.pxi":2028
 *         Shape of the tensors.
 *         """
 *         return self.tensor_ext_type.shape()             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "tensor_ext_type");
    __PYX_ERR(1, 2028, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_convert_vector_to_py_int64_t(__pyx_v_self->tensor_ext_type->shape()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2028, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":2023
 *         return pyarrow_wrap_data_type(self.tensor_ext_type.value_type())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def shape(self):
 *         """
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib.FixedShapeTensorType.shape.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":2030
 *         return self.tensor_ext_type.shape()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def dim_names(self):
 *         """
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_20FixedShapeTensorType_9dim_names_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_20FixedShapeTensorType_9dim_names_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_20FixedShapeTensorType_9dim_names___get__(((struct __pyx_obj_7pyarrow_3lib_FixedShapeTensorType *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_20FixedShapeTensorType_9dim_names___get__(struct __pyx_obj_7pyarrow_3lib_FixedShapeTensorType *__pyx_v_self) {
  std::vector<std::string>  __pyx_v_list_of_bytes;
  std::string __pyx_8genexpr3__pyx_v_x;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  int __pyx_t_3;
  std::vector<std::string> ::iterator __pyx_t_4;
  std::string __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  size_t __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyarrow/types.pxi":2035
 *         Explicit names of the dimensions.
 *         """
 *         list_of_bytes = self.tensor_ext_type.dim_names()             # <<<<<<<<<<<<<<
 *         if len(list_of_bytes) != 0:
 *             return [frombytes(x) for x in list_of_bytes]
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "tensor_ext_type");
    __PYX_ERR(1, 2035, __pyx_L1_error)
  }
  __pyx_v_list_of_bytes = __pyx_v_self->tensor_ext_type->dim_names();

  /* "pyarrow/types.pxi":2036
 *         """
 *         list_of_bytes = self.tensor_ext_type.dim_names()
 *         if len(list_of_bytes) != 0:             # <<<<<<<<<<<<<<
 *             return [frombytes(x) for x in list_of_bytes]
 *         else:
*/
  __pyx_t_1 = __pyx_convert_vector_to_py_std_3a__3a_string(__pyx_v_list_of_bytes); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2036, __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(1, 2036, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "pyarrow/types.pxi":2037
 *         list_of_bytes = self.tensor_ext_type.dim_names()
 *         if len(list_of_bytes) != 0:
 *             return [frombytes(x) for x in list_of_bytes]             # <<<<<<<<<<<<<<
 *         else:
 *             return None
*/
    __Pyx_XDECREF(__pyx_r);
    { /* enter inner scope */
      __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2037, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_4 = __pyx_v_list_of_bytes.begin();
      for (; __pyx_t_4 != __pyx_v_list_of_bytes.end(); ++__pyx_t_4) {
        __pyx_t_5 = *__pyx_t_4;
        __pyx_8genexpr3__pyx_v_x = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_5);
        __pyx_t_7 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_frombytes); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2037, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_9 = __pyx_convert_PyBytes_string_to_py_6libcpp_6string_std__in_string(__pyx_8genexpr3__pyx_v_x); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 2037, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_10 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_8))) {
          __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8);
          assert(__pyx_t_7);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8);
          __Pyx_INCREF(__pyx_t_7);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_8, __pyx__function);
          __pyx_t_10 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_9};
          __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2037, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
        }
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_6))) __PYX_ERR(1, 2037, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    } /* exit inner scope */
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "pyarrow/types.pxi":2036
 *         """
 *         list_of_bytes = self.tensor_ext_type.dim_names()
 *         if len(list_of_bytes) != 0:             # <<<<<<<<<<<<<<
 *             return [frombytes(x) for x in list_of_bytes]
 *         else:
*/
  }

  /* "pyarrow/types.pxi":2039
 *             return [frombytes(x) for x in list_of_bytes]
 *         else:
 *             return None             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;
  }

  /* "pyarrow/types.pxi":2030
 *         return self.tensor_ext_type.shape()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def dim_names(self):
 *         """
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("pyarrow.lib.FixedShapeTensorType.dim_names.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":2041
 *             return None
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def permutation(self):
 *         """
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_20FixedShapeTensorType_11permutation_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_20FixedShapeTensorType_11permutation_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_20FixedShapeTensorType_11permutation___get__(((struct __pyx_obj_7pyarrow_3lib_FixedShapeTensorType *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_20FixedShapeTensorType_11permutation___get__(struct __pyx_obj_7pyarrow_3lib_FixedShapeTensorType *__pyx_v_self) {
  std::vector<int64_t>  __pyx_v_indices;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  int __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyarrow/types.pxi":2046
 *         Indices of the dimensions ordering.
 *         """
 *         indices = self.tensor_ext_type.permutation()             # <<<<<<<<<<<<<<
 *         if len(indices) != 0:
 *             return indices
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "tensor_ext_type");
    __PYX_ERR(1, 2046, __pyx_L1_error)
  }
  __pyx_v_indices = __pyx_v_self->tensor_ext_type->permutation();

  /* "pyarrow/types.pxi":2047
 *         """
 *         indices = self.tensor_ext_type.permutation()
 *         if len(indices) != 0:             # <<<<<<<<<<<<<<
 *             return indices
 *         else:
*/
  __pyx_t_1 = __pyx_convert_vector_to_py_int64_t(__pyx_v_indices); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2047, __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(1, 2047, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "pyarrow/types.pxi":2048
 *         indices = self.tensor_ext_type.permutation()
 *         if len(indices) != 0:
 *             return indices             # <<<<<<<<<<<<<<
 *         else:
 *             return None
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __pyx_convert_vector_to_py_int64_t(__pyx_v_indices); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2048, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "pyarrow/types.pxi":2047
 *         """
 *         indices = self.tensor_ext_type.permutation()
 *         if len(indices) != 0:             # <<<<<<<<<<<<<<
 *             return indices
 *         else:
*/
  }

  /* "pyarrow/types.pxi":2050
 *             return indices
 *         else:
 *             return None             # <<<<<<<<<<<<<<
 * 
 *     def __arrow_ext_class__(self):
*/
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;
  }

  /* "pyarrow/types.pxi":2041
 *             return None
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def permutation(self):
 *         """
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib.FixedShapeTensorType.permutation.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":2052
 *             return None
 * 
 *     def __arrow_ext_class__(self):             # <<<<<<<<<<<<<<
 *         return FixedShapeTensorArray
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_20FixedShapeTensorType_1__arrow_ext_class__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_20FixedShapeTensorType___arrow_ext_class__, "FixedShapeTensorType.__arrow_ext_class__(self)");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_20FixedShapeTensorType_1__arrow_ext_class__ = {"__arrow_ext_class__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_20FixedShapeTensorType_1__arrow_ext_class__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_20FixedShapeTensorType___arrow_ext_class__};
static PyObject *__pyx_pw_7pyarrow_3lib_20FixedShapeTensorType_1__arrow_ext_class__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__arrow_ext_class__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__arrow_ext_class__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__arrow_ext_class__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7pyarrow_3lib_20FixedShapeTensorType___arrow_ext_class__(((struct __pyx_obj_7pyarrow_3lib_FixedShapeTensorType *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_20FixedShapeTensorType___arrow_ext_class__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_FixedShapeTensorType *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__arrow_ext_class__", 0);

  /* "pyarrow/types.pxi":2053
 * 
 *     def __arrow_ext_class__(self):
 *         return FixedShapeTensorArray             # <<<<<<<<<<<<<<
 * 
 *     def __reduce__(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_FixedShapeTensorArray);
  __pyx_r = ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_FixedShapeTensorArray);
  goto __pyx_L0;

  /* "pyarrow/types.pxi":2052
 *             return None
 * 
 *     def __arrow_ext_class__(self):             # <<<<<<<<<<<<<<
 *         return FixedShapeTensorArray
 * 
*/

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

/* "pyarrow/types.pxi":2055
 *         return FixedShapeTensorArray
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         return fixed_shape_tensor, (self.value_type, self.shape,
 *                                     self.dim_names, self.permutation)
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_20FixedShapeTensorType_3__reduce__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_20FixedShapeTensorType_2__reduce__, "FixedShapeTensorType.__reduce__(self)");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_20FixedShapeTensorType_3__reduce__ = {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_20FixedShapeTensorType_3__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_20FixedShapeTensorType_2__reduce__};
static PyObject *__pyx_pw_7pyarrow_3lib_20FixedShapeTensorType_3__reduce__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7pyarrow_3lib_20FixedShapeTensorType_2__reduce__(((struct __pyx_obj_7pyarrow_3lib_FixedShapeTensorType *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_20FixedShapeTensorType_2__reduce__(struct __pyx_obj_7pyarrow_3lib_FixedShapeTensorType *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce__", 0);

  /* "pyarrow/types.pxi":2056
 * 
 *     def __reduce__(self):
 *         return fixed_shape_tensor, (self.value_type, self.shape,             # <<<<<<<<<<<<<<
 *                                     self.dim_names, self.permutation)
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_fixed_shape_tensor); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2056, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_value_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2056, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_shape); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2056, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "pyarrow/types.pxi":2057
 *     def __reduce__(self):
 *         return fixed_shape_tensor, (self.value_type, self.shape,
 *                                     self.dim_names, self.permutation)             # <<<<<<<<<<<<<<
 * 
 *     def __arrow_ext_scalar_class__(self):
*/
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dim_names); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2057, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_permutation); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2057, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "pyarrow/types.pxi":2056
 * 
 *     def __reduce__(self):
 *         return fixed_shape_tensor, (self.value_type, self.shape,             # <<<<<<<<<<<<<<
 *                                     self.dim_names, self.permutation)
 * 
*/
  __pyx_t_6 = PyTuple_New(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2056, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2) != (0)) __PYX_ERR(1, 2056, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_3) != (0)) __PYX_ERR(1, 2056, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_4);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_4) != (0)) __PYX_ERR(1, 2056, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_5);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_t_5) != (0)) __PYX_ERR(1, 2056, __pyx_L1_error);
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2056, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1) != (0)) __PYX_ERR(1, 2056, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_6);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_6) != (0)) __PYX_ERR(1, 2056, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_6 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":2055
 *         return FixedShapeTensorArray
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         return fixed_shape_tensor, (self.value_type, self.shape,
 *                                     self.dim_names, self.permutation)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pyarrow.lib.FixedShapeTensorType.__reduce__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":2059
 *                                     self.dim_names, self.permutation)
 * 
 *     def __arrow_ext_scalar_class__(self):             # <<<<<<<<<<<<<<
 *         return FixedShapeTensorScalar
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_20FixedShapeTensorType_5__arrow_ext_scalar_class__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_20FixedShapeTensorType_4__arrow_ext_scalar_class__, "FixedShapeTensorType.__arrow_ext_scalar_class__(self)");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_20FixedShapeTensorType_5__arrow_ext_scalar_class__ = {"__arrow_ext_scalar_class__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_20FixedShapeTensorType_5__arrow_ext_scalar_class__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_20FixedShapeTensorType_4__arrow_ext_scalar_class__};
static PyObject *__pyx_pw_7pyarrow_3lib_20FixedShapeTensorType_5__arrow_ext_scalar_class__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__arrow_ext_scalar_class__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__arrow_ext_scalar_class__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__arrow_ext_scalar_class__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7pyarrow_3lib_20FixedShapeTensorType_4__arrow_ext_scalar_class__(((struct __pyx_obj_7pyarrow_3lib_FixedShapeTensorType *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_20FixedShapeTensorType_4__arrow_ext_scalar_class__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_FixedShapeTensorType *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__arrow_ext_scalar_class__", 0);

  /* "pyarrow/types.pxi":2060
 * 
 *     def __arrow_ext_scalar_class__(self):
 *         return FixedShapeTensorScalar             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_FixedShapeTensorScalar);
  __pyx_r = ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_FixedShapeTensorScalar);
  goto __pyx_L0;

  /* "pyarrow/types.pxi":2059
 *                                     self.dim_names, self.permutation)
 * 
 *     def __arrow_ext_scalar_class__(self):             # <<<<<<<<<<<<<<
 *         return FixedShapeTensorScalar
 * 
*/

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

/* "pyarrow/types.pxi":2080
 *     """
 * 
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:             # <<<<<<<<<<<<<<
 *         BaseExtensionType.init(self, type)
 *         self.bool8_ext_type = <const CBool8Type*> type.get()
*/

static void __pyx_f_7pyarrow_3lib_9Bool8Type_init(struct __pyx_obj_7pyarrow_3lib_Bool8Type *__pyx_v_self, std::shared_ptr< arrow::DataType>  const &__pyx_v_type) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "pyarrow/types.pxi":2081
 * 
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:
 *         BaseExtensionType.init(self, type)             # <<<<<<<<<<<<<<
 *         self.bool8_ext_type = <const CBool8Type*> type.get()
 * 
*/
  __pyx_f_7pyarrow_3lib_17BaseExtensionType_init(((struct __pyx_obj_7pyarrow_3lib_BaseExtensionType *)__pyx_v_self), __pyx_v_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 2081, __pyx_L1_error)

  /* "pyarrow/types.pxi":2082
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:
 *         BaseExtensionType.init(self, type)
 *         self.bool8_ext_type = <const CBool8Type*> type.get()             # <<<<<<<<<<<<<<
 * 
 *     def __arrow_ext_class__(self):
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "bool8_ext_type");
    __PYX_ERR(1, 2082, __pyx_L1_error)
  }
  __pyx_v_self->bool8_ext_type = (( arrow::extension::Bool8Type const *)__pyx_v_type.get());

  /* "pyarrow/types.pxi":2080
 *     """
 * 
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:             # <<<<<<<<<<<<<<
 *         BaseExtensionType.init(self, type)
 *         self.bool8_ext_type = <const CBool8Type*> type.get()
*/

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyarrow.lib.Bool8Type.init", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
}

/* "pyarrow/types.pxi":2084
 *         self.bool8_ext_type = <const CBool8Type*> type.get()
 * 
 *     def __arrow_ext_class__(self):             # <<<<<<<<<<<<<<
 *         return Bool8Array
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_9Bool8Type_1__arrow_ext_class__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_9Bool8Type___arrow_ext_class__, "Bool8Type.__arrow_ext_class__(self)");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_9Bool8Type_1__arrow_ext_class__ = {"__arrow_ext_class__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_9Bool8Type_1__arrow_ext_class__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_9Bool8Type___arrow_ext_class__};
static PyObject *__pyx_pw_7pyarrow_3lib_9Bool8Type_1__arrow_ext_class__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__arrow_ext_class__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__arrow_ext_class__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__arrow_ext_class__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7pyarrow_3lib_9Bool8Type___arrow_ext_class__(((struct __pyx_obj_7pyarrow_3lib_Bool8Type *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_9Bool8Type___arrow_ext_class__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_Bool8Type *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__arrow_ext_class__", 0);

  /* "pyarrow/types.pxi":2085
 * 
 *     def __arrow_ext_class__(self):
 *         return Bool8Array             # <<<<<<<<<<<<<<
 * 
 *     def __reduce__(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Bool8Array);
  __pyx_r = ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Bool8Array);
  goto __pyx_L0;

  /* "pyarrow/types.pxi":2084
 *         self.bool8_ext_type = <const CBool8Type*> type.get()
 * 
 *     def __arrow_ext_class__(self):             # <<<<<<<<<<<<<<
 *         return Bool8Array
 * 
*/

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

/* "pyarrow/types.pxi":2087
 *         return Bool8Array
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         return bool8, ()
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_9Bool8Type_3__reduce__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_9Bool8Type_2__reduce__, "Bool8Type.__reduce__(self)");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_9Bool8Type_3__reduce__ = {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_9Bool8Type_3__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_9Bool8Type_2__reduce__};
static PyObject *__pyx_pw_7pyarrow_3lib_9Bool8Type_3__reduce__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7pyarrow_3lib_9Bool8Type_2__reduce__(((struct __pyx_obj_7pyarrow_3lib_Bool8Type *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_9Bool8Type_2__reduce__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_Bool8Type *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce__", 0);

  /* "pyarrow/types.pxi":2088
 * 
 *     def __reduce__(self):
 *         return bool8, ()             # <<<<<<<<<<<<<<
 * 
 *     def __arrow_ext_scalar_class__(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_bool8); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2088, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2088, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1) != (0)) __PYX_ERR(1, 2088, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_empty_tuple);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_empty_tuple);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_mstate_global->__pyx_empty_tuple) != (0)) __PYX_ERR(1, 2088, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":2087
 *         return Bool8Array
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         return bool8, ()
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pyarrow.lib.Bool8Type.__reduce__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":2090
 *         return bool8, ()
 * 
 *     def __arrow_ext_scalar_class__(self):             # <<<<<<<<<<<<<<
 *         return Bool8Scalar
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_9Bool8Type_5__arrow_ext_scalar_class__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_9Bool8Type_4__arrow_ext_scalar_class__, "Bool8Type.__arrow_ext_scalar_class__(self)");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_9Bool8Type_5__arrow_ext_scalar_class__ = {"__arrow_ext_scalar_class__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_9Bool8Type_5__arrow_ext_scalar_class__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_9Bool8Type_4__arrow_ext_scalar_class__};
static PyObject *__pyx_pw_7pyarrow_3lib_9Bool8Type_5__arrow_ext_scalar_class__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__arrow_ext_scalar_class__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__arrow_ext_scalar_class__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__arrow_ext_scalar_class__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7pyarrow_3lib_9Bool8Type_4__arrow_ext_scalar_class__(((struct __pyx_obj_7pyarrow_3lib_Bool8Type *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_9Bool8Type_4__arrow_ext_scalar_class__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_Bool8Type *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__arrow_ext_scalar_class__", 0);

  /* "pyarrow/types.pxi":2091
 * 
 *     def __arrow_ext_scalar_class__(self):
 *         return Bool8Scalar             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Bool8Scalar);
  __pyx_r = ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Bool8Scalar);
  goto __pyx_L0;

  /* "pyarrow/types.pxi":2090
 *         return bool8, ()
 * 
 *     def __arrow_ext_scalar_class__(self):             # <<<<<<<<<<<<<<
 *         return Bool8Scalar
 * 
*/

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

/* "pyarrow/types.pxi":2110
 *     """
 * 
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:             # <<<<<<<<<<<<<<
 *         BaseExtensionType.init(self, type)
 *         self.opaque_ext_type = <const COpaqueType*> type.get()
*/

static void __pyx_f_7pyarrow_3lib_10OpaqueType_init(struct __pyx_obj_7pyarrow_3lib_OpaqueType *__pyx_v_self, std::shared_ptr< arrow::DataType>  const &__pyx_v_type) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "pyarrow/types.pxi":2111
 * 
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:
 *         BaseExtensionType.init(self, type)             # <<<<<<<<<<<<<<
 *         self.opaque_ext_type = <const COpaqueType*> type.get()
 * 
*/
  __pyx_f_7pyarrow_3lib_17BaseExtensionType_init(((struct __pyx_obj_7pyarrow_3lib_BaseExtensionType *)__pyx_v_self), __pyx_v_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 2111, __pyx_L1_error)

  /* "pyarrow/types.pxi":2112
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:
 *         BaseExtensionType.init(self, type)
 *         self.opaque_ext_type = <const COpaqueType*> type.get()             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "opaque_ext_type");
    __PYX_ERR(1, 2112, __pyx_L1_error)
  }
  __pyx_v_self->opaque_ext_type = (( arrow::extension::OpaqueType const *)__pyx_v_type.get());

  /* "pyarrow/types.pxi":2110
 *     """
 * 
 *     cdef void init(self, const shared_ptr[CDataType]& type) except *:             # <<<<<<<<<<<<<<
 *         BaseExtensionType.init(self, type)
 *         self.opaque_ext_type = <const COpaqueType*> type.get()
*/

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyarrow.lib.OpaqueType.init", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
}

/* "pyarrow/types.pxi":2114
 *         self.opaque_ext_type = <const COpaqueType*> type.get()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def type_name(self):
 *         """
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_10OpaqueType_9type_name_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_10OpaqueType_9type_name_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_10OpaqueType_9type_name___get__(((struct __pyx_obj_7pyarrow_3lib_OpaqueType *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_10OpaqueType_9type_name___get__(struct __pyx_obj_7pyarrow_3lib_OpaqueType *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  std::string __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyarrow/types.pxi":2119
 *         The name of the type in the external system.
 *         """
 *         return frombytes(c_string(self.opaque_ext_type.type_name()))             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_frombytes); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2119, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "opaque_ext_type");
    __PYX_ERR(1, 2119, __pyx_L1_error)
  }
  try {
    __pyx_t_4 = std::string(__pyx_v_self->opaque_ext_type->type_name());
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 2119, __pyx_L1_error)
  }
  __pyx_t_5 = __pyx_convert_PyBytes_string_to_py_6libcpp_6string_std__in_string(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2119, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_5};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2119, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":2114
 *         self.opaque_ext_type = <const COpaqueType*> type.get()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def type_name(self):
 *         """
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pyarrow.lib.OpaqueType.type_name.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":2121
 *         return frombytes(c_string(self.opaque_ext_type.type_name()))
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def vendor_name(self):
 *         """
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_10OpaqueType_11vendor_name_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_10OpaqueType_11vendor_name_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_10OpaqueType_11vendor_name___get__(((struct __pyx_obj_7pyarrow_3lib_OpaqueType *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_10OpaqueType_11vendor_name___get__(struct __pyx_obj_7pyarrow_3lib_OpaqueType *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  std::string __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyarrow/types.pxi":2126
 *         The name of the external system.
 *         """
 *         return frombytes(c_string(self.opaque_ext_type.vendor_name()))             # <<<<<<<<<<<<<<
 * 
 *     def __arrow_ext_class__(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_frombytes); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2126, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "opaque_ext_type");
    __PYX_ERR(1, 2126, __pyx_L1_error)
  }
  try {
    __pyx_t_4 = std::string(__pyx_v_self->opaque_ext_type->vendor_name());
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 2126, __pyx_L1_error)
  }
  __pyx_t_5 = __pyx_convert_PyBytes_string_to_py_6libcpp_6string_std__in_string(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2126, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_5};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2126, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":2121
 *         return frombytes(c_string(self.opaque_ext_type.type_name()))
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def vendor_name(self):
 *         """
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pyarrow.lib.OpaqueType.vendor_name.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":2128
 *         return frombytes(c_string(self.opaque_ext_type.vendor_name()))
 * 
 *     def __arrow_ext_class__(self):             # <<<<<<<<<<<<<<
 *         return OpaqueArray
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_10OpaqueType_1__arrow_ext_class__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_10OpaqueType___arrow_ext_class__, "OpaqueType.__arrow_ext_class__(self)");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_10OpaqueType_1__arrow_ext_class__ = {"__arrow_ext_class__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10OpaqueType_1__arrow_ext_class__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10OpaqueType___arrow_ext_class__};
static PyObject *__pyx_pw_7pyarrow_3lib_10OpaqueType_1__arrow_ext_class__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__arrow_ext_class__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__arrow_ext_class__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__arrow_ext_class__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7pyarrow_3lib_10OpaqueType___arrow_ext_class__(((struct __pyx_obj_7pyarrow_3lib_OpaqueType *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_10OpaqueType___arrow_ext_class__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_OpaqueType *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__arrow_ext_class__", 0);

  /* "pyarrow/types.pxi":2129
 * 
 *     def __arrow_ext_class__(self):
 *         return OpaqueArray             # <<<<<<<<<<<<<<
 * 
 *     def __reduce__(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_OpaqueArray);
  __pyx_r = ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_OpaqueArray);
  goto __pyx_L0;

  /* "pyarrow/types.pxi":2128
 *         return frombytes(c_string(self.opaque_ext_type.vendor_name()))
 * 
 *     def __arrow_ext_class__(self):             # <<<<<<<<<<<<<<
 *         return OpaqueArray
 * 
*/

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

/* "pyarrow/types.pxi":2131
 *         return OpaqueArray
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         return opaque, (self.storage_type, self.type_name, self.vendor_name)
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_10OpaqueType_3__reduce__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_10OpaqueType_2__reduce__, "OpaqueType.__reduce__(self)");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_10OpaqueType_3__reduce__ = {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10OpaqueType_3__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10OpaqueType_2__reduce__};
static PyObject *__pyx_pw_7pyarrow_3lib_10OpaqueType_3__reduce__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7pyarrow_3lib_10OpaqueType_2__reduce__(((struct __pyx_obj_7pyarrow_3lib_OpaqueType *)__pyx_v_self));

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

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

  /* "pyarrow/types.pxi":2132
 * 
 *     def __reduce__(self):
 *         return opaque, (self.storage_type, self.type_name, self.vendor_name)             # <<<<<<<<<<<<<<
 * 
 *     def __arrow_ext_scalar_class__(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_opaque); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2132, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_storage_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2132, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_type_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2132, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_vendor_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2132, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2132, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2) != (0)) __PYX_ERR(1, 2132, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3) != (0)) __PYX_ERR(1, 2132, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_4);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_4) != (0)) __PYX_ERR(1, 2132, __pyx_L1_error);
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2132, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1) != (0)) __PYX_ERR(1, 2132, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_5);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_5) != (0)) __PYX_ERR(1, 2132, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":2131
 *         return OpaqueArray
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         return opaque, (self.storage_type, self.type_name, self.vendor_name)
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pyarrow.lib.OpaqueType.__reduce__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":2134
 *         return opaque, (self.storage_type, self.type_name, self.vendor_name)
 * 
 *     def __arrow_ext_scalar_class__(self):             # <<<<<<<<<<<<<<
 *         return OpaqueScalar
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_10OpaqueType_5__arrow_ext_scalar_class__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_10OpaqueType_4__arrow_ext_scalar_class__, "OpaqueType.__arrow_ext_scalar_class__(self)");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_10OpaqueType_5__arrow_ext_scalar_class__ = {"__arrow_ext_scalar_class__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10OpaqueType_5__arrow_ext_scalar_class__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10OpaqueType_4__arrow_ext_scalar_class__};
static PyObject *__pyx_pw_7pyarrow_3lib_10OpaqueType_5__arrow_ext_scalar_class__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__arrow_ext_scalar_class__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__arrow_ext_scalar_class__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__arrow_ext_scalar_class__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7pyarrow_3lib_10OpaqueType_4__arrow_ext_scalar_class__(((struct __pyx_obj_7pyarrow_3lib_OpaqueType *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_10OpaqueType_4__arrow_ext_scalar_class__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_OpaqueType *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__arrow_ext_scalar_class__", 0);

  /* "pyarrow/types.pxi":2135
 * 
 *     def __arrow_ext_scalar_class__(self):
 *         return OpaqueScalar             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_OpaqueScalar);
  __pyx_r = ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_OpaqueScalar);
  goto __pyx_L0;

  /* "pyarrow/types.pxi":2134
 *         return opaque, (self.storage_type, self.type_name, self.vendor_name)
 * 
 *     def __arrow_ext_scalar_class__(self):             # <<<<<<<<<<<<<<
 *         return OpaqueScalar
 * 
*/

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

/* "pyarrow/types.pxi":2154
 *         bytes serialized
 * 
 *     def __init__(self, DataType storage_type, serialized):             # <<<<<<<<<<<<<<
 *         self.serialized = serialized
 *         super().__init__(storage_type, "pyarrow.unknown")
*/

/* Python wrapper */
static int __pyx_pw_7pyarrow_3lib_20UnknownExtensionType_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_7pyarrow_3lib_20UnknownExtensionType_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v_storage_type = 0;
  PyObject *__pyx_v_serialized = 0;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_storage_type,&__pyx_mstate_global->__pyx_n_u_serialized,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 2154, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 2154, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 2154, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(1, 2154, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, i); __PYX_ERR(1, 2154, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 2154, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 2154, __pyx_L3_error)
    }
    __pyx_v_storage_type = ((struct __pyx_obj_7pyarrow_3lib_DataType *)values[0]);
    __pyx_v_serialized = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, __pyx_nargs); __PYX_ERR(1, 2154, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("pyarrow.lib.UnknownExtensionType.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_storage_type), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType, 1, "storage_type", 0))) __PYX_ERR(1, 2154, __pyx_L1_error)
  __pyx_r = __pyx_pf_7pyarrow_3lib_20UnknownExtensionType___init__(((struct __pyx_obj_7pyarrow_3lib_UnknownExtensionType *)__pyx_v_self), __pyx_v_storage_type, __pyx_v_serialized);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7pyarrow_3lib_20UnknownExtensionType___init__(struct __pyx_obj_7pyarrow_3lib_UnknownExtensionType *__pyx_v_self, struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v_storage_type, PyObject *__pyx_v_serialized) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "pyarrow/types.pxi":2155
 * 
 *     def __init__(self, DataType storage_type, serialized):
 *         self.serialized = serialized             # <<<<<<<<<<<<<<
 *         super().__init__(storage_type, "pyarrow.unknown")
 * 
*/
  __pyx_t_1 = __pyx_v_serialized;
  __Pyx_INCREF(__pyx_t_1);
  if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(1, 2155, __pyx_L1_error)
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "serialized");
    __PYX_ERR(1, 2155, __pyx_L1_error)
  }
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->serialized);
  __Pyx_DECREF(__pyx_v_self->serialized);
  __pyx_v_self->serialized = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyarrow/types.pxi":2156
 *     def __init__(self, DataType storage_type, serialized):
 *         self.serialized = serialized
 *         super().__init__(storage_type, "pyarrow.unknown")             # <<<<<<<<<<<<<<
 * 
 *     def __arrow_ext_serialize__(self):
*/
  __pyx_t_4 = NULL;
  __pyx_t_5 = 1;
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_4, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_UnknownExtensionType), ((PyObject *)__pyx_v_self)};
    __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_super, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2156, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  }
  __pyx_t_2 = __pyx_t_3;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, ((PyObject *)__pyx_v_storage_type), __pyx_mstate_global->__pyx_kp_u_pyarrow_unknown};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_init, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2156, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyarrow/types.pxi":2154
 *         bytes serialized
 * 
 *     def __init__(self, DataType storage_type, serialized):             # <<<<<<<<<<<<<<
 *         self.serialized = serialized
 *         super().__init__(storage_type, "pyarrow.unknown")
*/

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

/* "pyarrow/types.pxi":2158
 *         super().__init__(storage_type, "pyarrow.unknown")
 * 
 *     def __arrow_ext_serialize__(self):             # <<<<<<<<<<<<<<
 *         return self.serialized
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_20UnknownExtensionType_3__arrow_ext_serialize__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_20UnknownExtensionType_2__arrow_ext_serialize__, "UnknownExtensionType.__arrow_ext_serialize__(self)");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_20UnknownExtensionType_3__arrow_ext_serialize__ = {"__arrow_ext_serialize__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_20UnknownExtensionType_3__arrow_ext_serialize__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_20UnknownExtensionType_2__arrow_ext_serialize__};
static PyObject *__pyx_pw_7pyarrow_3lib_20UnknownExtensionType_3__arrow_ext_serialize__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__arrow_ext_serialize__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__arrow_ext_serialize__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__arrow_ext_serialize__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7pyarrow_3lib_20UnknownExtensionType_2__arrow_ext_serialize__(((struct __pyx_obj_7pyarrow_3lib_UnknownExtensionType *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_20UnknownExtensionType_2__arrow_ext_serialize__(struct __pyx_obj_7pyarrow_3lib_UnknownExtensionType *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__arrow_ext_serialize__", 0);

  /* "pyarrow/types.pxi":2159
 * 
 *     def __arrow_ext_serialize__(self):
 *         return self.serialized             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
*/
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "serialized");
    __PYX_ERR(1, 2159, __pyx_L1_error)
  }
  __Pyx_INCREF(__pyx_v_self->serialized);
  __pyx_r = __pyx_v_self->serialized;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":2158
 *         super().__init__(storage_type, "pyarrow.unknown")
 * 
 *     def __arrow_ext_serialize__(self):             # <<<<<<<<<<<<<<
 *         return self.serialized
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyarrow.lib.UnknownExtensionType.__arrow_ext_serialize__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":2161
 *         return self.serialized
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def __arrow_ext_deserialize__(cls, storage_type, serialized):
 *         return UnknownExtensionType()
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_20UnknownExtensionType_5__arrow_ext_deserialize__(PyObject *__pyx_v_cls, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_20UnknownExtensionType_4__arrow_ext_deserialize__, "UnknownExtensionType.__arrow_ext_deserialize__(cls, storage_type, serialized)");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_20UnknownExtensionType_5__arrow_ext_deserialize__ = {"__arrow_ext_deserialize__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_20UnknownExtensionType_5__arrow_ext_deserialize__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_20UnknownExtensionType_4__arrow_ext_deserialize__};
static PyObject *__pyx_pw_7pyarrow_3lib_20UnknownExtensionType_5__arrow_ext_deserialize__(PyObject *__pyx_v_cls, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_storage_type = 0;
  CYTHON_UNUSED PyObject *__pyx_v_serialized = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__arrow_ext_deserialize__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_storage_type,&__pyx_mstate_global->__pyx_n_u_serialized,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 2161, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 2161, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 2161, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__arrow_ext_deserialize__", 0) < (0)) __PYX_ERR(1, 2161, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__arrow_ext_deserialize__", 1, 2, 2, i); __PYX_ERR(1, 2161, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 2161, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 2161, __pyx_L3_error)
    }
    __pyx_v_storage_type = values[0];
    __pyx_v_serialized = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__arrow_ext_deserialize__", 1, 2, 2, __pyx_nargs); __PYX_ERR(1, 2161, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("pyarrow.lib.UnknownExtensionType.__arrow_ext_deserialize__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyarrow_3lib_20UnknownExtensionType_4__arrow_ext_deserialize__(((PyTypeObject*)__pyx_v_cls), __pyx_v_storage_type, __pyx_v_serialized);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7pyarrow_3lib_20UnknownExtensionType_4__arrow_ext_deserialize__(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, CYTHON_UNUSED PyObject *__pyx_v_storage_type, CYTHON_UNUSED PyObject *__pyx_v_serialized) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  size_t __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__arrow_ext_deserialize__", 0);

  /* "pyarrow/types.pxi":2163
 *     @classmethod
 *     def __arrow_ext_deserialize__(cls, storage_type, serialized):
 *         return UnknownExtensionType()             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __pyx_t_3 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_UnknownExtensionType, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2163, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_1);
  }
  __pyx_r = ((PyObject *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":2161
 *         return self.serialized
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def __arrow_ext_deserialize__(cls, storage_type, serialized):
 *         return UnknownExtensionType()
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pyarrow.lib.UnknownExtensionType.__arrow_ext_deserialize__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":2169
 * 
 * 
 * def register_extension_type(ext_type):             # <<<<<<<<<<<<<<
 *     """
 *     Register a Python extension type.
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_63register_extension_type(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_62register_extension_type, "register_extension_type(ext_type)\n\nRegister a Python extension type.\n\nRegistration is based on the extension name (so different registered types\nneed unique extension names). Registration needs an extension type\ninstance, but then works for any instance of the same subclass regardless\nof parametrization of the type.\n\nParameters\n----------\next_type : BaseExtensionType instance\n    The ExtensionType subclass to register.\n\nExamples\n--------\nDefine a RationalType extension type subclassing ExtensionType:\n\n>>> import pyarrow as pa\n>>> class RationalType(pa.ExtensionType):\n...     def __init__(self, data_type: pa.DataType):\n...         if not pa.types.is_integer(data_type):\n...             raise TypeError(f\"data_type must be an integer type not {data_type}\")\n...         super().__init__(\n...             pa.struct(\n...                 [\n...                     (\"numer\", data_type),\n...                     (\"denom\", data_type),\n...                 ],\n...             ),\n...             # N.B. This name does _not_ reference `data_type` so deserialization\n...             # will work for _any_ integer `data_type` after registration\n...             \"my_package.rational\",\n...         )\n...     def __arrow_ext_serialize__(self) -> bytes:\n...         # No parameters are necessary\n...         return b\"\"\n...     @classmethod\n...     def __arrow_ext_deserialize__(cls, storage_type, serialized):\n...         # return an instance of this subclass\n...         return RationalType(storage_type[0].type)\n\nRegister the extension type:\n\n>>> pa.register_extension_type(RationalType(pa.int64()))\n\nUnregister the extension type:\n\n>>> pa.unregister_extension_type(\"my_package.rational\")");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_63register_extension_type = {"register_extension_type", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_63register_extension_type, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_62register_extension_type};
static PyObject *__pyx_pw_7pyarrow_3lib_63register_extension_type(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_ext_type = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("register_extension_type (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_ext_type,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 2169, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 2169, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "register_extension_type", 0) < (0)) __PYX_ERR(1, 2169, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("register_extension_type", 1, 1, 1, i); __PYX_ERR(1, 2169, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 2169, __pyx_L3_error)
    }
    __pyx_v_ext_type = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("register_extension_type", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 2169, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("pyarrow.lib.register_extension_type", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyarrow_3lib_62register_extension_type(__pyx_self, __pyx_v_ext_type);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7pyarrow_3lib_62register_extension_type(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_ext_type) {
  struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v__type = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7pyarrow_3lib_ensure_type __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("register_extension_type", 0);

  /* "pyarrow/types.pxi":2220
 *     """
 *     cdef:
 *         DataType _type = ensure_type(ext_type, allow_none=False)             # <<<<<<<<<<<<<<
 * 
 *     if not isinstance(_type, BaseExtensionType):
*/
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.allow_none = 0;
  __pyx_t_1 = ((PyObject *)__pyx_f_7pyarrow_3lib_ensure_type(__pyx_v_ext_type, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2220, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__type = ((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyarrow/types.pxi":2222
 *         DataType _type = ensure_type(ext_type, allow_none=False)
 * 
 *     if not isinstance(_type, BaseExtensionType):             # <<<<<<<<<<<<<<
 *         raise TypeError("Only extension types can be registered")
 * 
*/
  __pyx_t_3 = __Pyx_TypeCheck(((PyObject *)__pyx_v__type), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_BaseExtensionType); 
  __pyx_t_4 = (!__pyx_t_3);
  if (unlikely(__pyx_t_4)) {

    /* "pyarrow/types.pxi":2223
 * 
 *     if not isinstance(_type, BaseExtensionType):
 *         raise TypeError("Only extension types can be registered")             # <<<<<<<<<<<<<<
 * 
 *     # register on the C++ side
*/
    __pyx_t_5 = NULL;
    __pyx_t_6 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_Only_extension_types_can_be_regi};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2223, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(1, 2223, __pyx_L1_error)

    /* "pyarrow/types.pxi":2222
 *         DataType _type = ensure_type(ext_type, allow_none=False)
 * 
 *     if not isinstance(_type, BaseExtensionType):             # <<<<<<<<<<<<<<
 *         raise TypeError("Only extension types can be registered")
 * 
*/
  }

  /* "pyarrow/types.pxi":2227
 *     # register on the C++ side
 *     check_status(
 *         RegisterPyExtensionType(<shared_ptr[CDataType]> _type.sp_type))             # <<<<<<<<<<<<<<
 * 
 *     # register on the python side
*/
  if (unlikely(((PyObject *)__pyx_v__type) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_type");
    __PYX_ERR(1, 2227, __pyx_L1_error)
  }

  /* "pyarrow/types.pxi":2226
 * 
 *     # register on the C++ side
 *     check_status(             # <<<<<<<<<<<<<<
 *         RegisterPyExtensionType(<shared_ptr[CDataType]> _type.sp_type))
 * 
*/
  __pyx_t_7 = __pyx_f_7pyarrow_3lib_check_status(arrow::py::RegisterPyExtensionType(((std::shared_ptr< arrow::DataType> )__pyx_v__type->sp_type))); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(1, 2226, __pyx_L1_error)

  /* "pyarrow/types.pxi":2230
 * 
 *     # register on the python side
 *     _python_extension_types_registry.append(_type)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_python_extension_types_registry); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2230, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_8 = __Pyx_PyObject_Append(__pyx_t_1, ((PyObject *)__pyx_v__type)); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(1, 2230, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyarrow/types.pxi":2169
 * 
 * 
 * def register_extension_type(ext_type):             # <<<<<<<<<<<<<<
 *     """
 *     Register a Python extension type.
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pyarrow.lib.register_extension_type", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v__type);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":2233
 * 
 * 
 * def unregister_extension_type(type_name):             # <<<<<<<<<<<<<<
 *     """
 *     Unregister a Python extension type.
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_65unregister_extension_type(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_64unregister_extension_type, "unregister_extension_type(type_name)\n\nUnregister a Python extension type.\n\nParameters\n----------\ntype_name : str\n    The name of the ExtensionType subclass to unregister.\n\nExamples\n--------\nDefine a RationalType extension type subclassing ExtensionType:\n\n>>> import pyarrow as pa\n>>> class RationalType(pa.ExtensionType):\n...     def __init__(self, data_type: pa.DataType):\n...         if not pa.types.is_integer(data_type):\n...             raise TypeError(f\"data_type must be an integer type not {data_type}\")\n...         super().__init__(\n...             pa.struct(\n...                 [\n...                     (\"numer\", data_type),\n...                     (\"denom\", data_type),\n...                 ],\n...             ),\n...             # N.B. This name does _not_ reference `data_type` so deserialization\n...             # will work for _any_ integer `data_type` after registration\n...             \"my_package.rational\",\n...         )\n...     def __arrow_ext_serialize__(self) -> bytes:\n...         # No parameters are necessary\n...         return b\"\"\n...     @classmethod\n...     def __arrow_ext_deserialize__(cls, storage_type, serialized):\n...         # return an instance of this subclass\n...         return RationalType(storage_type[0].type)\n\nRegister the extension type:\n\n>>> pa.register_extension_type(RationalType(pa.int64()))\n\nUnregister the extension type:\n\n>>> pa.unregister_extension_type(\"my_package.rational\")");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_65unregister_extension_type = {"unregister_extension_type", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_65unregister_extension_type, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_64unregister_extension_type};
static PyObject *__pyx_pw_7pyarrow_3lib_65unregister_extension_type(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_type_name = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("unregister_extension_type (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_type_name,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 2233, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 2233, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "unregister_extension_type", 0) < (0)) __PYX_ERR(1, 2233, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("unregister_extension_type", 1, 1, 1, i); __PYX_ERR(1, 2233, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 2233, __pyx_L3_error)
    }
    __pyx_v_type_name = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("unregister_extension_type", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 2233, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("pyarrow.lib.unregister_extension_type", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyarrow_3lib_64unregister_extension_type(__pyx_self, __pyx_v_type_name);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7pyarrow_3lib_64unregister_extension_type(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_type_name) {
  std::string __pyx_v_c_type_name;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  std::string __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("unregister_extension_type", 0);

  /* "pyarrow/types.pxi":2279
 *     """
 *     cdef:
 *         c_string c_type_name = tobytes(type_name)             # <<<<<<<<<<<<<<
 *     check_status(UnregisterPyExtensionType(c_type_name))
 * 
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_tobytes); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2279, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_type_name};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2279, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_t_5 = __pyx_convert_string_from_py_6libcpp_6string_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 2279, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_c_type_name = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_5);

  /* "pyarrow/types.pxi":2280
 *     cdef:
 *         c_string c_type_name = tobytes(type_name)
 *     check_status(UnregisterPyExtensionType(c_type_name))             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_t_6 = __pyx_f_7pyarrow_3lib_check_status(arrow::py::UnregisterPyExtensionType(__pyx_v_c_type_name)); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(1, 2280, __pyx_L1_error)

  /* "pyarrow/types.pxi":2233
 * 
 * 
 * def unregister_extension_type(type_name):             # <<<<<<<<<<<<<<
 *     """
 *     Unregister a Python extension type.
*/

  /* 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("pyarrow.lib.unregister_extension_type", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":2295
 *     """
 * 
 *     def __init__(self, __arg0__=None, **kwargs):             # <<<<<<<<<<<<<<
 *         cdef:
 *             vector[c_string] keys, values
*/

/* Python wrapper */
static int __pyx_pw_7pyarrow_3lib_16KeyValueMetadata_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_7pyarrow_3lib_16KeyValueMetadata_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___arg0__ = 0;
  PyObject *__pyx_v_kwargs = 0;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return -1;
  __Pyx_GOTREF(__pyx_v_kwargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_arg0,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 2295, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 2295, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, __pyx_v_kwargs, values, kwd_pos_args, __pyx_kwds_len, "__init__", 1) < (0)) __PYX_ERR(1, 2295, __pyx_L3_error)
      if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
    } else {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 2295, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v___arg0__ = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, __pyx_nargs); __PYX_ERR(1, 2295, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("pyarrow.lib.KeyValueMetadata.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyarrow_3lib_16KeyValueMetadata___init__(((struct __pyx_obj_7pyarrow_3lib_KeyValueMetadata *)__pyx_v_self), __pyx_v___arg0__, __pyx_v_kwargs);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_DECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_7pyarrow_3lib_16KeyValueMetadata_8__init___2generator13(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "pyarrow/types.pxi":2304
 *             other = (__arg0__.items() if isinstance(__arg0__, Mapping)
 *                      else __arg0__)
 *             items.extend((tobytes(k), v) for k, v in other)             # <<<<<<<<<<<<<<
 * 
 *         prior_keys = {k for k, v in items}
*/

static PyObject *__pyx_pf_7pyarrow_3lib_16KeyValueMetadata_8__init___genexpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0) {
  struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_2_genexpr *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("genexpr", 0);
  __pyx_cur_scope = (struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_2_genexpr *)__pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_2_genexpr(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_2_genexpr, __pyx_mstate_global->__pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_2_genexpr *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(1, 2304, __pyx_L1_error)
  } else {
    __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_genexpr_arg_0 = __pyx_genexpr_arg_0;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_genexpr_arg_0);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_genexpr_arg_0);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7pyarrow_3lib_16KeyValueMetadata_8__init___2generator13, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[2]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_init___locals_genexpr, __pyx_mstate_global->__pyx_n_u_pyarrow_lib); if (unlikely(!gen)) __PYX_ERR(1, 2304, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyarrow.lib.KeyValueMetadata.__init__.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF((PyObject *)__pyx_cur_scope);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_7pyarrow_3lib_16KeyValueMetadata_8__init___2generator13(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_2_genexpr *__pyx_cur_scope = ((struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_2_genexpr *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *(*__pyx_t_3)(PyObject *);
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *(*__pyx_t_8)(PyObject *);
  size_t __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("genexpr", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L8_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(__pyx_sent_value != Py_None)) {
    if (unlikely(__pyx_sent_value)) PyErr_SetString(PyExc_TypeError, "can't send non-None value to a just-started generator");
    __PYX_ERR(1, 2304, __pyx_L1_error)
  }
  if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(1, 2304, __pyx_L1_error) }
  if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_genexpr_arg_0)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_genexpr_arg_0)) {
    __pyx_t_1 = __pyx_cur_scope->__pyx_genexpr_arg_0; __Pyx_INCREF(__pyx_t_1);
    __pyx_t_2 = 0;
    __pyx_t_3 = NULL;
  } else {
    __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_genexpr_arg_0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2304, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2304, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_3)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
          #if !CYTHON_ASSUME_SAFE_SIZE
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 2304, __pyx_L1_error)
          #endif
          if (__pyx_t_2 >= __pyx_temp) break;
        }
        __pyx_t_4 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_2, __Pyx_ReferenceSharing_OwnStrongReference);
        ++__pyx_t_2;
      } else {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
          #if !CYTHON_ASSUME_SAFE_SIZE
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 2304, __pyx_L1_error)
          #endif
          if (__pyx_t_2 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2));
        #else
        __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2);
        #endif
        ++__pyx_t_2;
      }
      if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2304, __pyx_L1_error)
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(1, 2304, __pyx_L1_error)
          PyErr_Clear();
        }
        break;
      }
    }
    __Pyx_GOTREF(__pyx_t_4);
    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(1, 2304, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0);
        __Pyx_INCREF(__pyx_t_5);
        __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1);
        __Pyx_INCREF(__pyx_t_6);
      } else {
        __pyx_t_5 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference);
        if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2304, __pyx_L1_error)
        __Pyx_XGOTREF(__pyx_t_5);
        __pyx_t_6 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference);
        if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2304, __pyx_L1_error)
        __Pyx_XGOTREF(__pyx_t_6);
      }
      #else
      __pyx_t_5 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2304, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2304, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      #endif
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_7 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 2304, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_8 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_7);
      index = 0; __pyx_t_5 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_5)) goto __pyx_L6_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_5);
      index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L6_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_6);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < (0)) __PYX_ERR(1, 2304, __pyx_L1_error)
      __pyx_t_8 = NULL;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L7_unpacking_done;
      __pyx_L6_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_8 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(1, 2304, __pyx_L1_error)
      __pyx_L7_unpacking_done:;
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_k);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_k, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    __pyx_t_5 = 0;
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_v);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_v, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_6);
    __pyx_t_6 = 0;
    __pyx_t_6 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_tobytes); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2304, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_9 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
      assert(__pyx_t_6);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
      __pyx_t_9 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_cur_scope->__pyx_v_k};
      __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2304, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2304, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_4);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4) != (0)) __PYX_ERR(1, 2304, __pyx_L1_error);
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_v);
    __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_v);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_cur_scope->__pyx_v_v) != (0)) __PYX_ERR(1, 2304, __pyx_L1_error);
    __pyx_t_4 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    __Pyx_XGIVEREF(__pyx_t_1);
    __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
    __pyx_cur_scope->__pyx_t_1 = __pyx_t_2;
    __pyx_cur_scope->__pyx_t_2 = __pyx_t_3;
    __Pyx_XGIVEREF(__pyx_r);
    __Pyx_RefNannyFinishContext();
    __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
    /* return from generator, yielding value */
    __pyx_generator->resume_label = 1;
    return __pyx_r;
    __pyx_L8_resume_from_yield:;
    __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
    __pyx_cur_scope->__pyx_t_0 = 0;
    __Pyx_XGOTREF(__pyx_t_1);
    __pyx_t_2 = __pyx_cur_scope->__pyx_t_1;
    __pyx_t_3 = __pyx_cur_scope->__pyx_t_2;
    if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 2304, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  if (__Pyx_PyErr_Occurred()) {
    __Pyx_Generator_Replace_StopIteration(0);
    __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  }
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":2295
 *     """
 * 
 *     def __init__(self, __arg0__=None, **kwargs):             # <<<<<<<<<<<<<<
 *         cdef:
 *             vector[c_string] keys, values
*/

static int __pyx_pf_7pyarrow_3lib_16KeyValueMetadata___init__(struct __pyx_obj_7pyarrow_3lib_KeyValueMetadata *__pyx_v_self, PyObject *__pyx_v___arg0__, PyObject *__pyx_v_kwargs) {
  std::vector<std::string>  __pyx_v_keys;
  std::vector<std::string>  __pyx_v_values;
  std::shared_ptr< arrow::KeyValueMetadata const >  __pyx_v_result;
  PyObject *__pyx_v_items = NULL;
  PyObject *__pyx_v_other = NULL;
  PyObject *__pyx_v_prior_keys = NULL;
  PyObject *__pyx_v_k = NULL;
  PyObject *__pyx_v_v = NULL;
  PyObject *__pyx_v_key = NULL;
  PyObject *__pyx_v_value = NULL;
  PyObject *__pyx_gb_7pyarrow_3lib_16KeyValueMetadata_8__init___2generator13 = 0;
  PyObject *__pyx_8genexpr5__pyx_v_k = NULL;
  CYTHON_UNUSED PyObject *__pyx_8genexpr5__pyx_v_v = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *(*__pyx_t_11)(PyObject *);
  Py_ssize_t __pyx_t_12;
  int __pyx_t_13;
  int __pyx_t_14;
  std::string __pyx_t_15;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "pyarrow/types.pxi":2300
 *             shared_ptr[const CKeyValueMetadata] result
 * 
 *         items = []             # <<<<<<<<<<<<<<
 *         if __arg0__ is not None:
 *             other = (__arg0__.items() if isinstance(__arg0__, Mapping)
*/
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2300, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_items = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyarrow/types.pxi":2301
 * 
 *         items = []
 *         if __arg0__ is not None:             # <<<<<<<<<<<<<<
 *             other = (__arg0__.items() if isinstance(__arg0__, Mapping)
 *                      else __arg0__)
*/
  __pyx_t_2 = (__pyx_v___arg0__ != Py_None);
  if (__pyx_t_2) {

    /* "pyarrow/types.pxi":2302
 *         items = []
 *         if __arg0__ is not None:
 *             other = (__arg0__.items() if isinstance(__arg0__, Mapping)             # <<<<<<<<<<<<<<
 *                      else __arg0__)
 *             items.extend((tobytes(k), v) for k, v in other)
*/
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Mapping); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2302, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = PyObject_IsInstance(__pyx_v___arg0__, __pyx_t_3); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(1, 2302, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_2) {
      __pyx_t_4 = __pyx_v___arg0__;
      __Pyx_INCREF(__pyx_t_4);
      __pyx_t_5 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_items, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2302, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      __pyx_t_1 = __pyx_t_3;
      __pyx_t_3 = 0;
    } else {

      /* "pyarrow/types.pxi":2303
 *         if __arg0__ is not None:
 *             other = (__arg0__.items() if isinstance(__arg0__, Mapping)
 *                      else __arg0__)             # <<<<<<<<<<<<<<
 *             items.extend((tobytes(k), v) for k, v in other)
 * 
*/
      __Pyx_INCREF(__pyx_v___arg0__);
      __pyx_t_1 = __pyx_v___arg0__;
    }
    __pyx_v_other = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "pyarrow/types.pxi":2304
 *             other = (__arg0__.items() if isinstance(__arg0__, Mapping)
 *                      else __arg0__)
 *             items.extend((tobytes(k), v) for k, v in other)             # <<<<<<<<<<<<<<
 * 
 *         prior_keys = {k for k, v in items}
*/
    __pyx_t_1 = __pyx_pf_7pyarrow_3lib_16KeyValueMetadata_8__init___genexpr(NULL, __pyx_v_other); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2304, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = __Pyx_PyList_Extend(__pyx_v_items, __pyx_t_1); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(1, 2304, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyarrow/types.pxi":2301
 * 
 *         items = []
 *         if __arg0__ is not None:             # <<<<<<<<<<<<<<
 *             other = (__arg0__.items() if isinstance(__arg0__, Mapping)
 *                      else __arg0__)
*/
  }

  /* "pyarrow/types.pxi":2306
 *             items.extend((tobytes(k), v) for k, v in other)
 * 
 *         prior_keys = {k for k, v in items}             # <<<<<<<<<<<<<<
 *         for k, v in kwargs.items():
 *             k = tobytes(k)
*/
  { /* enter inner scope */
    __pyx_t_1 = PySet_New(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2306, __pyx_L6_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __pyx_v_items; __Pyx_INCREF(__pyx_t_3);
    __pyx_t_7 = 0;
    for (;;) {
      {
        Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3);
        #if !CYTHON_ASSUME_SAFE_SIZE
        if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 2306, __pyx_L6_error)
        #endif
        if (__pyx_t_7 >= __pyx_temp) break;
      }
      __pyx_t_4 = __Pyx_PyList_GetItemRefFast(__pyx_t_3, __pyx_t_7, __Pyx_ReferenceSharing_OwnStrongReference);
      ++__pyx_t_7;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2306, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_4);
      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(1, 2306, __pyx_L6_error)
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_8 = PyTuple_GET_ITEM(sequence, 0);
          __Pyx_INCREF(__pyx_t_8);
          __pyx_t_9 = PyTuple_GET_ITEM(sequence, 1);
          __Pyx_INCREF(__pyx_t_9);
        } else {
          __pyx_t_8 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference);
          if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2306, __pyx_L6_error)
          __Pyx_XGOTREF(__pyx_t_8);
          __pyx_t_9 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference);
          if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 2306, __pyx_L6_error)
          __Pyx_XGOTREF(__pyx_t_9);
        }
        #else
        __pyx_t_8 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2306, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_9 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 2306, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_9);
        #endif
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else {
        Py_ssize_t index = -1;
        __pyx_t_10 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 2306, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_11 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_10);
        index = 0; __pyx_t_8 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_8)) goto __pyx_L9_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_8);
        index = 1; __pyx_t_9 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_9)) goto __pyx_L9_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_9);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_10), 2) < (0)) __PYX_ERR(1, 2306, __pyx_L6_error)
        __pyx_t_11 = NULL;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        goto __pyx_L10_unpacking_done;
        __pyx_L9_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __pyx_t_11 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        __PYX_ERR(1, 2306, __pyx_L6_error)
        __pyx_L10_unpacking_done:;
      }
      __Pyx_XDECREF_SET(__pyx_8genexpr5__pyx_v_k, __pyx_t_8);
      __pyx_t_8 = 0;
      __Pyx_XDECREF_SET(__pyx_8genexpr5__pyx_v_v, __pyx_t_9);
      __pyx_t_9 = 0;
      if (unlikely(PySet_Add(__pyx_t_1, (PyObject*)__pyx_8genexpr5__pyx_v_k))) __PYX_ERR(1, 2306, __pyx_L6_error)
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_8genexpr5__pyx_v_k); __pyx_8genexpr5__pyx_v_k = 0;
    __Pyx_XDECREF(__pyx_8genexpr5__pyx_v_v); __pyx_8genexpr5__pyx_v_v = 0;
    goto __pyx_L12_exit_scope;
    __pyx_L6_error:;
    __Pyx_XDECREF(__pyx_8genexpr5__pyx_v_k); __pyx_8genexpr5__pyx_v_k = 0;
    __Pyx_XDECREF(__pyx_8genexpr5__pyx_v_v); __pyx_8genexpr5__pyx_v_v = 0;
    goto __pyx_L1_error;
    __pyx_L12_exit_scope:;
  } /* exit inner scope */
  __pyx_v_prior_keys = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyarrow/types.pxi":2307
 * 
 *         prior_keys = {k for k, v in items}
 *         for k, v in kwargs.items():             # <<<<<<<<<<<<<<
 *             k = tobytes(k)
 *             if k in prior_keys:
*/
  __pyx_t_7 = 0;
  __pyx_t_3 = __Pyx_dict_iterator(__pyx_v_kwargs, 1, __pyx_mstate_global->__pyx_n_u_items, (&__pyx_t_12), (&__pyx_t_13)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2307, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_1);
  __pyx_t_1 = __pyx_t_3;
  __pyx_t_3 = 0;
  while (1) {
    __pyx_t_14 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_12, &__pyx_t_7, &__pyx_t_3, &__pyx_t_4, NULL, __pyx_t_13);
    if (unlikely(__pyx_t_14 == 0)) break;
    if (unlikely(__pyx_t_14 == -1)) __PYX_ERR(1, 2307, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_XDECREF_SET(__pyx_v_k, __pyx_t_3);
    __pyx_t_3 = 0;
    __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "pyarrow/types.pxi":2308
 *         prior_keys = {k for k, v in items}
 *         for k, v in kwargs.items():
 *             k = tobytes(k)             # <<<<<<<<<<<<<<
 *             if k in prior_keys:
 *                 raise KeyError("Duplicate key {}, "
*/
    __pyx_t_3 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_tobytes); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 2308, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_5 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_9))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
      assert(__pyx_t_3);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_9, __pyx__function);
      __pyx_t_5 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_k};
      __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2308, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_DECREF_SET(__pyx_v_k, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "pyarrow/types.pxi":2309
 *         for k, v in kwargs.items():
 *             k = tobytes(k)
 *             if k in prior_keys:             # <<<<<<<<<<<<<<
 *                 raise KeyError("Duplicate key {}, "
 *                                "use pass all items as list of tuples if you "
*/
    __pyx_t_2 = (__Pyx_PySet_ContainsTF(__pyx_v_k, __pyx_v_prior_keys, Py_EQ)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(1, 2309, __pyx_L1_error)
    if (unlikely(__pyx_t_2)) {

      /* "pyarrow/types.pxi":2310
 *             k = tobytes(k)
 *             if k in prior_keys:
 *                 raise KeyError("Duplicate key {}, "             # <<<<<<<<<<<<<<
 *                                "use pass all items as list of tuples if you "
 *                                "intend to have duplicate keys")
*/
      __pyx_t_9 = NULL;
      __pyx_t_5 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_mstate_global->__pyx_kp_u_Duplicate_key_use_pass_all_items};
        __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_KeyError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2310, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
      }
      __Pyx_Raise(__pyx_t_4, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __PYX_ERR(1, 2310, __pyx_L1_error)

      /* "pyarrow/types.pxi":2309
 *         for k, v in kwargs.items():
 *             k = tobytes(k)
 *             if k in prior_keys:             # <<<<<<<<<<<<<<
 *                 raise KeyError("Duplicate key {}, "
 *                                "use pass all items as list of tuples if you "
*/
    }

    /* "pyarrow/types.pxi":2313
 *                                "use pass all items as list of tuples if you "
 *                                "intend to have duplicate keys")
 *             items.append((k, v))             # <<<<<<<<<<<<<<
 * 
 *         keys.reserve(len(items))
*/
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2313, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_v_k);
    __Pyx_GIVEREF(__pyx_v_k);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_k) != (0)) __PYX_ERR(1, 2313, __pyx_L1_error);
    __Pyx_INCREF(__pyx_v_v);
    __Pyx_GIVEREF(__pyx_v_v);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_v) != (0)) __PYX_ERR(1, 2313, __pyx_L1_error);
    __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_items, __pyx_t_4); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(1, 2313, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyarrow/types.pxi":2315
 *             items.append((k, v))
 * 
 *         keys.reserve(len(items))             # <<<<<<<<<<<<<<
 *         for key, value in items:
 *             keys.push_back(tobytes(key))
*/
  __pyx_t_12 = __Pyx_PyList_GET_SIZE(__pyx_v_items); if (unlikely(__pyx_t_12 == ((Py_ssize_t)-1))) __PYX_ERR(1, 2315, __pyx_L1_error)
  try {
    __pyx_v_keys.reserve(__pyx_t_12);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 2315, __pyx_L1_error)
  }

  /* "pyarrow/types.pxi":2316
 * 
 *         keys.reserve(len(items))
 *         for key, value in items:             # <<<<<<<<<<<<<<
 *             keys.push_back(tobytes(key))
 *             values.push_back(tobytes(value))
*/
  __pyx_t_1 = __pyx_v_items; __Pyx_INCREF(__pyx_t_1);
  __pyx_t_12 = 0;
  for (;;) {
    {
      Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
      #if !CYTHON_ASSUME_SAFE_SIZE
      if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 2316, __pyx_L1_error)
      #endif
      if (__pyx_t_12 >= __pyx_temp) break;
    }
    __pyx_t_4 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_12, __Pyx_ReferenceSharing_OwnStrongReference);
    ++__pyx_t_12;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2316, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    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(1, 2316, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_9 = PyTuple_GET_ITEM(sequence, 0);
        __Pyx_INCREF(__pyx_t_9);
        __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1);
        __Pyx_INCREF(__pyx_t_3);
      } else {
        __pyx_t_9 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference);
        if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 2316, __pyx_L1_error)
        __Pyx_XGOTREF(__pyx_t_9);
        __pyx_t_3 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference);
        if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2316, __pyx_L1_error)
        __Pyx_XGOTREF(__pyx_t_3);
      }
      #else
      __pyx_t_9 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 2316, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_3 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2316, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      #endif
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_8 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2316, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_11 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_8);
      index = 0; __pyx_t_9 = __pyx_t_11(__pyx_t_8); if (unlikely(!__pyx_t_9)) goto __pyx_L18_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_9);
      index = 1; __pyx_t_3 = __pyx_t_11(__pyx_t_8); if (unlikely(!__pyx_t_3)) goto __pyx_L18_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_3);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_8), 2) < (0)) __PYX_ERR(1, 2316, __pyx_L1_error)
      __pyx_t_11 = NULL;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      goto __pyx_L19_unpacking_done;
      __pyx_L18_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_11 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(1, 2316, __pyx_L1_error)
      __pyx_L19_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_9);
    __pyx_t_9 = 0;
    __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "pyarrow/types.pxi":2317
 *         keys.reserve(len(items))
 *         for key, value in items:
 *             keys.push_back(tobytes(key))             # <<<<<<<<<<<<<<
 *             values.push_back(tobytes(value))
 *         result.reset(new CKeyValueMetadata(move(keys), move(values)))
*/
    __pyx_t_3 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_tobytes); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 2317, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_5 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_9))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
      assert(__pyx_t_3);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_9, __pyx__function);
      __pyx_t_5 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_key};
      __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2317, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    __pyx_t_15 = __pyx_convert_string_from_py_6libcpp_6string_std__in_string(__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 2317, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    try {
      __pyx_v_keys.push_back(__pyx_t_15);
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(1, 2317, __pyx_L1_error)
    }

    /* "pyarrow/types.pxi":2318
 *         for key, value in items:
 *             keys.push_back(tobytes(key))
 *             values.push_back(tobytes(value))             # <<<<<<<<<<<<<<
 *         result.reset(new CKeyValueMetadata(move(keys), move(values)))
 *         self.init(result)
*/
    __pyx_t_9 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_tobytes); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2318, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_3);
      assert(__pyx_t_9);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
      __pyx_t_5 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_v_value};
      __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2318, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    __pyx_t_15 = __pyx_convert_string_from_py_6libcpp_6string_std__in_string(__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 2318, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    try {
      __pyx_v_values.push_back(__pyx_t_15);
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(1, 2318, __pyx_L1_error)
    }

    /* "pyarrow/types.pxi":2316
 * 
 *         keys.reserve(len(items))
 *         for key, value in items:             # <<<<<<<<<<<<<<
 *             keys.push_back(tobytes(key))
 *             values.push_back(tobytes(value))
*/
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyarrow/types.pxi":2319
 *             keys.push_back(tobytes(key))
 *             values.push_back(tobytes(value))
 *         result.reset(new CKeyValueMetadata(move(keys), move(values)))             # <<<<<<<<<<<<<<
 *         self.init(result)
 * 
*/
  __pyx_v_result.reset(new  arrow::KeyValueMetadata(cython_std::move<std::vector<std::string> >(__pyx_v_keys), cython_std::move<std::vector<std::string> >(__pyx_v_values)));

  /* "pyarrow/types.pxi":2320
 *             values.push_back(tobytes(value))
 *         result.reset(new CKeyValueMetadata(move(keys), move(values)))
 *         self.init(result)             # <<<<<<<<<<<<<<
 * 
 *     cdef void init(self, const shared_ptr[const CKeyValueMetadata]& wrapped):
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "init");
    __PYX_ERR(1, 2320, __pyx_L1_error)
  }
  ((struct __pyx_vtabstruct_7pyarrow_3lib_KeyValueMetadata *)__pyx_v_self->__pyx_vtab)->init(__pyx_v_self, __pyx_v_result); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 2320, __pyx_L1_error)

  /* "pyarrow/types.pxi":2295
 *     """
 * 
 *     def __init__(self, __arg0__=None, **kwargs):             # <<<<<<<<<<<<<<
 *         cdef:
 *             vector[c_string] keys, values
*/

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("pyarrow.lib.KeyValueMetadata.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_items);
  __Pyx_XDECREF(__pyx_v_other);
  __Pyx_XDECREF(__pyx_v_prior_keys);
  __Pyx_XDECREF(__pyx_v_k);
  __Pyx_XDECREF(__pyx_v_v);
  __Pyx_XDECREF(__pyx_v_key);
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XDECREF(__pyx_gb_7pyarrow_3lib_16KeyValueMetadata_8__init___2generator13);
  __Pyx_XDECREF(__pyx_8genexpr5__pyx_v_k);
  __Pyx_XDECREF(__pyx_8genexpr5__pyx_v_v);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":2322
 *         self.init(result)
 * 
 *     cdef void init(self, const shared_ptr[const CKeyValueMetadata]& wrapped):             # <<<<<<<<<<<<<<
 *         self.wrapped = wrapped
 *         self.metadata = wrapped.get()
*/

static void __pyx_f_7pyarrow_3lib_16KeyValueMetadata_init(struct __pyx_obj_7pyarrow_3lib_KeyValueMetadata *__pyx_v_self, std::shared_ptr< arrow::KeyValueMetadata const >  const &__pyx_v_wrapped) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "pyarrow/types.pxi":2323
 * 
 *     cdef void init(self, const shared_ptr[const CKeyValueMetadata]& wrapped):
 *         self.wrapped = wrapped             # <<<<<<<<<<<<<<
 *         self.metadata = wrapped.get()
 * 
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "wrapped");
    __PYX_ERR(1, 2323, __pyx_L1_error)
  }
  __pyx_v_self->wrapped = __pyx_v_wrapped;

  /* "pyarrow/types.pxi":2324
 *     cdef void init(self, const shared_ptr[const CKeyValueMetadata]& wrapped):
 *         self.wrapped = wrapped
 *         self.metadata = wrapped.get()             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "metadata");
    __PYX_ERR(1, 2324, __pyx_L1_error)
  }
  __pyx_v_self->metadata = __pyx_v_wrapped.get();

  /* "pyarrow/types.pxi":2322
 *         self.init(result)
 * 
 *     cdef void init(self, const shared_ptr[const CKeyValueMetadata]& wrapped):             # <<<<<<<<<<<<<<
 *         self.wrapped = wrapped
 *         self.metadata = wrapped.get()
*/

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyarrow.lib.KeyValueMetadata.init", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
}

/* "pyarrow/types.pxi":2326
 *         self.metadata = wrapped.get()
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     cdef wrap(const shared_ptr[const CKeyValueMetadata]& sp):
 *         cdef KeyValueMetadata self = KeyValueMetadata.__new__(KeyValueMetadata)
*/

static PyObject *__pyx_f_7pyarrow_3lib_16KeyValueMetadata_wrap(std::shared_ptr< arrow::KeyValueMetadata const >  const &__pyx_v_sp) {
  struct __pyx_obj_7pyarrow_3lib_KeyValueMetadata *__pyx_v_self = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("wrap", 0);

  /* "pyarrow/types.pxi":2328
 *     @staticmethod
 *     cdef wrap(const shared_ptr[const CKeyValueMetadata]& sp):
 *         cdef KeyValueMetadata self = KeyValueMetadata.__new__(KeyValueMetadata)             # <<<<<<<<<<<<<<
 *         self.init(sp)
 *         return self
*/
  __pyx_t_1 = ((PyObject *)__pyx_tp_new_7pyarrow_3lib_KeyValueMetadata(((PyTypeObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_KeyValueMetadata), __pyx_mstate_global->__pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2328, __pyx_L1_error)
  __Pyx_GOTREF((PyObject *)__pyx_t_1);
  __pyx_v_self = ((struct __pyx_obj_7pyarrow_3lib_KeyValueMetadata *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyarrow/types.pxi":2329
 *     cdef wrap(const shared_ptr[const CKeyValueMetadata]& sp):
 *         cdef KeyValueMetadata self = KeyValueMetadata.__new__(KeyValueMetadata)
 *         self.init(sp)             # <<<<<<<<<<<<<<
 *         return self
 * 
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "init");
    __PYX_ERR(1, 2329, __pyx_L1_error)
  }
  ((struct __pyx_vtabstruct_7pyarrow_3lib_KeyValueMetadata *)__pyx_v_self->__pyx_vtab)->init(__pyx_v_self, __pyx_v_sp); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 2329, __pyx_L1_error)

  /* "pyarrow/types.pxi":2330
 *         cdef KeyValueMetadata self = KeyValueMetadata.__new__(KeyValueMetadata)
 *         self.init(sp)
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     cdef inline shared_ptr[const CKeyValueMetadata] unwrap(self) nogil:
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_self);
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "pyarrow/types.pxi":2326
 *         self.metadata = wrapped.get()
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     cdef wrap(const shared_ptr[const CKeyValueMetadata]& sp):
 *         cdef KeyValueMetadata self = KeyValueMetadata.__new__(KeyValueMetadata)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib.KeyValueMetadata.wrap", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_self);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":2332
 *         return self
 * 
 *     cdef inline shared_ptr[const CKeyValueMetadata] unwrap(self) nogil:             # <<<<<<<<<<<<<<
 *         return self.wrapped
 * 
*/

static CYTHON_INLINE std::shared_ptr< arrow::KeyValueMetadata const >  __pyx_f_7pyarrow_3lib_16KeyValueMetadata_unwrap(struct __pyx_obj_7pyarrow_3lib_KeyValueMetadata *__pyx_v_self) {
  std::shared_ptr< arrow::KeyValueMetadata const >  __pyx_r;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyGILState_STATE __pyx_gilstate_save;

  /* "pyarrow/types.pxi":2333
 * 
 *     cdef inline shared_ptr[const CKeyValueMetadata] unwrap(self) nogil:
 *         return self.wrapped             # <<<<<<<<<<<<<<
 * 
 *     def equals(self, KeyValueMetadata other):
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "wrapped");
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    __PYX_ERR(1, 2333, __pyx_L1_error)
  }
  __pyx_r = __pyx_v_self->wrapped;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":2332
 *         return self
 * 
 *     cdef inline shared_ptr[const CKeyValueMetadata] unwrap(self) nogil:             # <<<<<<<<<<<<<<
 *         return self.wrapped
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  __Pyx_AddTraceback("pyarrow.lib.KeyValueMetadata.unwrap", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_pretend_to_initialize(&__pyx_r);
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  __pyx_L0:;
  return __pyx_r;
}

/* "pyarrow/types.pxi":2335
 *         return self.wrapped
 * 
 *     def equals(self, KeyValueMetadata other):             # <<<<<<<<<<<<<<
 *         """
 *         Parameters
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_16KeyValueMetadata_3equals(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_16KeyValueMetadata_2equals, "KeyValueMetadata.equals(self, KeyValueMetadata other)\n\nParameters\n----------\nother : pyarrow.KeyValueMetadata\n\nReturns\n-------\nbool");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_16KeyValueMetadata_3equals = {"equals", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_16KeyValueMetadata_3equals, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_16KeyValueMetadata_2equals};
static PyObject *__pyx_pw_7pyarrow_3lib_16KeyValueMetadata_3equals(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_7pyarrow_3lib_KeyValueMetadata *__pyx_v_other = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("equals (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_other,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 2335, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 2335, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "equals", 0) < (0)) __PYX_ERR(1, 2335, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("equals", 1, 1, 1, i); __PYX_ERR(1, 2335, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 2335, __pyx_L3_error)
    }
    __pyx_v_other = ((struct __pyx_obj_7pyarrow_3lib_KeyValueMetadata *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("equals", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 2335, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("pyarrow.lib.KeyValueMetadata.equals", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_KeyValueMetadata, 1, "other", 0))) __PYX_ERR(1, 2335, __pyx_L1_error)
  __pyx_r = __pyx_pf_7pyarrow_3lib_16KeyValueMetadata_2equals(((struct __pyx_obj_7pyarrow_3lib_KeyValueMetadata *)__pyx_v_self), __pyx_v_other);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7pyarrow_3lib_16KeyValueMetadata_2equals(struct __pyx_obj_7pyarrow_3lib_KeyValueMetadata *__pyx_v_self, struct __pyx_obj_7pyarrow_3lib_KeyValueMetadata *__pyx_v_other) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("equals", 0);

  /* "pyarrow/types.pxi":2345
 *         bool
 *         """
 *         return self.metadata.Equals(deref(other.wrapped))             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
*/
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "metadata");
    __PYX_ERR(1, 2345, __pyx_L1_error)
  }
  if (unlikely(((PyObject *)__pyx_v_other) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "wrapped");
    __PYX_ERR(1, 2345, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->metadata->Equals((*__pyx_v_other->wrapped))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2345, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":2335
 *         return self.wrapped
 * 
 *     def equals(self, KeyValueMetadata other):             # <<<<<<<<<<<<<<
 *         """
 *         Parameters
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib.KeyValueMetadata.equals", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":2347
 *         return self.metadata.Equals(deref(other.wrapped))
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return str(self)
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_16KeyValueMetadata_5__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_16KeyValueMetadata_5__repr__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_16KeyValueMetadata_4__repr__(((struct __pyx_obj_7pyarrow_3lib_KeyValueMetadata *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_16KeyValueMetadata_4__repr__(struct __pyx_obj_7pyarrow_3lib_KeyValueMetadata *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);

  /* "pyarrow/types.pxi":2348
 * 
 *     def __repr__(self):
 *         return str(self)             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_Unicode(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2348, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":2347
 *         return self.metadata.Equals(deref(other.wrapped))
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return str(self)
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib.KeyValueMetadata.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":2350
 *         return str(self)
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return frombytes(self.metadata.ToString(), safe=True)
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_16KeyValueMetadata_7__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_16KeyValueMetadata_7__str__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_16KeyValueMetadata_6__str__(((struct __pyx_obj_7pyarrow_3lib_KeyValueMetadata *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_16KeyValueMetadata_6__str__(struct __pyx_obj_7pyarrow_3lib_KeyValueMetadata *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__str__", 0);

  /* "pyarrow/types.pxi":2351
 * 
 *     def __str__(self):
 *         return frombytes(self.metadata.ToString(), safe=True)             # <<<<<<<<<<<<<<
 * 
 *     def __eq__(self, other):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_frombytes); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2351, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "metadata");
    __PYX_ERR(1, 2351, __pyx_L1_error)
  }
  __pyx_t_4 = __pyx_convert_PyBytes_string_to_py_6libcpp_6string_std__in_string(__pyx_v_self->metadata->ToString()); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2351, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, __pyx_t_4};
    __pyx_t_6 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2351, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_safe, Py_True, __pyx_t_6, __pyx_callargs+2, 0) < (0)) __PYX_ERR(1, 2351, __pyx_L1_error)
    __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_6);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2351, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":2350
 *         return str(self)
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return frombytes(self.metadata.ToString(), safe=True)
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pyarrow.lib.KeyValueMetadata.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":2353
 *         return frombytes(self.metadata.ToString(), safe=True)
 * 
 *     def __eq__(self, other):             # <<<<<<<<<<<<<<
 *         try:
 *             return self.equals(other)
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_16KeyValueMetadata_9__eq__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_16KeyValueMetadata_9__eq__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__eq__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_16KeyValueMetadata_8__eq__(((struct __pyx_obj_7pyarrow_3lib_KeyValueMetadata *)__pyx_v_self), ((PyObject *)__pyx_v_other));

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

static PyObject *__pyx_pf_7pyarrow_3lib_16KeyValueMetadata_8__eq__(struct __pyx_obj_7pyarrow_3lib_KeyValueMetadata *__pyx_v_self, PyObject *__pyx_v_other) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__eq__", 0);
  __Pyx_INCREF(__pyx_v_other);

  /* "pyarrow/types.pxi":2354
 * 
 *     def __eq__(self, other):
 *         try:             # <<<<<<<<<<<<<<
 *             return self.equals(other)
 *         except TypeError:
*/
  {
    __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:*/ {

      /* "pyarrow/types.pxi":2355
 *     def __eq__(self, other):
 *         try:
 *             return self.equals(other)             # <<<<<<<<<<<<<<
 *         except TypeError:
 *             pass
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_5 = ((PyObject *)__pyx_v_self);
      __Pyx_INCREF(__pyx_t_5);
      __pyx_t_6 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_other};
        __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_equals, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2355, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_4);
      }
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L7_try_return;

      /* "pyarrow/types.pxi":2354
 * 
 *     def __eq__(self, other):
 *         try:             # <<<<<<<<<<<<<<
 *             return self.equals(other)
 *         except TypeError:
*/
    }
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "pyarrow/types.pxi":2356
 *         try:
 *             return self.equals(other)
 *         except TypeError:             # <<<<<<<<<<<<<<
 *             pass
 * 
*/
    __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_TypeError))));
    if (__pyx_t_7) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L4_exception_handled;
    }
    goto __pyx_L5_except_error;

    /* "pyarrow/types.pxi":2354
 * 
 *     def __eq__(self, other):
 *         try:             # <<<<<<<<<<<<<<
 *             return self.equals(other)
 *         except TypeError:
*/
    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L7_try_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
    __pyx_L4_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
  }

  /* "pyarrow/types.pxi":2359
 *             pass
 * 
 *         if isinstance(other, Mapping):             # <<<<<<<<<<<<<<
 *             try:
 *                 other = KeyValueMetadata(other)
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Mapping); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2359, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_8 = PyObject_IsInstance(__pyx_v_other, __pyx_t_4); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(1, 2359, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_8) {

    /* "pyarrow/types.pxi":2360
 * 
 *         if isinstance(other, Mapping):
 *             try:             # <<<<<<<<<<<<<<
 *                 other = KeyValueMetadata(other)
 *                 return self.equals(other)
*/
    {
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_2, &__pyx_t_1);
      __Pyx_XGOTREF(__pyx_t_3);
      __Pyx_XGOTREF(__pyx_t_2);
      __Pyx_XGOTREF(__pyx_t_1);
      /*try:*/ {

        /* "pyarrow/types.pxi":2361
 *         if isinstance(other, Mapping):
 *             try:
 *                 other = KeyValueMetadata(other)             # <<<<<<<<<<<<<<
 *                 return self.equals(other)
 *             except TypeError:
*/
        __pyx_t_5 = NULL;
        __pyx_t_6 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_other};
          __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_KeyValueMetadata, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2361, __pyx_L12_error)
          __Pyx_GOTREF((PyObject *)__pyx_t_4);
        }
        __Pyx_DECREF_SET(__pyx_v_other, ((PyObject *)__pyx_t_4));
        __pyx_t_4 = 0;

        /* "pyarrow/types.pxi":2362
 *             try:
 *                 other = KeyValueMetadata(other)
 *                 return self.equals(other)             # <<<<<<<<<<<<<<
 *             except TypeError:
 *                 pass
*/
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_5 = ((PyObject *)__pyx_v_self);
        __Pyx_INCREF(__pyx_t_5);
        __pyx_t_6 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_other};
          __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_equals, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2362, __pyx_L12_error)
          __Pyx_GOTREF(__pyx_t_4);
        }
        __pyx_r = __pyx_t_4;
        __pyx_t_4 = 0;
        goto __pyx_L16_try_return;

        /* "pyarrow/types.pxi":2360
 * 
 *         if isinstance(other, Mapping):
 *             try:             # <<<<<<<<<<<<<<
 *                 other = KeyValueMetadata(other)
 *                 return self.equals(other)
*/
      }
      __pyx_L12_error:;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "pyarrow/types.pxi":2363
 *                 other = KeyValueMetadata(other)
 *                 return self.equals(other)
 *             except TypeError:             # <<<<<<<<<<<<<<
 *                 pass
 * 
*/
      __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_TypeError))));
      if (__pyx_t_7) {
        __Pyx_ErrRestore(0,0,0);
        goto __pyx_L13_exception_handled;
      }
      goto __pyx_L14_except_error;

      /* "pyarrow/types.pxi":2360
 * 
 *         if isinstance(other, Mapping):
 *             try:             # <<<<<<<<<<<<<<
 *                 other = KeyValueMetadata(other)
 *                 return self.equals(other)
*/
      __pyx_L14_except_error:;
      __Pyx_XGIVEREF(__pyx_t_3);
      __Pyx_XGIVEREF(__pyx_t_2);
      __Pyx_XGIVEREF(__pyx_t_1);
      __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_2, __pyx_t_1);
      goto __pyx_L1_error;
      __pyx_L16_try_return:;
      __Pyx_XGIVEREF(__pyx_t_3);
      __Pyx_XGIVEREF(__pyx_t_2);
      __Pyx_XGIVEREF(__pyx_t_1);
      __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_2, __pyx_t_1);
      goto __pyx_L0;
      __pyx_L13_exception_handled:;
      __Pyx_XGIVEREF(__pyx_t_3);
      __Pyx_XGIVEREF(__pyx_t_2);
      __Pyx_XGIVEREF(__pyx_t_1);
      __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_2, __pyx_t_1);
    }

    /* "pyarrow/types.pxi":2359
 *             pass
 * 
 *         if isinstance(other, Mapping):             # <<<<<<<<<<<<<<
 *             try:
 *                 other = KeyValueMetadata(other)
*/
  }

  /* "pyarrow/types.pxi":2366
 *                 pass
 * 
 *         return NotImplemented             # <<<<<<<<<<<<<<
 * 
 *     def __len__(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_builtin_NotImplemented);
  __pyx_r = __pyx_builtin_NotImplemented;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":2353
 *         return frombytes(self.metadata.ToString(), safe=True)
 * 
 *     def __eq__(self, other):             # <<<<<<<<<<<<<<
 *         try:
 *             return self.equals(other)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pyarrow.lib.KeyValueMetadata.__eq__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_other);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":2368
 *         return NotImplemented
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self.metadata.size()
 * 
*/

/* Python wrapper */
static Py_ssize_t __pyx_pw_7pyarrow_3lib_16KeyValueMetadata_11__len__(PyObject *__pyx_v_self); /*proto*/
static Py_ssize_t __pyx_pw_7pyarrow_3lib_16KeyValueMetadata_11__len__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_16KeyValueMetadata_10__len__(((struct __pyx_obj_7pyarrow_3lib_KeyValueMetadata *)__pyx_v_self));

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

static Py_ssize_t __pyx_pf_7pyarrow_3lib_16KeyValueMetadata_10__len__(struct __pyx_obj_7pyarrow_3lib_KeyValueMetadata *__pyx_v_self) {
  Py_ssize_t __pyx_r;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "pyarrow/types.pxi":2369
 * 
 *     def __len__(self):
 *         return self.metadata.size()             # <<<<<<<<<<<<<<
 * 
 *     def __contains__(self, key):
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "metadata");
    __PYX_ERR(1, 2369, __pyx_L1_error)
  }
  __pyx_r = __pyx_v_self->metadata->size();
  goto __pyx_L0;

  /* "pyarrow/types.pxi":2368
 *         return NotImplemented
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self.metadata.size()
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyarrow.lib.KeyValueMetadata.__len__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  return __pyx_r;
}

/* "pyarrow/types.pxi":2371
 *         return self.metadata.size()
 * 
 *     def __contains__(self, key):             # <<<<<<<<<<<<<<
 *         return self.metadata.Contains(tobytes(key))
 * 
*/

/* Python wrapper */
static int __pyx_pw_7pyarrow_3lib_16KeyValueMetadata_13__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
static int __pyx_pw_7pyarrow_3lib_16KeyValueMetadata_13__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__contains__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_16KeyValueMetadata_12__contains__(((struct __pyx_obj_7pyarrow_3lib_KeyValueMetadata *)__pyx_v_self), ((PyObject *)__pyx_v_key));

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

static int __pyx_pf_7pyarrow_3lib_16KeyValueMetadata_12__contains__(struct __pyx_obj_7pyarrow_3lib_KeyValueMetadata *__pyx_v_self, PyObject *__pyx_v_key) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  std::string __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__contains__", 0);

  /* "pyarrow/types.pxi":2372
 * 
 *     def __contains__(self, key):
 *         return self.metadata.Contains(tobytes(key))             # <<<<<<<<<<<<<<
 * 
 *     def __getitem__(self, key):
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "metadata");
    __PYX_ERR(1, 2372, __pyx_L1_error)
  }
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_tobytes); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2372, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_key};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2372, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_t_5 = __pyx_convert_string_from_py_6libcpp_6string_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 2372, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_v_self->metadata->Contains(__pyx_t_5);
  goto __pyx_L0;

  /* "pyarrow/types.pxi":2371
 *         return self.metadata.size()
 * 
 *     def __contains__(self, key):             # <<<<<<<<<<<<<<
 *         return self.metadata.Contains(tobytes(key))
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyarrow.lib.KeyValueMetadata.__contains__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":2374
 *         return self.metadata.Contains(tobytes(key))
 * 
 *     def __getitem__(self, key):             # <<<<<<<<<<<<<<
 *         return GetResultValue(self.metadata.Get(tobytes(key)))
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_16KeyValueMetadata_15__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_16KeyValueMetadata_15__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_16KeyValueMetadata_14__getitem__(((struct __pyx_obj_7pyarrow_3lib_KeyValueMetadata *)__pyx_v_self), ((PyObject *)__pyx_v_key));

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

static PyObject *__pyx_pf_7pyarrow_3lib_16KeyValueMetadata_14__getitem__(struct __pyx_obj_7pyarrow_3lib_KeyValueMetadata *__pyx_v_self, PyObject *__pyx_v_key) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  std::string __pyx_t_5;
  std::string __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__getitem__", 0);

  /* "pyarrow/types.pxi":2375
 * 
 *     def __getitem__(self, key):
 *         return GetResultValue(self.metadata.Get(tobytes(key)))             # <<<<<<<<<<<<<<
 * 
 *     def __iter__(self):
*/
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "metadata");
    __PYX_ERR(1, 2375, __pyx_L1_error)
  }
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_tobytes); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2375, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_key};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2375, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_t_5 = __pyx_convert_string_from_py_6libcpp_6string_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 2375, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_6 = arrow::py::GetResultValue<std::string>(__pyx_v_self->metadata->Get(__pyx_t_5)); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 2375, __pyx_L1_error)
  __pyx_t_1 = __pyx_convert_PyBytes_string_to_py_6libcpp_6string_std__in_string(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2375, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":2374
 *         return self.metadata.Contains(tobytes(key))
 * 
 *     def __getitem__(self, key):             # <<<<<<<<<<<<<<
 *         return GetResultValue(self.metadata.Get(tobytes(key)))
 * 
*/

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

/* "pyarrow/types.pxi":2377
 *         return GetResultValue(self.metadata.Get(tobytes(key)))
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self.keys()
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_16KeyValueMetadata_17__iter__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_16KeyValueMetadata_17__iter__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_16KeyValueMetadata_16__iter__(((struct __pyx_obj_7pyarrow_3lib_KeyValueMetadata *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_16KeyValueMetadata_16__iter__(struct __pyx_obj_7pyarrow_3lib_KeyValueMetadata *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  size_t __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__iter__", 0);

  /* "pyarrow/types.pxi":2378
 * 
 *     def __iter__(self):
 *         return self.keys()             # <<<<<<<<<<<<<<
 * 
 *     def __reduce__(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_keys, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2378, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":2377
 *         return GetResultValue(self.metadata.Get(tobytes(key)))
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self.keys()
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pyarrow.lib.KeyValueMetadata.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":2380
 *         return self.keys()
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         return KeyValueMetadata, (list(self.items()),)
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_16KeyValueMetadata_19__reduce__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_16KeyValueMetadata_18__reduce__, "KeyValueMetadata.__reduce__(self)");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_16KeyValueMetadata_19__reduce__ = {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_16KeyValueMetadata_19__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_16KeyValueMetadata_18__reduce__};
static PyObject *__pyx_pw_7pyarrow_3lib_16KeyValueMetadata_19__reduce__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7pyarrow_3lib_16KeyValueMetadata_18__reduce__(((struct __pyx_obj_7pyarrow_3lib_KeyValueMetadata *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_16KeyValueMetadata_18__reduce__(struct __pyx_obj_7pyarrow_3lib_KeyValueMetadata *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  size_t __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce__", 0);

  /* "pyarrow/types.pxi":2381
 * 
 *     def __reduce__(self):
 *         return KeyValueMetadata, (list(self.items()),)             # <<<<<<<<<<<<<<
 * 
 *     def key(self, i):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_items, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2381, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_t_2 = __Pyx_PySequence_ListKeepNew(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2381, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2381, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2) != (0)) __PYX_ERR(1, 2381, __pyx_L1_error);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2381, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_KeyValueMetadata);
  __Pyx_GIVEREF((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_KeyValueMetadata);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_KeyValueMetadata)) != (0)) __PYX_ERR(1, 2381, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1) != (0)) __PYX_ERR(1, 2381, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":2380
 *         return self.keys()
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         return KeyValueMetadata, (list(self.items()),)
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pyarrow.lib.KeyValueMetadata.__reduce__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":2383
 *         return KeyValueMetadata, (list(self.items()),)
 * 
 *     def key(self, i):             # <<<<<<<<<<<<<<
 *         """
 *         Parameters
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_16KeyValueMetadata_21key(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_16KeyValueMetadata_20key, "KeyValueMetadata.key(self, i)\n\nParameters\n----------\ni : int\n\nReturns\n-------\nbyte");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_16KeyValueMetadata_21key = {"key", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_16KeyValueMetadata_21key, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_16KeyValueMetadata_20key};
static PyObject *__pyx_pw_7pyarrow_3lib_16KeyValueMetadata_21key(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_i = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("key (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_i,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 2383, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 2383, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "key", 0) < (0)) __PYX_ERR(1, 2383, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("key", 1, 1, 1, i); __PYX_ERR(1, 2383, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 2383, __pyx_L3_error)
    }
    __pyx_v_i = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("key", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 2383, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("pyarrow.lib.KeyValueMetadata.key", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyarrow_3lib_16KeyValueMetadata_20key(((struct __pyx_obj_7pyarrow_3lib_KeyValueMetadata *)__pyx_v_self), __pyx_v_i);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7pyarrow_3lib_16KeyValueMetadata_20key(struct __pyx_obj_7pyarrow_3lib_KeyValueMetadata *__pyx_v_self, PyObject *__pyx_v_i) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int64_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("key", 0);

  /* "pyarrow/types.pxi":2393
 *         byte
 *         """
 *         return self.metadata.key(i)             # <<<<<<<<<<<<<<
 * 
 *     def value(self, i):
*/
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "metadata");
    __PYX_ERR(1, 2393, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyLong_As_int64_t(__pyx_v_i); if (unlikely((__pyx_t_1 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(1, 2393, __pyx_L1_error)
  __pyx_t_2 = __pyx_convert_PyBytes_string_to_py_6libcpp_6string_std__in_string(__pyx_v_self->metadata->key(__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2393, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":2383
 *         return KeyValueMetadata, (list(self.items()),)
 * 
 *     def key(self, i):             # <<<<<<<<<<<<<<
 *         """
 *         Parameters
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pyarrow.lib.KeyValueMetadata.key", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":2395
 *         return self.metadata.key(i)
 * 
 *     def value(self, i):             # <<<<<<<<<<<<<<
 *         """
 *         Parameters
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_16KeyValueMetadata_23value(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_16KeyValueMetadata_22value, "KeyValueMetadata.value(self, i)\n\nParameters\n----------\ni : int\n\nReturns\n-------\nbyte");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_16KeyValueMetadata_23value = {"value", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_16KeyValueMetadata_23value, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_16KeyValueMetadata_22value};
static PyObject *__pyx_pw_7pyarrow_3lib_16KeyValueMetadata_23value(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_i = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("value (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_i,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 2395, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 2395, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "value", 0) < (0)) __PYX_ERR(1, 2395, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("value", 1, 1, 1, i); __PYX_ERR(1, 2395, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 2395, __pyx_L3_error)
    }
    __pyx_v_i = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("value", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 2395, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("pyarrow.lib.KeyValueMetadata.value", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyarrow_3lib_16KeyValueMetadata_22value(((struct __pyx_obj_7pyarrow_3lib_KeyValueMetadata *)__pyx_v_self), __pyx_v_i);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7pyarrow_3lib_16KeyValueMetadata_22value(struct __pyx_obj_7pyarrow_3lib_KeyValueMetadata *__pyx_v_self, PyObject *__pyx_v_i) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int64_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("value", 0);

  /* "pyarrow/types.pxi":2405
 *         byte
 *         """
 *         return self.metadata.value(i)             # <<<<<<<<<<<<<<
 * 
 *     def keys(self):
*/
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "metadata");
    __PYX_ERR(1, 2405, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyLong_As_int64_t(__pyx_v_i); if (unlikely((__pyx_t_1 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(1, 2405, __pyx_L1_error)
  __pyx_t_2 = __pyx_convert_PyBytes_string_to_py_6libcpp_6string_std__in_string(__pyx_v_self->metadata->value(__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2405, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":2395
 *         return self.metadata.key(i)
 * 
 *     def value(self, i):             # <<<<<<<<<<<<<<
 *         """
 *         Parameters
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pyarrow.lib.KeyValueMetadata.value", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_7pyarrow_3lib_16KeyValueMetadata_26generator2(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "pyarrow/types.pxi":2407
 *         return self.metadata.value(i)
 * 
 *     def keys(self):             # <<<<<<<<<<<<<<
 *         for i in range(self.metadata.size()):
 *             yield self.metadata.key(i)
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_16KeyValueMetadata_25keys(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_16KeyValueMetadata_24keys, "KeyValueMetadata.keys(self)");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_16KeyValueMetadata_25keys = {"keys", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_16KeyValueMetadata_25keys, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_16KeyValueMetadata_24keys};
static PyObject *__pyx_pw_7pyarrow_3lib_16KeyValueMetadata_25keys(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("keys (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("keys", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("keys", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7pyarrow_3lib_16KeyValueMetadata_24keys(((struct __pyx_obj_7pyarrow_3lib_KeyValueMetadata *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_16KeyValueMetadata_24keys(struct __pyx_obj_7pyarrow_3lib_KeyValueMetadata *__pyx_v_self) {
  struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_3_keys *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("keys", 0);
  __pyx_cur_scope = (struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_3_keys *)__pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_3_keys(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_3_keys, __pyx_mstate_global->__pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_3_keys *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(1, 2407, __pyx_L1_error)
  } else {
    __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7pyarrow_3lib_16KeyValueMetadata_26generator2, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[3]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_keys, __pyx_mstate_global->__pyx_n_u_KeyValueMetadata_keys, __pyx_mstate_global->__pyx_n_u_pyarrow_lib); if (unlikely(!gen)) __PYX_ERR(1, 2407, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyarrow.lib.KeyValueMetadata.keys", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF((PyObject *)__pyx_cur_scope);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_7pyarrow_3lib_16KeyValueMetadata_26generator2(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_3_keys *__pyx_cur_scope = ((struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_3_keys *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  int64_t __pyx_t_1;
  int64_t __pyx_t_2;
  int64_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("keys", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L6_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(__pyx_sent_value != Py_None)) {
    if (unlikely(__pyx_sent_value)) PyErr_SetString(PyExc_TypeError, "can't send non-None value to a just-started generator");
    __PYX_ERR(1, 2407, __pyx_L1_error)
  }

  /* "pyarrow/types.pxi":2408
 * 
 *     def keys(self):
 *         for i in range(self.metadata.size()):             # <<<<<<<<<<<<<<
 *             yield self.metadata.key(i)
 * 
*/
  if (unlikely(((PyObject *)__pyx_cur_scope->__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "metadata");
    __PYX_ERR(1, 2408, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_cur_scope->__pyx_v_self->metadata->size();
  __pyx_t_2 = __pyx_t_1;
  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
    __pyx_cur_scope->__pyx_v_i = __pyx_t_3;

    /* "pyarrow/types.pxi":2409
 *     def keys(self):
 *         for i in range(self.metadata.size()):
 *             yield self.metadata.key(i)             # <<<<<<<<<<<<<<
 * 
 *     def values(self):
*/
    if (unlikely(((PyObject *)__pyx_cur_scope->__pyx_v_self) == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "metadata");
      __PYX_ERR(1, 2409, __pyx_L1_error)
    }
    __pyx_t_4 = __pyx_convert_PyBytes_string_to_py_6libcpp_6string_std__in_string(__pyx_cur_scope->__pyx_v_self->metadata->key(__pyx_cur_scope->__pyx_v_i)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2409, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
    __pyx_cur_scope->__pyx_t_1 = __pyx_t_2;
    __pyx_cur_scope->__pyx_t_2 = __pyx_t_3;
    __Pyx_XGIVEREF(__pyx_r);
    __Pyx_RefNannyFinishContext();
    __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
    /* return from generator, yielding value */
    __pyx_generator->resume_label = 1;
    return __pyx_r;
    __pyx_L6_resume_from_yield:;
    __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
    __pyx_t_2 = __pyx_cur_scope->__pyx_t_1;
    __pyx_t_3 = __pyx_cur_scope->__pyx_t_2;
    if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 2409, __pyx_L1_error)
  }
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* "pyarrow/types.pxi":2407
 *         return self.metadata.value(i)
 * 
 *     def keys(self):             # <<<<<<<<<<<<<<
 *         for i in range(self.metadata.size()):
 *             yield self.metadata.key(i)
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  if (__Pyx_PyErr_Occurred()) {
    __Pyx_Generator_Replace_StopIteration(0);
    __Pyx_AddTraceback("keys", __pyx_clineno, __pyx_lineno, __pyx_filename);
  }
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_7pyarrow_3lib_16KeyValueMetadata_29generator3(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "pyarrow/types.pxi":2411
 *             yield self.metadata.key(i)
 * 
 *     def values(self):             # <<<<<<<<<<<<<<
 *         for i in range(self.metadata.size()):
 *             yield self.metadata.value(i)
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_16KeyValueMetadata_28values(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_16KeyValueMetadata_27values, "KeyValueMetadata.values(self)");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_16KeyValueMetadata_28values = {"values", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_16KeyValueMetadata_28values, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_16KeyValueMetadata_27values};
static PyObject *__pyx_pw_7pyarrow_3lib_16KeyValueMetadata_28values(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("values (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("values", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("values", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7pyarrow_3lib_16KeyValueMetadata_27values(((struct __pyx_obj_7pyarrow_3lib_KeyValueMetadata *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_16KeyValueMetadata_27values(struct __pyx_obj_7pyarrow_3lib_KeyValueMetadata *__pyx_v_self) {
  struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_4_values *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("values", 0);
  __pyx_cur_scope = (struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_4_values *)__pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_4_values(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_4_values, __pyx_mstate_global->__pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_4_values *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(1, 2411, __pyx_L1_error)
  } else {
    __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7pyarrow_3lib_16KeyValueMetadata_29generator3, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[4]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_values, __pyx_mstate_global->__pyx_n_u_KeyValueMetadata_values, __pyx_mstate_global->__pyx_n_u_pyarrow_lib); if (unlikely(!gen)) __PYX_ERR(1, 2411, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyarrow.lib.KeyValueMetadata.values", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF((PyObject *)__pyx_cur_scope);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_7pyarrow_3lib_16KeyValueMetadata_29generator3(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_4_values *__pyx_cur_scope = ((struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_4_values *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  int64_t __pyx_t_1;
  int64_t __pyx_t_2;
  int64_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("values", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L6_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(__pyx_sent_value != Py_None)) {
    if (unlikely(__pyx_sent_value)) PyErr_SetString(PyExc_TypeError, "can't send non-None value to a just-started generator");
    __PYX_ERR(1, 2411, __pyx_L1_error)
  }

  /* "pyarrow/types.pxi":2412
 * 
 *     def values(self):
 *         for i in range(self.metadata.size()):             # <<<<<<<<<<<<<<
 *             yield self.metadata.value(i)
 * 
*/
  if (unlikely(((PyObject *)__pyx_cur_scope->__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "metadata");
    __PYX_ERR(1, 2412, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_cur_scope->__pyx_v_self->metadata->size();
  __pyx_t_2 = __pyx_t_1;
  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
    __pyx_cur_scope->__pyx_v_i = __pyx_t_3;

    /* "pyarrow/types.pxi":2413
 *     def values(self):
 *         for i in range(self.metadata.size()):
 *             yield self.metadata.value(i)             # <<<<<<<<<<<<<<
 * 
 *     def items(self):
*/
    if (unlikely(((PyObject *)__pyx_cur_scope->__pyx_v_self) == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "metadata");
      __PYX_ERR(1, 2413, __pyx_L1_error)
    }
    __pyx_t_4 = __pyx_convert_PyBytes_string_to_py_6libcpp_6string_std__in_string(__pyx_cur_scope->__pyx_v_self->metadata->value(__pyx_cur_scope->__pyx_v_i)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2413, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
    __pyx_cur_scope->__pyx_t_1 = __pyx_t_2;
    __pyx_cur_scope->__pyx_t_2 = __pyx_t_3;
    __Pyx_XGIVEREF(__pyx_r);
    __Pyx_RefNannyFinishContext();
    __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
    /* return from generator, yielding value */
    __pyx_generator->resume_label = 1;
    return __pyx_r;
    __pyx_L6_resume_from_yield:;
    __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
    __pyx_t_2 = __pyx_cur_scope->__pyx_t_1;
    __pyx_t_3 = __pyx_cur_scope->__pyx_t_2;
    if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 2413, __pyx_L1_error)
  }
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* "pyarrow/types.pxi":2411
 *             yield self.metadata.key(i)
 * 
 *     def values(self):             # <<<<<<<<<<<<<<
 *         for i in range(self.metadata.size()):
 *             yield self.metadata.value(i)
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  if (__Pyx_PyErr_Occurred()) {
    __Pyx_Generator_Replace_StopIteration(0);
    __Pyx_AddTraceback("values", __pyx_clineno, __pyx_lineno, __pyx_filename);
  }
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_7pyarrow_3lib_16KeyValueMetadata_32generator4(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "pyarrow/types.pxi":2415
 *             yield self.metadata.value(i)
 * 
 *     def items(self):             # <<<<<<<<<<<<<<
 *         for i in range(self.metadata.size()):
 *             yield (self.metadata.key(i), self.metadata.value(i))
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_16KeyValueMetadata_31items(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_16KeyValueMetadata_30items, "KeyValueMetadata.items(self)");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_16KeyValueMetadata_31items = {"items", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_16KeyValueMetadata_31items, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_16KeyValueMetadata_30items};
static PyObject *__pyx_pw_7pyarrow_3lib_16KeyValueMetadata_31items(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("items (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("items", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("items", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7pyarrow_3lib_16KeyValueMetadata_30items(((struct __pyx_obj_7pyarrow_3lib_KeyValueMetadata *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_16KeyValueMetadata_30items(struct __pyx_obj_7pyarrow_3lib_KeyValueMetadata *__pyx_v_self) {
  struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_5_items *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("items", 0);
  __pyx_cur_scope = (struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_5_items *)__pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_5_items(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_5_items, __pyx_mstate_global->__pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_5_items *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(1, 2415, __pyx_L1_error)
  } else {
    __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7pyarrow_3lib_16KeyValueMetadata_32generator4, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[5]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_items, __pyx_mstate_global->__pyx_n_u_KeyValueMetadata_items, __pyx_mstate_global->__pyx_n_u_pyarrow_lib); if (unlikely(!gen)) __PYX_ERR(1, 2415, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyarrow.lib.KeyValueMetadata.items", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF((PyObject *)__pyx_cur_scope);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_7pyarrow_3lib_16KeyValueMetadata_32generator4(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_5_items *__pyx_cur_scope = ((struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_5_items *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  int64_t __pyx_t_1;
  int64_t __pyx_t_2;
  int64_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("items", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L6_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(__pyx_sent_value != Py_None)) {
    if (unlikely(__pyx_sent_value)) PyErr_SetString(PyExc_TypeError, "can't send non-None value to a just-started generator");
    __PYX_ERR(1, 2415, __pyx_L1_error)
  }

  /* "pyarrow/types.pxi":2416
 * 
 *     def items(self):
 *         for i in range(self.metadata.size()):             # <<<<<<<<<<<<<<
 *             yield (self.metadata.key(i), self.metadata.value(i))
 * 
*/
  if (unlikely(((PyObject *)__pyx_cur_scope->__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "metadata");
    __PYX_ERR(1, 2416, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_cur_scope->__pyx_v_self->metadata->size();
  __pyx_t_2 = __pyx_t_1;
  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
    __pyx_cur_scope->__pyx_v_i = __pyx_t_3;

    /* "pyarrow/types.pxi":2417
 *     def items(self):
 *         for i in range(self.metadata.size()):
 *             yield (self.metadata.key(i), self.metadata.value(i))             # <<<<<<<<<<<<<<
 * 
 *     def get_all(self, key):
*/
    if (unlikely(((PyObject *)__pyx_cur_scope->__pyx_v_self) == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "metadata");
      __PYX_ERR(1, 2417, __pyx_L1_error)
    }
    __pyx_t_4 = __pyx_convert_PyBytes_string_to_py_6libcpp_6string_std__in_string(__pyx_cur_scope->__pyx_v_self->metadata->key(__pyx_cur_scope->__pyx_v_i)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2417, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (unlikely(((PyObject *)__pyx_cur_scope->__pyx_v_self) == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "metadata");
      __PYX_ERR(1, 2417, __pyx_L1_error)
    }
    __pyx_t_5 = __pyx_convert_PyBytes_string_to_py_6libcpp_6string_std__in_string(__pyx_cur_scope->__pyx_v_self->metadata->value(__pyx_cur_scope->__pyx_v_i)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2417, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2417, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_4);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4) != (0)) __PYX_ERR(1, 2417, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_5);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_5) != (0)) __PYX_ERR(1, 2417, __pyx_L1_error);
    __pyx_t_4 = 0;
    __pyx_t_5 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
    __pyx_cur_scope->__pyx_t_1 = __pyx_t_2;
    __pyx_cur_scope->__pyx_t_2 = __pyx_t_3;
    __Pyx_XGIVEREF(__pyx_r);
    __Pyx_RefNannyFinishContext();
    __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
    /* return from generator, yielding value */
    __pyx_generator->resume_label = 1;
    return __pyx_r;
    __pyx_L6_resume_from_yield:;
    __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
    __pyx_t_2 = __pyx_cur_scope->__pyx_t_1;
    __pyx_t_3 = __pyx_cur_scope->__pyx_t_2;
    if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 2417, __pyx_L1_error)
  }
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* "pyarrow/types.pxi":2415
 *             yield self.metadata.value(i)
 * 
 *     def items(self):             # <<<<<<<<<<<<<<
 *         for i in range(self.metadata.size()):
 *             yield (self.metadata.key(i), self.metadata.value(i))
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  if (__Pyx_PyErr_Occurred()) {
    __Pyx_Generator_Replace_StopIteration(0);
    __Pyx_AddTraceback("items", __pyx_clineno, __pyx_lineno, __pyx_filename);
  }
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":2419
 *             yield (self.metadata.key(i), self.metadata.value(i))
 * 
 *     def get_all(self, key):             # <<<<<<<<<<<<<<
 *         """
 *         Parameters
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_16KeyValueMetadata_34get_all(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_16KeyValueMetadata_33get_all, "KeyValueMetadata.get_all(self, key)\n\nParameters\n----------\nkey : str\n\nReturns\n-------\nlist[byte]");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_16KeyValueMetadata_34get_all = {"get_all", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_16KeyValueMetadata_34get_all, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_16KeyValueMetadata_33get_all};
static PyObject *__pyx_pw_7pyarrow_3lib_16KeyValueMetadata_34get_all(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_key = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_all (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_key,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 2419, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 2419, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "get_all", 0) < (0)) __PYX_ERR(1, 2419, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("get_all", 1, 1, 1, i); __PYX_ERR(1, 2419, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 2419, __pyx_L3_error)
    }
    __pyx_v_key = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("get_all", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 2419, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("pyarrow.lib.KeyValueMetadata.get_all", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyarrow_3lib_16KeyValueMetadata_33get_all(((struct __pyx_obj_7pyarrow_3lib_KeyValueMetadata *)__pyx_v_self), __pyx_v_key);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7pyarrow_3lib_16KeyValueMetadata_33get_all(struct __pyx_obj_7pyarrow_3lib_KeyValueMetadata *__pyx_v_self, PyObject *__pyx_v_key) {
  PyObject *__pyx_8genexpr6__pyx_v_k = NULL;
  PyObject *__pyx_8genexpr6__pyx_v_v = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_all", 0);
  __Pyx_INCREF(__pyx_v_key);

  /* "pyarrow/types.pxi":2429
 *         list[byte]
 *         """
 *         key = tobytes(key)             # <<<<<<<<<<<<<<
 *         return [v for k, v in self.items() if k == key]
 * 
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_tobytes); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2429, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_key};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2429, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF_SET(__pyx_v_key, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyarrow/types.pxi":2430
 *         """
 *         key = tobytes(key)
 *         return [v for k, v in self.items() if k == key]             # <<<<<<<<<<<<<<
 * 
 *     def to_dict(self):
*/
  __Pyx_XDECREF(__pyx_r);
  { /* enter inner scope */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2430, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = 0;
    if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items");
      __PYX_ERR(1, 2430, __pyx_L5_error)
    }
    __pyx_t_2 = __Pyx_dict_iterator(((PyObject *)__pyx_v_self), 0, __pyx_mstate_global->__pyx_n_u_items, (&__pyx_t_6), (&__pyx_t_7)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2430, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_XDECREF(__pyx_t_3);
    __pyx_t_3 = __pyx_t_2;
    __pyx_t_2 = 0;
    while (1) {
      __pyx_t_9 = __Pyx_dict_iter_next(__pyx_t_3, __pyx_t_6, &__pyx_t_5, &__pyx_t_2, &__pyx_t_8, NULL, __pyx_t_7);
      if (unlikely(__pyx_t_9 == 0)) break;
      if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(1, 2430, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_XDECREF_SET(__pyx_8genexpr6__pyx_v_k, __pyx_t_2);
      __pyx_t_2 = 0;
      __Pyx_XDECREF_SET(__pyx_8genexpr6__pyx_v_v, __pyx_t_8);
      __pyx_t_8 = 0;
      __pyx_t_8 = PyObject_RichCompare(__pyx_8genexpr6__pyx_v_k, __pyx_v_key, Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2430, __pyx_L5_error)
      __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(1, 2430, __pyx_L5_error)
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (__pyx_t_10) {
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_8genexpr6__pyx_v_v))) __PYX_ERR(1, 2430, __pyx_L5_error)
      }
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_8genexpr6__pyx_v_k); __pyx_8genexpr6__pyx_v_k = 0;
    __Pyx_XDECREF(__pyx_8genexpr6__pyx_v_v); __pyx_8genexpr6__pyx_v_v = 0;
    goto __pyx_L9_exit_scope;
    __pyx_L5_error:;
    __Pyx_XDECREF(__pyx_8genexpr6__pyx_v_k); __pyx_8genexpr6__pyx_v_k = 0;
    __Pyx_XDECREF(__pyx_8genexpr6__pyx_v_v); __pyx_8genexpr6__pyx_v_v = 0;
    goto __pyx_L1_error;
    __pyx_L9_exit_scope:;
  } /* exit inner scope */
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":2419
 *             yield (self.metadata.key(i), self.metadata.value(i))
 * 
 *     def get_all(self, key):             # <<<<<<<<<<<<<<
 *         """
 *         Parameters
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("pyarrow.lib.KeyValueMetadata.get_all", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_8genexpr6__pyx_v_k);
  __Pyx_XDECREF(__pyx_8genexpr6__pyx_v_v);
  __Pyx_XDECREF(__pyx_v_key);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":2432
 *         return [v for k, v in self.items() if k == key]
 * 
 *     def to_dict(self):             # <<<<<<<<<<<<<<
 *         """
 *         Convert KeyValueMetadata to dict. If a key occurs twice, the value for
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_16KeyValueMetadata_36to_dict(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_16KeyValueMetadata_35to_dict, "KeyValueMetadata.to_dict(self)\n\nConvert KeyValueMetadata to dict. If a key occurs twice, the value for\nthe first one is returned");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_16KeyValueMetadata_36to_dict = {"to_dict", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_16KeyValueMetadata_36to_dict, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_16KeyValueMetadata_35to_dict};
static PyObject *__pyx_pw_7pyarrow_3lib_16KeyValueMetadata_36to_dict(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("to_dict (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("to_dict", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("to_dict", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7pyarrow_3lib_16KeyValueMetadata_35to_dict(((struct __pyx_obj_7pyarrow_3lib_KeyValueMetadata *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_16KeyValueMetadata_35to_dict(struct __pyx_obj_7pyarrow_3lib_KeyValueMetadata *__pyx_v_self) {
  PyObject *__pyx_v_key = 0;
  PyObject *__pyx_v_result = NULL;
  int64_t __pyx_v_i;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int64_t __pyx_t_5;
  int64_t __pyx_t_6;
  int64_t __pyx_t_7;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("to_dict", 0);

  /* "pyarrow/types.pxi":2438
 *         """
 *         cdef object key  # to force coercion to Python
 *         result = ordered_dict()             # <<<<<<<<<<<<<<
 *         for i in range(self.metadata.size()):
 *             key = self.metadata.key(i)
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ordered_dict); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2438, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2438, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_result = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyarrow/types.pxi":2439
 *         cdef object key  # to force coercion to Python
 *         result = ordered_dict()
 *         for i in range(self.metadata.size()):             # <<<<<<<<<<<<<<
 *             key = self.metadata.key(i)
 *             if key not in result:
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "metadata");
    __PYX_ERR(1, 2439, __pyx_L1_error)
  }
  __pyx_t_5 = __pyx_v_self->metadata->size();
  __pyx_t_6 = __pyx_t_5;
  for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
    __pyx_v_i = __pyx_t_7;

    /* "pyarrow/types.pxi":2440
 *         result = ordered_dict()
 *         for i in range(self.metadata.size()):
 *             key = self.metadata.key(i)             # <<<<<<<<<<<<<<
 *             if key not in result:
 *                 result[key] = self.metadata.value(i)
*/
    if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "metadata");
      __PYX_ERR(1, 2440, __pyx_L1_error)
    }
    __pyx_t_1 = __pyx_convert_PyBytes_string_to_py_6libcpp_6string_std__in_string(__pyx_v_self->metadata->key(__pyx_v_i)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2440, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "pyarrow/types.pxi":2441
 *         for i in range(self.metadata.size()):
 *             key = self.metadata.key(i)
 *             if key not in result:             # <<<<<<<<<<<<<<
 *                 result[key] = self.metadata.value(i)
 *         return result
*/
    __pyx_t_8 = (__Pyx_PySequence_ContainsTF(__pyx_v_key, __pyx_v_result, Py_NE)); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(1, 2441, __pyx_L1_error)
    if (__pyx_t_8) {

      /* "pyarrow/types.pxi":2442
 *             key = self.metadata.key(i)
 *             if key not in result:
 *                 result[key] = self.metadata.value(i)             # <<<<<<<<<<<<<<
 *         return result
 * 
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "metadata");
        __PYX_ERR(1, 2442, __pyx_L1_error)
      }
      __pyx_t_1 = __pyx_convert_PyBytes_string_to_py_6libcpp_6string_std__in_string(__pyx_v_self->metadata->value(__pyx_v_i)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2442, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (unlikely(__pyx_v_result == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(1, 2442, __pyx_L1_error)
      }
      if (unlikely((PyObject_SetItem(__pyx_v_result, __pyx_v_key, __pyx_t_1) < 0))) __PYX_ERR(1, 2442, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "pyarrow/types.pxi":2441
 *         for i in range(self.metadata.size()):
 *             key = self.metadata.key(i)
 *             if key not in result:             # <<<<<<<<<<<<<<
 *                 result[key] = self.metadata.value(i)
 *         return result
*/
    }
  }

  /* "pyarrow/types.pxi":2443
 *             if key not in result:
 *                 result[key] = self.metadata.value(i)
 *         return result             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":2432
 *         return [v for k, v in self.items() if k == key]
 * 
 *     def to_dict(self):             # <<<<<<<<<<<<<<
 *         """
 *         Convert KeyValueMetadata to dict. If a key occurs twice, the value for
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyarrow.lib.KeyValueMetadata.to_dict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_key);
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":2446
 * 
 * 
 * cpdef KeyValueMetadata ensure_metadata(object meta, c_bool allow_none=False):             # <<<<<<<<<<<<<<
 *     if allow_none and meta is None:
 *         return None
*/

static PyObject *__pyx_pw_7pyarrow_3lib_67ensure_metadata(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_7pyarrow_3lib_KeyValueMetadata *__pyx_f_7pyarrow_3lib_ensure_metadata(PyObject *__pyx_v_meta, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_7pyarrow_3lib_ensure_metadata *__pyx_optional_args) {
  bool __pyx_v_allow_none = ((bool)0);
  struct __pyx_obj_7pyarrow_3lib_KeyValueMetadata *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("ensure_metadata", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_allow_none = __pyx_optional_args->allow_none;
    }
  }

  /* "pyarrow/types.pxi":2447
 * 
 * cpdef KeyValueMetadata ensure_metadata(object meta, c_bool allow_none=False):
 *     if allow_none and meta is None:             # <<<<<<<<<<<<<<
 *         return None
 *     elif isinstance(meta, KeyValueMetadata):
*/
  __pyx_t_2 = (__pyx_v_allow_none != 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_meta == Py_None);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "pyarrow/types.pxi":2448
 * cpdef KeyValueMetadata ensure_metadata(object meta, c_bool allow_none=False):
 *     if allow_none and meta is None:
 *         return None             # <<<<<<<<<<<<<<
 *     elif isinstance(meta, KeyValueMetadata):
 *         return meta
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_r = ((struct __pyx_obj_7pyarrow_3lib_KeyValueMetadata *)Py_None); __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "pyarrow/types.pxi":2447
 * 
 * cpdef KeyValueMetadata ensure_metadata(object meta, c_bool allow_none=False):
 *     if allow_none and meta is None:             # <<<<<<<<<<<<<<
 *         return None
 *     elif isinstance(meta, KeyValueMetadata):
*/
  }

  /* "pyarrow/types.pxi":2449
 *     if allow_none and meta is None:
 *         return None
 *     elif isinstance(meta, KeyValueMetadata):             # <<<<<<<<<<<<<<
 *         return meta
 *     else:
*/
  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_meta, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_KeyValueMetadata); 
  if (__pyx_t_1) {

    /* "pyarrow/types.pxi":2450
 *         return None
 *     elif isinstance(meta, KeyValueMetadata):
 *         return meta             # <<<<<<<<<<<<<<
 *     else:
 *         return KeyValueMetadata(meta)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    if (!(likely(((__pyx_v_meta) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_meta, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_KeyValueMetadata))))) __PYX_ERR(1, 2450, __pyx_L1_error)
    __Pyx_INCREF(__pyx_v_meta);
    __pyx_r = ((struct __pyx_obj_7pyarrow_3lib_KeyValueMetadata *)__pyx_v_meta);
    goto __pyx_L0;

    /* "pyarrow/types.pxi":2449
 *     if allow_none and meta is None:
 *         return None
 *     elif isinstance(meta, KeyValueMetadata):             # <<<<<<<<<<<<<<
 *         return meta
 *     else:
*/
  }

  /* "pyarrow/types.pxi":2452
 *         return meta
 *     else:
 *         return KeyValueMetadata(meta)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  /*else*/ {
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_4 = NULL;
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_meta};
      __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_KeyValueMetadata, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2452, __pyx_L1_error)
      __Pyx_GOTREF((PyObject *)__pyx_t_3);
    }
    __pyx_r = ((struct __pyx_obj_7pyarrow_3lib_KeyValueMetadata *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;
  }

  /* "pyarrow/types.pxi":2446
 * 
 * 
 * cpdef KeyValueMetadata ensure_metadata(object meta, c_bool allow_none=False):             # <<<<<<<<<<<<<<
 *     if allow_none and meta is None:
 *         return None
*/

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

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_67ensure_metadata(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_66ensure_metadata, "ensure_metadata(meta, bool allow_none=False) -> KeyValueMetadata");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_67ensure_metadata = {"ensure_metadata", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_67ensure_metadata, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_66ensure_metadata};
static PyObject *__pyx_pw_7pyarrow_3lib_67ensure_metadata(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_meta = 0;
  bool __pyx_v_allow_none;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ensure_metadata (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_meta,&__pyx_mstate_global->__pyx_n_u_allow_none,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 2446, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 2446, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 2446, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "ensure_metadata", 0) < (0)) __PYX_ERR(1, 2446, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("ensure_metadata", 0, 1, 2, i); __PYX_ERR(1, 2446, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 2446, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 2446, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_meta = values[0];
    if (values[1]) {
      __pyx_v_allow_none = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_allow_none == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(1, 2446, __pyx_L3_error)
    } else {
      __pyx_v_allow_none = ((bool)0);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("ensure_metadata", 0, 1, 2, __pyx_nargs); __PYX_ERR(1, 2446, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("pyarrow.lib.ensure_metadata", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyarrow_3lib_66ensure_metadata(__pyx_self, __pyx_v_meta, __pyx_v_allow_none);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7pyarrow_3lib_66ensure_metadata(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_meta, bool __pyx_v_allow_none) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7pyarrow_3lib_ensure_metadata __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("ensure_metadata", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.allow_none = __pyx_v_allow_none;
  __pyx_t_1 = ((PyObject *)__pyx_f_7pyarrow_3lib_ensure_metadata(__pyx_v_meta, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2446, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* "pyarrow/types.pxi":2485
 *     """
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         pass
 * 
*/

/* Python wrapper */
static int __pyx_pw_7pyarrow_3lib_5Field_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_7pyarrow_3lib_5Field_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, __pyx_nargs); return -1; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return -1;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__cinit__", __pyx_kwds); return -1;}
  __pyx_r = __pyx_pf_7pyarrow_3lib_5Field___cinit__(((struct __pyx_obj_7pyarrow_3lib_Field *)__pyx_v_self));

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

static int __pyx_pf_7pyarrow_3lib_5Field___cinit__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_Field *__pyx_v_self) {
  int __pyx_r;

  /* function exit code */
  __pyx_r = 0;
  return __pyx_r;
}

/* "pyarrow/types.pxi":2488
 *         pass
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         raise TypeError("Do not call Field's constructor directly, use "
 *                         "`pyarrow.field` instead.")
*/

/* Python wrapper */
static int __pyx_pw_7pyarrow_3lib_5Field_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_7pyarrow_3lib_5Field_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, __pyx_nargs); return -1; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return -1;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__init__", __pyx_kwds); return -1;}
  __pyx_r = __pyx_pf_7pyarrow_3lib_5Field_2__init__(((struct __pyx_obj_7pyarrow_3lib_Field *)__pyx_v_self));

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

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

  /* "pyarrow/types.pxi":2489
 * 
 *     def __init__(self):
 *         raise TypeError("Do not call Field's constructor directly, use "             # <<<<<<<<<<<<<<
 *                         "`pyarrow.field` instead.")
 * 
*/
  __pyx_t_2 = NULL;
  __pyx_t_3 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Do_not_call_Field_s_constructor};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2489, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2489, __pyx_L1_error)

  /* "pyarrow/types.pxi":2488
 *         pass
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         raise TypeError("Do not call Field's constructor directly, use "
 *                         "`pyarrow.field` instead.")
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pyarrow.lib.Field.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":2492
 *                         "`pyarrow.field` instead.")
 * 
 *     cdef void init(self, const shared_ptr[CField]& field):             # <<<<<<<<<<<<<<
 *         self.sp_field = field
 *         self.field = field.get()
*/

static void __pyx_f_7pyarrow_3lib_5Field_init(struct __pyx_obj_7pyarrow_3lib_Field *__pyx_v_self, std::shared_ptr< arrow::Field>  const &__pyx_v_field) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("init", 0);

  /* "pyarrow/types.pxi":2493
 * 
 *     cdef void init(self, const shared_ptr[CField]& field):
 *         self.sp_field = field             # <<<<<<<<<<<<<<
 *         self.field = field.get()
 *         self.type = pyarrow_wrap_data_type(field.get().type())
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_field");
    __PYX_ERR(1, 2493, __pyx_L1_error)
  }
  __pyx_v_self->sp_field = __pyx_v_field;

  /* "pyarrow/types.pxi":2494
 *     cdef void init(self, const shared_ptr[CField]& field):
 *         self.sp_field = field
 *         self.field = field.get()             # <<<<<<<<<<<<<<
 *         self.type = pyarrow_wrap_data_type(field.get().type())
 * 
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "field");
    __PYX_ERR(1, 2494, __pyx_L1_error)
  }
  __pyx_v_self->field = __pyx_v_field.get();

  /* "pyarrow/types.pxi":2495
 *         self.sp_field = field
 *         self.field = field.get()
 *         self.type = pyarrow_wrap_data_type(field.get().type())             # <<<<<<<<<<<<<<
 * 
 *     def equals(self, Field other, bint check_metadata=False):
*/
  __pyx_t_1 = pyarrow_wrap_data_type(__pyx_v_field.get()->type()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2495, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType))))) __PYX_ERR(1, 2495, __pyx_L1_error)
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "type");
    __PYX_ERR(1, 2495, __pyx_L1_error)
  }
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->type);
  __Pyx_DECREF((PyObject *)__pyx_v_self->type);
  __pyx_v_self->type = ((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyarrow/types.pxi":2492
 *                         "`pyarrow.field` instead.")
 * 
 *     cdef void init(self, const shared_ptr[CField]& field):             # <<<<<<<<<<<<<<
 *         self.sp_field = field
 *         self.field = field.get()
*/

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib.Field.init", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* "pyarrow/types.pxi":2497
 *         self.type = pyarrow_wrap_data_type(field.get().type())
 * 
 *     def equals(self, Field other, bint check_metadata=False):             # <<<<<<<<<<<<<<
 *         """
 *         Test if this field is equal to the other
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_5Field_5equals(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_5Field_4equals, "Field.equals(self, Field other, bool check_metadata=False)\n\nTest if this field is equal to the other\n\nParameters\n----------\nother : pyarrow.Field\ncheck_metadata : bool, default False\n    Whether Field metadata equality should be checked as well.\n\nReturns\n-------\nis_equal : bool\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> f1 = pa.field('key', pa.int32())\n>>> f2 = pa.field('key', pa.int32(), nullable=False)\n>>> f1.equals(f2)\nFalse\n>>> f1.equals(f1)\nTrue");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_5Field_5equals = {"equals", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Field_5equals, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Field_4equals};
static PyObject *__pyx_pw_7pyarrow_3lib_5Field_5equals(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_7pyarrow_3lib_Field *__pyx_v_other = 0;
  int __pyx_v_check_metadata;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("equals (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_other,&__pyx_mstate_global->__pyx_n_u_check_metadata,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 2497, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 2497, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 2497, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "equals", 0) < (0)) __PYX_ERR(1, 2497, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("equals", 0, 1, 2, i); __PYX_ERR(1, 2497, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 2497, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 2497, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_other = ((struct __pyx_obj_7pyarrow_3lib_Field *)values[0]);
    if (values[1]) {
      __pyx_v_check_metadata = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_check_metadata == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 2497, __pyx_L3_error)
    } else {
      __pyx_v_check_metadata = ((int)0);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("equals", 0, 1, 2, __pyx_nargs); __PYX_ERR(1, 2497, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("pyarrow.lib.Field.equals", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Field, 1, "other", 0))) __PYX_ERR(1, 2497, __pyx_L1_error)
  __pyx_r = __pyx_pf_7pyarrow_3lib_5Field_4equals(((struct __pyx_obj_7pyarrow_3lib_Field *)__pyx_v_self), __pyx_v_other, __pyx_v_check_metadata);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7pyarrow_3lib_5Field_4equals(struct __pyx_obj_7pyarrow_3lib_Field *__pyx_v_self, struct __pyx_obj_7pyarrow_3lib_Field *__pyx_v_other, int __pyx_v_check_metadata) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("equals", 0);

  /* "pyarrow/types.pxi":2521
 *         True
 *         """
 *         return self.field.Equals(deref(other.field), check_metadata)             # <<<<<<<<<<<<<<
 * 
 *     def __eq__(self, other):
*/
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "field");
    __PYX_ERR(1, 2521, __pyx_L1_error)
  }
  if (unlikely(((PyObject *)__pyx_v_other) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "field");
    __PYX_ERR(1, 2521, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->field->Equals((*__pyx_v_other->field), __pyx_v_check_metadata)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2521, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":2497
 *         self.type = pyarrow_wrap_data_type(field.get().type())
 * 
 *     def equals(self, Field other, bint check_metadata=False):             # <<<<<<<<<<<<<<
 *         """
 *         Test if this field is equal to the other
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib.Field.equals", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":2523
 *         return self.field.Equals(deref(other.field), check_metadata)
 * 
 *     def __eq__(self, other):             # <<<<<<<<<<<<<<
 *         try:
 *             return self.equals(other)
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_5Field_7__eq__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_5Field_7__eq__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__eq__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_5Field_6__eq__(((struct __pyx_obj_7pyarrow_3lib_Field *)__pyx_v_self), ((PyObject *)__pyx_v_other));

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

static PyObject *__pyx_pf_7pyarrow_3lib_5Field_6__eq__(struct __pyx_obj_7pyarrow_3lib_Field *__pyx_v_self, PyObject *__pyx_v_other) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__eq__", 0);

  /* "pyarrow/types.pxi":2524
 * 
 *     def __eq__(self, other):
 *         try:             # <<<<<<<<<<<<<<
 *             return self.equals(other)
 *         except TypeError:
*/
  {
    __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:*/ {

      /* "pyarrow/types.pxi":2525
 *     def __eq__(self, other):
 *         try:
 *             return self.equals(other)             # <<<<<<<<<<<<<<
 *         except TypeError:
 *             return NotImplemented
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_5 = ((PyObject *)__pyx_v_self);
      __Pyx_INCREF(__pyx_t_5);
      __pyx_t_6 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_other};
        __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_equals, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2525, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_4);
      }
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L7_try_return;

      /* "pyarrow/types.pxi":2524
 * 
 *     def __eq__(self, other):
 *         try:             # <<<<<<<<<<<<<<
 *             return self.equals(other)
 *         except TypeError:
*/
    }
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "pyarrow/types.pxi":2526
 *         try:
 *             return self.equals(other)
 *         except TypeError:             # <<<<<<<<<<<<<<
 *             return NotImplemented
 * 
*/
    __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_TypeError))));
    if (__pyx_t_7) {
      __Pyx_AddTraceback("pyarrow.lib.Field.__eq__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_8) < 0) __PYX_ERR(1, 2526, __pyx_L5_except_error)
      __Pyx_XGOTREF(__pyx_t_4);
      __Pyx_XGOTREF(__pyx_t_5);
      __Pyx_XGOTREF(__pyx_t_8);

      /* "pyarrow/types.pxi":2527
 *             return self.equals(other)
 *         except TypeError:
 *             return NotImplemented             # <<<<<<<<<<<<<<
 * 
 *     def __reduce__(self):
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_builtin_NotImplemented);
      __pyx_r = __pyx_builtin_NotImplemented;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      goto __pyx_L6_except_return;
    }
    goto __pyx_L5_except_error;

    /* "pyarrow/types.pxi":2524
 * 
 *     def __eq__(self, other):
 *         try:             # <<<<<<<<<<<<<<
 *             return self.equals(other)
 *         except TypeError:
*/
    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L7_try_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
    __pyx_L6_except_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
  }

  /* "pyarrow/types.pxi":2523
 *         return self.field.Equals(deref(other.field), check_metadata)
 * 
 *     def __eq__(self, other):             # <<<<<<<<<<<<<<
 *         try:
 *             return self.equals(other)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("pyarrow.lib.Field.__eq__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":2529
 *             return NotImplemented
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         return field, (self.name, self.type, self.nullable, self.metadata)
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_5Field_9__reduce__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_5Field_8__reduce__, "Field.__reduce__(self)");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_5Field_9__reduce__ = {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Field_9__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Field_8__reduce__};
static PyObject *__pyx_pw_7pyarrow_3lib_5Field_9__reduce__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7pyarrow_3lib_5Field_8__reduce__(((struct __pyx_obj_7pyarrow_3lib_Field *)__pyx_v_self));

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

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

  /* "pyarrow/types.pxi":2530
 * 
 *     def __reduce__(self):
 *         return field, (self.name, self.type, self.nullable, self.metadata)             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_field); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2530, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2530, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "type");
    __PYX_ERR(1, 2530, __pyx_L1_error)
  }
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_nullable); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2530, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_metadata); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2530, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2530, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2) != (0)) __PYX_ERR(1, 2530, __pyx_L1_error);
  __Pyx_INCREF((PyObject *)__pyx_v_self->type);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self->type);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_self->type)) != (0)) __PYX_ERR(1, 2530, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_3) != (0)) __PYX_ERR(1, 2530, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_4);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_4) != (0)) __PYX_ERR(1, 2530, __pyx_L1_error);
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2530, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1) != (0)) __PYX_ERR(1, 2530, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_5);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_5) != (0)) __PYX_ERR(1, 2530, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":2529
 *             return NotImplemented
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         return field, (self.name, self.type, self.nullable, self.metadata)
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pyarrow.lib.Field.__reduce__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":2532
 *         return field, (self.name, self.type, self.nullable, self.metadata)
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return f'pyarrow.Field<{frombytes(self.field.ToString(), safe=True)}>'
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_5Field_11__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_5Field_11__str__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_5Field_10__str__(((struct __pyx_obj_7pyarrow_3lib_Field *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_5Field_10__str__(struct __pyx_obj_7pyarrow_3lib_Field *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5[3];
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__str__", 0);

  /* "pyarrow/types.pxi":2533
 * 
 *     def __str__(self):
 *         return f'pyarrow.Field<{frombytes(self.field.ToString(), safe=True)}>'             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_frombytes); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2533, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "field");
    __PYX_ERR(1, 2533, __pyx_L1_error)
  }
  __pyx_t_2 = __pyx_convert_PyBytes_string_to_py_6libcpp_6string_std__in_string(__pyx_v_self->field->ToString()); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2533, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2533, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2) != (0)) __PYX_ERR(1, 2533, __pyx_L1_error);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2533, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_safe, Py_True) < (0)) __PYX_ERR(1, 2533, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2533, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2533, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_5[0] = __pyx_mstate_global->__pyx_kp_u_pyarrow_Field;
  __pyx_t_5[1] = __pyx_t_2;
  __pyx_t_5[2] = __pyx_mstate_global->__pyx_kp_u__5;
  __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_5, 3, 14 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2));
  if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2533, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":2532
 *         return field, (self.name, self.type, self.nullable, self.metadata)
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return f'pyarrow.Field<{frombytes(self.field.ToString(), safe=True)}>'
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pyarrow.lib.Field.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":2535
 *         return f'pyarrow.Field<{frombytes(self.field.ToString(), safe=True)}>'
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_5Field_13__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_5Field_13__repr__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_5Field_12__repr__(((struct __pyx_obj_7pyarrow_3lib_Field *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_5Field_12__repr__(struct __pyx_obj_7pyarrow_3lib_Field *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  size_t __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);

  /* "pyarrow/types.pxi":2536
 * 
 *     def __repr__(self):
 *         return self.__str__()             # <<<<<<<<<<<<<<
 * 
 *     def __hash__(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_str, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2536, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":2535
 *         return f'pyarrow.Field<{frombytes(self.field.ToString(), safe=True)}>'
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pyarrow.lib.Field.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":2538
 *         return self.__str__()
 * 
 *     def __hash__(self):             # <<<<<<<<<<<<<<
 *         return hash((self.field.name(), self.type, self.field.nullable()))
 * 
*/

/* Python wrapper */
static Py_hash_t __pyx_pw_7pyarrow_3lib_5Field_15__hash__(PyObject *__pyx_v_self); /*proto*/
static Py_hash_t __pyx_pw_7pyarrow_3lib_5Field_15__hash__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  Py_hash_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__hash__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_5Field_14__hash__(((struct __pyx_obj_7pyarrow_3lib_Field *)__pyx_v_self));

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

static Py_hash_t __pyx_pf_7pyarrow_3lib_5Field_14__hash__(struct __pyx_obj_7pyarrow_3lib_Field *__pyx_v_self) {
  Py_hash_t __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_hash_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__hash__", 0);

  /* "pyarrow/types.pxi":2539
 * 
 *     def __hash__(self):
 *         return hash((self.field.name(), self.type, self.field.nullable()))             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "field");
    __PYX_ERR(1, 2539, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_convert_PyBytes_string_to_py_6libcpp_6string_std__in_string(__pyx_v_self->field->name()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2539, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "type");
    __PYX_ERR(1, 2539, __pyx_L1_error)
  }
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "field");
    __PYX_ERR(1, 2539, __pyx_L1_error)
  }
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_self->field->nullable()); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2539, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2539, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1) != (0)) __PYX_ERR(1, 2539, __pyx_L1_error);
  __Pyx_INCREF((PyObject *)__pyx_v_self->type);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self->type);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_self->type)) != (0)) __PYX_ERR(1, 2539, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2) != (0)) __PYX_ERR(1, 2539, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_4 = PyObject_Hash(__pyx_t_3); if (unlikely(__pyx_t_4 == ((Py_hash_t)-1))) __PYX_ERR(1, 2539, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_4;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":2538
 *         return self.__str__()
 * 
 *     def __hash__(self):             # <<<<<<<<<<<<<<
 *         return hash((self.field.name(), self.type, self.field.nullable()))
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyarrow.lib.Field.__hash__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  if (unlikely(__pyx_r == -1) && !PyErr_Occurred()) __pyx_r = -2;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":2541
 *         return hash((self.field.name(), self.type, self.field.nullable()))
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def nullable(self):
 *         """
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_5Field_8nullable_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_5Field_8nullable_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_5Field_8nullable___get__(((struct __pyx_obj_7pyarrow_3lib_Field *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_5Field_8nullable___get__(struct __pyx_obj_7pyarrow_3lib_Field *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyarrow/types.pxi":2556
 *         False
 *         """
 *         return self.field.nullable()             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "field");
    __PYX_ERR(1, 2556, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->field->nullable()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2556, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":2541
 *         return hash((self.field.name(), self.type, self.field.nullable()))
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def nullable(self):
 *         """
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib.Field.nullable.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":2558
 *         return self.field.nullable()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def name(self):
 *         """
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_5Field_4name_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_5Field_4name_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_5Field_4name___get__(((struct __pyx_obj_7pyarrow_3lib_Field *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_5Field_4name___get__(struct __pyx_obj_7pyarrow_3lib_Field *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyarrow/types.pxi":2570
 *         'key'
 *         """
 *         return frombytes(self.field.name())             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_frombytes); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2570, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "field");
    __PYX_ERR(1, 2570, __pyx_L1_error)
  }
  __pyx_t_4 = __pyx_convert_PyBytes_string_to_py_6libcpp_6string_std__in_string(__pyx_v_self->field->name()); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2570, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2570, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":2558
 *         return self.field.nullable()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def name(self):
 *         """
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pyarrow.lib.Field.name.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":2572
 *         return frombytes(self.field.name())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def metadata(self):
 *         """
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_5Field_8metadata_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_5Field_8metadata_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_5Field_8metadata___get__(((struct __pyx_obj_7pyarrow_3lib_Field *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_5Field_8metadata___get__(struct __pyx_obj_7pyarrow_3lib_Field *__pyx_v_self) {
  PyObject *__pyx_v_wrapped = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyarrow/types.pxi":2589
 *         {b'key': b'Something important'}
 *         """
 *         wrapped = pyarrow_wrap_metadata(self.field.metadata())             # <<<<<<<<<<<<<<
 *         if wrapped is not None:
 *             return wrapped.to_dict()
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "field");
    __PYX_ERR(1, 2589, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_7pyarrow_3lib_pyarrow_wrap_metadata(__pyx_v_self->field->metadata()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2589, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_wrapped = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyarrow/types.pxi":2590
 *         """
 *         wrapped = pyarrow_wrap_metadata(self.field.metadata())
 *         if wrapped is not None:             # <<<<<<<<<<<<<<
 *             return wrapped.to_dict()
 *         else:
*/
  __pyx_t_2 = (__pyx_v_wrapped != Py_None);
  if (__pyx_t_2) {

    /* "pyarrow/types.pxi":2591
 *         wrapped = pyarrow_wrap_metadata(self.field.metadata())
 *         if wrapped is not None:
 *             return wrapped.to_dict()             # <<<<<<<<<<<<<<
 *         else:
 *             return wrapped
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __pyx_v_wrapped;
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_4 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
      __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_to_dict, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2591, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "pyarrow/types.pxi":2590
 *         """
 *         wrapped = pyarrow_wrap_metadata(self.field.metadata())
 *         if wrapped is not None:             # <<<<<<<<<<<<<<
 *             return wrapped.to_dict()
 *         else:
*/
  }

  /* "pyarrow/types.pxi":2593
 *             return wrapped.to_dict()
 *         else:
 *             return wrapped             # <<<<<<<<<<<<<<
 * 
 *     def with_metadata(self, metadata):
*/
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_wrapped);
    __pyx_r = __pyx_v_wrapped;
    goto __pyx_L0;
  }

  /* "pyarrow/types.pxi":2572
 *         return frombytes(self.field.name())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def metadata(self):
 *         """
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyarrow.lib.Field.metadata.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_wrapped);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":2595
 *             return wrapped
 * 
 *     def with_metadata(self, metadata):             # <<<<<<<<<<<<<<
 *         """
 *         Add metadata as dict of string keys and values to Field
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_5Field_17with_metadata(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_5Field_16with_metadata, "Field.with_metadata(self, metadata)\n\nAdd metadata as dict of string keys and values to Field\n\nParameters\n----------\nmetadata : dict\n    Keys and values must be string-like / coercible to bytes\n\nReturns\n-------\nfield : pyarrow.Field\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> field = pa.field('key', pa.int32())\n\nCreate new field by adding metadata to existing one:\n\n>>> field_new = field.with_metadata({\"key\": \"Something important\"})\n>>> field_new\npyarrow.Field<key: int32>\n>>> field_new.metadata\n{b'key': b'Something important'}");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_5Field_17with_metadata = {"with_metadata", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Field_17with_metadata, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Field_16with_metadata};
static PyObject *__pyx_pw_7pyarrow_3lib_5Field_17with_metadata(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_metadata = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("with_metadata (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_metadata,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 2595, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 2595, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "with_metadata", 0) < (0)) __PYX_ERR(1, 2595, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("with_metadata", 1, 1, 1, i); __PYX_ERR(1, 2595, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 2595, __pyx_L3_error)
    }
    __pyx_v_metadata = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("with_metadata", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 2595, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("pyarrow.lib.Field.with_metadata", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyarrow_3lib_5Field_16with_metadata(((struct __pyx_obj_7pyarrow_3lib_Field *)__pyx_v_self), __pyx_v_metadata);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7pyarrow_3lib_5Field_16with_metadata(struct __pyx_obj_7pyarrow_3lib_Field *__pyx_v_self, PyObject *__pyx_v_metadata) {
  std::shared_ptr< arrow::Field>  __pyx_v_c_field;
  struct __pyx_obj_7pyarrow_3lib_KeyValueMetadata *__pyx_v_meta = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7pyarrow_3lib_ensure_metadata __pyx_t_2;
  std::shared_ptr< arrow::KeyValueMetadata const >  __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("with_metadata", 0);

  /* "pyarrow/types.pxi":2623
 *         cdef shared_ptr[CField] c_field
 * 
 *         meta = ensure_metadata(metadata, allow_none=False)             # <<<<<<<<<<<<<<
 *         with nogil:
 *             c_field = self.field.WithMetadata(meta.unwrap())
*/
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.allow_none = 0;
  __pyx_t_1 = ((PyObject *)__pyx_f_7pyarrow_3lib_ensure_metadata(__pyx_v_metadata, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2623, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_meta = ((struct __pyx_obj_7pyarrow_3lib_KeyValueMetadata *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyarrow/types.pxi":2624
 * 
 *         meta = ensure_metadata(metadata, allow_none=False)
 *         with nogil:             # <<<<<<<<<<<<<<
 *             c_field = self.field.WithMetadata(meta.unwrap())
 * 
*/
  {
      PyThreadState * _save;
      _save = PyEval_SaveThread();
      __Pyx_FastGIL_Remember();
      /*try:*/ {

        /* "pyarrow/types.pxi":2625
 *         meta = ensure_metadata(metadata, allow_none=False)
 *         with nogil:
 *             c_field = self.field.WithMetadata(meta.unwrap())             # <<<<<<<<<<<<<<
 * 
 *         return pyarrow_wrap_field(c_field)
*/
        if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "field");
          __Pyx_PyGILState_Release(__pyx_gilstate_save);
          __PYX_ERR(1, 2625, __pyx_L4_error)
        }
        if (unlikely(((PyObject *)__pyx_v_meta) == Py_None)) {
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "unwrap");
          __Pyx_PyGILState_Release(__pyx_gilstate_save);
          __PYX_ERR(1, 2625, __pyx_L4_error)
        }
        __pyx_t_3 = __pyx_f_7pyarrow_3lib_16KeyValueMetadata_unwrap(__pyx_v_meta); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 2625, __pyx_L4_error)
        __pyx_v_c_field = __pyx_v_self->field->WithMetadata(__pyx_t_3);
      }

      /* "pyarrow/types.pxi":2624
 * 
 *         meta = ensure_metadata(metadata, allow_none=False)
 *         with nogil:             # <<<<<<<<<<<<<<
 *             c_field = self.field.WithMetadata(meta.unwrap())
 * 
*/
      /*finally:*/ {
        /*normal exit:*/{
          __Pyx_FastGIL_Forget();
          PyEval_RestoreThread(_save);
          goto __pyx_L5;
        }
        __pyx_L4_error: {
          __Pyx_FastGIL_Forget();
          PyEval_RestoreThread(_save);
          goto __pyx_L1_error;
        }
        __pyx_L5:;
      }
  }

  /* "pyarrow/types.pxi":2627
 *             c_field = self.field.WithMetadata(meta.unwrap())
 * 
 *         return pyarrow_wrap_field(c_field)             # <<<<<<<<<<<<<<
 * 
 *     def remove_metadata(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = pyarrow_wrap_field(__pyx_v_c_field); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2627, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":2595
 *             return wrapped
 * 
 *     def with_metadata(self, metadata):             # <<<<<<<<<<<<<<
 *         """
 *         Add metadata as dict of string keys and values to Field
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib.Field.with_metadata", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_meta);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":2629
 *         return pyarrow_wrap_field(c_field)
 * 
 *     def remove_metadata(self):             # <<<<<<<<<<<<<<
 *         """
 *         Create new field without metadata, if any
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_5Field_19remove_metadata(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_5Field_18remove_metadata, "Field.remove_metadata(self)\n\nCreate new field without metadata, if any\n\nReturns\n-------\nfield : pyarrow.Field\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> field = pa.field('key', pa.int32(),\n...                  metadata={\"key\": \"Something important\"})\n>>> field.metadata\n{b'key': b'Something important'}\n\nCreate new field by removing the metadata from the existing one:\n\n>>> field_new = field.remove_metadata()\n>>> field_new.metadata");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_5Field_19remove_metadata = {"remove_metadata", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Field_19remove_metadata, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Field_18remove_metadata};
static PyObject *__pyx_pw_7pyarrow_3lib_5Field_19remove_metadata(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("remove_metadata (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("remove_metadata", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("remove_metadata", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7pyarrow_3lib_5Field_18remove_metadata(((struct __pyx_obj_7pyarrow_3lib_Field *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_5Field_18remove_metadata(struct __pyx_obj_7pyarrow_3lib_Field *__pyx_v_self) {
  std::shared_ptr< arrow::Field>  __pyx_v_new_field;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("remove_metadata", 0);

  /* "pyarrow/types.pxi":2651
 *         """
 *         cdef shared_ptr[CField] new_field
 *         with nogil:             # <<<<<<<<<<<<<<
 *             new_field = self.field.RemoveMetadata()
 *         return pyarrow_wrap_field(new_field)
*/
  {
      PyThreadState * _save;
      _save = PyEval_SaveThread();
      __Pyx_FastGIL_Remember();
      /*try:*/ {

        /* "pyarrow/types.pxi":2652
 *         cdef shared_ptr[CField] new_field
 *         with nogil:
 *             new_field = self.field.RemoveMetadata()             # <<<<<<<<<<<<<<
 *         return pyarrow_wrap_field(new_field)
 * 
*/
        if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "field");
          __Pyx_PyGILState_Release(__pyx_gilstate_save);
          __PYX_ERR(1, 2652, __pyx_L4_error)
        }
        __pyx_v_new_field = __pyx_v_self->field->RemoveMetadata();
      }

      /* "pyarrow/types.pxi":2651
 *         """
 *         cdef shared_ptr[CField] new_field
 *         with nogil:             # <<<<<<<<<<<<<<
 *             new_field = self.field.RemoveMetadata()
 *         return pyarrow_wrap_field(new_field)
*/
      /*finally:*/ {
        /*normal exit:*/{
          __Pyx_FastGIL_Forget();
          PyEval_RestoreThread(_save);
          goto __pyx_L5;
        }
        __pyx_L4_error: {
          __Pyx_FastGIL_Forget();
          PyEval_RestoreThread(_save);
          goto __pyx_L1_error;
        }
        __pyx_L5:;
      }
  }

  /* "pyarrow/types.pxi":2653
 *         with nogil:
 *             new_field = self.field.RemoveMetadata()
 *         return pyarrow_wrap_field(new_field)             # <<<<<<<<<<<<<<
 * 
 *     def with_type(self, DataType new_type):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = pyarrow_wrap_field(__pyx_v_new_field); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2653, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":2629
 *         return pyarrow_wrap_field(c_field)
 * 
 *     def remove_metadata(self):             # <<<<<<<<<<<<<<
 *         """
 *         Create new field without metadata, if any
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib.Field.remove_metadata", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":2655
 *         return pyarrow_wrap_field(new_field)
 * 
 *     def with_type(self, DataType new_type):             # <<<<<<<<<<<<<<
 *         """
 *         A copy of this field with the replaced type
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_5Field_21with_type(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_5Field_20with_type, "Field.with_type(self, DataType new_type)\n\nA copy of this field with the replaced type\n\nParameters\n----------\nnew_type : pyarrow.DataType\n\nReturns\n-------\nfield : pyarrow.Field\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> field = pa.field('key', pa.int32())\n>>> field\npyarrow.Field<key: int32>\n\nCreate new field by replacing type of an existing one:\n\n>>> field_new = field.with_type(pa.int64())\n>>> field_new\npyarrow.Field<key: int64>");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_5Field_21with_type = {"with_type", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Field_21with_type, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Field_20with_type};
static PyObject *__pyx_pw_7pyarrow_3lib_5Field_21with_type(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v_new_type = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("with_type (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_new_type,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 2655, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 2655, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "with_type", 0) < (0)) __PYX_ERR(1, 2655, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("with_type", 1, 1, 1, i); __PYX_ERR(1, 2655, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 2655, __pyx_L3_error)
    }
    __pyx_v_new_type = ((struct __pyx_obj_7pyarrow_3lib_DataType *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("with_type", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 2655, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("pyarrow.lib.Field.with_type", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_new_type), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType, 1, "new_type", 0))) __PYX_ERR(1, 2655, __pyx_L1_error)
  __pyx_r = __pyx_pf_7pyarrow_3lib_5Field_20with_type(((struct __pyx_obj_7pyarrow_3lib_Field *)__pyx_v_self), __pyx_v_new_type);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7pyarrow_3lib_5Field_20with_type(struct __pyx_obj_7pyarrow_3lib_Field *__pyx_v_self, struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v_new_type) {
  std::shared_ptr< arrow::Field>  __pyx_v_c_field;
  std::shared_ptr< arrow::DataType>  __pyx_v_c_datatype;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  std::shared_ptr< arrow::DataType>  __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("with_type", 0);

  /* "pyarrow/types.pxi":2684
 *             shared_ptr[CDataType] c_datatype
 * 
 *         c_datatype = pyarrow_unwrap_data_type(new_type)             # <<<<<<<<<<<<<<
 *         with nogil:
 *             c_field = self.field.WithType(c_datatype)
*/
  __pyx_t_1 = pyarrow_unwrap_data_type(((PyObject *)__pyx_v_new_type)); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 2684, __pyx_L1_error)
  __pyx_v_c_datatype = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_1);

  /* "pyarrow/types.pxi":2685
 * 
 *         c_datatype = pyarrow_unwrap_data_type(new_type)
 *         with nogil:             # <<<<<<<<<<<<<<
 *             c_field = self.field.WithType(c_datatype)
 * 
*/
  {
      PyThreadState * _save;
      _save = PyEval_SaveThread();
      __Pyx_FastGIL_Remember();
      /*try:*/ {

        /* "pyarrow/types.pxi":2686
 *         c_datatype = pyarrow_unwrap_data_type(new_type)
 *         with nogil:
 *             c_field = self.field.WithType(c_datatype)             # <<<<<<<<<<<<<<
 * 
 *         return pyarrow_wrap_field(c_field)
*/
        if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "field");
          __Pyx_PyGILState_Release(__pyx_gilstate_save);
          __PYX_ERR(1, 2686, __pyx_L4_error)
        }
        __pyx_v_c_field = __pyx_v_self->field->WithType(__pyx_v_c_datatype);
      }

      /* "pyarrow/types.pxi":2685
 * 
 *         c_datatype = pyarrow_unwrap_data_type(new_type)
 *         with nogil:             # <<<<<<<<<<<<<<
 *             c_field = self.field.WithType(c_datatype)
 * 
*/
      /*finally:*/ {
        /*normal exit:*/{
          __Pyx_FastGIL_Forget();
          PyEval_RestoreThread(_save);
          goto __pyx_L5;
        }
        __pyx_L4_error: {
          __Pyx_FastGIL_Forget();
          PyEval_RestoreThread(_save);
          goto __pyx_L1_error;
        }
        __pyx_L5:;
      }
  }

  /* "pyarrow/types.pxi":2688
 *             c_field = self.field.WithType(c_datatype)
 * 
 *         return pyarrow_wrap_field(c_field)             # <<<<<<<<<<<<<<
 * 
 *     def with_name(self, name):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = pyarrow_wrap_field(__pyx_v_c_field); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2688, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":2655
 *         return pyarrow_wrap_field(new_field)
 * 
 *     def with_type(self, DataType new_type):             # <<<<<<<<<<<<<<
 *         """
 *         A copy of this field with the replaced type
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pyarrow.lib.Field.with_type", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":2690
 *         return pyarrow_wrap_field(c_field)
 * 
 *     def with_name(self, name):             # <<<<<<<<<<<<<<
 *         """
 *         A copy of this field with the replaced name
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_5Field_23with_name(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_5Field_22with_name, "Field.with_name(self, name)\n\nA copy of this field with the replaced name\n\nParameters\n----------\nname : str\n\nReturns\n-------\nfield : pyarrow.Field\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> field = pa.field('key', pa.int32())\n>>> field\npyarrow.Field<key: int32>\n\nCreate new field by replacing the name of an existing one:\n\n>>> field_new = field.with_name('lock')\n>>> field_new\npyarrow.Field<lock: int32>");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_5Field_23with_name = {"with_name", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Field_23with_name, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Field_22with_name};
static PyObject *__pyx_pw_7pyarrow_3lib_5Field_23with_name(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_name = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("with_name (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_name,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 2690, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 2690, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "with_name", 0) < (0)) __PYX_ERR(1, 2690, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("with_name", 1, 1, 1, i); __PYX_ERR(1, 2690, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 2690, __pyx_L3_error)
    }
    __pyx_v_name = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("with_name", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 2690, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("pyarrow.lib.Field.with_name", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyarrow_3lib_5Field_22with_name(((struct __pyx_obj_7pyarrow_3lib_Field *)__pyx_v_self), __pyx_v_name);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7pyarrow_3lib_5Field_22with_name(struct __pyx_obj_7pyarrow_3lib_Field *__pyx_v_self, PyObject *__pyx_v_name) {
  std::shared_ptr< arrow::Field>  __pyx_v_c_field;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  std::string __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("with_name", 0);

  /* "pyarrow/types.pxi":2718
 *             shared_ptr[CField] c_field
 * 
 *         c_field = self.field.WithName(tobytes(name))             # <<<<<<<<<<<<<<
 * 
 *         return pyarrow_wrap_field(c_field)
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "field");
    __PYX_ERR(1, 2718, __pyx_L1_error)
  }
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_tobytes); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2718, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_name};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2718, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_t_5 = __pyx_convert_string_from_py_6libcpp_6string_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 2718, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_c_field = __pyx_v_self->field->WithName(__pyx_t_5);

  /* "pyarrow/types.pxi":2720
 *         c_field = self.field.WithName(tobytes(name))
 * 
 *         return pyarrow_wrap_field(c_field)             # <<<<<<<<<<<<<<
 * 
 *     def with_nullable(self, nullable):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = pyarrow_wrap_field(__pyx_v_c_field); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2720, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":2690
 *         return pyarrow_wrap_field(c_field)
 * 
 *     def with_name(self, name):             # <<<<<<<<<<<<<<
 *         """
 *         A copy of this field with the replaced name
*/

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

/* "pyarrow/types.pxi":2722
 *         return pyarrow_wrap_field(c_field)
 * 
 *     def with_nullable(self, nullable):             # <<<<<<<<<<<<<<
 *         """
 *         A copy of this field with the replaced nullability
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_5Field_25with_nullable(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_5Field_24with_nullable, "Field.with_nullable(self, nullable)\n\nA copy of this field with the replaced nullability\n\nParameters\n----------\nnullable : bool\n\nReturns\n-------\nfield: pyarrow.Field\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> field = pa.field('key', pa.int32())\n>>> field\npyarrow.Field<key: int32>\n>>> field.nullable\nTrue\n\nCreate new field by replacing the nullability of an existing one:\n\n>>> field_new = field.with_nullable(False)\n>>> field_new\npyarrow.Field<key: int32 not null>\n>>> field_new.nullable\nFalse");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_5Field_25with_nullable = {"with_nullable", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Field_25with_nullable, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Field_24with_nullable};
static PyObject *__pyx_pw_7pyarrow_3lib_5Field_25with_nullable(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_nullable = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("with_nullable (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_nullable,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 2722, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 2722, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "with_nullable", 0) < (0)) __PYX_ERR(1, 2722, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("with_nullable", 1, 1, 1, i); __PYX_ERR(1, 2722, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 2722, __pyx_L3_error)
    }
    __pyx_v_nullable = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("with_nullable", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 2722, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("pyarrow.lib.Field.with_nullable", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyarrow_3lib_5Field_24with_nullable(((struct __pyx_obj_7pyarrow_3lib_Field *)__pyx_v_self), __pyx_v_nullable);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7pyarrow_3lib_5Field_24with_nullable(struct __pyx_obj_7pyarrow_3lib_Field *__pyx_v_self, PyObject *__pyx_v_nullable) {
  bool __pyx_v_c_nullable;
  std::shared_ptr< arrow::Field>  __pyx_v_c_field;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("with_nullable", 0);

  /* "pyarrow/types.pxi":2755
 *             c_bool c_nullable
 * 
 *         c_nullable = bool(nullable)             # <<<<<<<<<<<<<<
 *         with nogil:
 *             c_field = self.field.WithNullable(c_nullable)
*/
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_nullable); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 2755, __pyx_L1_error)
  __pyx_v_c_nullable = (!(!__pyx_t_1));

  /* "pyarrow/types.pxi":2756
 * 
 *         c_nullable = bool(nullable)
 *         with nogil:             # <<<<<<<<<<<<<<
 *             c_field = self.field.WithNullable(c_nullable)
 * 
*/
  {
      PyThreadState * _save;
      _save = PyEval_SaveThread();
      __Pyx_FastGIL_Remember();
      /*try:*/ {

        /* "pyarrow/types.pxi":2757
 *         c_nullable = bool(nullable)
 *         with nogil:
 *             c_field = self.field.WithNullable(c_nullable)             # <<<<<<<<<<<<<<
 * 
 *         return pyarrow_wrap_field(c_field)
*/
        if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "field");
          __Pyx_PyGILState_Release(__pyx_gilstate_save);
          __PYX_ERR(1, 2757, __pyx_L4_error)
        }
        __pyx_v_c_field = __pyx_v_self->field->WithNullable(__pyx_v_c_nullable);
      }

      /* "pyarrow/types.pxi":2756
 * 
 *         c_nullable = bool(nullable)
 *         with nogil:             # <<<<<<<<<<<<<<
 *             c_field = self.field.WithNullable(c_nullable)
 * 
*/
      /*finally:*/ {
        /*normal exit:*/{
          __Pyx_FastGIL_Forget();
          PyEval_RestoreThread(_save);
          goto __pyx_L5;
        }
        __pyx_L4_error: {
          __Pyx_FastGIL_Forget();
          PyEval_RestoreThread(_save);
          goto __pyx_L1_error;
        }
        __pyx_L5:;
      }
  }

  /* "pyarrow/types.pxi":2759
 *             c_field = self.field.WithNullable(c_nullable)
 * 
 *         return pyarrow_wrap_field(c_field)             # <<<<<<<<<<<<<<
 * 
 *     def flatten(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = pyarrow_wrap_field(__pyx_v_c_field); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2759, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":2722
 *         return pyarrow_wrap_field(c_field)
 * 
 *     def with_nullable(self, nullable):             # <<<<<<<<<<<<<<
 *         """
 *         A copy of this field with the replaced nullability
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pyarrow.lib.Field.with_nullable", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":2761
 *         return pyarrow_wrap_field(c_field)
 * 
 *     def flatten(self):             # <<<<<<<<<<<<<<
 *         """
 *         Flatten this field.  If a struct field, individual child fields
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_5Field_27flatten(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_5Field_26flatten, "Field.flatten(self)\n\nFlatten this field.  If a struct field, individual child fields\nwill be returned with their names prefixed by the parent's name.\n\nReturns\n-------\nfields : List[pyarrow.Field]\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> f1 = pa.field('bar', pa.float64(), nullable=False)\n>>> f2 = pa.field('foo', pa.int32()).with_metadata({\"key\": \"Something important\"})\n>>> ff = pa.field('ff', pa.struct([f1, f2]), nullable=False)\n\nFlatten a struct field:\n\n>>> ff\npyarrow.Field<ff: struct<bar: double not null, foo: int32> not null>\n>>> ff.flatten()\n[pyarrow.Field<ff.bar: double not null>, pyarrow.Field<ff.foo: int32>]");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_5Field_27flatten = {"flatten", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Field_27flatten, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Field_26flatten};
static PyObject *__pyx_pw_7pyarrow_3lib_5Field_27flatten(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("flatten (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("flatten", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("flatten", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7pyarrow_3lib_5Field_26flatten(((struct __pyx_obj_7pyarrow_3lib_Field *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_5Field_26flatten(struct __pyx_obj_7pyarrow_3lib_Field *__pyx_v_self) {
  std::vector<std::shared_ptr< arrow::Field> >  __pyx_v_flattened;
  std::shared_ptr< arrow::Field>  __pyx_8genexpr7__pyx_v_f;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  std::vector<std::shared_ptr< arrow::Field> > ::iterator __pyx_t_2;
  std::shared_ptr< arrow::Field>  __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("flatten", 0);

  /* "pyarrow/types.pxi":2785
 *         """
 *         cdef vector[shared_ptr[CField]] flattened
 *         with nogil:             # <<<<<<<<<<<<<<
 *             flattened = self.field.Flatten()
 *         return [pyarrow_wrap_field(f) for f in flattened]
*/
  {
      PyThreadState * _save;
      _save = PyEval_SaveThread();
      __Pyx_FastGIL_Remember();
      /*try:*/ {

        /* "pyarrow/types.pxi":2786
 *         cdef vector[shared_ptr[CField]] flattened
 *         with nogil:
 *             flattened = self.field.Flatten()             # <<<<<<<<<<<<<<
 *         return [pyarrow_wrap_field(f) for f in flattened]
 * 
*/
        if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "field");
          __Pyx_PyGILState_Release(__pyx_gilstate_save);
          __PYX_ERR(1, 2786, __pyx_L4_error)
        }
        __pyx_v_flattened = __pyx_v_self->field->Flatten();
      }

      /* "pyarrow/types.pxi":2785
 *         """
 *         cdef vector[shared_ptr[CField]] flattened
 *         with nogil:             # <<<<<<<<<<<<<<
 *             flattened = self.field.Flatten()
 *         return [pyarrow_wrap_field(f) for f in flattened]
*/
      /*finally:*/ {
        /*normal exit:*/{
          __Pyx_FastGIL_Forget();
          PyEval_RestoreThread(_save);
          goto __pyx_L5;
        }
        __pyx_L4_error: {
          __Pyx_FastGIL_Forget();
          PyEval_RestoreThread(_save);
          goto __pyx_L1_error;
        }
        __pyx_L5:;
      }
  }

  /* "pyarrow/types.pxi":2787
 *         with nogil:
 *             flattened = self.field.Flatten()
 *         return [pyarrow_wrap_field(f) for f in flattened]             # <<<<<<<<<<<<<<
 * 
 *     def _export_to_c(self, out_ptr):
*/
  __Pyx_XDECREF(__pyx_r);
  { /* enter inner scope */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2787, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __pyx_v_flattened.begin();
    for (; __pyx_t_2 != __pyx_v_flattened.end(); ++__pyx_t_2) {
      __pyx_t_3 = *__pyx_t_2;
      __pyx_8genexpr7__pyx_v_f = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_3);
      __pyx_t_4 = pyarrow_wrap_field(__pyx_8genexpr7__pyx_v_f); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2787, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_4))) __PYX_ERR(1, 2787, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  } /* exit inner scope */
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":2761
 *         return pyarrow_wrap_field(c_field)
 * 
 *     def flatten(self):             # <<<<<<<<<<<<<<
 *         """
 *         Flatten this field.  If a struct field, individual child fields
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pyarrow.lib.Field.flatten", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":2789
 *         return [pyarrow_wrap_field(f) for f in flattened]
 * 
 *     def _export_to_c(self, out_ptr):             # <<<<<<<<<<<<<<
 *         """
 *         Export to a C ArrowSchema struct, given its pointer.
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_5Field_29_export_to_c(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_5Field_28_export_to_c, "Field._export_to_c(self, out_ptr)\n\nExport to a C ArrowSchema struct, given its pointer.\n\nBe careful: if you don't pass the ArrowSchema struct to a consumer,\nits memory will leak.  This is a low-level function intended for\nexpert users.");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_5Field_29_export_to_c = {"_export_to_c", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Field_29_export_to_c, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Field_28_export_to_c};
static PyObject *__pyx_pw_7pyarrow_3lib_5Field_29_export_to_c(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_out_ptr = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_export_to_c (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_out_ptr,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 2789, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 2789, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_export_to_c", 0) < (0)) __PYX_ERR(1, 2789, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_export_to_c", 1, 1, 1, i); __PYX_ERR(1, 2789, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 2789, __pyx_L3_error)
    }
    __pyx_v_out_ptr = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_export_to_c", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 2789, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("pyarrow.lib.Field._export_to_c", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyarrow_3lib_5Field_28_export_to_c(((struct __pyx_obj_7pyarrow_3lib_Field *)__pyx_v_self), __pyx_v_out_ptr);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7pyarrow_3lib_5Field_28_export_to_c(struct __pyx_obj_7pyarrow_3lib_Field *__pyx_v_self, PyObject *__pyx_v_out_ptr) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  void *__pyx_t_1;
  int __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_export_to_c", 0);

  /* "pyarrow/types.pxi":2797
 *         expert users.
 *         """
 *         check_status(ExportField(deref(self.field),             # <<<<<<<<<<<<<<
 *                                  <ArrowSchema*> _as_c_pointer(out_ptr)))
 * 
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "field");
    __PYX_ERR(1, 2797, __pyx_L1_error)
  }

  /* "pyarrow/types.pxi":2798
 *         """
 *         check_status(ExportField(deref(self.field),
 *                                  <ArrowSchema*> _as_c_pointer(out_ptr)))             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
*/
  __pyx_t_1 = __pyx_f_7pyarrow_3lib__as_c_pointer(__pyx_v_out_ptr, NULL); if (unlikely(__pyx_t_1 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(1, 2798, __pyx_L1_error)

  /* "pyarrow/types.pxi":2797
 *         expert users.
 *         """
 *         check_status(ExportField(deref(self.field),             # <<<<<<<<<<<<<<
 *                                  <ArrowSchema*> _as_c_pointer(out_ptr)))
 * 
*/
  __pyx_t_2 = __pyx_f_7pyarrow_3lib_check_status(arrow::ExportField((*__pyx_v_self->field), ((struct ArrowSchema *)__pyx_t_1))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(1, 2797, __pyx_L1_error)

  /* "pyarrow/types.pxi":2789
 *         return [pyarrow_wrap_field(f) for f in flattened]
 * 
 *     def _export_to_c(self, out_ptr):             # <<<<<<<<<<<<<<
 *         """
 *         Export to a C ArrowSchema struct, given its pointer.
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyarrow.lib.Field._export_to_c", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":2800
 *                                  <ArrowSchema*> _as_c_pointer(out_ptr)))
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def _import_from_c(in_ptr):
 *         """
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_5Field_31_import_from_c(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_5Field_30_import_from_c, "Field._import_from_c(in_ptr)\n\nImport Field from a C ArrowSchema struct, given its pointer.\n\nThis is a low-level function intended for expert users.");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_5Field_31_import_from_c = {"_import_from_c", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Field_31_import_from_c, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Field_30_import_from_c};
static PyObject *__pyx_pw_7pyarrow_3lib_5Field_31_import_from_c(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_in_ptr = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_import_from_c (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_in_ptr,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 2800, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 2800, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_import_from_c", 0) < (0)) __PYX_ERR(1, 2800, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_import_from_c", 1, 1, 1, i); __PYX_ERR(1, 2800, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 2800, __pyx_L3_error)
    }
    __pyx_v_in_ptr = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_import_from_c", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 2800, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("pyarrow.lib.Field._import_from_c", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyarrow_3lib_5Field_30_import_from_c(__pyx_v_in_ptr);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7pyarrow_3lib_5Field_30_import_from_c(PyObject *__pyx_v_in_ptr) {
  void *__pyx_v_c_ptr;
  std::shared_ptr< arrow::Field>  __pyx_v_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  void *__pyx_t_1;
  std::shared_ptr< arrow::Field>  __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_import_from_c", 0);

  /* "pyarrow/types.pxi":2807
 *         This is a low-level function intended for expert users.
 *         """
 *         cdef void* c_ptr = _as_c_pointer(in_ptr)             # <<<<<<<<<<<<<<
 *         with nogil:
 *             result = GetResultValue(ImportField(<ArrowSchema*> c_ptr))
*/
  __pyx_t_1 = __pyx_f_7pyarrow_3lib__as_c_pointer(__pyx_v_in_ptr, NULL); if (unlikely(__pyx_t_1 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(1, 2807, __pyx_L1_error)
  __pyx_v_c_ptr = __pyx_t_1;

  /* "pyarrow/types.pxi":2808
 *         """
 *         cdef void* c_ptr = _as_c_pointer(in_ptr)
 *         with nogil:             # <<<<<<<<<<<<<<
 *             result = GetResultValue(ImportField(<ArrowSchema*> c_ptr))
 *         return pyarrow_wrap_field(result)
*/
  {
      PyThreadState * _save;
      _save = PyEval_SaveThread();
      __Pyx_FastGIL_Remember();
      /*try:*/ {

        /* "pyarrow/types.pxi":2809
 *         cdef void* c_ptr = _as_c_pointer(in_ptr)
 *         with nogil:
 *             result = GetResultValue(ImportField(<ArrowSchema*> c_ptr))             # <<<<<<<<<<<<<<
 *         return pyarrow_wrap_field(result)
 * 
*/
        __pyx_t_2 = arrow::py::GetResultValue<std::shared_ptr< arrow::Field> >(arrow::ImportField(((struct ArrowSchema *)__pyx_v_c_ptr))); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 2809, __pyx_L4_error)
        __pyx_v_result = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_2);
      }

      /* "pyarrow/types.pxi":2808
 *         """
 *         cdef void* c_ptr = _as_c_pointer(in_ptr)
 *         with nogil:             # <<<<<<<<<<<<<<
 *             result = GetResultValue(ImportField(<ArrowSchema*> c_ptr))
 *         return pyarrow_wrap_field(result)
*/
      /*finally:*/ {
        /*normal exit:*/{
          __Pyx_FastGIL_Forget();
          PyEval_RestoreThread(_save);
          goto __pyx_L5;
        }
        __pyx_L4_error: {
          __Pyx_FastGIL_Forget();
          PyEval_RestoreThread(_save);
          goto __pyx_L1_error;
        }
        __pyx_L5:;
      }
  }

  /* "pyarrow/types.pxi":2810
 *         with nogil:
 *             result = GetResultValue(ImportField(<ArrowSchema*> c_ptr))
 *         return pyarrow_wrap_field(result)             # <<<<<<<<<<<<<<
 * 
 *     def __arrow_c_schema__(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = pyarrow_wrap_field(__pyx_v_result); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2810, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":2800
 *                                  <ArrowSchema*> _as_c_pointer(out_ptr)))
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def _import_from_c(in_ptr):
 *         """
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyarrow.lib.Field._import_from_c", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":2812
 *         return pyarrow_wrap_field(result)
 * 
 *     def __arrow_c_schema__(self):             # <<<<<<<<<<<<<<
 *         """
 *         Export to a ArrowSchema PyCapsule
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_5Field_33__arrow_c_schema__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_5Field_32__arrow_c_schema__, "Field.__arrow_c_schema__(self)\n\nExport to a ArrowSchema PyCapsule\n\nUnlike _export_to_c, this will not leak memory if the capsule is not used.");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_5Field_33__arrow_c_schema__ = {"__arrow_c_schema__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Field_33__arrow_c_schema__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Field_32__arrow_c_schema__};
static PyObject *__pyx_pw_7pyarrow_3lib_5Field_33__arrow_c_schema__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__arrow_c_schema__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__arrow_c_schema__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__arrow_c_schema__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7pyarrow_3lib_5Field_32__arrow_c_schema__(((struct __pyx_obj_7pyarrow_3lib_Field *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_5Field_32__arrow_c_schema__(struct __pyx_obj_7pyarrow_3lib_Field *__pyx_v_self) {
  struct ArrowSchema *__pyx_v_c_schema;
  PyObject *__pyx_v_capsule = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__arrow_c_schema__", 0);

  /* "pyarrow/types.pxi":2819
 *         """
 *         cdef ArrowSchema* c_schema
 *         capsule = alloc_c_schema(&c_schema)             # <<<<<<<<<<<<<<
 * 
 *         with nogil:
*/
  __pyx_t_1 = __pyx_f_7pyarrow_3lib_alloc_c_schema((&__pyx_v_c_schema)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2819, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_capsule = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyarrow/types.pxi":2821
 *         capsule = alloc_c_schema(&c_schema)
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             check_status(ExportField(deref(self.field), c_schema))
 * 
*/
  {
      PyThreadState * _save;
      _save = PyEval_SaveThread();
      __Pyx_FastGIL_Remember();
      /*try:*/ {

        /* "pyarrow/types.pxi":2822
 * 
 *         with nogil:
 *             check_status(ExportField(deref(self.field), c_schema))             # <<<<<<<<<<<<<<
 * 
 *         return capsule
*/
        if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "field");
          __Pyx_PyGILState_Release(__pyx_gilstate_save);
          __PYX_ERR(1, 2822, __pyx_L4_error)
        }
        __pyx_t_2 = __pyx_f_7pyarrow_3lib_check_status(arrow::ExportField((*__pyx_v_self->field), __pyx_v_c_schema)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(1, 2822, __pyx_L4_error)
      }

      /* "pyarrow/types.pxi":2821
 *         capsule = alloc_c_schema(&c_schema)
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             check_status(ExportField(deref(self.field), c_schema))
 * 
*/
      /*finally:*/ {
        /*normal exit:*/{
          __Pyx_FastGIL_Forget();
          PyEval_RestoreThread(_save);
          goto __pyx_L5;
        }
        __pyx_L4_error: {
          __Pyx_FastGIL_Forget();
          PyEval_RestoreThread(_save);
          goto __pyx_L1_error;
        }
        __pyx_L5:;
      }
  }

  /* "pyarrow/types.pxi":2824
 *             check_status(ExportField(deref(self.field), c_schema))
 * 
 *         return capsule             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_capsule);
  __pyx_r = __pyx_v_capsule;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":2812
 *         return pyarrow_wrap_field(result)
 * 
 *     def __arrow_c_schema__(self):             # <<<<<<<<<<<<<<
 *         """
 *         Export to a ArrowSchema PyCapsule
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib.Field.__arrow_c_schema__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_capsule);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":2826
 *         return capsule
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def _import_from_c_capsule(schema):
 *         """
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_5Field_35_import_from_c_capsule(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_5Field_34_import_from_c_capsule, "Field._import_from_c_capsule(schema)\n\nImport a Field from a ArrowSchema PyCapsule\n\nParameters\n----------\nschema : PyCapsule\n    A valid PyCapsule with name 'arrow_schema' containing an\n    ArrowSchema pointer.");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_5Field_35_import_from_c_capsule = {"_import_from_c_capsule", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Field_35_import_from_c_capsule, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Field_34_import_from_c_capsule};
static PyObject *__pyx_pw_7pyarrow_3lib_5Field_35_import_from_c_capsule(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_schema = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_import_from_c_capsule (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_schema,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 2826, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 2826, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_import_from_c_capsule", 0) < (0)) __PYX_ERR(1, 2826, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_import_from_c_capsule", 1, 1, 1, i); __PYX_ERR(1, 2826, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 2826, __pyx_L3_error)
    }
    __pyx_v_schema = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_import_from_c_capsule", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 2826, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("pyarrow.lib.Field._import_from_c_capsule", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7pyarrow_3lib_5Field_34_import_from_c_capsule(__pyx_v_schema);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7pyarrow_3lib_5Field_34_import_from_c_capsule(PyObject *__pyx_v_schema) {
  struct ArrowSchema *__pyx_v_c_schema;
  std::shared_ptr< arrow::Field>  __pyx_v_c_field;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  void *__pyx_t_5;
  std::shared_ptr< arrow::Field>  __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_import_from_c_capsule", 0);

  /* "pyarrow/types.pxi":2841
 *             shared_ptr[CField] c_field
 * 
 *         if not PyCapsule_IsValid(schema, 'arrow_schema'):             # <<<<<<<<<<<<<<
 *             raise ValueError(
 *                 "Not an ArrowSchema object"
*/
  __pyx_t_1 = (!PyCapsule_IsValid(__pyx_v_schema, __pyx_k_arrow_schema));
  if (unlikely(__pyx_t_1)) {

    /* "pyarrow/types.pxi":2842
 * 
 *         if not PyCapsule_IsValid(schema, 'arrow_schema'):
 *             raise ValueError(             # <<<<<<<<<<<<<<
 *                 "Not an ArrowSchema object"
 *             )
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Not_an_ArrowSchema_object};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2842, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(1, 2842, __pyx_L1_error)

    /* "pyarrow/types.pxi":2841
 *             shared_ptr[CField] c_field
 * 
 *         if not PyCapsule_IsValid(schema, 'arrow_schema'):             # <<<<<<<<<<<<<<
 *             raise ValueError(
 *                 "Not an ArrowSchema object"
*/
  }

  /* "pyarrow/types.pxi":2845
 *                 "Not an ArrowSchema object"
 *             )
 *         c_schema = <ArrowSchema*> PyCapsule_GetPointer(schema, 'arrow_schema')             # <<<<<<<<<<<<<<
 * 
 *         with nogil:
*/
  __pyx_t_5 = PyCapsule_GetPointer(__pyx_v_schema, __pyx_k_arrow_schema); if (unlikely(__pyx_t_5 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(1, 2845, __pyx_L1_error)
  __pyx_v_c_schema = ((struct ArrowSchema *)__pyx_t_5);

  /* "pyarrow/types.pxi":2847
 *         c_schema = <ArrowSchema*> PyCapsule_GetPointer(schema, 'arrow_schema')
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             c_field = GetResultValue(ImportField(c_schema))
 * 
*/
  {
      PyThreadState * _save;
      _save = PyEval_SaveThread();
      __Pyx_FastGIL_Remember();
      /*try:*/ {

        /* "pyarrow/types.pxi":2848
 * 
 *         with nogil:
 *             c_field = GetResultValue(ImportField(c_schema))             # <<<<<<<<<<<<<<
 * 
 *         return pyarrow_wrap_field(c_field)
*/
        __pyx_t_6 = arrow::py::GetResultValue<std::shared_ptr< arrow::Field> >(arrow::ImportField(__pyx_v_c_schema)); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 2848, __pyx_L5_error)
        __pyx_v_c_field = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_6);
      }

      /* "pyarrow/types.pxi":2847
 *         c_schema = <ArrowSchema*> PyCapsule_GetPointer(schema, 'arrow_schema')
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             c_field = GetResultValue(ImportField(c_schema))
 * 
*/
      /*finally:*/ {
        /*normal exit:*/{
          __Pyx_FastGIL_Forget();
          PyEval_RestoreThread(_save);
          goto __pyx_L6;
        }
        __pyx_L5_error: {
          __Pyx_FastGIL_Forget();
          PyEval_RestoreThread(_save);
          goto __pyx_L1_error;
        }
        __pyx_L6:;
      }
  }

  /* "pyarrow/types.pxi":2850
 *             c_field = GetResultValue(ImportField(c_schema))
 * 
 *         return pyarrow_wrap_field(c_field)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = pyarrow_wrap_field(__pyx_v_c_field); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2850, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":2826
 *         return capsule
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def _import_from_c_capsule(schema):
 *         """
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyarrow.lib.Field._import_from_c_capsule", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/lib.pxd":243
 * 
 *     cdef readonly:
 *         DataType type             # <<<<<<<<<<<<<<
 * 
 *     cdef void init(self, const shared_ptr[CField]& field)
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_5Field_4type_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_5Field_4type_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_5Field_4type___get__(((struct __pyx_obj_7pyarrow_3lib_Field *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_5Field_4type___get__(struct __pyx_obj_7pyarrow_3lib_Field *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "type");
    __PYX_ERR(15, 243, __pyx_L1_error)
  }
  __Pyx_INCREF((PyObject *)__pyx_v_self->type);
  __pyx_r = ((PyObject *)__pyx_v_self->type);
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyarrow.lib.Field.type.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":2891
 *     """
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         pass
 * 
*/

/* Python wrapper */
static int __pyx_pw_7pyarrow_3lib_6Schema_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_7pyarrow_3lib_6Schema_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, __pyx_nargs); return -1; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return -1;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__cinit__", __pyx_kwds); return -1;}
  __pyx_r = __pyx_pf_7pyarrow_3lib_6Schema___cinit__(((struct __pyx_obj_7pyarrow_3lib_Schema *)__pyx_v_self));

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

static int __pyx_pf_7pyarrow_3lib_6Schema___cinit__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_Schema *__pyx_v_self) {
  int __pyx_r;

  /* function exit code */
  __pyx_r = 0;
  return __pyx_r;
}

/* "pyarrow/types.pxi":2894
 *         pass
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         raise TypeError("Do not call Schema's constructor directly, use "
 *                         "`pyarrow.schema` instead.")
*/

/* Python wrapper */
static int __pyx_pw_7pyarrow_3lib_6Schema_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_7pyarrow_3lib_6Schema_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, __pyx_nargs); return -1; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return -1;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__init__", __pyx_kwds); return -1;}
  __pyx_r = __pyx_pf_7pyarrow_3lib_6Schema_2__init__(((struct __pyx_obj_7pyarrow_3lib_Schema *)__pyx_v_self));

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

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

  /* "pyarrow/types.pxi":2895
 * 
 *     def __init__(self):
 *         raise TypeError("Do not call Schema's constructor directly, use "             # <<<<<<<<<<<<<<
 *                         "`pyarrow.schema` instead.")
 * 
*/
  __pyx_t_2 = NULL;
  __pyx_t_3 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Do_not_call_Schema_s_constructor};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2895, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2895, __pyx_L1_error)

  /* "pyarrow/types.pxi":2894
 *         pass
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         raise TypeError("Do not call Schema's constructor directly, use "
 *                         "`pyarrow.schema` instead.")
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pyarrow.lib.Schema.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":2898
 *                         "`pyarrow.schema` instead.")
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self.schema.num_fields()
 * 
*/

/* Python wrapper */
static Py_ssize_t __pyx_pw_7pyarrow_3lib_6Schema_5__len__(PyObject *__pyx_v_self); /*proto*/
static Py_ssize_t __pyx_pw_7pyarrow_3lib_6Schema_5__len__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_6Schema_4__len__(((struct __pyx_obj_7pyarrow_3lib_Schema *)__pyx_v_self));

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

static Py_ssize_t __pyx_pf_7pyarrow_3lib_6Schema_4__len__(struct __pyx_obj_7pyarrow_3lib_Schema *__pyx_v_self) {
  Py_ssize_t __pyx_r;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "pyarrow/types.pxi":2899
 * 
 *     def __len__(self):
 *         return self.schema.num_fields()             # <<<<<<<<<<<<<<
 * 
 *     def __getitem__(self, key):
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "schema");
    __PYX_ERR(1, 2899, __pyx_L1_error)
  }
  __pyx_r = __pyx_v_self->schema->num_fields();
  goto __pyx_L0;

  /* "pyarrow/types.pxi":2898
 *                         "`pyarrow.schema` instead.")
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self.schema.num_fields()
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyarrow.lib.Schema.__len__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  return __pyx_r;
}

/* "pyarrow/types.pxi":2901
 *         return self.schema.num_fields()
 * 
 *     def __getitem__(self, key):             # <<<<<<<<<<<<<<
 *         # access by integer index
 *         return self._field(key)
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_6Schema_7__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_6Schema_7__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_6Schema_6__getitem__(((struct __pyx_obj_7pyarrow_3lib_Schema *)__pyx_v_self), ((PyObject *)__pyx_v_key));

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

static PyObject *__pyx_pf_7pyarrow_3lib_6Schema_6__getitem__(struct __pyx_obj_7pyarrow_3lib_Schema *__pyx_v_self, PyObject *__pyx_v_key) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  size_t __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__getitem__", 0);

  /* "pyarrow/types.pxi":2903
 *     def __getitem__(self, key):
 *         # access by integer index
 *         return self._field(key)             # <<<<<<<<<<<<<<
 * 
 *     def __iter__(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_key};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_field_2, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2903, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":2901
 *         return self.schema.num_fields()
 * 
 *     def __getitem__(self, key):             # <<<<<<<<<<<<<<
 *         # access by integer index
 *         return self._field(key)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pyarrow.lib.Schema.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_7pyarrow_3lib_6Schema_10generator5(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "pyarrow/types.pxi":2905
 *         return self._field(key)
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         for i in range(len(self)):
 *             yield self[i]
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_6Schema_9__iter__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_6Schema_9__iter__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_6Schema_8__iter__(((struct __pyx_obj_7pyarrow_3lib_Schema *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_6Schema_8__iter__(struct __pyx_obj_7pyarrow_3lib_Schema *__pyx_v_self) {
  struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_6___iter__ *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__iter__", 0);
  __pyx_cur_scope = (struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_6___iter__ *)__pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_6___iter__(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_6___iter__, __pyx_mstate_global->__pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_6___iter__ *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(1, 2905, __pyx_L1_error)
  } else {
    __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7pyarrow_3lib_6Schema_10generator5, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[6]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_iter, __pyx_mstate_global->__pyx_n_u_Schema___iter, __pyx_mstate_global->__pyx_n_u_pyarrow_lib); if (unlikely(!gen)) __PYX_ERR(1, 2905, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyarrow.lib.Schema.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF((PyObject *)__pyx_cur_scope);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_7pyarrow_3lib_6Schema_10generator5(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_6___iter__ *__pyx_cur_scope = ((struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_6___iter__ *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  Py_ssize_t __pyx_t_1;
  Py_ssize_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L6_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(__pyx_sent_value != Py_None)) {
    if (unlikely(__pyx_sent_value)) PyErr_SetString(PyExc_TypeError, "can't send non-None value to a just-started generator");
    __PYX_ERR(1, 2905, __pyx_L1_error)
  }

  /* "pyarrow/types.pxi":2906
 * 
 *     def __iter__(self):
 *         for i in range(len(self)):             # <<<<<<<<<<<<<<
 *             yield self[i]
 * 
*/
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_cur_scope->__pyx_v_self)); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(1, 2906, __pyx_L1_error)
  __pyx_t_2 = __pyx_t_1;
  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
    __pyx_cur_scope->__pyx_v_i = __pyx_t_3;

    /* "pyarrow/types.pxi":2907
 *     def __iter__(self):
 *         for i in range(len(self)):
 *             yield self[i]             # <<<<<<<<<<<<<<
 * 
 *     cdef void init(self, const vector[shared_ptr[CField]]& fields):
*/
    if (unlikely(((PyObject *)__pyx_cur_scope->__pyx_v_self) == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 2907, __pyx_L1_error)
    }
    __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_cur_scope->__pyx_v_i, Py_ssize_t, 1, PyLong_FromSsize_t, 0, 1, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2907, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
    __pyx_cur_scope->__pyx_t_1 = __pyx_t_2;
    __pyx_cur_scope->__pyx_t_2 = __pyx_t_3;
    __Pyx_XGIVEREF(__pyx_r);
    __Pyx_RefNannyFinishContext();
    __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
    /* return from generator, yielding value */
    __pyx_generator->resume_label = 1;
    return __pyx_r;
    __pyx_L6_resume_from_yield:;
    __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
    __pyx_t_2 = __pyx_cur_scope->__pyx_t_1;
    __pyx_t_3 = __pyx_cur_scope->__pyx_t_2;
    if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 2907, __pyx_L1_error)
  }
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* "pyarrow/types.pxi":2905
 *         return self._field(key)
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         for i in range(len(self)):
 *             yield self[i]
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  if (__Pyx_PyErr_Occurred()) {
    __Pyx_Generator_Replace_StopIteration(0);
    __Pyx_AddTraceback("__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  }
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":2909
 *             yield self[i]
 * 
 *     cdef void init(self, const vector[shared_ptr[CField]]& fields):             # <<<<<<<<<<<<<<
 *         self.schema = new CSchema(fields)
 *         self.sp_schema.reset(self.schema)
*/

static void __pyx_f_7pyarrow_3lib_6Schema_init(struct __pyx_obj_7pyarrow_3lib_Schema *__pyx_v_self, std::vector<std::shared_ptr< arrow::Field> >  const &__pyx_v_fields) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "pyarrow/types.pxi":2910
 * 
 *     cdef void init(self, const vector[shared_ptr[CField]]& fields):
 *         self.schema = new CSchema(fields)             # <<<<<<<<<<<<<<
 *         self.sp_schema.reset(self.schema)
 * 
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "schema");
    __PYX_ERR(1, 2910, __pyx_L1_error)
  }
  __pyx_v_self->schema = new  arrow::Schema(__pyx_v_fields);

  /* "pyarrow/types.pxi":2911
 *     cdef void init(self, const vector[shared_ptr[CField]]& fields):
 *         self.schema = new CSchema(fields)
 *         self.sp_schema.reset(self.schema)             # <<<<<<<<<<<<<<
 * 
 *     cdef void init_schema(self, const shared_ptr[CSchema]& schema):
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_schema");
    __PYX_ERR(1, 2911, __pyx_L1_error)
  }
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "schema");
    __PYX_ERR(1, 2911, __pyx_L1_error)
  }
  __pyx_v_self->sp_schema.reset(__pyx_v_self->schema);

  /* "pyarrow/types.pxi":2909
 *             yield self[i]
 * 
 *     cdef void init(self, const vector[shared_ptr[CField]]& fields):             # <<<<<<<<<<<<<<
 *         self.schema = new CSchema(fields)
 *         self.sp_schema.reset(self.schema)
*/

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyarrow.lib.Schema.init", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
}

/* "pyarrow/types.pxi":2913
 *         self.sp_schema.reset(self.schema)
 * 
 *     cdef void init_schema(self, const shared_ptr[CSchema]& schema):             # <<<<<<<<<<<<<<
 *         self.schema = schema.get()
 *         self.sp_schema = schema
*/

static void __pyx_f_7pyarrow_3lib_6Schema_init_schema(struct __pyx_obj_7pyarrow_3lib_Schema *__pyx_v_self, std::shared_ptr< arrow::Schema>  const &__pyx_v_schema) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "pyarrow/types.pxi":2914
 * 
 *     cdef void init_schema(self, const shared_ptr[CSchema]& schema):
 *         self.schema = schema.get()             # <<<<<<<<<<<<<<
 *         self.sp_schema = schema
 * 
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "schema");
    __PYX_ERR(1, 2914, __pyx_L1_error)
  }
  __pyx_v_self->schema = __pyx_v_schema.get();

  /* "pyarrow/types.pxi":2915
 *     cdef void init_schema(self, const shared_ptr[CSchema]& schema):
 *         self.schema = schema.get()
 *         self.sp_schema = schema             # <<<<<<<<<<<<<<
 * 
 *     def __reduce__(self):
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_schema");
    __PYX_ERR(1, 2915, __pyx_L1_error)
  }
  __pyx_v_self->sp_schema = __pyx_v_schema;

  /* "pyarrow/types.pxi":2913
 *         self.sp_schema.reset(self.schema)
 * 
 *     cdef void init_schema(self, const shared_ptr[CSchema]& schema):             # <<<<<<<<<<<<<<
 *         self.schema = schema.get()
 *         self.sp_schema = schema
*/

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyarrow.lib.Schema.init_schema", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
}

/* "pyarrow/types.pxi":2917
 *         self.sp_schema = schema
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         return schema, (list(self), self.metadata)
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_6Schema_12__reduce__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_6Schema_11__reduce__, "Schema.__reduce__(self)");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_6Schema_12__reduce__ = {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_6Schema_12__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_6Schema_11__reduce__};
static PyObject *__pyx_pw_7pyarrow_3lib_6Schema_12__reduce__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7pyarrow_3lib_6Schema_11__reduce__(((struct __pyx_obj_7pyarrow_3lib_Schema *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_6Schema_11__reduce__(struct __pyx_obj_7pyarrow_3lib_Schema *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce__", 0);

  /* "pyarrow/types.pxi":2918
 * 
 *     def __reduce__(self):
 *         return schema, (list(self), self.metadata)             # <<<<<<<<<<<<<<
 * 
 *     def __hash__(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_schema); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2918, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PySequence_List(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2918, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_metadata); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2918, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2918, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2) != (0)) __PYX_ERR(1, 2918, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3) != (0)) __PYX_ERR(1, 2918, __pyx_L1_error);
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2918, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1) != (0)) __PYX_ERR(1, 2918, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_4);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_4) != (0)) __PYX_ERR(1, 2918, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_4 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":2917
 *         self.sp_schema = schema
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         return schema, (list(self), self.metadata)
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pyarrow.lib.Schema.__reduce__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":2920
 *         return schema, (list(self), self.metadata)
 * 
 *     def __hash__(self):             # <<<<<<<<<<<<<<
 *         metadata = frozenset(self.metadata.items() if self.metadata else {})
 *         return hash((tuple(self), metadata))
*/

/* Python wrapper */
static Py_hash_t __pyx_pw_7pyarrow_3lib_6Schema_14__hash__(PyObject *__pyx_v_self); /*proto*/
static Py_hash_t __pyx_pw_7pyarrow_3lib_6Schema_14__hash__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  Py_hash_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__hash__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_6Schema_13__hash__(((struct __pyx_obj_7pyarrow_3lib_Schema *)__pyx_v_self));

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

static Py_hash_t __pyx_pf_7pyarrow_3lib_6Schema_13__hash__(struct __pyx_obj_7pyarrow_3lib_Schema *__pyx_v_self) {
  PyObject *__pyx_v_metadata = NULL;
  Py_hash_t __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  Py_hash_t __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__hash__", 0);

  /* "pyarrow/types.pxi":2921
 * 
 *     def __hash__(self):
 *         metadata = frozenset(self.metadata.items() if self.metadata else {})             # <<<<<<<<<<<<<<
 *         return hash((tuple(self), metadata))
 * 
*/
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_metadata); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2921, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(1, 2921, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_3) {
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_metadata); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2921, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = __pyx_t_5;
    __Pyx_INCREF(__pyx_t_4);
    __pyx_t_6 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
      __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_items, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2921, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2921, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  }
  __pyx_t_2 = __Pyx_PyFrozenSet_New(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2921, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_metadata = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pyarrow/types.pxi":2922
 *     def __hash__(self):
 *         metadata = frozenset(self.metadata.items() if self.metadata else {})
 *         return hash((tuple(self), metadata))             # <<<<<<<<<<<<<<
 * 
 *     def __sizeof__(self):
*/
  __pyx_t_2 = PySequence_Tuple(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2922, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2922, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2) != (0)) __PYX_ERR(1, 2922, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_metadata);
  __Pyx_GIVEREF(__pyx_v_metadata);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_metadata) != (0)) __PYX_ERR(1, 2922, __pyx_L1_error);
  __pyx_t_2 = 0;
  __pyx_t_7 = PyObject_Hash(__pyx_t_1); if (unlikely(__pyx_t_7 == ((Py_hash_t)-1))) __PYX_ERR(1, 2922, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_7;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":2920
 *         return schema, (list(self), self.metadata)
 * 
 *     def __hash__(self):             # <<<<<<<<<<<<<<
 *         metadata = frozenset(self.metadata.items() if self.metadata else {})
 *         return hash((tuple(self), metadata))
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pyarrow.lib.Schema.__hash__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_metadata);
  if (unlikely(__pyx_r == -1) && !PyErr_Occurred()) __pyx_r = -2;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":2924
 *         return hash((tuple(self), metadata))
 * 
 *     def __sizeof__(self):             # <<<<<<<<<<<<<<
 *         size = 0
 *         if self.metadata:
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_6Schema_16__sizeof__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_6Schema_15__sizeof__, "Schema.__sizeof__(self)");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_6Schema_16__sizeof__ = {"__sizeof__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_6Schema_16__sizeof__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_6Schema_15__sizeof__};
static PyObject *__pyx_pw_7pyarrow_3lib_6Schema_16__sizeof__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__sizeof__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__sizeof__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__sizeof__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7pyarrow_3lib_6Schema_15__sizeof__(((struct __pyx_obj_7pyarrow_3lib_Schema *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_6Schema_15__sizeof__(struct __pyx_obj_7pyarrow_3lib_Schema *__pyx_v_self) {
  PyObject *__pyx_v_size = NULL;
  PyObject *__pyx_v_key = NULL;
  PyObject *__pyx_v_value = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  size_t __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__sizeof__", 0);

  /* "pyarrow/types.pxi":2925
 * 
 *     def __sizeof__(self):
 *         size = 0             # <<<<<<<<<<<<<<
 *         if self.metadata:
 *             for key, value in self.metadata.items():
*/
  __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0);
  __pyx_v_size = __pyx_mstate_global->__pyx_int_0;

  /* "pyarrow/types.pxi":2926
 *     def __sizeof__(self):
 *         size = 0
 *         if self.metadata:             # <<<<<<<<<<<<<<
 *             for key, value in self.metadata.items():
 *                 size += sys.getsizeof(key)
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_metadata); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2926, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(1, 2926, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "pyarrow/types.pxi":2927
 *         size = 0
 *         if self.metadata:
 *             for key, value in self.metadata.items():             # <<<<<<<<<<<<<<
 *                 size += sys.getsizeof(key)
 *                 size += sys.getsizeof(value)
*/
    __pyx_t_3 = 0;
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_metadata); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2927, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (unlikely(__pyx_t_6 == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items");
      __PYX_ERR(1, 2927, __pyx_L1_error)
    }
    __pyx_t_7 = __Pyx_dict_iterator(__pyx_t_6, 0, __pyx_mstate_global->__pyx_n_u_items, (&__pyx_t_4), (&__pyx_t_5)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 2927, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_1);
    __pyx_t_1 = __pyx_t_7;
    __pyx_t_7 = 0;
    while (1) {
      __pyx_t_8 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_4, &__pyx_t_3, &__pyx_t_7, &__pyx_t_6, NULL, __pyx_t_5);
      if (unlikely(__pyx_t_8 == 0)) break;
      if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(1, 2927, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_7);
      __pyx_t_7 = 0;
      __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_6);
      __pyx_t_6 = 0;

      /* "pyarrow/types.pxi":2928
 *         if self.metadata:
 *             for key, value in self.metadata.items():
 *                 size += sys.getsizeof(key)             # <<<<<<<<<<<<<<
 *                 size += sys.getsizeof(value)
 * 
*/
      __pyx_t_7 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_sys); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 2928, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_getsizeof); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 2928, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_11 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_10))) {
        __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_10);
        assert(__pyx_t_7);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_10);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_10, __pyx__function);
        __pyx_t_11 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_key};
        __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_10, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (__pyx_t_11*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2928, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
      }
      __pyx_t_10 = PyNumber_InPlaceAdd(__pyx_v_size, __pyx_t_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 2928, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF_SET(__pyx_v_size, __pyx_t_10);
      __pyx_t_10 = 0;

      /* "pyarrow/types.pxi":2929
 *             for key, value in self.metadata.items():
 *                 size += sys.getsizeof(key)
 *                 size += sys.getsizeof(value)             # <<<<<<<<<<<<<<
 * 
 *         return size + super(Schema, self).__sizeof__()
*/
      __pyx_t_6 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_sys); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 2929, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_getsizeof); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 2929, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_11 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_9))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_9);
        assert(__pyx_t_6);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_9);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_9, __pyx__function);
        __pyx_t_11 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_value};
        __pyx_t_10 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (__pyx_t_11*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 2929, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
      }
      __pyx_t_9 = PyNumber_InPlaceAdd(__pyx_v_size, __pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 2929, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF_SET(__pyx_v_size, __pyx_t_9);
      __pyx_t_9 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyarrow/types.pxi":2926
 *     def __sizeof__(self):
 *         size = 0
 *         if self.metadata:             # <<<<<<<<<<<<<<
 *             for key, value in self.metadata.items():
 *                 size += sys.getsizeof(key)
*/
  }

  /* "pyarrow/types.pxi":2931
 *                 size += sys.getsizeof(value)
 * 
 *         return size + super(Schema, self).__sizeof__()             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_6 = NULL;
  __pyx_t_11 = 1;
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_6, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Schema), ((PyObject *)__pyx_v_self)};
    __pyx_t_10 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_super, __pyx_callargs+__pyx_t_11, (3-__pyx_t_11) | (__pyx_t_11*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 2931, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
  }
  __pyx_t_9 = __pyx_t_10;
  __Pyx_INCREF(__pyx_t_9);
  __pyx_t_11 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_sizeof, __pyx_callargs+__pyx_t_11, (1-__pyx_t_11) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2931, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_t_10 = PyNumber_Add(__pyx_v_size, __pyx_t_1); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 2931, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_10;
  __pyx_t_10 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":2924
 *         return hash((tuple(self), metadata))
 * 
 *     def __sizeof__(self):             # <<<<<<<<<<<<<<
 *         size = 0
 *         if self.metadata:
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("pyarrow.lib.Schema.__sizeof__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_size);
  __Pyx_XDECREF(__pyx_v_key);
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":2933
 *         return size + super(Schema, self).__sizeof__()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def pandas_metadata(self):
 *         """
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_6Schema_15pandas_metadata_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_6Schema_15pandas_metadata_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_6Schema_15pandas_metadata___get__(((struct __pyx_obj_7pyarrow_3lib_Schema *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_6Schema_15pandas_metadata___get__(struct __pyx_obj_7pyarrow_3lib_Schema *__pyx_v_self) {
  PyObject *__pyx_v_metadata = NULL;
  PyObject *__pyx_v_key = NULL;
  PyObject *__pyx_v_json = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  size_t __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyarrow/types.pxi":2951
 *         {'index_columns': [{'kind': 'range', 'name': None, 'start': 0, 'stop': 4, 'step': 1}], ...
 *         """
 *         metadata = self.metadata             # <<<<<<<<<<<<<<
 *         key = b'pandas'
 *         if metadata is None or key not in metadata:
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_metadata); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2951, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_metadata = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyarrow/types.pxi":2952
 *         """
 *         metadata = self.metadata
 *         key = b'pandas'             # <<<<<<<<<<<<<<
 *         if metadata is None or key not in metadata:
 *             return None
*/
  __Pyx_INCREF(__pyx_mstate_global->__pyx_n_b_pandas);
  __pyx_v_key = __pyx_mstate_global->__pyx_n_b_pandas;

  /* "pyarrow/types.pxi":2953
 *         metadata = self.metadata
 *         key = b'pandas'
 *         if metadata is None or key not in metadata:             # <<<<<<<<<<<<<<
 *             return None
 * 
*/
  __pyx_t_3 = (__pyx_v_metadata == Py_None);
  if (!__pyx_t_3) {
  } else {
    __pyx_t_2 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_v_key, __pyx_v_metadata, Py_NE)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(1, 2953, __pyx_L1_error)
  __pyx_t_2 = __pyx_t_3;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "pyarrow/types.pxi":2954
 *         key = b'pandas'
 *         if metadata is None or key not in metadata:
 *             return None             # <<<<<<<<<<<<<<
 * 
 *         import json
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "pyarrow/types.pxi":2953
 *         metadata = self.metadata
 *         key = b'pandas'
 *         if metadata is None or key not in metadata:             # <<<<<<<<<<<<<<
 *             return None
 * 
*/
  }

  /* "pyarrow/types.pxi":2956
 *             return None
 * 
 *         import json             # <<<<<<<<<<<<<<
 *         return json.loads(metadata[key].decode('utf8'))
 * 
*/
  __pyx_t_4 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_json_2, 0, 0, NULL, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2956, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_4;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_json = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyarrow/types.pxi":2957
 * 
 *         import json
 *         return json.loads(metadata[key].decode('utf8'))             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = __pyx_v_json;
  __Pyx_INCREF(__pyx_t_5);
  if (unlikely(__pyx_v_metadata == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 2957, __pyx_L1_error)
  }
  __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_v_metadata, __pyx_v_key); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2957, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_7 = __pyx_t_8;
  __Pyx_INCREF(__pyx_t_7);
  __pyx_t_9 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_mstate_global->__pyx_n_u_utf8};
    __pyx_t_6 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_decode, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2957, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
  }
  __pyx_t_9 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_6};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_loads, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2957, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":2933
 *         return size + super(Schema, self).__sizeof__()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def pandas_metadata(self):
 *         """
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("pyarrow.lib.Schema.pandas_metadata.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_metadata);
  __Pyx_XDECREF(__pyx_v_key);
  __Pyx_XDECREF(__pyx_v_json);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":2959
 *         return json.loads(metadata[key].decode('utf8'))
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def names(self):
 *         """
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_6Schema_5names_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_6Schema_5names_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_6Schema_5names___get__(((struct __pyx_obj_7pyarrow_3lib_Schema *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_6Schema_5names___get__(struct __pyx_obj_7pyarrow_3lib_Schema *__pyx_v_self) {
  int __pyx_v_i;
  PyObject *__pyx_v_result = NULL;
  PyObject *__pyx_v_name = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyarrow/types.pxi":2981
 *         """
 *         cdef int i
 *         result = []             # <<<<<<<<<<<<<<
 *         for i in range(self.schema.num_fields()):
 *             name = frombytes(self.schema.field(i).get().name())
*/
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2981, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_result = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyarrow/types.pxi":2982
 *         cdef int i
 *         result = []
 *         for i in range(self.schema.num_fields()):             # <<<<<<<<<<<<<<
 *             name = frombytes(self.schema.field(i).get().name())
 *             result.append(name)
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "schema");
    __PYX_ERR(1, 2982, __pyx_L1_error)
  }
  __pyx_t_2 = __pyx_v_self->schema->num_fields();
  __pyx_t_3 = __pyx_t_2;
  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
    __pyx_v_i = __pyx_t_4;

    /* "pyarrow/types.pxi":2983
 *         result = []
 *         for i in range(self.schema.num_fields()):
 *             name = frombytes(self.schema.field(i).get().name())             # <<<<<<<<<<<<<<
 *             result.append(name)
 *         return result
*/
    __pyx_t_5 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_frombytes); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2983, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "schema");
      __PYX_ERR(1, 2983, __pyx_L1_error)
    }
    __pyx_t_7 = __pyx_convert_PyBytes_string_to_py_6libcpp_6string_std__in_string(__pyx_v_self->schema->field(__pyx_v_i).get()->name()); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 2983, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
      assert(__pyx_t_5);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
      __pyx_t_8 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_7};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2983, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "pyarrow/types.pxi":2984
 *         for i in range(self.schema.num_fields()):
 *             name = frombytes(self.schema.field(i).get().name())
 *             result.append(name)             # <<<<<<<<<<<<<<
 *         return result
 * 
*/
    __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_result, __pyx_v_name); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(1, 2984, __pyx_L1_error)
  }

  /* "pyarrow/types.pxi":2985
 *             name = frombytes(self.schema.field(i).get().name())
 *             result.append(name)
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":2959
 *         return json.loads(metadata[key].decode('utf8'))
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def names(self):
 *         """
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("pyarrow.lib.Schema.names.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_name);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":2987
 *         return result
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def types(self):
 *         """
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_6Schema_5types_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_6Schema_5types_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_6Schema_5types___get__(((struct __pyx_obj_7pyarrow_3lib_Schema *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_6Schema_5types___get__(struct __pyx_obj_7pyarrow_3lib_Schema *__pyx_v_self) {
  PyObject *__pyx_8genexpr8__pyx_v_field = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyarrow/types.pxi":3008
 *         [DataType(int64), DataType(string)]
 *         """
 *         return [field.type for field in self]             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  { /* enter inner scope */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3008, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (likely(PyList_CheckExact(((PyObject *)__pyx_v_self))) || PyTuple_CheckExact(((PyObject *)__pyx_v_self))) {
      __pyx_t_2 = ((PyObject *)__pyx_v_self); __Pyx_INCREF(__pyx_t_2);
      __pyx_t_3 = 0;
      __pyx_t_4 = NULL;
    } else {
      __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3008, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3008, __pyx_L5_error)
    }
    for (;;) {
      if (likely(!__pyx_t_4)) {
        if (likely(PyList_CheckExact(__pyx_t_2))) {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2);
            #if !CYTHON_ASSUME_SAFE_SIZE
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 3008, __pyx_L5_error)
            #endif
            if (__pyx_t_3 >= __pyx_temp) break;
          }
          __pyx_t_5 = __Pyx_PyList_GetItemRefFast(__pyx_t_2, __pyx_t_3, __Pyx_ReferenceSharing_OwnStrongReference);
          ++__pyx_t_3;
        } else {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2);
            #if !CYTHON_ASSUME_SAFE_SIZE
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 3008, __pyx_L5_error)
            #endif
            if (__pyx_t_3 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_5 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3));
          #else
          __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_3);
          #endif
          ++__pyx_t_3;
        }
        if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 3008, __pyx_L5_error)
      } else {
        __pyx_t_5 = __pyx_t_4(__pyx_t_2);
        if (unlikely(!__pyx_t_5)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(1, 3008, __pyx_L5_error)
            PyErr_Clear();
          }
          break;
        }
      }
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_XDECREF_SET(__pyx_8genexpr8__pyx_v_field, __pyx_t_5);
      __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_8genexpr8__pyx_v_field, __pyx_mstate_global->__pyx_n_u_type); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 3008, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(1, 3008, __pyx_L5_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_8genexpr8__pyx_v_field); __pyx_8genexpr8__pyx_v_field = 0;
    goto __pyx_L9_exit_scope;
    __pyx_L5_error:;
    __Pyx_XDECREF(__pyx_8genexpr8__pyx_v_field); __pyx_8genexpr8__pyx_v_field = 0;
    goto __pyx_L1_error;
    __pyx_L9_exit_scope:;
  } /* exit inner scope */
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":2987
 *         return result
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def types(self):
 *         """
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pyarrow.lib.Schema.types.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_8genexpr8__pyx_v_field);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":3010
 *         return [field.type for field in self]
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def metadata(self):
 *         """
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_6Schema_8metadata_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_6Schema_8metadata_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_6Schema_8metadata___get__(((struct __pyx_obj_7pyarrow_3lib_Schema *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_6Schema_8metadata___get__(struct __pyx_obj_7pyarrow_3lib_Schema *__pyx_v_self) {
  PyObject *__pyx_v_wrapped = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyarrow/types.pxi":3032
 *         {b'n_legs': b'Number of legs per animal'}
 *         """
 *         wrapped = pyarrow_wrap_metadata(self.schema.metadata())             # <<<<<<<<<<<<<<
 *         if wrapped is not None:
 *             return wrapped.to_dict()
*/
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "schema");
    __PYX_ERR(1, 3032, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_7pyarrow_3lib_pyarrow_wrap_metadata(__pyx_v_self->schema->metadata()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3032, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_wrapped = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyarrow/types.pxi":3033
 *         """
 *         wrapped = pyarrow_wrap_metadata(self.schema.metadata())
 *         if wrapped is not None:             # <<<<<<<<<<<<<<
 *             return wrapped.to_dict()
 *         else:
*/
  __pyx_t_2 = (__pyx_v_wrapped != Py_None);
  if (__pyx_t_2) {

    /* "pyarrow/types.pxi":3034
 *         wrapped = pyarrow_wrap_metadata(self.schema.metadata())
 *         if wrapped is not None:
 *             return wrapped.to_dict()             # <<<<<<<<<<<<<<
 *         else:
 *             return wrapped
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __pyx_v_wrapped;
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_4 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
      __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_to_dict, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3034, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "pyarrow/types.pxi":3033
 *         """
 *         wrapped = pyarrow_wrap_metadata(self.schema.metadata())
 *         if wrapped is not None:             # <<<<<<<<<<<<<<
 *             return wrapped.to_dict()
 *         else:
*/
  }

  /* "pyarrow/types.pxi":3036
 *             return wrapped.to_dict()
 *         else:
 *             return wrapped             # <<<<<<<<<<<<<<
 * 
 *     def __eq__(self, other):
*/
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_wrapped);
    __pyx_r = __pyx_v_wrapped;
    goto __pyx_L0;
  }

  /* "pyarrow/types.pxi":3010
 *         return [field.type for field in self]
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def metadata(self):
 *         """
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyarrow.lib.Schema.metadata.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_wrapped);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":3038
 *             return wrapped
 * 
 *     def __eq__(self, other):             # <<<<<<<<<<<<<<
 *         try:
 *             return self.equals(other)
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_6Schema_18__eq__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pw_7pyarrow_3lib_6Schema_18__eq__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__eq__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7pyarrow_3lib_6Schema_17__eq__(((struct __pyx_obj_7pyarrow_3lib_Schema *)__pyx_v_self), ((PyObject *)__pyx_v_other));

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

static PyObject *__pyx_pf_7pyarrow_3lib_6Schema_17__eq__(struct __pyx_obj_7pyarrow_3lib_Schema *__pyx_v_self, PyObject *__pyx_v_other) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__eq__", 0);

  /* "pyarrow/types.pxi":3039
 * 
 *     def __eq__(self, other):
 *         try:             # <<<<<<<<<<<<<<
 *             return self.equals(other)
 *         except TypeError:
*/
  {
    __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:*/ {

      /* "pyarrow/types.pxi":3040
 *     def __eq__(self, other):
 *         try:
 *             return self.equals(other)             # <<<<<<<<<<<<<<
 *         except TypeError:
 *             return NotImplemented
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_5 = ((PyObject *)__pyx_v_self);
      __Pyx_INCREF(__pyx_t_5);
      __pyx_t_6 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_other};
        __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_equals, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3040, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_4);
      }
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L7_try_return;

      /* "pyarrow/types.pxi":3039
 * 
 *     def __eq__(self, other):
 *         try:             # <<<<<<<<<<<<<<
 *             return self.equals(other)
 *         except TypeError:
*/
    }
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "pyarrow/types.pxi":3041
 *         try:
 *             return self.equals(other)
 *         except TypeError:             # <<<<<<<<<<<<<<
 *             return NotImplemented
 * 
*/
    __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_TypeError))));
    if (__pyx_t_7) {
      __Pyx_AddTraceback("pyarrow.lib.Schema.__eq__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_8) < 0) __PYX_ERR(1, 3041, __pyx_L5_except_error)
      __Pyx_XGOTREF(__pyx_t_4);
      __Pyx_XGOTREF(__pyx_t_5);
      __Pyx_XGOTREF(__pyx_t_8);

      /* "pyarrow/types.pxi":3042
 *             return self.equals(other)
 *         except TypeError:
 *             return NotImplemented             # <<<<<<<<<<<<<<
 * 
 *     def empty_table(self):
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_builtin_NotImplemented);
      __pyx_r = __pyx_builtin_NotImplemented;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      goto __pyx_L6_except_return;
    }
    goto __pyx_L5_except_error;

    /* "pyarrow/types.pxi":3039
 * 
 *     def __eq__(self, other):
 *         try:             # <<<<<<<<<<<<<<
 *             return self.equals(other)
 *         except TypeError:
*/
    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L7_try_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
    __pyx_L6_except_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
  }

  /* "pyarrow/types.pxi":3038
 *             return wrapped
 * 
 *     def __eq__(self, other):             # <<<<<<<<<<<<<<
 *         try:
 *             return self.equals(other)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("pyarrow.lib.Schema.__eq__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":3044
 *             return NotImplemented
 * 
 *     def empty_table(self):             # <<<<<<<<<<<<<<
 *         """
 *         Provide an empty table according to the schema.
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_6Schema_20empty_table(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_6Schema_19empty_table, "Schema.empty_table(self)\n\nProvide an empty table according to the schema.\n\nReturns\n-------\ntable: pyarrow.Table\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> schema = pa.schema([\n...     pa.field('n_legs', pa.int64()),\n...     pa.field('animals', pa.string())])\n\nCreate an empty table with schema's fields:\n\n>>> schema.empty_table()\npyarrow.Table\nn_legs: int64\nanimals: string\n----\nn_legs: [[]]\nanimals: [[]]");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_6Schema_20empty_table = {"empty_table", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_6Schema_20empty_table, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_6Schema_19empty_table};
static PyObject *__pyx_pw_7pyarrow_3lib_6Schema_20empty_table(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("empty_table (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("empty_table", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("empty_table", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7pyarrow_3lib_6Schema_19empty_table(((struct __pyx_obj_7pyarrow_3lib_Schema *)__pyx_v_self));

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

static PyObject *__pyx_pf_7pyarrow_3lib_6Schema_19empty_table(struct __pyx_obj_7pyarrow_3lib_Schema *__pyx_v_self) {
  PyObject *__pyx_v_arrays = NULL;
  PyObject *__pyx_8genexpr9__pyx_v_field = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  size_t __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("empty_table", 0);

  /* "pyarrow/types.pxi":3069
 *         animals: [[]]
 *         """
 *         arrays = [_empty_array(field.type) for field in self]             # <<<<<<<<<<<<<<
 *         return Table.from_arrays(arrays, schema=self)
 * 
*/
  { /* enter inner scope */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3069, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (likely(PyList_CheckExact(((PyObject *)__pyx_v_self))) || PyTuple_CheckExact(((PyObject *)__pyx_v_self))) {
      __pyx_t_2 = ((PyObject *)__pyx_v_self); __Pyx_INCREF(__pyx_t_2);
      __pyx_t_3 = 0;
      __pyx_t_4 = NULL;
    } else {
      __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3069, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3069, __pyx_L5_error)
    }
    for (;;) {
      if (likely(!__pyx_t_4)) {
        if (likely(PyList_CheckExact(__pyx_t_2))) {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2);
            #if !CYTHON_ASSUME_SAFE_SIZE
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 3069, __pyx_L5_error)
            #endif
            if (__pyx_t_3 >= __pyx_temp) break;
          }
          __pyx_t_5 = __Pyx_PyList_GetItemRefFast(__pyx_t_2, __pyx_t_3, __Pyx_ReferenceSharing_OwnStrongReference);
          ++__pyx_t_3;
        } else {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2);
            #if !CYTHON_ASSUME_SAFE_SIZE
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 3069, __pyx_L5_error)
            #endif
            if (__pyx_t_3 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_5 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3));
          #else
          __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_3);
          #endif
          ++__pyx_t_3;
        }
        if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 3069, __pyx_L5_error)
      } else {
        __pyx_t_5 = __pyx_t_4(__pyx_t_2);
        if (unlikely(!__pyx_t_5)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(1, 3069, __pyx_L5_error)
            PyErr_Clear();
          }
          break;
        }
      }
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_XDECREF_SET(__pyx_8genexpr9__pyx_v_field, __pyx_t_5);
      __pyx_t_5 = 0;
      __pyx_t_6 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_empty_array); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 3069, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_8genexpr9__pyx_v_field, __pyx_mstate_global->__pyx_n_u_type); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 3069, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
        assert(__pyx_t_6);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
        __pyx_t_9 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_8};
        __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 3069, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_5);
      }
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(1, 3069, __pyx_L5_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_8genexpr9__pyx_v_field); __pyx_8genexpr9__pyx_v_field = 0;
    goto __pyx_L9_exit_scope;
    __pyx_L5_error:;
    __Pyx_XDECREF(__pyx_8genexpr9__pyx_v_field); __pyx_8genexpr9__pyx_v_field = 0;
    goto __pyx_L1_error;
    __pyx_L9_exit_scope:;
  } /* exit inner scope */
  __pyx_v_arrays = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyarrow/types.pxi":3070
 *         """
 *         arrays = [_empty_array(field.type) for field in self]
 *         return Table.from_arrays(arrays, schema=self)             # <<<<<<<<<<<<<<
 * 
 *     def equals(self, Schema other not None, bint check_metadata=False):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Table);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_9 = 0;
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, __pyx_v_arrays};
    __pyx_t_5 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 3070, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_schema, ((PyObject *)__pyx_v_self), __pyx_t_5, __pyx_callargs+2, 0) < (0)) __PYX_ERR(1, 3070, __pyx_L1_error)
    __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_from_arrays, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_5);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3070, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":3044
 *             return NotImplemented
 * 
 *     def empty_table(self):             # <<<<<<<<<<<<<<
 *         """
 *         Provide an empty table according to the schema.
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("pyarrow.lib.Schema.empty_table", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_arrays);
  __Pyx_XDECREF(__pyx_8genexpr9__pyx_v_field);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":3072
 *         return Table.from_arrays(arrays, schema=self)
 * 
 *     def equals(self, Schema other not None, bint check_metadata=False):             # <<<<<<<<<<<<<<
 *         """
 *         Test if this schema is equal to the other
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_6Schema_22equals(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_6Schema_21equals, "Schema.equals(self, Schema other, bool check_metadata=False)\n\nTest if this schema is equal to the other\n\nParameters\n----------\nother :  pyarrow.Schema\ncheck_metadata : bool, default False\n    Key/value metadata must be equal too\n\nReturns\n-------\nis_equal : bool\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> schema1 = pa.schema([\n...     pa.field('n_legs', pa.int64()),\n...     pa.field('animals', pa.string())],\n...     metadata={\"n_legs\": \"Number of legs per animal\"})\n>>> schema2 = pa.schema([\n...     ('some_int', pa.int32()),\n...     ('some_string', pa.string())\n... ])\n\nTest two equal schemas:\n\n>>> schema1.equals(schema1)\nTrue\n\nTest two unequal schemas:\n\n>>> schema1.equals(schema2)\nFalse");
static PyMethodDef __pyx_mdef_7pyarrow_3lib_6Schema_22equals = {"equals", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_6Schema_22equals, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_6Schema_21equals};
static PyObject *__pyx_pw_7pyarrow_3lib_6Schema_22equals(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_7pyarrow_3lib_Schema *__pyx_v_other = 0;
  int __pyx_v_check_metadata;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("equals (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_other,&__pyx_mstate_global->__pyx_n_u_check_metadata,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 3072, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 3072, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3072, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "equals", 0) < (0)) __PYX_ERR(1, 3072, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("equals", 0, 1, 2, i); __PYX_ERR(1, 3072, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 3072, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3072, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_other = ((struct __pyx_obj_7pyarrow_3lib_Schema *)values[0]);
    if (values[1]) {
      __pyx_v_check_metadata = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_check_metadata == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 3072, __pyx_L3_error)
    } else {
      __pyx_v_check_metadata = ((int)0);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("equals", 0, 1, 2, __pyx_nargs); __PYX_ERR(1, 3072, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("pyarrow.lib.Schema.equals", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Schema, 0, "other", 0))) __PYX_ERR(1, 3072, __pyx_L1_error)
  __pyx_r = __pyx_pf_7pyarrow_3lib_6Schema_21equals(((struct __pyx_obj_7pyarrow_3lib_Schema *)__pyx_v_self), __pyx_v_other, __pyx_v_check_metadata);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7pyarrow_3lib_6Schema_21equals(struct __pyx_obj_7pyarrow_3lib_Schema *__pyx_v_self, struct __pyx_obj_7pyarrow_3lib_Schema *__pyx_v_other, int __pyx_v_check_metadata) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("equals", 0);

  /* "pyarrow/types.pxi":3108
 *         False
 *         """
 *         return self.sp_schema.get().Equals(deref(other.schema),             # <<<<<<<<<<<<<<
 *                                            check_metadata)
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_schema");
    __PYX_ERR(1, 3108, __pyx_L1_error)
  }

  /* "pyarrow/types.pxi":3109
 *         """
 *         return self.sp_schema.get().Equals(deref(other.schema),
 *                                            check_metadata)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
*/
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->sp_schema.get()->Equals((*__pyx_v_other->schema), __pyx_v_check_metadata)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3108, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyarrow/types.pxi":3072
 *         return Table.from_arrays(arrays, schema=self)
 * 
 *     def equals(self, Schema other not None, bint check_metadata=False):             # <<<<<<<<<<<<<<
 *         """
 *         Test if this schema is equal to the other
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyarrow.lib.Schema.equals", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyarrow/types.pxi":3111
 *                                            check_metadata)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def from_pandas(cls, df, preserve_index=None):
 *         """
*/

/* Python wrapper */
static PyObject *__pyx_pw_7pyarrow_3lib_6Schema_24from_pandas(PyObject *__pyx_v_cls, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_6Schema_23from_pandas, "Schema.from_pandas(cls, df, preserve_index=None)\n\nReturns implied schema from dataframe\n\nParameters\n----------\ndf : pandas.DataFrame\n\npreserve_index : bool, optional\n    Whether to store the index as an additional field in the resulting\n    ``Schema``. The default of None will store the index as a field,\n    except for RangeIndex which is stored as metadata only. Use\n    ``preserve_index=True`` to force it to be stored as a field.\n\nReturns\n-------\npyarrow.Schema\n\nExamples\n--------\n>>> import pandas as pd\n>>> import pyarrow as pa\n>>> df = pd.DataFrame({\n...     'int': [1, 2],\n...     'str': ['a', 'b']\n... })\n\nCreate an Arrow Schema from the schema of a pandas dataframe:\n\n>>> pa.Schema.from_pandas(df)\nint: int64\nstr: string\n-- schema metadata --\npandas: '{\"index_columns\": [{\"kind\": \"range\", \"name\": null, ...");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_6Schema_24from_pandas = {"from_pandas", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_6Schema_24from_pandas, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_6Schema_23from_pandas};
    static PyObject *__pyx_pw_7pyarrow_3lib_6Schema_24from_pandas(PyObject *__pyx_v_cls, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_df = 0;
      PyObject *__pyx_v_preserve_index = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[2] = {0,0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("from_pandas (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_df,&__pyx_mstate_global->__pyx_n_u_preserve_index,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 3111, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 3111, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3111, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "from_pandas", 0) < (0)) __PYX_ERR(1, 3111, __pyx_L3_error)

          /* "pyarrow/types.pxi":3112
 * 
 *     @classmethod
 *     def from_pandas(cls, df, preserve_index=None):             # <<<<<<<<<<<<<<
 *         """
 *         Returns implied schema from dataframe
*/
          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("from_pandas", 0, 1, 2, i); __PYX_ERR(1, 3111, __pyx_L3_error) }
          }
        } else {
          switch (__pyx_nargs) {
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 3111, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3111, __pyx_L3_error)
            break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
        }
        __pyx_v_df = values[0];
        __pyx_v_preserve_index = values[1];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("from_pandas", 0, 1, 2, __pyx_nargs); __PYX_ERR(1, 3111, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.Schema.from_pandas", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_6Schema_23from_pandas(((PyTypeObject*)__pyx_v_cls), __pyx_v_df, __pyx_v_preserve_index);

      /* "pyarrow/types.pxi":3111
 *                                            check_metadata)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def from_pandas(cls, df, preserve_index=None):
 *         """
*/

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_6Schema_23from_pandas(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_df, PyObject *__pyx_v_preserve_index) {
      PyObject *__pyx_v_dataframe_to_types = NULL;
      PyObject *__pyx_v_names = NULL;
      PyObject *__pyx_v_types = NULL;
      PyObject *__pyx_v_metadata = NULL;
      PyObject *__pyx_v_fields = NULL;
      PyObject *__pyx_v_name = NULL;
      PyObject *__pyx_v_type_ = NULL;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      Py_ssize_t __pyx_t_3;
      PyObject *__pyx_t_4 = NULL;
      PyObject *__pyx_t_5 = NULL;
      size_t __pyx_t_6;
      PyObject *__pyx_t_7 = NULL;
      PyObject *__pyx_t_8 = NULL;
      PyObject *(*__pyx_t_9)(PyObject *);
      PyObject *(*__pyx_t_10)(PyObject *);
      int __pyx_t_11;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("from_pandas", 0);

      /* "pyarrow/types.pxi":3147
 *         pandas: '{"index_columns": [{"kind": "range", "name": null, ...
 *         """
 *         from pyarrow.pandas_compat import dataframe_to_types             # <<<<<<<<<<<<<<
 *         names, types, metadata = dataframe_to_types(
 *             df,
*/
      {
        PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_dataframe_to_types};
        __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_pyarrow_pandas_compat, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3147, __pyx_L1_error)
      }
      __pyx_t_1 = __pyx_t_2;
      __Pyx_GOTREF(__pyx_t_1);
      {
        PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_dataframe_to_types};
        __pyx_t_3 = 0; {
          __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_1, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3147, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          switch (__pyx_t_3) {
            case 0:
            __Pyx_INCREF(__pyx_t_4);
            __pyx_v_dataframe_to_types = __pyx_t_4;
            break;
            default:;
          }
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "pyarrow/types.pxi":3148
 *         """
 *         from pyarrow.pandas_compat import dataframe_to_types
 *         names, types, metadata = dataframe_to_types(             # <<<<<<<<<<<<<<
 *             df,
 *             preserve_index=preserve_index
*/
      __pyx_t_4 = NULL;
      __Pyx_INCREF(__pyx_v_dataframe_to_types);
      __pyx_t_5 = __pyx_v_dataframe_to_types; 

      /* "pyarrow/types.pxi":3150
 *         names, types, metadata = dataframe_to_types(
 *             df,
 *             preserve_index=preserve_index             # <<<<<<<<<<<<<<
 *         )
 *         fields = []
*/
      __pyx_t_6 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
        assert(__pyx_t_4);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
        __pyx_t_6 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_4, __pyx_v_df};
        __pyx_t_7 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 3148, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_preserve_index, __pyx_v_preserve_index, __pyx_t_7, __pyx_callargs+2, 0) < (0)) __PYX_ERR(1, 3148, __pyx_L1_error)
        __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_7);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3148, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
        PyObject* sequence = __pyx_t_1;
        Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
        if (unlikely(size != 3)) {
          if (size > 3) __Pyx_RaiseTooManyValuesError(3);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          __PYX_ERR(1, 3148, __pyx_L1_error)
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0);
          __Pyx_INCREF(__pyx_t_5);
          __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1);
          __Pyx_INCREF(__pyx_t_7);
          __pyx_t_4 = PyTuple_GET_ITEM(sequence, 2);
          __Pyx_INCREF(__pyx_t_4);
        } else {
          __pyx_t_5 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference);
          if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 3148, __pyx_L1_error)
          __Pyx_XGOTREF(__pyx_t_5);
          __pyx_t_7 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference);
          if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 3148, __pyx_L1_error)
          __Pyx_XGOTREF(__pyx_t_7);
          __pyx_t_4 = __Pyx_PyList_GetItemRefFast(sequence, 2, __Pyx_ReferenceSharing_SharedReference);
          if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3148, __pyx_L1_error)
          __Pyx_XGOTREF(__pyx_t_4);
        }
        #else
        __pyx_t_5 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 3148, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_7 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 3148, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3148, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      } else {
        Py_ssize_t index = -1;
        __pyx_t_8 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 3148, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_9 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_8);
        index = 0; __pyx_t_5 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_5)) goto __pyx_L3_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_5);
        index = 1; __pyx_t_7 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_7)) goto __pyx_L3_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_7);
        index = 2; __pyx_t_4 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_4)) goto __pyx_L3_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_4);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 3) < (0)) __PYX_ERR(1, 3148, __pyx_L1_error)
        __pyx_t_9 = NULL;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        goto __pyx_L4_unpacking_done;
        __pyx_L3_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_t_9 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        __PYX_ERR(1, 3148, __pyx_L1_error)
        __pyx_L4_unpacking_done:;
      }

      /* "pyarrow/types.pxi":3148
 *         """
 *         from pyarrow.pandas_compat import dataframe_to_types
 *         names, types, metadata = dataframe_to_types(             # <<<<<<<<<<<<<<
 *             df,
 *             preserve_index=preserve_index
*/
      __pyx_v_names = __pyx_t_5;
      __pyx_t_5 = 0;
      __pyx_v_types = __pyx_t_7;
      __pyx_t_7 = 0;
      __pyx_v_metadata = __pyx_t_4;
      __pyx_t_4 = 0;

      /* "pyarrow/types.pxi":3152
 *             preserve_index=preserve_index
 *         )
 *         fields = []             # <<<<<<<<<<<<<<
 *         for name, type_ in zip(names, types):
 *             fields.append(field(name, type_))
*/
      __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3152, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_v_fields = ((PyObject*)__pyx_t_1);
      __pyx_t_1 = 0;

      /* "pyarrow/types.pxi":3153
 *         )
 *         fields = []
 *         for name, type_ in zip(names, types):             # <<<<<<<<<<<<<<
 *             fields.append(field(name, type_))
 *         return schema(fields, metadata)
*/
      __pyx_t_4 = NULL;
      __pyx_t_6 = 1;
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_v_names, __pyx_v_types};
        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_zip, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3153, __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_3 = 0;
        __pyx_t_10 = NULL;
      } else {
        __pyx_t_3 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3153, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_10 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 3153, __pyx_L1_error)
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      for (;;) {
        if (likely(!__pyx_t_10)) {
          if (likely(PyList_CheckExact(__pyx_t_4))) {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_4);
              #if !CYTHON_ASSUME_SAFE_SIZE
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 3153, __pyx_L1_error)
              #endif
              if (__pyx_t_3 >= __pyx_temp) break;
            }
            __pyx_t_1 = __Pyx_PyList_GetItemRefFast(__pyx_t_4, __pyx_t_3, __Pyx_ReferenceSharing_OwnStrongReference);
            ++__pyx_t_3;
          } else {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_4);
              #if !CYTHON_ASSUME_SAFE_SIZE
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 3153, __pyx_L1_error)
              #endif
              if (__pyx_t_3 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_1 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_3));
            #else
            __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_3);
            #endif
            ++__pyx_t_3;
          }
          if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3153, __pyx_L1_error)
        } else {
          __pyx_t_1 = __pyx_t_10(__pyx_t_4);
          if (unlikely(!__pyx_t_1)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(1, 3153, __pyx_L1_error)
              PyErr_Clear();
            }
            break;
          }
        }
        __Pyx_GOTREF(__pyx_t_1);
        if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
          PyObject* sequence = __pyx_t_1;
          Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
          if (unlikely(size != 2)) {
            if (size > 2) __Pyx_RaiseTooManyValuesError(2);
            else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
            __PYX_ERR(1, 3153, __pyx_L1_error)
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          if (likely(PyTuple_CheckExact(sequence))) {
            __pyx_t_7 = PyTuple_GET_ITEM(sequence, 0);
            __Pyx_INCREF(__pyx_t_7);
            __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1);
            __Pyx_INCREF(__pyx_t_5);
          } else {
            __pyx_t_7 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference);
            if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 3153, __pyx_L1_error)
            __Pyx_XGOTREF(__pyx_t_7);
            __pyx_t_5 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference);
            if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 3153, __pyx_L1_error)
            __Pyx_XGOTREF(__pyx_t_5);
          }
          #else
          __pyx_t_7 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 3153, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __pyx_t_5 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 3153, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        } else {
          Py_ssize_t index = -1;
          __pyx_t_8 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 3153, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __pyx_t_9 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_8);
          index = 0; __pyx_t_7 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_7)) goto __pyx_L7_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_7);
          index = 1; __pyx_t_5 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_5)) goto __pyx_L7_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_5);
          if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < (0)) __PYX_ERR(1, 3153, __pyx_L1_error)
          __pyx_t_9 = NULL;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          goto __pyx_L8_unpacking_done;
          __pyx_L7_unpacking_failed:;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_t_9 = NULL;
          if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
          __PYX_ERR(1, 3153, __pyx_L1_error)
          __pyx_L8_unpacking_done:;
        }
        __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_7);
        __pyx_t_7 = 0;
        __Pyx_XDECREF_SET(__pyx_v_type_, __pyx_t_5);
        __pyx_t_5 = 0;

        /* "pyarrow/types.pxi":3154
 *         fields = []
 *         for name, type_ in zip(names, types):
 *             fields.append(field(name, type_))             # <<<<<<<<<<<<<<
 *         return schema(fields, metadata)
 * 
*/
        __pyx_t_5 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_field); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 3154, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_6 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_7))) {
          __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
          assert(__pyx_t_5);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
          __pyx_t_6 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_v_name, __pyx_v_type_};
          __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3154, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
        }
        __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_fields, __pyx_t_1); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(1, 3154, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

        /* "pyarrow/types.pxi":3153
 *         )
 *         fields = []
 *         for name, type_ in zip(names, types):             # <<<<<<<<<<<<<<
 *             fields.append(field(name, type_))
 *         return schema(fields, metadata)
*/
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "pyarrow/types.pxi":3155
 *         for name, type_ in zip(names, types):
 *             fields.append(field(name, type_))
 *         return schema(fields, metadata)             # <<<<<<<<<<<<<<
 * 
 *     def field(self, i):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_schema); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 3155, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_6 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_7);
        assert(__pyx_t_1);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
        __pyx_t_6 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_1, __pyx_v_fields, __pyx_v_metadata};
        __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3155, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
      }
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L0;

      /* "pyarrow/types.pxi":3111
 *                                            check_metadata)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def from_pandas(cls, df, preserve_index=None):
 *         """
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_8);
      __Pyx_AddTraceback("pyarrow.lib.Schema.from_pandas", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_dataframe_to_types);
      __Pyx_XDECREF(__pyx_v_names);
      __Pyx_XDECREF(__pyx_v_types);
      __Pyx_XDECREF(__pyx_v_metadata);
      __Pyx_XDECREF(__pyx_v_fields);
      __Pyx_XDECREF(__pyx_v_name);
      __Pyx_XDECREF(__pyx_v_type_);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/types.pxi":3157
 *         return schema(fields, metadata)
 * 
 *     def field(self, i):             # <<<<<<<<<<<<<<
 *         """
 *         Select a field by its column name or numeric index.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_6Schema_26field(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_6Schema_25field, "Schema.field(self, i)\n\nSelect a field by its column name or numeric index.\n\nParameters\n----------\ni : int or string\n\nReturns\n-------\npyarrow.Field\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> schema = pa.schema([\n...     pa.field('n_legs', pa.int64()),\n...     pa.field('animals', pa.string())])\n\nSelect the second field:\n\n>>> schema.field(1)\npyarrow.Field<animals: string>\n\nSelect the field of the column named 'n_legs':\n\n>>> schema.field('n_legs')\npyarrow.Field<n_legs: int64>");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_6Schema_26field = {"field", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_6Schema_26field, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_6Schema_25field};
    static PyObject *__pyx_pw_7pyarrow_3lib_6Schema_26field(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_i = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("field (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_i,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 3157, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3157, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "field", 0) < (0)) __PYX_ERR(1, 3157, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("field", 1, 1, 1, i); __PYX_ERR(1, 3157, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 1)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3157, __pyx_L3_error)
        }
        __pyx_v_i = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("field", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3157, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.Schema.field", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_6Schema_25field(((struct __pyx_obj_7pyarrow_3lib_Schema *)__pyx_v_self), __pyx_v_i);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_6Schema_25field(struct __pyx_obj_7pyarrow_3lib_Schema *__pyx_v_self, PyObject *__pyx_v_i) {
      PyObject *__pyx_v_field_index = NULL;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      int __pyx_t_1;
      int __pyx_t_2;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      size_t __pyx_t_5;
      PyObject *__pyx_t_6 = NULL;
      PyObject *__pyx_t_7[3];
      PyObject *__pyx_t_8 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("field", 0);

      /* "pyarrow/types.pxi":3186
 *         pyarrow.Field<n_legs: int64>
 *         """
 *         if isinstance(i, (bytes, str)):             # <<<<<<<<<<<<<<
 *             field_index = self.get_field_index(i)
 *             if field_index < 0:
*/
      __pyx_t_2 = PyBytes_Check(__pyx_v_i); 
      if (!__pyx_t_2) {
      } else {
        __pyx_t_1 = __pyx_t_2;
        goto __pyx_L4_bool_binop_done;
      }
      __pyx_t_2 = PyUnicode_Check(__pyx_v_i); 
      __pyx_t_1 = __pyx_t_2;
      __pyx_L4_bool_binop_done:;
      if (__pyx_t_1) {

        /* "pyarrow/types.pxi":3187
 *         """
 *         if isinstance(i, (bytes, str)):
 *             field_index = self.get_field_index(i)             # <<<<<<<<<<<<<<
 *             if field_index < 0:
 *                 raise KeyError(f"Column {i} does not exist in schema")
*/
        __pyx_t_4 = ((PyObject *)__pyx_v_self);
        __Pyx_INCREF(__pyx_t_4);
        __pyx_t_5 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_i};
          __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_field_index, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3187, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        __pyx_v_field_index = __pyx_t_3;
        __pyx_t_3 = 0;

        /* "pyarrow/types.pxi":3188
 *         if isinstance(i, (bytes, str)):
 *             field_index = self.get_field_index(i)
 *             if field_index < 0:             # <<<<<<<<<<<<<<
 *                 raise KeyError(f"Column {i} does not exist in schema")
 *             else:
*/
        __pyx_t_3 = PyObject_RichCompare(__pyx_v_field_index, __pyx_mstate_global->__pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3188, __pyx_L1_error)
        __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 3188, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(__pyx_t_1)) {

          /* "pyarrow/types.pxi":3189
 *             field_index = self.get_field_index(i)
 *             if field_index < 0:
 *                 raise KeyError(f"Column {i} does not exist in schema")             # <<<<<<<<<<<<<<
 *             else:
 *                 return self._field(field_index)
*/
          __pyx_t_4 = NULL;
          __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_v_i, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 3189, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_t_7[0] = __pyx_mstate_global->__pyx_kp_u_Column;
          __pyx_t_7[1] = __pyx_t_6;
          __pyx_t_7[2] = __pyx_mstate_global->__pyx_kp_u_does_not_exist_in_schema;
          __pyx_t_8 = __Pyx_PyUnicode_Join(__pyx_t_7, 3, 7 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6) + 25, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6));
          if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 3189, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __pyx_t_5 = 1;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_8};
            __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_KeyError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
            if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3189, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
          }
          __Pyx_Raise(__pyx_t_3, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __PYX_ERR(1, 3189, __pyx_L1_error)

          /* "pyarrow/types.pxi":3188
 *         if isinstance(i, (bytes, str)):
 *             field_index = self.get_field_index(i)
 *             if field_index < 0:             # <<<<<<<<<<<<<<
 *                 raise KeyError(f"Column {i} does not exist in schema")
 *             else:
*/
        }

        /* "pyarrow/types.pxi":3191
 *                 raise KeyError(f"Column {i} does not exist in schema")
 *             else:
 *                 return self._field(field_index)             # <<<<<<<<<<<<<<
 *         elif isinstance(i, int):
 *             return self._field(i)
*/
        /*else*/ {
          __Pyx_XDECREF(__pyx_r);
          __pyx_t_8 = ((PyObject *)__pyx_v_self);
          __Pyx_INCREF(__pyx_t_8);
          __pyx_t_5 = 0;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_v_field_index};
            __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_field_2, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3191, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
          }
          __pyx_r = __pyx_t_3;
          __pyx_t_3 = 0;
          goto __pyx_L0;
        }

        /* "pyarrow/types.pxi":3186
 *         pyarrow.Field<n_legs: int64>
 *         """
 *         if isinstance(i, (bytes, str)):             # <<<<<<<<<<<<<<
 *             field_index = self.get_field_index(i)
 *             if field_index < 0:
*/
      }

      /* "pyarrow/types.pxi":3192
 *             else:
 *                 return self._field(field_index)
 *         elif isinstance(i, int):             # <<<<<<<<<<<<<<
 *             return self._field(i)
 *         else:
*/
      __pyx_t_1 = PyLong_Check(__pyx_v_i); 
      if (likely(__pyx_t_1)) {

        /* "pyarrow/types.pxi":3193
 *                 return self._field(field_index)
 *         elif isinstance(i, int):
 *             return self._field(i)             # <<<<<<<<<<<<<<
 *         else:
 *             raise TypeError("Index must either be string or integer")
*/
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_8 = ((PyObject *)__pyx_v_self);
        __Pyx_INCREF(__pyx_t_8);
        __pyx_t_5 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_v_i};
          __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_field_2, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3193, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        __pyx_r = __pyx_t_3;
        __pyx_t_3 = 0;
        goto __pyx_L0;

        /* "pyarrow/types.pxi":3192
 *             else:
 *                 return self._field(field_index)
 *         elif isinstance(i, int):             # <<<<<<<<<<<<<<
 *             return self._field(i)
 *         else:
*/
      }

      /* "pyarrow/types.pxi":3195
 *             return self._field(i)
 *         else:
 *             raise TypeError("Index must either be string or integer")             # <<<<<<<<<<<<<<
 * 
 *     def _field(self, int i):
*/
      /*else*/ {
        __pyx_t_8 = NULL;
        __pyx_t_5 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_mstate_global->__pyx_kp_u_Index_must_either_be_string_or_i};
          __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3195, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        __Pyx_Raise(__pyx_t_3, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __PYX_ERR(1, 3195, __pyx_L1_error)
      }

      /* "pyarrow/types.pxi":3157
 *         return schema(fields, metadata)
 * 
 *     def field(self, i):             # <<<<<<<<<<<<<<
 *         """
 *         Select a field by its column name or numeric index.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_8);
      __Pyx_AddTraceback("pyarrow.lib.Schema.field", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_field_index);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/types.pxi":3197
 *             raise TypeError("Index must either be string or integer")
 * 
 *     def _field(self, int i):             # <<<<<<<<<<<<<<
 *         """
 *         Select a field by its numeric index.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_6Schema_28_field(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_6Schema_27_field, "Schema._field(self, int i)\n\nSelect a field by its numeric index.\n\nParameters\n----------\ni : int\n\nReturns\n-------\npyarrow.Field");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_6Schema_28_field = {"_field", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_6Schema_28_field, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_6Schema_27_field};
    static PyObject *__pyx_pw_7pyarrow_3lib_6Schema_28_field(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      int __pyx_v_i;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("_field (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_i,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 3197, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3197, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_field", 0) < (0)) __PYX_ERR(1, 3197, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_field", 1, 1, 1, i); __PYX_ERR(1, 3197, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 1)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3197, __pyx_L3_error)
        }
        __pyx_v_i = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_i == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 3197, __pyx_L3_error)
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("_field", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3197, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.Schema._field", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_6Schema_27_field(((struct __pyx_obj_7pyarrow_3lib_Schema *)__pyx_v_self), __pyx_v_i);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_6Schema_27_field(struct __pyx_obj_7pyarrow_3lib_Schema *__pyx_v_self, int __pyx_v_i) {
      int __pyx_v_index;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      Py_ssize_t __pyx_t_1;
      PyObject *__pyx_t_2 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("_field", 0);

      /* "pyarrow/types.pxi":3209
 *         pyarrow.Field
 *         """
 *         cdef int index = <int> _normalize_index(i, self.schema.num_fields())             # <<<<<<<<<<<<<<
 *         return pyarrow_wrap_field(self.schema.field(index))
 * 
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "schema");
        __PYX_ERR(1, 3209, __pyx_L1_error)
      }
      __pyx_t_1 = __pyx_f_7pyarrow_3lib__normalize_index(__pyx_v_i, __pyx_v_self->schema->num_fields()); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1L))) __PYX_ERR(1, 3209, __pyx_L1_error)
      __pyx_v_index = ((int)__pyx_t_1);

      /* "pyarrow/types.pxi":3210
 *         """
 *         cdef int index = <int> _normalize_index(i, self.schema.num_fields())
 *         return pyarrow_wrap_field(self.schema.field(index))             # <<<<<<<<<<<<<<
 * 
 *     def field_by_name(self, name):
*/
      __Pyx_XDECREF(__pyx_r);
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "schema");
        __PYX_ERR(1, 3210, __pyx_L1_error)
      }
      __pyx_t_2 = pyarrow_wrap_field(__pyx_v_self->schema->field(__pyx_v_index)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3210, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;

      /* "pyarrow/types.pxi":3197
 *             raise TypeError("Index must either be string or integer")
 * 
 *     def _field(self, int i):             # <<<<<<<<<<<<<<
 *         """
 *         Select a field by its numeric index.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_AddTraceback("pyarrow.lib.Schema._field", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/types.pxi":3212
 *         return pyarrow_wrap_field(self.schema.field(index))
 * 
 *     def field_by_name(self, name):             # <<<<<<<<<<<<<<
 *         """
 *         DEPRECATED
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_6Schema_30field_by_name(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_6Schema_29field_by_name, "Schema.field_by_name(self, name)\n\nDEPRECATED\n\nParameters\n----------\nname : str\n\nReturns\n-------\nfield: pyarrow.Field");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_6Schema_30field_by_name = {"field_by_name", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_6Schema_30field_by_name, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_6Schema_29field_by_name};
    static PyObject *__pyx_pw_7pyarrow_3lib_6Schema_30field_by_name(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_name = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("field_by_name (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_name,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 3212, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3212, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "field_by_name", 0) < (0)) __PYX_ERR(1, 3212, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("field_by_name", 1, 1, 1, i); __PYX_ERR(1, 3212, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 1)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3212, __pyx_L3_error)
        }
        __pyx_v_name = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("field_by_name", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3212, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.Schema.field_by_name", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_6Schema_29field_by_name(((struct __pyx_obj_7pyarrow_3lib_Schema *)__pyx_v_self), __pyx_v_name);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_6Schema_29field_by_name(struct __pyx_obj_7pyarrow_3lib_Schema *__pyx_v_self, PyObject *__pyx_v_name) {
      std::vector<std::shared_ptr< arrow::Field> >  __pyx_v_results;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      size_t __pyx_t_5;
      std::string __pyx_t_6;
      int __pyx_t_7;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("field_by_name", 0);

      /* "pyarrow/types.pxi":3227
 *             vector[shared_ptr[CField]] results
 * 
 *         warnings.warn(             # <<<<<<<<<<<<<<
 *             "The 'field_by_name' method is deprecated, use 'field' instead",
 *             FutureWarning, stacklevel=2)
*/
      __pyx_t_2 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_warnings); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3227, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_warn); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3227, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "pyarrow/types.pxi":3229
 *         warnings.warn(
 *             "The 'field_by_name' method is deprecated, use 'field' instead",
 *             FutureWarning, stacklevel=2)             # <<<<<<<<<<<<<<
 * 
 *         results = self.schema.GetAllFieldsByName(tobytes(name))
*/
      __pyx_t_5 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
        assert(__pyx_t_2);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
        __pyx_t_5 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[3 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_The_field_by_name_method_is_depr, ((PyObject *)(((PyTypeObject*)PyExc_FutureWarning)))};
        __pyx_t_3 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3227, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_stacklevel, __pyx_mstate_global->__pyx_int_2, __pyx_t_3, __pyx_callargs+3, 0) < (0)) __PYX_ERR(1, 3227, __pyx_L1_error)
        __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_3);
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3227, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "pyarrow/types.pxi":3231
 *             FutureWarning, stacklevel=2)
 * 
 *         results = self.schema.GetAllFieldsByName(tobytes(name))             # <<<<<<<<<<<<<<
 *         if results.size() == 0:
 *             return None
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "schema");
        __PYX_ERR(1, 3231, __pyx_L1_error)
      }
      __pyx_t_4 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_tobytes); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3231, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        assert(__pyx_t_4);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
        __pyx_t_5 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_name};
        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __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(1, 3231, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_t_6 = __pyx_convert_string_from_py_6libcpp_6string_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3231, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_v_results = __pyx_v_self->schema->GetAllFieldsByName(__pyx_t_6);

      /* "pyarrow/types.pxi":3232
 * 
 *         results = self.schema.GetAllFieldsByName(tobytes(name))
 *         if results.size() == 0:             # <<<<<<<<<<<<<<
 *             return None
 *         elif results.size() > 1:
*/
      __pyx_t_7 = (__pyx_v_results.size() == 0);
      if (__pyx_t_7) {

        /* "pyarrow/types.pxi":3233
 *         results = self.schema.GetAllFieldsByName(tobytes(name))
 *         if results.size() == 0:
 *             return None             # <<<<<<<<<<<<<<
 *         elif results.size() > 1:
 *             warnings.warn("Schema field name corresponds to more "
*/
        __Pyx_XDECREF(__pyx_r);
        __pyx_r = Py_None; __Pyx_INCREF(Py_None);
        goto __pyx_L0;

        /* "pyarrow/types.pxi":3232
 * 
 *         results = self.schema.GetAllFieldsByName(tobytes(name))
 *         if results.size() == 0:             # <<<<<<<<<<<<<<
 *             return None
 *         elif results.size() > 1:
*/
      }

      /* "pyarrow/types.pxi":3234
 *         if results.size() == 0:
 *             return None
 *         elif results.size() > 1:             # <<<<<<<<<<<<<<
 *             warnings.warn("Schema field name corresponds to more "
 *                           "than one field", UserWarning)
*/
      __pyx_t_7 = (__pyx_v_results.size() > 1);
      if (__pyx_t_7) {

        /* "pyarrow/types.pxi":3235
 *             return None
 *         elif results.size() > 1:
 *             warnings.warn("Schema field name corresponds to more "             # <<<<<<<<<<<<<<
 *                           "than one field", UserWarning)
 *             return None
*/
        __pyx_t_3 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_warnings); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3235, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_warn); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3235, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

        /* "pyarrow/types.pxi":3236
 *         elif results.size() > 1:
 *             warnings.warn("Schema field name corresponds to more "
 *                           "than one field", UserWarning)             # <<<<<<<<<<<<<<
 *             return None
 *         else:
*/
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_2))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Schema_field_name_corresponds_to, ((PyObject *)(((PyTypeObject*)PyExc_UserWarning)))};
          __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3235, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
        }
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

        /* "pyarrow/types.pxi":3237
 *             warnings.warn("Schema field name corresponds to more "
 *                           "than one field", UserWarning)
 *             return None             # <<<<<<<<<<<<<<
 *         else:
 *             return pyarrow_wrap_field(results[0])
*/
        __Pyx_XDECREF(__pyx_r);
        __pyx_r = Py_None; __Pyx_INCREF(Py_None);
        goto __pyx_L0;

        /* "pyarrow/types.pxi":3234
 *         if results.size() == 0:
 *             return None
 *         elif results.size() > 1:             # <<<<<<<<<<<<<<
 *             warnings.warn("Schema field name corresponds to more "
 *                           "than one field", UserWarning)
*/
      }

      /* "pyarrow/types.pxi":3239
 *             return None
 *         else:
 *             return pyarrow_wrap_field(results[0])             # <<<<<<<<<<<<<<
 * 
 *     def get_field_index(self, name):
*/
      /*else*/ {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_1 = pyarrow_wrap_field((__pyx_v_results[0])); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3239, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_r = __pyx_t_1;
        __pyx_t_1 = 0;
        goto __pyx_L0;
      }

      /* "pyarrow/types.pxi":3212
 *         return pyarrow_wrap_field(self.schema.field(index))
 * 
 *     def field_by_name(self, name):             # <<<<<<<<<<<<<<
 *         """
 *         DEPRECATED
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_AddTraceback("pyarrow.lib.Schema.field_by_name", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/types.pxi":3241
 *             return pyarrow_wrap_field(results[0])
 * 
 *     def get_field_index(self, name):             # <<<<<<<<<<<<<<
 *         """
 *         Return index of the unique field with the given name.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_6Schema_32get_field_index(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_6Schema_31get_field_index, "Schema.get_field_index(self, name)\n\nReturn index of the unique field with the given name.\n\nParameters\n----------\nname : str\n    The name of the field to look up.\n\nReturns\n-------\nindex : int\n    The index of the field with the given name; -1 if the\n    name isn't found or there are several fields with the given\n    name.\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> schema = pa.schema([\n...     pa.field('n_legs', pa.int64()),\n...     pa.field('animals', pa.string())])\n\nGet the index of the field named 'animals':\n\n>>> schema.get_field_index(\"animals\")\n1\n\nIndex in case of several fields with the given name:\n\n>>> schema = pa.schema([\n...     pa.field('n_legs', pa.int64()),\n...     pa.field('animals', pa.string()),\n...     pa.field('animals', pa.bool_())],\n...     metadata={\"n_legs\": \"Number of legs per animal\"})\n>>> schema.get_field_index(\"animals\")\n-1");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_6Schema_32get_field_index = {"get_field_index", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_6Schema_32get_field_index, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_6Schema_31get_field_index};
    static PyObject *__pyx_pw_7pyarrow_3lib_6Schema_32get_field_index(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_name = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("get_field_index (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_name,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 3241, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3241, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "get_field_index", 0) < (0)) __PYX_ERR(1, 3241, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("get_field_index", 1, 1, 1, i); __PYX_ERR(1, 3241, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 1)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3241, __pyx_L3_error)
        }
        __pyx_v_name = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("get_field_index", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3241, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.Schema.get_field_index", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_6Schema_31get_field_index(((struct __pyx_obj_7pyarrow_3lib_Schema *)__pyx_v_self), __pyx_v_name);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_6Schema_31get_field_index(struct __pyx_obj_7pyarrow_3lib_Schema *__pyx_v_self, PyObject *__pyx_v_name) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      size_t __pyx_t_4;
      std::string __pyx_t_5;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("get_field_index", 0);

      /* "pyarrow/types.pxi":3279
 *         -1
 *         """
 *         return self.schema.GetFieldIndex(tobytes(name))             # <<<<<<<<<<<<<<
 * 
 *     def get_all_field_indices(self, name):
*/
      __Pyx_XDECREF(__pyx_r);
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "schema");
        __PYX_ERR(1, 3279, __pyx_L1_error)
      }
      __pyx_t_2 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_tobytes); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3279, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
        assert(__pyx_t_2);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
        __pyx_t_4 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_name};
        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3279, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_t_5 = __pyx_convert_string_from_py_6libcpp_6string_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3279, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_v_self->schema->GetFieldIndex(__pyx_t_5)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3279, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/types.pxi":3241
 *             return pyarrow_wrap_field(results[0])
 * 
 *     def get_field_index(self, name):             # <<<<<<<<<<<<<<
 *         """
 *         Return index of the unique field with the given name.
*/

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

    /* "pyarrow/types.pxi":3281
 *         return self.schema.GetFieldIndex(tobytes(name))
 * 
 *     def get_all_field_indices(self, name):             # <<<<<<<<<<<<<<
 *         """
 *         Return sorted list of indices for the fields with the given name.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_6Schema_34get_all_field_indices(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_6Schema_33get_all_field_indices, "Schema.get_all_field_indices(self, name)\n\nReturn sorted list of indices for the fields with the given name.\n\nParameters\n----------\nname : str\n    The name of the field to look up.\n\nReturns\n-------\nindices : List[int]\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> schema = pa.schema([\n...     pa.field('n_legs', pa.int64()),\n...     pa.field('animals', pa.string()),\n...     pa.field('animals', pa.bool_())])\n\nGet the indexes of the fields named 'animals':\n\n>>> schema.get_all_field_indices(\"animals\")\n[1, 2]");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_6Schema_34get_all_field_indices = {"get_all_field_indices", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_6Schema_34get_all_field_indices, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_6Schema_33get_all_field_indices};
    static PyObject *__pyx_pw_7pyarrow_3lib_6Schema_34get_all_field_indices(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_name = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("get_all_field_indices (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_name,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 3281, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3281, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "get_all_field_indices", 0) < (0)) __PYX_ERR(1, 3281, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("get_all_field_indices", 1, 1, 1, i); __PYX_ERR(1, 3281, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 1)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3281, __pyx_L3_error)
        }
        __pyx_v_name = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("get_all_field_indices", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3281, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.Schema.get_all_field_indices", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_6Schema_33get_all_field_indices(((struct __pyx_obj_7pyarrow_3lib_Schema *)__pyx_v_self), __pyx_v_name);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_6Schema_33get_all_field_indices(struct __pyx_obj_7pyarrow_3lib_Schema *__pyx_v_self, PyObject *__pyx_v_name) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      size_t __pyx_t_4;
      std::string __pyx_t_5;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("get_all_field_indices", 0);

      /* "pyarrow/types.pxi":3307
 *         [1, 2]
 *         """
 *         return self.schema.GetAllFieldIndices(tobytes(name))             # <<<<<<<<<<<<<<
 * 
 *     def append(self, Field field):
*/
      __Pyx_XDECREF(__pyx_r);
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "schema");
        __PYX_ERR(1, 3307, __pyx_L1_error)
      }
      __pyx_t_2 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_tobytes); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3307, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
        assert(__pyx_t_2);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
        __pyx_t_4 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_name};
        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3307, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_t_5 = __pyx_convert_string_from_py_6libcpp_6string_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3307, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __pyx_convert_vector_to_py_int(__pyx_v_self->schema->GetAllFieldIndices(__pyx_t_5)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3307, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/types.pxi":3281
 *         return self.schema.GetFieldIndex(tobytes(name))
 * 
 *     def get_all_field_indices(self, name):             # <<<<<<<<<<<<<<
 *         """
 *         Return sorted list of indices for the fields with the given name.
*/

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

    /* "pyarrow/types.pxi":3309
 *         return self.schema.GetAllFieldIndices(tobytes(name))
 * 
 *     def append(self, Field field):             # <<<<<<<<<<<<<<
 *         """
 *         Append a field at the end of the schema.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_6Schema_36append(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_6Schema_35append, "Schema.append(self, Field field)\n\nAppend a field at the end of the schema.\n\nIn contrast to Python's ``list.append()`` it does return a new\nobject, leaving the original Schema unmodified.\n\nParameters\n----------\nfield : Field\n\nReturns\n-------\nschema: Schema\n    New object with appended field.\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> schema = pa.schema([\n...     pa.field('n_legs', pa.int64()),\n...     pa.field('animals', pa.string())])\n\nAppend a field 'extra' at the end of the schema:\n\n>>> schema_new = schema.append(pa.field('extra', pa.bool_()))\n>>> schema_new\nn_legs: int64\nanimals: string\nextra: bool\n\nOriginal schema is unmodified:\n\n>>> schema\nn_legs: int64\nanimals: string");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_6Schema_36append = {"append", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_6Schema_36append, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_6Schema_35append};
    static PyObject *__pyx_pw_7pyarrow_3lib_6Schema_36append(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      struct __pyx_obj_7pyarrow_3lib_Field *__pyx_v_field = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("append (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_field,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 3309, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3309, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "append", 0) < (0)) __PYX_ERR(1, 3309, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("append", 1, 1, 1, i); __PYX_ERR(1, 3309, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 1)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3309, __pyx_L3_error)
        }
        __pyx_v_field = ((struct __pyx_obj_7pyarrow_3lib_Field *)values[0]);
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("append", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3309, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.Schema.append", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_field), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Field, 1, "field", 0))) __PYX_ERR(1, 3309, __pyx_L1_error)
      __pyx_r = __pyx_pf_7pyarrow_3lib_6Schema_35append(((struct __pyx_obj_7pyarrow_3lib_Schema *)__pyx_v_self), __pyx_v_field);

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = NULL;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      goto __pyx_L7_cleaned_up;
      __pyx_L0:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __pyx_L7_cleaned_up:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_6Schema_35append(struct __pyx_obj_7pyarrow_3lib_Schema *__pyx_v_self, struct __pyx_obj_7pyarrow_3lib_Field *__pyx_v_field) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      size_t __pyx_t_4;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("append", 0);

      /* "pyarrow/types.pxi":3346
 *         animals: string
 *         """
 *         return self.insert(self.schema.num_fields(), field)             # <<<<<<<<<<<<<<
 * 
 *     def insert(self, int i, Field field):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = ((PyObject *)__pyx_v_self);
      __Pyx_INCREF(__pyx_t_2);
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "schema");
        __PYX_ERR(1, 3346, __pyx_L1_error)
      }
      __pyx_t_3 = __Pyx_PyLong_From_int(__pyx_v_self->schema->num_fields()); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3346, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = 0;
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_t_3, ((PyObject *)__pyx_v_field)};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_insert, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3346, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/types.pxi":3309
 *         return self.schema.GetAllFieldIndices(tobytes(name))
 * 
 *     def append(self, Field field):             # <<<<<<<<<<<<<<
 *         """
 *         Append a field at the end of the schema.
*/

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

    /* "pyarrow/types.pxi":3348
 *         return self.insert(self.schema.num_fields(), field)
 * 
 *     def insert(self, int i, Field field):             # <<<<<<<<<<<<<<
 *         """
 *         Add a field at position i to the schema.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_6Schema_38insert(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_6Schema_37insert, "Schema.insert(self, int i, Field field)\n\nAdd a field at position i to the schema.\n\nParameters\n----------\ni : int\nfield : Field\n\nReturns\n-------\nschema: Schema\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> schema = pa.schema([\n...     pa.field('n_legs', pa.int64()),\n...     pa.field('animals', pa.string())])\n\nInsert a new field on the second position:\n\n>>> schema.insert(1, pa.field('extra', pa.bool_()))\nn_legs: int64\nextra: bool\nanimals: string");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_6Schema_38insert = {"insert", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_6Schema_38insert, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_6Schema_37insert};
    static PyObject *__pyx_pw_7pyarrow_3lib_6Schema_38insert(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      int __pyx_v_i;
      struct __pyx_obj_7pyarrow_3lib_Field *__pyx_v_field = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[2] = {0,0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("insert (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_i,&__pyx_mstate_global->__pyx_n_u_field,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 3348, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 3348, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3348, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "insert", 0) < (0)) __PYX_ERR(1, 3348, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("insert", 1, 2, 2, i); __PYX_ERR(1, 3348, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 2)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3348, __pyx_L3_error)
          values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 3348, __pyx_L3_error)
        }
        __pyx_v_i = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_i == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 3348, __pyx_L3_error)
        __pyx_v_field = ((struct __pyx_obj_7pyarrow_3lib_Field *)values[1]);
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("insert", 1, 2, 2, __pyx_nargs); __PYX_ERR(1, 3348, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.Schema.insert", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_field), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Field, 1, "field", 0))) __PYX_ERR(1, 3348, __pyx_L1_error)
      __pyx_r = __pyx_pf_7pyarrow_3lib_6Schema_37insert(((struct __pyx_obj_7pyarrow_3lib_Schema *)__pyx_v_self), __pyx_v_i, __pyx_v_field);

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = NULL;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      goto __pyx_L7_cleaned_up;
      __pyx_L0:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __pyx_L7_cleaned_up:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_6Schema_37insert(struct __pyx_obj_7pyarrow_3lib_Schema *__pyx_v_self, int __pyx_v_i, struct __pyx_obj_7pyarrow_3lib_Field *__pyx_v_field) {
      std::shared_ptr< arrow::Schema>  __pyx_v_new_schema;
      std::shared_ptr< arrow::Field>  __pyx_v_c_field;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      std::shared_ptr< arrow::Field>  __pyx_t_1;
      std::shared_ptr< arrow::Schema>  __pyx_t_2;
      PyObject *__pyx_t_3 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("insert", 0);

      /* "pyarrow/types.pxi":3379
 *             shared_ptr[CField] c_field
 * 
 *         c_field = field.sp_field             # <<<<<<<<<<<<<<
 * 
 *         with nogil:
*/
      if (unlikely(((PyObject *)__pyx_v_field) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_field");
        __PYX_ERR(1, 3379, __pyx_L1_error)
      }
      __pyx_t_1 = __pyx_v_field->sp_field;
      __pyx_v_c_field = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_1);

      /* "pyarrow/types.pxi":3381
 *         c_field = field.sp_field
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             new_schema = GetResultValue(self.schema.AddField(i, c_field))
 * 
*/
      {
          PyThreadState * _save;
          _save = PyEval_SaveThread();
          __Pyx_FastGIL_Remember();
          /*try:*/ {

            /* "pyarrow/types.pxi":3382
 * 
 *         with nogil:
 *             new_schema = GetResultValue(self.schema.AddField(i, c_field))             # <<<<<<<<<<<<<<
 * 
 *         return pyarrow_wrap_schema(new_schema)
*/
            if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
              PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "schema");
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              __PYX_ERR(1, 3382, __pyx_L4_error)
            }
            __pyx_t_2 = arrow::py::GetResultValue<std::shared_ptr< arrow::Schema> >(__pyx_v_self->schema->AddField(__pyx_v_i, __pyx_v_c_field)); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 3382, __pyx_L4_error)
            __pyx_v_new_schema = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_2);
          }

          /* "pyarrow/types.pxi":3381
 *         c_field = field.sp_field
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             new_schema = GetResultValue(self.schema.AddField(i, c_field))
 * 
*/
          /*finally:*/ {
            /*normal exit:*/{
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L5;
            }
            __pyx_L4_error: {
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L1_error;
            }
            __pyx_L5:;
          }
      }

      /* "pyarrow/types.pxi":3384
 *             new_schema = GetResultValue(self.schema.AddField(i, c_field))
 * 
 *         return pyarrow_wrap_schema(new_schema)             # <<<<<<<<<<<<<<
 * 
 *     def remove(self, int i):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = pyarrow_wrap_schema(__pyx_v_new_schema); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3384, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "pyarrow/types.pxi":3348
 *         return self.insert(self.schema.num_fields(), field)
 * 
 *     def insert(self, int i, Field field):             # <<<<<<<<<<<<<<
 *         """
 *         Add a field at position i to the schema.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_AddTraceback("pyarrow.lib.Schema.insert", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/types.pxi":3386
 *         return pyarrow_wrap_schema(new_schema)
 * 
 *     def remove(self, int i):             # <<<<<<<<<<<<<<
 *         """
 *         Remove the field at index i from the schema.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_6Schema_40remove(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_6Schema_39remove, "Schema.remove(self, int i)\n\nRemove the field at index i from the schema.\n\nParameters\n----------\ni : int\n\nReturns\n-------\nschema: Schema\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> schema = pa.schema([\n...     pa.field('n_legs', pa.int64()),\n...     pa.field('animals', pa.string())])\n\nRemove the second field of the schema:\n\n>>> schema.remove(1)\nn_legs: int64");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_6Schema_40remove = {"remove", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_6Schema_40remove, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_6Schema_39remove};
    static PyObject *__pyx_pw_7pyarrow_3lib_6Schema_40remove(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      int __pyx_v_i;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("remove (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_i,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 3386, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3386, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "remove", 0) < (0)) __PYX_ERR(1, 3386, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("remove", 1, 1, 1, i); __PYX_ERR(1, 3386, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 1)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3386, __pyx_L3_error)
        }
        __pyx_v_i = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_i == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 3386, __pyx_L3_error)
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("remove", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3386, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.Schema.remove", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_6Schema_39remove(((struct __pyx_obj_7pyarrow_3lib_Schema *)__pyx_v_self), __pyx_v_i);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_6Schema_39remove(struct __pyx_obj_7pyarrow_3lib_Schema *__pyx_v_self, int __pyx_v_i) {
      std::shared_ptr< arrow::Schema>  __pyx_v_new_schema;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      std::shared_ptr< arrow::Schema>  __pyx_t_1;
      PyObject *__pyx_t_2 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("remove", 0);

      /* "pyarrow/types.pxi":3412
 *         cdef shared_ptr[CSchema] new_schema
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             new_schema = GetResultValue(self.schema.RemoveField(i))
 * 
*/
      {
          PyThreadState * _save;
          _save = PyEval_SaveThread();
          __Pyx_FastGIL_Remember();
          /*try:*/ {

            /* "pyarrow/types.pxi":3413
 * 
 *         with nogil:
 *             new_schema = GetResultValue(self.schema.RemoveField(i))             # <<<<<<<<<<<<<<
 * 
 *         return pyarrow_wrap_schema(new_schema)
*/
            if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
              PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "schema");
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              __PYX_ERR(1, 3413, __pyx_L4_error)
            }
            __pyx_t_1 = arrow::py::GetResultValue<std::shared_ptr< arrow::Schema> >(__pyx_v_self->schema->RemoveField(__pyx_v_i)); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 3413, __pyx_L4_error)
            __pyx_v_new_schema = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_1);
          }

          /* "pyarrow/types.pxi":3412
 *         cdef shared_ptr[CSchema] new_schema
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             new_schema = GetResultValue(self.schema.RemoveField(i))
 * 
*/
          /*finally:*/ {
            /*normal exit:*/{
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L5;
            }
            __pyx_L4_error: {
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L1_error;
            }
            __pyx_L5:;
          }
      }

      /* "pyarrow/types.pxi":3415
 *             new_schema = GetResultValue(self.schema.RemoveField(i))
 * 
 *         return pyarrow_wrap_schema(new_schema)             # <<<<<<<<<<<<<<
 * 
 *     def set(self, int i, Field field):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = pyarrow_wrap_schema(__pyx_v_new_schema); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3415, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;

      /* "pyarrow/types.pxi":3386
 *         return pyarrow_wrap_schema(new_schema)
 * 
 *     def remove(self, int i):             # <<<<<<<<<<<<<<
 *         """
 *         Remove the field at index i from the schema.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_AddTraceback("pyarrow.lib.Schema.remove", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/types.pxi":3417
 *         return pyarrow_wrap_schema(new_schema)
 * 
 *     def set(self, int i, Field field):             # <<<<<<<<<<<<<<
 *         """
 *         Replace a field at position i in the schema.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_6Schema_42set(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_6Schema_41set, "Schema.set(self, int i, Field field)\n\nReplace a field at position i in the schema.\n\nParameters\n----------\ni : int\nfield : Field\n\nReturns\n-------\nschema: Schema\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> schema = pa.schema([\n...     pa.field('n_legs', pa.int64()),\n...     pa.field('animals', pa.string())])\n\nReplace the second field of the schema with a new field 'extra':\n\n>>> schema.set(1, pa.field('replaced', pa.bool_()))\nn_legs: int64\nreplaced: bool");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_6Schema_42set = {"set", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_6Schema_42set, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_6Schema_41set};
    static PyObject *__pyx_pw_7pyarrow_3lib_6Schema_42set(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      int __pyx_v_i;
      struct __pyx_obj_7pyarrow_3lib_Field *__pyx_v_field = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[2] = {0,0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("set (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_i,&__pyx_mstate_global->__pyx_n_u_field,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 3417, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 3417, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3417, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "set", 0) < (0)) __PYX_ERR(1, 3417, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("set", 1, 2, 2, i); __PYX_ERR(1, 3417, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 2)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3417, __pyx_L3_error)
          values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 3417, __pyx_L3_error)
        }
        __pyx_v_i = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_i == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 3417, __pyx_L3_error)
        __pyx_v_field = ((struct __pyx_obj_7pyarrow_3lib_Field *)values[1]);
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("set", 1, 2, 2, __pyx_nargs); __PYX_ERR(1, 3417, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.Schema.set", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_field), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Field, 1, "field", 0))) __PYX_ERR(1, 3417, __pyx_L1_error)
      __pyx_r = __pyx_pf_7pyarrow_3lib_6Schema_41set(((struct __pyx_obj_7pyarrow_3lib_Schema *)__pyx_v_self), __pyx_v_i, __pyx_v_field);

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = NULL;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      goto __pyx_L7_cleaned_up;
      __pyx_L0:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __pyx_L7_cleaned_up:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_6Schema_41set(struct __pyx_obj_7pyarrow_3lib_Schema *__pyx_v_self, int __pyx_v_i, struct __pyx_obj_7pyarrow_3lib_Field *__pyx_v_field) {
      std::shared_ptr< arrow::Schema>  __pyx_v_new_schema;
      std::shared_ptr< arrow::Field>  __pyx_v_c_field;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      std::shared_ptr< arrow::Field>  __pyx_t_1;
      std::shared_ptr< arrow::Schema>  __pyx_t_2;
      PyObject *__pyx_t_3 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("set", 0);

      /* "pyarrow/types.pxi":3447
 *             shared_ptr[CField] c_field
 * 
 *         c_field = field.sp_field             # <<<<<<<<<<<<<<
 * 
 *         with nogil:
*/
      if (unlikely(((PyObject *)__pyx_v_field) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_field");
        __PYX_ERR(1, 3447, __pyx_L1_error)
      }
      __pyx_t_1 = __pyx_v_field->sp_field;
      __pyx_v_c_field = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_1);

      /* "pyarrow/types.pxi":3449
 *         c_field = field.sp_field
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             new_schema = GetResultValue(self.schema.SetField(i, c_field))
 * 
*/
      {
          PyThreadState * _save;
          _save = PyEval_SaveThread();
          __Pyx_FastGIL_Remember();
          /*try:*/ {

            /* "pyarrow/types.pxi":3450
 * 
 *         with nogil:
 *             new_schema = GetResultValue(self.schema.SetField(i, c_field))             # <<<<<<<<<<<<<<
 * 
 *         return pyarrow_wrap_schema(new_schema)
*/
            if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
              PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "schema");
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              __PYX_ERR(1, 3450, __pyx_L4_error)
            }
            __pyx_t_2 = arrow::py::GetResultValue<std::shared_ptr< arrow::Schema> >(__pyx_v_self->schema->SetField(__pyx_v_i, __pyx_v_c_field)); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 3450, __pyx_L4_error)
            __pyx_v_new_schema = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_2);
          }

          /* "pyarrow/types.pxi":3449
 *         c_field = field.sp_field
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             new_schema = GetResultValue(self.schema.SetField(i, c_field))
 * 
*/
          /*finally:*/ {
            /*normal exit:*/{
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L5;
            }
            __pyx_L4_error: {
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L1_error;
            }
            __pyx_L5:;
          }
      }

      /* "pyarrow/types.pxi":3452
 *             new_schema = GetResultValue(self.schema.SetField(i, c_field))
 * 
 *         return pyarrow_wrap_schema(new_schema)             # <<<<<<<<<<<<<<
 * 
 *     def add_metadata(self, metadata):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = pyarrow_wrap_schema(__pyx_v_new_schema); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3452, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "pyarrow/types.pxi":3417
 *         return pyarrow_wrap_schema(new_schema)
 * 
 *     def set(self, int i, Field field):             # <<<<<<<<<<<<<<
 *         """
 *         Replace a field at position i in the schema.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_AddTraceback("pyarrow.lib.Schema.set", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/types.pxi":3454
 *         return pyarrow_wrap_schema(new_schema)
 * 
 *     def add_metadata(self, metadata):             # <<<<<<<<<<<<<<
 *         """
 *         DEPRECATED
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_6Schema_44add_metadata(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_6Schema_43add_metadata, "Schema.add_metadata(self, metadata)\n\nDEPRECATED\n\nParameters\n----------\nmetadata : dict\n    Keys and values must be string-like / coercible to bytes");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_6Schema_44add_metadata = {"add_metadata", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_6Schema_44add_metadata, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_6Schema_43add_metadata};
    static PyObject *__pyx_pw_7pyarrow_3lib_6Schema_44add_metadata(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_metadata = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("add_metadata (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_metadata,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 3454, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3454, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "add_metadata", 0) < (0)) __PYX_ERR(1, 3454, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("add_metadata", 1, 1, 1, i); __PYX_ERR(1, 3454, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 1)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3454, __pyx_L3_error)
        }
        __pyx_v_metadata = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("add_metadata", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3454, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.Schema.add_metadata", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_6Schema_43add_metadata(((struct __pyx_obj_7pyarrow_3lib_Schema *)__pyx_v_self), __pyx_v_metadata);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_6Schema_43add_metadata(struct __pyx_obj_7pyarrow_3lib_Schema *__pyx_v_self, PyObject *__pyx_v_metadata) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      size_t __pyx_t_5;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("add_metadata", 0);

      /* "pyarrow/types.pxi":3463
 *             Keys and values must be string-like / coercible to bytes
 *         """
 *         warnings.warn("The 'add_metadata' method is deprecated, use "             # <<<<<<<<<<<<<<
 *                       "'with_metadata' instead", FutureWarning, stacklevel=2)
 *         return self.with_metadata(metadata)
*/
      __pyx_t_2 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_warnings); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3463, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_warn); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3463, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "pyarrow/types.pxi":3464
 *         """
 *         warnings.warn("The 'add_metadata' method is deprecated, use "
 *                       "'with_metadata' instead", FutureWarning, stacklevel=2)             # <<<<<<<<<<<<<<
 *         return self.with_metadata(metadata)
 * 
*/
      __pyx_t_5 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
        assert(__pyx_t_2);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
        __pyx_t_5 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[3 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_The_add_metadata_method_is_depre, ((PyObject *)(((PyTypeObject*)PyExc_FutureWarning)))};
        __pyx_t_3 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3463, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_stacklevel, __pyx_mstate_global->__pyx_int_2, __pyx_t_3, __pyx_callargs+3, 0) < (0)) __PYX_ERR(1, 3463, __pyx_L1_error)
        __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_3);
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3463, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "pyarrow/types.pxi":3465
 *         warnings.warn("The 'add_metadata' method is deprecated, use "
 *                       "'with_metadata' instead", FutureWarning, stacklevel=2)
 *         return self.with_metadata(metadata)             # <<<<<<<<<<<<<<
 * 
 *     def with_metadata(self, metadata):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_4 = ((PyObject *)__pyx_v_self);
      __Pyx_INCREF(__pyx_t_4);
      __pyx_t_5 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_metadata};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_with_metadata, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3465, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/types.pxi":3454
 *         return pyarrow_wrap_schema(new_schema)
 * 
 *     def add_metadata(self, metadata):             # <<<<<<<<<<<<<<
 *         """
 *         DEPRECATED
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_AddTraceback("pyarrow.lib.Schema.add_metadata", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/types.pxi":3467
 *         return self.with_metadata(metadata)
 * 
 *     def with_metadata(self, metadata):             # <<<<<<<<<<<<<<
 *         """
 *         Add metadata as dict of string keys and values to Schema
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_6Schema_46with_metadata(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_6Schema_45with_metadata, "Schema.with_metadata(self, metadata)\n\nAdd metadata as dict of string keys and values to Schema\n\nParameters\n----------\nmetadata : dict\n    Keys and values must be string-like / coercible to bytes\n\nReturns\n-------\nschema : pyarrow.Schema\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> schema = pa.schema([\n...     pa.field('n_legs', pa.int64()),\n...     pa.field('animals', pa.string())])\n\nAdd metadata to existing schema field:\n\n>>> schema.with_metadata({\"n_legs\": \"Number of legs per animal\"})\nn_legs: int64\nanimals: string\n-- schema metadata --\nn_legs: 'Number of legs per animal'");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_6Schema_46with_metadata = {"with_metadata", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_6Schema_46with_metadata, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_6Schema_45with_metadata};
    static PyObject *__pyx_pw_7pyarrow_3lib_6Schema_46with_metadata(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_metadata = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("with_metadata (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_metadata,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 3467, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3467, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "with_metadata", 0) < (0)) __PYX_ERR(1, 3467, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("with_metadata", 1, 1, 1, i); __PYX_ERR(1, 3467, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 1)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3467, __pyx_L3_error)
        }
        __pyx_v_metadata = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("with_metadata", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3467, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.Schema.with_metadata", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_6Schema_45with_metadata(((struct __pyx_obj_7pyarrow_3lib_Schema *)__pyx_v_self), __pyx_v_metadata);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_6Schema_45with_metadata(struct __pyx_obj_7pyarrow_3lib_Schema *__pyx_v_self, PyObject *__pyx_v_metadata) {
      std::shared_ptr< arrow::Schema>  __pyx_v_c_schema;
      struct __pyx_obj_7pyarrow_3lib_KeyValueMetadata *__pyx_v_meta = NULL;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      struct __pyx_opt_args_7pyarrow_3lib_ensure_metadata __pyx_t_2;
      std::shared_ptr< arrow::KeyValueMetadata const >  __pyx_t_3;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("with_metadata", 0);

      /* "pyarrow/types.pxi":3497
 *         cdef shared_ptr[CSchema] c_schema
 * 
 *         meta = ensure_metadata(metadata, allow_none=False)             # <<<<<<<<<<<<<<
 *         with nogil:
 *             c_schema = self.schema.WithMetadata(meta.unwrap())
*/
      __pyx_t_2.__pyx_n = 1;
      __pyx_t_2.allow_none = 0;
      __pyx_t_1 = ((PyObject *)__pyx_f_7pyarrow_3lib_ensure_metadata(__pyx_v_metadata, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3497, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_v_meta = ((struct __pyx_obj_7pyarrow_3lib_KeyValueMetadata *)__pyx_t_1);
      __pyx_t_1 = 0;

      /* "pyarrow/types.pxi":3498
 * 
 *         meta = ensure_metadata(metadata, allow_none=False)
 *         with nogil:             # <<<<<<<<<<<<<<
 *             c_schema = self.schema.WithMetadata(meta.unwrap())
 * 
*/
      {
          PyThreadState * _save;
          _save = PyEval_SaveThread();
          __Pyx_FastGIL_Remember();
          /*try:*/ {

            /* "pyarrow/types.pxi":3499
 *         meta = ensure_metadata(metadata, allow_none=False)
 *         with nogil:
 *             c_schema = self.schema.WithMetadata(meta.unwrap())             # <<<<<<<<<<<<<<
 * 
 *         return pyarrow_wrap_schema(c_schema)
*/
            if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
              PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "schema");
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              __PYX_ERR(1, 3499, __pyx_L4_error)
            }
            if (unlikely(((PyObject *)__pyx_v_meta) == Py_None)) {
              PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "unwrap");
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              __PYX_ERR(1, 3499, __pyx_L4_error)
            }
            __pyx_t_3 = __pyx_f_7pyarrow_3lib_16KeyValueMetadata_unwrap(__pyx_v_meta); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 3499, __pyx_L4_error)
            __pyx_v_c_schema = __pyx_v_self->schema->WithMetadata(__pyx_t_3);
          }

          /* "pyarrow/types.pxi":3498
 * 
 *         meta = ensure_metadata(metadata, allow_none=False)
 *         with nogil:             # <<<<<<<<<<<<<<
 *             c_schema = self.schema.WithMetadata(meta.unwrap())
 * 
*/
          /*finally:*/ {
            /*normal exit:*/{
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L5;
            }
            __pyx_L4_error: {
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L1_error;
            }
            __pyx_L5:;
          }
      }

      /* "pyarrow/types.pxi":3501
 *             c_schema = self.schema.WithMetadata(meta.unwrap())
 * 
 *         return pyarrow_wrap_schema(c_schema)             # <<<<<<<<<<<<<<
 * 
 *     def serialize(self, memory_pool=None):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = pyarrow_wrap_schema(__pyx_v_c_schema); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3501, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/types.pxi":3467
 *         return self.with_metadata(metadata)
 * 
 *     def with_metadata(self, metadata):             # <<<<<<<<<<<<<<
 *         """
 *         Add metadata as dict of string keys and values to Schema
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("pyarrow.lib.Schema.with_metadata", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF((PyObject *)__pyx_v_meta);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/types.pxi":3503
 *         return pyarrow_wrap_schema(c_schema)
 * 
 *     def serialize(self, memory_pool=None):             # <<<<<<<<<<<<<<
 *         """
 *         Write Schema to Buffer as encapsulated IPC message
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_6Schema_48serialize(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_6Schema_47serialize, "Schema.serialize(self, memory_pool=None)\n\nWrite Schema to Buffer as encapsulated IPC message\n\nParameters\n----------\nmemory_pool : MemoryPool, default None\n    Uses default memory pool if not specified\n\nReturns\n-------\nserialized : Buffer\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> schema = pa.schema([\n...     pa.field('n_legs', pa.int64()),\n...     pa.field('animals', pa.string())])\n\nWrite schema to Buffer:\n\n>>> schema.serialize()\n<pyarrow.Buffer address=0x... size=... is_cpu=True is_mutable=True>");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_6Schema_48serialize = {"serialize", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_6Schema_48serialize, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_6Schema_47serialize};
    static PyObject *__pyx_pw_7pyarrow_3lib_6Schema_48serialize(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_memory_pool = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("serialize (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_memory_pool,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 3503, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3503, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "serialize", 0) < (0)) __PYX_ERR(1, 3503, __pyx_L3_error)
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
        } else {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3503, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
        }
        __pyx_v_memory_pool = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("serialize", 0, 0, 1, __pyx_nargs); __PYX_ERR(1, 3503, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.Schema.serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_6Schema_47serialize(((struct __pyx_obj_7pyarrow_3lib_Schema *)__pyx_v_self), __pyx_v_memory_pool);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_6Schema_47serialize(struct __pyx_obj_7pyarrow_3lib_Schema *__pyx_v_self, PyObject *__pyx_v_memory_pool) {
      std::shared_ptr< arrow::Buffer>  __pyx_v_buffer;
       arrow::MemoryPool *__pyx_v_pool;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
       arrow::MemoryPool *__pyx_t_1;
      std::shared_ptr< arrow::Buffer>  __pyx_t_2;
      PyObject *__pyx_t_3 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("serialize", 0);

      /* "pyarrow/types.pxi":3530
 *         cdef:
 *             shared_ptr[CBuffer] buffer
 *             CMemoryPool* pool = maybe_unbox_memory_pool(memory_pool)             # <<<<<<<<<<<<<<
 * 
 *         with nogil:
*/
      if (!(likely(((__pyx_v_memory_pool) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_memory_pool, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_MemoryPool))))) __PYX_ERR(1, 3530, __pyx_L1_error)
      __pyx_t_1 = __pyx_f_7pyarrow_3lib_maybe_unbox_memory_pool(((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)__pyx_v_memory_pool)); if (unlikely(__pyx_t_1 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(1, 3530, __pyx_L1_error)
      __pyx_v_pool = __pyx_t_1;

      /* "pyarrow/types.pxi":3532
 *             CMemoryPool* pool = maybe_unbox_memory_pool(memory_pool)
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             buffer = GetResultValue(SerializeSchema(deref(self.schema),
 *                                                     pool))
*/
      {
          PyThreadState * _save;
          _save = PyEval_SaveThread();
          __Pyx_FastGIL_Remember();
          /*try:*/ {

            /* "pyarrow/types.pxi":3533
 * 
 *         with nogil:
 *             buffer = GetResultValue(SerializeSchema(deref(self.schema),             # <<<<<<<<<<<<<<
 *                                                     pool))
 *         return pyarrow_wrap_buffer(buffer)
*/
            if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
              PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "schema");
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              __PYX_ERR(1, 3533, __pyx_L4_error)
            }

            /* "pyarrow/types.pxi":3534
 *         with nogil:
 *             buffer = GetResultValue(SerializeSchema(deref(self.schema),
 *                                                     pool))             # <<<<<<<<<<<<<<
 *         return pyarrow_wrap_buffer(buffer)
 * 
*/
            __pyx_t_2 = arrow::py::GetResultValue<std::shared_ptr< arrow::Buffer> >(arrow::ipc::SerializeSchema((*__pyx_v_self->schema), __pyx_v_pool)); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 3533, __pyx_L4_error)
            __pyx_v_buffer = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_2);
          }

          /* "pyarrow/types.pxi":3532
 *             CMemoryPool* pool = maybe_unbox_memory_pool(memory_pool)
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             buffer = GetResultValue(SerializeSchema(deref(self.schema),
 *                                                     pool))
*/
          /*finally:*/ {
            /*normal exit:*/{
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L5;
            }
            __pyx_L4_error: {
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L1_error;
            }
            __pyx_L5:;
          }
      }

      /* "pyarrow/types.pxi":3535
 *             buffer = GetResultValue(SerializeSchema(deref(self.schema),
 *                                                     pool))
 *         return pyarrow_wrap_buffer(buffer)             # <<<<<<<<<<<<<<
 * 
 *     def remove_metadata(self):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = pyarrow_wrap_buffer(__pyx_v_buffer); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3535, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "pyarrow/types.pxi":3503
 *         return pyarrow_wrap_schema(c_schema)
 * 
 *     def serialize(self, memory_pool=None):             # <<<<<<<<<<<<<<
 *         """
 *         Write Schema to Buffer as encapsulated IPC message
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_AddTraceback("pyarrow.lib.Schema.serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/types.pxi":3537
 *         return pyarrow_wrap_buffer(buffer)
 * 
 *     def remove_metadata(self):             # <<<<<<<<<<<<<<
 *         """
 *         Create new schema without metadata, if any
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_6Schema_50remove_metadata(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_6Schema_49remove_metadata, "Schema.remove_metadata(self)\n\nCreate new schema without metadata, if any\n\nReturns\n-------\nschema : pyarrow.Schema\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> schema = pa.schema([\n...     pa.field('n_legs', pa.int64()),\n...     pa.field('animals', pa.string())],\n...     metadata={\"n_legs\": \"Number of legs per animal\"})\n>>> schema\nn_legs: int64\nanimals: string\n-- schema metadata --\nn_legs: 'Number of legs per animal'\n\nCreate a new schema with removing the metadata from the original:\n\n>>> schema.remove_metadata()\nn_legs: int64\nanimals: string");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_6Schema_50remove_metadata = {"remove_metadata", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_6Schema_50remove_metadata, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_6Schema_49remove_metadata};
    static PyObject *__pyx_pw_7pyarrow_3lib_6Schema_50remove_metadata(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("remove_metadata (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("remove_metadata", 1, 0, 0, __pyx_nargs); return NULL; }
      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
      if (unlikely(__pyx_kwds_len < 0)) return NULL;
      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("remove_metadata", __pyx_kwds); return NULL;}
      __pyx_r = __pyx_pf_7pyarrow_3lib_6Schema_49remove_metadata(((struct __pyx_obj_7pyarrow_3lib_Schema *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_6Schema_49remove_metadata(struct __pyx_obj_7pyarrow_3lib_Schema *__pyx_v_self) {
      std::shared_ptr< arrow::Schema>  __pyx_v_new_schema;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("remove_metadata", 0);

      /* "pyarrow/types.pxi":3565
 *         """
 *         cdef shared_ptr[CSchema] new_schema
 *         with nogil:             # <<<<<<<<<<<<<<
 *             new_schema = self.schema.RemoveMetadata()
 *         return pyarrow_wrap_schema(new_schema)
*/
      {
          PyThreadState * _save;
          _save = PyEval_SaveThread();
          __Pyx_FastGIL_Remember();
          /*try:*/ {

            /* "pyarrow/types.pxi":3566
 *         cdef shared_ptr[CSchema] new_schema
 *         with nogil:
 *             new_schema = self.schema.RemoveMetadata()             # <<<<<<<<<<<<<<
 *         return pyarrow_wrap_schema(new_schema)
 * 
*/
            if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
              PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "schema");
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              __PYX_ERR(1, 3566, __pyx_L4_error)
            }
            __pyx_v_new_schema = __pyx_v_self->schema->RemoveMetadata();
          }

          /* "pyarrow/types.pxi":3565
 *         """
 *         cdef shared_ptr[CSchema] new_schema
 *         with nogil:             # <<<<<<<<<<<<<<
 *             new_schema = self.schema.RemoveMetadata()
 *         return pyarrow_wrap_schema(new_schema)
*/
          /*finally:*/ {
            /*normal exit:*/{
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L5;
            }
            __pyx_L4_error: {
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L1_error;
            }
            __pyx_L5:;
          }
      }

      /* "pyarrow/types.pxi":3567
 *         with nogil:
 *             new_schema = self.schema.RemoveMetadata()
 *         return pyarrow_wrap_schema(new_schema)             # <<<<<<<<<<<<<<
 * 
 *     def to_string(self, truncate_metadata=True, show_field_metadata=True,
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = pyarrow_wrap_schema(__pyx_v_new_schema); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3567, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/types.pxi":3537
 *         return pyarrow_wrap_buffer(buffer)
 * 
 *     def remove_metadata(self):             # <<<<<<<<<<<<<<
 *         """
 *         Create new schema without metadata, if any
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("pyarrow.lib.Schema.remove_metadata", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/types.pxi":3569
 *         return pyarrow_wrap_schema(new_schema)
 * 
 *     def to_string(self, truncate_metadata=True, show_field_metadata=True,             # <<<<<<<<<<<<<<
 *                   show_schema_metadata=True, element_size_limit=100):
 *         """
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_6Schema_52to_string(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_6Schema_51to_string, "Schema.to_string(self, truncate_metadata=True, show_field_metadata=True, show_schema_metadata=True, element_size_limit=100)\n\nReturn human-readable representation of Schema\n\nParameters\n----------\ntruncate_metadata : boolean, default True\n    Limit metadata key/value display to a single line of ~80 characters\n    or less\nshow_field_metadata : boolean, default True\n    Display Field-level KeyValueMetadata\nshow_schema_metadata : boolean, default True\n    Display Schema-level KeyValueMetadata\nelement_size_limit : int, default 100\n    Maximum number of characters of a single element before it is truncated.\n\nReturns\n-------\nstr : the formatted output");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_6Schema_52to_string = {"to_string", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_6Schema_52to_string, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_6Schema_51to_string};
    static PyObject *__pyx_pw_7pyarrow_3lib_6Schema_52to_string(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_truncate_metadata = 0;
      PyObject *__pyx_v_show_field_metadata = 0;
      PyObject *__pyx_v_show_schema_metadata = 0;
      PyObject *__pyx_v_element_size_limit = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[4] = {0,0,0,0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("to_string (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_truncate_metadata,&__pyx_mstate_global->__pyx_n_u_show_field_metadata,&__pyx_mstate_global->__pyx_n_u_show_schema_metadata,&__pyx_mstate_global->__pyx_n_u_element_size_limit,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 3569, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  4:
            values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(1, 3569, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  3:
            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 3569, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 3569, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3569, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "to_string", 0) < (0)) __PYX_ERR(1, 3569, __pyx_L3_error)
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_True));
          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_True));

          /* "pyarrow/types.pxi":3570
 * 
 *     def to_string(self, truncate_metadata=True, show_field_metadata=True,
 *                   show_schema_metadata=True, element_size_limit=100):             # <<<<<<<<<<<<<<
 *         """
 *         Return human-readable representation of Schema
*/
          if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_True));
          if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_int_100));
        } else {
          switch (__pyx_nargs) {
            case  4:
            values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(1, 3569, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  3:
            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 3569, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 3569, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3569, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }

          /* "pyarrow/types.pxi":3569
 *         return pyarrow_wrap_schema(new_schema)
 * 
 *     def to_string(self, truncate_metadata=True, show_field_metadata=True,             # <<<<<<<<<<<<<<
 *                   show_schema_metadata=True, element_size_limit=100):
 *         """
*/
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_True));
          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_True));

          /* "pyarrow/types.pxi":3570
 * 
 *     def to_string(self, truncate_metadata=True, show_field_metadata=True,
 *                   show_schema_metadata=True, element_size_limit=100):             # <<<<<<<<<<<<<<
 *         """
 *         Return human-readable representation of Schema
*/
          if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_True));
          if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_int_100));
        }
        __pyx_v_truncate_metadata = values[0];
        __pyx_v_show_field_metadata = values[1];
        __pyx_v_show_schema_metadata = values[2];
        __pyx_v_element_size_limit = values[3];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("to_string", 0, 0, 4, __pyx_nargs); __PYX_ERR(1, 3569, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.Schema.to_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_6Schema_51to_string(((struct __pyx_obj_7pyarrow_3lib_Schema *)__pyx_v_self), __pyx_v_truncate_metadata, __pyx_v_show_field_metadata, __pyx_v_show_schema_metadata, __pyx_v_element_size_limit);

      /* "pyarrow/types.pxi":3569
 *         return pyarrow_wrap_schema(new_schema)
 * 
 *     def to_string(self, truncate_metadata=True, show_field_metadata=True,             # <<<<<<<<<<<<<<
 *                   show_schema_metadata=True, element_size_limit=100):
 *         """
*/

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_6Schema_51to_string(struct __pyx_obj_7pyarrow_3lib_Schema *__pyx_v_self, PyObject *__pyx_v_truncate_metadata, PyObject *__pyx_v_show_field_metadata, PyObject *__pyx_v_show_schema_metadata, PyObject *__pyx_v_element_size_limit) {
      std::string __pyx_v_result;
      arrow::PrettyPrintOptions __pyx_v_options;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      bool __pyx_t_1;
      int __pyx_t_2;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      PyObject *__pyx_t_5 = NULL;
      PyObject *__pyx_t_6 = NULL;
      size_t __pyx_t_7;
      PyObject *__pyx_t_8 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("to_string", 0);

      /* "pyarrow/types.pxi":3592
 *         cdef:
 *             c_string result
 *             PrettyPrintOptions options = PrettyPrintOptions.Defaults()             # <<<<<<<<<<<<<<
 * 
 *         options.indent = 0
*/
      __pyx_v_options = arrow::PrettyPrintOptions::Defaults();

      /* "pyarrow/types.pxi":3594
 *             PrettyPrintOptions options = PrettyPrintOptions.Defaults()
 * 
 *         options.indent = 0             # <<<<<<<<<<<<<<
 *         options.truncate_metadata = truncate_metadata
 *         options.show_field_metadata = show_field_metadata
*/
      __pyx_v_options.indent = 0;

      /* "pyarrow/types.pxi":3595
 * 
 *         options.indent = 0
 *         options.truncate_metadata = truncate_metadata             # <<<<<<<<<<<<<<
 *         options.show_field_metadata = show_field_metadata
 *         options.show_schema_metadata = show_schema_metadata
*/
      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_truncate_metadata); if (unlikely((__pyx_t_1 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(1, 3595, __pyx_L1_error)
      __pyx_v_options.truncate_metadata = __pyx_t_1;

      /* "pyarrow/types.pxi":3596
 *         options.indent = 0
 *         options.truncate_metadata = truncate_metadata
 *         options.show_field_metadata = show_field_metadata             # <<<<<<<<<<<<<<
 *         options.show_schema_metadata = show_schema_metadata
 *         options.element_size_limit = element_size_limit
*/
      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_show_field_metadata); if (unlikely((__pyx_t_1 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(1, 3596, __pyx_L1_error)
      __pyx_v_options.show_field_metadata = __pyx_t_1;

      /* "pyarrow/types.pxi":3597
 *         options.truncate_metadata = truncate_metadata
 *         options.show_field_metadata = show_field_metadata
 *         options.show_schema_metadata = show_schema_metadata             # <<<<<<<<<<<<<<
 *         options.element_size_limit = element_size_limit
 * 
*/
      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_show_schema_metadata); if (unlikely((__pyx_t_1 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(1, 3597, __pyx_L1_error)
      __pyx_v_options.show_schema_metadata = __pyx_t_1;

      /* "pyarrow/types.pxi":3598
 *         options.show_field_metadata = show_field_metadata
 *         options.show_schema_metadata = show_schema_metadata
 *         options.element_size_limit = element_size_limit             # <<<<<<<<<<<<<<
 * 
 *         with nogil:
*/
      __pyx_t_2 = __Pyx_PyLong_As_int(__pyx_v_element_size_limit); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 3598, __pyx_L1_error)
      __pyx_v_options.element_size_limit = __pyx_t_2;

      /* "pyarrow/types.pxi":3600
 *         options.element_size_limit = element_size_limit
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             check_status(
 *                 PrettyPrint(
*/
      {
          PyThreadState * _save;
          _save = PyEval_SaveThread();
          __Pyx_FastGIL_Remember();
          /*try:*/ {

            /* "pyarrow/types.pxi":3603
 *             check_status(
 *                 PrettyPrint(
 *                     deref(self.schema),             # <<<<<<<<<<<<<<
 *                     options,
 *                     &result
*/
            if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
              PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "schema");
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              __PYX_ERR(1, 3603, __pyx_L4_error)
            }

            /* "pyarrow/types.pxi":3601
 * 
 *         with nogil:
 *             check_status(             # <<<<<<<<<<<<<<
 *                 PrettyPrint(
 *                     deref(self.schema),
*/
            __pyx_t_2 = __pyx_f_7pyarrow_3lib_check_status(arrow::PrettyPrint((*__pyx_v_self->schema), __pyx_v_options, (&__pyx_v_result))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(1, 3601, __pyx_L4_error)
          }

          /* "pyarrow/types.pxi":3600
 *         options.element_size_limit = element_size_limit
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             check_status(
 *                 PrettyPrint(
*/
          /*finally:*/ {
            /*normal exit:*/{
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L5;
            }
            __pyx_L4_error: {
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L1_error;
            }
            __pyx_L5:;
          }
      }

      /* "pyarrow/types.pxi":3609
 *             )
 * 
 *         return frombytes(result, safe=True)             # <<<<<<<<<<<<<<
 * 
 *     def _export_to_c(self, out_ptr):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_4 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_frombytes); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 3609, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = __pyx_convert_PyBytes_string_to_py_6libcpp_6string_std__in_string(__pyx_v_result); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 3609, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
        assert(__pyx_t_4);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
        __pyx_t_7 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_4, __pyx_t_6};
        __pyx_t_8 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 3609, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_safe, Py_True, __pyx_t_8, __pyx_callargs+2, 0) < (0)) __PYX_ERR(1, 3609, __pyx_L1_error)
        __pyx_t_3 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_8);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3609, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "pyarrow/types.pxi":3569
 *         return pyarrow_wrap_schema(new_schema)
 * 
 *     def to_string(self, truncate_metadata=True, show_field_metadata=True,             # <<<<<<<<<<<<<<
 *                   show_schema_metadata=True, element_size_limit=100):
 *         """
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_8);
      __Pyx_AddTraceback("pyarrow.lib.Schema.to_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/types.pxi":3611
 *         return frombytes(result, safe=True)
 * 
 *     def _export_to_c(self, out_ptr):             # <<<<<<<<<<<<<<
 *         """
 *         Export to a C ArrowSchema struct, given its pointer.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_6Schema_54_export_to_c(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_6Schema_53_export_to_c, "Schema._export_to_c(self, out_ptr)\n\nExport to a C ArrowSchema struct, given its pointer.\n\nBe careful: if you don't pass the ArrowSchema struct to a consumer,\nits memory will leak.  This is a low-level function intended for\nexpert users.");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_6Schema_54_export_to_c = {"_export_to_c", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_6Schema_54_export_to_c, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_6Schema_53_export_to_c};
    static PyObject *__pyx_pw_7pyarrow_3lib_6Schema_54_export_to_c(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_out_ptr = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("_export_to_c (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_out_ptr,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 3611, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3611, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_export_to_c", 0) < (0)) __PYX_ERR(1, 3611, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_export_to_c", 1, 1, 1, i); __PYX_ERR(1, 3611, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 1)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3611, __pyx_L3_error)
        }
        __pyx_v_out_ptr = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("_export_to_c", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3611, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.Schema._export_to_c", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_6Schema_53_export_to_c(((struct __pyx_obj_7pyarrow_3lib_Schema *)__pyx_v_self), __pyx_v_out_ptr);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_6Schema_53_export_to_c(struct __pyx_obj_7pyarrow_3lib_Schema *__pyx_v_self, PyObject *__pyx_v_out_ptr) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      void *__pyx_t_1;
      int __pyx_t_2;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("_export_to_c", 0);

      /* "pyarrow/types.pxi":3619
 *         expert users.
 *         """
 *         check_status(ExportSchema(deref(self.schema),             # <<<<<<<<<<<<<<
 *                                   <ArrowSchema*> _as_c_pointer(out_ptr)))
 * 
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "schema");
        __PYX_ERR(1, 3619, __pyx_L1_error)
      }

      /* "pyarrow/types.pxi":3620
 *         """
 *         check_status(ExportSchema(deref(self.schema),
 *                                   <ArrowSchema*> _as_c_pointer(out_ptr)))             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
*/
      __pyx_t_1 = __pyx_f_7pyarrow_3lib__as_c_pointer(__pyx_v_out_ptr, NULL); if (unlikely(__pyx_t_1 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(1, 3620, __pyx_L1_error)

      /* "pyarrow/types.pxi":3619
 *         expert users.
 *         """
 *         check_status(ExportSchema(deref(self.schema),             # <<<<<<<<<<<<<<
 *                                   <ArrowSchema*> _as_c_pointer(out_ptr)))
 * 
*/
      __pyx_t_2 = __pyx_f_7pyarrow_3lib_check_status(arrow::ExportSchema((*__pyx_v_self->schema), ((struct ArrowSchema *)__pyx_t_1))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(1, 3619, __pyx_L1_error)

      /* "pyarrow/types.pxi":3611
 *         return frombytes(result, safe=True)
 * 
 *     def _export_to_c(self, out_ptr):             # <<<<<<<<<<<<<<
 *         """
 *         Export to a C ArrowSchema struct, given its pointer.
*/

      /* function exit code */
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_AddTraceback("pyarrow.lib.Schema._export_to_c", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/types.pxi":3622
 *                                   <ArrowSchema*> _as_c_pointer(out_ptr)))
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def _import_from_c(in_ptr):
 *         """
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_6Schema_56_import_from_c(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_6Schema_55_import_from_c, "Schema._import_from_c(in_ptr)\n\nImport Schema from a C ArrowSchema struct, given its pointer.\n\nThis is a low-level function intended for expert users.");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_6Schema_56_import_from_c = {"_import_from_c", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_6Schema_56_import_from_c, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_6Schema_55_import_from_c};
    static PyObject *__pyx_pw_7pyarrow_3lib_6Schema_56_import_from_c(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_in_ptr = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("_import_from_c (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_in_ptr,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 3622, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3622, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_import_from_c", 0) < (0)) __PYX_ERR(1, 3622, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_import_from_c", 1, 1, 1, i); __PYX_ERR(1, 3622, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 1)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3622, __pyx_L3_error)
        }
        __pyx_v_in_ptr = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("_import_from_c", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3622, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.Schema._import_from_c", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_6Schema_55_import_from_c(__pyx_v_in_ptr);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_6Schema_55_import_from_c(PyObject *__pyx_v_in_ptr) {
      void *__pyx_v_c_ptr;
      std::shared_ptr< arrow::Schema>  __pyx_v_result;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      void *__pyx_t_1;
      std::shared_ptr< arrow::Schema>  __pyx_t_2;
      PyObject *__pyx_t_3 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("_import_from_c", 0);

      /* "pyarrow/types.pxi":3629
 *         This is a low-level function intended for expert users.
 *         """
 *         cdef void* c_ptr = _as_c_pointer(in_ptr)             # <<<<<<<<<<<<<<
 *         with nogil:
 *             result = GetResultValue(ImportSchema(<ArrowSchema*> c_ptr))
*/
      __pyx_t_1 = __pyx_f_7pyarrow_3lib__as_c_pointer(__pyx_v_in_ptr, NULL); if (unlikely(__pyx_t_1 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(1, 3629, __pyx_L1_error)
      __pyx_v_c_ptr = __pyx_t_1;

      /* "pyarrow/types.pxi":3630
 *         """
 *         cdef void* c_ptr = _as_c_pointer(in_ptr)
 *         with nogil:             # <<<<<<<<<<<<<<
 *             result = GetResultValue(ImportSchema(<ArrowSchema*> c_ptr))
 *         return pyarrow_wrap_schema(result)
*/
      {
          PyThreadState * _save;
          _save = PyEval_SaveThread();
          __Pyx_FastGIL_Remember();
          /*try:*/ {

            /* "pyarrow/types.pxi":3631
 *         cdef void* c_ptr = _as_c_pointer(in_ptr)
 *         with nogil:
 *             result = GetResultValue(ImportSchema(<ArrowSchema*> c_ptr))             # <<<<<<<<<<<<<<
 *         return pyarrow_wrap_schema(result)
 * 
*/
            __pyx_t_2 = arrow::py::GetResultValue<std::shared_ptr< arrow::Schema> >(arrow::ImportSchema(((struct ArrowSchema *)__pyx_v_c_ptr))); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 3631, __pyx_L4_error)
            __pyx_v_result = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_2);
          }

          /* "pyarrow/types.pxi":3630
 *         """
 *         cdef void* c_ptr = _as_c_pointer(in_ptr)
 *         with nogil:             # <<<<<<<<<<<<<<
 *             result = GetResultValue(ImportSchema(<ArrowSchema*> c_ptr))
 *         return pyarrow_wrap_schema(result)
*/
          /*finally:*/ {
            /*normal exit:*/{
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L5;
            }
            __pyx_L4_error: {
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L1_error;
            }
            __pyx_L5:;
          }
      }

      /* "pyarrow/types.pxi":3632
 *         with nogil:
 *             result = GetResultValue(ImportSchema(<ArrowSchema*> c_ptr))
 *         return pyarrow_wrap_schema(result)             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = pyarrow_wrap_schema(__pyx_v_result); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3632, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "pyarrow/types.pxi":3622
 *                                   <ArrowSchema*> _as_c_pointer(out_ptr)))
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def _import_from_c(in_ptr):
 *         """
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_AddTraceback("pyarrow.lib.Schema._import_from_c", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/types.pxi":3634
 *         return pyarrow_wrap_schema(result)
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return self.to_string()
 * 
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_6Schema_58__str__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_6Schema_58__str__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_6Schema_57__str__(((struct __pyx_obj_7pyarrow_3lib_Schema *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_6Schema_57__str__(struct __pyx_obj_7pyarrow_3lib_Schema *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      size_t __pyx_t_3;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__str__", 0);

      /* "pyarrow/types.pxi":3635
 * 
 *     def __str__(self):
 *         return self.to_string()             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = ((PyObject *)__pyx_v_self);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_3 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_to_string, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3635, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/types.pxi":3634
 *         return pyarrow_wrap_schema(result)
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return self.to_string()
 * 
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_AddTraceback("pyarrow.lib.Schema.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/types.pxi":3637
 *         return self.to_string()
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_6Schema_60__repr__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_6Schema_60__repr__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_6Schema_59__repr__(((struct __pyx_obj_7pyarrow_3lib_Schema *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_6Schema_59__repr__(struct __pyx_obj_7pyarrow_3lib_Schema *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      size_t __pyx_t_3;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__repr__", 0);

      /* "pyarrow/types.pxi":3638
 * 
 *     def __repr__(self):
 *         return self.__str__()             # <<<<<<<<<<<<<<
 * 
 *     def __arrow_c_schema__(self):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = ((PyObject *)__pyx_v_self);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_3 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_str, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3638, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/types.pxi":3637
 *         return self.to_string()
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_AddTraceback("pyarrow.lib.Schema.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/types.pxi":3640
 *         return self.__str__()
 * 
 *     def __arrow_c_schema__(self):             # <<<<<<<<<<<<<<
 *         """
 *         Export to a ArrowSchema PyCapsule
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_6Schema_62__arrow_c_schema__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_6Schema_61__arrow_c_schema__, "Schema.__arrow_c_schema__(self)\n\nExport to a ArrowSchema PyCapsule\n\nUnlike _export_to_c, this will not leak memory if the capsule is not used.");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_6Schema_62__arrow_c_schema__ = {"__arrow_c_schema__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_6Schema_62__arrow_c_schema__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_6Schema_61__arrow_c_schema__};
    static PyObject *__pyx_pw_7pyarrow_3lib_6Schema_62__arrow_c_schema__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__arrow_c_schema__ (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__arrow_c_schema__", 1, 0, 0, __pyx_nargs); return NULL; }
      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
      if (unlikely(__pyx_kwds_len < 0)) return NULL;
      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__arrow_c_schema__", __pyx_kwds); return NULL;}
      __pyx_r = __pyx_pf_7pyarrow_3lib_6Schema_61__arrow_c_schema__(((struct __pyx_obj_7pyarrow_3lib_Schema *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_6Schema_61__arrow_c_schema__(struct __pyx_obj_7pyarrow_3lib_Schema *__pyx_v_self) {
      struct ArrowSchema *__pyx_v_c_schema;
      PyObject *__pyx_v_capsule = NULL;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_t_2;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__arrow_c_schema__", 0);

      /* "pyarrow/types.pxi":3647
 *         """
 *         cdef ArrowSchema* c_schema
 *         capsule = alloc_c_schema(&c_schema)             # <<<<<<<<<<<<<<
 * 
 *         with nogil:
*/
      __pyx_t_1 = __pyx_f_7pyarrow_3lib_alloc_c_schema((&__pyx_v_c_schema)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3647, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_v_capsule = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "pyarrow/types.pxi":3649
 *         capsule = alloc_c_schema(&c_schema)
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             check_status(ExportSchema(deref(self.schema), c_schema))
 * 
*/
      {
          PyThreadState * _save;
          _save = PyEval_SaveThread();
          __Pyx_FastGIL_Remember();
          /*try:*/ {

            /* "pyarrow/types.pxi":3650
 * 
 *         with nogil:
 *             check_status(ExportSchema(deref(self.schema), c_schema))             # <<<<<<<<<<<<<<
 * 
 *         return capsule
*/
            if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
              PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "schema");
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              __PYX_ERR(1, 3650, __pyx_L4_error)
            }
            __pyx_t_2 = __pyx_f_7pyarrow_3lib_check_status(arrow::ExportSchema((*__pyx_v_self->schema), __pyx_v_c_schema)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(1, 3650, __pyx_L4_error)
          }

          /* "pyarrow/types.pxi":3649
 *         capsule = alloc_c_schema(&c_schema)
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             check_status(ExportSchema(deref(self.schema), c_schema))
 * 
*/
          /*finally:*/ {
            /*normal exit:*/{
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L5;
            }
            __pyx_L4_error: {
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L1_error;
            }
            __pyx_L5:;
          }
      }

      /* "pyarrow/types.pxi":3652
 *             check_status(ExportSchema(deref(self.schema), c_schema))
 * 
 *         return capsule             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_capsule);
      __pyx_r = __pyx_v_capsule;
      goto __pyx_L0;

      /* "pyarrow/types.pxi":3640
 *         return self.__str__()
 * 
 *     def __arrow_c_schema__(self):             # <<<<<<<<<<<<<<
 *         """
 *         Export to a ArrowSchema PyCapsule
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("pyarrow.lib.Schema.__arrow_c_schema__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_capsule);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/types.pxi":3654
 *         return capsule
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def _import_from_c_capsule(schema):
 *         """
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_6Schema_64_import_from_c_capsule(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_6Schema_63_import_from_c_capsule, "Schema._import_from_c_capsule(schema)\n\nImport a Schema from a ArrowSchema PyCapsule\n\nParameters\n----------\nschema : PyCapsule\n    A valid PyCapsule with name 'arrow_schema' containing an\n    ArrowSchema pointer.");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_6Schema_64_import_from_c_capsule = {"_import_from_c_capsule", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_6Schema_64_import_from_c_capsule, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_6Schema_63_import_from_c_capsule};
    static PyObject *__pyx_pw_7pyarrow_3lib_6Schema_64_import_from_c_capsule(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_schema = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("_import_from_c_capsule (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_schema,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 3654, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3654, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_import_from_c_capsule", 0) < (0)) __PYX_ERR(1, 3654, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_import_from_c_capsule", 1, 1, 1, i); __PYX_ERR(1, 3654, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 1)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3654, __pyx_L3_error)
        }
        __pyx_v_schema = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("_import_from_c_capsule", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3654, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.Schema._import_from_c_capsule", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_6Schema_63_import_from_c_capsule(__pyx_v_schema);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_6Schema_63_import_from_c_capsule(PyObject *__pyx_v_schema) {
      struct ArrowSchema *__pyx_v_c_schema;
      std::shared_ptr< arrow::Schema>  __pyx_v_result;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      int __pyx_t_1;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      size_t __pyx_t_4;
      void *__pyx_t_5;
      std::shared_ptr< arrow::Schema>  __pyx_t_6;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("_import_from_c_capsule", 0);

      /* "pyarrow/types.pxi":3668
 *             ArrowSchema* c_schema
 * 
 *         if not PyCapsule_IsValid(schema, 'arrow_schema'):             # <<<<<<<<<<<<<<
 *             raise ValueError(
 *                 "Not an ArrowSchema object"
*/
      __pyx_t_1 = (!PyCapsule_IsValid(__pyx_v_schema, __pyx_k_arrow_schema));
      if (unlikely(__pyx_t_1)) {

        /* "pyarrow/types.pxi":3669
 * 
 *         if not PyCapsule_IsValid(schema, 'arrow_schema'):
 *             raise ValueError(             # <<<<<<<<<<<<<<
 *                 "Not an ArrowSchema object"
 *             )
*/
        __pyx_t_3 = NULL;
        __pyx_t_4 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Not_an_ArrowSchema_object};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3669, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __Pyx_Raise(__pyx_t_2, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __PYX_ERR(1, 3669, __pyx_L1_error)

        /* "pyarrow/types.pxi":3668
 *             ArrowSchema* c_schema
 * 
 *         if not PyCapsule_IsValid(schema, 'arrow_schema'):             # <<<<<<<<<<<<<<
 *             raise ValueError(
 *                 "Not an ArrowSchema object"
*/
      }

      /* "pyarrow/types.pxi":3672
 *                 "Not an ArrowSchema object"
 *             )
 *         c_schema = <ArrowSchema*> PyCapsule_GetPointer(schema, 'arrow_schema')             # <<<<<<<<<<<<<<
 * 
 *         with nogil:
*/
      __pyx_t_5 = PyCapsule_GetPointer(__pyx_v_schema, __pyx_k_arrow_schema); if (unlikely(__pyx_t_5 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(1, 3672, __pyx_L1_error)
      __pyx_v_c_schema = ((struct ArrowSchema *)__pyx_t_5);

      /* "pyarrow/types.pxi":3674
 *         c_schema = <ArrowSchema*> PyCapsule_GetPointer(schema, 'arrow_schema')
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             result = GetResultValue(ImportSchema(c_schema))
 * 
*/
      {
          PyThreadState * _save;
          _save = PyEval_SaveThread();
          __Pyx_FastGIL_Remember();
          /*try:*/ {

            /* "pyarrow/types.pxi":3675
 * 
 *         with nogil:
 *             result = GetResultValue(ImportSchema(c_schema))             # <<<<<<<<<<<<<<
 * 
 *         return pyarrow_wrap_schema(result)
*/
            __pyx_t_6 = arrow::py::GetResultValue<std::shared_ptr< arrow::Schema> >(arrow::ImportSchema(__pyx_v_c_schema)); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 3675, __pyx_L5_error)
            __pyx_v_result = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_6);
          }

          /* "pyarrow/types.pxi":3674
 *         c_schema = <ArrowSchema*> PyCapsule_GetPointer(schema, 'arrow_schema')
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             result = GetResultValue(ImportSchema(c_schema))
 * 
*/
          /*finally:*/ {
            /*normal exit:*/{
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L6;
            }
            __pyx_L5_error: {
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L1_error;
            }
            __pyx_L6:;
          }
      }

      /* "pyarrow/types.pxi":3677
 *             result = GetResultValue(ImportSchema(c_schema))
 * 
 *         return pyarrow_wrap_schema(result)             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = pyarrow_wrap_schema(__pyx_v_result); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3677, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;

      /* "pyarrow/types.pxi":3654
 *         return capsule
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def _import_from_c_capsule(schema):
 *         """
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_AddTraceback("pyarrow.lib.Schema._import_from_c_capsule", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/types.pxi":3680
 * 
 * 
 * cdef CField.CMergeOptions _parse_field_merge_options(str promote_options) except *:             # <<<<<<<<<<<<<<
 *     """
 *     Returns MergeOptions::Permissive() or MergeOptions::Defaults() based on the value
*/

    static  arrow::Field::MergeOptions __pyx_f_7pyarrow_3lib__parse_field_merge_options(PyObject *__pyx_v_promote_options) {
       arrow::Field::MergeOptions __pyx_r;
      __Pyx_RefNannyDeclarations
      int __pyx_t_1;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      PyObject *__pyx_t_5 = NULL;
      size_t __pyx_t_6;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("_parse_field_merge_options", 0);

      /* "pyarrow/types.pxi":3685
 *     of `promote_options`.
 *     """
 *     if promote_options == "permissive":             # <<<<<<<<<<<<<<
 *         return CField.CMergeOptions.Permissive()
 *     elif promote_options == "default":
*/
      __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_promote_options, __pyx_mstate_global->__pyx_n_u_permissive, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 3685, __pyx_L1_error)
      if (__pyx_t_1) {

        /* "pyarrow/types.pxi":3686
 *     """
 *     if promote_options == "permissive":
 *         return CField.CMergeOptions.Permissive()             # <<<<<<<<<<<<<<
 *     elif promote_options == "default":
 *         return CField.CMergeOptions.Defaults()
*/
        __pyx_r =  arrow::Field::MergeOptions::Permissive();
        goto __pyx_L0;

        /* "pyarrow/types.pxi":3685
 *     of `promote_options`.
 *     """
 *     if promote_options == "permissive":             # <<<<<<<<<<<<<<
 *         return CField.CMergeOptions.Permissive()
 *     elif promote_options == "default":
*/
      }

      /* "pyarrow/types.pxi":3687
 *     if promote_options == "permissive":
 *         return CField.CMergeOptions.Permissive()
 *     elif promote_options == "default":             # <<<<<<<<<<<<<<
 *         return CField.CMergeOptions.Defaults()
 *     else:
*/
      __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_promote_options, __pyx_mstate_global->__pyx_n_u_default, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 3687, __pyx_L1_error)
      if (likely(__pyx_t_1)) {

        /* "pyarrow/types.pxi":3688
 *         return CField.CMergeOptions.Permissive()
 *     elif promote_options == "default":
 *         return CField.CMergeOptions.Defaults()             # <<<<<<<<<<<<<<
 *     else:
 *         raise ValueError(f"Invalid promote_options: {promote_options}")
*/
        __pyx_r =  arrow::Field::MergeOptions::Defaults();
        goto __pyx_L0;

        /* "pyarrow/types.pxi":3687
 *     if promote_options == "permissive":
 *         return CField.CMergeOptions.Permissive()
 *     elif promote_options == "default":             # <<<<<<<<<<<<<<
 *         return CField.CMergeOptions.Defaults()
 *     else:
*/
      }

      /* "pyarrow/types.pxi":3690
 *         return CField.CMergeOptions.Defaults()
 *     else:
 *         raise ValueError(f"Invalid promote_options: {promote_options}")             # <<<<<<<<<<<<<<
 * 
 * 
*/
      /*else*/ {
        __pyx_t_3 = NULL;
        __pyx_t_4 = __Pyx_PyUnicode_Unicode(__pyx_v_promote_options); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3690, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_Invalid_promote_options, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 3690, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_6 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3690, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __Pyx_Raise(__pyx_t_2, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __PYX_ERR(1, 3690, __pyx_L1_error)
      }

      /* "pyarrow/types.pxi":3680
 * 
 * 
 * cdef CField.CMergeOptions _parse_field_merge_options(str promote_options) except *:             # <<<<<<<<<<<<<<
 *     """
 *     Returns MergeOptions::Permissive() or MergeOptions::Defaults() based on the value
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_AddTraceback("pyarrow.lib._parse_field_merge_options", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_pretend_to_initialize(&__pyx_r);
      __pyx_L0:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/types.pxi":3693
 * 
 * 
 * def unify_schemas(schemas, *, promote_options="default"):             # <<<<<<<<<<<<<<
 *     """
 *     Unify schemas by merging fields by name.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_69unify_schemas(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_68unify_schemas, "unify_schemas(schemas, *, promote_options='default')\n\nUnify schemas by merging fields by name.\n\nThe resulting schema will contain the union of fields from all schemas.\nFields with the same name will be merged. Note that two fields with\ndifferent types will fail merging by default.\n\n- The unified field will inherit the metadata from the schema where\n    that field is first defined.\n- The first N fields in the schema will be ordered the same as the\n    N fields in the first schema.\n\nThe resulting schema will inherit its metadata from the first input\nschema.\n\nParameters\n----------\nschemas : list of Schema\n    Schemas to merge into a single one.\npromote_options : str, default default\n    Accepts strings \"default\" and \"permissive\".\n    Default: null and only null can be unified with another type.\n    Permissive: types are promoted to the greater common denominator.\n\nReturns\n-------\nSchema\n\nRaises\n------\nArrowInvalid :\n    If any input schema contains fields with duplicate names.\n    If Fields of the same name are not mergeable.");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_69unify_schemas = {"unify_schemas", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_69unify_schemas, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_68unify_schemas};
    static PyObject *__pyx_pw_7pyarrow_3lib_69unify_schemas(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_schemas = 0;
      PyObject *__pyx_v_promote_options = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[2] = {0,0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("unify_schemas (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_schemas,&__pyx_mstate_global->__pyx_n_u_promote_options,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 3693, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3693, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "unify_schemas", 0) < (0)) __PYX_ERR(1, 3693, __pyx_L3_error)
          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_n_u_default)));
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("unify_schemas", 1, 1, 1, i); __PYX_ERR(1, 3693, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 1)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3693, __pyx_L3_error)
          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_n_u_default)));
        }
        __pyx_v_schemas = values[0];
        __pyx_v_promote_options = values[1];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("unify_schemas", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3693, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.unify_schemas", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_68unify_schemas(__pyx_self, __pyx_v_schemas, __pyx_v_promote_options);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_68unify_schemas(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_schemas, PyObject *__pyx_v_promote_options) {
      struct __pyx_obj_7pyarrow_3lib_Schema *__pyx_v_schema = 0;
       arrow::Field::MergeOptions __pyx_v_c_options;
      std::vector<std::shared_ptr< arrow::Schema> >  __pyx_v_c_schemas;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      Py_ssize_t __pyx_t_2;
      PyObject *(*__pyx_t_3)(PyObject *);
      PyObject *__pyx_t_4 = NULL;
      int __pyx_t_5;
      int __pyx_t_6;
      PyObject *__pyx_t_7 = NULL;
      PyObject *__pyx_t_8 = NULL;
      PyObject *__pyx_t_9 = NULL;
      size_t __pyx_t_10;
      std::shared_ptr< arrow::Schema>  __pyx_t_11;
       arrow::Field::MergeOptions __pyx_t_12;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("unify_schemas", 0);

      /* "pyarrow/types.pxi":3732
 *         CField.CMergeOptions c_options
 *         vector[shared_ptr[CSchema]] c_schemas
 *     for schema in schemas:             # <<<<<<<<<<<<<<
 *         if not isinstance(schema, Schema):
 *             raise TypeError(f"Expected Schema, got {type(schema)}")
*/
      if (likely(PyList_CheckExact(__pyx_v_schemas)) || PyTuple_CheckExact(__pyx_v_schemas)) {
        __pyx_t_1 = __pyx_v_schemas; __Pyx_INCREF(__pyx_t_1);
        __pyx_t_2 = 0;
        __pyx_t_3 = NULL;
      } else {
        __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_schemas); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3732, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_3 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3732, __pyx_L1_error)
      }
      for (;;) {
        if (likely(!__pyx_t_3)) {
          if (likely(PyList_CheckExact(__pyx_t_1))) {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
              #if !CYTHON_ASSUME_SAFE_SIZE
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 3732, __pyx_L1_error)
              #endif
              if (__pyx_t_2 >= __pyx_temp) break;
            }
            __pyx_t_4 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_2, __Pyx_ReferenceSharing_OwnStrongReference);
            ++__pyx_t_2;
          } else {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
              #if !CYTHON_ASSUME_SAFE_SIZE
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 3732, __pyx_L1_error)
              #endif
              if (__pyx_t_2 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_4 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2));
            #else
            __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2);
            #endif
            ++__pyx_t_2;
          }
          if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3732, __pyx_L1_error)
        } else {
          __pyx_t_4 = __pyx_t_3(__pyx_t_1);
          if (unlikely(!__pyx_t_4)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(1, 3732, __pyx_L1_error)
              PyErr_Clear();
            }
            break;
          }
        }
        __Pyx_GOTREF(__pyx_t_4);
        if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Schema))))) __PYX_ERR(1, 3732, __pyx_L1_error)
        __Pyx_XDECREF_SET(__pyx_v_schema, ((struct __pyx_obj_7pyarrow_3lib_Schema *)__pyx_t_4));
        __pyx_t_4 = 0;

        /* "pyarrow/types.pxi":3733
 *         vector[shared_ptr[CSchema]] c_schemas
 *     for schema in schemas:
 *         if not isinstance(schema, Schema):             # <<<<<<<<<<<<<<
 *             raise TypeError(f"Expected Schema, got {type(schema)}")
 *         c_schemas.push_back(pyarrow_unwrap_schema(schema))
*/
        __pyx_t_5 = __Pyx_TypeCheck(((PyObject *)__pyx_v_schema), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Schema); 
        __pyx_t_6 = (!__pyx_t_5);
        if (unlikely(__pyx_t_6)) {

          /* "pyarrow/types.pxi":3734
 *     for schema in schemas:
 *         if not isinstance(schema, Schema):
 *             raise TypeError(f"Expected Schema, got {type(schema)}")             # <<<<<<<<<<<<<<
 *         c_schemas.push_back(pyarrow_unwrap_schema(schema))
 * 
*/
          __pyx_t_7 = NULL;
          __pyx_t_8 = __Pyx_PyObject_FormatSimple(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_schema))), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 3734, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __pyx_t_9 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_Expected_Schema_got, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 3734, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_t_10 = 1;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_9};
            __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
            if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3734, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
          }
          __Pyx_Raise(__pyx_t_4, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __PYX_ERR(1, 3734, __pyx_L1_error)

          /* "pyarrow/types.pxi":3733
 *         vector[shared_ptr[CSchema]] c_schemas
 *     for schema in schemas:
 *         if not isinstance(schema, Schema):             # <<<<<<<<<<<<<<
 *             raise TypeError(f"Expected Schema, got {type(schema)}")
 *         c_schemas.push_back(pyarrow_unwrap_schema(schema))
*/
        }

        /* "pyarrow/types.pxi":3735
 *         if not isinstance(schema, Schema):
 *             raise TypeError(f"Expected Schema, got {type(schema)}")
 *         c_schemas.push_back(pyarrow_unwrap_schema(schema))             # <<<<<<<<<<<<<<
 * 
 *     c_options = _parse_field_merge_options(promote_options)
*/
        __pyx_t_11 = pyarrow_unwrap_schema(((PyObject *)__pyx_v_schema)); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3735, __pyx_L1_error)
        try {
          __pyx_v_c_schemas.push_back(__pyx_t_11);
        } catch(...) {
          __Pyx_CppExn2PyErr();
          __PYX_ERR(1, 3735, __pyx_L1_error)
        }

        /* "pyarrow/types.pxi":3732
 *         CField.CMergeOptions c_options
 *         vector[shared_ptr[CSchema]] c_schemas
 *     for schema in schemas:             # <<<<<<<<<<<<<<
 *         if not isinstance(schema, Schema):
 *             raise TypeError(f"Expected Schema, got {type(schema)}")
*/
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "pyarrow/types.pxi":3737
 *         c_schemas.push_back(pyarrow_unwrap_schema(schema))
 * 
 *     c_options = _parse_field_merge_options(promote_options)             # <<<<<<<<<<<<<<
 * 
 *     return pyarrow_wrap_schema(
*/
      __pyx_t_1 = __pyx_v_promote_options;
      __Pyx_INCREF(__pyx_t_1);
      if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_1))) __PYX_ERR(1, 3737, __pyx_L1_error)
      __pyx_t_12 = __pyx_f_7pyarrow_3lib__parse_field_merge_options(((PyObject*)__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3737, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_v_c_options = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_12);

      /* "pyarrow/types.pxi":3739
 *     c_options = _parse_field_merge_options(promote_options)
 * 
 *     return pyarrow_wrap_schema(             # <<<<<<<<<<<<<<
 *         GetResultValue(UnifySchemas(c_schemas, c_options)))
 * 
*/
      __Pyx_XDECREF(__pyx_r);

      /* "pyarrow/types.pxi":3740
 * 
 *     return pyarrow_wrap_schema(
 *         GetResultValue(UnifySchemas(c_schemas, c_options)))             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __pyx_t_11 = arrow::py::GetResultValue<std::shared_ptr< arrow::Schema> >(arrow::UnifySchemas(__pyx_v_c_schemas, __pyx_v_c_options)); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3740, __pyx_L1_error)

      /* "pyarrow/types.pxi":3739
 *     c_options = _parse_field_merge_options(promote_options)
 * 
 *     return pyarrow_wrap_schema(             # <<<<<<<<<<<<<<
 *         GetResultValue(UnifySchemas(c_schemas, c_options)))
 * 
*/
      __pyx_t_1 = pyarrow_wrap_schema(__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3739, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/types.pxi":3693
 * 
 * 
 * def unify_schemas(schemas, *, promote_options="default"):             # <<<<<<<<<<<<<<
 *     """
 *     Unify schemas by merging fields by name.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_8);
      __Pyx_XDECREF(__pyx_t_9);
      __Pyx_AddTraceback("pyarrow.lib.unify_schemas", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF((PyObject *)__pyx_v_schema);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/types.pxi":3746
 * 
 * 
 * cdef DataType primitive_type(Type type):             # <<<<<<<<<<<<<<
 *     if type in _type_cache:
 *         return _type_cache[type]
*/

    static struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_f_7pyarrow_3lib_primitive_type(enum  arrow::Type::type __pyx_v_type) {
      struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v_out = 0;
      struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_t_2;
      PyObject *__pyx_t_3 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("primitive_type", 0);

      /* "pyarrow/types.pxi":3747
 * 
 * cdef DataType primitive_type(Type type):
 *     if type in _type_cache:             # <<<<<<<<<<<<<<
 *         return _type_cache[type]
 * 
*/
      __pyx_t_1 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type(__pyx_v_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3747, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (unlikely(__pyx_v_7pyarrow_3lib__type_cache == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
        __PYX_ERR(1, 3747, __pyx_L1_error)
      }
      __pyx_t_2 = (__Pyx_PyDict_ContainsTF(__pyx_t_1, __pyx_v_7pyarrow_3lib__type_cache, Py_EQ)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(1, 3747, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (__pyx_t_2) {

        /* "pyarrow/types.pxi":3748
 * cdef DataType primitive_type(Type type):
 *     if type in _type_cache:
 *         return _type_cache[type]             # <<<<<<<<<<<<<<
 * 
 *     cdef DataType out = DataType.__new__(DataType)
*/
        __Pyx_XDECREF((PyObject *)__pyx_r);
        if (unlikely(__pyx_v_7pyarrow_3lib__type_cache == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
          __PYX_ERR(1, 3748, __pyx_L1_error)
        }
        __pyx_t_1 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type(__pyx_v_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3748, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_7pyarrow_3lib__type_cache, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3748, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType))))) __PYX_ERR(1, 3748, __pyx_L1_error)
        __pyx_r = ((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_t_3);
        __pyx_t_3 = 0;
        goto __pyx_L0;

        /* "pyarrow/types.pxi":3747
 * 
 * cdef DataType primitive_type(Type type):
 *     if type in _type_cache:             # <<<<<<<<<<<<<<
 *         return _type_cache[type]
 * 
*/
      }

      /* "pyarrow/types.pxi":3750
 *         return _type_cache[type]
 * 
 *     cdef DataType out = DataType.__new__(DataType)             # <<<<<<<<<<<<<<
 *     out.init(GetPrimitiveType(type))
 * 
*/
      __pyx_t_3 = ((PyObject *)__pyx_tp_new_7pyarrow_3lib_DataType(((PyTypeObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType), __pyx_mstate_global->__pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3750, __pyx_L1_error)
      __Pyx_GOTREF((PyObject *)__pyx_t_3);
      __pyx_v_out = ((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_t_3);
      __pyx_t_3 = 0;

      /* "pyarrow/types.pxi":3751
 * 
 *     cdef DataType out = DataType.__new__(DataType)
 *     out.init(GetPrimitiveType(type))             # <<<<<<<<<<<<<<
 * 
 *     _type_cache[type] = out
*/
      if (unlikely(((PyObject *)__pyx_v_out) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "init");
        __PYX_ERR(1, 3751, __pyx_L1_error)
      }
      ((struct __pyx_vtabstruct_7pyarrow_3lib_DataType *)__pyx_v_out->__pyx_vtab)->init(__pyx_v_out, arrow::py::GetPrimitiveType(__pyx_v_type)); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3751, __pyx_L1_error)

      /* "pyarrow/types.pxi":3753
 *     out.init(GetPrimitiveType(type))
 * 
 *     _type_cache[type] = out             # <<<<<<<<<<<<<<
 *     return out
 * 
*/
      if (unlikely(__pyx_v_7pyarrow_3lib__type_cache == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(1, 3753, __pyx_L1_error)
      }
      __pyx_t_3 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type(__pyx_v_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3753, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (unlikely((PyDict_SetItem(__pyx_v_7pyarrow_3lib__type_cache, __pyx_t_3, ((PyObject *)__pyx_v_out)) < 0))) __PYX_ERR(1, 3753, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "pyarrow/types.pxi":3754
 * 
 *     _type_cache[type] = out
 *     return out             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __Pyx_INCREF((PyObject *)__pyx_v_out);
      __pyx_r = __pyx_v_out;
      goto __pyx_L0;

      /* "pyarrow/types.pxi":3746
 * 
 * 
 * cdef DataType primitive_type(Type type):             # <<<<<<<<<<<<<<
 *     if type in _type_cache:
 *         return _type_cache[type]
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_AddTraceback("pyarrow.lib.primitive_type", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = 0;
      __pyx_L0:;
      __Pyx_XDECREF((PyObject *)__pyx_v_out);
      __Pyx_XGIVEREF((PyObject *)__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/types.pxi":3761
 * 
 * 
 * def field(name, type=None, nullable=None, metadata=None):             # <<<<<<<<<<<<<<
 *     """
 *     Create a pyarrow.Field instance.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_71field(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_70field, "field(name, type=None, nullable=None, metadata=None)\n\nCreate a pyarrow.Field instance.\n\nParameters\n----------\nname : str or bytes\n    Name of the field.\n    Alternatively, you can also pass an object that implements the Arrow\n    PyCapsule Protocol for schemas (has an ``__arrow_c_schema__`` method).\ntype : pyarrow.DataType or str\n    Arrow datatype of the field or a string matching one.\nnullable : bool, default True\n    Whether the field's values are nullable.\nmetadata : dict, default None\n    Optional field metadata, the keys and values must be coercible to\n    bytes.\n\nReturns\n-------\nfield : pyarrow.Field\n\nExamples\n--------\nCreate an instance of pyarrow.Field:\n\n>>> import pyarrow as pa\n>>> pa.field('key', pa.int32())\npyarrow.Field<key: int32>\n>>> pa.field('key', pa.int32(), nullable=False)\npyarrow.Field<key: int32 not null>\n\n>>> field = pa.field('key', pa.int32(),\n...                  metadata={\"key\": \"Something important\"})\n>>> field\npyarrow.Field<key: int32>\n>>> field.metadata\n{b'key': b'Something important'}\n\nUse the field to create a struct type:\n\n>>> pa.struct([field])\nStructType(struct<key: int32>)\n\nA str can also be passed for the type parameter:\n\n>>> pa.field('key', 'int32')\npyarrow.Field<key: int32>");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_71field = {"field", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_71field, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_70field};
    static PyObject *__pyx_pw_7pyarrow_3lib_71field(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_name = 0;
      PyObject *__pyx_v_type = 0;
      PyObject *__pyx_v_nullable = 0;
      PyObject *__pyx_v_metadata = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[4] = {0,0,0,0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("field (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_name,&__pyx_mstate_global->__pyx_n_u_type,&__pyx_mstate_global->__pyx_n_u_nullable,&__pyx_mstate_global->__pyx_n_u_metadata,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 3761, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  4:
            values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(1, 3761, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  3:
            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 3761, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 3761, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3761, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "field", 0) < (0)) __PYX_ERR(1, 3761, __pyx_L3_error)
          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
          if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
          if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None));
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("field", 0, 1, 4, i); __PYX_ERR(1, 3761, __pyx_L3_error) }
          }
        } else {
          switch (__pyx_nargs) {
            case  4:
            values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(1, 3761, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  3:
            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 3761, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 3761, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3761, __pyx_L3_error)
            break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
          if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
          if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None));
        }
        __pyx_v_name = values[0];
        __pyx_v_type = values[1];
        __pyx_v_nullable = values[2];
        __pyx_v_metadata = values[3];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("field", 0, 1, 4, __pyx_nargs); __PYX_ERR(1, 3761, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.field", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_70field(__pyx_self, __pyx_v_name, __pyx_v_type, __pyx_v_nullable, __pyx_v_metadata);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_70field(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name, PyObject *__pyx_v_type, PyObject *__pyx_v_nullable, PyObject *__pyx_v_metadata) {
      PyObject *__pyx_v_field = NULL;
      struct __pyx_obj_7pyarrow_3lib_Field *__pyx_v_result = 0;
      struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v__type = 0;
      std::shared_ptr< arrow::KeyValueMetadata const >  __pyx_v_c_meta;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      int __pyx_t_1;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      size_t __pyx_t_4;
      PyObject *__pyx_t_5 = NULL;
      PyObject *__pyx_t_6 = NULL;
      struct __pyx_opt_args_7pyarrow_3lib_ensure_type __pyx_t_7;
      struct __pyx_opt_args_7pyarrow_3lib_ensure_metadata __pyx_t_8;
      std::shared_ptr< arrow::KeyValueMetadata const >  __pyx_t_9;
      int __pyx_t_10;
      int __pyx_t_11;
      std::string __pyx_t_12;
      bool __pyx_t_13;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("field", 0);
      __Pyx_INCREF(__pyx_v_nullable);
      __Pyx_INCREF(__pyx_v_metadata);

      /* "pyarrow/types.pxi":3810
 *     pyarrow.Field<key: int32>
 *     """
 *     if hasattr(name, "__arrow_c_schema__"):             # <<<<<<<<<<<<<<
 *         if type is not None:
 *             raise ValueError(
*/
      __pyx_t_1 = __Pyx_HasAttr(__pyx_v_name, __pyx_mstate_global->__pyx_n_u_arrow_c_schema); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 3810, __pyx_L1_error)
      if (__pyx_t_1) {

        /* "pyarrow/types.pxi":3811
 *     """
 *     if hasattr(name, "__arrow_c_schema__"):
 *         if type is not None:             # <<<<<<<<<<<<<<
 *             raise ValueError(
 *                 "cannot specify 'type' when creating a Field from an ArrowSchema"
*/
        __pyx_t_1 = (__pyx_v_type != Py_None);
        if (unlikely(__pyx_t_1)) {

          /* "pyarrow/types.pxi":3812
 *     if hasattr(name, "__arrow_c_schema__"):
 *         if type is not None:
 *             raise ValueError(             # <<<<<<<<<<<<<<
 *                 "cannot specify 'type' when creating a Field from an ArrowSchema"
 *             )
*/
          __pyx_t_3 = NULL;
          __pyx_t_4 = 1;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_cannot_specify_type_when_creatin};
            __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3812, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
          }
          __Pyx_Raise(__pyx_t_2, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __PYX_ERR(1, 3812, __pyx_L1_error)

          /* "pyarrow/types.pxi":3811
 *     """
 *     if hasattr(name, "__arrow_c_schema__"):
 *         if type is not None:             # <<<<<<<<<<<<<<
 *             raise ValueError(
 *                 "cannot specify 'type' when creating a Field from an ArrowSchema"
*/
        }

        /* "pyarrow/types.pxi":3815
 *                 "cannot specify 'type' when creating a Field from an ArrowSchema"
 *             )
 *         field = Field._import_from_c_capsule(name.__arrow_c_schema__())             # <<<<<<<<<<<<<<
 *         if metadata is not None:
 *             field = field.with_metadata(metadata)
*/
        __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Field);
        __Pyx_INCREF(__pyx_t_3);
        __pyx_t_6 = __pyx_v_name;
        __Pyx_INCREF(__pyx_t_6);
        __pyx_t_4 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
          __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_arrow_c_schema, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 3815, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
        }
        __pyx_t_4 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
          __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_import_from_c_capsule, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3815, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __pyx_v_field = __pyx_t_2;
        __pyx_t_2 = 0;

        /* "pyarrow/types.pxi":3816
 *             )
 *         field = Field._import_from_c_capsule(name.__arrow_c_schema__())
 *         if metadata is not None:             # <<<<<<<<<<<<<<
 *             field = field.with_metadata(metadata)
 *         if nullable is not None:
*/
        __pyx_t_1 = (__pyx_v_metadata != Py_None);
        if (__pyx_t_1) {

          /* "pyarrow/types.pxi":3817
 *         field = Field._import_from_c_capsule(name.__arrow_c_schema__())
 *         if metadata is not None:
 *             field = field.with_metadata(metadata)             # <<<<<<<<<<<<<<
 *         if nullable is not None:
 *             field = field.with_nullable(nullable)
*/
          __pyx_t_5 = __pyx_v_field;
          __Pyx_INCREF(__pyx_t_5);
          __pyx_t_4 = 0;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_metadata};
            __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_with_metadata, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
            if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3817, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
          }
          __Pyx_DECREF_SET(__pyx_v_field, __pyx_t_2);
          __pyx_t_2 = 0;

          /* "pyarrow/types.pxi":3816
 *             )
 *         field = Field._import_from_c_capsule(name.__arrow_c_schema__())
 *         if metadata is not None:             # <<<<<<<<<<<<<<
 *             field = field.with_metadata(metadata)
 *         if nullable is not None:
*/
        }

        /* "pyarrow/types.pxi":3818
 *         if metadata is not None:
 *             field = field.with_metadata(metadata)
 *         if nullable is not None:             # <<<<<<<<<<<<<<
 *             field = field.with_nullable(nullable)
 *         return field
*/
        __pyx_t_1 = (__pyx_v_nullable != Py_None);
        if (__pyx_t_1) {

          /* "pyarrow/types.pxi":3819
 *             field = field.with_metadata(metadata)
 *         if nullable is not None:
 *             field = field.with_nullable(nullable)             # <<<<<<<<<<<<<<
 *         return field
 * 
*/
          __pyx_t_5 = __pyx_v_field;
          __Pyx_INCREF(__pyx_t_5);
          __pyx_t_4 = 0;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_nullable};
            __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_with_nullable, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
            if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3819, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
          }
          __Pyx_DECREF_SET(__pyx_v_field, __pyx_t_2);
          __pyx_t_2 = 0;

          /* "pyarrow/types.pxi":3818
 *         if metadata is not None:
 *             field = field.with_metadata(metadata)
 *         if nullable is not None:             # <<<<<<<<<<<<<<
 *             field = field.with_nullable(nullable)
 *         return field
*/
        }

        /* "pyarrow/types.pxi":3820
 *         if nullable is not None:
 *             field = field.with_nullable(nullable)
 *         return field             # <<<<<<<<<<<<<<
 * 
 *     cdef:
*/
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_v_field);
        __pyx_r = __pyx_v_field;
        goto __pyx_L0;

        /* "pyarrow/types.pxi":3810
 *     pyarrow.Field<key: int32>
 *     """
 *     if hasattr(name, "__arrow_c_schema__"):             # <<<<<<<<<<<<<<
 *         if type is not None:
 *             raise ValueError(
*/
      }

      /* "pyarrow/types.pxi":3823
 * 
 *     cdef:
 *         Field result = Field.__new__(Field)             # <<<<<<<<<<<<<<
 *         DataType _type = ensure_type(type, allow_none=False)
 *         shared_ptr[const CKeyValueMetadata] c_meta
*/
      __pyx_t_2 = ((PyObject *)__pyx_tp_new_7pyarrow_3lib_Field(((PyTypeObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Field), __pyx_mstate_global->__pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3823, __pyx_L1_error)
      __Pyx_GOTREF((PyObject *)__pyx_t_2);
      __pyx_v_result = ((struct __pyx_obj_7pyarrow_3lib_Field *)__pyx_t_2);
      __pyx_t_2 = 0;

      /* "pyarrow/types.pxi":3824
 *     cdef:
 *         Field result = Field.__new__(Field)
 *         DataType _type = ensure_type(type, allow_none=False)             # <<<<<<<<<<<<<<
 *         shared_ptr[const CKeyValueMetadata] c_meta
 * 
*/
      __pyx_t_7.__pyx_n = 1;
      __pyx_t_7.allow_none = 0;
      __pyx_t_2 = ((PyObject *)__pyx_f_7pyarrow_3lib_ensure_type(__pyx_v_type, 0, &__pyx_t_7)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3824, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_v__type = ((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_t_2);
      __pyx_t_2 = 0;

      /* "pyarrow/types.pxi":3827
 *         shared_ptr[const CKeyValueMetadata] c_meta
 * 
 *     nullable = True if nullable is None else nullable             # <<<<<<<<<<<<<<
 * 
 *     metadata = ensure_metadata(metadata, allow_none=True)
*/
      __pyx_t_1 = (__pyx_v_nullable == Py_None);
      if (__pyx_t_1) {
        __Pyx_INCREF(Py_True);
        __pyx_t_2 = Py_True;
      } else {
        __Pyx_INCREF(__pyx_v_nullable);
        __pyx_t_2 = __pyx_v_nullable;
      }
      __Pyx_DECREF_SET(__pyx_v_nullable, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "pyarrow/types.pxi":3829
 *     nullable = True if nullable is None else nullable
 * 
 *     metadata = ensure_metadata(metadata, allow_none=True)             # <<<<<<<<<<<<<<
 *     c_meta = pyarrow_unwrap_metadata(metadata)
 * 
*/
      __pyx_t_8.__pyx_n = 1;
      __pyx_t_8.allow_none = 1;
      __pyx_t_2 = ((PyObject *)__pyx_f_7pyarrow_3lib_ensure_metadata(__pyx_v_metadata, 0, &__pyx_t_8)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3829, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF_SET(__pyx_v_metadata, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "pyarrow/types.pxi":3830
 * 
 *     metadata = ensure_metadata(metadata, allow_none=True)
 *     c_meta = pyarrow_unwrap_metadata(metadata)             # <<<<<<<<<<<<<<
 * 
 *     if _type.type.id() == _Type_NA and not nullable:
*/
      __pyx_t_9 = __pyx_f_7pyarrow_3lib_pyarrow_unwrap_metadata(__pyx_v_metadata); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3830, __pyx_L1_error)
      __pyx_v_c_meta = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_9);

      /* "pyarrow/types.pxi":3832
 *     c_meta = pyarrow_unwrap_metadata(metadata)
 * 
 *     if _type.type.id() == _Type_NA and not nullable:             # <<<<<<<<<<<<<<
 *         raise ValueError("A null type field may not be non-nullable")
 * 
*/
      if (unlikely(((PyObject *)__pyx_v__type) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "type");
        __PYX_ERR(1, 3832, __pyx_L1_error)
      }
      __pyx_t_10 = (__pyx_v__type->type->id() ==  arrow::Type::NA);
      if (__pyx_t_10) {
      } else {
        __pyx_t_1 = __pyx_t_10;
        goto __pyx_L8_bool_binop_done;
      }
      __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_nullable); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(1, 3832, __pyx_L1_error)
      __pyx_t_11 = (!__pyx_t_10);
      __pyx_t_1 = __pyx_t_11;
      __pyx_L8_bool_binop_done:;
      if (unlikely(__pyx_t_1)) {

        /* "pyarrow/types.pxi":3833
 * 
 *     if _type.type.id() == _Type_NA and not nullable:
 *         raise ValueError("A null type field may not be non-nullable")             # <<<<<<<<<<<<<<
 * 
 *     result.sp_field.reset(
*/
        __pyx_t_5 = NULL;
        __pyx_t_4 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_A_null_type_field_may_not_be_non};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3833, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __Pyx_Raise(__pyx_t_2, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __PYX_ERR(1, 3833, __pyx_L1_error)

        /* "pyarrow/types.pxi":3832
 *     c_meta = pyarrow_unwrap_metadata(metadata)
 * 
 *     if _type.type.id() == _Type_NA and not nullable:             # <<<<<<<<<<<<<<
 *         raise ValueError("A null type field may not be non-nullable")
 * 
*/
      }

      /* "pyarrow/types.pxi":3835
 *         raise ValueError("A null type field may not be non-nullable")
 * 
 *     result.sp_field.reset(             # <<<<<<<<<<<<<<
 *         new CField(tobytes(name), _type.sp_type, nullable, c_meta)
 *     )
*/
      if (unlikely(((PyObject *)__pyx_v_result) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_field");
        __PYX_ERR(1, 3835, __pyx_L1_error)
      }

      /* "pyarrow/types.pxi":3836
 * 
 *     result.sp_field.reset(
 *         new CField(tobytes(name), _type.sp_type, nullable, c_meta)             # <<<<<<<<<<<<<<
 *     )
 *     result.field = result.sp_field.get()
*/
      __pyx_t_5 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_tobytes); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3836, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
        assert(__pyx_t_5);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
        __pyx_t_4 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_name};
        __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3836, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
      }
      __pyx_t_12 = __pyx_convert_string_from_py_6libcpp_6string_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3836, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(((PyObject *)__pyx_v__type) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_type");
        __PYX_ERR(1, 3836, __pyx_L1_error)
      }
      __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_v_nullable); if (unlikely((__pyx_t_13 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(1, 3836, __pyx_L1_error)

      /* "pyarrow/types.pxi":3835
 *         raise ValueError("A null type field may not be non-nullable")
 * 
 *     result.sp_field.reset(             # <<<<<<<<<<<<<<
 *         new CField(tobytes(name), _type.sp_type, nullable, c_meta)
 *     )
*/
      __pyx_v_result->sp_field.reset(new  arrow::Field(__pyx_t_12, __pyx_v__type->sp_type, __pyx_t_13, __pyx_v_c_meta));

      /* "pyarrow/types.pxi":3838
 *         new CField(tobytes(name), _type.sp_type, nullable, c_meta)
 *     )
 *     result.field = result.sp_field.get()             # <<<<<<<<<<<<<<
 *     result.type = _type
 * 
*/
      if (unlikely(((PyObject *)__pyx_v_result) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_field");
        __PYX_ERR(1, 3838, __pyx_L1_error)
      }
      if (unlikely(((PyObject *)__pyx_v_result) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "field");
        __PYX_ERR(1, 3838, __pyx_L1_error)
      }
      __pyx_v_result->field = __pyx_v_result->sp_field.get();

      /* "pyarrow/types.pxi":3839
 *     )
 *     result.field = result.sp_field.get()
 *     result.type = _type             # <<<<<<<<<<<<<<
 * 
 *     return result
*/
      if (unlikely(((PyObject *)__pyx_v_result) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "type");
        __PYX_ERR(1, 3839, __pyx_L1_error)
      }
      __Pyx_INCREF((PyObject *)__pyx_v__type);
      __Pyx_GIVEREF((PyObject *)__pyx_v__type);
      __Pyx_GOTREF((PyObject *)__pyx_v_result->type);
      __Pyx_DECREF((PyObject *)__pyx_v_result->type);
      __pyx_v_result->type = __pyx_v__type;

      /* "pyarrow/types.pxi":3841
 *     result.type = _type
 * 
 *     return result             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF((PyObject *)__pyx_v_result);
      __pyx_r = ((PyObject *)__pyx_v_result);
      goto __pyx_L0;

      /* "pyarrow/types.pxi":3761
 * 
 * 
 * def field(name, type=None, nullable=None, metadata=None):             # <<<<<<<<<<<<<<
 *     """
 *     Create a pyarrow.Field instance.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_AddTraceback("pyarrow.lib.field", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_field);
      __Pyx_XDECREF((PyObject *)__pyx_v_result);
      __Pyx_XDECREF((PyObject *)__pyx_v__type);
      __Pyx_XDECREF(__pyx_v_nullable);
      __Pyx_XDECREF(__pyx_v_metadata);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/types.pxi":3858
 * 
 * 
 * def null():             # <<<<<<<<<<<<<<
 *     """
 *     Create instance of null type.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_73null(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_72null, "null()\n\nCreate instance of null type.\n\nExamples\n--------\nCreate an instance of a null type:\n\n>>> import pyarrow as pa\n>>> pa.null()\nDataType(null)\n>>> print(pa.null())\nnull\n\nCreate a ``Field`` type with a null type and a name:\n\n>>> pa.field('null_field', pa.null())\npyarrow.Field<null_field: null>");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_73null = {"null", (PyCFunction)__pyx_pw_7pyarrow_3lib_73null, METH_NOARGS, __pyx_doc_7pyarrow_3lib_72null};
    static PyObject *__pyx_pw_7pyarrow_3lib_73null(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("null (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_72null(__pyx_self);

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

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

      /* "pyarrow/types.pxi":3877
 *     pyarrow.Field<null_field: null>
 *     """
 *     return primitive_type(_Type_NA)             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = ((PyObject *)__pyx_f_7pyarrow_3lib_primitive_type( arrow::Type::NA)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3877, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/types.pxi":3858
 * 
 * 
 * def null():             # <<<<<<<<<<<<<<
 *     """
 *     Create instance of null type.
*/

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

    /* "pyarrow/types.pxi":3880
 * 
 * 
 * def bool_():             # <<<<<<<<<<<<<<
 *     """
 *     Create instance of boolean type.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_75bool_(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_74bool_, "bool_()\n\nCreate instance of boolean type.\n\nExamples\n--------\nCreate an instance of a boolean type:\n\n>>> import pyarrow as pa\n>>> pa.bool_()\nDataType(bool)\n>>> print(pa.bool_())\nbool\n\nCreate a ``Field`` type with a boolean type\nand a name:\n\n>>> pa.field('bool_field', pa.bool_())\npyarrow.Field<bool_field: bool>");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_75bool_ = {"bool_", (PyCFunction)__pyx_pw_7pyarrow_3lib_75bool_, METH_NOARGS, __pyx_doc_7pyarrow_3lib_74bool_};
    static PyObject *__pyx_pw_7pyarrow_3lib_75bool_(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("bool_ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_74bool_(__pyx_self);

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

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

      /* "pyarrow/types.pxi":3900
 *     pyarrow.Field<bool_field: bool>
 *     """
 *     return primitive_type(_Type_BOOL)             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = ((PyObject *)__pyx_f_7pyarrow_3lib_primitive_type( arrow::Type::BOOL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3900, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/types.pxi":3880
 * 
 * 
 * def bool_():             # <<<<<<<<<<<<<<
 *     """
 *     Create instance of boolean type.
*/

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

    /* "pyarrow/types.pxi":3903
 * 
 * 
 * def uint8():             # <<<<<<<<<<<<<<
 *     """
 *     Create instance of unsigned int8 type.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_77uint8(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_76uint8, "uint8()\n\nCreate instance of unsigned int8 type.\n\nExamples\n--------\nCreate an instance of unsigned int8 type:\n\n>>> import pyarrow as pa\n>>> pa.uint8()\nDataType(uint8)\n>>> print(pa.uint8())\nuint8\n\nCreate an array with unsigned int8 type:\n\n>>> pa.array([0, 1, 2], type=pa.uint8())\n<pyarrow.lib.UInt8Array object at ...>\n[\n  0,\n  1,\n  2\n]");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_77uint8 = {"uint8", (PyCFunction)__pyx_pw_7pyarrow_3lib_77uint8, METH_NOARGS, __pyx_doc_7pyarrow_3lib_76uint8};
    static PyObject *__pyx_pw_7pyarrow_3lib_77uint8(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("uint8 (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_76uint8(__pyx_self);

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

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

      /* "pyarrow/types.pxi":3927
 *     ]
 *     """
 *     return primitive_type(_Type_UINT8)             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = ((PyObject *)__pyx_f_7pyarrow_3lib_primitive_type( arrow::Type::UINT8)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3927, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/types.pxi":3903
 * 
 * 
 * def uint8():             # <<<<<<<<<<<<<<
 *     """
 *     Create instance of unsigned int8 type.
*/

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

    /* "pyarrow/types.pxi":3930
 * 
 * 
 * def int8():             # <<<<<<<<<<<<<<
 *     """
 *     Create instance of signed int8 type.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_79int8(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_78int8, "int8()\n\nCreate instance of signed int8 type.\n\nExamples\n--------\nCreate an instance of int8 type:\n\n>>> import pyarrow as pa\n>>> pa.int8()\nDataType(int8)\n>>> print(pa.int8())\nint8\n\nCreate an array with int8 type:\n\n>>> pa.array([0, 1, 2], type=pa.int8())\n<pyarrow.lib.Int8Array object at ...>\n[\n  0,\n  1,\n  2\n]");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_79int8 = {"int8", (PyCFunction)__pyx_pw_7pyarrow_3lib_79int8, METH_NOARGS, __pyx_doc_7pyarrow_3lib_78int8};
    static PyObject *__pyx_pw_7pyarrow_3lib_79int8(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("int8 (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_78int8(__pyx_self);

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

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

      /* "pyarrow/types.pxi":3954
 *     ]
 *     """
 *     return primitive_type(_Type_INT8)             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = ((PyObject *)__pyx_f_7pyarrow_3lib_primitive_type( arrow::Type::INT8)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3954, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/types.pxi":3930
 * 
 * 
 * def int8():             # <<<<<<<<<<<<<<
 *     """
 *     Create instance of signed int8 type.
*/

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

    /* "pyarrow/types.pxi":3957
 * 
 * 
 * def uint16():             # <<<<<<<<<<<<<<
 *     """
 *     Create instance of unsigned uint16 type.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_81uint16(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_80uint16, "uint16()\n\nCreate instance of unsigned uint16 type.\n\nExamples\n--------\nCreate an instance of unsigned int16 type:\n\n>>> import pyarrow as pa\n>>> pa.uint16()\nDataType(uint16)\n>>> print(pa.uint16())\nuint16\n\nCreate an array with unsigned int16 type:\n\n>>> pa.array([0, 1, 2], type=pa.uint16())\n<pyarrow.lib.UInt16Array object at ...>\n[\n  0,\n  1,\n  2\n]");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_81uint16 = {"uint16", (PyCFunction)__pyx_pw_7pyarrow_3lib_81uint16, METH_NOARGS, __pyx_doc_7pyarrow_3lib_80uint16};
    static PyObject *__pyx_pw_7pyarrow_3lib_81uint16(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("uint16 (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_80uint16(__pyx_self);

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

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

      /* "pyarrow/types.pxi":3981
 *     ]
 *     """
 *     return primitive_type(_Type_UINT16)             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = ((PyObject *)__pyx_f_7pyarrow_3lib_primitive_type( arrow::Type::UINT16)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3981, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/types.pxi":3957
 * 
 * 
 * def uint16():             # <<<<<<<<<<<<<<
 *     """
 *     Create instance of unsigned uint16 type.
*/

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

    /* "pyarrow/types.pxi":3984
 * 
 * 
 * def int16():             # <<<<<<<<<<<<<<
 *     """
 *     Create instance of signed int16 type.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_83int16(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_82int16, "int16()\n\nCreate instance of signed int16 type.\n\nExamples\n--------\nCreate an instance of int16 type:\n\n>>> import pyarrow as pa\n>>> pa.int16()\nDataType(int16)\n>>> print(pa.int16())\nint16\n\nCreate an array with int16 type:\n\n>>> pa.array([0, 1, 2], type=pa.int16())\n<pyarrow.lib.Int16Array object at ...>\n[\n  0,\n  1,\n  2\n]");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_83int16 = {"int16", (PyCFunction)__pyx_pw_7pyarrow_3lib_83int16, METH_NOARGS, __pyx_doc_7pyarrow_3lib_82int16};
    static PyObject *__pyx_pw_7pyarrow_3lib_83int16(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("int16 (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_82int16(__pyx_self);

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

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

      /* "pyarrow/types.pxi":4008
 *     ]
 *     """
 *     return primitive_type(_Type_INT16)             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = ((PyObject *)__pyx_f_7pyarrow_3lib_primitive_type( arrow::Type::INT16)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4008, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/types.pxi":3984
 * 
 * 
 * def int16():             # <<<<<<<<<<<<<<
 *     """
 *     Create instance of signed int16 type.
*/

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

    /* "pyarrow/types.pxi":4011
 * 
 * 
 * def uint32():             # <<<<<<<<<<<<<<
 *     """
 *     Create instance of unsigned uint32 type.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_85uint32(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_84uint32, "uint32()\n\nCreate instance of unsigned uint32 type.\n\nExamples\n--------\nCreate an instance of unsigned int32 type:\n\n>>> import pyarrow as pa\n>>> pa.uint32()\nDataType(uint32)\n>>> print(pa.uint32())\nuint32\n\nCreate an array with unsigned int32 type:\n\n>>> pa.array([0, 1, 2], type=pa.uint32())\n<pyarrow.lib.UInt32Array object at ...>\n[\n  0,\n  1,\n  2\n]");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_85uint32 = {"uint32", (PyCFunction)__pyx_pw_7pyarrow_3lib_85uint32, METH_NOARGS, __pyx_doc_7pyarrow_3lib_84uint32};
    static PyObject *__pyx_pw_7pyarrow_3lib_85uint32(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("uint32 (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_84uint32(__pyx_self);

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

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

      /* "pyarrow/types.pxi":4035
 *     ]
 *     """
 *     return primitive_type(_Type_UINT32)             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = ((PyObject *)__pyx_f_7pyarrow_3lib_primitive_type( arrow::Type::UINT32)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4035, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/types.pxi":4011
 * 
 * 
 * def uint32():             # <<<<<<<<<<<<<<
 *     """
 *     Create instance of unsigned uint32 type.
*/

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

    /* "pyarrow/types.pxi":4038
 * 
 * 
 * def int32():             # <<<<<<<<<<<<<<
 *     """
 *     Create instance of signed int32 type.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_87int32(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_86int32, "int32()\n\nCreate instance of signed int32 type.\n\nExamples\n--------\nCreate an instance of int32 type:\n\n>>> import pyarrow as pa\n>>> pa.int32()\nDataType(int32)\n>>> print(pa.int32())\nint32\n\nCreate an array with int32 type:\n\n>>> pa.array([0, 1, 2], type=pa.int32())\n<pyarrow.lib.Int32Array object at ...>\n[\n  0,\n  1,\n  2\n]");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_87int32 = {"int32", (PyCFunction)__pyx_pw_7pyarrow_3lib_87int32, METH_NOARGS, __pyx_doc_7pyarrow_3lib_86int32};
    static PyObject *__pyx_pw_7pyarrow_3lib_87int32(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("int32 (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_86int32(__pyx_self);

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

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

      /* "pyarrow/types.pxi":4062
 *     ]
 *     """
 *     return primitive_type(_Type_INT32)             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = ((PyObject *)__pyx_f_7pyarrow_3lib_primitive_type( arrow::Type::INT32)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4062, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/types.pxi":4038
 * 
 * 
 * def int32():             # <<<<<<<<<<<<<<
 *     """
 *     Create instance of signed int32 type.
*/

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

    /* "pyarrow/types.pxi":4065
 * 
 * 
 * def uint64():             # <<<<<<<<<<<<<<
 *     """
 *     Create instance of unsigned uint64 type.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_89uint64(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_88uint64, "uint64()\n\nCreate instance of unsigned uint64 type.\n\nExamples\n--------\nCreate an instance of unsigned int64 type:\n\n>>> import pyarrow as pa\n>>> pa.uint64()\nDataType(uint64)\n>>> print(pa.uint64())\nuint64\n\nCreate an array with unsigned uint64 type:\n\n>>> pa.array([0, 1, 2], type=pa.uint64())\n<pyarrow.lib.UInt64Array object at ...>\n[\n  0,\n  1,\n  2\n]");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_89uint64 = {"uint64", (PyCFunction)__pyx_pw_7pyarrow_3lib_89uint64, METH_NOARGS, __pyx_doc_7pyarrow_3lib_88uint64};
    static PyObject *__pyx_pw_7pyarrow_3lib_89uint64(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("uint64 (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_88uint64(__pyx_self);

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

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

      /* "pyarrow/types.pxi":4089
 *     ]
 *     """
 *     return primitive_type(_Type_UINT64)             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = ((PyObject *)__pyx_f_7pyarrow_3lib_primitive_type( arrow::Type::UINT64)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4089, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/types.pxi":4065
 * 
 * 
 * def uint64():             # <<<<<<<<<<<<<<
 *     """
 *     Create instance of unsigned uint64 type.
*/

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

    /* "pyarrow/types.pxi":4092
 * 
 * 
 * def int64():             # <<<<<<<<<<<<<<
 *     """
 *     Create instance of signed int64 type.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_91int64(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_90int64, "int64()\n\nCreate instance of signed int64 type.\n\nExamples\n--------\nCreate an instance of int64 type:\n\n>>> import pyarrow as pa\n>>> pa.int64()\nDataType(int64)\n>>> print(pa.int64())\nint64\n\nCreate an array with int64 type:\n\n>>> pa.array([0, 1, 2], type=pa.int64())\n<pyarrow.lib.Int64Array object at ...>\n[\n  0,\n  1,\n  2\n]");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_91int64 = {"int64", (PyCFunction)__pyx_pw_7pyarrow_3lib_91int64, METH_NOARGS, __pyx_doc_7pyarrow_3lib_90int64};
    static PyObject *__pyx_pw_7pyarrow_3lib_91int64(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("int64 (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_90int64(__pyx_self);

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

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

      /* "pyarrow/types.pxi":4116
 *     ]
 *     """
 *     return primitive_type(_Type_INT64)             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = ((PyObject *)__pyx_f_7pyarrow_3lib_primitive_type( arrow::Type::INT64)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4116, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/types.pxi":4092
 * 
 * 
 * def int64():             # <<<<<<<<<<<<<<
 *     """
 *     Create instance of signed int64 type.
*/

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

    /* "pyarrow/types.pxi":4124
 * 
 * 
 * cdef timeunit_to_string(TimeUnit unit):             # <<<<<<<<<<<<<<
 *     if unit == TimeUnit_SECOND:
 *         return 's'
*/

    static PyObject *__pyx_f_7pyarrow_3lib_timeunit_to_string(enum  arrow::TimeUnit::type __pyx_v_unit) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("timeunit_to_string", 0);

      /* "pyarrow/types.pxi":4125
 * 
 * cdef timeunit_to_string(TimeUnit unit):
 *     if unit == TimeUnit_SECOND:             # <<<<<<<<<<<<<<
 *         return 's'
 *     elif unit == TimeUnit_MILLI:
*/
      switch (__pyx_v_unit) {
        case  arrow::TimeUnit::SECOND:

        /* "pyarrow/types.pxi":4126
 * cdef timeunit_to_string(TimeUnit unit):
 *     if unit == TimeUnit_SECOND:
 *         return 's'             # <<<<<<<<<<<<<<
 *     elif unit == TimeUnit_MILLI:
 *         return 'ms'
*/
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_s);
        __pyx_r = __pyx_mstate_global->__pyx_n_u_s;
        goto __pyx_L0;

        /* "pyarrow/types.pxi":4125
 * 
 * cdef timeunit_to_string(TimeUnit unit):
 *     if unit == TimeUnit_SECOND:             # <<<<<<<<<<<<<<
 *         return 's'
 *     elif unit == TimeUnit_MILLI:
*/
        break;
        case  arrow::TimeUnit::MILLI:

        /* "pyarrow/types.pxi":4128
 *         return 's'
 *     elif unit == TimeUnit_MILLI:
 *         return 'ms'             # <<<<<<<<<<<<<<
 *     elif unit == TimeUnit_MICRO:
 *         return 'us'
*/
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_ms);
        __pyx_r = __pyx_mstate_global->__pyx_n_u_ms;
        goto __pyx_L0;

        /* "pyarrow/types.pxi":4127
 *     if unit == TimeUnit_SECOND:
 *         return 's'
 *     elif unit == TimeUnit_MILLI:             # <<<<<<<<<<<<<<
 *         return 'ms'
 *     elif unit == TimeUnit_MICRO:
*/
        break;
        case  arrow::TimeUnit::MICRO:

        /* "pyarrow/types.pxi":4130
 *         return 'ms'
 *     elif unit == TimeUnit_MICRO:
 *         return 'us'             # <<<<<<<<<<<<<<
 *     elif unit == TimeUnit_NANO:
 *         return 'ns'
*/
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_us);
        __pyx_r = __pyx_mstate_global->__pyx_n_u_us;
        goto __pyx_L0;

        /* "pyarrow/types.pxi":4129
 *     elif unit == TimeUnit_MILLI:
 *         return 'ms'
 *     elif unit == TimeUnit_MICRO:             # <<<<<<<<<<<<<<
 *         return 'us'
 *     elif unit == TimeUnit_NANO:
*/
        break;
        case  arrow::TimeUnit::NANO:

        /* "pyarrow/types.pxi":4132
 *         return 'us'
 *     elif unit == TimeUnit_NANO:
 *         return 'ns'             # <<<<<<<<<<<<<<
 * 
 * 
*/
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_ns);
        __pyx_r = __pyx_mstate_global->__pyx_n_u_ns;
        goto __pyx_L0;

        /* "pyarrow/types.pxi":4131
 *     elif unit == TimeUnit_MICRO:
 *         return 'us'
 *     elif unit == TimeUnit_NANO:             # <<<<<<<<<<<<<<
 *         return 'ns'
 * 
*/
        break;
        default: break;
      }

      /* "pyarrow/types.pxi":4124
 * 
 * 
 * cdef timeunit_to_string(TimeUnit unit):             # <<<<<<<<<<<<<<
 *     if unit == TimeUnit_SECOND:
 *         return 's'
*/

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

    /* "pyarrow/types.pxi":4135
 * 
 * 
 * cdef TimeUnit string_to_timeunit(unit) except *:             # <<<<<<<<<<<<<<
 *     if unit == 's':
 *         return TimeUnit_SECOND
*/

    static enum  arrow::TimeUnit::type __pyx_f_7pyarrow_3lib_string_to_timeunit(PyObject *__pyx_v_unit) {
      enum  arrow::TimeUnit::type __pyx_r;
      __Pyx_RefNannyDeclarations
      int __pyx_t_1;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      PyObject *__pyx_t_5 = NULL;
      size_t __pyx_t_6;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("string_to_timeunit", 0);

      /* "pyarrow/types.pxi":4136
 * 
 * cdef TimeUnit string_to_timeunit(unit) except *:
 *     if unit == 's':             # <<<<<<<<<<<<<<
 *         return TimeUnit_SECOND
 *     elif unit == 'ms':
*/
      __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_unit, __pyx_mstate_global->__pyx_n_u_s, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 4136, __pyx_L1_error)
      if (__pyx_t_1) {

        /* "pyarrow/types.pxi":4137
 * cdef TimeUnit string_to_timeunit(unit) except *:
 *     if unit == 's':
 *         return TimeUnit_SECOND             # <<<<<<<<<<<<<<
 *     elif unit == 'ms':
 *         return TimeUnit_MILLI
*/
        __pyx_r =  arrow::TimeUnit::SECOND;
        goto __pyx_L0;

        /* "pyarrow/types.pxi":4136
 * 
 * cdef TimeUnit string_to_timeunit(unit) except *:
 *     if unit == 's':             # <<<<<<<<<<<<<<
 *         return TimeUnit_SECOND
 *     elif unit == 'ms':
*/
      }

      /* "pyarrow/types.pxi":4138
 *     if unit == 's':
 *         return TimeUnit_SECOND
 *     elif unit == 'ms':             # <<<<<<<<<<<<<<
 *         return TimeUnit_MILLI
 *     elif unit == 'us':
*/
      __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_unit, __pyx_mstate_global->__pyx_n_u_ms, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 4138, __pyx_L1_error)
      if (__pyx_t_1) {

        /* "pyarrow/types.pxi":4139
 *         return TimeUnit_SECOND
 *     elif unit == 'ms':
 *         return TimeUnit_MILLI             # <<<<<<<<<<<<<<
 *     elif unit == 'us':
 *         return TimeUnit_MICRO
*/
        __pyx_r =  arrow::TimeUnit::MILLI;
        goto __pyx_L0;

        /* "pyarrow/types.pxi":4138
 *     if unit == 's':
 *         return TimeUnit_SECOND
 *     elif unit == 'ms':             # <<<<<<<<<<<<<<
 *         return TimeUnit_MILLI
 *     elif unit == 'us':
*/
      }

      /* "pyarrow/types.pxi":4140
 *     elif unit == 'ms':
 *         return TimeUnit_MILLI
 *     elif unit == 'us':             # <<<<<<<<<<<<<<
 *         return TimeUnit_MICRO
 *     elif unit == 'ns':
*/
      __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_unit, __pyx_mstate_global->__pyx_n_u_us, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 4140, __pyx_L1_error)
      if (__pyx_t_1) {

        /* "pyarrow/types.pxi":4141
 *         return TimeUnit_MILLI
 *     elif unit == 'us':
 *         return TimeUnit_MICRO             # <<<<<<<<<<<<<<
 *     elif unit == 'ns':
 *         return TimeUnit_NANO
*/
        __pyx_r =  arrow::TimeUnit::MICRO;
        goto __pyx_L0;

        /* "pyarrow/types.pxi":4140
 *     elif unit == 'ms':
 *         return TimeUnit_MILLI
 *     elif unit == 'us':             # <<<<<<<<<<<<<<
 *         return TimeUnit_MICRO
 *     elif unit == 'ns':
*/
      }

      /* "pyarrow/types.pxi":4142
 *     elif unit == 'us':
 *         return TimeUnit_MICRO
 *     elif unit == 'ns':             # <<<<<<<<<<<<<<
 *         return TimeUnit_NANO
 *     else:
*/
      __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_unit, __pyx_mstate_global->__pyx_n_u_ns, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 4142, __pyx_L1_error)
      if (likely(__pyx_t_1)) {

        /* "pyarrow/types.pxi":4143
 *         return TimeUnit_MICRO
 *     elif unit == 'ns':
 *         return TimeUnit_NANO             # <<<<<<<<<<<<<<
 *     else:
 *         raise ValueError(f"Invalid time unit: {unit!r}")
*/
        __pyx_r =  arrow::TimeUnit::NANO;
        goto __pyx_L0;

        /* "pyarrow/types.pxi":4142
 *     elif unit == 'us':
 *         return TimeUnit_MICRO
 *     elif unit == 'ns':             # <<<<<<<<<<<<<<
 *         return TimeUnit_NANO
 *     else:
*/
      }

      /* "pyarrow/types.pxi":4145
 *         return TimeUnit_NANO
 *     else:
 *         raise ValueError(f"Invalid time unit: {unit!r}")             # <<<<<<<<<<<<<<
 * 
 * 
*/
      /*else*/ {
        __pyx_t_3 = NULL;
        __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_unit), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4145, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_Invalid_time_unit, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 4145, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_6 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4145, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __Pyx_Raise(__pyx_t_2, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __PYX_ERR(1, 4145, __pyx_L1_error)
      }

      /* "pyarrow/types.pxi":4135
 * 
 * 
 * cdef TimeUnit string_to_timeunit(unit) except *:             # <<<<<<<<<<<<<<
 *     if unit == 's':
 *         return TimeUnit_SECOND
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_AddTraceback("pyarrow.lib.string_to_timeunit", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = (enum  arrow::TimeUnit::type) 0;
      __pyx_L0:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/types.pxi":4148
 * 
 * 
 * def tzinfo_to_string(tz):             # <<<<<<<<<<<<<<
 *     """
 *     Converts a time zone object into a string indicating the name of a time
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_93tzinfo_to_string(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_92tzinfo_to_string, "tzinfo_to_string(tz)\n\nConverts a time zone object into a string indicating the name of a time\nzone, one of:\n* As used in the Olson time zone database (the \"tz database\" or\n  \"tzdata\"), such as \"America/New_York\"\n* An absolute time zone offset of the form +XX:XX or -XX:XX, such as +07:30\n\nParameters\n----------\n  tz : datetime.tzinfo\n    Time zone object\n\nReturns\n-------\n  name : str\n    Time zone name");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_93tzinfo_to_string = {"tzinfo_to_string", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_93tzinfo_to_string, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_92tzinfo_to_string};
    static PyObject *__pyx_pw_7pyarrow_3lib_93tzinfo_to_string(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_tz = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("tzinfo_to_string (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_tz,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 4148, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4148, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "tzinfo_to_string", 0) < (0)) __PYX_ERR(1, 4148, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("tzinfo_to_string", 1, 1, 1, i); __PYX_ERR(1, 4148, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 1)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4148, __pyx_L3_error)
        }
        __pyx_v_tz = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("tzinfo_to_string", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 4148, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.tzinfo_to_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_92tzinfo_to_string(__pyx_self, __pyx_v_tz);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_92tzinfo_to_string(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_tz) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      std::string __pyx_t_4;
      PyObject *__pyx_t_5 = NULL;
      size_t __pyx_t_6;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("tzinfo_to_string", 0);

      /* "pyarrow/types.pxi":4166
 *         Time zone name
 *     """
 *     return frombytes(GetResultValue(TzinfoToString(<PyObject*>tz)))             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_frombytes); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4166, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = arrow::py::GetResultValue<std::string>(arrow::py::internal::TzinfoToString(((PyObject *)__pyx_v_tz))); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 4166, __pyx_L1_error)
      __pyx_t_5 = __pyx_convert_PyBytes_string_to_py_6libcpp_6string_std__in_string(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 4166, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
        assert(__pyx_t_2);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
        __pyx_t_6 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_5};
        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4166, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/types.pxi":4148
 * 
 * 
 * def tzinfo_to_string(tz):             # <<<<<<<<<<<<<<
 *     """
 *     Converts a time zone object into a string indicating the name of a time
*/

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

    /* "pyarrow/types.pxi":4169
 * 
 * 
 * def string_to_tzinfo(name):             # <<<<<<<<<<<<<<
 *     """
 *     Convert a time zone name into a time zone object.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_95string_to_tzinfo(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_94string_to_tzinfo, "string_to_tzinfo(name)\n\nConvert a time zone name into a time zone object.\n\nSupported input strings are:\n* As used in the Olson time zone database (the \"tz database\" or\n  \"tzdata\"), such as \"America/New_York\"\n* An absolute time zone offset of the form +XX:XX or -XX:XX, such as +07:30\n\nParameters\n----------\n  name: str\n    Time zone name.\n\nReturns\n-------\n  tz : datetime.tzinfo\n    Time zone object");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_95string_to_tzinfo = {"string_to_tzinfo", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_95string_to_tzinfo, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_94string_to_tzinfo};
    static PyObject *__pyx_pw_7pyarrow_3lib_95string_to_tzinfo(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_name = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("string_to_tzinfo (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_name,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 4169, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4169, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "string_to_tzinfo", 0) < (0)) __PYX_ERR(1, 4169, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("string_to_tzinfo", 1, 1, 1, i); __PYX_ERR(1, 4169, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 1)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4169, __pyx_L3_error)
        }
        __pyx_v_name = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("string_to_tzinfo", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 4169, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.string_to_tzinfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_94string_to_tzinfo(__pyx_self, __pyx_v_name);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_94string_to_tzinfo(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name) {
      PyObject *__pyx_v_tz;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      size_t __pyx_t_3;
      std::string __pyx_t_4;
      PyObject *__pyx_t_5;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("string_to_tzinfo", 0);

      /* "pyarrow/types.pxi":4188
 *         Time zone object
 *     """
 *     cdef PyObject* tz = GetResultValue(StringToTzinfo(name.encode('utf-8')))             # <<<<<<<<<<<<<<
 *     return PyObject_to_object(tz)
 * 
*/
      __pyx_t_2 = __pyx_v_name;
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_3 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_utf_8};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_encode, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4188, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_t_4 = __pyx_convert_string_from_py_6libcpp_6string_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 4188, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_5 = arrow::py::GetResultValue<PyObject *>(arrow::py::internal::StringToTzinfo(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_4))); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 4188, __pyx_L1_error)
      __pyx_v_tz = __pyx_t_5;

      /* "pyarrow/types.pxi":4189
 *     """
 *     cdef PyObject* tz = GetResultValue(StringToTzinfo(name.encode('utf-8')))
 *     return PyObject_to_object(tz)             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __pyx_f_7pyarrow_8includes_6common_PyObject_to_object(__pyx_v_tz); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4189, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/types.pxi":4169
 * 
 * 
 * def string_to_tzinfo(name):             # <<<<<<<<<<<<<<
 *     """
 *     Convert a time zone name into a time zone object.
*/

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

    /* "pyarrow/types.pxi":4192
 * 
 * 
 * def timestamp(unit, tz=None):             # <<<<<<<<<<<<<<
 *     """
 *     Create instance of timestamp type with resolution and optional time zone.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_97timestamp(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_96timestamp, "timestamp(unit, tz=None)\n\nCreate instance of timestamp type with resolution and optional time zone.\n\nParameters\n----------\nunit : str\n    one of 's' [second], 'ms' [millisecond], 'us' [microsecond], or 'ns'\n    [nanosecond]\ntz : str, default None\n    Time zone name. None indicates time zone naive\n\nExamples\n--------\nCreate an instance of timestamp type:\n\n>>> import pyarrow as pa\n>>> pa.timestamp('us')\nTimestampType(timestamp[us])\n>>> pa.timestamp('s', tz='America/New_York')\nTimestampType(timestamp[s, tz=America/New_York])\n>>> pa.timestamp('s', tz='+07:30')\nTimestampType(timestamp[s, tz=+07:30])\n\nUse timestamp type when creating a scalar object:\n\n>>> from datetime import datetime\n>>> pa.scalar(datetime(2012, 1, 1), type=pa.timestamp('s', tz='UTC'))\n<pyarrow.TimestampScalar: '2012-01-01T00:00:00+0000'>\n>>> pa.scalar(datetime(2012, 1, 1), type=pa.timestamp('us'))\n<pyarrow.TimestampScalar: '2012-01-01T00:00:00.000000'>\n\nReturns\n-------\ntimestamp_type : TimestampType");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_97timestamp = {"timestamp", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_97timestamp, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_96timestamp};
    static PyObject *__pyx_pw_7pyarrow_3lib_97timestamp(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_unit = 0;
      PyObject *__pyx_v_tz = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[2] = {0,0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("timestamp (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_unit,&__pyx_mstate_global->__pyx_n_u_tz,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 4192, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4192, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4192, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "timestamp", 0) < (0)) __PYX_ERR(1, 4192, __pyx_L3_error)
          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("timestamp", 0, 1, 2, i); __PYX_ERR(1, 4192, __pyx_L3_error) }
          }
        } else {
          switch (__pyx_nargs) {
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4192, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4192, __pyx_L3_error)
            break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
        }
        __pyx_v_unit = values[0];
        __pyx_v_tz = values[1];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("timestamp", 0, 1, 2, __pyx_nargs); __PYX_ERR(1, 4192, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.timestamp", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_96timestamp(__pyx_self, __pyx_v_unit, __pyx_v_tz);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_96timestamp(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_unit, PyObject *__pyx_v_tz) {
      enum  arrow::TimeUnit::type __pyx_v_unit_code;
      std::string __pyx_v_c_timezone;
      struct __pyx_obj_7pyarrow_3lib_TimestampType *__pyx_v_out = 0;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      enum  arrow::TimeUnit::type __pyx_t_1;
      PyObject *__pyx_t_2 = NULL;
      int __pyx_t_3;
      PyObject *__pyx_t_4 = NULL;
      int __pyx_t_5;
      PyObject *__pyx_t_6 = NULL;
      size_t __pyx_t_7;
      std::string __pyx_t_8;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("timestamp", 0);
      __Pyx_INCREF(__pyx_v_tz);

      /* "pyarrow/types.pxi":4232
 *         c_string c_timezone
 * 
 *     unit_code = string_to_timeunit(unit)             # <<<<<<<<<<<<<<
 * 
 *     cdef TimestampType out = TimestampType.__new__(TimestampType)
*/
      __pyx_t_1 = __pyx_f_7pyarrow_3lib_string_to_timeunit(__pyx_v_unit); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 4232, __pyx_L1_error)
      __pyx_v_unit_code = __pyx_t_1;

      /* "pyarrow/types.pxi":4234
 *     unit_code = string_to_timeunit(unit)
 * 
 *     cdef TimestampType out = TimestampType.__new__(TimestampType)             # <<<<<<<<<<<<<<
 * 
 *     if tz is None:
*/
      __pyx_t_2 = ((PyObject *)__pyx_tp_new_7pyarrow_3lib_TimestampType(((PyTypeObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_TimestampType), __pyx_mstate_global->__pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4234, __pyx_L1_error)
      __Pyx_GOTREF((PyObject *)__pyx_t_2);
      __pyx_v_out = ((struct __pyx_obj_7pyarrow_3lib_TimestampType *)__pyx_t_2);
      __pyx_t_2 = 0;

      /* "pyarrow/types.pxi":4236
 *     cdef TimestampType out = TimestampType.__new__(TimestampType)
 * 
 *     if tz is None:             # <<<<<<<<<<<<<<
 *         out.init(ctimestamp(unit_code))
 *         if unit_code in _timestamp_type_cache:
*/
      __pyx_t_3 = (__pyx_v_tz == Py_None);
      if (__pyx_t_3) {

        /* "pyarrow/types.pxi":4237
 * 
 *     if tz is None:
 *         out.init(ctimestamp(unit_code))             # <<<<<<<<<<<<<<
 *         if unit_code in _timestamp_type_cache:
 *             return _timestamp_type_cache[unit_code]
*/
        if (unlikely(((PyObject *)__pyx_v_out) == Py_None)) {
          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "init");
          __PYX_ERR(1, 4237, __pyx_L1_error)
        }
        ((struct __pyx_vtabstruct_7pyarrow_3lib_TimestampType *)__pyx_v_out->__pyx_base.__pyx_vtab)->__pyx_base.init(((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_v_out),  arrow::timestamp(__pyx_v_unit_code)); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 4237, __pyx_L1_error)

        /* "pyarrow/types.pxi":4238
 *     if tz is None:
 *         out.init(ctimestamp(unit_code))
 *         if unit_code in _timestamp_type_cache:             # <<<<<<<<<<<<<<
 *             return _timestamp_type_cache[unit_code]
 *         _timestamp_type_cache[unit_code] = out
*/
        __pyx_t_2 = __Pyx_PyLong_From_enum____arrow_3a__3a_TimeUnit_3a__3a_type(__pyx_v_unit_code); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4238, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        if (unlikely(__pyx_v_7pyarrow_3lib__timestamp_type_cache == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
          __PYX_ERR(1, 4238, __pyx_L1_error)
        }
        __pyx_t_3 = (__Pyx_PyDict_ContainsTF(__pyx_t_2, __pyx_v_7pyarrow_3lib__timestamp_type_cache, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(1, 4238, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (__pyx_t_3) {

          /* "pyarrow/types.pxi":4239
 *         out.init(ctimestamp(unit_code))
 *         if unit_code in _timestamp_type_cache:
 *             return _timestamp_type_cache[unit_code]             # <<<<<<<<<<<<<<
 *         _timestamp_type_cache[unit_code] = out
 *     else:
*/
          __Pyx_XDECREF(__pyx_r);
          if (unlikely(__pyx_v_7pyarrow_3lib__timestamp_type_cache == Py_None)) {
            PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
            __PYX_ERR(1, 4239, __pyx_L1_error)
          }
          __pyx_t_2 = __Pyx_PyLong_From_enum____arrow_3a__3a_TimeUnit_3a__3a_type(__pyx_v_unit_code); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4239, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_7pyarrow_3lib__timestamp_type_cache, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4239, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_r = __pyx_t_4;
          __pyx_t_4 = 0;
          goto __pyx_L0;

          /* "pyarrow/types.pxi":4238
 *     if tz is None:
 *         out.init(ctimestamp(unit_code))
 *         if unit_code in _timestamp_type_cache:             # <<<<<<<<<<<<<<
 *             return _timestamp_type_cache[unit_code]
 *         _timestamp_type_cache[unit_code] = out
*/
        }

        /* "pyarrow/types.pxi":4240
 *         if unit_code in _timestamp_type_cache:
 *             return _timestamp_type_cache[unit_code]
 *         _timestamp_type_cache[unit_code] = out             # <<<<<<<<<<<<<<
 *     else:
 *         if not isinstance(tz, (bytes, str)):
*/
        if (unlikely(__pyx_v_7pyarrow_3lib__timestamp_type_cache == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
          __PYX_ERR(1, 4240, __pyx_L1_error)
        }
        __pyx_t_4 = __Pyx_PyLong_From_enum____arrow_3a__3a_TimeUnit_3a__3a_type(__pyx_v_unit_code); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4240, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        if (unlikely((PyDict_SetItem(__pyx_v_7pyarrow_3lib__timestamp_type_cache, __pyx_t_4, ((PyObject *)__pyx_v_out)) < 0))) __PYX_ERR(1, 4240, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

        /* "pyarrow/types.pxi":4236
 *     cdef TimestampType out = TimestampType.__new__(TimestampType)
 * 
 *     if tz is None:             # <<<<<<<<<<<<<<
 *         out.init(ctimestamp(unit_code))
 *         if unit_code in _timestamp_type_cache:
*/
        goto __pyx_L3;
      }

      /* "pyarrow/types.pxi":4242
 *         _timestamp_type_cache[unit_code] = out
 *     else:
 *         if not isinstance(tz, (bytes, str)):             # <<<<<<<<<<<<<<
 *             tz = tzinfo_to_string(tz)
 * 
*/
      /*else*/ {
        __pyx_t_5 = PyBytes_Check(__pyx_v_tz); 
        if (!__pyx_t_5) {
        } else {
          __pyx_t_3 = __pyx_t_5;
          goto __pyx_L6_bool_binop_done;
        }
        __pyx_t_5 = PyUnicode_Check(__pyx_v_tz); 
        __pyx_t_3 = __pyx_t_5;
        __pyx_L6_bool_binop_done:;
        __pyx_t_5 = (!__pyx_t_3);
        if (__pyx_t_5) {

          /* "pyarrow/types.pxi":4243
 *     else:
 *         if not isinstance(tz, (bytes, str)):
 *             tz = tzinfo_to_string(tz)             # <<<<<<<<<<<<<<
 * 
 *         c_timezone = tobytes(tz)
*/
          __pyx_t_2 = NULL;
          __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_tzinfo_to_string); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 4243, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_t_7 = 1;
          #if CYTHON_UNPACK_METHODS
          if (unlikely(PyMethod_Check(__pyx_t_6))) {
            __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_6);
            assert(__pyx_t_2);
            PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
            __Pyx_INCREF(__pyx_t_2);
            __Pyx_INCREF(__pyx__function);
            __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
            __pyx_t_7 = 0;
          }
          #endif
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_tz};
            __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4243, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
          }
          __Pyx_DECREF_SET(__pyx_v_tz, __pyx_t_4);
          __pyx_t_4 = 0;

          /* "pyarrow/types.pxi":4242
 *         _timestamp_type_cache[unit_code] = out
 *     else:
 *         if not isinstance(tz, (bytes, str)):             # <<<<<<<<<<<<<<
 *             tz = tzinfo_to_string(tz)
 * 
*/
        }

        /* "pyarrow/types.pxi":4245
 *             tz = tzinfo_to_string(tz)
 * 
 *         c_timezone = tobytes(tz)             # <<<<<<<<<<<<<<
 *         out.init(ctimestamp(unit_code, c_timezone))
 * 
*/
        __pyx_t_6 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_tobytes); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4245, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_7 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_2))) {
          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
          assert(__pyx_t_6);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
          __pyx_t_7 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_tz};
          __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4245, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
        }
        __pyx_t_8 = __pyx_convert_string_from_py_6libcpp_6string_std__in_string(__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 4245, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_v_c_timezone = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_8);

        /* "pyarrow/types.pxi":4246
 * 
 *         c_timezone = tobytes(tz)
 *         out.init(ctimestamp(unit_code, c_timezone))             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
        if (unlikely(((PyObject *)__pyx_v_out) == Py_None)) {
          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "init");
          __PYX_ERR(1, 4246, __pyx_L1_error)
        }
        ((struct __pyx_vtabstruct_7pyarrow_3lib_TimestampType *)__pyx_v_out->__pyx_base.__pyx_vtab)->__pyx_base.init(((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_v_out),  arrow::timestamp(__pyx_v_unit_code, __pyx_v_c_timezone)); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 4246, __pyx_L1_error)
      }
      __pyx_L3:;

      /* "pyarrow/types.pxi":4248
 *         out.init(ctimestamp(unit_code, c_timezone))
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF((PyObject *)__pyx_v_out);
      __pyx_r = ((PyObject *)__pyx_v_out);
      goto __pyx_L0;

      /* "pyarrow/types.pxi":4192
 * 
 * 
 * def timestamp(unit, tz=None):             # <<<<<<<<<<<<<<
 *     """
 *     Create instance of timestamp type with resolution and optional time zone.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_AddTraceback("pyarrow.lib.timestamp", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF((PyObject *)__pyx_v_out);
      __Pyx_XDECREF(__pyx_v_tz);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/types.pxi":4251
 * 
 * 
 * def time32(unit):             # <<<<<<<<<<<<<<
 *     """
 *     Create instance of 32-bit time (time of day) type with unit resolution.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_99time32(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_98time32, "time32(unit)\n\nCreate instance of 32-bit time (time of day) type with unit resolution.\n\nParameters\n----------\nunit : str\n    one of 's' [second], or 'ms' [millisecond]\n\nReturns\n-------\ntype : pyarrow.Time32Type\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> pa.time32('s')\nTime32Type(time32[s])\n>>> pa.time32('ms')\nTime32Type(time32[ms])");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_99time32 = {"time32", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_99time32, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_98time32};
    static PyObject *__pyx_pw_7pyarrow_3lib_99time32(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_unit = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("time32 (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_unit,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 4251, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4251, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "time32", 0) < (0)) __PYX_ERR(1, 4251, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("time32", 1, 1, 1, i); __PYX_ERR(1, 4251, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 1)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4251, __pyx_L3_error)
        }
        __pyx_v_unit = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("time32", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 4251, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.time32", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_98time32(__pyx_self, __pyx_v_unit);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_98time32(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_unit) {
      enum  arrow::TimeUnit::type __pyx_v_unit_code;
      struct __pyx_obj_7pyarrow_3lib_Time32Type *__pyx_v_out = 0;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      int __pyx_t_1;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      PyObject *__pyx_t_5 = NULL;
      size_t __pyx_t_6;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("time32", 0);

      /* "pyarrow/types.pxi":4276
 *         c_string c_timezone
 * 
 *     if unit == 's':             # <<<<<<<<<<<<<<
 *         unit_code = TimeUnit_SECOND
 *     elif unit == 'ms':
*/
      __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_unit, __pyx_mstate_global->__pyx_n_u_s, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 4276, __pyx_L1_error)
      if (__pyx_t_1) {

        /* "pyarrow/types.pxi":4277
 * 
 *     if unit == 's':
 *         unit_code = TimeUnit_SECOND             # <<<<<<<<<<<<<<
 *     elif unit == 'ms':
 *         unit_code = TimeUnit_MILLI
*/
        __pyx_v_unit_code =  arrow::TimeUnit::SECOND;

        /* "pyarrow/types.pxi":4276
 *         c_string c_timezone
 * 
 *     if unit == 's':             # <<<<<<<<<<<<<<
 *         unit_code = TimeUnit_SECOND
 *     elif unit == 'ms':
*/
        goto __pyx_L3;
      }

      /* "pyarrow/types.pxi":4278
 *     if unit == 's':
 *         unit_code = TimeUnit_SECOND
 *     elif unit == 'ms':             # <<<<<<<<<<<<<<
 *         unit_code = TimeUnit_MILLI
 *     else:
*/
      __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_unit, __pyx_mstate_global->__pyx_n_u_ms, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 4278, __pyx_L1_error)
      if (likely(__pyx_t_1)) {

        /* "pyarrow/types.pxi":4279
 *         unit_code = TimeUnit_SECOND
 *     elif unit == 'ms':
 *         unit_code = TimeUnit_MILLI             # <<<<<<<<<<<<<<
 *     else:
 *         raise ValueError(f"Invalid time unit for time32: {unit!r}")
*/
        __pyx_v_unit_code =  arrow::TimeUnit::MILLI;

        /* "pyarrow/types.pxi":4278
 *     if unit == 's':
 *         unit_code = TimeUnit_SECOND
 *     elif unit == 'ms':             # <<<<<<<<<<<<<<
 *         unit_code = TimeUnit_MILLI
 *     else:
*/
        goto __pyx_L3;
      }

      /* "pyarrow/types.pxi":4281
 *         unit_code = TimeUnit_MILLI
 *     else:
 *         raise ValueError(f"Invalid time unit for time32: {unit!r}")             # <<<<<<<<<<<<<<
 * 
 *     if unit_code in _time_type_cache:
*/
      /*else*/ {
        __pyx_t_3 = NULL;
        __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_unit), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4281, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_Invalid_time_unit_for_time32, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 4281, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_6 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4281, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __Pyx_Raise(__pyx_t_2, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __PYX_ERR(1, 4281, __pyx_L1_error)
      }
      __pyx_L3:;

      /* "pyarrow/types.pxi":4283
 *         raise ValueError(f"Invalid time unit for time32: {unit!r}")
 * 
 *     if unit_code in _time_type_cache:             # <<<<<<<<<<<<<<
 *         return _time_type_cache[unit_code]
 * 
*/
      __pyx_t_2 = __Pyx_PyLong_From_enum____arrow_3a__3a_TimeUnit_3a__3a_type(__pyx_v_unit_code); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4283, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (unlikely(__pyx_v_7pyarrow_3lib__time_type_cache == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
        __PYX_ERR(1, 4283, __pyx_L1_error)
      }
      __pyx_t_1 = (__Pyx_PyDict_ContainsTF(__pyx_t_2, __pyx_v_7pyarrow_3lib__time_type_cache, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 4283, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (__pyx_t_1) {

        /* "pyarrow/types.pxi":4284
 * 
 *     if unit_code in _time_type_cache:
 *         return _time_type_cache[unit_code]             # <<<<<<<<<<<<<<
 * 
 *     cdef Time32Type out = Time32Type.__new__(Time32Type)
*/
        __Pyx_XDECREF(__pyx_r);
        if (unlikely(__pyx_v_7pyarrow_3lib__time_type_cache == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
          __PYX_ERR(1, 4284, __pyx_L1_error)
        }
        __pyx_t_2 = __Pyx_PyLong_From_enum____arrow_3a__3a_TimeUnit_3a__3a_type(__pyx_v_unit_code); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4284, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_5 = __Pyx_PyDict_GetItem(__pyx_v_7pyarrow_3lib__time_type_cache, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 4284, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_5;
        __pyx_t_5 = 0;
        goto __pyx_L0;

        /* "pyarrow/types.pxi":4283
 *         raise ValueError(f"Invalid time unit for time32: {unit!r}")
 * 
 *     if unit_code in _time_type_cache:             # <<<<<<<<<<<<<<
 *         return _time_type_cache[unit_code]
 * 
*/
      }

      /* "pyarrow/types.pxi":4286
 *         return _time_type_cache[unit_code]
 * 
 *     cdef Time32Type out = Time32Type.__new__(Time32Type)             # <<<<<<<<<<<<<<
 * 
 *     out.init(ctime32(unit_code))
*/
      __pyx_t_5 = ((PyObject *)__pyx_tp_new_7pyarrow_3lib_Time32Type(((PyTypeObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Time32Type), __pyx_mstate_global->__pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 4286, __pyx_L1_error)
      __Pyx_GOTREF((PyObject *)__pyx_t_5);
      __pyx_v_out = ((struct __pyx_obj_7pyarrow_3lib_Time32Type *)__pyx_t_5);
      __pyx_t_5 = 0;

      /* "pyarrow/types.pxi":4288
 *     cdef Time32Type out = Time32Type.__new__(Time32Type)
 * 
 *     out.init(ctime32(unit_code))             # <<<<<<<<<<<<<<
 *     _time_type_cache[unit_code] = out
 * 
*/
      if (unlikely(((PyObject *)__pyx_v_out) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "init");
        __PYX_ERR(1, 4288, __pyx_L1_error)
      }
      ((struct __pyx_vtabstruct_7pyarrow_3lib_Time32Type *)__pyx_v_out->__pyx_base.__pyx_vtab)->__pyx_base.init(((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_v_out),  arrow::time32(__pyx_v_unit_code)); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 4288, __pyx_L1_error)

      /* "pyarrow/types.pxi":4289
 * 
 *     out.init(ctime32(unit_code))
 *     _time_type_cache[unit_code] = out             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
      if (unlikely(__pyx_v_7pyarrow_3lib__time_type_cache == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(1, 4289, __pyx_L1_error)
      }
      __pyx_t_5 = __Pyx_PyLong_From_enum____arrow_3a__3a_TimeUnit_3a__3a_type(__pyx_v_unit_code); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 4289, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (unlikely((PyDict_SetItem(__pyx_v_7pyarrow_3lib__time_type_cache, __pyx_t_5, ((PyObject *)__pyx_v_out)) < 0))) __PYX_ERR(1, 4289, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "pyarrow/types.pxi":4291
 *     _time_type_cache[unit_code] = out
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF((PyObject *)__pyx_v_out);
      __pyx_r = ((PyObject *)__pyx_v_out);
      goto __pyx_L0;

      /* "pyarrow/types.pxi":4251
 * 
 * 
 * def time32(unit):             # <<<<<<<<<<<<<<
 *     """
 *     Create instance of 32-bit time (time of day) type with unit resolution.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_AddTraceback("pyarrow.lib.time32", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF((PyObject *)__pyx_v_out);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/types.pxi":4294
 * 
 * 
 * def time64(unit):             # <<<<<<<<<<<<<<
 *     """
 *     Create instance of 64-bit time (time of day) type with unit resolution.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_101time64(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_100time64, "time64(unit)\n\nCreate instance of 64-bit time (time of day) type with unit resolution.\n\nParameters\n----------\nunit : str\n    One of 'us' [microsecond], or 'ns' [nanosecond].\n\nReturns\n-------\ntype : pyarrow.Time64Type\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> pa.time64('us')\nTime64Type(time64[us])\n>>> pa.time64('ns')\nTime64Type(time64[ns])");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_101time64 = {"time64", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_101time64, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_100time64};
    static PyObject *__pyx_pw_7pyarrow_3lib_101time64(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_unit = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("time64 (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_unit,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 4294, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4294, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "time64", 0) < (0)) __PYX_ERR(1, 4294, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("time64", 1, 1, 1, i); __PYX_ERR(1, 4294, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 1)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4294, __pyx_L3_error)
        }
        __pyx_v_unit = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("time64", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 4294, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.time64", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_100time64(__pyx_self, __pyx_v_unit);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_100time64(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_unit) {
      enum  arrow::TimeUnit::type __pyx_v_unit_code;
      struct __pyx_obj_7pyarrow_3lib_Time64Type *__pyx_v_out = 0;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      int __pyx_t_1;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      PyObject *__pyx_t_5 = NULL;
      size_t __pyx_t_6;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("time64", 0);

      /* "pyarrow/types.pxi":4319
 *         c_string c_timezone
 * 
 *     if unit == 'us':             # <<<<<<<<<<<<<<
 *         unit_code = TimeUnit_MICRO
 *     elif unit == 'ns':
*/
      __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_unit, __pyx_mstate_global->__pyx_n_u_us, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 4319, __pyx_L1_error)
      if (__pyx_t_1) {

        /* "pyarrow/types.pxi":4320
 * 
 *     if unit == 'us':
 *         unit_code = TimeUnit_MICRO             # <<<<<<<<<<<<<<
 *     elif unit == 'ns':
 *         unit_code = TimeUnit_NANO
*/
        __pyx_v_unit_code =  arrow::TimeUnit::MICRO;

        /* "pyarrow/types.pxi":4319
 *         c_string c_timezone
 * 
 *     if unit == 'us':             # <<<<<<<<<<<<<<
 *         unit_code = TimeUnit_MICRO
 *     elif unit == 'ns':
*/
        goto __pyx_L3;
      }

      /* "pyarrow/types.pxi":4321
 *     if unit == 'us':
 *         unit_code = TimeUnit_MICRO
 *     elif unit == 'ns':             # <<<<<<<<<<<<<<
 *         unit_code = TimeUnit_NANO
 *     else:
*/
      __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_unit, __pyx_mstate_global->__pyx_n_u_ns, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 4321, __pyx_L1_error)
      if (likely(__pyx_t_1)) {

        /* "pyarrow/types.pxi":4322
 *         unit_code = TimeUnit_MICRO
 *     elif unit == 'ns':
 *         unit_code = TimeUnit_NANO             # <<<<<<<<<<<<<<
 *     else:
 *         raise ValueError(f"Invalid time unit for time64: {unit!r}")
*/
        __pyx_v_unit_code =  arrow::TimeUnit::NANO;

        /* "pyarrow/types.pxi":4321
 *     if unit == 'us':
 *         unit_code = TimeUnit_MICRO
 *     elif unit == 'ns':             # <<<<<<<<<<<<<<
 *         unit_code = TimeUnit_NANO
 *     else:
*/
        goto __pyx_L3;
      }

      /* "pyarrow/types.pxi":4324
 *         unit_code = TimeUnit_NANO
 *     else:
 *         raise ValueError(f"Invalid time unit for time64: {unit!r}")             # <<<<<<<<<<<<<<
 * 
 *     if unit_code in _time_type_cache:
*/
      /*else*/ {
        __pyx_t_3 = NULL;
        __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_unit), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4324, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_Invalid_time_unit_for_time64, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 4324, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_6 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4324, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __Pyx_Raise(__pyx_t_2, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __PYX_ERR(1, 4324, __pyx_L1_error)
      }
      __pyx_L3:;

      /* "pyarrow/types.pxi":4326
 *         raise ValueError(f"Invalid time unit for time64: {unit!r}")
 * 
 *     if unit_code in _time_type_cache:             # <<<<<<<<<<<<<<
 *         return _time_type_cache[unit_code]
 * 
*/
      __pyx_t_2 = __Pyx_PyLong_From_enum____arrow_3a__3a_TimeUnit_3a__3a_type(__pyx_v_unit_code); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4326, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (unlikely(__pyx_v_7pyarrow_3lib__time_type_cache == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
        __PYX_ERR(1, 4326, __pyx_L1_error)
      }
      __pyx_t_1 = (__Pyx_PyDict_ContainsTF(__pyx_t_2, __pyx_v_7pyarrow_3lib__time_type_cache, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 4326, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (__pyx_t_1) {

        /* "pyarrow/types.pxi":4327
 * 
 *     if unit_code in _time_type_cache:
 *         return _time_type_cache[unit_code]             # <<<<<<<<<<<<<<
 * 
 *     cdef Time64Type out = Time64Type.__new__(Time64Type)
*/
        __Pyx_XDECREF(__pyx_r);
        if (unlikely(__pyx_v_7pyarrow_3lib__time_type_cache == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
          __PYX_ERR(1, 4327, __pyx_L1_error)
        }
        __pyx_t_2 = __Pyx_PyLong_From_enum____arrow_3a__3a_TimeUnit_3a__3a_type(__pyx_v_unit_code); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4327, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_5 = __Pyx_PyDict_GetItem(__pyx_v_7pyarrow_3lib__time_type_cache, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 4327, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_5;
        __pyx_t_5 = 0;
        goto __pyx_L0;

        /* "pyarrow/types.pxi":4326
 *         raise ValueError(f"Invalid time unit for time64: {unit!r}")
 * 
 *     if unit_code in _time_type_cache:             # <<<<<<<<<<<<<<
 *         return _time_type_cache[unit_code]
 * 
*/
      }

      /* "pyarrow/types.pxi":4329
 *         return _time_type_cache[unit_code]
 * 
 *     cdef Time64Type out = Time64Type.__new__(Time64Type)             # <<<<<<<<<<<<<<
 * 
 *     out.init(ctime64(unit_code))
*/
      __pyx_t_5 = ((PyObject *)__pyx_tp_new_7pyarrow_3lib_Time64Type(((PyTypeObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Time64Type), __pyx_mstate_global->__pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 4329, __pyx_L1_error)
      __Pyx_GOTREF((PyObject *)__pyx_t_5);
      __pyx_v_out = ((struct __pyx_obj_7pyarrow_3lib_Time64Type *)__pyx_t_5);
      __pyx_t_5 = 0;

      /* "pyarrow/types.pxi":4331
 *     cdef Time64Type out = Time64Type.__new__(Time64Type)
 * 
 *     out.init(ctime64(unit_code))             # <<<<<<<<<<<<<<
 *     _time_type_cache[unit_code] = out
 * 
*/
      if (unlikely(((PyObject *)__pyx_v_out) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "init");
        __PYX_ERR(1, 4331, __pyx_L1_error)
      }
      ((struct __pyx_vtabstruct_7pyarrow_3lib_Time64Type *)__pyx_v_out->__pyx_base.__pyx_vtab)->__pyx_base.init(((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_v_out),  arrow::time64(__pyx_v_unit_code)); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 4331, __pyx_L1_error)

      /* "pyarrow/types.pxi":4332
 * 
 *     out.init(ctime64(unit_code))
 *     _time_type_cache[unit_code] = out             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
      if (unlikely(__pyx_v_7pyarrow_3lib__time_type_cache == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(1, 4332, __pyx_L1_error)
      }
      __pyx_t_5 = __Pyx_PyLong_From_enum____arrow_3a__3a_TimeUnit_3a__3a_type(__pyx_v_unit_code); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 4332, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (unlikely((PyDict_SetItem(__pyx_v_7pyarrow_3lib__time_type_cache, __pyx_t_5, ((PyObject *)__pyx_v_out)) < 0))) __PYX_ERR(1, 4332, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "pyarrow/types.pxi":4334
 *     _time_type_cache[unit_code] = out
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF((PyObject *)__pyx_v_out);
      __pyx_r = ((PyObject *)__pyx_v_out);
      goto __pyx_L0;

      /* "pyarrow/types.pxi":4294
 * 
 * 
 * def time64(unit):             # <<<<<<<<<<<<<<
 *     """
 *     Create instance of 64-bit time (time of day) type with unit resolution.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_AddTraceback("pyarrow.lib.time64", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF((PyObject *)__pyx_v_out);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/types.pxi":4337
 * 
 * 
 * def duration(unit):             # <<<<<<<<<<<<<<
 *     """
 *     Create instance of a duration type with unit resolution.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_103duration(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_102duration, "duration(unit)\n\nCreate instance of a duration type with unit resolution.\n\nParameters\n----------\nunit : str\n    One of 's' [second], 'ms' [millisecond], 'us' [microsecond], or\n    'ns' [nanosecond].\n\nReturns\n-------\ntype : pyarrow.DurationType\n\nExamples\n--------\nCreate an instance of duration type:\n\n>>> import pyarrow as pa\n>>> pa.duration('us')\nDurationType(duration[us])\n>>> pa.duration('s')\nDurationType(duration[s])\n\nCreate an array with duration type:\n\n>>> pa.array([0, 1, 2], type=pa.duration('s'))\n<pyarrow.lib.DurationArray object at ...>\n[\n  0,\n  1,\n  2\n]");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_103duration = {"duration", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_103duration, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_102duration};
    static PyObject *__pyx_pw_7pyarrow_3lib_103duration(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_unit = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("duration (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_unit,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 4337, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4337, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "duration", 0) < (0)) __PYX_ERR(1, 4337, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("duration", 1, 1, 1, i); __PYX_ERR(1, 4337, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 1)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4337, __pyx_L3_error)
        }
        __pyx_v_unit = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("duration", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 4337, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.duration", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_102duration(__pyx_self, __pyx_v_unit);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_102duration(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_unit) {
      enum  arrow::TimeUnit::type __pyx_v_unit_code;
      struct __pyx_obj_7pyarrow_3lib_DurationType *__pyx_v_out = 0;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      enum  arrow::TimeUnit::type __pyx_t_1;
      PyObject *__pyx_t_2 = NULL;
      int __pyx_t_3;
      PyObject *__pyx_t_4 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("duration", 0);

      /* "pyarrow/types.pxi":4374
 *         TimeUnit unit_code
 * 
 *     unit_code = string_to_timeunit(unit)             # <<<<<<<<<<<<<<
 * 
 *     if unit_code in _duration_type_cache:
*/
      __pyx_t_1 = __pyx_f_7pyarrow_3lib_string_to_timeunit(__pyx_v_unit); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 4374, __pyx_L1_error)
      __pyx_v_unit_code = __pyx_t_1;

      /* "pyarrow/types.pxi":4376
 *     unit_code = string_to_timeunit(unit)
 * 
 *     if unit_code in _duration_type_cache:             # <<<<<<<<<<<<<<
 *         return _duration_type_cache[unit_code]
 * 
*/
      __pyx_t_2 = __Pyx_PyLong_From_enum____arrow_3a__3a_TimeUnit_3a__3a_type(__pyx_v_unit_code); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4376, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (unlikely(__pyx_v_7pyarrow_3lib__duration_type_cache == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
        __PYX_ERR(1, 4376, __pyx_L1_error)
      }
      __pyx_t_3 = (__Pyx_PyDict_ContainsTF(__pyx_t_2, __pyx_v_7pyarrow_3lib__duration_type_cache, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(1, 4376, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (__pyx_t_3) {

        /* "pyarrow/types.pxi":4377
 * 
 *     if unit_code in _duration_type_cache:
 *         return _duration_type_cache[unit_code]             # <<<<<<<<<<<<<<
 * 
 *     cdef DurationType out = DurationType.__new__(DurationType)
*/
        __Pyx_XDECREF(__pyx_r);
        if (unlikely(__pyx_v_7pyarrow_3lib__duration_type_cache == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
          __PYX_ERR(1, 4377, __pyx_L1_error)
        }
        __pyx_t_2 = __Pyx_PyLong_From_enum____arrow_3a__3a_TimeUnit_3a__3a_type(__pyx_v_unit_code); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4377, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_7pyarrow_3lib__duration_type_cache, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4377, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_4;
        __pyx_t_4 = 0;
        goto __pyx_L0;

        /* "pyarrow/types.pxi":4376
 *     unit_code = string_to_timeunit(unit)
 * 
 *     if unit_code in _duration_type_cache:             # <<<<<<<<<<<<<<
 *         return _duration_type_cache[unit_code]
 * 
*/
      }

      /* "pyarrow/types.pxi":4379
 *         return _duration_type_cache[unit_code]
 * 
 *     cdef DurationType out = DurationType.__new__(DurationType)             # <<<<<<<<<<<<<<
 * 
 *     out.init(cduration(unit_code))
*/
      __pyx_t_4 = ((PyObject *)__pyx_tp_new_7pyarrow_3lib_DurationType(((PyTypeObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DurationType), __pyx_mstate_global->__pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4379, __pyx_L1_error)
      __Pyx_GOTREF((PyObject *)__pyx_t_4);
      __pyx_v_out = ((struct __pyx_obj_7pyarrow_3lib_DurationType *)__pyx_t_4);
      __pyx_t_4 = 0;

      /* "pyarrow/types.pxi":4381
 *     cdef DurationType out = DurationType.__new__(DurationType)
 * 
 *     out.init(cduration(unit_code))             # <<<<<<<<<<<<<<
 *     _duration_type_cache[unit_code] = out
 * 
*/
      if (unlikely(((PyObject *)__pyx_v_out) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "init");
        __PYX_ERR(1, 4381, __pyx_L1_error)
      }
      ((struct __pyx_vtabstruct_7pyarrow_3lib_DurationType *)__pyx_v_out->__pyx_base.__pyx_vtab)->__pyx_base.init(((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_v_out),  arrow::duration(__pyx_v_unit_code)); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 4381, __pyx_L1_error)

      /* "pyarrow/types.pxi":4382
 * 
 *     out.init(cduration(unit_code))
 *     _duration_type_cache[unit_code] = out             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
      if (unlikely(__pyx_v_7pyarrow_3lib__duration_type_cache == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(1, 4382, __pyx_L1_error)
      }
      __pyx_t_4 = __Pyx_PyLong_From_enum____arrow_3a__3a_TimeUnit_3a__3a_type(__pyx_v_unit_code); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4382, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (unlikely((PyDict_SetItem(__pyx_v_7pyarrow_3lib__duration_type_cache, __pyx_t_4, ((PyObject *)__pyx_v_out)) < 0))) __PYX_ERR(1, 4382, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "pyarrow/types.pxi":4384
 *     _duration_type_cache[unit_code] = out
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF((PyObject *)__pyx_v_out);
      __pyx_r = ((PyObject *)__pyx_v_out);
      goto __pyx_L0;

      /* "pyarrow/types.pxi":4337
 * 
 * 
 * def duration(unit):             # <<<<<<<<<<<<<<
 *     """
 *     Create instance of a duration type with unit resolution.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_AddTraceback("pyarrow.lib.duration", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF((PyObject *)__pyx_v_out);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/types.pxi":4387
 * 
 * 
 * def month_day_nano_interval():             # <<<<<<<<<<<<<<
 *     """
 *     Create instance of an interval type representing months, days and
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_105month_day_nano_interval(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_104month_day_nano_interval, "month_day_nano_interval()\n\nCreate instance of an interval type representing months, days and\nnanoseconds between two dates.\n\nExamples\n--------\nCreate an instance of an month_day_nano_interval type:\n\n>>> import pyarrow as pa\n>>> pa.month_day_nano_interval()\nDataType(month_day_nano_interval)\n\nCreate a scalar with month_day_nano_interval type:\n\n>>> pa.scalar((1, 15, -30), type=pa.month_day_nano_interval())\n<pyarrow.MonthDayNanoIntervalScalar: MonthDayNano(months=1, days=15, nanoseconds=-30)>");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_105month_day_nano_interval = {"month_day_nano_interval", (PyCFunction)__pyx_pw_7pyarrow_3lib_105month_day_nano_interval, METH_NOARGS, __pyx_doc_7pyarrow_3lib_104month_day_nano_interval};
    static PyObject *__pyx_pw_7pyarrow_3lib_105month_day_nano_interval(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("month_day_nano_interval (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_104month_day_nano_interval(__pyx_self);

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

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

      /* "pyarrow/types.pxi":4405
 *     <pyarrow.MonthDayNanoIntervalScalar: MonthDayNano(months=1, days=15, nanoseconds=-30)>
 *     """
 *     return primitive_type(_Type_INTERVAL_MONTH_DAY_NANO)             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = ((PyObject *)__pyx_f_7pyarrow_3lib_primitive_type( arrow::Type::INTERVAL_MONTH_DAY_NANO)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4405, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/types.pxi":4387
 * 
 * 
 * def month_day_nano_interval():             # <<<<<<<<<<<<<<
 *     """
 *     Create instance of an interval type representing months, days and
*/

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

    /* "pyarrow/types.pxi":4408
 * 
 * 
 * def date32():             # <<<<<<<<<<<<<<
 *     """
 *     Create instance of 32-bit date (days since UNIX epoch 1970-01-01).
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_107date32(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_106date32, "date32()\n\nCreate instance of 32-bit date (days since UNIX epoch 1970-01-01).\n\nExamples\n--------\nCreate an instance of 32-bit date type:\n\n>>> import pyarrow as pa\n>>> pa.date32()\nDataType(date32[day])\n\nCreate a scalar with 32-bit date type:\n\n>>> from datetime import date\n>>> pa.scalar(date(2012, 1, 1), type=pa.date32())\n<pyarrow.Date32Scalar: datetime.date(2012, 1, 1)>");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_107date32 = {"date32", (PyCFunction)__pyx_pw_7pyarrow_3lib_107date32, METH_NOARGS, __pyx_doc_7pyarrow_3lib_106date32};
    static PyObject *__pyx_pw_7pyarrow_3lib_107date32(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("date32 (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_106date32(__pyx_self);

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

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

      /* "pyarrow/types.pxi":4426
 *     <pyarrow.Date32Scalar: datetime.date(2012, 1, 1)>
 *     """
 *     return primitive_type(_Type_DATE32)             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = ((PyObject *)__pyx_f_7pyarrow_3lib_primitive_type( arrow::Type::DATE32)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4426, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/types.pxi":4408
 * 
 * 
 * def date32():             # <<<<<<<<<<<<<<
 *     """
 *     Create instance of 32-bit date (days since UNIX epoch 1970-01-01).
*/

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

    /* "pyarrow/types.pxi":4429
 * 
 * 
 * def date64():             # <<<<<<<<<<<<<<
 *     """
 *     Create instance of 64-bit date (milliseconds since UNIX epoch 1970-01-01).
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_109date64(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_108date64, "date64()\n\nCreate instance of 64-bit date (milliseconds since UNIX epoch 1970-01-01).\n\nExamples\n--------\nCreate an instance of 64-bit date type:\n\n>>> import pyarrow as pa\n>>> pa.date64()\nDataType(date64[ms])\n\nCreate a scalar with 64-bit date type:\n\n>>> from datetime import datetime\n>>> pa.scalar(datetime(2012, 1, 1), type=pa.date64())\n<pyarrow.Date64Scalar: datetime.date(2012, 1, 1)>");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_109date64 = {"date64", (PyCFunction)__pyx_pw_7pyarrow_3lib_109date64, METH_NOARGS, __pyx_doc_7pyarrow_3lib_108date64};
    static PyObject *__pyx_pw_7pyarrow_3lib_109date64(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("date64 (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_108date64(__pyx_self);

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

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

      /* "pyarrow/types.pxi":4447
 *     <pyarrow.Date64Scalar: datetime.date(2012, 1, 1)>
 *     """
 *     return primitive_type(_Type_DATE64)             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = ((PyObject *)__pyx_f_7pyarrow_3lib_primitive_type( arrow::Type::DATE64)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4447, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/types.pxi":4429
 * 
 * 
 * def date64():             # <<<<<<<<<<<<<<
 *     """
 *     Create instance of 64-bit date (milliseconds since UNIX epoch 1970-01-01).
*/

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

    /* "pyarrow/types.pxi":4450
 * 
 * 
 * def float16():             # <<<<<<<<<<<<<<
 *     """
 *     Create half-precision floating point type.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_111float16(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_110float16, "float16()\n\nCreate half-precision floating point type.\n\nExamples\n--------\nCreate an instance of float16 type:\n\n>>> import pyarrow as pa\n>>> pa.float16()\nDataType(halffloat)\n>>> print(pa.float16())\nhalffloat\n\nCreate an array with float16 type:\n\n>>> arr = np.array([1.5, np.nan], dtype=np.float16)\n>>> a = pa.array(arr, type=pa.float16())\n>>> a\n<pyarrow.lib.HalfFloatArray object at ...>\n[\n  1.5,\n  nan\n]\n\nNote that unlike other float types, if you convert this array\nto a python list, the types of its elements will be ``np.float16``\n\n>>> [type(val) for val in a.to_pylist()]\n[<class 'float'>, <class 'float'>]");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_111float16 = {"float16", (PyCFunction)__pyx_pw_7pyarrow_3lib_111float16, METH_NOARGS, __pyx_doc_7pyarrow_3lib_110float16};
    static PyObject *__pyx_pw_7pyarrow_3lib_111float16(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("float16 (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_110float16(__pyx_self);

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

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

      /* "pyarrow/types.pxi":4481
 *     [<class 'float'>, <class 'float'>]
 *     """
 *     return primitive_type(_Type_HALF_FLOAT)             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = ((PyObject *)__pyx_f_7pyarrow_3lib_primitive_type( arrow::Type::HALF_FLOAT)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4481, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/types.pxi":4450
 * 
 * 
 * def float16():             # <<<<<<<<<<<<<<
 *     """
 *     Create half-precision floating point type.
*/

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

    /* "pyarrow/types.pxi":4484
 * 
 * 
 * def float32():             # <<<<<<<<<<<<<<
 *     """
 *     Create single-precision floating point type.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_113float32(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_112float32, "float32()\n\nCreate single-precision floating point type.\n\nExamples\n--------\nCreate an instance of float32 type:\n\n>>> import pyarrow as pa\n>>> pa.float32()\nDataType(float)\n>>> print(pa.float32())\nfloat\n\nCreate an array with float32 type:\n\n>>> pa.array([0.0, 1.0, 2.0], type=pa.float32())\n<pyarrow.lib.FloatArray object at ...>\n[\n  0,\n  1,\n  2\n]");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_113float32 = {"float32", (PyCFunction)__pyx_pw_7pyarrow_3lib_113float32, METH_NOARGS, __pyx_doc_7pyarrow_3lib_112float32};
    static PyObject *__pyx_pw_7pyarrow_3lib_113float32(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("float32 (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_112float32(__pyx_self);

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

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

      /* "pyarrow/types.pxi":4508
 *     ]
 *     """
 *     return primitive_type(_Type_FLOAT)             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = ((PyObject *)__pyx_f_7pyarrow_3lib_primitive_type( arrow::Type::FLOAT)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4508, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/types.pxi":4484
 * 
 * 
 * def float32():             # <<<<<<<<<<<<<<
 *     """
 *     Create single-precision floating point type.
*/

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

    /* "pyarrow/types.pxi":4511
 * 
 * 
 * def float64():             # <<<<<<<<<<<<<<
 *     """
 *     Create double-precision floating point type.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_115float64(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_114float64, "float64()\n\nCreate double-precision floating point type.\n\nExamples\n--------\nCreate an instance of float64 type:\n\n>>> import pyarrow as pa\n>>> pa.float64()\nDataType(double)\n>>> print(pa.float64())\ndouble\n\nCreate an array with float64 type:\n\n>>> pa.array([0.0, 1.0, 2.0], type=pa.float64())\n<pyarrow.lib.DoubleArray object at ...>\n[\n  0,\n  1,\n  2\n]");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_115float64 = {"float64", (PyCFunction)__pyx_pw_7pyarrow_3lib_115float64, METH_NOARGS, __pyx_doc_7pyarrow_3lib_114float64};
    static PyObject *__pyx_pw_7pyarrow_3lib_115float64(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("float64 (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_114float64(__pyx_self);

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

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

      /* "pyarrow/types.pxi":4535
 *     ]
 *     """
 *     return primitive_type(_Type_DOUBLE)             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = ((PyObject *)__pyx_f_7pyarrow_3lib_primitive_type( arrow::Type::DOUBLE)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4535, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/types.pxi":4511
 * 
 * 
 * def float64():             # <<<<<<<<<<<<<<
 *     """
 *     Create double-precision floating point type.
*/

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

    /* "pyarrow/types.pxi":4538
 * 
 * 
 * cpdef DataType decimal32(int precision, int scale=0):             # <<<<<<<<<<<<<<
 *     """
 *     Create decimal type with precision and scale and 32-bit width.
*/

    static PyObject *__pyx_pw_7pyarrow_3lib_117decimal32(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    static struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_f_7pyarrow_3lib_decimal32(int __pyx_v_precision, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_7pyarrow_3lib_decimal32 *__pyx_optional_args) {
      int __pyx_v_scale = ((int)0);
      std::shared_ptr< arrow::DataType>  __pyx_v_decimal_type;
      struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      int __pyx_t_1;
      int __pyx_t_2;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      size_t __pyx_t_5;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("decimal32", 0);
      if (__pyx_optional_args) {
        if (__pyx_optional_args->__pyx_n > 0) {
          __pyx_v_scale = __pyx_optional_args->scale;
        }
      }

      /* "pyarrow/types.pxi":4587
 *     """
 *     cdef shared_ptr[CDataType] decimal_type
 *     if precision < 1 or precision > 9:             # <<<<<<<<<<<<<<
 *         raise ValueError("precision should be between 1 and 9")
 *     decimal_type.reset(new CDecimal32Type(precision, scale))
*/
      __pyx_t_2 = (__pyx_v_precision < 1);
      if (!__pyx_t_2) {
      } else {
        __pyx_t_1 = __pyx_t_2;
        goto __pyx_L4_bool_binop_done;
      }
      __pyx_t_2 = (__pyx_v_precision > 9);
      __pyx_t_1 = __pyx_t_2;
      __pyx_L4_bool_binop_done:;
      if (unlikely(__pyx_t_1)) {

        /* "pyarrow/types.pxi":4588
 *     cdef shared_ptr[CDataType] decimal_type
 *     if precision < 1 or precision > 9:
 *         raise ValueError("precision should be between 1 and 9")             # <<<<<<<<<<<<<<
 *     decimal_type.reset(new CDecimal32Type(precision, scale))
 *     return pyarrow_wrap_data_type(decimal_type)
*/
        __pyx_t_4 = NULL;
        __pyx_t_5 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_precision_should_be_between_1_an};
          __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4588, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        __Pyx_Raise(__pyx_t_3, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __PYX_ERR(1, 4588, __pyx_L1_error)

        /* "pyarrow/types.pxi":4587
 *     """
 *     cdef shared_ptr[CDataType] decimal_type
 *     if precision < 1 or precision > 9:             # <<<<<<<<<<<<<<
 *         raise ValueError("precision should be between 1 and 9")
 *     decimal_type.reset(new CDecimal32Type(precision, scale))
*/
      }

      /* "pyarrow/types.pxi":4589
 *     if precision < 1 or precision > 9:
 *         raise ValueError("precision should be between 1 and 9")
 *     decimal_type.reset(new CDecimal32Type(precision, scale))             # <<<<<<<<<<<<<<
 *     return pyarrow_wrap_data_type(decimal_type)
 * 
*/
      __pyx_v_decimal_type.reset(new  arrow::Decimal32Type(__pyx_v_precision, __pyx_v_scale));

      /* "pyarrow/types.pxi":4590
 *         raise ValueError("precision should be between 1 and 9")
 *     decimal_type.reset(new CDecimal32Type(precision, scale))
 *     return pyarrow_wrap_data_type(decimal_type)             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_3 = pyarrow_wrap_data_type(__pyx_v_decimal_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4590, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType))))) __PYX_ERR(1, 4590, __pyx_L1_error)
      __pyx_r = ((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "pyarrow/types.pxi":4538
 * 
 * 
 * cpdef DataType decimal32(int precision, int scale=0):             # <<<<<<<<<<<<<<
 *     """
 *     Create decimal type with precision and scale and 32-bit width.
*/

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

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_117decimal32(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_116decimal32, "decimal32(int precision, int scale=0) -> DataType\n\nCreate decimal type with precision and scale and 32-bit width.\n\nArrow decimals are fixed-point decimal numbers encoded as a scaled\ninteger.  The precision is the number of significant digits that the\ndecimal type can represent; the scale is the number of digits after\nthe decimal point (note the scale can be negative).\n\nAs an example, ``decimal32(7, 3)`` can exactly represent the numbers\n1234.567 and -1234.567 (encoded internally as the 32-bit integers\n1234567 and -1234567, respectively), but neither 12345.67 nor 123.4567.\n\n``decimal32(5, -3)`` can exactly represent the number 12345000\n(encoded internally as the 32-bit integer 12345), but neither\n123450000 nor 1234500.\n\nIf you need a precision higher than 9 significant digits, consider\nusing ``decimal64``, ``decimal128``, or ``decimal256``.\n\nParameters\n----------\nprecision : int\n    Must be between 1 and 9\nscale : int\n\nReturns\n-------\ndecimal_type : Decimal32Type\n\nExamples\n--------\nCreate an instance of decimal type:\n\n>>> import pyarrow as pa\n>>> pa.decimal32(5, 2)\nDecimal32Type(decimal32(5, 2))\n\nCreate an array with decimal type:\n\n>>> import decimal\n>>> a = decimal.Decimal('123.45')\n>>> pa.array([a], pa.decimal32(5, 2))\n<pyarrow.lib.Decimal32Array object at ...>\n[\n  123.45\n]");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_117decimal32 = {"decimal32", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_117decimal32, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_116decimal32};
    static PyObject *__pyx_pw_7pyarrow_3lib_117decimal32(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      int __pyx_v_precision;
      int __pyx_v_scale;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[2] = {0,0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("decimal32 (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_precision,&__pyx_mstate_global->__pyx_n_u_scale,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 4538, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4538, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4538, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "decimal32", 0) < (0)) __PYX_ERR(1, 4538, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("decimal32", 0, 1, 2, i); __PYX_ERR(1, 4538, __pyx_L3_error) }
          }
        } else {
          switch (__pyx_nargs) {
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4538, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4538, __pyx_L3_error)
            break;
            default: goto __pyx_L5_argtuple_error;
          }
        }
        __pyx_v_precision = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_precision == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 4538, __pyx_L3_error)
        if (values[1]) {
          __pyx_v_scale = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_scale == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 4538, __pyx_L3_error)
        } else {
          __pyx_v_scale = ((int)0);
        }
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("decimal32", 0, 1, 2, __pyx_nargs); __PYX_ERR(1, 4538, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.decimal32", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_116decimal32(__pyx_self, __pyx_v_precision, __pyx_v_scale);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_116decimal32(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_precision, int __pyx_v_scale) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      struct __pyx_opt_args_7pyarrow_3lib_decimal32 __pyx_t_2;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("decimal32", 0);
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2.__pyx_n = 1;
      __pyx_t_2.scale = __pyx_v_scale;
      __pyx_t_1 = ((PyObject *)__pyx_f_7pyarrow_3lib_decimal32(__pyx_v_precision, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4538, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

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

    /* "pyarrow/types.pxi":4593
 * 
 * 
 * cpdef DataType decimal64(int precision, int scale=0):             # <<<<<<<<<<<<<<
 *     """
 *     Create decimal type with precision and scale and 64-bit width.
*/

    static PyObject *__pyx_pw_7pyarrow_3lib_119decimal64(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    static struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_f_7pyarrow_3lib_decimal64(int __pyx_v_precision, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_7pyarrow_3lib_decimal64 *__pyx_optional_args) {
      int __pyx_v_scale = ((int)0);
      std::shared_ptr< arrow::DataType>  __pyx_v_decimal_type;
      struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      int __pyx_t_1;
      int __pyx_t_2;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      size_t __pyx_t_5;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("decimal64", 0);
      if (__pyx_optional_args) {
        if (__pyx_optional_args->__pyx_n > 0) {
          __pyx_v_scale = __pyx_optional_args->scale;
        }
      }

      /* "pyarrow/types.pxi":4642
 *     """
 *     cdef shared_ptr[CDataType] decimal_type
 *     if precision < 1 or precision > 18:             # <<<<<<<<<<<<<<
 *         raise ValueError("precision should be between 1 and 18")
 *     decimal_type.reset(new CDecimal64Type(precision, scale))
*/
      __pyx_t_2 = (__pyx_v_precision < 1);
      if (!__pyx_t_2) {
      } else {
        __pyx_t_1 = __pyx_t_2;
        goto __pyx_L4_bool_binop_done;
      }
      __pyx_t_2 = (__pyx_v_precision > 18);
      __pyx_t_1 = __pyx_t_2;
      __pyx_L4_bool_binop_done:;
      if (unlikely(__pyx_t_1)) {

        /* "pyarrow/types.pxi":4643
 *     cdef shared_ptr[CDataType] decimal_type
 *     if precision < 1 or precision > 18:
 *         raise ValueError("precision should be between 1 and 18")             # <<<<<<<<<<<<<<
 *     decimal_type.reset(new CDecimal64Type(precision, scale))
 *     return pyarrow_wrap_data_type(decimal_type)
*/
        __pyx_t_4 = NULL;
        __pyx_t_5 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_precision_should_be_between_1_an_2};
          __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4643, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        __Pyx_Raise(__pyx_t_3, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __PYX_ERR(1, 4643, __pyx_L1_error)

        /* "pyarrow/types.pxi":4642
 *     """
 *     cdef shared_ptr[CDataType] decimal_type
 *     if precision < 1 or precision > 18:             # <<<<<<<<<<<<<<
 *         raise ValueError("precision should be between 1 and 18")
 *     decimal_type.reset(new CDecimal64Type(precision, scale))
*/
      }

      /* "pyarrow/types.pxi":4644
 *     if precision < 1 or precision > 18:
 *         raise ValueError("precision should be between 1 and 18")
 *     decimal_type.reset(new CDecimal64Type(precision, scale))             # <<<<<<<<<<<<<<
 *     return pyarrow_wrap_data_type(decimal_type)
 * 
*/
      __pyx_v_decimal_type.reset(new  arrow::Decimal64Type(__pyx_v_precision, __pyx_v_scale));

      /* "pyarrow/types.pxi":4645
 *         raise ValueError("precision should be between 1 and 18")
 *     decimal_type.reset(new CDecimal64Type(precision, scale))
 *     return pyarrow_wrap_data_type(decimal_type)             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_3 = pyarrow_wrap_data_type(__pyx_v_decimal_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4645, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType))))) __PYX_ERR(1, 4645, __pyx_L1_error)
      __pyx_r = ((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "pyarrow/types.pxi":4593
 * 
 * 
 * cpdef DataType decimal64(int precision, int scale=0):             # <<<<<<<<<<<<<<
 *     """
 *     Create decimal type with precision and scale and 64-bit width.
*/

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

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_119decimal64(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_118decimal64, "decimal64(int precision, int scale=0) -> DataType\n\nCreate decimal type with precision and scale and 64-bit width.\n\nArrow decimals are fixed-point decimal numbers encoded as a scaled\ninteger.  The precision is the number of significant digits that the\ndecimal type can represent; the scale is the number of digits after\nthe decimal point (note the scale can be negative).\n\nAs an example, ``decimal64(7, 3)`` can exactly represent the numbers\n1234.567 and -1234.567 (encoded internally as the 64-bit integers\n1234567 and -1234567, respectively), but neither 12345.67 nor 123.4567.\n\n``decimal64(5, -3)`` can exactly represent the number 12345000\n(encoded internally as the 64-bit integer 12345), but neither\n123450000 nor 1234500.\n\nIf you need a precision higher than 18 significant digits, consider\nusing ``decimal128``, or ``decimal256``.\n\nParameters\n----------\nprecision : int\n    Must be between 1 and 18\nscale : int\n\nReturns\n-------\ndecimal_type : Decimal64Type\n\nExamples\n--------\nCreate an instance of decimal type:\n\n>>> import pyarrow as pa\n>>> pa.decimal64(5, 2)\nDecimal64Type(decimal64(5, 2))\n\nCreate an array with decimal type:\n\n>>> import decimal\n>>> a = decimal.Decimal('123.45')\n>>> pa.array([a], pa.decimal64(5, 2))\n<pyarrow.lib.Decimal64Array object at ...>\n[\n  123.45\n]");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_119decimal64 = {"decimal64", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_119decimal64, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_118decimal64};
    static PyObject *__pyx_pw_7pyarrow_3lib_119decimal64(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      int __pyx_v_precision;
      int __pyx_v_scale;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[2] = {0,0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("decimal64 (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_precision,&__pyx_mstate_global->__pyx_n_u_scale,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 4593, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4593, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4593, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "decimal64", 0) < (0)) __PYX_ERR(1, 4593, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("decimal64", 0, 1, 2, i); __PYX_ERR(1, 4593, __pyx_L3_error) }
          }
        } else {
          switch (__pyx_nargs) {
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4593, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4593, __pyx_L3_error)
            break;
            default: goto __pyx_L5_argtuple_error;
          }
        }
        __pyx_v_precision = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_precision == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 4593, __pyx_L3_error)
        if (values[1]) {
          __pyx_v_scale = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_scale == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 4593, __pyx_L3_error)
        } else {
          __pyx_v_scale = ((int)0);
        }
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("decimal64", 0, 1, 2, __pyx_nargs); __PYX_ERR(1, 4593, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.decimal64", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_118decimal64(__pyx_self, __pyx_v_precision, __pyx_v_scale);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_118decimal64(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_precision, int __pyx_v_scale) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      struct __pyx_opt_args_7pyarrow_3lib_decimal64 __pyx_t_2;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("decimal64", 0);
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2.__pyx_n = 1;
      __pyx_t_2.scale = __pyx_v_scale;
      __pyx_t_1 = ((PyObject *)__pyx_f_7pyarrow_3lib_decimal64(__pyx_v_precision, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4593, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

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

    /* "pyarrow/types.pxi":4648
 * 
 * 
 * cpdef DataType decimal128(int precision, int scale=0):             # <<<<<<<<<<<<<<
 *     """
 *     Create decimal type with precision and scale and 128-bit width.
*/

    static PyObject *__pyx_pw_7pyarrow_3lib_121decimal128(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    static struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_f_7pyarrow_3lib_decimal128(int __pyx_v_precision, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_7pyarrow_3lib_decimal128 *__pyx_optional_args) {
      int __pyx_v_scale = ((int)0);
      std::shared_ptr< arrow::DataType>  __pyx_v_decimal_type;
      struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      int __pyx_t_1;
      int __pyx_t_2;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      size_t __pyx_t_5;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("decimal128", 0);
      if (__pyx_optional_args) {
        if (__pyx_optional_args->__pyx_n > 0) {
          __pyx_v_scale = __pyx_optional_args->scale;
        }
      }

      /* "pyarrow/types.pxi":4697
 *     """
 *     cdef shared_ptr[CDataType] decimal_type
 *     if precision < 1 or precision > 38:             # <<<<<<<<<<<<<<
 *         raise ValueError("precision should be between 1 and 38")
 *     decimal_type.reset(new CDecimal128Type(precision, scale))
*/
      __pyx_t_2 = (__pyx_v_precision < 1);
      if (!__pyx_t_2) {
      } else {
        __pyx_t_1 = __pyx_t_2;
        goto __pyx_L4_bool_binop_done;
      }
      __pyx_t_2 = (__pyx_v_precision > 38);
      __pyx_t_1 = __pyx_t_2;
      __pyx_L4_bool_binop_done:;
      if (unlikely(__pyx_t_1)) {

        /* "pyarrow/types.pxi":4698
 *     cdef shared_ptr[CDataType] decimal_type
 *     if precision < 1 or precision > 38:
 *         raise ValueError("precision should be between 1 and 38")             # <<<<<<<<<<<<<<
 *     decimal_type.reset(new CDecimal128Type(precision, scale))
 *     return pyarrow_wrap_data_type(decimal_type)
*/
        __pyx_t_4 = NULL;
        __pyx_t_5 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_precision_should_be_between_1_an_3};
          __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4698, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        __Pyx_Raise(__pyx_t_3, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __PYX_ERR(1, 4698, __pyx_L1_error)

        /* "pyarrow/types.pxi":4697
 *     """
 *     cdef shared_ptr[CDataType] decimal_type
 *     if precision < 1 or precision > 38:             # <<<<<<<<<<<<<<
 *         raise ValueError("precision should be between 1 and 38")
 *     decimal_type.reset(new CDecimal128Type(precision, scale))
*/
      }

      /* "pyarrow/types.pxi":4699
 *     if precision < 1 or precision > 38:
 *         raise ValueError("precision should be between 1 and 38")
 *     decimal_type.reset(new CDecimal128Type(precision, scale))             # <<<<<<<<<<<<<<
 *     return pyarrow_wrap_data_type(decimal_type)
 * 
*/
      __pyx_v_decimal_type.reset(new  arrow::Decimal128Type(__pyx_v_precision, __pyx_v_scale));

      /* "pyarrow/types.pxi":4700
 *         raise ValueError("precision should be between 1 and 38")
 *     decimal_type.reset(new CDecimal128Type(precision, scale))
 *     return pyarrow_wrap_data_type(decimal_type)             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_3 = pyarrow_wrap_data_type(__pyx_v_decimal_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4700, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType))))) __PYX_ERR(1, 4700, __pyx_L1_error)
      __pyx_r = ((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "pyarrow/types.pxi":4648
 * 
 * 
 * cpdef DataType decimal128(int precision, int scale=0):             # <<<<<<<<<<<<<<
 *     """
 *     Create decimal type with precision and scale and 128-bit width.
*/

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

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_121decimal128(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_120decimal128, "decimal128(int precision, int scale=0) -> DataType\n\nCreate decimal type with precision and scale and 128-bit width.\n\nArrow decimals are fixed-point decimal numbers encoded as a scaled\ninteger.  The precision is the number of significant digits that the\ndecimal type can represent; the scale is the number of digits after\nthe decimal point (note the scale can be negative).\n\nAs an example, ``decimal128(7, 3)`` can exactly represent the numbers\n1234.567 and -1234.567 (encoded internally as the 128-bit integers\n1234567 and -1234567, respectively), but neither 12345.67 nor 123.4567.\n\n``decimal128(5, -3)`` can exactly represent the number 12345000\n(encoded internally as the 128-bit integer 12345), but neither\n123450000 nor 1234500.\n\nIf you need a precision higher than 38 significant digits, consider\nusing ``decimal256``.\n\nParameters\n----------\nprecision : int\n    Must be between 1 and 38\nscale : int\n\nReturns\n-------\ndecimal_type : Decimal128Type\n\nExamples\n--------\nCreate an instance of decimal type:\n\n>>> import pyarrow as pa\n>>> pa.decimal128(5, 2)\nDecimal128Type(decimal128(5, 2))\n\nCreate an array with decimal type:\n\n>>> import decimal\n>>> a = decimal.Decimal('123.45')\n>>> pa.array([a], pa.decimal128(5, 2))\n<pyarrow.lib.Decimal128Array object at ...>\n[\n  123.45\n]");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_121decimal128 = {"decimal128", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_121decimal128, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_120decimal128};
    static PyObject *__pyx_pw_7pyarrow_3lib_121decimal128(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      int __pyx_v_precision;
      int __pyx_v_scale;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[2] = {0,0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("decimal128 (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_precision,&__pyx_mstate_global->__pyx_n_u_scale,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 4648, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4648, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4648, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "decimal128", 0) < (0)) __PYX_ERR(1, 4648, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("decimal128", 0, 1, 2, i); __PYX_ERR(1, 4648, __pyx_L3_error) }
          }
        } else {
          switch (__pyx_nargs) {
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4648, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4648, __pyx_L3_error)
            break;
            default: goto __pyx_L5_argtuple_error;
          }
        }
        __pyx_v_precision = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_precision == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 4648, __pyx_L3_error)
        if (values[1]) {
          __pyx_v_scale = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_scale == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 4648, __pyx_L3_error)
        } else {
          __pyx_v_scale = ((int)0);
        }
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("decimal128", 0, 1, 2, __pyx_nargs); __PYX_ERR(1, 4648, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.decimal128", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_120decimal128(__pyx_self, __pyx_v_precision, __pyx_v_scale);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_120decimal128(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_precision, int __pyx_v_scale) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      struct __pyx_opt_args_7pyarrow_3lib_decimal128 __pyx_t_2;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("decimal128", 0);
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2.__pyx_n = 1;
      __pyx_t_2.scale = __pyx_v_scale;
      __pyx_t_1 = ((PyObject *)__pyx_f_7pyarrow_3lib_decimal128(__pyx_v_precision, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4648, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

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

    /* "pyarrow/types.pxi":4703
 * 
 * 
 * cpdef DataType decimal256(int precision, int scale=0):             # <<<<<<<<<<<<<<
 *     """
 *     Create decimal type with precision and scale and 256-bit width.
*/

    static PyObject *__pyx_pw_7pyarrow_3lib_123decimal256(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    static struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_f_7pyarrow_3lib_decimal256(int __pyx_v_precision, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_7pyarrow_3lib_decimal256 *__pyx_optional_args) {
      int __pyx_v_scale = ((int)0);
      std::shared_ptr< arrow::DataType>  __pyx_v_decimal_type;
      struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      int __pyx_t_1;
      int __pyx_t_2;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      size_t __pyx_t_5;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("decimal256", 0);
      if (__pyx_optional_args) {
        if (__pyx_optional_args->__pyx_n > 0) {
          __pyx_v_scale = __pyx_optional_args->scale;
        }
      }

      /* "pyarrow/types.pxi":4728
 *     """
 *     cdef shared_ptr[CDataType] decimal_type
 *     if precision < 1 or precision > 76:             # <<<<<<<<<<<<<<
 *         raise ValueError("precision should be between 1 and 76")
 *     decimal_type.reset(new CDecimal256Type(precision, scale))
*/
      __pyx_t_2 = (__pyx_v_precision < 1);
      if (!__pyx_t_2) {
      } else {
        __pyx_t_1 = __pyx_t_2;
        goto __pyx_L4_bool_binop_done;
      }
      __pyx_t_2 = (__pyx_v_precision > 76);
      __pyx_t_1 = __pyx_t_2;
      __pyx_L4_bool_binop_done:;
      if (unlikely(__pyx_t_1)) {

        /* "pyarrow/types.pxi":4729
 *     cdef shared_ptr[CDataType] decimal_type
 *     if precision < 1 or precision > 76:
 *         raise ValueError("precision should be between 1 and 76")             # <<<<<<<<<<<<<<
 *     decimal_type.reset(new CDecimal256Type(precision, scale))
 *     return pyarrow_wrap_data_type(decimal_type)
*/
        __pyx_t_4 = NULL;
        __pyx_t_5 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_precision_should_be_between_1_an_4};
          __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4729, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        __Pyx_Raise(__pyx_t_3, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __PYX_ERR(1, 4729, __pyx_L1_error)

        /* "pyarrow/types.pxi":4728
 *     """
 *     cdef shared_ptr[CDataType] decimal_type
 *     if precision < 1 or precision > 76:             # <<<<<<<<<<<<<<
 *         raise ValueError("precision should be between 1 and 76")
 *     decimal_type.reset(new CDecimal256Type(precision, scale))
*/
      }

      /* "pyarrow/types.pxi":4730
 *     if precision < 1 or precision > 76:
 *         raise ValueError("precision should be between 1 and 76")
 *     decimal_type.reset(new CDecimal256Type(precision, scale))             # <<<<<<<<<<<<<<
 *     return pyarrow_wrap_data_type(decimal_type)
 * 
*/
      __pyx_v_decimal_type.reset(new  arrow::Decimal256Type(__pyx_v_precision, __pyx_v_scale));

      /* "pyarrow/types.pxi":4731
 *         raise ValueError("precision should be between 1 and 76")
 *     decimal_type.reset(new CDecimal256Type(precision, scale))
 *     return pyarrow_wrap_data_type(decimal_type)             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_3 = pyarrow_wrap_data_type(__pyx_v_decimal_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4731, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType))))) __PYX_ERR(1, 4731, __pyx_L1_error)
      __pyx_r = ((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "pyarrow/types.pxi":4703
 * 
 * 
 * cpdef DataType decimal256(int precision, int scale=0):             # <<<<<<<<<<<<<<
 *     """
 *     Create decimal type with precision and scale and 256-bit width.
*/

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

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_123decimal256(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_122decimal256, "decimal256(int precision, int scale=0) -> DataType\n\nCreate decimal type with precision and scale and 256-bit width.\n\nArrow decimals are fixed-point decimal numbers encoded as a scaled\ninteger.  The precision is the number of significant digits that the\ndecimal type can represent; the scale is the number of digits after\nthe decimal point (note the scale can be negative).\n\nFor most use cases, the maximum precision offered by ``decimal128``\nis sufficient, and it will result in a more compact and more efficient\nencoding.  ``decimal256`` is useful if you need a precision higher\nthan 38 significant digits.\n\nParameters\n----------\nprecision : int\n    Must be between 1 and 76\nscale : int\n\nReturns\n-------\ndecimal_type : Decimal256Type");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_123decimal256 = {"decimal256", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_123decimal256, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_122decimal256};
    static PyObject *__pyx_pw_7pyarrow_3lib_123decimal256(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      int __pyx_v_precision;
      int __pyx_v_scale;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[2] = {0,0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("decimal256 (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_precision,&__pyx_mstate_global->__pyx_n_u_scale,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 4703, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4703, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4703, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "decimal256", 0) < (0)) __PYX_ERR(1, 4703, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("decimal256", 0, 1, 2, i); __PYX_ERR(1, 4703, __pyx_L3_error) }
          }
        } else {
          switch (__pyx_nargs) {
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4703, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4703, __pyx_L3_error)
            break;
            default: goto __pyx_L5_argtuple_error;
          }
        }
        __pyx_v_precision = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_precision == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 4703, __pyx_L3_error)
        if (values[1]) {
          __pyx_v_scale = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_scale == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 4703, __pyx_L3_error)
        } else {
          __pyx_v_scale = ((int)0);
        }
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("decimal256", 0, 1, 2, __pyx_nargs); __PYX_ERR(1, 4703, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.decimal256", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_122decimal256(__pyx_self, __pyx_v_precision, __pyx_v_scale);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_122decimal256(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_precision, int __pyx_v_scale) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      struct __pyx_opt_args_7pyarrow_3lib_decimal256 __pyx_t_2;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("decimal256", 0);
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2.__pyx_n = 1;
      __pyx_t_2.scale = __pyx_v_scale;
      __pyx_t_1 = ((PyObject *)__pyx_f_7pyarrow_3lib_decimal256(__pyx_v_precision, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4703, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

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

    /* "pyarrow/types.pxi":4734
 * 
 * 
 * def string():             # <<<<<<<<<<<<<<
 *     """
 *     Create UTF8 variable-length string type.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_125string(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_124string, "string()\n\nCreate UTF8 variable-length string type.\n\nExamples\n--------\nCreate an instance of a string type:\n\n>>> import pyarrow as pa\n>>> pa.string()\nDataType(string)\n\nand use the string type to create an array:\n\n>>> pa.array(['foo', 'bar', 'baz'], type=pa.string())\n<pyarrow.lib.StringArray object at ...>\n[\n  \"foo\",\n  \"bar\",\n  \"baz\"\n]");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_125string = {"string", (PyCFunction)__pyx_pw_7pyarrow_3lib_125string, METH_NOARGS, __pyx_doc_7pyarrow_3lib_124string};
    static PyObject *__pyx_pw_7pyarrow_3lib_125string(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("string (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_124string(__pyx_self);

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

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

      /* "pyarrow/types.pxi":4756
 *     ]
 *     """
 *     return primitive_type(_Type_STRING)             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = ((PyObject *)__pyx_f_7pyarrow_3lib_primitive_type( arrow::Type::STRING)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4756, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/types.pxi":4734
 * 
 * 
 * def string():             # <<<<<<<<<<<<<<
 *     """
 *     Create UTF8 variable-length string type.
*/

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

    /* "pyarrow/types.pxi":4759
 * 
 * 
 * def utf8():             # <<<<<<<<<<<<<<
 *     """
 *     Alias for string().
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_127utf8(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_126utf8, "utf8()\n\nAlias for string().\n\nExamples\n--------\nCreate an instance of a string type:\n\n>>> import pyarrow as pa\n>>> pa.utf8()\nDataType(string)\n\nand use the string type to create an array:\n\n>>> pa.array(['foo', 'bar', 'baz'], type=pa.utf8())\n<pyarrow.lib.StringArray object at ...>\n[\n  \"foo\",\n  \"bar\",\n  \"baz\"\n]");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_127utf8 = {"utf8", (PyCFunction)__pyx_pw_7pyarrow_3lib_127utf8, METH_NOARGS, __pyx_doc_7pyarrow_3lib_126utf8};
    static PyObject *__pyx_pw_7pyarrow_3lib_127utf8(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("utf8 (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_126utf8(__pyx_self);

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

    static PyObject *__pyx_pf_7pyarrow_3lib_126utf8(CYTHON_UNUSED PyObject *__pyx_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      size_t __pyx_t_4;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("utf8", 0);

      /* "pyarrow/types.pxi":4781
 *     ]
 *     """
 *     return string()             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_string); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4781, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
        assert(__pyx_t_2);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
        __pyx_t_4 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4781, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/types.pxi":4759
 * 
 * 
 * def utf8():             # <<<<<<<<<<<<<<
 *     """
 *     Alias for string().
*/

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

    /* "pyarrow/types.pxi":4784
 * 
 * 
 * def binary(int length=-1):             # <<<<<<<<<<<<<<
 *     """
 *     Create variable-length or fixed size binary type.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_129binary(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_128binary, "binary(int length=-1)\n\nCreate variable-length or fixed size binary type.\n\nParameters\n----------\nlength : int, optional, default -1\n    If length == -1 then return a variable length binary type. If length is\n    greater than or equal to 0 then return a fixed size binary type of\n    width `length`.\n\nExamples\n--------\nCreate an instance of a variable-length binary type:\n\n>>> import pyarrow as pa\n>>> pa.binary()\nDataType(binary)\n\nand use the variable-length binary type to create an array:\n\n>>> pa.array(['foo', 'bar', 'baz'], type=pa.binary())\n<pyarrow.lib.BinaryArray object at ...>\n[\n  666F6F,\n  626172,\n  62617A\n]\n\nCreate an instance of a fixed-size binary type:\n\n>>> pa.binary(3)\nFixedSizeBinaryType(fixed_size_binary[3])\n\nand use the fixed-length binary type to create an array:\n\n>>> pa.array(['foo', 'bar', 'baz'], type=pa.binary(3))\n<pyarrow.lib.FixedSizeBinaryArray object at ...>\n[\n  666F6F,\n  626172,\n  62617A\n]");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_129binary = {"binary", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_129binary, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_128binary};
    static PyObject *__pyx_pw_7pyarrow_3lib_129binary(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      int __pyx_v_length;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("binary (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_length,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 4784, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4784, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "binary", 0) < (0)) __PYX_ERR(1, 4784, __pyx_L3_error)
        } else {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4784, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
        }
        if (values[0]) {
          __pyx_v_length = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_length == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 4784, __pyx_L3_error)
        } else {
          __pyx_v_length = ((int)((int)-1));
        }
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("binary", 0, 0, 1, __pyx_nargs); __PYX_ERR(1, 4784, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.binary", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_128binary(__pyx_self, __pyx_v_length);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_128binary(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_length) {
      std::shared_ptr< arrow::DataType>  __pyx_v_fixed_size_binary_type;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      int __pyx_t_1;
      PyObject *__pyx_t_2 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("binary", 0);

      /* "pyarrow/types.pxi":4828
 *     ]
 *     """
 *     if length == -1:             # <<<<<<<<<<<<<<
 *         return primitive_type(_Type_BINARY)
 * 
*/
      __pyx_t_1 = (__pyx_v_length == -1L);
      if (__pyx_t_1) {

        /* "pyarrow/types.pxi":4829
 *     """
 *     if length == -1:
 *         return primitive_type(_Type_BINARY)             # <<<<<<<<<<<<<<
 * 
 *     cdef shared_ptr[CDataType] fixed_size_binary_type
*/
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_2 = ((PyObject *)__pyx_f_7pyarrow_3lib_primitive_type( arrow::Type::BINARY)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4829, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        goto __pyx_L0;

        /* "pyarrow/types.pxi":4828
 *     ]
 *     """
 *     if length == -1:             # <<<<<<<<<<<<<<
 *         return primitive_type(_Type_BINARY)
 * 
*/
      }

      /* "pyarrow/types.pxi":4832
 * 
 *     cdef shared_ptr[CDataType] fixed_size_binary_type
 *     fixed_size_binary_type.reset(new CFixedSizeBinaryType(length))             # <<<<<<<<<<<<<<
 *     return pyarrow_wrap_data_type(fixed_size_binary_type)
 * 
*/
      __pyx_v_fixed_size_binary_type.reset(new  arrow::FixedSizeBinaryType(__pyx_v_length));

      /* "pyarrow/types.pxi":4833
 *     cdef shared_ptr[CDataType] fixed_size_binary_type
 *     fixed_size_binary_type.reset(new CFixedSizeBinaryType(length))
 *     return pyarrow_wrap_data_type(fixed_size_binary_type)             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = pyarrow_wrap_data_type(__pyx_v_fixed_size_binary_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4833, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;

      /* "pyarrow/types.pxi":4784
 * 
 * 
 * def binary(int length=-1):             # <<<<<<<<<<<<<<
 *     """
 *     Create variable-length or fixed size binary type.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_AddTraceback("pyarrow.lib.binary", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/types.pxi":4836
 * 
 * 
 * def large_binary():             # <<<<<<<<<<<<<<
 *     """
 *     Create large variable-length binary type.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_131large_binary(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_130large_binary, "large_binary()\n\nCreate large variable-length binary type.\n\nThis data type may not be supported by all Arrow implementations.  Unless\nyou need to represent data larger than 2GB, you should prefer binary().\n\nExamples\n--------\nCreate an instance of large variable-length binary type:\n\n>>> import pyarrow as pa\n>>> pa.large_binary()\nDataType(large_binary)\n\nand use the type to create an array:\n\n>>> pa.array(['foo', 'bar', 'baz'], type=pa.large_binary())\n<pyarrow.lib.LargeBinaryArray object at ...>\n[\n  666F6F,\n  626172,\n  62617A\n]");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_131large_binary = {"large_binary", (PyCFunction)__pyx_pw_7pyarrow_3lib_131large_binary, METH_NOARGS, __pyx_doc_7pyarrow_3lib_130large_binary};
    static PyObject *__pyx_pw_7pyarrow_3lib_131large_binary(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("large_binary (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_130large_binary(__pyx_self);

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

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

      /* "pyarrow/types.pxi":4861
 *     ]
 *     """
 *     return primitive_type(_Type_LARGE_BINARY)             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = ((PyObject *)__pyx_f_7pyarrow_3lib_primitive_type( arrow::Type::LARGE_BINARY)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4861, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/types.pxi":4836
 * 
 * 
 * def large_binary():             # <<<<<<<<<<<<<<
 *     """
 *     Create large variable-length binary type.
*/

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

    /* "pyarrow/types.pxi":4864
 * 
 * 
 * def large_string():             # <<<<<<<<<<<<<<
 *     """
 *     Create large UTF8 variable-length string type.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_133large_string(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_132large_string, "large_string()\n\nCreate large UTF8 variable-length string type.\n\nThis data type may not be supported by all Arrow implementations.  Unless\nyou need to represent data larger than 2GB, you should prefer string().\n\nExamples\n--------\nCreate an instance of large UTF8 variable-length binary type:\n\n>>> import pyarrow as pa\n>>> pa.large_string()\nDataType(large_string)\n\nand use the type to create an array:\n\n>>> pa.array(['foo', 'bar'] * 50, type=pa.large_string())\n<pyarrow.lib.LargeStringArray object at ...>\n[\n  \"foo\",\n  \"bar\",\n  ...\n  \"foo\",\n  \"bar\"\n]");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_133large_string = {"large_string", (PyCFunction)__pyx_pw_7pyarrow_3lib_133large_string, METH_NOARGS, __pyx_doc_7pyarrow_3lib_132large_string};
    static PyObject *__pyx_pw_7pyarrow_3lib_133large_string(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("large_string (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_132large_string(__pyx_self);

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

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

      /* "pyarrow/types.pxi":4891
 *     ]
 *     """
 *     return primitive_type(_Type_LARGE_STRING)             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = ((PyObject *)__pyx_f_7pyarrow_3lib_primitive_type( arrow::Type::LARGE_STRING)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4891, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/types.pxi":4864
 * 
 * 
 * def large_string():             # <<<<<<<<<<<<<<
 *     """
 *     Create large UTF8 variable-length string type.
*/

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

    /* "pyarrow/types.pxi":4894
 * 
 * 
 * def large_utf8():             # <<<<<<<<<<<<<<
 *     """
 *     Alias for large_string().
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_135large_utf8(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_134large_utf8, "large_utf8()\n\nAlias for large_string().\n\nExamples\n--------\nCreate an instance of large UTF8 variable-length binary type:\n\n>>> import pyarrow as pa\n>>> pa.large_utf8()\nDataType(large_string)\n\nand use the type to create an array:\n\n>>> pa.array(['foo', 'bar'] * 50, type=pa.large_utf8())\n<pyarrow.lib.LargeStringArray object at ...>\n[\n  \"foo\",\n  \"bar\",\n  ...\n  \"foo\",\n  \"bar\"\n]");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_135large_utf8 = {"large_utf8", (PyCFunction)__pyx_pw_7pyarrow_3lib_135large_utf8, METH_NOARGS, __pyx_doc_7pyarrow_3lib_134large_utf8};
    static PyObject *__pyx_pw_7pyarrow_3lib_135large_utf8(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("large_utf8 (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_134large_utf8(__pyx_self);

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

    static PyObject *__pyx_pf_7pyarrow_3lib_134large_utf8(CYTHON_UNUSED PyObject *__pyx_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      size_t __pyx_t_4;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("large_utf8", 0);

      /* "pyarrow/types.pxi":4918
 *     ]
 *     """
 *     return large_string()             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_large_string); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4918, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
        assert(__pyx_t_2);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
        __pyx_t_4 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4918, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/types.pxi":4894
 * 
 * 
 * def large_utf8():             # <<<<<<<<<<<<<<
 *     """
 *     Alias for large_string().
*/

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

    /* "pyarrow/types.pxi":4921
 * 
 * 
 * def binary_view():             # <<<<<<<<<<<<<<
 *     """
 *     Create a variable-length binary view type.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_137binary_view(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_136binary_view, "binary_view()\n\nCreate a variable-length binary view type.\n\nExamples\n--------\nCreate an instance of a string type:\n\n>>> import pyarrow as pa\n>>> pa.binary_view()\nDataType(binary_view)");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_137binary_view = {"binary_view", (PyCFunction)__pyx_pw_7pyarrow_3lib_137binary_view, METH_NOARGS, __pyx_doc_7pyarrow_3lib_136binary_view};
    static PyObject *__pyx_pw_7pyarrow_3lib_137binary_view(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("binary_view (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_136binary_view(__pyx_self);

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

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

      /* "pyarrow/types.pxi":4933
 *     DataType(binary_view)
 *     """
 *     return primitive_type(_Type_BINARY_VIEW)             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = ((PyObject *)__pyx_f_7pyarrow_3lib_primitive_type( arrow::Type::BINARY_VIEW)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4933, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/types.pxi":4921
 * 
 * 
 * def binary_view():             # <<<<<<<<<<<<<<
 *     """
 *     Create a variable-length binary view type.
*/

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

    /* "pyarrow/types.pxi":4936
 * 
 * 
 * def string_view():             # <<<<<<<<<<<<<<
 *     """
 *     Create UTF8 variable-length string view type.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_139string_view(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_138string_view, "string_view()\n\nCreate UTF8 variable-length string view type.\n\nExamples\n--------\nCreate an instance of a string type:\n\n>>> import pyarrow as pa\n>>> pa.string_view()\nDataType(string_view)");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_139string_view = {"string_view", (PyCFunction)__pyx_pw_7pyarrow_3lib_139string_view, METH_NOARGS, __pyx_doc_7pyarrow_3lib_138string_view};
    static PyObject *__pyx_pw_7pyarrow_3lib_139string_view(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("string_view (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_138string_view(__pyx_self);

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

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

      /* "pyarrow/types.pxi":4948
 *     DataType(string_view)
 *     """
 *     return primitive_type(_Type_STRING_VIEW)             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = ((PyObject *)__pyx_f_7pyarrow_3lib_primitive_type( arrow::Type::STRING_VIEW)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4948, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/types.pxi":4936
 * 
 * 
 * def string_view():             # <<<<<<<<<<<<<<
 *     """
 *     Create UTF8 variable-length string view type.
*/

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

    /* "pyarrow/types.pxi":4951
 * 
 * 
 * def list_(value_type, int list_size=-1):             # <<<<<<<<<<<<<<
 *     """
 *     Create ListType instance from child data type or field.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_141list_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_140list_, "list_(value_type, int list_size=-1)\n\nCreate ListType instance from child data type or field.\n\nParameters\n----------\nvalue_type : DataType or Field\nlist_size : int, optional, default -1\n    If length == -1 then return a variable length list type. If length is\n    greater than or equal to 0 then return a fixed size list type.\n\nReturns\n-------\nlist_type : DataType\n\nExamples\n--------\nCreate an instance of ListType:\n\n>>> import pyarrow as pa\n>>> pa.list_(pa.string())\nListType(list<item: string>)\n>>> pa.list_(pa.int32(), 2)\nFixedSizeListType(fixed_size_list<item: int32>[2])\n\nUse the ListType to create a scalar:\n\n>>> pa.scalar(['foo', None], type=pa.list_(pa.string(), 2))\n<pyarrow.FixedSizeListScalar: ['foo', None]>\n\nor an array:\n\n>>> pa.array([[1, 2], [3, 4]], pa.list_(pa.int32(), 2))\n<pyarrow.lib.FixedSizeListArray object at ...>\n[\n  [\n    1,\n    2\n  ],\n  [\n    3,\n    4\n  ]\n]");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_141list_ = {"list_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_141list_, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_140list_};
    static PyObject *__pyx_pw_7pyarrow_3lib_141list_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_value_type = 0;
      int __pyx_v_list_size;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[2] = {0,0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("list_ (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_value_type,&__pyx_mstate_global->__pyx_n_u_list_size,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 4951, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4951, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4951, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "list_", 0) < (0)) __PYX_ERR(1, 4951, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("list_", 0, 1, 2, i); __PYX_ERR(1, 4951, __pyx_L3_error) }
          }
        } else {
          switch (__pyx_nargs) {
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4951, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4951, __pyx_L3_error)
            break;
            default: goto __pyx_L5_argtuple_error;
          }
        }
        __pyx_v_value_type = values[0];
        if (values[1]) {
          __pyx_v_list_size = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_list_size == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 4951, __pyx_L3_error)
        } else {
          __pyx_v_list_size = ((int)((int)-1));
        }
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("list_", 0, 1, 2, __pyx_nargs); __PYX_ERR(1, 4951, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.list_", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_140list_(__pyx_self, __pyx_v_value_type, __pyx_v_list_size);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_140list_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_value_type, int __pyx_v_list_size) {
      struct __pyx_obj_7pyarrow_3lib_Field *__pyx_v__field = 0;
      std::shared_ptr< arrow::DataType>  __pyx_v_list_type;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      int __pyx_t_1;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      size_t __pyx_t_5;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("list_", 0);

      /* "pyarrow/types.pxi":5000
 *         shared_ptr[CDataType] list_type
 * 
 *     if isinstance(value_type, DataType):             # <<<<<<<<<<<<<<
 *         _field = field('item', value_type)
 *     elif isinstance(value_type, Field):
*/
      __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_value_type, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType); 
      if (__pyx_t_1) {

        /* "pyarrow/types.pxi":5001
 * 
 *     if isinstance(value_type, DataType):
 *         _field = field('item', value_type)             # <<<<<<<<<<<<<<
 *     elif isinstance(value_type, Field):
 *         _field = value_type
*/
        __pyx_t_3 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_field); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5001, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_mstate_global->__pyx_n_u_item, __pyx_v_value_type};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5001, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Field))))) __PYX_ERR(1, 5001, __pyx_L1_error)
        __pyx_v__field = ((struct __pyx_obj_7pyarrow_3lib_Field *)__pyx_t_2);
        __pyx_t_2 = 0;

        /* "pyarrow/types.pxi":5000
 *         shared_ptr[CDataType] list_type
 * 
 *     if isinstance(value_type, DataType):             # <<<<<<<<<<<<<<
 *         _field = field('item', value_type)
 *     elif isinstance(value_type, Field):
*/
        goto __pyx_L3;
      }

      /* "pyarrow/types.pxi":5002
 *     if isinstance(value_type, DataType):
 *         _field = field('item', value_type)
 *     elif isinstance(value_type, Field):             # <<<<<<<<<<<<<<
 *         _field = value_type
 *     else:
*/
      __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_value_type, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Field); 
      if (likely(__pyx_t_1)) {

        /* "pyarrow/types.pxi":5003
 *         _field = field('item', value_type)
 *     elif isinstance(value_type, Field):
 *         _field = value_type             # <<<<<<<<<<<<<<
 *     else:
 *         raise TypeError('List requires DataType or Field')
*/
        __pyx_t_2 = __pyx_v_value_type;
        __Pyx_INCREF(__pyx_t_2);
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Field))))) __PYX_ERR(1, 5003, __pyx_L1_error)
        __pyx_v__field = ((struct __pyx_obj_7pyarrow_3lib_Field *)__pyx_t_2);
        __pyx_t_2 = 0;

        /* "pyarrow/types.pxi":5002
 *     if isinstance(value_type, DataType):
 *         _field = field('item', value_type)
 *     elif isinstance(value_type, Field):             # <<<<<<<<<<<<<<
 *         _field = value_type
 *     else:
*/
        goto __pyx_L3;
      }

      /* "pyarrow/types.pxi":5005
 *         _field = value_type
 *     else:
 *         raise TypeError('List requires DataType or Field')             # <<<<<<<<<<<<<<
 * 
 *     if list_size == -1:
*/
      /*else*/ {
        __pyx_t_4 = NULL;
        __pyx_t_5 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_List_requires_DataType_or_Field};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5005, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __Pyx_Raise(__pyx_t_2, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __PYX_ERR(1, 5005, __pyx_L1_error)
      }
      __pyx_L3:;

      /* "pyarrow/types.pxi":5007
 *         raise TypeError('List requires DataType or Field')
 * 
 *     if list_size == -1:             # <<<<<<<<<<<<<<
 *         list_type.reset(new CListType(_field.sp_field))
 *     else:
*/
      __pyx_t_1 = (__pyx_v_list_size == -1L);
      if (__pyx_t_1) {

        /* "pyarrow/types.pxi":5008
 * 
 *     if list_size == -1:
 *         list_type.reset(new CListType(_field.sp_field))             # <<<<<<<<<<<<<<
 *     else:
 *         if list_size < 0:
*/
        if (unlikely(((PyObject *)__pyx_v__field) == Py_None)) {
          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_field");
          __PYX_ERR(1, 5008, __pyx_L1_error)
        }
        __pyx_v_list_type.reset(new  arrow::ListType(__pyx_v__field->sp_field));

        /* "pyarrow/types.pxi":5007
 *         raise TypeError('List requires DataType or Field')
 * 
 *     if list_size == -1:             # <<<<<<<<<<<<<<
 *         list_type.reset(new CListType(_field.sp_field))
 *     else:
*/
        goto __pyx_L4;
      }

      /* "pyarrow/types.pxi":5010
 *         list_type.reset(new CListType(_field.sp_field))
 *     else:
 *         if list_size < 0:             # <<<<<<<<<<<<<<
 *             raise ValueError("list_size should be a positive integer")
 *         list_type.reset(new CFixedSizeListType(_field.sp_field, list_size))
*/
      /*else*/ {
        __pyx_t_1 = (__pyx_v_list_size < 0);
        if (unlikely(__pyx_t_1)) {

          /* "pyarrow/types.pxi":5011
 *     else:
 *         if list_size < 0:
 *             raise ValueError("list_size should be a positive integer")             # <<<<<<<<<<<<<<
 *         list_type.reset(new CFixedSizeListType(_field.sp_field, list_size))
 * 
*/
          __pyx_t_4 = NULL;
          __pyx_t_5 = 1;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_list_size_should_be_a_positive_i};
            __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
            if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5011, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
          }
          __Pyx_Raise(__pyx_t_2, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __PYX_ERR(1, 5011, __pyx_L1_error)

          /* "pyarrow/types.pxi":5010
 *         list_type.reset(new CListType(_field.sp_field))
 *     else:
 *         if list_size < 0:             # <<<<<<<<<<<<<<
 *             raise ValueError("list_size should be a positive integer")
 *         list_type.reset(new CFixedSizeListType(_field.sp_field, list_size))
*/
        }

        /* "pyarrow/types.pxi":5012
 *         if list_size < 0:
 *             raise ValueError("list_size should be a positive integer")
 *         list_type.reset(new CFixedSizeListType(_field.sp_field, list_size))             # <<<<<<<<<<<<<<
 * 
 *     return pyarrow_wrap_data_type(list_type)
*/
        if (unlikely(((PyObject *)__pyx_v__field) == Py_None)) {
          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_field");
          __PYX_ERR(1, 5012, __pyx_L1_error)
        }
        __pyx_v_list_type.reset(new  arrow::FixedSizeListType(__pyx_v__field->sp_field, __pyx_v_list_size));
      }
      __pyx_L4:;

      /* "pyarrow/types.pxi":5014
 *         list_type.reset(new CFixedSizeListType(_field.sp_field, list_size))
 * 
 *     return pyarrow_wrap_data_type(list_type)             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = pyarrow_wrap_data_type(__pyx_v_list_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5014, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;

      /* "pyarrow/types.pxi":4951
 * 
 * 
 * def list_(value_type, int list_size=-1):             # <<<<<<<<<<<<<<
 *     """
 *     Create ListType instance from child data type or field.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_AddTraceback("pyarrow.lib.list_", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF((PyObject *)__pyx_v__field);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/types.pxi":5017
 * 
 * 
 * cpdef LargeListType large_list(value_type):             # <<<<<<<<<<<<<<
 *     """
 *     Create LargeListType instance from child data type or field.
*/

    static PyObject *__pyx_pw_7pyarrow_3lib_143large_list(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    static struct __pyx_obj_7pyarrow_3lib_LargeListType *__pyx_f_7pyarrow_3lib_large_list(PyObject *__pyx_v_value_type, CYTHON_UNUSED int __pyx_skip_dispatch) {
      struct __pyx_obj_7pyarrow_3lib_Field *__pyx_v__field = 0;
      std::shared_ptr< arrow::DataType>  __pyx_v_list_type;
      struct __pyx_obj_7pyarrow_3lib_LargeListType *__pyx_v_out = 0;
      struct __pyx_obj_7pyarrow_3lib_LargeListType *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_t_2;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      size_t __pyx_t_5;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("large_list", 0);

      /* "pyarrow/types.pxi":5060
 *         Field _field
 *         shared_ptr[CDataType] list_type
 *         LargeListType out = LargeListType.__new__(LargeListType)             # <<<<<<<<<<<<<<
 * 
 *     if isinstance(value_type, DataType):
*/
      __pyx_t_1 = ((PyObject *)__pyx_tp_new_7pyarrow_3lib_LargeListType(((PyTypeObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_LargeListType), __pyx_mstate_global->__pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5060, __pyx_L1_error)
      __Pyx_GOTREF((PyObject *)__pyx_t_1);
      __pyx_v_out = ((struct __pyx_obj_7pyarrow_3lib_LargeListType *)__pyx_t_1);
      __pyx_t_1 = 0;

      /* "pyarrow/types.pxi":5062
 *         LargeListType out = LargeListType.__new__(LargeListType)
 * 
 *     if isinstance(value_type, DataType):             # <<<<<<<<<<<<<<
 *         _field = field('item', value_type)
 *     elif isinstance(value_type, Field):
*/
      __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_value_type, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType); 
      if (__pyx_t_2) {

        /* "pyarrow/types.pxi":5063
 * 
 *     if isinstance(value_type, DataType):
 *         _field = field('item', value_type)             # <<<<<<<<<<<<<<
 *     elif isinstance(value_type, Field):
 *         _field = value_type
*/
        __pyx_t_3 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_field); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5063, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_mstate_global->__pyx_n_u_item, __pyx_v_value_type};
          __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5063, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
        }
        if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Field))))) __PYX_ERR(1, 5063, __pyx_L1_error)
        __pyx_v__field = ((struct __pyx_obj_7pyarrow_3lib_Field *)__pyx_t_1);
        __pyx_t_1 = 0;

        /* "pyarrow/types.pxi":5062
 *         LargeListType out = LargeListType.__new__(LargeListType)
 * 
 *     if isinstance(value_type, DataType):             # <<<<<<<<<<<<<<
 *         _field = field('item', value_type)
 *     elif isinstance(value_type, Field):
*/
        goto __pyx_L3;
      }

      /* "pyarrow/types.pxi":5064
 *     if isinstance(value_type, DataType):
 *         _field = field('item', value_type)
 *     elif isinstance(value_type, Field):             # <<<<<<<<<<<<<<
 *         _field = value_type
 *     else:
*/
      __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_value_type, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Field); 
      if (likely(__pyx_t_2)) {

        /* "pyarrow/types.pxi":5065
 *         _field = field('item', value_type)
 *     elif isinstance(value_type, Field):
 *         _field = value_type             # <<<<<<<<<<<<<<
 *     else:
 *         raise TypeError('List requires DataType or Field')
*/
        __pyx_t_1 = __pyx_v_value_type;
        __Pyx_INCREF(__pyx_t_1);
        if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Field))))) __PYX_ERR(1, 5065, __pyx_L1_error)
        __pyx_v__field = ((struct __pyx_obj_7pyarrow_3lib_Field *)__pyx_t_1);
        __pyx_t_1 = 0;

        /* "pyarrow/types.pxi":5064
 *     if isinstance(value_type, DataType):
 *         _field = field('item', value_type)
 *     elif isinstance(value_type, Field):             # <<<<<<<<<<<<<<
 *         _field = value_type
 *     else:
*/
        goto __pyx_L3;
      }

      /* "pyarrow/types.pxi":5067
 *         _field = value_type
 *     else:
 *         raise TypeError('List requires DataType or Field')             # <<<<<<<<<<<<<<
 * 
 *     list_type.reset(new CLargeListType(_field.sp_field))
*/
      /*else*/ {
        __pyx_t_4 = NULL;
        __pyx_t_5 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_List_requires_DataType_or_Field};
          __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5067, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
        }
        __Pyx_Raise(__pyx_t_1, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __PYX_ERR(1, 5067, __pyx_L1_error)
      }
      __pyx_L3:;

      /* "pyarrow/types.pxi":5069
 *         raise TypeError('List requires DataType or Field')
 * 
 *     list_type.reset(new CLargeListType(_field.sp_field))             # <<<<<<<<<<<<<<
 *     out.init(list_type)
 *     return out
*/
      if (unlikely(((PyObject *)__pyx_v__field) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_field");
        __PYX_ERR(1, 5069, __pyx_L1_error)
      }
      __pyx_v_list_type.reset(new  arrow::LargeListType(__pyx_v__field->sp_field));

      /* "pyarrow/types.pxi":5070
 * 
 *     list_type.reset(new CLargeListType(_field.sp_field))
 *     out.init(list_type)             # <<<<<<<<<<<<<<
 *     return out
 * 
*/
      if (unlikely(((PyObject *)__pyx_v_out) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "init");
        __PYX_ERR(1, 5070, __pyx_L1_error)
      }
      ((struct __pyx_vtabstruct_7pyarrow_3lib_LargeListType *)__pyx_v_out->__pyx_base.__pyx_vtab)->__pyx_base.init(((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_v_out), __pyx_v_list_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 5070, __pyx_L1_error)

      /* "pyarrow/types.pxi":5071
 *     list_type.reset(new CLargeListType(_field.sp_field))
 *     out.init(list_type)
 *     return out             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __Pyx_INCREF((PyObject *)__pyx_v_out);
      __pyx_r = __pyx_v_out;
      goto __pyx_L0;

      /* "pyarrow/types.pxi":5017
 * 
 * 
 * cpdef LargeListType large_list(value_type):             # <<<<<<<<<<<<<<
 *     """
 *     Create LargeListType instance from child data type or field.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_AddTraceback("pyarrow.lib.large_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = 0;
      __pyx_L0:;
      __Pyx_XDECREF((PyObject *)__pyx_v__field);
      __Pyx_XDECREF((PyObject *)__pyx_v_out);
      __Pyx_XGIVEREF((PyObject *)__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_143large_list(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_142large_list, "large_list(value_type) -> LargeListType\n\nCreate LargeListType instance from child data type or field.\n\nThis data type may not be supported by all Arrow implementations.\nUnless you need to represent data larger than 2**31 elements, you should\nprefer list_().\n\nParameters\n----------\nvalue_type : DataType or Field\n\nReturns\n-------\nlist_type : DataType\n\nExamples\n--------\nCreate an instance of LargeListType:\n\n>>> import pyarrow as pa\n>>> pa.large_list(pa.int8())\nLargeListType(large_list<item: int8>)\n\nUse the LargeListType to create an array:\n\n>>> pa.array([[-1, 3]] * 5, type=pa.large_list(pa.int8()))\n<pyarrow.lib.LargeListArray object at ...>\n[\n  [\n    -1,\n    3\n  ],\n  [\n    -1,\n    3\n  ],\n...");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_143large_list = {"large_list", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_143large_list, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_142large_list};
    static PyObject *__pyx_pw_7pyarrow_3lib_143large_list(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_value_type = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("large_list (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_value_type,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 5017, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 5017, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "large_list", 0) < (0)) __PYX_ERR(1, 5017, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("large_list", 1, 1, 1, i); __PYX_ERR(1, 5017, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 1)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 5017, __pyx_L3_error)
        }
        __pyx_v_value_type = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("large_list", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 5017, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.large_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_142large_list(__pyx_self, __pyx_v_value_type);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_142large_list(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_value_type) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("large_list", 0);
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = ((PyObject *)__pyx_f_7pyarrow_3lib_large_list(__pyx_v_value_type, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5017, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

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

    /* "pyarrow/types.pxi":5074
 * 
 * 
 * cpdef ListViewType list_view(value_type):             # <<<<<<<<<<<<<<
 *     """
 *     Create ListViewType instance from child data type or field.
*/

    static PyObject *__pyx_pw_7pyarrow_3lib_145list_view(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    static struct __pyx_obj_7pyarrow_3lib_ListViewType *__pyx_f_7pyarrow_3lib_list_view(PyObject *__pyx_v_value_type, CYTHON_UNUSED int __pyx_skip_dispatch) {
      struct __pyx_obj_7pyarrow_3lib_Field *__pyx_v__field = 0;
      std::shared_ptr< arrow::DataType>  __pyx_v_list_view_type;
      struct __pyx_obj_7pyarrow_3lib_ListViewType *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      int __pyx_t_1;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      size_t __pyx_t_5;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("list_view", 0);

      /* "pyarrow/types.pxi":5101
 *         shared_ptr[CDataType] list_view_type
 * 
 *     if isinstance(value_type, DataType):             # <<<<<<<<<<<<<<
 *         _field = field('item', value_type)
 *     elif isinstance(value_type, Field):
*/
      __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_value_type, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType); 
      if (__pyx_t_1) {

        /* "pyarrow/types.pxi":5102
 * 
 *     if isinstance(value_type, DataType):
 *         _field = field('item', value_type)             # <<<<<<<<<<<<<<
 *     elif isinstance(value_type, Field):
 *         _field = value_type
*/
        __pyx_t_3 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_field); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5102, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_mstate_global->__pyx_n_u_item, __pyx_v_value_type};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5102, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Field))))) __PYX_ERR(1, 5102, __pyx_L1_error)
        __pyx_v__field = ((struct __pyx_obj_7pyarrow_3lib_Field *)__pyx_t_2);
        __pyx_t_2 = 0;

        /* "pyarrow/types.pxi":5101
 *         shared_ptr[CDataType] list_view_type
 * 
 *     if isinstance(value_type, DataType):             # <<<<<<<<<<<<<<
 *         _field = field('item', value_type)
 *     elif isinstance(value_type, Field):
*/
        goto __pyx_L3;
      }

      /* "pyarrow/types.pxi":5103
 *     if isinstance(value_type, DataType):
 *         _field = field('item', value_type)
 *     elif isinstance(value_type, Field):             # <<<<<<<<<<<<<<
 *         _field = value_type
 *     else:
*/
      __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_value_type, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Field); 
      if (likely(__pyx_t_1)) {

        /* "pyarrow/types.pxi":5104
 *         _field = field('item', value_type)
 *     elif isinstance(value_type, Field):
 *         _field = value_type             # <<<<<<<<<<<<<<
 *     else:
 *         raise TypeError('ListView requires DataType or Field')
*/
        __pyx_t_2 = __pyx_v_value_type;
        __Pyx_INCREF(__pyx_t_2);
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Field))))) __PYX_ERR(1, 5104, __pyx_L1_error)
        __pyx_v__field = ((struct __pyx_obj_7pyarrow_3lib_Field *)__pyx_t_2);
        __pyx_t_2 = 0;

        /* "pyarrow/types.pxi":5103
 *     if isinstance(value_type, DataType):
 *         _field = field('item', value_type)
 *     elif isinstance(value_type, Field):             # <<<<<<<<<<<<<<
 *         _field = value_type
 *     else:
*/
        goto __pyx_L3;
      }

      /* "pyarrow/types.pxi":5106
 *         _field = value_type
 *     else:
 *         raise TypeError('ListView requires DataType or Field')             # <<<<<<<<<<<<<<
 * 
 *     list_view_type = CMakeListViewType(_field.sp_field)
*/
      /*else*/ {
        __pyx_t_4 = NULL;
        __pyx_t_5 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_ListView_requires_DataType_or_Fi};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5106, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __Pyx_Raise(__pyx_t_2, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __PYX_ERR(1, 5106, __pyx_L1_error)
      }
      __pyx_L3:;

      /* "pyarrow/types.pxi":5108
 *         raise TypeError('ListView requires DataType or Field')
 * 
 *     list_view_type = CMakeListViewType(_field.sp_field)             # <<<<<<<<<<<<<<
 *     return pyarrow_wrap_data_type(list_view_type)
 * 
*/
      if (unlikely(((PyObject *)__pyx_v__field) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_field");
        __PYX_ERR(1, 5108, __pyx_L1_error)
      }
      __pyx_v_list_view_type =  arrow::list_view(__pyx_v__field->sp_field);

      /* "pyarrow/types.pxi":5109
 * 
 *     list_view_type = CMakeListViewType(_field.sp_field)
 *     return pyarrow_wrap_data_type(list_view_type)             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_2 = pyarrow_wrap_data_type(__pyx_v_list_view_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5109, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ListViewType))))) __PYX_ERR(1, 5109, __pyx_L1_error)
      __pyx_r = ((struct __pyx_obj_7pyarrow_3lib_ListViewType *)__pyx_t_2);
      __pyx_t_2 = 0;
      goto __pyx_L0;

      /* "pyarrow/types.pxi":5074
 * 
 * 
 * cpdef ListViewType list_view(value_type):             # <<<<<<<<<<<<<<
 *     """
 *     Create ListViewType instance from child data type or field.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_AddTraceback("pyarrow.lib.list_view", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = 0;
      __pyx_L0:;
      __Pyx_XDECREF((PyObject *)__pyx_v__field);
      __Pyx_XGIVEREF((PyObject *)__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_145list_view(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_144list_view, "list_view(value_type) -> ListViewType\n\nCreate ListViewType instance from child data type or field.\n\nThis data type may not be supported by all Arrow implementations\nbecause it is an alternative to the ListType.\n\nParameters\n----------\nvalue_type : DataType or Field\n\nReturns\n-------\nlist_view_type : DataType\n\nExamples\n--------\nCreate an instance of ListViewType:\n\n>>> import pyarrow as pa\n>>> pa.list_view(pa.string())\nListViewType(list_view<item: string>)");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_145list_view = {"list_view", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_145list_view, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_144list_view};
    static PyObject *__pyx_pw_7pyarrow_3lib_145list_view(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_value_type = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("list_view (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_value_type,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 5074, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 5074, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "list_view", 0) < (0)) __PYX_ERR(1, 5074, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("list_view", 1, 1, 1, i); __PYX_ERR(1, 5074, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 1)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 5074, __pyx_L3_error)
        }
        __pyx_v_value_type = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("list_view", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 5074, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.list_view", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_144list_view(__pyx_self, __pyx_v_value_type);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_144list_view(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_value_type) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("list_view", 0);
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = ((PyObject *)__pyx_f_7pyarrow_3lib_list_view(__pyx_v_value_type, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5074, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

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

    /* "pyarrow/types.pxi":5112
 * 
 * 
 * cpdef LargeListViewType large_list_view(value_type):             # <<<<<<<<<<<<<<
 *     """
 *     Create LargeListViewType instance from child data type or field.
*/

    static PyObject *__pyx_pw_7pyarrow_3lib_147large_list_view(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    static struct __pyx_obj_7pyarrow_3lib_LargeListViewType *__pyx_f_7pyarrow_3lib_large_list_view(PyObject *__pyx_v_value_type, CYTHON_UNUSED int __pyx_skip_dispatch) {
      struct __pyx_obj_7pyarrow_3lib_Field *__pyx_v__field = 0;
      std::shared_ptr< arrow::DataType>  __pyx_v_list_view_type;
      struct __pyx_obj_7pyarrow_3lib_LargeListViewType *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      int __pyx_t_1;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      size_t __pyx_t_5;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("large_list_view", 0);

      /* "pyarrow/types.pxi":5139
 *         shared_ptr[CDataType] list_view_type
 * 
 *     if isinstance(value_type, DataType):             # <<<<<<<<<<<<<<
 *         _field = field('item', value_type)
 *     elif isinstance(value_type, Field):
*/
      __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_value_type, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType); 
      if (__pyx_t_1) {

        /* "pyarrow/types.pxi":5140
 * 
 *     if isinstance(value_type, DataType):
 *         _field = field('item', value_type)             # <<<<<<<<<<<<<<
 *     elif isinstance(value_type, Field):
 *         _field = value_type
*/
        __pyx_t_3 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_field); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5140, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_mstate_global->__pyx_n_u_item, __pyx_v_value_type};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5140, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Field))))) __PYX_ERR(1, 5140, __pyx_L1_error)
        __pyx_v__field = ((struct __pyx_obj_7pyarrow_3lib_Field *)__pyx_t_2);
        __pyx_t_2 = 0;

        /* "pyarrow/types.pxi":5139
 *         shared_ptr[CDataType] list_view_type
 * 
 *     if isinstance(value_type, DataType):             # <<<<<<<<<<<<<<
 *         _field = field('item', value_type)
 *     elif isinstance(value_type, Field):
*/
        goto __pyx_L3;
      }

      /* "pyarrow/types.pxi":5141
 *     if isinstance(value_type, DataType):
 *         _field = field('item', value_type)
 *     elif isinstance(value_type, Field):             # <<<<<<<<<<<<<<
 *         _field = value_type
 *     else:
*/
      __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_value_type, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Field); 
      if (likely(__pyx_t_1)) {

        /* "pyarrow/types.pxi":5142
 *         _field = field('item', value_type)
 *     elif isinstance(value_type, Field):
 *         _field = value_type             # <<<<<<<<<<<<<<
 *     else:
 *         raise TypeError('LargeListView requires DataType or Field')
*/
        __pyx_t_2 = __pyx_v_value_type;
        __Pyx_INCREF(__pyx_t_2);
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Field))))) __PYX_ERR(1, 5142, __pyx_L1_error)
        __pyx_v__field = ((struct __pyx_obj_7pyarrow_3lib_Field *)__pyx_t_2);
        __pyx_t_2 = 0;

        /* "pyarrow/types.pxi":5141
 *     if isinstance(value_type, DataType):
 *         _field = field('item', value_type)
 *     elif isinstance(value_type, Field):             # <<<<<<<<<<<<<<
 *         _field = value_type
 *     else:
*/
        goto __pyx_L3;
      }

      /* "pyarrow/types.pxi":5144
 *         _field = value_type
 *     else:
 *         raise TypeError('LargeListView requires DataType or Field')             # <<<<<<<<<<<<<<
 * 
 *     list_view_type = CMakeLargeListViewType(_field.sp_field)
*/
      /*else*/ {
        __pyx_t_4 = NULL;
        __pyx_t_5 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_LargeListView_requires_DataType};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5144, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __Pyx_Raise(__pyx_t_2, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __PYX_ERR(1, 5144, __pyx_L1_error)
      }
      __pyx_L3:;

      /* "pyarrow/types.pxi":5146
 *         raise TypeError('LargeListView requires DataType or Field')
 * 
 *     list_view_type = CMakeLargeListViewType(_field.sp_field)             # <<<<<<<<<<<<<<
 *     return pyarrow_wrap_data_type(list_view_type)
 * 
*/
      if (unlikely(((PyObject *)__pyx_v__field) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_field");
        __PYX_ERR(1, 5146, __pyx_L1_error)
      }
      __pyx_v_list_view_type =  arrow::large_list_view(__pyx_v__field->sp_field);

      /* "pyarrow/types.pxi":5147
 * 
 *     list_view_type = CMakeLargeListViewType(_field.sp_field)
 *     return pyarrow_wrap_data_type(list_view_type)             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_2 = pyarrow_wrap_data_type(__pyx_v_list_view_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5147, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_LargeListViewType))))) __PYX_ERR(1, 5147, __pyx_L1_error)
      __pyx_r = ((struct __pyx_obj_7pyarrow_3lib_LargeListViewType *)__pyx_t_2);
      __pyx_t_2 = 0;
      goto __pyx_L0;

      /* "pyarrow/types.pxi":5112
 * 
 * 
 * cpdef LargeListViewType large_list_view(value_type):             # <<<<<<<<<<<<<<
 *     """
 *     Create LargeListViewType instance from child data type or field.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_AddTraceback("pyarrow.lib.large_list_view", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = 0;
      __pyx_L0:;
      __Pyx_XDECREF((PyObject *)__pyx_v__field);
      __Pyx_XGIVEREF((PyObject *)__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_147large_list_view(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_146large_list_view, "large_list_view(value_type) -> LargeListViewType\n\nCreate LargeListViewType instance from child data type or field.\n\nThis data type may not be supported by all Arrow implementations\nbecause it is an alternative to the ListType.\n\nParameters\n----------\nvalue_type : DataType or Field\n\nReturns\n-------\nlist_view_type : DataType\n\nExamples\n--------\nCreate an instance of LargeListViewType:\n\n>>> import pyarrow as pa\n>>> pa.large_list_view(pa.int8())\nLargeListViewType(large_list_view<item: int8>)");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_147large_list_view = {"large_list_view", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_147large_list_view, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_146large_list_view};
    static PyObject *__pyx_pw_7pyarrow_3lib_147large_list_view(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_value_type = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("large_list_view (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_value_type,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 5112, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 5112, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "large_list_view", 0) < (0)) __PYX_ERR(1, 5112, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("large_list_view", 1, 1, 1, i); __PYX_ERR(1, 5112, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 1)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 5112, __pyx_L3_error)
        }
        __pyx_v_value_type = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("large_list_view", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 5112, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.large_list_view", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_146large_list_view(__pyx_self, __pyx_v_value_type);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_146large_list_view(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_value_type) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("large_list_view", 0);
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = ((PyObject *)__pyx_f_7pyarrow_3lib_large_list_view(__pyx_v_value_type, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5112, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

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

    /* "pyarrow/types.pxi":5150
 * 
 * 
 * cpdef MapType map_(key_type, item_type, keys_sorted=False):             # <<<<<<<<<<<<<<
 *     """
 *     Create MapType instance from key and item data types or fields.
*/

    static PyObject *__pyx_pw_7pyarrow_3lib_149map_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    static struct __pyx_obj_7pyarrow_3lib_MapType *__pyx_f_7pyarrow_3lib_map_(PyObject *__pyx_v_key_type, PyObject *__pyx_v_item_type, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_7pyarrow_3lib_map_ *__pyx_optional_args) {
      PyObject *__pyx_v_keys_sorted = ((PyObject *)Py_False);
      struct __pyx_obj_7pyarrow_3lib_Field *__pyx_v__key_field = 0;
      struct __pyx_obj_7pyarrow_3lib_Field *__pyx_v__item_field = 0;
      std::shared_ptr< arrow::DataType>  __pyx_v_map_type;
      struct __pyx_obj_7pyarrow_3lib_MapType *__pyx_v_out = 0;
      struct __pyx_obj_7pyarrow_3lib_MapType *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_t_2;
      PyObject *__pyx_t_3 = NULL;
      size_t __pyx_t_4;
      PyObject *__pyx_t_5 = NULL;
      PyObject *__pyx_t_6 = NULL;
      struct __pyx_opt_args_7pyarrow_3lib_ensure_type __pyx_t_7;
      PyObject *__pyx_t_8 = NULL;
      bool __pyx_t_9;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("map_", 0);
      if (__pyx_optional_args) {
        if (__pyx_optional_args->__pyx_n > 0) {
          __pyx_v_keys_sorted = __pyx_optional_args->keys_sorted;
        }
      }

      /* "pyarrow/types.pxi":5204
 *         Field _item_field
 *         shared_ptr[CDataType] map_type
 *         MapType out = MapType.__new__(MapType)             # <<<<<<<<<<<<<<
 * 
 *     if isinstance(key_type, Field):
*/
      __pyx_t_1 = ((PyObject *)__pyx_tp_new_7pyarrow_3lib_MapType(((PyTypeObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_MapType), __pyx_mstate_global->__pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5204, __pyx_L1_error)
      __Pyx_GOTREF((PyObject *)__pyx_t_1);
      __pyx_v_out = ((struct __pyx_obj_7pyarrow_3lib_MapType *)__pyx_t_1);
      __pyx_t_1 = 0;

      /* "pyarrow/types.pxi":5206
 *         MapType out = MapType.__new__(MapType)
 * 
 *     if isinstance(key_type, Field):             # <<<<<<<<<<<<<<
 *         if key_type.nullable:
 *             raise TypeError('Map key field should be non-nullable')
*/
      __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_key_type, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Field); 
      if (__pyx_t_2) {

        /* "pyarrow/types.pxi":5207
 * 
 *     if isinstance(key_type, Field):
 *         if key_type.nullable:             # <<<<<<<<<<<<<<
 *             raise TypeError('Map key field should be non-nullable')
 *         _key_field = key_type
*/
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_key_type, __pyx_mstate_global->__pyx_n_u_nullable); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5207, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(1, 5207, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (unlikely(__pyx_t_2)) {

          /* "pyarrow/types.pxi":5208
 *     if isinstance(key_type, Field):
 *         if key_type.nullable:
 *             raise TypeError('Map key field should be non-nullable')             # <<<<<<<<<<<<<<
 *         _key_field = key_type
 *     else:
*/
          __pyx_t_3 = NULL;
          __pyx_t_4 = 1;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Map_key_field_should_be_non_null};
            __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5208, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_1);
          }
          __Pyx_Raise(__pyx_t_1, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __PYX_ERR(1, 5208, __pyx_L1_error)

          /* "pyarrow/types.pxi":5207
 * 
 *     if isinstance(key_type, Field):
 *         if key_type.nullable:             # <<<<<<<<<<<<<<
 *             raise TypeError('Map key field should be non-nullable')
 *         _key_field = key_type
*/
        }

        /* "pyarrow/types.pxi":5209
 *         if key_type.nullable:
 *             raise TypeError('Map key field should be non-nullable')
 *         _key_field = key_type             # <<<<<<<<<<<<<<
 *     else:
 *         _key_field = field('key', ensure_type(key_type, allow_none=False),
*/
        __pyx_t_1 = __pyx_v_key_type;
        __Pyx_INCREF(__pyx_t_1);
        if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Field))))) __PYX_ERR(1, 5209, __pyx_L1_error)
        __pyx_v__key_field = ((struct __pyx_obj_7pyarrow_3lib_Field *)__pyx_t_1);
        __pyx_t_1 = 0;

        /* "pyarrow/types.pxi":5206
 *         MapType out = MapType.__new__(MapType)
 * 
 *     if isinstance(key_type, Field):             # <<<<<<<<<<<<<<
 *         if key_type.nullable:
 *             raise TypeError('Map key field should be non-nullable')
*/
        goto __pyx_L3;
      }

      /* "pyarrow/types.pxi":5211
 *         _key_field = key_type
 *     else:
 *         _key_field = field('key', ensure_type(key_type, allow_none=False),             # <<<<<<<<<<<<<<
 *                            nullable=False)
 * 
*/
      /*else*/ {
        __pyx_t_3 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_field); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 5211, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_7.__pyx_n = 1;
        __pyx_t_7.allow_none = 0;
        __pyx_t_6 = ((PyObject *)__pyx_f_7pyarrow_3lib_ensure_type(__pyx_v_key_type, 0, &__pyx_t_7)); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 5211, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);

        /* "pyarrow/types.pxi":5212
 *     else:
 *         _key_field = field('key', ensure_type(key_type, allow_none=False),
 *                            nullable=False)             # <<<<<<<<<<<<<<
 * 
 *     if isinstance(item_type, Field):
*/
        __pyx_t_4 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
          __pyx_t_4 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[3 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_3, __pyx_mstate_global->__pyx_n_u_key, __pyx_t_6};
          __pyx_t_8 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 5211, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_nullable, Py_False, __pyx_t_8, __pyx_callargs+3, 0) < (0)) __PYX_ERR(1, 5211, __pyx_L1_error)
          __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_8);
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5211, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
        }

        /* "pyarrow/types.pxi":5211
 *         _key_field = key_type
 *     else:
 *         _key_field = field('key', ensure_type(key_type, allow_none=False),             # <<<<<<<<<<<<<<
 *                            nullable=False)
 * 
*/
        if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Field))))) __PYX_ERR(1, 5211, __pyx_L1_error)
        __pyx_v__key_field = ((struct __pyx_obj_7pyarrow_3lib_Field *)__pyx_t_1);
        __pyx_t_1 = 0;
      }
      __pyx_L3:;

      /* "pyarrow/types.pxi":5214
 *                            nullable=False)
 * 
 *     if isinstance(item_type, Field):             # <<<<<<<<<<<<<<
 *         _item_field = item_type
 *     else:
*/
      __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_item_type, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Field); 
      if (__pyx_t_2) {

        /* "pyarrow/types.pxi":5215
 * 
 *     if isinstance(item_type, Field):
 *         _item_field = item_type             # <<<<<<<<<<<<<<
 *     else:
 *         _item_field = field('value', ensure_type(item_type, allow_none=False))
*/
        __pyx_t_1 = __pyx_v_item_type;
        __Pyx_INCREF(__pyx_t_1);
        if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Field))))) __PYX_ERR(1, 5215, __pyx_L1_error)
        __pyx_v__item_field = ((struct __pyx_obj_7pyarrow_3lib_Field *)__pyx_t_1);
        __pyx_t_1 = 0;

        /* "pyarrow/types.pxi":5214
 *                            nullable=False)
 * 
 *     if isinstance(item_type, Field):             # <<<<<<<<<<<<<<
 *         _item_field = item_type
 *     else:
*/
        goto __pyx_L5;
      }

      /* "pyarrow/types.pxi":5217
 *         _item_field = item_type
 *     else:
 *         _item_field = field('value', ensure_type(item_type, allow_none=False))             # <<<<<<<<<<<<<<
 * 
 *     map_type.reset(new CMapType(_key_field.sp_field, _item_field.sp_field,
*/
      /*else*/ {
        __pyx_t_5 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_field); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 5217, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_7.__pyx_n = 1;
        __pyx_t_7.allow_none = 0;
        __pyx_t_6 = ((PyObject *)__pyx_f_7pyarrow_3lib_ensure_type(__pyx_v_item_type, 0, &__pyx_t_7)); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 5217, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_4 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_8))) {
          __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_8);
          assert(__pyx_t_5);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8);
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_8, __pyx__function);
          __pyx_t_4 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_mstate_global->__pyx_n_u_value, __pyx_t_6};
          __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5217, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
        }
        if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Field))))) __PYX_ERR(1, 5217, __pyx_L1_error)
        __pyx_v__item_field = ((struct __pyx_obj_7pyarrow_3lib_Field *)__pyx_t_1);
        __pyx_t_1 = 0;
      }
      __pyx_L5:;

      /* "pyarrow/types.pxi":5219
 *         _item_field = field('value', ensure_type(item_type, allow_none=False))
 * 
 *     map_type.reset(new CMapType(_key_field.sp_field, _item_field.sp_field,             # <<<<<<<<<<<<<<
 *                                 keys_sorted))
 *     out.init(map_type)
*/
      if (unlikely(((PyObject *)__pyx_v__key_field) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_field");
        __PYX_ERR(1, 5219, __pyx_L1_error)
      }
      if (unlikely(((PyObject *)__pyx_v__item_field) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_field");
        __PYX_ERR(1, 5219, __pyx_L1_error)
      }

      /* "pyarrow/types.pxi":5220
 * 
 *     map_type.reset(new CMapType(_key_field.sp_field, _item_field.sp_field,
 *                                 keys_sorted))             # <<<<<<<<<<<<<<
 *     out.init(map_type)
 *     return out
*/
      __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_keys_sorted); if (unlikely((__pyx_t_9 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(1, 5220, __pyx_L1_error)

      /* "pyarrow/types.pxi":5219
 *         _item_field = field('value', ensure_type(item_type, allow_none=False))
 * 
 *     map_type.reset(new CMapType(_key_field.sp_field, _item_field.sp_field,             # <<<<<<<<<<<<<<
 *                                 keys_sorted))
 *     out.init(map_type)
*/
      __pyx_v_map_type.reset(new  arrow::MapType(__pyx_v__key_field->sp_field, __pyx_v__item_field->sp_field, __pyx_t_9));

      /* "pyarrow/types.pxi":5221
 *     map_type.reset(new CMapType(_key_field.sp_field, _item_field.sp_field,
 *                                 keys_sorted))
 *     out.init(map_type)             # <<<<<<<<<<<<<<
 *     return out
 * 
*/
      if (unlikely(((PyObject *)__pyx_v_out) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "init");
        __PYX_ERR(1, 5221, __pyx_L1_error)
      }
      ((struct __pyx_vtabstruct_7pyarrow_3lib_MapType *)__pyx_v_out->__pyx_base.__pyx_vtab)->__pyx_base.init(((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_v_out), __pyx_v_map_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 5221, __pyx_L1_error)

      /* "pyarrow/types.pxi":5222
 *                                 keys_sorted))
 *     out.init(map_type)
 *     return out             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __Pyx_INCREF((PyObject *)__pyx_v_out);
      __pyx_r = __pyx_v_out;
      goto __pyx_L0;

      /* "pyarrow/types.pxi":5150
 * 
 * 
 * cpdef MapType map_(key_type, item_type, keys_sorted=False):             # <<<<<<<<<<<<<<
 *     """
 *     Create MapType instance from key and item data types or fields.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_8);
      __Pyx_AddTraceback("pyarrow.lib.map_", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = 0;
      __pyx_L0:;
      __Pyx_XDECREF((PyObject *)__pyx_v__key_field);
      __Pyx_XDECREF((PyObject *)__pyx_v__item_field);
      __Pyx_XDECREF((PyObject *)__pyx_v_out);
      __Pyx_XGIVEREF((PyObject *)__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_149map_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_148map_, "map_(key_type, item_type, keys_sorted=False) -> MapType\n\nCreate MapType instance from key and item data types or fields.\n\nParameters\n----------\nkey_type : DataType or Field\nitem_type : DataType or Field\nkeys_sorted : bool\n\nReturns\n-------\nmap_type : DataType\n\nExamples\n--------\nCreate an instance of MapType:\n\n>>> import pyarrow as pa\n>>> pa.map_(pa.string(), pa.int32())\nMapType(map<string, int32>)\n>>> pa.map_(pa.string(), pa.int32(), keys_sorted=True)\nMapType(map<string, int32, keys_sorted>)\n\nUse MapType to create an array:\n\n>>> data = [[{'key': 'a', 'value': 1}, {'key': 'b', 'value': 2}], [{'key': 'c', 'value': 3}]]\n>>> pa.array(data, type=pa.map_(pa.string(), pa.int32(), keys_sorted=True))\n<pyarrow.lib.MapArray object at ...>\n[\n  keys:\n  [\n    \"a\",\n    \"b\"\n  ]\n  values:\n  [\n    1,\n    2\n  ],\n  keys:\n  [\n    \"c\"\n  ]\n  values:\n  [\n    3\n  ]\n]");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_149map_ = {"map_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_149map_, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_148map_};
    static PyObject *__pyx_pw_7pyarrow_3lib_149map_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_key_type = 0;
      PyObject *__pyx_v_item_type = 0;
      PyObject *__pyx_v_keys_sorted = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[3] = {0,0,0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("map_ (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_key_type,&__pyx_mstate_global->__pyx_n_u_item_type,&__pyx_mstate_global->__pyx_n_u_keys_sorted,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 5150, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  3:
            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 5150, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 5150, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 5150, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "map_", 0) < (0)) __PYX_ERR(1, 5150, __pyx_L3_error)
          if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_False));
          for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("map_", 0, 2, 3, i); __PYX_ERR(1, 5150, __pyx_L3_error) }
          }
        } else {
          switch (__pyx_nargs) {
            case  3:
            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 5150, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 5150, __pyx_L3_error)
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 5150, __pyx_L3_error)
            break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_False));
        }
        __pyx_v_key_type = values[0];
        __pyx_v_item_type = values[1];
        __pyx_v_keys_sorted = values[2];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("map_", 0, 2, 3, __pyx_nargs); __PYX_ERR(1, 5150, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.map_", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_148map_(__pyx_self, __pyx_v_key_type, __pyx_v_item_type, __pyx_v_keys_sorted);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_148map_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_key_type, PyObject *__pyx_v_item_type, PyObject *__pyx_v_keys_sorted) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      struct __pyx_opt_args_7pyarrow_3lib_map_ __pyx_t_2;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("map_", 0);
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2.__pyx_n = 1;
      __pyx_t_2.keys_sorted = __pyx_v_keys_sorted;
      __pyx_t_1 = ((PyObject *)__pyx_f_7pyarrow_3lib_map_(__pyx_v_key_type, __pyx_v_item_type, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5150, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

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

    /* "pyarrow/types.pxi":5225
 * 
 * 
 * cpdef DictionaryType dictionary(index_type, value_type, bint ordered=False):             # <<<<<<<<<<<<<<
 *     """
 *     Dictionary (categorical, or simply encoded) type.
*/

    static PyObject *__pyx_pw_7pyarrow_3lib_151dictionary(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    static struct __pyx_obj_7pyarrow_3lib_DictionaryType *__pyx_f_7pyarrow_3lib_dictionary(PyObject *__pyx_v_index_type, PyObject *__pyx_v_value_type, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_7pyarrow_3lib_dictionary *__pyx_optional_args) {
      int __pyx_v_ordered = ((int)0);
      struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v__index_type = 0;
      struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v__value_type = 0;
      struct __pyx_obj_7pyarrow_3lib_DictionaryType *__pyx_v_out = 0;
      std::shared_ptr< arrow::DataType>  __pyx_v_dict_type;
      struct __pyx_obj_7pyarrow_3lib_DictionaryType *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      struct __pyx_opt_args_7pyarrow_3lib_ensure_type __pyx_t_2;
      int __pyx_t_3;
      PyObject *__pyx_t_4 = NULL;
      PyObject *__pyx_t_5 = NULL;
      int __pyx_t_6;
      size_t __pyx_t_7;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("dictionary", 0);
      if (__pyx_optional_args) {
        if (__pyx_optional_args->__pyx_n > 0) {
          __pyx_v_ordered = __pyx_optional_args->ordered;
        }
      }

      /* "pyarrow/types.pxi":5267
 *     """
 *     cdef:
 *         DataType _index_type = ensure_type(index_type, allow_none=False)             # <<<<<<<<<<<<<<
 *         DataType _value_type = ensure_type(value_type, allow_none=False)
 *         DictionaryType out = DictionaryType.__new__(DictionaryType)
*/
      __pyx_t_2.__pyx_n = 1;
      __pyx_t_2.allow_none = 0;
      __pyx_t_1 = ((PyObject *)__pyx_f_7pyarrow_3lib_ensure_type(__pyx_v_index_type, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5267, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_v__index_type = ((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_t_1);
      __pyx_t_1 = 0;

      /* "pyarrow/types.pxi":5268
 *     cdef:
 *         DataType _index_type = ensure_type(index_type, allow_none=False)
 *         DataType _value_type = ensure_type(value_type, allow_none=False)             # <<<<<<<<<<<<<<
 *         DictionaryType out = DictionaryType.__new__(DictionaryType)
 *         shared_ptr[CDataType] dict_type
*/
      __pyx_t_2.__pyx_n = 1;
      __pyx_t_2.allow_none = 0;
      __pyx_t_1 = ((PyObject *)__pyx_f_7pyarrow_3lib_ensure_type(__pyx_v_value_type, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5268, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_v__value_type = ((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_t_1);
      __pyx_t_1 = 0;

      /* "pyarrow/types.pxi":5269
 *         DataType _index_type = ensure_type(index_type, allow_none=False)
 *         DataType _value_type = ensure_type(value_type, allow_none=False)
 *         DictionaryType out = DictionaryType.__new__(DictionaryType)             # <<<<<<<<<<<<<<
 *         shared_ptr[CDataType] dict_type
 * 
*/
      __pyx_t_1 = ((PyObject *)__pyx_tp_new_7pyarrow_3lib_DictionaryType(((PyTypeObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DictionaryType), __pyx_mstate_global->__pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5269, __pyx_L1_error)
      __Pyx_GOTREF((PyObject *)__pyx_t_1);
      __pyx_v_out = ((struct __pyx_obj_7pyarrow_3lib_DictionaryType *)__pyx_t_1);
      __pyx_t_1 = 0;

      /* "pyarrow/types.pxi":5272
 *         shared_ptr[CDataType] dict_type
 * 
 *     if _index_type.id not in {             # <<<<<<<<<<<<<<
 *         Type_INT8, Type_INT16, Type_INT32, Type_INT64,
 *         Type_UINT8, Type_UINT16, Type_UINT32, Type_UINT64,
*/
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v__index_type), __pyx_mstate_global->__pyx_n_u_id); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5272, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);

      /* "pyarrow/types.pxi":5273
 * 
 *     if _index_type.id not in {
 *         Type_INT8, Type_INT16, Type_INT32, Type_INT64,             # <<<<<<<<<<<<<<
 *         Type_UINT8, Type_UINT16, Type_UINT32, Type_UINT64,
 *     }:
*/
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Type_INT8); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5273, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = PyObject_RichCompare(__pyx_t_1, __pyx_t_4, Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 5272, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "pyarrow/types.pxi":5272
 *         shared_ptr[CDataType] dict_type
 * 
 *     if _index_type.id not in {             # <<<<<<<<<<<<<<
 *         Type_INT8, Type_INT16, Type_INT32, Type_INT64,
 *         Type_UINT8, Type_UINT16, Type_UINT32, Type_UINT64,
*/
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(1, 5272, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (__pyx_t_6) {
      } else {
        __pyx_t_3 = __pyx_t_6;
        goto __pyx_L4_bool_binop_done;
      }

      /* "pyarrow/types.pxi":5273
 * 
 *     if _index_type.id not in {
 *         Type_INT8, Type_INT16, Type_INT32, Type_INT64,             # <<<<<<<<<<<<<<
 *         Type_UINT8, Type_UINT16, Type_UINT32, Type_UINT64,
 *     }:
*/
      __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_Type_INT16); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 5273, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_5, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5272, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "pyarrow/types.pxi":5272
 *         shared_ptr[CDataType] dict_type
 * 
 *     if _index_type.id not in {             # <<<<<<<<<<<<<<
 *         Type_INT8, Type_INT16, Type_INT32, Type_INT64,
 *         Type_UINT8, Type_UINT16, Type_UINT32, Type_UINT64,
*/
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(1, 5272, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (__pyx_t_6) {
      } else {
        __pyx_t_3 = __pyx_t_6;
        goto __pyx_L4_bool_binop_done;
      }

      /* "pyarrow/types.pxi":5273
 * 
 *     if _index_type.id not in {
 *         Type_INT8, Type_INT16, Type_INT32, Type_INT64,             # <<<<<<<<<<<<<<
 *         Type_UINT8, Type_UINT16, Type_UINT32, Type_UINT64,
 *     }:
*/
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Type_INT32); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5273, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = PyObject_RichCompare(__pyx_t_1, __pyx_t_4, Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 5272, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "pyarrow/types.pxi":5272
 *         shared_ptr[CDataType] dict_type
 * 
 *     if _index_type.id not in {             # <<<<<<<<<<<<<<
 *         Type_INT8, Type_INT16, Type_INT32, Type_INT64,
 *         Type_UINT8, Type_UINT16, Type_UINT32, Type_UINT64,
*/
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(1, 5272, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (__pyx_t_6) {
      } else {
        __pyx_t_3 = __pyx_t_6;
        goto __pyx_L4_bool_binop_done;
      }

      /* "pyarrow/types.pxi":5273
 * 
 *     if _index_type.id not in {
 *         Type_INT8, Type_INT16, Type_INT32, Type_INT64,             # <<<<<<<<<<<<<<
 *         Type_UINT8, Type_UINT16, Type_UINT32, Type_UINT64,
 *     }:
*/
      __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_Type_INT64); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 5273, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_5, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5272, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "pyarrow/types.pxi":5272
 *         shared_ptr[CDataType] dict_type
 * 
 *     if _index_type.id not in {             # <<<<<<<<<<<<<<
 *         Type_INT8, Type_INT16, Type_INT32, Type_INT64,
 *         Type_UINT8, Type_UINT16, Type_UINT32, Type_UINT64,
*/
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(1, 5272, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (__pyx_t_6) {
      } else {
        __pyx_t_3 = __pyx_t_6;
        goto __pyx_L4_bool_binop_done;
      }

      /* "pyarrow/types.pxi":5274
 *     if _index_type.id not in {
 *         Type_INT8, Type_INT16, Type_INT32, Type_INT64,
 *         Type_UINT8, Type_UINT16, Type_UINT32, Type_UINT64,             # <<<<<<<<<<<<<<
 *     }:
 *         raise TypeError("The dictionary index type should be integer.")
*/
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Type_UINT8); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5274, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = PyObject_RichCompare(__pyx_t_1, __pyx_t_4, Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 5272, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "pyarrow/types.pxi":5272
 *         shared_ptr[CDataType] dict_type
 * 
 *     if _index_type.id not in {             # <<<<<<<<<<<<<<
 *         Type_INT8, Type_INT16, Type_INT32, Type_INT64,
 *         Type_UINT8, Type_UINT16, Type_UINT32, Type_UINT64,
*/
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(1, 5272, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (__pyx_t_6) {
      } else {
        __pyx_t_3 = __pyx_t_6;
        goto __pyx_L4_bool_binop_done;
      }

      /* "pyarrow/types.pxi":5274
 *     if _index_type.id not in {
 *         Type_INT8, Type_INT16, Type_INT32, Type_INT64,
 *         Type_UINT8, Type_UINT16, Type_UINT32, Type_UINT64,             # <<<<<<<<<<<<<<
 *     }:
 *         raise TypeError("The dictionary index type should be integer.")
*/
      __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_Type_UINT16); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 5274, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_5, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5272, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "pyarrow/types.pxi":5272
 *         shared_ptr[CDataType] dict_type
 * 
 *     if _index_type.id not in {             # <<<<<<<<<<<<<<
 *         Type_INT8, Type_INT16, Type_INT32, Type_INT64,
 *         Type_UINT8, Type_UINT16, Type_UINT32, Type_UINT64,
*/
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(1, 5272, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (__pyx_t_6) {
      } else {
        __pyx_t_3 = __pyx_t_6;
        goto __pyx_L4_bool_binop_done;
      }

      /* "pyarrow/types.pxi":5274
 *     if _index_type.id not in {
 *         Type_INT8, Type_INT16, Type_INT32, Type_INT64,
 *         Type_UINT8, Type_UINT16, Type_UINT32, Type_UINT64,             # <<<<<<<<<<<<<<
 *     }:
 *         raise TypeError("The dictionary index type should be integer.")
*/
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Type_UINT32); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5274, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = PyObject_RichCompare(__pyx_t_1, __pyx_t_4, Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 5272, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "pyarrow/types.pxi":5272
 *         shared_ptr[CDataType] dict_type
 * 
 *     if _index_type.id not in {             # <<<<<<<<<<<<<<
 *         Type_INT8, Type_INT16, Type_INT32, Type_INT64,
 *         Type_UINT8, Type_UINT16, Type_UINT32, Type_UINT64,
*/
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(1, 5272, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (__pyx_t_6) {
      } else {
        __pyx_t_3 = __pyx_t_6;
        goto __pyx_L4_bool_binop_done;
      }

      /* "pyarrow/types.pxi":5274
 *     if _index_type.id not in {
 *         Type_INT8, Type_INT16, Type_INT32, Type_INT64,
 *         Type_UINT8, Type_UINT16, Type_UINT32, Type_UINT64,             # <<<<<<<<<<<<<<
 *     }:
 *         raise TypeError("The dictionary index type should be integer.")
*/
      __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_Type_UINT64); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 5274, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_5, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5272, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "pyarrow/types.pxi":5272
 *         shared_ptr[CDataType] dict_type
 * 
 *     if _index_type.id not in {             # <<<<<<<<<<<<<<
 *         Type_INT8, Type_INT16, Type_INT32, Type_INT64,
 *         Type_UINT8, Type_UINT16, Type_UINT32, Type_UINT64,
*/
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(1, 5272, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_3 = __pyx_t_6;
      __pyx_L4_bool_binop_done:;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_6 = __pyx_t_3;
      if (unlikely(__pyx_t_6)) {

        /* "pyarrow/types.pxi":5276
 *         Type_UINT8, Type_UINT16, Type_UINT32, Type_UINT64,
 *     }:
 *         raise TypeError("The dictionary index type should be integer.")             # <<<<<<<<<<<<<<
 * 
 *     dict_type.reset(new CDictionaryType(_index_type.sp_type,
*/
        __pyx_t_4 = NULL;
        __pyx_t_7 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_The_dictionary_index_type_should};
          __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5276, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
        }
        __Pyx_Raise(__pyx_t_1, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __PYX_ERR(1, 5276, __pyx_L1_error)

        /* "pyarrow/types.pxi":5272
 *         shared_ptr[CDataType] dict_type
 * 
 *     if _index_type.id not in {             # <<<<<<<<<<<<<<
 *         Type_INT8, Type_INT16, Type_INT32, Type_INT64,
 *         Type_UINT8, Type_UINT16, Type_UINT32, Type_UINT64,
*/
      }

      /* "pyarrow/types.pxi":5278
 *         raise TypeError("The dictionary index type should be integer.")
 * 
 *     dict_type.reset(new CDictionaryType(_index_type.sp_type,             # <<<<<<<<<<<<<<
 *                                         _value_type.sp_type, ordered == 1))
 *     out.init(dict_type)
*/
      if (unlikely(((PyObject *)__pyx_v__index_type) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_type");
        __PYX_ERR(1, 5278, __pyx_L1_error)
      }

      /* "pyarrow/types.pxi":5279
 * 
 *     dict_type.reset(new CDictionaryType(_index_type.sp_type,
 *                                         _value_type.sp_type, ordered == 1))             # <<<<<<<<<<<<<<
 *     out.init(dict_type)
 *     return out
*/
      if (unlikely(((PyObject *)__pyx_v__value_type) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_type");
        __PYX_ERR(1, 5279, __pyx_L1_error)
      }

      /* "pyarrow/types.pxi":5278
 *         raise TypeError("The dictionary index type should be integer.")
 * 
 *     dict_type.reset(new CDictionaryType(_index_type.sp_type,             # <<<<<<<<<<<<<<
 *                                         _value_type.sp_type, ordered == 1))
 *     out.init(dict_type)
*/
      __pyx_v_dict_type.reset(new  arrow::DictionaryType(__pyx_v__index_type->sp_type, __pyx_v__value_type->sp_type, (__pyx_v_ordered == 1)));

      /* "pyarrow/types.pxi":5280
 *     dict_type.reset(new CDictionaryType(_index_type.sp_type,
 *                                         _value_type.sp_type, ordered == 1))
 *     out.init(dict_type)             # <<<<<<<<<<<<<<
 *     return out
 * 
*/
      if (unlikely(((PyObject *)__pyx_v_out) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "init");
        __PYX_ERR(1, 5280, __pyx_L1_error)
      }
      ((struct __pyx_vtabstruct_7pyarrow_3lib_DictionaryType *)__pyx_v_out->__pyx_base.__pyx_vtab)->__pyx_base.init(((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_v_out), __pyx_v_dict_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 5280, __pyx_L1_error)

      /* "pyarrow/types.pxi":5281
 *                                         _value_type.sp_type, ordered == 1))
 *     out.init(dict_type)
 *     return out             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __Pyx_INCREF((PyObject *)__pyx_v_out);
      __pyx_r = __pyx_v_out;
      goto __pyx_L0;

      /* "pyarrow/types.pxi":5225
 * 
 * 
 * cpdef DictionaryType dictionary(index_type, value_type, bint ordered=False):             # <<<<<<<<<<<<<<
 *     """
 *     Dictionary (categorical, or simply encoded) type.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_AddTraceback("pyarrow.lib.dictionary", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = 0;
      __pyx_L0:;
      __Pyx_XDECREF((PyObject *)__pyx_v__index_type);
      __Pyx_XDECREF((PyObject *)__pyx_v__value_type);
      __Pyx_XDECREF((PyObject *)__pyx_v_out);
      __Pyx_XGIVEREF((PyObject *)__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_151dictionary(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_150dictionary, "dictionary(index_type, value_type, bool ordered=False) -> DictionaryType\n\nDictionary (categorical, or simply encoded) type.\n\nParameters\n----------\nindex_type : DataType\nvalue_type : DataType\nordered : bool\n\nReturns\n-------\ntype : DictionaryType\n\nExamples\n--------\nCreate an instance of dictionary type:\n\n>>> import pyarrow as pa\n>>> pa.dictionary(pa.int64(), pa.utf8())\nDictionaryType(dictionary<values=string, indices=int64, ordered=0>)\n\nUse dictionary type to create an array:\n\n>>> pa.array([\"a\", \"b\", None, \"d\"], pa.dictionary(pa.int64(), pa.utf8()))\n<pyarrow.lib.DictionaryArray object at ...>\n...\n-- dictionary:\n  [\n    \"a\",\n    \"b\",\n    \"d\"\n  ]\n-- indices:\n  [\n    0,\n    1,\n    null,\n    2\n  ]");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_151dictionary = {"dictionary", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_151dictionary, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_150dictionary};
    static PyObject *__pyx_pw_7pyarrow_3lib_151dictionary(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_index_type = 0;
      PyObject *__pyx_v_value_type = 0;
      int __pyx_v_ordered;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[3] = {0,0,0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("dictionary (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_index_type,&__pyx_mstate_global->__pyx_n_u_value_type,&__pyx_mstate_global->__pyx_n_u_ordered,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 5225, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  3:
            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 5225, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 5225, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 5225, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "dictionary", 0) < (0)) __PYX_ERR(1, 5225, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("dictionary", 0, 2, 3, i); __PYX_ERR(1, 5225, __pyx_L3_error) }
          }
        } else {
          switch (__pyx_nargs) {
            case  3:
            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 5225, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 5225, __pyx_L3_error)
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 5225, __pyx_L3_error)
            break;
            default: goto __pyx_L5_argtuple_error;
          }
        }
        __pyx_v_index_type = values[0];
        __pyx_v_value_type = values[1];
        if (values[2]) {
          __pyx_v_ordered = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_ordered == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 5225, __pyx_L3_error)
        } else {
          __pyx_v_ordered = ((int)0);
        }
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("dictionary", 0, 2, 3, __pyx_nargs); __PYX_ERR(1, 5225, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.dictionary", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_150dictionary(__pyx_self, __pyx_v_index_type, __pyx_v_value_type, __pyx_v_ordered);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_150dictionary(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_index_type, PyObject *__pyx_v_value_type, int __pyx_v_ordered) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      struct __pyx_opt_args_7pyarrow_3lib_dictionary __pyx_t_2;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("dictionary", 0);
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2.__pyx_n = 1;
      __pyx_t_2.ordered = __pyx_v_ordered;
      __pyx_t_1 = ((PyObject *)__pyx_f_7pyarrow_3lib_dictionary(__pyx_v_index_type, __pyx_v_value_type, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5225, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

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

    /* "pyarrow/types.pxi":5284
 * 
 * 
 * def struct(fields):             # <<<<<<<<<<<<<<
 *     """
 *     Create StructType instance from fields.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_153struct(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_152struct, "struct(fields)\n\nCreate StructType instance from fields.\n\nA struct is a nested type parameterized by an ordered sequence of types\n(which can all be distinct), called its fields.\n\nParameters\n----------\nfields : iterable of Fields or tuples, or mapping of strings to DataTypes\n    Each field must have a UTF8-encoded name, and these field names are\n    part of the type metadata.\n\nExamples\n--------\nCreate an instance of StructType from an iterable of tuples:\n\n>>> import pyarrow as pa\n>>> fields = [\n...     ('f1', pa.int32()),\n...     ('f2', pa.string()),\n... ]\n>>> struct_type = pa.struct(fields)\n>>> struct_type\nStructType(struct<f1: int32, f2: string>)\n\nRetrieve a field from a StructType:\n\n>>> struct_type[0]\npyarrow.Field<f1: int32>\n>>> struct_type['f1']\npyarrow.Field<f1: int32>\n\nCreate an instance of StructType from an iterable of Fields:\n\n>>> fields = [\n...     pa.field('f1', pa.int32()),\n...     pa.field('f2', pa.string(), nullable=False),\n... ]\n>>> pa.struct(fields)\nStructType(struct<f1: int32, f2: string not null>)\n\nReturns\n-------\ntype : DataType");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_153struct = {"struct", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_153struct, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_152struct};
    static PyObject *__pyx_pw_7pyarrow_3lib_153struct(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_fields = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("struct (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_fields,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 5284, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 5284, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "struct", 0) < (0)) __PYX_ERR(1, 5284, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("struct", 1, 1, 1, i); __PYX_ERR(1, 5284, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 1)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 5284, __pyx_L3_error)
        }
        __pyx_v_fields = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("struct", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 5284, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.struct", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_152struct(__pyx_self, __pyx_v_fields);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_152struct(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_fields) {
      struct __pyx_obj_7pyarrow_3lib_Field *__pyx_v_py_field = 0;
      std::vector<std::shared_ptr< arrow::Field> >  __pyx_v_c_fields;
      std::shared_ptr< arrow::DataType>  __pyx_v_struct_type;
      PyObject *__pyx_v_item = NULL;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_t_2;
      PyObject *__pyx_t_3 = NULL;
      size_t __pyx_t_4;
      Py_ssize_t __pyx_t_5;
      PyObject *(*__pyx_t_6)(PyObject *);
      PyObject *__pyx_t_7 = NULL;
      PyObject *__pyx_t_8 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("struct", 0);
      __Pyx_INCREF(__pyx_v_fields);

      /* "pyarrow/types.pxi":5335
 *         cdef shared_ptr[CDataType] struct_type
 * 
 *     if isinstance(fields, Mapping):             # <<<<<<<<<<<<<<
 *         fields = fields.items()
 * 
*/
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_Mapping); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5335, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = PyObject_IsInstance(__pyx_v_fields, __pyx_t_1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(1, 5335, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (__pyx_t_2) {

        /* "pyarrow/types.pxi":5336
 * 
 *     if isinstance(fields, Mapping):
 *         fields = fields.items()             # <<<<<<<<<<<<<<
 * 
 *     for item in fields:
*/
        __pyx_t_3 = __pyx_v_fields;
        __Pyx_INCREF(__pyx_t_3);
        __pyx_t_4 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
          __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_items, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5336, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
        }
        __Pyx_DECREF_SET(__pyx_v_fields, __pyx_t_1);
        __pyx_t_1 = 0;

        /* "pyarrow/types.pxi":5335
 *         cdef shared_ptr[CDataType] struct_type
 * 
 *     if isinstance(fields, Mapping):             # <<<<<<<<<<<<<<
 *         fields = fields.items()
 * 
*/
      }

      /* "pyarrow/types.pxi":5338
 *         fields = fields.items()
 * 
 *     for item in fields:             # <<<<<<<<<<<<<<
 *         if isinstance(item, tuple):
 *             py_field = field(*item)
*/
      if (likely(PyList_CheckExact(__pyx_v_fields)) || PyTuple_CheckExact(__pyx_v_fields)) {
        __pyx_t_1 = __pyx_v_fields; __Pyx_INCREF(__pyx_t_1);
        __pyx_t_5 = 0;
        __pyx_t_6 = NULL;
      } else {
        __pyx_t_5 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_fields); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5338, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_6 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 5338, __pyx_L1_error)
      }
      for (;;) {
        if (likely(!__pyx_t_6)) {
          if (likely(PyList_CheckExact(__pyx_t_1))) {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
              #if !CYTHON_ASSUME_SAFE_SIZE
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 5338, __pyx_L1_error)
              #endif
              if (__pyx_t_5 >= __pyx_temp) break;
            }
            __pyx_t_3 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_5, __Pyx_ReferenceSharing_OwnStrongReference);
            ++__pyx_t_5;
          } else {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
              #if !CYTHON_ASSUME_SAFE_SIZE
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 5338, __pyx_L1_error)
              #endif
              if (__pyx_t_5 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_3 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_5));
            #else
            __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_5);
            #endif
            ++__pyx_t_5;
          }
          if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5338, __pyx_L1_error)
        } else {
          __pyx_t_3 = __pyx_t_6(__pyx_t_1);
          if (unlikely(!__pyx_t_3)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(1, 5338, __pyx_L1_error)
              PyErr_Clear();
            }
            break;
          }
        }
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_3);
        __pyx_t_3 = 0;

        /* "pyarrow/types.pxi":5339
 * 
 *     for item in fields:
 *         if isinstance(item, tuple):             # <<<<<<<<<<<<<<
 *             py_field = field(*item)
 *         else:
*/
        __pyx_t_2 = PyTuple_Check(__pyx_v_item); 
        if (__pyx_t_2) {

          /* "pyarrow/types.pxi":5340
 *     for item in fields:
 *         if isinstance(item, tuple):
 *             py_field = field(*item)             # <<<<<<<<<<<<<<
 *         else:
 *             py_field = item
*/
          __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_field); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5340, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_7 = __Pyx_PySequence_Tuple(__pyx_v_item); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 5340, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 5340, __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;
          if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Field))))) __PYX_ERR(1, 5340, __pyx_L1_error)
          __Pyx_XDECREF_SET(__pyx_v_py_field, ((struct __pyx_obj_7pyarrow_3lib_Field *)__pyx_t_8));
          __pyx_t_8 = 0;

          /* "pyarrow/types.pxi":5339
 * 
 *     for item in fields:
 *         if isinstance(item, tuple):             # <<<<<<<<<<<<<<
 *             py_field = field(*item)
 *         else:
*/
          goto __pyx_L6;
        }

        /* "pyarrow/types.pxi":5342
 *             py_field = field(*item)
 *         else:
 *             py_field = item             # <<<<<<<<<<<<<<
 *         c_fields.push_back(py_field.sp_field)
 * 
*/
        /*else*/ {
          __pyx_t_8 = __pyx_v_item;
          __Pyx_INCREF(__pyx_t_8);
          if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Field))))) __PYX_ERR(1, 5342, __pyx_L1_error)
          __Pyx_XDECREF_SET(__pyx_v_py_field, ((struct __pyx_obj_7pyarrow_3lib_Field *)__pyx_t_8));
          __pyx_t_8 = 0;
        }
        __pyx_L6:;

        /* "pyarrow/types.pxi":5343
 *         else:
 *             py_field = item
 *         c_fields.push_back(py_field.sp_field)             # <<<<<<<<<<<<<<
 * 
 *     struct_type.reset(new CStructType(c_fields))
*/
        if (unlikely(((PyObject *)__pyx_v_py_field) == Py_None)) {
          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_field");
          __PYX_ERR(1, 5343, __pyx_L1_error)
        }
        try {
          __pyx_v_c_fields.push_back(__pyx_v_py_field->sp_field);
        } catch(...) {
          __Pyx_CppExn2PyErr();
          __PYX_ERR(1, 5343, __pyx_L1_error)
        }

        /* "pyarrow/types.pxi":5338
 *         fields = fields.items()
 * 
 *     for item in fields:             # <<<<<<<<<<<<<<
 *         if isinstance(item, tuple):
 *             py_field = field(*item)
*/
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "pyarrow/types.pxi":5345
 *         c_fields.push_back(py_field.sp_field)
 * 
 *     struct_type.reset(new CStructType(c_fields))             # <<<<<<<<<<<<<<
 *     return pyarrow_wrap_data_type(struct_type)
 * 
*/
      __pyx_v_struct_type.reset(new  arrow::StructType(__pyx_v_c_fields));

      /* "pyarrow/types.pxi":5346
 * 
 *     struct_type.reset(new CStructType(c_fields))
 *     return pyarrow_wrap_data_type(struct_type)             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = pyarrow_wrap_data_type(__pyx_v_struct_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5346, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/types.pxi":5284
 * 
 * 
 * def struct(fields):             # <<<<<<<<<<<<<<
 *     """
 *     Create StructType instance from fields.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_8);
      __Pyx_AddTraceback("pyarrow.lib.struct", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF((PyObject *)__pyx_v_py_field);
      __Pyx_XDECREF(__pyx_v_item);
      __Pyx_XDECREF(__pyx_v_fields);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/types.pxi":5349
 * 
 * 
 * cdef _extract_union_params(child_fields, type_codes,             # <<<<<<<<<<<<<<
 *                            vector[shared_ptr[CField]]* c_fields,
 *                            vector[int8_t]* c_type_codes):
*/

    static PyObject *__pyx_f_7pyarrow_3lib__extract_union_params(PyObject *__pyx_v_child_fields, PyObject *__pyx_v_type_codes, std::vector<std::shared_ptr< arrow::Field> >  *__pyx_v_c_fields, std::vector<int8_t>  *__pyx_v_c_type_codes) {
      struct __pyx_obj_7pyarrow_3lib_Field *__pyx_v_child_field = 0;
      PyObject *__pyx_v_code = NULL;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      Py_ssize_t __pyx_t_2;
      PyObject *(*__pyx_t_3)(PyObject *);
      PyObject *__pyx_t_4 = NULL;
      int __pyx_t_5;
      size_t __pyx_t_6;
      int8_t __pyx_t_7;
      PyObject *__pyx_t_8 = NULL;
      std::vector<int8_t>  __pyx_t_9;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("_extract_union_params", 0);

      /* "pyarrow/types.pxi":5355
 *         Field child_field
 * 
 *     for child_field in child_fields:             # <<<<<<<<<<<<<<
 *         c_fields[0].push_back(child_field.sp_field)
 * 
*/
      if (likely(PyList_CheckExact(__pyx_v_child_fields)) || PyTuple_CheckExact(__pyx_v_child_fields)) {
        __pyx_t_1 = __pyx_v_child_fields; __Pyx_INCREF(__pyx_t_1);
        __pyx_t_2 = 0;
        __pyx_t_3 = NULL;
      } else {
        __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_child_fields); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5355, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_3 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5355, __pyx_L1_error)
      }
      for (;;) {
        if (likely(!__pyx_t_3)) {
          if (likely(PyList_CheckExact(__pyx_t_1))) {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
              #if !CYTHON_ASSUME_SAFE_SIZE
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 5355, __pyx_L1_error)
              #endif
              if (__pyx_t_2 >= __pyx_temp) break;
            }
            __pyx_t_4 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_2, __Pyx_ReferenceSharing_OwnStrongReference);
            ++__pyx_t_2;
          } else {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
              #if !CYTHON_ASSUME_SAFE_SIZE
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 5355, __pyx_L1_error)
              #endif
              if (__pyx_t_2 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_4 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2));
            #else
            __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2);
            #endif
            ++__pyx_t_2;
          }
          if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5355, __pyx_L1_error)
        } else {
          __pyx_t_4 = __pyx_t_3(__pyx_t_1);
          if (unlikely(!__pyx_t_4)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(1, 5355, __pyx_L1_error)
              PyErr_Clear();
            }
            break;
          }
        }
        __Pyx_GOTREF(__pyx_t_4);
        if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Field))))) __PYX_ERR(1, 5355, __pyx_L1_error)
        __Pyx_XDECREF_SET(__pyx_v_child_field, ((struct __pyx_obj_7pyarrow_3lib_Field *)__pyx_t_4));
        __pyx_t_4 = 0;

        /* "pyarrow/types.pxi":5356
 * 
 *     for child_field in child_fields:
 *         c_fields[0].push_back(child_field.sp_field)             # <<<<<<<<<<<<<<
 * 
 *     if type_codes is not None:
*/
        if (unlikely(((PyObject *)__pyx_v_child_field) == Py_None)) {
          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_field");
          __PYX_ERR(1, 5356, __pyx_L1_error)
        }
        try {
          (__pyx_v_c_fields[0]).push_back(__pyx_v_child_field->sp_field);
        } catch(...) {
          __Pyx_CppExn2PyErr();
          __PYX_ERR(1, 5356, __pyx_L1_error)
        }

        /* "pyarrow/types.pxi":5355
 *         Field child_field
 * 
 *     for child_field in child_fields:             # <<<<<<<<<<<<<<
 *         c_fields[0].push_back(child_field.sp_field)
 * 
*/
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "pyarrow/types.pxi":5358
 *         c_fields[0].push_back(child_field.sp_field)
 * 
 *     if type_codes is not None:             # <<<<<<<<<<<<<<
 *         if len(type_codes) != <Py_ssize_t>(c_fields.size()):
 *             raise ValueError("type_codes should have the same length "
*/
      __pyx_t_5 = (__pyx_v_type_codes != Py_None);
      if (__pyx_t_5) {

        /* "pyarrow/types.pxi":5359
 * 
 *     if type_codes is not None:
 *         if len(type_codes) != <Py_ssize_t>(c_fields.size()):             # <<<<<<<<<<<<<<
 *             raise ValueError("type_codes should have the same length "
 *                              "as fields")
*/
        __pyx_t_2 = PyObject_Length(__pyx_v_type_codes); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(1, 5359, __pyx_L1_error)
        __pyx_t_5 = (__pyx_t_2 != ((Py_ssize_t)__pyx_v_c_fields->size()));
        if (unlikely(__pyx_t_5)) {

          /* "pyarrow/types.pxi":5360
 *     if type_codes is not None:
 *         if len(type_codes) != <Py_ssize_t>(c_fields.size()):
 *             raise ValueError("type_codes should have the same length "             # <<<<<<<<<<<<<<
 *                              "as fields")
 *         for code in type_codes:
*/
          __pyx_t_4 = NULL;
          __pyx_t_6 = 1;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_type_codes_should_have_the_same};
            __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
            if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5360, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_1);
          }
          __Pyx_Raise(__pyx_t_1, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __PYX_ERR(1, 5360, __pyx_L1_error)

          /* "pyarrow/types.pxi":5359
 * 
 *     if type_codes is not None:
 *         if len(type_codes) != <Py_ssize_t>(c_fields.size()):             # <<<<<<<<<<<<<<
 *             raise ValueError("type_codes should have the same length "
 *                              "as fields")
*/
        }

        /* "pyarrow/types.pxi":5362
 *             raise ValueError("type_codes should have the same length "
 *                              "as fields")
 *         for code in type_codes:             # <<<<<<<<<<<<<<
 *             c_type_codes[0].push_back(code)
 *     else:
*/
        if (likely(PyList_CheckExact(__pyx_v_type_codes)) || PyTuple_CheckExact(__pyx_v_type_codes)) {
          __pyx_t_1 = __pyx_v_type_codes; __Pyx_INCREF(__pyx_t_1);
          __pyx_t_2 = 0;
          __pyx_t_3 = NULL;
        } else {
          __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_type_codes); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5362, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_3 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5362, __pyx_L1_error)
        }
        for (;;) {
          if (likely(!__pyx_t_3)) {
            if (likely(PyList_CheckExact(__pyx_t_1))) {
              {
                Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
                #if !CYTHON_ASSUME_SAFE_SIZE
                if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 5362, __pyx_L1_error)
                #endif
                if (__pyx_t_2 >= __pyx_temp) break;
              }
              __pyx_t_4 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_2, __Pyx_ReferenceSharing_OwnStrongReference);
              ++__pyx_t_2;
            } else {
              {
                Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
                #if !CYTHON_ASSUME_SAFE_SIZE
                if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 5362, __pyx_L1_error)
                #endif
                if (__pyx_t_2 >= __pyx_temp) break;
              }
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_4 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2));
              #else
              __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2);
              #endif
              ++__pyx_t_2;
            }
            if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5362, __pyx_L1_error)
          } else {
            __pyx_t_4 = __pyx_t_3(__pyx_t_1);
            if (unlikely(!__pyx_t_4)) {
              PyObject* exc_type = PyErr_Occurred();
              if (exc_type) {
                if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(1, 5362, __pyx_L1_error)
                PyErr_Clear();
              }
              break;
            }
          }
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_XDECREF_SET(__pyx_v_code, __pyx_t_4);
          __pyx_t_4 = 0;

          /* "pyarrow/types.pxi":5363
 *                              "as fields")
 *         for code in type_codes:
 *             c_type_codes[0].push_back(code)             # <<<<<<<<<<<<<<
 *     else:
 *         c_type_codes[0] = range(c_fields.size())
*/
          __pyx_t_7 = __Pyx_PyLong_As_int8_t(__pyx_v_code); if (unlikely((__pyx_t_7 == ((int8_t)-1)) && PyErr_Occurred())) __PYX_ERR(1, 5363, __pyx_L1_error)
          try {
            (__pyx_v_c_type_codes[0]).push_back(__pyx_t_7);
          } catch(...) {
            __Pyx_CppExn2PyErr();
            __PYX_ERR(1, 5363, __pyx_L1_error)
          }

          /* "pyarrow/types.pxi":5362
 *             raise ValueError("type_codes should have the same length "
 *                              "as fields")
 *         for code in type_codes:             # <<<<<<<<<<<<<<
 *             c_type_codes[0].push_back(code)
 *     else:
*/
        }
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

        /* "pyarrow/types.pxi":5358
 *         c_fields[0].push_back(child_field.sp_field)
 * 
 *     if type_codes is not None:             # <<<<<<<<<<<<<<
 *         if len(type_codes) != <Py_ssize_t>(c_fields.size()):
 *             raise ValueError("type_codes should have the same length "
*/
        goto __pyx_L6;
      }

      /* "pyarrow/types.pxi":5365
 *             c_type_codes[0].push_back(code)
 *     else:
 *         c_type_codes[0] = range(c_fields.size())             # <<<<<<<<<<<<<<
 * 
 * 
*/
      /*else*/ {
        __pyx_t_4 = NULL;
        __pyx_t_8 = __Pyx_PyLong_FromSize_t(__pyx_v_c_fields->size()); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 5365, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_6 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_8};
          __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(&PyRange_Type), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5365, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
        }
        __pyx_t_9 = __pyx_convert_vector_from_py_int8_t(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 5365, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        (__pyx_v_c_type_codes[0]) = __pyx_t_9;
      }
      __pyx_L6:;

      /* "pyarrow/types.pxi":5349
 * 
 * 
 * cdef _extract_union_params(child_fields, type_codes,             # <<<<<<<<<<<<<<
 *                            vector[shared_ptr[CField]]* c_fields,
 *                            vector[int8_t]* c_type_codes):
*/

      /* 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_AddTraceback("pyarrow.lib._extract_union_params", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = 0;
      __pyx_L0:;
      __Pyx_XDECREF((PyObject *)__pyx_v_child_field);
      __Pyx_XDECREF(__pyx_v_code);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/types.pxi":5368
 * 
 * 
 * def sparse_union(child_fields, type_codes=None):             # <<<<<<<<<<<<<<
 *     """
 *     Create SparseUnionType from child fields.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_155sparse_union(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_154sparse_union, "sparse_union(child_fields, type_codes=None)\n\nCreate SparseUnionType from child fields.\n\nA sparse union is a nested type where each logical value is taken from\na single child.  A buffer of 8-bit type ids indicates which child\na given logical value is to be taken from.\n\nIn a sparse union, each child array should have the same length as the\nunion array, regardless of the actual number of union values that\nrefer to it.\n\nParameters\n----------\nchild_fields : sequence of Field values\n    Each field must have a UTF8-encoded name, and these field names are\n    part of the type metadata.\ntype_codes : list of integers, default None\n\nReturns\n-------\ntype : SparseUnionType");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_155sparse_union = {"sparse_union", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_155sparse_union, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_154sparse_union};
    static PyObject *__pyx_pw_7pyarrow_3lib_155sparse_union(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_child_fields = 0;
      PyObject *__pyx_v_type_codes = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[2] = {0,0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("sparse_union (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_child_fields,&__pyx_mstate_global->__pyx_n_u_type_codes,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 5368, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 5368, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 5368, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "sparse_union", 0) < (0)) __PYX_ERR(1, 5368, __pyx_L3_error)
          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("sparse_union", 0, 1, 2, i); __PYX_ERR(1, 5368, __pyx_L3_error) }
          }
        } else {
          switch (__pyx_nargs) {
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 5368, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 5368, __pyx_L3_error)
            break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
        }
        __pyx_v_child_fields = values[0];
        __pyx_v_type_codes = values[1];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("sparse_union", 0, 1, 2, __pyx_nargs); __PYX_ERR(1, 5368, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.sparse_union", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_154sparse_union(__pyx_self, __pyx_v_child_fields, __pyx_v_type_codes);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_154sparse_union(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_child_fields, PyObject *__pyx_v_type_codes) {
      std::vector<std::shared_ptr< arrow::Field> >  __pyx_v_c_fields;
      std::vector<int8_t>  __pyx_v_c_type_codes;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("sparse_union", 0);

      /* "pyarrow/types.pxi":5395
 *         vector[int8_t] c_type_codes
 * 
 *     _extract_union_params(child_fields, type_codes,             # <<<<<<<<<<<<<<
 *                           &c_fields, &c_type_codes)
 * 
*/
      __pyx_t_1 = __pyx_f_7pyarrow_3lib__extract_union_params(__pyx_v_child_fields, __pyx_v_type_codes, (&__pyx_v_c_fields), (&__pyx_v_c_type_codes)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5395, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "pyarrow/types.pxi":5398
 *                           &c_fields, &c_type_codes)
 * 
 *     return pyarrow_wrap_data_type(             # <<<<<<<<<<<<<<
 *         CMakeSparseUnionType(move(c_fields), move(c_type_codes)))
 * 
*/
      __Pyx_XDECREF(__pyx_r);

      /* "pyarrow/types.pxi":5399
 * 
 *     return pyarrow_wrap_data_type(
 *         CMakeSparseUnionType(move(c_fields), move(c_type_codes)))             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __pyx_t_1 = pyarrow_wrap_data_type( arrow::sparse_union(cython_std::move<std::vector<std::shared_ptr< arrow::Field> > >(__pyx_v_c_fields), cython_std::move<std::vector<int8_t> >(__pyx_v_c_type_codes))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5398, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/types.pxi":5368
 * 
 * 
 * def sparse_union(child_fields, type_codes=None):             # <<<<<<<<<<<<<<
 *     """
 *     Create SparseUnionType from child fields.
*/

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

    /* "pyarrow/types.pxi":5402
 * 
 * 
 * def dense_union(child_fields, type_codes=None):             # <<<<<<<<<<<<<<
 *     """
 *     Create DenseUnionType from child fields.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_157dense_union(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_156dense_union, "dense_union(child_fields, type_codes=None)\n\nCreate DenseUnionType from child fields.\n\nA dense union is a nested type where each logical value is taken from\na single child, at a specific offset.  A buffer of 8-bit type ids\nindicates which child a given logical value is to be taken from,\nand a buffer of 32-bit offsets indicates at which physical position\nin the given child array the logical value is to be taken from.\n\nUnlike a sparse union, a dense union allows encoding only the child array\nvalues which are actually referred to by the union array.  This is\ncounterbalanced by the additional footprint of the offsets buffer, and\nthe additional indirection cost when looking up values.\n\nParameters\n----------\nchild_fields : sequence of Field values\n    Each field must have a UTF8-encoded name, and these field names are\n    part of the type metadata.\ntype_codes : list of integers, default None\n\nReturns\n-------\ntype : DenseUnionType");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_157dense_union = {"dense_union", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_157dense_union, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_156dense_union};
    static PyObject *__pyx_pw_7pyarrow_3lib_157dense_union(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_child_fields = 0;
      PyObject *__pyx_v_type_codes = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[2] = {0,0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("dense_union (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_child_fields,&__pyx_mstate_global->__pyx_n_u_type_codes,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 5402, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 5402, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 5402, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "dense_union", 0) < (0)) __PYX_ERR(1, 5402, __pyx_L3_error)
          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("dense_union", 0, 1, 2, i); __PYX_ERR(1, 5402, __pyx_L3_error) }
          }
        } else {
          switch (__pyx_nargs) {
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 5402, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 5402, __pyx_L3_error)
            break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
        }
        __pyx_v_child_fields = values[0];
        __pyx_v_type_codes = values[1];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("dense_union", 0, 1, 2, __pyx_nargs); __PYX_ERR(1, 5402, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.dense_union", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_156dense_union(__pyx_self, __pyx_v_child_fields, __pyx_v_type_codes);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_156dense_union(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_child_fields, PyObject *__pyx_v_type_codes) {
      std::vector<std::shared_ptr< arrow::Field> >  __pyx_v_c_fields;
      std::vector<int8_t>  __pyx_v_c_type_codes;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("dense_union", 0);

      /* "pyarrow/types.pxi":5432
 *         vector[int8_t] c_type_codes
 * 
 *     _extract_union_params(child_fields, type_codes,             # <<<<<<<<<<<<<<
 *                           &c_fields, &c_type_codes)
 * 
*/
      __pyx_t_1 = __pyx_f_7pyarrow_3lib__extract_union_params(__pyx_v_child_fields, __pyx_v_type_codes, (&__pyx_v_c_fields), (&__pyx_v_c_type_codes)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5432, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "pyarrow/types.pxi":5435
 *                           &c_fields, &c_type_codes)
 * 
 *     return pyarrow_wrap_data_type(             # <<<<<<<<<<<<<<
 *         CMakeDenseUnionType(move(c_fields), move(c_type_codes)))
 * 
*/
      __Pyx_XDECREF(__pyx_r);

      /* "pyarrow/types.pxi":5436
 * 
 *     return pyarrow_wrap_data_type(
 *         CMakeDenseUnionType(move(c_fields), move(c_type_codes)))             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __pyx_t_1 = pyarrow_wrap_data_type( arrow::dense_union(cython_std::move<std::vector<std::shared_ptr< arrow::Field> > >(__pyx_v_c_fields), cython_std::move<std::vector<int8_t> >(__pyx_v_c_type_codes))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5435, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/types.pxi":5402
 * 
 * 
 * def dense_union(child_fields, type_codes=None):             # <<<<<<<<<<<<<<
 *     """
 *     Create DenseUnionType from child fields.
*/

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

    /* "pyarrow/types.pxi":5439
 * 
 * 
 * def union(child_fields, mode, type_codes=None):             # <<<<<<<<<<<<<<
 *     """
 *     Create UnionType from child fields.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_159union(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_158union, "union(child_fields, mode, type_codes=None)\n\nCreate UnionType from child fields.\n\nA union is a nested type where each logical value is taken from a\nsingle child.  A buffer of 8-bit type ids indicates which child\na given logical value is to be taken from.\n\nUnions come in two flavors: sparse and dense\n(see also `pyarrow.sparse_union` and `pyarrow.dense_union`).\n\nParameters\n----------\nchild_fields : sequence of Field values\n    Each field must have a UTF8-encoded name, and these field names are\n    part of the type metadata.\nmode : str\n    Must be 'sparse' or 'dense'\ntype_codes : list of integers, default None\n\nReturns\n-------\ntype : UnionType");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_159union = {"union", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_159union, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_158union};
    static PyObject *__pyx_pw_7pyarrow_3lib_159union(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_child_fields = 0;
      PyObject *__pyx_v_mode = 0;
      PyObject *__pyx_v_type_codes = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[3] = {0,0,0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("union (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_child_fields,&__pyx_mstate_global->__pyx_n_u_mode,&__pyx_mstate_global->__pyx_n_u_type_codes,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 5439, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  3:
            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 5439, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 5439, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 5439, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "union", 0) < (0)) __PYX_ERR(1, 5439, __pyx_L3_error)
          if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
          for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("union", 0, 2, 3, i); __PYX_ERR(1, 5439, __pyx_L3_error) }
          }
        } else {
          switch (__pyx_nargs) {
            case  3:
            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 5439, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 5439, __pyx_L3_error)
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 5439, __pyx_L3_error)
            break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
        }
        __pyx_v_child_fields = values[0];
        __pyx_v_mode = values[1];
        __pyx_v_type_codes = values[2];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("union", 0, 2, 3, __pyx_nargs); __PYX_ERR(1, 5439, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.union", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_158union(__pyx_self, __pyx_v_child_fields, __pyx_v_mode, __pyx_v_type_codes);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_158union(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_child_fields, PyObject *__pyx_v_mode, PyObject *__pyx_v_type_codes) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      int __pyx_t_1;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      int __pyx_t_5;
      PyObject *__pyx_t_6 = NULL;
      size_t __pyx_t_7;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("union", 0);
      __Pyx_INCREF(__pyx_v_mode);

      /* "pyarrow/types.pxi":5463
 *     type : UnionType
 *     """
 *     if isinstance(mode, int):             # <<<<<<<<<<<<<<
 *         if mode not in (_UnionMode_SPARSE, _UnionMode_DENSE):
 *             raise ValueError(f"Invalid union mode {mode!r}")
*/
      __pyx_t_1 = PyLong_Check(__pyx_v_mode); 
      if (__pyx_t_1) {

        /* "pyarrow/types.pxi":5464
 *     """
 *     if isinstance(mode, int):
 *         if mode not in (_UnionMode_SPARSE, _UnionMode_DENSE):             # <<<<<<<<<<<<<<
 *             raise ValueError(f"Invalid union mode {mode!r}")
 *     else:
*/
        __Pyx_INCREF(__pyx_v_mode);
        __pyx_t_2 = __pyx_v_mode;
        __pyx_t_3 = __Pyx_PyLong_From_enum____arrow_3a__3a_UnionMode_3a__3a_type( arrow::UnionMode::SPARSE); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5464, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = PyObject_RichCompare(__pyx_t_2, __pyx_t_3, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5464, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(1, 5464, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (__pyx_t_5) {
        } else {
          __pyx_t_1 = __pyx_t_5;
          goto __pyx_L5_bool_binop_done;
        }
        __pyx_t_4 = __Pyx_PyLong_From_enum____arrow_3a__3a_UnionMode_3a__3a_type( arrow::UnionMode::DENSE); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5464, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_t_4, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5464, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(1, 5464, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_1 = __pyx_t_5;
        __pyx_L5_bool_binop_done:;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_5 = __pyx_t_1;
        if (unlikely(__pyx_t_5)) {

          /* "pyarrow/types.pxi":5465
 *     if isinstance(mode, int):
 *         if mode not in (_UnionMode_SPARSE, _UnionMode_DENSE):
 *             raise ValueError(f"Invalid union mode {mode!r}")             # <<<<<<<<<<<<<<
 *     else:
 *         if mode == 'sparse':
*/
          __pyx_t_3 = NULL;
          __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_mode), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5465, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_Invalid_union_mode, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 5465, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_7 = 1;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_6};
            __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5465, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
          }
          __Pyx_Raise(__pyx_t_2, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __PYX_ERR(1, 5465, __pyx_L1_error)

          /* "pyarrow/types.pxi":5464
 *     """
 *     if isinstance(mode, int):
 *         if mode not in (_UnionMode_SPARSE, _UnionMode_DENSE):             # <<<<<<<<<<<<<<
 *             raise ValueError(f"Invalid union mode {mode!r}")
 *     else:
*/
        }

        /* "pyarrow/types.pxi":5463
 *     type : UnionType
 *     """
 *     if isinstance(mode, int):             # <<<<<<<<<<<<<<
 *         if mode not in (_UnionMode_SPARSE, _UnionMode_DENSE):
 *             raise ValueError(f"Invalid union mode {mode!r}")
*/
        goto __pyx_L3;
      }

      /* "pyarrow/types.pxi":5467
 *             raise ValueError(f"Invalid union mode {mode!r}")
 *     else:
 *         if mode == 'sparse':             # <<<<<<<<<<<<<<
 *             mode = _UnionMode_SPARSE
 *         elif mode == 'dense':
*/
      /*else*/ {
        __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_v_mode, __pyx_mstate_global->__pyx_n_u_sparse, Py_EQ)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(1, 5467, __pyx_L1_error)
        if (__pyx_t_5) {

          /* "pyarrow/types.pxi":5468
 *     else:
 *         if mode == 'sparse':
 *             mode = _UnionMode_SPARSE             # <<<<<<<<<<<<<<
 *         elif mode == 'dense':
 *             mode = _UnionMode_DENSE
*/
          __pyx_t_2 = __Pyx_PyLong_From_enum____arrow_3a__3a_UnionMode_3a__3a_type( arrow::UnionMode::SPARSE); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5468, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF_SET(__pyx_v_mode, __pyx_t_2);
          __pyx_t_2 = 0;

          /* "pyarrow/types.pxi":5467
 *             raise ValueError(f"Invalid union mode {mode!r}")
 *     else:
 *         if mode == 'sparse':             # <<<<<<<<<<<<<<
 *             mode = _UnionMode_SPARSE
 *         elif mode == 'dense':
*/
          goto __pyx_L7;
        }

        /* "pyarrow/types.pxi":5469
 *         if mode == 'sparse':
 *             mode = _UnionMode_SPARSE
 *         elif mode == 'dense':             # <<<<<<<<<<<<<<
 *             mode = _UnionMode_DENSE
 *         else:
*/
        __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_v_mode, __pyx_mstate_global->__pyx_n_u_dense, Py_EQ)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(1, 5469, __pyx_L1_error)
        if (likely(__pyx_t_5)) {

          /* "pyarrow/types.pxi":5470
 *             mode = _UnionMode_SPARSE
 *         elif mode == 'dense':
 *             mode = _UnionMode_DENSE             # <<<<<<<<<<<<<<
 *         else:
 *             raise ValueError(f"Invalid union mode {mode!r}")
*/
          __pyx_t_2 = __Pyx_PyLong_From_enum____arrow_3a__3a_UnionMode_3a__3a_type( arrow::UnionMode::DENSE); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5470, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF_SET(__pyx_v_mode, __pyx_t_2);
          __pyx_t_2 = 0;

          /* "pyarrow/types.pxi":5469
 *         if mode == 'sparse':
 *             mode = _UnionMode_SPARSE
 *         elif mode == 'dense':             # <<<<<<<<<<<<<<
 *             mode = _UnionMode_DENSE
 *         else:
*/
          goto __pyx_L7;
        }

        /* "pyarrow/types.pxi":5472
 *             mode = _UnionMode_DENSE
 *         else:
 *             raise ValueError(f"Invalid union mode {mode!r}")             # <<<<<<<<<<<<<<
 * 
 *     if mode == _UnionMode_SPARSE:
*/
        /*else*/ {
          __pyx_t_6 = NULL;
          __pyx_t_3 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_mode), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5472, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_Invalid_union_mode, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5472, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __pyx_t_7 = 1;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_4};
            __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5472, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
          }
          __Pyx_Raise(__pyx_t_2, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __PYX_ERR(1, 5472, __pyx_L1_error)
        }
        __pyx_L7:;
      }
      __pyx_L3:;

      /* "pyarrow/types.pxi":5474
 *             raise ValueError(f"Invalid union mode {mode!r}")
 * 
 *     if mode == _UnionMode_SPARSE:             # <<<<<<<<<<<<<<
 *         return sparse_union(child_fields, type_codes)
 *     else:
*/
      __pyx_t_2 = __Pyx_PyLong_From_enum____arrow_3a__3a_UnionMode_3a__3a_type( arrow::UnionMode::SPARSE); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5474, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4 = PyObject_RichCompare(__pyx_v_mode, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5474, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(1, 5474, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (__pyx_t_5) {

        /* "pyarrow/types.pxi":5475
 * 
 *     if mode == _UnionMode_SPARSE:
 *         return sparse_union(child_fields, type_codes)             # <<<<<<<<<<<<<<
 *     else:
 *         return dense_union(child_fields, type_codes)
*/
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_2 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_sparse_union); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 5475, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_7 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_6))) {
          __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_6);
          assert(__pyx_t_2);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
          __pyx_t_7 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_child_fields, __pyx_v_type_codes};
          __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_7, (3-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5475, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
        }
        __pyx_r = __pyx_t_4;
        __pyx_t_4 = 0;
        goto __pyx_L0;

        /* "pyarrow/types.pxi":5474
 *             raise ValueError(f"Invalid union mode {mode!r}")
 * 
 *     if mode == _UnionMode_SPARSE:             # <<<<<<<<<<<<<<
 *         return sparse_union(child_fields, type_codes)
 *     else:
*/
      }

      /* "pyarrow/types.pxi":5477
 *         return sparse_union(child_fields, type_codes)
 *     else:
 *         return dense_union(child_fields, type_codes)             # <<<<<<<<<<<<<<
 * 
 * 
*/
      /*else*/ {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_6 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_dense_union); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5477, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_7 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_2))) {
          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
          assert(__pyx_t_6);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
          __pyx_t_7 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[3] = {__pyx_t_6, __pyx_v_child_fields, __pyx_v_type_codes};
          __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_7, (3-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5477, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
        }
        __pyx_r = __pyx_t_4;
        __pyx_t_4 = 0;
        goto __pyx_L0;
      }

      /* "pyarrow/types.pxi":5439
 * 
 * 
 * def union(child_fields, mode, type_codes=None):             # <<<<<<<<<<<<<<
 *     """
 *     Create UnionType from child fields.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_AddTraceback("pyarrow.lib.union", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_mode);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/types.pxi":5480
 * 
 * 
 * def run_end_encoded(run_end_type, value_type):             # <<<<<<<<<<<<<<
 *     """
 *     Create RunEndEncodedType from run-end and value types.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_161run_end_encoded(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_160run_end_encoded, "run_end_encoded(run_end_type, value_type)\n\nCreate RunEndEncodedType from run-end and value types.\n\nParameters\n----------\nrun_end_type : pyarrow.DataType\n    The integer type of the run_ends array. Must be 'int16', 'int32', or 'int64'.\nvalue_type : pyarrow.DataType\n    The type of the values array.\n\nReturns\n-------\ntype : RunEndEncodedType");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_161run_end_encoded = {"run_end_encoded", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_161run_end_encoded, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_160run_end_encoded};
    static PyObject *__pyx_pw_7pyarrow_3lib_161run_end_encoded(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_run_end_type = 0;
      PyObject *__pyx_v_value_type = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[2] = {0,0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("run_end_encoded (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_run_end_type,&__pyx_mstate_global->__pyx_n_u_value_type,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 5480, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 5480, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 5480, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "run_end_encoded", 0) < (0)) __PYX_ERR(1, 5480, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("run_end_encoded", 1, 2, 2, i); __PYX_ERR(1, 5480, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 2)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 5480, __pyx_L3_error)
          values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 5480, __pyx_L3_error)
        }
        __pyx_v_run_end_type = values[0];
        __pyx_v_value_type = values[1];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("run_end_encoded", 1, 2, 2, __pyx_nargs); __PYX_ERR(1, 5480, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.run_end_encoded", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_160run_end_encoded(__pyx_self, __pyx_v_run_end_type, __pyx_v_value_type);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_160run_end_encoded(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_run_end_type, PyObject *__pyx_v_value_type) {
      struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v__run_end_type = 0;
      struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v__value_type = 0;
      std::shared_ptr< arrow::DataType>  __pyx_v_ree_type;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      struct __pyx_opt_args_7pyarrow_3lib_ensure_type __pyx_t_2;
      enum  arrow::Type::type __pyx_t_3;
      int __pyx_t_4;
      int __pyx_t_5;
      PyObject *__pyx_t_6 = NULL;
      size_t __pyx_t_7;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("run_end_encoded", 0);

      /* "pyarrow/types.pxi":5496
 *     """
 *     cdef:
 *         DataType _run_end_type = ensure_type(run_end_type, allow_none=False)             # <<<<<<<<<<<<<<
 *         DataType _value_type = ensure_type(value_type, allow_none=False)
 *         shared_ptr[CDataType] ree_type
*/
      __pyx_t_2.__pyx_n = 1;
      __pyx_t_2.allow_none = 0;
      __pyx_t_1 = ((PyObject *)__pyx_f_7pyarrow_3lib_ensure_type(__pyx_v_run_end_type, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5496, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_v__run_end_type = ((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_t_1);
      __pyx_t_1 = 0;

      /* "pyarrow/types.pxi":5497
 *     cdef:
 *         DataType _run_end_type = ensure_type(run_end_type, allow_none=False)
 *         DataType _value_type = ensure_type(value_type, allow_none=False)             # <<<<<<<<<<<<<<
 *         shared_ptr[CDataType] ree_type
 * 
*/
      __pyx_t_2.__pyx_n = 1;
      __pyx_t_2.allow_none = 0;
      __pyx_t_1 = ((PyObject *)__pyx_f_7pyarrow_3lib_ensure_type(__pyx_v_value_type, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5497, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_v__value_type = ((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_t_1);
      __pyx_t_1 = 0;

      /* "pyarrow/types.pxi":5500
 *         shared_ptr[CDataType] ree_type
 * 
 *     if not _run_end_type.type.id() in [_Type_INT16, _Type_INT32, _Type_INT64]:             # <<<<<<<<<<<<<<
 *         raise ValueError("The run_end_type should be 'int16', 'int32', or 'int64'")
 *     ree_type = CMakeRunEndEncodedType(_run_end_type.sp_type, _value_type.sp_type)
*/
      if (unlikely(((PyObject *)__pyx_v__run_end_type) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "type");
        __PYX_ERR(1, 5500, __pyx_L1_error)
      }
      __pyx_t_3 = __pyx_v__run_end_type->type->id();
      __pyx_t_5 = (__pyx_t_3 !=  arrow::Type::INT16);
      if (__pyx_t_5) {
      } else {
        __pyx_t_4 = __pyx_t_5;
        goto __pyx_L4_bool_binop_done;
      }
      __pyx_t_5 = (__pyx_t_3 !=  arrow::Type::INT32);
      if (__pyx_t_5) {
      } else {
        __pyx_t_4 = __pyx_t_5;
        goto __pyx_L4_bool_binop_done;
      }
      __pyx_t_5 = (__pyx_t_3 !=  arrow::Type::INT64);
      __pyx_t_4 = __pyx_t_5;
      __pyx_L4_bool_binop_done:;
      __pyx_t_5 = __pyx_t_4;
      if (unlikely(__pyx_t_5)) {

        /* "pyarrow/types.pxi":5501
 * 
 *     if not _run_end_type.type.id() in [_Type_INT16, _Type_INT32, _Type_INT64]:
 *         raise ValueError("The run_end_type should be 'int16', 'int32', or 'int64'")             # <<<<<<<<<<<<<<
 *     ree_type = CMakeRunEndEncodedType(_run_end_type.sp_type, _value_type.sp_type)
 *     return pyarrow_wrap_data_type(ree_type)
*/
        __pyx_t_6 = NULL;
        __pyx_t_7 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_mstate_global->__pyx_kp_u_The_run_end_type_should_be_int16};
          __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5501, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
        }
        __Pyx_Raise(__pyx_t_1, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __PYX_ERR(1, 5501, __pyx_L1_error)

        /* "pyarrow/types.pxi":5500
 *         shared_ptr[CDataType] ree_type
 * 
 *     if not _run_end_type.type.id() in [_Type_INT16, _Type_INT32, _Type_INT64]:             # <<<<<<<<<<<<<<
 *         raise ValueError("The run_end_type should be 'int16', 'int32', or 'int64'")
 *     ree_type = CMakeRunEndEncodedType(_run_end_type.sp_type, _value_type.sp_type)
*/
      }

      /* "pyarrow/types.pxi":5502
 *     if not _run_end_type.type.id() in [_Type_INT16, _Type_INT32, _Type_INT64]:
 *         raise ValueError("The run_end_type should be 'int16', 'int32', or 'int64'")
 *     ree_type = CMakeRunEndEncodedType(_run_end_type.sp_type, _value_type.sp_type)             # <<<<<<<<<<<<<<
 *     return pyarrow_wrap_data_type(ree_type)
 * 
*/
      if (unlikely(((PyObject *)__pyx_v__run_end_type) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_type");
        __PYX_ERR(1, 5502, __pyx_L1_error)
      }
      if (unlikely(((PyObject *)__pyx_v__value_type) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_type");
        __PYX_ERR(1, 5502, __pyx_L1_error)
      }
      __pyx_v_ree_type =  arrow::run_end_encoded(__pyx_v__run_end_type->sp_type, __pyx_v__value_type->sp_type);

      /* "pyarrow/types.pxi":5503
 *         raise ValueError("The run_end_type should be 'int16', 'int32', or 'int64'")
 *     ree_type = CMakeRunEndEncodedType(_run_end_type.sp_type, _value_type.sp_type)
 *     return pyarrow_wrap_data_type(ree_type)             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = pyarrow_wrap_data_type(__pyx_v_ree_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5503, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/types.pxi":5480
 * 
 * 
 * def run_end_encoded(run_end_type, value_type):             # <<<<<<<<<<<<<<
 *     """
 *     Create RunEndEncodedType from run-end and value types.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_AddTraceback("pyarrow.lib.run_end_encoded", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF((PyObject *)__pyx_v__run_end_type);
      __Pyx_XDECREF((PyObject *)__pyx_v__value_type);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/types.pxi":5506
 * 
 * 
 * def json_(DataType storage_type=utf8()):             # <<<<<<<<<<<<<<
 *     """
 *     Create instance of JSON extension type.
*/

    static PyObject *__pyx_pf_7pyarrow_3lib_286__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__defaults__", 0);
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5506, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_INCREF((PyObject *)__Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_self)->arg0);
      __Pyx_GIVEREF((PyObject *)__Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_self)->arg0);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_self)->arg0)) != (0)) __PYX_ERR(1, 5506, __pyx_L1_error);
      __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5506, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_1);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1) != (0)) __PYX_ERR(1, 5506, __pyx_L1_error);
      __Pyx_INCREF(Py_None);
      __Pyx_GIVEREF(Py_None);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None) != (0)) __PYX_ERR(1, 5506, __pyx_L1_error);
      __pyx_t_1 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;

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

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_163json_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_162json_, "json_(DataType storage_type=utf8())\n\nCreate instance of JSON extension type.\n\nParameters\n----------\nstorage_type : DataType, default pyarrow.string()\n    The underlying data type. Can be on of the following types:\n    string, large_string, string_view.\n\nReturns\n-------\ntype : JsonType\n\nExamples\n--------\nCreate an instance of JSON extension type:\n\n>>> import pyarrow as pa\n>>> pa.json_(pa.utf8())\nJsonType(extension<arrow.json>)\n\nUse the JSON type to create an array:\n\n>>> pa.array(['{\"a\": 1}', '{\"b\": 2}'], type=pa.json_(pa.utf8()))\n<pyarrow.lib.JsonArray object at ...>\n[\n  \"{\"a\": 1}\",\n  \"{\"b\": 2}\"\n]");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_163json_ = {"json_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_163json_, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_162json_};
    static PyObject *__pyx_pw_7pyarrow_3lib_163json_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v_storage_type = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("json_ (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_storage_type,0};
        struct __pyx_defaults *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_self);
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 5506, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 5506, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "json_", 0) < (0)) __PYX_ERR(1, 5506, __pyx_L3_error)
          if (!values[0]) values[0] = __Pyx_NewRef((PyObject *)__pyx_dynamic_args->arg0);
        } else {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 5506, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (!values[0]) values[0] = __Pyx_NewRef((PyObject *)__pyx_dynamic_args->arg0);
        }
        __pyx_v_storage_type = ((struct __pyx_obj_7pyarrow_3lib_DataType *)values[0]);
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("json_", 0, 0, 1, __pyx_nargs); __PYX_ERR(1, 5506, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.json_", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_storage_type), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType, 1, "storage_type", 0))) __PYX_ERR(1, 5506, __pyx_L1_error)
      __pyx_r = __pyx_pf_7pyarrow_3lib_162json_(__pyx_self, __pyx_v_storage_type);

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = NULL;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      goto __pyx_L7_cleaned_up;
      __pyx_L0:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __pyx_L7_cleaned_up:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_162json_(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v_storage_type) {
      struct __pyx_obj_7pyarrow_3lib_JsonType *__pyx_v_out = 0;
      std::shared_ptr< arrow::DataType>  __pyx_v_c_json_ext_type;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      std::shared_ptr< arrow::DataType>  __pyx_t_2;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("json_", 0);

      /* "pyarrow/types.pxi":5538
 *     """
 * 
 *     cdef JsonType out = JsonType.__new__(JsonType)             # <<<<<<<<<<<<<<
 *     c_json_ext_type = GetResultValue(CJsonType.Make(storage_type.sp_type))
 *     out.init(c_json_ext_type)
*/
      __pyx_t_1 = ((PyObject *)__pyx_tp_new_7pyarrow_3lib_JsonType(((PyTypeObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_JsonType), __pyx_mstate_global->__pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5538, __pyx_L1_error)
      __Pyx_GOTREF((PyObject *)__pyx_t_1);
      __pyx_v_out = ((struct __pyx_obj_7pyarrow_3lib_JsonType *)__pyx_t_1);
      __pyx_t_1 = 0;

      /* "pyarrow/types.pxi":5539
 * 
 *     cdef JsonType out = JsonType.__new__(JsonType)
 *     c_json_ext_type = GetResultValue(CJsonType.Make(storage_type.sp_type))             # <<<<<<<<<<<<<<
 *     out.init(c_json_ext_type)
 *     return out
*/
      if (unlikely(((PyObject *)__pyx_v_storage_type) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_type");
        __PYX_ERR(1, 5539, __pyx_L1_error)
      }
      __pyx_t_2 = arrow::py::GetResultValue<std::shared_ptr< arrow::DataType> >( arrow::extension::JsonExtensionType::Make(__pyx_v_storage_type->sp_type)); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 5539, __pyx_L1_error)
      __pyx_v_c_json_ext_type = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_2);

      /* "pyarrow/types.pxi":5540
 *     cdef JsonType out = JsonType.__new__(JsonType)
 *     c_json_ext_type = GetResultValue(CJsonType.Make(storage_type.sp_type))
 *     out.init(c_json_ext_type)             # <<<<<<<<<<<<<<
 *     return out
 * 
*/
      if (unlikely(((PyObject *)__pyx_v_out) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "init");
        __PYX_ERR(1, 5540, __pyx_L1_error)
      }
      ((struct __pyx_vtabstruct_7pyarrow_3lib_JsonType *)__pyx_v_out->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.init(((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_v_out), __pyx_v_c_json_ext_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 5540, __pyx_L1_error)

      /* "pyarrow/types.pxi":5541
 *     c_json_ext_type = GetResultValue(CJsonType.Make(storage_type.sp_type))
 *     out.init(c_json_ext_type)
 *     return out             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF((PyObject *)__pyx_v_out);
      __pyx_r = ((PyObject *)__pyx_v_out);
      goto __pyx_L0;

      /* "pyarrow/types.pxi":5506
 * 
 * 
 * def json_(DataType storage_type=utf8()):             # <<<<<<<<<<<<<<
 *     """
 *     Create instance of JSON extension type.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("pyarrow.lib.json_", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF((PyObject *)__pyx_v_out);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/types.pxi":5544
 * 
 * 
 * def uuid():             # <<<<<<<<<<<<<<
 *     """
 *     Create UuidType instance.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_165uuid(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_164uuid, "uuid()\n\nCreate UuidType instance.\n\nReturns\n-------\ntype : UuidType");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_165uuid = {"uuid", (PyCFunction)__pyx_pw_7pyarrow_3lib_165uuid, METH_NOARGS, __pyx_doc_7pyarrow_3lib_164uuid};
    static PyObject *__pyx_pw_7pyarrow_3lib_165uuid(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("uuid (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_164uuid(__pyx_self);

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

    static PyObject *__pyx_pf_7pyarrow_3lib_164uuid(CYTHON_UNUSED PyObject *__pyx_self) {
      struct __pyx_obj_7pyarrow_3lib_UuidType *__pyx_v_out = 0;
      std::shared_ptr< arrow::DataType>  __pyx_v_c_uuid_ext_type;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      std::shared_ptr< arrow::DataType>  __pyx_t_2;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("uuid", 0);

      /* "pyarrow/types.pxi":5553
 *     """
 * 
 *     cdef UuidType out = UuidType.__new__(UuidType)             # <<<<<<<<<<<<<<
 *     c_uuid_ext_type = GetResultValue(CUuidType.Make())
 *     out.init(c_uuid_ext_type)
*/
      __pyx_t_1 = ((PyObject *)__pyx_tp_new_7pyarrow_3lib_UuidType(((PyTypeObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_UuidType), __pyx_mstate_global->__pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5553, __pyx_L1_error)
      __Pyx_GOTREF((PyObject *)__pyx_t_1);
      __pyx_v_out = ((struct __pyx_obj_7pyarrow_3lib_UuidType *)__pyx_t_1);
      __pyx_t_1 = 0;

      /* "pyarrow/types.pxi":5554
 * 
 *     cdef UuidType out = UuidType.__new__(UuidType)
 *     c_uuid_ext_type = GetResultValue(CUuidType.Make())             # <<<<<<<<<<<<<<
 *     out.init(c_uuid_ext_type)
 *     return out
*/
      __pyx_t_2 = arrow::py::GetResultValue<std::shared_ptr< arrow::DataType> >( arrow::extension::UuidType::Make()); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 5554, __pyx_L1_error)
      __pyx_v_c_uuid_ext_type = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_2);

      /* "pyarrow/types.pxi":5555
 *     cdef UuidType out = UuidType.__new__(UuidType)
 *     c_uuid_ext_type = GetResultValue(CUuidType.Make())
 *     out.init(c_uuid_ext_type)             # <<<<<<<<<<<<<<
 *     return out
 * 
*/
      if (unlikely(((PyObject *)__pyx_v_out) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "init");
        __PYX_ERR(1, 5555, __pyx_L1_error)
      }
      ((struct __pyx_vtabstruct_7pyarrow_3lib_UuidType *)__pyx_v_out->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.init(((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_v_out), __pyx_v_c_uuid_ext_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 5555, __pyx_L1_error)

      /* "pyarrow/types.pxi":5556
 *     c_uuid_ext_type = GetResultValue(CUuidType.Make())
 *     out.init(c_uuid_ext_type)
 *     return out             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF((PyObject *)__pyx_v_out);
      __pyx_r = ((PyObject *)__pyx_v_out);
      goto __pyx_L0;

      /* "pyarrow/types.pxi":5544
 * 
 * 
 * def uuid():             # <<<<<<<<<<<<<<
 *     """
 *     Create UuidType instance.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("pyarrow.lib.uuid", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF((PyObject *)__pyx_v_out);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/types.pxi":5559
 * 
 * 
 * def fixed_shape_tensor(DataType value_type, shape, dim_names=None, permutation=None):             # <<<<<<<<<<<<<<
 *     """
 *     Create instance of fixed shape tensor extension type with shape and optional
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_167fixed_shape_tensor(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_166fixed_shape_tensor, "fixed_shape_tensor(DataType value_type, shape, dim_names=None, permutation=None)\n\nCreate instance of fixed shape tensor extension type with shape and optional\nnames of tensor dimensions and indices of the desired logical\nordering of dimensions.\n\nParameters\n----------\nvalue_type : DataType\n    Data type of individual tensor elements.\nshape : tuple or list of integers\n    The physical shape of the contained tensors.\ndim_names : tuple or list of strings, default None\n    Explicit names to tensor dimensions.\npermutation : tuple or list integers, default None\n    Indices of the desired ordering of the original dimensions.\n    The indices contain a permutation of the values ``[0, 1, .., N-1]`` where\n    N is the number of dimensions. The permutation indicates which dimension\n    of the logical layout corresponds to which dimension of the physical tensor.\n    For more information on this parameter see\n    :ref:`fixed_shape_tensor_extension`.\n\nExamples\n--------\nCreate an instance of fixed shape tensor extension type:\n\n>>> import pyarrow as pa\n>>> tensor_type = pa.fixed_shape_tensor(pa.int32(), [2, 2])\n>>> tensor_type\nFixedShapeTensorType(extension<arrow.fixed_shape_tensor[value_type=int32, shape=[2,2]]>)\n\nInspect the data type:\n\n>>> tensor_type.value_type\nDataType(int32)\n>>> tensor_type.shape\n[2, 2]\n\nCreate a table with fixed shape tensor extension array:\n\n>>> arr = [[1, 2, 3, 4], [10, 20, 30, 40], [100, 200, 300, 400]]\n>>> storage = pa.array(arr, pa.list_(pa.int32(), 4))\n>>> tensor = pa.ExtensionArray.from_storage(tensor_type, storage)\n>>> pa.table([tensor], names=[\"tensor_array\"])\npyarrow.Table\ntensor_array: extension<arrow.fixed_shape_tensor[value_type=int32, shape=[2,2]]>\n----\ntensor_array: [[[1,2,3,4],[10,20,30,40],[100,200,300,400]]]\n\nCreate an instance of fixed shape tensor extension type with names\nof tensor dimensions:\n\n>>> tensor_type = pa.fixed_shape_tensor(pa.int8(), (2, 2, 3),\n...                           ""          dim_names=['C', 'H', 'W'])\n>>> tensor_type.dim_names\n['C', 'H', 'W']\n\nCreate an instance of fixed shape tensor extension type with\npermutation:\n\n>>> tensor_type = pa.fixed_shape_tensor(pa.int8(), (2, 2, 3),\n...                                     permutation=[0, 2, 1])\n>>> tensor_type.permutation\n[0, 2, 1]\n\nReturns\n-------\ntype : FixedShapeTensorType");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_167fixed_shape_tensor = {"fixed_shape_tensor", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_167fixed_shape_tensor, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_166fixed_shape_tensor};
    static PyObject *__pyx_pw_7pyarrow_3lib_167fixed_shape_tensor(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v_value_type = 0;
      PyObject *__pyx_v_shape = 0;
      PyObject *__pyx_v_dim_names = 0;
      PyObject *__pyx_v_permutation = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[4] = {0,0,0,0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("fixed_shape_tensor (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_value_type,&__pyx_mstate_global->__pyx_n_u_shape,&__pyx_mstate_global->__pyx_n_u_dim_names,&__pyx_mstate_global->__pyx_n_u_permutation,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 5559, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  4:
            values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(1, 5559, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  3:
            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 5559, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 5559, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 5559, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "fixed_shape_tensor", 0) < (0)) __PYX_ERR(1, 5559, __pyx_L3_error)
          if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
          if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None));
          for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("fixed_shape_tensor", 0, 2, 4, i); __PYX_ERR(1, 5559, __pyx_L3_error) }
          }
        } else {
          switch (__pyx_nargs) {
            case  4:
            values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(1, 5559, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  3:
            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 5559, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 5559, __pyx_L3_error)
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 5559, __pyx_L3_error)
            break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
          if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None));
        }
        __pyx_v_value_type = ((struct __pyx_obj_7pyarrow_3lib_DataType *)values[0]);
        __pyx_v_shape = values[1];
        __pyx_v_dim_names = values[2];
        __pyx_v_permutation = values[3];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("fixed_shape_tensor", 0, 2, 4, __pyx_nargs); __PYX_ERR(1, 5559, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.fixed_shape_tensor", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_value_type), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType, 1, "value_type", 0))) __PYX_ERR(1, 5559, __pyx_L1_error)
      __pyx_r = __pyx_pf_7pyarrow_3lib_166fixed_shape_tensor(__pyx_self, __pyx_v_value_type, __pyx_v_shape, __pyx_v_dim_names, __pyx_v_permutation);

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = NULL;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      goto __pyx_L7_cleaned_up;
      __pyx_L0:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __pyx_L7_cleaned_up:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_166fixed_shape_tensor(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v_value_type, PyObject *__pyx_v_shape, PyObject *__pyx_v_dim_names, PyObject *__pyx_v_permutation) {
      std::vector<int64_t>  __pyx_v_c_shape;
      std::vector<int64_t>  __pyx_v_c_permutation;
      std::vector<std::string>  __pyx_v_c_dim_names;
      std::shared_ptr< arrow::DataType>  __pyx_v_c_tensor_ext_type;
      PyObject *__pyx_v_i = NULL;
      PyObject *__pyx_v_x = NULL;
      struct __pyx_obj_7pyarrow_3lib_FixedShapeTensorType *__pyx_v_out = 0;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      int __pyx_t_1;
      PyObject *__pyx_t_2 = NULL;
      Py_ssize_t __pyx_t_3;
      PyObject *(*__pyx_t_4)(PyObject *);
      PyObject *__pyx_t_5 = NULL;
      int64_t __pyx_t_6;
      PyObject *__pyx_t_7 = NULL;
      PyObject *__pyx_t_8 = NULL;
      size_t __pyx_t_9;
      std::string __pyx_t_10;
      std::shared_ptr< arrow::DataType>  __pyx_t_11;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("fixed_shape_tensor", 0);

      /* "pyarrow/types.pxi":5635
 *         shared_ptr[CDataType] c_tensor_ext_type
 * 
 *     assert value_type is not None             # <<<<<<<<<<<<<<
 *     assert shape is not None
 * 
*/
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      if (unlikely(__pyx_assertions_enabled())) {
        __pyx_t_1 = (((PyObject *)__pyx_v_value_type) != Py_None);
        if (unlikely(!__pyx_t_1)) {
          __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
          __PYX_ERR(1, 5635, __pyx_L1_error)
        }
      }
      #else
      if ((1)); else __PYX_ERR(1, 5635, __pyx_L1_error)
      #endif

      /* "pyarrow/types.pxi":5636
 * 
 *     assert value_type is not None
 *     assert shape is not None             # <<<<<<<<<<<<<<
 * 
 *     for i in shape:
*/
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      if (unlikely(__pyx_assertions_enabled())) {
        __pyx_t_1 = (__pyx_v_shape != Py_None);
        if (unlikely(!__pyx_t_1)) {
          __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
          __PYX_ERR(1, 5636, __pyx_L1_error)
        }
      }
      #else
      if ((1)); else __PYX_ERR(1, 5636, __pyx_L1_error)
      #endif

      /* "pyarrow/types.pxi":5638
 *     assert shape is not None
 * 
 *     for i in shape:             # <<<<<<<<<<<<<<
 *         c_shape.push_back(i)
 * 
*/
      if (likely(PyList_CheckExact(__pyx_v_shape)) || PyTuple_CheckExact(__pyx_v_shape)) {
        __pyx_t_2 = __pyx_v_shape; __Pyx_INCREF(__pyx_t_2);
        __pyx_t_3 = 0;
        __pyx_t_4 = NULL;
      } else {
        __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_shape); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5638, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_4 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5638, __pyx_L1_error)
      }
      for (;;) {
        if (likely(!__pyx_t_4)) {
          if (likely(PyList_CheckExact(__pyx_t_2))) {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2);
              #if !CYTHON_ASSUME_SAFE_SIZE
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 5638, __pyx_L1_error)
              #endif
              if (__pyx_t_3 >= __pyx_temp) break;
            }
            __pyx_t_5 = __Pyx_PyList_GetItemRefFast(__pyx_t_2, __pyx_t_3, __Pyx_ReferenceSharing_OwnStrongReference);
            ++__pyx_t_3;
          } else {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2);
              #if !CYTHON_ASSUME_SAFE_SIZE
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 5638, __pyx_L1_error)
              #endif
              if (__pyx_t_3 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_5 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3));
            #else
            __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_3);
            #endif
            ++__pyx_t_3;
          }
          if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 5638, __pyx_L1_error)
        } else {
          __pyx_t_5 = __pyx_t_4(__pyx_t_2);
          if (unlikely(!__pyx_t_5)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(1, 5638, __pyx_L1_error)
              PyErr_Clear();
            }
            break;
          }
        }
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_5);
        __pyx_t_5 = 0;

        /* "pyarrow/types.pxi":5639
 * 
 *     for i in shape:
 *         c_shape.push_back(i)             # <<<<<<<<<<<<<<
 * 
 *     if permutation is not None:
*/
        __pyx_t_6 = __Pyx_PyLong_As_int64_t(__pyx_v_i); if (unlikely((__pyx_t_6 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(1, 5639, __pyx_L1_error)
        try {
          __pyx_v_c_shape.push_back(__pyx_t_6);
        } catch(...) {
          __Pyx_CppExn2PyErr();
          __PYX_ERR(1, 5639, __pyx_L1_error)
        }

        /* "pyarrow/types.pxi":5638
 *     assert shape is not None
 * 
 *     for i in shape:             # <<<<<<<<<<<<<<
 *         c_shape.push_back(i)
 * 
*/
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyarrow/types.pxi":5641
 *         c_shape.push_back(i)
 * 
 *     if permutation is not None:             # <<<<<<<<<<<<<<
 *         for i in permutation:
 *             c_permutation.push_back(i)
*/
      __pyx_t_1 = (__pyx_v_permutation != Py_None);
      if (__pyx_t_1) {

        /* "pyarrow/types.pxi":5642
 * 
 *     if permutation is not None:
 *         for i in permutation:             # <<<<<<<<<<<<<<
 *             c_permutation.push_back(i)
 * 
*/
        if (likely(PyList_CheckExact(__pyx_v_permutation)) || PyTuple_CheckExact(__pyx_v_permutation)) {
          __pyx_t_2 = __pyx_v_permutation; __Pyx_INCREF(__pyx_t_2);
          __pyx_t_3 = 0;
          __pyx_t_4 = NULL;
        } else {
          __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_permutation); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5642, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_4 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5642, __pyx_L1_error)
        }
        for (;;) {
          if (likely(!__pyx_t_4)) {
            if (likely(PyList_CheckExact(__pyx_t_2))) {
              {
                Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2);
                #if !CYTHON_ASSUME_SAFE_SIZE
                if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 5642, __pyx_L1_error)
                #endif
                if (__pyx_t_3 >= __pyx_temp) break;
              }
              __pyx_t_5 = __Pyx_PyList_GetItemRefFast(__pyx_t_2, __pyx_t_3, __Pyx_ReferenceSharing_OwnStrongReference);
              ++__pyx_t_3;
            } else {
              {
                Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2);
                #if !CYTHON_ASSUME_SAFE_SIZE
                if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 5642, __pyx_L1_error)
                #endif
                if (__pyx_t_3 >= __pyx_temp) break;
              }
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_5 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3));
              #else
              __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_3);
              #endif
              ++__pyx_t_3;
            }
            if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 5642, __pyx_L1_error)
          } else {
            __pyx_t_5 = __pyx_t_4(__pyx_t_2);
            if (unlikely(!__pyx_t_5)) {
              PyObject* exc_type = PyErr_Occurred();
              if (exc_type) {
                if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(1, 5642, __pyx_L1_error)
                PyErr_Clear();
              }
              break;
            }
          }
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_5);
          __pyx_t_5 = 0;

          /* "pyarrow/types.pxi":5643
 *     if permutation is not None:
 *         for i in permutation:
 *             c_permutation.push_back(i)             # <<<<<<<<<<<<<<
 * 
 *     if dim_names is not None:
*/
          __pyx_t_6 = __Pyx_PyLong_As_int64_t(__pyx_v_i); if (unlikely((__pyx_t_6 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(1, 5643, __pyx_L1_error)
          try {
            __pyx_v_c_permutation.push_back(__pyx_t_6);
          } catch(...) {
            __Pyx_CppExn2PyErr();
            __PYX_ERR(1, 5643, __pyx_L1_error)
          }

          /* "pyarrow/types.pxi":5642
 * 
 *     if permutation is not None:
 *         for i in permutation:             # <<<<<<<<<<<<<<
 *             c_permutation.push_back(i)
 * 
*/
        }
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

        /* "pyarrow/types.pxi":5641
 *         c_shape.push_back(i)
 * 
 *     if permutation is not None:             # <<<<<<<<<<<<<<
 *         for i in permutation:
 *             c_permutation.push_back(i)
*/
      }

      /* "pyarrow/types.pxi":5645
 *             c_permutation.push_back(i)
 * 
 *     if dim_names is not None:             # <<<<<<<<<<<<<<
 *         for x in dim_names:
 *             c_dim_names.push_back(tobytes(x))
*/
      __pyx_t_1 = (__pyx_v_dim_names != Py_None);
      if (__pyx_t_1) {

        /* "pyarrow/types.pxi":5646
 * 
 *     if dim_names is not None:
 *         for x in dim_names:             # <<<<<<<<<<<<<<
 *             c_dim_names.push_back(tobytes(x))
 * 
*/
        if (likely(PyList_CheckExact(__pyx_v_dim_names)) || PyTuple_CheckExact(__pyx_v_dim_names)) {
          __pyx_t_2 = __pyx_v_dim_names; __Pyx_INCREF(__pyx_t_2);
          __pyx_t_3 = 0;
          __pyx_t_4 = NULL;
        } else {
          __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_dim_names); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5646, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_4 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5646, __pyx_L1_error)
        }
        for (;;) {
          if (likely(!__pyx_t_4)) {
            if (likely(PyList_CheckExact(__pyx_t_2))) {
              {
                Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2);
                #if !CYTHON_ASSUME_SAFE_SIZE
                if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 5646, __pyx_L1_error)
                #endif
                if (__pyx_t_3 >= __pyx_temp) break;
              }
              __pyx_t_5 = __Pyx_PyList_GetItemRefFast(__pyx_t_2, __pyx_t_3, __Pyx_ReferenceSharing_OwnStrongReference);
              ++__pyx_t_3;
            } else {
              {
                Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2);
                #if !CYTHON_ASSUME_SAFE_SIZE
                if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 5646, __pyx_L1_error)
                #endif
                if (__pyx_t_3 >= __pyx_temp) break;
              }
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_5 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3));
              #else
              __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_3);
              #endif
              ++__pyx_t_3;
            }
            if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 5646, __pyx_L1_error)
          } else {
            __pyx_t_5 = __pyx_t_4(__pyx_t_2);
            if (unlikely(!__pyx_t_5)) {
              PyObject* exc_type = PyErr_Occurred();
              if (exc_type) {
                if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(1, 5646, __pyx_L1_error)
                PyErr_Clear();
              }
              break;
            }
          }
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_5);
          __pyx_t_5 = 0;

          /* "pyarrow/types.pxi":5647
 *     if dim_names is not None:
 *         for x in dim_names:
 *             c_dim_names.push_back(tobytes(x))             # <<<<<<<<<<<<<<
 * 
 *     cdef FixedShapeTensorType out = FixedShapeTensorType.__new__(FixedShapeTensorType)
*/
          __pyx_t_7 = NULL;
          __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_tobytes); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 5647, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __pyx_t_9 = 1;
          #if CYTHON_UNPACK_METHODS
          if (unlikely(PyMethod_Check(__pyx_t_8))) {
            __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8);
            assert(__pyx_t_7);
            PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8);
            __Pyx_INCREF(__pyx_t_7);
            __Pyx_INCREF(__pyx__function);
            __Pyx_DECREF_SET(__pyx_t_8, __pyx__function);
            __pyx_t_9 = 0;
          }
          #endif
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_x};
            __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
            if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 5647, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
          }
          __pyx_t_10 = __pyx_convert_string_from_py_6libcpp_6string_std__in_string(__pyx_t_5); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 5647, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          try {
            __pyx_v_c_dim_names.push_back(__pyx_t_10);
          } catch(...) {
            __Pyx_CppExn2PyErr();
            __PYX_ERR(1, 5647, __pyx_L1_error)
          }

          /* "pyarrow/types.pxi":5646
 * 
 *     if dim_names is not None:
 *         for x in dim_names:             # <<<<<<<<<<<<<<
 *             c_dim_names.push_back(tobytes(x))
 * 
*/
        }
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

        /* "pyarrow/types.pxi":5645
 *             c_permutation.push_back(i)
 * 
 *     if dim_names is not None:             # <<<<<<<<<<<<<<
 *         for x in dim_names:
 *             c_dim_names.push_back(tobytes(x))
*/
      }

      /* "pyarrow/types.pxi":5649
 *             c_dim_names.push_back(tobytes(x))
 * 
 *     cdef FixedShapeTensorType out = FixedShapeTensorType.__new__(FixedShapeTensorType)             # <<<<<<<<<<<<<<
 * 
 *     with nogil:
*/
      __pyx_t_2 = ((PyObject *)__pyx_tp_new_7pyarrow_3lib_FixedShapeTensorType(((PyTypeObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_FixedShapeTensorType), __pyx_mstate_global->__pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5649, __pyx_L1_error)
      __Pyx_GOTREF((PyObject *)__pyx_t_2);
      __pyx_v_out = ((struct __pyx_obj_7pyarrow_3lib_FixedShapeTensorType *)__pyx_t_2);
      __pyx_t_2 = 0;

      /* "pyarrow/types.pxi":5651
 *     cdef FixedShapeTensorType out = FixedShapeTensorType.__new__(FixedShapeTensorType)
 * 
 *     with nogil:             # <<<<<<<<<<<<<<
 *         c_tensor_ext_type = GetResultValue(CFixedShapeTensorType.Make(
 *             value_type.sp_type, c_shape, c_permutation, c_dim_names))
*/
      {
          PyThreadState * _save;
          _save = PyEval_SaveThread();
          __Pyx_FastGIL_Remember();
          /*try:*/ {

            /* "pyarrow/types.pxi":5653
 *     with nogil:
 *         c_tensor_ext_type = GetResultValue(CFixedShapeTensorType.Make(
 *             value_type.sp_type, c_shape, c_permutation, c_dim_names))             # <<<<<<<<<<<<<<
 * 
 *     out.init(c_tensor_ext_type)
*/
            if (unlikely(((PyObject *)__pyx_v_value_type) == Py_None)) {
              PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_type");
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              __PYX_ERR(1, 5653, __pyx_L15_error)
            }

            /* "pyarrow/types.pxi":5652
 * 
 *     with nogil:
 *         c_tensor_ext_type = GetResultValue(CFixedShapeTensorType.Make(             # <<<<<<<<<<<<<<
 *             value_type.sp_type, c_shape, c_permutation, c_dim_names))
 * 
*/
            __pyx_t_11 = arrow::py::GetResultValue<std::shared_ptr< arrow::DataType> >( arrow::extension::FixedShapeTensorType::Make(__pyx_v_value_type->sp_type, __pyx_v_c_shape, __pyx_v_c_permutation, __pyx_v_c_dim_names)); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 5652, __pyx_L15_error)
            __pyx_v_c_tensor_ext_type = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_11);
          }

          /* "pyarrow/types.pxi":5651
 *     cdef FixedShapeTensorType out = FixedShapeTensorType.__new__(FixedShapeTensorType)
 * 
 *     with nogil:             # <<<<<<<<<<<<<<
 *         c_tensor_ext_type = GetResultValue(CFixedShapeTensorType.Make(
 *             value_type.sp_type, c_shape, c_permutation, c_dim_names))
*/
          /*finally:*/ {
            /*normal exit:*/{
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L16;
            }
            __pyx_L15_error: {
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L1_error;
            }
            __pyx_L16:;
          }
      }

      /* "pyarrow/types.pxi":5655
 *             value_type.sp_type, c_shape, c_permutation, c_dim_names))
 * 
 *     out.init(c_tensor_ext_type)             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
      if (unlikely(((PyObject *)__pyx_v_out) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "init");
        __PYX_ERR(1, 5655, __pyx_L1_error)
      }
      ((struct __pyx_vtabstruct_7pyarrow_3lib_FixedShapeTensorType *)__pyx_v_out->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.init(((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_v_out), __pyx_v_c_tensor_ext_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 5655, __pyx_L1_error)

      /* "pyarrow/types.pxi":5657
 *     out.init(c_tensor_ext_type)
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF((PyObject *)__pyx_v_out);
      __pyx_r = ((PyObject *)__pyx_v_out);
      goto __pyx_L0;

      /* "pyarrow/types.pxi":5559
 * 
 * 
 * def fixed_shape_tensor(DataType value_type, shape, dim_names=None, permutation=None):             # <<<<<<<<<<<<<<
 *     """
 *     Create instance of fixed shape tensor extension type with shape and optional
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_8);
      __Pyx_AddTraceback("pyarrow.lib.fixed_shape_tensor", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_i);
      __Pyx_XDECREF(__pyx_v_x);
      __Pyx_XDECREF((PyObject *)__pyx_v_out);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/types.pxi":5660
 * 
 * 
 * def bool8():             # <<<<<<<<<<<<<<
 *     """
 *     Create instance of bool8 extension type.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_169bool8(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_168bool8, "bool8()\n\nCreate instance of bool8 extension type.\n\nExamples\n--------\nCreate an instance of bool8 extension type:\n\n>>> import pyarrow as pa\n>>> type = pa.bool8()\n>>> type\nBool8Type(extension<arrow.bool8>)\n\nInspect the data type:\n\n>>> type.storage_type\nDataType(int8)\n\nCreate a table with a bool8 array:\n\n>>> arr = [-1, 0, 1, 2, None]\n>>> storage = pa.array(arr, pa.int8())\n>>> other = pa.ExtensionArray.from_storage(type, storage)\n>>> pa.table([other], names=[\"unknown_col\"])\npyarrow.Table\nunknown_col: extension<arrow.bool8>\n----\nunknown_col: [[-1,0,1,2,null]]\n\nReturns\n-------\ntype : Bool8Type");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_169bool8 = {"bool8", (PyCFunction)__pyx_pw_7pyarrow_3lib_169bool8, METH_NOARGS, __pyx_doc_7pyarrow_3lib_168bool8};
    static PyObject *__pyx_pw_7pyarrow_3lib_169bool8(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("bool8 (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_168bool8(__pyx_self);

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

    static PyObject *__pyx_pf_7pyarrow_3lib_168bool8(CYTHON_UNUSED PyObject *__pyx_self) {
      struct __pyx_obj_7pyarrow_3lib_Bool8Type *__pyx_v_out = 0;
      std::shared_ptr< arrow::DataType>  __pyx_v_c_type;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      std::shared_ptr< arrow::DataType>  __pyx_t_2;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("bool8", 0);

      /* "pyarrow/types.pxi":5694
 *     """
 * 
 *     cdef Bool8Type out = Bool8Type.__new__(Bool8Type)             # <<<<<<<<<<<<<<
 * 
 *     c_type = GetResultValue(CBool8Type.Make())
*/
      __pyx_t_1 = ((PyObject *)__pyx_tp_new_7pyarrow_3lib_Bool8Type(((PyTypeObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Bool8Type), __pyx_mstate_global->__pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5694, __pyx_L1_error)
      __Pyx_GOTREF((PyObject *)__pyx_t_1);
      __pyx_v_out = ((struct __pyx_obj_7pyarrow_3lib_Bool8Type *)__pyx_t_1);
      __pyx_t_1 = 0;

      /* "pyarrow/types.pxi":5696
 *     cdef Bool8Type out = Bool8Type.__new__(Bool8Type)
 * 
 *     c_type = GetResultValue(CBool8Type.Make())             # <<<<<<<<<<<<<<
 * 
 *     out.init(c_type)
*/
      __pyx_t_2 = arrow::py::GetResultValue<std::shared_ptr< arrow::DataType> >( arrow::extension::Bool8Type::Make()); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 5696, __pyx_L1_error)
      __pyx_v_c_type = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_2);

      /* "pyarrow/types.pxi":5698
 *     c_type = GetResultValue(CBool8Type.Make())
 * 
 *     out.init(c_type)             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
      if (unlikely(((PyObject *)__pyx_v_out) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "init");
        __PYX_ERR(1, 5698, __pyx_L1_error)
      }
      ((struct __pyx_vtabstruct_7pyarrow_3lib_Bool8Type *)__pyx_v_out->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.init(((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_v_out), __pyx_v_c_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 5698, __pyx_L1_error)

      /* "pyarrow/types.pxi":5700
 *     out.init(c_type)
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF((PyObject *)__pyx_v_out);
      __pyx_r = ((PyObject *)__pyx_v_out);
      goto __pyx_L0;

      /* "pyarrow/types.pxi":5660
 * 
 * 
 * def bool8():             # <<<<<<<<<<<<<<
 *     """
 *     Create instance of bool8 extension type.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("pyarrow.lib.bool8", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF((PyObject *)__pyx_v_out);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/types.pxi":5703
 * 
 * 
 * def opaque(DataType storage_type, str type_name not None, str vendor_name not None):             # <<<<<<<<<<<<<<
 *     """
 *     Create instance of opaque extension type.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_171opaque(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_170opaque, "opaque(DataType storage_type, str type_name, str vendor_name)\n\nCreate instance of opaque extension type.\n\nParameters\n----------\nstorage_type : DataType\n    The underlying data type.\ntype_name : str\n    The name of the type in the external system.\nvendor_name : str\n    The name of the external system.\n\nExamples\n--------\nCreate an instance of an opaque extension type:\n\n>>> import pyarrow as pa\n>>> type = pa.opaque(pa.binary(), \"other\", \"jdbc\")\n>>> type\nOpaqueType(extension<arrow.opaque[storage_type=binary, type_name=other, vendor_name=jdbc]>)\n\nInspect the data type:\n\n>>> type.storage_type\nDataType(binary)\n>>> type.type_name\n'other'\n>>> type.vendor_name\n'jdbc'\n\nCreate a table with an opaque array:\n\n>>> arr = [None, b\"foobar\"]\n>>> storage = pa.array(arr, pa.binary())\n>>> other = pa.ExtensionArray.from_storage(type, storage)\n>>> pa.table([other], names=[\"unknown_col\"])\npyarrow.Table\nunknown_col: extension<arrow.opaque[storage_type=binary, type_name=other, vendor_name=jdbc]>\n----\nunknown_col: [[null,666F6F626172]]\n\nReturns\n-------\ntype : OpaqueType");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_171opaque = {"opaque", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_171opaque, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_170opaque};
    static PyObject *__pyx_pw_7pyarrow_3lib_171opaque(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v_storage_type = 0;
      PyObject *__pyx_v_type_name = 0;
      PyObject *__pyx_v_vendor_name = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[3] = {0,0,0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("opaque (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_storage_type,&__pyx_mstate_global->__pyx_n_u_type_name,&__pyx_mstate_global->__pyx_n_u_vendor_name,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 5703, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  3:
            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 5703, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 5703, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 5703, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "opaque", 0) < (0)) __PYX_ERR(1, 5703, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("opaque", 1, 3, 3, i); __PYX_ERR(1, 5703, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 3)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 5703, __pyx_L3_error)
          values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 5703, __pyx_L3_error)
          values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 5703, __pyx_L3_error)
        }
        __pyx_v_storage_type = ((struct __pyx_obj_7pyarrow_3lib_DataType *)values[0]);
        __pyx_v_type_name = ((PyObject*)values[1]);
        __pyx_v_vendor_name = ((PyObject*)values[2]);
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("opaque", 1, 3, 3, __pyx_nargs); __PYX_ERR(1, 5703, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.opaque", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_storage_type), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType, 1, "storage_type", 0))) __PYX_ERR(1, 5703, __pyx_L1_error)
      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_type_name), (&PyUnicode_Type), 0, "type_name", 1))) __PYX_ERR(1, 5703, __pyx_L1_error)
      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vendor_name), (&PyUnicode_Type), 0, "vendor_name", 1))) __PYX_ERR(1, 5703, __pyx_L1_error)
      __pyx_r = __pyx_pf_7pyarrow_3lib_170opaque(__pyx_self, __pyx_v_storage_type, __pyx_v_type_name, __pyx_v_vendor_name);

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = NULL;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      goto __pyx_L7_cleaned_up;
      __pyx_L0:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __pyx_L7_cleaned_up:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_170opaque(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v_storage_type, PyObject *__pyx_v_type_name, PyObject *__pyx_v_vendor_name) {
      std::string __pyx_v_c_type_name;
      std::string __pyx_v_c_vendor_name;
      std::shared_ptr< arrow::extension::OpaqueType>  __pyx_v_c_opaque_type;
      std::shared_ptr< arrow::DataType>  __pyx_v_c_type;
      struct __pyx_obj_7pyarrow_3lib_OpaqueType *__pyx_v_out = 0;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      size_t __pyx_t_4;
      std::string __pyx_t_5;
      std::shared_ptr< arrow::extension::OpaqueType>  __pyx_t_6;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("opaque", 0);

      /* "pyarrow/types.pxi":5751
 * 
 *     cdef:
 *         c_string c_type_name = tobytes(type_name)             # <<<<<<<<<<<<<<
 *         c_string c_vendor_name = tobytes(vendor_name)
 *         shared_ptr[COpaqueType] c_opaque_type = make_shared[COpaqueType](
*/
      __pyx_t_2 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_tobytes); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5751, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
        assert(__pyx_t_2);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
        __pyx_t_4 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_type_name};
        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5751, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_t_5 = __pyx_convert_string_from_py_6libcpp_6string_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 5751, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_v_c_type_name = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_5);

      /* "pyarrow/types.pxi":5752
 *     cdef:
 *         c_string c_type_name = tobytes(type_name)
 *         c_string c_vendor_name = tobytes(vendor_name)             # <<<<<<<<<<<<<<
 *         shared_ptr[COpaqueType] c_opaque_type = make_shared[COpaqueType](
 *             storage_type.sp_type, c_type_name, c_vendor_name)
*/
      __pyx_t_3 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_tobytes); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5752, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
        assert(__pyx_t_3);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
        __pyx_t_4 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_vendor_name};
        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5752, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_t_5 = __pyx_convert_string_from_py_6libcpp_6string_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 5752, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_v_c_vendor_name = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_5);

      /* "pyarrow/types.pxi":5754
 *         c_string c_vendor_name = tobytes(vendor_name)
 *         shared_ptr[COpaqueType] c_opaque_type = make_shared[COpaqueType](
 *             storage_type.sp_type, c_type_name, c_vendor_name)             # <<<<<<<<<<<<<<
 *         shared_ptr[CDataType] c_type = static_pointer_cast[CDataType, COpaqueType](c_opaque_type)
 *         OpaqueType out = OpaqueType.__new__(OpaqueType)
*/
      if (unlikely(((PyObject *)__pyx_v_storage_type) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_type");
        __PYX_ERR(1, 5754, __pyx_L1_error)
      }

      /* "pyarrow/types.pxi":5753
 *         c_string c_type_name = tobytes(type_name)
 *         c_string c_vendor_name = tobytes(vendor_name)
 *         shared_ptr[COpaqueType] c_opaque_type = make_shared[COpaqueType](             # <<<<<<<<<<<<<<
 *             storage_type.sp_type, c_type_name, c_vendor_name)
 *         shared_ptr[CDataType] c_type = static_pointer_cast[CDataType, COpaqueType](c_opaque_type)
*/
      try {
        __pyx_t_6 = std::make_shared< arrow::extension::OpaqueType>(__pyx_v_storage_type->sp_type, __pyx_v_c_type_name, __pyx_v_c_vendor_name);
      } catch(...) {
        __Pyx_CppExn2PyErr();
        __PYX_ERR(1, 5753, __pyx_L1_error)
      }
      __pyx_v_c_opaque_type = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_6);

      /* "pyarrow/types.pxi":5755
 *         shared_ptr[COpaqueType] c_opaque_type = make_shared[COpaqueType](
 *             storage_type.sp_type, c_type_name, c_vendor_name)
 *         shared_ptr[CDataType] c_type = static_pointer_cast[CDataType, COpaqueType](c_opaque_type)             # <<<<<<<<<<<<<<
 *         OpaqueType out = OpaqueType.__new__(OpaqueType)
 *     out.init(c_type)
*/
      __pyx_v_c_type = std::static_pointer_cast< arrow::DataType, arrow::extension::OpaqueType>(__pyx_v_c_opaque_type);

      /* "pyarrow/types.pxi":5756
 *             storage_type.sp_type, c_type_name, c_vendor_name)
 *         shared_ptr[CDataType] c_type = static_pointer_cast[CDataType, COpaqueType](c_opaque_type)
 *         OpaqueType out = OpaqueType.__new__(OpaqueType)             # <<<<<<<<<<<<<<
 *     out.init(c_type)
 *     return out
*/
      __pyx_t_1 = ((PyObject *)__pyx_tp_new_7pyarrow_3lib_OpaqueType(((PyTypeObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_OpaqueType), __pyx_mstate_global->__pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5756, __pyx_L1_error)
      __Pyx_GOTREF((PyObject *)__pyx_t_1);
      __pyx_v_out = ((struct __pyx_obj_7pyarrow_3lib_OpaqueType *)__pyx_t_1);
      __pyx_t_1 = 0;

      /* "pyarrow/types.pxi":5757
 *         shared_ptr[CDataType] c_type = static_pointer_cast[CDataType, COpaqueType](c_opaque_type)
 *         OpaqueType out = OpaqueType.__new__(OpaqueType)
 *     out.init(c_type)             # <<<<<<<<<<<<<<
 *     return out
 * 
*/
      if (unlikely(((PyObject *)__pyx_v_out) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "init");
        __PYX_ERR(1, 5757, __pyx_L1_error)
      }
      ((struct __pyx_vtabstruct_7pyarrow_3lib_OpaqueType *)__pyx_v_out->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.init(((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_v_out), __pyx_v_c_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 5757, __pyx_L1_error)

      /* "pyarrow/types.pxi":5758
 *         OpaqueType out = OpaqueType.__new__(OpaqueType)
 *     out.init(c_type)
 *     return out             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF((PyObject *)__pyx_v_out);
      __pyx_r = ((PyObject *)__pyx_v_out);
      goto __pyx_L0;

      /* "pyarrow/types.pxi":5703
 * 
 * 
 * def opaque(DataType storage_type, str type_name not None, str vendor_name not None):             # <<<<<<<<<<<<<<
 *     """
 *     Create instance of opaque extension type.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_AddTraceback("pyarrow.lib.opaque", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF((PyObject *)__pyx_v_out);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/types.pxi":5820
 * 
 * 
 * def type_for_alias(name):             # <<<<<<<<<<<<<<
 *     """
 *     Return DataType given a string alias if one exists.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_173type_for_alias(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_172type_for_alias, "type_for_alias(name)\n\nReturn DataType given a string alias if one exists.\n\nParameters\n----------\nname : str\n    The alias of the DataType that should be retrieved.\n\nReturns\n-------\ntype : DataType");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_173type_for_alias = {"type_for_alias", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_173type_for_alias, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_172type_for_alias};
    static PyObject *__pyx_pw_7pyarrow_3lib_173type_for_alias(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_name = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("type_for_alias (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_name,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 5820, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 5820, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "type_for_alias", 0) < (0)) __PYX_ERR(1, 5820, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("type_for_alias", 1, 1, 1, i); __PYX_ERR(1, 5820, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 1)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 5820, __pyx_L3_error)
        }
        __pyx_v_name = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("type_for_alias", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 5820, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.type_for_alias", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_172type_for_alias(__pyx_self, __pyx_v_name);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_172type_for_alias(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name) {
      PyObject *__pyx_v_alias = NULL;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      size_t __pyx_t_3;
      PyObject *__pyx_t_4 = NULL;
      PyObject *__pyx_t_5 = NULL;
      PyObject *__pyx_t_6 = NULL;
      int __pyx_t_7;
      PyObject *__pyx_t_8 = NULL;
      PyObject *__pyx_t_9 = NULL;
      PyObject *__pyx_t_10 = NULL;
      PyObject *__pyx_t_11 = NULL;
      PyObject *__pyx_t_12 = NULL;
      int __pyx_t_13;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("type_for_alias", 0);
      __Pyx_INCREF(__pyx_v_name);

      /* "pyarrow/types.pxi":5833
 *     type : DataType
 *     """
 *     name = name.lower()             # <<<<<<<<<<<<<<
 *     try:
 *         alias = _type_aliases[name]
*/
      __pyx_t_2 = __pyx_v_name;
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_3 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_lower, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5833, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_DECREF_SET(__pyx_v_name, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "pyarrow/types.pxi":5834
 *     """
 *     name = name.lower()
 *     try:             # <<<<<<<<<<<<<<
 *         alias = _type_aliases[name]
 *     except KeyError:
*/
      {
        __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:*/ {

          /* "pyarrow/types.pxi":5835
 *     name = name.lower()
 *     try:
 *         alias = _type_aliases[name]             # <<<<<<<<<<<<<<
 *     except KeyError:
 *         raise ValueError(f'No type alias for {name}')
*/
          if (unlikely(__pyx_v_7pyarrow_3lib__type_aliases == Py_None)) {
            PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
            __PYX_ERR(1, 5835, __pyx_L3_error)
          }
          __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_7pyarrow_3lib__type_aliases, __pyx_v_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5835, __pyx_L3_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_v_alias = __pyx_t_1;
          __pyx_t_1 = 0;

          /* "pyarrow/types.pxi":5834
 *     """
 *     name = name.lower()
 *     try:             # <<<<<<<<<<<<<<
 *         alias = _type_aliases[name]
 *     except KeyError:
*/
        }
        __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_L8_try_end;
        __pyx_L3_error:;
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;

        /* "pyarrow/types.pxi":5836
 *     try:
 *         alias = _type_aliases[name]
 *     except KeyError:             # <<<<<<<<<<<<<<
 *         raise ValueError(f'No type alias for {name}')
 * 
*/
        __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_KeyError))));
        if (__pyx_t_7) {
          __Pyx_AddTraceback("pyarrow.lib.type_for_alias", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_8) < 0) __PYX_ERR(1, 5836, __pyx_L5_except_error)
          __Pyx_XGOTREF(__pyx_t_1);
          __Pyx_XGOTREF(__pyx_t_2);
          __Pyx_XGOTREF(__pyx_t_8);

          /* "pyarrow/types.pxi":5837
 *         alias = _type_aliases[name]
 *     except KeyError:
 *         raise ValueError(f'No type alias for {name}')             # <<<<<<<<<<<<<<
 * 
 *     if isinstance(alias, DataType):
*/
          __pyx_t_10 = NULL;
          __pyx_t_11 = __Pyx_PyObject_FormatSimple(__pyx_v_name, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 5837, __pyx_L5_except_error)
          __Pyx_GOTREF(__pyx_t_11);
          __pyx_t_12 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_No_type_alias_for, __pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 5837, __pyx_L5_except_error)
          __Pyx_GOTREF(__pyx_t_12);
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          __pyx_t_3 = 1;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_12};
            __pyx_t_9 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
            if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 5837, __pyx_L5_except_error)
            __Pyx_GOTREF(__pyx_t_9);
          }
          __Pyx_Raise(__pyx_t_9, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          __PYX_ERR(1, 5837, __pyx_L5_except_error)
        }
        goto __pyx_L5_except_error;

        /* "pyarrow/types.pxi":5834
 *     """
 *     name = name.lower()
 *     try:             # <<<<<<<<<<<<<<
 *         alias = _type_aliases[name]
 *     except KeyError:
*/
        __pyx_L5_except_error:;
        __Pyx_XGIVEREF(__pyx_t_4);
        __Pyx_XGIVEREF(__pyx_t_5);
        __Pyx_XGIVEREF(__pyx_t_6);
        __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
        goto __pyx_L1_error;
        __pyx_L8_try_end:;
      }

      /* "pyarrow/types.pxi":5839
 *         raise ValueError(f'No type alias for {name}')
 * 
 *     if isinstance(alias, DataType):             # <<<<<<<<<<<<<<
 *         return alias
 *     return alias()
*/
      __pyx_t_13 = __Pyx_TypeCheck(__pyx_v_alias, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType); 
      if (__pyx_t_13) {

        /* "pyarrow/types.pxi":5840
 * 
 *     if isinstance(alias, DataType):
 *         return alias             # <<<<<<<<<<<<<<
 *     return alias()
 * 
*/
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_v_alias);
        __pyx_r = __pyx_v_alias;
        goto __pyx_L0;

        /* "pyarrow/types.pxi":5839
 *         raise ValueError(f'No type alias for {name}')
 * 
 *     if isinstance(alias, DataType):             # <<<<<<<<<<<<<<
 *         return alias
 *     return alias()
*/
      }

      /* "pyarrow/types.pxi":5841
 *     if isinstance(alias, DataType):
 *         return alias
 *     return alias()             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = NULL;
      __Pyx_INCREF(__pyx_v_alias);
      __pyx_t_1 = __pyx_v_alias; 
      __pyx_t_3 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
        assert(__pyx_t_2);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_1, __pyx__function);
        __pyx_t_3 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
        __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_1, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 5841, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
      }
      __pyx_r = __pyx_t_8;
      __pyx_t_8 = 0;
      goto __pyx_L0;

      /* "pyarrow/types.pxi":5820
 * 
 * 
 * def type_for_alias(name):             # <<<<<<<<<<<<<<
 *     """
 *     Return DataType given a string alias if one exists.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_8);
      __Pyx_XDECREF(__pyx_t_9);
      __Pyx_XDECREF(__pyx_t_10);
      __Pyx_XDECREF(__pyx_t_11);
      __Pyx_XDECREF(__pyx_t_12);
      __Pyx_AddTraceback("pyarrow.lib.type_for_alias", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_alias);
      __Pyx_XDECREF(__pyx_v_name);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/types.pxi":5844
 * 
 * 
 * cpdef DataType ensure_type(object ty, bint allow_none=False):             # <<<<<<<<<<<<<<
 *     if allow_none and ty is None:
 *         return None
*/

    static PyObject *__pyx_pw_7pyarrow_3lib_175ensure_type(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    static struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_f_7pyarrow_3lib_ensure_type(PyObject *__pyx_v_ty, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_7pyarrow_3lib_ensure_type *__pyx_optional_args) {
      int __pyx_v_allow_none = ((int)0);
      struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      int __pyx_t_1;
      int __pyx_t_2;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      PyObject *__pyx_t_5 = NULL;
      size_t __pyx_t_6;
      PyObject *__pyx_t_7 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("ensure_type", 0);
      if (__pyx_optional_args) {
        if (__pyx_optional_args->__pyx_n > 0) {
          __pyx_v_allow_none = __pyx_optional_args->allow_none;
        }
      }

      /* "pyarrow/types.pxi":5845
 * 
 * cpdef DataType ensure_type(object ty, bint allow_none=False):
 *     if allow_none and ty is None:             # <<<<<<<<<<<<<<
 *         return None
 *     elif isinstance(ty, DataType):
*/
      if (__pyx_v_allow_none) {
      } else {
        __pyx_t_1 = __pyx_v_allow_none;
        goto __pyx_L4_bool_binop_done;
      }
      __pyx_t_2 = (__pyx_v_ty == Py_None);
      __pyx_t_1 = __pyx_t_2;
      __pyx_L4_bool_binop_done:;
      if (__pyx_t_1) {

        /* "pyarrow/types.pxi":5846
 * cpdef DataType ensure_type(object ty, bint allow_none=False):
 *     if allow_none and ty is None:
 *         return None             # <<<<<<<<<<<<<<
 *     elif isinstance(ty, DataType):
 *         return ty
*/
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_r = ((struct __pyx_obj_7pyarrow_3lib_DataType *)Py_None); __Pyx_INCREF(Py_None);
        goto __pyx_L0;

        /* "pyarrow/types.pxi":5845
 * 
 * cpdef DataType ensure_type(object ty, bint allow_none=False):
 *     if allow_none and ty is None:             # <<<<<<<<<<<<<<
 *         return None
 *     elif isinstance(ty, DataType):
*/
      }

      /* "pyarrow/types.pxi":5847
 *     if allow_none and ty is None:
 *         return None
 *     elif isinstance(ty, DataType):             # <<<<<<<<<<<<<<
 *         return ty
 *     elif isinstance(ty, str):
*/
      __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_ty, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType); 
      if (__pyx_t_1) {

        /* "pyarrow/types.pxi":5848
 *         return None
 *     elif isinstance(ty, DataType):
 *         return ty             # <<<<<<<<<<<<<<
 *     elif isinstance(ty, str):
 *         return type_for_alias(ty)
*/
        __Pyx_XDECREF((PyObject *)__pyx_r);
        if (!(likely(((__pyx_v_ty) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_ty, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType))))) __PYX_ERR(1, 5848, __pyx_L1_error)
        __Pyx_INCREF(__pyx_v_ty);
        __pyx_r = ((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_v_ty);
        goto __pyx_L0;

        /* "pyarrow/types.pxi":5847
 *     if allow_none and ty is None:
 *         return None
 *     elif isinstance(ty, DataType):             # <<<<<<<<<<<<<<
 *         return ty
 *     elif isinstance(ty, str):
*/
      }

      /* "pyarrow/types.pxi":5849
 *     elif isinstance(ty, DataType):
 *         return ty
 *     elif isinstance(ty, str):             # <<<<<<<<<<<<<<
 *         return type_for_alias(ty)
 *     else:
*/
      __pyx_t_1 = PyUnicode_Check(__pyx_v_ty); 
      if (likely(__pyx_t_1)) {

        /* "pyarrow/types.pxi":5850
 *         return ty
 *     elif isinstance(ty, str):
 *         return type_for_alias(ty)             # <<<<<<<<<<<<<<
 *     else:
 *         raise TypeError(f'DataType expected, got {type(ty)!r}')
*/
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_4 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_type_for_alias); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 5850, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_6 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
          assert(__pyx_t_4);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
          __pyx_t_6 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_ty};
          __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5850, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType))))) __PYX_ERR(1, 5850, __pyx_L1_error)
        __pyx_r = ((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_t_3);
        __pyx_t_3 = 0;
        goto __pyx_L0;

        /* "pyarrow/types.pxi":5849
 *     elif isinstance(ty, DataType):
 *         return ty
 *     elif isinstance(ty, str):             # <<<<<<<<<<<<<<
 *         return type_for_alias(ty)
 *     else:
*/
      }

      /* "pyarrow/types.pxi":5852
 *         return type_for_alias(ty)
 *     else:
 *         raise TypeError(f'DataType expected, got {type(ty)!r}')             # <<<<<<<<<<<<<<
 * 
 * 
*/
      /*else*/ {
        __pyx_t_5 = NULL;
        __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(((PyObject *)Py_TYPE(__pyx_v_ty))), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5852, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_DataType_expected_got, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 5852, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_6 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_7};
          __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5852, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        __Pyx_Raise(__pyx_t_3, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __PYX_ERR(1, 5852, __pyx_L1_error)
      }

      /* "pyarrow/types.pxi":5844
 * 
 * 
 * cpdef DataType ensure_type(object ty, bint allow_none=False):             # <<<<<<<<<<<<<<
 *     if allow_none and ty is None:
 *         return None
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_7);
      __Pyx_AddTraceback("pyarrow.lib.ensure_type", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = 0;
      __pyx_L0:;
      __Pyx_XGIVEREF((PyObject *)__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_175ensure_type(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_174ensure_type, "ensure_type(ty, bool allow_none=False) -> DataType");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_175ensure_type = {"ensure_type", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_175ensure_type, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_174ensure_type};
    static PyObject *__pyx_pw_7pyarrow_3lib_175ensure_type(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_ty = 0;
      int __pyx_v_allow_none;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[2] = {0,0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("ensure_type (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_ty,&__pyx_mstate_global->__pyx_n_u_allow_none,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 5844, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 5844, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 5844, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "ensure_type", 0) < (0)) __PYX_ERR(1, 5844, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("ensure_type", 0, 1, 2, i); __PYX_ERR(1, 5844, __pyx_L3_error) }
          }
        } else {
          switch (__pyx_nargs) {
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 5844, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 5844, __pyx_L3_error)
            break;
            default: goto __pyx_L5_argtuple_error;
          }
        }
        __pyx_v_ty = values[0];
        if (values[1]) {
          __pyx_v_allow_none = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_allow_none == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 5844, __pyx_L3_error)
        } else {
          __pyx_v_allow_none = ((int)0);
        }
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("ensure_type", 0, 1, 2, __pyx_nargs); __PYX_ERR(1, 5844, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.ensure_type", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_174ensure_type(__pyx_self, __pyx_v_ty, __pyx_v_allow_none);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_174ensure_type(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_ty, int __pyx_v_allow_none) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      struct __pyx_opt_args_7pyarrow_3lib_ensure_type __pyx_t_2;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("ensure_type", 0);
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2.__pyx_n = 1;
      __pyx_t_2.allow_none = __pyx_v_allow_none;
      __pyx_t_1 = ((PyObject *)__pyx_f_7pyarrow_3lib_ensure_type(__pyx_v_ty, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5844, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

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

    /* "pyarrow/types.pxi":5855
 * 
 * 
 * def schema(fields, metadata=None):             # <<<<<<<<<<<<<<
 *     """
 *     Construct pyarrow.Schema from collection of fields.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_177schema(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_176schema, "schema(fields, metadata=None)\n\nConstruct pyarrow.Schema from collection of fields.\n\nParameters\n----------\nfields : iterable of Fields or tuples, or mapping of strings to DataTypes\n    Can also pass an object that implements the Arrow PyCapsule Protocol\n    for schemas (has an ``__arrow_c_schema__`` method).\nmetadata : dict, default None\n    Keys and values must be coercible to bytes.\n\nExamples\n--------\nCreate a Schema from iterable of tuples:\n\n>>> import pyarrow as pa\n>>> pa.schema([\n...     ('some_int', pa.int32()),\n...     ('some_string', pa.string()),\n...     pa.field('some_required_string', pa.string(), nullable=False)\n... ])\nsome_int: int32\nsome_string: string\nsome_required_string: string not null\n\nCreate a Schema from iterable of Fields:\n\n>>> pa.schema([\n...     pa.field('some_int', pa.int32()),\n...     pa.field('some_string', pa.string())\n... ])\nsome_int: int32\nsome_string: string\n\nDataTypes can also be passed as strings. The following is equivalent to the\nabove example:\n\n>>> pa.schema([\n...     pa.field('some_int', \"int32\"),\n...     pa.field('some_string', \"string\")\n... ])\nsome_int: int32\nsome_string: string\n\nOr more concisely:\n\n>>> pa.schema([\n...     ('some_int', \"int32\"),\n...     ('some_string', \"string\")\n... ])\nsome_int: int32\nsome_string: string\n\nReturns\n-------\nschema : pyarrow.Schema");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_177schema = {"schema", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_177schema, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_176schema};
    static PyObject *__pyx_pw_7pyarrow_3lib_177schema(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_fields = 0;
      PyObject *__pyx_v_metadata = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[2] = {0,0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("schema (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_fields,&__pyx_mstate_global->__pyx_n_u_metadata,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 5855, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 5855, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 5855, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "schema", 0) < (0)) __PYX_ERR(1, 5855, __pyx_L3_error)
          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("schema", 0, 1, 2, i); __PYX_ERR(1, 5855, __pyx_L3_error) }
          }
        } else {
          switch (__pyx_nargs) {
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 5855, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 5855, __pyx_L3_error)
            break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
        }
        __pyx_v_fields = values[0];
        __pyx_v_metadata = values[1];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("schema", 0, 1, 2, __pyx_nargs); __PYX_ERR(1, 5855, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.schema", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_176schema(__pyx_self, __pyx_v_fields, __pyx_v_metadata);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_176schema(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_fields, PyObject *__pyx_v_metadata) {
      std::shared_ptr< arrow::KeyValueMetadata const >  __pyx_v_c_meta;
      std::shared_ptr< arrow::Schema>  __pyx_v_c_schema;
      struct __pyx_obj_7pyarrow_3lib_Schema *__pyx_v_result = 0;
      struct __pyx_obj_7pyarrow_3lib_Field *__pyx_v_py_field = 0;
      std::vector<std::shared_ptr< arrow::Field> >  __pyx_v_c_fields;
      PyObject *__pyx_v_item = NULL;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      int __pyx_t_1;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      PyObject *__pyx_t_5 = NULL;
      size_t __pyx_t_6;
      Py_ssize_t __pyx_t_7;
      PyObject *(*__pyx_t_8)(PyObject *);
      struct __pyx_opt_args_7pyarrow_3lib_ensure_metadata __pyx_t_9;
      std::shared_ptr< arrow::KeyValueMetadata const >  __pyx_t_10;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("schema", 0);
      __Pyx_INCREF(__pyx_v_fields);
      __Pyx_INCREF(__pyx_v_metadata);

      /* "pyarrow/types.pxi":5920
 *         vector[shared_ptr[CField]] c_fields
 * 
 *     if hasattr(fields, "__arrow_c_schema__"):             # <<<<<<<<<<<<<<
 *         result = Schema._import_from_c_capsule(fields.__arrow_c_schema__())
 *         if metadata is not None:
*/
      __pyx_t_1 = __Pyx_HasAttr(__pyx_v_fields, __pyx_mstate_global->__pyx_n_u_arrow_c_schema); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 5920, __pyx_L1_error)
      if (__pyx_t_1) {

        /* "pyarrow/types.pxi":5921
 * 
 *     if hasattr(fields, "__arrow_c_schema__"):
 *         result = Schema._import_from_c_capsule(fields.__arrow_c_schema__())             # <<<<<<<<<<<<<<
 *         if metadata is not None:
 *             result = result.with_metadata(metadata)
*/
        __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Schema);
        __Pyx_INCREF(__pyx_t_3);
        __pyx_t_5 = __pyx_v_fields;
        __Pyx_INCREF(__pyx_t_5);
        __pyx_t_6 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
          __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_arrow_c_schema, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5921, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
        }
        __pyx_t_6 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
          __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_import_from_c_capsule, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5921, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Schema))))) __PYX_ERR(1, 5921, __pyx_L1_error)
        __pyx_v_result = ((struct __pyx_obj_7pyarrow_3lib_Schema *)__pyx_t_2);
        __pyx_t_2 = 0;

        /* "pyarrow/types.pxi":5922
 *     if hasattr(fields, "__arrow_c_schema__"):
 *         result = Schema._import_from_c_capsule(fields.__arrow_c_schema__())
 *         if metadata is not None:             # <<<<<<<<<<<<<<
 *             result = result.with_metadata(metadata)
 *         return result
*/
        __pyx_t_1 = (__pyx_v_metadata != Py_None);
        if (__pyx_t_1) {

          /* "pyarrow/types.pxi":5923
 *         result = Schema._import_from_c_capsule(fields.__arrow_c_schema__())
 *         if metadata is not None:
 *             result = result.with_metadata(metadata)             # <<<<<<<<<<<<<<
 *         return result
 * 
*/
          __pyx_t_4 = ((PyObject *)__pyx_v_result);
          __Pyx_INCREF(__pyx_t_4);
          __pyx_t_6 = 0;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_metadata};
            __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_with_metadata, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
            if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5923, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
          }
          if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Schema))))) __PYX_ERR(1, 5923, __pyx_L1_error)
          __Pyx_DECREF_SET(__pyx_v_result, ((struct __pyx_obj_7pyarrow_3lib_Schema *)__pyx_t_2));
          __pyx_t_2 = 0;

          /* "pyarrow/types.pxi":5922
 *     if hasattr(fields, "__arrow_c_schema__"):
 *         result = Schema._import_from_c_capsule(fields.__arrow_c_schema__())
 *         if metadata is not None:             # <<<<<<<<<<<<<<
 *             result = result.with_metadata(metadata)
 *         return result
*/
        }

        /* "pyarrow/types.pxi":5924
 *         if metadata is not None:
 *             result = result.with_metadata(metadata)
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     if isinstance(fields, Mapping):
*/
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF((PyObject *)__pyx_v_result);
        __pyx_r = ((PyObject *)__pyx_v_result);
        goto __pyx_L0;

        /* "pyarrow/types.pxi":5920
 *         vector[shared_ptr[CField]] c_fields
 * 
 *     if hasattr(fields, "__arrow_c_schema__"):             # <<<<<<<<<<<<<<
 *         result = Schema._import_from_c_capsule(fields.__arrow_c_schema__())
 *         if metadata is not None:
*/
      }

      /* "pyarrow/types.pxi":5926
 *         return result
 * 
 *     if isinstance(fields, Mapping):             # <<<<<<<<<<<<<<
 *         fields = fields.items()
 * 
*/
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Mapping); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5926, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_1 = PyObject_IsInstance(__pyx_v_fields, __pyx_t_2); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 5926, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (__pyx_t_1) {

        /* "pyarrow/types.pxi":5927
 * 
 *     if isinstance(fields, Mapping):
 *         fields = fields.items()             # <<<<<<<<<<<<<<
 * 
 *     for item in fields:
*/
        __pyx_t_4 = __pyx_v_fields;
        __Pyx_INCREF(__pyx_t_4);
        __pyx_t_6 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
          __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_items, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5927, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __Pyx_DECREF_SET(__pyx_v_fields, __pyx_t_2);
        __pyx_t_2 = 0;

        /* "pyarrow/types.pxi":5926
 *         return result
 * 
 *     if isinstance(fields, Mapping):             # <<<<<<<<<<<<<<
 *         fields = fields.items()
 * 
*/
      }

      /* "pyarrow/types.pxi":5929
 *         fields = fields.items()
 * 
 *     for item in fields:             # <<<<<<<<<<<<<<
 *         if isinstance(item, tuple):
 *             py_field = field(*item)
*/
      if (likely(PyList_CheckExact(__pyx_v_fields)) || PyTuple_CheckExact(__pyx_v_fields)) {
        __pyx_t_2 = __pyx_v_fields; __Pyx_INCREF(__pyx_t_2);
        __pyx_t_7 = 0;
        __pyx_t_8 = NULL;
      } else {
        __pyx_t_7 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_fields); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5929, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_8 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 5929, __pyx_L1_error)
      }
      for (;;) {
        if (likely(!__pyx_t_8)) {
          if (likely(PyList_CheckExact(__pyx_t_2))) {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2);
              #if !CYTHON_ASSUME_SAFE_SIZE
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 5929, __pyx_L1_error)
              #endif
              if (__pyx_t_7 >= __pyx_temp) break;
            }
            __pyx_t_4 = __Pyx_PyList_GetItemRefFast(__pyx_t_2, __pyx_t_7, __Pyx_ReferenceSharing_OwnStrongReference);
            ++__pyx_t_7;
          } else {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2);
              #if !CYTHON_ASSUME_SAFE_SIZE
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 5929, __pyx_L1_error)
              #endif
              if (__pyx_t_7 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_4 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_7));
            #else
            __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_7);
            #endif
            ++__pyx_t_7;
          }
          if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5929, __pyx_L1_error)
        } else {
          __pyx_t_4 = __pyx_t_8(__pyx_t_2);
          if (unlikely(!__pyx_t_4)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(1, 5929, __pyx_L1_error)
              PyErr_Clear();
            }
            break;
          }
        }
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_4);
        __pyx_t_4 = 0;

        /* "pyarrow/types.pxi":5930
 * 
 *     for item in fields:
 *         if isinstance(item, tuple):             # <<<<<<<<<<<<<<
 *             py_field = field(*item)
 *         else:
*/
        __pyx_t_1 = PyTuple_Check(__pyx_v_item); 
        if (__pyx_t_1) {

          /* "pyarrow/types.pxi":5931
 *     for item in fields:
 *         if isinstance(item, tuple):
 *             py_field = field(*item)             # <<<<<<<<<<<<<<
 *         else:
 *             py_field = item
*/
          __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_field); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5931, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_3 = __Pyx_PySequence_Tuple(__pyx_v_item); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5931, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 5931, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Field))))) __PYX_ERR(1, 5931, __pyx_L1_error)
          __Pyx_XDECREF_SET(__pyx_v_py_field, ((struct __pyx_obj_7pyarrow_3lib_Field *)__pyx_t_5));
          __pyx_t_5 = 0;

          /* "pyarrow/types.pxi":5930
 * 
 *     for item in fields:
 *         if isinstance(item, tuple):             # <<<<<<<<<<<<<<
 *             py_field = field(*item)
 *         else:
*/
          goto __pyx_L8;
        }

        /* "pyarrow/types.pxi":5933
 *             py_field = field(*item)
 *         else:
 *             py_field = item             # <<<<<<<<<<<<<<
 *         if py_field is None:
 *             raise TypeError("field or tuple expected, got None")
*/
        /*else*/ {
          __pyx_t_5 = __pyx_v_item;
          __Pyx_INCREF(__pyx_t_5);
          if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Field))))) __PYX_ERR(1, 5933, __pyx_L1_error)
          __Pyx_XDECREF_SET(__pyx_v_py_field, ((struct __pyx_obj_7pyarrow_3lib_Field *)__pyx_t_5));
          __pyx_t_5 = 0;
        }
        __pyx_L8:;

        /* "pyarrow/types.pxi":5934
 *         else:
 *             py_field = item
 *         if py_field is None:             # <<<<<<<<<<<<<<
 *             raise TypeError("field or tuple expected, got None")
 *         c_fields.push_back(py_field.sp_field)
*/
        __pyx_t_1 = (((PyObject *)__pyx_v_py_field) == Py_None);
        if (unlikely(__pyx_t_1)) {

          /* "pyarrow/types.pxi":5935
 *             py_field = item
 *         if py_field is None:
 *             raise TypeError("field or tuple expected, got None")             # <<<<<<<<<<<<<<
 *         c_fields.push_back(py_field.sp_field)
 * 
*/
          __pyx_t_3 = NULL;
          __pyx_t_6 = 1;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_field_or_tuple_expected_got_None};
            __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 5935, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
          }
          __Pyx_Raise(__pyx_t_5, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __PYX_ERR(1, 5935, __pyx_L1_error)

          /* "pyarrow/types.pxi":5934
 *         else:
 *             py_field = item
 *         if py_field is None:             # <<<<<<<<<<<<<<
 *             raise TypeError("field or tuple expected, got None")
 *         c_fields.push_back(py_field.sp_field)
*/
        }

        /* "pyarrow/types.pxi":5936
 *         if py_field is None:
 *             raise TypeError("field or tuple expected, got None")
 *         c_fields.push_back(py_field.sp_field)             # <<<<<<<<<<<<<<
 * 
 *     metadata = ensure_metadata(metadata, allow_none=True)
*/
        if (unlikely(((PyObject *)__pyx_v_py_field) == Py_None)) {
          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_field");
          __PYX_ERR(1, 5936, __pyx_L1_error)
        }
        try {
          __pyx_v_c_fields.push_back(__pyx_v_py_field->sp_field);
        } catch(...) {
          __Pyx_CppExn2PyErr();
          __PYX_ERR(1, 5936, __pyx_L1_error)
        }

        /* "pyarrow/types.pxi":5929
 *         fields = fields.items()
 * 
 *     for item in fields:             # <<<<<<<<<<<<<<
 *         if isinstance(item, tuple):
 *             py_field = field(*item)
*/
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyarrow/types.pxi":5938
 *         c_fields.push_back(py_field.sp_field)
 * 
 *     metadata = ensure_metadata(metadata, allow_none=True)             # <<<<<<<<<<<<<<
 *     c_meta = pyarrow_unwrap_metadata(metadata)
 * 
*/
      __pyx_t_9.__pyx_n = 1;
      __pyx_t_9.allow_none = 1;
      __pyx_t_2 = ((PyObject *)__pyx_f_7pyarrow_3lib_ensure_metadata(__pyx_v_metadata, 0, &__pyx_t_9)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5938, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF_SET(__pyx_v_metadata, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "pyarrow/types.pxi":5939
 * 
 *     metadata = ensure_metadata(metadata, allow_none=True)
 *     c_meta = pyarrow_unwrap_metadata(metadata)             # <<<<<<<<<<<<<<
 * 
 *     c_schema.reset(new CSchema(c_fields, c_meta))
*/
      __pyx_t_10 = __pyx_f_7pyarrow_3lib_pyarrow_unwrap_metadata(__pyx_v_metadata); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 5939, __pyx_L1_error)
      __pyx_v_c_meta = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_10);

      /* "pyarrow/types.pxi":5941
 *     c_meta = pyarrow_unwrap_metadata(metadata)
 * 
 *     c_schema.reset(new CSchema(c_fields, c_meta))             # <<<<<<<<<<<<<<
 *     result = Schema.__new__(Schema)
 *     result.init_schema(c_schema)
*/
      __pyx_v_c_schema.reset(new  arrow::Schema(__pyx_v_c_fields, __pyx_v_c_meta));

      /* "pyarrow/types.pxi":5942
 * 
 *     c_schema.reset(new CSchema(c_fields, c_meta))
 *     result = Schema.__new__(Schema)             # <<<<<<<<<<<<<<
 *     result.init_schema(c_schema)
 * 
*/
      __pyx_t_2 = ((PyObject *)__pyx_tp_new_7pyarrow_3lib_Schema(((PyTypeObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Schema), __pyx_mstate_global->__pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5942, __pyx_L1_error)
      __Pyx_GOTREF((PyObject *)__pyx_t_2);
      __pyx_v_result = ((struct __pyx_obj_7pyarrow_3lib_Schema *)__pyx_t_2);
      __pyx_t_2 = 0;

      /* "pyarrow/types.pxi":5943
 *     c_schema.reset(new CSchema(c_fields, c_meta))
 *     result = Schema.__new__(Schema)
 *     result.init_schema(c_schema)             # <<<<<<<<<<<<<<
 * 
 *     return result
*/
      if (unlikely(((PyObject *)__pyx_v_result) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "init_schema");
        __PYX_ERR(1, 5943, __pyx_L1_error)
      }
      ((struct __pyx_vtabstruct_7pyarrow_3lib_Schema *)__pyx_v_result->__pyx_vtab)->init_schema(__pyx_v_result, __pyx_v_c_schema); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 5943, __pyx_L1_error)

      /* "pyarrow/types.pxi":5945
 *     result.init_schema(c_schema)
 * 
 *     return result             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF((PyObject *)__pyx_v_result);
      __pyx_r = ((PyObject *)__pyx_v_result);
      goto __pyx_L0;

      /* "pyarrow/types.pxi":5855
 * 
 * 
 * def schema(fields, metadata=None):             # <<<<<<<<<<<<<<
 *     """
 *     Construct pyarrow.Schema from collection of fields.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_AddTraceback("pyarrow.lib.schema", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF((PyObject *)__pyx_v_result);
      __Pyx_XDECREF((PyObject *)__pyx_v_py_field);
      __Pyx_XDECREF(__pyx_v_item);
      __Pyx_XDECREF(__pyx_v_fields);
      __Pyx_XDECREF(__pyx_v_metadata);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/types.pxi":5948
 * 
 * 
 * def from_numpy_dtype(object dtype):             # <<<<<<<<<<<<<<
 *     """
 *     Convert NumPy dtype to pyarrow.DataType.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_179from_numpy_dtype(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_178from_numpy_dtype, "from_numpy_dtype(dtype)\n\nConvert NumPy dtype to pyarrow.DataType.\n\nParameters\n----------\ndtype : the numpy dtype to convert\n\n\nExamples\n--------\nCreate a pyarrow DataType from NumPy dtype:\n\n>>> import pyarrow as pa\n>>> import numpy as np\n>>> pa.from_numpy_dtype(np.dtype('float16'))\nDataType(halffloat)\n>>> pa.from_numpy_dtype('U')\nDataType(string)\n>>> pa.from_numpy_dtype(bool)\nDataType(bool)\n>>> pa.from_numpy_dtype(np.str_)\nDataType(string)");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_179from_numpy_dtype = {"from_numpy_dtype", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_179from_numpy_dtype, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_178from_numpy_dtype};
    static PyObject *__pyx_pw_7pyarrow_3lib_179from_numpy_dtype(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_dtype = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("from_numpy_dtype (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_dtype,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 5948, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 5948, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "from_numpy_dtype", 0) < (0)) __PYX_ERR(1, 5948, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("from_numpy_dtype", 1, 1, 1, i); __PYX_ERR(1, 5948, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 1)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 5948, __pyx_L3_error)
        }
        __pyx_v_dtype = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("from_numpy_dtype", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 5948, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.from_numpy_dtype", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_178from_numpy_dtype(__pyx_self, __pyx_v_dtype);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_178from_numpy_dtype(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dtype) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      size_t __pyx_t_5;
      std::shared_ptr< arrow::DataType>  __pyx_t_6;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("from_numpy_dtype", 0);
      __Pyx_INCREF(__pyx_v_dtype);

      /* "pyarrow/types.pxi":5972
 *     DataType(string)
 *     """
 *     dtype = np.dtype(dtype)             # <<<<<<<<<<<<<<
 *     return pyarrow_wrap_data_type(GetResultValue(NumPyDtypeToArrow(dtype)))
 * 
*/
      __pyx_t_2 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5972, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_dtype); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5972, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_5 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
        assert(__pyx_t_2);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
        __pyx_t_5 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_dtype};
        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5972, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_DECREF_SET(__pyx_v_dtype, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "pyarrow/types.pxi":5973
 *     """
 *     dtype = np.dtype(dtype)
 *     return pyarrow_wrap_data_type(GetResultValue(NumPyDtypeToArrow(dtype)))             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_6 = arrow::py::GetResultValue<std::shared_ptr< arrow::DataType> >(arrow::py::NumPyDtypeToArrow(__pyx_v_dtype)); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 5973, __pyx_L1_error)
      __pyx_t_1 = pyarrow_wrap_data_type(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5973, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/types.pxi":5948
 * 
 * 
 * def from_numpy_dtype(object dtype):             # <<<<<<<<<<<<<<
 *     """
 *     Convert NumPy dtype to pyarrow.DataType.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_AddTraceback("pyarrow.lib.from_numpy_dtype", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_dtype);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/types.pxi":5976
 * 
 * 
 * def is_boolean_value(object obj):             # <<<<<<<<<<<<<<
 *     """
 *     Check if the object is a boolean.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_181is_boolean_value(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_180is_boolean_value, "is_boolean_value(obj)\n\nCheck if the object is a boolean.\n\nParameters\n----------\nobj : object\n    The object to check");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_181is_boolean_value = {"is_boolean_value", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_181is_boolean_value, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_180is_boolean_value};
    static PyObject *__pyx_pw_7pyarrow_3lib_181is_boolean_value(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_obj = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("is_boolean_value (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_obj,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 5976, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 5976, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "is_boolean_value", 0) < (0)) __PYX_ERR(1, 5976, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("is_boolean_value", 1, 1, 1, i); __PYX_ERR(1, 5976, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 1)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 5976, __pyx_L3_error)
        }
        __pyx_v_obj = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("is_boolean_value", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 5976, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.is_boolean_value", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_180is_boolean_value(__pyx_self, __pyx_v_obj);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_180is_boolean_value(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("is_boolean_value", 0);

      /* "pyarrow/types.pxi":5985
 *         The object to check
 *     """
 *     return IsPyBool(obj)             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __Pyx_PyBool_FromLong(arrow::py::IsPyBool(__pyx_v_obj)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5985, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/types.pxi":5976
 * 
 * 
 * def is_boolean_value(object obj):             # <<<<<<<<<<<<<<
 *     """
 *     Check if the object is a boolean.
*/

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

    /* "pyarrow/types.pxi":5988
 * 
 * 
 * def is_integer_value(object obj):             # <<<<<<<<<<<<<<
 *     """
 *     Check if the object is an integer.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_183is_integer_value(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_182is_integer_value, "is_integer_value(obj)\n\nCheck if the object is an integer.\n\nParameters\n----------\nobj : object\n    The object to check");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_183is_integer_value = {"is_integer_value", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_183is_integer_value, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_182is_integer_value};
    static PyObject *__pyx_pw_7pyarrow_3lib_183is_integer_value(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_obj = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("is_integer_value (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_obj,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 5988, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 5988, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "is_integer_value", 0) < (0)) __PYX_ERR(1, 5988, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("is_integer_value", 1, 1, 1, i); __PYX_ERR(1, 5988, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 1)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 5988, __pyx_L3_error)
        }
        __pyx_v_obj = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("is_integer_value", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 5988, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.is_integer_value", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_182is_integer_value(__pyx_self, __pyx_v_obj);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_182is_integer_value(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("is_integer_value", 0);

      /* "pyarrow/types.pxi":5997
 *         The object to check
 *     """
 *     return IsPyInt(obj)             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __Pyx_PyBool_FromLong(arrow::py::IsPyInt(__pyx_v_obj)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5997, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/types.pxi":5988
 * 
 * 
 * def is_integer_value(object obj):             # <<<<<<<<<<<<<<
 *     """
 *     Check if the object is an integer.
*/

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

    /* "pyarrow/types.pxi":6000
 * 
 * 
 * def is_float_value(object obj):             # <<<<<<<<<<<<<<
 *     """
 *     Check if the object is a float.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_185is_float_value(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_184is_float_value, "is_float_value(obj)\n\nCheck if the object is a float.\n\nParameters\n----------\nobj : object\n    The object to check");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_185is_float_value = {"is_float_value", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_185is_float_value, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_184is_float_value};
    static PyObject *__pyx_pw_7pyarrow_3lib_185is_float_value(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_obj = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("is_float_value (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_obj,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 6000, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 6000, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "is_float_value", 0) < (0)) __PYX_ERR(1, 6000, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("is_float_value", 1, 1, 1, i); __PYX_ERR(1, 6000, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 1)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 6000, __pyx_L3_error)
        }
        __pyx_v_obj = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("is_float_value", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 6000, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.is_float_value", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_184is_float_value(__pyx_self, __pyx_v_obj);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_184is_float_value(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("is_float_value", 0);

      /* "pyarrow/types.pxi":6009
 *         The object to check
 *     """
 *     return IsPyFloat(obj)             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __Pyx_PyBool_FromLong(arrow::py::IsPyFloat(__pyx_v_obj)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6009, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/types.pxi":6000
 * 
 * 
 * def is_float_value(object obj):             # <<<<<<<<<<<<<<
 *     """
 *     Check if the object is a float.
*/

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

    /* "pyarrow/types.pxi":6017
 *         shared_ptr[CExtensionTypeRegistry] registry
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self.registry = CExtensionTypeRegistry.GetGlobalRegistry()
 * 
*/

    /* Python wrapper */
    static int __pyx_pw_7pyarrow_3lib_23_ExtensionRegistryNanny_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
    static int __pyx_pw_7pyarrow_3lib_23_ExtensionRegistryNanny_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      int __pyx_r;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
      #endif
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, __pyx_nargs); return -1; }
      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
      if (unlikely(__pyx_kwds_len < 0)) return -1;
      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__cinit__", __pyx_kwds); return -1;}
      __pyx_r = __pyx_pf_7pyarrow_3lib_23_ExtensionRegistryNanny___cinit__(((struct __pyx_obj_7pyarrow_3lib__ExtensionRegistryNanny *)__pyx_v_self));

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

    static int __pyx_pf_7pyarrow_3lib_23_ExtensionRegistryNanny___cinit__(struct __pyx_obj_7pyarrow_3lib__ExtensionRegistryNanny *__pyx_v_self) {
      int __pyx_r;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;

      /* "pyarrow/types.pxi":6018
 * 
 *     def __cinit__(self):
 *         self.registry = CExtensionTypeRegistry.GetGlobalRegistry()             # <<<<<<<<<<<<<<
 * 
 *     def release_registry(self):
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "registry");
        __PYX_ERR(1, 6018, __pyx_L1_error)
      }
      __pyx_v_self->registry =  arrow::ExtensionTypeRegistry::GetGlobalRegistry();

      /* "pyarrow/types.pxi":6017
 *         shared_ptr[CExtensionTypeRegistry] registry
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self.registry = CExtensionTypeRegistry.GetGlobalRegistry()
 * 
*/

      /* function exit code */
      __pyx_r = 0;
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_AddTraceback("pyarrow.lib._ExtensionRegistryNanny.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = -1;
      __pyx_L0:;
      return __pyx_r;
    }

    /* "pyarrow/types.pxi":6020
 *         self.registry = CExtensionTypeRegistry.GetGlobalRegistry()
 * 
 *     def release_registry(self):             # <<<<<<<<<<<<<<
 *         self.registry.reset()
 * 
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_23_ExtensionRegistryNanny_3release_registry(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_23_ExtensionRegistryNanny_2release_registry, "_ExtensionRegistryNanny.release_registry(self)");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_23_ExtensionRegistryNanny_3release_registry = {"release_registry", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_23_ExtensionRegistryNanny_3release_registry, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_23_ExtensionRegistryNanny_2release_registry};
    static PyObject *__pyx_pw_7pyarrow_3lib_23_ExtensionRegistryNanny_3release_registry(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("release_registry (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("release_registry", 1, 0, 0, __pyx_nargs); return NULL; }
      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
      if (unlikely(__pyx_kwds_len < 0)) return NULL;
      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("release_registry", __pyx_kwds); return NULL;}
      __pyx_r = __pyx_pf_7pyarrow_3lib_23_ExtensionRegistryNanny_2release_registry(((struct __pyx_obj_7pyarrow_3lib__ExtensionRegistryNanny *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_23_ExtensionRegistryNanny_2release_registry(struct __pyx_obj_7pyarrow_3lib__ExtensionRegistryNanny *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("release_registry", 0);

      /* "pyarrow/types.pxi":6021
 * 
 *     def release_registry(self):
 *         self.registry.reset()             # <<<<<<<<<<<<<<
 * 
 * 
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "registry");
        __PYX_ERR(1, 6021, __pyx_L1_error)
      }
      __pyx_v_self->registry.reset();

      /* "pyarrow/types.pxi":6020
 *         self.registry = CExtensionTypeRegistry.GetGlobalRegistry()
 * 
 *     def release_registry(self):             # <<<<<<<<<<<<<<
 *         self.registry.reset()
 * 
*/

      /* function exit code */
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_AddTraceback("pyarrow.lib._ExtensionRegistryNanny.release_registry", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

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

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_23_ExtensionRegistryNanny_5__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_23_ExtensionRegistryNanny_4__reduce_cython__, "_ExtensionRegistryNanny.__reduce_cython__(self)");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_23_ExtensionRegistryNanny_5__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_23_ExtensionRegistryNanny_5__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_23_ExtensionRegistryNanny_4__reduce_cython__};
    static PyObject *__pyx_pw_7pyarrow_3lib_23_ExtensionRegistryNanny_5__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; }
      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
      if (unlikely(__pyx_kwds_len < 0)) return NULL;
      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;}
      __pyx_r = __pyx_pf_7pyarrow_3lib_23_ExtensionRegistryNanny_4__reduce_cython__(((struct __pyx_obj_7pyarrow_3lib__ExtensionRegistryNanny *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_23_ExtensionRegistryNanny_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib__ExtensionRegistryNanny *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__reduce_cython__", 0);

      /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0);
      __PYX_ERR(7, 2, __pyx_L1_error)

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

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_AddTraceback("pyarrow.lib._ExtensionRegistryNanny.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

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

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_23_ExtensionRegistryNanny_7__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_23_ExtensionRegistryNanny_6__setstate_cython__, "_ExtensionRegistryNanny.__setstate_cython__(self, __pyx_state)");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_23_ExtensionRegistryNanny_7__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_23_ExtensionRegistryNanny_7__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_23_ExtensionRegistryNanny_6__setstate_cython__};
    static PyObject *__pyx_pw_7pyarrow_3lib_23_ExtensionRegistryNanny_7__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(7, 3, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(7, 3, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(7, 3, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(7, 3, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 1)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(7, 3, __pyx_L3_error)
        }
        __pyx_v___pyx_state = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(7, 3, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib._ExtensionRegistryNanny.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_23_ExtensionRegistryNanny_6__setstate_cython__(((struct __pyx_obj_7pyarrow_3lib__ExtensionRegistryNanny *)__pyx_v_self), __pyx_v___pyx_state);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

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

      /* "(tree fragment)":4
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
*/
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0);
      __PYX_ERR(7, 4, __pyx_L1_error)

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

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_AddTraceback("pyarrow.lib._ExtensionRegistryNanny.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/types.pxi":6031
 * #
 * 
 * cdef void pycapsule_schema_deleter(object schema_capsule) noexcept:             # <<<<<<<<<<<<<<
 *     cdef ArrowSchema* schema = <ArrowSchema*>PyCapsule_GetPointer(
 *         schema_capsule, 'arrow_schema'
*/

    static void __pyx_f_7pyarrow_3lib_pycapsule_schema_deleter(PyObject *__pyx_v_schema_capsule) {
      struct ArrowSchema *__pyx_v_schema;
      void *__pyx_t_1;
      int __pyx_t_2;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;

      /* "pyarrow/types.pxi":6032
 * 
 * cdef void pycapsule_schema_deleter(object schema_capsule) noexcept:
 *     cdef ArrowSchema* schema = <ArrowSchema*>PyCapsule_GetPointer(             # <<<<<<<<<<<<<<
 *         schema_capsule, 'arrow_schema'
 *     )
*/
      __pyx_t_1 = PyCapsule_GetPointer(__pyx_v_schema_capsule, __pyx_k_arrow_schema); if (unlikely(__pyx_t_1 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(1, 6032, __pyx_L1_error)
      __pyx_v_schema = ((struct ArrowSchema *)__pyx_t_1);

      /* "pyarrow/types.pxi":6035
 *         schema_capsule, 'arrow_schema'
 *     )
 *     if schema.release != NULL:             # <<<<<<<<<<<<<<
 *         schema.release(schema)
 * 
*/
      __pyx_t_2 = (__pyx_v_schema->release != NULL);
      if (__pyx_t_2) {

        /* "pyarrow/types.pxi":6036
 *     )
 *     if schema.release != NULL:
 *         schema.release(schema)             # <<<<<<<<<<<<<<
 * 
 *     free(schema)
*/
        __pyx_v_schema->release(__pyx_v_schema);

        /* "pyarrow/types.pxi":6035
 *         schema_capsule, 'arrow_schema'
 *     )
 *     if schema.release != NULL:             # <<<<<<<<<<<<<<
 *         schema.release(schema)
 * 
*/
      }

      /* "pyarrow/types.pxi":6038
 *         schema.release(schema)
 * 
 *     free(schema)             # <<<<<<<<<<<<<<
 * 
 * cdef object alloc_c_schema(ArrowSchema** c_schema):
*/
      free(__pyx_v_schema);

      /* "pyarrow/types.pxi":6031
 * #
 * 
 * cdef void pycapsule_schema_deleter(object schema_capsule) noexcept:             # <<<<<<<<<<<<<<
 *     cdef ArrowSchema* schema = <ArrowSchema*>PyCapsule_GetPointer(
 *         schema_capsule, 'arrow_schema'
*/

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_WriteUnraisable("pyarrow.lib.pycapsule_schema_deleter", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
      __pyx_L0:;
    }

    /* "pyarrow/types.pxi":6040
 *     free(schema)
 * 
 * cdef object alloc_c_schema(ArrowSchema** c_schema):             # <<<<<<<<<<<<<<
 *     c_schema[0] = <ArrowSchema*> malloc(sizeof(ArrowSchema))
 *     # Ensure the capsule destructor doesn't call a random release pointer
*/

    static PyObject *__pyx_f_7pyarrow_3lib_alloc_c_schema(struct ArrowSchema **__pyx_v_c_schema) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("alloc_c_schema", 0);

      /* "pyarrow/types.pxi":6041
 * 
 * cdef object alloc_c_schema(ArrowSchema** c_schema):
 *     c_schema[0] = <ArrowSchema*> malloc(sizeof(ArrowSchema))             # <<<<<<<<<<<<<<
 *     # Ensure the capsule destructor doesn't call a random release pointer
 *     c_schema[0].release = NULL
*/
      (__pyx_v_c_schema[0]) = ((struct ArrowSchema *)malloc((sizeof(struct ArrowSchema))));

      /* "pyarrow/types.pxi":6043
 *     c_schema[0] = <ArrowSchema*> malloc(sizeof(ArrowSchema))
 *     # Ensure the capsule destructor doesn't call a random release pointer
 *     c_schema[0].release = NULL             # <<<<<<<<<<<<<<
 *     return PyCapsule_New(c_schema[0], 'arrow_schema', &pycapsule_schema_deleter)
 * 
*/
      (__pyx_v_c_schema[0])->release = NULL;

      /* "pyarrow/types.pxi":6044
 *     # Ensure the capsule destructor doesn't call a random release pointer
 *     c_schema[0].release = NULL
 *     return PyCapsule_New(c_schema[0], 'arrow_schema', &pycapsule_schema_deleter)             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = PyCapsule_New((__pyx_v_c_schema[0]), __pyx_k_arrow_schema, (&__pyx_f_7pyarrow_3lib_pycapsule_schema_deleter)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6044, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/types.pxi":6040
 *     free(schema)
 * 
 * cdef object alloc_c_schema(ArrowSchema** c_schema):             # <<<<<<<<<<<<<<
 *     c_schema[0] = <ArrowSchema*> malloc(sizeof(ArrowSchema))
 *     # Ensure the capsule destructor doesn't call a random release pointer
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("pyarrow.lib.alloc_c_schema", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = 0;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/types.pxi":6047
 * 
 * 
 * cdef void pycapsule_array_deleter(object array_capsule) noexcept:             # <<<<<<<<<<<<<<
 *     cdef:
 *         ArrowArray* array
*/

    static void __pyx_f_7pyarrow_3lib_pycapsule_array_deleter(PyObject *__pyx_v_array_capsule) {
      struct ArrowArray *__pyx_v_array;
      void *__pyx_t_1;
      int __pyx_t_2;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;

      /* "pyarrow/types.pxi":6051
 *         ArrowArray* array
 *     # Do not invoke the deleter on a used/moved capsule
 *     array = <ArrowArray*>cpython.PyCapsule_GetPointer(             # <<<<<<<<<<<<<<
 *         array_capsule, 'arrow_array'
 *     )
*/
      __pyx_t_1 = PyCapsule_GetPointer(__pyx_v_array_capsule, __pyx_k_arrow_array); if (unlikely(__pyx_t_1 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(1, 6051, __pyx_L1_error)
      __pyx_v_array = ((struct ArrowArray *)__pyx_t_1);

      /* "pyarrow/types.pxi":6054
 *         array_capsule, 'arrow_array'
 *     )
 *     if array.release != NULL:             # <<<<<<<<<<<<<<
 *         array.release(array)
 * 
*/
      __pyx_t_2 = (__pyx_v_array->release != NULL);
      if (__pyx_t_2) {

        /* "pyarrow/types.pxi":6055
 *     )
 *     if array.release != NULL:
 *         array.release(array)             # <<<<<<<<<<<<<<
 * 
 *     free(array)
*/
        __pyx_v_array->release(__pyx_v_array);

        /* "pyarrow/types.pxi":6054
 *         array_capsule, 'arrow_array'
 *     )
 *     if array.release != NULL:             # <<<<<<<<<<<<<<
 *         array.release(array)
 * 
*/
      }

      /* "pyarrow/types.pxi":6057
 *         array.release(array)
 * 
 *     free(array)             # <<<<<<<<<<<<<<
 * 
 * cdef object alloc_c_array(ArrowArray** c_array):
*/
      free(__pyx_v_array);

      /* "pyarrow/types.pxi":6047
 * 
 * 
 * cdef void pycapsule_array_deleter(object array_capsule) noexcept:             # <<<<<<<<<<<<<<
 *     cdef:
 *         ArrowArray* array
*/

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_WriteUnraisable("pyarrow.lib.pycapsule_array_deleter", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
      __pyx_L0:;
    }

    /* "pyarrow/types.pxi":6059
 *     free(array)
 * 
 * cdef object alloc_c_array(ArrowArray** c_array):             # <<<<<<<<<<<<<<
 *     c_array[0] = <ArrowArray*> malloc(sizeof(ArrowArray))
 *     # Ensure the capsule destructor doesn't call a random release pointer
*/

    static PyObject *__pyx_f_7pyarrow_3lib_alloc_c_array(struct ArrowArray **__pyx_v_c_array) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("alloc_c_array", 0);

      /* "pyarrow/types.pxi":6060
 * 
 * cdef object alloc_c_array(ArrowArray** c_array):
 *     c_array[0] = <ArrowArray*> malloc(sizeof(ArrowArray))             # <<<<<<<<<<<<<<
 *     # Ensure the capsule destructor doesn't call a random release pointer
 *     c_array[0].release = NULL
*/
      (__pyx_v_c_array[0]) = ((struct ArrowArray *)malloc((sizeof(struct ArrowArray))));

      /* "pyarrow/types.pxi":6062
 *     c_array[0] = <ArrowArray*> malloc(sizeof(ArrowArray))
 *     # Ensure the capsule destructor doesn't call a random release pointer
 *     c_array[0].release = NULL             # <<<<<<<<<<<<<<
 *     return PyCapsule_New(c_array[0], 'arrow_array', &pycapsule_array_deleter)
 * 
*/
      (__pyx_v_c_array[0])->release = NULL;

      /* "pyarrow/types.pxi":6063
 *     # Ensure the capsule destructor doesn't call a random release pointer
 *     c_array[0].release = NULL
 *     return PyCapsule_New(c_array[0], 'arrow_array', &pycapsule_array_deleter)             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = PyCapsule_New((__pyx_v_c_array[0]), __pyx_k_arrow_array, (&__pyx_f_7pyarrow_3lib_pycapsule_array_deleter)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6063, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/types.pxi":6059
 *     free(array)
 * 
 * cdef object alloc_c_array(ArrowArray** c_array):             # <<<<<<<<<<<<<<
 *     c_array[0] = <ArrowArray*> malloc(sizeof(ArrowArray))
 *     # Ensure the capsule destructor doesn't call a random release pointer
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("pyarrow.lib.alloc_c_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = 0;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/types.pxi":6066
 * 
 * 
 * cdef void pycapsule_stream_deleter(object stream_capsule) noexcept:             # <<<<<<<<<<<<<<
 *     cdef:
 *         ArrowArrayStream* stream
*/

    static void __pyx_f_7pyarrow_3lib_pycapsule_stream_deleter(PyObject *__pyx_v_stream_capsule) {
      struct ArrowArrayStream *__pyx_v_stream;
      void *__pyx_t_1;
      int __pyx_t_2;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;

      /* "pyarrow/types.pxi":6070
 *         ArrowArrayStream* stream
 *     # Do not invoke the deleter on a used/moved capsule
 *     stream = <ArrowArrayStream*>PyCapsule_GetPointer(             # <<<<<<<<<<<<<<
 *         stream_capsule, 'arrow_array_stream'
 *     )
*/
      __pyx_t_1 = PyCapsule_GetPointer(__pyx_v_stream_capsule, __pyx_k_arrow_array_stream); if (unlikely(__pyx_t_1 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(1, 6070, __pyx_L1_error)
      __pyx_v_stream = ((struct ArrowArrayStream *)__pyx_t_1);

      /* "pyarrow/types.pxi":6073
 *         stream_capsule, 'arrow_array_stream'
 *     )
 *     if stream.release != NULL:             # <<<<<<<<<<<<<<
 *         stream.release(stream)
 * 
*/
      __pyx_t_2 = (__pyx_v_stream->release != NULL);
      if (__pyx_t_2) {

        /* "pyarrow/types.pxi":6074
 *     )
 *     if stream.release != NULL:
 *         stream.release(stream)             # <<<<<<<<<<<<<<
 * 
 *     free(stream)
*/
        __pyx_v_stream->release(__pyx_v_stream);

        /* "pyarrow/types.pxi":6073
 *         stream_capsule, 'arrow_array_stream'
 *     )
 *     if stream.release != NULL:             # <<<<<<<<<<<<<<
 *         stream.release(stream)
 * 
*/
      }

      /* "pyarrow/types.pxi":6076
 *         stream.release(stream)
 * 
 *     free(stream)             # <<<<<<<<<<<<<<
 * 
 * cdef object alloc_c_stream(ArrowArrayStream** c_stream):
*/
      free(__pyx_v_stream);

      /* "pyarrow/types.pxi":6066
 * 
 * 
 * cdef void pycapsule_stream_deleter(object stream_capsule) noexcept:             # <<<<<<<<<<<<<<
 *     cdef:
 *         ArrowArrayStream* stream
*/

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_WriteUnraisable("pyarrow.lib.pycapsule_stream_deleter", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
      __pyx_L0:;
    }

    /* "pyarrow/types.pxi":6078
 *     free(stream)
 * 
 * cdef object alloc_c_stream(ArrowArrayStream** c_stream):             # <<<<<<<<<<<<<<
 *     c_stream[0] = <ArrowArrayStream*> malloc(sizeof(ArrowArrayStream))
 *     # Ensure the capsule destructor doesn't call a random release pointer
*/

    static PyObject *__pyx_f_7pyarrow_3lib_alloc_c_stream(struct ArrowArrayStream **__pyx_v_c_stream) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("alloc_c_stream", 0);

      /* "pyarrow/types.pxi":6079
 * 
 * cdef object alloc_c_stream(ArrowArrayStream** c_stream):
 *     c_stream[0] = <ArrowArrayStream*> malloc(sizeof(ArrowArrayStream))             # <<<<<<<<<<<<<<
 *     # Ensure the capsule destructor doesn't call a random release pointer
 *     c_stream[0].release = NULL
*/
      (__pyx_v_c_stream[0]) = ((struct ArrowArrayStream *)malloc((sizeof(struct ArrowArrayStream))));

      /* "pyarrow/types.pxi":6081
 *     c_stream[0] = <ArrowArrayStream*> malloc(sizeof(ArrowArrayStream))
 *     # Ensure the capsule destructor doesn't call a random release pointer
 *     c_stream[0].release = NULL             # <<<<<<<<<<<<<<
 *     return PyCapsule_New(c_stream[0], 'arrow_array_stream', &pycapsule_stream_deleter)
 * 
*/
      (__pyx_v_c_stream[0])->release = NULL;

      /* "pyarrow/types.pxi":6082
 *     # Ensure the capsule destructor doesn't call a random release pointer
 *     c_stream[0].release = NULL
 *     return PyCapsule_New(c_stream[0], 'arrow_array_stream', &pycapsule_stream_deleter)             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = PyCapsule_New((__pyx_v_c_stream[0]), __pyx_k_arrow_array_stream, (&__pyx_f_7pyarrow_3lib_pycapsule_stream_deleter)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6082, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/types.pxi":6078
 *     free(stream)
 * 
 * cdef object alloc_c_stream(ArrowArrayStream** c_stream):             # <<<<<<<<<<<<<<
 *     c_stream[0] = <ArrowArrayStream*> malloc(sizeof(ArrowArrayStream))
 *     # Ensure the capsule destructor doesn't call a random release pointer
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("pyarrow.lib.alloc_c_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = 0;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/types.pxi":6085
 * 
 * 
 * cdef void pycapsule_device_array_deleter(object array_capsule) noexcept:             # <<<<<<<<<<<<<<
 *     cdef:
 *         ArrowDeviceArray* device_array
*/

    static void __pyx_f_7pyarrow_3lib_pycapsule_device_array_deleter(PyObject *__pyx_v_array_capsule) {
      struct ArrowDeviceArray *__pyx_v_device_array;
      void *__pyx_t_1;
      int __pyx_t_2;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;

      /* "pyarrow/types.pxi":6089
 *         ArrowDeviceArray* device_array
 *     # Do not invoke the deleter on a used/moved capsule
 *     device_array = <ArrowDeviceArray*>cpython.PyCapsule_GetPointer(             # <<<<<<<<<<<<<<
 *         array_capsule, 'arrow_device_array'
 *     )
*/
      __pyx_t_1 = PyCapsule_GetPointer(__pyx_v_array_capsule, __pyx_k_arrow_device_array); if (unlikely(__pyx_t_1 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(1, 6089, __pyx_L1_error)
      __pyx_v_device_array = ((struct ArrowDeviceArray *)__pyx_t_1);

      /* "pyarrow/types.pxi":6092
 *         array_capsule, 'arrow_device_array'
 *     )
 *     if device_array.array.release != NULL:             # <<<<<<<<<<<<<<
 *         device_array.array.release(&device_array.array)
 * 
*/
      __pyx_t_2 = (__pyx_v_device_array->array.release != NULL);
      if (__pyx_t_2) {

        /* "pyarrow/types.pxi":6093
 *     )
 *     if device_array.array.release != NULL:
 *         device_array.array.release(&device_array.array)             # <<<<<<<<<<<<<<
 * 
 *     free(device_array)
*/
        __pyx_v_device_array->array.release((&__pyx_v_device_array->array));

        /* "pyarrow/types.pxi":6092
 *         array_capsule, 'arrow_device_array'
 *     )
 *     if device_array.array.release != NULL:             # <<<<<<<<<<<<<<
 *         device_array.array.release(&device_array.array)
 * 
*/
      }

      /* "pyarrow/types.pxi":6095
 *         device_array.array.release(&device_array.array)
 * 
 *     free(device_array)             # <<<<<<<<<<<<<<
 * 
 * 
*/
      free(__pyx_v_device_array);

      /* "pyarrow/types.pxi":6085
 * 
 * 
 * cdef void pycapsule_device_array_deleter(object array_capsule) noexcept:             # <<<<<<<<<<<<<<
 *     cdef:
 *         ArrowDeviceArray* device_array
*/

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_WriteUnraisable("pyarrow.lib.pycapsule_device_array_deleter", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
      __pyx_L0:;
    }

    /* "pyarrow/types.pxi":6098
 * 
 * 
 * cdef object alloc_c_device_array(ArrowDeviceArray** c_array):             # <<<<<<<<<<<<<<
 *     c_array[0] = <ArrowDeviceArray*> malloc(sizeof(ArrowDeviceArray))
 *     # Ensure the capsule destructor doesn't call a random release pointer
*/

    static PyObject *__pyx_f_7pyarrow_3lib_alloc_c_device_array(struct ArrowDeviceArray **__pyx_v_c_array) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("alloc_c_device_array", 0);

      /* "pyarrow/types.pxi":6099
 * 
 * cdef object alloc_c_device_array(ArrowDeviceArray** c_array):
 *     c_array[0] = <ArrowDeviceArray*> malloc(sizeof(ArrowDeviceArray))             # <<<<<<<<<<<<<<
 *     # Ensure the capsule destructor doesn't call a random release pointer
 *     c_array[0].array.release = NULL
*/
      (__pyx_v_c_array[0]) = ((struct ArrowDeviceArray *)malloc((sizeof(struct ArrowDeviceArray))));

      /* "pyarrow/types.pxi":6101
 *     c_array[0] = <ArrowDeviceArray*> malloc(sizeof(ArrowDeviceArray))
 *     # Ensure the capsule destructor doesn't call a random release pointer
 *     c_array[0].array.release = NULL             # <<<<<<<<<<<<<<
 *     return PyCapsule_New(
 *         c_array[0], 'arrow_device_array', &pycapsule_device_array_deleter)
*/
      (__pyx_v_c_array[0])->array.release = NULL;

      /* "pyarrow/types.pxi":6102
 *     # Ensure the capsule destructor doesn't call a random release pointer
 *     c_array[0].array.release = NULL
 *     return PyCapsule_New(             # <<<<<<<<<<<<<<
 *         c_array[0], 'arrow_device_array', &pycapsule_device_array_deleter)
*/
      __Pyx_XDECREF(__pyx_r);

      /* "pyarrow/types.pxi":6103
 *     c_array[0].array.release = NULL
 *     return PyCapsule_New(
 *         c_array[0], 'arrow_device_array', &pycapsule_device_array_deleter)             # <<<<<<<<<<<<<<
*/
      __pyx_t_1 = PyCapsule_New((__pyx_v_c_array[0]), __pyx_k_arrow_device_array, (&__pyx_f_7pyarrow_3lib_pycapsule_device_array_deleter)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6102, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/types.pxi":6098
 * 
 * 
 * cdef object alloc_c_device_array(ArrowDeviceArray** c_array):             # <<<<<<<<<<<<<<
 *     c_array[0] = <ArrowDeviceArray*> malloc(sizeof(ArrowDeviceArray))
 *     # Ensure the capsule destructor doesn't call a random release pointer
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("pyarrow.lib.alloc_c_device_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = 0;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/scalar.pxi":29
 *     """
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         raise TypeError(f"Do not call {self.__class__.__name__}'s constructor directly, "
 *                         "use pa.scalar() instead.")
*/

    /* Python wrapper */
    static int __pyx_pw_7pyarrow_3lib_6Scalar_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
    static int __pyx_pw_7pyarrow_3lib_6Scalar_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      int __pyx_r;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
      #endif
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, __pyx_nargs); return -1; }
      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
      if (unlikely(__pyx_kwds_len < 0)) return -1;
      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__init__", __pyx_kwds); return -1;}
      __pyx_r = __pyx_pf_7pyarrow_3lib_6Scalar___init__(((struct __pyx_obj_7pyarrow_3lib_Scalar *)__pyx_v_self));

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

    static int __pyx_pf_7pyarrow_3lib_6Scalar___init__(struct __pyx_obj_7pyarrow_3lib_Scalar *__pyx_v_self) {
      int __pyx_r;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      PyObject *__pyx_t_5[3];
      size_t __pyx_t_6;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__init__", 0);

      /* "pyarrow/scalar.pxi":30
 * 
 *     def __init__(self):
 *         raise TypeError(f"Do not call {self.__class__.__name__}'s constructor directly, "             # <<<<<<<<<<<<<<
 *                         "use pa.scalar() instead.")
 * 
*/
      __pyx_t_2 = NULL;
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 30, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_name_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 30, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 30, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_5[0] = __pyx_mstate_global->__pyx_kp_u_Do_not_call;
      __pyx_t_5[1] = __pyx_t_3;
      __pyx_t_5[2] = __pyx_mstate_global->__pyx_kp_u_s_constructor_directly_use_pa_s;
      __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_5, 3, 12 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + 49, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3));
      if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 30, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_6 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4};
        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 30, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __PYX_ERR(3, 30, __pyx_L1_error)

      /* "pyarrow/scalar.pxi":29
 *     """
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         raise TypeError(f"Do not call {self.__class__.__name__}'s constructor directly, "
 *                         "use pa.scalar() instead.")
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_AddTraceback("pyarrow.lib.Scalar.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = -1;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/scalar.pxi":33
 *                         "use pa.scalar() instead.")
 * 
 *     cdef void init(self, const shared_ptr[CScalar]& wrapped):             # <<<<<<<<<<<<<<
 *         self.wrapped = wrapped
 * 
*/

    static void __pyx_f_7pyarrow_3lib_6Scalar_init(struct __pyx_obj_7pyarrow_3lib_Scalar *__pyx_v_self, std::shared_ptr< arrow::Scalar>  const &__pyx_v_wrapped) {
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;

      /* "pyarrow/scalar.pxi":34
 * 
 *     cdef void init(self, const shared_ptr[CScalar]& wrapped):
 *         self.wrapped = wrapped             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "wrapped");
        __PYX_ERR(3, 34, __pyx_L1_error)
      }
      __pyx_v_self->wrapped = __pyx_v_wrapped;

      /* "pyarrow/scalar.pxi":33
 *                         "use pa.scalar() instead.")
 * 
 *     cdef void init(self, const shared_ptr[CScalar]& wrapped):             # <<<<<<<<<<<<<<
 *         self.wrapped = wrapped
 * 
*/

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_AddTraceback("pyarrow.lib.Scalar.init", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_L0:;
    }

    /* "pyarrow/scalar.pxi":36
 *         self.wrapped = wrapped
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     cdef wrap(const shared_ptr[CScalar]& wrapped):
 *         cdef:
*/

    static PyObject *__pyx_f_7pyarrow_3lib_6Scalar_wrap(std::shared_ptr< arrow::Scalar>  const &__pyx_v_wrapped) {
      struct __pyx_obj_7pyarrow_3lib_Scalar *__pyx_v_self = 0;
      enum  arrow::Type::type __pyx_v_type_id;
      std::shared_ptr< arrow::DataType>  __pyx_v_sp_data_type;
      PyObject *__pyx_v_typ = NULL;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      std::shared_ptr< arrow::DataType>  __pyx_t_1;
      int __pyx_t_2;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      PyObject *__pyx_t_5 = NULL;
      PyObject *__pyx_t_6 = NULL;
      PyObject *__pyx_t_7 = NULL;
      PyObject *__pyx_t_8 = NULL;
      size_t __pyx_t_9;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("wrap", 0);

      /* "pyarrow/scalar.pxi":40
 *         cdef:
 *             Scalar self
 *             Type type_id = wrapped.get().type.get().id()             # <<<<<<<<<<<<<<
 *             shared_ptr[CDataType] sp_data_type = wrapped.get().type
 * 
*/
      __pyx_v_type_id = __pyx_v_wrapped.get()->type.get()->id();

      /* "pyarrow/scalar.pxi":41
 *             Scalar self
 *             Type type_id = wrapped.get().type.get().id()
 *             shared_ptr[CDataType] sp_data_type = wrapped.get().type             # <<<<<<<<<<<<<<
 * 
 *         if type_id == _Type_NA:
*/
      __pyx_t_1 = __pyx_v_wrapped.get()->type;
      __pyx_v_sp_data_type = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_1);

      /* "pyarrow/scalar.pxi":43
 *             shared_ptr[CDataType] sp_data_type = wrapped.get().type
 * 
 *         if type_id == _Type_NA:             # <<<<<<<<<<<<<<
 *             return _NULL
 * 
*/
      __pyx_t_2 = (__pyx_v_type_id ==  arrow::Type::NA);
      if (__pyx_t_2) {

        /* "pyarrow/scalar.pxi":44
 * 
 *         if type_id == _Type_NA:
 *             return _NULL             # <<<<<<<<<<<<<<
 * 
 *         if type_id not in _scalar_classes:
*/
        __Pyx_XDECREF(__pyx_r);
        __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 44, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_r = __pyx_t_3;
        __pyx_t_3 = 0;
        goto __pyx_L0;

        /* "pyarrow/scalar.pxi":43
 *             shared_ptr[CDataType] sp_data_type = wrapped.get().type
 * 
 *         if type_id == _Type_NA:             # <<<<<<<<<<<<<<
 *             return _NULL
 * 
*/
      }

      /* "pyarrow/scalar.pxi":46
 *             return _NULL
 * 
 *         if type_id not in _scalar_classes:             # <<<<<<<<<<<<<<
 *             raise NotImplementedError(
 *                 "Wrapping scalar of type " + frombytes(sp_data_type.get().ToString()))
*/
      __pyx_t_3 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type(__pyx_v_type_id); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 46, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (unlikely(__pyx_v_7pyarrow_3lib__scalar_classes == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
        __PYX_ERR(3, 46, __pyx_L1_error)
      }
      __pyx_t_2 = (__Pyx_PyDict_ContainsTF(__pyx_t_3, __pyx_v_7pyarrow_3lib__scalar_classes, Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(3, 46, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(__pyx_t_2)) {

        /* "pyarrow/scalar.pxi":47
 * 
 *         if type_id not in _scalar_classes:
 *             raise NotImplementedError(             # <<<<<<<<<<<<<<
 *                 "Wrapping scalar of type " + frombytes(sp_data_type.get().ToString()))
 * 
*/
        __pyx_t_4 = NULL;

        /* "pyarrow/scalar.pxi":48
 *         if type_id not in _scalar_classes:
 *             raise NotImplementedError(
 *                 "Wrapping scalar of type " + frombytes(sp_data_type.get().ToString()))             # <<<<<<<<<<<<<<
 * 
 *         typ = get_scalar_class_from_type(sp_data_type)
*/
        __pyx_t_6 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_frombytes); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 48, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_8 = __pyx_convert_PyBytes_string_to_py_6libcpp_6string_std__in_string(__pyx_v_sp_data_type.get()->ToString()); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 48, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_9 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_7))) {
          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
          assert(__pyx_t_6);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
          __pyx_t_9 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_8};
          __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 48, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
        }
        __pyx_t_7 = PyNumber_Add(__pyx_mstate_global->__pyx_kp_u_Wrapping_scalar_of_type, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 48, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_9 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_7};
          __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_NotImplementedError)), __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 47, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        __Pyx_Raise(__pyx_t_3, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __PYX_ERR(3, 47, __pyx_L1_error)

        /* "pyarrow/scalar.pxi":46
 *             return _NULL
 * 
 *         if type_id not in _scalar_classes:             # <<<<<<<<<<<<<<
 *             raise NotImplementedError(
 *                 "Wrapping scalar of type " + frombytes(sp_data_type.get().ToString()))
*/
      }

      /* "pyarrow/scalar.pxi":50
 *                 "Wrapping scalar of type " + frombytes(sp_data_type.get().ToString()))
 * 
 *         typ = get_scalar_class_from_type(sp_data_type)             # <<<<<<<<<<<<<<
 *         self = typ.__new__(typ)
 *         self.init(wrapped)
*/
      __pyx_t_3 = __pyx_f_7pyarrow_3lib_get_scalar_class_from_type(__pyx_v_sp_data_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 50, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_v_typ = __pyx_t_3;
      __pyx_t_3 = 0;

      /* "pyarrow/scalar.pxi":51
 * 
 *         typ = get_scalar_class_from_type(sp_data_type)
 *         self = typ.__new__(typ)             # <<<<<<<<<<<<<<
 *         self.init(wrapped)
 * 
*/
      __pyx_t_7 = __pyx_v_typ;
      __Pyx_INCREF(__pyx_t_7);
      __pyx_t_9 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_typ};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 51, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Scalar))))) __PYX_ERR(3, 51, __pyx_L1_error)
      __pyx_v_self = ((struct __pyx_obj_7pyarrow_3lib_Scalar *)__pyx_t_3);
      __pyx_t_3 = 0;

      /* "pyarrow/scalar.pxi":52
 *         typ = get_scalar_class_from_type(sp_data_type)
 *         self = typ.__new__(typ)
 *         self.init(wrapped)             # <<<<<<<<<<<<<<
 * 
 *         return self
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "init");
        __PYX_ERR(3, 52, __pyx_L1_error)
      }
      ((struct __pyx_vtabstruct_7pyarrow_3lib_Scalar *)__pyx_v_self->__pyx_vtab)->init(__pyx_v_self, __pyx_v_wrapped); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 52, __pyx_L1_error)

      /* "pyarrow/scalar.pxi":54
 *         self.init(wrapped)
 * 
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     cdef inline shared_ptr[CScalar] unwrap(self) nogil:
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF((PyObject *)__pyx_v_self);
      __pyx_r = ((PyObject *)__pyx_v_self);
      goto __pyx_L0;

      /* "pyarrow/scalar.pxi":36
 *         self.wrapped = wrapped
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     cdef wrap(const shared_ptr[CScalar]& wrapped):
 *         cdef:
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_8);
      __Pyx_AddTraceback("pyarrow.lib.Scalar.wrap", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = 0;
      __pyx_L0:;
      __Pyx_XDECREF((PyObject *)__pyx_v_self);
      __Pyx_XDECREF(__pyx_v_typ);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/scalar.pxi":56
 *         return self
 * 
 *     cdef inline shared_ptr[CScalar] unwrap(self) nogil:             # <<<<<<<<<<<<<<
 *         return self.wrapped
 * 
*/

    static CYTHON_INLINE std::shared_ptr< arrow::Scalar>  __pyx_f_7pyarrow_3lib_6Scalar_unwrap(struct __pyx_obj_7pyarrow_3lib_Scalar *__pyx_v_self) {
      std::shared_ptr< arrow::Scalar>  __pyx_r;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyGILState_STATE __pyx_gilstate_save;

      /* "pyarrow/scalar.pxi":57
 * 
 *     cdef inline shared_ptr[CScalar] unwrap(self) nogil:
 *         return self.wrapped             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "wrapped");
        __Pyx_PyGILState_Release(__pyx_gilstate_save);
        __PYX_ERR(3, 57, __pyx_L1_error)
      }
      __pyx_r = __pyx_v_self->wrapped;
      goto __pyx_L0;

      /* "pyarrow/scalar.pxi":56
 *         return self
 * 
 *     cdef inline shared_ptr[CScalar] unwrap(self) nogil:             # <<<<<<<<<<<<<<
 *         return self.wrapped
 * 
*/

      /* function exit code */
      __pyx_L1_error:;
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      __Pyx_AddTraceback("pyarrow.lib.Scalar.unwrap", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_pretend_to_initialize(&__pyx_r);
      __Pyx_PyGILState_Release(__pyx_gilstate_save);
      __pyx_L0:;
      return __pyx_r;
    }

    /* "pyarrow/scalar.pxi":59
 *         return self.wrapped
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def type(self):
 *         """
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_6Scalar_4type_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_6Scalar_4type_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_6Scalar_4type___get__(((struct __pyx_obj_7pyarrow_3lib_Scalar *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_6Scalar_4type___get__(struct __pyx_obj_7pyarrow_3lib_Scalar *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__get__", 0);

      /* "pyarrow/scalar.pxi":64
 *         Data type of the Scalar object.
 *         """
 *         return pyarrow_wrap_data_type(self.wrapped.get().type)             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
      __Pyx_XDECREF(__pyx_r);
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "wrapped");
        __PYX_ERR(3, 64, __pyx_L1_error)
      }
      __pyx_t_1 = pyarrow_wrap_data_type(__pyx_v_self->wrapped.get()->type); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 64, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/scalar.pxi":59
 *         return self.wrapped
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def type(self):
 *         """
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("pyarrow.lib.Scalar.type.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/scalar.pxi":66
 *         return pyarrow_wrap_data_type(self.wrapped.get().type)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_valid(self):
 *         """
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_6Scalar_8is_valid_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_6Scalar_8is_valid_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_6Scalar_8is_valid___get__(((struct __pyx_obj_7pyarrow_3lib_Scalar *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_6Scalar_8is_valid___get__(struct __pyx_obj_7pyarrow_3lib_Scalar *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__get__", 0);

      /* "pyarrow/scalar.pxi":71
 *         Holds a valid (non-null) value.
 *         """
 *         return self.wrapped.get().is_valid             # <<<<<<<<<<<<<<
 * 
 *     def cast(self, object target_type=None, safe=None, options=None, memory_pool=None):
*/
      __Pyx_XDECREF(__pyx_r);
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "wrapped");
        __PYX_ERR(3, 71, __pyx_L1_error)
      }
      __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->wrapped.get()->is_valid); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 71, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/scalar.pxi":66
 *         return pyarrow_wrap_data_type(self.wrapped.get().type)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_valid(self):
 *         """
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("pyarrow.lib.Scalar.is_valid.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/scalar.pxi":73
 *         return self.wrapped.get().is_valid
 * 
 *     def cast(self, object target_type=None, safe=None, options=None, memory_pool=None):             # <<<<<<<<<<<<<<
 *         """
 *         Cast scalar value to another data type.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_6Scalar_3cast(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_6Scalar_2cast, "Scalar.cast(self, target_type=None, safe=None, options=None, memory_pool=None)\n\nCast scalar value to another data type.\n\nSee :func:`pyarrow.compute.cast` for usage.\n\nParameters\n----------\ntarget_type : DataType, default None\n    Type to cast scalar to.\nsafe : boolean, default True\n    Whether to check for conversion errors such as overflow.\noptions : CastOptions, default None\n    Additional checks pass by CastOptions\nmemory_pool : MemoryPool, optional\n    memory pool to use for allocations during function execution.\n\nReturns\n-------\nscalar : A Scalar of the given target data type.");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_6Scalar_3cast = {"cast", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_6Scalar_3cast, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_6Scalar_2cast};
    static PyObject *__pyx_pw_7pyarrow_3lib_6Scalar_3cast(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_target_type = 0;
      PyObject *__pyx_v_safe = 0;
      PyObject *__pyx_v_options = 0;
      PyObject *__pyx_v_memory_pool = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[4] = {0,0,0,0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("cast (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_target_type,&__pyx_mstate_global->__pyx_n_u_safe,&__pyx_mstate_global->__pyx_n_u_options,&__pyx_mstate_global->__pyx_n_u_memory_pool,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(3, 73, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  4:
            values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(3, 73, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  3:
            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(3, 73, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(3, 73, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(3, 73, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "cast", 0) < (0)) __PYX_ERR(3, 73, __pyx_L3_error)
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
          if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
          if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None));
        } else {
          switch (__pyx_nargs) {
            case  4:
            values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(3, 73, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  3:
            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(3, 73, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(3, 73, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(3, 73, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
          if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
          if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None));
        }
        __pyx_v_target_type = values[0];
        __pyx_v_safe = values[1];
        __pyx_v_options = values[2];
        __pyx_v_memory_pool = values[3];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("cast", 0, 0, 4, __pyx_nargs); __PYX_ERR(3, 73, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.Scalar.cast", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_6Scalar_2cast(((struct __pyx_obj_7pyarrow_3lib_Scalar *)__pyx_v_self), __pyx_v_target_type, __pyx_v_safe, __pyx_v_options, __pyx_v_memory_pool);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_6Scalar_2cast(struct __pyx_obj_7pyarrow_3lib_Scalar *__pyx_v_self, PyObject *__pyx_v_target_type, PyObject *__pyx_v_safe, PyObject *__pyx_v_options, PyObject *__pyx_v_memory_pool) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      PyObject *__pyx_t_5 = NULL;
      size_t __pyx_t_6;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("cast", 0);

      /* "pyarrow/scalar.pxi":94
 *         scalar : A Scalar of the given target data type.
 *         """
 *         return _pc().cast(self, target_type, safe=safe,             # <<<<<<<<<<<<<<
 *                           options=options, memory_pool=memory_pool)
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_4 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pc_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 94, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
        assert(__pyx_t_4);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
        __pyx_t_6 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
        __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 94, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      __pyx_t_2 = __pyx_t_3;
      __Pyx_INCREF(__pyx_t_2);

      /* "pyarrow/scalar.pxi":95
 *         """
 *         return _pc().cast(self, target_type, safe=safe,
 *                           options=options, memory_pool=memory_pool)             # <<<<<<<<<<<<<<
 * 
 *     def validate(self, *, full=False):
*/
      __pyx_t_6 = 0;
      {
        PyObject *__pyx_callargs[3 + ((CYTHON_VECTORCALL) ? 3 : 0)] = {__pyx_t_2, ((PyObject *)__pyx_v_self), __pyx_v_target_type};
        __pyx_t_5 = __Pyx_MakeVectorcallBuilderKwds(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 94, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_safe, __pyx_v_safe, __pyx_t_5, __pyx_callargs+3, 0) < (0)) __PYX_ERR(3, 94, __pyx_L1_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_options, __pyx_v_options, __pyx_t_5, __pyx_callargs+3, 1) < (0)) __PYX_ERR(3, 94, __pyx_L1_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_memory_pool, __pyx_v_memory_pool, __pyx_t_5, __pyx_callargs+3, 2) < (0)) __PYX_ERR(3, 94, __pyx_L1_error)
        __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_cast, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_5);
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 94, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/scalar.pxi":73
 *         return self.wrapped.get().is_valid
 * 
 *     def cast(self, object target_type=None, safe=None, options=None, memory_pool=None):             # <<<<<<<<<<<<<<
 *         """
 *         Cast scalar value to another data type.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_AddTraceback("pyarrow.lib.Scalar.cast", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/scalar.pxi":97
 *                           options=options, memory_pool=memory_pool)
 * 
 *     def validate(self, *, full=False):             # <<<<<<<<<<<<<<
 *         """
 *         Perform validation checks.  An exception is raised if validation fails.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_6Scalar_5validate(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_6Scalar_4validate, "Scalar.validate(self, *, full=False)\n\nPerform validation checks.  An exception is raised if validation fails.\n\nBy default only cheap validation checks are run.  Pass `full=True`\nfor thorough validation checks (potentially O(n)).\n\nParameters\n----------\nfull : bool, default False\n    If True, run expensive checks, otherwise cheap checks only.\n\nRaises\n------\nArrowInvalid");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_6Scalar_5validate = {"validate", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_6Scalar_5validate, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_6Scalar_4validate};
    static PyObject *__pyx_pw_7pyarrow_3lib_6Scalar_5validate(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_full = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("validate (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_full,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(3, 97, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, 0, __pyx_kwds_len, "validate", 0) < (0)) __PYX_ERR(3, 97, __pyx_L3_error)
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_False));
        } else if (unlikely(__pyx_nargs != 0)) {
          goto __pyx_L5_argtuple_error;
        } else {
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_False));
        }
        __pyx_v_full = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("validate", 1, 0, 0, __pyx_nargs); __PYX_ERR(3, 97, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.Scalar.validate", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_6Scalar_4validate(((struct __pyx_obj_7pyarrow_3lib_Scalar *)__pyx_v_self), __pyx_v_full);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_6Scalar_4validate(struct __pyx_obj_7pyarrow_3lib_Scalar *__pyx_v_self, PyObject *__pyx_v_full) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      int __pyx_t_1;
      int __pyx_t_2;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("validate", 0);

      /* "pyarrow/scalar.pxi":113
 *         ArrowInvalid
 *         """
 *         if full:             # <<<<<<<<<<<<<<
 *             with nogil:
 *                 check_status(self.wrapped.get().ValidateFull())
*/
      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_full); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(3, 113, __pyx_L1_error)
      if (__pyx_t_1) {

        /* "pyarrow/scalar.pxi":114
 *         """
 *         if full:
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 check_status(self.wrapped.get().ValidateFull())
 *         else:
*/
        {
            PyThreadState * _save;
            _save = PyEval_SaveThread();
            __Pyx_FastGIL_Remember();
            /*try:*/ {

              /* "pyarrow/scalar.pxi":115
 *         if full:
 *             with nogil:
 *                 check_status(self.wrapped.get().ValidateFull())             # <<<<<<<<<<<<<<
 *         else:
 *             with nogil:
*/
              if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "wrapped");
                __Pyx_PyGILState_Release(__pyx_gilstate_save);
                __PYX_ERR(3, 115, __pyx_L5_error)
              }
              __pyx_t_2 = __pyx_f_7pyarrow_3lib_check_status(__pyx_v_self->wrapped.get()->ValidateFull()); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(3, 115, __pyx_L5_error)
            }

            /* "pyarrow/scalar.pxi":114
 *         """
 *         if full:
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 check_status(self.wrapped.get().ValidateFull())
 *         else:
*/
            /*finally:*/ {
              /*normal exit:*/{
                __Pyx_FastGIL_Forget();
                PyEval_RestoreThread(_save);
                goto __pyx_L6;
              }
              __pyx_L5_error: {
                __Pyx_FastGIL_Forget();
                PyEval_RestoreThread(_save);
                goto __pyx_L1_error;
              }
              __pyx_L6:;
            }
        }

        /* "pyarrow/scalar.pxi":113
 *         ArrowInvalid
 *         """
 *         if full:             # <<<<<<<<<<<<<<
 *             with nogil:
 *                 check_status(self.wrapped.get().ValidateFull())
*/
        goto __pyx_L3;
      }

      /* "pyarrow/scalar.pxi":117
 *                 check_status(self.wrapped.get().ValidateFull())
 *         else:
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 check_status(self.wrapped.get().Validate())
 * 
*/
      /*else*/ {
        {
            PyThreadState * _save;
            _save = PyEval_SaveThread();
            __Pyx_FastGIL_Remember();
            /*try:*/ {

              /* "pyarrow/scalar.pxi":118
 *         else:
 *             with nogil:
 *                 check_status(self.wrapped.get().Validate())             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
*/
              if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "wrapped");
                __Pyx_PyGILState_Release(__pyx_gilstate_save);
                __PYX_ERR(3, 118, __pyx_L8_error)
              }
              __pyx_t_2 = __pyx_f_7pyarrow_3lib_check_status(__pyx_v_self->wrapped.get()->Validate()); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(3, 118, __pyx_L8_error)
            }

            /* "pyarrow/scalar.pxi":117
 *                 check_status(self.wrapped.get().ValidateFull())
 *         else:
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 check_status(self.wrapped.get().Validate())
 * 
*/
            /*finally:*/ {
              /*normal exit:*/{
                __Pyx_FastGIL_Forget();
                PyEval_RestoreThread(_save);
                goto __pyx_L9;
              }
              __pyx_L8_error: {
                __Pyx_FastGIL_Forget();
                PyEval_RestoreThread(_save);
                goto __pyx_L1_error;
              }
              __pyx_L9:;
            }
        }
      }
      __pyx_L3:;

      /* "pyarrow/scalar.pxi":97
 *                           options=options, memory_pool=memory_pool)
 * 
 *     def validate(self, *, full=False):             # <<<<<<<<<<<<<<
 *         """
 *         Perform validation checks.  An exception is raised if validation fails.
*/

      /* function exit code */
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_AddTraceback("pyarrow.lib.Scalar.validate", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/scalar.pxi":120
 *                 check_status(self.wrapped.get().Validate())
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return f'<pyarrow.{self.__class__.__name__}: {self.as_py()!r}>'
 * 
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_6Scalar_7__repr__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_6Scalar_7__repr__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_6Scalar_6__repr__(((struct __pyx_obj_7pyarrow_3lib_Scalar *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_6Scalar_6__repr__(struct __pyx_obj_7pyarrow_3lib_Scalar *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4[5];
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__repr__", 0);

      /* "pyarrow/scalar.pxi":121
 * 
 *     def __repr__(self):
 *         return f'<pyarrow.{self.__class__.__name__}: {self.as_py()!r}>'             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 121, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_name_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 121, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_t_2, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 121, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_as_py); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 121, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 121, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_t_3), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 121, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_4[0] = __pyx_mstate_global->__pyx_kp_u_pyarrow_2;
      __pyx_t_4[1] = __pyx_t_1;
      __pyx_t_4[2] = __pyx_mstate_global->__pyx_kp_u__10;
      __pyx_t_4[3] = __pyx_t_2;
      __pyx_t_4[4] = __pyx_mstate_global->__pyx_kp_u__5;
      __pyx_t_3 = __Pyx_PyUnicode_Join(__pyx_t_4, 5, 9 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1) + 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2));
      if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 121, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "pyarrow/scalar.pxi":120
 *                 check_status(self.wrapped.get().Validate())
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return f'<pyarrow.{self.__class__.__name__}: {self.as_py()!r}>'
 * 
*/

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

    /* "pyarrow/scalar.pxi":123
 *         return f'<pyarrow.{self.__class__.__name__}: {self.as_py()!r}>'
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return str(self.as_py())
 * 
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_6Scalar_9__str__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_6Scalar_9__str__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_6Scalar_8__str__(((struct __pyx_obj_7pyarrow_3lib_Scalar *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_6Scalar_8__str__(struct __pyx_obj_7pyarrow_3lib_Scalar *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      size_t __pyx_t_3;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__str__", 0);

      /* "pyarrow/scalar.pxi":124
 * 
 *     def __str__(self):
 *         return str(self.as_py())             # <<<<<<<<<<<<<<
 * 
 *     def equals(self, Scalar other not None):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = ((PyObject *)__pyx_v_self);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_3 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_as_py, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 124, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_t_2 = __Pyx_PyObject_Unicode(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 124, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;

      /* "pyarrow/scalar.pxi":123
 *         return f'<pyarrow.{self.__class__.__name__}: {self.as_py()!r}>'
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return str(self.as_py())
 * 
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_AddTraceback("pyarrow.lib.Scalar.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/scalar.pxi":126
 *         return str(self.as_py())
 * 
 *     def equals(self, Scalar other not None):             # <<<<<<<<<<<<<<
 *         """
 *         Parameters
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_6Scalar_11equals(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_6Scalar_10equals, "Scalar.equals(self, Scalar other)\n\nParameters\n----------\nother : pyarrow.Scalar\n\nReturns\n-------\nbool");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_6Scalar_11equals = {"equals", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_6Scalar_11equals, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_6Scalar_10equals};
    static PyObject *__pyx_pw_7pyarrow_3lib_6Scalar_11equals(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      struct __pyx_obj_7pyarrow_3lib_Scalar *__pyx_v_other = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("equals (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_other,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(3, 126, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(3, 126, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "equals", 0) < (0)) __PYX_ERR(3, 126, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("equals", 1, 1, 1, i); __PYX_ERR(3, 126, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 1)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(3, 126, __pyx_L3_error)
        }
        __pyx_v_other = ((struct __pyx_obj_7pyarrow_3lib_Scalar *)values[0]);
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("equals", 1, 1, 1, __pyx_nargs); __PYX_ERR(3, 126, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.Scalar.equals", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Scalar, 0, "other", 0))) __PYX_ERR(3, 126, __pyx_L1_error)
      __pyx_r = __pyx_pf_7pyarrow_3lib_6Scalar_10equals(((struct __pyx_obj_7pyarrow_3lib_Scalar *)__pyx_v_self), __pyx_v_other);

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = NULL;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      goto __pyx_L7_cleaned_up;
      __pyx_L0:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __pyx_L7_cleaned_up:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_6Scalar_10equals(struct __pyx_obj_7pyarrow_3lib_Scalar *__pyx_v_self, struct __pyx_obj_7pyarrow_3lib_Scalar *__pyx_v_other) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      std::shared_ptr< arrow::Scalar>  __pyx_t_1;
      PyObject *__pyx_t_2 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("equals", 0);

      /* "pyarrow/scalar.pxi":136
 *         bool
 *         """
 *         return self.wrapped.get().Equals(other.unwrap().get()[0])             # <<<<<<<<<<<<<<
 * 
 *     def __eq__(self, other):
*/
      __Pyx_XDECREF(__pyx_r);
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "wrapped");
        __PYX_ERR(3, 136, __pyx_L1_error)
      }
      __pyx_t_1 = __pyx_f_7pyarrow_3lib_6Scalar_unwrap(__pyx_v_other); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 136, __pyx_L1_error)
      __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_self->wrapped.get()->Equals((__pyx_t_1.get()[0]))); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 136, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;

      /* "pyarrow/scalar.pxi":126
 *         return str(self.as_py())
 * 
 *     def equals(self, Scalar other not None):             # <<<<<<<<<<<<<<
 *         """
 *         Parameters
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_AddTraceback("pyarrow.lib.Scalar.equals", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/scalar.pxi":138
 *         return self.wrapped.get().Equals(other.unwrap().get()[0])
 * 
 *     def __eq__(self, other):             # <<<<<<<<<<<<<<
 *         try:
 *             return self.equals(other)
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_6Scalar_13__eq__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_6Scalar_13__eq__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__eq__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_6Scalar_12__eq__(((struct __pyx_obj_7pyarrow_3lib_Scalar *)__pyx_v_self), ((PyObject *)__pyx_v_other));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_6Scalar_12__eq__(struct __pyx_obj_7pyarrow_3lib_Scalar *__pyx_v_self, PyObject *__pyx_v_other) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      PyObject *__pyx_t_5 = NULL;
      size_t __pyx_t_6;
      int __pyx_t_7;
      PyObject *__pyx_t_8 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__eq__", 0);

      /* "pyarrow/scalar.pxi":139
 * 
 *     def __eq__(self, other):
 *         try:             # <<<<<<<<<<<<<<
 *             return self.equals(other)
 *         except TypeError:
*/
      {
        __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:*/ {

          /* "pyarrow/scalar.pxi":140
 *     def __eq__(self, other):
 *         try:
 *             return self.equals(other)             # <<<<<<<<<<<<<<
 *         except TypeError:
 *             return NotImplemented
*/
          __Pyx_XDECREF(__pyx_r);
          __pyx_t_5 = ((PyObject *)__pyx_v_self);
          __Pyx_INCREF(__pyx_t_5);
          __pyx_t_6 = 0;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_other};
            __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_equals, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
            if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 140, __pyx_L3_error)
            __Pyx_GOTREF(__pyx_t_4);
          }
          __pyx_r = __pyx_t_4;
          __pyx_t_4 = 0;
          goto __pyx_L7_try_return;

          /* "pyarrow/scalar.pxi":139
 * 
 *     def __eq__(self, other):
 *         try:             # <<<<<<<<<<<<<<
 *             return self.equals(other)
 *         except TypeError:
*/
        }
        __pyx_L3_error:;
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

        /* "pyarrow/scalar.pxi":141
 *         try:
 *             return self.equals(other)
 *         except TypeError:             # <<<<<<<<<<<<<<
 *             return NotImplemented
 * 
*/
        __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_TypeError))));
        if (__pyx_t_7) {
          __Pyx_AddTraceback("pyarrow.lib.Scalar.__eq__", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_8) < 0) __PYX_ERR(3, 141, __pyx_L5_except_error)
          __Pyx_XGOTREF(__pyx_t_4);
          __Pyx_XGOTREF(__pyx_t_5);
          __Pyx_XGOTREF(__pyx_t_8);

          /* "pyarrow/scalar.pxi":142
 *             return self.equals(other)
 *         except TypeError:
 *             return NotImplemented             # <<<<<<<<<<<<<<
 * 
 *     def __hash__(self):
*/
          __Pyx_XDECREF(__pyx_r);
          __Pyx_INCREF(__pyx_builtin_NotImplemented);
          __pyx_r = __pyx_builtin_NotImplemented;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          goto __pyx_L6_except_return;
        }
        goto __pyx_L5_except_error;

        /* "pyarrow/scalar.pxi":139
 * 
 *     def __eq__(self, other):
 *         try:             # <<<<<<<<<<<<<<
 *             return self.equals(other)
 *         except TypeError:
*/
        __pyx_L5_except_error:;
        __Pyx_XGIVEREF(__pyx_t_1);
        __Pyx_XGIVEREF(__pyx_t_2);
        __Pyx_XGIVEREF(__pyx_t_3);
        __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
        goto __pyx_L1_error;
        __pyx_L7_try_return:;
        __Pyx_XGIVEREF(__pyx_t_1);
        __Pyx_XGIVEREF(__pyx_t_2);
        __Pyx_XGIVEREF(__pyx_t_3);
        __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
        goto __pyx_L0;
        __pyx_L6_except_return:;
        __Pyx_XGIVEREF(__pyx_t_1);
        __Pyx_XGIVEREF(__pyx_t_2);
        __Pyx_XGIVEREF(__pyx_t_3);
        __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
        goto __pyx_L0;
      }

      /* "pyarrow/scalar.pxi":138
 *         return self.wrapped.get().Equals(other.unwrap().get()[0])
 * 
 *     def __eq__(self, other):             # <<<<<<<<<<<<<<
 *         try:
 *             return self.equals(other)
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_8);
      __Pyx_AddTraceback("pyarrow.lib.Scalar.__eq__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/scalar.pxi":144
 *             return NotImplemented
 * 
 *     def __hash__(self):             # <<<<<<<<<<<<<<
 *         cdef CScalarHash hasher
 *         return hasher(self.wrapped)
*/

    /* Python wrapper */
    static Py_hash_t __pyx_pw_7pyarrow_3lib_6Scalar_15__hash__(PyObject *__pyx_v_self); /*proto*/
    static Py_hash_t __pyx_pw_7pyarrow_3lib_6Scalar_15__hash__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      Py_hash_t __pyx_r;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__hash__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_6Scalar_14__hash__(((struct __pyx_obj_7pyarrow_3lib_Scalar *)__pyx_v_self));

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

    static Py_hash_t __pyx_pf_7pyarrow_3lib_6Scalar_14__hash__(struct __pyx_obj_7pyarrow_3lib_Scalar *__pyx_v_self) {
       arrow::Scalar::Hash __pyx_v_hasher;
      Py_hash_t __pyx_r;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;

      /* "pyarrow/scalar.pxi":146
 *     def __hash__(self):
 *         cdef CScalarHash hasher
 *         return hasher(self.wrapped)             # <<<<<<<<<<<<<<
 * 
 *     def __reduce__(self):
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "wrapped");
        __PYX_ERR(3, 146, __pyx_L1_error)
      }
      __pyx_r = __pyx_v_hasher(__pyx_v_self->wrapped);
      goto __pyx_L0;

      /* "pyarrow/scalar.pxi":144
 *             return NotImplemented
 * 
 *     def __hash__(self):             # <<<<<<<<<<<<<<
 *         cdef CScalarHash hasher
 *         return hasher(self.wrapped)
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_AddTraceback("pyarrow.lib.Scalar.__hash__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = -1;
      __pyx_L0:;
      if (unlikely(__pyx_r == -1) && !PyErr_Occurred()) __pyx_r = -2;
      return __pyx_r;
    }

    /* "pyarrow/scalar.pxi":148
 *         return hasher(self.wrapped)
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         return scalar, (self.as_py(), self.type)
 * 
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_6Scalar_17__reduce__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_6Scalar_16__reduce__, "Scalar.__reduce__(self)");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_6Scalar_17__reduce__ = {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_6Scalar_17__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_6Scalar_16__reduce__};
    static PyObject *__pyx_pw_7pyarrow_3lib_6Scalar_17__reduce__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__reduce__ (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce__", 1, 0, 0, __pyx_nargs); return NULL; }
      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
      if (unlikely(__pyx_kwds_len < 0)) return NULL;
      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce__", __pyx_kwds); return NULL;}
      __pyx_r = __pyx_pf_7pyarrow_3lib_6Scalar_16__reduce__(((struct __pyx_obj_7pyarrow_3lib_Scalar *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_6Scalar_16__reduce__(struct __pyx_obj_7pyarrow_3lib_Scalar *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      size_t __pyx_t_4;
      PyObject *__pyx_t_5 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__reduce__", 0);

      /* "pyarrow/scalar.pxi":149
 * 
 *     def __reduce__(self):
 *         return scalar, (self.as_py(), self.type)             # <<<<<<<<<<<<<<
 * 
 *     def as_py(self, *, maps_as_pydicts=None):
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_scalar); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 149, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = ((PyObject *)__pyx_v_self);
      __Pyx_INCREF(__pyx_t_3);
      __pyx_t_4 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
        __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_as_py, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 149, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
      }
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 149, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 149, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_2);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2) != (0)) __PYX_ERR(3, 149, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_3);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3) != (0)) __PYX_ERR(3, 149, __pyx_L1_error);
      __pyx_t_2 = 0;
      __pyx_t_3 = 0;
      __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 149, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_1);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1) != (0)) __PYX_ERR(3, 149, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_5);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_5) != (0)) __PYX_ERR(3, 149, __pyx_L1_error);
      __pyx_t_1 = 0;
      __pyx_t_5 = 0;
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "pyarrow/scalar.pxi":148
 *         return hasher(self.wrapped)
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         return scalar, (self.as_py(), self.type)
 * 
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_AddTraceback("pyarrow.lib.Scalar.__reduce__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/scalar.pxi":151
 *         return scalar, (self.as_py(), self.type)
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return this value as a Python representation.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_6Scalar_19as_py(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_6Scalar_18as_py, "Scalar.as_py(self, *, maps_as_pydicts=None)\n\nReturn this value as a Python representation.\n\nParameters\n----------\nmaps_as_pydicts : str, optional, default `None`\n    Valid values are `None`, 'lossy', or 'strict'.\n    The default behavior (`None`), is to convert Arrow Map arrays to\n    Python association lists (list-of-tuples) in the same order as the\n    Arrow Map, as in [(key1, value1), (key2, value2), ...].\n\n    If 'lossy' or 'strict', convert Arrow Map arrays to native Python dicts.\n\n    If 'lossy', whenever duplicate keys are detected, a warning will be printed.\n    The last seen value of a duplicate key will be in the Python dictionary.\n    If 'strict', this instead results in an exception being raised when detected.");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_6Scalar_19as_py = {"as_py", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_6Scalar_19as_py, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_6Scalar_18as_py};
    static PyObject *__pyx_pw_7pyarrow_3lib_6Scalar_19as_py(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      CYTHON_UNUSED PyObject *__pyx_v_maps_as_pydicts = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("as_py (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_maps_as_pydicts,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(3, 151, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, 0, __pyx_kwds_len, "as_py", 0) < (0)) __PYX_ERR(3, 151, __pyx_L3_error)
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
        } else if (unlikely(__pyx_nargs != 0)) {
          goto __pyx_L5_argtuple_error;
        } else {
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
        }
        __pyx_v_maps_as_pydicts = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("as_py", 1, 0, 0, __pyx_nargs); __PYX_ERR(3, 151, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.Scalar.as_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_6Scalar_18as_py(((struct __pyx_obj_7pyarrow_3lib_Scalar *)__pyx_v_self), __pyx_v_maps_as_pydicts);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_6Scalar_18as_py(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_Scalar *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_maps_as_pydicts) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      size_t __pyx_t_3;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("as_py", 0);

      /* "pyarrow/scalar.pxi":169
 *             If 'strict', this instead results in an exception being raised when detected.
 *         """
 *         raise NotImplementedError()             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __pyx_t_2 = NULL;
      __pyx_t_3 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_NotImplementedError)), __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 169, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __PYX_ERR(3, 169, __pyx_L1_error)

      /* "pyarrow/scalar.pxi":151
 *         return scalar, (self.as_py(), self.type)
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return this value as a Python representation.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_AddTraceback("pyarrow.lib.Scalar.as_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/scalar.pxi":180
 *     """
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         global NA
 *         if NA is not None:
*/

    /* Python wrapper */
    static int __pyx_pw_7pyarrow_3lib_10NullScalar_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
    static int __pyx_pw_7pyarrow_3lib_10NullScalar_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      int __pyx_r;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
      #endif
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, __pyx_nargs); return -1; }
      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
      if (unlikely(__pyx_kwds_len < 0)) return -1;
      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__cinit__", __pyx_kwds); return -1;}
      __pyx_r = __pyx_pf_7pyarrow_3lib_10NullScalar___cinit__(((struct __pyx_obj_7pyarrow_3lib_NullScalar *)__pyx_v_self));

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

    static int __pyx_pf_7pyarrow_3lib_10NullScalar___cinit__(struct __pyx_obj_7pyarrow_3lib_NullScalar *__pyx_v_self) {
      int __pyx_r;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_t_2;
      PyObject *__pyx_t_3 = NULL;
      size_t __pyx_t_4;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__cinit__", 0);

      /* "pyarrow/scalar.pxi":182
 *     def __cinit__(self):
 *         global NA
 *         if NA is not None:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Cannot create multiple NullScalar instances')
 *         self.init(shared_ptr[CScalar](new CNullScalar()))
*/
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_NA); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 182, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = (__pyx_t_1 != Py_None);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(__pyx_t_2)) {

        /* "pyarrow/scalar.pxi":183
 *         global NA
 *         if NA is not None:
 *             raise RuntimeError('Cannot create multiple NullScalar instances')             # <<<<<<<<<<<<<<
 *         self.init(shared_ptr[CScalar](new CNullScalar()))
 * 
*/
        __pyx_t_3 = NULL;
        __pyx_t_4 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Cannot_create_multiple_NullScala};
          __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 183, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
        }
        __Pyx_Raise(__pyx_t_1, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __PYX_ERR(3, 183, __pyx_L1_error)

        /* "pyarrow/scalar.pxi":182
 *     def __cinit__(self):
 *         global NA
 *         if NA is not None:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Cannot create multiple NullScalar instances')
 *         self.init(shared_ptr[CScalar](new CNullScalar()))
*/
      }

      /* "pyarrow/scalar.pxi":184
 *         if NA is not None:
 *             raise RuntimeError('Cannot create multiple NullScalar instances')
 *         self.init(shared_ptr[CScalar](new CNullScalar()))             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self):
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "init");
        __PYX_ERR(3, 184, __pyx_L1_error)
      }
      ((struct __pyx_vtabstruct_7pyarrow_3lib_NullScalar *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.init(((struct __pyx_obj_7pyarrow_3lib_Scalar *)__pyx_v_self), std::shared_ptr< arrow::Scalar> (new  arrow::NullScalar())); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 184, __pyx_L1_error)

      /* "pyarrow/scalar.pxi":180
 *     """
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         global NA
 *         if NA is not None:
*/

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

    /* "pyarrow/scalar.pxi":186
 *         self.init(shared_ptr[CScalar](new CNullScalar()))
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         pass
 * 
*/

    /* Python wrapper */
    static int __pyx_pw_7pyarrow_3lib_10NullScalar_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
    static int __pyx_pw_7pyarrow_3lib_10NullScalar_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      int __pyx_r;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
      #endif
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, __pyx_nargs); return -1; }
      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
      if (unlikely(__pyx_kwds_len < 0)) return -1;
      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__init__", __pyx_kwds); return -1;}
      __pyx_r = __pyx_pf_7pyarrow_3lib_10NullScalar_2__init__(((struct __pyx_obj_7pyarrow_3lib_NullScalar *)__pyx_v_self));

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

    static int __pyx_pf_7pyarrow_3lib_10NullScalar_2__init__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_NullScalar *__pyx_v_self) {
      int __pyx_r;

      /* function exit code */
      __pyx_r = 0;
      return __pyx_r;
    }

    /* "pyarrow/scalar.pxi":189
 *         pass
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return this value as a Python None.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_10NullScalar_5as_py(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_10NullScalar_4as_py, "NullScalar.as_py(self, *, maps_as_pydicts=None)\n\nReturn this value as a Python None.\n\nParameters\n----------\nmaps_as_pydicts : str, optional, default `None`\n    Valid values are `None`, 'lossy', or 'strict'.\n    This parameter is ignored for non-nested Scalars.");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_10NullScalar_5as_py = {"as_py", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10NullScalar_5as_py, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10NullScalar_4as_py};
    static PyObject *__pyx_pw_7pyarrow_3lib_10NullScalar_5as_py(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      CYTHON_UNUSED PyObject *__pyx_v_maps_as_pydicts = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("as_py (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_maps_as_pydicts,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(3, 189, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, 0, __pyx_kwds_len, "as_py", 0) < (0)) __PYX_ERR(3, 189, __pyx_L3_error)
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
        } else if (unlikely(__pyx_nargs != 0)) {
          goto __pyx_L5_argtuple_error;
        } else {
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
        }
        __pyx_v_maps_as_pydicts = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("as_py", 1, 0, 0, __pyx_nargs); __PYX_ERR(3, 189, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.NullScalar.as_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_10NullScalar_4as_py(((struct __pyx_obj_7pyarrow_3lib_NullScalar *)__pyx_v_self), __pyx_v_maps_as_pydicts);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_10NullScalar_4as_py(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_NullScalar *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_maps_as_pydicts) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("as_py", 0);

      /* "pyarrow/scalar.pxi":199
 *             This parameter is ignored for non-nested Scalars.
 *         """
 *         return None             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      goto __pyx_L0;

      /* "pyarrow/scalar.pxi":189
 *         pass
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return this value as a Python None.
*/

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

    /* "pyarrow/scalar.pxi":210
 *     """
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return this value as a Python bool.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_13BooleanScalar_1as_py(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_13BooleanScalar_as_py, "BooleanScalar.as_py(self, *, maps_as_pydicts=None)\n\nReturn this value as a Python bool.\n\nParameters\n----------\nmaps_as_pydicts : str, optional, default `None`\n    Valid values are `None`, 'lossy', or 'strict'.\n    This parameter is ignored for non-nested Scalars.");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_13BooleanScalar_1as_py = {"as_py", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_13BooleanScalar_1as_py, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_13BooleanScalar_as_py};
    static PyObject *__pyx_pw_7pyarrow_3lib_13BooleanScalar_1as_py(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      CYTHON_UNUSED PyObject *__pyx_v_maps_as_pydicts = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("as_py (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_maps_as_pydicts,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(3, 210, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, 0, __pyx_kwds_len, "as_py", 0) < (0)) __PYX_ERR(3, 210, __pyx_L3_error)
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
        } else if (unlikely(__pyx_nargs != 0)) {
          goto __pyx_L5_argtuple_error;
        } else {
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
        }
        __pyx_v_maps_as_pydicts = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("as_py", 1, 0, 0, __pyx_nargs); __PYX_ERR(3, 210, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.BooleanScalar.as_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_13BooleanScalar_as_py(((struct __pyx_obj_7pyarrow_3lib_BooleanScalar *)__pyx_v_self), __pyx_v_maps_as_pydicts);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_13BooleanScalar_as_py(struct __pyx_obj_7pyarrow_3lib_BooleanScalar *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_maps_as_pydicts) {
       arrow::BooleanScalar *__pyx_v_sp;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_t_2;
      PyObject *__pyx_t_3 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("as_py", 0);

      /* "pyarrow/scalar.pxi":220
 *             This parameter is ignored for non-nested Scalars.
 *         """
 *         cdef CBooleanScalar* sp = <CBooleanScalar*> self.wrapped.get()             # <<<<<<<<<<<<<<
 *         return sp.value if sp.is_valid else None
 * 
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "wrapped");
        __PYX_ERR(3, 220, __pyx_L1_error)
      }
      __pyx_v_sp = (( arrow::BooleanScalar *)__pyx_v_self->__pyx_base.wrapped.get());

      /* "pyarrow/scalar.pxi":221
 *         """
 *         cdef CBooleanScalar* sp = <CBooleanScalar*> self.wrapped.get()
 *         return sp.value if sp.is_valid else None             # <<<<<<<<<<<<<<
 * 
 *     def __bool__(self):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = (__pyx_v_sp->is_valid != 0);
      if (__pyx_t_2) {
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_sp->value); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 221, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_1 = __pyx_t_3;
        __pyx_t_3 = 0;
      } else {
        __Pyx_INCREF(Py_None);
        __pyx_t_1 = Py_None;
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/scalar.pxi":210
 *     """
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return this value as a Python bool.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_AddTraceback("pyarrow.lib.BooleanScalar.as_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/scalar.pxi":223
 *         return sp.value if sp.is_valid else None
 * 
 *     def __bool__(self):             # <<<<<<<<<<<<<<
 *         return self.as_py() or False
 * 
*/

    /* Python wrapper */
    static int __pyx_pw_7pyarrow_3lib_13BooleanScalar_3__bool__(PyObject *__pyx_v_self); /*proto*/
    static int __pyx_pw_7pyarrow_3lib_13BooleanScalar_3__bool__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      int __pyx_r;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__bool__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_13BooleanScalar_2__bool__(((struct __pyx_obj_7pyarrow_3lib_BooleanScalar *)__pyx_v_self));

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

    static int __pyx_pf_7pyarrow_3lib_13BooleanScalar_2__bool__(struct __pyx_obj_7pyarrow_3lib_BooleanScalar *__pyx_v_self) {
      int __pyx_r;
      __Pyx_RefNannyDeclarations
      int __pyx_t_1;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      size_t __pyx_t_4;
      int __pyx_t_5;
      int __pyx_t_6;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__bool__", 0);

      /* "pyarrow/scalar.pxi":224
 * 
 *     def __bool__(self):
 *         return self.as_py() or False             # <<<<<<<<<<<<<<
 * 
 * cdef class UInt8Scalar(Scalar):
*/
      __pyx_t_3 = ((PyObject *)__pyx_v_self);
      __Pyx_INCREF(__pyx_t_3);
      __pyx_t_4 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
        __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_as_py, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 224, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
      }
      __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(3, 224, __pyx_L1_error)
      if (!__pyx_t_5) {
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      } else {
        __pyx_t_6 = __Pyx_PyLong_As_int(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 224, __pyx_L1_error)
        __pyx_t_1 = __pyx_t_6;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        goto __pyx_L3_bool_binop_done;
      }
      __pyx_t_1 = 0;
      __pyx_L3_bool_binop_done:;
      __pyx_r = __pyx_t_1;
      goto __pyx_L0;

      /* "pyarrow/scalar.pxi":223
 *         return sp.value if sp.is_valid else None
 * 
 *     def __bool__(self):             # <<<<<<<<<<<<<<
 *         return self.as_py() or False
 * 
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_AddTraceback("pyarrow.lib.BooleanScalar.__bool__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = -1;
      __pyx_L0:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/scalar.pxi":231
 *     """
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return this value as a Python int.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_11UInt8Scalar_1as_py(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_11UInt8Scalar_as_py, "UInt8Scalar.as_py(self, *, maps_as_pydicts=None)\n\nReturn this value as a Python int.\n\nParameters\n----------\nmaps_as_pydicts : str, optional, default `None`\n    Valid values are `None`, 'lossy', or 'strict'.\n    This parameter is ignored for non-nested Scalars.");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_11UInt8Scalar_1as_py = {"as_py", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_11UInt8Scalar_1as_py, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_11UInt8Scalar_as_py};
    static PyObject *__pyx_pw_7pyarrow_3lib_11UInt8Scalar_1as_py(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      CYTHON_UNUSED PyObject *__pyx_v_maps_as_pydicts = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("as_py (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_maps_as_pydicts,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(3, 231, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, 0, __pyx_kwds_len, "as_py", 0) < (0)) __PYX_ERR(3, 231, __pyx_L3_error)
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
        } else if (unlikely(__pyx_nargs != 0)) {
          goto __pyx_L5_argtuple_error;
        } else {
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
        }
        __pyx_v_maps_as_pydicts = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("as_py", 1, 0, 0, __pyx_nargs); __PYX_ERR(3, 231, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.UInt8Scalar.as_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_11UInt8Scalar_as_py(((struct __pyx_obj_7pyarrow_3lib_UInt8Scalar *)__pyx_v_self), __pyx_v_maps_as_pydicts);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_11UInt8Scalar_as_py(struct __pyx_obj_7pyarrow_3lib_UInt8Scalar *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_maps_as_pydicts) {
       arrow::UInt8Scalar *__pyx_v_sp;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_t_2;
      PyObject *__pyx_t_3 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("as_py", 0);

      /* "pyarrow/scalar.pxi":241
 *             This parameter is ignored for non-nested Scalars.
 *         """
 *         cdef CUInt8Scalar* sp = <CUInt8Scalar*> self.wrapped.get()             # <<<<<<<<<<<<<<
 *         return sp.value if sp.is_valid else None
 * 
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "wrapped");
        __PYX_ERR(3, 241, __pyx_L1_error)
      }
      __pyx_v_sp = (( arrow::UInt8Scalar *)__pyx_v_self->__pyx_base.wrapped.get());

      /* "pyarrow/scalar.pxi":242
 *         """
 *         cdef CUInt8Scalar* sp = <CUInt8Scalar*> self.wrapped.get()
 *         return sp.value if sp.is_valid else None             # <<<<<<<<<<<<<<
 * 
 *     def __index__(self):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = (__pyx_v_sp->is_valid != 0);
      if (__pyx_t_2) {
        __pyx_t_3 = __Pyx_PyLong_From_uint8_t(__pyx_v_sp->value); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 242, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_1 = __pyx_t_3;
        __pyx_t_3 = 0;
      } else {
        __Pyx_INCREF(Py_None);
        __pyx_t_1 = Py_None;
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/scalar.pxi":231
 *     """
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return this value as a Python int.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_AddTraceback("pyarrow.lib.UInt8Scalar.as_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/scalar.pxi":244
 *         return sp.value if sp.is_valid else None
 * 
 *     def __index__(self):             # <<<<<<<<<<<<<<
 *         return self.as_py()
 * 
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_11UInt8Scalar_3__index__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_11UInt8Scalar_3__index__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__index__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_11UInt8Scalar_2__index__(((struct __pyx_obj_7pyarrow_3lib_UInt8Scalar *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_11UInt8Scalar_2__index__(struct __pyx_obj_7pyarrow_3lib_UInt8Scalar *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      size_t __pyx_t_3;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__index__", 0);

      /* "pyarrow/scalar.pxi":245
 * 
 *     def __index__(self):
 *         return self.as_py()             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = ((PyObject *)__pyx_v_self);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_3 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_as_py, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 245, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/scalar.pxi":244
 *         return sp.value if sp.is_valid else None
 * 
 *     def __index__(self):             # <<<<<<<<<<<<<<
 *         return self.as_py()
 * 
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_AddTraceback("pyarrow.lib.UInt8Scalar.__index__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/scalar.pxi":253
 *     """
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return this value as a Python int.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_10Int8Scalar_1as_py(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_10Int8Scalar_as_py, "Int8Scalar.as_py(self, *, maps_as_pydicts=None)\n\nReturn this value as a Python int.\n\nParameters\n----------\nmaps_as_pydicts : str, optional, default `None`\n    Valid values are `None`, 'lossy', or 'strict'.\n    This parameter is ignored for non-nested Scalars.");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_10Int8Scalar_1as_py = {"as_py", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10Int8Scalar_1as_py, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10Int8Scalar_as_py};
    static PyObject *__pyx_pw_7pyarrow_3lib_10Int8Scalar_1as_py(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      CYTHON_UNUSED PyObject *__pyx_v_maps_as_pydicts = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("as_py (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_maps_as_pydicts,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(3, 253, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, 0, __pyx_kwds_len, "as_py", 0) < (0)) __PYX_ERR(3, 253, __pyx_L3_error)
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
        } else if (unlikely(__pyx_nargs != 0)) {
          goto __pyx_L5_argtuple_error;
        } else {
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
        }
        __pyx_v_maps_as_pydicts = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("as_py", 1, 0, 0, __pyx_nargs); __PYX_ERR(3, 253, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.Int8Scalar.as_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_10Int8Scalar_as_py(((struct __pyx_obj_7pyarrow_3lib_Int8Scalar *)__pyx_v_self), __pyx_v_maps_as_pydicts);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_10Int8Scalar_as_py(struct __pyx_obj_7pyarrow_3lib_Int8Scalar *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_maps_as_pydicts) {
       arrow::Int8Scalar *__pyx_v_sp;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_t_2;
      PyObject *__pyx_t_3 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("as_py", 0);

      /* "pyarrow/scalar.pxi":263
 *             This parameter is ignored for non-nested Scalars.
 *         """
 *         cdef CInt8Scalar* sp = <CInt8Scalar*> self.wrapped.get()             # <<<<<<<<<<<<<<
 *         return sp.value if sp.is_valid else None
 * 
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "wrapped");
        __PYX_ERR(3, 263, __pyx_L1_error)
      }
      __pyx_v_sp = (( arrow::Int8Scalar *)__pyx_v_self->__pyx_base.wrapped.get());

      /* "pyarrow/scalar.pxi":264
 *         """
 *         cdef CInt8Scalar* sp = <CInt8Scalar*> self.wrapped.get()
 *         return sp.value if sp.is_valid else None             # <<<<<<<<<<<<<<
 * 
 *     def __index__(self):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = (__pyx_v_sp->is_valid != 0);
      if (__pyx_t_2) {
        __pyx_t_3 = __Pyx_PyLong_From_int8_t(__pyx_v_sp->value); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 264, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_1 = __pyx_t_3;
        __pyx_t_3 = 0;
      } else {
        __Pyx_INCREF(Py_None);
        __pyx_t_1 = Py_None;
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/scalar.pxi":253
 *     """
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return this value as a Python int.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_AddTraceback("pyarrow.lib.Int8Scalar.as_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/scalar.pxi":266
 *         return sp.value if sp.is_valid else None
 * 
 *     def __index__(self):             # <<<<<<<<<<<<<<
 *         return self.as_py()
 * 
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_10Int8Scalar_3__index__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_10Int8Scalar_3__index__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__index__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_10Int8Scalar_2__index__(((struct __pyx_obj_7pyarrow_3lib_Int8Scalar *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_10Int8Scalar_2__index__(struct __pyx_obj_7pyarrow_3lib_Int8Scalar *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      size_t __pyx_t_3;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__index__", 0);

      /* "pyarrow/scalar.pxi":267
 * 
 *     def __index__(self):
 *         return self.as_py()             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = ((PyObject *)__pyx_v_self);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_3 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_as_py, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 267, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/scalar.pxi":266
 *         return sp.value if sp.is_valid else None
 * 
 *     def __index__(self):             # <<<<<<<<<<<<<<
 *         return self.as_py()
 * 
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_AddTraceback("pyarrow.lib.Int8Scalar.__index__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/scalar.pxi":275
 *     """
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return this value as a Python int.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_12UInt16Scalar_1as_py(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_12UInt16Scalar_as_py, "UInt16Scalar.as_py(self, *, maps_as_pydicts=None)\n\nReturn this value as a Python int.\n\nParameters\n----------\nmaps_as_pydicts : str, optional, default `None`\n    Valid values are `None`, 'lossy', or 'strict'.\n    This parameter is ignored for non-nested Scalars.");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_12UInt16Scalar_1as_py = {"as_py", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12UInt16Scalar_1as_py, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12UInt16Scalar_as_py};
    static PyObject *__pyx_pw_7pyarrow_3lib_12UInt16Scalar_1as_py(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      CYTHON_UNUSED PyObject *__pyx_v_maps_as_pydicts = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("as_py (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_maps_as_pydicts,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(3, 275, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, 0, __pyx_kwds_len, "as_py", 0) < (0)) __PYX_ERR(3, 275, __pyx_L3_error)
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
        } else if (unlikely(__pyx_nargs != 0)) {
          goto __pyx_L5_argtuple_error;
        } else {
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
        }
        __pyx_v_maps_as_pydicts = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("as_py", 1, 0, 0, __pyx_nargs); __PYX_ERR(3, 275, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.UInt16Scalar.as_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_12UInt16Scalar_as_py(((struct __pyx_obj_7pyarrow_3lib_UInt16Scalar *)__pyx_v_self), __pyx_v_maps_as_pydicts);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_12UInt16Scalar_as_py(struct __pyx_obj_7pyarrow_3lib_UInt16Scalar *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_maps_as_pydicts) {
       arrow::UInt16Scalar *__pyx_v_sp;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_t_2;
      PyObject *__pyx_t_3 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("as_py", 0);

      /* "pyarrow/scalar.pxi":285
 *             This parameter is ignored for non-nested Scalars.
 *         """
 *         cdef CUInt16Scalar* sp = <CUInt16Scalar*> self.wrapped.get()             # <<<<<<<<<<<<<<
 *         return sp.value if sp.is_valid else None
 * 
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "wrapped");
        __PYX_ERR(3, 285, __pyx_L1_error)
      }
      __pyx_v_sp = (( arrow::UInt16Scalar *)__pyx_v_self->__pyx_base.wrapped.get());

      /* "pyarrow/scalar.pxi":286
 *         """
 *         cdef CUInt16Scalar* sp = <CUInt16Scalar*> self.wrapped.get()
 *         return sp.value if sp.is_valid else None             # <<<<<<<<<<<<<<
 * 
 *     def __index__(self):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = (__pyx_v_sp->is_valid != 0);
      if (__pyx_t_2) {
        __pyx_t_3 = __Pyx_PyLong_From_uint16_t(__pyx_v_sp->value); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 286, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_1 = __pyx_t_3;
        __pyx_t_3 = 0;
      } else {
        __Pyx_INCREF(Py_None);
        __pyx_t_1 = Py_None;
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/scalar.pxi":275
 *     """
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return this value as a Python int.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_AddTraceback("pyarrow.lib.UInt16Scalar.as_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/scalar.pxi":288
 *         return sp.value if sp.is_valid else None
 * 
 *     def __index__(self):             # <<<<<<<<<<<<<<
 *         return self.as_py()
 * 
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_12UInt16Scalar_3__index__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_12UInt16Scalar_3__index__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__index__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_12UInt16Scalar_2__index__(((struct __pyx_obj_7pyarrow_3lib_UInt16Scalar *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_12UInt16Scalar_2__index__(struct __pyx_obj_7pyarrow_3lib_UInt16Scalar *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      size_t __pyx_t_3;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__index__", 0);

      /* "pyarrow/scalar.pxi":289
 * 
 *     def __index__(self):
 *         return self.as_py()             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = ((PyObject *)__pyx_v_self);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_3 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_as_py, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 289, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/scalar.pxi":288
 *         return sp.value if sp.is_valid else None
 * 
 *     def __index__(self):             # <<<<<<<<<<<<<<
 *         return self.as_py()
 * 
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_AddTraceback("pyarrow.lib.UInt16Scalar.__index__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/scalar.pxi":297
 *     """
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return this value as a Python int.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_11Int16Scalar_1as_py(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_11Int16Scalar_as_py, "Int16Scalar.as_py(self, *, maps_as_pydicts=None)\n\nReturn this value as a Python int.\n\nParameters\n----------\nmaps_as_pydicts : str, optional, default `None`\n    Valid values are `None`, 'lossy', or 'strict'.\n    This parameter is ignored for non-nested Scalars.");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_11Int16Scalar_1as_py = {"as_py", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_11Int16Scalar_1as_py, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_11Int16Scalar_as_py};
    static PyObject *__pyx_pw_7pyarrow_3lib_11Int16Scalar_1as_py(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      CYTHON_UNUSED PyObject *__pyx_v_maps_as_pydicts = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("as_py (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_maps_as_pydicts,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(3, 297, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, 0, __pyx_kwds_len, "as_py", 0) < (0)) __PYX_ERR(3, 297, __pyx_L3_error)
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
        } else if (unlikely(__pyx_nargs != 0)) {
          goto __pyx_L5_argtuple_error;
        } else {
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
        }
        __pyx_v_maps_as_pydicts = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("as_py", 1, 0, 0, __pyx_nargs); __PYX_ERR(3, 297, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.Int16Scalar.as_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_11Int16Scalar_as_py(((struct __pyx_obj_7pyarrow_3lib_Int16Scalar *)__pyx_v_self), __pyx_v_maps_as_pydicts);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_11Int16Scalar_as_py(struct __pyx_obj_7pyarrow_3lib_Int16Scalar *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_maps_as_pydicts) {
       arrow::Int16Scalar *__pyx_v_sp;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_t_2;
      PyObject *__pyx_t_3 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("as_py", 0);

      /* "pyarrow/scalar.pxi":307
 *             This parameter is ignored for non-nested Scalars.
 *         """
 *         cdef CInt16Scalar* sp = <CInt16Scalar*> self.wrapped.get()             # <<<<<<<<<<<<<<
 *         return sp.value if sp.is_valid else None
 * 
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "wrapped");
        __PYX_ERR(3, 307, __pyx_L1_error)
      }
      __pyx_v_sp = (( arrow::Int16Scalar *)__pyx_v_self->__pyx_base.wrapped.get());

      /* "pyarrow/scalar.pxi":308
 *         """
 *         cdef CInt16Scalar* sp = <CInt16Scalar*> self.wrapped.get()
 *         return sp.value if sp.is_valid else None             # <<<<<<<<<<<<<<
 * 
 *     def __index__(self):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = (__pyx_v_sp->is_valid != 0);
      if (__pyx_t_2) {
        __pyx_t_3 = __Pyx_PyLong_From_int16_t(__pyx_v_sp->value); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 308, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_1 = __pyx_t_3;
        __pyx_t_3 = 0;
      } else {
        __Pyx_INCREF(Py_None);
        __pyx_t_1 = Py_None;
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/scalar.pxi":297
 *     """
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return this value as a Python int.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_AddTraceback("pyarrow.lib.Int16Scalar.as_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/scalar.pxi":310
 *         return sp.value if sp.is_valid else None
 * 
 *     def __index__(self):             # <<<<<<<<<<<<<<
 *         return self.as_py()
 * 
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_11Int16Scalar_3__index__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_11Int16Scalar_3__index__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__index__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_11Int16Scalar_2__index__(((struct __pyx_obj_7pyarrow_3lib_Int16Scalar *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_11Int16Scalar_2__index__(struct __pyx_obj_7pyarrow_3lib_Int16Scalar *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      size_t __pyx_t_3;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__index__", 0);

      /* "pyarrow/scalar.pxi":311
 * 
 *     def __index__(self):
 *         return self.as_py()             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = ((PyObject *)__pyx_v_self);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_3 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_as_py, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 311, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/scalar.pxi":310
 *         return sp.value if sp.is_valid else None
 * 
 *     def __index__(self):             # <<<<<<<<<<<<<<
 *         return self.as_py()
 * 
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_AddTraceback("pyarrow.lib.Int16Scalar.__index__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/scalar.pxi":319
 *     """
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return this value as a Python int.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_12UInt32Scalar_1as_py(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_12UInt32Scalar_as_py, "UInt32Scalar.as_py(self, *, maps_as_pydicts=None)\n\nReturn this value as a Python int.\n\nParameters\n----------\nmaps_as_pydicts : str, optional, default `None`\n    Valid values are `None`, 'lossy', or 'strict'.\n    This parameter is ignored for non-nested Scalars.");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_12UInt32Scalar_1as_py = {"as_py", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12UInt32Scalar_1as_py, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12UInt32Scalar_as_py};
    static PyObject *__pyx_pw_7pyarrow_3lib_12UInt32Scalar_1as_py(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      CYTHON_UNUSED PyObject *__pyx_v_maps_as_pydicts = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("as_py (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_maps_as_pydicts,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(3, 319, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, 0, __pyx_kwds_len, "as_py", 0) < (0)) __PYX_ERR(3, 319, __pyx_L3_error)
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
        } else if (unlikely(__pyx_nargs != 0)) {
          goto __pyx_L5_argtuple_error;
        } else {
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
        }
        __pyx_v_maps_as_pydicts = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("as_py", 1, 0, 0, __pyx_nargs); __PYX_ERR(3, 319, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.UInt32Scalar.as_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_12UInt32Scalar_as_py(((struct __pyx_obj_7pyarrow_3lib_UInt32Scalar *)__pyx_v_self), __pyx_v_maps_as_pydicts);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_12UInt32Scalar_as_py(struct __pyx_obj_7pyarrow_3lib_UInt32Scalar *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_maps_as_pydicts) {
       arrow::UInt32Scalar *__pyx_v_sp;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_t_2;
      PyObject *__pyx_t_3 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("as_py", 0);

      /* "pyarrow/scalar.pxi":329
 *             This parameter is ignored for non-nested Scalars.
 *         """
 *         cdef CUInt32Scalar* sp = <CUInt32Scalar*> self.wrapped.get()             # <<<<<<<<<<<<<<
 *         return sp.value if sp.is_valid else None
 * 
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "wrapped");
        __PYX_ERR(3, 329, __pyx_L1_error)
      }
      __pyx_v_sp = (( arrow::UInt32Scalar *)__pyx_v_self->__pyx_base.wrapped.get());

      /* "pyarrow/scalar.pxi":330
 *         """
 *         cdef CUInt32Scalar* sp = <CUInt32Scalar*> self.wrapped.get()
 *         return sp.value if sp.is_valid else None             # <<<<<<<<<<<<<<
 * 
 *     def __index__(self):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = (__pyx_v_sp->is_valid != 0);
      if (__pyx_t_2) {
        __pyx_t_3 = __Pyx_PyLong_From_uint32_t(__pyx_v_sp->value); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 330, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_1 = __pyx_t_3;
        __pyx_t_3 = 0;
      } else {
        __Pyx_INCREF(Py_None);
        __pyx_t_1 = Py_None;
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/scalar.pxi":319
 *     """
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return this value as a Python int.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_AddTraceback("pyarrow.lib.UInt32Scalar.as_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/scalar.pxi":332
 *         return sp.value if sp.is_valid else None
 * 
 *     def __index__(self):             # <<<<<<<<<<<<<<
 *         return self.as_py()
 * 
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_12UInt32Scalar_3__index__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_12UInt32Scalar_3__index__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__index__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_12UInt32Scalar_2__index__(((struct __pyx_obj_7pyarrow_3lib_UInt32Scalar *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_12UInt32Scalar_2__index__(struct __pyx_obj_7pyarrow_3lib_UInt32Scalar *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      size_t __pyx_t_3;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__index__", 0);

      /* "pyarrow/scalar.pxi":333
 * 
 *     def __index__(self):
 *         return self.as_py()             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = ((PyObject *)__pyx_v_self);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_3 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_as_py, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 333, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/scalar.pxi":332
 *         return sp.value if sp.is_valid else None
 * 
 *     def __index__(self):             # <<<<<<<<<<<<<<
 *         return self.as_py()
 * 
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_AddTraceback("pyarrow.lib.UInt32Scalar.__index__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/scalar.pxi":341
 *     """
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return this value as a Python int.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_11Int32Scalar_1as_py(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_11Int32Scalar_as_py, "Int32Scalar.as_py(self, *, maps_as_pydicts=None)\n\nReturn this value as a Python int.\n\nParameters\n----------\nmaps_as_pydicts : str, optional, default `None`\n    Valid values are `None`, 'lossy', or 'strict'.\n    This parameter is ignored for non-nested Scalars.");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_11Int32Scalar_1as_py = {"as_py", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_11Int32Scalar_1as_py, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_11Int32Scalar_as_py};
    static PyObject *__pyx_pw_7pyarrow_3lib_11Int32Scalar_1as_py(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      CYTHON_UNUSED PyObject *__pyx_v_maps_as_pydicts = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("as_py (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_maps_as_pydicts,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(3, 341, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, 0, __pyx_kwds_len, "as_py", 0) < (0)) __PYX_ERR(3, 341, __pyx_L3_error)
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
        } else if (unlikely(__pyx_nargs != 0)) {
          goto __pyx_L5_argtuple_error;
        } else {
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
        }
        __pyx_v_maps_as_pydicts = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("as_py", 1, 0, 0, __pyx_nargs); __PYX_ERR(3, 341, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.Int32Scalar.as_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_11Int32Scalar_as_py(((struct __pyx_obj_7pyarrow_3lib_Int32Scalar *)__pyx_v_self), __pyx_v_maps_as_pydicts);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_11Int32Scalar_as_py(struct __pyx_obj_7pyarrow_3lib_Int32Scalar *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_maps_as_pydicts) {
       arrow::Int32Scalar *__pyx_v_sp;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_t_2;
      PyObject *__pyx_t_3 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("as_py", 0);

      /* "pyarrow/scalar.pxi":351
 *             This parameter is ignored for non-nested Scalars.
 *         """
 *         cdef CInt32Scalar* sp = <CInt32Scalar*> self.wrapped.get()             # <<<<<<<<<<<<<<
 *         return sp.value if sp.is_valid else None
 * 
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "wrapped");
        __PYX_ERR(3, 351, __pyx_L1_error)
      }
      __pyx_v_sp = (( arrow::Int32Scalar *)__pyx_v_self->__pyx_base.wrapped.get());

      /* "pyarrow/scalar.pxi":352
 *         """
 *         cdef CInt32Scalar* sp = <CInt32Scalar*> self.wrapped.get()
 *         return sp.value if sp.is_valid else None             # <<<<<<<<<<<<<<
 * 
 *     def __index__(self):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = (__pyx_v_sp->is_valid != 0);
      if (__pyx_t_2) {
        __pyx_t_3 = __Pyx_PyLong_From_int32_t(__pyx_v_sp->value); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 352, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_1 = __pyx_t_3;
        __pyx_t_3 = 0;
      } else {
        __Pyx_INCREF(Py_None);
        __pyx_t_1 = Py_None;
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/scalar.pxi":341
 *     """
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return this value as a Python int.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_AddTraceback("pyarrow.lib.Int32Scalar.as_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/scalar.pxi":354
 *         return sp.value if sp.is_valid else None
 * 
 *     def __index__(self):             # <<<<<<<<<<<<<<
 *         return self.as_py()
 * 
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_11Int32Scalar_3__index__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_11Int32Scalar_3__index__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__index__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_11Int32Scalar_2__index__(((struct __pyx_obj_7pyarrow_3lib_Int32Scalar *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_11Int32Scalar_2__index__(struct __pyx_obj_7pyarrow_3lib_Int32Scalar *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      size_t __pyx_t_3;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__index__", 0);

      /* "pyarrow/scalar.pxi":355
 * 
 *     def __index__(self):
 *         return self.as_py()             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = ((PyObject *)__pyx_v_self);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_3 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_as_py, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 355, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/scalar.pxi":354
 *         return sp.value if sp.is_valid else None
 * 
 *     def __index__(self):             # <<<<<<<<<<<<<<
 *         return self.as_py()
 * 
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_AddTraceback("pyarrow.lib.Int32Scalar.__index__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/scalar.pxi":363
 *     """
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return this value as a Python int.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_12UInt64Scalar_1as_py(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_12UInt64Scalar_as_py, "UInt64Scalar.as_py(self, *, maps_as_pydicts=None)\n\nReturn this value as a Python int.\n\nParameters\n----------\nmaps_as_pydicts : str, optional, default `None`\n    Valid values are `None`, 'lossy', or 'strict'.\n    This parameter is ignored for non-nested Scalars.");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_12UInt64Scalar_1as_py = {"as_py", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12UInt64Scalar_1as_py, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12UInt64Scalar_as_py};
    static PyObject *__pyx_pw_7pyarrow_3lib_12UInt64Scalar_1as_py(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      CYTHON_UNUSED PyObject *__pyx_v_maps_as_pydicts = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("as_py (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_maps_as_pydicts,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(3, 363, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, 0, __pyx_kwds_len, "as_py", 0) < (0)) __PYX_ERR(3, 363, __pyx_L3_error)
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
        } else if (unlikely(__pyx_nargs != 0)) {
          goto __pyx_L5_argtuple_error;
        } else {
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
        }
        __pyx_v_maps_as_pydicts = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("as_py", 1, 0, 0, __pyx_nargs); __PYX_ERR(3, 363, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.UInt64Scalar.as_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_12UInt64Scalar_as_py(((struct __pyx_obj_7pyarrow_3lib_UInt64Scalar *)__pyx_v_self), __pyx_v_maps_as_pydicts);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_12UInt64Scalar_as_py(struct __pyx_obj_7pyarrow_3lib_UInt64Scalar *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_maps_as_pydicts) {
       arrow::UInt64Scalar *__pyx_v_sp;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_t_2;
      PyObject *__pyx_t_3 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("as_py", 0);

      /* "pyarrow/scalar.pxi":373
 *             This parameter is ignored for non-nested Scalars.
 *         """
 *         cdef CUInt64Scalar* sp = <CUInt64Scalar*> self.wrapped.get()             # <<<<<<<<<<<<<<
 *         return sp.value if sp.is_valid else None
 * 
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "wrapped");
        __PYX_ERR(3, 373, __pyx_L1_error)
      }
      __pyx_v_sp = (( arrow::UInt64Scalar *)__pyx_v_self->__pyx_base.wrapped.get());

      /* "pyarrow/scalar.pxi":374
 *         """
 *         cdef CUInt64Scalar* sp = <CUInt64Scalar*> self.wrapped.get()
 *         return sp.value if sp.is_valid else None             # <<<<<<<<<<<<<<
 * 
 *     def __index__(self):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = (__pyx_v_sp->is_valid != 0);
      if (__pyx_t_2) {
        __pyx_t_3 = __Pyx_PyLong_From_uint64_t(__pyx_v_sp->value); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 374, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_1 = __pyx_t_3;
        __pyx_t_3 = 0;
      } else {
        __Pyx_INCREF(Py_None);
        __pyx_t_1 = Py_None;
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/scalar.pxi":363
 *     """
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return this value as a Python int.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_AddTraceback("pyarrow.lib.UInt64Scalar.as_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/scalar.pxi":376
 *         return sp.value if sp.is_valid else None
 * 
 *     def __index__(self):             # <<<<<<<<<<<<<<
 *         return self.as_py()
 * 
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_12UInt64Scalar_3__index__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_12UInt64Scalar_3__index__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__index__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_12UInt64Scalar_2__index__(((struct __pyx_obj_7pyarrow_3lib_UInt64Scalar *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_12UInt64Scalar_2__index__(struct __pyx_obj_7pyarrow_3lib_UInt64Scalar *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      size_t __pyx_t_3;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__index__", 0);

      /* "pyarrow/scalar.pxi":377
 * 
 *     def __index__(self):
 *         return self.as_py()             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = ((PyObject *)__pyx_v_self);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_3 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_as_py, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 377, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/scalar.pxi":376
 *         return sp.value if sp.is_valid else None
 * 
 *     def __index__(self):             # <<<<<<<<<<<<<<
 *         return self.as_py()
 * 
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_AddTraceback("pyarrow.lib.UInt64Scalar.__index__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/scalar.pxi":385
 *     """
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return this value as a Python int.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_11Int64Scalar_1as_py(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_11Int64Scalar_as_py, "Int64Scalar.as_py(self, *, maps_as_pydicts=None)\n\nReturn this value as a Python int.\n\nParameters\n----------\nmaps_as_pydicts : str, optional, default `None`\n    Valid values are `None`, 'lossy', or 'strict'.\n    This parameter is ignored for non-nested Scalars.");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_11Int64Scalar_1as_py = {"as_py", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_11Int64Scalar_1as_py, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_11Int64Scalar_as_py};
    static PyObject *__pyx_pw_7pyarrow_3lib_11Int64Scalar_1as_py(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      CYTHON_UNUSED PyObject *__pyx_v_maps_as_pydicts = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("as_py (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_maps_as_pydicts,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(3, 385, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, 0, __pyx_kwds_len, "as_py", 0) < (0)) __PYX_ERR(3, 385, __pyx_L3_error)
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
        } else if (unlikely(__pyx_nargs != 0)) {
          goto __pyx_L5_argtuple_error;
        } else {
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
        }
        __pyx_v_maps_as_pydicts = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("as_py", 1, 0, 0, __pyx_nargs); __PYX_ERR(3, 385, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.Int64Scalar.as_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_11Int64Scalar_as_py(((struct __pyx_obj_7pyarrow_3lib_Int64Scalar *)__pyx_v_self), __pyx_v_maps_as_pydicts);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_11Int64Scalar_as_py(struct __pyx_obj_7pyarrow_3lib_Int64Scalar *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_maps_as_pydicts) {
       arrow::Int64Scalar *__pyx_v_sp;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_t_2;
      PyObject *__pyx_t_3 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("as_py", 0);

      /* "pyarrow/scalar.pxi":395
 *             This parameter is ignored for non-nested Scalars.
 *         """
 *         cdef CInt64Scalar* sp = <CInt64Scalar*> self.wrapped.get()             # <<<<<<<<<<<<<<
 *         return sp.value if sp.is_valid else None
 * 
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "wrapped");
        __PYX_ERR(3, 395, __pyx_L1_error)
      }
      __pyx_v_sp = (( arrow::Int64Scalar *)__pyx_v_self->__pyx_base.wrapped.get());

      /* "pyarrow/scalar.pxi":396
 *         """
 *         cdef CInt64Scalar* sp = <CInt64Scalar*> self.wrapped.get()
 *         return sp.value if sp.is_valid else None             # <<<<<<<<<<<<<<
 * 
 *     def __index__(self):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = (__pyx_v_sp->is_valid != 0);
      if (__pyx_t_2) {
        __pyx_t_3 = __Pyx_PyLong_From_int64_t(__pyx_v_sp->value); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 396, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_1 = __pyx_t_3;
        __pyx_t_3 = 0;
      } else {
        __Pyx_INCREF(Py_None);
        __pyx_t_1 = Py_None;
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/scalar.pxi":385
 *     """
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return this value as a Python int.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_AddTraceback("pyarrow.lib.Int64Scalar.as_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/scalar.pxi":398
 *         return sp.value if sp.is_valid else None
 * 
 *     def __index__(self):             # <<<<<<<<<<<<<<
 *         return self.as_py()
 * 
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_11Int64Scalar_3__index__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_11Int64Scalar_3__index__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__index__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_11Int64Scalar_2__index__(((struct __pyx_obj_7pyarrow_3lib_Int64Scalar *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_11Int64Scalar_2__index__(struct __pyx_obj_7pyarrow_3lib_Int64Scalar *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      size_t __pyx_t_3;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__index__", 0);

      /* "pyarrow/scalar.pxi":399
 * 
 *     def __index__(self):
 *         return self.as_py()             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = ((PyObject *)__pyx_v_self);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_3 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_as_py, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 399, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/scalar.pxi":398
 *         return sp.value if sp.is_valid else None
 * 
 *     def __index__(self):             # <<<<<<<<<<<<<<
 *         return self.as_py()
 * 
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_AddTraceback("pyarrow.lib.Int64Scalar.__index__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/scalar.pxi":407
 *     """
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return this value as a Python float.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_15HalfFloatScalar_1as_py(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_15HalfFloatScalar_as_py, "HalfFloatScalar.as_py(self, *, maps_as_pydicts=None)\n\nReturn this value as a Python float.\n\nParameters\n----------\nmaps_as_pydicts : str, optional, default `None`\n    Valid values are `None`, 'lossy', or 'strict'.\n    This parameter is ignored for non-nested Scalars.");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_15HalfFloatScalar_1as_py = {"as_py", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15HalfFloatScalar_1as_py, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15HalfFloatScalar_as_py};
    static PyObject *__pyx_pw_7pyarrow_3lib_15HalfFloatScalar_1as_py(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      CYTHON_UNUSED PyObject *__pyx_v_maps_as_pydicts = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("as_py (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_maps_as_pydicts,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(3, 407, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, 0, __pyx_kwds_len, "as_py", 0) < (0)) __PYX_ERR(3, 407, __pyx_L3_error)
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
        } else if (unlikely(__pyx_nargs != 0)) {
          goto __pyx_L5_argtuple_error;
        } else {
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
        }
        __pyx_v_maps_as_pydicts = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("as_py", 1, 0, 0, __pyx_nargs); __PYX_ERR(3, 407, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.HalfFloatScalar.as_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_15HalfFloatScalar_as_py(((struct __pyx_obj_7pyarrow_3lib_HalfFloatScalar *)__pyx_v_self), __pyx_v_maps_as_pydicts);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_15HalfFloatScalar_as_py(struct __pyx_obj_7pyarrow_3lib_HalfFloatScalar *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_maps_as_pydicts) {
       arrow::HalfFloatScalar *__pyx_v_sp;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_t_2;
      PyObject *__pyx_t_3 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("as_py", 0);

      /* "pyarrow/scalar.pxi":417
 *             This parameter is ignored for non-nested Scalars.
 *         """
 *         cdef CHalfFloatScalar* sp = <CHalfFloatScalar*> self.wrapped.get()             # <<<<<<<<<<<<<<
 *         return PyFloat_FromHalf(sp.value) if sp.is_valid else None
 * 
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "wrapped");
        __PYX_ERR(3, 417, __pyx_L1_error)
      }
      __pyx_v_sp = (( arrow::HalfFloatScalar *)__pyx_v_self->__pyx_base.wrapped.get());

      /* "pyarrow/scalar.pxi":418
 *         """
 *         cdef CHalfFloatScalar* sp = <CHalfFloatScalar*> self.wrapped.get()
 *         return PyFloat_FromHalf(sp.value) if sp.is_valid else None             # <<<<<<<<<<<<<<
 * 
 *     def __float__(self):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = (__pyx_v_sp->is_valid != 0);
      if (__pyx_t_2) {
        __pyx_t_3 = arrow::py::PyFloat_FromHalf(__pyx_v_sp->value); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 418, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_1 = __pyx_t_3;
        __pyx_t_3 = 0;
      } else {
        __Pyx_INCREF(Py_None);
        __pyx_t_1 = Py_None;
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/scalar.pxi":407
 *     """
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return this value as a Python float.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_AddTraceback("pyarrow.lib.HalfFloatScalar.as_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/scalar.pxi":420
 *         return PyFloat_FromHalf(sp.value) if sp.is_valid else None
 * 
 *     def __float__(self):             # <<<<<<<<<<<<<<
 *         return self.as_py()
 * 
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_15HalfFloatScalar_3__float__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_15HalfFloatScalar_3__float__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__float__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_15HalfFloatScalar_2__float__(((struct __pyx_obj_7pyarrow_3lib_HalfFloatScalar *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_15HalfFloatScalar_2__float__(struct __pyx_obj_7pyarrow_3lib_HalfFloatScalar *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      size_t __pyx_t_3;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__float__", 0);

      /* "pyarrow/scalar.pxi":421
 * 
 *     def __float__(self):
 *         return self.as_py()             # <<<<<<<<<<<<<<
 * 
 *     def __int__(self):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = ((PyObject *)__pyx_v_self);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_3 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_as_py, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 421, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/scalar.pxi":420
 *         return PyFloat_FromHalf(sp.value) if sp.is_valid else None
 * 
 *     def __float__(self):             # <<<<<<<<<<<<<<
 *         return self.as_py()
 * 
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_AddTraceback("pyarrow.lib.HalfFloatScalar.__float__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/scalar.pxi":423
 *         return self.as_py()
 * 
 *     def __int__(self):             # <<<<<<<<<<<<<<
 *         return int(self.as_py())
 * 
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_15HalfFloatScalar_5__int__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_15HalfFloatScalar_5__int__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__int__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_15HalfFloatScalar_4__int__(((struct __pyx_obj_7pyarrow_3lib_HalfFloatScalar *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_15HalfFloatScalar_4__int__(struct __pyx_obj_7pyarrow_3lib_HalfFloatScalar *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      size_t __pyx_t_3;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__int__", 0);

      /* "pyarrow/scalar.pxi":424
 * 
 *     def __int__(self):
 *         return int(self.as_py())             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = ((PyObject *)__pyx_v_self);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_3 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_as_py, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 424, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_t_2 = __Pyx_PyNumber_Int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 424, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;

      /* "pyarrow/scalar.pxi":423
 *         return self.as_py()
 * 
 *     def __int__(self):             # <<<<<<<<<<<<<<
 *         return int(self.as_py())
 * 
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_AddTraceback("pyarrow.lib.HalfFloatScalar.__int__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/scalar.pxi":432
 *     """
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return this value as a Python float.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_11FloatScalar_1as_py(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_11FloatScalar_as_py, "FloatScalar.as_py(self, *, maps_as_pydicts=None)\n\nReturn this value as a Python float.\n\nParameters\n----------\nmaps_as_pydicts : str, optional, default `None`\n    Valid values are `None`, 'lossy', or 'strict'.\n    This parameter is ignored for non-nested Scalars.");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_11FloatScalar_1as_py = {"as_py", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_11FloatScalar_1as_py, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_11FloatScalar_as_py};
    static PyObject *__pyx_pw_7pyarrow_3lib_11FloatScalar_1as_py(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      CYTHON_UNUSED PyObject *__pyx_v_maps_as_pydicts = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("as_py (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_maps_as_pydicts,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(3, 432, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, 0, __pyx_kwds_len, "as_py", 0) < (0)) __PYX_ERR(3, 432, __pyx_L3_error)
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
        } else if (unlikely(__pyx_nargs != 0)) {
          goto __pyx_L5_argtuple_error;
        } else {
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
        }
        __pyx_v_maps_as_pydicts = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("as_py", 1, 0, 0, __pyx_nargs); __PYX_ERR(3, 432, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.FloatScalar.as_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_11FloatScalar_as_py(((struct __pyx_obj_7pyarrow_3lib_FloatScalar *)__pyx_v_self), __pyx_v_maps_as_pydicts);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_11FloatScalar_as_py(struct __pyx_obj_7pyarrow_3lib_FloatScalar *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_maps_as_pydicts) {
       arrow::FloatScalar *__pyx_v_sp;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_t_2;
      PyObject *__pyx_t_3 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("as_py", 0);

      /* "pyarrow/scalar.pxi":442
 *             This parameter is ignored for non-nested Scalars.
 *         """
 *         cdef CFloatScalar* sp = <CFloatScalar*> self.wrapped.get()             # <<<<<<<<<<<<<<
 *         return sp.value if sp.is_valid else None
 * 
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "wrapped");
        __PYX_ERR(3, 442, __pyx_L1_error)
      }
      __pyx_v_sp = (( arrow::FloatScalar *)__pyx_v_self->__pyx_base.wrapped.get());

      /* "pyarrow/scalar.pxi":443
 *         """
 *         cdef CFloatScalar* sp = <CFloatScalar*> self.wrapped.get()
 *         return sp.value if sp.is_valid else None             # <<<<<<<<<<<<<<
 * 
 *     def __float__(self):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = (__pyx_v_sp->is_valid != 0);
      if (__pyx_t_2) {
        __pyx_t_3 = PyFloat_FromDouble(__pyx_v_sp->value); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 443, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_1 = __pyx_t_3;
        __pyx_t_3 = 0;
      } else {
        __Pyx_INCREF(Py_None);
        __pyx_t_1 = Py_None;
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/scalar.pxi":432
 *     """
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return this value as a Python float.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_AddTraceback("pyarrow.lib.FloatScalar.as_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/scalar.pxi":445
 *         return sp.value if sp.is_valid else None
 * 
 *     def __float__(self):             # <<<<<<<<<<<<<<
 *         return self.as_py()
 * 
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_11FloatScalar_3__float__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_11FloatScalar_3__float__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__float__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_11FloatScalar_2__float__(((struct __pyx_obj_7pyarrow_3lib_FloatScalar *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_11FloatScalar_2__float__(struct __pyx_obj_7pyarrow_3lib_FloatScalar *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      size_t __pyx_t_3;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__float__", 0);

      /* "pyarrow/scalar.pxi":446
 * 
 *     def __float__(self):
 *         return self.as_py()             # <<<<<<<<<<<<<<
 * 
 *     def __int__(self):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = ((PyObject *)__pyx_v_self);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_3 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_as_py, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 446, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/scalar.pxi":445
 *         return sp.value if sp.is_valid else None
 * 
 *     def __float__(self):             # <<<<<<<<<<<<<<
 *         return self.as_py()
 * 
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_AddTraceback("pyarrow.lib.FloatScalar.__float__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/scalar.pxi":448
 *         return self.as_py()
 * 
 *     def __int__(self):             # <<<<<<<<<<<<<<
 *         return int(float(self))
 * 
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_11FloatScalar_5__int__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_11FloatScalar_5__int__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__int__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_11FloatScalar_4__int__(((struct __pyx_obj_7pyarrow_3lib_FloatScalar *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_11FloatScalar_4__int__(struct __pyx_obj_7pyarrow_3lib_FloatScalar *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__int__", 0);

      /* "pyarrow/scalar.pxi":449
 * 
 *     def __int__(self):
 *         return int(float(self))             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __Pyx_PyNumber_Float(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 449, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_PyNumber_Int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 449, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;

      /* "pyarrow/scalar.pxi":448
 *         return self.as_py()
 * 
 *     def __int__(self):             # <<<<<<<<<<<<<<
 *         return int(float(self))
 * 
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_AddTraceback("pyarrow.lib.FloatScalar.__int__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/scalar.pxi":457
 *     """
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return this value as a Python float.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_12DoubleScalar_1as_py(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_12DoubleScalar_as_py, "DoubleScalar.as_py(self, *, maps_as_pydicts=None)\n\nReturn this value as a Python float.\n\nParameters\n----------\nmaps_as_pydicts : str, optional, default `None`\n    Valid values are `None`, 'lossy', or 'strict'.\n    This parameter is ignored for non-nested Scalars.");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_12DoubleScalar_1as_py = {"as_py", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12DoubleScalar_1as_py, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12DoubleScalar_as_py};
    static PyObject *__pyx_pw_7pyarrow_3lib_12DoubleScalar_1as_py(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      CYTHON_UNUSED PyObject *__pyx_v_maps_as_pydicts = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("as_py (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_maps_as_pydicts,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(3, 457, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, 0, __pyx_kwds_len, "as_py", 0) < (0)) __PYX_ERR(3, 457, __pyx_L3_error)
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
        } else if (unlikely(__pyx_nargs != 0)) {
          goto __pyx_L5_argtuple_error;
        } else {
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
        }
        __pyx_v_maps_as_pydicts = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("as_py", 1, 0, 0, __pyx_nargs); __PYX_ERR(3, 457, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.DoubleScalar.as_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_12DoubleScalar_as_py(((struct __pyx_obj_7pyarrow_3lib_DoubleScalar *)__pyx_v_self), __pyx_v_maps_as_pydicts);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_12DoubleScalar_as_py(struct __pyx_obj_7pyarrow_3lib_DoubleScalar *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_maps_as_pydicts) {
       arrow::DoubleScalar *__pyx_v_sp;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_t_2;
      PyObject *__pyx_t_3 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("as_py", 0);

      /* "pyarrow/scalar.pxi":467
 *             This parameter is ignored for non-nested Scalars.
 *         """
 *         cdef CDoubleScalar* sp = <CDoubleScalar*> self.wrapped.get()             # <<<<<<<<<<<<<<
 *         return sp.value if sp.is_valid else None
 * 
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "wrapped");
        __PYX_ERR(3, 467, __pyx_L1_error)
      }
      __pyx_v_sp = (( arrow::DoubleScalar *)__pyx_v_self->__pyx_base.wrapped.get());

      /* "pyarrow/scalar.pxi":468
 *         """
 *         cdef CDoubleScalar* sp = <CDoubleScalar*> self.wrapped.get()
 *         return sp.value if sp.is_valid else None             # <<<<<<<<<<<<<<
 * 
 *     def __float__(self):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = (__pyx_v_sp->is_valid != 0);
      if (__pyx_t_2) {
        __pyx_t_3 = PyFloat_FromDouble(__pyx_v_sp->value); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 468, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_1 = __pyx_t_3;
        __pyx_t_3 = 0;
      } else {
        __Pyx_INCREF(Py_None);
        __pyx_t_1 = Py_None;
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/scalar.pxi":457
 *     """
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return this value as a Python float.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_AddTraceback("pyarrow.lib.DoubleScalar.as_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/scalar.pxi":470
 *         return sp.value if sp.is_valid else None
 * 
 *     def __float__(self):             # <<<<<<<<<<<<<<
 *         return self.as_py()
 * 
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_12DoubleScalar_3__float__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_12DoubleScalar_3__float__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__float__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_12DoubleScalar_2__float__(((struct __pyx_obj_7pyarrow_3lib_DoubleScalar *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_12DoubleScalar_2__float__(struct __pyx_obj_7pyarrow_3lib_DoubleScalar *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      size_t __pyx_t_3;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__float__", 0);

      /* "pyarrow/scalar.pxi":471
 * 
 *     def __float__(self):
 *         return self.as_py()             # <<<<<<<<<<<<<<
 * 
 *     def __int__(self):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = ((PyObject *)__pyx_v_self);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_3 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_as_py, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 471, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/scalar.pxi":470
 *         return sp.value if sp.is_valid else None
 * 
 *     def __float__(self):             # <<<<<<<<<<<<<<
 *         return self.as_py()
 * 
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_AddTraceback("pyarrow.lib.DoubleScalar.__float__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/scalar.pxi":473
 *         return self.as_py()
 * 
 *     def __int__(self):             # <<<<<<<<<<<<<<
 *         return int(float(self))
 * 
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_12DoubleScalar_5__int__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_12DoubleScalar_5__int__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__int__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_12DoubleScalar_4__int__(((struct __pyx_obj_7pyarrow_3lib_DoubleScalar *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_12DoubleScalar_4__int__(struct __pyx_obj_7pyarrow_3lib_DoubleScalar *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__int__", 0);

      /* "pyarrow/scalar.pxi":474
 * 
 *     def __int__(self):
 *         return int(float(self))             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __Pyx_PyNumber_Float(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 474, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_PyNumber_Int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 474, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;

      /* "pyarrow/scalar.pxi":473
 *         return self.as_py()
 * 
 *     def __int__(self):             # <<<<<<<<<<<<<<
 *         return int(float(self))
 * 
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_AddTraceback("pyarrow.lib.DoubleScalar.__int__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/scalar.pxi":482
 *     """
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return this value as a Python Decimal.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_15Decimal32Scalar_1as_py(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_15Decimal32Scalar_as_py, "Decimal32Scalar.as_py(self, *, maps_as_pydicts=None)\n\nReturn this value as a Python Decimal.\n\nParameters\n----------\nmaps_as_pydicts : str, optional, default `None`\n    Valid values are `None`, 'lossy', or 'strict'.\n    This parameter is ignored for non-nested Scalars.");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_15Decimal32Scalar_1as_py = {"as_py", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15Decimal32Scalar_1as_py, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15Decimal32Scalar_as_py};
    static PyObject *__pyx_pw_7pyarrow_3lib_15Decimal32Scalar_1as_py(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      CYTHON_UNUSED PyObject *__pyx_v_maps_as_pydicts = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("as_py (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_maps_as_pydicts,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(3, 482, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, 0, __pyx_kwds_len, "as_py", 0) < (0)) __PYX_ERR(3, 482, __pyx_L3_error)
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
        } else if (unlikely(__pyx_nargs != 0)) {
          goto __pyx_L5_argtuple_error;
        } else {
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
        }
        __pyx_v_maps_as_pydicts = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("as_py", 1, 0, 0, __pyx_nargs); __PYX_ERR(3, 482, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.Decimal32Scalar.as_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_15Decimal32Scalar_as_py(((struct __pyx_obj_7pyarrow_3lib_Decimal32Scalar *)__pyx_v_self), __pyx_v_maps_as_pydicts);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_15Decimal32Scalar_as_py(struct __pyx_obj_7pyarrow_3lib_Decimal32Scalar *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_maps_as_pydicts) {
       arrow::Decimal32Scalar *__pyx_v_sp;
       arrow::Decimal32Type *__pyx_v_dtype;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      int __pyx_t_1;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      PyObject *__pyx_t_5 = NULL;
      PyObject *__pyx_t_6 = NULL;
      PyObject *__pyx_t_7 = NULL;
      PyObject *__pyx_t_8 = NULL;
      size_t __pyx_t_9;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("as_py", 0);

      /* "pyarrow/scalar.pxi":493
 *         """
 *         cdef:
 *             CDecimal32Scalar* sp = <CDecimal32Scalar*> self.wrapped.get()             # <<<<<<<<<<<<<<
 *             CDecimal32Type* dtype = <CDecimal32Type*> sp.type.get()
 *         if sp.is_valid:
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "wrapped");
        __PYX_ERR(3, 493, __pyx_L1_error)
      }
      __pyx_v_sp = (( arrow::Decimal32Scalar *)__pyx_v_self->__pyx_base.wrapped.get());

      /* "pyarrow/scalar.pxi":494
 *         cdef:
 *             CDecimal32Scalar* sp = <CDecimal32Scalar*> self.wrapped.get()
 *             CDecimal32Type* dtype = <CDecimal32Type*> sp.type.get()             # <<<<<<<<<<<<<<
 *         if sp.is_valid:
 *             return _pydecimal.Decimal(
*/
      __pyx_v_dtype = (( arrow::Decimal32Type *)__pyx_v_sp->type.get());

      /* "pyarrow/scalar.pxi":495
 *             CDecimal32Scalar* sp = <CDecimal32Scalar*> self.wrapped.get()
 *             CDecimal32Type* dtype = <CDecimal32Type*> sp.type.get()
 *         if sp.is_valid:             # <<<<<<<<<<<<<<
 *             return _pydecimal.Decimal(
 *                 frombytes(sp.value.ToString(dtype.scale()))
*/
      __pyx_t_1 = (__pyx_v_sp->is_valid != 0);
      if (__pyx_t_1) {

        /* "pyarrow/scalar.pxi":496
 *             CDecimal32Type* dtype = <CDecimal32Type*> sp.type.get()
 *         if sp.is_valid:
 *             return _pydecimal.Decimal(             # <<<<<<<<<<<<<<
 *                 frombytes(sp.value.ToString(dtype.scale()))
 *             )
*/
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_pydecimal); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 496, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Decimal); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 496, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

        /* "pyarrow/scalar.pxi":497
 *         if sp.is_valid:
 *             return _pydecimal.Decimal(
 *                 frombytes(sp.value.ToString(dtype.scale()))             # <<<<<<<<<<<<<<
 *             )
 *         else:
*/
        __pyx_t_6 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_frombytes); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 497, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_8 = __pyx_convert_PyBytes_string_to_py_6libcpp_6string_std__in_string(__pyx_v_sp->value.ToString(__pyx_v_dtype->scale())); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 497, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_9 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_7))) {
          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
          assert(__pyx_t_6);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
          __pyx_t_9 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_8};
          __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 497, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
        }
        __pyx_t_9 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
          __pyx_t_9 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 496, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        goto __pyx_L0;

        /* "pyarrow/scalar.pxi":495
 *             CDecimal32Scalar* sp = <CDecimal32Scalar*> self.wrapped.get()
 *             CDecimal32Type* dtype = <CDecimal32Type*> sp.type.get()
 *         if sp.is_valid:             # <<<<<<<<<<<<<<
 *             return _pydecimal.Decimal(
 *                 frombytes(sp.value.ToString(dtype.scale()))
*/
      }

      /* "pyarrow/scalar.pxi":500
 *             )
 *         else:
 *             return None             # <<<<<<<<<<<<<<
 * 
 * 
*/
      /*else*/ {
        __Pyx_XDECREF(__pyx_r);
        __pyx_r = Py_None; __Pyx_INCREF(Py_None);
        goto __pyx_L0;
      }

      /* "pyarrow/scalar.pxi":482
 *     """
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return this value as a Python Decimal.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_8);
      __Pyx_AddTraceback("pyarrow.lib.Decimal32Scalar.as_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/scalar.pxi":508
 *     """
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return this value as a Python Decimal.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_15Decimal64Scalar_1as_py(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_15Decimal64Scalar_as_py, "Decimal64Scalar.as_py(self, *, maps_as_pydicts=None)\n\nReturn this value as a Python Decimal.\n\nParameters\n----------\nmaps_as_pydicts : str, optional, default `None`\n    Valid values are `None`, 'lossy', or 'strict'.\n    This parameter is ignored for non-nested Scalars.");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_15Decimal64Scalar_1as_py = {"as_py", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15Decimal64Scalar_1as_py, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15Decimal64Scalar_as_py};
    static PyObject *__pyx_pw_7pyarrow_3lib_15Decimal64Scalar_1as_py(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      CYTHON_UNUSED PyObject *__pyx_v_maps_as_pydicts = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("as_py (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_maps_as_pydicts,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(3, 508, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, 0, __pyx_kwds_len, "as_py", 0) < (0)) __PYX_ERR(3, 508, __pyx_L3_error)
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
        } else if (unlikely(__pyx_nargs != 0)) {
          goto __pyx_L5_argtuple_error;
        } else {
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
        }
        __pyx_v_maps_as_pydicts = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("as_py", 1, 0, 0, __pyx_nargs); __PYX_ERR(3, 508, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.Decimal64Scalar.as_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_15Decimal64Scalar_as_py(((struct __pyx_obj_7pyarrow_3lib_Decimal64Scalar *)__pyx_v_self), __pyx_v_maps_as_pydicts);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_15Decimal64Scalar_as_py(struct __pyx_obj_7pyarrow_3lib_Decimal64Scalar *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_maps_as_pydicts) {
       arrow::Decimal64Scalar *__pyx_v_sp;
       arrow::Decimal64Type *__pyx_v_dtype;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      int __pyx_t_1;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      PyObject *__pyx_t_5 = NULL;
      PyObject *__pyx_t_6 = NULL;
      PyObject *__pyx_t_7 = NULL;
      PyObject *__pyx_t_8 = NULL;
      size_t __pyx_t_9;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("as_py", 0);

      /* "pyarrow/scalar.pxi":519
 *         """
 *         cdef:
 *             CDecimal64Scalar* sp = <CDecimal64Scalar*> self.wrapped.get()             # <<<<<<<<<<<<<<
 *             CDecimal64Type* dtype = <CDecimal64Type*> sp.type.get()
 *         if sp.is_valid:
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "wrapped");
        __PYX_ERR(3, 519, __pyx_L1_error)
      }
      __pyx_v_sp = (( arrow::Decimal64Scalar *)__pyx_v_self->__pyx_base.wrapped.get());

      /* "pyarrow/scalar.pxi":520
 *         cdef:
 *             CDecimal64Scalar* sp = <CDecimal64Scalar*> self.wrapped.get()
 *             CDecimal64Type* dtype = <CDecimal64Type*> sp.type.get()             # <<<<<<<<<<<<<<
 *         if sp.is_valid:
 *             return _pydecimal.Decimal(
*/
      __pyx_v_dtype = (( arrow::Decimal64Type *)__pyx_v_sp->type.get());

      /* "pyarrow/scalar.pxi":521
 *             CDecimal64Scalar* sp = <CDecimal64Scalar*> self.wrapped.get()
 *             CDecimal64Type* dtype = <CDecimal64Type*> sp.type.get()
 *         if sp.is_valid:             # <<<<<<<<<<<<<<
 *             return _pydecimal.Decimal(
 *                 frombytes(sp.value.ToString(dtype.scale()))
*/
      __pyx_t_1 = (__pyx_v_sp->is_valid != 0);
      if (__pyx_t_1) {

        /* "pyarrow/scalar.pxi":522
 *             CDecimal64Type* dtype = <CDecimal64Type*> sp.type.get()
 *         if sp.is_valid:
 *             return _pydecimal.Decimal(             # <<<<<<<<<<<<<<
 *                 frombytes(sp.value.ToString(dtype.scale()))
 *             )
*/
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_pydecimal); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 522, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Decimal); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 522, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

        /* "pyarrow/scalar.pxi":523
 *         if sp.is_valid:
 *             return _pydecimal.Decimal(
 *                 frombytes(sp.value.ToString(dtype.scale()))             # <<<<<<<<<<<<<<
 *             )
 *         else:
*/
        __pyx_t_6 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_frombytes); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 523, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_8 = __pyx_convert_PyBytes_string_to_py_6libcpp_6string_std__in_string(__pyx_v_sp->value.ToString(__pyx_v_dtype->scale())); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 523, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_9 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_7))) {
          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
          assert(__pyx_t_6);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
          __pyx_t_9 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_8};
          __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 523, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
        }
        __pyx_t_9 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
          __pyx_t_9 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 522, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        goto __pyx_L0;

        /* "pyarrow/scalar.pxi":521
 *             CDecimal64Scalar* sp = <CDecimal64Scalar*> self.wrapped.get()
 *             CDecimal64Type* dtype = <CDecimal64Type*> sp.type.get()
 *         if sp.is_valid:             # <<<<<<<<<<<<<<
 *             return _pydecimal.Decimal(
 *                 frombytes(sp.value.ToString(dtype.scale()))
*/
      }

      /* "pyarrow/scalar.pxi":526
 *             )
 *         else:
 *             return None             # <<<<<<<<<<<<<<
 * 
 * 
*/
      /*else*/ {
        __Pyx_XDECREF(__pyx_r);
        __pyx_r = Py_None; __Pyx_INCREF(Py_None);
        goto __pyx_L0;
      }

      /* "pyarrow/scalar.pxi":508
 *     """
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return this value as a Python Decimal.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_8);
      __Pyx_AddTraceback("pyarrow.lib.Decimal64Scalar.as_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/scalar.pxi":534
 *     """
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return this value as a Python Decimal.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_16Decimal128Scalar_1as_py(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_16Decimal128Scalar_as_py, "Decimal128Scalar.as_py(self, *, maps_as_pydicts=None)\n\nReturn this value as a Python Decimal.\n\nParameters\n----------\nmaps_as_pydicts : str, optional, default `None`\n    Valid values are `None`, 'lossy', or 'strict'.\n    This parameter is ignored for non-nested Scalars.");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_16Decimal128Scalar_1as_py = {"as_py", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_16Decimal128Scalar_1as_py, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_16Decimal128Scalar_as_py};
    static PyObject *__pyx_pw_7pyarrow_3lib_16Decimal128Scalar_1as_py(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      CYTHON_UNUSED PyObject *__pyx_v_maps_as_pydicts = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("as_py (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_maps_as_pydicts,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(3, 534, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, 0, __pyx_kwds_len, "as_py", 0) < (0)) __PYX_ERR(3, 534, __pyx_L3_error)
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
        } else if (unlikely(__pyx_nargs != 0)) {
          goto __pyx_L5_argtuple_error;
        } else {
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
        }
        __pyx_v_maps_as_pydicts = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("as_py", 1, 0, 0, __pyx_nargs); __PYX_ERR(3, 534, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.Decimal128Scalar.as_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_16Decimal128Scalar_as_py(((struct __pyx_obj_7pyarrow_3lib_Decimal128Scalar *)__pyx_v_self), __pyx_v_maps_as_pydicts);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_16Decimal128Scalar_as_py(struct __pyx_obj_7pyarrow_3lib_Decimal128Scalar *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_maps_as_pydicts) {
       arrow::Decimal128Scalar *__pyx_v_sp;
       arrow::Decimal128Type *__pyx_v_dtype;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      int __pyx_t_1;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      PyObject *__pyx_t_5 = NULL;
      PyObject *__pyx_t_6 = NULL;
      PyObject *__pyx_t_7 = NULL;
      PyObject *__pyx_t_8 = NULL;
      size_t __pyx_t_9;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("as_py", 0);

      /* "pyarrow/scalar.pxi":545
 *         """
 *         cdef:
 *             CDecimal128Scalar* sp = <CDecimal128Scalar*> self.wrapped.get()             # <<<<<<<<<<<<<<
 *             CDecimal128Type* dtype = <CDecimal128Type*> sp.type.get()
 *         if sp.is_valid:
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "wrapped");
        __PYX_ERR(3, 545, __pyx_L1_error)
      }
      __pyx_v_sp = (( arrow::Decimal128Scalar *)__pyx_v_self->__pyx_base.wrapped.get());

      /* "pyarrow/scalar.pxi":546
 *         cdef:
 *             CDecimal128Scalar* sp = <CDecimal128Scalar*> self.wrapped.get()
 *             CDecimal128Type* dtype = <CDecimal128Type*> sp.type.get()             # <<<<<<<<<<<<<<
 *         if sp.is_valid:
 *             return _pydecimal.Decimal(
*/
      __pyx_v_dtype = (( arrow::Decimal128Type *)__pyx_v_sp->type.get());

      /* "pyarrow/scalar.pxi":547
 *             CDecimal128Scalar* sp = <CDecimal128Scalar*> self.wrapped.get()
 *             CDecimal128Type* dtype = <CDecimal128Type*> sp.type.get()
 *         if sp.is_valid:             # <<<<<<<<<<<<<<
 *             return _pydecimal.Decimal(
 *                 frombytes(sp.value.ToString(dtype.scale()))
*/
      __pyx_t_1 = (__pyx_v_sp->is_valid != 0);
      if (__pyx_t_1) {

        /* "pyarrow/scalar.pxi":548
 *             CDecimal128Type* dtype = <CDecimal128Type*> sp.type.get()
 *         if sp.is_valid:
 *             return _pydecimal.Decimal(             # <<<<<<<<<<<<<<
 *                 frombytes(sp.value.ToString(dtype.scale()))
 *             )
*/
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_pydecimal); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 548, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Decimal); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 548, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

        /* "pyarrow/scalar.pxi":549
 *         if sp.is_valid:
 *             return _pydecimal.Decimal(
 *                 frombytes(sp.value.ToString(dtype.scale()))             # <<<<<<<<<<<<<<
 *             )
 *         else:
*/
        __pyx_t_6 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_frombytes); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 549, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_8 = __pyx_convert_PyBytes_string_to_py_6libcpp_6string_std__in_string(__pyx_v_sp->value.ToString(__pyx_v_dtype->scale())); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 549, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_9 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_7))) {
          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
          assert(__pyx_t_6);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
          __pyx_t_9 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_8};
          __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 549, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
        }
        __pyx_t_9 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
          __pyx_t_9 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 548, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        goto __pyx_L0;

        /* "pyarrow/scalar.pxi":547
 *             CDecimal128Scalar* sp = <CDecimal128Scalar*> self.wrapped.get()
 *             CDecimal128Type* dtype = <CDecimal128Type*> sp.type.get()
 *         if sp.is_valid:             # <<<<<<<<<<<<<<
 *             return _pydecimal.Decimal(
 *                 frombytes(sp.value.ToString(dtype.scale()))
*/
      }

      /* "pyarrow/scalar.pxi":552
 *             )
 *         else:
 *             return None             # <<<<<<<<<<<<<<
 * 
 * 
*/
      /*else*/ {
        __Pyx_XDECREF(__pyx_r);
        __pyx_r = Py_None; __Pyx_INCREF(Py_None);
        goto __pyx_L0;
      }

      /* "pyarrow/scalar.pxi":534
 *     """
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return this value as a Python Decimal.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_8);
      __Pyx_AddTraceback("pyarrow.lib.Decimal128Scalar.as_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/scalar.pxi":560
 *     """
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return this value as a Python Decimal.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_16Decimal256Scalar_1as_py(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_16Decimal256Scalar_as_py, "Decimal256Scalar.as_py(self, *, maps_as_pydicts=None)\n\nReturn this value as a Python Decimal.\n\nParameters\n----------\nmaps_as_pydicts : str, optional, default `None`\n    Valid values are `None`, 'lossy', or 'strict'.\n    This parameter is ignored for non-nested Scalars.");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_16Decimal256Scalar_1as_py = {"as_py", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_16Decimal256Scalar_1as_py, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_16Decimal256Scalar_as_py};
    static PyObject *__pyx_pw_7pyarrow_3lib_16Decimal256Scalar_1as_py(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      CYTHON_UNUSED PyObject *__pyx_v_maps_as_pydicts = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("as_py (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_maps_as_pydicts,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(3, 560, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, 0, __pyx_kwds_len, "as_py", 0) < (0)) __PYX_ERR(3, 560, __pyx_L3_error)
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
        } else if (unlikely(__pyx_nargs != 0)) {
          goto __pyx_L5_argtuple_error;
        } else {
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
        }
        __pyx_v_maps_as_pydicts = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("as_py", 1, 0, 0, __pyx_nargs); __PYX_ERR(3, 560, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.Decimal256Scalar.as_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_16Decimal256Scalar_as_py(((struct __pyx_obj_7pyarrow_3lib_Decimal256Scalar *)__pyx_v_self), __pyx_v_maps_as_pydicts);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_16Decimal256Scalar_as_py(struct __pyx_obj_7pyarrow_3lib_Decimal256Scalar *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_maps_as_pydicts) {
       arrow::Decimal256Scalar *__pyx_v_sp;
       arrow::Decimal256Type *__pyx_v_dtype;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      int __pyx_t_1;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      PyObject *__pyx_t_5 = NULL;
      PyObject *__pyx_t_6 = NULL;
      PyObject *__pyx_t_7 = NULL;
      PyObject *__pyx_t_8 = NULL;
      size_t __pyx_t_9;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("as_py", 0);

      /* "pyarrow/scalar.pxi":571
 *         """
 *         cdef:
 *             CDecimal256Scalar* sp = <CDecimal256Scalar*> self.wrapped.get()             # <<<<<<<<<<<<<<
 *             CDecimal256Type* dtype = <CDecimal256Type*> sp.type.get()
 *         if sp.is_valid:
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "wrapped");
        __PYX_ERR(3, 571, __pyx_L1_error)
      }
      __pyx_v_sp = (( arrow::Decimal256Scalar *)__pyx_v_self->__pyx_base.wrapped.get());

      /* "pyarrow/scalar.pxi":572
 *         cdef:
 *             CDecimal256Scalar* sp = <CDecimal256Scalar*> self.wrapped.get()
 *             CDecimal256Type* dtype = <CDecimal256Type*> sp.type.get()             # <<<<<<<<<<<<<<
 *         if sp.is_valid:
 *             return _pydecimal.Decimal(
*/
      __pyx_v_dtype = (( arrow::Decimal256Type *)__pyx_v_sp->type.get());

      /* "pyarrow/scalar.pxi":573
 *             CDecimal256Scalar* sp = <CDecimal256Scalar*> self.wrapped.get()
 *             CDecimal256Type* dtype = <CDecimal256Type*> sp.type.get()
 *         if sp.is_valid:             # <<<<<<<<<<<<<<
 *             return _pydecimal.Decimal(
 *                 frombytes(sp.value.ToString(dtype.scale()))
*/
      __pyx_t_1 = (__pyx_v_sp->is_valid != 0);
      if (__pyx_t_1) {

        /* "pyarrow/scalar.pxi":574
 *             CDecimal256Type* dtype = <CDecimal256Type*> sp.type.get()
 *         if sp.is_valid:
 *             return _pydecimal.Decimal(             # <<<<<<<<<<<<<<
 *                 frombytes(sp.value.ToString(dtype.scale()))
 *             )
*/
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_pydecimal); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 574, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Decimal); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 574, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

        /* "pyarrow/scalar.pxi":575
 *         if sp.is_valid:
 *             return _pydecimal.Decimal(
 *                 frombytes(sp.value.ToString(dtype.scale()))             # <<<<<<<<<<<<<<
 *             )
 *         else:
*/
        __pyx_t_6 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_frombytes); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 575, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_8 = __pyx_convert_PyBytes_string_to_py_6libcpp_6string_std__in_string(__pyx_v_sp->value.ToString(__pyx_v_dtype->scale())); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 575, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_9 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_7))) {
          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
          assert(__pyx_t_6);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
          __pyx_t_9 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_8};
          __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 575, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
        }
        __pyx_t_9 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
          __pyx_t_9 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 574, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        goto __pyx_L0;

        /* "pyarrow/scalar.pxi":573
 *             CDecimal256Scalar* sp = <CDecimal256Scalar*> self.wrapped.get()
 *             CDecimal256Type* dtype = <CDecimal256Type*> sp.type.get()
 *         if sp.is_valid:             # <<<<<<<<<<<<<<
 *             return _pydecimal.Decimal(
 *                 frombytes(sp.value.ToString(dtype.scale()))
*/
      }

      /* "pyarrow/scalar.pxi":578
 *             )
 *         else:
 *             return None             # <<<<<<<<<<<<<<
 * 
 * 
*/
      /*else*/ {
        __Pyx_XDECREF(__pyx_r);
        __pyx_r = Py_None; __Pyx_INCREF(Py_None);
        goto __pyx_L0;
      }

      /* "pyarrow/scalar.pxi":560
 *     """
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return this value as a Python Decimal.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_8);
      __Pyx_AddTraceback("pyarrow.lib.Decimal256Scalar.as_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/scalar.pxi":586
 *     """
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def value(self):
 *         cdef CDate32Scalar* sp = <CDate32Scalar*> self.wrapped.get()
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_12Date32Scalar_5value_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_12Date32Scalar_5value_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_12Date32Scalar_5value___get__(((struct __pyx_obj_7pyarrow_3lib_Date32Scalar *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_12Date32Scalar_5value___get__(struct __pyx_obj_7pyarrow_3lib_Date32Scalar *__pyx_v_self) {
       arrow::Date32Scalar *__pyx_v_sp;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_t_2;
      PyObject *__pyx_t_3 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__get__", 0);

      /* "pyarrow/scalar.pxi":588
 *     @property
 *     def value(self):
 *         cdef CDate32Scalar* sp = <CDate32Scalar*> self.wrapped.get()             # <<<<<<<<<<<<<<
 *         return sp.value if sp.is_valid else None
 * 
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "wrapped");
        __PYX_ERR(3, 588, __pyx_L1_error)
      }
      __pyx_v_sp = (( arrow::Date32Scalar *)__pyx_v_self->__pyx_base.wrapped.get());

      /* "pyarrow/scalar.pxi":589
 *     def value(self):
 *         cdef CDate32Scalar* sp = <CDate32Scalar*> self.wrapped.get()
 *         return sp.value if sp.is_valid else None             # <<<<<<<<<<<<<<
 * 
 *     def as_py(self, *, maps_as_pydicts=None):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = (__pyx_v_sp->is_valid != 0);
      if (__pyx_t_2) {
        __pyx_t_3 = __Pyx_PyLong_From_int32_t(__pyx_v_sp->value); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 589, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_1 = __pyx_t_3;
        __pyx_t_3 = 0;
      } else {
        __Pyx_INCREF(Py_None);
        __pyx_t_1 = Py_None;
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/scalar.pxi":586
 *     """
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def value(self):
 *         cdef CDate32Scalar* sp = <CDate32Scalar*> self.wrapped.get()
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_AddTraceback("pyarrow.lib.Date32Scalar.value.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/scalar.pxi":591
 *         return sp.value if sp.is_valid else None
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return this value as a Python datetime.datetime instance.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_12Date32Scalar_1as_py(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_12Date32Scalar_as_py, "Date32Scalar.as_py(self, *, maps_as_pydicts=None)\n\nReturn this value as a Python datetime.datetime instance.\n\nParameters\n----------\nmaps_as_pydicts : str, optional, default `None`\n    Valid values are `None`, 'lossy', or 'strict'.\n    This parameter is ignored for non-nested Scalars.");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_12Date32Scalar_1as_py = {"as_py", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12Date32Scalar_1as_py, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12Date32Scalar_as_py};
    static PyObject *__pyx_pw_7pyarrow_3lib_12Date32Scalar_1as_py(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      CYTHON_UNUSED PyObject *__pyx_v_maps_as_pydicts = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("as_py (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_maps_as_pydicts,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(3, 591, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, 0, __pyx_kwds_len, "as_py", 0) < (0)) __PYX_ERR(3, 591, __pyx_L3_error)
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
        } else if (unlikely(__pyx_nargs != 0)) {
          goto __pyx_L5_argtuple_error;
        } else {
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
        }
        __pyx_v_maps_as_pydicts = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("as_py", 1, 0, 0, __pyx_nargs); __PYX_ERR(3, 591, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.Date32Scalar.as_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_12Date32Scalar_as_py(((struct __pyx_obj_7pyarrow_3lib_Date32Scalar *)__pyx_v_self), __pyx_v_maps_as_pydicts);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_12Date32Scalar_as_py(struct __pyx_obj_7pyarrow_3lib_Date32Scalar *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_maps_as_pydicts) {
       arrow::Date32Scalar *__pyx_v_sp;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      int __pyx_t_1;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      PyObject *__pyx_t_5 = NULL;
      PyObject *__pyx_t_6 = NULL;
      size_t __pyx_t_7;
      PyObject *__pyx_t_8 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("as_py", 0);

      /* "pyarrow/scalar.pxi":601
 *             This parameter is ignored for non-nested Scalars.
 *         """
 *         cdef CDate32Scalar* sp = <CDate32Scalar*> self.wrapped.get()             # <<<<<<<<<<<<<<
 * 
 *         if sp.is_valid:
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "wrapped");
        __PYX_ERR(3, 601, __pyx_L1_error)
      }
      __pyx_v_sp = (( arrow::Date32Scalar *)__pyx_v_self->__pyx_base.wrapped.get());

      /* "pyarrow/scalar.pxi":603
 *         cdef CDate32Scalar* sp = <CDate32Scalar*> self.wrapped.get()
 * 
 *         if sp.is_valid:             # <<<<<<<<<<<<<<
 *             # shift to seconds since epoch
 *             return (
*/
      __pyx_t_1 = (__pyx_v_sp->is_valid != 0);
      if (__pyx_t_1) {

        /* "pyarrow/scalar.pxi":605
 *         if sp.is_valid:
 *             # shift to seconds since epoch
 *             return (             # <<<<<<<<<<<<<<
 *                 datetime.date(1970, 1, 1) + datetime.timedelta(days=sp.value)
 *             )
*/
        __Pyx_XDECREF(__pyx_r);

        /* "pyarrow/scalar.pxi":606
 *             # shift to seconds since epoch
 *             return (
 *                 datetime.date(1970, 1, 1) + datetime.timedelta(days=sp.value)             # <<<<<<<<<<<<<<
 *             )
 *         else:
*/
        __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 606, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_date); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 606, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_mstate_global->__pyx_tuple[2], NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 606, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_4 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 606, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_timedelta); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 606, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_5 = __Pyx_PyLong_From_int32_t(__pyx_v_sp->value); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 606, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_7 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_6))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
          assert(__pyx_t_4);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
          __pyx_t_7 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_4, NULL};
          __pyx_t_8 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 606, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_days, __pyx_t_5, __pyx_t_8, __pyx_callargs+1, 0) < (0)) __PYX_ERR(3, 606, __pyx_L1_error)
          __pyx_t_3 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_8);
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 606, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        __pyx_t_6 = PyNumber_Add(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 606, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_r = __pyx_t_6;
        __pyx_t_6 = 0;
        goto __pyx_L0;

        /* "pyarrow/scalar.pxi":603
 *         cdef CDate32Scalar* sp = <CDate32Scalar*> self.wrapped.get()
 * 
 *         if sp.is_valid:             # <<<<<<<<<<<<<<
 *             # shift to seconds since epoch
 *             return (
*/
      }

      /* "pyarrow/scalar.pxi":609
 *             )
 *         else:
 *             return None             # <<<<<<<<<<<<<<
 * 
 * 
*/
      /*else*/ {
        __Pyx_XDECREF(__pyx_r);
        __pyx_r = Py_None; __Pyx_INCREF(Py_None);
        goto __pyx_L0;
      }

      /* "pyarrow/scalar.pxi":591
 *         return sp.value if sp.is_valid else None
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return this value as a Python datetime.datetime instance.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_8);
      __Pyx_AddTraceback("pyarrow.lib.Date32Scalar.as_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/scalar.pxi":617
 *     """
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def value(self):
 *         cdef CDate64Scalar* sp = <CDate64Scalar*> self.wrapped.get()
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_12Date64Scalar_5value_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_12Date64Scalar_5value_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_12Date64Scalar_5value___get__(((struct __pyx_obj_7pyarrow_3lib_Date64Scalar *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_12Date64Scalar_5value___get__(struct __pyx_obj_7pyarrow_3lib_Date64Scalar *__pyx_v_self) {
       arrow::Date64Scalar *__pyx_v_sp;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_t_2;
      PyObject *__pyx_t_3 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__get__", 0);

      /* "pyarrow/scalar.pxi":619
 *     @property
 *     def value(self):
 *         cdef CDate64Scalar* sp = <CDate64Scalar*> self.wrapped.get()             # <<<<<<<<<<<<<<
 *         return sp.value if sp.is_valid else None
 * 
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "wrapped");
        __PYX_ERR(3, 619, __pyx_L1_error)
      }
      __pyx_v_sp = (( arrow::Date64Scalar *)__pyx_v_self->__pyx_base.wrapped.get());

      /* "pyarrow/scalar.pxi":620
 *     def value(self):
 *         cdef CDate64Scalar* sp = <CDate64Scalar*> self.wrapped.get()
 *         return sp.value if sp.is_valid else None             # <<<<<<<<<<<<<<
 * 
 *     def as_py(self, *, maps_as_pydicts=None):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = (__pyx_v_sp->is_valid != 0);
      if (__pyx_t_2) {
        __pyx_t_3 = __Pyx_PyLong_From_int64_t(__pyx_v_sp->value); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 620, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_1 = __pyx_t_3;
        __pyx_t_3 = 0;
      } else {
        __Pyx_INCREF(Py_None);
        __pyx_t_1 = Py_None;
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/scalar.pxi":617
 *     """
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def value(self):
 *         cdef CDate64Scalar* sp = <CDate64Scalar*> self.wrapped.get()
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_AddTraceback("pyarrow.lib.Date64Scalar.value.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/scalar.pxi":622
 *         return sp.value if sp.is_valid else None
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return this value as a Python datetime.datetime instance.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_12Date64Scalar_1as_py(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_12Date64Scalar_as_py, "Date64Scalar.as_py(self, *, maps_as_pydicts=None)\n\nReturn this value as a Python datetime.datetime instance.\n\nParameters\n----------\nmaps_as_pydicts : str, optional, default `None`\n    Valid values are `None`, 'lossy', or 'strict'.\n    This parameter is ignored for non-nested Scalars.");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_12Date64Scalar_1as_py = {"as_py", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12Date64Scalar_1as_py, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12Date64Scalar_as_py};
    static PyObject *__pyx_pw_7pyarrow_3lib_12Date64Scalar_1as_py(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      CYTHON_UNUSED PyObject *__pyx_v_maps_as_pydicts = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("as_py (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_maps_as_pydicts,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(3, 622, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, 0, __pyx_kwds_len, "as_py", 0) < (0)) __PYX_ERR(3, 622, __pyx_L3_error)
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
        } else if (unlikely(__pyx_nargs != 0)) {
          goto __pyx_L5_argtuple_error;
        } else {
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
        }
        __pyx_v_maps_as_pydicts = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("as_py", 1, 0, 0, __pyx_nargs); __PYX_ERR(3, 622, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.Date64Scalar.as_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_12Date64Scalar_as_py(((struct __pyx_obj_7pyarrow_3lib_Date64Scalar *)__pyx_v_self), __pyx_v_maps_as_pydicts);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_12Date64Scalar_as_py(struct __pyx_obj_7pyarrow_3lib_Date64Scalar *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_maps_as_pydicts) {
       arrow::Date64Scalar *__pyx_v_sp;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      int __pyx_t_1;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      PyObject *__pyx_t_5 = NULL;
      PyObject *__pyx_t_6 = NULL;
      size_t __pyx_t_7;
      PyObject *__pyx_t_8 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("as_py", 0);

      /* "pyarrow/scalar.pxi":632
 *             This parameter is ignored for non-nested Scalars.
 *         """
 *         cdef CDate64Scalar* sp = <CDate64Scalar*> self.wrapped.get()             # <<<<<<<<<<<<<<
 * 
 *         if sp.is_valid:
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "wrapped");
        __PYX_ERR(3, 632, __pyx_L1_error)
      }
      __pyx_v_sp = (( arrow::Date64Scalar *)__pyx_v_self->__pyx_base.wrapped.get());

      /* "pyarrow/scalar.pxi":634
 *         cdef CDate64Scalar* sp = <CDate64Scalar*> self.wrapped.get()
 * 
 *         if sp.is_valid:             # <<<<<<<<<<<<<<
 *             return (
 *                 datetime.date(1970, 1, 1) +
*/
      __pyx_t_1 = (__pyx_v_sp->is_valid != 0);
      if (__pyx_t_1) {

        /* "pyarrow/scalar.pxi":635
 * 
 *         if sp.is_valid:
 *             return (             # <<<<<<<<<<<<<<
 *                 datetime.date(1970, 1, 1) +
 *                 datetime.timedelta(days=sp.value / 86400000)
*/
        __Pyx_XDECREF(__pyx_r);

        /* "pyarrow/scalar.pxi":636
 *         if sp.is_valid:
 *             return (
 *                 datetime.date(1970, 1, 1) +             # <<<<<<<<<<<<<<
 *                 datetime.timedelta(days=sp.value / 86400000)
 *             )
*/
        __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 636, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_date); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 636, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_mstate_global->__pyx_tuple[2], NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 636, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

        /* "pyarrow/scalar.pxi":637
 *             return (
 *                 datetime.date(1970, 1, 1) +
 *                 datetime.timedelta(days=sp.value / 86400000)             # <<<<<<<<<<<<<<
 *             )
 *         else:
*/
        __pyx_t_4 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 637, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_timedelta); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 637, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_5 = PyFloat_FromDouble((((double)__pyx_v_sp->value) / 86400000.0)); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 637, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_7 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_6))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
          assert(__pyx_t_4);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
          __pyx_t_7 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_4, NULL};
          __pyx_t_8 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 637, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_days, __pyx_t_5, __pyx_t_8, __pyx_callargs+1, 0) < (0)) __PYX_ERR(3, 637, __pyx_L1_error)
          __pyx_t_3 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_8);
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 637, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }

        /* "pyarrow/scalar.pxi":636
 *         if sp.is_valid:
 *             return (
 *                 datetime.date(1970, 1, 1) +             # <<<<<<<<<<<<<<
 *                 datetime.timedelta(days=sp.value / 86400000)
 *             )
*/
        __pyx_t_6 = PyNumber_Add(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 636, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_r = __pyx_t_6;
        __pyx_t_6 = 0;
        goto __pyx_L0;

        /* "pyarrow/scalar.pxi":634
 *         cdef CDate64Scalar* sp = <CDate64Scalar*> self.wrapped.get()
 * 
 *         if sp.is_valid:             # <<<<<<<<<<<<<<
 *             return (
 *                 datetime.date(1970, 1, 1) +
*/
      }

      /* "pyarrow/scalar.pxi":640
 *             )
 *         else:
 *             return None             # <<<<<<<<<<<<<<
 * 
 * 
*/
      /*else*/ {
        __Pyx_XDECREF(__pyx_r);
        __pyx_r = Py_None; __Pyx_INCREF(Py_None);
        goto __pyx_L0;
      }

      /* "pyarrow/scalar.pxi":622
 *         return sp.value if sp.is_valid else None
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return this value as a Python datetime.datetime instance.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_8);
      __Pyx_AddTraceback("pyarrow.lib.Date64Scalar.as_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/scalar.pxi":643
 * 
 * 
 * def _datetime_from_int(int64_t value, TimeUnit unit, tzinfo=None):             # <<<<<<<<<<<<<<
 *     if unit == TimeUnit_SECOND:
 *         delta = datetime.timedelta(seconds=value)
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_187_datetime_from_int(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_186_datetime_from_int, "_datetime_from_int(int64_t value, TimeUnit unit, tzinfo=None)");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_187_datetime_from_int = {"_datetime_from_int", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_187_datetime_from_int, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_186_datetime_from_int};
    static PyObject *__pyx_pw_7pyarrow_3lib_187_datetime_from_int(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      int64_t __pyx_v_value;
      enum  arrow::TimeUnit::type __pyx_v_unit;
      PyObject *__pyx_v_tzinfo = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[3] = {0,0,0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("_datetime_from_int (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_value,&__pyx_mstate_global->__pyx_n_u_unit,&__pyx_mstate_global->__pyx_n_u_tzinfo,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(3, 643, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  3:
            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(3, 643, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(3, 643, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(3, 643, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_datetime_from_int", 0) < (0)) __PYX_ERR(3, 643, __pyx_L3_error)
          if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
          for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_datetime_from_int", 0, 2, 3, i); __PYX_ERR(3, 643, __pyx_L3_error) }
          }
        } else {
          switch (__pyx_nargs) {
            case  3:
            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(3, 643, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(3, 643, __pyx_L3_error)
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(3, 643, __pyx_L3_error)
            break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
        }
        __pyx_v_value = __Pyx_PyLong_As_int64_t(values[0]); if (unlikely((__pyx_v_value == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(3, 643, __pyx_L3_error)
        __pyx_v_unit = ((enum  arrow::TimeUnit::type)__Pyx_PyLong_As_enum____arrow_3a__3a_TimeUnit_3a__3a_type(values[1])); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 643, __pyx_L3_error)
        __pyx_v_tzinfo = values[2];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("_datetime_from_int", 0, 2, 3, __pyx_nargs); __PYX_ERR(3, 643, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib._datetime_from_int", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_186_datetime_from_int(__pyx_self, __pyx_v_value, __pyx_v_unit, __pyx_v_tzinfo);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_186_datetime_from_int(CYTHON_UNUSED PyObject *__pyx_self, int64_t __pyx_v_value, enum  arrow::TimeUnit::type __pyx_v_unit, PyObject *__pyx_v_tzinfo) {
      PyObject *__pyx_v_delta = NULL;
      PyObject *__pyx_v_dt = NULL;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      size_t __pyx_t_5;
      PyObject *__pyx_t_6 = NULL;
      int __pyx_t_7;
      PyObject *__pyx_t_8[3];
      PyObject *__pyx_t_9 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("_datetime_from_int", 0);

      /* "pyarrow/scalar.pxi":644
 * 
 * def _datetime_from_int(int64_t value, TimeUnit unit, tzinfo=None):
 *     if unit == TimeUnit_SECOND:             # <<<<<<<<<<<<<<
 *         delta = datetime.timedelta(seconds=value)
 *     elif unit == TimeUnit_MILLI:
*/
      switch (__pyx_v_unit) {
        case  arrow::TimeUnit::SECOND:

        /* "pyarrow/scalar.pxi":645
 * def _datetime_from_int(int64_t value, TimeUnit unit, tzinfo=None):
 *     if unit == TimeUnit_SECOND:
 *         delta = datetime.timedelta(seconds=value)             # <<<<<<<<<<<<<<
 *     elif unit == TimeUnit_MILLI:
 *         delta = datetime.timedelta(milliseconds=value)
*/
        __pyx_t_2 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 645, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_timedelta); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 645, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = __Pyx_PyLong_From_int64_t(__pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 645, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_2);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, NULL};
          __pyx_t_6 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 645, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_seconds, __pyx_t_3, __pyx_t_6, __pyx_callargs+1, 0) < (0)) __PYX_ERR(3, 645, __pyx_L1_error)
          __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_6);
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 645, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
        }
        __pyx_v_delta = __pyx_t_1;
        __pyx_t_1 = 0;

        /* "pyarrow/scalar.pxi":644
 * 
 * def _datetime_from_int(int64_t value, TimeUnit unit, tzinfo=None):
 *     if unit == TimeUnit_SECOND:             # <<<<<<<<<<<<<<
 *         delta = datetime.timedelta(seconds=value)
 *     elif unit == TimeUnit_MILLI:
*/
        break;
        case  arrow::TimeUnit::MILLI:

        /* "pyarrow/scalar.pxi":647
 *         delta = datetime.timedelta(seconds=value)
 *     elif unit == TimeUnit_MILLI:
 *         delta = datetime.timedelta(milliseconds=value)             # <<<<<<<<<<<<<<
 *     elif unit == TimeUnit_MICRO:
 *         delta = datetime.timedelta(microseconds=value)
*/
        __pyx_t_4 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 647, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_timedelta); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 647, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_6 = __Pyx_PyLong_From_int64_t(__pyx_v_value); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 647, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          assert(__pyx_t_4);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_4, NULL};
          __pyx_t_2 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 647, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_milliseconds, __pyx_t_6, __pyx_t_2, __pyx_callargs+1, 0) < (0)) __PYX_ERR(3, 647, __pyx_L1_error)
          __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_2);
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 647, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
        }
        __pyx_v_delta = __pyx_t_1;
        __pyx_t_1 = 0;

        /* "pyarrow/scalar.pxi":646
 *     if unit == TimeUnit_SECOND:
 *         delta = datetime.timedelta(seconds=value)
 *     elif unit == TimeUnit_MILLI:             # <<<<<<<<<<<<<<
 *         delta = datetime.timedelta(milliseconds=value)
 *     elif unit == TimeUnit_MICRO:
*/
        break;
        case  arrow::TimeUnit::MICRO:

        /* "pyarrow/scalar.pxi":649
 *         delta = datetime.timedelta(milliseconds=value)
 *     elif unit == TimeUnit_MICRO:
 *         delta = datetime.timedelta(microseconds=value)             # <<<<<<<<<<<<<<
 *     else:
 *         # TimeUnit_NANO: prefer pandas timestamps if available
*/
        __pyx_t_3 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 649, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_timedelta); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 649, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = __Pyx_PyLong_From_int64_t(__pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 649, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_6))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_3, NULL};
          __pyx_t_4 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 649, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_microseconds, __pyx_t_2, __pyx_t_4, __pyx_callargs+1, 0) < (0)) __PYX_ERR(3, 649, __pyx_L1_error)
          __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_4);
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 649, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
        }
        __pyx_v_delta = __pyx_t_1;
        __pyx_t_1 = 0;

        /* "pyarrow/scalar.pxi":648
 *     elif unit == TimeUnit_MILLI:
 *         delta = datetime.timedelta(milliseconds=value)
 *     elif unit == TimeUnit_MICRO:             # <<<<<<<<<<<<<<
 *         delta = datetime.timedelta(microseconds=value)
 *     else:
*/
        break;
        default:

        /* "pyarrow/scalar.pxi":652
 *     else:
 *         # TimeUnit_NANO: prefer pandas timestamps if available
 *         if _pandas_api.have_pandas:             # <<<<<<<<<<<<<<
 *             return _pandas_api.pd.Timestamp(value, tz=tzinfo, unit='ns')
 *         # otherwise safely truncate to microsecond resolution datetime
*/
        __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_pandas_api); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 652, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_have_pandas); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 652, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(3, 652, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (__pyx_t_7) {

          /* "pyarrow/scalar.pxi":653
 *         # TimeUnit_NANO: prefer pandas timestamps if available
 *         if _pandas_api.have_pandas:
 *             return _pandas_api.pd.Timestamp(value, tz=tzinfo, unit='ns')             # <<<<<<<<<<<<<<
 *         # otherwise safely truncate to microsecond resolution datetime
 *         if value % 1000 != 0:
*/
          __Pyx_XDECREF(__pyx_r);
          __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_pandas_api); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 653, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_pd); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 653, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_1 = __pyx_t_2;
          __Pyx_INCREF(__pyx_t_1);
          __pyx_t_4 = __Pyx_PyLong_From_int64_t(__pyx_v_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 653, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_5 = 0;
          {
            PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_1, __pyx_t_4};
            __pyx_t_3 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 653, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_tz, __pyx_v_tzinfo, __pyx_t_3, __pyx_callargs+2, 0) < (0)) __PYX_ERR(3, 653, __pyx_L1_error)
            if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_unit, __pyx_mstate_global->__pyx_n_u_ns, __pyx_t_3, __pyx_callargs+2, 1) < (0)) __PYX_ERR(3, 653, __pyx_L1_error)
            __pyx_t_6 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_Timestamp, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_3);
            __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 653, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_6);
          }
          __pyx_r = __pyx_t_6;
          __pyx_t_6 = 0;
          goto __pyx_L0;

          /* "pyarrow/scalar.pxi":652
 *     else:
 *         # TimeUnit_NANO: prefer pandas timestamps if available
 *         if _pandas_api.have_pandas:             # <<<<<<<<<<<<<<
 *             return _pandas_api.pd.Timestamp(value, tz=tzinfo, unit='ns')
 *         # otherwise safely truncate to microsecond resolution datetime
*/
        }

        /* "pyarrow/scalar.pxi":655
 *             return _pandas_api.pd.Timestamp(value, tz=tzinfo, unit='ns')
 *         # otherwise safely truncate to microsecond resolution datetime
 *         if value % 1000 != 0:             # <<<<<<<<<<<<<<
 *             raise ValueError(
 *                 f"Nanosecond resolution temporal type {value} is not safely "
*/
        __pyx_t_7 = (__Pyx_mod_int64_t(__pyx_v_value, 0x3E8, 1) != 0);
        if (unlikely(__pyx_t_7)) {

          /* "pyarrow/scalar.pxi":656
 *         # otherwise safely truncate to microsecond resolution datetime
 *         if value % 1000 != 0:
 *             raise ValueError(             # <<<<<<<<<<<<<<
 *                 f"Nanosecond resolution temporal type {value} is not safely "
 *                 "convertible to microseconds to convert to datetime.datetime. "
*/
          __pyx_t_2 = NULL;

          /* "pyarrow/scalar.pxi":657
 *         if value % 1000 != 0:
 *             raise ValueError(
 *                 f"Nanosecond resolution temporal type {value} is not safely "             # <<<<<<<<<<<<<<
 *                 "convertible to microseconds to convert to datetime.datetime. "
 *                 "Install pandas to return as Timestamp with nanosecond "
*/
          __pyx_t_3 = __Pyx_PyUnicode_From_int64_t(__pyx_v_value, 0, ' ', 'd'); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 657, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_8[0] = __pyx_mstate_global->__pyx_kp_u_Nanosecond_resolution_temporal_t;
          __pyx_t_8[1] = __pyx_t_3;
          __pyx_t_8[2] = __pyx_mstate_global->__pyx_kp_u_is_not_safely_convertible_to_mi;
          __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_8, 3, 36 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + 169, 127);
          if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 657, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __pyx_t_5 = 1;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4};
            __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 656, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_6);
          }
          __Pyx_Raise(__pyx_t_6, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __PYX_ERR(3, 656, __pyx_L1_error)

          /* "pyarrow/scalar.pxi":655
 *             return _pandas_api.pd.Timestamp(value, tz=tzinfo, unit='ns')
 *         # otherwise safely truncate to microsecond resolution datetime
 *         if value % 1000 != 0:             # <<<<<<<<<<<<<<
 *             raise ValueError(
 *                 f"Nanosecond resolution temporal type {value} is not safely "
*/
        }

        /* "pyarrow/scalar.pxi":662
 *                 "support or access the .value attribute."
 *             )
 *         delta = datetime.timedelta(microseconds=value // 1000)             # <<<<<<<<<<<<<<
 * 
 *     dt = datetime.datetime(1970, 1, 1) + delta
*/
        __pyx_t_4 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 662, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_timedelta); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 662, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = __Pyx_PyLong_From_int64_t(__Pyx_div_int64_t(__pyx_v_value, 0x3E8, 1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 662, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          assert(__pyx_t_4);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_4, NULL};
          __pyx_t_1 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 662, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_microseconds, __pyx_t_2, __pyx_t_1, __pyx_callargs+1, 0) < (0)) __PYX_ERR(3, 662, __pyx_L1_error)
          __pyx_t_6 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_1);
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 662, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
        }
        __pyx_v_delta = __pyx_t_6;
        __pyx_t_6 = 0;
        break;
      }

      /* "pyarrow/scalar.pxi":664
 *         delta = datetime.timedelta(microseconds=value // 1000)
 * 
 *     dt = datetime.datetime(1970, 1, 1) + delta             # <<<<<<<<<<<<<<
 *     # adjust timezone if set to the datatype
 *     if tzinfo is not None:
*/
      __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 664, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 664, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_mstate_global->__pyx_tuple[2], NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 664, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyNumber_Add(__pyx_t_6, __pyx_v_delta); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 664, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_v_dt = __pyx_t_3;
      __pyx_t_3 = 0;

      /* "pyarrow/scalar.pxi":666
 *     dt = datetime.datetime(1970, 1, 1) + delta
 *     # adjust timezone if set to the datatype
 *     if tzinfo is not None:             # <<<<<<<<<<<<<<
 *         dt = dt.replace(tzinfo=datetime.timezone.utc).astimezone(tzinfo)
 * 
*/
      __pyx_t_7 = (__pyx_v_tzinfo != Py_None);
      if (__pyx_t_7) {

        /* "pyarrow/scalar.pxi":667
 *     # adjust timezone if set to the datatype
 *     if tzinfo is not None:
 *         dt = dt.replace(tzinfo=datetime.timezone.utc).astimezone(tzinfo)             # <<<<<<<<<<<<<<
 * 
 *     return dt
*/
        __pyx_t_2 = __pyx_v_dt;
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 667, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_timezone); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 667, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_utc); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 667, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __pyx_t_5 = 0;
        {
          PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, NULL};
          __pyx_t_9 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 667, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_tzinfo, __pyx_t_4, __pyx_t_9, __pyx_callargs+1, 0) < (0)) __PYX_ERR(3, 667, __pyx_L1_error)
          __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_replace, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_9);
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 667, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
        }
        __pyx_t_6 = __pyx_t_1;
        __Pyx_INCREF(__pyx_t_6);
        __pyx_t_5 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_tzinfo};
          __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astimezone, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 667, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        __Pyx_DECREF_SET(__pyx_v_dt, __pyx_t_3);
        __pyx_t_3 = 0;

        /* "pyarrow/scalar.pxi":666
 *     dt = datetime.datetime(1970, 1, 1) + delta
 *     # adjust timezone if set to the datatype
 *     if tzinfo is not None:             # <<<<<<<<<<<<<<
 *         dt = dt.replace(tzinfo=datetime.timezone.utc).astimezone(tzinfo)
 * 
*/
      }

      /* "pyarrow/scalar.pxi":669
 *         dt = dt.replace(tzinfo=datetime.timezone.utc).astimezone(tzinfo)
 * 
 *     return dt             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_dt);
      __pyx_r = __pyx_v_dt;
      goto __pyx_L0;

      /* "pyarrow/scalar.pxi":643
 * 
 * 
 * def _datetime_from_int(int64_t value, TimeUnit unit, tzinfo=None):             # <<<<<<<<<<<<<<
 *     if unit == TimeUnit_SECOND:
 *         delta = datetime.timedelta(seconds=value)
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_9);
      __Pyx_AddTraceback("pyarrow.lib._datetime_from_int", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_delta);
      __Pyx_XDECREF(__pyx_v_dt);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/scalar.pxi":677
 *     """
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def value(self):
 *         cdef CTime32Scalar* sp = <CTime32Scalar*> self.wrapped.get()
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_12Time32Scalar_5value_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_12Time32Scalar_5value_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_12Time32Scalar_5value___get__(((struct __pyx_obj_7pyarrow_3lib_Time32Scalar *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_12Time32Scalar_5value___get__(struct __pyx_obj_7pyarrow_3lib_Time32Scalar *__pyx_v_self) {
       arrow::Time32Scalar *__pyx_v_sp;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_t_2;
      PyObject *__pyx_t_3 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__get__", 0);

      /* "pyarrow/scalar.pxi":679
 *     @property
 *     def value(self):
 *         cdef CTime32Scalar* sp = <CTime32Scalar*> self.wrapped.get()             # <<<<<<<<<<<<<<
 *         return sp.value if sp.is_valid else None
 * 
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "wrapped");
        __PYX_ERR(3, 679, __pyx_L1_error)
      }
      __pyx_v_sp = (( arrow::Time32Scalar *)__pyx_v_self->__pyx_base.wrapped.get());

      /* "pyarrow/scalar.pxi":680
 *     def value(self):
 *         cdef CTime32Scalar* sp = <CTime32Scalar*> self.wrapped.get()
 *         return sp.value if sp.is_valid else None             # <<<<<<<<<<<<<<
 * 
 *     def as_py(self, *, maps_as_pydicts=None):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = (__pyx_v_sp->is_valid != 0);
      if (__pyx_t_2) {
        __pyx_t_3 = __Pyx_PyLong_From_int32_t(__pyx_v_sp->value); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 680, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_1 = __pyx_t_3;
        __pyx_t_3 = 0;
      } else {
        __Pyx_INCREF(Py_None);
        __pyx_t_1 = Py_None;
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/scalar.pxi":677
 *     """
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def value(self):
 *         cdef CTime32Scalar* sp = <CTime32Scalar*> self.wrapped.get()
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_AddTraceback("pyarrow.lib.Time32Scalar.value.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/scalar.pxi":682
 *         return sp.value if sp.is_valid else None
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return this value as a Python datetime.timedelta instance.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_12Time32Scalar_1as_py(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_12Time32Scalar_as_py, "Time32Scalar.as_py(self, *, maps_as_pydicts=None)\n\nReturn this value as a Python datetime.timedelta instance.\n\nParameters\n----------\nmaps_as_pydicts : str, optional, default `None`\n    Valid values are `None`, 'lossy', or 'strict'.\n    This parameter is ignored for non-nested Scalars.");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_12Time32Scalar_1as_py = {"as_py", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12Time32Scalar_1as_py, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12Time32Scalar_as_py};
    static PyObject *__pyx_pw_7pyarrow_3lib_12Time32Scalar_1as_py(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      CYTHON_UNUSED PyObject *__pyx_v_maps_as_pydicts = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("as_py (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_maps_as_pydicts,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(3, 682, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, 0, __pyx_kwds_len, "as_py", 0) < (0)) __PYX_ERR(3, 682, __pyx_L3_error)
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
        } else if (unlikely(__pyx_nargs != 0)) {
          goto __pyx_L5_argtuple_error;
        } else {
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
        }
        __pyx_v_maps_as_pydicts = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("as_py", 1, 0, 0, __pyx_nargs); __PYX_ERR(3, 682, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.Time32Scalar.as_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_12Time32Scalar_as_py(((struct __pyx_obj_7pyarrow_3lib_Time32Scalar *)__pyx_v_self), __pyx_v_maps_as_pydicts);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_12Time32Scalar_as_py(struct __pyx_obj_7pyarrow_3lib_Time32Scalar *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_maps_as_pydicts) {
       arrow::Time32Scalar *__pyx_v_sp;
       arrow::Time32Type *__pyx_v_dtype;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      int __pyx_t_1;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      PyObject *__pyx_t_5 = NULL;
      PyObject *__pyx_t_6 = NULL;
      PyObject *__pyx_t_7 = NULL;
      PyObject *__pyx_t_8 = NULL;
      size_t __pyx_t_9;
      PyObject *__pyx_t_10 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("as_py", 0);

      /* "pyarrow/scalar.pxi":693
 *         """
 *         cdef:
 *             CTime32Scalar* sp = <CTime32Scalar*> self.wrapped.get()             # <<<<<<<<<<<<<<
 *             CTime32Type* dtype = <CTime32Type*> sp.type.get()
 * 
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "wrapped");
        __PYX_ERR(3, 693, __pyx_L1_error)
      }
      __pyx_v_sp = (( arrow::Time32Scalar *)__pyx_v_self->__pyx_base.wrapped.get());

      /* "pyarrow/scalar.pxi":694
 *         cdef:
 *             CTime32Scalar* sp = <CTime32Scalar*> self.wrapped.get()
 *             CTime32Type* dtype = <CTime32Type*> sp.type.get()             # <<<<<<<<<<<<<<
 * 
 *         if sp.is_valid:
*/
      __pyx_v_dtype = (( arrow::Time32Type *)__pyx_v_sp->type.get());

      /* "pyarrow/scalar.pxi":696
 *             CTime32Type* dtype = <CTime32Type*> sp.type.get()
 * 
 *         if sp.is_valid:             # <<<<<<<<<<<<<<
 *             return _datetime_from_int(sp.value, unit=dtype.unit()).time()
 *         else:
*/
      __pyx_t_1 = (__pyx_v_sp->is_valid != 0);
      if (__pyx_t_1) {

        /* "pyarrow/scalar.pxi":697
 * 
 *         if sp.is_valid:
 *             return _datetime_from_int(sp.value, unit=dtype.unit()).time()             # <<<<<<<<<<<<<<
 *         else:
 *             return None
*/
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_5 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_datetime_from_int); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 697, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_7 = __Pyx_PyLong_From_int32_t(__pyx_v_sp->value); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 697, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_8 = __Pyx_PyLong_From_enum____arrow_3a__3a_TimeUnit_3a__3a_type(__pyx_v_dtype->unit()); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 697, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_9 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_6))) {
          __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
          assert(__pyx_t_5);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
          __pyx_t_9 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_5, __pyx_t_7};
          __pyx_t_10 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 697, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_10);
          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_unit, __pyx_t_8, __pyx_t_10, __pyx_callargs+2, 0) < (0)) __PYX_ERR(3, 697, __pyx_L1_error)
          __pyx_t_4 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_10);
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 697, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
        }
        __pyx_t_3 = __pyx_t_4;
        __Pyx_INCREF(__pyx_t_3);
        __pyx_t_9 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
          __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_time, __pyx_callargs+__pyx_t_9, (1-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 697, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        goto __pyx_L0;

        /* "pyarrow/scalar.pxi":696
 *             CTime32Type* dtype = <CTime32Type*> sp.type.get()
 * 
 *         if sp.is_valid:             # <<<<<<<<<<<<<<
 *             return _datetime_from_int(sp.value, unit=dtype.unit()).time()
 *         else:
*/
      }

      /* "pyarrow/scalar.pxi":699
 *             return _datetime_from_int(sp.value, unit=dtype.unit()).time()
 *         else:
 *             return None             # <<<<<<<<<<<<<<
 * 
 * 
*/
      /*else*/ {
        __Pyx_XDECREF(__pyx_r);
        __pyx_r = Py_None; __Pyx_INCREF(Py_None);
        goto __pyx_L0;
      }

      /* "pyarrow/scalar.pxi":682
 *         return sp.value if sp.is_valid else None
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return this value as a Python datetime.timedelta instance.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_8);
      __Pyx_XDECREF(__pyx_t_10);
      __Pyx_AddTraceback("pyarrow.lib.Time32Scalar.as_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/scalar.pxi":707
 *     """
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def value(self):
 *         cdef CTime64Scalar* sp = <CTime64Scalar*> self.wrapped.get()
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_12Time64Scalar_5value_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_12Time64Scalar_5value_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_12Time64Scalar_5value___get__(((struct __pyx_obj_7pyarrow_3lib_Time64Scalar *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_12Time64Scalar_5value___get__(struct __pyx_obj_7pyarrow_3lib_Time64Scalar *__pyx_v_self) {
       arrow::Time64Scalar *__pyx_v_sp;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_t_2;
      PyObject *__pyx_t_3 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__get__", 0);

      /* "pyarrow/scalar.pxi":709
 *     @property
 *     def value(self):
 *         cdef CTime64Scalar* sp = <CTime64Scalar*> self.wrapped.get()             # <<<<<<<<<<<<<<
 *         return sp.value if sp.is_valid else None
 * 
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "wrapped");
        __PYX_ERR(3, 709, __pyx_L1_error)
      }
      __pyx_v_sp = (( arrow::Time64Scalar *)__pyx_v_self->__pyx_base.wrapped.get());

      /* "pyarrow/scalar.pxi":710
 *     def value(self):
 *         cdef CTime64Scalar* sp = <CTime64Scalar*> self.wrapped.get()
 *         return sp.value if sp.is_valid else None             # <<<<<<<<<<<<<<
 * 
 *     def as_py(self, *, maps_as_pydicts=None):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = (__pyx_v_sp->is_valid != 0);
      if (__pyx_t_2) {
        __pyx_t_3 = __Pyx_PyLong_From_int64_t(__pyx_v_sp->value); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 710, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_1 = __pyx_t_3;
        __pyx_t_3 = 0;
      } else {
        __Pyx_INCREF(Py_None);
        __pyx_t_1 = Py_None;
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/scalar.pxi":707
 *     """
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def value(self):
 *         cdef CTime64Scalar* sp = <CTime64Scalar*> self.wrapped.get()
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_AddTraceback("pyarrow.lib.Time64Scalar.value.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/scalar.pxi":712
 *         return sp.value if sp.is_valid else None
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return this value as a Python datetime.timedelta instance.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_12Time64Scalar_1as_py(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_12Time64Scalar_as_py, "Time64Scalar.as_py(self, *, maps_as_pydicts=None)\n\nReturn this value as a Python datetime.timedelta instance.\n\nParameters\n----------\nmaps_as_pydicts : str, optional, default `None`\n    Valid values are `None`, 'lossy', or 'strict'.\n    This parameter is ignored for non-nested Scalars.");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_12Time64Scalar_1as_py = {"as_py", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12Time64Scalar_1as_py, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12Time64Scalar_as_py};
    static PyObject *__pyx_pw_7pyarrow_3lib_12Time64Scalar_1as_py(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      CYTHON_UNUSED PyObject *__pyx_v_maps_as_pydicts = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("as_py (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_maps_as_pydicts,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(3, 712, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, 0, __pyx_kwds_len, "as_py", 0) < (0)) __PYX_ERR(3, 712, __pyx_L3_error)
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
        } else if (unlikely(__pyx_nargs != 0)) {
          goto __pyx_L5_argtuple_error;
        } else {
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
        }
        __pyx_v_maps_as_pydicts = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("as_py", 1, 0, 0, __pyx_nargs); __PYX_ERR(3, 712, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.Time64Scalar.as_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_12Time64Scalar_as_py(((struct __pyx_obj_7pyarrow_3lib_Time64Scalar *)__pyx_v_self), __pyx_v_maps_as_pydicts);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_12Time64Scalar_as_py(struct __pyx_obj_7pyarrow_3lib_Time64Scalar *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_maps_as_pydicts) {
       arrow::Time64Scalar *__pyx_v_sp;
       arrow::Time64Type *__pyx_v_dtype;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      int __pyx_t_1;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      PyObject *__pyx_t_5 = NULL;
      PyObject *__pyx_t_6 = NULL;
      PyObject *__pyx_t_7 = NULL;
      PyObject *__pyx_t_8 = NULL;
      size_t __pyx_t_9;
      PyObject *__pyx_t_10 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("as_py", 0);

      /* "pyarrow/scalar.pxi":723
 *         """
 *         cdef:
 *             CTime64Scalar* sp = <CTime64Scalar*> self.wrapped.get()             # <<<<<<<<<<<<<<
 *             CTime64Type* dtype = <CTime64Type*> sp.type.get()
 * 
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "wrapped");
        __PYX_ERR(3, 723, __pyx_L1_error)
      }
      __pyx_v_sp = (( arrow::Time64Scalar *)__pyx_v_self->__pyx_base.wrapped.get());

      /* "pyarrow/scalar.pxi":724
 *         cdef:
 *             CTime64Scalar* sp = <CTime64Scalar*> self.wrapped.get()
 *             CTime64Type* dtype = <CTime64Type*> sp.type.get()             # <<<<<<<<<<<<<<
 * 
 *         if sp.is_valid:
*/
      __pyx_v_dtype = (( arrow::Time64Type *)__pyx_v_sp->type.get());

      /* "pyarrow/scalar.pxi":726
 *             CTime64Type* dtype = <CTime64Type*> sp.type.get()
 * 
 *         if sp.is_valid:             # <<<<<<<<<<<<<<
 *             return _datetime_from_int(sp.value, unit=dtype.unit()).time()
 *         else:
*/
      __pyx_t_1 = (__pyx_v_sp->is_valid != 0);
      if (__pyx_t_1) {

        /* "pyarrow/scalar.pxi":727
 * 
 *         if sp.is_valid:
 *             return _datetime_from_int(sp.value, unit=dtype.unit()).time()             # <<<<<<<<<<<<<<
 *         else:
 *             return None
*/
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_5 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_datetime_from_int); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 727, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_7 = __Pyx_PyLong_From_int64_t(__pyx_v_sp->value); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 727, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_8 = __Pyx_PyLong_From_enum____arrow_3a__3a_TimeUnit_3a__3a_type(__pyx_v_dtype->unit()); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 727, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_9 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_6))) {
          __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
          assert(__pyx_t_5);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
          __pyx_t_9 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_5, __pyx_t_7};
          __pyx_t_10 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 727, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_10);
          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_unit, __pyx_t_8, __pyx_t_10, __pyx_callargs+2, 0) < (0)) __PYX_ERR(3, 727, __pyx_L1_error)
          __pyx_t_4 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_10);
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 727, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
        }
        __pyx_t_3 = __pyx_t_4;
        __Pyx_INCREF(__pyx_t_3);
        __pyx_t_9 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
          __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_time, __pyx_callargs+__pyx_t_9, (1-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 727, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        goto __pyx_L0;

        /* "pyarrow/scalar.pxi":726
 *             CTime64Type* dtype = <CTime64Type*> sp.type.get()
 * 
 *         if sp.is_valid:             # <<<<<<<<<<<<<<
 *             return _datetime_from_int(sp.value, unit=dtype.unit()).time()
 *         else:
*/
      }

      /* "pyarrow/scalar.pxi":729
 *             return _datetime_from_int(sp.value, unit=dtype.unit()).time()
 *         else:
 *             return None             # <<<<<<<<<<<<<<
 * 
 * 
*/
      /*else*/ {
        __Pyx_XDECREF(__pyx_r);
        __pyx_r = Py_None; __Pyx_INCREF(Py_None);
        goto __pyx_L0;
      }

      /* "pyarrow/scalar.pxi":712
 *         return sp.value if sp.is_valid else None
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return this value as a Python datetime.timedelta instance.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_8);
      __Pyx_XDECREF(__pyx_t_10);
      __Pyx_AddTraceback("pyarrow.lib.Time64Scalar.as_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/scalar.pxi":737
 *     """
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def value(self):
 *         cdef CTimestampScalar* sp = <CTimestampScalar*> self.wrapped.get()
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_15TimestampScalar_5value_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_15TimestampScalar_5value_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_15TimestampScalar_5value___get__(((struct __pyx_obj_7pyarrow_3lib_TimestampScalar *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_15TimestampScalar_5value___get__(struct __pyx_obj_7pyarrow_3lib_TimestampScalar *__pyx_v_self) {
       arrow::TimestampScalar *__pyx_v_sp;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_t_2;
      PyObject *__pyx_t_3 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__get__", 0);

      /* "pyarrow/scalar.pxi":739
 *     @property
 *     def value(self):
 *         cdef CTimestampScalar* sp = <CTimestampScalar*> self.wrapped.get()             # <<<<<<<<<<<<<<
 *         return sp.value if sp.is_valid else None
 * 
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "wrapped");
        __PYX_ERR(3, 739, __pyx_L1_error)
      }
      __pyx_v_sp = (( arrow::TimestampScalar *)__pyx_v_self->__pyx_base.wrapped.get());

      /* "pyarrow/scalar.pxi":740
 *     def value(self):
 *         cdef CTimestampScalar* sp = <CTimestampScalar*> self.wrapped.get()
 *         return sp.value if sp.is_valid else None             # <<<<<<<<<<<<<<
 * 
 *     def as_py(self, *, maps_as_pydicts=None):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = (__pyx_v_sp->is_valid != 0);
      if (__pyx_t_2) {
        __pyx_t_3 = __Pyx_PyLong_From_int64_t(__pyx_v_sp->value); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 740, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_1 = __pyx_t_3;
        __pyx_t_3 = 0;
      } else {
        __Pyx_INCREF(Py_None);
        __pyx_t_1 = Py_None;
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/scalar.pxi":737
 *     """
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def value(self):
 *         cdef CTimestampScalar* sp = <CTimestampScalar*> self.wrapped.get()
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_AddTraceback("pyarrow.lib.TimestampScalar.value.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/scalar.pxi":742
 *         return sp.value if sp.is_valid else None
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return this value as a Pandas Timestamp instance (if units are
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_15TimestampScalar_1as_py(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_15TimestampScalar_as_py, "TimestampScalar.as_py(self, *, maps_as_pydicts=None)\n\nReturn this value as a Pandas Timestamp instance (if units are\nnanoseconds and pandas is available), otherwise as a Python\ndatetime.datetime instance.\n\nParameters\n----------\nmaps_as_pydicts : str, optional, default `None`\n    Valid values are `None`, 'lossy', or 'strict'.\n    This parameter is ignored for non-nested Scalars.");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_15TimestampScalar_1as_py = {"as_py", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15TimestampScalar_1as_py, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15TimestampScalar_as_py};
    static PyObject *__pyx_pw_7pyarrow_3lib_15TimestampScalar_1as_py(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      CYTHON_UNUSED PyObject *__pyx_v_maps_as_pydicts = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("as_py (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_maps_as_pydicts,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(3, 742, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, 0, __pyx_kwds_len, "as_py", 0) < (0)) __PYX_ERR(3, 742, __pyx_L3_error)
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
        } else if (unlikely(__pyx_nargs != 0)) {
          goto __pyx_L5_argtuple_error;
        } else {
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
        }
        __pyx_v_maps_as_pydicts = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("as_py", 1, 0, 0, __pyx_nargs); __PYX_ERR(3, 742, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.TimestampScalar.as_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_15TimestampScalar_as_py(((struct __pyx_obj_7pyarrow_3lib_TimestampScalar *)__pyx_v_self), __pyx_v_maps_as_pydicts);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_15TimestampScalar_as_py(struct __pyx_obj_7pyarrow_3lib_TimestampScalar *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_maps_as_pydicts) {
       arrow::TimestampScalar *__pyx_v_sp;
       arrow::TimestampType *__pyx_v_dtype;
      PyObject *__pyx_v_tzinfo = NULL;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      int __pyx_t_1;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      PyObject *__pyx_t_5 = NULL;
      PyObject *__pyx_t_6 = NULL;
      PyObject *__pyx_t_7 = NULL;
      PyObject *__pyx_t_8 = NULL;
      size_t __pyx_t_9;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("as_py", 0);

      /* "pyarrow/scalar.pxi":755
 *         """
 *         cdef:
 *             CTimestampScalar* sp = <CTimestampScalar*> self.wrapped.get()             # <<<<<<<<<<<<<<
 *             CTimestampType* dtype = <CTimestampType*> sp.type.get()
 * 
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "wrapped");
        __PYX_ERR(3, 755, __pyx_L1_error)
      }
      __pyx_v_sp = (( arrow::TimestampScalar *)__pyx_v_self->__pyx_base.wrapped.get());

      /* "pyarrow/scalar.pxi":756
 *         cdef:
 *             CTimestampScalar* sp = <CTimestampScalar*> self.wrapped.get()
 *             CTimestampType* dtype = <CTimestampType*> sp.type.get()             # <<<<<<<<<<<<<<
 * 
 *         if not sp.is_valid:
*/
      __pyx_v_dtype = (( arrow::TimestampType *)__pyx_v_sp->type.get());

      /* "pyarrow/scalar.pxi":758
 *             CTimestampType* dtype = <CTimestampType*> sp.type.get()
 * 
 *         if not sp.is_valid:             # <<<<<<<<<<<<<<
 *             return None
 * 
*/
      __pyx_t_1 = (!(__pyx_v_sp->is_valid != 0));
      if (__pyx_t_1) {

        /* "pyarrow/scalar.pxi":759
 * 
 *         if not sp.is_valid:
 *             return None             # <<<<<<<<<<<<<<
 * 
 *         if not dtype.timezone().empty():
*/
        __Pyx_XDECREF(__pyx_r);
        __pyx_r = Py_None; __Pyx_INCREF(Py_None);
        goto __pyx_L0;

        /* "pyarrow/scalar.pxi":758
 *             CTimestampType* dtype = <CTimestampType*> sp.type.get()
 * 
 *         if not sp.is_valid:             # <<<<<<<<<<<<<<
 *             return None
 * 
*/
      }

      /* "pyarrow/scalar.pxi":761
 *             return None
 * 
 *         if not dtype.timezone().empty():             # <<<<<<<<<<<<<<
 *             tzinfo = string_to_tzinfo(frombytes(dtype.timezone()))
 *         else:
*/
      __pyx_t_1 = (!__pyx_v_dtype->timezone().empty());
      if (__pyx_t_1) {

        /* "pyarrow/scalar.pxi":762
 * 
 *         if not dtype.timezone().empty():
 *             tzinfo = string_to_tzinfo(frombytes(dtype.timezone()))             # <<<<<<<<<<<<<<
 *         else:
 *             tzinfo = None
*/
        __pyx_t_3 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_string_to_tzinfo); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 762, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_6 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_frombytes); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 762, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_8 = __pyx_convert_PyBytes_string_to_py_6libcpp_6string_std__in_string(__pyx_v_dtype->timezone()); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 762, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_9 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_7))) {
          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
          assert(__pyx_t_6);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
          __pyx_t_9 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_8};
          __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 762, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
        }
        __pyx_t_9 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_9 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 762, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __pyx_v_tzinfo = __pyx_t_2;
        __pyx_t_2 = 0;

        /* "pyarrow/scalar.pxi":761
 *             return None
 * 
 *         if not dtype.timezone().empty():             # <<<<<<<<<<<<<<
 *             tzinfo = string_to_tzinfo(frombytes(dtype.timezone()))
 *         else:
*/
        goto __pyx_L4;
      }

      /* "pyarrow/scalar.pxi":764
 *             tzinfo = string_to_tzinfo(frombytes(dtype.timezone()))
 *         else:
 *             tzinfo = None             # <<<<<<<<<<<<<<
 * 
 *         return _datetime_from_int(sp.value, unit=dtype.unit(), tzinfo=tzinfo)
*/
      /*else*/ {
        __Pyx_INCREF(Py_None);
        __pyx_v_tzinfo = Py_None;
      }
      __pyx_L4:;

      /* "pyarrow/scalar.pxi":766
 *             tzinfo = None
 * 
 *         return _datetime_from_int(sp.value, unit=dtype.unit(), tzinfo=tzinfo)             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_4 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_datetime_from_int); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 766, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_3 = __Pyx_PyLong_From_int64_t(__pyx_v_sp->value); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 766, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_7 = __Pyx_PyLong_From_enum____arrow_3a__3a_TimeUnit_3a__3a_type(__pyx_v_dtype->unit()); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 766, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_9 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
        assert(__pyx_t_4);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
        __pyx_t_9 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_4, __pyx_t_3};
        __pyx_t_8 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 766, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_unit, __pyx_t_7, __pyx_t_8, __pyx_callargs+2, 0) < (0)) __PYX_ERR(3, 766, __pyx_L1_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_tzinfo, __pyx_v_tzinfo, __pyx_t_8, __pyx_callargs+2, 1) < (0)) __PYX_ERR(3, 766, __pyx_L1_error)
        __pyx_t_2 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_8);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 766, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
      }
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;

      /* "pyarrow/scalar.pxi":742
 *         return sp.value if sp.is_valid else None
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return this value as a Pandas Timestamp instance (if units are
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_8);
      __Pyx_AddTraceback("pyarrow.lib.TimestampScalar.as_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_tzinfo);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/scalar.pxi":768
 *         return _datetime_from_int(sp.value, unit=dtype.unit(), tzinfo=tzinfo)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the representation of TimestampScalar using `strftime` to avoid
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_15TimestampScalar_3__repr__(PyObject *__pyx_v_self); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_15TimestampScalar_2__repr__, "TimestampScalar.__repr__(self)\n\nReturn the representation of TimestampScalar using `strftime` to avoid\noriginal repr datetime values being out of range.");
    #if CYTHON_UPDATE_DESCRIPTOR_DOC
    struct wrapperbase __pyx_wrapperbase_7pyarrow_3lib_15TimestampScalar_2__repr__;
    #endif
    static PyObject *__pyx_pw_7pyarrow_3lib_15TimestampScalar_3__repr__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_15TimestampScalar_2__repr__(((struct __pyx_obj_7pyarrow_3lib_TimestampScalar *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_15TimestampScalar_2__repr__(struct __pyx_obj_7pyarrow_3lib_TimestampScalar *__pyx_v_self) {
       arrow::TimestampScalar *__pyx_v_sp;
       arrow::TimestampType *__pyx_v_dtype;
      PyObject *__pyx_v_type_format = NULL;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      int __pyx_t_1;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      PyObject *__pyx_t_5 = NULL;
      PyObject *__pyx_t_6 = NULL;
      size_t __pyx_t_7;
      PyObject *__pyx_t_8[5];
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__repr__", 0);

      /* "pyarrow/scalar.pxi":774
 *         """
 *         cdef:
 *             CTimestampScalar* sp = <CTimestampScalar*> self.wrapped.get()             # <<<<<<<<<<<<<<
 *             CTimestampType* dtype = <CTimestampType*> sp.type.get()
 * 
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "wrapped");
        __PYX_ERR(3, 774, __pyx_L1_error)
      }
      __pyx_v_sp = (( arrow::TimestampScalar *)__pyx_v_self->__pyx_base.wrapped.get());

      /* "pyarrow/scalar.pxi":775
 *         cdef:
 *             CTimestampScalar* sp = <CTimestampScalar*> self.wrapped.get()
 *             CTimestampType* dtype = <CTimestampType*> sp.type.get()             # <<<<<<<<<<<<<<
 * 
 *         if not dtype.timezone().empty():
*/
      __pyx_v_dtype = (( arrow::TimestampType *)__pyx_v_sp->type.get());

      /* "pyarrow/scalar.pxi":777
 *             CTimestampType* dtype = <CTimestampType*> sp.type.get()
 * 
 *         if not dtype.timezone().empty():             # <<<<<<<<<<<<<<
 *             type_format = str(_pc().strftime(self, format="%Y-%m-%dT%H:%M:%S%z"))
 *         else:
*/
      __pyx_t_1 = (!__pyx_v_dtype->timezone().empty());
      if (__pyx_t_1) {

        /* "pyarrow/scalar.pxi":778
 * 
 *         if not dtype.timezone().empty():
 *             type_format = str(_pc().strftime(self, format="%Y-%m-%dT%H:%M:%S%z"))             # <<<<<<<<<<<<<<
 *         else:
 *             type_format = str(_pc().strftime(self))
*/
        __pyx_t_5 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_pc_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 778, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_7 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_6))) {
          __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
          assert(__pyx_t_5);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
          __pyx_t_7 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
          __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 778, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
        }
        __pyx_t_3 = __pyx_t_4;
        __Pyx_INCREF(__pyx_t_3);
        __pyx_t_7 = 0;
        {
          PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_3, ((PyObject *)__pyx_v_self)};
          __pyx_t_6 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 778, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_format, __pyx_mstate_global->__pyx_kp_u_Y_m_dT_H_M_S_z, __pyx_t_6, __pyx_callargs+2, 0) < (0)) __PYX_ERR(3, 778, __pyx_L1_error)
          __pyx_t_2 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_strftime, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_6);
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 778, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __pyx_t_4 = __Pyx_PyObject_Unicode(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 778, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_v_type_format = ((PyObject*)__pyx_t_4);
        __pyx_t_4 = 0;

        /* "pyarrow/scalar.pxi":777
 *             CTimestampType* dtype = <CTimestampType*> sp.type.get()
 * 
 *         if not dtype.timezone().empty():             # <<<<<<<<<<<<<<
 *             type_format = str(_pc().strftime(self, format="%Y-%m-%dT%H:%M:%S%z"))
 *         else:
*/
        goto __pyx_L3;
      }

      /* "pyarrow/scalar.pxi":780
 *             type_format = str(_pc().strftime(self, format="%Y-%m-%dT%H:%M:%S%z"))
 *         else:
 *             type_format = str(_pc().strftime(self))             # <<<<<<<<<<<<<<
 *         return f'<pyarrow.{self.__class__.__name__}: {type_format!r}>'
 * 
*/
      /*else*/ {
        __pyx_t_3 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pc_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 780, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_7 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
          __pyx_t_7 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
          __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 780, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
        }
        __pyx_t_2 = __pyx_t_6;
        __Pyx_INCREF(__pyx_t_2);
        __pyx_t_7 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_2, ((PyObject *)__pyx_v_self)};
          __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_strftime, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 780, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
        }
        __pyx_t_6 = __Pyx_PyObject_Unicode(__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 780, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_v_type_format = ((PyObject*)__pyx_t_6);
        __pyx_t_6 = 0;
      }
      __pyx_L3:;

      /* "pyarrow/scalar.pxi":781
 *         else:
 *             type_format = str(_pc().strftime(self))
 *         return f'<pyarrow.{self.__class__.__name__}: {type_format!r}>'             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 781, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_name_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 781, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 781, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_type_format), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 781, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_8[0] = __pyx_mstate_global->__pyx_kp_u_pyarrow_2;
      __pyx_t_8[1] = __pyx_t_6;
      __pyx_t_8[2] = __pyx_mstate_global->__pyx_kp_u__10;
      __pyx_t_8[3] = __pyx_t_4;
      __pyx_t_8[4] = __pyx_mstate_global->__pyx_kp_u__5;
      __pyx_t_2 = __Pyx_PyUnicode_Join(__pyx_t_8, 5, 9 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6) + 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4));
      if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 781, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;

      /* "pyarrow/scalar.pxi":768
 *         return _datetime_from_int(sp.value, unit=dtype.unit(), tzinfo=tzinfo)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the representation of TimestampScalar using `strftime` to avoid
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_AddTraceback("pyarrow.lib.TimestampScalar.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_type_format);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/scalar.pxi":789
 *     """
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def value(self):
 *         cdef CDurationScalar* sp = <CDurationScalar*> self.wrapped.get()
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_14DurationScalar_5value_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_14DurationScalar_5value_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_14DurationScalar_5value___get__(((struct __pyx_obj_7pyarrow_3lib_DurationScalar *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_14DurationScalar_5value___get__(struct __pyx_obj_7pyarrow_3lib_DurationScalar *__pyx_v_self) {
       arrow::DurationScalar *__pyx_v_sp;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_t_2;
      PyObject *__pyx_t_3 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__get__", 0);

      /* "pyarrow/scalar.pxi":791
 *     @property
 *     def value(self):
 *         cdef CDurationScalar* sp = <CDurationScalar*> self.wrapped.get()             # <<<<<<<<<<<<<<
 *         return sp.value if sp.is_valid else None
 * 
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "wrapped");
        __PYX_ERR(3, 791, __pyx_L1_error)
      }
      __pyx_v_sp = (( arrow::DurationScalar *)__pyx_v_self->__pyx_base.wrapped.get());

      /* "pyarrow/scalar.pxi":792
 *     def value(self):
 *         cdef CDurationScalar* sp = <CDurationScalar*> self.wrapped.get()
 *         return sp.value if sp.is_valid else None             # <<<<<<<<<<<<<<
 * 
 *     def as_py(self, *, maps_as_pydicts=None):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = (__pyx_v_sp->is_valid != 0);
      if (__pyx_t_2) {
        __pyx_t_3 = __Pyx_PyLong_From_int64_t(__pyx_v_sp->value); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 792, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_1 = __pyx_t_3;
        __pyx_t_3 = 0;
      } else {
        __Pyx_INCREF(Py_None);
        __pyx_t_1 = Py_None;
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/scalar.pxi":789
 *     """
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def value(self):
 *         cdef CDurationScalar* sp = <CDurationScalar*> self.wrapped.get()
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_AddTraceback("pyarrow.lib.DurationScalar.value.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/scalar.pxi":794
 *         return sp.value if sp.is_valid else None
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return this value as a Pandas Timedelta instance (if units are
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_14DurationScalar_1as_py(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_14DurationScalar_as_py, "DurationScalar.as_py(self, *, maps_as_pydicts=None)\n\nReturn this value as a Pandas Timedelta instance (if units are\nnanoseconds and pandas is available), otherwise as a Python\ndatetime.timedelta instance.\n\nParameters\n----------\nmaps_as_pydicts : str, optional, default `None`\n    Valid values are `None`, 'lossy', or 'strict'.\n    This parameter is ignored for non-nested Scalars.");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_14DurationScalar_1as_py = {"as_py", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_14DurationScalar_1as_py, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_14DurationScalar_as_py};
    static PyObject *__pyx_pw_7pyarrow_3lib_14DurationScalar_1as_py(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      CYTHON_UNUSED PyObject *__pyx_v_maps_as_pydicts = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("as_py (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_maps_as_pydicts,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(3, 794, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, 0, __pyx_kwds_len, "as_py", 0) < (0)) __PYX_ERR(3, 794, __pyx_L3_error)
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
        } else if (unlikely(__pyx_nargs != 0)) {
          goto __pyx_L5_argtuple_error;
        } else {
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
        }
        __pyx_v_maps_as_pydicts = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("as_py", 1, 0, 0, __pyx_nargs); __PYX_ERR(3, 794, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.DurationScalar.as_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_14DurationScalar_as_py(((struct __pyx_obj_7pyarrow_3lib_DurationScalar *)__pyx_v_self), __pyx_v_maps_as_pydicts);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_14DurationScalar_as_py(struct __pyx_obj_7pyarrow_3lib_DurationScalar *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_maps_as_pydicts) {
       arrow::DurationScalar *__pyx_v_sp;
       arrow::DurationType *__pyx_v_dtype;
      enum  arrow::TimeUnit::type __pyx_v_unit;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      int __pyx_t_1;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      PyObject *__pyx_t_5 = NULL;
      size_t __pyx_t_6;
      PyObject *__pyx_t_7 = NULL;
      PyObject *__pyx_t_8[3];
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("as_py", 0);

      /* "pyarrow/scalar.pxi":807
 *         """
 *         cdef:
 *             CDurationScalar* sp = <CDurationScalar*> self.wrapped.get()             # <<<<<<<<<<<<<<
 *             CDurationType* dtype = <CDurationType*> sp.type.get()
 *             TimeUnit unit = dtype.unit()
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "wrapped");
        __PYX_ERR(3, 807, __pyx_L1_error)
      }
      __pyx_v_sp = (( arrow::DurationScalar *)__pyx_v_self->__pyx_base.wrapped.get());

      /* "pyarrow/scalar.pxi":808
 *         cdef:
 *             CDurationScalar* sp = <CDurationScalar*> self.wrapped.get()
 *             CDurationType* dtype = <CDurationType*> sp.type.get()             # <<<<<<<<<<<<<<
 *             TimeUnit unit = dtype.unit()
 * 
*/
      __pyx_v_dtype = (( arrow::DurationType *)__pyx_v_sp->type.get());

      /* "pyarrow/scalar.pxi":809
 *             CDurationScalar* sp = <CDurationScalar*> self.wrapped.get()
 *             CDurationType* dtype = <CDurationType*> sp.type.get()
 *             TimeUnit unit = dtype.unit()             # <<<<<<<<<<<<<<
 * 
 *         if not sp.is_valid:
*/
      __pyx_v_unit = __pyx_v_dtype->unit();

      /* "pyarrow/scalar.pxi":811
 *             TimeUnit unit = dtype.unit()
 * 
 *         if not sp.is_valid:             # <<<<<<<<<<<<<<
 *             return None
 * 
*/
      __pyx_t_1 = (!(__pyx_v_sp->is_valid != 0));
      if (__pyx_t_1) {

        /* "pyarrow/scalar.pxi":812
 * 
 *         if not sp.is_valid:
 *             return None             # <<<<<<<<<<<<<<
 * 
 *         if unit == TimeUnit_SECOND:
*/
        __Pyx_XDECREF(__pyx_r);
        __pyx_r = Py_None; __Pyx_INCREF(Py_None);
        goto __pyx_L0;

        /* "pyarrow/scalar.pxi":811
 *             TimeUnit unit = dtype.unit()
 * 
 *         if not sp.is_valid:             # <<<<<<<<<<<<<<
 *             return None
 * 
*/
      }

      /* "pyarrow/scalar.pxi":814
 *             return None
 * 
 *         if unit == TimeUnit_SECOND:             # <<<<<<<<<<<<<<
 *             return datetime.timedelta(seconds=sp.value)
 *         elif unit == TimeUnit_MILLI:
*/
      switch (__pyx_v_unit) {
        case  arrow::TimeUnit::SECOND:

        /* "pyarrow/scalar.pxi":815
 * 
 *         if unit == TimeUnit_SECOND:
 *             return datetime.timedelta(seconds=sp.value)             # <<<<<<<<<<<<<<
 *         elif unit == TimeUnit_MILLI:
 *             return datetime.timedelta(milliseconds=sp.value)
*/
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 815, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_timedelta); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 815, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_4 = __Pyx_PyLong_From_int64_t(__pyx_v_sp->value); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 815, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_6 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
          __pyx_t_6 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_3, NULL};
          __pyx_t_7 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 815, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_seconds, __pyx_t_4, __pyx_t_7, __pyx_callargs+1, 0) < (0)) __PYX_ERR(3, 815, __pyx_L1_error)
          __pyx_t_2 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_7);
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 815, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        goto __pyx_L0;

        /* "pyarrow/scalar.pxi":814
 *             return None
 * 
 *         if unit == TimeUnit_SECOND:             # <<<<<<<<<<<<<<
 *             return datetime.timedelta(seconds=sp.value)
 *         elif unit == TimeUnit_MILLI:
*/
        break;
        case  arrow::TimeUnit::MILLI:

        /* "pyarrow/scalar.pxi":817
 *             return datetime.timedelta(seconds=sp.value)
 *         elif unit == TimeUnit_MILLI:
 *             return datetime.timedelta(milliseconds=sp.value)             # <<<<<<<<<<<<<<
 *         elif unit == TimeUnit_MICRO:
 *             return datetime.timedelta(microseconds=sp.value)
*/
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_5 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 817, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_timedelta); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 817, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_7 = __Pyx_PyLong_From_int64_t(__pyx_v_sp->value); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 817, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_6 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_5);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_6 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_5, NULL};
          __pyx_t_3 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 817, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_milliseconds, __pyx_t_7, __pyx_t_3, __pyx_callargs+1, 0) < (0)) __PYX_ERR(3, 817, __pyx_L1_error)
          __pyx_t_2 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_3);
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 817, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        goto __pyx_L0;

        /* "pyarrow/scalar.pxi":816
 *         if unit == TimeUnit_SECOND:
 *             return datetime.timedelta(seconds=sp.value)
 *         elif unit == TimeUnit_MILLI:             # <<<<<<<<<<<<<<
 *             return datetime.timedelta(milliseconds=sp.value)
 *         elif unit == TimeUnit_MICRO:
*/
        break;
        case  arrow::TimeUnit::MICRO:

        /* "pyarrow/scalar.pxi":819
 *             return datetime.timedelta(milliseconds=sp.value)
 *         elif unit == TimeUnit_MICRO:
 *             return datetime.timedelta(microseconds=sp.value)             # <<<<<<<<<<<<<<
 *         else:
 *             # TimeUnit_NANO: prefer pandas timestamps if available
*/
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_4 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 819, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_timedelta); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 819, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = __Pyx_PyLong_From_int64_t(__pyx_v_sp->value); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 819, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_6 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_7))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_7);
          assert(__pyx_t_4);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
          __pyx_t_6 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_4, NULL};
          __pyx_t_5 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 819, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_microseconds, __pyx_t_3, __pyx_t_5, __pyx_callargs+1, 0) < (0)) __PYX_ERR(3, 819, __pyx_L1_error)
          __pyx_t_2 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_5);
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 819, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        goto __pyx_L0;

        /* "pyarrow/scalar.pxi":818
 *         elif unit == TimeUnit_MILLI:
 *             return datetime.timedelta(milliseconds=sp.value)
 *         elif unit == TimeUnit_MICRO:             # <<<<<<<<<<<<<<
 *             return datetime.timedelta(microseconds=sp.value)
 *         else:
*/
        break;
        default:

        /* "pyarrow/scalar.pxi":822
 *         else:
 *             # TimeUnit_NANO: prefer pandas timestamps if available
 *             if _pandas_api.have_pandas:             # <<<<<<<<<<<<<<
 *                 return _pandas_api.pd.Timedelta(sp.value, unit='ns')
 *             # otherwise safely truncate to microsecond resolution timedelta
*/
        __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_pandas_api); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 822, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_have_pandas); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 822, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(3, 822, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (__pyx_t_1) {

          /* "pyarrow/scalar.pxi":823
 *             # TimeUnit_NANO: prefer pandas timestamps if available
 *             if _pandas_api.have_pandas:
 *                 return _pandas_api.pd.Timedelta(sp.value, unit='ns')             # <<<<<<<<<<<<<<
 *             # otherwise safely truncate to microsecond resolution timedelta
 *             if sp.value % 1000 != 0:
*/
          __Pyx_XDECREF(__pyx_r);
          __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pandas_api); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 823, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pd); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 823, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_2 = __pyx_t_3;
          __Pyx_INCREF(__pyx_t_2);
          __pyx_t_5 = __Pyx_PyLong_From_int64_t(__pyx_v_sp->value); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 823, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_6 = 0;
          {
            PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, __pyx_t_5};
            __pyx_t_4 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 823, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_unit, __pyx_mstate_global->__pyx_n_u_ns, __pyx_t_4, __pyx_callargs+2, 0) < (0)) __PYX_ERR(3, 823, __pyx_L1_error)
            __pyx_t_7 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_Timedelta, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_4);
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 823, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_7);
          }
          __pyx_r = __pyx_t_7;
          __pyx_t_7 = 0;
          goto __pyx_L0;

          /* "pyarrow/scalar.pxi":822
 *         else:
 *             # TimeUnit_NANO: prefer pandas timestamps if available
 *             if _pandas_api.have_pandas:             # <<<<<<<<<<<<<<
 *                 return _pandas_api.pd.Timedelta(sp.value, unit='ns')
 *             # otherwise safely truncate to microsecond resolution timedelta
*/
        }

        /* "pyarrow/scalar.pxi":825
 *                 return _pandas_api.pd.Timedelta(sp.value, unit='ns')
 *             # otherwise safely truncate to microsecond resolution timedelta
 *             if sp.value % 1000 != 0:             # <<<<<<<<<<<<<<
 *                 raise ValueError(
 *                     f"Nanosecond duration {sp.value} is not safely convertible to "
*/
        __pyx_t_1 = (__Pyx_mod_int64_t(__pyx_v_sp->value, 0x3E8, 1) != 0);
        if (unlikely(__pyx_t_1)) {

          /* "pyarrow/scalar.pxi":826
 *             # otherwise safely truncate to microsecond resolution timedelta
 *             if sp.value % 1000 != 0:
 *                 raise ValueError(             # <<<<<<<<<<<<<<
 *                     f"Nanosecond duration {sp.value} is not safely convertible to "
 *                     "microseconds to convert to datetime.timedelta. Install "
*/
          __pyx_t_3 = NULL;

          /* "pyarrow/scalar.pxi":827
 *             if sp.value % 1000 != 0:
 *                 raise ValueError(
 *                     f"Nanosecond duration {sp.value} is not safely convertible to "             # <<<<<<<<<<<<<<
 *                     "microseconds to convert to datetime.timedelta. Install "
 *                     "pandas to return as Timedelta with nanosecond support or "
*/
          __pyx_t_4 = __Pyx_PyUnicode_From_int64_t(__pyx_v_sp->value, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 827, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_8[0] = __pyx_mstate_global->__pyx_kp_u_Nanosecond_duration;
          __pyx_t_8[1] = __pyx_t_4;
          __pyx_t_8[2] = __pyx_mstate_global->__pyx_kp_u_is_not_safely_convertible_to_mi_2;
          __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_8, 3, 20 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + 170, 127);
          if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 827, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_6 = 1;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
            __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
            if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 826, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_7);
          }
          __Pyx_Raise(__pyx_t_7, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __PYX_ERR(3, 826, __pyx_L1_error)

          /* "pyarrow/scalar.pxi":825
 *                 return _pandas_api.pd.Timedelta(sp.value, unit='ns')
 *             # otherwise safely truncate to microsecond resolution timedelta
 *             if sp.value % 1000 != 0:             # <<<<<<<<<<<<<<
 *                 raise ValueError(
 *                     f"Nanosecond duration {sp.value} is not safely convertible to "
*/
        }

        /* "pyarrow/scalar.pxi":832
 *                     "access the .value attribute."
 *                 )
 *             return datetime.timedelta(microseconds=sp.value // 1000)             # <<<<<<<<<<<<<<
 * 
 * 
*/
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_5 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 832, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_timedelta); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 832, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = __Pyx_PyLong_From_int64_t(__Pyx_div_int64_t(__pyx_v_sp->value, 0x3E8, 1)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 832, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_6 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_5);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_6 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_5, NULL};
          __pyx_t_2 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 832, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_microseconds, __pyx_t_3, __pyx_t_2, __pyx_callargs+1, 0) < (0)) __PYX_ERR(3, 832, __pyx_L1_error)
          __pyx_t_7 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_2);
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 832, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
        }
        __pyx_r = __pyx_t_7;
        __pyx_t_7 = 0;
        goto __pyx_L0;
        break;
      }

      /* "pyarrow/scalar.pxi":794
 *         return sp.value if sp.is_valid else None
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return this value as a Pandas Timedelta instance (if units are
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_7);
      __Pyx_AddTraceback("pyarrow.lib.DurationScalar.as_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/scalar.pxi":840
 *     """
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def value(self):
 *         """
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_26MonthDayNanoIntervalScalar_5value_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_26MonthDayNanoIntervalScalar_5value_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_26MonthDayNanoIntervalScalar_5value___get__(((struct __pyx_obj_7pyarrow_3lib_MonthDayNanoIntervalScalar *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_26MonthDayNanoIntervalScalar_5value___get__(struct __pyx_obj_7pyarrow_3lib_MonthDayNanoIntervalScalar *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      size_t __pyx_t_3;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__get__", 0);

      /* "pyarrow/scalar.pxi":845
 *         Same as self.as_py()
 *         """
 *         return self.as_py()             # <<<<<<<<<<<<<<
 * 
 *     def as_py(self, *, maps_as_pydicts=None):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = ((PyObject *)__pyx_v_self);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_3 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_as_py, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 845, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/scalar.pxi":840
 *     """
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def value(self):
 *         """
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_AddTraceback("pyarrow.lib.MonthDayNanoIntervalScalar.value.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/scalar.pxi":847
 *         return self.as_py()
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return this value as a pyarrow.MonthDayNano.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_26MonthDayNanoIntervalScalar_1as_py(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_26MonthDayNanoIntervalScalar_as_py, "MonthDayNanoIntervalScalar.as_py(self, *, maps_as_pydicts=None)\n\nReturn this value as a pyarrow.MonthDayNano.\n\nParameters\n----------\nmaps_as_pydicts : str, optional, default `None`\n    Valid values are `None`, 'lossy', or 'strict'.\n    This parameter is ignored for non-nested Scalars.");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_26MonthDayNanoIntervalScalar_1as_py = {"as_py", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_26MonthDayNanoIntervalScalar_1as_py, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_26MonthDayNanoIntervalScalar_as_py};
    static PyObject *__pyx_pw_7pyarrow_3lib_26MonthDayNanoIntervalScalar_1as_py(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      CYTHON_UNUSED PyObject *__pyx_v_maps_as_pydicts = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("as_py (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_maps_as_pydicts,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(3, 847, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, 0, __pyx_kwds_len, "as_py", 0) < (0)) __PYX_ERR(3, 847, __pyx_L3_error)
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
        } else if (unlikely(__pyx_nargs != 0)) {
          goto __pyx_L5_argtuple_error;
        } else {
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
        }
        __pyx_v_maps_as_pydicts = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("as_py", 1, 0, 0, __pyx_nargs); __PYX_ERR(3, 847, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.MonthDayNanoIntervalScalar.as_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_26MonthDayNanoIntervalScalar_as_py(((struct __pyx_obj_7pyarrow_3lib_MonthDayNanoIntervalScalar *)__pyx_v_self), __pyx_v_maps_as_pydicts);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_26MonthDayNanoIntervalScalar_as_py(struct __pyx_obj_7pyarrow_3lib_MonthDayNanoIntervalScalar *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_maps_as_pydicts) {
      PyObject *__pyx_v_val;
      arrow::MonthDayNanoIntervalScalar *__pyx_v_scalar;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1;
      PyObject *__pyx_t_2 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("as_py", 0);

      /* "pyarrow/scalar.pxi":860
 *             PyObject* val
 *             CMonthDayNanoIntervalScalar* scalar
 *         scalar = <CMonthDayNanoIntervalScalar*>self.wrapped.get()             # <<<<<<<<<<<<<<
 *         val = GetResultValue(MonthDayNanoIntervalScalarToPyObject(
 *             deref(scalar)))
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "wrapped");
        __PYX_ERR(3, 860, __pyx_L1_error)
      }
      __pyx_v_scalar = ((arrow::MonthDayNanoIntervalScalar *)__pyx_v_self->__pyx_base.wrapped.get());

      /* "pyarrow/scalar.pxi":861
 *             CMonthDayNanoIntervalScalar* scalar
 *         scalar = <CMonthDayNanoIntervalScalar*>self.wrapped.get()
 *         val = GetResultValue(MonthDayNanoIntervalScalarToPyObject(             # <<<<<<<<<<<<<<
 *             deref(scalar)))
 *         return PyObject_to_object(val)
*/
      __pyx_t_1 = arrow::py::GetResultValue<PyObject *>(arrow::py::internal::MonthDayNanoIntervalScalarToPyObject((*__pyx_v_scalar))); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 861, __pyx_L1_error)
      __pyx_v_val = __pyx_t_1;

      /* "pyarrow/scalar.pxi":863
 *         val = GetResultValue(MonthDayNanoIntervalScalarToPyObject(
 *             deref(scalar)))
 *         return PyObject_to_object(val)             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = __pyx_f_7pyarrow_8includes_6common_PyObject_to_object(__pyx_v_val); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 863, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;

      /* "pyarrow/scalar.pxi":847
 *         return self.as_py()
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return this value as a pyarrow.MonthDayNano.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_AddTraceback("pyarrow.lib.MonthDayNanoIntervalScalar.as_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/scalar.pxi":871
 *     """
 * 
 *     def as_buffer(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return a view over this value as a Buffer object.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_12BinaryScalar_1as_buffer(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_12BinaryScalar_as_buffer, "BinaryScalar.as_buffer(self)\n\nReturn a view over this value as a Buffer object.");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_12BinaryScalar_1as_buffer = {"as_buffer", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12BinaryScalar_1as_buffer, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12BinaryScalar_as_buffer};
    static PyObject *__pyx_pw_7pyarrow_3lib_12BinaryScalar_1as_buffer(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("as_buffer (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("as_buffer", 1, 0, 0, __pyx_nargs); return NULL; }
      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
      if (unlikely(__pyx_kwds_len < 0)) return NULL;
      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("as_buffer", __pyx_kwds); return NULL;}
      __pyx_r = __pyx_pf_7pyarrow_3lib_12BinaryScalar_as_buffer(((struct __pyx_obj_7pyarrow_3lib_BinaryScalar *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_12BinaryScalar_as_buffer(struct __pyx_obj_7pyarrow_3lib_BinaryScalar *__pyx_v_self) {
       arrow::BaseBinaryScalar *__pyx_v_sp;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_t_2;
      PyObject *__pyx_t_3 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("as_buffer", 0);

      /* "pyarrow/scalar.pxi":875
 *         Return a view over this value as a Buffer object.
 *         """
 *         cdef CBaseBinaryScalar* sp = <CBaseBinaryScalar*> self.wrapped.get()             # <<<<<<<<<<<<<<
 *         return pyarrow_wrap_buffer(sp.value) if sp.is_valid else None
 * 
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "wrapped");
        __PYX_ERR(3, 875, __pyx_L1_error)
      }
      __pyx_v_sp = (( arrow::BaseBinaryScalar *)__pyx_v_self->__pyx_base.wrapped.get());

      /* "pyarrow/scalar.pxi":876
 *         """
 *         cdef CBaseBinaryScalar* sp = <CBaseBinaryScalar*> self.wrapped.get()
 *         return pyarrow_wrap_buffer(sp.value) if sp.is_valid else None             # <<<<<<<<<<<<<<
 * 
 *     def as_py(self, *, maps_as_pydicts=None):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = (__pyx_v_sp->is_valid != 0);
      if (__pyx_t_2) {
        __pyx_t_3 = pyarrow_wrap_buffer(__pyx_v_sp->value); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 876, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_1 = __pyx_t_3;
        __pyx_t_3 = 0;
      } else {
        __Pyx_INCREF(Py_None);
        __pyx_t_1 = Py_None;
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/scalar.pxi":871
 *     """
 * 
 *     def as_buffer(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return a view over this value as a Buffer object.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_AddTraceback("pyarrow.lib.BinaryScalar.as_buffer", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/scalar.pxi":878
 *         return pyarrow_wrap_buffer(sp.value) if sp.is_valid else None
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return this value as a Python bytes.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_12BinaryScalar_3as_py(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_12BinaryScalar_2as_py, "BinaryScalar.as_py(self, *, maps_as_pydicts=None)\n\nReturn this value as a Python bytes.\n\nParameters\n----------\nmaps_as_pydicts : str, optional, default `None`\n    Valid values are `None`, 'lossy', or 'strict'.\n    This parameter is ignored for non-nested Scalars.");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_12BinaryScalar_3as_py = {"as_py", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12BinaryScalar_3as_py, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12BinaryScalar_2as_py};
    static PyObject *__pyx_pw_7pyarrow_3lib_12BinaryScalar_3as_py(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      CYTHON_UNUSED PyObject *__pyx_v_maps_as_pydicts = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("as_py (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_maps_as_pydicts,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(3, 878, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, 0, __pyx_kwds_len, "as_py", 0) < (0)) __PYX_ERR(3, 878, __pyx_L3_error)
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
        } else if (unlikely(__pyx_nargs != 0)) {
          goto __pyx_L5_argtuple_error;
        } else {
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
        }
        __pyx_v_maps_as_pydicts = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("as_py", 1, 0, 0, __pyx_nargs); __PYX_ERR(3, 878, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.BinaryScalar.as_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_12BinaryScalar_2as_py(((struct __pyx_obj_7pyarrow_3lib_BinaryScalar *)__pyx_v_self), __pyx_v_maps_as_pydicts);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_12BinaryScalar_2as_py(struct __pyx_obj_7pyarrow_3lib_BinaryScalar *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_maps_as_pydicts) {
      PyObject *__pyx_v_buffer = NULL;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      size_t __pyx_t_3;
      int __pyx_t_4;
      PyObject *__pyx_t_5 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("as_py", 0);

      /* "pyarrow/scalar.pxi":888
 *             This parameter is ignored for non-nested Scalars.
 *         """
 *         buffer = self.as_buffer()             # <<<<<<<<<<<<<<
 *         return None if buffer is None else buffer.to_pybytes()
 * 
*/
      __pyx_t_2 = ((PyObject *)__pyx_v_self);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_3 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_as_buffer, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 888, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_v_buffer = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "pyarrow/scalar.pxi":889
 *         """
 *         buffer = self.as_buffer()
 *         return None if buffer is None else buffer.to_pybytes()             # <<<<<<<<<<<<<<
 * 
 *     def __bytes__(self):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_4 = (__pyx_v_buffer == Py_None);
      if (__pyx_t_4) {
        __Pyx_INCREF(Py_None);
        __pyx_t_1 = Py_None;
      } else {
        __pyx_t_5 = __pyx_v_buffer;
        __Pyx_INCREF(__pyx_t_5);
        __pyx_t_3 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
          __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_to_pybytes, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 889, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __pyx_t_1 = __pyx_t_2;
        __pyx_t_2 = 0;
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/scalar.pxi":878
 *         return pyarrow_wrap_buffer(sp.value) if sp.is_valid else None
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return this value as a Python bytes.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_AddTraceback("pyarrow.lib.BinaryScalar.as_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_buffer);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/scalar.pxi":891
 *         return None if buffer is None else buffer.to_pybytes()
 * 
 *     def __bytes__(self):             # <<<<<<<<<<<<<<
 *         return self.as_py()
 * 
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_12BinaryScalar_5__bytes__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_12BinaryScalar_4__bytes__, "BinaryScalar.__bytes__(self)");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_12BinaryScalar_5__bytes__ = {"__bytes__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12BinaryScalar_5__bytes__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12BinaryScalar_4__bytes__};
    static PyObject *__pyx_pw_7pyarrow_3lib_12BinaryScalar_5__bytes__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__bytes__ (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__bytes__", 1, 0, 0, __pyx_nargs); return NULL; }
      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
      if (unlikely(__pyx_kwds_len < 0)) return NULL;
      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__bytes__", __pyx_kwds); return NULL;}
      __pyx_r = __pyx_pf_7pyarrow_3lib_12BinaryScalar_4__bytes__(((struct __pyx_obj_7pyarrow_3lib_BinaryScalar *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_12BinaryScalar_4__bytes__(struct __pyx_obj_7pyarrow_3lib_BinaryScalar *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      size_t __pyx_t_3;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__bytes__", 0);

      /* "pyarrow/scalar.pxi":892
 * 
 *     def __bytes__(self):
 *         return self.as_py()             # <<<<<<<<<<<<<<
 * 
 *     def __getbuffer__(self, cp.Py_buffer* buffer, int flags):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = ((PyObject *)__pyx_v_self);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_3 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_as_py, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 892, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/scalar.pxi":891
 *         return None if buffer is None else buffer.to_pybytes()
 * 
 *     def __bytes__(self):             # <<<<<<<<<<<<<<
 *         return self.as_py()
 * 
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_AddTraceback("pyarrow.lib.BinaryScalar.__bytes__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/scalar.pxi":894
 *         return self.as_py()
 * 
 *     def __getbuffer__(self, cp.Py_buffer* buffer, int flags):             # <<<<<<<<<<<<<<
 *         buf = self.as_buffer()
 *         if buf is None:
*/

    /* Python wrapper */
    CYTHON_UNUSED static int __pyx_pw_7pyarrow_3lib_12BinaryScalar_7__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_buffer, int __pyx_v_flags); /*proto*/
    CYTHON_UNUSED static int __pyx_pw_7pyarrow_3lib_12BinaryScalar_7__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_buffer, int __pyx_v_flags) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      int __pyx_r;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_12BinaryScalar_6__getbuffer__(((struct __pyx_obj_7pyarrow_3lib_BinaryScalar *)__pyx_v_self), ((Py_buffer *)__pyx_v_buffer), ((int)__pyx_v_flags));

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

    static int __pyx_pf_7pyarrow_3lib_12BinaryScalar_6__getbuffer__(struct __pyx_obj_7pyarrow_3lib_BinaryScalar *__pyx_v_self, Py_buffer *__pyx_v_buffer, int __pyx_v_flags) {
      PyObject *__pyx_v_buf = NULL;
      int __pyx_r;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      size_t __pyx_t_3;
      int __pyx_t_4;
      int __pyx_t_5;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      if (unlikely(__pyx_v_buffer == NULL)) {
        PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete");
        return -1;
      }
      __Pyx_RefNannySetupContext("__getbuffer__", 0);
      __pyx_v_buffer->obj = Py_None; __Pyx_INCREF(Py_None);
      __Pyx_GIVEREF(__pyx_v_buffer->obj);

      /* "pyarrow/scalar.pxi":895
 * 
 *     def __getbuffer__(self, cp.Py_buffer* buffer, int flags):
 *         buf = self.as_buffer()             # <<<<<<<<<<<<<<
 *         if buf is None:
 *             raise ValueError("Cannot export buffer from null Arrow Scalar")
*/
      __pyx_t_2 = ((PyObject *)__pyx_v_self);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_3 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_as_buffer, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 895, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_v_buf = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "pyarrow/scalar.pxi":896
 *     def __getbuffer__(self, cp.Py_buffer* buffer, int flags):
 *         buf = self.as_buffer()
 *         if buf is None:             # <<<<<<<<<<<<<<
 *             raise ValueError("Cannot export buffer from null Arrow Scalar")
 *         cp.PyObject_GetBuffer(buf, buffer, flags)
*/
      __pyx_t_4 = (__pyx_v_buf == Py_None);
      if (unlikely(__pyx_t_4)) {

        /* "pyarrow/scalar.pxi":897
 *         buf = self.as_buffer()
 *         if buf is None:
 *             raise ValueError("Cannot export buffer from null Arrow Scalar")             # <<<<<<<<<<<<<<
 *         cp.PyObject_GetBuffer(buf, buffer, flags)
 * 
*/
        __pyx_t_2 = NULL;
        __pyx_t_3 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Cannot_export_buffer_from_null_A};
          __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 897, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
        }
        __Pyx_Raise(__pyx_t_1, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __PYX_ERR(3, 897, __pyx_L1_error)

        /* "pyarrow/scalar.pxi":896
 *     def __getbuffer__(self, cp.Py_buffer* buffer, int flags):
 *         buf = self.as_buffer()
 *         if buf is None:             # <<<<<<<<<<<<<<
 *             raise ValueError("Cannot export buffer from null Arrow Scalar")
 *         cp.PyObject_GetBuffer(buf, buffer, flags)
*/
      }

      /* "pyarrow/scalar.pxi":898
 *         if buf is None:
 *             raise ValueError("Cannot export buffer from null Arrow Scalar")
 *         cp.PyObject_GetBuffer(buf, buffer, flags)             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __pyx_t_5 = PyObject_GetBuffer(__pyx_v_buf, __pyx_v_buffer, __pyx_v_flags); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(3, 898, __pyx_L1_error)

      /* "pyarrow/scalar.pxi":894
 *         return self.as_py()
 * 
 *     def __getbuffer__(self, cp.Py_buffer* buffer, int flags):             # <<<<<<<<<<<<<<
 *         buf = self.as_buffer()
 *         if buf is None:
*/

      /* function exit code */
      __pyx_r = 0;
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_AddTraceback("pyarrow.lib.BinaryScalar.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = -1;
      if (__pyx_v_buffer->obj != NULL) {
        __Pyx_GOTREF(__pyx_v_buffer->obj);
        __Pyx_DECREF(__pyx_v_buffer->obj); __pyx_v_buffer->obj = 0;
      }
      goto __pyx_L2;
      __pyx_L0:;
      if (__pyx_v_buffer->obj == Py_None) {
        __Pyx_GOTREF(__pyx_v_buffer->obj);
        __Pyx_DECREF(__pyx_v_buffer->obj); __pyx_v_buffer->obj = 0;
      }
      __pyx_L2:;
      __Pyx_XDECREF(__pyx_v_buf);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/scalar.pxi":914
 *     """
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return this value as a Python string.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_12StringScalar_1as_py(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_12StringScalar_as_py, "StringScalar.as_py(self, *, maps_as_pydicts=None)\n\nReturn this value as a Python string.\n\nParameters\n----------\nmaps_as_pydicts : str, optional, default `None`\n    Valid values are `None`, 'lossy', or 'strict'.\n    This parameter is ignored for non-nested Scalars.");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_12StringScalar_1as_py = {"as_py", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12StringScalar_1as_py, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12StringScalar_as_py};
    static PyObject *__pyx_pw_7pyarrow_3lib_12StringScalar_1as_py(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      CYTHON_UNUSED PyObject *__pyx_v_maps_as_pydicts = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("as_py (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_maps_as_pydicts,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(3, 914, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, 0, __pyx_kwds_len, "as_py", 0) < (0)) __PYX_ERR(3, 914, __pyx_L3_error)
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
        } else if (unlikely(__pyx_nargs != 0)) {
          goto __pyx_L5_argtuple_error;
        } else {
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
        }
        __pyx_v_maps_as_pydicts = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("as_py", 1, 0, 0, __pyx_nargs); __PYX_ERR(3, 914, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.StringScalar.as_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_12StringScalar_as_py(((struct __pyx_obj_7pyarrow_3lib_StringScalar *)__pyx_v_self), __pyx_v_maps_as_pydicts);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_12StringScalar_as_py(struct __pyx_obj_7pyarrow_3lib_StringScalar *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_maps_as_pydicts) {
      PyObject *__pyx_v_buffer = NULL;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      size_t __pyx_t_3;
      int __pyx_t_4;
      PyObject *__pyx_t_5 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("as_py", 0);

      /* "pyarrow/scalar.pxi":924
 *             This parameter is ignored for non-nested Scalars.
 *         """
 *         buffer = self.as_buffer()             # <<<<<<<<<<<<<<
 *         return None if buffer is None else str(buffer, 'utf8')
 * 
*/
      __pyx_t_2 = ((PyObject *)__pyx_v_self);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_3 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_as_buffer, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 924, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_v_buffer = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "pyarrow/scalar.pxi":925
 *         """
 *         buffer = self.as_buffer()
 *         return None if buffer is None else str(buffer, 'utf8')             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_4 = (__pyx_v_buffer == Py_None);
      if (__pyx_t_4) {
        __Pyx_INCREF(Py_None);
        __pyx_t_1 = Py_None;
      } else {
        __pyx_t_5 = NULL;
        __pyx_t_3 = 1;
        {
          PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_v_buffer, __pyx_mstate_global->__pyx_n_u_utf8};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(&PyUnicode_Type), __pyx_callargs+__pyx_t_3, (3-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 925, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __pyx_t_1 = __pyx_t_2;
        __pyx_t_2 = 0;
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/scalar.pxi":914
 *     """
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return this value as a Python string.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_AddTraceback("pyarrow.lib.StringScalar.as_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_buffer);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/scalar.pxi":945
 *     """
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def values(self):
 *         cdef CBaseListScalar* sp = <CBaseListScalar*> self.wrapped.get()
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_10ListScalar_6values_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_10ListScalar_6values_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_10ListScalar_6values___get__(((struct __pyx_obj_7pyarrow_3lib_ListScalar *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_10ListScalar_6values___get__(struct __pyx_obj_7pyarrow_3lib_ListScalar *__pyx_v_self) {
       arrow::BaseListScalar *__pyx_v_sp;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      int __pyx_t_1;
      PyObject *__pyx_t_2 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__get__", 0);

      /* "pyarrow/scalar.pxi":947
 *     @property
 *     def values(self):
 *         cdef CBaseListScalar* sp = <CBaseListScalar*> self.wrapped.get()             # <<<<<<<<<<<<<<
 *         if sp.is_valid:
 *             return pyarrow_wrap_array(sp.value)
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "wrapped");
        __PYX_ERR(3, 947, __pyx_L1_error)
      }
      __pyx_v_sp = (( arrow::BaseListScalar *)__pyx_v_self->__pyx_base.wrapped.get());

      /* "pyarrow/scalar.pxi":948
 *     def values(self):
 *         cdef CBaseListScalar* sp = <CBaseListScalar*> self.wrapped.get()
 *         if sp.is_valid:             # <<<<<<<<<<<<<<
 *             return pyarrow_wrap_array(sp.value)
 *         else:
*/
      __pyx_t_1 = (__pyx_v_sp->is_valid != 0);
      if (__pyx_t_1) {

        /* "pyarrow/scalar.pxi":949
 *         cdef CBaseListScalar* sp = <CBaseListScalar*> self.wrapped.get()
 *         if sp.is_valid:
 *             return pyarrow_wrap_array(sp.value)             # <<<<<<<<<<<<<<
 *         else:
 *             return None
*/
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_2 = pyarrow_wrap_array(__pyx_v_sp->value); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 949, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        goto __pyx_L0;

        /* "pyarrow/scalar.pxi":948
 *     def values(self):
 *         cdef CBaseListScalar* sp = <CBaseListScalar*> self.wrapped.get()
 *         if sp.is_valid:             # <<<<<<<<<<<<<<
 *             return pyarrow_wrap_array(sp.value)
 *         else:
*/
      }

      /* "pyarrow/scalar.pxi":951
 *             return pyarrow_wrap_array(sp.value)
 *         else:
 *             return None             # <<<<<<<<<<<<<<
 * 
 *     def __len__(self):
*/
      /*else*/ {
        __Pyx_XDECREF(__pyx_r);
        __pyx_r = Py_None; __Pyx_INCREF(Py_None);
        goto __pyx_L0;
      }

      /* "pyarrow/scalar.pxi":945
 *     """
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def values(self):
 *         cdef CBaseListScalar* sp = <CBaseListScalar*> self.wrapped.get()
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_AddTraceback("pyarrow.lib.ListScalar.values.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/scalar.pxi":953
 *             return None
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the number of values.
*/

    /* Python wrapper */
    static Py_ssize_t __pyx_pw_7pyarrow_3lib_10ListScalar_1__len__(PyObject *__pyx_v_self); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_10ListScalar___len__, "ListScalar.__len__(self)\n\nReturn the number of values.");
    #if CYTHON_UPDATE_DESCRIPTOR_DOC
    struct wrapperbase __pyx_wrapperbase_7pyarrow_3lib_10ListScalar___len__;
    #endif
    static Py_ssize_t __pyx_pw_7pyarrow_3lib_10ListScalar_1__len__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      Py_ssize_t __pyx_r;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_10ListScalar___len__(((struct __pyx_obj_7pyarrow_3lib_ListScalar *)__pyx_v_self));

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

    static Py_ssize_t __pyx_pf_7pyarrow_3lib_10ListScalar___len__(struct __pyx_obj_7pyarrow_3lib_ListScalar *__pyx_v_self) {
      Py_ssize_t __pyx_r;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      Py_ssize_t __pyx_t_2;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__len__", 0);

      /* "pyarrow/scalar.pxi":957
 *         Return the number of values.
 *         """
 *         return len(self.values)             # <<<<<<<<<<<<<<
 * 
 *     def __getitem__(self, i):
*/
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_values); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 957, __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(3, 957, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_r = __pyx_t_2;
      goto __pyx_L0;

      /* "pyarrow/scalar.pxi":953
 *             return None
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the number of values.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("pyarrow.lib.ListScalar.__len__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = -1;
      __pyx_L0:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/scalar.pxi":959
 *         return len(self.values)
 * 
 *     def __getitem__(self, i):             # <<<<<<<<<<<<<<
 *         """
 *         Return the value at the given index.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_10ListScalar_3__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_i); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_10ListScalar_2__getitem__, "ListScalar.__getitem__(self, i)\n\nReturn the value at the given index.");
    #if CYTHON_UPDATE_DESCRIPTOR_DOC
    struct wrapperbase __pyx_wrapperbase_7pyarrow_3lib_10ListScalar_2__getitem__;
    #endif
    static PyObject *__pyx_pw_7pyarrow_3lib_10ListScalar_3__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_i) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_10ListScalar_2__getitem__(((struct __pyx_obj_7pyarrow_3lib_ListScalar *)__pyx_v_self), ((PyObject *)__pyx_v_i));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_10ListScalar_2__getitem__(struct __pyx_obj_7pyarrow_3lib_ListScalar *__pyx_v_self, PyObject *__pyx_v_i) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      Py_ssize_t __pyx_t_2;
      Py_ssize_t __pyx_t_3;
      Py_ssize_t __pyx_t_4;
      PyObject *__pyx_t_5 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__getitem__", 0);

      /* "pyarrow/scalar.pxi":963
 *         Return the value at the given index.
 *         """
 *         return self.values[_normalize_index(i, len(self))]             # <<<<<<<<<<<<<<
 * 
 *     def __iter__(self):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_values); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 963, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (unlikely(__pyx_t_1 == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(3, 963, __pyx_L1_error)
      }
      __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 963, __pyx_L1_error)
      __pyx_t_3 = PyObject_Length(((PyObject *)__pyx_v_self)); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(3, 963, __pyx_L1_error)
      __pyx_t_4 = __pyx_f_7pyarrow_3lib__normalize_index(__pyx_t_2, __pyx_t_3); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1L))) __PYX_ERR(3, 963, __pyx_L1_error)
      __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_1, __pyx_t_4, Py_ssize_t, 1, PyLong_FromSsize_t, 0, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 963, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_r = __pyx_t_5;
      __pyx_t_5 = 0;
      goto __pyx_L0;

      /* "pyarrow/scalar.pxi":959
 *         return len(self.values)
 * 
 *     def __getitem__(self, i):             # <<<<<<<<<<<<<<
 *         """
 *         Return the value at the given index.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_AddTraceback("pyarrow.lib.ListScalar.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/scalar.pxi":965
 *         return self.values[_normalize_index(i, len(self))]
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterate over this element's values.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_10ListScalar_5__iter__(PyObject *__pyx_v_self); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_10ListScalar_4__iter__, "ListScalar.__iter__(self)\n\nIterate over this element's values.");
    #if CYTHON_UPDATE_DESCRIPTOR_DOC
    struct wrapperbase __pyx_wrapperbase_7pyarrow_3lib_10ListScalar_4__iter__;
    #endif
    static PyObject *__pyx_pw_7pyarrow_3lib_10ListScalar_5__iter__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_10ListScalar_4__iter__(((struct __pyx_obj_7pyarrow_3lib_ListScalar *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_10ListScalar_4__iter__(struct __pyx_obj_7pyarrow_3lib_ListScalar *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__iter__", 0);

      /* "pyarrow/scalar.pxi":969
 *         Iterate over this element's values.
 *         """
 *         return iter(self.values)             # <<<<<<<<<<<<<<
 * 
 *     def as_py(self, *, maps_as_pydicts=None):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_values); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 969, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 969, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;

      /* "pyarrow/scalar.pxi":965
 *         return self.values[_normalize_index(i, len(self))]
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterate over this element's values.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_AddTraceback("pyarrow.lib.ListScalar.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/scalar.pxi":971
 *         return iter(self.values)
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return this value as a Python list.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_10ListScalar_7as_py(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_10ListScalar_6as_py, "ListScalar.as_py(self, *, maps_as_pydicts=None)\n\nReturn this value as a Python list.\n\nParameters\n----------\nmaps_as_pydicts : str, optional, default `None`\n    Valid values are `None`, 'lossy', or 'strict'.\n    The default behavior (`None`), is to convert Arrow Map arrays to\n    Python association lists (list-of-tuples) in the same order as the\n    Arrow Map, as in [(key1, value1), (key2, value2), ...].\n\n    If 'lossy' or 'strict', convert Arrow Map arrays to native Python dicts.\n\n    If 'lossy', whenever duplicate keys are detected, a warning will be printed.\n    The last seen value of a duplicate key will be in the Python dictionary.\n    If 'strict', this instead results in an exception being raised when detected.");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_10ListScalar_7as_py = {"as_py", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10ListScalar_7as_py, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10ListScalar_6as_py};
    static PyObject *__pyx_pw_7pyarrow_3lib_10ListScalar_7as_py(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_maps_as_pydicts = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("as_py (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_maps_as_pydicts,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(3, 971, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, 0, __pyx_kwds_len, "as_py", 0) < (0)) __PYX_ERR(3, 971, __pyx_L3_error)
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
        } else if (unlikely(__pyx_nargs != 0)) {
          goto __pyx_L5_argtuple_error;
        } else {
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
        }
        __pyx_v_maps_as_pydicts = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("as_py", 1, 0, 0, __pyx_nargs); __PYX_ERR(3, 971, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.ListScalar.as_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_10ListScalar_6as_py(((struct __pyx_obj_7pyarrow_3lib_ListScalar *)__pyx_v_self), __pyx_v_maps_as_pydicts);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_10ListScalar_6as_py(struct __pyx_obj_7pyarrow_3lib_ListScalar *__pyx_v_self, PyObject *__pyx_v_maps_as_pydicts) {
      PyObject *__pyx_v_arr = NULL;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_t_2;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      size_t __pyx_t_5;
      PyObject *__pyx_t_6 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("as_py", 0);

      /* "pyarrow/scalar.pxi":989
 *             If 'strict', this instead results in an exception being raised when detected.
 *         """
 *         arr = self.values             # <<<<<<<<<<<<<<
 *         return None if arr is None else arr.to_pylist(maps_as_pydicts=maps_as_pydicts)
 * 
*/
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_values); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 989, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_v_arr = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "pyarrow/scalar.pxi":990
 *         """
 *         arr = self.values
 *         return None if arr is None else arr.to_pylist(maps_as_pydicts=maps_as_pydicts)             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = (__pyx_v_arr == Py_None);
      if (__pyx_t_2) {
        __Pyx_INCREF(Py_None);
        __pyx_t_1 = Py_None;
      } else {
        __pyx_t_4 = __pyx_v_arr;
        __Pyx_INCREF(__pyx_t_4);
        __pyx_t_5 = 0;
        {
          PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_4, NULL};
          __pyx_t_6 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 990, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_maps_as_pydicts, __pyx_v_maps_as_pydicts, __pyx_t_6, __pyx_callargs+1, 0) < (0)) __PYX_ERR(3, 990, __pyx_L1_error)
          __pyx_t_3 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_to_pylist, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_6);
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 990, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        __pyx_t_1 = __pyx_t_3;
        __pyx_t_3 = 0;
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/scalar.pxi":971
 *         return iter(self.values)
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return this value as a Python list.
*/

      /* 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_6);
      __Pyx_AddTraceback("pyarrow.lib.ListScalar.as_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_arr);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/scalar.pxi":1014
 *     """
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         cdef CStructScalar* sp = <CStructScalar*> self.wrapped.get()
 *         return sp.value.size()
*/

    /* Python wrapper */
    static Py_ssize_t __pyx_pw_7pyarrow_3lib_12StructScalar_1__len__(PyObject *__pyx_v_self); /*proto*/
    static Py_ssize_t __pyx_pw_7pyarrow_3lib_12StructScalar_1__len__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      Py_ssize_t __pyx_r;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_12StructScalar___len__(((struct __pyx_obj_7pyarrow_3lib_StructScalar *)__pyx_v_self));

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

    static Py_ssize_t __pyx_pf_7pyarrow_3lib_12StructScalar___len__(struct __pyx_obj_7pyarrow_3lib_StructScalar *__pyx_v_self) {
       arrow::StructScalar *__pyx_v_sp;
      Py_ssize_t __pyx_r;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;

      /* "pyarrow/scalar.pxi":1015
 * 
 *     def __len__(self):
 *         cdef CStructScalar* sp = <CStructScalar*> self.wrapped.get()             # <<<<<<<<<<<<<<
 *         return sp.value.size()
 * 
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "wrapped");
        __PYX_ERR(3, 1015, __pyx_L1_error)
      }
      __pyx_v_sp = (( arrow::StructScalar *)__pyx_v_self->__pyx_base.wrapped.get());

      /* "pyarrow/scalar.pxi":1016
 *     def __len__(self):
 *         cdef CStructScalar* sp = <CStructScalar*> self.wrapped.get()
 *         return sp.value.size()             # <<<<<<<<<<<<<<
 * 
 *     def __iter__(self):
*/
      __pyx_r = __pyx_v_sp->value.size();
      goto __pyx_L0;

      /* "pyarrow/scalar.pxi":1014
 *     """
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         cdef CStructScalar* sp = <CStructScalar*> self.wrapped.get()
 *         return sp.value.size()
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_AddTraceback("pyarrow.lib.StructScalar.__len__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = -1;
      __pyx_L0:;
      return __pyx_r;
    }
    static PyObject *__pyx_gb_7pyarrow_3lib_12StructScalar_4generator6(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

    /* "pyarrow/scalar.pxi":1018
 *         return sp.value.size()
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         cdef:
 *             CStructScalar* sp = <CStructScalar*> self.wrapped.get()
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_12StructScalar_3__iter__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_12StructScalar_3__iter__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_12StructScalar_2__iter__(((struct __pyx_obj_7pyarrow_3lib_StructScalar *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_12StructScalar_2__iter__(struct __pyx_obj_7pyarrow_3lib_StructScalar *__pyx_v_self) {
      struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_7___iter__ *__pyx_cur_scope;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__iter__", 0);
      __pyx_cur_scope = (struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_7___iter__ *)__pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_7___iter__(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_7___iter__, __pyx_mstate_global->__pyx_empty_tuple, NULL);
      if (unlikely(!__pyx_cur_scope)) {
        __pyx_cur_scope = ((struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_7___iter__ *)Py_None);
        __Pyx_INCREF(Py_None);
        __PYX_ERR(3, 1018, __pyx_L1_error)
      } else {
        __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
      }
      __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
      __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
      __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
      {
        __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7pyarrow_3lib_12StructScalar_4generator6, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[7]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_iter, __pyx_mstate_global->__pyx_n_u_StructScalar___iter, __pyx_mstate_global->__pyx_n_u_pyarrow_lib); if (unlikely(!gen)) __PYX_ERR(3, 1018, __pyx_L1_error)
        __Pyx_DECREF(__pyx_cur_scope);
        __Pyx_RefNannyFinishContext();
        return (PyObject *) gen;
      }

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_AddTraceback("pyarrow.lib.StructScalar.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __Pyx_DECREF((PyObject *)__pyx_cur_scope);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_gb_7pyarrow_3lib_12StructScalar_4generator6(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
      struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_7___iter__ *__pyx_cur_scope = ((struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_7___iter__ *)__pyx_generator->closure);
      PyObject *__pyx_r = NULL;
      int __pyx_t_1;
      int __pyx_t_2;
      int __pyx_t_3;
      PyObject *__pyx_t_4 = NULL;
      PyObject *__pyx_t_5 = NULL;
      PyObject *__pyx_t_6 = NULL;
      PyObject *__pyx_t_7 = NULL;
      size_t __pyx_t_8;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__iter__", 0);
      switch (__pyx_generator->resume_label) {
        case 0: goto __pyx_L3_first_run;
        case 1: goto __pyx_L6_resume_from_yield;
        default: /* CPython raises the right error here */
        __Pyx_RefNannyFinishContext();
        return NULL;
      }
      __pyx_L3_first_run:;
      if (unlikely(__pyx_sent_value != Py_None)) {
        if (unlikely(__pyx_sent_value)) PyErr_SetString(PyExc_TypeError, "can't send non-None value to a just-started generator");
        __PYX_ERR(3, 1018, __pyx_L1_error)
      }

      /* "pyarrow/scalar.pxi":1020
 *     def __iter__(self):
 *         cdef:
 *             CStructScalar* sp = <CStructScalar*> self.wrapped.get()             # <<<<<<<<<<<<<<
 *             CStructType* dtype = <CStructType*> sp.type.get()
 *             vector[shared_ptr[CField]] fields = dtype.fields()
*/
      if (unlikely(((PyObject *)__pyx_cur_scope->__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "wrapped");
        __PYX_ERR(3, 1020, __pyx_L1_error)
      }
      __pyx_cur_scope->__pyx_v_sp = (( arrow::StructScalar *)__pyx_cur_scope->__pyx_v_self->__pyx_base.wrapped.get());

      /* "pyarrow/scalar.pxi":1021
 *         cdef:
 *             CStructScalar* sp = <CStructScalar*> self.wrapped.get()
 *             CStructType* dtype = <CStructType*> sp.type.get()             # <<<<<<<<<<<<<<
 *             vector[shared_ptr[CField]] fields = dtype.fields()
 * 
*/
      __pyx_cur_scope->__pyx_v_dtype = (( arrow::StructType *)__pyx_cur_scope->__pyx_v_sp->type.get());

      /* "pyarrow/scalar.pxi":1022
 *             CStructScalar* sp = <CStructScalar*> self.wrapped.get()
 *             CStructType* dtype = <CStructType*> sp.type.get()
 *             vector[shared_ptr[CField]] fields = dtype.fields()             # <<<<<<<<<<<<<<
 * 
 *         for i in range(dtype.num_fields()):
*/
      __pyx_cur_scope->__pyx_v_fields = __pyx_cur_scope->__pyx_v_dtype->fields();

      /* "pyarrow/scalar.pxi":1024
 *             vector[shared_ptr[CField]] fields = dtype.fields()
 * 
 *         for i in range(dtype.num_fields()):             # <<<<<<<<<<<<<<
 *             yield frombytes(fields[i].get().name())
 * 
*/
      __pyx_t_1 = __pyx_cur_scope->__pyx_v_dtype->num_fields();
      __pyx_t_2 = __pyx_t_1;
      for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
        __pyx_cur_scope->__pyx_v_i = __pyx_t_3;

        /* "pyarrow/scalar.pxi":1025
 * 
 *         for i in range(dtype.num_fields()):
 *             yield frombytes(fields[i].get().name())             # <<<<<<<<<<<<<<
 * 
 *     def items(self):
*/
        __pyx_t_5 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_frombytes); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1025, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_7 = __pyx_convert_PyBytes_string_to_py_6libcpp_6string_std__in_string((__pyx_cur_scope->__pyx_v_fields[__pyx_cur_scope->__pyx_v_i]).get()->name()); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1025, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_8 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_6))) {
          __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
          assert(__pyx_t_5);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
          __pyx_t_8 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_7};
          __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1025, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
        }
        __pyx_r = __pyx_t_4;
        __pyx_t_4 = 0;
        __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
        __pyx_cur_scope->__pyx_t_1 = __pyx_t_2;
        __pyx_cur_scope->__pyx_t_2 = __pyx_t_3;
        __Pyx_XGIVEREF(__pyx_r);
        __Pyx_RefNannyFinishContext();
        __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
        /* return from generator, yielding value */
        __pyx_generator->resume_label = 1;
        return __pyx_r;
        __pyx_L6_resume_from_yield:;
        __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
        __pyx_t_2 = __pyx_cur_scope->__pyx_t_1;
        __pyx_t_3 = __pyx_cur_scope->__pyx_t_2;
        if (unlikely(!__pyx_sent_value)) __PYX_ERR(3, 1025, __pyx_L1_error)
      }
      CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

      /* "pyarrow/scalar.pxi":1018
 *         return sp.value.size()
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         cdef:
 *             CStructScalar* sp = <CStructScalar*> self.wrapped.get()
*/

      /* function exit code */
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_7);
      if (__Pyx_PyErr_Occurred()) {
        __Pyx_Generator_Replace_StopIteration(0);
        __Pyx_AddTraceback("__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      }
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      #if !CYTHON_USE_EXC_INFO_STACK
      __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
      #endif
      __pyx_generator->resume_label = -1;
      __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/scalar.pxi":1027
 *             yield frombytes(fields[i].get().name())
 * 
 *     def items(self):             # <<<<<<<<<<<<<<
 *         return ((key, self[i]) for i, key in enumerate(self))
 * 
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_12StructScalar_6items(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_12StructScalar_5items, "StructScalar.items(self)");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_12StructScalar_6items = {"items", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12StructScalar_6items, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12StructScalar_5items};
    static PyObject *__pyx_pw_7pyarrow_3lib_12StructScalar_6items(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("items (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("items", 1, 0, 0, __pyx_nargs); return NULL; }
      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
      if (unlikely(__pyx_kwds_len < 0)) return NULL;
      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("items", __pyx_kwds); return NULL;}
      __pyx_r = __pyx_pf_7pyarrow_3lib_12StructScalar_5items(((struct __pyx_obj_7pyarrow_3lib_StructScalar *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }
    static PyObject *__pyx_gb_7pyarrow_3lib_12StructScalar_5items_2generator14(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

    /* "pyarrow/scalar.pxi":1028
 * 
 *     def items(self):
 *         return ((key, self[i]) for i, key in enumerate(self))             # <<<<<<<<<<<<<<
 * 
 *     def __contains__(self, key):
*/

    static PyObject *__pyx_pf_7pyarrow_3lib_12StructScalar_5items_genexpr(PyObject *__pyx_self, struct __pyx_obj_7pyarrow_3lib_StructScalar *__pyx_genexpr_arg_0) {
      struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_9_genexpr *__pyx_cur_scope;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("genexpr", 0);
      __pyx_cur_scope = (struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_9_genexpr *)__pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_9_genexpr(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_9_genexpr, __pyx_mstate_global->__pyx_empty_tuple, NULL);
      if (unlikely(!__pyx_cur_scope)) {
        __pyx_cur_scope = ((struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_9_genexpr *)Py_None);
        __Pyx_INCREF(Py_None);
        __PYX_ERR(3, 1028, __pyx_L1_error)
      } else {
        __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
      }
      __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_8_items *) __pyx_self;
      __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_outer_scope);
      __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_outer_scope);
      __pyx_cur_scope->__pyx_genexpr_arg_0 = __pyx_genexpr_arg_0;
      __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_genexpr_arg_0);
      __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_genexpr_arg_0);
      {
        __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7pyarrow_3lib_12StructScalar_5items_2generator14, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[8]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_items_locals_genexpr, __pyx_mstate_global->__pyx_n_u_pyarrow_lib); if (unlikely(!gen)) __PYX_ERR(3, 1028, __pyx_L1_error)
        __Pyx_DECREF(__pyx_cur_scope);
        __Pyx_RefNannyFinishContext();
        return (PyObject *) gen;
      }

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_AddTraceback("pyarrow.lib.StructScalar.items.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __Pyx_DECREF((PyObject *)__pyx_cur_scope);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_gb_7pyarrow_3lib_12StructScalar_5items_2generator14(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
      struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_9_genexpr *__pyx_cur_scope = ((struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_9_genexpr *)__pyx_generator->closure);
      PyObject *__pyx_r = NULL;
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      Py_ssize_t __pyx_t_3;
      PyObject *(*__pyx_t_4)(PyObject *);
      PyObject *__pyx_t_5 = NULL;
      PyObject *__pyx_t_6 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("genexpr", 0);
      switch (__pyx_generator->resume_label) {
        case 0: goto __pyx_L3_first_run;
        case 1: goto __pyx_L6_resume_from_yield;
        default: /* CPython raises the right error here */
        __Pyx_RefNannyFinishContext();
        return NULL;
      }
      __pyx_L3_first_run:;
      if (unlikely(__pyx_sent_value != Py_None)) {
        if (unlikely(__pyx_sent_value)) PyErr_SetString(PyExc_TypeError, "can't send non-None value to a just-started generator");
        __PYX_ERR(3, 1028, __pyx_L1_error)
      }
      __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0);
      __pyx_t_1 = __pyx_mstate_global->__pyx_int_0;
      if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(3, 1028, __pyx_L1_error) }
      if (likely(PyList_CheckExact(((PyObject *)__pyx_cur_scope->__pyx_genexpr_arg_0))) || PyTuple_CheckExact(((PyObject *)__pyx_cur_scope->__pyx_genexpr_arg_0))) {
        __pyx_t_2 = ((PyObject *)__pyx_cur_scope->__pyx_genexpr_arg_0); __Pyx_INCREF(__pyx_t_2);
        __pyx_t_3 = 0;
        __pyx_t_4 = NULL;
      } else {
        __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(((PyObject *)__pyx_cur_scope->__pyx_genexpr_arg_0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1028, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_4 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1028, __pyx_L1_error)
      }
      for (;;) {
        if (likely(!__pyx_t_4)) {
          if (likely(PyList_CheckExact(__pyx_t_2))) {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2);
              #if !CYTHON_ASSUME_SAFE_SIZE
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(3, 1028, __pyx_L1_error)
              #endif
              if (__pyx_t_3 >= __pyx_temp) break;
            }
            __pyx_t_5 = __Pyx_PyList_GetItemRefFast(__pyx_t_2, __pyx_t_3, __Pyx_ReferenceSharing_OwnStrongReference);
            ++__pyx_t_3;
          } else {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2);
              #if !CYTHON_ASSUME_SAFE_SIZE
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(3, 1028, __pyx_L1_error)
              #endif
              if (__pyx_t_3 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_5 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3));
            #else
            __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_3);
            #endif
            ++__pyx_t_3;
          }
          if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1028, __pyx_L1_error)
        } else {
          __pyx_t_5 = __pyx_t_4(__pyx_t_2);
          if (unlikely(!__pyx_t_5)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(3, 1028, __pyx_L1_error)
              PyErr_Clear();
            }
            break;
          }
        }
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_key);
        __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_key, __pyx_t_5);
        __Pyx_GIVEREF(__pyx_t_5);
        __pyx_t_5 = 0;
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_i);
        __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_i, __pyx_t_1);
        __Pyx_GIVEREF(__pyx_t_1);
        __pyx_t_5 = __Pyx_PyLong_AddObjC(__pyx_t_1, __pyx_mstate_global->__pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1028, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_1);
        __pyx_t_1 = __pyx_t_5;
        __pyx_t_5 = 0;
        if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(3, 1028, __pyx_L1_error) }
        if (unlikely(((PyObject *)__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self) == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
          __PYX_ERR(3, 1028, __pyx_L1_error)
        }
        __pyx_t_5 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self), __pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1028, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1028, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_INCREF(__pyx_cur_scope->__pyx_v_key);
        __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_key);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_cur_scope->__pyx_v_key) != (0)) __PYX_ERR(3, 1028, __pyx_L1_error);
        __Pyx_GIVEREF(__pyx_t_5);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_5) != (0)) __PYX_ERR(3, 1028, __pyx_L1_error);
        __pyx_t_5 = 0;
        __pyx_r = __pyx_t_6;
        __pyx_t_6 = 0;
        __Pyx_XGIVEREF(__pyx_t_1);
        __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
        __Pyx_XGIVEREF(__pyx_t_2);
        __pyx_cur_scope->__pyx_t_1 = __pyx_t_2;
        __pyx_cur_scope->__pyx_t_2 = __pyx_t_3;
        __pyx_cur_scope->__pyx_t_3 = __pyx_t_4;
        __Pyx_XGIVEREF(__pyx_r);
        __Pyx_RefNannyFinishContext();
        __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
        /* return from generator, yielding value */
        __pyx_generator->resume_label = 1;
        return __pyx_r;
        __pyx_L6_resume_from_yield:;
        __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
        __pyx_cur_scope->__pyx_t_0 = 0;
        __Pyx_XGOTREF(__pyx_t_1);
        __pyx_t_2 = __pyx_cur_scope->__pyx_t_1;
        __pyx_cur_scope->__pyx_t_1 = 0;
        __Pyx_XGOTREF(__pyx_t_2);
        __pyx_t_3 = __pyx_cur_scope->__pyx_t_2;
        __pyx_t_4 = __pyx_cur_scope->__pyx_t_3;
        if (unlikely(!__pyx_sent_value)) __PYX_ERR(3, 1028, __pyx_L1_error)
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

      /* 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);
      if (__Pyx_PyErr_Occurred()) {
        __Pyx_Generator_Replace_StopIteration(0);
        __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
      }
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      #if !CYTHON_USE_EXC_INFO_STACK
      __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
      #endif
      __pyx_generator->resume_label = -1;
      __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/scalar.pxi":1027
 *             yield frombytes(fields[i].get().name())
 * 
 *     def items(self):             # <<<<<<<<<<<<<<
 *         return ((key, self[i]) for i, key in enumerate(self))
 * 
*/

    static PyObject *__pyx_pf_7pyarrow_3lib_12StructScalar_5items(struct __pyx_obj_7pyarrow_3lib_StructScalar *__pyx_v_self) {
      struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_8_items *__pyx_cur_scope;
      PyObject *__pyx_gb_7pyarrow_3lib_12StructScalar_5items_2generator14 = 0;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("items", 0);
      __pyx_cur_scope = (struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_8_items *)__pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_8_items(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_8_items, __pyx_mstate_global->__pyx_empty_tuple, NULL);
      if (unlikely(!__pyx_cur_scope)) {
        __pyx_cur_scope = ((struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_8_items *)Py_None);
        __Pyx_INCREF(Py_None);
        __PYX_ERR(3, 1027, __pyx_L1_error)
      } else {
        __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
      }
      __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
      __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
      __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);

      /* "pyarrow/scalar.pxi":1028
 * 
 *     def items(self):
 *         return ((key, self[i]) for i, key in enumerate(self))             # <<<<<<<<<<<<<<
 * 
 *     def __contains__(self, key):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __pyx_pf_7pyarrow_3lib_12StructScalar_5items_genexpr(((PyObject*)__pyx_cur_scope), __pyx_cur_scope->__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1028, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/scalar.pxi":1027
 *             yield frombytes(fields[i].get().name())
 * 
 *     def items(self):             # <<<<<<<<<<<<<<
 *         return ((key, self[i]) for i, key in enumerate(self))
 * 
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("pyarrow.lib.StructScalar.items", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_gb_7pyarrow_3lib_12StructScalar_5items_2generator14);
      __Pyx_DECREF((PyObject *)__pyx_cur_scope);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/scalar.pxi":1030
 *         return ((key, self[i]) for i, key in enumerate(self))
 * 
 *     def __contains__(self, key):             # <<<<<<<<<<<<<<
 *         return key in list(self)
 * 
*/

    /* Python wrapper */
    static int __pyx_pw_7pyarrow_3lib_12StructScalar_8__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
    static int __pyx_pw_7pyarrow_3lib_12StructScalar_8__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      int __pyx_r;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__contains__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_12StructScalar_7__contains__(((struct __pyx_obj_7pyarrow_3lib_StructScalar *)__pyx_v_self), ((PyObject *)__pyx_v_key));

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

    static int __pyx_pf_7pyarrow_3lib_12StructScalar_7__contains__(struct __pyx_obj_7pyarrow_3lib_StructScalar *__pyx_v_self, PyObject *__pyx_v_key) {
      int __pyx_r;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_t_2;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__contains__", 0);

      /* "pyarrow/scalar.pxi":1031
 * 
 *     def __contains__(self, key):
 *         return key in list(self)             # <<<<<<<<<<<<<<
 * 
 *     def __getitem__(self, key):
*/
      __pyx_t_1 = PySequence_List(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1031, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_v_key, __pyx_t_1, Py_EQ)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(3, 1031, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_r = __pyx_t_2;
      goto __pyx_L0;

      /* "pyarrow/scalar.pxi":1030
 *         return ((key, self[i]) for i, key in enumerate(self))
 * 
 *     def __contains__(self, key):             # <<<<<<<<<<<<<<
 *         return key in list(self)
 * 
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("pyarrow.lib.StructScalar.__contains__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = -1;
      __pyx_L0:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/scalar.pxi":1033
 *         return key in list(self)
 * 
 *     def __getitem__(self, key):             # <<<<<<<<<<<<<<
 *         """
 *         Return the child value for the given field.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_12StructScalar_10__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_12StructScalar_9__getitem__, "StructScalar.__getitem__(self, key)\n\nReturn the child value for the given field.\n\nParameters\n----------\nindex : Union[int, str]\n    Index / position or name of the field.\n\nReturns\n-------\nresult : Scalar");
    #if CYTHON_UPDATE_DESCRIPTOR_DOC
    struct wrapperbase __pyx_wrapperbase_7pyarrow_3lib_12StructScalar_9__getitem__;
    #endif
    static PyObject *__pyx_pw_7pyarrow_3lib_12StructScalar_10__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_12StructScalar_9__getitem__(((struct __pyx_obj_7pyarrow_3lib_StructScalar *)__pyx_v_self), ((PyObject *)__pyx_v_key));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_12StructScalar_9__getitem__(struct __pyx_obj_7pyarrow_3lib_StructScalar *__pyx_v_self, PyObject *__pyx_v_key) {
       arrow::FieldRef __pyx_v_ref;
       arrow::StructScalar *__pyx_v_sp;
      PyObject *__pyx_v_exc = NULL;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      int __pyx_t_1;
      int __pyx_t_2;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      PyObject *__pyx_t_5 = NULL;
      size_t __pyx_t_6;
      std::string __pyx_t_7;
      int __pyx_t_8;
      PyObject *__pyx_t_9 = NULL;
      PyObject *__pyx_t_10 = NULL;
      PyObject *__pyx_t_11 = NULL;
      std::shared_ptr< arrow::Scalar>  __pyx_t_12;
      PyObject *__pyx_t_13 = NULL;
      PyObject *__pyx_t_14 = NULL;
      int __pyx_t_15;
      char const *__pyx_t_16;
      PyObject *__pyx_t_17 = NULL;
      PyObject *__pyx_t_18 = NULL;
      PyObject *__pyx_t_19 = NULL;
      PyObject *__pyx_t_20 = NULL;
      PyObject *__pyx_t_21 = NULL;
      PyObject *__pyx_t_22 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__getitem__", 0);

      /* "pyarrow/scalar.pxi":1048
 *         cdef:
 *             CFieldRef ref
 *             CStructScalar* sp = <CStructScalar*> self.wrapped.get()             # <<<<<<<<<<<<<<
 * 
 *         if isinstance(key, (bytes, str)):
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "wrapped");
        __PYX_ERR(3, 1048, __pyx_L1_error)
      }
      __pyx_v_sp = (( arrow::StructScalar *)__pyx_v_self->__pyx_base.wrapped.get());

      /* "pyarrow/scalar.pxi":1050
 *             CStructScalar* sp = <CStructScalar*> self.wrapped.get()
 * 
 *         if isinstance(key, (bytes, str)):             # <<<<<<<<<<<<<<
 *             ref = CFieldRef(<c_string> tobytes(key))
 *         elif isinstance(key, int):
*/
      __pyx_t_2 = PyBytes_Check(__pyx_v_key); 
      if (!__pyx_t_2) {
      } else {
        __pyx_t_1 = __pyx_t_2;
        goto __pyx_L4_bool_binop_done;
      }
      __pyx_t_2 = PyUnicode_Check(__pyx_v_key); 
      __pyx_t_1 = __pyx_t_2;
      __pyx_L4_bool_binop_done:;
      if (__pyx_t_1) {

        /* "pyarrow/scalar.pxi":1051
 * 
 *         if isinstance(key, (bytes, str)):
 *             ref = CFieldRef(<c_string> tobytes(key))             # <<<<<<<<<<<<<<
 *         elif isinstance(key, int):
 *             ref = CFieldRef(<int> key)
*/
        __pyx_t_4 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_tobytes); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1051, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_6 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
          assert(__pyx_t_4);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
          __pyx_t_6 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_key};
          __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1051, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        __pyx_t_7 = __pyx_convert_string_from_py_6libcpp_6string_std__in_string(__pyx_t_3); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1051, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_v_ref =  arrow::FieldRef(((std::string)__pyx_t_7));

        /* "pyarrow/scalar.pxi":1050
 *             CStructScalar* sp = <CStructScalar*> self.wrapped.get()
 * 
 *         if isinstance(key, (bytes, str)):             # <<<<<<<<<<<<<<
 *             ref = CFieldRef(<c_string> tobytes(key))
 *         elif isinstance(key, int):
*/
        goto __pyx_L3;
      }

      /* "pyarrow/scalar.pxi":1052
 *         if isinstance(key, (bytes, str)):
 *             ref = CFieldRef(<c_string> tobytes(key))
 *         elif isinstance(key, int):             # <<<<<<<<<<<<<<
 *             ref = CFieldRef(<int> key)
 *         else:
*/
      __pyx_t_1 = PyLong_Check(__pyx_v_key); 
      if (likely(__pyx_t_1)) {

        /* "pyarrow/scalar.pxi":1053
 *             ref = CFieldRef(<c_string> tobytes(key))
 *         elif isinstance(key, int):
 *             ref = CFieldRef(<int> key)             # <<<<<<<<<<<<<<
 *         else:
 *             raise TypeError('Expected integer or string index')
*/
        __pyx_t_8 = __Pyx_PyLong_As_int(__pyx_v_key); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 1053, __pyx_L1_error)
        __pyx_v_ref =  arrow::FieldRef(((int)__pyx_t_8));

        /* "pyarrow/scalar.pxi":1052
 *         if isinstance(key, (bytes, str)):
 *             ref = CFieldRef(<c_string> tobytes(key))
 *         elif isinstance(key, int):             # <<<<<<<<<<<<<<
 *             ref = CFieldRef(<int> key)
 *         else:
*/
        goto __pyx_L3;
      }

      /* "pyarrow/scalar.pxi":1055
 *             ref = CFieldRef(<int> key)
 *         else:
 *             raise TypeError('Expected integer or string index')             # <<<<<<<<<<<<<<
 * 
 *         try:
*/
      /*else*/ {
        __pyx_t_5 = NULL;
        __pyx_t_6 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_Expected_integer_or_string_index};
          __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1055, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        __Pyx_Raise(__pyx_t_3, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __PYX_ERR(3, 1055, __pyx_L1_error)
      }
      __pyx_L3:;

      /* "pyarrow/scalar.pxi":1057
 *             raise TypeError('Expected integer or string index')
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             return Scalar.wrap(GetResultValue(sp.field(ref)))
 *         except ArrowInvalid as exc:
*/
      {
        __Pyx_PyThreadState_declare
        __Pyx_PyThreadState_assign
        __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
        __Pyx_XGOTREF(__pyx_t_9);
        __Pyx_XGOTREF(__pyx_t_10);
        __Pyx_XGOTREF(__pyx_t_11);
        /*try:*/ {

          /* "pyarrow/scalar.pxi":1058
 * 
 *         try:
 *             return Scalar.wrap(GetResultValue(sp.field(ref)))             # <<<<<<<<<<<<<<
 *         except ArrowInvalid as exc:
 *             if isinstance(key, int):
*/
          __Pyx_XDECREF(__pyx_r);
          __pyx_t_12 = arrow::py::GetResultValue<std::shared_ptr< arrow::Scalar> >(__pyx_v_sp->field(__pyx_v_ref)); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1058, __pyx_L6_error)
          __pyx_t_3 = __pyx_f_7pyarrow_3lib_6Scalar_wrap(__pyx_t_12); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1058, __pyx_L6_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_r = __pyx_t_3;
          __pyx_t_3 = 0;
          goto __pyx_L10_try_return;

          /* "pyarrow/scalar.pxi":1057
 *             raise TypeError('Expected integer or string index')
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             return Scalar.wrap(GetResultValue(sp.field(ref)))
 *         except ArrowInvalid as exc:
*/
        }
        __pyx_L6_error:;
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

        /* "pyarrow/scalar.pxi":1059
 *         try:
 *             return Scalar.wrap(GetResultValue(sp.field(ref)))
 *         except ArrowInvalid as exc:             # <<<<<<<<<<<<<<
 *             if isinstance(key, int):
 *                 raise IndexError(key) from exc
*/
        __Pyx_ErrFetch(&__pyx_t_3, &__pyx_t_5, &__pyx_t_4);
        __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_ArrowInvalid); if (unlikely(!__pyx_t_13)) __PYX_ERR(3, 1059, __pyx_L8_except_error)
        __Pyx_GOTREF(__pyx_t_13);
        __pyx_t_8 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_3, __pyx_t_13);
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        __Pyx_ErrRestore(__pyx_t_3, __pyx_t_5, __pyx_t_4);
        __pyx_t_3 = 0; __pyx_t_5 = 0; __pyx_t_4 = 0;
        if (__pyx_t_8) {
          __Pyx_AddTraceback("pyarrow.lib.StructScalar.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_3) < 0) __PYX_ERR(3, 1059, __pyx_L8_except_error)
          __Pyx_XGOTREF(__pyx_t_4);
          __Pyx_XGOTREF(__pyx_t_5);
          __Pyx_XGOTREF(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_5);
          __pyx_v_exc = __pyx_t_5;
          /*try:*/ {

            /* "pyarrow/scalar.pxi":1060
 *             return Scalar.wrap(GetResultValue(sp.field(ref)))
 *         except ArrowInvalid as exc:
 *             if isinstance(key, int):             # <<<<<<<<<<<<<<
 *                 raise IndexError(key) from exc
 *             else:
*/
            __pyx_t_1 = PyLong_Check(__pyx_v_key); 
            if (unlikely(__pyx_t_1)) {

              /* "pyarrow/scalar.pxi":1061
 *         except ArrowInvalid as exc:
 *             if isinstance(key, int):
 *                 raise IndexError(key) from exc             # <<<<<<<<<<<<<<
 *             else:
 *                 raise KeyError(key) from exc
*/
              __pyx_t_14 = NULL;
              __pyx_t_6 = 1;
              {
                PyObject *__pyx_callargs[2] = {__pyx_t_14, __pyx_v_key};
                __pyx_t_13 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_IndexError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
                if (unlikely(!__pyx_t_13)) __PYX_ERR(3, 1061, __pyx_L17_error)
                __Pyx_GOTREF(__pyx_t_13);
              }
              __Pyx_Raise(__pyx_t_13, 0, 0, __pyx_v_exc);
              __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
              __PYX_ERR(3, 1061, __pyx_L17_error)

              /* "pyarrow/scalar.pxi":1060
 *             return Scalar.wrap(GetResultValue(sp.field(ref)))
 *         except ArrowInvalid as exc:
 *             if isinstance(key, int):             # <<<<<<<<<<<<<<
 *                 raise IndexError(key) from exc
 *             else:
*/
            }

            /* "pyarrow/scalar.pxi":1063
 *                 raise IndexError(key) from exc
 *             else:
 *                 raise KeyError(key) from exc             # <<<<<<<<<<<<<<
 * 
 *     def as_py(self, *, maps_as_pydicts=None):
*/
            /*else*/ {
              __pyx_t_14 = NULL;
              __pyx_t_6 = 1;
              {
                PyObject *__pyx_callargs[2] = {__pyx_t_14, __pyx_v_key};
                __pyx_t_13 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_KeyError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
                if (unlikely(!__pyx_t_13)) __PYX_ERR(3, 1063, __pyx_L17_error)
                __Pyx_GOTREF(__pyx_t_13);
              }
              __Pyx_Raise(__pyx_t_13, 0, 0, __pyx_v_exc);
              __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
              __PYX_ERR(3, 1063, __pyx_L17_error)
            }
          }

          /* "pyarrow/scalar.pxi":1059
 *         try:
 *             return Scalar.wrap(GetResultValue(sp.field(ref)))
 *         except ArrowInvalid as exc:             # <<<<<<<<<<<<<<
 *             if isinstance(key, int):
 *                 raise IndexError(key) from exc
*/
          /*finally:*/ {
            __pyx_L17_error:;
            /*exception exit:*/{
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0;
              __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
              __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
               __Pyx_ExceptionSwap(&__pyx_t_20, &__pyx_t_21, &__pyx_t_22);
              if ( unlikely(__Pyx_GetException(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19) < 0)) __Pyx_ErrFetch(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19);
              __Pyx_XGOTREF(__pyx_t_17);
              __Pyx_XGOTREF(__pyx_t_18);
              __Pyx_XGOTREF(__pyx_t_19);
              __Pyx_XGOTREF(__pyx_t_20);
              __Pyx_XGOTREF(__pyx_t_21);
              __Pyx_XGOTREF(__pyx_t_22);
              __pyx_t_8 = __pyx_lineno; __pyx_t_15 = __pyx_clineno; __pyx_t_16 = __pyx_filename;
              {
                __Pyx_DECREF(__pyx_v_exc); __pyx_v_exc = 0;
              }
              __Pyx_XGIVEREF(__pyx_t_20);
              __Pyx_XGIVEREF(__pyx_t_21);
              __Pyx_XGIVEREF(__pyx_t_22);
              __Pyx_ExceptionReset(__pyx_t_20, __pyx_t_21, __pyx_t_22);
              __Pyx_XGIVEREF(__pyx_t_17);
              __Pyx_XGIVEREF(__pyx_t_18);
              __Pyx_XGIVEREF(__pyx_t_19);
              __Pyx_ErrRestore(__pyx_t_17, __pyx_t_18, __pyx_t_19);
              __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0;
              __pyx_lineno = __pyx_t_8; __pyx_clineno = __pyx_t_15; __pyx_filename = __pyx_t_16;
              goto __pyx_L8_except_error;
            }
          }
        }
        goto __pyx_L8_except_error;

        /* "pyarrow/scalar.pxi":1057
 *             raise TypeError('Expected integer or string index')
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             return Scalar.wrap(GetResultValue(sp.field(ref)))
 *         except ArrowInvalid as exc:
*/
        __pyx_L8_except_error:;
        __Pyx_XGIVEREF(__pyx_t_9);
        __Pyx_XGIVEREF(__pyx_t_10);
        __Pyx_XGIVEREF(__pyx_t_11);
        __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11);
        goto __pyx_L1_error;
        __pyx_L10_try_return:;
        __Pyx_XGIVEREF(__pyx_t_9);
        __Pyx_XGIVEREF(__pyx_t_10);
        __Pyx_XGIVEREF(__pyx_t_11);
        __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11);
        goto __pyx_L0;
      }

      /* "pyarrow/scalar.pxi":1033
 *         return key in list(self)
 * 
 *     def __getitem__(self, key):             # <<<<<<<<<<<<<<
 *         """
 *         Return the child value for the given field.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_13);
      __Pyx_XDECREF(__pyx_t_14);
      __Pyx_AddTraceback("pyarrow.lib.StructScalar.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_exc);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/scalar.pxi":1065
 *                 raise KeyError(key) from exc
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return this value as a Python dict.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_12StructScalar_12as_py(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_12StructScalar_11as_py, "StructScalar.as_py(self, *, maps_as_pydicts=None)\n\nReturn this value as a Python dict.\n\nParameters\n----------\nmaps_as_pydicts : str, optional, default `None`\n    Valid values are `None`, 'lossy', or 'strict'.\n    The default behavior (`None`), is to convert Arrow Map arrays to\n    Python association lists (list-of-tuples) in the same order as the\n    Arrow Map, as in [(key1, value1), (key2, value2), ...].\n\n    If 'lossy' or 'strict', convert Arrow Map arrays to native Python dicts.\n\n    If 'lossy', whenever duplicate keys are detected, a warning will be printed.\n    The last seen value of a duplicate key will be in the Python dictionary.\n    If 'strict', this instead results in an exception being raised when detected.");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_12StructScalar_12as_py = {"as_py", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12StructScalar_12as_py, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12StructScalar_11as_py};
    static PyObject *__pyx_pw_7pyarrow_3lib_12StructScalar_12as_py(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_maps_as_pydicts = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("as_py (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_maps_as_pydicts,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(3, 1065, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, 0, __pyx_kwds_len, "as_py", 0) < (0)) __PYX_ERR(3, 1065, __pyx_L3_error)
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
        } else if (unlikely(__pyx_nargs != 0)) {
          goto __pyx_L5_argtuple_error;
        } else {
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
        }
        __pyx_v_maps_as_pydicts = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("as_py", 1, 0, 0, __pyx_nargs); __PYX_ERR(3, 1065, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.StructScalar.as_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_12StructScalar_11as_py(((struct __pyx_obj_7pyarrow_3lib_StructScalar *)__pyx_v_self), __pyx_v_maps_as_pydicts);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_12StructScalar_11as_py(struct __pyx_obj_7pyarrow_3lib_StructScalar *__pyx_v_self, PyObject *__pyx_v_maps_as_pydicts) {
      PyObject *__pyx_9genexpr11__pyx_v_k = NULL;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_t_2;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      PyObject *__pyx_t_5 = NULL;
      PyObject *__pyx_t_6 = NULL;
      Py_ssize_t __pyx_t_7;
      Py_ssize_t __pyx_t_8;
      int __pyx_t_9;
      PyObject *__pyx_t_10 = NULL;
      int __pyx_t_11;
      PyObject *__pyx_t_12 = NULL;
      PyObject *__pyx_t_13 = NULL;
      size_t __pyx_t_14;
      PyObject *__pyx_t_15 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("as_py", 0);

      /* "pyarrow/scalar.pxi":1083
 *             If 'strict', this instead results in an exception being raised when detected.
 *         """
 *         if self.is_valid:             # <<<<<<<<<<<<<<
 *             try:
 *                 return {k: self[k].as_py(maps_as_pydicts=maps_as_pydicts) for k in self.keys()}
*/
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_is_valid); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1083, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(3, 1083, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (__pyx_t_2) {

        /* "pyarrow/scalar.pxi":1084
 *         """
 *         if self.is_valid:
 *             try:             # <<<<<<<<<<<<<<
 *                 return {k: self[k].as_py(maps_as_pydicts=maps_as_pydicts) for k in self.keys()}
 *             except KeyError:
*/
        {
          __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:*/ {

            /* "pyarrow/scalar.pxi":1085
 *         if self.is_valid:
 *             try:
 *                 return {k: self[k].as_py(maps_as_pydicts=maps_as_pydicts) for k in self.keys()}             # <<<<<<<<<<<<<<
 *             except KeyError:
 *                 raise ValueError(
*/
            __Pyx_XDECREF(__pyx_r);
            { /* enter inner scope */
              __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1085, __pyx_L12_error)
              __Pyx_GOTREF(__pyx_t_1);
              __pyx_t_7 = 0;
              if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "keys");
                __PYX_ERR(3, 1085, __pyx_L12_error)
              }
              __pyx_t_10 = __Pyx_dict_iterator(((PyObject *)__pyx_v_self), 0, __pyx_mstate_global->__pyx_n_u_keys, (&__pyx_t_8), (&__pyx_t_9)); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 1085, __pyx_L12_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_XDECREF(__pyx_t_6);
              __pyx_t_6 = __pyx_t_10;
              __pyx_t_10 = 0;
              while (1) {
                __pyx_t_11 = __Pyx_dict_iter_next(__pyx_t_6, __pyx_t_8, &__pyx_t_7, &__pyx_t_10, NULL, NULL, __pyx_t_9);
                if (unlikely(__pyx_t_11 == 0)) break;
                if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(3, 1085, __pyx_L12_error)
                __Pyx_GOTREF(__pyx_t_10);
                __Pyx_XDECREF_SET(__pyx_9genexpr11__pyx_v_k, __pyx_t_10);
                __pyx_t_10 = 0;
                if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                  PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
                  __PYX_ERR(3, 1085, __pyx_L12_error)
                }
                __pyx_t_13 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_9genexpr11__pyx_v_k); if (unlikely(!__pyx_t_13)) __PYX_ERR(3, 1085, __pyx_L12_error)
                __Pyx_GOTREF(__pyx_t_13);
                __pyx_t_12 = __pyx_t_13;
                __Pyx_INCREF(__pyx_t_12);
                __pyx_t_14 = 0;
                {
                  PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_12, NULL};
                  __pyx_t_15 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_15)) __PYX_ERR(3, 1085, __pyx_L12_error)
                  __Pyx_GOTREF(__pyx_t_15);
                  if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_maps_as_pydicts, __pyx_v_maps_as_pydicts, __pyx_t_15, __pyx_callargs+1, 0) < (0)) __PYX_ERR(3, 1085, __pyx_L12_error)
                  __pyx_t_10 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_as_py, __pyx_callargs+__pyx_t_14, (1-__pyx_t_14) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_15);
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
                  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
                  if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 1085, __pyx_L12_error)
                  __Pyx_GOTREF(__pyx_t_10);
                }
                if (unlikely(PyDict_SetItem(__pyx_t_1, (PyObject*)__pyx_9genexpr11__pyx_v_k, (PyObject*)__pyx_t_10))) __PYX_ERR(3, 1085, __pyx_L12_error)
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
              __Pyx_XDECREF(__pyx_9genexpr11__pyx_v_k); __pyx_9genexpr11__pyx_v_k = 0;
              goto __pyx_L15_exit_scope;
              __pyx_L12_error:;
              __Pyx_XDECREF(__pyx_9genexpr11__pyx_v_k); __pyx_9genexpr11__pyx_v_k = 0;
              goto __pyx_L4_error;
              __pyx_L15_exit_scope:;
            } /* exit inner scope */
            __pyx_r = __pyx_t_1;
            __pyx_t_1 = 0;
            goto __pyx_L8_try_return;

            /* "pyarrow/scalar.pxi":1084
 *         """
 *         if self.is_valid:
 *             try:             # <<<<<<<<<<<<<<
 *                 return {k: self[k].as_py(maps_as_pydicts=maps_as_pydicts) for k in self.keys()}
 *             except KeyError:
*/
          }
          __pyx_L4_error:;
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
          __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;

          /* "pyarrow/scalar.pxi":1086
 *             try:
 *                 return {k: self[k].as_py(maps_as_pydicts=maps_as_pydicts) for k in self.keys()}
 *             except KeyError:             # <<<<<<<<<<<<<<
 *                 raise ValueError(
 *                     "Converting to Python dictionary is not supported when "
*/
          __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_KeyError))));
          if (__pyx_t_9) {
            __Pyx_AddTraceback("pyarrow.lib.StructScalar.as_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
            if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_6, &__pyx_t_10) < 0) __PYX_ERR(3, 1086, __pyx_L6_except_error)
            __Pyx_XGOTREF(__pyx_t_1);
            __Pyx_XGOTREF(__pyx_t_6);
            __Pyx_XGOTREF(__pyx_t_10);

            /* "pyarrow/scalar.pxi":1087
 *                 return {k: self[k].as_py(maps_as_pydicts=maps_as_pydicts) for k in self.keys()}
 *             except KeyError:
 *                 raise ValueError(             # <<<<<<<<<<<<<<
 *                     "Converting to Python dictionary is not supported when "
 *                     "duplicate field names are present")
*/
            __pyx_t_15 = NULL;
            __pyx_t_14 = 1;
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_15, __pyx_mstate_global->__pyx_kp_u_Converting_to_Python_dictionary};
              __pyx_t_13 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (__pyx_t_14*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
              __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
              if (unlikely(!__pyx_t_13)) __PYX_ERR(3, 1087, __pyx_L6_except_error)
              __Pyx_GOTREF(__pyx_t_13);
            }
            __Pyx_Raise(__pyx_t_13, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
            __PYX_ERR(3, 1087, __pyx_L6_except_error)
          }
          goto __pyx_L6_except_error;

          /* "pyarrow/scalar.pxi":1084
 *         """
 *         if self.is_valid:
 *             try:             # <<<<<<<<<<<<<<
 *                 return {k: self[k].as_py(maps_as_pydicts=maps_as_pydicts) for k in self.keys()}
 *             except KeyError:
*/
          __pyx_L6_except_error:;
          __Pyx_XGIVEREF(__pyx_t_3);
          __Pyx_XGIVEREF(__pyx_t_4);
          __Pyx_XGIVEREF(__pyx_t_5);
          __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
          goto __pyx_L1_error;
          __pyx_L8_try_return:;
          __Pyx_XGIVEREF(__pyx_t_3);
          __Pyx_XGIVEREF(__pyx_t_4);
          __Pyx_XGIVEREF(__pyx_t_5);
          __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
          goto __pyx_L0;
        }

        /* "pyarrow/scalar.pxi":1083
 *             If 'strict', this instead results in an exception being raised when detected.
 *         """
 *         if self.is_valid:             # <<<<<<<<<<<<<<
 *             try:
 *                 return {k: self[k].as_py(maps_as_pydicts=maps_as_pydicts) for k in self.keys()}
*/
      }

      /* "pyarrow/scalar.pxi":1091
 *                     "duplicate field names are present")
 *         else:
 *             return None             # <<<<<<<<<<<<<<
 * 
 *     def _as_py_tuple(self):
*/
      /*else*/ {
        __Pyx_XDECREF(__pyx_r);
        __pyx_r = Py_None; __Pyx_INCREF(Py_None);
        goto __pyx_L0;
      }

      /* "pyarrow/scalar.pxi":1065
 *                 raise KeyError(key) from exc
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return this value as a Python dict.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_10);
      __Pyx_XDECREF(__pyx_t_12);
      __Pyx_XDECREF(__pyx_t_13);
      __Pyx_XDECREF(__pyx_t_15);
      __Pyx_AddTraceback("pyarrow.lib.StructScalar.as_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_9genexpr11__pyx_v_k);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/scalar.pxi":1093
 *             return None
 * 
 *     def _as_py_tuple(self):             # <<<<<<<<<<<<<<
 *         # a version that returns a tuple instead of dict to support repr/str
 *         # with the presence of duplicate field names
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_12StructScalar_14_as_py_tuple(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_12StructScalar_13_as_py_tuple, "StructScalar._as_py_tuple(self)");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_12StructScalar_14_as_py_tuple = {"_as_py_tuple", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12StructScalar_14_as_py_tuple, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12StructScalar_13_as_py_tuple};
    static PyObject *__pyx_pw_7pyarrow_3lib_12StructScalar_14_as_py_tuple(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("_as_py_tuple (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("_as_py_tuple", 1, 0, 0, __pyx_nargs); return NULL; }
      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
      if (unlikely(__pyx_kwds_len < 0)) return NULL;
      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("_as_py_tuple", __pyx_kwds); return NULL;}
      __pyx_r = __pyx_pf_7pyarrow_3lib_12StructScalar_13_as_py_tuple(((struct __pyx_obj_7pyarrow_3lib_StructScalar *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_12StructScalar_13_as_py_tuple(struct __pyx_obj_7pyarrow_3lib_StructScalar *__pyx_v_self) {
      PyObject *__pyx_9genexpr12__pyx_v_i = NULL;
      PyObject *__pyx_9genexpr12__pyx_v_key = NULL;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_t_2;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      Py_ssize_t __pyx_t_5;
      PyObject *(*__pyx_t_6)(PyObject *);
      PyObject *__pyx_t_7 = NULL;
      PyObject *__pyx_t_8 = NULL;
      PyObject *__pyx_t_9 = NULL;
      size_t __pyx_t_10;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("_as_py_tuple", 0);

      /* "pyarrow/scalar.pxi":1096
 *         # a version that returns a tuple instead of dict to support repr/str
 *         # with the presence of duplicate field names
 *         if self.is_valid:             # <<<<<<<<<<<<<<
 *             return [(key, self[i].as_py()) for i, key in enumerate(self)]
 *         else:
*/
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_is_valid); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1096, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(3, 1096, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (__pyx_t_2) {

        /* "pyarrow/scalar.pxi":1097
 *         # with the presence of duplicate field names
 *         if self.is_valid:
 *             return [(key, self[i].as_py()) for i, key in enumerate(self)]             # <<<<<<<<<<<<<<
 *         else:
 *             return None
*/
        __Pyx_XDECREF(__pyx_r);
        { /* enter inner scope */
          __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1097, __pyx_L6_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0);
          __pyx_t_3 = __pyx_mstate_global->__pyx_int_0;
          if (likely(PyList_CheckExact(((PyObject *)__pyx_v_self))) || PyTuple_CheckExact(((PyObject *)__pyx_v_self))) {
            __pyx_t_4 = ((PyObject *)__pyx_v_self); __Pyx_INCREF(__pyx_t_4);
            __pyx_t_5 = 0;
            __pyx_t_6 = NULL;
          } else {
            __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1097, __pyx_L6_error)
            __Pyx_GOTREF(__pyx_t_4);
            __pyx_t_6 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1097, __pyx_L6_error)
          }
          for (;;) {
            if (likely(!__pyx_t_6)) {
              if (likely(PyList_CheckExact(__pyx_t_4))) {
                {
                  Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_4);
                  #if !CYTHON_ASSUME_SAFE_SIZE
                  if (unlikely((__pyx_temp < 0))) __PYX_ERR(3, 1097, __pyx_L6_error)
                  #endif
                  if (__pyx_t_5 >= __pyx_temp) break;
                }
                __pyx_t_7 = __Pyx_PyList_GetItemRefFast(__pyx_t_4, __pyx_t_5, __Pyx_ReferenceSharing_OwnStrongReference);
                ++__pyx_t_5;
              } else {
                {
                  Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_4);
                  #if !CYTHON_ASSUME_SAFE_SIZE
                  if (unlikely((__pyx_temp < 0))) __PYX_ERR(3, 1097, __pyx_L6_error)
                  #endif
                  if (__pyx_t_5 >= __pyx_temp) break;
                }
                #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                __pyx_t_7 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5));
                #else
                __pyx_t_7 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_5);
                #endif
                ++__pyx_t_5;
              }
              if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1097, __pyx_L6_error)
            } else {
              __pyx_t_7 = __pyx_t_6(__pyx_t_4);
              if (unlikely(!__pyx_t_7)) {
                PyObject* exc_type = PyErr_Occurred();
                if (exc_type) {
                  if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(3, 1097, __pyx_L6_error)
                  PyErr_Clear();
                }
                break;
              }
            }
            __Pyx_GOTREF(__pyx_t_7);
            __Pyx_XDECREF_SET(__pyx_9genexpr12__pyx_v_key, __pyx_t_7);
            __pyx_t_7 = 0;
            __Pyx_INCREF(__pyx_t_3);
            __Pyx_XDECREF_SET(__pyx_9genexpr12__pyx_v_i, __pyx_t_3);
            __pyx_t_7 = __Pyx_PyLong_AddObjC(__pyx_t_3, __pyx_mstate_global->__pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1097, __pyx_L6_error)
            __Pyx_GOTREF(__pyx_t_7);
            __Pyx_DECREF(__pyx_t_3);
            __pyx_t_3 = __pyx_t_7;
            __pyx_t_7 = 0;
            if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
              PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
              __PYX_ERR(3, 1097, __pyx_L6_error)
            }
            __pyx_t_9 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_9genexpr12__pyx_v_i); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 1097, __pyx_L6_error)
            __Pyx_GOTREF(__pyx_t_9);
            __pyx_t_8 = __pyx_t_9;
            __Pyx_INCREF(__pyx_t_8);
            __pyx_t_10 = 0;
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_8, NULL};
              __pyx_t_7 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_as_py, __pyx_callargs+__pyx_t_10, (1-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
              if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1097, __pyx_L6_error)
              __Pyx_GOTREF(__pyx_t_7);
            }
            __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 1097, __pyx_L6_error)
            __Pyx_GOTREF(__pyx_t_9);
            __Pyx_INCREF(__pyx_9genexpr12__pyx_v_key);
            __Pyx_GIVEREF(__pyx_9genexpr12__pyx_v_key);
            if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_9genexpr12__pyx_v_key) != (0)) __PYX_ERR(3, 1097, __pyx_L6_error);
            __Pyx_GIVEREF(__pyx_t_7);
            if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_7) != (0)) __PYX_ERR(3, 1097, __pyx_L6_error);
            __pyx_t_7 = 0;
            if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_9))) __PYX_ERR(3, 1097, __pyx_L6_error)
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          }
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_XDECREF(__pyx_9genexpr12__pyx_v_i); __pyx_9genexpr12__pyx_v_i = 0;
          __Pyx_XDECREF(__pyx_9genexpr12__pyx_v_key); __pyx_9genexpr12__pyx_v_key = 0;
          goto __pyx_L10_exit_scope;
          __pyx_L6_error:;
          __Pyx_XDECREF(__pyx_9genexpr12__pyx_v_i); __pyx_9genexpr12__pyx_v_i = 0;
          __Pyx_XDECREF(__pyx_9genexpr12__pyx_v_key); __pyx_9genexpr12__pyx_v_key = 0;
          goto __pyx_L1_error;
          __pyx_L10_exit_scope:;
        } /* exit inner scope */
        __pyx_r = __pyx_t_1;
        __pyx_t_1 = 0;
        goto __pyx_L0;

        /* "pyarrow/scalar.pxi":1096
 *         # a version that returns a tuple instead of dict to support repr/str
 *         # with the presence of duplicate field names
 *         if self.is_valid:             # <<<<<<<<<<<<<<
 *             return [(key, self[i].as_py()) for i, key in enumerate(self)]
 *         else:
*/
      }

      /* "pyarrow/scalar.pxi":1099
 *             return [(key, self[i].as_py()) for i, key in enumerate(self)]
 *         else:
 *             return None             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
*/
      /*else*/ {
        __Pyx_XDECREF(__pyx_r);
        __pyx_r = Py_None; __Pyx_INCREF(Py_None);
        goto __pyx_L0;
      }

      /* "pyarrow/scalar.pxi":1093
 *             return None
 * 
 *     def _as_py_tuple(self):             # <<<<<<<<<<<<<<
 *         # a version that returns a tuple instead of dict to support repr/str
 *         # with the presence of duplicate field names
*/

      /* 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_XDECREF(__pyx_t_9);
      __Pyx_AddTraceback("pyarrow.lib.StructScalar._as_py_tuple", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_9genexpr12__pyx_v_i);
      __Pyx_XDECREF(__pyx_9genexpr12__pyx_v_key);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/scalar.pxi":1101
 *             return None
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return f'<pyarrow.{self.__class__.__name__}: {self._as_py_tuple()!r}>'
 * 
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_12StructScalar_16__repr__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_12StructScalar_16__repr__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_12StructScalar_15__repr__(((struct __pyx_obj_7pyarrow_3lib_StructScalar *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_12StructScalar_15__repr__(struct __pyx_obj_7pyarrow_3lib_StructScalar *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4[5];
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__repr__", 0);

      /* "pyarrow/scalar.pxi":1102
 * 
 *     def __repr__(self):
 *         return f'<pyarrow.{self.__class__.__name__}: {self._as_py_tuple()!r}>'             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1102, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_name_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1102, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_t_2, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1102, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_as_py_tuple); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1102, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1102, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_t_3), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1102, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_4[0] = __pyx_mstate_global->__pyx_kp_u_pyarrow_2;
      __pyx_t_4[1] = __pyx_t_1;
      __pyx_t_4[2] = __pyx_mstate_global->__pyx_kp_u__10;
      __pyx_t_4[3] = __pyx_t_2;
      __pyx_t_4[4] = __pyx_mstate_global->__pyx_kp_u__5;
      __pyx_t_3 = __Pyx_PyUnicode_Join(__pyx_t_4, 5, 9 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1) + 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2));
      if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1102, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "pyarrow/scalar.pxi":1101
 *             return None
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return f'<pyarrow.{self.__class__.__name__}: {self._as_py_tuple()!r}>'
 * 
*/

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

    /* "pyarrow/scalar.pxi":1104
 *         return f'<pyarrow.{self.__class__.__name__}: {self._as_py_tuple()!r}>'
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return str(self._as_py_tuple())
 * 
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_12StructScalar_18__str__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_12StructScalar_18__str__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_12StructScalar_17__str__(((struct __pyx_obj_7pyarrow_3lib_StructScalar *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_12StructScalar_17__str__(struct __pyx_obj_7pyarrow_3lib_StructScalar *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      size_t __pyx_t_3;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__str__", 0);

      /* "pyarrow/scalar.pxi":1105
 * 
 *     def __str__(self):
 *         return str(self._as_py_tuple())             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = ((PyObject *)__pyx_v_self);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_3 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_as_py_tuple, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1105, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_t_2 = __Pyx_PyObject_Unicode(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1105, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;

      /* "pyarrow/scalar.pxi":1104
 *         return f'<pyarrow.{self.__class__.__name__}: {self._as_py_tuple()!r}>'
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return str(self._as_py_tuple())
 * 
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_AddTraceback("pyarrow.lib.StructScalar.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/scalar.pxi":1113
 *     """
 * 
 *     def __getitem__(self, i):             # <<<<<<<<<<<<<<
 *         """
 *         Return the value at the given index or key.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_9MapScalar_1__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_i); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_9MapScalar___getitem__, "MapScalar.__getitem__(self, i)\n\nReturn the value at the given index or key.");
    #if CYTHON_UPDATE_DESCRIPTOR_DOC
    struct wrapperbase __pyx_wrapperbase_7pyarrow_3lib_9MapScalar___getitem__;
    #endif
    static PyObject *__pyx_pw_7pyarrow_3lib_9MapScalar_1__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_i) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_9MapScalar___getitem__(((struct __pyx_obj_7pyarrow_3lib_MapScalar *)__pyx_v_self), ((PyObject *)__pyx_v_i));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_9MapScalar___getitem__(struct __pyx_obj_7pyarrow_3lib_MapScalar *__pyx_v_self, PyObject *__pyx_v_i) {
      PyObject *__pyx_v_arr = NULL;
      PyObject *__pyx_v_key_field = NULL;
      PyObject *__pyx_v_item_field = NULL;
      Py_ssize_t __pyx_v_key_index;
      PyObject *__pyx_v_dct = NULL;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_t_2;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      size_t __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;
      Py_ssize_t __pyx_t_11;
      int __pyx_t_12;
      PyObject *__pyx_t_13 = NULL;
      Py_ssize_t __pyx_t_14;
      Py_ssize_t __pyx_t_15;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__getitem__", 0);

      /* "pyarrow/scalar.pxi":1118
 *         """
 * 
 *         arr = self.values             # <<<<<<<<<<<<<<
 *         if arr is None:
 *             raise IndexError(i) if isinstance(i, int) else KeyError(i)
*/
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_values); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1118, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_v_arr = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "pyarrow/scalar.pxi":1119
 * 
 *         arr = self.values
 *         if arr is None:             # <<<<<<<<<<<<<<
 *             raise IndexError(i) if isinstance(i, int) else KeyError(i)
 * 
*/
      __pyx_t_2 = (__pyx_v_arr == Py_None);
      if (unlikely(__pyx_t_2)) {

        /* "pyarrow/scalar.pxi":1120
 *         arr = self.values
 *         if arr is None:
 *             raise IndexError(i) if isinstance(i, int) else KeyError(i)             # <<<<<<<<<<<<<<
 * 
 *         key_field = self.type.key_field.name
*/
        __pyx_t_2 = PyLong_Check(__pyx_v_i); 
        if (__pyx_t_2) {
          __pyx_t_4 = NULL;
          __pyx_t_5 = 1;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_i};
            __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_IndexError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
            if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1120, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
          }
          __pyx_t_1 = __pyx_t_3;
          __pyx_t_3 = 0;
        } else {
          __pyx_t_4 = NULL;
          __pyx_t_5 = 1;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_i};
            __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_KeyError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
            if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1120, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
          }
          __pyx_t_1 = __pyx_t_3;
          __pyx_t_3 = 0;
        }
        __Pyx_Raise(__pyx_t_1, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __PYX_ERR(3, 1120, __pyx_L1_error)

        /* "pyarrow/scalar.pxi":1119
 * 
 *         arr = self.values
 *         if arr is None:             # <<<<<<<<<<<<<<
 *             raise IndexError(i) if isinstance(i, int) else KeyError(i)
 * 
*/
      }

      /* "pyarrow/scalar.pxi":1122
 *             raise IndexError(i) if isinstance(i, int) else KeyError(i)
 * 
 *         key_field = self.type.key_field.name             # <<<<<<<<<<<<<<
 *         item_field = self.type.item_field.name
 * 
*/
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1122, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_key_field); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1122, __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_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1122, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_v_key_field = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "pyarrow/scalar.pxi":1123
 * 
 *         key_field = self.type.key_field.name
 *         item_field = self.type.item_field.name             # <<<<<<<<<<<<<<
 * 
 *         if isinstance(i, (bytes, str)):
*/
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1123, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_item_field); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1123, __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_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1123, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_v_item_field = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "pyarrow/scalar.pxi":1125
 *         item_field = self.type.item_field.name
 * 
 *         if isinstance(i, (bytes, str)):             # <<<<<<<<<<<<<<
 *             try:
 *                 key_index = list(self.keys()).index(i)
*/
      __pyx_t_6 = PyBytes_Check(__pyx_v_i); 
      if (!__pyx_t_6) {
      } else {
        __pyx_t_2 = __pyx_t_6;
        goto __pyx_L5_bool_binop_done;
      }
      __pyx_t_6 = PyUnicode_Check(__pyx_v_i); 
      __pyx_t_2 = __pyx_t_6;
      __pyx_L5_bool_binop_done:;
      if (__pyx_t_2) {

        /* "pyarrow/scalar.pxi":1126
 * 
 *         if isinstance(i, (bytes, str)):
 *             try:             # <<<<<<<<<<<<<<
 *                 key_index = list(self.keys()).index(i)
 *             except ValueError:
*/
        {
          __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:*/ {

            /* "pyarrow/scalar.pxi":1127
 *         if isinstance(i, (bytes, str)):
 *             try:
 *                 key_index = list(self.keys()).index(i)             # <<<<<<<<<<<<<<
 *             except ValueError:
 *                 raise KeyError(i)
*/
            __pyx_t_10 = ((PyObject *)__pyx_v_self);
            __Pyx_INCREF(__pyx_t_10);
            __pyx_t_5 = 0;
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_10, NULL};
              __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_keys, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1127, __pyx_L7_error)
              __Pyx_GOTREF(__pyx_t_4);
            }
            __pyx_t_10 = __Pyx_PySequence_ListKeepNew(__pyx_t_4); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 1127, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_10);
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            __pyx_t_3 = __pyx_t_10;
            __Pyx_INCREF(__pyx_t_3);
            __pyx_t_5 = 0;
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_i};
              __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_index, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1127, __pyx_L7_error)
              __Pyx_GOTREF(__pyx_t_1);
            }
            __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 1127, __pyx_L7_error)
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            __pyx_v_key_index = __pyx_t_11;

            /* "pyarrow/scalar.pxi":1126
 * 
 *         if isinstance(i, (bytes, str)):
 *             try:             # <<<<<<<<<<<<<<
 *                 key_index = list(self.keys()).index(i)
 *             except ValueError:
*/
          }
          __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_L12_try_end;
          __pyx_L7_error:;
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

          /* "pyarrow/scalar.pxi":1128
 *             try:
 *                 key_index = list(self.keys()).index(i)
 *             except ValueError:             # <<<<<<<<<<<<<<
 *                 raise KeyError(i)
 * 
*/
          __pyx_t_12 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_ValueError))));
          if (__pyx_t_12) {
            __Pyx_AddTraceback("pyarrow.lib.MapScalar.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
            if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_10, &__pyx_t_3) < 0) __PYX_ERR(3, 1128, __pyx_L9_except_error)
            __Pyx_XGOTREF(__pyx_t_1);
            __Pyx_XGOTREF(__pyx_t_10);
            __Pyx_XGOTREF(__pyx_t_3);

            /* "pyarrow/scalar.pxi":1129
 *                 key_index = list(self.keys()).index(i)
 *             except ValueError:
 *                 raise KeyError(i)             # <<<<<<<<<<<<<<
 * 
 *             dct = arr[_normalize_index(key_index, len(arr))]
*/
            __pyx_t_13 = NULL;
            __pyx_t_5 = 1;
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_13, __pyx_v_i};
              __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_KeyError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
              __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
              if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1129, __pyx_L9_except_error)
              __Pyx_GOTREF(__pyx_t_4);
            }
            __Pyx_Raise(__pyx_t_4, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            __PYX_ERR(3, 1129, __pyx_L9_except_error)
          }
          goto __pyx_L9_except_error;

          /* "pyarrow/scalar.pxi":1126
 * 
 *         if isinstance(i, (bytes, str)):
 *             try:             # <<<<<<<<<<<<<<
 *                 key_index = list(self.keys()).index(i)
 *             except ValueError:
*/
          __pyx_L9_except_error:;
          __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_L12_try_end:;
        }

        /* "pyarrow/scalar.pxi":1131
 *                 raise KeyError(i)
 * 
 *             dct = arr[_normalize_index(key_index, len(arr))]             # <<<<<<<<<<<<<<
 *             return dct[item_field]
 * 
*/
        if (unlikely(__pyx_v_arr == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
          __PYX_ERR(3, 1131, __pyx_L1_error)
        }
        __pyx_t_11 = PyObject_Length(__pyx_v_arr); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(3, 1131, __pyx_L1_error)
        __pyx_t_14 = __pyx_f_7pyarrow_3lib__normalize_index(__pyx_v_key_index, __pyx_t_11); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1L))) __PYX_ERR(3, 1131, __pyx_L1_error)
        __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_arr, __pyx_t_14, Py_ssize_t, 1, PyLong_FromSsize_t, 0, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1131, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_v_dct = __pyx_t_3;
        __pyx_t_3 = 0;

        /* "pyarrow/scalar.pxi":1132
 * 
 *             dct = arr[_normalize_index(key_index, len(arr))]
 *             return dct[item_field]             # <<<<<<<<<<<<<<
 * 
 *         dct = arr[_normalize_index(i, len(arr))]
*/
        __Pyx_XDECREF(__pyx_r);
        if (unlikely(__pyx_v_dct == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
          __PYX_ERR(3, 1132, __pyx_L1_error)
        }
        __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_dct, __pyx_v_item_field); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1132, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_r = __pyx_t_3;
        __pyx_t_3 = 0;
        goto __pyx_L0;

        /* "pyarrow/scalar.pxi":1125
 *         item_field = self.type.item_field.name
 * 
 *         if isinstance(i, (bytes, str)):             # <<<<<<<<<<<<<<
 *             try:
 *                 key_index = list(self.keys()).index(i)
*/
      }

      /* "pyarrow/scalar.pxi":1134
 *             return dct[item_field]
 * 
 *         dct = arr[_normalize_index(i, len(arr))]             # <<<<<<<<<<<<<<
 *         return (dct[key_field], dct[item_field])
 * 
*/
      if (unlikely(__pyx_v_arr == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(3, 1134, __pyx_L1_error)
      }
      __pyx_t_14 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_14 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 1134, __pyx_L1_error)
      __pyx_t_11 = PyObject_Length(__pyx_v_arr); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(3, 1134, __pyx_L1_error)
      __pyx_t_15 = __pyx_f_7pyarrow_3lib__normalize_index(__pyx_t_14, __pyx_t_11); if (unlikely(__pyx_t_15 == ((Py_ssize_t)-1L))) __PYX_ERR(3, 1134, __pyx_L1_error)
      __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_arr, __pyx_t_15, Py_ssize_t, 1, PyLong_FromSsize_t, 0, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1134, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_v_dct = __pyx_t_3;
      __pyx_t_3 = 0;

      /* "pyarrow/scalar.pxi":1135
 * 
 *         dct = arr[_normalize_index(i, len(arr))]
 *         return (dct[key_field], dct[item_field])             # <<<<<<<<<<<<<<
 * 
 *     def __iter__(self):
*/
      __Pyx_XDECREF(__pyx_r);
      if (unlikely(__pyx_v_dct == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(3, 1135, __pyx_L1_error)
      }
      __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_dct, __pyx_v_key_field); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1135, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (unlikely(__pyx_v_dct == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(3, 1135, __pyx_L1_error)
      }
      __pyx_t_10 = __Pyx_PyObject_GetItem(__pyx_v_dct, __pyx_v_item_field); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 1135, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1135, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GIVEREF(__pyx_t_3);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3) != (0)) __PYX_ERR(3, 1135, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_10);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_10) != (0)) __PYX_ERR(3, 1135, __pyx_L1_error);
      __pyx_t_3 = 0;
      __pyx_t_10 = 0;
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/scalar.pxi":1113
 *     """
 * 
 *     def __getitem__(self, i):             # <<<<<<<<<<<<<<
 *         """
 *         Return the value at the given index or key.
*/

      /* 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_13);
      __Pyx_AddTraceback("pyarrow.lib.MapScalar.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_arr);
      __Pyx_XDECREF(__pyx_v_key_field);
      __Pyx_XDECREF(__pyx_v_item_field);
      __Pyx_XDECREF(__pyx_v_dct);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }
    static PyObject *__pyx_gb_7pyarrow_3lib_9MapScalar_4generator7(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

    /* "pyarrow/scalar.pxi":1137
 *         return (dct[key_field], dct[item_field])
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterate over this element's values.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_9MapScalar_3__iter__(PyObject *__pyx_v_self); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_9MapScalar_2__iter__, "MapScalar.__iter__(self)\n\nIterate over this element's values.");
    #if CYTHON_UPDATE_DESCRIPTOR_DOC
    struct wrapperbase __pyx_wrapperbase_7pyarrow_3lib_9MapScalar_2__iter__;
    #endif
    static PyObject *__pyx_pw_7pyarrow_3lib_9MapScalar_3__iter__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_9MapScalar_2__iter__(((struct __pyx_obj_7pyarrow_3lib_MapScalar *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_9MapScalar_2__iter__(struct __pyx_obj_7pyarrow_3lib_MapScalar *__pyx_v_self) {
      struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_10___iter__ *__pyx_cur_scope;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__iter__", 0);
      __pyx_cur_scope = (struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_10___iter__ *)__pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_10___iter__(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_10___iter__, __pyx_mstate_global->__pyx_empty_tuple, NULL);
      if (unlikely(!__pyx_cur_scope)) {
        __pyx_cur_scope = ((struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_10___iter__ *)Py_None);
        __Pyx_INCREF(Py_None);
        __PYX_ERR(3, 1137, __pyx_L1_error)
      } else {
        __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
      }
      __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
      __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
      __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
      {
        __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7pyarrow_3lib_9MapScalar_4generator7, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[9]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_iter, __pyx_mstate_global->__pyx_n_u_MapScalar___iter, __pyx_mstate_global->__pyx_n_u_pyarrow_lib); if (unlikely(!gen)) __PYX_ERR(3, 1137, __pyx_L1_error)
        __Pyx_DECREF(__pyx_cur_scope);
        __Pyx_RefNannyFinishContext();
        return (PyObject *) gen;
      }

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_AddTraceback("pyarrow.lib.MapScalar.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __Pyx_DECREF((PyObject *)__pyx_cur_scope);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_gb_7pyarrow_3lib_9MapScalar_4generator7(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
      struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_10___iter__ *__pyx_cur_scope = ((struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_10___iter__ *)__pyx_generator->closure);
      PyObject *__pyx_r = NULL;
      PyObject *__pyx_t_1 = NULL;
      int __pyx_t_2;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      PyObject *__pyx_t_5 = NULL;
      PyObject *__pyx_t_6 = NULL;
      PyObject *__pyx_t_7 = NULL;
      size_t __pyx_t_8;
      PyObject *__pyx_t_9 = NULL;
      Py_ssize_t __pyx_t_10;
      PyObject *(*__pyx_t_11)(PyObject *);
      PyObject *(*__pyx_t_12)(PyObject *);
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__iter__", 0);
      switch (__pyx_generator->resume_label) {
        case 0: goto __pyx_L3_first_run;
        case 1: goto __pyx_L9_resume_from_yield;
        default: /* CPython raises the right error here */
        __Pyx_RefNannyFinishContext();
        return NULL;
      }
      __pyx_L3_first_run:;
      if (unlikely(__pyx_sent_value != Py_None)) {
        if (unlikely(__pyx_sent_value)) PyErr_SetString(PyExc_TypeError, "can't send non-None value to a just-started generator");
        __PYX_ERR(3, 1137, __pyx_L1_error)
      }

      /* "pyarrow/scalar.pxi":1141
 *         Iterate over this element's values.
 *         """
 *         arr = self.values             # <<<<<<<<<<<<<<
 *         if arr is None:
 *             return
*/
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_mstate_global->__pyx_n_u_values); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1141, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GIVEREF(__pyx_t_1);
      __pyx_cur_scope->__pyx_v_arr = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "pyarrow/scalar.pxi":1142
 *         """
 *         arr = self.values
 *         if arr is None:             # <<<<<<<<<<<<<<
 *             return
 *         for k, v in zip(arr.field(self.type.key_field.name), arr.field(self.type.item_field.name)):
*/
      __pyx_t_2 = (__pyx_cur_scope->__pyx_v_arr == Py_None);
      if (__pyx_t_2) {

        /* "pyarrow/scalar.pxi":1143
 *         arr = self.values
 *         if arr is None:
 *             return             # <<<<<<<<<<<<<<
 *         for k, v in zip(arr.field(self.type.key_field.name), arr.field(self.type.item_field.name)):
 *             yield (k.as_py(), v.as_py())
*/
        __Pyx_XDECREF(__pyx_r);
        __pyx_r = Py_None; __Pyx_INCREF(Py_None);
        goto __pyx_L0;

        /* "pyarrow/scalar.pxi":1142
 *         """
 *         arr = self.values
 *         if arr is None:             # <<<<<<<<<<<<<<
 *             return
 *         for k, v in zip(arr.field(self.type.key_field.name), arr.field(self.type.item_field.name)):
*/
      }

      /* "pyarrow/scalar.pxi":1144
 *         if arr is None:
 *             return
 *         for k, v in zip(arr.field(self.type.key_field.name), arr.field(self.type.item_field.name)):             # <<<<<<<<<<<<<<
 *             yield (k.as_py(), v.as_py())
 * 
*/
      __pyx_t_3 = NULL;
      __pyx_t_5 = __pyx_cur_scope->__pyx_v_arr;
      __Pyx_INCREF(__pyx_t_5);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_mstate_global->__pyx_n_u_type); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1144, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_key_field); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1144, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1144, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_8 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_6};
        __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_field, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1144, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
      }
      __pyx_t_5 = __pyx_cur_scope->__pyx_v_arr;
      __Pyx_INCREF(__pyx_t_5);
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_mstate_global->__pyx_n_u_type); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1144, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_item_field); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 1144, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1144, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_8 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_7};
        __pyx_t_6 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_field, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1144, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
      }
      __pyx_t_8 = 1;
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_t_4, __pyx_t_6};
        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_zip, __pyx_callargs+__pyx_t_8, (3-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1144, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
        __pyx_t_6 = __pyx_t_1; __Pyx_INCREF(__pyx_t_6);
        __pyx_t_10 = 0;
        __pyx_t_11 = NULL;
      } else {
        __pyx_t_10 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1144, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_11 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_6); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 1144, __pyx_L1_error)
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      for (;;) {
        if (likely(!__pyx_t_11)) {
          if (likely(PyList_CheckExact(__pyx_t_6))) {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_6);
              #if !CYTHON_ASSUME_SAFE_SIZE
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(3, 1144, __pyx_L1_error)
              #endif
              if (__pyx_t_10 >= __pyx_temp) break;
            }
            __pyx_t_1 = __Pyx_PyList_GetItemRefFast(__pyx_t_6, __pyx_t_10, __Pyx_ReferenceSharing_OwnStrongReference);
            ++__pyx_t_10;
          } else {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_6);
              #if !CYTHON_ASSUME_SAFE_SIZE
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(3, 1144, __pyx_L1_error)
              #endif
              if (__pyx_t_10 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_1 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_10));
            #else
            __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_6, __pyx_t_10);
            #endif
            ++__pyx_t_10;
          }
          if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1144, __pyx_L1_error)
        } else {
          __pyx_t_1 = __pyx_t_11(__pyx_t_6);
          if (unlikely(!__pyx_t_1)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(3, 1144, __pyx_L1_error)
              PyErr_Clear();
            }
            break;
          }
        }
        __Pyx_GOTREF(__pyx_t_1);
        if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
          PyObject* sequence = __pyx_t_1;
          Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
          if (unlikely(size != 2)) {
            if (size > 2) __Pyx_RaiseTooManyValuesError(2);
            else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
            __PYX_ERR(3, 1144, __pyx_L1_error)
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          if (likely(PyTuple_CheckExact(sequence))) {
            __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0);
            __Pyx_INCREF(__pyx_t_4);
            __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1);
            __Pyx_INCREF(__pyx_t_3);
          } else {
            __pyx_t_4 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference);
            if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1144, __pyx_L1_error)
            __Pyx_XGOTREF(__pyx_t_4);
            __pyx_t_3 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference);
            if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1144, __pyx_L1_error)
            __Pyx_XGOTREF(__pyx_t_3);
          }
          #else
          __pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1144, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_3 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1144, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          #endif
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        } else {
          Py_ssize_t index = -1;
          __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1144, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __pyx_t_12 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_7);
          index = 0; __pyx_t_4 = __pyx_t_12(__pyx_t_7); if (unlikely(!__pyx_t_4)) goto __pyx_L7_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_4);
          index = 1; __pyx_t_3 = __pyx_t_12(__pyx_t_7); if (unlikely(!__pyx_t_3)) goto __pyx_L7_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_3);
          if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_7), 2) < (0)) __PYX_ERR(3, 1144, __pyx_L1_error)
          __pyx_t_12 = NULL;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          goto __pyx_L8_unpacking_done;
          __pyx_L7_unpacking_failed:;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __pyx_t_12 = NULL;
          if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
          __PYX_ERR(3, 1144, __pyx_L1_error)
          __pyx_L8_unpacking_done:;
        }
        __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_k);
        __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_k, __pyx_t_4);
        __Pyx_GIVEREF(__pyx_t_4);
        __pyx_t_4 = 0;
        __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_v);
        __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_v, __pyx_t_3);
        __Pyx_GIVEREF(__pyx_t_3);
        __pyx_t_3 = 0;

        /* "pyarrow/scalar.pxi":1145
 *             return
 *         for k, v in zip(arr.field(self.type.key_field.name), arr.field(self.type.item_field.name)):
 *             yield (k.as_py(), v.as_py())             # <<<<<<<<<<<<<<
 * 
 *     def as_py(self, *, maps_as_pydicts=None):
*/
        __pyx_t_3 = __pyx_cur_scope->__pyx_v_k;
        __Pyx_INCREF(__pyx_t_3);
        __pyx_t_8 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
          __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_as_py, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1145, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
        }
        __pyx_t_4 = __pyx_cur_scope->__pyx_v_v;
        __Pyx_INCREF(__pyx_t_4);
        __pyx_t_8 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
          __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_as_py, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1145, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1145, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_GIVEREF(__pyx_t_1);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1) != (0)) __PYX_ERR(3, 1145, __pyx_L1_error);
        __Pyx_GIVEREF(__pyx_t_3);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3) != (0)) __PYX_ERR(3, 1145, __pyx_L1_error);
        __pyx_t_1 = 0;
        __pyx_t_3 = 0;
        __pyx_r = __pyx_t_4;
        __pyx_t_4 = 0;
        __Pyx_XGIVEREF(__pyx_t_6);
        __pyx_cur_scope->__pyx_t_0 = __pyx_t_6;
        __pyx_cur_scope->__pyx_t_1 = __pyx_t_10;
        __pyx_cur_scope->__pyx_t_2 = __pyx_t_11;
        __Pyx_XGIVEREF(__pyx_r);
        __Pyx_RefNannyFinishContext();
        __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
        /* return from generator, yielding value */
        __pyx_generator->resume_label = 1;
        return __pyx_r;
        __pyx_L9_resume_from_yield:;
        __pyx_t_6 = __pyx_cur_scope->__pyx_t_0;
        __pyx_cur_scope->__pyx_t_0 = 0;
        __Pyx_XGOTREF(__pyx_t_6);
        __pyx_t_10 = __pyx_cur_scope->__pyx_t_1;
        __pyx_t_11 = __pyx_cur_scope->__pyx_t_2;
        if (unlikely(!__pyx_sent_value)) __PYX_ERR(3, 1145, __pyx_L1_error)

        /* "pyarrow/scalar.pxi":1144
 *         if arr is None:
 *             return
 *         for k, v in zip(arr.field(self.type.key_field.name), arr.field(self.type.item_field.name)):             # <<<<<<<<<<<<<<
 *             yield (k.as_py(), v.as_py())
 * 
*/
      }
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

      /* "pyarrow/scalar.pxi":1137
 *         return (dct[key_field], dct[item_field])
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterate over this element's values.
*/

      /* function exit code */
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_9);
      if (__Pyx_PyErr_Occurred()) {
        __Pyx_Generator_Replace_StopIteration(0);
        __Pyx_AddTraceback("__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      }
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      #if !CYTHON_USE_EXC_INFO_STACK
      __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
      #endif
      __pyx_generator->resume_label = -1;
      __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/scalar.pxi":1147
 *             yield (k.as_py(), v.as_py())
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return this value as a Python list or dict, depending on 'maps_as_pydicts'.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_9MapScalar_6as_py(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_9MapScalar_5as_py, "MapScalar.as_py(self, *, maps_as_pydicts=None)\n\nReturn this value as a Python list or dict, depending on 'maps_as_pydicts'.\n\nParameters\n----------\nmaps_as_pydicts : str, optional, default `None`\n    Valid values are `None`, 'lossy', or 'strict'.\n    The default behavior (`None`), is to convert Arrow Map arrays to\n    Python association lists (list-of-tuples) in the same order as the\n    Arrow Map, as in [(key1, value1), (key2, value2), ...].\n\n    If 'lossy' or 'strict', convert Arrow Map arrays to native Python dicts.\n\n    If 'lossy', whenever duplicate keys are detected, a warning will be printed.\n    The last seen value of a duplicate key will be in the Python dictionary.\n    If 'strict', this instead results in an exception being raised when detected.");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_9MapScalar_6as_py = {"as_py", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_9MapScalar_6as_py, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_9MapScalar_5as_py};
    static PyObject *__pyx_pw_7pyarrow_3lib_9MapScalar_6as_py(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_maps_as_pydicts = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("as_py (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_maps_as_pydicts,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(3, 1147, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, 0, __pyx_kwds_len, "as_py", 0) < (0)) __PYX_ERR(3, 1147, __pyx_L3_error)
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
        } else if (unlikely(__pyx_nargs != 0)) {
          goto __pyx_L5_argtuple_error;
        } else {
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
        }
        __pyx_v_maps_as_pydicts = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("as_py", 1, 0, 0, __pyx_nargs); __PYX_ERR(3, 1147, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.MapScalar.as_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_9MapScalar_5as_py(((struct __pyx_obj_7pyarrow_3lib_MapScalar *)__pyx_v_self), __pyx_v_maps_as_pydicts);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_9MapScalar_5as_py(struct __pyx_obj_7pyarrow_3lib_MapScalar *__pyx_v_self, PyObject *__pyx_v_maps_as_pydicts) {
      PyObject *__pyx_v_result_dict = NULL;
      PyObject *__pyx_v_key = NULL;
      PyObject *__pyx_v_value = NULL;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_t_2;
      PyObject *__pyx_t_3 = NULL;
      int __pyx_t_4;
      PyObject *__pyx_t_5 = NULL;
      PyObject *__pyx_t_6[3];
      PyObject *__pyx_t_7 = NULL;
      size_t __pyx_t_8;
      PyObject *__pyx_t_9 = NULL;
      PyObject *__pyx_t_10 = NULL;
      PyObject *__pyx_t_11 = NULL;
      PyObject *__pyx_t_12 = NULL;
      Py_ssize_t __pyx_t_13;
      PyObject *(*__pyx_t_14)(PyObject *);
      PyObject *(*__pyx_t_15)(PyObject *);
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("as_py", 0);

      /* "pyarrow/scalar.pxi":1165
 *             If 'strict', this instead results in an exception being raised when detected.
 *         """
 *         if maps_as_pydicts not in (None, "lossy", "strict"):             # <<<<<<<<<<<<<<
 *             raise ValueError(
 *                 "Invalid value for 'maps_as_pydicts': "
*/
      __Pyx_INCREF(__pyx_v_maps_as_pydicts);
      __pyx_t_1 = __pyx_v_maps_as_pydicts;
      __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1165, __pyx_L1_error)
      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(3, 1165, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_4) {
      } else {
        __pyx_t_2 = __pyx_t_4;
        goto __pyx_L4_bool_binop_done;
      }
      __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_lossy, Py_NE)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(3, 1165, __pyx_L1_error)
      if (__pyx_t_4) {
      } else {
        __pyx_t_2 = __pyx_t_4;
        goto __pyx_L4_bool_binop_done;
      }
      __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_strict, Py_NE)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(3, 1165, __pyx_L1_error)
      __pyx_t_2 = __pyx_t_4;
      __pyx_L4_bool_binop_done:;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_4 = __pyx_t_2;
      if (unlikely(__pyx_t_4)) {

        /* "pyarrow/scalar.pxi":1166
 *         """
 *         if maps_as_pydicts not in (None, "lossy", "strict"):
 *             raise ValueError(             # <<<<<<<<<<<<<<
 *                 "Invalid value for 'maps_as_pydicts': "
 *                 + "valid values are 'lossy', 'strict' or `None` (default). "
*/
        __pyx_t_3 = NULL;

        /* "pyarrow/scalar.pxi":1169
 *                 "Invalid value for 'maps_as_pydicts': "
 *                 + "valid values are 'lossy', 'strict' or `None` (default). "
 *                 + f"Received {maps_as_pydicts!r}."             # <<<<<<<<<<<<<<
 *             )
 *         if not self.is_valid:
*/
        __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_maps_as_pydicts), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1169, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_6[0] = __pyx_mstate_global->__pyx_kp_u_Invalid_value_for_maps_as_pydict;
        __pyx_t_6[1] = __pyx_t_5;
        __pyx_t_6[2] = __pyx_mstate_global->__pyx_kp_u_;
        __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_6, 3, 102 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5));
        if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1169, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_8 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_7};
          __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1166, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
        }
        __Pyx_Raise(__pyx_t_1, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __PYX_ERR(3, 1166, __pyx_L1_error)

        /* "pyarrow/scalar.pxi":1165
 *             If 'strict', this instead results in an exception being raised when detected.
 *         """
 *         if maps_as_pydicts not in (None, "lossy", "strict"):             # <<<<<<<<<<<<<<
 *             raise ValueError(
 *                 "Invalid value for 'maps_as_pydicts': "
*/
      }

      /* "pyarrow/scalar.pxi":1171
 *                 + f"Received {maps_as_pydicts!r}."
 *             )
 *         if not self.is_valid:             # <<<<<<<<<<<<<<
 *             return None
 *         if not maps_as_pydicts:
*/
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_is_valid); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1171, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(3, 1171, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_2 = (!__pyx_t_4);
      if (__pyx_t_2) {

        /* "pyarrow/scalar.pxi":1172
 *             )
 *         if not self.is_valid:
 *             return None             # <<<<<<<<<<<<<<
 *         if not maps_as_pydicts:
 *             return list(self)
*/
        __Pyx_XDECREF(__pyx_r);
        __pyx_r = Py_None; __Pyx_INCREF(Py_None);
        goto __pyx_L0;

        /* "pyarrow/scalar.pxi":1171
 *                 + f"Received {maps_as_pydicts!r}."
 *             )
 *         if not self.is_valid:             # <<<<<<<<<<<<<<
 *             return None
 *         if not maps_as_pydicts:
*/
      }

      /* "pyarrow/scalar.pxi":1173
 *         if not self.is_valid:
 *             return None
 *         if not maps_as_pydicts:             # <<<<<<<<<<<<<<
 *             return list(self)
 *         result_dict = {}
*/
      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_maps_as_pydicts); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(3, 1173, __pyx_L1_error)
      __pyx_t_4 = (!__pyx_t_2);
      if (__pyx_t_4) {

        /* "pyarrow/scalar.pxi":1174
 *             return None
 *         if not maps_as_pydicts:
 *             return list(self)             # <<<<<<<<<<<<<<
 *         result_dict = {}
 *         if self.values is None:
*/
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_1 = PySequence_List(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1174, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_r = __pyx_t_1;
        __pyx_t_1 = 0;
        goto __pyx_L0;

        /* "pyarrow/scalar.pxi":1173
 *         if not self.is_valid:
 *             return None
 *         if not maps_as_pydicts:             # <<<<<<<<<<<<<<
 *             return list(self)
 *         result_dict = {}
*/
      }

      /* "pyarrow/scalar.pxi":1175
 *         if not maps_as_pydicts:
 *             return list(self)
 *         result_dict = {}             # <<<<<<<<<<<<<<
 *         if self.values is None:
 *             return result_dict
*/
      __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1175, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_v_result_dict = ((PyObject*)__pyx_t_1);
      __pyx_t_1 = 0;

      /* "pyarrow/scalar.pxi":1176
 *             return list(self)
 *         result_dict = {}
 *         if self.values is None:             # <<<<<<<<<<<<<<
 *             return result_dict
 * 
*/
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_values); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1176, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_4 = (__pyx_t_1 == Py_None);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (__pyx_t_4) {

        /* "pyarrow/scalar.pxi":1177
 *         result_dict = {}
 *         if self.values is None:
 *             return result_dict             # <<<<<<<<<<<<<<
 * 
 *         for key, value in zip(self.keys(), self.values.field(self.type.item_field.name)):
*/
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_v_result_dict);
        __pyx_r = __pyx_v_result_dict;
        goto __pyx_L0;

        /* "pyarrow/scalar.pxi":1176
 *             return list(self)
 *         result_dict = {}
 *         if self.values is None:             # <<<<<<<<<<<<<<
 *             return result_dict
 * 
*/
      }

      /* "pyarrow/scalar.pxi":1179
 *             return result_dict
 * 
 *         for key, value in zip(self.keys(), self.values.field(self.type.item_field.name)):             # <<<<<<<<<<<<<<
 *             if key in result_dict:
 *                 if maps_as_pydicts == "strict":
*/
      __pyx_t_7 = NULL;
      __pyx_t_5 = ((PyObject *)__pyx_v_self);
      __Pyx_INCREF(__pyx_t_5);
      __pyx_t_8 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_keys, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1179, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      __pyx_t_10 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_values); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 1179, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_9 = __pyx_t_10;
      __Pyx_INCREF(__pyx_t_9);
      __pyx_t_11 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_type); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 1179, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_item_field); if (unlikely(!__pyx_t_12)) __PYX_ERR(3, 1179, __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_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 1179, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __pyx_t_8 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_11};
        __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_field, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1179, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
      }
      __pyx_t_8 = 1;
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_7, __pyx_t_3, __pyx_t_5};
        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_zip, __pyx_callargs+__pyx_t_8, (3-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1179, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
        __pyx_t_5 = __pyx_t_1; __Pyx_INCREF(__pyx_t_5);
        __pyx_t_13 = 0;
        __pyx_t_14 = NULL;
      } else {
        __pyx_t_13 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1179, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_14 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_5); if (unlikely(!__pyx_t_14)) __PYX_ERR(3, 1179, __pyx_L1_error)
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      for (;;) {
        if (likely(!__pyx_t_14)) {
          if (likely(PyList_CheckExact(__pyx_t_5))) {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_5);
              #if !CYTHON_ASSUME_SAFE_SIZE
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(3, 1179, __pyx_L1_error)
              #endif
              if (__pyx_t_13 >= __pyx_temp) break;
            }
            __pyx_t_1 = __Pyx_PyList_GetItemRefFast(__pyx_t_5, __pyx_t_13, __Pyx_ReferenceSharing_OwnStrongReference);
            ++__pyx_t_13;
          } else {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_5);
              #if !CYTHON_ASSUME_SAFE_SIZE
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(3, 1179, __pyx_L1_error)
              #endif
              if (__pyx_t_13 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_1 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_13));
            #else
            __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_5, __pyx_t_13);
            #endif
            ++__pyx_t_13;
          }
          if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1179, __pyx_L1_error)
        } else {
          __pyx_t_1 = __pyx_t_14(__pyx_t_5);
          if (unlikely(!__pyx_t_1)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(3, 1179, __pyx_L1_error)
              PyErr_Clear();
            }
            break;
          }
        }
        __Pyx_GOTREF(__pyx_t_1);
        if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
          PyObject* sequence = __pyx_t_1;
          Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
          if (unlikely(size != 2)) {
            if (size > 2) __Pyx_RaiseTooManyValuesError(2);
            else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
            __PYX_ERR(3, 1179, __pyx_L1_error)
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          if (likely(PyTuple_CheckExact(sequence))) {
            __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0);
            __Pyx_INCREF(__pyx_t_3);
            __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1);
            __Pyx_INCREF(__pyx_t_7);
          } else {
            __pyx_t_3 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference);
            if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1179, __pyx_L1_error)
            __Pyx_XGOTREF(__pyx_t_3);
            __pyx_t_7 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference);
            if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1179, __pyx_L1_error)
            __Pyx_XGOTREF(__pyx_t_7);
          }
          #else
          __pyx_t_3 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1179, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_7 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1179, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          #endif
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        } else {
          Py_ssize_t index = -1;
          __pyx_t_10 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 1179, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_10);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __pyx_t_15 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_10);
          index = 0; __pyx_t_3 = __pyx_t_15(__pyx_t_10); if (unlikely(!__pyx_t_3)) goto __pyx_L12_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_3);
          index = 1; __pyx_t_7 = __pyx_t_15(__pyx_t_10); if (unlikely(!__pyx_t_7)) goto __pyx_L12_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_7);
          if (__Pyx_IternextUnpackEndCheck(__pyx_t_15(__pyx_t_10), 2) < (0)) __PYX_ERR(3, 1179, __pyx_L1_error)
          __pyx_t_15 = NULL;
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          goto __pyx_L13_unpacking_done;
          __pyx_L12_unpacking_failed:;
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          __pyx_t_15 = NULL;
          if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
          __PYX_ERR(3, 1179, __pyx_L1_error)
          __pyx_L13_unpacking_done:;
        }
        __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_3);
        __pyx_t_3 = 0;
        __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_7);
        __pyx_t_7 = 0;

        /* "pyarrow/scalar.pxi":1180
 * 
 *         for key, value in zip(self.keys(), self.values.field(self.type.item_field.name)):
 *             if key in result_dict:             # <<<<<<<<<<<<<<
 *                 if maps_as_pydicts == "strict":
 *                     raise KeyError(
*/
        __pyx_t_4 = (__Pyx_PyDict_ContainsTF(__pyx_v_key, __pyx_v_result_dict, Py_EQ)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(3, 1180, __pyx_L1_error)
        if (__pyx_t_4) {

          /* "pyarrow/scalar.pxi":1181
 *         for key, value in zip(self.keys(), self.values.field(self.type.item_field.name)):
 *             if key in result_dict:
 *                 if maps_as_pydicts == "strict":             # <<<<<<<<<<<<<<
 *                     raise KeyError(
 *                         "Converting to Python dictionary is not supported in strict mode "
*/
          __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_v_maps_as_pydicts, __pyx_mstate_global->__pyx_n_u_strict, Py_EQ)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(3, 1181, __pyx_L1_error)
          if (unlikely(__pyx_t_4)) {

            /* "pyarrow/scalar.pxi":1182
 *             if key in result_dict:
 *                 if maps_as_pydicts == "strict":
 *                     raise KeyError(             # <<<<<<<<<<<<<<
 *                         "Converting to Python dictionary is not supported in strict mode "
 *                         f"when duplicate keys are present (duplicate key was '{key}')."
*/
            __pyx_t_7 = NULL;

            /* "pyarrow/scalar.pxi":1184
 *                     raise KeyError(
 *                         "Converting to Python dictionary is not supported in strict mode "
 *                         f"when duplicate keys are present (duplicate key was '{key}')."             # <<<<<<<<<<<<<<
 *                     )
 *                 else:
*/
            __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_v_key, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1184, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            __pyx_t_6[0] = __pyx_mstate_global->__pyx_kp_u_Converting_to_Python_dictionary_2;
            __pyx_t_6[1] = __pyx_t_3;
            __pyx_t_6[2] = __pyx_mstate_global->__pyx_kp_u__11;

            /* "pyarrow/scalar.pxi":1183
 *                 if maps_as_pydicts == "strict":
 *                     raise KeyError(
 *                         "Converting to Python dictionary is not supported in strict mode "             # <<<<<<<<<<<<<<
 *                         f"when duplicate keys are present (duplicate key was '{key}')."
 *                     )
*/
            __pyx_t_10 = __Pyx_PyUnicode_Join(__pyx_t_6, 3, 116 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + 3, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3));
            if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 1183, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_10);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __pyx_t_8 = 1;
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_10};
              __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_KeyError)), __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1182, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_1);
            }
            __Pyx_Raise(__pyx_t_1, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            __PYX_ERR(3, 1182, __pyx_L1_error)

            /* "pyarrow/scalar.pxi":1181
 *         for key, value in zip(self.keys(), self.values.field(self.type.item_field.name)):
 *             if key in result_dict:
 *                 if maps_as_pydicts == "strict":             # <<<<<<<<<<<<<<
 *                     raise KeyError(
 *                         "Converting to Python dictionary is not supported in strict mode "
*/
          }

          /* "pyarrow/scalar.pxi":1187
 *                     )
 *                 else:
 *                     warnings.warn(             # <<<<<<<<<<<<<<
 *                         f"Encountered key '{key}' which was already encountered.")
 *             result_dict[key] = value.as_py(maps_as_pydicts=maps_as_pydicts)
*/
          /*else*/ {
            __pyx_t_10 = NULL;
            __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_warnings); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1187, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_7);
            __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_warn); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1187, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

            /* "pyarrow/scalar.pxi":1188
 *                 else:
 *                     warnings.warn(
 *                         f"Encountered key '{key}' which was already encountered.")             # <<<<<<<<<<<<<<
 *             result_dict[key] = value.as_py(maps_as_pydicts=maps_as_pydicts)
 *         return result_dict
*/
            __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_v_key, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1188, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_7);
            __pyx_t_6[0] = __pyx_mstate_global->__pyx_kp_u_Encountered_key;
            __pyx_t_6[1] = __pyx_t_7;
            __pyx_t_6[2] = __pyx_mstate_global->__pyx_kp_u_which_was_already_encountered;
            __pyx_t_11 = __Pyx_PyUnicode_Join(__pyx_t_6, 3, 17 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7) + 32, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7));
            if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 1188, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_11);
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
            __pyx_t_8 = 1;
            #if CYTHON_UNPACK_METHODS
            if (unlikely(PyMethod_Check(__pyx_t_3))) {
              __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
              assert(__pyx_t_10);
              PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
              __Pyx_INCREF(__pyx_t_10);
              __Pyx_INCREF(__pyx__function);
              __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
              __pyx_t_8 = 0;
            }
            #endif
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_11};
              __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1187, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_1);
            }
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          }

          /* "pyarrow/scalar.pxi":1180
 * 
 *         for key, value in zip(self.keys(), self.values.field(self.type.item_field.name)):
 *             if key in result_dict:             # <<<<<<<<<<<<<<
 *                 if maps_as_pydicts == "strict":
 *                     raise KeyError(
*/
        }

        /* "pyarrow/scalar.pxi":1189
 *                     warnings.warn(
 *                         f"Encountered key '{key}' which was already encountered.")
 *             result_dict[key] = value.as_py(maps_as_pydicts=maps_as_pydicts)             # <<<<<<<<<<<<<<
 *         return result_dict
 * 
*/
        __pyx_t_3 = __pyx_v_value;
        __Pyx_INCREF(__pyx_t_3);
        __pyx_t_8 = 0;
        {
          PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_3, NULL};
          __pyx_t_11 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 1189, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_11);
          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_maps_as_pydicts, __pyx_v_maps_as_pydicts, __pyx_t_11, __pyx_callargs+1, 0) < (0)) __PYX_ERR(3, 1189, __pyx_L1_error)
          __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_as_py, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_11);
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1189, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
        }
        if (unlikely((PyDict_SetItem(__pyx_v_result_dict, __pyx_v_key, __pyx_t_1) < 0))) __PYX_ERR(3, 1189, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

        /* "pyarrow/scalar.pxi":1179
 *             return result_dict
 * 
 *         for key, value in zip(self.keys(), self.values.field(self.type.item_field.name)):             # <<<<<<<<<<<<<<
 *             if key in result_dict:
 *                 if maps_as_pydicts == "strict":
*/
      }
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "pyarrow/scalar.pxi":1190
 *                         f"Encountered key '{key}' which was already encountered.")
 *             result_dict[key] = value.as_py(maps_as_pydicts=maps_as_pydicts)
 *         return result_dict             # <<<<<<<<<<<<<<
 * 
 *     def keys(self):
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_result_dict);
      __pyx_r = __pyx_v_result_dict;
      goto __pyx_L0;

      /* "pyarrow/scalar.pxi":1147
 *             yield (k.as_py(), v.as_py())
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return this value as a Python list or dict, depending on 'maps_as_pydicts'.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_9);
      __Pyx_XDECREF(__pyx_t_10);
      __Pyx_XDECREF(__pyx_t_11);
      __Pyx_XDECREF(__pyx_t_12);
      __Pyx_AddTraceback("pyarrow.lib.MapScalar.as_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_result_dict);
      __Pyx_XDECREF(__pyx_v_key);
      __Pyx_XDECREF(__pyx_v_value);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/scalar.pxi":1192
 *         return result_dict
 * 
 *     def keys(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the keys of the map as a list.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_9MapScalar_8keys(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_9MapScalar_7keys, "MapScalar.keys(self)\n\nReturn the keys of the map as a list.");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_9MapScalar_8keys = {"keys", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_9MapScalar_8keys, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_9MapScalar_7keys};
    static PyObject *__pyx_pw_7pyarrow_3lib_9MapScalar_8keys(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("keys (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("keys", 1, 0, 0, __pyx_nargs); return NULL; }
      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
      if (unlikely(__pyx_kwds_len < 0)) return NULL;
      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("keys", __pyx_kwds); return NULL;}
      __pyx_r = __pyx_pf_7pyarrow_3lib_9MapScalar_7keys(((struct __pyx_obj_7pyarrow_3lib_MapScalar *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_9MapScalar_7keys(struct __pyx_obj_7pyarrow_3lib_MapScalar *__pyx_v_self) {
      PyObject *__pyx_v_arr = NULL;
      PyObject *__pyx_v_key_field = NULL;
      PyObject *__pyx_9genexpr13__pyx_v_k = NULL;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_t_2;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      size_t __pyx_t_5;
      Py_ssize_t __pyx_t_6;
      PyObject *(*__pyx_t_7)(PyObject *);
      PyObject *__pyx_t_8 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("keys", 0);

      /* "pyarrow/scalar.pxi":1196
 *         Return the keys of the map as a list.
 *         """
 *         arr = self.values             # <<<<<<<<<<<<<<
 *         if arr is None:
 *             return []
*/
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_values); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1196, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_v_arr = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "pyarrow/scalar.pxi":1197
 *         """
 *         arr = self.values
 *         if arr is None:             # <<<<<<<<<<<<<<
 *             return []
 *         key_field = self.type.key_field.name
*/
      __pyx_t_2 = (__pyx_v_arr == Py_None);
      if (__pyx_t_2) {

        /* "pyarrow/scalar.pxi":1198
 *         arr = self.values
 *         if arr is None:
 *             return []             # <<<<<<<<<<<<<<
 *         key_field = self.type.key_field.name
 *         return [k.as_py() for k in arr.field(key_field)]
*/
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1198, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_r = __pyx_t_1;
        __pyx_t_1 = 0;
        goto __pyx_L0;

        /* "pyarrow/scalar.pxi":1197
 *         """
 *         arr = self.values
 *         if arr is None:             # <<<<<<<<<<<<<<
 *             return []
 *         key_field = self.type.key_field.name
*/
      }

      /* "pyarrow/scalar.pxi":1199
 *         if arr is None:
 *             return []
 *         key_field = self.type.key_field.name             # <<<<<<<<<<<<<<
 *         return [k.as_py() for k in arr.field(key_field)]
 * 
*/
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1199, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_key_field); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1199, __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_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1199, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_v_key_field = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "pyarrow/scalar.pxi":1200
 *             return []
 *         key_field = self.type.key_field.name
 *         return [k.as_py() for k in arr.field(key_field)]             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      { /* enter inner scope */
        __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1200, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_4 = __pyx_v_arr;
        __Pyx_INCREF(__pyx_t_4);
        __pyx_t_5 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_key_field};
          __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_field, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1200, __pyx_L6_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
          __pyx_t_4 = __pyx_t_3; __Pyx_INCREF(__pyx_t_4);
          __pyx_t_6 = 0;
          __pyx_t_7 = NULL;
        } else {
          __pyx_t_6 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1200, __pyx_L6_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1200, __pyx_L6_error)
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        for (;;) {
          if (likely(!__pyx_t_7)) {
            if (likely(PyList_CheckExact(__pyx_t_4))) {
              {
                Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_4);
                #if !CYTHON_ASSUME_SAFE_SIZE
                if (unlikely((__pyx_temp < 0))) __PYX_ERR(3, 1200, __pyx_L6_error)
                #endif
                if (__pyx_t_6 >= __pyx_temp) break;
              }
              __pyx_t_3 = __Pyx_PyList_GetItemRefFast(__pyx_t_4, __pyx_t_6, __Pyx_ReferenceSharing_OwnStrongReference);
              ++__pyx_t_6;
            } else {
              {
                Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_4);
                #if !CYTHON_ASSUME_SAFE_SIZE
                if (unlikely((__pyx_temp < 0))) __PYX_ERR(3, 1200, __pyx_L6_error)
                #endif
                if (__pyx_t_6 >= __pyx_temp) break;
              }
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_3 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_6));
              #else
              __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_6);
              #endif
              ++__pyx_t_6;
            }
            if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1200, __pyx_L6_error)
          } else {
            __pyx_t_3 = __pyx_t_7(__pyx_t_4);
            if (unlikely(!__pyx_t_3)) {
              PyObject* exc_type = PyErr_Occurred();
              if (exc_type) {
                if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(3, 1200, __pyx_L6_error)
                PyErr_Clear();
              }
              break;
            }
          }
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_XDECREF_SET(__pyx_9genexpr13__pyx_v_k, __pyx_t_3);
          __pyx_t_3 = 0;
          __pyx_t_8 = __pyx_9genexpr13__pyx_v_k;
          __Pyx_INCREF(__pyx_t_8);
          __pyx_t_5 = 0;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_8, NULL};
            __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_as_py, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1200, __pyx_L6_error)
            __Pyx_GOTREF(__pyx_t_3);
          }
          if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_3))) __PYX_ERR(3, 1200, __pyx_L6_error)
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_XDECREF(__pyx_9genexpr13__pyx_v_k); __pyx_9genexpr13__pyx_v_k = 0;
        goto __pyx_L10_exit_scope;
        __pyx_L6_error:;
        __Pyx_XDECREF(__pyx_9genexpr13__pyx_v_k); __pyx_9genexpr13__pyx_v_k = 0;
        goto __pyx_L1_error;
        __pyx_L10_exit_scope:;
      } /* exit inner scope */
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/scalar.pxi":1192
 *         return result_dict
 * 
 *     def keys(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the keys of the map as a list.
*/

      /* 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_8);
      __Pyx_AddTraceback("pyarrow.lib.MapScalar.keys", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_arr);
      __Pyx_XDECREF(__pyx_v_key_field);
      __Pyx_XDECREF(__pyx_9genexpr13__pyx_v_k);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/scalar.pxi":1208
 *     """
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def _reconstruct(type, is_valid, index, dictionary):
 *         cdef:
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_16DictionaryScalar_1_reconstruct(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_16DictionaryScalar__reconstruct, "DictionaryScalar._reconstruct(type, is_valid, index, dictionary)");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_16DictionaryScalar_1_reconstruct = {"_reconstruct", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_16DictionaryScalar_1_reconstruct, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_16DictionaryScalar__reconstruct};
    static PyObject *__pyx_pw_7pyarrow_3lib_16DictionaryScalar_1_reconstruct(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_type = 0;
      PyObject *__pyx_v_is_valid = 0;
      PyObject *__pyx_v_index = 0;
      PyObject *__pyx_v_dictionary = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[4] = {0,0,0,0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("_reconstruct (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_type,&__pyx_mstate_global->__pyx_n_u_is_valid,&__pyx_mstate_global->__pyx_n_u_index,&__pyx_mstate_global->__pyx_n_u_dictionary,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(3, 1208, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  4:
            values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(3, 1208, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  3:
            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(3, 1208, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(3, 1208, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(3, 1208, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_reconstruct", 0) < (0)) __PYX_ERR(3, 1208, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 4; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_reconstruct", 1, 4, 4, i); __PYX_ERR(3, 1208, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 4)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(3, 1208, __pyx_L3_error)
          values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(3, 1208, __pyx_L3_error)
          values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(3, 1208, __pyx_L3_error)
          values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(3, 1208, __pyx_L3_error)
        }
        __pyx_v_type = values[0];
        __pyx_v_is_valid = values[1];
        __pyx_v_index = values[2];
        __pyx_v_dictionary = values[3];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("_reconstruct", 1, 4, 4, __pyx_nargs); __PYX_ERR(3, 1208, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.DictionaryScalar._reconstruct", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_16DictionaryScalar__reconstruct(__pyx_v_type, __pyx_v_is_valid, __pyx_v_index, __pyx_v_dictionary);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_16DictionaryScalar__reconstruct(PyObject *__pyx_v_type, PyObject *__pyx_v_is_valid, PyObject *__pyx_v_index, PyObject *__pyx_v_dictionary) {
      arrow::DictionaryScalar::ValueType __pyx_v_value;
      std::shared_ptr< arrow::DictionaryScalar>  __pyx_v_wrapped;
      struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v_type_ = 0;
      struct __pyx_obj_7pyarrow_3lib_Scalar *__pyx_v_index_ = 0;
      struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_dictionary_ = 0;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      struct __pyx_opt_args_7pyarrow_3lib_ensure_type __pyx_t_2;
      int __pyx_t_3;
      int __pyx_t_4;
      PyObject *__pyx_t_5 = NULL;
      size_t __pyx_t_6;
      PyObject *__pyx_t_7 = NULL;
      PyObject *__pyx_t_8 = NULL;
      PyObject *__pyx_t_9 = NULL;
      std::shared_ptr< arrow::Scalar>  __pyx_t_10;
      std::shared_ptr< arrow::Array>  __pyx_t_11;
      std::shared_ptr< arrow::DataType>  __pyx_t_12;
      bool __pyx_t_13;
      std::shared_ptr< arrow::DictionaryScalar>  __pyx_t_14;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("_reconstruct", 0);

      /* "pyarrow/scalar.pxi":1217
 *             Array dictionary_
 * 
 *         type_ = ensure_type(type, allow_none=False)             # <<<<<<<<<<<<<<
 *         if not isinstance(type_, DictionaryType):
 *             raise TypeError('Must pass a DictionaryType instance')
*/
      __pyx_t_2.__pyx_n = 1;
      __pyx_t_2.allow_none = 0;
      __pyx_t_1 = ((PyObject *)__pyx_f_7pyarrow_3lib_ensure_type(__pyx_v_type, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1217, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_v_type_ = ((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_t_1);
      __pyx_t_1 = 0;

      /* "pyarrow/scalar.pxi":1218
 * 
 *         type_ = ensure_type(type, allow_none=False)
 *         if not isinstance(type_, DictionaryType):             # <<<<<<<<<<<<<<
 *             raise TypeError('Must pass a DictionaryType instance')
 * 
*/
      __pyx_t_3 = __Pyx_TypeCheck(((PyObject *)__pyx_v_type_), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DictionaryType); 
      __pyx_t_4 = (!__pyx_t_3);
      if (unlikely(__pyx_t_4)) {

        /* "pyarrow/scalar.pxi":1219
 *         type_ = ensure_type(type, allow_none=False)
 *         if not isinstance(type_, DictionaryType):
 *             raise TypeError('Must pass a DictionaryType instance')             # <<<<<<<<<<<<<<
 * 
 *         if isinstance(index, Scalar):
*/
        __pyx_t_5 = NULL;
        __pyx_t_6 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_Must_pass_a_DictionaryType_insta};
          __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1219, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
        }
        __Pyx_Raise(__pyx_t_1, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __PYX_ERR(3, 1219, __pyx_L1_error)

        /* "pyarrow/scalar.pxi":1218
 * 
 *         type_ = ensure_type(type, allow_none=False)
 *         if not isinstance(type_, DictionaryType):             # <<<<<<<<<<<<<<
 *             raise TypeError('Must pass a DictionaryType instance')
 * 
*/
      }

      /* "pyarrow/scalar.pxi":1221
 *             raise TypeError('Must pass a DictionaryType instance')
 * 
 *         if isinstance(index, Scalar):             # <<<<<<<<<<<<<<
 *             if not index.type.equals(type.index_type):
 *                 raise TypeError("The Scalar value passed as index must have "
*/
      __pyx_t_4 = __Pyx_TypeCheck(__pyx_v_index, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Scalar); 
      if (__pyx_t_4) {

        /* "pyarrow/scalar.pxi":1222
 * 
 *         if isinstance(index, Scalar):
 *             if not index.type.equals(type.index_type):             # <<<<<<<<<<<<<<
 *                 raise TypeError("The Scalar value passed as index must have "
 *                                 "identical type to the dictionary type's "
*/
        __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_mstate_global->__pyx_n_u_type); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1222, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_5 = __pyx_t_7;
        __Pyx_INCREF(__pyx_t_5);
        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_type, __pyx_mstate_global->__pyx_n_u_index_type); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 1222, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_6 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_8};
          __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_equals, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1222, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
        }
        __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(3, 1222, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_3 = (!__pyx_t_4);
        if (unlikely(__pyx_t_3)) {

          /* "pyarrow/scalar.pxi":1223
 *         if isinstance(index, Scalar):
 *             if not index.type.equals(type.index_type):
 *                 raise TypeError("The Scalar value passed as index must have "             # <<<<<<<<<<<<<<
 *                                 "identical type to the dictionary type's "
 *                                 "index_type")
*/
          __pyx_t_7 = NULL;
          __pyx_t_6 = 1;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_The_Scalar_value_passed_as_index};
            __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1223, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_1);
          }
          __Pyx_Raise(__pyx_t_1, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __PYX_ERR(3, 1223, __pyx_L1_error)

          /* "pyarrow/scalar.pxi":1222
 * 
 *         if isinstance(index, Scalar):
 *             if not index.type.equals(type.index_type):             # <<<<<<<<<<<<<<
 *                 raise TypeError("The Scalar value passed as index must have "
 *                                 "identical type to the dictionary type's "
*/
        }

        /* "pyarrow/scalar.pxi":1226
 *                                 "identical type to the dictionary type's "
 *                                 "index_type")
 *             index_ = index             # <<<<<<<<<<<<<<
 *         else:
 *             index_ = scalar(index, type=type_.index_type)
*/
        __pyx_t_1 = __pyx_v_index;
        __Pyx_INCREF(__pyx_t_1);
        if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Scalar))))) __PYX_ERR(3, 1226, __pyx_L1_error)
        __pyx_v_index_ = ((struct __pyx_obj_7pyarrow_3lib_Scalar *)__pyx_t_1);
        __pyx_t_1 = 0;

        /* "pyarrow/scalar.pxi":1221
 *             raise TypeError('Must pass a DictionaryType instance')
 * 
 *         if isinstance(index, Scalar):             # <<<<<<<<<<<<<<
 *             if not index.type.equals(type.index_type):
 *                 raise TypeError("The Scalar value passed as index must have "
*/
        goto __pyx_L4;
      }

      /* "pyarrow/scalar.pxi":1228
 *             index_ = index
 *         else:
 *             index_ = scalar(index, type=type_.index_type)             # <<<<<<<<<<<<<<
 * 
 *         if isinstance(dictionary, Array):
*/
      /*else*/ {
        __pyx_t_7 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_scalar); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 1228, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_type_), __pyx_mstate_global->__pyx_n_u_index_type); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1228, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_6 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_8))) {
          __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8);
          assert(__pyx_t_7);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8);
          __Pyx_INCREF(__pyx_t_7);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_8, __pyx__function);
          __pyx_t_6 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_7, __pyx_v_index};
          __pyx_t_9 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 1228, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_type, __pyx_t_5, __pyx_t_9, __pyx_callargs+2, 0) < (0)) __PYX_ERR(3, 1228, __pyx_L1_error)
          __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_9);
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1228, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
        }
        if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Scalar))))) __PYX_ERR(3, 1228, __pyx_L1_error)
        __pyx_v_index_ = ((struct __pyx_obj_7pyarrow_3lib_Scalar *)__pyx_t_1);
        __pyx_t_1 = 0;
      }
      __pyx_L4:;

      /* "pyarrow/scalar.pxi":1230
 *             index_ = scalar(index, type=type_.index_type)
 * 
 *         if isinstance(dictionary, Array):             # <<<<<<<<<<<<<<
 *             if not dictionary.type.equals(type.value_type):
 *                 raise TypeError("The Array passed as dictionary must have "
*/
      __pyx_t_3 = __Pyx_TypeCheck(__pyx_v_dictionary, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array); 
      if (__pyx_t_3) {

        /* "pyarrow/scalar.pxi":1231
 * 
 *         if isinstance(dictionary, Array):
 *             if not dictionary.type.equals(type.value_type):             # <<<<<<<<<<<<<<
 *                 raise TypeError("The Array passed as dictionary must have "
 *                                 "identical type to the dictionary type's "
*/
        __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_dictionary, __pyx_mstate_global->__pyx_n_u_type); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 1231, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_8 = __pyx_t_9;
        __Pyx_INCREF(__pyx_t_8);
        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_type, __pyx_mstate_global->__pyx_n_u_value_type); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1231, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_6 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_5};
          __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_equals, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1231, __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(3, 1231, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_4 = (!__pyx_t_3);
        if (unlikely(__pyx_t_4)) {

          /* "pyarrow/scalar.pxi":1232
 *         if isinstance(dictionary, Array):
 *             if not dictionary.type.equals(type.value_type):
 *                 raise TypeError("The Array passed as dictionary must have "             # <<<<<<<<<<<<<<
 *                                 "identical type to the dictionary type's "
 *                                 "value_type")
*/
          __pyx_t_9 = NULL;
          __pyx_t_6 = 1;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_mstate_global->__pyx_kp_u_The_Array_passed_as_dictionary_m};
            __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1232, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_1);
          }
          __Pyx_Raise(__pyx_t_1, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __PYX_ERR(3, 1232, __pyx_L1_error)

          /* "pyarrow/scalar.pxi":1231
 * 
 *         if isinstance(dictionary, Array):
 *             if not dictionary.type.equals(type.value_type):             # <<<<<<<<<<<<<<
 *                 raise TypeError("The Array passed as dictionary must have "
 *                                 "identical type to the dictionary type's "
*/
        }

        /* "pyarrow/scalar.pxi":1235
 *                                 "identical type to the dictionary type's "
 *                                 "value_type")
 *             dictionary_ = dictionary             # <<<<<<<<<<<<<<
 *         else:
 *             dictionary_ = array(dictionary, type=type_.value_type)
*/
        __pyx_t_1 = __pyx_v_dictionary;
        __Pyx_INCREF(__pyx_t_1);
        if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array))))) __PYX_ERR(3, 1235, __pyx_L1_error)
        __pyx_v_dictionary_ = ((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_t_1);
        __pyx_t_1 = 0;

        /* "pyarrow/scalar.pxi":1230
 *             index_ = scalar(index, type=type_.index_type)
 * 
 *         if isinstance(dictionary, Array):             # <<<<<<<<<<<<<<
 *             if not dictionary.type.equals(type.value_type):
 *                 raise TypeError("The Array passed as dictionary must have "
*/
        goto __pyx_L6;
      }

      /* "pyarrow/scalar.pxi":1237
 *             dictionary_ = dictionary
 *         else:
 *             dictionary_ = array(dictionary, type=type_.value_type)             # <<<<<<<<<<<<<<
 * 
 *         value.index = pyarrow_unwrap_scalar(index_)
*/
      /*else*/ {
        __pyx_t_9 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_array); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1237, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_type_), __pyx_mstate_global->__pyx_n_u_value_type); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 1237, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_6 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_5);
          assert(__pyx_t_9);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_9);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
          __pyx_t_6 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_9, __pyx_v_dictionary};
          __pyx_t_7 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1237, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_type, __pyx_t_8, __pyx_t_7, __pyx_callargs+2, 0) < (0)) __PYX_ERR(3, 1237, __pyx_L1_error)
          __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_7);
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1237, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
        }
        if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array))))) __PYX_ERR(3, 1237, __pyx_L1_error)
        __pyx_v_dictionary_ = ((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_t_1);
        __pyx_t_1 = 0;
      }
      __pyx_L6:;

      /* "pyarrow/scalar.pxi":1239
 *             dictionary_ = array(dictionary, type=type_.value_type)
 * 
 *         value.index = pyarrow_unwrap_scalar(index_)             # <<<<<<<<<<<<<<
 *         value.dictionary = pyarrow_unwrap_array(dictionary_)
 * 
*/
      __pyx_t_10 = pyarrow_unwrap_scalar(((PyObject *)__pyx_v_index_)); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1239, __pyx_L1_error)
      __pyx_v_value.index = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_10);

      /* "pyarrow/scalar.pxi":1240
 * 
 *         value.index = pyarrow_unwrap_scalar(index_)
 *         value.dictionary = pyarrow_unwrap_array(dictionary_)             # <<<<<<<<<<<<<<
 * 
 *         wrapped = make_shared[CDictionaryScalar](
*/
      __pyx_t_11 = pyarrow_unwrap_array(((PyObject *)__pyx_v_dictionary_)); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1240, __pyx_L1_error)
      __pyx_v_value.dictionary = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_11);

      /* "pyarrow/scalar.pxi":1243
 * 
 *         wrapped = make_shared[CDictionaryScalar](
 *             value, pyarrow_unwrap_data_type(type_), <c_bool>(is_valid)             # <<<<<<<<<<<<<<
 *         )
 *         return Scalar.wrap(<shared_ptr[CScalar]> wrapped)
*/
      __pyx_t_12 = pyarrow_unwrap_data_type(((PyObject *)__pyx_v_type_)); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1243, __pyx_L1_error)
      __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_v_is_valid); if (unlikely((__pyx_t_13 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1243, __pyx_L1_error)

      /* "pyarrow/scalar.pxi":1242
 *         value.dictionary = pyarrow_unwrap_array(dictionary_)
 * 
 *         wrapped = make_shared[CDictionaryScalar](             # <<<<<<<<<<<<<<
 *             value, pyarrow_unwrap_data_type(type_), <c_bool>(is_valid)
 *         )
*/
      try {
        __pyx_t_14 = std::make_shared< arrow::DictionaryScalar>(__pyx_v_value, __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_12), ((bool)__pyx_t_13));
      } catch(...) {
        __Pyx_CppExn2PyErr();
        __PYX_ERR(3, 1242, __pyx_L1_error)
      }
      __pyx_v_wrapped = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_14);

      /* "pyarrow/scalar.pxi":1245
 *             value, pyarrow_unwrap_data_type(type_), <c_bool>(is_valid)
 *         )
 *         return Scalar.wrap(<shared_ptr[CScalar]> wrapped)             # <<<<<<<<<<<<<<
 * 
 *     def __reduce__(self):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __pyx_f_7pyarrow_3lib_6Scalar_wrap(((std::shared_ptr< arrow::Scalar> )__pyx_v_wrapped)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1245, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/scalar.pxi":1208
 *     """
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def _reconstruct(type, is_valid, index, dictionary):
 *         cdef:
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_8);
      __Pyx_XDECREF(__pyx_t_9);
      __Pyx_AddTraceback("pyarrow.lib.DictionaryScalar._reconstruct", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF((PyObject *)__pyx_v_type_);
      __Pyx_XDECREF((PyObject *)__pyx_v_index_);
      __Pyx_XDECREF((PyObject *)__pyx_v_dictionary_);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/scalar.pxi":1247
 *         return Scalar.wrap(<shared_ptr[CScalar]> wrapped)
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         return DictionaryScalar._reconstruct, (
 *             self.type, self.is_valid, self.index, self.dictionary
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_16DictionaryScalar_3__reduce__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_16DictionaryScalar_2__reduce__, "DictionaryScalar.__reduce__(self)");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_16DictionaryScalar_3__reduce__ = {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_16DictionaryScalar_3__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_16DictionaryScalar_2__reduce__};
    static PyObject *__pyx_pw_7pyarrow_3lib_16DictionaryScalar_3__reduce__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__reduce__ (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce__", 1, 0, 0, __pyx_nargs); return NULL; }
      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
      if (unlikely(__pyx_kwds_len < 0)) return NULL;
      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce__", __pyx_kwds); return NULL;}
      __pyx_r = __pyx_pf_7pyarrow_3lib_16DictionaryScalar_2__reduce__(((struct __pyx_obj_7pyarrow_3lib_DictionaryScalar *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_16DictionaryScalar_2__reduce__(struct __pyx_obj_7pyarrow_3lib_DictionaryScalar *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      PyObject *__pyx_t_5 = NULL;
      PyObject *__pyx_t_6 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__reduce__", 0);

      /* "pyarrow/scalar.pxi":1248
 * 
 *     def __reduce__(self):
 *         return DictionaryScalar._reconstruct, (             # <<<<<<<<<<<<<<
 *             self.type, self.is_valid, self.index, self.dictionary
 *         )
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DictionaryScalar), __pyx_mstate_global->__pyx_n_u_reconstruct); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1248, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);

      /* "pyarrow/scalar.pxi":1249
 *     def __reduce__(self):
 *         return DictionaryScalar._reconstruct, (
 *             self.type, self.is_valid, self.index, self.dictionary             # <<<<<<<<<<<<<<
 *         )
 * 
*/
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1249, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_is_valid); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1249, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1249, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dictionary); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1249, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = PyTuple_New(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1249, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_2);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2) != (0)) __PYX_ERR(3, 1249, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_3);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_3) != (0)) __PYX_ERR(3, 1249, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_4);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_4) != (0)) __PYX_ERR(3, 1249, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_5);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_t_5) != (0)) __PYX_ERR(3, 1249, __pyx_L1_error);
      __pyx_t_2 = 0;
      __pyx_t_3 = 0;
      __pyx_t_4 = 0;
      __pyx_t_5 = 0;

      /* "pyarrow/scalar.pxi":1248
 * 
 *     def __reduce__(self):
 *         return DictionaryScalar._reconstruct, (             # <<<<<<<<<<<<<<
 *             self.type, self.is_valid, self.index, self.dictionary
 *         )
*/
      __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1248, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_1);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1) != (0)) __PYX_ERR(3, 1248, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_6);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_6) != (0)) __PYX_ERR(3, 1248, __pyx_L1_error);
      __pyx_t_1 = 0;
      __pyx_t_6 = 0;
      __pyx_r = __pyx_t_5;
      __pyx_t_5 = 0;
      goto __pyx_L0;

      /* "pyarrow/scalar.pxi":1247
 *         return Scalar.wrap(<shared_ptr[CScalar]> wrapped)
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         return DictionaryScalar._reconstruct, (
 *             self.type, self.is_valid, self.index, self.dictionary
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_AddTraceback("pyarrow.lib.DictionaryScalar.__reduce__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/scalar.pxi":1252
 *         )
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def index(self):
 *         """
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_16DictionaryScalar_5index_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_16DictionaryScalar_5index_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_16DictionaryScalar_5index___get__(((struct __pyx_obj_7pyarrow_3lib_DictionaryScalar *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_16DictionaryScalar_5index___get__(struct __pyx_obj_7pyarrow_3lib_DictionaryScalar *__pyx_v_self) {
       arrow::DictionaryScalar *__pyx_v_sp;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__get__", 0);

      /* "pyarrow/scalar.pxi":1257
 *         Return this value's underlying index as a scalar.
 *         """
 *         cdef CDictionaryScalar* sp = <CDictionaryScalar*> self.wrapped.get()             # <<<<<<<<<<<<<<
 *         return Scalar.wrap(sp.value.index)
 * 
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "wrapped");
        __PYX_ERR(3, 1257, __pyx_L1_error)
      }
      __pyx_v_sp = (( arrow::DictionaryScalar *)__pyx_v_self->__pyx_base.wrapped.get());

      /* "pyarrow/scalar.pxi":1258
 *         """
 *         cdef CDictionaryScalar* sp = <CDictionaryScalar*> self.wrapped.get()
 *         return Scalar.wrap(sp.value.index)             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __pyx_f_7pyarrow_3lib_6Scalar_wrap(__pyx_v_sp->value.index); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1258, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/scalar.pxi":1252
 *         )
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def index(self):
 *         """
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("pyarrow.lib.DictionaryScalar.index.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/scalar.pxi":1260
 *         return Scalar.wrap(sp.value.index)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def value(self):
 *         """
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_16DictionaryScalar_5value_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_16DictionaryScalar_5value_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_16DictionaryScalar_5value___get__(((struct __pyx_obj_7pyarrow_3lib_DictionaryScalar *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_16DictionaryScalar_5value___get__(struct __pyx_obj_7pyarrow_3lib_DictionaryScalar *__pyx_v_self) {
       arrow::DictionaryScalar *__pyx_v_sp;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      std::shared_ptr< arrow::Scalar>  __pyx_t_1;
      PyObject *__pyx_t_2 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__get__", 0);

      /* "pyarrow/scalar.pxi":1265
 *         Return the encoded value as a scalar.
 *         """
 *         cdef CDictionaryScalar* sp = <CDictionaryScalar*> self.wrapped.get()             # <<<<<<<<<<<<<<
 *         return Scalar.wrap(GetResultValue(sp.GetEncodedValue()))
 * 
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "wrapped");
        __PYX_ERR(3, 1265, __pyx_L1_error)
      }
      __pyx_v_sp = (( arrow::DictionaryScalar *)__pyx_v_self->__pyx_base.wrapped.get());

      /* "pyarrow/scalar.pxi":1266
 *         """
 *         cdef CDictionaryScalar* sp = <CDictionaryScalar*> self.wrapped.get()
 *         return Scalar.wrap(GetResultValue(sp.GetEncodedValue()))             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = arrow::py::GetResultValue<std::shared_ptr< arrow::Scalar> >(__pyx_v_sp->GetEncodedValue()); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1266, __pyx_L1_error)
      __pyx_t_2 = __pyx_f_7pyarrow_3lib_6Scalar_wrap(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1266, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;

      /* "pyarrow/scalar.pxi":1260
 *         return Scalar.wrap(sp.value.index)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def value(self):
 *         """
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_AddTraceback("pyarrow.lib.DictionaryScalar.value.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/scalar.pxi":1268
 *         return Scalar.wrap(GetResultValue(sp.GetEncodedValue()))
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def dictionary(self):
 *         cdef CDictionaryScalar* sp = <CDictionaryScalar*> self.wrapped.get()
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_16DictionaryScalar_10dictionary_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_16DictionaryScalar_10dictionary_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_16DictionaryScalar_10dictionary___get__(((struct __pyx_obj_7pyarrow_3lib_DictionaryScalar *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_16DictionaryScalar_10dictionary___get__(struct __pyx_obj_7pyarrow_3lib_DictionaryScalar *__pyx_v_self) {
       arrow::DictionaryScalar *__pyx_v_sp;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__get__", 0);

      /* "pyarrow/scalar.pxi":1270
 *     @property
 *     def dictionary(self):
 *         cdef CDictionaryScalar* sp = <CDictionaryScalar*> self.wrapped.get()             # <<<<<<<<<<<<<<
 *         return pyarrow_wrap_array(sp.value.dictionary)
 * 
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "wrapped");
        __PYX_ERR(3, 1270, __pyx_L1_error)
      }
      __pyx_v_sp = (( arrow::DictionaryScalar *)__pyx_v_self->__pyx_base.wrapped.get());

      /* "pyarrow/scalar.pxi":1271
 *     def dictionary(self):
 *         cdef CDictionaryScalar* sp = <CDictionaryScalar*> self.wrapped.get()
 *         return pyarrow_wrap_array(sp.value.dictionary)             # <<<<<<<<<<<<<<
 * 
 *     def as_py(self, *, maps_as_pydicts=None):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = pyarrow_wrap_array(__pyx_v_sp->value.dictionary); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1271, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/scalar.pxi":1268
 *         return Scalar.wrap(GetResultValue(sp.GetEncodedValue()))
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def dictionary(self):
 *         cdef CDictionaryScalar* sp = <CDictionaryScalar*> self.wrapped.get()
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("pyarrow.lib.DictionaryScalar.dictionary.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/scalar.pxi":1273
 *         return pyarrow_wrap_array(sp.value.dictionary)
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return this encoded value as a Python object.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_16DictionaryScalar_5as_py(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_16DictionaryScalar_4as_py, "DictionaryScalar.as_py(self, *, maps_as_pydicts=None)\n\nReturn this encoded value as a Python object.\n\nParameters\n----------\nmaps_as_pydicts : str, optional, default `None`\n    Valid values are `None`, 'lossy', or 'strict'.\n    The default behavior (`None`), is to convert Arrow Map arrays to\n    Python association lists (list-of-tuples) in the same order as the\n    Arrow Map, as in [(key1, value1), (key2, value2), ...].\n\n    If 'lossy' or 'strict', convert Arrow Map arrays to native Python dicts.\n\n    If 'lossy', whenever duplicate keys are detected, a warning will be printed.\n    The last seen value of a duplicate key will be in the Python dictionary.\n    If 'strict', this instead results in an exception being raised when detected.");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_16DictionaryScalar_5as_py = {"as_py", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_16DictionaryScalar_5as_py, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_16DictionaryScalar_4as_py};
    static PyObject *__pyx_pw_7pyarrow_3lib_16DictionaryScalar_5as_py(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_maps_as_pydicts = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("as_py (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_maps_as_pydicts,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(3, 1273, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, 0, __pyx_kwds_len, "as_py", 0) < (0)) __PYX_ERR(3, 1273, __pyx_L3_error)
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
        } else if (unlikely(__pyx_nargs != 0)) {
          goto __pyx_L5_argtuple_error;
        } else {
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
        }
        __pyx_v_maps_as_pydicts = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("as_py", 1, 0, 0, __pyx_nargs); __PYX_ERR(3, 1273, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.DictionaryScalar.as_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_16DictionaryScalar_4as_py(((struct __pyx_obj_7pyarrow_3lib_DictionaryScalar *)__pyx_v_self), __pyx_v_maps_as_pydicts);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_16DictionaryScalar_4as_py(struct __pyx_obj_7pyarrow_3lib_DictionaryScalar *__pyx_v_self, PyObject *__pyx_v_maps_as_pydicts) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      int __pyx_t_3;
      PyObject *__pyx_t_4 = NULL;
      PyObject *__pyx_t_5 = NULL;
      size_t __pyx_t_6;
      PyObject *__pyx_t_7 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("as_py", 0);

      /* "pyarrow/scalar.pxi":1291
 *             If 'strict', this instead results in an exception being raised when detected.
 *         """
 *         return self.value.as_py(maps_as_pydicts=maps_as_pydicts) if self.is_valid else None             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_is_valid); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1291, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(3, 1291, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (__pyx_t_3) {
        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_value); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1291, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_4 = __pyx_t_5;
        __Pyx_INCREF(__pyx_t_4);
        __pyx_t_6 = 0;
        {
          PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_4, NULL};
          __pyx_t_7 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1291, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_maps_as_pydicts, __pyx_v_maps_as_pydicts, __pyx_t_7, __pyx_callargs+1, 0) < (0)) __PYX_ERR(3, 1291, __pyx_L1_error)
          __pyx_t_2 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_as_py, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_7);
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1291, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __pyx_t_1 = __pyx_t_2;
        __pyx_t_2 = 0;
      } else {
        __Pyx_INCREF(Py_None);
        __pyx_t_1 = Py_None;
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/scalar.pxi":1273
 *         return pyarrow_wrap_array(sp.value.dictionary)
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return this encoded value as a Python object.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_7);
      __Pyx_AddTraceback("pyarrow.lib.DictionaryScalar.as_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/scalar.pxi":1298
 *     Concrete class for RunEndEncoded scalars.
 *     """
 *     @property             # <<<<<<<<<<<<<<
 *     def value(self):
 *         """
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_19RunEndEncodedScalar_5value_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_19RunEndEncodedScalar_5value_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_19RunEndEncodedScalar_5value___get__(((struct __pyx_obj_7pyarrow_3lib_RunEndEncodedScalar *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_19RunEndEncodedScalar_5value___get__(struct __pyx_obj_7pyarrow_3lib_RunEndEncodedScalar *__pyx_v_self) {
       arrow::RunEndEncodedScalar *__pyx_v_sp;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__get__", 0);

      /* "pyarrow/scalar.pxi":1303
 *         Return underlying value as a scalar.
 *         """
 *         cdef CRunEndEncodedScalar* sp = <CRunEndEncodedScalar*> self.wrapped.get()             # <<<<<<<<<<<<<<
 *         return Scalar.wrap(sp.value)
 * 
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "wrapped");
        __PYX_ERR(3, 1303, __pyx_L1_error)
      }
      __pyx_v_sp = (( arrow::RunEndEncodedScalar *)__pyx_v_self->__pyx_base.wrapped.get());

      /* "pyarrow/scalar.pxi":1304
 *         """
 *         cdef CRunEndEncodedScalar* sp = <CRunEndEncodedScalar*> self.wrapped.get()
 *         return Scalar.wrap(sp.value)             # <<<<<<<<<<<<<<
 * 
 *     def as_py(self, *, maps_as_pydicts=None):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __pyx_f_7pyarrow_3lib_6Scalar_wrap(__pyx_v_sp->value); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1304, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/scalar.pxi":1298
 *     Concrete class for RunEndEncoded scalars.
 *     """
 *     @property             # <<<<<<<<<<<<<<
 *     def value(self):
 *         """
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("pyarrow.lib.RunEndEncodedScalar.value.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/scalar.pxi":1306
 *         return Scalar.wrap(sp.value)
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return underlying value as a Python object.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_19RunEndEncodedScalar_1as_py(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_19RunEndEncodedScalar_as_py, "RunEndEncodedScalar.as_py(self, *, maps_as_pydicts=None)\n\nReturn underlying value as a Python object.\n\nParameters\n----------\nmaps_as_pydicts : str, optional, default `None`\n    Valid values are `None`, 'lossy', or 'strict'.\n    The default behavior (`None`), is to convert Arrow Map arrays to\n    Python association lists (list-of-tuples) in the same order as the\n    Arrow Map, as in [(key1, value1), (key2, value2), ...].\n\n    If 'lossy' or 'strict', convert Arrow Map arrays to native Python dicts.\n\n    If 'lossy', whenever duplicate keys are detected, a warning will be printed.\n    The last seen value of a duplicate key will be in the Python dictionary.\n    If 'strict', this instead results in an exception being raised when detected.");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_19RunEndEncodedScalar_1as_py = {"as_py", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_19RunEndEncodedScalar_1as_py, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_19RunEndEncodedScalar_as_py};
    static PyObject *__pyx_pw_7pyarrow_3lib_19RunEndEncodedScalar_1as_py(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_maps_as_pydicts = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("as_py (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_maps_as_pydicts,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(3, 1306, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, 0, __pyx_kwds_len, "as_py", 0) < (0)) __PYX_ERR(3, 1306, __pyx_L3_error)
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
        } else if (unlikely(__pyx_nargs != 0)) {
          goto __pyx_L5_argtuple_error;
        } else {
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
        }
        __pyx_v_maps_as_pydicts = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("as_py", 1, 0, 0, __pyx_nargs); __PYX_ERR(3, 1306, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.RunEndEncodedScalar.as_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_19RunEndEncodedScalar_as_py(((struct __pyx_obj_7pyarrow_3lib_RunEndEncodedScalar *)__pyx_v_self), __pyx_v_maps_as_pydicts);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_19RunEndEncodedScalar_as_py(struct __pyx_obj_7pyarrow_3lib_RunEndEncodedScalar *__pyx_v_self, PyObject *__pyx_v_maps_as_pydicts) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      size_t __pyx_t_4;
      PyObject *__pyx_t_5 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("as_py", 0);

      /* "pyarrow/scalar.pxi":1324
 *             If 'strict', this instead results in an exception being raised when detected.
 *         """
 *         return self.value.as_py(maps_as_pydicts=maps_as_pydicts)             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1324, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = __pyx_t_3;
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_4 = 0;
      {
        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, NULL};
        __pyx_t_5 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1324, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_maps_as_pydicts, __pyx_v_maps_as_pydicts, __pyx_t_5, __pyx_callargs+1, 0) < (0)) __PYX_ERR(3, 1324, __pyx_L1_error)
        __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_as_py, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_5);
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1324, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/scalar.pxi":1306
 *         return Scalar.wrap(sp.value)
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return underlying value as a Python object.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_AddTraceback("pyarrow.lib.RunEndEncodedScalar.as_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/scalar.pxi":1332
 *     """
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def value(self):
 *         """
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_11UnionScalar_5value_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_11UnionScalar_5value_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_11UnionScalar_5value___get__(((struct __pyx_obj_7pyarrow_3lib_UnionScalar *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_11UnionScalar_5value___get__(struct __pyx_obj_7pyarrow_3lib_UnionScalar *__pyx_v_self) {
       arrow::SparseUnionScalar *__pyx_v_sp;
       arrow::DenseUnionScalar *__pyx_v_dp;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      int __pyx_t_4;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__get__", 0);

      /* "pyarrow/scalar.pxi":1339
 *         cdef CSparseUnionScalar* sp
 *         cdef CDenseUnionScalar* dp
 *         if self.type.id == _Type_SPARSE_UNION:             # <<<<<<<<<<<<<<
 *             sp = <CSparseUnionScalar*> self.wrapped.get()
 *             return Scalar.wrap(sp.value[sp.child_id]) if sp.is_valid else None
*/
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1339, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_id); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1339, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::SPARSE_UNION); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1339, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1339, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(3, 1339, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_4) {

        /* "pyarrow/scalar.pxi":1340
 *         cdef CDenseUnionScalar* dp
 *         if self.type.id == _Type_SPARSE_UNION:
 *             sp = <CSparseUnionScalar*> self.wrapped.get()             # <<<<<<<<<<<<<<
 *             return Scalar.wrap(sp.value[sp.child_id]) if sp.is_valid else None
 *         else:
*/
        if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "wrapped");
          __PYX_ERR(3, 1340, __pyx_L1_error)
        }
        __pyx_v_sp = (( arrow::SparseUnionScalar *)__pyx_v_self->__pyx_base.wrapped.get());

        /* "pyarrow/scalar.pxi":1341
 *         if self.type.id == _Type_SPARSE_UNION:
 *             sp = <CSparseUnionScalar*> self.wrapped.get()
 *             return Scalar.wrap(sp.value[sp.child_id]) if sp.is_valid else None             # <<<<<<<<<<<<<<
 *         else:
 *             dp = <CDenseUnionScalar*> self.wrapped.get()
*/
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_4 = (__pyx_v_sp->is_valid != 0);
        if (__pyx_t_4) {
          __pyx_t_1 = __pyx_f_7pyarrow_3lib_6Scalar_wrap((__pyx_v_sp->value[__pyx_v_sp->child_id])); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1341, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_3 = __pyx_t_1;
          __pyx_t_1 = 0;
        } else {
          __Pyx_INCREF(Py_None);
          __pyx_t_3 = Py_None;
        }
        __pyx_r = __pyx_t_3;
        __pyx_t_3 = 0;
        goto __pyx_L0;

        /* "pyarrow/scalar.pxi":1339
 *         cdef CSparseUnionScalar* sp
 *         cdef CDenseUnionScalar* dp
 *         if self.type.id == _Type_SPARSE_UNION:             # <<<<<<<<<<<<<<
 *             sp = <CSparseUnionScalar*> self.wrapped.get()
 *             return Scalar.wrap(sp.value[sp.child_id]) if sp.is_valid else None
*/
      }

      /* "pyarrow/scalar.pxi":1343
 *             return Scalar.wrap(sp.value[sp.child_id]) if sp.is_valid else None
 *         else:
 *             dp = <CDenseUnionScalar*> self.wrapped.get()             # <<<<<<<<<<<<<<
 *             return Scalar.wrap(dp.value) if dp.is_valid else None
 * 
*/
      /*else*/ {
        if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "wrapped");
          __PYX_ERR(3, 1343, __pyx_L1_error)
        }
        __pyx_v_dp = (( arrow::DenseUnionScalar *)__pyx_v_self->__pyx_base.wrapped.get());

        /* "pyarrow/scalar.pxi":1344
 *         else:
 *             dp = <CDenseUnionScalar*> self.wrapped.get()
 *             return Scalar.wrap(dp.value) if dp.is_valid else None             # <<<<<<<<<<<<<<
 * 
 *     def as_py(self, *, maps_as_pydicts=None):
*/
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_4 = (__pyx_v_dp->is_valid != 0);
        if (__pyx_t_4) {
          __pyx_t_1 = __pyx_f_7pyarrow_3lib_6Scalar_wrap(__pyx_v_dp->value); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1344, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_3 = __pyx_t_1;
          __pyx_t_1 = 0;
        } else {
          __Pyx_INCREF(Py_None);
          __pyx_t_3 = Py_None;
        }
        __pyx_r = __pyx_t_3;
        __pyx_t_3 = 0;
        goto __pyx_L0;
      }

      /* "pyarrow/scalar.pxi":1332
 *     """
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def value(self):
 *         """
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_AddTraceback("pyarrow.lib.UnionScalar.value.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/scalar.pxi":1346
 *             return Scalar.wrap(dp.value) if dp.is_valid else None
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return underlying value as a Python object.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_11UnionScalar_1as_py(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_11UnionScalar_as_py, "UnionScalar.as_py(self, *, maps_as_pydicts=None)\n\nReturn underlying value as a Python object.\n\nParameters\n----------\nmaps_as_pydicts : str, optional, default `None`\n    Valid values are `None`, 'lossy', or 'strict'.\n    The default behavior (`None`), is to convert Arrow Map arrays to\n    Python association lists (list-of-tuples) in the same order as the\n    Arrow Map, as in [(key1, value1), (key2, value2), ...].\n\n    If 'lossy' or 'strict', convert Arrow Map arrays to native Python dicts.\n\n    If 'lossy', whenever duplicate keys are detected, a warning will be printed.\n    The last seen value of a duplicate key will be in the Python dictionary.\n    If 'strict', this instead results in an exception being raised when detected.");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_11UnionScalar_1as_py = {"as_py", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_11UnionScalar_1as_py, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_11UnionScalar_as_py};
    static PyObject *__pyx_pw_7pyarrow_3lib_11UnionScalar_1as_py(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_maps_as_pydicts = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("as_py (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_maps_as_pydicts,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(3, 1346, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, 0, __pyx_kwds_len, "as_py", 0) < (0)) __PYX_ERR(3, 1346, __pyx_L3_error)
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
        } else if (unlikely(__pyx_nargs != 0)) {
          goto __pyx_L5_argtuple_error;
        } else {
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
        }
        __pyx_v_maps_as_pydicts = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("as_py", 1, 0, 0, __pyx_nargs); __PYX_ERR(3, 1346, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.UnionScalar.as_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_11UnionScalar_as_py(((struct __pyx_obj_7pyarrow_3lib_UnionScalar *)__pyx_v_self), __pyx_v_maps_as_pydicts);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_11UnionScalar_as_py(struct __pyx_obj_7pyarrow_3lib_UnionScalar *__pyx_v_self, PyObject *__pyx_v_maps_as_pydicts) {
      PyObject *__pyx_v_value = NULL;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_t_2;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      size_t __pyx_t_5;
      PyObject *__pyx_t_6 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("as_py", 0);

      /* "pyarrow/scalar.pxi":1364
 *             If 'strict', this instead results in an exception being raised when detected.
 *         """
 *         value = self.value             # <<<<<<<<<<<<<<
 *         return None if value is None else value.as_py(maps_as_pydicts=maps_as_pydicts)
 * 
*/
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1364, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_v_value = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "pyarrow/scalar.pxi":1365
 *         """
 *         value = self.value
 *         return None if value is None else value.as_py(maps_as_pydicts=maps_as_pydicts)             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = (__pyx_v_value == Py_None);
      if (__pyx_t_2) {
        __Pyx_INCREF(Py_None);
        __pyx_t_1 = Py_None;
      } else {
        __pyx_t_4 = __pyx_v_value;
        __Pyx_INCREF(__pyx_t_4);
        __pyx_t_5 = 0;
        {
          PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_4, NULL};
          __pyx_t_6 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1365, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_maps_as_pydicts, __pyx_v_maps_as_pydicts, __pyx_t_6, __pyx_callargs+1, 0) < (0)) __PYX_ERR(3, 1365, __pyx_L1_error)
          __pyx_t_3 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_as_py, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_6);
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1365, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        __pyx_t_1 = __pyx_t_3;
        __pyx_t_3 = 0;
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/scalar.pxi":1346
 *             return Scalar.wrap(dp.value) if dp.is_valid else None
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return underlying value as a Python object.
*/

      /* 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_6);
      __Pyx_AddTraceback("pyarrow.lib.UnionScalar.as_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_value);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/scalar.pxi":1367
 *         return None if value is None else value.as_py(maps_as_pydicts=maps_as_pydicts)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def type_code(self):
 *         """
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_11UnionScalar_9type_code_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_11UnionScalar_9type_code_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_11UnionScalar_9type_code___get__(((struct __pyx_obj_7pyarrow_3lib_UnionScalar *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_11UnionScalar_9type_code___get__(struct __pyx_obj_7pyarrow_3lib_UnionScalar *__pyx_v_self) {
       arrow::UnionScalar *__pyx_v_sp;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__get__", 0);

      /* "pyarrow/scalar.pxi":1372
 *         Return the union type code for this scalar.
 *         """
 *         cdef CUnionScalar* sp = <CUnionScalar*> self.wrapped.get()             # <<<<<<<<<<<<<<
 *         return sp.type_code
 * 
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "wrapped");
        __PYX_ERR(3, 1372, __pyx_L1_error)
      }
      __pyx_v_sp = (( arrow::UnionScalar *)__pyx_v_self->__pyx_base.wrapped.get());

      /* "pyarrow/scalar.pxi":1373
 *         """
 *         cdef CUnionScalar* sp = <CUnionScalar*> self.wrapped.get()
 *         return sp.type_code             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __Pyx_PyLong_From_int8_t(__pyx_v_sp->type_code); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1373, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/scalar.pxi":1367
 *         return None if value is None else value.as_py(maps_as_pydicts=maps_as_pydicts)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def type_code(self):
 *         """
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("pyarrow.lib.UnionScalar.type_code.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/scalar.pxi":1381
 *     """
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def value(self):
 *         """
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_15ExtensionScalar_5value_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_15ExtensionScalar_5value_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_15ExtensionScalar_5value___get__(((struct __pyx_obj_7pyarrow_3lib_ExtensionScalar *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_15ExtensionScalar_5value___get__(struct __pyx_obj_7pyarrow_3lib_ExtensionScalar *__pyx_v_self) {
       arrow::ExtensionScalar *__pyx_v_sp;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_t_2;
      PyObject *__pyx_t_3 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__get__", 0);

      /* "pyarrow/scalar.pxi":1386
 *         Return storage value as a scalar.
 *         """
 *         cdef CExtensionScalar* sp = <CExtensionScalar*> self.wrapped.get()             # <<<<<<<<<<<<<<
 *         return Scalar.wrap(sp.value) if sp.is_valid else None
 * 
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "wrapped");
        __PYX_ERR(3, 1386, __pyx_L1_error)
      }
      __pyx_v_sp = (( arrow::ExtensionScalar *)__pyx_v_self->__pyx_base.wrapped.get());

      /* "pyarrow/scalar.pxi":1387
 *         """
 *         cdef CExtensionScalar* sp = <CExtensionScalar*> self.wrapped.get()
 *         return Scalar.wrap(sp.value) if sp.is_valid else None             # <<<<<<<<<<<<<<
 * 
 *     def as_py(self, *, maps_as_pydicts=None):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = (__pyx_v_sp->is_valid != 0);
      if (__pyx_t_2) {
        __pyx_t_3 = __pyx_f_7pyarrow_3lib_6Scalar_wrap(__pyx_v_sp->value); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1387, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_1 = __pyx_t_3;
        __pyx_t_3 = 0;
      } else {
        __Pyx_INCREF(Py_None);
        __pyx_t_1 = Py_None;
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/scalar.pxi":1381
 *     """
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def value(self):
 *         """
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_AddTraceback("pyarrow.lib.ExtensionScalar.value.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/scalar.pxi":1389
 *         return Scalar.wrap(sp.value) if sp.is_valid else None
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return this scalar as a Python object.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_15ExtensionScalar_1as_py(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_15ExtensionScalar_as_py, "ExtensionScalar.as_py(self, *, maps_as_pydicts=None)\n\nReturn this scalar as a Python object.\n\nParameters\n----------\nmaps_as_pydicts : str, optional, default `None`\n    Valid values are `None`, 'lossy', or 'strict'.\n    The default behavior (`None`), is to convert Arrow Map arrays to\n    Python association lists (list-of-tuples) in the same order as the\n    Arrow Map, as in [(key1, value1), (key2, value2), ...].\n\n    If 'lossy' or 'strict', convert Arrow Map arrays to native Python dicts.\n\n    If 'lossy', whenever duplicate keys are detected, a warning will be printed.\n    The last seen value of a duplicate key will be in the Python dictionary.\n    If 'strict', this instead results in an exception being raised when detected.");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_15ExtensionScalar_1as_py = {"as_py", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15ExtensionScalar_1as_py, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15ExtensionScalar_as_py};
    static PyObject *__pyx_pw_7pyarrow_3lib_15ExtensionScalar_1as_py(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_maps_as_pydicts = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("as_py (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_maps_as_pydicts,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(3, 1389, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, 0, __pyx_kwds_len, "as_py", 0) < (0)) __PYX_ERR(3, 1389, __pyx_L3_error)
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
        } else if (unlikely(__pyx_nargs != 0)) {
          goto __pyx_L5_argtuple_error;
        } else {
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
        }
        __pyx_v_maps_as_pydicts = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("as_py", 1, 0, 0, __pyx_nargs); __PYX_ERR(3, 1389, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.ExtensionScalar.as_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_15ExtensionScalar_as_py(((struct __pyx_obj_7pyarrow_3lib_ExtensionScalar *)__pyx_v_self), __pyx_v_maps_as_pydicts);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_15ExtensionScalar_as_py(struct __pyx_obj_7pyarrow_3lib_ExtensionScalar *__pyx_v_self, PyObject *__pyx_v_maps_as_pydicts) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      int __pyx_t_3;
      PyObject *__pyx_t_4 = NULL;
      PyObject *__pyx_t_5 = NULL;
      size_t __pyx_t_6;
      PyObject *__pyx_t_7 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("as_py", 0);

      /* "pyarrow/scalar.pxi":1407
 *             If 'strict', this instead results in an exception being raised when detected.
 *         """
 *         return None if self.value is None else self.value.as_py(maps_as_pydicts=maps_as_pydicts)             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1407, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = (__pyx_t_2 == Py_None);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (__pyx_t_3) {
        __Pyx_INCREF(Py_None);
        __pyx_t_1 = Py_None;
      } else {
        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_value); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1407, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_4 = __pyx_t_5;
        __Pyx_INCREF(__pyx_t_4);
        __pyx_t_6 = 0;
        {
          PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_4, NULL};
          __pyx_t_7 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1407, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_maps_as_pydicts, __pyx_v_maps_as_pydicts, __pyx_t_7, __pyx_callargs+1, 0) < (0)) __PYX_ERR(3, 1407, __pyx_L1_error)
          __pyx_t_2 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_as_py, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_7);
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1407, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __pyx_t_1 = __pyx_t_2;
        __pyx_t_2 = 0;
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/scalar.pxi":1389
 *         return Scalar.wrap(sp.value) if sp.is_valid else None
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return this scalar as a Python object.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_7);
      __Pyx_AddTraceback("pyarrow.lib.ExtensionScalar.as_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/scalar.pxi":1409
 *         return None if self.value is None else self.value.as_py(maps_as_pydicts=maps_as_pydicts)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_storage(BaseExtensionType typ, value):
 *         """
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_15ExtensionScalar_3from_storage(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_15ExtensionScalar_2from_storage, "ExtensionScalar.from_storage(BaseExtensionType typ, value)\n\nConstruct ExtensionScalar from type and storage value.\n\nParameters\n----------\ntyp : DataType\n    The extension type for the result scalar.\nvalue : object\n    The storage value for the result scalar.\n\nReturns\n-------\next_scalar : ExtensionScalar");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_15ExtensionScalar_3from_storage = {"from_storage", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15ExtensionScalar_3from_storage, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15ExtensionScalar_2from_storage};
    static PyObject *__pyx_pw_7pyarrow_3lib_15ExtensionScalar_3from_storage(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      struct __pyx_obj_7pyarrow_3lib_BaseExtensionType *__pyx_v_typ = 0;
      PyObject *__pyx_v_value = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[2] = {0,0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("from_storage (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_typ,&__pyx_mstate_global->__pyx_n_u_value,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(3, 1409, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(3, 1409, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(3, 1409, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "from_storage", 0) < (0)) __PYX_ERR(3, 1409, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("from_storage", 1, 2, 2, i); __PYX_ERR(3, 1409, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 2)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(3, 1409, __pyx_L3_error)
          values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(3, 1409, __pyx_L3_error)
        }
        __pyx_v_typ = ((struct __pyx_obj_7pyarrow_3lib_BaseExtensionType *)values[0]);
        __pyx_v_value = values[1];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("from_storage", 1, 2, 2, __pyx_nargs); __PYX_ERR(3, 1409, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.ExtensionScalar.from_storage", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_typ), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_BaseExtensionType, 1, "typ", 0))) __PYX_ERR(3, 1410, __pyx_L1_error)
      __pyx_r = __pyx_pf_7pyarrow_3lib_15ExtensionScalar_2from_storage(__pyx_v_typ, __pyx_v_value);

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = NULL;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      goto __pyx_L7_cleaned_up;
      __pyx_L0:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __pyx_L7_cleaned_up:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_15ExtensionScalar_2from_storage(struct __pyx_obj_7pyarrow_3lib_BaseExtensionType *__pyx_v_typ, PyObject *__pyx_v_value) {
      std::shared_ptr< arrow::ExtensionScalar>  __pyx_v_sp_scalar;
      std::shared_ptr< arrow::Scalar>  __pyx_v_sp_storage;
      PyObject *__pyx_v_storage = NULL;
      bool __pyx_v_is_valid;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      int __pyx_t_1;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      PyObject *__pyx_t_5 = NULL;
      PyObject *__pyx_t_6[4];
      PyObject *__pyx_t_7 = NULL;
      size_t __pyx_t_8;
      bool __pyx_t_9;
      bool __pyx_t_10;
      std::shared_ptr< arrow::Scalar>  __pyx_t_11;
      std::shared_ptr< arrow::ExtensionScalar>  __pyx_t_12;
      int __pyx_t_13;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("from_storage", 0);

      /* "pyarrow/scalar.pxi":1430
 *             CExtensionScalar* ext_scalar
 * 
 *         if value is None:             # <<<<<<<<<<<<<<
 *             storage = None
 *         elif isinstance(value, Scalar):
*/
      __pyx_t_1 = (__pyx_v_value == Py_None);
      if (__pyx_t_1) {

        /* "pyarrow/scalar.pxi":1431
 * 
 *         if value is None:
 *             storage = None             # <<<<<<<<<<<<<<
 *         elif isinstance(value, Scalar):
 *             if value.type != typ.storage_type:
*/
        __Pyx_INCREF(Py_None);
        __pyx_v_storage = Py_None;

        /* "pyarrow/scalar.pxi":1430
 *             CExtensionScalar* ext_scalar
 * 
 *         if value is None:             # <<<<<<<<<<<<<<
 *             storage = None
 *         elif isinstance(value, Scalar):
*/
        goto __pyx_L3;
      }

      /* "pyarrow/scalar.pxi":1432
 *         if value is None:
 *             storage = None
 *         elif isinstance(value, Scalar):             # <<<<<<<<<<<<<<
 *             if value.type != typ.storage_type:
 *                 raise TypeError(f"Incompatible storage type {value.type} "
*/
      __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_value, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Scalar); 
      if (__pyx_t_1) {

        /* "pyarrow/scalar.pxi":1433
 *             storage = None
 *         elif isinstance(value, Scalar):
 *             if value.type != typ.storage_type:             # <<<<<<<<<<<<<<
 *                 raise TypeError(f"Incompatible storage type {value.type} "
 *                                 f"for extension type {typ}")
*/
        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_mstate_global->__pyx_n_u_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1433, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_typ), __pyx_mstate_global->__pyx_n_u_storage_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1433, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = PyObject_RichCompare(__pyx_t_2, __pyx_t_3, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1433, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(3, 1433, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(__pyx_t_1)) {

          /* "pyarrow/scalar.pxi":1434
 *         elif isinstance(value, Scalar):
 *             if value.type != typ.storage_type:
 *                 raise TypeError(f"Incompatible storage type {value.type} "             # <<<<<<<<<<<<<<
 *                                 f"for extension type {typ}")
 *             storage = value
*/
          __pyx_t_3 = NULL;
          __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_mstate_global->__pyx_n_u_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1434, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_t_2, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1434, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

          /* "pyarrow/scalar.pxi":1435
 *             if value.type != typ.storage_type:
 *                 raise TypeError(f"Incompatible storage type {value.type} "
 *                                 f"for extension type {typ}")             # <<<<<<<<<<<<<<
 *             storage = value
 *         else:
*/
          __pyx_t_2 = __Pyx_PyObject_FormatSimple(((PyObject *)__pyx_v_typ), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1435, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_6[0] = __pyx_mstate_global->__pyx_kp_u_Incompatible_storage_type;
          __pyx_t_6[1] = __pyx_t_5;
          __pyx_t_6[2] = __pyx_mstate_global->__pyx_kp_u_for_extension_type;
          __pyx_t_6[3] = __pyx_t_2;

          /* "pyarrow/scalar.pxi":1434
 *         elif isinstance(value, Scalar):
 *             if value.type != typ.storage_type:
 *                 raise TypeError(f"Incompatible storage type {value.type} "             # <<<<<<<<<<<<<<
 *                                 f"for extension type {typ}")
 *             storage = value
*/
          __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_6, 4, 26 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + 20 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2));
          if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1434, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_8 = 1;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_7};
            __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
            if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1434, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
          }
          __Pyx_Raise(__pyx_t_4, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __PYX_ERR(3, 1434, __pyx_L1_error)

          /* "pyarrow/scalar.pxi":1433
 *             storage = None
 *         elif isinstance(value, Scalar):
 *             if value.type != typ.storage_type:             # <<<<<<<<<<<<<<
 *                 raise TypeError(f"Incompatible storage type {value.type} "
 *                                 f"for extension type {typ}")
*/
        }

        /* "pyarrow/scalar.pxi":1436
 *                 raise TypeError(f"Incompatible storage type {value.type} "
 *                                 f"for extension type {typ}")
 *             storage = value             # <<<<<<<<<<<<<<
 *         else:
 *             storage = scalar(value, typ.storage_type)
*/
        __Pyx_INCREF(__pyx_v_value);
        __pyx_v_storage = __pyx_v_value;

        /* "pyarrow/scalar.pxi":1432
 *         if value is None:
 *             storage = None
 *         elif isinstance(value, Scalar):             # <<<<<<<<<<<<<<
 *             if value.type != typ.storage_type:
 *                 raise TypeError(f"Incompatible storage type {value.type} "
*/
        goto __pyx_L3;
      }

      /* "pyarrow/scalar.pxi":1438
 *             storage = value
 *         else:
 *             storage = scalar(value, typ.storage_type)             # <<<<<<<<<<<<<<
 * 
 *         cdef c_bool is_valid = storage is not None and storage.is_valid
*/
      /*else*/ {
        __pyx_t_7 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_scalar); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1438, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_typ), __pyx_mstate_global->__pyx_n_u_storage_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1438, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_8 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3);
          assert(__pyx_t_7);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_7);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
          __pyx_t_8 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[3] = {__pyx_t_7, __pyx_v_value, __pyx_t_2};
          __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_8, (3-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1438, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
        }
        __pyx_v_storage = __pyx_t_4;
        __pyx_t_4 = 0;
      }
      __pyx_L3:;

      /* "pyarrow/scalar.pxi":1440
 *             storage = scalar(value, typ.storage_type)
 * 
 *         cdef c_bool is_valid = storage is not None and storage.is_valid             # <<<<<<<<<<<<<<
 *         if is_valid:
 *             sp_storage = pyarrow_unwrap_scalar(storage)
*/
      __pyx_t_1 = (__pyx_v_storage != Py_None);
      if (__pyx_t_1) {
      } else {
        __pyx_t_9 = __pyx_t_1;
        goto __pyx_L5_bool_binop_done;
      }
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_storage, __pyx_mstate_global->__pyx_n_u_is_valid); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1440, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_10 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1440, __pyx_L1_error)
      __pyx_t_9 = __pyx_t_10;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_L5_bool_binop_done:;
      __pyx_v_is_valid = __pyx_t_9;

      /* "pyarrow/scalar.pxi":1441
 * 
 *         cdef c_bool is_valid = storage is not None and storage.is_valid
 *         if is_valid:             # <<<<<<<<<<<<<<
 *             sp_storage = pyarrow_unwrap_scalar(storage)
 *         else:
*/
      __pyx_t_1 = (__pyx_v_is_valid != 0);
      if (__pyx_t_1) {

        /* "pyarrow/scalar.pxi":1442
 *         cdef c_bool is_valid = storage is not None and storage.is_valid
 *         if is_valid:
 *             sp_storage = pyarrow_unwrap_scalar(storage)             # <<<<<<<<<<<<<<
 *         else:
 *             sp_storage = MakeNullScalar((<DataType> typ.storage_type).sp_type)
*/
        __pyx_t_11 = pyarrow_unwrap_scalar(__pyx_v_storage); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1442, __pyx_L1_error)
        __pyx_v_sp_storage = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_11);

        /* "pyarrow/scalar.pxi":1441
 * 
 *         cdef c_bool is_valid = storage is not None and storage.is_valid
 *         if is_valid:             # <<<<<<<<<<<<<<
 *             sp_storage = pyarrow_unwrap_scalar(storage)
 *         else:
*/
        goto __pyx_L7;
      }

      /* "pyarrow/scalar.pxi":1444
 *             sp_storage = pyarrow_unwrap_scalar(storage)
 *         else:
 *             sp_storage = MakeNullScalar((<DataType> typ.storage_type).sp_type)             # <<<<<<<<<<<<<<
 *         sp_scalar = make_shared[CExtensionScalar](sp_storage, typ.sp_type,
 *                                                   is_valid)
*/
      /*else*/ {
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_typ), __pyx_mstate_global->__pyx_n_u_storage_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1444, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        if (unlikely(__pyx_t_4 == Py_None)) {
          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_type");
          __PYX_ERR(3, 1444, __pyx_L1_error)
        }
        __pyx_v_sp_storage = arrow::MakeNullScalar(((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_t_4)->sp_type);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      }
      __pyx_L7:;

      /* "pyarrow/scalar.pxi":1445
 *         else:
 *             sp_storage = MakeNullScalar((<DataType> typ.storage_type).sp_type)
 *         sp_scalar = make_shared[CExtensionScalar](sp_storage, typ.sp_type,             # <<<<<<<<<<<<<<
 *                                                   is_valid)
 *         with nogil:
*/
      if (unlikely(((PyObject *)__pyx_v_typ) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_type");
        __PYX_ERR(3, 1445, __pyx_L1_error)
      }

      /* "pyarrow/scalar.pxi":1446
 *             sp_storage = MakeNullScalar((<DataType> typ.storage_type).sp_type)
 *         sp_scalar = make_shared[CExtensionScalar](sp_storage, typ.sp_type,
 *                                                   is_valid)             # <<<<<<<<<<<<<<
 *         with nogil:
 *             check_status(sp_scalar.get().Validate())
*/
      try {
        __pyx_t_12 = std::make_shared< arrow::ExtensionScalar>(__pyx_v_sp_storage, __pyx_v_typ->__pyx_base.sp_type, __pyx_v_is_valid);
      } catch(...) {
        __Pyx_CppExn2PyErr();
        __PYX_ERR(3, 1445, __pyx_L1_error)
      }
      __pyx_v_sp_scalar = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_12);

      /* "pyarrow/scalar.pxi":1447
 *         sp_scalar = make_shared[CExtensionScalar](sp_storage, typ.sp_type,
 *                                                   is_valid)
 *         with nogil:             # <<<<<<<<<<<<<<
 *             check_status(sp_scalar.get().Validate())
 *         return pyarrow_wrap_scalar(<shared_ptr[CScalar]> sp_scalar)
*/
      {
          PyThreadState * _save;
          _save = PyEval_SaveThread();
          __Pyx_FastGIL_Remember();
          /*try:*/ {

            /* "pyarrow/scalar.pxi":1448
 *                                                   is_valid)
 *         with nogil:
 *             check_status(sp_scalar.get().Validate())             # <<<<<<<<<<<<<<
 *         return pyarrow_wrap_scalar(<shared_ptr[CScalar]> sp_scalar)
 * 
*/
            __pyx_t_13 = __pyx_f_7pyarrow_3lib_check_status(__pyx_v_sp_scalar.get()->Validate()); if (unlikely(__pyx_t_13 == ((int)-1))) __PYX_ERR(3, 1448, __pyx_L9_error)
          }

          /* "pyarrow/scalar.pxi":1447
 *         sp_scalar = make_shared[CExtensionScalar](sp_storage, typ.sp_type,
 *                                                   is_valid)
 *         with nogil:             # <<<<<<<<<<<<<<
 *             check_status(sp_scalar.get().Validate())
 *         return pyarrow_wrap_scalar(<shared_ptr[CScalar]> sp_scalar)
*/
          /*finally:*/ {
            /*normal exit:*/{
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L10;
            }
            __pyx_L9_error: {
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L1_error;
            }
            __pyx_L10:;
          }
      }

      /* "pyarrow/scalar.pxi":1449
 *         with nogil:
 *             check_status(sp_scalar.get().Validate())
 *         return pyarrow_wrap_scalar(<shared_ptr[CScalar]> sp_scalar)             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_4 = pyarrow_wrap_scalar(((std::shared_ptr< arrow::Scalar> )__pyx_v_sp_scalar)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1449, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L0;

      /* "pyarrow/scalar.pxi":1409
 *         return None if self.value is None else self.value.as_py(maps_as_pydicts=maps_as_pydicts)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_storage(BaseExtensionType typ, value):
 *         """
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_7);
      __Pyx_AddTraceback("pyarrow.lib.ExtensionScalar.from_storage", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_storage);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/scalar.pxi":1463
 *     """
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return this scalar as a Python UUID.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_10UuidScalar_1as_py(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_10UuidScalar_as_py, "UuidScalar.as_py(self, *, maps_as_pydicts=None)\n\nReturn this scalar as a Python UUID.\n\nParameters\n----------\nmaps_as_pydicts : str, optional, default `None`\n    Valid values are `None`, 'lossy', or 'strict'.\n    This parameter is ignored for non-nested Scalars.");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_10UuidScalar_1as_py = {"as_py", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10UuidScalar_1as_py, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10UuidScalar_as_py};
    static PyObject *__pyx_pw_7pyarrow_3lib_10UuidScalar_1as_py(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_self = 0;
      CYTHON_UNUSED PyObject *__pyx_v_maps_as_pydicts = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[2] = {0,0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("as_py (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_maps_as_pydicts,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(3, 1463, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(3, 1463, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "as_py", 0) < (0)) __PYX_ERR(3, 1463, __pyx_L3_error)
          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("as_py", 1, 1, 1, i); __PYX_ERR(3, 1463, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 1)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(3, 1463, __pyx_L3_error)
          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
        }
        __pyx_v_self = values[0];
        __pyx_v_maps_as_pydicts = values[1];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("as_py", 1, 1, 1, __pyx_nargs); __PYX_ERR(3, 1463, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.UuidScalar.as_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_10UuidScalar_as_py(__pyx_self, __pyx_v_self, __pyx_v_maps_as_pydicts);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_10UuidScalar_as_py(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_maps_as_pydicts) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      int __pyx_t_3;
      PyObject *__pyx_t_4 = NULL;
      PyObject *__pyx_t_5 = NULL;
      PyObject *__pyx_t_6 = NULL;
      PyObject *__pyx_t_7 = NULL;
      PyObject *__pyx_t_8 = NULL;
      size_t __pyx_t_9;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("as_py", 0);

      /* "pyarrow/scalar.pxi":1473
 *             This parameter is ignored for non-nested Scalars.
 *         """
 *         return None if self.value is None else UUID(bytes=self.value.as_py())             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1473, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = (__pyx_t_2 == Py_None);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (__pyx_t_3) {
        __Pyx_INCREF(Py_None);
        __pyx_t_1 = Py_None;
      } else {
        __pyx_t_4 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_UUID); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1473, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_value); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 1473, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_7 = __pyx_t_8;
        __Pyx_INCREF(__pyx_t_7);
        __pyx_t_9 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL};
          __pyx_t_6 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_as_py, __pyx_callargs+__pyx_t_9, (1-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1473, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
        }
        __pyx_t_9 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
          assert(__pyx_t_4);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
          __pyx_t_9 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_4, NULL};
          __pyx_t_8 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 1473, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_bytes, __pyx_t_6, __pyx_t_8, __pyx_callargs+1, 0) < (0)) __PYX_ERR(3, 1473, __pyx_L1_error)
          __pyx_t_2 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_9, (1-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_8);
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1473, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __pyx_t_1 = __pyx_t_2;
        __pyx_t_2 = 0;
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/scalar.pxi":1463
 *     """
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return this scalar as a Python UUID.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_8);
      __Pyx_AddTraceback("pyarrow.lib.UuidScalar.as_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/scalar.pxi":1481
 *     """
 * 
 *     def to_numpy(self):             # <<<<<<<<<<<<<<
 *         """
 *         Convert fixed shape tensor scalar to a numpy.ndarray.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_22FixedShapeTensorScalar_1to_numpy(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_22FixedShapeTensorScalar_to_numpy, "FixedShapeTensorScalar.to_numpy(self)\n\nConvert fixed shape tensor scalar to a numpy.ndarray.\n\nThe resulting ndarray's shape matches the permuted shape of the\nfixed shape tensor scalar.\nThe conversion is zero-copy.\n\nReturns\n-------\nnumpy.ndarray");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_22FixedShapeTensorScalar_1to_numpy = {"to_numpy", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_22FixedShapeTensorScalar_1to_numpy, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_22FixedShapeTensorScalar_to_numpy};
    static PyObject *__pyx_pw_7pyarrow_3lib_22FixedShapeTensorScalar_1to_numpy(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("to_numpy (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("to_numpy", 1, 0, 0, __pyx_nargs); return NULL; }
      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
      if (unlikely(__pyx_kwds_len < 0)) return NULL;
      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("to_numpy", __pyx_kwds); return NULL;}
      __pyx_r = __pyx_pf_7pyarrow_3lib_22FixedShapeTensorScalar_to_numpy(((struct __pyx_obj_7pyarrow_3lib_FixedShapeTensorScalar *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_22FixedShapeTensorScalar_to_numpy(struct __pyx_obj_7pyarrow_3lib_FixedShapeTensorScalar *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      size_t __pyx_t_5;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("to_numpy", 0);

      /* "pyarrow/scalar.pxi":1493
 *         numpy.ndarray
 *         """
 *         return self.to_tensor().to_numpy()             # <<<<<<<<<<<<<<
 * 
 *     def to_tensor(self):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_4 = ((PyObject *)__pyx_v_self);
      __Pyx_INCREF(__pyx_t_4);
      __pyx_t_5 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_to_tensor, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1493, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      __pyx_t_2 = __pyx_t_3;
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_5 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_to_numpy, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1493, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/scalar.pxi":1481
 *     """
 * 
 *     def to_numpy(self):             # <<<<<<<<<<<<<<
 *         """
 *         Convert fixed shape tensor scalar to a numpy.ndarray.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_AddTraceback("pyarrow.lib.FixedShapeTensorScalar.to_numpy", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/scalar.pxi":1495
 *         return self.to_tensor().to_numpy()
 * 
 *     def to_tensor(self):             # <<<<<<<<<<<<<<
 *         """
 *         Convert fixed shape tensor extension scalar to a pyarrow.Tensor, using shape
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_22FixedShapeTensorScalar_3to_tensor(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_22FixedShapeTensorScalar_2to_tensor, "FixedShapeTensorScalar.to_tensor(self)\n\nConvert fixed shape tensor extension scalar to a pyarrow.Tensor, using shape\nand strides derived from corresponding FixedShapeTensorType.\n\nThe conversion is zero-copy.\n\nReturns\n-------\npyarrow.Tensor\n    Tensor represented stored in FixedShapeTensorScalar.");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_22FixedShapeTensorScalar_3to_tensor = {"to_tensor", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_22FixedShapeTensorScalar_3to_tensor, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_22FixedShapeTensorScalar_2to_tensor};
    static PyObject *__pyx_pw_7pyarrow_3lib_22FixedShapeTensorScalar_3to_tensor(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("to_tensor (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("to_tensor", 1, 0, 0, __pyx_nargs); return NULL; }
      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
      if (unlikely(__pyx_kwds_len < 0)) return NULL;
      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("to_tensor", __pyx_kwds); return NULL;}
      __pyx_r = __pyx_pf_7pyarrow_3lib_22FixedShapeTensorScalar_2to_tensor(((struct __pyx_obj_7pyarrow_3lib_FixedShapeTensorScalar *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_22FixedShapeTensorScalar_2to_tensor(struct __pyx_obj_7pyarrow_3lib_FixedShapeTensorScalar *__pyx_v_self) {
       arrow::extension::FixedShapeTensorType *__pyx_v_c_type;
      std::shared_ptr< arrow::ExtensionScalar>  __pyx_v_scalar;
      std::shared_ptr< arrow::Tensor>  __pyx_v_ctensor;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      std::shared_ptr< arrow::Tensor>  __pyx_t_1;
      PyObject *__pyx_t_2 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("to_tensor", 0);

      /* "pyarrow/scalar.pxi":1509
 *         cdef:
 *             CFixedShapeTensorType* c_type = static_pointer_cast[CFixedShapeTensorType, CDataType](
 *                 self.wrapped.get().type).get()             # <<<<<<<<<<<<<<
 *             shared_ptr[CExtensionScalar] scalar = static_pointer_cast[CExtensionScalar, CScalar](self.wrapped)
 *             shared_ptr[CTensor] ctensor
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "wrapped");
        __PYX_ERR(3, 1509, __pyx_L1_error)
      }

      /* "pyarrow/scalar.pxi":1508
 *         """
 *         cdef:
 *             CFixedShapeTensorType* c_type = static_pointer_cast[CFixedShapeTensorType, CDataType](             # <<<<<<<<<<<<<<
 *                 self.wrapped.get().type).get()
 *             shared_ptr[CExtensionScalar] scalar = static_pointer_cast[CExtensionScalar, CScalar](self.wrapped)
*/
      __pyx_v_c_type = std::static_pointer_cast< arrow::extension::FixedShapeTensorType, arrow::DataType>(__pyx_v_self->__pyx_base.__pyx_base.wrapped.get()->type).get();

      /* "pyarrow/scalar.pxi":1510
 *             CFixedShapeTensorType* c_type = static_pointer_cast[CFixedShapeTensorType, CDataType](
 *                 self.wrapped.get().type).get()
 *             shared_ptr[CExtensionScalar] scalar = static_pointer_cast[CExtensionScalar, CScalar](self.wrapped)             # <<<<<<<<<<<<<<
 *             shared_ptr[CTensor] ctensor
 * 
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "wrapped");
        __PYX_ERR(3, 1510, __pyx_L1_error)
      }
      __pyx_v_scalar = std::static_pointer_cast< arrow::ExtensionScalar, arrow::Scalar>(__pyx_v_self->__pyx_base.__pyx_base.wrapped);

      /* "pyarrow/scalar.pxi":1513
 *             shared_ptr[CTensor] ctensor
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             ctensor = GetResultValue(c_type.MakeTensor(scalar))
 *         return pyarrow_wrap_tensor(ctensor)
*/
      {
          PyThreadState * _save;
          _save = PyEval_SaveThread();
          __Pyx_FastGIL_Remember();
          /*try:*/ {

            /* "pyarrow/scalar.pxi":1514
 * 
 *         with nogil:
 *             ctensor = GetResultValue(c_type.MakeTensor(scalar))             # <<<<<<<<<<<<<<
 *         return pyarrow_wrap_tensor(ctensor)
 * 
*/
            __pyx_t_1 = arrow::py::GetResultValue<std::shared_ptr< arrow::Tensor> >(__pyx_v_c_type->MakeTensor(__pyx_v_scalar)); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(3, 1514, __pyx_L4_error)
            __pyx_v_ctensor = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_1);
          }

          /* "pyarrow/scalar.pxi":1513
 *             shared_ptr[CTensor] ctensor
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             ctensor = GetResultValue(c_type.MakeTensor(scalar))
 *         return pyarrow_wrap_tensor(ctensor)
*/
          /*finally:*/ {
            /*normal exit:*/{
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L5;
            }
            __pyx_L4_error: {
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L1_error;
            }
            __pyx_L5:;
          }
      }

      /* "pyarrow/scalar.pxi":1515
 *         with nogil:
 *             ctensor = GetResultValue(c_type.MakeTensor(scalar))
 *         return pyarrow_wrap_tensor(ctensor)             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = pyarrow_wrap_tensor(__pyx_v_ctensor); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1515, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;

      /* "pyarrow/scalar.pxi":1495
 *         return self.to_tensor().to_numpy()
 * 
 *     def to_tensor(self):             # <<<<<<<<<<<<<<
 *         """
 *         Convert fixed shape tensor extension scalar to a pyarrow.Tensor, using shape
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_AddTraceback("pyarrow.lib.FixedShapeTensorScalar.to_tensor", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/scalar.pxi":1529
 *     """
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return this scalar as a Python object.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_11Bool8Scalar_1as_py(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_11Bool8Scalar_as_py, "Bool8Scalar.as_py(self, *, maps_as_pydicts=None)\n\nReturn this scalar as a Python object.\n\nParameters\n----------\nmaps_as_pydicts : str, optional, default `None`\n    Valid values are `None`, 'lossy', or 'strict'.\n    This parameter is ignored for non-nested Scalars.");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_11Bool8Scalar_1as_py = {"as_py", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_11Bool8Scalar_1as_py, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_11Bool8Scalar_as_py};
    static PyObject *__pyx_pw_7pyarrow_3lib_11Bool8Scalar_1as_py(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      CYTHON_UNUSED PyObject *__pyx_v_maps_as_pydicts = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("as_py (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_maps_as_pydicts,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(3, 1529, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, 0, __pyx_kwds_len, "as_py", 0) < (0)) __PYX_ERR(3, 1529, __pyx_L3_error)
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
        } else if (unlikely(__pyx_nargs != 0)) {
          goto __pyx_L5_argtuple_error;
        } else {
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
        }
        __pyx_v_maps_as_pydicts = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("as_py", 1, 0, 0, __pyx_nargs); __PYX_ERR(3, 1529, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.Bool8Scalar.as_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_11Bool8Scalar_as_py(((struct __pyx_obj_7pyarrow_3lib_Bool8Scalar *)__pyx_v_self), __pyx_v_maps_as_pydicts);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_11Bool8Scalar_as_py(struct __pyx_obj_7pyarrow_3lib_Bool8Scalar *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_maps_as_pydicts) {
      PyObject *__pyx_v_py_val = NULL;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      size_t __pyx_t_5;
      int __pyx_t_6;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("as_py", 0);

      /* "pyarrow/scalar.pxi":1539
 *             This parameter is ignored for non-nested Scalars.
 *         """
 *         py_val = super().as_py()             # <<<<<<<<<<<<<<
 *         return None if py_val is None else py_val != 0
 * 
*/
      __pyx_t_4 = NULL;
      __pyx_t_5 = 1;
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_4, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Bool8Scalar), ((PyObject *)__pyx_v_self)};
        __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_super, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1539, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      __pyx_t_2 = __pyx_t_3;
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_5 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_as_py, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1539, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_v_py_val = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "pyarrow/scalar.pxi":1540
 *         """
 *         py_val = super().as_py()
 *         return None if py_val is None else py_val != 0             # <<<<<<<<<<<<<<
 * 
 * cdef dict _scalar_classes = {
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_6 = (__pyx_v_py_val == Py_None);
      if (__pyx_t_6) {
        __Pyx_INCREF(Py_None);
        __pyx_t_1 = Py_None;
      } else {
        __pyx_t_3 = __Pyx_PyLong_NeObjC(__pyx_v_py_val, __pyx_mstate_global->__pyx_int_0, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1540, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_1 = __pyx_t_3;
        __pyx_t_3 = 0;
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/scalar.pxi":1529
 *     """
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return this scalar as a Python object.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_AddTraceback("pyarrow.lib.Bool8Scalar.as_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_py_val);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/scalar.pxi":1588
 * 
 * 
 * cdef object get_scalar_class_from_type(             # <<<<<<<<<<<<<<
 *         const shared_ptr[CDataType]& sp_data_type):
 *     cdef CDataType* data_type = sp_data_type.get()
*/

    static PyObject *__pyx_f_7pyarrow_3lib_get_scalar_class_from_type(std::shared_ptr< arrow::DataType>  const &__pyx_v_sp_data_type) {
       arrow::DataType *__pyx_v_data_type;
      PyObject *__pyx_v_py_ext_data_type = NULL;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      int __pyx_t_1;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      size_t __pyx_t_4;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("get_scalar_class_from_type", 0);

      /* "pyarrow/scalar.pxi":1590
 * cdef object get_scalar_class_from_type(
 *         const shared_ptr[CDataType]& sp_data_type):
 *     cdef CDataType* data_type = sp_data_type.get()             # <<<<<<<<<<<<<<
 *     if data_type == NULL:
 *         raise ValueError('Scalar data type was NULL')
*/
      __pyx_v_data_type = __pyx_v_sp_data_type.get();

      /* "pyarrow/scalar.pxi":1591
 *         const shared_ptr[CDataType]& sp_data_type):
 *     cdef CDataType* data_type = sp_data_type.get()
 *     if data_type == NULL:             # <<<<<<<<<<<<<<
 *         raise ValueError('Scalar data type was NULL')
 * 
*/
      __pyx_t_1 = (__pyx_v_data_type == NULL);
      if (unlikely(__pyx_t_1)) {

        /* "pyarrow/scalar.pxi":1592
 *     cdef CDataType* data_type = sp_data_type.get()
 *     if data_type == NULL:
 *         raise ValueError('Scalar data type was NULL')             # <<<<<<<<<<<<<<
 * 
 *     if data_type.id() == _Type_EXTENSION:
*/
        __pyx_t_3 = NULL;
        __pyx_t_4 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Scalar_data_type_was_NULL};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1592, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __Pyx_Raise(__pyx_t_2, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __PYX_ERR(3, 1592, __pyx_L1_error)

        /* "pyarrow/scalar.pxi":1591
 *         const shared_ptr[CDataType]& sp_data_type):
 *     cdef CDataType* data_type = sp_data_type.get()
 *     if data_type == NULL:             # <<<<<<<<<<<<<<
 *         raise ValueError('Scalar data type was NULL')
 * 
*/
      }

      /* "pyarrow/scalar.pxi":1594
 *         raise ValueError('Scalar data type was NULL')
 * 
 *     if data_type.id() == _Type_EXTENSION:             # <<<<<<<<<<<<<<
 *         py_ext_data_type = pyarrow_wrap_data_type(sp_data_type)
 *         return py_ext_data_type.__arrow_ext_scalar_class__()
*/
      __pyx_t_1 = (__pyx_v_data_type->id() ==  arrow::Type::EXTENSION);
      if (__pyx_t_1) {

        /* "pyarrow/scalar.pxi":1595
 * 
 *     if data_type.id() == _Type_EXTENSION:
 *         py_ext_data_type = pyarrow_wrap_data_type(sp_data_type)             # <<<<<<<<<<<<<<
 *         return py_ext_data_type.__arrow_ext_scalar_class__()
 *     else:
*/
        __pyx_t_2 = pyarrow_wrap_data_type(__pyx_v_sp_data_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1595, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_v_py_ext_data_type = __pyx_t_2;
        __pyx_t_2 = 0;

        /* "pyarrow/scalar.pxi":1596
 *     if data_type.id() == _Type_EXTENSION:
 *         py_ext_data_type = pyarrow_wrap_data_type(sp_data_type)
 *         return py_ext_data_type.__arrow_ext_scalar_class__()             # <<<<<<<<<<<<<<
 *     else:
 *         return _scalar_classes[data_type.id()]
*/
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __pyx_v_py_ext_data_type;
        __Pyx_INCREF(__pyx_t_3);
        __pyx_t_4 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
          __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_arrow_ext_scalar_class, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1596, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        goto __pyx_L0;

        /* "pyarrow/scalar.pxi":1594
 *         raise ValueError('Scalar data type was NULL')
 * 
 *     if data_type.id() == _Type_EXTENSION:             # <<<<<<<<<<<<<<
 *         py_ext_data_type = pyarrow_wrap_data_type(sp_data_type)
 *         return py_ext_data_type.__arrow_ext_scalar_class__()
*/
      }

      /* "pyarrow/scalar.pxi":1598
 *         return py_ext_data_type.__arrow_ext_scalar_class__()
 *     else:
 *         return _scalar_classes[data_type.id()]             # <<<<<<<<<<<<<<
 * 
 * 
*/
      /*else*/ {
        __Pyx_XDECREF(__pyx_r);
        if (unlikely(__pyx_v_7pyarrow_3lib__scalar_classes == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
          __PYX_ERR(3, 1598, __pyx_L1_error)
        }
        __pyx_t_2 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type(__pyx_v_data_type->id()); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1598, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_7pyarrow_3lib__scalar_classes, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1598, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_3;
        __pyx_t_3 = 0;
        goto __pyx_L0;
      }

      /* "pyarrow/scalar.pxi":1588
 * 
 * 
 * cdef object get_scalar_class_from_type(             # <<<<<<<<<<<<<<
 *         const shared_ptr[CDataType]& sp_data_type):
 *     cdef CDataType* data_type = sp_data_type.get()
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_AddTraceback("pyarrow.lib.get_scalar_class_from_type", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = 0;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_py_ext_data_type);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/scalar.pxi":1601
 * 
 * 
 * def scalar(value, type=None, *, from_pandas=None, MemoryPool memory_pool=None):             # <<<<<<<<<<<<<<
 *     """
 *     Create a pyarrow.Scalar instance from a Python object.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_189scalar(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_188scalar, "scalar(value, type=None, *, from_pandas=None, MemoryPool memory_pool=None)\n\nCreate a pyarrow.Scalar instance from a Python object.\n\nParameters\n----------\nvalue : Any\n    Python object coercible to arrow's type system.\ntype : pyarrow.DataType\n    Explicit type to attempt to coerce to, otherwise will be inferred from\n    the value.\nfrom_pandas : bool, default None\n    Use pandas's semantics for inferring nulls from values in\n    ndarray-like data. Defaults to False if not passed explicitly by user,\n    or True if a pandas object is passed in.\nmemory_pool : pyarrow.MemoryPool, optional\n    If not passed, will allocate memory from the currently-set default\n    memory pool.\n\nReturns\n-------\nscalar : pyarrow.Scalar\n\nExamples\n--------\n>>> import pyarrow as pa\n\n>>> pa.scalar(42)\n<pyarrow.Int64Scalar: 42>\n\n>>> pa.scalar(\"string\")\n<pyarrow.StringScalar: 'string'>\n\n>>> pa.scalar([1, 2])\n<pyarrow.ListScalar: [1, 2]>\n\n>>> pa.scalar([1, 2], type=pa.list_(pa.int16()))\n<pyarrow.ListScalar: [1, 2]>");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_189scalar = {"scalar", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_189scalar, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_188scalar};
    static PyObject *__pyx_pw_7pyarrow_3lib_189scalar(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_value = 0;
      PyObject *__pyx_v_type = 0;
      PyObject *__pyx_v_from_pandas = 0;
      struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_memory_pool = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[4] = {0,0,0,0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("scalar (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_value,&__pyx_mstate_global->__pyx_n_u_type,&__pyx_mstate_global->__pyx_n_u_from_pandas,&__pyx_mstate_global->__pyx_n_u_memory_pool,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(3, 1601, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(3, 1601, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(3, 1601, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "scalar", 0) < (0)) __PYX_ERR(3, 1601, __pyx_L3_error)
          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
          if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
          if (!values[3]) values[3] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)Py_None));
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("scalar", 0, 1, 2, i); __PYX_ERR(3, 1601, __pyx_L3_error) }
          }
        } else {
          switch (__pyx_nargs) {
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(3, 1601, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(3, 1601, __pyx_L3_error)
            break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
          if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
          if (!values[3]) values[3] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)Py_None));
        }
        __pyx_v_value = values[0];
        __pyx_v_type = values[1];
        __pyx_v_from_pandas = values[2];
        __pyx_v_memory_pool = ((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)values[3]);
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("scalar", 0, 1, 2, __pyx_nargs); __PYX_ERR(3, 1601, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.scalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_memory_pool), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_MemoryPool, 1, "memory_pool", 0))) __PYX_ERR(3, 1601, __pyx_L1_error)
      __pyx_r = __pyx_pf_7pyarrow_3lib_188scalar(__pyx_self, __pyx_v_value, __pyx_v_type, __pyx_v_from_pandas, __pyx_v_memory_pool);

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = NULL;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      goto __pyx_L7_cleaned_up;
      __pyx_L0:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __pyx_L7_cleaned_up:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_188scalar(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_value, PyObject *__pyx_v_type, PyObject *__pyx_v_from_pandas, struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_memory_pool) {
      struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v_ty = 0;
      arrow::py::PyConversionOptions __pyx_v_options;
      std::shared_ptr< arrow::Scalar>  __pyx_v_scalar;
      std::shared_ptr< arrow::Array>  __pyx_v_array;
      std::shared_ptr< arrow::ChunkedArray>  __pyx_v_chunked;
      int __pyx_v_is_pandas_object;
       arrow::MemoryPool *__pyx_v_pool;
      PyObject *__pyx_v_extension_type = NULL;
      PyObject *__pyx_v_result = NULL;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      struct __pyx_opt_args_7pyarrow_3lib_ensure_type __pyx_t_2;
       arrow::MemoryPool *__pyx_t_3;
      int __pyx_t_4;
      int __pyx_t_5;
      PyObject *__pyx_t_6 = NULL;
      PyObject *__pyx_t_7 = NULL;
      std::shared_ptr< arrow::DataType>  __pyx_t_8;
      bool __pyx_t_9;
      std::shared_ptr< arrow::ChunkedArray>  __pyx_t_10;
      std::shared_ptr< arrow::Scalar>  __pyx_t_11;
      size_t __pyx_t_12;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("scalar", 0);
      __Pyx_INCREF(__pyx_v_value);
      __Pyx_INCREF(__pyx_v_type);

      /* "pyarrow/scalar.pxi":1646
 *         shared_ptr[CArray] array
 *         shared_ptr[CChunkedArray] chunked
 *         bint is_pandas_object = False             # <<<<<<<<<<<<<<
 *         CMemoryPool* pool
 * 
*/
      __pyx_v_is_pandas_object = 0;

      /* "pyarrow/scalar.pxi":1649
 *         CMemoryPool* pool
 * 
 *     type = ensure_type(type, allow_none=True)             # <<<<<<<<<<<<<<
 *     pool = maybe_unbox_memory_pool(memory_pool)
 * 
*/
      __pyx_t_2.__pyx_n = 1;
      __pyx_t_2.allow_none = 1;
      __pyx_t_1 = ((PyObject *)__pyx_f_7pyarrow_3lib_ensure_type(__pyx_v_type, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1649, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF_SET(__pyx_v_type, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "pyarrow/scalar.pxi":1650
 * 
 *     type = ensure_type(type, allow_none=True)
 *     pool = maybe_unbox_memory_pool(memory_pool)             # <<<<<<<<<<<<<<
 * 
 *     extension_type = None
*/
      __pyx_t_3 = __pyx_f_7pyarrow_3lib_maybe_unbox_memory_pool(__pyx_v_memory_pool); if (unlikely(__pyx_t_3 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(3, 1650, __pyx_L1_error)
      __pyx_v_pool = __pyx_t_3;

      /* "pyarrow/scalar.pxi":1652
 *     pool = maybe_unbox_memory_pool(memory_pool)
 * 
 *     extension_type = None             # <<<<<<<<<<<<<<
 *     if type is not None and type.id == _Type_EXTENSION:
 *         extension_type = type
*/
      __Pyx_INCREF(Py_None);
      __pyx_v_extension_type = Py_None;

      /* "pyarrow/scalar.pxi":1653
 * 
 *     extension_type = None
 *     if type is not None and type.id == _Type_EXTENSION:             # <<<<<<<<<<<<<<
 *         extension_type = type
 *         type = type.storage_type
*/
      __pyx_t_5 = (__pyx_v_type != Py_None);
      if (__pyx_t_5) {
      } else {
        __pyx_t_4 = __pyx_t_5;
        goto __pyx_L4_bool_binop_done;
      }
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_type, __pyx_mstate_global->__pyx_n_u_id); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1653, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_6 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::EXTENSION); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1653, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = PyObject_RichCompare(__pyx_t_1, __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1653, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(3, 1653, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_4 = __pyx_t_5;
      __pyx_L4_bool_binop_done:;
      if (__pyx_t_4) {

        /* "pyarrow/scalar.pxi":1654
 *     extension_type = None
 *     if type is not None and type.id == _Type_EXTENSION:
 *         extension_type = type             # <<<<<<<<<<<<<<
 *         type = type.storage_type
 * 
*/
        __Pyx_INCREF(__pyx_v_type);
        __Pyx_DECREF_SET(__pyx_v_extension_type, __pyx_v_type);

        /* "pyarrow/scalar.pxi":1655
 *     if type is not None and type.id == _Type_EXTENSION:
 *         extension_type = type
 *         type = type.storage_type             # <<<<<<<<<<<<<<
 * 
 *     if _is_array_like(value):
*/
        __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_type, __pyx_mstate_global->__pyx_n_u_storage_type); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1655, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF_SET(__pyx_v_type, __pyx_t_7);
        __pyx_t_7 = 0;

        /* "pyarrow/scalar.pxi":1653
 * 
 *     extension_type = None
 *     if type is not None and type.id == _Type_EXTENSION:             # <<<<<<<<<<<<<<
 *         extension_type = type
 *         type = type.storage_type
*/
      }

      /* "pyarrow/scalar.pxi":1657
 *         type = type.storage_type
 * 
 *     if _is_array_like(value):             # <<<<<<<<<<<<<<
 *         value = get_values(value, &is_pandas_object)
 * 
*/
      __pyx_t_7 = __pyx_f_7pyarrow_3lib__is_array_like(__pyx_v_value); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1657, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(3, 1657, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (__pyx_t_4) {

        /* "pyarrow/scalar.pxi":1658
 * 
 *     if _is_array_like(value):
 *         value = get_values(value, &is_pandas_object)             # <<<<<<<<<<<<<<
 * 
 *     options.size = 1
*/
        __pyx_t_7 = __pyx_f_7pyarrow_3lib_get_values(__pyx_v_value, (&__pyx_v_is_pandas_object)); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1658, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_7);
        __pyx_t_7 = 0;

        /* "pyarrow/scalar.pxi":1657
 *         type = type.storage_type
 * 
 *     if _is_array_like(value):             # <<<<<<<<<<<<<<
 *         value = get_values(value, &is_pandas_object)
 * 
*/
      }

      /* "pyarrow/scalar.pxi":1660
 *         value = get_values(value, &is_pandas_object)
 * 
 *     options.size = 1             # <<<<<<<<<<<<<<
 * 
 *     if type is not None:
*/
      __pyx_v_options.size = 1;

      /* "pyarrow/scalar.pxi":1662
 *     options.size = 1
 * 
 *     if type is not None:             # <<<<<<<<<<<<<<
 *         ty = ensure_type(type)
 *         options.type = ty.sp_type
*/
      __pyx_t_4 = (__pyx_v_type != Py_None);
      if (__pyx_t_4) {

        /* "pyarrow/scalar.pxi":1663
 * 
 *     if type is not None:
 *         ty = ensure_type(type)             # <<<<<<<<<<<<<<
 *         options.type = ty.sp_type
 * 
*/
        __pyx_t_7 = ((PyObject *)__pyx_f_7pyarrow_3lib_ensure_type(__pyx_v_type, 0, NULL)); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1663, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_v_ty = ((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_t_7);
        __pyx_t_7 = 0;

        /* "pyarrow/scalar.pxi":1664
 *     if type is not None:
 *         ty = ensure_type(type)
 *         options.type = ty.sp_type             # <<<<<<<<<<<<<<
 * 
 *     if from_pandas is None:
*/
        if (unlikely(((PyObject *)__pyx_v_ty) == Py_None)) {
          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_type");
          __PYX_ERR(3, 1664, __pyx_L1_error)
        }
        __pyx_t_8 = __pyx_v_ty->sp_type;
        __pyx_v_options.type = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_8);

        /* "pyarrow/scalar.pxi":1662
 *     options.size = 1
 * 
 *     if type is not None:             # <<<<<<<<<<<<<<
 *         ty = ensure_type(type)
 *         options.type = ty.sp_type
*/
      }

      /* "pyarrow/scalar.pxi":1666
 *         options.type = ty.sp_type
 * 
 *     if from_pandas is None:             # <<<<<<<<<<<<<<
 *         options.from_pandas = is_pandas_object
 *     else:
*/
      __pyx_t_4 = (__pyx_v_from_pandas == Py_None);
      if (__pyx_t_4) {

        /* "pyarrow/scalar.pxi":1667
 * 
 *     if from_pandas is None:
 *         options.from_pandas = is_pandas_object             # <<<<<<<<<<<<<<
 *     else:
 *         options.from_pandas = from_pandas
*/
        __pyx_v_options.from_pandas = __pyx_v_is_pandas_object;

        /* "pyarrow/scalar.pxi":1666
 *         options.type = ty.sp_type
 * 
 *     if from_pandas is None:             # <<<<<<<<<<<<<<
 *         options.from_pandas = is_pandas_object
 *     else:
*/
        goto __pyx_L8;
      }

      /* "pyarrow/scalar.pxi":1669
 *         options.from_pandas = is_pandas_object
 *     else:
 *         options.from_pandas = from_pandas             # <<<<<<<<<<<<<<
 * 
 *     value = [value]
*/
      /*else*/ {
        __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_from_pandas); if (unlikely((__pyx_t_9 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1669, __pyx_L1_error)
        __pyx_v_options.from_pandas = __pyx_t_9;
      }
      __pyx_L8:;

      /* "pyarrow/scalar.pxi":1671
 *         options.from_pandas = from_pandas
 * 
 *     value = [value]             # <<<<<<<<<<<<<<
 *     with nogil:
 *         chunked = GetResultValue(ConvertPySequence(value, None, options, pool))
*/
      __pyx_t_7 = PyList_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1671, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_INCREF(__pyx_v_value);
      __Pyx_GIVEREF(__pyx_v_value);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_7, 0, __pyx_v_value) != (0)) __PYX_ERR(3, 1671, __pyx_L1_error);
      __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_7);
      __pyx_t_7 = 0;

      /* "pyarrow/scalar.pxi":1672
 * 
 *     value = [value]
 *     with nogil:             # <<<<<<<<<<<<<<
 *         chunked = GetResultValue(ConvertPySequence(value, None, options, pool))
 * 
*/
      {
          PyThreadState * _save;
          _save = PyEval_SaveThread();
          __Pyx_FastGIL_Remember();
          /*try:*/ {

            /* "pyarrow/scalar.pxi":1673
 *     value = [value]
 *     with nogil:
 *         chunked = GetResultValue(ConvertPySequence(value, None, options, pool))             # <<<<<<<<<<<<<<
 * 
 *     # get the first chunk
*/
            __pyx_t_10 = arrow::py::GetResultValue<std::shared_ptr< arrow::ChunkedArray> >(arrow::py::ConvertPySequence(__pyx_v_value, Py_None, __pyx_v_options, __pyx_v_pool)); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(3, 1673, __pyx_L10_error)
            __pyx_v_chunked = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_10);
          }

          /* "pyarrow/scalar.pxi":1672
 * 
 *     value = [value]
 *     with nogil:             # <<<<<<<<<<<<<<
 *         chunked = GetResultValue(ConvertPySequence(value, None, options, pool))
 * 
*/
          /*finally:*/ {
            /*normal exit:*/{
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L11;
            }
            __pyx_L10_error: {
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L1_error;
            }
            __pyx_L11:;
          }
      }

      /* "pyarrow/scalar.pxi":1676
 * 
 *     # get the first chunk
 *     assert chunked.get().num_chunks() == 1             # <<<<<<<<<<<<<<
 *     array = chunked.get().chunk(0)
 * 
*/
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      if (unlikely(__pyx_assertions_enabled())) {
        __pyx_t_4 = (__pyx_v_chunked.get()->num_chunks() == 1);
        if (unlikely(!__pyx_t_4)) {
          __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
          __PYX_ERR(3, 1676, __pyx_L1_error)
        }
      }
      #else
      if ((1)); else __PYX_ERR(3, 1676, __pyx_L1_error)
      #endif

      /* "pyarrow/scalar.pxi":1677
 *     # get the first chunk
 *     assert chunked.get().num_chunks() == 1
 *     array = chunked.get().chunk(0)             # <<<<<<<<<<<<<<
 * 
 *     # retrieve the scalar from the first position
*/
      __pyx_v_array = __pyx_v_chunked.get()->chunk(0);

      /* "pyarrow/scalar.pxi":1680
 * 
 *     # retrieve the scalar from the first position
 *     scalar = GetResultValue(array.get().GetScalar(0))             # <<<<<<<<<<<<<<
 *     result = Scalar.wrap(scalar)
 * 
*/
      __pyx_t_11 = arrow::py::GetResultValue<std::shared_ptr< arrow::Scalar> >(__pyx_v_array.get()->GetScalar(0)); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1680, __pyx_L1_error)
      __pyx_v_scalar = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_11);

      /* "pyarrow/scalar.pxi":1681
 *     # retrieve the scalar from the first position
 *     scalar = GetResultValue(array.get().GetScalar(0))
 *     result = Scalar.wrap(scalar)             # <<<<<<<<<<<<<<
 * 
 *     if extension_type is not None:
*/
      __pyx_t_7 = __pyx_f_7pyarrow_3lib_6Scalar_wrap(__pyx_v_scalar); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1681, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_v_result = __pyx_t_7;
      __pyx_t_7 = 0;

      /* "pyarrow/scalar.pxi":1683
 *     result = Scalar.wrap(scalar)
 * 
 *     if extension_type is not None:             # <<<<<<<<<<<<<<
 *         result = ExtensionScalar.from_storage(extension_type, result)
 *     return result
*/
      __pyx_t_4 = (__pyx_v_extension_type != Py_None);
      if (__pyx_t_4) {

        /* "pyarrow/scalar.pxi":1684
 * 
 *     if extension_type is not None:
 *         result = ExtensionScalar.from_storage(extension_type, result)             # <<<<<<<<<<<<<<
 *     return result
*/
        __pyx_t_6 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ExtensionScalar);
        __Pyx_INCREF(__pyx_t_6);
        __pyx_t_12 = 0;
        {
          PyObject *__pyx_callargs[3] = {__pyx_t_6, __pyx_v_extension_type, __pyx_v_result};
          __pyx_t_7 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_from_storage, __pyx_callargs+__pyx_t_12, (3-__pyx_t_12) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1684, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
        }
        __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_7);
        __pyx_t_7 = 0;

        /* "pyarrow/scalar.pxi":1683
 *     result = Scalar.wrap(scalar)
 * 
 *     if extension_type is not None:             # <<<<<<<<<<<<<<
 *         result = ExtensionScalar.from_storage(extension_type, result)
 *     return result
*/
      }

      /* "pyarrow/scalar.pxi":1685
 *     if extension_type is not None:
 *         result = ExtensionScalar.from_storage(extension_type, result)
 *     return result             # <<<<<<<<<<<<<<
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_result);
      __pyx_r = __pyx_v_result;
      goto __pyx_L0;

      /* "pyarrow/scalar.pxi":1601
 * 
 * 
 * def scalar(value, type=None, *, from_pandas=None, MemoryPool memory_pool=None):             # <<<<<<<<<<<<<<
 *     """
 *     Create a pyarrow.Scalar instance from a Python object.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_7);
      __Pyx_AddTraceback("pyarrow.lib.scalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF((PyObject *)__pyx_v_ty);
      __Pyx_XDECREF(__pyx_v_extension_type);
      __Pyx_XDECREF(__pyx_v_result);
      __Pyx_XDECREF(__pyx_v_value);
      __Pyx_XDECREF(__pyx_v_type);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":29
 *     T get[T](...)
 * 
 * cdef _sequence_to_array(object sequence, object mask, object size,             # <<<<<<<<<<<<<<
 *                         DataType type, CMemoryPool* pool, c_bool from_pandas):
 *     cdef:
*/

    static PyObject *__pyx_f_7pyarrow_3lib__sequence_to_array(PyObject *__pyx_v_sequence, PyObject *__pyx_v_mask, PyObject *__pyx_v_size, struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v_type,  arrow::MemoryPool *__pyx_v_pool, bool __pyx_v_from_pandas) {
      arrow::py::PyConversionOptions __pyx_v_options;
      std::shared_ptr< arrow::ChunkedArray>  __pyx_v_chunked;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      int __pyx_t_1;
      std::shared_ptr< arrow::DataType>  __pyx_t_2;
      int64_t __pyx_t_3;
      PyObject *__pyx_t_4 = NULL;
      PyObject *__pyx_t_5 = NULL;
      bool __pyx_t_6;
      std::shared_ptr< arrow::ChunkedArray>  __pyx_t_7;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("_sequence_to_array", 0);

      /* "pyarrow/array.pxi":36
 *         shared_ptr[CChunkedArray] chunked
 * 
 *     if type is not None:             # <<<<<<<<<<<<<<
 *         options.type = type.sp_type
 * 
*/
      __pyx_t_1 = (((PyObject *)__pyx_v_type) != Py_None);
      if (__pyx_t_1) {

        /* "pyarrow/array.pxi":37
 * 
 *     if type is not None:
 *         options.type = type.sp_type             # <<<<<<<<<<<<<<
 * 
 *     if size is not None:
*/
        if (unlikely(((PyObject *)__pyx_v_type) == Py_None)) {
          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_type");
          __PYX_ERR(4, 37, __pyx_L1_error)
        }
        __pyx_t_2 = __pyx_v_type->sp_type;
        __pyx_v_options.type = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_2);

        /* "pyarrow/array.pxi":36
 *         shared_ptr[CChunkedArray] chunked
 * 
 *     if type is not None:             # <<<<<<<<<<<<<<
 *         options.type = type.sp_type
 * 
*/
      }

      /* "pyarrow/array.pxi":39
 *         options.type = type.sp_type
 * 
 *     if size is not None:             # <<<<<<<<<<<<<<
 *         options.size = size
 * 
*/
      __pyx_t_1 = (__pyx_v_size != Py_None);
      if (__pyx_t_1) {

        /* "pyarrow/array.pxi":40
 * 
 *     if size is not None:
 *         options.size = size             # <<<<<<<<<<<<<<
 * 
 *     options.from_pandas = from_pandas
*/
        __pyx_t_3 = __Pyx_PyLong_As_int64_t(__pyx_v_size); if (unlikely((__pyx_t_3 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(4, 40, __pyx_L1_error)
        __pyx_v_options.size = __pyx_t_3;

        /* "pyarrow/array.pxi":39
 *         options.type = type.sp_type
 * 
 *     if size is not None:             # <<<<<<<<<<<<<<
 *         options.size = size
 * 
*/
      }

      /* "pyarrow/array.pxi":42
 *         options.size = size
 * 
 *     options.from_pandas = from_pandas             # <<<<<<<<<<<<<<
 *     options.ignore_timezone = os.environ.get('PYARROW_IGNORE_TIMEZONE', False)
 * 
*/
      __pyx_v_options.from_pandas = __pyx_v_from_pandas;

      /* "pyarrow/array.pxi":43
 * 
 *     options.from_pandas = from_pandas
 *     options.ignore_timezone = os.environ.get('PYARROW_IGNORE_TIMEZONE', False)             # <<<<<<<<<<<<<<
 * 
 *     with nogil:
*/
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_os); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 43, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_environ); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 43, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_get); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 43, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[3], NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 43, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_6 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(4, 43, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_v_options.ignore_timezone = __pyx_t_6;

      /* "pyarrow/array.pxi":45
 *     options.ignore_timezone = os.environ.get('PYARROW_IGNORE_TIMEZONE', False)
 * 
 *     with nogil:             # <<<<<<<<<<<<<<
 *         chunked = GetResultValue(
 *             ConvertPySequence(sequence, mask, options, pool)
*/
      {
          PyThreadState * _save;
          _save = PyEval_SaveThread();
          __Pyx_FastGIL_Remember();
          /*try:*/ {

            /* "pyarrow/array.pxi":46
 * 
 *     with nogil:
 *         chunked = GetResultValue(             # <<<<<<<<<<<<<<
 *             ConvertPySequence(sequence, mask, options, pool)
 *         )
*/
            __pyx_t_7 = arrow::py::GetResultValue<std::shared_ptr< arrow::ChunkedArray> >(arrow::py::ConvertPySequence(__pyx_v_sequence, __pyx_v_mask, __pyx_v_options, __pyx_v_pool)); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(4, 46, __pyx_L6_error)
            __pyx_v_chunked = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_7);
          }

          /* "pyarrow/array.pxi":45
 *     options.ignore_timezone = os.environ.get('PYARROW_IGNORE_TIMEZONE', False)
 * 
 *     with nogil:             # <<<<<<<<<<<<<<
 *         chunked = GetResultValue(
 *             ConvertPySequence(sequence, mask, options, pool)
*/
          /*finally:*/ {
            /*normal exit:*/{
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L7;
            }
            __pyx_L6_error: {
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L1_error;
            }
            __pyx_L7:;
          }
      }

      /* "pyarrow/array.pxi":50
 *         )
 * 
 *     if chunked.get().num_chunks() == 1:             # <<<<<<<<<<<<<<
 *         return pyarrow_wrap_array(chunked.get().chunk(0))
 *     else:
*/
      __pyx_t_1 = (__pyx_v_chunked.get()->num_chunks() == 1);
      if (__pyx_t_1) {

        /* "pyarrow/array.pxi":51
 * 
 *     if chunked.get().num_chunks() == 1:
 *         return pyarrow_wrap_array(chunked.get().chunk(0))             # <<<<<<<<<<<<<<
 *     else:
 *         return pyarrow_wrap_chunked_array(chunked)
*/
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_5 = pyarrow_wrap_array(__pyx_v_chunked.get()->chunk(0)); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 51, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_r = __pyx_t_5;
        __pyx_t_5 = 0;
        goto __pyx_L0;

        /* "pyarrow/array.pxi":50
 *         )
 * 
 *     if chunked.get().num_chunks() == 1:             # <<<<<<<<<<<<<<
 *         return pyarrow_wrap_array(chunked.get().chunk(0))
 *     else:
*/
      }

      /* "pyarrow/array.pxi":53
 *         return pyarrow_wrap_array(chunked.get().chunk(0))
 *     else:
 *         return pyarrow_wrap_chunked_array(chunked)             # <<<<<<<<<<<<<<
 * 
 * 
*/
      /*else*/ {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_5 = pyarrow_wrap_chunked_array(__pyx_v_chunked); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 53, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_r = __pyx_t_5;
        __pyx_t_5 = 0;
        goto __pyx_L0;
      }

      /* "pyarrow/array.pxi":29
 *     T get[T](...)
 * 
 * cdef _sequence_to_array(object sequence, object mask, object size,             # <<<<<<<<<<<<<<
 *                         DataType type, CMemoryPool* pool, c_bool from_pandas):
 *     cdef:
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_AddTraceback("pyarrow.lib._sequence_to_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = 0;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":56
 * 
 * 
 * cdef inline _is_array_like(obj):             # <<<<<<<<<<<<<<
 *     if np is None:
 *         return False
*/

    static CYTHON_INLINE PyObject *__pyx_f_7pyarrow_3lib__is_array_like(PyObject *__pyx_v_obj) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_t_2;
      PyObject *__pyx_t_3 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("_is_array_like", 0);

      /* "pyarrow/array.pxi":57
 * 
 * cdef inline _is_array_like(obj):
 *     if np is None:             # <<<<<<<<<<<<<<
 *         return False
 *     if isinstance(obj, np.ndarray):
*/
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 57, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = (__pyx_t_1 == Py_None);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (__pyx_t_2) {

        /* "pyarrow/array.pxi":58
 * cdef inline _is_array_like(obj):
 *     if np is None:
 *         return False             # <<<<<<<<<<<<<<
 *     if isinstance(obj, np.ndarray):
 *         return True
*/
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(Py_False);
        __pyx_r = Py_False;
        goto __pyx_L0;

        /* "pyarrow/array.pxi":57
 * 
 * cdef inline _is_array_like(obj):
 *     if np is None:             # <<<<<<<<<<<<<<
 *         return False
 *     if isinstance(obj, np.ndarray):
*/
      }

      /* "pyarrow/array.pxi":59
 *     if np is None:
 *         return False
 *     if isinstance(obj, np.ndarray):             # <<<<<<<<<<<<<<
 *         return True
 *     return pandas_api._have_pandas_internal() and pandas_api.is_array_like(obj)
*/
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 59, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_ndarray); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 59, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_2 = PyObject_IsInstance(__pyx_v_obj, __pyx_t_3); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(4, 59, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_2) {

        /* "pyarrow/array.pxi":60
 *         return False
 *     if isinstance(obj, np.ndarray):
 *         return True             # <<<<<<<<<<<<<<
 *     return pandas_api._have_pandas_internal() and pandas_api.is_array_like(obj)
 * 
*/
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(Py_True);
        __pyx_r = Py_True;
        goto __pyx_L0;

        /* "pyarrow/array.pxi":59
 *     if np is None:
 *         return False
 *     if isinstance(obj, np.ndarray):             # <<<<<<<<<<<<<<
 *         return True
 *     return pandas_api._have_pandas_internal() and pandas_api.is_array_like(obj)
*/
      }

      /* "pyarrow/array.pxi":61
 *     if isinstance(obj, np.ndarray):
 *         return True
 *     return pandas_api._have_pandas_internal() and pandas_api.is_array_like(obj)             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      if (unlikely(((PyObject *)__pyx_v_7pyarrow_3lib_pandas_api) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_have_pandas_internal");
        __PYX_ERR(4, 61, __pyx_L1_error)
      }
      __pyx_t_2 = __pyx_f_7pyarrow_3lib_14_PandasAPIShim__have_pandas_internal(__pyx_v_7pyarrow_3lib_pandas_api); if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 61, __pyx_L1_error)
      if (__pyx_t_2) {
      } else {
        __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 61, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1;
        __pyx_t_1 = 0;
        goto __pyx_L5_bool_binop_done;
      }
      if (unlikely(((PyObject *)__pyx_v_7pyarrow_3lib_pandas_api) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "is_array_like");
        __PYX_ERR(4, 61, __pyx_L1_error)
      }
      __pyx_t_1 = ((struct __pyx_vtabstruct_7pyarrow_3lib__PandasAPIShim *)__pyx_v_7pyarrow_3lib_pandas_api->__pyx_vtab)->is_array_like(__pyx_v_7pyarrow_3lib_pandas_api, __pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 61, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_3 = __pyx_t_1;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_L5_bool_binop_done:;
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":56
 * 
 * 
 * cdef inline _is_array_like(obj):             # <<<<<<<<<<<<<<
 *     if np is None:
 *         return False
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_AddTraceback("pyarrow.lib._is_array_like", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = 0;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":64
 * 
 * 
 * def _ndarray_to_arrow_type(object values, DataType type):             # <<<<<<<<<<<<<<
 *     return pyarrow_wrap_data_type(_ndarray_to_type(values, type))
 * 
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_191_ndarray_to_arrow_type(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_190_ndarray_to_arrow_type, "_ndarray_to_arrow_type(values, DataType type)");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_191_ndarray_to_arrow_type = {"_ndarray_to_arrow_type", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_191_ndarray_to_arrow_type, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_190_ndarray_to_arrow_type};
    static PyObject *__pyx_pw_7pyarrow_3lib_191_ndarray_to_arrow_type(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_values = 0;
      struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v_type = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[2] = {0,0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("_ndarray_to_arrow_type (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_values,&__pyx_mstate_global->__pyx_n_u_type,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(4, 64, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(4, 64, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 64, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_ndarray_to_arrow_type", 0) < (0)) __PYX_ERR(4, 64, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_ndarray_to_arrow_type", 1, 2, 2, i); __PYX_ERR(4, 64, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 2)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 64, __pyx_L3_error)
          values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(4, 64, __pyx_L3_error)
        }
        __pyx_v_values = values[0];
        __pyx_v_type = ((struct __pyx_obj_7pyarrow_3lib_DataType *)values[1]);
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("_ndarray_to_arrow_type", 1, 2, 2, __pyx_nargs); __PYX_ERR(4, 64, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib._ndarray_to_arrow_type", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_type), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType, 1, "type", 0))) __PYX_ERR(4, 64, __pyx_L1_error)
      __pyx_r = __pyx_pf_7pyarrow_3lib_190_ndarray_to_arrow_type(__pyx_self, __pyx_v_values, __pyx_v_type);

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = NULL;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      goto __pyx_L7_cleaned_up;
      __pyx_L0:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __pyx_L7_cleaned_up:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_190_ndarray_to_arrow_type(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_values, struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v_type) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      std::shared_ptr< arrow::DataType>  __pyx_t_1;
      PyObject *__pyx_t_2 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("_ndarray_to_arrow_type", 0);

      /* "pyarrow/array.pxi":65
 * 
 * def _ndarray_to_arrow_type(object values, DataType type):
 *     return pyarrow_wrap_data_type(_ndarray_to_type(values, type))             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __pyx_f_7pyarrow_3lib__ndarray_to_type(__pyx_v_values, __pyx_v_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 65, __pyx_L1_error)
      __pyx_t_2 = pyarrow_wrap_data_type(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 65, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":64
 * 
 * 
 * def _ndarray_to_arrow_type(object values, DataType type):             # <<<<<<<<<<<<<<
 *     return pyarrow_wrap_data_type(_ndarray_to_type(values, type))
 * 
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_AddTraceback("pyarrow.lib._ndarray_to_arrow_type", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":68
 * 
 * 
 * cdef shared_ptr[CDataType] _ndarray_to_type(object values,             # <<<<<<<<<<<<<<
 *                                             DataType type) except *:
 *     cdef shared_ptr[CDataType] c_type
*/

    static std::shared_ptr< arrow::DataType>  __pyx_f_7pyarrow_3lib__ndarray_to_type(PyObject *__pyx_v_values, struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v_type) {
      std::shared_ptr< arrow::DataType>  __pyx_v_c_type;
      PyObject *__pyx_v_dtype = NULL;
      std::shared_ptr< arrow::DataType>  __pyx_r;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_t_2;
      int __pyx_t_3;
      std::shared_ptr< arrow::DataType>  __pyx_t_4;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("_ndarray_to_type", 0);

      /* "pyarrow/array.pxi":72
 *     cdef shared_ptr[CDataType] c_type
 * 
 *     dtype = values.dtype             # <<<<<<<<<<<<<<
 * 
 *     if type is None and dtype != object:
*/
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_values, __pyx_mstate_global->__pyx_n_u_dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 72, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_v_dtype = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "pyarrow/array.pxi":74
 *     dtype = values.dtype
 * 
 *     if type is None and dtype != object:             # <<<<<<<<<<<<<<
 *         c_type = GetResultValue(NumPyDtypeToArrow(dtype))
 * 
*/
      __pyx_t_3 = (((PyObject *)__pyx_v_type) == Py_None);
      if (__pyx_t_3) {
      } else {
        __pyx_t_2 = __pyx_t_3;
        goto __pyx_L4_bool_binop_done;
      }
      __pyx_t_1 = PyObject_RichCompare(__pyx_v_dtype, __pyx_builtin_object, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 74, __pyx_L1_error)
      __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(4, 74, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_2 = __pyx_t_3;
      __pyx_L4_bool_binop_done:;
      if (__pyx_t_2) {

        /* "pyarrow/array.pxi":75
 * 
 *     if type is None and dtype != object:
 *         c_type = GetResultValue(NumPyDtypeToArrow(dtype))             # <<<<<<<<<<<<<<
 * 
 *     if type is not None:
*/
        __pyx_t_4 = arrow::py::GetResultValue<std::shared_ptr< arrow::DataType> >(arrow::py::NumPyDtypeToArrow(__pyx_v_dtype)); if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 75, __pyx_L1_error)
        __pyx_v_c_type = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_4);

        /* "pyarrow/array.pxi":74
 *     dtype = values.dtype
 * 
 *     if type is None and dtype != object:             # <<<<<<<<<<<<<<
 *         c_type = GetResultValue(NumPyDtypeToArrow(dtype))
 * 
*/
      }

      /* "pyarrow/array.pxi":77
 *         c_type = GetResultValue(NumPyDtypeToArrow(dtype))
 * 
 *     if type is not None:             # <<<<<<<<<<<<<<
 *         c_type = type.sp_type
 * 
*/
      __pyx_t_2 = (((PyObject *)__pyx_v_type) != Py_None);
      if (__pyx_t_2) {

        /* "pyarrow/array.pxi":78
 * 
 *     if type is not None:
 *         c_type = type.sp_type             # <<<<<<<<<<<<<<
 * 
 *     return c_type
*/
        if (unlikely(((PyObject *)__pyx_v_type) == Py_None)) {
          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_type");
          __PYX_ERR(4, 78, __pyx_L1_error)
        }
        __pyx_t_4 = __pyx_v_type->sp_type;
        __pyx_v_c_type = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_4);

        /* "pyarrow/array.pxi":77
 *         c_type = GetResultValue(NumPyDtypeToArrow(dtype))
 * 
 *     if type is not None:             # <<<<<<<<<<<<<<
 *         c_type = type.sp_type
 * 
*/
      }

      /* "pyarrow/array.pxi":80
 *         c_type = type.sp_type
 * 
 *     return c_type             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __pyx_r = __pyx_v_c_type;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":68
 * 
 * 
 * cdef shared_ptr[CDataType] _ndarray_to_type(object values,             # <<<<<<<<<<<<<<
 *                                             DataType type) except *:
 *     cdef shared_ptr[CDataType] c_type
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("pyarrow.lib._ndarray_to_type", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_pretend_to_initialize(&__pyx_r);
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_dtype);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":83
 * 
 * 
 * cdef _ndarray_to_array(object values, object mask, DataType type,             # <<<<<<<<<<<<<<
 *                        c_bool from_pandas, c_bool safe, CMemoryPool* pool):
 *     cdef:
*/

    static PyObject *__pyx_f_7pyarrow_3lib__ndarray_to_array(PyObject *__pyx_v_values, PyObject *__pyx_v_mask, struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v_type, bool __pyx_v_from_pandas, bool __pyx_v_safe,  arrow::MemoryPool *__pyx_v_pool) {
      std::shared_ptr< arrow::ChunkedArray>  __pyx_v_chunked_out;
      std::shared_ptr< arrow::DataType>  __pyx_v_c_type;
       arrow::compute::CastOptions __pyx_v_cast_options;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      std::shared_ptr< arrow::DataType>  __pyx_t_1;
      int __pyx_t_2;
      int __pyx_t_3;
      PyObject *__pyx_t_4 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("_ndarray_to_array", 0);

      /* "pyarrow/array.pxi":87
 *     cdef:
 *         shared_ptr[CChunkedArray] chunked_out
 *         shared_ptr[CDataType] c_type = _ndarray_to_type(values, type)             # <<<<<<<<<<<<<<
 *         CCastOptions cast_options = CCastOptions(safe)
 * 
*/
      __pyx_t_1 = __pyx_f_7pyarrow_3lib__ndarray_to_type(__pyx_v_values, __pyx_v_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 87, __pyx_L1_error)
      __pyx_v_c_type = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_1);

      /* "pyarrow/array.pxi":88
 *         shared_ptr[CChunkedArray] chunked_out
 *         shared_ptr[CDataType] c_type = _ndarray_to_type(values, type)
 *         CCastOptions cast_options = CCastOptions(safe)             # <<<<<<<<<<<<<<
 * 
 *     with nogil:
*/
      __pyx_v_cast_options =  arrow::compute::CastOptions(__pyx_v_safe);

      /* "pyarrow/array.pxi":90
 *         CCastOptions cast_options = CCastOptions(safe)
 * 
 *     with nogil:             # <<<<<<<<<<<<<<
 *         check_status(NdarrayToArrow(pool, values, mask, from_pandas,
 *                                     c_type, cast_options, &chunked_out))
*/
      {
          PyThreadState * _save;
          _save = PyEval_SaveThread();
          __Pyx_FastGIL_Remember();
          /*try:*/ {

            /* "pyarrow/array.pxi":91
 * 
 *     with nogil:
 *         check_status(NdarrayToArrow(pool, values, mask, from_pandas,             # <<<<<<<<<<<<<<
 *                                     c_type, cast_options, &chunked_out))
 * 
*/
            __pyx_t_2 = __pyx_f_7pyarrow_3lib_check_status(arrow::py::NdarrayToArrow(__pyx_v_pool, __pyx_v_values, __pyx_v_mask, __pyx_v_from_pandas, __pyx_v_c_type, __pyx_v_cast_options, (&__pyx_v_chunked_out))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(4, 91, __pyx_L4_error)
          }

          /* "pyarrow/array.pxi":90
 *         CCastOptions cast_options = CCastOptions(safe)
 * 
 *     with nogil:             # <<<<<<<<<<<<<<
 *         check_status(NdarrayToArrow(pool, values, mask, from_pandas,
 *                                     c_type, cast_options, &chunked_out))
*/
          /*finally:*/ {
            /*normal exit:*/{
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L5;
            }
            __pyx_L4_error: {
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L1_error;
            }
            __pyx_L5:;
          }
      }

      /* "pyarrow/array.pxi":94
 *                                     c_type, cast_options, &chunked_out))
 * 
 *     if chunked_out.get().num_chunks() > 1:             # <<<<<<<<<<<<<<
 *         return pyarrow_wrap_chunked_array(chunked_out)
 *     else:
*/
      __pyx_t_3 = (__pyx_v_chunked_out.get()->num_chunks() > 1);
      if (__pyx_t_3) {

        /* "pyarrow/array.pxi":95
 * 
 *     if chunked_out.get().num_chunks() > 1:
 *         return pyarrow_wrap_chunked_array(chunked_out)             # <<<<<<<<<<<<<<
 *     else:
 *         return pyarrow_wrap_array(chunked_out.get().chunk(0))
*/
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_4 = pyarrow_wrap_chunked_array(__pyx_v_chunked_out); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 95, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_r = __pyx_t_4;
        __pyx_t_4 = 0;
        goto __pyx_L0;

        /* "pyarrow/array.pxi":94
 *                                     c_type, cast_options, &chunked_out))
 * 
 *     if chunked_out.get().num_chunks() > 1:             # <<<<<<<<<<<<<<
 *         return pyarrow_wrap_chunked_array(chunked_out)
 *     else:
*/
      }

      /* "pyarrow/array.pxi":97
 *         return pyarrow_wrap_chunked_array(chunked_out)
 *     else:
 *         return pyarrow_wrap_array(chunked_out.get().chunk(0))             # <<<<<<<<<<<<<<
 * 
 * 
*/
      /*else*/ {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_4 = pyarrow_wrap_array(__pyx_v_chunked_out.get()->chunk(0)); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 97, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_r = __pyx_t_4;
        __pyx_t_4 = 0;
        goto __pyx_L0;
      }

      /* "pyarrow/array.pxi":83
 * 
 * 
 * cdef _ndarray_to_array(object values, object mask, DataType type,             # <<<<<<<<<<<<<<
 *                        c_bool from_pandas, c_bool safe, CMemoryPool* pool):
 *     cdef:
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_AddTraceback("pyarrow.lib._ndarray_to_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = 0;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":100
 * 
 * 
 * cdef _codes_to_indices(object codes, object mask, DataType type,             # <<<<<<<<<<<<<<
 *                        MemoryPool memory_pool):
 *     """
*/

    static PyObject *__pyx_f_7pyarrow_3lib__codes_to_indices(PyObject *__pyx_v_codes, PyObject *__pyx_v_mask, struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v_type, struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_memory_pool) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      int __pyx_t_1;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      size_t __pyx_t_5;
      PyObject *__pyx_t_6 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("_codes_to_indices", 0);
      __Pyx_INCREF(__pyx_v_mask);

      /* "pyarrow/array.pxi":106
 *     DictionaryArray, taking into account missing values + mask
 *     """
 *     if mask is None:             # <<<<<<<<<<<<<<
 *         mask = codes == -1
 *     else:
*/
      __pyx_t_1 = (__pyx_v_mask == Py_None);
      if (__pyx_t_1) {

        /* "pyarrow/array.pxi":107
 *     """
 *     if mask is None:
 *         mask = codes == -1             # <<<<<<<<<<<<<<
 *     else:
 *         mask = mask | (codes == -1)
*/
        __pyx_t_2 = __Pyx_PyLong_EqObjC(__pyx_v_codes, __pyx_mstate_global->__pyx_int_neg_1, -1L, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 107, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF_SET(__pyx_v_mask, __pyx_t_2);
        __pyx_t_2 = 0;

        /* "pyarrow/array.pxi":106
 *     DictionaryArray, taking into account missing values + mask
 *     """
 *     if mask is None:             # <<<<<<<<<<<<<<
 *         mask = codes == -1
 *     else:
*/
        goto __pyx_L3;
      }

      /* "pyarrow/array.pxi":109
 *         mask = codes == -1
 *     else:
 *         mask = mask | (codes == -1)             # <<<<<<<<<<<<<<
 *     return array(codes, mask=mask, type=type, memory_pool=memory_pool)
 * 
*/
      /*else*/ {
        __pyx_t_2 = __Pyx_PyLong_EqObjC(__pyx_v_codes, __pyx_mstate_global->__pyx_int_neg_1, -1L, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 109, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_3 = PyNumber_Or(__pyx_v_mask, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 109, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF_SET(__pyx_v_mask, __pyx_t_3);
        __pyx_t_3 = 0;
      }
      __pyx_L3:;

      /* "pyarrow/array.pxi":110
 *     else:
 *         mask = mask | (codes == -1)
 *     return array(codes, mask=mask, type=type, memory_pool=memory_pool)             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_array); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 110, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
        assert(__pyx_t_2);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
        __pyx_t_5 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 3 : 0)] = {__pyx_t_2, __pyx_v_codes};
        __pyx_t_6 = __Pyx_MakeVectorcallBuilderKwds(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 110, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_mask, __pyx_v_mask, __pyx_t_6, __pyx_callargs+2, 0) < (0)) __PYX_ERR(4, 110, __pyx_L1_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_type, ((PyObject *)__pyx_v_type), __pyx_t_6, __pyx_callargs+2, 1) < (0)) __PYX_ERR(4, 110, __pyx_L1_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_memory_pool, ((PyObject *)__pyx_v_memory_pool), __pyx_t_6, __pyx_callargs+2, 2) < (0)) __PYX_ERR(4, 110, __pyx_L1_error)
        __pyx_t_3 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_6);
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 110, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":100
 * 
 * 
 * cdef _codes_to_indices(object codes, object mask, DataType type,             # <<<<<<<<<<<<<<
 *                        MemoryPool memory_pool):
 *     """
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_AddTraceback("pyarrow.lib._codes_to_indices", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = 0;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_mask);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":113
 * 
 * 
 * def _handle_arrow_array_protocol(obj, type, mask, size):             # <<<<<<<<<<<<<<
 *     if mask is not None or size is not None:
 *         raise ValueError(
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_193_handle_arrow_array_protocol(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_192_handle_arrow_array_protocol, "_handle_arrow_array_protocol(obj, type, mask, size)");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_193_handle_arrow_array_protocol = {"_handle_arrow_array_protocol", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_193_handle_arrow_array_protocol, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_192_handle_arrow_array_protocol};
    static PyObject *__pyx_pw_7pyarrow_3lib_193_handle_arrow_array_protocol(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_obj = 0;
      PyObject *__pyx_v_type = 0;
      PyObject *__pyx_v_mask = 0;
      PyObject *__pyx_v_size = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[4] = {0,0,0,0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("_handle_arrow_array_protocol (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_obj,&__pyx_mstate_global->__pyx_n_u_type,&__pyx_mstate_global->__pyx_n_u_mask,&__pyx_mstate_global->__pyx_n_u_size,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(4, 113, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  4:
            values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(4, 113, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  3:
            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(4, 113, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(4, 113, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 113, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_handle_arrow_array_protocol", 0) < (0)) __PYX_ERR(4, 113, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 4; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_handle_arrow_array_protocol", 1, 4, 4, i); __PYX_ERR(4, 113, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 4)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 113, __pyx_L3_error)
          values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(4, 113, __pyx_L3_error)
          values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(4, 113, __pyx_L3_error)
          values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(4, 113, __pyx_L3_error)
        }
        __pyx_v_obj = values[0];
        __pyx_v_type = values[1];
        __pyx_v_mask = values[2];
        __pyx_v_size = values[3];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("_handle_arrow_array_protocol", 1, 4, 4, __pyx_nargs); __PYX_ERR(4, 113, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib._handle_arrow_array_protocol", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_192_handle_arrow_array_protocol(__pyx_self, __pyx_v_obj, __pyx_v_type, __pyx_v_mask, __pyx_v_size);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_192_handle_arrow_array_protocol(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_type, PyObject *__pyx_v_mask, PyObject *__pyx_v_size) {
      PyObject *__pyx_v_res = NULL;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      int __pyx_t_1;
      int __pyx_t_2;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      size_t __pyx_t_5;
      PyObject *__pyx_t_6 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("_handle_arrow_array_protocol", 0);

      /* "pyarrow/array.pxi":114
 * 
 * def _handle_arrow_array_protocol(obj, type, mask, size):
 *     if mask is not None or size is not None:             # <<<<<<<<<<<<<<
 *         raise ValueError(
 *             "Cannot specify a mask or a size when passing an object that is "
*/
      __pyx_t_2 = (__pyx_v_mask != Py_None);
      if (!__pyx_t_2) {
      } else {
        __pyx_t_1 = __pyx_t_2;
        goto __pyx_L4_bool_binop_done;
      }
      __pyx_t_2 = (__pyx_v_size != Py_None);
      __pyx_t_1 = __pyx_t_2;
      __pyx_L4_bool_binop_done:;
      if (unlikely(__pyx_t_1)) {

        /* "pyarrow/array.pxi":115
 * def _handle_arrow_array_protocol(obj, type, mask, size):
 *     if mask is not None or size is not None:
 *         raise ValueError(             # <<<<<<<<<<<<<<
 *             "Cannot specify a mask or a size when passing an object that is "
 *             "converted with the __arrow_array__ protocol.")
*/
        __pyx_t_4 = NULL;
        __pyx_t_5 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Cannot_specify_a_mask_or_a_size};
          __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 115, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        __Pyx_Raise(__pyx_t_3, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __PYX_ERR(4, 115, __pyx_L1_error)

        /* "pyarrow/array.pxi":114
 * 
 * def _handle_arrow_array_protocol(obj, type, mask, size):
 *     if mask is not None or size is not None:             # <<<<<<<<<<<<<<
 *         raise ValueError(
 *             "Cannot specify a mask or a size when passing an object that is "
*/
      }

      /* "pyarrow/array.pxi":118
 *             "Cannot specify a mask or a size when passing an object that is "
 *             "converted with the __arrow_array__ protocol.")
 *     res = obj.__arrow_array__(type=type)             # <<<<<<<<<<<<<<
 *     if not isinstance(res, (Array, ChunkedArray)):
 *         raise TypeError("The object's __arrow_array__ method does not "
*/
      __pyx_t_4 = __pyx_v_obj;
      __Pyx_INCREF(__pyx_t_4);
      __pyx_t_5 = 0;
      {
        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_4, NULL};
        __pyx_t_6 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 118, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_type, __pyx_v_type, __pyx_t_6, __pyx_callargs+1, 0) < (0)) __PYX_ERR(4, 118, __pyx_L1_error)
        __pyx_t_3 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_arrow_array_2, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_6);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 118, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      __pyx_v_res = __pyx_t_3;
      __pyx_t_3 = 0;

      /* "pyarrow/array.pxi":119
 *             "converted with the __arrow_array__ protocol.")
 *     res = obj.__arrow_array__(type=type)
 *     if not isinstance(res, (Array, ChunkedArray)):             # <<<<<<<<<<<<<<
 *         raise TypeError("The object's __arrow_array__ method does not "
 *                         "return a pyarrow Array or ChunkedArray.")
*/
      __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_res, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array); 
      if (!__pyx_t_2) {
      } else {
        __pyx_t_1 = __pyx_t_2;
        goto __pyx_L7_bool_binop_done;
      }
      __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_res, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ChunkedArray); 
      __pyx_t_1 = __pyx_t_2;
      __pyx_L7_bool_binop_done:;
      __pyx_t_2 = (!__pyx_t_1);
      if (unlikely(__pyx_t_2)) {

        /* "pyarrow/array.pxi":120
 *     res = obj.__arrow_array__(type=type)
 *     if not isinstance(res, (Array, ChunkedArray)):
 *         raise TypeError("The object's __arrow_array__ method does not "             # <<<<<<<<<<<<<<
 *                         "return a pyarrow Array or ChunkedArray.")
 *     if isinstance(res, ChunkedArray) and res.num_chunks==1:
*/
        __pyx_t_6 = NULL;
        __pyx_t_5 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_mstate_global->__pyx_kp_u_The_object_s___arrow_array___met};
          __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 120, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        __Pyx_Raise(__pyx_t_3, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __PYX_ERR(4, 120, __pyx_L1_error)

        /* "pyarrow/array.pxi":119
 *             "converted with the __arrow_array__ protocol.")
 *     res = obj.__arrow_array__(type=type)
 *     if not isinstance(res, (Array, ChunkedArray)):             # <<<<<<<<<<<<<<
 *         raise TypeError("The object's __arrow_array__ method does not "
 *                         "return a pyarrow Array or ChunkedArray.")
*/
      }

      /* "pyarrow/array.pxi":122
 *         raise TypeError("The object's __arrow_array__ method does not "
 *                         "return a pyarrow Array or ChunkedArray.")
 *     if isinstance(res, ChunkedArray) and res.num_chunks==1:             # <<<<<<<<<<<<<<
 *         res = res.chunk(0)
 *     if type is not None and res.type != type:
*/
      __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_res, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ChunkedArray); 
      if (__pyx_t_1) {
      } else {
        __pyx_t_2 = __pyx_t_1;
        goto __pyx_L10_bool_binop_done;
      }
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_res, __pyx_mstate_global->__pyx_n_u_num_chunks); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 122, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = (__Pyx_PyLong_BoolEqObjC(__pyx_t_3, __pyx_mstate_global->__pyx_int_1, 1, 0)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(4, 122, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_2 = __pyx_t_1;
      __pyx_L10_bool_binop_done:;
      if (__pyx_t_2) {

        /* "pyarrow/array.pxi":123
 *                         "return a pyarrow Array or ChunkedArray.")
 *     if isinstance(res, ChunkedArray) and res.num_chunks==1:
 *         res = res.chunk(0)             # <<<<<<<<<<<<<<
 *     if type is not None and res.type != type:
 *         res = res.cast(type)
*/
        __pyx_t_6 = __pyx_v_res;
        __Pyx_INCREF(__pyx_t_6);
        __pyx_t_5 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_mstate_global->__pyx_int_0};
          __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_chunk, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 123, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        __Pyx_DECREF_SET(__pyx_v_res, __pyx_t_3);
        __pyx_t_3 = 0;

        /* "pyarrow/array.pxi":122
 *         raise TypeError("The object's __arrow_array__ method does not "
 *                         "return a pyarrow Array or ChunkedArray.")
 *     if isinstance(res, ChunkedArray) and res.num_chunks==1:             # <<<<<<<<<<<<<<
 *         res = res.chunk(0)
 *     if type is not None and res.type != type:
*/
      }

      /* "pyarrow/array.pxi":124
 *     if isinstance(res, ChunkedArray) and res.num_chunks==1:
 *         res = res.chunk(0)
 *     if type is not None and res.type != type:             # <<<<<<<<<<<<<<
 *         res = res.cast(type)
 *     return res
*/
      __pyx_t_1 = (__pyx_v_type != Py_None);
      if (__pyx_t_1) {
      } else {
        __pyx_t_2 = __pyx_t_1;
        goto __pyx_L13_bool_binop_done;
      }
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_res, __pyx_mstate_global->__pyx_n_u_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 124, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_6 = PyObject_RichCompare(__pyx_t_3, __pyx_v_type, Py_NE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 124, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(4, 124, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_2 = __pyx_t_1;
      __pyx_L13_bool_binop_done:;
      if (__pyx_t_2) {

        /* "pyarrow/array.pxi":125
 *         res = res.chunk(0)
 *     if type is not None and res.type != type:
 *         res = res.cast(type)             # <<<<<<<<<<<<<<
 *     return res
 * 
*/
        __pyx_t_3 = __pyx_v_res;
        __Pyx_INCREF(__pyx_t_3);
        __pyx_t_5 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_type};
          __pyx_t_6 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_cast, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 125, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
        }
        __Pyx_DECREF_SET(__pyx_v_res, __pyx_t_6);
        __pyx_t_6 = 0;

        /* "pyarrow/array.pxi":124
 *     if isinstance(res, ChunkedArray) and res.num_chunks==1:
 *         res = res.chunk(0)
 *     if type is not None and res.type != type:             # <<<<<<<<<<<<<<
 *         res = res.cast(type)
 *     return res
*/
      }

      /* "pyarrow/array.pxi":126
 *     if type is not None and res.type != type:
 *         res = res.cast(type)
 *     return res             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_res);
      __pyx_r = __pyx_v_res;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":113
 * 
 * 
 * def _handle_arrow_array_protocol(obj, type, mask, size):             # <<<<<<<<<<<<<<
 *     if mask is not None or size is not None:
 *         raise ValueError(
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_AddTraceback("pyarrow.lib._handle_arrow_array_protocol", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_res);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":129
 * 
 * 
 * def array(object obj, type=None, mask=None, size=None, from_pandas=None,             # <<<<<<<<<<<<<<
 *           bint safe=True, MemoryPool memory_pool=None):
 *     """
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_195array(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_194array, "array(obj, type=None, mask=None, size=None, from_pandas=None, bool safe=True, MemoryPool memory_pool=None)\n\nCreate pyarrow.Array instance from a Python object.\n\nParameters\n----------\nobj : sequence, iterable, ndarray, pandas.Series, Arrow-compatible array\n    If both type and size are specified may be a single use iterable. If\n    not strongly-typed, Arrow type will be inferred for resulting array.\n    Any Arrow-compatible array that implements the Arrow PyCapsule Protocol\n    (has an ``__arrow_c_array__`` or ``__arrow_c_device_array__`` method)\n    can be passed as well.\ntype : pyarrow.DataType\n    Explicit type to attempt to coerce to, otherwise will be inferred from\n    the data.\nmask : array[bool], optional\n    Indicate which values are null (True) or not null (False).\nsize : int64, optional\n    Size of the elements. If the input is larger than size bail at this\n    length. For iterators, if size is larger than the input iterator this\n    will be treated as a \"max size\", but will involve an initial allocation\n    of size followed by a resize to the actual size (so if you know the\n    exact size specifying it correctly will give you better performance).\nfrom_pandas : bool, default None\n    Use pandas's semantics for inferring nulls from values in\n    ndarray-like data. If passed, the mask tasks precedence, but\n    if a value is unmasked (not-null), but still null according to\n    pandas semantics, then it is null. Defaults to False if not\n    passed explicitly by user, or True if a pandas object is\n    passed in.\nsafe : bool, default True\n    Check for overflows or other unsafe conversions.\nmemory_pool : pyarrow.MemoryPool, optional\n    If not passed, will allocate memory from the currently-set default\n    memory pool.\n\nReturns\n-------\narray : pyarrow.Array or pyarrow.ChunkedArray\n    A ChunkedArray instead of an Array is returned if:\n\n    - the object data overflowed binary storage.\n    - the object's ``__arrow_array__""`` protocol method returned a chunked\n      array.\n\nNotes\n-----\nTimezone will be preserved in the returned array for timezone-aware data,\nelse no timezone will be returned for naive timestamps.\nInternally, UTC values are stored for timezone-aware data with the\ntimezone set in the data type.\n\nPandas's DateOffsets and dateutil.relativedelta.relativedelta are by\ndefault converted as MonthDayNanoIntervalArray. relativedelta leapdays\nare ignored as are all absolute fields on both objects. datetime.timedelta\ncan also be converted to MonthDayNanoIntervalArray but this requires\npassing MonthDayNanoIntervalType explicitly.\n\nConverting to dictionary array will promote to a wider integer type for\nindices if the number of distinct values cannot be represented, even if\nthe index type was explicitly set. This means that if there are more than\n127 values the returned dictionary array's index type will be at least\npa.int16() even if pa.int8() was passed to the function. Note that an\nexplicit index type will not be demoted even if it is wider than required.\n\nExamples\n--------\n>>> import pandas as pd\n>>> import pyarrow as pa\n>>> pa.array(pd.Series([1, 2]))\n<pyarrow.lib.Int64Array object at ...>\n[\n  1,\n  2\n]\n\n>>> pa.array([\"a\", \"b\", \"a\"], type=pa.dictionary(pa.int8(), pa.string()))\n<pyarrow.lib.DictionaryArray object at ...>\n...\n-- dictionary:\n  [\n    \"a\",\n    \"b\"\n  ]\n-- indices:\n  [\n    0,\n    1,\n    0\n  ]\n\n>>> import numpy as np\n>>> pa.array(pd.Series([1, 2]), mask=np.array([0, 1], dtype=bool))\n<pyarrow.lib.Int64Array object at ...>\n[\n  1,\n  null\n]\n\n>>> arr = pa.array(range(1024), type=pa.dictionary(pa.int8(), pa.int64()))\n>>> arr.type.index_type\nDataType(int16)");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_195array = {"array", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_195array, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_194array};
    static PyObject *__pyx_pw_7pyarrow_3lib_195array(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_obj = 0;
      PyObject *__pyx_v_type = 0;
      PyObject *__pyx_v_mask = 0;
      PyObject *__pyx_v_size = 0;
      PyObject *__pyx_v_from_pandas = 0;
      int __pyx_v_safe;
      struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_memory_pool = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[7] = {0,0,0,0,0,0,0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("array (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_obj,&__pyx_mstate_global->__pyx_n_u_type,&__pyx_mstate_global->__pyx_n_u_mask,&__pyx_mstate_global->__pyx_n_u_size,&__pyx_mstate_global->__pyx_n_u_from_pandas,&__pyx_mstate_global->__pyx_n_u_safe,&__pyx_mstate_global->__pyx_n_u_memory_pool,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(4, 129, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  7:
            values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(4, 129, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  6:
            values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(4, 129, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  5:
            values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(4, 129, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  4:
            values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(4, 129, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  3:
            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(4, 129, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(4, 129, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 129, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "array", 0) < (0)) __PYX_ERR(4, 129, __pyx_L3_error)
          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
          if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
          if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None));
          if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)Py_None));

          /* "pyarrow/array.pxi":130
 * 
 * def array(object obj, type=None, mask=None, size=None, from_pandas=None,
 *           bint safe=True, MemoryPool memory_pool=None):             # <<<<<<<<<<<<<<
 *     """
 *     Create pyarrow.Array instance from a Python object.
*/
          if (!values[6]) values[6] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)Py_None));
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("array", 0, 1, 7, i); __PYX_ERR(4, 129, __pyx_L3_error) }
          }
        } else {
          switch (__pyx_nargs) {
            case  7:
            values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(4, 129, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  6:
            values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(4, 129, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  5:
            values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(4, 129, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  4:
            values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(4, 129, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  3:
            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(4, 129, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(4, 129, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 129, __pyx_L3_error)
            break;
            default: goto __pyx_L5_argtuple_error;
          }

          /* "pyarrow/array.pxi":129
 * 
 * 
 * def array(object obj, type=None, mask=None, size=None, from_pandas=None,             # <<<<<<<<<<<<<<
 *           bint safe=True, MemoryPool memory_pool=None):
 *     """
*/
          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
          if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
          if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None));
          if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)Py_None));

          /* "pyarrow/array.pxi":130
 * 
 * def array(object obj, type=None, mask=None, size=None, from_pandas=None,
 *           bint safe=True, MemoryPool memory_pool=None):             # <<<<<<<<<<<<<<
 *     """
 *     Create pyarrow.Array instance from a Python object.
*/
          if (!values[6]) values[6] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)Py_None));
        }
        __pyx_v_obj = values[0];
        __pyx_v_type = values[1];
        __pyx_v_mask = values[2];
        __pyx_v_size = values[3];
        __pyx_v_from_pandas = values[4];
        if (values[5]) {
          __pyx_v_safe = __Pyx_PyObject_IsTrue(values[5]); if (unlikely((__pyx_v_safe == (int)-1) && PyErr_Occurred())) __PYX_ERR(4, 130, __pyx_L3_error)
        } else {
          __pyx_v_safe = ((int)((int)1));
        }
        __pyx_v_memory_pool = ((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)values[6]);
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("array", 0, 1, 7, __pyx_nargs); __PYX_ERR(4, 129, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.array", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_memory_pool), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_MemoryPool, 1, "memory_pool", 0))) __PYX_ERR(4, 130, __pyx_L1_error)
      __pyx_r = __pyx_pf_7pyarrow_3lib_194array(__pyx_self, __pyx_v_obj, __pyx_v_type, __pyx_v_mask, __pyx_v_size, __pyx_v_from_pandas, __pyx_v_safe, __pyx_v_memory_pool);

      /* "pyarrow/array.pxi":129
 * 
 * 
 * def array(object obj, type=None, mask=None, size=None, from_pandas=None,             # <<<<<<<<<<<<<<
 *           bint safe=True, MemoryPool memory_pool=None):
 *     """
*/

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = NULL;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      goto __pyx_L7_cleaned_up;
      __pyx_L0:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __pyx_L7_cleaned_up:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_194array(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_type, PyObject *__pyx_v_mask, PyObject *__pyx_v_size, PyObject *__pyx_v_from_pandas, int __pyx_v_safe, struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_memory_pool) {
       arrow::MemoryPool *__pyx_v_pool;
      int __pyx_v_is_pandas_object;
      int __pyx_v_c_from_pandas;
      PyObject *__pyx_v_extension_type = NULL;
      PyObject *__pyx_v_requested_type = NULL;
      PyObject *__pyx_v_schema_capsule = NULL;
      PyObject *__pyx_v_array_capsule = NULL;
      PyObject *__pyx_v_out_array = NULL;
      PyObject *__pyx_v_values = NULL;
      PyObject *__pyx_v_result = NULL;
      PyObject *__pyx_v_index_type = NULL;
      PyObject *__pyx_v_value_type = NULL;
      PyObject *__pyx_v_indices = NULL;
      PyObject *__pyx_v_dictionary = NULL;
      PyObject *__pyx_v_arr = NULL;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
       arrow::MemoryPool *__pyx_t_1;
      PyObject *__pyx_t_2 = NULL;
      struct __pyx_opt_args_7pyarrow_3lib_ensure_type __pyx_t_3;
      int __pyx_t_4;
      int __pyx_t_5;
      PyObject *__pyx_t_6 = NULL;
      PyObject *__pyx_t_7 = NULL;
      size_t __pyx_t_8;
      int __pyx_t_9;
      PyObject *__pyx_t_10 = NULL;
      PyObject *(*__pyx_t_11)(PyObject *);
      PyObject *__pyx_t_12 = NULL;
      Py_ssize_t __pyx_t_13;
      Py_ssize_t __pyx_t_14;
      PyObject *__pyx_t_15 = NULL;
      PyObject *__pyx_t_16 = NULL;
      PyObject *__pyx_t_17 = NULL;
      int __pyx_t_18;
      PyObject *__pyx_t_19 = NULL;
      PyObject *__pyx_t_20 = NULL;
      PyObject *__pyx_t_21 = NULL;
      PyObject *__pyx_t_22[5];
      PyObject *__pyx_t_23 = NULL;
      bool __pyx_t_24;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("array", 0);
      __Pyx_INCREF(__pyx_v_obj);
      __Pyx_INCREF(__pyx_v_type);
      __Pyx_INCREF(__pyx_v_mask);

      /* "pyarrow/array.pxi":234
 *     """
 *     cdef:
 *         CMemoryPool* pool = maybe_unbox_memory_pool(memory_pool)             # <<<<<<<<<<<<<<
 *         bint is_pandas_object = False
 *         bint c_from_pandas
*/
      __pyx_t_1 = __pyx_f_7pyarrow_3lib_maybe_unbox_memory_pool(__pyx_v_memory_pool); if (unlikely(__pyx_t_1 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(4, 234, __pyx_L1_error)
      __pyx_v_pool = __pyx_t_1;

      /* "pyarrow/array.pxi":235
 *     cdef:
 *         CMemoryPool* pool = maybe_unbox_memory_pool(memory_pool)
 *         bint is_pandas_object = False             # <<<<<<<<<<<<<<
 *         bint c_from_pandas
 * 
*/
      __pyx_v_is_pandas_object = 0;

      /* "pyarrow/array.pxi":238
 *         bint c_from_pandas
 * 
 *     type = ensure_type(type, allow_none=True)             # <<<<<<<<<<<<<<
 * 
 *     extension_type = None
*/
      __pyx_t_3.__pyx_n = 1;
      __pyx_t_3.allow_none = 1;
      __pyx_t_2 = ((PyObject *)__pyx_f_7pyarrow_3lib_ensure_type(__pyx_v_type, 0, &__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 238, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF_SET(__pyx_v_type, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "pyarrow/array.pxi":240
 *     type = ensure_type(type, allow_none=True)
 * 
 *     extension_type = None             # <<<<<<<<<<<<<<
 *     if type is not None and type.id == _Type_EXTENSION:
 *         extension_type = type
*/
      __Pyx_INCREF(Py_None);
      __pyx_v_extension_type = Py_None;

      /* "pyarrow/array.pxi":241
 * 
 *     extension_type = None
 *     if type is not None and type.id == _Type_EXTENSION:             # <<<<<<<<<<<<<<
 *         extension_type = type
 *         type = type.storage_type
*/
      __pyx_t_5 = (__pyx_v_type != Py_None);
      if (__pyx_t_5) {
      } else {
        __pyx_t_4 = __pyx_t_5;
        goto __pyx_L4_bool_binop_done;
      }
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_type, __pyx_mstate_global->__pyx_n_u_id); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 241, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_6 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::EXTENSION); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 241, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = PyObject_RichCompare(__pyx_t_2, __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 241, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(4, 241, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_4 = __pyx_t_5;
      __pyx_L4_bool_binop_done:;
      if (__pyx_t_4) {

        /* "pyarrow/array.pxi":242
 *     extension_type = None
 *     if type is not None and type.id == _Type_EXTENSION:
 *         extension_type = type             # <<<<<<<<<<<<<<
 *         type = type.storage_type
 * 
*/
        __Pyx_INCREF(__pyx_v_type);
        __Pyx_DECREF_SET(__pyx_v_extension_type, __pyx_v_type);

        /* "pyarrow/array.pxi":243
 *     if type is not None and type.id == _Type_EXTENSION:
 *         extension_type = type
 *         type = type.storage_type             # <<<<<<<<<<<<<<
 * 
 *     if from_pandas is None:
*/
        __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_type, __pyx_mstate_global->__pyx_n_u_storage_type); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 243, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF_SET(__pyx_v_type, __pyx_t_7);
        __pyx_t_7 = 0;

        /* "pyarrow/array.pxi":241
 * 
 *     extension_type = None
 *     if type is not None and type.id == _Type_EXTENSION:             # <<<<<<<<<<<<<<
 *         extension_type = type
 *         type = type.storage_type
*/
      }

      /* "pyarrow/array.pxi":245
 *         type = type.storage_type
 * 
 *     if from_pandas is None:             # <<<<<<<<<<<<<<
 *         c_from_pandas = False
 *     else:
*/
      __pyx_t_4 = (__pyx_v_from_pandas == Py_None);
      if (__pyx_t_4) {

        /* "pyarrow/array.pxi":246
 * 
 *     if from_pandas is None:
 *         c_from_pandas = False             # <<<<<<<<<<<<<<
 *     else:
 *         c_from_pandas = from_pandas
*/
        __pyx_v_c_from_pandas = 0;

        /* "pyarrow/array.pxi":245
 *         type = type.storage_type
 * 
 *     if from_pandas is None:             # <<<<<<<<<<<<<<
 *         c_from_pandas = False
 *     else:
*/
        goto __pyx_L6;
      }

      /* "pyarrow/array.pxi":248
 *         c_from_pandas = False
 *     else:
 *         c_from_pandas = from_pandas             # <<<<<<<<<<<<<<
 * 
 *     if isinstance(obj, Array):
*/
      /*else*/ {
        __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_from_pandas); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(4, 248, __pyx_L1_error)
        __pyx_v_c_from_pandas = __pyx_t_4;
      }
      __pyx_L6:;

      /* "pyarrow/array.pxi":250
 *         c_from_pandas = from_pandas
 * 
 *     if isinstance(obj, Array):             # <<<<<<<<<<<<<<
 *         if type is not None and not obj.type.equals(type):
 *             obj = obj.cast(type, safe=safe, memory_pool=memory_pool)
*/
      __pyx_t_4 = __Pyx_TypeCheck(__pyx_v_obj, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array); 
      if (__pyx_t_4) {

        /* "pyarrow/array.pxi":251
 * 
 *     if isinstance(obj, Array):
 *         if type is not None and not obj.type.equals(type):             # <<<<<<<<<<<<<<
 *             obj = obj.cast(type, safe=safe, memory_pool=memory_pool)
 *         return obj
*/
        __pyx_t_5 = (__pyx_v_type != Py_None);
        if (__pyx_t_5) {
        } else {
          __pyx_t_4 = __pyx_t_5;
          goto __pyx_L9_bool_binop_done;
        }
        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_mstate_global->__pyx_n_u_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 251, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_6 = __pyx_t_2;
        __Pyx_INCREF(__pyx_t_6);
        __pyx_t_8 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_type};
          __pyx_t_7 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_equals, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 251, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
        }
        __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(4, 251, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_9 = (!__pyx_t_5);
        __pyx_t_4 = __pyx_t_9;
        __pyx_L9_bool_binop_done:;
        if (__pyx_t_4) {

          /* "pyarrow/array.pxi":252
 *     if isinstance(obj, Array):
 *         if type is not None and not obj.type.equals(type):
 *             obj = obj.cast(type, safe=safe, memory_pool=memory_pool)             # <<<<<<<<<<<<<<
 *         return obj
 * 
*/
          __pyx_t_2 = __pyx_v_obj;
          __Pyx_INCREF(__pyx_t_2);
          __pyx_t_6 = __Pyx_PyBool_FromLong(__pyx_v_safe); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 252, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_t_8 = 0;
          {
            PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_2, __pyx_v_type};
            __pyx_t_10 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(4, 252, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_10);
            if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_safe, __pyx_t_6, __pyx_t_10, __pyx_callargs+2, 0) < (0)) __PYX_ERR(4, 252, __pyx_L1_error)
            if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_memory_pool, ((PyObject *)__pyx_v_memory_pool), __pyx_t_10, __pyx_callargs+2, 1) < (0)) __PYX_ERR(4, 252, __pyx_L1_error)
            __pyx_t_7 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_cast, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_10);
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
            if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 252, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_7);
          }
          __Pyx_DECREF_SET(__pyx_v_obj, __pyx_t_7);
          __pyx_t_7 = 0;

          /* "pyarrow/array.pxi":251
 * 
 *     if isinstance(obj, Array):
 *         if type is not None and not obj.type.equals(type):             # <<<<<<<<<<<<<<
 *             obj = obj.cast(type, safe=safe, memory_pool=memory_pool)
 *         return obj
*/
        }

        /* "pyarrow/array.pxi":253
 *         if type is not None and not obj.type.equals(type):
 *             obj = obj.cast(type, safe=safe, memory_pool=memory_pool)
 *         return obj             # <<<<<<<<<<<<<<
 * 
 *     if hasattr(obj, '__arrow_array__'):
*/
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_v_obj);
        __pyx_r = __pyx_v_obj;
        goto __pyx_L0;

        /* "pyarrow/array.pxi":250
 *         c_from_pandas = from_pandas
 * 
 *     if isinstance(obj, Array):             # <<<<<<<<<<<<<<
 *         if type is not None and not obj.type.equals(type):
 *             obj = obj.cast(type, safe=safe, memory_pool=memory_pool)
*/
      }

      /* "pyarrow/array.pxi":255
 *         return obj
 * 
 *     if hasattr(obj, '__arrow_array__'):             # <<<<<<<<<<<<<<
 *         return _handle_arrow_array_protocol(obj, type, mask, size)
 *     elif hasattr(obj, '__arrow_c_device_array__'):
*/
      __pyx_t_4 = __Pyx_HasAttr(__pyx_v_obj, __pyx_mstate_global->__pyx_n_u_arrow_array_2); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(4, 255, __pyx_L1_error)
      if (__pyx_t_4) {

        /* "pyarrow/array.pxi":256
 * 
 *     if hasattr(obj, '__arrow_array__'):
 *         return _handle_arrow_array_protocol(obj, type, mask, size)             # <<<<<<<<<<<<<<
 *     elif hasattr(obj, '__arrow_c_device_array__'):
 *         if type is not None:
*/
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_10 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_handle_arrow_array_protocol); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 256, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_8 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_6))) {
          __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_6);
          assert(__pyx_t_10);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_10);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
          __pyx_t_8 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[5] = {__pyx_t_10, __pyx_v_obj, __pyx_v_type, __pyx_v_mask, __pyx_v_size};
          __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_8, (5-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 256, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
        }
        __pyx_r = __pyx_t_7;
        __pyx_t_7 = 0;
        goto __pyx_L0;

        /* "pyarrow/array.pxi":255
 *         return obj
 * 
 *     if hasattr(obj, '__arrow_array__'):             # <<<<<<<<<<<<<<
 *         return _handle_arrow_array_protocol(obj, type, mask, size)
 *     elif hasattr(obj, '__arrow_c_device_array__'):
*/
      }

      /* "pyarrow/array.pxi":257
 *     if hasattr(obj, '__arrow_array__'):
 *         return _handle_arrow_array_protocol(obj, type, mask, size)
 *     elif hasattr(obj, '__arrow_c_device_array__'):             # <<<<<<<<<<<<<<
 *         if type is not None:
 *             requested_type = type.__arrow_c_schema__()
*/
      __pyx_t_4 = __Pyx_HasAttr(__pyx_v_obj, __pyx_mstate_global->__pyx_n_u_arrow_c_device_array); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(4, 257, __pyx_L1_error)
      if (__pyx_t_4) {

        /* "pyarrow/array.pxi":258
 *         return _handle_arrow_array_protocol(obj, type, mask, size)
 *     elif hasattr(obj, '__arrow_c_device_array__'):
 *         if type is not None:             # <<<<<<<<<<<<<<
 *             requested_type = type.__arrow_c_schema__()
 *         else:
*/
        __pyx_t_4 = (__pyx_v_type != Py_None);
        if (__pyx_t_4) {

          /* "pyarrow/array.pxi":259
 *     elif hasattr(obj, '__arrow_c_device_array__'):
 *         if type is not None:
 *             requested_type = type.__arrow_c_schema__()             # <<<<<<<<<<<<<<
 *         else:
 *             requested_type = None
*/
          __pyx_t_6 = __pyx_v_type;
          __Pyx_INCREF(__pyx_t_6);
          __pyx_t_8 = 0;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
            __pyx_t_7 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_arrow_c_schema, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
            if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 259, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_7);
          }
          __pyx_v_requested_type = __pyx_t_7;
          __pyx_t_7 = 0;

          /* "pyarrow/array.pxi":258
 *         return _handle_arrow_array_protocol(obj, type, mask, size)
 *     elif hasattr(obj, '__arrow_c_device_array__'):
 *         if type is not None:             # <<<<<<<<<<<<<<
 *             requested_type = type.__arrow_c_schema__()
 *         else:
*/
          goto __pyx_L12;
        }

        /* "pyarrow/array.pxi":261
 *             requested_type = type.__arrow_c_schema__()
 *         else:
 *             requested_type = None             # <<<<<<<<<<<<<<
 *         schema_capsule, array_capsule = obj.__arrow_c_device_array__(requested_type)
 *         out_array = Array._import_from_c_device_capsule(schema_capsule, array_capsule)
*/
        /*else*/ {
          __Pyx_INCREF(Py_None);
          __pyx_v_requested_type = Py_None;
        }
        __pyx_L12:;

        /* "pyarrow/array.pxi":262
 *         else:
 *             requested_type = None
 *         schema_capsule, array_capsule = obj.__arrow_c_device_array__(requested_type)             # <<<<<<<<<<<<<<
 *         out_array = Array._import_from_c_device_capsule(schema_capsule, array_capsule)
 *         if type is not None and out_array.type != type:
*/
        __pyx_t_6 = __pyx_v_obj;
        __Pyx_INCREF(__pyx_t_6);
        __pyx_t_8 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_requested_type};
          __pyx_t_7 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_arrow_c_device_array, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 262, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
        }
        if ((likely(PyTuple_CheckExact(__pyx_t_7))) || (PyList_CheckExact(__pyx_t_7))) {
          PyObject* sequence = __pyx_t_7;
          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(4, 262, __pyx_L1_error)
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          if (likely(PyTuple_CheckExact(sequence))) {
            __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0);
            __Pyx_INCREF(__pyx_t_6);
            __pyx_t_10 = PyTuple_GET_ITEM(sequence, 1);
            __Pyx_INCREF(__pyx_t_10);
          } else {
            __pyx_t_6 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference);
            if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 262, __pyx_L1_error)
            __Pyx_XGOTREF(__pyx_t_6);
            __pyx_t_10 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference);
            if (unlikely(!__pyx_t_10)) __PYX_ERR(4, 262, __pyx_L1_error)
            __Pyx_XGOTREF(__pyx_t_10);
          }
          #else
          __pyx_t_6 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 262, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_t_10 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(4, 262, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_10);
          #endif
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        } else {
          Py_ssize_t index = -1;
          __pyx_t_2 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 262, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __pyx_t_11 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2);
          index = 0; __pyx_t_6 = __pyx_t_11(__pyx_t_2); if (unlikely(!__pyx_t_6)) goto __pyx_L13_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_6);
          index = 1; __pyx_t_10 = __pyx_t_11(__pyx_t_2); if (unlikely(!__pyx_t_10)) goto __pyx_L13_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_10);
          if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_2), 2) < (0)) __PYX_ERR(4, 262, __pyx_L1_error)
          __pyx_t_11 = NULL;
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          goto __pyx_L14_unpacking_done;
          __pyx_L13_unpacking_failed:;
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_11 = NULL;
          if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
          __PYX_ERR(4, 262, __pyx_L1_error)
          __pyx_L14_unpacking_done:;
        }
        __pyx_v_schema_capsule = __pyx_t_6;
        __pyx_t_6 = 0;
        __pyx_v_array_capsule = __pyx_t_10;
        __pyx_t_10 = 0;

        /* "pyarrow/array.pxi":263
 *             requested_type = None
 *         schema_capsule, array_capsule = obj.__arrow_c_device_array__(requested_type)
 *         out_array = Array._import_from_c_device_capsule(schema_capsule, array_capsule)             # <<<<<<<<<<<<<<
 *         if type is not None and out_array.type != type:
 *             # PyCapsule interface type coercion is best effort, so we need to
*/
        __pyx_t_10 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array);
        __Pyx_INCREF(__pyx_t_10);
        __pyx_t_8 = 0;
        {
          PyObject *__pyx_callargs[3] = {__pyx_t_10, __pyx_v_schema_capsule, __pyx_v_array_capsule};
          __pyx_t_7 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_import_from_c_device_capsule, __pyx_callargs+__pyx_t_8, (3-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
          if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 263, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
        }
        __pyx_v_out_array = __pyx_t_7;
        __pyx_t_7 = 0;

        /* "pyarrow/array.pxi":264
 *         schema_capsule, array_capsule = obj.__arrow_c_device_array__(requested_type)
 *         out_array = Array._import_from_c_device_capsule(schema_capsule, array_capsule)
 *         if type is not None and out_array.type != type:             # <<<<<<<<<<<<<<
 *             # PyCapsule interface type coercion is best effort, so we need to
 *             # check the type of the returned array and cast if necessary
*/
        __pyx_t_9 = (__pyx_v_type != Py_None);
        if (__pyx_t_9) {
        } else {
          __pyx_t_4 = __pyx_t_9;
          goto __pyx_L16_bool_binop_done;
        }
        __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_out_array, __pyx_mstate_global->__pyx_n_u_type); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 264, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_10 = PyObject_RichCompare(__pyx_t_7, __pyx_v_type, Py_NE); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) __PYX_ERR(4, 264, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(4, 264, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __pyx_t_4 = __pyx_t_9;
        __pyx_L16_bool_binop_done:;
        if (__pyx_t_4) {

          /* "pyarrow/array.pxi":267
 *             # PyCapsule interface type coercion is best effort, so we need to
 *             # check the type of the returned array and cast if necessary
 *             out_array = array.cast(type, safe=safe, memory_pool=memory_pool)             # <<<<<<<<<<<<<<
 *         return out_array
 *     elif hasattr(obj, '__arrow_c_array__'):
*/
          __pyx_t_7 = NULL;
          __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_array); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 267, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_cast); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 267, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __pyx_t_6 = __Pyx_PyBool_FromLong(__pyx_v_safe); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 267, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_t_8 = 1;
          #if CYTHON_UNPACK_METHODS
          if (unlikely(PyMethod_Check(__pyx_t_2))) {
            __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
            assert(__pyx_t_7);
            PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
            __Pyx_INCREF(__pyx_t_7);
            __Pyx_INCREF(__pyx__function);
            __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
            __pyx_t_8 = 0;
          }
          #endif
          {
            PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_7, __pyx_v_type};
            __pyx_t_12 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_12)) __PYX_ERR(4, 267, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_12);
            if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_safe, __pyx_t_6, __pyx_t_12, __pyx_callargs+2, 0) < (0)) __PYX_ERR(4, 267, __pyx_L1_error)
            if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_memory_pool, ((PyObject *)__pyx_v_memory_pool), __pyx_t_12, __pyx_callargs+2, 1) < (0)) __PYX_ERR(4, 267, __pyx_L1_error)
            __pyx_t_10 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_12);
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            if (unlikely(!__pyx_t_10)) __PYX_ERR(4, 267, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_10);
          }
          __Pyx_DECREF_SET(__pyx_v_out_array, __pyx_t_10);
          __pyx_t_10 = 0;

          /* "pyarrow/array.pxi":264
 *         schema_capsule, array_capsule = obj.__arrow_c_device_array__(requested_type)
 *         out_array = Array._import_from_c_device_capsule(schema_capsule, array_capsule)
 *         if type is not None and out_array.type != type:             # <<<<<<<<<<<<<<
 *             # PyCapsule interface type coercion is best effort, so we need to
 *             # check the type of the returned array and cast if necessary
*/
        }

        /* "pyarrow/array.pxi":268
 *             # check the type of the returned array and cast if necessary
 *             out_array = array.cast(type, safe=safe, memory_pool=memory_pool)
 *         return out_array             # <<<<<<<<<<<<<<
 *     elif hasattr(obj, '__arrow_c_array__'):
 *         if type is not None:
*/
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_v_out_array);
        __pyx_r = __pyx_v_out_array;
        goto __pyx_L0;

        /* "pyarrow/array.pxi":257
 *     if hasattr(obj, '__arrow_array__'):
 *         return _handle_arrow_array_protocol(obj, type, mask, size)
 *     elif hasattr(obj, '__arrow_c_device_array__'):             # <<<<<<<<<<<<<<
 *         if type is not None:
 *             requested_type = type.__arrow_c_schema__()
*/
      }

      /* "pyarrow/array.pxi":269
 *             out_array = array.cast(type, safe=safe, memory_pool=memory_pool)
 *         return out_array
 *     elif hasattr(obj, '__arrow_c_array__'):             # <<<<<<<<<<<<<<
 *         if type is not None:
 *             requested_type = type.__arrow_c_schema__()
*/
      __pyx_t_4 = __Pyx_HasAttr(__pyx_v_obj, __pyx_mstate_global->__pyx_n_u_arrow_c_array); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(4, 269, __pyx_L1_error)
      if (__pyx_t_4) {

        /* "pyarrow/array.pxi":270
 *         return out_array
 *     elif hasattr(obj, '__arrow_c_array__'):
 *         if type is not None:             # <<<<<<<<<<<<<<
 *             requested_type = type.__arrow_c_schema__()
 *         else:
*/
        __pyx_t_4 = (__pyx_v_type != Py_None);
        if (__pyx_t_4) {

          /* "pyarrow/array.pxi":271
 *     elif hasattr(obj, '__arrow_c_array__'):
 *         if type is not None:
 *             requested_type = type.__arrow_c_schema__()             # <<<<<<<<<<<<<<
 *         else:
 *             requested_type = None
*/
          __pyx_t_2 = __pyx_v_type;
          __Pyx_INCREF(__pyx_t_2);
          __pyx_t_8 = 0;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
            __pyx_t_10 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_arrow_c_schema, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            if (unlikely(!__pyx_t_10)) __PYX_ERR(4, 271, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_10);
          }
          __pyx_v_requested_type = __pyx_t_10;
          __pyx_t_10 = 0;

          /* "pyarrow/array.pxi":270
 *         return out_array
 *     elif hasattr(obj, '__arrow_c_array__'):
 *         if type is not None:             # <<<<<<<<<<<<<<
 *             requested_type = type.__arrow_c_schema__()
 *         else:
*/
          goto __pyx_L18;
        }

        /* "pyarrow/array.pxi":273
 *             requested_type = type.__arrow_c_schema__()
 *         else:
 *             requested_type = None             # <<<<<<<<<<<<<<
 *         schema_capsule, array_capsule = obj.__arrow_c_array__(requested_type)
 *         out_array = Array._import_from_c_capsule(schema_capsule, array_capsule)
*/
        /*else*/ {
          __Pyx_INCREF(Py_None);
          __pyx_v_requested_type = Py_None;
        }
        __pyx_L18:;

        /* "pyarrow/array.pxi":274
 *         else:
 *             requested_type = None
 *         schema_capsule, array_capsule = obj.__arrow_c_array__(requested_type)             # <<<<<<<<<<<<<<
 *         out_array = Array._import_from_c_capsule(schema_capsule, array_capsule)
 *         if type is not None and out_array.type != type:
*/
        __pyx_t_2 = __pyx_v_obj;
        __Pyx_INCREF(__pyx_t_2);
        __pyx_t_8 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_requested_type};
          __pyx_t_10 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_arrow_c_array, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          if (unlikely(!__pyx_t_10)) __PYX_ERR(4, 274, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_10);
        }
        if ((likely(PyTuple_CheckExact(__pyx_t_10))) || (PyList_CheckExact(__pyx_t_10))) {
          PyObject* sequence = __pyx_t_10;
          Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
          if (unlikely(size != 2)) {
            if (size > 2) __Pyx_RaiseTooManyValuesError(2);
            else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
            __PYX_ERR(4, 274, __pyx_L1_error)
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          if (likely(PyTuple_CheckExact(sequence))) {
            __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0);
            __Pyx_INCREF(__pyx_t_2);
            __pyx_t_12 = PyTuple_GET_ITEM(sequence, 1);
            __Pyx_INCREF(__pyx_t_12);
          } else {
            __pyx_t_2 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference);
            if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 274, __pyx_L1_error)
            __Pyx_XGOTREF(__pyx_t_2);
            __pyx_t_12 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference);
            if (unlikely(!__pyx_t_12)) __PYX_ERR(4, 274, __pyx_L1_error)
            __Pyx_XGOTREF(__pyx_t_12);
          }
          #else
          __pyx_t_2 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 274, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_12 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(4, 274, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_12);
          #endif
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        } else {
          Py_ssize_t index = -1;
          __pyx_t_6 = PyObject_GetIter(__pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 274, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          __pyx_t_11 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_6);
          index = 0; __pyx_t_2 = __pyx_t_11(__pyx_t_6); if (unlikely(!__pyx_t_2)) goto __pyx_L19_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_2);
          index = 1; __pyx_t_12 = __pyx_t_11(__pyx_t_6); if (unlikely(!__pyx_t_12)) goto __pyx_L19_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_12);
          if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_6), 2) < (0)) __PYX_ERR(4, 274, __pyx_L1_error)
          __pyx_t_11 = NULL;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          goto __pyx_L20_unpacking_done;
          __pyx_L19_unpacking_failed:;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __pyx_t_11 = NULL;
          if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
          __PYX_ERR(4, 274, __pyx_L1_error)
          __pyx_L20_unpacking_done:;
        }
        __pyx_v_schema_capsule = __pyx_t_2;
        __pyx_t_2 = 0;
        __pyx_v_array_capsule = __pyx_t_12;
        __pyx_t_12 = 0;

        /* "pyarrow/array.pxi":275
 *             requested_type = None
 *         schema_capsule, array_capsule = obj.__arrow_c_array__(requested_type)
 *         out_array = Array._import_from_c_capsule(schema_capsule, array_capsule)             # <<<<<<<<<<<<<<
 *         if type is not None and out_array.type != type:
 *             # PyCapsule interface type coercion is best effort, so we need to
*/
        __pyx_t_12 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array);
        __Pyx_INCREF(__pyx_t_12);
        __pyx_t_8 = 0;
        {
          PyObject *__pyx_callargs[3] = {__pyx_t_12, __pyx_v_schema_capsule, __pyx_v_array_capsule};
          __pyx_t_10 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_import_from_c_capsule, __pyx_callargs+__pyx_t_8, (3-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          if (unlikely(!__pyx_t_10)) __PYX_ERR(4, 275, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_10);
        }
        __pyx_v_out_array = __pyx_t_10;
        __pyx_t_10 = 0;

        /* "pyarrow/array.pxi":276
 *         schema_capsule, array_capsule = obj.__arrow_c_array__(requested_type)
 *         out_array = Array._import_from_c_capsule(schema_capsule, array_capsule)
 *         if type is not None and out_array.type != type:             # <<<<<<<<<<<<<<
 *             # PyCapsule interface type coercion is best effort, so we need to
 *             # check the type of the returned array and cast if necessary
*/
        __pyx_t_9 = (__pyx_v_type != Py_None);
        if (__pyx_t_9) {
        } else {
          __pyx_t_4 = __pyx_t_9;
          goto __pyx_L22_bool_binop_done;
        }
        __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_out_array, __pyx_mstate_global->__pyx_n_u_type); if (unlikely(!__pyx_t_10)) __PYX_ERR(4, 276, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        __pyx_t_12 = PyObject_RichCompare(__pyx_t_10, __pyx_v_type, Py_NE); __Pyx_XGOTREF(__pyx_t_12); if (unlikely(!__pyx_t_12)) __PYX_ERR(4, 276, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(4, 276, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __pyx_t_4 = __pyx_t_9;
        __pyx_L22_bool_binop_done:;
        if (__pyx_t_4) {

          /* "pyarrow/array.pxi":279
 *             # PyCapsule interface type coercion is best effort, so we need to
 *             # check the type of the returned array and cast if necessary
 *             out_array = array.cast(type, safe=safe, memory_pool=memory_pool)             # <<<<<<<<<<<<<<
 *         return out_array
 *     elif _is_array_like(obj):
*/
          __pyx_t_10 = NULL;
          __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 279, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_cast); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 279, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_safe); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 279, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_8 = 1;
          #if CYTHON_UNPACK_METHODS
          if (unlikely(PyMethod_Check(__pyx_t_6))) {
            __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_6);
            assert(__pyx_t_10);
            PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
            __Pyx_INCREF(__pyx_t_10);
            __Pyx_INCREF(__pyx__function);
            __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
            __pyx_t_8 = 0;
          }
          #endif
          {
            PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_10, __pyx_v_type};
            __pyx_t_7 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 279, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_7);
            if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_safe, __pyx_t_2, __pyx_t_7, __pyx_callargs+2, 0) < (0)) __PYX_ERR(4, 279, __pyx_L1_error)
            if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_memory_pool, ((PyObject *)__pyx_v_memory_pool), __pyx_t_7, __pyx_callargs+2, 1) < (0)) __PYX_ERR(4, 279, __pyx_L1_error)
            __pyx_t_12 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_7);
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            if (unlikely(!__pyx_t_12)) __PYX_ERR(4, 279, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_12);
          }
          __Pyx_DECREF_SET(__pyx_v_out_array, __pyx_t_12);
          __pyx_t_12 = 0;

          /* "pyarrow/array.pxi":276
 *         schema_capsule, array_capsule = obj.__arrow_c_array__(requested_type)
 *         out_array = Array._import_from_c_capsule(schema_capsule, array_capsule)
 *         if type is not None and out_array.type != type:             # <<<<<<<<<<<<<<
 *             # PyCapsule interface type coercion is best effort, so we need to
 *             # check the type of the returned array and cast if necessary
*/
        }

        /* "pyarrow/array.pxi":280
 *             # check the type of the returned array and cast if necessary
 *             out_array = array.cast(type, safe=safe, memory_pool=memory_pool)
 *         return out_array             # <<<<<<<<<<<<<<
 *     elif _is_array_like(obj):
 *         if mask is not None:
*/
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_v_out_array);
        __pyx_r = __pyx_v_out_array;
        goto __pyx_L0;

        /* "pyarrow/array.pxi":269
 *             out_array = array.cast(type, safe=safe, memory_pool=memory_pool)
 *         return out_array
 *     elif hasattr(obj, '__arrow_c_array__'):             # <<<<<<<<<<<<<<
 *         if type is not None:
 *             requested_type = type.__arrow_c_schema__()
*/
      }

      /* "pyarrow/array.pxi":281
 *             out_array = array.cast(type, safe=safe, memory_pool=memory_pool)
 *         return out_array
 *     elif _is_array_like(obj):             # <<<<<<<<<<<<<<
 *         if mask is not None:
 *             if _is_array_like(mask):
*/
      __pyx_t_12 = __pyx_f_7pyarrow_3lib__is_array_like(__pyx_v_obj); if (unlikely(!__pyx_t_12)) __PYX_ERR(4, 281, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(4, 281, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      if (__pyx_t_4) {

        /* "pyarrow/array.pxi":282
 *         return out_array
 *     elif _is_array_like(obj):
 *         if mask is not None:             # <<<<<<<<<<<<<<
 *             if _is_array_like(mask):
 *                 mask = get_values(mask, &is_pandas_object)
*/
        __pyx_t_4 = (__pyx_v_mask != Py_None);
        if (__pyx_t_4) {

          /* "pyarrow/array.pxi":283
 *     elif _is_array_like(obj):
 *         if mask is not None:
 *             if _is_array_like(mask):             # <<<<<<<<<<<<<<
 *                 mask = get_values(mask, &is_pandas_object)
 *             else:
*/
          __pyx_t_12 = __pyx_f_7pyarrow_3lib__is_array_like(__pyx_v_mask); if (unlikely(!__pyx_t_12)) __PYX_ERR(4, 283, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_12);
          __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(4, 283, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          if (likely(__pyx_t_4)) {

            /* "pyarrow/array.pxi":284
 *         if mask is not None:
 *             if _is_array_like(mask):
 *                 mask = get_values(mask, &is_pandas_object)             # <<<<<<<<<<<<<<
 *             else:
 *                 raise TypeError("Mask must be a numpy array "
*/
            __pyx_t_12 = __pyx_f_7pyarrow_3lib_get_values(__pyx_v_mask, (&__pyx_v_is_pandas_object)); if (unlikely(!__pyx_t_12)) __PYX_ERR(4, 284, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_12);
            __Pyx_DECREF_SET(__pyx_v_mask, __pyx_t_12);
            __pyx_t_12 = 0;

            /* "pyarrow/array.pxi":283
 *     elif _is_array_like(obj):
 *         if mask is not None:
 *             if _is_array_like(mask):             # <<<<<<<<<<<<<<
 *                 mask = get_values(mask, &is_pandas_object)
 *             else:
*/
            goto __pyx_L25;
          }

          /* "pyarrow/array.pxi":286
 *                 mask = get_values(mask, &is_pandas_object)
 *             else:
 *                 raise TypeError("Mask must be a numpy array "             # <<<<<<<<<<<<<<
 *                                 "when converting numpy arrays")
 * 
*/
          /*else*/ {
            __pyx_t_6 = NULL;
            __pyx_t_8 = 1;
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_mstate_global->__pyx_kp_u_Mask_must_be_a_numpy_array_when};
              __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
              __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
              if (unlikely(!__pyx_t_12)) __PYX_ERR(4, 286, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_12);
            }
            __Pyx_Raise(__pyx_t_12, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
            __PYX_ERR(4, 286, __pyx_L1_error)
          }
          __pyx_L25:;

          /* "pyarrow/array.pxi":282
 *         return out_array
 *     elif _is_array_like(obj):
 *         if mask is not None:             # <<<<<<<<<<<<<<
 *             if _is_array_like(mask):
 *                 mask = get_values(mask, &is_pandas_object)
*/
        }

        /* "pyarrow/array.pxi":289
 *                                 "when converting numpy arrays")
 * 
 *         values = get_values(obj, &is_pandas_object)             # <<<<<<<<<<<<<<
 *         if is_pandas_object and from_pandas is None:
 *             c_from_pandas = True
*/
        __pyx_t_12 = __pyx_f_7pyarrow_3lib_get_values(__pyx_v_obj, (&__pyx_v_is_pandas_object)); if (unlikely(!__pyx_t_12)) __PYX_ERR(4, 289, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_v_values = __pyx_t_12;
        __pyx_t_12 = 0;

        /* "pyarrow/array.pxi":290
 * 
 *         values = get_values(obj, &is_pandas_object)
 *         if is_pandas_object and from_pandas is None:             # <<<<<<<<<<<<<<
 *             c_from_pandas = True
 * 
*/
        if (__pyx_v_is_pandas_object) {
        } else {
          __pyx_t_4 = __pyx_v_is_pandas_object;
          goto __pyx_L27_bool_binop_done;
        }
        __pyx_t_9 = (__pyx_v_from_pandas == Py_None);
        __pyx_t_4 = __pyx_t_9;
        __pyx_L27_bool_binop_done:;
        if (__pyx_t_4) {

          /* "pyarrow/array.pxi":291
 *         values = get_values(obj, &is_pandas_object)
 *         if is_pandas_object and from_pandas is None:
 *             c_from_pandas = True             # <<<<<<<<<<<<<<
 * 
 *         if isinstance(values, np.ma.MaskedArray):
*/
          __pyx_v_c_from_pandas = 1;

          /* "pyarrow/array.pxi":290
 * 
 *         values = get_values(obj, &is_pandas_object)
 *         if is_pandas_object and from_pandas is None:             # <<<<<<<<<<<<<<
 *             c_from_pandas = True
 * 
*/
        }

        /* "pyarrow/array.pxi":293
 *             c_from_pandas = True
 * 
 *         if isinstance(values, np.ma.MaskedArray):             # <<<<<<<<<<<<<<
 *             if mask is not None:
 *                 raise ValueError("Cannot pass a numpy masked array and "
*/
        __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_12)) __PYX_ERR(4, 293, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_ma); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 293, __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_mstate_global->__pyx_n_u_MaskedArray); if (unlikely(!__pyx_t_12)) __PYX_ERR(4, 293, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_4 = PyObject_IsInstance(__pyx_v_values, __pyx_t_12); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(4, 293, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        if (__pyx_t_4) {

          /* "pyarrow/array.pxi":294
 * 
 *         if isinstance(values, np.ma.MaskedArray):
 *             if mask is not None:             # <<<<<<<<<<<<<<
 *                 raise ValueError("Cannot pass a numpy masked array and "
 *                                  "specify a mask at the same time")
*/
          __pyx_t_4 = (__pyx_v_mask != Py_None);
          if (unlikely(__pyx_t_4)) {

            /* "pyarrow/array.pxi":295
 *         if isinstance(values, np.ma.MaskedArray):
 *             if mask is not None:
 *                 raise ValueError("Cannot pass a numpy masked array and "             # <<<<<<<<<<<<<<
 *                                  "specify a mask at the same time")
 *             else:
*/
            __pyx_t_6 = NULL;
            __pyx_t_8 = 1;
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_mstate_global->__pyx_kp_u_Cannot_pass_a_numpy_masked_array};
              __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
              __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
              if (unlikely(!__pyx_t_12)) __PYX_ERR(4, 295, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_12);
            }
            __Pyx_Raise(__pyx_t_12, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
            __PYX_ERR(4, 295, __pyx_L1_error)

            /* "pyarrow/array.pxi":294
 * 
 *         if isinstance(values, np.ma.MaskedArray):
 *             if mask is not None:             # <<<<<<<<<<<<<<
 *                 raise ValueError("Cannot pass a numpy masked array and "
 *                                  "specify a mask at the same time")
*/
          }

          /* "pyarrow/array.pxi":299
 *             else:
 *                 # don't use shrunken masks
 *                 mask = None if values.mask is np.ma.nomask else values.mask             # <<<<<<<<<<<<<<
 *                 values = values.data
 * 
*/
          /*else*/ {
            __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_values, __pyx_mstate_global->__pyx_n_u_mask); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 299, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_6);
            __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 299, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_7);
            __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_ma); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 299, __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_mstate_global->__pyx_n_u_nomask); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 299, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_7);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __pyx_t_4 = (__pyx_t_6 == __pyx_t_7);
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
            if (__pyx_t_4) {
              __Pyx_INCREF(Py_None);
              __pyx_t_12 = Py_None;
            } else {
              __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_values, __pyx_mstate_global->__pyx_n_u_mask); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 299, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_7);
              __pyx_t_12 = __pyx_t_7;
              __pyx_t_7 = 0;
            }
            __Pyx_DECREF_SET(__pyx_v_mask, __pyx_t_12);
            __pyx_t_12 = 0;

            /* "pyarrow/array.pxi":300
 *                 # don't use shrunken masks
 *                 mask = None if values.mask is np.ma.nomask else values.mask
 *                 values = values.data             # <<<<<<<<<<<<<<
 * 
 *         if mask is not None:
*/
            __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_values, __pyx_mstate_global->__pyx_n_u_data); if (unlikely(!__pyx_t_12)) __PYX_ERR(4, 300, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_12);
            __Pyx_DECREF_SET(__pyx_v_values, __pyx_t_12);
            __pyx_t_12 = 0;
          }

          /* "pyarrow/array.pxi":293
 *             c_from_pandas = True
 * 
 *         if isinstance(values, np.ma.MaskedArray):             # <<<<<<<<<<<<<<
 *             if mask is not None:
 *                 raise ValueError("Cannot pass a numpy masked array and "
*/
        }

        /* "pyarrow/array.pxi":302
 *                 values = values.data
 * 
 *         if mask is not None:             # <<<<<<<<<<<<<<
 *             if mask.dtype != np.bool_:
 *                 raise TypeError("Mask must be boolean dtype")
*/
        __pyx_t_4 = (__pyx_v_mask != Py_None);
        if (__pyx_t_4) {

          /* "pyarrow/array.pxi":303
 * 
 *         if mask is not None:
 *             if mask.dtype != np.bool_:             # <<<<<<<<<<<<<<
 *                 raise TypeError("Mask must be boolean dtype")
 *             if mask.ndim != 1:
*/
          __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_mask, __pyx_mstate_global->__pyx_n_u_dtype); if (unlikely(!__pyx_t_12)) __PYX_ERR(4, 303, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_12);
          __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 303, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_bool); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 303, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __pyx_t_7 = PyObject_RichCompare(__pyx_t_12, __pyx_t_6, Py_NE); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 303, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(4, 303, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          if (unlikely(__pyx_t_4)) {

            /* "pyarrow/array.pxi":304
 *         if mask is not None:
 *             if mask.dtype != np.bool_:
 *                 raise TypeError("Mask must be boolean dtype")             # <<<<<<<<<<<<<<
 *             if mask.ndim != 1:
 *                 raise ValueError("Mask must be 1D array")
*/
            __pyx_t_6 = NULL;
            __pyx_t_8 = 1;
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_mstate_global->__pyx_kp_u_Mask_must_be_boolean_dtype};
              __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
              __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
              if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 304, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_7);
            }
            __Pyx_Raise(__pyx_t_7, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
            __PYX_ERR(4, 304, __pyx_L1_error)

            /* "pyarrow/array.pxi":303
 * 
 *         if mask is not None:
 *             if mask.dtype != np.bool_:             # <<<<<<<<<<<<<<
 *                 raise TypeError("Mask must be boolean dtype")
 *             if mask.ndim != 1:
*/
          }

          /* "pyarrow/array.pxi":305
 *             if mask.dtype != np.bool_:
 *                 raise TypeError("Mask must be boolean dtype")
 *             if mask.ndim != 1:             # <<<<<<<<<<<<<<
 *                 raise ValueError("Mask must be 1D array")
 *             if len(values) != len(mask):
*/
          __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_mask, __pyx_mstate_global->__pyx_n_u_ndim); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 305, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __pyx_t_4 = (__Pyx_PyLong_BoolNeObjC(__pyx_t_7, __pyx_mstate_global->__pyx_int_1, 1, 0)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(4, 305, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          if (unlikely(__pyx_t_4)) {

            /* "pyarrow/array.pxi":306
 *                 raise TypeError("Mask must be boolean dtype")
 *             if mask.ndim != 1:
 *                 raise ValueError("Mask must be 1D array")             # <<<<<<<<<<<<<<
 *             if len(values) != len(mask):
 *                 raise ValueError(
*/
            __pyx_t_6 = NULL;
            __pyx_t_8 = 1;
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_mstate_global->__pyx_kp_u_Mask_must_be_1D_array};
              __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
              __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
              if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 306, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_7);
            }
            __Pyx_Raise(__pyx_t_7, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
            __PYX_ERR(4, 306, __pyx_L1_error)

            /* "pyarrow/array.pxi":305
 *             if mask.dtype != np.bool_:
 *                 raise TypeError("Mask must be boolean dtype")
 *             if mask.ndim != 1:             # <<<<<<<<<<<<<<
 *                 raise ValueError("Mask must be 1D array")
 *             if len(values) != len(mask):
*/
          }

          /* "pyarrow/array.pxi":307
 *             if mask.ndim != 1:
 *                 raise ValueError("Mask must be 1D array")
 *             if len(values) != len(mask):             # <<<<<<<<<<<<<<
 *                 raise ValueError(
 *                     "Mask is a different length from sequence being converted")
*/
          __pyx_t_13 = PyObject_Length(__pyx_v_values); if (unlikely(__pyx_t_13 == ((Py_ssize_t)-1))) __PYX_ERR(4, 307, __pyx_L1_error)
          __pyx_t_14 = PyObject_Length(__pyx_v_mask); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(4, 307, __pyx_L1_error)
          __pyx_t_4 = (__pyx_t_13 != __pyx_t_14);
          if (unlikely(__pyx_t_4)) {

            /* "pyarrow/array.pxi":308
 *                 raise ValueError("Mask must be 1D array")
 *             if len(values) != len(mask):
 *                 raise ValueError(             # <<<<<<<<<<<<<<
 *                     "Mask is a different length from sequence being converted")
 * 
*/
            __pyx_t_6 = NULL;
            __pyx_t_8 = 1;
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_mstate_global->__pyx_kp_u_Mask_is_a_different_length_from};
              __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
              __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
              if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 308, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_7);
            }
            __Pyx_Raise(__pyx_t_7, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
            __PYX_ERR(4, 308, __pyx_L1_error)

            /* "pyarrow/array.pxi":307
 *             if mask.ndim != 1:
 *                 raise ValueError("Mask must be 1D array")
 *             if len(values) != len(mask):             # <<<<<<<<<<<<<<
 *                 raise ValueError(
 *                     "Mask is a different length from sequence being converted")
*/
          }

          /* "pyarrow/array.pxi":302
 *                 values = values.data
 * 
 *         if mask is not None:             # <<<<<<<<<<<<<<
 *             if mask.dtype != np.bool_:
 *                 raise TypeError("Mask must be boolean dtype")
*/
        }

        /* "pyarrow/array.pxi":311
 *                     "Mask is a different length from sequence being converted")
 * 
 *         if hasattr(values, '__arrow_array__'):             # <<<<<<<<<<<<<<
 *             return _handle_arrow_array_protocol(values, type, mask, size)
 *         elif (pandas_api.is_categorical(values) and
*/
        __pyx_t_4 = __Pyx_HasAttr(__pyx_v_values, __pyx_mstate_global->__pyx_n_u_arrow_array_2); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(4, 311, __pyx_L1_error)
        if (__pyx_t_4) {

          /* "pyarrow/array.pxi":312
 * 
 *         if hasattr(values, '__arrow_array__'):
 *             return _handle_arrow_array_protocol(values, type, mask, size)             # <<<<<<<<<<<<<<
 *         elif (pandas_api.is_categorical(values) and
 *               type is not None and type.id != Type_DICTIONARY):
*/
          __Pyx_XDECREF(__pyx_r);
          __pyx_t_6 = NULL;
          __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_handle_arrow_array_protocol); if (unlikely(!__pyx_t_12)) __PYX_ERR(4, 312, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_12);
          __pyx_t_8 = 1;
          #if CYTHON_UNPACK_METHODS
          if (unlikely(PyMethod_Check(__pyx_t_12))) {
            __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_12);
            assert(__pyx_t_6);
            PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_12);
            __Pyx_INCREF(__pyx_t_6);
            __Pyx_INCREF(__pyx__function);
            __Pyx_DECREF_SET(__pyx_t_12, __pyx__function);
            __pyx_t_8 = 0;
          }
          #endif
          {
            PyObject *__pyx_callargs[5] = {__pyx_t_6, __pyx_v_values, __pyx_v_type, __pyx_v_mask, __pyx_v_size};
            __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_12, __pyx_callargs+__pyx_t_8, (5-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
            __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
            if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 312, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_7);
          }
          __pyx_r = __pyx_t_7;
          __pyx_t_7 = 0;
          goto __pyx_L0;

          /* "pyarrow/array.pxi":311
 *                     "Mask is a different length from sequence being converted")
 * 
 *         if hasattr(values, '__arrow_array__'):             # <<<<<<<<<<<<<<
 *             return _handle_arrow_array_protocol(values, type, mask, size)
 *         elif (pandas_api.is_categorical(values) and
*/
        }

        /* "pyarrow/array.pxi":313
 *         if hasattr(values, '__arrow_array__'):
 *             return _handle_arrow_array_protocol(values, type, mask, size)
 *         elif (pandas_api.is_categorical(values) and             # <<<<<<<<<<<<<<
 *               type is not None and type.id != Type_DICTIONARY):
 *             result = _ndarray_to_array(
*/
        if (unlikely(((PyObject *)__pyx_v_7pyarrow_3lib_pandas_api) == Py_None)) {
          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "is_categorical");
          __PYX_ERR(4, 313, __pyx_L1_error)
        }
        __pyx_t_7 = ((struct __pyx_vtabstruct_7pyarrow_3lib__PandasAPIShim *)__pyx_v_7pyarrow_3lib_pandas_api->__pyx_vtab)->is_categorical(__pyx_v_7pyarrow_3lib_pandas_api, __pyx_v_values, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 313, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(4, 313, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (__pyx_t_9) {
        } else {
          __pyx_t_4 = __pyx_t_9;
          goto __pyx_L36_bool_binop_done;
        }

        /* "pyarrow/array.pxi":314
 *             return _handle_arrow_array_protocol(values, type, mask, size)
 *         elif (pandas_api.is_categorical(values) and
 *               type is not None and type.id != Type_DICTIONARY):             # <<<<<<<<<<<<<<
 *             result = _ndarray_to_array(
 *                 np.asarray(values), mask, type, c_from_pandas, safe, pool
*/
        __pyx_t_9 = (__pyx_v_type != Py_None);
        if (__pyx_t_9) {
        } else {
          __pyx_t_4 = __pyx_t_9;
          goto __pyx_L36_bool_binop_done;
        }
        __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_type, __pyx_mstate_global->__pyx_n_u_id); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 314, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_Type_DICTIONARY); if (unlikely(!__pyx_t_12)) __PYX_ERR(4, 314, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_6 = PyObject_RichCompare(__pyx_t_7, __pyx_t_12, Py_NE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 314, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(4, 314, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_4 = __pyx_t_9;
        __pyx_L36_bool_binop_done:;

        /* "pyarrow/array.pxi":313
 *         if hasattr(values, '__arrow_array__'):
 *             return _handle_arrow_array_protocol(values, type, mask, size)
 *         elif (pandas_api.is_categorical(values) and             # <<<<<<<<<<<<<<
 *               type is not None and type.id != Type_DICTIONARY):
 *             result = _ndarray_to_array(
*/
        if (__pyx_t_4) {

          /* "pyarrow/array.pxi":316
 *               type is not None and type.id != Type_DICTIONARY):
 *             result = _ndarray_to_array(
 *                 np.asarray(values), mask, type, c_from_pandas, safe, pool             # <<<<<<<<<<<<<<
 *             )
 *         elif pandas_api.is_categorical(values):
*/
          __pyx_t_12 = NULL;
          __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 316, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_asarray); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 316, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __pyx_t_8 = 1;
          #if CYTHON_UNPACK_METHODS
          if (unlikely(PyMethod_Check(__pyx_t_2))) {
            __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_2);
            assert(__pyx_t_12);
            PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
            __Pyx_INCREF(__pyx_t_12);
            __Pyx_INCREF(__pyx__function);
            __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
            __pyx_t_8 = 0;
          }
          #endif
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_v_values};
            __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 316, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_6);
          }
          if (!(likely(((__pyx_v_type) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_type, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType))))) __PYX_ERR(4, 316, __pyx_L1_error)

          /* "pyarrow/array.pxi":315
 *         elif (pandas_api.is_categorical(values) and
 *               type is not None and type.id != Type_DICTIONARY):
 *             result = _ndarray_to_array(             # <<<<<<<<<<<<<<
 *                 np.asarray(values), mask, type, c_from_pandas, safe, pool
 *             )
*/
          __pyx_t_2 = __pyx_f_7pyarrow_3lib__ndarray_to_array(__pyx_t_6, __pyx_v_mask, ((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_v_type), __pyx_v_c_from_pandas, __pyx_v_safe, __pyx_v_pool); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 315, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __pyx_v_result = __pyx_t_2;
          __pyx_t_2 = 0;

          /* "pyarrow/array.pxi":313
 *         if hasattr(values, '__arrow_array__'):
 *             return _handle_arrow_array_protocol(values, type, mask, size)
 *         elif (pandas_api.is_categorical(values) and             # <<<<<<<<<<<<<<
 *               type is not None and type.id != Type_DICTIONARY):
 *             result = _ndarray_to_array(
*/
          goto __pyx_L35;
        }

        /* "pyarrow/array.pxi":318
 *                 np.asarray(values), mask, type, c_from_pandas, safe, pool
 *             )
 *         elif pandas_api.is_categorical(values):             # <<<<<<<<<<<<<<
 *             if type is not None:
 *                 index_type = type.index_type
*/
        if (unlikely(((PyObject *)__pyx_v_7pyarrow_3lib_pandas_api) == Py_None)) {
          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "is_categorical");
          __PYX_ERR(4, 318, __pyx_L1_error)
        }
        __pyx_t_2 = ((struct __pyx_vtabstruct_7pyarrow_3lib__PandasAPIShim *)__pyx_v_7pyarrow_3lib_pandas_api->__pyx_vtab)->is_categorical(__pyx_v_7pyarrow_3lib_pandas_api, __pyx_v_values, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 318, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(4, 318, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (__pyx_t_4) {

          /* "pyarrow/array.pxi":319
 *             )
 *         elif pandas_api.is_categorical(values):
 *             if type is not None:             # <<<<<<<<<<<<<<
 *                 index_type = type.index_type
 *                 value_type = type.value_type
*/
          __pyx_t_4 = (__pyx_v_type != Py_None);
          if (__pyx_t_4) {

            /* "pyarrow/array.pxi":320
 *         elif pandas_api.is_categorical(values):
 *             if type is not None:
 *                 index_type = type.index_type             # <<<<<<<<<<<<<<
 *                 value_type = type.value_type
 *                 if values.ordered != type.ordered:
*/
            __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_type, __pyx_mstate_global->__pyx_n_u_index_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 320, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            __pyx_v_index_type = __pyx_t_2;
            __pyx_t_2 = 0;

            /* "pyarrow/array.pxi":321
 *             if type is not None:
 *                 index_type = type.index_type
 *                 value_type = type.value_type             # <<<<<<<<<<<<<<
 *                 if values.ordered != type.ordered:
 *                     raise ValueError(
*/
            __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_type, __pyx_mstate_global->__pyx_n_u_value_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 321, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            __pyx_v_value_type = __pyx_t_2;
            __pyx_t_2 = 0;

            /* "pyarrow/array.pxi":322
 *                 index_type = type.index_type
 *                 value_type = type.value_type
 *                 if values.ordered != type.ordered:             # <<<<<<<<<<<<<<
 *                     raise ValueError(
 *                         "The 'ordered' flag of the passed categorical values "
*/
            __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_values, __pyx_mstate_global->__pyx_n_u_ordered); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 322, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_type, __pyx_mstate_global->__pyx_n_u_ordered); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 322, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_6);
            __pyx_t_12 = PyObject_RichCompare(__pyx_t_2, __pyx_t_6, Py_NE); __Pyx_XGOTREF(__pyx_t_12); if (unlikely(!__pyx_t_12)) __PYX_ERR(4, 322, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(4, 322, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
            if (unlikely(__pyx_t_4)) {

              /* "pyarrow/array.pxi":323
 *                 value_type = type.value_type
 *                 if values.ordered != type.ordered:
 *                     raise ValueError(             # <<<<<<<<<<<<<<
 *                         "The 'ordered' flag of the passed categorical values "
 *                         "does not match the 'ordered' of the specified type. ")
*/
              __pyx_t_6 = NULL;
              __pyx_t_8 = 1;
              {
                PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_mstate_global->__pyx_kp_u_The_ordered_flag_of_the_passed_c};
                __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
                if (unlikely(!__pyx_t_12)) __PYX_ERR(4, 323, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_12);
              }
              __Pyx_Raise(__pyx_t_12, 0, 0, 0);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __PYX_ERR(4, 323, __pyx_L1_error)

              /* "pyarrow/array.pxi":322
 *                 index_type = type.index_type
 *                 value_type = type.value_type
 *                 if values.ordered != type.ordered:             # <<<<<<<<<<<<<<
 *                     raise ValueError(
 *                         "The 'ordered' flag of the passed categorical values "
*/
            }

            /* "pyarrow/array.pxi":319
 *             )
 *         elif pandas_api.is_categorical(values):
 *             if type is not None:             # <<<<<<<<<<<<<<
 *                 index_type = type.index_type
 *                 value_type = type.value_type
*/
            goto __pyx_L39;
          }

          /* "pyarrow/array.pxi":327
 *                         "does not match the 'ordered' of the specified type. ")
 *             else:
 *                 index_type = None             # <<<<<<<<<<<<<<
 *                 value_type = None
 * 
*/
          /*else*/ {
            __Pyx_INCREF(Py_None);
            __pyx_v_index_type = Py_None;

            /* "pyarrow/array.pxi":328
 *             else:
 *                 index_type = None
 *                 value_type = None             # <<<<<<<<<<<<<<
 * 
 *             indices = _codes_to_indices(
*/
            __Pyx_INCREF(Py_None);
            __pyx_v_value_type = Py_None;
          }
          __pyx_L39:;

          /* "pyarrow/array.pxi":331
 * 
 *             indices = _codes_to_indices(
 *                 values.codes, mask, index_type, memory_pool)             # <<<<<<<<<<<<<<
 *             try:
 *                 dictionary = array(
*/
          __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_values, __pyx_mstate_global->__pyx_n_u_codes); if (unlikely(!__pyx_t_12)) __PYX_ERR(4, 331, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_12);
          if (!(likely(((__pyx_v_index_type) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_index_type, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType))))) __PYX_ERR(4, 331, __pyx_L1_error)

          /* "pyarrow/array.pxi":330
 *                 value_type = None
 * 
 *             indices = _codes_to_indices(             # <<<<<<<<<<<<<<
 *                 values.codes, mask, index_type, memory_pool)
 *             try:
*/
          __pyx_t_6 = __pyx_f_7pyarrow_3lib__codes_to_indices(__pyx_t_12, __pyx_v_mask, ((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_v_index_type), __pyx_v_memory_pool); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 330, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          __pyx_v_indices = __pyx_t_6;
          __pyx_t_6 = 0;

          /* "pyarrow/array.pxi":332
 *             indices = _codes_to_indices(
 *                 values.codes, mask, index_type, memory_pool)
 *             try:             # <<<<<<<<<<<<<<
 *                 dictionary = array(
 *                     values.categories.values, type=value_type,
*/
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17);
            __Pyx_XGOTREF(__pyx_t_15);
            __Pyx_XGOTREF(__pyx_t_16);
            __Pyx_XGOTREF(__pyx_t_17);
            /*try:*/ {

              /* "pyarrow/array.pxi":333
 *                 values.codes, mask, index_type, memory_pool)
 *             try:
 *                 dictionary = array(             # <<<<<<<<<<<<<<
 *                     values.categories.values, type=value_type,
 *                     memory_pool=memory_pool)
*/
              __pyx_t_12 = NULL;
              __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 333, __pyx_L41_error)
              __Pyx_GOTREF(__pyx_t_2);

              /* "pyarrow/array.pxi":334
 *             try:
 *                 dictionary = array(
 *                     values.categories.values, type=value_type,             # <<<<<<<<<<<<<<
 *                     memory_pool=memory_pool)
 *             except TypeError:
*/
              __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_values, __pyx_mstate_global->__pyx_n_u_categories); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 334, __pyx_L41_error)
              __Pyx_GOTREF(__pyx_t_7);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_values); if (unlikely(!__pyx_t_10)) __PYX_ERR(4, 334, __pyx_L41_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

              /* "pyarrow/array.pxi":335
 *                 dictionary = array(
 *                     values.categories.values, type=value_type,
 *                     memory_pool=memory_pool)             # <<<<<<<<<<<<<<
 *             except TypeError:
 *                 # TODO when removing the deprecation warning, this whole
*/
              __pyx_t_8 = 1;
              #if CYTHON_UNPACK_METHODS
              if (unlikely(PyMethod_Check(__pyx_t_2))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_2);
                assert(__pyx_t_12);
                PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
                __Pyx_INCREF(__pyx_t_12);
                __Pyx_INCREF(__pyx__function);
                __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
                __pyx_t_8 = 0;
              }
              #endif
              {
                PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_12, __pyx_t_10};
                __pyx_t_7 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 333, __pyx_L41_error)
                __Pyx_GOTREF(__pyx_t_7);
                if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_type, __pyx_v_value_type, __pyx_t_7, __pyx_callargs+2, 0) < (0)) __PYX_ERR(4, 333, __pyx_L41_error)
                if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_memory_pool, ((PyObject *)__pyx_v_memory_pool), __pyx_t_7, __pyx_callargs+2, 1) < (0)) __PYX_ERR(4, 333, __pyx_L41_error)
                __pyx_t_6 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_7);
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
                __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 333, __pyx_L41_error)
                __Pyx_GOTREF(__pyx_t_6);
              }
              __pyx_v_dictionary = __pyx_t_6;
              __pyx_t_6 = 0;

              /* "pyarrow/array.pxi":332
 *             indices = _codes_to_indices(
 *                 values.codes, mask, index_type, memory_pool)
 *             try:             # <<<<<<<<<<<<<<
 *                 dictionary = array(
 *                     values.categories.values, type=value_type,
*/
            }
            __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
            __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
            __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
            goto __pyx_L46_try_end;
            __pyx_L41_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;

            /* "pyarrow/array.pxi":336
 *                     values.categories.values, type=value_type,
 *                     memory_pool=memory_pool)
 *             except TypeError:             # <<<<<<<<<<<<<<
 *                 # TODO when removing the deprecation warning, this whole
 *                 # try/except can be removed (to bubble the TypeError of
*/
            __pyx_t_18 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_TypeError))));
            if (__pyx_t_18) {
              __Pyx_AddTraceback("pyarrow.lib.array", __pyx_clineno, __pyx_lineno, __pyx_filename);
              if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_2, &__pyx_t_7) < 0) __PYX_ERR(4, 336, __pyx_L43_except_error)
              __Pyx_XGOTREF(__pyx_t_6);
              __Pyx_XGOTREF(__pyx_t_2);
              __Pyx_XGOTREF(__pyx_t_7);

              /* "pyarrow/array.pxi":340
 *                 # try/except can be removed (to bubble the TypeError of
 *                 # the first array(..) call)
 *                 if value_type is not None:             # <<<<<<<<<<<<<<
 *                     warnings.warn(
 *                         "The dtype of the 'categories' of the passed "
*/
              __pyx_t_4 = (__pyx_v_value_type != Py_None);
              if (likely(__pyx_t_4)) {

                /* "pyarrow/array.pxi":341
 *                 # the first array(..) call)
 *                 if value_type is not None:
 *                     warnings.warn(             # <<<<<<<<<<<<<<
 *                         "The dtype of the 'categories' of the passed "
 *                         f"categorical values ({values.categories.dtype}) does not match the "
*/
                __pyx_t_12 = NULL;
                __Pyx_GetModuleGlobalName(__pyx_t_19, __pyx_mstate_global->__pyx_n_u_warnings); if (unlikely(!__pyx_t_19)) __PYX_ERR(4, 341, __pyx_L43_except_error)
                __Pyx_GOTREF(__pyx_t_19);
                __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_t_19, __pyx_mstate_global->__pyx_n_u_warn); if (unlikely(!__pyx_t_20)) __PYX_ERR(4, 341, __pyx_L43_except_error)
                __Pyx_GOTREF(__pyx_t_20);
                __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;

                /* "pyarrow/array.pxi":343
 *                     warnings.warn(
 *                         "The dtype of the 'categories' of the passed "
 *                         f"categorical values ({values.categories.dtype}) does not match the "             # <<<<<<<<<<<<<<
 *                         f"specified type ({value_type}). For now ignoring the specified "
 *                         "type, but in the future this mismatch will raise a "
*/
                __pyx_t_19 = __Pyx_PyObject_GetAttrStr(__pyx_v_values, __pyx_mstate_global->__pyx_n_u_categories); if (unlikely(!__pyx_t_19)) __PYX_ERR(4, 343, __pyx_L43_except_error)
                __Pyx_GOTREF(__pyx_t_19);
                __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_t_19, __pyx_mstate_global->__pyx_n_u_dtype); if (unlikely(!__pyx_t_21)) __PYX_ERR(4, 343, __pyx_L43_except_error)
                __Pyx_GOTREF(__pyx_t_21);
                __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
                __pyx_t_19 = __Pyx_PyObject_FormatSimple(__pyx_t_21, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_19)) __PYX_ERR(4, 343, __pyx_L43_except_error)
                __Pyx_GOTREF(__pyx_t_19);
                __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

                /* "pyarrow/array.pxi":344
 *                         "The dtype of the 'categories' of the passed "
 *                         f"categorical values ({values.categories.dtype}) does not match the "
 *                         f"specified type ({value_type}). For now ignoring the specified "             # <<<<<<<<<<<<<<
 *                         "type, but in the future this mismatch will raise a "
 *                         "TypeError",
*/
                __pyx_t_21 = __Pyx_PyObject_FormatSimple(__pyx_v_value_type, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_21)) __PYX_ERR(4, 344, __pyx_L43_except_error)
                __Pyx_GOTREF(__pyx_t_21);
                __pyx_t_22[0] = __pyx_mstate_global->__pyx_kp_u_The_dtype_of_the_categories_of_t;
                __pyx_t_22[1] = __pyx_t_19;
                __pyx_t_22[2] = __pyx_mstate_global->__pyx_kp_u_does_not_match_the_specified_ty;
                __pyx_t_22[3] = __pyx_t_21;
                __pyx_t_22[4] = __pyx_mstate_global->__pyx_kp_u_For_now_ignoring_the_specified;

                /* "pyarrow/array.pxi":342
 *                 if value_type is not None:
 *                     warnings.warn(
 *                         "The dtype of the 'categories' of the passed "             # <<<<<<<<<<<<<<
 *                         f"categorical values ({values.categories.dtype}) does not match the "
 *                         f"specified type ({value_type}). For now ignoring the specified "
*/
                __pyx_t_23 = __Pyx_PyUnicode_Join(__pyx_t_22, 5, 64 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_19) + 37 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_21) + 94, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_19) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_21));
                if (unlikely(!__pyx_t_23)) __PYX_ERR(4, 342, __pyx_L43_except_error)
                __Pyx_GOTREF(__pyx_t_23);
                __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
                __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

                /* "pyarrow/array.pxi":347
 *                         "type, but in the future this mismatch will raise a "
 *                         "TypeError",
 *                         FutureWarning, stacklevel=2)             # <<<<<<<<<<<<<<
 *                     dictionary = array(
 *                         values.categories.values, memory_pool=memory_pool)
*/
                __pyx_t_8 = 1;
                #if CYTHON_UNPACK_METHODS
                if (unlikely(PyMethod_Check(__pyx_t_20))) {
                  __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_20);
                  assert(__pyx_t_12);
                  PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_20);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(__pyx__function);
                  __Pyx_DECREF_SET(__pyx_t_20, __pyx__function);
                  __pyx_t_8 = 0;
                }
                #endif
                {
                  PyObject *__pyx_callargs[3 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_12, __pyx_t_23, ((PyObject *)(((PyTypeObject*)PyExc_FutureWarning)))};
                  __pyx_t_21 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_21)) __PYX_ERR(4, 341, __pyx_L43_except_error)
                  __Pyx_GOTREF(__pyx_t_21);
                  if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_stacklevel, __pyx_mstate_global->__pyx_int_2, __pyx_t_21, __pyx_callargs+3, 0) < (0)) __PYX_ERR(4, 341, __pyx_L43_except_error)
                  __pyx_t_10 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_20, __pyx_callargs+__pyx_t_8, (3-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_21);
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
                  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
                  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
                  if (unlikely(!__pyx_t_10)) __PYX_ERR(4, 341, __pyx_L43_except_error)
                  __Pyx_GOTREF(__pyx_t_10);
                }
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

                /* "pyarrow/array.pxi":348
 *                         "TypeError",
 *                         FutureWarning, stacklevel=2)
 *                     dictionary = array(             # <<<<<<<<<<<<<<
 *                         values.categories.values, memory_pool=memory_pool)
 *                 else:
*/
                __pyx_t_20 = NULL;
                __Pyx_GetModuleGlobalName(__pyx_t_21, __pyx_mstate_global->__pyx_n_u_array); if (unlikely(!__pyx_t_21)) __PYX_ERR(4, 348, __pyx_L43_except_error)
                __Pyx_GOTREF(__pyx_t_21);

                /* "pyarrow/array.pxi":349
 *                         FutureWarning, stacklevel=2)
 *                     dictionary = array(
 *                         values.categories.values, memory_pool=memory_pool)             # <<<<<<<<<<<<<<
 *                 else:
 *                     raise
*/
                __pyx_t_23 = __Pyx_PyObject_GetAttrStr(__pyx_v_values, __pyx_mstate_global->__pyx_n_u_categories); if (unlikely(!__pyx_t_23)) __PYX_ERR(4, 349, __pyx_L43_except_error)
                __Pyx_GOTREF(__pyx_t_23);
                __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_23, __pyx_mstate_global->__pyx_n_u_values); if (unlikely(!__pyx_t_12)) __PYX_ERR(4, 349, __pyx_L43_except_error)
                __Pyx_GOTREF(__pyx_t_12);
                __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
                __pyx_t_8 = 1;
                #if CYTHON_UNPACK_METHODS
                if (unlikely(PyMethod_Check(__pyx_t_21))) {
                  __pyx_t_20 = PyMethod_GET_SELF(__pyx_t_21);
                  assert(__pyx_t_20);
                  PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_21);
                  __Pyx_INCREF(__pyx_t_20);
                  __Pyx_INCREF(__pyx__function);
                  __Pyx_DECREF_SET(__pyx_t_21, __pyx__function);
                  __pyx_t_8 = 0;
                }
                #endif
                {
                  PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_20, __pyx_t_12};
                  __pyx_t_23 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_23)) __PYX_ERR(4, 348, __pyx_L43_except_error)
                  __Pyx_GOTREF(__pyx_t_23);
                  if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_memory_pool, ((PyObject *)__pyx_v_memory_pool), __pyx_t_23, __pyx_callargs+2, 0) < (0)) __PYX_ERR(4, 348, __pyx_L43_except_error)
                  __pyx_t_10 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_21, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_23);
                  __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0;
                  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
                  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
                  if (unlikely(!__pyx_t_10)) __PYX_ERR(4, 348, __pyx_L43_except_error)
                  __Pyx_GOTREF(__pyx_t_10);
                }
                __Pyx_XDECREF_SET(__pyx_v_dictionary, __pyx_t_10);
                __pyx_t_10 = 0;

                /* "pyarrow/array.pxi":340
 *                 # try/except can be removed (to bubble the TypeError of
 *                 # the first array(..) call)
 *                 if value_type is not None:             # <<<<<<<<<<<<<<
 *                     warnings.warn(
 *                         "The dtype of the 'categories' of the passed "
*/
                goto __pyx_L49;
              }

              /* "pyarrow/array.pxi":351
 *                         values.categories.values, memory_pool=memory_pool)
 *                 else:
 *                     raise             # <<<<<<<<<<<<<<
 * 
 *             return DictionaryArray.from_arrays(
*/
              /*else*/ {
                __Pyx_GIVEREF(__pyx_t_6);
                __Pyx_GIVEREF(__pyx_t_2);
                __Pyx_XGIVEREF(__pyx_t_7);
                __Pyx_ErrRestoreWithState(__pyx_t_6, __pyx_t_2, __pyx_t_7);
                __pyx_t_6 = 0;  __pyx_t_2 = 0;  __pyx_t_7 = 0; 
                __PYX_ERR(4, 351, __pyx_L43_except_error)
              }
              __pyx_L49:;
              __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              goto __pyx_L42_exception_handled;
            }
            goto __pyx_L43_except_error;

            /* "pyarrow/array.pxi":332
 *             indices = _codes_to_indices(
 *                 values.codes, mask, index_type, memory_pool)
 *             try:             # <<<<<<<<<<<<<<
 *                 dictionary = array(
 *                     values.categories.values, type=value_type,
*/
            __pyx_L43_except_error:;
            __Pyx_XGIVEREF(__pyx_t_15);
            __Pyx_XGIVEREF(__pyx_t_16);
            __Pyx_XGIVEREF(__pyx_t_17);
            __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17);
            goto __pyx_L1_error;
            __pyx_L42_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_15);
            __Pyx_XGIVEREF(__pyx_t_16);
            __Pyx_XGIVEREF(__pyx_t_17);
            __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17);
            __pyx_L46_try_end:;
          }

          /* "pyarrow/array.pxi":353
 *                     raise
 * 
 *             return DictionaryArray.from_arrays(             # <<<<<<<<<<<<<<
 *                 indices, dictionary, ordered=values.ordered, safe=safe)
 *         else:
*/
          __Pyx_XDECREF(__pyx_r);
          __pyx_t_2 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DictionaryArray);
          __Pyx_INCREF(__pyx_t_2);

          /* "pyarrow/array.pxi":354
 * 
 *             return DictionaryArray.from_arrays(
 *                 indices, dictionary, ordered=values.ordered, safe=safe)             # <<<<<<<<<<<<<<
 *         else:
 *             if pandas_api.have_pandas:
*/
          __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_values, __pyx_mstate_global->__pyx_n_u_ordered); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 354, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_t_10 = __Pyx_PyBool_FromLong(__pyx_v_safe); if (unlikely(!__pyx_t_10)) __PYX_ERR(4, 354, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_10);
          __pyx_t_8 = 0;
          {
            PyObject *__pyx_callargs[3 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_2, __pyx_v_indices, __pyx_v_dictionary};
            __pyx_t_21 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_21)) __PYX_ERR(4, 353, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_21);
            if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_ordered, __pyx_t_6, __pyx_t_21, __pyx_callargs+3, 0) < (0)) __PYX_ERR(4, 353, __pyx_L1_error)
            if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_safe, __pyx_t_10, __pyx_t_21, __pyx_callargs+3, 1) < (0)) __PYX_ERR(4, 353, __pyx_L1_error)
            __pyx_t_7 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_from_arrays, __pyx_callargs+__pyx_t_8, (3-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_21);
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
            if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 353, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_7);
          }
          __pyx_r = __pyx_t_7;
          __pyx_t_7 = 0;
          goto __pyx_L0;

          /* "pyarrow/array.pxi":318
 *                 np.asarray(values), mask, type, c_from_pandas, safe, pool
 *             )
 *         elif pandas_api.is_categorical(values):             # <<<<<<<<<<<<<<
 *             if type is not None:
 *                 index_type = type.index_type
*/
        }

        /* "pyarrow/array.pxi":356
 *                 indices, dictionary, ordered=values.ordered, safe=safe)
 *         else:
 *             if pandas_api.have_pandas:             # <<<<<<<<<<<<<<
 *                 values, type = pandas_api.compat.get_datetimetz_type(
 *                     values, obj.dtype, type)
*/
        /*else*/ {
          __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_7pyarrow_3lib_pandas_api), __pyx_mstate_global->__pyx_n_u_have_pandas); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 356, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(4, 356, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          if (__pyx_t_4) {

            /* "pyarrow/array.pxi":357
 *         else:
 *             if pandas_api.have_pandas:
 *                 values, type = pandas_api.compat.get_datetimetz_type(             # <<<<<<<<<<<<<<
 *                     values, obj.dtype, type)
 *             if type and type.id == _Type_RUN_END_ENCODED:
*/
            __pyx_t_10 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_7pyarrow_3lib_pandas_api), __pyx_mstate_global->__pyx_n_u_compat); if (unlikely(!__pyx_t_10)) __PYX_ERR(4, 357, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_10);
            __pyx_t_21 = __pyx_t_10;
            __Pyx_INCREF(__pyx_t_21);

            /* "pyarrow/array.pxi":358
 *             if pandas_api.have_pandas:
 *                 values, type = pandas_api.compat.get_datetimetz_type(
 *                     values, obj.dtype, type)             # <<<<<<<<<<<<<<
 *             if type and type.id == _Type_RUN_END_ENCODED:
 *                 arr = _ndarray_to_array(
*/
            __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_mstate_global->__pyx_n_u_dtype); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 358, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_6);
            __pyx_t_8 = 0;
            {
              PyObject *__pyx_callargs[4] = {__pyx_t_21, __pyx_v_values, __pyx_t_6, __pyx_v_type};
              __pyx_t_7 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_datetimetz_type, __pyx_callargs+__pyx_t_8, (4-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
              __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0;
              __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 357, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_7);
            }
            if ((likely(PyTuple_CheckExact(__pyx_t_7))) || (PyList_CheckExact(__pyx_t_7))) {
              PyObject* sequence = __pyx_t_7;
              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(4, 357, __pyx_L1_error)
              }
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              if (likely(PyTuple_CheckExact(sequence))) {
                __pyx_t_10 = PyTuple_GET_ITEM(sequence, 0);
                __Pyx_INCREF(__pyx_t_10);
                __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1);
                __Pyx_INCREF(__pyx_t_6);
              } else {
                __pyx_t_10 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference);
                if (unlikely(!__pyx_t_10)) __PYX_ERR(4, 357, __pyx_L1_error)
                __Pyx_XGOTREF(__pyx_t_10);
                __pyx_t_6 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference);
                if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 357, __pyx_L1_error)
                __Pyx_XGOTREF(__pyx_t_6);
              }
              #else
              __pyx_t_10 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_10)) __PYX_ERR(4, 357, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_6 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 357, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_6);
              #endif
              __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
            } else {
              Py_ssize_t index = -1;
              __pyx_t_21 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_21)) __PYX_ERR(4, 357, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_21);
              __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
              __pyx_t_11 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_21);
              index = 0; __pyx_t_10 = __pyx_t_11(__pyx_t_21); if (unlikely(!__pyx_t_10)) goto __pyx_L51_unpacking_failed;
              __Pyx_GOTREF(__pyx_t_10);
              index = 1; __pyx_t_6 = __pyx_t_11(__pyx_t_21); if (unlikely(!__pyx_t_6)) goto __pyx_L51_unpacking_failed;
              __Pyx_GOTREF(__pyx_t_6);
              if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_21), 2) < (0)) __PYX_ERR(4, 357, __pyx_L1_error)
              __pyx_t_11 = NULL;
              __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
              goto __pyx_L52_unpacking_done;
              __pyx_L51_unpacking_failed:;
              __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
              __pyx_t_11 = NULL;
              if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
              __PYX_ERR(4, 357, __pyx_L1_error)
              __pyx_L52_unpacking_done:;
            }

            /* "pyarrow/array.pxi":357
 *         else:
 *             if pandas_api.have_pandas:
 *                 values, type = pandas_api.compat.get_datetimetz_type(             # <<<<<<<<<<<<<<
 *                     values, obj.dtype, type)
 *             if type and type.id == _Type_RUN_END_ENCODED:
*/
            __Pyx_DECREF_SET(__pyx_v_values, __pyx_t_10);
            __pyx_t_10 = 0;
            __Pyx_DECREF_SET(__pyx_v_type, __pyx_t_6);
            __pyx_t_6 = 0;

            /* "pyarrow/array.pxi":356
 *                 indices, dictionary, ordered=values.ordered, safe=safe)
 *         else:
 *             if pandas_api.have_pandas:             # <<<<<<<<<<<<<<
 *                 values, type = pandas_api.compat.get_datetimetz_type(
 *                     values, obj.dtype, type)
*/
          }

          /* "pyarrow/array.pxi":359
 *                 values, type = pandas_api.compat.get_datetimetz_type(
 *                     values, obj.dtype, type)
 *             if type and type.id == _Type_RUN_END_ENCODED:             # <<<<<<<<<<<<<<
 *                 arr = _ndarray_to_array(
 *                     values, mask, type.value_type, c_from_pandas, safe, pool)
*/
          __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_type); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(4, 359, __pyx_L1_error)
          if (__pyx_t_9) {
          } else {
            __pyx_t_4 = __pyx_t_9;
            goto __pyx_L54_bool_binop_done;
          }
          __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_type, __pyx_mstate_global->__pyx_n_u_id); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 359, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __pyx_t_6 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::RUN_END_ENCODED); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 359, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_t_10 = PyObject_RichCompare(__pyx_t_7, __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) __PYX_ERR(4, 359, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(4, 359, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          __pyx_t_4 = __pyx_t_9;
          __pyx_L54_bool_binop_done:;
          if (__pyx_t_4) {

            /* "pyarrow/array.pxi":361
 *             if type and type.id == _Type_RUN_END_ENCODED:
 *                 arr = _ndarray_to_array(
 *                     values, mask, type.value_type, c_from_pandas, safe, pool)             # <<<<<<<<<<<<<<
 *                 result = _pc().run_end_encode(arr, run_end_type=type.run_end_type,
 *                                               memory_pool=memory_pool)
*/
            __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_type, __pyx_mstate_global->__pyx_n_u_value_type); if (unlikely(!__pyx_t_10)) __PYX_ERR(4, 361, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_10);
            if (!(likely(((__pyx_t_10) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_10, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType))))) __PYX_ERR(4, 361, __pyx_L1_error)

            /* "pyarrow/array.pxi":360
 *                     values, obj.dtype, type)
 *             if type and type.id == _Type_RUN_END_ENCODED:
 *                 arr = _ndarray_to_array(             # <<<<<<<<<<<<<<
 *                     values, mask, type.value_type, c_from_pandas, safe, pool)
 *                 result = _pc().run_end_encode(arr, run_end_type=type.run_end_type,
*/
            __pyx_t_6 = __pyx_f_7pyarrow_3lib__ndarray_to_array(__pyx_v_values, __pyx_v_mask, ((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_t_10), __pyx_v_c_from_pandas, __pyx_v_safe, __pyx_v_pool); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 360, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_6);
            __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
            __pyx_v_arr = __pyx_t_6;
            __pyx_t_6 = 0;

            /* "pyarrow/array.pxi":362
 *                 arr = _ndarray_to_array(
 *                     values, mask, type.value_type, c_from_pandas, safe, pool)
 *                 result = _pc().run_end_encode(arr, run_end_type=type.run_end_type,             # <<<<<<<<<<<<<<
 *                                               memory_pool=memory_pool)
 *             else:
*/
            __pyx_t_21 = NULL;
            __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_pc_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 362, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            __pyx_t_8 = 1;
            #if CYTHON_UNPACK_METHODS
            if (unlikely(PyMethod_Check(__pyx_t_2))) {
              __pyx_t_21 = PyMethod_GET_SELF(__pyx_t_2);
              assert(__pyx_t_21);
              PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
              __Pyx_INCREF(__pyx_t_21);
              __Pyx_INCREF(__pyx__function);
              __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
              __pyx_t_8 = 0;
            }
            #endif
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_21, NULL};
              __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
              __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0;
              __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
              if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 362, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_7);
            }
            __pyx_t_10 = __pyx_t_7;
            __Pyx_INCREF(__pyx_t_10);
            __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_type, __pyx_mstate_global->__pyx_n_u_run_end_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 362, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);

            /* "pyarrow/array.pxi":363
 *                     values, mask, type.value_type, c_from_pandas, safe, pool)
 *                 result = _pc().run_end_encode(arr, run_end_type=type.run_end_type,
 *                                               memory_pool=memory_pool)             # <<<<<<<<<<<<<<
 *             else:
 *                 result = _ndarray_to_array(values, mask, type, c_from_pandas, safe,
*/
            __pyx_t_8 = 0;
            {
              PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_10, __pyx_v_arr};
              __pyx_t_21 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_21)) __PYX_ERR(4, 362, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_21);
              if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_run_end_type, __pyx_t_2, __pyx_t_21, __pyx_callargs+2, 0) < (0)) __PYX_ERR(4, 362, __pyx_L1_error)
              if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_memory_pool, ((PyObject *)__pyx_v_memory_pool), __pyx_t_21, __pyx_callargs+2, 1) < (0)) __PYX_ERR(4, 362, __pyx_L1_error)
              __pyx_t_6 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_run_end_encode, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_21);
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
              __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
              if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 362, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_6);
            }
            __pyx_v_result = __pyx_t_6;
            __pyx_t_6 = 0;

            /* "pyarrow/array.pxi":359
 *                 values, type = pandas_api.compat.get_datetimetz_type(
 *                     values, obj.dtype, type)
 *             if type and type.id == _Type_RUN_END_ENCODED:             # <<<<<<<<<<<<<<
 *                 arr = _ndarray_to_array(
 *                     values, mask, type.value_type, c_from_pandas, safe, pool)
*/
            goto __pyx_L53;
          }

          /* "pyarrow/array.pxi":365
 *                                               memory_pool=memory_pool)
 *             else:
 *                 result = _ndarray_to_array(values, mask, type, c_from_pandas, safe,             # <<<<<<<<<<<<<<
 *                                            pool)
 *     else:
*/
          /*else*/ {
            if (!(likely(((__pyx_v_type) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_type, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType))))) __PYX_ERR(4, 365, __pyx_L1_error)

            /* "pyarrow/array.pxi":366
 *             else:
 *                 result = _ndarray_to_array(values, mask, type, c_from_pandas, safe,
 *                                            pool)             # <<<<<<<<<<<<<<
 *     else:
 *         if type and type.id == _Type_RUN_END_ENCODED:
*/
            __pyx_t_6 = __pyx_f_7pyarrow_3lib__ndarray_to_array(__pyx_v_values, __pyx_v_mask, ((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_v_type), __pyx_v_c_from_pandas, __pyx_v_safe, __pyx_v_pool); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 365, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_6);
            __pyx_v_result = __pyx_t_6;
            __pyx_t_6 = 0;
          }
          __pyx_L53:;
        }
        __pyx_L35:;

        /* "pyarrow/array.pxi":281
 *             out_array = array.cast(type, safe=safe, memory_pool=memory_pool)
 *         return out_array
 *     elif _is_array_like(obj):             # <<<<<<<<<<<<<<
 *         if mask is not None:
 *             if _is_array_like(mask):
*/
        goto __pyx_L11;
      }

      /* "pyarrow/array.pxi":368
 *                                            pool)
 *     else:
 *         if type and type.id == _Type_RUN_END_ENCODED:             # <<<<<<<<<<<<<<
 *             arr = _sequence_to_array(
 *                 obj, mask, size, type.value_type, pool, from_pandas)
*/
      /*else*/ {
        __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_type); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(4, 368, __pyx_L1_error)
        if (__pyx_t_9) {
        } else {
          __pyx_t_4 = __pyx_t_9;
          goto __pyx_L57_bool_binop_done;
        }
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_type, __pyx_mstate_global->__pyx_n_u_id); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 368, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_7 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::RUN_END_ENCODED); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 368, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_21 = PyObject_RichCompare(__pyx_t_6, __pyx_t_7, Py_EQ); __Pyx_XGOTREF(__pyx_t_21); if (unlikely(!__pyx_t_21)) __PYX_ERR(4, 368, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_21); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(4, 368, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
        __pyx_t_4 = __pyx_t_9;
        __pyx_L57_bool_binop_done:;
        if (__pyx_t_4) {

          /* "pyarrow/array.pxi":370
 *         if type and type.id == _Type_RUN_END_ENCODED:
 *             arr = _sequence_to_array(
 *                 obj, mask, size, type.value_type, pool, from_pandas)             # <<<<<<<<<<<<<<
 *             result = _pc().run_end_encode(arr, run_end_type=type.run_end_type,
 *                                           memory_pool=memory_pool)
*/
          __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_v_type, __pyx_mstate_global->__pyx_n_u_value_type); if (unlikely(!__pyx_t_21)) __PYX_ERR(4, 370, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_21);
          if (!(likely(((__pyx_t_21) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_21, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType))))) __PYX_ERR(4, 370, __pyx_L1_error)
          __pyx_t_24 = __Pyx_PyObject_IsTrue(__pyx_v_from_pandas); if (unlikely((__pyx_t_24 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(4, 370, __pyx_L1_error)

          /* "pyarrow/array.pxi":369
 *     else:
 *         if type and type.id == _Type_RUN_END_ENCODED:
 *             arr = _sequence_to_array(             # <<<<<<<<<<<<<<
 *                 obj, mask, size, type.value_type, pool, from_pandas)
 *             result = _pc().run_end_encode(arr, run_end_type=type.run_end_type,
*/
          __pyx_t_7 = __pyx_f_7pyarrow_3lib__sequence_to_array(__pyx_v_obj, __pyx_v_mask, __pyx_v_size, ((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_t_21), __pyx_v_pool, __pyx_t_24); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 369, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
          __pyx_v_arr = __pyx_t_7;
          __pyx_t_7 = 0;

          /* "pyarrow/array.pxi":371
 *             arr = _sequence_to_array(
 *                 obj, mask, size, type.value_type, pool, from_pandas)
 *             result = _pc().run_end_encode(arr, run_end_type=type.run_end_type,             # <<<<<<<<<<<<<<
 *                                           memory_pool=memory_pool)
 *         # ConvertPySequence does strict conversion if type is explicitly passed
*/
          __pyx_t_2 = NULL;
          __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_pc_2); if (unlikely(!__pyx_t_10)) __PYX_ERR(4, 371, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_10);
          __pyx_t_8 = 1;
          #if CYTHON_UNPACK_METHODS
          if (unlikely(PyMethod_Check(__pyx_t_10))) {
            __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_10);
            assert(__pyx_t_2);
            PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_10);
            __Pyx_INCREF(__pyx_t_2);
            __Pyx_INCREF(__pyx__function);
            __Pyx_DECREF_SET(__pyx_t_10, __pyx__function);
            __pyx_t_8 = 0;
          }
          #endif
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
            __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_10, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
            if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 371, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_6);
          }
          __pyx_t_21 = __pyx_t_6;
          __Pyx_INCREF(__pyx_t_21);
          __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_type, __pyx_mstate_global->__pyx_n_u_run_end_type); if (unlikely(!__pyx_t_10)) __PYX_ERR(4, 371, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_10);

          /* "pyarrow/array.pxi":372
 *                 obj, mask, size, type.value_type, pool, from_pandas)
 *             result = _pc().run_end_encode(arr, run_end_type=type.run_end_type,
 *                                           memory_pool=memory_pool)             # <<<<<<<<<<<<<<
 *         # ConvertPySequence does strict conversion if type is explicitly passed
 *         else:
*/
          __pyx_t_8 = 0;
          {
            PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_21, __pyx_v_arr};
            __pyx_t_2 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 371, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_run_end_type, __pyx_t_10, __pyx_t_2, __pyx_callargs+2, 0) < (0)) __PYX_ERR(4, 371, __pyx_L1_error)
            if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_memory_pool, ((PyObject *)__pyx_v_memory_pool), __pyx_t_2, __pyx_callargs+2, 1) < (0)) __PYX_ERR(4, 371, __pyx_L1_error)
            __pyx_t_7 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_run_end_encode, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_2);
            __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0;
            __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 371, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_7);
          }
          __pyx_v_result = __pyx_t_7;
          __pyx_t_7 = 0;

          /* "pyarrow/array.pxi":368
 *                                            pool)
 *     else:
 *         if type and type.id == _Type_RUN_END_ENCODED:             # <<<<<<<<<<<<<<
 *             arr = _sequence_to_array(
 *                 obj, mask, size, type.value_type, pool, from_pandas)
*/
          goto __pyx_L56;
        }

        /* "pyarrow/array.pxi":375
 *         # ConvertPySequence does strict conversion if type is explicitly passed
 *         else:
 *             result = _sequence_to_array(obj, mask, size, type, pool, c_from_pandas)             # <<<<<<<<<<<<<<
 * 
 *     if extension_type is not None:
*/
        /*else*/ {
          if (!(likely(((__pyx_v_type) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_type, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType))))) __PYX_ERR(4, 375, __pyx_L1_error)
          __pyx_t_7 = __pyx_f_7pyarrow_3lib__sequence_to_array(__pyx_v_obj, __pyx_v_mask, __pyx_v_size, ((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_v_type), __pyx_v_pool, __pyx_v_c_from_pandas); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 375, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __pyx_v_result = __pyx_t_7;
          __pyx_t_7 = 0;
        }
        __pyx_L56:;
      }
      __pyx_L11:;

      /* "pyarrow/array.pxi":377
 *             result = _sequence_to_array(obj, mask, size, type, pool, c_from_pandas)
 * 
 *     if extension_type is not None:             # <<<<<<<<<<<<<<
 *         result = ExtensionArray.from_storage(extension_type, result)
 *     return result
*/
      __pyx_t_4 = (__pyx_v_extension_type != Py_None);
      if (__pyx_t_4) {

        /* "pyarrow/array.pxi":378
 * 
 *     if extension_type is not None:
 *         result = ExtensionArray.from_storage(extension_type, result)             # <<<<<<<<<<<<<<
 *     return result
 * 
*/
        __pyx_t_6 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ExtensionArray);
        __Pyx_INCREF(__pyx_t_6);
        __pyx_t_8 = 0;
        {
          PyObject *__pyx_callargs[3] = {__pyx_t_6, __pyx_v_extension_type, __pyx_v_result};
          __pyx_t_7 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_from_storage, __pyx_callargs+__pyx_t_8, (3-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 378, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
        }
        __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_7);
        __pyx_t_7 = 0;

        /* "pyarrow/array.pxi":377
 *             result = _sequence_to_array(obj, mask, size, type, pool, c_from_pandas)
 * 
 *     if extension_type is not None:             # <<<<<<<<<<<<<<
 *         result = ExtensionArray.from_storage(extension_type, result)
 *     return result
*/
      }

      /* "pyarrow/array.pxi":379
 *     if extension_type is not None:
 *         result = ExtensionArray.from_storage(extension_type, result)
 *     return result             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_result);
      __pyx_r = __pyx_v_result;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":129
 * 
 * 
 * def array(object obj, type=None, mask=None, size=None, from_pandas=None,             # <<<<<<<<<<<<<<
 *           bint safe=True, MemoryPool memory_pool=None):
 *     """
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_10);
      __Pyx_XDECREF(__pyx_t_12);
      __Pyx_XDECREF(__pyx_t_19);
      __Pyx_XDECREF(__pyx_t_20);
      __Pyx_XDECREF(__pyx_t_21);
      __Pyx_XDECREF(__pyx_t_23);
      __Pyx_AddTraceback("pyarrow.lib.array", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_extension_type);
      __Pyx_XDECREF(__pyx_v_requested_type);
      __Pyx_XDECREF(__pyx_v_schema_capsule);
      __Pyx_XDECREF(__pyx_v_array_capsule);
      __Pyx_XDECREF(__pyx_v_out_array);
      __Pyx_XDECREF(__pyx_v_values);
      __Pyx_XDECREF(__pyx_v_result);
      __Pyx_XDECREF(__pyx_v_index_type);
      __Pyx_XDECREF(__pyx_v_value_type);
      __Pyx_XDECREF(__pyx_v_indices);
      __Pyx_XDECREF(__pyx_v_dictionary);
      __Pyx_XDECREF(__pyx_v_arr);
      __Pyx_XDECREF(__pyx_v_obj);
      __Pyx_XDECREF(__pyx_v_type);
      __Pyx_XDECREF(__pyx_v_mask);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":382
 * 
 * 
 * def asarray(values, type=None):             # <<<<<<<<<<<<<<
 *     """
 *     Convert to pyarrow.Array, inferring type if not provided.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_197asarray(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_196asarray, "asarray(values, type=None)\n\nConvert to pyarrow.Array, inferring type if not provided.\n\nParameters\n----------\nvalues : array-like\n    This can be a sequence, numpy.ndarray, pyarrow.Array or\n    pyarrow.ChunkedArray. If a ChunkedArray is passed, the output will be\n    a ChunkedArray, otherwise the output will be a Array.\ntype : string or DataType\n    Explicitly construct the array with this type. Attempt to cast if\n    indicated type is different.\n\nReturns\n-------\narr : Array or ChunkedArray");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_197asarray = {"asarray", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_197asarray, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_196asarray};
    static PyObject *__pyx_pw_7pyarrow_3lib_197asarray(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_values = 0;
      PyObject *__pyx_v_type = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[2] = {0,0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("asarray (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_values,&__pyx_mstate_global->__pyx_n_u_type,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(4, 382, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(4, 382, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 382, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "asarray", 0) < (0)) __PYX_ERR(4, 382, __pyx_L3_error)
          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("asarray", 0, 1, 2, i); __PYX_ERR(4, 382, __pyx_L3_error) }
          }
        } else {
          switch (__pyx_nargs) {
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(4, 382, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 382, __pyx_L3_error)
            break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
        }
        __pyx_v_values = values[0];
        __pyx_v_type = values[1];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("asarray", 0, 1, 2, __pyx_nargs); __PYX_ERR(4, 382, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.asarray", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_196asarray(__pyx_self, __pyx_v_values, __pyx_v_type);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_196asarray(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_values, PyObject *__pyx_v_type) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      int __pyx_t_1;
      int __pyx_t_2;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      PyObject *__pyx_t_5 = NULL;
      size_t __pyx_t_6;
      int __pyx_t_7;
      PyObject *__pyx_t_8 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("asarray", 0);
      __Pyx_INCREF(__pyx_v_values);

      /* "pyarrow/array.pxi":400
 *     arr : Array or ChunkedArray
 *     """
 *     if isinstance(values, (Array, ChunkedArray)):             # <<<<<<<<<<<<<<
 *         if type is not None and not values.type.equals(type):
 *             values = values.cast(type)
*/
      __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_values, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array); 
      if (!__pyx_t_2) {
      } else {
        __pyx_t_1 = __pyx_t_2;
        goto __pyx_L4_bool_binop_done;
      }
      __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_values, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ChunkedArray); 
      __pyx_t_1 = __pyx_t_2;
      __pyx_L4_bool_binop_done:;
      if (__pyx_t_1) {

        /* "pyarrow/array.pxi":401
 *     """
 *     if isinstance(values, (Array, ChunkedArray)):
 *         if type is not None and not values.type.equals(type):             # <<<<<<<<<<<<<<
 *             values = values.cast(type)
 *         return values
*/
        __pyx_t_2 = (__pyx_v_type != Py_None);
        if (__pyx_t_2) {
        } else {
          __pyx_t_1 = __pyx_t_2;
          goto __pyx_L7_bool_binop_done;
        }
        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_values, __pyx_mstate_global->__pyx_n_u_type); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 401, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_4 = __pyx_t_5;
        __Pyx_INCREF(__pyx_t_4);
        __pyx_t_6 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_type};
          __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_equals, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 401, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(4, 401, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_7 = (!__pyx_t_2);
        __pyx_t_1 = __pyx_t_7;
        __pyx_L7_bool_binop_done:;
        if (__pyx_t_1) {

          /* "pyarrow/array.pxi":402
 *     if isinstance(values, (Array, ChunkedArray)):
 *         if type is not None and not values.type.equals(type):
 *             values = values.cast(type)             # <<<<<<<<<<<<<<
 *         return values
 *     else:
*/
          __pyx_t_5 = __pyx_v_values;
          __Pyx_INCREF(__pyx_t_5);
          __pyx_t_6 = 0;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_type};
            __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_cast, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
            if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 402, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
          }
          __Pyx_DECREF_SET(__pyx_v_values, __pyx_t_3);
          __pyx_t_3 = 0;

          /* "pyarrow/array.pxi":401
 *     """
 *     if isinstance(values, (Array, ChunkedArray)):
 *         if type is not None and not values.type.equals(type):             # <<<<<<<<<<<<<<
 *             values = values.cast(type)
 *         return values
*/
        }

        /* "pyarrow/array.pxi":403
 *         if type is not None and not values.type.equals(type):
 *             values = values.cast(type)
 *         return values             # <<<<<<<<<<<<<<
 *     else:
 *         return array(values, type=type)
*/
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_v_values);
        __pyx_r = __pyx_v_values;
        goto __pyx_L0;

        /* "pyarrow/array.pxi":400
 *     arr : Array or ChunkedArray
 *     """
 *     if isinstance(values, (Array, ChunkedArray)):             # <<<<<<<<<<<<<<
 *         if type is not None and not values.type.equals(type):
 *             values = values.cast(type)
*/
      }

      /* "pyarrow/array.pxi":405
 *         return values
 *     else:
 *         return array(values, type=type)             # <<<<<<<<<<<<<<
 * 
 * 
*/
      /*else*/ {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_5 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_array); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 405, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_6 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_5);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_6 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_5, __pyx_v_values};
          __pyx_t_8 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(4, 405, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_type, __pyx_v_type, __pyx_t_8, __pyx_callargs+2, 0) < (0)) __PYX_ERR(4, 405, __pyx_L1_error)
          __pyx_t_3 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_8);
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 405, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        __pyx_r = __pyx_t_3;
        __pyx_t_3 = 0;
        goto __pyx_L0;
      }

      /* "pyarrow/array.pxi":382
 * 
 * 
 * def asarray(values, type=None):             # <<<<<<<<<<<<<<
 *     """
 *     Convert to pyarrow.Array, inferring type if not provided.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_8);
      __Pyx_AddTraceback("pyarrow.lib.asarray", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_values);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":408
 * 
 * 
 * def nulls(size, type=None, MemoryPool memory_pool=None):             # <<<<<<<<<<<<<<
 *     """
 *     Create a strongly-typed Array instance with all elements null.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_199nulls(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_198nulls, "nulls(size, type=None, MemoryPool memory_pool=None)\n\nCreate a strongly-typed Array instance with all elements null.\n\nParameters\n----------\nsize : int\n    Array length.\ntype : pyarrow.DataType, default None\n    Explicit type for the array. By default use NullType.\nmemory_pool : MemoryPool, default None\n    Arrow MemoryPool to use for allocations. Uses the default memory\n    pool if not passed.\n\nReturns\n-------\narr : Array\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> pa.nulls(10)\n<pyarrow.lib.NullArray object at ...>\n10 nulls\n\n>>> pa.nulls(3, pa.uint32())\n<pyarrow.lib.UInt32Array object at ...>\n[\n  null,\n  null,\n  null\n]");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_199nulls = {"nulls", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_199nulls, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_198nulls};
    static PyObject *__pyx_pw_7pyarrow_3lib_199nulls(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_size = 0;
      PyObject *__pyx_v_type = 0;
      struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_memory_pool = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[3] = {0,0,0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("nulls (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_size,&__pyx_mstate_global->__pyx_n_u_type,&__pyx_mstate_global->__pyx_n_u_memory_pool,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(4, 408, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  3:
            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(4, 408, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(4, 408, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 408, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "nulls", 0) < (0)) __PYX_ERR(4, 408, __pyx_L3_error)
          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
          if (!values[2]) values[2] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)Py_None));
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("nulls", 0, 1, 3, i); __PYX_ERR(4, 408, __pyx_L3_error) }
          }
        } else {
          switch (__pyx_nargs) {
            case  3:
            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(4, 408, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(4, 408, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 408, __pyx_L3_error)
            break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
          if (!values[2]) values[2] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)Py_None));
        }
        __pyx_v_size = values[0];
        __pyx_v_type = values[1];
        __pyx_v_memory_pool = ((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)values[2]);
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("nulls", 0, 1, 3, __pyx_nargs); __PYX_ERR(4, 408, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.nulls", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_memory_pool), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_MemoryPool, 1, "memory_pool", 0))) __PYX_ERR(4, 408, __pyx_L1_error)
      __pyx_r = __pyx_pf_7pyarrow_3lib_198nulls(__pyx_self, __pyx_v_size, __pyx_v_type, __pyx_v_memory_pool);

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = NULL;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      goto __pyx_L7_cleaned_up;
      __pyx_L0:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __pyx_L7_cleaned_up:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_198nulls(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_size, PyObject *__pyx_v_type, struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_memory_pool) {
       arrow::MemoryPool *__pyx_v_pool;
      int64_t __pyx_v_length;
      std::shared_ptr< arrow::DataType>  __pyx_v_ty;
      std::shared_ptr< arrow::Array>  __pyx_v_arr;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
       arrow::MemoryPool *__pyx_t_1;
      int64_t __pyx_t_2;
      PyObject *__pyx_t_3 = NULL;
      struct __pyx_opt_args_7pyarrow_3lib_ensure_type __pyx_t_4;
      int __pyx_t_5;
      PyObject *__pyx_t_6 = NULL;
      PyObject *__pyx_t_7 = NULL;
      size_t __pyx_t_8;
      std::shared_ptr< arrow::DataType>  __pyx_t_9;
      std::shared_ptr< arrow::Array>  __pyx_t_10;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("nulls", 0);
      __Pyx_INCREF(__pyx_v_type);

      /* "pyarrow/array.pxi":442
 *     """
 *     cdef:
 *         CMemoryPool* pool = maybe_unbox_memory_pool(memory_pool)             # <<<<<<<<<<<<<<
 *         int64_t length = size
 *         shared_ptr[CDataType] ty
*/
      __pyx_t_1 = __pyx_f_7pyarrow_3lib_maybe_unbox_memory_pool(__pyx_v_memory_pool); if (unlikely(__pyx_t_1 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(4, 442, __pyx_L1_error)
      __pyx_v_pool = __pyx_t_1;

      /* "pyarrow/array.pxi":443
 *     cdef:
 *         CMemoryPool* pool = maybe_unbox_memory_pool(memory_pool)
 *         int64_t length = size             # <<<<<<<<<<<<<<
 *         shared_ptr[CDataType] ty
 *         shared_ptr[CArray] arr
*/
      __pyx_t_2 = __Pyx_PyLong_As_int64_t(__pyx_v_size); if (unlikely((__pyx_t_2 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(4, 443, __pyx_L1_error)
      __pyx_v_length = __pyx_t_2;

      /* "pyarrow/array.pxi":447
 *         shared_ptr[CArray] arr
 * 
 *     type = ensure_type(type, allow_none=True)             # <<<<<<<<<<<<<<
 *     if type is None:
 *         type = null()
*/
      __pyx_t_4.__pyx_n = 1;
      __pyx_t_4.allow_none = 1;
      __pyx_t_3 = ((PyObject *)__pyx_f_7pyarrow_3lib_ensure_type(__pyx_v_type, 0, &__pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 447, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_type, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "pyarrow/array.pxi":448
 * 
 *     type = ensure_type(type, allow_none=True)
 *     if type is None:             # <<<<<<<<<<<<<<
 *         type = null()
 * 
*/
      __pyx_t_5 = (__pyx_v_type == Py_None);
      if (__pyx_t_5) {

        /* "pyarrow/array.pxi":449
 *     type = ensure_type(type, allow_none=True)
 *     if type is None:
 *         type = null()             # <<<<<<<<<<<<<<
 * 
 *     ty = pyarrow_unwrap_data_type(type)
*/
        __pyx_t_6 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_null); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 449, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_8 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_7))) {
          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
          assert(__pyx_t_6);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
          __pyx_t_8 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
          __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 449, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        __Pyx_DECREF_SET(__pyx_v_type, __pyx_t_3);
        __pyx_t_3 = 0;

        /* "pyarrow/array.pxi":448
 * 
 *     type = ensure_type(type, allow_none=True)
 *     if type is None:             # <<<<<<<<<<<<<<
 *         type = null()
 * 
*/
      }

      /* "pyarrow/array.pxi":451
 *         type = null()
 * 
 *     ty = pyarrow_unwrap_data_type(type)             # <<<<<<<<<<<<<<
 *     with nogil:
 *         arr = GetResultValue(MakeArrayOfNull(ty, length, pool))
*/
      __pyx_t_9 = pyarrow_unwrap_data_type(__pyx_v_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 451, __pyx_L1_error)
      __pyx_v_ty = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_9);

      /* "pyarrow/array.pxi":452
 * 
 *     ty = pyarrow_unwrap_data_type(type)
 *     with nogil:             # <<<<<<<<<<<<<<
 *         arr = GetResultValue(MakeArrayOfNull(ty, length, pool))
 * 
*/
      {
          PyThreadState * _save;
          _save = PyEval_SaveThread();
          __Pyx_FastGIL_Remember();
          /*try:*/ {

            /* "pyarrow/array.pxi":453
 *     ty = pyarrow_unwrap_data_type(type)
 *     with nogil:
 *         arr = GetResultValue(MakeArrayOfNull(ty, length, pool))             # <<<<<<<<<<<<<<
 * 
 *     return pyarrow_wrap_array(arr)
*/
            __pyx_t_10 = arrow::py::GetResultValue<std::shared_ptr< arrow::Array> >(arrow::MakeArrayOfNull(__pyx_v_ty, __pyx_v_length, __pyx_v_pool)); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(4, 453, __pyx_L5_error)
            __pyx_v_arr = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_10);
          }

          /* "pyarrow/array.pxi":452
 * 
 *     ty = pyarrow_unwrap_data_type(type)
 *     with nogil:             # <<<<<<<<<<<<<<
 *         arr = GetResultValue(MakeArrayOfNull(ty, length, pool))
 * 
*/
          /*finally:*/ {
            /*normal exit:*/{
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L6;
            }
            __pyx_L5_error: {
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L1_error;
            }
            __pyx_L6:;
          }
      }

      /* "pyarrow/array.pxi":455
 *         arr = GetResultValue(MakeArrayOfNull(ty, length, pool))
 * 
 *     return pyarrow_wrap_array(arr)             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = pyarrow_wrap_array(__pyx_v_arr); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 455, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":408
 * 
 * 
 * def nulls(size, type=None, MemoryPool memory_pool=None):             # <<<<<<<<<<<<<<
 *     """
 *     Create a strongly-typed Array instance with all elements null.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_7);
      __Pyx_AddTraceback("pyarrow.lib.nulls", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_type);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":458
 * 
 * 
 * def repeat(value, size, MemoryPool memory_pool=None):             # <<<<<<<<<<<<<<
 *     """
 *     Create an Array instance whose slots are the given scalar.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_201repeat(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_200repeat, "repeat(value, size, MemoryPool memory_pool=None)\n\nCreate an Array instance whose slots are the given scalar.\n\nParameters\n----------\nvalue : Scalar-like object\n    Either a pyarrow.Scalar or any python object coercible to a Scalar.\nsize : int\n    Number of times to repeat the scalar in the output Array.\nmemory_pool : MemoryPool, default None\n    Arrow MemoryPool to use for allocations. Uses the default memory\n    pool if not passed.\n\nReturns\n-------\narr : Array\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> pa.repeat(10, 3)\n<pyarrow.lib.Int64Array object at ...>\n[\n  10,\n  10,\n  10\n]\n\n>>> pa.repeat([1, 2], 2)\n<pyarrow.lib.ListArray object at ...>\n[\n  [\n    1,\n    2\n  ],\n  [\n    1,\n    2\n  ]\n]\n\n>>> pa.repeat(\"string\", 3)\n<pyarrow.lib.StringArray object at ...>\n[\n  \"string\",\n  \"string\",\n  \"string\"\n]\n\n>>> pa.repeat(pa.scalar({'a': 1, 'b': [1, 2]}), 2)\n<pyarrow.lib.StructArray object at ...>\n-- is_valid: all not null\n-- child 0 type: int64\n  [\n    1,\n    1\n  ]\n-- child 1 type: list<item: int64>\n  [\n    [\n      1,\n      2\n    ],\n    [\n      1,\n      2\n    ]\n  ]");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_201repeat = {"repeat", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_201repeat, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_200repeat};
    static PyObject *__pyx_pw_7pyarrow_3lib_201repeat(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_value = 0;
      PyObject *__pyx_v_size = 0;
      struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_memory_pool = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[3] = {0,0,0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("repeat (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_value,&__pyx_mstate_global->__pyx_n_u_size,&__pyx_mstate_global->__pyx_n_u_memory_pool,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(4, 458, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  3:
            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(4, 458, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(4, 458, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 458, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "repeat", 0) < (0)) __PYX_ERR(4, 458, __pyx_L3_error)
          if (!values[2]) values[2] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)Py_None));
          for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("repeat", 0, 2, 3, i); __PYX_ERR(4, 458, __pyx_L3_error) }
          }
        } else {
          switch (__pyx_nargs) {
            case  3:
            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(4, 458, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(4, 458, __pyx_L3_error)
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 458, __pyx_L3_error)
            break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (!values[2]) values[2] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)Py_None));
        }
        __pyx_v_value = values[0];
        __pyx_v_size = values[1];
        __pyx_v_memory_pool = ((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)values[2]);
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("repeat", 0, 2, 3, __pyx_nargs); __PYX_ERR(4, 458, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.repeat", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_memory_pool), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_MemoryPool, 1, "memory_pool", 0))) __PYX_ERR(4, 458, __pyx_L1_error)
      __pyx_r = __pyx_pf_7pyarrow_3lib_200repeat(__pyx_self, __pyx_v_value, __pyx_v_size, __pyx_v_memory_pool);

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = NULL;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      goto __pyx_L7_cleaned_up;
      __pyx_L0:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __pyx_L7_cleaned_up:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_200repeat(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_value, PyObject *__pyx_v_size, struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_memory_pool) {
       arrow::MemoryPool *__pyx_v_pool;
      int64_t __pyx_v_length;
      std::shared_ptr< arrow::Array>  __pyx_v_c_array;
      std::shared_ptr< arrow::Scalar>  __pyx_v_c_scalar;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
       arrow::MemoryPool *__pyx_t_1;
      int64_t __pyx_t_2;
      int __pyx_t_3;
      int __pyx_t_4;
      PyObject *__pyx_t_5 = NULL;
      PyObject *__pyx_t_6 = NULL;
      PyObject *__pyx_t_7 = NULL;
      size_t __pyx_t_8;
      PyObject *__pyx_t_9 = NULL;
      std::shared_ptr< arrow::Scalar>  __pyx_t_10;
      std::shared_ptr< arrow::Array>  __pyx_t_11;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("repeat", 0);
      __Pyx_INCREF(__pyx_v_value);

      /* "pyarrow/array.pxi":529
 *     """
 *     cdef:
 *         CMemoryPool* pool = maybe_unbox_memory_pool(memory_pool)             # <<<<<<<<<<<<<<
 *         int64_t length = size
 *         shared_ptr[CArray] c_array
*/
      __pyx_t_1 = __pyx_f_7pyarrow_3lib_maybe_unbox_memory_pool(__pyx_v_memory_pool); if (unlikely(__pyx_t_1 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(4, 529, __pyx_L1_error)
      __pyx_v_pool = __pyx_t_1;

      /* "pyarrow/array.pxi":530
 *     cdef:
 *         CMemoryPool* pool = maybe_unbox_memory_pool(memory_pool)
 *         int64_t length = size             # <<<<<<<<<<<<<<
 *         shared_ptr[CArray] c_array
 *         shared_ptr[CScalar] c_scalar
*/
      __pyx_t_2 = __Pyx_PyLong_As_int64_t(__pyx_v_size); if (unlikely((__pyx_t_2 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(4, 530, __pyx_L1_error)
      __pyx_v_length = __pyx_t_2;

      /* "pyarrow/array.pxi":534
 *         shared_ptr[CScalar] c_scalar
 * 
 *     if not isinstance(value, Scalar):             # <<<<<<<<<<<<<<
 *         value = scalar(value, memory_pool=memory_pool)
 * 
*/
      __pyx_t_3 = __Pyx_TypeCheck(__pyx_v_value, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Scalar); 
      __pyx_t_4 = (!__pyx_t_3);
      if (__pyx_t_4) {

        /* "pyarrow/array.pxi":535
 * 
 *     if not isinstance(value, Scalar):
 *         value = scalar(value, memory_pool=memory_pool)             # <<<<<<<<<<<<<<
 * 
 *     c_scalar = (<Scalar> value).unwrap()
*/
        __pyx_t_6 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_scalar); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 535, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_8 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_7))) {
          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
          assert(__pyx_t_6);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
          __pyx_t_8 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_6, __pyx_v_value};
          __pyx_t_9 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(4, 535, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_memory_pool, ((PyObject *)__pyx_v_memory_pool), __pyx_t_9, __pyx_callargs+2, 0) < (0)) __PYX_ERR(4, 535, __pyx_L1_error)
          __pyx_t_5 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_9);
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 535, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
        }
        __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_5);
        __pyx_t_5 = 0;

        /* "pyarrow/array.pxi":534
 *         shared_ptr[CScalar] c_scalar
 * 
 *     if not isinstance(value, Scalar):             # <<<<<<<<<<<<<<
 *         value = scalar(value, memory_pool=memory_pool)
 * 
*/
      }

      /* "pyarrow/array.pxi":537
 *         value = scalar(value, memory_pool=memory_pool)
 * 
 *     c_scalar = (<Scalar> value).unwrap()             # <<<<<<<<<<<<<<
 *     with nogil:
 *         c_array = GetResultValue(
*/
      if (unlikely(__pyx_v_value == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "unwrap");
        __PYX_ERR(4, 537, __pyx_L1_error)
      }
      __pyx_t_10 = __pyx_f_7pyarrow_3lib_6Scalar_unwrap(((struct __pyx_obj_7pyarrow_3lib_Scalar *)__pyx_v_value)); if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 537, __pyx_L1_error)
      __pyx_v_c_scalar = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_10);

      /* "pyarrow/array.pxi":538
 * 
 *     c_scalar = (<Scalar> value).unwrap()
 *     with nogil:             # <<<<<<<<<<<<<<
 *         c_array = GetResultValue(
 *             MakeArrayFromScalar(deref(c_scalar), length, pool)
*/
      {
          PyThreadState * _save;
          _save = PyEval_SaveThread();
          __Pyx_FastGIL_Remember();
          /*try:*/ {

            /* "pyarrow/array.pxi":539
 *     c_scalar = (<Scalar> value).unwrap()
 *     with nogil:
 *         c_array = GetResultValue(             # <<<<<<<<<<<<<<
 *             MakeArrayFromScalar(deref(c_scalar), length, pool)
 *         )
*/
            __pyx_t_11 = arrow::py::GetResultValue<std::shared_ptr< arrow::Array> >(arrow::MakeArrayFromScalar((*__pyx_v_c_scalar), __pyx_v_length, __pyx_v_pool)); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(4, 539, __pyx_L5_error)
            __pyx_v_c_array = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_11);
          }

          /* "pyarrow/array.pxi":538
 * 
 *     c_scalar = (<Scalar> value).unwrap()
 *     with nogil:             # <<<<<<<<<<<<<<
 *         c_array = GetResultValue(
 *             MakeArrayFromScalar(deref(c_scalar), length, pool)
*/
          /*finally:*/ {
            /*normal exit:*/{
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L6;
            }
            __pyx_L5_error: {
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L1_error;
            }
            __pyx_L6:;
          }
      }

      /* "pyarrow/array.pxi":543
 *         )
 * 
 *     return pyarrow_wrap_array(c_array)             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_5 = pyarrow_wrap_array(__pyx_v_c_array); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 543, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_r = __pyx_t_5;
      __pyx_t_5 = 0;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":458
 * 
 * 
 * def repeat(value, size, MemoryPool memory_pool=None):             # <<<<<<<<<<<<<<
 *     """
 *     Create an Array instance whose slots are the given scalar.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_9);
      __Pyx_AddTraceback("pyarrow.lib.repeat", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_value);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":546
 * 
 * 
 * def infer_type(values, mask=None, from_pandas=False):             # <<<<<<<<<<<<<<
 *     """
 *     Attempt to infer Arrow data type that can hold the passed Python
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_203infer_type(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_202infer_type, "infer_type(values, mask=None, from_pandas=False)\n\nAttempt to infer Arrow data type that can hold the passed Python\nsequence type in an Array object\n\nParameters\n----------\nvalues : array-like\n    Sequence to infer type from.\nmask : ndarray (bool type), optional\n    Optional exclusion mask where True marks null, False non-null.\nfrom_pandas : bool, default False\n    Use pandas's NA/null sentinel values for type inference.\n\nReturns\n-------\ntype : DataType");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_203infer_type = {"infer_type", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_203infer_type, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_202infer_type};
    static PyObject *__pyx_pw_7pyarrow_3lib_203infer_type(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_values = 0;
      PyObject *__pyx_v_mask = 0;
      PyObject *__pyx_v_from_pandas = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[3] = {0,0,0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("infer_type (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_values,&__pyx_mstate_global->__pyx_n_u_mask,&__pyx_mstate_global->__pyx_n_u_from_pandas,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(4, 546, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  3:
            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(4, 546, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(4, 546, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 546, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "infer_type", 0) < (0)) __PYX_ERR(4, 546, __pyx_L3_error)
          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
          if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False)));
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("infer_type", 0, 1, 3, i); __PYX_ERR(4, 546, __pyx_L3_error) }
          }
        } else {
          switch (__pyx_nargs) {
            case  3:
            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(4, 546, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(4, 546, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 546, __pyx_L3_error)
            break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
          if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False)));
        }
        __pyx_v_values = values[0];
        __pyx_v_mask = values[1];
        __pyx_v_from_pandas = values[2];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("infer_type", 0, 1, 3, __pyx_nargs); __PYX_ERR(4, 546, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.infer_type", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_202infer_type(__pyx_self, __pyx_v_values, __pyx_v_mask, __pyx_v_from_pandas);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_202infer_type(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_values, PyObject *__pyx_v_mask, PyObject *__pyx_v_from_pandas) {
      std::shared_ptr< arrow::DataType>  __pyx_v_out;
      bool __pyx_v_use_pandas_sentinels;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      bool __pyx_t_1;
      int __pyx_t_2;
      int __pyx_t_3;
      PyObject *__pyx_t_4 = NULL;
      PyObject *__pyx_t_5 = NULL;
      int __pyx_t_6;
      PyObject *__pyx_t_7 = NULL;
      PyObject *__pyx_t_8 = NULL;
      size_t __pyx_t_9;
      std::shared_ptr< arrow::DataType>  __pyx_t_10;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("infer_type", 0);
      __Pyx_INCREF(__pyx_v_mask);

      /* "pyarrow/array.pxi":566
 *     cdef:
 *         shared_ptr[CDataType] out
 *         c_bool use_pandas_sentinels = from_pandas             # <<<<<<<<<<<<<<
 * 
 *     if mask is not None and not isinstance(mask, np.ndarray):
*/
      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_from_pandas); if (unlikely((__pyx_t_1 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(4, 566, __pyx_L1_error)
      __pyx_v_use_pandas_sentinels = __pyx_t_1;

      /* "pyarrow/array.pxi":568
 *         c_bool use_pandas_sentinels = from_pandas
 * 
 *     if mask is not None and not isinstance(mask, np.ndarray):             # <<<<<<<<<<<<<<
 *         mask = np.array(mask, dtype=bool)
 * 
*/
      __pyx_t_3 = (__pyx_v_mask != Py_None);
      if (__pyx_t_3) {
      } else {
        __pyx_t_2 = __pyx_t_3;
        goto __pyx_L4_bool_binop_done;
      }
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 568, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ndarray); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 568, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_3 = PyObject_IsInstance(__pyx_v_mask, __pyx_t_5); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(4, 568, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_6 = (!__pyx_t_3);
      __pyx_t_2 = __pyx_t_6;
      __pyx_L4_bool_binop_done:;
      if (__pyx_t_2) {

        /* "pyarrow/array.pxi":569
 * 
 *     if mask is not None and not isinstance(mask, np.ndarray):
 *         mask = np.array(mask, dtype=bool)             # <<<<<<<<<<<<<<
 * 
 *     out = GetResultValue(InferArrowType(values, mask, use_pandas_sentinels))
*/
        __pyx_t_4 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 569, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_array); if (unlikely(!__pyx_t_8)) __PYX_ERR(4, 569, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_9 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_8))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_8);
          assert(__pyx_t_4);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_8, __pyx__function);
          __pyx_t_9 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_4, __pyx_v_mask};
          __pyx_t_7 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 569, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_dtype, ((PyObject *)(&PyBool_Type)), __pyx_t_7, __pyx_callargs+2, 0) < (0)) __PYX_ERR(4, 569, __pyx_L1_error)
          __pyx_t_5 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_7);
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 569, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
        }
        __Pyx_DECREF_SET(__pyx_v_mask, __pyx_t_5);
        __pyx_t_5 = 0;

        /* "pyarrow/array.pxi":568
 *         c_bool use_pandas_sentinels = from_pandas
 * 
 *     if mask is not None and not isinstance(mask, np.ndarray):             # <<<<<<<<<<<<<<
 *         mask = np.array(mask, dtype=bool)
 * 
*/
      }

      /* "pyarrow/array.pxi":571
 *         mask = np.array(mask, dtype=bool)
 * 
 *     out = GetResultValue(InferArrowType(values, mask, use_pandas_sentinels))             # <<<<<<<<<<<<<<
 *     return pyarrow_wrap_data_type(out)
 * 
*/
      __pyx_t_10 = arrow::py::GetResultValue<std::shared_ptr< arrow::DataType> >(arrow::py::InferArrowType(__pyx_v_values, __pyx_v_mask, __pyx_v_use_pandas_sentinels)); if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 571, __pyx_L1_error)
      __pyx_v_out = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_10);

      /* "pyarrow/array.pxi":572
 * 
 *     out = GetResultValue(InferArrowType(values, mask, use_pandas_sentinels))
 *     return pyarrow_wrap_data_type(out)             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_5 = pyarrow_wrap_data_type(__pyx_v_out); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 572, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_r = __pyx_t_5;
      __pyx_t_5 = 0;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":546
 * 
 * 
 * def infer_type(values, mask=None, from_pandas=False):             # <<<<<<<<<<<<<<
 *     """
 *     Attempt to infer Arrow data type that can hold the passed Python
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_8);
      __Pyx_AddTraceback("pyarrow.lib.infer_type", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_mask);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":575
 * 
 * 
 * def arange(int64_t start, int64_t stop, int64_t step=1, *, memory_pool=None):             # <<<<<<<<<<<<<<
 *     """
 *     Create an array of evenly spaced values within a given interval.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_205arange(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_204arange, "arange(int64_t start, int64_t stop, int64_t step=1, *, memory_pool=None)\n\nCreate an array of evenly spaced values within a given interval.\n\nThis function is similar to Python's `range` function.\nThe resulting array will contain values starting from `start` up to but not\nincluding `stop`, with a step size of `step`.\n\nParameters\n----------\nstart : int\n    The starting value for the sequence. The returned array will include this value.\nstop : int\n    The stopping value for the sequence. The returned array will not include this value.\nstep : int, default 1\n    The spacing between values.\nmemory_pool : MemoryPool, optional\n    A memory pool to use for memory allocations.\n\nRaises\n------\nArrowInvalid\n    If `step` is zero.\n\nReturns\n-------\narange : Array");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_205arange = {"arange", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_205arange, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_204arange};
    static PyObject *__pyx_pw_7pyarrow_3lib_205arange(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      int64_t __pyx_v_start;
      int64_t __pyx_v_stop;
      int64_t __pyx_v_step;
      PyObject *__pyx_v_memory_pool = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[4] = {0,0,0,0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("arange (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_start,&__pyx_mstate_global->__pyx_n_u_stop,&__pyx_mstate_global->__pyx_n_u_step,&__pyx_mstate_global->__pyx_n_u_memory_pool,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(4, 575, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  3:
            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(4, 575, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(4, 575, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 575, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "arange", 0) < (0)) __PYX_ERR(4, 575, __pyx_L3_error)
          if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None));
          for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("arange", 0, 2, 3, i); __PYX_ERR(4, 575, __pyx_L3_error) }
          }
        } else {
          switch (__pyx_nargs) {
            case  3:
            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(4, 575, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(4, 575, __pyx_L3_error)
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 575, __pyx_L3_error)
            break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None));
        }
        __pyx_v_start = __Pyx_PyLong_As_int64_t(values[0]); if (unlikely((__pyx_v_start == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(4, 575, __pyx_L3_error)
        __pyx_v_stop = __Pyx_PyLong_As_int64_t(values[1]); if (unlikely((__pyx_v_stop == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(4, 575, __pyx_L3_error)
        if (values[2]) {
          __pyx_v_step = __Pyx_PyLong_As_int64_t(values[2]); if (unlikely((__pyx_v_step == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(4, 575, __pyx_L3_error)
        } else {
          __pyx_v_step = ((int64_t)((int64_t)1));
        }
        __pyx_v_memory_pool = values[3];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("arange", 0, 2, 3, __pyx_nargs); __PYX_ERR(4, 575, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.arange", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_204arange(__pyx_self, __pyx_v_start, __pyx_v_stop, __pyx_v_step, __pyx_v_memory_pool);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_204arange(CYTHON_UNUSED PyObject *__pyx_self, int64_t __pyx_v_start, int64_t __pyx_v_stop, int64_t __pyx_v_step, PyObject *__pyx_v_memory_pool) {
       arrow::MemoryPool *__pyx_v_pool;
      std::shared_ptr< arrow::Array>  __pyx_v_c_array;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
       arrow::MemoryPool *__pyx_t_1;
      std::shared_ptr< arrow::Array>  __pyx_t_2;
      PyObject *__pyx_t_3 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("arange", 0);

      /* "pyarrow/array.pxi":603
 *     arange : Array
 *     """
 *     cdef CMemoryPool* pool = maybe_unbox_memory_pool(memory_pool)             # <<<<<<<<<<<<<<
 *     with nogil:
 *         c_array = GetResultValue(Arange(start, stop, step, pool))
*/
      if (!(likely(((__pyx_v_memory_pool) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_memory_pool, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_MemoryPool))))) __PYX_ERR(4, 603, __pyx_L1_error)
      __pyx_t_1 = __pyx_f_7pyarrow_3lib_maybe_unbox_memory_pool(((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)__pyx_v_memory_pool)); if (unlikely(__pyx_t_1 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(4, 603, __pyx_L1_error)
      __pyx_v_pool = __pyx_t_1;

      /* "pyarrow/array.pxi":604
 *     """
 *     cdef CMemoryPool* pool = maybe_unbox_memory_pool(memory_pool)
 *     with nogil:             # <<<<<<<<<<<<<<
 *         c_array = GetResultValue(Arange(start, stop, step, pool))
 *     return pyarrow_wrap_array(c_array)
*/
      {
          PyThreadState * _save;
          _save = PyEval_SaveThread();
          __Pyx_FastGIL_Remember();
          /*try:*/ {

            /* "pyarrow/array.pxi":605
 *     cdef CMemoryPool* pool = maybe_unbox_memory_pool(memory_pool)
 *     with nogil:
 *         c_array = GetResultValue(Arange(start, stop, step, pool))             # <<<<<<<<<<<<<<
 *     return pyarrow_wrap_array(c_array)
 * 
*/
            __pyx_t_2 = arrow::py::GetResultValue<std::shared_ptr< arrow::Array> >(arrow::py::Arange(__pyx_v_start, __pyx_v_stop, __pyx_v_step, __pyx_v_pool)); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(4, 605, __pyx_L4_error)
            __pyx_v_c_array = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_2);
          }

          /* "pyarrow/array.pxi":604
 *     """
 *     cdef CMemoryPool* pool = maybe_unbox_memory_pool(memory_pool)
 *     with nogil:             # <<<<<<<<<<<<<<
 *         c_array = GetResultValue(Arange(start, stop, step, pool))
 *     return pyarrow_wrap_array(c_array)
*/
          /*finally:*/ {
            /*normal exit:*/{
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L5;
            }
            __pyx_L4_error: {
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L1_error;
            }
            __pyx_L5:;
          }
      }

      /* "pyarrow/array.pxi":606
 *     with nogil:
 *         c_array = GetResultValue(Arange(start, stop, step, pool))
 *     return pyarrow_wrap_array(c_array)             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = pyarrow_wrap_array(__pyx_v_c_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 606, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":575
 * 
 * 
 * def arange(int64_t start, int64_t stop, int64_t step=1, *, memory_pool=None):             # <<<<<<<<<<<<<<
 *     """
 *     Create an array of evenly spaced values within a given interval.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_AddTraceback("pyarrow.lib.arange", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":609
 * 
 * 
 * def _normalize_slice(object arrow_obj, slice key):             # <<<<<<<<<<<<<<
 *     """
 *     Slices with step not equal to 1 (or None) will produce a copy
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_207_normalize_slice(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_206_normalize_slice, "_normalize_slice(arrow_obj, slice key)\n\nSlices with step not equal to 1 (or None) will produce a copy\nrather than a zero-copy view");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_207_normalize_slice = {"_normalize_slice", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_207_normalize_slice, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_206_normalize_slice};
    static PyObject *__pyx_pw_7pyarrow_3lib_207_normalize_slice(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_arrow_obj = 0;
      PyObject *__pyx_v_key = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[2] = {0,0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("_normalize_slice (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_arrow_obj,&__pyx_mstate_global->__pyx_n_u_key,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(4, 609, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(4, 609, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 609, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_normalize_slice", 0) < (0)) __PYX_ERR(4, 609, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_normalize_slice", 1, 2, 2, i); __PYX_ERR(4, 609, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 2)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 609, __pyx_L3_error)
          values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(4, 609, __pyx_L3_error)
        }
        __pyx_v_arrow_obj = values[0];
        __pyx_v_key = ((PyObject*)values[1]);
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("_normalize_slice", 1, 2, 2, __pyx_nargs); __PYX_ERR(4, 609, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib._normalize_slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_key), (&PySlice_Type), 1, "key", 1))) __PYX_ERR(4, 609, __pyx_L1_error)
      __pyx_r = __pyx_pf_7pyarrow_3lib_206_normalize_slice(__pyx_self, __pyx_v_arrow_obj, __pyx_v_key);

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = NULL;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      goto __pyx_L7_cleaned_up;
      __pyx_L0:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __pyx_L7_cleaned_up:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_206_normalize_slice(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_arrow_obj, PyObject *__pyx_v_key) {
      int64_t __pyx_v_start;
      int64_t __pyx_v_stop;
      int64_t __pyx_v_step;
      Py_ssize_t __pyx_v_n;
      int64_t __pyx_v_length;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      Py_ssize_t __pyx_t_1;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      PyObject *__pyx_t_5 = NULL;
      PyObject *__pyx_t_6 = NULL;
      PyObject *(*__pyx_t_7)(PyObject *);
      int64_t __pyx_t_8;
      int64_t __pyx_t_9;
      int64_t __pyx_t_10;
      int __pyx_t_11;
      PyObject *__pyx_t_12 = NULL;
      PyObject *__pyx_t_13 = NULL;
      PyObject *__pyx_t_14 = NULL;
      size_t __pyx_t_15;
      long __pyx_t_16;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("_normalize_slice", 0);

      /* "pyarrow/array.pxi":616
 *     cdef:
 *         int64_t start, stop, step
 *         Py_ssize_t n = len(arrow_obj)             # <<<<<<<<<<<<<<
 * 
 *     start, stop, step = key.indices(n)
*/
      __pyx_t_1 = PyObject_Length(__pyx_v_arrow_obj); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(4, 616, __pyx_L1_error)
      __pyx_v_n = __pyx_t_1;

      /* "pyarrow/array.pxi":618
 *         Py_ssize_t n = len(arrow_obj)
 * 
 *     start, stop, step = key.indices(n)             # <<<<<<<<<<<<<<
 * 
 *     if step != 1:
*/
      __pyx_t_2 = PyLong_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 618, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_CallUnboundCMethod1(&__pyx_mstate_global->__pyx_umethod_PySlice_Type__indices, __pyx_v_key, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 618, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) {
        PyObject* sequence = __pyx_t_3;
        Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
        if (unlikely(size != 3)) {
          if (size > 3) __Pyx_RaiseTooManyValuesError(3);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          __PYX_ERR(4, 618, __pyx_L1_error)
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0);
          __Pyx_INCREF(__pyx_t_2);
          __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1);
          __Pyx_INCREF(__pyx_t_4);
          __pyx_t_5 = PyTuple_GET_ITEM(sequence, 2);
          __Pyx_INCREF(__pyx_t_5);
        } else {
          __pyx_t_2 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference);
          if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 618, __pyx_L1_error)
          __Pyx_XGOTREF(__pyx_t_2);
          __pyx_t_4 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference);
          if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 618, __pyx_L1_error)
          __Pyx_XGOTREF(__pyx_t_4);
          __pyx_t_5 = __Pyx_PyList_GetItemRefFast(sequence, 2, __Pyx_ReferenceSharing_SharedReference);
          if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 618, __pyx_L1_error)
          __Pyx_XGOTREF(__pyx_t_5);
        }
        #else
        __pyx_t_2 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 618, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 618, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_5 = __Pyx_PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 618, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        #endif
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      } else {
        Py_ssize_t index = -1;
        __pyx_t_6 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 618, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_6);
        index = 0; __pyx_t_2 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_2);
        index = 1; __pyx_t_4 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_4)) goto __pyx_L3_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_4);
        index = 2; __pyx_t_5 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_5)) goto __pyx_L3_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_5);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 3) < (0)) __PYX_ERR(4, 618, __pyx_L1_error)
        __pyx_t_7 = NULL;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        goto __pyx_L4_unpacking_done;
        __pyx_L3_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_7 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        __PYX_ERR(4, 618, __pyx_L1_error)
        __pyx_L4_unpacking_done:;
      }
      __pyx_t_8 = __Pyx_PyLong_As_int64_t(__pyx_t_2); if (unlikely((__pyx_t_8 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(4, 618, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_9 = __Pyx_PyLong_As_int64_t(__pyx_t_4); if (unlikely((__pyx_t_9 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(4, 618, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_10 = __Pyx_PyLong_As_int64_t(__pyx_t_5); if (unlikely((__pyx_t_10 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(4, 618, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_v_start = __pyx_t_8;
      __pyx_v_stop = __pyx_t_9;
      __pyx_v_step = __pyx_t_10;

      /* "pyarrow/array.pxi":620
 *     start, stop, step = key.indices(n)
 * 
 *     if step != 1:             # <<<<<<<<<<<<<<
 *         return arrow_obj.take(arange(start, stop, step))
 *     else:
*/
      __pyx_t_11 = (__pyx_v_step != 1);
      if (__pyx_t_11) {

        /* "pyarrow/array.pxi":621
 * 
 *     if step != 1:
 *         return arrow_obj.take(arange(start, stop, step))             # <<<<<<<<<<<<<<
 *     else:
 *         length = max(stop - start, 0)
*/
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_5 = __pyx_v_arrow_obj;
        __Pyx_INCREF(__pyx_t_5);
        __pyx_t_2 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_arange); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 621, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_12 = __Pyx_PyLong_From_int64_t(__pyx_v_start); if (unlikely(!__pyx_t_12)) __PYX_ERR(4, 621, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_13 = __Pyx_PyLong_From_int64_t(__pyx_v_stop); if (unlikely(!__pyx_t_13)) __PYX_ERR(4, 621, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        __pyx_t_14 = __Pyx_PyLong_From_int64_t(__pyx_v_step); if (unlikely(!__pyx_t_14)) __PYX_ERR(4, 621, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_14);
        __pyx_t_15 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_6))) {
          __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_6);
          assert(__pyx_t_2);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
          __pyx_t_15 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[4] = {__pyx_t_2, __pyx_t_12, __pyx_t_13, __pyx_t_14};
          __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_15, (4-__pyx_t_15) | (__pyx_t_15*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 621, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
        }
        __pyx_t_15 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_4};
          __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_take, __pyx_callargs+__pyx_t_15, (2-__pyx_t_15) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 621, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        __pyx_r = __pyx_t_3;
        __pyx_t_3 = 0;
        goto __pyx_L0;

        /* "pyarrow/array.pxi":620
 *     start, stop, step = key.indices(n)
 * 
 *     if step != 1:             # <<<<<<<<<<<<<<
 *         return arrow_obj.take(arange(start, stop, step))
 *     else:
*/
      }

      /* "pyarrow/array.pxi":623
 *         return arrow_obj.take(arange(start, stop, step))
 *     else:
 *         length = max(stop - start, 0)             # <<<<<<<<<<<<<<
 *         return arrow_obj.slice(start, length)
 * 
*/
      /*else*/ {
        __pyx_t_16 = 0;
        __pyx_t_10 = (__pyx_v_stop - __pyx_v_start);
        __pyx_t_11 = (__pyx_t_16 > __pyx_t_10);
        if (__pyx_t_11) {
          __pyx_t_9 = __pyx_t_16;
        } else {
          __pyx_t_9 = __pyx_t_10;
        }
        __pyx_v_length = __pyx_t_9;

        /* "pyarrow/array.pxi":624
 *     else:
 *         length = max(stop - start, 0)
 *         return arrow_obj.slice(start, length)             # <<<<<<<<<<<<<<
 * 
 * 
*/
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_4 = __pyx_v_arrow_obj;
        __Pyx_INCREF(__pyx_t_4);
        __pyx_t_5 = __Pyx_PyLong_From_int64_t(__pyx_v_start); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 624, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_6 = __Pyx_PyLong_From_int64_t(__pyx_v_length); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 624, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_15 = 0;
        {
          PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_t_5, __pyx_t_6};
          __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_slice, __pyx_callargs+__pyx_t_15, (3-__pyx_t_15) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 624, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        __pyx_r = __pyx_t_3;
        __pyx_t_3 = 0;
        goto __pyx_L0;
      }

      /* "pyarrow/array.pxi":609
 * 
 * 
 * def _normalize_slice(object arrow_obj, slice key):             # <<<<<<<<<<<<<<
 *     """
 *     Slices with step not equal to 1 (or None) will produce a copy
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_12);
      __Pyx_XDECREF(__pyx_t_13);
      __Pyx_XDECREF(__pyx_t_14);
      __Pyx_AddTraceback("pyarrow.lib._normalize_slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":627
 * 
 * 
 * cdef Py_ssize_t _normalize_index(Py_ssize_t index,             # <<<<<<<<<<<<<<
 *                                  Py_ssize_t length) except -1:
 *     if index < 0:
*/

    static Py_ssize_t __pyx_f_7pyarrow_3lib__normalize_index(Py_ssize_t __pyx_v_index, Py_ssize_t __pyx_v_length) {
      Py_ssize_t __pyx_r;
      __Pyx_RefNannyDeclarations
      int __pyx_t_1;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      size_t __pyx_t_4;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("_normalize_index", 0);

      /* "pyarrow/array.pxi":629
 * cdef Py_ssize_t _normalize_index(Py_ssize_t index,
 *                                  Py_ssize_t length) except -1:
 *     if index < 0:             # <<<<<<<<<<<<<<
 *         index += length
 *         if index < 0:
*/
      __pyx_t_1 = (__pyx_v_index < 0);
      if (__pyx_t_1) {

        /* "pyarrow/array.pxi":630
 *                                  Py_ssize_t length) except -1:
 *     if index < 0:
 *         index += length             # <<<<<<<<<<<<<<
 *         if index < 0:
 *             raise IndexError("index out of bounds")
*/
        __pyx_v_index = (__pyx_v_index + __pyx_v_length);

        /* "pyarrow/array.pxi":631
 *     if index < 0:
 *         index += length
 *         if index < 0:             # <<<<<<<<<<<<<<
 *             raise IndexError("index out of bounds")
 *     elif index >= length:
*/
        __pyx_t_1 = (__pyx_v_index < 0);
        if (unlikely(__pyx_t_1)) {

          /* "pyarrow/array.pxi":632
 *         index += length
 *         if index < 0:
 *             raise IndexError("index out of bounds")             # <<<<<<<<<<<<<<
 *     elif index >= length:
 *         raise IndexError("index out of bounds")
*/
          __pyx_t_3 = NULL;
          __pyx_t_4 = 1;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_index_out_of_bounds};
            __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_IndexError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 632, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
          }
          __Pyx_Raise(__pyx_t_2, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __PYX_ERR(4, 632, __pyx_L1_error)

          /* "pyarrow/array.pxi":631
 *     if index < 0:
 *         index += length
 *         if index < 0:             # <<<<<<<<<<<<<<
 *             raise IndexError("index out of bounds")
 *     elif index >= length:
*/
        }

        /* "pyarrow/array.pxi":629
 * cdef Py_ssize_t _normalize_index(Py_ssize_t index,
 *                                  Py_ssize_t length) except -1:
 *     if index < 0:             # <<<<<<<<<<<<<<
 *         index += length
 *         if index < 0:
*/
        goto __pyx_L3;
      }

      /* "pyarrow/array.pxi":633
 *         if index < 0:
 *             raise IndexError("index out of bounds")
 *     elif index >= length:             # <<<<<<<<<<<<<<
 *         raise IndexError("index out of bounds")
 *     return index
*/
      __pyx_t_1 = (__pyx_v_index >= __pyx_v_length);
      if (unlikely(__pyx_t_1)) {

        /* "pyarrow/array.pxi":634
 *             raise IndexError("index out of bounds")
 *     elif index >= length:
 *         raise IndexError("index out of bounds")             # <<<<<<<<<<<<<<
 *     return index
 * 
*/
        __pyx_t_3 = NULL;
        __pyx_t_4 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_index_out_of_bounds};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_IndexError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 634, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __Pyx_Raise(__pyx_t_2, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __PYX_ERR(4, 634, __pyx_L1_error)

        /* "pyarrow/array.pxi":633
 *         if index < 0:
 *             raise IndexError("index out of bounds")
 *     elif index >= length:             # <<<<<<<<<<<<<<
 *         raise IndexError("index out of bounds")
 *     return index
*/
      }
      __pyx_L3:;

      /* "pyarrow/array.pxi":635
 *     elif index >= length:
 *         raise IndexError("index out of bounds")
 *     return index             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __pyx_r = __pyx_v_index;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":627
 * 
 * 
 * cdef Py_ssize_t _normalize_index(Py_ssize_t index,             # <<<<<<<<<<<<<<
 *                                  Py_ssize_t length) except -1:
 *     if index < 0:
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_AddTraceback("pyarrow.lib._normalize_index", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = -1L;
      __pyx_L0:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":638
 * 
 * 
 * cdef wrap_datum(const CDatum& datum):             # <<<<<<<<<<<<<<
 *     if datum.kind() == DatumType_ARRAY:
 *         return pyarrow_wrap_array(MakeArray(datum.array()))
*/

    static PyObject *__pyx_f_7pyarrow_3lib_wrap_datum( arrow::Datum const &__pyx_v_datum) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      int __pyx_t_1;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      size_t __pyx_t_4;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("wrap_datum", 0);

      /* "pyarrow/array.pxi":639
 * 
 * cdef wrap_datum(const CDatum& datum):
 *     if datum.kind() == DatumType_ARRAY:             # <<<<<<<<<<<<<<
 *         return pyarrow_wrap_array(MakeArray(datum.array()))
 *     elif datum.kind() == DatumType_CHUNKED_ARRAY:
*/
      __pyx_t_1 = (__pyx_v_datum.kind() ==  arrow::Datum::ARRAY);
      if (__pyx_t_1) {

        /* "pyarrow/array.pxi":640
 * cdef wrap_datum(const CDatum& datum):
 *     if datum.kind() == DatumType_ARRAY:
 *         return pyarrow_wrap_array(MakeArray(datum.array()))             # <<<<<<<<<<<<<<
 *     elif datum.kind() == DatumType_CHUNKED_ARRAY:
 *         return pyarrow_wrap_chunked_array(datum.chunked_array())
*/
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_2 = pyarrow_wrap_array(arrow::MakeArray(__pyx_v_datum.array())); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 640, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        goto __pyx_L0;

        /* "pyarrow/array.pxi":639
 * 
 * cdef wrap_datum(const CDatum& datum):
 *     if datum.kind() == DatumType_ARRAY:             # <<<<<<<<<<<<<<
 *         return pyarrow_wrap_array(MakeArray(datum.array()))
 *     elif datum.kind() == DatumType_CHUNKED_ARRAY:
*/
      }

      /* "pyarrow/array.pxi":641
 *     if datum.kind() == DatumType_ARRAY:
 *         return pyarrow_wrap_array(MakeArray(datum.array()))
 *     elif datum.kind() == DatumType_CHUNKED_ARRAY:             # <<<<<<<<<<<<<<
 *         return pyarrow_wrap_chunked_array(datum.chunked_array())
 *     elif datum.kind() == DatumType_RECORD_BATCH:
*/
      __pyx_t_1 = (__pyx_v_datum.kind() ==  arrow::Datum::CHUNKED_ARRAY);
      if (__pyx_t_1) {

        /* "pyarrow/array.pxi":642
 *         return pyarrow_wrap_array(MakeArray(datum.array()))
 *     elif datum.kind() == DatumType_CHUNKED_ARRAY:
 *         return pyarrow_wrap_chunked_array(datum.chunked_array())             # <<<<<<<<<<<<<<
 *     elif datum.kind() == DatumType_RECORD_BATCH:
 *         return pyarrow_wrap_batch(datum.record_batch())
*/
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_2 = pyarrow_wrap_chunked_array(__pyx_v_datum.chunked_array()); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 642, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        goto __pyx_L0;

        /* "pyarrow/array.pxi":641
 *     if datum.kind() == DatumType_ARRAY:
 *         return pyarrow_wrap_array(MakeArray(datum.array()))
 *     elif datum.kind() == DatumType_CHUNKED_ARRAY:             # <<<<<<<<<<<<<<
 *         return pyarrow_wrap_chunked_array(datum.chunked_array())
 *     elif datum.kind() == DatumType_RECORD_BATCH:
*/
      }

      /* "pyarrow/array.pxi":643
 *     elif datum.kind() == DatumType_CHUNKED_ARRAY:
 *         return pyarrow_wrap_chunked_array(datum.chunked_array())
 *     elif datum.kind() == DatumType_RECORD_BATCH:             # <<<<<<<<<<<<<<
 *         return pyarrow_wrap_batch(datum.record_batch())
 *     elif datum.kind() == DatumType_TABLE:
*/
      __pyx_t_1 = (__pyx_v_datum.kind() ==  arrow::Datum::RECORD_BATCH);
      if (__pyx_t_1) {

        /* "pyarrow/array.pxi":644
 *         return pyarrow_wrap_chunked_array(datum.chunked_array())
 *     elif datum.kind() == DatumType_RECORD_BATCH:
 *         return pyarrow_wrap_batch(datum.record_batch())             # <<<<<<<<<<<<<<
 *     elif datum.kind() == DatumType_TABLE:
 *         return pyarrow_wrap_table(datum.table())
*/
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_2 = pyarrow_wrap_batch(__pyx_v_datum.record_batch()); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 644, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        goto __pyx_L0;

        /* "pyarrow/array.pxi":643
 *     elif datum.kind() == DatumType_CHUNKED_ARRAY:
 *         return pyarrow_wrap_chunked_array(datum.chunked_array())
 *     elif datum.kind() == DatumType_RECORD_BATCH:             # <<<<<<<<<<<<<<
 *         return pyarrow_wrap_batch(datum.record_batch())
 *     elif datum.kind() == DatumType_TABLE:
*/
      }

      /* "pyarrow/array.pxi":645
 *     elif datum.kind() == DatumType_RECORD_BATCH:
 *         return pyarrow_wrap_batch(datum.record_batch())
 *     elif datum.kind() == DatumType_TABLE:             # <<<<<<<<<<<<<<
 *         return pyarrow_wrap_table(datum.table())
 *     elif datum.kind() == DatumType_SCALAR:
*/
      __pyx_t_1 = (__pyx_v_datum.kind() ==  arrow::Datum::TABLE);
      if (__pyx_t_1) {

        /* "pyarrow/array.pxi":646
 *         return pyarrow_wrap_batch(datum.record_batch())
 *     elif datum.kind() == DatumType_TABLE:
 *         return pyarrow_wrap_table(datum.table())             # <<<<<<<<<<<<<<
 *     elif datum.kind() == DatumType_SCALAR:
 *         return pyarrow_wrap_scalar(datum.scalar())
*/
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_2 = pyarrow_wrap_table(__pyx_v_datum.table()); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 646, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        goto __pyx_L0;

        /* "pyarrow/array.pxi":645
 *     elif datum.kind() == DatumType_RECORD_BATCH:
 *         return pyarrow_wrap_batch(datum.record_batch())
 *     elif datum.kind() == DatumType_TABLE:             # <<<<<<<<<<<<<<
 *         return pyarrow_wrap_table(datum.table())
 *     elif datum.kind() == DatumType_SCALAR:
*/
      }

      /* "pyarrow/array.pxi":647
 *     elif datum.kind() == DatumType_TABLE:
 *         return pyarrow_wrap_table(datum.table())
 *     elif datum.kind() == DatumType_SCALAR:             # <<<<<<<<<<<<<<
 *         return pyarrow_wrap_scalar(datum.scalar())
 *     else:
*/
      __pyx_t_1 = (__pyx_v_datum.kind() ==  arrow::Datum::SCALAR);
      if (likely(__pyx_t_1)) {

        /* "pyarrow/array.pxi":648
 *         return pyarrow_wrap_table(datum.table())
 *     elif datum.kind() == DatumType_SCALAR:
 *         return pyarrow_wrap_scalar(datum.scalar())             # <<<<<<<<<<<<<<
 *     else:
 *         raise ValueError("Unable to wrap Datum in a Python object")
*/
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_2 = pyarrow_wrap_scalar(__pyx_v_datum.scalar()); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 648, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        goto __pyx_L0;

        /* "pyarrow/array.pxi":647
 *     elif datum.kind() == DatumType_TABLE:
 *         return pyarrow_wrap_table(datum.table())
 *     elif datum.kind() == DatumType_SCALAR:             # <<<<<<<<<<<<<<
 *         return pyarrow_wrap_scalar(datum.scalar())
 *     else:
*/
      }

      /* "pyarrow/array.pxi":650
 *         return pyarrow_wrap_scalar(datum.scalar())
 *     else:
 *         raise ValueError("Unable to wrap Datum in a Python object")             # <<<<<<<<<<<<<<
 * 
 * 
*/
      /*else*/ {
        __pyx_t_3 = NULL;
        __pyx_t_4 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Unable_to_wrap_Datum_in_a_Python};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 650, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __Pyx_Raise(__pyx_t_2, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __PYX_ERR(4, 650, __pyx_L1_error)
      }

      /* "pyarrow/array.pxi":638
 * 
 * 
 * cdef wrap_datum(const CDatum& datum):             # <<<<<<<<<<<<<<
 *     if datum.kind() == DatumType_ARRAY:
 *         return pyarrow_wrap_array(MakeArray(datum.array()))
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_AddTraceback("pyarrow.lib.wrap_datum", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = 0;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":653
 * 
 * 
 * cdef _append_array_buffers(const CArrayData* ad, list res):             # <<<<<<<<<<<<<<
 *     """
 *     Recursively append Buffer wrappers from *ad* and its children.
*/

    static PyObject *__pyx_f_7pyarrow_3lib__append_array_buffers( arrow::ArrayData const *__pyx_v_ad, PyObject *__pyx_v_res) {
      size_t __pyx_v_i;
      size_t __pyx_v_n;
      std::shared_ptr< arrow::Buffer>  __pyx_v_buf;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      int __pyx_t_1;
      size_t __pyx_t_2;
      size_t __pyx_t_3;
      size_t __pyx_t_4;
      PyObject *__pyx_t_5 = NULL;
      PyObject *__pyx_t_6 = NULL;
      int __pyx_t_7;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("_append_array_buffers", 0);

      /* "pyarrow/array.pxi":658
 *     """
 *     cdef size_t i, n
 *     assert ad != NULL             # <<<<<<<<<<<<<<
 *     n = ad.buffers.size()
 *     for i in range(n):
*/
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      if (unlikely(__pyx_assertions_enabled())) {
        __pyx_t_1 = (__pyx_v_ad != NULL);
        if (unlikely(!__pyx_t_1)) {
          __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
          __PYX_ERR(4, 658, __pyx_L1_error)
        }
      }
      #else
      if ((1)); else __PYX_ERR(4, 658, __pyx_L1_error)
      #endif

      /* "pyarrow/array.pxi":659
 *     cdef size_t i, n
 *     assert ad != NULL
 *     n = ad.buffers.size()             # <<<<<<<<<<<<<<
 *     for i in range(n):
 *         buf = ad.buffers[i]
*/
      __pyx_v_n = __pyx_v_ad->buffers.size();

      /* "pyarrow/array.pxi":660
 *     assert ad != NULL
 *     n = ad.buffers.size()
 *     for i in range(n):             # <<<<<<<<<<<<<<
 *         buf = ad.buffers[i]
 *         res.append(pyarrow_wrap_buffer(buf)
*/
      __pyx_t_2 = __pyx_v_n;
      __pyx_t_3 = __pyx_t_2;
      for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
        __pyx_v_i = __pyx_t_4;

        /* "pyarrow/array.pxi":661
 *     n = ad.buffers.size()
 *     for i in range(n):
 *         buf = ad.buffers[i]             # <<<<<<<<<<<<<<
 *         res.append(pyarrow_wrap_buffer(buf)
 *                    if buf.get() != NULL else None)
*/
        __pyx_v_buf = (__pyx_v_ad->buffers[__pyx_v_i]);

        /* "pyarrow/array.pxi":662
 *     for i in range(n):
 *         buf = ad.buffers[i]
 *         res.append(pyarrow_wrap_buffer(buf)             # <<<<<<<<<<<<<<
 *                    if buf.get() != NULL else None)
 *     n = ad.child_data.size()
*/
        if (unlikely(__pyx_v_res == Py_None)) {
          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append");
          __PYX_ERR(4, 662, __pyx_L1_error)
        }

        /* "pyarrow/array.pxi":663
 *         buf = ad.buffers[i]
 *         res.append(pyarrow_wrap_buffer(buf)
 *                    if buf.get() != NULL else None)             # <<<<<<<<<<<<<<
 *     n = ad.child_data.size()
 *     for i in range(n):
*/
        __pyx_t_1 = (__pyx_v_buf.get() != NULL);
        if (__pyx_t_1) {

          /* "pyarrow/array.pxi":662
 *     for i in range(n):
 *         buf = ad.buffers[i]
 *         res.append(pyarrow_wrap_buffer(buf)             # <<<<<<<<<<<<<<
 *                    if buf.get() != NULL else None)
 *     n = ad.child_data.size()
*/
          __pyx_t_6 = pyarrow_wrap_buffer(__pyx_v_buf); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 662, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_t_5 = __pyx_t_6;
          __pyx_t_6 = 0;
        } else {

          /* "pyarrow/array.pxi":663
 *         buf = ad.buffers[i]
 *         res.append(pyarrow_wrap_buffer(buf)
 *                    if buf.get() != NULL else None)             # <<<<<<<<<<<<<<
 *     n = ad.child_data.size()
 *     for i in range(n):
*/
          __Pyx_INCREF(Py_None);
          __pyx_t_5 = Py_None;
        }

        /* "pyarrow/array.pxi":662
 *     for i in range(n):
 *         buf = ad.buffers[i]
 *         res.append(pyarrow_wrap_buffer(buf)             # <<<<<<<<<<<<<<
 *                    if buf.get() != NULL else None)
 *     n = ad.child_data.size()
*/
        __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_res, __pyx_t_5); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(4, 662, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }

      /* "pyarrow/array.pxi":664
 *         res.append(pyarrow_wrap_buffer(buf)
 *                    if buf.get() != NULL else None)
 *     n = ad.child_data.size()             # <<<<<<<<<<<<<<
 *     for i in range(n):
 *         _append_array_buffers(ad.child_data[i].get(), res)
*/
      __pyx_v_n = __pyx_v_ad->child_data.size();

      /* "pyarrow/array.pxi":665
 *                    if buf.get() != NULL else None)
 *     n = ad.child_data.size()
 *     for i in range(n):             # <<<<<<<<<<<<<<
 *         _append_array_buffers(ad.child_data[i].get(), res)
 * 
*/
      __pyx_t_2 = __pyx_v_n;
      __pyx_t_3 = __pyx_t_2;
      for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
        __pyx_v_i = __pyx_t_4;

        /* "pyarrow/array.pxi":666
 *     n = ad.child_data.size()
 *     for i in range(n):
 *         _append_array_buffers(ad.child_data[i].get(), res)             # <<<<<<<<<<<<<<
 * 
 * 
*/
        __pyx_t_5 = __pyx_f_7pyarrow_3lib__append_array_buffers((__pyx_v_ad->child_data[__pyx_v_i]).get(), __pyx_v_res); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 666, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }

      /* "pyarrow/array.pxi":653
 * 
 * 
 * cdef _append_array_buffers(const CArrayData* ad, list res):             # <<<<<<<<<<<<<<
 *     """
 *     Recursively append Buffer wrappers from *ad* and its children.
*/

      /* function exit code */
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_AddTraceback("pyarrow.lib._append_array_buffers", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = 0;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":669
 * 
 * 
 * cdef _reduce_array_data(const CArrayData* ad):             # <<<<<<<<<<<<<<
 *     """
 *     Recursively dissect ArrayData to (pickable) tuples.
*/

    static PyObject *__pyx_f_7pyarrow_3lib__reduce_array_data( arrow::ArrayData const *__pyx_v_ad) {
      size_t __pyx_v_i;
      size_t __pyx_v_n;
      PyObject *__pyx_v_buffers = NULL;
      std::shared_ptr< arrow::Buffer>  __pyx_v_buf;
      PyObject *__pyx_v_children = NULL;
      PyObject *__pyx_v_dictionary = NULL;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      int __pyx_t_1;
      PyObject *__pyx_t_2 = NULL;
      size_t __pyx_t_3;
      size_t __pyx_t_4;
      size_t __pyx_t_5;
      PyObject *__pyx_t_6 = NULL;
      int __pyx_t_7;
      PyObject *__pyx_t_8 = NULL;
      PyObject *__pyx_t_9 = NULL;
      PyObject *__pyx_t_10 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("_reduce_array_data", 0);

      /* "pyarrow/array.pxi":674
 *     """
 *     cdef size_t i, n
 *     assert ad != NULL             # <<<<<<<<<<<<<<
 * 
 *     n = ad.buffers.size()
*/
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      if (unlikely(__pyx_assertions_enabled())) {
        __pyx_t_1 = (__pyx_v_ad != NULL);
        if (unlikely(!__pyx_t_1)) {
          __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
          __PYX_ERR(4, 674, __pyx_L1_error)
        }
      }
      #else
      if ((1)); else __PYX_ERR(4, 674, __pyx_L1_error)
      #endif

      /* "pyarrow/array.pxi":676
 *     assert ad != NULL
 * 
 *     n = ad.buffers.size()             # <<<<<<<<<<<<<<
 *     buffers = []
 *     for i in range(n):
*/
      __pyx_v_n = __pyx_v_ad->buffers.size();

      /* "pyarrow/array.pxi":677
 * 
 *     n = ad.buffers.size()
 *     buffers = []             # <<<<<<<<<<<<<<
 *     for i in range(n):
 *         buf = ad.buffers[i]
*/
      __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 677, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_v_buffers = ((PyObject*)__pyx_t_2);
      __pyx_t_2 = 0;

      /* "pyarrow/array.pxi":678
 *     n = ad.buffers.size()
 *     buffers = []
 *     for i in range(n):             # <<<<<<<<<<<<<<
 *         buf = ad.buffers[i]
 *         buffers.append(pyarrow_wrap_buffer(buf)
*/
      __pyx_t_3 = __pyx_v_n;
      __pyx_t_4 = __pyx_t_3;
      for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
        __pyx_v_i = __pyx_t_5;

        /* "pyarrow/array.pxi":679
 *     buffers = []
 *     for i in range(n):
 *         buf = ad.buffers[i]             # <<<<<<<<<<<<<<
 *         buffers.append(pyarrow_wrap_buffer(buf)
 *                        if buf.get() != NULL else None)
*/
        __pyx_v_buf = (__pyx_v_ad->buffers[__pyx_v_i]);

        /* "pyarrow/array.pxi":681
 *         buf = ad.buffers[i]
 *         buffers.append(pyarrow_wrap_buffer(buf)
 *                        if buf.get() != NULL else None)             # <<<<<<<<<<<<<<
 * 
 *     children = []
*/
        __pyx_t_1 = (__pyx_v_buf.get() != NULL);
        if (__pyx_t_1) {

          /* "pyarrow/array.pxi":680
 *     for i in range(n):
 *         buf = ad.buffers[i]
 *         buffers.append(pyarrow_wrap_buffer(buf)             # <<<<<<<<<<<<<<
 *                        if buf.get() != NULL else None)
 * 
*/
          __pyx_t_6 = pyarrow_wrap_buffer(__pyx_v_buf); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 680, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_t_2 = __pyx_t_6;
          __pyx_t_6 = 0;
        } else {

          /* "pyarrow/array.pxi":681
 *         buf = ad.buffers[i]
 *         buffers.append(pyarrow_wrap_buffer(buf)
 *                        if buf.get() != NULL else None)             # <<<<<<<<<<<<<<
 * 
 *     children = []
*/
          __Pyx_INCREF(Py_None);
          __pyx_t_2 = Py_None;
        }

        /* "pyarrow/array.pxi":680
 *     for i in range(n):
 *         buf = ad.buffers[i]
 *         buffers.append(pyarrow_wrap_buffer(buf)             # <<<<<<<<<<<<<<
 *                        if buf.get() != NULL else None)
 * 
*/
        __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_buffers, __pyx_t_2); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(4, 680, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }

      /* "pyarrow/array.pxi":683
 *                        if buf.get() != NULL else None)
 * 
 *     children = []             # <<<<<<<<<<<<<<
 *     n = ad.child_data.size()
 *     for i in range(n):
*/
      __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 683, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_v_children = ((PyObject*)__pyx_t_2);
      __pyx_t_2 = 0;

      /* "pyarrow/array.pxi":684
 * 
 *     children = []
 *     n = ad.child_data.size()             # <<<<<<<<<<<<<<
 *     for i in range(n):
 *         children.append(_reduce_array_data(ad.child_data[i].get()))
*/
      __pyx_v_n = __pyx_v_ad->child_data.size();

      /* "pyarrow/array.pxi":685
 *     children = []
 *     n = ad.child_data.size()
 *     for i in range(n):             # <<<<<<<<<<<<<<
 *         children.append(_reduce_array_data(ad.child_data[i].get()))
 * 
*/
      __pyx_t_3 = __pyx_v_n;
      __pyx_t_4 = __pyx_t_3;
      for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
        __pyx_v_i = __pyx_t_5;

        /* "pyarrow/array.pxi":686
 *     n = ad.child_data.size()
 *     for i in range(n):
 *         children.append(_reduce_array_data(ad.child_data[i].get()))             # <<<<<<<<<<<<<<
 * 
 *     if ad.dictionary.get() != NULL:
*/
        __pyx_t_2 = __pyx_f_7pyarrow_3lib__reduce_array_data((__pyx_v_ad->child_data[__pyx_v_i]).get()); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 686, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_children, __pyx_t_2); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(4, 686, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }

      /* "pyarrow/array.pxi":688
 *         children.append(_reduce_array_data(ad.child_data[i].get()))
 * 
 *     if ad.dictionary.get() != NULL:             # <<<<<<<<<<<<<<
 *         dictionary = _reduce_array_data(ad.dictionary.get())
 *     else:
*/
      __pyx_t_1 = (__pyx_v_ad->dictionary.get() != NULL);
      if (__pyx_t_1) {

        /* "pyarrow/array.pxi":689
 * 
 *     if ad.dictionary.get() != NULL:
 *         dictionary = _reduce_array_data(ad.dictionary.get())             # <<<<<<<<<<<<<<
 *     else:
 *         dictionary = None
*/
        __pyx_t_2 = __pyx_f_7pyarrow_3lib__reduce_array_data(__pyx_v_ad->dictionary.get()); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 689, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_v_dictionary = __pyx_t_2;
        __pyx_t_2 = 0;

        /* "pyarrow/array.pxi":688
 *         children.append(_reduce_array_data(ad.child_data[i].get()))
 * 
 *     if ad.dictionary.get() != NULL:             # <<<<<<<<<<<<<<
 *         dictionary = _reduce_array_data(ad.dictionary.get())
 *     else:
*/
        goto __pyx_L7;
      }

      /* "pyarrow/array.pxi":691
 *         dictionary = _reduce_array_data(ad.dictionary.get())
 *     else:
 *         dictionary = None             # <<<<<<<<<<<<<<
 * 
 *     return pyarrow_wrap_data_type(ad.type), ad.length, ad.null_count, \
*/
      /*else*/ {
        __Pyx_INCREF(Py_None);
        __pyx_v_dictionary = Py_None;
      }
      __pyx_L7:;

      /* "pyarrow/array.pxi":693
 *         dictionary = None
 * 
 *     return pyarrow_wrap_data_type(ad.type), ad.length, ad.null_count, \             # <<<<<<<<<<<<<<
 *         ad.offset, buffers, children, dictionary
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = pyarrow_wrap_data_type(__pyx_v_ad->type); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 693, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_6 = __Pyx_PyLong_From_int64_t(__pyx_v_ad->length); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 693, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_8 = __Pyx_PyLong_From_int64_t(__pyx_v_ad->null_count); if (unlikely(!__pyx_t_8)) __PYX_ERR(4, 693, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);

      /* "pyarrow/array.pxi":694
 * 
 *     return pyarrow_wrap_data_type(ad.type), ad.length, ad.null_count, \
 *         ad.offset, buffers, children, dictionary             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __pyx_t_9 = __Pyx_PyLong_From_int64_t(__pyx_v_ad->offset); if (unlikely(!__pyx_t_9)) __PYX_ERR(4, 694, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);

      /* "pyarrow/array.pxi":693
 *         dictionary = None
 * 
 *     return pyarrow_wrap_data_type(ad.type), ad.length, ad.null_count, \             # <<<<<<<<<<<<<<
 *         ad.offset, buffers, children, dictionary
 * 
*/
      __pyx_t_10 = PyTuple_New(7); if (unlikely(!__pyx_t_10)) __PYX_ERR(4, 693, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_GIVEREF(__pyx_t_2);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_2) != (0)) __PYX_ERR(4, 693, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_6);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_6) != (0)) __PYX_ERR(4, 693, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_8);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_t_8) != (0)) __PYX_ERR(4, 693, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_9);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 3, __pyx_t_9) != (0)) __PYX_ERR(4, 693, __pyx_L1_error);
      __Pyx_INCREF(__pyx_v_buffers);
      __Pyx_GIVEREF(__pyx_v_buffers);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 4, __pyx_v_buffers) != (0)) __PYX_ERR(4, 693, __pyx_L1_error);
      __Pyx_INCREF(__pyx_v_children);
      __Pyx_GIVEREF(__pyx_v_children);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 5, __pyx_v_children) != (0)) __PYX_ERR(4, 693, __pyx_L1_error);
      __Pyx_INCREF(__pyx_v_dictionary);
      __Pyx_GIVEREF(__pyx_v_dictionary);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 6, __pyx_v_dictionary) != (0)) __PYX_ERR(4, 693, __pyx_L1_error);
      __pyx_t_2 = 0;
      __pyx_t_6 = 0;
      __pyx_t_8 = 0;
      __pyx_t_9 = 0;
      __pyx_r = __pyx_t_10;
      __pyx_t_10 = 0;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":669
 * 
 * 
 * cdef _reduce_array_data(const CArrayData* ad):             # <<<<<<<<<<<<<<
 *     """
 *     Recursively dissect ArrayData to (pickable) tuples.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_8);
      __Pyx_XDECREF(__pyx_t_9);
      __Pyx_XDECREF(__pyx_t_10);
      __Pyx_AddTraceback("pyarrow.lib._reduce_array_data", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = 0;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_buffers);
      __Pyx_XDECREF(__pyx_v_children);
      __Pyx_XDECREF(__pyx_v_dictionary);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":697
 * 
 * 
 * cdef shared_ptr[CArrayData] _reconstruct_array_data(data):             # <<<<<<<<<<<<<<
 *     """
 *     Reconstruct CArrayData objects from the tuple structure generated
*/

    static std::shared_ptr< arrow::ArrayData>  __pyx_f_7pyarrow_3lib__reconstruct_array_data(PyObject *__pyx_v_data) {
      int64_t __pyx_v_length;
      int64_t __pyx_v_null_count;
      int64_t __pyx_v_offset;
      int64_t __pyx_v_i;
      struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v_dtype = 0;
      struct __pyx_obj_7pyarrow_3lib_Buffer *__pyx_v_buf = 0;
      std::vector<std::shared_ptr< arrow::Buffer> >  __pyx_v_c_buffers;
      std::vector<std::shared_ptr< arrow::ArrayData> >  __pyx_v_c_children;
      std::shared_ptr< arrow::ArrayData>  __pyx_v_c_dictionary;
      PyObject *__pyx_v_buffers = NULL;
      PyObject *__pyx_v_children = NULL;
      PyObject *__pyx_v_dictionary = NULL;
      std::shared_ptr< arrow::ArrayData>  __pyx_r;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      PyObject *__pyx_t_5 = NULL;
      PyObject *__pyx_t_6 = NULL;
      PyObject *__pyx_t_7 = NULL;
      PyObject *__pyx_t_8 = NULL;
      PyObject *(*__pyx_t_9)(PyObject *);
      int64_t __pyx_t_10;
      int64_t __pyx_t_11;
      int64_t __pyx_t_12;
      Py_ssize_t __pyx_t_13;
      Py_ssize_t __pyx_t_14;
      int __pyx_t_15;
      std::shared_ptr< arrow::ArrayData>  __pyx_t_16;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("_reconstruct_array_data", 0);

      /* "pyarrow/array.pxi":710
 *         shared_ptr[CArrayData] c_dictionary
 * 
 *     dtype, length, null_count, offset, buffers, children, dictionary = data             # <<<<<<<<<<<<<<
 * 
 *     for i in range(len(buffers)):
*/
      if ((likely(PyTuple_CheckExact(__pyx_v_data))) || (PyList_CheckExact(__pyx_v_data))) {
        PyObject* sequence = __pyx_v_data;
        Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
        if (unlikely(size != 7)) {
          if (size > 7) __Pyx_RaiseTooManyValuesError(7);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          __PYX_ERR(4, 710, __pyx_L1_error)
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0);
          __Pyx_INCREF(__pyx_t_1);
          __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1);
          __Pyx_INCREF(__pyx_t_2);
          __pyx_t_3 = PyTuple_GET_ITEM(sequence, 2);
          __Pyx_INCREF(__pyx_t_3);
          __pyx_t_4 = PyTuple_GET_ITEM(sequence, 3);
          __Pyx_INCREF(__pyx_t_4);
          __pyx_t_5 = PyTuple_GET_ITEM(sequence, 4);
          __Pyx_INCREF(__pyx_t_5);
          __pyx_t_6 = PyTuple_GET_ITEM(sequence, 5);
          __Pyx_INCREF(__pyx_t_6);
          __pyx_t_7 = PyTuple_GET_ITEM(sequence, 6);
          __Pyx_INCREF(__pyx_t_7);
        } else {
          __pyx_t_1 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference);
          if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 710, __pyx_L1_error)
          __Pyx_XGOTREF(__pyx_t_1);
          __pyx_t_2 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference);
          if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 710, __pyx_L1_error)
          __Pyx_XGOTREF(__pyx_t_2);
          __pyx_t_3 = __Pyx_PyList_GetItemRefFast(sequence, 2, __Pyx_ReferenceSharing_SharedReference);
          if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 710, __pyx_L1_error)
          __Pyx_XGOTREF(__pyx_t_3);
          __pyx_t_4 = __Pyx_PyList_GetItemRefFast(sequence, 3, __Pyx_ReferenceSharing_SharedReference);
          if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 710, __pyx_L1_error)
          __Pyx_XGOTREF(__pyx_t_4);
          __pyx_t_5 = __Pyx_PyList_GetItemRefFast(sequence, 4, __Pyx_ReferenceSharing_SharedReference);
          if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 710, __pyx_L1_error)
          __Pyx_XGOTREF(__pyx_t_5);
          __pyx_t_6 = __Pyx_PyList_GetItemRefFast(sequence, 5, __Pyx_ReferenceSharing_SharedReference);
          if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 710, __pyx_L1_error)
          __Pyx_XGOTREF(__pyx_t_6);
          __pyx_t_7 = __Pyx_PyList_GetItemRefFast(sequence, 6, __Pyx_ReferenceSharing_SharedReference);
          if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 710, __pyx_L1_error)
          __Pyx_XGOTREF(__pyx_t_7);
        }
        #else
        {
          Py_ssize_t i;
          PyObject** temps[7] = {&__pyx_t_1,&__pyx_t_2,&__pyx_t_3,&__pyx_t_4,&__pyx_t_5,&__pyx_t_6,&__pyx_t_7};
          for (i=0; i < 7; i++) {
            PyObject* item = __Pyx_PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(4, 710, __pyx_L1_error)
            __Pyx_GOTREF(item);
            *(temps[i]) = item;
          }
        }
        #endif
      } else {
        Py_ssize_t index = -1;
        PyObject** temps[7] = {&__pyx_t_1,&__pyx_t_2,&__pyx_t_3,&__pyx_t_4,&__pyx_t_5,&__pyx_t_6,&__pyx_t_7};
        __pyx_t_8 = PyObject_GetIter(__pyx_v_data); if (unlikely(!__pyx_t_8)) __PYX_ERR(4, 710, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_9 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_8);
        for (index=0; index < 7; index++) {
          PyObject* item = __pyx_t_9(__pyx_t_8); if (unlikely(!item)) goto __pyx_L3_unpacking_failed;
          __Pyx_GOTREF(item);
          *(temps[index]) = item;
        }
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 7) < (0)) __PYX_ERR(4, 710, __pyx_L1_error)
        __pyx_t_9 = NULL;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        goto __pyx_L4_unpacking_done;
        __pyx_L3_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_t_9 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        __PYX_ERR(4, 710, __pyx_L1_error)
        __pyx_L4_unpacking_done:;
      }
      if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType))))) __PYX_ERR(4, 710, __pyx_L1_error)
      __pyx_t_10 = __Pyx_PyLong_As_int64_t(__pyx_t_2); if (unlikely((__pyx_t_10 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(4, 710, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_11 = __Pyx_PyLong_As_int64_t(__pyx_t_3); if (unlikely((__pyx_t_11 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(4, 710, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_12 = __Pyx_PyLong_As_int64_t(__pyx_t_4); if (unlikely((__pyx_t_12 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(4, 710, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_v_dtype = ((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_t_1);
      __pyx_t_1 = 0;
      __pyx_v_length = __pyx_t_10;
      __pyx_v_null_count = __pyx_t_11;
      __pyx_v_offset = __pyx_t_12;
      __pyx_v_buffers = __pyx_t_5;
      __pyx_t_5 = 0;
      __pyx_v_children = __pyx_t_6;
      __pyx_t_6 = 0;
      __pyx_v_dictionary = __pyx_t_7;
      __pyx_t_7 = 0;

      /* "pyarrow/array.pxi":712
 *     dtype, length, null_count, offset, buffers, children, dictionary = data
 * 
 *     for i in range(len(buffers)):             # <<<<<<<<<<<<<<
 *         buf = buffers[i]
 *         if buf is None:
*/
      __pyx_t_13 = PyObject_Length(__pyx_v_buffers); if (unlikely(__pyx_t_13 == ((Py_ssize_t)-1))) __PYX_ERR(4, 712, __pyx_L1_error)
      __pyx_t_14 = __pyx_t_13;
      for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_14; __pyx_t_12+=1) {
        __pyx_v_i = __pyx_t_12;

        /* "pyarrow/array.pxi":713
 * 
 *     for i in range(len(buffers)):
 *         buf = buffers[i]             # <<<<<<<<<<<<<<
 *         if buf is None:
 *             c_buffers.push_back(shared_ptr[CBuffer]())
*/
        if (unlikely(__pyx_v_buffers == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
          __PYX_ERR(4, 713, __pyx_L1_error)
        }
        __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_buffers, __pyx_v_i, int64_t, 1, __Pyx_PyLong_From_int64_t, 0, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 713, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Buffer))))) __PYX_ERR(4, 713, __pyx_L1_error)
        __Pyx_XDECREF_SET(__pyx_v_buf, ((struct __pyx_obj_7pyarrow_3lib_Buffer *)__pyx_t_7));
        __pyx_t_7 = 0;

        /* "pyarrow/array.pxi":714
 *     for i in range(len(buffers)):
 *         buf = buffers[i]
 *         if buf is None:             # <<<<<<<<<<<<<<
 *             c_buffers.push_back(shared_ptr[CBuffer]())
 *         else:
*/
        __pyx_t_15 = (((PyObject *)__pyx_v_buf) == Py_None);
        if (__pyx_t_15) {

          /* "pyarrow/array.pxi":715
 *         buf = buffers[i]
 *         if buf is None:
 *             c_buffers.push_back(shared_ptr[CBuffer]())             # <<<<<<<<<<<<<<
 *         else:
 *             c_buffers.push_back(buf.buffer)
*/
          try {
            __pyx_v_c_buffers.push_back(std::shared_ptr< arrow::Buffer> ());
          } catch(...) {
            __Pyx_CppExn2PyErr();
            __PYX_ERR(4, 715, __pyx_L1_error)
          }

          /* "pyarrow/array.pxi":714
 *     for i in range(len(buffers)):
 *         buf = buffers[i]
 *         if buf is None:             # <<<<<<<<<<<<<<
 *             c_buffers.push_back(shared_ptr[CBuffer]())
 *         else:
*/
          goto __pyx_L7;
        }

        /* "pyarrow/array.pxi":717
 *             c_buffers.push_back(shared_ptr[CBuffer]())
 *         else:
 *             c_buffers.push_back(buf.buffer)             # <<<<<<<<<<<<<<
 * 
 *     for i in range(len(children)):
*/
        /*else*/ {
          if (unlikely(((PyObject *)__pyx_v_buf) == Py_None)) {
            PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "buffer");
            __PYX_ERR(4, 717, __pyx_L1_error)
          }
          try {
            __pyx_v_c_buffers.push_back(__pyx_v_buf->buffer);
          } catch(...) {
            __Pyx_CppExn2PyErr();
            __PYX_ERR(4, 717, __pyx_L1_error)
          }
        }
        __pyx_L7:;
      }

      /* "pyarrow/array.pxi":719
 *             c_buffers.push_back(buf.buffer)
 * 
 *     for i in range(len(children)):             # <<<<<<<<<<<<<<
 *         c_children.push_back(_reconstruct_array_data(children[i]))
 * 
*/
      __pyx_t_13 = PyObject_Length(__pyx_v_children); if (unlikely(__pyx_t_13 == ((Py_ssize_t)-1))) __PYX_ERR(4, 719, __pyx_L1_error)
      __pyx_t_14 = __pyx_t_13;
      for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_14; __pyx_t_12+=1) {
        __pyx_v_i = __pyx_t_12;

        /* "pyarrow/array.pxi":720
 * 
 *     for i in range(len(children)):
 *         c_children.push_back(_reconstruct_array_data(children[i]))             # <<<<<<<<<<<<<<
 * 
 *     if dictionary is not None:
*/
        if (unlikely(__pyx_v_children == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
          __PYX_ERR(4, 720, __pyx_L1_error)
        }
        __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_children, __pyx_v_i, int64_t, 1, __Pyx_PyLong_From_int64_t, 0, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 720, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_16 = __pyx_f_7pyarrow_3lib__reconstruct_array_data(__pyx_t_7); if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 720, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        try {
          __pyx_v_c_children.push_back(__pyx_t_16);
        } catch(...) {
          __Pyx_CppExn2PyErr();
          __PYX_ERR(4, 720, __pyx_L1_error)
        }
      }

      /* "pyarrow/array.pxi":722
 *         c_children.push_back(_reconstruct_array_data(children[i]))
 * 
 *     if dictionary is not None:             # <<<<<<<<<<<<<<
 *         c_dictionary = _reconstruct_array_data(dictionary)
 * 
*/
      __pyx_t_15 = (__pyx_v_dictionary != Py_None);
      if (__pyx_t_15) {

        /* "pyarrow/array.pxi":723
 * 
 *     if dictionary is not None:
 *         c_dictionary = _reconstruct_array_data(dictionary)             # <<<<<<<<<<<<<<
 * 
 *     return CArrayData.MakeWithChildrenAndDictionary(
*/
        __pyx_t_16 = __pyx_f_7pyarrow_3lib__reconstruct_array_data(__pyx_v_dictionary); if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 723, __pyx_L1_error)
        __pyx_v_c_dictionary = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_16);

        /* "pyarrow/array.pxi":722
 *         c_children.push_back(_reconstruct_array_data(children[i]))
 * 
 *     if dictionary is not None:             # <<<<<<<<<<<<<<
 *         c_dictionary = _reconstruct_array_data(dictionary)
 * 
*/
      }

      /* "pyarrow/array.pxi":726
 * 
 *     return CArrayData.MakeWithChildrenAndDictionary(
 *         dtype.sp_type,             # <<<<<<<<<<<<<<
 *         length,
 *         c_buffers,
*/
      if (unlikely(((PyObject *)__pyx_v_dtype) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_type");
        __PYX_ERR(4, 726, __pyx_L1_error)
      }

      /* "pyarrow/array.pxi":725
 *         c_dictionary = _reconstruct_array_data(dictionary)
 * 
 *     return CArrayData.MakeWithChildrenAndDictionary(             # <<<<<<<<<<<<<<
 *         dtype.sp_type,
 *         length,
*/
      __pyx_r =  arrow::ArrayData:: Make(__pyx_v_dtype->sp_type, __pyx_v_length, __pyx_v_c_buffers, __pyx_v_c_children, __pyx_v_c_dictionary, __pyx_v_null_count, __pyx_v_offset);
      goto __pyx_L0;

      /* "pyarrow/array.pxi":697
 * 
 * 
 * cdef shared_ptr[CArrayData] _reconstruct_array_data(data):             # <<<<<<<<<<<<<<
 *     """
 *     Reconstruct CArrayData objects from the tuple structure generated
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_8);
      __Pyx_AddTraceback("pyarrow.lib._reconstruct_array_data", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_pretend_to_initialize(&__pyx_r);
      __pyx_L0:;
      __Pyx_XDECREF((PyObject *)__pyx_v_dtype);
      __Pyx_XDECREF((PyObject *)__pyx_v_buf);
      __Pyx_XDECREF(__pyx_v_buffers);
      __Pyx_XDECREF(__pyx_v_children);
      __Pyx_XDECREF(__pyx_v_dictionary);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":735
 * 
 * 
 * def _restore_array(data):             # <<<<<<<<<<<<<<
 *     """
 *     Reconstruct an Array from pickled ArrayData.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_209_restore_array(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_208_restore_array, "_restore_array(data)\n\nReconstruct an Array from pickled ArrayData.");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_209_restore_array = {"_restore_array", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_209_restore_array, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_208_restore_array};
    static PyObject *__pyx_pw_7pyarrow_3lib_209_restore_array(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_data = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("_restore_array (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_data,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(4, 735, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 735, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_restore_array", 0) < (0)) __PYX_ERR(4, 735, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_restore_array", 1, 1, 1, i); __PYX_ERR(4, 735, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 1)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 735, __pyx_L3_error)
        }
        __pyx_v_data = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("_restore_array", 1, 1, 1, __pyx_nargs); __PYX_ERR(4, 735, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib._restore_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_208_restore_array(__pyx_self, __pyx_v_data);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_208_restore_array(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_data) {
      std::shared_ptr< arrow::ArrayData>  __pyx_v_ad;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      std::shared_ptr< arrow::ArrayData>  __pyx_t_1;
      PyObject *__pyx_t_2 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("_restore_array", 0);

      /* "pyarrow/array.pxi":739
 *     Reconstruct an Array from pickled ArrayData.
 *     """
 *     cdef shared_ptr[CArrayData] ad = _reconstruct_array_data(data)             # <<<<<<<<<<<<<<
 *     return pyarrow_wrap_array(MakeArray(ad))
 * 
*/
      __pyx_t_1 = __pyx_f_7pyarrow_3lib__reconstruct_array_data(__pyx_v_data); if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 739, __pyx_L1_error)
      __pyx_v_ad = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_1);

      /* "pyarrow/array.pxi":740
 *     """
 *     cdef shared_ptr[CArrayData] ad = _reconstruct_array_data(data)
 *     return pyarrow_wrap_array(MakeArray(ad))             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = pyarrow_wrap_array(arrow::MakeArray(__pyx_v_ad)); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 740, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":735
 * 
 * 
 * def _restore_array(data):             # <<<<<<<<<<<<<<
 *     """
 *     Reconstruct an Array from pickled ArrayData.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_AddTraceback("pyarrow.lib._restore_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":748
 *     """
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         raise TypeError(f"Do not call {self.__class__.__name__}'s constructor "
 *                         "directly")
*/

    /* Python wrapper */
    static int __pyx_pw_7pyarrow_3lib_15ArrayStatistics_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
    static int __pyx_pw_7pyarrow_3lib_15ArrayStatistics_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      int __pyx_r;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
      #endif
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, __pyx_nargs); return -1; }
      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
      if (unlikely(__pyx_kwds_len < 0)) return -1;
      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__init__", __pyx_kwds); return -1;}
      __pyx_r = __pyx_pf_7pyarrow_3lib_15ArrayStatistics___init__(((struct __pyx_obj_7pyarrow_3lib_ArrayStatistics *)__pyx_v_self));

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

    static int __pyx_pf_7pyarrow_3lib_15ArrayStatistics___init__(struct __pyx_obj_7pyarrow_3lib_ArrayStatistics *__pyx_v_self) {
      int __pyx_r;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      PyObject *__pyx_t_5[3];
      size_t __pyx_t_6;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__init__", 0);

      /* "pyarrow/array.pxi":749
 * 
 *     def __init__(self):
 *         raise TypeError(f"Do not call {self.__class__.__name__}'s constructor "             # <<<<<<<<<<<<<<
 *                         "directly")
 * 
*/
      __pyx_t_2 = NULL;
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 749, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_name_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 749, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 749, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_5[0] = __pyx_mstate_global->__pyx_kp_u_Do_not_call;
      __pyx_t_5[1] = __pyx_t_3;
      __pyx_t_5[2] = __pyx_mstate_global->__pyx_kp_u_s_constructor_directly;
      __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_5, 3, 12 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + 23, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3));
      if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 749, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_6 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4};
        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 749, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __PYX_ERR(4, 749, __pyx_L1_error)

      /* "pyarrow/array.pxi":748
 *     """
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         raise TypeError(f"Do not call {self.__class__.__name__}'s constructor "
 *                         "directly")
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_AddTraceback("pyarrow.lib.ArrayStatistics.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = -1;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":752
 *                         "directly")
 * 
 *     cdef void init(self, const shared_ptr[CArrayStatistics]& sp_statistics):             # <<<<<<<<<<<<<<
 *         self.sp_statistics = sp_statistics
 * 
*/

    static void __pyx_f_7pyarrow_3lib_15ArrayStatistics_init(struct __pyx_obj_7pyarrow_3lib_ArrayStatistics *__pyx_v_self, std::shared_ptr< arrow::ArrayStatistics>  const &__pyx_v_sp_statistics) {
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;

      /* "pyarrow/array.pxi":753
 * 
 *     cdef void init(self, const shared_ptr[CArrayStatistics]& sp_statistics):
 *         self.sp_statistics = sp_statistics             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_statistics");
        __PYX_ERR(4, 753, __pyx_L1_error)
      }
      __pyx_v_self->sp_statistics = __pyx_v_sp_statistics;

      /* "pyarrow/array.pxi":752
 *                         "directly")
 * 
 *     cdef void init(self, const shared_ptr[CArrayStatistics]& sp_statistics):             # <<<<<<<<<<<<<<
 *         self.sp_statistics = sp_statistics
 * 
*/

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_AddTraceback("pyarrow.lib.ArrayStatistics.init", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_L0:;
    }

    /* "pyarrow/array.pxi":755
 *         self.sp_statistics = sp_statistics
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return (f"arrow.ArrayStatistics<null_count={self.null_count}, "
 *                 f"distinct_count={self.distinct_count}, min={self.min}, "
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_15ArrayStatistics_3__repr__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_15ArrayStatistics_3__repr__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_15ArrayStatistics_2__repr__(((struct __pyx_obj_7pyarrow_3lib_ArrayStatistics *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_15ArrayStatistics_2__repr__(struct __pyx_obj_7pyarrow_3lib_ArrayStatistics *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      PyObject *__pyx_t_5 = NULL;
      PyObject *__pyx_t_6 = NULL;
      PyObject *__pyx_t_7 = NULL;
      PyObject *__pyx_t_8[13];
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__repr__", 0);

      /* "pyarrow/array.pxi":756
 * 
 *     def __repr__(self):
 *         return (f"arrow.ArrayStatistics<null_count={self.null_count}, "             # <<<<<<<<<<<<<<
 *                 f"distinct_count={self.distinct_count}, min={self.min}, "
 *                 f"is_min_exact={self.is_min_exact}, max={self.max}, "
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_null_count); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 756, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_PyObject_FormatSimple(__pyx_t_1, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 756, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "pyarrow/array.pxi":757
 *     def __repr__(self):
 *         return (f"arrow.ArrayStatistics<null_count={self.null_count}, "
 *                 f"distinct_count={self.distinct_count}, min={self.min}, "             # <<<<<<<<<<<<<<
 *                 f"is_min_exact={self.is_min_exact}, max={self.max}, "
 *                 f"is_max_exact={self.is_max_exact}>")
*/
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_distinct_count_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 757, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_t_1, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 757, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_min_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 757, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_1, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 757, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "pyarrow/array.pxi":758
 *         return (f"arrow.ArrayStatistics<null_count={self.null_count}, "
 *                 f"distinct_count={self.distinct_count}, min={self.min}, "
 *                 f"is_min_exact={self.is_min_exact}, max={self.max}, "             # <<<<<<<<<<<<<<
 *                 f"is_max_exact={self.is_max_exact}>")
 * 
*/
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_is_min_exact_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 758, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_t_1, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 758, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_max_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 758, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_1, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 758, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "pyarrow/array.pxi":759
 *                 f"distinct_count={self.distinct_count}, min={self.min}, "
 *                 f"is_min_exact={self.is_min_exact}, max={self.max}, "
 *                 f"is_max_exact={self.is_max_exact}>")             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_is_max_exact_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 759, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_t_1, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 759, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_8[0] = __pyx_mstate_global->__pyx_kp_u_arrow_ArrayStatistics_null_count;
      __pyx_t_8[1] = __pyx_t_2;
      __pyx_t_8[2] = __pyx_mstate_global->__pyx_kp_u_distinct_count;
      __pyx_t_8[3] = __pyx_t_3;
      __pyx_t_8[4] = __pyx_mstate_global->__pyx_kp_u_min;
      __pyx_t_8[5] = __pyx_t_4;
      __pyx_t_8[6] = __pyx_mstate_global->__pyx_kp_u_is_min_exact;
      __pyx_t_8[7] = __pyx_t_5;
      __pyx_t_8[8] = __pyx_mstate_global->__pyx_kp_u_max;
      __pyx_t_8[9] = __pyx_t_6;
      __pyx_t_8[10] = __pyx_mstate_global->__pyx_kp_u_is_max_exact;
      __pyx_t_8[11] = __pyx_t_7;
      __pyx_t_8[12] = __pyx_mstate_global->__pyx_kp_u__5;

      /* "pyarrow/array.pxi":756
 * 
 *     def __repr__(self):
 *         return (f"arrow.ArrayStatistics<null_count={self.null_count}, "             # <<<<<<<<<<<<<<
 *                 f"distinct_count={self.distinct_count}, min={self.min}, "
 *                 f"is_min_exact={self.is_min_exact}, max={self.max}, "
*/
      __pyx_t_1 = __Pyx_PyUnicode_Join(__pyx_t_8, 13, 33 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2) + 17 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + 6 * 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + 15 * 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7));
      if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 756, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":755
 *         self.sp_statistics = sp_statistics
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return (f"arrow.ArrayStatistics<null_count={self.null_count}, "
 *                 f"distinct_count={self.distinct_count}, min={self.min}, "
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_7);
      __Pyx_AddTraceback("pyarrow.lib.ArrayStatistics.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":761
 *                 f"is_max_exact={self.is_max_exact}>")
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def null_count(self):
 *         """
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_15ArrayStatistics_10null_count_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_15ArrayStatistics_10null_count_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_15ArrayStatistics_10null_count___get__(((struct __pyx_obj_7pyarrow_3lib_ArrayStatistics *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_15ArrayStatistics_10null_count___get__(struct __pyx_obj_7pyarrow_3lib_ArrayStatistics *__pyx_v_self) {
      std::optional< std::variant<int64_t, double>>  __pyx_v_null_count;
       std::variant<int64_t, double> __pyx_v_value;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      std::optional< std::variant<int64_t, double>>  __pyx_t_1;
      int __pyx_t_2;
      __Pyx_FakeReference< std::variant<int64_t, double>> __pyx_t_3;
      PyObject *__pyx_t_4 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__get__", 0);

      /* "pyarrow/array.pxi":766
 *         The number of nulls.
 *         """
 *         null_count = self.sp_statistics.get().null_count             # <<<<<<<<<<<<<<
 *         # We'll be able to simplify this after
 *         # https://github.com/cython/cython/issues/6692 is solved.
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_statistics");
        __PYX_ERR(4, 766, __pyx_L1_error)
      }
      __pyx_t_1 = __pyx_v_self->sp_statistics.get()->null_count;
      __pyx_v_null_count = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_1);

      /* "pyarrow/array.pxi":769
 *         # We'll be able to simplify this after
 *         # https://github.com/cython/cython/issues/6692 is solved.
 *         if not null_count.has_value():             # <<<<<<<<<<<<<<
 *             return None
 *         value = null_count.value()
*/
      __pyx_t_2 = (!(__pyx_v_null_count.has_value() != 0));
      if (__pyx_t_2) {

        /* "pyarrow/array.pxi":770
 *         # https://github.com/cython/cython/issues/6692 is solved.
 *         if not null_count.has_value():
 *             return None             # <<<<<<<<<<<<<<
 *         value = null_count.value()
 *         if holds_alternative[int64_t](value):
*/
        __Pyx_XDECREF(__pyx_r);
        __pyx_r = Py_None; __Pyx_INCREF(Py_None);
        goto __pyx_L0;

        /* "pyarrow/array.pxi":769
 *         # We'll be able to simplify this after
 *         # https://github.com/cython/cython/issues/6692 is solved.
 *         if not null_count.has_value():             # <<<<<<<<<<<<<<
 *             return None
 *         value = null_count.value()
*/
      }

      /* "pyarrow/array.pxi":771
 *         if not null_count.has_value():
 *             return None
 *         value = null_count.value()             # <<<<<<<<<<<<<<
 *         if holds_alternative[int64_t](value):
 *             return get[int64_t](value)
*/
      try {
        __pyx_t_3 = __pyx_v_null_count.value();
      } catch(...) {
        __Pyx_CppExn2PyErr();
        __PYX_ERR(4, 771, __pyx_L1_error)
      }
      __pyx_v_value = __pyx_t_3;

      /* "pyarrow/array.pxi":772
 *             return None
 *         value = null_count.value()
 *         if holds_alternative[int64_t](value):             # <<<<<<<<<<<<<<
 *             return get[int64_t](value)
 *         else:
*/
      __pyx_t_2 = (std::holds_alternative<int64_t>(__pyx_v_value) != 0);
      if (__pyx_t_2) {

        /* "pyarrow/array.pxi":773
 *         value = null_count.value()
 *         if holds_alternative[int64_t](value):
 *             return get[int64_t](value)             # <<<<<<<<<<<<<<
 *         else:
 *             return get[double](value)
*/
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_4 = __Pyx_PyLong_From_int64_t(std::get<int64_t>(__pyx_v_value)); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 773, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_r = __pyx_t_4;
        __pyx_t_4 = 0;
        goto __pyx_L0;

        /* "pyarrow/array.pxi":772
 *             return None
 *         value = null_count.value()
 *         if holds_alternative[int64_t](value):             # <<<<<<<<<<<<<<
 *             return get[int64_t](value)
 *         else:
*/
      }

      /* "pyarrow/array.pxi":775
 *             return get[int64_t](value)
 *         else:
 *             return get[double](value)             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
      /*else*/ {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_4 = PyFloat_FromDouble(std::get<double>(__pyx_v_value)); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 775, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_r = __pyx_t_4;
        __pyx_t_4 = 0;
        goto __pyx_L0;
      }

      /* "pyarrow/array.pxi":761
 *                 f"is_max_exact={self.is_max_exact}>")
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def null_count(self):
 *         """
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_AddTraceback("pyarrow.lib.ArrayStatistics.null_count.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":777
 *             return get[double](value)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_null_count_exact(self):
 *         """
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_15ArrayStatistics_19is_null_count_exact_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_15ArrayStatistics_19is_null_count_exact_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_15ArrayStatistics_19is_null_count_exact___get__(((struct __pyx_obj_7pyarrow_3lib_ArrayStatistics *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_15ArrayStatistics_19is_null_count_exact___get__(struct __pyx_obj_7pyarrow_3lib_ArrayStatistics *__pyx_v_self) {
      std::optional< std::variant<int64_t, double>>  __pyx_v_null_count;
       std::variant<int64_t, double> __pyx_v_value;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      std::optional< std::variant<int64_t, double>>  __pyx_t_1;
      int __pyx_t_2;
      __Pyx_FakeReference< std::variant<int64_t, double>> __pyx_t_3;
      PyObject *__pyx_t_4 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__get__", 0);

      /* "pyarrow/array.pxi":782
 *         Whether the number of null values is a valid exact value or not.
 *         """
 *         null_count = self.sp_statistics.get().null_count             # <<<<<<<<<<<<<<
 *         if not null_count.has_value():
 *             return False
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_statistics");
        __PYX_ERR(4, 782, __pyx_L1_error)
      }
      __pyx_t_1 = __pyx_v_self->sp_statistics.get()->null_count;
      __pyx_v_null_count = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_1);

      /* "pyarrow/array.pxi":783
 *         """
 *         null_count = self.sp_statistics.get().null_count
 *         if not null_count.has_value():             # <<<<<<<<<<<<<<
 *             return False
 *         value = null_count.value()
*/
      __pyx_t_2 = (!(__pyx_v_null_count.has_value() != 0));
      if (__pyx_t_2) {

        /* "pyarrow/array.pxi":784
 *         null_count = self.sp_statistics.get().null_count
 *         if not null_count.has_value():
 *             return False             # <<<<<<<<<<<<<<
 *         value = null_count.value()
 *         return holds_alternative[int64_t](value)
*/
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(Py_False);
        __pyx_r = Py_False;
        goto __pyx_L0;

        /* "pyarrow/array.pxi":783
 *         """
 *         null_count = self.sp_statistics.get().null_count
 *         if not null_count.has_value():             # <<<<<<<<<<<<<<
 *             return False
 *         value = null_count.value()
*/
      }

      /* "pyarrow/array.pxi":785
 *         if not null_count.has_value():
 *             return False
 *         value = null_count.value()             # <<<<<<<<<<<<<<
 *         return holds_alternative[int64_t](value)
 * 
*/
      try {
        __pyx_t_3 = __pyx_v_null_count.value();
      } catch(...) {
        __Pyx_CppExn2PyErr();
        __PYX_ERR(4, 785, __pyx_L1_error)
      }
      __pyx_v_value = __pyx_t_3;

      /* "pyarrow/array.pxi":786
 *             return False
 *         value = null_count.value()
 *         return holds_alternative[int64_t](value)             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_4 = __Pyx_PyBool_FromLong(std::holds_alternative<int64_t>(__pyx_v_value)); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 786, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":777
 *             return get[double](value)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_null_count_exact(self):
 *         """
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_AddTraceback("pyarrow.lib.ArrayStatistics.is_null_count_exact.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":788
 *         return holds_alternative[int64_t](value)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def distinct_count(self):
 *         """
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_15ArrayStatistics_14distinct_count_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_15ArrayStatistics_14distinct_count_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_15ArrayStatistics_14distinct_count___get__(((struct __pyx_obj_7pyarrow_3lib_ArrayStatistics *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_15ArrayStatistics_14distinct_count___get__(struct __pyx_obj_7pyarrow_3lib_ArrayStatistics *__pyx_v_self) {
      std::optional< std::variant<int64_t, double>>  __pyx_v_distinct_count;
       std::variant<int64_t, double> __pyx_v_value;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      std::optional< std::variant<int64_t, double>>  __pyx_t_1;
      int __pyx_t_2;
      __Pyx_FakeReference< std::variant<int64_t, double>> __pyx_t_3;
      PyObject *__pyx_t_4 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__get__", 0);

      /* "pyarrow/array.pxi":793
 *         The number of distinct values.
 *         """
 *         distinct_count = self.sp_statistics.get().distinct_count             # <<<<<<<<<<<<<<
 *         if not distinct_count.has_value():
 *             return None
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_statistics");
        __PYX_ERR(4, 793, __pyx_L1_error)
      }
      __pyx_t_1 = __pyx_v_self->sp_statistics.get()->distinct_count;
      __pyx_v_distinct_count = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_1);

      /* "pyarrow/array.pxi":794
 *         """
 *         distinct_count = self.sp_statistics.get().distinct_count
 *         if not distinct_count.has_value():             # <<<<<<<<<<<<<<
 *             return None
 *         value = distinct_count.value()
*/
      __pyx_t_2 = (!(__pyx_v_distinct_count.has_value() != 0));
      if (__pyx_t_2) {

        /* "pyarrow/array.pxi":795
 *         distinct_count = self.sp_statistics.get().distinct_count
 *         if not distinct_count.has_value():
 *             return None             # <<<<<<<<<<<<<<
 *         value = distinct_count.value()
 *         if holds_alternative[int64_t](value):
*/
        __Pyx_XDECREF(__pyx_r);
        __pyx_r = Py_None; __Pyx_INCREF(Py_None);
        goto __pyx_L0;

        /* "pyarrow/array.pxi":794
 *         """
 *         distinct_count = self.sp_statistics.get().distinct_count
 *         if not distinct_count.has_value():             # <<<<<<<<<<<<<<
 *             return None
 *         value = distinct_count.value()
*/
      }

      /* "pyarrow/array.pxi":796
 *         if not distinct_count.has_value():
 *             return None
 *         value = distinct_count.value()             # <<<<<<<<<<<<<<
 *         if holds_alternative[int64_t](value):
 *             return get[int64_t](value)
*/
      try {
        __pyx_t_3 = __pyx_v_distinct_count.value();
      } catch(...) {
        __Pyx_CppExn2PyErr();
        __PYX_ERR(4, 796, __pyx_L1_error)
      }
      __pyx_v_value = __pyx_t_3;

      /* "pyarrow/array.pxi":797
 *             return None
 *         value = distinct_count.value()
 *         if holds_alternative[int64_t](value):             # <<<<<<<<<<<<<<
 *             return get[int64_t](value)
 *         else:
*/
      __pyx_t_2 = (std::holds_alternative<int64_t>(__pyx_v_value) != 0);
      if (__pyx_t_2) {

        /* "pyarrow/array.pxi":798
 *         value = distinct_count.value()
 *         if holds_alternative[int64_t](value):
 *             return get[int64_t](value)             # <<<<<<<<<<<<<<
 *         else:
 *             return get[double](value)
*/
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_4 = __Pyx_PyLong_From_int64_t(std::get<int64_t>(__pyx_v_value)); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 798, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_r = __pyx_t_4;
        __pyx_t_4 = 0;
        goto __pyx_L0;

        /* "pyarrow/array.pxi":797
 *             return None
 *         value = distinct_count.value()
 *         if holds_alternative[int64_t](value):             # <<<<<<<<<<<<<<
 *             return get[int64_t](value)
 *         else:
*/
      }

      /* "pyarrow/array.pxi":800
 *             return get[int64_t](value)
 *         else:
 *             return get[double](value)             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
      /*else*/ {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_4 = PyFloat_FromDouble(std::get<double>(__pyx_v_value)); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 800, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_r = __pyx_t_4;
        __pyx_t_4 = 0;
        goto __pyx_L0;
      }

      /* "pyarrow/array.pxi":788
 *         return holds_alternative[int64_t](value)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def distinct_count(self):
 *         """
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_AddTraceback("pyarrow.lib.ArrayStatistics.distinct_count.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":802
 *             return get[double](value)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_distinct_count_exact(self):
 *         """
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_15ArrayStatistics_23is_distinct_count_exact_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_15ArrayStatistics_23is_distinct_count_exact_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_15ArrayStatistics_23is_distinct_count_exact___get__(((struct __pyx_obj_7pyarrow_3lib_ArrayStatistics *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_15ArrayStatistics_23is_distinct_count_exact___get__(struct __pyx_obj_7pyarrow_3lib_ArrayStatistics *__pyx_v_self) {
      std::optional< std::variant<int64_t, double>>  __pyx_v_distinct_count;
       std::variant<int64_t, double> __pyx_v_value;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      std::optional< std::variant<int64_t, double>>  __pyx_t_1;
      int __pyx_t_2;
      __Pyx_FakeReference< std::variant<int64_t, double>> __pyx_t_3;
      PyObject *__pyx_t_4 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__get__", 0);

      /* "pyarrow/array.pxi":807
 *         Whether the number of distinct values is a valid exact value or not.
 *         """
 *         distinct_count = self.sp_statistics.get().distinct_count             # <<<<<<<<<<<<<<
 *         if not distinct_count.has_value():
 *             return False
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_statistics");
        __PYX_ERR(4, 807, __pyx_L1_error)
      }
      __pyx_t_1 = __pyx_v_self->sp_statistics.get()->distinct_count;
      __pyx_v_distinct_count = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_1);

      /* "pyarrow/array.pxi":808
 *         """
 *         distinct_count = self.sp_statistics.get().distinct_count
 *         if not distinct_count.has_value():             # <<<<<<<<<<<<<<
 *             return False
 *         value = distinct_count.value()
*/
      __pyx_t_2 = (!(__pyx_v_distinct_count.has_value() != 0));
      if (__pyx_t_2) {

        /* "pyarrow/array.pxi":809
 *         distinct_count = self.sp_statistics.get().distinct_count
 *         if not distinct_count.has_value():
 *             return False             # <<<<<<<<<<<<<<
 *         value = distinct_count.value()
 *         return holds_alternative[int64_t](value)
*/
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(Py_False);
        __pyx_r = Py_False;
        goto __pyx_L0;

        /* "pyarrow/array.pxi":808
 *         """
 *         distinct_count = self.sp_statistics.get().distinct_count
 *         if not distinct_count.has_value():             # <<<<<<<<<<<<<<
 *             return False
 *         value = distinct_count.value()
*/
      }

      /* "pyarrow/array.pxi":810
 *         if not distinct_count.has_value():
 *             return False
 *         value = distinct_count.value()             # <<<<<<<<<<<<<<
 *         return holds_alternative[int64_t](value)
 * 
*/
      try {
        __pyx_t_3 = __pyx_v_distinct_count.value();
      } catch(...) {
        __Pyx_CppExn2PyErr();
        __PYX_ERR(4, 810, __pyx_L1_error)
      }
      __pyx_v_value = __pyx_t_3;

      /* "pyarrow/array.pxi":811
 *             return False
 *         value = distinct_count.value()
 *         return holds_alternative[int64_t](value)             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_4 = __Pyx_PyBool_FromLong(std::holds_alternative<int64_t>(__pyx_v_value)); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 811, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":802
 *             return get[double](value)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_distinct_count_exact(self):
 *         """
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_AddTraceback("pyarrow.lib.ArrayStatistics.is_distinct_count_exact.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":813
 *         return holds_alternative[int64_t](value)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def min(self):
 *         """
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_15ArrayStatistics_3min_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_15ArrayStatistics_3min_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_15ArrayStatistics_3min___get__(((struct __pyx_obj_7pyarrow_3lib_ArrayStatistics *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_15ArrayStatistics_3min___get__(struct __pyx_obj_7pyarrow_3lib_ArrayStatistics *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__get__", 0);

      /* "pyarrow/array.pxi":818
 *         The minimum value.
 *         """
 *         return self._get_value(self.sp_statistics.get().min)             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
      __Pyx_XDECREF(__pyx_r);
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_get_value");
        __PYX_ERR(4, 818, __pyx_L1_error)
      }
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_statistics");
        __PYX_ERR(4, 818, __pyx_L1_error)
      }
      __pyx_t_1 = ((struct __pyx_vtabstruct_7pyarrow_3lib_ArrayStatistics *)__pyx_v_self->__pyx_vtab)->_get_value(__pyx_v_self, __pyx_v_self->sp_statistics.get()->min); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 818, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":813
 *         return holds_alternative[int64_t](value)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def min(self):
 *         """
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("pyarrow.lib.ArrayStatistics.min.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":820
 *         return self._get_value(self.sp_statistics.get().min)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_min_exact(self):
 *         """
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_15ArrayStatistics_12is_min_exact_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_15ArrayStatistics_12is_min_exact_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_15ArrayStatistics_12is_min_exact___get__(((struct __pyx_obj_7pyarrow_3lib_ArrayStatistics *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_15ArrayStatistics_12is_min_exact___get__(struct __pyx_obj_7pyarrow_3lib_ArrayStatistics *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__get__", 0);

      /* "pyarrow/array.pxi":825
 *         Whether the minimum value is an exact value or not.
 *         """
 *         return self.sp_statistics.get().is_min_exact             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
      __Pyx_XDECREF(__pyx_r);
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_statistics");
        __PYX_ERR(4, 825, __pyx_L1_error)
      }
      __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->sp_statistics.get()->is_min_exact); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 825, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":820
 *         return self._get_value(self.sp_statistics.get().min)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_min_exact(self):
 *         """
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("pyarrow.lib.ArrayStatistics.is_min_exact.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":827
 *         return self.sp_statistics.get().is_min_exact
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def max(self):
 *         """
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_15ArrayStatistics_3max_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_15ArrayStatistics_3max_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_15ArrayStatistics_3max___get__(((struct __pyx_obj_7pyarrow_3lib_ArrayStatistics *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_15ArrayStatistics_3max___get__(struct __pyx_obj_7pyarrow_3lib_ArrayStatistics *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__get__", 0);

      /* "pyarrow/array.pxi":832
 *         The maximum value.
 *         """
 *         return self._get_value(self.sp_statistics.get().max)             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
      __Pyx_XDECREF(__pyx_r);
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_get_value");
        __PYX_ERR(4, 832, __pyx_L1_error)
      }
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_statistics");
        __PYX_ERR(4, 832, __pyx_L1_error)
      }
      __pyx_t_1 = ((struct __pyx_vtabstruct_7pyarrow_3lib_ArrayStatistics *)__pyx_v_self->__pyx_vtab)->_get_value(__pyx_v_self, __pyx_v_self->sp_statistics.get()->max); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 832, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":827
 *         return self.sp_statistics.get().is_min_exact
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def max(self):
 *         """
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("pyarrow.lib.ArrayStatistics.max.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":834
 *         return self._get_value(self.sp_statistics.get().max)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_max_exact(self):
 *         """
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_15ArrayStatistics_12is_max_exact_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_15ArrayStatistics_12is_max_exact_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_15ArrayStatistics_12is_max_exact___get__(((struct __pyx_obj_7pyarrow_3lib_ArrayStatistics *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_15ArrayStatistics_12is_max_exact___get__(struct __pyx_obj_7pyarrow_3lib_ArrayStatistics *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__get__", 0);

      /* "pyarrow/array.pxi":839
 *         Whether the maximum value is an exact value or not.
 *         """
 *         return self.sp_statistics.get().is_max_exact             # <<<<<<<<<<<<<<
 * 
 *     cdef _get_value(self, const optional[CArrayStatisticsValueType]& optional_value):
*/
      __Pyx_XDECREF(__pyx_r);
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_statistics");
        __PYX_ERR(4, 839, __pyx_L1_error)
      }
      __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->sp_statistics.get()->is_max_exact); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 839, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":834
 *         return self._get_value(self.sp_statistics.get().max)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_max_exact(self):
 *         """
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("pyarrow.lib.ArrayStatistics.is_max_exact.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":841
 *         return self.sp_statistics.get().is_max_exact
 * 
 *     cdef _get_value(self, const optional[CArrayStatisticsValueType]& optional_value):             # <<<<<<<<<<<<<<
 *         """
 *         Get a raw value from
*/

    static PyObject *__pyx_f_7pyarrow_3lib_15ArrayStatistics__get_value(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_ArrayStatistics *__pyx_v_self, std::optional< std::variant<bool, int64_t, uint64_t, double, std::string>>  const &__pyx_v_optional_value) {
       std::variant<bool, int64_t, uint64_t, double, std::string> __pyx_v_value;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      int __pyx_t_1;
      __Pyx_FakeReference< std::variant<bool, int64_t, uint64_t, double, std::string>> __pyx_t_2;
      PyObject *__pyx_t_3 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("_get_value", 0);

      /* "pyarrow/array.pxi":849
 *         std::variant<bool, int64_t, uint64_t, double, std::string>.
 *         """
 *         if not optional_value.has_value():             # <<<<<<<<<<<<<<
 *             return None
 *         value = optional_value.value()
*/
      __pyx_t_1 = (!(__pyx_v_optional_value.has_value() != 0));
      if (__pyx_t_1) {

        /* "pyarrow/array.pxi":850
 *         """
 *         if not optional_value.has_value():
 *             return None             # <<<<<<<<<<<<<<
 *         value = optional_value.value()
 *         if holds_alternative[c_bool](value):
*/
        __Pyx_XDECREF(__pyx_r);
        __pyx_r = Py_None; __Pyx_INCREF(Py_None);
        goto __pyx_L0;

        /* "pyarrow/array.pxi":849
 *         std::variant<bool, int64_t, uint64_t, double, std::string>.
 *         """
 *         if not optional_value.has_value():             # <<<<<<<<<<<<<<
 *             return None
 *         value = optional_value.value()
*/
      }

      /* "pyarrow/array.pxi":851
 *         if not optional_value.has_value():
 *             return None
 *         value = optional_value.value()             # <<<<<<<<<<<<<<
 *         if holds_alternative[c_bool](value):
 *             return get[c_bool](value)
*/
      try {
        __pyx_t_2 = __pyx_v_optional_value.value();
      } catch(...) {
        __Pyx_CppExn2PyErr();
        __PYX_ERR(4, 851, __pyx_L1_error)
      }
      __pyx_v_value = __pyx_t_2;

      /* "pyarrow/array.pxi":852
 *             return None
 *         value = optional_value.value()
 *         if holds_alternative[c_bool](value):             # <<<<<<<<<<<<<<
 *             return get[c_bool](value)
 *         elif holds_alternative[int64_t](value):
*/
      __pyx_t_1 = (std::holds_alternative<bool>(__pyx_v_value) != 0);
      if (__pyx_t_1) {

        /* "pyarrow/array.pxi":853
 *         value = optional_value.value()
 *         if holds_alternative[c_bool](value):
 *             return get[c_bool](value)             # <<<<<<<<<<<<<<
 *         elif holds_alternative[int64_t](value):
 *             return get[int64_t](value)
*/
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(std::get<bool>(__pyx_v_value)); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 853, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_r = __pyx_t_3;
        __pyx_t_3 = 0;
        goto __pyx_L0;

        /* "pyarrow/array.pxi":852
 *             return None
 *         value = optional_value.value()
 *         if holds_alternative[c_bool](value):             # <<<<<<<<<<<<<<
 *             return get[c_bool](value)
 *         elif holds_alternative[int64_t](value):
*/
      }

      /* "pyarrow/array.pxi":854
 *         if holds_alternative[c_bool](value):
 *             return get[c_bool](value)
 *         elif holds_alternative[int64_t](value):             # <<<<<<<<<<<<<<
 *             return get[int64_t](value)
 *         elif holds_alternative[uint64_t](value):
*/
      __pyx_t_1 = (std::holds_alternative<int64_t>(__pyx_v_value) != 0);
      if (__pyx_t_1) {

        /* "pyarrow/array.pxi":855
 *             return get[c_bool](value)
 *         elif holds_alternative[int64_t](value):
 *             return get[int64_t](value)             # <<<<<<<<<<<<<<
 *         elif holds_alternative[uint64_t](value):
 *             return get[uint64_t](value)
*/
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyLong_From_int64_t(std::get<int64_t>(__pyx_v_value)); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 855, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_r = __pyx_t_3;
        __pyx_t_3 = 0;
        goto __pyx_L0;

        /* "pyarrow/array.pxi":854
 *         if holds_alternative[c_bool](value):
 *             return get[c_bool](value)
 *         elif holds_alternative[int64_t](value):             # <<<<<<<<<<<<<<
 *             return get[int64_t](value)
 *         elif holds_alternative[uint64_t](value):
*/
      }

      /* "pyarrow/array.pxi":856
 *         elif holds_alternative[int64_t](value):
 *             return get[int64_t](value)
 *         elif holds_alternative[uint64_t](value):             # <<<<<<<<<<<<<<
 *             return get[uint64_t](value)
 *         elif holds_alternative[double](value):
*/
      __pyx_t_1 = (std::holds_alternative<uint64_t>(__pyx_v_value) != 0);
      if (__pyx_t_1) {

        /* "pyarrow/array.pxi":857
 *             return get[int64_t](value)
 *         elif holds_alternative[uint64_t](value):
 *             return get[uint64_t](value)             # <<<<<<<<<<<<<<
 *         elif holds_alternative[double](value):
 *             return get[double](value)
*/
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyLong_From_uint64_t(std::get<uint64_t>(__pyx_v_value)); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 857, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_r = __pyx_t_3;
        __pyx_t_3 = 0;
        goto __pyx_L0;

        /* "pyarrow/array.pxi":856
 *         elif holds_alternative[int64_t](value):
 *             return get[int64_t](value)
 *         elif holds_alternative[uint64_t](value):             # <<<<<<<<<<<<<<
 *             return get[uint64_t](value)
 *         elif holds_alternative[double](value):
*/
      }

      /* "pyarrow/array.pxi":858
 *         elif holds_alternative[uint64_t](value):
 *             return get[uint64_t](value)
 *         elif holds_alternative[double](value):             # <<<<<<<<<<<<<<
 *             return get[double](value)
 *         else:
*/
      __pyx_t_1 = (std::holds_alternative<double>(__pyx_v_value) != 0);
      if (__pyx_t_1) {

        /* "pyarrow/array.pxi":859
 *             return get[uint64_t](value)
 *         elif holds_alternative[double](value):
 *             return get[double](value)             # <<<<<<<<<<<<<<
 *         else:
 *             return get[c_string](value)
*/
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = PyFloat_FromDouble(std::get<double>(__pyx_v_value)); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 859, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_r = __pyx_t_3;
        __pyx_t_3 = 0;
        goto __pyx_L0;

        /* "pyarrow/array.pxi":858
 *         elif holds_alternative[uint64_t](value):
 *             return get[uint64_t](value)
 *         elif holds_alternative[double](value):             # <<<<<<<<<<<<<<
 *             return get[double](value)
 *         else:
*/
      }

      /* "pyarrow/array.pxi":861
 *             return get[double](value)
 *         else:
 *             return get[c_string](value)             # <<<<<<<<<<<<<<
 * 
 * 
*/
      /*else*/ {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __pyx_convert_PyBytes_string_to_py_6libcpp_6string_std__in_string(std::get<std::string>(__pyx_v_value)); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 861, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_r = __pyx_t_3;
        __pyx_t_3 = 0;
        goto __pyx_L0;
      }

      /* "pyarrow/array.pxi":841
 *         return self.sp_statistics.get().is_max_exact
 * 
 *     cdef _get_value(self, const optional[CArrayStatisticsValueType]& optional_value):             # <<<<<<<<<<<<<<
 *         """
 *         Get a raw value from
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_AddTraceback("pyarrow.lib.ArrayStatistics._get_value", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = 0;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.sp_statistics cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_15ArrayStatistics_5__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_15ArrayStatistics_4__reduce_cython__, "ArrayStatistics.__reduce_cython__(self)");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_15ArrayStatistics_5__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15ArrayStatistics_5__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15ArrayStatistics_4__reduce_cython__};
    static PyObject *__pyx_pw_7pyarrow_3lib_15ArrayStatistics_5__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; }
      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
      if (unlikely(__pyx_kwds_len < 0)) return NULL;
      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;}
      __pyx_r = __pyx_pf_7pyarrow_3lib_15ArrayStatistics_4__reduce_cython__(((struct __pyx_obj_7pyarrow_3lib_ArrayStatistics *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_15ArrayStatistics_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_ArrayStatistics *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__reduce_cython__", 0);

      /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "self.sp_statistics cannot be converted to a Python object for pickling"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "self.sp_statistics cannot be converted to a Python object for pickling"
*/
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_self_sp_statistics_cannot_be_con, 0, 0);
      __PYX_ERR(7, 2, __pyx_L1_error)

      /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.sp_statistics cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_AddTraceback("pyarrow.lib.ArrayStatistics.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "self.sp_statistics cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.sp_statistics cannot be converted to a Python object for pickling"
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_15ArrayStatistics_7__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_15ArrayStatistics_6__setstate_cython__, "ArrayStatistics.__setstate_cython__(self, __pyx_state)");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_15ArrayStatistics_7__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15ArrayStatistics_7__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15ArrayStatistics_6__setstate_cython__};
    static PyObject *__pyx_pw_7pyarrow_3lib_15ArrayStatistics_7__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(7, 3, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(7, 3, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(7, 3, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(7, 3, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 1)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(7, 3, __pyx_L3_error)
        }
        __pyx_v___pyx_state = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(7, 3, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.ArrayStatistics.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_15ArrayStatistics_6__setstate_cython__(((struct __pyx_obj_7pyarrow_3lib_ArrayStatistics *)__pyx_v_self), __pyx_v___pyx_state);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

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

      /* "(tree fragment)":4
 *     raise TypeError, "self.sp_statistics cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "self.sp_statistics cannot be converted to a Python object for pickling"             # <<<<<<<<<<<<<<
*/
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_self_sp_statistics_cannot_be_con, 0, 0);
      __PYX_ERR(7, 4, __pyx_L1_error)

      /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "self.sp_statistics cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.sp_statistics cannot be converted to a Python object for pickling"
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_AddTraceback("pyarrow.lib.ArrayStatistics.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":866
 * cdef class _PandasConvertible(_Weakrefable):
 * 
 *     def to_pandas(             # <<<<<<<<<<<<<<
 *             self,
 *             memory_pool=None,
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_18_PandasConvertible_1to_pandas(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_18_PandasConvertible_to_pandas, "_PandasConvertible.to_pandas(self, memory_pool=None, categories=None, bool strings_to_categorical=False, bool zero_copy_only=False, bool integer_object_nulls=False, bool date_as_object=True, bool timestamp_as_object=False, bool use_threads=True, bool deduplicate_objects=True, bool ignore_metadata=False, bool safe=True, bool split_blocks=False, bool self_destruct=False, str maps_as_pydicts=None, types_mapper=None, bool coerce_temporal_nanoseconds=False)\n\nConvert to a pandas-compatible NumPy array or DataFrame, as appropriate\n\nParameters\n----------\nmemory_pool : MemoryPool, default None\n    Arrow MemoryPool to use for allocations. Uses the default memory\n    pool if not passed.\ncategories : list, default empty\n    List of fields that should be returned as pandas.Categorical. Only\n    applies to table-like data structures.\nstrings_to_categorical : bool, default False\n    Encode string (UTF8) and binary types to pandas.Categorical.\nzero_copy_only : bool, default False\n    Raise an ArrowException if this function call would require copying\n    the underlying data.\ninteger_object_nulls : bool, default False\n    Cast integers with nulls to objects\ndate_as_object : bool, default True\n    Cast dates to objects. If False, convert to datetime64 dtype with\n    the equivalent time unit (if supported). Note: in pandas version\n    < 2.0, only datetime64[ns] conversion is supported.\ntimestamp_as_object : bool, default False\n    Cast non-nanosecond timestamps (np.datetime64) to objects. This is\n    useful in pandas version 1.x if you have timestamps that don't fit\n    in the normal date range of nanosecond timestamps (1678 CE-2262 CE).\n    Non-nanosecond timestamps are supported in pandas version 2.0.\n    If False, all timestamps are converted to datetime64 dtype.\nuse_threads : bool, default True\n    Whether to parallelize the conversion using multiple threads.\ndeduplicate_objects : bool, default True\n    Do not create multiple copies Python objects w""hen created, to save\n    on memory use. Conversion will be slower.\nignore_metadata : bool, default False\n    If True, do not use the 'pandas' metadata to reconstruct the\n    DataFrame index, if present\nsafe : bool, default True\n    For certain data types, a cast is needed in order to store the\n    data in a pandas DataFrame or Series (e.g. timestamps are always\n    stored as nanoseconds in pandas). This option controls whether it\n    is a safe cast or not.\nsplit_blocks : bool, default False\n    If True, generate one internal \"block\" for each column when\n    creating a pandas.DataFrame from a RecordBatch or Table. While this\n    can temporarily reduce memory note that various pandas operations\n    can trigger \"consolidation\" which may balloon memory use.\nself_destruct : bool, default False\n    EXPERIMENTAL: If True, attempt to deallocate the originating Arrow\n    memory while converting the Arrow object to pandas. If you use the\n    object after calling to_pandas with this option it will crash your\n    program.\n\n    Note that you may not see always memory usage improvements. For\n    example, if multiple columns share an underlying allocation,\n    memory can't be freed until all columns are converted.\nmaps_as_pydicts : str, optional, default `None`\n    Valid values are `None`, 'lossy', or 'strict'.\n    The default behavior (`None`), is to convert Arrow Map arrays to\n    Python association lists (list-of-tuples) in the same order as the\n    Arrow Map, as in [(key1, value1), (key2, value2), ...].\n\n    If 'lossy' or 'strict', convert Arrow Map arrays to native Python dicts.\n    This can change the ordering of (key, value) pairs, and will\n    deduplicate multiple keys, resulting in a possible loss of data.\n\n    If 'lossy', this key deduplication results in a warning printed\n    when detected. If 'strict', this instead results in an exception\n    being raised when detected.\ntypes_mapper : function, default None\n    A function mappi""ng a pyarrow DataType to a pandas ExtensionDtype.\n    This can be used to override the default pandas type for conversion\n    of built-in pyarrow types or in absence of pandas_metadata in the\n    Table schema. The function receives a pyarrow DataType and is\n    expected to return a pandas ExtensionDtype or ``None`` if the\n    default conversion should be used for that type. If you have\n    a dictionary mapping, you can pass ``dict.get`` as function.\ncoerce_temporal_nanoseconds : bool, default False\n    Only applicable to pandas version >= 2.0.\n    A legacy option to coerce date32, date64, duration, and timestamp\n    time units to nanoseconds when converting to pandas. This is the\n    default behavior in pandas version 1.x. Set this option to True if\n    you'd like to use this coercion when using pandas version >= 2.0\n    for backwards compatibility (not recommended otherwise).\n\nReturns\n-------\npandas.Series or pandas.DataFrame depending on type of object\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> import pandas as pd\n\nConvert a Table to pandas DataFrame:\n\n>>> table = pa.table([\n...    pa.array([2, 4, 5, 100]),\n...    pa.array([\"Flamingo\", \"Horse\", \"Brittle stars\", \"Centipede\"])\n...    ], names=['n_legs', 'animals'])\n>>> table.to_pandas()\n   n_legs        animals\n0       2       Flamingo\n1       4          Horse\n2       5  Brittle stars\n3     100      Centipede\n>>> isinstance(table.to_pandas(), pd.DataFrame)\nTrue\n\nConvert a RecordBatch to pandas DataFrame:\n\n>>> import pyarrow as pa\n>>> n_legs = pa.array([2, 4, 5, 100])\n>>> animals = pa.array([\"Flamingo\", \"Horse\", \"Brittle stars\", \"Centipede\"])\n>>> batch = pa.record_batch([n_legs, animals],\n...                         names=[\"n_legs\", \"animals\"])\n>>> batch\npyarrow.RecordBatch\nn_legs: int64\nanimals: string\n----\nn_legs: [2,4,5,100]\nanimals: [\"Flamingo\",\"Horse\",\"Brittle stars\",\"Centipede\"]\n>>> batch.to_pandas()\n   n_legs        animals""\n0       2       Flamingo\n1       4          Horse\n2       5  Brittle stars\n3     100      Centipede\n>>> isinstance(batch.to_pandas(), pd.DataFrame)\nTrue\n\nConvert a Chunked Array to pandas Series:\n\n>>> import pyarrow as pa\n>>> n_legs = pa.chunked_array([[2, 2, 4], [4, 5, 100]])\n>>> n_legs.to_pandas()\n0      2\n1      2\n2      4\n3      4\n4      5\n5    100\ndtype: int64\n>>> isinstance(n_legs.to_pandas(), pd.Series)\nTrue");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_18_PandasConvertible_1to_pandas = {"to_pandas", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_18_PandasConvertible_1to_pandas, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_18_PandasConvertible_to_pandas};
    static PyObject *__pyx_pw_7pyarrow_3lib_18_PandasConvertible_1to_pandas(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_memory_pool = 0;
      PyObject *__pyx_v_categories = 0;
      int __pyx_v_strings_to_categorical;
      int __pyx_v_zero_copy_only;
      int __pyx_v_integer_object_nulls;
      int __pyx_v_date_as_object;
      int __pyx_v_timestamp_as_object;
      int __pyx_v_use_threads;
      int __pyx_v_deduplicate_objects;
      int __pyx_v_ignore_metadata;
      int __pyx_v_safe;
      int __pyx_v_split_blocks;
      int __pyx_v_self_destruct;
      PyObject *__pyx_v_maps_as_pydicts = 0;
      PyObject *__pyx_v_types_mapper = 0;
      int __pyx_v_coerce_temporal_nanoseconds;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[16] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("to_pandas (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_memory_pool,&__pyx_mstate_global->__pyx_n_u_categories,&__pyx_mstate_global->__pyx_n_u_strings_to_categorical,&__pyx_mstate_global->__pyx_n_u_zero_copy_only,&__pyx_mstate_global->__pyx_n_u_integer_object_nulls,&__pyx_mstate_global->__pyx_n_u_date_as_object,&__pyx_mstate_global->__pyx_n_u_timestamp_as_object,&__pyx_mstate_global->__pyx_n_u_use_threads,&__pyx_mstate_global->__pyx_n_u_deduplicate_objects,&__pyx_mstate_global->__pyx_n_u_ignore_metadata,&__pyx_mstate_global->__pyx_n_u_safe,&__pyx_mstate_global->__pyx_n_u_split_blocks,&__pyx_mstate_global->__pyx_n_u_self_destruct,&__pyx_mstate_global->__pyx_n_u_maps_as_pydicts,&__pyx_mstate_global->__pyx_n_u_types_mapper,&__pyx_mstate_global->__pyx_n_u_coerce_temporal_nanoseconds,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(4, 866, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case 16:
            values[15] = __Pyx_ArgRef_FASTCALL(__pyx_args, 15);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[15])) __PYX_ERR(4, 866, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case 15:
            values[14] = __Pyx_ArgRef_FASTCALL(__pyx_args, 14);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[14])) __PYX_ERR(4, 866, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case 14:
            values[13] = __Pyx_ArgRef_FASTCALL(__pyx_args, 13);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[13])) __PYX_ERR(4, 866, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case 13:
            values[12] = __Pyx_ArgRef_FASTCALL(__pyx_args, 12);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[12])) __PYX_ERR(4, 866, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case 12:
            values[11] = __Pyx_ArgRef_FASTCALL(__pyx_args, 11);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[11])) __PYX_ERR(4, 866, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case 11:
            values[10] = __Pyx_ArgRef_FASTCALL(__pyx_args, 10);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[10])) __PYX_ERR(4, 866, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case 10:
            values[9] = __Pyx_ArgRef_FASTCALL(__pyx_args, 9);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[9])) __PYX_ERR(4, 866, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  9:
            values[8] = __Pyx_ArgRef_FASTCALL(__pyx_args, 8);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(4, 866, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  8:
            values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(4, 866, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  7:
            values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(4, 866, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  6:
            values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(4, 866, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  5:
            values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(4, 866, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  4:
            values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(4, 866, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  3:
            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(4, 866, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(4, 866, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 866, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "to_pandas", 0) < (0)) __PYX_ERR(4, 866, __pyx_L3_error)

          /* "pyarrow/array.pxi":868
 *     def to_pandas(
 *             self,
 *             memory_pool=None,             # <<<<<<<<<<<<<<
 *             categories=None,
 *             bint strings_to_categorical=False,
*/
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));

          /* "pyarrow/array.pxi":869
 *             self,
 *             memory_pool=None,
 *             categories=None,             # <<<<<<<<<<<<<<
 *             bint strings_to_categorical=False,
 *             bint zero_copy_only=False,
*/
          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));

          /* "pyarrow/array.pxi":881
 *             bint split_blocks=False,
 *             bint self_destruct=False,
 *             str maps_as_pydicts=None,             # <<<<<<<<<<<<<<
 *             types_mapper=None,
 *             bint coerce_temporal_nanoseconds=False
*/
          if (!values[13]) values[13] = __Pyx_NewRef(((PyObject*)Py_None));

          /* "pyarrow/array.pxi":882
 *             bint self_destruct=False,
 *             str maps_as_pydicts=None,
 *             types_mapper=None,             # <<<<<<<<<<<<<<
 *             bint coerce_temporal_nanoseconds=False
 *     ):
*/
          if (!values[14]) values[14] = __Pyx_NewRef(((PyObject *)Py_None));
        } else {
          switch (__pyx_nargs) {
            case 16:
            values[15] = __Pyx_ArgRef_FASTCALL(__pyx_args, 15);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[15])) __PYX_ERR(4, 866, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case 15:
            values[14] = __Pyx_ArgRef_FASTCALL(__pyx_args, 14);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[14])) __PYX_ERR(4, 866, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case 14:
            values[13] = __Pyx_ArgRef_FASTCALL(__pyx_args, 13);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[13])) __PYX_ERR(4, 866, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case 13:
            values[12] = __Pyx_ArgRef_FASTCALL(__pyx_args, 12);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[12])) __PYX_ERR(4, 866, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case 12:
            values[11] = __Pyx_ArgRef_FASTCALL(__pyx_args, 11);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[11])) __PYX_ERR(4, 866, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case 11:
            values[10] = __Pyx_ArgRef_FASTCALL(__pyx_args, 10);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[10])) __PYX_ERR(4, 866, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case 10:
            values[9] = __Pyx_ArgRef_FASTCALL(__pyx_args, 9);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[9])) __PYX_ERR(4, 866, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  9:
            values[8] = __Pyx_ArgRef_FASTCALL(__pyx_args, 8);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(4, 866, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  8:
            values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(4, 866, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  7:
            values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(4, 866, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  6:
            values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(4, 866, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  5:
            values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(4, 866, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  4:
            values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(4, 866, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  3:
            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(4, 866, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(4, 866, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 866, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }

          /* "pyarrow/array.pxi":868
 *     def to_pandas(
 *             self,
 *             memory_pool=None,             # <<<<<<<<<<<<<<
 *             categories=None,
 *             bint strings_to_categorical=False,
*/
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));

          /* "pyarrow/array.pxi":869
 *             self,
 *             memory_pool=None,
 *             categories=None,             # <<<<<<<<<<<<<<
 *             bint strings_to_categorical=False,
 *             bint zero_copy_only=False,
*/
          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));

          /* "pyarrow/array.pxi":881
 *             bint split_blocks=False,
 *             bint self_destruct=False,
 *             str maps_as_pydicts=None,             # <<<<<<<<<<<<<<
 *             types_mapper=None,
 *             bint coerce_temporal_nanoseconds=False
*/
          if (!values[13]) values[13] = __Pyx_NewRef(((PyObject*)Py_None));

          /* "pyarrow/array.pxi":882
 *             bint self_destruct=False,
 *             str maps_as_pydicts=None,
 *             types_mapper=None,             # <<<<<<<<<<<<<<
 *             bint coerce_temporal_nanoseconds=False
 *     ):
*/
          if (!values[14]) values[14] = __Pyx_NewRef(((PyObject *)Py_None));
        }
        __pyx_v_memory_pool = values[0];
        __pyx_v_categories = values[1];
        if (values[2]) {
          __pyx_v_strings_to_categorical = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_strings_to_categorical == (int)-1) && PyErr_Occurred())) __PYX_ERR(4, 870, __pyx_L3_error)
        } else {

          /* "pyarrow/array.pxi":870
 *             memory_pool=None,
 *             categories=None,
 *             bint strings_to_categorical=False,             # <<<<<<<<<<<<<<
 *             bint zero_copy_only=False,
 *             bint integer_object_nulls=False,
*/
          __pyx_v_strings_to_categorical = ((int)0);
        }
        if (values[3]) {
          __pyx_v_zero_copy_only = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_zero_copy_only == (int)-1) && PyErr_Occurred())) __PYX_ERR(4, 871, __pyx_L3_error)
        } else {

          /* "pyarrow/array.pxi":871
 *             categories=None,
 *             bint strings_to_categorical=False,
 *             bint zero_copy_only=False,             # <<<<<<<<<<<<<<
 *             bint integer_object_nulls=False,
 *             bint date_as_object=True,
*/
          __pyx_v_zero_copy_only = ((int)0);
        }
        if (values[4]) {
          __pyx_v_integer_object_nulls = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_integer_object_nulls == (int)-1) && PyErr_Occurred())) __PYX_ERR(4, 872, __pyx_L3_error)
        } else {

          /* "pyarrow/array.pxi":872
 *             bint strings_to_categorical=False,
 *             bint zero_copy_only=False,
 *             bint integer_object_nulls=False,             # <<<<<<<<<<<<<<
 *             bint date_as_object=True,
 *             bint timestamp_as_object=False,
*/
          __pyx_v_integer_object_nulls = ((int)0);
        }
        if (values[5]) {
          __pyx_v_date_as_object = __Pyx_PyObject_IsTrue(values[5]); if (unlikely((__pyx_v_date_as_object == (int)-1) && PyErr_Occurred())) __PYX_ERR(4, 873, __pyx_L3_error)
        } else {

          /* "pyarrow/array.pxi":873
 *             bint zero_copy_only=False,
 *             bint integer_object_nulls=False,
 *             bint date_as_object=True,             # <<<<<<<<<<<<<<
 *             bint timestamp_as_object=False,
 *             bint use_threads=True,
*/
          __pyx_v_date_as_object = ((int)1);
        }
        if (values[6]) {
          __pyx_v_timestamp_as_object = __Pyx_PyObject_IsTrue(values[6]); if (unlikely((__pyx_v_timestamp_as_object == (int)-1) && PyErr_Occurred())) __PYX_ERR(4, 874, __pyx_L3_error)
        } else {

          /* "pyarrow/array.pxi":874
 *             bint integer_object_nulls=False,
 *             bint date_as_object=True,
 *             bint timestamp_as_object=False,             # <<<<<<<<<<<<<<
 *             bint use_threads=True,
 *             bint deduplicate_objects=True,
*/
          __pyx_v_timestamp_as_object = ((int)0);
        }
        if (values[7]) {
          __pyx_v_use_threads = __Pyx_PyObject_IsTrue(values[7]); if (unlikely((__pyx_v_use_threads == (int)-1) && PyErr_Occurred())) __PYX_ERR(4, 875, __pyx_L3_error)
        } else {

          /* "pyarrow/array.pxi":875
 *             bint date_as_object=True,
 *             bint timestamp_as_object=False,
 *             bint use_threads=True,             # <<<<<<<<<<<<<<
 *             bint deduplicate_objects=True,
 *             bint ignore_metadata=False,
*/
          __pyx_v_use_threads = ((int)1);
        }
        if (values[8]) {
          __pyx_v_deduplicate_objects = __Pyx_PyObject_IsTrue(values[8]); if (unlikely((__pyx_v_deduplicate_objects == (int)-1) && PyErr_Occurred())) __PYX_ERR(4, 876, __pyx_L3_error)
        } else {

          /* "pyarrow/array.pxi":876
 *             bint timestamp_as_object=False,
 *             bint use_threads=True,
 *             bint deduplicate_objects=True,             # <<<<<<<<<<<<<<
 *             bint ignore_metadata=False,
 *             bint safe=True,
*/
          __pyx_v_deduplicate_objects = ((int)1);
        }
        if (values[9]) {
          __pyx_v_ignore_metadata = __Pyx_PyObject_IsTrue(values[9]); if (unlikely((__pyx_v_ignore_metadata == (int)-1) && PyErr_Occurred())) __PYX_ERR(4, 877, __pyx_L3_error)
        } else {

          /* "pyarrow/array.pxi":877
 *             bint use_threads=True,
 *             bint deduplicate_objects=True,
 *             bint ignore_metadata=False,             # <<<<<<<<<<<<<<
 *             bint safe=True,
 *             bint split_blocks=False,
*/
          __pyx_v_ignore_metadata = ((int)0);
        }
        if (values[10]) {
          __pyx_v_safe = __Pyx_PyObject_IsTrue(values[10]); if (unlikely((__pyx_v_safe == (int)-1) && PyErr_Occurred())) __PYX_ERR(4, 878, __pyx_L3_error)
        } else {

          /* "pyarrow/array.pxi":878
 *             bint deduplicate_objects=True,
 *             bint ignore_metadata=False,
 *             bint safe=True,             # <<<<<<<<<<<<<<
 *             bint split_blocks=False,
 *             bint self_destruct=False,
*/
          __pyx_v_safe = ((int)1);
        }
        if (values[11]) {
          __pyx_v_split_blocks = __Pyx_PyObject_IsTrue(values[11]); if (unlikely((__pyx_v_split_blocks == (int)-1) && PyErr_Occurred())) __PYX_ERR(4, 879, __pyx_L3_error)
        } else {

          /* "pyarrow/array.pxi":879
 *             bint ignore_metadata=False,
 *             bint safe=True,
 *             bint split_blocks=False,             # <<<<<<<<<<<<<<
 *             bint self_destruct=False,
 *             str maps_as_pydicts=None,
*/
          __pyx_v_split_blocks = ((int)0);
        }
        if (values[12]) {
          __pyx_v_self_destruct = __Pyx_PyObject_IsTrue(values[12]); if (unlikely((__pyx_v_self_destruct == (int)-1) && PyErr_Occurred())) __PYX_ERR(4, 880, __pyx_L3_error)
        } else {

          /* "pyarrow/array.pxi":880
 *             bint safe=True,
 *             bint split_blocks=False,
 *             bint self_destruct=False,             # <<<<<<<<<<<<<<
 *             str maps_as_pydicts=None,
 *             types_mapper=None,
*/
          __pyx_v_self_destruct = ((int)0);
        }
        __pyx_v_maps_as_pydicts = ((PyObject*)values[13]);
        __pyx_v_types_mapper = values[14];
        if (values[15]) {
          __pyx_v_coerce_temporal_nanoseconds = __Pyx_PyObject_IsTrue(values[15]); if (unlikely((__pyx_v_coerce_temporal_nanoseconds == (int)-1) && PyErr_Occurred())) __PYX_ERR(4, 883, __pyx_L3_error)
        } else {

          /* "pyarrow/array.pxi":883
 *             str maps_as_pydicts=None,
 *             types_mapper=None,
 *             bint coerce_temporal_nanoseconds=False             # <<<<<<<<<<<<<<
 *     ):
 *         """
*/
          __pyx_v_coerce_temporal_nanoseconds = ((int)0);
        }
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("to_pandas", 0, 0, 16, __pyx_nargs); __PYX_ERR(4, 866, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib._PandasConvertible.to_pandas", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_maps_as_pydicts), (&PyUnicode_Type), 1, "maps_as_pydicts", 1))) __PYX_ERR(4, 881, __pyx_L1_error)
      __pyx_r = __pyx_pf_7pyarrow_3lib_18_PandasConvertible_to_pandas(((struct __pyx_obj_7pyarrow_3lib__PandasConvertible *)__pyx_v_self), __pyx_v_memory_pool, __pyx_v_categories, __pyx_v_strings_to_categorical, __pyx_v_zero_copy_only, __pyx_v_integer_object_nulls, __pyx_v_date_as_object, __pyx_v_timestamp_as_object, __pyx_v_use_threads, __pyx_v_deduplicate_objects, __pyx_v_ignore_metadata, __pyx_v_safe, __pyx_v_split_blocks, __pyx_v_self_destruct, __pyx_v_maps_as_pydicts, __pyx_v_types_mapper, __pyx_v_coerce_temporal_nanoseconds);

      /* "pyarrow/array.pxi":866
 * cdef class _PandasConvertible(_Weakrefable):
 * 
 *     def to_pandas(             # <<<<<<<<<<<<<<
 *             self,
 *             memory_pool=None,
*/

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = NULL;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      goto __pyx_L7_cleaned_up;
      __pyx_L0:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __pyx_L7_cleaned_up:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_18_PandasConvertible_to_pandas(struct __pyx_obj_7pyarrow_3lib__PandasConvertible *__pyx_v_self, PyObject *__pyx_v_memory_pool, PyObject *__pyx_v_categories, int __pyx_v_strings_to_categorical, int __pyx_v_zero_copy_only, int __pyx_v_integer_object_nulls, int __pyx_v_date_as_object, int __pyx_v_timestamp_as_object, int __pyx_v_use_threads, int __pyx_v_deduplicate_objects, int __pyx_v_ignore_metadata, int __pyx_v_safe, int __pyx_v_split_blocks, int __pyx_v_self_destruct, PyObject *__pyx_v_maps_as_pydicts, PyObject *__pyx_v_types_mapper, int __pyx_v_coerce_temporal_nanoseconds) {
      PyObject *__pyx_v_options = NULL;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      size_t __pyx_t_4;
      PyObject *__pyx_t_5 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("to_pandas", 0);

      /* "pyarrow/array.pxi":1032
 *         """
 *         options = dict(
 *             pool=memory_pool,             # <<<<<<<<<<<<<<
 *             strings_to_categorical=strings_to_categorical,
 *             zero_copy_only=zero_copy_only,
*/
      __pyx_t_1 = __Pyx_PyDict_NewPresized(13); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 1032, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_pool, __pyx_v_memory_pool) < (0)) __PYX_ERR(4, 1032, __pyx_L1_error)

      /* "pyarrow/array.pxi":1033
 *         options = dict(
 *             pool=memory_pool,
 *             strings_to_categorical=strings_to_categorical,             # <<<<<<<<<<<<<<
 *             zero_copy_only=zero_copy_only,
 *             integer_object_nulls=integer_object_nulls,
*/
      __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_strings_to_categorical); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 1033, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_strings_to_categorical, __pyx_t_2) < (0)) __PYX_ERR(4, 1032, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyarrow/array.pxi":1034
 *             pool=memory_pool,
 *             strings_to_categorical=strings_to_categorical,
 *             zero_copy_only=zero_copy_only,             # <<<<<<<<<<<<<<
 *             integer_object_nulls=integer_object_nulls,
 *             date_as_object=date_as_object,
*/
      __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_zero_copy_only); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 1034, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_zero_copy_only, __pyx_t_2) < (0)) __PYX_ERR(4, 1032, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyarrow/array.pxi":1035
 *             strings_to_categorical=strings_to_categorical,
 *             zero_copy_only=zero_copy_only,
 *             integer_object_nulls=integer_object_nulls,             # <<<<<<<<<<<<<<
 *             date_as_object=date_as_object,
 *             timestamp_as_object=timestamp_as_object,
*/
      __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_integer_object_nulls); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 1035, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_integer_object_nulls, __pyx_t_2) < (0)) __PYX_ERR(4, 1032, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyarrow/array.pxi":1036
 *             zero_copy_only=zero_copy_only,
 *             integer_object_nulls=integer_object_nulls,
 *             date_as_object=date_as_object,             # <<<<<<<<<<<<<<
 *             timestamp_as_object=timestamp_as_object,
 *             use_threads=use_threads,
*/
      __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_date_as_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 1036, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_date_as_object, __pyx_t_2) < (0)) __PYX_ERR(4, 1032, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyarrow/array.pxi":1037
 *             integer_object_nulls=integer_object_nulls,
 *             date_as_object=date_as_object,
 *             timestamp_as_object=timestamp_as_object,             # <<<<<<<<<<<<<<
 *             use_threads=use_threads,
 *             deduplicate_objects=deduplicate_objects,
*/
      __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_timestamp_as_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 1037, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_timestamp_as_object, __pyx_t_2) < (0)) __PYX_ERR(4, 1032, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyarrow/array.pxi":1038
 *             date_as_object=date_as_object,
 *             timestamp_as_object=timestamp_as_object,
 *             use_threads=use_threads,             # <<<<<<<<<<<<<<
 *             deduplicate_objects=deduplicate_objects,
 *             safe=safe,
*/
      __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_use_threads); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 1038, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_use_threads, __pyx_t_2) < (0)) __PYX_ERR(4, 1032, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyarrow/array.pxi":1039
 *             timestamp_as_object=timestamp_as_object,
 *             use_threads=use_threads,
 *             deduplicate_objects=deduplicate_objects,             # <<<<<<<<<<<<<<
 *             safe=safe,
 *             split_blocks=split_blocks,
*/
      __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_deduplicate_objects); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 1039, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_deduplicate_objects, __pyx_t_2) < (0)) __PYX_ERR(4, 1032, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyarrow/array.pxi":1040
 *             use_threads=use_threads,
 *             deduplicate_objects=deduplicate_objects,
 *             safe=safe,             # <<<<<<<<<<<<<<
 *             split_blocks=split_blocks,
 *             self_destruct=self_destruct,
*/
      __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_safe); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 1040, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_safe, __pyx_t_2) < (0)) __PYX_ERR(4, 1032, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyarrow/array.pxi":1041
 *             deduplicate_objects=deduplicate_objects,
 *             safe=safe,
 *             split_blocks=split_blocks,             # <<<<<<<<<<<<<<
 *             self_destruct=self_destruct,
 *             maps_as_pydicts=maps_as_pydicts,
*/
      __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_split_blocks); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 1041, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_split_blocks, __pyx_t_2) < (0)) __PYX_ERR(4, 1032, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyarrow/array.pxi":1042
 *             safe=safe,
 *             split_blocks=split_blocks,
 *             self_destruct=self_destruct,             # <<<<<<<<<<<<<<
 *             maps_as_pydicts=maps_as_pydicts,
 *             coerce_temporal_nanoseconds=coerce_temporal_nanoseconds
*/
      __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_self_destruct); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 1042, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_self_destruct, __pyx_t_2) < (0)) __PYX_ERR(4, 1032, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyarrow/array.pxi":1043
 *             split_blocks=split_blocks,
 *             self_destruct=self_destruct,
 *             maps_as_pydicts=maps_as_pydicts,             # <<<<<<<<<<<<<<
 *             coerce_temporal_nanoseconds=coerce_temporal_nanoseconds
 *         )
*/
      if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_maps_as_pydicts, __pyx_v_maps_as_pydicts) < (0)) __PYX_ERR(4, 1032, __pyx_L1_error)

      /* "pyarrow/array.pxi":1044
 *             self_destruct=self_destruct,
 *             maps_as_pydicts=maps_as_pydicts,
 *             coerce_temporal_nanoseconds=coerce_temporal_nanoseconds             # <<<<<<<<<<<<<<
 *         )
 *         return self._to_pandas(options, categories=categories,
*/
      __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_coerce_temporal_nanoseconds); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 1044, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_coerce_temporal_nanoseconds, __pyx_t_2) < (0)) __PYX_ERR(4, 1032, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_v_options = ((PyObject*)__pyx_t_1);
      __pyx_t_1 = 0;

      /* "pyarrow/array.pxi":1046
 *             coerce_temporal_nanoseconds=coerce_temporal_nanoseconds
 *         )
 *         return self._to_pandas(options, categories=categories,             # <<<<<<<<<<<<<<
 *                                ignore_metadata=ignore_metadata,
 *                                types_mapper=types_mapper)
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = ((PyObject *)__pyx_v_self);
      __Pyx_INCREF(__pyx_t_2);

      /* "pyarrow/array.pxi":1047
 *         )
 *         return self._to_pandas(options, categories=categories,
 *                                ignore_metadata=ignore_metadata,             # <<<<<<<<<<<<<<
 *                                types_mapper=types_mapper)
 * 
*/
      __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_ignore_metadata); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 1047, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);

      /* "pyarrow/array.pxi":1048
 *         return self._to_pandas(options, categories=categories,
 *                                ignore_metadata=ignore_metadata,
 *                                types_mapper=types_mapper)             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __pyx_t_4 = 0;
      {
        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 3 : 0)] = {__pyx_t_2, __pyx_v_options};
        __pyx_t_5 = __Pyx_MakeVectorcallBuilderKwds(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 1046, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_categories, __pyx_v_categories, __pyx_t_5, __pyx_callargs+2, 0) < (0)) __PYX_ERR(4, 1046, __pyx_L1_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_ignore_metadata, __pyx_t_3, __pyx_t_5, __pyx_callargs+2, 1) < (0)) __PYX_ERR(4, 1046, __pyx_L1_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_types_mapper, __pyx_v_types_mapper, __pyx_t_5, __pyx_callargs+2, 2) < (0)) __PYX_ERR(4, 1046, __pyx_L1_error)
        __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_to_pandas, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_5);
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 1046, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":866
 * cdef class _PandasConvertible(_Weakrefable):
 * 
 *     def to_pandas(             # <<<<<<<<<<<<<<
 *             self,
 *             memory_pool=None,
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_AddTraceback("pyarrow.lib._PandasConvertible.to_pandas", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_options);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

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

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_18_PandasConvertible_3__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_18_PandasConvertible_2__reduce_cython__, "_PandasConvertible.__reduce_cython__(self)");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_18_PandasConvertible_3__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_18_PandasConvertible_3__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_18_PandasConvertible_2__reduce_cython__};
    static PyObject *__pyx_pw_7pyarrow_3lib_18_PandasConvertible_3__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; }
      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
      if (unlikely(__pyx_kwds_len < 0)) return NULL;
      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;}
      __pyx_r = __pyx_pf_7pyarrow_3lib_18_PandasConvertible_2__reduce_cython__(((struct __pyx_obj_7pyarrow_3lib__PandasConvertible *)__pyx_v_self));

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

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

      /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = ()             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None and _dict:
*/
      __Pyx_INCREF(__pyx_mstate_global->__pyx_empty_tuple);
      __pyx_v_state = __pyx_mstate_global->__pyx_empty_tuple;

      /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = ()
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None and _dict:
 *         state += (_dict,)
*/
      __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 6, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_v__dict = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "(tree fragment)":7
 *     state = ()
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None and _dict:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
*/
      __pyx_t_3 = (__pyx_v__dict != Py_None);
      if (__pyx_t_3) {
      } else {
        __pyx_t_2 = __pyx_t_3;
        goto __pyx_L4_bool_binop_done;
      }
      __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v__dict); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(7, 7, __pyx_L1_error)
      __pyx_t_2 = __pyx_t_3;
      __pyx_L4_bool_binop_done:;
      if (__pyx_t_2) {

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

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

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

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

      /* "(tree fragment)":12
 *     else:
 *         use_setstate = False
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle__PandasConvertible, (type(self), 0xe3b0c44, None), state
 *     else:
*/
      if (__pyx_v_use_setstate) {

        /* "(tree fragment)":13
 *         use_setstate = False
 *     if use_setstate:
 *         return __pyx_unpickle__PandasConvertible, (type(self), 0xe3b0c44, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle__PandasConvertible, (type(self), 0xe3b0c44, state)
*/
        __Pyx_XDECREF(__pyx_r);
        __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_pyx_unpickle__PandasConvertibl); if (unlikely(!__pyx_t_4)) __PYX_ERR(7, 13, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 13, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
        __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(7, 13, __pyx_L1_error);
        __Pyx_INCREF(__pyx_mstate_global->__pyx_int_238750788);
        __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_238750788);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_238750788) != (0)) __PYX_ERR(7, 13, __pyx_L1_error);
        __Pyx_INCREF(Py_None);
        __Pyx_GIVEREF(Py_None);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None) != (0)) __PYX_ERR(7, 13, __pyx_L1_error);
        __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(7, 13, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_GIVEREF(__pyx_t_4);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4) != (0)) __PYX_ERR(7, 13, __pyx_L1_error);
        __Pyx_GIVEREF(__pyx_t_1);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1) != (0)) __PYX_ERR(7, 13, __pyx_L1_error);
        __Pyx_INCREF(__pyx_v_state);
        __Pyx_GIVEREF(__pyx_v_state);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state) != (0)) __PYX_ERR(7, 13, __pyx_L1_error);
        __pyx_t_4 = 0;
        __pyx_t_1 = 0;
        __pyx_r = __pyx_t_5;
        __pyx_t_5 = 0;
        goto __pyx_L0;

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

      /* "(tree fragment)":15
 *         return __pyx_unpickle__PandasConvertible, (type(self), 0xe3b0c44, None), state
 *     else:
 *         return __pyx_unpickle__PandasConvertible, (type(self), 0xe3b0c44, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle__PandasConvertible__set_state(self, __pyx_state)
*/
      /*else*/ {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pyx_unpickle__PandasConvertibl); if (unlikely(!__pyx_t_5)) __PYX_ERR(7, 15, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 15, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
        __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(7, 15, __pyx_L1_error);
        __Pyx_INCREF(__pyx_mstate_global->__pyx_int_238750788);
        __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_238750788);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_238750788) != (0)) __PYX_ERR(7, 15, __pyx_L1_error);
        __Pyx_INCREF(__pyx_v_state);
        __Pyx_GIVEREF(__pyx_v_state);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state) != (0)) __PYX_ERR(7, 15, __pyx_L1_error);
        __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(7, 15, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_GIVEREF(__pyx_t_5);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5) != (0)) __PYX_ERR(7, 15, __pyx_L1_error);
        __Pyx_GIVEREF(__pyx_t_1);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1) != (0)) __PYX_ERR(7, 15, __pyx_L1_error);
        __pyx_t_5 = 0;
        __pyx_t_1 = 0;
        __pyx_r = __pyx_t_4;
        __pyx_t_4 = 0;
        goto __pyx_L0;
      }

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

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_AddTraceback("pyarrow.lib._PandasConvertible.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_state);
      __Pyx_XDECREF(__pyx_v__dict);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle__PandasConvertible, (type(self), 0xe3b0c44, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle__PandasConvertible__set_state(self, __pyx_state)
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_18_PandasConvertible_5__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_18_PandasConvertible_4__setstate_cython__, "_PandasConvertible.__setstate_cython__(self, __pyx_state)");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_18_PandasConvertible_5__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_18_PandasConvertible_5__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_18_PandasConvertible_4__setstate_cython__};
    static PyObject *__pyx_pw_7pyarrow_3lib_18_PandasConvertible_5__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v___pyx_state = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(7, 16, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(7, 16, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(7, 16, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(7, 16, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 1)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(7, 16, __pyx_L3_error)
        }
        __pyx_v___pyx_state = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(7, 16, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib._PandasConvertible.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_18_PandasConvertible_4__setstate_cython__(((struct __pyx_obj_7pyarrow_3lib__PandasConvertible *)__pyx_v_self), __pyx_v___pyx_state);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

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

      /* "(tree fragment)":17
 *         return __pyx_unpickle__PandasConvertible, (type(self), 0xe3b0c44, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle__PandasConvertible__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
*/
      __pyx_t_1 = __pyx_v___pyx_state;
      __Pyx_INCREF(__pyx_t_1);
      if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(7, 17, __pyx_L1_error)
      if (unlikely(__pyx_t_1 == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'");
        __PYX_ERR(7, 17, __pyx_L1_error)
      }
      __pyx_t_2 = __pyx_f_7pyarrow_3lib___pyx_unpickle__PandasConvertible__set_state(__pyx_v_self, ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 17, __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;

      /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle__PandasConvertible, (type(self), 0xe3b0c44, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle__PandasConvertible__set_state(self, __pyx_state)
*/

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

    /* "pyarrow/array.pxi":1051
 * 
 * 
 * cdef PandasOptions _convert_pandas_options(dict options):             # <<<<<<<<<<<<<<
 *     cdef PandasOptions result
 *     result.pool = maybe_unbox_memory_pool(options['pool'])
*/

    static arrow::py::PandasOptions __pyx_f_7pyarrow_3lib__convert_pandas_options(PyObject *__pyx_v_options) {
      arrow::py::PandasOptions __pyx_v_result;
      PyObject *__pyx_v_maps_as_pydicts = NULL;
      arrow::py::PandasOptions __pyx_r;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
       arrow::MemoryPool *__pyx_t_2;
      bool __pyx_t_3;
      PyObject *__pyx_t_4 = NULL;
      int __pyx_t_5;
      PyObject *__pyx_t_6 = NULL;
      PyObject *__pyx_t_7[3];
      PyObject *__pyx_t_8 = NULL;
      size_t __pyx_t_9;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("_convert_pandas_options", 0);

      /* "pyarrow/array.pxi":1053
 * cdef PandasOptions _convert_pandas_options(dict options):
 *     cdef PandasOptions result
 *     result.pool = maybe_unbox_memory_pool(options['pool'])             # <<<<<<<<<<<<<<
 *     result.strings_to_categorical = options['strings_to_categorical']
 *     result.zero_copy_only = options['zero_copy_only']
*/
      if (unlikely(__pyx_v_options == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(4, 1053, __pyx_L1_error)
      }
      __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_options, __pyx_mstate_global->__pyx_n_u_pool); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 1053, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_MemoryPool))))) __PYX_ERR(4, 1053, __pyx_L1_error)
      __pyx_t_2 = __pyx_f_7pyarrow_3lib_maybe_unbox_memory_pool(((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(4, 1053, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_v_result.pool = __pyx_t_2;

      /* "pyarrow/array.pxi":1054
 *     cdef PandasOptions result
 *     result.pool = maybe_unbox_memory_pool(options['pool'])
 *     result.strings_to_categorical = options['strings_to_categorical']             # <<<<<<<<<<<<<<
 *     result.zero_copy_only = options['zero_copy_only']
 *     result.integer_object_nulls = options['integer_object_nulls']
*/
      if (unlikely(__pyx_v_options == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(4, 1054, __pyx_L1_error)
      }
      __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_options, __pyx_mstate_global->__pyx_n_u_strings_to_categorical); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 1054, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(4, 1054, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_v_result.strings_to_categorical = __pyx_t_3;

      /* "pyarrow/array.pxi":1055
 *     result.pool = maybe_unbox_memory_pool(options['pool'])
 *     result.strings_to_categorical = options['strings_to_categorical']
 *     result.zero_copy_only = options['zero_copy_only']             # <<<<<<<<<<<<<<
 *     result.integer_object_nulls = options['integer_object_nulls']
 *     result.date_as_object = options['date_as_object']
*/
      if (unlikely(__pyx_v_options == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(4, 1055, __pyx_L1_error)
      }
      __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_options, __pyx_mstate_global->__pyx_n_u_zero_copy_only); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 1055, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(4, 1055, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_v_result.zero_copy_only = __pyx_t_3;

      /* "pyarrow/array.pxi":1056
 *     result.strings_to_categorical = options['strings_to_categorical']
 *     result.zero_copy_only = options['zero_copy_only']
 *     result.integer_object_nulls = options['integer_object_nulls']             # <<<<<<<<<<<<<<
 *     result.date_as_object = options['date_as_object']
 *     result.timestamp_as_object = options['timestamp_as_object']
*/
      if (unlikely(__pyx_v_options == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(4, 1056, __pyx_L1_error)
      }
      __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_options, __pyx_mstate_global->__pyx_n_u_integer_object_nulls); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 1056, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(4, 1056, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_v_result.integer_object_nulls = __pyx_t_3;

      /* "pyarrow/array.pxi":1057
 *     result.zero_copy_only = options['zero_copy_only']
 *     result.integer_object_nulls = options['integer_object_nulls']
 *     result.date_as_object = options['date_as_object']             # <<<<<<<<<<<<<<
 *     result.timestamp_as_object = options['timestamp_as_object']
 *     result.use_threads = options['use_threads']
*/
      if (unlikely(__pyx_v_options == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(4, 1057, __pyx_L1_error)
      }
      __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_options, __pyx_mstate_global->__pyx_n_u_date_as_object); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 1057, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(4, 1057, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_v_result.date_as_object = __pyx_t_3;

      /* "pyarrow/array.pxi":1058
 *     result.integer_object_nulls = options['integer_object_nulls']
 *     result.date_as_object = options['date_as_object']
 *     result.timestamp_as_object = options['timestamp_as_object']             # <<<<<<<<<<<<<<
 *     result.use_threads = options['use_threads']
 *     result.deduplicate_objects = options['deduplicate_objects']
*/
      if (unlikely(__pyx_v_options == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(4, 1058, __pyx_L1_error)
      }
      __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_options, __pyx_mstate_global->__pyx_n_u_timestamp_as_object); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 1058, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(4, 1058, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_v_result.timestamp_as_object = __pyx_t_3;

      /* "pyarrow/array.pxi":1059
 *     result.date_as_object = options['date_as_object']
 *     result.timestamp_as_object = options['timestamp_as_object']
 *     result.use_threads = options['use_threads']             # <<<<<<<<<<<<<<
 *     result.deduplicate_objects = options['deduplicate_objects']
 *     result.safe_cast = options['safe']
*/
      if (unlikely(__pyx_v_options == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(4, 1059, __pyx_L1_error)
      }
      __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_options, __pyx_mstate_global->__pyx_n_u_use_threads); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 1059, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(4, 1059, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_v_result.use_threads = __pyx_t_3;

      /* "pyarrow/array.pxi":1060
 *     result.timestamp_as_object = options['timestamp_as_object']
 *     result.use_threads = options['use_threads']
 *     result.deduplicate_objects = options['deduplicate_objects']             # <<<<<<<<<<<<<<
 *     result.safe_cast = options['safe']
 *     result.split_blocks = options['split_blocks']
*/
      if (unlikely(__pyx_v_options == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(4, 1060, __pyx_L1_error)
      }
      __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_options, __pyx_mstate_global->__pyx_n_u_deduplicate_objects); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 1060, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(4, 1060, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_v_result.deduplicate_objects = __pyx_t_3;

      /* "pyarrow/array.pxi":1061
 *     result.use_threads = options['use_threads']
 *     result.deduplicate_objects = options['deduplicate_objects']
 *     result.safe_cast = options['safe']             # <<<<<<<<<<<<<<
 *     result.split_blocks = options['split_blocks']
 *     result.self_destruct = options['self_destruct']
*/
      if (unlikely(__pyx_v_options == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(4, 1061, __pyx_L1_error)
      }
      __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_options, __pyx_mstate_global->__pyx_n_u_safe); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 1061, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(4, 1061, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_v_result.safe_cast = __pyx_t_3;

      /* "pyarrow/array.pxi":1062
 *     result.deduplicate_objects = options['deduplicate_objects']
 *     result.safe_cast = options['safe']
 *     result.split_blocks = options['split_blocks']             # <<<<<<<<<<<<<<
 *     result.self_destruct = options['self_destruct']
 *     result.coerce_temporal_nanoseconds = options['coerce_temporal_nanoseconds']
*/
      if (unlikely(__pyx_v_options == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(4, 1062, __pyx_L1_error)
      }
      __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_options, __pyx_mstate_global->__pyx_n_u_split_blocks); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 1062, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(4, 1062, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_v_result.split_blocks = __pyx_t_3;

      /* "pyarrow/array.pxi":1063
 *     result.safe_cast = options['safe']
 *     result.split_blocks = options['split_blocks']
 *     result.self_destruct = options['self_destruct']             # <<<<<<<<<<<<<<
 *     result.coerce_temporal_nanoseconds = options['coerce_temporal_nanoseconds']
 *     result.ignore_timezone = os.environ.get('PYARROW_IGNORE_TIMEZONE', False)
*/
      if (unlikely(__pyx_v_options == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(4, 1063, __pyx_L1_error)
      }
      __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_options, __pyx_mstate_global->__pyx_n_u_self_destruct); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 1063, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(4, 1063, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_v_result.self_destruct = __pyx_t_3;

      /* "pyarrow/array.pxi":1064
 *     result.split_blocks = options['split_blocks']
 *     result.self_destruct = options['self_destruct']
 *     result.coerce_temporal_nanoseconds = options['coerce_temporal_nanoseconds']             # <<<<<<<<<<<<<<
 *     result.ignore_timezone = os.environ.get('PYARROW_IGNORE_TIMEZONE', False)
 * 
*/
      if (unlikely(__pyx_v_options == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(4, 1064, __pyx_L1_error)
      }
      __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_options, __pyx_mstate_global->__pyx_n_u_coerce_temporal_nanoseconds); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 1064, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(4, 1064, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_v_result.coerce_temporal_nanoseconds = __pyx_t_3;

      /* "pyarrow/array.pxi":1065
 *     result.self_destruct = options['self_destruct']
 *     result.coerce_temporal_nanoseconds = options['coerce_temporal_nanoseconds']
 *     result.ignore_timezone = os.environ.get('PYARROW_IGNORE_TIMEZONE', False)             # <<<<<<<<<<<<<<
 * 
 *     maps_as_pydicts = options['maps_as_pydicts']
*/
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_os); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 1065, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_environ); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 1065, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 1065, __pyx_L1_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_mstate_global->__pyx_tuple[3], NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 1065, __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 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(4, 1065, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_v_result.ignore_timezone = __pyx_t_3;

      /* "pyarrow/array.pxi":1067
 *     result.ignore_timezone = os.environ.get('PYARROW_IGNORE_TIMEZONE', False)
 * 
 *     maps_as_pydicts = options['maps_as_pydicts']             # <<<<<<<<<<<<<<
 *     if maps_as_pydicts is None:
 *         result.maps_as_pydicts = MapConversionType.DEFAULT
*/
      if (unlikely(__pyx_v_options == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(4, 1067, __pyx_L1_error)
      }
      __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_options, __pyx_mstate_global->__pyx_n_u_maps_as_pydicts); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 1067, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_v_maps_as_pydicts = __pyx_t_4;
      __pyx_t_4 = 0;

      /* "pyarrow/array.pxi":1068
 * 
 *     maps_as_pydicts = options['maps_as_pydicts']
 *     if maps_as_pydicts is None:             # <<<<<<<<<<<<<<
 *         result.maps_as_pydicts = MapConversionType.DEFAULT
 *     elif maps_as_pydicts == "lossy":
*/
      __pyx_t_5 = (__pyx_v_maps_as_pydicts == Py_None);
      if (__pyx_t_5) {

        /* "pyarrow/array.pxi":1069
 *     maps_as_pydicts = options['maps_as_pydicts']
 *     if maps_as_pydicts is None:
 *         result.maps_as_pydicts = MapConversionType.DEFAULT             # <<<<<<<<<<<<<<
 *     elif maps_as_pydicts == "lossy":
 *         result.maps_as_pydicts = MapConversionType.LOSSY
*/
        __pyx_v_result.maps_as_pydicts = arrow::py::MapConversionType::DEFAULT;

        /* "pyarrow/array.pxi":1068
 * 
 *     maps_as_pydicts = options['maps_as_pydicts']
 *     if maps_as_pydicts is None:             # <<<<<<<<<<<<<<
 *         result.maps_as_pydicts = MapConversionType.DEFAULT
 *     elif maps_as_pydicts == "lossy":
*/
        goto __pyx_L3;
      }

      /* "pyarrow/array.pxi":1070
 *     if maps_as_pydicts is None:
 *         result.maps_as_pydicts = MapConversionType.DEFAULT
 *     elif maps_as_pydicts == "lossy":             # <<<<<<<<<<<<<<
 *         result.maps_as_pydicts = MapConversionType.LOSSY
 *     elif maps_as_pydicts == "strict":
*/
      __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_v_maps_as_pydicts, __pyx_mstate_global->__pyx_n_u_lossy, Py_EQ)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(4, 1070, __pyx_L1_error)
      if (__pyx_t_5) {

        /* "pyarrow/array.pxi":1071
 *         result.maps_as_pydicts = MapConversionType.DEFAULT
 *     elif maps_as_pydicts == "lossy":
 *         result.maps_as_pydicts = MapConversionType.LOSSY             # <<<<<<<<<<<<<<
 *     elif maps_as_pydicts == "strict":
 *         result.maps_as_pydicts = MapConversionType.STRICT_
*/
        __pyx_v_result.maps_as_pydicts = arrow::py::MapConversionType::LOSSY;

        /* "pyarrow/array.pxi":1070
 *     if maps_as_pydicts is None:
 *         result.maps_as_pydicts = MapConversionType.DEFAULT
 *     elif maps_as_pydicts == "lossy":             # <<<<<<<<<<<<<<
 *         result.maps_as_pydicts = MapConversionType.LOSSY
 *     elif maps_as_pydicts == "strict":
*/
        goto __pyx_L3;
      }

      /* "pyarrow/array.pxi":1072
 *     elif maps_as_pydicts == "lossy":
 *         result.maps_as_pydicts = MapConversionType.LOSSY
 *     elif maps_as_pydicts == "strict":             # <<<<<<<<<<<<<<
 *         result.maps_as_pydicts = MapConversionType.STRICT_
 *     else:
*/
      __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_v_maps_as_pydicts, __pyx_mstate_global->__pyx_n_u_strict, Py_EQ)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(4, 1072, __pyx_L1_error)
      if (likely(__pyx_t_5)) {

        /* "pyarrow/array.pxi":1073
 *         result.maps_as_pydicts = MapConversionType.LOSSY
 *     elif maps_as_pydicts == "strict":
 *         result.maps_as_pydicts = MapConversionType.STRICT_             # <<<<<<<<<<<<<<
 *     else:
 *         raise ValueError(
*/
        __pyx_v_result.maps_as_pydicts = arrow::py::MapConversionType::STRICT_;

        /* "pyarrow/array.pxi":1072
 *     elif maps_as_pydicts == "lossy":
 *         result.maps_as_pydicts = MapConversionType.LOSSY
 *     elif maps_as_pydicts == "strict":             # <<<<<<<<<<<<<<
 *         result.maps_as_pydicts = MapConversionType.STRICT_
 *     else:
*/
        goto __pyx_L3;
      }

      /* "pyarrow/array.pxi":1075
 *         result.maps_as_pydicts = MapConversionType.STRICT_
 *     else:
 *         raise ValueError(             # <<<<<<<<<<<<<<
 *             "Invalid value for 'maps_as_pydicts': "
 *             + "valid values are 'lossy', 'strict' or `None` (default). "
*/
      /*else*/ {
        __pyx_t_1 = NULL;

        /* "pyarrow/array.pxi":1078
 *             "Invalid value for 'maps_as_pydicts': "
 *             + "valid values are 'lossy', 'strict' or `None` (default). "
 *             + f"Received '{maps_as_pydicts}'."             # <<<<<<<<<<<<<<
 *         )
 *     return result
*/
        __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_v_maps_as_pydicts, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 1078, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_7[0] = __pyx_mstate_global->__pyx_kp_u_Invalid_value_for_maps_as_pydict_2;
        __pyx_t_7[1] = __pyx_t_6;
        __pyx_t_7[2] = __pyx_mstate_global->__pyx_kp_u__12;
        __pyx_t_8 = __Pyx_PyUnicode_Join(__pyx_t_7, 3, 103 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6) + 2, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6));
        if (unlikely(!__pyx_t_8)) __PYX_ERR(4, 1078, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_9 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_8};
          __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 1075, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
        }
        __Pyx_Raise(__pyx_t_4, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __PYX_ERR(4, 1075, __pyx_L1_error)
      }
      __pyx_L3:;

      /* "pyarrow/array.pxi":1080
 *             + f"Received '{maps_as_pydicts}'."
 *         )
 *     return result             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __pyx_r = __pyx_v_result;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":1051
 * 
 * 
 * cdef PandasOptions _convert_pandas_options(dict options):             # <<<<<<<<<<<<<<
 *     cdef PandasOptions result
 *     result.pool = maybe_unbox_memory_pool(options['pool'])
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_8);
      __Pyx_AddTraceback("pyarrow.lib._convert_pandas_options", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_pretend_to_initialize(&__pyx_r);
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_maps_as_pydicts);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":1088
 *     """
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         raise TypeError(f"Do not call {self.__class__.__name__}'s constructor "
 *                         "directly, use one of the `pyarrow.Array.from_*` "
*/

    /* Python wrapper */
    static int __pyx_pw_7pyarrow_3lib_5Array_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
    static int __pyx_pw_7pyarrow_3lib_5Array_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      int __pyx_r;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
      #endif
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, __pyx_nargs); return -1; }
      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
      if (unlikely(__pyx_kwds_len < 0)) return -1;
      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__init__", __pyx_kwds); return -1;}
      __pyx_r = __pyx_pf_7pyarrow_3lib_5Array___init__(((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_v_self));

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

    static int __pyx_pf_7pyarrow_3lib_5Array___init__(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self) {
      int __pyx_r;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      PyObject *__pyx_t_5[3];
      size_t __pyx_t_6;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__init__", 0);

      /* "pyarrow/array.pxi":1089
 * 
 *     def __init__(self):
 *         raise TypeError(f"Do not call {self.__class__.__name__}'s constructor "             # <<<<<<<<<<<<<<
 *                         "directly, use one of the `pyarrow.Array.from_*` "
 *                         "functions instead.")
*/
      __pyx_t_2 = NULL;
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 1089, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_name_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 1089, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 1089, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_5[0] = __pyx_mstate_global->__pyx_kp_u_Do_not_call;
      __pyx_t_5[1] = __pyx_t_3;
      __pyx_t_5[2] = __pyx_mstate_global->__pyx_kp_u_s_constructor_directly_use_one;
      __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_5, 3, 12 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + 81, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3));
      if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 1089, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_6 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4};
        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 1089, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __PYX_ERR(4, 1089, __pyx_L1_error)

      /* "pyarrow/array.pxi":1088
 *     """
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         raise TypeError(f"Do not call {self.__class__.__name__}'s constructor "
 *                         "directly, use one of the `pyarrow.Array.from_*` "
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_AddTraceback("pyarrow.lib.Array.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = -1;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":1093
 *                         "functions instead.")
 * 
 *     cdef void init(self, const shared_ptr[CArray]& sp_array) except *:             # <<<<<<<<<<<<<<
 *         self.sp_array = sp_array
 *         self.ap = sp_array.get()
*/

    static void __pyx_f_7pyarrow_3lib_5Array_init(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self, std::shared_ptr< arrow::Array>  const &__pyx_v_sp_array) {
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("init", 0);

      /* "pyarrow/array.pxi":1094
 * 
 *     cdef void init(self, const shared_ptr[CArray]& sp_array) except *:
 *         self.sp_array = sp_array             # <<<<<<<<<<<<<<
 *         self.ap = sp_array.get()
 *         self.type = pyarrow_wrap_data_type(self.sp_array.get().type())
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_array");
        __PYX_ERR(4, 1094, __pyx_L1_error)
      }
      __pyx_v_self->sp_array = __pyx_v_sp_array;

      /* "pyarrow/array.pxi":1095
 *     cdef void init(self, const shared_ptr[CArray]& sp_array) except *:
 *         self.sp_array = sp_array
 *         self.ap = sp_array.get()             # <<<<<<<<<<<<<<
 *         self.type = pyarrow_wrap_data_type(self.sp_array.get().type())
 * 
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "ap");
        __PYX_ERR(4, 1095, __pyx_L1_error)
      }
      __pyx_v_self->ap = __pyx_v_sp_array.get();

      /* "pyarrow/array.pxi":1096
 *         self.sp_array = sp_array
 *         self.ap = sp_array.get()
 *         self.type = pyarrow_wrap_data_type(self.sp_array.get().type())             # <<<<<<<<<<<<<<
 * 
 *     def _debug_print(self):
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_array");
        __PYX_ERR(4, 1096, __pyx_L1_error)
      }
      __pyx_t_1 = pyarrow_wrap_data_type(__pyx_v_self->sp_array.get()->type()); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 1096, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType))))) __PYX_ERR(4, 1096, __pyx_L1_error)
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "type");
        __PYX_ERR(4, 1096, __pyx_L1_error)
      }
      __Pyx_GIVEREF(__pyx_t_1);
      __Pyx_GOTREF((PyObject *)__pyx_v_self->type);
      __Pyx_DECREF((PyObject *)__pyx_v_self->type);
      __pyx_v_self->type = ((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_t_1);
      __pyx_t_1 = 0;

      /* "pyarrow/array.pxi":1093
 *                         "functions instead.")
 * 
 *     cdef void init(self, const shared_ptr[CArray]& sp_array) except *:             # <<<<<<<<<<<<<<
 *         self.sp_array = sp_array
 *         self.ap = sp_array.get()
*/

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("pyarrow.lib.Array.init", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_L0:;
      __Pyx_RefNannyFinishContext();
    }

    /* "pyarrow/array.pxi":1098
 *         self.type = pyarrow_wrap_data_type(self.sp_array.get().type())
 * 
 *     def _debug_print(self):             # <<<<<<<<<<<<<<
 *         with nogil:
 *             check_status(DebugPrint(deref(self.ap), 0))
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_3_debug_print(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_5Array_2_debug_print, "Array._debug_print(self)");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_5Array_3_debug_print = {"_debug_print", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Array_3_debug_print, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Array_2_debug_print};
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_3_debug_print(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("_debug_print (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("_debug_print", 1, 0, 0, __pyx_nargs); return NULL; }
      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
      if (unlikely(__pyx_kwds_len < 0)) return NULL;
      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("_debug_print", __pyx_kwds); return NULL;}
      __pyx_r = __pyx_pf_7pyarrow_3lib_5Array_2_debug_print(((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_5Array_2_debug_print(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      int __pyx_t_1;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("_debug_print", 0);

      /* "pyarrow/array.pxi":1099
 * 
 *     def _debug_print(self):
 *         with nogil:             # <<<<<<<<<<<<<<
 *             check_status(DebugPrint(deref(self.ap), 0))
 * 
*/
      {
          PyThreadState * _save;
          _save = PyEval_SaveThread();
          __Pyx_FastGIL_Remember();
          /*try:*/ {

            /* "pyarrow/array.pxi":1100
 *     def _debug_print(self):
 *         with nogil:
 *             check_status(DebugPrint(deref(self.ap), 0))             # <<<<<<<<<<<<<<
 * 
 *     def diff(self, Array other):
*/
            if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
              PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "ap");
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              __PYX_ERR(4, 1100, __pyx_L4_error)
            }
            __pyx_t_1 = __pyx_f_7pyarrow_3lib_check_status(arrow::DebugPrint((*__pyx_v_self->ap), 0)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(4, 1100, __pyx_L4_error)
          }

          /* "pyarrow/array.pxi":1099
 * 
 *     def _debug_print(self):
 *         with nogil:             # <<<<<<<<<<<<<<
 *             check_status(DebugPrint(deref(self.ap), 0))
 * 
*/
          /*finally:*/ {
            /*normal exit:*/{
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L5;
            }
            __pyx_L4_error: {
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L1_error;
            }
            __pyx_L5:;
          }
      }

      /* "pyarrow/array.pxi":1098
 *         self.type = pyarrow_wrap_data_type(self.sp_array.get().type())
 * 
 *     def _debug_print(self):             # <<<<<<<<<<<<<<
 *         with nogil:
 *             check_status(DebugPrint(deref(self.ap), 0))
*/

      /* function exit code */
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_AddTraceback("pyarrow.lib.Array._debug_print", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":1102
 *             check_status(DebugPrint(deref(self.ap), 0))
 * 
 *     def diff(self, Array other):             # <<<<<<<<<<<<<<
 *         """
 *         Compare contents of this array against another one.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_5diff(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_5Array_4diff, "Array.diff(self, Array other)\n\nCompare contents of this array against another one.\n\nReturn a string containing the result of diffing this array\n(on the left side) against the other array (on the right side).\n\nParameters\n----------\nother : Array\n    The other array to compare this array with.\n\nReturns\n-------\ndiff : str\n    A human-readable printout of the differences.\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> left = pa.array([\"one\", \"two\", \"three\"])\n>>> right = pa.array([\"two\", None, \"two-and-a-half\", \"three\"])\n>>> print(left.diff(right)) # doctest: +SKIP\n\n@@ -0, +0 @@\n-\"one\"\n@@ -2, +1 @@\n+null\n+\"two-and-a-half\"");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_5Array_5diff = {"diff", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Array_5diff, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Array_4diff};
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_5diff(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_other = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("diff (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_other,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(4, 1102, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 1102, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "diff", 0) < (0)) __PYX_ERR(4, 1102, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("diff", 1, 1, 1, i); __PYX_ERR(4, 1102, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 1)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 1102, __pyx_L3_error)
        }
        __pyx_v_other = ((struct __pyx_obj_7pyarrow_3lib_Array *)values[0]);
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("diff", 1, 1, 1, __pyx_nargs); __PYX_ERR(4, 1102, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.Array.diff", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array, 1, "other", 0))) __PYX_ERR(4, 1102, __pyx_L1_error)
      __pyx_r = __pyx_pf_7pyarrow_3lib_5Array_4diff(((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_v_self), __pyx_v_other);

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = NULL;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      goto __pyx_L7_cleaned_up;
      __pyx_L0:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __pyx_L7_cleaned_up:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_5Array_4diff(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self, struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_other) {
      std::string __pyx_v_result;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      size_t __pyx_t_5;
      PyObject *__pyx_t_6 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("diff", 0);

      /* "pyarrow/array.pxi":1133
 * 
 *         """
 *         self._assert_cpu()             # <<<<<<<<<<<<<<
 *         cdef c_string result
 *         with nogil:
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_assert_cpu");
        __PYX_ERR(4, 1133, __pyx_L1_error)
      }
      ((struct __pyx_vtabstruct_7pyarrow_3lib_Array *)__pyx_v_self->__pyx_vtab)->_assert_cpu(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 1133, __pyx_L1_error)

      /* "pyarrow/array.pxi":1135
 *         self._assert_cpu()
 *         cdef c_string result
 *         with nogil:             # <<<<<<<<<<<<<<
 *             result = self.ap.Diff(deref(other.ap))
 *         return frombytes(result, safe=True)
*/
      {
          PyThreadState * _save;
          _save = PyEval_SaveThread();
          __Pyx_FastGIL_Remember();
          /*try:*/ {

            /* "pyarrow/array.pxi":1136
 *         cdef c_string result
 *         with nogil:
 *             result = self.ap.Diff(deref(other.ap))             # <<<<<<<<<<<<<<
 *         return frombytes(result, safe=True)
 * 
*/
            if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
              PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "ap");
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              __PYX_ERR(4, 1136, __pyx_L4_error)
            }
            if (unlikely(((PyObject *)__pyx_v_other) == Py_None)) {
              PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "ap");
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              __PYX_ERR(4, 1136, __pyx_L4_error)
            }
            __pyx_v_result = __pyx_v_self->ap->Diff((*__pyx_v_other->ap));
          }

          /* "pyarrow/array.pxi":1135
 *         self._assert_cpu()
 *         cdef c_string result
 *         with nogil:             # <<<<<<<<<<<<<<
 *             result = self.ap.Diff(deref(other.ap))
 *         return frombytes(result, safe=True)
*/
          /*finally:*/ {
            /*normal exit:*/{
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L5;
            }
            __pyx_L4_error: {
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L1_error;
            }
            __pyx_L5:;
          }
      }

      /* "pyarrow/array.pxi":1137
 *         with nogil:
 *             result = self.ap.Diff(deref(other.ap))
 *         return frombytes(result, safe=True)             # <<<<<<<<<<<<<<
 * 
 *     def cast(self, object target_type=None, safe=None, options=None, memory_pool=None):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_frombytes); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 1137, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = __pyx_convert_PyBytes_string_to_py_6libcpp_6string_std__in_string(__pyx_v_result); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 1137, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
        assert(__pyx_t_2);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
        __pyx_t_5 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, __pyx_t_4};
        __pyx_t_6 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 1137, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_safe, Py_True, __pyx_t_6, __pyx_callargs+2, 0) < (0)) __PYX_ERR(4, 1137, __pyx_L1_error)
        __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_6);
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 1137, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":1102
 *             check_status(DebugPrint(deref(self.ap), 0))
 * 
 *     def diff(self, Array other):             # <<<<<<<<<<<<<<
 *         """
 *         Compare contents of this array against another one.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_AddTraceback("pyarrow.lib.Array.diff", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":1139
 *         return frombytes(result, safe=True)
 * 
 *     def cast(self, object target_type=None, safe=None, options=None, memory_pool=None):             # <<<<<<<<<<<<<<
 *         """
 *         Cast array values to another data type
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_7cast(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_5Array_6cast, "Array.cast(self, target_type=None, safe=None, options=None, memory_pool=None)\n\nCast array values to another data type\n\nSee :func:`pyarrow.compute.cast` for usage.\n\nParameters\n----------\ntarget_type : DataType, default None\n    Type to cast array to.\nsafe : boolean, default True\n    Whether to check for conversion errors such as overflow.\noptions : CastOptions, default None\n    Additional checks pass by CastOptions\nmemory_pool : MemoryPool, optional\n    memory pool to use for allocations during function execution.\n\nReturns\n-------\ncast : Array");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_5Array_7cast = {"cast", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Array_7cast, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Array_6cast};
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_7cast(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_target_type = 0;
      PyObject *__pyx_v_safe = 0;
      PyObject *__pyx_v_options = 0;
      PyObject *__pyx_v_memory_pool = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[4] = {0,0,0,0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("cast (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_target_type,&__pyx_mstate_global->__pyx_n_u_safe,&__pyx_mstate_global->__pyx_n_u_options,&__pyx_mstate_global->__pyx_n_u_memory_pool,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(4, 1139, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  4:
            values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(4, 1139, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  3:
            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(4, 1139, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(4, 1139, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 1139, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "cast", 0) < (0)) __PYX_ERR(4, 1139, __pyx_L3_error)
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
          if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
          if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None));
        } else {
          switch (__pyx_nargs) {
            case  4:
            values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(4, 1139, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  3:
            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(4, 1139, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(4, 1139, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 1139, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
          if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
          if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None));
        }
        __pyx_v_target_type = values[0];
        __pyx_v_safe = values[1];
        __pyx_v_options = values[2];
        __pyx_v_memory_pool = values[3];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("cast", 0, 0, 4, __pyx_nargs); __PYX_ERR(4, 1139, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.Array.cast", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_5Array_6cast(((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_v_self), __pyx_v_target_type, __pyx_v_safe, __pyx_v_options, __pyx_v_memory_pool);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_5Array_6cast(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self, PyObject *__pyx_v_target_type, PyObject *__pyx_v_safe, PyObject *__pyx_v_options, PyObject *__pyx_v_memory_pool) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      PyObject *__pyx_t_5 = NULL;
      size_t __pyx_t_6;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("cast", 0);

      /* "pyarrow/array.pxi":1160
 *         cast : Array
 *         """
 *         self._assert_cpu()             # <<<<<<<<<<<<<<
 *         return _pc().cast(self, target_type, safe=safe,
 *                           options=options, memory_pool=memory_pool)
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_assert_cpu");
        __PYX_ERR(4, 1160, __pyx_L1_error)
      }
      ((struct __pyx_vtabstruct_7pyarrow_3lib_Array *)__pyx_v_self->__pyx_vtab)->_assert_cpu(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 1160, __pyx_L1_error)

      /* "pyarrow/array.pxi":1161
 *         """
 *         self._assert_cpu()
 *         return _pc().cast(self, target_type, safe=safe,             # <<<<<<<<<<<<<<
 *                           options=options, memory_pool=memory_pool)
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_4 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pc_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 1161, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
        assert(__pyx_t_4);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
        __pyx_t_6 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
        __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 1161, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      __pyx_t_2 = __pyx_t_3;
      __Pyx_INCREF(__pyx_t_2);

      /* "pyarrow/array.pxi":1162
 *         self._assert_cpu()
 *         return _pc().cast(self, target_type, safe=safe,
 *                           options=options, memory_pool=memory_pool)             # <<<<<<<<<<<<<<
 * 
 *     def view(self, object target_type):
*/
      __pyx_t_6 = 0;
      {
        PyObject *__pyx_callargs[3 + ((CYTHON_VECTORCALL) ? 3 : 0)] = {__pyx_t_2, ((PyObject *)__pyx_v_self), __pyx_v_target_type};
        __pyx_t_5 = __Pyx_MakeVectorcallBuilderKwds(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 1161, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_safe, __pyx_v_safe, __pyx_t_5, __pyx_callargs+3, 0) < (0)) __PYX_ERR(4, 1161, __pyx_L1_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_options, __pyx_v_options, __pyx_t_5, __pyx_callargs+3, 1) < (0)) __PYX_ERR(4, 1161, __pyx_L1_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_memory_pool, __pyx_v_memory_pool, __pyx_t_5, __pyx_callargs+3, 2) < (0)) __PYX_ERR(4, 1161, __pyx_L1_error)
        __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_cast, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_5);
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 1161, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":1139
 *         return frombytes(result, safe=True)
 * 
 *     def cast(self, object target_type=None, safe=None, options=None, memory_pool=None):             # <<<<<<<<<<<<<<
 *         """
 *         Cast array values to another data type
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_AddTraceback("pyarrow.lib.Array.cast", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":1164
 *                           options=options, memory_pool=memory_pool)
 * 
 *     def view(self, object target_type):             # <<<<<<<<<<<<<<
 *         """
 *         Return zero-copy "view" of array as another data type.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_9view(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_5Array_8view, "Array.view(self, target_type)\n\nReturn zero-copy \"view\" of array as another data type.\n\nThe data types must have compatible columnar buffer layouts\n\nParameters\n----------\ntarget_type : DataType\n    Type to construct view as.\n\nReturns\n-------\nview : Array");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_5Array_9view = {"view", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Array_9view, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Array_8view};
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_9view(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_target_type = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("view (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_target_type,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(4, 1164, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 1164, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "view", 0) < (0)) __PYX_ERR(4, 1164, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("view", 1, 1, 1, i); __PYX_ERR(4, 1164, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 1)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 1164, __pyx_L3_error)
        }
        __pyx_v_target_type = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("view", 1, 1, 1, __pyx_nargs); __PYX_ERR(4, 1164, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.Array.view", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_5Array_8view(((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_v_self), __pyx_v_target_type);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_5Array_8view(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self, PyObject *__pyx_v_target_type) {
      struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v_type = 0;
      std::shared_ptr< arrow::Array>  __pyx_v_result;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      std::shared_ptr< arrow::Array>  __pyx_t_2;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("view", 0);

      /* "pyarrow/array.pxi":1179
 *         view : Array
 *         """
 *         self._assert_cpu()             # <<<<<<<<<<<<<<
 *         cdef DataType type = ensure_type(target_type)
 *         cdef shared_ptr[CArray] result
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_assert_cpu");
        __PYX_ERR(4, 1179, __pyx_L1_error)
      }
      ((struct __pyx_vtabstruct_7pyarrow_3lib_Array *)__pyx_v_self->__pyx_vtab)->_assert_cpu(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 1179, __pyx_L1_error)

      /* "pyarrow/array.pxi":1180
 *         """
 *         self._assert_cpu()
 *         cdef DataType type = ensure_type(target_type)             # <<<<<<<<<<<<<<
 *         cdef shared_ptr[CArray] result
 *         with nogil:
*/
      __pyx_t_1 = ((PyObject *)__pyx_f_7pyarrow_3lib_ensure_type(__pyx_v_target_type, 0, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 1180, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_v_type = ((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_t_1);
      __pyx_t_1 = 0;

      /* "pyarrow/array.pxi":1182
 *         cdef DataType type = ensure_type(target_type)
 *         cdef shared_ptr[CArray] result
 *         with nogil:             # <<<<<<<<<<<<<<
 *             result = GetResultValue(self.ap.View(type.sp_type))
 *         return pyarrow_wrap_array(result)
*/
      {
          PyThreadState * _save;
          _save = PyEval_SaveThread();
          __Pyx_FastGIL_Remember();
          /*try:*/ {

            /* "pyarrow/array.pxi":1183
 *         cdef shared_ptr[CArray] result
 *         with nogil:
 *             result = GetResultValue(self.ap.View(type.sp_type))             # <<<<<<<<<<<<<<
 *         return pyarrow_wrap_array(result)
 * 
*/
            if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
              PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "ap");
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              __PYX_ERR(4, 1183, __pyx_L4_error)
            }
            if (unlikely(((PyObject *)__pyx_v_type) == Py_None)) {
              PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_type");
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              __PYX_ERR(4, 1183, __pyx_L4_error)
            }
            __pyx_t_2 = arrow::py::GetResultValue<std::shared_ptr< arrow::Array> >(__pyx_v_self->ap->View(__pyx_v_type->sp_type)); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(4, 1183, __pyx_L4_error)
            __pyx_v_result = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_2);
          }

          /* "pyarrow/array.pxi":1182
 *         cdef DataType type = ensure_type(target_type)
 *         cdef shared_ptr[CArray] result
 *         with nogil:             # <<<<<<<<<<<<<<
 *             result = GetResultValue(self.ap.View(type.sp_type))
 *         return pyarrow_wrap_array(result)
*/
          /*finally:*/ {
            /*normal exit:*/{
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L5;
            }
            __pyx_L4_error: {
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L1_error;
            }
            __pyx_L5:;
          }
      }

      /* "pyarrow/array.pxi":1184
 *         with nogil:
 *             result = GetResultValue(self.ap.View(type.sp_type))
 *         return pyarrow_wrap_array(result)             # <<<<<<<<<<<<<<
 * 
 *     def sum(self, **kwargs):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = pyarrow_wrap_array(__pyx_v_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 1184, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":1164
 *                           options=options, memory_pool=memory_pool)
 * 
 *     def view(self, object target_type):             # <<<<<<<<<<<<<<
 *         """
 *         Return zero-copy "view" of array as another data type.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("pyarrow.lib.Array.view", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF((PyObject *)__pyx_v_type);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":1186
 *         return pyarrow_wrap_array(result)
 * 
 *     def sum(self, **kwargs):             # <<<<<<<<<<<<<<
 *         """
 *         Sum the values in a numerical array.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_11sum(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_5Array_10sum, "Array.sum(self, **kwargs)\n\nSum the values in a numerical array.\n\nSee :func:`pyarrow.compute.sum` for full usage.\n\nParameters\n----------\n**kwargs : dict, optional\n    Options to pass to :func:`pyarrow.compute.sum`.\n\nReturns\n-------\nsum : Scalar\n    A scalar containing the sum value.");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_5Array_11sum = {"sum", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Array_11sum, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Array_10sum};
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_11sum(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_kwargs = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("sum (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("sum", 1, 0, 0, __pyx_nargs); return NULL; }
      const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
      if (unlikely(__pyx_kwds_len < 0)) return NULL;
      if (__pyx_kwds_len > 0) {
        if (unlikely(__Pyx_CheckKeywordStrings("sum", __pyx_kwds) == -1)) return NULL;
        __pyx_v_kwargs = __Pyx_KwargsAsDict_FASTCALL(__pyx_kwds, __pyx_kwvalues);
        if (unlikely(!__pyx_v_kwargs)) return NULL;
        __Pyx_GOTREF(__pyx_v_kwargs);
      } else {
        __pyx_v_kwargs = PyDict_New();
        if (unlikely(!__pyx_v_kwargs)) return NULL;
        __Pyx_GOTREF(__pyx_v_kwargs);
      }
      __pyx_r = __pyx_pf_7pyarrow_3lib_5Array_10sum(((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_v_self), __pyx_v_kwargs);

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

    static PyObject *__pyx_pf_7pyarrow_3lib_5Array_10sum(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self, PyObject *__pyx_v_kwargs) {
      PyObject *__pyx_v_options = NULL;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      size_t __pyx_t_4;
      PyObject *__pyx_t_5 = NULL;
      PyObject *__pyx_t_6 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("sum", 0);

      /* "pyarrow/array.pxi":1202
 *             A scalar containing the sum value.
 *         """
 *         self._assert_cpu()             # <<<<<<<<<<<<<<
 *         options = _pc().ScalarAggregateOptions(**kwargs)
 *         return _pc().call_function('sum', [self], options)
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_assert_cpu");
        __PYX_ERR(4, 1202, __pyx_L1_error)
      }
      ((struct __pyx_vtabstruct_7pyarrow_3lib_Array *)__pyx_v_self->__pyx_vtab)->_assert_cpu(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 1202, __pyx_L1_error)

      /* "pyarrow/array.pxi":1203
 *         """
 *         self._assert_cpu()
 *         options = _pc().ScalarAggregateOptions(**kwargs)             # <<<<<<<<<<<<<<
 *         return _pc().call_function('sum', [self], options)
 * 
*/
      __pyx_t_2 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_pc_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 1203, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
        assert(__pyx_t_2);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
        __pyx_t_4 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 1203, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_ScalarAggregateOptions); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 1203, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 1203, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_mstate_global->__pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 1203, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_v_options = __pyx_t_2;
      __pyx_t_2 = 0;

      /* "pyarrow/array.pxi":1204
 *         self._assert_cpu()
 *         options = _pc().ScalarAggregateOptions(**kwargs)
 *         return _pc().call_function('sum', [self], options)             # <<<<<<<<<<<<<<
 * 
 *     def unique(self):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_5 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_pc_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 1204, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_4 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
        assert(__pyx_t_5);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
        __pyx_t_4 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
        __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 1204, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      __pyx_t_1 = __pyx_t_3;
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 1204, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_INCREF((PyObject *)__pyx_v_self);
      __Pyx_GIVEREF((PyObject *)__pyx_v_self);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v_self)) != (0)) __PYX_ERR(4, 1204, __pyx_L1_error);
      __pyx_t_4 = 0;
      {
        PyObject *__pyx_callargs[4] = {__pyx_t_1, __pyx_mstate_global->__pyx_n_u_sum, __pyx_t_6, __pyx_v_options};
        __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_call_function, __pyx_callargs+__pyx_t_4, (4-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 1204, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
      }
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":1186
 *         return pyarrow_wrap_array(result)
 * 
 *     def sum(self, **kwargs):             # <<<<<<<<<<<<<<
 *         """
 *         Sum the values in a numerical array.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_AddTraceback("pyarrow.lib.Array.sum", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_options);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":1206
 *         return _pc().call_function('sum', [self], options)
 * 
 *     def unique(self):             # <<<<<<<<<<<<<<
 *         """
 *         Compute distinct elements in array.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_13unique(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_5Array_12unique, "Array.unique(self)\n\nCompute distinct elements in array.\n\nReturns\n-------\nunique : Array\n    An array of the same data type, with deduplicated elements.");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_5Array_13unique = {"unique", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Array_13unique, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Array_12unique};
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_13unique(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("unique (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("unique", 1, 0, 0, __pyx_nargs); return NULL; }
      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
      if (unlikely(__pyx_kwds_len < 0)) return NULL;
      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("unique", __pyx_kwds); return NULL;}
      __pyx_r = __pyx_pf_7pyarrow_3lib_5Array_12unique(((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_5Array_12unique(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      PyObject *__pyx_t_5 = NULL;
      size_t __pyx_t_6;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("unique", 0);

      /* "pyarrow/array.pxi":1215
 *             An array of the same data type, with deduplicated elements.
 *         """
 *         self._assert_cpu()             # <<<<<<<<<<<<<<
 *         return _pc().call_function('unique', [self])
 * 
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_assert_cpu");
        __PYX_ERR(4, 1215, __pyx_L1_error)
      }
      ((struct __pyx_vtabstruct_7pyarrow_3lib_Array *)__pyx_v_self->__pyx_vtab)->_assert_cpu(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 1215, __pyx_L1_error)

      /* "pyarrow/array.pxi":1216
 *         """
 *         self._assert_cpu()
 *         return _pc().call_function('unique', [self])             # <<<<<<<<<<<<<<
 * 
 *     def dictionary_encode(self, null_encoding='mask'):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_4 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pc_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 1216, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
        assert(__pyx_t_4);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
        __pyx_t_6 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
        __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 1216, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      __pyx_t_2 = __pyx_t_3;
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 1216, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_INCREF((PyObject *)__pyx_v_self);
      __Pyx_GIVEREF((PyObject *)__pyx_v_self);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_self)) != (0)) __PYX_ERR(4, 1216, __pyx_L1_error);
      __pyx_t_6 = 0;
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_mstate_global->__pyx_n_u_unique, __pyx_t_5};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_call_function, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 1216, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":1206
 *         return _pc().call_function('sum', [self], options)
 * 
 *     def unique(self):             # <<<<<<<<<<<<<<
 *         """
 *         Compute distinct elements in array.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_AddTraceback("pyarrow.lib.Array.unique", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":1218
 *         return _pc().call_function('unique', [self])
 * 
 *     def dictionary_encode(self, null_encoding='mask'):             # <<<<<<<<<<<<<<
 *         """
 *         Compute dictionary-encoded representation of array.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_15dictionary_encode(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_5Array_14dictionary_encode, "Array.dictionary_encode(self, null_encoding='mask')\n\nCompute dictionary-encoded representation of array.\n\nSee :func:`pyarrow.compute.dictionary_encode` for full usage.\n\nParameters\n----------\nnull_encoding : str, default \"mask\"\n    How to handle null entries.\n\nReturns\n-------\nencoded : DictionaryArray\n    A dictionary-encoded version of this array.");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_5Array_15dictionary_encode = {"dictionary_encode", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Array_15dictionary_encode, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Array_14dictionary_encode};
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_15dictionary_encode(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_null_encoding = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("dictionary_encode (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_null_encoding,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(4, 1218, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 1218, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "dictionary_encode", 0) < (0)) __PYX_ERR(4, 1218, __pyx_L3_error)
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_n_u_mask));
        } else {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 1218, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_n_u_mask));
        }
        __pyx_v_null_encoding = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("dictionary_encode", 0, 0, 1, __pyx_nargs); __PYX_ERR(4, 1218, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.Array.dictionary_encode", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_5Array_14dictionary_encode(((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_v_self), __pyx_v_null_encoding);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_5Array_14dictionary_encode(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self, PyObject *__pyx_v_null_encoding) {
      PyObject *__pyx_v_options = NULL;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      PyObject *__pyx_t_5 = NULL;
      size_t __pyx_t_6;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("dictionary_encode", 0);

      /* "pyarrow/array.pxi":1234
 *             A dictionary-encoded version of this array.
 *         """
 *         self._assert_cpu()             # <<<<<<<<<<<<<<
 *         options = _pc().DictionaryEncodeOptions(null_encoding)
 *         return _pc().call_function('dictionary_encode', [self], options)
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_assert_cpu");
        __PYX_ERR(4, 1234, __pyx_L1_error)
      }
      ((struct __pyx_vtabstruct_7pyarrow_3lib_Array *)__pyx_v_self->__pyx_vtab)->_assert_cpu(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 1234, __pyx_L1_error)

      /* "pyarrow/array.pxi":1235
 *         """
 *         self._assert_cpu()
 *         options = _pc().DictionaryEncodeOptions(null_encoding)             # <<<<<<<<<<<<<<
 *         return _pc().call_function('dictionary_encode', [self], options)
 * 
*/
      __pyx_t_4 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pc_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 1235, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
        assert(__pyx_t_4);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
        __pyx_t_6 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
        __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 1235, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      __pyx_t_2 = __pyx_t_3;
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_6 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_null_encoding};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_DictionaryEncodeOptions, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 1235, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_v_options = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "pyarrow/array.pxi":1236
 *         self._assert_cpu()
 *         options = _pc().DictionaryEncodeOptions(null_encoding)
 *         return _pc().call_function('dictionary_encode', [self], options)             # <<<<<<<<<<<<<<
 * 
 *     def value_counts(self):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_5 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_pc_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 1236, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_6 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
        assert(__pyx_t_5);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
        __pyx_t_6 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
        __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 1236, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
      }
      __pyx_t_3 = __pyx_t_2;
      __Pyx_INCREF(__pyx_t_3);
      __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 1236, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_INCREF((PyObject *)__pyx_v_self);
      __Pyx_GIVEREF((PyObject *)__pyx_v_self);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_self)) != (0)) __PYX_ERR(4, 1236, __pyx_L1_error);
      __pyx_t_6 = 0;
      {
        PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_mstate_global->__pyx_n_u_dictionary_encode, __pyx_t_4, __pyx_v_options};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_call_function, __pyx_callargs+__pyx_t_6, (4-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 1236, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":1218
 *         return _pc().call_function('unique', [self])
 * 
 *     def dictionary_encode(self, null_encoding='mask'):             # <<<<<<<<<<<<<<
 *         """
 *         Compute dictionary-encoded representation of array.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_AddTraceback("pyarrow.lib.Array.dictionary_encode", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_options);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":1238
 *         return _pc().call_function('dictionary_encode', [self], options)
 * 
 *     def value_counts(self):             # <<<<<<<<<<<<<<
 *         """
 *         Compute counts of unique elements in array.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_17value_counts(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_5Array_16value_counts, "Array.value_counts(self)\n\nCompute counts of unique elements in array.\n\nReturns\n-------\nStructArray\n    An array of  <input type \"Values\", int64 \"Counts\"> structs");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_5Array_17value_counts = {"value_counts", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Array_17value_counts, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Array_16value_counts};
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_17value_counts(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("value_counts (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("value_counts", 1, 0, 0, __pyx_nargs); return NULL; }
      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
      if (unlikely(__pyx_kwds_len < 0)) return NULL;
      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("value_counts", __pyx_kwds); return NULL;}
      __pyx_r = __pyx_pf_7pyarrow_3lib_5Array_16value_counts(((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_5Array_16value_counts(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      PyObject *__pyx_t_5 = NULL;
      size_t __pyx_t_6;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("value_counts", 0);

      /* "pyarrow/array.pxi":1247
 *             An array of  <input type "Values", int64 "Counts"> structs
 *         """
 *         self._assert_cpu()             # <<<<<<<<<<<<<<
 *         return _pc().call_function('value_counts', [self])
 * 
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_assert_cpu");
        __PYX_ERR(4, 1247, __pyx_L1_error)
      }
      ((struct __pyx_vtabstruct_7pyarrow_3lib_Array *)__pyx_v_self->__pyx_vtab)->_assert_cpu(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 1247, __pyx_L1_error)

      /* "pyarrow/array.pxi":1248
 *         """
 *         self._assert_cpu()
 *         return _pc().call_function('value_counts', [self])             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_4 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pc_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 1248, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
        assert(__pyx_t_4);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
        __pyx_t_6 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
        __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 1248, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      __pyx_t_2 = __pyx_t_3;
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 1248, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_INCREF((PyObject *)__pyx_v_self);
      __Pyx_GIVEREF((PyObject *)__pyx_v_self);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_self)) != (0)) __PYX_ERR(4, 1248, __pyx_L1_error);
      __pyx_t_6 = 0;
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_mstate_global->__pyx_n_u_value_counts, __pyx_t_5};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_call_function, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 1248, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":1238
 *         return _pc().call_function('dictionary_encode', [self], options)
 * 
 *     def value_counts(self):             # <<<<<<<<<<<<<<
 *         """
 *         Compute counts of unique elements in array.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_AddTraceback("pyarrow.lib.Array.value_counts", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":1250
 *         return _pc().call_function('value_counts', [self])
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_pandas(obj, mask=None, type=None, bint safe=True,
 *                     MemoryPool memory_pool=None):
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_19from_pandas(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_5Array_18from_pandas, "Array.from_pandas(obj, mask=None, type=None, bool safe=True, MemoryPool memory_pool=None)\n\nConvert pandas.Series to an Arrow Array.\n\nThis method uses Pandas semantics about what values indicate\nnulls. See pyarrow.array for more general conversion from arrays or\nsequences to Arrow arrays.\n\nParameters\n----------\nobj : ndarray, pandas.Series, array-like\nmask : array (boolean), optional\n    Indicate which values are null (True) or not null (False).\ntype : pyarrow.DataType\n    Explicit type to attempt to coerce to, otherwise will be inferred\n    from the data.\nsafe : bool, default True\n    Check for overflows or other unsafe conversions.\nmemory_pool : pyarrow.MemoryPool, optional\n    If not passed, will allocate memory from the currently-set default\n    memory pool.\n\nNotes\n-----\nLocalized timestamps will currently be returned as UTC (pandas's native\nrepresentation). Timezone-naive data will be implicitly interpreted as\nUTC.\n\nReturns\n-------\narray : pyarrow.Array or pyarrow.ChunkedArray\n    ChunkedArray is returned if object data overflows binary buffer.");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_5Array_19from_pandas = {"from_pandas", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Array_19from_pandas, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Array_18from_pandas};
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_19from_pandas(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_obj = 0;
      PyObject *__pyx_v_mask = 0;
      PyObject *__pyx_v_type = 0;
      int __pyx_v_safe;
      struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_memory_pool = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[5] = {0,0,0,0,0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("from_pandas (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_obj,&__pyx_mstate_global->__pyx_n_u_mask,&__pyx_mstate_global->__pyx_n_u_type,&__pyx_mstate_global->__pyx_n_u_safe,&__pyx_mstate_global->__pyx_n_u_memory_pool,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(4, 1250, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  5:
            values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(4, 1250, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  4:
            values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(4, 1250, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  3:
            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(4, 1250, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(4, 1250, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 1250, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "from_pandas", 0) < (0)) __PYX_ERR(4, 1250, __pyx_L3_error)

          /* "pyarrow/array.pxi":1251
 * 
 *     @staticmethod
 *     def from_pandas(obj, mask=None, type=None, bint safe=True,             # <<<<<<<<<<<<<<
 *                     MemoryPool memory_pool=None):
 *         """
*/
          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
          if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));

          /* "pyarrow/array.pxi":1252
 *     @staticmethod
 *     def from_pandas(obj, mask=None, type=None, bint safe=True,
 *                     MemoryPool memory_pool=None):             # <<<<<<<<<<<<<<
 *         """
 *         Convert pandas.Series to an Arrow Array.
*/
          if (!values[4]) values[4] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)Py_None));
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("from_pandas", 0, 1, 5, i); __PYX_ERR(4, 1250, __pyx_L3_error) }
          }
        } else {
          switch (__pyx_nargs) {
            case  5:
            values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(4, 1250, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  4:
            values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(4, 1250, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  3:
            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(4, 1250, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(4, 1250, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 1250, __pyx_L3_error)
            break;
            default: goto __pyx_L5_argtuple_error;
          }

          /* "pyarrow/array.pxi":1251
 * 
 *     @staticmethod
 *     def from_pandas(obj, mask=None, type=None, bint safe=True,             # <<<<<<<<<<<<<<
 *                     MemoryPool memory_pool=None):
 *         """
*/
          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
          if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));

          /* "pyarrow/array.pxi":1252
 *     @staticmethod
 *     def from_pandas(obj, mask=None, type=None, bint safe=True,
 *                     MemoryPool memory_pool=None):             # <<<<<<<<<<<<<<
 *         """
 *         Convert pandas.Series to an Arrow Array.
*/
          if (!values[4]) values[4] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)Py_None));
        }
        __pyx_v_obj = values[0];
        __pyx_v_mask = values[1];
        __pyx_v_type = values[2];
        if (values[3]) {
          __pyx_v_safe = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_safe == (int)-1) && PyErr_Occurred())) __PYX_ERR(4, 1251, __pyx_L3_error)
        } else {

          /* "pyarrow/array.pxi":1251
 * 
 *     @staticmethod
 *     def from_pandas(obj, mask=None, type=None, bint safe=True,             # <<<<<<<<<<<<<<
 *                     MemoryPool memory_pool=None):
 *         """
*/
          __pyx_v_safe = ((int)1);
        }
        __pyx_v_memory_pool = ((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)values[4]);
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("from_pandas", 0, 1, 5, __pyx_nargs); __PYX_ERR(4, 1250, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.Array.from_pandas", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_memory_pool), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_MemoryPool, 1, "memory_pool", 0))) __PYX_ERR(4, 1252, __pyx_L1_error)
      __pyx_r = __pyx_pf_7pyarrow_3lib_5Array_18from_pandas(__pyx_v_obj, __pyx_v_mask, __pyx_v_type, __pyx_v_safe, __pyx_v_memory_pool);

      /* "pyarrow/array.pxi":1250
 *         return _pc().call_function('value_counts', [self])
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_pandas(obj, mask=None, type=None, bint safe=True,
 *                     MemoryPool memory_pool=None):
*/

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = NULL;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      goto __pyx_L7_cleaned_up;
      __pyx_L0:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __pyx_L7_cleaned_up:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_5Array_18from_pandas(PyObject *__pyx_v_obj, PyObject *__pyx_v_mask, PyObject *__pyx_v_type, int __pyx_v_safe, struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_memory_pool) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      size_t __pyx_t_5;
      PyObject *__pyx_t_6 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("from_pandas", 0);

      /* "pyarrow/array.pxi":1285
 *             ChunkedArray is returned if object data overflows binary buffer.
 *         """
 *         return array(obj, mask=mask, type=type, safe=safe, from_pandas=True,             # <<<<<<<<<<<<<<
 *                      memory_pool=memory_pool)
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 1285, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_safe); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 1285, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);

      /* "pyarrow/array.pxi":1286
 *         """
 *         return array(obj, mask=mask, type=type, safe=safe, from_pandas=True,
 *                      memory_pool=memory_pool)             # <<<<<<<<<<<<<<
 * 
 *     def __reduce__(self):
*/
      __pyx_t_5 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
        assert(__pyx_t_2);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
        __pyx_t_5 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 5 : 0)] = {__pyx_t_2, __pyx_v_obj};
        __pyx_t_6 = __Pyx_MakeVectorcallBuilderKwds(5); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 1285, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_mask, __pyx_v_mask, __pyx_t_6, __pyx_callargs+2, 0) < (0)) __PYX_ERR(4, 1285, __pyx_L1_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_type, __pyx_v_type, __pyx_t_6, __pyx_callargs+2, 1) < (0)) __PYX_ERR(4, 1285, __pyx_L1_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_safe, __pyx_t_4, __pyx_t_6, __pyx_callargs+2, 2) < (0)) __PYX_ERR(4, 1285, __pyx_L1_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_from_pandas, Py_True, __pyx_t_6, __pyx_callargs+2, 3) < (0)) __PYX_ERR(4, 1285, __pyx_L1_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_memory_pool, ((PyObject *)__pyx_v_memory_pool), __pyx_t_6, __pyx_callargs+2, 4) < (0)) __PYX_ERR(4, 1285, __pyx_L1_error)
        __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_6);
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 1285, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":1250
 *         return _pc().call_function('value_counts', [self])
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_pandas(obj, mask=None, type=None, bint safe=True,
 *                     MemoryPool memory_pool=None):
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_AddTraceback("pyarrow.lib.Array.from_pandas", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":1288
 *                      memory_pool=memory_pool)
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         self._assert_cpu()
 *         return _restore_array, \
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_21__reduce__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_5Array_20__reduce__, "Array.__reduce__(self)");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_5Array_21__reduce__ = {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Array_21__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Array_20__reduce__};
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_21__reduce__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__reduce__ (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce__", 1, 0, 0, __pyx_nargs); return NULL; }
      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
      if (unlikely(__pyx_kwds_len < 0)) return NULL;
      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce__", __pyx_kwds); return NULL;}
      __pyx_r = __pyx_pf_7pyarrow_3lib_5Array_20__reduce__(((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_v_self));

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

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

      /* "pyarrow/array.pxi":1289
 * 
 *     def __reduce__(self):
 *         self._assert_cpu()             # <<<<<<<<<<<<<<
 *         return _restore_array, \
 *             (_reduce_array_data(self.sp_array.get().data().get()),)
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_assert_cpu");
        __PYX_ERR(4, 1289, __pyx_L1_error)
      }
      ((struct __pyx_vtabstruct_7pyarrow_3lib_Array *)__pyx_v_self->__pyx_vtab)->_assert_cpu(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 1289, __pyx_L1_error)

      /* "pyarrow/array.pxi":1290
 *     def __reduce__(self):
 *         self._assert_cpu()
 *         return _restore_array, \             # <<<<<<<<<<<<<<
 *             (_reduce_array_data(self.sp_array.get().data().get()),)
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_restore_array); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 1290, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);

      /* "pyarrow/array.pxi":1291
 *         self._assert_cpu()
 *         return _restore_array, \
 *             (_reduce_array_data(self.sp_array.get().data().get()),)             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_array");
        __PYX_ERR(4, 1291, __pyx_L1_error)
      }
      __pyx_t_2 = __pyx_f_7pyarrow_3lib__reduce_array_data(__pyx_v_self->sp_array.get()->data().get()); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 1291, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 1291, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_2);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2) != (0)) __PYX_ERR(4, 1291, __pyx_L1_error);
      __pyx_t_2 = 0;

      /* "pyarrow/array.pxi":1290
 *     def __reduce__(self):
 *         self._assert_cpu()
 *         return _restore_array, \             # <<<<<<<<<<<<<<
 *             (_reduce_array_data(self.sp_array.get().data().get()),)
 * 
*/
      __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 1290, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_1);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1) != (0)) __PYX_ERR(4, 1290, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_3);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3) != (0)) __PYX_ERR(4, 1290, __pyx_L1_error);
      __pyx_t_1 = 0;
      __pyx_t_3 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":1288
 *                      memory_pool=memory_pool)
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         self._assert_cpu()
 *         return _restore_array, \
*/

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

    /* "pyarrow/array.pxi":1293
 *             (_reduce_array_data(self.sp_array.get().data().get()),)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_buffers(DataType type, length, buffers, null_count=-1, offset=0,
 *                      children=None):
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_23from_buffers(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_5Array_22from_buffers, "Array.from_buffers(DataType type, length, buffers, null_count=-1, offset=0, children=None)\n\nConstruct an Array from a sequence of buffers.\n\nThe concrete type returned depends on the datatype.\n\nParameters\n----------\ntype : DataType\n    The value type of the array.\nlength : int\n    The number of values in the array.\nbuffers : List[Buffer]\n    The buffers backing this array.\nnull_count : int, default -1\n    The number of null entries in the array. Negative value means that\n    the null count is not known.\noffset : int, default 0\n    The array's logical offset (in values, not in bytes) from the\n    start of each buffer.\nchildren : List[Array], default None\n    Nested type children with length matching type.num_fields.\n\nReturns\n-------\narray : Array");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_5Array_23from_buffers = {"from_buffers", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Array_23from_buffers, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Array_22from_buffers};
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_23from_buffers(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v_type = 0;
      PyObject *__pyx_v_length = 0;
      PyObject *__pyx_v_buffers = 0;
      PyObject *__pyx_v_null_count = 0;
      PyObject *__pyx_v_offset = 0;
      PyObject *__pyx_v_children = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[6] = {0,0,0,0,0,0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("from_buffers (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_type,&__pyx_mstate_global->__pyx_n_u_length,&__pyx_mstate_global->__pyx_n_u_buffers,&__pyx_mstate_global->__pyx_n_u_null_count,&__pyx_mstate_global->__pyx_n_u_offset,&__pyx_mstate_global->__pyx_n_u_children,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(4, 1293, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  6:
            values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(4, 1293, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  5:
            values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(4, 1293, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  4:
            values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(4, 1293, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  3:
            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(4, 1293, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(4, 1293, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 1293, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "from_buffers", 0) < (0)) __PYX_ERR(4, 1293, __pyx_L3_error)
          if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_int_neg_1));
          if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_int_0));

          /* "pyarrow/array.pxi":1295
 *     @staticmethod
 *     def from_buffers(DataType type, length, buffers, null_count=-1, offset=0,
 *                      children=None):             # <<<<<<<<<<<<<<
 *         """
 *         Construct an Array from a sequence of buffers.
*/
          if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)Py_None));
          for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("from_buffers", 0, 3, 6, i); __PYX_ERR(4, 1293, __pyx_L3_error) }
          }
        } else {
          switch (__pyx_nargs) {
            case  6:
            values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(4, 1293, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  5:
            values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(4, 1293, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  4:
            values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(4, 1293, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  3:
            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(4, 1293, __pyx_L3_error)
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(4, 1293, __pyx_L3_error)
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 1293, __pyx_L3_error)
            break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_int_neg_1));
          if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_int_0));
          if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)Py_None));
        }
        __pyx_v_type = ((struct __pyx_obj_7pyarrow_3lib_DataType *)values[0]);
        __pyx_v_length = values[1];
        __pyx_v_buffers = values[2];
        __pyx_v_null_count = values[3];
        __pyx_v_offset = values[4];
        __pyx_v_children = values[5];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("from_buffers", 0, 3, 6, __pyx_nargs); __PYX_ERR(4, 1293, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.Array.from_buffers", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_type), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType, 1, "type", 0))) __PYX_ERR(4, 1294, __pyx_L1_error)
      __pyx_r = __pyx_pf_7pyarrow_3lib_5Array_22from_buffers(__pyx_v_type, __pyx_v_length, __pyx_v_buffers, __pyx_v_null_count, __pyx_v_offset, __pyx_v_children);

      /* "pyarrow/array.pxi":1293
 *             (_reduce_array_data(self.sp_array.get().data().get()),)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_buffers(DataType type, length, buffers, null_count=-1, offset=0,
 *                      children=None):
*/

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = NULL;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      goto __pyx_L7_cleaned_up;
      __pyx_L0:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __pyx_L7_cleaned_up:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_5Array_22from_buffers(struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v_type, PyObject *__pyx_v_length, PyObject *__pyx_v_buffers, PyObject *__pyx_v_null_count, PyObject *__pyx_v_offset, PyObject *__pyx_v_children) {
      struct __pyx_obj_7pyarrow_3lib_Buffer *__pyx_v_buf = 0;
      struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_child = 0;
      std::vector<std::shared_ptr< arrow::Buffer> >  __pyx_v_c_buffers;
      std::vector<std::shared_ptr< arrow::ArrayData> >  __pyx_v_c_child_data;
      std::shared_ptr< arrow::ArrayData>  __pyx_v_array_data;
      struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_result = 0;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_t_2;
      PyObject *__pyx_t_3 = NULL;
      Py_ssize_t __pyx_t_4;
      PyObject *__pyx_t_5 = NULL;
      PyObject *__pyx_t_6 = NULL;
      PyObject *__pyx_t_7[5];
      PyObject *__pyx_t_8 = NULL;
      size_t __pyx_t_9;
      PyObject *(*__pyx_t_10)(PyObject *);
      std::shared_ptr< arrow::Buffer>  __pyx_t_11;
      int64_t __pyx_t_12;
      int64_t __pyx_t_13;
      int64_t __pyx_t_14;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("from_buffers", 0);
      __Pyx_INCREF(__pyx_v_children);

      /* "pyarrow/array.pxi":1329
 *             shared_ptr[CArrayData] array_data
 * 
 *         children = children or []             # <<<<<<<<<<<<<<
 * 
 *         if type.num_fields != len(children):
*/
      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_children); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(4, 1329, __pyx_L1_error)
      if (!__pyx_t_2) {
      } else {
        __Pyx_INCREF(__pyx_v_children);
        __pyx_t_1 = __pyx_v_children;
        goto __pyx_L3_bool_binop_done;
      }
      __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 1329, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_3);
      __pyx_t_1 = __pyx_t_3;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_L3_bool_binop_done:;
      __Pyx_DECREF_SET(__pyx_v_children, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "pyarrow/array.pxi":1331
 *         children = children or []
 * 
 *         if type.num_fields != len(children):             # <<<<<<<<<<<<<<
 *             raise ValueError("Type's expected number of children "
 *                              f"({type.num_fields}) did not match the passed number "
*/
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_type), __pyx_mstate_global->__pyx_n_u_num_fields); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 1331, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_4 = PyObject_Length(__pyx_v_children); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(4, 1331, __pyx_L1_error)
      __pyx_t_3 = PyLong_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 1331, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 1331, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(4, 1331, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(__pyx_t_2)) {

        /* "pyarrow/array.pxi":1332
 * 
 *         if type.num_fields != len(children):
 *             raise ValueError("Type's expected number of children "             # <<<<<<<<<<<<<<
 *                              f"({type.num_fields}) did not match the passed number "
 *                              f"({len(children)})")
*/
        __pyx_t_3 = NULL;

        /* "pyarrow/array.pxi":1333
 *         if type.num_fields != len(children):
 *             raise ValueError("Type's expected number of children "
 *                              f"({type.num_fields}) did not match the passed number "             # <<<<<<<<<<<<<<
 *                              f"({len(children)})")
 * 
*/
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_type), __pyx_mstate_global->__pyx_n_u_num_fields); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 1333, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_1, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 1333, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

        /* "pyarrow/array.pxi":1334
 *             raise ValueError("Type's expected number of children "
 *                              f"({type.num_fields}) did not match the passed number "
 *                              f"({len(children)})")             # <<<<<<<<<<<<<<
 * 
 *         if type.has_variadic_buffers:
*/
        __pyx_t_4 = PyObject_Length(__pyx_v_children); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(4, 1334, __pyx_L1_error)
        __pyx_t_1 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_t_4, 0, ' ', 'd'); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 1334, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_7[0] = __pyx_mstate_global->__pyx_kp_u_Type_s_expected_number_of_childr;
        __pyx_t_7[1] = __pyx_t_6;
        __pyx_t_7[2] = __pyx_mstate_global->__pyx_kp_u_did_not_match_the_passed_number;
        __pyx_t_7[3] = __pyx_t_1;
        __pyx_t_7[4] = __pyx_mstate_global->__pyx_kp_u__7;

        /* "pyarrow/array.pxi":1332
 * 
 *         if type.num_fields != len(children):
 *             raise ValueError("Type's expected number of children "             # <<<<<<<<<<<<<<
 *                              f"({type.num_fields}) did not match the passed number "
 *                              f"({len(children)})")
*/
        __pyx_t_8 = __Pyx_PyUnicode_Join(__pyx_t_7, 5, 36 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6) + 35 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6));
        if (unlikely(!__pyx_t_8)) __PYX_ERR(4, 1332, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_9 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_8};
          __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 1332, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
        }
        __Pyx_Raise(__pyx_t_5, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __PYX_ERR(4, 1332, __pyx_L1_error)

        /* "pyarrow/array.pxi":1331
 *         children = children or []
 * 
 *         if type.num_fields != len(children):             # <<<<<<<<<<<<<<
 *             raise ValueError("Type's expected number of children "
 *                              f"({type.num_fields}) did not match the passed number "
*/
      }

      /* "pyarrow/array.pxi":1336
 *                              f"({len(children)})")
 * 
 *         if type.has_variadic_buffers:             # <<<<<<<<<<<<<<
 *             if type.num_buffers > len(buffers):
 *                 raise ValueError("Type's expected number of buffers is at least "
*/
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_type), __pyx_mstate_global->__pyx_n_u_has_variadic_buffers); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 1336, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(4, 1336, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (__pyx_t_2) {

        /* "pyarrow/array.pxi":1337
 * 
 *         if type.has_variadic_buffers:
 *             if type.num_buffers > len(buffers):             # <<<<<<<<<<<<<<
 *                 raise ValueError("Type's expected number of buffers is at least "
 *                                  f"{type.num_buffers}, but the passed number is "
*/
        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_type), __pyx_mstate_global->__pyx_n_u_num_buffers); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 1337, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_4 = PyObject_Length(__pyx_v_buffers); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(4, 1337, __pyx_L1_error)
        __pyx_t_8 = PyLong_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(4, 1337, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_3 = PyObject_RichCompare(__pyx_t_5, __pyx_t_8, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 1337, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __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(4, 1337, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(__pyx_t_2)) {

          /* "pyarrow/array.pxi":1338
 *         if type.has_variadic_buffers:
 *             if type.num_buffers > len(buffers):
 *                 raise ValueError("Type's expected number of buffers is at least "             # <<<<<<<<<<<<<<
 *                                  f"{type.num_buffers}, but the passed number is "
 *                                  f"{len(buffers)}.")
*/
          __pyx_t_8 = NULL;

          /* "pyarrow/array.pxi":1339
 *             if type.num_buffers > len(buffers):
 *                 raise ValueError("Type's expected number of buffers is at least "
 *                                  f"{type.num_buffers}, but the passed number is "             # <<<<<<<<<<<<<<
 *                                  f"{len(buffers)}.")
 *         elif type.num_buffers != len(buffers):
*/
          __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_type), __pyx_mstate_global->__pyx_n_u_num_buffers); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 1339, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 1339, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

          /* "pyarrow/array.pxi":1340
 *                 raise ValueError("Type's expected number of buffers is at least "
 *                                  f"{type.num_buffers}, but the passed number is "
 *                                  f"{len(buffers)}.")             # <<<<<<<<<<<<<<
 *         elif type.num_buffers != len(buffers):
 *             raise ValueError("Type's expected number of buffers "
*/
          __pyx_t_4 = PyObject_Length(__pyx_v_buffers); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(4, 1340, __pyx_L1_error)
          __pyx_t_5 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_t_4, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 1340, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_7[0] = __pyx_mstate_global->__pyx_kp_u_Type_s_expected_number_of_buffer;
          __pyx_t_7[1] = __pyx_t_1;
          __pyx_t_7[2] = __pyx_mstate_global->__pyx_kp_u_but_the_passed_number_is;
          __pyx_t_7[3] = __pyx_t_5;
          __pyx_t_7[4] = __pyx_mstate_global->__pyx_kp_u_;

          /* "pyarrow/array.pxi":1338
 *         if type.has_variadic_buffers:
 *             if type.num_buffers > len(buffers):
 *                 raise ValueError("Type's expected number of buffers is at least "             # <<<<<<<<<<<<<<
 *                                  f"{type.num_buffers}, but the passed number is "
 *                                  f"{len(buffers)}.")
*/
          __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_7, 5, 46 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1) + 27 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1));
          if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 1338, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_9 = 1;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_6};
            __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 1338, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
          }
          __Pyx_Raise(__pyx_t_3, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __PYX_ERR(4, 1338, __pyx_L1_error)

          /* "pyarrow/array.pxi":1337
 * 
 *         if type.has_variadic_buffers:
 *             if type.num_buffers > len(buffers):             # <<<<<<<<<<<<<<
 *                 raise ValueError("Type's expected number of buffers is at least "
 *                                  f"{type.num_buffers}, but the passed number is "
*/
        }

        /* "pyarrow/array.pxi":1336
 *                              f"({len(children)})")
 * 
 *         if type.has_variadic_buffers:             # <<<<<<<<<<<<<<
 *             if type.num_buffers > len(buffers):
 *                 raise ValueError("Type's expected number of buffers is at least "
*/
        goto __pyx_L6;
      }

      /* "pyarrow/array.pxi":1341
 *                                  f"{type.num_buffers}, but the passed number is "
 *                                  f"{len(buffers)}.")
 *         elif type.num_buffers != len(buffers):             # <<<<<<<<<<<<<<
 *             raise ValueError("Type's expected number of buffers "
 *                              f"({type.num_buffers}) did not match the passed number "
*/
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_type), __pyx_mstate_global->__pyx_n_u_num_buffers); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 1341, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = PyObject_Length(__pyx_v_buffers); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(4, 1341, __pyx_L1_error)
      __pyx_t_6 = PyLong_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 1341, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_8 = PyObject_RichCompare(__pyx_t_3, __pyx_t_6, Py_NE); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(4, 1341, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(4, 1341, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(__pyx_t_2)) {

        /* "pyarrow/array.pxi":1342
 *                                  f"{len(buffers)}.")
 *         elif type.num_buffers != len(buffers):
 *             raise ValueError("Type's expected number of buffers "             # <<<<<<<<<<<<<<
 *                              f"({type.num_buffers}) did not match the passed number "
 *                              f"({len(buffers)}).")
*/
        __pyx_t_6 = NULL;

        /* "pyarrow/array.pxi":1343
 *         elif type.num_buffers != len(buffers):
 *             raise ValueError("Type's expected number of buffers "
 *                              f"({type.num_buffers}) did not match the passed number "             # <<<<<<<<<<<<<<
 *                              f"({len(buffers)}).")
 * 
*/
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_type), __pyx_mstate_global->__pyx_n_u_num_buffers); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 1343, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_t_3, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 1343, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

        /* "pyarrow/array.pxi":1344
 *             raise ValueError("Type's expected number of buffers "
 *                              f"({type.num_buffers}) did not match the passed number "
 *                              f"({len(buffers)}).")             # <<<<<<<<<<<<<<
 * 
 *         for buf in buffers:
*/
        __pyx_t_4 = PyObject_Length(__pyx_v_buffers); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(4, 1344, __pyx_L1_error)
        __pyx_t_3 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_t_4, 0, ' ', 'd'); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 1344, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_7[0] = __pyx_mstate_global->__pyx_kp_u_Type_s_expected_number_of_buffer_2;
        __pyx_t_7[1] = __pyx_t_5;
        __pyx_t_7[2] = __pyx_mstate_global->__pyx_kp_u_did_not_match_the_passed_number;
        __pyx_t_7[3] = __pyx_t_3;
        __pyx_t_7[4] = __pyx_mstate_global->__pyx_kp_u__13;

        /* "pyarrow/array.pxi":1342
 *                                  f"{len(buffers)}.")
 *         elif type.num_buffers != len(buffers):
 *             raise ValueError("Type's expected number of buffers "             # <<<<<<<<<<<<<<
 *                              f"({type.num_buffers}) did not match the passed number "
 *                              f"({len(buffers)}).")
*/
        __pyx_t_1 = __Pyx_PyUnicode_Join(__pyx_t_7, 5, 35 * 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + 2, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5));
        if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 1342, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_9 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_1};
          __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          if (unlikely(!__pyx_t_8)) __PYX_ERR(4, 1342, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
        }
        __Pyx_Raise(__pyx_t_8, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __PYX_ERR(4, 1342, __pyx_L1_error)

        /* "pyarrow/array.pxi":1341
 *                                  f"{type.num_buffers}, but the passed number is "
 *                                  f"{len(buffers)}.")
 *         elif type.num_buffers != len(buffers):             # <<<<<<<<<<<<<<
 *             raise ValueError("Type's expected number of buffers "
 *                              f"({type.num_buffers}) did not match the passed number "
*/
      }
      __pyx_L6:;

      /* "pyarrow/array.pxi":1346
 *                              f"({len(buffers)}).")
 * 
 *         for buf in buffers:             # <<<<<<<<<<<<<<
 *             # None will produce a null buffer pointer
 *             c_buffers.push_back(pyarrow_unwrap_buffer(buf))
*/
      if (likely(PyList_CheckExact(__pyx_v_buffers)) || PyTuple_CheckExact(__pyx_v_buffers)) {
        __pyx_t_8 = __pyx_v_buffers; __Pyx_INCREF(__pyx_t_8);
        __pyx_t_4 = 0;
        __pyx_t_10 = NULL;
      } else {
        __pyx_t_4 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_v_buffers); if (unlikely(!__pyx_t_8)) __PYX_ERR(4, 1346, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_10 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_8); if (unlikely(!__pyx_t_10)) __PYX_ERR(4, 1346, __pyx_L1_error)
      }
      for (;;) {
        if (likely(!__pyx_t_10)) {
          if (likely(PyList_CheckExact(__pyx_t_8))) {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_8);
              #if !CYTHON_ASSUME_SAFE_SIZE
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(4, 1346, __pyx_L1_error)
              #endif
              if (__pyx_t_4 >= __pyx_temp) break;
            }
            __pyx_t_1 = __Pyx_PyList_GetItemRefFast(__pyx_t_8, __pyx_t_4, __Pyx_ReferenceSharing_OwnStrongReference);
            ++__pyx_t_4;
          } else {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_8);
              #if !CYTHON_ASSUME_SAFE_SIZE
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(4, 1346, __pyx_L1_error)
              #endif
              if (__pyx_t_4 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_1 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_4));
            #else
            __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_8, __pyx_t_4);
            #endif
            ++__pyx_t_4;
          }
          if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 1346, __pyx_L1_error)
        } else {
          __pyx_t_1 = __pyx_t_10(__pyx_t_8);
          if (unlikely(!__pyx_t_1)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(4, 1346, __pyx_L1_error)
              PyErr_Clear();
            }
            break;
          }
        }
        __Pyx_GOTREF(__pyx_t_1);
        if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Buffer))))) __PYX_ERR(4, 1346, __pyx_L1_error)
        __Pyx_XDECREF_SET(__pyx_v_buf, ((struct __pyx_obj_7pyarrow_3lib_Buffer *)__pyx_t_1));
        __pyx_t_1 = 0;

        /* "pyarrow/array.pxi":1348
 *         for buf in buffers:
 *             # None will produce a null buffer pointer
 *             c_buffers.push_back(pyarrow_unwrap_buffer(buf))             # <<<<<<<<<<<<<<
 * 
 *         for child in children:
*/
        __pyx_t_11 = pyarrow_unwrap_buffer(((PyObject *)__pyx_v_buf)); if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 1348, __pyx_L1_error)
        try {
          __pyx_v_c_buffers.push_back(__pyx_t_11);
        } catch(...) {
          __Pyx_CppExn2PyErr();
          __PYX_ERR(4, 1348, __pyx_L1_error)
        }

        /* "pyarrow/array.pxi":1346
 *                              f"({len(buffers)}).")
 * 
 *         for buf in buffers:             # <<<<<<<<<<<<<<
 *             # None will produce a null buffer pointer
 *             c_buffers.push_back(pyarrow_unwrap_buffer(buf))
*/
      }
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

      /* "pyarrow/array.pxi":1350
 *             c_buffers.push_back(pyarrow_unwrap_buffer(buf))
 * 
 *         for child in children:             # <<<<<<<<<<<<<<
 *             c_child_data.push_back(child.ap.data())
 * 
*/
      if (likely(PyList_CheckExact(__pyx_v_children)) || PyTuple_CheckExact(__pyx_v_children)) {
        __pyx_t_8 = __pyx_v_children; __Pyx_INCREF(__pyx_t_8);
        __pyx_t_4 = 0;
        __pyx_t_10 = NULL;
      } else {
        __pyx_t_4 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_v_children); if (unlikely(!__pyx_t_8)) __PYX_ERR(4, 1350, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_10 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_8); if (unlikely(!__pyx_t_10)) __PYX_ERR(4, 1350, __pyx_L1_error)
      }
      for (;;) {
        if (likely(!__pyx_t_10)) {
          if (likely(PyList_CheckExact(__pyx_t_8))) {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_8);
              #if !CYTHON_ASSUME_SAFE_SIZE
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(4, 1350, __pyx_L1_error)
              #endif
              if (__pyx_t_4 >= __pyx_temp) break;
            }
            __pyx_t_1 = __Pyx_PyList_GetItemRefFast(__pyx_t_8, __pyx_t_4, __Pyx_ReferenceSharing_OwnStrongReference);
            ++__pyx_t_4;
          } else {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_8);
              #if !CYTHON_ASSUME_SAFE_SIZE
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(4, 1350, __pyx_L1_error)
              #endif
              if (__pyx_t_4 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_1 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_4));
            #else
            __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_8, __pyx_t_4);
            #endif
            ++__pyx_t_4;
          }
          if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 1350, __pyx_L1_error)
        } else {
          __pyx_t_1 = __pyx_t_10(__pyx_t_8);
          if (unlikely(!__pyx_t_1)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(4, 1350, __pyx_L1_error)
              PyErr_Clear();
            }
            break;
          }
        }
        __Pyx_GOTREF(__pyx_t_1);
        if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array))))) __PYX_ERR(4, 1350, __pyx_L1_error)
        __Pyx_XDECREF_SET(__pyx_v_child, ((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_t_1));
        __pyx_t_1 = 0;

        /* "pyarrow/array.pxi":1351
 * 
 *         for child in children:
 *             c_child_data.push_back(child.ap.data())             # <<<<<<<<<<<<<<
 * 
 *         array_data = CArrayData.MakeWithChildren(type.sp_type, length,
*/
        if (unlikely(((PyObject *)__pyx_v_child) == Py_None)) {
          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "ap");
          __PYX_ERR(4, 1351, __pyx_L1_error)
        }
        try {
          __pyx_v_c_child_data.push_back(__pyx_v_child->ap->data());
        } catch(...) {
          __Pyx_CppExn2PyErr();
          __PYX_ERR(4, 1351, __pyx_L1_error)
        }

        /* "pyarrow/array.pxi":1350
 *             c_buffers.push_back(pyarrow_unwrap_buffer(buf))
 * 
 *         for child in children:             # <<<<<<<<<<<<<<
 *             c_child_data.push_back(child.ap.data())
 * 
*/
      }
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

      /* "pyarrow/array.pxi":1353
 *             c_child_data.push_back(child.ap.data())
 * 
 *         array_data = CArrayData.MakeWithChildren(type.sp_type, length,             # <<<<<<<<<<<<<<
 *                                                  c_buffers, c_child_data,
 *                                                  null_count, offset)
*/
      if (unlikely(((PyObject *)__pyx_v_type) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_type");
        __PYX_ERR(4, 1353, __pyx_L1_error)
      }
      __pyx_t_12 = __Pyx_PyLong_As_int64_t(__pyx_v_length); if (unlikely((__pyx_t_12 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(4, 1353, __pyx_L1_error)

      /* "pyarrow/array.pxi":1355
 *         array_data = CArrayData.MakeWithChildren(type.sp_type, length,
 *                                                  c_buffers, c_child_data,
 *                                                  null_count, offset)             # <<<<<<<<<<<<<<
 *         cdef Array result = pyarrow_wrap_array(MakeArray(array_data))
 *         result.validate()
*/
      __pyx_t_13 = __Pyx_PyLong_As_int64_t(__pyx_v_null_count); if (unlikely((__pyx_t_13 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(4, 1355, __pyx_L1_error)
      __pyx_t_14 = __Pyx_PyLong_As_int64_t(__pyx_v_offset); if (unlikely((__pyx_t_14 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(4, 1355, __pyx_L1_error)

      /* "pyarrow/array.pxi":1353
 *             c_child_data.push_back(child.ap.data())
 * 
 *         array_data = CArrayData.MakeWithChildren(type.sp_type, length,             # <<<<<<<<<<<<<<
 *                                                  c_buffers, c_child_data,
 *                                                  null_count, offset)
*/
      __pyx_v_array_data =  arrow::ArrayData:: Make(__pyx_v_type->sp_type, __pyx_t_12, __pyx_v_c_buffers, __pyx_v_c_child_data, __pyx_t_13, __pyx_t_14);

      /* "pyarrow/array.pxi":1356
 *                                                  c_buffers, c_child_data,
 *                                                  null_count, offset)
 *         cdef Array result = pyarrow_wrap_array(MakeArray(array_data))             # <<<<<<<<<<<<<<
 *         result.validate()
 *         return result
*/
      __pyx_t_8 = pyarrow_wrap_array(arrow::MakeArray(__pyx_v_array_data)); if (unlikely(!__pyx_t_8)) __PYX_ERR(4, 1356, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array))))) __PYX_ERR(4, 1356, __pyx_L1_error)
      __pyx_v_result = ((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_t_8);
      __pyx_t_8 = 0;

      /* "pyarrow/array.pxi":1357
 *                                                  null_count, offset)
 *         cdef Array result = pyarrow_wrap_array(MakeArray(array_data))
 *         result.validate()             # <<<<<<<<<<<<<<
 *         return result
 * 
*/
      __pyx_t_1 = ((PyObject *)__pyx_v_result);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_9 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
        __pyx_t_8 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_validate, __pyx_callargs+__pyx_t_9, (1-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (unlikely(!__pyx_t_8)) __PYX_ERR(4, 1357, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
      }
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

      /* "pyarrow/array.pxi":1358
 *         cdef Array result = pyarrow_wrap_array(MakeArray(array_data))
 *         result.validate()
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF((PyObject *)__pyx_v_result);
      __pyx_r = ((PyObject *)__pyx_v_result);
      goto __pyx_L0;

      /* "pyarrow/array.pxi":1293
 *             (_reduce_array_data(self.sp_array.get().data().get()),)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_buffers(DataType type, length, buffers, null_count=-1, offset=0,
 *                      children=None):
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_8);
      __Pyx_AddTraceback("pyarrow.lib.Array.from_buffers", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF((PyObject *)__pyx_v_buf);
      __Pyx_XDECREF((PyObject *)__pyx_v_child);
      __Pyx_XDECREF((PyObject *)__pyx_v_result);
      __Pyx_XDECREF(__pyx_v_children);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":1360
 *         return result
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def null_count(self):
 *         self._assert_cpu()
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_10null_count_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_10null_count_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_5Array_10null_count___get__(((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_5Array_10null_count___get__(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__get__", 0);

      /* "pyarrow/array.pxi":1362
 *     @property
 *     def null_count(self):
 *         self._assert_cpu()             # <<<<<<<<<<<<<<
 *         return self.sp_array.get().null_count()
 * 
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_assert_cpu");
        __PYX_ERR(4, 1362, __pyx_L1_error)
      }
      ((struct __pyx_vtabstruct_7pyarrow_3lib_Array *)__pyx_v_self->__pyx_vtab)->_assert_cpu(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 1362, __pyx_L1_error)

      /* "pyarrow/array.pxi":1363
 *     def null_count(self):
 *         self._assert_cpu()
 *         return self.sp_array.get().null_count()             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
      __Pyx_XDECREF(__pyx_r);
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_array");
        __PYX_ERR(4, 1363, __pyx_L1_error)
      }
      __pyx_t_1 = __Pyx_PyLong_From_int64_t(__pyx_v_self->sp_array.get()->null_count()); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 1363, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":1360
 *         return result
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def null_count(self):
 *         self._assert_cpu()
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("pyarrow.lib.Array.null_count.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":1365
 *         return self.sp_array.get().null_count()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def nbytes(self):
 *         """
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_6nbytes_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_6nbytes_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_5Array_6nbytes___get__(((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_5Array_6nbytes___get__(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self) {
      arrow::Result<int64_t>  __pyx_v_c_size_res;
      int64_t __pyx_v_size;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      int64_t __pyx_t_1;
      PyObject *__pyx_t_2 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__get__", 0);

      /* "pyarrow/array.pxi":1382
 *         entirety even if the array only references a portion of the dictionary.
 *         """
 *         self._assert_cpu()             # <<<<<<<<<<<<<<
 *         cdef CResult[int64_t] c_size_res
 *         with nogil:
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_assert_cpu");
        __PYX_ERR(4, 1382, __pyx_L1_error)
      }
      ((struct __pyx_vtabstruct_7pyarrow_3lib_Array *)__pyx_v_self->__pyx_vtab)->_assert_cpu(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 1382, __pyx_L1_error)

      /* "pyarrow/array.pxi":1384
 *         self._assert_cpu()
 *         cdef CResult[int64_t] c_size_res
 *         with nogil:             # <<<<<<<<<<<<<<
 *             c_size_res = ReferencedBufferSize(deref(self.ap))
 *             size = GetResultValue(c_size_res)
*/
      {
          PyThreadState * _save;
          _save = PyEval_SaveThread();
          __Pyx_FastGIL_Remember();
          /*try:*/ {

            /* "pyarrow/array.pxi":1385
 *         cdef CResult[int64_t] c_size_res
 *         with nogil:
 *             c_size_res = ReferencedBufferSize(deref(self.ap))             # <<<<<<<<<<<<<<
 *             size = GetResultValue(c_size_res)
 *         return size
*/
            if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
              PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "ap");
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              __PYX_ERR(4, 1385, __pyx_L4_error)
            }
            __pyx_v_c_size_res = arrow::util::ReferencedBufferSize((*__pyx_v_self->ap));

            /* "pyarrow/array.pxi":1386
 *         with nogil:
 *             c_size_res = ReferencedBufferSize(deref(self.ap))
 *             size = GetResultValue(c_size_res)             # <<<<<<<<<<<<<<
 *         return size
 * 
*/
            __pyx_t_1 = arrow::py::GetResultValue<int64_t>(__pyx_v_c_size_res); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(4, 1386, __pyx_L4_error)
            __pyx_v_size = __pyx_t_1;
          }

          /* "pyarrow/array.pxi":1384
 *         self._assert_cpu()
 *         cdef CResult[int64_t] c_size_res
 *         with nogil:             # <<<<<<<<<<<<<<
 *             c_size_res = ReferencedBufferSize(deref(self.ap))
 *             size = GetResultValue(c_size_res)
*/
          /*finally:*/ {
            /*normal exit:*/{
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L5;
            }
            __pyx_L4_error: {
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L1_error;
            }
            __pyx_L5:;
          }
      }

      /* "pyarrow/array.pxi":1387
 *             c_size_res = ReferencedBufferSize(deref(self.ap))
 *             size = GetResultValue(c_size_res)
 *         return size             # <<<<<<<<<<<<<<
 * 
 *     def get_total_buffer_size(self):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = __Pyx_PyLong_From_int64_t(__pyx_v_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 1387, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":1365
 *         return self.sp_array.get().null_count()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def nbytes(self):
 *         """
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_AddTraceback("pyarrow.lib.Array.nbytes.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":1389
 *         return size
 * 
 *     def get_total_buffer_size(self):             # <<<<<<<<<<<<<<
 *         """
 *         The sum of bytes in each buffer referenced by the array.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_25get_total_buffer_size(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_5Array_24get_total_buffer_size, "Array.get_total_buffer_size(self)\n\nThe sum of bytes in each buffer referenced by the array.\n\nAn array may only reference a portion of a buffer.\nThis method will overestimate in this case and return the\nbyte size of the entire buffer.\n\nIf a buffer is referenced multiple times then it will\nonly be counted once.");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_5Array_25get_total_buffer_size = {"get_total_buffer_size", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Array_25get_total_buffer_size, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Array_24get_total_buffer_size};
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_25get_total_buffer_size(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("get_total_buffer_size (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("get_total_buffer_size", 1, 0, 0, __pyx_nargs); return NULL; }
      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
      if (unlikely(__pyx_kwds_len < 0)) return NULL;
      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("get_total_buffer_size", __pyx_kwds); return NULL;}
      __pyx_r = __pyx_pf_7pyarrow_3lib_5Array_24get_total_buffer_size(((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_5Array_24get_total_buffer_size(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self) {
      int64_t __pyx_v_total_buffer_size;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("get_total_buffer_size", 0);

      /* "pyarrow/array.pxi":1400
 *         only be counted once.
 *         """
 *         self._assert_cpu()             # <<<<<<<<<<<<<<
 *         cdef int64_t total_buffer_size
 *         total_buffer_size = TotalBufferSize(deref(self.ap))
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_assert_cpu");
        __PYX_ERR(4, 1400, __pyx_L1_error)
      }
      ((struct __pyx_vtabstruct_7pyarrow_3lib_Array *)__pyx_v_self->__pyx_vtab)->_assert_cpu(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 1400, __pyx_L1_error)

      /* "pyarrow/array.pxi":1402
 *         self._assert_cpu()
 *         cdef int64_t total_buffer_size
 *         total_buffer_size = TotalBufferSize(deref(self.ap))             # <<<<<<<<<<<<<<
 *         return total_buffer_size
 * 
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "ap");
        __PYX_ERR(4, 1402, __pyx_L1_error)
      }
      __pyx_v_total_buffer_size = arrow::util::TotalBufferSize((*__pyx_v_self->ap));

      /* "pyarrow/array.pxi":1403
 *         cdef int64_t total_buffer_size
 *         total_buffer_size = TotalBufferSize(deref(self.ap))
 *         return total_buffer_size             # <<<<<<<<<<<<<<
 * 
 *     def __sizeof__(self):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __Pyx_PyLong_From_int64_t(__pyx_v_total_buffer_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 1403, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":1389
 *         return size
 * 
 *     def get_total_buffer_size(self):             # <<<<<<<<<<<<<<
 *         """
 *         The sum of bytes in each buffer referenced by the array.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("pyarrow.lib.Array.get_total_buffer_size", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":1405
 *         return total_buffer_size
 * 
 *     def __sizeof__(self):             # <<<<<<<<<<<<<<
 *         self._assert_cpu()
 *         return super(Array, self).__sizeof__() + self.nbytes
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_27__sizeof__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_5Array_26__sizeof__, "Array.__sizeof__(self)");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_5Array_27__sizeof__ = {"__sizeof__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Array_27__sizeof__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Array_26__sizeof__};
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_27__sizeof__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__sizeof__ (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__sizeof__", 1, 0, 0, __pyx_nargs); return NULL; }
      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
      if (unlikely(__pyx_kwds_len < 0)) return NULL;
      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__sizeof__", __pyx_kwds); return NULL;}
      __pyx_r = __pyx_pf_7pyarrow_3lib_5Array_26__sizeof__(((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_5Array_26__sizeof__(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      size_t __pyx_t_5;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__sizeof__", 0);

      /* "pyarrow/array.pxi":1406
 * 
 *     def __sizeof__(self):
 *         self._assert_cpu()             # <<<<<<<<<<<<<<
 *         return super(Array, self).__sizeof__() + self.nbytes
 * 
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_assert_cpu");
        __PYX_ERR(4, 1406, __pyx_L1_error)
      }
      ((struct __pyx_vtabstruct_7pyarrow_3lib_Array *)__pyx_v_self->__pyx_vtab)->_assert_cpu(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 1406, __pyx_L1_error)

      /* "pyarrow/array.pxi":1407
 *     def __sizeof__(self):
 *         self._assert_cpu()
 *         return super(Array, self).__sizeof__() + self.nbytes             # <<<<<<<<<<<<<<
 * 
 *     def __iter__(self):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_4 = NULL;
      __pyx_t_5 = 1;
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_4, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array), ((PyObject *)__pyx_v_self)};
        __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_super, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 1407, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      __pyx_t_2 = __pyx_t_3;
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_5 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_sizeof, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 1407, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_nbytes); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 1407, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 1407, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":1405
 *         return total_buffer_size
 * 
 *     def __sizeof__(self):             # <<<<<<<<<<<<<<
 *         self._assert_cpu()
 *         return super(Array, self).__sizeof__() + self.nbytes
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_AddTraceback("pyarrow.lib.Array.__sizeof__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }
    static PyObject *__pyx_gb_7pyarrow_3lib_5Array_30generator8(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

    /* "pyarrow/array.pxi":1409
 *         return super(Array, self).__sizeof__() + self.nbytes
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         self._assert_cpu()
 *         for i in range(len(self)):
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_29__iter__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_29__iter__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_5Array_28__iter__(((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_5Array_28__iter__(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self) {
      struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_11___iter__ *__pyx_cur_scope;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__iter__", 0);
      __pyx_cur_scope = (struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_11___iter__ *)__pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_11___iter__(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_11___iter__, __pyx_mstate_global->__pyx_empty_tuple, NULL);
      if (unlikely(!__pyx_cur_scope)) {
        __pyx_cur_scope = ((struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_11___iter__ *)Py_None);
        __Pyx_INCREF(Py_None);
        __PYX_ERR(4, 1409, __pyx_L1_error)
      } else {
        __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
      }
      __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
      __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
      __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
      {
        __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7pyarrow_3lib_5Array_30generator8, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[10]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_iter, __pyx_mstate_global->__pyx_n_u_Array___iter, __pyx_mstate_global->__pyx_n_u_pyarrow_lib); if (unlikely(!gen)) __PYX_ERR(4, 1409, __pyx_L1_error)
        __Pyx_DECREF(__pyx_cur_scope);
        __Pyx_RefNannyFinishContext();
        return (PyObject *) gen;
      }

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_AddTraceback("pyarrow.lib.Array.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __Pyx_DECREF((PyObject *)__pyx_cur_scope);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_gb_7pyarrow_3lib_5Array_30generator8(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
      struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_11___iter__ *__pyx_cur_scope = ((struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_11___iter__ *)__pyx_generator->closure);
      PyObject *__pyx_r = NULL;
      Py_ssize_t __pyx_t_1;
      Py_ssize_t __pyx_t_2;
      Py_ssize_t __pyx_t_3;
      PyObject *__pyx_t_4 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__iter__", 0);
      switch (__pyx_generator->resume_label) {
        case 0: goto __pyx_L3_first_run;
        case 1: goto __pyx_L6_resume_from_yield;
        default: /* CPython raises the right error here */
        __Pyx_RefNannyFinishContext();
        return NULL;
      }
      __pyx_L3_first_run:;
      if (unlikely(__pyx_sent_value != Py_None)) {
        if (unlikely(__pyx_sent_value)) PyErr_SetString(PyExc_TypeError, "can't send non-None value to a just-started generator");
        __PYX_ERR(4, 1409, __pyx_L1_error)
      }

      /* "pyarrow/array.pxi":1410
 * 
 *     def __iter__(self):
 *         self._assert_cpu()             # <<<<<<<<<<<<<<
 *         for i in range(len(self)):
 *             yield self.getitem(i)
*/
      if (unlikely(((PyObject *)__pyx_cur_scope->__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_assert_cpu");
        __PYX_ERR(4, 1410, __pyx_L1_error)
      }
      ((struct __pyx_vtabstruct_7pyarrow_3lib_Array *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->_assert_cpu(__pyx_cur_scope->__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 1410, __pyx_L1_error)

      /* "pyarrow/array.pxi":1411
 *     def __iter__(self):
 *         self._assert_cpu()
 *         for i in range(len(self)):             # <<<<<<<<<<<<<<
 *             yield self.getitem(i)
 * 
*/
      __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_cur_scope->__pyx_v_self)); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(4, 1411, __pyx_L1_error)
      __pyx_t_2 = __pyx_t_1;
      for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
        __pyx_cur_scope->__pyx_v_i = __pyx_t_3;

        /* "pyarrow/array.pxi":1412
 *         self._assert_cpu()
 *         for i in range(len(self)):
 *             yield self.getitem(i)             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
*/
        if (unlikely(((PyObject *)__pyx_cur_scope->__pyx_v_self) == Py_None)) {
          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "getitem");
          __PYX_ERR(4, 1412, __pyx_L1_error)
        }
        __pyx_t_4 = ((struct __pyx_vtabstruct_7pyarrow_3lib_Array *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->getitem(__pyx_cur_scope->__pyx_v_self, __pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 1412, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_r = __pyx_t_4;
        __pyx_t_4 = 0;
        __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
        __pyx_cur_scope->__pyx_t_1 = __pyx_t_2;
        __pyx_cur_scope->__pyx_t_2 = __pyx_t_3;
        __Pyx_XGIVEREF(__pyx_r);
        __Pyx_RefNannyFinishContext();
        __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
        /* return from generator, yielding value */
        __pyx_generator->resume_label = 1;
        return __pyx_r;
        __pyx_L6_resume_from_yield:;
        __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
        __pyx_t_2 = __pyx_cur_scope->__pyx_t_1;
        __pyx_t_3 = __pyx_cur_scope->__pyx_t_2;
        if (unlikely(!__pyx_sent_value)) __PYX_ERR(4, 1412, __pyx_L1_error)
      }
      CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

      /* "pyarrow/array.pxi":1409
 *         return super(Array, self).__sizeof__() + self.nbytes
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         self._assert_cpu()
 *         for i in range(len(self)):
*/

      /* function exit code */
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_4);
      if (__Pyx_PyErr_Occurred()) {
        __Pyx_Generator_Replace_StopIteration(0);
        __Pyx_AddTraceback("__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      }
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      #if !CYTHON_USE_EXC_INFO_STACK
      __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
      #endif
      __pyx_generator->resume_label = -1;
      __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":1414
 *             yield self.getitem(i)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         type_format = object.__repr__(self)
 *         return f'{type_format}\n{self}'
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_32__repr__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_32__repr__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_5Array_31__repr__(((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_5Array_31__repr__(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self) {
      PyObject *__pyx_v_type_format = NULL;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      size_t __pyx_t_3;
      PyObject *__pyx_t_4[3];
      PyObject *__pyx_t_5 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__repr__", 0);

      /* "pyarrow/array.pxi":1415
 * 
 *     def __repr__(self):
 *         type_format = object.__repr__(self)             # <<<<<<<<<<<<<<
 *         return f'{type_format}\n{self}'
 * 
*/
      __pyx_t_2 = __pyx_builtin_object;
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_3 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, ((PyObject *)__pyx_v_self)};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_repr, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 1415, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_v_type_format = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "pyarrow/array.pxi":1416
 *     def __repr__(self):
 *         type_format = object.__repr__(self)
 *         return f'{type_format}\n{self}'             # <<<<<<<<<<<<<<
 * 
 *     def to_string(self, *, int indent=2, int top_level_indent=0, int window=10,
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_v_type_format, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 1416, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_PyObject_FormatSimple(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 1416, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4[0] = __pyx_t_1;
      __pyx_t_4[1] = __pyx_mstate_global->__pyx_kp_u__14;
      __pyx_t_4[2] = __pyx_t_2;
      __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_4, 3, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1) + 1 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2));
      if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 1416, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_r = __pyx_t_5;
      __pyx_t_5 = 0;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":1414
 *             yield self.getitem(i)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         type_format = object.__repr__(self)
 *         return f'{type_format}\n{self}'
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_AddTraceback("pyarrow.lib.Array.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_type_format);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":1418
 *         return f'{type_format}\n{self}'
 * 
 *     def to_string(self, *, int indent=2, int top_level_indent=0, int window=10,             # <<<<<<<<<<<<<<
 *                   int container_window=2, c_bool skip_new_lines=False,
 *                   int element_size_limit=100):
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_34to_string(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_5Array_33to_string, "Array.to_string(self, *, int indent=2, int top_level_indent=0, int window=10, int container_window=2, bool skip_new_lines=False, int element_size_limit=100)\n\nRender a \"pretty-printed\" string representation of the Array.\n\nNote: for data on a non-CPU device, the full array is copied to CPU\nmemory.\n\nParameters\n----------\nindent : int, default 2\n    How much to indent the internal items in the string to\n    the right, by default ``2``.\ntop_level_indent : int, default 0\n    How much to indent right the entire content of the array,\n    by default ``0``.\nwindow : int\n    How many primitive items to preview at the begin and end\n    of the array when the array is bigger than the window.\n    The other items will be ellipsed.\ncontainer_window : int\n    How many container items (such as a list in a list array)\n    to preview at the begin and end of the array when the array\n    is bigger than the window.\nskip_new_lines : bool\n    If the array should be rendered as a single line of text\n    or if each element should be on its own line.\nelement_size_limit : int, default 100\n    Maximum number of characters of a single element before it is truncated.");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_5Array_34to_string = {"to_string", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Array_34to_string, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Array_33to_string};
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_34to_string(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      int __pyx_v_indent;
      int __pyx_v_top_level_indent;
      int __pyx_v_window;
      CYTHON_UNUSED int __pyx_v_container_window;
      bool __pyx_v_skip_new_lines;
      int __pyx_v_element_size_limit;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[6] = {0,0,0,0,0,0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("to_string (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_indent,&__pyx_mstate_global->__pyx_n_u_top_level_indent,&__pyx_mstate_global->__pyx_n_u_window,&__pyx_mstate_global->__pyx_n_u_container_window,&__pyx_mstate_global->__pyx_n_u_skip_new_lines,&__pyx_mstate_global->__pyx_n_u_element_size_limit,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(4, 1418, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, 0, __pyx_kwds_len, "to_string", 0) < (0)) __PYX_ERR(4, 1418, __pyx_L3_error)
        } else if (unlikely(__pyx_nargs != 0)) {
          goto __pyx_L5_argtuple_error;
        } else {
        }
        if (values[0]) {
          __pyx_v_indent = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_indent == (int)-1) && PyErr_Occurred())) __PYX_ERR(4, 1418, __pyx_L3_error)
        } else {
          __pyx_v_indent = ((int)2);
        }
        if (values[1]) {
          __pyx_v_top_level_indent = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_top_level_indent == (int)-1) && PyErr_Occurred())) __PYX_ERR(4, 1418, __pyx_L3_error)
        } else {
          __pyx_v_top_level_indent = ((int)0);
        }
        if (values[2]) {
          __pyx_v_window = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_window == (int)-1) && PyErr_Occurred())) __PYX_ERR(4, 1418, __pyx_L3_error)
        } else {
          __pyx_v_window = ((int)10);
        }
        if (values[3]) {
          __pyx_v_container_window = __Pyx_PyLong_As_int(values[3]); if (unlikely((__pyx_v_container_window == (int)-1) && PyErr_Occurred())) __PYX_ERR(4, 1419, __pyx_L3_error)
        } else {
          __pyx_v_container_window = ((int)2);
        }
        if (values[4]) {
          __pyx_v_skip_new_lines = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_skip_new_lines == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(4, 1419, __pyx_L3_error)
        } else {

          /* "pyarrow/array.pxi":1419
 * 
 *     def to_string(self, *, int indent=2, int top_level_indent=0, int window=10,
 *                   int container_window=2, c_bool skip_new_lines=False,             # <<<<<<<<<<<<<<
 *                   int element_size_limit=100):
 *         """
*/
          __pyx_v_skip_new_lines = ((bool)0);
        }
        if (values[5]) {
          __pyx_v_element_size_limit = __Pyx_PyLong_As_int(values[5]); if (unlikely((__pyx_v_element_size_limit == (int)-1) && PyErr_Occurred())) __PYX_ERR(4, 1420, __pyx_L3_error)
        } else {
          __pyx_v_element_size_limit = ((int)0x64);
        }
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("to_string", 1, 0, 0, __pyx_nargs); __PYX_ERR(4, 1418, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.Array.to_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_5Array_33to_string(((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_v_self), __pyx_v_indent, __pyx_v_top_level_indent, __pyx_v_window, __pyx_v_container_window, __pyx_v_skip_new_lines, __pyx_v_element_size_limit);

      /* "pyarrow/array.pxi":1418
 *         return f'{type_format}\n{self}'
 * 
 *     def to_string(self, *, int indent=2, int top_level_indent=0, int window=10,             # <<<<<<<<<<<<<<
 *                   int container_window=2, c_bool skip_new_lines=False,
 *                   int element_size_limit=100):
*/

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_5Array_33to_string(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self, int __pyx_v_indent, int __pyx_v_top_level_indent, int __pyx_v_window, CYTHON_UNUSED int __pyx_v_container_window, bool __pyx_v_skip_new_lines, int __pyx_v_element_size_limit) {
      std::string __pyx_v_result;
      arrow::PrettyPrintOptions __pyx_v_options;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      int __pyx_t_1;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      PyObject *__pyx_t_5 = NULL;
      size_t __pyx_t_6;
      PyObject *__pyx_t_7 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("to_string", 0);

      /* "pyarrow/array.pxi":1453
 *             PrettyPrintOptions options
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             options = PrettyPrintOptions(top_level_indent, window)
 *             options.skip_new_lines = skip_new_lines
*/
      {
          PyThreadState * _save;
          _save = PyEval_SaveThread();
          __Pyx_FastGIL_Remember();
          /*try:*/ {

            /* "pyarrow/array.pxi":1454
 * 
 *         with nogil:
 *             options = PrettyPrintOptions(top_level_indent, window)             # <<<<<<<<<<<<<<
 *             options.skip_new_lines = skip_new_lines
 *             options.indent_size = indent
*/
            __pyx_v_options = arrow::PrettyPrintOptions(__pyx_v_top_level_indent, __pyx_v_window);

            /* "pyarrow/array.pxi":1455
 *         with nogil:
 *             options = PrettyPrintOptions(top_level_indent, window)
 *             options.skip_new_lines = skip_new_lines             # <<<<<<<<<<<<<<
 *             options.indent_size = indent
 *             options.element_size_limit = element_size_limit
*/
            __pyx_v_options.skip_new_lines = __pyx_v_skip_new_lines;

            /* "pyarrow/array.pxi":1456
 *             options = PrettyPrintOptions(top_level_indent, window)
 *             options.skip_new_lines = skip_new_lines
 *             options.indent_size = indent             # <<<<<<<<<<<<<<
 *             options.element_size_limit = element_size_limit
 *             check_status(
*/
            __pyx_v_options.indent_size = __pyx_v_indent;

            /* "pyarrow/array.pxi":1457
 *             options.skip_new_lines = skip_new_lines
 *             options.indent_size = indent
 *             options.element_size_limit = element_size_limit             # <<<<<<<<<<<<<<
 *             check_status(
 *                 PrettyPrint(
*/
            __pyx_v_options.element_size_limit = __pyx_v_element_size_limit;

            /* "pyarrow/array.pxi":1460
 *             check_status(
 *                 PrettyPrint(
 *                     deref(self.ap),             # <<<<<<<<<<<<<<
 *                     options,
 *                     &result
*/
            if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
              PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "ap");
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              __PYX_ERR(4, 1460, __pyx_L4_error)
            }

            /* "pyarrow/array.pxi":1458
 *             options.indent_size = indent
 *             options.element_size_limit = element_size_limit
 *             check_status(             # <<<<<<<<<<<<<<
 *                 PrettyPrint(
 *                     deref(self.ap),
*/
            __pyx_t_1 = __pyx_f_7pyarrow_3lib_check_status(arrow::PrettyPrint((*__pyx_v_self->ap), __pyx_v_options, (&__pyx_v_result))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(4, 1458, __pyx_L4_error)
          }

          /* "pyarrow/array.pxi":1453
 *             PrettyPrintOptions options
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             options = PrettyPrintOptions(top_level_indent, window)
 *             options.skip_new_lines = skip_new_lines
*/
          /*finally:*/ {
            /*normal exit:*/{
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L5;
            }
            __pyx_L4_error: {
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L1_error;
            }
            __pyx_L5:;
          }
      }

      /* "pyarrow/array.pxi":1466
 *             )
 * 
 *         return frombytes(result, safe=True)             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_frombytes); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 1466, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = __pyx_convert_PyBytes_string_to_py_6libcpp_6string_std__in_string(__pyx_v_result); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 1466, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
        assert(__pyx_t_3);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
        __pyx_t_6 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_3, __pyx_t_5};
        __pyx_t_7 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 1466, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_safe, Py_True, __pyx_t_7, __pyx_callargs+2, 0) < (0)) __PYX_ERR(4, 1466, __pyx_L1_error)
        __pyx_t_2 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_7);
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 1466, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
      }
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":1418
 *         return f'{type_format}\n{self}'
 * 
 *     def to_string(self, *, int indent=2, int top_level_indent=0, int window=10,             # <<<<<<<<<<<<<<
 *                   int container_window=2, c_bool skip_new_lines=False,
 *                   int element_size_limit=100):
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_7);
      __Pyx_AddTraceback("pyarrow.lib.Array.to_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":1468
 *         return frombytes(result, safe=True)
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return self.to_string()
 * 
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_36__str__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_36__str__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_5Array_35__str__(((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_5Array_35__str__(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      size_t __pyx_t_3;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__str__", 0);

      /* "pyarrow/array.pxi":1469
 * 
 *     def __str__(self):
 *         return self.to_string()             # <<<<<<<<<<<<<<
 * 
 *     def __eq__(self, other):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = ((PyObject *)__pyx_v_self);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_3 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_to_string, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 1469, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":1468
 *         return frombytes(result, safe=True)
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return self.to_string()
 * 
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_AddTraceback("pyarrow.lib.Array.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":1471
 *         return self.to_string()
 * 
 *     def __eq__(self, other):             # <<<<<<<<<<<<<<
 *         try:
 *             return self.equals(other)
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_38__eq__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_38__eq__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__eq__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_5Array_37__eq__(((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_v_self), ((PyObject *)__pyx_v_other));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_5Array_37__eq__(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self, PyObject *__pyx_v_other) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      PyObject *__pyx_t_5 = NULL;
      size_t __pyx_t_6;
      int __pyx_t_7;
      PyObject *__pyx_t_8 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__eq__", 0);

      /* "pyarrow/array.pxi":1472
 * 
 *     def __eq__(self, other):
 *         try:             # <<<<<<<<<<<<<<
 *             return self.equals(other)
 *         except TypeError:
*/
      {
        __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:*/ {

          /* "pyarrow/array.pxi":1473
 *     def __eq__(self, other):
 *         try:
 *             return self.equals(other)             # <<<<<<<<<<<<<<
 *         except TypeError:
 *             # This also handles comparing with None
*/
          __Pyx_XDECREF(__pyx_r);
          __pyx_t_5 = ((PyObject *)__pyx_v_self);
          __Pyx_INCREF(__pyx_t_5);
          __pyx_t_6 = 0;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_other};
            __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_equals, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
            if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 1473, __pyx_L3_error)
            __Pyx_GOTREF(__pyx_t_4);
          }
          __pyx_r = __pyx_t_4;
          __pyx_t_4 = 0;
          goto __pyx_L7_try_return;

          /* "pyarrow/array.pxi":1472
 * 
 *     def __eq__(self, other):
 *         try:             # <<<<<<<<<<<<<<
 *             return self.equals(other)
 *         except TypeError:
*/
        }
        __pyx_L3_error:;
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

        /* "pyarrow/array.pxi":1474
 *         try:
 *             return self.equals(other)
 *         except TypeError:             # <<<<<<<<<<<<<<
 *             # This also handles comparing with None
 *             # as Array.equals(None) raises a TypeError.
*/
        __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_TypeError))));
        if (__pyx_t_7) {
          __Pyx_AddTraceback("pyarrow.lib.Array.__eq__", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_8) < 0) __PYX_ERR(4, 1474, __pyx_L5_except_error)
          __Pyx_XGOTREF(__pyx_t_4);
          __Pyx_XGOTREF(__pyx_t_5);
          __Pyx_XGOTREF(__pyx_t_8);

          /* "pyarrow/array.pxi":1477
 *             # This also handles comparing with None
 *             # as Array.equals(None) raises a TypeError.
 *             return NotImplemented             # <<<<<<<<<<<<<<
 * 
 *     def equals(Array self, Array other not None):
*/
          __Pyx_XDECREF(__pyx_r);
          __Pyx_INCREF(__pyx_builtin_NotImplemented);
          __pyx_r = __pyx_builtin_NotImplemented;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          goto __pyx_L6_except_return;
        }
        goto __pyx_L5_except_error;

        /* "pyarrow/array.pxi":1472
 * 
 *     def __eq__(self, other):
 *         try:             # <<<<<<<<<<<<<<
 *             return self.equals(other)
 *         except TypeError:
*/
        __pyx_L5_except_error:;
        __Pyx_XGIVEREF(__pyx_t_1);
        __Pyx_XGIVEREF(__pyx_t_2);
        __Pyx_XGIVEREF(__pyx_t_3);
        __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
        goto __pyx_L1_error;
        __pyx_L7_try_return:;
        __Pyx_XGIVEREF(__pyx_t_1);
        __Pyx_XGIVEREF(__pyx_t_2);
        __Pyx_XGIVEREF(__pyx_t_3);
        __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
        goto __pyx_L0;
        __pyx_L6_except_return:;
        __Pyx_XGIVEREF(__pyx_t_1);
        __Pyx_XGIVEREF(__pyx_t_2);
        __Pyx_XGIVEREF(__pyx_t_3);
        __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
        goto __pyx_L0;
      }

      /* "pyarrow/array.pxi":1471
 *         return self.to_string()
 * 
 *     def __eq__(self, other):             # <<<<<<<<<<<<<<
 *         try:
 *             return self.equals(other)
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_8);
      __Pyx_AddTraceback("pyarrow.lib.Array.__eq__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":1479
 *             return NotImplemented
 * 
 *     def equals(Array self, Array other not None):             # <<<<<<<<<<<<<<
 *         """
 *         Parameters
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_40equals(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_5Array_39equals, "Array.equals(self, Array other)\n\nParameters\n----------\nother : pyarrow.Array\n\nReturns\n-------\nbool");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_5Array_40equals = {"equals", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Array_40equals, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Array_39equals};
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_40equals(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_other = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("equals (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_other,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(4, 1479, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 1479, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "equals", 0) < (0)) __PYX_ERR(4, 1479, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("equals", 1, 1, 1, i); __PYX_ERR(4, 1479, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 1)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 1479, __pyx_L3_error)
        }
        __pyx_v_other = ((struct __pyx_obj_7pyarrow_3lib_Array *)values[0]);
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("equals", 1, 1, 1, __pyx_nargs); __PYX_ERR(4, 1479, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.Array.equals", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array, 0, "other", 0))) __PYX_ERR(4, 1479, __pyx_L1_error)
      __pyx_r = __pyx_pf_7pyarrow_3lib_5Array_39equals(((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_v_self), __pyx_v_other);

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = NULL;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      goto __pyx_L7_cleaned_up;
      __pyx_L0:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __pyx_L7_cleaned_up:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_5Array_39equals(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self, struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_other) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("equals", 0);

      /* "pyarrow/array.pxi":1489
 *         bool
 *         """
 *         self._assert_cpu()             # <<<<<<<<<<<<<<
 *         other._assert_cpu()
 *         return self.ap.Equals(deref(other.ap))
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_assert_cpu");
        __PYX_ERR(4, 1489, __pyx_L1_error)
      }
      ((struct __pyx_vtabstruct_7pyarrow_3lib_Array *)__pyx_v_self->__pyx_vtab)->_assert_cpu(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 1489, __pyx_L1_error)

      /* "pyarrow/array.pxi":1490
 *         """
 *         self._assert_cpu()
 *         other._assert_cpu()             # <<<<<<<<<<<<<<
 *         return self.ap.Equals(deref(other.ap))
 * 
*/
      ((struct __pyx_vtabstruct_7pyarrow_3lib_Array *)__pyx_v_other->__pyx_vtab)->_assert_cpu(__pyx_v_other); if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 1490, __pyx_L1_error)

      /* "pyarrow/array.pxi":1491
 *         self._assert_cpu()
 *         other._assert_cpu()
 *         return self.ap.Equals(deref(other.ap))             # <<<<<<<<<<<<<<
 * 
 *     def __len__(self):
*/
      __Pyx_XDECREF(__pyx_r);
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "ap");
        __PYX_ERR(4, 1491, __pyx_L1_error)
      }
      __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->ap->Equals((*__pyx_v_other->ap))); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 1491, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":1479
 *             return NotImplemented
 * 
 *     def equals(Array self, Array other not None):             # <<<<<<<<<<<<<<
 *         """
 *         Parameters
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("pyarrow.lib.Array.equals", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":1493
 *         return self.ap.Equals(deref(other.ap))
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self.length()
 * 
*/

    /* Python wrapper */
    static Py_ssize_t __pyx_pw_7pyarrow_3lib_5Array_42__len__(PyObject *__pyx_v_self); /*proto*/
    static Py_ssize_t __pyx_pw_7pyarrow_3lib_5Array_42__len__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      Py_ssize_t __pyx_r;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_5Array_41__len__(((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_v_self));

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

    static Py_ssize_t __pyx_pf_7pyarrow_3lib_5Array_41__len__(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self) {
      Py_ssize_t __pyx_r;
      int64_t __pyx_t_1;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;

      /* "pyarrow/array.pxi":1494
 * 
 *     def __len__(self):
 *         return self.length()             # <<<<<<<<<<<<<<
 * 
 *     cdef int64_t length(self):
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "length");
        __PYX_ERR(4, 1494, __pyx_L1_error)
      }
      __pyx_t_1 = ((struct __pyx_vtabstruct_7pyarrow_3lib_Array *)__pyx_v_self->__pyx_vtab)->length(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 1494, __pyx_L1_error)
      __pyx_r = __pyx_t_1;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":1493
 *         return self.ap.Equals(deref(other.ap))
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self.length()
 * 
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_AddTraceback("pyarrow.lib.Array.__len__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = -1;
      __pyx_L0:;
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":1496
 *         return self.length()
 * 
 *     cdef int64_t length(self):             # <<<<<<<<<<<<<<
 *         if self.sp_array.get():
 *             return self.sp_array.get().length()
*/

    static int64_t __pyx_f_7pyarrow_3lib_5Array_length(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self) {
      int64_t __pyx_r;
      int __pyx_t_1;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;

      /* "pyarrow/array.pxi":1497
 * 
 *     cdef int64_t length(self):
 *         if self.sp_array.get():             # <<<<<<<<<<<<<<
 *             return self.sp_array.get().length()
 *         else:
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_array");
        __PYX_ERR(4, 1497, __pyx_L1_error)
      }
      __pyx_t_1 = (__pyx_v_self->sp_array.get() != 0);
      if (__pyx_t_1) {

        /* "pyarrow/array.pxi":1498
 *     cdef int64_t length(self):
 *         if self.sp_array.get():
 *             return self.sp_array.get().length()             # <<<<<<<<<<<<<<
 *         else:
 *             return 0
*/
        if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_array");
          __PYX_ERR(4, 1498, __pyx_L1_error)
        }
        __pyx_r = __pyx_v_self->sp_array.get()->length();
        goto __pyx_L0;

        /* "pyarrow/array.pxi":1497
 * 
 *     cdef int64_t length(self):
 *         if self.sp_array.get():             # <<<<<<<<<<<<<<
 *             return self.sp_array.get().length()
 *         else:
*/
      }

      /* "pyarrow/array.pxi":1500
 *             return self.sp_array.get().length()
 *         else:
 *             return 0             # <<<<<<<<<<<<<<
 * 
 *     def is_null(self, *, nan_is_null=False):
*/
      /*else*/ {
        __pyx_r = 0;
        goto __pyx_L0;
      }

      /* "pyarrow/array.pxi":1496
 *         return self.length()
 * 
 *     cdef int64_t length(self):             # <<<<<<<<<<<<<<
 *         if self.sp_array.get():
 *             return self.sp_array.get().length()
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_AddTraceback("pyarrow.lib.Array.length", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = 0;
      __pyx_L0:;
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":1502
 *             return 0
 * 
 *     def is_null(self, *, nan_is_null=False):             # <<<<<<<<<<<<<<
 *         """
 *         Return BooleanArray indicating the null values.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_44is_null(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_5Array_43is_null, "Array.is_null(self, *, nan_is_null=False)\n\nReturn BooleanArray indicating the null values.\n\nParameters\n----------\nnan_is_null : bool (optional, default False)\n    Whether floating-point NaN values should also be considered null.\n\nReturns\n-------\narray : boolean Array");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_5Array_44is_null = {"is_null", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Array_44is_null, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Array_43is_null};
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_44is_null(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_nan_is_null = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("is_null (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_nan_is_null,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(4, 1502, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, 0, __pyx_kwds_len, "is_null", 0) < (0)) __PYX_ERR(4, 1502, __pyx_L3_error)
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_False));
        } else if (unlikely(__pyx_nargs != 0)) {
          goto __pyx_L5_argtuple_error;
        } else {
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_False));
        }
        __pyx_v_nan_is_null = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("is_null", 1, 0, 0, __pyx_nargs); __PYX_ERR(4, 1502, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.Array.is_null", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_5Array_43is_null(((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_v_self), __pyx_v_nan_is_null);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_5Array_43is_null(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self, PyObject *__pyx_v_nan_is_null) {
      PyObject *__pyx_v_options = NULL;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      PyObject *__pyx_t_5 = NULL;
      size_t __pyx_t_6;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("is_null", 0);

      /* "pyarrow/array.pxi":1515
 *         array : boolean Array
 *         """
 *         self._assert_cpu()             # <<<<<<<<<<<<<<
 *         options = _pc().NullOptions(nan_is_null=nan_is_null)
 *         return _pc().call_function('is_null', [self], options)
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_assert_cpu");
        __PYX_ERR(4, 1515, __pyx_L1_error)
      }
      ((struct __pyx_vtabstruct_7pyarrow_3lib_Array *)__pyx_v_self->__pyx_vtab)->_assert_cpu(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 1515, __pyx_L1_error)

      /* "pyarrow/array.pxi":1516
 *         """
 *         self._assert_cpu()
 *         options = _pc().NullOptions(nan_is_null=nan_is_null)             # <<<<<<<<<<<<<<
 *         return _pc().call_function('is_null', [self], options)
 * 
*/
      __pyx_t_4 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pc_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 1516, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
        assert(__pyx_t_4);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
        __pyx_t_6 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
        __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 1516, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      __pyx_t_2 = __pyx_t_3;
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_6 = 0;
      {
        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, NULL};
        __pyx_t_5 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 1516, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_nan_is_null, __pyx_v_nan_is_null, __pyx_t_5, __pyx_callargs+1, 0) < (0)) __PYX_ERR(4, 1516, __pyx_L1_error)
        __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_NullOptions, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_5);
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 1516, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_v_options = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "pyarrow/array.pxi":1517
 *         self._assert_cpu()
 *         options = _pc().NullOptions(nan_is_null=nan_is_null)
 *         return _pc().call_function('is_null', [self], options)             # <<<<<<<<<<<<<<
 * 
 *     def is_nan(self):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_pc_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 1517, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_6 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
        assert(__pyx_t_2);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
        __pyx_t_6 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
        __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 1517, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
      }
      __pyx_t_3 = __pyx_t_5;
      __Pyx_INCREF(__pyx_t_3);
      __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 1517, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_INCREF((PyObject *)__pyx_v_self);
      __Pyx_GIVEREF((PyObject *)__pyx_v_self);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_self)) != (0)) __PYX_ERR(4, 1517, __pyx_L1_error);
      __pyx_t_6 = 0;
      {
        PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_mstate_global->__pyx_n_u_is_null, __pyx_t_4, __pyx_v_options};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_call_function, __pyx_callargs+__pyx_t_6, (4-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 1517, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":1502
 *             return 0
 * 
 *     def is_null(self, *, nan_is_null=False):             # <<<<<<<<<<<<<<
 *         """
 *         Return BooleanArray indicating the null values.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_AddTraceback("pyarrow.lib.Array.is_null", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_options);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":1519
 *         return _pc().call_function('is_null', [self], options)
 * 
 *     def is_nan(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return BooleanArray indicating the NaN values.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_46is_nan(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_5Array_45is_nan, "Array.is_nan(self)\n\nReturn BooleanArray indicating the NaN values.\n\nReturns\n-------\narray : boolean Array");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_5Array_46is_nan = {"is_nan", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Array_46is_nan, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Array_45is_nan};
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_46is_nan(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("is_nan (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("is_nan", 1, 0, 0, __pyx_nargs); return NULL; }
      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
      if (unlikely(__pyx_kwds_len < 0)) return NULL;
      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("is_nan", __pyx_kwds); return NULL;}
      __pyx_r = __pyx_pf_7pyarrow_3lib_5Array_45is_nan(((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_5Array_45is_nan(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      PyObject *__pyx_t_5 = NULL;
      size_t __pyx_t_6;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("is_nan", 0);

      /* "pyarrow/array.pxi":1527
 *         array : boolean Array
 *         """
 *         self._assert_cpu()             # <<<<<<<<<<<<<<
 *         return _pc().call_function('is_nan', [self])
 * 
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_assert_cpu");
        __PYX_ERR(4, 1527, __pyx_L1_error)
      }
      ((struct __pyx_vtabstruct_7pyarrow_3lib_Array *)__pyx_v_self->__pyx_vtab)->_assert_cpu(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 1527, __pyx_L1_error)

      /* "pyarrow/array.pxi":1528
 *         """
 *         self._assert_cpu()
 *         return _pc().call_function('is_nan', [self])             # <<<<<<<<<<<<<<
 * 
 *     def is_valid(self):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_4 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pc_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 1528, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
        assert(__pyx_t_4);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
        __pyx_t_6 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
        __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 1528, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      __pyx_t_2 = __pyx_t_3;
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 1528, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_INCREF((PyObject *)__pyx_v_self);
      __Pyx_GIVEREF((PyObject *)__pyx_v_self);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_self)) != (0)) __PYX_ERR(4, 1528, __pyx_L1_error);
      __pyx_t_6 = 0;
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_mstate_global->__pyx_n_u_is_nan, __pyx_t_5};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_call_function, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 1528, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":1519
 *         return _pc().call_function('is_null', [self], options)
 * 
 *     def is_nan(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return BooleanArray indicating the NaN values.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_AddTraceback("pyarrow.lib.Array.is_nan", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":1530
 *         return _pc().call_function('is_nan', [self])
 * 
 *     def is_valid(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return BooleanArray indicating the non-null values.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_48is_valid(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_5Array_47is_valid, "Array.is_valid(self)\n\nReturn BooleanArray indicating the non-null values.");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_5Array_48is_valid = {"is_valid", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Array_48is_valid, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Array_47is_valid};
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_48is_valid(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("is_valid (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("is_valid", 1, 0, 0, __pyx_nargs); return NULL; }
      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
      if (unlikely(__pyx_kwds_len < 0)) return NULL;
      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("is_valid", __pyx_kwds); return NULL;}
      __pyx_r = __pyx_pf_7pyarrow_3lib_5Array_47is_valid(((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_5Array_47is_valid(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      PyObject *__pyx_t_5 = NULL;
      size_t __pyx_t_6;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("is_valid", 0);

      /* "pyarrow/array.pxi":1534
 *         Return BooleanArray indicating the non-null values.
 *         """
 *         self._assert_cpu()             # <<<<<<<<<<<<<<
 *         return _pc().is_valid(self)
 * 
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_assert_cpu");
        __PYX_ERR(4, 1534, __pyx_L1_error)
      }
      ((struct __pyx_vtabstruct_7pyarrow_3lib_Array *)__pyx_v_self->__pyx_vtab)->_assert_cpu(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 1534, __pyx_L1_error)

      /* "pyarrow/array.pxi":1535
 *         """
 *         self._assert_cpu()
 *         return _pc().is_valid(self)             # <<<<<<<<<<<<<<
 * 
 *     def fill_null(self, fill_value):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_4 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pc_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 1535, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
        assert(__pyx_t_4);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
        __pyx_t_6 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
        __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 1535, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      __pyx_t_2 = __pyx_t_3;
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_6 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, ((PyObject *)__pyx_v_self)};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_is_valid, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 1535, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":1530
 *         return _pc().call_function('is_nan', [self])
 * 
 *     def is_valid(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return BooleanArray indicating the non-null values.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_AddTraceback("pyarrow.lib.Array.is_valid", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":1537
 *         return _pc().is_valid(self)
 * 
 *     def fill_null(self, fill_value):             # <<<<<<<<<<<<<<
 *         """
 *         See :func:`pyarrow.compute.fill_null` for usage.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_50fill_null(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_5Array_49fill_null, "Array.fill_null(self, fill_value)\n\nSee :func:`pyarrow.compute.fill_null` for usage.\n\nParameters\n----------\nfill_value : any\n    The replacement value for null entries.\n\nReturns\n-------\nresult : Array\n    A new array with nulls replaced by the given value.");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_5Array_50fill_null = {"fill_null", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Array_50fill_null, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Array_49fill_null};
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_50fill_null(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_fill_value = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("fill_null (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_fill_value,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(4, 1537, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 1537, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "fill_null", 0) < (0)) __PYX_ERR(4, 1537, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("fill_null", 1, 1, 1, i); __PYX_ERR(4, 1537, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 1)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 1537, __pyx_L3_error)
        }
        __pyx_v_fill_value = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("fill_null", 1, 1, 1, __pyx_nargs); __PYX_ERR(4, 1537, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.Array.fill_null", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_5Array_49fill_null(((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_v_self), __pyx_v_fill_value);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_5Array_49fill_null(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self, PyObject *__pyx_v_fill_value) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      PyObject *__pyx_t_5 = NULL;
      size_t __pyx_t_6;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("fill_null", 0);

      /* "pyarrow/array.pxi":1551
 *             A new array with nulls replaced by the given value.
 *         """
 *         self._assert_cpu()             # <<<<<<<<<<<<<<
 *         return _pc().fill_null(self, fill_value)
 * 
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_assert_cpu");
        __PYX_ERR(4, 1551, __pyx_L1_error)
      }
      ((struct __pyx_vtabstruct_7pyarrow_3lib_Array *)__pyx_v_self->__pyx_vtab)->_assert_cpu(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 1551, __pyx_L1_error)

      /* "pyarrow/array.pxi":1552
 *         """
 *         self._assert_cpu()
 *         return _pc().fill_null(self, fill_value)             # <<<<<<<<<<<<<<
 * 
 *     def __getitem__(self, key):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_4 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pc_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 1552, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
        assert(__pyx_t_4);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
        __pyx_t_6 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
        __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 1552, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      __pyx_t_2 = __pyx_t_3;
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_6 = 0;
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_2, ((PyObject *)__pyx_v_self), __pyx_v_fill_value};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_fill_null, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 1552, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":1537
 *         return _pc().is_valid(self)
 * 
 *     def fill_null(self, fill_value):             # <<<<<<<<<<<<<<
 *         """
 *         See :func:`pyarrow.compute.fill_null` for usage.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_AddTraceback("pyarrow.lib.Array.fill_null", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":1554
 *         return _pc().fill_null(self, fill_value)
 * 
 *     def __getitem__(self, key):             # <<<<<<<<<<<<<<
 *         """
 *         Slice or return value at given index
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_52__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_5Array_51__getitem__, "Array.__getitem__(self, key)\n\nSlice or return value at given index\n\nParameters\n----------\nkey : integer or slice\n    Slices with step not equal to 1 (or None) will produce a copy\n    rather than a zero-copy view\n\nReturns\n-------\nvalue : Scalar (index) or Array (slice)");
    #if CYTHON_UPDATE_DESCRIPTOR_DOC
    struct wrapperbase __pyx_wrapperbase_7pyarrow_3lib_5Array_51__getitem__;
    #endif
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_52__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_5Array_51__getitem__(((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_v_self), ((PyObject *)__pyx_v_key));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_5Array_51__getitem__(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self, PyObject *__pyx_v_key) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      int __pyx_t_1;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      size_t __pyx_t_5;
      Py_ssize_t __pyx_t_6;
      int64_t __pyx_t_7;
      Py_ssize_t __pyx_t_8;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__getitem__", 0);

      /* "pyarrow/array.pxi":1568
 *         value : Scalar (index) or Array (slice)
 *         """
 *         self._assert_cpu()             # <<<<<<<<<<<<<<
 *         if isinstance(key, slice):
 *             return _normalize_slice(self, key)
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_assert_cpu");
        __PYX_ERR(4, 1568, __pyx_L1_error)
      }
      ((struct __pyx_vtabstruct_7pyarrow_3lib_Array *)__pyx_v_self->__pyx_vtab)->_assert_cpu(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 1568, __pyx_L1_error)

      /* "pyarrow/array.pxi":1569
 *         """
 *         self._assert_cpu()
 *         if isinstance(key, slice):             # <<<<<<<<<<<<<<
 *             return _normalize_slice(self, key)
 * 
*/
      __pyx_t_1 = PySlice_Check(__pyx_v_key); 
      if (__pyx_t_1) {

        /* "pyarrow/array.pxi":1570
 *         self._assert_cpu()
 *         if isinstance(key, slice):
 *             return _normalize_slice(self, key)             # <<<<<<<<<<<<<<
 * 
 *         return self.getitem(_normalize_index(key, self.length()))
*/
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_normalize_slice); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 1570, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[3] = {__pyx_t_3, ((PyObject *)__pyx_v_self), __pyx_v_key};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 1570, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        goto __pyx_L0;

        /* "pyarrow/array.pxi":1569
 *         """
 *         self._assert_cpu()
 *         if isinstance(key, slice):             # <<<<<<<<<<<<<<
 *             return _normalize_slice(self, key)
 * 
*/
      }

      /* "pyarrow/array.pxi":1572
 *             return _normalize_slice(self, key)
 * 
 *         return self.getitem(_normalize_index(key, self.length()))             # <<<<<<<<<<<<<<
 * 
 *     cdef getitem(self, int64_t i):
*/
      __Pyx_XDECREF(__pyx_r);
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "getitem");
        __PYX_ERR(4, 1572, __pyx_L1_error)
      }
      __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_v_key); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(4, 1572, __pyx_L1_error)
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "length");
        __PYX_ERR(4, 1572, __pyx_L1_error)
      }
      __pyx_t_7 = ((struct __pyx_vtabstruct_7pyarrow_3lib_Array *)__pyx_v_self->__pyx_vtab)->length(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 1572, __pyx_L1_error)
      __pyx_t_8 = __pyx_f_7pyarrow_3lib__normalize_index(__pyx_t_6, __pyx_t_7); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1L))) __PYX_ERR(4, 1572, __pyx_L1_error)
      __pyx_t_2 = ((struct __pyx_vtabstruct_7pyarrow_3lib_Array *)__pyx_v_self->__pyx_vtab)->getitem(__pyx_v_self, __pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 1572, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":1554
 *         return _pc().fill_null(self, fill_value)
 * 
 *     def __getitem__(self, key):             # <<<<<<<<<<<<<<
 *         """
 *         Slice or return value at given index
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_AddTraceback("pyarrow.lib.Array.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":1574
 *         return self.getitem(_normalize_index(key, self.length()))
 * 
 *     cdef getitem(self, int64_t i):             # <<<<<<<<<<<<<<
 *         self._assert_cpu()
 *         return Scalar.wrap(GetResultValue(self.ap.GetScalar(i)))
*/

    static PyObject *__pyx_f_7pyarrow_3lib_5Array_getitem(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self, int64_t __pyx_v_i) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      std::shared_ptr< arrow::Scalar>  __pyx_t_1;
      PyObject *__pyx_t_2 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("getitem", 0);

      /* "pyarrow/array.pxi":1575
 * 
 *     cdef getitem(self, int64_t i):
 *         self._assert_cpu()             # <<<<<<<<<<<<<<
 *         return Scalar.wrap(GetResultValue(self.ap.GetScalar(i)))
 * 
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_assert_cpu");
        __PYX_ERR(4, 1575, __pyx_L1_error)
      }
      ((struct __pyx_vtabstruct_7pyarrow_3lib_Array *)__pyx_v_self->__pyx_vtab)->_assert_cpu(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 1575, __pyx_L1_error)

      /* "pyarrow/array.pxi":1576
 *     cdef getitem(self, int64_t i):
 *         self._assert_cpu()
 *         return Scalar.wrap(GetResultValue(self.ap.GetScalar(i)))             # <<<<<<<<<<<<<<
 * 
 *     def slice(self, offset=0, length=None):
*/
      __Pyx_XDECREF(__pyx_r);
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "ap");
        __PYX_ERR(4, 1576, __pyx_L1_error)
      }
      __pyx_t_1 = arrow::py::GetResultValue<std::shared_ptr< arrow::Scalar> >(__pyx_v_self->ap->GetScalar(__pyx_v_i)); if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 1576, __pyx_L1_error)
      __pyx_t_2 = __pyx_f_7pyarrow_3lib_6Scalar_wrap(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 1576, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":1574
 *         return self.getitem(_normalize_index(key, self.length()))
 * 
 *     cdef getitem(self, int64_t i):             # <<<<<<<<<<<<<<
 *         self._assert_cpu()
 *         return Scalar.wrap(GetResultValue(self.ap.GetScalar(i)))
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_AddTraceback("pyarrow.lib.Array.getitem", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = 0;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":1578
 *         return Scalar.wrap(GetResultValue(self.ap.GetScalar(i)))
 * 
 *     def slice(self, offset=0, length=None):             # <<<<<<<<<<<<<<
 *         """
 *         Compute zero-copy slice of this array.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_54slice(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_5Array_53slice, "Array.slice(self, offset=0, length=None)\n\nCompute zero-copy slice of this array.\n\nParameters\n----------\noffset : int, default 0\n    Offset from start of array to slice.\nlength : int, default None\n    Length of slice (default is until end of Array starting from\n    offset).\n\nReturns\n-------\nsliced : Array\n    An array with the same datatype, containing the sliced values.");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_5Array_54slice = {"slice", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Array_54slice, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Array_53slice};
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_54slice(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_offset = 0;
      PyObject *__pyx_v_length = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[2] = {0,0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("slice (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_offset,&__pyx_mstate_global->__pyx_n_u_length,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(4, 1578, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(4, 1578, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 1578, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "slice", 0) < (0)) __PYX_ERR(4, 1578, __pyx_L3_error)
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_int_0));
          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
        } else {
          switch (__pyx_nargs) {
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(4, 1578, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 1578, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_int_0));
          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
        }
        __pyx_v_offset = values[0];
        __pyx_v_length = values[1];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("slice", 0, 0, 2, __pyx_nargs); __PYX_ERR(4, 1578, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.Array.slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_5Array_53slice(((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_v_self), __pyx_v_offset, __pyx_v_length);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_5Array_53slice(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self, PyObject *__pyx_v_offset, PyObject *__pyx_v_length) {
      std::shared_ptr< arrow::Array>  __pyx_v_result;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_t_2;
      PyObject *__pyx_t_3 = NULL;
      size_t __pyx_t_4;
      Py_ssize_t __pyx_t_5;
      PyObject *__pyx_t_6 = NULL;
      PyObject *__pyx_t_7 = NULL;
      int64_t __pyx_t_8;
      int64_t __pyx_t_9;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("slice", 0);
      __Pyx_INCREF(__pyx_v_offset);

      /* "pyarrow/array.pxi":1597
 *         cdef shared_ptr[CArray] result
 * 
 *         if offset < 0:             # <<<<<<<<<<<<<<
 *             raise IndexError('Offset must be non-negative')
 * 
*/
      __pyx_t_1 = PyObject_RichCompare(__pyx_v_offset, __pyx_mstate_global->__pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 1597, __pyx_L1_error)
      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(4, 1597, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(__pyx_t_2)) {

        /* "pyarrow/array.pxi":1598
 * 
 *         if offset < 0:
 *             raise IndexError('Offset must be non-negative')             # <<<<<<<<<<<<<<
 * 
 *         offset = min(len(self), offset)
*/
        __pyx_t_3 = NULL;
        __pyx_t_4 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Offset_must_be_non_negative};
          __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_IndexError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 1598, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
        }
        __Pyx_Raise(__pyx_t_1, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __PYX_ERR(4, 1598, __pyx_L1_error)

        /* "pyarrow/array.pxi":1597
 *         cdef shared_ptr[CArray] result
 * 
 *         if offset < 0:             # <<<<<<<<<<<<<<
 *             raise IndexError('Offset must be non-negative')
 * 
*/
      }

      /* "pyarrow/array.pxi":1600
 *             raise IndexError('Offset must be non-negative')
 * 
 *         offset = min(len(self), offset)             # <<<<<<<<<<<<<<
 *         if length is None:
 *             result = self.ap.Slice(offset)
*/
      __Pyx_INCREF(__pyx_v_offset);
      __pyx_t_1 = __pyx_v_offset;
      __pyx_t_5 = PyObject_Length(((PyObject *)__pyx_v_self)); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(4, 1600, __pyx_L1_error)
      __pyx_t_6 = PyLong_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 1600, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = PyObject_RichCompare(__pyx_t_1, __pyx_t_6, Py_LT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 1600, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(4, 1600, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (__pyx_t_2) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1;
      } else {
        __pyx_t_7 = PyLong_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 1600, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_3 = __pyx_t_7;
        __pyx_t_7 = 0;
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __pyx_t_3;
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF_SET(__pyx_v_offset, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "pyarrow/array.pxi":1601
 * 
 *         offset = min(len(self), offset)
 *         if length is None:             # <<<<<<<<<<<<<<
 *             result = self.ap.Slice(offset)
 *         else:
*/
      __pyx_t_2 = (__pyx_v_length == Py_None);
      if (__pyx_t_2) {

        /* "pyarrow/array.pxi":1602
 *         offset = min(len(self), offset)
 *         if length is None:
 *             result = self.ap.Slice(offset)             # <<<<<<<<<<<<<<
 *         else:
 *             if length < 0:
*/
        if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "ap");
          __PYX_ERR(4, 1602, __pyx_L1_error)
        }
        __pyx_t_8 = __Pyx_PyLong_As_int64_t(__pyx_v_offset); if (unlikely((__pyx_t_8 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(4, 1602, __pyx_L1_error)
        __pyx_v_result = __pyx_v_self->ap->Slice(__pyx_t_8);

        /* "pyarrow/array.pxi":1601
 * 
 *         offset = min(len(self), offset)
 *         if length is None:             # <<<<<<<<<<<<<<
 *             result = self.ap.Slice(offset)
 *         else:
*/
        goto __pyx_L4;
      }

      /* "pyarrow/array.pxi":1604
 *             result = self.ap.Slice(offset)
 *         else:
 *             if length < 0:             # <<<<<<<<<<<<<<
 *                 raise ValueError('Length must be non-negative')
 *             result = self.ap.Slice(offset, length)
*/
      /*else*/ {
        __pyx_t_1 = PyObject_RichCompare(__pyx_v_length, __pyx_mstate_global->__pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 1604, __pyx_L1_error)
        __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(4, 1604, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (unlikely(__pyx_t_2)) {

          /* "pyarrow/array.pxi":1605
 *         else:
 *             if length < 0:
 *                 raise ValueError('Length must be non-negative')             # <<<<<<<<<<<<<<
 *             result = self.ap.Slice(offset, length)
 * 
*/
          __pyx_t_3 = NULL;
          __pyx_t_4 = 1;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Length_must_be_non_negative};
            __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 1605, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_1);
          }
          __Pyx_Raise(__pyx_t_1, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __PYX_ERR(4, 1605, __pyx_L1_error)

          /* "pyarrow/array.pxi":1604
 *             result = self.ap.Slice(offset)
 *         else:
 *             if length < 0:             # <<<<<<<<<<<<<<
 *                 raise ValueError('Length must be non-negative')
 *             result = self.ap.Slice(offset, length)
*/
        }

        /* "pyarrow/array.pxi":1606
 *             if length < 0:
 *                 raise ValueError('Length must be non-negative')
 *             result = self.ap.Slice(offset, length)             # <<<<<<<<<<<<<<
 * 
 *         return pyarrow_wrap_array(result)
*/
        if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "ap");
          __PYX_ERR(4, 1606, __pyx_L1_error)
        }
        __pyx_t_8 = __Pyx_PyLong_As_int64_t(__pyx_v_offset); if (unlikely((__pyx_t_8 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(4, 1606, __pyx_L1_error)
        __pyx_t_9 = __Pyx_PyLong_As_int64_t(__pyx_v_length); if (unlikely((__pyx_t_9 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(4, 1606, __pyx_L1_error)
        __pyx_v_result = __pyx_v_self->ap->Slice(__pyx_t_8, __pyx_t_9);
      }
      __pyx_L4:;

      /* "pyarrow/array.pxi":1608
 *             result = self.ap.Slice(offset, length)
 * 
 *         return pyarrow_wrap_array(result)             # <<<<<<<<<<<<<<
 * 
 *     def take(self, object indices):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = pyarrow_wrap_array(__pyx_v_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 1608, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":1578
 *         return Scalar.wrap(GetResultValue(self.ap.GetScalar(i)))
 * 
 *     def slice(self, offset=0, length=None):             # <<<<<<<<<<<<<<
 *         """
 *         Compute zero-copy slice of this array.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_7);
      __Pyx_AddTraceback("pyarrow.lib.Array.slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_offset);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":1610
 *         return pyarrow_wrap_array(result)
 * 
 *     def take(self, object indices):             # <<<<<<<<<<<<<<
 *         """
 *         Select values from an array.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_56take(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_5Array_55take, "Array.take(self, indices)\n\nSelect values from an array.\n\nSee :func:`pyarrow.compute.take` for full usage.\n\nParameters\n----------\nindices : Array or array-like\n    The indices in the array whose values will be returned.\n\nReturns\n-------\ntaken : Array\n    An array with the same datatype, containing the taken values.");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_5Array_56take = {"take", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Array_56take, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Array_55take};
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_56take(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_indices = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("take (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_indices,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(4, 1610, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 1610, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "take", 0) < (0)) __PYX_ERR(4, 1610, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("take", 1, 1, 1, i); __PYX_ERR(4, 1610, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 1)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 1610, __pyx_L3_error)
        }
        __pyx_v_indices = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("take", 1, 1, 1, __pyx_nargs); __PYX_ERR(4, 1610, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.Array.take", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_5Array_55take(((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_v_self), __pyx_v_indices);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_5Array_55take(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self, PyObject *__pyx_v_indices) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      PyObject *__pyx_t_5 = NULL;
      size_t __pyx_t_6;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("take", 0);

      /* "pyarrow/array.pxi":1626
 *             An array with the same datatype, containing the taken values.
 *         """
 *         self._assert_cpu()             # <<<<<<<<<<<<<<
 *         return _pc().take(self, indices)
 * 
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_assert_cpu");
        __PYX_ERR(4, 1626, __pyx_L1_error)
      }
      ((struct __pyx_vtabstruct_7pyarrow_3lib_Array *)__pyx_v_self->__pyx_vtab)->_assert_cpu(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 1626, __pyx_L1_error)

      /* "pyarrow/array.pxi":1627
 *         """
 *         self._assert_cpu()
 *         return _pc().take(self, indices)             # <<<<<<<<<<<<<<
 * 
 *     def drop_null(self):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_4 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pc_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 1627, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
        assert(__pyx_t_4);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
        __pyx_t_6 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
        __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 1627, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      __pyx_t_2 = __pyx_t_3;
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_6 = 0;
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_2, ((PyObject *)__pyx_v_self), __pyx_v_indices};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_take, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 1627, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":1610
 *         return pyarrow_wrap_array(result)
 * 
 *     def take(self, object indices):             # <<<<<<<<<<<<<<
 *         """
 *         Select values from an array.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_AddTraceback("pyarrow.lib.Array.take", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":1629
 *         return _pc().take(self, indices)
 * 
 *     def drop_null(self):             # <<<<<<<<<<<<<<
 *         """
 *         Remove missing values from an array.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_58drop_null(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_5Array_57drop_null, "Array.drop_null(self)\n\nRemove missing values from an array.");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_5Array_58drop_null = {"drop_null", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Array_58drop_null, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Array_57drop_null};
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_58drop_null(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("drop_null (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("drop_null", 1, 0, 0, __pyx_nargs); return NULL; }
      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
      if (unlikely(__pyx_kwds_len < 0)) return NULL;
      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("drop_null", __pyx_kwds); return NULL;}
      __pyx_r = __pyx_pf_7pyarrow_3lib_5Array_57drop_null(((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_5Array_57drop_null(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      PyObject *__pyx_t_5 = NULL;
      size_t __pyx_t_6;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("drop_null", 0);

      /* "pyarrow/array.pxi":1633
 *         Remove missing values from an array.
 *         """
 *         self._assert_cpu()             # <<<<<<<<<<<<<<
 *         return _pc().drop_null(self)
 * 
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_assert_cpu");
        __PYX_ERR(4, 1633, __pyx_L1_error)
      }
      ((struct __pyx_vtabstruct_7pyarrow_3lib_Array *)__pyx_v_self->__pyx_vtab)->_assert_cpu(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 1633, __pyx_L1_error)

      /* "pyarrow/array.pxi":1634
 *         """
 *         self._assert_cpu()
 *         return _pc().drop_null(self)             # <<<<<<<<<<<<<<
 * 
 *     def filter(self, object mask, *, null_selection_behavior='drop'):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_4 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pc_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 1634, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
        assert(__pyx_t_4);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
        __pyx_t_6 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
        __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 1634, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      __pyx_t_2 = __pyx_t_3;
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_6 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, ((PyObject *)__pyx_v_self)};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_drop_null, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 1634, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":1629
 *         return _pc().take(self, indices)
 * 
 *     def drop_null(self):             # <<<<<<<<<<<<<<
 *         """
 *         Remove missing values from an array.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_AddTraceback("pyarrow.lib.Array.drop_null", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":1636
 *         return _pc().drop_null(self)
 * 
 *     def filter(self, object mask, *, null_selection_behavior='drop'):             # <<<<<<<<<<<<<<
 *         """
 *         Select values from an array.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_60filter(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_5Array_59filter, "Array.filter(self, mask, *, null_selection_behavior='drop')\n\nSelect values from an array.\n\nSee :func:`pyarrow.compute.filter` for full usage.\n\nParameters\n----------\nmask : Array or array-like\n    The boolean mask to filter the array with.\nnull_selection_behavior : str, default \"drop\"\n    How nulls in the mask should be handled.\n\nReturns\n-------\nfiltered : Array\n    An array of the same type, with only the elements selected by\n    the boolean mask.");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_5Array_60filter = {"filter", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Array_60filter, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Array_59filter};
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_60filter(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_mask = 0;
      PyObject *__pyx_v_null_selection_behavior = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[2] = {0,0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("filter (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_mask,&__pyx_mstate_global->__pyx_n_u_null_selection_behavior,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(4, 1636, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 1636, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "filter", 0) < (0)) __PYX_ERR(4, 1636, __pyx_L3_error)
          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_n_u_drop));
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("filter", 1, 1, 1, i); __PYX_ERR(4, 1636, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 1)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 1636, __pyx_L3_error)
          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_n_u_drop));
        }
        __pyx_v_mask = values[0];
        __pyx_v_null_selection_behavior = values[1];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("filter", 1, 1, 1, __pyx_nargs); __PYX_ERR(4, 1636, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.Array.filter", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_5Array_59filter(((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_v_self), __pyx_v_mask, __pyx_v_null_selection_behavior);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_5Array_59filter(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self, PyObject *__pyx_v_mask, PyObject *__pyx_v_null_selection_behavior) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      PyObject *__pyx_t_5 = NULL;
      size_t __pyx_t_6;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("filter", 0);

      /* "pyarrow/array.pxi":1655
 *             the boolean mask.
 *         """
 *         self._assert_cpu()             # <<<<<<<<<<<<<<
 *         return _pc().filter(self, mask,
 *                             null_selection_behavior=null_selection_behavior)
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_assert_cpu");
        __PYX_ERR(4, 1655, __pyx_L1_error)
      }
      ((struct __pyx_vtabstruct_7pyarrow_3lib_Array *)__pyx_v_self->__pyx_vtab)->_assert_cpu(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 1655, __pyx_L1_error)

      /* "pyarrow/array.pxi":1656
 *         """
 *         self._assert_cpu()
 *         return _pc().filter(self, mask,             # <<<<<<<<<<<<<<
 *                             null_selection_behavior=null_selection_behavior)
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_4 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pc_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 1656, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
        assert(__pyx_t_4);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
        __pyx_t_6 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
        __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 1656, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      __pyx_t_2 = __pyx_t_3;
      __Pyx_INCREF(__pyx_t_2);

      /* "pyarrow/array.pxi":1657
 *         self._assert_cpu()
 *         return _pc().filter(self, mask,
 *                             null_selection_behavior=null_selection_behavior)             # <<<<<<<<<<<<<<
 * 
 *     def index(self, value, start=None, end=None, *, memory_pool=None):
*/
      __pyx_t_6 = 0;
      {
        PyObject *__pyx_callargs[3 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, ((PyObject *)__pyx_v_self), __pyx_v_mask};
        __pyx_t_5 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 1656, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_null_selection_behavior, __pyx_v_null_selection_behavior, __pyx_t_5, __pyx_callargs+3, 0) < (0)) __PYX_ERR(4, 1656, __pyx_L1_error)
        __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_filter, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_5);
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 1656, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":1636
 *         return _pc().drop_null(self)
 * 
 *     def filter(self, object mask, *, null_selection_behavior='drop'):             # <<<<<<<<<<<<<<
 *         """
 *         Select values from an array.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_AddTraceback("pyarrow.lib.Array.filter", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":1659
 *                             null_selection_behavior=null_selection_behavior)
 * 
 *     def index(self, value, start=None, end=None, *, memory_pool=None):             # <<<<<<<<<<<<<<
 *         """
 *         Find the first index of a value.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_62index(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_5Array_61index, "Array.index(self, value, start=None, end=None, *, memory_pool=None)\n\nFind the first index of a value.\n\nSee :func:`pyarrow.compute.index` for full usage.\n\nParameters\n----------\nvalue : Scalar or object\n    The value to look for in the array.\nstart : int, optional\n    The start index where to look for `value`.\nend : int, optional\n    The end index where to look for `value`.\nmemory_pool : MemoryPool, optional\n    A memory pool for potential memory allocations.\n\nReturns\n-------\nindex : Int64Scalar\n    The index of the value in the array (-1 if not found).");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_5Array_62index = {"index", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Array_62index, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Array_61index};
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_62index(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_value = 0;
      PyObject *__pyx_v_start = 0;
      PyObject *__pyx_v_end = 0;
      PyObject *__pyx_v_memory_pool = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[4] = {0,0,0,0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("index (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_value,&__pyx_mstate_global->__pyx_n_u_start,&__pyx_mstate_global->__pyx_n_u_end,&__pyx_mstate_global->__pyx_n_u_memory_pool,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(4, 1659, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  3:
            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(4, 1659, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(4, 1659, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 1659, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "index", 0) < (0)) __PYX_ERR(4, 1659, __pyx_L3_error)
          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
          if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
          if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None));
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("index", 0, 1, 3, i); __PYX_ERR(4, 1659, __pyx_L3_error) }
          }
        } else {
          switch (__pyx_nargs) {
            case  3:
            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(4, 1659, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(4, 1659, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 1659, __pyx_L3_error)
            break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
          if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
          if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None));
        }
        __pyx_v_value = values[0];
        __pyx_v_start = values[1];
        __pyx_v_end = values[2];
        __pyx_v_memory_pool = values[3];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("index", 0, 1, 3, __pyx_nargs); __PYX_ERR(4, 1659, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.Array.index", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_5Array_61index(((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_v_self), __pyx_v_value, __pyx_v_start, __pyx_v_end, __pyx_v_memory_pool);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_5Array_61index(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self, PyObject *__pyx_v_value, PyObject *__pyx_v_start, PyObject *__pyx_v_end, PyObject *__pyx_v_memory_pool) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      PyObject *__pyx_t_5 = NULL;
      size_t __pyx_t_6;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("index", 0);

      /* "pyarrow/array.pxi":1681
 *             The index of the value in the array (-1 if not found).
 *         """
 *         self._assert_cpu()             # <<<<<<<<<<<<<<
 *         return _pc().index(self, value, start, end, memory_pool=memory_pool)
 * 
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_assert_cpu");
        __PYX_ERR(4, 1681, __pyx_L1_error)
      }
      ((struct __pyx_vtabstruct_7pyarrow_3lib_Array *)__pyx_v_self->__pyx_vtab)->_assert_cpu(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 1681, __pyx_L1_error)

      /* "pyarrow/array.pxi":1682
 *         """
 *         self._assert_cpu()
 *         return _pc().index(self, value, start, end, memory_pool=memory_pool)             # <<<<<<<<<<<<<<
 * 
 *     def sort(self, order="ascending", **kwargs):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_4 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pc_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 1682, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
        assert(__pyx_t_4);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
        __pyx_t_6 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
        __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 1682, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      __pyx_t_2 = __pyx_t_3;
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_6 = 0;
      {
        PyObject *__pyx_callargs[5 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, ((PyObject *)__pyx_v_self), __pyx_v_value, __pyx_v_start, __pyx_v_end};
        __pyx_t_5 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 1682, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_memory_pool, __pyx_v_memory_pool, __pyx_t_5, __pyx_callargs+5, 0) < (0)) __PYX_ERR(4, 1682, __pyx_L1_error)
        __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_index, __pyx_callargs+__pyx_t_6, (5-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_5);
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 1682, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":1659
 *                             null_selection_behavior=null_selection_behavior)
 * 
 *     def index(self, value, start=None, end=None, *, memory_pool=None):             # <<<<<<<<<<<<<<
 *         """
 *         Find the first index of a value.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_AddTraceback("pyarrow.lib.Array.index", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":1684
 *         return _pc().index(self, value, start, end, memory_pool=memory_pool)
 * 
 *     def sort(self, order="ascending", **kwargs):             # <<<<<<<<<<<<<<
 *         """
 *         Sort the Array
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_64sort(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_5Array_63sort, "Array.sort(self, order='ascending', **kwargs)\n\nSort the Array\n\nParameters\n----------\norder : str, default \"ascending\"\n    Which order to sort values in.\n    Accepted values are \"ascending\", \"descending\".\n**kwargs : dict, optional\n    Additional sorting options.\n    As allowed by :class:`SortOptions`\n\nReturns\n-------\nresult : Array");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_5Array_64sort = {"sort", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Array_64sort, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Array_63sort};
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_64sort(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_order = 0;
      PyObject *__pyx_v_kwargs = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("sort (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
      __Pyx_GOTREF(__pyx_v_kwargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_order,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(4, 1684, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 1684, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, __pyx_v_kwargs, values, kwd_pos_args, __pyx_kwds_len, "sort", 1) < (0)) __PYX_ERR(4, 1684, __pyx_L3_error)
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_n_u_ascending));
        } else {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 1684, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_n_u_ascending));
        }
        __pyx_v_order = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("sort", 0, 0, 1, __pyx_nargs); __PYX_ERR(4, 1684, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
      __Pyx_AddTraceback("pyarrow.lib.Array.sort", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_5Array_63sort(((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_v_self), __pyx_v_order, __pyx_v_kwargs);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_DECREF(__pyx_v_kwargs);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_5Array_63sort(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self, PyObject *__pyx_v_order, PyObject *__pyx_v_kwargs) {
      PyObject *__pyx_v_indices = NULL;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      PyObject *__pyx_t_5 = NULL;
      size_t __pyx_t_6;
      PyObject *__pyx_t_7 = NULL;
      PyObject *__pyx_t_8 = NULL;
      PyObject *__pyx_t_9 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("sort", 0);

      /* "pyarrow/array.pxi":1701
 *         result : Array
 *         """
 *         self._assert_cpu()             # <<<<<<<<<<<<<<
 *         indices = _pc().sort_indices(
 *             self,
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_assert_cpu");
        __PYX_ERR(4, 1701, __pyx_L1_error)
      }
      ((struct __pyx_vtabstruct_7pyarrow_3lib_Array *)__pyx_v_self->__pyx_vtab)->_assert_cpu(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 1701, __pyx_L1_error)

      /* "pyarrow/array.pxi":1702
 *         """
 *         self._assert_cpu()
 *         indices = _pc().sort_indices(             # <<<<<<<<<<<<<<
 *             self,
 *             options=_pc().SortOptions(sort_keys=[("", order)], **kwargs)
*/
      __pyx_t_4 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pc_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 1702, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
        assert(__pyx_t_4);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
        __pyx_t_6 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
        __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 1702, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      __pyx_t_2 = __pyx_t_3;
      __Pyx_INCREF(__pyx_t_2);

      /* "pyarrow/array.pxi":1704
 *         indices = _pc().sort_indices(
 *             self,
 *             options=_pc().SortOptions(sort_keys=[("", order)], **kwargs)             # <<<<<<<<<<<<<<
 *         )
 *         return self.take(indices)
*/
      __pyx_t_4 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_pc_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 1704, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_6 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_7);
        assert(__pyx_t_4);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
        __pyx_t_6 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
        __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 1704, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
      }
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_SortOptions); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 1704, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 1704, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(4, 1704, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_INCREF(__pyx_mstate_global->__pyx_kp_u__15);
      __Pyx_GIVEREF(__pyx_mstate_global->__pyx_kp_u__15);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_mstate_global->__pyx_kp_u__15) != (0)) __PYX_ERR(4, 1704, __pyx_L1_error);
      __Pyx_INCREF(__pyx_v_order);
      __Pyx_GIVEREF(__pyx_v_order);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_order) != (0)) __PYX_ERR(4, 1704, __pyx_L1_error);
      __pyx_t_9 = PyList_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(4, 1704, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_GIVEREF(__pyx_t_8);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_9, 0, __pyx_t_8) != (0)) __PYX_ERR(4, 1704, __pyx_L1_error);
      __pyx_t_8 = 0;
      if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_sort_keys, __pyx_t_9) < (0)) __PYX_ERR(4, 1704, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_5 = __pyx_t_4;
      __pyx_t_4 = 0;
      if (__Pyx_MergeKeywords(__pyx_t_5, __pyx_v_kwargs) < (0)) __PYX_ERR(4, 1704, __pyx_L1_error)
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_mstate_global->__pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 1704, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_6 = 0;
      {
        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, ((PyObject *)__pyx_v_self)};
        __pyx_t_5 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 1702, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_options, __pyx_t_4, __pyx_t_5, __pyx_callargs+2, 0) < (0)) __PYX_ERR(4, 1702, __pyx_L1_error)
        __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_sort_indices, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_5);
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 1702, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_v_indices = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "pyarrow/array.pxi":1706
 *             options=_pc().SortOptions(sort_keys=[("", order)], **kwargs)
 *         )
 *         return self.take(indices)             # <<<<<<<<<<<<<<
 * 
 *     def _to_pandas(self, options, types_mapper=None, **kwargs):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = ((PyObject *)__pyx_v_self);
      __Pyx_INCREF(__pyx_t_3);
      __pyx_t_6 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_indices};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_take, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 1706, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":1684
 *         return _pc().index(self, value, start, end, memory_pool=memory_pool)
 * 
 *     def sort(self, order="ascending", **kwargs):             # <<<<<<<<<<<<<<
 *         """
 *         Sort the Array
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_8);
      __Pyx_XDECREF(__pyx_t_9);
      __Pyx_AddTraceback("pyarrow.lib.Array.sort", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_indices);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":1708
 *         return self.take(indices)
 * 
 *     def _to_pandas(self, options, types_mapper=None, **kwargs):             # <<<<<<<<<<<<<<
 *         self._assert_cpu()
 *         return _array_like_to_pandas(self, options, types_mapper=types_mapper)
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_66_to_pandas(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_5Array_65_to_pandas, "Array._to_pandas(self, options, types_mapper=None, **kwargs)");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_5Array_66_to_pandas = {"_to_pandas", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Array_66_to_pandas, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Array_65_to_pandas};
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_66_to_pandas(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_options = 0;
      PyObject *__pyx_v_types_mapper = 0;
      CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[2] = {0,0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("_to_pandas (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_options,&__pyx_mstate_global->__pyx_n_u_types_mapper,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(4, 1708, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(4, 1708, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 1708, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, __pyx_v_kwargs, values, kwd_pos_args, __pyx_kwds_len, "_to_pandas", 1) < (0)) __PYX_ERR(4, 1708, __pyx_L3_error)
          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_to_pandas", 0, 1, 2, i); __PYX_ERR(4, 1708, __pyx_L3_error) }
          }
        } else {
          switch (__pyx_nargs) {
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(4, 1708, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 1708, __pyx_L3_error)
            break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
        }
        __pyx_v_options = values[0];
        __pyx_v_types_mapper = values[1];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("_to_pandas", 0, 1, 2, __pyx_nargs); __PYX_ERR(4, 1708, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_XDECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
      __Pyx_AddTraceback("pyarrow.lib.Array._to_pandas", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_5Array_65_to_pandas(((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_v_self), __pyx_v_options, __pyx_v_types_mapper, __pyx_v_kwargs);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_XDECREF(__pyx_v_kwargs);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_5Array_65_to_pandas(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self, PyObject *__pyx_v_options, PyObject *__pyx_v_types_mapper, CYTHON_UNUSED PyObject *__pyx_v_kwargs) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("_to_pandas", 0);

      /* "pyarrow/array.pxi":1709
 * 
 *     def _to_pandas(self, options, types_mapper=None, **kwargs):
 *         self._assert_cpu()             # <<<<<<<<<<<<<<
 *         return _array_like_to_pandas(self, options, types_mapper=types_mapper)
 * 
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_assert_cpu");
        __PYX_ERR(4, 1709, __pyx_L1_error)
      }
      ((struct __pyx_vtabstruct_7pyarrow_3lib_Array *)__pyx_v_self->__pyx_vtab)->_assert_cpu(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 1709, __pyx_L1_error)

      /* "pyarrow/array.pxi":1710
 *     def _to_pandas(self, options, types_mapper=None, **kwargs):
 *         self._assert_cpu()
 *         return _array_like_to_pandas(self, options, types_mapper=types_mapper)             # <<<<<<<<<<<<<<
 * 
 *     def __array__(self, dtype=None, copy=None):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __pyx_f_7pyarrow_3lib__array_like_to_pandas(((PyObject *)__pyx_v_self), __pyx_v_options, __pyx_v_types_mapper); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 1710, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":1708
 *         return self.take(indices)
 * 
 *     def _to_pandas(self, options, types_mapper=None, **kwargs):             # <<<<<<<<<<<<<<
 *         self._assert_cpu()
 *         return _array_like_to_pandas(self, options, types_mapper=types_mapper)
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("pyarrow.lib.Array._to_pandas", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":1712
 *         return _array_like_to_pandas(self, options, types_mapper=types_mapper)
 * 
 *     def __array__(self, dtype=None, copy=None):             # <<<<<<<<<<<<<<
 *         self._assert_cpu()
 * 
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_68__array__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_5Array_67__array__, "Array.__array__(self, dtype=None, copy=None)");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_5Array_68__array__ = {"__array__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Array_68__array__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Array_67__array__};
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_68__array__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_dtype = 0;
      PyObject *__pyx_v_copy = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[2] = {0,0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__array__ (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_dtype,&__pyx_mstate_global->__pyx_n_u_copy,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(4, 1712, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(4, 1712, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 1712, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__array__", 0) < (0)) __PYX_ERR(4, 1712, __pyx_L3_error)
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
        } else {
          switch (__pyx_nargs) {
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(4, 1712, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 1712, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
        }
        __pyx_v_dtype = values[0];
        __pyx_v_copy = values[1];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("__array__", 0, 0, 2, __pyx_nargs); __PYX_ERR(4, 1712, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.Array.__array__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_5Array_67__array__(((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_v_self), __pyx_v_dtype, __pyx_v_copy);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_5Array_67__array__(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self, PyObject *__pyx_v_dtype, PyObject *__pyx_v_copy) {
      PyObject *__pyx_v_values = NULL;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      int __pyx_t_1;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      PyObject *__pyx_t_5 = NULL;
      PyObject *__pyx_t_6 = NULL;
      size_t __pyx_t_7;
      PyObject *__pyx_t_8 = NULL;
      PyObject *__pyx_t_9 = NULL;
      int __pyx_t_10;
      PyObject *__pyx_t_11 = NULL;
      int __pyx_t_12;
      enum  arrow::Type::type __pyx_t_13;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__array__", 0);

      /* "pyarrow/array.pxi":1713
 * 
 *     def __array__(self, dtype=None, copy=None):
 *         self._assert_cpu()             # <<<<<<<<<<<<<<
 * 
 *         if copy is False:
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_assert_cpu");
        __PYX_ERR(4, 1713, __pyx_L1_error)
      }
      ((struct __pyx_vtabstruct_7pyarrow_3lib_Array *)__pyx_v_self->__pyx_vtab)->_assert_cpu(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 1713, __pyx_L1_error)

      /* "pyarrow/array.pxi":1715
 *         self._assert_cpu()
 * 
 *         if copy is False:             # <<<<<<<<<<<<<<
 *             try:
 *                 values = self.to_numpy(zero_copy_only=True)
*/
      __pyx_t_1 = (__pyx_v_copy == Py_False);
      if (__pyx_t_1) {

        /* "pyarrow/array.pxi":1716
 * 
 *         if copy is False:
 *             try:             # <<<<<<<<<<<<<<
 *                 values = self.to_numpy(zero_copy_only=True)
 *             except ArrowInvalid:
*/
        {
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4);
          __Pyx_XGOTREF(__pyx_t_2);
          __Pyx_XGOTREF(__pyx_t_3);
          __Pyx_XGOTREF(__pyx_t_4);
          /*try:*/ {

            /* "pyarrow/array.pxi":1717
 *         if copy is False:
 *             try:
 *                 values = self.to_numpy(zero_copy_only=True)             # <<<<<<<<<<<<<<
 *             except ArrowInvalid:
 *                 raise ValueError(
*/
            __pyx_t_6 = ((PyObject *)__pyx_v_self);
            __Pyx_INCREF(__pyx_t_6);
            __pyx_t_7 = 0;
            {
              PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_6, NULL};
              __pyx_t_8 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(4, 1717, __pyx_L4_error)
              __Pyx_GOTREF(__pyx_t_8);
              if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_zero_copy_only, Py_True, __pyx_t_8, __pyx_callargs+1, 0) < (0)) __PYX_ERR(4, 1717, __pyx_L4_error)
              __pyx_t_5 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_to_numpy, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_8);
              __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
              __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
              if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 1717, __pyx_L4_error)
              __Pyx_GOTREF(__pyx_t_5);
            }
            __pyx_v_values = __pyx_t_5;
            __pyx_t_5 = 0;

            /* "pyarrow/array.pxi":1716
 * 
 *         if copy is False:
 *             try:             # <<<<<<<<<<<<<<
 *                 values = self.to_numpy(zero_copy_only=True)
 *             except ArrowInvalid:
*/
          }
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          goto __pyx_L9_try_end;
          __pyx_L4_error:;
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;

          /* "pyarrow/array.pxi":1718
 *             try:
 *                 values = self.to_numpy(zero_copy_only=True)
 *             except ArrowInvalid:             # <<<<<<<<<<<<<<
 *                 raise ValueError(
 *                     "Unable to avoid a copy while creating a numpy array as requested.\n"
*/
          __Pyx_ErrFetch(&__pyx_t_5, &__pyx_t_8, &__pyx_t_6);
          __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_ArrowInvalid); if (unlikely(!__pyx_t_9)) __PYX_ERR(4, 1718, __pyx_L6_except_error)
          __Pyx_GOTREF(__pyx_t_9);
          __pyx_t_10 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_5, __pyx_t_9);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          __Pyx_ErrRestore(__pyx_t_5, __pyx_t_8, __pyx_t_6);
          __pyx_t_5 = 0; __pyx_t_8 = 0; __pyx_t_6 = 0;
          if (__pyx_t_10) {
            __Pyx_AddTraceback("pyarrow.lib.Array.__array__", __pyx_clineno, __pyx_lineno, __pyx_filename);
            if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_8, &__pyx_t_5) < 0) __PYX_ERR(4, 1718, __pyx_L6_except_error)
            __Pyx_XGOTREF(__pyx_t_6);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_5);

            /* "pyarrow/array.pxi":1719
 *                 values = self.to_numpy(zero_copy_only=True)
 *             except ArrowInvalid:
 *                 raise ValueError(             # <<<<<<<<<<<<<<
 *                     "Unable to avoid a copy while creating a numpy array as requested.\n"
 *                     "If using `np.array(obj, copy=False)` replace it with "
*/
            __pyx_t_11 = NULL;
            __pyx_t_7 = 1;
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_mstate_global->__pyx_kp_u_Unable_to_avoid_a_copy_while_cre};
              __pyx_t_9 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
              __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
              if (unlikely(!__pyx_t_9)) __PYX_ERR(4, 1719, __pyx_L6_except_error)
              __Pyx_GOTREF(__pyx_t_9);
            }
            __Pyx_Raise(__pyx_t_9, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
            __PYX_ERR(4, 1719, __pyx_L6_except_error)
          }
          goto __pyx_L6_except_error;

          /* "pyarrow/array.pxi":1716
 * 
 *         if copy is False:
 *             try:             # <<<<<<<<<<<<<<
 *                 values = self.to_numpy(zero_copy_only=True)
 *             except ArrowInvalid:
*/
          __pyx_L6_except_error:;
          __Pyx_XGIVEREF(__pyx_t_2);
          __Pyx_XGIVEREF(__pyx_t_3);
          __Pyx_XGIVEREF(__pyx_t_4);
          __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
          goto __pyx_L1_error;
          __pyx_L9_try_end:;
        }

        /* "pyarrow/array.pxi":1726
 *             # values is already a numpy array at this point, but calling np.array(..)
 *             # again to handle the `dtype` keyword with a no-copy guarantee
 *             return np.array(values, dtype=dtype, copy=False)             # <<<<<<<<<<<<<<
 * 
 *         values = self.to_numpy(zero_copy_only=False)
*/
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_8 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 1726, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_array); if (unlikely(!__pyx_t_9)) __PYX_ERR(4, 1726, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_7 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_9))) {
          __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_9);
          assert(__pyx_t_8);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_9);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_9, __pyx__function);
          __pyx_t_7 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_8, __pyx_v_values};
          __pyx_t_6 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 1726, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_dtype, __pyx_v_dtype, __pyx_t_6, __pyx_callargs+2, 0) < (0)) __PYX_ERR(4, 1726, __pyx_L1_error)
          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_copy, Py_False, __pyx_t_6, __pyx_callargs+2, 1) < (0)) __PYX_ERR(4, 1726, __pyx_L1_error)
          __pyx_t_5 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_6);
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 1726, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
        }
        __pyx_r = __pyx_t_5;
        __pyx_t_5 = 0;
        goto __pyx_L0;

        /* "pyarrow/array.pxi":1715
 *         self._assert_cpu()
 * 
 *         if copy is False:             # <<<<<<<<<<<<<<
 *             try:
 *                 values = self.to_numpy(zero_copy_only=True)
*/
      }

      /* "pyarrow/array.pxi":1728
 *             return np.array(values, dtype=dtype, copy=False)
 * 
 *         values = self.to_numpy(zero_copy_only=False)             # <<<<<<<<<<<<<<
 *         if copy is True and is_numeric(self.type.id) and self.null_count == 0:
 *             # to_numpy did not yet make a copy (is_numeric = integer/floats, no decimal)
*/
      __pyx_t_9 = ((PyObject *)__pyx_v_self);
      __Pyx_INCREF(__pyx_t_9);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_9, NULL};
        __pyx_t_6 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 1728, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_zero_copy_only, Py_False, __pyx_t_6, __pyx_callargs+1, 0) < (0)) __PYX_ERR(4, 1728, __pyx_L1_error)
        __pyx_t_5 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_to_numpy, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_6);
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 1728, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
      }
      __pyx_v_values = __pyx_t_5;
      __pyx_t_5 = 0;

      /* "pyarrow/array.pxi":1729
 * 
 *         values = self.to_numpy(zero_copy_only=False)
 *         if copy is True and is_numeric(self.type.id) and self.null_count == 0:             # <<<<<<<<<<<<<<
 *             # to_numpy did not yet make a copy (is_numeric = integer/floats, no decimal)
 *             return np.array(values, dtype=dtype, copy=True)
*/
      __pyx_t_12 = (__pyx_v_copy == Py_True);
      if (__pyx_t_12) {
      } else {
        __pyx_t_1 = __pyx_t_12;
        goto __pyx_L13_bool_binop_done;
      }
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "type");
        __PYX_ERR(4, 1729, __pyx_L1_error)
      }
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->type), __pyx_mstate_global->__pyx_n_u_id); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 1729, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_13 = ((enum  arrow::Type::type)__Pyx_PyLong_As_enum____arrow_3a__3a_Type_3a__3a_type(__pyx_t_5)); if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 1729, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_12 = (arrow::is_numeric(__pyx_t_13) != 0);
      if (__pyx_t_12) {
      } else {
        __pyx_t_1 = __pyx_t_12;
        goto __pyx_L13_bool_binop_done;
      }
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_null_count); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 1729, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_12 = (__Pyx_PyLong_BoolEqObjC(__pyx_t_5, __pyx_mstate_global->__pyx_int_0, 0, 0)); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(4, 1729, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_1 = __pyx_t_12;
      __pyx_L13_bool_binop_done:;
      if (__pyx_t_1) {

        /* "pyarrow/array.pxi":1731
 *         if copy is True and is_numeric(self.type.id) and self.null_count == 0:
 *             # to_numpy did not yet make a copy (is_numeric = integer/floats, no decimal)
 *             return np.array(values, dtype=dtype, copy=True)             # <<<<<<<<<<<<<<
 * 
 *         if dtype is None:
*/
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_6 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(4, 1731, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_array); if (unlikely(!__pyx_t_8)) __PYX_ERR(4, 1731, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __pyx_t_7 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_8))) {
          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_8);
          assert(__pyx_t_6);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_8, __pyx__function);
          __pyx_t_7 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_6, __pyx_v_values};
          __pyx_t_9 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(4, 1731, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_dtype, __pyx_v_dtype, __pyx_t_9, __pyx_callargs+2, 0) < (0)) __PYX_ERR(4, 1731, __pyx_L1_error)
          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_copy, Py_True, __pyx_t_9, __pyx_callargs+2, 1) < (0)) __PYX_ERR(4, 1731, __pyx_L1_error)
          __pyx_t_5 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_9);
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 1731, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
        }
        __pyx_r = __pyx_t_5;
        __pyx_t_5 = 0;
        goto __pyx_L0;

        /* "pyarrow/array.pxi":1729
 * 
 *         values = self.to_numpy(zero_copy_only=False)
 *         if copy is True and is_numeric(self.type.id) and self.null_count == 0:             # <<<<<<<<<<<<<<
 *             # to_numpy did not yet make a copy (is_numeric = integer/floats, no decimal)
 *             return np.array(values, dtype=dtype, copy=True)
*/
      }

      /* "pyarrow/array.pxi":1733
 *             return np.array(values, dtype=dtype, copy=True)
 * 
 *         if dtype is None:             # <<<<<<<<<<<<<<
 *             return values
 *         return np.asarray(values, dtype=dtype)
*/
      __pyx_t_1 = (__pyx_v_dtype == Py_None);
      if (__pyx_t_1) {

        /* "pyarrow/array.pxi":1734
 * 
 *         if dtype is None:
 *             return values             # <<<<<<<<<<<<<<
 *         return np.asarray(values, dtype=dtype)
 * 
*/
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_v_values);
        __pyx_r = __pyx_v_values;
        goto __pyx_L0;

        /* "pyarrow/array.pxi":1733
 *             return np.array(values, dtype=dtype, copy=True)
 * 
 *         if dtype is None:             # <<<<<<<<<<<<<<
 *             return values
 *         return np.asarray(values, dtype=dtype)
*/
      }

      /* "pyarrow/array.pxi":1735
 *         if dtype is None:
 *             return values
 *         return np.asarray(values, dtype=dtype)             # <<<<<<<<<<<<<<
 * 
 *     def to_numpy(self, zero_copy_only=True, writable=False):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_8 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(4, 1735, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_asarray); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 1735, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_7 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
        assert(__pyx_t_8);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
        __pyx_t_7 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_8, __pyx_v_values};
        __pyx_t_9 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(4, 1735, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_dtype, __pyx_v_dtype, __pyx_t_9, __pyx_callargs+2, 0) < (0)) __PYX_ERR(4, 1735, __pyx_L1_error)
        __pyx_t_5 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_9);
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 1735, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
      }
      __pyx_r = __pyx_t_5;
      __pyx_t_5 = 0;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":1712
 *         return _array_like_to_pandas(self, options, types_mapper=types_mapper)
 * 
 *     def __array__(self, dtype=None, copy=None):             # <<<<<<<<<<<<<<
 *         self._assert_cpu()
 * 
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_8);
      __Pyx_XDECREF(__pyx_t_9);
      __Pyx_XDECREF(__pyx_t_11);
      __Pyx_AddTraceback("pyarrow.lib.Array.__array__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_values);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":1737
 *         return np.asarray(values, dtype=dtype)
 * 
 *     def to_numpy(self, zero_copy_only=True, writable=False):             # <<<<<<<<<<<<<<
 *         """
 *         Return a NumPy view or copy of this array.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_70to_numpy(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_5Array_69to_numpy, "Array.to_numpy(self, zero_copy_only=True, writable=False)\n\nReturn a NumPy view or copy of this array.\n\nBy default, tries to return a view of this array. This is only\nsupported for primitive arrays with the same memory layout as NumPy\n(i.e. integers, floating point, ..) and without any nulls.\n\nFor the extension arrays, this method simply delegates to the\nunderlying storage array.\n\nParameters\n----------\nzero_copy_only : bool, default True\n    If True, an exception will be raised if the conversion to a numpy\n    array would require copying the underlying data (e.g. in presence\n    of nulls, or for non-primitive types).\nwritable : bool, default False\n    For numpy arrays created with zero copy (view on the Arrow data),\n    the resulting array is not writable (Arrow data is immutable).\n    By setting this to True, a copy of the array is made to ensure\n    it is writable.\n\nReturns\n-------\narray : numpy.ndarray");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_5Array_70to_numpy = {"to_numpy", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Array_70to_numpy, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Array_69to_numpy};
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_70to_numpy(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_zero_copy_only = 0;
      PyObject *__pyx_v_writable = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[2] = {0,0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("to_numpy (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_zero_copy_only,&__pyx_mstate_global->__pyx_n_u_writable,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(4, 1737, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(4, 1737, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 1737, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "to_numpy", 0) < (0)) __PYX_ERR(4, 1737, __pyx_L3_error)
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_True));
          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_False));
        } else {
          switch (__pyx_nargs) {
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(4, 1737, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 1737, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_True));
          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_False));
        }
        __pyx_v_zero_copy_only = values[0];
        __pyx_v_writable = values[1];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("to_numpy", 0, 0, 2, __pyx_nargs); __PYX_ERR(4, 1737, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.Array.to_numpy", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_5Array_69to_numpy(((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_v_self), __pyx_v_zero_copy_only, __pyx_v_writable);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_5Array_69to_numpy(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self, PyObject *__pyx_v_zero_copy_only, PyObject *__pyx_v_writable) {
      PyObject *__pyx_v_out;
      arrow::py::PandasOptions __pyx_v_c_options;
      PyObject *__pyx_v_array = NULL;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_t_2;
      PyObject *__pyx_t_3 = NULL;
      size_t __pyx_t_4;
      int __pyx_t_5;
      bool __pyx_t_6;
      int __pyx_t_7;
      int __pyx_t_8;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("to_numpy", 0);

      /* "pyarrow/array.pxi":1764
 *         array : numpy.ndarray
 *         """
 *         self._assert_cpu()             # <<<<<<<<<<<<<<
 * 
 *         if np is None:
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_assert_cpu");
        __PYX_ERR(4, 1764, __pyx_L1_error)
      }
      ((struct __pyx_vtabstruct_7pyarrow_3lib_Array *)__pyx_v_self->__pyx_vtab)->_assert_cpu(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 1764, __pyx_L1_error)

      /* "pyarrow/array.pxi":1766
 *         self._assert_cpu()
 * 
 *         if np is None:             # <<<<<<<<<<<<<<
 *             raise ImportError(
 *                 "Cannot return a numpy.ndarray if NumPy is not present")
*/
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 1766, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = (__pyx_t_1 == Py_None);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(__pyx_t_2)) {

        /* "pyarrow/array.pxi":1767
 * 
 *         if np is None:
 *             raise ImportError(             # <<<<<<<<<<<<<<
 *                 "Cannot return a numpy.ndarray if NumPy is not present")
 *         cdef:
*/
        __pyx_t_3 = NULL;
        __pyx_t_4 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Cannot_return_a_numpy_ndarray_if};
          __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ImportError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 1767, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
        }
        __Pyx_Raise(__pyx_t_1, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __PYX_ERR(4, 1767, __pyx_L1_error)

        /* "pyarrow/array.pxi":1766
 *         self._assert_cpu()
 * 
 *         if np is None:             # <<<<<<<<<<<<<<
 *             raise ImportError(
 *                 "Cannot return a numpy.ndarray if NumPy is not present")
*/
      }

      /* "pyarrow/array.pxi":1774
 *             object values
 * 
 *         if zero_copy_only and writable:             # <<<<<<<<<<<<<<
 *             raise ValueError(
 *                 "Cannot return a writable array if asking for zero-copy")
*/
      __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_zero_copy_only); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(4, 1774, __pyx_L1_error)
      if (__pyx_t_5) {
      } else {
        __pyx_t_2 = __pyx_t_5;
        goto __pyx_L5_bool_binop_done;
      }
      __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_writable); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(4, 1774, __pyx_L1_error)
      __pyx_t_2 = __pyx_t_5;
      __pyx_L5_bool_binop_done:;
      if (unlikely(__pyx_t_2)) {

        /* "pyarrow/array.pxi":1775
 * 
 *         if zero_copy_only and writable:
 *             raise ValueError(             # <<<<<<<<<<<<<<
 *                 "Cannot return a writable array if asking for zero-copy")
 * 
*/
        __pyx_t_3 = NULL;
        __pyx_t_4 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Cannot_return_a_writable_array_i};
          __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 1775, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
        }
        __Pyx_Raise(__pyx_t_1, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __PYX_ERR(4, 1775, __pyx_L1_error)

        /* "pyarrow/array.pxi":1774
 *             object values
 * 
 *         if zero_copy_only and writable:             # <<<<<<<<<<<<<<
 *             raise ValueError(
 *                 "Cannot return a writable array if asking for zero-copy")
*/
      }

      /* "pyarrow/array.pxi":1782
 *         # Decoding a dictionary does imply a copy by the way,
 *         # so it can't be done if the user requested a zero_copy.
 *         c_options.decode_dictionaries = True             # <<<<<<<<<<<<<<
 *         c_options.zero_copy_only = zero_copy_only
 *         c_options.to_numpy = True
*/
      __pyx_v_c_options.decode_dictionaries = 1;

      /* "pyarrow/array.pxi":1783
 *         # so it can't be done if the user requested a zero_copy.
 *         c_options.decode_dictionaries = True
 *         c_options.zero_copy_only = zero_copy_only             # <<<<<<<<<<<<<<
 *         c_options.to_numpy = True
 * 
*/
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_zero_copy_only); if (unlikely((__pyx_t_6 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(4, 1783, __pyx_L1_error)
      __pyx_v_c_options.zero_copy_only = __pyx_t_6;

      /* "pyarrow/array.pxi":1784
 *         c_options.decode_dictionaries = True
 *         c_options.zero_copy_only = zero_copy_only
 *         c_options.to_numpy = True             # <<<<<<<<<<<<<<
 * 
 *         with nogil:
*/
      __pyx_v_c_options.to_numpy = 1;

      /* "pyarrow/array.pxi":1786
 *         c_options.to_numpy = True
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             check_status(ConvertArrayToPandas(c_options, self.sp_array,
 *                                               self, &out))
*/
      {
          PyThreadState * _save;
          _save = PyEval_SaveThread();
          __Pyx_FastGIL_Remember();
          /*try:*/ {

            /* "pyarrow/array.pxi":1787
 * 
 *         with nogil:
 *             check_status(ConvertArrayToPandas(c_options, self.sp_array,             # <<<<<<<<<<<<<<
 *                                               self, &out))
 * 
*/
            if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
              PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_array");
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              __PYX_ERR(4, 1787, __pyx_L8_error)
            }

            /* "pyarrow/array.pxi":1788
 *         with nogil:
 *             check_status(ConvertArrayToPandas(c_options, self.sp_array,
 *                                               self, &out))             # <<<<<<<<<<<<<<
 * 
 *         # wrap_array_output uses pandas to convert to Categorical, here
*/
            __pyx_t_7 = __pyx_f_7pyarrow_3lib_check_status(arrow::py::ConvertArrayToPandas(__pyx_v_c_options, __pyx_v_self->sp_array, ((PyObject *)__pyx_v_self), (&__pyx_v_out))); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(4, 1787, __pyx_L8_error)
          }

          /* "pyarrow/array.pxi":1786
 *         c_options.to_numpy = True
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             check_status(ConvertArrayToPandas(c_options, self.sp_array,
 *                                               self, &out))
*/
          /*finally:*/ {
            /*normal exit:*/{
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L9;
            }
            __pyx_L8_error: {
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L1_error;
            }
            __pyx_L9:;
          }
      }

      /* "pyarrow/array.pxi":1792
 *         # wrap_array_output uses pandas to convert to Categorical, here
 *         # always convert to numpy array without pandas dependency
 *         array = PyObject_to_object(out)             # <<<<<<<<<<<<<<
 * 
 *         if writable and not array.flags.writeable:
*/
      __pyx_t_1 = __pyx_f_7pyarrow_8includes_6common_PyObject_to_object(__pyx_v_out); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 1792, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_v_array = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "pyarrow/array.pxi":1794
 *         array = PyObject_to_object(out)
 * 
 *         if writable and not array.flags.writeable:             # <<<<<<<<<<<<<<
 *             # if the conversion already needed to a copy, writeable is True
 *             array = array.copy()
*/
      __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_writable); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(4, 1794, __pyx_L1_error)
      if (__pyx_t_5) {
      } else {
        __pyx_t_2 = __pyx_t_5;
        goto __pyx_L11_bool_binop_done;
      }
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_array, __pyx_mstate_global->__pyx_n_u_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 1794, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_writeable); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 1794, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(4, 1794, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_8 = (!__pyx_t_5);
      __pyx_t_2 = __pyx_t_8;
      __pyx_L11_bool_binop_done:;
      if (__pyx_t_2) {

        /* "pyarrow/array.pxi":1796
 *         if writable and not array.flags.writeable:
 *             # if the conversion already needed to a copy, writeable is True
 *             array = array.copy()             # <<<<<<<<<<<<<<
 *         return array
 * 
*/
        __pyx_t_1 = __pyx_v_array;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
          __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_copy, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 1796, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        __Pyx_DECREF_SET(__pyx_v_array, __pyx_t_3);
        __pyx_t_3 = 0;

        /* "pyarrow/array.pxi":1794
 *         array = PyObject_to_object(out)
 * 
 *         if writable and not array.flags.writeable:             # <<<<<<<<<<<<<<
 *             # if the conversion already needed to a copy, writeable is True
 *             array = array.copy()
*/
      }

      /* "pyarrow/array.pxi":1797
 *             # if the conversion already needed to a copy, writeable is True
 *             array = array.copy()
 *         return array             # <<<<<<<<<<<<<<
 * 
 *     def to_pylist(self, *, maps_as_pydicts=None):
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_array);
      __pyx_r = __pyx_v_array;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":1737
 *         return np.asarray(values, dtype=dtype)
 * 
 *     def to_numpy(self, zero_copy_only=True, writable=False):             # <<<<<<<<<<<<<<
 *         """
 *         Return a NumPy view or copy of this array.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_AddTraceback("pyarrow.lib.Array.to_numpy", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_array);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":1799
 *         return array
 * 
 *     def to_pylist(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Convert to a list of native Python objects.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_72to_pylist(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_5Array_71to_pylist, "Array.to_pylist(self, *, maps_as_pydicts=None)\n\nConvert to a list of native Python objects.\n\nParameters\n----------\nmaps_as_pydicts : str, optional, default `None`\n    Valid values are `None`, 'lossy', or 'strict'.\n    The default behavior (`None`), is to convert Arrow Map arrays to\n    Python association lists (list-of-tuples) in the same order as the\n    Arrow Map, as in [(key1, value1), (key2, value2), ...].\n\n    If 'lossy' or 'strict', convert Arrow Map arrays to native Python dicts.\n\n    If 'lossy', whenever duplicate keys are detected, a warning will be printed.\n    The last seen value of a duplicate key will be in the Python dictionary.\n    If 'strict', this instead results in an exception being raised when detected.\n\nReturns\n-------\nlst : list");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_5Array_72to_pylist = {"to_pylist", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Array_72to_pylist, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Array_71to_pylist};
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_72to_pylist(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_maps_as_pydicts = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("to_pylist (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_maps_as_pydicts,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(4, 1799, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, 0, __pyx_kwds_len, "to_pylist", 0) < (0)) __PYX_ERR(4, 1799, __pyx_L3_error)
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
        } else if (unlikely(__pyx_nargs != 0)) {
          goto __pyx_L5_argtuple_error;
        } else {
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
        }
        __pyx_v_maps_as_pydicts = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("to_pylist", 1, 0, 0, __pyx_nargs); __PYX_ERR(4, 1799, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.Array.to_pylist", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_5Array_71to_pylist(((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_v_self), __pyx_v_maps_as_pydicts);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_5Array_71to_pylist(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self, PyObject *__pyx_v_maps_as_pydicts) {
      PyObject *__pyx_9genexpr14__pyx_v_x = NULL;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      Py_ssize_t __pyx_t_3;
      PyObject *(*__pyx_t_4)(PyObject *);
      PyObject *__pyx_t_5 = NULL;
      PyObject *__pyx_t_6 = NULL;
      size_t __pyx_t_7;
      PyObject *__pyx_t_8 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("to_pylist", 0);

      /* "pyarrow/array.pxi":1821
 *         lst : list
 *         """
 *         self._assert_cpu()             # <<<<<<<<<<<<<<
 *         return [x.as_py(maps_as_pydicts=maps_as_pydicts) for x in self]
 * 
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_assert_cpu");
        __PYX_ERR(4, 1821, __pyx_L1_error)
      }
      ((struct __pyx_vtabstruct_7pyarrow_3lib_Array *)__pyx_v_self->__pyx_vtab)->_assert_cpu(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 1821, __pyx_L1_error)

      /* "pyarrow/array.pxi":1822
 *         """
 *         self._assert_cpu()
 *         return [x.as_py(maps_as_pydicts=maps_as_pydicts) for x in self]             # <<<<<<<<<<<<<<
 * 
 *     def tolist(self):
*/
      __Pyx_XDECREF(__pyx_r);
      { /* enter inner scope */
        __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 1822, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_1);
        if (likely(PyList_CheckExact(((PyObject *)__pyx_v_self))) || PyTuple_CheckExact(((PyObject *)__pyx_v_self))) {
          __pyx_t_2 = ((PyObject *)__pyx_v_self); __Pyx_INCREF(__pyx_t_2);
          __pyx_t_3 = 0;
          __pyx_t_4 = NULL;
        } else {
          __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 1822, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_4 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 1822, __pyx_L5_error)
        }
        for (;;) {
          if (likely(!__pyx_t_4)) {
            if (likely(PyList_CheckExact(__pyx_t_2))) {
              {
                Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2);
                #if !CYTHON_ASSUME_SAFE_SIZE
                if (unlikely((__pyx_temp < 0))) __PYX_ERR(4, 1822, __pyx_L5_error)
                #endif
                if (__pyx_t_3 >= __pyx_temp) break;
              }
              __pyx_t_5 = __Pyx_PyList_GetItemRefFast(__pyx_t_2, __pyx_t_3, __Pyx_ReferenceSharing_OwnStrongReference);
              ++__pyx_t_3;
            } else {
              {
                Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2);
                #if !CYTHON_ASSUME_SAFE_SIZE
                if (unlikely((__pyx_temp < 0))) __PYX_ERR(4, 1822, __pyx_L5_error)
                #endif
                if (__pyx_t_3 >= __pyx_temp) break;
              }
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_5 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3));
              #else
              __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_3);
              #endif
              ++__pyx_t_3;
            }
            if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 1822, __pyx_L5_error)
          } else {
            __pyx_t_5 = __pyx_t_4(__pyx_t_2);
            if (unlikely(!__pyx_t_5)) {
              PyObject* exc_type = PyErr_Occurred();
              if (exc_type) {
                if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(4, 1822, __pyx_L5_error)
                PyErr_Clear();
              }
              break;
            }
          }
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_XDECREF_SET(__pyx_9genexpr14__pyx_v_x, __pyx_t_5);
          __pyx_t_5 = 0;
          __pyx_t_6 = __pyx_9genexpr14__pyx_v_x;
          __Pyx_INCREF(__pyx_t_6);
          __pyx_t_7 = 0;
          {
            PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_6, NULL};
            __pyx_t_8 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(4, 1822, __pyx_L5_error)
            __Pyx_GOTREF(__pyx_t_8);
            if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_maps_as_pydicts, __pyx_v_maps_as_pydicts, __pyx_t_8, __pyx_callargs+1, 0) < (0)) __PYX_ERR(4, 1822, __pyx_L5_error)
            __pyx_t_5 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_as_py, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_8);
            __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
            if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 1822, __pyx_L5_error)
            __Pyx_GOTREF(__pyx_t_5);
          }
          if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(4, 1822, __pyx_L5_error)
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        }
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF(__pyx_9genexpr14__pyx_v_x); __pyx_9genexpr14__pyx_v_x = 0;
        goto __pyx_L9_exit_scope;
        __pyx_L5_error:;
        __Pyx_XDECREF(__pyx_9genexpr14__pyx_v_x); __pyx_9genexpr14__pyx_v_x = 0;
        goto __pyx_L1_error;
        __pyx_L9_exit_scope:;
      } /* exit inner scope */
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":1799
 *         return array
 * 
 *     def to_pylist(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Convert to a list of native Python objects.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_8);
      __Pyx_AddTraceback("pyarrow.lib.Array.to_pylist", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_9genexpr14__pyx_v_x);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":1824
 *         return [x.as_py(maps_as_pydicts=maps_as_pydicts) for x in self]
 * 
 *     def tolist(self):             # <<<<<<<<<<<<<<
 *         """
 *         Alias of to_pylist for compatibility with NumPy.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_74tolist(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_5Array_73tolist, "Array.tolist(self)\n\nAlias of to_pylist for compatibility with NumPy.");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_5Array_74tolist = {"tolist", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Array_74tolist, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Array_73tolist};
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_74tolist(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("tolist (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("tolist", 1, 0, 0, __pyx_nargs); return NULL; }
      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
      if (unlikely(__pyx_kwds_len < 0)) return NULL;
      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("tolist", __pyx_kwds); return NULL;}
      __pyx_r = __pyx_pf_7pyarrow_3lib_5Array_73tolist(((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_5Array_73tolist(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      size_t __pyx_t_3;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("tolist", 0);

      /* "pyarrow/array.pxi":1828
 *         Alias of to_pylist for compatibility with NumPy.
 *         """
 *         return self.to_pylist()             # <<<<<<<<<<<<<<
 * 
 *     def validate(self, *, full=False):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = ((PyObject *)__pyx_v_self);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_3 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_to_pylist, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 1828, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":1824
 *         return [x.as_py(maps_as_pydicts=maps_as_pydicts) for x in self]
 * 
 *     def tolist(self):             # <<<<<<<<<<<<<<
 *         """
 *         Alias of to_pylist for compatibility with NumPy.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_AddTraceback("pyarrow.lib.Array.tolist", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":1830
 *         return self.to_pylist()
 * 
 *     def validate(self, *, full=False):             # <<<<<<<<<<<<<<
 *         """
 *         Perform validation checks.  An exception is raised if validation fails.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_76validate(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_5Array_75validate, "Array.validate(self, *, full=False)\n\nPerform validation checks.  An exception is raised if validation fails.\n\nBy default only cheap validation checks are run.  Pass `full=True`\nfor thorough validation checks (potentially O(n)).\n\nParameters\n----------\nfull : bool, default False\n    If True, run expensive checks, otherwise cheap checks only.\n\nRaises\n------\nArrowInvalid");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_5Array_76validate = {"validate", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Array_76validate, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Array_75validate};
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_76validate(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_full = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("validate (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_full,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(4, 1830, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, 0, __pyx_kwds_len, "validate", 0) < (0)) __PYX_ERR(4, 1830, __pyx_L3_error)
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_False));
        } else if (unlikely(__pyx_nargs != 0)) {
          goto __pyx_L5_argtuple_error;
        } else {
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_False));
        }
        __pyx_v_full = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("validate", 1, 0, 0, __pyx_nargs); __PYX_ERR(4, 1830, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.Array.validate", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_5Array_75validate(((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_v_self), __pyx_v_full);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_5Array_75validate(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self, PyObject *__pyx_v_full) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      int __pyx_t_1;
      int __pyx_t_2;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("validate", 0);

      /* "pyarrow/array.pxi":1846
 *         ArrowInvalid
 *         """
 *         if full:             # <<<<<<<<<<<<<<
 *             self._assert_cpu()
 *             with nogil:
*/
      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_full); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(4, 1846, __pyx_L1_error)
      if (__pyx_t_1) {

        /* "pyarrow/array.pxi":1847
 *         """
 *         if full:
 *             self._assert_cpu()             # <<<<<<<<<<<<<<
 *             with nogil:
 *                 check_status(self.ap.ValidateFull())
*/
        if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_assert_cpu");
          __PYX_ERR(4, 1847, __pyx_L1_error)
        }
        ((struct __pyx_vtabstruct_7pyarrow_3lib_Array *)__pyx_v_self->__pyx_vtab)->_assert_cpu(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 1847, __pyx_L1_error)

        /* "pyarrow/array.pxi":1848
 *         if full:
 *             self._assert_cpu()
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 check_status(self.ap.ValidateFull())
 *         else:
*/
        {
            PyThreadState * _save;
            _save = PyEval_SaveThread();
            __Pyx_FastGIL_Remember();
            /*try:*/ {

              /* "pyarrow/array.pxi":1849
 *             self._assert_cpu()
 *             with nogil:
 *                 check_status(self.ap.ValidateFull())             # <<<<<<<<<<<<<<
 *         else:
 *             with nogil:
*/
              if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "ap");
                __Pyx_PyGILState_Release(__pyx_gilstate_save);
                __PYX_ERR(4, 1849, __pyx_L5_error)
              }
              __pyx_t_2 = __pyx_f_7pyarrow_3lib_check_status(__pyx_v_self->ap->ValidateFull()); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(4, 1849, __pyx_L5_error)
            }

            /* "pyarrow/array.pxi":1848
 *         if full:
 *             self._assert_cpu()
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 check_status(self.ap.ValidateFull())
 *         else:
*/
            /*finally:*/ {
              /*normal exit:*/{
                __Pyx_FastGIL_Forget();
                PyEval_RestoreThread(_save);
                goto __pyx_L6;
              }
              __pyx_L5_error: {
                __Pyx_FastGIL_Forget();
                PyEval_RestoreThread(_save);
                goto __pyx_L1_error;
              }
              __pyx_L6:;
            }
        }

        /* "pyarrow/array.pxi":1846
 *         ArrowInvalid
 *         """
 *         if full:             # <<<<<<<<<<<<<<
 *             self._assert_cpu()
 *             with nogil:
*/
        goto __pyx_L3;
      }

      /* "pyarrow/array.pxi":1851
 *                 check_status(self.ap.ValidateFull())
 *         else:
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 check_status(self.ap.Validate())
 * 
*/
      /*else*/ {
        {
            PyThreadState * _save;
            _save = PyEval_SaveThread();
            __Pyx_FastGIL_Remember();
            /*try:*/ {

              /* "pyarrow/array.pxi":1852
 *         else:
 *             with nogil:
 *                 check_status(self.ap.Validate())             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
              if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "ap");
                __Pyx_PyGILState_Release(__pyx_gilstate_save);
                __PYX_ERR(4, 1852, __pyx_L8_error)
              }
              __pyx_t_2 = __pyx_f_7pyarrow_3lib_check_status(__pyx_v_self->ap->Validate()); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(4, 1852, __pyx_L8_error)
            }

            /* "pyarrow/array.pxi":1851
 *                 check_status(self.ap.ValidateFull())
 *         else:
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 check_status(self.ap.Validate())
 * 
*/
            /*finally:*/ {
              /*normal exit:*/{
                __Pyx_FastGIL_Forget();
                PyEval_RestoreThread(_save);
                goto __pyx_L9;
              }
              __pyx_L8_error: {
                __Pyx_FastGIL_Forget();
                PyEval_RestoreThread(_save);
                goto __pyx_L1_error;
              }
              __pyx_L9:;
            }
        }
      }
      __pyx_L3:;

      /* "pyarrow/array.pxi":1830
 *         return self.to_pylist()
 * 
 *     def validate(self, *, full=False):             # <<<<<<<<<<<<<<
 *         """
 *         Perform validation checks.  An exception is raised if validation fails.
*/

      /* function exit code */
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_AddTraceback("pyarrow.lib.Array.validate", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":1854
 *                 check_status(self.ap.Validate())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def offset(self):
 *         """
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_6offset_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_6offset_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_5Array_6offset___get__(((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_5Array_6offset___get__(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__get__", 0);

      /* "pyarrow/array.pxi":1863
 *         buffers.
 *         """
 *         return self.sp_array.get().offset()             # <<<<<<<<<<<<<<
 * 
 *     def buffers(self):
*/
      __Pyx_XDECREF(__pyx_r);
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_array");
        __PYX_ERR(4, 1863, __pyx_L1_error)
      }
      __pyx_t_1 = __Pyx_PyLong_From_int64_t(__pyx_v_self->sp_array.get()->offset()); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 1863, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":1854
 *                 check_status(self.ap.Validate())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def offset(self):
 *         """
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("pyarrow.lib.Array.offset.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":1865
 *         return self.sp_array.get().offset()
 * 
 *     def buffers(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return a list of Buffer objects pointing to this array's physical
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_78buffers(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_5Array_77buffers, "Array.buffers(self)\n\nReturn a list of Buffer objects pointing to this array's physical\nstorage.\n\nTo correctly interpret these buffers, you need to also apply the offset\nmultiplied with the size of the stored data type.");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_5Array_78buffers = {"buffers", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Array_78buffers, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Array_77buffers};
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_78buffers(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("buffers (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("buffers", 1, 0, 0, __pyx_nargs); return NULL; }
      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
      if (unlikely(__pyx_kwds_len < 0)) return NULL;
      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("buffers", __pyx_kwds); return NULL;}
      __pyx_r = __pyx_pf_7pyarrow_3lib_5Array_77buffers(((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_5Array_77buffers(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self) {
      PyObject *__pyx_v_res = NULL;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("buffers", 0);

      /* "pyarrow/array.pxi":1873
 *         multiplied with the size of the stored data type.
 *         """
 *         res = []             # <<<<<<<<<<<<<<
 *         _append_array_buffers(self.sp_array.get().data().get(), res)
 *         return res
*/
      __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 1873, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_v_res = ((PyObject*)__pyx_t_1);
      __pyx_t_1 = 0;

      /* "pyarrow/array.pxi":1874
 *         """
 *         res = []
 *         _append_array_buffers(self.sp_array.get().data().get(), res)             # <<<<<<<<<<<<<<
 *         return res
 * 
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_array");
        __PYX_ERR(4, 1874, __pyx_L1_error)
      }
      __pyx_t_1 = __pyx_f_7pyarrow_3lib__append_array_buffers(__pyx_v_self->sp_array.get()->data().get(), __pyx_v_res); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 1874, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "pyarrow/array.pxi":1875
 *         res = []
 *         _append_array_buffers(self.sp_array.get().data().get(), res)
 *         return res             # <<<<<<<<<<<<<<
 * 
 *     def copy_to(self, destination):
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_res);
      __pyx_r = __pyx_v_res;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":1865
 *         return self.sp_array.get().offset()
 * 
 *     def buffers(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return a list of Buffer objects pointing to this array's physical
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("pyarrow.lib.Array.buffers", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_res);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":1877
 *         return res
 * 
 *     def copy_to(self, destination):             # <<<<<<<<<<<<<<
 *         """
 *         Construct a copy of the array with all buffers on destination
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_80copy_to(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_5Array_79copy_to, "Array.copy_to(self, destination)\n\nConstruct a copy of the array with all buffers on destination\ndevice.\n\nThis method recursively copies the array's buffers and those of its\nchildren onto the destination MemoryManager device and returns the\nnew Array.\n\nParameters\n----------\ndestination : pyarrow.MemoryManager or pyarrow.Device\n    The destination device to copy the array to.\n\nReturns\n-------\nArray");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_5Array_80copy_to = {"copy_to", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Array_80copy_to, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Array_79copy_to};
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_80copy_to(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_destination = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("copy_to (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_destination,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(4, 1877, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 1877, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "copy_to", 0) < (0)) __PYX_ERR(4, 1877, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("copy_to", 1, 1, 1, i); __PYX_ERR(4, 1877, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 1)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 1877, __pyx_L3_error)
        }
        __pyx_v_destination = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("copy_to", 1, 1, 1, __pyx_nargs); __PYX_ERR(4, 1877, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.Array.copy_to", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_5Array_79copy_to(((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_v_self), __pyx_v_destination);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_5Array_79copy_to(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self, PyObject *__pyx_v_destination) {
      std::shared_ptr< arrow::Array>  __pyx_v_c_array;
      std::shared_ptr< arrow::MemoryManager>  __pyx_v_c_memory_manager;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      int __pyx_t_1;
      std::shared_ptr< arrow::Device>  __pyx_t_2;
      std::shared_ptr< arrow::MemoryManager>  __pyx_t_3;
      PyObject *__pyx_t_4 = NULL;
      PyObject *__pyx_t_5 = NULL;
      PyObject *__pyx_t_6 = NULL;
      PyObject *__pyx_t_7[3];
      PyObject *__pyx_t_8 = NULL;
      size_t __pyx_t_9;
      std::shared_ptr< arrow::Array>  __pyx_t_10;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("copy_to", 0);

      /* "pyarrow/array.pxi":1899
 *             shared_ptr[CMemoryManager] c_memory_manager
 * 
 *         if isinstance(destination, Device):             # <<<<<<<<<<<<<<
 *             c_memory_manager = (<Device>destination).unwrap().get().default_memory_manager()
 *         elif isinstance(destination, MemoryManager):
*/
      __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_destination, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Device); 
      if (__pyx_t_1) {

        /* "pyarrow/array.pxi":1900
 * 
 *         if isinstance(destination, Device):
 *             c_memory_manager = (<Device>destination).unwrap().get().default_memory_manager()             # <<<<<<<<<<<<<<
 *         elif isinstance(destination, MemoryManager):
 *             c_memory_manager = (<MemoryManager>destination).unwrap()
*/
        if (unlikely(__pyx_v_destination == Py_None)) {
          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "unwrap");
          __PYX_ERR(4, 1900, __pyx_L1_error)
        }
        __pyx_t_2 = __pyx_f_7pyarrow_3lib_6Device_unwrap(((struct __pyx_obj_7pyarrow_3lib_Device *)__pyx_v_destination)); if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 1900, __pyx_L1_error)
        __pyx_v_c_memory_manager = __pyx_t_2.get()->default_memory_manager();

        /* "pyarrow/array.pxi":1899
 *             shared_ptr[CMemoryManager] c_memory_manager
 * 
 *         if isinstance(destination, Device):             # <<<<<<<<<<<<<<
 *             c_memory_manager = (<Device>destination).unwrap().get().default_memory_manager()
 *         elif isinstance(destination, MemoryManager):
*/
        goto __pyx_L3;
      }

      /* "pyarrow/array.pxi":1901
 *         if isinstance(destination, Device):
 *             c_memory_manager = (<Device>destination).unwrap().get().default_memory_manager()
 *         elif isinstance(destination, MemoryManager):             # <<<<<<<<<<<<<<
 *             c_memory_manager = (<MemoryManager>destination).unwrap()
 *         else:
*/
      __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_destination, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_MemoryManager); 
      if (likely(__pyx_t_1)) {

        /* "pyarrow/array.pxi":1902
 *             c_memory_manager = (<Device>destination).unwrap().get().default_memory_manager()
 *         elif isinstance(destination, MemoryManager):
 *             c_memory_manager = (<MemoryManager>destination).unwrap()             # <<<<<<<<<<<<<<
 *         else:
 *             raise TypeError(
*/
        if (unlikely(__pyx_v_destination == Py_None)) {
          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "unwrap");
          __PYX_ERR(4, 1902, __pyx_L1_error)
        }
        __pyx_t_3 = __pyx_f_7pyarrow_3lib_13MemoryManager_unwrap(((struct __pyx_obj_7pyarrow_3lib_MemoryManager *)__pyx_v_destination)); if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 1902, __pyx_L1_error)
        __pyx_v_c_memory_manager = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_3);

        /* "pyarrow/array.pxi":1901
 *         if isinstance(destination, Device):
 *             c_memory_manager = (<Device>destination).unwrap().get().default_memory_manager()
 *         elif isinstance(destination, MemoryManager):             # <<<<<<<<<<<<<<
 *             c_memory_manager = (<MemoryManager>destination).unwrap()
 *         else:
*/
        goto __pyx_L3;
      }

      /* "pyarrow/array.pxi":1904
 *             c_memory_manager = (<MemoryManager>destination).unwrap()
 *         else:
 *             raise TypeError(             # <<<<<<<<<<<<<<
 *                 "Argument 'destination' has incorrect type (expected a "
 *                 f"pyarrow Device or MemoryManager, got {type(destination)})"
*/
      /*else*/ {
        __pyx_t_5 = NULL;

        /* "pyarrow/array.pxi":1906
 *             raise TypeError(
 *                 "Argument 'destination' has incorrect type (expected a "
 *                 f"pyarrow Device or MemoryManager, got {type(destination)})"             # <<<<<<<<<<<<<<
 *             )
 * 
*/
        __pyx_t_6 = __Pyx_PyObject_FormatSimple(((PyObject *)Py_TYPE(__pyx_v_destination)), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 1906, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_7[0] = __pyx_mstate_global->__pyx_kp_u_Argument_destination_has_incorre;
        __pyx_t_7[1] = __pyx_t_6;
        __pyx_t_7[2] = __pyx_mstate_global->__pyx_kp_u__7;

        /* "pyarrow/array.pxi":1905
 *         else:
 *             raise TypeError(
 *                 "Argument 'destination' has incorrect type (expected a "             # <<<<<<<<<<<<<<
 *                 f"pyarrow Device or MemoryManager, got {type(destination)})"
 *             )
*/
        __pyx_t_8 = __Pyx_PyUnicode_Join(__pyx_t_7, 3, 91 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6));
        if (unlikely(!__pyx_t_8)) __PYX_ERR(4, 1905, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_9 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_8};
          __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 1904, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
        }
        __Pyx_Raise(__pyx_t_4, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __PYX_ERR(4, 1904, __pyx_L1_error)
      }
      __pyx_L3:;

      /* "pyarrow/array.pxi":1909
 *             )
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             c_array = GetResultValue(self.ap.CopyTo(c_memory_manager))
 *         return pyarrow_wrap_array(c_array)
*/
      {
          PyThreadState * _save;
          _save = PyEval_SaveThread();
          __Pyx_FastGIL_Remember();
          /*try:*/ {

            /* "pyarrow/array.pxi":1910
 * 
 *         with nogil:
 *             c_array = GetResultValue(self.ap.CopyTo(c_memory_manager))             # <<<<<<<<<<<<<<
 *         return pyarrow_wrap_array(c_array)
 * 
*/
            if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
              PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "ap");
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              __PYX_ERR(4, 1910, __pyx_L5_error)
            }
            __pyx_t_10 = arrow::py::GetResultValue<std::shared_ptr< arrow::Array> >(__pyx_v_self->ap->CopyTo(__pyx_v_c_memory_manager)); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(4, 1910, __pyx_L5_error)
            __pyx_v_c_array = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_10);
          }

          /* "pyarrow/array.pxi":1909
 *             )
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             c_array = GetResultValue(self.ap.CopyTo(c_memory_manager))
 *         return pyarrow_wrap_array(c_array)
*/
          /*finally:*/ {
            /*normal exit:*/{
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L6;
            }
            __pyx_L5_error: {
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L1_error;
            }
            __pyx_L6:;
          }
      }

      /* "pyarrow/array.pxi":1911
 *         with nogil:
 *             c_array = GetResultValue(self.ap.CopyTo(c_memory_manager))
 *         return pyarrow_wrap_array(c_array)             # <<<<<<<<<<<<<<
 * 
 *     def _export_to_c(self, out_ptr, out_schema_ptr=0):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_4 = pyarrow_wrap_array(__pyx_v_c_array); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 1911, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":1877
 *         return res
 * 
 *     def copy_to(self, destination):             # <<<<<<<<<<<<<<
 *         """
 *         Construct a copy of the array with all buffers on destination
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_8);
      __Pyx_AddTraceback("pyarrow.lib.Array.copy_to", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":1913
 *         return pyarrow_wrap_array(c_array)
 * 
 *     def _export_to_c(self, out_ptr, out_schema_ptr=0):             # <<<<<<<<<<<<<<
 *         """
 *         Export to a C ArrowArray struct, given its pointer.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_82_export_to_c(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_5Array_81_export_to_c, "Array._export_to_c(self, out_ptr, out_schema_ptr=0)\n\nExport to a C ArrowArray struct, given its pointer.\n\nIf a C ArrowSchema struct pointer is also given, the array type\nis exported to it at the same time.\n\nParameters\n----------\nout_ptr: int\n    The raw pointer to a C ArrowArray struct.\nout_schema_ptr: int (optional)\n    The raw pointer to a C ArrowSchema struct.\n\nBe careful: if you don't pass the ArrowArray struct to a consumer,\narray memory will leak.  This is a low-level function intended for\nexpert users.");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_5Array_82_export_to_c = {"_export_to_c", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Array_82_export_to_c, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Array_81_export_to_c};
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_82_export_to_c(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_out_ptr = 0;
      PyObject *__pyx_v_out_schema_ptr = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[2] = {0,0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("_export_to_c (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_out_ptr,&__pyx_mstate_global->__pyx_n_u_out_schema_ptr,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(4, 1913, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(4, 1913, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 1913, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_export_to_c", 0) < (0)) __PYX_ERR(4, 1913, __pyx_L3_error)
          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_int_0));
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_export_to_c", 0, 1, 2, i); __PYX_ERR(4, 1913, __pyx_L3_error) }
          }
        } else {
          switch (__pyx_nargs) {
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(4, 1913, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 1913, __pyx_L3_error)
            break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_int_0));
        }
        __pyx_v_out_ptr = values[0];
        __pyx_v_out_schema_ptr = values[1];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("_export_to_c", 0, 1, 2, __pyx_nargs); __PYX_ERR(4, 1913, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.Array._export_to_c", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_5Array_81_export_to_c(((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_v_self), __pyx_v_out_ptr, __pyx_v_out_schema_ptr);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_5Array_81_export_to_c(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self, PyObject *__pyx_v_out_ptr, PyObject *__pyx_v_out_schema_ptr) {
      void *__pyx_v_c_ptr;
      void *__pyx_v_c_schema_ptr;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      void *__pyx_t_1;
      struct __pyx_opt_args_7pyarrow_3lib__as_c_pointer __pyx_t_2;
      int __pyx_t_3;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("_export_to_c", 0);

      /* "pyarrow/array.pxi":1932
 *         """
 *         cdef:
 *             void* c_ptr = _as_c_pointer(out_ptr)             # <<<<<<<<<<<<<<
 *             void* c_schema_ptr = _as_c_pointer(out_schema_ptr,
 *                                                allow_null=True)
*/
      __pyx_t_1 = __pyx_f_7pyarrow_3lib__as_c_pointer(__pyx_v_out_ptr, NULL); if (unlikely(__pyx_t_1 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(4, 1932, __pyx_L1_error)
      __pyx_v_c_ptr = __pyx_t_1;

      /* "pyarrow/array.pxi":1933
 *         cdef:
 *             void* c_ptr = _as_c_pointer(out_ptr)
 *             void* c_schema_ptr = _as_c_pointer(out_schema_ptr,             # <<<<<<<<<<<<<<
 *                                                allow_null=True)
 *         with nogil:
*/
      __pyx_t_2.__pyx_n = 1;
      __pyx_t_2.allow_null = Py_True;
      __pyx_t_1 = __pyx_f_7pyarrow_3lib__as_c_pointer(__pyx_v_out_schema_ptr, &__pyx_t_2); if (unlikely(__pyx_t_1 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(4, 1933, __pyx_L1_error)
      __pyx_v_c_schema_ptr = __pyx_t_1;

      /* "pyarrow/array.pxi":1935
 *             void* c_schema_ptr = _as_c_pointer(out_schema_ptr,
 *                                                allow_null=True)
 *         with nogil:             # <<<<<<<<<<<<<<
 *             check_status(ExportArray(deref(self.sp_array),
 *                                      <ArrowArray*> c_ptr,
*/
      {
          PyThreadState * _save;
          _save = PyEval_SaveThread();
          __Pyx_FastGIL_Remember();
          /*try:*/ {

            /* "pyarrow/array.pxi":1936
 *                                                allow_null=True)
 *         with nogil:
 *             check_status(ExportArray(deref(self.sp_array),             # <<<<<<<<<<<<<<
 *                                      <ArrowArray*> c_ptr,
 *                                      <ArrowSchema*> c_schema_ptr))
*/
            if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
              PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_array");
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              __PYX_ERR(4, 1936, __pyx_L4_error)
            }

            /* "pyarrow/array.pxi":1938
 *             check_status(ExportArray(deref(self.sp_array),
 *                                      <ArrowArray*> c_ptr,
 *                                      <ArrowSchema*> c_schema_ptr))             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
*/
            __pyx_t_3 = __pyx_f_7pyarrow_3lib_check_status(arrow::ExportArray((*__pyx_v_self->sp_array), ((struct ArrowArray *)__pyx_v_c_ptr), ((struct ArrowSchema *)__pyx_v_c_schema_ptr))); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(4, 1936, __pyx_L4_error)
          }

          /* "pyarrow/array.pxi":1935
 *             void* c_schema_ptr = _as_c_pointer(out_schema_ptr,
 *                                                allow_null=True)
 *         with nogil:             # <<<<<<<<<<<<<<
 *             check_status(ExportArray(deref(self.sp_array),
 *                                      <ArrowArray*> c_ptr,
*/
          /*finally:*/ {
            /*normal exit:*/{
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L5;
            }
            __pyx_L4_error: {
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L1_error;
            }
            __pyx_L5:;
          }
      }

      /* "pyarrow/array.pxi":1913
 *         return pyarrow_wrap_array(c_array)
 * 
 *     def _export_to_c(self, out_ptr, out_schema_ptr=0):             # <<<<<<<<<<<<<<
 *         """
 *         Export to a C ArrowArray struct, given its pointer.
*/

      /* function exit code */
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_AddTraceback("pyarrow.lib.Array._export_to_c", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":1940
 *                                      <ArrowSchema*> c_schema_ptr))
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def _import_from_c(in_ptr, type):
 *         """
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_84_import_from_c(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_5Array_83_import_from_c, "Array._import_from_c(in_ptr, type)\n\nImport Array from a C ArrowArray struct, given its pointer\nand the imported array type.\n\nParameters\n----------\nin_ptr: int\n    The raw pointer to a C ArrowArray struct.\ntype: DataType or int\n    Either a DataType object, or the raw pointer to a C ArrowSchema\n    struct.\n\nThis is a low-level function intended for expert users.");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_5Array_84_import_from_c = {"_import_from_c", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Array_84_import_from_c, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Array_83_import_from_c};
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_84_import_from_c(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_in_ptr = 0;
      PyObject *__pyx_v_type = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[2] = {0,0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("_import_from_c (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_in_ptr,&__pyx_mstate_global->__pyx_n_u_type,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(4, 1940, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(4, 1940, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 1940, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_import_from_c", 0) < (0)) __PYX_ERR(4, 1940, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_import_from_c", 1, 2, 2, i); __PYX_ERR(4, 1940, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 2)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 1940, __pyx_L3_error)
          values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(4, 1940, __pyx_L3_error)
        }
        __pyx_v_in_ptr = values[0];
        __pyx_v_type = values[1];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("_import_from_c", 1, 2, 2, __pyx_nargs); __PYX_ERR(4, 1940, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.Array._import_from_c", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_5Array_83_import_from_c(__pyx_v_in_ptr, __pyx_v_type);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_5Array_83_import_from_c(PyObject *__pyx_v_in_ptr, PyObject *__pyx_v_type) {
      void *__pyx_v_c_ptr;
      void *__pyx_v_c_type_ptr;
      std::shared_ptr< arrow::Array>  __pyx_v_c_array;
      std::shared_ptr< arrow::DataType>  __pyx_v_c_type;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      void *__pyx_t_1;
      std::shared_ptr< arrow::DataType>  __pyx_t_2;
      int __pyx_t_3;
      std::shared_ptr< arrow::Array>  __pyx_t_4;
      PyObject *__pyx_t_5 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("_import_from_c", 0);

      /* "pyarrow/array.pxi":1957
 *         """
 *         cdef:
 *             void* c_ptr = _as_c_pointer(in_ptr)             # <<<<<<<<<<<<<<
 *             void* c_type_ptr
 *             shared_ptr[CArray] c_array
*/
      __pyx_t_1 = __pyx_f_7pyarrow_3lib__as_c_pointer(__pyx_v_in_ptr, NULL); if (unlikely(__pyx_t_1 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(4, 1957, __pyx_L1_error)
      __pyx_v_c_ptr = __pyx_t_1;

      /* "pyarrow/array.pxi":1961
 *             shared_ptr[CArray] c_array
 * 
 *         c_type = pyarrow_unwrap_data_type(type)             # <<<<<<<<<<<<<<
 *         if c_type == nullptr:
 *             # Not a DataType object, perhaps a raw ArrowSchema pointer
*/
      __pyx_t_2 = pyarrow_unwrap_data_type(__pyx_v_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 1961, __pyx_L1_error)
      __pyx_v_c_type = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_2);

      /* "pyarrow/array.pxi":1962
 * 
 *         c_type = pyarrow_unwrap_data_type(type)
 *         if c_type == nullptr:             # <<<<<<<<<<<<<<
 *             # Not a DataType object, perhaps a raw ArrowSchema pointer
 *             c_type_ptr = _as_c_pointer(type)
*/
      __pyx_t_3 = ((__pyx_v_c_type == nullptr) != 0);
      if (__pyx_t_3) {

        /* "pyarrow/array.pxi":1964
 *         if c_type == nullptr:
 *             # Not a DataType object, perhaps a raw ArrowSchema pointer
 *             c_type_ptr = _as_c_pointer(type)             # <<<<<<<<<<<<<<
 *             with nogil:
 *                 c_array = GetResultValue(ImportArray(
*/
        __pyx_t_1 = __pyx_f_7pyarrow_3lib__as_c_pointer(__pyx_v_type, NULL); if (unlikely(__pyx_t_1 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(4, 1964, __pyx_L1_error)
        __pyx_v_c_type_ptr = __pyx_t_1;

        /* "pyarrow/array.pxi":1965
 *             # Not a DataType object, perhaps a raw ArrowSchema pointer
 *             c_type_ptr = _as_c_pointer(type)
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 c_array = GetResultValue(ImportArray(
 *                     <ArrowArray*> c_ptr, <ArrowSchema*> c_type_ptr))
*/
        {
            PyThreadState * _save;
            _save = PyEval_SaveThread();
            __Pyx_FastGIL_Remember();
            /*try:*/ {

              /* "pyarrow/array.pxi":1966
 *             c_type_ptr = _as_c_pointer(type)
 *             with nogil:
 *                 c_array = GetResultValue(ImportArray(             # <<<<<<<<<<<<<<
 *                     <ArrowArray*> c_ptr, <ArrowSchema*> c_type_ptr))
 *         else:
*/
              __pyx_t_4 = arrow::py::GetResultValue<std::shared_ptr< arrow::Array> >(arrow::ImportArray(((struct ArrowArray *)__pyx_v_c_ptr), ((struct ArrowSchema *)__pyx_v_c_type_ptr))); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(4, 1966, __pyx_L5_error)
              __pyx_v_c_array = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_4);
            }

            /* "pyarrow/array.pxi":1965
 *             # Not a DataType object, perhaps a raw ArrowSchema pointer
 *             c_type_ptr = _as_c_pointer(type)
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 c_array = GetResultValue(ImportArray(
 *                     <ArrowArray*> c_ptr, <ArrowSchema*> c_type_ptr))
*/
            /*finally:*/ {
              /*normal exit:*/{
                __Pyx_FastGIL_Forget();
                PyEval_RestoreThread(_save);
                goto __pyx_L6;
              }
              __pyx_L5_error: {
                __Pyx_FastGIL_Forget();
                PyEval_RestoreThread(_save);
                goto __pyx_L1_error;
              }
              __pyx_L6:;
            }
        }

        /* "pyarrow/array.pxi":1962
 * 
 *         c_type = pyarrow_unwrap_data_type(type)
 *         if c_type == nullptr:             # <<<<<<<<<<<<<<
 *             # Not a DataType object, perhaps a raw ArrowSchema pointer
 *             c_type_ptr = _as_c_pointer(type)
*/
        goto __pyx_L3;
      }

      /* "pyarrow/array.pxi":1969
 *                     <ArrowArray*> c_ptr, <ArrowSchema*> c_type_ptr))
 *         else:
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 c_array = GetResultValue(ImportArray(<ArrowArray*> c_ptr,
 *                                                      c_type))
*/
      /*else*/ {
        {
            PyThreadState * _save;
            _save = PyEval_SaveThread();
            __Pyx_FastGIL_Remember();
            /*try:*/ {

              /* "pyarrow/array.pxi":1970
 *         else:
 *             with nogil:
 *                 c_array = GetResultValue(ImportArray(<ArrowArray*> c_ptr,             # <<<<<<<<<<<<<<
 *                                                      c_type))
 *         return pyarrow_wrap_array(c_array)
*/
              __pyx_t_4 = arrow::py::GetResultValue<std::shared_ptr< arrow::Array> >(arrow::ImportArray(((struct ArrowArray *)__pyx_v_c_ptr), __pyx_v_c_type)); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(4, 1970, __pyx_L8_error)
              __pyx_v_c_array = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_4);
            }

            /* "pyarrow/array.pxi":1969
 *                     <ArrowArray*> c_ptr, <ArrowSchema*> c_type_ptr))
 *         else:
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 c_array = GetResultValue(ImportArray(<ArrowArray*> c_ptr,
 *                                                      c_type))
*/
            /*finally:*/ {
              /*normal exit:*/{
                __Pyx_FastGIL_Forget();
                PyEval_RestoreThread(_save);
                goto __pyx_L9;
              }
              __pyx_L8_error: {
                __Pyx_FastGIL_Forget();
                PyEval_RestoreThread(_save);
                goto __pyx_L1_error;
              }
              __pyx_L9:;
            }
        }
      }
      __pyx_L3:;

      /* "pyarrow/array.pxi":1972
 *                 c_array = GetResultValue(ImportArray(<ArrowArray*> c_ptr,
 *                                                      c_type))
 *         return pyarrow_wrap_array(c_array)             # <<<<<<<<<<<<<<
 * 
 *     def __arrow_c_array__(self, requested_schema=None):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_5 = pyarrow_wrap_array(__pyx_v_c_array); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 1972, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_r = __pyx_t_5;
      __pyx_t_5 = 0;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":1940
 *                                      <ArrowSchema*> c_schema_ptr))
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def _import_from_c(in_ptr, type):
 *         """
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_AddTraceback("pyarrow.lib.Array._import_from_c", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":1974
 *         return pyarrow_wrap_array(c_array)
 * 
 *     def __arrow_c_array__(self, requested_schema=None):             # <<<<<<<<<<<<<<
 *         """
 *         Get a pair of PyCapsules containing a C ArrowArray representation of the object.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_86__arrow_c_array__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_5Array_85__arrow_c_array__, "Array.__arrow_c_array__(self, requested_schema=None)\n\nGet a pair of PyCapsules containing a C ArrowArray representation of the object.\n\nParameters\n----------\nrequested_schema : PyCapsule | None\n    A PyCapsule containing a C ArrowSchema representation of a requested\n    schema. PyArrow will attempt to cast the array to this data type.\n    If None, the array will be returned as-is, with a type matching the\n    one returned by :meth:`__arrow_c_schema__()`.\n\nReturns\n-------\nTuple[PyCapsule, PyCapsule]\n    A pair of PyCapsules containing a C ArrowSchema and ArrowArray,\n    respectively.");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_5Array_86__arrow_c_array__ = {"__arrow_c_array__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Array_86__arrow_c_array__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Array_85__arrow_c_array__};
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_86__arrow_c_array__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_requested_schema = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__arrow_c_array__ (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_requested_schema,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(4, 1974, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 1974, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__arrow_c_array__", 0) < (0)) __PYX_ERR(4, 1974, __pyx_L3_error)
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
        } else {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 1974, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
        }
        __pyx_v_requested_schema = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("__arrow_c_array__", 0, 0, 1, __pyx_nargs); __PYX_ERR(4, 1974, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.Array.__arrow_c_array__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_5Array_85__arrow_c_array__(((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_v_self), __pyx_v_requested_schema);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_5Array_85__arrow_c_array__(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self, PyObject *__pyx_v_requested_schema) {
      struct ArrowArray *__pyx_v_c_array;
      struct ArrowSchema *__pyx_v_c_schema;
      std::shared_ptr< arrow::Array>  __pyx_v_inner_array;
      PyObject *__pyx_v_target_type = NULL;
      PyObject *__pyx_v_casted_array = NULL;
      PyObject *__pyx_v_e = NULL;
      PyObject *__pyx_v_schema_capsule = NULL;
      PyObject *__pyx_v_array_capsule = NULL;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      int __pyx_t_1;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      size_t __pyx_t_4;
      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;
      std::shared_ptr< arrow::Array>  __pyx_t_11;
      int __pyx_t_12;
      PyObject *__pyx_t_13 = NULL;
      PyObject *__pyx_t_14 = NULL;
      PyObject *__pyx_t_15 = NULL;
      PyObject *__pyx_t_16[6];
      PyObject *__pyx_t_17 = NULL;
      int __pyx_t_18;
      char const *__pyx_t_19;
      PyObject *__pyx_t_20 = NULL;
      PyObject *__pyx_t_21 = NULL;
      PyObject *__pyx_t_22 = NULL;
      PyObject *__pyx_t_23 = NULL;
      PyObject *__pyx_t_24 = NULL;
      PyObject *__pyx_t_25 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__arrow_c_array__", 0);

      /* "pyarrow/array.pxi":1992
 *             respectively.
 *         """
 *         self._assert_cpu()             # <<<<<<<<<<<<<<
 * 
 *         cdef:
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_assert_cpu");
        __PYX_ERR(4, 1992, __pyx_L1_error)
      }
      ((struct __pyx_vtabstruct_7pyarrow_3lib_Array *)__pyx_v_self->__pyx_vtab)->_assert_cpu(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 1992, __pyx_L1_error)

      /* "pyarrow/array.pxi":1999
 *             shared_ptr[CArray] inner_array
 * 
 *         if requested_schema is not None:             # <<<<<<<<<<<<<<
 *             target_type = DataType._import_from_c_capsule(requested_schema)
 * 
*/
      __pyx_t_1 = (__pyx_v_requested_schema != Py_None);
      if (__pyx_t_1) {

        /* "pyarrow/array.pxi":2000
 * 
 *         if requested_schema is not None:
 *             target_type = DataType._import_from_c_capsule(requested_schema)             # <<<<<<<<<<<<<<
 * 
 *             if target_type != self.type:
*/
        __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType);
        __Pyx_INCREF(__pyx_t_3);
        __pyx_t_4 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_requested_schema};
          __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_import_from_c_capsule, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 2000, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __pyx_v_target_type = __pyx_t_2;
        __pyx_t_2 = 0;

        /* "pyarrow/array.pxi":2002
 *             target_type = DataType._import_from_c_capsule(requested_schema)
 * 
 *             if target_type != self.type:             # <<<<<<<<<<<<<<
 *                 try:
 *                     casted_array = _pc().cast(self, target_type, safe=True)
*/
        if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "type");
          __PYX_ERR(4, 2002, __pyx_L1_error)
        }
        __pyx_t_2 = PyObject_RichCompare(__pyx_v_target_type, ((PyObject *)__pyx_v_self->type), Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 2002, __pyx_L1_error)
        __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(4, 2002, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (__pyx_t_1) {

          /* "pyarrow/array.pxi":2003
 * 
 *             if target_type != self.type:
 *                 try:             # <<<<<<<<<<<<<<
 *                     casted_array = _pc().cast(self, target_type, safe=True)
 *                     inner_array = pyarrow_unwrap_array(casted_array)
*/
          {
            __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:*/ {

              /* "pyarrow/array.pxi":2004
 *             if target_type != self.type:
 *                 try:
 *                     casted_array = _pc().cast(self, target_type, safe=True)             # <<<<<<<<<<<<<<
 *                     inner_array = pyarrow_unwrap_array(casted_array)
 *                 except ArrowInvalid as e:
*/
              __pyx_t_9 = NULL;
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_pc_2); if (unlikely(!__pyx_t_10)) __PYX_ERR(4, 2004, __pyx_L5_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_4 = 1;
              #if CYTHON_UNPACK_METHODS
              if (unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_10);
                assert(__pyx_t_9);
                PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_10);
                __Pyx_INCREF(__pyx_t_9);
                __Pyx_INCREF(__pyx__function);
                __Pyx_DECREF_SET(__pyx_t_10, __pyx__function);
                __pyx_t_4 = 0;
              }
              #endif
              {
                PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL};
                __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_10, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                if (unlikely(!__pyx_t_8)) __PYX_ERR(4, 2004, __pyx_L5_error)
                __Pyx_GOTREF(__pyx_t_8);
              }
              __pyx_t_3 = __pyx_t_8;
              __Pyx_INCREF(__pyx_t_3);
              __pyx_t_4 = 0;
              {
                PyObject *__pyx_callargs[3 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_3, ((PyObject *)__pyx_v_self), __pyx_v_target_type};
                __pyx_t_10 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(4, 2004, __pyx_L5_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_safe, Py_True, __pyx_t_10, __pyx_callargs+3, 0) < (0)) __PYX_ERR(4, 2004, __pyx_L5_error)
                __pyx_t_2 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_cast, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_10);
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 2004, __pyx_L5_error)
                __Pyx_GOTREF(__pyx_t_2);
              }
              __pyx_v_casted_array = __pyx_t_2;
              __pyx_t_2 = 0;

              /* "pyarrow/array.pxi":2005
 *                 try:
 *                     casted_array = _pc().cast(self, target_type, safe=True)
 *                     inner_array = pyarrow_unwrap_array(casted_array)             # <<<<<<<<<<<<<<
 *                 except ArrowInvalid as e:
 *                     raise ValueError(
*/
              __pyx_t_11 = pyarrow_unwrap_array(__pyx_v_casted_array); if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 2005, __pyx_L5_error)
              __pyx_v_inner_array = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_11);

              /* "pyarrow/array.pxi":2003
 * 
 *             if target_type != self.type:
 *                 try:             # <<<<<<<<<<<<<<
 *                     casted_array = _pc().cast(self, target_type, safe=True)
 *                     inner_array = pyarrow_unwrap_array(casted_array)
*/
            }
            __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
            __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L10_try_end;
            __pyx_L5_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

            /* "pyarrow/array.pxi":2006
 *                     casted_array = _pc().cast(self, target_type, safe=True)
 *                     inner_array = pyarrow_unwrap_array(casted_array)
 *                 except ArrowInvalid as e:             # <<<<<<<<<<<<<<
 *                     raise ValueError(
 *                         f"Could not cast {self.type} to requested type {target_type}: {e}"
*/
            __Pyx_ErrFetch(&__pyx_t_2, &__pyx_t_8, &__pyx_t_10);
            __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ArrowInvalid); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 2006, __pyx_L7_except_error)
            __Pyx_GOTREF(__pyx_t_3);
            __pyx_t_12 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_2, __pyx_t_3);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_ErrRestore(__pyx_t_2, __pyx_t_8, __pyx_t_10);
            __pyx_t_2 = 0; __pyx_t_8 = 0; __pyx_t_10 = 0;
            if (__pyx_t_12) {
              __Pyx_AddTraceback("pyarrow.lib.Array.__arrow_c_array__", __pyx_clineno, __pyx_lineno, __pyx_filename);
              if (__Pyx_GetException(&__pyx_t_10, &__pyx_t_8, &__pyx_t_2) < 0) __PYX_ERR(4, 2006, __pyx_L7_except_error)
              __Pyx_XGOTREF(__pyx_t_10);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_2);
              __Pyx_INCREF(__pyx_t_8);
              __pyx_v_e = __pyx_t_8;
              /*try:*/ {

                /* "pyarrow/array.pxi":2007
 *                     inner_array = pyarrow_unwrap_array(casted_array)
 *                 except ArrowInvalid as e:
 *                     raise ValueError(             # <<<<<<<<<<<<<<
 *                         f"Could not cast {self.type} to requested type {target_type}: {e}"
 *                     )
*/
                __pyx_t_9 = NULL;

                /* "pyarrow/array.pxi":2008
 *                 except ArrowInvalid as e:
 *                     raise ValueError(
 *                         f"Could not cast {self.type} to requested type {target_type}: {e}"             # <<<<<<<<<<<<<<
 *                     )
 *             else:
*/
                if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                  PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "type");
                  __PYX_ERR(4, 2008, __pyx_L16_error)
                }
                __pyx_t_13 = __Pyx_PyObject_FormatSimple(((PyObject *)__pyx_v_self->type), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_13)) __PYX_ERR(4, 2008, __pyx_L16_error)
                __Pyx_GOTREF(__pyx_t_13);
                __pyx_t_14 = __Pyx_PyObject_FormatSimple(__pyx_v_target_type, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_14)) __PYX_ERR(4, 2008, __pyx_L16_error)
                __Pyx_GOTREF(__pyx_t_14);
                __pyx_t_15 = __Pyx_PyObject_FormatSimple(__pyx_v_e, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_15)) __PYX_ERR(4, 2008, __pyx_L16_error)
                __Pyx_GOTREF(__pyx_t_15);
                __pyx_t_16[0] = __pyx_mstate_global->__pyx_kp_u_Could_not_cast;
                __pyx_t_16[1] = __pyx_t_13;
                __pyx_t_16[2] = __pyx_mstate_global->__pyx_kp_u_to_requested_type;
                __pyx_t_16[3] = __pyx_t_14;
                __pyx_t_16[4] = __pyx_mstate_global->__pyx_kp_u__10;
                __pyx_t_16[5] = __pyx_t_15;
                __pyx_t_17 = __Pyx_PyUnicode_Join(__pyx_t_16, 6, 15 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_13) + 19 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_14) + 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_15), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_13) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_14) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_15));
                if (unlikely(!__pyx_t_17)) __PYX_ERR(4, 2008, __pyx_L16_error)
                __Pyx_GOTREF(__pyx_t_17);
                __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
                __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
                __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
                __pyx_t_4 = 1;
                {
                  PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_17};
                  __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
                  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
                  if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 2007, __pyx_L16_error)
                  __Pyx_GOTREF(__pyx_t_3);
                }
                __Pyx_Raise(__pyx_t_3, 0, 0, 0);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __PYX_ERR(4, 2007, __pyx_L16_error)
              }

              /* "pyarrow/array.pxi":2006
 *                     casted_array = _pc().cast(self, target_type, safe=True)
 *                     inner_array = pyarrow_unwrap_array(casted_array)
 *                 except ArrowInvalid as e:             # <<<<<<<<<<<<<<
 *                     raise ValueError(
 *                         f"Could not cast {self.type} to requested type {target_type}: {e}"
*/
              /*finally:*/ {
                __pyx_L16_error:;
                /*exception exit:*/{
                  __Pyx_PyThreadState_declare
                  __Pyx_PyThreadState_assign
                  __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0; __pyx_t_25 = 0;
                  __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
                  __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
                  __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
                  __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
                   __Pyx_ExceptionSwap(&__pyx_t_23, &__pyx_t_24, &__pyx_t_25);
                  if ( unlikely(__Pyx_GetException(&__pyx_t_20, &__pyx_t_21, &__pyx_t_22) < 0)) __Pyx_ErrFetch(&__pyx_t_20, &__pyx_t_21, &__pyx_t_22);
                  __Pyx_XGOTREF(__pyx_t_20);
                  __Pyx_XGOTREF(__pyx_t_21);
                  __Pyx_XGOTREF(__pyx_t_22);
                  __Pyx_XGOTREF(__pyx_t_23);
                  __Pyx_XGOTREF(__pyx_t_24);
                  __Pyx_XGOTREF(__pyx_t_25);
                  __pyx_t_12 = __pyx_lineno; __pyx_t_18 = __pyx_clineno; __pyx_t_19 = __pyx_filename;
                  {
                    __Pyx_DECREF(__pyx_v_e); __pyx_v_e = 0;
                  }
                  __Pyx_XGIVEREF(__pyx_t_23);
                  __Pyx_XGIVEREF(__pyx_t_24);
                  __Pyx_XGIVEREF(__pyx_t_25);
                  __Pyx_ExceptionReset(__pyx_t_23, __pyx_t_24, __pyx_t_25);
                  __Pyx_XGIVEREF(__pyx_t_20);
                  __Pyx_XGIVEREF(__pyx_t_21);
                  __Pyx_XGIVEREF(__pyx_t_22);
                  __Pyx_ErrRestore(__pyx_t_20, __pyx_t_21, __pyx_t_22);
                  __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0; __pyx_t_25 = 0;
                  __pyx_lineno = __pyx_t_12; __pyx_clineno = __pyx_t_18; __pyx_filename = __pyx_t_19;
                  goto __pyx_L7_except_error;
                }
              }
            }
            goto __pyx_L7_except_error;

            /* "pyarrow/array.pxi":2003
 * 
 *             if target_type != self.type:
 *                 try:             # <<<<<<<<<<<<<<
 *                     casted_array = _pc().cast(self, target_type, safe=True)
 *                     inner_array = pyarrow_unwrap_array(casted_array)
*/
            __pyx_L7_except_error:;
            __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_L10_try_end:;
          }

          /* "pyarrow/array.pxi":2002
 *             target_type = DataType._import_from_c_capsule(requested_schema)
 * 
 *             if target_type != self.type:             # <<<<<<<<<<<<<<
 *                 try:
 *                     casted_array = _pc().cast(self, target_type, safe=True)
*/
          goto __pyx_L4;
        }

        /* "pyarrow/array.pxi":2011
 *                     )
 *             else:
 *                 inner_array = self.sp_array             # <<<<<<<<<<<<<<
 *         else:
 *             inner_array = self.sp_array
*/
        /*else*/ {
          if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
            PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_array");
            __PYX_ERR(4, 2011, __pyx_L1_error)
          }
          __pyx_t_11 = __pyx_v_self->sp_array;
          __pyx_v_inner_array = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_11);
        }
        __pyx_L4:;

        /* "pyarrow/array.pxi":1999
 *             shared_ptr[CArray] inner_array
 * 
 *         if requested_schema is not None:             # <<<<<<<<<<<<<<
 *             target_type = DataType._import_from_c_capsule(requested_schema)
 * 
*/
        goto __pyx_L3;
      }

      /* "pyarrow/array.pxi":2013
 *                 inner_array = self.sp_array
 *         else:
 *             inner_array = self.sp_array             # <<<<<<<<<<<<<<
 * 
 *         schema_capsule = alloc_c_schema(&c_schema)
*/
      /*else*/ {
        if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_array");
          __PYX_ERR(4, 2013, __pyx_L1_error)
        }
        __pyx_t_11 = __pyx_v_self->sp_array;
        __pyx_v_inner_array = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_11);
      }
      __pyx_L3:;

      /* "pyarrow/array.pxi":2015
 *             inner_array = self.sp_array
 * 
 *         schema_capsule = alloc_c_schema(&c_schema)             # <<<<<<<<<<<<<<
 *         array_capsule = alloc_c_array(&c_array)
 * 
*/
      __pyx_t_2 = __pyx_f_7pyarrow_3lib_alloc_c_schema((&__pyx_v_c_schema)); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 2015, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_v_schema_capsule = __pyx_t_2;
      __pyx_t_2 = 0;

      /* "pyarrow/array.pxi":2016
 * 
 *         schema_capsule = alloc_c_schema(&c_schema)
 *         array_capsule = alloc_c_array(&c_array)             # <<<<<<<<<<<<<<
 * 
 *         with nogil:
*/
      __pyx_t_2 = __pyx_f_7pyarrow_3lib_alloc_c_array((&__pyx_v_c_array)); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 2016, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_v_array_capsule = __pyx_t_2;
      __pyx_t_2 = 0;

      /* "pyarrow/array.pxi":2018
 *         array_capsule = alloc_c_array(&c_array)
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             check_status(ExportArray(deref(inner_array), c_array, c_schema))
 * 
*/
      {
          PyThreadState * _save;
          _save = PyEval_SaveThread();
          __Pyx_FastGIL_Remember();
          /*try:*/ {

            /* "pyarrow/array.pxi":2019
 * 
 *         with nogil:
 *             check_status(ExportArray(deref(inner_array), c_array, c_schema))             # <<<<<<<<<<<<<<
 * 
 *         return schema_capsule, array_capsule
*/
            __pyx_t_18 = __pyx_f_7pyarrow_3lib_check_status(arrow::ExportArray((*__pyx_v_inner_array), __pyx_v_c_array, __pyx_v_c_schema)); if (unlikely(__pyx_t_18 == ((int)-1))) __PYX_ERR(4, 2019, __pyx_L23_error)
          }

          /* "pyarrow/array.pxi":2018
 *         array_capsule = alloc_c_array(&c_array)
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             check_status(ExportArray(deref(inner_array), c_array, c_schema))
 * 
*/
          /*finally:*/ {
            /*normal exit:*/{
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L24;
            }
            __pyx_L23_error: {
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L1_error;
            }
            __pyx_L24:;
          }
      }

      /* "pyarrow/array.pxi":2021
 *             check_status(ExportArray(deref(inner_array), c_array, c_schema))
 * 
 *         return schema_capsule, array_capsule             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 2021, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_v_schema_capsule);
      __Pyx_GIVEREF(__pyx_v_schema_capsule);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_schema_capsule) != (0)) __PYX_ERR(4, 2021, __pyx_L1_error);
      __Pyx_INCREF(__pyx_v_array_capsule);
      __Pyx_GIVEREF(__pyx_v_array_capsule);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_array_capsule) != (0)) __PYX_ERR(4, 2021, __pyx_L1_error);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":1974
 *         return pyarrow_wrap_array(c_array)
 * 
 *     def __arrow_c_array__(self, requested_schema=None):             # <<<<<<<<<<<<<<
 *         """
 *         Get a pair of PyCapsules containing a C ArrowArray representation of the object.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_8);
      __Pyx_XDECREF(__pyx_t_9);
      __Pyx_XDECREF(__pyx_t_10);
      __Pyx_XDECREF(__pyx_t_13);
      __Pyx_XDECREF(__pyx_t_14);
      __Pyx_XDECREF(__pyx_t_15);
      __Pyx_XDECREF(__pyx_t_17);
      __Pyx_AddTraceback("pyarrow.lib.Array.__arrow_c_array__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_target_type);
      __Pyx_XDECREF(__pyx_v_casted_array);
      __Pyx_XDECREF(__pyx_v_e);
      __Pyx_XDECREF(__pyx_v_schema_capsule);
      __Pyx_XDECREF(__pyx_v_array_capsule);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":2023
 *         return schema_capsule, array_capsule
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def _import_from_c_capsule(schema_capsule, array_capsule):
 *         cdef:
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_88_import_from_c_capsule(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_5Array_87_import_from_c_capsule, "Array._import_from_c_capsule(schema_capsule, array_capsule)");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_5Array_88_import_from_c_capsule = {"_import_from_c_capsule", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Array_88_import_from_c_capsule, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Array_87_import_from_c_capsule};
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_88_import_from_c_capsule(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_schema_capsule = 0;
      PyObject *__pyx_v_array_capsule = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[2] = {0,0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("_import_from_c_capsule (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_schema_capsule,&__pyx_mstate_global->__pyx_n_u_array_capsule,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(4, 2023, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(4, 2023, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 2023, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_import_from_c_capsule", 0) < (0)) __PYX_ERR(4, 2023, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_import_from_c_capsule", 1, 2, 2, i); __PYX_ERR(4, 2023, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 2)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 2023, __pyx_L3_error)
          values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(4, 2023, __pyx_L3_error)
        }
        __pyx_v_schema_capsule = values[0];
        __pyx_v_array_capsule = values[1];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("_import_from_c_capsule", 1, 2, 2, __pyx_nargs); __PYX_ERR(4, 2023, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.Array._import_from_c_capsule", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_5Array_87_import_from_c_capsule(__pyx_v_schema_capsule, __pyx_v_array_capsule);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_5Array_87_import_from_c_capsule(PyObject *__pyx_v_schema_capsule, PyObject *__pyx_v_array_capsule) {
      struct ArrowSchema *__pyx_v_c_schema;
      struct ArrowArray *__pyx_v_c_array;
      std::shared_ptr< arrow::Array>  __pyx_v_array;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      void *__pyx_t_1;
      std::shared_ptr< arrow::Array>  __pyx_t_2;
      PyObject *__pyx_t_3 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("_import_from_c_capsule", 0);

      /* "pyarrow/array.pxi":2030
 *             shared_ptr[CArray] array
 * 
 *         c_schema = <ArrowSchema*> PyCapsule_GetPointer(schema_capsule, 'arrow_schema')             # <<<<<<<<<<<<<<
 *         c_array = <ArrowArray*> PyCapsule_GetPointer(array_capsule, 'arrow_array')
 * 
*/
      __pyx_t_1 = PyCapsule_GetPointer(__pyx_v_schema_capsule, __pyx_k_arrow_schema); if (unlikely(__pyx_t_1 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(4, 2030, __pyx_L1_error)
      __pyx_v_c_schema = ((struct ArrowSchema *)__pyx_t_1);

      /* "pyarrow/array.pxi":2031
 * 
 *         c_schema = <ArrowSchema*> PyCapsule_GetPointer(schema_capsule, 'arrow_schema')
 *         c_array = <ArrowArray*> PyCapsule_GetPointer(array_capsule, 'arrow_array')             # <<<<<<<<<<<<<<
 * 
 *         with nogil:
*/
      __pyx_t_1 = PyCapsule_GetPointer(__pyx_v_array_capsule, __pyx_k_arrow_array); if (unlikely(__pyx_t_1 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(4, 2031, __pyx_L1_error)
      __pyx_v_c_array = ((struct ArrowArray *)__pyx_t_1);

      /* "pyarrow/array.pxi":2033
 *         c_array = <ArrowArray*> PyCapsule_GetPointer(array_capsule, 'arrow_array')
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             array = GetResultValue(ImportArray(c_array, c_schema))
 * 
*/
      {
          PyThreadState * _save;
          _save = PyEval_SaveThread();
          __Pyx_FastGIL_Remember();
          /*try:*/ {

            /* "pyarrow/array.pxi":2034
 * 
 *         with nogil:
 *             array = GetResultValue(ImportArray(c_array, c_schema))             # <<<<<<<<<<<<<<
 * 
 *         return pyarrow_wrap_array(array)
*/
            __pyx_t_2 = arrow::py::GetResultValue<std::shared_ptr< arrow::Array> >(arrow::ImportArray(__pyx_v_c_array, __pyx_v_c_schema)); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(4, 2034, __pyx_L4_error)
            __pyx_v_array = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_2);
          }

          /* "pyarrow/array.pxi":2033
 *         c_array = <ArrowArray*> PyCapsule_GetPointer(array_capsule, 'arrow_array')
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             array = GetResultValue(ImportArray(c_array, c_schema))
 * 
*/
          /*finally:*/ {
            /*normal exit:*/{
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L5;
            }
            __pyx_L4_error: {
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L1_error;
            }
            __pyx_L5:;
          }
      }

      /* "pyarrow/array.pxi":2036
 *             array = GetResultValue(ImportArray(c_array, c_schema))
 * 
 *         return pyarrow_wrap_array(array)             # <<<<<<<<<<<<<<
 * 
 *     def _export_to_c_device(self, out_ptr, out_schema_ptr=0):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = pyarrow_wrap_array(__pyx_v_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 2036, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":2023
 *         return schema_capsule, array_capsule
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def _import_from_c_capsule(schema_capsule, array_capsule):
 *         cdef:
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_AddTraceback("pyarrow.lib.Array._import_from_c_capsule", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":2038
 *         return pyarrow_wrap_array(array)
 * 
 *     def _export_to_c_device(self, out_ptr, out_schema_ptr=0):             # <<<<<<<<<<<<<<
 *         """
 *         Export to a C ArrowDeviceArray struct, given its pointer.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_90_export_to_c_device(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_5Array_89_export_to_c_device, "Array._export_to_c_device(self, out_ptr, out_schema_ptr=0)\n\nExport to a C ArrowDeviceArray struct, given its pointer.\n\nIf a C ArrowSchema struct pointer is also given, the array type\nis exported to it at the same time.\n\nParameters\n----------\nout_ptr: int\n    The raw pointer to a C ArrowDeviceArray struct.\nout_schema_ptr: int (optional)\n    The raw pointer to a C ArrowSchema struct.\n\nBe careful: if you don't pass the ArrowDeviceArray struct to a consumer,\narray memory will leak.  This is a low-level function intended for\nexpert users.");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_5Array_90_export_to_c_device = {"_export_to_c_device", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Array_90_export_to_c_device, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Array_89_export_to_c_device};
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_90_export_to_c_device(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_out_ptr = 0;
      PyObject *__pyx_v_out_schema_ptr = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[2] = {0,0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("_export_to_c_device (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_out_ptr,&__pyx_mstate_global->__pyx_n_u_out_schema_ptr,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(4, 2038, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(4, 2038, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 2038, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_export_to_c_device", 0) < (0)) __PYX_ERR(4, 2038, __pyx_L3_error)
          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_int_0));
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_export_to_c_device", 0, 1, 2, i); __PYX_ERR(4, 2038, __pyx_L3_error) }
          }
        } else {
          switch (__pyx_nargs) {
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(4, 2038, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 2038, __pyx_L3_error)
            break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_int_0));
        }
        __pyx_v_out_ptr = values[0];
        __pyx_v_out_schema_ptr = values[1];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("_export_to_c_device", 0, 1, 2, __pyx_nargs); __PYX_ERR(4, 2038, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.Array._export_to_c_device", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_5Array_89_export_to_c_device(((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_v_self), __pyx_v_out_ptr, __pyx_v_out_schema_ptr);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_5Array_89_export_to_c_device(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self, PyObject *__pyx_v_out_ptr, PyObject *__pyx_v_out_schema_ptr) {
      void *__pyx_v_c_ptr;
      void *__pyx_v_c_schema_ptr;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      void *__pyx_t_1;
      struct __pyx_opt_args_7pyarrow_3lib__as_c_pointer __pyx_t_2;
      int __pyx_t_3;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("_export_to_c_device", 0);

      /* "pyarrow/array.pxi":2057
 *         """
 *         cdef:
 *             void* c_ptr = _as_c_pointer(out_ptr)             # <<<<<<<<<<<<<<
 *             void* c_schema_ptr = _as_c_pointer(out_schema_ptr,
 *                                                allow_null=True)
*/
      __pyx_t_1 = __pyx_f_7pyarrow_3lib__as_c_pointer(__pyx_v_out_ptr, NULL); if (unlikely(__pyx_t_1 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(4, 2057, __pyx_L1_error)
      __pyx_v_c_ptr = __pyx_t_1;

      /* "pyarrow/array.pxi":2058
 *         cdef:
 *             void* c_ptr = _as_c_pointer(out_ptr)
 *             void* c_schema_ptr = _as_c_pointer(out_schema_ptr,             # <<<<<<<<<<<<<<
 *                                                allow_null=True)
 *         with nogil:
*/
      __pyx_t_2.__pyx_n = 1;
      __pyx_t_2.allow_null = Py_True;
      __pyx_t_1 = __pyx_f_7pyarrow_3lib__as_c_pointer(__pyx_v_out_schema_ptr, &__pyx_t_2); if (unlikely(__pyx_t_1 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(4, 2058, __pyx_L1_error)
      __pyx_v_c_schema_ptr = __pyx_t_1;

      /* "pyarrow/array.pxi":2060
 *             void* c_schema_ptr = _as_c_pointer(out_schema_ptr,
 *                                                allow_null=True)
 *         with nogil:             # <<<<<<<<<<<<<<
 *             check_status(ExportDeviceArray(
 *                 deref(self.sp_array), <shared_ptr[CSyncEvent]>NULL,
*/
      {
          PyThreadState * _save;
          _save = PyEval_SaveThread();
          __Pyx_FastGIL_Remember();
          /*try:*/ {

            /* "pyarrow/array.pxi":2062
 *         with nogil:
 *             check_status(ExportDeviceArray(
 *                 deref(self.sp_array), <shared_ptr[CSyncEvent]>NULL,             # <<<<<<<<<<<<<<
 *                 <ArrowDeviceArray*> c_ptr, <ArrowSchema*> c_schema_ptr))
 * 
*/
            if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
              PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_array");
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              __PYX_ERR(4, 2062, __pyx_L4_error)
            }

            /* "pyarrow/array.pxi":2061
 *                                                allow_null=True)
 *         with nogil:
 *             check_status(ExportDeviceArray(             # <<<<<<<<<<<<<<
 *                 deref(self.sp_array), <shared_ptr[CSyncEvent]>NULL,
 *                 <ArrowDeviceArray*> c_ptr, <ArrowSchema*> c_schema_ptr))
*/
            __pyx_t_3 = __pyx_f_7pyarrow_3lib_check_status(arrow::ExportDeviceArray((*__pyx_v_self->sp_array), ((std::shared_ptr< arrow::Device::SyncEvent> )NULL), ((struct ArrowDeviceArray *)__pyx_v_c_ptr), ((struct ArrowSchema *)__pyx_v_c_schema_ptr))); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(4, 2061, __pyx_L4_error)
          }

          /* "pyarrow/array.pxi":2060
 *             void* c_schema_ptr = _as_c_pointer(out_schema_ptr,
 *                                                allow_null=True)
 *         with nogil:             # <<<<<<<<<<<<<<
 *             check_status(ExportDeviceArray(
 *                 deref(self.sp_array), <shared_ptr[CSyncEvent]>NULL,
*/
          /*finally:*/ {
            /*normal exit:*/{
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L5;
            }
            __pyx_L4_error: {
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L1_error;
            }
            __pyx_L5:;
          }
      }

      /* "pyarrow/array.pxi":2038
 *         return pyarrow_wrap_array(array)
 * 
 *     def _export_to_c_device(self, out_ptr, out_schema_ptr=0):             # <<<<<<<<<<<<<<
 *         """
 *         Export to a C ArrowDeviceArray struct, given its pointer.
*/

      /* function exit code */
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_AddTraceback("pyarrow.lib.Array._export_to_c_device", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":2065
 *                 <ArrowDeviceArray*> c_ptr, <ArrowSchema*> c_schema_ptr))
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def _import_from_c_device(in_ptr, type):
 *         """
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_92_import_from_c_device(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_5Array_91_import_from_c_device, "Array._import_from_c_device(in_ptr, type)\n\nImport Array from a C ArrowDeviceArray struct, given its pointer\nand the imported array type.\n\nParameters\n----------\nin_ptr: int\n    The raw pointer to a C ArrowDeviceArray struct.\ntype: DataType or int\n    Either a DataType object, or the raw pointer to a C ArrowSchema\n    struct.\n\nThis is a low-level function intended for expert users.");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_5Array_92_import_from_c_device = {"_import_from_c_device", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Array_92_import_from_c_device, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Array_91_import_from_c_device};
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_92_import_from_c_device(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_in_ptr = 0;
      PyObject *__pyx_v_type = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[2] = {0,0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("_import_from_c_device (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_in_ptr,&__pyx_mstate_global->__pyx_n_u_type,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(4, 2065, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(4, 2065, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 2065, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_import_from_c_device", 0) < (0)) __PYX_ERR(4, 2065, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_import_from_c_device", 1, 2, 2, i); __PYX_ERR(4, 2065, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 2)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 2065, __pyx_L3_error)
          values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(4, 2065, __pyx_L3_error)
        }
        __pyx_v_in_ptr = values[0];
        __pyx_v_type = values[1];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("_import_from_c_device", 1, 2, 2, __pyx_nargs); __PYX_ERR(4, 2065, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.Array._import_from_c_device", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_5Array_91_import_from_c_device(__pyx_v_in_ptr, __pyx_v_type);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_5Array_91_import_from_c_device(PyObject *__pyx_v_in_ptr, PyObject *__pyx_v_type) {
      struct ArrowDeviceArray *__pyx_v_c_device_array;
      void *__pyx_v_c_type_ptr;
      std::shared_ptr< arrow::Array>  __pyx_v_c_array;
      std::shared_ptr< arrow::DataType>  __pyx_v_c_type;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      void *__pyx_t_1;
      int __pyx_t_2;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      PyObject *__pyx_t_5 = NULL;
      size_t __pyx_t_6;
      std::shared_ptr< arrow::DataType>  __pyx_t_7;
      std::shared_ptr< arrow::Array>  __pyx_t_8;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("_import_from_c_device", 0);

      /* "pyarrow/array.pxi":2082
 *         """
 *         cdef:
 *             ArrowDeviceArray* c_device_array = <ArrowDeviceArray*>_as_c_pointer(in_ptr)             # <<<<<<<<<<<<<<
 *             void* c_type_ptr
 *             shared_ptr[CArray] c_array
*/
      __pyx_t_1 = __pyx_f_7pyarrow_3lib__as_c_pointer(__pyx_v_in_ptr, NULL); if (unlikely(__pyx_t_1 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(4, 2082, __pyx_L1_error)
      __pyx_v_c_device_array = ((struct ArrowDeviceArray *)__pyx_t_1);

      /* "pyarrow/array.pxi":2086
 *             shared_ptr[CArray] c_array
 * 
 *         if c_device_array.device_type == ARROW_DEVICE_CUDA:             # <<<<<<<<<<<<<<
 *             _ensure_cuda_loaded()
 * 
*/
      __pyx_t_2 = (__pyx_v_c_device_array->device_type == ARROW_DEVICE_CUDA);
      if (__pyx_t_2) {

        /* "pyarrow/array.pxi":2087
 * 
 *         if c_device_array.device_type == ARROW_DEVICE_CUDA:
 *             _ensure_cuda_loaded()             # <<<<<<<<<<<<<<
 * 
 *         c_type = pyarrow_unwrap_data_type(type)
*/
        __pyx_t_4 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_ensure_cuda_loaded); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 2087, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_6 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
          assert(__pyx_t_4);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
          __pyx_t_6 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
          __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 2087, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

        /* "pyarrow/array.pxi":2086
 *             shared_ptr[CArray] c_array
 * 
 *         if c_device_array.device_type == ARROW_DEVICE_CUDA:             # <<<<<<<<<<<<<<
 *             _ensure_cuda_loaded()
 * 
*/
      }

      /* "pyarrow/array.pxi":2089
 *             _ensure_cuda_loaded()
 * 
 *         c_type = pyarrow_unwrap_data_type(type)             # <<<<<<<<<<<<<<
 *         if c_type == nullptr:
 *             # Not a DataType object, perhaps a raw ArrowSchema pointer
*/
      __pyx_t_7 = pyarrow_unwrap_data_type(__pyx_v_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 2089, __pyx_L1_error)
      __pyx_v_c_type = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_7);

      /* "pyarrow/array.pxi":2090
 * 
 *         c_type = pyarrow_unwrap_data_type(type)
 *         if c_type == nullptr:             # <<<<<<<<<<<<<<
 *             # Not a DataType object, perhaps a raw ArrowSchema pointer
 *             c_type_ptr = _as_c_pointer(type)
*/
      __pyx_t_2 = ((__pyx_v_c_type == nullptr) != 0);
      if (__pyx_t_2) {

        /* "pyarrow/array.pxi":2092
 *         if c_type == nullptr:
 *             # Not a DataType object, perhaps a raw ArrowSchema pointer
 *             c_type_ptr = _as_c_pointer(type)             # <<<<<<<<<<<<<<
 *             with nogil:
 *                 c_array = GetResultValue(
*/
        __pyx_t_1 = __pyx_f_7pyarrow_3lib__as_c_pointer(__pyx_v_type, NULL); if (unlikely(__pyx_t_1 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(4, 2092, __pyx_L1_error)
        __pyx_v_c_type_ptr = __pyx_t_1;

        /* "pyarrow/array.pxi":2093
 *             # Not a DataType object, perhaps a raw ArrowSchema pointer
 *             c_type_ptr = _as_c_pointer(type)
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 c_array = GetResultValue(
 *                     ImportDeviceArray(c_device_array, <ArrowSchema*> c_type_ptr)
*/
        {
            PyThreadState * _save;
            _save = PyEval_SaveThread();
            __Pyx_FastGIL_Remember();
            /*try:*/ {

              /* "pyarrow/array.pxi":2094
 *             c_type_ptr = _as_c_pointer(type)
 *             with nogil:
 *                 c_array = GetResultValue(             # <<<<<<<<<<<<<<
 *                     ImportDeviceArray(c_device_array, <ArrowSchema*> c_type_ptr)
 *                 )
*/
              __pyx_t_8 = arrow::py::GetResultValue<std::shared_ptr< arrow::Array> >(arrow::ImportDeviceArray(__pyx_v_c_device_array, ((struct ArrowSchema *)__pyx_v_c_type_ptr))); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(4, 2094, __pyx_L6_error)
              __pyx_v_c_array = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_8);
            }

            /* "pyarrow/array.pxi":2093
 *             # Not a DataType object, perhaps a raw ArrowSchema pointer
 *             c_type_ptr = _as_c_pointer(type)
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 c_array = GetResultValue(
 *                     ImportDeviceArray(c_device_array, <ArrowSchema*> c_type_ptr)
*/
            /*finally:*/ {
              /*normal exit:*/{
                __Pyx_FastGIL_Forget();
                PyEval_RestoreThread(_save);
                goto __pyx_L7;
              }
              __pyx_L6_error: {
                __Pyx_FastGIL_Forget();
                PyEval_RestoreThread(_save);
                goto __pyx_L1_error;
              }
              __pyx_L7:;
            }
        }

        /* "pyarrow/array.pxi":2090
 * 
 *         c_type = pyarrow_unwrap_data_type(type)
 *         if c_type == nullptr:             # <<<<<<<<<<<<<<
 *             # Not a DataType object, perhaps a raw ArrowSchema pointer
 *             c_type_ptr = _as_c_pointer(type)
*/
        goto __pyx_L4;
      }

      /* "pyarrow/array.pxi":2098
 *                 )
 *         else:
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 c_array = GetResultValue(
 *                     ImportDeviceArray(c_device_array, c_type)
*/
      /*else*/ {
        {
            PyThreadState * _save;
            _save = PyEval_SaveThread();
            __Pyx_FastGIL_Remember();
            /*try:*/ {

              /* "pyarrow/array.pxi":2099
 *         else:
 *             with nogil:
 *                 c_array = GetResultValue(             # <<<<<<<<<<<<<<
 *                     ImportDeviceArray(c_device_array, c_type)
 *                 )
*/
              __pyx_t_8 = arrow::py::GetResultValue<std::shared_ptr< arrow::Array> >(arrow::ImportDeviceArray(__pyx_v_c_device_array, __pyx_v_c_type)); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(4, 2099, __pyx_L9_error)
              __pyx_v_c_array = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_8);
            }

            /* "pyarrow/array.pxi":2098
 *                 )
 *         else:
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 c_array = GetResultValue(
 *                     ImportDeviceArray(c_device_array, c_type)
*/
            /*finally:*/ {
              /*normal exit:*/{
                __Pyx_FastGIL_Forget();
                PyEval_RestoreThread(_save);
                goto __pyx_L10;
              }
              __pyx_L9_error: {
                __Pyx_FastGIL_Forget();
                PyEval_RestoreThread(_save);
                goto __pyx_L1_error;
              }
              __pyx_L10:;
            }
        }
      }
      __pyx_L4:;

      /* "pyarrow/array.pxi":2102
 *                     ImportDeviceArray(c_device_array, c_type)
 *                 )
 *         return pyarrow_wrap_array(c_array)             # <<<<<<<<<<<<<<
 * 
 *     def __arrow_c_device_array__(self, requested_schema=None, **kwargs):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = pyarrow_wrap_array(__pyx_v_c_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 2102, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":2065
 *                 <ArrowDeviceArray*> c_ptr, <ArrowSchema*> c_schema_ptr))
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def _import_from_c_device(in_ptr, type):
 *         """
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_AddTraceback("pyarrow.lib.Array._import_from_c_device", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":2104
 *         return pyarrow_wrap_array(c_array)
 * 
 *     def __arrow_c_device_array__(self, requested_schema=None, **kwargs):             # <<<<<<<<<<<<<<
 *         """
 *         Get a pair of PyCapsules containing a C ArrowDeviceArray representation
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_94__arrow_c_device_array__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_5Array_93__arrow_c_device_array__, "Array.__arrow_c_device_array__(self, requested_schema=None, **kwargs)\n\nGet a pair of PyCapsules containing a C ArrowDeviceArray representation\nof the object.\n\nParameters\n----------\nrequested_schema : PyCapsule | None\n    A PyCapsule containing a C ArrowSchema representation of a requested\n    schema. PyArrow will attempt to cast the array to this data type.\n    If None, the array will be returned as-is, with a type matching the\n    one returned by :meth:`__arrow_c_schema__()`.\nkwargs\n    Currently no additional keyword arguments are supported, but\n    this method will accept any keyword with a value of ``None``\n    for compatibility with future keywords.\n\nReturns\n-------\nTuple[PyCapsule, PyCapsule]\n    A pair of PyCapsules containing a C ArrowSchema and ArrowDeviceArray,\n    respectively.");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_5Array_94__arrow_c_device_array__ = {"__arrow_c_device_array__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Array_94__arrow_c_device_array__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Array_93__arrow_c_device_array__};
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_94__arrow_c_device_array__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_requested_schema = 0;
      PyObject *__pyx_v_kwargs = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__arrow_c_device_array__ (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
      __Pyx_GOTREF(__pyx_v_kwargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_requested_schema,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(4, 2104, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 2104, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, __pyx_v_kwargs, values, kwd_pos_args, __pyx_kwds_len, "__arrow_c_device_array__", 1) < (0)) __PYX_ERR(4, 2104, __pyx_L3_error)
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
        } else {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 2104, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
        }
        __pyx_v_requested_schema = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("__arrow_c_device_array__", 0, 0, 1, __pyx_nargs); __PYX_ERR(4, 2104, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
      __Pyx_AddTraceback("pyarrow.lib.Array.__arrow_c_device_array__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_5Array_93__arrow_c_device_array__(((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_v_self), __pyx_v_requested_schema, __pyx_v_kwargs);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_DECREF(__pyx_v_kwargs);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_5Array_93__arrow_c_device_array__(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self, PyObject *__pyx_v_requested_schema, PyObject *__pyx_v_kwargs) {
      struct ArrowDeviceArray *__pyx_v_c_array;
      struct ArrowSchema *__pyx_v_c_schema;
      std::shared_ptr< arrow::Array>  __pyx_v_inner_array;
      PyObject *__pyx_v_non_default_kwargs = NULL;
      PyObject *__pyx_v_target_type = NULL;
      PyObject *__pyx_v_casted_array = NULL;
      PyObject *__pyx_v_e = NULL;
      PyObject *__pyx_v_schema_capsule = NULL;
      PyObject *__pyx_v_array_capsule = NULL;
      PyObject *__pyx_9genexpr15__pyx_v_name = NULL;
      PyObject *__pyx_9genexpr15__pyx_v_value = NULL;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      Py_ssize_t __pyx_t_3;
      Py_ssize_t __pyx_t_4;
      int __pyx_t_5;
      PyObject *__pyx_t_6 = NULL;
      PyObject *__pyx_t_7 = NULL;
      int __pyx_t_8;
      int __pyx_t_9;
      size_t __pyx_t_10;
      int __pyx_t_11;
      PyObject *__pyx_t_12 = NULL;
      PyObject *__pyx_t_13 = NULL;
      PyObject *__pyx_t_14 = NULL;
      PyObject *__pyx_t_15 = NULL;
      std::shared_ptr< arrow::Array>  __pyx_t_16;
      PyObject *__pyx_t_17 = NULL;
      PyObject *__pyx_t_18 = NULL;
      PyObject *__pyx_t_19 = NULL;
      PyObject *__pyx_t_20[6];
      PyObject *__pyx_t_21 = NULL;
      char const *__pyx_t_22;
      PyObject *__pyx_t_23 = NULL;
      PyObject *__pyx_t_24 = NULL;
      PyObject *__pyx_t_25 = NULL;
      PyObject *__pyx_t_26 = NULL;
      PyObject *__pyx_t_27 = NULL;
      PyObject *__pyx_t_28 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__arrow_c_device_array__", 0);

      /* "pyarrow/array.pxi":2132
 *             shared_ptr[CArray] inner_array
 * 
 *         non_default_kwargs = [             # <<<<<<<<<<<<<<
 *             name for name, value in kwargs.items() if value is not None
 *         ]
*/
      { /* enter inner scope */
        __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 2132, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_1);

        /* "pyarrow/array.pxi":2133
 * 
 *         non_default_kwargs = [
 *             name for name, value in kwargs.items() if value is not None             # <<<<<<<<<<<<<<
 *         ]
 *         if non_default_kwargs:
*/
        __pyx_t_3 = 0;
        __pyx_t_6 = __Pyx_dict_iterator(__pyx_v_kwargs, 1, __pyx_mstate_global->__pyx_n_u_items, (&__pyx_t_4), (&__pyx_t_5)); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 2133, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_XDECREF(__pyx_t_2);
        __pyx_t_2 = __pyx_t_6;
        __pyx_t_6 = 0;
        while (1) {
          __pyx_t_8 = __Pyx_dict_iter_next(__pyx_t_2, __pyx_t_4, &__pyx_t_3, &__pyx_t_6, &__pyx_t_7, NULL, __pyx_t_5);
          if (unlikely(__pyx_t_8 == 0)) break;
          if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(4, 2133, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_XDECREF_SET(__pyx_9genexpr15__pyx_v_name, __pyx_t_6);
          __pyx_t_6 = 0;
          __Pyx_XDECREF_SET(__pyx_9genexpr15__pyx_v_value, __pyx_t_7);
          __pyx_t_7 = 0;
          __pyx_t_9 = (__pyx_9genexpr15__pyx_v_value != Py_None);
          if (__pyx_t_9) {
            if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_9genexpr15__pyx_v_name))) __PYX_ERR(4, 2132, __pyx_L5_error)
          }
        }
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF(__pyx_9genexpr15__pyx_v_name); __pyx_9genexpr15__pyx_v_name = 0;
        __Pyx_XDECREF(__pyx_9genexpr15__pyx_v_value); __pyx_9genexpr15__pyx_v_value = 0;
        goto __pyx_L9_exit_scope;
        __pyx_L5_error:;
        __Pyx_XDECREF(__pyx_9genexpr15__pyx_v_name); __pyx_9genexpr15__pyx_v_name = 0;
        __Pyx_XDECREF(__pyx_9genexpr15__pyx_v_value); __pyx_9genexpr15__pyx_v_value = 0;
        goto __pyx_L1_error;
        __pyx_L9_exit_scope:;
      } /* exit inner scope */
      __pyx_v_non_default_kwargs = ((PyObject*)__pyx_t_1);
      __pyx_t_1 = 0;

      /* "pyarrow/array.pxi":2135
 *             name for name, value in kwargs.items() if value is not None
 *         ]
 *         if non_default_kwargs:             # <<<<<<<<<<<<<<
 *             raise NotImplementedError(
 *                 f"Received unsupported keyword argument(s): {non_default_kwargs}"
*/
      {
        Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_v_non_default_kwargs);
        if (unlikely(((!CYTHON_ASSUME_SAFE_SIZE) && __pyx_temp < 0))) __PYX_ERR(4, 2135, __pyx_L1_error)
        __pyx_t_9 = (__pyx_temp != 0);
      }

      if (unlikely(__pyx_t_9)) {

        /* "pyarrow/array.pxi":2136
 *         ]
 *         if non_default_kwargs:
 *             raise NotImplementedError(             # <<<<<<<<<<<<<<
 *                 f"Received unsupported keyword argument(s): {non_default_kwargs}"
 *             )
*/
        __pyx_t_2 = NULL;

        /* "pyarrow/array.pxi":2137
 *         if non_default_kwargs:
 *             raise NotImplementedError(
 *                 f"Received unsupported keyword argument(s): {non_default_kwargs}"             # <<<<<<<<<<<<<<
 *             )
 * 
*/
        __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_v_non_default_kwargs, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 2137, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_Received_unsupported_keyword_arg, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 2137, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_10 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_6};
          __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_NotImplementedError)), __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 2136, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
        }
        __Pyx_Raise(__pyx_t_1, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __PYX_ERR(4, 2136, __pyx_L1_error)

        /* "pyarrow/array.pxi":2135
 *             name for name, value in kwargs.items() if value is not None
 *         ]
 *         if non_default_kwargs:             # <<<<<<<<<<<<<<
 *             raise NotImplementedError(
 *                 f"Received unsupported keyword argument(s): {non_default_kwargs}"
*/
      }

      /* "pyarrow/array.pxi":2140
 *             )
 * 
 *         if requested_schema is not None:             # <<<<<<<<<<<<<<
 *             target_type = DataType._import_from_c_capsule(requested_schema)
 * 
*/
      __pyx_t_9 = (__pyx_v_requested_schema != Py_None);
      if (__pyx_t_9) {

        /* "pyarrow/array.pxi":2141
 * 
 *         if requested_schema is not None:
 *             target_type = DataType._import_from_c_capsule(requested_schema)             # <<<<<<<<<<<<<<
 * 
 *             if target_type != self.type:
*/
        __pyx_t_6 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType);
        __Pyx_INCREF(__pyx_t_6);
        __pyx_t_10 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_requested_schema};
          __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_import_from_c_capsule, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 2141, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
        }
        __pyx_v_target_type = __pyx_t_1;
        __pyx_t_1 = 0;

        /* "pyarrow/array.pxi":2143
 *             target_type = DataType._import_from_c_capsule(requested_schema)
 * 
 *             if target_type != self.type:             # <<<<<<<<<<<<<<
 *                 if not self.is_cpu:
 *                     raise NotImplementedError(
*/
        if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "type");
          __PYX_ERR(4, 2143, __pyx_L1_error)
        }
        __pyx_t_1 = PyObject_RichCompare(__pyx_v_target_type, ((PyObject *)__pyx_v_self->type), Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 2143, __pyx_L1_error)
        __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(4, 2143, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (__pyx_t_9) {

          /* "pyarrow/array.pxi":2144
 * 
 *             if target_type != self.type:
 *                 if not self.is_cpu:             # <<<<<<<<<<<<<<
 *                     raise NotImplementedError(
 *                         "Casting to a requested schema is only supported for CPU data"
*/
          __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_is_cpu); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 2144, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(4, 2144, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __pyx_t_11 = (!__pyx_t_9);
          if (unlikely(__pyx_t_11)) {

            /* "pyarrow/array.pxi":2145
 *             if target_type != self.type:
 *                 if not self.is_cpu:
 *                     raise NotImplementedError(             # <<<<<<<<<<<<<<
 *                         "Casting to a requested schema is only supported for CPU data"
 *                     )
*/
            __pyx_t_6 = NULL;
            __pyx_t_10 = 1;
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_mstate_global->__pyx_kp_u_Casting_to_a_requested_schema_is};
              __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_NotImplementedError)), __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
              __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
              if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 2145, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_1);
            }
            __Pyx_Raise(__pyx_t_1, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            __PYX_ERR(4, 2145, __pyx_L1_error)

            /* "pyarrow/array.pxi":2144
 * 
 *             if target_type != self.type:
 *                 if not self.is_cpu:             # <<<<<<<<<<<<<<
 *                     raise NotImplementedError(
 *                         "Casting to a requested schema is only supported for CPU data"
*/
          }

          /* "pyarrow/array.pxi":2148
 *                         "Casting to a requested schema is only supported for CPU data"
 *                     )
 *                 try:             # <<<<<<<<<<<<<<
 *                     casted_array = _pc().cast(self, target_type, safe=True)
 *                     inner_array = pyarrow_unwrap_array(casted_array)
*/
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14);
            __Pyx_XGOTREF(__pyx_t_12);
            __Pyx_XGOTREF(__pyx_t_13);
            __Pyx_XGOTREF(__pyx_t_14);
            /*try:*/ {

              /* "pyarrow/array.pxi":2149
 *                     )
 *                 try:
 *                     casted_array = _pc().cast(self, target_type, safe=True)             # <<<<<<<<<<<<<<
 *                     inner_array = pyarrow_unwrap_array(casted_array)
 *                 except ArrowInvalid as e:
*/
              __pyx_t_7 = NULL;
              __Pyx_GetModuleGlobalName(__pyx_t_15, __pyx_mstate_global->__pyx_n_u_pc_2); if (unlikely(!__pyx_t_15)) __PYX_ERR(4, 2149, __pyx_L14_error)
              __Pyx_GOTREF(__pyx_t_15);
              __pyx_t_10 = 1;
              #if CYTHON_UNPACK_METHODS
              if (unlikely(PyMethod_Check(__pyx_t_15))) {
                __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_15);
                assert(__pyx_t_7);
                PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_15);
                __Pyx_INCREF(__pyx_t_7);
                __Pyx_INCREF(__pyx__function);
                __Pyx_DECREF_SET(__pyx_t_15, __pyx__function);
                __pyx_t_10 = 0;
              }
              #endif
              {
                PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL};
                __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_15, __pyx_callargs+__pyx_t_10, (1-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
                __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
                if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 2149, __pyx_L14_error)
                __Pyx_GOTREF(__pyx_t_2);
              }
              __pyx_t_6 = __pyx_t_2;
              __Pyx_INCREF(__pyx_t_6);
              __pyx_t_10 = 0;
              {
                PyObject *__pyx_callargs[3 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_6, ((PyObject *)__pyx_v_self), __pyx_v_target_type};
                __pyx_t_15 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_15)) __PYX_ERR(4, 2149, __pyx_L14_error)
                __Pyx_GOTREF(__pyx_t_15);
                if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_safe, Py_True, __pyx_t_15, __pyx_callargs+3, 0) < (0)) __PYX_ERR(4, 2149, __pyx_L14_error)
                __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_cast, __pyx_callargs+__pyx_t_10, (3-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_15);
                __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
                __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
                __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 2149, __pyx_L14_error)
                __Pyx_GOTREF(__pyx_t_1);
              }
              __pyx_v_casted_array = __pyx_t_1;
              __pyx_t_1 = 0;

              /* "pyarrow/array.pxi":2150
 *                 try:
 *                     casted_array = _pc().cast(self, target_type, safe=True)
 *                     inner_array = pyarrow_unwrap_array(casted_array)             # <<<<<<<<<<<<<<
 *                 except ArrowInvalid as e:
 *                     raise ValueError(
*/
              __pyx_t_16 = pyarrow_unwrap_array(__pyx_v_casted_array); if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 2150, __pyx_L14_error)
              __pyx_v_inner_array = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_16);

              /* "pyarrow/array.pxi":2148
 *                         "Casting to a requested schema is only supported for CPU data"
 *                     )
 *                 try:             # <<<<<<<<<<<<<<
 *                     casted_array = _pc().cast(self, target_type, safe=True)
 *                     inner_array = pyarrow_unwrap_array(casted_array)
*/
            }
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
            __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
            goto __pyx_L19_try_end;
            __pyx_L14_error:;
            __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
            __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;

            /* "pyarrow/array.pxi":2151
 *                     casted_array = _pc().cast(self, target_type, safe=True)
 *                     inner_array = pyarrow_unwrap_array(casted_array)
 *                 except ArrowInvalid as e:             # <<<<<<<<<<<<<<
 *                     raise ValueError(
 *                         f"Could not cast {self.type} to requested type {target_type}: {e}"
*/
            __Pyx_ErrFetch(&__pyx_t_1, &__pyx_t_2, &__pyx_t_15);
            __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_ArrowInvalid); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 2151, __pyx_L16_except_error)
            __Pyx_GOTREF(__pyx_t_6);
            __pyx_t_5 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_1, __pyx_t_6);
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            __Pyx_ErrRestore(__pyx_t_1, __pyx_t_2, __pyx_t_15);
            __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_t_15 = 0;
            if (__pyx_t_5) {
              __Pyx_AddTraceback("pyarrow.lib.Array.__arrow_c_device_array__", __pyx_clineno, __pyx_lineno, __pyx_filename);
              if (__Pyx_GetException(&__pyx_t_15, &__pyx_t_2, &__pyx_t_1) < 0) __PYX_ERR(4, 2151, __pyx_L16_except_error)
              __Pyx_XGOTREF(__pyx_t_15);
              __Pyx_XGOTREF(__pyx_t_2);
              __Pyx_XGOTREF(__pyx_t_1);
              __Pyx_INCREF(__pyx_t_2);
              __pyx_v_e = __pyx_t_2;
              /*try:*/ {

                /* "pyarrow/array.pxi":2152
 *                     inner_array = pyarrow_unwrap_array(casted_array)
 *                 except ArrowInvalid as e:
 *                     raise ValueError(             # <<<<<<<<<<<<<<
 *                         f"Could not cast {self.type} to requested type {target_type}: {e}"
 *                     )
*/
                __pyx_t_7 = NULL;

                /* "pyarrow/array.pxi":2153
 *                 except ArrowInvalid as e:
 *                     raise ValueError(
 *                         f"Could not cast {self.type} to requested type {target_type}: {e}"             # <<<<<<<<<<<<<<
 *                     )
 *             else:
*/
                if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                  PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "type");
                  __PYX_ERR(4, 2153, __pyx_L25_error)
                }
                __pyx_t_17 = __Pyx_PyObject_FormatSimple(((PyObject *)__pyx_v_self->type), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_17)) __PYX_ERR(4, 2153, __pyx_L25_error)
                __Pyx_GOTREF(__pyx_t_17);
                __pyx_t_18 = __Pyx_PyObject_FormatSimple(__pyx_v_target_type, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_18)) __PYX_ERR(4, 2153, __pyx_L25_error)
                __Pyx_GOTREF(__pyx_t_18);
                __pyx_t_19 = __Pyx_PyObject_FormatSimple(__pyx_v_e, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_19)) __PYX_ERR(4, 2153, __pyx_L25_error)
                __Pyx_GOTREF(__pyx_t_19);
                __pyx_t_20[0] = __pyx_mstate_global->__pyx_kp_u_Could_not_cast;
                __pyx_t_20[1] = __pyx_t_17;
                __pyx_t_20[2] = __pyx_mstate_global->__pyx_kp_u_to_requested_type;
                __pyx_t_20[3] = __pyx_t_18;
                __pyx_t_20[4] = __pyx_mstate_global->__pyx_kp_u__10;
                __pyx_t_20[5] = __pyx_t_19;
                __pyx_t_21 = __Pyx_PyUnicode_Join(__pyx_t_20, 6, 15 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_17) + 19 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_18) + 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_19), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_17) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_18) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_19));
                if (unlikely(!__pyx_t_21)) __PYX_ERR(4, 2153, __pyx_L25_error)
                __Pyx_GOTREF(__pyx_t_21);
                __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
                __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
                __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
                __pyx_t_10 = 1;
                {
                  PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_21};
                  __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
                  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
                  if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 2152, __pyx_L25_error)
                  __Pyx_GOTREF(__pyx_t_6);
                }
                __Pyx_Raise(__pyx_t_6, 0, 0, 0);
                __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                __PYX_ERR(4, 2152, __pyx_L25_error)
              }

              /* "pyarrow/array.pxi":2151
 *                     casted_array = _pc().cast(self, target_type, safe=True)
 *                     inner_array = pyarrow_unwrap_array(casted_array)
 *                 except ArrowInvalid as e:             # <<<<<<<<<<<<<<
 *                     raise ValueError(
 *                         f"Could not cast {self.type} to requested type {target_type}: {e}"
*/
              /*finally:*/ {
                __pyx_L25_error:;
                /*exception exit:*/{
                  __Pyx_PyThreadState_declare
                  __Pyx_PyThreadState_assign
                  __pyx_t_23 = 0; __pyx_t_24 = 0; __pyx_t_25 = 0; __pyx_t_26 = 0; __pyx_t_27 = 0; __pyx_t_28 = 0;
                  __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
                  __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
                  __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
                  __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0;
                  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
                  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
                   __Pyx_ExceptionSwap(&__pyx_t_26, &__pyx_t_27, &__pyx_t_28);
                  if ( unlikely(__Pyx_GetException(&__pyx_t_23, &__pyx_t_24, &__pyx_t_25) < 0)) __Pyx_ErrFetch(&__pyx_t_23, &__pyx_t_24, &__pyx_t_25);
                  __Pyx_XGOTREF(__pyx_t_23);
                  __Pyx_XGOTREF(__pyx_t_24);
                  __Pyx_XGOTREF(__pyx_t_25);
                  __Pyx_XGOTREF(__pyx_t_26);
                  __Pyx_XGOTREF(__pyx_t_27);
                  __Pyx_XGOTREF(__pyx_t_28);
                  __pyx_t_5 = __pyx_lineno; __pyx_t_8 = __pyx_clineno; __pyx_t_22 = __pyx_filename;
                  {
                    __Pyx_DECREF(__pyx_v_e); __pyx_v_e = 0;
                  }
                  __Pyx_XGIVEREF(__pyx_t_26);
                  __Pyx_XGIVEREF(__pyx_t_27);
                  __Pyx_XGIVEREF(__pyx_t_28);
                  __Pyx_ExceptionReset(__pyx_t_26, __pyx_t_27, __pyx_t_28);
                  __Pyx_XGIVEREF(__pyx_t_23);
                  __Pyx_XGIVEREF(__pyx_t_24);
                  __Pyx_XGIVEREF(__pyx_t_25);
                  __Pyx_ErrRestore(__pyx_t_23, __pyx_t_24, __pyx_t_25);
                  __pyx_t_23 = 0; __pyx_t_24 = 0; __pyx_t_25 = 0; __pyx_t_26 = 0; __pyx_t_27 = 0; __pyx_t_28 = 0;
                  __pyx_lineno = __pyx_t_5; __pyx_clineno = __pyx_t_8; __pyx_filename = __pyx_t_22;
                  goto __pyx_L16_except_error;
                }
              }
            }
            goto __pyx_L16_except_error;

            /* "pyarrow/array.pxi":2148
 *                         "Casting to a requested schema is only supported for CPU data"
 *                     )
 *                 try:             # <<<<<<<<<<<<<<
 *                     casted_array = _pc().cast(self, target_type, safe=True)
 *                     inner_array = pyarrow_unwrap_array(casted_array)
*/
            __pyx_L16_except_error:;
            __Pyx_XGIVEREF(__pyx_t_12);
            __Pyx_XGIVEREF(__pyx_t_13);
            __Pyx_XGIVEREF(__pyx_t_14);
            __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
            goto __pyx_L1_error;
            __pyx_L19_try_end:;
          }

          /* "pyarrow/array.pxi":2143
 *             target_type = DataType._import_from_c_capsule(requested_schema)
 * 
 *             if target_type != self.type:             # <<<<<<<<<<<<<<
 *                 if not self.is_cpu:
 *                     raise NotImplementedError(
*/
          goto __pyx_L12;
        }

        /* "pyarrow/array.pxi":2156
 *                     )
 *             else:
 *                 inner_array = self.sp_array             # <<<<<<<<<<<<<<
 *         else:
 *             inner_array = self.sp_array
*/
        /*else*/ {
          if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
            PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_array");
            __PYX_ERR(4, 2156, __pyx_L1_error)
          }
          __pyx_t_16 = __pyx_v_self->sp_array;
          __pyx_v_inner_array = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_16);
        }
        __pyx_L12:;

        /* "pyarrow/array.pxi":2140
 *             )
 * 
 *         if requested_schema is not None:             # <<<<<<<<<<<<<<
 *             target_type = DataType._import_from_c_capsule(requested_schema)
 * 
*/
        goto __pyx_L11;
      }

      /* "pyarrow/array.pxi":2158
 *                 inner_array = self.sp_array
 *         else:
 *             inner_array = self.sp_array             # <<<<<<<<<<<<<<
 * 
 *         schema_capsule = alloc_c_schema(&c_schema)
*/
      /*else*/ {
        if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_array");
          __PYX_ERR(4, 2158, __pyx_L1_error)
        }
        __pyx_t_16 = __pyx_v_self->sp_array;
        __pyx_v_inner_array = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_16);
      }
      __pyx_L11:;

      /* "pyarrow/array.pxi":2160
 *             inner_array = self.sp_array
 * 
 *         schema_capsule = alloc_c_schema(&c_schema)             # <<<<<<<<<<<<<<
 *         array_capsule = alloc_c_device_array(&c_array)
 * 
*/
      __pyx_t_1 = __pyx_f_7pyarrow_3lib_alloc_c_schema((&__pyx_v_c_schema)); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 2160, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_v_schema_capsule = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "pyarrow/array.pxi":2161
 * 
 *         schema_capsule = alloc_c_schema(&c_schema)
 *         array_capsule = alloc_c_device_array(&c_array)             # <<<<<<<<<<<<<<
 * 
 *         with nogil:
*/
      __pyx_t_1 = __pyx_f_7pyarrow_3lib_alloc_c_device_array((&__pyx_v_c_array)); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 2161, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_v_array_capsule = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "pyarrow/array.pxi":2163
 *         array_capsule = alloc_c_device_array(&c_array)
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             check_status(ExportDeviceArray(
 *                 deref(inner_array), <shared_ptr[CSyncEvent]>NULL,
*/
      {
          PyThreadState * _save;
          _save = PyEval_SaveThread();
          __Pyx_FastGIL_Remember();
          /*try:*/ {

            /* "pyarrow/array.pxi":2164
 * 
 *         with nogil:
 *             check_status(ExportDeviceArray(             # <<<<<<<<<<<<<<
 *                 deref(inner_array), <shared_ptr[CSyncEvent]>NULL,
 *                 c_array, c_schema))
*/
            __pyx_t_8 = __pyx_f_7pyarrow_3lib_check_status(arrow::ExportDeviceArray((*__pyx_v_inner_array), ((std::shared_ptr< arrow::Device::SyncEvent> )NULL), __pyx_v_c_array, __pyx_v_c_schema)); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(4, 2164, __pyx_L32_error)
          }

          /* "pyarrow/array.pxi":2163
 *         array_capsule = alloc_c_device_array(&c_array)
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             check_status(ExportDeviceArray(
 *                 deref(inner_array), <shared_ptr[CSyncEvent]>NULL,
*/
          /*finally:*/ {
            /*normal exit:*/{
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L33;
            }
            __pyx_L32_error: {
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L1_error;
            }
            __pyx_L33:;
          }
      }

      /* "pyarrow/array.pxi":2168
 *                 c_array, c_schema))
 * 
 *         return schema_capsule, array_capsule             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 2168, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_v_schema_capsule);
      __Pyx_GIVEREF(__pyx_v_schema_capsule);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_schema_capsule) != (0)) __PYX_ERR(4, 2168, __pyx_L1_error);
      __Pyx_INCREF(__pyx_v_array_capsule);
      __Pyx_GIVEREF(__pyx_v_array_capsule);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_array_capsule) != (0)) __PYX_ERR(4, 2168, __pyx_L1_error);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":2104
 *         return pyarrow_wrap_array(c_array)
 * 
 *     def __arrow_c_device_array__(self, requested_schema=None, **kwargs):             # <<<<<<<<<<<<<<
 *         """
 *         Get a pair of PyCapsules containing a C ArrowDeviceArray representation
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_15);
      __Pyx_XDECREF(__pyx_t_17);
      __Pyx_XDECREF(__pyx_t_18);
      __Pyx_XDECREF(__pyx_t_19);
      __Pyx_XDECREF(__pyx_t_21);
      __Pyx_AddTraceback("pyarrow.lib.Array.__arrow_c_device_array__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_non_default_kwargs);
      __Pyx_XDECREF(__pyx_v_target_type);
      __Pyx_XDECREF(__pyx_v_casted_array);
      __Pyx_XDECREF(__pyx_v_e);
      __Pyx_XDECREF(__pyx_v_schema_capsule);
      __Pyx_XDECREF(__pyx_v_array_capsule);
      __Pyx_XDECREF(__pyx_9genexpr15__pyx_v_name);
      __Pyx_XDECREF(__pyx_9genexpr15__pyx_v_value);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":2170
 *         return schema_capsule, array_capsule
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def _import_from_c_device_capsule(schema_capsule, array_capsule):
 *         cdef:
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_96_import_from_c_device_capsule(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_5Array_95_import_from_c_device_capsule, "Array._import_from_c_device_capsule(schema_capsule, array_capsule)");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_5Array_96_import_from_c_device_capsule = {"_import_from_c_device_capsule", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Array_96_import_from_c_device_capsule, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Array_95_import_from_c_device_capsule};
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_96_import_from_c_device_capsule(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_schema_capsule = 0;
      PyObject *__pyx_v_array_capsule = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[2] = {0,0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("_import_from_c_device_capsule (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_schema_capsule,&__pyx_mstate_global->__pyx_n_u_array_capsule,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(4, 2170, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(4, 2170, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 2170, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_import_from_c_device_capsule", 0) < (0)) __PYX_ERR(4, 2170, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_import_from_c_device_capsule", 1, 2, 2, i); __PYX_ERR(4, 2170, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 2)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 2170, __pyx_L3_error)
          values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(4, 2170, __pyx_L3_error)
        }
        __pyx_v_schema_capsule = values[0];
        __pyx_v_array_capsule = values[1];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("_import_from_c_device_capsule", 1, 2, 2, __pyx_nargs); __PYX_ERR(4, 2170, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.Array._import_from_c_device_capsule", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_5Array_95_import_from_c_device_capsule(__pyx_v_schema_capsule, __pyx_v_array_capsule);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_5Array_95_import_from_c_device_capsule(PyObject *__pyx_v_schema_capsule, PyObject *__pyx_v_array_capsule) {
      struct ArrowSchema *__pyx_v_c_schema;
      struct ArrowDeviceArray *__pyx_v_c_array;
      std::shared_ptr< arrow::Array>  __pyx_v_array;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      void *__pyx_t_1;
      std::shared_ptr< arrow::Array>  __pyx_t_2;
      PyObject *__pyx_t_3 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("_import_from_c_device_capsule", 0);

      /* "pyarrow/array.pxi":2177
 *             shared_ptr[CArray] array
 * 
 *         c_schema = <ArrowSchema*> PyCapsule_GetPointer(schema_capsule, 'arrow_schema')             # <<<<<<<<<<<<<<
 *         c_array = <ArrowDeviceArray*> PyCapsule_GetPointer(
 *             array_capsule, 'arrow_device_array'
*/
      __pyx_t_1 = PyCapsule_GetPointer(__pyx_v_schema_capsule, __pyx_k_arrow_schema); if (unlikely(__pyx_t_1 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(4, 2177, __pyx_L1_error)
      __pyx_v_c_schema = ((struct ArrowSchema *)__pyx_t_1);

      /* "pyarrow/array.pxi":2178
 * 
 *         c_schema = <ArrowSchema*> PyCapsule_GetPointer(schema_capsule, 'arrow_schema')
 *         c_array = <ArrowDeviceArray*> PyCapsule_GetPointer(             # <<<<<<<<<<<<<<
 *             array_capsule, 'arrow_device_array'
 *         )
*/
      __pyx_t_1 = PyCapsule_GetPointer(__pyx_v_array_capsule, __pyx_k_arrow_device_array); if (unlikely(__pyx_t_1 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(4, 2178, __pyx_L1_error)
      __pyx_v_c_array = ((struct ArrowDeviceArray *)__pyx_t_1);

      /* "pyarrow/array.pxi":2182
 *         )
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             array = GetResultValue(ImportDeviceArray(c_array, c_schema))
 * 
*/
      {
          PyThreadState * _save;
          _save = PyEval_SaveThread();
          __Pyx_FastGIL_Remember();
          /*try:*/ {

            /* "pyarrow/array.pxi":2183
 * 
 *         with nogil:
 *             array = GetResultValue(ImportDeviceArray(c_array, c_schema))             # <<<<<<<<<<<<<<
 * 
 *         return pyarrow_wrap_array(array)
*/
            __pyx_t_2 = arrow::py::GetResultValue<std::shared_ptr< arrow::Array> >(arrow::ImportDeviceArray(__pyx_v_c_array, __pyx_v_c_schema)); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(4, 2183, __pyx_L4_error)
            __pyx_v_array = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_2);
          }

          /* "pyarrow/array.pxi":2182
 *         )
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             array = GetResultValue(ImportDeviceArray(c_array, c_schema))
 * 
*/
          /*finally:*/ {
            /*normal exit:*/{
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L5;
            }
            __pyx_L4_error: {
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L1_error;
            }
            __pyx_L5:;
          }
      }

      /* "pyarrow/array.pxi":2185
 *             array = GetResultValue(ImportDeviceArray(c_array, c_schema))
 * 
 *         return pyarrow_wrap_array(array)             # <<<<<<<<<<<<<<
 * 
 *     def __dlpack__(self, stream=None):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = pyarrow_wrap_array(__pyx_v_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 2185, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":2170
 *         return schema_capsule, array_capsule
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def _import_from_c_device_capsule(schema_capsule, array_capsule):
 *         cdef:
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_AddTraceback("pyarrow.lib.Array._import_from_c_device_capsule", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":2187
 *         return pyarrow_wrap_array(array)
 * 
 *     def __dlpack__(self, stream=None):             # <<<<<<<<<<<<<<
 *         """
 *         Export a primitive array as a DLPack capsule.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_98__dlpack__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_5Array_97__dlpack__, "Array.__dlpack__(self, stream=None)\n\nExport a primitive array as a DLPack capsule.\n\nParameters\n----------\nstream : int, optional\n    A Python integer representing a pointer to a stream. Currently not supported.\n    Stream is provided by the consumer to the producer to instruct the producer\n    to ensure that operations can safely be performed on the array.\n\nReturns\n-------\ncapsule : PyCapsule\n    A DLPack capsule for the array, pointing to a DLManagedTensor.");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_5Array_98__dlpack__ = {"__dlpack__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Array_98__dlpack__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Array_97__dlpack__};
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_98__dlpack__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_stream = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__dlpack__ (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_stream,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(4, 2187, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 2187, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__dlpack__", 0) < (0)) __PYX_ERR(4, 2187, __pyx_L3_error)
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
        } else {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 2187, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
        }
        __pyx_v_stream = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("__dlpack__", 0, 0, 1, __pyx_nargs); __PYX_ERR(4, 2187, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.Array.__dlpack__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_5Array_97__dlpack__(((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_v_self), __pyx_v_stream);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_5Array_97__dlpack__(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self, PyObject *__pyx_v_stream) {
      DLManagedTensor *__pyx_v_dlm_tensor;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      int __pyx_t_1;
      DLManagedTensor *__pyx_t_2;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      size_t __pyx_t_5;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__dlpack__", 0);

      /* "pyarrow/array.pxi":2203
 *             A DLPack capsule for the array, pointing to a DLManagedTensor.
 *         """
 *         if stream is None:             # <<<<<<<<<<<<<<
 *             dlm_tensor = GetResultValue(ExportArrayToDLPack(self.sp_array))
 * 
*/
      __pyx_t_1 = (__pyx_v_stream == Py_None);
      if (likely(__pyx_t_1)) {

        /* "pyarrow/array.pxi":2204
 *         """
 *         if stream is None:
 *             dlm_tensor = GetResultValue(ExportArrayToDLPack(self.sp_array))             # <<<<<<<<<<<<<<
 * 
 *             return PyCapsule_New(dlm_tensor, 'dltensor', dlpack_pycapsule_deleter)
*/
        if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_array");
          __PYX_ERR(4, 2204, __pyx_L1_error)
        }
        __pyx_t_2 = arrow::py::GetResultValue<DLManagedTensor *>( arrow::dlpack::ExportArray(__pyx_v_self->sp_array)); if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 2204, __pyx_L1_error)
        __pyx_v_dlm_tensor = __pyx_t_2;

        /* "pyarrow/array.pxi":2206
 *             dlm_tensor = GetResultValue(ExportArrayToDLPack(self.sp_array))
 * 
 *             return PyCapsule_New(dlm_tensor, 'dltensor', dlpack_pycapsule_deleter)             # <<<<<<<<<<<<<<
 *         else:
 *             raise NotImplementedError(
*/
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = PyCapsule_New(__pyx_v_dlm_tensor, __pyx_k_dltensor, __pyx_f_7pyarrow_3lib_dlpack_pycapsule_deleter); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 2206, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_r = __pyx_t_3;
        __pyx_t_3 = 0;
        goto __pyx_L0;

        /* "pyarrow/array.pxi":2203
 *             A DLPack capsule for the array, pointing to a DLManagedTensor.
 *         """
 *         if stream is None:             # <<<<<<<<<<<<<<
 *             dlm_tensor = GetResultValue(ExportArrayToDLPack(self.sp_array))
 * 
*/
      }

      /* "pyarrow/array.pxi":2208
 *             return PyCapsule_New(dlm_tensor, 'dltensor', dlpack_pycapsule_deleter)
 *         else:
 *             raise NotImplementedError(             # <<<<<<<<<<<<<<
 *                 "Only stream=None is supported."
 *             )
*/
      /*else*/ {
        __pyx_t_4 = NULL;
        __pyx_t_5 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Only_stream_None_is_supported};
          __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_NotImplementedError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 2208, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        __Pyx_Raise(__pyx_t_3, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __PYX_ERR(4, 2208, __pyx_L1_error)
      }

      /* "pyarrow/array.pxi":2187
 *         return pyarrow_wrap_array(array)
 * 
 *     def __dlpack__(self, stream=None):             # <<<<<<<<<<<<<<
 *         """
 *         Export a primitive array as a DLPack capsule.
*/

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

    /* "pyarrow/array.pxi":2212
 *             )
 * 
 *     def __dlpack_device__(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the DLPack device tuple this arrays resides on.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_100__dlpack_device__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_5Array_99__dlpack_device__, "Array.__dlpack_device__(self)\n\nReturn the DLPack device tuple this arrays resides on.\n\nReturns\n-------\ntuple : Tuple[int, int]\n    Tuple with index specifying the type of the device (where\n    CPU = 1, see cpp/src/arrow/c/dpack_abi.h) and index of the\n    device which is 0 by default for CPU.");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_5Array_100__dlpack_device__ = {"__dlpack_device__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Array_100__dlpack_device__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Array_99__dlpack_device__};
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_100__dlpack_device__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__dlpack_device__ (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__dlpack_device__", 1, 0, 0, __pyx_nargs); return NULL; }
      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
      if (unlikely(__pyx_kwds_len < 0)) return NULL;
      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__dlpack_device__", __pyx_kwds); return NULL;}
      __pyx_r = __pyx_pf_7pyarrow_3lib_5Array_99__dlpack_device__(((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_5Array_99__dlpack_device__(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self) {
      DLDevice __pyx_v_device;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      DLDevice __pyx_t_1;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__dlpack_device__", 0);

      /* "pyarrow/array.pxi":2223
 *             device which is 0 by default for CPU.
 *         """
 *         device = GetResultValue(ExportDevice(self.sp_array))             # <<<<<<<<<<<<<<
 *         return device.device_type, device.device_id
 * 
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_array");
        __PYX_ERR(4, 2223, __pyx_L1_error)
      }
      __pyx_t_1 = arrow::py::GetResultValue<DLDevice>(arrow::dlpack::ExportDevice(__pyx_v_self->sp_array)); if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 2223, __pyx_L1_error)
      __pyx_v_device = __pyx_t_1;

      /* "pyarrow/array.pxi":2224
 *         """
 *         device = GetResultValue(ExportDevice(self.sp_array))
 *         return device.device_type, device.device_id             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = __Pyx_PyLong_From_DLDeviceType(__pyx_v_device.device_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 2224, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_PyLong_From_int32_t(__pyx_v_device.device_id); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 2224, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 2224, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_2);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2) != (0)) __PYX_ERR(4, 2224, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_3);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3) != (0)) __PYX_ERR(4, 2224, __pyx_L1_error);
      __pyx_t_2 = 0;
      __pyx_t_3 = 0;
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":2212
 *             )
 * 
 *     def __dlpack_device__(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the DLPack device tuple this arrays resides on.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_AddTraceback("pyarrow.lib.Array.__dlpack_device__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":2226
 *         return device.device_type, device.device_id
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def device_type(self):
 *         """
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_11device_type_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_11device_type_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_5Array_11device_type___get__(((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_5Array_11device_type___get__(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__get__", 0);

      /* "pyarrow/array.pxi":2235
 *         DeviceAllocationType
 *         """
 *         return _wrap_device_allocation_type(self.sp_array.get().device_type())             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
      __Pyx_XDECREF(__pyx_r);
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_array");
        __PYX_ERR(4, 2235, __pyx_L1_error)
      }
      __pyx_t_1 = __pyx_f_7pyarrow_3lib__wrap_device_allocation_type(__pyx_v_self->sp_array.get()->device_type()); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 2235, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":2226
 *         return device.device_type, device.device_id
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def device_type(self):
 *         """
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("pyarrow.lib.Array.device_type.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":2237
 *         return _wrap_device_allocation_type(self.sp_array.get().device_type())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_cpu(self):
 *         """
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_6is_cpu_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_6is_cpu_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_5Array_6is_cpu___get__(((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_v_self));

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

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

      /* "pyarrow/array.pxi":2242
 *         Whether the array is CPU-accessible.
 *         """
 *         return self.device_type == DeviceAllocationType.CPU             # <<<<<<<<<<<<<<
 * 
 *     cdef void _assert_cpu(self) except *:
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_device_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 2242, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_Enum_230530__7pyarrow_3lib_enum__dunderpyx_t_7pyarrow_3lib___etc_to_py(__pyx_e_7pyarrow_3lib_CPU); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 2242, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 2242, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":2237
 *         return _wrap_device_allocation_type(self.sp_array.get().device_type())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_cpu(self):
 *         """
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_AddTraceback("pyarrow.lib.Array.is_cpu.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":2244
 *         return self.device_type == DeviceAllocationType.CPU
 * 
 *     cdef void _assert_cpu(self) except *:             # <<<<<<<<<<<<<<
 *         if self.sp_array.get().device_type() != CDeviceAllocationType_kCPU:
 *             raise NotImplementedError("Implemented only for data on CPU device")
*/

    static void __pyx_f_7pyarrow_3lib_5Array__assert_cpu(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self) {
      __Pyx_RefNannyDeclarations
      int __pyx_t_1;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      size_t __pyx_t_4;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("_assert_cpu", 0);

      /* "pyarrow/array.pxi":2245
 * 
 *     cdef void _assert_cpu(self) except *:
 *         if self.sp_array.get().device_type() != CDeviceAllocationType_kCPU:             # <<<<<<<<<<<<<<
 *             raise NotImplementedError("Implemented only for data on CPU device")
 * 
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_array");
        __PYX_ERR(4, 2245, __pyx_L1_error)
      }
      __pyx_t_1 = (__pyx_v_self->sp_array.get()->device_type() != arrow::DeviceAllocationType::kCPU);
      if (unlikely(__pyx_t_1)) {

        /* "pyarrow/array.pxi":2246
 *     cdef void _assert_cpu(self) except *:
 *         if self.sp_array.get().device_type() != CDeviceAllocationType_kCPU:
 *             raise NotImplementedError("Implemented only for data on CPU device")             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
        __pyx_t_3 = NULL;
        __pyx_t_4 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Implemented_only_for_data_on_CPU};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_NotImplementedError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 2246, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __Pyx_Raise(__pyx_t_2, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __PYX_ERR(4, 2246, __pyx_L1_error)

        /* "pyarrow/array.pxi":2245
 * 
 *     cdef void _assert_cpu(self) except *:
 *         if self.sp_array.get().device_type() != CDeviceAllocationType_kCPU:             # <<<<<<<<<<<<<<
 *             raise NotImplementedError("Implemented only for data on CPU device")
 * 
*/
      }

      /* "pyarrow/array.pxi":2244
 *         return self.device_type == DeviceAllocationType.CPU
 * 
 *     cdef void _assert_cpu(self) except *:             # <<<<<<<<<<<<<<
 *         if self.sp_array.get().device_type() != CDeviceAllocationType_kCPU:
 *             raise NotImplementedError("Implemented only for data on CPU device")
*/

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_AddTraceback("pyarrow.lib.Array._assert_cpu", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_L0:;
      __Pyx_RefNannyFinishContext();
    }

    /* "pyarrow/array.pxi":2248
 *             raise NotImplementedError("Implemented only for data on CPU device")
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def statistics(self):
 *         """
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_10statistics_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_10statistics_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_5Array_10statistics___get__(((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_5Array_10statistics___get__(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self) {
      struct __pyx_obj_7pyarrow_3lib_ArrayStatistics *__pyx_v_stat = 0;
      std::shared_ptr< arrow::ArrayStatistics>  __pyx_v_sp_stat;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      int __pyx_t_1;
      PyObject *__pyx_t_2 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__get__", 0);

      /* "pyarrow/array.pxi":2254
 *         """
 *         cdef ArrayStatistics stat
 *         sp_stat = self.sp_array.get().statistics()             # <<<<<<<<<<<<<<
 *         if sp_stat.get() == nullptr:
 *             return None
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_array");
        __PYX_ERR(4, 2254, __pyx_L1_error)
      }
      __pyx_v_sp_stat = __pyx_v_self->sp_array.get()->statistics();

      /* "pyarrow/array.pxi":2255
 *         cdef ArrayStatistics stat
 *         sp_stat = self.sp_array.get().statistics()
 *         if sp_stat.get() == nullptr:             # <<<<<<<<<<<<<<
 *             return None
 *         else:
*/
      __pyx_t_1 = (__pyx_v_sp_stat.get() == nullptr);
      if (__pyx_t_1) {

        /* "pyarrow/array.pxi":2256
 *         sp_stat = self.sp_array.get().statistics()
 *         if sp_stat.get() == nullptr:
 *             return None             # <<<<<<<<<<<<<<
 *         else:
 *             stat = ArrayStatistics.__new__(ArrayStatistics)
*/
        __Pyx_XDECREF(__pyx_r);
        __pyx_r = Py_None; __Pyx_INCREF(Py_None);
        goto __pyx_L0;

        /* "pyarrow/array.pxi":2255
 *         cdef ArrayStatistics stat
 *         sp_stat = self.sp_array.get().statistics()
 *         if sp_stat.get() == nullptr:             # <<<<<<<<<<<<<<
 *             return None
 *         else:
*/
      }

      /* "pyarrow/array.pxi":2258
 *             return None
 *         else:
 *             stat = ArrayStatistics.__new__(ArrayStatistics)             # <<<<<<<<<<<<<<
 *             stat.init(sp_stat)
 *             return stat
*/
      /*else*/ {
        __pyx_t_2 = ((PyObject *)__pyx_tp_new_7pyarrow_3lib_ArrayStatistics(((PyTypeObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ArrayStatistics), __pyx_mstate_global->__pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 2258, __pyx_L1_error)
        __Pyx_GOTREF((PyObject *)__pyx_t_2);
        __pyx_v_stat = ((struct __pyx_obj_7pyarrow_3lib_ArrayStatistics *)__pyx_t_2);
        __pyx_t_2 = 0;

        /* "pyarrow/array.pxi":2259
 *         else:
 *             stat = ArrayStatistics.__new__(ArrayStatistics)
 *             stat.init(sp_stat)             # <<<<<<<<<<<<<<
 *             return stat
 * 
*/
        if (unlikely(((PyObject *)__pyx_v_stat) == Py_None)) {
          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "init");
          __PYX_ERR(4, 2259, __pyx_L1_error)
        }
        ((struct __pyx_vtabstruct_7pyarrow_3lib_ArrayStatistics *)__pyx_v_stat->__pyx_vtab)->init(__pyx_v_stat, __pyx_v_sp_stat); if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 2259, __pyx_L1_error)

        /* "pyarrow/array.pxi":2260
 *             stat = ArrayStatistics.__new__(ArrayStatistics)
 *             stat.init(sp_stat)
 *             return stat             # <<<<<<<<<<<<<<
 * 
 * 
*/
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF((PyObject *)__pyx_v_stat);
        __pyx_r = ((PyObject *)__pyx_v_stat);
        goto __pyx_L0;
      }

      /* "pyarrow/array.pxi":2248
 *             raise NotImplementedError("Implemented only for data on CPU device")
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def statistics(self):
 *         """
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_AddTraceback("pyarrow.lib.Array.statistics.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF((PyObject *)__pyx_v_stat);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/lib.pxd":287
 * 
 *     cdef readonly:
 *         DataType type             # <<<<<<<<<<<<<<
 *         # To allow Table to propagate metadata to pandas.Series
 *         object _name
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_4type_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_4type_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_5Array_4type___get__(((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_5Array_4type___get__(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__get__", 0);
      __Pyx_XDECREF(__pyx_r);
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "type");
        __PYX_ERR(15, 287, __pyx_L1_error)
      }
      __Pyx_INCREF((PyObject *)__pyx_v_self->type);
      __pyx_r = ((PyObject *)__pyx_v_self->type);
      goto __pyx_L0;

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_AddTraceback("pyarrow.lib.Array.type.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/lib.pxd":289
 *         DataType type
 *         # To allow Table to propagate metadata to pandas.Series
 *         object _name             # <<<<<<<<<<<<<<
 * 
 *     cdef void init(self, const shared_ptr[CArray]& sp_array) except *
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_5_name_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_5Array_5_name_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_5Array_5_name___get__(((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_5Array_5_name___get__(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__get__", 0);
      __Pyx_XDECREF(__pyx_r);
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_name");
        __PYX_ERR(15, 289, __pyx_L1_error)
      }
      __Pyx_INCREF(__pyx_v_self->_name);
      __pyx_r = __pyx_v_self->_name;
      goto __pyx_L0;

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_AddTraceback("pyarrow.lib.Array._name.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":2263
 * 
 * 
 * cdef _array_like_to_pandas(obj, options, types_mapper):             # <<<<<<<<<<<<<<
 *     cdef:
 *         PyObject* out
*/

    static PyObject *__pyx_f_7pyarrow_3lib__array_like_to_pandas(PyObject *__pyx_v_obj, PyObject *__pyx_v_options, PyObject *__pyx_v_types_mapper) {
      PyObject *__pyx_v_out;
      arrow::py::PandasOptions __pyx_v_c_options;
      PyObject *__pyx_v_original_type = NULL;
      PyObject *__pyx_v_name = NULL;
      PyObject *__pyx_v_dtype = NULL;
      PyObject *__pyx_v_arr = NULL;
      PyObject *__pyx_v_result = NULL;
      PyObject *__pyx_v_make_tz_aware = NULL;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      arrow::py::PandasOptions __pyx_t_2;
      int __pyx_t_3;
      PyObject *__pyx_t_4 = NULL;
      PyObject *__pyx_t_5 = NULL;
      size_t __pyx_t_6;
      PyObject *__pyx_t_7 = NULL;
      PyObject *__pyx_t_8 = NULL;
      PyObject *__pyx_t_9 = NULL;
      int __pyx_t_10;
      int __pyx_t_11;
      Py_ssize_t __pyx_t_12;
      PyObject *__pyx_t_13 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("_array_like_to_pandas", 0);

      /* "pyarrow/array.pxi":2266
 *     cdef:
 *         PyObject* out
 *         PandasOptions c_options = _convert_pandas_options(options)             # <<<<<<<<<<<<<<
 * 
 *     original_type = obj.type
*/
      __pyx_t_1 = __pyx_v_options;
      __Pyx_INCREF(__pyx_t_1);
      if (!(likely(PyDict_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("dict", __pyx_t_1))) __PYX_ERR(4, 2266, __pyx_L1_error)
      __pyx_t_2 = __pyx_f_7pyarrow_3lib__convert_pandas_options(((PyObject*)__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 2266, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_v_c_options = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_2);

      /* "pyarrow/array.pxi":2268
 *         PandasOptions c_options = _convert_pandas_options(options)
 * 
 *     original_type = obj.type             # <<<<<<<<<<<<<<
 *     name = obj._name
 *     dtype = None
*/
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_mstate_global->__pyx_n_u_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 2268, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_v_original_type = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "pyarrow/array.pxi":2269
 * 
 *     original_type = obj.type
 *     name = obj._name             # <<<<<<<<<<<<<<
 *     dtype = None
 * 
*/
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_mstate_global->__pyx_n_u_name_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 2269, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_v_name = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "pyarrow/array.pxi":2270
 *     original_type = obj.type
 *     name = obj._name
 *     dtype = None             # <<<<<<<<<<<<<<
 * 
 *     if types_mapper:
*/
      __Pyx_INCREF(Py_None);
      __pyx_v_dtype = Py_None;

      /* "pyarrow/array.pxi":2272
 *     dtype = None
 * 
 *     if types_mapper:             # <<<<<<<<<<<<<<
 *         dtype = types_mapper(original_type)
 *     elif original_type.id == _Type_EXTENSION:
*/
      __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_types_mapper); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(4, 2272, __pyx_L1_error)
      if (__pyx_t_3) {

        /* "pyarrow/array.pxi":2273
 * 
 *     if types_mapper:
 *         dtype = types_mapper(original_type)             # <<<<<<<<<<<<<<
 *     elif original_type.id == _Type_EXTENSION:
 *         try:
*/
        __pyx_t_4 = NULL;
        __Pyx_INCREF(__pyx_v_types_mapper);
        __pyx_t_5 = __pyx_v_types_mapper; 
        __pyx_t_6 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
          assert(__pyx_t_4);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
          __pyx_t_6 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_original_type};
          __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 2273, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
        }
        __Pyx_DECREF_SET(__pyx_v_dtype, __pyx_t_1);
        __pyx_t_1 = 0;

        /* "pyarrow/array.pxi":2272
 *     dtype = None
 * 
 *     if types_mapper:             # <<<<<<<<<<<<<<
 *         dtype = types_mapper(original_type)
 *     elif original_type.id == _Type_EXTENSION:
*/
        goto __pyx_L3;
      }

      /* "pyarrow/array.pxi":2274
 *     if types_mapper:
 *         dtype = types_mapper(original_type)
 *     elif original_type.id == _Type_EXTENSION:             # <<<<<<<<<<<<<<
 *         try:
 *             dtype = original_type.to_pandas_dtype()
*/
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_original_type, __pyx_mstate_global->__pyx_n_u_id); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 2274, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_5 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::EXTENSION); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 2274, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 2274, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(4, 2274, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (__pyx_t_3) {

        /* "pyarrow/array.pxi":2275
 *         dtype = types_mapper(original_type)
 *     elif original_type.id == _Type_EXTENSION:
 *         try:             # <<<<<<<<<<<<<<
 *             dtype = original_type.to_pandas_dtype()
 *         except NotImplementedError:
*/
        {
          __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:*/ {

            /* "pyarrow/array.pxi":2276
 *     elif original_type.id == _Type_EXTENSION:
 *         try:
 *             dtype = original_type.to_pandas_dtype()             # <<<<<<<<<<<<<<
 *         except NotImplementedError:
 *             pass
*/
            __pyx_t_5 = __pyx_v_original_type;
            __Pyx_INCREF(__pyx_t_5);
            __pyx_t_6 = 0;
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
              __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_to_pandas_dtype_2, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
              __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
              if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 2276, __pyx_L4_error)
              __Pyx_GOTREF(__pyx_t_4);
            }
            __Pyx_DECREF_SET(__pyx_v_dtype, __pyx_t_4);
            __pyx_t_4 = 0;

            /* "pyarrow/array.pxi":2275
 *         dtype = types_mapper(original_type)
 *     elif original_type.id == _Type_EXTENSION:
 *         try:             # <<<<<<<<<<<<<<
 *             dtype = original_type.to_pandas_dtype()
 *         except NotImplementedError:
*/
          }
          __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_L9_try_end;
          __pyx_L4_error:;
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

          /* "pyarrow/array.pxi":2277
 *         try:
 *             dtype = original_type.to_pandas_dtype()
 *         except NotImplementedError:             # <<<<<<<<<<<<<<
 *             pass
 * 
*/
          __pyx_t_10 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_NotImplementedError))));
          if (__pyx_t_10) {
            __Pyx_ErrRestore(0,0,0);
            goto __pyx_L5_exception_handled;
          }
          goto __pyx_L6_except_error;

          /* "pyarrow/array.pxi":2275
 *         dtype = types_mapper(original_type)
 *     elif original_type.id == _Type_EXTENSION:
 *         try:             # <<<<<<<<<<<<<<
 *             dtype = original_type.to_pandas_dtype()
 *         except NotImplementedError:
*/
          __pyx_L6_except_error:;
          __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_L5_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_L9_try_end:;
        }

        /* "pyarrow/array.pxi":2274
 *     if types_mapper:
 *         dtype = types_mapper(original_type)
 *     elif original_type.id == _Type_EXTENSION:             # <<<<<<<<<<<<<<
 *         try:
 *             dtype = original_type.to_pandas_dtype()
*/
      }
      __pyx_L3:;

      /* "pyarrow/array.pxi":2282
 *     # Only call __from_arrow__ for Arrow extension types or when explicitly
 *     # overridden via types_mapper
 *     if hasattr(dtype, '__from_arrow__'):             # <<<<<<<<<<<<<<
 *         arr = dtype.__from_arrow__(obj)
 *         return pandas_api.series(arr, name=name, copy=False)
*/
      __pyx_t_3 = __Pyx_HasAttr(__pyx_v_dtype, __pyx_mstate_global->__pyx_n_u_from_arrow); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(4, 2282, __pyx_L1_error)
      if (__pyx_t_3) {

        /* "pyarrow/array.pxi":2283
 *     # overridden via types_mapper
 *     if hasattr(dtype, '__from_arrow__'):
 *         arr = dtype.__from_arrow__(obj)             # <<<<<<<<<<<<<<
 *         return pandas_api.series(arr, name=name, copy=False)
 * 
*/
        __pyx_t_5 = __pyx_v_dtype;
        __Pyx_INCREF(__pyx_t_5);
        __pyx_t_6 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_obj};
          __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_from_arrow, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 2283, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
        }
        __pyx_v_arr = __pyx_t_4;
        __pyx_t_4 = 0;

        /* "pyarrow/array.pxi":2284
 *     if hasattr(dtype, '__from_arrow__'):
 *         arr = dtype.__from_arrow__(obj)
 *         return pandas_api.series(arr, name=name, copy=False)             # <<<<<<<<<<<<<<
 * 
 *     if pandas_api.is_v1():
*/
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_5 = ((PyObject *)__pyx_v_7pyarrow_3lib_pandas_api);
        __Pyx_INCREF(__pyx_t_5);
        __pyx_t_6 = 0;
        {
          PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_5, __pyx_v_arr};
          __pyx_t_1 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 2284, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_v_name, __pyx_t_1, __pyx_callargs+2, 0) < (0)) __PYX_ERR(4, 2284, __pyx_L1_error)
          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_copy, Py_False, __pyx_t_1, __pyx_callargs+2, 1) < (0)) __PYX_ERR(4, 2284, __pyx_L1_error)
          __pyx_t_4 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_series, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_1);
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 2284, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
        }
        __pyx_r = __pyx_t_4;
        __pyx_t_4 = 0;
        goto __pyx_L0;

        /* "pyarrow/array.pxi":2282
 *     # Only call __from_arrow__ for Arrow extension types or when explicitly
 *     # overridden via types_mapper
 *     if hasattr(dtype, '__from_arrow__'):             # <<<<<<<<<<<<<<
 *         arr = dtype.__from_arrow__(obj)
 *         return pandas_api.series(arr, name=name, copy=False)
*/
      }

      /* "pyarrow/array.pxi":2286
 *         return pandas_api.series(arr, name=name, copy=False)
 * 
 *     if pandas_api.is_v1():             # <<<<<<<<<<<<<<
 *         # ARROW-3789: Coerce date/timestamp types to datetime64[ns]
 *         c_options.coerce_temporal_nanoseconds = True
*/
      __pyx_t_1 = ((PyObject *)__pyx_v_7pyarrow_3lib_pandas_api);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_6 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
        __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_is_v1, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 2286, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
      }
      __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(4, 2286, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (__pyx_t_3) {

        /* "pyarrow/array.pxi":2288
 *     if pandas_api.is_v1():
 *         # ARROW-3789: Coerce date/timestamp types to datetime64[ns]
 *         c_options.coerce_temporal_nanoseconds = True             # <<<<<<<<<<<<<<
 * 
 *     if isinstance(obj, Array):
*/
        __pyx_v_c_options.coerce_temporal_nanoseconds = 1;

        /* "pyarrow/array.pxi":2286
 *         return pandas_api.series(arr, name=name, copy=False)
 * 
 *     if pandas_api.is_v1():             # <<<<<<<<<<<<<<
 *         # ARROW-3789: Coerce date/timestamp types to datetime64[ns]
 *         c_options.coerce_temporal_nanoseconds = True
*/
      }

      /* "pyarrow/array.pxi":2290
 *         c_options.coerce_temporal_nanoseconds = True
 * 
 *     if isinstance(obj, Array):             # <<<<<<<<<<<<<<
 *         with nogil:
 *             check_status(ConvertArrayToPandas(c_options,
*/
      __pyx_t_3 = __Pyx_TypeCheck(__pyx_v_obj, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array); 
      if (__pyx_t_3) {

        /* "pyarrow/array.pxi":2291
 * 
 *     if isinstance(obj, Array):
 *         with nogil:             # <<<<<<<<<<<<<<
 *             check_status(ConvertArrayToPandas(c_options,
 *                                               (<Array> obj).sp_array,
*/
        {
            PyThreadState * _save;
            _save = PyEval_SaveThread();
            __Pyx_FastGIL_Remember();
            /*try:*/ {

              /* "pyarrow/array.pxi":2293
 *         with nogil:
 *             check_status(ConvertArrayToPandas(c_options,
 *                                               (<Array> obj).sp_array,             # <<<<<<<<<<<<<<
 *                                               obj, &out))
 *     elif isinstance(obj, ChunkedArray):
*/
              if (unlikely(__pyx_v_obj == Py_None)) {
                PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_array");
                __Pyx_PyGILState_Release(__pyx_gilstate_save);
                __PYX_ERR(4, 2293, __pyx_L16_error)
              }

              /* "pyarrow/array.pxi":2292
 *     if isinstance(obj, Array):
 *         with nogil:
 *             check_status(ConvertArrayToPandas(c_options,             # <<<<<<<<<<<<<<
 *                                               (<Array> obj).sp_array,
 *                                               obj, &out))
*/
              __pyx_t_10 = __pyx_f_7pyarrow_3lib_check_status(arrow::py::ConvertArrayToPandas(__pyx_v_c_options, ((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_v_obj)->sp_array, __pyx_v_obj, (&__pyx_v_out))); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(4, 2292, __pyx_L16_error)
            }

            /* "pyarrow/array.pxi":2291
 * 
 *     if isinstance(obj, Array):
 *         with nogil:             # <<<<<<<<<<<<<<
 *             check_status(ConvertArrayToPandas(c_options,
 *                                               (<Array> obj).sp_array,
*/
            /*finally:*/ {
              /*normal exit:*/{
                __Pyx_FastGIL_Forget();
                PyEval_RestoreThread(_save);
                goto __pyx_L17;
              }
              __pyx_L16_error: {
                __Pyx_FastGIL_Forget();
                PyEval_RestoreThread(_save);
                goto __pyx_L1_error;
              }
              __pyx_L17:;
            }
        }

        /* "pyarrow/array.pxi":2290
 *         c_options.coerce_temporal_nanoseconds = True
 * 
 *     if isinstance(obj, Array):             # <<<<<<<<<<<<<<
 *         with nogil:
 *             check_status(ConvertArrayToPandas(c_options,
*/
        goto __pyx_L14;
      }

      /* "pyarrow/array.pxi":2295
 *                                               (<Array> obj).sp_array,
 *                                               obj, &out))
 *     elif isinstance(obj, ChunkedArray):             # <<<<<<<<<<<<<<
 *         with nogil:
 *             check_status(libarrow_python.ConvertChunkedArrayToPandas(
*/
      __pyx_t_3 = __Pyx_TypeCheck(__pyx_v_obj, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ChunkedArray); 
      if (__pyx_t_3) {

        /* "pyarrow/array.pxi":2296
 *                                               obj, &out))
 *     elif isinstance(obj, ChunkedArray):
 *         with nogil:             # <<<<<<<<<<<<<<
 *             check_status(libarrow_python.ConvertChunkedArrayToPandas(
 *                 c_options,
*/
        {
            PyThreadState * _save;
            _save = PyEval_SaveThread();
            __Pyx_FastGIL_Remember();
            /*try:*/ {

              /* "pyarrow/array.pxi":2299
 *             check_status(libarrow_python.ConvertChunkedArrayToPandas(
 *                 c_options,
 *                 (<ChunkedArray> obj).sp_chunked_array,             # <<<<<<<<<<<<<<
 *                 obj, &out))
 * 
*/
              if (unlikely(__pyx_v_obj == Py_None)) {
                PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_chunked_array");
                __Pyx_PyGILState_Release(__pyx_gilstate_save);
                __PYX_ERR(4, 2299, __pyx_L19_error)
              }

              /* "pyarrow/array.pxi":2297
 *     elif isinstance(obj, ChunkedArray):
 *         with nogil:
 *             check_status(libarrow_python.ConvertChunkedArrayToPandas(             # <<<<<<<<<<<<<<
 *                 c_options,
 *                 (<ChunkedArray> obj).sp_chunked_array,
*/
              __pyx_t_10 = __pyx_f_7pyarrow_3lib_check_status(arrow::py::ConvertChunkedArrayToPandas(__pyx_v_c_options, ((struct __pyx_obj_7pyarrow_3lib_ChunkedArray *)__pyx_v_obj)->sp_chunked_array, __pyx_v_obj, (&__pyx_v_out))); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(4, 2297, __pyx_L19_error)
            }

            /* "pyarrow/array.pxi":2296
 *                                               obj, &out))
 *     elif isinstance(obj, ChunkedArray):
 *         with nogil:             # <<<<<<<<<<<<<<
 *             check_status(libarrow_python.ConvertChunkedArrayToPandas(
 *                 c_options,
*/
            /*finally:*/ {
              /*normal exit:*/{
                __Pyx_FastGIL_Forget();
                PyEval_RestoreThread(_save);
                goto __pyx_L20;
              }
              __pyx_L19_error: {
                __Pyx_FastGIL_Forget();
                PyEval_RestoreThread(_save);
                goto __pyx_L1_error;
              }
              __pyx_L20:;
            }
        }

        /* "pyarrow/array.pxi":2295
 *                                               (<Array> obj).sp_array,
 *                                               obj, &out))
 *     elif isinstance(obj, ChunkedArray):             # <<<<<<<<<<<<<<
 *         with nogil:
 *             check_status(libarrow_python.ConvertChunkedArrayToPandas(
*/
      }
      __pyx_L14:;

      /* "pyarrow/array.pxi":2302
 *                 obj, &out))
 * 
 *     arr = wrap_array_output(out)             # <<<<<<<<<<<<<<
 * 
 *     if (isinstance(original_type, TimestampType) and
*/
      __pyx_t_4 = __pyx_f_7pyarrow_3lib_wrap_array_output(__pyx_v_out); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 2302, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_v_arr = __pyx_t_4;
      __pyx_t_4 = 0;

      /* "pyarrow/array.pxi":2304
 *     arr = wrap_array_output(out)
 * 
 *     if (isinstance(original_type, TimestampType) and             # <<<<<<<<<<<<<<
 *             options["timestamp_as_object"]):
 *         # ARROW-5359 - need to specify object dtype to avoid pandas to
*/
      __pyx_t_11 = __Pyx_TypeCheck(__pyx_v_original_type, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_TimestampType); 
      if (__pyx_t_11) {
      } else {
        __pyx_t_3 = __pyx_t_11;
        goto __pyx_L22_bool_binop_done;
      }

      /* "pyarrow/array.pxi":2305
 * 
 *     if (isinstance(original_type, TimestampType) and
 *             options["timestamp_as_object"]):             # <<<<<<<<<<<<<<
 *         # ARROW-5359 - need to specify object dtype to avoid pandas to
 *         # coerce back to ns resolution
*/
      if (unlikely(__pyx_v_options == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(4, 2305, __pyx_L1_error)
      }
      __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_options, __pyx_mstate_global->__pyx_n_u_timestamp_as_object); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 2305, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(4, 2305, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_3 = __pyx_t_11;
      __pyx_L22_bool_binop_done:;

      /* "pyarrow/array.pxi":2304
 *     arr = wrap_array_output(out)
 * 
 *     if (isinstance(original_type, TimestampType) and             # <<<<<<<<<<<<<<
 *             options["timestamp_as_object"]):
 *         # ARROW-5359 - need to specify object dtype to avoid pandas to
*/
      if (__pyx_t_3) {

        /* "pyarrow/array.pxi":2308
 *         # ARROW-5359 - need to specify object dtype to avoid pandas to
 *         # coerce back to ns resolution
 *         dtype = "object"             # <<<<<<<<<<<<<<
 *     elif types_mapper:
 *         dtype = types_mapper(original_type)
*/
        __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_object);
        __Pyx_DECREF_SET(__pyx_v_dtype, __pyx_mstate_global->__pyx_n_u_object);

        /* "pyarrow/array.pxi":2304
 *     arr = wrap_array_output(out)
 * 
 *     if (isinstance(original_type, TimestampType) and             # <<<<<<<<<<<<<<
 *             options["timestamp_as_object"]):
 *         # ARROW-5359 - need to specify object dtype to avoid pandas to
*/
        goto __pyx_L21;
      }

      /* "pyarrow/array.pxi":2309
 *         # coerce back to ns resolution
 *         dtype = "object"
 *     elif types_mapper:             # <<<<<<<<<<<<<<
 *         dtype = types_mapper(original_type)
 *     else:
*/
      __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_types_mapper); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(4, 2309, __pyx_L1_error)
      if (__pyx_t_3) {

        /* "pyarrow/array.pxi":2310
 *         dtype = "object"
 *     elif types_mapper:
 *         dtype = types_mapper(original_type)             # <<<<<<<<<<<<<<
 *     else:
 *         dtype = None
*/
        __pyx_t_1 = NULL;
        __Pyx_INCREF(__pyx_v_types_mapper);
        __pyx_t_5 = __pyx_v_types_mapper; 
        __pyx_t_6 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_5);
          assert(__pyx_t_1);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_1);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
          __pyx_t_6 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_original_type};
          __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 2310, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
        }
        __Pyx_DECREF_SET(__pyx_v_dtype, __pyx_t_4);
        __pyx_t_4 = 0;

        /* "pyarrow/array.pxi":2309
 *         # coerce back to ns resolution
 *         dtype = "object"
 *     elif types_mapper:             # <<<<<<<<<<<<<<
 *         dtype = types_mapper(original_type)
 *     else:
*/
        goto __pyx_L21;
      }

      /* "pyarrow/array.pxi":2312
 *         dtype = types_mapper(original_type)
 *     else:
 *         dtype = None             # <<<<<<<<<<<<<<
 * 
 *     result = pandas_api.series(arr, dtype=dtype, name=name, copy=False)
*/
      /*else*/ {
        __Pyx_INCREF(Py_None);
        __Pyx_DECREF_SET(__pyx_v_dtype, Py_None);
      }
      __pyx_L21:;

      /* "pyarrow/array.pxi":2314
 *         dtype = None
 * 
 *     result = pandas_api.series(arr, dtype=dtype, name=name, copy=False)             # <<<<<<<<<<<<<<
 * 
 *     if (isinstance(original_type, TimestampType) and
*/
      __pyx_t_5 = ((PyObject *)__pyx_v_7pyarrow_3lib_pandas_api);
      __Pyx_INCREF(__pyx_t_5);
      __pyx_t_6 = 0;
      {
        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 3 : 0)] = {__pyx_t_5, __pyx_v_arr};
        __pyx_t_1 = __Pyx_MakeVectorcallBuilderKwds(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 2314, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_dtype, __pyx_v_dtype, __pyx_t_1, __pyx_callargs+2, 0) < (0)) __PYX_ERR(4, 2314, __pyx_L1_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_v_name, __pyx_t_1, __pyx_callargs+2, 1) < (0)) __PYX_ERR(4, 2314, __pyx_L1_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_copy, Py_False, __pyx_t_1, __pyx_callargs+2, 2) < (0)) __PYX_ERR(4, 2314, __pyx_L1_error)
        __pyx_t_4 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_series, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_1);
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 2314, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
      }
      __pyx_v_result = __pyx_t_4;
      __pyx_t_4 = 0;

      /* "pyarrow/array.pxi":2316
 *     result = pandas_api.series(arr, dtype=dtype, name=name, copy=False)
 * 
 *     if (isinstance(original_type, TimestampType) and             # <<<<<<<<<<<<<<
 *             original_type.tz is not None and
 *             # can be object dtype for non-ns and timestamp_as_object=True
*/
      __pyx_t_11 = __Pyx_TypeCheck(__pyx_v_original_type, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_TimestampType); 
      if (__pyx_t_11) {
      } else {
        __pyx_t_3 = __pyx_t_11;
        goto __pyx_L25_bool_binop_done;
      }

      /* "pyarrow/array.pxi":2317
 * 
 *     if (isinstance(original_type, TimestampType) and
 *             original_type.tz is not None and             # <<<<<<<<<<<<<<
 *             # can be object dtype for non-ns and timestamp_as_object=True
 *             result.dtype.kind == "M"):
*/
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_original_type, __pyx_mstate_global->__pyx_n_u_tz); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 2317, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_11 = (__pyx_t_4 != Py_None);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (__pyx_t_11) {
      } else {
        __pyx_t_3 = __pyx_t_11;
        goto __pyx_L25_bool_binop_done;
      }

      /* "pyarrow/array.pxi":2319
 *             original_type.tz is not None and
 *             # can be object dtype for non-ns and timestamp_as_object=True
 *             result.dtype.kind == "M"):             # <<<<<<<<<<<<<<
 *         from pyarrow.pandas_compat import make_tz_aware
 *         result = make_tz_aware(result, original_type.tz)
*/
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_result, __pyx_mstate_global->__pyx_n_u_dtype); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 2319, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_kind); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 2319, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_11 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_M, Py_EQ)); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(4, 2319, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_3 = __pyx_t_11;
      __pyx_L25_bool_binop_done:;

      /* "pyarrow/array.pxi":2316
 *     result = pandas_api.series(arr, dtype=dtype, name=name, copy=False)
 * 
 *     if (isinstance(original_type, TimestampType) and             # <<<<<<<<<<<<<<
 *             original_type.tz is not None and
 *             # can be object dtype for non-ns and timestamp_as_object=True
*/
      if (__pyx_t_3) {

        /* "pyarrow/array.pxi":2320
 *             # can be object dtype for non-ns and timestamp_as_object=True
 *             result.dtype.kind == "M"):
 *         from pyarrow.pandas_compat import make_tz_aware             # <<<<<<<<<<<<<<
 *         result = make_tz_aware(result, original_type.tz)
 * 
*/
        {
          PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_make_tz_aware};
          __pyx_t_9 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_pyarrow_pandas_compat, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(4, 2320, __pyx_L1_error)
        }
        __pyx_t_1 = __pyx_t_9;
        __Pyx_GOTREF(__pyx_t_1);
        {
          PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_make_tz_aware};
          __pyx_t_12 = 0; {
            __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_1, __pyx_imported_names[__pyx_t_12]); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 2320, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            switch (__pyx_t_12) {
              case 0:
              __Pyx_INCREF(__pyx_t_4);
              __pyx_v_make_tz_aware = __pyx_t_4;
              break;
              default:;
            }
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          }
        }
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

        /* "pyarrow/array.pxi":2321
 *             result.dtype.kind == "M"):
 *         from pyarrow.pandas_compat import make_tz_aware
 *         result = make_tz_aware(result, original_type.tz)             # <<<<<<<<<<<<<<
 * 
 *     return result
*/
        __pyx_t_4 = NULL;
        __Pyx_INCREF(__pyx_v_make_tz_aware);
        __pyx_t_5 = __pyx_v_make_tz_aware; 
        __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_original_type, __pyx_mstate_global->__pyx_n_u_tz); if (unlikely(!__pyx_t_13)) __PYX_ERR(4, 2321, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        __pyx_t_6 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
          assert(__pyx_t_4);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
          __pyx_t_6 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_v_result, __pyx_t_13};
          __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 2321, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
        }
        __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_1);
        __pyx_t_1 = 0;

        /* "pyarrow/array.pxi":2316
 *     result = pandas_api.series(arr, dtype=dtype, name=name, copy=False)
 * 
 *     if (isinstance(original_type, TimestampType) and             # <<<<<<<<<<<<<<
 *             original_type.tz is not None and
 *             # can be object dtype for non-ns and timestamp_as_object=True
*/
      }

      /* "pyarrow/array.pxi":2323
 *         result = make_tz_aware(result, original_type.tz)
 * 
 *     return result             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_result);
      __pyx_r = __pyx_v_result;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":2263
 * 
 * 
 * cdef _array_like_to_pandas(obj, options, types_mapper):             # <<<<<<<<<<<<<<
 *     cdef:
 *         PyObject* out
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_13);
      __Pyx_AddTraceback("pyarrow.lib._array_like_to_pandas", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = 0;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_original_type);
      __Pyx_XDECREF(__pyx_v_name);
      __Pyx_XDECREF(__pyx_v_dtype);
      __Pyx_XDECREF(__pyx_v_arr);
      __Pyx_XDECREF(__pyx_v_result);
      __Pyx_XDECREF(__pyx_v_make_tz_aware);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":2326
 * 
 * 
 * cdef wrap_array_output(PyObject* output):             # <<<<<<<<<<<<<<
 *     cdef object obj = PyObject_to_object(output)
 * 
*/

    static PyObject *__pyx_f_7pyarrow_3lib_wrap_array_output(PyObject *__pyx_v_output) {
      PyObject *__pyx_v_obj = 0;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_t_2;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      PyObject *__pyx_t_5 = NULL;
      PyObject *__pyx_t_6 = NULL;
      PyObject *__pyx_t_7 = NULL;
      size_t __pyx_t_8;
      PyObject *__pyx_t_9 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("wrap_array_output", 0);

      /* "pyarrow/array.pxi":2327
 * 
 * cdef wrap_array_output(PyObject* output):
 *     cdef object obj = PyObject_to_object(output)             # <<<<<<<<<<<<<<
 * 
 *     if isinstance(obj, dict):
*/
      __pyx_t_1 = __pyx_f_7pyarrow_8includes_6common_PyObject_to_object(__pyx_v_output); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 2327, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_v_obj = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "pyarrow/array.pxi":2329
 *     cdef object obj = PyObject_to_object(output)
 * 
 *     if isinstance(obj, dict):             # <<<<<<<<<<<<<<
 *         return _pandas_api.categorical_type.from_codes(
 *             obj['indices'], categories=obj['dictionary'], ordered=obj['ordered']
*/
      __pyx_t_2 = PyDict_Check(__pyx_v_obj); 
      if (__pyx_t_2) {

        /* "pyarrow/array.pxi":2330
 * 
 *     if isinstance(obj, dict):
 *         return _pandas_api.categorical_type.from_codes(             # <<<<<<<<<<<<<<
 *             obj['indices'], categories=obj['dictionary'], ordered=obj['ordered']
 *         )
*/
        __Pyx_XDECREF(__pyx_r);
        __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_pandas_api); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 2330, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_categorical_type); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 2330, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_3 = __pyx_t_5;
        __Pyx_INCREF(__pyx_t_3);

        /* "pyarrow/array.pxi":2331
 *     if isinstance(obj, dict):
 *         return _pandas_api.categorical_type.from_codes(
 *             obj['indices'], categories=obj['dictionary'], ordered=obj['ordered']             # <<<<<<<<<<<<<<
 *         )
 *     else:
*/
        if (unlikely(__pyx_v_obj == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
          __PYX_ERR(4, 2331, __pyx_L1_error)
        }
        __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_obj, __pyx_mstate_global->__pyx_n_u_indices); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 2331, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        if (unlikely(__pyx_v_obj == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
          __PYX_ERR(4, 2331, __pyx_L1_error)
        }
        __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_v_obj, __pyx_mstate_global->__pyx_n_u_dictionary); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 2331, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        if (unlikely(__pyx_v_obj == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
          __PYX_ERR(4, 2331, __pyx_L1_error)
        }
        __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_obj, __pyx_mstate_global->__pyx_n_u_ordered); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 2331, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_8 = 0;
        {
          PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_3, __pyx_t_4};
          __pyx_t_9 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(4, 2330, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_categories, __pyx_t_6, __pyx_t_9, __pyx_callargs+2, 0) < (0)) __PYX_ERR(4, 2330, __pyx_L1_error)
          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_ordered, __pyx_t_7, __pyx_t_9, __pyx_callargs+2, 1) < (0)) __PYX_ERR(4, 2330, __pyx_L1_error)
          __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_from_codes, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_9);
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 2330, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
        }
        __pyx_r = __pyx_t_1;
        __pyx_t_1 = 0;
        goto __pyx_L0;

        /* "pyarrow/array.pxi":2329
 *     cdef object obj = PyObject_to_object(output)
 * 
 *     if isinstance(obj, dict):             # <<<<<<<<<<<<<<
 *         return _pandas_api.categorical_type.from_codes(
 *             obj['indices'], categories=obj['dictionary'], ordered=obj['ordered']
*/
      }

      /* "pyarrow/array.pxi":2334
 *         )
 *     else:
 *         return obj             # <<<<<<<<<<<<<<
 * 
 * 
*/
      /*else*/ {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_v_obj);
        __pyx_r = __pyx_v_obj;
        goto __pyx_L0;
      }

      /* "pyarrow/array.pxi":2326
 * 
 * 
 * cdef wrap_array_output(PyObject* output):             # <<<<<<<<<<<<<<
 *     cdef object obj = PyObject_to_object(output)
 * 
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_9);
      __Pyx_AddTraceback("pyarrow.lib.wrap_array_output", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = 0;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_obj);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":2347
 *     Concrete class for Arrow arrays of boolean data type.
 *     """
 *     @property             # <<<<<<<<<<<<<<
 *     def false_count(self):
 *         return (<CBooleanArray*> self.ap).false_count()
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_12BooleanArray_11false_count_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_12BooleanArray_11false_count_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_12BooleanArray_11false_count___get__(((struct __pyx_obj_7pyarrow_3lib_BooleanArray *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_12BooleanArray_11false_count___get__(struct __pyx_obj_7pyarrow_3lib_BooleanArray *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__get__", 0);

      /* "pyarrow/array.pxi":2349
 *     @property
 *     def false_count(self):
 *         return (<CBooleanArray*> self.ap).false_count()             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
      __Pyx_XDECREF(__pyx_r);
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "ap");
        __PYX_ERR(4, 2349, __pyx_L1_error)
      }
      __pyx_t_1 = __Pyx_PyLong_From_int64_t((( arrow::BooleanArray *)__pyx_v_self->__pyx_base.ap)->false_count()); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 2349, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":2347
 *     Concrete class for Arrow arrays of boolean data type.
 *     """
 *     @property             # <<<<<<<<<<<<<<
 *     def false_count(self):
 *         return (<CBooleanArray*> self.ap).false_count()
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("pyarrow.lib.BooleanArray.false_count.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":2351
 *         return (<CBooleanArray*> self.ap).false_count()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def true_count(self):
 *         return (<CBooleanArray*> self.ap).true_count()
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_12BooleanArray_10true_count_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_12BooleanArray_10true_count_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_12BooleanArray_10true_count___get__(((struct __pyx_obj_7pyarrow_3lib_BooleanArray *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_12BooleanArray_10true_count___get__(struct __pyx_obj_7pyarrow_3lib_BooleanArray *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__get__", 0);

      /* "pyarrow/array.pxi":2353
 *     @property
 *     def true_count(self):
 *         return (<CBooleanArray*> self.ap).true_count()             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "ap");
        __PYX_ERR(4, 2353, __pyx_L1_error)
      }
      __pyx_t_1 = __Pyx_PyLong_From_int64_t((( arrow::BooleanArray *)__pyx_v_self->__pyx_base.ap)->true_count()); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 2353, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":2351
 *         return (<CBooleanArray*> self.ap).false_count()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def true_count(self):
 *         return (<CBooleanArray*> self.ap).true_count()
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("pyarrow.lib.BooleanArray.true_count.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":2463
 *     """
 * 
 *     def to_pylist(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Convert to a list of native Python objects.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_25MonthDayNanoIntervalArray_1to_pylist(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_25MonthDayNanoIntervalArray_to_pylist, "MonthDayNanoIntervalArray.to_pylist(self, *, maps_as_pydicts=None)\n\nConvert to a list of native Python objects.\n\npyarrow.MonthDayNano is used as the native representation.\n\nParameters\n----------\nmaps_as_pydicts : str, optional, default `None`\n    Valid values are `None`, 'lossy', or 'strict'.\n    This parameter is ignored for non-nested Scalars.\n\nReturns\n-------\nlst : list");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_25MonthDayNanoIntervalArray_1to_pylist = {"to_pylist", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_25MonthDayNanoIntervalArray_1to_pylist, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_25MonthDayNanoIntervalArray_to_pylist};
    static PyObject *__pyx_pw_7pyarrow_3lib_25MonthDayNanoIntervalArray_1to_pylist(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      CYTHON_UNUSED PyObject *__pyx_v_maps_as_pydicts = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("to_pylist (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_maps_as_pydicts,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(4, 2463, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, 0, __pyx_kwds_len, "to_pylist", 0) < (0)) __PYX_ERR(4, 2463, __pyx_L3_error)
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
        } else if (unlikely(__pyx_nargs != 0)) {
          goto __pyx_L5_argtuple_error;
        } else {
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
        }
        __pyx_v_maps_as_pydicts = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("to_pylist", 1, 0, 0, __pyx_nargs); __PYX_ERR(4, 2463, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.MonthDayNanoIntervalArray.to_pylist", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_25MonthDayNanoIntervalArray_to_pylist(((struct __pyx_obj_7pyarrow_3lib_MonthDayNanoIntervalArray *)__pyx_v_self), __pyx_v_maps_as_pydicts);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_25MonthDayNanoIntervalArray_to_pylist(struct __pyx_obj_7pyarrow_3lib_MonthDayNanoIntervalArray *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_maps_as_pydicts) {
      arrow::Result<PyObject *>  __pyx_v_maybe_py_list;
      PyObject *__pyx_v_py_list;
      arrow::MonthDayNanoIntervalArray *__pyx_v_array;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1;
      PyObject *__pyx_t_2 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("to_pylist", 0);

      /* "pyarrow/array.pxi":2483
 *             PyObject* py_list
 *             CMonthDayNanoIntervalArray* array
 *         array = <CMonthDayNanoIntervalArray*>self.sp_array.get()             # <<<<<<<<<<<<<<
 *         maybe_py_list = MonthDayNanoIntervalArrayToPyList(deref(array))
 *         py_list = GetResultValue(maybe_py_list)
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_array");
        __PYX_ERR(4, 2483, __pyx_L1_error)
      }
      __pyx_v_array = ((arrow::MonthDayNanoIntervalArray *)__pyx_v_self->__pyx_base.sp_array.get());

      /* "pyarrow/array.pxi":2484
 *             CMonthDayNanoIntervalArray* array
 *         array = <CMonthDayNanoIntervalArray*>self.sp_array.get()
 *         maybe_py_list = MonthDayNanoIntervalArrayToPyList(deref(array))             # <<<<<<<<<<<<<<
 *         py_list = GetResultValue(maybe_py_list)
 *         return PyObject_to_object(py_list)
*/
      __pyx_v_maybe_py_list = arrow::py::internal::MonthDayNanoIntervalArrayToPyList((*__pyx_v_array));

      /* "pyarrow/array.pxi":2485
 *         array = <CMonthDayNanoIntervalArray*>self.sp_array.get()
 *         maybe_py_list = MonthDayNanoIntervalArrayToPyList(deref(array))
 *         py_list = GetResultValue(maybe_py_list)             # <<<<<<<<<<<<<<
 *         return PyObject_to_object(py_list)
 * 
*/
      __pyx_t_1 = arrow::py::GetResultValue<PyObject *>(__pyx_v_maybe_py_list); if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 2485, __pyx_L1_error)
      __pyx_v_py_list = __pyx_t_1;

      /* "pyarrow/array.pxi":2486
 *         maybe_py_list = MonthDayNanoIntervalArrayToPyList(deref(array))
 *         py_list = GetResultValue(maybe_py_list)
 *         return PyObject_to_object(py_list)             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = __pyx_f_7pyarrow_8includes_6common_PyObject_to_object(__pyx_v_py_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 2486, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":2463
 *     """
 * 
 *     def to_pylist(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Convert to a list of native Python objects.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_AddTraceback("pyarrow.lib.MonthDayNanoIntervalArray.to_pylist", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":2535
 * cdef class BaseListArray(Array):
 * 
 *     def flatten(self, recursive=False):             # <<<<<<<<<<<<<<
 *         """
 *         Unnest this [Large]ListArray/[Large]ListViewArray/FixedSizeListArray
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_13BaseListArray_1flatten(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_13BaseListArray_flatten, "BaseListArray.flatten(self, recursive=False)\n\nUnnest this [Large]ListArray/[Large]ListViewArray/FixedSizeListArray\naccording to 'recursive'.\n\nNote that this method is different from ``self.values`` in that\nit takes care of the slicing offset as well as null elements backed\nby non-empty sub-lists.\n\nParameters\n----------\nrecursive : bool, default False, optional\n    When True, flatten this logical list-array recursively until an\n    array of non-list values is formed.\n\n    When False, flatten only the top level.\n\nReturns\n-------\nresult : Array\n\nExamples\n--------\n\nBasic logical list-array's flatten\n>>> import pyarrow as pa\n>>> values = [1, 2, 3, 4]\n>>> offsets = [2, 1, 0]\n>>> sizes = [2, 2, 2]\n>>> array = pa.ListViewArray.from_arrays(offsets, sizes, values)\n>>> array\n<pyarrow.lib.ListViewArray object at ...>\n[\n  [\n    3,\n    4\n  ],\n  [\n    2,\n    3\n  ],\n  [\n    1,\n    2\n  ]\n]\n>>> array.flatten()\n<pyarrow.lib.Int64Array object at ...>\n[\n  3,\n  4,\n  2,\n  3,\n  1,\n  2\n]\n\nWhen recursive=True, nested list arrays are flattened recursively\nuntil an array of non-list values is formed.\n\n>>> array = pa.array([\n...    None,\n...    [\n...        [1, None, 2],\n...        None,\n...        [3, 4]\n...    ],\n...    [],\n...    [\n...        [],\n...        [5, 6],\n...        None\n...    ],\n...    [\n...        [7, 8]\n...    ]\n... ], type=pa.list_(pa.list_(pa.int64())))\n>>> array.flatten(True)\n<pyarrow.lib.Int64Array object at ...>\n[\n  1,\n  null,\n  2,\n  3,\n  4,\n  5,\n  6,\n  7,\n  8\n]");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_13BaseListArray_1flatten = {"flatten", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_13BaseListArray_1flatten, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_13BaseListArray_flatten};
    static PyObject *__pyx_pw_7pyarrow_3lib_13BaseListArray_1flatten(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_recursive = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("flatten (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_recursive,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(4, 2535, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 2535, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "flatten", 0) < (0)) __PYX_ERR(4, 2535, __pyx_L3_error)
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_False));
        } else {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 2535, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_False));
        }
        __pyx_v_recursive = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("flatten", 0, 0, 1, __pyx_nargs); __PYX_ERR(4, 2535, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.BaseListArray.flatten", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_13BaseListArray_flatten(((struct __pyx_obj_7pyarrow_3lib_BaseListArray *)__pyx_v_self), __pyx_v_recursive);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_13BaseListArray_flatten(struct __pyx_obj_7pyarrow_3lib_BaseListArray *__pyx_v_self, PyObject *__pyx_v_recursive) {
      PyObject *__pyx_v_options = NULL;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      PyObject *__pyx_t_5 = NULL;
      size_t __pyx_t_6;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("flatten", 0);

      /* "pyarrow/array.pxi":2626
 *         ]
 *         """
 *         options = _pc().ListFlattenOptions(recursive)             # <<<<<<<<<<<<<<
 *         return _pc().list_flatten(self, options=options)
 * 
*/
      __pyx_t_4 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pc_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 2626, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
        assert(__pyx_t_4);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
        __pyx_t_6 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
        __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 2626, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      __pyx_t_2 = __pyx_t_3;
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_6 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_recursive};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_ListFlattenOptions, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 2626, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_v_options = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "pyarrow/array.pxi":2627
 *         """
 *         options = _pc().ListFlattenOptions(recursive)
 *         return _pc().list_flatten(self, options=options)             # <<<<<<<<<<<<<<
 * 
 *     def value_parent_indices(self):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_5 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_pc_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 2627, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_6 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
        assert(__pyx_t_5);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
        __pyx_t_6 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
        __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 2627, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
      }
      __pyx_t_3 = __pyx_t_2;
      __Pyx_INCREF(__pyx_t_3);
      __pyx_t_6 = 0;
      {
        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_3, ((PyObject *)__pyx_v_self)};
        __pyx_t_4 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 2627, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_options, __pyx_v_options, __pyx_t_4, __pyx_callargs+2, 0) < (0)) __PYX_ERR(4, 2627, __pyx_L1_error)
        __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_list_flatten, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_4);
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 2627, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":2535
 * cdef class BaseListArray(Array):
 * 
 *     def flatten(self, recursive=False):             # <<<<<<<<<<<<<<
 *         """
 *         Unnest this [Large]ListArray/[Large]ListViewArray/FixedSizeListArray
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_AddTraceback("pyarrow.lib.BaseListArray.flatten", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_options);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":2629
 *         return _pc().list_flatten(self, options=options)
 * 
 *     def value_parent_indices(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return array of same length as list child values array where each
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_13BaseListArray_3value_parent_indices(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_13BaseListArray_2value_parent_indices, "BaseListArray.value_parent_indices(self)\n\nReturn array of same length as list child values array where each\noutput value is the index of the parent list array slot containing each\nchild value.\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> arr = pa.array([[1, 2, 3], [], None, [4]],\n...                type=pa.list_(pa.int32()))\n>>> arr.value_parent_indices()\n<pyarrow.lib.Int64Array object at ...>\n[\n  0,\n  0,\n  0,\n  3\n]");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_13BaseListArray_3value_parent_indices = {"value_parent_indices", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_13BaseListArray_3value_parent_indices, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_13BaseListArray_2value_parent_indices};
    static PyObject *__pyx_pw_7pyarrow_3lib_13BaseListArray_3value_parent_indices(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("value_parent_indices (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("value_parent_indices", 1, 0, 0, __pyx_nargs); return NULL; }
      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
      if (unlikely(__pyx_kwds_len < 0)) return NULL;
      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("value_parent_indices", __pyx_kwds); return NULL;}
      __pyx_r = __pyx_pf_7pyarrow_3lib_13BaseListArray_2value_parent_indices(((struct __pyx_obj_7pyarrow_3lib_BaseListArray *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_13BaseListArray_2value_parent_indices(struct __pyx_obj_7pyarrow_3lib_BaseListArray *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      PyObject *__pyx_t_5 = NULL;
      size_t __pyx_t_6;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("value_parent_indices", 0);

      /* "pyarrow/array.pxi":2649
 *         ]
 *         """
 *         return _pc().list_parent_indices(self)             # <<<<<<<<<<<<<<
 * 
 *     def value_lengths(self):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_4 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pc_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 2649, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
        assert(__pyx_t_4);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
        __pyx_t_6 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
        __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 2649, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      __pyx_t_2 = __pyx_t_3;
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_6 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, ((PyObject *)__pyx_v_self)};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_list_parent_indices, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 2649, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":2629
 *         return _pc().list_flatten(self, options=options)
 * 
 *     def value_parent_indices(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return array of same length as list child values array where each
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_AddTraceback("pyarrow.lib.BaseListArray.value_parent_indices", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":2651
 *         return _pc().list_parent_indices(self)
 * 
 *     def value_lengths(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return integers array with values equal to the respective length of
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_13BaseListArray_5value_lengths(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_13BaseListArray_4value_lengths, "BaseListArray.value_lengths(self)\n\nReturn integers array with values equal to the respective length of\neach list element. Null list values are null in the output.\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> arr = pa.array([[1, 2, 3], [], None, [4]],\n...                type=pa.list_(pa.int32()))\n>>> arr.value_lengths()\n<pyarrow.lib.Int32Array object at ...>\n[\n  3,\n  0,\n  null,\n  1\n]");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_13BaseListArray_5value_lengths = {"value_lengths", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_13BaseListArray_5value_lengths, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_13BaseListArray_4value_lengths};
    static PyObject *__pyx_pw_7pyarrow_3lib_13BaseListArray_5value_lengths(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("value_lengths (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("value_lengths", 1, 0, 0, __pyx_nargs); return NULL; }
      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
      if (unlikely(__pyx_kwds_len < 0)) return NULL;
      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("value_lengths", __pyx_kwds); return NULL;}
      __pyx_r = __pyx_pf_7pyarrow_3lib_13BaseListArray_4value_lengths(((struct __pyx_obj_7pyarrow_3lib_BaseListArray *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_13BaseListArray_4value_lengths(struct __pyx_obj_7pyarrow_3lib_BaseListArray *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      PyObject *__pyx_t_5 = NULL;
      size_t __pyx_t_6;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("value_lengths", 0);

      /* "pyarrow/array.pxi":2670
 *         ]
 *         """
 *         return _pc().list_value_length(self)             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_4 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pc_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 2670, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
        assert(__pyx_t_4);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
        __pyx_t_6 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
        __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 2670, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      __pyx_t_2 = __pyx_t_3;
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_6 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, ((PyObject *)__pyx_v_self)};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_list_value_length, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 2670, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":2651
 *         return _pc().list_parent_indices(self)
 * 
 *     def value_lengths(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return integers array with values equal to the respective length of
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_AddTraceback("pyarrow.lib.BaseListArray.value_lengths", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":2678
 *     """
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_arrays(offsets, values, DataType type=None, MemoryPool pool=None, mask=None):
 *         """
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_9ListArray_1from_arrays(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_9ListArray_from_arrays, "ListArray.from_arrays(offsets, values, DataType type=None, MemoryPool pool=None, mask=None)\n\nConstruct ListArray from arrays of int32 offsets and values.\n\nParameters\n----------\noffsets : Array (int32 type)\nvalues : Array (any type)\ntype : DataType, optional\n    If not specified, a default ListType with the values' type is\n    used.\npool : MemoryPool, optional\nmask : Array (boolean type), optional\n    Indicate which values are null (True) or not null (False).\n\nReturns\n-------\nlist_array : ListArray\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> values = pa.array([1, 2, 3, 4])\n>>> offsets = pa.array([0, 2, 4])\n>>> pa.ListArray.from_arrays(offsets, values)\n<pyarrow.lib.ListArray object at ...>\n[\n  [\n    1,\n    2\n  ],\n  [\n    3,\n    4\n  ]\n]\n>>> # nulls in the offsets array become null lists\n>>> offsets = pa.array([0, None, 2, 4])\n>>> pa.ListArray.from_arrays(offsets, values)\n<pyarrow.lib.ListArray object at ...>\n[\n  [\n    1,\n    2\n  ],\n  null,\n  [\n    3,\n    4\n  ]\n]");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_9ListArray_1from_arrays = {"from_arrays", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_9ListArray_1from_arrays, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_9ListArray_from_arrays};
    static PyObject *__pyx_pw_7pyarrow_3lib_9ListArray_1from_arrays(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_offsets = 0;
      PyObject *__pyx_v_values = 0;
      struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v_type = 0;
      struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_pool = 0;
      PyObject *__pyx_v_mask = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[5] = {0,0,0,0,0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("from_arrays (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_offsets,&__pyx_mstate_global->__pyx_n_u_values,&__pyx_mstate_global->__pyx_n_u_type,&__pyx_mstate_global->__pyx_n_u_pool,&__pyx_mstate_global->__pyx_n_u_mask,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(4, 2678, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  5:
            values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(4, 2678, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  4:
            values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(4, 2678, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  3:
            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(4, 2678, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(4, 2678, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 2678, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "from_arrays", 0) < (0)) __PYX_ERR(4, 2678, __pyx_L3_error)

          /* "pyarrow/array.pxi":2679
 * 
 *     @staticmethod
 *     def from_arrays(offsets, values, DataType type=None, MemoryPool pool=None, mask=None):             # <<<<<<<<<<<<<<
 *         """
 *         Construct ListArray from arrays of int32 offsets and values.
*/
          if (!values[2]) values[2] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_7pyarrow_3lib_DataType *)Py_None));
          if (!values[3]) values[3] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)Py_None));
          if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)Py_None));
          for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("from_arrays", 0, 2, 5, i); __PYX_ERR(4, 2678, __pyx_L3_error) }
          }
        } else {
          switch (__pyx_nargs) {
            case  5:
            values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(4, 2678, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  4:
            values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(4, 2678, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  3:
            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(4, 2678, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(4, 2678, __pyx_L3_error)
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 2678, __pyx_L3_error)
            break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (!values[2]) values[2] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_7pyarrow_3lib_DataType *)Py_None));
          if (!values[3]) values[3] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)Py_None));
          if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)Py_None));
        }
        __pyx_v_offsets = values[0];
        __pyx_v_values = values[1];
        __pyx_v_type = ((struct __pyx_obj_7pyarrow_3lib_DataType *)values[2]);
        __pyx_v_pool = ((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)values[3]);
        __pyx_v_mask = values[4];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("from_arrays", 0, 2, 5, __pyx_nargs); __PYX_ERR(4, 2678, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.ListArray.from_arrays", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_type), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType, 1, "type", 0))) __PYX_ERR(4, 2679, __pyx_L1_error)
      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pool), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_MemoryPool, 1, "pool", 0))) __PYX_ERR(4, 2679, __pyx_L1_error)
      __pyx_r = __pyx_pf_7pyarrow_3lib_9ListArray_from_arrays(__pyx_v_offsets, __pyx_v_values, __pyx_v_type, __pyx_v_pool, __pyx_v_mask);

      /* "pyarrow/array.pxi":2678
 *     """
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_arrays(offsets, values, DataType type=None, MemoryPool pool=None, mask=None):
 *         """
*/

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = NULL;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      goto __pyx_L7_cleaned_up;
      __pyx_L0:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __pyx_L7_cleaned_up:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_9ListArray_from_arrays(PyObject *__pyx_v_offsets, PyObject *__pyx_v_values, struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v_type, struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_pool, PyObject *__pyx_v_mask) {
      struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v__offsets = 0;
      struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v__values = 0;
      std::shared_ptr< arrow::Array>  __pyx_v_out;
      std::shared_ptr< arrow::Buffer>  __pyx_v_c_mask;
       arrow::MemoryPool *__pyx_v_cpool;
      struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_result = 0;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
       arrow::MemoryPool *__pyx_t_1;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      size_t __pyx_t_5;
      PyObject *__pyx_t_6 = NULL;
      std::shared_ptr< arrow::Buffer>  __pyx_t_7;
      int __pyx_t_8;
      std::shared_ptr< arrow::Array>  __pyx_t_9;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("from_arrays", 0);

      /* "pyarrow/array.pxi":2735
 *             shared_ptr[CArray] out
 *             shared_ptr[CBuffer] c_mask
 *         cdef CMemoryPool* cpool = maybe_unbox_memory_pool(pool)             # <<<<<<<<<<<<<<
 * 
 *         _offsets = asarray(offsets, type='int32')
*/
      __pyx_t_1 = __pyx_f_7pyarrow_3lib_maybe_unbox_memory_pool(__pyx_v_pool); if (unlikely(__pyx_t_1 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(4, 2735, __pyx_L1_error)
      __pyx_v_cpool = __pyx_t_1;

      /* "pyarrow/array.pxi":2737
 *         cdef CMemoryPool* cpool = maybe_unbox_memory_pool(pool)
 * 
 *         _offsets = asarray(offsets, type='int32')             # <<<<<<<<<<<<<<
 *         _values = asarray(values)
 * 
*/
      __pyx_t_3 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_asarray); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 2737, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
        assert(__pyx_t_3);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
        __pyx_t_5 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_3, __pyx_v_offsets};
        __pyx_t_6 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 2737, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_type, __pyx_mstate_global->__pyx_n_u_int32, __pyx_t_6, __pyx_callargs+2, 0) < (0)) __PYX_ERR(4, 2737, __pyx_L1_error)
        __pyx_t_2 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_6);
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 2737, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
      }
      if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array))))) __PYX_ERR(4, 2737, __pyx_L1_error)
      __pyx_v__offsets = ((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_t_2);
      __pyx_t_2 = 0;

      /* "pyarrow/array.pxi":2738
 * 
 *         _offsets = asarray(offsets, type='int32')
 *         _values = asarray(values)             # <<<<<<<<<<<<<<
 * 
 *         c_mask = c_mask_inverted_from_obj(mask, pool)
*/
      __pyx_t_4 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_asarray); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 2738, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_5 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
        assert(__pyx_t_4);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
        __pyx_t_5 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_values};
        __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 2738, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
      }
      if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array))))) __PYX_ERR(4, 2738, __pyx_L1_error)
      __pyx_v__values = ((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_t_2);
      __pyx_t_2 = 0;

      /* "pyarrow/array.pxi":2740
 *         _values = asarray(values)
 * 
 *         c_mask = c_mask_inverted_from_obj(mask, pool)             # <<<<<<<<<<<<<<
 * 
 *         if type is not None:
*/
      __pyx_t_7 = __pyx_f_7pyarrow_3lib_c_mask_inverted_from_obj(__pyx_v_mask, __pyx_v_pool); if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 2740, __pyx_L1_error)
      __pyx_v_c_mask = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_7);

      /* "pyarrow/array.pxi":2742
 *         c_mask = c_mask_inverted_from_obj(mask, pool)
 * 
 *         if type is not None:             # <<<<<<<<<<<<<<
 *             with nogil:
 *                 out = GetResultValue(
*/
      __pyx_t_8 = (((PyObject *)__pyx_v_type) != Py_None);
      if (__pyx_t_8) {

        /* "pyarrow/array.pxi":2743
 * 
 *         if type is not None:
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 out = GetResultValue(
 *                     CListArray.FromArraysAndType(
*/
        {
            PyThreadState * _save;
            _save = PyEval_SaveThread();
            __Pyx_FastGIL_Remember();
            /*try:*/ {

              /* "pyarrow/array.pxi":2746
 *                 out = GetResultValue(
 *                     CListArray.FromArraysAndType(
 *                         type.sp_type, _offsets.ap[0], _values.ap[0], cpool, c_mask))             # <<<<<<<<<<<<<<
 *         else:
 *             with nogil:
*/
              if (unlikely(((PyObject *)__pyx_v_type) == Py_None)) {
                PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_type");
                __Pyx_PyGILState_Release(__pyx_gilstate_save);
                __PYX_ERR(4, 2746, __pyx_L5_error)
              }
              if (unlikely(((PyObject *)__pyx_v__offsets) == Py_None)) {
                PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "ap");
                __Pyx_PyGILState_Release(__pyx_gilstate_save);
                __PYX_ERR(4, 2746, __pyx_L5_error)
              }
              if (unlikely(((PyObject *)__pyx_v__values) == Py_None)) {
                PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "ap");
                __Pyx_PyGILState_Release(__pyx_gilstate_save);
                __PYX_ERR(4, 2746, __pyx_L5_error)
              }

              /* "pyarrow/array.pxi":2744
 *         if type is not None:
 *             with nogil:
 *                 out = GetResultValue(             # <<<<<<<<<<<<<<
 *                     CListArray.FromArraysAndType(
 *                         type.sp_type, _offsets.ap[0], _values.ap[0], cpool, c_mask))
*/
              __pyx_t_9 = arrow::py::GetResultValue<std::shared_ptr< arrow::Array> >( arrow::ListArray:: FromArrays(__pyx_v_type->sp_type, (__pyx_v__offsets->ap[0]), (__pyx_v__values->ap[0]), __pyx_v_cpool, __pyx_v_c_mask)); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(4, 2744, __pyx_L5_error)
              __pyx_v_out = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_9);
            }

            /* "pyarrow/array.pxi":2743
 * 
 *         if type is not None:
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 out = GetResultValue(
 *                     CListArray.FromArraysAndType(
*/
            /*finally:*/ {
              /*normal exit:*/{
                __Pyx_FastGIL_Forget();
                PyEval_RestoreThread(_save);
                goto __pyx_L6;
              }
              __pyx_L5_error: {
                __Pyx_FastGIL_Forget();
                PyEval_RestoreThread(_save);
                goto __pyx_L1_error;
              }
              __pyx_L6:;
            }
        }

        /* "pyarrow/array.pxi":2742
 *         c_mask = c_mask_inverted_from_obj(mask, pool)
 * 
 *         if type is not None:             # <<<<<<<<<<<<<<
 *             with nogil:
 *                 out = GetResultValue(
*/
        goto __pyx_L3;
      }

      /* "pyarrow/array.pxi":2748
 *                         type.sp_type, _offsets.ap[0], _values.ap[0], cpool, c_mask))
 *         else:
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 out = GetResultValue(
 *                     CListArray.FromArrays(
*/
      /*else*/ {
        {
            PyThreadState * _save;
            _save = PyEval_SaveThread();
            __Pyx_FastGIL_Remember();
            /*try:*/ {

              /* "pyarrow/array.pxi":2751
 *                 out = GetResultValue(
 *                     CListArray.FromArrays(
 *                         _offsets.ap[0], _values.ap[0], cpool, c_mask))             # <<<<<<<<<<<<<<
 *         cdef Array result = pyarrow_wrap_array(out)
 *         result.validate()
*/
              if (unlikely(((PyObject *)__pyx_v__offsets) == Py_None)) {
                PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "ap");
                __Pyx_PyGILState_Release(__pyx_gilstate_save);
                __PYX_ERR(4, 2751, __pyx_L8_error)
              }
              if (unlikely(((PyObject *)__pyx_v__values) == Py_None)) {
                PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "ap");
                __Pyx_PyGILState_Release(__pyx_gilstate_save);
                __PYX_ERR(4, 2751, __pyx_L8_error)
              }

              /* "pyarrow/array.pxi":2749
 *         else:
 *             with nogil:
 *                 out = GetResultValue(             # <<<<<<<<<<<<<<
 *                     CListArray.FromArrays(
 *                         _offsets.ap[0], _values.ap[0], cpool, c_mask))
*/
              __pyx_t_9 = arrow::py::GetResultValue<std::shared_ptr< arrow::Array> >( arrow::ListArray::FromArrays((__pyx_v__offsets->ap[0]), (__pyx_v__values->ap[0]), __pyx_v_cpool, __pyx_v_c_mask)); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(4, 2749, __pyx_L8_error)
              __pyx_v_out = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_9);
            }

            /* "pyarrow/array.pxi":2748
 *                         type.sp_type, _offsets.ap[0], _values.ap[0], cpool, c_mask))
 *         else:
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 out = GetResultValue(
 *                     CListArray.FromArrays(
*/
            /*finally:*/ {
              /*normal exit:*/{
                __Pyx_FastGIL_Forget();
                PyEval_RestoreThread(_save);
                goto __pyx_L9;
              }
              __pyx_L8_error: {
                __Pyx_FastGIL_Forget();
                PyEval_RestoreThread(_save);
                goto __pyx_L1_error;
              }
              __pyx_L9:;
            }
        }
      }
      __pyx_L3:;

      /* "pyarrow/array.pxi":2752
 *                     CListArray.FromArrays(
 *                         _offsets.ap[0], _values.ap[0], cpool, c_mask))
 *         cdef Array result = pyarrow_wrap_array(out)             # <<<<<<<<<<<<<<
 *         result.validate()
 *         return result
*/
      __pyx_t_2 = pyarrow_wrap_array(__pyx_v_out); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 2752, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array))))) __PYX_ERR(4, 2752, __pyx_L1_error)
      __pyx_v_result = ((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_t_2);
      __pyx_t_2 = 0;

      /* "pyarrow/array.pxi":2753
 *                         _offsets.ap[0], _values.ap[0], cpool, c_mask))
 *         cdef Array result = pyarrow_wrap_array(out)
 *         result.validate()             # <<<<<<<<<<<<<<
 *         return result
 * 
*/
      __pyx_t_6 = ((PyObject *)__pyx_v_result);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_5 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
        __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_validate, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 2753, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyarrow/array.pxi":2754
 *         cdef Array result = pyarrow_wrap_array(out)
 *         result.validate()
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF((PyObject *)__pyx_v_result);
      __pyx_r = ((PyObject *)__pyx_v_result);
      goto __pyx_L0;

      /* "pyarrow/array.pxi":2678
 *     """
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_arrays(offsets, values, DataType type=None, MemoryPool pool=None, mask=None):
 *         """
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_AddTraceback("pyarrow.lib.ListArray.from_arrays", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF((PyObject *)__pyx_v__offsets);
      __Pyx_XDECREF((PyObject *)__pyx_v__values);
      __Pyx_XDECREF((PyObject *)__pyx_v_result);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":2756
 *         return result
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def values(self):
 *         """
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_9ListArray_6values_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_9ListArray_6values_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_9ListArray_6values___get__(((struct __pyx_obj_7pyarrow_3lib_ListArray *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_9ListArray_6values___get__(struct __pyx_obj_7pyarrow_3lib_ListArray *__pyx_v_self) {
       arrow::ListArray *__pyx_v_arr;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__get__", 0);

      /* "pyarrow/array.pxi":2824
 * 
 *         """
 *         cdef CListArray* arr = <CListArray*> self.ap             # <<<<<<<<<<<<<<
 *         return pyarrow_wrap_array(arr.values())
 * 
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "ap");
        __PYX_ERR(4, 2824, __pyx_L1_error)
      }
      __pyx_v_arr = (( arrow::ListArray *)__pyx_v_self->__pyx_base.__pyx_base.ap);

      /* "pyarrow/array.pxi":2825
 *         """
 *         cdef CListArray* arr = <CListArray*> self.ap
 *         return pyarrow_wrap_array(arr.values())             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = pyarrow_wrap_array(__pyx_v_arr->values()); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 2825, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":2756
 *         return result
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def values(self):
 *         """
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("pyarrow.lib.ListArray.values.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":2827
 *         return pyarrow_wrap_array(arr.values())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def offsets(self):
 *         """
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_9ListArray_7offsets_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_9ListArray_7offsets_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_9ListArray_7offsets___get__(((struct __pyx_obj_7pyarrow_3lib_ListArray *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_9ListArray_7offsets___get__(struct __pyx_obj_7pyarrow_3lib_ListArray *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__get__", 0);

      /* "pyarrow/array.pxi":2853
 *         ]
 *         """
 *         return pyarrow_wrap_array((<CListArray*> self.ap).offsets())             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "ap");
        __PYX_ERR(4, 2853, __pyx_L1_error)
      }
      __pyx_t_1 = pyarrow_wrap_array((( arrow::ListArray *)__pyx_v_self->__pyx_base.__pyx_base.ap)->offsets()); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 2853, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":2827
 *         return pyarrow_wrap_array(arr.values())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def offsets(self):
 *         """
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("pyarrow.lib.ListArray.offsets.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":2863
 *     """
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_arrays(offsets, values, DataType type=None, MemoryPool pool=None, mask=None):
 *         """
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_14LargeListArray_1from_arrays(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_14LargeListArray_from_arrays, "LargeListArray.from_arrays(offsets, values, DataType type=None, MemoryPool pool=None, mask=None)\n\nConstruct LargeListArray from arrays of int64 offsets and values.\n\nParameters\n----------\noffsets : Array (int64 type)\nvalues : Array (any type)\ntype : DataType, optional\n    If not specified, a default ListType with the values' type is\n    used.\npool : MemoryPool, optional\nmask : Array (boolean type), optional\n    Indicate which values are null (True) or not null (False).\n\nReturns\n-------\nlist_array : LargeListArray");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_14LargeListArray_1from_arrays = {"from_arrays", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_14LargeListArray_1from_arrays, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_14LargeListArray_from_arrays};
    static PyObject *__pyx_pw_7pyarrow_3lib_14LargeListArray_1from_arrays(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_offsets = 0;
      PyObject *__pyx_v_values = 0;
      struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v_type = 0;
      struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_pool = 0;
      PyObject *__pyx_v_mask = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[5] = {0,0,0,0,0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("from_arrays (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_offsets,&__pyx_mstate_global->__pyx_n_u_values,&__pyx_mstate_global->__pyx_n_u_type,&__pyx_mstate_global->__pyx_n_u_pool,&__pyx_mstate_global->__pyx_n_u_mask,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(4, 2863, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  5:
            values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(4, 2863, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  4:
            values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(4, 2863, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  3:
            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(4, 2863, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(4, 2863, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 2863, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "from_arrays", 0) < (0)) __PYX_ERR(4, 2863, __pyx_L3_error)

          /* "pyarrow/array.pxi":2864
 * 
 *     @staticmethod
 *     def from_arrays(offsets, values, DataType type=None, MemoryPool pool=None, mask=None):             # <<<<<<<<<<<<<<
 *         """
 *         Construct LargeListArray from arrays of int64 offsets and values.
*/
          if (!values[2]) values[2] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_7pyarrow_3lib_DataType *)Py_None));
          if (!values[3]) values[3] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)Py_None));
          if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)Py_None));
          for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("from_arrays", 0, 2, 5, i); __PYX_ERR(4, 2863, __pyx_L3_error) }
          }
        } else {
          switch (__pyx_nargs) {
            case  5:
            values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(4, 2863, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  4:
            values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(4, 2863, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  3:
            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(4, 2863, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(4, 2863, __pyx_L3_error)
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 2863, __pyx_L3_error)
            break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (!values[2]) values[2] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_7pyarrow_3lib_DataType *)Py_None));
          if (!values[3]) values[3] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)Py_None));
          if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)Py_None));
        }
        __pyx_v_offsets = values[0];
        __pyx_v_values = values[1];
        __pyx_v_type = ((struct __pyx_obj_7pyarrow_3lib_DataType *)values[2]);
        __pyx_v_pool = ((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)values[3]);
        __pyx_v_mask = values[4];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("from_arrays", 0, 2, 5, __pyx_nargs); __PYX_ERR(4, 2863, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.LargeListArray.from_arrays", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_type), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType, 1, "type", 0))) __PYX_ERR(4, 2864, __pyx_L1_error)
      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pool), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_MemoryPool, 1, "pool", 0))) __PYX_ERR(4, 2864, __pyx_L1_error)
      __pyx_r = __pyx_pf_7pyarrow_3lib_14LargeListArray_from_arrays(__pyx_v_offsets, __pyx_v_values, __pyx_v_type, __pyx_v_pool, __pyx_v_mask);

      /* "pyarrow/array.pxi":2863
 *     """
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_arrays(offsets, values, DataType type=None, MemoryPool pool=None, mask=None):
 *         """
*/

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = NULL;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      goto __pyx_L7_cleaned_up;
      __pyx_L0:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __pyx_L7_cleaned_up:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_14LargeListArray_from_arrays(PyObject *__pyx_v_offsets, PyObject *__pyx_v_values, struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v_type, struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_pool, PyObject *__pyx_v_mask) {
      struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v__offsets = 0;
      struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v__values = 0;
      std::shared_ptr< arrow::Array>  __pyx_v_out;
      std::shared_ptr< arrow::Buffer>  __pyx_v_c_mask;
       arrow::MemoryPool *__pyx_v_cpool;
      struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_result = 0;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
       arrow::MemoryPool *__pyx_t_1;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      size_t __pyx_t_5;
      PyObject *__pyx_t_6 = NULL;
      std::shared_ptr< arrow::Buffer>  __pyx_t_7;
      int __pyx_t_8;
      std::shared_ptr< arrow::Array>  __pyx_t_9;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("from_arrays", 0);

      /* "pyarrow/array.pxi":2888
 *             shared_ptr[CBuffer] c_mask
 * 
 *         cdef CMemoryPool* cpool = maybe_unbox_memory_pool(pool)             # <<<<<<<<<<<<<<
 * 
 *         _offsets = asarray(offsets, type='int64')
*/
      __pyx_t_1 = __pyx_f_7pyarrow_3lib_maybe_unbox_memory_pool(__pyx_v_pool); if (unlikely(__pyx_t_1 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(4, 2888, __pyx_L1_error)
      __pyx_v_cpool = __pyx_t_1;

      /* "pyarrow/array.pxi":2890
 *         cdef CMemoryPool* cpool = maybe_unbox_memory_pool(pool)
 * 
 *         _offsets = asarray(offsets, type='int64')             # <<<<<<<<<<<<<<
 *         _values = asarray(values)
 * 
*/
      __pyx_t_3 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_asarray); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 2890, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
        assert(__pyx_t_3);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
        __pyx_t_5 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_3, __pyx_v_offsets};
        __pyx_t_6 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 2890, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_type, __pyx_mstate_global->__pyx_n_u_int64, __pyx_t_6, __pyx_callargs+2, 0) < (0)) __PYX_ERR(4, 2890, __pyx_L1_error)
        __pyx_t_2 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_6);
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 2890, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
      }
      if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array))))) __PYX_ERR(4, 2890, __pyx_L1_error)
      __pyx_v__offsets = ((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_t_2);
      __pyx_t_2 = 0;

      /* "pyarrow/array.pxi":2891
 * 
 *         _offsets = asarray(offsets, type='int64')
 *         _values = asarray(values)             # <<<<<<<<<<<<<<
 * 
 *         c_mask = c_mask_inverted_from_obj(mask, pool)
*/
      __pyx_t_4 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_asarray); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 2891, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_5 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
        assert(__pyx_t_4);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
        __pyx_t_5 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_values};
        __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 2891, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
      }
      if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array))))) __PYX_ERR(4, 2891, __pyx_L1_error)
      __pyx_v__values = ((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_t_2);
      __pyx_t_2 = 0;

      /* "pyarrow/array.pxi":2893
 *         _values = asarray(values)
 * 
 *         c_mask = c_mask_inverted_from_obj(mask, pool)             # <<<<<<<<<<<<<<
 * 
 *         if type is not None:
*/
      __pyx_t_7 = __pyx_f_7pyarrow_3lib_c_mask_inverted_from_obj(__pyx_v_mask, __pyx_v_pool); if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 2893, __pyx_L1_error)
      __pyx_v_c_mask = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_7);

      /* "pyarrow/array.pxi":2895
 *         c_mask = c_mask_inverted_from_obj(mask, pool)
 * 
 *         if type is not None:             # <<<<<<<<<<<<<<
 *             with nogil:
 *                 out = GetResultValue(
*/
      __pyx_t_8 = (((PyObject *)__pyx_v_type) != Py_None);
      if (__pyx_t_8) {

        /* "pyarrow/array.pxi":2896
 * 
 *         if type is not None:
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 out = GetResultValue(
 *                     CLargeListArray.FromArraysAndType(
*/
        {
            PyThreadState * _save;
            _save = PyEval_SaveThread();
            __Pyx_FastGIL_Remember();
            /*try:*/ {

              /* "pyarrow/array.pxi":2899
 *                 out = GetResultValue(
 *                     CLargeListArray.FromArraysAndType(
 *                         type.sp_type, _offsets.ap[0], _values.ap[0], cpool, c_mask))             # <<<<<<<<<<<<<<
 *         else:
 *             with nogil:
*/
              if (unlikely(((PyObject *)__pyx_v_type) == Py_None)) {
                PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_type");
                __Pyx_PyGILState_Release(__pyx_gilstate_save);
                __PYX_ERR(4, 2899, __pyx_L5_error)
              }
              if (unlikely(((PyObject *)__pyx_v__offsets) == Py_None)) {
                PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "ap");
                __Pyx_PyGILState_Release(__pyx_gilstate_save);
                __PYX_ERR(4, 2899, __pyx_L5_error)
              }
              if (unlikely(((PyObject *)__pyx_v__values) == Py_None)) {
                PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "ap");
                __Pyx_PyGILState_Release(__pyx_gilstate_save);
                __PYX_ERR(4, 2899, __pyx_L5_error)
              }

              /* "pyarrow/array.pxi":2897
 *         if type is not None:
 *             with nogil:
 *                 out = GetResultValue(             # <<<<<<<<<<<<<<
 *                     CLargeListArray.FromArraysAndType(
 *                         type.sp_type, _offsets.ap[0], _values.ap[0], cpool, c_mask))
*/
              __pyx_t_9 = arrow::py::GetResultValue<std::shared_ptr< arrow::Array> >( arrow::LargeListArray:: FromArrays(__pyx_v_type->sp_type, (__pyx_v__offsets->ap[0]), (__pyx_v__values->ap[0]), __pyx_v_cpool, __pyx_v_c_mask)); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(4, 2897, __pyx_L5_error)
              __pyx_v_out = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_9);
            }

            /* "pyarrow/array.pxi":2896
 * 
 *         if type is not None:
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 out = GetResultValue(
 *                     CLargeListArray.FromArraysAndType(
*/
            /*finally:*/ {
              /*normal exit:*/{
                __Pyx_FastGIL_Forget();
                PyEval_RestoreThread(_save);
                goto __pyx_L6;
              }
              __pyx_L5_error: {
                __Pyx_FastGIL_Forget();
                PyEval_RestoreThread(_save);
                goto __pyx_L1_error;
              }
              __pyx_L6:;
            }
        }

        /* "pyarrow/array.pxi":2895
 *         c_mask = c_mask_inverted_from_obj(mask, pool)
 * 
 *         if type is not None:             # <<<<<<<<<<<<<<
 *             with nogil:
 *                 out = GetResultValue(
*/
        goto __pyx_L3;
      }

      /* "pyarrow/array.pxi":2901
 *                         type.sp_type, _offsets.ap[0], _values.ap[0], cpool, c_mask))
 *         else:
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 out = GetResultValue(
 *                     CLargeListArray.FromArrays(
*/
      /*else*/ {
        {
            PyThreadState * _save;
            _save = PyEval_SaveThread();
            __Pyx_FastGIL_Remember();
            /*try:*/ {

              /* "pyarrow/array.pxi":2904
 *                 out = GetResultValue(
 *                     CLargeListArray.FromArrays(
 *                         _offsets.ap[0], _values.ap[0], cpool, c_mask))             # <<<<<<<<<<<<<<
 *         cdef Array result = pyarrow_wrap_array(out)
 *         result.validate()
*/
              if (unlikely(((PyObject *)__pyx_v__offsets) == Py_None)) {
                PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "ap");
                __Pyx_PyGILState_Release(__pyx_gilstate_save);
                __PYX_ERR(4, 2904, __pyx_L8_error)
              }
              if (unlikely(((PyObject *)__pyx_v__values) == Py_None)) {
                PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "ap");
                __Pyx_PyGILState_Release(__pyx_gilstate_save);
                __PYX_ERR(4, 2904, __pyx_L8_error)
              }

              /* "pyarrow/array.pxi":2902
 *         else:
 *             with nogil:
 *                 out = GetResultValue(             # <<<<<<<<<<<<<<
 *                     CLargeListArray.FromArrays(
 *                         _offsets.ap[0], _values.ap[0], cpool, c_mask))
*/
              __pyx_t_9 = arrow::py::GetResultValue<std::shared_ptr< arrow::Array> >( arrow::LargeListArray::FromArrays((__pyx_v__offsets->ap[0]), (__pyx_v__values->ap[0]), __pyx_v_cpool, __pyx_v_c_mask)); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(4, 2902, __pyx_L8_error)
              __pyx_v_out = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_9);
            }

            /* "pyarrow/array.pxi":2901
 *                         type.sp_type, _offsets.ap[0], _values.ap[0], cpool, c_mask))
 *         else:
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 out = GetResultValue(
 *                     CLargeListArray.FromArrays(
*/
            /*finally:*/ {
              /*normal exit:*/{
                __Pyx_FastGIL_Forget();
                PyEval_RestoreThread(_save);
                goto __pyx_L9;
              }
              __pyx_L8_error: {
                __Pyx_FastGIL_Forget();
                PyEval_RestoreThread(_save);
                goto __pyx_L1_error;
              }
              __pyx_L9:;
            }
        }
      }
      __pyx_L3:;

      /* "pyarrow/array.pxi":2905
 *                     CLargeListArray.FromArrays(
 *                         _offsets.ap[0], _values.ap[0], cpool, c_mask))
 *         cdef Array result = pyarrow_wrap_array(out)             # <<<<<<<<<<<<<<
 *         result.validate()
 *         return result
*/
      __pyx_t_2 = pyarrow_wrap_array(__pyx_v_out); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 2905, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array))))) __PYX_ERR(4, 2905, __pyx_L1_error)
      __pyx_v_result = ((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_t_2);
      __pyx_t_2 = 0;

      /* "pyarrow/array.pxi":2906
 *                         _offsets.ap[0], _values.ap[0], cpool, c_mask))
 *         cdef Array result = pyarrow_wrap_array(out)
 *         result.validate()             # <<<<<<<<<<<<<<
 *         return result
 * 
*/
      __pyx_t_6 = ((PyObject *)__pyx_v_result);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_5 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
        __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_validate, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 2906, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyarrow/array.pxi":2907
 *         cdef Array result = pyarrow_wrap_array(out)
 *         result.validate()
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF((PyObject *)__pyx_v_result);
      __pyx_r = ((PyObject *)__pyx_v_result);
      goto __pyx_L0;

      /* "pyarrow/array.pxi":2863
 *     """
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_arrays(offsets, values, DataType type=None, MemoryPool pool=None, mask=None):
 *         """
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_AddTraceback("pyarrow.lib.LargeListArray.from_arrays", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF((PyObject *)__pyx_v__offsets);
      __Pyx_XDECREF((PyObject *)__pyx_v__values);
      __Pyx_XDECREF((PyObject *)__pyx_v_result);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":2909
 *         return result
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def values(self):
 *         """
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_14LargeListArray_6values_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_14LargeListArray_6values_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_14LargeListArray_6values___get__(((struct __pyx_obj_7pyarrow_3lib_LargeListArray *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_14LargeListArray_6values___get__(struct __pyx_obj_7pyarrow_3lib_LargeListArray *__pyx_v_self) {
       arrow::LargeListArray *__pyx_v_arr;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__get__", 0);

      /* "pyarrow/array.pxi":2979
 *         ]
 *         """
 *         cdef CLargeListArray* arr = <CLargeListArray*> self.ap             # <<<<<<<<<<<<<<
 *         return pyarrow_wrap_array(arr.values())
 * 
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "ap");
        __PYX_ERR(4, 2979, __pyx_L1_error)
      }
      __pyx_v_arr = (( arrow::LargeListArray *)__pyx_v_self->__pyx_base.__pyx_base.ap);

      /* "pyarrow/array.pxi":2980
 *         """
 *         cdef CLargeListArray* arr = <CLargeListArray*> self.ap
 *         return pyarrow_wrap_array(arr.values())             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = pyarrow_wrap_array(__pyx_v_arr->values()); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 2980, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":2909
 *         return result
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def values(self):
 *         """
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("pyarrow.lib.LargeListArray.values.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":2982
 *         return pyarrow_wrap_array(arr.values())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def offsets(self):
 *         """
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_14LargeListArray_7offsets_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_14LargeListArray_7offsets_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_14LargeListArray_7offsets___get__(((struct __pyx_obj_7pyarrow_3lib_LargeListArray *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_14LargeListArray_7offsets___get__(struct __pyx_obj_7pyarrow_3lib_LargeListArray *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__get__", 0);

      /* "pyarrow/array.pxi":2995
 *         offsets : Int64Array
 *         """
 *         return pyarrow_wrap_array((<CLargeListArray*> self.ap).offsets())             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "ap");
        __PYX_ERR(4, 2995, __pyx_L1_error)
      }
      __pyx_t_1 = pyarrow_wrap_array((( arrow::LargeListArray *)__pyx_v_self->__pyx_base.__pyx_base.ap)->offsets()); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 2995, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":2982
 *         return pyarrow_wrap_array(arr.values())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def offsets(self):
 *         """
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("pyarrow.lib.LargeListArray.offsets.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":3003
 *     """
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_arrays(offsets, sizes, values, DataType type=None, MemoryPool pool=None, mask=None):
 *         """
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_13ListViewArray_1from_arrays(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_13ListViewArray_from_arrays, "ListViewArray.from_arrays(offsets, sizes, values, DataType type=None, MemoryPool pool=None, mask=None)\n\nConstruct ListViewArray from arrays of int32 offsets, sizes, and values.\n\nParameters\n----------\noffsets : Array (int32 type)\nsizes : Array (int32 type)\nvalues : Array (any type)\ntype : DataType, optional\n    If not specified, a default ListType with the values' type is\n    used.\npool : MemoryPool, optional\nmask : Array (boolean type), optional\n    Indicate which values are null (True) or not null (False).\n\nReturns\n-------\nlist_view_array : ListViewArray\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> values = pa.array([1, 2, 3, 4])\n>>> offsets = pa.array([0, 1, 2])\n>>> sizes = pa.array([2, 2, 2])\n>>> pa.ListViewArray.from_arrays(offsets, sizes, values)\n<pyarrow.lib.ListViewArray object at ...>\n[\n  [\n    1,\n    2\n  ],\n  [\n    2,\n    3\n  ],\n  [\n    3,\n    4\n  ]\n]\n>>> # use a null mask to represent null values\n>>> mask = pa.array([False, True, False])\n>>> pa.ListViewArray.from_arrays(offsets, sizes, values, mask=mask)\n<pyarrow.lib.ListViewArray object at ...>\n[\n  [\n    1,\n    2\n  ],\n  null,\n  [\n    3,\n    4\n  ]\n]\n>>> # null values can be defined in either offsets or sizes arrays\n>>> # WARNING: this will result in a copy of the offsets or sizes arrays\n>>> offsets = pa.array([0, None, 2])\n>>> pa.ListViewArray.from_arrays(offsets, sizes, values)\n<pyarrow.lib.ListViewArray object at ...>\n[\n  [\n    1,\n    2\n  ],\n  null,\n  [\n    3,\n    4\n  ]\n]");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_13ListViewArray_1from_arrays = {"from_arrays", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_13ListViewArray_1from_arrays, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_13ListViewArray_from_arrays};
    static PyObject *__pyx_pw_7pyarrow_3lib_13ListViewArray_1from_arrays(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_offsets = 0;
      PyObject *__pyx_v_sizes = 0;
      PyObject *__pyx_v_values = 0;
      struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v_type = 0;
      struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_pool = 0;
      PyObject *__pyx_v_mask = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[6] = {0,0,0,0,0,0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("from_arrays (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_offsets,&__pyx_mstate_global->__pyx_n_u_sizes,&__pyx_mstate_global->__pyx_n_u_values,&__pyx_mstate_global->__pyx_n_u_type,&__pyx_mstate_global->__pyx_n_u_pool,&__pyx_mstate_global->__pyx_n_u_mask,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(4, 3003, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  6:
            values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(4, 3003, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  5:
            values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(4, 3003, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  4:
            values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(4, 3003, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  3:
            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(4, 3003, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(4, 3003, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 3003, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "from_arrays", 0) < (0)) __PYX_ERR(4, 3003, __pyx_L3_error)

          /* "pyarrow/array.pxi":3004
 * 
 *     @staticmethod
 *     def from_arrays(offsets, sizes, values, DataType type=None, MemoryPool pool=None, mask=None):             # <<<<<<<<<<<<<<
 *         """
 *         Construct ListViewArray from arrays of int32 offsets, sizes, and values.
*/
          if (!values[3]) values[3] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_7pyarrow_3lib_DataType *)Py_None));
          if (!values[4]) values[4] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)Py_None));
          if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)Py_None));
          for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("from_arrays", 0, 3, 6, i); __PYX_ERR(4, 3003, __pyx_L3_error) }
          }
        } else {
          switch (__pyx_nargs) {
            case  6:
            values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(4, 3003, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  5:
            values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(4, 3003, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  4:
            values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(4, 3003, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  3:
            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(4, 3003, __pyx_L3_error)
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(4, 3003, __pyx_L3_error)
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 3003, __pyx_L3_error)
            break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (!values[3]) values[3] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_7pyarrow_3lib_DataType *)Py_None));
          if (!values[4]) values[4] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)Py_None));
          if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)Py_None));
        }
        __pyx_v_offsets = values[0];
        __pyx_v_sizes = values[1];
        __pyx_v_values = values[2];
        __pyx_v_type = ((struct __pyx_obj_7pyarrow_3lib_DataType *)values[3]);
        __pyx_v_pool = ((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)values[4]);
        __pyx_v_mask = values[5];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("from_arrays", 0, 3, 6, __pyx_nargs); __PYX_ERR(4, 3003, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.ListViewArray.from_arrays", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_type), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType, 1, "type", 0))) __PYX_ERR(4, 3004, __pyx_L1_error)
      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pool), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_MemoryPool, 1, "pool", 0))) __PYX_ERR(4, 3004, __pyx_L1_error)
      __pyx_r = __pyx_pf_7pyarrow_3lib_13ListViewArray_from_arrays(__pyx_v_offsets, __pyx_v_sizes, __pyx_v_values, __pyx_v_type, __pyx_v_pool, __pyx_v_mask);

      /* "pyarrow/array.pxi":3003
 *     """
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_arrays(offsets, sizes, values, DataType type=None, MemoryPool pool=None, mask=None):
 *         """
*/

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = NULL;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      goto __pyx_L7_cleaned_up;
      __pyx_L0:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __pyx_L7_cleaned_up:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_13ListViewArray_from_arrays(PyObject *__pyx_v_offsets, PyObject *__pyx_v_sizes, PyObject *__pyx_v_values, struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v_type, struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_pool, PyObject *__pyx_v_mask) {
      struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v__offsets = 0;
      struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v__sizes = 0;
      struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v__values = 0;
      std::shared_ptr< arrow::Array>  __pyx_v_out;
      std::shared_ptr< arrow::Buffer>  __pyx_v_c_mask;
       arrow::MemoryPool *__pyx_v_cpool;
      struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_result = 0;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
       arrow::MemoryPool *__pyx_t_1;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      size_t __pyx_t_5;
      PyObject *__pyx_t_6 = NULL;
      std::shared_ptr< arrow::Buffer>  __pyx_t_7;
      int __pyx_t_8;
      std::shared_ptr< arrow::Array>  __pyx_t_9;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("from_arrays", 0);

      /* "pyarrow/array.pxi":3082
 *             shared_ptr[CArray] out
 *             shared_ptr[CBuffer] c_mask
 *             CMemoryPool* cpool = maybe_unbox_memory_pool(pool)             # <<<<<<<<<<<<<<
 * 
 *         _offsets = asarray(offsets, type='int32')
*/
      __pyx_t_1 = __pyx_f_7pyarrow_3lib_maybe_unbox_memory_pool(__pyx_v_pool); if (unlikely(__pyx_t_1 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(4, 3082, __pyx_L1_error)
      __pyx_v_cpool = __pyx_t_1;

      /* "pyarrow/array.pxi":3084
 *             CMemoryPool* cpool = maybe_unbox_memory_pool(pool)
 * 
 *         _offsets = asarray(offsets, type='int32')             # <<<<<<<<<<<<<<
 *         _sizes = asarray(sizes, type='int32')
 *         _values = asarray(values)
*/
      __pyx_t_3 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_asarray); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 3084, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
        assert(__pyx_t_3);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
        __pyx_t_5 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_3, __pyx_v_offsets};
        __pyx_t_6 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 3084, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_type, __pyx_mstate_global->__pyx_n_u_int32, __pyx_t_6, __pyx_callargs+2, 0) < (0)) __PYX_ERR(4, 3084, __pyx_L1_error)
        __pyx_t_2 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_6);
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 3084, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
      }
      if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array))))) __PYX_ERR(4, 3084, __pyx_L1_error)
      __pyx_v__offsets = ((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_t_2);
      __pyx_t_2 = 0;

      /* "pyarrow/array.pxi":3085
 * 
 *         _offsets = asarray(offsets, type='int32')
 *         _sizes = asarray(sizes, type='int32')             # <<<<<<<<<<<<<<
 *         _values = asarray(values)
 * 
*/
      __pyx_t_4 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_asarray); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 3085, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_5 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
        assert(__pyx_t_4);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
        __pyx_t_5 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_4, __pyx_v_sizes};
        __pyx_t_3 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 3085, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_type, __pyx_mstate_global->__pyx_n_u_int32, __pyx_t_3, __pyx_callargs+2, 0) < (0)) __PYX_ERR(4, 3085, __pyx_L1_error)
        __pyx_t_2 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 3085, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
      }
      if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array))))) __PYX_ERR(4, 3085, __pyx_L1_error)
      __pyx_v__sizes = ((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_t_2);
      __pyx_t_2 = 0;

      /* "pyarrow/array.pxi":3086
 *         _offsets = asarray(offsets, type='int32')
 *         _sizes = asarray(sizes, type='int32')
 *         _values = asarray(values)             # <<<<<<<<<<<<<<
 * 
 *         c_mask = c_mask_inverted_from_obj(mask, pool)
*/
      __pyx_t_6 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_asarray); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 3086, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
        assert(__pyx_t_6);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
        __pyx_t_5 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_values};
        __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 3086, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
      }
      if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array))))) __PYX_ERR(4, 3086, __pyx_L1_error)
      __pyx_v__values = ((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_t_2);
      __pyx_t_2 = 0;

      /* "pyarrow/array.pxi":3088
 *         _values = asarray(values)
 * 
 *         c_mask = c_mask_inverted_from_obj(mask, pool)             # <<<<<<<<<<<<<<
 * 
 *         if type is not None:
*/
      __pyx_t_7 = __pyx_f_7pyarrow_3lib_c_mask_inverted_from_obj(__pyx_v_mask, __pyx_v_pool); if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 3088, __pyx_L1_error)
      __pyx_v_c_mask = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_7);

      /* "pyarrow/array.pxi":3090
 *         c_mask = c_mask_inverted_from_obj(mask, pool)
 * 
 *         if type is not None:             # <<<<<<<<<<<<<<
 *             with nogil:
 *                 out = GetResultValue(
*/
      __pyx_t_8 = (((PyObject *)__pyx_v_type) != Py_None);
      if (__pyx_t_8) {

        /* "pyarrow/array.pxi":3091
 * 
 *         if type is not None:
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 out = GetResultValue(
 *                     CListViewArray.FromArraysAndType(
*/
        {
            PyThreadState * _save;
            _save = PyEval_SaveThread();
            __Pyx_FastGIL_Remember();
            /*try:*/ {

              /* "pyarrow/array.pxi":3094
 *                 out = GetResultValue(
 *                     CListViewArray.FromArraysAndType(
 *                         type.sp_type, _offsets.ap[0], _sizes.ap[0], _values.ap[0], cpool, c_mask))             # <<<<<<<<<<<<<<
 *         else:
 *             with nogil:
*/
              if (unlikely(((PyObject *)__pyx_v_type) == Py_None)) {
                PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_type");
                __Pyx_PyGILState_Release(__pyx_gilstate_save);
                __PYX_ERR(4, 3094, __pyx_L5_error)
              }
              if (unlikely(((PyObject *)__pyx_v__offsets) == Py_None)) {
                PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "ap");
                __Pyx_PyGILState_Release(__pyx_gilstate_save);
                __PYX_ERR(4, 3094, __pyx_L5_error)
              }
              if (unlikely(((PyObject *)__pyx_v__sizes) == Py_None)) {
                PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "ap");
                __Pyx_PyGILState_Release(__pyx_gilstate_save);
                __PYX_ERR(4, 3094, __pyx_L5_error)
              }
              if (unlikely(((PyObject *)__pyx_v__values) == Py_None)) {
                PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "ap");
                __Pyx_PyGILState_Release(__pyx_gilstate_save);
                __PYX_ERR(4, 3094, __pyx_L5_error)
              }

              /* "pyarrow/array.pxi":3092
 *         if type is not None:
 *             with nogil:
 *                 out = GetResultValue(             # <<<<<<<<<<<<<<
 *                     CListViewArray.FromArraysAndType(
 *                         type.sp_type, _offsets.ap[0], _sizes.ap[0], _values.ap[0], cpool, c_mask))
*/
              __pyx_t_9 = arrow::py::GetResultValue<std::shared_ptr< arrow::Array> >( arrow::ListViewArray:: FromArrays(__pyx_v_type->sp_type, (__pyx_v__offsets->ap[0]), (__pyx_v__sizes->ap[0]), (__pyx_v__values->ap[0]), __pyx_v_cpool, __pyx_v_c_mask)); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(4, 3092, __pyx_L5_error)
              __pyx_v_out = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_9);
            }

            /* "pyarrow/array.pxi":3091
 * 
 *         if type is not None:
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 out = GetResultValue(
 *                     CListViewArray.FromArraysAndType(
*/
            /*finally:*/ {
              /*normal exit:*/{
                __Pyx_FastGIL_Forget();
                PyEval_RestoreThread(_save);
                goto __pyx_L6;
              }
              __pyx_L5_error: {
                __Pyx_FastGIL_Forget();
                PyEval_RestoreThread(_save);
                goto __pyx_L1_error;
              }
              __pyx_L6:;
            }
        }

        /* "pyarrow/array.pxi":3090
 *         c_mask = c_mask_inverted_from_obj(mask, pool)
 * 
 *         if type is not None:             # <<<<<<<<<<<<<<
 *             with nogil:
 *                 out = GetResultValue(
*/
        goto __pyx_L3;
      }

      /* "pyarrow/array.pxi":3096
 *                         type.sp_type, _offsets.ap[0], _sizes.ap[0], _values.ap[0], cpool, c_mask))
 *         else:
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 out = GetResultValue(
 *                     CListViewArray.FromArrays(
*/
      /*else*/ {
        {
            PyThreadState * _save;
            _save = PyEval_SaveThread();
            __Pyx_FastGIL_Remember();
            /*try:*/ {

              /* "pyarrow/array.pxi":3099
 *                 out = GetResultValue(
 *                     CListViewArray.FromArrays(
 *                         _offsets.ap[0], _sizes.ap[0], _values.ap[0], cpool, c_mask))             # <<<<<<<<<<<<<<
 *         cdef Array result = pyarrow_wrap_array(out)
 *         result.validate()
*/
              if (unlikely(((PyObject *)__pyx_v__offsets) == Py_None)) {
                PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "ap");
                __Pyx_PyGILState_Release(__pyx_gilstate_save);
                __PYX_ERR(4, 3099, __pyx_L8_error)
              }
              if (unlikely(((PyObject *)__pyx_v__sizes) == Py_None)) {
                PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "ap");
                __Pyx_PyGILState_Release(__pyx_gilstate_save);
                __PYX_ERR(4, 3099, __pyx_L8_error)
              }
              if (unlikely(((PyObject *)__pyx_v__values) == Py_None)) {
                PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "ap");
                __Pyx_PyGILState_Release(__pyx_gilstate_save);
                __PYX_ERR(4, 3099, __pyx_L8_error)
              }

              /* "pyarrow/array.pxi":3097
 *         else:
 *             with nogil:
 *                 out = GetResultValue(             # <<<<<<<<<<<<<<
 *                     CListViewArray.FromArrays(
 *                         _offsets.ap[0], _sizes.ap[0], _values.ap[0], cpool, c_mask))
*/
              __pyx_t_9 = arrow::py::GetResultValue<std::shared_ptr< arrow::Array> >( arrow::ListViewArray::FromArrays((__pyx_v__offsets->ap[0]), (__pyx_v__sizes->ap[0]), (__pyx_v__values->ap[0]), __pyx_v_cpool, __pyx_v_c_mask)); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(4, 3097, __pyx_L8_error)
              __pyx_v_out = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_9);
            }

            /* "pyarrow/array.pxi":3096
 *                         type.sp_type, _offsets.ap[0], _sizes.ap[0], _values.ap[0], cpool, c_mask))
 *         else:
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 out = GetResultValue(
 *                     CListViewArray.FromArrays(
*/
            /*finally:*/ {
              /*normal exit:*/{
                __Pyx_FastGIL_Forget();
                PyEval_RestoreThread(_save);
                goto __pyx_L9;
              }
              __pyx_L8_error: {
                __Pyx_FastGIL_Forget();
                PyEval_RestoreThread(_save);
                goto __pyx_L1_error;
              }
              __pyx_L9:;
            }
        }
      }
      __pyx_L3:;

      /* "pyarrow/array.pxi":3100
 *                     CListViewArray.FromArrays(
 *                         _offsets.ap[0], _sizes.ap[0], _values.ap[0], cpool, c_mask))
 *         cdef Array result = pyarrow_wrap_array(out)             # <<<<<<<<<<<<<<
 *         result.validate()
 *         return result
*/
      __pyx_t_2 = pyarrow_wrap_array(__pyx_v_out); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 3100, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array))))) __PYX_ERR(4, 3100, __pyx_L1_error)
      __pyx_v_result = ((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_t_2);
      __pyx_t_2 = 0;

      /* "pyarrow/array.pxi":3101
 *                         _offsets.ap[0], _sizes.ap[0], _values.ap[0], cpool, c_mask))
 *         cdef Array result = pyarrow_wrap_array(out)
 *         result.validate()             # <<<<<<<<<<<<<<
 *         return result
 * 
*/
      __pyx_t_3 = ((PyObject *)__pyx_v_result);
      __Pyx_INCREF(__pyx_t_3);
      __pyx_t_5 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
        __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_validate, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 3101, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyarrow/array.pxi":3102
 *         cdef Array result = pyarrow_wrap_array(out)
 *         result.validate()
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF((PyObject *)__pyx_v_result);
      __pyx_r = ((PyObject *)__pyx_v_result);
      goto __pyx_L0;

      /* "pyarrow/array.pxi":3003
 *     """
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_arrays(offsets, sizes, values, DataType type=None, MemoryPool pool=None, mask=None):
 *         """
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_AddTraceback("pyarrow.lib.ListViewArray.from_arrays", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF((PyObject *)__pyx_v__offsets);
      __Pyx_XDECREF((PyObject *)__pyx_v__sizes);
      __Pyx_XDECREF((PyObject *)__pyx_v__values);
      __Pyx_XDECREF((PyObject *)__pyx_v_result);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":3104
 *         return result
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def values(self):
 *         """
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_13ListViewArray_6values_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_13ListViewArray_6values_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_13ListViewArray_6values___get__(((struct __pyx_obj_7pyarrow_3lib_ListViewArray *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_13ListViewArray_6values___get__(struct __pyx_obj_7pyarrow_3lib_ListViewArray *__pyx_v_self) {
       arrow::ListViewArray *__pyx_v_arr;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__get__", 0);

      /* "pyarrow/array.pxi":3155
 *         ]
 *         """
 *         cdef CListViewArray* arr = <CListViewArray*> self.ap             # <<<<<<<<<<<<<<
 *         return pyarrow_wrap_array(arr.values())
 * 
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "ap");
        __PYX_ERR(4, 3155, __pyx_L1_error)
      }
      __pyx_v_arr = (( arrow::ListViewArray *)__pyx_v_self->__pyx_base.__pyx_base.ap);

      /* "pyarrow/array.pxi":3156
 *         """
 *         cdef CListViewArray* arr = <CListViewArray*> self.ap
 *         return pyarrow_wrap_array(arr.values())             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = pyarrow_wrap_array(__pyx_v_arr->values()); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 3156, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":3104
 *         return result
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def values(self):
 *         """
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("pyarrow.lib.ListViewArray.values.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":3158
 *         return pyarrow_wrap_array(arr.values())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def offsets(self):
 *         """
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_13ListViewArray_7offsets_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_13ListViewArray_7offsets_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_13ListViewArray_7offsets___get__(((struct __pyx_obj_7pyarrow_3lib_ListViewArray *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_13ListViewArray_7offsets___get__(struct __pyx_obj_7pyarrow_3lib_ListViewArray *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__get__", 0);

      /* "pyarrow/array.pxi":3186
 *         ]
 *         """
 *         return pyarrow_wrap_array((<CListViewArray*> self.ap).offsets())             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
      __Pyx_XDECREF(__pyx_r);
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "ap");
        __PYX_ERR(4, 3186, __pyx_L1_error)
      }
      __pyx_t_1 = pyarrow_wrap_array((( arrow::ListViewArray *)__pyx_v_self->__pyx_base.__pyx_base.ap)->offsets()); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 3186, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":3158
 *         return pyarrow_wrap_array(arr.values())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def offsets(self):
 *         """
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("pyarrow.lib.ListViewArray.offsets.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":3188
 *         return pyarrow_wrap_array((<CListViewArray*> self.ap).offsets())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def sizes(self):
 *         """
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_13ListViewArray_5sizes_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_13ListViewArray_5sizes_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_13ListViewArray_5sizes___get__(((struct __pyx_obj_7pyarrow_3lib_ListViewArray *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_13ListViewArray_5sizes___get__(struct __pyx_obj_7pyarrow_3lib_ListViewArray *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__get__", 0);

      /* "pyarrow/array.pxi":3216
 *         ]
 *         """
 *         return pyarrow_wrap_array((<CListViewArray*> self.ap).sizes())             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "ap");
        __PYX_ERR(4, 3216, __pyx_L1_error)
      }
      __pyx_t_1 = pyarrow_wrap_array((( arrow::ListViewArray *)__pyx_v_self->__pyx_base.__pyx_base.ap)->sizes()); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 3216, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":3188
 *         return pyarrow_wrap_array((<CListViewArray*> self.ap).offsets())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def sizes(self):
 *         """
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("pyarrow.lib.ListViewArray.sizes.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":3225
 *     Identical to ListViewArray, but with 64-bit offsets.
 *     """
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_arrays(offsets, sizes, values, DataType type=None, MemoryPool pool=None, mask=None):
 *         """
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_18LargeListViewArray_1from_arrays(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_18LargeListViewArray_from_arrays, "LargeListViewArray.from_arrays(offsets, sizes, values, DataType type=None, MemoryPool pool=None, mask=None)\n\nConstruct LargeListViewArray from arrays of int64 offsets and values.\n\nParameters\n----------\noffsets : Array (int64 type)\nsizes : Array (int64 type)\nvalues : Array (any type)\ntype : DataType, optional\n    If not specified, a default ListType with the values' type is\n    used.\npool : MemoryPool, optional\nmask : Array (boolean type), optional\n    Indicate which values are null (True) or not null (False).\n\nReturns\n-------\nlist_view_array : LargeListViewArray\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> values = pa.array([1, 2, 3, 4])\n>>> offsets = pa.array([0, 1, 2])\n>>> sizes = pa.array([2, 2, 2])\n>>> pa.LargeListViewArray.from_arrays(offsets, sizes, values)\n<pyarrow.lib.LargeListViewArray object at ...>\n[\n  [\n    1,\n    2\n  ],\n  [\n    2,\n    3\n  ],\n  [\n    3,\n    4\n  ]\n]\n>>> # use a null mask to represent null values\n>>> mask = pa.array([False, True, False])\n>>> pa.LargeListViewArray.from_arrays(offsets, sizes, values, mask=mask)\n<pyarrow.lib.LargeListViewArray object at ...>\n[\n  [\n    1,\n    2\n  ],\n  null,\n  [\n    3,\n    4\n  ]\n]\n>>> # null values can be defined in either offsets or sizes arrays\n>>> # WARNING: this will result in a copy of the offsets or sizes arrays\n>>> offsets = pa.array([0, None, 2])\n>>> pa.LargeListViewArray.from_arrays(offsets, sizes, values)\n<pyarrow.lib.LargeListViewArray object at ...>\n[\n  [\n    1,\n    2\n  ],\n  null,\n  [\n    3,\n    4\n  ]\n]");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_18LargeListViewArray_1from_arrays = {"from_arrays", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_18LargeListViewArray_1from_arrays, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_18LargeListViewArray_from_arrays};
    static PyObject *__pyx_pw_7pyarrow_3lib_18LargeListViewArray_1from_arrays(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_offsets = 0;
      PyObject *__pyx_v_sizes = 0;
      PyObject *__pyx_v_values = 0;
      struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v_type = 0;
      struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_pool = 0;
      PyObject *__pyx_v_mask = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[6] = {0,0,0,0,0,0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("from_arrays (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_offsets,&__pyx_mstate_global->__pyx_n_u_sizes,&__pyx_mstate_global->__pyx_n_u_values,&__pyx_mstate_global->__pyx_n_u_type,&__pyx_mstate_global->__pyx_n_u_pool,&__pyx_mstate_global->__pyx_n_u_mask,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(4, 3225, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  6:
            values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(4, 3225, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  5:
            values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(4, 3225, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  4:
            values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(4, 3225, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  3:
            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(4, 3225, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(4, 3225, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 3225, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "from_arrays", 0) < (0)) __PYX_ERR(4, 3225, __pyx_L3_error)

          /* "pyarrow/array.pxi":3226
 *     """
 *     @staticmethod
 *     def from_arrays(offsets, sizes, values, DataType type=None, MemoryPool pool=None, mask=None):             # <<<<<<<<<<<<<<
 *         """
 *         Construct LargeListViewArray from arrays of int64 offsets and values.
*/
          if (!values[3]) values[3] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_7pyarrow_3lib_DataType *)Py_None));
          if (!values[4]) values[4] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)Py_None));
          if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)Py_None));
          for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("from_arrays", 0, 3, 6, i); __PYX_ERR(4, 3225, __pyx_L3_error) }
          }
        } else {
          switch (__pyx_nargs) {
            case  6:
            values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(4, 3225, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  5:
            values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(4, 3225, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  4:
            values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(4, 3225, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  3:
            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(4, 3225, __pyx_L3_error)
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(4, 3225, __pyx_L3_error)
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 3225, __pyx_L3_error)
            break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (!values[3]) values[3] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_7pyarrow_3lib_DataType *)Py_None));
          if (!values[4]) values[4] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)Py_None));
          if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)Py_None));
        }
        __pyx_v_offsets = values[0];
        __pyx_v_sizes = values[1];
        __pyx_v_values = values[2];
        __pyx_v_type = ((struct __pyx_obj_7pyarrow_3lib_DataType *)values[3]);
        __pyx_v_pool = ((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)values[4]);
        __pyx_v_mask = values[5];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("from_arrays", 0, 3, 6, __pyx_nargs); __PYX_ERR(4, 3225, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.LargeListViewArray.from_arrays", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_type), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType, 1, "type", 0))) __PYX_ERR(4, 3226, __pyx_L1_error)
      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pool), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_MemoryPool, 1, "pool", 0))) __PYX_ERR(4, 3226, __pyx_L1_error)
      __pyx_r = __pyx_pf_7pyarrow_3lib_18LargeListViewArray_from_arrays(__pyx_v_offsets, __pyx_v_sizes, __pyx_v_values, __pyx_v_type, __pyx_v_pool, __pyx_v_mask);

      /* "pyarrow/array.pxi":3225
 *     Identical to ListViewArray, but with 64-bit offsets.
 *     """
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_arrays(offsets, sizes, values, DataType type=None, MemoryPool pool=None, mask=None):
 *         """
*/

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = NULL;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      goto __pyx_L7_cleaned_up;
      __pyx_L0:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __pyx_L7_cleaned_up:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_18LargeListViewArray_from_arrays(PyObject *__pyx_v_offsets, PyObject *__pyx_v_sizes, PyObject *__pyx_v_values, struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v_type, struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_pool, PyObject *__pyx_v_mask) {
      struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v__offsets = 0;
      struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v__sizes = 0;
      struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v__values = 0;
      std::shared_ptr< arrow::Array>  __pyx_v_out;
      std::shared_ptr< arrow::Buffer>  __pyx_v_c_mask;
       arrow::MemoryPool *__pyx_v_cpool;
      struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_result = 0;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
       arrow::MemoryPool *__pyx_t_1;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      size_t __pyx_t_5;
      PyObject *__pyx_t_6 = NULL;
      std::shared_ptr< arrow::Buffer>  __pyx_t_7;
      int __pyx_t_8;
      std::shared_ptr< arrow::Array>  __pyx_t_9;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("from_arrays", 0);

      /* "pyarrow/array.pxi":3304
 *             shared_ptr[CArray] out
 *             shared_ptr[CBuffer] c_mask
 *             CMemoryPool* cpool = maybe_unbox_memory_pool(pool)             # <<<<<<<<<<<<<<
 * 
 *         _offsets = asarray(offsets, type='int64')
*/
      __pyx_t_1 = __pyx_f_7pyarrow_3lib_maybe_unbox_memory_pool(__pyx_v_pool); if (unlikely(__pyx_t_1 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(4, 3304, __pyx_L1_error)
      __pyx_v_cpool = __pyx_t_1;

      /* "pyarrow/array.pxi":3306
 *             CMemoryPool* cpool = maybe_unbox_memory_pool(pool)
 * 
 *         _offsets = asarray(offsets, type='int64')             # <<<<<<<<<<<<<<
 *         _sizes = asarray(sizes, type='int64')
 *         _values = asarray(values)
*/
      __pyx_t_3 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_asarray); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 3306, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
        assert(__pyx_t_3);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
        __pyx_t_5 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_3, __pyx_v_offsets};
        __pyx_t_6 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 3306, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_type, __pyx_mstate_global->__pyx_n_u_int64, __pyx_t_6, __pyx_callargs+2, 0) < (0)) __PYX_ERR(4, 3306, __pyx_L1_error)
        __pyx_t_2 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_6);
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 3306, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
      }
      if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array))))) __PYX_ERR(4, 3306, __pyx_L1_error)
      __pyx_v__offsets = ((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_t_2);
      __pyx_t_2 = 0;

      /* "pyarrow/array.pxi":3307
 * 
 *         _offsets = asarray(offsets, type='int64')
 *         _sizes = asarray(sizes, type='int64')             # <<<<<<<<<<<<<<
 *         _values = asarray(values)
 * 
*/
      __pyx_t_4 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_asarray); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 3307, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_5 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
        assert(__pyx_t_4);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
        __pyx_t_5 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_4, __pyx_v_sizes};
        __pyx_t_3 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 3307, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_type, __pyx_mstate_global->__pyx_n_u_int64, __pyx_t_3, __pyx_callargs+2, 0) < (0)) __PYX_ERR(4, 3307, __pyx_L1_error)
        __pyx_t_2 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 3307, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
      }
      if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array))))) __PYX_ERR(4, 3307, __pyx_L1_error)
      __pyx_v__sizes = ((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_t_2);
      __pyx_t_2 = 0;

      /* "pyarrow/array.pxi":3308
 *         _offsets = asarray(offsets, type='int64')
 *         _sizes = asarray(sizes, type='int64')
 *         _values = asarray(values)             # <<<<<<<<<<<<<<
 * 
 *         c_mask = c_mask_inverted_from_obj(mask, pool)
*/
      __pyx_t_6 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_asarray); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 3308, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
        assert(__pyx_t_6);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
        __pyx_t_5 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_values};
        __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 3308, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
      }
      if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array))))) __PYX_ERR(4, 3308, __pyx_L1_error)
      __pyx_v__values = ((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_t_2);
      __pyx_t_2 = 0;

      /* "pyarrow/array.pxi":3310
 *         _values = asarray(values)
 * 
 *         c_mask = c_mask_inverted_from_obj(mask, pool)             # <<<<<<<<<<<<<<
 * 
 *         if type is not None:
*/
      __pyx_t_7 = __pyx_f_7pyarrow_3lib_c_mask_inverted_from_obj(__pyx_v_mask, __pyx_v_pool); if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 3310, __pyx_L1_error)
      __pyx_v_c_mask = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_7);

      /* "pyarrow/array.pxi":3312
 *         c_mask = c_mask_inverted_from_obj(mask, pool)
 * 
 *         if type is not None:             # <<<<<<<<<<<<<<
 *             with nogil:
 *                 out = GetResultValue(
*/
      __pyx_t_8 = (((PyObject *)__pyx_v_type) != Py_None);
      if (__pyx_t_8) {

        /* "pyarrow/array.pxi":3313
 * 
 *         if type is not None:
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 out = GetResultValue(
 *                     CLargeListViewArray.FromArraysAndType(
*/
        {
            PyThreadState * _save;
            _save = PyEval_SaveThread();
            __Pyx_FastGIL_Remember();
            /*try:*/ {

              /* "pyarrow/array.pxi":3316
 *                 out = GetResultValue(
 *                     CLargeListViewArray.FromArraysAndType(
 *                         type.sp_type, _offsets.ap[0], _sizes.ap[0], _values.ap[0], cpool, c_mask))             # <<<<<<<<<<<<<<
 *         else:
 *             with nogil:
*/
              if (unlikely(((PyObject *)__pyx_v_type) == Py_None)) {
                PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_type");
                __Pyx_PyGILState_Release(__pyx_gilstate_save);
                __PYX_ERR(4, 3316, __pyx_L5_error)
              }
              if (unlikely(((PyObject *)__pyx_v__offsets) == Py_None)) {
                PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "ap");
                __Pyx_PyGILState_Release(__pyx_gilstate_save);
                __PYX_ERR(4, 3316, __pyx_L5_error)
              }
              if (unlikely(((PyObject *)__pyx_v__sizes) == Py_None)) {
                PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "ap");
                __Pyx_PyGILState_Release(__pyx_gilstate_save);
                __PYX_ERR(4, 3316, __pyx_L5_error)
              }
              if (unlikely(((PyObject *)__pyx_v__values) == Py_None)) {
                PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "ap");
                __Pyx_PyGILState_Release(__pyx_gilstate_save);
                __PYX_ERR(4, 3316, __pyx_L5_error)
              }

              /* "pyarrow/array.pxi":3314
 *         if type is not None:
 *             with nogil:
 *                 out = GetResultValue(             # <<<<<<<<<<<<<<
 *                     CLargeListViewArray.FromArraysAndType(
 *                         type.sp_type, _offsets.ap[0], _sizes.ap[0], _values.ap[0], cpool, c_mask))
*/
              __pyx_t_9 = arrow::py::GetResultValue<std::shared_ptr< arrow::Array> >( arrow::LargeListViewArray:: FromArrays(__pyx_v_type->sp_type, (__pyx_v__offsets->ap[0]), (__pyx_v__sizes->ap[0]), (__pyx_v__values->ap[0]), __pyx_v_cpool, __pyx_v_c_mask)); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(4, 3314, __pyx_L5_error)
              __pyx_v_out = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_9);
            }

            /* "pyarrow/array.pxi":3313
 * 
 *         if type is not None:
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 out = GetResultValue(
 *                     CLargeListViewArray.FromArraysAndType(
*/
            /*finally:*/ {
              /*normal exit:*/{
                __Pyx_FastGIL_Forget();
                PyEval_RestoreThread(_save);
                goto __pyx_L6;
              }
              __pyx_L5_error: {
                __Pyx_FastGIL_Forget();
                PyEval_RestoreThread(_save);
                goto __pyx_L1_error;
              }
              __pyx_L6:;
            }
        }

        /* "pyarrow/array.pxi":3312
 *         c_mask = c_mask_inverted_from_obj(mask, pool)
 * 
 *         if type is not None:             # <<<<<<<<<<<<<<
 *             with nogil:
 *                 out = GetResultValue(
*/
        goto __pyx_L3;
      }

      /* "pyarrow/array.pxi":3318
 *                         type.sp_type, _offsets.ap[0], _sizes.ap[0], _values.ap[0], cpool, c_mask))
 *         else:
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 out = GetResultValue(
 *                     CLargeListViewArray.FromArrays(
*/
      /*else*/ {
        {
            PyThreadState * _save;
            _save = PyEval_SaveThread();
            __Pyx_FastGIL_Remember();
            /*try:*/ {

              /* "pyarrow/array.pxi":3321
 *                 out = GetResultValue(
 *                     CLargeListViewArray.FromArrays(
 *                         _offsets.ap[0], _sizes.ap[0], _values.ap[0], cpool, c_mask))             # <<<<<<<<<<<<<<
 *         cdef Array result = pyarrow_wrap_array(out)
 *         result.validate()
*/
              if (unlikely(((PyObject *)__pyx_v__offsets) == Py_None)) {
                PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "ap");
                __Pyx_PyGILState_Release(__pyx_gilstate_save);
                __PYX_ERR(4, 3321, __pyx_L8_error)
              }
              if (unlikely(((PyObject *)__pyx_v__sizes) == Py_None)) {
                PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "ap");
                __Pyx_PyGILState_Release(__pyx_gilstate_save);
                __PYX_ERR(4, 3321, __pyx_L8_error)
              }
              if (unlikely(((PyObject *)__pyx_v__values) == Py_None)) {
                PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "ap");
                __Pyx_PyGILState_Release(__pyx_gilstate_save);
                __PYX_ERR(4, 3321, __pyx_L8_error)
              }

              /* "pyarrow/array.pxi":3319
 *         else:
 *             with nogil:
 *                 out = GetResultValue(             # <<<<<<<<<<<<<<
 *                     CLargeListViewArray.FromArrays(
 *                         _offsets.ap[0], _sizes.ap[0], _values.ap[0], cpool, c_mask))
*/
              __pyx_t_9 = arrow::py::GetResultValue<std::shared_ptr< arrow::Array> >( arrow::LargeListViewArray::FromArrays((__pyx_v__offsets->ap[0]), (__pyx_v__sizes->ap[0]), (__pyx_v__values->ap[0]), __pyx_v_cpool, __pyx_v_c_mask)); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(4, 3319, __pyx_L8_error)
              __pyx_v_out = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_9);
            }

            /* "pyarrow/array.pxi":3318
 *                         type.sp_type, _offsets.ap[0], _sizes.ap[0], _values.ap[0], cpool, c_mask))
 *         else:
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 out = GetResultValue(
 *                     CLargeListViewArray.FromArrays(
*/
            /*finally:*/ {
              /*normal exit:*/{
                __Pyx_FastGIL_Forget();
                PyEval_RestoreThread(_save);
                goto __pyx_L9;
              }
              __pyx_L8_error: {
                __Pyx_FastGIL_Forget();
                PyEval_RestoreThread(_save);
                goto __pyx_L1_error;
              }
              __pyx_L9:;
            }
        }
      }
      __pyx_L3:;

      /* "pyarrow/array.pxi":3322
 *                     CLargeListViewArray.FromArrays(
 *                         _offsets.ap[0], _sizes.ap[0], _values.ap[0], cpool, c_mask))
 *         cdef Array result = pyarrow_wrap_array(out)             # <<<<<<<<<<<<<<
 *         result.validate()
 *         return result
*/
      __pyx_t_2 = pyarrow_wrap_array(__pyx_v_out); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 3322, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array))))) __PYX_ERR(4, 3322, __pyx_L1_error)
      __pyx_v_result = ((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_t_2);
      __pyx_t_2 = 0;

      /* "pyarrow/array.pxi":3323
 *                         _offsets.ap[0], _sizes.ap[0], _values.ap[0], cpool, c_mask))
 *         cdef Array result = pyarrow_wrap_array(out)
 *         result.validate()             # <<<<<<<<<<<<<<
 *         return result
 * 
*/
      __pyx_t_3 = ((PyObject *)__pyx_v_result);
      __Pyx_INCREF(__pyx_t_3);
      __pyx_t_5 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
        __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_validate, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 3323, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyarrow/array.pxi":3324
 *         cdef Array result = pyarrow_wrap_array(out)
 *         result.validate()
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF((PyObject *)__pyx_v_result);
      __pyx_r = ((PyObject *)__pyx_v_result);
      goto __pyx_L0;

      /* "pyarrow/array.pxi":3225
 *     Identical to ListViewArray, but with 64-bit offsets.
 *     """
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_arrays(offsets, sizes, values, DataType type=None, MemoryPool pool=None, mask=None):
 *         """
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_AddTraceback("pyarrow.lib.LargeListViewArray.from_arrays", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF((PyObject *)__pyx_v__offsets);
      __Pyx_XDECREF((PyObject *)__pyx_v__sizes);
      __Pyx_XDECREF((PyObject *)__pyx_v__values);
      __Pyx_XDECREF((PyObject *)__pyx_v_result);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":3326
 *         return result
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def values(self):
 *         """
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_18LargeListViewArray_6values_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_18LargeListViewArray_6values_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_18LargeListViewArray_6values___get__(((struct __pyx_obj_7pyarrow_3lib_LargeListViewArray *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_18LargeListViewArray_6values___get__(struct __pyx_obj_7pyarrow_3lib_LargeListViewArray *__pyx_v_self) {
       arrow::LargeListViewArray *__pyx_v_arr;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__get__", 0);

      /* "pyarrow/array.pxi":3382
 *         ]
 *         """
 *         cdef CLargeListViewArray* arr = <CLargeListViewArray*> self.ap             # <<<<<<<<<<<<<<
 *         return pyarrow_wrap_array(arr.values())
 * 
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "ap");
        __PYX_ERR(4, 3382, __pyx_L1_error)
      }
      __pyx_v_arr = (( arrow::LargeListViewArray *)__pyx_v_self->__pyx_base.__pyx_base.ap);

      /* "pyarrow/array.pxi":3383
 *         """
 *         cdef CLargeListViewArray* arr = <CLargeListViewArray*> self.ap
 *         return pyarrow_wrap_array(arr.values())             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = pyarrow_wrap_array(__pyx_v_arr->values()); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 3383, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":3326
 *         return result
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def values(self):
 *         """
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("pyarrow.lib.LargeListViewArray.values.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":3385
 *         return pyarrow_wrap_array(arr.values())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def offsets(self):
 *         """
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_18LargeListViewArray_7offsets_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_18LargeListViewArray_7offsets_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_18LargeListViewArray_7offsets___get__(((struct __pyx_obj_7pyarrow_3lib_LargeListViewArray *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_18LargeListViewArray_7offsets___get__(struct __pyx_obj_7pyarrow_3lib_LargeListViewArray *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__get__", 0);

      /* "pyarrow/array.pxi":3414
 *         ]
 *         """
 *         return pyarrow_wrap_array((<CLargeListViewArray*> self.ap).offsets())             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
      __Pyx_XDECREF(__pyx_r);
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "ap");
        __PYX_ERR(4, 3414, __pyx_L1_error)
      }
      __pyx_t_1 = pyarrow_wrap_array((( arrow::LargeListViewArray *)__pyx_v_self->__pyx_base.__pyx_base.ap)->offsets()); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 3414, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":3385
 *         return pyarrow_wrap_array(arr.values())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def offsets(self):
 *         """
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("pyarrow.lib.LargeListViewArray.offsets.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":3416
 *         return pyarrow_wrap_array((<CLargeListViewArray*> self.ap).offsets())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def sizes(self):
 *         """
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_18LargeListViewArray_5sizes_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_18LargeListViewArray_5sizes_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_18LargeListViewArray_5sizes___get__(((struct __pyx_obj_7pyarrow_3lib_LargeListViewArray *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_18LargeListViewArray_5sizes___get__(struct __pyx_obj_7pyarrow_3lib_LargeListViewArray *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__get__", 0);

      /* "pyarrow/array.pxi":3445
 *         ]
 *         """
 *         return pyarrow_wrap_array((<CLargeListViewArray*> self.ap).sizes())             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "ap");
        __PYX_ERR(4, 3445, __pyx_L1_error)
      }
      __pyx_t_1 = pyarrow_wrap_array((( arrow::LargeListViewArray *)__pyx_v_self->__pyx_base.__pyx_base.ap)->sizes()); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 3445, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":3416
 *         return pyarrow_wrap_array((<CLargeListViewArray*> self.ap).offsets())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def sizes(self):
 *         """
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("pyarrow.lib.LargeListViewArray.sizes.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":3453
 *     """
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_arrays(offsets, keys, items, DataType type=None, MemoryPool pool=None, mask=None):
 *         """
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_8MapArray_1from_arrays(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_8MapArray_from_arrays, "MapArray.from_arrays(offsets, keys, items, DataType type=None, MemoryPool pool=None, mask=None)\n\nConstruct MapArray from arrays of int32 offsets and key, item arrays.\n\nParameters\n----------\noffsets : array-like or sequence (int32 type)\nkeys : array-like or sequence (any type)\nitems : array-like or sequence (any type)\ntype : DataType, optional\n    If not specified, a default MapArray with the keys' and items' type is used.\npool : MemoryPool\nmask : Array (boolean type), optional\n    Indicate which values are null (True) or not null (False).\n\nReturns\n-------\nmap_array : MapArray\n\nExamples\n--------\nFirst, let's understand the structure of our dataset when viewed in a rectangular data model.\nThe total of 5 respondents answered the question \"How much did you like the movie x?\".\nThe value -1 in the integer array means that the value is missing. The boolean array\nrepresents the null bitmask corresponding to the missing values in the integer array.\n\n>>> import pyarrow as pa\n>>> movies_rectangular = np.ma.masked_array([\n...     [10, -1, -1],\n...     [8, 4, 5],\n...     [-1, 10, 3],\n...     [-1, -1, -1],\n...     [-1, -1, -1]\n... ],\n... [\n...     [False, True, True],\n...     [False, False, False],\n...     [True, False, False],\n...     [True, True, True],\n...     [True, True, True],\n... ])\n\nTo represent the same data with the MapArray and from_arrays, the data is\nformed like this:\n\n>>> offsets = [\n...     0, #  -- row 1 start\n...     1, #  -- row 2 start\n...     4, #  -- row 3 start\n...     6, #  -- row 4 start\n...     6, #  -- row 5 start\n...     6, #  -- row 5 end\n... ]\n>>> movies = [\n...     \"Dark Knight\", #  ---------------------------------- row 1\n...     \"Dark Knight\", \"Meet the Parents\", \"Superman\", #  -- row 2\n...     \"Meet the Parents\", \"Superman\", #  ----------------- row 3\n... ]\n>>> likings = [\n...     10, #  -------- row 1\n...     8, 4, 5, #  --- row 2\n...     10, 3 #  ------ row 3\n... ]\n>>> ""pa.MapArray.from_arrays(offsets, movies, likings).to_pandas()\n0                                  [(Dark Knight, 10)]\n1    [(Dark Knight, 8), (Meet the Parents, 4), (Sup...\n2              [(Meet the Parents, 10), (Superman, 3)]\n3                                                   []\n4                                                   []\ndtype: object\n\nIf the data in the empty rows needs to be marked as missing, it's possible\nto do so by modifying the offsets argument, so that we specify `None` as\nthe starting positions of the rows we want marked as missing. The end row\noffset still has to refer to the existing value from keys (and values):\n\n>>> offsets = [\n...     0, #  ----- row 1 start\n...     1, #  ----- row 2 start\n...     4, #  ----- row 3 start\n...     None, #  -- row 4 start\n...     None, #  -- row 5 start\n...     6, #  ----- row 5 end\n... ]\n>>> pa.MapArray.from_arrays(offsets, movies, likings).to_pandas()\n0                                  [(Dark Knight, 10)]\n1    [(Dark Knight, 8), (Meet the Parents, 4), (Sup...\n2              [(Meet the Parents, 10), (Superman, 3)]\n3                                                 None\n4                                                 None\ndtype: object");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_8MapArray_1from_arrays = {"from_arrays", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_8MapArray_1from_arrays, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_8MapArray_from_arrays};
    static PyObject *__pyx_pw_7pyarrow_3lib_8MapArray_1from_arrays(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_offsets = 0;
      PyObject *__pyx_v_keys = 0;
      PyObject *__pyx_v_items = 0;
      struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v_type = 0;
      struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_pool = 0;
      PyObject *__pyx_v_mask = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[6] = {0,0,0,0,0,0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("from_arrays (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_offsets,&__pyx_mstate_global->__pyx_n_u_keys,&__pyx_mstate_global->__pyx_n_u_items,&__pyx_mstate_global->__pyx_n_u_type,&__pyx_mstate_global->__pyx_n_u_pool,&__pyx_mstate_global->__pyx_n_u_mask,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(4, 3453, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  6:
            values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(4, 3453, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  5:
            values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(4, 3453, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  4:
            values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(4, 3453, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  3:
            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(4, 3453, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(4, 3453, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 3453, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "from_arrays", 0) < (0)) __PYX_ERR(4, 3453, __pyx_L3_error)

          /* "pyarrow/array.pxi":3454
 * 
 *     @staticmethod
 *     def from_arrays(offsets, keys, items, DataType type=None, MemoryPool pool=None, mask=None):             # <<<<<<<<<<<<<<
 *         """
 *         Construct MapArray from arrays of int32 offsets and key, item arrays.
*/
          if (!values[3]) values[3] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_7pyarrow_3lib_DataType *)Py_None));
          if (!values[4]) values[4] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)Py_None));
          if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)Py_None));
          for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("from_arrays", 0, 3, 6, i); __PYX_ERR(4, 3453, __pyx_L3_error) }
          }
        } else {
          switch (__pyx_nargs) {
            case  6:
            values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(4, 3453, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  5:
            values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(4, 3453, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  4:
            values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(4, 3453, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  3:
            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(4, 3453, __pyx_L3_error)
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(4, 3453, __pyx_L3_error)
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 3453, __pyx_L3_error)
            break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (!values[3]) values[3] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_7pyarrow_3lib_DataType *)Py_None));
          if (!values[4]) values[4] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)Py_None));
          if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)Py_None));
        }
        __pyx_v_offsets = values[0];
        __pyx_v_keys = values[1];
        __pyx_v_items = values[2];
        __pyx_v_type = ((struct __pyx_obj_7pyarrow_3lib_DataType *)values[3]);
        __pyx_v_pool = ((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)values[4]);
        __pyx_v_mask = values[5];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("from_arrays", 0, 3, 6, __pyx_nargs); __PYX_ERR(4, 3453, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.MapArray.from_arrays", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_type), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType, 1, "type", 0))) __PYX_ERR(4, 3454, __pyx_L1_error)
      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pool), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_MemoryPool, 1, "pool", 0))) __PYX_ERR(4, 3454, __pyx_L1_error)
      __pyx_r = __pyx_pf_7pyarrow_3lib_8MapArray_from_arrays(__pyx_v_offsets, __pyx_v_keys, __pyx_v_items, __pyx_v_type, __pyx_v_pool, __pyx_v_mask);

      /* "pyarrow/array.pxi":3453
 *     """
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_arrays(offsets, keys, items, DataType type=None, MemoryPool pool=None, mask=None):
 *         """
*/

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = NULL;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      goto __pyx_L7_cleaned_up;
      __pyx_L0:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __pyx_L7_cleaned_up:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_8MapArray_from_arrays(PyObject *__pyx_v_offsets, PyObject *__pyx_v_keys, PyObject *__pyx_v_items, struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v_type, struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_pool, PyObject *__pyx_v_mask) {
      struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v__offsets = 0;
      struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v__keys = 0;
      struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v__items = 0;
      std::shared_ptr< arrow::Array>  __pyx_v_out;
      std::shared_ptr< arrow::Buffer>  __pyx_v_c_mask;
       arrow::MemoryPool *__pyx_v_cpool;
      struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_result = 0;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
       arrow::MemoryPool *__pyx_t_1;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      size_t __pyx_t_5;
      PyObject *__pyx_t_6 = NULL;
      std::shared_ptr< arrow::Buffer>  __pyx_t_7;
      int __pyx_t_8;
      std::shared_ptr< arrow::Array>  __pyx_t_9;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("from_arrays", 0);

      /* "pyarrow/array.pxi":3550
 *             shared_ptr[CArray] out
 *             shared_ptr[CBuffer] c_mask
 *         cdef CMemoryPool* cpool = maybe_unbox_memory_pool(pool)             # <<<<<<<<<<<<<<
 * 
 *         _offsets = asarray(offsets, type='int32')
*/
      __pyx_t_1 = __pyx_f_7pyarrow_3lib_maybe_unbox_memory_pool(__pyx_v_pool); if (unlikely(__pyx_t_1 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(4, 3550, __pyx_L1_error)
      __pyx_v_cpool = __pyx_t_1;

      /* "pyarrow/array.pxi":3552
 *         cdef CMemoryPool* cpool = maybe_unbox_memory_pool(pool)
 * 
 *         _offsets = asarray(offsets, type='int32')             # <<<<<<<<<<<<<<
 *         _keys = asarray(keys)
 *         _items = asarray(items)
*/
      __pyx_t_3 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_asarray); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 3552, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
        assert(__pyx_t_3);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
        __pyx_t_5 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_3, __pyx_v_offsets};
        __pyx_t_6 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 3552, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_type, __pyx_mstate_global->__pyx_n_u_int32, __pyx_t_6, __pyx_callargs+2, 0) < (0)) __PYX_ERR(4, 3552, __pyx_L1_error)
        __pyx_t_2 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_6);
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 3552, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
      }
      if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array))))) __PYX_ERR(4, 3552, __pyx_L1_error)
      __pyx_v__offsets = ((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_t_2);
      __pyx_t_2 = 0;

      /* "pyarrow/array.pxi":3553
 * 
 *         _offsets = asarray(offsets, type='int32')
 *         _keys = asarray(keys)             # <<<<<<<<<<<<<<
 *         _items = asarray(items)
 * 
*/
      __pyx_t_4 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_asarray); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 3553, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_5 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
        assert(__pyx_t_4);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
        __pyx_t_5 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_keys};
        __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 3553, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
      }
      if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array))))) __PYX_ERR(4, 3553, __pyx_L1_error)
      __pyx_v__keys = ((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_t_2);
      __pyx_t_2 = 0;

      /* "pyarrow/array.pxi":3554
 *         _offsets = asarray(offsets, type='int32')
 *         _keys = asarray(keys)
 *         _items = asarray(items)             # <<<<<<<<<<<<<<
 * 
 *         c_mask = c_mask_inverted_from_obj(mask, pool)
*/
      __pyx_t_6 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_asarray); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 3554, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
        assert(__pyx_t_6);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
        __pyx_t_5 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_items};
        __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 3554, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
      }
      if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array))))) __PYX_ERR(4, 3554, __pyx_L1_error)
      __pyx_v__items = ((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_t_2);
      __pyx_t_2 = 0;

      /* "pyarrow/array.pxi":3556
 *         _items = asarray(items)
 * 
 *         c_mask = c_mask_inverted_from_obj(mask, pool)             # <<<<<<<<<<<<<<
 * 
 *         if type is not None:
*/
      __pyx_t_7 = __pyx_f_7pyarrow_3lib_c_mask_inverted_from_obj(__pyx_v_mask, __pyx_v_pool); if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 3556, __pyx_L1_error)
      __pyx_v_c_mask = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_7);

      /* "pyarrow/array.pxi":3558
 *         c_mask = c_mask_inverted_from_obj(mask, pool)
 * 
 *         if type is not None:             # <<<<<<<<<<<<<<
 *             with nogil:
 *                 out = GetResultValue(
*/
      __pyx_t_8 = (((PyObject *)__pyx_v_type) != Py_None);
      if (__pyx_t_8) {

        /* "pyarrow/array.pxi":3559
 * 
 *         if type is not None:
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 out = GetResultValue(
 *                     CMapArray.FromArraysAndType(
*/
        {
            PyThreadState * _save;
            _save = PyEval_SaveThread();
            __Pyx_FastGIL_Remember();
            /*try:*/ {

              /* "pyarrow/array.pxi":3562
 *                 out = GetResultValue(
 *                     CMapArray.FromArraysAndType(
 *                         type.sp_type, _offsets.sp_array,             # <<<<<<<<<<<<<<
 *                         _keys.sp_array, _items.sp_array, cpool, c_mask))
 *         else:
*/
              if (unlikely(((PyObject *)__pyx_v_type) == Py_None)) {
                PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_type");
                __Pyx_PyGILState_Release(__pyx_gilstate_save);
                __PYX_ERR(4, 3562, __pyx_L5_error)
              }
              if (unlikely(((PyObject *)__pyx_v__offsets) == Py_None)) {
                PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_array");
                __Pyx_PyGILState_Release(__pyx_gilstate_save);
                __PYX_ERR(4, 3562, __pyx_L5_error)
              }

              /* "pyarrow/array.pxi":3563
 *                     CMapArray.FromArraysAndType(
 *                         type.sp_type, _offsets.sp_array,
 *                         _keys.sp_array, _items.sp_array, cpool, c_mask))             # <<<<<<<<<<<<<<
 *         else:
 *             with nogil:
*/
              if (unlikely(((PyObject *)__pyx_v__keys) == Py_None)) {
                PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_array");
                __Pyx_PyGILState_Release(__pyx_gilstate_save);
                __PYX_ERR(4, 3563, __pyx_L5_error)
              }
              if (unlikely(((PyObject *)__pyx_v__items) == Py_None)) {
                PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_array");
                __Pyx_PyGILState_Release(__pyx_gilstate_save);
                __PYX_ERR(4, 3563, __pyx_L5_error)
              }

              /* "pyarrow/array.pxi":3560
 *         if type is not None:
 *             with nogil:
 *                 out = GetResultValue(             # <<<<<<<<<<<<<<
 *                     CMapArray.FromArraysAndType(
 *                         type.sp_type, _offsets.sp_array,
*/
              __pyx_t_9 = arrow::py::GetResultValue<std::shared_ptr< arrow::Array> >( arrow::MapArray:: FromArrays(__pyx_v_type->sp_type, __pyx_v__offsets->sp_array, __pyx_v__keys->sp_array, __pyx_v__items->sp_array, __pyx_v_cpool, __pyx_v_c_mask)); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(4, 3560, __pyx_L5_error)
              __pyx_v_out = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_9);
            }

            /* "pyarrow/array.pxi":3559
 * 
 *         if type is not None:
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 out = GetResultValue(
 *                     CMapArray.FromArraysAndType(
*/
            /*finally:*/ {
              /*normal exit:*/{
                __Pyx_FastGIL_Forget();
                PyEval_RestoreThread(_save);
                goto __pyx_L6;
              }
              __pyx_L5_error: {
                __Pyx_FastGIL_Forget();
                PyEval_RestoreThread(_save);
                goto __pyx_L1_error;
              }
              __pyx_L6:;
            }
        }

        /* "pyarrow/array.pxi":3558
 *         c_mask = c_mask_inverted_from_obj(mask, pool)
 * 
 *         if type is not None:             # <<<<<<<<<<<<<<
 *             with nogil:
 *                 out = GetResultValue(
*/
        goto __pyx_L3;
      }

      /* "pyarrow/array.pxi":3565
 *                         _keys.sp_array, _items.sp_array, cpool, c_mask))
 *         else:
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 out = GetResultValue(
 *                     CMapArray.FromArrays(_offsets.sp_array,
*/
      /*else*/ {
        {
            PyThreadState * _save;
            _save = PyEval_SaveThread();
            __Pyx_FastGIL_Remember();
            /*try:*/ {

              /* "pyarrow/array.pxi":3567
 *             with nogil:
 *                 out = GetResultValue(
 *                     CMapArray.FromArrays(_offsets.sp_array,             # <<<<<<<<<<<<<<
 *                                          _keys.sp_array,
 *                                          _items.sp_array, cpool, c_mask))
*/
              if (unlikely(((PyObject *)__pyx_v__offsets) == Py_None)) {
                PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_array");
                __Pyx_PyGILState_Release(__pyx_gilstate_save);
                __PYX_ERR(4, 3567, __pyx_L8_error)
              }

              /* "pyarrow/array.pxi":3568
 *                 out = GetResultValue(
 *                     CMapArray.FromArrays(_offsets.sp_array,
 *                                          _keys.sp_array,             # <<<<<<<<<<<<<<
 *                                          _items.sp_array, cpool, c_mask))
 *         cdef Array result = pyarrow_wrap_array(out)
*/
              if (unlikely(((PyObject *)__pyx_v__keys) == Py_None)) {
                PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_array");
                __Pyx_PyGILState_Release(__pyx_gilstate_save);
                __PYX_ERR(4, 3568, __pyx_L8_error)
              }

              /* "pyarrow/array.pxi":3569
 *                     CMapArray.FromArrays(_offsets.sp_array,
 *                                          _keys.sp_array,
 *                                          _items.sp_array, cpool, c_mask))             # <<<<<<<<<<<<<<
 *         cdef Array result = pyarrow_wrap_array(out)
 *         result.validate()
*/
              if (unlikely(((PyObject *)__pyx_v__items) == Py_None)) {
                PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_array");
                __Pyx_PyGILState_Release(__pyx_gilstate_save);
                __PYX_ERR(4, 3569, __pyx_L8_error)
              }

              /* "pyarrow/array.pxi":3566
 *         else:
 *             with nogil:
 *                 out = GetResultValue(             # <<<<<<<<<<<<<<
 *                     CMapArray.FromArrays(_offsets.sp_array,
 *                                          _keys.sp_array,
*/
              __pyx_t_9 = arrow::py::GetResultValue<std::shared_ptr< arrow::Array> >( arrow::MapArray::FromArrays(__pyx_v__offsets->sp_array, __pyx_v__keys->sp_array, __pyx_v__items->sp_array, __pyx_v_cpool, __pyx_v_c_mask)); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(4, 3566, __pyx_L8_error)
              __pyx_v_out = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_9);
            }

            /* "pyarrow/array.pxi":3565
 *                         _keys.sp_array, _items.sp_array, cpool, c_mask))
 *         else:
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 out = GetResultValue(
 *                     CMapArray.FromArrays(_offsets.sp_array,
*/
            /*finally:*/ {
              /*normal exit:*/{
                __Pyx_FastGIL_Forget();
                PyEval_RestoreThread(_save);
                goto __pyx_L9;
              }
              __pyx_L8_error: {
                __Pyx_FastGIL_Forget();
                PyEval_RestoreThread(_save);
                goto __pyx_L1_error;
              }
              __pyx_L9:;
            }
        }
      }
      __pyx_L3:;

      /* "pyarrow/array.pxi":3570
 *                                          _keys.sp_array,
 *                                          _items.sp_array, cpool, c_mask))
 *         cdef Array result = pyarrow_wrap_array(out)             # <<<<<<<<<<<<<<
 *         result.validate()
 *         return result
*/
      __pyx_t_2 = pyarrow_wrap_array(__pyx_v_out); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 3570, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array))))) __PYX_ERR(4, 3570, __pyx_L1_error)
      __pyx_v_result = ((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_t_2);
      __pyx_t_2 = 0;

      /* "pyarrow/array.pxi":3571
 *                                          _items.sp_array, cpool, c_mask))
 *         cdef Array result = pyarrow_wrap_array(out)
 *         result.validate()             # <<<<<<<<<<<<<<
 *         return result
 * 
*/
      __pyx_t_4 = ((PyObject *)__pyx_v_result);
      __Pyx_INCREF(__pyx_t_4);
      __pyx_t_5 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
        __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_validate, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 3571, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyarrow/array.pxi":3572
 *         cdef Array result = pyarrow_wrap_array(out)
 *         result.validate()
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF((PyObject *)__pyx_v_result);
      __pyx_r = ((PyObject *)__pyx_v_result);
      goto __pyx_L0;

      /* "pyarrow/array.pxi":3453
 *     """
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_arrays(offsets, keys, items, DataType type=None, MemoryPool pool=None, mask=None):
 *         """
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_AddTraceback("pyarrow.lib.MapArray.from_arrays", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF((PyObject *)__pyx_v__offsets);
      __Pyx_XDECREF((PyObject *)__pyx_v__keys);
      __Pyx_XDECREF((PyObject *)__pyx_v__items);
      __Pyx_XDECREF((PyObject *)__pyx_v_result);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":3574
 *         return result
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def keys(self):
 *         """Flattened array of keys across all maps in array"""
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_8MapArray_4keys_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_8MapArray_4keys_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_8MapArray_4keys___get__(((struct __pyx_obj_7pyarrow_3lib_MapArray *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_8MapArray_4keys___get__(struct __pyx_obj_7pyarrow_3lib_MapArray *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__get__", 0);

      /* "pyarrow/array.pxi":3577
 *     def keys(self):
 *         """Flattened array of keys across all maps in array"""
 *         return pyarrow_wrap_array((<CMapArray*> self.ap).keys())             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
      __Pyx_XDECREF(__pyx_r);
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "ap");
        __PYX_ERR(4, 3577, __pyx_L1_error)
      }
      __pyx_t_1 = pyarrow_wrap_array((( arrow::MapArray *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.ap)->keys()); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 3577, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":3574
 *         return result
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def keys(self):
 *         """Flattened array of keys across all maps in array"""
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("pyarrow.lib.MapArray.keys.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":3579
 *         return pyarrow_wrap_array((<CMapArray*> self.ap).keys())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def items(self):
 *         """Flattened array of items across all maps in array"""
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_8MapArray_5items_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_8MapArray_5items_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_8MapArray_5items___get__(((struct __pyx_obj_7pyarrow_3lib_MapArray *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_8MapArray_5items___get__(struct __pyx_obj_7pyarrow_3lib_MapArray *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__get__", 0);

      /* "pyarrow/array.pxi":3582
 *     def items(self):
 *         """Flattened array of items across all maps in array"""
 *         return pyarrow_wrap_array((<CMapArray*> self.ap).items())             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "ap");
        __PYX_ERR(4, 3582, __pyx_L1_error)
      }
      __pyx_t_1 = pyarrow_wrap_array((( arrow::MapArray *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.ap)->items()); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 3582, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":3579
 *         return pyarrow_wrap_array((<CMapArray*> self.ap).keys())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def items(self):
 *         """Flattened array of items across all maps in array"""
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("pyarrow.lib.MapArray.items.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":3590
 *     """
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_arrays(values, list_size=None, DataType type=None, mask=None):
 *         """
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_18FixedSizeListArray_1from_arrays(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_18FixedSizeListArray_from_arrays, "FixedSizeListArray.from_arrays(values, list_size=None, DataType type=None, mask=None)\n\nConstruct FixedSizeListArray from array of values and a list length.\n\nParameters\n----------\nvalues : Array (any type)\nlist_size : int\n    The fixed length of the lists.\ntype : DataType, optional\n    If not specified, a default ListType with the values' type and\n    `list_size` length is used.\nmask : Array (boolean type), optional\n    Indicate which values are null (True) or not null (False).\n\n\nReturns\n-------\nFixedSizeListArray\n\nExamples\n--------\n\nCreate from a values array and a list size:\n\n>>> import pyarrow as pa\n>>> values = pa.array([1, 2, 3, 4])\n>>> arr = pa.FixedSizeListArray.from_arrays(values, 2)\n>>> arr\n<pyarrow.lib.FixedSizeListArray object at ...>\n[\n  [\n    1,\n    2\n  ],\n  [\n    3,\n    4\n  ]\n]\n\nOr create from a values array, list size and matching type:\n\n>>> typ = pa.list_(pa.field(\"values\", pa.int64()), 2)\n>>> arr = pa.FixedSizeListArray.from_arrays(values,type=typ)\n>>> arr\n<pyarrow.lib.FixedSizeListArray object at ...>\n[\n  [\n    1,\n    2\n  ],\n  [\n    3,\n    4\n  ]\n]");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_18FixedSizeListArray_1from_arrays = {"from_arrays", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_18FixedSizeListArray_1from_arrays, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_18FixedSizeListArray_from_arrays};
    static PyObject *__pyx_pw_7pyarrow_3lib_18FixedSizeListArray_1from_arrays(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_values = 0;
      PyObject *__pyx_v_list_size = 0;
      struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v_type = 0;
      PyObject *__pyx_v_mask = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[4] = {0,0,0,0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("from_arrays (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_values,&__pyx_mstate_global->__pyx_n_u_list_size,&__pyx_mstate_global->__pyx_n_u_type,&__pyx_mstate_global->__pyx_n_u_mask,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(4, 3590, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  4:
            values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(4, 3590, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  3:
            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(4, 3590, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(4, 3590, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 3590, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "from_arrays", 0) < (0)) __PYX_ERR(4, 3590, __pyx_L3_error)

          /* "pyarrow/array.pxi":3591
 * 
 *     @staticmethod
 *     def from_arrays(values, list_size=None, DataType type=None, mask=None):             # <<<<<<<<<<<<<<
 *         """
 *         Construct FixedSizeListArray from array of values and a list length.
*/
          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
          if (!values[2]) values[2] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_7pyarrow_3lib_DataType *)Py_None));
          if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None));
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("from_arrays", 0, 1, 4, i); __PYX_ERR(4, 3590, __pyx_L3_error) }
          }
        } else {
          switch (__pyx_nargs) {
            case  4:
            values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(4, 3590, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  3:
            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(4, 3590, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(4, 3590, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 3590, __pyx_L3_error)
            break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
          if (!values[2]) values[2] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_7pyarrow_3lib_DataType *)Py_None));
          if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None));
        }
        __pyx_v_values = values[0];
        __pyx_v_list_size = values[1];
        __pyx_v_type = ((struct __pyx_obj_7pyarrow_3lib_DataType *)values[2]);
        __pyx_v_mask = values[3];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("from_arrays", 0, 1, 4, __pyx_nargs); __PYX_ERR(4, 3590, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.FixedSizeListArray.from_arrays", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_type), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType, 1, "type", 0))) __PYX_ERR(4, 3591, __pyx_L1_error)
      __pyx_r = __pyx_pf_7pyarrow_3lib_18FixedSizeListArray_from_arrays(__pyx_v_values, __pyx_v_list_size, __pyx_v_type, __pyx_v_mask);

      /* "pyarrow/array.pxi":3590
 *     """
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_arrays(values, list_size=None, DataType type=None, mask=None):
 *         """
*/

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = NULL;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      goto __pyx_L7_cleaned_up;
      __pyx_L0:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __pyx_L7_cleaned_up:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_18FixedSizeListArray_from_arrays(PyObject *__pyx_v_values, PyObject *__pyx_v_list_size, struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v_type, PyObject *__pyx_v_mask) {
      struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v__values = 0;
      int32_t __pyx_v__list_size;
      arrow::Result<std::shared_ptr< arrow::Array> >  __pyx_v_c_result;
      std::shared_ptr< arrow::Buffer>  __pyx_v_c_mask;
      struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_result = 0;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      size_t __pyx_t_4;
      std::shared_ptr< arrow::Buffer>  __pyx_t_5;
      int __pyx_t_6;
      int32_t __pyx_t_7;
      std::shared_ptr< arrow::Array>  __pyx_t_8;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("from_arrays", 0);

      /* "pyarrow/array.pxi":3654
 *             CResult[shared_ptr[CArray]] c_result
 * 
 *         _values = asarray(values)             # <<<<<<<<<<<<<<
 * 
 *         c_mask = c_mask_inverted_from_obj(mask, None)
*/
      __pyx_t_2 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_asarray); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 3654, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
        assert(__pyx_t_2);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
        __pyx_t_4 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_values};
        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 3654, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array))))) __PYX_ERR(4, 3654, __pyx_L1_error)
      __pyx_v__values = ((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_t_1);
      __pyx_t_1 = 0;

      /* "pyarrow/array.pxi":3656
 *         _values = asarray(values)
 * 
 *         c_mask = c_mask_inverted_from_obj(mask, None)             # <<<<<<<<<<<<<<
 * 
 *         if type is not None:
*/
      __pyx_t_5 = __pyx_f_7pyarrow_3lib_c_mask_inverted_from_obj(__pyx_v_mask, ((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)Py_None)); if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 3656, __pyx_L1_error)
      __pyx_v_c_mask = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_5);

      /* "pyarrow/array.pxi":3658
 *         c_mask = c_mask_inverted_from_obj(mask, None)
 * 
 *         if type is not None:             # <<<<<<<<<<<<<<
 *             if list_size is not None:
 *                 raise ValueError("Cannot specify both list_size and type")
*/
      __pyx_t_6 = (((PyObject *)__pyx_v_type) != Py_None);
      if (__pyx_t_6) {

        /* "pyarrow/array.pxi":3659
 * 
 *         if type is not None:
 *             if list_size is not None:             # <<<<<<<<<<<<<<
 *                 raise ValueError("Cannot specify both list_size and type")
 *             with nogil:
*/
        __pyx_t_6 = (__pyx_v_list_size != Py_None);
        if (unlikely(__pyx_t_6)) {

          /* "pyarrow/array.pxi":3660
 *         if type is not None:
 *             if list_size is not None:
 *                 raise ValueError("Cannot specify both list_size and type")             # <<<<<<<<<<<<<<
 *             with nogil:
 *                 c_result = CFixedSizeListArray.FromArraysAndType(
*/
          __pyx_t_3 = NULL;
          __pyx_t_4 = 1;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Cannot_specify_both_list_size_an};
            __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 3660, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_1);
          }
          __Pyx_Raise(__pyx_t_1, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __PYX_ERR(4, 3660, __pyx_L1_error)

          /* "pyarrow/array.pxi":3659
 * 
 *         if type is not None:
 *             if list_size is not None:             # <<<<<<<<<<<<<<
 *                 raise ValueError("Cannot specify both list_size and type")
 *             with nogil:
*/
        }

        /* "pyarrow/array.pxi":3661
 *             if list_size is not None:
 *                 raise ValueError("Cannot specify both list_size and type")
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 c_result = CFixedSizeListArray.FromArraysAndType(
 *                     _values.sp_array, type.sp_type, c_mask)
*/
        {
            PyThreadState * _save;
            _save = PyEval_SaveThread();
            __Pyx_FastGIL_Remember();
            /*try:*/ {

              /* "pyarrow/array.pxi":3663
 *             with nogil:
 *                 c_result = CFixedSizeListArray.FromArraysAndType(
 *                     _values.sp_array, type.sp_type, c_mask)             # <<<<<<<<<<<<<<
 *         else:
 *             if list_size is None:
*/
              if (unlikely(((PyObject *)__pyx_v__values) == Py_None)) {
                PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_array");
                __Pyx_PyGILState_Release(__pyx_gilstate_save);
                __PYX_ERR(4, 3663, __pyx_L6_error)
              }
              if (unlikely(((PyObject *)__pyx_v_type) == Py_None)) {
                PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_type");
                __Pyx_PyGILState_Release(__pyx_gilstate_save);
                __PYX_ERR(4, 3663, __pyx_L6_error)
              }

              /* "pyarrow/array.pxi":3662
 *                 raise ValueError("Cannot specify both list_size and type")
 *             with nogil:
 *                 c_result = CFixedSizeListArray.FromArraysAndType(             # <<<<<<<<<<<<<<
 *                     _values.sp_array, type.sp_type, c_mask)
 *         else:
*/
              __pyx_v_c_result =  arrow::FixedSizeListArray:: FromArrays(__pyx_v__values->sp_array, __pyx_v_type->sp_type, __pyx_v_c_mask);
            }

            /* "pyarrow/array.pxi":3661
 *             if list_size is not None:
 *                 raise ValueError("Cannot specify both list_size and type")
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 c_result = CFixedSizeListArray.FromArraysAndType(
 *                     _values.sp_array, type.sp_type, c_mask)
*/
            /*finally:*/ {
              /*normal exit:*/{
                __Pyx_FastGIL_Forget();
                PyEval_RestoreThread(_save);
                goto __pyx_L7;
              }
              __pyx_L6_error: {
                __Pyx_FastGIL_Forget();
                PyEval_RestoreThread(_save);
                goto __pyx_L1_error;
              }
              __pyx_L7:;
            }
        }

        /* "pyarrow/array.pxi":3658
 *         c_mask = c_mask_inverted_from_obj(mask, None)
 * 
 *         if type is not None:             # <<<<<<<<<<<<<<
 *             if list_size is not None:
 *                 raise ValueError("Cannot specify both list_size and type")
*/
        goto __pyx_L3;
      }

      /* "pyarrow/array.pxi":3665
 *                     _values.sp_array, type.sp_type, c_mask)
 *         else:
 *             if list_size is None:             # <<<<<<<<<<<<<<
 *                 raise ValueError("Should specify one of list_size and type")
 *             _list_size = <int32_t>list_size
*/
      /*else*/ {
        __pyx_t_6 = (__pyx_v_list_size == Py_None);
        if (unlikely(__pyx_t_6)) {

          /* "pyarrow/array.pxi":3666
 *         else:
 *             if list_size is None:
 *                 raise ValueError("Should specify one of list_size and type")             # <<<<<<<<<<<<<<
 *             _list_size = <int32_t>list_size
 *             with nogil:
*/
          __pyx_t_3 = NULL;
          __pyx_t_4 = 1;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Should_specify_one_of_list_size};
            __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 3666, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_1);
          }
          __Pyx_Raise(__pyx_t_1, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __PYX_ERR(4, 3666, __pyx_L1_error)

          /* "pyarrow/array.pxi":3665
 *                     _values.sp_array, type.sp_type, c_mask)
 *         else:
 *             if list_size is None:             # <<<<<<<<<<<<<<
 *                 raise ValueError("Should specify one of list_size and type")
 *             _list_size = <int32_t>list_size
*/
        }

        /* "pyarrow/array.pxi":3667
 *             if list_size is None:
 *                 raise ValueError("Should specify one of list_size and type")
 *             _list_size = <int32_t>list_size             # <<<<<<<<<<<<<<
 *             with nogil:
 *                 c_result = CFixedSizeListArray.FromArrays(
*/
        __pyx_t_7 = __Pyx_PyLong_As_int32_t(__pyx_v_list_size); if (unlikely((__pyx_t_7 == ((int32_t)-1)) && PyErr_Occurred())) __PYX_ERR(4, 3667, __pyx_L1_error)
        __pyx_v__list_size = ((int32_t)__pyx_t_7);

        /* "pyarrow/array.pxi":3668
 *                 raise ValueError("Should specify one of list_size and type")
 *             _list_size = <int32_t>list_size
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 c_result = CFixedSizeListArray.FromArrays(
 *                     _values.sp_array, _list_size, c_mask)
*/
        {
            PyThreadState * _save;
            _save = PyEval_SaveThread();
            __Pyx_FastGIL_Remember();
            /*try:*/ {

              /* "pyarrow/array.pxi":3670
 *             with nogil:
 *                 c_result = CFixedSizeListArray.FromArrays(
 *                     _values.sp_array, _list_size, c_mask)             # <<<<<<<<<<<<<<
 *         cdef Array result = pyarrow_wrap_array(GetResultValue(c_result))
 *         result.validate()
*/
              if (unlikely(((PyObject *)__pyx_v__values) == Py_None)) {
                PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_array");
                __Pyx_PyGILState_Release(__pyx_gilstate_save);
                __PYX_ERR(4, 3670, __pyx_L10_error)
              }

              /* "pyarrow/array.pxi":3669
 *             _list_size = <int32_t>list_size
 *             with nogil:
 *                 c_result = CFixedSizeListArray.FromArrays(             # <<<<<<<<<<<<<<
 *                     _values.sp_array, _list_size, c_mask)
 *         cdef Array result = pyarrow_wrap_array(GetResultValue(c_result))
*/
              __pyx_v_c_result =  arrow::FixedSizeListArray::FromArrays(__pyx_v__values->sp_array, __pyx_v__list_size, __pyx_v_c_mask);
            }

            /* "pyarrow/array.pxi":3668
 *                 raise ValueError("Should specify one of list_size and type")
 *             _list_size = <int32_t>list_size
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 c_result = CFixedSizeListArray.FromArrays(
 *                     _values.sp_array, _list_size, c_mask)
*/
            /*finally:*/ {
              /*normal exit:*/{
                __Pyx_FastGIL_Forget();
                PyEval_RestoreThread(_save);
                goto __pyx_L11;
              }
              __pyx_L10_error: {
                __Pyx_FastGIL_Forget();
                PyEval_RestoreThread(_save);
                goto __pyx_L1_error;
              }
              __pyx_L11:;
            }
        }
      }
      __pyx_L3:;

      /* "pyarrow/array.pxi":3671
 *                 c_result = CFixedSizeListArray.FromArrays(
 *                     _values.sp_array, _list_size, c_mask)
 *         cdef Array result = pyarrow_wrap_array(GetResultValue(c_result))             # <<<<<<<<<<<<<<
 *         result.validate()
 *         return result
*/
      __pyx_t_8 = arrow::py::GetResultValue<std::shared_ptr< arrow::Array> >(__pyx_v_c_result); if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 3671, __pyx_L1_error)
      __pyx_t_1 = pyarrow_wrap_array(__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 3671, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array))))) __PYX_ERR(4, 3671, __pyx_L1_error)
      __pyx_v_result = ((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_t_1);
      __pyx_t_1 = 0;

      /* "pyarrow/array.pxi":3672
 *                     _values.sp_array, _list_size, c_mask)
 *         cdef Array result = pyarrow_wrap_array(GetResultValue(c_result))
 *         result.validate()             # <<<<<<<<<<<<<<
 *         return result
 * 
*/
      __pyx_t_3 = ((PyObject *)__pyx_v_result);
      __Pyx_INCREF(__pyx_t_3);
      __pyx_t_4 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_validate, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 3672, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "pyarrow/array.pxi":3673
 *         cdef Array result = pyarrow_wrap_array(GetResultValue(c_result))
 *         result.validate()
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF((PyObject *)__pyx_v_result);
      __pyx_r = ((PyObject *)__pyx_v_result);
      goto __pyx_L0;

      /* "pyarrow/array.pxi":3590
 *     """
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_arrays(values, list_size=None, DataType type=None, mask=None):
 *         """
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_AddTraceback("pyarrow.lib.FixedSizeListArray.from_arrays", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF((PyObject *)__pyx_v__values);
      __Pyx_XDECREF((PyObject *)__pyx_v_result);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":3675
 *         return result
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def values(self):
 *         """
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_18FixedSizeListArray_6values_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_18FixedSizeListArray_6values_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_18FixedSizeListArray_6values___get__(((struct __pyx_obj_7pyarrow_3lib_FixedSizeListArray *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_18FixedSizeListArray_6values___get__(struct __pyx_obj_7pyarrow_3lib_FixedSizeListArray *__pyx_v_self) {
       arrow::FixedSizeListArray *__pyx_v_arr;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__get__", 0);

      /* "pyarrow/array.pxi":3713
 * 
 *         """
 *         cdef CFixedSizeListArray* arr = <CFixedSizeListArray*> self.ap             # <<<<<<<<<<<<<<
 *         return pyarrow_wrap_array(arr.values())
 * 
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "ap");
        __PYX_ERR(4, 3713, __pyx_L1_error)
      }
      __pyx_v_arr = (( arrow::FixedSizeListArray *)__pyx_v_self->__pyx_base.__pyx_base.ap);

      /* "pyarrow/array.pxi":3714
 *         """
 *         cdef CFixedSizeListArray* arr = <CFixedSizeListArray*> self.ap
 *         return pyarrow_wrap_array(arr.values())             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = pyarrow_wrap_array(__pyx_v_arr->values()); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 3714, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":3675
 *         return result
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def values(self):
 *         """
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("pyarrow.lib.FixedSizeListArray.values.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":3722
 *     """
 * 
 *     def child(self, int pos):             # <<<<<<<<<<<<<<
 *         """
 *         DEPRECATED, use field() instead.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_10UnionArray_1child(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_10UnionArray_child, "UnionArray.child(self, int pos)\n\nDEPRECATED, use field() instead.\n\nParameters\n----------\npos : int\n    The physical index of the union child field (not its type code).\n\nReturns\n-------\nfield : pyarrow.Field\n    The given child field.");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_10UnionArray_1child = {"child", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10UnionArray_1child, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10UnionArray_child};
    static PyObject *__pyx_pw_7pyarrow_3lib_10UnionArray_1child(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      int __pyx_v_pos;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("child (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pos,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(4, 3722, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 3722, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "child", 0) < (0)) __PYX_ERR(4, 3722, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("child", 1, 1, 1, i); __PYX_ERR(4, 3722, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 1)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 3722, __pyx_L3_error)
        }
        __pyx_v_pos = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_pos == (int)-1) && PyErr_Occurred())) __PYX_ERR(4, 3722, __pyx_L3_error)
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("child", 1, 1, 1, __pyx_nargs); __PYX_ERR(4, 3722, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.UnionArray.child", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_10UnionArray_child(((struct __pyx_obj_7pyarrow_3lib_UnionArray *)__pyx_v_self), __pyx_v_pos);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_10UnionArray_child(struct __pyx_obj_7pyarrow_3lib_UnionArray *__pyx_v_self, int __pyx_v_pos) {
      PyObject *__pyx_v_warnings = NULL;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      size_t __pyx_t_4;
      PyObject *__pyx_t_5 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("child", 0);

      /* "pyarrow/array.pxi":3736
 *             The given child field.
 *         """
 *         import warnings             # <<<<<<<<<<<<<<
 *         warnings.warn("child is deprecated, use field", FutureWarning)
 *         return self.field(pos)
*/
      __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_warnings, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 3736, __pyx_L1_error)
      __pyx_t_1 = __pyx_t_2;
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_v_warnings = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "pyarrow/array.pxi":3737
 *         """
 *         import warnings
 *         warnings.warn("child is deprecated, use field", FutureWarning)             # <<<<<<<<<<<<<<
 *         return self.field(pos)
 * 
*/
      __pyx_t_3 = __pyx_v_warnings;
      __Pyx_INCREF(__pyx_t_3);
      __pyx_t_4 = 0;
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_child_is_deprecated_use_field, ((PyObject *)(((PyTypeObject*)PyExc_FutureWarning)))};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_warn, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 3737, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "pyarrow/array.pxi":3738
 *         import warnings
 *         warnings.warn("child is deprecated, use field", FutureWarning)
 *         return self.field(pos)             # <<<<<<<<<<<<<<
 * 
 *     def field(self, int pos):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = ((PyObject *)__pyx_v_self);
      __Pyx_INCREF(__pyx_t_3);
      __pyx_t_5 = __Pyx_PyLong_From_int(__pyx_v_pos); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 3738, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_4 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_field, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 3738, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":3722
 *     """
 * 
 *     def child(self, int pos):             # <<<<<<<<<<<<<<
 *         """
 *         DEPRECATED, use field() instead.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_AddTraceback("pyarrow.lib.UnionArray.child", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_warnings);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":3740
 *         return self.field(pos)
 * 
 *     def field(self, int pos):             # <<<<<<<<<<<<<<
 *         """
 *         Return the given child field as an individual array.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_10UnionArray_3field(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_10UnionArray_2field, "UnionArray.field(self, int pos)\n\nReturn the given child field as an individual array.\n\nFor sparse unions, the returned array has its offset, length,\nand null count adjusted.\n\nFor dense unions, the returned array is unchanged.\n\nParameters\n----------\npos : int\n    The physical index of the union child field (not its type code).\n\nReturns\n-------\nfield : Array\n    The given child field.");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_10UnionArray_3field = {"field", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10UnionArray_3field, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10UnionArray_2field};
    static PyObject *__pyx_pw_7pyarrow_3lib_10UnionArray_3field(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      int __pyx_v_pos;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("field (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pos,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(4, 3740, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 3740, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "field", 0) < (0)) __PYX_ERR(4, 3740, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("field", 1, 1, 1, i); __PYX_ERR(4, 3740, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 1)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 3740, __pyx_L3_error)
        }
        __pyx_v_pos = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_pos == (int)-1) && PyErr_Occurred())) __PYX_ERR(4, 3740, __pyx_L3_error)
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("field", 1, 1, 1, __pyx_nargs); __PYX_ERR(4, 3740, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.UnionArray.field", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_10UnionArray_2field(((struct __pyx_obj_7pyarrow_3lib_UnionArray *)__pyx_v_self), __pyx_v_pos);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_10UnionArray_2field(struct __pyx_obj_7pyarrow_3lib_UnionArray *__pyx_v_self, int __pyx_v_pos) {
      std::shared_ptr< arrow::Array>  __pyx_v_result;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      int __pyx_t_1;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      PyObject *__pyx_t_5 = NULL;
      size_t __pyx_t_6;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("field", 0);

      /* "pyarrow/array.pxi":3760
 *         """
 *         cdef shared_ptr[CArray] result
 *         result = (<CUnionArray*> self.ap).field(pos)             # <<<<<<<<<<<<<<
 *         if result != NULL:
 *             return pyarrow_wrap_array(result)
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "ap");
        __PYX_ERR(4, 3760, __pyx_L1_error)
      }
      __pyx_v_result = (( arrow::UnionArray *)__pyx_v_self->__pyx_base.ap)->field(__pyx_v_pos);

      /* "pyarrow/array.pxi":3761
 *         cdef shared_ptr[CArray] result
 *         result = (<CUnionArray*> self.ap).field(pos)
 *         if result != NULL:             # <<<<<<<<<<<<<<
 *             return pyarrow_wrap_array(result)
 *         raise KeyError(f"UnionArray does not have child {pos}")
*/
      __pyx_t_1 = ((__pyx_v_result != NULL) != 0);
      if (__pyx_t_1) {

        /* "pyarrow/array.pxi":3762
 *         result = (<CUnionArray*> self.ap).field(pos)
 *         if result != NULL:
 *             return pyarrow_wrap_array(result)             # <<<<<<<<<<<<<<
 *         raise KeyError(f"UnionArray does not have child {pos}")
 * 
*/
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_2 = pyarrow_wrap_array(__pyx_v_result); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 3762, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        goto __pyx_L0;

        /* "pyarrow/array.pxi":3761
 *         cdef shared_ptr[CArray] result
 *         result = (<CUnionArray*> self.ap).field(pos)
 *         if result != NULL:             # <<<<<<<<<<<<<<
 *             return pyarrow_wrap_array(result)
 *         raise KeyError(f"UnionArray does not have child {pos}")
*/
      }

      /* "pyarrow/array.pxi":3763
 *         if result != NULL:
 *             return pyarrow_wrap_array(result)
 *         raise KeyError(f"UnionArray does not have child {pos}")             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
      __pyx_t_3 = NULL;
      __pyx_t_4 = __Pyx_PyUnicode_From_int(__pyx_v_pos, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 3763, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_UnionArray_does_not_have_child, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 3763, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_6 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
        __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_KeyError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 3763, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
      }
      __Pyx_Raise(__pyx_t_2, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __PYX_ERR(4, 3763, __pyx_L1_error)

      /* "pyarrow/array.pxi":3740
 *         return self.field(pos)
 * 
 *     def field(self, int pos):             # <<<<<<<<<<<<<<
 *         """
 *         Return the given child field as an individual array.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_AddTraceback("pyarrow.lib.UnionArray.field", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":3765
 *         raise KeyError(f"UnionArray does not have child {pos}")
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def type_codes(self):
 *         """Get the type codes array."""
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_10UnionArray_10type_codes_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_10UnionArray_10type_codes_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_10UnionArray_10type_codes___get__(((struct __pyx_obj_7pyarrow_3lib_UnionArray *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_10UnionArray_10type_codes___get__(struct __pyx_obj_7pyarrow_3lib_UnionArray *__pyx_v_self) {
      PyObject *__pyx_v_buf = NULL;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      PyObject *__pyx_t_5 = NULL;
      size_t __pyx_t_6;
      Py_ssize_t __pyx_t_7;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__get__", 0);

      /* "pyarrow/array.pxi":3768
 *     def type_codes(self):
 *         """Get the type codes array."""
 *         buf = pyarrow_wrap_buffer((<CUnionArray*> self.ap).type_codes())             # <<<<<<<<<<<<<<
 *         return Array.from_buffers(int8(), len(self), [None, buf])
 * 
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "ap");
        __PYX_ERR(4, 3768, __pyx_L1_error)
      }
      __pyx_t_1 = pyarrow_wrap_buffer((( arrow::UnionArray *)__pyx_v_self->__pyx_base.ap)->type_codes()); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 3768, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_v_buf = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "pyarrow/array.pxi":3769
 *         """Get the type codes array."""
 *         buf = pyarrow_wrap_buffer((<CUnionArray*> self.ap).type_codes())
 *         return Array.from_buffers(int8(), len(self), [None, buf])             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_4 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_int8); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 3769, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
        assert(__pyx_t_4);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
        __pyx_t_6 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
        __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 3769, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      __pyx_t_7 = PyObject_Length(((PyObject *)__pyx_v_self)); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(4, 3769, __pyx_L1_error)
      __pyx_t_5 = PyLong_FromSsize_t(__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 3769, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_4 = PyList_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 3769, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_INCREF(Py_None);
      __Pyx_GIVEREF(Py_None);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, Py_None) != (0)) __PYX_ERR(4, 3769, __pyx_L1_error);
      __Pyx_INCREF(__pyx_v_buf);
      __Pyx_GIVEREF(__pyx_v_buf);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 1, __pyx_v_buf) != (0)) __PYX_ERR(4, 3769, __pyx_L1_error);
      __pyx_t_6 = 0;
      {
        PyObject *__pyx_callargs[4] = {__pyx_t_2, __pyx_t_3, __pyx_t_5, __pyx_t_4};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_from_buffers, __pyx_callargs+__pyx_t_6, (4-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 3769, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":3765
 *         raise KeyError(f"UnionArray does not have child {pos}")
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def type_codes(self):
 *         """Get the type codes array."""
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_AddTraceback("pyarrow.lib.UnionArray.type_codes.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_buf);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":3771
 *         return Array.from_buffers(int8(), len(self), [None, buf])
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def offsets(self):
 *         """
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_10UnionArray_7offsets_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_10UnionArray_7offsets_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_10UnionArray_7offsets___get__(((struct __pyx_obj_7pyarrow_3lib_UnionArray *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_10UnionArray_7offsets___get__(struct __pyx_obj_7pyarrow_3lib_UnionArray *__pyx_v_self) {
       arrow::DenseUnionArray *__pyx_v_dense;
      PyObject *__pyx_v_buf = NULL;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_t_2;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      size_t __pyx_t_5;
      PyObject *__pyx_t_6 = NULL;
      PyObject *__pyx_t_7 = NULL;
      Py_ssize_t __pyx_t_8;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__get__", 0);

      /* "pyarrow/array.pxi":3778
 *         Does not account for any slice offset.
 *         """
 *         if self.type.mode != "dense":             # <<<<<<<<<<<<<<
 *             raise ArrowTypeError("Can only get value offsets for dense arrays")
 *         cdef CDenseUnionArray* dense = <CDenseUnionArray*> self.ap
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "type");
        __PYX_ERR(4, 3778, __pyx_L1_error)
      }
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx_base.type), __pyx_mstate_global->__pyx_n_u_mode); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 3778, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_dense, Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(4, 3778, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(__pyx_t_2)) {

        /* "pyarrow/array.pxi":3779
 *         """
 *         if self.type.mode != "dense":
 *             raise ArrowTypeError("Can only get value offsets for dense arrays")             # <<<<<<<<<<<<<<
 *         cdef CDenseUnionArray* dense = <CDenseUnionArray*> self.ap
 *         buf = pyarrow_wrap_buffer(dense.value_offsets())
*/
        __pyx_t_3 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ArrowTypeError); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 3779, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Can_only_get_value_offsets_for_d};
          __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 3779, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
        }
        __Pyx_Raise(__pyx_t_1, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __PYX_ERR(4, 3779, __pyx_L1_error)

        /* "pyarrow/array.pxi":3778
 *         Does not account for any slice offset.
 *         """
 *         if self.type.mode != "dense":             # <<<<<<<<<<<<<<
 *             raise ArrowTypeError("Can only get value offsets for dense arrays")
 *         cdef CDenseUnionArray* dense = <CDenseUnionArray*> self.ap
*/
      }

      /* "pyarrow/array.pxi":3780
 *         if self.type.mode != "dense":
 *             raise ArrowTypeError("Can only get value offsets for dense arrays")
 *         cdef CDenseUnionArray* dense = <CDenseUnionArray*> self.ap             # <<<<<<<<<<<<<<
 *         buf = pyarrow_wrap_buffer(dense.value_offsets())
 *         return Array.from_buffers(int32(), len(self), [None, buf])
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "ap");
        __PYX_ERR(4, 3780, __pyx_L1_error)
      }
      __pyx_v_dense = (( arrow::DenseUnionArray *)__pyx_v_self->__pyx_base.ap);

      /* "pyarrow/array.pxi":3781
 *             raise ArrowTypeError("Can only get value offsets for dense arrays")
 *         cdef CDenseUnionArray* dense = <CDenseUnionArray*> self.ap
 *         buf = pyarrow_wrap_buffer(dense.value_offsets())             # <<<<<<<<<<<<<<
 *         return Array.from_buffers(int32(), len(self), [None, buf])
 * 
*/
      __pyx_t_1 = pyarrow_wrap_buffer(__pyx_v_dense->value_offsets()); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 3781, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_v_buf = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "pyarrow/array.pxi":3782
 *         cdef CDenseUnionArray* dense = <CDenseUnionArray*> self.ap
 *         buf = pyarrow_wrap_buffer(dense.value_offsets())
 *         return Array.from_buffers(int32(), len(self), [None, buf])             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_4 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array);
      __Pyx_INCREF(__pyx_t_4);
      __pyx_t_6 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_int32); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 3782, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_5 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
        assert(__pyx_t_6);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
        __pyx_t_5 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
        __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 3782, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      __pyx_t_8 = PyObject_Length(((PyObject *)__pyx_v_self)); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(4, 3782, __pyx_L1_error)
      __pyx_t_7 = PyLong_FromSsize_t(__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 3782, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_6 = PyList_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 3782, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_INCREF(Py_None);
      __Pyx_GIVEREF(Py_None);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 0, Py_None) != (0)) __PYX_ERR(4, 3782, __pyx_L1_error);
      __Pyx_INCREF(__pyx_v_buf);
      __Pyx_GIVEREF(__pyx_v_buf);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 1, __pyx_v_buf) != (0)) __PYX_ERR(4, 3782, __pyx_L1_error);
      __pyx_t_5 = 0;
      {
        PyObject *__pyx_callargs[4] = {__pyx_t_4, __pyx_t_3, __pyx_t_7, __pyx_t_6};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_from_buffers, __pyx_callargs+__pyx_t_5, (4-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 3782, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":3771
 *         return Array.from_buffers(int8(), len(self), [None, buf])
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def offsets(self):
 *         """
*/

      /* 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_6);
      __Pyx_XDECREF(__pyx_t_7);
      __Pyx_AddTraceback("pyarrow.lib.UnionArray.offsets.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_buf);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":3784
 *         return Array.from_buffers(int32(), len(self), [None, buf])
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_dense(Array types, Array value_offsets, list children,
 *                    list field_names=None, list type_codes=None):
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_10UnionArray_5from_dense(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_10UnionArray_4from_dense, "UnionArray.from_dense(Array types, Array value_offsets, list children, list field_names=None, list type_codes=None)\n\nConstruct dense UnionArray from arrays of int8 types, int32 offsets and\nchildren arrays\n\nParameters\n----------\ntypes : Array (int8 type)\nvalue_offsets : Array (int32 type)\nchildren : list\nfield_names : list\ntype_codes : list\n\nReturns\n-------\nunion_array : UnionArray");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_10UnionArray_5from_dense = {"from_dense", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10UnionArray_5from_dense, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10UnionArray_4from_dense};
    static PyObject *__pyx_pw_7pyarrow_3lib_10UnionArray_5from_dense(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_types = 0;
      struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_value_offsets = 0;
      PyObject *__pyx_v_children = 0;
      PyObject *__pyx_v_field_names = 0;
      PyObject *__pyx_v_type_codes = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[5] = {0,0,0,0,0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("from_dense (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_types,&__pyx_mstate_global->__pyx_n_u_value_offsets,&__pyx_mstate_global->__pyx_n_u_children,&__pyx_mstate_global->__pyx_n_u_field_names,&__pyx_mstate_global->__pyx_n_u_type_codes,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(4, 3784, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  5:
            values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(4, 3784, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  4:
            values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(4, 3784, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  3:
            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(4, 3784, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(4, 3784, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 3784, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "from_dense", 0) < (0)) __PYX_ERR(4, 3784, __pyx_L3_error)

          /* "pyarrow/array.pxi":3786
 *     @staticmethod
 *     def from_dense(Array types, Array value_offsets, list children,
 *                    list field_names=None, list type_codes=None):             # <<<<<<<<<<<<<<
 *         """
 *         Construct dense UnionArray from arrays of int8 types, int32 offsets and
*/
          if (!values[3]) values[3] = __Pyx_NewRef(((PyObject*)Py_None));
          if (!values[4]) values[4] = __Pyx_NewRef(((PyObject*)Py_None));
          for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("from_dense", 0, 3, 5, i); __PYX_ERR(4, 3784, __pyx_L3_error) }
          }
        } else {
          switch (__pyx_nargs) {
            case  5:
            values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(4, 3784, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  4:
            values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(4, 3784, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  3:
            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(4, 3784, __pyx_L3_error)
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(4, 3784, __pyx_L3_error)
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 3784, __pyx_L3_error)
            break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (!values[3]) values[3] = __Pyx_NewRef(((PyObject*)Py_None));
          if (!values[4]) values[4] = __Pyx_NewRef(((PyObject*)Py_None));
        }
        __pyx_v_types = ((struct __pyx_obj_7pyarrow_3lib_Array *)values[0]);
        __pyx_v_value_offsets = ((struct __pyx_obj_7pyarrow_3lib_Array *)values[1]);
        __pyx_v_children = ((PyObject*)values[2]);
        __pyx_v_field_names = ((PyObject*)values[3]);
        __pyx_v_type_codes = ((PyObject*)values[4]);
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("from_dense", 0, 3, 5, __pyx_nargs); __PYX_ERR(4, 3784, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.UnionArray.from_dense", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_types), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array, 1, "types", 0))) __PYX_ERR(4, 3785, __pyx_L1_error)
      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_value_offsets), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array, 1, "value_offsets", 0))) __PYX_ERR(4, 3785, __pyx_L1_error)
      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_children), (&PyList_Type), 1, "children", 1))) __PYX_ERR(4, 3785, __pyx_L1_error)
      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_field_names), (&PyList_Type), 1, "field_names", 1))) __PYX_ERR(4, 3786, __pyx_L1_error)
      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_type_codes), (&PyList_Type), 1, "type_codes", 1))) __PYX_ERR(4, 3786, __pyx_L1_error)
      __pyx_r = __pyx_pf_7pyarrow_3lib_10UnionArray_4from_dense(__pyx_v_types, __pyx_v_value_offsets, __pyx_v_children, __pyx_v_field_names, __pyx_v_type_codes);

      /* "pyarrow/array.pxi":3784
 *         return Array.from_buffers(int32(), len(self), [None, buf])
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_dense(Array types, Array value_offsets, list children,
 *                    list field_names=None, list type_codes=None):
*/

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = NULL;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      goto __pyx_L7_cleaned_up;
      __pyx_L0:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __pyx_L7_cleaned_up:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_10UnionArray_4from_dense(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_types, struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_value_offsets, PyObject *__pyx_v_children, PyObject *__pyx_v_field_names, PyObject *__pyx_v_type_codes) {
      std::shared_ptr< arrow::Array>  __pyx_v_out;
      std::vector<std::shared_ptr< arrow::Array> >  __pyx_v_c;
      struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_child = 0;
      std::vector<std::string>  __pyx_v_c_field_names;
      std::vector<int8_t>  __pyx_v_c_type_codes;
      PyObject *__pyx_v_x = NULL;
      struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_result = 0;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      Py_ssize_t __pyx_t_2;
      PyObject *__pyx_t_3 = NULL;
      int __pyx_t_4;
      PyObject *__pyx_t_5 = NULL;
      PyObject *__pyx_t_6 = NULL;
      size_t __pyx_t_7;
      std::string __pyx_t_8;
      int8_t __pyx_t_9;
      std::shared_ptr< arrow::Array>  __pyx_t_10;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("from_dense", 0);

      /* "pyarrow/array.pxi":3810
 *             vector[int8_t] c_type_codes
 * 
 *         for child in children:             # <<<<<<<<<<<<<<
 *             c.push_back(child.sp_array)
 *         if field_names is not None:
*/
      if (unlikely(__pyx_v_children == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
        __PYX_ERR(4, 3810, __pyx_L1_error)
      }
      __pyx_t_1 = __pyx_v_children; __Pyx_INCREF(__pyx_t_1);
      __pyx_t_2 = 0;
      for (;;) {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
          #if !CYTHON_ASSUME_SAFE_SIZE
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(4, 3810, __pyx_L1_error)
          #endif
          if (__pyx_t_2 >= __pyx_temp) break;
        }
        __pyx_t_3 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_2, __Pyx_ReferenceSharing_OwnStrongReference);
        ++__pyx_t_2;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 3810, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array))))) __PYX_ERR(4, 3810, __pyx_L1_error)
        __Pyx_XDECREF_SET(__pyx_v_child, ((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_t_3));
        __pyx_t_3 = 0;

        /* "pyarrow/array.pxi":3811
 * 
 *         for child in children:
 *             c.push_back(child.sp_array)             # <<<<<<<<<<<<<<
 *         if field_names is not None:
 *             for x in field_names:
*/
        if (unlikely(((PyObject *)__pyx_v_child) == Py_None)) {
          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_array");
          __PYX_ERR(4, 3811, __pyx_L1_error)
        }
        try {
          __pyx_v_c.push_back(__pyx_v_child->sp_array);
        } catch(...) {
          __Pyx_CppExn2PyErr();
          __PYX_ERR(4, 3811, __pyx_L1_error)
        }

        /* "pyarrow/array.pxi":3810
 *             vector[int8_t] c_type_codes
 * 
 *         for child in children:             # <<<<<<<<<<<<<<
 *             c.push_back(child.sp_array)
 *         if field_names is not None:
*/
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "pyarrow/array.pxi":3812
 *         for child in children:
 *             c.push_back(child.sp_array)
 *         if field_names is not None:             # <<<<<<<<<<<<<<
 *             for x in field_names:
 *                 c_field_names.push_back(tobytes(x))
*/
      __pyx_t_4 = (__pyx_v_field_names != ((PyObject*)Py_None));
      if (__pyx_t_4) {

        /* "pyarrow/array.pxi":3813
 *             c.push_back(child.sp_array)
 *         if field_names is not None:
 *             for x in field_names:             # <<<<<<<<<<<<<<
 *                 c_field_names.push_back(tobytes(x))
 *         if type_codes is not None:
*/
        if (unlikely(__pyx_v_field_names == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
          __PYX_ERR(4, 3813, __pyx_L1_error)
        }
        __pyx_t_1 = __pyx_v_field_names; __Pyx_INCREF(__pyx_t_1);
        __pyx_t_2 = 0;
        for (;;) {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
            #if !CYTHON_ASSUME_SAFE_SIZE
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(4, 3813, __pyx_L1_error)
            #endif
            if (__pyx_t_2 >= __pyx_temp) break;
          }
          __pyx_t_3 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_2, __Pyx_ReferenceSharing_OwnStrongReference);
          ++__pyx_t_2;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 3813, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_3);
          __pyx_t_3 = 0;

          /* "pyarrow/array.pxi":3814
 *         if field_names is not None:
 *             for x in field_names:
 *                 c_field_names.push_back(tobytes(x))             # <<<<<<<<<<<<<<
 *         if type_codes is not None:
 *             for x in type_codes:
*/
          __pyx_t_5 = NULL;
          __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_tobytes); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 3814, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_t_7 = 1;
          #if CYTHON_UNPACK_METHODS
          if (unlikely(PyMethod_Check(__pyx_t_6))) {
            __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
            assert(__pyx_t_5);
            PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
            __Pyx_INCREF(__pyx_t_5);
            __Pyx_INCREF(__pyx__function);
            __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
            __pyx_t_7 = 0;
          }
          #endif
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_x};
            __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 3814, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
          }
          __pyx_t_8 = __pyx_convert_string_from_py_6libcpp_6string_std__in_string(__pyx_t_3); if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 3814, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          try {
            __pyx_v_c_field_names.push_back(__pyx_t_8);
          } catch(...) {
            __Pyx_CppExn2PyErr();
            __PYX_ERR(4, 3814, __pyx_L1_error)
          }

          /* "pyarrow/array.pxi":3813
 *             c.push_back(child.sp_array)
 *         if field_names is not None:
 *             for x in field_names:             # <<<<<<<<<<<<<<
 *                 c_field_names.push_back(tobytes(x))
 *         if type_codes is not None:
*/
        }
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

        /* "pyarrow/array.pxi":3812
 *         for child in children:
 *             c.push_back(child.sp_array)
 *         if field_names is not None:             # <<<<<<<<<<<<<<
 *             for x in field_names:
 *                 c_field_names.push_back(tobytes(x))
*/
      }

      /* "pyarrow/array.pxi":3815
 *             for x in field_names:
 *                 c_field_names.push_back(tobytes(x))
 *         if type_codes is not None:             # <<<<<<<<<<<<<<
 *             for x in type_codes:
 *                 c_type_codes.push_back(x)
*/
      __pyx_t_4 = (__pyx_v_type_codes != ((PyObject*)Py_None));
      if (__pyx_t_4) {

        /* "pyarrow/array.pxi":3816
 *                 c_field_names.push_back(tobytes(x))
 *         if type_codes is not None:
 *             for x in type_codes:             # <<<<<<<<<<<<<<
 *                 c_type_codes.push_back(x)
 * 
*/
        if (unlikely(__pyx_v_type_codes == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
          __PYX_ERR(4, 3816, __pyx_L1_error)
        }
        __pyx_t_1 = __pyx_v_type_codes; __Pyx_INCREF(__pyx_t_1);
        __pyx_t_2 = 0;
        for (;;) {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
            #if !CYTHON_ASSUME_SAFE_SIZE
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(4, 3816, __pyx_L1_error)
            #endif
            if (__pyx_t_2 >= __pyx_temp) break;
          }
          __pyx_t_3 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_2, __Pyx_ReferenceSharing_OwnStrongReference);
          ++__pyx_t_2;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 3816, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_3);
          __pyx_t_3 = 0;

          /* "pyarrow/array.pxi":3817
 *         if type_codes is not None:
 *             for x in type_codes:
 *                 c_type_codes.push_back(x)             # <<<<<<<<<<<<<<
 * 
 *         with nogil:
*/
          __pyx_t_9 = __Pyx_PyLong_As_int8_t(__pyx_v_x); if (unlikely((__pyx_t_9 == ((int8_t)-1)) && PyErr_Occurred())) __PYX_ERR(4, 3817, __pyx_L1_error)
          try {
            __pyx_v_c_type_codes.push_back(__pyx_t_9);
          } catch(...) {
            __Pyx_CppExn2PyErr();
            __PYX_ERR(4, 3817, __pyx_L1_error)
          }

          /* "pyarrow/array.pxi":3816
 *                 c_field_names.push_back(tobytes(x))
 *         if type_codes is not None:
 *             for x in type_codes:             # <<<<<<<<<<<<<<
 *                 c_type_codes.push_back(x)
 * 
*/
        }
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

        /* "pyarrow/array.pxi":3815
 *             for x in field_names:
 *                 c_field_names.push_back(tobytes(x))
 *         if type_codes is not None:             # <<<<<<<<<<<<<<
 *             for x in type_codes:
 *                 c_type_codes.push_back(x)
*/
      }

      /* "pyarrow/array.pxi":3819
 *                 c_type_codes.push_back(x)
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             out = GetResultValue(CDenseUnionArray.Make(
 *                 deref(types.ap), deref(value_offsets.ap), c, c_field_names,
*/
      {
          PyThreadState * _save;
          _save = PyEval_SaveThread();
          __Pyx_FastGIL_Remember();
          /*try:*/ {

            /* "pyarrow/array.pxi":3821
 *         with nogil:
 *             out = GetResultValue(CDenseUnionArray.Make(
 *                 deref(types.ap), deref(value_offsets.ap), c, c_field_names,             # <<<<<<<<<<<<<<
 *                 c_type_codes))
 * 
*/
            if (unlikely(((PyObject *)__pyx_v_types) == Py_None)) {
              PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "ap");
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              __PYX_ERR(4, 3821, __pyx_L15_error)
            }
            if (unlikely(((PyObject *)__pyx_v_value_offsets) == Py_None)) {
              PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "ap");
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              __PYX_ERR(4, 3821, __pyx_L15_error)
            }

            /* "pyarrow/array.pxi":3820
 * 
 *         with nogil:
 *             out = GetResultValue(CDenseUnionArray.Make(             # <<<<<<<<<<<<<<
 *                 deref(types.ap), deref(value_offsets.ap), c, c_field_names,
 *                 c_type_codes))
*/
            __pyx_t_10 = arrow::py::GetResultValue<std::shared_ptr< arrow::Array> >( arrow::DenseUnionArray::Make((*__pyx_v_types->ap), (*__pyx_v_value_offsets->ap), __pyx_v_c, __pyx_v_c_field_names, __pyx_v_c_type_codes)); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(4, 3820, __pyx_L15_error)
            __pyx_v_out = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_10);
          }

          /* "pyarrow/array.pxi":3819
 *                 c_type_codes.push_back(x)
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             out = GetResultValue(CDenseUnionArray.Make(
 *                 deref(types.ap), deref(value_offsets.ap), c, c_field_names,
*/
          /*finally:*/ {
            /*normal exit:*/{
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L16;
            }
            __pyx_L15_error: {
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L1_error;
            }
            __pyx_L16:;
          }
      }

      /* "pyarrow/array.pxi":3824
 *                 c_type_codes))
 * 
 *         cdef Array result = pyarrow_wrap_array(out)             # <<<<<<<<<<<<<<
 *         result.validate()
 *         return result
*/
      __pyx_t_1 = pyarrow_wrap_array(__pyx_v_out); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 3824, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array))))) __PYX_ERR(4, 3824, __pyx_L1_error)
      __pyx_v_result = ((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_t_1);
      __pyx_t_1 = 0;

      /* "pyarrow/array.pxi":3825
 * 
 *         cdef Array result = pyarrow_wrap_array(out)
 *         result.validate()             # <<<<<<<<<<<<<<
 *         return result
 * 
*/
      __pyx_t_3 = ((PyObject *)__pyx_v_result);
      __Pyx_INCREF(__pyx_t_3);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_validate, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 3825, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "pyarrow/array.pxi":3826
 *         cdef Array result = pyarrow_wrap_array(out)
 *         result.validate()
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF((PyObject *)__pyx_v_result);
      __pyx_r = ((PyObject *)__pyx_v_result);
      goto __pyx_L0;

      /* "pyarrow/array.pxi":3784
 *         return Array.from_buffers(int32(), len(self), [None, buf])
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_dense(Array types, Array value_offsets, list children,
 *                    list field_names=None, list type_codes=None):
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_AddTraceback("pyarrow.lib.UnionArray.from_dense", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF((PyObject *)__pyx_v_child);
      __Pyx_XDECREF(__pyx_v_x);
      __Pyx_XDECREF((PyObject *)__pyx_v_result);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":3828
 *         return result
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_sparse(Array types, list children, list field_names=None,
 *                     list type_codes=None):
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_10UnionArray_7from_sparse(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_10UnionArray_6from_sparse, "UnionArray.from_sparse(Array types, list children, list field_names=None, list type_codes=None)\n\nConstruct sparse UnionArray from arrays of int8 types and children\narrays\n\nParameters\n----------\ntypes : Array (int8 type)\nchildren : list\nfield_names : list\ntype_codes : list\n\nReturns\n-------\nunion_array : UnionArray");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_10UnionArray_7from_sparse = {"from_sparse", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10UnionArray_7from_sparse, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10UnionArray_6from_sparse};
    static PyObject *__pyx_pw_7pyarrow_3lib_10UnionArray_7from_sparse(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_types = 0;
      PyObject *__pyx_v_children = 0;
      PyObject *__pyx_v_field_names = 0;
      PyObject *__pyx_v_type_codes = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[4] = {0,0,0,0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("from_sparse (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_types,&__pyx_mstate_global->__pyx_n_u_children,&__pyx_mstate_global->__pyx_n_u_field_names,&__pyx_mstate_global->__pyx_n_u_type_codes,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(4, 3828, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  4:
            values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(4, 3828, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  3:
            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(4, 3828, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(4, 3828, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 3828, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "from_sparse", 0) < (0)) __PYX_ERR(4, 3828, __pyx_L3_error)

          /* "pyarrow/array.pxi":3829
 * 
 *     @staticmethod
 *     def from_sparse(Array types, list children, list field_names=None,             # <<<<<<<<<<<<<<
 *                     list type_codes=None):
 *         """
*/
          if (!values[2]) values[2] = __Pyx_NewRef(((PyObject*)Py_None));

          /* "pyarrow/array.pxi":3830
 *     @staticmethod
 *     def from_sparse(Array types, list children, list field_names=None,
 *                     list type_codes=None):             # <<<<<<<<<<<<<<
 *         """
 *         Construct sparse UnionArray from arrays of int8 types and children
*/
          if (!values[3]) values[3] = __Pyx_NewRef(((PyObject*)Py_None));
          for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("from_sparse", 0, 2, 4, i); __PYX_ERR(4, 3828, __pyx_L3_error) }
          }
        } else {
          switch (__pyx_nargs) {
            case  4:
            values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(4, 3828, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  3:
            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(4, 3828, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(4, 3828, __pyx_L3_error)
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 3828, __pyx_L3_error)
            break;
            default: goto __pyx_L5_argtuple_error;
          }

          /* "pyarrow/array.pxi":3829
 * 
 *     @staticmethod
 *     def from_sparse(Array types, list children, list field_names=None,             # <<<<<<<<<<<<<<
 *                     list type_codes=None):
 *         """
*/
          if (!values[2]) values[2] = __Pyx_NewRef(((PyObject*)Py_None));

          /* "pyarrow/array.pxi":3830
 *     @staticmethod
 *     def from_sparse(Array types, list children, list field_names=None,
 *                     list type_codes=None):             # <<<<<<<<<<<<<<
 *         """
 *         Construct sparse UnionArray from arrays of int8 types and children
*/
          if (!values[3]) values[3] = __Pyx_NewRef(((PyObject*)Py_None));
        }
        __pyx_v_types = ((struct __pyx_obj_7pyarrow_3lib_Array *)values[0]);
        __pyx_v_children = ((PyObject*)values[1]);
        __pyx_v_field_names = ((PyObject*)values[2]);
        __pyx_v_type_codes = ((PyObject*)values[3]);
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("from_sparse", 0, 2, 4, __pyx_nargs); __PYX_ERR(4, 3828, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.UnionArray.from_sparse", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_types), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array, 1, "types", 0))) __PYX_ERR(4, 3829, __pyx_L1_error)
      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_children), (&PyList_Type), 1, "children", 1))) __PYX_ERR(4, 3829, __pyx_L1_error)
      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_field_names), (&PyList_Type), 1, "field_names", 1))) __PYX_ERR(4, 3829, __pyx_L1_error)
      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_type_codes), (&PyList_Type), 1, "type_codes", 1))) __PYX_ERR(4, 3830, __pyx_L1_error)
      __pyx_r = __pyx_pf_7pyarrow_3lib_10UnionArray_6from_sparse(__pyx_v_types, __pyx_v_children, __pyx_v_field_names, __pyx_v_type_codes);

      /* "pyarrow/array.pxi":3828
 *         return result
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_sparse(Array types, list children, list field_names=None,
 *                     list type_codes=None):
*/

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = NULL;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      goto __pyx_L7_cleaned_up;
      __pyx_L0:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __pyx_L7_cleaned_up:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_10UnionArray_6from_sparse(struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_types, PyObject *__pyx_v_children, PyObject *__pyx_v_field_names, PyObject *__pyx_v_type_codes) {
      std::shared_ptr< arrow::Array>  __pyx_v_out;
      std::vector<std::shared_ptr< arrow::Array> >  __pyx_v_c;
      struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_child = 0;
      std::vector<std::string>  __pyx_v_c_field_names;
      std::vector<int8_t>  __pyx_v_c_type_codes;
      PyObject *__pyx_v_x = NULL;
      struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_result = 0;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      Py_ssize_t __pyx_t_2;
      PyObject *__pyx_t_3 = NULL;
      int __pyx_t_4;
      PyObject *__pyx_t_5 = NULL;
      PyObject *__pyx_t_6 = NULL;
      size_t __pyx_t_7;
      std::string __pyx_t_8;
      int8_t __pyx_t_9;
      std::shared_ptr< arrow::Array>  __pyx_t_10;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("from_sparse", 0);

      /* "pyarrow/array.pxi":3853
 *             vector[int8_t] c_type_codes
 * 
 *         for child in children:             # <<<<<<<<<<<<<<
 *             c.push_back(child.sp_array)
 *         if field_names is not None:
*/
      if (unlikely(__pyx_v_children == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
        __PYX_ERR(4, 3853, __pyx_L1_error)
      }
      __pyx_t_1 = __pyx_v_children; __Pyx_INCREF(__pyx_t_1);
      __pyx_t_2 = 0;
      for (;;) {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
          #if !CYTHON_ASSUME_SAFE_SIZE
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(4, 3853, __pyx_L1_error)
          #endif
          if (__pyx_t_2 >= __pyx_temp) break;
        }
        __pyx_t_3 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_2, __Pyx_ReferenceSharing_OwnStrongReference);
        ++__pyx_t_2;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 3853, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array))))) __PYX_ERR(4, 3853, __pyx_L1_error)
        __Pyx_XDECREF_SET(__pyx_v_child, ((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_t_3));
        __pyx_t_3 = 0;

        /* "pyarrow/array.pxi":3854
 * 
 *         for child in children:
 *             c.push_back(child.sp_array)             # <<<<<<<<<<<<<<
 *         if field_names is not None:
 *             for x in field_names:
*/
        if (unlikely(((PyObject *)__pyx_v_child) == Py_None)) {
          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_array");
          __PYX_ERR(4, 3854, __pyx_L1_error)
        }
        try {
          __pyx_v_c.push_back(__pyx_v_child->sp_array);
        } catch(...) {
          __Pyx_CppExn2PyErr();
          __PYX_ERR(4, 3854, __pyx_L1_error)
        }

        /* "pyarrow/array.pxi":3853
 *             vector[int8_t] c_type_codes
 * 
 *         for child in children:             # <<<<<<<<<<<<<<
 *             c.push_back(child.sp_array)
 *         if field_names is not None:
*/
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "pyarrow/array.pxi":3855
 *         for child in children:
 *             c.push_back(child.sp_array)
 *         if field_names is not None:             # <<<<<<<<<<<<<<
 *             for x in field_names:
 *                 c_field_names.push_back(tobytes(x))
*/
      __pyx_t_4 = (__pyx_v_field_names != ((PyObject*)Py_None));
      if (__pyx_t_4) {

        /* "pyarrow/array.pxi":3856
 *             c.push_back(child.sp_array)
 *         if field_names is not None:
 *             for x in field_names:             # <<<<<<<<<<<<<<
 *                 c_field_names.push_back(tobytes(x))
 *         if type_codes is not None:
*/
        if (unlikely(__pyx_v_field_names == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
          __PYX_ERR(4, 3856, __pyx_L1_error)
        }
        __pyx_t_1 = __pyx_v_field_names; __Pyx_INCREF(__pyx_t_1);
        __pyx_t_2 = 0;
        for (;;) {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
            #if !CYTHON_ASSUME_SAFE_SIZE
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(4, 3856, __pyx_L1_error)
            #endif
            if (__pyx_t_2 >= __pyx_temp) break;
          }
          __pyx_t_3 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_2, __Pyx_ReferenceSharing_OwnStrongReference);
          ++__pyx_t_2;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 3856, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_3);
          __pyx_t_3 = 0;

          /* "pyarrow/array.pxi":3857
 *         if field_names is not None:
 *             for x in field_names:
 *                 c_field_names.push_back(tobytes(x))             # <<<<<<<<<<<<<<
 *         if type_codes is not None:
 *             for x in type_codes:
*/
          __pyx_t_5 = NULL;
          __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_tobytes); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 3857, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_t_7 = 1;
          #if CYTHON_UNPACK_METHODS
          if (unlikely(PyMethod_Check(__pyx_t_6))) {
            __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
            assert(__pyx_t_5);
            PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
            __Pyx_INCREF(__pyx_t_5);
            __Pyx_INCREF(__pyx__function);
            __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
            __pyx_t_7 = 0;
          }
          #endif
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_x};
            __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 3857, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
          }
          __pyx_t_8 = __pyx_convert_string_from_py_6libcpp_6string_std__in_string(__pyx_t_3); if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 3857, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          try {
            __pyx_v_c_field_names.push_back(__pyx_t_8);
          } catch(...) {
            __Pyx_CppExn2PyErr();
            __PYX_ERR(4, 3857, __pyx_L1_error)
          }

          /* "pyarrow/array.pxi":3856
 *             c.push_back(child.sp_array)
 *         if field_names is not None:
 *             for x in field_names:             # <<<<<<<<<<<<<<
 *                 c_field_names.push_back(tobytes(x))
 *         if type_codes is not None:
*/
        }
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

        /* "pyarrow/array.pxi":3855
 *         for child in children:
 *             c.push_back(child.sp_array)
 *         if field_names is not None:             # <<<<<<<<<<<<<<
 *             for x in field_names:
 *                 c_field_names.push_back(tobytes(x))
*/
      }

      /* "pyarrow/array.pxi":3858
 *             for x in field_names:
 *                 c_field_names.push_back(tobytes(x))
 *         if type_codes is not None:             # <<<<<<<<<<<<<<
 *             for x in type_codes:
 *                 c_type_codes.push_back(x)
*/
      __pyx_t_4 = (__pyx_v_type_codes != ((PyObject*)Py_None));
      if (__pyx_t_4) {

        /* "pyarrow/array.pxi":3859
 *                 c_field_names.push_back(tobytes(x))
 *         if type_codes is not None:
 *             for x in type_codes:             # <<<<<<<<<<<<<<
 *                 c_type_codes.push_back(x)
 * 
*/
        if (unlikely(__pyx_v_type_codes == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
          __PYX_ERR(4, 3859, __pyx_L1_error)
        }
        __pyx_t_1 = __pyx_v_type_codes; __Pyx_INCREF(__pyx_t_1);
        __pyx_t_2 = 0;
        for (;;) {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
            #if !CYTHON_ASSUME_SAFE_SIZE
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(4, 3859, __pyx_L1_error)
            #endif
            if (__pyx_t_2 >= __pyx_temp) break;
          }
          __pyx_t_3 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_2, __Pyx_ReferenceSharing_OwnStrongReference);
          ++__pyx_t_2;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 3859, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_3);
          __pyx_t_3 = 0;

          /* "pyarrow/array.pxi":3860
 *         if type_codes is not None:
 *             for x in type_codes:
 *                 c_type_codes.push_back(x)             # <<<<<<<<<<<<<<
 * 
 *         with nogil:
*/
          __pyx_t_9 = __Pyx_PyLong_As_int8_t(__pyx_v_x); if (unlikely((__pyx_t_9 == ((int8_t)-1)) && PyErr_Occurred())) __PYX_ERR(4, 3860, __pyx_L1_error)
          try {
            __pyx_v_c_type_codes.push_back(__pyx_t_9);
          } catch(...) {
            __Pyx_CppExn2PyErr();
            __PYX_ERR(4, 3860, __pyx_L1_error)
          }

          /* "pyarrow/array.pxi":3859
 *                 c_field_names.push_back(tobytes(x))
 *         if type_codes is not None:
 *             for x in type_codes:             # <<<<<<<<<<<<<<
 *                 c_type_codes.push_back(x)
 * 
*/
        }
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

        /* "pyarrow/array.pxi":3858
 *             for x in field_names:
 *                 c_field_names.push_back(tobytes(x))
 *         if type_codes is not None:             # <<<<<<<<<<<<<<
 *             for x in type_codes:
 *                 c_type_codes.push_back(x)
*/
      }

      /* "pyarrow/array.pxi":3862
 *                 c_type_codes.push_back(x)
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             out = GetResultValue(CSparseUnionArray.Make(
 *                 deref(types.ap), c, c_field_names, c_type_codes))
*/
      {
          PyThreadState * _save;
          _save = PyEval_SaveThread();
          __Pyx_FastGIL_Remember();
          /*try:*/ {

            /* "pyarrow/array.pxi":3864
 *         with nogil:
 *             out = GetResultValue(CSparseUnionArray.Make(
 *                 deref(types.ap), c, c_field_names, c_type_codes))             # <<<<<<<<<<<<<<
 * 
 *         cdef Array result = pyarrow_wrap_array(out)
*/
            if (unlikely(((PyObject *)__pyx_v_types) == Py_None)) {
              PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "ap");
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              __PYX_ERR(4, 3864, __pyx_L15_error)
            }

            /* "pyarrow/array.pxi":3863
 * 
 *         with nogil:
 *             out = GetResultValue(CSparseUnionArray.Make(             # <<<<<<<<<<<<<<
 *                 deref(types.ap), c, c_field_names, c_type_codes))
 * 
*/
            __pyx_t_10 = arrow::py::GetResultValue<std::shared_ptr< arrow::Array> >( arrow::SparseUnionArray::Make((*__pyx_v_types->ap), __pyx_v_c, __pyx_v_c_field_names, __pyx_v_c_type_codes)); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(4, 3863, __pyx_L15_error)
            __pyx_v_out = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_10);
          }

          /* "pyarrow/array.pxi":3862
 *                 c_type_codes.push_back(x)
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             out = GetResultValue(CSparseUnionArray.Make(
 *                 deref(types.ap), c, c_field_names, c_type_codes))
*/
          /*finally:*/ {
            /*normal exit:*/{
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L16;
            }
            __pyx_L15_error: {
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L1_error;
            }
            __pyx_L16:;
          }
      }

      /* "pyarrow/array.pxi":3866
 *                 deref(types.ap), c, c_field_names, c_type_codes))
 * 
 *         cdef Array result = pyarrow_wrap_array(out)             # <<<<<<<<<<<<<<
 *         result.validate()
 *         return result
*/
      __pyx_t_1 = pyarrow_wrap_array(__pyx_v_out); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 3866, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array))))) __PYX_ERR(4, 3866, __pyx_L1_error)
      __pyx_v_result = ((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_t_1);
      __pyx_t_1 = 0;

      /* "pyarrow/array.pxi":3867
 * 
 *         cdef Array result = pyarrow_wrap_array(out)
 *         result.validate()             # <<<<<<<<<<<<<<
 *         return result
 * 
*/
      __pyx_t_3 = ((PyObject *)__pyx_v_result);
      __Pyx_INCREF(__pyx_t_3);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_validate, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 3867, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "pyarrow/array.pxi":3868
 *         cdef Array result = pyarrow_wrap_array(out)
 *         result.validate()
 *         return result             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF((PyObject *)__pyx_v_result);
      __pyx_r = ((PyObject *)__pyx_v_result);
      goto __pyx_L0;

      /* "pyarrow/array.pxi":3828
 *         return result
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_sparse(Array types, list children, list field_names=None,
 *                     list type_codes=None):
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_AddTraceback("pyarrow.lib.UnionArray.from_sparse", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF((PyObject *)__pyx_v_child);
      __Pyx_XDECREF(__pyx_v_x);
      __Pyx_XDECREF((PyObject *)__pyx_v_result);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":3876
 *     """
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_buffers(int length, Buffer value_offsets, Buffer data,
 *                      Buffer null_bitmap=None, int null_count=-1,
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_11StringArray_1from_buffers(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_11StringArray_from_buffers, "StringArray.from_buffers(int length, Buffer value_offsets, Buffer data, Buffer null_bitmap=None, int null_count=-1, int offset=0)\n\nConstruct a StringArray from value_offsets and data buffers.\nIf there are nulls in the data, also a null_bitmap and the matching\nnull_count must be passed.\n\nParameters\n----------\nlength : int\nvalue_offsets : Buffer\ndata : Buffer\nnull_bitmap : Buffer, optional\nnull_count : int, default 0\noffset : int, default 0\n\nReturns\n-------\nstring_array : StringArray");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_11StringArray_1from_buffers = {"from_buffers", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_11StringArray_1from_buffers, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_11StringArray_from_buffers};
    static PyObject *__pyx_pw_7pyarrow_3lib_11StringArray_1from_buffers(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      int __pyx_v_length;
      struct __pyx_obj_7pyarrow_3lib_Buffer *__pyx_v_value_offsets = 0;
      struct __pyx_obj_7pyarrow_3lib_Buffer *__pyx_v_data = 0;
      struct __pyx_obj_7pyarrow_3lib_Buffer *__pyx_v_null_bitmap = 0;
      int __pyx_v_null_count;
      int __pyx_v_offset;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[6] = {0,0,0,0,0,0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("from_buffers (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_length,&__pyx_mstate_global->__pyx_n_u_value_offsets,&__pyx_mstate_global->__pyx_n_u_data,&__pyx_mstate_global->__pyx_n_u_null_bitmap,&__pyx_mstate_global->__pyx_n_u_null_count,&__pyx_mstate_global->__pyx_n_u_offset,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(4, 3876, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  6:
            values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(4, 3876, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  5:
            values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(4, 3876, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  4:
            values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(4, 3876, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  3:
            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(4, 3876, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(4, 3876, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 3876, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "from_buffers", 0) < (0)) __PYX_ERR(4, 3876, __pyx_L3_error)

          /* "pyarrow/array.pxi":3878
 *     @staticmethod
 *     def from_buffers(int length, Buffer value_offsets, Buffer data,
 *                      Buffer null_bitmap=None, int null_count=-1,             # <<<<<<<<<<<<<<
 *                      int offset=0):
 *         """
*/
          if (!values[3]) values[3] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_7pyarrow_3lib_Buffer *)Py_None));
          for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("from_buffers", 0, 3, 6, i); __PYX_ERR(4, 3876, __pyx_L3_error) }
          }
        } else {
          switch (__pyx_nargs) {
            case  6:
            values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(4, 3876, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  5:
            values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(4, 3876, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  4:
            values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(4, 3876, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  3:
            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(4, 3876, __pyx_L3_error)
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(4, 3876, __pyx_L3_error)
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 3876, __pyx_L3_error)
            break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (!values[3]) values[3] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_7pyarrow_3lib_Buffer *)Py_None));
        }
        __pyx_v_length = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_length == (int)-1) && PyErr_Occurred())) __PYX_ERR(4, 3877, __pyx_L3_error)
        __pyx_v_value_offsets = ((struct __pyx_obj_7pyarrow_3lib_Buffer *)values[1]);
        __pyx_v_data = ((struct __pyx_obj_7pyarrow_3lib_Buffer *)values[2]);
        __pyx_v_null_bitmap = ((struct __pyx_obj_7pyarrow_3lib_Buffer *)values[3]);
        if (values[4]) {
          __pyx_v_null_count = __Pyx_PyLong_As_int(values[4]); if (unlikely((__pyx_v_null_count == (int)-1) && PyErr_Occurred())) __PYX_ERR(4, 3878, __pyx_L3_error)
        } else {
          __pyx_v_null_count = ((int)-1);
        }
        if (values[5]) {
          __pyx_v_offset = __Pyx_PyLong_As_int(values[5]); if (unlikely((__pyx_v_offset == (int)-1) && PyErr_Occurred())) __PYX_ERR(4, 3879, __pyx_L3_error)
        } else {
          __pyx_v_offset = ((int)0);
        }
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("from_buffers", 0, 3, 6, __pyx_nargs); __PYX_ERR(4, 3876, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.StringArray.from_buffers", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_value_offsets), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Buffer, 1, "value_offsets", 0))) __PYX_ERR(4, 3877, __pyx_L1_error)
      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_data), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Buffer, 1, "data", 0))) __PYX_ERR(4, 3877, __pyx_L1_error)
      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_null_bitmap), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Buffer, 1, "null_bitmap", 0))) __PYX_ERR(4, 3878, __pyx_L1_error)
      __pyx_r = __pyx_pf_7pyarrow_3lib_11StringArray_from_buffers(__pyx_v_length, __pyx_v_value_offsets, __pyx_v_data, __pyx_v_null_bitmap, __pyx_v_null_count, __pyx_v_offset);

      /* "pyarrow/array.pxi":3876
 *     """
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_buffers(int length, Buffer value_offsets, Buffer data,
 *                      Buffer null_bitmap=None, int null_count=-1,
*/

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = NULL;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      goto __pyx_L7_cleaned_up;
      __pyx_L0:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __pyx_L7_cleaned_up:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_11StringArray_from_buffers(int __pyx_v_length, struct __pyx_obj_7pyarrow_3lib_Buffer *__pyx_v_value_offsets, struct __pyx_obj_7pyarrow_3lib_Buffer *__pyx_v_data, struct __pyx_obj_7pyarrow_3lib_Buffer *__pyx_v_null_bitmap, int __pyx_v_null_count, int __pyx_v_offset) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      PyObject *__pyx_t_5 = NULL;
      size_t __pyx_t_6;
      PyObject *__pyx_t_7 = NULL;
      PyObject *__pyx_t_8 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("from_buffers", 0);

      /* "pyarrow/array.pxi":3898
 *         string_array : StringArray
 *         """
 *         return Array.from_buffers(utf8(), length,             # <<<<<<<<<<<<<<
 *                                   [null_bitmap, value_offsets, data],
 *                                   null_count, offset)
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_4 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_utf8); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 3898, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
        assert(__pyx_t_4);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
        __pyx_t_6 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
        __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 3898, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      __pyx_t_5 = __Pyx_PyLong_From_int(__pyx_v_length); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 3898, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);

      /* "pyarrow/array.pxi":3899
 *         """
 *         return Array.from_buffers(utf8(), length,
 *                                   [null_bitmap, value_offsets, data],             # <<<<<<<<<<<<<<
 *                                   null_count, offset)
 * 
*/
      __pyx_t_4 = PyList_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 3899, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_INCREF((PyObject *)__pyx_v_null_bitmap);
      __Pyx_GIVEREF((PyObject *)__pyx_v_null_bitmap);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_null_bitmap)) != (0)) __PYX_ERR(4, 3899, __pyx_L1_error);
      __Pyx_INCREF((PyObject *)__pyx_v_value_offsets);
      __Pyx_GIVEREF((PyObject *)__pyx_v_value_offsets);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_v_value_offsets)) != (0)) __PYX_ERR(4, 3899, __pyx_L1_error);
      __Pyx_INCREF((PyObject *)__pyx_v_data);
      __Pyx_GIVEREF((PyObject *)__pyx_v_data);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 2, ((PyObject *)__pyx_v_data)) != (0)) __PYX_ERR(4, 3899, __pyx_L1_error);

      /* "pyarrow/array.pxi":3900
 *         return Array.from_buffers(utf8(), length,
 *                                   [null_bitmap, value_offsets, data],
 *                                   null_count, offset)             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __pyx_t_7 = __Pyx_PyLong_From_int(__pyx_v_null_count); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 3900, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = __Pyx_PyLong_From_int(__pyx_v_offset); if (unlikely(!__pyx_t_8)) __PYX_ERR(4, 3900, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_6 = 0;
      {
        PyObject *__pyx_callargs[6] = {__pyx_t_2, __pyx_t_3, __pyx_t_5, __pyx_t_4, __pyx_t_7, __pyx_t_8};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_from_buffers, __pyx_callargs+__pyx_t_6, (6-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 3898, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":3876
 *     """
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_buffers(int length, Buffer value_offsets, Buffer data,
 *                      Buffer null_bitmap=None, int null_count=-1,
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_8);
      __Pyx_AddTraceback("pyarrow.lib.StringArray.from_buffers", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":3908
 *     """
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_buffers(int length, Buffer value_offsets, Buffer data,
 *                      Buffer null_bitmap=None, int null_count=-1,
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_16LargeStringArray_1from_buffers(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_16LargeStringArray_from_buffers, "LargeStringArray.from_buffers(int length, Buffer value_offsets, Buffer data, Buffer null_bitmap=None, int null_count=-1, int offset=0)\n\nConstruct a LargeStringArray from value_offsets and data buffers.\nIf there are nulls in the data, also a null_bitmap and the matching\nnull_count must be passed.\n\nParameters\n----------\nlength : int\nvalue_offsets : Buffer\ndata : Buffer\nnull_bitmap : Buffer, optional\nnull_count : int, default 0\noffset : int, default 0\n\nReturns\n-------\nstring_array : StringArray");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_16LargeStringArray_1from_buffers = {"from_buffers", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_16LargeStringArray_1from_buffers, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_16LargeStringArray_from_buffers};
    static PyObject *__pyx_pw_7pyarrow_3lib_16LargeStringArray_1from_buffers(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      int __pyx_v_length;
      struct __pyx_obj_7pyarrow_3lib_Buffer *__pyx_v_value_offsets = 0;
      struct __pyx_obj_7pyarrow_3lib_Buffer *__pyx_v_data = 0;
      struct __pyx_obj_7pyarrow_3lib_Buffer *__pyx_v_null_bitmap = 0;
      int __pyx_v_null_count;
      int __pyx_v_offset;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[6] = {0,0,0,0,0,0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("from_buffers (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_length,&__pyx_mstate_global->__pyx_n_u_value_offsets,&__pyx_mstate_global->__pyx_n_u_data,&__pyx_mstate_global->__pyx_n_u_null_bitmap,&__pyx_mstate_global->__pyx_n_u_null_count,&__pyx_mstate_global->__pyx_n_u_offset,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(4, 3908, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  6:
            values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(4, 3908, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  5:
            values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(4, 3908, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  4:
            values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(4, 3908, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  3:
            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(4, 3908, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(4, 3908, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 3908, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "from_buffers", 0) < (0)) __PYX_ERR(4, 3908, __pyx_L3_error)

          /* "pyarrow/array.pxi":3910
 *     @staticmethod
 *     def from_buffers(int length, Buffer value_offsets, Buffer data,
 *                      Buffer null_bitmap=None, int null_count=-1,             # <<<<<<<<<<<<<<
 *                      int offset=0):
 *         """
*/
          if (!values[3]) values[3] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_7pyarrow_3lib_Buffer *)Py_None));
          for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("from_buffers", 0, 3, 6, i); __PYX_ERR(4, 3908, __pyx_L3_error) }
          }
        } else {
          switch (__pyx_nargs) {
            case  6:
            values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(4, 3908, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  5:
            values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(4, 3908, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  4:
            values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(4, 3908, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  3:
            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(4, 3908, __pyx_L3_error)
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(4, 3908, __pyx_L3_error)
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 3908, __pyx_L3_error)
            break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (!values[3]) values[3] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_7pyarrow_3lib_Buffer *)Py_None));
        }
        __pyx_v_length = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_length == (int)-1) && PyErr_Occurred())) __PYX_ERR(4, 3909, __pyx_L3_error)
        __pyx_v_value_offsets = ((struct __pyx_obj_7pyarrow_3lib_Buffer *)values[1]);
        __pyx_v_data = ((struct __pyx_obj_7pyarrow_3lib_Buffer *)values[2]);
        __pyx_v_null_bitmap = ((struct __pyx_obj_7pyarrow_3lib_Buffer *)values[3]);
        if (values[4]) {
          __pyx_v_null_count = __Pyx_PyLong_As_int(values[4]); if (unlikely((__pyx_v_null_count == (int)-1) && PyErr_Occurred())) __PYX_ERR(4, 3910, __pyx_L3_error)
        } else {
          __pyx_v_null_count = ((int)-1);
        }
        if (values[5]) {
          __pyx_v_offset = __Pyx_PyLong_As_int(values[5]); if (unlikely((__pyx_v_offset == (int)-1) && PyErr_Occurred())) __PYX_ERR(4, 3911, __pyx_L3_error)
        } else {
          __pyx_v_offset = ((int)0);
        }
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("from_buffers", 0, 3, 6, __pyx_nargs); __PYX_ERR(4, 3908, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.LargeStringArray.from_buffers", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_value_offsets), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Buffer, 1, "value_offsets", 0))) __PYX_ERR(4, 3909, __pyx_L1_error)
      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_data), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Buffer, 1, "data", 0))) __PYX_ERR(4, 3909, __pyx_L1_error)
      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_null_bitmap), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Buffer, 1, "null_bitmap", 0))) __PYX_ERR(4, 3910, __pyx_L1_error)
      __pyx_r = __pyx_pf_7pyarrow_3lib_16LargeStringArray_from_buffers(__pyx_v_length, __pyx_v_value_offsets, __pyx_v_data, __pyx_v_null_bitmap, __pyx_v_null_count, __pyx_v_offset);

      /* "pyarrow/array.pxi":3908
 *     """
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_buffers(int length, Buffer value_offsets, Buffer data,
 *                      Buffer null_bitmap=None, int null_count=-1,
*/

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = NULL;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      goto __pyx_L7_cleaned_up;
      __pyx_L0:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __pyx_L7_cleaned_up:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_16LargeStringArray_from_buffers(int __pyx_v_length, struct __pyx_obj_7pyarrow_3lib_Buffer *__pyx_v_value_offsets, struct __pyx_obj_7pyarrow_3lib_Buffer *__pyx_v_data, struct __pyx_obj_7pyarrow_3lib_Buffer *__pyx_v_null_bitmap, int __pyx_v_null_count, int __pyx_v_offset) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      PyObject *__pyx_t_5 = NULL;
      size_t __pyx_t_6;
      PyObject *__pyx_t_7 = NULL;
      PyObject *__pyx_t_8 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("from_buffers", 0);

      /* "pyarrow/array.pxi":3930
 *         string_array : StringArray
 *         """
 *         return Array.from_buffers(large_utf8(), length,             # <<<<<<<<<<<<<<
 *                                   [null_bitmap, value_offsets, data],
 *                                   null_count, offset)
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_4 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_large_utf8); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 3930, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
        assert(__pyx_t_4);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
        __pyx_t_6 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
        __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 3930, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      __pyx_t_5 = __Pyx_PyLong_From_int(__pyx_v_length); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 3930, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);

      /* "pyarrow/array.pxi":3931
 *         """
 *         return Array.from_buffers(large_utf8(), length,
 *                                   [null_bitmap, value_offsets, data],             # <<<<<<<<<<<<<<
 *                                   null_count, offset)
 * 
*/
      __pyx_t_4 = PyList_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 3931, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_INCREF((PyObject *)__pyx_v_null_bitmap);
      __Pyx_GIVEREF((PyObject *)__pyx_v_null_bitmap);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_null_bitmap)) != (0)) __PYX_ERR(4, 3931, __pyx_L1_error);
      __Pyx_INCREF((PyObject *)__pyx_v_value_offsets);
      __Pyx_GIVEREF((PyObject *)__pyx_v_value_offsets);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_v_value_offsets)) != (0)) __PYX_ERR(4, 3931, __pyx_L1_error);
      __Pyx_INCREF((PyObject *)__pyx_v_data);
      __Pyx_GIVEREF((PyObject *)__pyx_v_data);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 2, ((PyObject *)__pyx_v_data)) != (0)) __PYX_ERR(4, 3931, __pyx_L1_error);

      /* "pyarrow/array.pxi":3932
 *         return Array.from_buffers(large_utf8(), length,
 *                                   [null_bitmap, value_offsets, data],
 *                                   null_count, offset)             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __pyx_t_7 = __Pyx_PyLong_From_int(__pyx_v_null_count); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 3932, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = __Pyx_PyLong_From_int(__pyx_v_offset); if (unlikely(!__pyx_t_8)) __PYX_ERR(4, 3932, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_6 = 0;
      {
        PyObject *__pyx_callargs[6] = {__pyx_t_2, __pyx_t_3, __pyx_t_5, __pyx_t_4, __pyx_t_7, __pyx_t_8};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_from_buffers, __pyx_callargs+__pyx_t_6, (6-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 3930, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":3908
 *     """
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_buffers(int length, Buffer value_offsets, Buffer data,
 *                      Buffer null_bitmap=None, int null_count=-1,
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_8);
      __Pyx_AddTraceback("pyarrow.lib.LargeStringArray.from_buffers", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":3945
 *     Concrete class for Arrow arrays of variable-sized binary data type.
 *     """
 *     @property             # <<<<<<<<<<<<<<
 *     def total_values_length(self):
 *         """
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_11BinaryArray_19total_values_length_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_11BinaryArray_19total_values_length_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_11BinaryArray_19total_values_length___get__(((struct __pyx_obj_7pyarrow_3lib_BinaryArray *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_11BinaryArray_19total_values_length___get__(struct __pyx_obj_7pyarrow_3lib_BinaryArray *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__get__", 0);

      /* "pyarrow/array.pxi":3951
 *         by the offsets of this BinaryArray.
 *         """
 *         return (<CBinaryArray*> self.ap).total_values_length()             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "ap");
        __PYX_ERR(4, 3951, __pyx_L1_error)
      }
      __pyx_t_1 = __Pyx_PyLong_From_int32_t((( arrow::BinaryArray *)__pyx_v_self->__pyx_base.ap)->total_values_length()); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 3951, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":3945
 *     Concrete class for Arrow arrays of variable-sized binary data type.
 *     """
 *     @property             # <<<<<<<<<<<<<<
 *     def total_values_length(self):
 *         """
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("pyarrow.lib.BinaryArray.total_values_length.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":3958
 *     Concrete class for Arrow arrays of large variable-sized binary data type.
 *     """
 *     @property             # <<<<<<<<<<<<<<
 *     def total_values_length(self):
 *         """
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_16LargeBinaryArray_19total_values_length_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_16LargeBinaryArray_19total_values_length_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_16LargeBinaryArray_19total_values_length___get__(((struct __pyx_obj_7pyarrow_3lib_LargeBinaryArray *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_16LargeBinaryArray_19total_values_length___get__(struct __pyx_obj_7pyarrow_3lib_LargeBinaryArray *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__get__", 0);

      /* "pyarrow/array.pxi":3964
 *         by the offsets of this LargeBinaryArray.
 *         """
 *         return (<CLargeBinaryArray*> self.ap).total_values_length()             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "ap");
        __PYX_ERR(4, 3964, __pyx_L1_error)
      }
      __pyx_t_1 = __Pyx_PyLong_From_int64_t((( arrow::LargeBinaryArray *)__pyx_v_self->__pyx_base.ap)->total_values_length()); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 3964, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":3958
 *     Concrete class for Arrow arrays of large variable-sized binary data type.
 *     """
 *     @property             # <<<<<<<<<<<<<<
 *     def total_values_length(self):
 *         """
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("pyarrow.lib.LargeBinaryArray.total_values_length.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":3978
 *     """
 * 
 *     def dictionary_encode(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_15DictionaryArray_1dictionary_encode(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_15DictionaryArray_dictionary_encode, "DictionaryArray.dictionary_encode(self)");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_15DictionaryArray_1dictionary_encode = {"dictionary_encode", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15DictionaryArray_1dictionary_encode, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15DictionaryArray_dictionary_encode};
    static PyObject *__pyx_pw_7pyarrow_3lib_15DictionaryArray_1dictionary_encode(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("dictionary_encode (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("dictionary_encode", 1, 0, 0, __pyx_nargs); return NULL; }
      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
      if (unlikely(__pyx_kwds_len < 0)) return NULL;
      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("dictionary_encode", __pyx_kwds); return NULL;}
      __pyx_r = __pyx_pf_7pyarrow_3lib_15DictionaryArray_dictionary_encode(((struct __pyx_obj_7pyarrow_3lib_DictionaryArray *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_15DictionaryArray_dictionary_encode(struct __pyx_obj_7pyarrow_3lib_DictionaryArray *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("dictionary_encode", 0);

      /* "pyarrow/array.pxi":3979
 * 
 *     def dictionary_encode(self):
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def dictionary_decode(self):
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF((PyObject *)__pyx_v_self);
      __pyx_r = ((PyObject *)__pyx_v_self);
      goto __pyx_L0;

      /* "pyarrow/array.pxi":3978
 *     """
 * 
 *     def dictionary_encode(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
*/

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

    /* "pyarrow/array.pxi":3981
 *         return self
 * 
 *     def dictionary_decode(self):             # <<<<<<<<<<<<<<
 *         """
 *         Decodes the DictionaryArray to an Array.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_15DictionaryArray_3dictionary_decode(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_15DictionaryArray_2dictionary_decode, "DictionaryArray.dictionary_decode(self)\n\nDecodes the DictionaryArray to an Array.");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_15DictionaryArray_3dictionary_decode = {"dictionary_decode", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15DictionaryArray_3dictionary_decode, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15DictionaryArray_2dictionary_decode};
    static PyObject *__pyx_pw_7pyarrow_3lib_15DictionaryArray_3dictionary_decode(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("dictionary_decode (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("dictionary_decode", 1, 0, 0, __pyx_nargs); return NULL; }
      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
      if (unlikely(__pyx_kwds_len < 0)) return NULL;
      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("dictionary_decode", __pyx_kwds); return NULL;}
      __pyx_r = __pyx_pf_7pyarrow_3lib_15DictionaryArray_2dictionary_decode(((struct __pyx_obj_7pyarrow_3lib_DictionaryArray *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_15DictionaryArray_2dictionary_decode(struct __pyx_obj_7pyarrow_3lib_DictionaryArray *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      size_t __pyx_t_5;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("dictionary_decode", 0);

      /* "pyarrow/array.pxi":3985
 *         Decodes the DictionaryArray to an Array.
 *         """
 *         return self.dictionary.take(self.indices)             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dictionary); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 3985, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = __pyx_t_3;
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_indices); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 3985, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_take, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 3985, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":3981
 *         return self
 * 
 *     def dictionary_decode(self):             # <<<<<<<<<<<<<<
 *         """
 *         Decodes the DictionaryArray to an Array.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_AddTraceback("pyarrow.lib.DictionaryArray.dictionary_decode", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":3987
 *         return self.dictionary.take(self.indices)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def dictionary(self):
 *         cdef CDictionaryArray* darr = <CDictionaryArray*>(self.ap)
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_15DictionaryArray_10dictionary_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_15DictionaryArray_10dictionary_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_15DictionaryArray_10dictionary___get__(((struct __pyx_obj_7pyarrow_3lib_DictionaryArray *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_15DictionaryArray_10dictionary___get__(struct __pyx_obj_7pyarrow_3lib_DictionaryArray *__pyx_v_self) {
       arrow::DictionaryArray *__pyx_v_darr;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      int __pyx_t_1;
      PyObject *__pyx_t_2 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__get__", 0);

      /* "pyarrow/array.pxi":3989
 *     @property
 *     def dictionary(self):
 *         cdef CDictionaryArray* darr = <CDictionaryArray*>(self.ap)             # <<<<<<<<<<<<<<
 * 
 *         if self._dictionary is None:
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "ap");
        __PYX_ERR(4, 3989, __pyx_L1_error)
      }
      __pyx_v_darr = (( arrow::DictionaryArray *)__pyx_v_self->__pyx_base.ap);

      /* "pyarrow/array.pxi":3991
 *         cdef CDictionaryArray* darr = <CDictionaryArray*>(self.ap)
 * 
 *         if self._dictionary is None:             # <<<<<<<<<<<<<<
 *             self._dictionary = pyarrow_wrap_array(darr.dictionary())
 * 
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_dictionary");
        __PYX_ERR(4, 3991, __pyx_L1_error)
      }
      __pyx_t_1 = (__pyx_v_self->_dictionary == Py_None);
      if (__pyx_t_1) {

        /* "pyarrow/array.pxi":3992
 * 
 *         if self._dictionary is None:
 *             self._dictionary = pyarrow_wrap_array(darr.dictionary())             # <<<<<<<<<<<<<<
 * 
 *         return self._dictionary
*/
        __pyx_t_2 = pyarrow_wrap_array(__pyx_v_darr->dictionary()); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 3992, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_dictionary");
          __PYX_ERR(4, 3992, __pyx_L1_error)
        }
        __Pyx_GIVEREF(__pyx_t_2);
        __Pyx_GOTREF(__pyx_v_self->_dictionary);
        __Pyx_DECREF(__pyx_v_self->_dictionary);
        __pyx_v_self->_dictionary = __pyx_t_2;
        __pyx_t_2 = 0;

        /* "pyarrow/array.pxi":3991
 *         cdef CDictionaryArray* darr = <CDictionaryArray*>(self.ap)
 * 
 *         if self._dictionary is None:             # <<<<<<<<<<<<<<
 *             self._dictionary = pyarrow_wrap_array(darr.dictionary())
 * 
*/
      }

      /* "pyarrow/array.pxi":3994
 *             self._dictionary = pyarrow_wrap_array(darr.dictionary())
 * 
 *         return self._dictionary             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
      __Pyx_XDECREF(__pyx_r);
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_dictionary");
        __PYX_ERR(4, 3994, __pyx_L1_error)
      }
      __Pyx_INCREF(__pyx_v_self->_dictionary);
      __pyx_r = __pyx_v_self->_dictionary;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":3987
 *         return self.dictionary.take(self.indices)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def dictionary(self):
 *         cdef CDictionaryArray* darr = <CDictionaryArray*>(self.ap)
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_AddTraceback("pyarrow.lib.DictionaryArray.dictionary.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":3996
 *         return self._dictionary
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def indices(self):
 *         cdef CDictionaryArray* darr = <CDictionaryArray*>(self.ap)
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_15DictionaryArray_7indices_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_15DictionaryArray_7indices_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_15DictionaryArray_7indices___get__(((struct __pyx_obj_7pyarrow_3lib_DictionaryArray *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_15DictionaryArray_7indices___get__(struct __pyx_obj_7pyarrow_3lib_DictionaryArray *__pyx_v_self) {
       arrow::DictionaryArray *__pyx_v_darr;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      int __pyx_t_1;
      PyObject *__pyx_t_2 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__get__", 0);

      /* "pyarrow/array.pxi":3998
 *     @property
 *     def indices(self):
 *         cdef CDictionaryArray* darr = <CDictionaryArray*>(self.ap)             # <<<<<<<<<<<<<<
 * 
 *         if self._indices is None:
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "ap");
        __PYX_ERR(4, 3998, __pyx_L1_error)
      }
      __pyx_v_darr = (( arrow::DictionaryArray *)__pyx_v_self->__pyx_base.ap);

      /* "pyarrow/array.pxi":4000
 *         cdef CDictionaryArray* darr = <CDictionaryArray*>(self.ap)
 * 
 *         if self._indices is None:             # <<<<<<<<<<<<<<
 *             self._indices = pyarrow_wrap_array(darr.indices())
 * 
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_indices");
        __PYX_ERR(4, 4000, __pyx_L1_error)
      }
      __pyx_t_1 = (__pyx_v_self->_indices == Py_None);
      if (__pyx_t_1) {

        /* "pyarrow/array.pxi":4001
 * 
 *         if self._indices is None:
 *             self._indices = pyarrow_wrap_array(darr.indices())             # <<<<<<<<<<<<<<
 * 
 *         return self._indices
*/
        __pyx_t_2 = pyarrow_wrap_array(__pyx_v_darr->indices()); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 4001, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_indices");
          __PYX_ERR(4, 4001, __pyx_L1_error)
        }
        __Pyx_GIVEREF(__pyx_t_2);
        __Pyx_GOTREF(__pyx_v_self->_indices);
        __Pyx_DECREF(__pyx_v_self->_indices);
        __pyx_v_self->_indices = __pyx_t_2;
        __pyx_t_2 = 0;

        /* "pyarrow/array.pxi":4000
 *         cdef CDictionaryArray* darr = <CDictionaryArray*>(self.ap)
 * 
 *         if self._indices is None:             # <<<<<<<<<<<<<<
 *             self._indices = pyarrow_wrap_array(darr.indices())
 * 
*/
      }

      /* "pyarrow/array.pxi":4003
 *             self._indices = pyarrow_wrap_array(darr.indices())
 * 
 *         return self._indices             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
*/
      __Pyx_XDECREF(__pyx_r);
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_indices");
        __PYX_ERR(4, 4003, __pyx_L1_error)
      }
      __Pyx_INCREF(__pyx_v_self->_indices);
      __pyx_r = __pyx_v_self->_indices;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":3996
 *         return self._dictionary
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def indices(self):
 *         cdef CDictionaryArray* darr = <CDictionaryArray*>(self.ap)
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_AddTraceback("pyarrow.lib.DictionaryArray.indices.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":4005
 *         return self._indices
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_buffers(DataType type, int64_t length, buffers, Array dictionary,
 *                      int64_t null_count=-1, int64_t offset=0):
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_15DictionaryArray_5from_buffers(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_15DictionaryArray_4from_buffers, "DictionaryArray.from_buffers(DataType type, int64_t length, buffers, Array dictionary, int64_t null_count=-1, int64_t offset=0)\n\nConstruct a DictionaryArray from buffers.\n\nParameters\n----------\ntype : pyarrow.DataType\nlength : int\n    The number of values in the array.\nbuffers : List[Buffer]\n    The buffers backing the indices array.\ndictionary : pyarrow.Array, ndarray or pandas.Series\n    The array of values referenced by the indices.\nnull_count : int, default -1\n    The number of null entries in the indices array. Negative value means that\n    the null count is not known.\noffset : int, default 0\n    The array's logical offset (in values, not in bytes) from the\n    start of each buffer.\n\nReturns\n-------\ndict_array : DictionaryArray");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_15DictionaryArray_5from_buffers = {"from_buffers", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15DictionaryArray_5from_buffers, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15DictionaryArray_4from_buffers};
    static PyObject *__pyx_pw_7pyarrow_3lib_15DictionaryArray_5from_buffers(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v_type = 0;
      int64_t __pyx_v_length;
      PyObject *__pyx_v_buffers = 0;
      struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_dictionary = 0;
      int64_t __pyx_v_null_count;
      int64_t __pyx_v_offset;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[6] = {0,0,0,0,0,0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("from_buffers (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_type,&__pyx_mstate_global->__pyx_n_u_length,&__pyx_mstate_global->__pyx_n_u_buffers,&__pyx_mstate_global->__pyx_n_u_dictionary,&__pyx_mstate_global->__pyx_n_u_null_count,&__pyx_mstate_global->__pyx_n_u_offset,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(4, 4005, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  6:
            values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(4, 4005, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  5:
            values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(4, 4005, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  4:
            values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(4, 4005, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  3:
            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(4, 4005, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(4, 4005, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 4005, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "from_buffers", 0) < (0)) __PYX_ERR(4, 4005, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 4; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("from_buffers", 0, 4, 6, i); __PYX_ERR(4, 4005, __pyx_L3_error) }
          }
        } else {
          switch (__pyx_nargs) {
            case  6:
            values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(4, 4005, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  5:
            values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(4, 4005, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  4:
            values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(4, 4005, __pyx_L3_error)
            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(4, 4005, __pyx_L3_error)
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(4, 4005, __pyx_L3_error)
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 4005, __pyx_L3_error)
            break;
            default: goto __pyx_L5_argtuple_error;
          }
        }
        __pyx_v_type = ((struct __pyx_obj_7pyarrow_3lib_DataType *)values[0]);
        __pyx_v_length = __Pyx_PyLong_As_int64_t(values[1]); if (unlikely((__pyx_v_length == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(4, 4006, __pyx_L3_error)
        __pyx_v_buffers = values[2];
        __pyx_v_dictionary = ((struct __pyx_obj_7pyarrow_3lib_Array *)values[3]);
        if (values[4]) {
          __pyx_v_null_count = __Pyx_PyLong_As_int64_t(values[4]); if (unlikely((__pyx_v_null_count == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(4, 4007, __pyx_L3_error)
        } else {
          __pyx_v_null_count = ((int64_t)-1L);
        }
        if (values[5]) {
          __pyx_v_offset = __Pyx_PyLong_As_int64_t(values[5]); if (unlikely((__pyx_v_offset == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(4, 4007, __pyx_L3_error)
        } else {
          __pyx_v_offset = ((int64_t)0);
        }
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("from_buffers", 0, 4, 6, __pyx_nargs); __PYX_ERR(4, 4005, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.DictionaryArray.from_buffers", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_type), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType, 1, "type", 0))) __PYX_ERR(4, 4006, __pyx_L1_error)
      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dictionary), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array, 1, "dictionary", 0))) __PYX_ERR(4, 4006, __pyx_L1_error)
      __pyx_r = __pyx_pf_7pyarrow_3lib_15DictionaryArray_4from_buffers(__pyx_v_type, __pyx_v_length, __pyx_v_buffers, __pyx_v_dictionary, __pyx_v_null_count, __pyx_v_offset);

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = NULL;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      goto __pyx_L7_cleaned_up;
      __pyx_L0:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __pyx_L7_cleaned_up:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_15DictionaryArray_4from_buffers(struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v_type, int64_t __pyx_v_length, PyObject *__pyx_v_buffers, struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_dictionary, int64_t __pyx_v_null_count, int64_t __pyx_v_offset) {
      std::vector<std::shared_ptr< arrow::Buffer> >  __pyx_v_c_buffers;
      std::shared_ptr< arrow::DataType>  __pyx_v_c_type;
      std::shared_ptr< arrow::ArrayData>  __pyx_v_c_data;
      std::shared_ptr< arrow::Array>  __pyx_v_c_result;
      PyObject *__pyx_v_buf = NULL;
      struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_result = 0;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      Py_ssize_t __pyx_t_2;
      PyObject *(*__pyx_t_3)(PyObject *);
      PyObject *__pyx_t_4 = NULL;
      std::shared_ptr< arrow::Buffer>  __pyx_t_5;
      std::shared_ptr< arrow::DataType>  __pyx_t_6;
      size_t __pyx_t_7;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("from_buffers", 0);

      /* "pyarrow/array.pxi":4037
 *             shared_ptr[CArray] c_result
 * 
 *         for buf in buffers:             # <<<<<<<<<<<<<<
 *             c_buffers.push_back(pyarrow_unwrap_buffer(buf))
 * 
*/
      if (likely(PyList_CheckExact(__pyx_v_buffers)) || PyTuple_CheckExact(__pyx_v_buffers)) {
        __pyx_t_1 = __pyx_v_buffers; __Pyx_INCREF(__pyx_t_1);
        __pyx_t_2 = 0;
        __pyx_t_3 = NULL;
      } else {
        __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_buffers); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 4037, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_3 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 4037, __pyx_L1_error)
      }
      for (;;) {
        if (likely(!__pyx_t_3)) {
          if (likely(PyList_CheckExact(__pyx_t_1))) {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
              #if !CYTHON_ASSUME_SAFE_SIZE
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(4, 4037, __pyx_L1_error)
              #endif
              if (__pyx_t_2 >= __pyx_temp) break;
            }
            __pyx_t_4 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_2, __Pyx_ReferenceSharing_OwnStrongReference);
            ++__pyx_t_2;
          } else {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
              #if !CYTHON_ASSUME_SAFE_SIZE
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(4, 4037, __pyx_L1_error)
              #endif
              if (__pyx_t_2 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_4 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2));
            #else
            __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2);
            #endif
            ++__pyx_t_2;
          }
          if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 4037, __pyx_L1_error)
        } else {
          __pyx_t_4 = __pyx_t_3(__pyx_t_1);
          if (unlikely(!__pyx_t_4)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(4, 4037, __pyx_L1_error)
              PyErr_Clear();
            }
            break;
          }
        }
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_XDECREF_SET(__pyx_v_buf, __pyx_t_4);
        __pyx_t_4 = 0;

        /* "pyarrow/array.pxi":4038
 * 
 *         for buf in buffers:
 *             c_buffers.push_back(pyarrow_unwrap_buffer(buf))             # <<<<<<<<<<<<<<
 * 
 *         c_type = pyarrow_unwrap_data_type(type)
*/
        __pyx_t_5 = pyarrow_unwrap_buffer(__pyx_v_buf); if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 4038, __pyx_L1_error)
        try {
          __pyx_v_c_buffers.push_back(__pyx_t_5);
        } catch(...) {
          __Pyx_CppExn2PyErr();
          __PYX_ERR(4, 4038, __pyx_L1_error)
        }

        /* "pyarrow/array.pxi":4037
 *             shared_ptr[CArray] c_result
 * 
 *         for buf in buffers:             # <<<<<<<<<<<<<<
 *             c_buffers.push_back(pyarrow_unwrap_buffer(buf))
 * 
*/
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "pyarrow/array.pxi":4040
 *             c_buffers.push_back(pyarrow_unwrap_buffer(buf))
 * 
 *         c_type = pyarrow_unwrap_data_type(type)             # <<<<<<<<<<<<<<
 * 
 *         with nogil:
*/
      __pyx_t_6 = pyarrow_unwrap_data_type(((PyObject *)__pyx_v_type)); if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 4040, __pyx_L1_error)
      __pyx_v_c_type = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_6);

      /* "pyarrow/array.pxi":4042
 *         c_type = pyarrow_unwrap_data_type(type)
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             c_data = CArrayData.Make(
 *                 c_type, length, c_buffers, null_count, offset)
*/
      {
          PyThreadState * _save;
          _save = PyEval_SaveThread();
          __Pyx_FastGIL_Remember();
          /*try:*/ {

            /* "pyarrow/array.pxi":4043
 * 
 *         with nogil:
 *             c_data = CArrayData.Make(             # <<<<<<<<<<<<<<
 *                 c_type, length, c_buffers, null_count, offset)
 *             c_data.get().dictionary = dictionary.sp_array.get().data()
*/
            __pyx_v_c_data =  arrow::ArrayData::Make(__pyx_v_c_type, __pyx_v_length, __pyx_v_c_buffers, __pyx_v_null_count, __pyx_v_offset);

            /* "pyarrow/array.pxi":4045
 *             c_data = CArrayData.Make(
 *                 c_type, length, c_buffers, null_count, offset)
 *             c_data.get().dictionary = dictionary.sp_array.get().data()             # <<<<<<<<<<<<<<
 *             c_result.reset(new CDictionaryArray(c_data))
 * 
*/
            if (unlikely(((PyObject *)__pyx_v_dictionary) == Py_None)) {
              PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_array");
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              __PYX_ERR(4, 4045, __pyx_L7_error)
            }
            __pyx_v_c_data.get()->dictionary = __pyx_v_dictionary->sp_array.get()->data();

            /* "pyarrow/array.pxi":4046
 *                 c_type, length, c_buffers, null_count, offset)
 *             c_data.get().dictionary = dictionary.sp_array.get().data()
 *             c_result.reset(new CDictionaryArray(c_data))             # <<<<<<<<<<<<<<
 * 
 *         cdef Array result = pyarrow_wrap_array(c_result)
*/
            __pyx_v_c_result.reset(new  arrow::DictionaryArray(__pyx_v_c_data));
          }

          /* "pyarrow/array.pxi":4042
 *         c_type = pyarrow_unwrap_data_type(type)
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             c_data = CArrayData.Make(
 *                 c_type, length, c_buffers, null_count, offset)
*/
          /*finally:*/ {
            /*normal exit:*/{
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L8;
            }
            __pyx_L7_error: {
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L1_error;
            }
            __pyx_L8:;
          }
      }

      /* "pyarrow/array.pxi":4048
 *             c_result.reset(new CDictionaryArray(c_data))
 * 
 *         cdef Array result = pyarrow_wrap_array(c_result)             # <<<<<<<<<<<<<<
 *         result.validate()
 *         return result
*/
      __pyx_t_1 = pyarrow_wrap_array(__pyx_v_c_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 4048, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array))))) __PYX_ERR(4, 4048, __pyx_L1_error)
      __pyx_v_result = ((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_t_1);
      __pyx_t_1 = 0;

      /* "pyarrow/array.pxi":4049
 * 
 *         cdef Array result = pyarrow_wrap_array(c_result)
 *         result.validate()             # <<<<<<<<<<<<<<
 *         return result
 * 
*/
      __pyx_t_4 = ((PyObject *)__pyx_v_result);
      __Pyx_INCREF(__pyx_t_4);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_validate, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 4049, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "pyarrow/array.pxi":4050
 *         cdef Array result = pyarrow_wrap_array(c_result)
 *         result.validate()
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF((PyObject *)__pyx_v_result);
      __pyx_r = ((PyObject *)__pyx_v_result);
      goto __pyx_L0;

      /* "pyarrow/array.pxi":4005
 *         return self._indices
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_buffers(DataType type, int64_t length, buffers, Array dictionary,
 *                      int64_t null_count=-1, int64_t offset=0):
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_AddTraceback("pyarrow.lib.DictionaryArray.from_buffers", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_buf);
      __Pyx_XDECREF((PyObject *)__pyx_v_result);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":4052
 *         return result
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_arrays(indices, dictionary, mask=None, bint ordered=False,
 *                     bint from_pandas=False, bint safe=True,
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_15DictionaryArray_7from_arrays(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_15DictionaryArray_6from_arrays, "DictionaryArray.from_arrays(indices, dictionary, mask=None, bool ordered=False, bool from_pandas=False, bool safe=True, MemoryPool memory_pool=None)\n\nConstruct a DictionaryArray from indices and values.\n\nParameters\n----------\nindices : pyarrow.Array, numpy.ndarray or pandas.Series, int type\n    Non-negative integers referencing the dictionary values by zero\n    based index.\ndictionary : pyarrow.Array, ndarray or pandas.Series\n    The array of values referenced by the indices.\nmask : ndarray or pandas.Series, bool type\n    True values indicate that indices are actually null.\nordered : bool, default False\n    Set to True if the category values are ordered.\nfrom_pandas : bool, default False\n    If True, the indices should be treated as though they originated in\n    a pandas.Categorical (null encoded as -1).\nsafe : bool, default True\n    If True, check that the dictionary indices are in range.\nmemory_pool : MemoryPool, default None\n    For memory allocations, if required, otherwise uses default pool.\n\nReturns\n-------\ndict_array : DictionaryArray");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_15DictionaryArray_7from_arrays = {"from_arrays", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15DictionaryArray_7from_arrays, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15DictionaryArray_6from_arrays};
    static PyObject *__pyx_pw_7pyarrow_3lib_15DictionaryArray_7from_arrays(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_indices = 0;
      PyObject *__pyx_v_dictionary = 0;
      PyObject *__pyx_v_mask = 0;
      int __pyx_v_ordered;
      int __pyx_v_from_pandas;
      int __pyx_v_safe;
      struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_memory_pool = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[7] = {0,0,0,0,0,0,0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("from_arrays (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_indices,&__pyx_mstate_global->__pyx_n_u_dictionary,&__pyx_mstate_global->__pyx_n_u_mask,&__pyx_mstate_global->__pyx_n_u_ordered,&__pyx_mstate_global->__pyx_n_u_from_pandas,&__pyx_mstate_global->__pyx_n_u_safe,&__pyx_mstate_global->__pyx_n_u_memory_pool,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(4, 4052, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  7:
            values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(4, 4052, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  6:
            values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(4, 4052, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  5:
            values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(4, 4052, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  4:
            values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(4, 4052, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  3:
            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(4, 4052, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(4, 4052, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 4052, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "from_arrays", 0) < (0)) __PYX_ERR(4, 4052, __pyx_L3_error)

          /* "pyarrow/array.pxi":4053
 * 
 *     @staticmethod
 *     def from_arrays(indices, dictionary, mask=None, bint ordered=False,             # <<<<<<<<<<<<<<
 *                     bint from_pandas=False, bint safe=True,
 *                     MemoryPool memory_pool=None):
*/
          if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));

          /* "pyarrow/array.pxi":4055
 *     def from_arrays(indices, dictionary, mask=None, bint ordered=False,
 *                     bint from_pandas=False, bint safe=True,
 *                     MemoryPool memory_pool=None):             # <<<<<<<<<<<<<<
 *         """
 *         Construct a DictionaryArray from indices and values.
*/
          if (!values[6]) values[6] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)Py_None));
          for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("from_arrays", 0, 2, 7, i); __PYX_ERR(4, 4052, __pyx_L3_error) }
          }
        } else {
          switch (__pyx_nargs) {
            case  7:
            values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(4, 4052, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  6:
            values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(4, 4052, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  5:
            values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(4, 4052, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  4:
            values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(4, 4052, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  3:
            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(4, 4052, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(4, 4052, __pyx_L3_error)
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 4052, __pyx_L3_error)
            break;
            default: goto __pyx_L5_argtuple_error;
          }

          /* "pyarrow/array.pxi":4053
 * 
 *     @staticmethod
 *     def from_arrays(indices, dictionary, mask=None, bint ordered=False,             # <<<<<<<<<<<<<<
 *                     bint from_pandas=False, bint safe=True,
 *                     MemoryPool memory_pool=None):
*/
          if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));

          /* "pyarrow/array.pxi":4055
 *     def from_arrays(indices, dictionary, mask=None, bint ordered=False,
 *                     bint from_pandas=False, bint safe=True,
 *                     MemoryPool memory_pool=None):             # <<<<<<<<<<<<<<
 *         """
 *         Construct a DictionaryArray from indices and values.
*/
          if (!values[6]) values[6] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)Py_None));
        }
        __pyx_v_indices = values[0];
        __pyx_v_dictionary = values[1];
        __pyx_v_mask = values[2];
        if (values[3]) {
          __pyx_v_ordered = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_ordered == (int)-1) && PyErr_Occurred())) __PYX_ERR(4, 4053, __pyx_L3_error)
        } else {

          /* "pyarrow/array.pxi":4053
 * 
 *     @staticmethod
 *     def from_arrays(indices, dictionary, mask=None, bint ordered=False,             # <<<<<<<<<<<<<<
 *                     bint from_pandas=False, bint safe=True,
 *                     MemoryPool memory_pool=None):
*/
          __pyx_v_ordered = ((int)0);
        }
        if (values[4]) {
          __pyx_v_from_pandas = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_from_pandas == (int)-1) && PyErr_Occurred())) __PYX_ERR(4, 4054, __pyx_L3_error)
        } else {

          /* "pyarrow/array.pxi":4054
 *     @staticmethod
 *     def from_arrays(indices, dictionary, mask=None, bint ordered=False,
 *                     bint from_pandas=False, bint safe=True,             # <<<<<<<<<<<<<<
 *                     MemoryPool memory_pool=None):
 *         """
*/
          __pyx_v_from_pandas = ((int)0);
        }
        if (values[5]) {
          __pyx_v_safe = __Pyx_PyObject_IsTrue(values[5]); if (unlikely((__pyx_v_safe == (int)-1) && PyErr_Occurred())) __PYX_ERR(4, 4054, __pyx_L3_error)
        } else {
          __pyx_v_safe = ((int)1);
        }
        __pyx_v_memory_pool = ((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)values[6]);
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("from_arrays", 0, 2, 7, __pyx_nargs); __PYX_ERR(4, 4052, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.DictionaryArray.from_arrays", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_memory_pool), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_MemoryPool, 1, "memory_pool", 0))) __PYX_ERR(4, 4055, __pyx_L1_error)
      __pyx_r = __pyx_pf_7pyarrow_3lib_15DictionaryArray_6from_arrays(__pyx_v_indices, __pyx_v_dictionary, __pyx_v_mask, __pyx_v_ordered, __pyx_v_from_pandas, __pyx_v_safe, __pyx_v_memory_pool);

      /* "pyarrow/array.pxi":4052
 *         return result
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_arrays(indices, dictionary, mask=None, bint ordered=False,
 *                     bint from_pandas=False, bint safe=True,
*/

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = NULL;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      goto __pyx_L7_cleaned_up;
      __pyx_L0:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __pyx_L7_cleaned_up:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_15DictionaryArray_6from_arrays(PyObject *__pyx_v_indices, PyObject *__pyx_v_dictionary, PyObject *__pyx_v_mask, int __pyx_v_ordered, int __pyx_v_from_pandas, int __pyx_v_safe, struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_memory_pool) {
      struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v__indices = 0;
      struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v__dictionary = 0;
      std::shared_ptr< arrow::DataType>  __pyx_v_c_type;
      std::shared_ptr< arrow::Array>  __pyx_v_c_result;
      bool __pyx_v_c_ordered;
      struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_result = 0;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      int __pyx_t_1;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      size_t __pyx_t_4;
      PyObject *__pyx_t_5 = NULL;
      PyObject *__pyx_t_6 = NULL;
      int __pyx_t_7;
      std::shared_ptr< arrow::Array>  __pyx_t_8;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("from_arrays", 0);

      /* "pyarrow/array.pxi":4087
 *             shared_ptr[CArray] c_result
 * 
 *         if isinstance(indices, Array):             # <<<<<<<<<<<<<<
 *             if mask is not None:
 *                 raise NotImplementedError(
*/
      __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_indices, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array); 
      if (__pyx_t_1) {

        /* "pyarrow/array.pxi":4088
 * 
 *         if isinstance(indices, Array):
 *             if mask is not None:             # <<<<<<<<<<<<<<
 *                 raise NotImplementedError(
 *                     "mask not implemented with Arrow array inputs yet")
*/
        __pyx_t_1 = (__pyx_v_mask != Py_None);
        if (unlikely(__pyx_t_1)) {

          /* "pyarrow/array.pxi":4089
 *         if isinstance(indices, Array):
 *             if mask is not None:
 *                 raise NotImplementedError(             # <<<<<<<<<<<<<<
 *                     "mask not implemented with Arrow array inputs yet")
 *             _indices = indices
*/
          __pyx_t_3 = NULL;
          __pyx_t_4 = 1;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_mask_not_implemented_with_Arrow};
            __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_NotImplementedError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 4089, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
          }
          __Pyx_Raise(__pyx_t_2, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __PYX_ERR(4, 4089, __pyx_L1_error)

          /* "pyarrow/array.pxi":4088
 * 
 *         if isinstance(indices, Array):
 *             if mask is not None:             # <<<<<<<<<<<<<<
 *                 raise NotImplementedError(
 *                     "mask not implemented with Arrow array inputs yet")
*/
        }

        /* "pyarrow/array.pxi":4091
 *                 raise NotImplementedError(
 *                     "mask not implemented with Arrow array inputs yet")
 *             _indices = indices             # <<<<<<<<<<<<<<
 *         else:
 *             if from_pandas:
*/
        __pyx_t_2 = __pyx_v_indices;
        __Pyx_INCREF(__pyx_t_2);
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array))))) __PYX_ERR(4, 4091, __pyx_L1_error)
        __pyx_v__indices = ((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_t_2);
        __pyx_t_2 = 0;

        /* "pyarrow/array.pxi":4087
 *             shared_ptr[CArray] c_result
 * 
 *         if isinstance(indices, Array):             # <<<<<<<<<<<<<<
 *             if mask is not None:
 *                 raise NotImplementedError(
*/
        goto __pyx_L3;
      }

      /* "pyarrow/array.pxi":4093
 *             _indices = indices
 *         else:
 *             if from_pandas:             # <<<<<<<<<<<<<<
 *                 _indices = _codes_to_indices(indices, mask, None, memory_pool)
 *             else:
*/
      /*else*/ {
        if (__pyx_v_from_pandas) {

          /* "pyarrow/array.pxi":4094
 *         else:
 *             if from_pandas:
 *                 _indices = _codes_to_indices(indices, mask, None, memory_pool)             # <<<<<<<<<<<<<<
 *             else:
 *                 _indices = array(indices, mask=mask, memory_pool=memory_pool)
*/
          __pyx_t_2 = __pyx_f_7pyarrow_3lib__codes_to_indices(__pyx_v_indices, __pyx_v_mask, ((struct __pyx_obj_7pyarrow_3lib_DataType *)Py_None), __pyx_v_memory_pool); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 4094, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array))))) __PYX_ERR(4, 4094, __pyx_L1_error)
          __pyx_v__indices = ((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_t_2);
          __pyx_t_2 = 0;

          /* "pyarrow/array.pxi":4093
 *             _indices = indices
 *         else:
 *             if from_pandas:             # <<<<<<<<<<<<<<
 *                 _indices = _codes_to_indices(indices, mask, None, memory_pool)
 *             else:
*/
          goto __pyx_L5;
        }

        /* "pyarrow/array.pxi":4096
 *                 _indices = _codes_to_indices(indices, mask, None, memory_pool)
 *             else:
 *                 _indices = array(indices, mask=mask, memory_pool=memory_pool)             # <<<<<<<<<<<<<<
 * 
 *         if isinstance(dictionary, Array):
*/
        /*else*/ {
          __pyx_t_3 = NULL;
          __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_array); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 4096, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_4 = 1;
          #if CYTHON_UNPACK_METHODS
          if (unlikely(PyMethod_Check(__pyx_t_5))) {
            __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
            assert(__pyx_t_3);
            PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
            __Pyx_INCREF(__pyx_t_3);
            __Pyx_INCREF(__pyx__function);
            __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
            __pyx_t_4 = 0;
          }
          #endif
          {
            PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_3, __pyx_v_indices};
            __pyx_t_6 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 4096, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_6);
            if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_mask, __pyx_v_mask, __pyx_t_6, __pyx_callargs+2, 0) < (0)) __PYX_ERR(4, 4096, __pyx_L1_error)
            if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_memory_pool, ((PyObject *)__pyx_v_memory_pool), __pyx_t_6, __pyx_callargs+2, 1) < (0)) __PYX_ERR(4, 4096, __pyx_L1_error)
            __pyx_t_2 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_6);
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
            if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 4096, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
          }
          if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array))))) __PYX_ERR(4, 4096, __pyx_L1_error)
          __pyx_v__indices = ((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_t_2);
          __pyx_t_2 = 0;
        }
        __pyx_L5:;
      }
      __pyx_L3:;

      /* "pyarrow/array.pxi":4098
 *                 _indices = array(indices, mask=mask, memory_pool=memory_pool)
 * 
 *         if isinstance(dictionary, Array):             # <<<<<<<<<<<<<<
 *             _dictionary = dictionary
 *         else:
*/
      __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_dictionary, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array); 
      if (__pyx_t_1) {

        /* "pyarrow/array.pxi":4099
 * 
 *         if isinstance(dictionary, Array):
 *             _dictionary = dictionary             # <<<<<<<<<<<<<<
 *         else:
 *             _dictionary = array(dictionary, memory_pool=memory_pool)
*/
        __pyx_t_2 = __pyx_v_dictionary;
        __Pyx_INCREF(__pyx_t_2);
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array))))) __PYX_ERR(4, 4099, __pyx_L1_error)
        __pyx_v__dictionary = ((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_t_2);
        __pyx_t_2 = 0;

        /* "pyarrow/array.pxi":4098
 *                 _indices = array(indices, mask=mask, memory_pool=memory_pool)
 * 
 *         if isinstance(dictionary, Array):             # <<<<<<<<<<<<<<
 *             _dictionary = dictionary
 *         else:
*/
        goto __pyx_L6;
      }

      /* "pyarrow/array.pxi":4101
 *             _dictionary = dictionary
 *         else:
 *             _dictionary = array(dictionary, memory_pool=memory_pool)             # <<<<<<<<<<<<<<
 * 
 *         if not isinstance(_indices, IntegerArray):
*/
      /*else*/ {
        __pyx_t_5 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_array); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 4101, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_4 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_6))) {
          __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
          assert(__pyx_t_5);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
          __pyx_t_4 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_5, __pyx_v_dictionary};
          __pyx_t_3 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 4101, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_memory_pool, ((PyObject *)__pyx_v_memory_pool), __pyx_t_3, __pyx_callargs+2, 0) < (0)) __PYX_ERR(4, 4101, __pyx_L1_error)
          __pyx_t_2 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_3);
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 4101, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array))))) __PYX_ERR(4, 4101, __pyx_L1_error)
        __pyx_v__dictionary = ((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_t_2);
        __pyx_t_2 = 0;
      }
      __pyx_L6:;

      /* "pyarrow/array.pxi":4103
 *             _dictionary = array(dictionary, memory_pool=memory_pool)
 * 
 *         if not isinstance(_indices, IntegerArray):             # <<<<<<<<<<<<<<
 *             raise ValueError('Indices must be integer type')
 * 
*/
      __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v__indices), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_IntegerArray); 
      __pyx_t_7 = (!__pyx_t_1);
      if (unlikely(__pyx_t_7)) {

        /* "pyarrow/array.pxi":4104
 * 
 *         if not isinstance(_indices, IntegerArray):
 *             raise ValueError('Indices must be integer type')             # <<<<<<<<<<<<<<
 * 
 *         cdef c_bool c_ordered = ordered
*/
        __pyx_t_6 = NULL;
        __pyx_t_4 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_mstate_global->__pyx_kp_u_Indices_must_be_integer_type};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 4104, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __Pyx_Raise(__pyx_t_2, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __PYX_ERR(4, 4104, __pyx_L1_error)

        /* "pyarrow/array.pxi":4103
 *             _dictionary = array(dictionary, memory_pool=memory_pool)
 * 
 *         if not isinstance(_indices, IntegerArray):             # <<<<<<<<<<<<<<
 *             raise ValueError('Indices must be integer type')
 * 
*/
      }

      /* "pyarrow/array.pxi":4106
 *             raise ValueError('Indices must be integer type')
 * 
 *         cdef c_bool c_ordered = ordered             # <<<<<<<<<<<<<<
 * 
 *         c_type.reset(new CDictionaryType(_indices.type.sp_type,
*/
      __pyx_v_c_ordered = __pyx_v_ordered;

      /* "pyarrow/array.pxi":4108
 *         cdef c_bool c_ordered = ordered
 * 
 *         c_type.reset(new CDictionaryType(_indices.type.sp_type,             # <<<<<<<<<<<<<<
 *                                          _dictionary.sp_array.get().type(),
 *                                          c_ordered))
*/
      if (unlikely(((PyObject *)__pyx_v__indices) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "type");
        __PYX_ERR(4, 4108, __pyx_L1_error)
      }
      if (unlikely(((PyObject *)__pyx_v__indices->type) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_type");
        __PYX_ERR(4, 4108, __pyx_L1_error)
      }

      /* "pyarrow/array.pxi":4109
 * 
 *         c_type.reset(new CDictionaryType(_indices.type.sp_type,
 *                                          _dictionary.sp_array.get().type(),             # <<<<<<<<<<<<<<
 *                                          c_ordered))
 * 
*/
      if (unlikely(((PyObject *)__pyx_v__dictionary) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_array");
        __PYX_ERR(4, 4109, __pyx_L1_error)
      }

      /* "pyarrow/array.pxi":4108
 *         cdef c_bool c_ordered = ordered
 * 
 *         c_type.reset(new CDictionaryType(_indices.type.sp_type,             # <<<<<<<<<<<<<<
 *                                          _dictionary.sp_array.get().type(),
 *                                          c_ordered))
*/
      __pyx_v_c_type.reset(new  arrow::DictionaryType(__pyx_v__indices->type->sp_type, __pyx_v__dictionary->sp_array.get()->type(), __pyx_v_c_ordered));

      /* "pyarrow/array.pxi":4112
 *                                          c_ordered))
 * 
 *         if safe:             # <<<<<<<<<<<<<<
 *             with nogil:
 *                 c_result = GetResultValue(
*/
      if (__pyx_v_safe) {

        /* "pyarrow/array.pxi":4113
 * 
 *         if safe:
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 c_result = GetResultValue(
 *                     CDictionaryArray.FromArrays(c_type, _indices.sp_array,
*/
        {
            PyThreadState * _save;
            _save = PyEval_SaveThread();
            __Pyx_FastGIL_Remember();
            /*try:*/ {

              /* "pyarrow/array.pxi":4115
 *             with nogil:
 *                 c_result = GetResultValue(
 *                     CDictionaryArray.FromArrays(c_type, _indices.sp_array,             # <<<<<<<<<<<<<<
 *                                                 _dictionary.sp_array))
 *         else:
*/
              if (unlikely(((PyObject *)__pyx_v__indices) == Py_None)) {
                PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_array");
                __Pyx_PyGILState_Release(__pyx_gilstate_save);
                __PYX_ERR(4, 4115, __pyx_L10_error)
              }

              /* "pyarrow/array.pxi":4116
 *                 c_result = GetResultValue(
 *                     CDictionaryArray.FromArrays(c_type, _indices.sp_array,
 *                                                 _dictionary.sp_array))             # <<<<<<<<<<<<<<
 *         else:
 *             c_result.reset(new CDictionaryArray(c_type, _indices.sp_array,
*/
              if (unlikely(((PyObject *)__pyx_v__dictionary) == Py_None)) {
                PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_array");
                __Pyx_PyGILState_Release(__pyx_gilstate_save);
                __PYX_ERR(4, 4116, __pyx_L10_error)
              }

              /* "pyarrow/array.pxi":4114
 *         if safe:
 *             with nogil:
 *                 c_result = GetResultValue(             # <<<<<<<<<<<<<<
 *                     CDictionaryArray.FromArrays(c_type, _indices.sp_array,
 *                                                 _dictionary.sp_array))
*/
              __pyx_t_8 = arrow::py::GetResultValue<std::shared_ptr< arrow::Array> >( arrow::DictionaryArray::FromArrays(__pyx_v_c_type, __pyx_v__indices->sp_array, __pyx_v__dictionary->sp_array)); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(4, 4114, __pyx_L10_error)
              __pyx_v_c_result = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_8);
            }

            /* "pyarrow/array.pxi":4113
 * 
 *         if safe:
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 c_result = GetResultValue(
 *                     CDictionaryArray.FromArrays(c_type, _indices.sp_array,
*/
            /*finally:*/ {
              /*normal exit:*/{
                __Pyx_FastGIL_Forget();
                PyEval_RestoreThread(_save);
                goto __pyx_L11;
              }
              __pyx_L10_error: {
                __Pyx_FastGIL_Forget();
                PyEval_RestoreThread(_save);
                goto __pyx_L1_error;
              }
              __pyx_L11:;
            }
        }

        /* "pyarrow/array.pxi":4112
 *                                          c_ordered))
 * 
 *         if safe:             # <<<<<<<<<<<<<<
 *             with nogil:
 *                 c_result = GetResultValue(
*/
        goto __pyx_L8;
      }

      /* "pyarrow/array.pxi":4118
 *                                                 _dictionary.sp_array))
 *         else:
 *             c_result.reset(new CDictionaryArray(c_type, _indices.sp_array,             # <<<<<<<<<<<<<<
 *                                                 _dictionary.sp_array))
 * 
*/
      /*else*/ {
        if (unlikely(((PyObject *)__pyx_v__indices) == Py_None)) {
          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_array");
          __PYX_ERR(4, 4118, __pyx_L1_error)
        }

        /* "pyarrow/array.pxi":4119
 *         else:
 *             c_result.reset(new CDictionaryArray(c_type, _indices.sp_array,
 *                                                 _dictionary.sp_array))             # <<<<<<<<<<<<<<
 * 
 *         cdef Array result = pyarrow_wrap_array(c_result)
*/
        if (unlikely(((PyObject *)__pyx_v__dictionary) == Py_None)) {
          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_array");
          __PYX_ERR(4, 4119, __pyx_L1_error)
        }

        /* "pyarrow/array.pxi":4118
 *                                                 _dictionary.sp_array))
 *         else:
 *             c_result.reset(new CDictionaryArray(c_type, _indices.sp_array,             # <<<<<<<<<<<<<<
 *                                                 _dictionary.sp_array))
 * 
*/
        __pyx_v_c_result.reset(new  arrow::DictionaryArray(__pyx_v_c_type, __pyx_v__indices->sp_array, __pyx_v__dictionary->sp_array));
      }
      __pyx_L8:;

      /* "pyarrow/array.pxi":4121
 *                                                 _dictionary.sp_array))
 * 
 *         cdef Array result = pyarrow_wrap_array(c_result)             # <<<<<<<<<<<<<<
 *         result.validate()
 *         return result
*/
      __pyx_t_2 = pyarrow_wrap_array(__pyx_v_c_result); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 4121, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array))))) __PYX_ERR(4, 4121, __pyx_L1_error)
      __pyx_v_result = ((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_t_2);
      __pyx_t_2 = 0;

      /* "pyarrow/array.pxi":4122
 * 
 *         cdef Array result = pyarrow_wrap_array(c_result)
 *         result.validate()             # <<<<<<<<<<<<<<
 *         return result
 * 
*/
      __pyx_t_6 = ((PyObject *)__pyx_v_result);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_4 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
        __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_validate, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 4122, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyarrow/array.pxi":4123
 *         cdef Array result = pyarrow_wrap_array(c_result)
 *         result.validate()
 *         return result             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF((PyObject *)__pyx_v_result);
      __pyx_r = ((PyObject *)__pyx_v_result);
      goto __pyx_L0;

      /* "pyarrow/array.pxi":4052
 *         return result
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_arrays(indices, dictionary, mask=None, bint ordered=False,
 *                     bint from_pandas=False, bint safe=True,
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_AddTraceback("pyarrow.lib.DictionaryArray.from_arrays", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF((PyObject *)__pyx_v__indices);
      __Pyx_XDECREF((PyObject *)__pyx_v__dictionary);
      __Pyx_XDECREF((PyObject *)__pyx_v_result);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":4131
 *     """
 * 
 *     def field(self, index):             # <<<<<<<<<<<<<<
 *         """
 *         Retrieves the child array belonging to field.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_11StructArray_1field(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_11StructArray_field, "StructArray.field(self, index)\n\nRetrieves the child array belonging to field.\n\nParameters\n----------\nindex : Union[int, str]\n    Index / position or name of the field.\n\nReturns\n-------\nresult : Array");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_11StructArray_1field = {"field", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_11StructArray_1field, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_11StructArray_field};
    static PyObject *__pyx_pw_7pyarrow_3lib_11StructArray_1field(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_index = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("field (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_index,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(4, 4131, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 4131, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "field", 0) < (0)) __PYX_ERR(4, 4131, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("field", 1, 1, 1, i); __PYX_ERR(4, 4131, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 1)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 4131, __pyx_L3_error)
        }
        __pyx_v_index = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("field", 1, 1, 1, __pyx_nargs); __PYX_ERR(4, 4131, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.StructArray.field", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_11StructArray_field(((struct __pyx_obj_7pyarrow_3lib_StructArray *)__pyx_v_self), __pyx_v_index);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_11StructArray_field(struct __pyx_obj_7pyarrow_3lib_StructArray *__pyx_v_self, PyObject *__pyx_v_index) {
       arrow::StructArray *__pyx_v_arr;
      std::shared_ptr< arrow::Array>  __pyx_v_child;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      int __pyx_t_1;
      int __pyx_t_2;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      PyObject *__pyx_t_5 = NULL;
      size_t __pyx_t_6;
      std::string __pyx_t_7;
      Py_ssize_t __pyx_t_8;
      Py_ssize_t __pyx_t_9;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("field", 0);

      /* "pyarrow/array.pxi":4145
 *         """
 *         cdef:
 *             CStructArray* arr = <CStructArray*> self.ap             # <<<<<<<<<<<<<<
 *             shared_ptr[CArray] child
 * 
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "ap");
        __PYX_ERR(4, 4145, __pyx_L1_error)
      }
      __pyx_v_arr = (( arrow::StructArray *)__pyx_v_self->__pyx_base.ap);

      /* "pyarrow/array.pxi":4148
 *             shared_ptr[CArray] child
 * 
 *         if isinstance(index, (bytes, str)):             # <<<<<<<<<<<<<<
 *             child = arr.GetFieldByName(tobytes(index))
 *             if child == nullptr:
*/
      __pyx_t_2 = PyBytes_Check(__pyx_v_index); 
      if (!__pyx_t_2) {
      } else {
        __pyx_t_1 = __pyx_t_2;
        goto __pyx_L4_bool_binop_done;
      }
      __pyx_t_2 = PyUnicode_Check(__pyx_v_index); 
      __pyx_t_1 = __pyx_t_2;
      __pyx_L4_bool_binop_done:;
      if (__pyx_t_1) {

        /* "pyarrow/array.pxi":4149
 * 
 *         if isinstance(index, (bytes, str)):
 *             child = arr.GetFieldByName(tobytes(index))             # <<<<<<<<<<<<<<
 *             if child == nullptr:
 *                 raise KeyError(index)
*/
        __pyx_t_4 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_tobytes); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 4149, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_6 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
          assert(__pyx_t_4);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
          __pyx_t_6 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_index};
          __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 4149, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        __pyx_t_7 = __pyx_convert_string_from_py_6libcpp_6string_std__in_string(__pyx_t_3); if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 4149, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_v_child = __pyx_v_arr->GetFieldByName(__pyx_t_7);

        /* "pyarrow/array.pxi":4150
 *         if isinstance(index, (bytes, str)):
 *             child = arr.GetFieldByName(tobytes(index))
 *             if child == nullptr:             # <<<<<<<<<<<<<<
 *                 raise KeyError(index)
 *         elif isinstance(index, int):
*/
        __pyx_t_1 = ((__pyx_v_child == nullptr) != 0);
        if (unlikely(__pyx_t_1)) {

          /* "pyarrow/array.pxi":4151
 *             child = arr.GetFieldByName(tobytes(index))
 *             if child == nullptr:
 *                 raise KeyError(index)             # <<<<<<<<<<<<<<
 *         elif isinstance(index, int):
 *             child = arr.field(
*/
          __pyx_t_5 = NULL;
          __pyx_t_6 = 1;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_index};
            __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_KeyError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
            if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 4151, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
          }
          __Pyx_Raise(__pyx_t_3, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __PYX_ERR(4, 4151, __pyx_L1_error)

          /* "pyarrow/array.pxi":4150
 *         if isinstance(index, (bytes, str)):
 *             child = arr.GetFieldByName(tobytes(index))
 *             if child == nullptr:             # <<<<<<<<<<<<<<
 *                 raise KeyError(index)
 *         elif isinstance(index, int):
*/
        }

        /* "pyarrow/array.pxi":4148
 *             shared_ptr[CArray] child
 * 
 *         if isinstance(index, (bytes, str)):             # <<<<<<<<<<<<<<
 *             child = arr.GetFieldByName(tobytes(index))
 *             if child == nullptr:
*/
        goto __pyx_L3;
      }

      /* "pyarrow/array.pxi":4152
 *             if child == nullptr:
 *                 raise KeyError(index)
 *         elif isinstance(index, int):             # <<<<<<<<<<<<<<
 *             child = arr.field(
 *                 <int>_normalize_index(index, self.ap.num_fields()))
*/
      __pyx_t_1 = PyLong_Check(__pyx_v_index); 
      if (likely(__pyx_t_1)) {

        /* "pyarrow/array.pxi":4154
 *         elif isinstance(index, int):
 *             child = arr.field(
 *                 <int>_normalize_index(index, self.ap.num_fields()))             # <<<<<<<<<<<<<<
 *         else:
 *             raise TypeError('Expected integer or string index')
*/
        __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_v_index); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(4, 4154, __pyx_L1_error)
        if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "ap");
          __PYX_ERR(4, 4154, __pyx_L1_error)
        }
        __pyx_t_9 = __pyx_f_7pyarrow_3lib__normalize_index(__pyx_t_8, __pyx_v_self->__pyx_base.ap->num_fields()); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1L))) __PYX_ERR(4, 4154, __pyx_L1_error)

        /* "pyarrow/array.pxi":4153
 *                 raise KeyError(index)
 *         elif isinstance(index, int):
 *             child = arr.field(             # <<<<<<<<<<<<<<
 *                 <int>_normalize_index(index, self.ap.num_fields()))
 *         else:
*/
        __pyx_v_child = __pyx_v_arr->field(((int)__pyx_t_9));

        /* "pyarrow/array.pxi":4152
 *             if child == nullptr:
 *                 raise KeyError(index)
 *         elif isinstance(index, int):             # <<<<<<<<<<<<<<
 *             child = arr.field(
 *                 <int>_normalize_index(index, self.ap.num_fields()))
*/
        goto __pyx_L3;
      }

      /* "pyarrow/array.pxi":4156
 *                 <int>_normalize_index(index, self.ap.num_fields()))
 *         else:
 *             raise TypeError('Expected integer or string index')             # <<<<<<<<<<<<<<
 * 
 *         return pyarrow_wrap_array(child)
*/
      /*else*/ {
        __pyx_t_5 = NULL;
        __pyx_t_6 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_Expected_integer_or_string_index};
          __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 4156, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        __Pyx_Raise(__pyx_t_3, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __PYX_ERR(4, 4156, __pyx_L1_error)
      }
      __pyx_L3:;

      /* "pyarrow/array.pxi":4158
 *             raise TypeError('Expected integer or string index')
 * 
 *         return pyarrow_wrap_array(child)             # <<<<<<<<<<<<<<
 * 
 *     def _flattened_field(self, index, MemoryPool memory_pool=None):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = pyarrow_wrap_array(__pyx_v_child); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 4158, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":4131
 *     """
 * 
 *     def field(self, index):             # <<<<<<<<<<<<<<
 *         """
 *         Retrieves the child array belonging to field.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_AddTraceback("pyarrow.lib.StructArray.field", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":4160
 *         return pyarrow_wrap_array(child)
 * 
 *     def _flattened_field(self, index, MemoryPool memory_pool=None):             # <<<<<<<<<<<<<<
 *         """
 *         Retrieves the child array belonging to field,
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_11StructArray_3_flattened_field(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_11StructArray_2_flattened_field, "StructArray._flattened_field(self, index, MemoryPool memory_pool=None)\n\nRetrieves the child array belonging to field,\naccounting for the parent array null bitmap.\n\nParameters\n----------\nindex : Union[int, str]\n    Index / position or name of the field.\nmemory_pool : MemoryPool, default None\n    For memory allocations, if required, otherwise use default pool.\n\nReturns\n-------\nresult : Array");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_11StructArray_3_flattened_field = {"_flattened_field", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_11StructArray_3_flattened_field, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_11StructArray_2_flattened_field};
    static PyObject *__pyx_pw_7pyarrow_3lib_11StructArray_3_flattened_field(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_index = 0;
      struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_memory_pool = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[2] = {0,0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("_flattened_field (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_index,&__pyx_mstate_global->__pyx_n_u_memory_pool,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(4, 4160, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(4, 4160, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 4160, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_flattened_field", 0) < (0)) __PYX_ERR(4, 4160, __pyx_L3_error)
          if (!values[1]) values[1] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)Py_None));
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_flattened_field", 0, 1, 2, i); __PYX_ERR(4, 4160, __pyx_L3_error) }
          }
        } else {
          switch (__pyx_nargs) {
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(4, 4160, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 4160, __pyx_L3_error)
            break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (!values[1]) values[1] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)Py_None));
        }
        __pyx_v_index = values[0];
        __pyx_v_memory_pool = ((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)values[1]);
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("_flattened_field", 0, 1, 2, __pyx_nargs); __PYX_ERR(4, 4160, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.StructArray._flattened_field", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_memory_pool), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_MemoryPool, 1, "memory_pool", 0))) __PYX_ERR(4, 4160, __pyx_L1_error)
      __pyx_r = __pyx_pf_7pyarrow_3lib_11StructArray_2_flattened_field(((struct __pyx_obj_7pyarrow_3lib_StructArray *)__pyx_v_self), __pyx_v_index, __pyx_v_memory_pool);

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = NULL;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      goto __pyx_L7_cleaned_up;
      __pyx_L0:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __pyx_L7_cleaned_up:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_11StructArray_2_flattened_field(struct __pyx_obj_7pyarrow_3lib_StructArray *__pyx_v_self, PyObject *__pyx_v_index, struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_memory_pool) {
       arrow::StructArray *__pyx_v_arr;
      std::shared_ptr< arrow::Array>  __pyx_v_child;
       arrow::MemoryPool *__pyx_v_pool;
      PyObject *__pyx_v_int_index = NULL;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
       arrow::MemoryPool *__pyx_t_1;
      int __pyx_t_2;
      int __pyx_t_3;
      PyObject *__pyx_t_4 = NULL;
      PyObject *__pyx_t_5 = NULL;
      size_t __pyx_t_6;
      Py_ssize_t __pyx_t_7;
      Py_ssize_t __pyx_t_8;
      int __pyx_t_9;
      std::shared_ptr< arrow::Array>  __pyx_t_10;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("_flattened_field", 0);

      /* "pyarrow/array.pxi":4177
 *         """
 *         cdef:
 *             CStructArray* arr = <CStructArray*> self.ap             # <<<<<<<<<<<<<<
 *             shared_ptr[CArray] child
 *             CMemoryPool* pool = maybe_unbox_memory_pool(memory_pool)
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "ap");
        __PYX_ERR(4, 4177, __pyx_L1_error)
      }
      __pyx_v_arr = (( arrow::StructArray *)__pyx_v_self->__pyx_base.ap);

      /* "pyarrow/array.pxi":4179
 *             CStructArray* arr = <CStructArray*> self.ap
 *             shared_ptr[CArray] child
 *             CMemoryPool* pool = maybe_unbox_memory_pool(memory_pool)             # <<<<<<<<<<<<<<
 * 
 *         if isinstance(index, (bytes, str)):
*/
      __pyx_t_1 = __pyx_f_7pyarrow_3lib_maybe_unbox_memory_pool(__pyx_v_memory_pool); if (unlikely(__pyx_t_1 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(4, 4179, __pyx_L1_error)
      __pyx_v_pool = __pyx_t_1;

      /* "pyarrow/array.pxi":4181
 *             CMemoryPool* pool = maybe_unbox_memory_pool(memory_pool)
 * 
 *         if isinstance(index, (bytes, str)):             # <<<<<<<<<<<<<<
 *             int_index = self.type.get_field_index(index)
 *             if int_index < 0:
*/
      __pyx_t_3 = PyBytes_Check(__pyx_v_index); 
      if (!__pyx_t_3) {
      } else {
        __pyx_t_2 = __pyx_t_3;
        goto __pyx_L4_bool_binop_done;
      }
      __pyx_t_3 = PyUnicode_Check(__pyx_v_index); 
      __pyx_t_2 = __pyx_t_3;
      __pyx_L4_bool_binop_done:;
      if (__pyx_t_2) {

        /* "pyarrow/array.pxi":4182
 * 
 *         if isinstance(index, (bytes, str)):
 *             int_index = self.type.get_field_index(index)             # <<<<<<<<<<<<<<
 *             if int_index < 0:
 *                 raise KeyError(index)
*/
        if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "type");
          __PYX_ERR(4, 4182, __pyx_L1_error)
        }
        __pyx_t_5 = ((PyObject *)__pyx_v_self->__pyx_base.type);
        __Pyx_INCREF(__pyx_t_5);
        __pyx_t_6 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_index};
          __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_field_index, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 4182, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
        }
        __pyx_v_int_index = __pyx_t_4;
        __pyx_t_4 = 0;

        /* "pyarrow/array.pxi":4183
 *         if isinstance(index, (bytes, str)):
 *             int_index = self.type.get_field_index(index)
 *             if int_index < 0:             # <<<<<<<<<<<<<<
 *                 raise KeyError(index)
 *         elif isinstance(index, int):
*/
        __pyx_t_4 = PyObject_RichCompare(__pyx_v_int_index, __pyx_mstate_global->__pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 4183, __pyx_L1_error)
        __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(4, 4183, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(__pyx_t_2)) {

          /* "pyarrow/array.pxi":4184
 *             int_index = self.type.get_field_index(index)
 *             if int_index < 0:
 *                 raise KeyError(index)             # <<<<<<<<<<<<<<
 *         elif isinstance(index, int):
 *             int_index = _normalize_index(index, self.ap.num_fields())
*/
          __pyx_t_5 = NULL;
          __pyx_t_6 = 1;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_index};
            __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_KeyError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
            if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 4184, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
          }
          __Pyx_Raise(__pyx_t_4, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __PYX_ERR(4, 4184, __pyx_L1_error)

          /* "pyarrow/array.pxi":4183
 *         if isinstance(index, (bytes, str)):
 *             int_index = self.type.get_field_index(index)
 *             if int_index < 0:             # <<<<<<<<<<<<<<
 *                 raise KeyError(index)
 *         elif isinstance(index, int):
*/
        }

        /* "pyarrow/array.pxi":4181
 *             CMemoryPool* pool = maybe_unbox_memory_pool(memory_pool)
 * 
 *         if isinstance(index, (bytes, str)):             # <<<<<<<<<<<<<<
 *             int_index = self.type.get_field_index(index)
 *             if int_index < 0:
*/
        goto __pyx_L3;
      }

      /* "pyarrow/array.pxi":4185
 *             if int_index < 0:
 *                 raise KeyError(index)
 *         elif isinstance(index, int):             # <<<<<<<<<<<<<<
 *             int_index = _normalize_index(index, self.ap.num_fields())
 *         else:
*/
      __pyx_t_2 = PyLong_Check(__pyx_v_index); 
      if (likely(__pyx_t_2)) {

        /* "pyarrow/array.pxi":4186
 *                 raise KeyError(index)
 *         elif isinstance(index, int):
 *             int_index = _normalize_index(index, self.ap.num_fields())             # <<<<<<<<<<<<<<
 *         else:
 *             raise TypeError('Expected integer or string index')
*/
        __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_v_index); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(4, 4186, __pyx_L1_error)
        if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "ap");
          __PYX_ERR(4, 4186, __pyx_L1_error)
        }
        __pyx_t_8 = __pyx_f_7pyarrow_3lib__normalize_index(__pyx_t_7, __pyx_v_self->__pyx_base.ap->num_fields()); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1L))) __PYX_ERR(4, 4186, __pyx_L1_error)
        __pyx_t_4 = PyLong_FromSsize_t(__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 4186, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_v_int_index = __pyx_t_4;
        __pyx_t_4 = 0;

        /* "pyarrow/array.pxi":4185
 *             if int_index < 0:
 *                 raise KeyError(index)
 *         elif isinstance(index, int):             # <<<<<<<<<<<<<<
 *             int_index = _normalize_index(index, self.ap.num_fields())
 *         else:
*/
        goto __pyx_L3;
      }

      /* "pyarrow/array.pxi":4188
 *             int_index = _normalize_index(index, self.ap.num_fields())
 *         else:
 *             raise TypeError('Expected integer or string index')             # <<<<<<<<<<<<<<
 * 
 *         child = GetResultValue(arr.GetFlattenedField(int_index, pool))
*/
      /*else*/ {
        __pyx_t_5 = NULL;
        __pyx_t_6 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_Expected_integer_or_string_index};
          __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 4188, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
        }
        __Pyx_Raise(__pyx_t_4, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __PYX_ERR(4, 4188, __pyx_L1_error)
      }
      __pyx_L3:;

      /* "pyarrow/array.pxi":4190
 *             raise TypeError('Expected integer or string index')
 * 
 *         child = GetResultValue(arr.GetFlattenedField(int_index, pool))             # <<<<<<<<<<<<<<
 *         return pyarrow_wrap_array(child)
 * 
*/
      __pyx_t_9 = __Pyx_PyLong_As_int(__pyx_v_int_index); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(4, 4190, __pyx_L1_error)
      __pyx_t_10 = arrow::py::GetResultValue<std::shared_ptr< arrow::Array> >(__pyx_v_arr->GetFlattenedField(__pyx_t_9, __pyx_v_pool)); if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 4190, __pyx_L1_error)
      __pyx_v_child = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_10);

      /* "pyarrow/array.pxi":4191
 * 
 *         child = GetResultValue(arr.GetFlattenedField(int_index, pool))
 *         return pyarrow_wrap_array(child)             # <<<<<<<<<<<<<<
 * 
 *     def flatten(self, MemoryPool memory_pool=None):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_4 = pyarrow_wrap_array(__pyx_v_child); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 4191, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":4160
 *         return pyarrow_wrap_array(child)
 * 
 *     def _flattened_field(self, index, MemoryPool memory_pool=None):             # <<<<<<<<<<<<<<
 *         """
 *         Retrieves the child array belonging to field,
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_AddTraceback("pyarrow.lib.StructArray._flattened_field", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_int_index);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":4193
 *         return pyarrow_wrap_array(child)
 * 
 *     def flatten(self, MemoryPool memory_pool=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return one individual array for each field in the struct.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_11StructArray_5flatten(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_11StructArray_4flatten, "StructArray.flatten(self, MemoryPool memory_pool=None)\n\nReturn one individual array for each field in the struct.\n\nParameters\n----------\nmemory_pool : MemoryPool, default None\n    For memory allocations, if required, otherwise use default pool.\n\nReturns\n-------\nresult : List[Array]");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_11StructArray_5flatten = {"flatten", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_11StructArray_5flatten, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_11StructArray_4flatten};
    static PyObject *__pyx_pw_7pyarrow_3lib_11StructArray_5flatten(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_memory_pool = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("flatten (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_memory_pool,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(4, 4193, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 4193, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "flatten", 0) < (0)) __PYX_ERR(4, 4193, __pyx_L3_error)
          if (!values[0]) values[0] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)Py_None));
        } else {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 4193, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (!values[0]) values[0] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)Py_None));
        }
        __pyx_v_memory_pool = ((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)values[0]);
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("flatten", 0, 0, 1, __pyx_nargs); __PYX_ERR(4, 4193, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.StructArray.flatten", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_memory_pool), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_MemoryPool, 1, "memory_pool", 0))) __PYX_ERR(4, 4193, __pyx_L1_error)
      __pyx_r = __pyx_pf_7pyarrow_3lib_11StructArray_4flatten(((struct __pyx_obj_7pyarrow_3lib_StructArray *)__pyx_v_self), __pyx_v_memory_pool);

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = NULL;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      goto __pyx_L7_cleaned_up;
      __pyx_L0:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __pyx_L7_cleaned_up:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_11StructArray_4flatten(struct __pyx_obj_7pyarrow_3lib_StructArray *__pyx_v_self, struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_memory_pool) {
      std::vector<std::shared_ptr< arrow::Array> >  __pyx_v_arrays;
       arrow::MemoryPool *__pyx_v_pool;
       arrow::StructArray *__pyx_v_sarr;
      std::shared_ptr< arrow::Array>  __pyx_9genexpr16__pyx_v_arr;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
       arrow::MemoryPool *__pyx_t_1;
      std::vector<std::shared_ptr< arrow::Array> >  __pyx_t_2;
      PyObject *__pyx_t_3 = NULL;
      std::vector<std::shared_ptr< arrow::Array> > ::iterator __pyx_t_4;
      std::shared_ptr< arrow::Array>  __pyx_t_5;
      PyObject *__pyx_t_6 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("flatten", 0);

      /* "pyarrow/array.pxi":4208
 *         cdef:
 *             vector[shared_ptr[CArray]] arrays
 *             CMemoryPool* pool = maybe_unbox_memory_pool(memory_pool)             # <<<<<<<<<<<<<<
 *             CStructArray* sarr = <CStructArray*> self.ap
 * 
*/
      __pyx_t_1 = __pyx_f_7pyarrow_3lib_maybe_unbox_memory_pool(__pyx_v_memory_pool); if (unlikely(__pyx_t_1 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(4, 4208, __pyx_L1_error)
      __pyx_v_pool = __pyx_t_1;

      /* "pyarrow/array.pxi":4209
 *             vector[shared_ptr[CArray]] arrays
 *             CMemoryPool* pool = maybe_unbox_memory_pool(memory_pool)
 *             CStructArray* sarr = <CStructArray*> self.ap             # <<<<<<<<<<<<<<
 * 
 *         with nogil:
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "ap");
        __PYX_ERR(4, 4209, __pyx_L1_error)
      }
      __pyx_v_sarr = (( arrow::StructArray *)__pyx_v_self->__pyx_base.ap);

      /* "pyarrow/array.pxi":4211
 *             CStructArray* sarr = <CStructArray*> self.ap
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             arrays = GetResultValue(sarr.Flatten(pool))
 * 
*/
      {
          PyThreadState * _save;
          _save = PyEval_SaveThread();
          __Pyx_FastGIL_Remember();
          /*try:*/ {

            /* "pyarrow/array.pxi":4212
 * 
 *         with nogil:
 *             arrays = GetResultValue(sarr.Flatten(pool))             # <<<<<<<<<<<<<<
 * 
 *         return [pyarrow_wrap_array(arr) for arr in arrays]
*/
            __pyx_t_2 = arrow::py::GetResultValue<std::vector<std::shared_ptr< arrow::Array> > >(__pyx_v_sarr->Flatten(__pyx_v_pool)); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(4, 4212, __pyx_L4_error)
            __pyx_v_arrays = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_2);
          }

          /* "pyarrow/array.pxi":4211
 *             CStructArray* sarr = <CStructArray*> self.ap
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             arrays = GetResultValue(sarr.Flatten(pool))
 * 
*/
          /*finally:*/ {
            /*normal exit:*/{
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L5;
            }
            __pyx_L4_error: {
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L1_error;
            }
            __pyx_L5:;
          }
      }

      /* "pyarrow/array.pxi":4214
 *             arrays = GetResultValue(sarr.Flatten(pool))
 * 
 *         return [pyarrow_wrap_array(arr) for arr in arrays]             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
*/
      __Pyx_XDECREF(__pyx_r);
      { /* enter inner scope */
        __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 4214, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = __pyx_v_arrays.begin();
        for (; __pyx_t_4 != __pyx_v_arrays.end(); ++__pyx_t_4) {
          __pyx_t_5 = *__pyx_t_4;
          __pyx_9genexpr16__pyx_v_arr = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_5);
          __pyx_t_6 = pyarrow_wrap_array(__pyx_9genexpr16__pyx_v_arr); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 4214, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_6))) __PYX_ERR(4, 4214, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
      } /* exit inner scope */
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":4193
 *         return pyarrow_wrap_array(child)
 * 
 *     def flatten(self, MemoryPool memory_pool=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return one individual array for each field in the struct.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_AddTraceback("pyarrow.lib.StructArray.flatten", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":4216
 *         return [pyarrow_wrap_array(arr) for arr in arrays]
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_arrays(arrays, names=None, fields=None, mask=None,
 *                     memory_pool=None, type=None):
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_11StructArray_7from_arrays(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_11StructArray_6from_arrays, "StructArray.from_arrays(arrays, names=None, fields=None, mask=None, memory_pool=None, type=None)\n\nConstruct StructArray from collection of arrays representing\neach field in the struct.\n\nEither field names, field instances or a struct type must be passed.\n\nParameters\n----------\narrays : sequence of Array\nnames : List[str] (optional)\n    Field names for each struct child.\nfields : List[Field] (optional)\n    Field instances for each struct child.\nmask : pyarrow.Array[bool] (optional)\n    Indicate which values are null (True) or not null (False).\nmemory_pool : MemoryPool (optional)\n    For memory allocations, if required, otherwise uses default pool.\ntype : pyarrow.StructType (optional)\n    Struct type for name and type of each child.\n\nReturns\n-------\nresult : StructArray");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_11StructArray_7from_arrays = {"from_arrays", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_11StructArray_7from_arrays, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_11StructArray_6from_arrays};
    static PyObject *__pyx_pw_7pyarrow_3lib_11StructArray_7from_arrays(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_arrays = 0;
      PyObject *__pyx_v_names = 0;
      PyObject *__pyx_v_fields = 0;
      PyObject *__pyx_v_mask = 0;
      PyObject *__pyx_v_memory_pool = 0;
      PyObject *__pyx_v_type = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[6] = {0,0,0,0,0,0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("from_arrays (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_arrays,&__pyx_mstate_global->__pyx_n_u_names,&__pyx_mstate_global->__pyx_n_u_fields,&__pyx_mstate_global->__pyx_n_u_mask,&__pyx_mstate_global->__pyx_n_u_memory_pool,&__pyx_mstate_global->__pyx_n_u_type,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(4, 4216, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  6:
            values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(4, 4216, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  5:
            values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(4, 4216, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  4:
            values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(4, 4216, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  3:
            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(4, 4216, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(4, 4216, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 4216, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "from_arrays", 0) < (0)) __PYX_ERR(4, 4216, __pyx_L3_error)

          /* "pyarrow/array.pxi":4217
 * 
 *     @staticmethod
 *     def from_arrays(arrays, names=None, fields=None, mask=None,             # <<<<<<<<<<<<<<
 *                     memory_pool=None, type=None):
 *         """
*/
          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
          if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
          if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None));

          /* "pyarrow/array.pxi":4218
 *     @staticmethod
 *     def from_arrays(arrays, names=None, fields=None, mask=None,
 *                     memory_pool=None, type=None):             # <<<<<<<<<<<<<<
 *         """
 *         Construct StructArray from collection of arrays representing
*/
          if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)Py_None));
          if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)Py_None));
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("from_arrays", 0, 1, 6, i); __PYX_ERR(4, 4216, __pyx_L3_error) }
          }
        } else {
          switch (__pyx_nargs) {
            case  6:
            values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(4, 4216, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  5:
            values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(4, 4216, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  4:
            values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(4, 4216, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  3:
            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(4, 4216, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(4, 4216, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 4216, __pyx_L3_error)
            break;
            default: goto __pyx_L5_argtuple_error;
          }

          /* "pyarrow/array.pxi":4217
 * 
 *     @staticmethod
 *     def from_arrays(arrays, names=None, fields=None, mask=None,             # <<<<<<<<<<<<<<
 *                     memory_pool=None, type=None):
 *         """
*/
          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
          if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
          if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None));

          /* "pyarrow/array.pxi":4218
 *     @staticmethod
 *     def from_arrays(arrays, names=None, fields=None, mask=None,
 *                     memory_pool=None, type=None):             # <<<<<<<<<<<<<<
 *         """
 *         Construct StructArray from collection of arrays representing
*/
          if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)Py_None));
          if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)Py_None));
        }
        __pyx_v_arrays = values[0];
        __pyx_v_names = values[1];
        __pyx_v_fields = values[2];
        __pyx_v_mask = values[3];
        __pyx_v_memory_pool = values[4];
        __pyx_v_type = values[5];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("from_arrays", 0, 1, 6, __pyx_nargs); __PYX_ERR(4, 4216, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.StructArray.from_arrays", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_11StructArray_6from_arrays(__pyx_v_arrays, __pyx_v_names, __pyx_v_fields, __pyx_v_mask, __pyx_v_memory_pool, __pyx_v_type);

      /* "pyarrow/array.pxi":4216
 *         return [pyarrow_wrap_array(arr) for arr in arrays]
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_arrays(arrays, names=None, fields=None, mask=None,
 *                     memory_pool=None, type=None):
*/

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_11StructArray_6from_arrays(PyObject *__pyx_v_arrays, PyObject *__pyx_v_names, PyObject *__pyx_v_fields, PyObject *__pyx_v_mask, PyObject *__pyx_v_memory_pool, PyObject *__pyx_v_type) {
      std::shared_ptr< arrow::Array>  __pyx_v_c_array;
      std::shared_ptr< arrow::Buffer>  __pyx_v_c_mask;
      std::vector<std::shared_ptr< arrow::Array> >  __pyx_v_c_arrays;
      std::vector<std::string>  __pyx_v_c_names;
      std::vector<std::shared_ptr< arrow::Field> >  __pyx_v_c_fields;
      arrow::Result<std::shared_ptr< arrow::Array> >  __pyx_v_c_result;
      struct __pyx_obj_7pyarrow_3lib_Field *__pyx_v_py_field = 0;
      PyObject *__pyx_v_field = NULL;
      PyObject *__pyx_v_arr = NULL;
      PyObject *__pyx_v_name = NULL;
      PyObject *__pyx_v_item = NULL;
      struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_result = 0;
      PyObject *__pyx_9genexpr17__pyx_v_x = NULL;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      int __pyx_t_1;
      int __pyx_t_2;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      size_t __pyx_t_5;
      Py_ssize_t __pyx_t_6;
      PyObject *(*__pyx_t_7)(PyObject *);
      int __pyx_t_8;
      std::shared_ptr< arrow::Buffer>  __pyx_t_9;
      PyObject *__pyx_t_10 = NULL;
      PyObject *__pyx_t_11 = NULL;
      PyObject *__pyx_t_12 = NULL;
      std::shared_ptr< arrow::Array>  __pyx_t_13;
      std::string __pyx_t_14;
      PyObject *__pyx_t_15 = NULL;
      PyObject *__pyx_t_16 = NULL;
      PyObject *__pyx_t_17 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("from_arrays", 0);
      __Pyx_INCREF(__pyx_v_arrays);
      __Pyx_INCREF(__pyx_v_fields);

      /* "pyarrow/array.pxi":4256
 *             DataType struct_type
 * 
 *         if fields is not None and type is not None:             # <<<<<<<<<<<<<<
 *             raise ValueError('Must pass either fields or type, not both')
 * 
*/
      __pyx_t_2 = (__pyx_v_fields != Py_None);
      if (__pyx_t_2) {
      } else {
        __pyx_t_1 = __pyx_t_2;
        goto __pyx_L4_bool_binop_done;
      }
      __pyx_t_2 = (__pyx_v_type != Py_None);
      __pyx_t_1 = __pyx_t_2;
      __pyx_L4_bool_binop_done:;
      if (unlikely(__pyx_t_1)) {

        /* "pyarrow/array.pxi":4257
 * 
 *         if fields is not None and type is not None:
 *             raise ValueError('Must pass either fields or type, not both')             # <<<<<<<<<<<<<<
 * 
 *         if type is not None:
*/
        __pyx_t_4 = NULL;
        __pyx_t_5 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Must_pass_either_fields_or_type};
          __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 4257, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        __Pyx_Raise(__pyx_t_3, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __PYX_ERR(4, 4257, __pyx_L1_error)

        /* "pyarrow/array.pxi":4256
 *             DataType struct_type
 * 
 *         if fields is not None and type is not None:             # <<<<<<<<<<<<<<
 *             raise ValueError('Must pass either fields or type, not both')
 * 
*/
      }

      /* "pyarrow/array.pxi":4259
 *             raise ValueError('Must pass either fields or type, not both')
 * 
 *         if type is not None:             # <<<<<<<<<<<<<<
 *             fields = []
 *             for field in type:
*/
      __pyx_t_1 = (__pyx_v_type != Py_None);
      if (__pyx_t_1) {

        /* "pyarrow/array.pxi":4260
 * 
 *         if type is not None:
 *             fields = []             # <<<<<<<<<<<<<<
 *             for field in type:
 *                 fields.append(field)
*/
        __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 4260, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF_SET(__pyx_v_fields, __pyx_t_3);
        __pyx_t_3 = 0;

        /* "pyarrow/array.pxi":4261
 *         if type is not None:
 *             fields = []
 *             for field in type:             # <<<<<<<<<<<<<<
 *                 fields.append(field)
 * 
*/
        if (likely(PyList_CheckExact(__pyx_v_type)) || PyTuple_CheckExact(__pyx_v_type)) {
          __pyx_t_3 = __pyx_v_type; __Pyx_INCREF(__pyx_t_3);
          __pyx_t_6 = 0;
          __pyx_t_7 = NULL;
        } else {
          __pyx_t_6 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 4261, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 4261, __pyx_L1_error)
        }
        for (;;) {
          if (likely(!__pyx_t_7)) {
            if (likely(PyList_CheckExact(__pyx_t_3))) {
              {
                Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3);
                #if !CYTHON_ASSUME_SAFE_SIZE
                if (unlikely((__pyx_temp < 0))) __PYX_ERR(4, 4261, __pyx_L1_error)
                #endif
                if (__pyx_t_6 >= __pyx_temp) break;
              }
              __pyx_t_4 = __Pyx_PyList_GetItemRefFast(__pyx_t_3, __pyx_t_6, __Pyx_ReferenceSharing_OwnStrongReference);
              ++__pyx_t_6;
            } else {
              {
                Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3);
                #if !CYTHON_ASSUME_SAFE_SIZE
                if (unlikely((__pyx_temp < 0))) __PYX_ERR(4, 4261, __pyx_L1_error)
                #endif
                if (__pyx_t_6 >= __pyx_temp) break;
              }
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_4 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_6));
              #else
              __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_6);
              #endif
              ++__pyx_t_6;
            }
            if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 4261, __pyx_L1_error)
          } else {
            __pyx_t_4 = __pyx_t_7(__pyx_t_3);
            if (unlikely(!__pyx_t_4)) {
              PyObject* exc_type = PyErr_Occurred();
              if (exc_type) {
                if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(4, 4261, __pyx_L1_error)
                PyErr_Clear();
              }
              break;
            }
          }
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_XDECREF_SET(__pyx_v_field, __pyx_t_4);
          __pyx_t_4 = 0;

          /* "pyarrow/array.pxi":4262
 *             fields = []
 *             for field in type:
 *                 fields.append(field)             # <<<<<<<<<<<<<<
 * 
 *         if names is None and fields is None:
*/
          __pyx_t_8 = __Pyx_PyObject_Append(__pyx_v_fields, __pyx_v_field); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(4, 4262, __pyx_L1_error)

          /* "pyarrow/array.pxi":4261
 *         if type is not None:
 *             fields = []
 *             for field in type:             # <<<<<<<<<<<<<<
 *                 fields.append(field)
 * 
*/
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

        /* "pyarrow/array.pxi":4259
 *             raise ValueError('Must pass either fields or type, not both')
 * 
 *         if type is not None:             # <<<<<<<<<<<<<<
 *             fields = []
 *             for field in type:
*/
      }

      /* "pyarrow/array.pxi":4264
 *                 fields.append(field)
 * 
 *         if names is None and fields is None:             # <<<<<<<<<<<<<<
 *             raise ValueError('Must pass either names or fields')
 *         if names is not None and fields is not None:
*/
      __pyx_t_2 = (__pyx_v_names == Py_None);
      if (__pyx_t_2) {
      } else {
        __pyx_t_1 = __pyx_t_2;
        goto __pyx_L11_bool_binop_done;
      }
      __pyx_t_2 = (__pyx_v_fields == Py_None);
      __pyx_t_1 = __pyx_t_2;
      __pyx_L11_bool_binop_done:;
      if (unlikely(__pyx_t_1)) {

        /* "pyarrow/array.pxi":4265
 * 
 *         if names is None and fields is None:
 *             raise ValueError('Must pass either names or fields')             # <<<<<<<<<<<<<<
 *         if names is not None and fields is not None:
 *             raise ValueError('Must pass either names or fields, not both')
*/
        __pyx_t_4 = NULL;
        __pyx_t_5 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Must_pass_either_names_or_fields};
          __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 4265, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        __Pyx_Raise(__pyx_t_3, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __PYX_ERR(4, 4265, __pyx_L1_error)

        /* "pyarrow/array.pxi":4264
 *                 fields.append(field)
 * 
 *         if names is None and fields is None:             # <<<<<<<<<<<<<<
 *             raise ValueError('Must pass either names or fields')
 *         if names is not None and fields is not None:
*/
      }

      /* "pyarrow/array.pxi":4266
 *         if names is None and fields is None:
 *             raise ValueError('Must pass either names or fields')
 *         if names is not None and fields is not None:             # <<<<<<<<<<<<<<
 *             raise ValueError('Must pass either names or fields, not both')
 * 
*/
      __pyx_t_2 = (__pyx_v_names != Py_None);
      if (__pyx_t_2) {
      } else {
        __pyx_t_1 = __pyx_t_2;
        goto __pyx_L14_bool_binop_done;
      }
      __pyx_t_2 = (__pyx_v_fields != Py_None);
      __pyx_t_1 = __pyx_t_2;
      __pyx_L14_bool_binop_done:;
      if (unlikely(__pyx_t_1)) {

        /* "pyarrow/array.pxi":4267
 *             raise ValueError('Must pass either names or fields')
 *         if names is not None and fields is not None:
 *             raise ValueError('Must pass either names or fields, not both')             # <<<<<<<<<<<<<<
 * 
 *         c_mask = c_mask_inverted_from_obj(mask, memory_pool)
*/
        __pyx_t_4 = NULL;
        __pyx_t_5 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Must_pass_either_names_or_fields_2};
          __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 4267, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        __Pyx_Raise(__pyx_t_3, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __PYX_ERR(4, 4267, __pyx_L1_error)

        /* "pyarrow/array.pxi":4266
 *         if names is None and fields is None:
 *             raise ValueError('Must pass either names or fields')
 *         if names is not None and fields is not None:             # <<<<<<<<<<<<<<
 *             raise ValueError('Must pass either names or fields, not both')
 * 
*/
      }

      /* "pyarrow/array.pxi":4269
 *             raise ValueError('Must pass either names or fields, not both')
 * 
 *         c_mask = c_mask_inverted_from_obj(mask, memory_pool)             # <<<<<<<<<<<<<<
 * 
 *         arrays = [asarray(x) for x in arrays]
*/
      if (!(likely(((__pyx_v_memory_pool) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_memory_pool, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_MemoryPool))))) __PYX_ERR(4, 4269, __pyx_L1_error)
      __pyx_t_9 = __pyx_f_7pyarrow_3lib_c_mask_inverted_from_obj(__pyx_v_mask, ((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)__pyx_v_memory_pool)); if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 4269, __pyx_L1_error)
      __pyx_v_c_mask = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_9);

      /* "pyarrow/array.pxi":4271
 *         c_mask = c_mask_inverted_from_obj(mask, memory_pool)
 * 
 *         arrays = [asarray(x) for x in arrays]             # <<<<<<<<<<<<<<
 *         for arr in arrays:
 *             c_array = pyarrow_unwrap_array(arr)
*/
      { /* enter inner scope */
        __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 4271, __pyx_L18_error)
        __Pyx_GOTREF(__pyx_t_3);
        if (likely(PyList_CheckExact(__pyx_v_arrays)) || PyTuple_CheckExact(__pyx_v_arrays)) {
          __pyx_t_4 = __pyx_v_arrays; __Pyx_INCREF(__pyx_t_4);
          __pyx_t_6 = 0;
          __pyx_t_7 = NULL;
        } else {
          __pyx_t_6 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_arrays); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 4271, __pyx_L18_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 4271, __pyx_L18_error)
        }
        for (;;) {
          if (likely(!__pyx_t_7)) {
            if (likely(PyList_CheckExact(__pyx_t_4))) {
              {
                Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_4);
                #if !CYTHON_ASSUME_SAFE_SIZE
                if (unlikely((__pyx_temp < 0))) __PYX_ERR(4, 4271, __pyx_L18_error)
                #endif
                if (__pyx_t_6 >= __pyx_temp) break;
              }
              __pyx_t_10 = __Pyx_PyList_GetItemRefFast(__pyx_t_4, __pyx_t_6, __Pyx_ReferenceSharing_OwnStrongReference);
              ++__pyx_t_6;
            } else {
              {
                Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_4);
                #if !CYTHON_ASSUME_SAFE_SIZE
                if (unlikely((__pyx_temp < 0))) __PYX_ERR(4, 4271, __pyx_L18_error)
                #endif
                if (__pyx_t_6 >= __pyx_temp) break;
              }
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_10 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_6));
              #else
              __pyx_t_10 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_6);
              #endif
              ++__pyx_t_6;
            }
            if (unlikely(!__pyx_t_10)) __PYX_ERR(4, 4271, __pyx_L18_error)
          } else {
            __pyx_t_10 = __pyx_t_7(__pyx_t_4);
            if (unlikely(!__pyx_t_10)) {
              PyObject* exc_type = PyErr_Occurred();
              if (exc_type) {
                if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(4, 4271, __pyx_L18_error)
                PyErr_Clear();
              }
              break;
            }
          }
          __Pyx_GOTREF(__pyx_t_10);
          __Pyx_XDECREF_SET(__pyx_9genexpr17__pyx_v_x, __pyx_t_10);
          __pyx_t_10 = 0;
          __pyx_t_11 = NULL;
          __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_asarray); if (unlikely(!__pyx_t_12)) __PYX_ERR(4, 4271, __pyx_L18_error)
          __Pyx_GOTREF(__pyx_t_12);
          __pyx_t_5 = 1;
          #if CYTHON_UNPACK_METHODS
          if (unlikely(PyMethod_Check(__pyx_t_12))) {
            __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_12);
            assert(__pyx_t_11);
            PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_12);
            __Pyx_INCREF(__pyx_t_11);
            __Pyx_INCREF(__pyx__function);
            __Pyx_DECREF_SET(__pyx_t_12, __pyx__function);
            __pyx_t_5 = 0;
          }
          #endif
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_9genexpr17__pyx_v_x};
            __pyx_t_10 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_12, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
            __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
            if (unlikely(!__pyx_t_10)) __PYX_ERR(4, 4271, __pyx_L18_error)
            __Pyx_GOTREF(__pyx_t_10);
          }
          if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_10))) __PYX_ERR(4, 4271, __pyx_L18_error)
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_XDECREF(__pyx_9genexpr17__pyx_v_x); __pyx_9genexpr17__pyx_v_x = 0;
        goto __pyx_L22_exit_scope;
        __pyx_L18_error:;
        __Pyx_XDECREF(__pyx_9genexpr17__pyx_v_x); __pyx_9genexpr17__pyx_v_x = 0;
        goto __pyx_L1_error;
        __pyx_L22_exit_scope:;
      } /* exit inner scope */
      __Pyx_DECREF_SET(__pyx_v_arrays, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "pyarrow/array.pxi":4272
 * 
 *         arrays = [asarray(x) for x in arrays]
 *         for arr in arrays:             # <<<<<<<<<<<<<<
 *             c_array = pyarrow_unwrap_array(arr)
 *             if c_array == nullptr:
*/
      if (likely(PyList_CheckExact(__pyx_v_arrays)) || PyTuple_CheckExact(__pyx_v_arrays)) {
        __pyx_t_3 = __pyx_v_arrays; __Pyx_INCREF(__pyx_t_3);
        __pyx_t_6 = 0;
        __pyx_t_7 = NULL;
      } else {
        __pyx_t_6 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_arrays); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 4272, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 4272, __pyx_L1_error)
      }
      for (;;) {
        if (likely(!__pyx_t_7)) {
          if (likely(PyList_CheckExact(__pyx_t_3))) {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3);
              #if !CYTHON_ASSUME_SAFE_SIZE
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(4, 4272, __pyx_L1_error)
              #endif
              if (__pyx_t_6 >= __pyx_temp) break;
            }
            __pyx_t_4 = __Pyx_PyList_GetItemRefFast(__pyx_t_3, __pyx_t_6, __Pyx_ReferenceSharing_OwnStrongReference);
            ++__pyx_t_6;
          } else {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3);
              #if !CYTHON_ASSUME_SAFE_SIZE
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(4, 4272, __pyx_L1_error)
              #endif
              if (__pyx_t_6 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_4 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_6));
            #else
            __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_6);
            #endif
            ++__pyx_t_6;
          }
          if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 4272, __pyx_L1_error)
        } else {
          __pyx_t_4 = __pyx_t_7(__pyx_t_3);
          if (unlikely(!__pyx_t_4)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(4, 4272, __pyx_L1_error)
              PyErr_Clear();
            }
            break;
          }
        }
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_XDECREF_SET(__pyx_v_arr, __pyx_t_4);
        __pyx_t_4 = 0;

        /* "pyarrow/array.pxi":4273
 *         arrays = [asarray(x) for x in arrays]
 *         for arr in arrays:
 *             c_array = pyarrow_unwrap_array(arr)             # <<<<<<<<<<<<<<
 *             if c_array == nullptr:
 *                 raise TypeError(f"Expected Array, got {arr.__class__}")
*/
        __pyx_t_13 = pyarrow_unwrap_array(__pyx_v_arr); if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 4273, __pyx_L1_error)
        __pyx_v_c_array = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_13);

        /* "pyarrow/array.pxi":4274
 *         for arr in arrays:
 *             c_array = pyarrow_unwrap_array(arr)
 *             if c_array == nullptr:             # <<<<<<<<<<<<<<
 *                 raise TypeError(f"Expected Array, got {arr.__class__}")
 *             c_arrays.push_back(c_array)
*/
        __pyx_t_1 = ((__pyx_v_c_array == nullptr) != 0);
        if (unlikely(__pyx_t_1)) {

          /* "pyarrow/array.pxi":4275
 *             c_array = pyarrow_unwrap_array(arr)
 *             if c_array == nullptr:
 *                 raise TypeError(f"Expected Array, got {arr.__class__}")             # <<<<<<<<<<<<<<
 *             c_arrays.push_back(c_array)
 *         if names is not None:
*/
          __pyx_t_10 = NULL;
          __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_arr, __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_12)) __PYX_ERR(4, 4275, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_12);
          __pyx_t_11 = __Pyx_PyObject_FormatSimple(__pyx_t_12, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_11)) __PYX_ERR(4, 4275, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_11);
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          __pyx_t_12 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_Expected_Array_got, __pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(4, 4275, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_12);
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          __pyx_t_5 = 1;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_12};
            __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
            if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 4275, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
          }
          __Pyx_Raise(__pyx_t_4, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __PYX_ERR(4, 4275, __pyx_L1_error)

          /* "pyarrow/array.pxi":4274
 *         for arr in arrays:
 *             c_array = pyarrow_unwrap_array(arr)
 *             if c_array == nullptr:             # <<<<<<<<<<<<<<
 *                 raise TypeError(f"Expected Array, got {arr.__class__}")
 *             c_arrays.push_back(c_array)
*/
        }

        /* "pyarrow/array.pxi":4276
 *             if c_array == nullptr:
 *                 raise TypeError(f"Expected Array, got {arr.__class__}")
 *             c_arrays.push_back(c_array)             # <<<<<<<<<<<<<<
 *         if names is not None:
 *             for name in names:
*/
        try {
          __pyx_v_c_arrays.push_back(__pyx_v_c_array);
        } catch(...) {
          __Pyx_CppExn2PyErr();
          __PYX_ERR(4, 4276, __pyx_L1_error)
        }

        /* "pyarrow/array.pxi":4272
 * 
 *         arrays = [asarray(x) for x in arrays]
 *         for arr in arrays:             # <<<<<<<<<<<<<<
 *             c_array = pyarrow_unwrap_array(arr)
 *             if c_array == nullptr:
*/
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "pyarrow/array.pxi":4277
 *                 raise TypeError(f"Expected Array, got {arr.__class__}")
 *             c_arrays.push_back(c_array)
 *         if names is not None:             # <<<<<<<<<<<<<<
 *             for name in names:
 *                 c_names.push_back(tobytes(name))
*/
      __pyx_t_1 = (__pyx_v_names != Py_None);
      if (__pyx_t_1) {

        /* "pyarrow/array.pxi":4278
 *             c_arrays.push_back(c_array)
 *         if names is not None:
 *             for name in names:             # <<<<<<<<<<<<<<
 *                 c_names.push_back(tobytes(name))
 *         else:
*/
        if (likely(PyList_CheckExact(__pyx_v_names)) || PyTuple_CheckExact(__pyx_v_names)) {
          __pyx_t_3 = __pyx_v_names; __Pyx_INCREF(__pyx_t_3);
          __pyx_t_6 = 0;
          __pyx_t_7 = NULL;
        } else {
          __pyx_t_6 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_names); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 4278, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 4278, __pyx_L1_error)
        }
        for (;;) {
          if (likely(!__pyx_t_7)) {
            if (likely(PyList_CheckExact(__pyx_t_3))) {
              {
                Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3);
                #if !CYTHON_ASSUME_SAFE_SIZE
                if (unlikely((__pyx_temp < 0))) __PYX_ERR(4, 4278, __pyx_L1_error)
                #endif
                if (__pyx_t_6 >= __pyx_temp) break;
              }
              __pyx_t_4 = __Pyx_PyList_GetItemRefFast(__pyx_t_3, __pyx_t_6, __Pyx_ReferenceSharing_OwnStrongReference);
              ++__pyx_t_6;
            } else {
              {
                Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3);
                #if !CYTHON_ASSUME_SAFE_SIZE
                if (unlikely((__pyx_temp < 0))) __PYX_ERR(4, 4278, __pyx_L1_error)
                #endif
                if (__pyx_t_6 >= __pyx_temp) break;
              }
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_4 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_6));
              #else
              __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_6);
              #endif
              ++__pyx_t_6;
            }
            if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 4278, __pyx_L1_error)
          } else {
            __pyx_t_4 = __pyx_t_7(__pyx_t_3);
            if (unlikely(!__pyx_t_4)) {
              PyObject* exc_type = PyErr_Occurred();
              if (exc_type) {
                if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(4, 4278, __pyx_L1_error)
                PyErr_Clear();
              }
              break;
            }
          }
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_4);
          __pyx_t_4 = 0;

          /* "pyarrow/array.pxi":4279
 *         if names is not None:
 *             for name in names:
 *                 c_names.push_back(tobytes(name))             # <<<<<<<<<<<<<<
 *         else:
 *             for item in fields:
*/
          __pyx_t_12 = NULL;
          __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_tobytes); if (unlikely(!__pyx_t_10)) __PYX_ERR(4, 4279, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_10);
          __pyx_t_5 = 1;
          #if CYTHON_UNPACK_METHODS
          if (unlikely(PyMethod_Check(__pyx_t_10))) {
            __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
            assert(__pyx_t_12);
            PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_10);
            __Pyx_INCREF(__pyx_t_12);
            __Pyx_INCREF(__pyx__function);
            __Pyx_DECREF_SET(__pyx_t_10, __pyx__function);
            __pyx_t_5 = 0;
          }
          #endif
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_v_name};
            __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_10, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
            if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 4279, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
          }
          __pyx_t_14 = __pyx_convert_string_from_py_6libcpp_6string_std__in_string(__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 4279, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          try {
            __pyx_v_c_names.push_back(__pyx_t_14);
          } catch(...) {
            __Pyx_CppExn2PyErr();
            __PYX_ERR(4, 4279, __pyx_L1_error)
          }

          /* "pyarrow/array.pxi":4278
 *             c_arrays.push_back(c_array)
 *         if names is not None:
 *             for name in names:             # <<<<<<<<<<<<<<
 *                 c_names.push_back(tobytes(name))
 *         else:
*/
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

        /* "pyarrow/array.pxi":4277
 *                 raise TypeError(f"Expected Array, got {arr.__class__}")
 *             c_arrays.push_back(c_array)
 *         if names is not None:             # <<<<<<<<<<<<<<
 *             for name in names:
 *                 c_names.push_back(tobytes(name))
*/
        goto __pyx_L27;
      }

      /* "pyarrow/array.pxi":4281
 *                 c_names.push_back(tobytes(name))
 *         else:
 *             for item in fields:             # <<<<<<<<<<<<<<
 *                 if isinstance(item, tuple):
 *                     py_field = field(*item)
*/
      /*else*/ {
        if (likely(PyList_CheckExact(__pyx_v_fields)) || PyTuple_CheckExact(__pyx_v_fields)) {
          __pyx_t_3 = __pyx_v_fields; __Pyx_INCREF(__pyx_t_3);
          __pyx_t_6 = 0;
          __pyx_t_7 = NULL;
        } else {
          __pyx_t_6 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_fields); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 4281, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 4281, __pyx_L1_error)
        }
        for (;;) {
          if (likely(!__pyx_t_7)) {
            if (likely(PyList_CheckExact(__pyx_t_3))) {
              {
                Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3);
                #if !CYTHON_ASSUME_SAFE_SIZE
                if (unlikely((__pyx_temp < 0))) __PYX_ERR(4, 4281, __pyx_L1_error)
                #endif
                if (__pyx_t_6 >= __pyx_temp) break;
              }
              __pyx_t_4 = __Pyx_PyList_GetItemRefFast(__pyx_t_3, __pyx_t_6, __Pyx_ReferenceSharing_OwnStrongReference);
              ++__pyx_t_6;
            } else {
              {
                Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3);
                #if !CYTHON_ASSUME_SAFE_SIZE
                if (unlikely((__pyx_temp < 0))) __PYX_ERR(4, 4281, __pyx_L1_error)
                #endif
                if (__pyx_t_6 >= __pyx_temp) break;
              }
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_4 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_6));
              #else
              __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_6);
              #endif
              ++__pyx_t_6;
            }
            if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 4281, __pyx_L1_error)
          } else {
            __pyx_t_4 = __pyx_t_7(__pyx_t_3);
            if (unlikely(!__pyx_t_4)) {
              PyObject* exc_type = PyErr_Occurred();
              if (exc_type) {
                if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(4, 4281, __pyx_L1_error)
                PyErr_Clear();
              }
              break;
            }
          }
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_4);
          __pyx_t_4 = 0;

          /* "pyarrow/array.pxi":4282
 *         else:
 *             for item in fields:
 *                 if isinstance(item, tuple):             # <<<<<<<<<<<<<<
 *                     py_field = field(*item)
 *                 else:
*/
          __pyx_t_1 = PyTuple_Check(__pyx_v_item); 
          if (__pyx_t_1) {

            /* "pyarrow/array.pxi":4283
 *             for item in fields:
 *                 if isinstance(item, tuple):
 *                     py_field = field(*item)             # <<<<<<<<<<<<<<
 *                 else:
 *                     py_field = item
*/
            if (unlikely(!__pyx_v_field)) { __Pyx_RaiseUnboundLocalError("field"); __PYX_ERR(4, 4283, __pyx_L1_error) }
            __pyx_t_4 = __Pyx_PySequence_Tuple(__pyx_v_item); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 4283, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            __pyx_t_10 = __Pyx_PyObject_Call(__pyx_v_field, __pyx_t_4, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(4, 4283, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_10);
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            if (!(likely(((__pyx_t_10) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_10, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Field))))) __PYX_ERR(4, 4283, __pyx_L1_error)
            __Pyx_XDECREF_SET(__pyx_v_py_field, ((struct __pyx_obj_7pyarrow_3lib_Field *)__pyx_t_10));
            __pyx_t_10 = 0;

            /* "pyarrow/array.pxi":4282
 *         else:
 *             for item in fields:
 *                 if isinstance(item, tuple):             # <<<<<<<<<<<<<<
 *                     py_field = field(*item)
 *                 else:
*/
            goto __pyx_L33;
          }

          /* "pyarrow/array.pxi":4285
 *                     py_field = field(*item)
 *                 else:
 *                     py_field = item             # <<<<<<<<<<<<<<
 *                 c_fields.push_back(py_field.sp_field)
 * 
*/
          /*else*/ {
            __pyx_t_10 = __pyx_v_item;
            __Pyx_INCREF(__pyx_t_10);
            if (!(likely(((__pyx_t_10) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_10, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Field))))) __PYX_ERR(4, 4285, __pyx_L1_error)
            __Pyx_XDECREF_SET(__pyx_v_py_field, ((struct __pyx_obj_7pyarrow_3lib_Field *)__pyx_t_10));
            __pyx_t_10 = 0;
          }
          __pyx_L33:;

          /* "pyarrow/array.pxi":4286
 *                 else:
 *                     py_field = item
 *                 c_fields.push_back(py_field.sp_field)             # <<<<<<<<<<<<<<
 * 
 *         if (c_arrays.size() == 0 and c_names.size() == 0 and
*/
          if (unlikely(((PyObject *)__pyx_v_py_field) == Py_None)) {
            PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_field");
            __PYX_ERR(4, 4286, __pyx_L1_error)
          }
          try {
            __pyx_v_c_fields.push_back(__pyx_v_py_field->sp_field);
          } catch(...) {
            __Pyx_CppExn2PyErr();
            __PYX_ERR(4, 4286, __pyx_L1_error)
          }

          /* "pyarrow/array.pxi":4281
 *                 c_names.push_back(tobytes(name))
 *         else:
 *             for item in fields:             # <<<<<<<<<<<<<<
 *                 if isinstance(item, tuple):
 *                     py_field = field(*item)
*/
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __pyx_L27:;

      /* "pyarrow/array.pxi":4288
 *                 c_fields.push_back(py_field.sp_field)
 * 
 *         if (c_arrays.size() == 0 and c_names.size() == 0 and             # <<<<<<<<<<<<<<
 *                 c_fields.size() == 0):
 *             # The C++ side doesn't allow this
*/
      __pyx_t_2 = (__pyx_v_c_arrays.size() == 0);
      if (__pyx_t_2) {
      } else {
        __pyx_t_1 = __pyx_t_2;
        goto __pyx_L36_bool_binop_done;
      }
      __pyx_t_2 = (__pyx_v_c_names.size() == 0);
      if (__pyx_t_2) {
      } else {
        __pyx_t_1 = __pyx_t_2;
        goto __pyx_L36_bool_binop_done;
      }

      /* "pyarrow/array.pxi":4289
 * 
 *         if (c_arrays.size() == 0 and c_names.size() == 0 and
 *                 c_fields.size() == 0):             # <<<<<<<<<<<<<<
 *             # The C++ side doesn't allow this
 *             if mask is None:
*/
      __pyx_t_2 = (__pyx_v_c_fields.size() == 0);
      __pyx_t_1 = __pyx_t_2;
      __pyx_L36_bool_binop_done:;

      /* "pyarrow/array.pxi":4288
 *                 c_fields.push_back(py_field.sp_field)
 * 
 *         if (c_arrays.size() == 0 and c_names.size() == 0 and             # <<<<<<<<<<<<<<
 *                 c_fields.size() == 0):
 *             # The C++ side doesn't allow this
*/
      if (__pyx_t_1) {

        /* "pyarrow/array.pxi":4291
 *                 c_fields.size() == 0):
 *             # The C++ side doesn't allow this
 *             if mask is None:             # <<<<<<<<<<<<<<
 *                 return array([], struct([]))
 *             else:
*/
        __pyx_t_1 = (__pyx_v_mask == Py_None);
        if (__pyx_t_1) {

          /* "pyarrow/array.pxi":4292
 *             # The C++ side doesn't allow this
 *             if mask is None:
 *                 return array([], struct([]))             # <<<<<<<<<<<<<<
 *             else:
 *                 return array([{}] * len(mask), struct([]), mask=mask)
*/
          __Pyx_XDECREF(__pyx_r);
          __pyx_t_10 = NULL;
          __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_array); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 4292, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_12 = PyList_New(0); if (unlikely(!__pyx_t_12)) __PYX_ERR(4, 4292, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_12);
          __pyx_t_15 = NULL;
          __Pyx_GetModuleGlobalName(__pyx_t_16, __pyx_mstate_global->__pyx_n_u_struct); if (unlikely(!__pyx_t_16)) __PYX_ERR(4, 4292, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_16);
          __pyx_t_17 = PyList_New(0); if (unlikely(!__pyx_t_17)) __PYX_ERR(4, 4292, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_17);
          __pyx_t_5 = 1;
          #if CYTHON_UNPACK_METHODS
          if (unlikely(PyMethod_Check(__pyx_t_16))) {
            __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_16);
            assert(__pyx_t_15);
            PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_16);
            __Pyx_INCREF(__pyx_t_15);
            __Pyx_INCREF(__pyx__function);
            __Pyx_DECREF_SET(__pyx_t_16, __pyx__function);
            __pyx_t_5 = 0;
          }
          #endif
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_15, __pyx_t_17};
            __pyx_t_11 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_16, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
            __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
            __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
            if (unlikely(!__pyx_t_11)) __PYX_ERR(4, 4292, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_11);
          }
          __pyx_t_5 = 1;
          #if CYTHON_UNPACK_METHODS
          if (unlikely(PyMethod_Check(__pyx_t_4))) {
            __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_4);
            assert(__pyx_t_10);
            PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
            __Pyx_INCREF(__pyx_t_10);
            __Pyx_INCREF(__pyx__function);
            __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
            __pyx_t_5 = 0;
          }
          #endif
          {
            PyObject *__pyx_callargs[3] = {__pyx_t_10, __pyx_t_12, __pyx_t_11};
            __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 4292, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
          }
          __pyx_r = __pyx_t_3;
          __pyx_t_3 = 0;
          goto __pyx_L0;

          /* "pyarrow/array.pxi":4291
 *                 c_fields.size() == 0):
 *             # The C++ side doesn't allow this
 *             if mask is None:             # <<<<<<<<<<<<<<
 *                 return array([], struct([]))
 *             else:
*/
        }

        /* "pyarrow/array.pxi":4294
 *                 return array([], struct([]))
 *             else:
 *                 return array([{}] * len(mask), struct([]), mask=mask)             # <<<<<<<<<<<<<<
 * 
 *         if names is not None:
*/
        /*else*/ {
          __Pyx_XDECREF(__pyx_r);
          __pyx_t_4 = NULL;
          __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_array); if (unlikely(!__pyx_t_11)) __PYX_ERR(4, 4294, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_11);
          __pyx_t_12 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_12)) __PYX_ERR(4, 4294, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_12);
          __pyx_t_6 = PyObject_Length(__pyx_v_mask); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(4, 4294, __pyx_L1_error)
          __pyx_t_10 = PyList_New(1 * ((__pyx_t_6<0) ? 0:__pyx_t_6)); if (unlikely(!__pyx_t_10)) __PYX_ERR(4, 4294, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_10);
          { Py_ssize_t __pyx_temp;
            for (__pyx_temp=0; __pyx_temp < __pyx_t_6; __pyx_temp++) {
              __Pyx_INCREF(__pyx_t_12);
              __Pyx_GIVEREF(__pyx_t_12);
              if (__Pyx_PyList_SET_ITEM(__pyx_t_10, __pyx_temp, __pyx_t_12) != (0)) __PYX_ERR(4, 4294, __pyx_L1_error);
            }
          }
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          __pyx_t_16 = NULL;
          __Pyx_GetModuleGlobalName(__pyx_t_17, __pyx_mstate_global->__pyx_n_u_struct); if (unlikely(!__pyx_t_17)) __PYX_ERR(4, 4294, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_17);
          __pyx_t_15 = PyList_New(0); if (unlikely(!__pyx_t_15)) __PYX_ERR(4, 4294, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_15);
          __pyx_t_5 = 1;
          #if CYTHON_UNPACK_METHODS
          if (unlikely(PyMethod_Check(__pyx_t_17))) {
            __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_17);
            assert(__pyx_t_16);
            PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_17);
            __Pyx_INCREF(__pyx_t_16);
            __Pyx_INCREF(__pyx__function);
            __Pyx_DECREF_SET(__pyx_t_17, __pyx__function);
            __pyx_t_5 = 0;
          }
          #endif
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_16, __pyx_t_15};
            __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_17, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
            __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
            __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
            if (unlikely(!__pyx_t_12)) __PYX_ERR(4, 4294, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_12);
          }
          __pyx_t_5 = 1;
          #if CYTHON_UNPACK_METHODS
          if (unlikely(PyMethod_Check(__pyx_t_11))) {
            __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_11);
            assert(__pyx_t_4);
            PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_11);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(__pyx__function);
            __Pyx_DECREF_SET(__pyx_t_11, __pyx__function);
            __pyx_t_5 = 0;
          }
          #endif
          {
            PyObject *__pyx_callargs[3 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_4, __pyx_t_10, __pyx_t_12};
            __pyx_t_17 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_17)) __PYX_ERR(4, 4294, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_17);
            if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_mask, __pyx_v_mask, __pyx_t_17, __pyx_callargs+3, 0) < (0)) __PYX_ERR(4, 4294, __pyx_L1_error)
            __pyx_t_3 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_11, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_17);
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
            __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
            __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
            if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 4294, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
          }
          __pyx_r = __pyx_t_3;
          __pyx_t_3 = 0;
          goto __pyx_L0;
        }

        /* "pyarrow/array.pxi":4288
 *                 c_fields.push_back(py_field.sp_field)
 * 
 *         if (c_arrays.size() == 0 and c_names.size() == 0 and             # <<<<<<<<<<<<<<
 *                 c_fields.size() == 0):
 *             # The C++ side doesn't allow this
*/
      }

      /* "pyarrow/array.pxi":4296
 *                 return array([{}] * len(mask), struct([]), mask=mask)
 * 
 *         if names is not None:             # <<<<<<<<<<<<<<
 *             # XXX Cannot pass "nullptr" for a shared_ptr<T> argument:
 *             # https://github.com/cython/cython/issues/3020
*/
      __pyx_t_1 = (__pyx_v_names != Py_None);
      if (__pyx_t_1) {

        /* "pyarrow/array.pxi":4299
 *             # XXX Cannot pass "nullptr" for a shared_ptr<T> argument:
 *             # https://github.com/cython/cython/issues/3020
 *             c_result = CStructArray.MakeFromFieldNames(             # <<<<<<<<<<<<<<
 *                 c_arrays, c_names, c_mask, -1, 0)
 *         else:
*/
        __pyx_v_c_result =  arrow::StructArray::Make(__pyx_v_c_arrays, __pyx_v_c_names, __pyx_v_c_mask, -1L, 0);

        /* "pyarrow/array.pxi":4296
 *                 return array([{}] * len(mask), struct([]), mask=mask)
 * 
 *         if names is not None:             # <<<<<<<<<<<<<<
 *             # XXX Cannot pass "nullptr" for a shared_ptr<T> argument:
 *             # https://github.com/cython/cython/issues/3020
*/
        goto __pyx_L40;
      }

      /* "pyarrow/array.pxi":4302
 *                 c_arrays, c_names, c_mask, -1, 0)
 *         else:
 *             c_result = CStructArray.MakeFromFields(             # <<<<<<<<<<<<<<
 *                 c_arrays, c_fields, c_mask, -1, 0)
 *         cdef Array result = pyarrow_wrap_array(GetResultValue(c_result))
*/
      /*else*/ {

        /* "pyarrow/array.pxi":4303
 *         else:
 *             c_result = CStructArray.MakeFromFields(
 *                 c_arrays, c_fields, c_mask, -1, 0)             # <<<<<<<<<<<<<<
 *         cdef Array result = pyarrow_wrap_array(GetResultValue(c_result))
 *         result.validate()
*/
        __pyx_v_c_result =  arrow::StructArray::Make(__pyx_v_c_arrays, __pyx_v_c_fields, __pyx_v_c_mask, -1L, 0);
      }
      __pyx_L40:;

      /* "pyarrow/array.pxi":4304
 *             c_result = CStructArray.MakeFromFields(
 *                 c_arrays, c_fields, c_mask, -1, 0)
 *         cdef Array result = pyarrow_wrap_array(GetResultValue(c_result))             # <<<<<<<<<<<<<<
 *         result.validate()
 *         return result
*/
      __pyx_t_13 = arrow::py::GetResultValue<std::shared_ptr< arrow::Array> >(__pyx_v_c_result); if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 4304, __pyx_L1_error)
      __pyx_t_3 = pyarrow_wrap_array(__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 4304, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array))))) __PYX_ERR(4, 4304, __pyx_L1_error)
      __pyx_v_result = ((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_t_3);
      __pyx_t_3 = 0;

      /* "pyarrow/array.pxi":4305
 *                 c_arrays, c_fields, c_mask, -1, 0)
 *         cdef Array result = pyarrow_wrap_array(GetResultValue(c_result))
 *         result.validate()             # <<<<<<<<<<<<<<
 *         return result
 * 
*/
      __pyx_t_11 = ((PyObject *)__pyx_v_result);
      __Pyx_INCREF(__pyx_t_11);
      __pyx_t_5 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_11, NULL};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_validate, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 4305, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "pyarrow/array.pxi":4306
 *         cdef Array result = pyarrow_wrap_array(GetResultValue(c_result))
 *         result.validate()
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     def sort(self, order="ascending", by=None, **kwargs):
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF((PyObject *)__pyx_v_result);
      __pyx_r = ((PyObject *)__pyx_v_result);
      goto __pyx_L0;

      /* "pyarrow/array.pxi":4216
 *         return [pyarrow_wrap_array(arr) for arr in arrays]
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_arrays(arrays, names=None, fields=None, mask=None,
 *                     memory_pool=None, type=None):
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_10);
      __Pyx_XDECREF(__pyx_t_11);
      __Pyx_XDECREF(__pyx_t_12);
      __Pyx_XDECREF(__pyx_t_15);
      __Pyx_XDECREF(__pyx_t_16);
      __Pyx_XDECREF(__pyx_t_17);
      __Pyx_AddTraceback("pyarrow.lib.StructArray.from_arrays", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF((PyObject *)__pyx_v_py_field);
      __Pyx_XDECREF(__pyx_v_field);
      __Pyx_XDECREF(__pyx_v_arr);
      __Pyx_XDECREF(__pyx_v_name);
      __Pyx_XDECREF(__pyx_v_item);
      __Pyx_XDECREF((PyObject *)__pyx_v_result);
      __Pyx_XDECREF(__pyx_9genexpr17__pyx_v_x);
      __Pyx_XDECREF(__pyx_v_arrays);
      __Pyx_XDECREF(__pyx_v_fields);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":4308
 *         return result
 * 
 *     def sort(self, order="ascending", by=None, **kwargs):             # <<<<<<<<<<<<<<
 *         """
 *         Sort the StructArray
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_11StructArray_9sort(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_11StructArray_8sort, "StructArray.sort(self, order='ascending', by=None, **kwargs)\n\nSort the StructArray\n\nParameters\n----------\norder : str, default \"ascending\"\n    Which order to sort values in.\n    Accepted values are \"ascending\", \"descending\".\nby : str or None, default None\n    If to sort the array by one of its fields\n    or by the whole array.\n**kwargs : dict, optional\n    Additional sorting options.\n    As allowed by :class:`SortOptions`\n\nReturns\n-------\nresult : StructArray");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_11StructArray_9sort = {"sort", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_11StructArray_9sort, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_11StructArray_8sort};
    static PyObject *__pyx_pw_7pyarrow_3lib_11StructArray_9sort(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_order = 0;
      PyObject *__pyx_v_by = 0;
      PyObject *__pyx_v_kwargs = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[2] = {0,0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("sort (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
      __Pyx_GOTREF(__pyx_v_kwargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_order,&__pyx_mstate_global->__pyx_n_u_by,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(4, 4308, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(4, 4308, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 4308, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, __pyx_v_kwargs, values, kwd_pos_args, __pyx_kwds_len, "sort", 1) < (0)) __PYX_ERR(4, 4308, __pyx_L3_error)
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_n_u_ascending));
          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
        } else {
          switch (__pyx_nargs) {
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(4, 4308, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 4308, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_n_u_ascending));
          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
        }
        __pyx_v_order = values[0];
        __pyx_v_by = values[1];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("sort", 0, 0, 2, __pyx_nargs); __PYX_ERR(4, 4308, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
      __Pyx_AddTraceback("pyarrow.lib.StructArray.sort", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_11StructArray_8sort(((struct __pyx_obj_7pyarrow_3lib_StructArray *)__pyx_v_self), __pyx_v_order, __pyx_v_by, __pyx_v_kwargs);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_DECREF(__pyx_v_kwargs);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_11StructArray_8sort(struct __pyx_obj_7pyarrow_3lib_StructArray *__pyx_v_self, PyObject *__pyx_v_order, PyObject *__pyx_v_by, PyObject *__pyx_v_kwargs) {
      PyObject *__pyx_v_tosort = NULL;
      PyObject *__pyx_v_sort_keys = NULL;
      PyObject *__pyx_v_indices = NULL;
      PyObject *__pyx_9genexpr18__pyx_v_field = NULL;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      int __pyx_t_1;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      size_t __pyx_t_4;
      PyObject *__pyx_t_5 = NULL;
      Py_ssize_t __pyx_t_6;
      PyObject *(*__pyx_t_7)(PyObject *);
      PyObject *__pyx_t_8 = NULL;
      PyObject *__pyx_t_9 = NULL;
      PyObject *__pyx_t_10 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("sort", 0);

      /* "pyarrow/array.pxi":4328
 *         result : StructArray
 *         """
 *         if by is not None:             # <<<<<<<<<<<<<<
 *             tosort, sort_keys = self._flattened_field(by), [("", order)]
 *         else:
*/
      __pyx_t_1 = (__pyx_v_by != Py_None);
      if (__pyx_t_1) {

        /* "pyarrow/array.pxi":4329
 *         """
 *         if by is not None:
 *             tosort, sort_keys = self._flattened_field(by), [("", order)]             # <<<<<<<<<<<<<<
 *         else:
 *             tosort, sort_keys = self, [(field.name, order) for field in self.type]
*/
        __pyx_t_3 = ((PyObject *)__pyx_v_self);
        __Pyx_INCREF(__pyx_t_3);
        __pyx_t_4 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_by};
          __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_flattened_field, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 4329, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 4329, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_INCREF(__pyx_mstate_global->__pyx_kp_u__15);
        __Pyx_GIVEREF(__pyx_mstate_global->__pyx_kp_u__15);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_mstate_global->__pyx_kp_u__15) != (0)) __PYX_ERR(4, 4329, __pyx_L1_error);
        __Pyx_INCREF(__pyx_v_order);
        __Pyx_GIVEREF(__pyx_v_order);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_order) != (0)) __PYX_ERR(4, 4329, __pyx_L1_error);
        __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 4329, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_GIVEREF(__pyx_t_3);
        if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_t_3) != (0)) __PYX_ERR(4, 4329, __pyx_L1_error);
        __pyx_t_3 = 0;
        __pyx_v_tosort = __pyx_t_2;
        __pyx_t_2 = 0;
        __pyx_v_sort_keys = ((PyObject*)__pyx_t_5);
        __pyx_t_5 = 0;

        /* "pyarrow/array.pxi":4328
 *         result : StructArray
 *         """
 *         if by is not None:             # <<<<<<<<<<<<<<
 *             tosort, sort_keys = self._flattened_field(by), [("", order)]
 *         else:
*/
        goto __pyx_L3;
      }

      /* "pyarrow/array.pxi":4331
 *             tosort, sort_keys = self._flattened_field(by), [("", order)]
 *         else:
 *             tosort, sort_keys = self, [(field.name, order) for field in self.type]             # <<<<<<<<<<<<<<
 *         indices = _pc().sort_indices(
 *             tosort, options=_pc().SortOptions(sort_keys=sort_keys, **kwargs)
*/
      /*else*/ {
        __pyx_t_5 = ((PyObject *)__pyx_v_self);
        __Pyx_INCREF(__pyx_t_5);
        { /* enter inner scope */
          __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 4331, __pyx_L6_error)
          __Pyx_GOTREF(__pyx_t_2);
          if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
            PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "type");
            __PYX_ERR(4, 4331, __pyx_L6_error)
          }
          if (likely(PyList_CheckExact(((PyObject *)__pyx_v_self->__pyx_base.type))) || PyTuple_CheckExact(((PyObject *)__pyx_v_self->__pyx_base.type))) {
            __pyx_t_3 = ((PyObject *)__pyx_v_self->__pyx_base.type); __Pyx_INCREF(__pyx_t_3);
            __pyx_t_6 = 0;
            __pyx_t_7 = NULL;
          } else {
            __pyx_t_6 = -1; __pyx_t_3 = PyObject_GetIter(((PyObject *)__pyx_v_self->__pyx_base.type)); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 4331, __pyx_L6_error)
            __Pyx_GOTREF(__pyx_t_3);
            __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 4331, __pyx_L6_error)
          }
          for (;;) {
            if (likely(!__pyx_t_7)) {
              if (likely(PyList_CheckExact(__pyx_t_3))) {
                {
                  Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3);
                  #if !CYTHON_ASSUME_SAFE_SIZE
                  if (unlikely((__pyx_temp < 0))) __PYX_ERR(4, 4331, __pyx_L6_error)
                  #endif
                  if (__pyx_t_6 >= __pyx_temp) break;
                }
                __pyx_t_8 = __Pyx_PyList_GetItemRefFast(__pyx_t_3, __pyx_t_6, __Pyx_ReferenceSharing_OwnStrongReference);
                ++__pyx_t_6;
              } else {
                {
                  Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3);
                  #if !CYTHON_ASSUME_SAFE_SIZE
                  if (unlikely((__pyx_temp < 0))) __PYX_ERR(4, 4331, __pyx_L6_error)
                  #endif
                  if (__pyx_t_6 >= __pyx_temp) break;
                }
                #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                __pyx_t_8 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_6));
                #else
                __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_6);
                #endif
                ++__pyx_t_6;
              }
              if (unlikely(!__pyx_t_8)) __PYX_ERR(4, 4331, __pyx_L6_error)
            } else {
              __pyx_t_8 = __pyx_t_7(__pyx_t_3);
              if (unlikely(!__pyx_t_8)) {
                PyObject* exc_type = PyErr_Occurred();
                if (exc_type) {
                  if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(4, 4331, __pyx_L6_error)
                  PyErr_Clear();
                }
                break;
              }
            }
            __Pyx_GOTREF(__pyx_t_8);
            __Pyx_XDECREF_SET(__pyx_9genexpr18__pyx_v_field, __pyx_t_8);
            __pyx_t_8 = 0;
            __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_9genexpr18__pyx_v_field, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_8)) __PYX_ERR(4, 4331, __pyx_L6_error)
            __Pyx_GOTREF(__pyx_t_8);
            __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(4, 4331, __pyx_L6_error)
            __Pyx_GOTREF(__pyx_t_9);
            __Pyx_GIVEREF(__pyx_t_8);
            if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8) != (0)) __PYX_ERR(4, 4331, __pyx_L6_error);
            __Pyx_INCREF(__pyx_v_order);
            __Pyx_GIVEREF(__pyx_v_order);
            if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_v_order) != (0)) __PYX_ERR(4, 4331, __pyx_L6_error);
            __pyx_t_8 = 0;
            if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_9))) __PYX_ERR(4, 4331, __pyx_L6_error)
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          }
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_XDECREF(__pyx_9genexpr18__pyx_v_field); __pyx_9genexpr18__pyx_v_field = 0;
          goto __pyx_L10_exit_scope;
          __pyx_L6_error:;
          __Pyx_XDECREF(__pyx_9genexpr18__pyx_v_field); __pyx_9genexpr18__pyx_v_field = 0;
          goto __pyx_L1_error;
          __pyx_L10_exit_scope:;
        } /* exit inner scope */
        __pyx_v_tosort = __pyx_t_5;
        __pyx_t_5 = 0;
        __pyx_v_sort_keys = ((PyObject*)__pyx_t_2);
        __pyx_t_2 = 0;
      }
      __pyx_L3:;

      /* "pyarrow/array.pxi":4332
 *         else:
 *             tosort, sort_keys = self, [(field.name, order) for field in self.type]
 *         indices = _pc().sort_indices(             # <<<<<<<<<<<<<<
 *             tosort, options=_pc().SortOptions(sort_keys=sort_keys, **kwargs)
 *         )
*/
      __pyx_t_9 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_pc_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(4, 4332, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_4 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_8))) {
        __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
        assert(__pyx_t_9);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_8, __pyx__function);
        __pyx_t_4 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL};
        __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 4332, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      __pyx_t_5 = __pyx_t_3;
      __Pyx_INCREF(__pyx_t_5);

      /* "pyarrow/array.pxi":4333
 *             tosort, sort_keys = self, [(field.name, order) for field in self.type]
 *         indices = _pc().sort_indices(
 *             tosort, options=_pc().SortOptions(sort_keys=sort_keys, **kwargs)             # <<<<<<<<<<<<<<
 *         )
 *         return self.take(indices)
*/
      __pyx_t_9 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_pc_2); if (unlikely(!__pyx_t_10)) __PYX_ERR(4, 4333, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_4 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_10))) {
        __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_10);
        assert(__pyx_t_9);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_10);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_10, __pyx__function);
        __pyx_t_4 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL};
        __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_10, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        if (unlikely(!__pyx_t_8)) __PYX_ERR(4, 4333, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
      }
      __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_SortOptions); if (unlikely(!__pyx_t_10)) __PYX_ERR(4, 4333, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(4, 4333, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      if (PyDict_SetItem(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_sort_keys, __pyx_v_sort_keys) < (0)) __PYX_ERR(4, 4333, __pyx_L1_error)
      __pyx_t_8 = __pyx_t_9;
      __pyx_t_9 = 0;
      if (__Pyx_MergeKeywords(__pyx_t_8, __pyx_v_kwargs) < (0)) __PYX_ERR(4, 4333, __pyx_L1_error)
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_mstate_global->__pyx_empty_tuple, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(4, 4333, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_4 = 0;
      {
        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_5, __pyx_v_tosort};
        __pyx_t_8 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(4, 4332, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_options, __pyx_t_9, __pyx_t_8, __pyx_callargs+2, 0) < (0)) __PYX_ERR(4, 4332, __pyx_L1_error)
        __pyx_t_2 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_sort_indices, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_8);
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 4332, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
      }
      __pyx_v_indices = __pyx_t_2;
      __pyx_t_2 = 0;

      /* "pyarrow/array.pxi":4335
 *             tosort, options=_pc().SortOptions(sort_keys=sort_keys, **kwargs)
 *         )
 *         return self.take(indices)             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = ((PyObject *)__pyx_v_self);
      __Pyx_INCREF(__pyx_t_3);
      __pyx_t_4 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_indices};
        __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_take, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 4335, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
      }
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":4308
 *         return result
 * 
 *     def sort(self, order="ascending", by=None, **kwargs):             # <<<<<<<<<<<<<<
 *         """
 *         Sort the StructArray
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_8);
      __Pyx_XDECREF(__pyx_t_9);
      __Pyx_XDECREF(__pyx_t_10);
      __Pyx_AddTraceback("pyarrow.lib.StructArray.sort", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_tosort);
      __Pyx_XDECREF(__pyx_v_sort_keys);
      __Pyx_XDECREF(__pyx_v_indices);
      __Pyx_XDECREF(__pyx_9genexpr18__pyx_v_field);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":4343
 *     """
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def _from_arrays(type, allow_none_for_type, logical_length, run_ends, values, logical_offset):
 *         cdef:
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_18RunEndEncodedArray_1_from_arrays(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_18RunEndEncodedArray__from_arrays, "RunEndEncodedArray._from_arrays(type, allow_none_for_type, logical_length, run_ends, values, logical_offset)");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_18RunEndEncodedArray_1_from_arrays = {"_from_arrays", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_18RunEndEncodedArray_1_from_arrays, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_18RunEndEncodedArray__from_arrays};
    static PyObject *__pyx_pw_7pyarrow_3lib_18RunEndEncodedArray_1_from_arrays(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_type = 0;
      PyObject *__pyx_v_allow_none_for_type = 0;
      PyObject *__pyx_v_logical_length = 0;
      PyObject *__pyx_v_run_ends = 0;
      PyObject *__pyx_v_values = 0;
      PyObject *__pyx_v_logical_offset = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[6] = {0,0,0,0,0,0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("_from_arrays (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_type,&__pyx_mstate_global->__pyx_n_u_allow_none_for_type,&__pyx_mstate_global->__pyx_n_u_logical_length,&__pyx_mstate_global->__pyx_n_u_run_ends,&__pyx_mstate_global->__pyx_n_u_values,&__pyx_mstate_global->__pyx_n_u_logical_offset,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(4, 4343, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  6:
            values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(4, 4343, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  5:
            values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(4, 4343, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  4:
            values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(4, 4343, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  3:
            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(4, 4343, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(4, 4343, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 4343, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_from_arrays", 0) < (0)) __PYX_ERR(4, 4343, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 6; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_from_arrays", 1, 6, 6, i); __PYX_ERR(4, 4343, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 6)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 4343, __pyx_L3_error)
          values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(4, 4343, __pyx_L3_error)
          values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(4, 4343, __pyx_L3_error)
          values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(4, 4343, __pyx_L3_error)
          values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(4, 4343, __pyx_L3_error)
          values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(4, 4343, __pyx_L3_error)
        }
        __pyx_v_type = values[0];
        __pyx_v_allow_none_for_type = values[1];
        __pyx_v_logical_length = values[2];
        __pyx_v_run_ends = values[3];
        __pyx_v_values = values[4];
        __pyx_v_logical_offset = values[5];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("_from_arrays", 1, 6, 6, __pyx_nargs); __PYX_ERR(4, 4343, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.RunEndEncodedArray._from_arrays", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_18RunEndEncodedArray__from_arrays(__pyx_v_type, __pyx_v_allow_none_for_type, __pyx_v_logical_length, __pyx_v_run_ends, __pyx_v_values, __pyx_v_logical_offset);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_18RunEndEncodedArray__from_arrays(PyObject *__pyx_v_type, PyObject *__pyx_v_allow_none_for_type, PyObject *__pyx_v_logical_length, PyObject *__pyx_v_run_ends, PyObject *__pyx_v_values, PyObject *__pyx_v_logical_offset) {
      int64_t __pyx_v__logical_length;
      struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v__run_ends = 0;
      struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v__values = 0;
      int64_t __pyx_v__logical_offset;
      std::shared_ptr< arrow::DataType>  __pyx_v_c_type;
      std::shared_ptr< arrow::RunEndEncodedArray>  __pyx_v_ree_array;
      struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_result = 0;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      int64_t __pyx_t_1;
      int __pyx_t_2;
      PyObject *__pyx_t_3 = NULL;
      struct __pyx_opt_args_7pyarrow_3lib_ensure_type __pyx_t_4;
      PyObject *__pyx_t_5 = NULL;
      PyObject *__pyx_t_6 = NULL;
      PyObject *__pyx_t_7 = NULL;
      size_t __pyx_t_8;
      PyObject *__pyx_t_9 = NULL;
      std::shared_ptr< arrow::DataType>  __pyx_t_10;
      std::shared_ptr< arrow::RunEndEncodedArray>  __pyx_t_11;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("_from_arrays", 0);
      __Pyx_INCREF(__pyx_v_type);

      /* "pyarrow/array.pxi":4353
 *             shared_ptr[CRunEndEncodedArray] ree_array
 * 
 *         _logical_length = <int64_t>logical_length             # <<<<<<<<<<<<<<
 *         _logical_offset = <int64_t>logical_offset
 * 
*/
      __pyx_t_1 = __Pyx_PyLong_As_int64_t(__pyx_v_logical_length); if (unlikely((__pyx_t_1 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(4, 4353, __pyx_L1_error)
      __pyx_v__logical_length = ((int64_t)__pyx_t_1);

      /* "pyarrow/array.pxi":4354
 * 
 *         _logical_length = <int64_t>logical_length
 *         _logical_offset = <int64_t>logical_offset             # <<<<<<<<<<<<<<
 * 
 *         type = ensure_type(type, allow_none=allow_none_for_type)
*/
      __pyx_t_1 = __Pyx_PyLong_As_int64_t(__pyx_v_logical_offset); if (unlikely((__pyx_t_1 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(4, 4354, __pyx_L1_error)
      __pyx_v__logical_offset = ((int64_t)__pyx_t_1);

      /* "pyarrow/array.pxi":4356
 *         _logical_offset = <int64_t>logical_offset
 * 
 *         type = ensure_type(type, allow_none=allow_none_for_type)             # <<<<<<<<<<<<<<
 *         if type is not None:
 *             _run_ends = asarray(run_ends, type=type.run_end_type)
*/
      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_allow_none_for_type); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(4, 4356, __pyx_L1_error)
      __pyx_t_4.__pyx_n = 1;
      __pyx_t_4.allow_none = __pyx_t_2;
      __pyx_t_3 = ((PyObject *)__pyx_f_7pyarrow_3lib_ensure_type(__pyx_v_type, 0, &__pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 4356, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_type, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "pyarrow/array.pxi":4357
 * 
 *         type = ensure_type(type, allow_none=allow_none_for_type)
 *         if type is not None:             # <<<<<<<<<<<<<<
 *             _run_ends = asarray(run_ends, type=type.run_end_type)
 *             _values = asarray(values, type=type.value_type)
*/
      __pyx_t_2 = (__pyx_v_type != Py_None);
      if (__pyx_t_2) {

        /* "pyarrow/array.pxi":4358
 *         type = ensure_type(type, allow_none=allow_none_for_type)
 *         if type is not None:
 *             _run_ends = asarray(run_ends, type=type.run_end_type)             # <<<<<<<<<<<<<<
 *             _values = asarray(values, type=type.value_type)
 *             c_type = pyarrow_unwrap_data_type(type)
*/
        __pyx_t_5 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_asarray); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 4358, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_type, __pyx_mstate_global->__pyx_n_u_run_end_type); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 4358, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_8 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_6))) {
          __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
          assert(__pyx_t_5);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
          __pyx_t_8 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_5, __pyx_v_run_ends};
          __pyx_t_9 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(4, 4358, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_type, __pyx_t_7, __pyx_t_9, __pyx_callargs+2, 0) < (0)) __PYX_ERR(4, 4358, __pyx_L1_error)
          __pyx_t_3 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_9);
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 4358, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array))))) __PYX_ERR(4, 4358, __pyx_L1_error)
        __pyx_v__run_ends = ((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_t_3);
        __pyx_t_3 = 0;

        /* "pyarrow/array.pxi":4359
 *         if type is not None:
 *             _run_ends = asarray(run_ends, type=type.run_end_type)
 *             _values = asarray(values, type=type.value_type)             # <<<<<<<<<<<<<<
 *             c_type = pyarrow_unwrap_data_type(type)
 *             with nogil:
*/
        __pyx_t_6 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_asarray); if (unlikely(!__pyx_t_9)) __PYX_ERR(4, 4359, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_type, __pyx_mstate_global->__pyx_n_u_value_type); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 4359, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_8 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_9))) {
          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_9);
          assert(__pyx_t_6);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_9);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_9, __pyx__function);
          __pyx_t_8 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_6, __pyx_v_values};
          __pyx_t_5 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 4359, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_type, __pyx_t_7, __pyx_t_5, __pyx_callargs+2, 0) < (0)) __PYX_ERR(4, 4359, __pyx_L1_error)
          __pyx_t_3 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_5);
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 4359, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array))))) __PYX_ERR(4, 4359, __pyx_L1_error)
        __pyx_v__values = ((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_t_3);
        __pyx_t_3 = 0;

        /* "pyarrow/array.pxi":4360
 *             _run_ends = asarray(run_ends, type=type.run_end_type)
 *             _values = asarray(values, type=type.value_type)
 *             c_type = pyarrow_unwrap_data_type(type)             # <<<<<<<<<<<<<<
 *             with nogil:
 *                 ree_array = GetResultValue(CRunEndEncodedArray.Make(
*/
        __pyx_t_10 = pyarrow_unwrap_data_type(__pyx_v_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 4360, __pyx_L1_error)
        __pyx_v_c_type = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_10);

        /* "pyarrow/array.pxi":4361
 *             _values = asarray(values, type=type.value_type)
 *             c_type = pyarrow_unwrap_data_type(type)
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 ree_array = GetResultValue(CRunEndEncodedArray.Make(
 *                     c_type, _logical_length, _run_ends.sp_array, _values.sp_array, _logical_offset))
*/
        {
            PyThreadState * _save;
            _save = PyEval_SaveThread();
            __Pyx_FastGIL_Remember();
            /*try:*/ {

              /* "pyarrow/array.pxi":4363
 *             with nogil:
 *                 ree_array = GetResultValue(CRunEndEncodedArray.Make(
 *                     c_type, _logical_length, _run_ends.sp_array, _values.sp_array, _logical_offset))             # <<<<<<<<<<<<<<
 *         else:
 *             _run_ends = asarray(run_ends)
*/
              if (unlikely(((PyObject *)__pyx_v__run_ends) == Py_None)) {
                PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_array");
                __Pyx_PyGILState_Release(__pyx_gilstate_save);
                __PYX_ERR(4, 4363, __pyx_L5_error)
              }
              if (unlikely(((PyObject *)__pyx_v__values) == Py_None)) {
                PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_array");
                __Pyx_PyGILState_Release(__pyx_gilstate_save);
                __PYX_ERR(4, 4363, __pyx_L5_error)
              }

              /* "pyarrow/array.pxi":4362
 *             c_type = pyarrow_unwrap_data_type(type)
 *             with nogil:
 *                 ree_array = GetResultValue(CRunEndEncodedArray.Make(             # <<<<<<<<<<<<<<
 *                     c_type, _logical_length, _run_ends.sp_array, _values.sp_array, _logical_offset))
 *         else:
*/
              __pyx_t_11 = arrow::py::GetResultValue<std::shared_ptr< arrow::RunEndEncodedArray> >( arrow::RunEndEncodedArray::Make(__pyx_v_c_type, __pyx_v__logical_length, __pyx_v__run_ends->sp_array, __pyx_v__values->sp_array, __pyx_v__logical_offset)); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(4, 4362, __pyx_L5_error)
              __pyx_v_ree_array = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_11);
            }

            /* "pyarrow/array.pxi":4361
 *             _values = asarray(values, type=type.value_type)
 *             c_type = pyarrow_unwrap_data_type(type)
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 ree_array = GetResultValue(CRunEndEncodedArray.Make(
 *                     c_type, _logical_length, _run_ends.sp_array, _values.sp_array, _logical_offset))
*/
            /*finally:*/ {
              /*normal exit:*/{
                __Pyx_FastGIL_Forget();
                PyEval_RestoreThread(_save);
                goto __pyx_L6;
              }
              __pyx_L5_error: {
                __Pyx_FastGIL_Forget();
                PyEval_RestoreThread(_save);
                goto __pyx_L1_error;
              }
              __pyx_L6:;
            }
        }

        /* "pyarrow/array.pxi":4357
 * 
 *         type = ensure_type(type, allow_none=allow_none_for_type)
 *         if type is not None:             # <<<<<<<<<<<<<<
 *             _run_ends = asarray(run_ends, type=type.run_end_type)
 *             _values = asarray(values, type=type.value_type)
*/
        goto __pyx_L3;
      }

      /* "pyarrow/array.pxi":4365
 *                     c_type, _logical_length, _run_ends.sp_array, _values.sp_array, _logical_offset))
 *         else:
 *             _run_ends = asarray(run_ends)             # <<<<<<<<<<<<<<
 *             _values = asarray(values)
 *             with nogil:
*/
      /*else*/ {
        __pyx_t_9 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_asarray); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 4365, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_8 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_5);
          assert(__pyx_t_9);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_9);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
          __pyx_t_8 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_v_run_ends};
          __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 4365, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array))))) __PYX_ERR(4, 4365, __pyx_L1_error)
        __pyx_v__run_ends = ((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_t_3);
        __pyx_t_3 = 0;

        /* "pyarrow/array.pxi":4366
 *         else:
 *             _run_ends = asarray(run_ends)
 *             _values = asarray(values)             # <<<<<<<<<<<<<<
 *             with nogil:
 *                 ree_array = GetResultValue(CRunEndEncodedArray.MakeFromArrays(
*/
        __pyx_t_5 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_asarray); if (unlikely(!__pyx_t_9)) __PYX_ERR(4, 4366, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_8 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_9))) {
          __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_9);
          assert(__pyx_t_5);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_9);
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_9, __pyx__function);
          __pyx_t_8 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_values};
          __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 4366, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array))))) __PYX_ERR(4, 4366, __pyx_L1_error)
        __pyx_v__values = ((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_t_3);
        __pyx_t_3 = 0;

        /* "pyarrow/array.pxi":4367
 *             _run_ends = asarray(run_ends)
 *             _values = asarray(values)
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 ree_array = GetResultValue(CRunEndEncodedArray.MakeFromArrays(
 *                     _logical_length, _run_ends.sp_array, _values.sp_array, _logical_offset))
*/
        {
            PyThreadState * _save;
            _save = PyEval_SaveThread();
            __Pyx_FastGIL_Remember();
            /*try:*/ {

              /* "pyarrow/array.pxi":4369
 *             with nogil:
 *                 ree_array = GetResultValue(CRunEndEncodedArray.MakeFromArrays(
 *                     _logical_length, _run_ends.sp_array, _values.sp_array, _logical_offset))             # <<<<<<<<<<<<<<
 *         cdef Array result = pyarrow_wrap_array(<shared_ptr[CArray]>ree_array)
 *         result.validate(full=True)
*/
              if (unlikely(((PyObject *)__pyx_v__run_ends) == Py_None)) {
                PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_array");
                __Pyx_PyGILState_Release(__pyx_gilstate_save);
                __PYX_ERR(4, 4369, __pyx_L8_error)
              }
              if (unlikely(((PyObject *)__pyx_v__values) == Py_None)) {
                PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_array");
                __Pyx_PyGILState_Release(__pyx_gilstate_save);
                __PYX_ERR(4, 4369, __pyx_L8_error)
              }

              /* "pyarrow/array.pxi":4368
 *             _values = asarray(values)
 *             with nogil:
 *                 ree_array = GetResultValue(CRunEndEncodedArray.MakeFromArrays(             # <<<<<<<<<<<<<<
 *                     _logical_length, _run_ends.sp_array, _values.sp_array, _logical_offset))
 *         cdef Array result = pyarrow_wrap_array(<shared_ptr[CArray]>ree_array)
*/
              __pyx_t_11 = arrow::py::GetResultValue<std::shared_ptr< arrow::RunEndEncodedArray> >( arrow::RunEndEncodedArray::Make(__pyx_v__logical_length, __pyx_v__run_ends->sp_array, __pyx_v__values->sp_array, __pyx_v__logical_offset)); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(4, 4368, __pyx_L8_error)
              __pyx_v_ree_array = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_11);
            }

            /* "pyarrow/array.pxi":4367
 *             _run_ends = asarray(run_ends)
 *             _values = asarray(values)
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 ree_array = GetResultValue(CRunEndEncodedArray.MakeFromArrays(
 *                     _logical_length, _run_ends.sp_array, _values.sp_array, _logical_offset))
*/
            /*finally:*/ {
              /*normal exit:*/{
                __Pyx_FastGIL_Forget();
                PyEval_RestoreThread(_save);
                goto __pyx_L9;
              }
              __pyx_L8_error: {
                __Pyx_FastGIL_Forget();
                PyEval_RestoreThread(_save);
                goto __pyx_L1_error;
              }
              __pyx_L9:;
            }
        }
      }
      __pyx_L3:;

      /* "pyarrow/array.pxi":4370
 *                 ree_array = GetResultValue(CRunEndEncodedArray.MakeFromArrays(
 *                     _logical_length, _run_ends.sp_array, _values.sp_array, _logical_offset))
 *         cdef Array result = pyarrow_wrap_array(<shared_ptr[CArray]>ree_array)             # <<<<<<<<<<<<<<
 *         result.validate(full=True)
 *         return result
*/
      __pyx_t_3 = pyarrow_wrap_array(((std::shared_ptr< arrow::Array> )__pyx_v_ree_array)); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 4370, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array))))) __PYX_ERR(4, 4370, __pyx_L1_error)
      __pyx_v_result = ((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_t_3);
      __pyx_t_3 = 0;

      /* "pyarrow/array.pxi":4371
 *                     _logical_length, _run_ends.sp_array, _values.sp_array, _logical_offset))
 *         cdef Array result = pyarrow_wrap_array(<shared_ptr[CArray]>ree_array)
 *         result.validate(full=True)             # <<<<<<<<<<<<<<
 *         return result
 * 
*/
      __pyx_t_9 = ((PyObject *)__pyx_v_result);
      __Pyx_INCREF(__pyx_t_9);
      __pyx_t_8 = 0;
      {
        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_9, NULL};
        __pyx_t_5 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 4371, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_full, Py_True, __pyx_t_5, __pyx_callargs+1, 0) < (0)) __PYX_ERR(4, 4371, __pyx_L1_error)
        __pyx_t_3 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_validate, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_5);
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 4371, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "pyarrow/array.pxi":4372
 *         cdef Array result = pyarrow_wrap_array(<shared_ptr[CArray]>ree_array)
 *         result.validate(full=True)
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF((PyObject *)__pyx_v_result);
      __pyx_r = ((PyObject *)__pyx_v_result);
      goto __pyx_L0;

      /* "pyarrow/array.pxi":4343
 *     """
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def _from_arrays(type, allow_none_for_type, logical_length, run_ends, values, logical_offset):
 *         cdef:
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_9);
      __Pyx_AddTraceback("pyarrow.lib.RunEndEncodedArray._from_arrays", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF((PyObject *)__pyx_v__run_ends);
      __Pyx_XDECREF((PyObject *)__pyx_v__values);
      __Pyx_XDECREF((PyObject *)__pyx_v_result);
      __Pyx_XDECREF(__pyx_v_type);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":4374
 *         return result
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_arrays(run_ends, values, type=None):
 *         """
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_18RunEndEncodedArray_3from_arrays(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_18RunEndEncodedArray_2from_arrays, "RunEndEncodedArray.from_arrays(run_ends, values, type=None)\n\nConstruct RunEndEncodedArray from run_ends and values arrays.\n\nParameters\n----------\nrun_ends : Array (int16, int32, or int64 type)\n    The run_ends array.\nvalues : Array (any type)\n    The values array.\ntype : pyarrow.DataType, optional\n    The run_end_encoded(run_end_type, value_type) array type.\n\nReturns\n-------\nRunEndEncodedArray");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_18RunEndEncodedArray_3from_arrays = {"from_arrays", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_18RunEndEncodedArray_3from_arrays, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_18RunEndEncodedArray_2from_arrays};
    static PyObject *__pyx_pw_7pyarrow_3lib_18RunEndEncodedArray_3from_arrays(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_run_ends = 0;
      PyObject *__pyx_v_values = 0;
      PyObject *__pyx_v_type = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[3] = {0,0,0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("from_arrays (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_run_ends,&__pyx_mstate_global->__pyx_n_u_values,&__pyx_mstate_global->__pyx_n_u_type,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(4, 4374, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  3:
            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(4, 4374, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(4, 4374, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 4374, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "from_arrays", 0) < (0)) __PYX_ERR(4, 4374, __pyx_L3_error)

          /* "pyarrow/array.pxi":4375
 * 
 *     @staticmethod
 *     def from_arrays(run_ends, values, type=None):             # <<<<<<<<<<<<<<
 *         """
 *         Construct RunEndEncodedArray from run_ends and values arrays.
*/
          if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
          for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("from_arrays", 0, 2, 3, i); __PYX_ERR(4, 4374, __pyx_L3_error) }
          }
        } else {
          switch (__pyx_nargs) {
            case  3:
            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(4, 4374, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(4, 4374, __pyx_L3_error)
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 4374, __pyx_L3_error)
            break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
        }
        __pyx_v_run_ends = values[0];
        __pyx_v_values = values[1];
        __pyx_v_type = values[2];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("from_arrays", 0, 2, 3, __pyx_nargs); __PYX_ERR(4, 4374, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.RunEndEncodedArray.from_arrays", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_18RunEndEncodedArray_2from_arrays(__pyx_v_run_ends, __pyx_v_values, __pyx_v_type);

      /* "pyarrow/array.pxi":4374
 *         return result
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_arrays(run_ends, values, type=None):
 *         """
*/

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_18RunEndEncodedArray_2from_arrays(PyObject *__pyx_v_run_ends, PyObject *__pyx_v_values, PyObject *__pyx_v_type) {
      PyObject *__pyx_v_logical_length = NULL;
      PyObject *__pyx_r = NULL;
      __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;
      PyObject *__pyx_t_6 = NULL;
      PyObject *__pyx_t_7 = NULL;
      PyObject *__pyx_t_8 = NULL;
      PyObject *__pyx_t_9 = NULL;
      size_t __pyx_t_10;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("from_arrays", 0);

      /* "pyarrow/array.pxi":4392
 *         RunEndEncodedArray
 *         """
 *         logical_length = scalar(run_ends[-1]).as_py() if len(run_ends) > 0 else 0             # <<<<<<<<<<<<<<
 *         return RunEndEncodedArray._from_arrays(type, True, logical_length,
 *                                                run_ends, values, 0)
*/
      __pyx_t_2 = PyObject_Length(__pyx_v_run_ends); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(4, 4392, __pyx_L1_error)
      __pyx_t_3 = (__pyx_t_2 > 0);
      if (__pyx_t_3) {
        __pyx_t_7 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_scalar); if (unlikely(!__pyx_t_8)) __PYX_ERR(4, 4392, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        if (unlikely(__pyx_v_run_ends == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
          __PYX_ERR(4, 4392, __pyx_L1_error)
        }
        __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_run_ends, -1L, long, 1, __Pyx_PyLong_From_long, 0, 1, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_9)) __PYX_ERR(4, 4392, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_10 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_8))) {
          __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8);
          assert(__pyx_t_7);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8);
          __Pyx_INCREF(__pyx_t_7);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_8, __pyx__function);
          __pyx_t_10 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_9};
          __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 4392, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
        }
        __pyx_t_5 = __pyx_t_6;
        __Pyx_INCREF(__pyx_t_5);
        __pyx_t_10 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
          __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_as_py, __pyx_callargs+__pyx_t_10, (1-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 4392, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
        }
        __pyx_t_1 = __pyx_t_4;
        __pyx_t_4 = 0;
      } else {
        __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0);
        __pyx_t_1 = __pyx_mstate_global->__pyx_int_0;
      }
      __pyx_v_logical_length = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "pyarrow/array.pxi":4393
 *         """
 *         logical_length = scalar(run_ends[-1]).as_py() if len(run_ends) > 0 else 0
 *         return RunEndEncodedArray._from_arrays(type, True, logical_length,             # <<<<<<<<<<<<<<
 *                                                run_ends, values, 0)
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_4 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RunEndEncodedArray);
      __Pyx_INCREF(__pyx_t_4);

      /* "pyarrow/array.pxi":4394
 *         logical_length = scalar(run_ends[-1]).as_py() if len(run_ends) > 0 else 0
 *         return RunEndEncodedArray._from_arrays(type, True, logical_length,
 *                                                run_ends, values, 0)             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
*/
      __pyx_t_10 = 0;
      {
        PyObject *__pyx_callargs[7] = {__pyx_t_4, __pyx_v_type, Py_True, __pyx_v_logical_length, __pyx_v_run_ends, __pyx_v_values, __pyx_mstate_global->__pyx_int_0};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_from_arrays_2, __pyx_callargs+__pyx_t_10, (7-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 4393, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":4374
 *         return result
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_arrays(run_ends, values, type=None):
 *         """
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_8);
      __Pyx_XDECREF(__pyx_t_9);
      __Pyx_AddTraceback("pyarrow.lib.RunEndEncodedArray.from_arrays", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_logical_length);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":4396
 *                                                run_ends, values, 0)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_buffers(DataType type, length, buffers, null_count=-1, offset=0,
 *                      children=None):
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_18RunEndEncodedArray_5from_buffers(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_18RunEndEncodedArray_4from_buffers, "RunEndEncodedArray.from_buffers(DataType type, length, buffers, null_count=-1, offset=0, children=None)\n\nConstruct a RunEndEncodedArray from all the parameters that make up an\nArray.\n\nRunEndEncodedArrays do not have buffers, only children arrays, but this\nimplementation is needed to satisfy the Array interface.\n\nParameters\n----------\ntype : DataType\n    The run_end_encoded(run_end_type, value_type) type.\nlength : int\n    The logical length of the run-end encoded array. Expected to match\n    the last value of the run_ends array (children[0]) minus the offset.\nbuffers : List[Buffer]\n    Empty List or [None].\nnull_count : int, default -1\n    The number of null entries in the array. Run-end encoded arrays\n    are specified to not have valid bits and null_count always equals 0.\noffset : int, default 0\n    The array's logical offset (in values, not in bytes) from the\n    start of each buffer.\nchildren : List[Array]\n    Nested type children containing the run_ends and values arrays.\n\nReturns\n-------\nRunEndEncodedArray");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_18RunEndEncodedArray_5from_buffers = {"from_buffers", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_18RunEndEncodedArray_5from_buffers, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_18RunEndEncodedArray_4from_buffers};
    static PyObject *__pyx_pw_7pyarrow_3lib_18RunEndEncodedArray_5from_buffers(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v_type = 0;
      PyObject *__pyx_v_length = 0;
      PyObject *__pyx_v_buffers = 0;
      PyObject *__pyx_v_null_count = 0;
      PyObject *__pyx_v_offset = 0;
      PyObject *__pyx_v_children = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[6] = {0,0,0,0,0,0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("from_buffers (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_type,&__pyx_mstate_global->__pyx_n_u_length,&__pyx_mstate_global->__pyx_n_u_buffers,&__pyx_mstate_global->__pyx_n_u_null_count,&__pyx_mstate_global->__pyx_n_u_offset,&__pyx_mstate_global->__pyx_n_u_children,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(4, 4396, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  6:
            values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(4, 4396, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  5:
            values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(4, 4396, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  4:
            values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(4, 4396, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  3:
            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(4, 4396, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(4, 4396, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 4396, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "from_buffers", 0) < (0)) __PYX_ERR(4, 4396, __pyx_L3_error)
          if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_int_neg_1));
          if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_int_0));

          /* "pyarrow/array.pxi":4398
 *     @staticmethod
 *     def from_buffers(DataType type, length, buffers, null_count=-1, offset=0,
 *                      children=None):             # <<<<<<<<<<<<<<
 *         """
 *         Construct a RunEndEncodedArray from all the parameters that make up an
*/
          if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)Py_None));
          for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("from_buffers", 0, 3, 6, i); __PYX_ERR(4, 4396, __pyx_L3_error) }
          }
        } else {
          switch (__pyx_nargs) {
            case  6:
            values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(4, 4396, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  5:
            values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(4, 4396, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  4:
            values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(4, 4396, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  3:
            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(4, 4396, __pyx_L3_error)
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(4, 4396, __pyx_L3_error)
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 4396, __pyx_L3_error)
            break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_int_neg_1));
          if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_int_0));
          if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)Py_None));
        }
        __pyx_v_type = ((struct __pyx_obj_7pyarrow_3lib_DataType *)values[0]);
        __pyx_v_length = values[1];
        __pyx_v_buffers = values[2];
        __pyx_v_null_count = values[3];
        __pyx_v_offset = values[4];
        __pyx_v_children = values[5];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("from_buffers", 0, 3, 6, __pyx_nargs); __PYX_ERR(4, 4396, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.RunEndEncodedArray.from_buffers", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_type), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType, 1, "type", 0))) __PYX_ERR(4, 4397, __pyx_L1_error)
      __pyx_r = __pyx_pf_7pyarrow_3lib_18RunEndEncodedArray_4from_buffers(__pyx_v_type, __pyx_v_length, __pyx_v_buffers, __pyx_v_null_count, __pyx_v_offset, __pyx_v_children);

      /* "pyarrow/array.pxi":4396
 *                                                run_ends, values, 0)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_buffers(DataType type, length, buffers, null_count=-1, offset=0,
 *                      children=None):
*/

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = NULL;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      goto __pyx_L7_cleaned_up;
      __pyx_L0:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __pyx_L7_cleaned_up:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_18RunEndEncodedArray_4from_buffers(struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v_type, PyObject *__pyx_v_length, PyObject *__pyx_v_buffers, PyObject *__pyx_v_null_count, PyObject *__pyx_v_offset, PyObject *__pyx_v_children) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_t_2;
      PyObject *__pyx_t_3 = NULL;
      Py_ssize_t __pyx_t_4;
      PyObject *__pyx_t_5 = NULL;
      PyObject *__pyx_t_6 = NULL;
      PyObject *__pyx_t_7[5];
      PyObject *__pyx_t_8 = NULL;
      size_t __pyx_t_9;
      int __pyx_t_10;
      PyObject *__pyx_t_11[3];
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("from_buffers", 0);
      __Pyx_INCREF(__pyx_v_buffers);
      __Pyx_INCREF(__pyx_v_children);

      /* "pyarrow/array.pxi":4428
 *         RunEndEncodedArray
 *         """
 *         children = children or []             # <<<<<<<<<<<<<<
 * 
 *         if type.num_fields != len(children):
*/
      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_children); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(4, 4428, __pyx_L1_error)
      if (!__pyx_t_2) {
      } else {
        __Pyx_INCREF(__pyx_v_children);
        __pyx_t_1 = __pyx_v_children;
        goto __pyx_L3_bool_binop_done;
      }
      __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 4428, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_3);
      __pyx_t_1 = __pyx_t_3;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_L3_bool_binop_done:;
      __Pyx_DECREF_SET(__pyx_v_children, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "pyarrow/array.pxi":4430
 *         children = children or []
 * 
 *         if type.num_fields != len(children):             # <<<<<<<<<<<<<<
 *             raise ValueError("RunEndEncodedType's expected number of children "
 *                              f"({type.num_fields}) did not match the passed number "
*/
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_type), __pyx_mstate_global->__pyx_n_u_num_fields); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 4430, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_4 = PyObject_Length(__pyx_v_children); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(4, 4430, __pyx_L1_error)
      __pyx_t_3 = PyLong_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 4430, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 4430, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(4, 4430, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(__pyx_t_2)) {

        /* "pyarrow/array.pxi":4431
 * 
 *         if type.num_fields != len(children):
 *             raise ValueError("RunEndEncodedType's expected number of children "             # <<<<<<<<<<<<<<
 *                              f"({type.num_fields}) did not match the passed number "
 *                              f"({len(children)})")
*/
        __pyx_t_3 = NULL;

        /* "pyarrow/array.pxi":4432
 *         if type.num_fields != len(children):
 *             raise ValueError("RunEndEncodedType's expected number of children "
 *                              f"({type.num_fields}) did not match the passed number "             # <<<<<<<<<<<<<<
 *                              f"({len(children)})")
 * 
*/
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_type), __pyx_mstate_global->__pyx_n_u_num_fields); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 4432, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_1, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 4432, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

        /* "pyarrow/array.pxi":4433
 *             raise ValueError("RunEndEncodedType's expected number of children "
 *                              f"({type.num_fields}) did not match the passed number "
 *                              f"({len(children)})")             # <<<<<<<<<<<<<<
 * 
 *         # buffers are validated as if we needed to pass them to C++, but
*/
        __pyx_t_4 = PyObject_Length(__pyx_v_children); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(4, 4433, __pyx_L1_error)
        __pyx_t_1 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_t_4, 0, ' ', 'd'); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 4433, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_7[0] = __pyx_mstate_global->__pyx_kp_u_RunEndEncodedType_s_expected_num;
        __pyx_t_7[1] = __pyx_t_6;
        __pyx_t_7[2] = __pyx_mstate_global->__pyx_kp_u_did_not_match_the_passed_number;
        __pyx_t_7[3] = __pyx_t_1;
        __pyx_t_7[4] = __pyx_mstate_global->__pyx_kp_u__7;

        /* "pyarrow/array.pxi":4431
 * 
 *         if type.num_fields != len(children):
 *             raise ValueError("RunEndEncodedType's expected number of children "             # <<<<<<<<<<<<<<
 *                              f"({type.num_fields}) did not match the passed number "
 *                              f"({len(children)})")
*/
        __pyx_t_8 = __Pyx_PyUnicode_Join(__pyx_t_7, 5, 49 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6) + 35 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6));
        if (unlikely(!__pyx_t_8)) __PYX_ERR(4, 4431, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_9 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_8};
          __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 4431, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
        }
        __Pyx_Raise(__pyx_t_5, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __PYX_ERR(4, 4431, __pyx_L1_error)

        /* "pyarrow/array.pxi":4430
 *         children = children or []
 * 
 *         if type.num_fields != len(children):             # <<<<<<<<<<<<<<
 *             raise ValueError("RunEndEncodedType's expected number of children "
 *                              f"({type.num_fields}) did not match the passed number "
*/
      }

      /* "pyarrow/array.pxi":4438
 *         # _make_from_arrays will take care of filling in the expected
 *         # buffers array containing a single NULL buffer on the C++ side
 *         if len(buffers) == 0:             # <<<<<<<<<<<<<<
 *             buffers = [None]
 *         if buffers[0] is not None:
*/
      __pyx_t_4 = PyObject_Length(__pyx_v_buffers); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(4, 4438, __pyx_L1_error)
      __pyx_t_2 = (__pyx_t_4 == 0);
      if (__pyx_t_2) {

        /* "pyarrow/array.pxi":4439
 *         # buffers array containing a single NULL buffer on the C++ side
 *         if len(buffers) == 0:
 *             buffers = [None]             # <<<<<<<<<<<<<<
 *         if buffers[0] is not None:
 *             raise ValueError("RunEndEncodedType expects None as validity "
*/
        __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 4439, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_INCREF(Py_None);
        __Pyx_GIVEREF(Py_None);
        if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, Py_None) != (0)) __PYX_ERR(4, 4439, __pyx_L1_error);
        __Pyx_DECREF_SET(__pyx_v_buffers, __pyx_t_5);
        __pyx_t_5 = 0;

        /* "pyarrow/array.pxi":4438
 *         # _make_from_arrays will take care of filling in the expected
 *         # buffers array containing a single NULL buffer on the C++ side
 *         if len(buffers) == 0:             # <<<<<<<<<<<<<<
 *             buffers = [None]
 *         if buffers[0] is not None:
*/
      }

      /* "pyarrow/array.pxi":4440
 *         if len(buffers) == 0:
 *             buffers = [None]
 *         if buffers[0] is not None:             # <<<<<<<<<<<<<<
 *             raise ValueError("RunEndEncodedType expects None as validity "
 *                              "bitmap, buffers[0] is not None")
*/
      if (unlikely(__pyx_v_buffers == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(4, 4440, __pyx_L1_error)
      }
      __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_buffers, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 4440, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_2 = (__pyx_t_5 != Py_None);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(__pyx_t_2)) {

        /* "pyarrow/array.pxi":4441
 *             buffers = [None]
 *         if buffers[0] is not None:
 *             raise ValueError("RunEndEncodedType expects None as validity "             # <<<<<<<<<<<<<<
 *                              "bitmap, buffers[0] is not None")
 *         if type.num_buffers != len(buffers):
*/
        __pyx_t_8 = NULL;
        __pyx_t_9 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_mstate_global->__pyx_kp_u_RunEndEncodedType_expects_None_a};
          __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 4441, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
        }
        __Pyx_Raise(__pyx_t_5, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __PYX_ERR(4, 4441, __pyx_L1_error)

        /* "pyarrow/array.pxi":4440
 *         if len(buffers) == 0:
 *             buffers = [None]
 *         if buffers[0] is not None:             # <<<<<<<<<<<<<<
 *             raise ValueError("RunEndEncodedType expects None as validity "
 *                              "bitmap, buffers[0] is not None")
*/
      }

      /* "pyarrow/array.pxi":4443
 *             raise ValueError("RunEndEncodedType expects None as validity "
 *                              "bitmap, buffers[0] is not None")
 *         if type.num_buffers != len(buffers):             # <<<<<<<<<<<<<<
 *             raise ValueError("RunEndEncodedType's expected number of buffers "
 *                              f"({type.num_buffers}) did not match the passed number "
*/
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_type), __pyx_mstate_global->__pyx_n_u_num_buffers); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 4443, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_4 = PyObject_Length(__pyx_v_buffers); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(4, 4443, __pyx_L1_error)
      __pyx_t_8 = PyLong_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(4, 4443, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_3 = PyObject_RichCompare(__pyx_t_5, __pyx_t_8, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 4443, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __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(4, 4443, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(__pyx_t_2)) {

        /* "pyarrow/array.pxi":4444
 *                              "bitmap, buffers[0] is not None")
 *         if type.num_buffers != len(buffers):
 *             raise ValueError("RunEndEncodedType's expected number of buffers "             # <<<<<<<<<<<<<<
 *                              f"({type.num_buffers}) did not match the passed number "
 *                              f"({len(buffers)}).")
*/
        __pyx_t_8 = NULL;

        /* "pyarrow/array.pxi":4445
 *         if type.num_buffers != len(buffers):
 *             raise ValueError("RunEndEncodedType's expected number of buffers "
 *                              f"({type.num_buffers}) did not match the passed number "             # <<<<<<<<<<<<<<
 *                              f"({len(buffers)}).")
 * 
*/
        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_type), __pyx_mstate_global->__pyx_n_u_num_buffers); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 4445, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 4445, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

        /* "pyarrow/array.pxi":4446
 *             raise ValueError("RunEndEncodedType's expected number of buffers "
 *                              f"({type.num_buffers}) did not match the passed number "
 *                              f"({len(buffers)}).")             # <<<<<<<<<<<<<<
 * 
 *         # null_count is also validated as if we needed it
*/
        __pyx_t_4 = PyObject_Length(__pyx_v_buffers); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(4, 4446, __pyx_L1_error)
        __pyx_t_5 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_t_4, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 4446, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_7[0] = __pyx_mstate_global->__pyx_kp_u_RunEndEncodedType_s_expected_num_2;
        __pyx_t_7[1] = __pyx_t_1;
        __pyx_t_7[2] = __pyx_mstate_global->__pyx_kp_u_did_not_match_the_passed_number;
        __pyx_t_7[3] = __pyx_t_5;
        __pyx_t_7[4] = __pyx_mstate_global->__pyx_kp_u__13;

        /* "pyarrow/array.pxi":4444
 *                              "bitmap, buffers[0] is not None")
 *         if type.num_buffers != len(buffers):
 *             raise ValueError("RunEndEncodedType's expected number of buffers "             # <<<<<<<<<<<<<<
 *                              f"({type.num_buffers}) did not match the passed number "
 *                              f"({len(buffers)}).")
*/
        __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_7, 5, 48 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1) + 35 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + 2, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1));
        if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 4444, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_9 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_6};
          __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 4444, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        __Pyx_Raise(__pyx_t_3, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __PYX_ERR(4, 4444, __pyx_L1_error)

        /* "pyarrow/array.pxi":4443
 *             raise ValueError("RunEndEncodedType expects None as validity "
 *                              "bitmap, buffers[0] is not None")
 *         if type.num_buffers != len(buffers):             # <<<<<<<<<<<<<<
 *             raise ValueError("RunEndEncodedType's expected number of buffers "
 *                              f"({type.num_buffers}) did not match the passed number "
*/
      }

      /* "pyarrow/array.pxi":4449
 * 
 *         # null_count is also validated as if we needed it
 *         if null_count != -1 and null_count != 0:             # <<<<<<<<<<<<<<
 *             raise ValueError("RunEndEncodedType's expected null_count (0) "
 *                              f"did not match passed number ({null_count})")
*/
      __pyx_t_10 = (__Pyx_PyLong_BoolNeObjC(__pyx_v_null_count, __pyx_mstate_global->__pyx_int_neg_1, -1L, 0)); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(4, 4449, __pyx_L1_error)
      if (__pyx_t_10) {
      } else {
        __pyx_t_2 = __pyx_t_10;
        goto __pyx_L10_bool_binop_done;
      }
      __pyx_t_10 = (__Pyx_PyLong_BoolNeObjC(__pyx_v_null_count, __pyx_mstate_global->__pyx_int_0, 0, 0)); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(4, 4449, __pyx_L1_error)
      __pyx_t_2 = __pyx_t_10;
      __pyx_L10_bool_binop_done:;
      if (unlikely(__pyx_t_2)) {

        /* "pyarrow/array.pxi":4450
 *         # null_count is also validated as if we needed it
 *         if null_count != -1 and null_count != 0:
 *             raise ValueError("RunEndEncodedType's expected null_count (0) "             # <<<<<<<<<<<<<<
 *                              f"did not match passed number ({null_count})")
 * 
*/
        __pyx_t_6 = NULL;

        /* "pyarrow/array.pxi":4451
 *         if null_count != -1 and null_count != 0:
 *             raise ValueError("RunEndEncodedType's expected null_count (0) "
 *                              f"did not match passed number ({null_count})")             # <<<<<<<<<<<<<<
 * 
 *         return RunEndEncodedArray._from_arrays(type, False, length, children[0],
*/
        __pyx_t_8 = __Pyx_PyObject_FormatSimple(__pyx_v_null_count, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(4, 4451, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_11[0] = __pyx_mstate_global->__pyx_kp_u_RunEndEncodedType_s_expected_nul;
        __pyx_t_11[1] = __pyx_t_8;
        __pyx_t_11[2] = __pyx_mstate_global->__pyx_kp_u__7;

        /* "pyarrow/array.pxi":4450
 *         # null_count is also validated as if we needed it
 *         if null_count != -1 and null_count != 0:
 *             raise ValueError("RunEndEncodedType's expected null_count (0) "             # <<<<<<<<<<<<<<
 *                              f"did not match passed number ({null_count})")
 * 
*/
        __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_11, 3, 73 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8));
        if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 4450, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_t_9 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_5};
          __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 4450, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        __Pyx_Raise(__pyx_t_3, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __PYX_ERR(4, 4450, __pyx_L1_error)

        /* "pyarrow/array.pxi":4449
 * 
 *         # null_count is also validated as if we needed it
 *         if null_count != -1 and null_count != 0:             # <<<<<<<<<<<<<<
 *             raise ValueError("RunEndEncodedType's expected null_count (0) "
 *                              f"did not match passed number ({null_count})")
*/
      }

      /* "pyarrow/array.pxi":4453
 *                              f"did not match passed number ({null_count})")
 * 
 *         return RunEndEncodedArray._from_arrays(type, False, length, children[0],             # <<<<<<<<<<<<<<
 *                                                children[1], offset)
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_5 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RunEndEncodedArray);
      __Pyx_INCREF(__pyx_t_5);
      if (unlikely(__pyx_v_children == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(4, 4453, __pyx_L1_error)
      }
      __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_children, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 4453, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);

      /* "pyarrow/array.pxi":4454
 * 
 *         return RunEndEncodedArray._from_arrays(type, False, length, children[0],
 *                                                children[1], offset)             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
      if (unlikely(__pyx_v_children == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(4, 4454, __pyx_L1_error)
      }
      __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_children, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_8)) __PYX_ERR(4, 4454, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = 0;
      {
        PyObject *__pyx_callargs[7] = {__pyx_t_5, ((PyObject *)__pyx_v_type), Py_False, __pyx_v_length, __pyx_t_6, __pyx_t_8, __pyx_v_offset};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_from_arrays_2, __pyx_callargs+__pyx_t_9, (7-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 4453, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":4396
 *                                                run_ends, values, 0)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_buffers(DataType type, length, buffers, null_count=-1, offset=0,
 *                      children=None):
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_8);
      __Pyx_AddTraceback("pyarrow.lib.RunEndEncodedArray.from_buffers", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_buffers);
      __Pyx_XDECREF(__pyx_v_children);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":4456
 *                                                children[1], offset)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def run_ends(self):
 *         """
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_18RunEndEncodedArray_8run_ends_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_18RunEndEncodedArray_8run_ends_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_18RunEndEncodedArray_8run_ends___get__(((struct __pyx_obj_7pyarrow_3lib_RunEndEncodedArray *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_18RunEndEncodedArray_8run_ends___get__(struct __pyx_obj_7pyarrow_3lib_RunEndEncodedArray *__pyx_v_self) {
       arrow::RunEndEncodedArray *__pyx_v_ree_array;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__get__", 0);

      /* "pyarrow/array.pxi":4463
 *         The physical offset to the array is applied.
 *         """
 *         cdef CRunEndEncodedArray* ree_array = <CRunEndEncodedArray*>(self.ap)             # <<<<<<<<<<<<<<
 *         return pyarrow_wrap_array(ree_array.run_ends())
 * 
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "ap");
        __PYX_ERR(4, 4463, __pyx_L1_error)
      }
      __pyx_v_ree_array = (( arrow::RunEndEncodedArray *)__pyx_v_self->__pyx_base.ap);

      /* "pyarrow/array.pxi":4464
 *         """
 *         cdef CRunEndEncodedArray* ree_array = <CRunEndEncodedArray*>(self.ap)
 *         return pyarrow_wrap_array(ree_array.run_ends())             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = pyarrow_wrap_array(__pyx_v_ree_array->run_ends()); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 4464, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":4456
 *                                                children[1], offset)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def run_ends(self):
 *         """
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("pyarrow.lib.RunEndEncodedArray.run_ends.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":4466
 *         return pyarrow_wrap_array(ree_array.run_ends())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def values(self):
 *         """
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_18RunEndEncodedArray_6values_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_18RunEndEncodedArray_6values_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_18RunEndEncodedArray_6values___get__(((struct __pyx_obj_7pyarrow_3lib_RunEndEncodedArray *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_18RunEndEncodedArray_6values___get__(struct __pyx_obj_7pyarrow_3lib_RunEndEncodedArray *__pyx_v_self) {
       arrow::RunEndEncodedArray *__pyx_v_ree_array;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__get__", 0);

      /* "pyarrow/array.pxi":4473
 *         The physical offset to the array is applied.
 *         """
 *         cdef CRunEndEncodedArray* ree_array = <CRunEndEncodedArray*>(self.ap)             # <<<<<<<<<<<<<<
 *         return pyarrow_wrap_array(ree_array.values())
 * 
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "ap");
        __PYX_ERR(4, 4473, __pyx_L1_error)
      }
      __pyx_v_ree_array = (( arrow::RunEndEncodedArray *)__pyx_v_self->__pyx_base.ap);

      /* "pyarrow/array.pxi":4474
 *         """
 *         cdef CRunEndEncodedArray* ree_array = <CRunEndEncodedArray*>(self.ap)
 *         return pyarrow_wrap_array(ree_array.values())             # <<<<<<<<<<<<<<
 * 
 *     def find_physical_offset(self):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = pyarrow_wrap_array(__pyx_v_ree_array->values()); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 4474, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":4466
 *         return pyarrow_wrap_array(ree_array.run_ends())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def values(self):
 *         """
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("pyarrow.lib.RunEndEncodedArray.values.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":4476
 *         return pyarrow_wrap_array(ree_array.values())
 * 
 *     def find_physical_offset(self):             # <<<<<<<<<<<<<<
 *         """
 *         Find the physical offset of this REE array.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_18RunEndEncodedArray_7find_physical_offset(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_18RunEndEncodedArray_6find_physical_offset, "RunEndEncodedArray.find_physical_offset(self)\n\nFind the physical offset of this REE array.\n\nThis is the offset of the run that contains the value of the first\nlogical element of this array considering its offset.\n\nThis function uses binary-search, so it has a O(log N) cost.");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_18RunEndEncodedArray_7find_physical_offset = {"find_physical_offset", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_18RunEndEncodedArray_7find_physical_offset, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_18RunEndEncodedArray_6find_physical_offset};
    static PyObject *__pyx_pw_7pyarrow_3lib_18RunEndEncodedArray_7find_physical_offset(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("find_physical_offset (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("find_physical_offset", 1, 0, 0, __pyx_nargs); return NULL; }
      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
      if (unlikely(__pyx_kwds_len < 0)) return NULL;
      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("find_physical_offset", __pyx_kwds); return NULL;}
      __pyx_r = __pyx_pf_7pyarrow_3lib_18RunEndEncodedArray_6find_physical_offset(((struct __pyx_obj_7pyarrow_3lib_RunEndEncodedArray *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_18RunEndEncodedArray_6find_physical_offset(struct __pyx_obj_7pyarrow_3lib_RunEndEncodedArray *__pyx_v_self) {
       arrow::RunEndEncodedArray *__pyx_v_ree_array;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("find_physical_offset", 0);

      /* "pyarrow/array.pxi":4485
 *         This function uses binary-search, so it has a O(log N) cost.
 *         """
 *         cdef CRunEndEncodedArray* ree_array = <CRunEndEncodedArray*>(self.ap)             # <<<<<<<<<<<<<<
 *         return ree_array.FindPhysicalOffset()
 * 
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "ap");
        __PYX_ERR(4, 4485, __pyx_L1_error)
      }
      __pyx_v_ree_array = (( arrow::RunEndEncodedArray *)__pyx_v_self->__pyx_base.ap);

      /* "pyarrow/array.pxi":4486
 *         """
 *         cdef CRunEndEncodedArray* ree_array = <CRunEndEncodedArray*>(self.ap)
 *         return ree_array.FindPhysicalOffset()             # <<<<<<<<<<<<<<
 * 
 *     def find_physical_length(self):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __Pyx_PyLong_From_int64_t(__pyx_v_ree_array->FindPhysicalOffset()); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 4486, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":4476
 *         return pyarrow_wrap_array(ree_array.values())
 * 
 *     def find_physical_offset(self):             # <<<<<<<<<<<<<<
 *         """
 *         Find the physical offset of this REE array.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("pyarrow.lib.RunEndEncodedArray.find_physical_offset", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":4488
 *         return ree_array.FindPhysicalOffset()
 * 
 *     def find_physical_length(self):             # <<<<<<<<<<<<<<
 *         """
 *         Find the physical length of this REE array.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_18RunEndEncodedArray_9find_physical_length(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_18RunEndEncodedArray_8find_physical_length, "RunEndEncodedArray.find_physical_length(self)\n\nFind the physical length of this REE array.\n\nThe physical length of an REE is the number of physical values (and\nrun-ends) necessary to represent the logical range of values from offset\nto length.\n\nThis function uses binary-search, so it has a O(log N) cost.");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_18RunEndEncodedArray_9find_physical_length = {"find_physical_length", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_18RunEndEncodedArray_9find_physical_length, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_18RunEndEncodedArray_8find_physical_length};
    static PyObject *__pyx_pw_7pyarrow_3lib_18RunEndEncodedArray_9find_physical_length(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("find_physical_length (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("find_physical_length", 1, 0, 0, __pyx_nargs); return NULL; }
      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
      if (unlikely(__pyx_kwds_len < 0)) return NULL;
      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("find_physical_length", __pyx_kwds); return NULL;}
      __pyx_r = __pyx_pf_7pyarrow_3lib_18RunEndEncodedArray_8find_physical_length(((struct __pyx_obj_7pyarrow_3lib_RunEndEncodedArray *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_18RunEndEncodedArray_8find_physical_length(struct __pyx_obj_7pyarrow_3lib_RunEndEncodedArray *__pyx_v_self) {
       arrow::RunEndEncodedArray *__pyx_v_ree_array;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("find_physical_length", 0);

      /* "pyarrow/array.pxi":4498
 *         This function uses binary-search, so it has a O(log N) cost.
 *         """
 *         cdef CRunEndEncodedArray* ree_array = <CRunEndEncodedArray*>(self.ap)             # <<<<<<<<<<<<<<
 *         return ree_array.FindPhysicalLength()
 * 
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "ap");
        __PYX_ERR(4, 4498, __pyx_L1_error)
      }
      __pyx_v_ree_array = (( arrow::RunEndEncodedArray *)__pyx_v_self->__pyx_base.ap);

      /* "pyarrow/array.pxi":4499
 *         """
 *         cdef CRunEndEncodedArray* ree_array = <CRunEndEncodedArray*>(self.ap)
 *         return ree_array.FindPhysicalLength()             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __Pyx_PyLong_From_int64_t(__pyx_v_ree_array->FindPhysicalLength()); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 4499, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":4488
 *         return ree_array.FindPhysicalOffset()
 * 
 *     def find_physical_length(self):             # <<<<<<<<<<<<<<
 *         """
 *         Find the physical length of this REE array.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("pyarrow.lib.RunEndEncodedArray.find_physical_length", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":4507
 *     """
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def storage(self):
 *         cdef:
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_14ExtensionArray_7storage_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_14ExtensionArray_7storage_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_14ExtensionArray_7storage___get__(((struct __pyx_obj_7pyarrow_3lib_ExtensionArray *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_14ExtensionArray_7storage___get__(struct __pyx_obj_7pyarrow_3lib_ExtensionArray *__pyx_v_self) {
       arrow::ExtensionArray *__pyx_v_ext_array;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__get__", 0);

      /* "pyarrow/array.pxi":4510
 *     def storage(self):
 *         cdef:
 *             CExtensionArray* ext_array = <CExtensionArray*>(self.ap)             # <<<<<<<<<<<<<<
 * 
 *         return pyarrow_wrap_array(ext_array.storage())
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "ap");
        __PYX_ERR(4, 4510, __pyx_L1_error)
      }
      __pyx_v_ext_array = (( arrow::ExtensionArray *)__pyx_v_self->__pyx_base.ap);

      /* "pyarrow/array.pxi":4512
 *             CExtensionArray* ext_array = <CExtensionArray*>(self.ap)
 * 
 *         return pyarrow_wrap_array(ext_array.storage())             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = pyarrow_wrap_array(__pyx_v_ext_array->storage()); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 4512, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":4507
 *     """
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def storage(self):
 *         cdef:
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("pyarrow.lib.ExtensionArray.storage.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":4514
 *         return pyarrow_wrap_array(ext_array.storage())
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_storage(BaseExtensionType typ, Array storage):
 *         """
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_14ExtensionArray_1from_storage(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_14ExtensionArray_from_storage, "ExtensionArray.from_storage(BaseExtensionType typ, Array storage)\n\nConstruct ExtensionArray from type and storage array.\n\nParameters\n----------\ntyp : DataType\n    The extension type for the result array.\nstorage : Array\n    The underlying storage for the result array.\n\nReturns\n-------\next_array : ExtensionArray");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_14ExtensionArray_1from_storage = {"from_storage", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_14ExtensionArray_1from_storage, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_14ExtensionArray_from_storage};
    static PyObject *__pyx_pw_7pyarrow_3lib_14ExtensionArray_1from_storage(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      struct __pyx_obj_7pyarrow_3lib_BaseExtensionType *__pyx_v_typ = 0;
      struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_storage = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[2] = {0,0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("from_storage (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_typ,&__pyx_mstate_global->__pyx_n_u_storage,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(4, 4514, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(4, 4514, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 4514, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "from_storage", 0) < (0)) __PYX_ERR(4, 4514, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("from_storage", 1, 2, 2, i); __PYX_ERR(4, 4514, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 2)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 4514, __pyx_L3_error)
          values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(4, 4514, __pyx_L3_error)
        }
        __pyx_v_typ = ((struct __pyx_obj_7pyarrow_3lib_BaseExtensionType *)values[0]);
        __pyx_v_storage = ((struct __pyx_obj_7pyarrow_3lib_Array *)values[1]);
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("from_storage", 1, 2, 2, __pyx_nargs); __PYX_ERR(4, 4514, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.ExtensionArray.from_storage", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_typ), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_BaseExtensionType, 1, "typ", 0))) __PYX_ERR(4, 4515, __pyx_L1_error)
      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_storage), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array, 1, "storage", 0))) __PYX_ERR(4, 4515, __pyx_L1_error)
      __pyx_r = __pyx_pf_7pyarrow_3lib_14ExtensionArray_from_storage(__pyx_v_typ, __pyx_v_storage);

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = NULL;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      goto __pyx_L7_cleaned_up;
      __pyx_L0:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __pyx_L7_cleaned_up:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_14ExtensionArray_from_storage(struct __pyx_obj_7pyarrow_3lib_BaseExtensionType *__pyx_v_typ, struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_storage) {
      std::shared_ptr< arrow::ExtensionArray>  __pyx_v_ext_array;
      struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_result = 0;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      int __pyx_t_3;
      PyObject *__pyx_t_4 = NULL;
      PyObject *__pyx_t_5 = NULL;
      PyObject *__pyx_t_6[4];
      PyObject *__pyx_t_7 = NULL;
      size_t __pyx_t_8;
      std::shared_ptr< arrow::ExtensionArray>  __pyx_t_9;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("from_storage", 0);

      /* "pyarrow/array.pxi":4533
 *             shared_ptr[CExtensionArray] ext_array
 * 
 *         if storage.type != typ.storage_type:             # <<<<<<<<<<<<<<
 *             raise TypeError(f"Incompatible storage type {storage.type} "
 *                             f"for extension type {typ}")
*/
      if (unlikely(((PyObject *)__pyx_v_storage) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "type");
        __PYX_ERR(4, 4533, __pyx_L1_error)
      }
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_typ), __pyx_mstate_global->__pyx_n_u_storage_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 4533, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = PyObject_RichCompare(((PyObject *)__pyx_v_storage->type), __pyx_t_1, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 4533, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(4, 4533, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(__pyx_t_3)) {

        /* "pyarrow/array.pxi":4534
 * 
 *         if storage.type != typ.storage_type:
 *             raise TypeError(f"Incompatible storage type {storage.type} "             # <<<<<<<<<<<<<<
 *                             f"for extension type {typ}")
 * 
*/
        __pyx_t_1 = NULL;
        if (unlikely(((PyObject *)__pyx_v_storage) == Py_None)) {
          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "type");
          __PYX_ERR(4, 4534, __pyx_L1_error)
        }
        __pyx_t_4 = __Pyx_PyObject_FormatSimple(((PyObject *)__pyx_v_storage->type), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 4534, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);

        /* "pyarrow/array.pxi":4535
 *         if storage.type != typ.storage_type:
 *             raise TypeError(f"Incompatible storage type {storage.type} "
 *                             f"for extension type {typ}")             # <<<<<<<<<<<<<<
 * 
 *         ext_array = make_shared[CExtensionArray](typ.sp_type, storage.sp_array)
*/
        __pyx_t_5 = __Pyx_PyObject_FormatSimple(((PyObject *)__pyx_v_typ), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 4535, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_6[0] = __pyx_mstate_global->__pyx_kp_u_Incompatible_storage_type;
        __pyx_t_6[1] = __pyx_t_4;
        __pyx_t_6[2] = __pyx_mstate_global->__pyx_kp_u_for_extension_type;
        __pyx_t_6[3] = __pyx_t_5;

        /* "pyarrow/array.pxi":4534
 * 
 *         if storage.type != typ.storage_type:
 *             raise TypeError(f"Incompatible storage type {storage.type} "             # <<<<<<<<<<<<<<
 *                             f"for extension type {typ}")
 * 
*/
        __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_6, 4, 26 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + 20 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5));
        if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 4534, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_8 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_7};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 4534, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __Pyx_Raise(__pyx_t_2, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __PYX_ERR(4, 4534, __pyx_L1_error)

        /* "pyarrow/array.pxi":4533
 *             shared_ptr[CExtensionArray] ext_array
 * 
 *         if storage.type != typ.storage_type:             # <<<<<<<<<<<<<<
 *             raise TypeError(f"Incompatible storage type {storage.type} "
 *                             f"for extension type {typ}")
*/
      }

      /* "pyarrow/array.pxi":4537
 *                             f"for extension type {typ}")
 * 
 *         ext_array = make_shared[CExtensionArray](typ.sp_type, storage.sp_array)             # <<<<<<<<<<<<<<
 *         cdef Array result = pyarrow_wrap_array(<shared_ptr[CArray]> ext_array)
 *         result.validate()
*/
      if (unlikely(((PyObject *)__pyx_v_typ) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_type");
        __PYX_ERR(4, 4537, __pyx_L1_error)
      }
      if (unlikely(((PyObject *)__pyx_v_storage) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_array");
        __PYX_ERR(4, 4537, __pyx_L1_error)
      }
      try {
        __pyx_t_9 = std::make_shared< arrow::ExtensionArray>(__pyx_v_typ->__pyx_base.sp_type, __pyx_v_storage->sp_array);
      } catch(...) {
        __Pyx_CppExn2PyErr();
        __PYX_ERR(4, 4537, __pyx_L1_error)
      }
      __pyx_v_ext_array = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_9);

      /* "pyarrow/array.pxi":4538
 * 
 *         ext_array = make_shared[CExtensionArray](typ.sp_type, storage.sp_array)
 *         cdef Array result = pyarrow_wrap_array(<shared_ptr[CArray]> ext_array)             # <<<<<<<<<<<<<<
 *         result.validate()
 *         return result
*/
      __pyx_t_2 = pyarrow_wrap_array(((std::shared_ptr< arrow::Array> )__pyx_v_ext_array)); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 4538, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array))))) __PYX_ERR(4, 4538, __pyx_L1_error)
      __pyx_v_result = ((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_t_2);
      __pyx_t_2 = 0;

      /* "pyarrow/array.pxi":4539
 *         ext_array = make_shared[CExtensionArray](typ.sp_type, storage.sp_array)
 *         cdef Array result = pyarrow_wrap_array(<shared_ptr[CArray]> ext_array)
 *         result.validate()             # <<<<<<<<<<<<<<
 *         return result
 * 
*/
      __pyx_t_7 = ((PyObject *)__pyx_v_result);
      __Pyx_INCREF(__pyx_t_7);
      __pyx_t_8 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL};
        __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_validate, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 4539, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyarrow/array.pxi":4540
 *         cdef Array result = pyarrow_wrap_array(<shared_ptr[CArray]> ext_array)
 *         result.validate()
 *         return result             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF((PyObject *)__pyx_v_result);
      __pyx_r = ((PyObject *)__pyx_v_result);
      goto __pyx_L0;

      /* "pyarrow/array.pxi":4514
 *         return pyarrow_wrap_array(ext_array.storage())
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_storage(BaseExtensionType typ, Array storage):
 *         """
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_7);
      __Pyx_AddTraceback("pyarrow.lib.ExtensionArray.from_storage", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF((PyObject *)__pyx_v_result);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":4615
 *     """
 * 
 *     def to_numpy_ndarray(self):             # <<<<<<<<<<<<<<
 *         """
 *         Convert fixed shape tensor extension array to a multi-dimensional numpy.ndarray.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_21FixedShapeTensorArray_1to_numpy_ndarray(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_21FixedShapeTensorArray_to_numpy_ndarray, "FixedShapeTensorArray.to_numpy_ndarray(self)\n\nConvert fixed shape tensor extension array to a multi-dimensional numpy.ndarray.\n\nThe resulting ndarray will have (ndim + 1) dimensions.\nThe size of the first dimension will be the length of the fixed shape tensor array\nand the rest of the dimensions will match the permuted shape of the fixed\nshape tensor.\n\nThe conversion is zero-copy.\n\nReturns\n-------\nnumpy.ndarray\n    Ndarray representing tensors in the fixed shape tensor array concatenated\n    along the first dimension.");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_21FixedShapeTensorArray_1to_numpy_ndarray = {"to_numpy_ndarray", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_21FixedShapeTensorArray_1to_numpy_ndarray, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_21FixedShapeTensorArray_to_numpy_ndarray};
    static PyObject *__pyx_pw_7pyarrow_3lib_21FixedShapeTensorArray_1to_numpy_ndarray(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("to_numpy_ndarray (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("to_numpy_ndarray", 1, 0, 0, __pyx_nargs); return NULL; }
      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
      if (unlikely(__pyx_kwds_len < 0)) return NULL;
      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("to_numpy_ndarray", __pyx_kwds); return NULL;}
      __pyx_r = __pyx_pf_7pyarrow_3lib_21FixedShapeTensorArray_to_numpy_ndarray(((struct __pyx_obj_7pyarrow_3lib_FixedShapeTensorArray *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_21FixedShapeTensorArray_to_numpy_ndarray(struct __pyx_obj_7pyarrow_3lib_FixedShapeTensorArray *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      size_t __pyx_t_5;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("to_numpy_ndarray", 0);

      /* "pyarrow/array.pxi":4633
 *         """
 * 
 *         return self.to_tensor().to_numpy()             # <<<<<<<<<<<<<<
 * 
 *     def to_tensor(self):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_4 = ((PyObject *)__pyx_v_self);
      __Pyx_INCREF(__pyx_t_4);
      __pyx_t_5 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_to_tensor, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 4633, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      __pyx_t_2 = __pyx_t_3;
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_5 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_to_numpy, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 4633, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":4615
 *     """
 * 
 *     def to_numpy_ndarray(self):             # <<<<<<<<<<<<<<
 *         """
 *         Convert fixed shape tensor extension array to a multi-dimensional numpy.ndarray.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_AddTraceback("pyarrow.lib.FixedShapeTensorArray.to_numpy_ndarray", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":4635
 *         return self.to_tensor().to_numpy()
 * 
 *     def to_tensor(self):             # <<<<<<<<<<<<<<
 *         """
 *         Convert fixed shape tensor extension array to a pyarrow.Tensor.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_21FixedShapeTensorArray_3to_tensor(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_21FixedShapeTensorArray_2to_tensor, "FixedShapeTensorArray.to_tensor(self)\n\nConvert fixed shape tensor extension array to a pyarrow.Tensor.\n\nThe resulting Tensor will have (ndim + 1) dimensions.\nThe size of the first dimension will be the length of the fixed shape tensor array\nand the rest of the dimensions will match the permuted shape of the fixed\nshape tensor.\n\nThe conversion is zero-copy.\n\nReturns\n-------\npyarrow.Tensor\n    Tensor representing tensors in the fixed shape tensor array concatenated\n    along the first dimension.");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_21FixedShapeTensorArray_3to_tensor = {"to_tensor", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_21FixedShapeTensorArray_3to_tensor, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_21FixedShapeTensorArray_2to_tensor};
    static PyObject *__pyx_pw_7pyarrow_3lib_21FixedShapeTensorArray_3to_tensor(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("to_tensor (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("to_tensor", 1, 0, 0, __pyx_nargs); return NULL; }
      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
      if (unlikely(__pyx_kwds_len < 0)) return NULL;
      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("to_tensor", __pyx_kwds); return NULL;}
      __pyx_r = __pyx_pf_7pyarrow_3lib_21FixedShapeTensorArray_2to_tensor(((struct __pyx_obj_7pyarrow_3lib_FixedShapeTensorArray *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_21FixedShapeTensorArray_2to_tensor(struct __pyx_obj_7pyarrow_3lib_FixedShapeTensorArray *__pyx_v_self) {
       arrow::extension::FixedShapeTensorArray *__pyx_v_ext_array;
      arrow::Result<std::shared_ptr< arrow::Tensor> >  __pyx_v_ctensor;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      std::shared_ptr< arrow::Tensor>  __pyx_t_1;
      PyObject *__pyx_t_2 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("to_tensor", 0);

      /* "pyarrow/array.pxi":4654
 * 
 *         cdef:
 *             CFixedShapeTensorArray* ext_array = <CFixedShapeTensorArray*>(self.ap)             # <<<<<<<<<<<<<<
 *             CResult[shared_ptr[CTensor]] ctensor
 *         with nogil:
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "ap");
        __PYX_ERR(4, 4654, __pyx_L1_error)
      }
      __pyx_v_ext_array = (( arrow::extension::FixedShapeTensorArray *)__pyx_v_self->__pyx_base.__pyx_base.ap);

      /* "pyarrow/array.pxi":4656
 *             CFixedShapeTensorArray* ext_array = <CFixedShapeTensorArray*>(self.ap)
 *             CResult[shared_ptr[CTensor]] ctensor
 *         with nogil:             # <<<<<<<<<<<<<<
 *             ctensor = ext_array.ToTensor()
 *         return pyarrow_wrap_tensor(GetResultValue(ctensor))
*/
      {
          PyThreadState * _save;
          _save = PyEval_SaveThread();
          __Pyx_FastGIL_Remember();
          /*try:*/ {

            /* "pyarrow/array.pxi":4657
 *             CResult[shared_ptr[CTensor]] ctensor
 *         with nogil:
 *             ctensor = ext_array.ToTensor()             # <<<<<<<<<<<<<<
 *         return pyarrow_wrap_tensor(GetResultValue(ctensor))
 * 
*/
            __pyx_v_ctensor = __pyx_v_ext_array->ToTensor();
          }

          /* "pyarrow/array.pxi":4656
 *             CFixedShapeTensorArray* ext_array = <CFixedShapeTensorArray*>(self.ap)
 *             CResult[shared_ptr[CTensor]] ctensor
 *         with nogil:             # <<<<<<<<<<<<<<
 *             ctensor = ext_array.ToTensor()
 *         return pyarrow_wrap_tensor(GetResultValue(ctensor))
*/
          /*finally:*/ {
            /*normal exit:*/{
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L5;
            }
            __pyx_L5:;
          }
      }

      /* "pyarrow/array.pxi":4658
 *         with nogil:
 *             ctensor = ext_array.ToTensor()
 *         return pyarrow_wrap_tensor(GetResultValue(ctensor))             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = arrow::py::GetResultValue<std::shared_ptr< arrow::Tensor> >(__pyx_v_ctensor); if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 4658, __pyx_L1_error)
      __pyx_t_2 = pyarrow_wrap_tensor(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 4658, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":4635
 *         return self.to_tensor().to_numpy()
 * 
 *     def to_tensor(self):             # <<<<<<<<<<<<<<
 *         """
 *         Convert fixed shape tensor extension array to a pyarrow.Tensor.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_AddTraceback("pyarrow.lib.FixedShapeTensorArray.to_tensor", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":4660
 *         return pyarrow_wrap_tensor(GetResultValue(ctensor))
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_numpy_ndarray(obj, dim_names=None):
 *         """
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_21FixedShapeTensorArray_5from_numpy_ndarray(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_21FixedShapeTensorArray_4from_numpy_ndarray, "FixedShapeTensorArray.from_numpy_ndarray(obj, dim_names=None)\n\nConvert numpy tensors (ndarrays) to a fixed shape tensor extension array.\nThe first dimension of ndarray will become the length of the fixed\nshape tensor array.\nIf input array data is not contiguous a copy will be made.\n\nParameters\n----------\nobj : numpy.ndarray\ndim_names : tuple or list of strings, default None\n    Explicit names to tensor dimensions.\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> import numpy as np\n>>> arr = np.array(\n...         [[[1, 2, 3], [4, 5, 6]], [[1, 2, 3], [4, 5, 6]]],\n...         dtype=np.float32)\n>>> pa.FixedShapeTensorArray.from_numpy_ndarray(arr)\n<pyarrow.lib.FixedShapeTensorArray object at ...>\n[\n  [\n    1,\n    2,\n    3,\n    4,\n    5,\n    6\n  ],\n  [\n    1,\n    2,\n    3,\n    4,\n    5,\n    6\n  ]\n]");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_21FixedShapeTensorArray_5from_numpy_ndarray = {"from_numpy_ndarray", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_21FixedShapeTensorArray_5from_numpy_ndarray, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_21FixedShapeTensorArray_4from_numpy_ndarray};
    static PyObject *__pyx_pw_7pyarrow_3lib_21FixedShapeTensorArray_5from_numpy_ndarray(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_obj = 0;
      PyObject *__pyx_v_dim_names = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[2] = {0,0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("from_numpy_ndarray (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_obj,&__pyx_mstate_global->__pyx_n_u_dim_names,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(4, 4660, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(4, 4660, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 4660, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "from_numpy_ndarray", 0) < (0)) __PYX_ERR(4, 4660, __pyx_L3_error)

          /* "pyarrow/array.pxi":4661
 * 
 *     @staticmethod
 *     def from_numpy_ndarray(obj, dim_names=None):             # <<<<<<<<<<<<<<
 *         """
 *         Convert numpy tensors (ndarrays) to a fixed shape tensor extension array.
*/
          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("from_numpy_ndarray", 0, 1, 2, i); __PYX_ERR(4, 4660, __pyx_L3_error) }
          }
        } else {
          switch (__pyx_nargs) {
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(4, 4660, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 4660, __pyx_L3_error)
            break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
        }
        __pyx_v_obj = values[0];
        __pyx_v_dim_names = values[1];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("from_numpy_ndarray", 0, 1, 2, __pyx_nargs); __PYX_ERR(4, 4660, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.FixedShapeTensorArray.from_numpy_ndarray", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_21FixedShapeTensorArray_4from_numpy_ndarray(__pyx_v_obj, __pyx_v_dim_names);

      /* "pyarrow/array.pxi":4660
 *         return pyarrow_wrap_tensor(GetResultValue(ctensor))
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_numpy_ndarray(obj, dim_names=None):
 *         """
*/

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }
    static PyObject *__pyx_gb_7pyarrow_3lib_21FixedShapeTensorArray_18from_numpy_ndarray_2generator15(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

    /* "pyarrow/array.pxi":4717
 *                      )
 *                 )
 *             if not all(isinstance(name, str) for name in dim_names):             # <<<<<<<<<<<<<<
 *                 raise TypeError("Each element of dim_names must be a string")
 * 
*/

    static PyObject *__pyx_pf_7pyarrow_3lib_21FixedShapeTensorArray_18from_numpy_ndarray_genexpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0) {
      struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_12_genexpr *__pyx_cur_scope;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("genexpr", 0);
      __pyx_cur_scope = (struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_12_genexpr *)__pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_12_genexpr(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_12_genexpr, __pyx_mstate_global->__pyx_empty_tuple, NULL);
      if (unlikely(!__pyx_cur_scope)) {
        __pyx_cur_scope = ((struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_12_genexpr *)Py_None);
        __Pyx_INCREF(Py_None);
        __PYX_ERR(4, 4717, __pyx_L1_error)
      } else {
        __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
      }
      __pyx_cur_scope->__pyx_genexpr_arg_0 = __pyx_genexpr_arg_0;
      __Pyx_INCREF(__pyx_cur_scope->__pyx_genexpr_arg_0);
      __Pyx_GIVEREF(__pyx_cur_scope->__pyx_genexpr_arg_0);
      {
        __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7pyarrow_3lib_21FixedShapeTensorArray_18from_numpy_ndarray_2generator15, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[11]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_from_numpy_ndarray_locals_genexp, __pyx_mstate_global->__pyx_n_u_pyarrow_lib); if (unlikely(!gen)) __PYX_ERR(4, 4717, __pyx_L1_error)
        __Pyx_DECREF(__pyx_cur_scope);
        __Pyx_RefNannyFinishContext();
        return (PyObject *) gen;
      }

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_AddTraceback("pyarrow.lib.FixedShapeTensorArray.from_numpy_ndarray.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __Pyx_DECREF((PyObject *)__pyx_cur_scope);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_gb_7pyarrow_3lib_21FixedShapeTensorArray_18from_numpy_ndarray_2generator15(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
      struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_12_genexpr *__pyx_cur_scope = ((struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_12_genexpr *)__pyx_generator->closure);
      PyObject *__pyx_r = NULL;
      PyObject *__pyx_t_1 = NULL;
      Py_ssize_t __pyx_t_2;
      PyObject *(*__pyx_t_3)(PyObject *);
      PyObject *__pyx_t_4 = NULL;
      int __pyx_t_5;
      int __pyx_t_6;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("genexpr", 0);
      switch (__pyx_generator->resume_label) {
        case 0: goto __pyx_L3_first_run;
        default: /* CPython raises the right error here */
        __Pyx_RefNannyFinishContext();
        return NULL;
      }
      __pyx_L3_first_run:;
      if (unlikely(!__pyx_sent_value)) __PYX_ERR(4, 4717, __pyx_L1_error)
      if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(4, 4717, __pyx_L1_error) }
      if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_genexpr_arg_0)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_genexpr_arg_0)) {
        __pyx_t_1 = __pyx_cur_scope->__pyx_genexpr_arg_0; __Pyx_INCREF(__pyx_t_1);
        __pyx_t_2 = 0;
        __pyx_t_3 = NULL;
      } else {
        __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_genexpr_arg_0); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 4717, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_3 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 4717, __pyx_L1_error)
      }
      for (;;) {
        if (likely(!__pyx_t_3)) {
          if (likely(PyList_CheckExact(__pyx_t_1))) {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
              #if !CYTHON_ASSUME_SAFE_SIZE
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(4, 4717, __pyx_L1_error)
              #endif
              if (__pyx_t_2 >= __pyx_temp) break;
            }
            __pyx_t_4 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_2, __Pyx_ReferenceSharing_OwnStrongReference);
            ++__pyx_t_2;
          } else {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
              #if !CYTHON_ASSUME_SAFE_SIZE
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(4, 4717, __pyx_L1_error)
              #endif
              if (__pyx_t_2 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_4 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2));
            #else
            __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2);
            #endif
            ++__pyx_t_2;
          }
          if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 4717, __pyx_L1_error)
        } else {
          __pyx_t_4 = __pyx_t_3(__pyx_t_1);
          if (unlikely(!__pyx_t_4)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(4, 4717, __pyx_L1_error)
              PyErr_Clear();
            }
            break;
          }
        }
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_name);
        __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_name, __pyx_t_4);
        __Pyx_GIVEREF(__pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_5 = PyUnicode_Check(__pyx_cur_scope->__pyx_v_name); 
        __pyx_t_6 = (!__pyx_t_5);
        if (__pyx_t_6) {
          __Pyx_XDECREF(__pyx_r);
          __Pyx_INCREF(Py_False);
          __pyx_r = Py_False;
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          goto __pyx_L0;
        }
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      /*else*/ {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(Py_True);
        __pyx_r = Py_True;
        goto __pyx_L0;
      }
      CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

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

    /* "pyarrow/array.pxi":4660
 *         return pyarrow_wrap_tensor(GetResultValue(ctensor))
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_numpy_ndarray(obj, dim_names=None):
 *         """
*/

    static PyObject *__pyx_pf_7pyarrow_3lib_21FixedShapeTensorArray_4from_numpy_ndarray(PyObject *__pyx_v_obj, PyObject *__pyx_v_dim_names) {
      PyObject *__pyx_v_permutation = NULL;
      PyObject *__pyx_v_arrow_type = NULL;
      PyObject *__pyx_v_shape = NULL;
      PyObject *__pyx_v_values = NULL;
      PyObject *__pyx_gb_7pyarrow_3lib_21FixedShapeTensorArray_18from_numpy_ndarray_2generator15 = 0;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      Py_ssize_t __pyx_t_2;
      int __pyx_t_3;
      PyObject *__pyx_t_4 = NULL;
      size_t __pyx_t_5;
      PyObject *__pyx_t_6 = NULL;
      PyObject *__pyx_t_7 = NULL;
      int __pyx_t_8;
      Py_ssize_t __pyx_t_9;
      PyObject *__pyx_t_10 = NULL;
      PyObject *__pyx_t_11[5];
      PyObject *__pyx_t_12 = NULL;
      PyObject *__pyx_t_13 = NULL;
      PyObject *__pyx_t_14 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("from_numpy_ndarray", 0);

      /* "pyarrow/array.pxi":4703
 *         """
 * 
 *         if len(obj.shape) < 2:             # <<<<<<<<<<<<<<
 *             raise ValueError(
 *                 "Cannot convert 1D array or scalar to fixed shape tensor array")
*/
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_mstate_global->__pyx_n_u_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 4703, __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(4, 4703, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_3 = (__pyx_t_2 < 2);
      if (unlikely(__pyx_t_3)) {

        /* "pyarrow/array.pxi":4704
 * 
 *         if len(obj.shape) < 2:
 *             raise ValueError(             # <<<<<<<<<<<<<<
 *                 "Cannot convert 1D array or scalar to fixed shape tensor array")
 *         if np.prod(obj.shape) == 0:
*/
        __pyx_t_4 = NULL;
        __pyx_t_5 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Cannot_convert_1D_array_or_scala};
          __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 4704, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
        }
        __Pyx_Raise(__pyx_t_1, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __PYX_ERR(4, 4704, __pyx_L1_error)

        /* "pyarrow/array.pxi":4703
 *         """
 * 
 *         if len(obj.shape) < 2:             # <<<<<<<<<<<<<<
 *             raise ValueError(
 *                 "Cannot convert 1D array or scalar to fixed shape tensor array")
*/
      }

      /* "pyarrow/array.pxi":4706
 *             raise ValueError(
 *                 "Cannot convert 1D array or scalar to fixed shape tensor array")
 *         if np.prod(obj.shape) == 0:             # <<<<<<<<<<<<<<
 *             raise ValueError("Expected a non-empty ndarray")
 *         if dim_names is not None:
*/
      __pyx_t_4 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 4706, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_prod); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 4706, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_mstate_global->__pyx_n_u_shape); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 4706, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_5 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_7);
        assert(__pyx_t_4);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
        __pyx_t_5 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_6};
        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 4706, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_t_3 = (__Pyx_PyLong_BoolEqObjC(__pyx_t_1, __pyx_mstate_global->__pyx_int_0, 0, 0)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(4, 4706, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(__pyx_t_3)) {

        /* "pyarrow/array.pxi":4707
 *                 "Cannot convert 1D array or scalar to fixed shape tensor array")
 *         if np.prod(obj.shape) == 0:
 *             raise ValueError("Expected a non-empty ndarray")             # <<<<<<<<<<<<<<
 *         if dim_names is not None:
 *             if not isinstance(dim_names, Sequence):
*/
        __pyx_t_7 = NULL;
        __pyx_t_5 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_Expected_a_non_empty_ndarray};
          __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 4707, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
        }
        __Pyx_Raise(__pyx_t_1, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __PYX_ERR(4, 4707, __pyx_L1_error)

        /* "pyarrow/array.pxi":4706
 *             raise ValueError(
 *                 "Cannot convert 1D array or scalar to fixed shape tensor array")
 *         if np.prod(obj.shape) == 0:             # <<<<<<<<<<<<<<
 *             raise ValueError("Expected a non-empty ndarray")
 *         if dim_names is not None:
*/
      }

      /* "pyarrow/array.pxi":4708
 *         if np.prod(obj.shape) == 0:
 *             raise ValueError("Expected a non-empty ndarray")
 *         if dim_names is not None:             # <<<<<<<<<<<<<<
 *             if not isinstance(dim_names, Sequence):
 *                 raise TypeError("dim_names must be a tuple or list")
*/
      __pyx_t_3 = (__pyx_v_dim_names != Py_None);
      if (__pyx_t_3) {

        /* "pyarrow/array.pxi":4709
 *             raise ValueError("Expected a non-empty ndarray")
 *         if dim_names is not None:
 *             if not isinstance(dim_names, Sequence):             # <<<<<<<<<<<<<<
 *                 raise TypeError("dim_names must be a tuple or list")
 *             if len(dim_names) != len(obj.shape[1:]):
*/
        __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_Sequence); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 4709, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_3 = PyObject_IsInstance(__pyx_v_dim_names, __pyx_t_1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(4, 4709, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_8 = (!__pyx_t_3);
        if (unlikely(__pyx_t_8)) {

          /* "pyarrow/array.pxi":4710
 *         if dim_names is not None:
 *             if not isinstance(dim_names, Sequence):
 *                 raise TypeError("dim_names must be a tuple or list")             # <<<<<<<<<<<<<<
 *             if len(dim_names) != len(obj.shape[1:]):
 *                 raise ValueError(
*/
          __pyx_t_7 = NULL;
          __pyx_t_5 = 1;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_dim_names_must_be_a_tuple_or_lis};
            __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 4710, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_1);
          }
          __Pyx_Raise(__pyx_t_1, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __PYX_ERR(4, 4710, __pyx_L1_error)

          /* "pyarrow/array.pxi":4709
 *             raise ValueError("Expected a non-empty ndarray")
 *         if dim_names is not None:
 *             if not isinstance(dim_names, Sequence):             # <<<<<<<<<<<<<<
 *                 raise TypeError("dim_names must be a tuple or list")
 *             if len(dim_names) != len(obj.shape[1:]):
*/
        }

        /* "pyarrow/array.pxi":4711
 *             if not isinstance(dim_names, Sequence):
 *                 raise TypeError("dim_names must be a tuple or list")
 *             if len(dim_names) != len(obj.shape[1:]):             # <<<<<<<<<<<<<<
 *                 raise ValueError(
 *                     (f"The length of dim_names ({len(dim_names)}) does not match"
*/
        __pyx_t_2 = PyObject_Length(__pyx_v_dim_names); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(4, 4711, __pyx_L1_error)
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_mstate_global->__pyx_n_u_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 4711, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_7 = __Pyx_PyObject_GetSlice(__pyx_t_1, 1, 0, NULL, NULL, &__pyx_mstate_global->__pyx_slice[0], 1, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 4711, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_9 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(4, 4711, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_8 = (__pyx_t_2 != __pyx_t_9);
        if (unlikely(__pyx_t_8)) {

          /* "pyarrow/array.pxi":4712
 *                 raise TypeError("dim_names must be a tuple or list")
 *             if len(dim_names) != len(obj.shape[1:]):
 *                 raise ValueError(             # <<<<<<<<<<<<<<
 *                     (f"The length of dim_names ({len(dim_names)}) does not match"
 *                      f"the number of tensor dimensions ({len(obj.shape[1:])})."
*/
          __pyx_t_1 = NULL;

          /* "pyarrow/array.pxi":4713
 *             if len(dim_names) != len(obj.shape[1:]):
 *                 raise ValueError(
 *                     (f"The length of dim_names ({len(dim_names)}) does not match"             # <<<<<<<<<<<<<<
 *                      f"the number of tensor dimensions ({len(obj.shape[1:])})."
 *                      )
*/
          __pyx_t_9 = PyObject_Length(__pyx_v_dim_names); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(4, 4713, __pyx_L1_error)
          __pyx_t_6 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_t_9, 0, ' ', 'd'); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 4713, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);

          /* "pyarrow/array.pxi":4714
 *                 raise ValueError(
 *                     (f"The length of dim_names ({len(dim_names)}) does not match"
 *                      f"the number of tensor dimensions ({len(obj.shape[1:])})."             # <<<<<<<<<<<<<<
 *                      )
 *                 )
*/
          __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_mstate_global->__pyx_n_u_shape); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 4714, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_10 = __Pyx_PyObject_GetSlice(__pyx_t_4, 1, 0, NULL, NULL, &__pyx_mstate_global->__pyx_slice[0], 1, 0, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(4, 4714, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_10);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_9 = PyObject_Length(__pyx_t_10); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(4, 4714, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          __pyx_t_10 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_t_9, 0, ' ', 'd'); if (unlikely(!__pyx_t_10)) __PYX_ERR(4, 4714, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_10);
          __pyx_t_11[0] = __pyx_mstate_global->__pyx_kp_u_The_length_of_dim_names;
          __pyx_t_11[1] = __pyx_t_6;
          __pyx_t_11[2] = __pyx_mstate_global->__pyx_kp_u_does_not_matchthe_number_of_ten;
          __pyx_t_11[3] = __pyx_t_10;
          __pyx_t_11[4] = __pyx_mstate_global->__pyx_kp_u__13;

          /* "pyarrow/array.pxi":4713
 *             if len(dim_names) != len(obj.shape[1:]):
 *                 raise ValueError(
 *                     (f"The length of dim_names ({len(dim_names)}) does not match"             # <<<<<<<<<<<<<<
 *                      f"the number of tensor dimensions ({len(obj.shape[1:])})."
 *                      )
*/
          __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_11, 5, 25 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6) + 49 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_10) + 2, 127);
          if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 4713, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          __pyx_t_5 = 1;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_4};
            __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 4712, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_7);
          }
          __Pyx_Raise(__pyx_t_7, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __PYX_ERR(4, 4712, __pyx_L1_error)

          /* "pyarrow/array.pxi":4711
 *             if not isinstance(dim_names, Sequence):
 *                 raise TypeError("dim_names must be a tuple or list")
 *             if len(dim_names) != len(obj.shape[1:]):             # <<<<<<<<<<<<<<
 *                 raise ValueError(
 *                     (f"The length of dim_names ({len(dim_names)}) does not match"
*/
        }

        /* "pyarrow/array.pxi":4717
 *                      )
 *                 )
 *             if not all(isinstance(name, str) for name in dim_names):             # <<<<<<<<<<<<<<
 *                 raise TypeError("Each element of dim_names must be a string")
 * 
*/
        __pyx_t_7 = __pyx_pf_7pyarrow_3lib_21FixedShapeTensorArray_18from_numpy_ndarray_genexpr(NULL, __pyx_v_dim_names); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 4717, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_4 = __Pyx_Generator_GetInlinedResult(__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 4717, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(4, 4717, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_3 = (!__pyx_t_8);
        if (unlikely(__pyx_t_3)) {

          /* "pyarrow/array.pxi":4718
 *                 )
 *             if not all(isinstance(name, str) for name in dim_names):
 *                 raise TypeError("Each element of dim_names must be a string")             # <<<<<<<<<<<<<<
 * 
 *         permutation = (-np.array(obj.strides)).argsort(kind='stable')
*/
          __pyx_t_7 = NULL;
          __pyx_t_5 = 1;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_Each_element_of_dim_names_must_b};
            __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 4718, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
          }
          __Pyx_Raise(__pyx_t_4, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __PYX_ERR(4, 4718, __pyx_L1_error)

          /* "pyarrow/array.pxi":4717
 *                      )
 *                 )
 *             if not all(isinstance(name, str) for name in dim_names):             # <<<<<<<<<<<<<<
 *                 raise TypeError("Each element of dim_names must be a string")
 * 
*/
        }

        /* "pyarrow/array.pxi":4708
 *         if np.prod(obj.shape) == 0:
 *             raise ValueError("Expected a non-empty ndarray")
 *         if dim_names is not None:             # <<<<<<<<<<<<<<
 *             if not isinstance(dim_names, Sequence):
 *                 raise TypeError("dim_names must be a tuple or list")
*/
      }

      /* "pyarrow/array.pxi":4720
 *                 raise TypeError("Each element of dim_names must be a string")
 * 
 *         permutation = (-np.array(obj.strides)).argsort(kind='stable')             # <<<<<<<<<<<<<<
 *         if permutation[0] != 0:
 *             raise ValueError('First stride needs to be largest to ensure that '
*/
      __pyx_t_10 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 4720, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_array); if (unlikely(!__pyx_t_12)) __PYX_ERR(4, 4720, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_mstate_global->__pyx_n_u_strides); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 4720, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_5 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_12))) {
        __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_12);
        assert(__pyx_t_10);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_12);
        __Pyx_INCREF(__pyx_t_10);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_12, __pyx__function);
        __pyx_t_5 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_6};
        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_12, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 4720, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_t_12 = PyNumber_Negative(__pyx_t_1); if (unlikely(!__pyx_t_12)) __PYX_ERR(4, 4720, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_7 = __pyx_t_12;
      __Pyx_INCREF(__pyx_t_7);
      __pyx_t_5 = 0;
      {
        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_7, NULL};
        __pyx_t_1 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 4720, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_kind, __pyx_mstate_global->__pyx_n_u_stable, __pyx_t_1, __pyx_callargs+1, 0) < (0)) __PYX_ERR(4, 4720, __pyx_L1_error)
        __pyx_t_4 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_argsort, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_1);
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 4720, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
      }
      __pyx_v_permutation = __pyx_t_4;
      __pyx_t_4 = 0;

      /* "pyarrow/array.pxi":4721
 * 
 *         permutation = (-np.array(obj.strides)).argsort(kind='stable')
 *         if permutation[0] != 0:             # <<<<<<<<<<<<<<
 *             raise ValueError('First stride needs to be largest to ensure that '
 *                              'individual tensor data is contiguous in memory.')
*/
      if (unlikely(__pyx_v_permutation == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(4, 4721, __pyx_L1_error)
      }
      __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_permutation, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 4721, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = (__Pyx_PyLong_BoolNeObjC(__pyx_t_4, __pyx_mstate_global->__pyx_int_0, 0, 0)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(4, 4721, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(__pyx_t_3)) {

        /* "pyarrow/array.pxi":4722
 *         permutation = (-np.array(obj.strides)).argsort(kind='stable')
 *         if permutation[0] != 0:
 *             raise ValueError('First stride needs to be largest to ensure that '             # <<<<<<<<<<<<<<
 *                              'individual tensor data is contiguous in memory.')
 * 
*/
        __pyx_t_12 = NULL;
        __pyx_t_5 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_mstate_global->__pyx_kp_u_First_stride_needs_to_be_largest};
          __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 4722, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
        }
        __Pyx_Raise(__pyx_t_4, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __PYX_ERR(4, 4722, __pyx_L1_error)

        /* "pyarrow/array.pxi":4721
 * 
 *         permutation = (-np.array(obj.strides)).argsort(kind='stable')
 *         if permutation[0] != 0:             # <<<<<<<<<<<<<<
 *             raise ValueError('First stride needs to be largest to ensure that '
 *                              'individual tensor data is contiguous in memory.')
*/
      }

      /* "pyarrow/array.pxi":4725
 *                              'individual tensor data is contiguous in memory.')
 * 
 *         arrow_type = from_numpy_dtype(obj.dtype)             # <<<<<<<<<<<<<<
 *         shape = np.take(obj.shape, permutation)
 *         values = np.ravel(obj, order="K")
*/
      __pyx_t_12 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_from_numpy_dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 4725, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_mstate_global->__pyx_n_u_dtype); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 4725, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_5 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_1);
        assert(__pyx_t_12);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_12);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_1, __pyx__function);
        __pyx_t_5 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_t_7};
        __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_1, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 4725, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
      }
      __pyx_v_arrow_type = __pyx_t_4;
      __pyx_t_4 = 0;

      /* "pyarrow/array.pxi":4726
 * 
 *         arrow_type = from_numpy_dtype(obj.dtype)
 *         shape = np.take(obj.shape, permutation)             # <<<<<<<<<<<<<<
 *         values = np.ravel(obj, order="K")
 * 
*/
      __pyx_t_1 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 4726, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_take); if (unlikely(!__pyx_t_12)) __PYX_ERR(4, 4726, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_mstate_global->__pyx_n_u_shape); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 4726, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_5 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_12))) {
        __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_12);
        assert(__pyx_t_1);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_12);
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_12, __pyx__function);
        __pyx_t_5 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_1, __pyx_t_7, __pyx_v_permutation};
        __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_12, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 4726, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
      }
      __pyx_v_shape = __pyx_t_4;
      __pyx_t_4 = 0;

      /* "pyarrow/array.pxi":4727
 *         arrow_type = from_numpy_dtype(obj.dtype)
 *         shape = np.take(obj.shape, permutation)
 *         values = np.ravel(obj, order="K")             # <<<<<<<<<<<<<<
 * 
 *         return ExtensionArray.from_storage(
*/
      __pyx_t_12 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 4727, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_ravel); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 4727, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_5 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_1);
        assert(__pyx_t_12);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_12);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_1, __pyx__function);
        __pyx_t_5 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_12, __pyx_v_obj};
        __pyx_t_7 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 4727, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_order, __pyx_mstate_global->__pyx_n_u_K, __pyx_t_7, __pyx_callargs+2, 0) < (0)) __PYX_ERR(4, 4727, __pyx_L1_error)
        __pyx_t_4 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_1, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_7);
        __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 4727, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
      }
      __pyx_v_values = __pyx_t_4;
      __pyx_t_4 = 0;

      /* "pyarrow/array.pxi":4729
 *         values = np.ravel(obj, order="K")
 * 
 *         return ExtensionArray.from_storage(             # <<<<<<<<<<<<<<
 *             fixed_shape_tensor(arrow_type, shape[1:],
 *                                dim_names=dim_names,
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ExtensionArray);
      __Pyx_INCREF(__pyx_t_1);

      /* "pyarrow/array.pxi":4730
 * 
 *         return ExtensionArray.from_storage(
 *             fixed_shape_tensor(arrow_type, shape[1:],             # <<<<<<<<<<<<<<
 *                                dim_names=dim_names,
 *                                permutation=permutation[1:] - 1),
*/
      __pyx_t_12 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_fixed_shape_tensor); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 4730, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_10 = __Pyx_PyObject_GetSlice(__pyx_v_shape, 1, 0, NULL, NULL, &__pyx_mstate_global->__pyx_slice[0], 1, 0, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(4, 4730, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);

      /* "pyarrow/array.pxi":4732
 *             fixed_shape_tensor(arrow_type, shape[1:],
 *                                dim_names=dim_names,
 *                                permutation=permutation[1:] - 1),             # <<<<<<<<<<<<<<
 *             FixedSizeListArray.from_arrays(values, shape[1:].prod())
 *         )
*/
      __pyx_t_13 = __Pyx_PyObject_GetSlice(__pyx_v_permutation, 1, 0, NULL, NULL, &__pyx_mstate_global->__pyx_slice[0], 1, 0, 1); if (unlikely(!__pyx_t_13)) __PYX_ERR(4, 4732, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __pyx_t_14 = __Pyx_PyLong_SubtractObjC(__pyx_t_13, __pyx_mstate_global->__pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_14)) __PYX_ERR(4, 4732, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_14);
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      __pyx_t_5 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_6);
        assert(__pyx_t_12);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_12);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
        __pyx_t_5 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[3 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_12, __pyx_v_arrow_type, __pyx_t_10};
        __pyx_t_13 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_13)) __PYX_ERR(4, 4730, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_dim_names, __pyx_v_dim_names, __pyx_t_13, __pyx_callargs+3, 0) < (0)) __PYX_ERR(4, 4730, __pyx_L1_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_permutation, __pyx_t_14, __pyx_t_13, __pyx_callargs+3, 1) < (0)) __PYX_ERR(4, 4730, __pyx_L1_error)
        __pyx_t_7 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_13);
        __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 4730, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
      }

      /* "pyarrow/array.pxi":4733
 *                                dim_names=dim_names,
 *                                permutation=permutation[1:] - 1),
 *             FixedSizeListArray.from_arrays(values, shape[1:].prod())             # <<<<<<<<<<<<<<
 *         )
 * 
*/
      __pyx_t_13 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_FixedSizeListArray);
      __Pyx_INCREF(__pyx_t_13);
      __pyx_t_12 = __Pyx_PyObject_GetSlice(__pyx_v_shape, 1, 0, NULL, NULL, &__pyx_mstate_global->__pyx_slice[0], 1, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(4, 4733, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __pyx_t_10 = __pyx_t_12;
      __Pyx_INCREF(__pyx_t_10);
      __pyx_t_5 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_10, NULL};
        __pyx_t_14 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_prod, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        if (unlikely(!__pyx_t_14)) __PYX_ERR(4, 4733, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_14);
      }
      __pyx_t_5 = 0;
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_13, __pyx_v_values, __pyx_t_14};
        __pyx_t_6 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_from_arrays, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
        if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 4733, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
      }
      __pyx_t_5 = 0;
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_1, __pyx_t_7, __pyx_t_6};
        __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_from_storage, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 4729, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
      }
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":4660
 *         return pyarrow_wrap_tensor(GetResultValue(ctensor))
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_numpy_ndarray(obj, dim_names=None):
 *         """
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_10);
      __Pyx_XDECREF(__pyx_t_12);
      __Pyx_XDECREF(__pyx_t_13);
      __Pyx_XDECREF(__pyx_t_14);
      __Pyx_AddTraceback("pyarrow.lib.FixedShapeTensorArray.from_numpy_ndarray", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_permutation);
      __Pyx_XDECREF(__pyx_v_arrow_type);
      __Pyx_XDECREF(__pyx_v_shape);
      __Pyx_XDECREF(__pyx_v_values);
      __Pyx_XDECREF(__pyx_gb_7pyarrow_3lib_21FixedShapeTensorArray_18from_numpy_ndarray_2generator15);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":4791
 *     """
 * 
 *     def to_numpy(self, zero_copy_only=True, writable=False):             # <<<<<<<<<<<<<<
 *         """
 *         Return a NumPy bool view or copy of this array.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_10Bool8Array_1to_numpy(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_10Bool8Array_to_numpy, "Bool8Array.to_numpy(self, zero_copy_only=True, writable=False)\n\nReturn a NumPy bool view or copy of this array.\n\nBy default, tries to return a view of this array. This is only\nsupported for arrays without any nulls.\n\nParameters\n----------\nzero_copy_only : bool, default True\n    If True, an exception will be raised if the conversion to a numpy\n    array would require copying the underlying data (e.g. in presence\n    of nulls).\nwritable : bool, default False\n    For numpy arrays created with zero copy (view on the Arrow data),\n    the resulting array is not writable (Arrow data is immutable).\n    By setting this to True, a copy of the array is made to ensure\n    it is writable.\n\nReturns\n-------\narray : numpy.ndarray");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_10Bool8Array_1to_numpy = {"to_numpy", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10Bool8Array_1to_numpy, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10Bool8Array_to_numpy};
    static PyObject *__pyx_pw_7pyarrow_3lib_10Bool8Array_1to_numpy(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_zero_copy_only = 0;
      PyObject *__pyx_v_writable = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[2] = {0,0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("to_numpy (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_zero_copy_only,&__pyx_mstate_global->__pyx_n_u_writable,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(4, 4791, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(4, 4791, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 4791, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "to_numpy", 0) < (0)) __PYX_ERR(4, 4791, __pyx_L3_error)
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_True));
          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_False));
        } else {
          switch (__pyx_nargs) {
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(4, 4791, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 4791, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_True));
          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_False));
        }
        __pyx_v_zero_copy_only = values[0];
        __pyx_v_writable = values[1];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("to_numpy", 0, 0, 2, __pyx_nargs); __PYX_ERR(4, 4791, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.Bool8Array.to_numpy", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_10Bool8Array_to_numpy(((struct __pyx_obj_7pyarrow_3lib_Bool8Array *)__pyx_v_self), __pyx_v_zero_copy_only, __pyx_v_writable);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_10Bool8Array_to_numpy(struct __pyx_obj_7pyarrow_3lib_Bool8Array *__pyx_v_self, PyObject *__pyx_v_zero_copy_only, PyObject *__pyx_v_writable) {
      PyObject *__pyx_v_e = NULL;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      int __pyx_t_1;
      int __pyx_t_2;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      PyObject *__pyx_t_5 = NULL;
      PyObject *__pyx_t_6 = NULL;
      PyObject *__pyx_t_7 = NULL;
      PyObject *__pyx_t_8 = NULL;
      PyObject *__pyx_t_9 = NULL;
      PyObject *__pyx_t_10 = NULL;
      size_t __pyx_t_11;
      int __pyx_t_12;
      int __pyx_t_13;
      char const *__pyx_t_14;
      PyObject *__pyx_t_15 = NULL;
      PyObject *__pyx_t_16 = NULL;
      PyObject *__pyx_t_17 = NULL;
      PyObject *__pyx_t_18 = NULL;
      PyObject *__pyx_t_19 = NULL;
      PyObject *__pyx_t_20 = NULL;
      PyObject *__pyx_t_21 = NULL;
      PyObject *__pyx_t_22 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("to_numpy", 0);

      /* "pyarrow/array.pxi":4814
 *         array : numpy.ndarray
 *         """
 *         if not writable:             # <<<<<<<<<<<<<<
 *             try:
 *                 return self.storage.to_numpy().view(np.bool_)
*/
      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_writable); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(4, 4814, __pyx_L1_error)
      __pyx_t_2 = (!__pyx_t_1);
      if (__pyx_t_2) {

        /* "pyarrow/array.pxi":4815
 *         """
 *         if not writable:
 *             try:             # <<<<<<<<<<<<<<
 *                 return self.storage.to_numpy().view(np.bool_)
 *             except ArrowInvalid as e:
*/
        {
          __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:*/ {

            /* "pyarrow/array.pxi":4816
 *         if not writable:
 *             try:
 *                 return self.storage.to_numpy().view(np.bool_)             # <<<<<<<<<<<<<<
 *             except ArrowInvalid as e:
 *                 if zero_copy_only:
*/
            __Pyx_XDECREF(__pyx_r);
            __pyx_t_10 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_storage); if (unlikely(!__pyx_t_10)) __PYX_ERR(4, 4816, __pyx_L4_error)
            __Pyx_GOTREF(__pyx_t_10);
            __pyx_t_9 = __pyx_t_10;
            __Pyx_INCREF(__pyx_t_9);
            __pyx_t_11 = 0;
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL};
              __pyx_t_8 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_to_numpy, __pyx_callargs+__pyx_t_11, (1-__pyx_t_11) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              if (unlikely(!__pyx_t_8)) __PYX_ERR(4, 4816, __pyx_L4_error)
              __Pyx_GOTREF(__pyx_t_8);
            }
            __pyx_t_7 = __pyx_t_8;
            __Pyx_INCREF(__pyx_t_7);
            __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_10)) __PYX_ERR(4, 4816, __pyx_L4_error)
            __Pyx_GOTREF(__pyx_t_10);
            __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_bool); if (unlikely(!__pyx_t_9)) __PYX_ERR(4, 4816, __pyx_L4_error)
            __Pyx_GOTREF(__pyx_t_9);
            __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
            __pyx_t_11 = 0;
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_9};
              __pyx_t_6 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_view, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
              __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
              if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 4816, __pyx_L4_error)
              __Pyx_GOTREF(__pyx_t_6);
            }
            __pyx_r = __pyx_t_6;
            __pyx_t_6 = 0;
            goto __pyx_L8_try_return;

            /* "pyarrow/array.pxi":4815
 *         """
 *         if not writable:
 *             try:             # <<<<<<<<<<<<<<
 *                 return self.storage.to_numpy().view(np.bool_)
 *             except ArrowInvalid as e:
*/
          }
          __pyx_L4_error:;
          __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

          /* "pyarrow/array.pxi":4817
 *             try:
 *                 return self.storage.to_numpy().view(np.bool_)
 *             except ArrowInvalid as e:             # <<<<<<<<<<<<<<
 *                 if zero_copy_only:
 *                     raise e
*/
          __Pyx_ErrFetch(&__pyx_t_6, &__pyx_t_8, &__pyx_t_9);
          __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_ArrowInvalid); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 4817, __pyx_L6_except_error)
          __Pyx_GOTREF(__pyx_t_7);
          __pyx_t_12 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_6, __pyx_t_7);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_ErrRestore(__pyx_t_6, __pyx_t_8, __pyx_t_9);
          __pyx_t_6 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0;
          if (__pyx_t_12) {
            __Pyx_AddTraceback("pyarrow.lib.Bool8Array.to_numpy", __pyx_clineno, __pyx_lineno, __pyx_filename);
            if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_8, &__pyx_t_6) < 0) __PYX_ERR(4, 4817, __pyx_L6_except_error)
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_6);
            __Pyx_INCREF(__pyx_t_8);
            __pyx_v_e = __pyx_t_8;
            /*try:*/ {

              /* "pyarrow/array.pxi":4818
 *                 return self.storage.to_numpy().view(np.bool_)
 *             except ArrowInvalid as e:
 *                 if zero_copy_only:             # <<<<<<<<<<<<<<
 *                     raise e
 * 
*/
              __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_zero_copy_only); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(4, 4818, __pyx_L15_error)
              if (unlikely(__pyx_t_2)) {

                /* "pyarrow/array.pxi":4819
 *             except ArrowInvalid as e:
 *                 if zero_copy_only:
 *                     raise e             # <<<<<<<<<<<<<<
 * 
 *         return _pc().not_equal(self.storage, 0).to_numpy(zero_copy_only=zero_copy_only, writable=writable)
*/
                __Pyx_Raise(__pyx_v_e, 0, 0, 0);
                __PYX_ERR(4, 4819, __pyx_L15_error)

                /* "pyarrow/array.pxi":4818
 *                 return self.storage.to_numpy().view(np.bool_)
 *             except ArrowInvalid as e:
 *                 if zero_copy_only:             # <<<<<<<<<<<<<<
 *                     raise e
 * 
*/
              }
            }

            /* "pyarrow/array.pxi":4817
 *             try:
 *                 return self.storage.to_numpy().view(np.bool_)
 *             except ArrowInvalid as e:             # <<<<<<<<<<<<<<
 *                 if zero_copy_only:
 *                     raise e
*/
            /*finally:*/ {
              /*normal exit:*/{
                __Pyx_DECREF(__pyx_v_e); __pyx_v_e = 0;
                goto __pyx_L16;
              }
              __pyx_L15_error:;
              /*exception exit:*/{
                __Pyx_PyThreadState_declare
                __Pyx_PyThreadState_assign
                __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0;
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
                 __Pyx_ExceptionSwap(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20);
                if ( unlikely(__Pyx_GetException(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17) < 0)) __Pyx_ErrFetch(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17);
                __Pyx_XGOTREF(__pyx_t_15);
                __Pyx_XGOTREF(__pyx_t_16);
                __Pyx_XGOTREF(__pyx_t_17);
                __Pyx_XGOTREF(__pyx_t_18);
                __Pyx_XGOTREF(__pyx_t_19);
                __Pyx_XGOTREF(__pyx_t_20);
                __pyx_t_12 = __pyx_lineno; __pyx_t_13 = __pyx_clineno; __pyx_t_14 = __pyx_filename;
                {
                  __Pyx_DECREF(__pyx_v_e); __pyx_v_e = 0;
                }
                __Pyx_XGIVEREF(__pyx_t_18);
                __Pyx_XGIVEREF(__pyx_t_19);
                __Pyx_XGIVEREF(__pyx_t_20);
                __Pyx_ExceptionReset(__pyx_t_18, __pyx_t_19, __pyx_t_20);
                __Pyx_XGIVEREF(__pyx_t_15);
                __Pyx_XGIVEREF(__pyx_t_16);
                __Pyx_XGIVEREF(__pyx_t_17);
                __Pyx_ErrRestore(__pyx_t_15, __pyx_t_16, __pyx_t_17);
                __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0;
                __pyx_lineno = __pyx_t_12; __pyx_clineno = __pyx_t_13; __pyx_filename = __pyx_t_14;
                goto __pyx_L6_except_error;
              }
              __pyx_L16:;
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
            goto __pyx_L5_exception_handled;
          }
          goto __pyx_L6_except_error;

          /* "pyarrow/array.pxi":4815
 *         """
 *         if not writable:
 *             try:             # <<<<<<<<<<<<<<
 *                 return self.storage.to_numpy().view(np.bool_)
 *             except ArrowInvalid as e:
*/
          __pyx_L6_except_error:;
          __Pyx_XGIVEREF(__pyx_t_3);
          __Pyx_XGIVEREF(__pyx_t_4);
          __Pyx_XGIVEREF(__pyx_t_5);
          __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
          goto __pyx_L1_error;
          __pyx_L8_try_return:;
          __Pyx_XGIVEREF(__pyx_t_3);
          __Pyx_XGIVEREF(__pyx_t_4);
          __Pyx_XGIVEREF(__pyx_t_5);
          __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
          goto __pyx_L0;
          __pyx_L5_exception_handled:;
          __Pyx_XGIVEREF(__pyx_t_3);
          __Pyx_XGIVEREF(__pyx_t_4);
          __Pyx_XGIVEREF(__pyx_t_5);
          __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
        }

        /* "pyarrow/array.pxi":4814
 *         array : numpy.ndarray
 *         """
 *         if not writable:             # <<<<<<<<<<<<<<
 *             try:
 *                 return self.storage.to_numpy().view(np.bool_)
*/
      }

      /* "pyarrow/array.pxi":4821
 *                     raise e
 * 
 *         return _pc().not_equal(self.storage, 0).to_numpy(zero_copy_only=zero_copy_only, writable=writable)             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_21 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_22, __pyx_mstate_global->__pyx_n_u_pc_2); if (unlikely(!__pyx_t_22)) __PYX_ERR(4, 4821, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_22);
      __pyx_t_11 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_22))) {
        __pyx_t_21 = PyMethod_GET_SELF(__pyx_t_22);
        assert(__pyx_t_21);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_22);
        __Pyx_INCREF(__pyx_t_21);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_22, __pyx__function);
        __pyx_t_11 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_21, NULL};
        __pyx_t_10 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_22, __pyx_callargs+__pyx_t_11, (1-__pyx_t_11) | (__pyx_t_11*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0;
        __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
        if (unlikely(!__pyx_t_10)) __PYX_ERR(4, 4821, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
      }
      __pyx_t_7 = __pyx_t_10;
      __Pyx_INCREF(__pyx_t_7);
      __pyx_t_22 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_storage); if (unlikely(!__pyx_t_22)) __PYX_ERR(4, 4821, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_22);
      __pyx_t_11 = 0;
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_7, __pyx_t_22, __pyx_mstate_global->__pyx_int_0};
        __pyx_t_9 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_not_equal, __pyx_callargs+__pyx_t_11, (3-__pyx_t_11) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        if (unlikely(!__pyx_t_9)) __PYX_ERR(4, 4821, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
      }
      __pyx_t_8 = __pyx_t_9;
      __Pyx_INCREF(__pyx_t_8);
      __pyx_t_11 = 0;
      {
        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_8, NULL};
        __pyx_t_10 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(4, 4821, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_zero_copy_only, __pyx_v_zero_copy_only, __pyx_t_10, __pyx_callargs+1, 0) < (0)) __PYX_ERR(4, 4821, __pyx_L1_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_writable, __pyx_v_writable, __pyx_t_10, __pyx_callargs+1, 1) < (0)) __PYX_ERR(4, 4821, __pyx_L1_error)
        __pyx_t_6 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_to_numpy, __pyx_callargs+__pyx_t_11, (1-__pyx_t_11) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_10);
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 4821, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
      }
      __pyx_r = __pyx_t_6;
      __pyx_t_6 = 0;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":4791
 *     """
 * 
 *     def to_numpy(self, zero_copy_only=True, writable=False):             # <<<<<<<<<<<<<<
 *         """
 *         Return a NumPy bool view or copy of this array.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_8);
      __Pyx_XDECREF(__pyx_t_9);
      __Pyx_XDECREF(__pyx_t_10);
      __Pyx_XDECREF(__pyx_t_21);
      __Pyx_XDECREF(__pyx_t_22);
      __Pyx_AddTraceback("pyarrow.lib.Bool8Array.to_numpy", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_e);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":4823
 *         return _pc().not_equal(self.storage, 0).to_numpy(zero_copy_only=zero_copy_only, writable=writable)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_storage(Int8Array storage):
 *         """
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_10Bool8Array_3from_storage(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_10Bool8Array_2from_storage, "Bool8Array.from_storage(Int8Array storage)\n\nConstruct Bool8Array from Int8Array storage.\n\nParameters\n----------\nstorage : Int8Array\n    The underlying storage for the result array.\n\nReturns\n-------\nbool8_array : Bool8Array");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_10Bool8Array_3from_storage = {"from_storage", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10Bool8Array_3from_storage, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10Bool8Array_2from_storage};
    static PyObject *__pyx_pw_7pyarrow_3lib_10Bool8Array_3from_storage(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      struct __pyx_obj_7pyarrow_3lib_Int8Array *__pyx_v_storage = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("from_storage (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_storage,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(4, 4823, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 4823, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "from_storage", 0) < (0)) __PYX_ERR(4, 4823, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("from_storage", 1, 1, 1, i); __PYX_ERR(4, 4823, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 1)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 4823, __pyx_L3_error)
        }
        __pyx_v_storage = ((struct __pyx_obj_7pyarrow_3lib_Int8Array *)values[0]);
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("from_storage", 1, 1, 1, __pyx_nargs); __PYX_ERR(4, 4823, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.Bool8Array.from_storage", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_storage), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Int8Array, 1, "storage", 0))) __PYX_ERR(4, 4824, __pyx_L1_error)
      __pyx_r = __pyx_pf_7pyarrow_3lib_10Bool8Array_2from_storage(__pyx_v_storage);

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = NULL;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      goto __pyx_L7_cleaned_up;
      __pyx_L0:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __pyx_L7_cleaned_up:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_10Bool8Array_2from_storage(struct __pyx_obj_7pyarrow_3lib_Int8Array *__pyx_v_storage) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      PyObject *__pyx_t_5 = NULL;
      size_t __pyx_t_6;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("from_storage", 0);

      /* "pyarrow/array.pxi":4837
 *         bool8_array : Bool8Array
 *         """
 *         return ExtensionArray.from_storage(bool8(), storage)             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ExtensionArray);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_4 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_bool8); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 4837, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
        assert(__pyx_t_4);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
        __pyx_t_6 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
        __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 4837, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      __pyx_t_6 = 0;
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_t_3, ((PyObject *)__pyx_v_storage)};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_from_storage, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 4837, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":4823
 *         return _pc().not_equal(self.storage, 0).to_numpy(zero_copy_only=zero_copy_only, writable=writable)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_storage(Int8Array storage):
 *         """
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_AddTraceback("pyarrow.lib.Bool8Array.from_storage", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":4839
 *         return ExtensionArray.from_storage(bool8(), storage)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_numpy(obj):
 *         """
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_10Bool8Array_5from_numpy(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_10Bool8Array_4from_numpy, "Bool8Array.from_numpy(obj)\n\nConvert numpy array to a bool8 extension array without making a copy.\nThe input array must be 1-dimensional, with either bool_ or int8 dtype.\n\nParameters\n----------\nobj : numpy.ndarray\n\nReturns\n-------\nbool8_array : Bool8Array\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> import numpy as np\n>>> arr = np.array([True, False, True], dtype=np.bool_)\n>>> pa.Bool8Array.from_numpy(arr)\n<pyarrow.lib.Bool8Array object at ...>\n[\n  1,\n  0,\n  1\n]");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_10Bool8Array_5from_numpy = {"from_numpy", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10Bool8Array_5from_numpy, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10Bool8Array_4from_numpy};
    static PyObject *__pyx_pw_7pyarrow_3lib_10Bool8Array_5from_numpy(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_obj = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("from_numpy (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_obj,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(4, 4839, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 4839, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "from_numpy", 0) < (0)) __PYX_ERR(4, 4839, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("from_numpy", 1, 1, 1, i); __PYX_ERR(4, 4839, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 1)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 4839, __pyx_L3_error)
        }
        __pyx_v_obj = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("from_numpy", 1, 1, 1, __pyx_nargs); __PYX_ERR(4, 4839, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.Bool8Array.from_numpy", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_10Bool8Array_4from_numpy(__pyx_v_obj);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_10Bool8Array_4from_numpy(PyObject *__pyx_v_obj) {
      PyObject *__pyx_v_storage_arr = NULL;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_t_2;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      PyObject *__pyx_t_5 = NULL;
      PyObject *__pyx_t_6[3];
      size_t __pyx_t_7;
      int __pyx_t_8;
      PyObject *__pyx_t_9 = NULL;
      PyObject *__pyx_t_10 = NULL;
      PyObject *__pyx_t_11 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("from_numpy", 0);

      /* "pyarrow/array.pxi":4867
 *         """
 * 
 *         if obj.ndim != 1:             # <<<<<<<<<<<<<<
 *             raise ValueError(f"Cannot convert {obj.ndim}-D array to bool8 array")
 * 
*/
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_mstate_global->__pyx_n_u_ndim); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 4867, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = (__Pyx_PyLong_BoolNeObjC(__pyx_t_1, __pyx_mstate_global->__pyx_int_1, 1, 0)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(4, 4867, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(__pyx_t_2)) {

        /* "pyarrow/array.pxi":4868
 * 
 *         if obj.ndim != 1:
 *             raise ValueError(f"Cannot convert {obj.ndim}-D array to bool8 array")             # <<<<<<<<<<<<<<
 * 
 *         if obj.dtype not in [np.bool_, np.int8]:
*/
        __pyx_t_3 = NULL;
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_mstate_global->__pyx_n_u_ndim); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 4868, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 4868, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_6[0] = __pyx_mstate_global->__pyx_kp_u_Cannot_convert;
        __pyx_t_6[1] = __pyx_t_5;
        __pyx_t_6[2] = __pyx_mstate_global->__pyx_kp_u_D_array_to_bool8_array;
        __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_6, 3, 15 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + 23, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5));
        if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 4868, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_7 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
          __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 4868, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
        }
        __Pyx_Raise(__pyx_t_1, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __PYX_ERR(4, 4868, __pyx_L1_error)

        /* "pyarrow/array.pxi":4867
 *         """
 * 
 *         if obj.ndim != 1:             # <<<<<<<<<<<<<<
 *             raise ValueError(f"Cannot convert {obj.ndim}-D array to bool8 array")
 * 
*/
      }

      /* "pyarrow/array.pxi":4870
 *             raise ValueError(f"Cannot convert {obj.ndim}-D array to bool8 array")
 * 
 *         if obj.dtype not in [np.bool_, np.int8]:             # <<<<<<<<<<<<<<
 *             raise TypeError(f"Array dtype {obj.dtype} incompatible with bool8 storage")
 * 
*/
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_mstate_global->__pyx_n_u_dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 4870, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 4870, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_bool); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 4870, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 4870, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(4, 4870, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (__pyx_t_8) {
      } else {
        __pyx_t_2 = __pyx_t_8;
        goto __pyx_L5_bool_binop_done;
      }
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 4870, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_int8); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 4870, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 4870, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(4, 4870, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_2 = __pyx_t_8;
      __pyx_L5_bool_binop_done:;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_8 = __pyx_t_2;
      if (unlikely(__pyx_t_8)) {

        /* "pyarrow/array.pxi":4871
 * 
 *         if obj.dtype not in [np.bool_, np.int8]:
 *             raise TypeError(f"Array dtype {obj.dtype} incompatible with bool8 storage")             # <<<<<<<<<<<<<<
 * 
 *         storage_arr = array(obj.view(np.int8), type=int8())
*/
        __pyx_t_4 = NULL;
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_mstate_global->__pyx_n_u_dtype); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 4871, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_t_3, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 4871, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_6[0] = __pyx_mstate_global->__pyx_kp_u_Array_dtype;
        __pyx_t_6[1] = __pyx_t_5;
        __pyx_t_6[2] = __pyx_mstate_global->__pyx_kp_u_incompatible_with_bool8_storage;
        __pyx_t_3 = __Pyx_PyUnicode_Join(__pyx_t_6, 3, 12 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + 32, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5));
        if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 4871, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_7 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3};
          __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __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(4, 4871, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
        }
        __Pyx_Raise(__pyx_t_1, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __PYX_ERR(4, 4871, __pyx_L1_error)

        /* "pyarrow/array.pxi":4870
 *             raise ValueError(f"Cannot convert {obj.ndim}-D array to bool8 array")
 * 
 *         if obj.dtype not in [np.bool_, np.int8]:             # <<<<<<<<<<<<<<
 *             raise TypeError(f"Array dtype {obj.dtype} incompatible with bool8 storage")
 * 
*/
      }

      /* "pyarrow/array.pxi":4873
 *             raise TypeError(f"Array dtype {obj.dtype} incompatible with bool8 storage")
 * 
 *         storage_arr = array(obj.view(np.int8), type=int8())             # <<<<<<<<<<<<<<
 *         return Bool8Array.from_storage(storage_arr)
 * 
*/
      __pyx_t_3 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_array); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 4873, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_9 = __pyx_v_obj;
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_10)) __PYX_ERR(4, 4873, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_int8); if (unlikely(!__pyx_t_11)) __PYX_ERR(4, 4873, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_11};
        __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_view, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 4873, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
      }
      __pyx_t_9 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_int8); if (unlikely(!__pyx_t_10)) __PYX_ERR(4, 4873, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_7 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_10))) {
        __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_10);
        assert(__pyx_t_9);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_10);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_10, __pyx__function);
        __pyx_t_7 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL};
        __pyx_t_11 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_10, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        if (unlikely(!__pyx_t_11)) __PYX_ERR(4, 4873, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
      }
      __pyx_t_7 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
        assert(__pyx_t_3);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
        __pyx_t_7 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_3, __pyx_t_5};
        __pyx_t_10 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(4, 4873, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_type, __pyx_t_11, __pyx_t_10, __pyx_callargs+2, 0) < (0)) __PYX_ERR(4, 4873, __pyx_L1_error)
        __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_10);
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 4873, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_v_storage_arr = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "pyarrow/array.pxi":4874
 * 
 *         storage_arr = array(obj.view(np.int8), type=int8())
 *         return Bool8Array.from_storage(storage_arr)             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_4 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Bool8Array);
      __Pyx_INCREF(__pyx_t_4);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_storage_arr};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_from_storage, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 4874, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":4839
 *         return ExtensionArray.from_storage(bool8(), storage)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_numpy(obj):
 *         """
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_9);
      __Pyx_XDECREF(__pyx_t_10);
      __Pyx_XDECREF(__pyx_t_11);
      __Pyx_AddTraceback("pyarrow.lib.Bool8Array.from_numpy", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_storage_arr);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":4924
 * 
 * 
 * cdef inline shared_ptr[CBuffer] c_mask_inverted_from_obj(object mask, MemoryPool pool) except *:             # <<<<<<<<<<<<<<
 *     """
 *     Convert mask array obj to c_mask while also inverting to signify 1 for valid and 0 for null
*/

    static CYTHON_INLINE std::shared_ptr< arrow::Buffer>  __pyx_f_7pyarrow_3lib_c_mask_inverted_from_obj(PyObject *__pyx_v_mask, struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_pool) {
      std::shared_ptr< arrow::Buffer>  __pyx_v_c_mask;
      PyObject *__pyx_v_inverted_mask = NULL;
      std::shared_ptr< arrow::Buffer>  __pyx_r;
      __Pyx_RefNannyDeclarations
      int __pyx_t_1;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      size_t __pyx_t_5;
      PyObject *__pyx_t_6 = NULL;
      PyObject *__pyx_t_7 = NULL;
      std::shared_ptr< arrow::Buffer>  __pyx_t_8;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("c_mask_inverted_from_obj", 0);

      /* "pyarrow/array.pxi":4929
 *     """
 *     cdef shared_ptr[CBuffer] c_mask
 *     if mask is None:             # <<<<<<<<<<<<<<
 *         c_mask = shared_ptr[CBuffer]()
 *     elif isinstance(mask, Array):
*/
      __pyx_t_1 = (__pyx_v_mask == Py_None);
      if (__pyx_t_1) {

        /* "pyarrow/array.pxi":4930
 *     cdef shared_ptr[CBuffer] c_mask
 *     if mask is None:
 *         c_mask = shared_ptr[CBuffer]()             # <<<<<<<<<<<<<<
 *     elif isinstance(mask, Array):
 *         if mask.type.id != Type_BOOL:
*/
        __pyx_v_c_mask = std::shared_ptr< arrow::Buffer> ();

        /* "pyarrow/array.pxi":4929
 *     """
 *     cdef shared_ptr[CBuffer] c_mask
 *     if mask is None:             # <<<<<<<<<<<<<<
 *         c_mask = shared_ptr[CBuffer]()
 *     elif isinstance(mask, Array):
*/
        goto __pyx_L3;
      }

      /* "pyarrow/array.pxi":4931
 *     if mask is None:
 *         c_mask = shared_ptr[CBuffer]()
 *     elif isinstance(mask, Array):             # <<<<<<<<<<<<<<
 *         if mask.type.id != Type_BOOL:
 *             raise TypeError('Mask must be a pyarrow.Array of type boolean')
*/
      __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_mask, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array); 
      if (likely(__pyx_t_1)) {

        /* "pyarrow/array.pxi":4932
 *         c_mask = shared_ptr[CBuffer]()
 *     elif isinstance(mask, Array):
 *         if mask.type.id != Type_BOOL:             # <<<<<<<<<<<<<<
 *             raise TypeError('Mask must be a pyarrow.Array of type boolean')
 *         if mask.null_count != 0:
*/
        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_mask, __pyx_mstate_global->__pyx_n_u_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 4932, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_id); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 4932, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Type_BOOL); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 4932, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_t_2, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 4932, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(4, 4932, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(__pyx_t_1)) {

          /* "pyarrow/array.pxi":4933
 *     elif isinstance(mask, Array):
 *         if mask.type.id != Type_BOOL:
 *             raise TypeError('Mask must be a pyarrow.Array of type boolean')             # <<<<<<<<<<<<<<
 *         if mask.null_count != 0:
 *             raise ValueError('Mask must not contain nulls')
*/
          __pyx_t_2 = NULL;
          __pyx_t_5 = 1;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Mask_must_be_a_pyarrow_Array_of};
            __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 4933, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
          }
          __Pyx_Raise(__pyx_t_4, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __PYX_ERR(4, 4933, __pyx_L1_error)

          /* "pyarrow/array.pxi":4932
 *         c_mask = shared_ptr[CBuffer]()
 *     elif isinstance(mask, Array):
 *         if mask.type.id != Type_BOOL:             # <<<<<<<<<<<<<<
 *             raise TypeError('Mask must be a pyarrow.Array of type boolean')
 *         if mask.null_count != 0:
*/
        }

        /* "pyarrow/array.pxi":4934
 *         if mask.type.id != Type_BOOL:
 *             raise TypeError('Mask must be a pyarrow.Array of type boolean')
 *         if mask.null_count != 0:             # <<<<<<<<<<<<<<
 *             raise ValueError('Mask must not contain nulls')
 *         inverted_mask = _pc().invert(mask, memory_pool=pool)
*/
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_mask, __pyx_mstate_global->__pyx_n_u_null_count); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 4934, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_1 = (__Pyx_PyLong_BoolNeObjC(__pyx_t_4, __pyx_mstate_global->__pyx_int_0, 0, 0)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(4, 4934, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(__pyx_t_1)) {

          /* "pyarrow/array.pxi":4935
 *             raise TypeError('Mask must be a pyarrow.Array of type boolean')
 *         if mask.null_count != 0:
 *             raise ValueError('Mask must not contain nulls')             # <<<<<<<<<<<<<<
 *         inverted_mask = _pc().invert(mask, memory_pool=pool)
 *         c_mask = pyarrow_unwrap_buffer(inverted_mask.buffers()[1])
*/
          __pyx_t_2 = NULL;
          __pyx_t_5 = 1;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Mask_must_not_contain_nulls};
            __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 4935, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
          }
          __Pyx_Raise(__pyx_t_4, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __PYX_ERR(4, 4935, __pyx_L1_error)

          /* "pyarrow/array.pxi":4934
 *         if mask.type.id != Type_BOOL:
 *             raise TypeError('Mask must be a pyarrow.Array of type boolean')
 *         if mask.null_count != 0:             # <<<<<<<<<<<<<<
 *             raise ValueError('Mask must not contain nulls')
 *         inverted_mask = _pc().invert(mask, memory_pool=pool)
*/
        }

        /* "pyarrow/array.pxi":4936
 *         if mask.null_count != 0:
 *             raise ValueError('Mask must not contain nulls')
 *         inverted_mask = _pc().invert(mask, memory_pool=pool)             # <<<<<<<<<<<<<<
 *         c_mask = pyarrow_unwrap_buffer(inverted_mask.buffers()[1])
 *     else:
*/
        __pyx_t_6 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_pc_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 4936, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_7))) {
          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
          assert(__pyx_t_6);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
          __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 4936, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        __pyx_t_2 = __pyx_t_3;
        __Pyx_INCREF(__pyx_t_2);
        __pyx_t_5 = 0;
        {
          PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, __pyx_v_mask};
          __pyx_t_7 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 4936, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_memory_pool, ((PyObject *)__pyx_v_pool), __pyx_t_7, __pyx_callargs+2, 0) < (0)) __PYX_ERR(4, 4936, __pyx_L1_error)
          __pyx_t_4 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_invert, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_7);
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 4936, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
        }
        __pyx_v_inverted_mask = __pyx_t_4;
        __pyx_t_4 = 0;

        /* "pyarrow/array.pxi":4937
 *             raise ValueError('Mask must not contain nulls')
 *         inverted_mask = _pc().invert(mask, memory_pool=pool)
 *         c_mask = pyarrow_unwrap_buffer(inverted_mask.buffers()[1])             # <<<<<<<<<<<<<<
 *     else:
 *         raise TypeError('Mask must be a pyarrow.Array of type boolean')
*/
        __pyx_t_3 = __pyx_v_inverted_mask;
        __Pyx_INCREF(__pyx_t_3);
        __pyx_t_5 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
          __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_buffers, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 4937, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
        }
        if (unlikely(__pyx_t_4 == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
          __PYX_ERR(4, 4937, __pyx_L1_error)
        }
        __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_4, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 4937, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_8 = pyarrow_unwrap_buffer(__pyx_t_3); if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 4937, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_v_c_mask = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_8);

        /* "pyarrow/array.pxi":4931
 *     if mask is None:
 *         c_mask = shared_ptr[CBuffer]()
 *     elif isinstance(mask, Array):             # <<<<<<<<<<<<<<
 *         if mask.type.id != Type_BOOL:
 *             raise TypeError('Mask must be a pyarrow.Array of type boolean')
*/
        goto __pyx_L3;
      }

      /* "pyarrow/array.pxi":4939
 *         c_mask = pyarrow_unwrap_buffer(inverted_mask.buffers()[1])
 *     else:
 *         raise TypeError('Mask must be a pyarrow.Array of type boolean')             # <<<<<<<<<<<<<<
 *     return c_mask
 * 
*/
      /*else*/ {
        __pyx_t_4 = NULL;
        __pyx_t_5 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Mask_must_be_a_pyarrow_Array_of};
          __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 4939, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        __Pyx_Raise(__pyx_t_3, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __PYX_ERR(4, 4939, __pyx_L1_error)
      }
      __pyx_L3:;

      /* "pyarrow/array.pxi":4940
 *     else:
 *         raise TypeError('Mask must be a pyarrow.Array of type boolean')
 *     return c_mask             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __pyx_r = __pyx_v_c_mask;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":4924
 * 
 * 
 * cdef inline shared_ptr[CBuffer] c_mask_inverted_from_obj(object mask, MemoryPool pool) except *:             # <<<<<<<<<<<<<<
 *     """
 *     Convert mask array obj to c_mask while also inverting to signify 1 for valid and 0 for null
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_7);
      __Pyx_AddTraceback("pyarrow.lib.c_mask_inverted_from_obj", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_pretend_to_initialize(&__pyx_r);
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_inverted_mask);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":4943
 * 
 * 
 * cdef object get_array_class_from_type(             # <<<<<<<<<<<<<<
 *         const shared_ptr[CDataType]& sp_data_type):
 *     cdef CDataType* data_type = sp_data_type.get()
*/

    static PyObject *__pyx_f_7pyarrow_3lib_get_array_class_from_type(std::shared_ptr< arrow::DataType>  const &__pyx_v_sp_data_type) {
       arrow::DataType *__pyx_v_data_type;
      PyObject *__pyx_v_py_ext_data_type = NULL;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      int __pyx_t_1;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      size_t __pyx_t_4;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("get_array_class_from_type", 0);

      /* "pyarrow/array.pxi":4945
 * cdef object get_array_class_from_type(
 *         const shared_ptr[CDataType]& sp_data_type):
 *     cdef CDataType* data_type = sp_data_type.get()             # <<<<<<<<<<<<<<
 *     if data_type == NULL:
 *         raise ValueError('Array data type was NULL')
*/
      __pyx_v_data_type = __pyx_v_sp_data_type.get();

      /* "pyarrow/array.pxi":4946
 *         const shared_ptr[CDataType]& sp_data_type):
 *     cdef CDataType* data_type = sp_data_type.get()
 *     if data_type == NULL:             # <<<<<<<<<<<<<<
 *         raise ValueError('Array data type was NULL')
 * 
*/
      __pyx_t_1 = (__pyx_v_data_type == NULL);
      if (unlikely(__pyx_t_1)) {

        /* "pyarrow/array.pxi":4947
 *     cdef CDataType* data_type = sp_data_type.get()
 *     if data_type == NULL:
 *         raise ValueError('Array data type was NULL')             # <<<<<<<<<<<<<<
 * 
 *     if data_type.id() == _Type_EXTENSION:
*/
        __pyx_t_3 = NULL;
        __pyx_t_4 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Array_data_type_was_NULL};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 4947, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __Pyx_Raise(__pyx_t_2, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __PYX_ERR(4, 4947, __pyx_L1_error)

        /* "pyarrow/array.pxi":4946
 *         const shared_ptr[CDataType]& sp_data_type):
 *     cdef CDataType* data_type = sp_data_type.get()
 *     if data_type == NULL:             # <<<<<<<<<<<<<<
 *         raise ValueError('Array data type was NULL')
 * 
*/
      }

      /* "pyarrow/array.pxi":4949
 *         raise ValueError('Array data type was NULL')
 * 
 *     if data_type.id() == _Type_EXTENSION:             # <<<<<<<<<<<<<<
 *         py_ext_data_type = pyarrow_wrap_data_type(sp_data_type)
 *         return py_ext_data_type.__arrow_ext_class__()
*/
      __pyx_t_1 = (__pyx_v_data_type->id() ==  arrow::Type::EXTENSION);
      if (__pyx_t_1) {

        /* "pyarrow/array.pxi":4950
 * 
 *     if data_type.id() == _Type_EXTENSION:
 *         py_ext_data_type = pyarrow_wrap_data_type(sp_data_type)             # <<<<<<<<<<<<<<
 *         return py_ext_data_type.__arrow_ext_class__()
 *     else:
*/
        __pyx_t_2 = pyarrow_wrap_data_type(__pyx_v_sp_data_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 4950, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_v_py_ext_data_type = __pyx_t_2;
        __pyx_t_2 = 0;

        /* "pyarrow/array.pxi":4951
 *     if data_type.id() == _Type_EXTENSION:
 *         py_ext_data_type = pyarrow_wrap_data_type(sp_data_type)
 *         return py_ext_data_type.__arrow_ext_class__()             # <<<<<<<<<<<<<<
 *     else:
 *         return _array_classes[data_type.id()]
*/
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __pyx_v_py_ext_data_type;
        __Pyx_INCREF(__pyx_t_3);
        __pyx_t_4 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
          __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_arrow_ext_class, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 4951, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        goto __pyx_L0;

        /* "pyarrow/array.pxi":4949
 *         raise ValueError('Array data type was NULL')
 * 
 *     if data_type.id() == _Type_EXTENSION:             # <<<<<<<<<<<<<<
 *         py_ext_data_type = pyarrow_wrap_data_type(sp_data_type)
 *         return py_ext_data_type.__arrow_ext_class__()
*/
      }

      /* "pyarrow/array.pxi":4953
 *         return py_ext_data_type.__arrow_ext_class__()
 *     else:
 *         return _array_classes[data_type.id()]             # <<<<<<<<<<<<<<
 * 
 * 
*/
      /*else*/ {
        __Pyx_XDECREF(__pyx_r);
        if (unlikely(__pyx_v_7pyarrow_3lib__array_classes == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
          __PYX_ERR(4, 4953, __pyx_L1_error)
        }
        __pyx_t_2 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type(__pyx_v_data_type->id()); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 4953, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_7pyarrow_3lib__array_classes, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 4953, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_3;
        __pyx_t_3 = 0;
        goto __pyx_L0;
      }

      /* "pyarrow/array.pxi":4943
 * 
 * 
 * cdef object get_array_class_from_type(             # <<<<<<<<<<<<<<
 *         const shared_ptr[CDataType]& sp_data_type):
 *     cdef CDataType* data_type = sp_data_type.get()
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_AddTraceback("pyarrow.lib.get_array_class_from_type", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = 0;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_py_ext_data_type);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":4956
 * 
 * 
 * cdef object get_values(object obj, bint* is_series):             # <<<<<<<<<<<<<<
 *     if pandas_api.is_series(obj) or pandas_api.is_index(obj):
 *         result = pandas_api.get_values(obj)
*/

    static PyObject *__pyx_f_7pyarrow_3lib_get_values(PyObject *__pyx_v_obj, int *__pyx_v_is_series) {
      PyObject *__pyx_v_result = NULL;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      int __pyx_t_1;
      PyObject *__pyx_t_2 = NULL;
      int __pyx_t_3;
      PyObject *__pyx_t_4 = NULL;
      size_t __pyx_t_5;
      PyObject *__pyx_t_6 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("get_values", 0);

      /* "pyarrow/array.pxi":4957
 * 
 * cdef object get_values(object obj, bint* is_series):
 *     if pandas_api.is_series(obj) or pandas_api.is_index(obj):             # <<<<<<<<<<<<<<
 *         result = pandas_api.get_values(obj)
 *         is_series[0] = True
*/
      if (unlikely(((PyObject *)__pyx_v_7pyarrow_3lib_pandas_api) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "is_series");
        __PYX_ERR(4, 4957, __pyx_L1_error)
      }
      __pyx_t_2 = ((struct __pyx_vtabstruct_7pyarrow_3lib__PandasAPIShim *)__pyx_v_7pyarrow_3lib_pandas_api->__pyx_vtab)->is_series(__pyx_v_7pyarrow_3lib_pandas_api, __pyx_v_obj, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 4957, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(4, 4957, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (!__pyx_t_3) {
      } else {
        __pyx_t_1 = __pyx_t_3;
        goto __pyx_L4_bool_binop_done;
      }
      if (unlikely(((PyObject *)__pyx_v_7pyarrow_3lib_pandas_api) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "is_index");
        __PYX_ERR(4, 4957, __pyx_L1_error)
      }
      __pyx_t_2 = ((struct __pyx_vtabstruct_7pyarrow_3lib__PandasAPIShim *)__pyx_v_7pyarrow_3lib_pandas_api->__pyx_vtab)->is_index(__pyx_v_7pyarrow_3lib_pandas_api, __pyx_v_obj, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 4957, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(4, 4957, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_1 = __pyx_t_3;
      __pyx_L4_bool_binop_done:;
      if (__pyx_t_1) {

        /* "pyarrow/array.pxi":4958
 * cdef object get_values(object obj, bint* is_series):
 *     if pandas_api.is_series(obj) or pandas_api.is_index(obj):
 *         result = pandas_api.get_values(obj)             # <<<<<<<<<<<<<<
 *         is_series[0] = True
 *     elif isinstance(obj, np.ndarray):
*/
        if (unlikely(((PyObject *)__pyx_v_7pyarrow_3lib_pandas_api) == Py_None)) {
          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get_values");
          __PYX_ERR(4, 4958, __pyx_L1_error)
        }
        __pyx_t_2 = ((struct __pyx_vtabstruct_7pyarrow_3lib__PandasAPIShim *)__pyx_v_7pyarrow_3lib_pandas_api->__pyx_vtab)->get_values(__pyx_v_7pyarrow_3lib_pandas_api, __pyx_v_obj, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 4958, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_v_result = __pyx_t_2;
        __pyx_t_2 = 0;

        /* "pyarrow/array.pxi":4959
 *     if pandas_api.is_series(obj) or pandas_api.is_index(obj):
 *         result = pandas_api.get_values(obj)
 *         is_series[0] = True             # <<<<<<<<<<<<<<
 *     elif isinstance(obj, np.ndarray):
 *         result = obj
*/
        (__pyx_v_is_series[0]) = 1;

        /* "pyarrow/array.pxi":4957
 * 
 * cdef object get_values(object obj, bint* is_series):
 *     if pandas_api.is_series(obj) or pandas_api.is_index(obj):             # <<<<<<<<<<<<<<
 *         result = pandas_api.get_values(obj)
 *         is_series[0] = True
*/
        goto __pyx_L3;
      }

      /* "pyarrow/array.pxi":4960
 *         result = pandas_api.get_values(obj)
 *         is_series[0] = True
 *     elif isinstance(obj, np.ndarray):             # <<<<<<<<<<<<<<
 *         result = obj
 *         is_series[0] = False
*/
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 4960, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_ndarray); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 4960, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_1 = PyObject_IsInstance(__pyx_v_obj, __pyx_t_4); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(4, 4960, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (__pyx_t_1) {

        /* "pyarrow/array.pxi":4961
 *         is_series[0] = True
 *     elif isinstance(obj, np.ndarray):
 *         result = obj             # <<<<<<<<<<<<<<
 *         is_series[0] = False
 *     else:
*/
        __Pyx_INCREF(__pyx_v_obj);
        __pyx_v_result = __pyx_v_obj;

        /* "pyarrow/array.pxi":4962
 *     elif isinstance(obj, np.ndarray):
 *         result = obj
 *         is_series[0] = False             # <<<<<<<<<<<<<<
 *     else:
 *         result = pandas_api.series(obj, copy=False).values
*/
        (__pyx_v_is_series[0]) = 0;

        /* "pyarrow/array.pxi":4960
 *         result = pandas_api.get_values(obj)
 *         is_series[0] = True
 *     elif isinstance(obj, np.ndarray):             # <<<<<<<<<<<<<<
 *         result = obj
 *         is_series[0] = False
*/
        goto __pyx_L3;
      }

      /* "pyarrow/array.pxi":4964
 *         is_series[0] = False
 *     else:
 *         result = pandas_api.series(obj, copy=False).values             # <<<<<<<<<<<<<<
 *         is_series[0] = False
 * 
*/
      /*else*/ {
        __pyx_t_2 = ((PyObject *)__pyx_v_7pyarrow_3lib_pandas_api);
        __Pyx_INCREF(__pyx_t_2);
        __pyx_t_5 = 0;
        {
          PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, __pyx_v_obj};
          __pyx_t_6 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 4964, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_copy, Py_False, __pyx_t_6, __pyx_callargs+2, 0) < (0)) __PYX_ERR(4, 4964, __pyx_L1_error)
          __pyx_t_4 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_series, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_6);
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 4964, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
        }
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_values); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 4964, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_v_result = __pyx_t_6;
        __pyx_t_6 = 0;

        /* "pyarrow/array.pxi":4965
 *     else:
 *         result = pandas_api.series(obj, copy=False).values
 *         is_series[0] = False             # <<<<<<<<<<<<<<
 * 
 *     return result
*/
        (__pyx_v_is_series[0]) = 0;
      }
      __pyx_L3:;

      /* "pyarrow/array.pxi":4967
 *         is_series[0] = False
 * 
 *     return result             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_result);
      __pyx_r = __pyx_v_result;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":4956
 * 
 * 
 * cdef object get_values(object obj, bint* is_series):             # <<<<<<<<<<<<<<
 *     if pandas_api.is_series(obj) or pandas_api.is_index(obj):
 *         result = pandas_api.get_values(obj)
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_AddTraceback("pyarrow.lib.get_values", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = 0;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_result);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":4970
 * 
 * 
 * def concat_arrays(arrays, MemoryPool memory_pool=None):             # <<<<<<<<<<<<<<
 *     """
 *     Concatenate the given arrays.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_211concat_arrays(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_210concat_arrays, "concat_arrays(arrays, MemoryPool memory_pool=None)\n\nConcatenate the given arrays.\n\nThe contents of the input arrays are copied into the returned array.\n\nRaises\n------\nArrowInvalid\n    If not all of the arrays have the same type.\n\nParameters\n----------\narrays : iterable of pyarrow.Array\n    Arrays to concatenate, must be identically typed.\nmemory_pool : MemoryPool, default None\n    For memory allocations. If None, the default pool is used.\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> arr1 = pa.array([2, 4, 5, 100])\n>>> arr2 = pa.array([2, 4])\n>>> pa.concat_arrays([arr1, arr2])\n<pyarrow.lib.Int64Array object at ...>\n[\n  2,\n  4,\n  5,\n  100,\n  2,\n  4\n]");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_211concat_arrays = {"concat_arrays", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_211concat_arrays, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_210concat_arrays};
    static PyObject *__pyx_pw_7pyarrow_3lib_211concat_arrays(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_arrays = 0;
      struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_memory_pool = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[2] = {0,0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("concat_arrays (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_arrays,&__pyx_mstate_global->__pyx_n_u_memory_pool,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(4, 4970, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(4, 4970, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 4970, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "concat_arrays", 0) < (0)) __PYX_ERR(4, 4970, __pyx_L3_error)
          if (!values[1]) values[1] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)Py_None));
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("concat_arrays", 0, 1, 2, i); __PYX_ERR(4, 4970, __pyx_L3_error) }
          }
        } else {
          switch (__pyx_nargs) {
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(4, 4970, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 4970, __pyx_L3_error)
            break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (!values[1]) values[1] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)Py_None));
        }
        __pyx_v_arrays = values[0];
        __pyx_v_memory_pool = ((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)values[1]);
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("concat_arrays", 0, 1, 2, __pyx_nargs); __PYX_ERR(4, 4970, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.concat_arrays", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_memory_pool), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_MemoryPool, 1, "memory_pool", 0))) __PYX_ERR(4, 4970, __pyx_L1_error)
      __pyx_r = __pyx_pf_7pyarrow_3lib_210concat_arrays(__pyx_self, __pyx_v_arrays, __pyx_v_memory_pool);

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = NULL;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      goto __pyx_L7_cleaned_up;
      __pyx_L0:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __pyx_L7_cleaned_up:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_210concat_arrays(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_arrays, struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_memory_pool) {
      std::vector<std::shared_ptr< arrow::Array> >  __pyx_v_c_arrays;
      std::shared_ptr< arrow::Array>  __pyx_v_c_concatenated;
       arrow::MemoryPool *__pyx_v_pool;
      PyObject *__pyx_v_array = NULL;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
       arrow::MemoryPool *__pyx_t_1;
      PyObject *__pyx_t_2 = NULL;
      Py_ssize_t __pyx_t_3;
      PyObject *(*__pyx_t_4)(PyObject *);
      PyObject *__pyx_t_5 = NULL;
      int __pyx_t_6;
      int __pyx_t_7;
      PyObject *__pyx_t_8 = NULL;
      PyObject *__pyx_t_9 = NULL;
      PyObject *__pyx_t_10[3];
      PyObject *__pyx_t_11 = NULL;
      size_t __pyx_t_12;
      std::shared_ptr< arrow::Array>  __pyx_t_13;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("concat_arrays", 0);

      /* "pyarrow/array.pxi":5008
 *         vector[shared_ptr[CArray]] c_arrays
 *         shared_ptr[CArray] c_concatenated
 *         CMemoryPool* pool = maybe_unbox_memory_pool(memory_pool)             # <<<<<<<<<<<<<<
 * 
 *     for array in arrays:
*/
      __pyx_t_1 = __pyx_f_7pyarrow_3lib_maybe_unbox_memory_pool(__pyx_v_memory_pool); if (unlikely(__pyx_t_1 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(4, 5008, __pyx_L1_error)
      __pyx_v_pool = __pyx_t_1;

      /* "pyarrow/array.pxi":5010
 *         CMemoryPool* pool = maybe_unbox_memory_pool(memory_pool)
 * 
 *     for array in arrays:             # <<<<<<<<<<<<<<
 *         if not isinstance(array, Array):
 *             raise TypeError("Iterable should contain Array objects, "
*/
      if (likely(PyList_CheckExact(__pyx_v_arrays)) || PyTuple_CheckExact(__pyx_v_arrays)) {
        __pyx_t_2 = __pyx_v_arrays; __Pyx_INCREF(__pyx_t_2);
        __pyx_t_3 = 0;
        __pyx_t_4 = NULL;
      } else {
        __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_arrays); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 5010, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_4 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 5010, __pyx_L1_error)
      }
      for (;;) {
        if (likely(!__pyx_t_4)) {
          if (likely(PyList_CheckExact(__pyx_t_2))) {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2);
              #if !CYTHON_ASSUME_SAFE_SIZE
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(4, 5010, __pyx_L1_error)
              #endif
              if (__pyx_t_3 >= __pyx_temp) break;
            }
            __pyx_t_5 = __Pyx_PyList_GetItemRefFast(__pyx_t_2, __pyx_t_3, __Pyx_ReferenceSharing_OwnStrongReference);
            ++__pyx_t_3;
          } else {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2);
              #if !CYTHON_ASSUME_SAFE_SIZE
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(4, 5010, __pyx_L1_error)
              #endif
              if (__pyx_t_3 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_5 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3));
            #else
            __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_3);
            #endif
            ++__pyx_t_3;
          }
          if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 5010, __pyx_L1_error)
        } else {
          __pyx_t_5 = __pyx_t_4(__pyx_t_2);
          if (unlikely(!__pyx_t_5)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(4, 5010, __pyx_L1_error)
              PyErr_Clear();
            }
            break;
          }
        }
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_XDECREF_SET(__pyx_v_array, __pyx_t_5);
        __pyx_t_5 = 0;

        /* "pyarrow/array.pxi":5011
 * 
 *     for array in arrays:
 *         if not isinstance(array, Array):             # <<<<<<<<<<<<<<
 *             raise TypeError("Iterable should contain Array objects, "
 *                             f"got {type(array)} instead")
*/
        __pyx_t_6 = __Pyx_TypeCheck(__pyx_v_array, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array); 
        __pyx_t_7 = (!__pyx_t_6);
        if (unlikely(__pyx_t_7)) {

          /* "pyarrow/array.pxi":5012
 *     for array in arrays:
 *         if not isinstance(array, Array):
 *             raise TypeError("Iterable should contain Array objects, "             # <<<<<<<<<<<<<<
 *                             f"got {type(array)} instead")
 *         c_arrays.push_back(pyarrow_unwrap_array(array))
*/
          __pyx_t_8 = NULL;

          /* "pyarrow/array.pxi":5013
 *         if not isinstance(array, Array):
 *             raise TypeError("Iterable should contain Array objects, "
 *                             f"got {type(array)} instead")             # <<<<<<<<<<<<<<
 *         c_arrays.push_back(pyarrow_unwrap_array(array))
 * 
*/
          __pyx_t_9 = __Pyx_PyObject_FormatSimple(((PyObject *)Py_TYPE(__pyx_v_array)), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(4, 5013, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
          __pyx_t_10[0] = __pyx_mstate_global->__pyx_kp_u_Iterable_should_contain_Array_ob;
          __pyx_t_10[1] = __pyx_t_9;
          __pyx_t_10[2] = __pyx_mstate_global->__pyx_kp_u_instead;

          /* "pyarrow/array.pxi":5012
 *     for array in arrays:
 *         if not isinstance(array, Array):
 *             raise TypeError("Iterable should contain Array objects, "             # <<<<<<<<<<<<<<
 *                             f"got {type(array)} instead")
 *         c_arrays.push_back(pyarrow_unwrap_array(array))
*/
          __pyx_t_11 = __Pyx_PyUnicode_Join(__pyx_t_10, 3, 43 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9) + 8, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9));
          if (unlikely(!__pyx_t_11)) __PYX_ERR(4, 5012, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_11);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          __pyx_t_12 = 1;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_11};
            __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
            if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 5012, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
          }
          __Pyx_Raise(__pyx_t_5, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __PYX_ERR(4, 5012, __pyx_L1_error)

          /* "pyarrow/array.pxi":5011
 * 
 *     for array in arrays:
 *         if not isinstance(array, Array):             # <<<<<<<<<<<<<<
 *             raise TypeError("Iterable should contain Array objects, "
 *                             f"got {type(array)} instead")
*/
        }

        /* "pyarrow/array.pxi":5014
 *             raise TypeError("Iterable should contain Array objects, "
 *                             f"got {type(array)} instead")
 *         c_arrays.push_back(pyarrow_unwrap_array(array))             # <<<<<<<<<<<<<<
 * 
 *     with nogil:
*/
        __pyx_t_13 = pyarrow_unwrap_array(__pyx_v_array); if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 5014, __pyx_L1_error)
        try {
          __pyx_v_c_arrays.push_back(__pyx_t_13);
        } catch(...) {
          __Pyx_CppExn2PyErr();
          __PYX_ERR(4, 5014, __pyx_L1_error)
        }

        /* "pyarrow/array.pxi":5010
 *         CMemoryPool* pool = maybe_unbox_memory_pool(memory_pool)
 * 
 *     for array in arrays:             # <<<<<<<<<<<<<<
 *         if not isinstance(array, Array):
 *             raise TypeError("Iterable should contain Array objects, "
*/
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyarrow/array.pxi":5016
 *         c_arrays.push_back(pyarrow_unwrap_array(array))
 * 
 *     with nogil:             # <<<<<<<<<<<<<<
 *         c_concatenated = GetResultValue(Concatenate(c_arrays, pool))
 * 
*/
      {
          PyThreadState * _save;
          _save = PyEval_SaveThread();
          __Pyx_FastGIL_Remember();
          /*try:*/ {

            /* "pyarrow/array.pxi":5017
 * 
 *     with nogil:
 *         c_concatenated = GetResultValue(Concatenate(c_arrays, pool))             # <<<<<<<<<<<<<<
 * 
 *     return pyarrow_wrap_array(c_concatenated)
*/
            __pyx_t_13 = arrow::py::GetResultValue<std::shared_ptr< arrow::Array> >(arrow::Concatenate(__pyx_v_c_arrays, __pyx_v_pool)); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(4, 5017, __pyx_L8_error)
            __pyx_v_c_concatenated = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_13);
          }

          /* "pyarrow/array.pxi":5016
 *         c_arrays.push_back(pyarrow_unwrap_array(array))
 * 
 *     with nogil:             # <<<<<<<<<<<<<<
 *         c_concatenated = GetResultValue(Concatenate(c_arrays, pool))
 * 
*/
          /*finally:*/ {
            /*normal exit:*/{
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L9;
            }
            __pyx_L8_error: {
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L1_error;
            }
            __pyx_L9:;
          }
      }

      /* "pyarrow/array.pxi":5019
 *         c_concatenated = GetResultValue(Concatenate(c_arrays, pool))
 * 
 *     return pyarrow_wrap_array(c_concatenated)             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = pyarrow_wrap_array(__pyx_v_c_concatenated); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 5019, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":4970
 * 
 * 
 * def concat_arrays(arrays, MemoryPool memory_pool=None):             # <<<<<<<<<<<<<<
 *     """
 *     Concatenate the given arrays.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_8);
      __Pyx_XDECREF(__pyx_t_9);
      __Pyx_XDECREF(__pyx_t_11);
      __Pyx_AddTraceback("pyarrow.lib.concat_arrays", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_array);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/array.pxi":5022
 * 
 * 
 * def _empty_array(DataType type):             # <<<<<<<<<<<<<<
 *     """
 *     Create empty array of the given type.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_213_empty_array(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_212_empty_array, "_empty_array(DataType type)\n\nCreate empty array of the given type.");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_213_empty_array = {"_empty_array", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_213_empty_array, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_212_empty_array};
    static PyObject *__pyx_pw_7pyarrow_3lib_213_empty_array(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v_type = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("_empty_array (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_type,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(4, 5022, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 5022, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_empty_array", 0) < (0)) __PYX_ERR(4, 5022, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_empty_array", 1, 1, 1, i); __PYX_ERR(4, 5022, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 1)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 5022, __pyx_L3_error)
        }
        __pyx_v_type = ((struct __pyx_obj_7pyarrow_3lib_DataType *)values[0]);
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("_empty_array", 1, 1, 1, __pyx_nargs); __PYX_ERR(4, 5022, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib._empty_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_type), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType, 1, "type", 0))) __PYX_ERR(4, 5022, __pyx_L1_error)
      __pyx_r = __pyx_pf_7pyarrow_3lib_212_empty_array(__pyx_self, __pyx_v_type);

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = NULL;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      goto __pyx_L7_cleaned_up;
      __pyx_L0:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __pyx_L7_cleaned_up:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_212_empty_array(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v_type) {
      PyObject *__pyx_v_arr = NULL;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      int __pyx_t_4;
      PyObject *__pyx_t_5 = NULL;
      PyObject *__pyx_t_6 = NULL;
      PyObject *__pyx_t_7 = NULL;
      size_t __pyx_t_8;
      PyObject *__pyx_t_9 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("_empty_array", 0);

      /* "pyarrow/array.pxi":5026
 *     Create empty array of the given type.
 *     """
 *     if type.id == Type_DICTIONARY:             # <<<<<<<<<<<<<<
 *         arr = DictionaryArray.from_arrays(
 *             _empty_array(type.index_type), _empty_array(type.value_type),
*/
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_type), __pyx_mstate_global->__pyx_n_u_id); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 5026, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Type_DICTIONARY); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 5026, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 5026, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(4, 5026, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_4) {

        /* "pyarrow/array.pxi":5027
 *     """
 *     if type.id == Type_DICTIONARY:
 *         arr = DictionaryArray.from_arrays(             # <<<<<<<<<<<<<<
 *             _empty_array(type.index_type), _empty_array(type.value_type),
 *             ordered=type.ordered)
*/
        __pyx_t_2 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DictionaryArray);
        __Pyx_INCREF(__pyx_t_2);

        /* "pyarrow/array.pxi":5028
 *     if type.id == Type_DICTIONARY:
 *         arr = DictionaryArray.from_arrays(
 *             _empty_array(type.index_type), _empty_array(type.value_type),             # <<<<<<<<<<<<<<
 *             ordered=type.ordered)
 *     else:
*/
        __pyx_t_5 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_empty_array); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 5028, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_type), __pyx_mstate_global->__pyx_n_u_index_type); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 5028, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_8 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_6))) {
          __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
          assert(__pyx_t_5);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
          __pyx_t_8 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_7};
          __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 5028, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
        }
        __pyx_t_7 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_empty_array); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 5028, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_type), __pyx_mstate_global->__pyx_n_u_value_type); if (unlikely(!__pyx_t_9)) __PYX_ERR(4, 5028, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_8 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
          assert(__pyx_t_7);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_7);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
          __pyx_t_8 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_9};
          __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 5028, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
        }

        /* "pyarrow/array.pxi":5029
 *         arr = DictionaryArray.from_arrays(
 *             _empty_array(type.index_type), _empty_array(type.value_type),
 *             ordered=type.ordered)             # <<<<<<<<<<<<<<
 *     else:
 *         arr = array([], type=type)
*/
        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_type), __pyx_mstate_global->__pyx_n_u_ordered); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 5029, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_8 = 0;
        {
          PyObject *__pyx_callargs[3 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, __pyx_t_1, __pyx_t_6};
          __pyx_t_9 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(4, 5027, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_ordered, __pyx_t_5, __pyx_t_9, __pyx_callargs+3, 0) < (0)) __PYX_ERR(4, 5027, __pyx_L1_error)
          __pyx_t_3 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_from_arrays, __pyx_callargs+__pyx_t_8, (3-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_9);
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 5027, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        __pyx_v_arr = __pyx_t_3;
        __pyx_t_3 = 0;

        /* "pyarrow/array.pxi":5026
 *     Create empty array of the given type.
 *     """
 *     if type.id == Type_DICTIONARY:             # <<<<<<<<<<<<<<
 *         arr = DictionaryArray.from_arrays(
 *             _empty_array(type.index_type), _empty_array(type.value_type),
*/
        goto __pyx_L3;
      }

      /* "pyarrow/array.pxi":5031
 *             ordered=type.ordered)
 *     else:
 *         arr = array([], type=type)             # <<<<<<<<<<<<<<
 *     return arr
*/
      /*else*/ {
        __pyx_t_9 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_array); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 5031, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 5031, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_8 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_5);
          assert(__pyx_t_9);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_9);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
          __pyx_t_8 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_9, __pyx_t_6};
          __pyx_t_1 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 5031, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_type, ((PyObject *)__pyx_v_type), __pyx_t_1, __pyx_callargs+2, 0) < (0)) __PYX_ERR(4, 5031, __pyx_L1_error)
          __pyx_t_3 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_1);
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 5031, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        __pyx_v_arr = __pyx_t_3;
        __pyx_t_3 = 0;
      }
      __pyx_L3:;

      /* "pyarrow/array.pxi":5032
 *     else:
 *         arr = array([], type=type)
 *     return arr             # <<<<<<<<<<<<<<
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_arr);
      __pyx_r = __pyx_v_arr;
      goto __pyx_L0;

      /* "pyarrow/array.pxi":5022
 * 
 * 
 * def _empty_array(DataType type):             # <<<<<<<<<<<<<<
 *     """
 *     Create empty array of the given type.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_9);
      __Pyx_AddTraceback("pyarrow.lib._empty_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_arr);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/builder.pxi":31
 *         unique_ptr[CStringBuilder] builder
 * 
 *     def __cinit__(self, MemoryPool memory_pool=None):             # <<<<<<<<<<<<<<
 *         cdef CMemoryPool* pool = maybe_unbox_memory_pool(memory_pool)
 *         self.builder.reset(new CStringBuilder(pool))
*/

    /* Python wrapper */
    static int __pyx_pw_7pyarrow_3lib_13StringBuilder_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
    static int __pyx_pw_7pyarrow_3lib_13StringBuilder_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
      struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_memory_pool = 0;
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      int __pyx_r;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
      #endif
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_memory_pool,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(16, 31, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(16, 31, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__cinit__", 0) < (0)) __PYX_ERR(16, 31, __pyx_L3_error)
          if (!values[0]) values[0] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)Py_None));
        } else {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(16, 31, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (!values[0]) values[0] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)Py_None));
        }
        __pyx_v_memory_pool = ((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)values[0]);
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 1, __pyx_nargs); __PYX_ERR(16, 31, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.StringBuilder.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return -1;
      __pyx_L4_argument_unpacking_done:;
      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_memory_pool), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_MemoryPool, 1, "memory_pool", 0))) __PYX_ERR(16, 31, __pyx_L1_error)
      __pyx_r = __pyx_pf_7pyarrow_3lib_13StringBuilder___cinit__(((struct __pyx_obj_7pyarrow_3lib_StringBuilder *)__pyx_v_self), __pyx_v_memory_pool);

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = -1;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      goto __pyx_L7_cleaned_up;
      __pyx_L0:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __pyx_L7_cleaned_up:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static int __pyx_pf_7pyarrow_3lib_13StringBuilder___cinit__(struct __pyx_obj_7pyarrow_3lib_StringBuilder *__pyx_v_self, struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_memory_pool) {
       arrow::MemoryPool *__pyx_v_pool;
      int __pyx_r;
       arrow::MemoryPool *__pyx_t_1;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;

      /* "pyarrow/builder.pxi":32
 * 
 *     def __cinit__(self, MemoryPool memory_pool=None):
 *         cdef CMemoryPool* pool = maybe_unbox_memory_pool(memory_pool)             # <<<<<<<<<<<<<<
 *         self.builder.reset(new CStringBuilder(pool))
 * 
*/
      __pyx_t_1 = __pyx_f_7pyarrow_3lib_maybe_unbox_memory_pool(__pyx_v_memory_pool); if (unlikely(__pyx_t_1 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(16, 32, __pyx_L1_error)
      __pyx_v_pool = __pyx_t_1;

      /* "pyarrow/builder.pxi":33
 *     def __cinit__(self, MemoryPool memory_pool=None):
 *         cdef CMemoryPool* pool = maybe_unbox_memory_pool(memory_pool)
 *         self.builder.reset(new CStringBuilder(pool))             # <<<<<<<<<<<<<<
 * 
 *     def append(self, value):
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "builder");
        __PYX_ERR(16, 33, __pyx_L1_error)
      }
      __pyx_v_self->builder.reset(new  arrow::StringBuilder(__pyx_v_pool));

      /* "pyarrow/builder.pxi":31
 *         unique_ptr[CStringBuilder] builder
 * 
 *     def __cinit__(self, MemoryPool memory_pool=None):             # <<<<<<<<<<<<<<
 *         cdef CMemoryPool* pool = maybe_unbox_memory_pool(memory_pool)
 *         self.builder.reset(new CStringBuilder(pool))
*/

      /* function exit code */
      __pyx_r = 0;
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_AddTraceback("pyarrow.lib.StringBuilder.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = -1;
      __pyx_L0:;
      return __pyx_r;
    }

    /* "pyarrow/builder.pxi":35
 *         self.builder.reset(new CStringBuilder(pool))
 * 
 *     def append(self, value):             # <<<<<<<<<<<<<<
 *         """
 *         Append a single value to the builder.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_13StringBuilder_3append(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_13StringBuilder_2append, "StringBuilder.append(self, value)\n\nAppend a single value to the builder.\n\nThe value can either be a string/bytes object or a null value\n(np.nan or None).\n\nParameters\n----------\nvalue : string/bytes or np.nan/None\n    The value to append to the string array builder.");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_13StringBuilder_3append = {"append", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_13StringBuilder_3append, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_13StringBuilder_2append};
    static PyObject *__pyx_pw_7pyarrow_3lib_13StringBuilder_3append(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_value = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("append (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_value,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(16, 35, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(16, 35, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "append", 0) < (0)) __PYX_ERR(16, 35, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("append", 1, 1, 1, i); __PYX_ERR(16, 35, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 1)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(16, 35, __pyx_L3_error)
        }
        __pyx_v_value = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("append", 1, 1, 1, __pyx_nargs); __PYX_ERR(16, 35, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.StringBuilder.append", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_13StringBuilder_2append(((struct __pyx_obj_7pyarrow_3lib_StringBuilder *)__pyx_v_self), __pyx_v_value);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_13StringBuilder_2append(struct __pyx_obj_7pyarrow_3lib_StringBuilder *__pyx_v_self, PyObject *__pyx_v_value) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      int __pyx_t_1;
      int __pyx_t_2;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      PyObject *__pyx_t_5 = NULL;
      size_t __pyx_t_6;
      std::string __pyx_t_7;
      PyObject *__pyx_t_8 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("append", 0);

      /* "pyarrow/builder.pxi":47
 *             The value to append to the string array builder.
 *         """
 *         if isinstance(value, (bytes, str)):             # <<<<<<<<<<<<<<
 *             self.builder.get().Append(tobytes(value))
 *         elif value is None or math.isnan(value):
*/
      __pyx_t_2 = PyBytes_Check(__pyx_v_value); 
      if (!__pyx_t_2) {
      } else {
        __pyx_t_1 = __pyx_t_2;
        goto __pyx_L4_bool_binop_done;
      }
      __pyx_t_2 = PyUnicode_Check(__pyx_v_value); 
      __pyx_t_1 = __pyx_t_2;
      __pyx_L4_bool_binop_done:;
      if (__pyx_t_1) {

        /* "pyarrow/builder.pxi":48
 *         """
 *         if isinstance(value, (bytes, str)):
 *             self.builder.get().Append(tobytes(value))             # <<<<<<<<<<<<<<
 *         elif value is None or math.isnan(value):
 *             self.builder.get().AppendNull()
*/
        if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "builder");
          __PYX_ERR(16, 48, __pyx_L1_error)
        }
        __pyx_t_4 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_tobytes); if (unlikely(!__pyx_t_5)) __PYX_ERR(16, 48, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_6 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
          assert(__pyx_t_4);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
          __pyx_t_6 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_value};
          __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 48, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        __pyx_t_7 = __pyx_convert_string_from_py_6libcpp_6string_std__in_string(__pyx_t_3); if (unlikely(PyErr_Occurred())) __PYX_ERR(16, 48, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        (void)(__pyx_v_self->builder.get()->Append(__pyx_t_7));

        /* "pyarrow/builder.pxi":47
 *             The value to append to the string array builder.
 *         """
 *         if isinstance(value, (bytes, str)):             # <<<<<<<<<<<<<<
 *             self.builder.get().Append(tobytes(value))
 *         elif value is None or math.isnan(value):
*/
        goto __pyx_L3;
      }

      /* "pyarrow/builder.pxi":49
 *         if isinstance(value, (bytes, str)):
 *             self.builder.get().Append(tobytes(value))
 *         elif value is None or math.isnan(value):             # <<<<<<<<<<<<<<
 *             self.builder.get().AppendNull()
 *         else:
*/
      __pyx_t_2 = (__pyx_v_value == Py_None);
      if (!__pyx_t_2) {
      } else {
        __pyx_t_1 = __pyx_t_2;
        goto __pyx_L6_bool_binop_done;
      }
      __pyx_t_5 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_math); if (unlikely(!__pyx_t_4)) __PYX_ERR(16, 49, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_isnan); if (unlikely(!__pyx_t_8)) __PYX_ERR(16, 49, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_6 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_8))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_8);
        assert(__pyx_t_5);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_8, __pyx__function);
        __pyx_t_6 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_value};
        __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 49, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(16, 49, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_1 = __pyx_t_2;
      __pyx_L6_bool_binop_done:;
      if (likely(__pyx_t_1)) {

        /* "pyarrow/builder.pxi":50
 *             self.builder.get().Append(tobytes(value))
 *         elif value is None or math.isnan(value):
 *             self.builder.get().AppendNull()             # <<<<<<<<<<<<<<
 *         else:
 *             raise TypeError('StringBuilder only accepts string objects')
*/
        if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "builder");
          __PYX_ERR(16, 50, __pyx_L1_error)
        }
        (void)(__pyx_v_self->builder.get()->AppendNull());

        /* "pyarrow/builder.pxi":49
 *         if isinstance(value, (bytes, str)):
 *             self.builder.get().Append(tobytes(value))
 *         elif value is None or math.isnan(value):             # <<<<<<<<<<<<<<
 *             self.builder.get().AppendNull()
 *         else:
*/
        goto __pyx_L3;
      }

      /* "pyarrow/builder.pxi":52
 *             self.builder.get().AppendNull()
 *         else:
 *             raise TypeError('StringBuilder only accepts string objects')             # <<<<<<<<<<<<<<
 * 
 *     def append_values(self, values):
*/
      /*else*/ {
        __pyx_t_8 = NULL;
        __pyx_t_6 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_mstate_global->__pyx_kp_u_StringBuilder_only_accepts_strin};
          __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 52, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        __Pyx_Raise(__pyx_t_3, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __PYX_ERR(16, 52, __pyx_L1_error)
      }
      __pyx_L3:;

      /* "pyarrow/builder.pxi":35
 *         self.builder.reset(new CStringBuilder(pool))
 * 
 *     def append(self, value):             # <<<<<<<<<<<<<<
 *         """
 *         Append a single value to the builder.
*/

      /* function exit code */
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_8);
      __Pyx_AddTraceback("pyarrow.lib.StringBuilder.append", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/builder.pxi":54
 *             raise TypeError('StringBuilder only accepts string objects')
 * 
 *     def append_values(self, values):             # <<<<<<<<<<<<<<
 *         """
 *         Append all the values from an iterable.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_13StringBuilder_5append_values(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_13StringBuilder_4append_values, "StringBuilder.append_values(self, values)\n\nAppend all the values from an iterable.\n\nParameters\n----------\nvalues : iterable of string/bytes or np.nan/None values\n    The values to append to the string array builder.");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_13StringBuilder_5append_values = {"append_values", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_13StringBuilder_5append_values, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_13StringBuilder_4append_values};
    static PyObject *__pyx_pw_7pyarrow_3lib_13StringBuilder_5append_values(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_values = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("append_values (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_values,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(16, 54, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(16, 54, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "append_values", 0) < (0)) __PYX_ERR(16, 54, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("append_values", 1, 1, 1, i); __PYX_ERR(16, 54, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 1)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(16, 54, __pyx_L3_error)
        }
        __pyx_v_values = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("append_values", 1, 1, 1, __pyx_nargs); __PYX_ERR(16, 54, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.StringBuilder.append_values", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_13StringBuilder_4append_values(((struct __pyx_obj_7pyarrow_3lib_StringBuilder *)__pyx_v_self), __pyx_v_values);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_13StringBuilder_4append_values(struct __pyx_obj_7pyarrow_3lib_StringBuilder *__pyx_v_self, PyObject *__pyx_v_values) {
      PyObject *__pyx_v_value = NULL;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      Py_ssize_t __pyx_t_2;
      PyObject *(*__pyx_t_3)(PyObject *);
      PyObject *__pyx_t_4 = NULL;
      int __pyx_t_5;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("append_values", 0);

      /* "pyarrow/builder.pxi":63
 *             The values to append to the string array builder.
 *         """
 *         for value in values:             # <<<<<<<<<<<<<<
 *             self.append(value)
 * 
*/
      if (likely(PyList_CheckExact(__pyx_v_values)) || PyTuple_CheckExact(__pyx_v_values)) {
        __pyx_t_1 = __pyx_v_values; __Pyx_INCREF(__pyx_t_1);
        __pyx_t_2 = 0;
        __pyx_t_3 = NULL;
      } else {
        __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_values); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 63, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_3 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 63, __pyx_L1_error)
      }
      for (;;) {
        if (likely(!__pyx_t_3)) {
          if (likely(PyList_CheckExact(__pyx_t_1))) {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
              #if !CYTHON_ASSUME_SAFE_SIZE
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(16, 63, __pyx_L1_error)
              #endif
              if (__pyx_t_2 >= __pyx_temp) break;
            }
            __pyx_t_4 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_2, __Pyx_ReferenceSharing_OwnStrongReference);
            ++__pyx_t_2;
          } else {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
              #if !CYTHON_ASSUME_SAFE_SIZE
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(16, 63, __pyx_L1_error)
              #endif
              if (__pyx_t_2 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_4 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2));
            #else
            __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2);
            #endif
            ++__pyx_t_2;
          }
          if (unlikely(!__pyx_t_4)) __PYX_ERR(16, 63, __pyx_L1_error)
        } else {
          __pyx_t_4 = __pyx_t_3(__pyx_t_1);
          if (unlikely(!__pyx_t_4)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(16, 63, __pyx_L1_error)
              PyErr_Clear();
            }
            break;
          }
        }
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_4);
        __pyx_t_4 = 0;

        /* "pyarrow/builder.pxi":64
 *         """
 *         for value in values:
 *             self.append(value)             # <<<<<<<<<<<<<<
 * 
 *     def finish(self):
*/
        __pyx_t_5 = __Pyx_PyObject_Append(((PyObject *)__pyx_v_self), __pyx_v_value); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(16, 64, __pyx_L1_error)

        /* "pyarrow/builder.pxi":63
 *             The values to append to the string array builder.
 *         """
 *         for value in values:             # <<<<<<<<<<<<<<
 *             self.append(value)
 * 
*/
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "pyarrow/builder.pxi":54
 *             raise TypeError('StringBuilder only accepts string objects')
 * 
 *     def append_values(self, values):             # <<<<<<<<<<<<<<
 *         """
 *         Append all the values from an iterable.
*/

      /* 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_AddTraceback("pyarrow.lib.StringBuilder.append_values", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_value);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/builder.pxi":66
 *             self.append(value)
 * 
 *     def finish(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return result of builder as an Array object; also resets the builder.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_13StringBuilder_7finish(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_13StringBuilder_6finish, "StringBuilder.finish(self)\n\nReturn result of builder as an Array object; also resets the builder.\n\nReturns\n-------\narray : pyarrow.Array");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_13StringBuilder_7finish = {"finish", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_13StringBuilder_7finish, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_13StringBuilder_6finish};
    static PyObject *__pyx_pw_7pyarrow_3lib_13StringBuilder_7finish(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("finish (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("finish", 1, 0, 0, __pyx_nargs); return NULL; }
      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
      if (unlikely(__pyx_kwds_len < 0)) return NULL;
      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("finish", __pyx_kwds); return NULL;}
      __pyx_r = __pyx_pf_7pyarrow_3lib_13StringBuilder_6finish(((struct __pyx_obj_7pyarrow_3lib_StringBuilder *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_13StringBuilder_6finish(struct __pyx_obj_7pyarrow_3lib_StringBuilder *__pyx_v_self) {
      std::shared_ptr< arrow::Array>  __pyx_v_out;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("finish", 0);

      /* "pyarrow/builder.pxi":75
 *         """
 *         cdef shared_ptr[CArray] out
 *         with nogil:             # <<<<<<<<<<<<<<
 *             self.builder.get().Finish(&out)
 *         return pyarrow_wrap_array(out)
*/
      {
          PyThreadState * _save;
          _save = PyEval_SaveThread();
          __Pyx_FastGIL_Remember();
          /*try:*/ {

            /* "pyarrow/builder.pxi":76
 *         cdef shared_ptr[CArray] out
 *         with nogil:
 *             self.builder.get().Finish(&out)             # <<<<<<<<<<<<<<
 *         return pyarrow_wrap_array(out)
 * 
*/
            if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
              PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "builder");
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              __PYX_ERR(16, 76, __pyx_L4_error)
            }
            (void)(__pyx_v_self->builder.get()->Finish((&__pyx_v_out)));
          }

          /* "pyarrow/builder.pxi":75
 *         """
 *         cdef shared_ptr[CArray] out
 *         with nogil:             # <<<<<<<<<<<<<<
 *             self.builder.get().Finish(&out)
 *         return pyarrow_wrap_array(out)
*/
          /*finally:*/ {
            /*normal exit:*/{
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L5;
            }
            __pyx_L4_error: {
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L1_error;
            }
            __pyx_L5:;
          }
      }

      /* "pyarrow/builder.pxi":77
 *         with nogil:
 *             self.builder.get().Finish(&out)
 *         return pyarrow_wrap_array(out)             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = pyarrow_wrap_array(__pyx_v_out); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 77, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/builder.pxi":66
 *             self.append(value)
 * 
 *     def finish(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return result of builder as an Array object; also resets the builder.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("pyarrow.lib.StringBuilder.finish", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/builder.pxi":79
 *         return pyarrow_wrap_array(out)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def null_count(self):
 *         return self.builder.get().null_count()
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_13StringBuilder_10null_count_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_13StringBuilder_10null_count_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_13StringBuilder_10null_count___get__(((struct __pyx_obj_7pyarrow_3lib_StringBuilder *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_13StringBuilder_10null_count___get__(struct __pyx_obj_7pyarrow_3lib_StringBuilder *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__get__", 0);

      /* "pyarrow/builder.pxi":81
 *     @property
 *     def null_count(self):
 *         return self.builder.get().null_count()             # <<<<<<<<<<<<<<
 * 
 *     def __len__(self):
*/
      __Pyx_XDECREF(__pyx_r);
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "builder");
        __PYX_ERR(16, 81, __pyx_L1_error)
      }
      __pyx_t_1 = __Pyx_PyLong_From_int64_t(__pyx_v_self->builder.get()->null_count()); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 81, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/builder.pxi":79
 *         return pyarrow_wrap_array(out)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def null_count(self):
 *         return self.builder.get().null_count()
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("pyarrow.lib.StringBuilder.null_count.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/builder.pxi":83
 *         return self.builder.get().null_count()
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self.builder.get().length()
 * 
*/

    /* Python wrapper */
    static Py_ssize_t __pyx_pw_7pyarrow_3lib_13StringBuilder_9__len__(PyObject *__pyx_v_self); /*proto*/
    static Py_ssize_t __pyx_pw_7pyarrow_3lib_13StringBuilder_9__len__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      Py_ssize_t __pyx_r;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_13StringBuilder_8__len__(((struct __pyx_obj_7pyarrow_3lib_StringBuilder *)__pyx_v_self));

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

    static Py_ssize_t __pyx_pf_7pyarrow_3lib_13StringBuilder_8__len__(struct __pyx_obj_7pyarrow_3lib_StringBuilder *__pyx_v_self) {
      Py_ssize_t __pyx_r;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;

      /* "pyarrow/builder.pxi":84
 * 
 *     def __len__(self):
 *         return self.builder.get().length()             # <<<<<<<<<<<<<<
 * 
 * 
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "builder");
        __PYX_ERR(16, 84, __pyx_L1_error)
      }
      __pyx_r = __pyx_v_self->builder.get()->length();
      goto __pyx_L0;

      /* "pyarrow/builder.pxi":83
 *         return self.builder.get().null_count()
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self.builder.get().length()
 * 
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_AddTraceback("pyarrow.lib.StringBuilder.__len__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = -1;
      __pyx_L0:;
      return __pyx_r;
    }

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

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_13StringBuilder_11__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_13StringBuilder_10__reduce_cython__, "StringBuilder.__reduce_cython__(self)");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_13StringBuilder_11__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_13StringBuilder_11__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_13StringBuilder_10__reduce_cython__};
    static PyObject *__pyx_pw_7pyarrow_3lib_13StringBuilder_11__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; }
      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
      if (unlikely(__pyx_kwds_len < 0)) return NULL;
      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;}
      __pyx_r = __pyx_pf_7pyarrow_3lib_13StringBuilder_10__reduce_cython__(((struct __pyx_obj_7pyarrow_3lib_StringBuilder *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_13StringBuilder_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_StringBuilder *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__reduce_cython__", 0);

      /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0);
      __PYX_ERR(7, 2, __pyx_L1_error)

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

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_AddTraceback("pyarrow.lib.StringBuilder.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

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

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_13StringBuilder_13__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_13StringBuilder_12__setstate_cython__, "StringBuilder.__setstate_cython__(self, __pyx_state)");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_13StringBuilder_13__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_13StringBuilder_13__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_13StringBuilder_12__setstate_cython__};
    static PyObject *__pyx_pw_7pyarrow_3lib_13StringBuilder_13__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(7, 3, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(7, 3, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(7, 3, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(7, 3, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 1)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(7, 3, __pyx_L3_error)
        }
        __pyx_v___pyx_state = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(7, 3, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.StringBuilder.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_13StringBuilder_12__setstate_cython__(((struct __pyx_obj_7pyarrow_3lib_StringBuilder *)__pyx_v_self), __pyx_v___pyx_state);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

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

      /* "(tree fragment)":4
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
*/
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0);
      __PYX_ERR(7, 4, __pyx_L1_error)

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

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_AddTraceback("pyarrow.lib.StringBuilder.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/builder.pxi":97
 *         unique_ptr[CStringViewBuilder] builder
 * 
 *     def __cinit__(self, MemoryPool memory_pool=None):             # <<<<<<<<<<<<<<
 *         cdef CMemoryPool* pool = maybe_unbox_memory_pool(memory_pool)
 *         self.builder.reset(new CStringViewBuilder(pool))
*/

    /* Python wrapper */
    static int __pyx_pw_7pyarrow_3lib_17StringViewBuilder_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
    static int __pyx_pw_7pyarrow_3lib_17StringViewBuilder_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
      struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_memory_pool = 0;
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      int __pyx_r;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
      #endif
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_memory_pool,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(16, 97, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(16, 97, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__cinit__", 0) < (0)) __PYX_ERR(16, 97, __pyx_L3_error)
          if (!values[0]) values[0] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)Py_None));
        } else {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(16, 97, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (!values[0]) values[0] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)Py_None));
        }
        __pyx_v_memory_pool = ((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)values[0]);
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 1, __pyx_nargs); __PYX_ERR(16, 97, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.StringViewBuilder.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return -1;
      __pyx_L4_argument_unpacking_done:;
      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_memory_pool), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_MemoryPool, 1, "memory_pool", 0))) __PYX_ERR(16, 97, __pyx_L1_error)
      __pyx_r = __pyx_pf_7pyarrow_3lib_17StringViewBuilder___cinit__(((struct __pyx_obj_7pyarrow_3lib_StringViewBuilder *)__pyx_v_self), __pyx_v_memory_pool);

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = -1;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      goto __pyx_L7_cleaned_up;
      __pyx_L0:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __pyx_L7_cleaned_up:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static int __pyx_pf_7pyarrow_3lib_17StringViewBuilder___cinit__(struct __pyx_obj_7pyarrow_3lib_StringViewBuilder *__pyx_v_self, struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_memory_pool) {
       arrow::MemoryPool *__pyx_v_pool;
      int __pyx_r;
       arrow::MemoryPool *__pyx_t_1;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;

      /* "pyarrow/builder.pxi":98
 * 
 *     def __cinit__(self, MemoryPool memory_pool=None):
 *         cdef CMemoryPool* pool = maybe_unbox_memory_pool(memory_pool)             # <<<<<<<<<<<<<<
 *         self.builder.reset(new CStringViewBuilder(pool))
 * 
*/
      __pyx_t_1 = __pyx_f_7pyarrow_3lib_maybe_unbox_memory_pool(__pyx_v_memory_pool); if (unlikely(__pyx_t_1 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(16, 98, __pyx_L1_error)
      __pyx_v_pool = __pyx_t_1;

      /* "pyarrow/builder.pxi":99
 *     def __cinit__(self, MemoryPool memory_pool=None):
 *         cdef CMemoryPool* pool = maybe_unbox_memory_pool(memory_pool)
 *         self.builder.reset(new CStringViewBuilder(pool))             # <<<<<<<<<<<<<<
 * 
 *     def append(self, value):
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "builder");
        __PYX_ERR(16, 99, __pyx_L1_error)
      }
      __pyx_v_self->builder.reset(new  arrow::StringViewBuilder(__pyx_v_pool));

      /* "pyarrow/builder.pxi":97
 *         unique_ptr[CStringViewBuilder] builder
 * 
 *     def __cinit__(self, MemoryPool memory_pool=None):             # <<<<<<<<<<<<<<
 *         cdef CMemoryPool* pool = maybe_unbox_memory_pool(memory_pool)
 *         self.builder.reset(new CStringViewBuilder(pool))
*/

      /* function exit code */
      __pyx_r = 0;
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_AddTraceback("pyarrow.lib.StringViewBuilder.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = -1;
      __pyx_L0:;
      return __pyx_r;
    }

    /* "pyarrow/builder.pxi":101
 *         self.builder.reset(new CStringViewBuilder(pool))
 * 
 *     def append(self, value):             # <<<<<<<<<<<<<<
 *         """
 *         Append a single value to the builder.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_17StringViewBuilder_3append(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_17StringViewBuilder_2append, "StringViewBuilder.append(self, value)\n\nAppend a single value to the builder.\n\nThe value can either be a string/bytes object or a null value\n(np.nan or None).\n\nParameters\n----------\nvalue : string/bytes or np.nan/None\n    The value to append to the string array builder.");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_17StringViewBuilder_3append = {"append", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_17StringViewBuilder_3append, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_17StringViewBuilder_2append};
    static PyObject *__pyx_pw_7pyarrow_3lib_17StringViewBuilder_3append(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_value = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("append (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_value,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(16, 101, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(16, 101, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "append", 0) < (0)) __PYX_ERR(16, 101, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("append", 1, 1, 1, i); __PYX_ERR(16, 101, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 1)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(16, 101, __pyx_L3_error)
        }
        __pyx_v_value = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("append", 1, 1, 1, __pyx_nargs); __PYX_ERR(16, 101, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.StringViewBuilder.append", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_17StringViewBuilder_2append(((struct __pyx_obj_7pyarrow_3lib_StringViewBuilder *)__pyx_v_self), __pyx_v_value);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_17StringViewBuilder_2append(struct __pyx_obj_7pyarrow_3lib_StringViewBuilder *__pyx_v_self, PyObject *__pyx_v_value) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      int __pyx_t_1;
      int __pyx_t_2;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      PyObject *__pyx_t_5 = NULL;
      size_t __pyx_t_6;
      std::string __pyx_t_7;
      PyObject *__pyx_t_8 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("append", 0);

      /* "pyarrow/builder.pxi":113
 *             The value to append to the string array builder.
 *         """
 *         if isinstance(value, (bytes, str)):             # <<<<<<<<<<<<<<
 *             self.builder.get().Append(tobytes(value))
 *         elif value is None or math.isnan(value):
*/
      __pyx_t_2 = PyBytes_Check(__pyx_v_value); 
      if (!__pyx_t_2) {
      } else {
        __pyx_t_1 = __pyx_t_2;
        goto __pyx_L4_bool_binop_done;
      }
      __pyx_t_2 = PyUnicode_Check(__pyx_v_value); 
      __pyx_t_1 = __pyx_t_2;
      __pyx_L4_bool_binop_done:;
      if (__pyx_t_1) {

        /* "pyarrow/builder.pxi":114
 *         """
 *         if isinstance(value, (bytes, str)):
 *             self.builder.get().Append(tobytes(value))             # <<<<<<<<<<<<<<
 *         elif value is None or math.isnan(value):
 *             self.builder.get().AppendNull()
*/
        if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "builder");
          __PYX_ERR(16, 114, __pyx_L1_error)
        }
        __pyx_t_4 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_tobytes); if (unlikely(!__pyx_t_5)) __PYX_ERR(16, 114, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_6 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
          assert(__pyx_t_4);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
          __pyx_t_6 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_value};
          __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 114, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        __pyx_t_7 = __pyx_convert_string_from_py_6libcpp_6string_std__in_string(__pyx_t_3); if (unlikely(PyErr_Occurred())) __PYX_ERR(16, 114, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        (void)(__pyx_v_self->builder.get()->Append(__pyx_t_7));

        /* "pyarrow/builder.pxi":113
 *             The value to append to the string array builder.
 *         """
 *         if isinstance(value, (bytes, str)):             # <<<<<<<<<<<<<<
 *             self.builder.get().Append(tobytes(value))
 *         elif value is None or math.isnan(value):
*/
        goto __pyx_L3;
      }

      /* "pyarrow/builder.pxi":115
 *         if isinstance(value, (bytes, str)):
 *             self.builder.get().Append(tobytes(value))
 *         elif value is None or math.isnan(value):             # <<<<<<<<<<<<<<
 *             self.builder.get().AppendNull()
 *         else:
*/
      __pyx_t_2 = (__pyx_v_value == Py_None);
      if (!__pyx_t_2) {
      } else {
        __pyx_t_1 = __pyx_t_2;
        goto __pyx_L6_bool_binop_done;
      }
      __pyx_t_5 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_math); if (unlikely(!__pyx_t_4)) __PYX_ERR(16, 115, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_isnan); if (unlikely(!__pyx_t_8)) __PYX_ERR(16, 115, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_6 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_8))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_8);
        assert(__pyx_t_5);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_8, __pyx__function);
        __pyx_t_6 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_value};
        __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 115, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(16, 115, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_1 = __pyx_t_2;
      __pyx_L6_bool_binop_done:;
      if (likely(__pyx_t_1)) {

        /* "pyarrow/builder.pxi":116
 *             self.builder.get().Append(tobytes(value))
 *         elif value is None or math.isnan(value):
 *             self.builder.get().AppendNull()             # <<<<<<<<<<<<<<
 *         else:
 *             raise TypeError('StringViewBuilder only accepts string objects')
*/
        if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "builder");
          __PYX_ERR(16, 116, __pyx_L1_error)
        }
        (void)(__pyx_v_self->builder.get()->AppendNull());

        /* "pyarrow/builder.pxi":115
 *         if isinstance(value, (bytes, str)):
 *             self.builder.get().Append(tobytes(value))
 *         elif value is None or math.isnan(value):             # <<<<<<<<<<<<<<
 *             self.builder.get().AppendNull()
 *         else:
*/
        goto __pyx_L3;
      }

      /* "pyarrow/builder.pxi":118
 *             self.builder.get().AppendNull()
 *         else:
 *             raise TypeError('StringViewBuilder only accepts string objects')             # <<<<<<<<<<<<<<
 * 
 *     def append_values(self, values):
*/
      /*else*/ {
        __pyx_t_8 = NULL;
        __pyx_t_6 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_mstate_global->__pyx_kp_u_StringViewBuilder_only_accepts_s};
          __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 118, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        __Pyx_Raise(__pyx_t_3, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __PYX_ERR(16, 118, __pyx_L1_error)
      }
      __pyx_L3:;

      /* "pyarrow/builder.pxi":101
 *         self.builder.reset(new CStringViewBuilder(pool))
 * 
 *     def append(self, value):             # <<<<<<<<<<<<<<
 *         """
 *         Append a single value to the builder.
*/

      /* function exit code */
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_8);
      __Pyx_AddTraceback("pyarrow.lib.StringViewBuilder.append", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/builder.pxi":120
 *             raise TypeError('StringViewBuilder only accepts string objects')
 * 
 *     def append_values(self, values):             # <<<<<<<<<<<<<<
 *         """
 *         Append all the values from an iterable.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_17StringViewBuilder_5append_values(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_17StringViewBuilder_4append_values, "StringViewBuilder.append_values(self, values)\n\nAppend all the values from an iterable.\n\nParameters\n----------\nvalues : iterable of string/bytes or np.nan/None values\n    The values to append to the string array builder.");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_17StringViewBuilder_5append_values = {"append_values", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_17StringViewBuilder_5append_values, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_17StringViewBuilder_4append_values};
    static PyObject *__pyx_pw_7pyarrow_3lib_17StringViewBuilder_5append_values(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_values = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("append_values (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_values,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(16, 120, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(16, 120, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "append_values", 0) < (0)) __PYX_ERR(16, 120, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("append_values", 1, 1, 1, i); __PYX_ERR(16, 120, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 1)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(16, 120, __pyx_L3_error)
        }
        __pyx_v_values = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("append_values", 1, 1, 1, __pyx_nargs); __PYX_ERR(16, 120, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.StringViewBuilder.append_values", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_17StringViewBuilder_4append_values(((struct __pyx_obj_7pyarrow_3lib_StringViewBuilder *)__pyx_v_self), __pyx_v_values);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_17StringViewBuilder_4append_values(struct __pyx_obj_7pyarrow_3lib_StringViewBuilder *__pyx_v_self, PyObject *__pyx_v_values) {
      PyObject *__pyx_v_value = NULL;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      Py_ssize_t __pyx_t_2;
      PyObject *(*__pyx_t_3)(PyObject *);
      PyObject *__pyx_t_4 = NULL;
      int __pyx_t_5;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("append_values", 0);

      /* "pyarrow/builder.pxi":129
 *             The values to append to the string array builder.
 *         """
 *         for value in values:             # <<<<<<<<<<<<<<
 *             self.append(value)
 * 
*/
      if (likely(PyList_CheckExact(__pyx_v_values)) || PyTuple_CheckExact(__pyx_v_values)) {
        __pyx_t_1 = __pyx_v_values; __Pyx_INCREF(__pyx_t_1);
        __pyx_t_2 = 0;
        __pyx_t_3 = NULL;
      } else {
        __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_values); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 129, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_3 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 129, __pyx_L1_error)
      }
      for (;;) {
        if (likely(!__pyx_t_3)) {
          if (likely(PyList_CheckExact(__pyx_t_1))) {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
              #if !CYTHON_ASSUME_SAFE_SIZE
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(16, 129, __pyx_L1_error)
              #endif
              if (__pyx_t_2 >= __pyx_temp) break;
            }
            __pyx_t_4 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_2, __Pyx_ReferenceSharing_OwnStrongReference);
            ++__pyx_t_2;
          } else {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
              #if !CYTHON_ASSUME_SAFE_SIZE
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(16, 129, __pyx_L1_error)
              #endif
              if (__pyx_t_2 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_4 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2));
            #else
            __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2);
            #endif
            ++__pyx_t_2;
          }
          if (unlikely(!__pyx_t_4)) __PYX_ERR(16, 129, __pyx_L1_error)
        } else {
          __pyx_t_4 = __pyx_t_3(__pyx_t_1);
          if (unlikely(!__pyx_t_4)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(16, 129, __pyx_L1_error)
              PyErr_Clear();
            }
            break;
          }
        }
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_4);
        __pyx_t_4 = 0;

        /* "pyarrow/builder.pxi":130
 *         """
 *         for value in values:
 *             self.append(value)             # <<<<<<<<<<<<<<
 * 
 *     def finish(self):
*/
        __pyx_t_5 = __Pyx_PyObject_Append(((PyObject *)__pyx_v_self), __pyx_v_value); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(16, 130, __pyx_L1_error)

        /* "pyarrow/builder.pxi":129
 *             The values to append to the string array builder.
 *         """
 *         for value in values:             # <<<<<<<<<<<<<<
 *             self.append(value)
 * 
*/
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "pyarrow/builder.pxi":120
 *             raise TypeError('StringViewBuilder only accepts string objects')
 * 
 *     def append_values(self, values):             # <<<<<<<<<<<<<<
 *         """
 *         Append all the values from an iterable.
*/

      /* 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_AddTraceback("pyarrow.lib.StringViewBuilder.append_values", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_value);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/builder.pxi":132
 *             self.append(value)
 * 
 *     def finish(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return result of builder as an Array object; also resets the builder.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_17StringViewBuilder_7finish(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_17StringViewBuilder_6finish, "StringViewBuilder.finish(self)\n\nReturn result of builder as an Array object; also resets the builder.\n\nReturns\n-------\narray : pyarrow.Array");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_17StringViewBuilder_7finish = {"finish", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_17StringViewBuilder_7finish, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_17StringViewBuilder_6finish};
    static PyObject *__pyx_pw_7pyarrow_3lib_17StringViewBuilder_7finish(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("finish (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("finish", 1, 0, 0, __pyx_nargs); return NULL; }
      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
      if (unlikely(__pyx_kwds_len < 0)) return NULL;
      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("finish", __pyx_kwds); return NULL;}
      __pyx_r = __pyx_pf_7pyarrow_3lib_17StringViewBuilder_6finish(((struct __pyx_obj_7pyarrow_3lib_StringViewBuilder *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_17StringViewBuilder_6finish(struct __pyx_obj_7pyarrow_3lib_StringViewBuilder *__pyx_v_self) {
      std::shared_ptr< arrow::Array>  __pyx_v_out;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("finish", 0);

      /* "pyarrow/builder.pxi":141
 *         """
 *         cdef shared_ptr[CArray] out
 *         with nogil:             # <<<<<<<<<<<<<<
 *             self.builder.get().Finish(&out)
 *         return pyarrow_wrap_array(out)
*/
      {
          PyThreadState * _save;
          _save = PyEval_SaveThread();
          __Pyx_FastGIL_Remember();
          /*try:*/ {

            /* "pyarrow/builder.pxi":142
 *         cdef shared_ptr[CArray] out
 *         with nogil:
 *             self.builder.get().Finish(&out)             # <<<<<<<<<<<<<<
 *         return pyarrow_wrap_array(out)
 * 
*/
            if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
              PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "builder");
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              __PYX_ERR(16, 142, __pyx_L4_error)
            }
            (void)(__pyx_v_self->builder.get()->Finish((&__pyx_v_out)));
          }

          /* "pyarrow/builder.pxi":141
 *         """
 *         cdef shared_ptr[CArray] out
 *         with nogil:             # <<<<<<<<<<<<<<
 *             self.builder.get().Finish(&out)
 *         return pyarrow_wrap_array(out)
*/
          /*finally:*/ {
            /*normal exit:*/{
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L5;
            }
            __pyx_L4_error: {
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L1_error;
            }
            __pyx_L5:;
          }
      }

      /* "pyarrow/builder.pxi":143
 *         with nogil:
 *             self.builder.get().Finish(&out)
 *         return pyarrow_wrap_array(out)             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = pyarrow_wrap_array(__pyx_v_out); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 143, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/builder.pxi":132
 *             self.append(value)
 * 
 *     def finish(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return result of builder as an Array object; also resets the builder.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("pyarrow.lib.StringViewBuilder.finish", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/builder.pxi":145
 *         return pyarrow_wrap_array(out)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def null_count(self):
 *         return self.builder.get().null_count()
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_17StringViewBuilder_10null_count_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_17StringViewBuilder_10null_count_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_17StringViewBuilder_10null_count___get__(((struct __pyx_obj_7pyarrow_3lib_StringViewBuilder *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_17StringViewBuilder_10null_count___get__(struct __pyx_obj_7pyarrow_3lib_StringViewBuilder *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__get__", 0);

      /* "pyarrow/builder.pxi":147
 *     @property
 *     def null_count(self):
 *         return self.builder.get().null_count()             # <<<<<<<<<<<<<<
 * 
 *     def __len__(self):
*/
      __Pyx_XDECREF(__pyx_r);
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "builder");
        __PYX_ERR(16, 147, __pyx_L1_error)
      }
      __pyx_t_1 = __Pyx_PyLong_From_int64_t(__pyx_v_self->builder.get()->null_count()); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 147, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/builder.pxi":145
 *         return pyarrow_wrap_array(out)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def null_count(self):
 *         return self.builder.get().null_count()
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("pyarrow.lib.StringViewBuilder.null_count.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/builder.pxi":149
 *         return self.builder.get().null_count()
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self.builder.get().length()
*/

    /* Python wrapper */
    static Py_ssize_t __pyx_pw_7pyarrow_3lib_17StringViewBuilder_9__len__(PyObject *__pyx_v_self); /*proto*/
    static Py_ssize_t __pyx_pw_7pyarrow_3lib_17StringViewBuilder_9__len__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      Py_ssize_t __pyx_r;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_17StringViewBuilder_8__len__(((struct __pyx_obj_7pyarrow_3lib_StringViewBuilder *)__pyx_v_self));

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

    static Py_ssize_t __pyx_pf_7pyarrow_3lib_17StringViewBuilder_8__len__(struct __pyx_obj_7pyarrow_3lib_StringViewBuilder *__pyx_v_self) {
      Py_ssize_t __pyx_r;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;

      /* "pyarrow/builder.pxi":150
 * 
 *     def __len__(self):
 *         return self.builder.get().length()             # <<<<<<<<<<<<<<
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "builder");
        __PYX_ERR(16, 150, __pyx_L1_error)
      }
      __pyx_r = __pyx_v_self->builder.get()->length();
      goto __pyx_L0;

      /* "pyarrow/builder.pxi":149
 *         return self.builder.get().null_count()
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self.builder.get().length()
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_AddTraceback("pyarrow.lib.StringViewBuilder.__len__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = -1;
      __pyx_L0:;
      return __pyx_r;
    }

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

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_17StringViewBuilder_11__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_17StringViewBuilder_10__reduce_cython__, "StringViewBuilder.__reduce_cython__(self)");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_17StringViewBuilder_11__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_17StringViewBuilder_11__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_17StringViewBuilder_10__reduce_cython__};
    static PyObject *__pyx_pw_7pyarrow_3lib_17StringViewBuilder_11__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; }
      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
      if (unlikely(__pyx_kwds_len < 0)) return NULL;
      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;}
      __pyx_r = __pyx_pf_7pyarrow_3lib_17StringViewBuilder_10__reduce_cython__(((struct __pyx_obj_7pyarrow_3lib_StringViewBuilder *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_17StringViewBuilder_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_StringViewBuilder *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__reduce_cython__", 0);

      /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0);
      __PYX_ERR(7, 2, __pyx_L1_error)

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

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_AddTraceback("pyarrow.lib.StringViewBuilder.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

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

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_17StringViewBuilder_13__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_17StringViewBuilder_12__setstate_cython__, "StringViewBuilder.__setstate_cython__(self, __pyx_state)");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_17StringViewBuilder_13__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_17StringViewBuilder_13__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_17StringViewBuilder_12__setstate_cython__};
    static PyObject *__pyx_pw_7pyarrow_3lib_17StringViewBuilder_13__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(7, 3, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(7, 3, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(7, 3, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(7, 3, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 1)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(7, 3, __pyx_L3_error)
        }
        __pyx_v___pyx_state = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(7, 3, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.StringViewBuilder.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_17StringViewBuilder_12__setstate_cython__(((struct __pyx_obj_7pyarrow_3lib_StringViewBuilder *)__pyx_v_self), __pyx_v___pyx_state);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

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

      /* "(tree fragment)":4
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
*/
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0);
      __PYX_ERR(7, 4, __pyx_L1_error)

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

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_AddTraceback("pyarrow.lib.StringViewBuilder.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/table.pxi":61
 *     """
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self.chunked_array = NULL
 *         self._init_is_cpu = False
*/

    /* Python wrapper */
    static int __pyx_pw_7pyarrow_3lib_12ChunkedArray_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
    static int __pyx_pw_7pyarrow_3lib_12ChunkedArray_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      int __pyx_r;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
      #endif
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, __pyx_nargs); return -1; }
      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
      if (unlikely(__pyx_kwds_len < 0)) return -1;
      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__cinit__", __pyx_kwds); return -1;}
      __pyx_r = __pyx_pf_7pyarrow_3lib_12ChunkedArray___cinit__(((struct __pyx_obj_7pyarrow_3lib_ChunkedArray *)__pyx_v_self));

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

    static int __pyx_pf_7pyarrow_3lib_12ChunkedArray___cinit__(struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_self) {
      int __pyx_r;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;

      /* "pyarrow/table.pxi":62
 * 
 *     def __cinit__(self):
 *         self.chunked_array = NULL             # <<<<<<<<<<<<<<
 *         self._init_is_cpu = False
 * 
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "chunked_array");
        __PYX_ERR(17, 62, __pyx_L1_error)
      }
      __pyx_v_self->chunked_array = NULL;

      /* "pyarrow/table.pxi":63
 *     def __cinit__(self):
 *         self.chunked_array = NULL
 *         self._init_is_cpu = False             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self):
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_init_is_cpu");
        __PYX_ERR(17, 63, __pyx_L1_error)
      }
      __pyx_v_self->_init_is_cpu = 0;

      /* "pyarrow/table.pxi":61
 *     """
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self.chunked_array = NULL
 *         self._init_is_cpu = False
*/

      /* function exit code */
      __pyx_r = 0;
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_AddTraceback("pyarrow.lib.ChunkedArray.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = -1;
      __pyx_L0:;
      return __pyx_r;
    }

    /* "pyarrow/table.pxi":65
 *         self._init_is_cpu = False
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         raise TypeError("Do not call ChunkedArray's constructor directly, use "
 *                         "`chunked_array` function instead.")
*/

    /* Python wrapper */
    static int __pyx_pw_7pyarrow_3lib_12ChunkedArray_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
    static int __pyx_pw_7pyarrow_3lib_12ChunkedArray_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      int __pyx_r;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
      #endif
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, __pyx_nargs); return -1; }
      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
      if (unlikely(__pyx_kwds_len < 0)) return -1;
      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__init__", __pyx_kwds); return -1;}
      __pyx_r = __pyx_pf_7pyarrow_3lib_12ChunkedArray_2__init__(((struct __pyx_obj_7pyarrow_3lib_ChunkedArray *)__pyx_v_self));

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

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

      /* "pyarrow/table.pxi":66
 * 
 *     def __init__(self):
 *         raise TypeError("Do not call ChunkedArray's constructor directly, use "             # <<<<<<<<<<<<<<
 *                         "`chunked_array` function instead.")
 * 
*/
      __pyx_t_2 = NULL;
      __pyx_t_3 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Do_not_call_ChunkedArray_s_const};
        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 66, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __PYX_ERR(17, 66, __pyx_L1_error)

      /* "pyarrow/table.pxi":65
 *         self._init_is_cpu = False
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         raise TypeError("Do not call ChunkedArray's constructor directly, use "
 *                         "`chunked_array` function instead.")
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_AddTraceback("pyarrow.lib.ChunkedArray.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = -1;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/table.pxi":69
 *                         "`chunked_array` function instead.")
 * 
 *     cdef void init(self, const shared_ptr[CChunkedArray]& chunked_array):             # <<<<<<<<<<<<<<
 *         self.sp_chunked_array = chunked_array
 *         self.chunked_array = chunked_array.get()
*/

    static void __pyx_f_7pyarrow_3lib_12ChunkedArray_init(struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_self, std::shared_ptr< arrow::ChunkedArray>  const &__pyx_v_chunked_array) {
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;

      /* "pyarrow/table.pxi":70
 * 
 *     cdef void init(self, const shared_ptr[CChunkedArray]& chunked_array):
 *         self.sp_chunked_array = chunked_array             # <<<<<<<<<<<<<<
 *         self.chunked_array = chunked_array.get()
 * 
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_chunked_array");
        __PYX_ERR(17, 70, __pyx_L1_error)
      }
      __pyx_v_self->sp_chunked_array = __pyx_v_chunked_array;

      /* "pyarrow/table.pxi":71
 *     cdef void init(self, const shared_ptr[CChunkedArray]& chunked_array):
 *         self.sp_chunked_array = chunked_array
 *         self.chunked_array = chunked_array.get()             # <<<<<<<<<<<<<<
 * 
 *     def __reduce__(self):
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "chunked_array");
        __PYX_ERR(17, 71, __pyx_L1_error)
      }
      __pyx_v_self->chunked_array = __pyx_v_chunked_array.get();

      /* "pyarrow/table.pxi":69
 *                         "`chunked_array` function instead.")
 * 
 *     cdef void init(self, const shared_ptr[CChunkedArray]& chunked_array):             # <<<<<<<<<<<<<<
 *         self.sp_chunked_array = chunked_array
 *         self.chunked_array = chunked_array.get()
*/

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_AddTraceback("pyarrow.lib.ChunkedArray.init", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_L0:;
    }

    /* "pyarrow/table.pxi":73
 *         self.chunked_array = chunked_array.get()
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         self._assert_cpu()
 *         return chunked_array, (self.chunks, self.type)
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_12ChunkedArray_5__reduce__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_12ChunkedArray_4__reduce__, "ChunkedArray.__reduce__(self)");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_12ChunkedArray_5__reduce__ = {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12ChunkedArray_5__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12ChunkedArray_4__reduce__};
    static PyObject *__pyx_pw_7pyarrow_3lib_12ChunkedArray_5__reduce__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__reduce__ (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce__", 1, 0, 0, __pyx_nargs); return NULL; }
      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
      if (unlikely(__pyx_kwds_len < 0)) return NULL;
      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce__", __pyx_kwds); return NULL;}
      __pyx_r = __pyx_pf_7pyarrow_3lib_12ChunkedArray_4__reduce__(((struct __pyx_obj_7pyarrow_3lib_ChunkedArray *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_12ChunkedArray_4__reduce__(struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      size_t __pyx_t_3;
      PyObject *__pyx_t_4 = NULL;
      PyObject *__pyx_t_5 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__reduce__", 0);

      /* "pyarrow/table.pxi":74
 * 
 *     def __reduce__(self):
 *         self._assert_cpu()             # <<<<<<<<<<<<<<
 *         return chunked_array, (self.chunks, self.type)
 * 
*/
      __pyx_t_2 = ((PyObject *)__pyx_v_self);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_3 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_assert_cpu, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 74, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "pyarrow/table.pxi":75
 *     def __reduce__(self):
 *         self._assert_cpu()
 *         return chunked_array, (self.chunks, self.type)             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_chunked_array); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 75, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_chunks); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 75, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 75, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 75, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_2);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2) != (0)) __PYX_ERR(17, 75, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_4);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4) != (0)) __PYX_ERR(17, 75, __pyx_L1_error);
      __pyx_t_2 = 0;
      __pyx_t_4 = 0;
      __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 75, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_1);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1) != (0)) __PYX_ERR(17, 75, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_5);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_5) != (0)) __PYX_ERR(17, 75, __pyx_L1_error);
      __pyx_t_1 = 0;
      __pyx_t_5 = 0;
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L0;

      /* "pyarrow/table.pxi":73
 *         self.chunked_array = chunked_array.get()
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         self._assert_cpu()
 *         return chunked_array, (self.chunks, self.type)
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_AddTraceback("pyarrow.lib.ChunkedArray.__reduce__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/table.pxi":77
 *         return chunked_array, (self.chunks, self.type)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def data(self):
 *         import warnings
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_12ChunkedArray_4data_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_12ChunkedArray_4data_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_12ChunkedArray_4data___get__(((struct __pyx_obj_7pyarrow_3lib_ChunkedArray *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_12ChunkedArray_4data___get__(struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_self) {
      PyObject *__pyx_v_warnings = NULL;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      size_t __pyx_t_4;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__get__", 0);

      /* "pyarrow/table.pxi":79
 *     @property
 *     def data(self):
 *         import warnings             # <<<<<<<<<<<<<<
 *         warnings.warn("Calling .data on ChunkedArray is provided for "
 *                       "compatibility after Column was removed, simply drop "
*/
      __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_warnings, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 79, __pyx_L1_error)
      __pyx_t_1 = __pyx_t_2;
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_v_warnings = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "pyarrow/table.pxi":80
 *     def data(self):
 *         import warnings
 *         warnings.warn("Calling .data on ChunkedArray is provided for "             # <<<<<<<<<<<<<<
 *                       "compatibility after Column was removed, simply drop "
 *                       "this attribute", FutureWarning)
*/
      __pyx_t_3 = __pyx_v_warnings;
      __Pyx_INCREF(__pyx_t_3);

      /* "pyarrow/table.pxi":82
 *         warnings.warn("Calling .data on ChunkedArray is provided for "
 *                       "compatibility after Column was removed, simply drop "
 *                       "this attribute", FutureWarning)             # <<<<<<<<<<<<<<
 *         return self
 * 
*/
      __pyx_t_4 = 0;
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Calling_data_on_ChunkedArray_is, ((PyObject *)(((PyTypeObject*)PyExc_FutureWarning)))};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_warn, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 80, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "pyarrow/table.pxi":83
 *                       "compatibility after Column was removed, simply drop "
 *                       "this attribute", FutureWarning)
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF((PyObject *)__pyx_v_self);
      __pyx_r = ((PyObject *)__pyx_v_self);
      goto __pyx_L0;

      /* "pyarrow/table.pxi":77
 *         return chunked_array, (self.chunks, self.type)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def data(self):
 *         import warnings
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_AddTraceback("pyarrow.lib.ChunkedArray.data.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_warnings);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/table.pxi":85
 *         return self
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def type(self):
 *         """
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_12ChunkedArray_4type_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_12ChunkedArray_4type_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_12ChunkedArray_4type___get__(((struct __pyx_obj_7pyarrow_3lib_ChunkedArray *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_12ChunkedArray_4type___get__(struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__get__", 0);

      /* "pyarrow/table.pxi":97
 *         DataType(int64)
 *         """
 *         return pyarrow_wrap_data_type(self.sp_chunked_array.get().type())             # <<<<<<<<<<<<<<
 * 
 *     def length(self):
*/
      __Pyx_XDECREF(__pyx_r);
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_chunked_array");
        __PYX_ERR(17, 97, __pyx_L1_error)
      }
      __pyx_t_1 = pyarrow_wrap_data_type(__pyx_v_self->sp_chunked_array.get()->type()); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 97, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/table.pxi":85
 *         return self
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def type(self):
 *         """
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("pyarrow.lib.ChunkedArray.type.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/table.pxi":99
 *         return pyarrow_wrap_data_type(self.sp_chunked_array.get().type())
 * 
 *     def length(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return length of a ChunkedArray.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_12ChunkedArray_7length(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_12ChunkedArray_6length, "ChunkedArray.length(self)\n\nReturn length of a ChunkedArray.\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> n_legs = pa.chunked_array([[2, 2, 4], [4, 5, 100]])\n>>> n_legs.length()\n6");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_12ChunkedArray_7length = {"length", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12ChunkedArray_7length, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12ChunkedArray_6length};
    static PyObject *__pyx_pw_7pyarrow_3lib_12ChunkedArray_7length(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("length (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("length", 1, 0, 0, __pyx_nargs); return NULL; }
      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
      if (unlikely(__pyx_kwds_len < 0)) return NULL;
      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("length", __pyx_kwds); return NULL;}
      __pyx_r = __pyx_pf_7pyarrow_3lib_12ChunkedArray_6length(((struct __pyx_obj_7pyarrow_3lib_ChunkedArray *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_12ChunkedArray_6length(struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("length", 0);

      /* "pyarrow/table.pxi":110
 *         6
 *         """
 *         return self.chunked_array.length()             # <<<<<<<<<<<<<<
 * 
 *     def __len__(self):
*/
      __Pyx_XDECREF(__pyx_r);
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "chunked_array");
        __PYX_ERR(17, 110, __pyx_L1_error)
      }
      __pyx_t_1 = __Pyx_PyLong_From_int64_t(__pyx_v_self->chunked_array->length()); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 110, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/table.pxi":99
 *         return pyarrow_wrap_data_type(self.sp_chunked_array.get().type())
 * 
 *     def length(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return length of a ChunkedArray.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("pyarrow.lib.ChunkedArray.length", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/table.pxi":112
 *         return self.chunked_array.length()
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self.length()
 * 
*/

    /* Python wrapper */
    static Py_ssize_t __pyx_pw_7pyarrow_3lib_12ChunkedArray_9__len__(PyObject *__pyx_v_self); /*proto*/
    static Py_ssize_t __pyx_pw_7pyarrow_3lib_12ChunkedArray_9__len__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      Py_ssize_t __pyx_r;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_12ChunkedArray_8__len__(((struct __pyx_obj_7pyarrow_3lib_ChunkedArray *)__pyx_v_self));

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

    static Py_ssize_t __pyx_pf_7pyarrow_3lib_12ChunkedArray_8__len__(struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_self) {
      Py_ssize_t __pyx_r;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      size_t __pyx_t_3;
      Py_ssize_t __pyx_t_4;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__len__", 0);

      /* "pyarrow/table.pxi":113
 * 
 *     def __len__(self):
 *         return self.length()             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
*/
      __pyx_t_2 = ((PyObject *)__pyx_v_self);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_3 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_length, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 113, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_t_4 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_4 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(17, 113, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_r = __pyx_t_4;
      goto __pyx_L0;

      /* "pyarrow/table.pxi":112
 *         return self.chunked_array.length()
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self.length()
 * 
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_AddTraceback("pyarrow.lib.ChunkedArray.__len__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = -1;
      __pyx_L0:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/table.pxi":115
 *         return self.length()
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         type_format = object.__repr__(self)
 *         return f"{type_format}\n{self}"
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_12ChunkedArray_11__repr__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_12ChunkedArray_11__repr__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_12ChunkedArray_10__repr__(((struct __pyx_obj_7pyarrow_3lib_ChunkedArray *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_12ChunkedArray_10__repr__(struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_self) {
      PyObject *__pyx_v_type_format = NULL;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      size_t __pyx_t_3;
      PyObject *__pyx_t_4[3];
      PyObject *__pyx_t_5 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__repr__", 0);

      /* "pyarrow/table.pxi":116
 * 
 *     def __repr__(self):
 *         type_format = object.__repr__(self)             # <<<<<<<<<<<<<<
 *         return f"{type_format}\n{self}"
 * 
*/
      __pyx_t_2 = __pyx_builtin_object;
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_3 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, ((PyObject *)__pyx_v_self)};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_repr, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 116, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_v_type_format = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "pyarrow/table.pxi":117
 *     def __repr__(self):
 *         type_format = object.__repr__(self)
 *         return f"{type_format}\n{self}"             # <<<<<<<<<<<<<<
 * 
 *     def to_string(self, *, int indent=0, int window=5, int container_window=2,
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_v_type_format, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 117, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_PyObject_FormatSimple(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 117, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4[0] = __pyx_t_1;
      __pyx_t_4[1] = __pyx_mstate_global->__pyx_kp_u__14;
      __pyx_t_4[2] = __pyx_t_2;
      __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_4, 3, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1) + 1 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2));
      if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 117, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_r = __pyx_t_5;
      __pyx_t_5 = 0;
      goto __pyx_L0;

      /* "pyarrow/table.pxi":115
 *         return self.length()
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         type_format = object.__repr__(self)
 *         return f"{type_format}\n{self}"
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_AddTraceback("pyarrow.lib.ChunkedArray.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_type_format);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/table.pxi":119
 *         return f"{type_format}\n{self}"
 * 
 *     def to_string(self, *, int indent=0, int window=5, int container_window=2,             # <<<<<<<<<<<<<<
 *                   c_bool skip_new_lines=False, int element_size_limit=100):
 *         """
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_12ChunkedArray_13to_string(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_12ChunkedArray_12to_string, "ChunkedArray.to_string(self, *, int indent=0, int window=5, int container_window=2, bool skip_new_lines=False, int element_size_limit=100)\n\nRender a \"pretty-printed\" string representation of the ChunkedArray\n\nParameters\n----------\nindent : int\n    How much to indent right the content of the array,\n    by default ``0``.\nwindow : int\n    How many items to preview within each chunk at the begin and end\n    of the chunk when the chunk is bigger than the window.\n    The other elements will be ellipsed.\ncontainer_window : int\n    How many chunks to preview at the begin and end\n    of the array when the array is bigger than the window.\n    The other elements will be ellipsed.\n    This setting also applies to list columns.\nskip_new_lines : bool\n    If the array should be rendered as a single line of text\n    or if each element should be on its own line.\nelement_size_limit : int, default 100\n    Maximum number of characters of a single element before it is truncated.\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> n_legs = pa.chunked_array([[2, 2, 4], [4, 5, 100]])\n>>> n_legs.to_string(skip_new_lines=True)\n'[[2,2,4],[4,5,100]]'");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_12ChunkedArray_13to_string = {"to_string", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12ChunkedArray_13to_string, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12ChunkedArray_12to_string};
    static PyObject *__pyx_pw_7pyarrow_3lib_12ChunkedArray_13to_string(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      int __pyx_v_indent;
      int __pyx_v_window;
      int __pyx_v_container_window;
      bool __pyx_v_skip_new_lines;
      int __pyx_v_element_size_limit;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[5] = {0,0,0,0,0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("to_string (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_indent,&__pyx_mstate_global->__pyx_n_u_window,&__pyx_mstate_global->__pyx_n_u_container_window,&__pyx_mstate_global->__pyx_n_u_skip_new_lines,&__pyx_mstate_global->__pyx_n_u_element_size_limit,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(17, 119, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, 0, __pyx_kwds_len, "to_string", 0) < (0)) __PYX_ERR(17, 119, __pyx_L3_error)
        } else if (unlikely(__pyx_nargs != 0)) {
          goto __pyx_L5_argtuple_error;
        } else {
        }
        if (values[0]) {
          __pyx_v_indent = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_indent == (int)-1) && PyErr_Occurred())) __PYX_ERR(17, 119, __pyx_L3_error)
        } else {
          __pyx_v_indent = ((int)0);
        }
        if (values[1]) {
          __pyx_v_window = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_window == (int)-1) && PyErr_Occurred())) __PYX_ERR(17, 119, __pyx_L3_error)
        } else {
          __pyx_v_window = ((int)5);
        }
        if (values[2]) {
          __pyx_v_container_window = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_container_window == (int)-1) && PyErr_Occurred())) __PYX_ERR(17, 119, __pyx_L3_error)
        } else {
          __pyx_v_container_window = ((int)2);
        }
        if (values[3]) {
          __pyx_v_skip_new_lines = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_skip_new_lines == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(17, 120, __pyx_L3_error)
        } else {

          /* "pyarrow/table.pxi":120
 * 
 *     def to_string(self, *, int indent=0, int window=5, int container_window=2,
 *                   c_bool skip_new_lines=False, int element_size_limit=100):             # <<<<<<<<<<<<<<
 *         """
 *         Render a "pretty-printed" string representation of the ChunkedArray
*/
          __pyx_v_skip_new_lines = ((bool)0);
        }
        if (values[4]) {
          __pyx_v_element_size_limit = __Pyx_PyLong_As_int(values[4]); if (unlikely((__pyx_v_element_size_limit == (int)-1) && PyErr_Occurred())) __PYX_ERR(17, 120, __pyx_L3_error)
        } else {
          __pyx_v_element_size_limit = ((int)0x64);
        }
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("to_string", 1, 0, 0, __pyx_nargs); __PYX_ERR(17, 119, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.ChunkedArray.to_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_12ChunkedArray_12to_string(((struct __pyx_obj_7pyarrow_3lib_ChunkedArray *)__pyx_v_self), __pyx_v_indent, __pyx_v_window, __pyx_v_container_window, __pyx_v_skip_new_lines, __pyx_v_element_size_limit);

      /* "pyarrow/table.pxi":119
 *         return f"{type_format}\n{self}"
 * 
 *     def to_string(self, *, int indent=0, int window=5, int container_window=2,             # <<<<<<<<<<<<<<
 *                   c_bool skip_new_lines=False, int element_size_limit=100):
 *         """
*/

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_12ChunkedArray_12to_string(struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_self, int __pyx_v_indent, int __pyx_v_window, int __pyx_v_container_window, bool __pyx_v_skip_new_lines, int __pyx_v_element_size_limit) {
      std::string __pyx_v_result;
      arrow::PrettyPrintOptions __pyx_v_options;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      int __pyx_t_1;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      PyObject *__pyx_t_5 = NULL;
      size_t __pyx_t_6;
      PyObject *__pyx_t_7 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("to_string", 0);

      /* "pyarrow/table.pxi":155
 *             PrettyPrintOptions options
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             options = PrettyPrintOptions(indent, window)
 *             options.skip_new_lines = skip_new_lines
*/
      {
          PyThreadState * _save;
          _save = PyEval_SaveThread();
          __Pyx_FastGIL_Remember();
          /*try:*/ {

            /* "pyarrow/table.pxi":156
 * 
 *         with nogil:
 *             options = PrettyPrintOptions(indent, window)             # <<<<<<<<<<<<<<
 *             options.skip_new_lines = skip_new_lines
 *             options.container_window = container_window
*/
            __pyx_v_options = arrow::PrettyPrintOptions(__pyx_v_indent, __pyx_v_window);

            /* "pyarrow/table.pxi":157
 *         with nogil:
 *             options = PrettyPrintOptions(indent, window)
 *             options.skip_new_lines = skip_new_lines             # <<<<<<<<<<<<<<
 *             options.container_window = container_window
 *             options.element_size_limit = element_size_limit
*/
            __pyx_v_options.skip_new_lines = __pyx_v_skip_new_lines;

            /* "pyarrow/table.pxi":158
 *             options = PrettyPrintOptions(indent, window)
 *             options.skip_new_lines = skip_new_lines
 *             options.container_window = container_window             # <<<<<<<<<<<<<<
 *             options.element_size_limit = element_size_limit
 *             check_status(
*/
            __pyx_v_options.container_window = __pyx_v_container_window;

            /* "pyarrow/table.pxi":159
 *             options.skip_new_lines = skip_new_lines
 *             options.container_window = container_window
 *             options.element_size_limit = element_size_limit             # <<<<<<<<<<<<<<
 *             check_status(
 *                 PrettyPrint(
*/
            __pyx_v_options.element_size_limit = __pyx_v_element_size_limit;

            /* "pyarrow/table.pxi":162
 *             check_status(
 *                 PrettyPrint(
 *                     deref(self.chunked_array),             # <<<<<<<<<<<<<<
 *                     options,
 *                     &result
*/
            if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
              PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "chunked_array");
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              __PYX_ERR(17, 162, __pyx_L4_error)
            }

            /* "pyarrow/table.pxi":160
 *             options.container_window = container_window
 *             options.element_size_limit = element_size_limit
 *             check_status(             # <<<<<<<<<<<<<<
 *                 PrettyPrint(
 *                     deref(self.chunked_array),
*/
            __pyx_t_1 = __pyx_f_7pyarrow_3lib_check_status(arrow::PrettyPrint((*__pyx_v_self->chunked_array), __pyx_v_options, (&__pyx_v_result))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(17, 160, __pyx_L4_error)
          }

          /* "pyarrow/table.pxi":155
 *             PrettyPrintOptions options
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             options = PrettyPrintOptions(indent, window)
 *             options.skip_new_lines = skip_new_lines
*/
          /*finally:*/ {
            /*normal exit:*/{
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L5;
            }
            __pyx_L4_error: {
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L1_error;
            }
            __pyx_L5:;
          }
      }

      /* "pyarrow/table.pxi":168
 *             )
 * 
 *         return frombytes(result, safe=True)             # <<<<<<<<<<<<<<
 * 
 *     def format(self, **kwargs):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_frombytes); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 168, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = __pyx_convert_PyBytes_string_to_py_6libcpp_6string_std__in_string(__pyx_v_result); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 168, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
        assert(__pyx_t_3);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
        __pyx_t_6 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_3, __pyx_t_5};
        __pyx_t_7 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 168, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_safe, Py_True, __pyx_t_7, __pyx_callargs+2, 0) < (0)) __PYX_ERR(17, 168, __pyx_L1_error)
        __pyx_t_2 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_7);
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 168, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
      }
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;

      /* "pyarrow/table.pxi":119
 *         return f"{type_format}\n{self}"
 * 
 *     def to_string(self, *, int indent=0, int window=5, int container_window=2,             # <<<<<<<<<<<<<<
 *                   c_bool skip_new_lines=False, int element_size_limit=100):
 *         """
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_7);
      __Pyx_AddTraceback("pyarrow.lib.ChunkedArray.to_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/table.pxi":170
 *         return frombytes(result, safe=True)
 * 
 *     def format(self, **kwargs):             # <<<<<<<<<<<<<<
 *         """
 *         DEPRECATED, use pyarrow.ChunkedArray.to_string
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_12ChunkedArray_15format(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_12ChunkedArray_14format, "ChunkedArray.format(self, **kwargs)\n\nDEPRECATED, use pyarrow.ChunkedArray.to_string\n\nParameters\n----------\n**kwargs : dict\n\nReturns\n-------\nstr");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_12ChunkedArray_15format = {"format", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12ChunkedArray_15format, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12ChunkedArray_14format};
    static PyObject *__pyx_pw_7pyarrow_3lib_12ChunkedArray_15format(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_kwargs = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("format (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("format", 1, 0, 0, __pyx_nargs); return NULL; }
      const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
      if (unlikely(__pyx_kwds_len < 0)) return NULL;
      if (__pyx_kwds_len > 0) {
        if (unlikely(__Pyx_CheckKeywordStrings("format", __pyx_kwds) == -1)) return NULL;
        __pyx_v_kwargs = __Pyx_KwargsAsDict_FASTCALL(__pyx_kwds, __pyx_kwvalues);
        if (unlikely(!__pyx_v_kwargs)) return NULL;
        __Pyx_GOTREF(__pyx_v_kwargs);
      } else {
        __pyx_v_kwargs = PyDict_New();
        if (unlikely(!__pyx_v_kwargs)) return NULL;
        __Pyx_GOTREF(__pyx_v_kwargs);
      }
      __pyx_r = __pyx_pf_7pyarrow_3lib_12ChunkedArray_14format(((struct __pyx_obj_7pyarrow_3lib_ChunkedArray *)__pyx_v_self), __pyx_v_kwargs);

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

    static PyObject *__pyx_pf_7pyarrow_3lib_12ChunkedArray_14format(struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_self, PyObject *__pyx_v_kwargs) {
      PyObject *__pyx_v_warnings = NULL;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      size_t __pyx_t_4;
      PyObject *__pyx_t_5 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("format", 0);

      /* "pyarrow/table.pxi":182
 *         str
 *         """
 *         import warnings             # <<<<<<<<<<<<<<
 *         warnings.warn('ChunkedArray.format is deprecated, '
 *                       'use ChunkedArray.to_string')
*/
      __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_warnings, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 182, __pyx_L1_error)
      __pyx_t_1 = __pyx_t_2;
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_v_warnings = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "pyarrow/table.pxi":183
 *         """
 *         import warnings
 *         warnings.warn('ChunkedArray.format is deprecated, '             # <<<<<<<<<<<<<<
 *                       'use ChunkedArray.to_string')
 *         return self.to_string(**kwargs)
*/
      __pyx_t_3 = __pyx_v_warnings;
      __Pyx_INCREF(__pyx_t_3);
      __pyx_t_4 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_ChunkedArray_format_is_deprecate};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_warn, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 183, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "pyarrow/table.pxi":185
 *         warnings.warn('ChunkedArray.format is deprecated, '
 *                       'use ChunkedArray.to_string')
 *         return self.to_string(**kwargs)             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_to_string); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 185, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 185, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_mstate_global->__pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 185, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_r = __pyx_t_5;
      __pyx_t_5 = 0;
      goto __pyx_L0;

      /* "pyarrow/table.pxi":170
 *         return frombytes(result, safe=True)
 * 
 *     def format(self, **kwargs):             # <<<<<<<<<<<<<<
 *         """
 *         DEPRECATED, use pyarrow.ChunkedArray.to_string
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_AddTraceback("pyarrow.lib.ChunkedArray.format", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_warnings);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/table.pxi":187
 *         return self.to_string(**kwargs)
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return self.to_string()
 * 
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_12ChunkedArray_17__str__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_12ChunkedArray_17__str__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_12ChunkedArray_16__str__(((struct __pyx_obj_7pyarrow_3lib_ChunkedArray *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_12ChunkedArray_16__str__(struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      size_t __pyx_t_3;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__str__", 0);

      /* "pyarrow/table.pxi":188
 * 
 *     def __str__(self):
 *         return self.to_string()             # <<<<<<<<<<<<<<
 * 
 *     def validate(self, *, full=False):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = ((PyObject *)__pyx_v_self);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_3 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_to_string, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 188, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/table.pxi":187
 *         return self.to_string(**kwargs)
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return self.to_string()
 * 
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_AddTraceback("pyarrow.lib.ChunkedArray.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/table.pxi":190
 *         return self.to_string()
 * 
 *     def validate(self, *, full=False):             # <<<<<<<<<<<<<<
 *         """
 *         Perform validation checks.  An exception is raised if validation fails.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_12ChunkedArray_19validate(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_12ChunkedArray_18validate, "ChunkedArray.validate(self, *, full=False)\n\nPerform validation checks.  An exception is raised if validation fails.\n\nBy default only cheap validation checks are run.  Pass `full=True`\nfor thorough validation checks (potentially O(n)).\n\nParameters\n----------\nfull : bool, default False\n    If True, run expensive checks, otherwise cheap checks only.\n\nRaises\n------\nArrowInvalid");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_12ChunkedArray_19validate = {"validate", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12ChunkedArray_19validate, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12ChunkedArray_18validate};
    static PyObject *__pyx_pw_7pyarrow_3lib_12ChunkedArray_19validate(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_full = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("validate (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_full,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(17, 190, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, 0, __pyx_kwds_len, "validate", 0) < (0)) __PYX_ERR(17, 190, __pyx_L3_error)
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_False));
        } else if (unlikely(__pyx_nargs != 0)) {
          goto __pyx_L5_argtuple_error;
        } else {
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_False));
        }
        __pyx_v_full = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("validate", 1, 0, 0, __pyx_nargs); __PYX_ERR(17, 190, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.ChunkedArray.validate", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_12ChunkedArray_18validate(((struct __pyx_obj_7pyarrow_3lib_ChunkedArray *)__pyx_v_self), __pyx_v_full);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_12ChunkedArray_18validate(struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_self, PyObject *__pyx_v_full) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      int __pyx_t_1;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      size_t __pyx_t_4;
      int __pyx_t_5;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("validate", 0);

      /* "pyarrow/table.pxi":206
 *         ArrowInvalid
 *         """
 *         if full:             # <<<<<<<<<<<<<<
 *             self._assert_cpu()
 *             with nogil:
*/
      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_full); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(17, 206, __pyx_L1_error)
      if (__pyx_t_1) {

        /* "pyarrow/table.pxi":207
 *         """
 *         if full:
 *             self._assert_cpu()             # <<<<<<<<<<<<<<
 *             with nogil:
 *                 check_status(self.sp_chunked_array.get().ValidateFull())
*/
        __pyx_t_3 = ((PyObject *)__pyx_v_self);
        __Pyx_INCREF(__pyx_t_3);
        __pyx_t_4 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
          __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_assert_cpu, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 207, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

        /* "pyarrow/table.pxi":208
 *         if full:
 *             self._assert_cpu()
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 check_status(self.sp_chunked_array.get().ValidateFull())
 *         else:
*/
        {
            PyThreadState * _save;
            _save = PyEval_SaveThread();
            __Pyx_FastGIL_Remember();
            /*try:*/ {

              /* "pyarrow/table.pxi":209
 *             self._assert_cpu()
 *             with nogil:
 *                 check_status(self.sp_chunked_array.get().ValidateFull())             # <<<<<<<<<<<<<<
 *         else:
 *             with nogil:
*/
              if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_chunked_array");
                __Pyx_PyGILState_Release(__pyx_gilstate_save);
                __PYX_ERR(17, 209, __pyx_L5_error)
              }
              __pyx_t_5 = __pyx_f_7pyarrow_3lib_check_status(__pyx_v_self->sp_chunked_array.get()->ValidateFull()); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(17, 209, __pyx_L5_error)
            }

            /* "pyarrow/table.pxi":208
 *         if full:
 *             self._assert_cpu()
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 check_status(self.sp_chunked_array.get().ValidateFull())
 *         else:
*/
            /*finally:*/ {
              /*normal exit:*/{
                __Pyx_FastGIL_Forget();
                PyEval_RestoreThread(_save);
                goto __pyx_L6;
              }
              __pyx_L5_error: {
                __Pyx_FastGIL_Forget();
                PyEval_RestoreThread(_save);
                goto __pyx_L1_error;
              }
              __pyx_L6:;
            }
        }

        /* "pyarrow/table.pxi":206
 *         ArrowInvalid
 *         """
 *         if full:             # <<<<<<<<<<<<<<
 *             self._assert_cpu()
 *             with nogil:
*/
        goto __pyx_L3;
      }

      /* "pyarrow/table.pxi":211
 *                 check_status(self.sp_chunked_array.get().ValidateFull())
 *         else:
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 check_status(self.sp_chunked_array.get().Validate())
 * 
*/
      /*else*/ {
        {
            PyThreadState * _save;
            _save = PyEval_SaveThread();
            __Pyx_FastGIL_Remember();
            /*try:*/ {

              /* "pyarrow/table.pxi":212
 *         else:
 *             with nogil:
 *                 check_status(self.sp_chunked_array.get().Validate())             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
              if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_chunked_array");
                __Pyx_PyGILState_Release(__pyx_gilstate_save);
                __PYX_ERR(17, 212, __pyx_L8_error)
              }
              __pyx_t_5 = __pyx_f_7pyarrow_3lib_check_status(__pyx_v_self->sp_chunked_array.get()->Validate()); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(17, 212, __pyx_L8_error)
            }

            /* "pyarrow/table.pxi":211
 *                 check_status(self.sp_chunked_array.get().ValidateFull())
 *         else:
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 check_status(self.sp_chunked_array.get().Validate())
 * 
*/
            /*finally:*/ {
              /*normal exit:*/{
                __Pyx_FastGIL_Forget();
                PyEval_RestoreThread(_save);
                goto __pyx_L9;
              }
              __pyx_L8_error: {
                __Pyx_FastGIL_Forget();
                PyEval_RestoreThread(_save);
                goto __pyx_L1_error;
              }
              __pyx_L9:;
            }
        }
      }
      __pyx_L3:;

      /* "pyarrow/table.pxi":190
 *         return self.to_string()
 * 
 *     def validate(self, *, full=False):             # <<<<<<<<<<<<<<
 *         """
 *         Perform validation checks.  An exception is raised if validation fails.
*/

      /* 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_AddTraceback("pyarrow.lib.ChunkedArray.validate", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/table.pxi":214
 *                 check_status(self.sp_chunked_array.get().Validate())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def null_count(self):
 *         """
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_12ChunkedArray_10null_count_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_12ChunkedArray_10null_count_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_12ChunkedArray_10null_count___get__(((struct __pyx_obj_7pyarrow_3lib_ChunkedArray *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_12ChunkedArray_10null_count___get__(struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      size_t __pyx_t_3;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__get__", 0);

      /* "pyarrow/table.pxi":230
 *         1
 *         """
 *         self._assert_cpu()             # <<<<<<<<<<<<<<
 *         return self.chunked_array.null_count()
 * 
*/
      __pyx_t_2 = ((PyObject *)__pyx_v_self);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_3 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_assert_cpu, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 230, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "pyarrow/table.pxi":231
 *         """
 *         self._assert_cpu()
 *         return self.chunked_array.null_count()             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
      __Pyx_XDECREF(__pyx_r);
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "chunked_array");
        __PYX_ERR(17, 231, __pyx_L1_error)
      }
      __pyx_t_1 = __Pyx_PyLong_From_int64_t(__pyx_v_self->chunked_array->null_count()); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 231, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/table.pxi":214
 *                 check_status(self.sp_chunked_array.get().Validate())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def null_count(self):
 *         """
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_AddTraceback("pyarrow.lib.ChunkedArray.null_count.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/table.pxi":233
 *         return self.chunked_array.null_count()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def nbytes(self):
 *         """
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_12ChunkedArray_6nbytes_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_12ChunkedArray_6nbytes_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_12ChunkedArray_6nbytes___get__(((struct __pyx_obj_7pyarrow_3lib_ChunkedArray *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_12ChunkedArray_6nbytes___get__(struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_self) {
      arrow::Result<int64_t>  __pyx_v_c_res_buffer;
      int64_t __pyx_v_size;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      size_t __pyx_t_3;
      int64_t __pyx_t_4;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__get__", 0);

      /* "pyarrow/table.pxi":256
 *         49
 *         """
 *         self._assert_cpu()             # <<<<<<<<<<<<<<
 *         cdef:
 *             CResult[int64_t] c_res_buffer
*/
      __pyx_t_2 = ((PyObject *)__pyx_v_self);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_3 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_assert_cpu, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 256, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "pyarrow/table.pxi":260
 *             CResult[int64_t] c_res_buffer
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             c_res_buffer = ReferencedBufferSize(deref(self.chunked_array))
 *             size = GetResultValue(c_res_buffer)
*/
      {
          PyThreadState * _save;
          _save = PyEval_SaveThread();
          __Pyx_FastGIL_Remember();
          /*try:*/ {

            /* "pyarrow/table.pxi":261
 * 
 *         with nogil:
 *             c_res_buffer = ReferencedBufferSize(deref(self.chunked_array))             # <<<<<<<<<<<<<<
 *             size = GetResultValue(c_res_buffer)
 *         return size
*/
            if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
              PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "chunked_array");
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              __PYX_ERR(17, 261, __pyx_L4_error)
            }
            __pyx_v_c_res_buffer = arrow::util::ReferencedBufferSize((*__pyx_v_self->chunked_array));

            /* "pyarrow/table.pxi":262
 *         with nogil:
 *             c_res_buffer = ReferencedBufferSize(deref(self.chunked_array))
 *             size = GetResultValue(c_res_buffer)             # <<<<<<<<<<<<<<
 *         return size
 * 
*/
            __pyx_t_4 = arrow::py::GetResultValue<int64_t>(__pyx_v_c_res_buffer); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(17, 262, __pyx_L4_error)
            __pyx_v_size = __pyx_t_4;
          }

          /* "pyarrow/table.pxi":260
 *             CResult[int64_t] c_res_buffer
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             c_res_buffer = ReferencedBufferSize(deref(self.chunked_array))
 *             size = GetResultValue(c_res_buffer)
*/
          /*finally:*/ {
            /*normal exit:*/{
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L5;
            }
            __pyx_L4_error: {
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L1_error;
            }
            __pyx_L5:;
          }
      }

      /* "pyarrow/table.pxi":263
 *             c_res_buffer = ReferencedBufferSize(deref(self.chunked_array))
 *             size = GetResultValue(c_res_buffer)
 *         return size             # <<<<<<<<<<<<<<
 * 
 *     def get_total_buffer_size(self):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __Pyx_PyLong_From_int64_t(__pyx_v_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 263, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/table.pxi":233
 *         return self.chunked_array.null_count()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def nbytes(self):
 *         """
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_AddTraceback("pyarrow.lib.ChunkedArray.nbytes.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/table.pxi":265
 *         return size
 * 
 *     def get_total_buffer_size(self):             # <<<<<<<<<<<<<<
 *         """
 *         The sum of bytes in each buffer referenced by the chunked array.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_12ChunkedArray_21get_total_buffer_size(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_12ChunkedArray_20get_total_buffer_size, "ChunkedArray.get_total_buffer_size(self)\n\nThe sum of bytes in each buffer referenced by the chunked array.\n\nAn array may only reference a portion of a buffer.\nThis method will overestimate in this case and return the\nbyte size of the entire buffer.\n\nIf a buffer is referenced multiple times then it will\nonly be counted once.\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> n_legs = pa.chunked_array([[2, 2, 4], [4, None, 100]])\n>>> n_legs.get_total_buffer_size()\n49");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_12ChunkedArray_21get_total_buffer_size = {"get_total_buffer_size", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12ChunkedArray_21get_total_buffer_size, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12ChunkedArray_20get_total_buffer_size};
    static PyObject *__pyx_pw_7pyarrow_3lib_12ChunkedArray_21get_total_buffer_size(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("get_total_buffer_size (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("get_total_buffer_size", 1, 0, 0, __pyx_nargs); return NULL; }
      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
      if (unlikely(__pyx_kwds_len < 0)) return NULL;
      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("get_total_buffer_size", __pyx_kwds); return NULL;}
      __pyx_r = __pyx_pf_7pyarrow_3lib_12ChunkedArray_20get_total_buffer_size(((struct __pyx_obj_7pyarrow_3lib_ChunkedArray *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_12ChunkedArray_20get_total_buffer_size(struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_self) {
      int64_t __pyx_v_total_buffer_size;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      size_t __pyx_t_3;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("get_total_buffer_size", 0);

      /* "pyarrow/table.pxi":283
 *         49
 *         """
 *         self._assert_cpu()             # <<<<<<<<<<<<<<
 *         cdef:
 *             int64_t total_buffer_size
*/
      __pyx_t_2 = ((PyObject *)__pyx_v_self);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_3 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_assert_cpu, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 283, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "pyarrow/table.pxi":287
 *             int64_t total_buffer_size
 * 
 *         total_buffer_size = TotalBufferSize(deref(self.chunked_array))             # <<<<<<<<<<<<<<
 *         return total_buffer_size
 * 
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "chunked_array");
        __PYX_ERR(17, 287, __pyx_L1_error)
      }
      __pyx_v_total_buffer_size = arrow::util::TotalBufferSize((*__pyx_v_self->chunked_array));

      /* "pyarrow/table.pxi":288
 * 
 *         total_buffer_size = TotalBufferSize(deref(self.chunked_array))
 *         return total_buffer_size             # <<<<<<<<<<<<<<
 * 
 *     def __sizeof__(self):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __Pyx_PyLong_From_int64_t(__pyx_v_total_buffer_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 288, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/table.pxi":265
 *         return size
 * 
 *     def get_total_buffer_size(self):             # <<<<<<<<<<<<<<
 *         """
 *         The sum of bytes in each buffer referenced by the chunked array.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_AddTraceback("pyarrow.lib.ChunkedArray.get_total_buffer_size", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/table.pxi":290
 *         return total_buffer_size
 * 
 *     def __sizeof__(self):             # <<<<<<<<<<<<<<
 *         return super(ChunkedArray, self).__sizeof__() + self.nbytes
 * 
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_12ChunkedArray_23__sizeof__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_12ChunkedArray_22__sizeof__, "ChunkedArray.__sizeof__(self)");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_12ChunkedArray_23__sizeof__ = {"__sizeof__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12ChunkedArray_23__sizeof__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12ChunkedArray_22__sizeof__};
    static PyObject *__pyx_pw_7pyarrow_3lib_12ChunkedArray_23__sizeof__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__sizeof__ (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__sizeof__", 1, 0, 0, __pyx_nargs); return NULL; }
      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
      if (unlikely(__pyx_kwds_len < 0)) return NULL;
      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__sizeof__", __pyx_kwds); return NULL;}
      __pyx_r = __pyx_pf_7pyarrow_3lib_12ChunkedArray_22__sizeof__(((struct __pyx_obj_7pyarrow_3lib_ChunkedArray *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_12ChunkedArray_22__sizeof__(struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      size_t __pyx_t_5;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__sizeof__", 0);

      /* "pyarrow/table.pxi":291
 * 
 *     def __sizeof__(self):
 *         return super(ChunkedArray, self).__sizeof__() + self.nbytes             # <<<<<<<<<<<<<<
 * 
 *     def __iter__(self):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_4 = NULL;
      __pyx_t_5 = 1;
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_4, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ChunkedArray), ((PyObject *)__pyx_v_self)};
        __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_super, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 291, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      __pyx_t_2 = __pyx_t_3;
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_5 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_sizeof, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 291, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_nbytes); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 291, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 291, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;

      /* "pyarrow/table.pxi":290
 *         return total_buffer_size
 * 
 *     def __sizeof__(self):             # <<<<<<<<<<<<<<
 *         return super(ChunkedArray, self).__sizeof__() + self.nbytes
 * 
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_AddTraceback("pyarrow.lib.ChunkedArray.__sizeof__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }
    static PyObject *__pyx_gb_7pyarrow_3lib_12ChunkedArray_26generator9(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

    /* "pyarrow/table.pxi":293
 *         return super(ChunkedArray, self).__sizeof__() + self.nbytes
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         for chunk in self.iterchunks():
 *             for item in chunk:
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_12ChunkedArray_25__iter__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_12ChunkedArray_25__iter__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_12ChunkedArray_24__iter__(((struct __pyx_obj_7pyarrow_3lib_ChunkedArray *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_12ChunkedArray_24__iter__(struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_self) {
      struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_13___iter__ *__pyx_cur_scope;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__iter__", 0);
      __pyx_cur_scope = (struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_13___iter__ *)__pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_13___iter__(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_13___iter__, __pyx_mstate_global->__pyx_empty_tuple, NULL);
      if (unlikely(!__pyx_cur_scope)) {
        __pyx_cur_scope = ((struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_13___iter__ *)Py_None);
        __Pyx_INCREF(Py_None);
        __PYX_ERR(17, 293, __pyx_L1_error)
      } else {
        __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
      }
      __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
      __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
      __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
      {
        __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7pyarrow_3lib_12ChunkedArray_26generator9, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[12]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_iter, __pyx_mstate_global->__pyx_n_u_ChunkedArray___iter, __pyx_mstate_global->__pyx_n_u_pyarrow_lib); if (unlikely(!gen)) __PYX_ERR(17, 293, __pyx_L1_error)
        __Pyx_DECREF(__pyx_cur_scope);
        __Pyx_RefNannyFinishContext();
        return (PyObject *) gen;
      }

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_AddTraceback("pyarrow.lib.ChunkedArray.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __Pyx_DECREF((PyObject *)__pyx_cur_scope);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_gb_7pyarrow_3lib_12ChunkedArray_26generator9(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
      struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_13___iter__ *__pyx_cur_scope = ((struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_13___iter__ *)__pyx_generator->closure);
      PyObject *__pyx_r = NULL;
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      size_t __pyx_t_3;
      Py_ssize_t __pyx_t_4;
      PyObject *(*__pyx_t_5)(PyObject *);
      Py_ssize_t __pyx_t_6;
      PyObject *(*__pyx_t_7)(PyObject *);
      PyObject *__pyx_t_8 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__iter__", 0);
      switch (__pyx_generator->resume_label) {
        case 0: goto __pyx_L3_first_run;
        case 1: goto __pyx_L8_resume_from_yield;
        default: /* CPython raises the right error here */
        __Pyx_RefNannyFinishContext();
        return NULL;
      }
      __pyx_L3_first_run:;
      if (unlikely(__pyx_sent_value != Py_None)) {
        if (unlikely(__pyx_sent_value)) PyErr_SetString(PyExc_TypeError, "can't send non-None value to a just-started generator");
        __PYX_ERR(17, 293, __pyx_L1_error)
      }

      /* "pyarrow/table.pxi":294
 * 
 *     def __iter__(self):
 *         for chunk in self.iterchunks():             # <<<<<<<<<<<<<<
 *             for item in chunk:
 *                 yield item
*/
      __pyx_t_2 = ((PyObject *)__pyx_cur_scope->__pyx_v_self);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_3 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_iterchunks, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 294, __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_4 = 0;
        __pyx_t_5 = NULL;
      } else {
        __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 294, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_5 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 294, __pyx_L1_error)
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      for (;;) {
        if (likely(!__pyx_t_5)) {
          if (likely(PyList_CheckExact(__pyx_t_2))) {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2);
              #if !CYTHON_ASSUME_SAFE_SIZE
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(17, 294, __pyx_L1_error)
              #endif
              if (__pyx_t_4 >= __pyx_temp) break;
            }
            __pyx_t_1 = __Pyx_PyList_GetItemRefFast(__pyx_t_2, __pyx_t_4, __Pyx_ReferenceSharing_OwnStrongReference);
            ++__pyx_t_4;
          } else {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2);
              #if !CYTHON_ASSUME_SAFE_SIZE
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(17, 294, __pyx_L1_error)
              #endif
              if (__pyx_t_4 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_1 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4));
            #else
            __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_4);
            #endif
            ++__pyx_t_4;
          }
          if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 294, __pyx_L1_error)
        } else {
          __pyx_t_1 = __pyx_t_5(__pyx_t_2);
          if (unlikely(!__pyx_t_1)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(17, 294, __pyx_L1_error)
              PyErr_Clear();
            }
            break;
          }
        }
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_chunk);
        __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_chunk, __pyx_t_1);
        __Pyx_GIVEREF(__pyx_t_1);
        __pyx_t_1 = 0;

        /* "pyarrow/table.pxi":295
 *     def __iter__(self):
 *         for chunk in self.iterchunks():
 *             for item in chunk:             # <<<<<<<<<<<<<<
 *                 yield item
 * 
*/
        if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_v_chunk)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_v_chunk)) {
          __pyx_t_1 = __pyx_cur_scope->__pyx_v_chunk; __Pyx_INCREF(__pyx_t_1);
          __pyx_t_6 = 0;
          __pyx_t_7 = NULL;
        } else {
          __pyx_t_6 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_chunk); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 295, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 295, __pyx_L1_error)
        }
        for (;;) {
          if (likely(!__pyx_t_7)) {
            if (likely(PyList_CheckExact(__pyx_t_1))) {
              {
                Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
                #if !CYTHON_ASSUME_SAFE_SIZE
                if (unlikely((__pyx_temp < 0))) __PYX_ERR(17, 295, __pyx_L1_error)
                #endif
                if (__pyx_t_6 >= __pyx_temp) break;
              }
              __pyx_t_8 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_6, __Pyx_ReferenceSharing_OwnStrongReference);
              ++__pyx_t_6;
            } else {
              {
                Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
                #if !CYTHON_ASSUME_SAFE_SIZE
                if (unlikely((__pyx_temp < 0))) __PYX_ERR(17, 295, __pyx_L1_error)
                #endif
                if (__pyx_t_6 >= __pyx_temp) break;
              }
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_8 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_6));
              #else
              __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_6);
              #endif
              ++__pyx_t_6;
            }
            if (unlikely(!__pyx_t_8)) __PYX_ERR(17, 295, __pyx_L1_error)
          } else {
            __pyx_t_8 = __pyx_t_7(__pyx_t_1);
            if (unlikely(!__pyx_t_8)) {
              PyObject* exc_type = PyErr_Occurred();
              if (exc_type) {
                if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(17, 295, __pyx_L1_error)
                PyErr_Clear();
              }
              break;
            }
          }
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_item);
          __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_item, __pyx_t_8);
          __Pyx_GIVEREF(__pyx_t_8);
          __pyx_t_8 = 0;

          /* "pyarrow/table.pxi":296
 *         for chunk in self.iterchunks():
 *             for item in chunk:
 *                 yield item             # <<<<<<<<<<<<<<
 * 
 *     def __getitem__(self, key):
*/
          __Pyx_INCREF(__pyx_cur_scope->__pyx_v_item);
          __pyx_r = __pyx_cur_scope->__pyx_v_item;
          __Pyx_XGIVEREF(__pyx_t_1);
          __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
          __Pyx_XGIVEREF(__pyx_t_2);
          __pyx_cur_scope->__pyx_t_1 = __pyx_t_2;
          __pyx_cur_scope->__pyx_t_2 = __pyx_t_4;
          __pyx_cur_scope->__pyx_t_3 = __pyx_t_5;
          __pyx_cur_scope->__pyx_t_4 = __pyx_t_6;
          __pyx_cur_scope->__pyx_t_5 = __pyx_t_7;
          __Pyx_XGIVEREF(__pyx_r);
          __Pyx_RefNannyFinishContext();
          __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
          /* return from generator, yielding value */
          __pyx_generator->resume_label = 1;
          return __pyx_r;
          __pyx_L8_resume_from_yield:;
          __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
          __pyx_cur_scope->__pyx_t_0 = 0;
          __Pyx_XGOTREF(__pyx_t_1);
          __pyx_t_2 = __pyx_cur_scope->__pyx_t_1;
          __pyx_cur_scope->__pyx_t_1 = 0;
          __Pyx_XGOTREF(__pyx_t_2);
          __pyx_t_4 = __pyx_cur_scope->__pyx_t_2;
          __pyx_t_5 = __pyx_cur_scope->__pyx_t_3;
          __pyx_t_6 = __pyx_cur_scope->__pyx_t_4;
          __pyx_t_7 = __pyx_cur_scope->__pyx_t_5;
          if (unlikely(!__pyx_sent_value)) __PYX_ERR(17, 296, __pyx_L1_error)

          /* "pyarrow/table.pxi":295
 *     def __iter__(self):
 *         for chunk in self.iterchunks():
 *             for item in chunk:             # <<<<<<<<<<<<<<
 *                 yield item
 * 
*/
        }
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

        /* "pyarrow/table.pxi":294
 * 
 *     def __iter__(self):
 *         for chunk in self.iterchunks():             # <<<<<<<<<<<<<<
 *             for item in chunk:
 *                 yield item
*/
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

      /* "pyarrow/table.pxi":293
 *         return super(ChunkedArray, self).__sizeof__() + self.nbytes
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         for chunk in self.iterchunks():
 *             for item in chunk:
*/

      /* 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_8);
      if (__Pyx_PyErr_Occurred()) {
        __Pyx_Generator_Replace_StopIteration(0);
        __Pyx_AddTraceback("__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      }
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      #if !CYTHON_USE_EXC_INFO_STACK
      __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
      #endif
      __pyx_generator->resume_label = -1;
      __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/table.pxi":298
 *                 yield item
 * 
 *     def __getitem__(self, key):             # <<<<<<<<<<<<<<
 *         """
 *         Slice or return value at given index
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_12ChunkedArray_28__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_12ChunkedArray_27__getitem__, "ChunkedArray.__getitem__(self, key)\n\nSlice or return value at given index\n\nParameters\n----------\nkey : integer or slice\n    Slices with step not equal to 1 (or None) will produce a copy\n    rather than a zero-copy view\n\nReturns\n-------\nvalue : Scalar (index) or ChunkedArray (slice)");
    #if CYTHON_UPDATE_DESCRIPTOR_DOC
    struct wrapperbase __pyx_wrapperbase_7pyarrow_3lib_12ChunkedArray_27__getitem__;
    #endif
    static PyObject *__pyx_pw_7pyarrow_3lib_12ChunkedArray_28__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_12ChunkedArray_27__getitem__(((struct __pyx_obj_7pyarrow_3lib_ChunkedArray *)__pyx_v_self), ((PyObject *)__pyx_v_key));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_12ChunkedArray_27__getitem__(struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_self, PyObject *__pyx_v_key) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      size_t __pyx_t_3;
      int __pyx_t_4;
      PyObject *__pyx_t_5 = NULL;
      Py_ssize_t __pyx_t_6;
      Py_ssize_t __pyx_t_7;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__getitem__", 0);

      /* "pyarrow/table.pxi":312
 *         value : Scalar (index) or ChunkedArray (slice)
 *         """
 *         self._assert_cpu()             # <<<<<<<<<<<<<<
 *         if isinstance(key, slice):
 *             return _normalize_slice(self, key)
*/
      __pyx_t_2 = ((PyObject *)__pyx_v_self);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_3 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_assert_cpu, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 312, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "pyarrow/table.pxi":313
 *         """
 *         self._assert_cpu()
 *         if isinstance(key, slice):             # <<<<<<<<<<<<<<
 *             return _normalize_slice(self, key)
 * 
*/
      __pyx_t_4 = PySlice_Check(__pyx_v_key); 
      if (__pyx_t_4) {

        /* "pyarrow/table.pxi":314
 *         self._assert_cpu()
 *         if isinstance(key, slice):
 *             return _normalize_slice(self, key)             # <<<<<<<<<<<<<<
 * 
 *         return self.getitem(_normalize_index(key, self.chunked_array.length()))
*/
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_2 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_normalize_slice); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 314, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_3 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5);
          assert(__pyx_t_2);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
          __pyx_t_3 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[3] = {__pyx_t_2, ((PyObject *)__pyx_v_self), __pyx_v_key};
          __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_3, (3-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 314, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
        }
        __pyx_r = __pyx_t_1;
        __pyx_t_1 = 0;
        goto __pyx_L0;

        /* "pyarrow/table.pxi":313
 *         """
 *         self._assert_cpu()
 *         if isinstance(key, slice):             # <<<<<<<<<<<<<<
 *             return _normalize_slice(self, key)
 * 
*/
      }

      /* "pyarrow/table.pxi":316
 *             return _normalize_slice(self, key)
 * 
 *         return self.getitem(_normalize_index(key, self.chunked_array.length()))             # <<<<<<<<<<<<<<
 * 
 *     cdef getitem(self, int64_t i):
*/
      __Pyx_XDECREF(__pyx_r);
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "getitem");
        __PYX_ERR(17, 316, __pyx_L1_error)
      }
      __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_v_key); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(17, 316, __pyx_L1_error)
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "chunked_array");
        __PYX_ERR(17, 316, __pyx_L1_error)
      }
      __pyx_t_7 = __pyx_f_7pyarrow_3lib__normalize_index(__pyx_t_6, __pyx_v_self->chunked_array->length()); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1L))) __PYX_ERR(17, 316, __pyx_L1_error)
      __pyx_t_1 = ((struct __pyx_vtabstruct_7pyarrow_3lib_ChunkedArray *)__pyx_v_self->__pyx_vtab)->getitem(__pyx_v_self, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 316, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/table.pxi":298
 *                 yield item
 * 
 *     def __getitem__(self, key):             # <<<<<<<<<<<<<<
 *         """
 *         Slice or return value at given index
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_AddTraceback("pyarrow.lib.ChunkedArray.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/table.pxi":318
 *         return self.getitem(_normalize_index(key, self.chunked_array.length()))
 * 
 *     cdef getitem(self, int64_t i):             # <<<<<<<<<<<<<<
 *         self._assert_cpu()
 *         return Scalar.wrap(GetResultValue(self.chunked_array.GetScalar(i)))
*/

    static PyObject *__pyx_f_7pyarrow_3lib_12ChunkedArray_getitem(struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_self, int64_t __pyx_v_i) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      size_t __pyx_t_3;
      std::shared_ptr< arrow::Scalar>  __pyx_t_4;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("getitem", 0);

      /* "pyarrow/table.pxi":319
 * 
 *     cdef getitem(self, int64_t i):
 *         self._assert_cpu()             # <<<<<<<<<<<<<<
 *         return Scalar.wrap(GetResultValue(self.chunked_array.GetScalar(i)))
 * 
*/
      __pyx_t_2 = ((PyObject *)__pyx_v_self);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_3 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_assert_cpu, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 319, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "pyarrow/table.pxi":320
 *     cdef getitem(self, int64_t i):
 *         self._assert_cpu()
 *         return Scalar.wrap(GetResultValue(self.chunked_array.GetScalar(i)))             # <<<<<<<<<<<<<<
 * 
 *     def is_null(self, *, nan_is_null=False):
*/
      __Pyx_XDECREF(__pyx_r);
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "chunked_array");
        __PYX_ERR(17, 320, __pyx_L1_error)
      }
      __pyx_t_4 = arrow::py::GetResultValue<std::shared_ptr< arrow::Scalar> >(__pyx_v_self->chunked_array->GetScalar(__pyx_v_i)); if (unlikely(PyErr_Occurred())) __PYX_ERR(17, 320, __pyx_L1_error)
      __pyx_t_1 = __pyx_f_7pyarrow_3lib_6Scalar_wrap(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 320, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/table.pxi":318
 *         return self.getitem(_normalize_index(key, self.chunked_array.length()))
 * 
 *     cdef getitem(self, int64_t i):             # <<<<<<<<<<<<<<
 *         self._assert_cpu()
 *         return Scalar.wrap(GetResultValue(self.chunked_array.GetScalar(i)))
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_AddTraceback("pyarrow.lib.ChunkedArray.getitem", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = 0;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/table.pxi":322
 *         return Scalar.wrap(GetResultValue(self.chunked_array.GetScalar(i)))
 * 
 *     def is_null(self, *, nan_is_null=False):             # <<<<<<<<<<<<<<
 *         """
 *         Return boolean array indicating the null values.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_12ChunkedArray_30is_null(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_12ChunkedArray_29is_null, "ChunkedArray.is_null(self, *, nan_is_null=False)\n\nReturn boolean array indicating the null values.\n\nParameters\n----------\nnan_is_null : bool (optional, default False)\n    Whether floating-point NaN values should also be considered null.\n\nReturns\n-------\narray : boolean Array or ChunkedArray\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> n_legs = pa.chunked_array([[2, 2, 4], [4, None, 100]])\n>>> n_legs.is_null()\n<pyarrow.lib.ChunkedArray object at ...>\n[\n  [\n    false,\n    false,\n    false,\n    false,\n    true,\n    false\n  ]\n]");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_12ChunkedArray_30is_null = {"is_null", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12ChunkedArray_30is_null, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12ChunkedArray_29is_null};
    static PyObject *__pyx_pw_7pyarrow_3lib_12ChunkedArray_30is_null(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_nan_is_null = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("is_null (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_nan_is_null,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(17, 322, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, 0, __pyx_kwds_len, "is_null", 0) < (0)) __PYX_ERR(17, 322, __pyx_L3_error)
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_False));
        } else if (unlikely(__pyx_nargs != 0)) {
          goto __pyx_L5_argtuple_error;
        } else {
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_False));
        }
        __pyx_v_nan_is_null = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("is_null", 1, 0, 0, __pyx_nargs); __PYX_ERR(17, 322, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.ChunkedArray.is_null", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_12ChunkedArray_29is_null(((struct __pyx_obj_7pyarrow_3lib_ChunkedArray *)__pyx_v_self), __pyx_v_nan_is_null);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_12ChunkedArray_29is_null(struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_self, PyObject *__pyx_v_nan_is_null) {
      PyObject *__pyx_v_options = NULL;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      size_t __pyx_t_3;
      PyObject *__pyx_t_4 = NULL;
      PyObject *__pyx_t_5 = NULL;
      PyObject *__pyx_t_6 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("is_null", 0);

      /* "pyarrow/table.pxi":352
 *         ]
 *         """
 *         self._assert_cpu()             # <<<<<<<<<<<<<<
 *         options = _pc().NullOptions(nan_is_null=nan_is_null)
 *         return _pc().call_function('is_null', [self], options)
*/
      __pyx_t_2 = ((PyObject *)__pyx_v_self);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_3 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_assert_cpu, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 352, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "pyarrow/table.pxi":353
 *         """
 *         self._assert_cpu()
 *         options = _pc().NullOptions(nan_is_null=nan_is_null)             # <<<<<<<<<<<<<<
 *         return _pc().call_function('is_null', [self], options)
 * 
*/
      __pyx_t_5 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_pc_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 353, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_3 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
        assert(__pyx_t_5);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
        __pyx_t_3 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
        __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 353, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
      }
      __pyx_t_2 = __pyx_t_4;
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_3 = 0;
      {
        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, NULL};
        __pyx_t_6 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 353, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_nan_is_null, __pyx_v_nan_is_null, __pyx_t_6, __pyx_callargs+1, 0) < (0)) __PYX_ERR(17, 353, __pyx_L1_error)
        __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_NullOptions, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_6);
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 353, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_v_options = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "pyarrow/table.pxi":354
 *         self._assert_cpu()
 *         options = _pc().NullOptions(nan_is_null=nan_is_null)
 *         return _pc().call_function('is_null', [self], options)             # <<<<<<<<<<<<<<
 * 
 *     def is_nan(self):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pc_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 354, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_3 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5);
        assert(__pyx_t_2);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
        __pyx_t_3 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
        __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 354, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
      }
      __pyx_t_4 = __pyx_t_6;
      __Pyx_INCREF(__pyx_t_4);
      __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 354, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_INCREF((PyObject *)__pyx_v_self);
      __Pyx_GIVEREF((PyObject *)__pyx_v_self);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_self)) != (0)) __PYX_ERR(17, 354, __pyx_L1_error);
      __pyx_t_3 = 0;
      {
        PyObject *__pyx_callargs[4] = {__pyx_t_4, __pyx_mstate_global->__pyx_n_u_is_null, __pyx_t_5, __pyx_v_options};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_call_function, __pyx_callargs+__pyx_t_3, (4-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 354, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/table.pxi":322
 *         return Scalar.wrap(GetResultValue(self.chunked_array.GetScalar(i)))
 * 
 *     def is_null(self, *, nan_is_null=False):             # <<<<<<<<<<<<<<
 *         """
 *         Return boolean array indicating the null values.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_AddTraceback("pyarrow.lib.ChunkedArray.is_null", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_options);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/table.pxi":356
 *         return _pc().call_function('is_null', [self], options)
 * 
 *     def is_nan(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return boolean array indicating the NaN values.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_12ChunkedArray_32is_nan(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_12ChunkedArray_31is_nan, "ChunkedArray.is_nan(self)\n\nReturn boolean array indicating the NaN values.\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> import numpy as np\n>>> arr = pa.chunked_array([[2, np.nan, 4], [4, None, 100]])\n>>> arr.is_nan()\n<pyarrow.lib.ChunkedArray object at ...>\n[\n  [\n    false,\n    true,\n    false,\n    false,\n    null,\n    false\n  ]\n]");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_12ChunkedArray_32is_nan = {"is_nan", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12ChunkedArray_32is_nan, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12ChunkedArray_31is_nan};
    static PyObject *__pyx_pw_7pyarrow_3lib_12ChunkedArray_32is_nan(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("is_nan (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("is_nan", 1, 0, 0, __pyx_nargs); return NULL; }
      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
      if (unlikely(__pyx_kwds_len < 0)) return NULL;
      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("is_nan", __pyx_kwds); return NULL;}
      __pyx_r = __pyx_pf_7pyarrow_3lib_12ChunkedArray_31is_nan(((struct __pyx_obj_7pyarrow_3lib_ChunkedArray *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_12ChunkedArray_31is_nan(struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      size_t __pyx_t_3;
      PyObject *__pyx_t_4 = NULL;
      PyObject *__pyx_t_5 = NULL;
      PyObject *__pyx_t_6 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("is_nan", 0);

      /* "pyarrow/table.pxi":378
 *         ]
 *         """
 *         self._assert_cpu()             # <<<<<<<<<<<<<<
 *         return _pc().is_nan(self)
 * 
*/
      __pyx_t_2 = ((PyObject *)__pyx_v_self);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_3 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_assert_cpu, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 378, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "pyarrow/table.pxi":379
 *         """
 *         self._assert_cpu()
 *         return _pc().is_nan(self)             # <<<<<<<<<<<<<<
 * 
 *     def is_valid(self):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_5 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_pc_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 379, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_3 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
        assert(__pyx_t_5);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
        __pyx_t_3 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
        __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 379, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
      }
      __pyx_t_2 = __pyx_t_4;
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_3 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, ((PyObject *)__pyx_v_self)};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_is_nan, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 379, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/table.pxi":356
 *         return _pc().call_function('is_null', [self], options)
 * 
 *     def is_nan(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return boolean array indicating the NaN values.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_AddTraceback("pyarrow.lib.ChunkedArray.is_nan", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/table.pxi":381
 *         return _pc().is_nan(self)
 * 
 *     def is_valid(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return boolean array indicating the non-null values.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_12ChunkedArray_34is_valid(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_12ChunkedArray_33is_valid, "ChunkedArray.is_valid(self)\n\nReturn boolean array indicating the non-null values.\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> n_legs = pa.chunked_array([[2, 2, 4], [4, None, 100]])\n>>> n_legs.is_valid()\n<pyarrow.lib.ChunkedArray object at ...>\n[\n  [\n    true,\n    true,\n    true\n  ],\n  [\n    true,\n    false,\n    true\n  ]\n]");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_12ChunkedArray_34is_valid = {"is_valid", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12ChunkedArray_34is_valid, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12ChunkedArray_33is_valid};
    static PyObject *__pyx_pw_7pyarrow_3lib_12ChunkedArray_34is_valid(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("is_valid (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("is_valid", 1, 0, 0, __pyx_nargs); return NULL; }
      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
      if (unlikely(__pyx_kwds_len < 0)) return NULL;
      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("is_valid", __pyx_kwds); return NULL;}
      __pyx_r = __pyx_pf_7pyarrow_3lib_12ChunkedArray_33is_valid(((struct __pyx_obj_7pyarrow_3lib_ChunkedArray *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_12ChunkedArray_33is_valid(struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      size_t __pyx_t_3;
      PyObject *__pyx_t_4 = NULL;
      PyObject *__pyx_t_5 = NULL;
      PyObject *__pyx_t_6 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("is_valid", 0);

      /* "pyarrow/table.pxi":404
 *         ]
 *         """
 *         self._assert_cpu()             # <<<<<<<<<<<<<<
 *         return _pc().is_valid(self)
 * 
*/
      __pyx_t_2 = ((PyObject *)__pyx_v_self);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_3 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_assert_cpu, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 404, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "pyarrow/table.pxi":405
 *         """
 *         self._assert_cpu()
 *         return _pc().is_valid(self)             # <<<<<<<<<<<<<<
 * 
 *     def __eq__(self, other):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_5 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_pc_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 405, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_3 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
        assert(__pyx_t_5);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
        __pyx_t_3 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
        __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 405, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
      }
      __pyx_t_2 = __pyx_t_4;
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_3 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, ((PyObject *)__pyx_v_self)};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_is_valid, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 405, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/table.pxi":381
 *         return _pc().is_nan(self)
 * 
 *     def is_valid(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return boolean array indicating the non-null values.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_AddTraceback("pyarrow.lib.ChunkedArray.is_valid", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/table.pxi":407
 *         return _pc().is_valid(self)
 * 
 *     def __eq__(self, other):             # <<<<<<<<<<<<<<
 *         try:
 *             return self.equals(other)
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_12ChunkedArray_36__eq__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_12ChunkedArray_36__eq__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__eq__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_12ChunkedArray_35__eq__(((struct __pyx_obj_7pyarrow_3lib_ChunkedArray *)__pyx_v_self), ((PyObject *)__pyx_v_other));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_12ChunkedArray_35__eq__(struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_self, PyObject *__pyx_v_other) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      PyObject *__pyx_t_5 = NULL;
      size_t __pyx_t_6;
      int __pyx_t_7;
      PyObject *__pyx_t_8 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__eq__", 0);

      /* "pyarrow/table.pxi":408
 * 
 *     def __eq__(self, other):
 *         try:             # <<<<<<<<<<<<<<
 *             return self.equals(other)
 *         except TypeError:
*/
      {
        __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:*/ {

          /* "pyarrow/table.pxi":409
 *     def __eq__(self, other):
 *         try:
 *             return self.equals(other)             # <<<<<<<<<<<<<<
 *         except TypeError:
 *             return NotImplemented
*/
          __Pyx_XDECREF(__pyx_r);
          __pyx_t_5 = ((PyObject *)__pyx_v_self);
          __Pyx_INCREF(__pyx_t_5);
          __pyx_t_6 = 0;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_other};
            __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_equals, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
            if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 409, __pyx_L3_error)
            __Pyx_GOTREF(__pyx_t_4);
          }
          __pyx_r = __pyx_t_4;
          __pyx_t_4 = 0;
          goto __pyx_L7_try_return;

          /* "pyarrow/table.pxi":408
 * 
 *     def __eq__(self, other):
 *         try:             # <<<<<<<<<<<<<<
 *             return self.equals(other)
 *         except TypeError:
*/
        }
        __pyx_L3_error:;
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

        /* "pyarrow/table.pxi":410
 *         try:
 *             return self.equals(other)
 *         except TypeError:             # <<<<<<<<<<<<<<
 *             return NotImplemented
 * 
*/
        __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_TypeError))));
        if (__pyx_t_7) {
          __Pyx_AddTraceback("pyarrow.lib.ChunkedArray.__eq__", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_8) < 0) __PYX_ERR(17, 410, __pyx_L5_except_error)
          __Pyx_XGOTREF(__pyx_t_4);
          __Pyx_XGOTREF(__pyx_t_5);
          __Pyx_XGOTREF(__pyx_t_8);

          /* "pyarrow/table.pxi":411
 *             return self.equals(other)
 *         except TypeError:
 *             return NotImplemented             # <<<<<<<<<<<<<<
 * 
 *     def fill_null(self, fill_value):
*/
          __Pyx_XDECREF(__pyx_r);
          __Pyx_INCREF(__pyx_builtin_NotImplemented);
          __pyx_r = __pyx_builtin_NotImplemented;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          goto __pyx_L6_except_return;
        }
        goto __pyx_L5_except_error;

        /* "pyarrow/table.pxi":408
 * 
 *     def __eq__(self, other):
 *         try:             # <<<<<<<<<<<<<<
 *             return self.equals(other)
 *         except TypeError:
*/
        __pyx_L5_except_error:;
        __Pyx_XGIVEREF(__pyx_t_1);
        __Pyx_XGIVEREF(__pyx_t_2);
        __Pyx_XGIVEREF(__pyx_t_3);
        __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
        goto __pyx_L1_error;
        __pyx_L7_try_return:;
        __Pyx_XGIVEREF(__pyx_t_1);
        __Pyx_XGIVEREF(__pyx_t_2);
        __Pyx_XGIVEREF(__pyx_t_3);
        __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
        goto __pyx_L0;
        __pyx_L6_except_return:;
        __Pyx_XGIVEREF(__pyx_t_1);
        __Pyx_XGIVEREF(__pyx_t_2);
        __Pyx_XGIVEREF(__pyx_t_3);
        __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
        goto __pyx_L0;
      }

      /* "pyarrow/table.pxi":407
 *         return _pc().is_valid(self)
 * 
 *     def __eq__(self, other):             # <<<<<<<<<<<<<<
 *         try:
 *             return self.equals(other)
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_8);
      __Pyx_AddTraceback("pyarrow.lib.ChunkedArray.__eq__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/table.pxi":413
 *             return NotImplemented
 * 
 *     def fill_null(self, fill_value):             # <<<<<<<<<<<<<<
 *         """
 *         Replace each null element in values with fill_value.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_12ChunkedArray_38fill_null(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_12ChunkedArray_37fill_null, "ChunkedArray.fill_null(self, fill_value)\n\nReplace each null element in values with fill_value.\n\nSee :func:`pyarrow.compute.fill_null` for full usage.\n\nParameters\n----------\nfill_value : any\n    The replacement value for null entries.\n\nReturns\n-------\nresult : Array or ChunkedArray\n    A new array with nulls replaced by the given value.\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> fill_value = pa.scalar(5, type=pa.int8())\n>>> n_legs = pa.chunked_array([[2, 2, 4], [4, None, 100]])\n>>> n_legs.fill_null(fill_value)\n<pyarrow.lib.ChunkedArray object at ...>\n[\n  [\n    2,\n    2,\n    4,\n    4,\n    5,\n    100\n  ]\n]");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_12ChunkedArray_38fill_null = {"fill_null", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12ChunkedArray_38fill_null, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12ChunkedArray_37fill_null};
    static PyObject *__pyx_pw_7pyarrow_3lib_12ChunkedArray_38fill_null(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_fill_value = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("fill_null (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_fill_value,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(17, 413, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 413, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "fill_null", 0) < (0)) __PYX_ERR(17, 413, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("fill_null", 1, 1, 1, i); __PYX_ERR(17, 413, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 1)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 413, __pyx_L3_error)
        }
        __pyx_v_fill_value = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("fill_null", 1, 1, 1, __pyx_nargs); __PYX_ERR(17, 413, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.ChunkedArray.fill_null", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_12ChunkedArray_37fill_null(((struct __pyx_obj_7pyarrow_3lib_ChunkedArray *)__pyx_v_self), __pyx_v_fill_value);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_12ChunkedArray_37fill_null(struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_self, PyObject *__pyx_v_fill_value) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      size_t __pyx_t_3;
      PyObject *__pyx_t_4 = NULL;
      PyObject *__pyx_t_5 = NULL;
      PyObject *__pyx_t_6 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("fill_null", 0);

      /* "pyarrow/table.pxi":447
 *         ]
 *         """
 *         self._assert_cpu()             # <<<<<<<<<<<<<<
 *         return _pc().fill_null(self, fill_value)
 * 
*/
      __pyx_t_2 = ((PyObject *)__pyx_v_self);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_3 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_assert_cpu, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 447, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "pyarrow/table.pxi":448
 *         """
 *         self._assert_cpu()
 *         return _pc().fill_null(self, fill_value)             # <<<<<<<<<<<<<<
 * 
 *     def equals(self, ChunkedArray other):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_5 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_pc_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 448, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_3 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
        assert(__pyx_t_5);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
        __pyx_t_3 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
        __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 448, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
      }
      __pyx_t_2 = __pyx_t_4;
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_3 = 0;
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_2, ((PyObject *)__pyx_v_self), __pyx_v_fill_value};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_fill_null, __pyx_callargs+__pyx_t_3, (3-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 448, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/table.pxi":413
 *             return NotImplemented
 * 
 *     def fill_null(self, fill_value):             # <<<<<<<<<<<<<<
 *         """
 *         Replace each null element in values with fill_value.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_AddTraceback("pyarrow.lib.ChunkedArray.fill_null", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/table.pxi":450
 *         return _pc().fill_null(self, fill_value)
 * 
 *     def equals(self, ChunkedArray other):             # <<<<<<<<<<<<<<
 *         """
 *         Return whether the contents of two chunked arrays are equal.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_12ChunkedArray_40equals(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_12ChunkedArray_39equals, "ChunkedArray.equals(self, ChunkedArray other)\n\nReturn whether the contents of two chunked arrays are equal.\n\nParameters\n----------\nother : pyarrow.ChunkedArray\n    Chunked array to compare against.\n\nReturns\n-------\nare_equal : bool\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> n_legs = pa.chunked_array([[2, 2, 4], [4, 5, 100]])\n>>> animals = pa.chunked_array((\n...             [\"Flamingo\", \"Parrot\", \"Dog\"],\n...             [\"Horse\", \"Brittle stars\", \"Centipede\"]\n...             ))\n>>> n_legs.equals(n_legs)\nTrue\n>>> n_legs.equals(animals)\nFalse");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_12ChunkedArray_40equals = {"equals", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12ChunkedArray_40equals, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12ChunkedArray_39equals};
    static PyObject *__pyx_pw_7pyarrow_3lib_12ChunkedArray_40equals(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_other = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("equals (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_other,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(17, 450, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 450, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "equals", 0) < (0)) __PYX_ERR(17, 450, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("equals", 1, 1, 1, i); __PYX_ERR(17, 450, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 1)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 450, __pyx_L3_error)
        }
        __pyx_v_other = ((struct __pyx_obj_7pyarrow_3lib_ChunkedArray *)values[0]);
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("equals", 1, 1, 1, __pyx_nargs); __PYX_ERR(17, 450, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.ChunkedArray.equals", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ChunkedArray, 1, "other", 0))) __PYX_ERR(17, 450, __pyx_L1_error)
      __pyx_r = __pyx_pf_7pyarrow_3lib_12ChunkedArray_39equals(((struct __pyx_obj_7pyarrow_3lib_ChunkedArray *)__pyx_v_self), __pyx_v_other);

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = NULL;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      goto __pyx_L7_cleaned_up;
      __pyx_L0:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __pyx_L7_cleaned_up:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_12ChunkedArray_39equals(struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_self, struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_other) {
       arrow::ChunkedArray *__pyx_v_this_arr;
       arrow::ChunkedArray *__pyx_v_other_arr;
      bool __pyx_v_result;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      size_t __pyx_t_3;
      int __pyx_t_4;
       arrow::ChunkedArray *__pyx_t_5;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("equals", 0);

      /* "pyarrow/table.pxi":476
 *         False
 *         """
 *         self._assert_cpu()             # <<<<<<<<<<<<<<
 *         if other is None:
 *             return False
*/
      __pyx_t_2 = ((PyObject *)__pyx_v_self);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_3 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_assert_cpu, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 476, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "pyarrow/table.pxi":477
 *         """
 *         self._assert_cpu()
 *         if other is None:             # <<<<<<<<<<<<<<
 *             return False
 * 
*/
      __pyx_t_4 = (((PyObject *)__pyx_v_other) == Py_None);
      if (__pyx_t_4) {

        /* "pyarrow/table.pxi":478
 *         self._assert_cpu()
 *         if other is None:
 *             return False             # <<<<<<<<<<<<<<
 * 
 *         cdef:
*/
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(Py_False);
        __pyx_r = Py_False;
        goto __pyx_L0;

        /* "pyarrow/table.pxi":477
 *         """
 *         self._assert_cpu()
 *         if other is None:             # <<<<<<<<<<<<<<
 *             return False
 * 
*/
      }

      /* "pyarrow/table.pxi":481
 * 
 *         cdef:
 *             CChunkedArray* this_arr = self.chunked_array             # <<<<<<<<<<<<<<
 *             CChunkedArray* other_arr = other.chunked_array
 *             c_bool result
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "chunked_array");
        __PYX_ERR(17, 481, __pyx_L1_error)
      }
      __pyx_t_5 = __pyx_v_self->chunked_array;
      __pyx_v_this_arr = __pyx_t_5;

      /* "pyarrow/table.pxi":482
 *         cdef:
 *             CChunkedArray* this_arr = self.chunked_array
 *             CChunkedArray* other_arr = other.chunked_array             # <<<<<<<<<<<<<<
 *             c_bool result
 * 
*/
      if (unlikely(((PyObject *)__pyx_v_other) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "chunked_array");
        __PYX_ERR(17, 482, __pyx_L1_error)
      }
      __pyx_t_5 = __pyx_v_other->chunked_array;
      __pyx_v_other_arr = __pyx_t_5;

      /* "pyarrow/table.pxi":485
 *             c_bool result
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             result = this_arr.Equals(deref(other_arr))
 * 
*/
      {
          PyThreadState * _save;
          _save = PyEval_SaveThread();
          __Pyx_FastGIL_Remember();
          /*try:*/ {

            /* "pyarrow/table.pxi":486
 * 
 *         with nogil:
 *             result = this_arr.Equals(deref(other_arr))             # <<<<<<<<<<<<<<
 * 
 *         return result
*/
            __pyx_v_result = __pyx_v_this_arr->Equals((*__pyx_v_other_arr));
          }

          /* "pyarrow/table.pxi":485
 *             c_bool result
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             result = this_arr.Equals(deref(other_arr))
 * 
*/
          /*finally:*/ {
            /*normal exit:*/{
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L6;
            }
            __pyx_L6:;
          }
      }

      /* "pyarrow/table.pxi":488
 *             result = this_arr.Equals(deref(other_arr))
 * 
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     def _to_pandas(self, options, types_mapper=None, **kwargs):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 488, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/table.pxi":450
 *         return _pc().fill_null(self, fill_value)
 * 
 *     def equals(self, ChunkedArray other):             # <<<<<<<<<<<<<<
 *         """
 *         Return whether the contents of two chunked arrays are equal.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_AddTraceback("pyarrow.lib.ChunkedArray.equals", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/table.pxi":490
 *         return result
 * 
 *     def _to_pandas(self, options, types_mapper=None, **kwargs):             # <<<<<<<<<<<<<<
 *         self._assert_cpu()
 *         return _array_like_to_pandas(self, options, types_mapper=types_mapper)
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_12ChunkedArray_42_to_pandas(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_12ChunkedArray_41_to_pandas, "ChunkedArray._to_pandas(self, options, types_mapper=None, **kwargs)");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_12ChunkedArray_42_to_pandas = {"_to_pandas", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12ChunkedArray_42_to_pandas, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12ChunkedArray_41_to_pandas};
    static PyObject *__pyx_pw_7pyarrow_3lib_12ChunkedArray_42_to_pandas(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_options = 0;
      PyObject *__pyx_v_types_mapper = 0;
      CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[2] = {0,0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("_to_pandas (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_options,&__pyx_mstate_global->__pyx_n_u_types_mapper,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(17, 490, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(17, 490, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 490, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, __pyx_v_kwargs, values, kwd_pos_args, __pyx_kwds_len, "_to_pandas", 1) < (0)) __PYX_ERR(17, 490, __pyx_L3_error)
          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_to_pandas", 0, 1, 2, i); __PYX_ERR(17, 490, __pyx_L3_error) }
          }
        } else {
          switch (__pyx_nargs) {
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(17, 490, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 490, __pyx_L3_error)
            break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
        }
        __pyx_v_options = values[0];
        __pyx_v_types_mapper = values[1];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("_to_pandas", 0, 1, 2, __pyx_nargs); __PYX_ERR(17, 490, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_XDECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
      __Pyx_AddTraceback("pyarrow.lib.ChunkedArray._to_pandas", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_12ChunkedArray_41_to_pandas(((struct __pyx_obj_7pyarrow_3lib_ChunkedArray *)__pyx_v_self), __pyx_v_options, __pyx_v_types_mapper, __pyx_v_kwargs);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_XDECREF(__pyx_v_kwargs);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_12ChunkedArray_41_to_pandas(struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_self, PyObject *__pyx_v_options, PyObject *__pyx_v_types_mapper, CYTHON_UNUSED PyObject *__pyx_v_kwargs) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      size_t __pyx_t_3;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("_to_pandas", 0);

      /* "pyarrow/table.pxi":491
 * 
 *     def _to_pandas(self, options, types_mapper=None, **kwargs):
 *         self._assert_cpu()             # <<<<<<<<<<<<<<
 *         return _array_like_to_pandas(self, options, types_mapper=types_mapper)
 * 
*/
      __pyx_t_2 = ((PyObject *)__pyx_v_self);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_3 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_assert_cpu, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 491, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "pyarrow/table.pxi":492
 *     def _to_pandas(self, options, types_mapper=None, **kwargs):
 *         self._assert_cpu()
 *         return _array_like_to_pandas(self, options, types_mapper=types_mapper)             # <<<<<<<<<<<<<<
 * 
 *     def to_numpy(self, zero_copy_only=False):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __pyx_f_7pyarrow_3lib__array_like_to_pandas(((PyObject *)__pyx_v_self), __pyx_v_options, __pyx_v_types_mapper); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 492, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/table.pxi":490
 *         return result
 * 
 *     def _to_pandas(self, options, types_mapper=None, **kwargs):             # <<<<<<<<<<<<<<
 *         self._assert_cpu()
 *         return _array_like_to_pandas(self, options, types_mapper=types_mapper)
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_AddTraceback("pyarrow.lib.ChunkedArray._to_pandas", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/table.pxi":494
 *         return _array_like_to_pandas(self, options, types_mapper=types_mapper)
 * 
 *     def to_numpy(self, zero_copy_only=False):             # <<<<<<<<<<<<<<
 *         """
 *         Return a NumPy copy of this array (experimental).
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_12ChunkedArray_44to_numpy(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_12ChunkedArray_43to_numpy, "ChunkedArray.to_numpy(self, zero_copy_only=False)\n\nReturn a NumPy copy of this array (experimental).\n\nParameters\n----------\nzero_copy_only : bool, default False\n    Introduced for signature consistence with pyarrow.Array.to_numpy.\n    This must be False here since NumPy arrays' buffer must be contiguous.\n\nReturns\n-------\narray : numpy.ndarray\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> n_legs = pa.chunked_array([[2, 2, 4], [4, 5, 100]])\n>>> n_legs.to_numpy()\narray([  2,   2,   4,   4,   5, 100])");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_12ChunkedArray_44to_numpy = {"to_numpy", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12ChunkedArray_44to_numpy, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12ChunkedArray_43to_numpy};
    static PyObject *__pyx_pw_7pyarrow_3lib_12ChunkedArray_44to_numpy(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_zero_copy_only = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("to_numpy (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_zero_copy_only,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(17, 494, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 494, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "to_numpy", 0) < (0)) __PYX_ERR(17, 494, __pyx_L3_error)
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_False));
        } else {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 494, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_False));
        }
        __pyx_v_zero_copy_only = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("to_numpy", 0, 0, 1, __pyx_nargs); __PYX_ERR(17, 494, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.ChunkedArray.to_numpy", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_12ChunkedArray_43to_numpy(((struct __pyx_obj_7pyarrow_3lib_ChunkedArray *)__pyx_v_self), __pyx_v_zero_copy_only);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_12ChunkedArray_43to_numpy(struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_self, PyObject *__pyx_v_zero_copy_only) {
      PyObject *__pyx_v_out;
      arrow::py::PandasOptions __pyx_v_c_options;
      PyObject *__pyx_v_values = 0;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      size_t __pyx_t_3;
      int __pyx_t_4;
      int __pyx_t_5;
      PyObject *__pyx_t_6 = NULL;
      PyObject *__pyx_t_7 = NULL;
      PyObject *__pyx_t_8 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("to_numpy", 0);

      /* "pyarrow/table.pxi":515
 *         array([  2,   2,   4,   4,   5, 100])
 *         """
 *         self._assert_cpu()             # <<<<<<<<<<<<<<
 *         if np is None:
 *             raise ImportError(
*/
      __pyx_t_2 = ((PyObject *)__pyx_v_self);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_3 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_assert_cpu, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 515, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "pyarrow/table.pxi":516
 *         """
 *         self._assert_cpu()
 *         if np is None:             # <<<<<<<<<<<<<<
 *             raise ImportError(
 *                 "Cannot return a numpy.ndarray if NumPy is not present")
*/
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 516, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_4 = (__pyx_t_1 == Py_None);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(__pyx_t_4)) {

        /* "pyarrow/table.pxi":517
 *         self._assert_cpu()
 *         if np is None:
 *             raise ImportError(             # <<<<<<<<<<<<<<
 *                 "Cannot return a numpy.ndarray if NumPy is not present")
 *         if zero_copy_only:
*/
        __pyx_t_2 = NULL;
        __pyx_t_3 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Cannot_return_a_numpy_ndarray_if};
          __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ImportError)), __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 517, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
        }
        __Pyx_Raise(__pyx_t_1, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __PYX_ERR(17, 517, __pyx_L1_error)

        /* "pyarrow/table.pxi":516
 *         """
 *         self._assert_cpu()
 *         if np is None:             # <<<<<<<<<<<<<<
 *             raise ImportError(
 *                 "Cannot return a numpy.ndarray if NumPy is not present")
*/
      }

      /* "pyarrow/table.pxi":519
 *             raise ImportError(
 *                 "Cannot return a numpy.ndarray if NumPy is not present")
 *         if zero_copy_only:             # <<<<<<<<<<<<<<
 *             raise ValueError(
 *                 "zero_copy_only must be False for pyarrow.ChunkedArray.to_numpy"
*/
      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_zero_copy_only); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(17, 519, __pyx_L1_error)
      if (unlikely(__pyx_t_4)) {

        /* "pyarrow/table.pxi":520
 *                 "Cannot return a numpy.ndarray if NumPy is not present")
 *         if zero_copy_only:
 *             raise ValueError(             # <<<<<<<<<<<<<<
 *                 "zero_copy_only must be False for pyarrow.ChunkedArray.to_numpy"
 *             )
*/
        __pyx_t_2 = NULL;
        __pyx_t_3 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_zero_copy_only_must_be_False_for};
          __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 520, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
        }
        __Pyx_Raise(__pyx_t_1, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __PYX_ERR(17, 520, __pyx_L1_error)

        /* "pyarrow/table.pxi":519
 *             raise ImportError(
 *                 "Cannot return a numpy.ndarray if NumPy is not present")
 *         if zero_copy_only:             # <<<<<<<<<<<<<<
 *             raise ValueError(
 *                 "zero_copy_only must be False for pyarrow.ChunkedArray.to_numpy"
*/
      }

      /* "pyarrow/table.pxi":528
 *             object values
 * 
 *         c_options.to_numpy = True             # <<<<<<<<<<<<<<
 * 
 *         with nogil:
*/
      __pyx_v_c_options.to_numpy = 1;

      /* "pyarrow/table.pxi":530
 *         c_options.to_numpy = True
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             check_status(
 *                 ConvertChunkedArrayToPandas(
*/
      {
          PyThreadState * _save;
          _save = PyEval_SaveThread();
          __Pyx_FastGIL_Remember();
          /*try:*/ {

            /* "pyarrow/table.pxi":534
 *                 ConvertChunkedArrayToPandas(
 *                     c_options,
 *                     self.sp_chunked_array,             # <<<<<<<<<<<<<<
 *                     self,
 *                     &out
*/
            if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
              PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_chunked_array");
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              __PYX_ERR(17, 534, __pyx_L6_error)
            }

            /* "pyarrow/table.pxi":531
 * 
 *         with nogil:
 *             check_status(             # <<<<<<<<<<<<<<
 *                 ConvertChunkedArrayToPandas(
 *                     c_options,
*/
            __pyx_t_5 = __pyx_f_7pyarrow_3lib_check_status(arrow::py::ConvertChunkedArrayToPandas(__pyx_v_c_options, __pyx_v_self->sp_chunked_array, ((PyObject *)__pyx_v_self), (&__pyx_v_out))); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(17, 531, __pyx_L6_error)
          }

          /* "pyarrow/table.pxi":530
 *         c_options.to_numpy = True
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             check_status(
 *                 ConvertChunkedArrayToPandas(
*/
          /*finally:*/ {
            /*normal exit:*/{
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L7;
            }
            __pyx_L6_error: {
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L1_error;
            }
            __pyx_L7:;
          }
      }

      /* "pyarrow/table.pxi":542
 *         # wrap_array_output uses pandas to convert to Categorical, here
 *         # always convert to numpy array
 *         values = PyObject_to_object(out)             # <<<<<<<<<<<<<<
 * 
 *         if isinstance(values, dict):
*/
      __pyx_t_1 = __pyx_f_7pyarrow_8includes_6common_PyObject_to_object(__pyx_v_out); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 542, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_v_values = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "pyarrow/table.pxi":544
 *         values = PyObject_to_object(out)
 * 
 *         if isinstance(values, dict):             # <<<<<<<<<<<<<<
 *             values = np.take(values['dictionary'], values['indices'])
 * 
*/
      __pyx_t_4 = PyDict_Check(__pyx_v_values); 
      if (__pyx_t_4) {

        /* "pyarrow/table.pxi":545
 * 
 *         if isinstance(values, dict):
 *             values = np.take(values['dictionary'], values['indices'])             # <<<<<<<<<<<<<<
 * 
 *         return values
*/
        __pyx_t_2 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 545, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_take); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 545, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(__pyx_v_values == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
          __PYX_ERR(17, 545, __pyx_L1_error)
        }
        __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_v_values, __pyx_mstate_global->__pyx_n_u_dictionary); if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 545, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        if (unlikely(__pyx_v_values == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
          __PYX_ERR(17, 545, __pyx_L1_error)
        }
        __pyx_t_8 = __Pyx_PyObject_Dict_GetItem(__pyx_v_values, __pyx_mstate_global->__pyx_n_u_indices); if (unlikely(!__pyx_t_8)) __PYX_ERR(17, 545, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_3 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_7))) {
          __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_7);
          assert(__pyx_t_2);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
          __pyx_t_3 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_t_6, __pyx_t_8};
          __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_3, (3-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 545, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
        }
        __Pyx_DECREF_SET(__pyx_v_values, __pyx_t_1);
        __pyx_t_1 = 0;

        /* "pyarrow/table.pxi":544
 *         values = PyObject_to_object(out)
 * 
 *         if isinstance(values, dict):             # <<<<<<<<<<<<<<
 *             values = np.take(values['dictionary'], values['indices'])
 * 
*/
      }

      /* "pyarrow/table.pxi":547
 *             values = np.take(values['dictionary'], values['indices'])
 * 
 *         return values             # <<<<<<<<<<<<<<
 * 
 *     def __array__(self, dtype=None, copy=None):
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_values);
      __pyx_r = __pyx_v_values;
      goto __pyx_L0;

      /* "pyarrow/table.pxi":494
 *         return _array_like_to_pandas(self, options, types_mapper=types_mapper)
 * 
 *     def to_numpy(self, zero_copy_only=False):             # <<<<<<<<<<<<<<
 *         """
 *         Return a NumPy copy of this array (experimental).
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_8);
      __Pyx_AddTraceback("pyarrow.lib.ChunkedArray.to_numpy", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_values);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/table.pxi":549
 *         return values
 * 
 *     def __array__(self, dtype=None, copy=None):             # <<<<<<<<<<<<<<
 *         self._assert_cpu()
 *         if copy is False:
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_12ChunkedArray_46__array__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_12ChunkedArray_45__array__, "ChunkedArray.__array__(self, dtype=None, copy=None)");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_12ChunkedArray_46__array__ = {"__array__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12ChunkedArray_46__array__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12ChunkedArray_45__array__};
    static PyObject *__pyx_pw_7pyarrow_3lib_12ChunkedArray_46__array__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_dtype = 0;
      PyObject *__pyx_v_copy = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[2] = {0,0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__array__ (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_dtype,&__pyx_mstate_global->__pyx_n_u_copy,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(17, 549, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(17, 549, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 549, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__array__", 0) < (0)) __PYX_ERR(17, 549, __pyx_L3_error)
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
        } else {
          switch (__pyx_nargs) {
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(17, 549, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 549, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
        }
        __pyx_v_dtype = values[0];
        __pyx_v_copy = values[1];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("__array__", 0, 0, 2, __pyx_nargs); __PYX_ERR(17, 549, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.ChunkedArray.__array__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_12ChunkedArray_45__array__(((struct __pyx_obj_7pyarrow_3lib_ChunkedArray *)__pyx_v_self), __pyx_v_dtype, __pyx_v_copy);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_12ChunkedArray_45__array__(struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_self, PyObject *__pyx_v_dtype, PyObject *__pyx_v_copy) {
      PyObject *__pyx_v_values = NULL;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      size_t __pyx_t_3;
      int __pyx_t_4;
      PyObject *__pyx_t_5 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__array__", 0);

      /* "pyarrow/table.pxi":550
 * 
 *     def __array__(self, dtype=None, copy=None):
 *         self._assert_cpu()             # <<<<<<<<<<<<<<
 *         if copy is False:
 *             raise ValueError(
*/
      __pyx_t_2 = ((PyObject *)__pyx_v_self);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_3 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_assert_cpu, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 550, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "pyarrow/table.pxi":551
 *     def __array__(self, dtype=None, copy=None):
 *         self._assert_cpu()
 *         if copy is False:             # <<<<<<<<<<<<<<
 *             raise ValueError(
 *                 "Unable to avoid a copy while creating a numpy array as requested "
*/
      __pyx_t_4 = (__pyx_v_copy == Py_False);
      if (unlikely(__pyx_t_4)) {

        /* "pyarrow/table.pxi":552
 *         self._assert_cpu()
 *         if copy is False:
 *             raise ValueError(             # <<<<<<<<<<<<<<
 *                 "Unable to avoid a copy while creating a numpy array as requested "
 *                 "(converting a pyarrow.ChunkedArray always results in a copy).\n"
*/
        __pyx_t_2 = NULL;
        __pyx_t_3 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Unable_to_avoid_a_copy_while_cre_2};
          __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 552, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
        }
        __Pyx_Raise(__pyx_t_1, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __PYX_ERR(17, 552, __pyx_L1_error)

        /* "pyarrow/table.pxi":551
 *     def __array__(self, dtype=None, copy=None):
 *         self._assert_cpu()
 *         if copy is False:             # <<<<<<<<<<<<<<
 *             raise ValueError(
 *                 "Unable to avoid a copy while creating a numpy array as requested "
*/
      }

      /* "pyarrow/table.pxi":559
 *             )
 *         # 'copy' can further be ignored because to_numpy() already returns a copy
 *         values = self.to_numpy()             # <<<<<<<<<<<<<<
 *         if dtype is None:
 *             return values
*/
      __pyx_t_2 = ((PyObject *)__pyx_v_self);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_3 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_to_numpy, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 559, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_v_values = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "pyarrow/table.pxi":560
 *         # 'copy' can further be ignored because to_numpy() already returns a copy
 *         values = self.to_numpy()
 *         if dtype is None:             # <<<<<<<<<<<<<<
 *             return values
 *         return values.astype(dtype, copy=False)
*/
      __pyx_t_4 = (__pyx_v_dtype == Py_None);
      if (__pyx_t_4) {

        /* "pyarrow/table.pxi":561
 *         values = self.to_numpy()
 *         if dtype is None:
 *             return values             # <<<<<<<<<<<<<<
 *         return values.astype(dtype, copy=False)
 * 
*/
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_v_values);
        __pyx_r = __pyx_v_values;
        goto __pyx_L0;

        /* "pyarrow/table.pxi":560
 *         # 'copy' can further be ignored because to_numpy() already returns a copy
 *         values = self.to_numpy()
 *         if dtype is None:             # <<<<<<<<<<<<<<
 *             return values
 *         return values.astype(dtype, copy=False)
*/
      }

      /* "pyarrow/table.pxi":562
 *         if dtype is None:
 *             return values
 *         return values.astype(dtype, copy=False)             # <<<<<<<<<<<<<<
 * 
 *     def cast(self, object target_type=None, safe=None, options=None):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = __pyx_v_values;
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_3 = 0;
      {
        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, __pyx_v_dtype};
        __pyx_t_5 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 562, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_copy, Py_False, __pyx_t_5, __pyx_callargs+2, 0) < (0)) __PYX_ERR(17, 562, __pyx_L1_error)
        __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_5);
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 562, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/table.pxi":549
 *         return values
 * 
 *     def __array__(self, dtype=None, copy=None):             # <<<<<<<<<<<<<<
 *         self._assert_cpu()
 *         if copy is False:
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_AddTraceback("pyarrow.lib.ChunkedArray.__array__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_values);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/table.pxi":564
 *         return values.astype(dtype, copy=False)
 * 
 *     def cast(self, object target_type=None, safe=None, options=None):             # <<<<<<<<<<<<<<
 *         """
 *         Cast array values to another data type
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_12ChunkedArray_48cast(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_12ChunkedArray_47cast, "ChunkedArray.cast(self, target_type=None, safe=None, options=None)\n\nCast array values to another data type\n\nSee :func:`pyarrow.compute.cast` for usage.\n\nParameters\n----------\ntarget_type : DataType, None\n    Type to cast array to.\nsafe : boolean, default True\n    Whether to check for conversion errors such as overflow.\noptions : CastOptions, default None\n    Additional checks pass by CastOptions\n\nReturns\n-------\ncast : Array or ChunkedArray\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> n_legs = pa.chunked_array([[2, 2, 4], [4, 5, 100]])\n>>> n_legs.type\nDataType(int64)\n\nChange the data type of an array:\n\n>>> n_legs_seconds = n_legs.cast(pa.duration('s'))\n>>> n_legs_seconds.type\nDurationType(duration[s])");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_12ChunkedArray_48cast = {"cast", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12ChunkedArray_48cast, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12ChunkedArray_47cast};
    static PyObject *__pyx_pw_7pyarrow_3lib_12ChunkedArray_48cast(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_target_type = 0;
      PyObject *__pyx_v_safe = 0;
      PyObject *__pyx_v_options = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[3] = {0,0,0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("cast (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_target_type,&__pyx_mstate_global->__pyx_n_u_safe,&__pyx_mstate_global->__pyx_n_u_options,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(17, 564, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  3:
            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(17, 564, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(17, 564, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 564, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "cast", 0) < (0)) __PYX_ERR(17, 564, __pyx_L3_error)
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
          if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
        } else {
          switch (__pyx_nargs) {
            case  3:
            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(17, 564, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(17, 564, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 564, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
          if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
        }
        __pyx_v_target_type = values[0];
        __pyx_v_safe = values[1];
        __pyx_v_options = values[2];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("cast", 0, 0, 3, __pyx_nargs); __PYX_ERR(17, 564, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.ChunkedArray.cast", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_12ChunkedArray_47cast(((struct __pyx_obj_7pyarrow_3lib_ChunkedArray *)__pyx_v_self), __pyx_v_target_type, __pyx_v_safe, __pyx_v_options);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_12ChunkedArray_47cast(struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_self, PyObject *__pyx_v_target_type, PyObject *__pyx_v_safe, PyObject *__pyx_v_options) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      size_t __pyx_t_3;
      PyObject *__pyx_t_4 = NULL;
      PyObject *__pyx_t_5 = NULL;
      PyObject *__pyx_t_6 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("cast", 0);

      /* "pyarrow/table.pxi":596
 *         DurationType(duration[s])
 *         """
 *         self._assert_cpu()             # <<<<<<<<<<<<<<
 *         return _pc().cast(self, target_type, safe=safe, options=options)
 * 
*/
      __pyx_t_2 = ((PyObject *)__pyx_v_self);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_3 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_assert_cpu, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 596, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "pyarrow/table.pxi":597
 *         """
 *         self._assert_cpu()
 *         return _pc().cast(self, target_type, safe=safe, options=options)             # <<<<<<<<<<<<<<
 * 
 *     def dictionary_encode(self, null_encoding='mask'):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_5 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_pc_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 597, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_3 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
        assert(__pyx_t_5);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
        __pyx_t_3 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
        __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 597, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
      }
      __pyx_t_2 = __pyx_t_4;
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_3 = 0;
      {
        PyObject *__pyx_callargs[3 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_2, ((PyObject *)__pyx_v_self), __pyx_v_target_type};
        __pyx_t_6 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 597, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_safe, __pyx_v_safe, __pyx_t_6, __pyx_callargs+3, 0) < (0)) __PYX_ERR(17, 597, __pyx_L1_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_options, __pyx_v_options, __pyx_t_6, __pyx_callargs+3, 1) < (0)) __PYX_ERR(17, 597, __pyx_L1_error)
        __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_cast, __pyx_callargs+__pyx_t_3, (3-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_6);
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 597, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/table.pxi":564
 *         return values.astype(dtype, copy=False)
 * 
 *     def cast(self, object target_type=None, safe=None, options=None):             # <<<<<<<<<<<<<<
 *         """
 *         Cast array values to another data type
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_AddTraceback("pyarrow.lib.ChunkedArray.cast", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/table.pxi":599
 *         return _pc().cast(self, target_type, safe=safe, options=options)
 * 
 *     def dictionary_encode(self, null_encoding='mask'):             # <<<<<<<<<<<<<<
 *         """
 *         Compute dictionary-encoded representation of array.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_12ChunkedArray_50dictionary_encode(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_12ChunkedArray_49dictionary_encode, "ChunkedArray.dictionary_encode(self, null_encoding='mask')\n\nCompute dictionary-encoded representation of array.\n\nSee :func:`pyarrow.compute.dictionary_encode` for full usage.\n\nParameters\n----------\nnull_encoding : str, default \"mask\"\n    How to handle null entries.\n\nReturns\n-------\nencoded : ChunkedArray\n    A dictionary-encoded version of this array.\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> animals = pa.chunked_array((\n...             [\"Flamingo\", \"Parrot\", \"Dog\"],\n...             [\"Horse\", \"Brittle stars\", \"Centipede\"]\n...             ))\n>>> animals.dictionary_encode()\n<pyarrow.lib.ChunkedArray object at ...>\n[\n...\n  -- dictionary:\n    [\n      \"Flamingo\",\n      \"Parrot\",\n      \"Dog\",\n      \"Horse\",\n      \"Brittle stars\",\n      \"Centipede\"\n    ]\n  -- indices:\n    [\n      0,\n      1,\n      2\n    ],\n...\n  -- dictionary:\n    [\n      \"Flamingo\",\n      \"Parrot\",\n      \"Dog\",\n      \"Horse\",\n      \"Brittle stars\",\n      \"Centipede\"\n    ]\n  -- indices:\n    [\n      3,\n      4,\n      5\n    ]\n]");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_12ChunkedArray_50dictionary_encode = {"dictionary_encode", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12ChunkedArray_50dictionary_encode, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12ChunkedArray_49dictionary_encode};
    static PyObject *__pyx_pw_7pyarrow_3lib_12ChunkedArray_50dictionary_encode(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_null_encoding = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("dictionary_encode (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_null_encoding,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(17, 599, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 599, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "dictionary_encode", 0) < (0)) __PYX_ERR(17, 599, __pyx_L3_error)
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_n_u_mask));
        } else {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 599, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_n_u_mask));
        }
        __pyx_v_null_encoding = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("dictionary_encode", 0, 0, 1, __pyx_nargs); __PYX_ERR(17, 599, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.ChunkedArray.dictionary_encode", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_12ChunkedArray_49dictionary_encode(((struct __pyx_obj_7pyarrow_3lib_ChunkedArray *)__pyx_v_self), __pyx_v_null_encoding);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_12ChunkedArray_49dictionary_encode(struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_self, PyObject *__pyx_v_null_encoding) {
      PyObject *__pyx_v_options = NULL;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      size_t __pyx_t_3;
      PyObject *__pyx_t_4 = NULL;
      PyObject *__pyx_t_5 = NULL;
      PyObject *__pyx_t_6 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("dictionary_encode", 0);

      /* "pyarrow/table.pxi":659
 *         ]
 *         """
 *         self._assert_cpu()             # <<<<<<<<<<<<<<
 *         options = _pc().DictionaryEncodeOptions(null_encoding)
 *         return _pc().call_function('dictionary_encode', [self], options)
*/
      __pyx_t_2 = ((PyObject *)__pyx_v_self);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_3 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_assert_cpu, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 659, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "pyarrow/table.pxi":660
 *         """
 *         self._assert_cpu()
 *         options = _pc().DictionaryEncodeOptions(null_encoding)             # <<<<<<<<<<<<<<
 *         return _pc().call_function('dictionary_encode', [self], options)
 * 
*/
      __pyx_t_5 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_pc_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 660, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_3 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
        assert(__pyx_t_5);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
        __pyx_t_3 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
        __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 660, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
      }
      __pyx_t_2 = __pyx_t_4;
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_3 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_null_encoding};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_DictionaryEncodeOptions, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 660, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_v_options = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "pyarrow/table.pxi":661
 *         self._assert_cpu()
 *         options = _pc().DictionaryEncodeOptions(null_encoding)
 *         return _pc().call_function('dictionary_encode', [self], options)             # <<<<<<<<<<<<<<
 * 
 *     def flatten(self, MemoryPool memory_pool=None):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_6 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pc_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 661, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_3 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
        assert(__pyx_t_6);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
        __pyx_t_3 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
        __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 661, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
      }
      __pyx_t_4 = __pyx_t_2;
      __Pyx_INCREF(__pyx_t_4);
      __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 661, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_INCREF((PyObject *)__pyx_v_self);
      __Pyx_GIVEREF((PyObject *)__pyx_v_self);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_self)) != (0)) __PYX_ERR(17, 661, __pyx_L1_error);
      __pyx_t_3 = 0;
      {
        PyObject *__pyx_callargs[4] = {__pyx_t_4, __pyx_mstate_global->__pyx_n_u_dictionary_encode, __pyx_t_5, __pyx_v_options};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_call_function, __pyx_callargs+__pyx_t_3, (4-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 661, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/table.pxi":599
 *         return _pc().cast(self, target_type, safe=safe, options=options)
 * 
 *     def dictionary_encode(self, null_encoding='mask'):             # <<<<<<<<<<<<<<
 *         """
 *         Compute dictionary-encoded representation of array.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_AddTraceback("pyarrow.lib.ChunkedArray.dictionary_encode", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_options);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/table.pxi":663
 *         return _pc().call_function('dictionary_encode', [self], options)
 * 
 *     def flatten(self, MemoryPool memory_pool=None):             # <<<<<<<<<<<<<<
 *         """
 *         Flatten this ChunkedArray.  If it has a struct type, the column is
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_12ChunkedArray_52flatten(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_12ChunkedArray_51flatten, "ChunkedArray.flatten(self, MemoryPool memory_pool=None)\n\nFlatten this ChunkedArray.  If it has a struct type, the column is\nflattened into one array per struct field.\n\nParameters\n----------\nmemory_pool : MemoryPool, default None\n    For memory allocations, if required, otherwise use default pool\n\nReturns\n-------\nresult : list of ChunkedArray\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> n_legs = pa.chunked_array([[2, 2, 4], [4, 5, 100]])\n>>> c_arr = pa.chunked_array(n_legs.value_counts())\n>>> c_arr\n<pyarrow.lib.ChunkedArray object at ...>\n[\n  -- is_valid: all not null\n  -- child 0 type: int64\n    [\n      2,\n      4,\n      5,\n      100\n    ]\n  -- child 1 type: int64\n    [\n      2,\n      2,\n      1,\n      1\n    ]\n]\n>>> c_arr.flatten()\n[<pyarrow.lib.ChunkedArray object at ...>\n[\n  [\n    2,\n    4,\n    5,\n    100\n  ]\n], <pyarrow.lib.ChunkedArray object at ...>\n[\n  [\n    2,\n    2,\n    1,\n    1\n  ]\n]]\n>>> c_arr.type\nStructType(struct<values: int64, counts: int64>)\n>>> n_legs.type\nDataType(int64)");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_12ChunkedArray_52flatten = {"flatten", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12ChunkedArray_52flatten, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12ChunkedArray_51flatten};
    static PyObject *__pyx_pw_7pyarrow_3lib_12ChunkedArray_52flatten(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_memory_pool = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("flatten (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_memory_pool,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(17, 663, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 663, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "flatten", 0) < (0)) __PYX_ERR(17, 663, __pyx_L3_error)
          if (!values[0]) values[0] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)Py_None));
        } else {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 663, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (!values[0]) values[0] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)Py_None));
        }
        __pyx_v_memory_pool = ((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)values[0]);
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("flatten", 0, 0, 1, __pyx_nargs); __PYX_ERR(17, 663, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.ChunkedArray.flatten", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_memory_pool), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_MemoryPool, 1, "memory_pool", 0))) __PYX_ERR(17, 663, __pyx_L1_error)
      __pyx_r = __pyx_pf_7pyarrow_3lib_12ChunkedArray_51flatten(((struct __pyx_obj_7pyarrow_3lib_ChunkedArray *)__pyx_v_self), __pyx_v_memory_pool);

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = NULL;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      goto __pyx_L7_cleaned_up;
      __pyx_L0:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __pyx_L7_cleaned_up:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_12ChunkedArray_51flatten(struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_self, struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_memory_pool) {
      std::vector<std::shared_ptr< arrow::ChunkedArray> >  __pyx_v_flattened;
       arrow::MemoryPool *__pyx_v_pool;
      std::shared_ptr< arrow::ChunkedArray>  __pyx_9genexpr20__pyx_v_col;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      size_t __pyx_t_3;
       arrow::MemoryPool *__pyx_t_4;
      std::vector<std::shared_ptr< arrow::ChunkedArray> >  __pyx_t_5;
      std::vector<std::shared_ptr< arrow::ChunkedArray> > ::iterator __pyx_t_6;
      std::shared_ptr< arrow::ChunkedArray>  __pyx_t_7;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("flatten", 0);

      /* "pyarrow/table.pxi":724
 *         DataType(int64)
 *         """
 *         self._assert_cpu()             # <<<<<<<<<<<<<<
 *         cdef:
 *             vector[shared_ptr[CChunkedArray]] flattened
*/
      __pyx_t_2 = ((PyObject *)__pyx_v_self);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_3 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_assert_cpu, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 724, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "pyarrow/table.pxi":727
 *         cdef:
 *             vector[shared_ptr[CChunkedArray]] flattened
 *             CMemoryPool* pool = maybe_unbox_memory_pool(memory_pool)             # <<<<<<<<<<<<<<
 * 
 *         with nogil:
*/
      __pyx_t_4 = __pyx_f_7pyarrow_3lib_maybe_unbox_memory_pool(__pyx_v_memory_pool); if (unlikely(__pyx_t_4 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(17, 727, __pyx_L1_error)
      __pyx_v_pool = __pyx_t_4;

      /* "pyarrow/table.pxi":729
 *             CMemoryPool* pool = maybe_unbox_memory_pool(memory_pool)
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             flattened = GetResultValue(self.chunked_array.Flatten(pool))
 * 
*/
      {
          PyThreadState * _save;
          _save = PyEval_SaveThread();
          __Pyx_FastGIL_Remember();
          /*try:*/ {

            /* "pyarrow/table.pxi":730
 * 
 *         with nogil:
 *             flattened = GetResultValue(self.chunked_array.Flatten(pool))             # <<<<<<<<<<<<<<
 * 
 *         return [pyarrow_wrap_chunked_array(col) for col in flattened]
*/
            if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
              PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "chunked_array");
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              __PYX_ERR(17, 730, __pyx_L4_error)
            }
            __pyx_t_5 = arrow::py::GetResultValue<std::vector<std::shared_ptr< arrow::ChunkedArray> > >(__pyx_v_self->chunked_array->Flatten(__pyx_v_pool)); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(17, 730, __pyx_L4_error)
            __pyx_v_flattened = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_5);
          }

          /* "pyarrow/table.pxi":729
 *             CMemoryPool* pool = maybe_unbox_memory_pool(memory_pool)
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             flattened = GetResultValue(self.chunked_array.Flatten(pool))
 * 
*/
          /*finally:*/ {
            /*normal exit:*/{
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L5;
            }
            __pyx_L4_error: {
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L1_error;
            }
            __pyx_L5:;
          }
      }

      /* "pyarrow/table.pxi":732
 *             flattened = GetResultValue(self.chunked_array.Flatten(pool))
 * 
 *         return [pyarrow_wrap_chunked_array(col) for col in flattened]             # <<<<<<<<<<<<<<
 * 
 *     def combine_chunks(self, MemoryPool memory_pool=None):
*/
      __Pyx_XDECREF(__pyx_r);
      { /* enter inner scope */
        __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 732, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_6 = __pyx_v_flattened.begin();
        for (; __pyx_t_6 != __pyx_v_flattened.end(); ++__pyx_t_6) {
          __pyx_t_7 = *__pyx_t_6;
          __pyx_9genexpr20__pyx_v_col = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_7);
          __pyx_t_2 = pyarrow_wrap_chunked_array(__pyx_9genexpr20__pyx_v_col); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 732, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) __PYX_ERR(17, 732, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        }
      } /* exit inner scope */
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/table.pxi":663
 *         return _pc().call_function('dictionary_encode', [self], options)
 * 
 *     def flatten(self, MemoryPool memory_pool=None):             # <<<<<<<<<<<<<<
 *         """
 *         Flatten this ChunkedArray.  If it has a struct type, the column is
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_AddTraceback("pyarrow.lib.ChunkedArray.flatten", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/table.pxi":734
 *         return [pyarrow_wrap_chunked_array(col) for col in flattened]
 * 
 *     def combine_chunks(self, MemoryPool memory_pool=None):             # <<<<<<<<<<<<<<
 *         """
 *         Flatten this ChunkedArray into a single non-chunked array.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_12ChunkedArray_54combine_chunks(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_12ChunkedArray_53combine_chunks, "ChunkedArray.combine_chunks(self, MemoryPool memory_pool=None)\n\nFlatten this ChunkedArray into a single non-chunked array.\n\nParameters\n----------\nmemory_pool : MemoryPool, default None\n    For memory allocations, if required, otherwise use default pool\n\nReturns\n-------\nresult : Array\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> n_legs = pa.chunked_array([[2, 2, 4], [4, 5, 100]])\n>>> n_legs\n<pyarrow.lib.ChunkedArray object at ...>\n[\n  [\n    2,\n    2,\n    4\n  ],\n  [\n    4,\n    5,\n    100\n  ]\n]\n>>> n_legs.combine_chunks()\n<pyarrow.lib.Int64Array object at ...>\n[\n  2,\n  2,\n  4,\n  4,\n  5,\n  100\n]");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_12ChunkedArray_54combine_chunks = {"combine_chunks", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12ChunkedArray_54combine_chunks, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12ChunkedArray_53combine_chunks};
    static PyObject *__pyx_pw_7pyarrow_3lib_12ChunkedArray_54combine_chunks(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_memory_pool = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("combine_chunks (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_memory_pool,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(17, 734, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 734, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "combine_chunks", 0) < (0)) __PYX_ERR(17, 734, __pyx_L3_error)
          if (!values[0]) values[0] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)Py_None));
        } else {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 734, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (!values[0]) values[0] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)Py_None));
        }
        __pyx_v_memory_pool = ((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)values[0]);
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("combine_chunks", 0, 0, 1, __pyx_nargs); __PYX_ERR(17, 734, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.ChunkedArray.combine_chunks", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_memory_pool), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_MemoryPool, 1, "memory_pool", 0))) __PYX_ERR(17, 734, __pyx_L1_error)
      __pyx_r = __pyx_pf_7pyarrow_3lib_12ChunkedArray_53combine_chunks(((struct __pyx_obj_7pyarrow_3lib_ChunkedArray *)__pyx_v_self), __pyx_v_memory_pool);

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = NULL;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      goto __pyx_L7_cleaned_up;
      __pyx_L0:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __pyx_L7_cleaned_up:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_12ChunkedArray_53combine_chunks(struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_self, CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_memory_pool) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      size_t __pyx_t_3;
      int __pyx_t_4;
      PyObject *__pyx_t_5 = NULL;
      PyObject *__pyx_t_6 = NULL;
      PyObject *__pyx_t_7 = NULL;
      PyObject *__pyx_t_8 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("combine_chunks", 0);

      /* "pyarrow/table.pxi":776
 *         ]
 *         """
 *         self._assert_cpu()             # <<<<<<<<<<<<<<
 *         if self.num_chunks == 0:
 *             return array([], type=self.type)
*/
      __pyx_t_2 = ((PyObject *)__pyx_v_self);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_3 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_assert_cpu, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 776, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "pyarrow/table.pxi":777
 *         """
 *         self._assert_cpu()
 *         if self.num_chunks == 0:             # <<<<<<<<<<<<<<
 *             return array([], type=self.type)
 *         else:
*/
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_num_chunks); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 777, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_4 = (__Pyx_PyLong_BoolEqObjC(__pyx_t_1, __pyx_mstate_global->__pyx_int_0, 0, 0)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(17, 777, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (__pyx_t_4) {

        /* "pyarrow/table.pxi":778
 *         self._assert_cpu()
 *         if self.num_chunks == 0:
 *             return array([], type=self.type)             # <<<<<<<<<<<<<<
 *         else:
 *             return concat_arrays(self.chunks)
*/
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_2 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_array); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 778, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 778, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_type); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 778, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_3 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5);
          assert(__pyx_t_2);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
          __pyx_t_3 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, __pyx_t_6};
          __pyx_t_8 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(17, 778, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_type, __pyx_t_7, __pyx_t_8, __pyx_callargs+2, 0) < (0)) __PYX_ERR(17, 778, __pyx_L1_error)
          __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_8);
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 778, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
        }
        __pyx_r = __pyx_t_1;
        __pyx_t_1 = 0;
        goto __pyx_L0;

        /* "pyarrow/table.pxi":777
 *         """
 *         self._assert_cpu()
 *         if self.num_chunks == 0:             # <<<<<<<<<<<<<<
 *             return array([], type=self.type)
 *         else:
*/
      }

      /* "pyarrow/table.pxi":780
 *             return array([], type=self.type)
 *         else:
 *             return concat_arrays(self.chunks)             # <<<<<<<<<<<<<<
 * 
 *     def unique(self):
*/
      /*else*/ {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_5 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_concat_arrays); if (unlikely(!__pyx_t_8)) __PYX_ERR(17, 780, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_chunks); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 780, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_3 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_8))) {
          __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_8);
          assert(__pyx_t_5);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8);
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_8, __pyx__function);
          __pyx_t_3 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_7};
          __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 780, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
        }
        __pyx_r = __pyx_t_1;
        __pyx_t_1 = 0;
        goto __pyx_L0;
      }

      /* "pyarrow/table.pxi":734
 *         return [pyarrow_wrap_chunked_array(col) for col in flattened]
 * 
 *     def combine_chunks(self, MemoryPool memory_pool=None):             # <<<<<<<<<<<<<<
 *         """
 *         Flatten this ChunkedArray into a single non-chunked array.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_8);
      __Pyx_AddTraceback("pyarrow.lib.ChunkedArray.combine_chunks", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/table.pxi":782
 *             return concat_arrays(self.chunks)
 * 
 *     def unique(self):             # <<<<<<<<<<<<<<
 *         """
 *         Compute distinct elements in array
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_12ChunkedArray_56unique(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_12ChunkedArray_55unique, "ChunkedArray.unique(self)\n\nCompute distinct elements in array\n\nReturns\n-------\npyarrow.Array\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> n_legs = pa.chunked_array([[2, 2, 4], [4, 5, 100]])\n>>> n_legs\n<pyarrow.lib.ChunkedArray object at ...>\n[\n  [\n    2,\n    2,\n    4\n  ],\n  [\n    4,\n    5,\n    100\n  ]\n]\n>>> n_legs.unique()\n<pyarrow.lib.Int64Array object at ...>\n[\n  2,\n  4,\n  5,\n  100\n]");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_12ChunkedArray_56unique = {"unique", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12ChunkedArray_56unique, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12ChunkedArray_55unique};
    static PyObject *__pyx_pw_7pyarrow_3lib_12ChunkedArray_56unique(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("unique (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("unique", 1, 0, 0, __pyx_nargs); return NULL; }
      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
      if (unlikely(__pyx_kwds_len < 0)) return NULL;
      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("unique", __pyx_kwds); return NULL;}
      __pyx_r = __pyx_pf_7pyarrow_3lib_12ChunkedArray_55unique(((struct __pyx_obj_7pyarrow_3lib_ChunkedArray *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_12ChunkedArray_55unique(struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      size_t __pyx_t_3;
      PyObject *__pyx_t_4 = NULL;
      PyObject *__pyx_t_5 = NULL;
      PyObject *__pyx_t_6 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("unique", 0);

      /* "pyarrow/table.pxi":817
 *         ]
 *         """
 *         self._assert_cpu()             # <<<<<<<<<<<<<<
 *         return _pc().call_function('unique', [self])
 * 
*/
      __pyx_t_2 = ((PyObject *)__pyx_v_self);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_3 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_assert_cpu, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 817, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "pyarrow/table.pxi":818
 *         """
 *         self._assert_cpu()
 *         return _pc().call_function('unique', [self])             # <<<<<<<<<<<<<<
 * 
 *     def value_counts(self):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_5 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_pc_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 818, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_3 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
        assert(__pyx_t_5);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
        __pyx_t_3 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
        __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 818, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
      }
      __pyx_t_2 = __pyx_t_4;
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 818, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_INCREF((PyObject *)__pyx_v_self);
      __Pyx_GIVEREF((PyObject *)__pyx_v_self);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v_self)) != (0)) __PYX_ERR(17, 818, __pyx_L1_error);
      __pyx_t_3 = 0;
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_mstate_global->__pyx_n_u_unique, __pyx_t_6};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_call_function, __pyx_callargs+__pyx_t_3, (3-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 818, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/table.pxi":782
 *             return concat_arrays(self.chunks)
 * 
 *     def unique(self):             # <<<<<<<<<<<<<<
 *         """
 *         Compute distinct elements in array
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_AddTraceback("pyarrow.lib.ChunkedArray.unique", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/table.pxi":820
 *         return _pc().call_function('unique', [self])
 * 
 *     def value_counts(self):             # <<<<<<<<<<<<<<
 *         """
 *         Compute counts of unique elements in array.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_12ChunkedArray_58value_counts(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_12ChunkedArray_57value_counts, "ChunkedArray.value_counts(self)\n\nCompute counts of unique elements in array.\n\nReturns\n-------\nAn array of  <input type \"Values\", int64_t \"Counts\"> structs\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> n_legs = pa.chunked_array([[2, 2, 4], [4, 5, 100]])\n>>> n_legs\n<pyarrow.lib.ChunkedArray object at ...>\n[\n  [\n    2,\n    2,\n    4\n  ],\n  [\n    4,\n    5,\n    100\n  ]\n]\n>>> n_legs.value_counts()\n<pyarrow.lib.StructArray object at ...>\n-- is_valid: all not null\n-- child 0 type: int64\n  [\n    2,\n    4,\n    5,\n    100\n  ]\n-- child 1 type: int64\n  [\n    2,\n    2,\n    1,\n    1\n  ]");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_12ChunkedArray_58value_counts = {"value_counts", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12ChunkedArray_58value_counts, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12ChunkedArray_57value_counts};
    static PyObject *__pyx_pw_7pyarrow_3lib_12ChunkedArray_58value_counts(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("value_counts (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("value_counts", 1, 0, 0, __pyx_nargs); return NULL; }
      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
      if (unlikely(__pyx_kwds_len < 0)) return NULL;
      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("value_counts", __pyx_kwds); return NULL;}
      __pyx_r = __pyx_pf_7pyarrow_3lib_12ChunkedArray_57value_counts(((struct __pyx_obj_7pyarrow_3lib_ChunkedArray *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_12ChunkedArray_57value_counts(struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      size_t __pyx_t_3;
      PyObject *__pyx_t_4 = NULL;
      PyObject *__pyx_t_5 = NULL;
      PyObject *__pyx_t_6 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("value_counts", 0);

      /* "pyarrow/table.pxi":864
 *           ]
 *         """
 *         self._assert_cpu()             # <<<<<<<<<<<<<<
 *         return _pc().call_function('value_counts', [self])
 * 
*/
      __pyx_t_2 = ((PyObject *)__pyx_v_self);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_3 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_assert_cpu, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 864, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "pyarrow/table.pxi":865
 *         """
 *         self._assert_cpu()
 *         return _pc().call_function('value_counts', [self])             # <<<<<<<<<<<<<<
 * 
 *     def slice(self, offset=0, length=None):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_5 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_pc_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 865, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_3 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
        assert(__pyx_t_5);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
        __pyx_t_3 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
        __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 865, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
      }
      __pyx_t_2 = __pyx_t_4;
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 865, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_INCREF((PyObject *)__pyx_v_self);
      __Pyx_GIVEREF((PyObject *)__pyx_v_self);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v_self)) != (0)) __PYX_ERR(17, 865, __pyx_L1_error);
      __pyx_t_3 = 0;
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_mstate_global->__pyx_n_u_value_counts, __pyx_t_6};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_call_function, __pyx_callargs+__pyx_t_3, (3-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 865, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/table.pxi":820
 *         return _pc().call_function('unique', [self])
 * 
 *     def value_counts(self):             # <<<<<<<<<<<<<<
 *         """
 *         Compute counts of unique elements in array.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_AddTraceback("pyarrow.lib.ChunkedArray.value_counts", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/table.pxi":867
 *         return _pc().call_function('value_counts', [self])
 * 
 *     def slice(self, offset=0, length=None):             # <<<<<<<<<<<<<<
 *         """
 *         Compute zero-copy slice of this ChunkedArray
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_12ChunkedArray_60slice(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_12ChunkedArray_59slice, "ChunkedArray.slice(self, offset=0, length=None)\n\nCompute zero-copy slice of this ChunkedArray\n\nParameters\n----------\noffset : int, default 0\n    Offset from start of array to slice\nlength : int, default None\n    Length of slice (default is until end of batch starting from\n    offset)\n\nReturns\n-------\nsliced : ChunkedArray\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> n_legs = pa.chunked_array([[2, 2, 4], [4, 5, 100]])\n>>> n_legs\n<pyarrow.lib.ChunkedArray object at ...>\n[\n  [\n    2,\n    2,\n    4\n  ],\n  [\n    4,\n    5,\n    100\n  ]\n]\n>>> n_legs.slice(2,2)\n<pyarrow.lib.ChunkedArray object at ...>\n[\n  [\n    4\n  ],\n  [\n    4\n  ]\n]");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_12ChunkedArray_60slice = {"slice", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12ChunkedArray_60slice, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12ChunkedArray_59slice};
    static PyObject *__pyx_pw_7pyarrow_3lib_12ChunkedArray_60slice(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_offset = 0;
      PyObject *__pyx_v_length = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[2] = {0,0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("slice (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_offset,&__pyx_mstate_global->__pyx_n_u_length,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(17, 867, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(17, 867, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 867, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "slice", 0) < (0)) __PYX_ERR(17, 867, __pyx_L3_error)
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_int_0));
          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
        } else {
          switch (__pyx_nargs) {
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(17, 867, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 867, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_int_0));
          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
        }
        __pyx_v_offset = values[0];
        __pyx_v_length = values[1];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("slice", 0, 0, 2, __pyx_nargs); __PYX_ERR(17, 867, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.ChunkedArray.slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_12ChunkedArray_59slice(((struct __pyx_obj_7pyarrow_3lib_ChunkedArray *)__pyx_v_self), __pyx_v_offset, __pyx_v_length);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_12ChunkedArray_59slice(struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_self, PyObject *__pyx_v_offset, PyObject *__pyx_v_length) {
      std::shared_ptr< arrow::ChunkedArray>  __pyx_v_result;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_t_2;
      PyObject *__pyx_t_3 = NULL;
      size_t __pyx_t_4;
      Py_ssize_t __pyx_t_5;
      PyObject *__pyx_t_6 = NULL;
      PyObject *__pyx_t_7 = NULL;
      int64_t __pyx_t_8;
      int64_t __pyx_t_9;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("slice", 0);
      __Pyx_INCREF(__pyx_v_offset);

      /* "pyarrow/table.pxi":914
 *         cdef shared_ptr[CChunkedArray] result
 * 
 *         if offset < 0:             # <<<<<<<<<<<<<<
 *             raise IndexError('Offset must be non-negative')
 * 
*/
      __pyx_t_1 = PyObject_RichCompare(__pyx_v_offset, __pyx_mstate_global->__pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 914, __pyx_L1_error)
      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(17, 914, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(__pyx_t_2)) {

        /* "pyarrow/table.pxi":915
 * 
 *         if offset < 0:
 *             raise IndexError('Offset must be non-negative')             # <<<<<<<<<<<<<<
 * 
 *         offset = min(len(self), offset)
*/
        __pyx_t_3 = NULL;
        __pyx_t_4 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Offset_must_be_non_negative};
          __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_IndexError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 915, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
        }
        __Pyx_Raise(__pyx_t_1, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __PYX_ERR(17, 915, __pyx_L1_error)

        /* "pyarrow/table.pxi":914
 *         cdef shared_ptr[CChunkedArray] result
 * 
 *         if offset < 0:             # <<<<<<<<<<<<<<
 *             raise IndexError('Offset must be non-negative')
 * 
*/
      }

      /* "pyarrow/table.pxi":917
 *             raise IndexError('Offset must be non-negative')
 * 
 *         offset = min(len(self), offset)             # <<<<<<<<<<<<<<
 *         if length is None:
 *             result = self.chunked_array.Slice(offset)
*/
      __Pyx_INCREF(__pyx_v_offset);
      __pyx_t_1 = __pyx_v_offset;
      __pyx_t_5 = PyObject_Length(((PyObject *)__pyx_v_self)); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(17, 917, __pyx_L1_error)
      __pyx_t_6 = PyLong_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 917, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = PyObject_RichCompare(__pyx_t_1, __pyx_t_6, Py_LT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 917, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(17, 917, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (__pyx_t_2) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1;
      } else {
        __pyx_t_7 = PyLong_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 917, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_3 = __pyx_t_7;
        __pyx_t_7 = 0;
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __pyx_t_3;
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF_SET(__pyx_v_offset, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "pyarrow/table.pxi":918
 * 
 *         offset = min(len(self), offset)
 *         if length is None:             # <<<<<<<<<<<<<<
 *             result = self.chunked_array.Slice(offset)
 *         else:
*/
      __pyx_t_2 = (__pyx_v_length == Py_None);
      if (__pyx_t_2) {

        /* "pyarrow/table.pxi":919
 *         offset = min(len(self), offset)
 *         if length is None:
 *             result = self.chunked_array.Slice(offset)             # <<<<<<<<<<<<<<
 *         else:
 *             result = self.chunked_array.Slice(offset, length)
*/
        if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "chunked_array");
          __PYX_ERR(17, 919, __pyx_L1_error)
        }
        __pyx_t_8 = __Pyx_PyLong_As_int64_t(__pyx_v_offset); if (unlikely((__pyx_t_8 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(17, 919, __pyx_L1_error)
        __pyx_v_result = __pyx_v_self->chunked_array->Slice(__pyx_t_8);

        /* "pyarrow/table.pxi":918
 * 
 *         offset = min(len(self), offset)
 *         if length is None:             # <<<<<<<<<<<<<<
 *             result = self.chunked_array.Slice(offset)
 *         else:
*/
        goto __pyx_L4;
      }

      /* "pyarrow/table.pxi":921
 *             result = self.chunked_array.Slice(offset)
 *         else:
 *             result = self.chunked_array.Slice(offset, length)             # <<<<<<<<<<<<<<
 * 
 *         return pyarrow_wrap_chunked_array(result)
*/
      /*else*/ {
        if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "chunked_array");
          __PYX_ERR(17, 921, __pyx_L1_error)
        }
        __pyx_t_8 = __Pyx_PyLong_As_int64_t(__pyx_v_offset); if (unlikely((__pyx_t_8 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(17, 921, __pyx_L1_error)
        __pyx_t_9 = __Pyx_PyLong_As_int64_t(__pyx_v_length); if (unlikely((__pyx_t_9 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(17, 921, __pyx_L1_error)
        __pyx_v_result = __pyx_v_self->chunked_array->Slice(__pyx_t_8, __pyx_t_9);
      }
      __pyx_L4:;

      /* "pyarrow/table.pxi":923
 *             result = self.chunked_array.Slice(offset, length)
 * 
 *         return pyarrow_wrap_chunked_array(result)             # <<<<<<<<<<<<<<
 * 
 *     def filter(self, mask, object null_selection_behavior="drop"):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = pyarrow_wrap_chunked_array(__pyx_v_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 923, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/table.pxi":867
 *         return _pc().call_function('value_counts', [self])
 * 
 *     def slice(self, offset=0, length=None):             # <<<<<<<<<<<<<<
 *         """
 *         Compute zero-copy slice of this ChunkedArray
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_7);
      __Pyx_AddTraceback("pyarrow.lib.ChunkedArray.slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_offset);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/table.pxi":925
 *         return pyarrow_wrap_chunked_array(result)
 * 
 *     def filter(self, mask, object null_selection_behavior="drop"):             # <<<<<<<<<<<<<<
 *         """
 *         Select values from the chunked array.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_12ChunkedArray_62filter(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_12ChunkedArray_61filter, "ChunkedArray.filter(self, mask, null_selection_behavior='drop')\n\nSelect values from the chunked array.\n\nSee :func:`pyarrow.compute.filter` for full usage.\n\nParameters\n----------\nmask : Array or array-like\n    The boolean mask to filter the chunked array with.\nnull_selection_behavior : str, default \"drop\"\n    How nulls in the mask should be handled.\n\nReturns\n-------\nfiltered : Array or ChunkedArray\n    An array of the same type, with only the elements selected by\n    the boolean mask.\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> n_legs = pa.chunked_array([[2, 2, 4], [4, 5, 100]])\n>>> n_legs\n<pyarrow.lib.ChunkedArray object at ...>\n[\n  [\n    2,\n    2,\n    4\n  ],\n  [\n    4,\n    5,\n    100\n  ]\n]\n>>> mask = pa.array([True, False, None, True, False, True])\n>>> n_legs.filter(mask)\n<pyarrow.lib.ChunkedArray object at ...>\n[\n  [\n    2\n  ],\n  [\n    4,\n    100\n  ]\n]\n>>> n_legs.filter(mask, null_selection_behavior=\"emit_null\")\n<pyarrow.lib.ChunkedArray object at ...>\n[\n  [\n    2,\n    null\n  ],\n  [\n    4,\n    100\n  ]\n]");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_12ChunkedArray_62filter = {"filter", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12ChunkedArray_62filter, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12ChunkedArray_61filter};
    static PyObject *__pyx_pw_7pyarrow_3lib_12ChunkedArray_62filter(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_mask = 0;
      PyObject *__pyx_v_null_selection_behavior = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[2] = {0,0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("filter (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_mask,&__pyx_mstate_global->__pyx_n_u_null_selection_behavior,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(17, 925, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(17, 925, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 925, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "filter", 0) < (0)) __PYX_ERR(17, 925, __pyx_L3_error)
          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_n_u_drop));
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("filter", 0, 1, 2, i); __PYX_ERR(17, 925, __pyx_L3_error) }
          }
        } else {
          switch (__pyx_nargs) {
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(17, 925, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 925, __pyx_L3_error)
            break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_n_u_drop));
        }
        __pyx_v_mask = values[0];
        __pyx_v_null_selection_behavior = values[1];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("filter", 0, 1, 2, __pyx_nargs); __PYX_ERR(17, 925, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.ChunkedArray.filter", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_12ChunkedArray_61filter(((struct __pyx_obj_7pyarrow_3lib_ChunkedArray *)__pyx_v_self), __pyx_v_mask, __pyx_v_null_selection_behavior);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_12ChunkedArray_61filter(struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_self, PyObject *__pyx_v_mask, PyObject *__pyx_v_null_selection_behavior) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      size_t __pyx_t_3;
      PyObject *__pyx_t_4 = NULL;
      PyObject *__pyx_t_5 = NULL;
      PyObject *__pyx_t_6 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("filter", 0);

      /* "pyarrow/table.pxi":987
 *         ]
 *         """
 *         self._assert_cpu()             # <<<<<<<<<<<<<<
 *         return _pc().filter(self, mask, null_selection_behavior)
 * 
*/
      __pyx_t_2 = ((PyObject *)__pyx_v_self);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_3 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_assert_cpu, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 987, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "pyarrow/table.pxi":988
 *         """
 *         self._assert_cpu()
 *         return _pc().filter(self, mask, null_selection_behavior)             # <<<<<<<<<<<<<<
 * 
 *     def index(self, value, start=None, end=None, *, memory_pool=None):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_5 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_pc_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 988, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_3 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
        assert(__pyx_t_5);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
        __pyx_t_3 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
        __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 988, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
      }
      __pyx_t_2 = __pyx_t_4;
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_3 = 0;
      {
        PyObject *__pyx_callargs[4] = {__pyx_t_2, ((PyObject *)__pyx_v_self), __pyx_v_mask, __pyx_v_null_selection_behavior};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_filter, __pyx_callargs+__pyx_t_3, (4-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 988, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/table.pxi":925
 *         return pyarrow_wrap_chunked_array(result)
 * 
 *     def filter(self, mask, object null_selection_behavior="drop"):             # <<<<<<<<<<<<<<
 *         """
 *         Select values from the chunked array.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_AddTraceback("pyarrow.lib.ChunkedArray.filter", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/table.pxi":990
 *         return _pc().filter(self, mask, null_selection_behavior)
 * 
 *     def index(self, value, start=None, end=None, *, memory_pool=None):             # <<<<<<<<<<<<<<
 *         """
 *         Find the first index of a value.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_12ChunkedArray_64index(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_12ChunkedArray_63index, "ChunkedArray.index(self, value, start=None, end=None, *, memory_pool=None)\n\nFind the first index of a value.\n\nSee :func:`pyarrow.compute.index` for full usage.\n\nParameters\n----------\nvalue : Scalar or object\n    The value to look for in the array.\nstart : int, optional\n    The start index where to look for `value`.\nend : int, optional\n    The end index where to look for `value`.\nmemory_pool : MemoryPool, optional\n    A memory pool for potential memory allocations.\n\nReturns\n-------\nindex : Int64Scalar\n    The index of the value in the array (-1 if not found).\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> n_legs = pa.chunked_array([[2, 2, 4], [4, 5, 100]])\n>>> n_legs\n<pyarrow.lib.ChunkedArray object at ...>\n[\n  [\n    2,\n    2,\n    4\n  ],\n  [\n    4,\n    5,\n    100\n  ]\n]\n>>> n_legs.index(4)\n<pyarrow.Int64Scalar: 2>\n>>> n_legs.index(4, start=3)\n<pyarrow.Int64Scalar: 3>");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_12ChunkedArray_64index = {"index", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12ChunkedArray_64index, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12ChunkedArray_63index};
    static PyObject *__pyx_pw_7pyarrow_3lib_12ChunkedArray_64index(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_value = 0;
      PyObject *__pyx_v_start = 0;
      PyObject *__pyx_v_end = 0;
      PyObject *__pyx_v_memory_pool = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[4] = {0,0,0,0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("index (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_value,&__pyx_mstate_global->__pyx_n_u_start,&__pyx_mstate_global->__pyx_n_u_end,&__pyx_mstate_global->__pyx_n_u_memory_pool,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(17, 990, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  3:
            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(17, 990, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(17, 990, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 990, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "index", 0) < (0)) __PYX_ERR(17, 990, __pyx_L3_error)
          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
          if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
          if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None));
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("index", 0, 1, 3, i); __PYX_ERR(17, 990, __pyx_L3_error) }
          }
        } else {
          switch (__pyx_nargs) {
            case  3:
            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(17, 990, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(17, 990, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 990, __pyx_L3_error)
            break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
          if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
          if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None));
        }
        __pyx_v_value = values[0];
        __pyx_v_start = values[1];
        __pyx_v_end = values[2];
        __pyx_v_memory_pool = values[3];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("index", 0, 1, 3, __pyx_nargs); __PYX_ERR(17, 990, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.ChunkedArray.index", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_12ChunkedArray_63index(((struct __pyx_obj_7pyarrow_3lib_ChunkedArray *)__pyx_v_self), __pyx_v_value, __pyx_v_start, __pyx_v_end, __pyx_v_memory_pool);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_12ChunkedArray_63index(struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_self, PyObject *__pyx_v_value, PyObject *__pyx_v_start, PyObject *__pyx_v_end, PyObject *__pyx_v_memory_pool) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      size_t __pyx_t_3;
      PyObject *__pyx_t_4 = NULL;
      PyObject *__pyx_t_5 = NULL;
      PyObject *__pyx_t_6 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("index", 0);

      /* "pyarrow/table.pxi":1035
 *         <pyarrow.Int64Scalar: 3>
 *         """
 *         self._assert_cpu()             # <<<<<<<<<<<<<<
 *         return _pc().index(self, value, start, end, memory_pool=memory_pool)
 * 
*/
      __pyx_t_2 = ((PyObject *)__pyx_v_self);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_3 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_assert_cpu, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 1035, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "pyarrow/table.pxi":1036
 *         """
 *         self._assert_cpu()
 *         return _pc().index(self, value, start, end, memory_pool=memory_pool)             # <<<<<<<<<<<<<<
 * 
 *     def take(self, object indices):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_5 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_pc_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 1036, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_3 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
        assert(__pyx_t_5);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
        __pyx_t_3 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
        __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 1036, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
      }
      __pyx_t_2 = __pyx_t_4;
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_3 = 0;
      {
        PyObject *__pyx_callargs[5 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, ((PyObject *)__pyx_v_self), __pyx_v_value, __pyx_v_start, __pyx_v_end};
        __pyx_t_6 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 1036, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_memory_pool, __pyx_v_memory_pool, __pyx_t_6, __pyx_callargs+5, 0) < (0)) __PYX_ERR(17, 1036, __pyx_L1_error)
        __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_index, __pyx_callargs+__pyx_t_3, (5-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_6);
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 1036, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/table.pxi":990
 *         return _pc().filter(self, mask, null_selection_behavior)
 * 
 *     def index(self, value, start=None, end=None, *, memory_pool=None):             # <<<<<<<<<<<<<<
 *         """
 *         Find the first index of a value.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_AddTraceback("pyarrow.lib.ChunkedArray.index", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/table.pxi":1038
 *         return _pc().index(self, value, start, end, memory_pool=memory_pool)
 * 
 *     def take(self, object indices):             # <<<<<<<<<<<<<<
 *         """
 *         Select values from the chunked array.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_12ChunkedArray_66take(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_12ChunkedArray_65take, "ChunkedArray.take(self, indices)\n\nSelect values from the chunked array.\n\nSee :func:`pyarrow.compute.take` for full usage.\n\nParameters\n----------\nindices : Array or array-like\n    The indices in the array whose values will be returned.\n\nReturns\n-------\ntaken : Array or ChunkedArray\n    An array with the same datatype, containing the taken values.\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> n_legs = pa.chunked_array([[2, 2, 4], [4, 5, 100]])\n>>> n_legs\n<pyarrow.lib.ChunkedArray object at ...>\n[\n  [\n    2,\n    2,\n    4\n  ],\n  [\n    4,\n    5,\n    100\n  ]\n]\n>>> n_legs.take([1,4,5])\n<pyarrow.lib.ChunkedArray object at ...>\n[\n  [\n    2,\n    5,\n    100\n  ]\n]");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_12ChunkedArray_66take = {"take", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12ChunkedArray_66take, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12ChunkedArray_65take};
    static PyObject *__pyx_pw_7pyarrow_3lib_12ChunkedArray_66take(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_indices = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("take (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_indices,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(17, 1038, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 1038, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "take", 0) < (0)) __PYX_ERR(17, 1038, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("take", 1, 1, 1, i); __PYX_ERR(17, 1038, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 1)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 1038, __pyx_L3_error)
        }
        __pyx_v_indices = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("take", 1, 1, 1, __pyx_nargs); __PYX_ERR(17, 1038, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.ChunkedArray.take", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_12ChunkedArray_65take(((struct __pyx_obj_7pyarrow_3lib_ChunkedArray *)__pyx_v_self), __pyx_v_indices);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_12ChunkedArray_65take(struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_self, PyObject *__pyx_v_indices) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      size_t __pyx_t_3;
      PyObject *__pyx_t_4 = NULL;
      PyObject *__pyx_t_5 = NULL;
      PyObject *__pyx_t_6 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("take", 0);

      /* "pyarrow/table.pxi":1082
 *         ]
 *         """
 *         self._assert_cpu()             # <<<<<<<<<<<<<<
 *         return _pc().take(self, indices)
 * 
*/
      __pyx_t_2 = ((PyObject *)__pyx_v_self);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_3 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_assert_cpu, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 1082, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "pyarrow/table.pxi":1083
 *         """
 *         self._assert_cpu()
 *         return _pc().take(self, indices)             # <<<<<<<<<<<<<<
 * 
 *     def drop_null(self):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_5 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_pc_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 1083, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_3 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
        assert(__pyx_t_5);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
        __pyx_t_3 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
        __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 1083, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
      }
      __pyx_t_2 = __pyx_t_4;
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_3 = 0;
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_2, ((PyObject *)__pyx_v_self), __pyx_v_indices};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_take, __pyx_callargs+__pyx_t_3, (3-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 1083, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/table.pxi":1038
 *         return _pc().index(self, value, start, end, memory_pool=memory_pool)
 * 
 *     def take(self, object indices):             # <<<<<<<<<<<<<<
 *         """
 *         Select values from the chunked array.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_AddTraceback("pyarrow.lib.ChunkedArray.take", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/table.pxi":1085
 *         return _pc().take(self, indices)
 * 
 *     def drop_null(self):             # <<<<<<<<<<<<<<
 *         """
 *         Remove missing values from a chunked array.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_12ChunkedArray_68drop_null(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_12ChunkedArray_67drop_null, "ChunkedArray.drop_null(self)\n\nRemove missing values from a chunked array.\nSee :func:`pyarrow.compute.drop_null` for full description.\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> n_legs = pa.chunked_array([[2, 2, None], [4, 5, 100]])\n>>> n_legs\n<pyarrow.lib.ChunkedArray object at ...>\n[\n  [\n    2,\n    2,\n    null\n  ],\n  [\n    4,\n    5,\n    100\n  ]\n]\n>>> n_legs.drop_null()\n<pyarrow.lib.ChunkedArray object at ...>\n[\n  [\n    2,\n    2\n  ],\n  [\n    4,\n    5,\n    100\n  ]\n]");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_12ChunkedArray_68drop_null = {"drop_null", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12ChunkedArray_68drop_null, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12ChunkedArray_67drop_null};
    static PyObject *__pyx_pw_7pyarrow_3lib_12ChunkedArray_68drop_null(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("drop_null (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("drop_null", 1, 0, 0, __pyx_nargs); return NULL; }
      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
      if (unlikely(__pyx_kwds_len < 0)) return NULL;
      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("drop_null", __pyx_kwds); return NULL;}
      __pyx_r = __pyx_pf_7pyarrow_3lib_12ChunkedArray_67drop_null(((struct __pyx_obj_7pyarrow_3lib_ChunkedArray *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_12ChunkedArray_67drop_null(struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      size_t __pyx_t_3;
      PyObject *__pyx_t_4 = NULL;
      PyObject *__pyx_t_5 = NULL;
      PyObject *__pyx_t_6 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("drop_null", 0);

      /* "pyarrow/table.pxi":1122
 *         ]
 *         """
 *         self._assert_cpu()             # <<<<<<<<<<<<<<
 *         return _pc().drop_null(self)
 * 
*/
      __pyx_t_2 = ((PyObject *)__pyx_v_self);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_3 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_assert_cpu, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 1122, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "pyarrow/table.pxi":1123
 *         """
 *         self._assert_cpu()
 *         return _pc().drop_null(self)             # <<<<<<<<<<<<<<
 * 
 *     def sort(self, order="ascending", **kwargs):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_5 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_pc_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 1123, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_3 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
        assert(__pyx_t_5);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
        __pyx_t_3 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
        __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 1123, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
      }
      __pyx_t_2 = __pyx_t_4;
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_3 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, ((PyObject *)__pyx_v_self)};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_drop_null, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 1123, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/table.pxi":1085
 *         return _pc().take(self, indices)
 * 
 *     def drop_null(self):             # <<<<<<<<<<<<<<
 *         """
 *         Remove missing values from a chunked array.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_AddTraceback("pyarrow.lib.ChunkedArray.drop_null", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/table.pxi":1125
 *         return _pc().drop_null(self)
 * 
 *     def sort(self, order="ascending", **kwargs):             # <<<<<<<<<<<<<<
 *         """
 *         Sort the ChunkedArray
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_12ChunkedArray_70sort(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_12ChunkedArray_69sort, "ChunkedArray.sort(self, order='ascending', **kwargs)\n\nSort the ChunkedArray\n\nParameters\n----------\norder : str, default \"ascending\"\n    Which order to sort values in.\n    Accepted values are \"ascending\", \"descending\".\n**kwargs : dict, optional\n    Additional sorting options.\n    As allowed by :class:`SortOptions`\n\nReturns\n-------\nresult : ChunkedArray");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_12ChunkedArray_70sort = {"sort", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12ChunkedArray_70sort, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12ChunkedArray_69sort};
    static PyObject *__pyx_pw_7pyarrow_3lib_12ChunkedArray_70sort(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_order = 0;
      PyObject *__pyx_v_kwargs = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("sort (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
      __Pyx_GOTREF(__pyx_v_kwargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_order,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(17, 1125, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 1125, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, __pyx_v_kwargs, values, kwd_pos_args, __pyx_kwds_len, "sort", 1) < (0)) __PYX_ERR(17, 1125, __pyx_L3_error)
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_n_u_ascending));
        } else {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 1125, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_n_u_ascending));
        }
        __pyx_v_order = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("sort", 0, 0, 1, __pyx_nargs); __PYX_ERR(17, 1125, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
      __Pyx_AddTraceback("pyarrow.lib.ChunkedArray.sort", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_12ChunkedArray_69sort(((struct __pyx_obj_7pyarrow_3lib_ChunkedArray *)__pyx_v_self), __pyx_v_order, __pyx_v_kwargs);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_DECREF(__pyx_v_kwargs);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_12ChunkedArray_69sort(struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_self, PyObject *__pyx_v_order, PyObject *__pyx_v_kwargs) {
      PyObject *__pyx_v_indices = NULL;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      size_t __pyx_t_3;
      PyObject *__pyx_t_4 = NULL;
      PyObject *__pyx_t_5 = NULL;
      PyObject *__pyx_t_6 = NULL;
      PyObject *__pyx_t_7 = NULL;
      PyObject *__pyx_t_8 = NULL;
      PyObject *__pyx_t_9 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("sort", 0);

      /* "pyarrow/table.pxi":1142
 *         result : ChunkedArray
 *         """
 *         self._assert_cpu()             # <<<<<<<<<<<<<<
 *         indices = _pc().sort_indices(
 *             self,
*/
      __pyx_t_2 = ((PyObject *)__pyx_v_self);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_3 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_assert_cpu, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 1142, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "pyarrow/table.pxi":1143
 *         """
 *         self._assert_cpu()
 *         indices = _pc().sort_indices(             # <<<<<<<<<<<<<<
 *             self,
 *             options=_pc().SortOptions(sort_keys=[("", order)], **kwargs)
*/
      __pyx_t_5 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_pc_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 1143, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_3 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
        assert(__pyx_t_5);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
        __pyx_t_3 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
        __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 1143, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
      }
      __pyx_t_2 = __pyx_t_4;
      __Pyx_INCREF(__pyx_t_2);

      /* "pyarrow/table.pxi":1145
 *         indices = _pc().sort_indices(
 *             self,
 *             options=_pc().SortOptions(sort_keys=[("", order)], **kwargs)             # <<<<<<<<<<<<<<
 *         )
 *         return self.take(indices)
*/
      __pyx_t_5 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_pc_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 1145, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_3 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
        assert(__pyx_t_5);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
        __pyx_t_3 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
        __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 1145, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
      }
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_SortOptions); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 1145, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 1145, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(17, 1145, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_INCREF(__pyx_mstate_global->__pyx_kp_u__15);
      __Pyx_GIVEREF(__pyx_mstate_global->__pyx_kp_u__15);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_mstate_global->__pyx_kp_u__15) != (0)) __PYX_ERR(17, 1145, __pyx_L1_error);
      __Pyx_INCREF(__pyx_v_order);
      __Pyx_GIVEREF(__pyx_v_order);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_order) != (0)) __PYX_ERR(17, 1145, __pyx_L1_error);
      __pyx_t_9 = PyList_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(17, 1145, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_GIVEREF(__pyx_t_8);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_9, 0, __pyx_t_8) != (0)) __PYX_ERR(17, 1145, __pyx_L1_error);
      __pyx_t_8 = 0;
      if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_sort_keys, __pyx_t_9) < (0)) __PYX_ERR(17, 1145, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_6 = __pyx_t_5;
      __pyx_t_5 = 0;
      if (__Pyx_MergeKeywords(__pyx_t_6, __pyx_v_kwargs) < (0)) __PYX_ERR(17, 1145, __pyx_L1_error)
      __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_mstate_global->__pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 1145, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_3 = 0;
      {
        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, ((PyObject *)__pyx_v_self)};
        __pyx_t_6 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 1143, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_options, __pyx_t_5, __pyx_t_6, __pyx_callargs+2, 0) < (0)) __PYX_ERR(17, 1143, __pyx_L1_error)
        __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_sort_indices, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_6);
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 1143, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_v_indices = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "pyarrow/table.pxi":1147
 *             options=_pc().SortOptions(sort_keys=[("", order)], **kwargs)
 *         )
 *         return self.take(indices)             # <<<<<<<<<<<<<<
 * 
 *     def unify_dictionaries(self, MemoryPool memory_pool=None):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_4 = ((PyObject *)__pyx_v_self);
      __Pyx_INCREF(__pyx_t_4);
      __pyx_t_3 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_indices};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_take, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 1147, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/table.pxi":1125
 *         return _pc().drop_null(self)
 * 
 *     def sort(self, order="ascending", **kwargs):             # <<<<<<<<<<<<<<
 *         """
 *         Sort the ChunkedArray
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_8);
      __Pyx_XDECREF(__pyx_t_9);
      __Pyx_AddTraceback("pyarrow.lib.ChunkedArray.sort", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_indices);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/table.pxi":1149
 *         return self.take(indices)
 * 
 *     def unify_dictionaries(self, MemoryPool memory_pool=None):             # <<<<<<<<<<<<<<
 *         """
 *         Unify dictionaries across all chunks.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_12ChunkedArray_72unify_dictionaries(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_12ChunkedArray_71unify_dictionaries, "ChunkedArray.unify_dictionaries(self, MemoryPool memory_pool=None)\n\nUnify dictionaries across all chunks.\n\nThis method returns an equivalent chunked array, but where all\nchunks share the same dictionary values.  Dictionary indices are\ntransposed accordingly.\n\nIf there are no dictionaries in the chunked array, it is returned\nunchanged.\n\nParameters\n----------\nmemory_pool : MemoryPool, default None\n    For memory allocations, if required, otherwise use default pool\n\nReturns\n-------\nresult : ChunkedArray\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> arr_1 = pa.array([\"Flamingo\", \"Parrot\", \"Dog\"]).dictionary_encode()\n>>> arr_2 = pa.array([\"Horse\", \"Brittle stars\", \"Centipede\"]).dictionary_encode()\n>>> c_arr = pa.chunked_array([arr_1, arr_2])\n>>> c_arr\n<pyarrow.lib.ChunkedArray object at ...>\n[\n...\n  -- dictionary:\n    [\n      \"Flamingo\",\n      \"Parrot\",\n      \"Dog\"\n    ]\n  -- indices:\n    [\n      0,\n      1,\n      2\n    ],\n...\n  -- dictionary:\n    [\n      \"Horse\",\n      \"Brittle stars\",\n      \"Centipede\"\n    ]\n  -- indices:\n    [\n      0,\n      1,\n      2\n    ]\n]\n>>> c_arr.unify_dictionaries()\n<pyarrow.lib.ChunkedArray object at ...>\n[\n...\n  -- dictionary:\n    [\n      \"Flamingo\",\n      \"Parrot\",\n      \"Dog\",\n      \"Horse\",\n      \"Brittle stars\",\n      \"Centipede\"\n    ]\n  -- indices:\n    [\n      0,\n      1,\n      2\n    ],\n...\n  -- dictionary:\n    [\n      \"Flamingo\",\n      \"Parrot\",\n      \"Dog\",\n      \"Horse\",\n      \"Brittle stars\",\n      \"Centipede\"\n    ]\n  -- indices:\n    [\n      3,\n      4,\n      5\n    ]\n]");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_12ChunkedArray_72unify_dictionaries = {"unify_dictionaries", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12ChunkedArray_72unify_dictionaries, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12ChunkedArray_71unify_dictionaries};
    static PyObject *__pyx_pw_7pyarrow_3lib_12ChunkedArray_72unify_dictionaries(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_memory_pool = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("unify_dictionaries (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_memory_pool,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(17, 1149, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 1149, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "unify_dictionaries", 0) < (0)) __PYX_ERR(17, 1149, __pyx_L3_error)
          if (!values[0]) values[0] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)Py_None));
        } else {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 1149, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (!values[0]) values[0] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)Py_None));
        }
        __pyx_v_memory_pool = ((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)values[0]);
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("unify_dictionaries", 0, 0, 1, __pyx_nargs); __PYX_ERR(17, 1149, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.ChunkedArray.unify_dictionaries", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_memory_pool), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_MemoryPool, 1, "memory_pool", 0))) __PYX_ERR(17, 1149, __pyx_L1_error)
      __pyx_r = __pyx_pf_7pyarrow_3lib_12ChunkedArray_71unify_dictionaries(((struct __pyx_obj_7pyarrow_3lib_ChunkedArray *)__pyx_v_self), __pyx_v_memory_pool);

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = NULL;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      goto __pyx_L7_cleaned_up;
      __pyx_L0:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __pyx_L7_cleaned_up:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_12ChunkedArray_71unify_dictionaries(struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_self, struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_memory_pool) {
       arrow::MemoryPool *__pyx_v_pool;
      std::shared_ptr< arrow::ChunkedArray>  __pyx_v_c_result;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      size_t __pyx_t_3;
       arrow::MemoryPool *__pyx_t_4;
      std::shared_ptr< arrow::ChunkedArray>  __pyx_t_5;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("unify_dictionaries", 0);

      /* "pyarrow/table.pxi":1242
 *         ]
 *         """
 *         self._assert_cpu()             # <<<<<<<<<<<<<<
 *         cdef:
 *             CMemoryPool* pool = maybe_unbox_memory_pool(memory_pool)
*/
      __pyx_t_2 = ((PyObject *)__pyx_v_self);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_3 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_assert_cpu, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 1242, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "pyarrow/table.pxi":1244
 *         self._assert_cpu()
 *         cdef:
 *             CMemoryPool* pool = maybe_unbox_memory_pool(memory_pool)             # <<<<<<<<<<<<<<
 *             shared_ptr[CChunkedArray] c_result
 * 
*/
      __pyx_t_4 = __pyx_f_7pyarrow_3lib_maybe_unbox_memory_pool(__pyx_v_memory_pool); if (unlikely(__pyx_t_4 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(17, 1244, __pyx_L1_error)
      __pyx_v_pool = __pyx_t_4;

      /* "pyarrow/table.pxi":1247
 *             shared_ptr[CChunkedArray] c_result
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             c_result = GetResultValue(CDictionaryUnifier.UnifyChunkedArray(
 *                 self.sp_chunked_array, pool))
*/
      {
          PyThreadState * _save;
          _save = PyEval_SaveThread();
          __Pyx_FastGIL_Remember();
          /*try:*/ {

            /* "pyarrow/table.pxi":1249
 *         with nogil:
 *             c_result = GetResultValue(CDictionaryUnifier.UnifyChunkedArray(
 *                 self.sp_chunked_array, pool))             # <<<<<<<<<<<<<<
 * 
 *         return pyarrow_wrap_chunked_array(c_result)
*/
            if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
              PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_chunked_array");
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              __PYX_ERR(17, 1249, __pyx_L4_error)
            }

            /* "pyarrow/table.pxi":1248
 * 
 *         with nogil:
 *             c_result = GetResultValue(CDictionaryUnifier.UnifyChunkedArray(             # <<<<<<<<<<<<<<
 *                 self.sp_chunked_array, pool))
 * 
*/
            __pyx_t_5 = arrow::py::GetResultValue<std::shared_ptr< arrow::ChunkedArray> >( arrow::DictionaryUnifier::UnifyChunkedArray(__pyx_v_self->sp_chunked_array, __pyx_v_pool)); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(17, 1248, __pyx_L4_error)
            __pyx_v_c_result = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_5);
          }

          /* "pyarrow/table.pxi":1247
 *             shared_ptr[CChunkedArray] c_result
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             c_result = GetResultValue(CDictionaryUnifier.UnifyChunkedArray(
 *                 self.sp_chunked_array, pool))
*/
          /*finally:*/ {
            /*normal exit:*/{
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L5;
            }
            __pyx_L4_error: {
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L1_error;
            }
            __pyx_L5:;
          }
      }

      /* "pyarrow/table.pxi":1251
 *                 self.sp_chunked_array, pool))
 * 
 *         return pyarrow_wrap_chunked_array(c_result)             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = pyarrow_wrap_chunked_array(__pyx_v_c_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 1251, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/table.pxi":1149
 *         return self.take(indices)
 * 
 *     def unify_dictionaries(self, MemoryPool memory_pool=None):             # <<<<<<<<<<<<<<
 *         """
 *         Unify dictionaries across all chunks.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_AddTraceback("pyarrow.lib.ChunkedArray.unify_dictionaries", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/table.pxi":1253
 *         return pyarrow_wrap_chunked_array(c_result)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def num_chunks(self):
 *         """
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_12ChunkedArray_10num_chunks_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_12ChunkedArray_10num_chunks_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_12ChunkedArray_10num_chunks___get__(((struct __pyx_obj_7pyarrow_3lib_ChunkedArray *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_12ChunkedArray_10num_chunks___get__(struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__get__", 0);

      /* "pyarrow/table.pxi":1269
 *         2
 *         """
 *         return self.chunked_array.num_chunks()             # <<<<<<<<<<<<<<
 * 
 *     def chunk(self, i):
*/
      __Pyx_XDECREF(__pyx_r);
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "chunked_array");
        __PYX_ERR(17, 1269, __pyx_L1_error)
      }
      __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_v_self->chunked_array->num_chunks()); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 1269, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/table.pxi":1253
 *         return pyarrow_wrap_chunked_array(c_result)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def num_chunks(self):
 *         """
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("pyarrow.lib.ChunkedArray.num_chunks.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/table.pxi":1271
 *         return self.chunked_array.num_chunks()
 * 
 *     def chunk(self, i):             # <<<<<<<<<<<<<<
 *         """
 *         Select a chunk by its index.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_12ChunkedArray_74chunk(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_12ChunkedArray_73chunk, "ChunkedArray.chunk(self, i)\n\nSelect a chunk by its index.\n\nParameters\n----------\ni : int\n\nReturns\n-------\npyarrow.Array\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> n_legs = pa.chunked_array([[2, 2, None], [4, 5, 100]])\n>>> n_legs.chunk(1)\n<pyarrow.lib.Int64Array object at ...>\n[\n  4,\n  5,\n  100\n]");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_12ChunkedArray_74chunk = {"chunk", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12ChunkedArray_74chunk, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12ChunkedArray_73chunk};
    static PyObject *__pyx_pw_7pyarrow_3lib_12ChunkedArray_74chunk(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_i = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("chunk (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_i,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(17, 1271, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 1271, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "chunk", 0) < (0)) __PYX_ERR(17, 1271, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("chunk", 1, 1, 1, i); __PYX_ERR(17, 1271, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 1)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 1271, __pyx_L3_error)
        }
        __pyx_v_i = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("chunk", 1, 1, 1, __pyx_nargs); __PYX_ERR(17, 1271, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.ChunkedArray.chunk", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_12ChunkedArray_73chunk(((struct __pyx_obj_7pyarrow_3lib_ChunkedArray *)__pyx_v_self), __pyx_v_i);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_12ChunkedArray_73chunk(struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_self, PyObject *__pyx_v_i) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      int __pyx_t_1;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      int __pyx_t_4;
      size_t __pyx_t_5;
      int __pyx_t_6;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("chunk", 0);

      /* "pyarrow/table.pxi":1295
 *         ]
 *         """
 *         if i >= self.num_chunks or i < 0:             # <<<<<<<<<<<<<<
 *             raise IndexError('Chunk index out of range.')
 * 
*/
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_num_chunks); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 1295, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = PyObject_RichCompare(__pyx_v_i, __pyx_t_2, Py_GE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 1295, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(17, 1295, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (!__pyx_t_4) {
      } else {
        __pyx_t_1 = __pyx_t_4;
        goto __pyx_L4_bool_binop_done;
      }
      __pyx_t_3 = PyObject_RichCompare(__pyx_v_i, __pyx_mstate_global->__pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 1295, __pyx_L1_error)
      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(17, 1295, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_1 = __pyx_t_4;
      __pyx_L4_bool_binop_done:;
      if (unlikely(__pyx_t_1)) {

        /* "pyarrow/table.pxi":1296
 *         """
 *         if i >= self.num_chunks or i < 0:
 *             raise IndexError('Chunk index out of range.')             # <<<<<<<<<<<<<<
 * 
 *         return pyarrow_wrap_array(self.chunked_array.chunk(i))
*/
        __pyx_t_2 = NULL;
        __pyx_t_5 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Chunk_index_out_of_range};
          __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_IndexError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 1296, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        __Pyx_Raise(__pyx_t_3, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __PYX_ERR(17, 1296, __pyx_L1_error)

        /* "pyarrow/table.pxi":1295
 *         ]
 *         """
 *         if i >= self.num_chunks or i < 0:             # <<<<<<<<<<<<<<
 *             raise IndexError('Chunk index out of range.')
 * 
*/
      }

      /* "pyarrow/table.pxi":1298
 *             raise IndexError('Chunk index out of range.')
 * 
 *         return pyarrow_wrap_array(self.chunked_array.chunk(i))             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
      __Pyx_XDECREF(__pyx_r);
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "chunked_array");
        __PYX_ERR(17, 1298, __pyx_L1_error)
      }
      __pyx_t_6 = __Pyx_PyLong_As_int(__pyx_v_i); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(17, 1298, __pyx_L1_error)
      __pyx_t_3 = pyarrow_wrap_array(__pyx_v_self->chunked_array->chunk(__pyx_t_6)); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 1298, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "pyarrow/table.pxi":1271
 *         return self.chunked_array.num_chunks()
 * 
 *     def chunk(self, i):             # <<<<<<<<<<<<<<
 *         """
 *         Select a chunk by its index.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_AddTraceback("pyarrow.lib.ChunkedArray.chunk", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/table.pxi":1300
 *         return pyarrow_wrap_array(self.chunked_array.chunk(i))
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def chunks(self):
 *         """
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_12ChunkedArray_6chunks_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_12ChunkedArray_6chunks_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_12ChunkedArray_6chunks___get__(((struct __pyx_obj_7pyarrow_3lib_ChunkedArray *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_12ChunkedArray_6chunks___get__(struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      size_t __pyx_t_3;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__get__", 0);

      /* "pyarrow/table.pxi":1336
 *         ]]
 *         """
 *         return list(self.iterchunks())             # <<<<<<<<<<<<<<
 * 
 *     def iterchunks(self):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = ((PyObject *)__pyx_v_self);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_3 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_iterchunks, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 1336, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_t_2 = __Pyx_PySequence_ListKeepNew(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 1336, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;

      /* "pyarrow/table.pxi":1300
 *         return pyarrow_wrap_array(self.chunked_array.chunk(i))
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def chunks(self):
 *         """
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_AddTraceback("pyarrow.lib.ChunkedArray.chunks.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }
    static PyObject *__pyx_gb_7pyarrow_3lib_12ChunkedArray_77generator10(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

    /* "pyarrow/table.pxi":1338
 *         return list(self.iterchunks())
 * 
 *     def iterchunks(self):             # <<<<<<<<<<<<<<
 *         """
 *         Convert to an iterator of ChunkArrays.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_12ChunkedArray_76iterchunks(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_12ChunkedArray_75iterchunks, "ChunkedArray.iterchunks(self)\n\nConvert to an iterator of ChunkArrays.\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> n_legs = pa.chunked_array([[2, 2, 4], [4, None, 100]])\n>>> for i in n_legs.iterchunks():\n...     print(i.null_count)\n...\n0\n1");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_12ChunkedArray_76iterchunks = {"iterchunks", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12ChunkedArray_76iterchunks, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12ChunkedArray_75iterchunks};
    static PyObject *__pyx_pw_7pyarrow_3lib_12ChunkedArray_76iterchunks(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("iterchunks (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("iterchunks", 1, 0, 0, __pyx_nargs); return NULL; }
      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
      if (unlikely(__pyx_kwds_len < 0)) return NULL;
      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("iterchunks", __pyx_kwds); return NULL;}
      __pyx_r = __pyx_pf_7pyarrow_3lib_12ChunkedArray_75iterchunks(((struct __pyx_obj_7pyarrow_3lib_ChunkedArray *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_12ChunkedArray_75iterchunks(struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_self) {
      struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_14_iterchunks *__pyx_cur_scope;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("iterchunks", 0);
      __pyx_cur_scope = (struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_14_iterchunks *)__pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_14_iterchunks(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_14_iterchunks, __pyx_mstate_global->__pyx_empty_tuple, NULL);
      if (unlikely(!__pyx_cur_scope)) {
        __pyx_cur_scope = ((struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_14_iterchunks *)Py_None);
        __Pyx_INCREF(Py_None);
        __PYX_ERR(17, 1338, __pyx_L1_error)
      } else {
        __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
      }
      __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
      __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
      __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
      {
        __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7pyarrow_3lib_12ChunkedArray_77generator10, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[13]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_iterchunks, __pyx_mstate_global->__pyx_n_u_ChunkedArray_iterchunks, __pyx_mstate_global->__pyx_n_u_pyarrow_lib); if (unlikely(!gen)) __PYX_ERR(17, 1338, __pyx_L1_error)
        __Pyx_DECREF(__pyx_cur_scope);
        __Pyx_RefNannyFinishContext();
        return (PyObject *) gen;
      }

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_AddTraceback("pyarrow.lib.ChunkedArray.iterchunks", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __Pyx_DECREF((PyObject *)__pyx_cur_scope);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_gb_7pyarrow_3lib_12ChunkedArray_77generator10(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
      struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_14_iterchunks *__pyx_cur_scope = ((struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_14_iterchunks *)__pyx_generator->closure);
      PyObject *__pyx_r = NULL;
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      size_t __pyx_t_4;
      PyObject *(*__pyx_t_5)(PyObject *);
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("iterchunks", 0);
      switch (__pyx_generator->resume_label) {
        case 0: goto __pyx_L3_first_run;
        case 1: goto __pyx_L6_resume_from_yield;
        default: /* CPython raises the right error here */
        __Pyx_RefNannyFinishContext();
        return NULL;
      }
      __pyx_L3_first_run:;
      if (unlikely(__pyx_sent_value != Py_None)) {
        if (unlikely(__pyx_sent_value)) PyErr_SetString(PyExc_TypeError, "can't send non-None value to a just-started generator");
        __PYX_ERR(17, 1338, __pyx_L1_error)
      }

      /* "pyarrow/table.pxi":1353
 * 
 *         """
 *         for i in range(self.num_chunks):             # <<<<<<<<<<<<<<
 *             yield self.chunk(i)
 * 
*/
      __pyx_t_2 = NULL;
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_mstate_global->__pyx_n_u_num_chunks); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 1353, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(&PyRange_Type), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 1353, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 1353, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 1353, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      for (;;) {
        {
          __pyx_t_1 = __pyx_t_5(__pyx_t_3);
          if (unlikely(!__pyx_t_1)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(17, 1353, __pyx_L1_error)
              PyErr_Clear();
            }
            break;
          }
        }
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_i);
        __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_i, __pyx_t_1);
        __Pyx_GIVEREF(__pyx_t_1);
        __pyx_t_1 = 0;

        /* "pyarrow/table.pxi":1354
 *         """
 *         for i in range(self.num_chunks):
 *             yield self.chunk(i)             # <<<<<<<<<<<<<<
 * 
 *     def to_pylist(self, *, maps_as_pydicts=None):
*/
        __pyx_t_2 = ((PyObject *)__pyx_cur_scope->__pyx_v_self);
        __Pyx_INCREF(__pyx_t_2);
        __pyx_t_4 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_cur_scope->__pyx_v_i};
          __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_chunk, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 1354, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
        }
        __pyx_r = __pyx_t_1;
        __pyx_t_1 = 0;
        __Pyx_XGIVEREF(__pyx_t_3);
        __pyx_cur_scope->__pyx_t_0 = __pyx_t_3;
        __pyx_cur_scope->__pyx_t_1 = __pyx_t_5;
        __Pyx_XGIVEREF(__pyx_r);
        __Pyx_RefNannyFinishContext();
        __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
        /* return from generator, yielding value */
        __pyx_generator->resume_label = 1;
        return __pyx_r;
        __pyx_L6_resume_from_yield:;
        __pyx_t_3 = __pyx_cur_scope->__pyx_t_0;
        __pyx_cur_scope->__pyx_t_0 = 0;
        __Pyx_XGOTREF(__pyx_t_3);
        __pyx_t_5 = __pyx_cur_scope->__pyx_t_1;
        if (unlikely(!__pyx_sent_value)) __PYX_ERR(17, 1354, __pyx_L1_error)

        /* "pyarrow/table.pxi":1353
 * 
 *         """
 *         for i in range(self.num_chunks):             # <<<<<<<<<<<<<<
 *             yield self.chunk(i)
 * 
*/
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

      /* "pyarrow/table.pxi":1338
 *         return list(self.iterchunks())
 * 
 *     def iterchunks(self):             # <<<<<<<<<<<<<<
 *         """
 *         Convert to an iterator of ChunkArrays.
*/

      /* 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);
      if (__Pyx_PyErr_Occurred()) {
        __Pyx_Generator_Replace_StopIteration(0);
        __Pyx_AddTraceback("iterchunks", __pyx_clineno, __pyx_lineno, __pyx_filename);
      }
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      #if !CYTHON_USE_EXC_INFO_STACK
      __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
      #endif
      __pyx_generator->resume_label = -1;
      __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/table.pxi":1356
 *             yield self.chunk(i)
 * 
 *     def to_pylist(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Convert to a list of native Python objects.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_12ChunkedArray_79to_pylist(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_12ChunkedArray_78to_pylist, "ChunkedArray.to_pylist(self, *, maps_as_pydicts=None)\n\nConvert to a list of native Python objects.\n\nParameters\n----------\nmaps_as_pydicts : str, optional, default `None`\n    Valid values are `None`, 'lossy', or 'strict'.\n    The default behavior (`None`), is to convert Arrow Map arrays to\n    Python association lists (list-of-tuples) in the same order as the\n    Arrow Map, as in [(key1, value1), (key2, value2), ...].\n\n    If 'lossy' or 'strict', convert Arrow Map arrays to native Python dicts.\n\n    If 'lossy', whenever duplicate keys are detected, a warning will be printed.\n    The last seen value of a duplicate key will be in the Python dictionary.\n    If 'strict', this instead results in an exception being raised when detected.\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> n_legs = pa.chunked_array([[2, 2, 4], [4, None, 100]])\n>>> n_legs.to_pylist()\n[2, 2, 4, 4, None, 100]");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_12ChunkedArray_79to_pylist = {"to_pylist", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12ChunkedArray_79to_pylist, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12ChunkedArray_78to_pylist};
    static PyObject *__pyx_pw_7pyarrow_3lib_12ChunkedArray_79to_pylist(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_maps_as_pydicts = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("to_pylist (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_maps_as_pydicts,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(17, 1356, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, 0, __pyx_kwds_len, "to_pylist", 0) < (0)) __PYX_ERR(17, 1356, __pyx_L3_error)
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
        } else if (unlikely(__pyx_nargs != 0)) {
          goto __pyx_L5_argtuple_error;
        } else {
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
        }
        __pyx_v_maps_as_pydicts = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("to_pylist", 1, 0, 0, __pyx_nargs); __PYX_ERR(17, 1356, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.ChunkedArray.to_pylist", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_12ChunkedArray_78to_pylist(((struct __pyx_obj_7pyarrow_3lib_ChunkedArray *)__pyx_v_self), __pyx_v_maps_as_pydicts);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_12ChunkedArray_78to_pylist(struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_self, PyObject *__pyx_v_maps_as_pydicts) {
      PyObject *__pyx_v_result = NULL;
      PyObject *__pyx_v_i = NULL;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      size_t __pyx_t_3;
      PyObject *__pyx_t_4 = NULL;
      PyObject *(*__pyx_t_5)(PyObject *);
      PyObject *__pyx_t_6 = NULL;
      PyObject *__pyx_t_7 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("to_pylist", 0);

      /* "pyarrow/table.pxi":1381
 *         [2, 2, 4, 4, None, 100]
 *         """
 *         self._assert_cpu()             # <<<<<<<<<<<<<<
 *         result = []
 *         for i in range(self.num_chunks):
*/
      __pyx_t_2 = ((PyObject *)__pyx_v_self);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_3 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_assert_cpu, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 1381, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "pyarrow/table.pxi":1382
 *         """
 *         self._assert_cpu()
 *         result = []             # <<<<<<<<<<<<<<
 *         for i in range(self.num_chunks):
 *             result += self.chunk(i).to_pylist(maps_as_pydicts=maps_as_pydicts)
*/
      __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 1382, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_v_result = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "pyarrow/table.pxi":1383
 *         self._assert_cpu()
 *         result = []
 *         for i in range(self.num_chunks):             # <<<<<<<<<<<<<<
 *             result += self.chunk(i).to_pylist(maps_as_pydicts=maps_as_pydicts)
 *         return result
*/
      __pyx_t_2 = NULL;
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_num_chunks); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 1383, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4};
        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(&PyRange_Type), __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 1383, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 1383, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 1383, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      for (;;) {
        {
          __pyx_t_1 = __pyx_t_5(__pyx_t_4);
          if (unlikely(!__pyx_t_1)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(17, 1383, __pyx_L1_error)
              PyErr_Clear();
            }
            break;
          }
        }
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_1);
        __pyx_t_1 = 0;

        /* "pyarrow/table.pxi":1384
 *         result = []
 *         for i in range(self.num_chunks):
 *             result += self.chunk(i).to_pylist(maps_as_pydicts=maps_as_pydicts)             # <<<<<<<<<<<<<<
 *         return result
 * 
*/
        __pyx_t_7 = ((PyObject *)__pyx_v_self);
        __Pyx_INCREF(__pyx_t_7);
        __pyx_t_3 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_i};
          __pyx_t_6 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_chunk, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 1384, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
        }
        __pyx_t_2 = __pyx_t_6;
        __Pyx_INCREF(__pyx_t_2);
        __pyx_t_3 = 0;
        {
          PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, NULL};
          __pyx_t_7 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 1384, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_maps_as_pydicts, __pyx_v_maps_as_pydicts, __pyx_t_7, __pyx_callargs+1, 0) < (0)) __PYX_ERR(17, 1384, __pyx_L1_error)
          __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_to_pylist, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_7);
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 1384, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
        }
        __pyx_t_6 = PyNumber_InPlaceAdd(__pyx_v_result, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 1384, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_6);
        __pyx_t_6 = 0;

        /* "pyarrow/table.pxi":1383
 *         self._assert_cpu()
 *         result = []
 *         for i in range(self.num_chunks):             # <<<<<<<<<<<<<<
 *             result += self.chunk(i).to_pylist(maps_as_pydicts=maps_as_pydicts)
 *         return result
*/
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "pyarrow/table.pxi":1385
 *         for i in range(self.num_chunks):
 *             result += self.chunk(i).to_pylist(maps_as_pydicts=maps_as_pydicts)
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     def __arrow_c_stream__(self, requested_schema=None):
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_result);
      __pyx_r = __pyx_v_result;
      goto __pyx_L0;

      /* "pyarrow/table.pxi":1356
 *             yield self.chunk(i)
 * 
 *     def to_pylist(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Convert to a list of native Python objects.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_7);
      __Pyx_AddTraceback("pyarrow.lib.ChunkedArray.to_pylist", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_result);
      __Pyx_XDECREF(__pyx_v_i);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/table.pxi":1387
 *         return result
 * 
 *     def __arrow_c_stream__(self, requested_schema=None):             # <<<<<<<<<<<<<<
 *         """
 *         Export to a C ArrowArrayStream PyCapsule.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_12ChunkedArray_81__arrow_c_stream__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_12ChunkedArray_80__arrow_c_stream__, "ChunkedArray.__arrow_c_stream__(self, requested_schema=None)\n\nExport to a C ArrowArrayStream PyCapsule.\n\nParameters\n----------\nrequested_schema : PyCapsule, default None\n    The schema to which the stream should be casted, passed as a\n    PyCapsule containing a C ArrowSchema representation of the\n    requested schema.\n\nReturns\n-------\nPyCapsule\n    A capsule containing a C ArrowArrayStream struct.");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_12ChunkedArray_81__arrow_c_stream__ = {"__arrow_c_stream__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12ChunkedArray_81__arrow_c_stream__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12ChunkedArray_80__arrow_c_stream__};
    static PyObject *__pyx_pw_7pyarrow_3lib_12ChunkedArray_81__arrow_c_stream__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_requested_schema = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__arrow_c_stream__ (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_requested_schema,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(17, 1387, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 1387, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__arrow_c_stream__", 0) < (0)) __PYX_ERR(17, 1387, __pyx_L3_error)
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
        } else {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 1387, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
        }
        __pyx_v_requested_schema = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("__arrow_c_stream__", 0, 0, 1, __pyx_nargs); __PYX_ERR(17, 1387, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.ChunkedArray.__arrow_c_stream__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_12ChunkedArray_80__arrow_c_stream__(((struct __pyx_obj_7pyarrow_3lib_ChunkedArray *)__pyx_v_self), __pyx_v_requested_schema);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_12ChunkedArray_80__arrow_c_stream__(struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_self, PyObject *__pyx_v_requested_schema) {
      struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_chunked = 0;
      struct ArrowArrayStream *__pyx_v_c_stream;
      PyObject *__pyx_v_target_type = NULL;
      PyObject *__pyx_v_e = NULL;
      PyObject *__pyx_v_stream_capsule = NULL;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      size_t __pyx_t_3;
      int __pyx_t_4;
      PyObject *__pyx_t_5 = NULL;
      PyObject *__pyx_t_6 = NULL;
      PyObject *__pyx_t_7 = NULL;
      PyObject *__pyx_t_8 = NULL;
      PyObject *__pyx_t_9 = NULL;
      int __pyx_t_10;
      PyObject *__pyx_t_11 = NULL;
      PyObject *__pyx_t_12 = NULL;
      PyObject *__pyx_t_13 = NULL;
      PyObject *__pyx_t_14 = NULL;
      PyObject *__pyx_t_15[6];
      PyObject *__pyx_t_16 = NULL;
      int __pyx_t_17;
      char const *__pyx_t_18;
      PyObject *__pyx_t_19 = NULL;
      PyObject *__pyx_t_20 = NULL;
      PyObject *__pyx_t_21 = NULL;
      PyObject *__pyx_t_22 = NULL;
      PyObject *__pyx_t_23 = NULL;
      PyObject *__pyx_t_24 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__arrow_c_stream__", 0);

      /* "pyarrow/table.pxi":1403
 *             A capsule containing a C ArrowArrayStream struct.
 *         """
 *         self._assert_cpu()             # <<<<<<<<<<<<<<
 *         cdef:
 *             ChunkedArray chunked
*/
      __pyx_t_2 = ((PyObject *)__pyx_v_self);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_3 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_assert_cpu, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 1403, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "pyarrow/table.pxi":1406
 *         cdef:
 *             ChunkedArray chunked
 *             ArrowArrayStream* c_stream = NULL             # <<<<<<<<<<<<<<
 * 
 *         if requested_schema is not None:
*/
      __pyx_v_c_stream = NULL;

      /* "pyarrow/table.pxi":1408
 *             ArrowArrayStream* c_stream = NULL
 * 
 *         if requested_schema is not None:             # <<<<<<<<<<<<<<
 *             target_type = DataType._import_from_c_capsule(requested_schema)
 * 
*/
      __pyx_t_4 = (__pyx_v_requested_schema != Py_None);
      if (__pyx_t_4) {

        /* "pyarrow/table.pxi":1409
 * 
 *         if requested_schema is not None:
 *             target_type = DataType._import_from_c_capsule(requested_schema)             # <<<<<<<<<<<<<<
 * 
 *             if target_type != self.type:
*/
        __pyx_t_2 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType);
        __Pyx_INCREF(__pyx_t_2);
        __pyx_t_3 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_requested_schema};
          __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_import_from_c_capsule, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 1409, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
        }
        __pyx_v_target_type = __pyx_t_1;
        __pyx_t_1 = 0;

        /* "pyarrow/table.pxi":1411
 *             target_type = DataType._import_from_c_capsule(requested_schema)
 * 
 *             if target_type != self.type:             # <<<<<<<<<<<<<<
 *                 try:
 *                     chunked = self.cast(target_type, safe=True)
*/
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 1411, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_2 = PyObject_RichCompare(__pyx_v_target_type, __pyx_t_1, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 1411, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(17, 1411, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (__pyx_t_4) {

          /* "pyarrow/table.pxi":1412
 * 
 *             if target_type != self.type:
 *                 try:             # <<<<<<<<<<<<<<
 *                     chunked = self.cast(target_type, safe=True)
 *                 except ArrowInvalid as e:
*/
          {
            __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:*/ {

              /* "pyarrow/table.pxi":1413
 *             if target_type != self.type:
 *                 try:
 *                     chunked = self.cast(target_type, safe=True)             # <<<<<<<<<<<<<<
 *                 except ArrowInvalid as e:
 *                     raise ValueError(
*/
              __pyx_t_1 = ((PyObject *)__pyx_v_self);
              __Pyx_INCREF(__pyx_t_1);
              __pyx_t_3 = 0;
              {
                PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_1, __pyx_v_target_type};
                __pyx_t_8 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(17, 1413, __pyx_L5_error)
                __Pyx_GOTREF(__pyx_t_8);
                if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_safe, Py_True, __pyx_t_8, __pyx_callargs+2, 0) < (0)) __PYX_ERR(17, 1413, __pyx_L5_error)
                __pyx_t_2 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_cast, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_8);
                __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
                __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 1413, __pyx_L5_error)
                __Pyx_GOTREF(__pyx_t_2);
              }
              if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ChunkedArray))))) __PYX_ERR(17, 1413, __pyx_L5_error)
              __pyx_v_chunked = ((struct __pyx_obj_7pyarrow_3lib_ChunkedArray *)__pyx_t_2);
              __pyx_t_2 = 0;

              /* "pyarrow/table.pxi":1412
 * 
 *             if target_type != self.type:
 *                 try:             # <<<<<<<<<<<<<<
 *                     chunked = self.cast(target_type, safe=True)
 *                 except ArrowInvalid as e:
*/
            }
            __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
            __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L10_try_end;
            __pyx_L5_error:;
            __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;

            /* "pyarrow/table.pxi":1414
 *                 try:
 *                     chunked = self.cast(target_type, safe=True)
 *                 except ArrowInvalid as e:             # <<<<<<<<<<<<<<
 *                     raise ValueError(
 *                         f"Could not cast {self.type} to requested type {target_type}: {e}"
*/
            __Pyx_ErrFetch(&__pyx_t_2, &__pyx_t_8, &__pyx_t_1);
            __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_ArrowInvalid); if (unlikely(!__pyx_t_9)) __PYX_ERR(17, 1414, __pyx_L7_except_error)
            __Pyx_GOTREF(__pyx_t_9);
            __pyx_t_10 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_2, __pyx_t_9);
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_ErrRestore(__pyx_t_2, __pyx_t_8, __pyx_t_1);
            __pyx_t_2 = 0; __pyx_t_8 = 0; __pyx_t_1 = 0;
            if (__pyx_t_10) {
              __Pyx_AddTraceback("pyarrow.lib.ChunkedArray.__arrow_c_stream__", __pyx_clineno, __pyx_lineno, __pyx_filename);
              if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_8, &__pyx_t_2) < 0) __PYX_ERR(17, 1414, __pyx_L7_except_error)
              __Pyx_XGOTREF(__pyx_t_1);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_2);
              __Pyx_INCREF(__pyx_t_8);
              __pyx_v_e = __pyx_t_8;
              /*try:*/ {

                /* "pyarrow/table.pxi":1415
 *                     chunked = self.cast(target_type, safe=True)
 *                 except ArrowInvalid as e:
 *                     raise ValueError(             # <<<<<<<<<<<<<<
 *                         f"Could not cast {self.type} to requested type {target_type}: {e}"
 *                     )
*/
                __pyx_t_11 = NULL;

                /* "pyarrow/table.pxi":1416
 *                 except ArrowInvalid as e:
 *                     raise ValueError(
 *                         f"Could not cast {self.type} to requested type {target_type}: {e}"             # <<<<<<<<<<<<<<
 *                     )
 *             else:
*/
                __pyx_t_12 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_type); if (unlikely(!__pyx_t_12)) __PYX_ERR(17, 1416, __pyx_L16_error)
                __Pyx_GOTREF(__pyx_t_12);
                __pyx_t_13 = __Pyx_PyObject_FormatSimple(__pyx_t_12, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_13)) __PYX_ERR(17, 1416, __pyx_L16_error)
                __Pyx_GOTREF(__pyx_t_13);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_12 = __Pyx_PyObject_FormatSimple(__pyx_v_target_type, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_12)) __PYX_ERR(17, 1416, __pyx_L16_error)
                __Pyx_GOTREF(__pyx_t_12);
                __pyx_t_14 = __Pyx_PyObject_FormatSimple(__pyx_v_e, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_14)) __PYX_ERR(17, 1416, __pyx_L16_error)
                __Pyx_GOTREF(__pyx_t_14);
                __pyx_t_15[0] = __pyx_mstate_global->__pyx_kp_u_Could_not_cast;
                __pyx_t_15[1] = __pyx_t_13;
                __pyx_t_15[2] = __pyx_mstate_global->__pyx_kp_u_to_requested_type;
                __pyx_t_15[3] = __pyx_t_12;
                __pyx_t_15[4] = __pyx_mstate_global->__pyx_kp_u__10;
                __pyx_t_15[5] = __pyx_t_14;
                __pyx_t_16 = __Pyx_PyUnicode_Join(__pyx_t_15, 6, 15 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_13) + 19 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_12) + 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_14), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_13) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_14));
                if (unlikely(!__pyx_t_16)) __PYX_ERR(17, 1416, __pyx_L16_error)
                __Pyx_GOTREF(__pyx_t_16);
                __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
                __pyx_t_3 = 1;
                {
                  PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_t_16};
                  __pyx_t_9 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                  __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
                  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
                  if (unlikely(!__pyx_t_9)) __PYX_ERR(17, 1415, __pyx_L16_error)
                  __Pyx_GOTREF(__pyx_t_9);
                }
                __Pyx_Raise(__pyx_t_9, 0, 0, 0);
                __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
                __PYX_ERR(17, 1415, __pyx_L16_error)
              }

              /* "pyarrow/table.pxi":1414
 *                 try:
 *                     chunked = self.cast(target_type, safe=True)
 *                 except ArrowInvalid as e:             # <<<<<<<<<<<<<<
 *                     raise ValueError(
 *                         f"Could not cast {self.type} to requested type {target_type}: {e}"
*/
              /*finally:*/ {
                __pyx_L16_error:;
                /*exception exit:*/{
                  __Pyx_PyThreadState_declare
                  __Pyx_PyThreadState_assign
                  __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0;
                  __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
                  __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
                  __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
                  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
                   __Pyx_ExceptionSwap(&__pyx_t_22, &__pyx_t_23, &__pyx_t_24);
                  if ( unlikely(__Pyx_GetException(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21) < 0)) __Pyx_ErrFetch(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21);
                  __Pyx_XGOTREF(__pyx_t_19);
                  __Pyx_XGOTREF(__pyx_t_20);
                  __Pyx_XGOTREF(__pyx_t_21);
                  __Pyx_XGOTREF(__pyx_t_22);
                  __Pyx_XGOTREF(__pyx_t_23);
                  __Pyx_XGOTREF(__pyx_t_24);
                  __pyx_t_10 = __pyx_lineno; __pyx_t_17 = __pyx_clineno; __pyx_t_18 = __pyx_filename;
                  {
                    __Pyx_DECREF(__pyx_v_e); __pyx_v_e = 0;
                  }
                  __Pyx_XGIVEREF(__pyx_t_22);
                  __Pyx_XGIVEREF(__pyx_t_23);
                  __Pyx_XGIVEREF(__pyx_t_24);
                  __Pyx_ExceptionReset(__pyx_t_22, __pyx_t_23, __pyx_t_24);
                  __Pyx_XGIVEREF(__pyx_t_19);
                  __Pyx_XGIVEREF(__pyx_t_20);
                  __Pyx_XGIVEREF(__pyx_t_21);
                  __Pyx_ErrRestore(__pyx_t_19, __pyx_t_20, __pyx_t_21);
                  __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0;
                  __pyx_lineno = __pyx_t_10; __pyx_clineno = __pyx_t_17; __pyx_filename = __pyx_t_18;
                  goto __pyx_L7_except_error;
                }
              }
            }
            goto __pyx_L7_except_error;

            /* "pyarrow/table.pxi":1412
 * 
 *             if target_type != self.type:
 *                 try:             # <<<<<<<<<<<<<<
 *                     chunked = self.cast(target_type, safe=True)
 *                 except ArrowInvalid as e:
*/
            __pyx_L7_except_error:;
            __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_L10_try_end:;
          }

          /* "pyarrow/table.pxi":1411
 *             target_type = DataType._import_from_c_capsule(requested_schema)
 * 
 *             if target_type != self.type:             # <<<<<<<<<<<<<<
 *                 try:
 *                     chunked = self.cast(target_type, safe=True)
*/
          goto __pyx_L4;
        }

        /* "pyarrow/table.pxi":1419
 *                     )
 *             else:
 *                 chunked = self             # <<<<<<<<<<<<<<
 *         else:
 *             chunked = self
*/
        /*else*/ {
          __Pyx_INCREF((PyObject *)__pyx_v_self);
          __pyx_v_chunked = __pyx_v_self;
        }
        __pyx_L4:;

        /* "pyarrow/table.pxi":1408
 *             ArrowArrayStream* c_stream = NULL
 * 
 *         if requested_schema is not None:             # <<<<<<<<<<<<<<
 *             target_type = DataType._import_from_c_capsule(requested_schema)
 * 
*/
        goto __pyx_L3;
      }

      /* "pyarrow/table.pxi":1421
 *                 chunked = self
 *         else:
 *             chunked = self             # <<<<<<<<<<<<<<
 * 
 *         stream_capsule = alloc_c_stream(&c_stream)
*/
      /*else*/ {
        __Pyx_INCREF((PyObject *)__pyx_v_self);
        __pyx_v_chunked = __pyx_v_self;
      }
      __pyx_L3:;

      /* "pyarrow/table.pxi":1423
 *             chunked = self
 * 
 *         stream_capsule = alloc_c_stream(&c_stream)             # <<<<<<<<<<<<<<
 * 
 *         with nogil:
*/
      __pyx_t_2 = __pyx_f_7pyarrow_3lib_alloc_c_stream((&__pyx_v_c_stream)); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 1423, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_v_stream_capsule = __pyx_t_2;
      __pyx_t_2 = 0;

      /* "pyarrow/table.pxi":1425
 *         stream_capsule = alloc_c_stream(&c_stream)
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             check_status(ExportChunkedArray(chunked.sp_chunked_array, c_stream))
 * 
*/
      {
          PyThreadState * _save;
          _save = PyEval_SaveThread();
          __Pyx_FastGIL_Remember();
          /*try:*/ {

            /* "pyarrow/table.pxi":1426
 * 
 *         with nogil:
 *             check_status(ExportChunkedArray(chunked.sp_chunked_array, c_stream))             # <<<<<<<<<<<<<<
 * 
 *         return stream_capsule
*/
            if (unlikely(((PyObject *)__pyx_v_chunked) == Py_None)) {
              PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_chunked_array");
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              __PYX_ERR(17, 1426, __pyx_L23_error)
            }
            __pyx_t_17 = __pyx_f_7pyarrow_3lib_check_status(arrow::ExportChunkedArray(__pyx_v_chunked->sp_chunked_array, __pyx_v_c_stream)); if (unlikely(__pyx_t_17 == ((int)-1))) __PYX_ERR(17, 1426, __pyx_L23_error)
          }

          /* "pyarrow/table.pxi":1425
 *         stream_capsule = alloc_c_stream(&c_stream)
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             check_status(ExportChunkedArray(chunked.sp_chunked_array, c_stream))
 * 
*/
          /*finally:*/ {
            /*normal exit:*/{
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L24;
            }
            __pyx_L23_error: {
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L1_error;
            }
            __pyx_L24:;
          }
      }

      /* "pyarrow/table.pxi":1428
 *             check_status(ExportChunkedArray(chunked.sp_chunked_array, c_stream))
 * 
 *         return stream_capsule             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_stream_capsule);
      __pyx_r = __pyx_v_stream_capsule;
      goto __pyx_L0;

      /* "pyarrow/table.pxi":1387
 *         return result
 * 
 *     def __arrow_c_stream__(self, requested_schema=None):             # <<<<<<<<<<<<<<
 *         """
 *         Export to a C ArrowArrayStream PyCapsule.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_8);
      __Pyx_XDECREF(__pyx_t_9);
      __Pyx_XDECREF(__pyx_t_11);
      __Pyx_XDECREF(__pyx_t_12);
      __Pyx_XDECREF(__pyx_t_13);
      __Pyx_XDECREF(__pyx_t_14);
      __Pyx_XDECREF(__pyx_t_16);
      __Pyx_AddTraceback("pyarrow.lib.ChunkedArray.__arrow_c_stream__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF((PyObject *)__pyx_v_chunked);
      __Pyx_XDECREF(__pyx_v_target_type);
      __Pyx_XDECREF(__pyx_v_e);
      __Pyx_XDECREF(__pyx_v_stream_capsule);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/table.pxi":1430
 *         return stream_capsule
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def _import_from_c_capsule(stream):
 *         """
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_12ChunkedArray_83_import_from_c_capsule(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_12ChunkedArray_82_import_from_c_capsule, "ChunkedArray._import_from_c_capsule(stream)\n\nImport ChunkedArray from a C ArrowArrayStream PyCapsule.\n\nParameters\n----------\nstream: PyCapsule\n    A capsule containing a C ArrowArrayStream PyCapsule.\n\nReturns\n-------\nChunkedArray");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_12ChunkedArray_83_import_from_c_capsule = {"_import_from_c_capsule", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12ChunkedArray_83_import_from_c_capsule, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12ChunkedArray_82_import_from_c_capsule};
    static PyObject *__pyx_pw_7pyarrow_3lib_12ChunkedArray_83_import_from_c_capsule(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_stream = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("_import_from_c_capsule (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_stream,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(17, 1430, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 1430, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_import_from_c_capsule", 0) < (0)) __PYX_ERR(17, 1430, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_import_from_c_capsule", 1, 1, 1, i); __PYX_ERR(17, 1430, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 1)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 1430, __pyx_L3_error)
        }
        __pyx_v_stream = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("_import_from_c_capsule", 1, 1, 1, __pyx_nargs); __PYX_ERR(17, 1430, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.ChunkedArray._import_from_c_capsule", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_12ChunkedArray_82_import_from_c_capsule(__pyx_v_stream);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_12ChunkedArray_82_import_from_c_capsule(PyObject *__pyx_v_stream) {
      struct ArrowArrayStream *__pyx_v_c_stream;
      std::shared_ptr< arrow::ChunkedArray>  __pyx_v_c_chunked_array;
      struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_self = 0;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      void *__pyx_t_1;
      std::shared_ptr< arrow::ChunkedArray>  __pyx_t_2;
      PyObject *__pyx_t_3 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("_import_from_c_capsule", 0);

      /* "pyarrow/table.pxi":1449
 *             ChunkedArray self
 * 
 *         c_stream = <ArrowArrayStream*>PyCapsule_GetPointer(             # <<<<<<<<<<<<<<
 *             stream, 'arrow_array_stream'
 *         )
*/
      __pyx_t_1 = PyCapsule_GetPointer(__pyx_v_stream, __pyx_k_arrow_array_stream); if (unlikely(__pyx_t_1 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(17, 1449, __pyx_L1_error)
      __pyx_v_c_stream = ((struct ArrowArrayStream *)__pyx_t_1);

      /* "pyarrow/table.pxi":1453
 *         )
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             c_chunked_array = GetResultValue(ImportChunkedArray(c_stream))
 * 
*/
      {
          PyThreadState * _save;
          _save = PyEval_SaveThread();
          __Pyx_FastGIL_Remember();
          /*try:*/ {

            /* "pyarrow/table.pxi":1454
 * 
 *         with nogil:
 *             c_chunked_array = GetResultValue(ImportChunkedArray(c_stream))             # <<<<<<<<<<<<<<
 * 
 *         self = ChunkedArray.__new__(ChunkedArray)
*/
            __pyx_t_2 = arrow::py::GetResultValue<std::shared_ptr< arrow::ChunkedArray> >(arrow::ImportChunkedArray(__pyx_v_c_stream)); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(17, 1454, __pyx_L4_error)
            __pyx_v_c_chunked_array = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_2);
          }

          /* "pyarrow/table.pxi":1453
 *         )
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             c_chunked_array = GetResultValue(ImportChunkedArray(c_stream))
 * 
*/
          /*finally:*/ {
            /*normal exit:*/{
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L5;
            }
            __pyx_L4_error: {
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L1_error;
            }
            __pyx_L5:;
          }
      }

      /* "pyarrow/table.pxi":1456
 *             c_chunked_array = GetResultValue(ImportChunkedArray(c_stream))
 * 
 *         self = ChunkedArray.__new__(ChunkedArray)             # <<<<<<<<<<<<<<
 *         self.init(c_chunked_array)
 *         return self
*/
      __pyx_t_3 = ((PyObject *)__pyx_tp_new_7pyarrow_3lib_ChunkedArray(((PyTypeObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ChunkedArray), __pyx_mstate_global->__pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 1456, __pyx_L1_error)
      __Pyx_GOTREF((PyObject *)__pyx_t_3);
      __pyx_v_self = ((struct __pyx_obj_7pyarrow_3lib_ChunkedArray *)__pyx_t_3);
      __pyx_t_3 = 0;

      /* "pyarrow/table.pxi":1457
 * 
 *         self = ChunkedArray.__new__(ChunkedArray)
 *         self.init(c_chunked_array)             # <<<<<<<<<<<<<<
 *         return self
 * 
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "init");
        __PYX_ERR(17, 1457, __pyx_L1_error)
      }
      ((struct __pyx_vtabstruct_7pyarrow_3lib_ChunkedArray *)__pyx_v_self->__pyx_vtab)->init(__pyx_v_self, __pyx_v_c_chunked_array); if (unlikely(PyErr_Occurred())) __PYX_ERR(17, 1457, __pyx_L1_error)

      /* "pyarrow/table.pxi":1458
 *         self = ChunkedArray.__new__(ChunkedArray)
 *         self.init(c_chunked_array)
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF((PyObject *)__pyx_v_self);
      __pyx_r = ((PyObject *)__pyx_v_self);
      goto __pyx_L0;

      /* "pyarrow/table.pxi":1430
 *         return stream_capsule
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def _import_from_c_capsule(stream):
 *         """
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_AddTraceback("pyarrow.lib.ChunkedArray._import_from_c_capsule", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF((PyObject *)__pyx_v_self);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/table.pxi":1460
 *         return self
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_cpu(self):
 *         """
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_12ChunkedArray_6is_cpu_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_12ChunkedArray_6is_cpu_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_12ChunkedArray_6is_cpu___get__(((struct __pyx_obj_7pyarrow_3lib_ChunkedArray *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_12ChunkedArray_6is_cpu___get__(struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      int __pyx_t_1;
      PyObject *__pyx_t_2 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__get__", 0);

      /* "pyarrow/table.pxi":1465
 *         Whether all chunks in the ChunkedArray are CPU-accessible.
 *         """
 *         if not self._init_is_cpu:             # <<<<<<<<<<<<<<
 *             self._is_cpu = self.chunked_array.is_cpu()
 *             self._init_is_cpu = True
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_init_is_cpu");
        __PYX_ERR(17, 1465, __pyx_L1_error)
      }
      __pyx_t_1 = (!(__pyx_v_self->_init_is_cpu != 0));
      if (__pyx_t_1) {

        /* "pyarrow/table.pxi":1466
 *         """
 *         if not self._init_is_cpu:
 *             self._is_cpu = self.chunked_array.is_cpu()             # <<<<<<<<<<<<<<
 *             self._init_is_cpu = True
 *         return self._is_cpu
*/
        if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "chunked_array");
          __PYX_ERR(17, 1466, __pyx_L1_error)
        }
        if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_is_cpu");
          __PYX_ERR(17, 1466, __pyx_L1_error)
        }
        __pyx_v_self->_is_cpu = __pyx_v_self->chunked_array->is_cpu();

        /* "pyarrow/table.pxi":1467
 *         if not self._init_is_cpu:
 *             self._is_cpu = self.chunked_array.is_cpu()
 *             self._init_is_cpu = True             # <<<<<<<<<<<<<<
 *         return self._is_cpu
 * 
*/
        if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_init_is_cpu");
          __PYX_ERR(17, 1467, __pyx_L1_error)
        }
        __pyx_v_self->_init_is_cpu = 1;

        /* "pyarrow/table.pxi":1465
 *         Whether all chunks in the ChunkedArray are CPU-accessible.
 *         """
 *         if not self._init_is_cpu:             # <<<<<<<<<<<<<<
 *             self._is_cpu = self.chunked_array.is_cpu()
 *             self._init_is_cpu = True
*/
      }

      /* "pyarrow/table.pxi":1468
 *             self._is_cpu = self.chunked_array.is_cpu()
 *             self._init_is_cpu = True
 *         return self._is_cpu             # <<<<<<<<<<<<<<
 * 
 *     def _assert_cpu(self):
*/
      __Pyx_XDECREF(__pyx_r);
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_is_cpu");
        __PYX_ERR(17, 1468, __pyx_L1_error)
      }
      __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_self->_is_cpu); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 1468, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;

      /* "pyarrow/table.pxi":1460
 *         return self
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_cpu(self):
 *         """
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_AddTraceback("pyarrow.lib.ChunkedArray.is_cpu.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/table.pxi":1470
 *         return self._is_cpu
 * 
 *     def _assert_cpu(self):             # <<<<<<<<<<<<<<
 *         if not self.is_cpu:
 *             raise NotImplementedError("Implemented only for data on CPU device")
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_12ChunkedArray_85_assert_cpu(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_12ChunkedArray_84_assert_cpu, "ChunkedArray._assert_cpu(self)");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_12ChunkedArray_85_assert_cpu = {"_assert_cpu", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12ChunkedArray_85_assert_cpu, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12ChunkedArray_84_assert_cpu};
    static PyObject *__pyx_pw_7pyarrow_3lib_12ChunkedArray_85_assert_cpu(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("_assert_cpu (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("_assert_cpu", 1, 0, 0, __pyx_nargs); return NULL; }
      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
      if (unlikely(__pyx_kwds_len < 0)) return NULL;
      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("_assert_cpu", __pyx_kwds); return NULL;}
      __pyx_r = __pyx_pf_7pyarrow_3lib_12ChunkedArray_84_assert_cpu(((struct __pyx_obj_7pyarrow_3lib_ChunkedArray *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_12ChunkedArray_84_assert_cpu(struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_t_2;
      int __pyx_t_3;
      PyObject *__pyx_t_4 = NULL;
      size_t __pyx_t_5;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("_assert_cpu", 0);

      /* "pyarrow/table.pxi":1471
 * 
 *     def _assert_cpu(self):
 *         if not self.is_cpu:             # <<<<<<<<<<<<<<
 *             raise NotImplementedError("Implemented only for data on CPU device")
 * 
*/
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_is_cpu); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 1471, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(17, 1471, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_3 = (!__pyx_t_2);
      if (unlikely(__pyx_t_3)) {

        /* "pyarrow/table.pxi":1472
 *     def _assert_cpu(self):
 *         if not self.is_cpu:
 *             raise NotImplementedError("Implemented only for data on CPU device")             # <<<<<<<<<<<<<<
 * 
 * 
*/
        __pyx_t_4 = NULL;
        __pyx_t_5 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Implemented_only_for_data_on_CPU};
          __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_NotImplementedError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 1472, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
        }
        __Pyx_Raise(__pyx_t_1, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __PYX_ERR(17, 1472, __pyx_L1_error)

        /* "pyarrow/table.pxi":1471
 * 
 *     def _assert_cpu(self):
 *         if not self.is_cpu:             # <<<<<<<<<<<<<<
 *             raise NotImplementedError("Implemented only for data on CPU device")
 * 
*/
      }

      /* "pyarrow/table.pxi":1470
 *         return self._is_cpu
 * 
 *     def _assert_cpu(self):             # <<<<<<<<<<<<<<
 *         if not self.is_cpu:
 *             raise NotImplementedError("Implemented only for data on CPU device")
*/

      /* 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_AddTraceback("pyarrow.lib.ChunkedArray._assert_cpu", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/lib.pxd":516
 *     cdef readonly:
 *         # To allow Table to propagate metadata to pandas.Series
 *         object _name             # <<<<<<<<<<<<<<
 * 
 *     cdef void init(self, const shared_ptr[CChunkedArray]& chunked_array)
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_12ChunkedArray_5_name_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_12ChunkedArray_5_name_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_12ChunkedArray_5_name___get__(((struct __pyx_obj_7pyarrow_3lib_ChunkedArray *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_12ChunkedArray_5_name___get__(struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__get__", 0);
      __Pyx_XDECREF(__pyx_r);
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_name");
        __PYX_ERR(15, 516, __pyx_L1_error)
      }
      __Pyx_INCREF(__pyx_v_self->_name);
      __pyx_r = __pyx_v_self->_name;
      goto __pyx_L0;

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_AddTraceback("pyarrow.lib.ChunkedArray._name.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/table.pxi":1475
 * 
 * 
 * def chunked_array(arrays, type=None):             # <<<<<<<<<<<<<<
 *     """
 *     Construct chunked array from list of array-like objects
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_215chunked_array(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_214chunked_array, "chunked_array(arrays, type=None)\n\nConstruct chunked array from list of array-like objects\n\nParameters\n----------\narrays : Array, list of Array, or array-like\n    Must all be the same data type. Can be empty only if type also passed.\n    Any Arrow-compatible array that implements the Arrow PyCapsule Protocol\n    (has an ``__arrow_c_array__`` or ``__arrow_c_stream__`` method) can be\n    passed as well.\ntype : DataType or string coercible to DataType\n\nReturns\n-------\nChunkedArray\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> pa.chunked_array([], type=pa.int8())\n<pyarrow.lib.ChunkedArray object at ...>\n[\n...\n]\n\n>>> pa.chunked_array([[2, 2, 4], [4, 5, 100]])\n<pyarrow.lib.ChunkedArray object at ...>\n[\n  [\n    2,\n    2,\n    4\n  ],\n  [\n    4,\n    5,\n    100\n  ]\n]");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_215chunked_array = {"chunked_array", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_215chunked_array, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_214chunked_array};
    static PyObject *__pyx_pw_7pyarrow_3lib_215chunked_array(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_arrays = 0;
      PyObject *__pyx_v_type = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[2] = {0,0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("chunked_array (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_arrays,&__pyx_mstate_global->__pyx_n_u_type,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(17, 1475, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(17, 1475, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 1475, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "chunked_array", 0) < (0)) __PYX_ERR(17, 1475, __pyx_L3_error)
          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("chunked_array", 0, 1, 2, i); __PYX_ERR(17, 1475, __pyx_L3_error) }
          }
        } else {
          switch (__pyx_nargs) {
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(17, 1475, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 1475, __pyx_L3_error)
            break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
        }
        __pyx_v_arrays = values[0];
        __pyx_v_type = values[1];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("chunked_array", 0, 1, 2, __pyx_nargs); __PYX_ERR(17, 1475, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.chunked_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_214chunked_array(__pyx_self, __pyx_v_arrays, __pyx_v_type);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_214chunked_array(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_arrays, PyObject *__pyx_v_type) {
      struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_arr = 0;
      std::vector<std::shared_ptr< arrow::Array> >  __pyx_v_c_arrays;
      std::shared_ptr< arrow::ChunkedArray>  __pyx_v_c_result;
      std::shared_ptr< arrow::DataType>  __pyx_v_c_type;
      PyObject *__pyx_v_requested_type = NULL;
      PyObject *__pyx_v_capsule = NULL;
      PyObject *__pyx_v_result = NULL;
      PyObject *__pyx_v_x = NULL;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      struct __pyx_opt_args_7pyarrow_3lib_ensure_type __pyx_t_2;
      int __pyx_t_3;
      PyObject *__pyx_t_4 = NULL;
      size_t __pyx_t_5;
      int __pyx_t_6;
      PyObject *__pyx_t_7 = NULL;
      PyObject *__pyx_t_8 = NULL;
      Py_ssize_t __pyx_t_9;
      PyObject *(*__pyx_t_10)(PyObject *);
      PyObject *__pyx_t_11 = NULL;
      PyObject *__pyx_t_12 = NULL;
      std::shared_ptr< arrow::DataType>  __pyx_t_13;
      std::shared_ptr< arrow::ChunkedArray>  __pyx_t_14;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("chunked_array", 0);
      __Pyx_INCREF(__pyx_v_arrays);
      __Pyx_INCREF(__pyx_v_type);

      /* "pyarrow/table.pxi":1522
 *         shared_ptr[CDataType] c_type
 * 
 *     type = ensure_type(type, allow_none=True)             # <<<<<<<<<<<<<<
 * 
 *     if isinstance(arrays, Array):
*/
      __pyx_t_2.__pyx_n = 1;
      __pyx_t_2.allow_none = 1;
      __pyx_t_1 = ((PyObject *)__pyx_f_7pyarrow_3lib_ensure_type(__pyx_v_type, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 1522, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF_SET(__pyx_v_type, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "pyarrow/table.pxi":1524
 *     type = ensure_type(type, allow_none=True)
 * 
 *     if isinstance(arrays, Array):             # <<<<<<<<<<<<<<
 *         arrays = [arrays]
 *     elif hasattr(arrays, "__arrow_c_stream__"):
*/
      __pyx_t_3 = __Pyx_TypeCheck(__pyx_v_arrays, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array); 
      if (__pyx_t_3) {

        /* "pyarrow/table.pxi":1525
 * 
 *     if isinstance(arrays, Array):
 *         arrays = [arrays]             # <<<<<<<<<<<<<<
 *     elif hasattr(arrays, "__arrow_c_stream__"):
 *         if type is not None:
*/
        __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 1525, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_INCREF(__pyx_v_arrays);
        __Pyx_GIVEREF(__pyx_v_arrays);
        if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_v_arrays) != (0)) __PYX_ERR(17, 1525, __pyx_L1_error);
        __Pyx_DECREF_SET(__pyx_v_arrays, __pyx_t_1);
        __pyx_t_1 = 0;

        /* "pyarrow/table.pxi":1524
 *     type = ensure_type(type, allow_none=True)
 * 
 *     if isinstance(arrays, Array):             # <<<<<<<<<<<<<<
 *         arrays = [arrays]
 *     elif hasattr(arrays, "__arrow_c_stream__"):
*/
        goto __pyx_L3;
      }

      /* "pyarrow/table.pxi":1526
 *     if isinstance(arrays, Array):
 *         arrays = [arrays]
 *     elif hasattr(arrays, "__arrow_c_stream__"):             # <<<<<<<<<<<<<<
 *         if type is not None:
 *             requested_type = type.__arrow_c_schema__()
*/
      __pyx_t_3 = __Pyx_HasAttr(__pyx_v_arrays, __pyx_mstate_global->__pyx_n_u_arrow_c_stream); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(17, 1526, __pyx_L1_error)
      if (__pyx_t_3) {

        /* "pyarrow/table.pxi":1527
 *         arrays = [arrays]
 *     elif hasattr(arrays, "__arrow_c_stream__"):
 *         if type is not None:             # <<<<<<<<<<<<<<
 *             requested_type = type.__arrow_c_schema__()
 *         else:
*/
        __pyx_t_3 = (__pyx_v_type != Py_None);
        if (__pyx_t_3) {

          /* "pyarrow/table.pxi":1528
 *     elif hasattr(arrays, "__arrow_c_stream__"):
 *         if type is not None:
 *             requested_type = type.__arrow_c_schema__()             # <<<<<<<<<<<<<<
 *         else:
 *             requested_type = None
*/
          __pyx_t_4 = __pyx_v_type;
          __Pyx_INCREF(__pyx_t_4);
          __pyx_t_5 = 0;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
            __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_arrow_c_schema, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
            if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 1528, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_1);
          }
          __pyx_v_requested_type = __pyx_t_1;
          __pyx_t_1 = 0;

          /* "pyarrow/table.pxi":1527
 *         arrays = [arrays]
 *     elif hasattr(arrays, "__arrow_c_stream__"):
 *         if type is not None:             # <<<<<<<<<<<<<<
 *             requested_type = type.__arrow_c_schema__()
 *         else:
*/
          goto __pyx_L4;
        }

        /* "pyarrow/table.pxi":1530
 *             requested_type = type.__arrow_c_schema__()
 *         else:
 *             requested_type = None             # <<<<<<<<<<<<<<
 *         capsule = arrays.__arrow_c_stream__(requested_type)
 *         result = ChunkedArray._import_from_c_capsule(capsule)
*/
        /*else*/ {
          __Pyx_INCREF(Py_None);
          __pyx_v_requested_type = Py_None;
        }
        __pyx_L4:;

        /* "pyarrow/table.pxi":1531
 *         else:
 *             requested_type = None
 *         capsule = arrays.__arrow_c_stream__(requested_type)             # <<<<<<<<<<<<<<
 *         result = ChunkedArray._import_from_c_capsule(capsule)
 *         if type is not None and result.type != type:
*/
        __pyx_t_4 = __pyx_v_arrays;
        __Pyx_INCREF(__pyx_t_4);
        __pyx_t_5 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_requested_type};
          __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_arrow_c_stream, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 1531, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
        }
        __pyx_v_capsule = __pyx_t_1;
        __pyx_t_1 = 0;

        /* "pyarrow/table.pxi":1532
 *             requested_type = None
 *         capsule = arrays.__arrow_c_stream__(requested_type)
 *         result = ChunkedArray._import_from_c_capsule(capsule)             # <<<<<<<<<<<<<<
 *         if type is not None and result.type != type:
 *             # __arrow_c_stream__ coerces schema with best effort, so we might
*/
        __pyx_t_4 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ChunkedArray);
        __Pyx_INCREF(__pyx_t_4);
        __pyx_t_5 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_capsule};
          __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_import_from_c_capsule, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 1532, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
        }
        __pyx_v_result = __pyx_t_1;
        __pyx_t_1 = 0;

        /* "pyarrow/table.pxi":1533
 *         capsule = arrays.__arrow_c_stream__(requested_type)
 *         result = ChunkedArray._import_from_c_capsule(capsule)
 *         if type is not None and result.type != type:             # <<<<<<<<<<<<<<
 *             # __arrow_c_stream__ coerces schema with best effort, so we might
 *             # need to cast it if the producer wasn't able to cast to exact schema.
*/
        __pyx_t_6 = (__pyx_v_type != Py_None);
        if (__pyx_t_6) {
        } else {
          __pyx_t_3 = __pyx_t_6;
          goto __pyx_L6_bool_binop_done;
        }
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_result, __pyx_mstate_global->__pyx_n_u_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 1533, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_v_type, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 1533, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(17, 1533, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_3 = __pyx_t_6;
        __pyx_L6_bool_binop_done:;
        if (__pyx_t_3) {

          /* "pyarrow/table.pxi":1536
 *             # __arrow_c_stream__ coerces schema with best effort, so we might
 *             # need to cast it if the producer wasn't able to cast to exact schema.
 *             result = result.cast(type)             # <<<<<<<<<<<<<<
 *         return result
 *     elif hasattr(arrays, "__arrow_c_array__"):
*/
          __pyx_t_1 = __pyx_v_result;
          __Pyx_INCREF(__pyx_t_1);
          __pyx_t_5 = 0;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_type};
            __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_cast, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
            if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 1536, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
          }
          __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_4);
          __pyx_t_4 = 0;

          /* "pyarrow/table.pxi":1533
 *         capsule = arrays.__arrow_c_stream__(requested_type)
 *         result = ChunkedArray._import_from_c_capsule(capsule)
 *         if type is not None and result.type != type:             # <<<<<<<<<<<<<<
 *             # __arrow_c_stream__ coerces schema with best effort, so we might
 *             # need to cast it if the producer wasn't able to cast to exact schema.
*/
        }

        /* "pyarrow/table.pxi":1537
 *             # need to cast it if the producer wasn't able to cast to exact schema.
 *             result = result.cast(type)
 *         return result             # <<<<<<<<<<<<<<
 *     elif hasattr(arrays, "__arrow_c_array__"):
 *         arr = array(arrays, type=type)
*/
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_v_result);
        __pyx_r = __pyx_v_result;
        goto __pyx_L0;

        /* "pyarrow/table.pxi":1526
 *     if isinstance(arrays, Array):
 *         arrays = [arrays]
 *     elif hasattr(arrays, "__arrow_c_stream__"):             # <<<<<<<<<<<<<<
 *         if type is not None:
 *             requested_type = type.__arrow_c_schema__()
*/
      }

      /* "pyarrow/table.pxi":1538
 *             result = result.cast(type)
 *         return result
 *     elif hasattr(arrays, "__arrow_c_array__"):             # <<<<<<<<<<<<<<
 *         arr = array(arrays, type=type)
 *         arrays = [arr]
*/
      __pyx_t_3 = __Pyx_HasAttr(__pyx_v_arrays, __pyx_mstate_global->__pyx_n_u_arrow_c_array); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(17, 1538, __pyx_L1_error)
      if (__pyx_t_3) {

        /* "pyarrow/table.pxi":1539
 *         return result
 *     elif hasattr(arrays, "__arrow_c_array__"):
 *         arr = array(arrays, type=type)             # <<<<<<<<<<<<<<
 *         arrays = [arr]
 * 
*/
        __pyx_t_1 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_array); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 1539, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_7))) {
          __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_7);
          assert(__pyx_t_1);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_1);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_1, __pyx_v_arrays};
          __pyx_t_8 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(17, 1539, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_type, __pyx_v_type, __pyx_t_8, __pyx_callargs+2, 0) < (0)) __PYX_ERR(17, 1539, __pyx_L1_error)
          __pyx_t_4 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_8);
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 1539, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
        }
        if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array))))) __PYX_ERR(17, 1539, __pyx_L1_error)
        __pyx_v_arr = ((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_t_4);
        __pyx_t_4 = 0;

        /* "pyarrow/table.pxi":1540
 *     elif hasattr(arrays, "__arrow_c_array__"):
 *         arr = array(arrays, type=type)
 *         arrays = [arr]             # <<<<<<<<<<<<<<
 * 
 *     for x in arrays:
*/
        __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 1540, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_INCREF((PyObject *)__pyx_v_arr);
        __Pyx_GIVEREF((PyObject *)__pyx_v_arr);
        if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_arr)) != (0)) __PYX_ERR(17, 1540, __pyx_L1_error);
        __Pyx_DECREF_SET(__pyx_v_arrays, __pyx_t_4);
        __pyx_t_4 = 0;

        /* "pyarrow/table.pxi":1538
 *             result = result.cast(type)
 *         return result
 *     elif hasattr(arrays, "__arrow_c_array__"):             # <<<<<<<<<<<<<<
 *         arr = array(arrays, type=type)
 *         arrays = [arr]
*/
      }
      __pyx_L3:;

      /* "pyarrow/table.pxi":1542
 *         arrays = [arr]
 * 
 *     for x in arrays:             # <<<<<<<<<<<<<<
 *         arr = x if isinstance(x, Array) else array(x, type=type)
 * 
*/
      if (likely(PyList_CheckExact(__pyx_v_arrays)) || PyTuple_CheckExact(__pyx_v_arrays)) {
        __pyx_t_4 = __pyx_v_arrays; __Pyx_INCREF(__pyx_t_4);
        __pyx_t_9 = 0;
        __pyx_t_10 = NULL;
      } else {
        __pyx_t_9 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_arrays); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 1542, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_10 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_10)) __PYX_ERR(17, 1542, __pyx_L1_error)
      }
      for (;;) {
        if (likely(!__pyx_t_10)) {
          if (likely(PyList_CheckExact(__pyx_t_4))) {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_4);
              #if !CYTHON_ASSUME_SAFE_SIZE
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(17, 1542, __pyx_L1_error)
              #endif
              if (__pyx_t_9 >= __pyx_temp) break;
            }
            __pyx_t_7 = __Pyx_PyList_GetItemRefFast(__pyx_t_4, __pyx_t_9, __Pyx_ReferenceSharing_OwnStrongReference);
            ++__pyx_t_9;
          } else {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_4);
              #if !CYTHON_ASSUME_SAFE_SIZE
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(17, 1542, __pyx_L1_error)
              #endif
              if (__pyx_t_9 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_7 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_9));
            #else
            __pyx_t_7 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_9);
            #endif
            ++__pyx_t_9;
          }
          if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 1542, __pyx_L1_error)
        } else {
          __pyx_t_7 = __pyx_t_10(__pyx_t_4);
          if (unlikely(!__pyx_t_7)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(17, 1542, __pyx_L1_error)
              PyErr_Clear();
            }
            break;
          }
        }
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_7);
        __pyx_t_7 = 0;

        /* "pyarrow/table.pxi":1543
 * 
 *     for x in arrays:
 *         arr = x if isinstance(x, Array) else array(x, type=type)             # <<<<<<<<<<<<<<
 * 
 *         if type is None:
*/
        __pyx_t_3 = __Pyx_TypeCheck(__pyx_v_x, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array); 
        if (__pyx_t_3) {
          if (!(likely(((__pyx_v_x) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_x, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array))))) __PYX_ERR(17, 1543, __pyx_L1_error)
          __Pyx_INCREF(__pyx_v_x);
          __pyx_t_7 = __pyx_v_x;
        } else {
          __pyx_t_1 = NULL;
          __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_array); if (unlikely(!__pyx_t_11)) __PYX_ERR(17, 1543, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_11);
          __pyx_t_5 = 1;
          #if CYTHON_UNPACK_METHODS
          if (unlikely(PyMethod_Check(__pyx_t_11))) {
            __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_11);
            assert(__pyx_t_1);
            PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_11);
            __Pyx_INCREF(__pyx_t_1);
            __Pyx_INCREF(__pyx__function);
            __Pyx_DECREF_SET(__pyx_t_11, __pyx__function);
            __pyx_t_5 = 0;
          }
          #endif
          {
            PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_1, __pyx_v_x};
            __pyx_t_12 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(17, 1543, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_12);
            if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_type, __pyx_v_type, __pyx_t_12, __pyx_callargs+2, 0) < (0)) __PYX_ERR(17, 1543, __pyx_L1_error)
            __pyx_t_8 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_11, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_12);
            __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
            __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
            if (unlikely(!__pyx_t_8)) __PYX_ERR(17, 1543, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_8);
          }
          if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array))))) __PYX_ERR(17, 1543, __pyx_L1_error)
          __pyx_t_7 = __pyx_t_8;
          __pyx_t_8 = 0;
        }
        __Pyx_XDECREF_SET(__pyx_v_arr, ((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_t_7));
        __pyx_t_7 = 0;

        /* "pyarrow/table.pxi":1545
 *         arr = x if isinstance(x, Array) else array(x, type=type)
 * 
 *         if type is None:             # <<<<<<<<<<<<<<
 *             # it allows more flexible chunked array construction from to coerce
 *             # subsequent arrays to the firstly inferred array type
*/
        __pyx_t_3 = (__pyx_v_type == Py_None);
        if (__pyx_t_3) {

          /* "pyarrow/table.pxi":1549
 *             # subsequent arrays to the firstly inferred array type
 *             # it also spares the inference overhead after the first chunk
 *             type = arr.type             # <<<<<<<<<<<<<<
 * 
 *         c_arrays.push_back(arr.sp_array)
*/
          if (unlikely(((PyObject *)__pyx_v_arr) == Py_None)) {
            PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "type");
            __PYX_ERR(17, 1549, __pyx_L1_error)
          }
          __pyx_t_7 = ((PyObject *)__pyx_v_arr->type);
          __Pyx_INCREF(__pyx_t_7);
          __Pyx_DECREF_SET(__pyx_v_type, __pyx_t_7);
          __pyx_t_7 = 0;

          /* "pyarrow/table.pxi":1545
 *         arr = x if isinstance(x, Array) else array(x, type=type)
 * 
 *         if type is None:             # <<<<<<<<<<<<<<
 *             # it allows more flexible chunked array construction from to coerce
 *             # subsequent arrays to the firstly inferred array type
*/
        }

        /* "pyarrow/table.pxi":1551
 *             type = arr.type
 * 
 *         c_arrays.push_back(arr.sp_array)             # <<<<<<<<<<<<<<
 * 
 *     c_type = pyarrow_unwrap_data_type(type)
*/
        if (unlikely(((PyObject *)__pyx_v_arr) == Py_None)) {
          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_array");
          __PYX_ERR(17, 1551, __pyx_L1_error)
        }
        try {
          __pyx_v_c_arrays.push_back(__pyx_v_arr->sp_array);
        } catch(...) {
          __Pyx_CppExn2PyErr();
          __PYX_ERR(17, 1551, __pyx_L1_error)
        }

        /* "pyarrow/table.pxi":1542
 *         arrays = [arr]
 * 
 *     for x in arrays:             # <<<<<<<<<<<<<<
 *         arr = x if isinstance(x, Array) else array(x, type=type)
 * 
*/
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "pyarrow/table.pxi":1553
 *         c_arrays.push_back(arr.sp_array)
 * 
 *     c_type = pyarrow_unwrap_data_type(type)             # <<<<<<<<<<<<<<
 *     with nogil:
 *         c_result = GetResultValue(CChunkedArray.Make(c_arrays, c_type))
*/
      __pyx_t_13 = pyarrow_unwrap_data_type(__pyx_v_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(17, 1553, __pyx_L1_error)
      __pyx_v_c_type = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_13);

      /* "pyarrow/table.pxi":1554
 * 
 *     c_type = pyarrow_unwrap_data_type(type)
 *     with nogil:             # <<<<<<<<<<<<<<
 *         c_result = GetResultValue(CChunkedArray.Make(c_arrays, c_type))
 *     return pyarrow_wrap_chunked_array(c_result)
*/
      {
          PyThreadState * _save;
          _save = PyEval_SaveThread();
          __Pyx_FastGIL_Remember();
          /*try:*/ {

            /* "pyarrow/table.pxi":1555
 *     c_type = pyarrow_unwrap_data_type(type)
 *     with nogil:
 *         c_result = GetResultValue(CChunkedArray.Make(c_arrays, c_type))             # <<<<<<<<<<<<<<
 *     return pyarrow_wrap_chunked_array(c_result)
 * 
*/
            __pyx_t_14 = arrow::py::GetResultValue<std::shared_ptr< arrow::ChunkedArray> >( arrow::ChunkedArray::Make(__pyx_v_c_arrays, __pyx_v_c_type)); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(17, 1555, __pyx_L13_error)
            __pyx_v_c_result = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_14);
          }

          /* "pyarrow/table.pxi":1554
 * 
 *     c_type = pyarrow_unwrap_data_type(type)
 *     with nogil:             # <<<<<<<<<<<<<<
 *         c_result = GetResultValue(CChunkedArray.Make(c_arrays, c_type))
 *     return pyarrow_wrap_chunked_array(c_result)
*/
          /*finally:*/ {
            /*normal exit:*/{
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L14;
            }
            __pyx_L13_error: {
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L1_error;
            }
            __pyx_L14:;
          }
      }

      /* "pyarrow/table.pxi":1556
 *     with nogil:
 *         c_result = GetResultValue(CChunkedArray.Make(c_arrays, c_type))
 *     return pyarrow_wrap_chunked_array(c_result)             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_4 = pyarrow_wrap_chunked_array(__pyx_v_c_result); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 1556, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L0;

      /* "pyarrow/table.pxi":1475
 * 
 * 
 * def chunked_array(arrays, type=None):             # <<<<<<<<<<<<<<
 *     """
 *     Construct chunked array from list of array-like objects
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_8);
      __Pyx_XDECREF(__pyx_t_11);
      __Pyx_XDECREF(__pyx_t_12);
      __Pyx_AddTraceback("pyarrow.lib.chunked_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF((PyObject *)__pyx_v_arr);
      __Pyx_XDECREF(__pyx_v_requested_type);
      __Pyx_XDECREF(__pyx_v_capsule);
      __Pyx_XDECREF(__pyx_v_result);
      __Pyx_XDECREF(__pyx_v_x);
      __Pyx_XDECREF(__pyx_v_arrays);
      __Pyx_XDECREF(__pyx_v_type);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/table.pxi":1559
 * 
 * 
 * cdef _schema_from_arrays(arrays, names, metadata, shared_ptr[CSchema]* schema):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t K = len(arrays)
*/

    static PyObject *__pyx_f_7pyarrow_3lib__schema_from_arrays(PyObject *__pyx_v_arrays, PyObject *__pyx_v_names, PyObject *__pyx_v_metadata, std::shared_ptr< arrow::Schema>  *__pyx_v_schema) {
      Py_ssize_t __pyx_v_K;
      std::string __pyx_v_c_name;
      std::shared_ptr< arrow::DataType>  __pyx_v_c_type;
      std::shared_ptr< arrow::KeyValueMetadata const >  __pyx_v_c_meta;
      std::vector<std::shared_ptr< arrow::Field> >  __pyx_v_c_fields;
      PyObject *__pyx_v_converted_arrays = NULL;
      Py_ssize_t __pyx_v_i;
      PyObject *__pyx_v_val = NULL;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      Py_ssize_t __pyx_t_1;
      int __pyx_t_2;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      size_t __pyx_t_5;
      std::shared_ptr< arrow::KeyValueMetadata const >  __pyx_t_6;
      int __pyx_t_7;
      PyObject *__pyx_t_8 = NULL;
      PyObject *__pyx_t_9 = NULL;
      PyObject *__pyx_t_10[5];
      PyObject *__pyx_t_11 = NULL;
      Py_ssize_t __pyx_t_12;
      Py_ssize_t __pyx_t_13;
      std::shared_ptr< arrow::DataType>  __pyx_t_14;
      std::string __pyx_t_15;
      int __pyx_t_16;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("_schema_from_arrays", 0);

      /* "pyarrow/table.pxi":1561
 * cdef _schema_from_arrays(arrays, names, metadata, shared_ptr[CSchema]* schema):
 *     cdef:
 *         Py_ssize_t K = len(arrays)             # <<<<<<<<<<<<<<
 *         c_string c_name
 *         shared_ptr[CDataType] c_type
*/
      __pyx_t_1 = PyObject_Length(__pyx_v_arrays); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(17, 1561, __pyx_L1_error)
      __pyx_v_K = __pyx_t_1;

      /* "pyarrow/table.pxi":1567
 *         vector[shared_ptr[CField]] c_fields
 * 
 *     if metadata is not None:             # <<<<<<<<<<<<<<
 *         c_meta = KeyValueMetadata(metadata).unwrap()
 * 
*/
      __pyx_t_2 = (__pyx_v_metadata != Py_None);
      if (__pyx_t_2) {

        /* "pyarrow/table.pxi":1568
 * 
 *     if metadata is not None:
 *         c_meta = KeyValueMetadata(metadata).unwrap()             # <<<<<<<<<<<<<<
 * 
 *     if K == 0:
*/
        __pyx_t_4 = NULL;
        __pyx_t_5 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_metadata};
          __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_KeyValueMetadata, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 1568, __pyx_L1_error)
          __Pyx_GOTREF((PyObject *)__pyx_t_3);
        }
        __pyx_t_6 = __pyx_f_7pyarrow_3lib_16KeyValueMetadata_unwrap(((struct __pyx_obj_7pyarrow_3lib_KeyValueMetadata *)__pyx_t_3)); if (unlikely(PyErr_Occurred())) __PYX_ERR(17, 1568, __pyx_L1_error)
        __Pyx_DECREF((PyObject *)__pyx_t_3); __pyx_t_3 = 0;
        __pyx_v_c_meta = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_6);

        /* "pyarrow/table.pxi":1567
 *         vector[shared_ptr[CField]] c_fields
 * 
 *     if metadata is not None:             # <<<<<<<<<<<<<<
 *         c_meta = KeyValueMetadata(metadata).unwrap()
 * 
*/
      }

      /* "pyarrow/table.pxi":1570
 *         c_meta = KeyValueMetadata(metadata).unwrap()
 * 
 *     if K == 0:             # <<<<<<<<<<<<<<
 *         if names is None or len(names) == 0:
 *             schema.reset(new CSchema(c_fields, c_meta))
*/
      __pyx_t_2 = (__pyx_v_K == 0);
      if (__pyx_t_2) {

        /* "pyarrow/table.pxi":1571
 * 
 *     if K == 0:
 *         if names is None or len(names) == 0:             # <<<<<<<<<<<<<<
 *             schema.reset(new CSchema(c_fields, c_meta))
 *             return arrays
*/
        __pyx_t_7 = (__pyx_v_names == Py_None);
        if (!__pyx_t_7) {
        } else {
          __pyx_t_2 = __pyx_t_7;
          goto __pyx_L6_bool_binop_done;
        }
        __pyx_t_1 = PyObject_Length(__pyx_v_names); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(17, 1571, __pyx_L1_error)
        __pyx_t_7 = (__pyx_t_1 == 0);
        __pyx_t_2 = __pyx_t_7;
        __pyx_L6_bool_binop_done:;
        if (likely(__pyx_t_2)) {

          /* "pyarrow/table.pxi":1572
 *     if K == 0:
 *         if names is None or len(names) == 0:
 *             schema.reset(new CSchema(c_fields, c_meta))             # <<<<<<<<<<<<<<
 *             return arrays
 *         else:
*/
          __pyx_v_schema->reset(new  arrow::Schema(__pyx_v_c_fields, __pyx_v_c_meta));

          /* "pyarrow/table.pxi":1573
 *         if names is None or len(names) == 0:
 *             schema.reset(new CSchema(c_fields, c_meta))
 *             return arrays             # <<<<<<<<<<<<<<
 *         else:
 *             raise ValueError(f'Length of names ({len(names)}) does not match '
*/
          __Pyx_XDECREF(__pyx_r);
          __Pyx_INCREF(__pyx_v_arrays);
          __pyx_r = __pyx_v_arrays;
          goto __pyx_L0;

          /* "pyarrow/table.pxi":1571
 * 
 *     if K == 0:
 *         if names is None or len(names) == 0:             # <<<<<<<<<<<<<<
 *             schema.reset(new CSchema(c_fields, c_meta))
 *             return arrays
*/
        }

        /* "pyarrow/table.pxi":1575
 *             return arrays
 *         else:
 *             raise ValueError(f'Length of names ({len(names)}) does not match '             # <<<<<<<<<<<<<<
 *                              f'length of arrays ({K})')
 * 
*/
        /*else*/ {
          __pyx_t_4 = NULL;
          __pyx_t_1 = PyObject_Length(__pyx_v_names); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(17, 1575, __pyx_L1_error)
          __pyx_t_8 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_t_1, 0, ' ', 'd'); if (unlikely(!__pyx_t_8)) __PYX_ERR(17, 1575, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);

          /* "pyarrow/table.pxi":1576
 *         else:
 *             raise ValueError(f'Length of names ({len(names)}) does not match '
 *                              f'length of arrays ({K})')             # <<<<<<<<<<<<<<
 * 
 *     c_fields.resize(K)
*/
          __pyx_t_9 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_K, 0, ' ', 'd'); if (unlikely(!__pyx_t_9)) __PYX_ERR(17, 1576, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
          __pyx_t_10[0] = __pyx_mstate_global->__pyx_kp_u_Length_of_names;
          __pyx_t_10[1] = __pyx_t_8;
          __pyx_t_10[2] = __pyx_mstate_global->__pyx_kp_u_does_not_match_length_of_arrays;
          __pyx_t_10[3] = __pyx_t_9;
          __pyx_t_10[4] = __pyx_mstate_global->__pyx_kp_u__7;

          /* "pyarrow/table.pxi":1575
 *             return arrays
 *         else:
 *             raise ValueError(f'Length of names ({len(names)}) does not match '             # <<<<<<<<<<<<<<
 *                              f'length of arrays ({K})')
 * 
*/
          __pyx_t_11 = __Pyx_PyUnicode_Join(__pyx_t_10, 5, 17 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8) + 35 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9) + 1, 127);
          if (unlikely(!__pyx_t_11)) __PYX_ERR(17, 1575, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_11);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          __pyx_t_5 = 1;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_11};
            __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
            __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
            if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 1575, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
          }
          __Pyx_Raise(__pyx_t_3, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __PYX_ERR(17, 1575, __pyx_L1_error)
        }

        /* "pyarrow/table.pxi":1570
 *         c_meta = KeyValueMetadata(metadata).unwrap()
 * 
 *     if K == 0:             # <<<<<<<<<<<<<<
 *         if names is None or len(names) == 0:
 *             schema.reset(new CSchema(c_fields, c_meta))
*/
      }

      /* "pyarrow/table.pxi":1578
 *                              f'length of arrays ({K})')
 * 
 *     c_fields.resize(K)             # <<<<<<<<<<<<<<
 * 
 *     if names is None:
*/
      try {
        __pyx_v_c_fields.resize(__pyx_v_K);
      } catch(...) {
        __Pyx_CppExn2PyErr();
        __PYX_ERR(17, 1578, __pyx_L1_error)
      }

      /* "pyarrow/table.pxi":1580
 *     c_fields.resize(K)
 * 
 *     if names is None:             # <<<<<<<<<<<<<<
 *         raise ValueError('Must pass names or schema when constructing '
 *                          'Table or RecordBatch.')
*/
      __pyx_t_2 = (__pyx_v_names == Py_None);
      if (unlikely(__pyx_t_2)) {

        /* "pyarrow/table.pxi":1581
 * 
 *     if names is None:
 *         raise ValueError('Must pass names or schema when constructing '             # <<<<<<<<<<<<<<
 *                          'Table or RecordBatch.')
 * 
*/
        __pyx_t_11 = NULL;
        __pyx_t_5 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_mstate_global->__pyx_kp_u_Must_pass_names_or_schema_when_c};
          __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 1581, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        __Pyx_Raise(__pyx_t_3, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __PYX_ERR(17, 1581, __pyx_L1_error)

        /* "pyarrow/table.pxi":1580
 *     c_fields.resize(K)
 * 
 *     if names is None:             # <<<<<<<<<<<<<<
 *         raise ValueError('Must pass names or schema when constructing '
 *                          'Table or RecordBatch.')
*/
      }

      /* "pyarrow/table.pxi":1584
 *                          'Table or RecordBatch.')
 * 
 *     if len(names) != K:             # <<<<<<<<<<<<<<
 *         raise ValueError(f'Length of names ({len(names)}) does not match '
 *                          f'length of arrays ({K})')
*/
      __pyx_t_1 = PyObject_Length(__pyx_v_names); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(17, 1584, __pyx_L1_error)
      __pyx_t_2 = (__pyx_t_1 != __pyx_v_K);
      if (unlikely(__pyx_t_2)) {

        /* "pyarrow/table.pxi":1585
 * 
 *     if len(names) != K:
 *         raise ValueError(f'Length of names ({len(names)}) does not match '             # <<<<<<<<<<<<<<
 *                          f'length of arrays ({K})')
 * 
*/
        __pyx_t_11 = NULL;
        __pyx_t_1 = PyObject_Length(__pyx_v_names); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(17, 1585, __pyx_L1_error)
        __pyx_t_4 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_t_1, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 1585, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);

        /* "pyarrow/table.pxi":1586
 *     if len(names) != K:
 *         raise ValueError(f'Length of names ({len(names)}) does not match '
 *                          f'length of arrays ({K})')             # <<<<<<<<<<<<<<
 * 
 *     converted_arrays = []
*/
        __pyx_t_9 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_K, 0, ' ', 'd'); if (unlikely(!__pyx_t_9)) __PYX_ERR(17, 1586, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_10[0] = __pyx_mstate_global->__pyx_kp_u_Length_of_names;
        __pyx_t_10[1] = __pyx_t_4;
        __pyx_t_10[2] = __pyx_mstate_global->__pyx_kp_u_does_not_match_length_of_arrays;
        __pyx_t_10[3] = __pyx_t_9;
        __pyx_t_10[4] = __pyx_mstate_global->__pyx_kp_u__7;

        /* "pyarrow/table.pxi":1585
 * 
 *     if len(names) != K:
 *         raise ValueError(f'Length of names ({len(names)}) does not match '             # <<<<<<<<<<<<<<
 *                          f'length of arrays ({K})')
 * 
*/
        __pyx_t_8 = __Pyx_PyUnicode_Join(__pyx_t_10, 5, 17 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + 35 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9) + 1, 127);
        if (unlikely(!__pyx_t_8)) __PYX_ERR(17, 1585, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __pyx_t_5 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_t_8};
          __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 1585, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        __Pyx_Raise(__pyx_t_3, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __PYX_ERR(17, 1585, __pyx_L1_error)

        /* "pyarrow/table.pxi":1584
 *                          'Table or RecordBatch.')
 * 
 *     if len(names) != K:             # <<<<<<<<<<<<<<
 *         raise ValueError(f'Length of names ({len(names)}) does not match '
 *                          f'length of arrays ({K})')
*/
      }

      /* "pyarrow/table.pxi":1588
 *                          f'length of arrays ({K})')
 * 
 *     converted_arrays = []             # <<<<<<<<<<<<<<
 *     for i in range(K):
 *         val = arrays[i]
*/
      __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 1588, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_v_converted_arrays = ((PyObject*)__pyx_t_3);
      __pyx_t_3 = 0;

      /* "pyarrow/table.pxi":1589
 * 
 *     converted_arrays = []
 *     for i in range(K):             # <<<<<<<<<<<<<<
 *         val = arrays[i]
 *         if not isinstance(val, (Array, ChunkedArray)):
*/
      __pyx_t_1 = __pyx_v_K;
      __pyx_t_12 = __pyx_t_1;
      for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_12; __pyx_t_13+=1) {
        __pyx_v_i = __pyx_t_13;

        /* "pyarrow/table.pxi":1590
 *     converted_arrays = []
 *     for i in range(K):
 *         val = arrays[i]             # <<<<<<<<<<<<<<
 *         if not isinstance(val, (Array, ChunkedArray)):
 *             val = array(val)
*/
        if (unlikely(__pyx_v_arrays == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
          __PYX_ERR(17, 1590, __pyx_L1_error)
        }
        __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_arrays, __pyx_v_i, Py_ssize_t, 1, PyLong_FromSsize_t, 0, 1, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 1590, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_3);
        __pyx_t_3 = 0;

        /* "pyarrow/table.pxi":1591
 *     for i in range(K):
 *         val = arrays[i]
 *         if not isinstance(val, (Array, ChunkedArray)):             # <<<<<<<<<<<<<<
 *             val = array(val)
 * 
*/
        __pyx_t_7 = __Pyx_TypeCheck(__pyx_v_val, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array); 
        if (!__pyx_t_7) {
        } else {
          __pyx_t_2 = __pyx_t_7;
          goto __pyx_L13_bool_binop_done;
        }
        __pyx_t_7 = __Pyx_TypeCheck(__pyx_v_val, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ChunkedArray); 
        __pyx_t_2 = __pyx_t_7;
        __pyx_L13_bool_binop_done:;
        __pyx_t_7 = (!__pyx_t_2);
        if (__pyx_t_7) {

          /* "pyarrow/table.pxi":1592
 *         val = arrays[i]
 *         if not isinstance(val, (Array, ChunkedArray)):
 *             val = array(val)             # <<<<<<<<<<<<<<
 * 
 *         c_type = (<DataType> val.type).sp_type
*/
          __pyx_t_8 = NULL;
          __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_array); if (unlikely(!__pyx_t_11)) __PYX_ERR(17, 1592, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_11);
          __pyx_t_5 = 1;
          #if CYTHON_UNPACK_METHODS
          if (unlikely(PyMethod_Check(__pyx_t_11))) {
            __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_11);
            assert(__pyx_t_8);
            PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_11);
            __Pyx_INCREF(__pyx_t_8);
            __Pyx_INCREF(__pyx__function);
            __Pyx_DECREF_SET(__pyx_t_11, __pyx__function);
            __pyx_t_5 = 0;
          }
          #endif
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_v_val};
            __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_11, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
            if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 1592, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
          }
          __Pyx_DECREF_SET(__pyx_v_val, __pyx_t_3);
          __pyx_t_3 = 0;

          /* "pyarrow/table.pxi":1591
 *     for i in range(K):
 *         val = arrays[i]
 *         if not isinstance(val, (Array, ChunkedArray)):             # <<<<<<<<<<<<<<
 *             val = array(val)
 * 
*/
        }

        /* "pyarrow/table.pxi":1594
 *             val = array(val)
 * 
 *         c_type = (<DataType> val.type).sp_type             # <<<<<<<<<<<<<<
 * 
 *         if names[i] is None:
*/
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_val, __pyx_mstate_global->__pyx_n_u_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 1594, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        if (unlikely(__pyx_t_3 == Py_None)) {
          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_type");
          __PYX_ERR(17, 1594, __pyx_L1_error)
        }
        __pyx_t_14 = ((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_t_3)->sp_type;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_v_c_type = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_14);

        /* "pyarrow/table.pxi":1596
 *         c_type = (<DataType> val.type).sp_type
 * 
 *         if names[i] is None:             # <<<<<<<<<<<<<<
 *             c_name = b'None'
 *         else:
*/
        if (unlikely(__pyx_v_names == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
          __PYX_ERR(17, 1596, __pyx_L1_error)
        }
        __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_names, __pyx_v_i, Py_ssize_t, 1, PyLong_FromSsize_t, 0, 1, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 1596, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_7 = (__pyx_t_3 == Py_None);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (__pyx_t_7) {

          /* "pyarrow/table.pxi":1597
 * 
 *         if names[i] is None:
 *             c_name = b'None'             # <<<<<<<<<<<<<<
 *         else:
 *             c_name = tobytes(names[i])
*/
          __pyx_t_15 = __pyx_convert_string_from_py_6libcpp_6string_std__in_string(__pyx_mstate_global->__pyx_n_b_None); if (unlikely(PyErr_Occurred())) __PYX_ERR(17, 1597, __pyx_L1_error)
          __pyx_v_c_name = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_15);

          /* "pyarrow/table.pxi":1596
 *         c_type = (<DataType> val.type).sp_type
 * 
 *         if names[i] is None:             # <<<<<<<<<<<<<<
 *             c_name = b'None'
 *         else:
*/
          goto __pyx_L15;
        }

        /* "pyarrow/table.pxi":1599
 *             c_name = b'None'
 *         else:
 *             c_name = tobytes(names[i])             # <<<<<<<<<<<<<<
 *         c_fields[i].reset(new CField(c_name, c_type, True))
 *         converted_arrays.append(val)
*/
        /*else*/ {
          __pyx_t_11 = NULL;
          __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_tobytes); if (unlikely(!__pyx_t_8)) __PYX_ERR(17, 1599, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          if (unlikely(__pyx_v_names == Py_None)) {
            PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
            __PYX_ERR(17, 1599, __pyx_L1_error)
          }
          __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_names, __pyx_v_i, Py_ssize_t, 1, PyLong_FromSsize_t, 0, 1, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_9)) __PYX_ERR(17, 1599, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
          __pyx_t_5 = 1;
          #if CYTHON_UNPACK_METHODS
          if (unlikely(PyMethod_Check(__pyx_t_8))) {
            __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_8);
            assert(__pyx_t_11);
            PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8);
            __Pyx_INCREF(__pyx_t_11);
            __Pyx_INCREF(__pyx__function);
            __Pyx_DECREF_SET(__pyx_t_8, __pyx__function);
            __pyx_t_5 = 0;
          }
          #endif
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_t_9};
            __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
            if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 1599, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
          }
          __pyx_t_15 = __pyx_convert_string_from_py_6libcpp_6string_std__in_string(__pyx_t_3); if (unlikely(PyErr_Occurred())) __PYX_ERR(17, 1599, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __pyx_v_c_name = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_15);
        }
        __pyx_L15:;

        /* "pyarrow/table.pxi":1600
 *         else:
 *             c_name = tobytes(names[i])
 *         c_fields[i].reset(new CField(c_name, c_type, True))             # <<<<<<<<<<<<<<
 *         converted_arrays.append(val)
 * 
*/
        (__pyx_v_c_fields[__pyx_v_i]).reset(new  arrow::Field(__pyx_v_c_name, __pyx_v_c_type, 1));

        /* "pyarrow/table.pxi":1601
 *             c_name = tobytes(names[i])
 *         c_fields[i].reset(new CField(c_name, c_type, True))
 *         converted_arrays.append(val)             # <<<<<<<<<<<<<<
 * 
 *     schema.reset(new CSchema(c_fields, c_meta))
*/
        __pyx_t_16 = __Pyx_PyList_Append(__pyx_v_converted_arrays, __pyx_v_val); if (unlikely(__pyx_t_16 == ((int)-1))) __PYX_ERR(17, 1601, __pyx_L1_error)
      }

      /* "pyarrow/table.pxi":1603
 *         converted_arrays.append(val)
 * 
 *     schema.reset(new CSchema(c_fields, c_meta))             # <<<<<<<<<<<<<<
 *     return converted_arrays
 * 
*/
      __pyx_v_schema->reset(new  arrow::Schema(__pyx_v_c_fields, __pyx_v_c_meta));

      /* "pyarrow/table.pxi":1604
 * 
 *     schema.reset(new CSchema(c_fields, c_meta))
 *     return converted_arrays             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_converted_arrays);
      __pyx_r = __pyx_v_converted_arrays;
      goto __pyx_L0;

      /* "pyarrow/table.pxi":1559
 * 
 * 
 * cdef _schema_from_arrays(arrays, names, metadata, shared_ptr[CSchema]* schema):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t K = len(arrays)
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_8);
      __Pyx_XDECREF(__pyx_t_9);
      __Pyx_XDECREF(__pyx_t_11);
      __Pyx_AddTraceback("pyarrow.lib._schema_from_arrays", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = 0;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_converted_arrays);
      __Pyx_XDECREF(__pyx_v_val);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/table.pxi":1607
 * 
 * 
 * cdef _sanitize_arrays(arrays, names, schema, metadata,             # <<<<<<<<<<<<<<
 *                       shared_ptr[CSchema]* c_schema):
 *     cdef Schema cy_schema
*/

    static PyObject *__pyx_f_7pyarrow_3lib__sanitize_arrays(PyObject *__pyx_v_arrays, PyObject *__pyx_v_names, PyObject *__pyx_v_schema, PyObject *__pyx_v_metadata, std::shared_ptr< arrow::Schema>  *__pyx_v_c_schema) {
      struct __pyx_obj_7pyarrow_3lib_Schema *__pyx_v_cy_schema = 0;
      PyObject *__pyx_v_converted_arrays = NULL;
      PyObject *__pyx_v_i = NULL;
      PyObject *__pyx_v_item = NULL;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      int __pyx_t_1;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      size_t __pyx_t_4;
      Py_ssize_t __pyx_t_5;
      Py_ssize_t __pyx_t_6;
      std::shared_ptr< arrow::Schema>  __pyx_t_7;
      PyObject *(*__pyx_t_8)(PyObject *);
      PyObject *__pyx_t_9 = NULL;
      PyObject *__pyx_t_10 = NULL;
      PyObject *__pyx_t_11 = NULL;
      PyObject *__pyx_t_12 = NULL;
      PyObject *__pyx_t_13 = NULL;
      int __pyx_t_14;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("_sanitize_arrays", 0);

      /* "pyarrow/table.pxi":1610
 *                       shared_ptr[CSchema]* c_schema):
 *     cdef Schema cy_schema
 *     if schema is None:             # <<<<<<<<<<<<<<
 *         converted_arrays = _schema_from_arrays(arrays, names, metadata,
 *                                                c_schema)
*/
      __pyx_t_1 = (__pyx_v_schema == Py_None);
      if (__pyx_t_1) {

        /* "pyarrow/table.pxi":1611
 *     cdef Schema cy_schema
 *     if schema is None:
 *         converted_arrays = _schema_from_arrays(arrays, names, metadata,             # <<<<<<<<<<<<<<
 *                                                c_schema)
 *     else:
*/
        __pyx_t_2 = __pyx_f_7pyarrow_3lib__schema_from_arrays(__pyx_v_arrays, __pyx_v_names, __pyx_v_metadata, __pyx_v_c_schema); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 1611, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_v_converted_arrays = __pyx_t_2;
        __pyx_t_2 = 0;

        /* "pyarrow/table.pxi":1610
 *                       shared_ptr[CSchema]* c_schema):
 *     cdef Schema cy_schema
 *     if schema is None:             # <<<<<<<<<<<<<<
 *         converted_arrays = _schema_from_arrays(arrays, names, metadata,
 *                                                c_schema)
*/
        goto __pyx_L3;
      }

      /* "pyarrow/table.pxi":1614
 *                                                c_schema)
 *     else:
 *         if names is not None:             # <<<<<<<<<<<<<<
 *             raise ValueError('Cannot pass both schema and names')
 *         if metadata is not None:
*/
      /*else*/ {
        __pyx_t_1 = (__pyx_v_names != Py_None);
        if (unlikely(__pyx_t_1)) {

          /* "pyarrow/table.pxi":1615
 *     else:
 *         if names is not None:
 *             raise ValueError('Cannot pass both schema and names')             # <<<<<<<<<<<<<<
 *         if metadata is not None:
 *             raise ValueError('Cannot pass both schema and metadata')
*/
          __pyx_t_3 = NULL;
          __pyx_t_4 = 1;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Cannot_pass_both_schema_and_name};
            __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 1615, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
          }
          __Pyx_Raise(__pyx_t_2, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __PYX_ERR(17, 1615, __pyx_L1_error)

          /* "pyarrow/table.pxi":1614
 *                                                c_schema)
 *     else:
 *         if names is not None:             # <<<<<<<<<<<<<<
 *             raise ValueError('Cannot pass both schema and names')
 *         if metadata is not None:
*/
        }

        /* "pyarrow/table.pxi":1616
 *         if names is not None:
 *             raise ValueError('Cannot pass both schema and names')
 *         if metadata is not None:             # <<<<<<<<<<<<<<
 *             raise ValueError('Cannot pass both schema and metadata')
 *         cy_schema = schema
*/
        __pyx_t_1 = (__pyx_v_metadata != Py_None);
        if (unlikely(__pyx_t_1)) {

          /* "pyarrow/table.pxi":1617
 *             raise ValueError('Cannot pass both schema and names')
 *         if metadata is not None:
 *             raise ValueError('Cannot pass both schema and metadata')             # <<<<<<<<<<<<<<
 *         cy_schema = schema
 * 
*/
          __pyx_t_3 = NULL;
          __pyx_t_4 = 1;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Cannot_pass_both_schema_and_meta};
            __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 1617, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
          }
          __Pyx_Raise(__pyx_t_2, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __PYX_ERR(17, 1617, __pyx_L1_error)

          /* "pyarrow/table.pxi":1616
 *         if names is not None:
 *             raise ValueError('Cannot pass both schema and names')
 *         if metadata is not None:             # <<<<<<<<<<<<<<
 *             raise ValueError('Cannot pass both schema and metadata')
 *         cy_schema = schema
*/
        }

        /* "pyarrow/table.pxi":1618
 *         if metadata is not None:
 *             raise ValueError('Cannot pass both schema and metadata')
 *         cy_schema = schema             # <<<<<<<<<<<<<<
 * 
 *         if len(schema) != len(arrays):
*/
        __pyx_t_2 = __pyx_v_schema;
        __Pyx_INCREF(__pyx_t_2);
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Schema))))) __PYX_ERR(17, 1618, __pyx_L1_error)
        __pyx_v_cy_schema = ((struct __pyx_obj_7pyarrow_3lib_Schema *)__pyx_t_2);
        __pyx_t_2 = 0;

        /* "pyarrow/table.pxi":1620
 *         cy_schema = schema
 * 
 *         if len(schema) != len(arrays):             # <<<<<<<<<<<<<<
 *             raise ValueError('Schema and number of arrays unequal')
 * 
*/
        __pyx_t_5 = PyObject_Length(__pyx_v_schema); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(17, 1620, __pyx_L1_error)
        __pyx_t_6 = PyObject_Length(__pyx_v_arrays); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(17, 1620, __pyx_L1_error)
        __pyx_t_1 = (__pyx_t_5 != __pyx_t_6);
        if (unlikely(__pyx_t_1)) {

          /* "pyarrow/table.pxi":1621
 * 
 *         if len(schema) != len(arrays):
 *             raise ValueError('Schema and number of arrays unequal')             # <<<<<<<<<<<<<<
 * 
 *         c_schema[0] = cy_schema.sp_schema
*/
          __pyx_t_3 = NULL;
          __pyx_t_4 = 1;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Schema_and_number_of_arrays_uneq};
            __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 1621, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
          }
          __Pyx_Raise(__pyx_t_2, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __PYX_ERR(17, 1621, __pyx_L1_error)

          /* "pyarrow/table.pxi":1620
 *         cy_schema = schema
 * 
 *         if len(schema) != len(arrays):             # <<<<<<<<<<<<<<
 *             raise ValueError('Schema and number of arrays unequal')
 * 
*/
        }

        /* "pyarrow/table.pxi":1623
 *             raise ValueError('Schema and number of arrays unequal')
 * 
 *         c_schema[0] = cy_schema.sp_schema             # <<<<<<<<<<<<<<
 *         converted_arrays = []
 *         for i, item in enumerate(arrays):
*/
        if (unlikely(((PyObject *)__pyx_v_cy_schema) == Py_None)) {
          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_schema");
          __PYX_ERR(17, 1623, __pyx_L1_error)
        }
        __pyx_t_7 = __pyx_v_cy_schema->sp_schema;
        (__pyx_v_c_schema[0]) = __pyx_t_7;

        /* "pyarrow/table.pxi":1624
 * 
 *         c_schema[0] = cy_schema.sp_schema
 *         converted_arrays = []             # <<<<<<<<<<<<<<
 *         for i, item in enumerate(arrays):
 *             item = asarray(item, type=schema[i].type)
*/
        __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 1624, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_v_converted_arrays = __pyx_t_2;
        __pyx_t_2 = 0;

        /* "pyarrow/table.pxi":1625
 *         c_schema[0] = cy_schema.sp_schema
 *         converted_arrays = []
 *         for i, item in enumerate(arrays):             # <<<<<<<<<<<<<<
 *             item = asarray(item, type=schema[i].type)
 *             converted_arrays.append(item)
*/
        __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0);
        __pyx_t_2 = __pyx_mstate_global->__pyx_int_0;
        if (likely(PyList_CheckExact(__pyx_v_arrays)) || PyTuple_CheckExact(__pyx_v_arrays)) {
          __pyx_t_3 = __pyx_v_arrays; __Pyx_INCREF(__pyx_t_3);
          __pyx_t_6 = 0;
          __pyx_t_8 = NULL;
        } else {
          __pyx_t_6 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_arrays); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 1625, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_8 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(17, 1625, __pyx_L1_error)
        }
        for (;;) {
          if (likely(!__pyx_t_8)) {
            if (likely(PyList_CheckExact(__pyx_t_3))) {
              {
                Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3);
                #if !CYTHON_ASSUME_SAFE_SIZE
                if (unlikely((__pyx_temp < 0))) __PYX_ERR(17, 1625, __pyx_L1_error)
                #endif
                if (__pyx_t_6 >= __pyx_temp) break;
              }
              __pyx_t_9 = __Pyx_PyList_GetItemRefFast(__pyx_t_3, __pyx_t_6, __Pyx_ReferenceSharing_OwnStrongReference);
              ++__pyx_t_6;
            } else {
              {
                Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3);
                #if !CYTHON_ASSUME_SAFE_SIZE
                if (unlikely((__pyx_temp < 0))) __PYX_ERR(17, 1625, __pyx_L1_error)
                #endif
                if (__pyx_t_6 >= __pyx_temp) break;
              }
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_9 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_6));
              #else
              __pyx_t_9 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_6);
              #endif
              ++__pyx_t_6;
            }
            if (unlikely(!__pyx_t_9)) __PYX_ERR(17, 1625, __pyx_L1_error)
          } else {
            __pyx_t_9 = __pyx_t_8(__pyx_t_3);
            if (unlikely(!__pyx_t_9)) {
              PyObject* exc_type = PyErr_Occurred();
              if (exc_type) {
                if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(17, 1625, __pyx_L1_error)
                PyErr_Clear();
              }
              break;
            }
          }
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_9);
          __pyx_t_9 = 0;
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_2);
          __pyx_t_9 = __Pyx_PyLong_AddObjC(__pyx_t_2, __pyx_mstate_global->__pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(17, 1625, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_DECREF(__pyx_t_2);
          __pyx_t_2 = __pyx_t_9;
          __pyx_t_9 = 0;

          /* "pyarrow/table.pxi":1626
 *         converted_arrays = []
 *         for i, item in enumerate(arrays):
 *             item = asarray(item, type=schema[i].type)             # <<<<<<<<<<<<<<
 *             converted_arrays.append(item)
 *     return converted_arrays
*/
          __pyx_t_10 = NULL;
          __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_asarray); if (unlikely(!__pyx_t_11)) __PYX_ERR(17, 1626, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_11);
          if (unlikely(__pyx_v_schema == Py_None)) {
            PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
            __PYX_ERR(17, 1626, __pyx_L1_error)
          }
          __pyx_t_12 = __Pyx_PyObject_GetItem(__pyx_v_schema, __pyx_v_i); if (unlikely(!__pyx_t_12)) __PYX_ERR(17, 1626, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_12);
          __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_type); if (unlikely(!__pyx_t_13)) __PYX_ERR(17, 1626, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_13);
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          __pyx_t_4 = 1;
          #if CYTHON_UNPACK_METHODS
          if (unlikely(PyMethod_Check(__pyx_t_11))) {
            __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_11);
            assert(__pyx_t_10);
            PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_11);
            __Pyx_INCREF(__pyx_t_10);
            __Pyx_INCREF(__pyx__function);
            __Pyx_DECREF_SET(__pyx_t_11, __pyx__function);
            __pyx_t_4 = 0;
          }
          #endif
          {
            PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_10, __pyx_v_item};
            __pyx_t_12 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(17, 1626, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_12);
            if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_type, __pyx_t_13, __pyx_t_12, __pyx_callargs+2, 0) < (0)) __PYX_ERR(17, 1626, __pyx_L1_error)
            __pyx_t_9 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_11, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_12);
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
            __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
            if (unlikely(!__pyx_t_9)) __PYX_ERR(17, 1626, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_9);
          }
          __Pyx_DECREF_SET(__pyx_v_item, __pyx_t_9);
          __pyx_t_9 = 0;

          /* "pyarrow/table.pxi":1627
 *         for i, item in enumerate(arrays):
 *             item = asarray(item, type=schema[i].type)
 *             converted_arrays.append(item)             # <<<<<<<<<<<<<<
 *     return converted_arrays
 * 
*/
          __pyx_t_14 = __Pyx_PyObject_Append(__pyx_v_converted_arrays, __pyx_v_item); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(17, 1627, __pyx_L1_error)

          /* "pyarrow/table.pxi":1625
 *         c_schema[0] = cy_schema.sp_schema
 *         converted_arrays = []
 *         for i, item in enumerate(arrays):             # <<<<<<<<<<<<<<
 *             item = asarray(item, type=schema[i].type)
 *             converted_arrays.append(item)
*/
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
      __pyx_L3:;

      /* "pyarrow/table.pxi":1628
 *             item = asarray(item, type=schema[i].type)
 *             converted_arrays.append(item)
 *     return converted_arrays             # <<<<<<<<<<<<<<
 * 
 * cdef class _Tabular(_PandasConvertible):
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_converted_arrays);
      __pyx_r = __pyx_v_converted_arrays;
      goto __pyx_L0;

      /* "pyarrow/table.pxi":1607
 * 
 * 
 * cdef _sanitize_arrays(arrays, names, schema, metadata,             # <<<<<<<<<<<<<<
 *                       shared_ptr[CSchema]* c_schema):
 *     cdef Schema cy_schema
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_9);
      __Pyx_XDECREF(__pyx_t_10);
      __Pyx_XDECREF(__pyx_t_11);
      __Pyx_XDECREF(__pyx_t_12);
      __Pyx_XDECREF(__pyx_t_13);
      __Pyx_AddTraceback("pyarrow.lib._sanitize_arrays", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = 0;
      __pyx_L0:;
      __Pyx_XDECREF((PyObject *)__pyx_v_cy_schema);
      __Pyx_XDECREF(__pyx_v_converted_arrays);
      __Pyx_XDECREF(__pyx_v_i);
      __Pyx_XDECREF(__pyx_v_item);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/table.pxi":1633
 *     """Internal: An interface for common operations on tabular objects."""
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         raise TypeError(f"Do not call {self.__class__.__name__}'s constructor directly, use "
 *                         f"one of the `{self.__class__.__name__}.from_*` functions instead.")
*/

    /* Python wrapper */
    static int __pyx_pw_7pyarrow_3lib_8_Tabular_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
    static int __pyx_pw_7pyarrow_3lib_8_Tabular_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      int __pyx_r;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
      #endif
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, __pyx_nargs); return -1; }
      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
      if (unlikely(__pyx_kwds_len < 0)) return -1;
      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__init__", __pyx_kwds); return -1;}
      __pyx_r = __pyx_pf_7pyarrow_3lib_8_Tabular___init__(((struct __pyx_obj_7pyarrow_3lib__Tabular *)__pyx_v_self));

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

    static int __pyx_pf_7pyarrow_3lib_8_Tabular___init__(struct __pyx_obj_7pyarrow_3lib__Tabular *__pyx_v_self) {
      int __pyx_r;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      PyObject *__pyx_t_5 = NULL;
      PyObject *__pyx_t_6[5];
      size_t __pyx_t_7;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__init__", 0);

      /* "pyarrow/table.pxi":1634
 * 
 *     def __init__(self):
 *         raise TypeError(f"Do not call {self.__class__.__name__}'s constructor directly, use "             # <<<<<<<<<<<<<<
 *                         f"one of the `{self.__class__.__name__}.from_*` functions instead.")
 * 
*/
      __pyx_t_2 = NULL;
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 1634, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_name_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 1634, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 1634, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "pyarrow/table.pxi":1635
 *     def __init__(self):
 *         raise TypeError(f"Do not call {self.__class__.__name__}'s constructor directly, use "
 *                         f"one of the `{self.__class__.__name__}.from_*` functions instead.")             # <<<<<<<<<<<<<<
 * 
 *     def __array__(self, dtype=None, copy=None):
*/
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 1635, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_name_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 1635, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 1635, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_6[0] = __pyx_mstate_global->__pyx_kp_u_Do_not_call;
      __pyx_t_6[1] = __pyx_t_3;
      __pyx_t_6[2] = __pyx_mstate_global->__pyx_kp_u_s_constructor_directly_use_one_2;
      __pyx_t_6[3] = __pyx_t_4;
      __pyx_t_6[4] = __pyx_mstate_global->__pyx_kp_u_from__functions_instead;

      /* "pyarrow/table.pxi":1634
 * 
 *     def __init__(self):
 *         raise TypeError(f"Do not call {self.__class__.__name__}'s constructor directly, use "             # <<<<<<<<<<<<<<
 *                         f"one of the `{self.__class__.__name__}.from_*` functions instead.")
 * 
*/
      __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_6, 5, 12 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + 41 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + 27, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4));
      if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 1634, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_7 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_5};
        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 1634, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __PYX_ERR(17, 1634, __pyx_L1_error)

      /* "pyarrow/table.pxi":1633
 *     """Internal: An interface for common operations on tabular objects."""
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         raise TypeError(f"Do not call {self.__class__.__name__}'s constructor directly, use "
 *                         f"one of the `{self.__class__.__name__}.from_*` functions instead.")
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_AddTraceback("pyarrow.lib._Tabular.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = -1;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/table.pxi":1637
 *                         f"one of the `{self.__class__.__name__}.from_*` functions instead.")
 * 
 *     def __array__(self, dtype=None, copy=None):             # <<<<<<<<<<<<<<
 *         self._assert_cpu()
 *         if copy is False:
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_8_Tabular_3__array__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_8_Tabular_2__array__, "_Tabular.__array__(self, dtype=None, copy=None)");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_8_Tabular_3__array__ = {"__array__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_8_Tabular_3__array__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_8_Tabular_2__array__};
    static PyObject *__pyx_pw_7pyarrow_3lib_8_Tabular_3__array__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_dtype = 0;
      PyObject *__pyx_v_copy = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[2] = {0,0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__array__ (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_dtype,&__pyx_mstate_global->__pyx_n_u_copy,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(17, 1637, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(17, 1637, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 1637, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__array__", 0) < (0)) __PYX_ERR(17, 1637, __pyx_L3_error)
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
        } else {
          switch (__pyx_nargs) {
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(17, 1637, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 1637, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
        }
        __pyx_v_dtype = values[0];
        __pyx_v_copy = values[1];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("__array__", 0, 0, 2, __pyx_nargs); __PYX_ERR(17, 1637, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib._Tabular.__array__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_8_Tabular_2__array__(((struct __pyx_obj_7pyarrow_3lib__Tabular *)__pyx_v_self), __pyx_v_dtype, __pyx_v_copy);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_8_Tabular_2__array__(struct __pyx_obj_7pyarrow_3lib__Tabular *__pyx_v_self, PyObject *__pyx_v_dtype, PyObject *__pyx_v_copy) {
      PyObject *__pyx_v_column_arrays = NULL;
      PyObject *__pyx_v_arr = NULL;
      PyObject *__pyx_9genexpr21__pyx_v_i = NULL;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      int __pyx_t_1;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      PyObject *__pyx_t_5 = NULL;
      PyObject *__pyx_t_6[3];
      size_t __pyx_t_7;
      PyObject *(*__pyx_t_8)(PyObject *);
      PyObject *__pyx_t_9 = NULL;
      PyObject *__pyx_t_10 = NULL;
      PyObject *__pyx_t_11 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__array__", 0);

      /* "pyarrow/table.pxi":1638
 * 
 *     def __array__(self, dtype=None, copy=None):
 *         self._assert_cpu()             # <<<<<<<<<<<<<<
 *         if copy is False:
 *             raise ValueError(
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_assert_cpu");
        __PYX_ERR(17, 1638, __pyx_L1_error)
      }
      ((struct __pyx_vtabstruct_7pyarrow_3lib__Tabular *)__pyx_v_self->__pyx_vtab)->_assert_cpu(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(17, 1638, __pyx_L1_error)

      /* "pyarrow/table.pxi":1639
 *     def __array__(self, dtype=None, copy=None):
 *         self._assert_cpu()
 *         if copy is False:             # <<<<<<<<<<<<<<
 *             raise ValueError(
 *                 "Unable to avoid a copy while creating a numpy array as requested "
*/
      __pyx_t_1 = (__pyx_v_copy == Py_False);
      if (unlikely(__pyx_t_1)) {

        /* "pyarrow/table.pxi":1640
 *         self._assert_cpu()
 *         if copy is False:
 *             raise ValueError(             # <<<<<<<<<<<<<<
 *                 "Unable to avoid a copy while creating a numpy array as requested "
 *                 f"(converting a pyarrow.{self.__class__.__name__} always results "
*/
        __pyx_t_3 = NULL;

        /* "pyarrow/table.pxi":1642
 *             raise ValueError(
 *                 "Unable to avoid a copy while creating a numpy array as requested "
 *                 f"(converting a pyarrow.{self.__class__.__name__} always results "             # <<<<<<<<<<<<<<
 *                 "in a copy).\n"
 *                 "If using `np.array(obj, copy=False)` replace it with "
*/
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 1642, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_name_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 1642, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 1642, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_6[0] = __pyx_mstate_global->__pyx_kp_u_Unable_to_avoid_a_copy_while_cre_3;
        __pyx_t_6[1] = __pyx_t_4;
        __pyx_t_6[2] = __pyx_mstate_global->__pyx_kp_u_always_results_in_a_copy_If_usi;

        /* "pyarrow/table.pxi":1641
 *         if copy is False:
 *             raise ValueError(
 *                 "Unable to avoid a copy while creating a numpy array as requested "             # <<<<<<<<<<<<<<
 *                 f"(converting a pyarrow.{self.__class__.__name__} always results "
 *                 "in a copy).\n"
*/
        __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_6, 3, 87 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + 126, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4));
        if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 1641, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_7 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 1640, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __Pyx_Raise(__pyx_t_2, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __PYX_ERR(17, 1640, __pyx_L1_error)

        /* "pyarrow/table.pxi":1639
 *     def __array__(self, dtype=None, copy=None):
 *         self._assert_cpu()
 *         if copy is False:             # <<<<<<<<<<<<<<
 *             raise ValueError(
 *                 "Unable to avoid a copy while creating a numpy array as requested "
*/
      }

      /* "pyarrow/table.pxi":1648
 *             )
 *         # 'copy' can further be ignored because stacking will result in a copy
 *         column_arrays = [             # <<<<<<<<<<<<<<
 *             np.asarray(self.column(i), dtype=dtype) for i in range(self.num_columns)
 *         ]
*/
      { /* enter inner scope */
        __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 1648, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_2);

        /* "pyarrow/table.pxi":1649
 *         # 'copy' can further be ignored because stacking will result in a copy
 *         column_arrays = [
 *             np.asarray(self.column(i), dtype=dtype) for i in range(self.num_columns)             # <<<<<<<<<<<<<<
 *         ]
 *         if column_arrays:
*/
        __pyx_t_3 = NULL;
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_num_columns); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 1649, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_7 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
          __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)(&PyRange_Type), __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 1649, __pyx_L6_error)
          __Pyx_GOTREF(__pyx_t_5);
        }
        __pyx_t_4 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 1649, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_8 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(17, 1649, __pyx_L6_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        for (;;) {
          {
            __pyx_t_5 = __pyx_t_8(__pyx_t_4);
            if (unlikely(!__pyx_t_5)) {
              PyObject* exc_type = PyErr_Occurred();
              if (exc_type) {
                if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(17, 1649, __pyx_L6_error)
                PyErr_Clear();
              }
              break;
            }
          }
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_XDECREF_SET(__pyx_9genexpr21__pyx_v_i, __pyx_t_5);
          __pyx_t_5 = 0;
          __pyx_t_3 = NULL;
          __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(17, 1649, __pyx_L6_error)
          __Pyx_GOTREF(__pyx_t_9);
          __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_asarray); if (unlikely(!__pyx_t_10)) __PYX_ERR(17, 1649, __pyx_L6_error)
          __Pyx_GOTREF(__pyx_t_10);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          __pyx_t_11 = ((PyObject *)__pyx_v_self);
          __Pyx_INCREF(__pyx_t_11);
          __pyx_t_7 = 0;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_9genexpr21__pyx_v_i};
            __pyx_t_9 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_column, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
            if (unlikely(!__pyx_t_9)) __PYX_ERR(17, 1649, __pyx_L6_error)
            __Pyx_GOTREF(__pyx_t_9);
          }
          __pyx_t_7 = 1;
          #if CYTHON_UNPACK_METHODS
          if (unlikely(PyMethod_Check(__pyx_t_10))) {
            __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_10);
            assert(__pyx_t_3);
            PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_10);
            __Pyx_INCREF(__pyx_t_3);
            __Pyx_INCREF(__pyx__function);
            __Pyx_DECREF_SET(__pyx_t_10, __pyx__function);
            __pyx_t_7 = 0;
          }
          #endif
          {
            PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_3, __pyx_t_9};
            __pyx_t_11 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(17, 1649, __pyx_L6_error)
            __Pyx_GOTREF(__pyx_t_11);
            if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_dtype, __pyx_v_dtype, __pyx_t_11, __pyx_callargs+2, 0) < (0)) __PYX_ERR(17, 1649, __pyx_L6_error)
            __pyx_t_5 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_10, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_11);
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
            __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
            if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 1649, __pyx_L6_error)
            __Pyx_GOTREF(__pyx_t_5);
          }
          if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_5))) __PYX_ERR(17, 1648, __pyx_L6_error)
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_XDECREF(__pyx_9genexpr21__pyx_v_i); __pyx_9genexpr21__pyx_v_i = 0;
        goto __pyx_L10_exit_scope;
        __pyx_L6_error:;
        __Pyx_XDECREF(__pyx_9genexpr21__pyx_v_i); __pyx_9genexpr21__pyx_v_i = 0;
        goto __pyx_L1_error;
        __pyx_L10_exit_scope:;
      } /* exit inner scope */
      __pyx_v_column_arrays = ((PyObject*)__pyx_t_2);
      __pyx_t_2 = 0;

      /* "pyarrow/table.pxi":1651
 *             np.asarray(self.column(i), dtype=dtype) for i in range(self.num_columns)
 *         ]
 *         if column_arrays:             # <<<<<<<<<<<<<<
 *             arr = np.stack(column_arrays, axis=1)
 *         else:
*/
      {
        Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_v_column_arrays);
        if (unlikely(((!CYTHON_ASSUME_SAFE_SIZE) && __pyx_temp < 0))) __PYX_ERR(17, 1651, __pyx_L1_error)
        __pyx_t_1 = (__pyx_temp != 0);
      }

      if (__pyx_t_1) {

        /* "pyarrow/table.pxi":1652
 *         ]
 *         if column_arrays:
 *             arr = np.stack(column_arrays, axis=1)             # <<<<<<<<<<<<<<
 *         else:
 *             arr = np.empty((self.num_rows, 0), dtype=dtype)
*/
        __pyx_t_4 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 1652, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_stack); if (unlikely(!__pyx_t_10)) __PYX_ERR(17, 1652, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_7 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_10))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_10);
          assert(__pyx_t_4);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_10);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_10, __pyx__function);
          __pyx_t_7 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_4, __pyx_v_column_arrays};
          __pyx_t_5 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 1652, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_axis, __pyx_mstate_global->__pyx_int_1, __pyx_t_5, __pyx_callargs+2, 0) < (0)) __PYX_ERR(17, 1652, __pyx_L1_error)
          __pyx_t_2 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_10, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_5);
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 1652, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __pyx_v_arr = __pyx_t_2;
        __pyx_t_2 = 0;

        /* "pyarrow/table.pxi":1651
 *             np.asarray(self.column(i), dtype=dtype) for i in range(self.num_columns)
 *         ]
 *         if column_arrays:             # <<<<<<<<<<<<<<
 *             arr = np.stack(column_arrays, axis=1)
 *         else:
*/
        goto __pyx_L11;
      }

      /* "pyarrow/table.pxi":1654
 *             arr = np.stack(column_arrays, axis=1)
 *         else:
 *             arr = np.empty((self.num_rows, 0), dtype=dtype)             # <<<<<<<<<<<<<<
 *         return arr
 * 
*/
      /*else*/ {
        __pyx_t_10 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 1654, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 1654, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_num_rows); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 1654, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(17, 1654, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_GIVEREF(__pyx_t_5);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_5) != (0)) __PYX_ERR(17, 1654, __pyx_L1_error);
        __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0);
        __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_0);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_mstate_global->__pyx_int_0) != (0)) __PYX_ERR(17, 1654, __pyx_L1_error);
        __pyx_t_5 = 0;
        __pyx_t_7 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_10);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_10);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_7 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_10, __pyx_t_11};
          __pyx_t_5 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 1654, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_dtype, __pyx_v_dtype, __pyx_t_5, __pyx_callargs+2, 0) < (0)) __PYX_ERR(17, 1654, __pyx_L1_error)
          __pyx_t_2 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_5);
          __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 1654, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __pyx_v_arr = __pyx_t_2;
        __pyx_t_2 = 0;
      }
      __pyx_L11:;

      /* "pyarrow/table.pxi":1655
 *         else:
 *             arr = np.empty((self.num_rows, 0), dtype=dtype)
 *         return arr             # <<<<<<<<<<<<<<
 * 
 *     def __dataframe__(self, nan_as_null: bool = False, allow_copy: bool = True):
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_arr);
      __pyx_r = __pyx_v_arr;
      goto __pyx_L0;

      /* "pyarrow/table.pxi":1637
 *                         f"one of the `{self.__class__.__name__}.from_*` functions instead.")
 * 
 *     def __array__(self, dtype=None, copy=None):             # <<<<<<<<<<<<<<
 *         self._assert_cpu()
 *         if copy is False:
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_9);
      __Pyx_XDECREF(__pyx_t_10);
      __Pyx_XDECREF(__pyx_t_11);
      __Pyx_AddTraceback("pyarrow.lib._Tabular.__array__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_column_arrays);
      __Pyx_XDECREF(__pyx_v_arr);
      __Pyx_XDECREF(__pyx_9genexpr21__pyx_v_i);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/table.pxi":1657
 *         return arr
 * 
 *     def __dataframe__(self, nan_as_null: bool = False, allow_copy: bool = True):             # <<<<<<<<<<<<<<
 *         """
 *         Return the dataframe interchange object implementing the interchange protocol.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_8_Tabular_5__dataframe__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_8_Tabular_4__dataframe__, "_Tabular.__dataframe__(self, bool nan_as_null: bool = False, bool allow_copy: bool = True)\n\nReturn the dataframe interchange object implementing the interchange protocol.\n\nParameters\n----------\nnan_as_null : bool, default False\n    Whether to tell the DataFrame to overwrite null values in the data\n    with ``NaN`` (or ``NaT``).\nallow_copy : bool, default True\n    Whether to allow memory copying when exporting. If set to False\n    it would cause non-zero-copy exports to fail.\n\nReturns\n-------\nDataFrame interchange object\n    The object which consuming library can use to ingress the dataframe.\n\nNotes\n-----\nDetails on the interchange protocol:\nhttps://data-apis.org/dataframe-protocol/latest/index.html\n`nan_as_null` currently has no effect; once support for nullable extension\ndtypes is added, this value should be propagated to columns.");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_8_Tabular_5__dataframe__ = {"__dataframe__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_8_Tabular_5__dataframe__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_8_Tabular_4__dataframe__};
    static PyObject *__pyx_pw_7pyarrow_3lib_8_Tabular_5__dataframe__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      int __pyx_v_nan_as_null;
      int __pyx_v_allow_copy;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[2] = {0,0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__dataframe__ (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_nan_as_null,&__pyx_mstate_global->__pyx_n_u_allow_copy,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(17, 1657, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(17, 1657, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 1657, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__dataframe__", 0) < (0)) __PYX_ERR(17, 1657, __pyx_L3_error)
        } else {
          switch (__pyx_nargs) {
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(17, 1657, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 1657, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
        }
        if (values[0]) {
          __pyx_v_nan_as_null = __Pyx_PyObject_IsTrue(values[0]); if (unlikely((__pyx_v_nan_as_null == (int)-1) && PyErr_Occurred())) __PYX_ERR(17, 1657, __pyx_L3_error)
        } else {
          __pyx_v_nan_as_null = ((int)0);
        }
        if (values[1]) {
          __pyx_v_allow_copy = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_allow_copy == (int)-1) && PyErr_Occurred())) __PYX_ERR(17, 1657, __pyx_L3_error)
        } else {
          __pyx_v_allow_copy = ((int)1);
        }
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("__dataframe__", 0, 0, 2, __pyx_nargs); __PYX_ERR(17, 1657, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib._Tabular.__dataframe__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_8_Tabular_4__dataframe__(((struct __pyx_obj_7pyarrow_3lib__Tabular *)__pyx_v_self), __pyx_v_nan_as_null, __pyx_v_allow_copy);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_8_Tabular_4__dataframe__(struct __pyx_obj_7pyarrow_3lib__Tabular *__pyx_v_self, int __pyx_v_nan_as_null, int __pyx_v_allow_copy) {
      PyObject *__pyx_v__PyArrowDataFrame = NULL;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      Py_ssize_t __pyx_t_3;
      PyObject *__pyx_t_4 = NULL;
      PyObject *__pyx_t_5 = NULL;
      PyObject *__pyx_t_6 = NULL;
      PyObject *__pyx_t_7 = NULL;
      size_t __pyx_t_8;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__dataframe__", 0);

      /* "pyarrow/table.pxi":1683
 *         """
 * 
 *         from pyarrow.interchange.dataframe import _PyArrowDataFrame             # <<<<<<<<<<<<<<
 * 
 *         return _PyArrowDataFrame(self, nan_as_null, allow_copy)
*/
      {
        PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_PyArrowDataFrame};
        __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_pyarrow_interchange_dataframe, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 1683, __pyx_L1_error)
      }
      __pyx_t_1 = __pyx_t_2;
      __Pyx_GOTREF(__pyx_t_1);
      {
        PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_PyArrowDataFrame};
        __pyx_t_3 = 0; {
          __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_1, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 1683, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          switch (__pyx_t_3) {
            case 0:
            __Pyx_INCREF(__pyx_t_4);
            __pyx_v__PyArrowDataFrame = __pyx_t_4;
            break;
            default:;
          }
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "pyarrow/table.pxi":1685
 *         from pyarrow.interchange.dataframe import _PyArrowDataFrame
 * 
 *         return _PyArrowDataFrame(self, nan_as_null, allow_copy)             # <<<<<<<<<<<<<<
 * 
 *     def __eq__(self, other):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_4 = NULL;
      __Pyx_INCREF(__pyx_v__PyArrowDataFrame);
      __pyx_t_5 = __pyx_v__PyArrowDataFrame; 
      __pyx_t_6 = __Pyx_PyBool_FromLong(__pyx_v_nan_as_null); if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 1685, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = __Pyx_PyBool_FromLong(__pyx_v_allow_copy); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 1685, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
        assert(__pyx_t_4);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
        __pyx_t_8 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[4] = {__pyx_t_4, ((PyObject *)__pyx_v_self), __pyx_t_6, __pyx_t_7};
        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_8, (4-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 1685, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/table.pxi":1657
 *         return arr
 * 
 *     def __dataframe__(self, nan_as_null: bool = False, allow_copy: bool = True):             # <<<<<<<<<<<<<<
 *         """
 *         Return the dataframe interchange object implementing the interchange protocol.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_7);
      __Pyx_AddTraceback("pyarrow.lib._Tabular.__dataframe__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v__PyArrowDataFrame);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/table.pxi":1687
 *         return _PyArrowDataFrame(self, nan_as_null, allow_copy)
 * 
 *     def __eq__(self, other):             # <<<<<<<<<<<<<<
 *         try:
 *             return self.equals(other)
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_8_Tabular_7__eq__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_8_Tabular_7__eq__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__eq__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_8_Tabular_6__eq__(((struct __pyx_obj_7pyarrow_3lib__Tabular *)__pyx_v_self), ((PyObject *)__pyx_v_other));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_8_Tabular_6__eq__(struct __pyx_obj_7pyarrow_3lib__Tabular *__pyx_v_self, PyObject *__pyx_v_other) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      PyObject *__pyx_t_5 = NULL;
      size_t __pyx_t_6;
      int __pyx_t_7;
      PyObject *__pyx_t_8 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__eq__", 0);

      /* "pyarrow/table.pxi":1688
 * 
 *     def __eq__(self, other):
 *         try:             # <<<<<<<<<<<<<<
 *             return self.equals(other)
 *         except TypeError:
*/
      {
        __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:*/ {

          /* "pyarrow/table.pxi":1689
 *     def __eq__(self, other):
 *         try:
 *             return self.equals(other)             # <<<<<<<<<<<<<<
 *         except TypeError:
 *             return NotImplemented
*/
          __Pyx_XDECREF(__pyx_r);
          __pyx_t_5 = ((PyObject *)__pyx_v_self);
          __Pyx_INCREF(__pyx_t_5);
          __pyx_t_6 = 0;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_other};
            __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_equals, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
            if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 1689, __pyx_L3_error)
            __Pyx_GOTREF(__pyx_t_4);
          }
          __pyx_r = __pyx_t_4;
          __pyx_t_4 = 0;
          goto __pyx_L7_try_return;

          /* "pyarrow/table.pxi":1688
 * 
 *     def __eq__(self, other):
 *         try:             # <<<<<<<<<<<<<<
 *             return self.equals(other)
 *         except TypeError:
*/
        }
        __pyx_L3_error:;
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

        /* "pyarrow/table.pxi":1690
 *         try:
 *             return self.equals(other)
 *         except TypeError:             # <<<<<<<<<<<<<<
 *             return NotImplemented
 * 
*/
        __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_TypeError))));
        if (__pyx_t_7) {
          __Pyx_AddTraceback("pyarrow.lib._Tabular.__eq__", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_8) < 0) __PYX_ERR(17, 1690, __pyx_L5_except_error)
          __Pyx_XGOTREF(__pyx_t_4);
          __Pyx_XGOTREF(__pyx_t_5);
          __Pyx_XGOTREF(__pyx_t_8);

          /* "pyarrow/table.pxi":1691
 *             return self.equals(other)
 *         except TypeError:
 *             return NotImplemented             # <<<<<<<<<<<<<<
 * 
 *     def __getitem__(self, key):
*/
          __Pyx_XDECREF(__pyx_r);
          __Pyx_INCREF(__pyx_builtin_NotImplemented);
          __pyx_r = __pyx_builtin_NotImplemented;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          goto __pyx_L6_except_return;
        }
        goto __pyx_L5_except_error;

        /* "pyarrow/table.pxi":1688
 * 
 *     def __eq__(self, other):
 *         try:             # <<<<<<<<<<<<<<
 *             return self.equals(other)
 *         except TypeError:
*/
        __pyx_L5_except_error:;
        __Pyx_XGIVEREF(__pyx_t_1);
        __Pyx_XGIVEREF(__pyx_t_2);
        __Pyx_XGIVEREF(__pyx_t_3);
        __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
        goto __pyx_L1_error;
        __pyx_L7_try_return:;
        __Pyx_XGIVEREF(__pyx_t_1);
        __Pyx_XGIVEREF(__pyx_t_2);
        __Pyx_XGIVEREF(__pyx_t_3);
        __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
        goto __pyx_L0;
        __pyx_L6_except_return:;
        __Pyx_XGIVEREF(__pyx_t_1);
        __Pyx_XGIVEREF(__pyx_t_2);
        __Pyx_XGIVEREF(__pyx_t_3);
        __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
        goto __pyx_L0;
      }

      /* "pyarrow/table.pxi":1687
 *         return _PyArrowDataFrame(self, nan_as_null, allow_copy)
 * 
 *     def __eq__(self, other):             # <<<<<<<<<<<<<<
 *         try:
 *             return self.equals(other)
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_8);
      __Pyx_AddTraceback("pyarrow.lib._Tabular.__eq__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/table.pxi":1693
 *             return NotImplemented
 * 
 *     def __getitem__(self, key):             # <<<<<<<<<<<<<<
 *         """
 *         Slice or return column at given index or column name
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_8_Tabular_9__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_8_Tabular_8__getitem__, "_Tabular.__getitem__(self, key)\n\nSlice or return column at given index or column name\n\nParameters\n----------\nkey : integer, str, or slice\n    Slices with step not equal to 1 (or None) will produce a copy\n    rather than a zero-copy view\n\nReturns\n-------\nArray (from RecordBatch) or ChunkedArray (from Table) for column input.\nRecordBatch or Table for slice input.");
    #if CYTHON_UPDATE_DESCRIPTOR_DOC
    struct wrapperbase __pyx_wrapperbase_7pyarrow_3lib_8_Tabular_8__getitem__;
    #endif
    static PyObject *__pyx_pw_7pyarrow_3lib_8_Tabular_9__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_8_Tabular_8__getitem__(((struct __pyx_obj_7pyarrow_3lib__Tabular *)__pyx_v_self), ((PyObject *)__pyx_v_key));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_8_Tabular_8__getitem__(struct __pyx_obj_7pyarrow_3lib__Tabular *__pyx_v_self, PyObject *__pyx_v_key) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      int __pyx_t_1;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      size_t __pyx_t_5;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__getitem__", 0);

      /* "pyarrow/table.pxi":1708
 *         RecordBatch or Table for slice input.
 *         """
 *         if isinstance(key, slice):             # <<<<<<<<<<<<<<
 *             return _normalize_slice(self, key)
 * 
*/
      __pyx_t_1 = PySlice_Check(__pyx_v_key); 
      if (__pyx_t_1) {

        /* "pyarrow/table.pxi":1709
 *         """
 *         if isinstance(key, slice):
 *             return _normalize_slice(self, key)             # <<<<<<<<<<<<<<
 * 
 *         return self.column(key)
*/
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_normalize_slice); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 1709, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[3] = {__pyx_t_3, ((PyObject *)__pyx_v_self), __pyx_v_key};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 1709, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        goto __pyx_L0;

        /* "pyarrow/table.pxi":1708
 *         RecordBatch or Table for slice input.
 *         """
 *         if isinstance(key, slice):             # <<<<<<<<<<<<<<
 *             return _normalize_slice(self, key)
 * 
*/
      }

      /* "pyarrow/table.pxi":1711
 *             return _normalize_slice(self, key)
 * 
 *         return self.column(key)             # <<<<<<<<<<<<<<
 * 
 *     def __len__(self):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_4 = ((PyObject *)__pyx_v_self);
      __Pyx_INCREF(__pyx_t_4);
      __pyx_t_5 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_key};
        __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_column, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 1711, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
      }
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;

      /* "pyarrow/table.pxi":1693
 *             return NotImplemented
 * 
 *     def __getitem__(self, key):             # <<<<<<<<<<<<<<
 *         """
 *         Slice or return column at given index or column name
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_AddTraceback("pyarrow.lib._Tabular.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/table.pxi":1713
 *         return self.column(key)
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self.num_rows
 * 
*/

    /* Python wrapper */
    static Py_ssize_t __pyx_pw_7pyarrow_3lib_8_Tabular_11__len__(PyObject *__pyx_v_self); /*proto*/
    static Py_ssize_t __pyx_pw_7pyarrow_3lib_8_Tabular_11__len__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      Py_ssize_t __pyx_r;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_8_Tabular_10__len__(((struct __pyx_obj_7pyarrow_3lib__Tabular *)__pyx_v_self));

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

    static Py_ssize_t __pyx_pf_7pyarrow_3lib_8_Tabular_10__len__(struct __pyx_obj_7pyarrow_3lib__Tabular *__pyx_v_self) {
      Py_ssize_t __pyx_r;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      Py_ssize_t __pyx_t_2;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__len__", 0);

      /* "pyarrow/table.pxi":1714
 * 
 *     def __len__(self):
 *         return self.num_rows             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
*/
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_num_rows); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 1714, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(17, 1714, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_r = __pyx_t_2;
      goto __pyx_L0;

      /* "pyarrow/table.pxi":1713
 *         return self.column(key)
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self.num_rows
 * 
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("pyarrow.lib._Tabular.__len__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = -1;
      __pyx_L0:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/table.pxi":1716
 *         return self.num_rows
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if not self._is_initialized():
 *             raise ValueError("This object's internal pointer is NULL, do not "
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_8_Tabular_13__repr__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_8_Tabular_13__repr__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_8_Tabular_12__repr__(((struct __pyx_obj_7pyarrow_3lib__Tabular *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_8_Tabular_12__repr__(struct __pyx_obj_7pyarrow_3lib__Tabular *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      size_t __pyx_t_3;
      int __pyx_t_4;
      int __pyx_t_5;
      PyObject *__pyx_t_6 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__repr__", 0);

      /* "pyarrow/table.pxi":1717
 * 
 *     def __repr__(self):
 *         if not self._is_initialized():             # <<<<<<<<<<<<<<
 *             raise ValueError("This object's internal pointer is NULL, do not "
 *                              "use any methods or attributes on this object")
*/
      __pyx_t_2 = ((PyObject *)__pyx_v_self);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_3 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_is_initialized, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 1717, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(17, 1717, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_5 = (!__pyx_t_4);
      if (unlikely(__pyx_t_5)) {

        /* "pyarrow/table.pxi":1718
 *     def __repr__(self):
 *         if not self._is_initialized():
 *             raise ValueError("This object's internal pointer is NULL, do not "             # <<<<<<<<<<<<<<
 *                              "use any methods or attributes on this object")
 *         return self.to_string(preview_cols=10)
*/
        __pyx_t_2 = NULL;
        __pyx_t_3 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_This_object_s_internal_pointer_i};
          __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 1718, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
        }
        __Pyx_Raise(__pyx_t_1, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __PYX_ERR(17, 1718, __pyx_L1_error)

        /* "pyarrow/table.pxi":1717
 * 
 *     def __repr__(self):
 *         if not self._is_initialized():             # <<<<<<<<<<<<<<
 *             raise ValueError("This object's internal pointer is NULL, do not "
 *                              "use any methods or attributes on this object")
*/
      }

      /* "pyarrow/table.pxi":1720
 *             raise ValueError("This object's internal pointer is NULL, do not "
 *                              "use any methods or attributes on this object")
 *         return self.to_string(preview_cols=10)             # <<<<<<<<<<<<<<
 * 
 *     def _column(self, int i):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = ((PyObject *)__pyx_v_self);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_3 = 0;
      {
        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, NULL};
        __pyx_t_6 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 1720, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_preview_cols, __pyx_mstate_global->__pyx_int_10, __pyx_t_6, __pyx_callargs+1, 0) < (0)) __PYX_ERR(17, 1720, __pyx_L1_error)
        __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_to_string, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_6);
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 1720, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/table.pxi":1716
 *         return self.num_rows
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if not self._is_initialized():
 *             raise ValueError("This object's internal pointer is NULL, do not "
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_AddTraceback("pyarrow.lib._Tabular.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/table.pxi":1722
 *         return self.to_string(preview_cols=10)
 * 
 *     def _column(self, int i):             # <<<<<<<<<<<<<<
 *         raise NotImplementedError
 * 
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_8_Tabular_15_column(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_8_Tabular_14_column, "_Tabular._column(self, int i)");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_8_Tabular_15_column = {"_column", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_8_Tabular_15_column, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_8_Tabular_14_column};
    static PyObject *__pyx_pw_7pyarrow_3lib_8_Tabular_15_column(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      CYTHON_UNUSED int __pyx_v_i;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("_column (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_i,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(17, 1722, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 1722, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_column", 0) < (0)) __PYX_ERR(17, 1722, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_column", 1, 1, 1, i); __PYX_ERR(17, 1722, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 1)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 1722, __pyx_L3_error)
        }
        __pyx_v_i = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_i == (int)-1) && PyErr_Occurred())) __PYX_ERR(17, 1722, __pyx_L3_error)
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("_column", 1, 1, 1, __pyx_nargs); __PYX_ERR(17, 1722, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib._Tabular._column", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_8_Tabular_14_column(((struct __pyx_obj_7pyarrow_3lib__Tabular *)__pyx_v_self), __pyx_v_i);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_8_Tabular_14_column(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib__Tabular *__pyx_v_self, CYTHON_UNUSED int __pyx_v_i) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("_column", 0);

      /* "pyarrow/table.pxi":1723
 * 
 *     def _column(self, int i):
 *         raise NotImplementedError             # <<<<<<<<<<<<<<
 * 
 *     def _ensure_integer_index(self, i):
*/
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_NotImplementedError))), 0, 0, 0);
      __PYX_ERR(17, 1723, __pyx_L1_error)

      /* "pyarrow/table.pxi":1722
 *         return self.to_string(preview_cols=10)
 * 
 *     def _column(self, int i):             # <<<<<<<<<<<<<<
 *         raise NotImplementedError
 * 
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_AddTraceback("pyarrow.lib._Tabular._column", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/table.pxi":1725
 *         raise NotImplementedError
 * 
 *     def _ensure_integer_index(self, i):             # <<<<<<<<<<<<<<
 *         """
 *         Ensure integer index (convert string column name to integer if needed).
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_8_Tabular_17_ensure_integer_index(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_8_Tabular_16_ensure_integer_index, "_Tabular._ensure_integer_index(self, i)\n\nEnsure integer index (convert string column name to integer if needed).");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_8_Tabular_17_ensure_integer_index = {"_ensure_integer_index", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_8_Tabular_17_ensure_integer_index, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_8_Tabular_16_ensure_integer_index};
    static PyObject *__pyx_pw_7pyarrow_3lib_8_Tabular_17_ensure_integer_index(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_i = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("_ensure_integer_index (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_i,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(17, 1725, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 1725, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_ensure_integer_index", 0) < (0)) __PYX_ERR(17, 1725, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_ensure_integer_index", 1, 1, 1, i); __PYX_ERR(17, 1725, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 1)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 1725, __pyx_L3_error)
        }
        __pyx_v_i = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("_ensure_integer_index", 1, 1, 1, __pyx_nargs); __PYX_ERR(17, 1725, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib._Tabular._ensure_integer_index", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_8_Tabular_16_ensure_integer_index(((struct __pyx_obj_7pyarrow_3lib__Tabular *)__pyx_v_self), __pyx_v_i);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_8_Tabular_16_ensure_integer_index(struct __pyx_obj_7pyarrow_3lib__Tabular *__pyx_v_self, PyObject *__pyx_v_i) {
      PyObject *__pyx_v_field_indices = NULL;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      int __pyx_t_1;
      int __pyx_t_2;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      PyObject *__pyx_t_5 = NULL;
      size_t __pyx_t_6;
      Py_ssize_t __pyx_t_7;
      PyObject *__pyx_t_8[3];
      PyObject *__pyx_t_9 = NULL;
      PyObject *__pyx_t_10[5];
      PyObject *__pyx_t_11 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("_ensure_integer_index", 0);

      /* "pyarrow/table.pxi":1729
 *         Ensure integer index (convert string column name to integer if needed).
 *         """
 *         if isinstance(i, (bytes, str)):             # <<<<<<<<<<<<<<
 *             field_indices = self.schema.get_all_field_indices(i)
 * 
*/
      __pyx_t_2 = PyBytes_Check(__pyx_v_i); 
      if (!__pyx_t_2) {
      } else {
        __pyx_t_1 = __pyx_t_2;
        goto __pyx_L4_bool_binop_done;
      }
      __pyx_t_2 = PyUnicode_Check(__pyx_v_i); 
      __pyx_t_1 = __pyx_t_2;
      __pyx_L4_bool_binop_done:;
      if (__pyx_t_1) {

        /* "pyarrow/table.pxi":1730
 *         """
 *         if isinstance(i, (bytes, str)):
 *             field_indices = self.schema.get_all_field_indices(i)             # <<<<<<<<<<<<<<
 * 
 *             if len(field_indices) == 0:
*/
        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_schema); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 1730, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_4 = __pyx_t_5;
        __Pyx_INCREF(__pyx_t_4);
        __pyx_t_6 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_i};
          __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_all_field_indices, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 1730, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        __pyx_v_field_indices = __pyx_t_3;
        __pyx_t_3 = 0;

        /* "pyarrow/table.pxi":1732
 *             field_indices = self.schema.get_all_field_indices(i)
 * 
 *             if len(field_indices) == 0:             # <<<<<<<<<<<<<<
 *                 raise KeyError(f'Field "{i}" does not exist in schema')
 *             elif len(field_indices) > 1:
*/
        __pyx_t_7 = PyObject_Length(__pyx_v_field_indices); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(17, 1732, __pyx_L1_error)
        __pyx_t_1 = (__pyx_t_7 == 0);
        if (unlikely(__pyx_t_1)) {

          /* "pyarrow/table.pxi":1733
 * 
 *             if len(field_indices) == 0:
 *                 raise KeyError(f'Field "{i}" does not exist in schema')             # <<<<<<<<<<<<<<
 *             elif len(field_indices) > 1:
 *                 raise KeyError(
*/
          __pyx_t_5 = NULL;
          __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_v_i, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 1733, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_8[0] = __pyx_mstate_global->__pyx_kp_u_Field;
          __pyx_t_8[1] = __pyx_t_4;
          __pyx_t_8[2] = __pyx_mstate_global->__pyx_kp_u_does_not_exist_in_schema_2;
          __pyx_t_9 = __Pyx_PyUnicode_Join(__pyx_t_8, 3, 7 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + 26, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4));
          if (unlikely(!__pyx_t_9)) __PYX_ERR(17, 1733, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_6 = 1;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_9};
            __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_KeyError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
            if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 1733, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
          }
          __Pyx_Raise(__pyx_t_3, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __PYX_ERR(17, 1733, __pyx_L1_error)

          /* "pyarrow/table.pxi":1732
 *             field_indices = self.schema.get_all_field_indices(i)
 * 
 *             if len(field_indices) == 0:             # <<<<<<<<<<<<<<
 *                 raise KeyError(f'Field "{i}" does not exist in schema')
 *             elif len(field_indices) > 1:
*/
        }

        /* "pyarrow/table.pxi":1734
 *             if len(field_indices) == 0:
 *                 raise KeyError(f'Field "{i}" does not exist in schema')
 *             elif len(field_indices) > 1:             # <<<<<<<<<<<<<<
 *                 raise KeyError(
 *                     f'Field "{i}" exists {len(field_indices)} times in schema')
*/
        __pyx_t_7 = PyObject_Length(__pyx_v_field_indices); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(17, 1734, __pyx_L1_error)
        __pyx_t_1 = (__pyx_t_7 > 1);
        if (unlikely(__pyx_t_1)) {

          /* "pyarrow/table.pxi":1735
 *                 raise KeyError(f'Field "{i}" does not exist in schema')
 *             elif len(field_indices) > 1:
 *                 raise KeyError(             # <<<<<<<<<<<<<<
 *                     f'Field "{i}" exists {len(field_indices)} times in schema')
 *             else:
*/
          __pyx_t_9 = NULL;

          /* "pyarrow/table.pxi":1736
 *             elif len(field_indices) > 1:
 *                 raise KeyError(
 *                     f'Field "{i}" exists {len(field_indices)} times in schema')             # <<<<<<<<<<<<<<
 *             else:
 *                 return field_indices[0]
*/
          __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_v_i, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 1736, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_7 = PyObject_Length(__pyx_v_field_indices); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(17, 1736, __pyx_L1_error)
          __pyx_t_4 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_t_7, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 1736, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_10[0] = __pyx_mstate_global->__pyx_kp_u_Field;
          __pyx_t_10[1] = __pyx_t_5;
          __pyx_t_10[2] = __pyx_mstate_global->__pyx_kp_u_exists;
          __pyx_t_10[3] = __pyx_t_4;
          __pyx_t_10[4] = __pyx_mstate_global->__pyx_kp_u_times_in_schema;
          __pyx_t_11 = __Pyx_PyUnicode_Join(__pyx_t_10, 5, 7 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + 9 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + 16, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5));
          if (unlikely(!__pyx_t_11)) __PYX_ERR(17, 1736, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_11);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_6 = 1;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_11};
            __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_KeyError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
            if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 1735, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
          }
          __Pyx_Raise(__pyx_t_3, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __PYX_ERR(17, 1735, __pyx_L1_error)

          /* "pyarrow/table.pxi":1734
 *             if len(field_indices) == 0:
 *                 raise KeyError(f'Field "{i}" does not exist in schema')
 *             elif len(field_indices) > 1:             # <<<<<<<<<<<<<<
 *                 raise KeyError(
 *                     f'Field "{i}" exists {len(field_indices)} times in schema')
*/
        }

        /* "pyarrow/table.pxi":1738
 *                     f'Field "{i}" exists {len(field_indices)} times in schema')
 *             else:
 *                 return field_indices[0]             # <<<<<<<<<<<<<<
 *         elif isinstance(i, int):
 *             return i
*/
        /*else*/ {
          __Pyx_XDECREF(__pyx_r);
          if (unlikely(__pyx_v_field_indices == Py_None)) {
            PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
            __PYX_ERR(17, 1738, __pyx_L1_error)
          }
          __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_field_indices, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 1738, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_r = __pyx_t_3;
          __pyx_t_3 = 0;
          goto __pyx_L0;
        }

        /* "pyarrow/table.pxi":1729
 *         Ensure integer index (convert string column name to integer if needed).
 *         """
 *         if isinstance(i, (bytes, str)):             # <<<<<<<<<<<<<<
 *             field_indices = self.schema.get_all_field_indices(i)
 * 
*/
      }

      /* "pyarrow/table.pxi":1739
 *             else:
 *                 return field_indices[0]
 *         elif isinstance(i, int):             # <<<<<<<<<<<<<<
 *             return i
 *         else:
*/
      __pyx_t_1 = PyLong_Check(__pyx_v_i); 
      if (likely(__pyx_t_1)) {

        /* "pyarrow/table.pxi":1740
 *                 return field_indices[0]
 *         elif isinstance(i, int):
 *             return i             # <<<<<<<<<<<<<<
 *         else:
 *             raise TypeError("Index must either be string or integer")
*/
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_v_i);
        __pyx_r = __pyx_v_i;
        goto __pyx_L0;

        /* "pyarrow/table.pxi":1739
 *             else:
 *                 return field_indices[0]
 *         elif isinstance(i, int):             # <<<<<<<<<<<<<<
 *             return i
 *         else:
*/
      }

      /* "pyarrow/table.pxi":1742
 *             return i
 *         else:
 *             raise TypeError("Index must either be string or integer")             # <<<<<<<<<<<<<<
 * 
 *     def _is_initialized(self):
*/
      /*else*/ {
        __pyx_t_11 = NULL;
        __pyx_t_6 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_mstate_global->__pyx_kp_u_Index_must_either_be_string_or_i};
          __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 1742, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        __Pyx_Raise(__pyx_t_3, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __PYX_ERR(17, 1742, __pyx_L1_error)
      }

      /* "pyarrow/table.pxi":1725
 *         raise NotImplementedError
 * 
 *     def _ensure_integer_index(self, i):             # <<<<<<<<<<<<<<
 *         """
 *         Ensure integer index (convert string column name to integer if needed).
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_9);
      __Pyx_XDECREF(__pyx_t_11);
      __Pyx_AddTraceback("pyarrow.lib._Tabular._ensure_integer_index", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_field_indices);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/table.pxi":1744
 *             raise TypeError("Index must either be string or integer")
 * 
 *     def _is_initialized(self):             # <<<<<<<<<<<<<<
 *         raise NotImplementedError
 * 
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_8_Tabular_19_is_initialized(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_8_Tabular_18_is_initialized, "_Tabular._is_initialized(self)");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_8_Tabular_19_is_initialized = {"_is_initialized", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_8_Tabular_19_is_initialized, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_8_Tabular_18_is_initialized};
    static PyObject *__pyx_pw_7pyarrow_3lib_8_Tabular_19_is_initialized(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("_is_initialized (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("_is_initialized", 1, 0, 0, __pyx_nargs); return NULL; }
      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
      if (unlikely(__pyx_kwds_len < 0)) return NULL;
      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("_is_initialized", __pyx_kwds); return NULL;}
      __pyx_r = __pyx_pf_7pyarrow_3lib_8_Tabular_18_is_initialized(((struct __pyx_obj_7pyarrow_3lib__Tabular *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_8_Tabular_18_is_initialized(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib__Tabular *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("_is_initialized", 0);

      /* "pyarrow/table.pxi":1745
 * 
 *     def _is_initialized(self):
 *         raise NotImplementedError             # <<<<<<<<<<<<<<
 * 
 *     def column(self, i):
*/
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_NotImplementedError))), 0, 0, 0);
      __PYX_ERR(17, 1745, __pyx_L1_error)

      /* "pyarrow/table.pxi":1744
 *             raise TypeError("Index must either be string or integer")
 * 
 *     def _is_initialized(self):             # <<<<<<<<<<<<<<
 *         raise NotImplementedError
 * 
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_AddTraceback("pyarrow.lib._Tabular._is_initialized", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/table.pxi":1747
 *         raise NotImplementedError
 * 
 *     def column(self, i):             # <<<<<<<<<<<<<<
 *         """
 *         Select single column from Table or RecordBatch.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_8_Tabular_21column(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_8_Tabular_20column, "_Tabular.column(self, i)\n\nSelect single column from Table or RecordBatch.\n\nParameters\n----------\ni : int or string\n    The index or name of the column to retrieve.\n\nReturns\n-------\ncolumn : Array (for RecordBatch) or ChunkedArray (for Table)\n\nExamples\n--------\nTable (works similarly for RecordBatch)\n\n>>> import pyarrow as pa\n>>> import pandas as pd\n>>> df = pd.DataFrame({'n_legs': [2, 4, 5, 100],\n...                    'animals': [\"Flamingo\", \"Horse\", \"Brittle stars\", \"Centipede\"]})\n>>> table = pa.Table.from_pandas(df)\n\nSelect a column by numeric index:\n\n>>> table.column(0)\n<pyarrow.lib.ChunkedArray object at ...>\n[\n  [\n    2,\n    4,\n    5,\n    100\n  ]\n]\n\nSelect a column by its name:\n\n>>> table.column(\"animals\")\n<pyarrow.lib.ChunkedArray object at ...>\n[\n  [\n    \"Flamingo\",\n    \"Horse\",\n    \"Brittle stars\",\n    \"Centipede\"\n  ]\n]");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_8_Tabular_21column = {"column", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_8_Tabular_21column, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_8_Tabular_20column};
    static PyObject *__pyx_pw_7pyarrow_3lib_8_Tabular_21column(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_i = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("column (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_i,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(17, 1747, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 1747, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "column", 0) < (0)) __PYX_ERR(17, 1747, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("column", 1, 1, 1, i); __PYX_ERR(17, 1747, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 1)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 1747, __pyx_L3_error)
        }
        __pyx_v_i = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("column", 1, 1, 1, __pyx_nargs); __PYX_ERR(17, 1747, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib._Tabular.column", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_8_Tabular_20column(((struct __pyx_obj_7pyarrow_3lib__Tabular *)__pyx_v_self), __pyx_v_i);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_8_Tabular_20column(struct __pyx_obj_7pyarrow_3lib__Tabular *__pyx_v_self, PyObject *__pyx_v_i) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      size_t __pyx_t_5;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("column", 0);

      /* "pyarrow/table.pxi":1796
 *         ]
 *         """
 *         return self._column(self._ensure_integer_index(i))             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = ((PyObject *)__pyx_v_self);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_4 = ((PyObject *)__pyx_v_self);
      __Pyx_INCREF(__pyx_t_4);
      __pyx_t_5 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_i};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_ensure_integer_index, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 1796, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      __pyx_t_5 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_column_2, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 1796, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/table.pxi":1747
 *         raise NotImplementedError
 * 
 *     def column(self, i):             # <<<<<<<<<<<<<<
 *         """
 *         Select single column from Table or RecordBatch.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_AddTraceback("pyarrow.lib._Tabular.column", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/table.pxi":1798
 *         return self._column(self._ensure_integer_index(i))
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def column_names(self):
 *         """
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_8_Tabular_12column_names_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_8_Tabular_12column_names_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_8_Tabular_12column_names___get__(((struct __pyx_obj_7pyarrow_3lib__Tabular *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_8_Tabular_12column_names___get__(struct __pyx_obj_7pyarrow_3lib__Tabular *__pyx_v_self) {
      PyObject *__pyx_9genexpr22__pyx_v_i = NULL;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      size_t __pyx_t_5;
      PyObject *(*__pyx_t_6)(PyObject *);
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__get__", 0);

      /* "pyarrow/table.pxi":1818
 *         ['n_legs', 'animals']
 *         """
 *         return [self.field(i).name for i in range(self.num_columns)]             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
      __Pyx_XDECREF(__pyx_r);
      { /* enter inner scope */
        __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 1818, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_3 = NULL;
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_num_columns); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 1818, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_5 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(&PyRange_Type), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 1818, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __pyx_t_4 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 1818, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_6 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 1818, __pyx_L5_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        for (;;) {
          {
            __pyx_t_2 = __pyx_t_6(__pyx_t_4);
            if (unlikely(!__pyx_t_2)) {
              PyObject* exc_type = PyErr_Occurred();
              if (exc_type) {
                if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(17, 1818, __pyx_L5_error)
                PyErr_Clear();
              }
              break;
            }
          }
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_XDECREF_SET(__pyx_9genexpr22__pyx_v_i, __pyx_t_2);
          __pyx_t_2 = 0;
          __pyx_t_3 = ((PyObject *)__pyx_v_self);
          __Pyx_INCREF(__pyx_t_3);
          __pyx_t_5 = 0;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_9genexpr22__pyx_v_i};
            __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_field, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 1818, __pyx_L5_error)
            __Pyx_GOTREF(__pyx_t_2);
          }
          __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 1818, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_3))) __PYX_ERR(17, 1818, __pyx_L5_error)
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_XDECREF(__pyx_9genexpr22__pyx_v_i); __pyx_9genexpr22__pyx_v_i = 0;
        goto __pyx_L9_exit_scope;
        __pyx_L5_error:;
        __Pyx_XDECREF(__pyx_9genexpr22__pyx_v_i); __pyx_9genexpr22__pyx_v_i = 0;
        goto __pyx_L1_error;
        __pyx_L9_exit_scope:;
      } /* exit inner scope */
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/table.pxi":1798
 *         return self._column(self._ensure_integer_index(i))
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def column_names(self):
 *         """
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_AddTraceback("pyarrow.lib._Tabular.column_names.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_9genexpr22__pyx_v_i);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/table.pxi":1820
 *         return [self.field(i).name for i in range(self.num_columns)]
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def columns(self):
 *         """
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_8_Tabular_7columns_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_8_Tabular_7columns_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_8_Tabular_7columns___get__(((struct __pyx_obj_7pyarrow_3lib__Tabular *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_8_Tabular_7columns___get__(struct __pyx_obj_7pyarrow_3lib__Tabular *__pyx_v_self) {
      PyObject *__pyx_9genexpr23__pyx_v_i = NULL;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      size_t __pyx_t_5;
      PyObject *(*__pyx_t_6)(PyObject *);
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__get__", 0);

      /* "pyarrow/table.pxi":1857
 *         ]]
 *         """
 *         return [self._column(i) for i in range(self.num_columns)]             # <<<<<<<<<<<<<<
 * 
 *     def drop_null(self):
*/
      __Pyx_XDECREF(__pyx_r);
      { /* enter inner scope */
        __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 1857, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_3 = NULL;
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_num_columns); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 1857, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_5 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(&PyRange_Type), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 1857, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __pyx_t_4 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 1857, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_6 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 1857, __pyx_L5_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        for (;;) {
          {
            __pyx_t_2 = __pyx_t_6(__pyx_t_4);
            if (unlikely(!__pyx_t_2)) {
              PyObject* exc_type = PyErr_Occurred();
              if (exc_type) {
                if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(17, 1857, __pyx_L5_error)
                PyErr_Clear();
              }
              break;
            }
          }
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_XDECREF_SET(__pyx_9genexpr23__pyx_v_i, __pyx_t_2);
          __pyx_t_2 = 0;
          __pyx_t_3 = ((PyObject *)__pyx_v_self);
          __Pyx_INCREF(__pyx_t_3);
          __pyx_t_5 = 0;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_9genexpr23__pyx_v_i};
            __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_column_2, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 1857, __pyx_L5_error)
            __Pyx_GOTREF(__pyx_t_2);
          }
          if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) __PYX_ERR(17, 1857, __pyx_L5_error)
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_XDECREF(__pyx_9genexpr23__pyx_v_i); __pyx_9genexpr23__pyx_v_i = 0;
        goto __pyx_L9_exit_scope;
        __pyx_L5_error:;
        __Pyx_XDECREF(__pyx_9genexpr23__pyx_v_i); __pyx_9genexpr23__pyx_v_i = 0;
        goto __pyx_L1_error;
        __pyx_L9_exit_scope:;
      } /* exit inner scope */
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/table.pxi":1820
 *         return [self.field(i).name for i in range(self.num_columns)]
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def columns(self):
 *         """
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_AddTraceback("pyarrow.lib._Tabular.columns.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_9genexpr23__pyx_v_i);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/table.pxi":1859
 *         return [self._column(i) for i in range(self.num_columns)]
 * 
 *     def drop_null(self):             # <<<<<<<<<<<<<<
 *         """
 *         Remove rows that contain missing values from a Table or RecordBatch.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_8_Tabular_23drop_null(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_8_Tabular_22drop_null, "_Tabular.drop_null(self)\n\nRemove rows that contain missing values from a Table or RecordBatch.\n\nSee :func:`pyarrow.compute.drop_null` for full usage.\n\nReturns\n-------\nTable or RecordBatch\n    A tabular object with the same schema, with rows containing\n    no missing values.\n\nExamples\n--------\nTable (works similarly for RecordBatch)\n\n>>> import pyarrow as pa\n>>> import pandas as pd\n>>> df = pd.DataFrame({'year': [None, 2022, 2019, 2021],\n...                   'n_legs': [2, 4, 5, 100],\n...                   'animals': [\"Flamingo\", \"Horse\", None, \"Centipede\"]})\n>>> table = pa.Table.from_pandas(df)\n>>> table.drop_null()\npyarrow.Table\nyear: double\nn_legs: int64\nanimals: string\n----\nyear: [[2022,2021]]\nn_legs: [[4,100]]\nanimals: [[\"Horse\",\"Centipede\"]]");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_8_Tabular_23drop_null = {"drop_null", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_8_Tabular_23drop_null, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_8_Tabular_22drop_null};
    static PyObject *__pyx_pw_7pyarrow_3lib_8_Tabular_23drop_null(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("drop_null (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("drop_null", 1, 0, 0, __pyx_nargs); return NULL; }
      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
      if (unlikely(__pyx_kwds_len < 0)) return NULL;
      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("drop_null", __pyx_kwds); return NULL;}
      __pyx_r = __pyx_pf_7pyarrow_3lib_8_Tabular_22drop_null(((struct __pyx_obj_7pyarrow_3lib__Tabular *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_8_Tabular_22drop_null(struct __pyx_obj_7pyarrow_3lib__Tabular *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      PyObject *__pyx_t_5 = NULL;
      size_t __pyx_t_6;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("drop_null", 0);

      /* "pyarrow/table.pxi":1891
 *         animals: [["Horse","Centipede"]]
 *         """
 *         self._assert_cpu()             # <<<<<<<<<<<<<<
 *         return _pc().drop_null(self)
 * 
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_assert_cpu");
        __PYX_ERR(17, 1891, __pyx_L1_error)
      }
      ((struct __pyx_vtabstruct_7pyarrow_3lib__Tabular *)__pyx_v_self->__pyx_vtab)->_assert_cpu(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(17, 1891, __pyx_L1_error)

      /* "pyarrow/table.pxi":1892
 *         """
 *         self._assert_cpu()
 *         return _pc().drop_null(self)             # <<<<<<<<<<<<<<
 * 
 *     def field(self, i):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_4 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pc_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 1892, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
        assert(__pyx_t_4);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
        __pyx_t_6 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
        __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 1892, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      __pyx_t_2 = __pyx_t_3;
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_6 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, ((PyObject *)__pyx_v_self)};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_drop_null, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 1892, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/table.pxi":1859
 *         return [self._column(i) for i in range(self.num_columns)]
 * 
 *     def drop_null(self):             # <<<<<<<<<<<<<<
 *         """
 *         Remove rows that contain missing values from a Table or RecordBatch.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_AddTraceback("pyarrow.lib._Tabular.drop_null", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/table.pxi":1894
 *         return _pc().drop_null(self)
 * 
 *     def field(self, i):             # <<<<<<<<<<<<<<
 *         """
 *         Select a schema field by its column name or numeric index.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_8_Tabular_25field(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_8_Tabular_24field, "_Tabular.field(self, i)\n\nSelect a schema field by its column name or numeric index.\n\nParameters\n----------\ni : int or string\n    The index or name of the field to retrieve.\n\nReturns\n-------\nField\n\nExamples\n--------\nTable (works similarly for RecordBatch)\n\n>>> import pyarrow as pa\n>>> import pandas as pd\n>>> df = pd.DataFrame({'n_legs': [2, 4, 5, 100],\n...                    'animals': [\"Flamingo\", \"Horse\", \"Brittle stars\", \"Centipede\"]})\n>>> table = pa.Table.from_pandas(df)\n>>> table.field(0)\npyarrow.Field<n_legs: int64>\n>>> table.field(1)\npyarrow.Field<animals: string>");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_8_Tabular_25field = {"field", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_8_Tabular_25field, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_8_Tabular_24field};
    static PyObject *__pyx_pw_7pyarrow_3lib_8_Tabular_25field(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_i = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("field (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_i,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(17, 1894, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 1894, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "field", 0) < (0)) __PYX_ERR(17, 1894, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("field", 1, 1, 1, i); __PYX_ERR(17, 1894, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 1)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 1894, __pyx_L3_error)
        }
        __pyx_v_i = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("field", 1, 1, 1, __pyx_nargs); __PYX_ERR(17, 1894, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib._Tabular.field", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_8_Tabular_24field(((struct __pyx_obj_7pyarrow_3lib__Tabular *)__pyx_v_self), __pyx_v_i);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_8_Tabular_24field(struct __pyx_obj_7pyarrow_3lib__Tabular *__pyx_v_self, PyObject *__pyx_v_i) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      size_t __pyx_t_4;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("field", 0);

      /* "pyarrow/table.pxi":1921
 *         pyarrow.Field<animals: string>
 *         """
 *         return self.schema.field(i)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_schema); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 1921, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = __pyx_t_3;
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_4 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_i};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_field, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 1921, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/table.pxi":1894
 *         return _pc().drop_null(self)
 * 
 *     def field(self, i):             # <<<<<<<<<<<<<<
 *         """
 *         Select a schema field by its column name or numeric index.
*/

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

    /* "pyarrow/table.pxi":1923
 *         return self.schema.field(i)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def from_pydict(cls, mapping, schema=None, metadata=None):
 *         """
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_8_Tabular_27from_pydict(PyObject *__pyx_v_cls, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_8_Tabular_26from_pydict, "_Tabular.from_pydict(cls, mapping, schema=None, metadata=None)\n\nConstruct a Table or RecordBatch from Arrow arrays or columns.\n\nParameters\n----------\nmapping : dict or Mapping\n    A mapping of strings to Arrays or Python lists.\nschema : Schema, default None\n    If not passed, will be inferred from the Mapping values.\nmetadata : dict or Mapping, default None\n    Optional metadata for the schema (if inferred).\n\nReturns\n-------\nTable or RecordBatch\n\nExamples\n--------\nTable (works similarly for RecordBatch)\n\n>>> import pyarrow as pa\n>>> n_legs = pa.array([2, 4, 5, 100])\n>>> animals = pa.array([\"Flamingo\", \"Horse\", \"Brittle stars\", \"Centipede\"])\n>>> pydict = {'n_legs': n_legs, 'animals': animals}\n\nConstruct a Table from a dictionary of arrays:\n\n>>> pa.Table.from_pydict(pydict)\npyarrow.Table\nn_legs: int64\nanimals: string\n----\nn_legs: [[2,4,5,100]]\nanimals: [[\"Flamingo\",\"Horse\",\"Brittle stars\",\"Centipede\"]]\n>>> pa.Table.from_pydict(pydict).schema\nn_legs: int64\nanimals: string\n\nConstruct a Table from a dictionary of arrays with metadata:\n\n>>> my_metadata={\"n_legs\": \"Number of legs per animal\"}\n>>> pa.Table.from_pydict(pydict, metadata=my_metadata).schema\nn_legs: int64\nanimals: string\n-- schema metadata --\nn_legs: 'Number of legs per animal'\n\nConstruct a Table from a dictionary of arrays with pyarrow schema:\n\n>>> my_schema = pa.schema([\n...     pa.field('n_legs', pa.int64()),\n...     pa.field('animals', pa.string())],\n...     metadata={\"n_legs\": \"Number of legs per animal\"})\n>>> pa.Table.from_pydict(pydict, schema=my_schema).schema\nn_legs: int64\nanimals: string\n-- schema metadata --\nn_legs: 'Number of legs per animal'");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_8_Tabular_27from_pydict = {"from_pydict", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_8_Tabular_27from_pydict, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_8_Tabular_26from_pydict};
    static PyObject *__pyx_pw_7pyarrow_3lib_8_Tabular_27from_pydict(PyObject *__pyx_v_cls, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_mapping = 0;
      PyObject *__pyx_v_schema = 0;
      PyObject *__pyx_v_metadata = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[3] = {0,0,0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("from_pydict (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_mapping,&__pyx_mstate_global->__pyx_n_u_schema,&__pyx_mstate_global->__pyx_n_u_metadata,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(17, 1923, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  3:
            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(17, 1923, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(17, 1923, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 1923, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "from_pydict", 0) < (0)) __PYX_ERR(17, 1923, __pyx_L3_error)

          /* "pyarrow/table.pxi":1924
 * 
 *     @classmethod
 *     def from_pydict(cls, mapping, schema=None, metadata=None):             # <<<<<<<<<<<<<<
 *         """
 *         Construct a Table or RecordBatch from Arrow arrays or columns.
*/
          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
          if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("from_pydict", 0, 1, 3, i); __PYX_ERR(17, 1923, __pyx_L3_error) }
          }
        } else {
          switch (__pyx_nargs) {
            case  3:
            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(17, 1923, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(17, 1923, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 1923, __pyx_L3_error)
            break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
          if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
        }
        __pyx_v_mapping = values[0];
        __pyx_v_schema = values[1];
        __pyx_v_metadata = values[2];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("from_pydict", 0, 1, 3, __pyx_nargs); __PYX_ERR(17, 1923, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib._Tabular.from_pydict", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_8_Tabular_26from_pydict(((PyTypeObject*)__pyx_v_cls), __pyx_v_mapping, __pyx_v_schema, __pyx_v_metadata);

      /* "pyarrow/table.pxi":1923
 *         return self.schema.field(i)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def from_pydict(cls, mapping, schema=None, metadata=None):
 *         """
*/

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_8_Tabular_26from_pydict(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_mapping, PyObject *__pyx_v_schema, PyObject *__pyx_v_metadata) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      size_t __pyx_t_4;
      PyObject *__pyx_t_5 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("from_pydict", 0);

      /* "pyarrow/table.pxi":1985
 *         """
 * 
 *         return _from_pydict(cls=cls,             # <<<<<<<<<<<<<<
 *                             mapping=mapping,
 *                             schema=schema,
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_from_pydict); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 1985, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);

      /* "pyarrow/table.pxi":1988
 *                             mapping=mapping,
 *                             schema=schema,
 *                             metadata=metadata)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
*/
      __pyx_t_4 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
        assert(__pyx_t_2);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
        __pyx_t_4 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 4 : 0)] = {__pyx_t_2, NULL};
        __pyx_t_5 = __Pyx_MakeVectorcallBuilderKwds(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 1985, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_cls, ((PyObject *)__pyx_v_cls), __pyx_t_5, __pyx_callargs+1, 0) < (0)) __PYX_ERR(17, 1985, __pyx_L1_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_mapping, __pyx_v_mapping, __pyx_t_5, __pyx_callargs+1, 1) < (0)) __PYX_ERR(17, 1985, __pyx_L1_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_schema, __pyx_v_schema, __pyx_t_5, __pyx_callargs+1, 2) < (0)) __PYX_ERR(17, 1985, __pyx_L1_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_metadata, __pyx_v_metadata, __pyx_t_5, __pyx_callargs+1, 3) < (0)) __PYX_ERR(17, 1985, __pyx_L1_error)
        __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_5);
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 1985, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/table.pxi":1923
 *         return self.schema.field(i)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def from_pydict(cls, mapping, schema=None, metadata=None):
 *         """
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_AddTraceback("pyarrow.lib._Tabular.from_pydict", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/table.pxi":1990
 *                             metadata=metadata)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def from_pylist(cls, mapping, schema=None, metadata=None):
 *         """
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_8_Tabular_29from_pylist(PyObject *__pyx_v_cls, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_8_Tabular_28from_pylist, "_Tabular.from_pylist(cls, mapping, schema=None, metadata=None)\n\nConstruct a Table or RecordBatch from list of rows / dictionaries.\n\nParameters\n----------\nmapping : list of dicts of rows\n    A mapping of strings to row values.\nschema : Schema, default None\n    If not passed, will be inferred from the first row of the\n    mapping values.\nmetadata : dict or Mapping, default None\n    Optional metadata for the schema (if inferred).\n\nReturns\n-------\nTable or RecordBatch\n\nExamples\n--------\nTable (works similarly for RecordBatch)\n\n>>> import pyarrow as pa\n>>> pylist = [{'n_legs': 2, 'animals': 'Flamingo'},\n...           {'n_legs': 4, 'animals': 'Dog'}]\n\nConstruct a Table from a list of rows:\n\n>>> pa.Table.from_pylist(pylist)\npyarrow.Table\nn_legs: int64\nanimals: string\n----\nn_legs: [[2,4]]\nanimals: [[\"Flamingo\",\"Dog\"]]\n\nConstruct a Table from a list of rows with metadata:\n\n>>> my_metadata={\"n_legs\": \"Number of legs per animal\"}\n>>> pa.Table.from_pylist(pylist, metadata=my_metadata).schema\nn_legs: int64\nanimals: string\n-- schema metadata --\nn_legs: 'Number of legs per animal'\n\nConstruct a Table from a list of rows with pyarrow schema:\n\n>>> my_schema = pa.schema([\n...     pa.field('n_legs', pa.int64()),\n...     pa.field('animals', pa.string())],\n...     metadata={\"n_legs\": \"Number of legs per animal\"})\n>>> pa.Table.from_pylist(pylist, schema=my_schema).schema\nn_legs: int64\nanimals: string\n-- schema metadata --\nn_legs: 'Number of legs per animal'");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_8_Tabular_29from_pylist = {"from_pylist", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_8_Tabular_29from_pylist, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_8_Tabular_28from_pylist};
    static PyObject *__pyx_pw_7pyarrow_3lib_8_Tabular_29from_pylist(PyObject *__pyx_v_cls, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_mapping = 0;
      PyObject *__pyx_v_schema = 0;
      PyObject *__pyx_v_metadata = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[3] = {0,0,0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("from_pylist (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_mapping,&__pyx_mstate_global->__pyx_n_u_schema,&__pyx_mstate_global->__pyx_n_u_metadata,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(17, 1990, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  3:
            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(17, 1990, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(17, 1990, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 1990, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "from_pylist", 0) < (0)) __PYX_ERR(17, 1990, __pyx_L3_error)

          /* "pyarrow/table.pxi":1991
 * 
 *     @classmethod
 *     def from_pylist(cls, mapping, schema=None, metadata=None):             # <<<<<<<<<<<<<<
 *         """
 *         Construct a Table or RecordBatch from list of rows / dictionaries.
*/
          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
          if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("from_pylist", 0, 1, 3, i); __PYX_ERR(17, 1990, __pyx_L3_error) }
          }
        } else {
          switch (__pyx_nargs) {
            case  3:
            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(17, 1990, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(17, 1990, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 1990, __pyx_L3_error)
            break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
          if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
        }
        __pyx_v_mapping = values[0];
        __pyx_v_schema = values[1];
        __pyx_v_metadata = values[2];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("from_pylist", 0, 1, 3, __pyx_nargs); __PYX_ERR(17, 1990, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib._Tabular.from_pylist", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_8_Tabular_28from_pylist(((PyTypeObject*)__pyx_v_cls), __pyx_v_mapping, __pyx_v_schema, __pyx_v_metadata);

      /* "pyarrow/table.pxi":1990
 *                             metadata=metadata)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def from_pylist(cls, mapping, schema=None, metadata=None):
 *         """
*/

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_8_Tabular_28from_pylist(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_mapping, PyObject *__pyx_v_schema, PyObject *__pyx_v_metadata) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      size_t __pyx_t_4;
      PyObject *__pyx_t_5 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("from_pylist", 0);

      /* "pyarrow/table.pxi":2049
 *         """
 * 
 *         return _from_pylist(cls=cls,             # <<<<<<<<<<<<<<
 *                             mapping=mapping,
 *                             schema=schema,
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_from_pylist); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 2049, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);

      /* "pyarrow/table.pxi":2052
 *                             mapping=mapping,
 *                             schema=schema,
 *                             metadata=metadata)             # <<<<<<<<<<<<<<
 * 
 *     def itercolumns(self):
*/
      __pyx_t_4 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
        assert(__pyx_t_2);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
        __pyx_t_4 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 4 : 0)] = {__pyx_t_2, NULL};
        __pyx_t_5 = __Pyx_MakeVectorcallBuilderKwds(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 2049, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_cls, ((PyObject *)__pyx_v_cls), __pyx_t_5, __pyx_callargs+1, 0) < (0)) __PYX_ERR(17, 2049, __pyx_L1_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_mapping, __pyx_v_mapping, __pyx_t_5, __pyx_callargs+1, 1) < (0)) __PYX_ERR(17, 2049, __pyx_L1_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_schema, __pyx_v_schema, __pyx_t_5, __pyx_callargs+1, 2) < (0)) __PYX_ERR(17, 2049, __pyx_L1_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_metadata, __pyx_v_metadata, __pyx_t_5, __pyx_callargs+1, 3) < (0)) __PYX_ERR(17, 2049, __pyx_L1_error)
        __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_5);
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 2049, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/table.pxi":1990
 *                             metadata=metadata)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def from_pylist(cls, mapping, schema=None, metadata=None):
 *         """
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_AddTraceback("pyarrow.lib._Tabular.from_pylist", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }
    static PyObject *__pyx_gb_7pyarrow_3lib_8_Tabular_32generator11(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

    /* "pyarrow/table.pxi":2054
 *                             metadata=metadata)
 * 
 *     def itercolumns(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over all columns in their numerical order.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_8_Tabular_31itercolumns(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_8_Tabular_30itercolumns, "_Tabular.itercolumns(self)\n\nIterator over all columns in their numerical order.\n\nYields\n------\nArray (for RecordBatch) or ChunkedArray (for Table)\n\nExamples\n--------\nTable (works similarly for RecordBatch)\n\n>>> import pyarrow as pa\n>>> import pandas as pd\n>>> df = pd.DataFrame({'n_legs': [None, 4, 5, None],\n...                    'animals': [\"Flamingo\", \"Horse\", None, \"Centipede\"]})\n>>> table = pa.Table.from_pandas(df)\n>>> for i in table.itercolumns():\n...     print(i.null_count)\n...\n2\n1");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_8_Tabular_31itercolumns = {"itercolumns", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_8_Tabular_31itercolumns, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_8_Tabular_30itercolumns};
    static PyObject *__pyx_pw_7pyarrow_3lib_8_Tabular_31itercolumns(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("itercolumns (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("itercolumns", 1, 0, 0, __pyx_nargs); return NULL; }
      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
      if (unlikely(__pyx_kwds_len < 0)) return NULL;
      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("itercolumns", __pyx_kwds); return NULL;}
      __pyx_r = __pyx_pf_7pyarrow_3lib_8_Tabular_30itercolumns(((struct __pyx_obj_7pyarrow_3lib__Tabular *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_8_Tabular_30itercolumns(struct __pyx_obj_7pyarrow_3lib__Tabular *__pyx_v_self) {
      struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_15_itercolumns *__pyx_cur_scope;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("itercolumns", 0);
      __pyx_cur_scope = (struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_15_itercolumns *)__pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_15_itercolumns(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_15_itercolumns, __pyx_mstate_global->__pyx_empty_tuple, NULL);
      if (unlikely(!__pyx_cur_scope)) {
        __pyx_cur_scope = ((struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_15_itercolumns *)Py_None);
        __Pyx_INCREF(Py_None);
        __PYX_ERR(17, 2054, __pyx_L1_error)
      } else {
        __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
      }
      __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
      __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
      __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
      {
        __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7pyarrow_3lib_8_Tabular_32generator11, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[14]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_itercolumns, __pyx_mstate_global->__pyx_n_u_Tabular_itercolumns, __pyx_mstate_global->__pyx_n_u_pyarrow_lib); if (unlikely(!gen)) __PYX_ERR(17, 2054, __pyx_L1_error)
        __Pyx_DECREF(__pyx_cur_scope);
        __Pyx_RefNannyFinishContext();
        return (PyObject *) gen;
      }

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_AddTraceback("pyarrow.lib._Tabular.itercolumns", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __Pyx_DECREF((PyObject *)__pyx_cur_scope);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_gb_7pyarrow_3lib_8_Tabular_32generator11(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
      struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_15_itercolumns *__pyx_cur_scope = ((struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_15_itercolumns *)__pyx_generator->closure);
      PyObject *__pyx_r = NULL;
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      size_t __pyx_t_4;
      PyObject *(*__pyx_t_5)(PyObject *);
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("itercolumns", 0);
      switch (__pyx_generator->resume_label) {
        case 0: goto __pyx_L3_first_run;
        case 1: goto __pyx_L6_resume_from_yield;
        default: /* CPython raises the right error here */
        __Pyx_RefNannyFinishContext();
        return NULL;
      }
      __pyx_L3_first_run:;
      if (unlikely(__pyx_sent_value != Py_None)) {
        if (unlikely(__pyx_sent_value)) PyErr_SetString(PyExc_TypeError, "can't send non-None value to a just-started generator");
        __PYX_ERR(17, 2054, __pyx_L1_error)
      }

      /* "pyarrow/table.pxi":2077
 *         1
 *         """
 *         for i in range(self.num_columns):             # <<<<<<<<<<<<<<
 *             yield self._column(i)
 * 
*/
      __pyx_t_2 = NULL;
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_mstate_global->__pyx_n_u_num_columns); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 2077, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(&PyRange_Type), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 2077, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 2077, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 2077, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      for (;;) {
        {
          __pyx_t_1 = __pyx_t_5(__pyx_t_3);
          if (unlikely(!__pyx_t_1)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(17, 2077, __pyx_L1_error)
              PyErr_Clear();
            }
            break;
          }
        }
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_i);
        __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_i, __pyx_t_1);
        __Pyx_GIVEREF(__pyx_t_1);
        __pyx_t_1 = 0;

        /* "pyarrow/table.pxi":2078
 *         """
 *         for i in range(self.num_columns):
 *             yield self._column(i)             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
        __pyx_t_2 = ((PyObject *)__pyx_cur_scope->__pyx_v_self);
        __Pyx_INCREF(__pyx_t_2);
        __pyx_t_4 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_cur_scope->__pyx_v_i};
          __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_column_2, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 2078, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
        }
        __pyx_r = __pyx_t_1;
        __pyx_t_1 = 0;
        __Pyx_XGIVEREF(__pyx_t_3);
        __pyx_cur_scope->__pyx_t_0 = __pyx_t_3;
        __pyx_cur_scope->__pyx_t_1 = __pyx_t_5;
        __Pyx_XGIVEREF(__pyx_r);
        __Pyx_RefNannyFinishContext();
        __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
        /* return from generator, yielding value */
        __pyx_generator->resume_label = 1;
        return __pyx_r;
        __pyx_L6_resume_from_yield:;
        __pyx_t_3 = __pyx_cur_scope->__pyx_t_0;
        __pyx_cur_scope->__pyx_t_0 = 0;
        __Pyx_XGOTREF(__pyx_t_3);
        __pyx_t_5 = __pyx_cur_scope->__pyx_t_1;
        if (unlikely(!__pyx_sent_value)) __PYX_ERR(17, 2078, __pyx_L1_error)

        /* "pyarrow/table.pxi":2077
 *         1
 *         """
 *         for i in range(self.num_columns):             # <<<<<<<<<<<<<<
 *             yield self._column(i)
 * 
*/
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

      /* "pyarrow/table.pxi":2054
 *                             metadata=metadata)
 * 
 *     def itercolumns(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over all columns in their numerical order.
*/

      /* 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);
      if (__Pyx_PyErr_Occurred()) {
        __Pyx_Generator_Replace_StopIteration(0);
        __Pyx_AddTraceback("itercolumns", __pyx_clineno, __pyx_lineno, __pyx_filename);
      }
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      #if !CYTHON_USE_EXC_INFO_STACK
      __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
      #endif
      __pyx_generator->resume_label = -1;
      __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/table.pxi":2080
 *             yield self._column(i)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def num_columns(self):
 *         raise NotImplementedError
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_8_Tabular_11num_columns_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_8_Tabular_11num_columns_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_8_Tabular_11num_columns___get__(((struct __pyx_obj_7pyarrow_3lib__Tabular *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_8_Tabular_11num_columns___get__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib__Tabular *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__get__", 0);

      /* "pyarrow/table.pxi":2082
 *     @property
 *     def num_columns(self):
 *         raise NotImplementedError             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_NotImplementedError))), 0, 0, 0);
      __PYX_ERR(17, 2082, __pyx_L1_error)

      /* "pyarrow/table.pxi":2080
 *             yield self._column(i)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def num_columns(self):
 *         raise NotImplementedError
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_AddTraceback("pyarrow.lib._Tabular.num_columns.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/table.pxi":2084
 *         raise NotImplementedError
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def num_rows(self):
 *         raise NotImplementedError
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_8_Tabular_8num_rows_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_8_Tabular_8num_rows_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_8_Tabular_8num_rows___get__(((struct __pyx_obj_7pyarrow_3lib__Tabular *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_8_Tabular_8num_rows___get__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib__Tabular *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__get__", 0);

      /* "pyarrow/table.pxi":2086
 *     @property
 *     def num_rows(self):
 *         raise NotImplementedError             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_NotImplementedError))), 0, 0, 0);
      __PYX_ERR(17, 2086, __pyx_L1_error)

      /* "pyarrow/table.pxi":2084
 *         raise NotImplementedError
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def num_rows(self):
 *         raise NotImplementedError
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_AddTraceback("pyarrow.lib._Tabular.num_rows.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/table.pxi":2088
 *         raise NotImplementedError
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def shape(self):
 *         """
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_8_Tabular_5shape_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_8_Tabular_5shape_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_8_Tabular_5shape___get__(((struct __pyx_obj_7pyarrow_3lib__Tabular *)__pyx_v_self));

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

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

      /* "pyarrow/table.pxi":2106
 *         (4, 2)
 *         """
 *         return (self.num_rows, self.num_columns)             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_num_rows); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 2106, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_num_columns); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 2106, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 2106, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_1);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1) != (0)) __PYX_ERR(17, 2106, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_2);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2) != (0)) __PYX_ERR(17, 2106, __pyx_L1_error);
      __pyx_t_1 = 0;
      __pyx_t_2 = 0;
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "pyarrow/table.pxi":2088
 *         raise NotImplementedError
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def shape(self):
 *         """
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_AddTraceback("pyarrow.lib._Tabular.shape.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/table.pxi":2108
 *         return (self.num_rows, self.num_columns)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def schema(self):
 *         raise NotImplementedError
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_8_Tabular_6schema_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_8_Tabular_6schema_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_8_Tabular_6schema___get__(((struct __pyx_obj_7pyarrow_3lib__Tabular *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_8_Tabular_6schema___get__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib__Tabular *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__get__", 0);

      /* "pyarrow/table.pxi":2110
 *     @property
 *     def schema(self):
 *         raise NotImplementedError             # <<<<<<<<<<<<<<
 * 
 *     def sort_by(self, sorting, **kwargs):
*/
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_NotImplementedError))), 0, 0, 0);
      __PYX_ERR(17, 2110, __pyx_L1_error)

      /* "pyarrow/table.pxi":2108
 *         return (self.num_rows, self.num_columns)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def schema(self):
 *         raise NotImplementedError
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_AddTraceback("pyarrow.lib._Tabular.schema.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/table.pxi":2112
 *         raise NotImplementedError
 * 
 *     def sort_by(self, sorting, **kwargs):             # <<<<<<<<<<<<<<
 *         """
 *         Sort the Table or RecordBatch by one or multiple columns.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_8_Tabular_34sort_by(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_8_Tabular_33sort_by, "_Tabular.sort_by(self, sorting, **kwargs)\n\nSort the Table or RecordBatch by one or multiple columns.\n\nParameters\n----------\nsorting : str or list[tuple(name, order)]\n    Name of the column to use to sort (ascending), or\n    a list of multiple sorting conditions where\n    each entry is a tuple with column name\n    and sorting order (\"ascending\" or \"descending\")\n**kwargs : dict, optional\n    Additional sorting options.\n    As allowed by :class:`SortOptions`\n\nReturns\n-------\nTable or RecordBatch\n    A new tabular object sorted according to the sort keys.\n\nExamples\n--------\nTable (works similarly for RecordBatch)\n\n>>> import pandas as pd\n>>> import pyarrow as pa\n>>> df = pd.DataFrame({'year': [2020, 2022, 2021, 2022, 2019, 2021],\n...                    'n_legs': [2, 2, 4, 4, 5, 100],\n...                    'animal': [\"Flamingo\", \"Parrot\", \"Dog\", \"Horse\",\n...                    \"Brittle stars\", \"Centipede\"]})\n>>> table = pa.Table.from_pandas(df)\n>>> table.sort_by('animal')\npyarrow.Table\nyear: int64\nn_legs: int64\nanimal: string\n----\nyear: [[2019,2021,2021,2020,2022,2022]]\nn_legs: [[5,100,4,2,4,2]]\nanimal: [[\"Brittle stars\",\"Centipede\",\"Dog\",\"Flamingo\",\"Horse\",\"Parrot\"]]");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_8_Tabular_34sort_by = {"sort_by", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_8_Tabular_34sort_by, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_8_Tabular_33sort_by};
    static PyObject *__pyx_pw_7pyarrow_3lib_8_Tabular_34sort_by(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_sorting = 0;
      PyObject *__pyx_v_kwargs = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("sort_by (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
      __Pyx_GOTREF(__pyx_v_kwargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_sorting,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(17, 2112, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 2112, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, __pyx_v_kwargs, values, kwd_pos_args, __pyx_kwds_len, "sort_by", 1) < (0)) __PYX_ERR(17, 2112, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("sort_by", 1, 1, 1, i); __PYX_ERR(17, 2112, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 1)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 2112, __pyx_L3_error)
        }
        __pyx_v_sorting = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("sort_by", 1, 1, 1, __pyx_nargs); __PYX_ERR(17, 2112, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
      __Pyx_AddTraceback("pyarrow.lib._Tabular.sort_by", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_8_Tabular_33sort_by(((struct __pyx_obj_7pyarrow_3lib__Tabular *)__pyx_v_self), __pyx_v_sorting, __pyx_v_kwargs);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_DECREF(__pyx_v_kwargs);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_8_Tabular_33sort_by(struct __pyx_obj_7pyarrow_3lib__Tabular *__pyx_v_self, PyObject *__pyx_v_sorting, PyObject *__pyx_v_kwargs) {
      PyObject *__pyx_v_indices = NULL;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      int __pyx_t_1;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      PyObject *__pyx_t_5 = NULL;
      PyObject *__pyx_t_6 = NULL;
      size_t __pyx_t_7;
      PyObject *__pyx_t_8 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("sort_by", 0);
      __Pyx_INCREF(__pyx_v_sorting);

      /* "pyarrow/table.pxi":2153
 *         animal: [["Brittle stars","Centipede","Dog","Flamingo","Horse","Parrot"]]
 *         """
 *         self._assert_cpu()             # <<<<<<<<<<<<<<
 *         if isinstance(sorting, str):
 *             sorting = [(sorting, "ascending")]
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_assert_cpu");
        __PYX_ERR(17, 2153, __pyx_L1_error)
      }
      ((struct __pyx_vtabstruct_7pyarrow_3lib__Tabular *)__pyx_v_self->__pyx_vtab)->_assert_cpu(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(17, 2153, __pyx_L1_error)

      /* "pyarrow/table.pxi":2154
 *         """
 *         self._assert_cpu()
 *         if isinstance(sorting, str):             # <<<<<<<<<<<<<<
 *             sorting = [(sorting, "ascending")]
 * 
*/
      __pyx_t_1 = PyUnicode_Check(__pyx_v_sorting); 
      if (__pyx_t_1) {

        /* "pyarrow/table.pxi":2155
 *         self._assert_cpu()
 *         if isinstance(sorting, str):
 *             sorting = [(sorting, "ascending")]             # <<<<<<<<<<<<<<
 * 
 *         indices = _pc().sort_indices(
*/
        __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 2155, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_INCREF(__pyx_v_sorting);
        __Pyx_GIVEREF(__pyx_v_sorting);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_sorting) != (0)) __PYX_ERR(17, 2155, __pyx_L1_error);
        __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_ascending);
        __Pyx_GIVEREF(__pyx_mstate_global->__pyx_n_u_ascending);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_mstate_global->__pyx_n_u_ascending) != (0)) __PYX_ERR(17, 2155, __pyx_L1_error);
        __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 2155, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_GIVEREF(__pyx_t_2);
        if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2) != (0)) __PYX_ERR(17, 2155, __pyx_L1_error);
        __pyx_t_2 = 0;
        __Pyx_DECREF_SET(__pyx_v_sorting, __pyx_t_3);
        __pyx_t_3 = 0;

        /* "pyarrow/table.pxi":2154
 *         """
 *         self._assert_cpu()
 *         if isinstance(sorting, str):             # <<<<<<<<<<<<<<
 *             sorting = [(sorting, "ascending")]
 * 
*/
      }

      /* "pyarrow/table.pxi":2157
 *             sorting = [(sorting, "ascending")]
 * 
 *         indices = _pc().sort_indices(             # <<<<<<<<<<<<<<
 *             self,
 *             options=_pc().SortOptions(sort_keys=sorting, **kwargs)
*/
      __pyx_t_5 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_pc_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 2157, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
        assert(__pyx_t_5);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
        __pyx_t_7 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
        __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 2157, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
      }
      __pyx_t_2 = __pyx_t_4;
      __Pyx_INCREF(__pyx_t_2);

      /* "pyarrow/table.pxi":2159
 *         indices = _pc().sort_indices(
 *             self,
 *             options=_pc().SortOptions(sort_keys=sorting, **kwargs)             # <<<<<<<<<<<<<<
 *         )
 *         return self.take(indices)
*/
      __pyx_t_5 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_pc_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(17, 2159, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_7 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_8))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_8);
        assert(__pyx_t_5);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_8, __pyx__function);
        __pyx_t_7 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
        __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 2159, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
      }
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_SortOptions); if (unlikely(!__pyx_t_8)) __PYX_ERR(17, 2159, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 2159, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_sort_keys, __pyx_v_sorting) < (0)) __PYX_ERR(17, 2159, __pyx_L1_error)
      __pyx_t_6 = __pyx_t_5;
      __pyx_t_5 = 0;
      if (__Pyx_MergeKeywords(__pyx_t_6, __pyx_v_kwargs) < (0)) __PYX_ERR(17, 2159, __pyx_L1_error)
      __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_mstate_global->__pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 2159, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, ((PyObject *)__pyx_v_self)};
        __pyx_t_6 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 2157, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_options, __pyx_t_5, __pyx_t_6, __pyx_callargs+2, 0) < (0)) __PYX_ERR(17, 2157, __pyx_L1_error)
        __pyx_t_3 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_sort_indices, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_6);
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 2157, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      __pyx_v_indices = __pyx_t_3;
      __pyx_t_3 = 0;

      /* "pyarrow/table.pxi":2161
 *             options=_pc().SortOptions(sort_keys=sorting, **kwargs)
 *         )
 *         return self.take(indices)             # <<<<<<<<<<<<<<
 * 
 *     def take(self, object indices):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_4 = ((PyObject *)__pyx_v_self);
      __Pyx_INCREF(__pyx_t_4);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_indices};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_take, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 2161, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "pyarrow/table.pxi":2112
 *         raise NotImplementedError
 * 
 *     def sort_by(self, sorting, **kwargs):             # <<<<<<<<<<<<<<
 *         """
 *         Sort the Table or RecordBatch by one or multiple columns.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_8);
      __Pyx_AddTraceback("pyarrow.lib._Tabular.sort_by", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_indices);
      __Pyx_XDECREF(__pyx_v_sorting);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/table.pxi":2163
 *         return self.take(indices)
 * 
 *     def take(self, object indices):             # <<<<<<<<<<<<<<
 *         """
 *         Select rows from a Table or RecordBatch.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_8_Tabular_36take(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_8_Tabular_35take, "_Tabular.take(self, indices)\n\nSelect rows from a Table or RecordBatch.\n\nSee :func:`pyarrow.compute.take` for full usage.\n\nParameters\n----------\nindices : Array or array-like\n    The indices in the tabular object whose rows will be returned.\n\nReturns\n-------\nTable or RecordBatch\n    A tabular object with the same schema, containing the taken rows.\n\nExamples\n--------\nTable (works similarly for RecordBatch)\n\n>>> import pyarrow as pa\n>>> import pandas as pd\n>>> df = pd.DataFrame({'year': [2020, 2022, 2019, 2021],\n...                    'n_legs': [2, 4, 5, 100],\n...                    'animals': [\"Flamingo\", \"Horse\", \"Brittle stars\", \"Centipede\"]})\n>>> table = pa.Table.from_pandas(df)\n>>> table.take([1,3])\npyarrow.Table\nyear: int64\nn_legs: int64\nanimals: string\n----\nyear: [[2022,2021]]\nn_legs: [[4,100]]\nanimals: [[\"Horse\",\"Centipede\"]]");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_8_Tabular_36take = {"take", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_8_Tabular_36take, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_8_Tabular_35take};
    static PyObject *__pyx_pw_7pyarrow_3lib_8_Tabular_36take(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_indices = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("take (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_indices,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(17, 2163, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 2163, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "take", 0) < (0)) __PYX_ERR(17, 2163, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("take", 1, 1, 1, i); __PYX_ERR(17, 2163, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 1)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 2163, __pyx_L3_error)
        }
        __pyx_v_indices = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("take", 1, 1, 1, __pyx_nargs); __PYX_ERR(17, 2163, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib._Tabular.take", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_8_Tabular_35take(((struct __pyx_obj_7pyarrow_3lib__Tabular *)__pyx_v_self), __pyx_v_indices);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_8_Tabular_35take(struct __pyx_obj_7pyarrow_3lib__Tabular *__pyx_v_self, PyObject *__pyx_v_indices) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      PyObject *__pyx_t_5 = NULL;
      size_t __pyx_t_6;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("take", 0);

      /* "pyarrow/table.pxi":2199
 *         animals: [["Horse","Centipede"]]
 *         """
 *         self._assert_cpu()             # <<<<<<<<<<<<<<
 *         return _pc().take(self, indices)
 * 
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_assert_cpu");
        __PYX_ERR(17, 2199, __pyx_L1_error)
      }
      ((struct __pyx_vtabstruct_7pyarrow_3lib__Tabular *)__pyx_v_self->__pyx_vtab)->_assert_cpu(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(17, 2199, __pyx_L1_error)

      /* "pyarrow/table.pxi":2200
 *         """
 *         self._assert_cpu()
 *         return _pc().take(self, indices)             # <<<<<<<<<<<<<<
 * 
 *     def filter(self, mask, object null_selection_behavior="drop"):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_4 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pc_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 2200, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
        assert(__pyx_t_4);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
        __pyx_t_6 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
        __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 2200, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      __pyx_t_2 = __pyx_t_3;
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_6 = 0;
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_2, ((PyObject *)__pyx_v_self), __pyx_v_indices};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_take, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 2200, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/table.pxi":2163
 *         return self.take(indices)
 * 
 *     def take(self, object indices):             # <<<<<<<<<<<<<<
 *         """
 *         Select rows from a Table or RecordBatch.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_AddTraceback("pyarrow.lib._Tabular.take", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/table.pxi":2202
 *         return _pc().take(self, indices)
 * 
 *     def filter(self, mask, object null_selection_behavior="drop"):             # <<<<<<<<<<<<<<
 *         """
 *         Select rows from the table or record batch based on a boolean mask.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_8_Tabular_38filter(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_8_Tabular_37filter, "_Tabular.filter(self, mask, null_selection_behavior='drop')\n\nSelect rows from the table or record batch based on a boolean mask.\n\nThe Table can be filtered based on a mask, which will be passed to\n:func:`pyarrow.compute.filter` to perform the filtering, or it can\nbe filtered through a boolean :class:`.Expression`\n\nParameters\n----------\nmask : Array or array-like or .Expression\n    The boolean mask or the :class:`.Expression` to filter the table with.\nnull_selection_behavior : str, default \"drop\"\n    How nulls in the mask should be handled, does nothing if\n    an :class:`.Expression` is used.\n\nReturns\n-------\nfiltered : Table or RecordBatch\n    A tabular object of the same schema, with only the rows selected\n    by applied filtering\n\nExamples\n--------\nUsing a Table (works similarly for RecordBatch):\n\n>>> import pyarrow as pa\n>>> table = pa.table({'year': [2020, 2022, 2019, 2021],\n...                   'n_legs': [2, 4, 5, 100],\n...                   'animals': [\"Flamingo\", \"Horse\", \"Brittle stars\", \"Centipede\"]})\n\nDefine an expression and select rows:\n\n>>> import pyarrow.compute as pc\n>>> expr = pc.field(\"year\") <= 2020\n>>> table.filter(expr)\npyarrow.Table\nyear: int64\nn_legs: int64\nanimals: string\n----\nyear: [[2020,2019]]\nn_legs: [[2,5]]\nanimals: [[\"Flamingo\",\"Brittle stars\"]]\n\nDefine a mask and select rows:\n\n>>> mask=[True, True, False, None]\n>>> table.filter(mask)\npyarrow.Table\nyear: int64\nn_legs: int64\nanimals: string\n----\nyear: [[2020,2022]]\nn_legs: [[2,4]]\nanimals: [[\"Flamingo\",\"Horse\"]]\n>>> table.filter(mask, null_selection_behavior='emit_null')\npyarrow.Table\nyear: int64\nn_legs: int64\nanimals: string\n----\nyear: [[2020,2022,null]]\nn_legs: [[2,4,null]]\nanimals: [[\"Flamingo\",\"Horse\",null]]");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_8_Tabular_38filter = {"filter", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_8_Tabular_38filter, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_8_Tabular_37filter};
    static PyObject *__pyx_pw_7pyarrow_3lib_8_Tabular_38filter(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_mask = 0;
      PyObject *__pyx_v_null_selection_behavior = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[2] = {0,0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("filter (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_mask,&__pyx_mstate_global->__pyx_n_u_null_selection_behavior,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(17, 2202, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(17, 2202, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 2202, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "filter", 0) < (0)) __PYX_ERR(17, 2202, __pyx_L3_error)
          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_n_u_drop));
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("filter", 0, 1, 2, i); __PYX_ERR(17, 2202, __pyx_L3_error) }
          }
        } else {
          switch (__pyx_nargs) {
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(17, 2202, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 2202, __pyx_L3_error)
            break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_n_u_drop));
        }
        __pyx_v_mask = values[0];
        __pyx_v_null_selection_behavior = values[1];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("filter", 0, 1, 2, __pyx_nargs); __PYX_ERR(17, 2202, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib._Tabular.filter", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_8_Tabular_37filter(((struct __pyx_obj_7pyarrow_3lib__Tabular *)__pyx_v_self), __pyx_v_mask, __pyx_v_null_selection_behavior);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_8_Tabular_37filter(struct __pyx_obj_7pyarrow_3lib__Tabular *__pyx_v_self, PyObject *__pyx_v_mask, PyObject *__pyx_v_null_selection_behavior) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      size_t __pyx_t_4;
      int __pyx_t_5;
      PyObject *__pyx_t_6 = NULL;
      PyObject *__pyx_t_7 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("filter", 0);

      /* "pyarrow/table.pxi":2269
 *         animals: [["Flamingo","Horse",null]]
 *         """
 *         self._assert_cpu()             # <<<<<<<<<<<<<<
 *         if isinstance(mask, _pc().Expression):
 *             return _pac()._filter_table(self, mask)
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_assert_cpu");
        __PYX_ERR(17, 2269, __pyx_L1_error)
      }
      ((struct __pyx_vtabstruct_7pyarrow_3lib__Tabular *)__pyx_v_self->__pyx_vtab)->_assert_cpu(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(17, 2269, __pyx_L1_error)

      /* "pyarrow/table.pxi":2270
 *         """
 *         self._assert_cpu()
 *         if isinstance(mask, _pc().Expression):             # <<<<<<<<<<<<<<
 *             return _pac()._filter_table(self, mask)
 *         else:
*/
      __pyx_t_2 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_pc_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 2270, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
        assert(__pyx_t_2);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
        __pyx_t_4 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 2270, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_Expression); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 2270, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_5 = PyObject_IsInstance(__pyx_v_mask, __pyx_t_3); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(17, 2270, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_5) {

        /* "pyarrow/table.pxi":2271
 *         self._assert_cpu()
 *         if isinstance(mask, _pc().Expression):
 *             return _pac()._filter_table(self, mask)             # <<<<<<<<<<<<<<
 *         else:
 *             return _pc().filter(self, mask, null_selection_behavior)
*/
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_6 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_pac_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 2271, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_4 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_7))) {
          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
          assert(__pyx_t_6);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
          __pyx_t_4 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 2271, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __pyx_t_1 = __pyx_t_2;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = 0;
        {
          PyObject *__pyx_callargs[3] = {__pyx_t_1, ((PyObject *)__pyx_v_self), __pyx_v_mask};
          __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_filter_table, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 2271, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        __pyx_r = __pyx_t_3;
        __pyx_t_3 = 0;
        goto __pyx_L0;

        /* "pyarrow/table.pxi":2270
 *         """
 *         self._assert_cpu()
 *         if isinstance(mask, _pc().Expression):             # <<<<<<<<<<<<<<
 *             return _pac()._filter_table(self, mask)
 *         else:
*/
      }

      /* "pyarrow/table.pxi":2273
 *             return _pac()._filter_table(self, mask)
 *         else:
 *             return _pc().filter(self, mask, null_selection_behavior)             # <<<<<<<<<<<<<<
 * 
 *     def to_pydict(self, *, maps_as_pydicts=None):
*/
      /*else*/ {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_7 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_pc_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 2273, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_4 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_6))) {
          __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
          assert(__pyx_t_7);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_7);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
          __pyx_t_4 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL};
          __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 2273, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
        }
        __pyx_t_2 = __pyx_t_1;
        __Pyx_INCREF(__pyx_t_2);
        __pyx_t_4 = 0;
        {
          PyObject *__pyx_callargs[4] = {__pyx_t_2, ((PyObject *)__pyx_v_self), __pyx_v_mask, __pyx_v_null_selection_behavior};
          __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_filter, __pyx_callargs+__pyx_t_4, (4-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 2273, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        __pyx_r = __pyx_t_3;
        __pyx_t_3 = 0;
        goto __pyx_L0;
      }

      /* "pyarrow/table.pxi":2202
 *         return _pc().take(self, indices)
 * 
 *     def filter(self, mask, object null_selection_behavior="drop"):             # <<<<<<<<<<<<<<
 *         """
 *         Select rows from the table or record batch based on a boolean mask.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_7);
      __Pyx_AddTraceback("pyarrow.lib._Tabular.filter", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/table.pxi":2275
 *             return _pc().filter(self, mask, null_selection_behavior)
 * 
 *     def to_pydict(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Convert the Table or RecordBatch to a dict or OrderedDict.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_8_Tabular_40to_pydict(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_8_Tabular_39to_pydict, "_Tabular.to_pydict(self, *, maps_as_pydicts=None)\n\nConvert the Table or RecordBatch to a dict or OrderedDict.\n\nParameters\n----------\nmaps_as_pydicts : str, optional, default `None`\n    Valid values are `None`, 'lossy', or 'strict'.\n    The default behavior (`None`), is to convert Arrow Map arrays to\n    Python association lists (list-of-tuples) in the same order as the\n    Arrow Map, as in [(key1, value1), (key2, value2), ...].\n\n    If 'lossy' or 'strict', convert Arrow Map arrays to native Python dicts.\n\n    If 'lossy', whenever duplicate keys are detected, a warning will be printed.\n    The last seen value of a duplicate key will be in the Python dictionary.\n    If 'strict', this instead results in an exception being raised when detected.\n\nReturns\n-------\ndict\n\nExamples\n--------\nTable (works similarly for RecordBatch)\n\n>>> import pyarrow as pa\n>>> n_legs = pa.array([2, 2, 4, 4, 5, 100])\n>>> animals = pa.array([\"Flamingo\", \"Parrot\", \"Dog\", \"Horse\", \"Brittle stars\", \"Centipede\"])\n>>> table = pa.Table.from_arrays([n_legs, animals], names=[\"n_legs\", \"animals\"])\n>>> table.to_pydict()\n{'n_legs': [2, 2, 4, 4, 5, 100], 'animals': ['Flamingo', 'Parrot', ..., 'Centipede']}");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_8_Tabular_40to_pydict = {"to_pydict", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_8_Tabular_40to_pydict, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_8_Tabular_39to_pydict};
    static PyObject *__pyx_pw_7pyarrow_3lib_8_Tabular_40to_pydict(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_maps_as_pydicts = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("to_pydict (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_maps_as_pydicts,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(17, 2275, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, 0, __pyx_kwds_len, "to_pydict", 0) < (0)) __PYX_ERR(17, 2275, __pyx_L3_error)
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
        } else if (unlikely(__pyx_nargs != 0)) {
          goto __pyx_L5_argtuple_error;
        } else {
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
        }
        __pyx_v_maps_as_pydicts = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("to_pydict", 1, 0, 0, __pyx_nargs); __PYX_ERR(17, 2275, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib._Tabular.to_pydict", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_8_Tabular_39to_pydict(((struct __pyx_obj_7pyarrow_3lib__Tabular *)__pyx_v_self), __pyx_v_maps_as_pydicts);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_8_Tabular_39to_pydict(struct __pyx_obj_7pyarrow_3lib__Tabular *__pyx_v_self, PyObject *__pyx_v_maps_as_pydicts) {
      PyObject *__pyx_v_entries = NULL;
      PyObject *__pyx_v_i = NULL;
      PyObject *__pyx_v_name = NULL;
      PyObject *__pyx_v_column = NULL;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      size_t __pyx_t_4;
      PyObject *(*__pyx_t_5)(PyObject *);
      PyObject *__pyx_t_6 = NULL;
      PyObject *__pyx_t_7 = NULL;
      int __pyx_t_8;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("to_pydict", 0);

      /* "pyarrow/table.pxi":2308
 *         {'n_legs': [2, 2, 4, 4, 5, 100], 'animals': ['Flamingo', 'Parrot', ..., 'Centipede']}
 *         """
 *         entries = []             # <<<<<<<<<<<<<<
 *         for i in range(self.num_columns):
 *             name = self.field(i).name
*/
      __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 2308, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_v_entries = ((PyObject*)__pyx_t_1);
      __pyx_t_1 = 0;

      /* "pyarrow/table.pxi":2309
 *         """
 *         entries = []
 *         for i in range(self.num_columns):             # <<<<<<<<<<<<<<
 *             name = self.field(i).name
 *             column = self[i].to_pylist(maps_as_pydicts=maps_as_pydicts)
*/
      __pyx_t_2 = NULL;
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_num_columns); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 2309, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(&PyRange_Type), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 2309, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 2309, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 2309, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      for (;;) {
        {
          __pyx_t_1 = __pyx_t_5(__pyx_t_3);
          if (unlikely(!__pyx_t_1)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(17, 2309, __pyx_L1_error)
              PyErr_Clear();
            }
            break;
          }
        }
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_1);
        __pyx_t_1 = 0;

        /* "pyarrow/table.pxi":2310
 *         entries = []
 *         for i in range(self.num_columns):
 *             name = self.field(i).name             # <<<<<<<<<<<<<<
 *             column = self[i].to_pylist(maps_as_pydicts=maps_as_pydicts)
 *             entries.append((name, column))
*/
        __pyx_t_2 = ((PyObject *)__pyx_v_self);
        __Pyx_INCREF(__pyx_t_2);
        __pyx_t_4 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_i};
          __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_field, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 2310, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
        }
        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 2310, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_2);
        __pyx_t_2 = 0;

        /* "pyarrow/table.pxi":2311
 *         for i in range(self.num_columns):
 *             name = self.field(i).name
 *             column = self[i].to_pylist(maps_as_pydicts=maps_as_pydicts)             # <<<<<<<<<<<<<<
 *             entries.append((name, column))
 *         return ordered_dict(entries)
*/
        if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
          __PYX_ERR(17, 2311, __pyx_L1_error)
        }
        __pyx_t_6 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_v_i); if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 2311, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_1 = __pyx_t_6;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = 0;
        {
          PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_1, NULL};
          __pyx_t_7 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 2311, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_maps_as_pydicts, __pyx_v_maps_as_pydicts, __pyx_t_7, __pyx_callargs+1, 0) < (0)) __PYX_ERR(17, 2311, __pyx_L1_error)
          __pyx_t_2 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_to_pylist, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_7);
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 2311, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __Pyx_XDECREF_SET(__pyx_v_column, __pyx_t_2);
        __pyx_t_2 = 0;

        /* "pyarrow/table.pxi":2312
 *             name = self.field(i).name
 *             column = self[i].to_pylist(maps_as_pydicts=maps_as_pydicts)
 *             entries.append((name, column))             # <<<<<<<<<<<<<<
 *         return ordered_dict(entries)
 * 
*/
        __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 2312, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_INCREF(__pyx_v_name);
        __Pyx_GIVEREF(__pyx_v_name);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_name) != (0)) __PYX_ERR(17, 2312, __pyx_L1_error);
        __Pyx_INCREF(__pyx_v_column);
        __Pyx_GIVEREF(__pyx_v_column);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_column) != (0)) __PYX_ERR(17, 2312, __pyx_L1_error);
        __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_entries, __pyx_t_2); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(17, 2312, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

        /* "pyarrow/table.pxi":2309
 *         """
 *         entries = []
 *         for i in range(self.num_columns):             # <<<<<<<<<<<<<<
 *             name = self.field(i).name
 *             column = self[i].to_pylist(maps_as_pydicts=maps_as_pydicts)
*/
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "pyarrow/table.pxi":2313
 *             column = self[i].to_pylist(maps_as_pydicts=maps_as_pydicts)
 *             entries.append((name, column))
 *         return ordered_dict(entries)             # <<<<<<<<<<<<<<
 * 
 *     def to_pylist(self, *, maps_as_pydicts=None):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_ordered_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 2313, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_4 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_6);
        assert(__pyx_t_2);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
        __pyx_t_4 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_entries};
        __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 2313, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "pyarrow/table.pxi":2275
 *             return _pc().filter(self, mask, null_selection_behavior)
 * 
 *     def to_pydict(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Convert the Table or RecordBatch to a dict or OrderedDict.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_7);
      __Pyx_AddTraceback("pyarrow.lib._Tabular.to_pydict", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_entries);
      __Pyx_XDECREF(__pyx_v_i);
      __Pyx_XDECREF(__pyx_v_name);
      __Pyx_XDECREF(__pyx_v_column);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/table.pxi":2315
 *         return ordered_dict(entries)
 * 
 *     def to_pylist(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Convert the Table or RecordBatch to a list of rows / dictionaries.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_8_Tabular_42to_pylist(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_8_Tabular_41to_pylist, "_Tabular.to_pylist(self, *, maps_as_pydicts=None)\n\nConvert the Table or RecordBatch to a list of rows / dictionaries.\n\nParameters\n----------\nmaps_as_pydicts : str, optional, default `None`\n    Valid values are `None`, 'lossy', or 'strict'.\n    The default behavior (`None`), is to convert Arrow Map arrays to\n    Python association lists (list-of-tuples) in the same order as the\n    Arrow Map, as in [(key1, value1), (key2, value2), ...].\n\n    If 'lossy' or 'strict', convert Arrow Map arrays to native Python dicts.\n\n    If 'lossy', whenever duplicate keys are detected, a warning will be printed.\n    The last seen value of a duplicate key will be in the Python dictionary.\n    If 'strict', this instead results in an exception being raised when detected.\n\nReturns\n-------\nlist\n\nExamples\n--------\nTable (works similarly for RecordBatch)\n\n>>> import pyarrow as pa\n>>> data = [[2, 4, 5, 100],\n...         [\"Flamingo\", \"Horse\", \"Brittle stars\", \"Centipede\"]]\n>>> table = pa.table(data, names=[\"n_legs\", \"animals\"])\n>>> table.to_pylist()\n[{'n_legs': 2, 'animals': 'Flamingo'}, {'n_legs': 4, 'animals': 'Horse'}, ...");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_8_Tabular_42to_pylist = {"to_pylist", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_8_Tabular_42to_pylist, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_8_Tabular_41to_pylist};
    static PyObject *__pyx_pw_7pyarrow_3lib_8_Tabular_42to_pylist(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_maps_as_pydicts = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("to_pylist (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_maps_as_pydicts,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(17, 2315, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, 0, __pyx_kwds_len, "to_pylist", 0) < (0)) __PYX_ERR(17, 2315, __pyx_L3_error)
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
        } else if (unlikely(__pyx_nargs != 0)) {
          goto __pyx_L5_argtuple_error;
        } else {
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
        }
        __pyx_v_maps_as_pydicts = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("to_pylist", 1, 0, 0, __pyx_nargs); __PYX_ERR(17, 2315, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib._Tabular.to_pylist", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_8_Tabular_41to_pylist(((struct __pyx_obj_7pyarrow_3lib__Tabular *)__pyx_v_self), __pyx_v_maps_as_pydicts);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_8_Tabular_41to_pylist(struct __pyx_obj_7pyarrow_3lib__Tabular *__pyx_v_self, PyObject *__pyx_v_maps_as_pydicts) {
      PyObject *__pyx_v_pydict = NULL;
      PyObject *__pyx_v_names = NULL;
      PyObject *__pyx_v_pylist = NULL;
      PyObject *__pyx_9genexpr24__pyx_v_row = NULL;
      PyObject *__pyx_9genexpr25__pyx_v_column = NULL;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      size_t __pyx_t_3;
      PyObject *__pyx_t_4 = NULL;
      PyObject *__pyx_t_5 = NULL;
      PyObject *(*__pyx_t_6)(PyObject *);
      Py_ssize_t __pyx_t_7;
      PyObject *(*__pyx_t_8)(PyObject *);
      PyObject *__pyx_t_9 = NULL;
      PyObject *__pyx_t_10 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("to_pylist", 0);

      /* "pyarrow/table.pxi":2348
 *         [{'n_legs': 2, 'animals': 'Flamingo'}, {'n_legs': 4, 'animals': 'Horse'}, ...
 *         """
 *         pydict = self.to_pydict(maps_as_pydicts=maps_as_pydicts)             # <<<<<<<<<<<<<<
 *         names = self.schema.names
 *         pylist = [{column: pydict[column][row] for column in names}
*/
      __pyx_t_2 = ((PyObject *)__pyx_v_self);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_3 = 0;
      {
        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, NULL};
        __pyx_t_4 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 2348, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_maps_as_pydicts, __pyx_v_maps_as_pydicts, __pyx_t_4, __pyx_callargs+1, 0) < (0)) __PYX_ERR(17, 2348, __pyx_L1_error)
        __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_to_pydict, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_4);
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 2348, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_v_pydict = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "pyarrow/table.pxi":2349
 *         """
 *         pydict = self.to_pydict(maps_as_pydicts=maps_as_pydicts)
 *         names = self.schema.names             # <<<<<<<<<<<<<<
 *         pylist = [{column: pydict[column][row] for column in names}
 *                   for row in range(self.num_rows)]
*/
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_schema); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 2349, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_names); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 2349, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_v_names = __pyx_t_4;
      __pyx_t_4 = 0;

      /* "pyarrow/table.pxi":2350
 *         pydict = self.to_pydict(maps_as_pydicts=maps_as_pydicts)
 *         names = self.schema.names
 *         pylist = [{column: pydict[column][row] for column in names}             # <<<<<<<<<<<<<<
 *                   for row in range(self.num_rows)]
 *         return pylist
*/
      { /* enter inner scope */
        __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 2350, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_4);

        /* "pyarrow/table.pxi":2351
 *         names = self.schema.names
 *         pylist = [{column: pydict[column][row] for column in names}
 *                   for row in range(self.num_rows)]             # <<<<<<<<<<<<<<
 *         return pylist
 * 
*/
        __pyx_t_2 = NULL;
        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_num_rows); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 2351, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_3 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_5};
          __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(&PyRange_Type), __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 2351, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_1);
        }
        __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 2351, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_6 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 2351, __pyx_L5_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        for (;;) {
          {
            __pyx_t_1 = __pyx_t_6(__pyx_t_5);
            if (unlikely(!__pyx_t_1)) {
              PyObject* exc_type = PyErr_Occurred();
              if (exc_type) {
                if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(17, 2351, __pyx_L5_error)
                PyErr_Clear();
              }
              break;
            }
          }
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_XDECREF_SET(__pyx_9genexpr24__pyx_v_row, __pyx_t_1);
          __pyx_t_1 = 0;
          { /* enter inner scope */

            /* "pyarrow/table.pxi":2350
 *         pydict = self.to_pydict(maps_as_pydicts=maps_as_pydicts)
 *         names = self.schema.names
 *         pylist = [{column: pydict[column][row] for column in names}             # <<<<<<<<<<<<<<
 *                   for row in range(self.num_rows)]
 *         return pylist
*/
            __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 2350, __pyx_L10_error)
            __Pyx_GOTREF(__pyx_t_1);
            if (likely(PyList_CheckExact(__pyx_v_names)) || PyTuple_CheckExact(__pyx_v_names)) {
              __pyx_t_2 = __pyx_v_names; __Pyx_INCREF(__pyx_t_2);
              __pyx_t_7 = 0;
              __pyx_t_8 = NULL;
            } else {
              __pyx_t_7 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_names); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 2350, __pyx_L10_error)
              __Pyx_GOTREF(__pyx_t_2);
              __pyx_t_8 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(17, 2350, __pyx_L10_error)
            }
            for (;;) {
              if (likely(!__pyx_t_8)) {
                if (likely(PyList_CheckExact(__pyx_t_2))) {
                  {
                    Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2);
                    #if !CYTHON_ASSUME_SAFE_SIZE
                    if (unlikely((__pyx_temp < 0))) __PYX_ERR(17, 2350, __pyx_L10_error)
                    #endif
                    if (__pyx_t_7 >= __pyx_temp) break;
                  }
                  __pyx_t_9 = __Pyx_PyList_GetItemRefFast(__pyx_t_2, __pyx_t_7, __Pyx_ReferenceSharing_OwnStrongReference);
                  ++__pyx_t_7;
                } else {
                  {
                    Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2);
                    #if !CYTHON_ASSUME_SAFE_SIZE
                    if (unlikely((__pyx_temp < 0))) __PYX_ERR(17, 2350, __pyx_L10_error)
                    #endif
                    if (__pyx_t_7 >= __pyx_temp) break;
                  }
                  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                  __pyx_t_9 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_7));
                  #else
                  __pyx_t_9 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_7);
                  #endif
                  ++__pyx_t_7;
                }
                if (unlikely(!__pyx_t_9)) __PYX_ERR(17, 2350, __pyx_L10_error)
              } else {
                __pyx_t_9 = __pyx_t_8(__pyx_t_2);
                if (unlikely(!__pyx_t_9)) {
                  PyObject* exc_type = PyErr_Occurred();
                  if (exc_type) {
                    if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(17, 2350, __pyx_L10_error)
                    PyErr_Clear();
                  }
                  break;
                }
              }
              __Pyx_GOTREF(__pyx_t_9);
              __Pyx_XDECREF_SET(__pyx_9genexpr25__pyx_v_column, __pyx_t_9);
              __pyx_t_9 = 0;
              if (unlikely(__pyx_v_pydict == Py_None)) {
                PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
                __PYX_ERR(17, 2350, __pyx_L10_error)
              }
              __pyx_t_9 = __Pyx_PyObject_GetItem(__pyx_v_pydict, __pyx_9genexpr25__pyx_v_column); if (unlikely(!__pyx_t_9)) __PYX_ERR(17, 2350, __pyx_L10_error)
              __Pyx_GOTREF(__pyx_t_9);
              if (unlikely(__pyx_t_9 == Py_None)) {
                PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
                __PYX_ERR(17, 2350, __pyx_L10_error)
              }
              __pyx_t_10 = __Pyx_PyObject_GetItem(__pyx_t_9, __pyx_9genexpr24__pyx_v_row); if (unlikely(!__pyx_t_10)) __PYX_ERR(17, 2350, __pyx_L10_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
              if (unlikely(PyDict_SetItem(__pyx_t_1, (PyObject*)__pyx_9genexpr25__pyx_v_column, (PyObject*)__pyx_t_10))) __PYX_ERR(17, 2350, __pyx_L10_error)
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
            }
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_9genexpr25__pyx_v_column); __pyx_9genexpr25__pyx_v_column = 0;
            goto __pyx_L14_exit_scope;
            __pyx_L10_error:;
            __Pyx_XDECREF(__pyx_9genexpr25__pyx_v_column); __pyx_9genexpr25__pyx_v_column = 0;
            goto __pyx_L5_error;
            __pyx_L14_exit_scope:;
          } /* exit inner scope */
          if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_1))) __PYX_ERR(17, 2350, __pyx_L5_error)
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

          /* "pyarrow/table.pxi":2351
 *         names = self.schema.names
 *         pylist = [{column: pydict[column][row] for column in names}
 *                   for row in range(self.num_rows)]             # <<<<<<<<<<<<<<
 *         return pylist
 * 
*/
        }
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_XDECREF(__pyx_9genexpr24__pyx_v_row); __pyx_9genexpr24__pyx_v_row = 0;
        goto __pyx_L16_exit_scope;
        __pyx_L5_error:;
        __Pyx_XDECREF(__pyx_9genexpr24__pyx_v_row); __pyx_9genexpr24__pyx_v_row = 0;
        goto __pyx_L1_error;
        __pyx_L16_exit_scope:;
      } /* exit inner scope */
      __pyx_v_pylist = ((PyObject*)__pyx_t_4);
      __pyx_t_4 = 0;

      /* "pyarrow/table.pxi":2352
 *         pylist = [{column: pydict[column][row] for column in names}
 *                   for row in range(self.num_rows)]
 *         return pylist             # <<<<<<<<<<<<<<
 * 
 *     def to_string(self, *, show_metadata=False, preview_cols=0):
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_pylist);
      __pyx_r = __pyx_v_pylist;
      goto __pyx_L0;

      /* "pyarrow/table.pxi":2315
 *         return ordered_dict(entries)
 * 
 *     def to_pylist(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Convert the Table or RecordBatch to a list of rows / dictionaries.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_9);
      __Pyx_XDECREF(__pyx_t_10);
      __Pyx_AddTraceback("pyarrow.lib._Tabular.to_pylist", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_pydict);
      __Pyx_XDECREF(__pyx_v_names);
      __Pyx_XDECREF(__pyx_v_pylist);
      __Pyx_XDECREF(__pyx_9genexpr24__pyx_v_row);
      __Pyx_XDECREF(__pyx_9genexpr25__pyx_v_column);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/table.pxi":2354
 *         return pylist
 * 
 *     def to_string(self, *, show_metadata=False, preview_cols=0):             # <<<<<<<<<<<<<<
 *         """
 *         Return human-readable string representation of Table or RecordBatch.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_8_Tabular_44to_string(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_8_Tabular_43to_string, "_Tabular.to_string(self, *, show_metadata=False, preview_cols=0)\n\nReturn human-readable string representation of Table or RecordBatch.\n\nParameters\n----------\nshow_metadata : bool, default False\n    Display Field-level and Schema-level KeyValueMetadata.\npreview_cols : int, default 0\n    Display values of the columns for the first N columns.\n\nReturns\n-------\nstr");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_8_Tabular_44to_string = {"to_string", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_8_Tabular_44to_string, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_8_Tabular_43to_string};
    static PyObject *__pyx_pw_7pyarrow_3lib_8_Tabular_44to_string(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_show_metadata = 0;
      PyObject *__pyx_v_preview_cols = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[2] = {0,0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("to_string (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_show_metadata,&__pyx_mstate_global->__pyx_n_u_preview_cols,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(17, 2354, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, 0, __pyx_kwds_len, "to_string", 0) < (0)) __PYX_ERR(17, 2354, __pyx_L3_error)
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_False));
          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_int_0));
        } else if (unlikely(__pyx_nargs != 0)) {
          goto __pyx_L5_argtuple_error;
        } else {
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_False));
          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_int_0));
        }
        __pyx_v_show_metadata = values[0];
        __pyx_v_preview_cols = values[1];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("to_string", 1, 0, 0, __pyx_nargs); __PYX_ERR(17, 2354, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib._Tabular.to_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_8_Tabular_43to_string(((struct __pyx_obj_7pyarrow_3lib__Tabular *)__pyx_v_self), __pyx_v_show_metadata, __pyx_v_preview_cols);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_8_Tabular_43to_string(struct __pyx_obj_7pyarrow_3lib__Tabular *__pyx_v_self, PyObject *__pyx_v_show_metadata, PyObject *__pyx_v_preview_cols) {
      PyObject *__pyx_v_schema_as_string = NULL;
      PyObject *__pyx_v_title = NULL;
      PyObject *__pyx_v_pieces = NULL;
      PyObject *__pyx_v_i = NULL;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      size_t __pyx_t_4;
      PyObject *__pyx_t_5 = NULL;
      PyObject *__pyx_t_6[4];
      int __pyx_t_7;
      int __pyx_t_8;
      PyObject *__pyx_t_9 = NULL;
      PyObject *__pyx_t_10 = NULL;
      PyObject *(*__pyx_t_11)(PyObject *);
      PyObject *__pyx_t_12[3];
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("to_string", 0);

      /* "pyarrow/table.pxi":2370
 *         """
 *         # Use less verbose schema output.
 *         schema_as_string = self.schema.to_string(             # <<<<<<<<<<<<<<
 *             show_field_metadata=show_metadata,
 *             show_schema_metadata=show_metadata
*/
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_schema); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 2370, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = __pyx_t_3;
      __Pyx_INCREF(__pyx_t_2);

      /* "pyarrow/table.pxi":2372
 *         schema_as_string = self.schema.to_string(
 *             show_field_metadata=show_metadata,
 *             show_schema_metadata=show_metadata             # <<<<<<<<<<<<<<
 *         )
 *         title = f'pyarrow.{type(self).__name__}\n{schema_as_string}'
*/
      __pyx_t_4 = 0;
      {
        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_2, NULL};
        __pyx_t_5 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 2370, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_show_field_metadata, __pyx_v_show_metadata, __pyx_t_5, __pyx_callargs+1, 0) < (0)) __PYX_ERR(17, 2370, __pyx_L1_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_show_schema_metadata, __pyx_v_show_metadata, __pyx_t_5, __pyx_callargs+1, 1) < (0)) __PYX_ERR(17, 2370, __pyx_L1_error)
        __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_to_string, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_5);
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 2370, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_v_schema_as_string = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "pyarrow/table.pxi":2374
 *             show_schema_metadata=show_metadata
 *         )
 *         title = f'pyarrow.{type(self).__name__}\n{schema_as_string}'             # <<<<<<<<<<<<<<
 *         pieces = [title]
 *         if preview_cols:
*/
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))), __pyx_mstate_global->__pyx_n_u_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 2374, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_t_1, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 2374, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_v_schema_as_string, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 2374, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_6[0] = __pyx_mstate_global->__pyx_kp_u_pyarrow;
      __pyx_t_6[1] = __pyx_t_3;
      __pyx_t_6[2] = __pyx_mstate_global->__pyx_kp_u__14;
      __pyx_t_6[3] = __pyx_t_1;
      __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_6, 4, 8 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + 1 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1));
      if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 2374, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_v_title = ((PyObject*)__pyx_t_5);
      __pyx_t_5 = 0;

      /* "pyarrow/table.pxi":2375
 *         )
 *         title = f'pyarrow.{type(self).__name__}\n{schema_as_string}'
 *         pieces = [title]             # <<<<<<<<<<<<<<
 *         if preview_cols:
 *             pieces.append('----')
*/
      __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 2375, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_v_title);
      __Pyx_GIVEREF(__pyx_v_title);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_v_title) != (0)) __PYX_ERR(17, 2375, __pyx_L1_error);
      __pyx_v_pieces = ((PyObject*)__pyx_t_5);
      __pyx_t_5 = 0;

      /* "pyarrow/table.pxi":2376
 *         title = f'pyarrow.{type(self).__name__}\n{schema_as_string}'
 *         pieces = [title]
 *         if preview_cols:             # <<<<<<<<<<<<<<
 *             pieces.append('----')
 *             for i in range(min(self.num_columns, preview_cols)):
*/
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_preview_cols); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(17, 2376, __pyx_L1_error)
      if (__pyx_t_7) {

        /* "pyarrow/table.pxi":2377
 *         pieces = [title]
 *         if preview_cols:
 *             pieces.append('----')             # <<<<<<<<<<<<<<
 *             for i in range(min(self.num_columns, preview_cols)):
 *                 pieces.append(
*/
        __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_pieces, __pyx_mstate_global->__pyx_kp_u__16); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(17, 2377, __pyx_L1_error)

        /* "pyarrow/table.pxi":2378
 *         if preview_cols:
 *             pieces.append('----')
 *             for i in range(min(self.num_columns, preview_cols)):             # <<<<<<<<<<<<<<
 *                 pieces.append(
 *                     f'{self.field(i).name}: {self.column(i).to_string(indent=0, skip_new_lines=True)}')
*/
        __pyx_t_1 = NULL;
        __Pyx_INCREF(__pyx_v_preview_cols);
        __pyx_t_3 = __pyx_v_preview_cols;
        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_num_columns); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 2378, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_10 = PyObject_RichCompare(__pyx_t_3, __pyx_t_2, Py_LT); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) __PYX_ERR(17, 2378, __pyx_L1_error)
        __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(17, 2378, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        if (__pyx_t_7) {
          __Pyx_INCREF(__pyx_t_3);
          __pyx_t_9 = __pyx_t_3;
        } else {
          __Pyx_INCREF(__pyx_t_2);
          __pyx_t_9 = __pyx_t_2;
        }
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_4 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_9};
          __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)(&PyRange_Type), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 2378, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
        }
        __pyx_t_9 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(17, 2378, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_11 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_9); if (unlikely(!__pyx_t_11)) __PYX_ERR(17, 2378, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        for (;;) {
          {
            __pyx_t_5 = __pyx_t_11(__pyx_t_9);
            if (unlikely(!__pyx_t_5)) {
              PyObject* exc_type = PyErr_Occurred();
              if (exc_type) {
                if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(17, 2378, __pyx_L1_error)
                PyErr_Clear();
              }
              break;
            }
          }
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_5);
          __pyx_t_5 = 0;

          /* "pyarrow/table.pxi":2380
 *             for i in range(min(self.num_columns, preview_cols)):
 *                 pieces.append(
 *                     f'{self.field(i).name}: {self.column(i).to_string(indent=0, skip_new_lines=True)}')             # <<<<<<<<<<<<<<
 *             if preview_cols < self.num_columns:
 *                 pieces.append('...')
*/
          __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_field); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 2380, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_i); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 2380, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 2380, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 2380, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_column); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 2380, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_i); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 2380, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_to_string); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 2380, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 2380, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_indent, __pyx_mstate_global->__pyx_int_0) < (0)) __PYX_ERR(17, 2380, __pyx_L1_error)
          if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_skip_new_lines, Py_True) < (0)) __PYX_ERR(17, 2380, __pyx_L1_error)
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_mstate_global->__pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 2380, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_t_2, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 2380, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_12[0] = __pyx_t_1;
          __pyx_t_12[1] = __pyx_mstate_global->__pyx_kp_u__10;
          __pyx_t_12[2] = __pyx_t_3;
          __pyx_t_2 = __Pyx_PyUnicode_Join(__pyx_t_12, 3, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1) + 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3));
          if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 2380, __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;

          /* "pyarrow/table.pxi":2379
 *             pieces.append('----')
 *             for i in range(min(self.num_columns, preview_cols)):
 *                 pieces.append(             # <<<<<<<<<<<<<<
 *                     f'{self.field(i).name}: {self.column(i).to_string(indent=0, skip_new_lines=True)}')
 *             if preview_cols < self.num_columns:
*/
          __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_pieces, __pyx_t_2); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(17, 2379, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

          /* "pyarrow/table.pxi":2378
 *         if preview_cols:
 *             pieces.append('----')
 *             for i in range(min(self.num_columns, preview_cols)):             # <<<<<<<<<<<<<<
 *                 pieces.append(
 *                     f'{self.field(i).name}: {self.column(i).to_string(indent=0, skip_new_lines=True)}')
*/
        }
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

        /* "pyarrow/table.pxi":2381
 *                 pieces.append(
 *                     f'{self.field(i).name}: {self.column(i).to_string(indent=0, skip_new_lines=True)}')
 *             if preview_cols < self.num_columns:             # <<<<<<<<<<<<<<
 *                 pieces.append('...')
 *         return '\n'.join(pieces)
*/
        __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_num_columns); if (unlikely(!__pyx_t_9)) __PYX_ERR(17, 2381, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_2 = PyObject_RichCompare(__pyx_v_preview_cols, __pyx_t_9, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 2381, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(17, 2381, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (__pyx_t_7) {

          /* "pyarrow/table.pxi":2382
 *                     f'{self.field(i).name}: {self.column(i).to_string(indent=0, skip_new_lines=True)}')
 *             if preview_cols < self.num_columns:
 *                 pieces.append('...')             # <<<<<<<<<<<<<<
 *         return '\n'.join(pieces)
 * 
*/
          __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_pieces, __pyx_mstate_global->__pyx_kp_u__17); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(17, 2382, __pyx_L1_error)

          /* "pyarrow/table.pxi":2381
 *                 pieces.append(
 *                     f'{self.field(i).name}: {self.column(i).to_string(indent=0, skip_new_lines=True)}')
 *             if preview_cols < self.num_columns:             # <<<<<<<<<<<<<<
 *                 pieces.append('...')
 *         return '\n'.join(pieces)
*/
        }

        /* "pyarrow/table.pxi":2376
 *         title = f'pyarrow.{type(self).__name__}\n{schema_as_string}'
 *         pieces = [title]
 *         if preview_cols:             # <<<<<<<<<<<<<<
 *             pieces.append('----')
 *             for i in range(min(self.num_columns, preview_cols)):
*/
      }

      /* "pyarrow/table.pxi":2383
 *             if preview_cols < self.num_columns:
 *                 pieces.append('...')
 *         return '\n'.join(pieces)             # <<<<<<<<<<<<<<
 * 
 *     def remove_column(self, int i):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = PyUnicode_Join(__pyx_mstate_global->__pyx_kp_u__14, __pyx_v_pieces); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 2383, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;

      /* "pyarrow/table.pxi":2354
 *         return pylist
 * 
 *     def to_string(self, *, show_metadata=False, preview_cols=0):             # <<<<<<<<<<<<<<
 *         """
 *         Return human-readable string representation of Table or RecordBatch.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_9);
      __Pyx_XDECREF(__pyx_t_10);
      __Pyx_AddTraceback("pyarrow.lib._Tabular.to_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_schema_as_string);
      __Pyx_XDECREF(__pyx_v_title);
      __Pyx_XDECREF(__pyx_v_pieces);
      __Pyx_XDECREF(__pyx_v_i);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/table.pxi":2385
 *         return '\n'.join(pieces)
 * 
 *     def remove_column(self, int i):             # <<<<<<<<<<<<<<
 *         # implemented in RecordBatch/Table subclasses
 *         raise NotImplementedError
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_8_Tabular_46remove_column(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_8_Tabular_45remove_column, "_Tabular.remove_column(self, int i)");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_8_Tabular_46remove_column = {"remove_column", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_8_Tabular_46remove_column, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_8_Tabular_45remove_column};
    static PyObject *__pyx_pw_7pyarrow_3lib_8_Tabular_46remove_column(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      CYTHON_UNUSED int __pyx_v_i;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("remove_column (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_i,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(17, 2385, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 2385, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "remove_column", 0) < (0)) __PYX_ERR(17, 2385, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("remove_column", 1, 1, 1, i); __PYX_ERR(17, 2385, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 1)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 2385, __pyx_L3_error)
        }
        __pyx_v_i = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_i == (int)-1) && PyErr_Occurred())) __PYX_ERR(17, 2385, __pyx_L3_error)
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("remove_column", 1, 1, 1, __pyx_nargs); __PYX_ERR(17, 2385, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib._Tabular.remove_column", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_8_Tabular_45remove_column(((struct __pyx_obj_7pyarrow_3lib__Tabular *)__pyx_v_self), __pyx_v_i);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_8_Tabular_45remove_column(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib__Tabular *__pyx_v_self, CYTHON_UNUSED int __pyx_v_i) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("remove_column", 0);

      /* "pyarrow/table.pxi":2387
 *     def remove_column(self, int i):
 *         # implemented in RecordBatch/Table subclasses
 *         raise NotImplementedError             # <<<<<<<<<<<<<<
 * 
 *     def drop_columns(self, columns):
*/
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_NotImplementedError))), 0, 0, 0);
      __PYX_ERR(17, 2387, __pyx_L1_error)

      /* "pyarrow/table.pxi":2385
 *         return '\n'.join(pieces)
 * 
 *     def remove_column(self, int i):             # <<<<<<<<<<<<<<
 *         # implemented in RecordBatch/Table subclasses
 *         raise NotImplementedError
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_AddTraceback("pyarrow.lib._Tabular.remove_column", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/table.pxi":2389
 *         raise NotImplementedError
 * 
 *     def drop_columns(self, columns):             # <<<<<<<<<<<<<<
 *         """
 *         Drop one or more columns and return a new Table or RecordBatch.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_8_Tabular_48drop_columns(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_8_Tabular_47drop_columns, "_Tabular.drop_columns(self, columns)\n\nDrop one or more columns and return a new Table or RecordBatch.\n\nParameters\n----------\ncolumns : str or list[str]\n    Field name(s) referencing existing column(s).\n\nRaises\n------\nKeyError\n    If any of the passed column names do not exist.\n\nReturns\n-------\nTable or RecordBatch\n    A tabular object without the column(s).\n\nExamples\n--------\nTable (works similarly for RecordBatch)\n\n>>> import pyarrow as pa\n>>> import pandas as pd\n>>> df = pd.DataFrame({'n_legs': [2, 4, 5, 100],\n...                    'animals': [\"Flamingo\", \"Horse\", \"Brittle stars\", \"Centipede\"]})\n>>> table = pa.Table.from_pandas(df)\n\nDrop one column:\n\n>>> table.drop_columns(\"animals\")\npyarrow.Table\nn_legs: int64\n----\nn_legs: [[2,4,5,100]]\n\nDrop one or more columns:\n\n>>> table.drop_columns([\"n_legs\", \"animals\"])\npyarrow.Table\n...\n----");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_8_Tabular_48drop_columns = {"drop_columns", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_8_Tabular_48drop_columns, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_8_Tabular_47drop_columns};
    static PyObject *__pyx_pw_7pyarrow_3lib_8_Tabular_48drop_columns(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_columns = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("drop_columns (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_columns,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(17, 2389, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 2389, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "drop_columns", 0) < (0)) __PYX_ERR(17, 2389, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("drop_columns", 1, 1, 1, i); __PYX_ERR(17, 2389, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 1)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 2389, __pyx_L3_error)
        }
        __pyx_v_columns = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("drop_columns", 1, 1, 1, __pyx_nargs); __PYX_ERR(17, 2389, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib._Tabular.drop_columns", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_8_Tabular_47drop_columns(((struct __pyx_obj_7pyarrow_3lib__Tabular *)__pyx_v_self), __pyx_v_columns);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_8_Tabular_47drop_columns(struct __pyx_obj_7pyarrow_3lib__Tabular *__pyx_v_self, PyObject *__pyx_v_columns) {
      PyObject *__pyx_v_indices = NULL;
      PyObject *__pyx_v_col = NULL;
      PyObject *__pyx_v_idx = NULL;
      PyObject *__pyx_v_res = NULL;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      int __pyx_t_1;
      PyObject *__pyx_t_2 = NULL;
      Py_ssize_t __pyx_t_3;
      PyObject *(*__pyx_t_4)(PyObject *);
      PyObject *__pyx_t_5 = NULL;
      PyObject *__pyx_t_6 = NULL;
      PyObject *__pyx_t_7 = NULL;
      size_t __pyx_t_8;
      PyObject *__pyx_t_9[3];
      PyObject *__pyx_t_10 = NULL;
      int __pyx_t_11;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("drop_columns", 0);
      __Pyx_INCREF(__pyx_v_columns);

      /* "pyarrow/table.pxi":2433
 *         ----
 *         """
 *         if isinstance(columns, str):             # <<<<<<<<<<<<<<
 *             columns = [columns]
 * 
*/
      __pyx_t_1 = PyUnicode_Check(__pyx_v_columns); 
      if (__pyx_t_1) {

        /* "pyarrow/table.pxi":2434
 *         """
 *         if isinstance(columns, str):
 *             columns = [columns]             # <<<<<<<<<<<<<<
 * 
 *         indices = []
*/
        __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 2434, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_INCREF(__pyx_v_columns);
        __Pyx_GIVEREF(__pyx_v_columns);
        if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_v_columns) != (0)) __PYX_ERR(17, 2434, __pyx_L1_error);
        __Pyx_DECREF_SET(__pyx_v_columns, __pyx_t_2);
        __pyx_t_2 = 0;

        /* "pyarrow/table.pxi":2433
 *         ----
 *         """
 *         if isinstance(columns, str):             # <<<<<<<<<<<<<<
 *             columns = [columns]
 * 
*/
      }

      /* "pyarrow/table.pxi":2436
 *             columns = [columns]
 * 
 *         indices = []             # <<<<<<<<<<<<<<
 *         for col in columns:
 *             idx = self.schema.get_field_index(col)
*/
      __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 2436, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_v_indices = ((PyObject*)__pyx_t_2);
      __pyx_t_2 = 0;

      /* "pyarrow/table.pxi":2437
 * 
 *         indices = []
 *         for col in columns:             # <<<<<<<<<<<<<<
 *             idx = self.schema.get_field_index(col)
 *             if idx == -1:
*/
      if (likely(PyList_CheckExact(__pyx_v_columns)) || PyTuple_CheckExact(__pyx_v_columns)) {
        __pyx_t_2 = __pyx_v_columns; __Pyx_INCREF(__pyx_t_2);
        __pyx_t_3 = 0;
        __pyx_t_4 = NULL;
      } else {
        __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_columns); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 2437, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_4 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 2437, __pyx_L1_error)
      }
      for (;;) {
        if (likely(!__pyx_t_4)) {
          if (likely(PyList_CheckExact(__pyx_t_2))) {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2);
              #if !CYTHON_ASSUME_SAFE_SIZE
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(17, 2437, __pyx_L1_error)
              #endif
              if (__pyx_t_3 >= __pyx_temp) break;
            }
            __pyx_t_5 = __Pyx_PyList_GetItemRefFast(__pyx_t_2, __pyx_t_3, __Pyx_ReferenceSharing_OwnStrongReference);
            ++__pyx_t_3;
          } else {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2);
              #if !CYTHON_ASSUME_SAFE_SIZE
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(17, 2437, __pyx_L1_error)
              #endif
              if (__pyx_t_3 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_5 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3));
            #else
            __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_3);
            #endif
            ++__pyx_t_3;
          }
          if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 2437, __pyx_L1_error)
        } else {
          __pyx_t_5 = __pyx_t_4(__pyx_t_2);
          if (unlikely(!__pyx_t_5)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(17, 2437, __pyx_L1_error)
              PyErr_Clear();
            }
            break;
          }
        }
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_XDECREF_SET(__pyx_v_col, __pyx_t_5);
        __pyx_t_5 = 0;

        /* "pyarrow/table.pxi":2438
 *         indices = []
 *         for col in columns:
 *             idx = self.schema.get_field_index(col)             # <<<<<<<<<<<<<<
 *             if idx == -1:
 *                 raise KeyError(f"Column {col!r} not found")
*/
        __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_schema); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 2438, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_6 = __pyx_t_7;
        __Pyx_INCREF(__pyx_t_6);
        __pyx_t_8 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_col};
          __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_field_index, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 2438, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
        }
        __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_5);
        __pyx_t_5 = 0;

        /* "pyarrow/table.pxi":2439
 *         for col in columns:
 *             idx = self.schema.get_field_index(col)
 *             if idx == -1:             # <<<<<<<<<<<<<<
 *                 raise KeyError(f"Column {col!r} not found")
 *             indices.append(idx)
*/
        __pyx_t_1 = (__Pyx_PyLong_BoolEqObjC(__pyx_v_idx, __pyx_mstate_global->__pyx_int_neg_1, -1L, 0)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(17, 2439, __pyx_L1_error)
        if (unlikely(__pyx_t_1)) {

          /* "pyarrow/table.pxi":2440
 *             idx = self.schema.get_field_index(col)
 *             if idx == -1:
 *                 raise KeyError(f"Column {col!r} not found")             # <<<<<<<<<<<<<<
 *             indices.append(idx)
 * 
*/
          __pyx_t_7 = NULL;
          __pyx_t_6 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_col), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 2440, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_t_9[0] = __pyx_mstate_global->__pyx_kp_u_Column;
          __pyx_t_9[1] = __pyx_t_6;
          __pyx_t_9[2] = __pyx_mstate_global->__pyx_kp_u_not_found;
          __pyx_t_10 = __Pyx_PyUnicode_Join(__pyx_t_9, 3, 7 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6) + 10, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6));
          if (unlikely(!__pyx_t_10)) __PYX_ERR(17, 2440, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_10);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __pyx_t_8 = 1;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_10};
            __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_KeyError)), __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
            if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 2440, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
          }
          __Pyx_Raise(__pyx_t_5, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __PYX_ERR(17, 2440, __pyx_L1_error)

          /* "pyarrow/table.pxi":2439
 *         for col in columns:
 *             idx = self.schema.get_field_index(col)
 *             if idx == -1:             # <<<<<<<<<<<<<<
 *                 raise KeyError(f"Column {col!r} not found")
 *             indices.append(idx)
*/
        }

        /* "pyarrow/table.pxi":2441
 *             if idx == -1:
 *                 raise KeyError(f"Column {col!r} not found")
 *             indices.append(idx)             # <<<<<<<<<<<<<<
 * 
 *         indices.sort()
*/
        __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_indices, __pyx_v_idx); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(17, 2441, __pyx_L1_error)

        /* "pyarrow/table.pxi":2437
 * 
 *         indices = []
 *         for col in columns:             # <<<<<<<<<<<<<<
 *             idx = self.schema.get_field_index(col)
 *             if idx == -1:
*/
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyarrow/table.pxi":2443
 *             indices.append(idx)
 * 
 *         indices.sort()             # <<<<<<<<<<<<<<
 *         indices.reverse()
 * 
*/
      __pyx_t_11 = PyList_Sort(__pyx_v_indices); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(17, 2443, __pyx_L1_error)

      /* "pyarrow/table.pxi":2444
 * 
 *         indices.sort()
 *         indices.reverse()             # <<<<<<<<<<<<<<
 * 
 *         res = self
*/
      __pyx_t_11 = PyList_Reverse(__pyx_v_indices); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(17, 2444, __pyx_L1_error)

      /* "pyarrow/table.pxi":2446
 *         indices.reverse()
 * 
 *         res = self             # <<<<<<<<<<<<<<
 *         for idx in indices:
 *             res = res.remove_column(idx)
*/
      __Pyx_INCREF((PyObject *)__pyx_v_self);
      __pyx_v_res = ((PyObject *)__pyx_v_self);

      /* "pyarrow/table.pxi":2447
 * 
 *         res = self
 *         for idx in indices:             # <<<<<<<<<<<<<<
 *             res = res.remove_column(idx)
 * 
*/
      __pyx_t_2 = __pyx_v_indices; __Pyx_INCREF(__pyx_t_2);
      __pyx_t_3 = 0;
      for (;;) {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2);
          #if !CYTHON_ASSUME_SAFE_SIZE
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(17, 2447, __pyx_L1_error)
          #endif
          if (__pyx_t_3 >= __pyx_temp) break;
        }
        __pyx_t_5 = __Pyx_PyList_GetItemRefFast(__pyx_t_2, __pyx_t_3, __Pyx_ReferenceSharing_OwnStrongReference);
        ++__pyx_t_3;
        if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 2447, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_5);
        __pyx_t_5 = 0;

        /* "pyarrow/table.pxi":2448
 *         res = self
 *         for idx in indices:
 *             res = res.remove_column(idx)             # <<<<<<<<<<<<<<
 * 
 *         return res
*/
        __pyx_t_10 = __pyx_v_res;
        __Pyx_INCREF(__pyx_t_10);
        __pyx_t_8 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_v_idx};
          __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_remove_column, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
          if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 2448, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
        }
        __Pyx_DECREF_SET(__pyx_v_res, __pyx_t_5);
        __pyx_t_5 = 0;

        /* "pyarrow/table.pxi":2447
 * 
 *         res = self
 *         for idx in indices:             # <<<<<<<<<<<<<<
 *             res = res.remove_column(idx)
 * 
*/
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyarrow/table.pxi":2450
 *             res = res.remove_column(idx)
 * 
 *         return res             # <<<<<<<<<<<<<<
 * 
 *     def add_column(self, int i, field_, column):
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_res);
      __pyx_r = __pyx_v_res;
      goto __pyx_L0;

      /* "pyarrow/table.pxi":2389
 *         raise NotImplementedError
 * 
 *     def drop_columns(self, columns):             # <<<<<<<<<<<<<<
 *         """
 *         Drop one or more columns and return a new Table or RecordBatch.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_10);
      __Pyx_AddTraceback("pyarrow.lib._Tabular.drop_columns", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_indices);
      __Pyx_XDECREF(__pyx_v_col);
      __Pyx_XDECREF(__pyx_v_idx);
      __Pyx_XDECREF(__pyx_v_res);
      __Pyx_XDECREF(__pyx_v_columns);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/table.pxi":2452
 *         return res
 * 
 *     def add_column(self, int i, field_, column):             # <<<<<<<<<<<<<<
 *         # implemented in RecordBatch/Table subclasses
 *         raise NotImplementedError
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_8_Tabular_50add_column(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_8_Tabular_49add_column, "_Tabular.add_column(self, int i, field_, column)");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_8_Tabular_50add_column = {"add_column", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_8_Tabular_50add_column, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_8_Tabular_49add_column};
    static PyObject *__pyx_pw_7pyarrow_3lib_8_Tabular_50add_column(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      CYTHON_UNUSED int __pyx_v_i;
      CYTHON_UNUSED PyObject *__pyx_v_field_ = 0;
      CYTHON_UNUSED PyObject *__pyx_v_column = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[3] = {0,0,0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("add_column (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_i,&__pyx_mstate_global->__pyx_n_u_field_3,&__pyx_mstate_global->__pyx_n_u_column,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(17, 2452, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  3:
            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(17, 2452, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(17, 2452, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 2452, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "add_column", 0) < (0)) __PYX_ERR(17, 2452, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("add_column", 1, 3, 3, i); __PYX_ERR(17, 2452, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 3)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 2452, __pyx_L3_error)
          values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(17, 2452, __pyx_L3_error)
          values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(17, 2452, __pyx_L3_error)
        }
        __pyx_v_i = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_i == (int)-1) && PyErr_Occurred())) __PYX_ERR(17, 2452, __pyx_L3_error)
        __pyx_v_field_ = values[1];
        __pyx_v_column = values[2];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("add_column", 1, 3, 3, __pyx_nargs); __PYX_ERR(17, 2452, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib._Tabular.add_column", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_8_Tabular_49add_column(((struct __pyx_obj_7pyarrow_3lib__Tabular *)__pyx_v_self), __pyx_v_i, __pyx_v_field_, __pyx_v_column);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_8_Tabular_49add_column(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib__Tabular *__pyx_v_self, CYTHON_UNUSED int __pyx_v_i, CYTHON_UNUSED PyObject *__pyx_v_field_, CYTHON_UNUSED PyObject *__pyx_v_column) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("add_column", 0);

      /* "pyarrow/table.pxi":2454
 *     def add_column(self, int i, field_, column):
 *         # implemented in RecordBatch/Table subclasses
 *         raise NotImplementedError             # <<<<<<<<<<<<<<
 * 
 *     def append_column(self, field_, column):
*/
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_NotImplementedError))), 0, 0, 0);
      __PYX_ERR(17, 2454, __pyx_L1_error)

      /* "pyarrow/table.pxi":2452
 *         return res
 * 
 *     def add_column(self, int i, field_, column):             # <<<<<<<<<<<<<<
 *         # implemented in RecordBatch/Table subclasses
 *         raise NotImplementedError
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_AddTraceback("pyarrow.lib._Tabular.add_column", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/table.pxi":2456
 *         raise NotImplementedError
 * 
 *     def append_column(self, field_, column):             # <<<<<<<<<<<<<<
 *         """
 *         Append column at end of columns.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_8_Tabular_52append_column(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_8_Tabular_51append_column, "_Tabular.append_column(self, field_, column)\n\nAppend column at end of columns.\n\nParameters\n----------\nfield_ : str or Field\n    If a string is passed then the type is deduced from the column\n    data.\ncolumn : Array or value coercible to array\n    Column data.\n\nReturns\n-------\nTable or RecordBatch\n    New table or record batch with the passed column added.\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> import pandas as pd\n>>> df = pd.DataFrame({'n_legs': [2, 4, 5, 100],\n...                    'animals': [\"Flamingo\", \"Horse\", \"Brittle stars\", \"Centipede\"]})\n>>> table = pa.Table.from_pandas(df)\n\nAppend column at the end:\n\n>>> year = [2021, 2022, 2019, 2021]\n>>> table.append_column('year', [year])\npyarrow.Table\nn_legs: int64\nanimals: string\nyear: int64\n----\nn_legs: [[2,4,5,100]]\nanimals: [[\"Flamingo\",\"Horse\",\"Brittle stars\",\"Centipede\"]]\nyear: [[2021,2022,2019,2021]]");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_8_Tabular_52append_column = {"append_column", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_8_Tabular_52append_column, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_8_Tabular_51append_column};
    static PyObject *__pyx_pw_7pyarrow_3lib_8_Tabular_52append_column(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_field_ = 0;
      PyObject *__pyx_v_column = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[2] = {0,0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("append_column (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_field_3,&__pyx_mstate_global->__pyx_n_u_column,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(17, 2456, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(17, 2456, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 2456, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "append_column", 0) < (0)) __PYX_ERR(17, 2456, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("append_column", 1, 2, 2, i); __PYX_ERR(17, 2456, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 2)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 2456, __pyx_L3_error)
          values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(17, 2456, __pyx_L3_error)
        }
        __pyx_v_field_ = values[0];
        __pyx_v_column = values[1];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("append_column", 1, 2, 2, __pyx_nargs); __PYX_ERR(17, 2456, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib._Tabular.append_column", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_8_Tabular_51append_column(((struct __pyx_obj_7pyarrow_3lib__Tabular *)__pyx_v_self), __pyx_v_field_, __pyx_v_column);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_8_Tabular_51append_column(struct __pyx_obj_7pyarrow_3lib__Tabular *__pyx_v_self, PyObject *__pyx_v_field_, PyObject *__pyx_v_column) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      size_t __pyx_t_4;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("append_column", 0);

      /* "pyarrow/table.pxi":2494
 *         year: [[2021,2022,2019,2021]]
 *         """
 *         return self.add_column(self.num_columns, field_, column)             # <<<<<<<<<<<<<<
 * 
 *     cdef void _assert_cpu(self) except *:
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = ((PyObject *)__pyx_v_self);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_num_columns); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 2494, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = 0;
      {
        PyObject *__pyx_callargs[4] = {__pyx_t_2, __pyx_t_3, __pyx_v_field_, __pyx_v_column};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_add_column, __pyx_callargs+__pyx_t_4, (4-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 2494, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/table.pxi":2456
 *         raise NotImplementedError
 * 
 *     def append_column(self, field_, column):             # <<<<<<<<<<<<<<
 *         """
 *         Append column at end of columns.
*/

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

    /* "pyarrow/table.pxi":2496
 *         return self.add_column(self.num_columns, field_, column)
 * 
 *     cdef void _assert_cpu(self) except *:             # <<<<<<<<<<<<<<
 *         return
 * 
*/

    static void __pyx_f_7pyarrow_3lib_8_Tabular__assert_cpu(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib__Tabular *__pyx_v_self) {

      /* "pyarrow/table.pxi":2497
 * 
 *     cdef void _assert_cpu(self) except *:
 *         return             # <<<<<<<<<<<<<<
 * 
 * 
*/
      goto __pyx_L0;

      /* "pyarrow/table.pxi":2496
 *         return self.add_column(self.num_columns, field_, column)
 * 
 *     cdef void _assert_cpu(self) except *:             # <<<<<<<<<<<<<<
 *         return
 * 
*/

      /* function exit code */
      __pyx_L0:;
    }

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

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_8_Tabular_54__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_8_Tabular_53__reduce_cython__, "_Tabular.__reduce_cython__(self)");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_8_Tabular_54__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_8_Tabular_54__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_8_Tabular_53__reduce_cython__};
    static PyObject *__pyx_pw_7pyarrow_3lib_8_Tabular_54__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; }
      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
      if (unlikely(__pyx_kwds_len < 0)) return NULL;
      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;}
      __pyx_r = __pyx_pf_7pyarrow_3lib_8_Tabular_53__reduce_cython__(((struct __pyx_obj_7pyarrow_3lib__Tabular *)__pyx_v_self));

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

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

      /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = ()             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None and _dict:
*/
      __Pyx_INCREF(__pyx_mstate_global->__pyx_empty_tuple);
      __pyx_v_state = __pyx_mstate_global->__pyx_empty_tuple;

      /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = ()
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None and _dict:
 *         state += (_dict,)
*/
      __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 6, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_v__dict = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "(tree fragment)":7
 *     state = ()
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None and _dict:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
*/
      __pyx_t_3 = (__pyx_v__dict != Py_None);
      if (__pyx_t_3) {
      } else {
        __pyx_t_2 = __pyx_t_3;
        goto __pyx_L4_bool_binop_done;
      }
      __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v__dict); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(7, 7, __pyx_L1_error)
      __pyx_t_2 = __pyx_t_3;
      __pyx_L4_bool_binop_done:;
      if (__pyx_t_2) {

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

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

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

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

      /* "(tree fragment)":12
 *     else:
 *         use_setstate = False
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle__Tabular, (type(self), 0xe3b0c44, None), state
 *     else:
*/
      if (__pyx_v_use_setstate) {

        /* "(tree fragment)":13
 *         use_setstate = False
 *     if use_setstate:
 *         return __pyx_unpickle__Tabular, (type(self), 0xe3b0c44, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle__Tabular, (type(self), 0xe3b0c44, state)
*/
        __Pyx_XDECREF(__pyx_r);
        __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_pyx_unpickle__Tabular); if (unlikely(!__pyx_t_4)) __PYX_ERR(7, 13, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 13, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
        __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(7, 13, __pyx_L1_error);
        __Pyx_INCREF(__pyx_mstate_global->__pyx_int_238750788);
        __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_238750788);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_238750788) != (0)) __PYX_ERR(7, 13, __pyx_L1_error);
        __Pyx_INCREF(Py_None);
        __Pyx_GIVEREF(Py_None);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None) != (0)) __PYX_ERR(7, 13, __pyx_L1_error);
        __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(7, 13, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_GIVEREF(__pyx_t_4);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4) != (0)) __PYX_ERR(7, 13, __pyx_L1_error);
        __Pyx_GIVEREF(__pyx_t_1);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1) != (0)) __PYX_ERR(7, 13, __pyx_L1_error);
        __Pyx_INCREF(__pyx_v_state);
        __Pyx_GIVEREF(__pyx_v_state);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state) != (0)) __PYX_ERR(7, 13, __pyx_L1_error);
        __pyx_t_4 = 0;
        __pyx_t_1 = 0;
        __pyx_r = __pyx_t_5;
        __pyx_t_5 = 0;
        goto __pyx_L0;

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

      /* "(tree fragment)":15
 *         return __pyx_unpickle__Tabular, (type(self), 0xe3b0c44, None), state
 *     else:
 *         return __pyx_unpickle__Tabular, (type(self), 0xe3b0c44, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle__Tabular__set_state(self, __pyx_state)
*/
      /*else*/ {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pyx_unpickle__Tabular); if (unlikely(!__pyx_t_5)) __PYX_ERR(7, 15, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 15, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
        __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(7, 15, __pyx_L1_error);
        __Pyx_INCREF(__pyx_mstate_global->__pyx_int_238750788);
        __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_238750788);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_238750788) != (0)) __PYX_ERR(7, 15, __pyx_L1_error);
        __Pyx_INCREF(__pyx_v_state);
        __Pyx_GIVEREF(__pyx_v_state);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state) != (0)) __PYX_ERR(7, 15, __pyx_L1_error);
        __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(7, 15, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_GIVEREF(__pyx_t_5);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5) != (0)) __PYX_ERR(7, 15, __pyx_L1_error);
        __Pyx_GIVEREF(__pyx_t_1);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1) != (0)) __PYX_ERR(7, 15, __pyx_L1_error);
        __pyx_t_5 = 0;
        __pyx_t_1 = 0;
        __pyx_r = __pyx_t_4;
        __pyx_t_4 = 0;
        goto __pyx_L0;
      }

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

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_AddTraceback("pyarrow.lib._Tabular.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_state);
      __Pyx_XDECREF(__pyx_v__dict);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle__Tabular, (type(self), 0xe3b0c44, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle__Tabular__set_state(self, __pyx_state)
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_8_Tabular_56__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_8_Tabular_55__setstate_cython__, "_Tabular.__setstate_cython__(self, __pyx_state)");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_8_Tabular_56__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_8_Tabular_56__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_8_Tabular_55__setstate_cython__};
    static PyObject *__pyx_pw_7pyarrow_3lib_8_Tabular_56__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v___pyx_state = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(7, 16, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(7, 16, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(7, 16, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(7, 16, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 1)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(7, 16, __pyx_L3_error)
        }
        __pyx_v___pyx_state = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(7, 16, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib._Tabular.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_8_Tabular_55__setstate_cython__(((struct __pyx_obj_7pyarrow_3lib__Tabular *)__pyx_v_self), __pyx_v___pyx_state);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

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

      /* "(tree fragment)":17
 *         return __pyx_unpickle__Tabular, (type(self), 0xe3b0c44, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle__Tabular__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
*/
      __pyx_t_1 = __pyx_v___pyx_state;
      __Pyx_INCREF(__pyx_t_1);
      if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(7, 17, __pyx_L1_error)
      if (unlikely(__pyx_t_1 == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'");
        __PYX_ERR(7, 17, __pyx_L1_error)
      }
      __pyx_t_2 = __pyx_f_7pyarrow_3lib___pyx_unpickle__Tabular__set_state(__pyx_v_self, ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 17, __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;

      /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle__Tabular, (type(self), 0xe3b0c44, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle__Tabular__set_state(self, __pyx_state)
*/

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

    /* "pyarrow/table.pxi":2597
 *     """
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self.batch = NULL
 *         self._schema = None
*/

    /* Python wrapper */
    static int __pyx_pw_7pyarrow_3lib_11RecordBatch_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
    static int __pyx_pw_7pyarrow_3lib_11RecordBatch_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      int __pyx_r;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
      #endif
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, __pyx_nargs); return -1; }
      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
      if (unlikely(__pyx_kwds_len < 0)) return -1;
      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__cinit__", __pyx_kwds); return -1;}
      __pyx_r = __pyx_pf_7pyarrow_3lib_11RecordBatch___cinit__(((struct __pyx_obj_7pyarrow_3lib_RecordBatch *)__pyx_v_self));

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

    static int __pyx_pf_7pyarrow_3lib_11RecordBatch___cinit__(struct __pyx_obj_7pyarrow_3lib_RecordBatch *__pyx_v_self) {
      int __pyx_r;
      __Pyx_RefNannyDeclarations
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__cinit__", 0);

      /* "pyarrow/table.pxi":2598
 * 
 *     def __cinit__(self):
 *         self.batch = NULL             # <<<<<<<<<<<<<<
 *         self._schema = None
 * 
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "batch");
        __PYX_ERR(17, 2598, __pyx_L1_error)
      }
      __pyx_v_self->batch = NULL;

      /* "pyarrow/table.pxi":2599
 *     def __cinit__(self):
 *         self.batch = NULL
 *         self._schema = None             # <<<<<<<<<<<<<<
 * 
 *     cdef void init(self, const shared_ptr[CRecordBatch]& batch):
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_schema");
        __PYX_ERR(17, 2599, __pyx_L1_error)
      }
      __Pyx_INCREF(Py_None);
      __Pyx_GIVEREF(Py_None);
      __Pyx_GOTREF((PyObject *)__pyx_v_self->_schema);
      __Pyx_DECREF((PyObject *)__pyx_v_self->_schema);
      __pyx_v_self->_schema = ((struct __pyx_obj_7pyarrow_3lib_Schema *)Py_None);

      /* "pyarrow/table.pxi":2597
 *     """
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self.batch = NULL
 *         self._schema = None
*/

      /* function exit code */
      __pyx_r = 0;
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_AddTraceback("pyarrow.lib.RecordBatch.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = -1;
      __pyx_L0:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/table.pxi":2601
 *         self._schema = None
 * 
 *     cdef void init(self, const shared_ptr[CRecordBatch]& batch):             # <<<<<<<<<<<<<<
 *         self.sp_batch = batch
 *         self.batch = batch.get()
*/

    static void __pyx_f_7pyarrow_3lib_11RecordBatch_init(struct __pyx_obj_7pyarrow_3lib_RecordBatch *__pyx_v_self, std::shared_ptr< arrow::RecordBatch>  const &__pyx_v_batch) {
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;

      /* "pyarrow/table.pxi":2602
 * 
 *     cdef void init(self, const shared_ptr[CRecordBatch]& batch):
 *         self.sp_batch = batch             # <<<<<<<<<<<<<<
 *         self.batch = batch.get()
 * 
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_batch");
        __PYX_ERR(17, 2602, __pyx_L1_error)
      }
      __pyx_v_self->sp_batch = __pyx_v_batch;

      /* "pyarrow/table.pxi":2603
 *     cdef void init(self, const shared_ptr[CRecordBatch]& batch):
 *         self.sp_batch = batch
 *         self.batch = batch.get()             # <<<<<<<<<<<<<<
 * 
 *     def _is_initialized(self):
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "batch");
        __PYX_ERR(17, 2603, __pyx_L1_error)
      }
      __pyx_v_self->batch = __pyx_v_batch.get();

      /* "pyarrow/table.pxi":2601
 *         self._schema = None
 * 
 *     cdef void init(self, const shared_ptr[CRecordBatch]& batch):             # <<<<<<<<<<<<<<
 *         self.sp_batch = batch
 *         self.batch = batch.get()
*/

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_AddTraceback("pyarrow.lib.RecordBatch.init", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_L0:;
    }

    /* "pyarrow/table.pxi":2605
 *         self.batch = batch.get()
 * 
 *     def _is_initialized(self):             # <<<<<<<<<<<<<<
 *         return self.batch != NULL
 * 
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_11RecordBatch_3_is_initialized(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_11RecordBatch_2_is_initialized, "RecordBatch._is_initialized(self)");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_11RecordBatch_3_is_initialized = {"_is_initialized", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_11RecordBatch_3_is_initialized, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_11RecordBatch_2_is_initialized};
    static PyObject *__pyx_pw_7pyarrow_3lib_11RecordBatch_3_is_initialized(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("_is_initialized (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("_is_initialized", 1, 0, 0, __pyx_nargs); return NULL; }
      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
      if (unlikely(__pyx_kwds_len < 0)) return NULL;
      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("_is_initialized", __pyx_kwds); return NULL;}
      __pyx_r = __pyx_pf_7pyarrow_3lib_11RecordBatch_2_is_initialized(((struct __pyx_obj_7pyarrow_3lib_RecordBatch *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_11RecordBatch_2_is_initialized(struct __pyx_obj_7pyarrow_3lib_RecordBatch *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("_is_initialized", 0);

      /* "pyarrow/table.pxi":2606
 * 
 *     def _is_initialized(self):
 *         return self.batch != NULL             # <<<<<<<<<<<<<<
 * 
 *     def __reduce__(self):
*/
      __Pyx_XDECREF(__pyx_r);
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "batch");
        __PYX_ERR(17, 2606, __pyx_L1_error)
      }
      __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_self->batch != NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 2606, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/table.pxi":2605
 *         self.batch = batch.get()
 * 
 *     def _is_initialized(self):             # <<<<<<<<<<<<<<
 *         return self.batch != NULL
 * 
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("pyarrow.lib.RecordBatch._is_initialized", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/table.pxi":2608
 *         return self.batch != NULL
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         self._assert_cpu()
 *         return _reconstruct_record_batch, (self.columns, self.schema)
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_11RecordBatch_5__reduce__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_11RecordBatch_4__reduce__, "RecordBatch.__reduce__(self)");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_11RecordBatch_5__reduce__ = {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_11RecordBatch_5__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_11RecordBatch_4__reduce__};
    static PyObject *__pyx_pw_7pyarrow_3lib_11RecordBatch_5__reduce__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__reduce__ (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce__", 1, 0, 0, __pyx_nargs); return NULL; }
      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
      if (unlikely(__pyx_kwds_len < 0)) return NULL;
      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce__", __pyx_kwds); return NULL;}
      __pyx_r = __pyx_pf_7pyarrow_3lib_11RecordBatch_4__reduce__(((struct __pyx_obj_7pyarrow_3lib_RecordBatch *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_11RecordBatch_4__reduce__(struct __pyx_obj_7pyarrow_3lib_RecordBatch *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__reduce__", 0);

      /* "pyarrow/table.pxi":2609
 * 
 *     def __reduce__(self):
 *         self._assert_cpu()             # <<<<<<<<<<<<<<
 *         return _reconstruct_record_batch, (self.columns, self.schema)
 * 
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_assert_cpu");
        __PYX_ERR(17, 2609, __pyx_L1_error)
      }
      ((struct __pyx_vtabstruct_7pyarrow_3lib_RecordBatch *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._assert_cpu(((struct __pyx_obj_7pyarrow_3lib__Tabular *)__pyx_v_self)); if (unlikely(PyErr_Occurred())) __PYX_ERR(17, 2609, __pyx_L1_error)

      /* "pyarrow/table.pxi":2610
 *     def __reduce__(self):
 *         self._assert_cpu()
 *         return _reconstruct_record_batch, (self.columns, self.schema)             # <<<<<<<<<<<<<<
 * 
 *     def validate(self, *, full=False):
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_reconstruct_record_batch); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 2610, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_columns); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 2610, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_schema); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 2610, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 2610, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_2);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2) != (0)) __PYX_ERR(17, 2610, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_3);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3) != (0)) __PYX_ERR(17, 2610, __pyx_L1_error);
      __pyx_t_2 = 0;
      __pyx_t_3 = 0;
      __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 2610, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_1);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1) != (0)) __PYX_ERR(17, 2610, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_4);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_4) != (0)) __PYX_ERR(17, 2610, __pyx_L1_error);
      __pyx_t_1 = 0;
      __pyx_t_4 = 0;
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "pyarrow/table.pxi":2608
 *         return self.batch != NULL
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         self._assert_cpu()
 *         return _reconstruct_record_batch, (self.columns, self.schema)
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_AddTraceback("pyarrow.lib.RecordBatch.__reduce__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/table.pxi":2612
 *         return _reconstruct_record_batch, (self.columns, self.schema)
 * 
 *     def validate(self, *, full=False):             # <<<<<<<<<<<<<<
 *         """
 *         Perform validation checks.  An exception is raised if validation fails.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_11RecordBatch_7validate(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_11RecordBatch_6validate, "RecordBatch.validate(self, *, full=False)\n\nPerform validation checks.  An exception is raised if validation fails.\n\nBy default only cheap validation checks are run.  Pass `full=True`\nfor thorough validation checks (potentially O(n)).\n\nParameters\n----------\nfull : bool, default False\n    If True, run expensive checks, otherwise cheap checks only.\n\nRaises\n------\nArrowInvalid");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_11RecordBatch_7validate = {"validate", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_11RecordBatch_7validate, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_11RecordBatch_6validate};
    static PyObject *__pyx_pw_7pyarrow_3lib_11RecordBatch_7validate(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_full = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("validate (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_full,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(17, 2612, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, 0, __pyx_kwds_len, "validate", 0) < (0)) __PYX_ERR(17, 2612, __pyx_L3_error)
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_False));
        } else if (unlikely(__pyx_nargs != 0)) {
          goto __pyx_L5_argtuple_error;
        } else {
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_False));
        }
        __pyx_v_full = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("validate", 1, 0, 0, __pyx_nargs); __PYX_ERR(17, 2612, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.RecordBatch.validate", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_11RecordBatch_6validate(((struct __pyx_obj_7pyarrow_3lib_RecordBatch *)__pyx_v_self), __pyx_v_full);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_11RecordBatch_6validate(struct __pyx_obj_7pyarrow_3lib_RecordBatch *__pyx_v_self, PyObject *__pyx_v_full) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      int __pyx_t_1;
      int __pyx_t_2;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("validate", 0);

      /* "pyarrow/table.pxi":2628
 *         ArrowInvalid
 *         """
 *         if full:             # <<<<<<<<<<<<<<
 *             self._assert_cpu()
 *             with nogil:
*/
      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_full); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(17, 2628, __pyx_L1_error)
      if (__pyx_t_1) {

        /* "pyarrow/table.pxi":2629
 *         """
 *         if full:
 *             self._assert_cpu()             # <<<<<<<<<<<<<<
 *             with nogil:
 *                 check_status(self.batch.ValidateFull())
*/
        if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_assert_cpu");
          __PYX_ERR(17, 2629, __pyx_L1_error)
        }
        ((struct __pyx_vtabstruct_7pyarrow_3lib_RecordBatch *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._assert_cpu(((struct __pyx_obj_7pyarrow_3lib__Tabular *)__pyx_v_self)); if (unlikely(PyErr_Occurred())) __PYX_ERR(17, 2629, __pyx_L1_error)

        /* "pyarrow/table.pxi":2630
 *         if full:
 *             self._assert_cpu()
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 check_status(self.batch.ValidateFull())
 *         else:
*/
        {
            PyThreadState * _save;
            _save = PyEval_SaveThread();
            __Pyx_FastGIL_Remember();
            /*try:*/ {

              /* "pyarrow/table.pxi":2631
 *             self._assert_cpu()
 *             with nogil:
 *                 check_status(self.batch.ValidateFull())             # <<<<<<<<<<<<<<
 *         else:
 *             with nogil:
*/
              if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "batch");
                __Pyx_PyGILState_Release(__pyx_gilstate_save);
                __PYX_ERR(17, 2631, __pyx_L5_error)
              }
              __pyx_t_2 = __pyx_f_7pyarrow_3lib_check_status(__pyx_v_self->batch->ValidateFull()); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(17, 2631, __pyx_L5_error)
            }

            /* "pyarrow/table.pxi":2630
 *         if full:
 *             self._assert_cpu()
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 check_status(self.batch.ValidateFull())
 *         else:
*/
            /*finally:*/ {
              /*normal exit:*/{
                __Pyx_FastGIL_Forget();
                PyEval_RestoreThread(_save);
                goto __pyx_L6;
              }
              __pyx_L5_error: {
                __Pyx_FastGIL_Forget();
                PyEval_RestoreThread(_save);
                goto __pyx_L1_error;
              }
              __pyx_L6:;
            }
        }

        /* "pyarrow/table.pxi":2628
 *         ArrowInvalid
 *         """
 *         if full:             # <<<<<<<<<<<<<<
 *             self._assert_cpu()
 *             with nogil:
*/
        goto __pyx_L3;
      }

      /* "pyarrow/table.pxi":2633
 *                 check_status(self.batch.ValidateFull())
 *         else:
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 check_status(self.batch.Validate())
 * 
*/
      /*else*/ {
        {
            PyThreadState * _save;
            _save = PyEval_SaveThread();
            __Pyx_FastGIL_Remember();
            /*try:*/ {

              /* "pyarrow/table.pxi":2634
 *         else:
 *             with nogil:
 *                 check_status(self.batch.Validate())             # <<<<<<<<<<<<<<
 * 
 *     def replace_schema_metadata(self, metadata=None):
*/
              if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "batch");
                __Pyx_PyGILState_Release(__pyx_gilstate_save);
                __PYX_ERR(17, 2634, __pyx_L8_error)
              }
              __pyx_t_2 = __pyx_f_7pyarrow_3lib_check_status(__pyx_v_self->batch->Validate()); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(17, 2634, __pyx_L8_error)
            }

            /* "pyarrow/table.pxi":2633
 *                 check_status(self.batch.ValidateFull())
 *         else:
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 check_status(self.batch.Validate())
 * 
*/
            /*finally:*/ {
              /*normal exit:*/{
                __Pyx_FastGIL_Forget();
                PyEval_RestoreThread(_save);
                goto __pyx_L9;
              }
              __pyx_L8_error: {
                __Pyx_FastGIL_Forget();
                PyEval_RestoreThread(_save);
                goto __pyx_L1_error;
              }
              __pyx_L9:;
            }
        }
      }
      __pyx_L3:;

      /* "pyarrow/table.pxi":2612
 *         return _reconstruct_record_batch, (self.columns, self.schema)
 * 
 *     def validate(self, *, full=False):             # <<<<<<<<<<<<<<
 *         """
 *         Perform validation checks.  An exception is raised if validation fails.
*/

      /* function exit code */
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_AddTraceback("pyarrow.lib.RecordBatch.validate", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/table.pxi":2636
 *                 check_status(self.batch.Validate())
 * 
 *     def replace_schema_metadata(self, metadata=None):             # <<<<<<<<<<<<<<
 *         """
 *         Create shallow copy of record batch by replacing schema
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_11RecordBatch_9replace_schema_metadata(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_11RecordBatch_8replace_schema_metadata, "RecordBatch.replace_schema_metadata(self, metadata=None)\n\nCreate shallow copy of record batch by replacing schema\nkey-value metadata with the indicated new metadata (which may be None,\nwhich deletes any existing metadata\n\nParameters\n----------\nmetadata : dict, default None\n\nReturns\n-------\nshallow_copy : RecordBatch\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> n_legs = pa.array([2, 2, 4, 4, 5, 100])\n\nConstructing a RecordBatch with schema and metadata:\n\n>>> my_schema = pa.schema([\n...     pa.field('n_legs', pa.int64())],\n...     metadata={\"n_legs\": \"Number of legs per animal\"})\n>>> batch = pa.RecordBatch.from_arrays([n_legs], schema=my_schema)\n>>> batch.schema\nn_legs: int64\n-- schema metadata --\nn_legs: 'Number of legs per animal'\n\nShallow copy of a RecordBatch with deleted schema metadata:\n\n>>> batch.replace_schema_metadata().schema\nn_legs: int64");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_11RecordBatch_9replace_schema_metadata = {"replace_schema_metadata", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_11RecordBatch_9replace_schema_metadata, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_11RecordBatch_8replace_schema_metadata};
    static PyObject *__pyx_pw_7pyarrow_3lib_11RecordBatch_9replace_schema_metadata(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_metadata = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("replace_schema_metadata (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_metadata,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(17, 2636, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 2636, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "replace_schema_metadata", 0) < (0)) __PYX_ERR(17, 2636, __pyx_L3_error)
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
        } else {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 2636, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
        }
        __pyx_v_metadata = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("replace_schema_metadata", 0, 0, 1, __pyx_nargs); __PYX_ERR(17, 2636, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.RecordBatch.replace_schema_metadata", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_11RecordBatch_8replace_schema_metadata(((struct __pyx_obj_7pyarrow_3lib_RecordBatch *)__pyx_v_self), __pyx_v_metadata);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_11RecordBatch_8replace_schema_metadata(struct __pyx_obj_7pyarrow_3lib_RecordBatch *__pyx_v_self, PyObject *__pyx_v_metadata) {
      std::shared_ptr< arrow::KeyValueMetadata const >  __pyx_v_c_meta;
      std::shared_ptr< arrow::RecordBatch>  __pyx_v_c_batch;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      struct __pyx_opt_args_7pyarrow_3lib_ensure_metadata __pyx_t_2;
      std::shared_ptr< arrow::KeyValueMetadata const >  __pyx_t_3;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("replace_schema_metadata", 0);
      __Pyx_INCREF(__pyx_v_metadata);

      /* "pyarrow/table.pxi":2675
 *             shared_ptr[CRecordBatch] c_batch
 * 
 *         metadata = ensure_metadata(metadata, allow_none=True)             # <<<<<<<<<<<<<<
 *         c_meta = pyarrow_unwrap_metadata(metadata)
 *         with nogil:
*/
      __pyx_t_2.__pyx_n = 1;
      __pyx_t_2.allow_none = 1;
      __pyx_t_1 = ((PyObject *)__pyx_f_7pyarrow_3lib_ensure_metadata(__pyx_v_metadata, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 2675, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF_SET(__pyx_v_metadata, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "pyarrow/table.pxi":2676
 * 
 *         metadata = ensure_metadata(metadata, allow_none=True)
 *         c_meta = pyarrow_unwrap_metadata(metadata)             # <<<<<<<<<<<<<<
 *         with nogil:
 *             c_batch = self.batch.ReplaceSchemaMetadata(c_meta)
*/
      __pyx_t_3 = __pyx_f_7pyarrow_3lib_pyarrow_unwrap_metadata(__pyx_v_metadata); if (unlikely(PyErr_Occurred())) __PYX_ERR(17, 2676, __pyx_L1_error)
      __pyx_v_c_meta = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_3);

      /* "pyarrow/table.pxi":2677
 *         metadata = ensure_metadata(metadata, allow_none=True)
 *         c_meta = pyarrow_unwrap_metadata(metadata)
 *         with nogil:             # <<<<<<<<<<<<<<
 *             c_batch = self.batch.ReplaceSchemaMetadata(c_meta)
 * 
*/
      {
          PyThreadState * _save;
          _save = PyEval_SaveThread();
          __Pyx_FastGIL_Remember();
          /*try:*/ {

            /* "pyarrow/table.pxi":2678
 *         c_meta = pyarrow_unwrap_metadata(metadata)
 *         with nogil:
 *             c_batch = self.batch.ReplaceSchemaMetadata(c_meta)             # <<<<<<<<<<<<<<
 * 
 *         return pyarrow_wrap_batch(c_batch)
*/
            if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
              PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "batch");
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              __PYX_ERR(17, 2678, __pyx_L4_error)
            }
            __pyx_v_c_batch = __pyx_v_self->batch->ReplaceSchemaMetadata(__pyx_v_c_meta);
          }

          /* "pyarrow/table.pxi":2677
 *         metadata = ensure_metadata(metadata, allow_none=True)
 *         c_meta = pyarrow_unwrap_metadata(metadata)
 *         with nogil:             # <<<<<<<<<<<<<<
 *             c_batch = self.batch.ReplaceSchemaMetadata(c_meta)
 * 
*/
          /*finally:*/ {
            /*normal exit:*/{
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L5;
            }
            __pyx_L4_error: {
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L1_error;
            }
            __pyx_L5:;
          }
      }

      /* "pyarrow/table.pxi":2680
 *             c_batch = self.batch.ReplaceSchemaMetadata(c_meta)
 * 
 *         return pyarrow_wrap_batch(c_batch)             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = pyarrow_wrap_batch(__pyx_v_c_batch); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 2680, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/table.pxi":2636
 *                 check_status(self.batch.Validate())
 * 
 *     def replace_schema_metadata(self, metadata=None):             # <<<<<<<<<<<<<<
 *         """
 *         Create shallow copy of record batch by replacing schema
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("pyarrow.lib.RecordBatch.replace_schema_metadata", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_metadata);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/table.pxi":2682
 *         return pyarrow_wrap_batch(c_batch)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def num_columns(self):
 *         """
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_11RecordBatch_11num_columns_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_11RecordBatch_11num_columns_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_11RecordBatch_11num_columns___get__(((struct __pyx_obj_7pyarrow_3lib_RecordBatch *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_11RecordBatch_11num_columns___get__(struct __pyx_obj_7pyarrow_3lib_RecordBatch *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__get__", 0);

      /* "pyarrow/table.pxi":2701
 *         2
 *         """
 *         return self.batch.num_columns()             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
      __Pyx_XDECREF(__pyx_r);
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "batch");
        __PYX_ERR(17, 2701, __pyx_L1_error)
      }
      __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_v_self->batch->num_columns()); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 2701, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/table.pxi":2682
 *         return pyarrow_wrap_batch(c_batch)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def num_columns(self):
 *         """
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("pyarrow.lib.RecordBatch.num_columns.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/table.pxi":2703
 *         return self.batch.num_columns()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def num_rows(self):
 *         """
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_11RecordBatch_8num_rows_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_11RecordBatch_8num_rows_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_11RecordBatch_8num_rows___get__(((struct __pyx_obj_7pyarrow_3lib_RecordBatch *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_11RecordBatch_8num_rows___get__(struct __pyx_obj_7pyarrow_3lib_RecordBatch *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__get__", 0);

      /* "pyarrow/table.pxi":2725
 *         6
 *         """
 *         return self.batch.num_rows()             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
      __Pyx_XDECREF(__pyx_r);
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "batch");
        __PYX_ERR(17, 2725, __pyx_L1_error)
      }
      __pyx_t_1 = __Pyx_PyLong_From_int64_t(__pyx_v_self->batch->num_rows()); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 2725, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/table.pxi":2703
 *         return self.batch.num_columns()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def num_rows(self):
 *         """
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("pyarrow.lib.RecordBatch.num_rows.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/table.pxi":2727
 *         return self.batch.num_rows()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def schema(self):
 *         """
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_11RecordBatch_6schema_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_11RecordBatch_6schema_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_11RecordBatch_6schema___get__(((struct __pyx_obj_7pyarrow_3lib_RecordBatch *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_11RecordBatch_6schema___get__(struct __pyx_obj_7pyarrow_3lib_RecordBatch *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      int __pyx_t_1;
      PyObject *__pyx_t_2 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__get__", 0);

      /* "pyarrow/table.pxi":2747
 *         animals: string
 *         """
 *         if self._schema is None:             # <<<<<<<<<<<<<<
 *             self._schema = pyarrow_wrap_schema(self.batch.schema())
 * 
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_schema");
        __PYX_ERR(17, 2747, __pyx_L1_error)
      }
      __pyx_t_1 = (((PyObject *)__pyx_v_self->_schema) == Py_None);
      if (__pyx_t_1) {

        /* "pyarrow/table.pxi":2748
 *         """
 *         if self._schema is None:
 *             self._schema = pyarrow_wrap_schema(self.batch.schema())             # <<<<<<<<<<<<<<
 * 
 *         return self._schema
*/
        if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "batch");
          __PYX_ERR(17, 2748, __pyx_L1_error)
        }
        __pyx_t_2 = pyarrow_wrap_schema(__pyx_v_self->batch->schema()); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 2748, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Schema))))) __PYX_ERR(17, 2748, __pyx_L1_error)
        if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_schema");
          __PYX_ERR(17, 2748, __pyx_L1_error)
        }
        __Pyx_GIVEREF(__pyx_t_2);
        __Pyx_GOTREF((PyObject *)__pyx_v_self->_schema);
        __Pyx_DECREF((PyObject *)__pyx_v_self->_schema);
        __pyx_v_self->_schema = ((struct __pyx_obj_7pyarrow_3lib_Schema *)__pyx_t_2);
        __pyx_t_2 = 0;

        /* "pyarrow/table.pxi":2747
 *         animals: string
 *         """
 *         if self._schema is None:             # <<<<<<<<<<<<<<
 *             self._schema = pyarrow_wrap_schema(self.batch.schema())
 * 
*/
      }

      /* "pyarrow/table.pxi":2750
 *             self._schema = pyarrow_wrap_schema(self.batch.schema())
 * 
 *         return self._schema             # <<<<<<<<<<<<<<
 * 
 *     def _column(self, int i):
*/
      __Pyx_XDECREF(__pyx_r);
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_schema");
        __PYX_ERR(17, 2750, __pyx_L1_error)
      }
      __Pyx_INCREF((PyObject *)__pyx_v_self->_schema);
      __pyx_r = ((PyObject *)__pyx_v_self->_schema);
      goto __pyx_L0;

      /* "pyarrow/table.pxi":2727
 *         return self.batch.num_rows()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def schema(self):
 *         """
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_AddTraceback("pyarrow.lib.RecordBatch.schema.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/table.pxi":2752
 *         return self._schema
 * 
 *     def _column(self, int i):             # <<<<<<<<<<<<<<
 *         """
 *         Select single column from record batch by its numeric index.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_11RecordBatch_11_column(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_11RecordBatch_10_column, "RecordBatch._column(self, int i)\n\nSelect single column from record batch by its numeric index.\n\nParameters\n----------\ni : int\n    The index of the column to retrieve.\n\nReturns\n-------\ncolumn : pyarrow.Array");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_11RecordBatch_11_column = {"_column", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_11RecordBatch_11_column, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_11RecordBatch_10_column};
    static PyObject *__pyx_pw_7pyarrow_3lib_11RecordBatch_11_column(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      int __pyx_v_i;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("_column (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_i,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(17, 2752, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 2752, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_column", 0) < (0)) __PYX_ERR(17, 2752, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_column", 1, 1, 1, i); __PYX_ERR(17, 2752, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 1)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 2752, __pyx_L3_error)
        }
        __pyx_v_i = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_i == (int)-1) && PyErr_Occurred())) __PYX_ERR(17, 2752, __pyx_L3_error)
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("_column", 1, 1, 1, __pyx_nargs); __PYX_ERR(17, 2752, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.RecordBatch._column", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_11RecordBatch_10_column(((struct __pyx_obj_7pyarrow_3lib_RecordBatch *)__pyx_v_self), __pyx_v_i);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_11RecordBatch_10_column(struct __pyx_obj_7pyarrow_3lib_RecordBatch *__pyx_v_self, int __pyx_v_i) {
      int __pyx_v_index;
      struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_result = 0;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      Py_ssize_t __pyx_t_2;
      Py_ssize_t __pyx_t_3;
      PyObject *__pyx_t_4 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("_column", 0);

      /* "pyarrow/table.pxi":2765
 *         column : pyarrow.Array
 *         """
 *         cdef int index = <int> _normalize_index(i, self.num_columns)             # <<<<<<<<<<<<<<
 *         cdef Array result = pyarrow_wrap_array(self.batch.column(index))
 *         result._name = self.schema[index].name
*/
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_num_columns); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 2765, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(17, 2765, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_3 = __pyx_f_7pyarrow_3lib__normalize_index(__pyx_v_i, __pyx_t_2); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1L))) __PYX_ERR(17, 2765, __pyx_L1_error)
      __pyx_v_index = ((int)__pyx_t_3);

      /* "pyarrow/table.pxi":2766
 *         """
 *         cdef int index = <int> _normalize_index(i, self.num_columns)
 *         cdef Array result = pyarrow_wrap_array(self.batch.column(index))             # <<<<<<<<<<<<<<
 *         result._name = self.schema[index].name
 *         return result
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "batch");
        __PYX_ERR(17, 2766, __pyx_L1_error)
      }
      __pyx_t_1 = pyarrow_wrap_array(__pyx_v_self->batch->column(__pyx_v_index)); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 2766, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array))))) __PYX_ERR(17, 2766, __pyx_L1_error)
      __pyx_v_result = ((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_t_1);
      __pyx_t_1 = 0;

      /* "pyarrow/table.pxi":2767
 *         cdef int index = <int> _normalize_index(i, self.num_columns)
 *         cdef Array result = pyarrow_wrap_array(self.batch.column(index))
 *         result._name = self.schema[index].name             # <<<<<<<<<<<<<<
 *         return result
 * 
*/
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_schema); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 2767, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (unlikely(__pyx_t_1 == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(17, 2767, __pyx_L1_error)
      }
      __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_1, __pyx_v_index, int, 1, __Pyx_PyLong_From_int, 0, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 2767, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 2767, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(((PyObject *)__pyx_v_result) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_name");
        __PYX_ERR(17, 2767, __pyx_L1_error)
      }
      __Pyx_GIVEREF(__pyx_t_1);
      __Pyx_GOTREF(__pyx_v_result->_name);
      __Pyx_DECREF(__pyx_v_result->_name);
      __pyx_v_result->_name = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "pyarrow/table.pxi":2768
 *         cdef Array result = pyarrow_wrap_array(self.batch.column(index))
 *         result._name = self.schema[index].name
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF((PyObject *)__pyx_v_result);
      __pyx_r = ((PyObject *)__pyx_v_result);
      goto __pyx_L0;

      /* "pyarrow/table.pxi":2752
 *         return self._schema
 * 
 *     def _column(self, int i):             # <<<<<<<<<<<<<<
 *         """
 *         Select single column from record batch by its numeric index.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_AddTraceback("pyarrow.lib.RecordBatch._column", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF((PyObject *)__pyx_v_result);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/table.pxi":2770
 *         return result
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def nbytes(self):
 *         """
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_11RecordBatch_6nbytes_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7pyarrow_3lib_11RecordBatch_6nbytes_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7pyarrow_3lib_11RecordBatch_6nbytes___get__(((struct __pyx_obj_7pyarrow_3lib_RecordBatch *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_11RecordBatch_6nbytes___get__(struct __pyx_obj_7pyarrow_3lib_RecordBatch *__pyx_v_self) {
      arrow::Result<int64_t>  __pyx_v_c_res_buffer;
      int64_t __pyx_v_size;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      int64_t __pyx_t_1;
      PyObject *__pyx_t_2 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__get__", 0);

      /* "pyarrow/table.pxi":2796
 *         116
 *         """
 *         self._assert_cpu()             # <<<<<<<<<<<<<<
 *         cdef:
 *             CResult[int64_t] c_res_buffer
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_assert_cpu");
        __PYX_ERR(17, 2796, __pyx_L1_error)
      }
      ((struct __pyx_vtabstruct_7pyarrow_3lib_RecordBatch *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._assert_cpu(((struct __pyx_obj_7pyarrow_3lib__Tabular *)__pyx_v_self)); if (unlikely(PyErr_Occurred())) __PYX_ERR(17, 2796, __pyx_L1_error)

      /* "pyarrow/table.pxi":2800
 *             CResult[int64_t] c_res_buffer
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             c_res_buffer = ReferencedBufferSize(deref(self.batch))
 *             size = GetResultValue(c_res_buffer)
*/
      {
          PyThreadState * _save;
          _save = PyEval_SaveThread();
          __Pyx_FastGIL_Remember();
          /*try:*/ {

            /* "pyarrow/table.pxi":2801
 * 
 *         with nogil:
 *             c_res_buffer = ReferencedBufferSize(deref(self.batch))             # <<<<<<<<<<<<<<
 *             size = GetResultValue(c_res_buffer)
 *         return size
*/
            if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
              PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "batch");
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              __PYX_ERR(17, 2801, __pyx_L4_error)
            }
            __pyx_v_c_res_buffer = arrow::util::ReferencedBufferSize((*__pyx_v_self->batch));

            /* "pyarrow/table.pxi":2802
 *         with nogil:
 *             c_res_buffer = ReferencedBufferSize(deref(self.batch))
 *             size = GetResultValue(c_res_buffer)             # <<<<<<<<<<<<<<
 *         return size
 * 
*/
            __pyx_t_1 = arrow::py::GetResultValue<int64_t>(__pyx_v_c_res_buffer); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(17, 2802, __pyx_L4_error)
            __pyx_v_size = __pyx_t_1;
          }

          /* "pyarrow/table.pxi":2800
 *             CResult[int64_t] c_res_buffer
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             c_res_buffer = ReferencedBufferSize(deref(self.batch))
 *             size = GetResultValue(c_res_buffer)
*/
          /*finally:*/ {
            /*normal exit:*/{
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L5;
            }
            __pyx_L4_error: {
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L1_error;
            }
            __pyx_L5:;
          }
      }

      /* "pyarrow/table.pxi":2803
 *             c_res_buffer = ReferencedBufferSize(deref(self.batch))
 *             size = GetResultValue(c_res_buffer)
 *         return size             # <<<<<<<<<<<<<<
 * 
 *     def get_total_buffer_size(self):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = __Pyx_PyLong_From_int64_t(__pyx_v_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 2803, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;

      /* "pyarrow/table.pxi":2770
 *         return result
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def nbytes(self):
 *         """
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_AddTraceback("pyarrow.lib.RecordBatch.nbytes.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/table.pxi":2805
 *         return size
 * 
 *     def get_total_buffer_size(self):             # <<<<<<<<<<<<<<
 *         """
 *         The sum of bytes in each buffer referenced by the record batch
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_11RecordBatch_13get_total_buffer_size(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_11RecordBatch_12get_total_buffer_size, "RecordBatch.get_total_buffer_size(self)\n\nThe sum of bytes in each buffer referenced by the record batch\n\nAn array may only reference a portion of a buffer.\nThis method will overestimate in this case and return the\nbyte size of the entire buffer.\n\nIf a buffer is referenced multiple times then it will\nonly be counted once.\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> n_legs = pa.array([2, 2, 4, 4, 5, 100])\n>>> animals = pa.array([\"Flamingo\", \"Parrot\", \"Dog\", \"Horse\", \"Brittle stars\", \"Centipede\"])\n>>> batch = pa.RecordBatch.from_arrays([n_legs, animals],\n...                                     names=[\"n_legs\", \"animals\"])\n>>> batch.get_total_buffer_size()\n120");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_11RecordBatch_13get_total_buffer_size = {"get_total_buffer_size", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_11RecordBatch_13get_total_buffer_size, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_11RecordBatch_12get_total_buffer_size};
    static PyObject *__pyx_pw_7pyarrow_3lib_11RecordBatch_13get_total_buffer_size(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("get_total_buffer_size (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("get_total_buffer_size", 1, 0, 0, __pyx_nargs); return NULL; }
      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
      if (unlikely(__pyx_kwds_len < 0)) return NULL;
      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("get_total_buffer_size", __pyx_kwds); return NULL;}
      __pyx_r = __pyx_pf_7pyarrow_3lib_11RecordBatch_12get_total_buffer_size(((struct __pyx_obj_7pyarrow_3lib_RecordBatch *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_11RecordBatch_12get_total_buffer_size(struct __pyx_obj_7pyarrow_3lib_RecordBatch *__pyx_v_self) {
      int64_t __pyx_v_total_buffer_size;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("get_total_buffer_size", 0);

      /* "pyarrow/table.pxi":2826
 *         120
 *         """
 *         self._assert_cpu()             # <<<<<<<<<<<<<<
 *         cdef:
 *             int64_t total_buffer_size
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_assert_cpu");
        __PYX_ERR(17, 2826, __pyx_L1_error)
      }
      ((struct __pyx_vtabstruct_7pyarrow_3lib_RecordBatch *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._assert_cpu(((struct __pyx_obj_7pyarrow_3lib__Tabular *)__pyx_v_self)); if (unlikely(PyErr_Occurred())) __PYX_ERR(17, 2826, __pyx_L1_error)

      /* "pyarrow/table.pxi":2830
 *             int64_t total_buffer_size
 * 
 *         total_buffer_size = TotalBufferSize(deref(self.batch))             # <<<<<<<<<<<<<<
 *         return total_buffer_size
 * 
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "batch");
        __PYX_ERR(17, 2830, __pyx_L1_error)
      }
      __pyx_v_total_buffer_size = arrow::util::TotalBufferSize((*__pyx_v_self->batch));

      /* "pyarrow/table.pxi":2831
 * 
 *         total_buffer_size = TotalBufferSize(deref(self.batch))
 *         return total_buffer_size             # <<<<<<<<<<<<<<
 * 
 *     def __sizeof__(self):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __Pyx_PyLong_From_int64_t(__pyx_v_total_buffer_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 2831, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/table.pxi":2805
 *         return size
 * 
 *     def get_total_buffer_size(self):             # <<<<<<<<<<<<<<
 *         """
 *         The sum of bytes in each buffer referenced by the record batch
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("pyarrow.lib.RecordBatch.get_total_buffer_size", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/table.pxi":2833
 *         return total_buffer_size
 * 
 *     def __sizeof__(self):             # <<<<<<<<<<<<<<
 *         return super(RecordBatch, self).__sizeof__() + self.nbytes
 * 
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_11RecordBatch_15__sizeof__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_11RecordBatch_14__sizeof__, "RecordBatch.__sizeof__(self)");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_11RecordBatch_15__sizeof__ = {"__sizeof__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_11RecordBatch_15__sizeof__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_11RecordBatch_14__sizeof__};
    static PyObject *__pyx_pw_7pyarrow_3lib_11RecordBatch_15__sizeof__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__sizeof__ (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__sizeof__", 1, 0, 0, __pyx_nargs); return NULL; }
      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
      if (unlikely(__pyx_kwds_len < 0)) return NULL;
      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__sizeof__", __pyx_kwds); return NULL;}
      __pyx_r = __pyx_pf_7pyarrow_3lib_11RecordBatch_14__sizeof__(((struct __pyx_obj_7pyarrow_3lib_RecordBatch *)__pyx_v_self));

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

    static PyObject *__pyx_pf_7pyarrow_3lib_11RecordBatch_14__sizeof__(struct __pyx_obj_7pyarrow_3lib_RecordBatch *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      size_t __pyx_t_5;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("__sizeof__", 0);

      /* "pyarrow/table.pxi":2834
 * 
 *     def __sizeof__(self):
 *         return super(RecordBatch, self).__sizeof__() + self.nbytes             # <<<<<<<<<<<<<<
 * 
 *     def add_column(self, int i, field_, column):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_4 = NULL;
      __pyx_t_5 = 1;
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_4, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RecordBatch), ((PyObject *)__pyx_v_self)};
        __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_super, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 2834, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      __pyx_t_2 = __pyx_t_3;
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_5 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_sizeof, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 2834, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_nbytes); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 2834, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 2834, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;

      /* "pyarrow/table.pxi":2833
 *         return total_buffer_size
 * 
 *     def __sizeof__(self):             # <<<<<<<<<<<<<<
 *         return super(RecordBatch, self).__sizeof__() + self.nbytes
 * 
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_AddTraceback("pyarrow.lib.RecordBatch.__sizeof__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/table.pxi":2836
 *         return super(RecordBatch, self).__sizeof__() + self.nbytes
 * 
 *     def add_column(self, int i, field_, column):             # <<<<<<<<<<<<<<
 *         """
 *         Add column to RecordBatch at position i.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_11RecordBatch_17add_column(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_11RecordBatch_16add_column, "RecordBatch.add_column(self, int i, field_, column)\n\nAdd column to RecordBatch at position i.\n\nA new record batch is returned with the column added, the original record batch\nobject is left unchanged.\n\nParameters\n----------\ni : int\n    Index to place the column at.\nfield_ : str or Field\n    If a string is passed then the type is deduced from the column\n    data.\ncolumn : Array or value coercible to array\n    Column data.\n\nReturns\n-------\nRecordBatch\n    New record batch with the passed column added.\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> import pandas as pd\n>>> df = pd.DataFrame({'n_legs': [2, 4, 5, 100],\n...                    'animals': [\"Flamingo\", \"Horse\", \"Brittle stars\", \"Centipede\"]})\n>>> batch = pa.RecordBatch.from_pandas(df)\n\nAdd column:\n\n>>> year = [2021, 2022, 2019, 2021]\n>>> batch.add_column(0,\"year\", year)\npyarrow.RecordBatch\nyear: int64\nn_legs: int64\nanimals: string\n----\nyear: [2021,2022,2019,2021]\nn_legs: [2,4,5,100]\nanimals: [\"Flamingo\",\"Horse\",\"Brittle stars\",\"Centipede\"]\n\nOriginal record batch is left unchanged:\n\n>>> batch\npyarrow.RecordBatch\nn_legs: int64\nanimals: string\n----\nn_legs: [2,4,5,100]\nanimals: [\"Flamingo\",\"Horse\",\"Brittle stars\",\"Centipede\"]");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_11RecordBatch_17add_column = {"add_column", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_11RecordBatch_17add_column, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_11RecordBatch_16add_column};
    static PyObject *__pyx_pw_7pyarrow_3lib_11RecordBatch_17add_column(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      int __pyx_v_i;
      PyObject *__pyx_v_field_ = 0;
      PyObject *__pyx_v_column = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[3] = {0,0,0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("add_column (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_i,&__pyx_mstate_global->__pyx_n_u_field_3,&__pyx_mstate_global->__pyx_n_u_column,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(17, 2836, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  3:
            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(17, 2836, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(17, 2836, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 2836, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "add_column", 0) < (0)) __PYX_ERR(17, 2836, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("add_column", 1, 3, 3, i); __PYX_ERR(17, 2836, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 3)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 2836, __pyx_L3_error)
          values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(17, 2836, __pyx_L3_error)
          values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(17, 2836, __pyx_L3_error)
        }
        __pyx_v_i = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_i == (int)-1) && PyErr_Occurred())) __PYX_ERR(17, 2836, __pyx_L3_error)
        __pyx_v_field_ = values[1];
        __pyx_v_column = values[2];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("add_column", 1, 3, 3, __pyx_nargs); __PYX_ERR(17, 2836, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.RecordBatch.add_column", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_11RecordBatch_16add_column(((struct __pyx_obj_7pyarrow_3lib_RecordBatch *)__pyx_v_self), __pyx_v_i, __pyx_v_field_, __pyx_v_column);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_11RecordBatch_16add_column(struct __pyx_obj_7pyarrow_3lib_RecordBatch *__pyx_v_self, int __pyx_v_i, PyObject *__pyx_v_field_, PyObject *__pyx_v_column) {
      std::shared_ptr< arrow::RecordBatch>  __pyx_v_c_batch;
      struct __pyx_obj_7pyarrow_3lib_Field *__pyx_v_c_field = 0;
      struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_c_arr = 0;
      arrow::DeviceAllocationType __pyx_v_device_type;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      int __pyx_t_1;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      size_t __pyx_t_5;
      PyObject *__pyx_t_6 = NULL;
      PyObject *__pyx_t_7 = NULL;
      PyObject *__pyx_t_8[5];
      std::shared_ptr< arrow::RecordBatch>  __pyx_t_9;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("add_column", 0);

      /* "pyarrow/table.pxi":2893
 *             Field c_field
 *             Array c_arr
 *             CDeviceAllocationType device_type = self.sp_batch.get().device_type()             # <<<<<<<<<<<<<<
 * 
 *         if isinstance(column, Array):
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_batch");
        __PYX_ERR(17, 2893, __pyx_L1_error)
      }
      __pyx_v_device_type = __pyx_v_self->sp_batch.get()->device_type();

      /* "pyarrow/table.pxi":2895
 *             CDeviceAllocationType device_type = self.sp_batch.get().device_type()
 * 
 *         if isinstance(column, Array):             # <<<<<<<<<<<<<<
 *             c_arr = column
 *         else:
*/
      __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_column, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array); 
      if (__pyx_t_1) {

        /* "pyarrow/table.pxi":2896
 * 
 *         if isinstance(column, Array):
 *             c_arr = column             # <<<<<<<<<<<<<<
 *         else:
 *             c_arr = array(column)
*/
        __pyx_t_2 = __pyx_v_column;
        __Pyx_INCREF(__pyx_t_2);
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array))))) __PYX_ERR(17, 2896, __pyx_L1_error)
        __pyx_v_c_arr = ((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_t_2);
        __pyx_t_2 = 0;

        /* "pyarrow/table.pxi":2895
 *             CDeviceAllocationType device_type = self.sp_batch.get().device_type()
 * 
 *         if isinstance(column, Array):             # <<<<<<<<<<<<<<
 *             c_arr = column
 *         else:
*/
        goto __pyx_L3;
      }

      /* "pyarrow/table.pxi":2898
 *             c_arr = column
 *         else:
 *             c_arr = array(column)             # <<<<<<<<<<<<<<
 * 
 *         if device_type != c_arr.sp_array.get().device_type():
*/
      /*else*/ {
        __pyx_t_3 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_array); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 2898, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_column};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 2898, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array))))) __PYX_ERR(17, 2898, __pyx_L1_error)
        __pyx_v_c_arr = ((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_t_2);
        __pyx_t_2 = 0;
      }
      __pyx_L3:;

      /* "pyarrow/table.pxi":2900
 *             c_arr = array(column)
 * 
 *         if device_type != c_arr.sp_array.get().device_type():             # <<<<<<<<<<<<<<
 *             raise TypeError("The column must be allocated on the same "
 *                             "device as the RecordBatch. Got column on "
*/
      if (unlikely(((PyObject *)__pyx_v_c_arr) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_array");
        __PYX_ERR(17, 2900, __pyx_L1_error)
      }
      __pyx_t_1 = (__pyx_v_device_type != __pyx_v_c_arr->sp_array.get()->device_type());
      if (unlikely(__pyx_t_1)) {

        /* "pyarrow/table.pxi":2901
 * 
 *         if device_type != c_arr.sp_array.get().device_type():
 *             raise TypeError("The column must be allocated on the same "             # <<<<<<<<<<<<<<
 *                             "device as the RecordBatch. Got column on "
 *                             f"device {c_arr.device_type!r}, but expected "
*/
        __pyx_t_4 = NULL;

        /* "pyarrow/table.pxi":2903
 *             raise TypeError("The column must be allocated on the same "
 *                             "device as the RecordBatch. Got column on "
 *                             f"device {c_arr.device_type!r}, but expected "             # <<<<<<<<<<<<<<
 *                             f"{self.device_type!r}.")
 * 
*/
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_c_arr), __pyx_mstate_global->__pyx_n_u_device_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 2903, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_6 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_t_3), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 2903, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

        /* "pyarrow/table.pxi":2904
 *                             "device as the RecordBatch. Got column on "
 *                             f"device {c_arr.device_type!r}, but expected "
 *                             f"{self.device_type!r}.")             # <<<<<<<<<<<<<<
 * 
 *         if isinstance(field_, Field):
*/
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_device_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 2904, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_7 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_t_3), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 2904, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_8[0] = __pyx_mstate_global->__pyx_kp_u_The_column_must_be_allocated_on;
        __pyx_t_8[1] = __pyx_t_6;
        __pyx_t_8[2] = __pyx_mstate_global->__pyx_kp_u_but_expected;
        __pyx_t_8[3] = __pyx_t_7;
        __pyx_t_8[4] = __pyx_mstate_global->__pyx_kp_u_;

        /* "pyarrow/table.pxi":2901
 * 
 *         if device_type != c_arr.sp_array.get().device_type():
 *             raise TypeError("The column must be allocated on the same "             # <<<<<<<<<<<<<<
 *                             "device as the RecordBatch. Got column on "
 *                             f"device {c_arr.device_type!r}, but expected "
*/
        __pyx_t_3 = __Pyx_PyUnicode_Join(__pyx_t_8, 5, 89 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6) + 15 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7));
        if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 2901, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_5 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 2901, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __Pyx_Raise(__pyx_t_2, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __PYX_ERR(17, 2901, __pyx_L1_error)

        /* "pyarrow/table.pxi":2900
 *             c_arr = array(column)
 * 
 *         if device_type != c_arr.sp_array.get().device_type():             # <<<<<<<<<<<<<<
 *             raise TypeError("The column must be allocated on the same "
 *                             "device as the RecordBatch. Got column on "
*/
      }

      /* "pyarrow/table.pxi":2906
 *                             f"{self.device_type!r}.")
 * 
 *         if isinstance(field_, Field):             # <<<<<<<<<<<<<<
 *             c_field = field_
 *         else:
*/
      __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_field_, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Field); 
      if (__pyx_t_1) {

        /* "pyarrow/table.pxi":2907
 * 
 *         if isinstance(field_, Field):
 *             c_field = field_             # <<<<<<<<<<<<<<
 *         else:
 *             c_field = field(field_, c_arr.type)
*/
        __pyx_t_2 = __pyx_v_field_;
        __Pyx_INCREF(__pyx_t_2);
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Field))))) __PYX_ERR(17, 2907, __pyx_L1_error)
        __pyx_v_c_field = ((struct __pyx_obj_7pyarrow_3lib_Field *)__pyx_t_2);
        __pyx_t_2 = 0;

        /* "pyarrow/table.pxi":2906
 *                             f"{self.device_type!r}.")
 * 
 *         if isinstance(field_, Field):             # <<<<<<<<<<<<<<
 *             c_field = field_
 *         else:
*/
        goto __pyx_L5;
      }

      /* "pyarrow/table.pxi":2909
 *             c_field = field_
 *         else:
 *             c_field = field(field_, c_arr.type)             # <<<<<<<<<<<<<<
 * 
 *         with nogil:
*/
      /*else*/ {
        __pyx_t_3 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_field); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 2909, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        if (unlikely(((PyObject *)__pyx_v_c_arr) == Py_None)) {
          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "type");
          __PYX_ERR(17, 2909, __pyx_L1_error)
        }
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_field_, ((PyObject *)__pyx_v_c_arr->type)};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 2909, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Field))))) __PYX_ERR(17, 2909, __pyx_L1_error)
        __pyx_v_c_field = ((struct __pyx_obj_7pyarrow_3lib_Field *)__pyx_t_2);
        __pyx_t_2 = 0;
      }
      __pyx_L5:;

      /* "pyarrow/table.pxi":2911
 *             c_field = field(field_, c_arr.type)
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             c_batch = GetResultValue(self.batch.AddColumn(
 *                 i, c_field.sp_field, c_arr.sp_array))
*/
      {
          PyThreadState * _save;
          _save = PyEval_SaveThread();
          __Pyx_FastGIL_Remember();
          /*try:*/ {

            /* "pyarrow/table.pxi":2912
 * 
 *         with nogil:
 *             c_batch = GetResultValue(self.batch.AddColumn(             # <<<<<<<<<<<<<<
 *                 i, c_field.sp_field, c_arr.sp_array))
 * 
*/
            if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
              PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "batch");
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              __PYX_ERR(17, 2912, __pyx_L7_error)
            }

            /* "pyarrow/table.pxi":2913
 *         with nogil:
 *             c_batch = GetResultValue(self.batch.AddColumn(
 *                 i, c_field.sp_field, c_arr.sp_array))             # <<<<<<<<<<<<<<
 * 
 *         return pyarrow_wrap_batch(c_batch)
*/
            if (unlikely(((PyObject *)__pyx_v_c_field) == Py_None)) {
              PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_field");
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              __PYX_ERR(17, 2913, __pyx_L7_error)
            }
            if (unlikely(((PyObject *)__pyx_v_c_arr) == Py_None)) {
              PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_array");
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              __PYX_ERR(17, 2913, __pyx_L7_error)
            }

            /* "pyarrow/table.pxi":2912
 * 
 *         with nogil:
 *             c_batch = GetResultValue(self.batch.AddColumn(             # <<<<<<<<<<<<<<
 *                 i, c_field.sp_field, c_arr.sp_array))
 * 
*/
            __pyx_t_9 = arrow::py::GetResultValue<std::shared_ptr< arrow::RecordBatch> >(__pyx_v_self->batch->AddColumn(__pyx_v_i, __pyx_v_c_field->sp_field, __pyx_v_c_arr->sp_array)); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(17, 2912, __pyx_L7_error)
            __pyx_v_c_batch = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_9);
          }

          /* "pyarrow/table.pxi":2911
 *             c_field = field(field_, c_arr.type)
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             c_batch = GetResultValue(self.batch.AddColumn(
 *                 i, c_field.sp_field, c_arr.sp_array))
*/
          /*finally:*/ {
            /*normal exit:*/{
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L8;
            }
            __pyx_L7_error: {
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L1_error;
            }
            __pyx_L8:;
          }
      }

      /* "pyarrow/table.pxi":2915
 *                 i, c_field.sp_field, c_arr.sp_array))
 * 
 *         return pyarrow_wrap_batch(c_batch)             # <<<<<<<<<<<<<<
 * 
 *     def remove_column(self, int i):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = pyarrow_wrap_batch(__pyx_v_c_batch); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 2915, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;

      /* "pyarrow/table.pxi":2836
 *         return super(RecordBatch, self).__sizeof__() + self.nbytes
 * 
 *     def add_column(self, int i, field_, column):             # <<<<<<<<<<<<<<
 *         """
 *         Add column to RecordBatch at position i.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_7);
      __Pyx_AddTraceback("pyarrow.lib.RecordBatch.add_column", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF((PyObject *)__pyx_v_c_field);
      __Pyx_XDECREF((PyObject *)__pyx_v_c_arr);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/table.pxi":2917
 *         return pyarrow_wrap_batch(c_batch)
 * 
 *     def remove_column(self, int i):             # <<<<<<<<<<<<<<
 *         """
 *         Create new RecordBatch with the indicated column removed.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_11RecordBatch_19remove_column(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_11RecordBatch_18remove_column, "RecordBatch.remove_column(self, int i)\n\nCreate new RecordBatch with the indicated column removed.\n\nParameters\n----------\ni : int\n    Index of column to remove.\n\nReturns\n-------\nTable\n    New record batch without the column.\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> import pandas as pd\n>>> df = pd.DataFrame({'n_legs': [2, 4, 5, 100],\n...                    'animals': [\"Flamingo\", \"Horse\", \"Brittle stars\", \"Centipede\"]})\n>>> batch = pa.RecordBatch.from_pandas(df)\n>>> batch.remove_column(1)\npyarrow.RecordBatch\nn_legs: int64\n----\nn_legs: [2,4,5,100]");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_11RecordBatch_19remove_column = {"remove_column", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_11RecordBatch_19remove_column, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_11RecordBatch_18remove_column};
    static PyObject *__pyx_pw_7pyarrow_3lib_11RecordBatch_19remove_column(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      int __pyx_v_i;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("remove_column (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_i,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(17, 2917, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 2917, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "remove_column", 0) < (0)) __PYX_ERR(17, 2917, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("remove_column", 1, 1, 1, i); __PYX_ERR(17, 2917, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 1)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 2917, __pyx_L3_error)
        }
        __pyx_v_i = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_i == (int)-1) && PyErr_Occurred())) __PYX_ERR(17, 2917, __pyx_L3_error)
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("remove_column", 1, 1, 1, __pyx_nargs); __PYX_ERR(17, 2917, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.RecordBatch.remove_column", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_11RecordBatch_18remove_column(((struct __pyx_obj_7pyarrow_3lib_RecordBatch *)__pyx_v_self), __pyx_v_i);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_11RecordBatch_18remove_column(struct __pyx_obj_7pyarrow_3lib_RecordBatch *__pyx_v_self, int __pyx_v_i) {
      std::shared_ptr< arrow::RecordBatch>  __pyx_v_c_batch;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      std::shared_ptr< arrow::RecordBatch>  __pyx_t_1;
      PyObject *__pyx_t_2 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("remove_column", 0);

      /* "pyarrow/table.pxi":2946
 *         cdef shared_ptr[CRecordBatch] c_batch
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             c_batch = GetResultValue(self.batch.RemoveColumn(i))
 * 
*/
      {
          PyThreadState * _save;
          _save = PyEval_SaveThread();
          __Pyx_FastGIL_Remember();
          /*try:*/ {

            /* "pyarrow/table.pxi":2947
 * 
 *         with nogil:
 *             c_batch = GetResultValue(self.batch.RemoveColumn(i))             # <<<<<<<<<<<<<<
 * 
 *         return pyarrow_wrap_batch(c_batch)
*/
            if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
              PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "batch");
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              __PYX_ERR(17, 2947, __pyx_L4_error)
            }
            __pyx_t_1 = arrow::py::GetResultValue<std::shared_ptr< arrow::RecordBatch> >(__pyx_v_self->batch->RemoveColumn(__pyx_v_i)); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(17, 2947, __pyx_L4_error)
            __pyx_v_c_batch = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_1);
          }

          /* "pyarrow/table.pxi":2946
 *         cdef shared_ptr[CRecordBatch] c_batch
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             c_batch = GetResultValue(self.batch.RemoveColumn(i))
 * 
*/
          /*finally:*/ {
            /*normal exit:*/{
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L5;
            }
            __pyx_L4_error: {
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L1_error;
            }
            __pyx_L5:;
          }
      }

      /* "pyarrow/table.pxi":2949
 *             c_batch = GetResultValue(self.batch.RemoveColumn(i))
 * 
 *         return pyarrow_wrap_batch(c_batch)             # <<<<<<<<<<<<<<
 * 
 *     def set_column(self, int i, field_, column):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = pyarrow_wrap_batch(__pyx_v_c_batch); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 2949, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;

      /* "pyarrow/table.pxi":2917
 *         return pyarrow_wrap_batch(c_batch)
 * 
 *     def remove_column(self, int i):             # <<<<<<<<<<<<<<
 *         """
 *         Create new RecordBatch with the indicated column removed.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_AddTraceback("pyarrow.lib.RecordBatch.remove_column", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/table.pxi":2951
 *         return pyarrow_wrap_batch(c_batch)
 * 
 *     def set_column(self, int i, field_, column):             # <<<<<<<<<<<<<<
 *         """
 *         Replace column in RecordBatch at position.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_11RecordBatch_21set_column(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_11RecordBatch_20set_column, "RecordBatch.set_column(self, int i, field_, column)\n\nReplace column in RecordBatch at position.\n\nParameters\n----------\ni : int\n    Index to place the column at.\nfield_ : str or Field\n    If a string is passed then the type is deduced from the column\n    data.\ncolumn : Array or value coercible to array\n    Column data.\n\nReturns\n-------\nRecordBatch\n    New record batch with the passed column set.\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> import pandas as pd\n>>> df = pd.DataFrame({'n_legs': [2, 4, 5, 100],\n...                    'animals': [\"Flamingo\", \"Horse\", \"Brittle stars\", \"Centipede\"]})\n>>> batch = pa.RecordBatch.from_pandas(df)\n\nReplace a column:\n\n>>> year = [2021, 2022, 2019, 2021]\n>>> batch.set_column(1,'year', year)\npyarrow.RecordBatch\nn_legs: int64\nyear: int64\n----\nn_legs: [2,4,5,100]\nyear: [2021,2022,2019,2021]");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_11RecordBatch_21set_column = {"set_column", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_11RecordBatch_21set_column, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_11RecordBatch_20set_column};
    static PyObject *__pyx_pw_7pyarrow_3lib_11RecordBatch_21set_column(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      int __pyx_v_i;
      PyObject *__pyx_v_field_ = 0;
      PyObject *__pyx_v_column = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[3] = {0,0,0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("set_column (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_i,&__pyx_mstate_global->__pyx_n_u_field_3,&__pyx_mstate_global->__pyx_n_u_column,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(17, 2951, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  3:
            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(17, 2951, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(17, 2951, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 2951, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "set_column", 0) < (0)) __PYX_ERR(17, 2951, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("set_column", 1, 3, 3, i); __PYX_ERR(17, 2951, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 3)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 2951, __pyx_L3_error)
          values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(17, 2951, __pyx_L3_error)
          values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(17, 2951, __pyx_L3_error)
        }
        __pyx_v_i = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_i == (int)-1) && PyErr_Occurred())) __PYX_ERR(17, 2951, __pyx_L3_error)
        __pyx_v_field_ = values[1];
        __pyx_v_column = values[2];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("set_column", 1, 3, 3, __pyx_nargs); __PYX_ERR(17, 2951, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.RecordBatch.set_column", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_11RecordBatch_20set_column(((struct __pyx_obj_7pyarrow_3lib_RecordBatch *)__pyx_v_self), __pyx_v_i, __pyx_v_field_, __pyx_v_column);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_11RecordBatch_20set_column(struct __pyx_obj_7pyarrow_3lib_RecordBatch *__pyx_v_self, int __pyx_v_i, PyObject *__pyx_v_field_, PyObject *__pyx_v_column) {
      std::shared_ptr< arrow::RecordBatch>  __pyx_v_c_batch;
      struct __pyx_obj_7pyarrow_3lib_Field *__pyx_v_c_field = 0;
      struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_c_arr = 0;
      arrow::DeviceAllocationType __pyx_v_device_type;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      int __pyx_t_1;
      PyObject *__pyx_t_2 = NULL;
      PyObject *__pyx_t_3 = NULL;
      PyObject *__pyx_t_4 = NULL;
      size_t __pyx_t_5;
      PyObject *__pyx_t_6 = NULL;
      PyObject *__pyx_t_7 = NULL;
      PyObject *__pyx_t_8[5];
      std::shared_ptr< arrow::RecordBatch>  __pyx_t_9;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("set_column", 0);

      /* "pyarrow/table.pxi":2993
 *             Field c_field
 *             Array c_arr
 *             CDeviceAllocationType device_type = self.sp_batch.get().device_type()             # <<<<<<<<<<<<<<
 * 
 *         if isinstance(column, Array):
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_batch");
        __PYX_ERR(17, 2993, __pyx_L1_error)
      }
      __pyx_v_device_type = __pyx_v_self->sp_batch.get()->device_type();

      /* "pyarrow/table.pxi":2995
 *             CDeviceAllocationType device_type = self.sp_batch.get().device_type()
 * 
 *         if isinstance(column, Array):             # <<<<<<<<<<<<<<
 *             c_arr = column
 *         else:
*/
      __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_column, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array); 
      if (__pyx_t_1) {

        /* "pyarrow/table.pxi":2996
 * 
 *         if isinstance(column, Array):
 *             c_arr = column             # <<<<<<<<<<<<<<
 *         else:
 *             c_arr = array(column)
*/
        __pyx_t_2 = __pyx_v_column;
        __Pyx_INCREF(__pyx_t_2);
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array))))) __PYX_ERR(17, 2996, __pyx_L1_error)
        __pyx_v_c_arr = ((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_t_2);
        __pyx_t_2 = 0;

        /* "pyarrow/table.pxi":2995
 *             CDeviceAllocationType device_type = self.sp_batch.get().device_type()
 * 
 *         if isinstance(column, Array):             # <<<<<<<<<<<<<<
 *             c_arr = column
 *         else:
*/
        goto __pyx_L3;
      }

      /* "pyarrow/table.pxi":2998
 *             c_arr = column
 *         else:
 *             c_arr = array(column)             # <<<<<<<<<<<<<<
 * 
 *         if device_type != c_arr.sp_array.get().device_type():
*/
      /*else*/ {
        __pyx_t_3 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_array); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 2998, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_column};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 2998, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array))))) __PYX_ERR(17, 2998, __pyx_L1_error)
        __pyx_v_c_arr = ((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_t_2);
        __pyx_t_2 = 0;
      }
      __pyx_L3:;

      /* "pyarrow/table.pxi":3000
 *             c_arr = array(column)
 * 
 *         if device_type != c_arr.sp_array.get().device_type():             # <<<<<<<<<<<<<<
 *             raise TypeError("The column must be allocated on the same "
 *                             "device as the RecordBatch. Got column on "
*/
      if (unlikely(((PyObject *)__pyx_v_c_arr) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_array");
        __PYX_ERR(17, 3000, __pyx_L1_error)
      }
      __pyx_t_1 = (__pyx_v_device_type != __pyx_v_c_arr->sp_array.get()->device_type());
      if (unlikely(__pyx_t_1)) {

        /* "pyarrow/table.pxi":3001
 * 
 *         if device_type != c_arr.sp_array.get().device_type():
 *             raise TypeError("The column must be allocated on the same "             # <<<<<<<<<<<<<<
 *                             "device as the RecordBatch. Got column on "
 *                             f"device {c_arr.device_type!r}, but expected "
*/
        __pyx_t_4 = NULL;

        /* "pyarrow/table.pxi":3003
 *             raise TypeError("The column must be allocated on the same "
 *                             "device as the RecordBatch. Got column on "
 *                             f"device {c_arr.device_type!r}, but expected "             # <<<<<<<<<<<<<<
 *                             f"{self.device_type!r}.")
 * 
*/
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_c_arr), __pyx_mstate_global->__pyx_n_u_device_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 3003, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_6 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_t_3), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 3003, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

        /* "pyarrow/table.pxi":3004
 *                             "device as the RecordBatch. Got column on "
 *                             f"device {c_arr.device_type!r}, but expected "
 *                             f"{self.device_type!r}.")             # <<<<<<<<<<<<<<
 * 
 *         if isinstance(field_, Field):
*/
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_device_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 3004, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_7 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_t_3), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 3004, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_8[0] = __pyx_mstate_global->__pyx_kp_u_The_column_must_be_allocated_on;
        __pyx_t_8[1] = __pyx_t_6;
        __pyx_t_8[2] = __pyx_mstate_global->__pyx_kp_u_but_expected;
        __pyx_t_8[3] = __pyx_t_7;
        __pyx_t_8[4] = __pyx_mstate_global->__pyx_kp_u_;

        /* "pyarrow/table.pxi":3001
 * 
 *         if device_type != c_arr.sp_array.get().device_type():
 *             raise TypeError("The column must be allocated on the same "             # <<<<<<<<<<<<<<
 *                             "device as the RecordBatch. Got column on "
 *                             f"device {c_arr.device_type!r}, but expected "
*/
        __pyx_t_3 = __Pyx_PyUnicode_Join(__pyx_t_8, 5, 89 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6) + 15 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7));
        if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 3001, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_5 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 3001, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __Pyx_Raise(__pyx_t_2, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __PYX_ERR(17, 3001, __pyx_L1_error)

        /* "pyarrow/table.pxi":3000
 *             c_arr = array(column)
 * 
 *         if device_type != c_arr.sp_array.get().device_type():             # <<<<<<<<<<<<<<
 *             raise TypeError("The column must be allocated on the same "
 *                             "device as the RecordBatch. Got column on "
*/
      }

      /* "pyarrow/table.pxi":3006
 *                             f"{self.device_type!r}.")
 * 
 *         if isinstance(field_, Field):             # <<<<<<<<<<<<<<
 *             c_field = field_
 *         else:
*/
      __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_field_, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Field); 
      if (__pyx_t_1) {

        /* "pyarrow/table.pxi":3007
 * 
 *         if isinstance(field_, Field):
 *             c_field = field_             # <<<<<<<<<<<<<<
 *         else:
 *             c_field = field(field_, c_arr.type)
*/
        __pyx_t_2 = __pyx_v_field_;
        __Pyx_INCREF(__pyx_t_2);
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Field))))) __PYX_ERR(17, 3007, __pyx_L1_error)
        __pyx_v_c_field = ((struct __pyx_obj_7pyarrow_3lib_Field *)__pyx_t_2);
        __pyx_t_2 = 0;

        /* "pyarrow/table.pxi":3006
 *                             f"{self.device_type!r}.")
 * 
 *         if isinstance(field_, Field):             # <<<<<<<<<<<<<<
 *             c_field = field_
 *         else:
*/
        goto __pyx_L5;
      }

      /* "pyarrow/table.pxi":3009
 *             c_field = field_
 *         else:
 *             c_field = field(field_, c_arr.type)             # <<<<<<<<<<<<<<
 * 
 *         with nogil:
*/
      /*else*/ {
        __pyx_t_3 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_field); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 3009, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        if (unlikely(((PyObject *)__pyx_v_c_arr) == Py_None)) {
          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "type");
          __PYX_ERR(17, 3009, __pyx_L1_error)
        }
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_field_, ((PyObject *)__pyx_v_c_arr->type)};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 3009, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Field))))) __PYX_ERR(17, 3009, __pyx_L1_error)
        __pyx_v_c_field = ((struct __pyx_obj_7pyarrow_3lib_Field *)__pyx_t_2);
        __pyx_t_2 = 0;
      }
      __pyx_L5:;

      /* "pyarrow/table.pxi":3011
 *             c_field = field(field_, c_arr.type)
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             c_batch = GetResultValue(self.batch.SetColumn(
 *                 i, c_field.sp_field, c_arr.sp_array))
*/
      {
          PyThreadState * _save;
          _save = PyEval_SaveThread();
          __Pyx_FastGIL_Remember();
          /*try:*/ {

            /* "pyarrow/table.pxi":3012
 * 
 *         with nogil:
 *             c_batch = GetResultValue(self.batch.SetColumn(             # <<<<<<<<<<<<<<
 *                 i, c_field.sp_field, c_arr.sp_array))
 * 
*/
            if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
              PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "batch");
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              __PYX_ERR(17, 3012, __pyx_L7_error)
            }

            /* "pyarrow/table.pxi":3013
 *         with nogil:
 *             c_batch = GetResultValue(self.batch.SetColumn(
 *                 i, c_field.sp_field, c_arr.sp_array))             # <<<<<<<<<<<<<<
 * 
 *         return pyarrow_wrap_batch(c_batch)
*/
            if (unlikely(((PyObject *)__pyx_v_c_field) == Py_None)) {
              PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_field");
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              __PYX_ERR(17, 3013, __pyx_L7_error)
            }
            if (unlikely(((PyObject *)__pyx_v_c_arr) == Py_None)) {
              PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_array");
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              __PYX_ERR(17, 3013, __pyx_L7_error)
            }

            /* "pyarrow/table.pxi":3012
 * 
 *         with nogil:
 *             c_batch = GetResultValue(self.batch.SetColumn(             # <<<<<<<<<<<<<<
 *                 i, c_field.sp_field, c_arr.sp_array))
 * 
*/
            __pyx_t_9 = arrow::py::GetResultValue<std::shared_ptr< arrow::RecordBatch> >(__pyx_v_self->batch->SetColumn(__pyx_v_i, __pyx_v_c_field->sp_field, __pyx_v_c_arr->sp_array)); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(17, 3012, __pyx_L7_error)
            __pyx_v_c_batch = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_9);
          }

          /* "pyarrow/table.pxi":3011
 *             c_field = field(field_, c_arr.type)
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             c_batch = GetResultValue(self.batch.SetColumn(
 *                 i, c_field.sp_field, c_arr.sp_array))
*/
          /*finally:*/ {
            /*normal exit:*/{
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L8;
            }
            __pyx_L7_error: {
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L1_error;
            }
            __pyx_L8:;
          }
      }

      /* "pyarrow/table.pxi":3015
 *                 i, c_field.sp_field, c_arr.sp_array))
 * 
 *         return pyarrow_wrap_batch(c_batch)             # <<<<<<<<<<<<<<
 * 
 *     def rename_columns(self, names):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = pyarrow_wrap_batch(__pyx_v_c_batch); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 3015, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;

      /* "pyarrow/table.pxi":2951
 *         return pyarrow_wrap_batch(c_batch)
 * 
 *     def set_column(self, int i, field_, column):             # <<<<<<<<<<<<<<
 *         """
 *         Replace column in RecordBatch at position.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_7);
      __Pyx_AddTraceback("pyarrow.lib.RecordBatch.set_column", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF((PyObject *)__pyx_v_c_field);
      __Pyx_XDECREF((PyObject *)__pyx_v_c_arr);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/table.pxi":3017
 *         return pyarrow_wrap_batch(c_batch)
 * 
 *     def rename_columns(self, names):             # <<<<<<<<<<<<<<
 *         """
 *         Create new record batch with columns renamed to provided names.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_11RecordBatch_23rename_columns(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_11RecordBatch_22rename_columns, "RecordBatch.rename_columns(self, names)\n\nCreate new record batch with columns renamed to provided names.\n\nParameters\n----------\nnames : list[str] or dict[str, str]\n    List of new column names or mapping of old column names to new column names.\n\n    If a mapping of old to new column names is passed, then all columns which are\n    found to match a provided old column name will be renamed to the new column name.\n    If any column names are not found in the mapping, a KeyError will be raised.\n\nRaises\n------\nKeyError\n    If any of the column names passed in the names mapping do not exist.\n\nReturns\n-------\nRecordBatch\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> import pandas as pd\n>>> df = pd.DataFrame({'n_legs': [2, 4, 5, 100],\n...                    'animals': [\"Flamingo\", \"Horse\", \"Brittle stars\", \"Centipede\"]})\n>>> batch = pa.RecordBatch.from_pandas(df)\n>>> new_names = [\"n\", \"name\"]\n>>> batch.rename_columns(new_names)\npyarrow.RecordBatch\nn: int64\nname: string\n----\nn: [2,4,5,100]\nname: [\"Flamingo\",\"Horse\",\"Brittle stars\",\"Centipede\"]\n>>> new_names = {\"n_legs\": \"n\", \"animals\": \"name\"}\n>>> batch.rename_columns(new_names)\npyarrow.RecordBatch\nn: int64\nname: string\n----\nn: [2,4,5,100]\nname: [\"Flamingo\",\"Horse\",\"Brittle stars\",\"Centipede\"]");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_11RecordBatch_23rename_columns = {"rename_columns", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_11RecordBatch_23rename_columns, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_11RecordBatch_22rename_columns};
    static PyObject *__pyx_pw_7pyarrow_3lib_11RecordBatch_23rename_columns(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_names = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("rename_columns (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_names,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(17, 3017, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 3017, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "rename_columns", 0) < (0)) __PYX_ERR(17, 3017, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("rename_columns", 1, 1, 1, i); __PYX_ERR(17, 3017, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 1)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 3017, __pyx_L3_error)
        }
        __pyx_v_names = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("rename_columns", 1, 1, 1, __pyx_nargs); __PYX_ERR(17, 3017, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.RecordBatch.rename_columns", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_11RecordBatch_22rename_columns(((struct __pyx_obj_7pyarrow_3lib_RecordBatch *)__pyx_v_self), __pyx_v_names);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_11RecordBatch_22rename_columns(struct __pyx_obj_7pyarrow_3lib_RecordBatch *__pyx_v_self, PyObject *__pyx_v_names) {
      std::shared_ptr< arrow::RecordBatch>  __pyx_v_c_batch;
      std::vector<std::string>  __pyx_v_c_names;
      PyObject *__pyx_v_name = NULL;
      PyObject *__pyx_v_idx_to_new_name = NULL;
      PyObject *__pyx_v_new_name = NULL;
      PyObject *__pyx_v_indices = NULL;
      PyObject *__pyx_v_index = NULL;
      PyObject *__pyx_v_i = NULL;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      int __pyx_t_1;
      int __pyx_t_2;
      PyObject *__pyx_t_3 = NULL;
      Py_ssize_t __pyx_t_4;
      PyObject *(*__pyx_t_5)(PyObject *);
      PyObject *__pyx_t_6 = NULL;
      PyObject *__pyx_t_7 = NULL;
      PyObject *__pyx_t_8 = NULL;
      size_t __pyx_t_9;
      std::string __pyx_t_10;
      Py_ssize_t __pyx_t_11;
      int __pyx_t_12;
      int __pyx_t_13;
      PyObject *__pyx_t_14[3];
      PyObject *__pyx_t_15 = NULL;
      Py_ssize_t __pyx_t_16;
      std::shared_ptr< arrow::RecordBatch>  __pyx_t_17;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("rename_columns", 0);

      /* "pyarrow/table.pxi":3067
 *             vector[c_string] c_names
 * 
 *         if isinstance(names, (list, tuple)):             # <<<<<<<<<<<<<<
 *             for name in names:
 *                 c_names.push_back(tobytes(name))
*/
      __pyx_t_2 = PyList_Check(__pyx_v_names); 
      if (!__pyx_t_2) {
      } else {
        __pyx_t_1 = __pyx_t_2;
        goto __pyx_L4_bool_binop_done;
      }
      __pyx_t_2 = PyTuple_Check(__pyx_v_names); 
      __pyx_t_1 = __pyx_t_2;
      __pyx_L4_bool_binop_done:;
      if (__pyx_t_1) {

        /* "pyarrow/table.pxi":3068
 * 
 *         if isinstance(names, (list, tuple)):
 *             for name in names:             # <<<<<<<<<<<<<<
 *                 c_names.push_back(tobytes(name))
 *         elif isinstance(names, dict):
*/
        if (likely(PyList_CheckExact(__pyx_v_names)) || PyTuple_CheckExact(__pyx_v_names)) {
          __pyx_t_3 = __pyx_v_names; __Pyx_INCREF(__pyx_t_3);
          __pyx_t_4 = 0;
          __pyx_t_5 = NULL;
        } else {
          __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_names); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 3068, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_5 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 3068, __pyx_L1_error)
        }
        for (;;) {
          if (likely(!__pyx_t_5)) {
            if (likely(PyList_CheckExact(__pyx_t_3))) {
              {
                Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3);
                #if !CYTHON_ASSUME_SAFE_SIZE
                if (unlikely((__pyx_temp < 0))) __PYX_ERR(17, 3068, __pyx_L1_error)
                #endif
                if (__pyx_t_4 >= __pyx_temp) break;
              }
              __pyx_t_6 = __Pyx_PyList_GetItemRefFast(__pyx_t_3, __pyx_t_4, __Pyx_ReferenceSharing_OwnStrongReference);
              ++__pyx_t_4;
            } else {
              {
                Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3);
                #if !CYTHON_ASSUME_SAFE_SIZE
                if (unlikely((__pyx_temp < 0))) __PYX_ERR(17, 3068, __pyx_L1_error)
                #endif
                if (__pyx_t_4 >= __pyx_temp) break;
              }
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_6 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4));
              #else
              __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_4);
              #endif
              ++__pyx_t_4;
            }
            if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 3068, __pyx_L1_error)
          } else {
            __pyx_t_6 = __pyx_t_5(__pyx_t_3);
            if (unlikely(!__pyx_t_6)) {
              PyObject* exc_type = PyErr_Occurred();
              if (exc_type) {
                if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(17, 3068, __pyx_L1_error)
                PyErr_Clear();
              }
              break;
            }
          }
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_6);
          __pyx_t_6 = 0;

          /* "pyarrow/table.pxi":3069
 *         if isinstance(names, (list, tuple)):
 *             for name in names:
 *                 c_names.push_back(tobytes(name))             # <<<<<<<<<<<<<<
 *         elif isinstance(names, dict):
 *             idx_to_new_name = {}
*/
          __pyx_t_7 = NULL;
          __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_tobytes); if (unlikely(!__pyx_t_8)) __PYX_ERR(17, 3069, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __pyx_t_9 = 1;
          #if CYTHON_UNPACK_METHODS
          if (unlikely(PyMethod_Check(__pyx_t_8))) {
            __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8);
            assert(__pyx_t_7);
            PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8);
            __Pyx_INCREF(__pyx_t_7);
            __Pyx_INCREF(__pyx__function);
            __Pyx_DECREF_SET(__pyx_t_8, __pyx__function);
            __pyx_t_9 = 0;
          }
          #endif
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_name};
            __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
            if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 3069, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_6);
          }
          __pyx_t_10 = __pyx_convert_string_from_py_6libcpp_6string_std__in_string(__pyx_t_6); if (unlikely(PyErr_Occurred())) __PYX_ERR(17, 3069, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          try {
            __pyx_v_c_names.push_back(__pyx_t_10);
          } catch(...) {
            __Pyx_CppExn2PyErr();
            __PYX_ERR(17, 3069, __pyx_L1_error)
          }

          /* "pyarrow/table.pxi":3068
 * 
 *         if isinstance(names, (list, tuple)):
 *             for name in names:             # <<<<<<<<<<<<<<
 *                 c_names.push_back(tobytes(name))
 *         elif isinstance(names, dict):
*/
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

        /* "pyarrow/table.pxi":3067
 *             vector[c_string] c_names
 * 
 *         if isinstance(names, (list, tuple)):             # <<<<<<<<<<<<<<
 *             for name in names:
 *                 c_names.push_back(tobytes(name))
*/
        goto __pyx_L3;
      }

      /* "pyarrow/table.pxi":3070
 *             for name in names:
 *                 c_names.push_back(tobytes(name))
 *         elif isinstance(names, dict):             # <<<<<<<<<<<<<<
 *             idx_to_new_name = {}
 *             for name, new_name in names.items():
*/
      __pyx_t_1 = PyDict_Check(__pyx_v_names); 
      if (likely(__pyx_t_1)) {

        /* "pyarrow/table.pxi":3071
 *                 c_names.push_back(tobytes(name))
 *         elif isinstance(names, dict):
 *             idx_to_new_name = {}             # <<<<<<<<<<<<<<
 *             for name, new_name in names.items():
 *                 indices = self.schema.get_all_field_indices(name)
*/
        __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 3071, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_v_idx_to_new_name = ((PyObject*)__pyx_t_3);
        __pyx_t_3 = 0;

        /* "pyarrow/table.pxi":3072
 *         elif isinstance(names, dict):
 *             idx_to_new_name = {}
 *             for name, new_name in names.items():             # <<<<<<<<<<<<<<
 *                 indices = self.schema.get_all_field_indices(name)
 * 
*/
        __pyx_t_4 = 0;
        if (unlikely(__pyx_v_names == Py_None)) {
          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items");
          __PYX_ERR(17, 3072, __pyx_L1_error)
        }
        __pyx_t_6 = __Pyx_dict_iterator(__pyx_v_names, 0, __pyx_mstate_global->__pyx_n_u_items, (&__pyx_t_11), (&__pyx_t_12)); if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 3072, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_XDECREF(__pyx_t_3);
        __pyx_t_3 = __pyx_t_6;
        __pyx_t_6 = 0;
        while (1) {
          __pyx_t_13 = __Pyx_dict_iter_next(__pyx_t_3, __pyx_t_11, &__pyx_t_4, &__pyx_t_6, &__pyx_t_8, NULL, __pyx_t_12);
          if (unlikely(__pyx_t_13 == 0)) break;
          if (unlikely(__pyx_t_13 == -1)) __PYX_ERR(17, 3072, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_6);
          __pyx_t_6 = 0;
          __Pyx_XDECREF_SET(__pyx_v_new_name, __pyx_t_8);
          __pyx_t_8 = 0;

          /* "pyarrow/table.pxi":3073
 *             idx_to_new_name = {}
 *             for name, new_name in names.items():
 *                 indices = self.schema.get_all_field_indices(name)             # <<<<<<<<<<<<<<
 * 
 *                 if not indices:
*/
          __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_schema); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 3073, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __pyx_t_6 = __pyx_t_7;
          __Pyx_INCREF(__pyx_t_6);
          __pyx_t_9 = 0;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_name};
            __pyx_t_8 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_all_field_indices, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
            if (unlikely(!__pyx_t_8)) __PYX_ERR(17, 3073, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_8);
          }
          __Pyx_XDECREF_SET(__pyx_v_indices, __pyx_t_8);
          __pyx_t_8 = 0;

          /* "pyarrow/table.pxi":3075
 *                 indices = self.schema.get_all_field_indices(name)
 * 
 *                 if not indices:             # <<<<<<<<<<<<<<
 *                     raise KeyError(f"Column {name!r} not found")
 * 
*/
          __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_indices); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(17, 3075, __pyx_L1_error)
          __pyx_t_2 = (!__pyx_t_1);
          if (unlikely(__pyx_t_2)) {

            /* "pyarrow/table.pxi":3076
 * 
 *                 if not indices:
 *                     raise KeyError(f"Column {name!r} not found")             # <<<<<<<<<<<<<<
 * 
 *                 for index in indices:
*/
            __pyx_t_7 = NULL;
            __pyx_t_6 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_name), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 3076, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_6);
            __pyx_t_14[0] = __pyx_mstate_global->__pyx_kp_u_Column;
            __pyx_t_14[1] = __pyx_t_6;
            __pyx_t_14[2] = __pyx_mstate_global->__pyx_kp_u_not_found;
            __pyx_t_15 = __Pyx_PyUnicode_Join(__pyx_t_14, 3, 7 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6) + 10, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6));
            if (unlikely(!__pyx_t_15)) __PYX_ERR(17, 3076, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_15);
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            __pyx_t_9 = 1;
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_15};
              __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_KeyError)), __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
              if (unlikely(!__pyx_t_8)) __PYX_ERR(17, 3076, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_8);
            }
            __Pyx_Raise(__pyx_t_8, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
            __PYX_ERR(17, 3076, __pyx_L1_error)

            /* "pyarrow/table.pxi":3075
 *                 indices = self.schema.get_all_field_indices(name)
 * 
 *                 if not indices:             # <<<<<<<<<<<<<<
 *                     raise KeyError(f"Column {name!r} not found")
 * 
*/
          }

          /* "pyarrow/table.pxi":3078
 *                     raise KeyError(f"Column {name!r} not found")
 * 
 *                 for index in indices:             # <<<<<<<<<<<<<<
 *                     idx_to_new_name[index] = new_name
 * 
*/
          if (likely(PyList_CheckExact(__pyx_v_indices)) || PyTuple_CheckExact(__pyx_v_indices)) {
            __pyx_t_8 = __pyx_v_indices; __Pyx_INCREF(__pyx_t_8);
            __pyx_t_16 = 0;
            __pyx_t_5 = NULL;
          } else {
            __pyx_t_16 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_v_indices); if (unlikely(!__pyx_t_8)) __PYX_ERR(17, 3078, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_8);
            __pyx_t_5 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 3078, __pyx_L1_error)
          }
          for (;;) {
            if (likely(!__pyx_t_5)) {
              if (likely(PyList_CheckExact(__pyx_t_8))) {
                {
                  Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_8);
                  #if !CYTHON_ASSUME_SAFE_SIZE
                  if (unlikely((__pyx_temp < 0))) __PYX_ERR(17, 3078, __pyx_L1_error)
                  #endif
                  if (__pyx_t_16 >= __pyx_temp) break;
                }
                __pyx_t_15 = __Pyx_PyList_GetItemRefFast(__pyx_t_8, __pyx_t_16, __Pyx_ReferenceSharing_OwnStrongReference);
                ++__pyx_t_16;
              } else {
                {
                  Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_8);
                  #if !CYTHON_ASSUME_SAFE_SIZE
                  if (unlikely((__pyx_temp < 0))) __PYX_ERR(17, 3078, __pyx_L1_error)
                  #endif
                  if (__pyx_t_16 >= __pyx_temp) break;
                }
                #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                __pyx_t_15 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_16));
                #else
                __pyx_t_15 = __Pyx_PySequence_ITEM(__pyx_t_8, __pyx_t_16);
                #endif
                ++__pyx_t_16;
              }
              if (unlikely(!__pyx_t_15)) __PYX_ERR(17, 3078, __pyx_L1_error)
            } else {
              __pyx_t_15 = __pyx_t_5(__pyx_t_8);
              if (unlikely(!__pyx_t_15)) {
                PyObject* exc_type = PyErr_Occurred();
                if (exc_type) {
                  if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(17, 3078, __pyx_L1_error)
                  PyErr_Clear();
                }
                break;
              }
            }
            __Pyx_GOTREF(__pyx_t_15);
            __Pyx_XDECREF_SET(__pyx_v_index, __pyx_t_15);
            __pyx_t_15 = 0;

            /* "pyarrow/table.pxi":3079
 * 
 *                 for index in indices:
 *                     idx_to_new_name[index] = new_name             # <<<<<<<<<<<<<<
 * 
 *             for i in range(self.num_columns):
*/
            if (unlikely((PyDict_SetItem(__pyx_v_idx_to_new_name, __pyx_v_index, __pyx_v_new_name) < 0))) __PYX_ERR(17, 3079, __pyx_L1_error)

            /* "pyarrow/table.pxi":3078
 *                     raise KeyError(f"Column {name!r} not found")
 * 
 *                 for index in indices:             # <<<<<<<<<<<<<<
 *                     idx_to_new_name[index] = new_name
 * 
*/
          }
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

        /* "pyarrow/table.pxi":3081
 *                     idx_to_new_name[index] = new_name
 * 
 *             for i in range(self.num_columns):             # <<<<<<<<<<<<<<
 *                 new_name = idx_to_new_name.get(i, self.column_names[i])
 *                 c_names.push_back(tobytes(new_name))
*/
        __pyx_t_8 = NULL;
        __pyx_t_15 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_num_columns); if (unlikely(!__pyx_t_15)) __PYX_ERR(17, 3081, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_15);
        __pyx_t_9 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_15};
          __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(&PyRange_Type), __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 3081, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        __pyx_t_15 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_15)) __PYX_ERR(17, 3081, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_15);
        __pyx_t_5 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_15); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 3081, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        for (;;) {
          {
            __pyx_t_3 = __pyx_t_5(__pyx_t_15);
            if (unlikely(!__pyx_t_3)) {
              PyObject* exc_type = PyErr_Occurred();
              if (exc_type) {
                if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(17, 3081, __pyx_L1_error)
                PyErr_Clear();
              }
              break;
            }
          }
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_3);
          __pyx_t_3 = 0;

          /* "pyarrow/table.pxi":3082
 * 
 *             for i in range(self.num_columns):
 *                 new_name = idx_to_new_name.get(i, self.column_names[i])             # <<<<<<<<<<<<<<
 *                 c_names.push_back(tobytes(new_name))
 *         else:
*/
          __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_column_names); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 3082, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          if (unlikely(__pyx_t_3 == Py_None)) {
            PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
            __PYX_ERR(17, 3082, __pyx_L1_error)
          }
          __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_v_i); if (unlikely(!__pyx_t_8)) __PYX_ERR(17, 3082, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __pyx_t_3 = __Pyx_PyDict_GetItemDefault(__pyx_v_idx_to_new_name, __pyx_v_i, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 3082, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_XDECREF_SET(__pyx_v_new_name, __pyx_t_3);
          __pyx_t_3 = 0;

          /* "pyarrow/table.pxi":3083
 *             for i in range(self.num_columns):
 *                 new_name = idx_to_new_name.get(i, self.column_names[i])
 *                 c_names.push_back(tobytes(new_name))             # <<<<<<<<<<<<<<
 *         else:
 *             raise TypeError(f"names must be a list or dict not {type(names)!r}")
*/
          __pyx_t_8 = NULL;
          __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_tobytes); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 3083, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __pyx_t_9 = 1;
          #if CYTHON_UNPACK_METHODS
          if (unlikely(PyMethod_Check(__pyx_t_7))) {
            __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
            assert(__pyx_t_8);
            PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
            __Pyx_INCREF(__pyx_t_8);
            __Pyx_INCREF(__pyx__function);
            __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
            __pyx_t_9 = 0;
          }
          #endif
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_v_new_name};
            __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
            if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 3083, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
          }
          __pyx_t_10 = __pyx_convert_string_from_py_6libcpp_6string_std__in_string(__pyx_t_3); if (unlikely(PyErr_Occurred())) __PYX_ERR(17, 3083, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          try {
            __pyx_v_c_names.push_back(__pyx_t_10);
          } catch(...) {
            __Pyx_CppExn2PyErr();
            __PYX_ERR(17, 3083, __pyx_L1_error)
          }

          /* "pyarrow/table.pxi":3081
 *                     idx_to_new_name[index] = new_name
 * 
 *             for i in range(self.num_columns):             # <<<<<<<<<<<<<<
 *                 new_name = idx_to_new_name.get(i, self.column_names[i])
 *                 c_names.push_back(tobytes(new_name))
*/
        }
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;

        /* "pyarrow/table.pxi":3070
 *             for name in names:
 *                 c_names.push_back(tobytes(name))
 *         elif isinstance(names, dict):             # <<<<<<<<<<<<<<
 *             idx_to_new_name = {}
 *             for name, new_name in names.items():
*/
        goto __pyx_L3;
      }

      /* "pyarrow/table.pxi":3085
 *                 c_names.push_back(tobytes(new_name))
 *         else:
 *             raise TypeError(f"names must be a list or dict not {type(names)!r}")             # <<<<<<<<<<<<<<
 * 
 *         with nogil:
*/
      /*else*/ {
        __pyx_t_3 = NULL;
        __pyx_t_7 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(((PyObject *)Py_TYPE(__pyx_v_names))), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 3085, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_8 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_names_must_be_a_list_or_dict_not, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(17, 3085, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_9 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_8};
          __pyx_t_15 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          if (unlikely(!__pyx_t_15)) __PYX_ERR(17, 3085, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_15);
        }
        __Pyx_Raise(__pyx_t_15, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
        __PYX_ERR(17, 3085, __pyx_L1_error)
      }
      __pyx_L3:;

      /* "pyarrow/table.pxi":3087
 *             raise TypeError(f"names must be a list or dict not {type(names)!r}")
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             c_batch = GetResultValue(self.batch.RenameColumns(move(c_names)))
 * 
*/
      {
          PyThreadState * _save;
          _save = PyEval_SaveThread();
          __Pyx_FastGIL_Remember();
          /*try:*/ {

            /* "pyarrow/table.pxi":3088
 * 
 *         with nogil:
 *             c_batch = GetResultValue(self.batch.RenameColumns(move(c_names)))             # <<<<<<<<<<<<<<
 * 
 *         return pyarrow_wrap_batch(c_batch)
*/
            if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
              PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "batch");
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              __PYX_ERR(17, 3088, __pyx_L19_error)
            }
            __pyx_t_17 = arrow::py::GetResultValue<std::shared_ptr< arrow::RecordBatch> >(__pyx_v_self->batch->RenameColumns(cython_std::move<std::vector<std::string> >(__pyx_v_c_names))); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(17, 3088, __pyx_L19_error)
            __pyx_v_c_batch = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_17);
          }

          /* "pyarrow/table.pxi":3087
 *             raise TypeError(f"names must be a list or dict not {type(names)!r}")
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             c_batch = GetResultValue(self.batch.RenameColumns(move(c_names)))
 * 
*/
          /*finally:*/ {
            /*normal exit:*/{
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L20;
            }
            __pyx_L19_error: {
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L1_error;
            }
            __pyx_L20:;
          }
      }

      /* "pyarrow/table.pxi":3090
 *             c_batch = GetResultValue(self.batch.RenameColumns(move(c_names)))
 * 
 *         return pyarrow_wrap_batch(c_batch)             # <<<<<<<<<<<<<<
 * 
 *     def serialize(self, memory_pool=None):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_15 = pyarrow_wrap_batch(__pyx_v_c_batch); if (unlikely(!__pyx_t_15)) __PYX_ERR(17, 3090, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_15);
      __pyx_r = __pyx_t_15;
      __pyx_t_15 = 0;
      goto __pyx_L0;

      /* "pyarrow/table.pxi":3017
 *         return pyarrow_wrap_batch(c_batch)
 * 
 *     def rename_columns(self, names):             # <<<<<<<<<<<<<<
 *         """
 *         Create new record batch with columns renamed to provided names.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_8);
      __Pyx_XDECREF(__pyx_t_15);
      __Pyx_AddTraceback("pyarrow.lib.RecordBatch.rename_columns", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_name);
      __Pyx_XDECREF(__pyx_v_idx_to_new_name);
      __Pyx_XDECREF(__pyx_v_new_name);
      __Pyx_XDECREF(__pyx_v_indices);
      __Pyx_XDECREF(__pyx_v_index);
      __Pyx_XDECREF(__pyx_v_i);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/table.pxi":3092
 *         return pyarrow_wrap_batch(c_batch)
 * 
 *     def serialize(self, memory_pool=None):             # <<<<<<<<<<<<<<
 *         """
 *         Write RecordBatch to Buffer as encapsulated IPC message, which does not
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_11RecordBatch_25serialize(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_11RecordBatch_24serialize, "RecordBatch.serialize(self, memory_pool=None)\n\nWrite RecordBatch to Buffer as encapsulated IPC message, which does not\ninclude a Schema.\n\nTo reconstruct a RecordBatch from the encapsulated IPC message Buffer\nreturned by this function, a Schema must be passed separately. See\nExamples.\n\nParameters\n----------\nmemory_pool : MemoryPool, default None\n    Uses default memory pool if not specified\n\nReturns\n-------\nserialized : Buffer\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> n_legs = pa.array([2, 2, 4, 4, 5, 100])\n>>> animals = pa.array([\"Flamingo\", \"Parrot\", \"Dog\", \"Horse\", \"Brittle stars\", \"Centipede\"])\n>>> batch = pa.RecordBatch.from_arrays([n_legs, animals],\n...                                     names=[\"n_legs\", \"animals\"])\n>>> buf = batch.serialize()\n>>> buf\n<pyarrow.Buffer address=0x... size=... is_cpu=True is_mutable=True>\n\nReconstruct RecordBatch from IPC message Buffer and original Schema\n\n>>> pa.ipc.read_record_batch(buf, batch.schema)\npyarrow.RecordBatch\nn_legs: int64\nanimals: string\n----\nn_legs: [2,2,4,4,5,100]\nanimals: [\"Flamingo\",\"Parrot\",\"Dog\",\"Horse\",\"Brittle stars\",\"Centipede\"]");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_11RecordBatch_25serialize = {"serialize", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_11RecordBatch_25serialize, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_11RecordBatch_24serialize};
    static PyObject *__pyx_pw_7pyarrow_3lib_11RecordBatch_25serialize(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_memory_pool = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("serialize (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_memory_pool,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(17, 3092, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 3092, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "serialize", 0) < (0)) __PYX_ERR(17, 3092, __pyx_L3_error)
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
        } else {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 3092, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
        }
        __pyx_v_memory_pool = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("serialize", 0, 0, 1, __pyx_nargs); __PYX_ERR(17, 3092, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.RecordBatch.serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_11RecordBatch_24serialize(((struct __pyx_obj_7pyarrow_3lib_RecordBatch *)__pyx_v_self), __pyx_v_memory_pool);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_11RecordBatch_24serialize(struct __pyx_obj_7pyarrow_3lib_RecordBatch *__pyx_v_self, PyObject *__pyx_v_memory_pool) {
      std::shared_ptr< arrow::Buffer>  __pyx_v_buffer;
       arrow::ipc::IpcWriteOptions __pyx_v_options;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
       arrow::MemoryPool *__pyx_t_1;
      std::shared_ptr< arrow::Buffer>  __pyx_t_2;
      PyObject *__pyx_t_3 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("serialize", 0);

      /* "pyarrow/table.pxi":3131
 *         animals: ["Flamingo","Parrot","Dog","Horse","Brittle stars","Centipede"]
 *         """
 *         self._assert_cpu()             # <<<<<<<<<<<<<<
 *         cdef shared_ptr[CBuffer] buffer
 *         cdef CIpcWriteOptions options = CIpcWriteOptions.Defaults()
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_assert_cpu");
        __PYX_ERR(17, 3131, __pyx_L1_error)
      }
      ((struct __pyx_vtabstruct_7pyarrow_3lib_RecordBatch *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._assert_cpu(((struct __pyx_obj_7pyarrow_3lib__Tabular *)__pyx_v_self)); if (unlikely(PyErr_Occurred())) __PYX_ERR(17, 3131, __pyx_L1_error)

      /* "pyarrow/table.pxi":3133
 *         self._assert_cpu()
 *         cdef shared_ptr[CBuffer] buffer
 *         cdef CIpcWriteOptions options = CIpcWriteOptions.Defaults()             # <<<<<<<<<<<<<<
 *         options.memory_pool = maybe_unbox_memory_pool(memory_pool)
 * 
*/
      __pyx_v_options =  arrow::ipc::IpcWriteOptions::Defaults();

      /* "pyarrow/table.pxi":3134
 *         cdef shared_ptr[CBuffer] buffer
 *         cdef CIpcWriteOptions options = CIpcWriteOptions.Defaults()
 *         options.memory_pool = maybe_unbox_memory_pool(memory_pool)             # <<<<<<<<<<<<<<
 * 
 *         with nogil:
*/
      if (!(likely(((__pyx_v_memory_pool) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_memory_pool, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_MemoryPool))))) __PYX_ERR(17, 3134, __pyx_L1_error)
      __pyx_t_1 = __pyx_f_7pyarrow_3lib_maybe_unbox_memory_pool(((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)__pyx_v_memory_pool)); if (unlikely(__pyx_t_1 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(17, 3134, __pyx_L1_error)
      __pyx_v_options.memory_pool = __pyx_t_1;

      /* "pyarrow/table.pxi":3136
 *         options.memory_pool = maybe_unbox_memory_pool(memory_pool)
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             buffer = GetResultValue(
 *                 SerializeRecordBatch(deref(self.batch), options))
*/
      {
          PyThreadState * _save;
          _save = PyEval_SaveThread();
          __Pyx_FastGIL_Remember();
          /*try:*/ {

            /* "pyarrow/table.pxi":3138
 *         with nogil:
 *             buffer = GetResultValue(
 *                 SerializeRecordBatch(deref(self.batch), options))             # <<<<<<<<<<<<<<
 *         return pyarrow_wrap_buffer(buffer)
 * 
*/
            if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
              PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "batch");
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              __PYX_ERR(17, 3138, __pyx_L4_error)
            }

            /* "pyarrow/table.pxi":3137
 * 
 *         with nogil:
 *             buffer = GetResultValue(             # <<<<<<<<<<<<<<
 *                 SerializeRecordBatch(deref(self.batch), options))
 *         return pyarrow_wrap_buffer(buffer)
*/
            __pyx_t_2 = arrow::py::GetResultValue<std::shared_ptr< arrow::Buffer> >(arrow::ipc::SerializeRecordBatch((*__pyx_v_self->batch), __pyx_v_options)); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(17, 3137, __pyx_L4_error)
            __pyx_v_buffer = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_2);
          }

          /* "pyarrow/table.pxi":3136
 *         options.memory_pool = maybe_unbox_memory_pool(memory_pool)
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             buffer = GetResultValue(
 *                 SerializeRecordBatch(deref(self.batch), options))
*/
          /*finally:*/ {
            /*normal exit:*/{
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L5;
            }
            __pyx_L4_error: {
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L1_error;
            }
            __pyx_L5:;
          }
      }

      /* "pyarrow/table.pxi":3139
 *             buffer = GetResultValue(
 *                 SerializeRecordBatch(deref(self.batch), options))
 *         return pyarrow_wrap_buffer(buffer)             # <<<<<<<<<<<<<<
 * 
 *     def slice(self, offset=0, length=None):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = pyarrow_wrap_buffer(__pyx_v_buffer); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 3139, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "pyarrow/table.pxi":3092
 *         return pyarrow_wrap_batch(c_batch)
 * 
 *     def serialize(self, memory_pool=None):             # <<<<<<<<<<<<<<
 *         """
 *         Write RecordBatch to Buffer as encapsulated IPC message, which does not
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_AddTraceback("pyarrow.lib.RecordBatch.serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/table.pxi":3141
 *         return pyarrow_wrap_buffer(buffer)
 * 
 *     def slice(self, offset=0, length=None):             # <<<<<<<<<<<<<<
 *         """
 *         Compute zero-copy slice of this RecordBatch
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_11RecordBatch_27slice(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_11RecordBatch_26slice, "RecordBatch.slice(self, offset=0, length=None)\n\nCompute zero-copy slice of this RecordBatch\n\nParameters\n----------\noffset : int, default 0\n    Offset from start of record batch to slice\nlength : int, default None\n    Length of slice (default is until end of batch starting from\n    offset)\n\nReturns\n-------\nsliced : RecordBatch\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> n_legs = pa.array([2, 2, 4, 4, 5, 100])\n>>> animals = pa.array([\"Flamingo\", \"Parrot\", \"Dog\", \"Horse\", \"Brittle stars\", \"Centipede\"])\n>>> batch = pa.RecordBatch.from_arrays([n_legs, animals],\n...                                     names=[\"n_legs\", \"animals\"])\n>>> batch.to_pandas()\n   n_legs        animals\n0       2       Flamingo\n1       2         Parrot\n2       4            Dog\n3       4          Horse\n4       5  Brittle stars\n5     100      Centipede\n>>> batch.slice(offset=3).to_pandas()\n   n_legs        animals\n0       4          Horse\n1       5  Brittle stars\n2     100      Centipede\n>>> batch.slice(length=2).to_pandas()\n   n_legs   animals\n0       2  Flamingo\n1       2    Parrot\n>>> batch.slice(offset=3, length=1).to_pandas()\n   n_legs animals\n0       4   Horse");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_11RecordBatch_27slice = {"slice", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_11RecordBatch_27slice, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_11RecordBatch_26slice};
    static PyObject *__pyx_pw_7pyarrow_3lib_11RecordBatch_27slice(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_offset = 0;
      PyObject *__pyx_v_length = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[2] = {0,0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("slice (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_offset,&__pyx_mstate_global->__pyx_n_u_length,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(17, 3141, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(17, 3141, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 3141, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "slice", 0) < (0)) __PYX_ERR(17, 3141, __pyx_L3_error)
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_int_0));
          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
        } else {
          switch (__pyx_nargs) {
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(17, 3141, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 3141, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_int_0));
          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
        }
        __pyx_v_offset = values[0];
        __pyx_v_length = values[1];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("slice", 0, 0, 2, __pyx_nargs); __PYX_ERR(17, 3141, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.RecordBatch.slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_11RecordBatch_26slice(((struct __pyx_obj_7pyarrow_3lib_RecordBatch *)__pyx_v_self), __pyx_v_offset, __pyx_v_length);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_11RecordBatch_26slice(struct __pyx_obj_7pyarrow_3lib_RecordBatch *__pyx_v_self, PyObject *__pyx_v_offset, PyObject *__pyx_v_length) {
      std::shared_ptr< arrow::RecordBatch>  __pyx_v_result;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_t_2;
      PyObject *__pyx_t_3 = NULL;
      size_t __pyx_t_4;
      Py_ssize_t __pyx_t_5;
      PyObject *__pyx_t_6 = NULL;
      PyObject *__pyx_t_7 = NULL;
      int64_t __pyx_t_8;
      int64_t __pyx_t_9;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("slice", 0);
      __Pyx_INCREF(__pyx_v_offset);

      /* "pyarrow/table.pxi":3187
 *         cdef shared_ptr[CRecordBatch] result
 * 
 *         if offset < 0:             # <<<<<<<<<<<<<<
 *             raise IndexError('Offset must be non-negative')
 * 
*/
      __pyx_t_1 = PyObject_RichCompare(__pyx_v_offset, __pyx_mstate_global->__pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 3187, __pyx_L1_error)
      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(17, 3187, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(__pyx_t_2)) {

        /* "pyarrow/table.pxi":3188
 * 
 *         if offset < 0:
 *             raise IndexError('Offset must be non-negative')             # <<<<<<<<<<<<<<
 * 
 *         offset = min(len(self), offset)
*/
        __pyx_t_3 = NULL;
        __pyx_t_4 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Offset_must_be_non_negative};
          __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_IndexError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 3188, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
        }
        __Pyx_Raise(__pyx_t_1, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __PYX_ERR(17, 3188, __pyx_L1_error)

        /* "pyarrow/table.pxi":3187
 *         cdef shared_ptr[CRecordBatch] result
 * 
 *         if offset < 0:             # <<<<<<<<<<<<<<
 *             raise IndexError('Offset must be non-negative')
 * 
*/
      }

      /* "pyarrow/table.pxi":3190
 *             raise IndexError('Offset must be non-negative')
 * 
 *         offset = min(len(self), offset)             # <<<<<<<<<<<<<<
 *         if length is None:
 *             result = self.batch.Slice(offset)
*/
      __Pyx_INCREF(__pyx_v_offset);
      __pyx_t_1 = __pyx_v_offset;
      __pyx_t_5 = PyObject_Length(((PyObject *)__pyx_v_self)); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(17, 3190, __pyx_L1_error)
      __pyx_t_6 = PyLong_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 3190, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = PyObject_RichCompare(__pyx_t_1, __pyx_t_6, Py_LT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 3190, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(17, 3190, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (__pyx_t_2) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1;
      } else {
        __pyx_t_7 = PyLong_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 3190, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_3 = __pyx_t_7;
        __pyx_t_7 = 0;
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __pyx_t_3;
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF_SET(__pyx_v_offset, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "pyarrow/table.pxi":3191
 * 
 *         offset = min(len(self), offset)
 *         if length is None:             # <<<<<<<<<<<<<<
 *             result = self.batch.Slice(offset)
 *         else:
*/
      __pyx_t_2 = (__pyx_v_length == Py_None);
      if (__pyx_t_2) {

        /* "pyarrow/table.pxi":3192
 *         offset = min(len(self), offset)
 *         if length is None:
 *             result = self.batch.Slice(offset)             # <<<<<<<<<<<<<<
 *         else:
 *             result = self.batch.Slice(offset, length)
*/
        if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "batch");
          __PYX_ERR(17, 3192, __pyx_L1_error)
        }
        __pyx_t_8 = __Pyx_PyLong_As_int64_t(__pyx_v_offset); if (unlikely((__pyx_t_8 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(17, 3192, __pyx_L1_error)
        __pyx_v_result = __pyx_v_self->batch->Slice(__pyx_t_8);

        /* "pyarrow/table.pxi":3191
 * 
 *         offset = min(len(self), offset)
 *         if length is None:             # <<<<<<<<<<<<<<
 *             result = self.batch.Slice(offset)
 *         else:
*/
        goto __pyx_L4;
      }

      /* "pyarrow/table.pxi":3194
 *             result = self.batch.Slice(offset)
 *         else:
 *             result = self.batch.Slice(offset, length)             # <<<<<<<<<<<<<<
 * 
 *         return pyarrow_wrap_batch(result)
*/
      /*else*/ {
        if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "batch");
          __PYX_ERR(17, 3194, __pyx_L1_error)
        }
        __pyx_t_8 = __Pyx_PyLong_As_int64_t(__pyx_v_offset); if (unlikely((__pyx_t_8 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(17, 3194, __pyx_L1_error)
        __pyx_t_9 = __Pyx_PyLong_As_int64_t(__pyx_v_length); if (unlikely((__pyx_t_9 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(17, 3194, __pyx_L1_error)
        __pyx_v_result = __pyx_v_self->batch->Slice(__pyx_t_8, __pyx_t_9);
      }
      __pyx_L4:;

      /* "pyarrow/table.pxi":3196
 *             result = self.batch.Slice(offset, length)
 * 
 *         return pyarrow_wrap_batch(result)             # <<<<<<<<<<<<<<
 * 
 *     def equals(self, object other, bint check_metadata=False):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = pyarrow_wrap_batch(__pyx_v_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 3196, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/table.pxi":3141
 *         return pyarrow_wrap_buffer(buffer)
 * 
 *     def slice(self, offset=0, length=None):             # <<<<<<<<<<<<<<
 *         """
 *         Compute zero-copy slice of this RecordBatch
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_7);
      __Pyx_AddTraceback("pyarrow.lib.RecordBatch.slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_offset);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/table.pxi":3198
 *         return pyarrow_wrap_batch(result)
 * 
 *     def equals(self, object other, bint check_metadata=False):             # <<<<<<<<<<<<<<
 *         """
 *         Check if contents of two record batches are equal.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_11RecordBatch_29equals(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_11RecordBatch_28equals, "RecordBatch.equals(self, other, bool check_metadata=False)\n\nCheck if contents of two record batches are equal.\n\nParameters\n----------\nother : pyarrow.RecordBatch\n    RecordBatch to compare against.\ncheck_metadata : bool, default False\n    Whether schema metadata equality should be checked as well.\n\nReturns\n-------\nare_equal : bool\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> n_legs = pa.array([2, 2, 4, 4, 5, 100])\n>>> animals = pa.array([\"Flamingo\", \"Parrot\", \"Dog\", \"Horse\", \"Brittle stars\", \"Centipede\"])\n>>> batch = pa.RecordBatch.from_arrays([n_legs, animals],\n...                                     names=[\"n_legs\", \"animals\"])\n>>> batch_0 = pa.record_batch([])\n>>> batch_1 = pa.RecordBatch.from_arrays([n_legs, animals],\n...                                       names=[\"n_legs\", \"animals\"],\n...                                       metadata={\"n_legs\": \"Number of legs per animal\"})\n>>> batch.equals(batch)\nTrue\n>>> batch.equals(batch_0)\nFalse\n>>> batch.equals(batch_1)\nTrue\n>>> batch.equals(batch_1, check_metadata=True)\nFalse");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_11RecordBatch_29equals = {"equals", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_11RecordBatch_29equals, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_11RecordBatch_28equals};
    static PyObject *__pyx_pw_7pyarrow_3lib_11RecordBatch_29equals(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_other = 0;
      int __pyx_v_check_metadata;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[2] = {0,0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("equals (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_other,&__pyx_mstate_global->__pyx_n_u_check_metadata,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(17, 3198, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(17, 3198, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 3198, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "equals", 0) < (0)) __PYX_ERR(17, 3198, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("equals", 0, 1, 2, i); __PYX_ERR(17, 3198, __pyx_L3_error) }
          }
        } else {
          switch (__pyx_nargs) {
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(17, 3198, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 3198, __pyx_L3_error)
            break;
            default: goto __pyx_L5_argtuple_error;
          }
        }
        __pyx_v_other = values[0];
        if (values[1]) {
          __pyx_v_check_metadata = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_check_metadata == (int)-1) && PyErr_Occurred())) __PYX_ERR(17, 3198, __pyx_L3_error)
        } else {
          __pyx_v_check_metadata = ((int)0);
        }
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("equals", 0, 1, 2, __pyx_nargs); __PYX_ERR(17, 3198, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.RecordBatch.equals", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_11RecordBatch_28equals(((struct __pyx_obj_7pyarrow_3lib_RecordBatch *)__pyx_v_self), __pyx_v_other, __pyx_v_check_metadata);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_11RecordBatch_28equals(struct __pyx_obj_7pyarrow_3lib_RecordBatch *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_check_metadata) {
       arrow::RecordBatch *__pyx_v_this_batch;
      std::shared_ptr< arrow::RecordBatch>  __pyx_v_other_batch;
      bool __pyx_v_result;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
       arrow::RecordBatch *__pyx_t_1;
      std::shared_ptr< arrow::RecordBatch>  __pyx_t_2;
      int __pyx_t_3;
      PyObject *__pyx_t_4 = NULL;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("equals", 0);

      /* "pyarrow/table.pxi":3233
 *         False
 *         """
 *         self._assert_cpu()             # <<<<<<<<<<<<<<
 *         cdef:
 *             CRecordBatch* this_batch = self.batch
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_assert_cpu");
        __PYX_ERR(17, 3233, __pyx_L1_error)
      }
      ((struct __pyx_vtabstruct_7pyarrow_3lib_RecordBatch *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._assert_cpu(((struct __pyx_obj_7pyarrow_3lib__Tabular *)__pyx_v_self)); if (unlikely(PyErr_Occurred())) __PYX_ERR(17, 3233, __pyx_L1_error)

      /* "pyarrow/table.pxi":3235
 *         self._assert_cpu()
 *         cdef:
 *             CRecordBatch* this_batch = self.batch             # <<<<<<<<<<<<<<
 *             shared_ptr[CRecordBatch] other_batch = pyarrow_unwrap_batch(other)
 *             c_bool result
*/
      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "batch");
        __PYX_ERR(17, 3235, __pyx_L1_error)
      }
      __pyx_t_1 = __pyx_v_self->batch;
      __pyx_v_this_batch = __pyx_t_1;

      /* "pyarrow/table.pxi":3236
 *         cdef:
 *             CRecordBatch* this_batch = self.batch
 *             shared_ptr[CRecordBatch] other_batch = pyarrow_unwrap_batch(other)             # <<<<<<<<<<<<<<
 *             c_bool result
 * 
*/
      __pyx_t_2 = pyarrow_unwrap_batch(__pyx_v_other); if (unlikely(PyErr_Occurred())) __PYX_ERR(17, 3236, __pyx_L1_error)
      __pyx_v_other_batch = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_2);

      /* "pyarrow/table.pxi":3239
 *             c_bool result
 * 
 *         if not other_batch:             # <<<<<<<<<<<<<<
 *             return False
 * 
*/
      __pyx_t_3 = ((!__pyx_v_other_batch) != 0);
      if (__pyx_t_3) {

        /* "pyarrow/table.pxi":3240
 * 
 *         if not other_batch:
 *             return False             # <<<<<<<<<<<<<<
 * 
 *         with nogil:
*/
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(Py_False);
        __pyx_r = Py_False;
        goto __pyx_L0;

        /* "pyarrow/table.pxi":3239
 *             c_bool result
 * 
 *         if not other_batch:             # <<<<<<<<<<<<<<
 *             return False
 * 
*/
      }

      /* "pyarrow/table.pxi":3242
 *             return False
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             result = this_batch.Equals(deref(other_batch), check_metadata)
 * 
*/
      {
          PyThreadState * _save;
          _save = PyEval_SaveThread();
          __Pyx_FastGIL_Remember();
          /*try:*/ {

            /* "pyarrow/table.pxi":3243
 * 
 *         with nogil:
 *             result = this_batch.Equals(deref(other_batch), check_metadata)             # <<<<<<<<<<<<<<
 * 
 *         return result
*/
            __pyx_v_result = __pyx_v_this_batch->Equals((*__pyx_v_other_batch), __pyx_v_check_metadata);
          }

          /* "pyarrow/table.pxi":3242
 *             return False
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             result = this_batch.Equals(deref(other_batch), check_metadata)
 * 
*/
          /*finally:*/ {
            /*normal exit:*/{
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L6;
            }
            __pyx_L6:;
          }
      }

      /* "pyarrow/table.pxi":3245
 *             result = this_batch.Equals(deref(other_batch), check_metadata)
 * 
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     def select(self, object columns):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_result); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 3245, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L0;

      /* "pyarrow/table.pxi":3198
 *         return pyarrow_wrap_batch(result)
 * 
 *     def equals(self, object other, bint check_metadata=False):             # <<<<<<<<<<<<<<
 *         """
 *         Check if contents of two record batches are equal.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_AddTraceback("pyarrow.lib.RecordBatch.equals", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/table.pxi":3247
 *         return result
 * 
 *     def select(self, object columns):             # <<<<<<<<<<<<<<
 *         """
 *         Select columns of the RecordBatch.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_11RecordBatch_31select(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_11RecordBatch_30select, "RecordBatch.select(self, columns)\n\nSelect columns of the RecordBatch.\n\nReturns a new RecordBatch with the specified columns, and metadata\npreserved.\n\nParameters\n----------\ncolumns : list-like\n    The column names or integer indices to select.\n\nReturns\n-------\nRecordBatch\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> n_legs = pa.array([2, 2, 4, 4, 5, 100])\n>>> animals = pa.array([\"Flamingo\", \"Parrot\", \"Dog\", \"Horse\", \"Brittle stars\", \"Centipede\"])\n>>> batch = pa.record_batch([n_legs, animals],\n...                          names=[\"n_legs\", \"animals\"])\n\nSelect columns my indices:\n\n>>> batch.select([1])\npyarrow.RecordBatch\nanimals: string\n----\nanimals: [\"Flamingo\",\"Parrot\",\"Dog\",\"Horse\",\"Brittle stars\",\"Centipede\"]\n\nSelect columns by names:\n\n>>> batch.select([\"n_legs\"])\npyarrow.RecordBatch\nn_legs: int64\n----\nn_legs: [2,2,4,4,5,100]");
    static PyMethodDef __pyx_mdef_7pyarrow_3lib_11RecordBatch_31select = {"select", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_11RecordBatch_31select, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_11RecordBatch_30select};
    static PyObject *__pyx_pw_7pyarrow_3lib_11RecordBatch_31select(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
      PyObject *__pyx_v_columns = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject* values[1] = {0};
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("select (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_columns,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(17, 3247, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 3247, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "select", 0) < (0)) __PYX_ERR(17, 3247, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("select", 1, 1, 1, i); __PYX_ERR(17, 3247, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 1)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 3247, __pyx_L3_error)
        }
        __pyx_v_columns = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("select", 1, 1, 1, __pyx_nargs); __PYX_ERR(17, 3247, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("pyarrow.lib.RecordBatch.select", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7pyarrow_3lib_11RecordBatch_30select(((struct __pyx_obj_7pyarrow_3lib_RecordBatch *)__pyx_v_self), __pyx_v_columns);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7pyarrow_3lib_11RecordBatch_30select(struct __pyx_obj_7pyarrow_3lib_RecordBatch *__pyx_v_self, PyObject *__pyx_v_columns) {
      std::shared_ptr< arrow::RecordBatch>  __pyx_v_c_batch;
      std::vector<int>  __pyx_v_c_indices;
      PyObject *__pyx_v_idx = NULL;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      Py_ssize_t __pyx_t_2;
      PyObject *(*__pyx_t_3)(PyObject *);
      PyObject *__pyx_t_4 = NULL;
      PyObject *__pyx_t_5 = NULL;
      size_t __pyx_t_6;
      Py_ssize_t __pyx_t_7;
      Py_ssize_t __pyx_t_8;
      Py_ssize_t __pyx_t_9;
      int __pyx_t_10;
      std::shared_ptr< arrow::RecordBatch>  __pyx_t_11;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("select", 0);

      /* "pyarrow/table.pxi":3291
 *             vector[int] c_indices
 * 
 *         for idx in columns:             # <<<<<<<<<<<<<<
 *             idx = self._ensure_integer_index(idx)
 *             idx = _normalize_index(idx, self.num_columns)
*/
      if (likely(PyList_CheckExact(__pyx_v_columns)) || PyTuple_CheckExact(__pyx_v_columns)) {
        __pyx_t_1 = __pyx_v_columns; __Pyx_INCREF(__pyx_t_1);
        __pyx_t_2 = 0;
        __pyx_t_3 = NULL;
      } else {
        __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_columns); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 3291, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_3 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 3291, __pyx_L1_error)
      }
      for (;;) {
        if (likely(!__pyx_t_3)) {
          if (likely(PyList_CheckExact(__pyx_t_1))) {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
              #if !CYTHON_ASSUME_SAFE_SIZE
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(17, 3291, __pyx_L1_error)
              #endif
              if (__pyx_t_2 >= __pyx_temp) break;
            }
            __pyx_t_4 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_2, __Pyx_ReferenceSharing_OwnStrongReference);
            ++__pyx_t_2;
          } else {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
              #if !CYTHON_ASSUME_SAFE_SIZE
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(17, 3291, __pyx_L1_error)
              #endif
              if (__pyx_t_2 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_4 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2));
            #else
            __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2);
            #endif
            ++__pyx_t_2;
          }
          if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 3291, __pyx_L1_error)
        } else {
          __pyx_t_4 = __pyx_t_3(__pyx_t_1);
          if (unlikely(!__pyx_t_4)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(17, 3291, __pyx_L1_error)
              PyErr_Clear();
            }
            break;
          }
        }
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_4);
        __pyx_t_4 = 0;

        /* "pyarrow/table.pxi":3292
 * 
 *         for idx in columns:
 *             idx = self._ensure_integer_index(idx)             # <<<<<<<<<<<<<<
 *             idx = _normalize_index(idx, self.num_columns)
 *             c_indices.push_back(<int> idx)
*/
        __pyx_t_5 = ((PyObject *)__pyx_v_self);
        __Pyx_INCREF(__pyx_t_5);
        __pyx_t_6 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_idx};
          __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_ensure_integer_index, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 3292, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
        }
        __Pyx_DECREF_SET(__pyx_v_idx, __pyx_t_4);
        __pyx_t_4 = 0;

        /* "pyarrow/table.pxi":3293
 *         for idx in columns:
 *             idx = self._ensure_integer_index(idx)
 *             idx = _normalize_index(idx, self.num_columns)             # <<<<<<<<<<<<<<
 *             c_indices.push_back(<int> idx)
 * 
*/
        __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_v_idx); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(17, 3293, __pyx_L1_error)
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_num_columns); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 3293, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_t_4); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(17, 3293, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_9 = __pyx_f_7pyarrow_3lib__normalize_index(__pyx_t_7, __pyx_t_8); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1L))) __PYX_ERR(17, 3293, __pyx_L1_error)
        __pyx_t_4 = PyLong_FromSsize_t(__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 3293, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF_SET(__pyx_v_idx, __pyx_t_4);
        __pyx_t_4 = 0;

        /* "pyarrow/table.pxi":3294
 *             idx = self._ensure_integer_index(idx)
 *             idx = _normalize_index(idx, self.num_columns)
 *             c_indices.push_back(<int> idx)             # <<<<<<<<<<<<<<
 * 
 *         with nogil:
*/
        __pyx_t_10 = __Pyx_PyLong_As_int(__pyx_v_idx); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(17, 3294, __pyx_L1_error)
        try {
          __pyx_v_c_indices.push_back(((int)__pyx_t_10));
        } catch(...) {
          __Pyx_CppExn2PyErr();
          __PYX_ERR(17, 3294, __pyx_L1_error)
        }

        /* "pyarrow/table.pxi":3291
 *             vector[int] c_indices
 * 
 *         for idx in columns:             # <<<<<<<<<<<<<<
 *             idx = self._ensure_integer_index(idx)
 *             idx = _normalize_index(idx, self.num_columns)
*/
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "pyarrow/table.pxi":3296
 *             c_indices.push_back(<int> idx)
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             c_batch = GetResultValue(self.batch.SelectColumns(move(c_indices)))
 * 
*/
      {
          PyThreadState * _save;
          _save = PyEval_SaveThread();
          __Pyx_FastGIL_Remember();
          /*try:*/ {

            /* "pyarrow/table.pxi":3297
 * 
 *         with nogil:
 *             c_batch = GetResultValue(self.batch.SelectColumns(move(c_indices)))             # <<<<<<<<<<<<<<
 * 
 *         return pyarrow_wrap_batch(c_batch)
*/
            if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
              PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "batch");
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              __PYX_ERR(17, 3297, __pyx_L7_error)
            }
            __pyx_t_11 = arrow::py::GetResultValue<std::shared_ptr< arrow::RecordBatch> >(__pyx_v_self->batch->SelectColumns(cython_std::move<std::vector<int> >(__pyx_v_c_indices))); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(17, 3297, __pyx_L7_error)
            __pyx_v_c_batch = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_11);
          }

          /* "pyarrow/table.pxi":3296
 *             c_indices.push_back(<int> idx)
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             c_batch = GetResultValue(self.batch.SelectColumns(move(c_indices)))
 * 
*/
          /*finally:*/ {
            /*normal exit:*/{
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L8;
            }
            __pyx_L7_error: {
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L1_error;
            }
            __pyx_L8:;
          }
      }

      /* "pyarrow/table.pxi":3299
 *             c_batch = GetResultValue(self.batch.SelectColumns(move(c_indices)))
 * 
 *         return pyarrow_wrap_batch(c_batch)             # <<<<<<<<<<<<<<
 * 
 *     def cast(self, Schema target_schema, safe=None, options=None):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = pyarrow_wrap_batch(__pyx_v_c_batch); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 3299, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyarrow/table.pxi":3247
 *         return result
 * 
 *     def select(self, object columns):             # <<<<<<<<<<<<<<
 *         """
 *         Select columns of the RecordBatch.
*/

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_AddTraceback("pyarrow.lib.RecordBatch.select", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_idx);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "pyarrow/table.pxi":3301
 *         return pyarrow_wrap_batch(c_batch)
 * 
 *     def cast(self, Schema target_schema, safe=None, options=None):             # <<<<<<<<<<<<<<
 *         """
 *         Cast record batch values to another schema.
*/

    /* Python wrapper */
    static PyObject *__pyx_pw_7pyarrow_3lib_11RecordBatch_33cast(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_11RecordBatch_32cast, "RecordBatch.cast(self, Schema target_schema, safe=None, options=None)\n\nCast record batch values to another schema.\n\nParameters\n----------\ntarget_schema : Schema\n    Schema to cast to, the names and order of fields must match.\nsafe : bool, default True\n    Check for overflows or other unsafe conversions.\noptions : CastOptions, default None\n    Additional checks pass by CastOptions\n\nReturns\n-------\nRecordBatch\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> import pandas as pd\n>>> df = pd.DataFrame({'n_legs': [2, 4, 5, 100],\n...                    'animals': [\"Flamingo\", \"Horse\", \"Brittle stars\", \"Centipede\"]})\n>>> batch = pa.RecordBatch.from_pandas(df)\n>>> batch.schema\nn_legs: int64\nanimals: string\n-- schema metadata --\npandas: '{\"index_columns\": [{\"kind\": \"range\", \"name\": null, \"start\": 0, ...\n\nDefine new schema and cast batch values:\n\n>>> my_schema = pa.schema([\n...     pa.field('n_legs', pa.duration('s')),\n...     pa.field('animals', pa.string())]\n...     )\n>>> batch.cast(target_schema=my_schema)\npyarrow.RecordBatch\nn_legs: duration[s]\nanimals: string\n----\nn_legs: [2,4,5,100]\nanimals: [\"Flamingo\",\"Horse\",\"Brittle stars\",\"Centipede\"]");
        static PyMethodDef __pyx_mdef_7pyarrow_3lib_11RecordBatch_33cast = {"cast", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_11RecordBatch_33cast, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_11RecordBatch_32cast};
        static PyObject *__pyx_pw_7pyarrow_3lib_11RecordBatch_33cast(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
          struct __pyx_obj_7pyarrow_3lib_Schema *__pyx_v_target_schema = 0;
          PyObject *__pyx_v_safe = 0;
          PyObject *__pyx_v_options = 0;
          #if !CYTHON_METH_FASTCALL
          CYTHON_UNUSED Py_ssize_t __pyx_nargs;
          #endif
          CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
          PyObject* values[3] = {0,0,0};
          int __pyx_lineno = 0;
          const char *__pyx_filename = NULL;
          int __pyx_clineno = 0;
          PyObject *__pyx_r = 0;
          __Pyx_RefNannyDeclarations
          __Pyx_RefNannySetupContext("cast (wrapper)", 0);
          #if !CYTHON_METH_FASTCALL
          #if CYTHON_ASSUME_SAFE_SIZE
          __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
          #else
          __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
          #endif
          #endif
          __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
          {
            PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_target_schema,&__pyx_mstate_global->__pyx_n_u_safe,&__pyx_mstate_global->__pyx_n_u_options,0};
            const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
            if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(17, 3301, __pyx_L3_error)
            if (__pyx_kwds_len > 0) {
              switch (__pyx_nargs) {
                case  3:
                values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
                if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(17, 3301, __pyx_L3_error)
                CYTHON_FALLTHROUGH;
                case  2:
                values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(17, 3301, __pyx_L3_error)
                CYTHON_FALLTHROUGH;
                case  1:
                values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 3301, __pyx_L3_error)
                CYTHON_FALLTHROUGH;
                case  0: break;
                default: goto __pyx_L5_argtuple_error;
              }
              const Py_ssize_t kwd_pos_args = __pyx_nargs;
              if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "cast", 0) < (0)) __PYX_ERR(17, 3301, __pyx_L3_error)
              if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
              if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
              for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("cast", 0, 1, 3, i); __PYX_ERR(17, 3301, __pyx_L3_error) }
              }
            } else {
              switch (__pyx_nargs) {
                case  3:
                values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
                if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(17, 3301, __pyx_L3_error)
                CYTHON_FALLTHROUGH;
                case  2:
                values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(17, 3301, __pyx_L3_error)
                CYTHON_FALLTHROUGH;
                case  1:
                values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 3301, __pyx_L3_error)
                break;
                default: goto __pyx_L5_argtuple_error;
              }
              if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
              if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
            }
            __pyx_v_target_schema = ((struct __pyx_obj_7pyarrow_3lib_Schema *)values[0]);
            __pyx_v_safe = values[1];
            __pyx_v_options = values[2];
          }
          goto __pyx_L6_skip;
          __pyx_L5_argtuple_error:;
          __Pyx_RaiseArgtupleInvalid("cast", 0, 1, 3, __pyx_nargs); __PYX_ERR(17, 3301, __pyx_L3_error)
          __pyx_L6_skip:;
          goto __pyx_L4_argument_unpacking_done;
          __pyx_L3_error:;
          for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
            Py_XDECREF(values[__pyx_temp]);
          }
          __Pyx_AddTraceback("pyarrow.lib.RecordBatch.cast", __pyx_clineno, __pyx_lineno, __pyx_filename);
          __Pyx_RefNannyFinishContext();
          return NULL;
          __pyx_L4_argument_unpacking_done:;
          if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_target_schema), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Schema, 1, "target_schema", 0))) __PYX_ERR(17, 3301, __pyx_L1_error)
          __pyx_r = __pyx_pf_7pyarrow_3lib_11RecordBatch_32cast(((struct __pyx_obj_7pyarrow_3lib_RecordBatch *)__pyx_v_self), __pyx_v_target_schema, __pyx_v_safe, __pyx_v_options);

          /* function exit code */
          goto __pyx_L0;
          __pyx_L1_error:;
          __pyx_r = NULL;
          for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
            Py_XDECREF(values[__pyx_temp]);
          }
          goto __pyx_L7_cleaned_up;
          __pyx_L0:;
          for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
            Py_XDECREF(values[__pyx_temp]);
          }
          __pyx_L7_cleaned_up:;
          __Pyx_RefNannyFinishContext();
          return __pyx_r;
        }

        static PyObject *__pyx_pf_7pyarrow_3lib_11RecordBatch_32cast(struct __pyx_obj_7pyarrow_3lib_RecordBatch *__pyx_v_self, struct __pyx_obj_7pyarrow_3lib_Schema *__pyx_v_target_schema, PyObject *__pyx_v_safe, PyObject *__pyx_v_options) {
          struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_column = 0;
          struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_casted = 0;
          struct __pyx_obj_7pyarrow_3lib_Field *__pyx_v_field = 0;
          PyObject *__pyx_v_newcols = 0;
          PyObject *__pyx_r = NULL;
          __Pyx_RefNannyDeclarations
          PyObject *__pyx_t_1 = NULL;
          PyObject *__pyx_t_2 = NULL;
          PyObject *__pyx_t_3 = NULL;
          int __pyx_t_4;
          PyObject *__pyx_t_5 = NULL;
          PyObject *__pyx_t_6 = NULL;
          PyObject *__pyx_t_7[4];
          size_t __pyx_t_8;
          Py_ssize_t __pyx_t_9;
          PyObject *(*__pyx_t_10)(PyObject *);
          PyObject *(*__pyx_t_11)(PyObject *);
          int __pyx_t_12;
          int __pyx_t_13;
          PyObject *__pyx_t_14[3];
          int __pyx_t_15;
          int __pyx_lineno = 0;
          const char *__pyx_filename = NULL;
          int __pyx_clineno = 0;
          __Pyx_RefNannySetupContext("cast", 0);

          /* "pyarrow/table.pxi":3348
 *             Array column, casted
 *             Field field
 *             list newcols = []             # <<<<<<<<<<<<<<
 * 
 *         if self.schema.names != target_schema.names:
*/
          __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 3348, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_v_newcols = ((PyObject*)__pyx_t_1);
          __pyx_t_1 = 0;

          /* "pyarrow/table.pxi":3350
 *             list newcols = []
 * 
 *         if self.schema.names != target_schema.names:             # <<<<<<<<<<<<<<
 *             raise ValueError(f"Target schema's field names are not matching "
 *                              f"the record batch's field names: {self.schema.names!r}, {target_schema.names!r}")
*/
          __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_schema); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 3350, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_names); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 3350, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_target_schema), __pyx_mstate_global->__pyx_n_u_names); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 3350, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 3350, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(17, 3350, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(__pyx_t_4)) {

            /* "pyarrow/table.pxi":3351
 * 
 *         if self.schema.names != target_schema.names:
 *             raise ValueError(f"Target schema's field names are not matching "             # <<<<<<<<<<<<<<
 *                              f"the record batch's field names: {self.schema.names!r}, {target_schema.names!r}")
 * 
*/
            __pyx_t_1 = NULL;

            /* "pyarrow/table.pxi":3352
 *         if self.schema.names != target_schema.names:
 *             raise ValueError(f"Target schema's field names are not matching "
 *                              f"the record batch's field names: {self.schema.names!r}, {target_schema.names!r}")             # <<<<<<<<<<<<<<
 * 
 *         for column, field in zip(self.itercolumns(), target_schema):
*/
            __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_schema); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 3352, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_names); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 3352, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __pyx_t_2 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_t_5), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 3352, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
            __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_target_schema), __pyx_mstate_global->__pyx_n_u_names); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 3352, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            __pyx_t_6 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_t_5), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 3352, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_6);
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
            __pyx_t_7[0] = __pyx_mstate_global->__pyx_kp_u_Target_schema_s_field_names_are;
            __pyx_t_7[1] = __pyx_t_2;
            __pyx_t_7[2] = __pyx_mstate_global->__pyx_kp_u__18;
            __pyx_t_7[3] = __pyx_t_6;

            /* "pyarrow/table.pxi":3351
 * 
 *         if self.schema.names != target_schema.names:
 *             raise ValueError(f"Target schema's field names are not matching "             # <<<<<<<<<<<<<<
 *                              f"the record batch's field names: {self.schema.names!r}, {target_schema.names!r}")
 * 
*/
            __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_7, 4, 77 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2) + 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6));
            if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 3351, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            __pyx_t_8 = 1;
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_5};
              __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
              __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
              __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
              if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 3351, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_3);
            }
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(17, 3351, __pyx_L1_error)

            /* "pyarrow/table.pxi":3350
 *             list newcols = []
 * 
 *         if self.schema.names != target_schema.names:             # <<<<<<<<<<<<<<
 *             raise ValueError(f"Target schema's field names are not matching "
 *                              f"the record batch's field names: {self.schema.names!r}, {target_schema.names!r}")
*/
          }

          /* "pyarrow/table.pxi":3354
 *                              f"the record batch's field names: {self.schema.names!r}, {target_schema.names!r}")
 * 
 *         for column, field in zip(self.itercolumns(), target_schema):             # <<<<<<<<<<<<<<
 *             if not field.nullable and column.null_count > 0:
 *                 raise ValueError(
*/
          __pyx_t_5 = NULL;
          __pyx_t_6 = ((PyObject *)__pyx_v_self);
          __Pyx_INCREF(__pyx_t_6);
          __pyx_t_8 = 0;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
            __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_itercolumns, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
            if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 3354, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_1);
          }
          __pyx_t_8 = 1;
          {
            PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_t_1, ((PyObject *)__pyx_v_target_schema)};
            __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_zip, __pyx_callargs+__pyx_t_8, (3-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 3354, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
          }
          if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
            __pyx_t_1 = __pyx_t_3; __Pyx_INCREF(__pyx_t_1);
            __pyx_t_9 = 0;
            __pyx_t_10 = NULL;
          } else {
            __pyx_t_9 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 3354, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_1);
            __pyx_t_10 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_10)) __PYX_ERR(17, 3354, __pyx_L1_error)
          }
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          for (;;) {
            if (likely(!__pyx_t_10)) {
              if (likely(PyList_CheckExact(__pyx_t_1))) {
                {
                  Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
                  #if !CYTHON_ASSUME_SAFE_SIZE
                  if (unlikely((__pyx_temp < 0))) __PYX_ERR(17, 3354, __pyx_L1_error)
                  #endif
                  if (__pyx_t_9 >= __pyx_temp) break;
                }
                __pyx_t_3 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_9, __Pyx_ReferenceSharing_OwnStrongReference);
                ++__pyx_t_9;
              } else {
                {
                  Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
                  #if !CYTHON_ASSUME_SAFE_SIZE
                  if (unlikely((__pyx_temp < 0))) __PYX_ERR(17, 3354, __pyx_L1_error)
                  #endif
                  if (__pyx_t_9 >= __pyx_temp) break;
                }
                #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                __pyx_t_3 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_9));
                #else
                __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_9);
                #endif
                ++__pyx_t_9;
              }
              if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 3354, __pyx_L1_error)
            } else {
              __pyx_t_3 = __pyx_t_10(__pyx_t_1);
              if (unlikely(!__pyx_t_3)) {
                PyObject* exc_type = PyErr_Occurred();
                if (exc_type) {
                  if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(17, 3354, __pyx_L1_error)
                  PyErr_Clear();
                }
                break;
              }
            }
            __Pyx_GOTREF(__pyx_t_3);
            if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) {
              PyObject* sequence = __pyx_t_3;
              Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
              if (unlikely(size != 2)) {
                if (size > 2) __Pyx_RaiseTooManyValuesError(2);
                else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
                __PYX_ERR(17, 3354, __pyx_L1_error)
              }
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              if (likely(PyTuple_CheckExact(sequence))) {
                __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0);
                __Pyx_INCREF(__pyx_t_5);
                __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1);
                __Pyx_INCREF(__pyx_t_6);
              } else {
                __pyx_t_5 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference);
                if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 3354, __pyx_L1_error)
                __Pyx_XGOTREF(__pyx_t_5);
                __pyx_t_6 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference);
                if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 3354, __pyx_L1_error)
                __Pyx_XGOTREF(__pyx_t_6);
              }
              #else
              __pyx_t_5 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 3354, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_5);
              __pyx_t_6 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 3354, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_6);
              #endif
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            } else {
              Py_ssize_t index = -1;
              __pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 3354, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_2);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_11 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2);
              index = 0; __pyx_t_5 = __pyx_t_11(__pyx_t_2); if (unlikely(!__pyx_t_5)) goto __pyx_L6_unpacking_failed;
              __Pyx_GOTREF(__pyx_t_5);
              index = 1; __pyx_t_6 = __pyx_t_11(__pyx_t_2); if (unlikely(!__pyx_t_6)) goto __pyx_L6_unpacking_failed;
              __Pyx_GOTREF(__pyx_t_6);
              if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_2), 2) < (0)) __PYX_ERR(17, 3354, __pyx_L1_error)
              __pyx_t_11 = NULL;
              __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
              goto __pyx_L7_unpacking_done;
              __pyx_L6_unpacking_failed:;
              __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
              __pyx_t_11 = NULL;
              if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
              __PYX_ERR(17, 3354, __pyx_L1_error)
              __pyx_L7_unpacking_done:;
            }
            if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array))))) __PYX_ERR(17, 3354, __pyx_L1_error)
            if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Field))))) __PYX_ERR(17, 3354, __pyx_L1_error)
            __Pyx_XDECREF_SET(__pyx_v_column, ((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_t_5));
            __pyx_t_5 = 0;
            __Pyx_XDECREF_SET(__pyx_v_field, ((struct __pyx_obj_7pyarrow_3lib_Field *)__pyx_t_6));
            __pyx_t_6 = 0;

            /* "pyarrow/table.pxi":3355
 * 
 *         for column, field in zip(self.itercolumns(), target_schema):
 *             if not field.nullable and column.null_count > 0:             # <<<<<<<<<<<<<<
 *                 raise ValueError(
 *                     f"Casting field {field.name!r} with null values to non-nullable")
*/
            __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_field), __pyx_mstate_global->__pyx_n_u_nullable); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 3355, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(17, 3355, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __pyx_t_13 = (!__pyx_t_12);
            if (__pyx_t_13) {
            } else {
              __pyx_t_4 = __pyx_t_13;
              goto __pyx_L9_bool_binop_done;
            }
            __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_column), __pyx_mstate_global->__pyx_n_u_null_count); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 3355, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            __pyx_t_6 = PyObject_RichCompare(__pyx_t_3, __pyx_mstate_global->__pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 3355, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(17, 3355, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            __pyx_t_4 = __pyx_t_13;
            __pyx_L9_bool_binop_done:;
            if (unlikely(__pyx_t_4)) {

              /* "pyarrow/table.pxi":3356
 *         for column, field in zip(self.itercolumns(), target_schema):
 *             if not field.nullable and column.null_count > 0:
 *                 raise ValueError(             # <<<<<<<<<<<<<<
 *                     f"Casting field {field.name!r} with null values to non-nullable")
 *             casted = column.cast(field.type, safe=safe, options=options)
*/
              __pyx_t_3 = NULL;

              /* "pyarrow/table.pxi":3357
 *             if not field.nullable and column.null_count > 0:
 *                 raise ValueError(
 *                     f"Casting field {field.name!r} with null values to non-nullable")             # <<<<<<<<<<<<<<
 *             casted = column.cast(field.type, safe=safe, options=options)
 *             newcols.append(casted)
*/
              __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_field), __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 3357, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_5);
              __pyx_t_2 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_t_5), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 3357, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_2);
              __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
              __pyx_t_14[0] = __pyx_mstate_global->__pyx_kp_u_Casting_field;
              __pyx_t_14[1] = __pyx_t_2;
              __pyx_t_14[2] = __pyx_mstate_global->__pyx_kp_u_with_null_values_to_non_nullabl;
              __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_14, 3, 14 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2) + 33, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2));
              if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 3357, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_5);
              __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
              __pyx_t_8 = 1;
              {
                PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
                __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 3356, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_6);
              }
              __Pyx_Raise(__pyx_t_6, 0, 0, 0);
              __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
              __PYX_ERR(17, 3356, __pyx_L1_error)

              /* "pyarrow/table.pxi":3355
 * 
 *         for column, field in zip(self.itercolumns(), target_schema):
 *             if not field.nullable and column.null_count > 0:             # <<<<<<<<<<<<<<
 *                 raise ValueError(
 *                     f"Casting field {field.name!r} with null values to non-nullable")
*/
            }

            /* "pyarrow/table.pxi":3358
 *                 raise ValueError(
 *                     f"Casting field {field.name!r} with null values to non-nullable")
 *             casted = column.cast(field.type, safe=safe, options=options)             # <<<<<<<<<<<<<<
 *             newcols.append(casted)
 * 
*/
            __pyx_t_5 = ((PyObject *)__pyx_v_column);
            __Pyx_INCREF(__pyx_t_5);
            if (unlikely(((PyObject *)__pyx_v_field) == Py_None)) {
              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "type");
              __PYX_ERR(17, 3358, __pyx_L1_error)
            }
            __pyx_t_8 = 0;
            {
              PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_5, ((PyObject *)__pyx_v_field->type)};
              __pyx_t_3 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 3358, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_3);
              if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_safe, __pyx_v_safe, __pyx_t_3, __pyx_callargs+2, 0) < (0)) __PYX_ERR(17, 3358, __pyx_L1_error)
              if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_options, __pyx_v_options, __pyx_t_3, __pyx_callargs+2, 1) < (0)) __PYX_ERR(17, 3358, __pyx_L1_error)
              __pyx_t_6 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_cast, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_3);
              __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 3358, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_6);
            }
            if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array))))) __PYX_ERR(17, 3358, __pyx_L1_error)
            __Pyx_XDECREF_SET(__pyx_v_casted, ((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_t_6));
            __pyx_t_6 = 0;

            /* "pyarrow/table.pxi":3359
 *                     f"Casting field {field.name!r} with null values to non-nullable")
 *             casted = column.cast(field.type, safe=safe, options=options)
 *             newcols.append(casted)             # <<<<<<<<<<<<<<
 * 
 *         return RecordBatch.from_arrays(newcols, schema=target_schema)
*/
            __pyx_t_15 = __Pyx_PyList_Append(__pyx_v_newcols, ((PyObject *)__pyx_v_casted)); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(17, 3359, __pyx_L1_error)

            /* "pyarrow/table.pxi":3354
 *                              f"the record batch's field names: {self.schema.names!r}, {target_schema.names!r}")
 * 
 *         for column, field in zip(self.itercolumns(), target_schema):             # <<<<<<<<<<<<<<
 *             if not field.nullable and column.null_count > 0:
 *                 raise ValueError(
*/
          }
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

          /* "pyarrow/table.pxi":3361
 *             newcols.append(casted)
 * 
 *         return RecordBatch.from_arrays(newcols, schema=target_schema)             # <<<<<<<<<<<<<<
 * 
 *     def _to_pandas(self, options, **kwargs):
*/
          __Pyx_XDECREF(__pyx_r);
          __pyx_t_6 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RecordBatch);
          __Pyx_INCREF(__pyx_t_6);
          __pyx_t_8 = 0;
          {
            PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_6, __pyx_v_newcols};
            __pyx_t_3 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 3361, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_schema, ((PyObject *)__pyx_v_target_schema), __pyx_t_3, __pyx_callargs+2, 0) < (0)) __PYX_ERR(17, 3361, __pyx_L1_error)
            __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_from_arrays, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_3);
            __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 3361, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_1);
          }
          __pyx_r = __pyx_t_1;
          __pyx_t_1 = 0;
          goto __pyx_L0;

          /* "pyarrow/table.pxi":3301
 *         return pyarrow_wrap_batch(c_batch)
 * 
 *     def cast(self, Schema target_schema, safe=None, options=None):             # <<<<<<<<<<<<<<
 *         """
 *         Cast record batch values to another schema.
*/

          /* function exit code */
          __pyx_L1_error:;
          __Pyx_XDECREF(__pyx_t_1);
          __Pyx_XDECREF(__pyx_t_2);
          __Pyx_XDECREF(__pyx_t_3);
          __Pyx_XDECREF(__pyx_t_5);
          __Pyx_XDECREF(__pyx_t_6);
          __Pyx_AddTraceback("pyarrow.lib.RecordBatch.cast", __pyx_clineno, __pyx_lineno, __pyx_filename);
          __pyx_r = NULL;
          __pyx_L0:;
          __Pyx_XDECREF((PyObject *)__pyx_v_column);
          __Pyx_XDECREF((PyObject *)__pyx_v_casted);
          __Pyx_XDECREF((PyObject *)__pyx_v_field);
          __Pyx_XDECREF(__pyx_v_newcols);
          __Pyx_XGIVEREF(__pyx_r);
          __Pyx_RefNannyFinishContext();
          return __pyx_r;
        }

        /* "pyarrow/table.pxi":3363
 *         return RecordBatch.from_arrays(newcols, schema=target_schema)
 * 
 *     def _to_pandas(self, options, **kwargs):             # <<<<<<<<<<<<<<
 *         self._assert_cpu()
 *         return Table.from_batches([self])._to_pandas(options, **kwargs)
*/

        /* Python wrapper */
        static PyObject *__pyx_pw_7pyarrow_3lib_11RecordBatch_35_to_pandas(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
        PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_11RecordBatch_34_to_pandas, "RecordBatch._to_pandas(self, options, **kwargs)");
        static PyMethodDef __pyx_mdef_7pyarrow_3lib_11RecordBatch_35_to_pandas = {"_to_pandas", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_11RecordBatch_35_to_pandas, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_11RecordBatch_34_to_pandas};
        static PyObject *__pyx_pw_7pyarrow_3lib_11RecordBatch_35_to_pandas(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
          PyObject *__pyx_v_options = 0;
          PyObject *__pyx_v_kwargs = 0;
          #if !CYTHON_METH_FASTCALL
          CYTHON_UNUSED Py_ssize_t __pyx_nargs;
          #endif
          CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
          PyObject* values[1] = {0};
          int __pyx_lineno = 0;
          const char *__pyx_filename = NULL;
          int __pyx_clineno = 0;
          PyObject *__pyx_r = 0;
          __Pyx_RefNannyDeclarations
          __Pyx_RefNannySetupContext("_to_pandas (wrapper)", 0);
          #if !CYTHON_METH_FASTCALL
          #if CYTHON_ASSUME_SAFE_SIZE
          __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
          #else
          __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
          #endif
          #endif
          __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
          __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
          __Pyx_GOTREF(__pyx_v_kwargs);
          {
            PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_options,0};
            const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
            if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(17, 3363, __pyx_L3_error)
            if (__pyx_kwds_len > 0) {
              switch (__pyx_nargs) {
                case  1:
                values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 3363, __pyx_L3_error)
                CYTHON_FALLTHROUGH;
                case  0: break;
                default: goto __pyx_L5_argtuple_error;
              }
              const Py_ssize_t kwd_pos_args = __pyx_nargs;
              if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, __pyx_v_kwargs, values, kwd_pos_args, __pyx_kwds_len, "_to_pandas", 1) < (0)) __PYX_ERR(17, 3363, __pyx_L3_error)
              for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_to_pandas", 1, 1, 1, i); __PYX_ERR(17, 3363, __pyx_L3_error) }
              }
            } else if (unlikely(__pyx_nargs != 1)) {
              goto __pyx_L5_argtuple_error;
            } else {
              values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
              if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 3363, __pyx_L3_error)
            }
            __pyx_v_options = values[0];
          }
          goto __pyx_L6_skip;
          __pyx_L5_argtuple_error:;
          __Pyx_RaiseArgtupleInvalid("_to_pandas", 1, 1, 1, __pyx_nargs); __PYX_ERR(17, 3363, __pyx_L3_error)
          __pyx_L6_skip:;
          goto __pyx_L4_argument_unpacking_done;
          __pyx_L3_error:;
          for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
            Py_XDECREF(values[__pyx_temp]);
          }
          __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
          __Pyx_AddTraceback("pyarrow.lib.RecordBatch._to_pandas", __pyx_clineno, __pyx_lineno, __pyx_filename);
          __Pyx_RefNannyFinishContext();
          return NULL;
          __pyx_L4_argument_unpacking_done:;
          __pyx_r = __pyx_pf_7pyarrow_3lib_11RecordBatch_34_to_pandas(((struct __pyx_obj_7pyarrow_3lib_RecordBatch *)__pyx_v_self), __pyx_v_options, __pyx_v_kwargs);

          /* function exit code */
          for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
            Py_XDECREF(values[__pyx_temp]);
          }
          __Pyx_DECREF(__pyx_v_kwargs);
          __Pyx_RefNannyFinishContext();
          return __pyx_r;
        }

        static PyObject *__pyx_pf_7pyarrow_3lib_11RecordBatch_34_to_pandas(struct __pyx_obj_7pyarrow_3lib_RecordBatch *__pyx_v_self, PyObject *__pyx_v_options, PyObject *__pyx_v_kwargs) {
          PyObject *__pyx_r = NULL;
          __Pyx_RefNannyDeclarations
          PyObject *__pyx_t_1 = NULL;
          PyObject *__pyx_t_2 = NULL;
          PyObject *__pyx_t_3 = NULL;
          PyObject *__pyx_t_4 = NULL;
          PyObject *__pyx_t_5 = NULL;
          size_t __pyx_t_6;
          int __pyx_lineno = 0;
          const char *__pyx_filename = NULL;
          int __pyx_clineno = 0;
          __Pyx_RefNannySetupContext("_to_pandas", 0);

          /* "pyarrow/table.pxi":3364
 * 
 *     def _to_pandas(self, options, **kwargs):
 *         self._assert_cpu()             # <<<<<<<<<<<<<<
 *         return Table.from_batches([self])._to_pandas(options, **kwargs)
 * 
*/
          if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
            PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_assert_cpu");
            __PYX_ERR(17, 3364, __pyx_L1_error)
          }
          ((struct __pyx_vtabstruct_7pyarrow_3lib_RecordBatch *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._assert_cpu(((struct __pyx_obj_7pyarrow_3lib__Tabular *)__pyx_v_self)); if (unlikely(PyErr_Occurred())) __PYX_ERR(17, 3364, __pyx_L1_error)

          /* "pyarrow/table.pxi":3365
 *     def _to_pandas(self, options, **kwargs):
 *         self._assert_cpu()
 *         return Table.from_batches([self])._to_pandas(options, **kwargs)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
*/
          __Pyx_XDECREF(__pyx_r);
          __pyx_t_2 = NULL;
          __pyx_t_4 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Table);
          __Pyx_INCREF(__pyx_t_4);
          __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 3365, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_INCREF((PyObject *)__pyx_v_self);
          __Pyx_GIVEREF((PyObject *)__pyx_v_self);
          if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_self)) != (0)) __PYX_ERR(17, 3365, __pyx_L1_error);
          __pyx_t_6 = 0;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_5};
            __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_from_batches, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
            if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 3365, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
          }
          __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_to_pandas); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 3365, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __pyx_t_3 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 3365, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_6 = 1;
          #if CYTHON_UNPACK_METHODS
          if (likely(PyMethod_Check(__pyx_t_5))) {
            __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5);
            assert(__pyx_t_2);
            PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
            __Pyx_INCREF(__pyx_t_2);
            __Pyx_INCREF(__pyx__function);
            __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
            __pyx_t_6 = 0;
          }
          #endif
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_options};
            __pyx_t_1 = __Pyx_PyObject_FastCallDict((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_3);
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
            if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 3365, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_1);
          }
          __pyx_r = __pyx_t_1;
          __pyx_t_1 = 0;
          goto __pyx_L0;

          /* "pyarrow/table.pxi":3363
 *         return RecordBatch.from_arrays(newcols, schema=target_schema)
 * 
 *     def _to_pandas(self, options, **kwargs):             # <<<<<<<<<<<<<<
 *         self._assert_cpu()
 *         return Table.from_batches([self])._to_pandas(options, **kwargs)
*/

          /* function exit code */
          __pyx_L1_error:;
          __Pyx_XDECREF(__pyx_t_1);
          __Pyx_XDECREF(__pyx_t_2);
          __Pyx_XDECREF(__pyx_t_3);
          __Pyx_XDECREF(__pyx_t_4);
          __Pyx_XDECREF(__pyx_t_5);
          __Pyx_AddTraceback("pyarrow.lib.RecordBatch._to_pandas", __pyx_clineno, __pyx_lineno, __pyx_filename);
          __pyx_r = NULL;
          __pyx_L0:;
          __Pyx_XGIVEREF(__pyx_r);
          __Pyx_RefNannyFinishContext();
          return __pyx_r;
        }

        /* "pyarrow/table.pxi":3367
 *         return Table.from_batches([self])._to_pandas(options, **kwargs)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def from_pandas(cls, df, Schema schema=None, preserve_index=None,
 *                     nthreads=None, columns=None):
*/

        /* Python wrapper */
        static PyObject *__pyx_pw_7pyarrow_3lib_11RecordBatch_37from_pandas(PyObject *__pyx_v_cls, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
        PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_11RecordBatch_36from_pandas, "RecordBatch.from_pandas(cls, df, Schema schema=None, preserve_index=None, nthreads=None, columns=None)\n\nConvert pandas.DataFrame to an Arrow RecordBatch\n\nParameters\n----------\ndf : pandas.DataFrame\nschema : pyarrow.Schema, optional\n    The expected schema of the RecordBatch. This can be used to\n    indicate the type of columns if we cannot infer it automatically.\n    If passed, the output will have exactly this schema. Columns\n    specified in the schema that are not found in the DataFrame columns\n    or its index will raise an error. Additional columns or index\n    levels in the DataFrame which are not specified in the schema will\n    be ignored.\npreserve_index : bool, optional\n    Whether to store the index as an additional column in the resulting\n    ``RecordBatch``. The default of None will store the index as a\n    column, except for RangeIndex which is stored as metadata only. Use\n    ``preserve_index=True`` to force it to be stored as a column.\nnthreads : int, default None\n    If greater than 1, convert columns to Arrow in parallel using\n    indicated number of threads. By default, this follows\n    :func:`pyarrow.cpu_count` (may use up to system CPU count threads).\ncolumns : list, optional\n   List of column to be converted. If None, use all columns.\n\nReturns\n-------\npyarrow.RecordBatch\n\n\nExamples\n--------\n>>> import pandas as pd\n>>> df = pd.DataFrame({'year': [2020, 2022, 2021, 2022],\n...                    'month': [3, 5, 7, 9],\n...                    'day': [1, 5, 9, 13],\n...                    'n_legs': [2, 4, 5, 100],\n...                    'animals': [\"Flamingo\", \"Horse\", \"Brittle stars\", \"Centipede\"]})\n\nConvert pandas DataFrame to RecordBatch:\n\n>>> import pyarrow as pa\n>>> pa.RecordBatch.from_pandas(df)\npyarrow.RecordBatch\nyear: int64\nmonth: int64\nday: int64\nn_legs: int64\nanimals: string\n----\nyear: [2020,2022,2021,2022]\nmonth: [3,5,7,9]\nday: [1,5,9,13]\nn_legs: [2,4,5,100]\nanimals: [\"Flaming""o\",\"Horse\",\"Brittle stars\",\"Centipede\"]\n\nConvert pandas DataFrame to RecordBatch using schema:\n\n>>> my_schema = pa.schema([\n...     pa.field('n_legs', pa.int64()),\n...     pa.field('animals', pa.string())],\n...     metadata={\"n_legs\": \"Number of legs per animal\"})\n>>> pa.RecordBatch.from_pandas(df, schema=my_schema)\npyarrow.RecordBatch\nn_legs: int64\nanimals: string\n----\nn_legs: [2,4,5,100]\nanimals: [\"Flamingo\",\"Horse\",\"Brittle stars\",\"Centipede\"]\n\nConvert pandas DataFrame to RecordBatch specifying columns:\n\n>>> pa.RecordBatch.from_pandas(df, columns=[\"n_legs\"])\npyarrow.RecordBatch\nn_legs: int64\n----\nn_legs: [2,4,5,100]");
        static PyMethodDef __pyx_mdef_7pyarrow_3lib_11RecordBatch_37from_pandas = {"from_pandas", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_11RecordBatch_37from_pandas, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_11RecordBatch_36from_pandas};
        static PyObject *__pyx_pw_7pyarrow_3lib_11RecordBatch_37from_pandas(PyObject *__pyx_v_cls, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
          PyObject *__pyx_v_df = 0;
          struct __pyx_obj_7pyarrow_3lib_Schema *__pyx_v_schema = 0;
          PyObject *__pyx_v_preserve_index = 0;
          PyObject *__pyx_v_nthreads = 0;
          PyObject *__pyx_v_columns = 0;
          #if !CYTHON_METH_FASTCALL
          CYTHON_UNUSED Py_ssize_t __pyx_nargs;
          #endif
          CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
          PyObject* values[5] = {0,0,0,0,0};
          int __pyx_lineno = 0;
          const char *__pyx_filename = NULL;
          int __pyx_clineno = 0;
          PyObject *__pyx_r = 0;
          __Pyx_RefNannyDeclarations
          __Pyx_RefNannySetupContext("from_pandas (wrapper)", 0);
          #if !CYTHON_METH_FASTCALL
          #if CYTHON_ASSUME_SAFE_SIZE
          __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
          #else
          __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
          #endif
          #endif
          __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
          {
            PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_df,&__pyx_mstate_global->__pyx_n_u_schema,&__pyx_mstate_global->__pyx_n_u_preserve_index,&__pyx_mstate_global->__pyx_n_u_nthreads,&__pyx_mstate_global->__pyx_n_u_columns,0};
            const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
            if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(17, 3367, __pyx_L3_error)
            if (__pyx_kwds_len > 0) {
              switch (__pyx_nargs) {
                case  5:
                values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
                if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(17, 3367, __pyx_L3_error)
                CYTHON_FALLTHROUGH;
                case  4:
                values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
                if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(17, 3367, __pyx_L3_error)
                CYTHON_FALLTHROUGH;
                case  3:
                values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
                if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(17, 3367, __pyx_L3_error)
                CYTHON_FALLTHROUGH;
                case  2:
                values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(17, 3367, __pyx_L3_error)
                CYTHON_FALLTHROUGH;
                case  1:
                values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 3367, __pyx_L3_error)
                CYTHON_FALLTHROUGH;
                case  0: break;
                default: goto __pyx_L5_argtuple_error;
              }
              const Py_ssize_t kwd_pos_args = __pyx_nargs;
              if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "from_pandas", 0) < (0)) __PYX_ERR(17, 3367, __pyx_L3_error)

              /* "pyarrow/table.pxi":3368
 * 
 *     @classmethod
 *     def from_pandas(cls, df, Schema schema=None, preserve_index=None,             # <<<<<<<<<<<<<<
 *                     nthreads=None, columns=None):
 *         """
*/
              if (!values[1]) values[1] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_7pyarrow_3lib_Schema *)Py_None));
              if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));

              /* "pyarrow/table.pxi":3369
 *     @classmethod
 *     def from_pandas(cls, df, Schema schema=None, preserve_index=None,
 *                     nthreads=None, columns=None):             # <<<<<<<<<<<<<<
 *         """
 *         Convert pandas.DataFrame to an Arrow RecordBatch
*/
              if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None));
              if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)Py_None));
              for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("from_pandas", 0, 1, 5, i); __PYX_ERR(17, 3367, __pyx_L3_error) }
              }
            } else {
              switch (__pyx_nargs) {
                case  5:
                values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
                if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(17, 3367, __pyx_L3_error)
                CYTHON_FALLTHROUGH;
                case  4:
                values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
                if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(17, 3367, __pyx_L3_error)
                CYTHON_FALLTHROUGH;
                case  3:
                values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
                if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(17, 3367, __pyx_L3_error)
                CYTHON_FALLTHROUGH;
                case  2:
                values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(17, 3367, __pyx_L3_error)
                CYTHON_FALLTHROUGH;
                case  1:
                values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 3367, __pyx_L3_error)
                break;
                default: goto __pyx_L5_argtuple_error;
              }

              /* "pyarrow/table.pxi":3368
 * 
 *     @classmethod
 *     def from_pandas(cls, df, Schema schema=None, preserve_index=None,             # <<<<<<<<<<<<<<
 *                     nthreads=None, columns=None):
 *         """
*/
              if (!values[1]) values[1] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_7pyarrow_3lib_Schema *)Py_None));
              if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));

              /* "pyarrow/table.pxi":3369
 *     @classmethod
 *     def from_pandas(cls, df, Schema schema=None, preserve_index=None,
 *                     nthreads=None, columns=None):             # <<<<<<<<<<<<<<
 *         """
 *         Convert pandas.DataFrame to an Arrow RecordBatch
*/
              if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None));
              if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)Py_None));
            }
            __pyx_v_df = values[0];
            __pyx_v_schema = ((struct __pyx_obj_7pyarrow_3lib_Schema *)values[1]);
            __pyx_v_preserve_index = values[2];
            __pyx_v_nthreads = values[3];
            __pyx_v_columns = values[4];
          }
          goto __pyx_L6_skip;
          __pyx_L5_argtuple_error:;
          __Pyx_RaiseArgtupleInvalid("from_pandas", 0, 1, 5, __pyx_nargs); __PYX_ERR(17, 3367, __pyx_L3_error)
          __pyx_L6_skip:;
          goto __pyx_L4_argument_unpacking_done;
          __pyx_L3_error:;
          for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
            Py_XDECREF(values[__pyx_temp]);
          }
          __Pyx_AddTraceback("pyarrow.lib.RecordBatch.from_pandas", __pyx_clineno, __pyx_lineno, __pyx_filename);
          __Pyx_RefNannyFinishContext();
          return NULL;
          __pyx_L4_argument_unpacking_done:;
          if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_schema), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Schema, 1, "schema", 0))) __PYX_ERR(17, 3368, __pyx_L1_error)
          __pyx_r = __pyx_pf_7pyarrow_3lib_11RecordBatch_36from_pandas(((PyTypeObject*)__pyx_v_cls), __pyx_v_df, __pyx_v_schema, __pyx_v_preserve_index, __pyx_v_nthreads, __pyx_v_columns);

          /* "pyarrow/table.pxi":3367
 *         return Table.from_batches([self])._to_pandas(options, **kwargs)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def from_pandas(cls, df, Schema schema=None, preserve_index=None,
 *                     nthreads=None, columns=None):
*/

          /* function exit code */
          goto __pyx_L0;
          __pyx_L1_error:;
          __pyx_r = NULL;
          for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
            Py_XDECREF(values[__pyx_temp]);
          }
          goto __pyx_L7_cleaned_up;
          __pyx_L0:;
          for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
            Py_XDECREF(values[__pyx_temp]);
          }
          __pyx_L7_cleaned_up:;
          __Pyx_RefNannyFinishContext();
          return __pyx_r;
        }

        static PyObject *__pyx_pf_7pyarrow_3lib_11RecordBatch_36from_pandas(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_df, struct __pyx_obj_7pyarrow_3lib_Schema *__pyx_v_schema, PyObject *__pyx_v_preserve_index, PyObject *__pyx_v_nthreads, PyObject *__pyx_v_columns) {
          PyObject *__pyx_v_dataframe_to_arrays = NULL;
          PyObject *__pyx_v_arrays = NULL;
          PyObject *__pyx_v_n_rows = NULL;
          std::vector<std::shared_ptr< arrow::Array> >  __pyx_v_c_arrays;
          PyObject *__pyx_r = NULL;
          __Pyx_RefNannyDeclarations
          PyObject *__pyx_t_1 = NULL;
          PyObject *__pyx_t_2 = NULL;
          Py_ssize_t __pyx_t_3;
          PyObject *__pyx_t_4 = NULL;
          PyObject *__pyx_t_5 = NULL;
          size_t __pyx_t_6;
          PyObject *__pyx_t_7 = NULL;
          PyObject *__pyx_t_8 = NULL;
          PyObject *(*__pyx_t_9)(PyObject *);
          int __pyx_t_10;
          int64_t __pyx_t_11;
          int __pyx_lineno = 0;
          const char *__pyx_filename = NULL;
          int __pyx_clineno = 0;
          __Pyx_RefNannySetupContext("from_pandas", 0);
          __Pyx_INCREF((PyObject *)__pyx_v_schema);

          /* "pyarrow/table.pxi":3449
 *         n_legs: [2,4,5,100]
 *         """
 *         from pyarrow.pandas_compat import dataframe_to_arrays             # <<<<<<<<<<<<<<
 *         arrays, schema, n_rows = dataframe_to_arrays(
 *             df, schema, preserve_index, nthreads=nthreads, columns=columns
*/
          {
            PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_dataframe_to_arrays};
            __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_pyarrow_pandas_compat, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 3449, __pyx_L1_error)
          }
          __pyx_t_1 = __pyx_t_2;
          __Pyx_GOTREF(__pyx_t_1);
          {
            PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_dataframe_to_arrays};
            __pyx_t_3 = 0; {
              __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_1, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 3449, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_4);
              switch (__pyx_t_3) {
                case 0:
                __Pyx_INCREF(__pyx_t_4);
                __pyx_v_dataframe_to_arrays = __pyx_t_4;
                break;
                default:;
              }
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            }
          }
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

          /* "pyarrow/table.pxi":3450
 *         """
 *         from pyarrow.pandas_compat import dataframe_to_arrays
 *         arrays, schema, n_rows = dataframe_to_arrays(             # <<<<<<<<<<<<<<
 *             df, schema, preserve_index, nthreads=nthreads, columns=columns
 *         )
*/
          __pyx_t_4 = NULL;
          __Pyx_INCREF(__pyx_v_dataframe_to_arrays);
          __pyx_t_5 = __pyx_v_dataframe_to_arrays; 

          /* "pyarrow/table.pxi":3451
 *         from pyarrow.pandas_compat import dataframe_to_arrays
 *         arrays, schema, n_rows = dataframe_to_arrays(
 *             df, schema, preserve_index, nthreads=nthreads, columns=columns             # <<<<<<<<<<<<<<
 *         )
 * 
*/
          __pyx_t_6 = 1;
          #if CYTHON_UNPACK_METHODS
          if (unlikely(PyMethod_Check(__pyx_t_5))) {
            __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
            assert(__pyx_t_4);
            PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(__pyx__function);
            __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
            __pyx_t_6 = 0;
          }
          #endif
          {
            PyObject *__pyx_callargs[4 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_4, __pyx_v_df, ((PyObject *)__pyx_v_schema), __pyx_v_preserve_index};
            __pyx_t_7 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 3450, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_7);
            if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_nthreads, __pyx_v_nthreads, __pyx_t_7, __pyx_callargs+4, 0) < (0)) __PYX_ERR(17, 3450, __pyx_L1_error)
            if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_columns, __pyx_v_columns, __pyx_t_7, __pyx_callargs+4, 1) < (0)) __PYX_ERR(17, 3450, __pyx_L1_error)
            __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (4-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_7);
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
            if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 3450, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_1);
          }
          if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
            PyObject* sequence = __pyx_t_1;
            Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
            if (unlikely(size != 3)) {
              if (size > 3) __Pyx_RaiseTooManyValuesError(3);
              else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
              __PYX_ERR(17, 3450, __pyx_L1_error)
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            if (likely(PyTuple_CheckExact(sequence))) {
              __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0);
              __Pyx_INCREF(__pyx_t_5);
              __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1);
              __Pyx_INCREF(__pyx_t_7);
              __pyx_t_4 = PyTuple_GET_ITEM(sequence, 2);
              __Pyx_INCREF(__pyx_t_4);
            } else {
              __pyx_t_5 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference);
              if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 3450, __pyx_L1_error)
              __Pyx_XGOTREF(__pyx_t_5);
              __pyx_t_7 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference);
              if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 3450, __pyx_L1_error)
              __Pyx_XGOTREF(__pyx_t_7);
              __pyx_t_4 = __Pyx_PyList_GetItemRefFast(sequence, 2, __Pyx_ReferenceSharing_SharedReference);
              if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 3450, __pyx_L1_error)
              __Pyx_XGOTREF(__pyx_t_4);
            }
            #else
            __pyx_t_5 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 3450, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            __pyx_t_7 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 3450, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_7);
            __pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 3450, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            #endif
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          } else {
            Py_ssize_t index = -1;
            __pyx_t_8 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(17, 3450, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_8);
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            __pyx_t_9 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_8);
            index = 0; __pyx_t_5 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_5)) goto __pyx_L3_unpacking_failed;
            __Pyx_GOTREF(__pyx_t_5);
            index = 1; __pyx_t_7 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_7)) goto __pyx_L3_unpacking_failed;
            __Pyx_GOTREF(__pyx_t_7);
            index = 2; __pyx_t_4 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_4)) goto __pyx_L3_unpacking_failed;
            __Pyx_GOTREF(__pyx_t_4);
            if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 3) < (0)) __PYX_ERR(17, 3450, __pyx_L1_error)
            __pyx_t_9 = NULL;
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
            goto __pyx_L4_unpacking_done;
            __pyx_L3_unpacking_failed:;
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
            __pyx_t_9 = NULL;
            if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
            __PYX_ERR(17, 3450, __pyx_L1_error)
            __pyx_L4_unpacking_done:;
          }

          /* "pyarrow/table.pxi":3450
 *         """
 *         from pyarrow.pandas_compat import dataframe_to_arrays
 *         arrays, schema, n_rows = dataframe_to_arrays(             # <<<<<<<<<<<<<<
 *             df, schema, preserve_index, nthreads=nthreads, columns=columns
 *         )
*/
          if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Schema))))) __PYX_ERR(17, 3450, __pyx_L1_error)
          __pyx_v_arrays = __pyx_t_5;
          __pyx_t_5 = 0;
          __Pyx_DECREF_SET(__pyx_v_schema, ((struct __pyx_obj_7pyarrow_3lib_Schema *)__pyx_t_7));
          __pyx_t_7 = 0;
          __pyx_v_n_rows = __pyx_t_4;
          __pyx_t_4 = 0;

          /* "pyarrow/table.pxi":3456
 *         # If df is empty but row index is not, create empty RecordBatch with rows >0
 *         cdef vector[shared_ptr[CArray]] c_arrays
 *         if n_rows:             # <<<<<<<<<<<<<<
 *             return pyarrow_wrap_batch(CRecordBatch.Make((<Schema> schema).sp_schema,
 *                                                         n_rows, c_arrays))
*/
          __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_n_rows); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(17, 3456, __pyx_L1_error)
          if (__pyx_t_10) {

            /* "pyarrow/table.pxi":3457
 *         cdef vector[shared_ptr[CArray]] c_arrays
 *         if n_rows:
 *             return pyarrow_wrap_batch(CRecordBatch.Make((<Schema> schema).sp_schema,             # <<<<<<<<<<<<<<
 *                                                         n_rows, c_arrays))
 *         else:
*/
            __Pyx_XDECREF(__pyx_r);
            if (unlikely(((PyObject *)__pyx_v_schema) == Py_None)) {
              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_schema");
              __PYX_ERR(17, 3457, __pyx_L1_error)
            }

            /* "pyarrow/table.pxi":3458
 *         if n_rows:
 *             return pyarrow_wrap_batch(CRecordBatch.Make((<Schema> schema).sp_schema,
 *                                                         n_rows, c_arrays))             # <<<<<<<<<<<<<<
 *         else:
 *             return cls.from_arrays(arrays, schema=schema)
*/
            __pyx_t_11 = __Pyx_PyLong_As_int64_t(__pyx_v_n_rows); if (unlikely((__pyx_t_11 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(17, 3458, __pyx_L1_error)

            /* "pyarrow/table.pxi":3457
 *         cdef vector[shared_ptr[CArray]] c_arrays
 *         if n_rows:
 *             return pyarrow_wrap_batch(CRecordBatch.Make((<Schema> schema).sp_schema,             # <<<<<<<<<<<<<<
 *                                                         n_rows, c_arrays))
 *         else:
*/
            __pyx_t_1 = pyarrow_wrap_batch( arrow::RecordBatch::Make(((struct __pyx_obj_7pyarrow_3lib_Schema *)__pyx_v_schema)->sp_schema, __pyx_t_11, __pyx_v_c_arrays)); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 3457, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_1);
            __pyx_r = __pyx_t_1;
            __pyx_t_1 = 0;
            goto __pyx_L0;

            /* "pyarrow/table.pxi":3456
 *         # If df is empty but row index is not, create empty RecordBatch with rows >0
 *         cdef vector[shared_ptr[CArray]] c_arrays
 *         if n_rows:             # <<<<<<<<<<<<<<
 *             return pyarrow_wrap_batch(CRecordBatch.Make((<Schema> schema).sp_schema,
 *                                                         n_rows, c_arrays))
*/
          }

          /* "pyarrow/table.pxi":3460
 *                                                         n_rows, c_arrays))
 *         else:
 *             return cls.from_arrays(arrays, schema=schema)             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
*/
          /*else*/ {
            __Pyx_XDECREF(__pyx_r);
            __pyx_t_4 = ((PyObject *)__pyx_v_cls);
            __Pyx_INCREF(__pyx_t_4);
            __pyx_t_6 = 0;
            {
              PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_4, __pyx_v_arrays};
              __pyx_t_7 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 3460, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_7);
              if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_schema, ((PyObject *)__pyx_v_schema), __pyx_t_7, __pyx_callargs+2, 0) < (0)) __PYX_ERR(17, 3460, __pyx_L1_error)
              __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_from_arrays, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_7);
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
              __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
              if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 3460, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_1);
            }
            __pyx_r = __pyx_t_1;
            __pyx_t_1 = 0;
            goto __pyx_L0;
          }

          /* "pyarrow/table.pxi":3367
 *         return Table.from_batches([self])._to_pandas(options, **kwargs)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def from_pandas(cls, df, Schema schema=None, preserve_index=None,
 *                     nthreads=None, columns=None):
*/

          /* function exit code */
          __pyx_L1_error:;
          __Pyx_XDECREF(__pyx_t_1);
          __Pyx_XDECREF(__pyx_t_4);
          __Pyx_XDECREF(__pyx_t_5);
          __Pyx_XDECREF(__pyx_t_7);
          __Pyx_XDECREF(__pyx_t_8);
          __Pyx_AddTraceback("pyarrow.lib.RecordBatch.from_pandas", __pyx_clineno, __pyx_lineno, __pyx_filename);
          __pyx_r = NULL;
          __pyx_L0:;
          __Pyx_XDECREF(__pyx_v_dataframe_to_arrays);
          __Pyx_XDECREF(__pyx_v_arrays);
          __Pyx_XDECREF(__pyx_v_n_rows);
          __Pyx_XDECREF((PyObject *)__pyx_v_schema);
          __Pyx_XGIVEREF(__pyx_r);
          __Pyx_RefNannyFinishContext();
          return __pyx_r;
        }

        /* "pyarrow/table.pxi":3462
 *             return cls.from_arrays(arrays, schema=schema)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_arrays(list arrays, names=None, schema=None, metadata=None):
 *         """
*/

        /* Python wrapper */
        static PyObject *__pyx_pw_7pyarrow_3lib_11RecordBatch_39from_arrays(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
        PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_11RecordBatch_38from_arrays, "RecordBatch.from_arrays(list arrays, names=None, schema=None, metadata=None)\n\nConstruct a RecordBatch from multiple pyarrow.Arrays\n\nParameters\n----------\narrays : list of pyarrow.Array\n    One for each field in RecordBatch\nnames : list of str, optional\n    Names for the batch fields. If not passed, schema must be passed\nschema : Schema, default None\n    Schema for the created batch. If not passed, names must be passed\nmetadata : dict or Mapping, default None\n    Optional metadata for the schema (if inferred).\n\nReturns\n-------\npyarrow.RecordBatch\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> n_legs = pa.array([2, 2, 4, 4, 5, 100])\n>>> animals = pa.array([\"Flamingo\", \"Parrot\", \"Dog\", \"Horse\", \"Brittle stars\", \"Centipede\"])\n>>> names = [\"n_legs\", \"animals\"]\n\nConstruct a RecordBatch from pyarrow Arrays using names:\n\n>>> pa.RecordBatch.from_arrays([n_legs, animals], names=names)\npyarrow.RecordBatch\nn_legs: int64\nanimals: string\n----\nn_legs: [2,2,4,4,5,100]\nanimals: [\"Flamingo\",\"Parrot\",\"Dog\",\"Horse\",\"Brittle stars\",\"Centipede\"]\n>>> pa.RecordBatch.from_arrays([n_legs, animals], names=names).to_pandas()\n   n_legs        animals\n0       2       Flamingo\n1       2         Parrot\n2       4            Dog\n3       4          Horse\n4       5  Brittle stars\n5     100      Centipede\n\nConstruct a RecordBatch from pyarrow Arrays using schema:\n\n>>> my_schema = pa.schema([\n...     pa.field('n_legs', pa.int64()),\n...     pa.field('animals', pa.string())],\n...     metadata={\"n_legs\": \"Number of legs per animal\"})\n>>> pa.RecordBatch.from_arrays([n_legs, animals], schema=my_schema).to_pandas()\n   n_legs        animals\n0       2       Flamingo\n1       2         Parrot\n2       4            Dog\n3       4          Horse\n4       5  Brittle stars\n5     100      Centipede\n>>> pa.RecordBatch.from_arrays([n_legs, animals], schema=my_schema).schema\nn_legs: int64\nanimals: string\n-- schema metadata --\nn_le""gs: 'Number of legs per animal'");
        static PyMethodDef __pyx_mdef_7pyarrow_3lib_11RecordBatch_39from_arrays = {"from_arrays", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_11RecordBatch_39from_arrays, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_11RecordBatch_38from_arrays};
        static PyObject *__pyx_pw_7pyarrow_3lib_11RecordBatch_39from_arrays(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
          PyObject *__pyx_v_arrays = 0;
          PyObject *__pyx_v_names = 0;
          PyObject *__pyx_v_schema = 0;
          PyObject *__pyx_v_metadata = 0;
          #if !CYTHON_METH_FASTCALL
          CYTHON_UNUSED Py_ssize_t __pyx_nargs;
          #endif
          CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
          PyObject* values[4] = {0,0,0,0};
          int __pyx_lineno = 0;
          const char *__pyx_filename = NULL;
          int __pyx_clineno = 0;
          PyObject *__pyx_r = 0;
          __Pyx_RefNannyDeclarations
          __Pyx_RefNannySetupContext("from_arrays (wrapper)", 0);
          #if !CYTHON_METH_FASTCALL
          #if CYTHON_ASSUME_SAFE_SIZE
          __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
          #else
          __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
          #endif
          #endif
          __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
          {
            PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_arrays,&__pyx_mstate_global->__pyx_n_u_names,&__pyx_mstate_global->__pyx_n_u_schema,&__pyx_mstate_global->__pyx_n_u_metadata,0};
            const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
            if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(17, 3462, __pyx_L3_error)
            if (__pyx_kwds_len > 0) {
              switch (__pyx_nargs) {
                case  4:
                values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
                if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(17, 3462, __pyx_L3_error)
                CYTHON_FALLTHROUGH;
                case  3:
                values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
                if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(17, 3462, __pyx_L3_error)
                CYTHON_FALLTHROUGH;
                case  2:
                values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(17, 3462, __pyx_L3_error)
                CYTHON_FALLTHROUGH;
                case  1:
                values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 3462, __pyx_L3_error)
                CYTHON_FALLTHROUGH;
                case  0: break;
                default: goto __pyx_L5_argtuple_error;
              }
              const Py_ssize_t kwd_pos_args = __pyx_nargs;
              if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "from_arrays", 0) < (0)) __PYX_ERR(17, 3462, __pyx_L3_error)

              /* "pyarrow/table.pxi":3463
 * 
 *     @staticmethod
 *     def from_arrays(list arrays, names=None, schema=None, metadata=None):             # <<<<<<<<<<<<<<
 *         """
 *         Construct a RecordBatch from multiple pyarrow.Arrays
*/
              if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
              if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
              if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None));
              for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("from_arrays", 0, 1, 4, i); __PYX_ERR(17, 3462, __pyx_L3_error) }
              }
            } else {
              switch (__pyx_nargs) {
                case  4:
                values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
                if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(17, 3462, __pyx_L3_error)
                CYTHON_FALLTHROUGH;
                case  3:
                values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
                if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(17, 3462, __pyx_L3_error)
                CYTHON_FALLTHROUGH;
                case  2:
                values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(17, 3462, __pyx_L3_error)
                CYTHON_FALLTHROUGH;
                case  1:
                values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 3462, __pyx_L3_error)
                break;
                default: goto __pyx_L5_argtuple_error;
              }
              if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
              if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
              if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None));
            }
            __pyx_v_arrays = ((PyObject*)values[0]);
            __pyx_v_names = values[1];
            __pyx_v_schema = values[2];
            __pyx_v_metadata = values[3];
          }
          goto __pyx_L6_skip;
          __pyx_L5_argtuple_error:;
          __Pyx_RaiseArgtupleInvalid("from_arrays", 0, 1, 4, __pyx_nargs); __PYX_ERR(17, 3462, __pyx_L3_error)
          __pyx_L6_skip:;
          goto __pyx_L4_argument_unpacking_done;
          __pyx_L3_error:;
          for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
            Py_XDECREF(values[__pyx_temp]);
          }
          __Pyx_AddTraceback("pyarrow.lib.RecordBatch.from_arrays", __pyx_clineno, __pyx_lineno, __pyx_filename);
          __Pyx_RefNannyFinishContext();
          return NULL;
          __pyx_L4_argument_unpacking_done:;
          if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arrays), (&PyList_Type), 1, "arrays", 1))) __PYX_ERR(17, 3463, __pyx_L1_error)
          __pyx_r = __pyx_pf_7pyarrow_3lib_11RecordBatch_38from_arrays(__pyx_v_arrays, __pyx_v_names, __pyx_v_schema, __pyx_v_metadata);

          /* "pyarrow/table.pxi":3462
 *             return cls.from_arrays(arrays, schema=schema)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_arrays(list arrays, names=None, schema=None, metadata=None):
 *         """
*/

          /* function exit code */
          goto __pyx_L0;
          __pyx_L1_error:;
          __pyx_r = NULL;
          for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
            Py_XDECREF(values[__pyx_temp]);
          }
          goto __pyx_L7_cleaned_up;
          __pyx_L0:;
          for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
            Py_XDECREF(values[__pyx_temp]);
          }
          __pyx_L7_cleaned_up:;
          __Pyx_RefNannyFinishContext();
          return __pyx_r;
        }

        static PyObject *__pyx_pf_7pyarrow_3lib_11RecordBatch_38from_arrays(PyObject *__pyx_v_arrays, PyObject *__pyx_v_names, PyObject *__pyx_v_schema, PyObject *__pyx_v_metadata) {
          struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_arr = 0;
          std::shared_ptr< arrow::Schema>  __pyx_v_c_schema;
          std::vector<std::shared_ptr< arrow::Array> >  __pyx_v_c_arrays;
          int64_t __pyx_v_num_rows;
          PyObject *__pyx_v_warnings = NULL;
          PyObject *__pyx_v_converted_arrays = NULL;
          PyObject *__pyx_v_result = NULL;
          PyObject *__pyx_r = NULL;
          __Pyx_RefNannyDeclarations
          Py_ssize_t __pyx_t_1;
          int __pyx_t_2;
          PyObject *__pyx_t_3 = NULL;
          PyObject *__pyx_t_4 = NULL;
          PyObject *__pyx_t_5 = NULL;
          size_t __pyx_t_6;
          PyObject *(*__pyx_t_7)(PyObject *);
          Py_ssize_t __pyx_t_8;
          PyObject *__pyx_t_9 = NULL;
          PyObject *__pyx_t_10 = NULL;
          PyObject *__pyx_t_11 = NULL;
          PyObject *__pyx_t_12[4];
          PyObject *__pyx_t_13 = NULL;
          int __pyx_lineno = 0;
          const char *__pyx_filename = NULL;
          int __pyx_clineno = 0;
          __Pyx_RefNannySetupContext("from_arrays", 0);
          __Pyx_INCREF(__pyx_v_names);
          __Pyx_INCREF(__pyx_v_schema);

          /* "pyarrow/table.pxi":3533
 *             int64_t num_rows
 * 
 *         if len(arrays) > 0:             # <<<<<<<<<<<<<<
 *             num_rows = len(arrays[0])
 *         else:
*/
          if (unlikely(__pyx_v_arrays == Py_None)) {
            PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
            __PYX_ERR(17, 3533, __pyx_L1_error)
          }
          __pyx_t_1 = __Pyx_PyList_GET_SIZE(__pyx_v_arrays); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(17, 3533, __pyx_L1_error)
          __pyx_t_2 = (__pyx_t_1 > 0);
          if (__pyx_t_2) {

            /* "pyarrow/table.pxi":3534
 * 
 *         if len(arrays) > 0:
 *             num_rows = len(arrays[0])             # <<<<<<<<<<<<<<
 *         else:
 *             num_rows = 0
*/
            if (unlikely(__pyx_v_arrays == Py_None)) {
              PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
              __PYX_ERR(17, 3534, __pyx_L1_error)
            }
            __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_arrays, 0, long, 1, __Pyx_PyLong_From_long, 1, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 3534, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            __pyx_t_1 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(17, 3534, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __pyx_v_num_rows = __pyx_t_1;

            /* "pyarrow/table.pxi":3533
 *             int64_t num_rows
 * 
 *         if len(arrays) > 0:             # <<<<<<<<<<<<<<
 *             num_rows = len(arrays[0])
 *         else:
*/
            goto __pyx_L3;
          }

          /* "pyarrow/table.pxi":3536
 *             num_rows = len(arrays[0])
 *         else:
 *             num_rows = 0             # <<<<<<<<<<<<<<
 * 
 *         if isinstance(names, Schema):
*/
          /*else*/ {
            __pyx_v_num_rows = 0;
          }
          __pyx_L3:;

          /* "pyarrow/table.pxi":3538
 *             num_rows = 0
 * 
 *         if isinstance(names, Schema):             # <<<<<<<<<<<<<<
 *             import warnings
 *             warnings.warn("Schema passed to names= option, please "
*/
          __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_names, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Schema); 
          if (__pyx_t_2) {

            /* "pyarrow/table.pxi":3539
 * 
 *         if isinstance(names, Schema):
 *             import warnings             # <<<<<<<<<<<<<<
 *             warnings.warn("Schema passed to names= option, please "
 *                           "pass schema= explicitly. "
*/
            __pyx_t_4 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_warnings, 0, 0, NULL, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 3539, __pyx_L1_error)
            __pyx_t_3 = __pyx_t_4;
            __Pyx_GOTREF(__pyx_t_3);
            __pyx_v_warnings = __pyx_t_3;
            __pyx_t_3 = 0;

            /* "pyarrow/table.pxi":3540
 *         if isinstance(names, Schema):
 *             import warnings
 *             warnings.warn("Schema passed to names= option, please "             # <<<<<<<<<<<<<<
 *                           "pass schema= explicitly. "
 *                           "Will raise exception in future", FutureWarning)
*/
            __pyx_t_5 = __pyx_v_warnings;
            __Pyx_INCREF(__pyx_t_5);

            /* "pyarrow/table.pxi":3542
 *             warnings.warn("Schema passed to names= option, please "
 *                           "pass schema= explicitly. "
 *                           "Will raise exception in future", FutureWarning)             # <<<<<<<<<<<<<<
 *             schema = names
 *             names = None
*/
            __pyx_t_6 = 0;
            {
              PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_Schema_passed_to_names_option_pl, ((PyObject *)(((PyTypeObject*)PyExc_FutureWarning)))};
              __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_warn, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
              __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
              if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 3540, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_3);
            }
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

            /* "pyarrow/table.pxi":3543
 *                           "pass schema= explicitly. "
 *                           "Will raise exception in future", FutureWarning)
 *             schema = names             # <<<<<<<<<<<<<<
 *             names = None
 * 
*/
            __Pyx_INCREF(__pyx_v_names);
            __Pyx_DECREF_SET(__pyx_v_schema, __pyx_v_names);

            /* "pyarrow/table.pxi":3544
 *                           "Will raise exception in future", FutureWarning)
 *             schema = names
 *             names = None             # <<<<<<<<<<<<<<
 * 
 *         converted_arrays = _sanitize_arrays(arrays, names, schema, metadata,
*/
            __Pyx_INCREF(Py_None);
            __Pyx_DECREF_SET(__pyx_v_names, Py_None);

            /* "pyarrow/table.pxi":3538
 *             num_rows = 0
 * 
 *         if isinstance(names, Schema):             # <<<<<<<<<<<<<<
 *             import warnings
 *             warnings.warn("Schema passed to names= option, please "
*/
          }

          /* "pyarrow/table.pxi":3546
 *             names = None
 * 
 *         converted_arrays = _sanitize_arrays(arrays, names, schema, metadata,             # <<<<<<<<<<<<<<
 *                                             &c_schema)
 * 
*/
          __pyx_t_3 = __pyx_f_7pyarrow_3lib__sanitize_arrays(__pyx_v_arrays, __pyx_v_names, __pyx_v_schema, __pyx_v_metadata, (&__pyx_v_c_schema)); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 3546, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_v_converted_arrays = __pyx_t_3;
          __pyx_t_3 = 0;

          /* "pyarrow/table.pxi":3549
 *                                             &c_schema)
 * 
 *         c_arrays.reserve(len(arrays))             # <<<<<<<<<<<<<<
 *         for arr in converted_arrays:
 *             if len(arr) != num_rows:
*/
          if (unlikely(__pyx_v_arrays == Py_None)) {
            PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
            __PYX_ERR(17, 3549, __pyx_L1_error)
          }
          __pyx_t_1 = __Pyx_PyList_GET_SIZE(__pyx_v_arrays); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(17, 3549, __pyx_L1_error)
          try {
            __pyx_v_c_arrays.reserve(__pyx_t_1);
          } catch(...) {
            __Pyx_CppExn2PyErr();
            __PYX_ERR(17, 3549, __pyx_L1_error)
          }

          /* "pyarrow/table.pxi":3550
 * 
 *         c_arrays.reserve(len(arrays))
 *         for arr in converted_arrays:             # <<<<<<<<<<<<<<
 *             if len(arr) != num_rows:
 *                 raise ValueError('Arrays were not all the same length: '
*/
          if (likely(PyList_CheckExact(__pyx_v_converted_arrays)) || PyTuple_CheckExact(__pyx_v_converted_arrays)) {
            __pyx_t_3 = __pyx_v_converted_arrays; __Pyx_INCREF(__pyx_t_3);
            __pyx_t_1 = 0;
            __pyx_t_7 = NULL;
          } else {
            __pyx_t_1 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_converted_arrays); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 3550, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 3550, __pyx_L1_error)
          }
          for (;;) {
            if (likely(!__pyx_t_7)) {
              if (likely(PyList_CheckExact(__pyx_t_3))) {
                {
                  Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3);
                  #if !CYTHON_ASSUME_SAFE_SIZE
                  if (unlikely((__pyx_temp < 0))) __PYX_ERR(17, 3550, __pyx_L1_error)
                  #endif
                  if (__pyx_t_1 >= __pyx_temp) break;
                }
                __pyx_t_5 = __Pyx_PyList_GetItemRefFast(__pyx_t_3, __pyx_t_1, __Pyx_ReferenceSharing_OwnStrongReference);
                ++__pyx_t_1;
              } else {
                {
                  Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3);
                  #if !CYTHON_ASSUME_SAFE_SIZE
                  if (unlikely((__pyx_temp < 0))) __PYX_ERR(17, 3550, __pyx_L1_error)
                  #endif
                  if (__pyx_t_1 >= __pyx_temp) break;
                }
                #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                __pyx_t_5 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_1));
                #else
                __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_1);
                #endif
                ++__pyx_t_1;
              }
              if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 3550, __pyx_L1_error)
            } else {
              __pyx_t_5 = __pyx_t_7(__pyx_t_3);
              if (unlikely(!__pyx_t_5)) {
                PyObject* exc_type = PyErr_Occurred();
                if (exc_type) {
                  if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(17, 3550, __pyx_L1_error)
                  PyErr_Clear();
                }
                break;
              }
            }
            __Pyx_GOTREF(__pyx_t_5);
            if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array))))) __PYX_ERR(17, 3550, __pyx_L1_error)
            __Pyx_XDECREF_SET(__pyx_v_arr, ((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_t_5));
            __pyx_t_5 = 0;

            /* "pyarrow/table.pxi":3551
 *         c_arrays.reserve(len(arrays))
 *         for arr in converted_arrays:
 *             if len(arr) != num_rows:             # <<<<<<<<<<<<<<
 *                 raise ValueError('Arrays were not all the same length: '
 *                                  f'{len(arr)} vs {num_rows}')
*/
            __pyx_t_8 = PyObject_Length(((PyObject *)__pyx_v_arr)); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(17, 3551, __pyx_L1_error)
            __pyx_t_2 = (__pyx_t_8 != __pyx_v_num_rows);
            if (unlikely(__pyx_t_2)) {

              /* "pyarrow/table.pxi":3552
 *         for arr in converted_arrays:
 *             if len(arr) != num_rows:
 *                 raise ValueError('Arrays were not all the same length: '             # <<<<<<<<<<<<<<
 *                                  f'{len(arr)} vs {num_rows}')
 *             c_arrays.push_back(arr.sp_array)
*/
              __pyx_t_9 = NULL;

              /* "pyarrow/table.pxi":3553
 *             if len(arr) != num_rows:
 *                 raise ValueError('Arrays were not all the same length: '
 *                                  f'{len(arr)} vs {num_rows}')             # <<<<<<<<<<<<<<
 *             c_arrays.push_back(arr.sp_array)
 * 
*/
              __pyx_t_8 = PyObject_Length(((PyObject *)__pyx_v_arr)); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(17, 3553, __pyx_L1_error)
              __pyx_t_10 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_t_8, 0, ' ', 'd'); if (unlikely(!__pyx_t_10)) __PYX_ERR(17, 3553, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_11 = __Pyx_PyUnicode_From_int64_t(__pyx_v_num_rows, 0, ' ', 'd'); if (unlikely(!__pyx_t_11)) __PYX_ERR(17, 3553, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_11);
              __pyx_t_12[0] = __pyx_mstate_global->__pyx_kp_u_Arrays_were_not_all_the_same_len;
              __pyx_t_12[1] = __pyx_t_10;
              __pyx_t_12[2] = __pyx_mstate_global->__pyx_kp_u_vs;
              __pyx_t_12[3] = __pyx_t_11;

              /* "pyarrow/table.pxi":3552
 *         for arr in converted_arrays:
 *             if len(arr) != num_rows:
 *                 raise ValueError('Arrays were not all the same length: '             # <<<<<<<<<<<<<<
 *                                  f'{len(arr)} vs {num_rows}')
 *             c_arrays.push_back(arr.sp_array)
*/
              __pyx_t_13 = __Pyx_PyUnicode_Join(__pyx_t_12, 4, 37 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_10) + 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_11), 127);
              if (unlikely(!__pyx_t_13)) __PYX_ERR(17, 3552, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_13);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
              __pyx_t_6 = 1;
              {
                PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_13};
                __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
                __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
                if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 3552, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_5);
              }
              __Pyx_Raise(__pyx_t_5, 0, 0, 0);
              __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
              __PYX_ERR(17, 3552, __pyx_L1_error)

              /* "pyarrow/table.pxi":3551
 *         c_arrays.reserve(len(arrays))
 *         for arr in converted_arrays:
 *             if len(arr) != num_rows:             # <<<<<<<<<<<<<<
 *                 raise ValueError('Arrays were not all the same length: '
 *                                  f'{len(arr)} vs {num_rows}')
*/
            }

            /* "pyarrow/table.pxi":3554
 *                 raise ValueError('Arrays were not all the same length: '
 *                                  f'{len(arr)} vs {num_rows}')
 *             c_arrays.push_back(arr.sp_array)             # <<<<<<<<<<<<<<
 * 
 *         result = pyarrow_wrap_batch(CRecordBatch.Make(c_schema, num_rows,
*/
            if (unlikely(((PyObject *)__pyx_v_arr) == Py_None)) {
              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_array");
              __PYX_ERR(17, 3554, __pyx_L1_error)
            }
            try {
              __pyx_v_c_arrays.push_back(__pyx_v_arr->sp_array);
            } catch(...) {
              __Pyx_CppExn2PyErr();
              __PYX_ERR(17, 3554, __pyx_L1_error)
            }

            /* "pyarrow/table.pxi":3550
 * 
 *         c_arrays.reserve(len(arrays))
 *         for arr in converted_arrays:             # <<<<<<<<<<<<<<
 *             if len(arr) != num_rows:
 *                 raise ValueError('Arrays were not all the same length: '
*/
          }
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

          /* "pyarrow/table.pxi":3556
 *             c_arrays.push_back(arr.sp_array)
 * 
 *         result = pyarrow_wrap_batch(CRecordBatch.Make(c_schema, num_rows,             # <<<<<<<<<<<<<<
 *                                                       c_arrays))
 *         result.validate()
*/
          __pyx_t_3 = pyarrow_wrap_batch( arrow::RecordBatch::Make(__pyx_v_c_schema, __pyx_v_num_rows, __pyx_v_c_arrays)); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 3556, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_v_result = __pyx_t_3;
          __pyx_t_3 = 0;

          /* "pyarrow/table.pxi":3558
 *         result = pyarrow_wrap_batch(CRecordBatch.Make(c_schema, num_rows,
 *                                                       c_arrays))
 *         result.validate()             # <<<<<<<<<<<<<<
 *         return result
 * 
*/
          __pyx_t_5 = __pyx_v_result;
          __Pyx_INCREF(__pyx_t_5);
          __pyx_t_6 = 0;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
            __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_validate, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
            if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 3558, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
          }
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

          /* "pyarrow/table.pxi":3559
 *                                                       c_arrays))
 *         result.validate()
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
*/
          __Pyx_XDECREF(__pyx_r);
          __Pyx_INCREF(__pyx_v_result);
          __pyx_r = __pyx_v_result;
          goto __pyx_L0;

          /* "pyarrow/table.pxi":3462
 *             return cls.from_arrays(arrays, schema=schema)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_arrays(list arrays, names=None, schema=None, metadata=None):
 *         """
*/

          /* function exit code */
          __pyx_L1_error:;
          __Pyx_XDECREF(__pyx_t_3);
          __Pyx_XDECREF(__pyx_t_5);
          __Pyx_XDECREF(__pyx_t_9);
          __Pyx_XDECREF(__pyx_t_10);
          __Pyx_XDECREF(__pyx_t_11);
          __Pyx_XDECREF(__pyx_t_13);
          __Pyx_AddTraceback("pyarrow.lib.RecordBatch.from_arrays", __pyx_clineno, __pyx_lineno, __pyx_filename);
          __pyx_r = NULL;
          __pyx_L0:;
          __Pyx_XDECREF((PyObject *)__pyx_v_arr);
          __Pyx_XDECREF(__pyx_v_warnings);
          __Pyx_XDECREF(__pyx_v_converted_arrays);
          __Pyx_XDECREF(__pyx_v_result);
          __Pyx_XDECREF(__pyx_v_names);
          __Pyx_XDECREF(__pyx_v_schema);
          __Pyx_XGIVEREF(__pyx_r);
          __Pyx_RefNannyFinishContext();
          return __pyx_r;
        }

        /* "pyarrow/table.pxi":3561
 *         return result
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_struct_array(StructArray struct_array):
 *         """
*/

        /* Python wrapper */
        static PyObject *__pyx_pw_7pyarrow_3lib_11RecordBatch_41from_struct_array(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
        PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_11RecordBatch_40from_struct_array, "RecordBatch.from_struct_array(StructArray struct_array)\n\nConstruct a RecordBatch from a StructArray.\n\nEach field in the StructArray will become a column in the resulting\n``RecordBatch``.\n\nParameters\n----------\nstruct_array : StructArray\n    Array to construct the record batch from.\n\nReturns\n-------\npyarrow.RecordBatch\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> struct = pa.array([{'n_legs': 2, 'animals': 'Parrot'},\n...                    {'year': 2022, 'n_legs': 4}])\n>>> pa.RecordBatch.from_struct_array(struct).to_pandas()\n  animals  n_legs    year\n0  Parrot       2     NaN\n1    None       4  2022.0");
        static PyMethodDef __pyx_mdef_7pyarrow_3lib_11RecordBatch_41from_struct_array = {"from_struct_array", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_11RecordBatch_41from_struct_array, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_11RecordBatch_40from_struct_array};
        static PyObject *__pyx_pw_7pyarrow_3lib_11RecordBatch_41from_struct_array(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
          struct __pyx_obj_7pyarrow_3lib_StructArray *__pyx_v_struct_array = 0;
          #if !CYTHON_METH_FASTCALL
          CYTHON_UNUSED Py_ssize_t __pyx_nargs;
          #endif
          CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
          PyObject* values[1] = {0};
          int __pyx_lineno = 0;
          const char *__pyx_filename = NULL;
          int __pyx_clineno = 0;
          PyObject *__pyx_r = 0;
          __Pyx_RefNannyDeclarations
          __Pyx_RefNannySetupContext("from_struct_array (wrapper)", 0);
          #if !CYTHON_METH_FASTCALL
          #if CYTHON_ASSUME_SAFE_SIZE
          __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
          #else
          __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
          #endif
          #endif
          __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
          {
            PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_struct_array,0};
            const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
            if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(17, 3561, __pyx_L3_error)
            if (__pyx_kwds_len > 0) {
              switch (__pyx_nargs) {
                case  1:
                values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 3561, __pyx_L3_error)
                CYTHON_FALLTHROUGH;
                case  0: break;
                default: goto __pyx_L5_argtuple_error;
              }
              const Py_ssize_t kwd_pos_args = __pyx_nargs;
              if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "from_struct_array", 0) < (0)) __PYX_ERR(17, 3561, __pyx_L3_error)
              for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("from_struct_array", 1, 1, 1, i); __PYX_ERR(17, 3561, __pyx_L3_error) }
              }
            } else if (unlikely(__pyx_nargs != 1)) {
              goto __pyx_L5_argtuple_error;
            } else {
              values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
              if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 3561, __pyx_L3_error)
            }
            __pyx_v_struct_array = ((struct __pyx_obj_7pyarrow_3lib_StructArray *)values[0]);
          }
          goto __pyx_L6_skip;
          __pyx_L5_argtuple_error:;
          __Pyx_RaiseArgtupleInvalid("from_struct_array", 1, 1, 1, __pyx_nargs); __PYX_ERR(17, 3561, __pyx_L3_error)
          __pyx_L6_skip:;
          goto __pyx_L4_argument_unpacking_done;
          __pyx_L3_error:;
          for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
            Py_XDECREF(values[__pyx_temp]);
          }
          __Pyx_AddTraceback("pyarrow.lib.RecordBatch.from_struct_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
          __Pyx_RefNannyFinishContext();
          return NULL;
          __pyx_L4_argument_unpacking_done:;
          if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_struct_array), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_StructArray, 1, "struct_array", 0))) __PYX_ERR(17, 3562, __pyx_L1_error)
          __pyx_r = __pyx_pf_7pyarrow_3lib_11RecordBatch_40from_struct_array(__pyx_v_struct_array);

          /* function exit code */
          goto __pyx_L0;
          __pyx_L1_error:;
          __pyx_r = NULL;
          for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
            Py_XDECREF(values[__pyx_temp]);
          }
          goto __pyx_L7_cleaned_up;
          __pyx_L0:;
          for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
            Py_XDECREF(values[__pyx_temp]);
          }
          __pyx_L7_cleaned_up:;
          __Pyx_RefNannyFinishContext();
          return __pyx_r;
        }

        static PyObject *__pyx_pf_7pyarrow_3lib_11RecordBatch_40from_struct_array(struct __pyx_obj_7pyarrow_3lib_StructArray *__pyx_v_struct_array) {
          std::shared_ptr< arrow::RecordBatch>  __pyx_v_c_record_batch;
          PyObject *__pyx_r = NULL;
          __Pyx_RefNannyDeclarations
          int __pyx_t_1;
          PyObject *__pyx_t_2 = NULL;
          PyObject *__pyx_t_3 = NULL;
          size_t __pyx_t_4;
          std::shared_ptr< arrow::RecordBatch>  __pyx_t_5;
          int __pyx_lineno = 0;
          const char *__pyx_filename = NULL;
          int __pyx_clineno = 0;
          __Pyx_RefNannySetupContext("from_struct_array", 0);

          /* "pyarrow/table.pxi":3590
 *         cdef:
 *             shared_ptr[CRecordBatch] c_record_batch
 *         if struct_array.sp_array.get().device_type() != CDeviceAllocationType_kCPU:             # <<<<<<<<<<<<<<
 *             raise NotImplementedError("Implemented only for data on CPU device")
 *         with nogil:
*/
          if (unlikely(((PyObject *)__pyx_v_struct_array) == Py_None)) {
            PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_array");
            __PYX_ERR(17, 3590, __pyx_L1_error)
          }
          __pyx_t_1 = (__pyx_v_struct_array->__pyx_base.sp_array.get()->device_type() != arrow::DeviceAllocationType::kCPU);
          if (unlikely(__pyx_t_1)) {

            /* "pyarrow/table.pxi":3591
 *             shared_ptr[CRecordBatch] c_record_batch
 *         if struct_array.sp_array.get().device_type() != CDeviceAllocationType_kCPU:
 *             raise NotImplementedError("Implemented only for data on CPU device")             # <<<<<<<<<<<<<<
 *         with nogil:
 *             c_record_batch = GetResultValue(
*/
            __pyx_t_3 = NULL;
            __pyx_t_4 = 1;
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Implemented_only_for_data_on_CPU};
              __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_NotImplementedError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 3591, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_2);
            }
            __Pyx_Raise(__pyx_t_2, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __PYX_ERR(17, 3591, __pyx_L1_error)

            /* "pyarrow/table.pxi":3590
 *         cdef:
 *             shared_ptr[CRecordBatch] c_record_batch
 *         if struct_array.sp_array.get().device_type() != CDeviceAllocationType_kCPU:             # <<<<<<<<<<<<<<
 *             raise NotImplementedError("Implemented only for data on CPU device")
 *         with nogil:
*/
          }

          /* "pyarrow/table.pxi":3592
 *         if struct_array.sp_array.get().device_type() != CDeviceAllocationType_kCPU:
 *             raise NotImplementedError("Implemented only for data on CPU device")
 *         with nogil:             # <<<<<<<<<<<<<<
 *             c_record_batch = GetResultValue(
 *                 CRecordBatch.FromStructArray(struct_array.sp_array))
*/
          {
              PyThreadState * _save;
              _save = PyEval_SaveThread();
              __Pyx_FastGIL_Remember();
              /*try:*/ {

                /* "pyarrow/table.pxi":3594
 *         with nogil:
 *             c_record_batch = GetResultValue(
 *                 CRecordBatch.FromStructArray(struct_array.sp_array))             # <<<<<<<<<<<<<<
 *         return pyarrow_wrap_batch(c_record_batch)
 * 
*/
                if (unlikely(((PyObject *)__pyx_v_struct_array) == Py_None)) {
                  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                  PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_array");
                  __Pyx_PyGILState_Release(__pyx_gilstate_save);
                  __PYX_ERR(17, 3594, __pyx_L5_error)
                }

                /* "pyarrow/table.pxi":3593
 *             raise NotImplementedError("Implemented only for data on CPU device")
 *         with nogil:
 *             c_record_batch = GetResultValue(             # <<<<<<<<<<<<<<
 *                 CRecordBatch.FromStructArray(struct_array.sp_array))
 *         return pyarrow_wrap_batch(c_record_batch)
*/
                __pyx_t_5 = arrow::py::GetResultValue<std::shared_ptr< arrow::RecordBatch> >( arrow::RecordBatch::FromStructArray(__pyx_v_struct_array->__pyx_base.sp_array)); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(17, 3593, __pyx_L5_error)
                __pyx_v_c_record_batch = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_5);
              }

              /* "pyarrow/table.pxi":3592
 *         if struct_array.sp_array.get().device_type() != CDeviceAllocationType_kCPU:
 *             raise NotImplementedError("Implemented only for data on CPU device")
 *         with nogil:             # <<<<<<<<<<<<<<
 *             c_record_batch = GetResultValue(
 *                 CRecordBatch.FromStructArray(struct_array.sp_array))
*/
              /*finally:*/ {
                /*normal exit:*/{
                  __Pyx_FastGIL_Forget();
                  PyEval_RestoreThread(_save);
                  goto __pyx_L6;
                }
                __pyx_L5_error: {
                  __Pyx_FastGIL_Forget();
                  PyEval_RestoreThread(_save);
                  goto __pyx_L1_error;
                }
                __pyx_L6:;
              }
          }

          /* "pyarrow/table.pxi":3595
 *             c_record_batch = GetResultValue(
 *                 CRecordBatch.FromStructArray(struct_array.sp_array))
 *         return pyarrow_wrap_batch(c_record_batch)             # <<<<<<<<<<<<<<
 * 
 *     def to_struct_array(self):
*/
          __Pyx_XDECREF(__pyx_r);
          __pyx_t_2 = pyarrow_wrap_batch(__pyx_v_c_record_batch); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 3595, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_r = __pyx_t_2;
          __pyx_t_2 = 0;
          goto __pyx_L0;

          /* "pyarrow/table.pxi":3561
 *         return result
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_struct_array(StructArray struct_array):
 *         """
*/

          /* function exit code */
          __pyx_L1_error:;
          __Pyx_XDECREF(__pyx_t_2);
          __Pyx_XDECREF(__pyx_t_3);
          __Pyx_AddTraceback("pyarrow.lib.RecordBatch.from_struct_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
          __pyx_r = NULL;
          __pyx_L0:;
          __Pyx_XGIVEREF(__pyx_r);
          __Pyx_RefNannyFinishContext();
          return __pyx_r;
        }

        /* "pyarrow/table.pxi":3597
 *         return pyarrow_wrap_batch(c_record_batch)
 * 
 *     def to_struct_array(self):             # <<<<<<<<<<<<<<
 *         """
 *         Convert to a struct array.
*/

        /* Python wrapper */
        static PyObject *__pyx_pw_7pyarrow_3lib_11RecordBatch_43to_struct_array(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
        PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_11RecordBatch_42to_struct_array, "RecordBatch.to_struct_array(self)\n\nConvert to a struct array.");
        static PyMethodDef __pyx_mdef_7pyarrow_3lib_11RecordBatch_43to_struct_array = {"to_struct_array", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_11RecordBatch_43to_struct_array, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_11RecordBatch_42to_struct_array};
        static PyObject *__pyx_pw_7pyarrow_3lib_11RecordBatch_43to_struct_array(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
          #if !CYTHON_METH_FASTCALL
          CYTHON_UNUSED Py_ssize_t __pyx_nargs;
          #endif
          CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
          PyObject *__pyx_r = 0;
          __Pyx_RefNannyDeclarations
          __Pyx_RefNannySetupContext("to_struct_array (wrapper)", 0);
          #if !CYTHON_METH_FASTCALL
          #if CYTHON_ASSUME_SAFE_SIZE
          __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
          #else
          __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
          #endif
          #endif
          __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
          if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("to_struct_array", 1, 0, 0, __pyx_nargs); return NULL; }
          const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
          if (unlikely(__pyx_kwds_len < 0)) return NULL;
          if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("to_struct_array", __pyx_kwds); return NULL;}
          __pyx_r = __pyx_pf_7pyarrow_3lib_11RecordBatch_42to_struct_array(((struct __pyx_obj_7pyarrow_3lib_RecordBatch *)__pyx_v_self));

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

        static PyObject *__pyx_pf_7pyarrow_3lib_11RecordBatch_42to_struct_array(struct __pyx_obj_7pyarrow_3lib_RecordBatch *__pyx_v_self) {
          std::shared_ptr< arrow::RecordBatch>  __pyx_v_c_record_batch;
          std::shared_ptr< arrow::Array>  __pyx_v_c_array;
          PyObject *__pyx_r = NULL;
          __Pyx_RefNannyDeclarations
          std::shared_ptr< arrow::RecordBatch>  __pyx_t_1;
          std::shared_ptr< arrow::Array>  __pyx_t_2;
          PyObject *__pyx_t_3 = NULL;
          int __pyx_lineno = 0;
          const char *__pyx_filename = NULL;
          int __pyx_clineno = 0;
          __Pyx_RefNannySetupContext("to_struct_array", 0);

          /* "pyarrow/table.pxi":3601
 *         Convert to a struct array.
 *         """
 *         self._assert_cpu()             # <<<<<<<<<<<<<<
 *         cdef:
 *             shared_ptr[CRecordBatch] c_record_batch
*/
          if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
            PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_assert_cpu");
            __PYX_ERR(17, 3601, __pyx_L1_error)
          }
          ((struct __pyx_vtabstruct_7pyarrow_3lib_RecordBatch *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._assert_cpu(((struct __pyx_obj_7pyarrow_3lib__Tabular *)__pyx_v_self)); if (unlikely(PyErr_Occurred())) __PYX_ERR(17, 3601, __pyx_L1_error)

          /* "pyarrow/table.pxi":3606
 *             shared_ptr[CArray] c_array
 * 
 *         c_record_batch = pyarrow_unwrap_batch(self)             # <<<<<<<<<<<<<<
 *         with nogil:
 *             c_array = GetResultValue(
*/
          __pyx_t_1 = pyarrow_unwrap_batch(((PyObject *)__pyx_v_self)); if (unlikely(PyErr_Occurred())) __PYX_ERR(17, 3606, __pyx_L1_error)
          __pyx_v_c_record_batch = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_1);

          /* "pyarrow/table.pxi":3607
 * 
 *         c_record_batch = pyarrow_unwrap_batch(self)
 *         with nogil:             # <<<<<<<<<<<<<<
 *             c_array = GetResultValue(
 *                 <CResult[shared_ptr[CArray]]>deref(c_record_batch).ToStructArray())
*/
          {
              PyThreadState * _save;
              _save = PyEval_SaveThread();
              __Pyx_FastGIL_Remember();
              /*try:*/ {

                /* "pyarrow/table.pxi":3608
 *         c_record_batch = pyarrow_unwrap_batch(self)
 *         with nogil:
 *             c_array = GetResultValue(             # <<<<<<<<<<<<<<
 *                 <CResult[shared_ptr[CArray]]>deref(c_record_batch).ToStructArray())
 *         return pyarrow_wrap_array(c_array)
*/
                __pyx_t_2 = arrow::py::GetResultValue<std::shared_ptr< arrow::Array> >(((arrow::Result<std::shared_ptr< arrow::Array> > )(*__pyx_v_c_record_batch).ToStructArray())); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(17, 3608, __pyx_L4_error)
                __pyx_v_c_array = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_2);
              }

              /* "pyarrow/table.pxi":3607
 * 
 *         c_record_batch = pyarrow_unwrap_batch(self)
 *         with nogil:             # <<<<<<<<<<<<<<
 *             c_array = GetResultValue(
 *                 <CResult[shared_ptr[CArray]]>deref(c_record_batch).ToStructArray())
*/
              /*finally:*/ {
                /*normal exit:*/{
                  __Pyx_FastGIL_Forget();
                  PyEval_RestoreThread(_save);
                  goto __pyx_L5;
                }
                __pyx_L4_error: {
                  __Pyx_FastGIL_Forget();
                  PyEval_RestoreThread(_save);
                  goto __pyx_L1_error;
                }
                __pyx_L5:;
              }
          }

          /* "pyarrow/table.pxi":3610
 *             c_array = GetResultValue(
 *                 <CResult[shared_ptr[CArray]]>deref(c_record_batch).ToStructArray())
 *         return pyarrow_wrap_array(c_array)             # <<<<<<<<<<<<<<
 * 
 *     def to_tensor(self, c_bool null_to_nan=False, c_bool row_major=True, MemoryPool memory_pool=None):
*/
          __Pyx_XDECREF(__pyx_r);
          __pyx_t_3 = pyarrow_wrap_array(__pyx_v_c_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 3610, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_r = __pyx_t_3;
          __pyx_t_3 = 0;
          goto __pyx_L0;

          /* "pyarrow/table.pxi":3597
 *         return pyarrow_wrap_batch(c_record_batch)
 * 
 *     def to_struct_array(self):             # <<<<<<<<<<<<<<
 *         """
 *         Convert to a struct array.
*/

          /* function exit code */
          __pyx_L1_error:;
          __Pyx_XDECREF(__pyx_t_3);
          __Pyx_AddTraceback("pyarrow.lib.RecordBatch.to_struct_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
          __pyx_r = NULL;
          __pyx_L0:;
          __Pyx_XGIVEREF(__pyx_r);
          __Pyx_RefNannyFinishContext();
          return __pyx_r;
        }

        /* "pyarrow/table.pxi":3612
 *         return pyarrow_wrap_array(c_array)
 * 
 *     def to_tensor(self, c_bool null_to_nan=False, c_bool row_major=True, MemoryPool memory_pool=None):             # <<<<<<<<<<<<<<
 *         """
 *         Convert to a :class:`~pyarrow.Tensor`.
*/

        /* Python wrapper */
        static PyObject *__pyx_pw_7pyarrow_3lib_11RecordBatch_45to_tensor(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
        PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_11RecordBatch_44to_tensor, "RecordBatch.to_tensor(self, bool null_to_nan=False, bool row_major=True, MemoryPool memory_pool=None)\n\nConvert to a :class:`~pyarrow.Tensor`.\n\nRecordBatches that can be converted have fields of type signed or unsigned\ninteger or float, including all bit-widths.\n\n``null_to_nan`` is ``False`` by default and this method will raise an error in case\nany nulls are present. RecordBatches with nulls can be converted with ``null_to_nan``\nset to ``True``. In this case null values are converted to ``NaN`` and integer type\narrays are promoted to the appropriate float type.\n\nParameters\n----------\nnull_to_nan : bool, default False\n    Whether to write null values in the result as ``NaN``.\nrow_major : bool, default True\n    Whether resulting Tensor is row-major or column-major\nmemory_pool : MemoryPool, default None\n    For memory allocations, if required, otherwise use default pool\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> batch = pa.record_batch(\n...    [\n...         pa.array([1, 2, 3, 4, None], type=pa.int32()),\n...         pa.array([10, 20, 30, 40, None], type=pa.float32()),\n...     ], names = [\"a\", \"b\"]\n... )\n\n>>> batch\npyarrow.RecordBatch\na: int32\nb: float\n----\na: [1,2,3,4,null]\nb: [10,20,30,40,null]\n\nConvert a RecordBatch to row-major Tensor with null values\nwritten as ``NaN``s\n\n>>> batch.to_tensor(null_to_nan=True)\n<pyarrow.Tensor>\ntype: double\nshape: (5, 2)\nstrides: (16, 8)\n>>> batch.to_tensor(null_to_nan=True).to_numpy()\narray([[ 1., 10.],\n       [ 2., 20.],\n       [ 3., 30.],\n       [ 4., 40.],\n       [nan, nan]])\n\nConvert a RecordBatch to column-major Tensor\n\n>>> batch.to_tensor(null_to_nan=True, row_major=False)\n<pyarrow.Tensor>\ntype: double\nshape: (5, 2)\nstrides: (8, 40)\n>>> batch.to_tensor(null_to_nan=True, row_major=False).to_numpy()\narray([[ 1., 10.],\n       [ 2., 20.],\n       [ 3., 30.],\n       [ 4., 40.],\n       [nan, nan]])");
        static PyMethodDef __pyx_mdef_7pyarrow_3lib_11RecordBatch_45to_tensor = {"to_tensor", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_11RecordBatch_45to_tensor, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_11RecordBatch_44to_tensor};
        static PyObject *__pyx_pw_7pyarrow_3lib_11RecordBatch_45to_tensor(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
          bool __pyx_v_null_to_nan;
          bool __pyx_v_row_major;
          struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_memory_pool = 0;
          #if !CYTHON_METH_FASTCALL
          CYTHON_UNUSED Py_ssize_t __pyx_nargs;
          #endif
          CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
          PyObject* values[3] = {0,0,0};
          int __pyx_lineno = 0;
          const char *__pyx_filename = NULL;
          int __pyx_clineno = 0;
          PyObject *__pyx_r = 0;
          __Pyx_RefNannyDeclarations
          __Pyx_RefNannySetupContext("to_tensor (wrapper)", 0);
          #if !CYTHON_METH_FASTCALL
          #if CYTHON_ASSUME_SAFE_SIZE
          __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
          #else
          __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
          #endif
          #endif
          __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
          {
            PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_null_to_nan,&__pyx_mstate_global->__pyx_n_u_row_major,&__pyx_mstate_global->__pyx_n_u_memory_pool,0};
            const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
            if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(17, 3612, __pyx_L3_error)
            if (__pyx_kwds_len > 0) {
              switch (__pyx_nargs) {
                case  3:
                values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
                if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(17, 3612, __pyx_L3_error)
                CYTHON_FALLTHROUGH;
                case  2:
                values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(17, 3612, __pyx_L3_error)
                CYTHON_FALLTHROUGH;
                case  1:
                values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 3612, __pyx_L3_error)
                CYTHON_FALLTHROUGH;
                case  0: break;
                default: goto __pyx_L5_argtuple_error;
              }
              const Py_ssize_t kwd_pos_args = __pyx_nargs;
              if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "to_tensor", 0) < (0)) __PYX_ERR(17, 3612, __pyx_L3_error)
              if (!values[2]) values[2] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)Py_None));
            } else {
              switch (__pyx_nargs) {
                case  3:
                values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
                if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(17, 3612, __pyx_L3_error)
                CYTHON_FALLTHROUGH;
                case  2:
                values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(17, 3612, __pyx_L3_error)
                CYTHON_FALLTHROUGH;
                case  1:
                values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 3612, __pyx_L3_error)
                CYTHON_FALLTHROUGH;
                case  0: break;
                default: goto __pyx_L5_argtuple_error;
              }
              if (!values[2]) values[2] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)Py_None));
            }
            if (values[0]) {
              __pyx_v_null_to_nan = __Pyx_PyObject_IsTrue(values[0]); if (unlikely((__pyx_v_null_to_nan == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(17, 3612, __pyx_L3_error)
            } else {
              __pyx_v_null_to_nan = ((bool)0);
            }
            if (values[1]) {
              __pyx_v_row_major = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_row_major == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(17, 3612, __pyx_L3_error)
            } else {
              __pyx_v_row_major = ((bool)1);
            }
            __pyx_v_memory_pool = ((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)values[2]);
          }
          goto __pyx_L6_skip;
          __pyx_L5_argtuple_error:;
          __Pyx_RaiseArgtupleInvalid("to_tensor", 0, 0, 3, __pyx_nargs); __PYX_ERR(17, 3612, __pyx_L3_error)
          __pyx_L6_skip:;
          goto __pyx_L4_argument_unpacking_done;
          __pyx_L3_error:;
          for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
            Py_XDECREF(values[__pyx_temp]);
          }
          __Pyx_AddTraceback("pyarrow.lib.RecordBatch.to_tensor", __pyx_clineno, __pyx_lineno, __pyx_filename);
          __Pyx_RefNannyFinishContext();
          return NULL;
          __pyx_L4_argument_unpacking_done:;
          if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_memory_pool), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_MemoryPool, 1, "memory_pool", 0))) __PYX_ERR(17, 3612, __pyx_L1_error)
          __pyx_r = __pyx_pf_7pyarrow_3lib_11RecordBatch_44to_tensor(((struct __pyx_obj_7pyarrow_3lib_RecordBatch *)__pyx_v_self), __pyx_v_null_to_nan, __pyx_v_row_major, __pyx_v_memory_pool);

          /* function exit code */
          goto __pyx_L0;
          __pyx_L1_error:;
          __pyx_r = NULL;
          for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
            Py_XDECREF(values[__pyx_temp]);
          }
          goto __pyx_L7_cleaned_up;
          __pyx_L0:;
          for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
            Py_XDECREF(values[__pyx_temp]);
          }
          __pyx_L7_cleaned_up:;
          __Pyx_RefNannyFinishContext();
          return __pyx_r;
        }

        static PyObject *__pyx_pf_7pyarrow_3lib_11RecordBatch_44to_tensor(struct __pyx_obj_7pyarrow_3lib_RecordBatch *__pyx_v_self, bool __pyx_v_null_to_nan, bool __pyx_v_row_major, struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_memory_pool) {
          std::shared_ptr< arrow::RecordBatch>  __pyx_v_c_record_batch;
          std::shared_ptr< arrow::Tensor>  __pyx_v_c_tensor;
           arrow::MemoryPool *__pyx_v_pool;
          PyObject *__pyx_r = NULL;
          __Pyx_RefNannyDeclarations
           arrow::MemoryPool *__pyx_t_1;
          std::shared_ptr< arrow::RecordBatch>  __pyx_t_2;
          std::shared_ptr< arrow::Tensor>  __pyx_t_3;
          PyObject *__pyx_t_4 = NULL;
          int __pyx_lineno = 0;
          const char *__pyx_filename = NULL;
          int __pyx_clineno = 0;
          __Pyx_RefNannySetupContext("to_tensor", 0);

          /* "pyarrow/table.pxi":3680
 *                [nan, nan]])
 *         """
 *         self._assert_cpu()             # <<<<<<<<<<<<<<
 *         cdef:
 *             shared_ptr[CRecordBatch] c_record_batch
*/
          if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
            PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_assert_cpu");
            __PYX_ERR(17, 3680, __pyx_L1_error)
          }
          ((struct __pyx_vtabstruct_7pyarrow_3lib_RecordBatch *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._assert_cpu(((struct __pyx_obj_7pyarrow_3lib__Tabular *)__pyx_v_self)); if (unlikely(PyErr_Occurred())) __PYX_ERR(17, 3680, __pyx_L1_error)

          /* "pyarrow/table.pxi":3684
 *             shared_ptr[CRecordBatch] c_record_batch
 *             shared_ptr[CTensor] c_tensor
 *             CMemoryPool* pool = maybe_unbox_memory_pool(memory_pool)             # <<<<<<<<<<<<<<
 * 
 *         c_record_batch = pyarrow_unwrap_batch(self)
*/
          __pyx_t_1 = __pyx_f_7pyarrow_3lib_maybe_unbox_memory_pool(__pyx_v_memory_pool); if (unlikely(__pyx_t_1 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(17, 3684, __pyx_L1_error)
          __pyx_v_pool = __pyx_t_1;

          /* "pyarrow/table.pxi":3686
 *             CMemoryPool* pool = maybe_unbox_memory_pool(memory_pool)
 * 
 *         c_record_batch = pyarrow_unwrap_batch(self)             # <<<<<<<<<<<<<<
 *         with nogil:
 *             c_tensor = GetResultValue(
*/
          __pyx_t_2 = pyarrow_unwrap_batch(((PyObject *)__pyx_v_self)); if (unlikely(PyErr_Occurred())) __PYX_ERR(17, 3686, __pyx_L1_error)
          __pyx_v_c_record_batch = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_2);

          /* "pyarrow/table.pxi":3687
 * 
 *         c_record_batch = pyarrow_unwrap_batch(self)
 *         with nogil:             # <<<<<<<<<<<<<<
 *             c_tensor = GetResultValue(
 *                 <CResult[shared_ptr[CTensor]]>deref(c_record_batch).ToTensor(null_to_nan,
*/
          {
              PyThreadState * _save;
              _save = PyEval_SaveThread();
              __Pyx_FastGIL_Remember();
              /*try:*/ {

                /* "pyarrow/table.pxi":3688
 *         c_record_batch = pyarrow_unwrap_batch(self)
 *         with nogil:
 *             c_tensor = GetResultValue(             # <<<<<<<<<<<<<<
 *                 <CResult[shared_ptr[CTensor]]>deref(c_record_batch).ToTensor(null_to_nan,
 *                                                                              row_major, pool))
*/
                __pyx_t_3 = arrow::py::GetResultValue<std::shared_ptr< arrow::Tensor> >(((arrow::Result<std::shared_ptr< arrow::Tensor> > )(*__pyx_v_c_record_batch).ToTensor(__pyx_v_null_to_nan, __pyx_v_row_major, __pyx_v_pool))); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(17, 3688, __pyx_L4_error)
                __pyx_v_c_tensor = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_3);
              }

              /* "pyarrow/table.pxi":3687
 * 
 *         c_record_batch = pyarrow_unwrap_batch(self)
 *         with nogil:             # <<<<<<<<<<<<<<
 *             c_tensor = GetResultValue(
 *                 <CResult[shared_ptr[CTensor]]>deref(c_record_batch).ToTensor(null_to_nan,
*/
              /*finally:*/ {
                /*normal exit:*/{
                  __Pyx_FastGIL_Forget();
                  PyEval_RestoreThread(_save);
                  goto __pyx_L5;
                }
                __pyx_L4_error: {
                  __Pyx_FastGIL_Forget();
                  PyEval_RestoreThread(_save);
                  goto __pyx_L1_error;
                }
                __pyx_L5:;
              }
          }

          /* "pyarrow/table.pxi":3691
 *                 <CResult[shared_ptr[CTensor]]>deref(c_record_batch).ToTensor(null_to_nan,
 *                                                                              row_major, pool))
 *         return pyarrow_wrap_tensor(c_tensor)             # <<<<<<<<<<<<<<
 * 
 *     def copy_to(self, destination):
*/
          __Pyx_XDECREF(__pyx_r);
          __pyx_t_4 = pyarrow_wrap_tensor(__pyx_v_c_tensor); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 3691, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_r = __pyx_t_4;
          __pyx_t_4 = 0;
          goto __pyx_L0;

          /* "pyarrow/table.pxi":3612
 *         return pyarrow_wrap_array(c_array)
 * 
 *     def to_tensor(self, c_bool null_to_nan=False, c_bool row_major=True, MemoryPool memory_pool=None):             # <<<<<<<<<<<<<<
 *         """
 *         Convert to a :class:`~pyarrow.Tensor`.
*/

          /* function exit code */
          __pyx_L1_error:;
          __Pyx_XDECREF(__pyx_t_4);
          __Pyx_AddTraceback("pyarrow.lib.RecordBatch.to_tensor", __pyx_clineno, __pyx_lineno, __pyx_filename);
          __pyx_r = NULL;
          __pyx_L0:;
          __Pyx_XGIVEREF(__pyx_r);
          __Pyx_RefNannyFinishContext();
          return __pyx_r;
        }

        /* "pyarrow/table.pxi":3693
 *         return pyarrow_wrap_tensor(c_tensor)
 * 
 *     def copy_to(self, destination):             # <<<<<<<<<<<<<<
 *         """
 *         Copy the entire RecordBatch to destination device.
*/

        /* Python wrapper */
        static PyObject *__pyx_pw_7pyarrow_3lib_11RecordBatch_47copy_to(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
        PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_11RecordBatch_46copy_to, "RecordBatch.copy_to(self, destination)\n\nCopy the entire RecordBatch to destination device.\n\nThis copies each column of the record batch to create\na new record batch where all underlying buffers for the columns have\nbeen copied to the destination MemoryManager.\n\nParameters\n----------\ndestination : pyarrow.MemoryManager or pyarrow.Device\n    The destination device to copy the array to.\n\nReturns\n-------\nRecordBatch");
        static PyMethodDef __pyx_mdef_7pyarrow_3lib_11RecordBatch_47copy_to = {"copy_to", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_11RecordBatch_47copy_to, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_11RecordBatch_46copy_to};
        static PyObject *__pyx_pw_7pyarrow_3lib_11RecordBatch_47copy_to(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
          PyObject *__pyx_v_destination = 0;
          #if !CYTHON_METH_FASTCALL
          CYTHON_UNUSED Py_ssize_t __pyx_nargs;
          #endif
          CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
          PyObject* values[1] = {0};
          int __pyx_lineno = 0;
          const char *__pyx_filename = NULL;
          int __pyx_clineno = 0;
          PyObject *__pyx_r = 0;
          __Pyx_RefNannyDeclarations
          __Pyx_RefNannySetupContext("copy_to (wrapper)", 0);
          #if !CYTHON_METH_FASTCALL
          #if CYTHON_ASSUME_SAFE_SIZE
          __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
          #else
          __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
          #endif
          #endif
          __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
          {
            PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_destination,0};
            const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
            if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(17, 3693, __pyx_L3_error)
            if (__pyx_kwds_len > 0) {
              switch (__pyx_nargs) {
                case  1:
                values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 3693, __pyx_L3_error)
                CYTHON_FALLTHROUGH;
                case  0: break;
                default: goto __pyx_L5_argtuple_error;
              }
              const Py_ssize_t kwd_pos_args = __pyx_nargs;
              if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "copy_to", 0) < (0)) __PYX_ERR(17, 3693, __pyx_L3_error)
              for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("copy_to", 1, 1, 1, i); __PYX_ERR(17, 3693, __pyx_L3_error) }
              }
            } else if (unlikely(__pyx_nargs != 1)) {
              goto __pyx_L5_argtuple_error;
            } else {
              values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
              if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 3693, __pyx_L3_error)
            }
            __pyx_v_destination = values[0];
          }
          goto __pyx_L6_skip;
          __pyx_L5_argtuple_error:;
          __Pyx_RaiseArgtupleInvalid("copy_to", 1, 1, 1, __pyx_nargs); __PYX_ERR(17, 3693, __pyx_L3_error)
          __pyx_L6_skip:;
          goto __pyx_L4_argument_unpacking_done;
          __pyx_L3_error:;
          for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
            Py_XDECREF(values[__pyx_temp]);
          }
          __Pyx_AddTraceback("pyarrow.lib.RecordBatch.copy_to", __pyx_clineno, __pyx_lineno, __pyx_filename);
          __Pyx_RefNannyFinishContext();
          return NULL;
          __pyx_L4_argument_unpacking_done:;
          __pyx_r = __pyx_pf_7pyarrow_3lib_11RecordBatch_46copy_to(((struct __pyx_obj_7pyarrow_3lib_RecordBatch *)__pyx_v_self), __pyx_v_destination);

          /* function exit code */
          for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
            Py_XDECREF(values[__pyx_temp]);
          }
          __Pyx_RefNannyFinishContext();
          return __pyx_r;
        }

        static PyObject *__pyx_pf_7pyarrow_3lib_11RecordBatch_46copy_to(struct __pyx_obj_7pyarrow_3lib_RecordBatch *__pyx_v_self, PyObject *__pyx_v_destination) {
          std::shared_ptr< arrow::RecordBatch>  __pyx_v_c_batch;
          std::shared_ptr< arrow::MemoryManager>  __pyx_v_c_memory_manager;
          PyObject *__pyx_r = NULL;
          __Pyx_RefNannyDeclarations
          int __pyx_t_1;
          std::shared_ptr< arrow::Device>  __pyx_t_2;
          std::shared_ptr< arrow::MemoryManager>  __pyx_t_3;
          PyObject *__pyx_t_4 = NULL;
          PyObject *__pyx_t_5 = NULL;
          PyObject *__pyx_t_6 = NULL;
          PyObject *__pyx_t_7[3];
          PyObject *__pyx_t_8 = NULL;
          size_t __pyx_t_9;
          std::shared_ptr< arrow::RecordBatch>  __pyx_t_10;
          int __pyx_lineno = 0;
          const char *__pyx_filename = NULL;
          int __pyx_clineno = 0;
          __Pyx_RefNannySetupContext("copy_to", 0);

          /* "pyarrow/table.pxi":3714
 *             shared_ptr[CMemoryManager] c_memory_manager
 * 
 *         if isinstance(destination, Device):             # <<<<<<<<<<<<<<
 *             c_memory_manager = (<Device>destination).unwrap().get().default_memory_manager()
 *         elif isinstance(destination, MemoryManager):
*/
          __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_destination, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Device); 
          if (__pyx_t_1) {

            /* "pyarrow/table.pxi":3715
 * 
 *         if isinstance(destination, Device):
 *             c_memory_manager = (<Device>destination).unwrap().get().default_memory_manager()             # <<<<<<<<<<<<<<
 *         elif isinstance(destination, MemoryManager):
 *             c_memory_manager = (<MemoryManager>destination).unwrap()
*/
            if (unlikely(__pyx_v_destination == Py_None)) {
              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "unwrap");
              __PYX_ERR(17, 3715, __pyx_L1_error)
            }
            __pyx_t_2 = __pyx_f_7pyarrow_3lib_6Device_unwrap(((struct __pyx_obj_7pyarrow_3lib_Device *)__pyx_v_destination)); if (unlikely(PyErr_Occurred())) __PYX_ERR(17, 3715, __pyx_L1_error)
            __pyx_v_c_memory_manager = __pyx_t_2.get()->default_memory_manager();

            /* "pyarrow/table.pxi":3714
 *             shared_ptr[CMemoryManager] c_memory_manager
 * 
 *         if isinstance(destination, Device):             # <<<<<<<<<<<<<<
 *             c_memory_manager = (<Device>destination).unwrap().get().default_memory_manager()
 *         elif isinstance(destination, MemoryManager):
*/
            goto __pyx_L3;
          }

          /* "pyarrow/table.pxi":3716
 *         if isinstance(destination, Device):
 *             c_memory_manager = (<Device>destination).unwrap().get().default_memory_manager()
 *         elif isinstance(destination, MemoryManager):             # <<<<<<<<<<<<<<
 *             c_memory_manager = (<MemoryManager>destination).unwrap()
 *         else:
*/
          __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_destination, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_MemoryManager); 
          if (likely(__pyx_t_1)) {

            /* "pyarrow/table.pxi":3717
 *             c_memory_manager = (<Device>destination).unwrap().get().default_memory_manager()
 *         elif isinstance(destination, MemoryManager):
 *             c_memory_manager = (<MemoryManager>destination).unwrap()             # <<<<<<<<<<<<<<
 *         else:
 *             raise TypeError(
*/
            if (unlikely(__pyx_v_destination == Py_None)) {
              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "unwrap");
              __PYX_ERR(17, 3717, __pyx_L1_error)
            }
            __pyx_t_3 = __pyx_f_7pyarrow_3lib_13MemoryManager_unwrap(((struct __pyx_obj_7pyarrow_3lib_MemoryManager *)__pyx_v_destination)); if (unlikely(PyErr_Occurred())) __PYX_ERR(17, 3717, __pyx_L1_error)
            __pyx_v_c_memory_manager = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_3);

            /* "pyarrow/table.pxi":3716
 *         if isinstance(destination, Device):
 *             c_memory_manager = (<Device>destination).unwrap().get().default_memory_manager()
 *         elif isinstance(destination, MemoryManager):             # <<<<<<<<<<<<<<
 *             c_memory_manager = (<MemoryManager>destination).unwrap()
 *         else:
*/
            goto __pyx_L3;
          }

          /* "pyarrow/table.pxi":3719
 *             c_memory_manager = (<MemoryManager>destination).unwrap()
 *         else:
 *             raise TypeError(             # <<<<<<<<<<<<<<
 *                 "Argument 'destination' has incorrect type (expected a "
 *                 f"pyarrow Device or MemoryManager, got {type(destination)})"
*/
          /*else*/ {
            __pyx_t_5 = NULL;

            /* "pyarrow/table.pxi":3721
 *             raise TypeError(
 *                 "Argument 'destination' has incorrect type (expected a "
 *                 f"pyarrow Device or MemoryManager, got {type(destination)})"             # <<<<<<<<<<<<<<
 *             )
 * 
*/
            __pyx_t_6 = __Pyx_PyObject_FormatSimple(((PyObject *)Py_TYPE(__pyx_v_destination)), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 3721, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_6);
            __pyx_t_7[0] = __pyx_mstate_global->__pyx_kp_u_Argument_destination_has_incorre;
            __pyx_t_7[1] = __pyx_t_6;
            __pyx_t_7[2] = __pyx_mstate_global->__pyx_kp_u__7;

            /* "pyarrow/table.pxi":3720
 *         else:
 *             raise TypeError(
 *                 "Argument 'destination' has incorrect type (expected a "             # <<<<<<<<<<<<<<
 *                 f"pyarrow Device or MemoryManager, got {type(destination)})"
 *             )
*/
            __pyx_t_8 = __Pyx_PyUnicode_Join(__pyx_t_7, 3, 91 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6));
            if (unlikely(!__pyx_t_8)) __PYX_ERR(17, 3720, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_8);
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            __pyx_t_9 = 1;
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_8};
              __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
              __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
              __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
              if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 3719, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_4);
            }
            __Pyx_Raise(__pyx_t_4, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            __PYX_ERR(17, 3719, __pyx_L1_error)
          }
          __pyx_L3:;

          /* "pyarrow/table.pxi":3724
 *             )
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             c_batch = GetResultValue(self.batch.CopyTo(c_memory_manager))
 *         return pyarrow_wrap_batch(c_batch)
*/
          {
              PyThreadState * _save;
              _save = PyEval_SaveThread();
              __Pyx_FastGIL_Remember();
              /*try:*/ {

                /* "pyarrow/table.pxi":3725
 * 
 *         with nogil:
 *             c_batch = GetResultValue(self.batch.CopyTo(c_memory_manager))             # <<<<<<<<<<<<<<
 *         return pyarrow_wrap_batch(c_batch)
 * 
*/
                if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                  PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "batch");
                  __Pyx_PyGILState_Release(__pyx_gilstate_save);
                  __PYX_ERR(17, 3725, __pyx_L5_error)
                }
                __pyx_t_10 = arrow::py::GetResultValue<std::shared_ptr< arrow::RecordBatch> >(__pyx_v_self->batch->CopyTo(__pyx_v_c_memory_manager)); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(17, 3725, __pyx_L5_error)
                __pyx_v_c_batch = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_10);
              }

              /* "pyarrow/table.pxi":3724
 *             )
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             c_batch = GetResultValue(self.batch.CopyTo(c_memory_manager))
 *         return pyarrow_wrap_batch(c_batch)
*/
              /*finally:*/ {
                /*normal exit:*/{
                  __Pyx_FastGIL_Forget();
                  PyEval_RestoreThread(_save);
                  goto __pyx_L6;
                }
                __pyx_L5_error: {
                  __Pyx_FastGIL_Forget();
                  PyEval_RestoreThread(_save);
                  goto __pyx_L1_error;
                }
                __pyx_L6:;
              }
          }

          /* "pyarrow/table.pxi":3726
 *         with nogil:
 *             c_batch = GetResultValue(self.batch.CopyTo(c_memory_manager))
 *         return pyarrow_wrap_batch(c_batch)             # <<<<<<<<<<<<<<
 * 
 *     def _export_to_c(self, out_ptr, out_schema_ptr=0):
*/
          __Pyx_XDECREF(__pyx_r);
          __pyx_t_4 = pyarrow_wrap_batch(__pyx_v_c_batch); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 3726, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_r = __pyx_t_4;
          __pyx_t_4 = 0;
          goto __pyx_L0;

          /* "pyarrow/table.pxi":3693
 *         return pyarrow_wrap_tensor(c_tensor)
 * 
 *     def copy_to(self, destination):             # <<<<<<<<<<<<<<
 *         """
 *         Copy the entire RecordBatch to destination device.
*/

          /* function exit code */
          __pyx_L1_error:;
          __Pyx_XDECREF(__pyx_t_4);
          __Pyx_XDECREF(__pyx_t_5);
          __Pyx_XDECREF(__pyx_t_6);
          __Pyx_XDECREF(__pyx_t_8);
          __Pyx_AddTraceback("pyarrow.lib.RecordBatch.copy_to", __pyx_clineno, __pyx_lineno, __pyx_filename);
          __pyx_r = NULL;
          __pyx_L0:;
          __Pyx_XGIVEREF(__pyx_r);
          __Pyx_RefNannyFinishContext();
          return __pyx_r;
        }

        /* "pyarrow/table.pxi":3728
 *         return pyarrow_wrap_batch(c_batch)
 * 
 *     def _export_to_c(self, out_ptr, out_schema_ptr=0):             # <<<<<<<<<<<<<<
 *         """
 *         Export to a C ArrowArray struct, given its pointer.
*/

        /* Python wrapper */
        static PyObject *__pyx_pw_7pyarrow_3lib_11RecordBatch_49_export_to_c(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
        PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_11RecordBatch_48_export_to_c, "RecordBatch._export_to_c(self, out_ptr, out_schema_ptr=0)\n\nExport to a C ArrowArray struct, given its pointer.\n\nIf a C ArrowSchema struct pointer is also given, the record batch\nschema is exported to it at the same time.\n\nParameters\n----------\nout_ptr: int\n    The raw pointer to a C ArrowArray struct.\nout_schema_ptr: int (optional)\n    The raw pointer to a C ArrowSchema struct.\n\nBe careful: if you don't pass the ArrowArray struct to a consumer,\narray memory will leak.  This is a low-level function intended for\nexpert users.");
        static PyMethodDef __pyx_mdef_7pyarrow_3lib_11RecordBatch_49_export_to_c = {"_export_to_c", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_11RecordBatch_49_export_to_c, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_11RecordBatch_48_export_to_c};
        static PyObject *__pyx_pw_7pyarrow_3lib_11RecordBatch_49_export_to_c(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
          PyObject *__pyx_v_out_ptr = 0;
          PyObject *__pyx_v_out_schema_ptr = 0;
          #if !CYTHON_METH_FASTCALL
          CYTHON_UNUSED Py_ssize_t __pyx_nargs;
          #endif
          CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
          PyObject* values[2] = {0,0};
          int __pyx_lineno = 0;
          const char *__pyx_filename = NULL;
          int __pyx_clineno = 0;
          PyObject *__pyx_r = 0;
          __Pyx_RefNannyDeclarations
          __Pyx_RefNannySetupContext("_export_to_c (wrapper)", 0);
          #if !CYTHON_METH_FASTCALL
          #if CYTHON_ASSUME_SAFE_SIZE
          __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
          #else
          __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
          #endif
          #endif
          __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
          {
            PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_out_ptr,&__pyx_mstate_global->__pyx_n_u_out_schema_ptr,0};
            const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
            if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(17, 3728, __pyx_L3_error)
            if (__pyx_kwds_len > 0) {
              switch (__pyx_nargs) {
                case  2:
                values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(17, 3728, __pyx_L3_error)
                CYTHON_FALLTHROUGH;
                case  1:
                values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 3728, __pyx_L3_error)
                CYTHON_FALLTHROUGH;
                case  0: break;
                default: goto __pyx_L5_argtuple_error;
              }
              const Py_ssize_t kwd_pos_args = __pyx_nargs;
              if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_export_to_c", 0) < (0)) __PYX_ERR(17, 3728, __pyx_L3_error)
              if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_int_0));
              for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_export_to_c", 0, 1, 2, i); __PYX_ERR(17, 3728, __pyx_L3_error) }
              }
            } else {
              switch (__pyx_nargs) {
                case  2:
                values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(17, 3728, __pyx_L3_error)
                CYTHON_FALLTHROUGH;
                case  1:
                values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 3728, __pyx_L3_error)
                break;
                default: goto __pyx_L5_argtuple_error;
              }
              if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_int_0));
            }
            __pyx_v_out_ptr = values[0];
            __pyx_v_out_schema_ptr = values[1];
          }
          goto __pyx_L6_skip;
          __pyx_L5_argtuple_error:;
          __Pyx_RaiseArgtupleInvalid("_export_to_c", 0, 1, 2, __pyx_nargs); __PYX_ERR(17, 3728, __pyx_L3_error)
          __pyx_L6_skip:;
          goto __pyx_L4_argument_unpacking_done;
          __pyx_L3_error:;
          for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
            Py_XDECREF(values[__pyx_temp]);
          }
          __Pyx_AddTraceback("pyarrow.lib.RecordBatch._export_to_c", __pyx_clineno, __pyx_lineno, __pyx_filename);
          __Pyx_RefNannyFinishContext();
          return NULL;
          __pyx_L4_argument_unpacking_done:;
          __pyx_r = __pyx_pf_7pyarrow_3lib_11RecordBatch_48_export_to_c(((struct __pyx_obj_7pyarrow_3lib_RecordBatch *)__pyx_v_self), __pyx_v_out_ptr, __pyx_v_out_schema_ptr);

          /* function exit code */
          for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
            Py_XDECREF(values[__pyx_temp]);
          }
          __Pyx_RefNannyFinishContext();
          return __pyx_r;
        }

        static PyObject *__pyx_pf_7pyarrow_3lib_11RecordBatch_48_export_to_c(struct __pyx_obj_7pyarrow_3lib_RecordBatch *__pyx_v_self, PyObject *__pyx_v_out_ptr, PyObject *__pyx_v_out_schema_ptr) {
          void *__pyx_v_c_ptr;
          void *__pyx_v_c_schema_ptr;
          PyObject *__pyx_r = NULL;
          __Pyx_RefNannyDeclarations
          void *__pyx_t_1;
          struct __pyx_opt_args_7pyarrow_3lib__as_c_pointer __pyx_t_2;
          int __pyx_t_3;
          int __pyx_lineno = 0;
          const char *__pyx_filename = NULL;
          int __pyx_clineno = 0;
          __Pyx_RefNannySetupContext("_export_to_c", 0);

          /* "pyarrow/table.pxi":3747
 *         """
 *         cdef:
 *             void* c_ptr = _as_c_pointer(out_ptr)             # <<<<<<<<<<<<<<
 *             void* c_schema_ptr = _as_c_pointer(out_schema_ptr,
 *                                                allow_null=True)
*/
          __pyx_t_1 = __pyx_f_7pyarrow_3lib__as_c_pointer(__pyx_v_out_ptr, NULL); if (unlikely(__pyx_t_1 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(17, 3747, __pyx_L1_error)
          __pyx_v_c_ptr = __pyx_t_1;

          /* "pyarrow/table.pxi":3748
 *         cdef:
 *             void* c_ptr = _as_c_pointer(out_ptr)
 *             void* c_schema_ptr = _as_c_pointer(out_schema_ptr,             # <<<<<<<<<<<<<<
 *                                                allow_null=True)
 *         with nogil:
*/
          __pyx_t_2.__pyx_n = 1;
          __pyx_t_2.allow_null = Py_True;
          __pyx_t_1 = __pyx_f_7pyarrow_3lib__as_c_pointer(__pyx_v_out_schema_ptr, &__pyx_t_2); if (unlikely(__pyx_t_1 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(17, 3748, __pyx_L1_error)
          __pyx_v_c_schema_ptr = __pyx_t_1;

          /* "pyarrow/table.pxi":3750
 *             void* c_schema_ptr = _as_c_pointer(out_schema_ptr,
 *                                                allow_null=True)
 *         with nogil:             # <<<<<<<<<<<<<<
 *             check_status(ExportRecordBatch(deref(self.sp_batch),
 *                                            <ArrowArray*> c_ptr,
*/
          {
              PyThreadState * _save;
              _save = PyEval_SaveThread();
              __Pyx_FastGIL_Remember();
              /*try:*/ {

                /* "pyarrow/table.pxi":3751
 *                                                allow_null=True)
 *         with nogil:
 *             check_status(ExportRecordBatch(deref(self.sp_batch),             # <<<<<<<<<<<<<<
 *                                            <ArrowArray*> c_ptr,
 *                                            <ArrowSchema*> c_schema_ptr))
*/
                if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                  PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_batch");
                  __Pyx_PyGILState_Release(__pyx_gilstate_save);
                  __PYX_ERR(17, 3751, __pyx_L4_error)
                }

                /* "pyarrow/table.pxi":3753
 *             check_status(ExportRecordBatch(deref(self.sp_batch),
 *                                            <ArrowArray*> c_ptr,
 *                                            <ArrowSchema*> c_schema_ptr))             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
*/
                __pyx_t_3 = __pyx_f_7pyarrow_3lib_check_status(arrow::ExportRecordBatch((*__pyx_v_self->sp_batch), ((struct ArrowArray *)__pyx_v_c_ptr), ((struct ArrowSchema *)__pyx_v_c_schema_ptr))); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(17, 3751, __pyx_L4_error)
              }

              /* "pyarrow/table.pxi":3750
 *             void* c_schema_ptr = _as_c_pointer(out_schema_ptr,
 *                                                allow_null=True)
 *         with nogil:             # <<<<<<<<<<<<<<
 *             check_status(ExportRecordBatch(deref(self.sp_batch),
 *                                            <ArrowArray*> c_ptr,
*/
              /*finally:*/ {
                /*normal exit:*/{
                  __Pyx_FastGIL_Forget();
                  PyEval_RestoreThread(_save);
                  goto __pyx_L5;
                }
                __pyx_L4_error: {
                  __Pyx_FastGIL_Forget();
                  PyEval_RestoreThread(_save);
                  goto __pyx_L1_error;
                }
                __pyx_L5:;
              }
          }

          /* "pyarrow/table.pxi":3728
 *         return pyarrow_wrap_batch(c_batch)
 * 
 *     def _export_to_c(self, out_ptr, out_schema_ptr=0):             # <<<<<<<<<<<<<<
 *         """
 *         Export to a C ArrowArray struct, given its pointer.
*/

          /* function exit code */
          __pyx_r = Py_None; __Pyx_INCREF(Py_None);
          goto __pyx_L0;
          __pyx_L1_error:;
          __Pyx_AddTraceback("pyarrow.lib.RecordBatch._export_to_c", __pyx_clineno, __pyx_lineno, __pyx_filename);
          __pyx_r = NULL;
          __pyx_L0:;
          __Pyx_XGIVEREF(__pyx_r);
          __Pyx_RefNannyFinishContext();
          return __pyx_r;
        }

        /* "pyarrow/table.pxi":3755
 *                                            <ArrowSchema*> c_schema_ptr))
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def _import_from_c(in_ptr, schema):
 *         """
*/

        /* Python wrapper */
        static PyObject *__pyx_pw_7pyarrow_3lib_11RecordBatch_51_import_from_c(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
        PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_11RecordBatch_50_import_from_c, "RecordBatch._import_from_c(in_ptr, schema)\n\nImport RecordBatch from a C ArrowArray struct, given its pointer\nand the imported schema.\n\nParameters\n----------\nin_ptr: int\n    The raw pointer to a C ArrowArray struct.\ntype: Schema or int\n    Either a Schema object, or the raw pointer to a C ArrowSchema\n    struct.\n\nThis is a low-level function intended for expert users.");
        static PyMethodDef __pyx_mdef_7pyarrow_3lib_11RecordBatch_51_import_from_c = {"_import_from_c", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_11RecordBatch_51_import_from_c, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_11RecordBatch_50_import_from_c};
        static PyObject *__pyx_pw_7pyarrow_3lib_11RecordBatch_51_import_from_c(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
          PyObject *__pyx_v_in_ptr = 0;
          PyObject *__pyx_v_schema = 0;
          #if !CYTHON_METH_FASTCALL
          CYTHON_UNUSED Py_ssize_t __pyx_nargs;
          #endif
          CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
          PyObject* values[2] = {0,0};
          int __pyx_lineno = 0;
          const char *__pyx_filename = NULL;
          int __pyx_clineno = 0;
          PyObject *__pyx_r = 0;
          __Pyx_RefNannyDeclarations
          __Pyx_RefNannySetupContext("_import_from_c (wrapper)", 0);
          #if !CYTHON_METH_FASTCALL
          #if CYTHON_ASSUME_SAFE_SIZE
          __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
          #else
          __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
          #endif
          #endif
          __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
          {
            PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_in_ptr,&__pyx_mstate_global->__pyx_n_u_schema,0};
            const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
            if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(17, 3755, __pyx_L3_error)
            if (__pyx_kwds_len > 0) {
              switch (__pyx_nargs) {
                case  2:
                values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(17, 3755, __pyx_L3_error)
                CYTHON_FALLTHROUGH;
                case  1:
                values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 3755, __pyx_L3_error)
                CYTHON_FALLTHROUGH;
                case  0: break;
                default: goto __pyx_L5_argtuple_error;
              }
              const Py_ssize_t kwd_pos_args = __pyx_nargs;
              if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_import_from_c", 0) < (0)) __PYX_ERR(17, 3755, __pyx_L3_error)
              for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
                if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_import_from_c", 1, 2, 2, i); __PYX_ERR(17, 3755, __pyx_L3_error) }
              }
            } else if (unlikely(__pyx_nargs != 2)) {
              goto __pyx_L5_argtuple_error;
            } else {
              values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
              if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 3755, __pyx_L3_error)
              values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
              if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(17, 3755, __pyx_L3_error)
            }
            __pyx_v_in_ptr = values[0];
            __pyx_v_schema = values[1];
          }
          goto __pyx_L6_skip;
          __pyx_L5_argtuple_error:;
          __Pyx_RaiseArgtupleInvalid("_import_from_c", 1, 2, 2, __pyx_nargs); __PYX_ERR(17, 3755, __pyx_L3_error)
          __pyx_L6_skip:;
          goto __pyx_L4_argument_unpacking_done;
          __pyx_L3_error:;
          for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
            Py_XDECREF(values[__pyx_temp]);
          }
          __Pyx_AddTraceback("pyarrow.lib.RecordBatch._import_from_c", __pyx_clineno, __pyx_lineno, __pyx_filename);
          __Pyx_RefNannyFinishContext();
          return NULL;
          __pyx_L4_argument_unpacking_done:;
          __pyx_r = __pyx_pf_7pyarrow_3lib_11RecordBatch_50_import_from_c(__pyx_v_in_ptr, __pyx_v_schema);

          /* function exit code */
          for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
            Py_XDECREF(values[__pyx_temp]);
          }
          __Pyx_RefNannyFinishContext();
          return __pyx_r;
        }

        static PyObject *__pyx_pf_7pyarrow_3lib_11RecordBatch_50_import_from_c(PyObject *__pyx_v_in_ptr, PyObject *__pyx_v_schema) {
          void *__pyx_v_c_ptr;
          void *__pyx_v_c_schema_ptr;
          std::shared_ptr< arrow::RecordBatch>  __pyx_v_c_batch;
          std::shared_ptr< arrow::Schema>  __pyx_v_c_schema;
          PyObject *__pyx_r = NULL;
          __Pyx_RefNannyDeclarations
          void *__pyx_t_1;
          std::shared_ptr< arrow::Schema>  __pyx_t_2;
          int __pyx_t_3;
          struct __pyx_opt_args_7pyarrow_3lib__as_c_pointer __pyx_t_4;
          std::shared_ptr< arrow::RecordBatch>  __pyx_t_5;
          PyObject *__pyx_t_6 = NULL;
          int __pyx_lineno = 0;
          const char *__pyx_filename = NULL;
          int __pyx_clineno = 0;
          __Pyx_RefNannySetupContext("_import_from_c", 0);

          /* "pyarrow/table.pxi":3772
 *         """
 *         cdef:
 *             void* c_ptr = _as_c_pointer(in_ptr)             # <<<<<<<<<<<<<<
 *             void* c_schema_ptr
 *             shared_ptr[CRecordBatch] c_batch
*/
          __pyx_t_1 = __pyx_f_7pyarrow_3lib__as_c_pointer(__pyx_v_in_ptr, NULL); if (unlikely(__pyx_t_1 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(17, 3772, __pyx_L1_error)
          __pyx_v_c_ptr = __pyx_t_1;

          /* "pyarrow/table.pxi":3776
 *             shared_ptr[CRecordBatch] c_batch
 * 
 *         c_schema = pyarrow_unwrap_schema(schema)             # <<<<<<<<<<<<<<
 *         if c_schema == nullptr:
 *             # Not a Schema object, perhaps a raw ArrowSchema pointer
*/
          __pyx_t_2 = pyarrow_unwrap_schema(__pyx_v_schema); if (unlikely(PyErr_Occurred())) __PYX_ERR(17, 3776, __pyx_L1_error)
          __pyx_v_c_schema = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_2);

          /* "pyarrow/table.pxi":3777
 * 
 *         c_schema = pyarrow_unwrap_schema(schema)
 *         if c_schema == nullptr:             # <<<<<<<<<<<<<<
 *             # Not a Schema object, perhaps a raw ArrowSchema pointer
 *             c_schema_ptr = _as_c_pointer(schema, allow_null=True)
*/
          __pyx_t_3 = ((__pyx_v_c_schema == nullptr) != 0);
          if (__pyx_t_3) {

            /* "pyarrow/table.pxi":3779
 *         if c_schema == nullptr:
 *             # Not a Schema object, perhaps a raw ArrowSchema pointer
 *             c_schema_ptr = _as_c_pointer(schema, allow_null=True)             # <<<<<<<<<<<<<<
 *             with nogil:
 *                 c_batch = GetResultValue(ImportRecordBatch(
*/
            __pyx_t_4.__pyx_n = 1;
            __pyx_t_4.allow_null = Py_True;
            __pyx_t_1 = __pyx_f_7pyarrow_3lib__as_c_pointer(__pyx_v_schema, &__pyx_t_4); if (unlikely(__pyx_t_1 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(17, 3779, __pyx_L1_error)
            __pyx_v_c_schema_ptr = __pyx_t_1;

            /* "pyarrow/table.pxi":3780
 *             # Not a Schema object, perhaps a raw ArrowSchema pointer
 *             c_schema_ptr = _as_c_pointer(schema, allow_null=True)
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 c_batch = GetResultValue(ImportRecordBatch(
 *                     <ArrowArray*> c_ptr, <ArrowSchema*> c_schema_ptr))
*/
            {
                PyThreadState * _save;
                _save = PyEval_SaveThread();
                __Pyx_FastGIL_Remember();
                /*try:*/ {

                  /* "pyarrow/table.pxi":3781
 *             c_schema_ptr = _as_c_pointer(schema, allow_null=True)
 *             with nogil:
 *                 c_batch = GetResultValue(ImportRecordBatch(             # <<<<<<<<<<<<<<
 *                     <ArrowArray*> c_ptr, <ArrowSchema*> c_schema_ptr))
 *         else:
*/
                  __pyx_t_5 = arrow::py::GetResultValue<std::shared_ptr< arrow::RecordBatch> >(arrow::ImportRecordBatch(((struct ArrowArray *)__pyx_v_c_ptr), ((struct ArrowSchema *)__pyx_v_c_schema_ptr))); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(17, 3781, __pyx_L5_error)
                  __pyx_v_c_batch = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_5);
                }

                /* "pyarrow/table.pxi":3780
 *             # Not a Schema object, perhaps a raw ArrowSchema pointer
 *             c_schema_ptr = _as_c_pointer(schema, allow_null=True)
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 c_batch = GetResultValue(ImportRecordBatch(
 *                     <ArrowArray*> c_ptr, <ArrowSchema*> c_schema_ptr))
*/
                /*finally:*/ {
                  /*normal exit:*/{
                    __Pyx_FastGIL_Forget();
                    PyEval_RestoreThread(_save);
                    goto __pyx_L6;
                  }
                  __pyx_L5_error: {
                    __Pyx_FastGIL_Forget();
                    PyEval_RestoreThread(_save);
                    goto __pyx_L1_error;
                  }
                  __pyx_L6:;
                }
            }

            /* "pyarrow/table.pxi":3777
 * 
 *         c_schema = pyarrow_unwrap_schema(schema)
 *         if c_schema == nullptr:             # <<<<<<<<<<<<<<
 *             # Not a Schema object, perhaps a raw ArrowSchema pointer
 *             c_schema_ptr = _as_c_pointer(schema, allow_null=True)
*/
            goto __pyx_L3;
          }

          /* "pyarrow/table.pxi":3784
 *                     <ArrowArray*> c_ptr, <ArrowSchema*> c_schema_ptr))
 *         else:
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 c_batch = GetResultValue(ImportRecordBatch(
 *                     <ArrowArray*> c_ptr, c_schema))
*/
          /*else*/ {
            {
                PyThreadState * _save;
                _save = PyEval_SaveThread();
                __Pyx_FastGIL_Remember();
                /*try:*/ {

                  /* "pyarrow/table.pxi":3785
 *         else:
 *             with nogil:
 *                 c_batch = GetResultValue(ImportRecordBatch(             # <<<<<<<<<<<<<<
 *                     <ArrowArray*> c_ptr, c_schema))
 *         return pyarrow_wrap_batch(c_batch)
*/
                  __pyx_t_5 = arrow::py::GetResultValue<std::shared_ptr< arrow::RecordBatch> >(arrow::ImportRecordBatch(((struct ArrowArray *)__pyx_v_c_ptr), __pyx_v_c_schema)); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(17, 3785, __pyx_L8_error)
                  __pyx_v_c_batch = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_5);
                }

                /* "pyarrow/table.pxi":3784
 *                     <ArrowArray*> c_ptr, <ArrowSchema*> c_schema_ptr))
 *         else:
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 c_batch = GetResultValue(ImportRecordBatch(
 *                     <ArrowArray*> c_ptr, c_schema))
*/
                /*finally:*/ {
                  /*normal exit:*/{
                    __Pyx_FastGIL_Forget();
                    PyEval_RestoreThread(_save);
                    goto __pyx_L9;
                  }
                  __pyx_L8_error: {
                    __Pyx_FastGIL_Forget();
                    PyEval_RestoreThread(_save);
                    goto __pyx_L1_error;
                  }
                  __pyx_L9:;
                }
            }
          }
          __pyx_L3:;

          /* "pyarrow/table.pxi":3787
 *                 c_batch = GetResultValue(ImportRecordBatch(
 *                     <ArrowArray*> c_ptr, c_schema))
 *         return pyarrow_wrap_batch(c_batch)             # <<<<<<<<<<<<<<
 * 
 *     def __arrow_c_array__(self, requested_schema=None):
*/
          __Pyx_XDECREF(__pyx_r);
          __pyx_t_6 = pyarrow_wrap_batch(__pyx_v_c_batch); if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 3787, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_r = __pyx_t_6;
          __pyx_t_6 = 0;
          goto __pyx_L0;

          /* "pyarrow/table.pxi":3755
 *                                            <ArrowSchema*> c_schema_ptr))
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def _import_from_c(in_ptr, schema):
 *         """
*/

          /* function exit code */
          __pyx_L1_error:;
          __Pyx_XDECREF(__pyx_t_6);
          __Pyx_AddTraceback("pyarrow.lib.RecordBatch._import_from_c", __pyx_clineno, __pyx_lineno, __pyx_filename);
          __pyx_r = NULL;
          __pyx_L0:;
          __Pyx_XGIVEREF(__pyx_r);
          __Pyx_RefNannyFinishContext();
          return __pyx_r;
        }

        /* "pyarrow/table.pxi":3789
 *         return pyarrow_wrap_batch(c_batch)
 * 
 *     def __arrow_c_array__(self, requested_schema=None):             # <<<<<<<<<<<<<<
 *         """
 *         Get a pair of PyCapsules containing a C ArrowArray representation of the object.
*/

        /* Python wrapper */
        static PyObject *__pyx_pw_7pyarrow_3lib_11RecordBatch_53__arrow_c_array__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
        PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_11RecordBatch_52__arrow_c_array__, "RecordBatch.__arrow_c_array__(self, requested_schema=None)\n\nGet a pair of PyCapsules containing a C ArrowArray representation of the object.\n\nParameters\n----------\nrequested_schema : PyCapsule | None\n    A PyCapsule containing a C ArrowSchema representation of a requested\n    schema. PyArrow will attempt to cast the batch to this schema.\n    If None, the batch will be returned as-is, with a schema matching the\n    one returned by :meth:`__arrow_c_schema__()`.\n\nReturns\n-------\nTuple[PyCapsule, PyCapsule]\n    A pair of PyCapsules containing a C ArrowSchema and ArrowArray,\n    respectively.");
        static PyMethodDef __pyx_mdef_7pyarrow_3lib_11RecordBatch_53__arrow_c_array__ = {"__arrow_c_array__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_11RecordBatch_53__arrow_c_array__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_11RecordBatch_52__arrow_c_array__};
        static PyObject *__pyx_pw_7pyarrow_3lib_11RecordBatch_53__arrow_c_array__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
          PyObject *__pyx_v_requested_schema = 0;
          #if !CYTHON_METH_FASTCALL
          CYTHON_UNUSED Py_ssize_t __pyx_nargs;
          #endif
          CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
          PyObject* values[1] = {0};
          int __pyx_lineno = 0;
          const char *__pyx_filename = NULL;
          int __pyx_clineno = 0;
          PyObject *__pyx_r = 0;
          __Pyx_RefNannyDeclarations
          __Pyx_RefNannySetupContext("__arrow_c_array__ (wrapper)", 0);
          #if !CYTHON_METH_FASTCALL
          #if CYTHON_ASSUME_SAFE_SIZE
          __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
          #else
          __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
          #endif
          #endif
          __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
          {
            PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_requested_schema,0};
            const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
            if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(17, 3789, __pyx_L3_error)
            if (__pyx_kwds_len > 0) {
              switch (__pyx_nargs) {
                case  1:
                values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 3789, __pyx_L3_error)
                CYTHON_FALLTHROUGH;
                case  0: break;
                default: goto __pyx_L5_argtuple_error;
              }
              const Py_ssize_t kwd_pos_args = __pyx_nargs;
              if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__arrow_c_array__", 0) < (0)) __PYX_ERR(17, 3789, __pyx_L3_error)
              if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
            } else {
              switch (__pyx_nargs) {
                case  1:
                values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 3789, __pyx_L3_error)
                CYTHON_FALLTHROUGH;
                case  0: break;
                default: goto __pyx_L5_argtuple_error;
              }
              if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
            }
            __pyx_v_requested_schema = values[0];
          }
          goto __pyx_L6_skip;
          __pyx_L5_argtuple_error:;
          __Pyx_RaiseArgtupleInvalid("__arrow_c_array__", 0, 0, 1, __pyx_nargs); __PYX_ERR(17, 3789, __pyx_L3_error)
          __pyx_L6_skip:;
          goto __pyx_L4_argument_unpacking_done;
          __pyx_L3_error:;
          for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
            Py_XDECREF(values[__pyx_temp]);
          }
          __Pyx_AddTraceback("pyarrow.lib.RecordBatch.__arrow_c_array__", __pyx_clineno, __pyx_lineno, __pyx_filename);
          __Pyx_RefNannyFinishContext();
          return NULL;
          __pyx_L4_argument_unpacking_done:;
          __pyx_r = __pyx_pf_7pyarrow_3lib_11RecordBatch_52__arrow_c_array__(((struct __pyx_obj_7pyarrow_3lib_RecordBatch *)__pyx_v_self), __pyx_v_requested_schema);

          /* function exit code */
          for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
            Py_XDECREF(values[__pyx_temp]);
          }
          __Pyx_RefNannyFinishContext();
          return __pyx_r;
        }

        static PyObject *__pyx_pf_7pyarrow_3lib_11RecordBatch_52__arrow_c_array__(struct __pyx_obj_7pyarrow_3lib_RecordBatch *__pyx_v_self, PyObject *__pyx_v_requested_schema) {
          struct ArrowArray *__pyx_v_c_array;
          struct ArrowSchema *__pyx_v_c_schema;
          PyObject *__pyx_v_target_schema = NULL;
          PyObject *__pyx_v_casted_batch = NULL;
          std::shared_ptr< arrow::RecordBatch>  __pyx_v_inner_batch;
          PyObject *__pyx_v_e = NULL;
          PyObject *__pyx_v_schema_capsule = NULL;
          PyObject *__pyx_v_array_capsule = NULL;
          PyObject *__pyx_r = NULL;
          __Pyx_RefNannyDeclarations
          int __pyx_t_1;
          PyObject *__pyx_t_2 = NULL;
          PyObject *__pyx_t_3 = NULL;
          size_t __pyx_t_4;
          PyObject *__pyx_t_5 = NULL;
          PyObject *__pyx_t_6 = NULL;
          PyObject *__pyx_t_7 = NULL;
          PyObject *__pyx_t_8 = NULL;
          std::shared_ptr< arrow::RecordBatch>  __pyx_t_9;
          PyObject *__pyx_t_10 = NULL;
          int __pyx_t_11;
          PyObject *__pyx_t_12 = NULL;
          PyObject *__pyx_t_13 = NULL;
          PyObject *__pyx_t_14 = NULL;
          PyObject *__pyx_t_15 = NULL;
          PyObject *__pyx_t_16[6];
          PyObject *__pyx_t_17 = NULL;
          int __pyx_t_18;
          char const *__pyx_t_19;
          PyObject *__pyx_t_20 = NULL;
          PyObject *__pyx_t_21 = NULL;
          PyObject *__pyx_t_22 = NULL;
          PyObject *__pyx_t_23 = NULL;
          PyObject *__pyx_t_24 = NULL;
          PyObject *__pyx_t_25 = NULL;
          int __pyx_lineno = 0;
          const char *__pyx_filename = NULL;
          int __pyx_clineno = 0;
          __Pyx_RefNannySetupContext("__arrow_c_array__", 0);

          /* "pyarrow/table.pxi":3807
 *             respectively.
 *         """
 *         self._assert_cpu()             # <<<<<<<<<<<<<<
 *         cdef:
 *             ArrowArray* c_array
*/
          if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
            PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_assert_cpu");
            __PYX_ERR(17, 3807, __pyx_L1_error)
          }
          ((struct __pyx_vtabstruct_7pyarrow_3lib_RecordBatch *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._assert_cpu(((struct __pyx_obj_7pyarrow_3lib__Tabular *)__pyx_v_self)); if (unlikely(PyErr_Occurred())) __PYX_ERR(17, 3807, __pyx_L1_error)

          /* "pyarrow/table.pxi":3812
 *             ArrowSchema* c_schema
 * 
 *         if requested_schema is not None:             # <<<<<<<<<<<<<<
 *             target_schema = Schema._import_from_c_capsule(requested_schema)
 * 
*/
          __pyx_t_1 = (__pyx_v_requested_schema != Py_None);
          if (__pyx_t_1) {

            /* "pyarrow/table.pxi":3813
 * 
 *         if requested_schema is not None:
 *             target_schema = Schema._import_from_c_capsule(requested_schema)             # <<<<<<<<<<<<<<
 * 
 *             if target_schema != self.schema:
*/
            __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Schema);
            __Pyx_INCREF(__pyx_t_3);
            __pyx_t_4 = 0;
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_requested_schema};
              __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_import_from_c_capsule, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 3813, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_2);
            }
            __pyx_v_target_schema = __pyx_t_2;
            __pyx_t_2 = 0;

            /* "pyarrow/table.pxi":3815
 *             target_schema = Schema._import_from_c_capsule(requested_schema)
 * 
 *             if target_schema != self.schema:             # <<<<<<<<<<<<<<
 *                 try:
 *                     casted_batch = self.cast(target_schema, safe=True)
*/
            __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_schema); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 3815, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            __pyx_t_3 = PyObject_RichCompare(__pyx_v_target_schema, __pyx_t_2, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 3815, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(17, 3815, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            if (__pyx_t_1) {

              /* "pyarrow/table.pxi":3816
 * 
 *             if target_schema != self.schema:
 *                 try:             # <<<<<<<<<<<<<<
 *                     casted_batch = self.cast(target_schema, safe=True)
 *                     inner_batch = pyarrow_unwrap_batch(casted_batch)
*/
              {
                __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:*/ {

                  /* "pyarrow/table.pxi":3817
 *             if target_schema != self.schema:
 *                 try:
 *                     casted_batch = self.cast(target_schema, safe=True)             # <<<<<<<<<<<<<<
 *                     inner_batch = pyarrow_unwrap_batch(casted_batch)
 *                 except ArrowInvalid as e:
*/
                  __pyx_t_2 = ((PyObject *)__pyx_v_self);
                  __Pyx_INCREF(__pyx_t_2);
                  __pyx_t_4 = 0;
                  {
                    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, __pyx_v_target_schema};
                    __pyx_t_8 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(17, 3817, __pyx_L5_error)
                    __Pyx_GOTREF(__pyx_t_8);
                    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_safe, Py_True, __pyx_t_8, __pyx_callargs+2, 0) < (0)) __PYX_ERR(17, 3817, __pyx_L5_error)
                    __pyx_t_3 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_cast, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_8);
                    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                    if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 3817, __pyx_L5_error)
                    __Pyx_GOTREF(__pyx_t_3);
                  }
                  __pyx_v_casted_batch = __pyx_t_3;
                  __pyx_t_3 = 0;

                  /* "pyarrow/table.pxi":3818
 *                 try:
 *                     casted_batch = self.cast(target_schema, safe=True)
 *                     inner_batch = pyarrow_unwrap_batch(casted_batch)             # <<<<<<<<<<<<<<
 *                 except ArrowInvalid as e:
 *                     raise ValueError(
*/
                  __pyx_t_9 = pyarrow_unwrap_batch(__pyx_v_casted_batch); if (unlikely(PyErr_Occurred())) __PYX_ERR(17, 3818, __pyx_L5_error)
                  __pyx_v_inner_batch = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_9);

                  /* "pyarrow/table.pxi":3816
 * 
 *             if target_schema != self.schema:
 *                 try:             # <<<<<<<<<<<<<<
 *                     casted_batch = self.cast(target_schema, safe=True)
 *                     inner_batch = pyarrow_unwrap_batch(casted_batch)
*/
                }
                __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
                __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
                __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
                goto __pyx_L10_try_end;
                __pyx_L5_error:;
                __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;

                /* "pyarrow/table.pxi":3819
 *                     casted_batch = self.cast(target_schema, safe=True)
 *                     inner_batch = pyarrow_unwrap_batch(casted_batch)
 *                 except ArrowInvalid as e:             # <<<<<<<<<<<<<<
 *                     raise ValueError(
 *                         f"Could not cast {self.schema} to requested schema {target_schema}: {e}"
*/
                __Pyx_ErrFetch(&__pyx_t_3, &__pyx_t_8, &__pyx_t_2);
                __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_ArrowInvalid); if (unlikely(!__pyx_t_10)) __PYX_ERR(17, 3819, __pyx_L7_except_error)
                __Pyx_GOTREF(__pyx_t_10);
                __pyx_t_11 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_3, __pyx_t_10);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_ErrRestore(__pyx_t_3, __pyx_t_8, __pyx_t_2);
                __pyx_t_3 = 0; __pyx_t_8 = 0; __pyx_t_2 = 0;
                if (__pyx_t_11) {
                  __Pyx_AddTraceback("pyarrow.lib.RecordBatch.__arrow_c_array__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                  if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_8, &__pyx_t_3) < 0) __PYX_ERR(17, 3819, __pyx_L7_except_error)
                  __Pyx_XGOTREF(__pyx_t_2);
                  __Pyx_XGOTREF(__pyx_t_8);
                  __Pyx_XGOTREF(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_8);
                  __pyx_v_e = __pyx_t_8;
                  /*try:*/ {

                    /* "pyarrow/table.pxi":3820
 *                     inner_batch = pyarrow_unwrap_batch(casted_batch)
 *                 except ArrowInvalid as e:
 *                     raise ValueError(             # <<<<<<<<<<<<<<
 *                         f"Could not cast {self.schema} to requested schema {target_schema}: {e}"
 *                     )
*/
                    __pyx_t_12 = NULL;

                    /* "pyarrow/table.pxi":3821
 *                 except ArrowInvalid as e:
 *                     raise ValueError(
 *                         f"Could not cast {self.schema} to requested schema {target_schema}: {e}"             # <<<<<<<<<<<<<<
 *                     )
 *             else:
*/
                    __pyx_t_13 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_schema); if (unlikely(!__pyx_t_13)) __PYX_ERR(17, 3821, __pyx_L16_error)
                    __Pyx_GOTREF(__pyx_t_13);
                    __pyx_t_14 = __Pyx_PyObject_FormatSimple(__pyx_t_13, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_14)) __PYX_ERR(17, 3821, __pyx_L16_error)
                    __Pyx_GOTREF(__pyx_t_14);
                    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
                    __pyx_t_13 = __Pyx_PyObject_FormatSimple(__pyx_v_target_schema, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_13)) __PYX_ERR(17, 3821, __pyx_L16_error)
                    __Pyx_GOTREF(__pyx_t_13);
                    __pyx_t_15 = __Pyx_PyObject_FormatSimple(__pyx_v_e, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_15)) __PYX_ERR(17, 3821, __pyx_L16_error)
                    __Pyx_GOTREF(__pyx_t_15);
                    __pyx_t_16[0] = __pyx_mstate_global->__pyx_kp_u_Could_not_cast;
                    __pyx_t_16[1] = __pyx_t_14;
                    __pyx_t_16[2] = __pyx_mstate_global->__pyx_kp_u_to_requested_schema;
                    __pyx_t_16[3] = __pyx_t_13;
                    __pyx_t_16[4] = __pyx_mstate_global->__pyx_kp_u__10;
                    __pyx_t_16[5] = __pyx_t_15;
                    __pyx_t_17 = __Pyx_PyUnicode_Join(__pyx_t_16, 6, 15 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_14) + 21 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_13) + 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_15), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_14) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_13) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_15));
                    if (unlikely(!__pyx_t_17)) __PYX_ERR(17, 3821, __pyx_L16_error)
                    __Pyx_GOTREF(__pyx_t_17);
                    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
                    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
                    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
                    __pyx_t_4 = 1;
                    {
                      PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_t_17};
                      __pyx_t_10 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                      __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                      __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
                      if (unlikely(!__pyx_t_10)) __PYX_ERR(17, 3820, __pyx_L16_error)
                      __Pyx_GOTREF(__pyx_t_10);
                    }
                    __Pyx_Raise(__pyx_t_10, 0, 0, 0);
                    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                    __PYX_ERR(17, 3820, __pyx_L16_error)
                  }

                  /* "pyarrow/table.pxi":3819
 *                     casted_batch = self.cast(target_schema, safe=True)
 *                     inner_batch = pyarrow_unwrap_batch(casted_batch)
 *                 except ArrowInvalid as e:             # <<<<<<<<<<<<<<
 *                     raise ValueError(
 *                         f"Could not cast {self.schema} to requested schema {target_schema}: {e}"
*/
                  /*finally:*/ {
                    __pyx_L16_error:;
                    /*exception exit:*/{
                      __Pyx_PyThreadState_declare
                      __Pyx_PyThreadState_assign
                      __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0; __pyx_t_25 = 0;
                      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                      __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                      __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
                      __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
                      __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
                      __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
                       __Pyx_ExceptionSwap(&__pyx_t_23, &__pyx_t_24, &__pyx_t_25);
                      if ( unlikely(__Pyx_GetException(&__pyx_t_20, &__pyx_t_21, &__pyx_t_22) < 0)) __Pyx_ErrFetch(&__pyx_t_20, &__pyx_t_21, &__pyx_t_22);
                      __Pyx_XGOTREF(__pyx_t_20);
                      __Pyx_XGOTREF(__pyx_t_21);
                      __Pyx_XGOTREF(__pyx_t_22);
                      __Pyx_XGOTREF(__pyx_t_23);
                      __Pyx_XGOTREF(__pyx_t_24);
                      __Pyx_XGOTREF(__pyx_t_25);
                      __pyx_t_11 = __pyx_lineno; __pyx_t_18 = __pyx_clineno; __pyx_t_19 = __pyx_filename;
                      {
                        __Pyx_DECREF(__pyx_v_e); __pyx_v_e = 0;
                      }
                      __Pyx_XGIVEREF(__pyx_t_23);
                      __Pyx_XGIVEREF(__pyx_t_24);
                      __Pyx_XGIVEREF(__pyx_t_25);
                      __Pyx_ExceptionReset(__pyx_t_23, __pyx_t_24, __pyx_t_25);
                      __Pyx_XGIVEREF(__pyx_t_20);
                      __Pyx_XGIVEREF(__pyx_t_21);
                      __Pyx_XGIVEREF(__pyx_t_22);
                      __Pyx_ErrRestore(__pyx_t_20, __pyx_t_21, __pyx_t_22);
                      __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0; __pyx_t_25 = 0;
                      __pyx_lineno = __pyx_t_11; __pyx_clineno = __pyx_t_18; __pyx_filename = __pyx_t_19;
                      goto __pyx_L7_except_error;
                    }
                  }
                }
                goto __pyx_L7_except_error;

                /* "pyarrow/table.pxi":3816
 * 
 *             if target_schema != self.schema:
 *                 try:             # <<<<<<<<<<<<<<
 *                     casted_batch = self.cast(target_schema, safe=True)
 *                     inner_batch = pyarrow_unwrap_batch(casted_batch)
*/
                __pyx_L7_except_error:;
                __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_L10_try_end:;
              }

              /* "pyarrow/table.pxi":3815
 *             target_schema = Schema._import_from_c_capsule(requested_schema)
 * 
 *             if target_schema != self.schema:             # <<<<<<<<<<<<<<
 *                 try:
 *                     casted_batch = self.cast(target_schema, safe=True)
*/
              goto __pyx_L4;
            }

            /* "pyarrow/table.pxi":3824
 *                     )
 *             else:
 *                 inner_batch = self.sp_batch             # <<<<<<<<<<<<<<
 *         else:
 *             inner_batch = self.sp_batch
*/
            /*else*/ {
              if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_batch");
                __PYX_ERR(17, 3824, __pyx_L1_error)
              }
              __pyx_t_9 = __pyx_v_self->sp_batch;
              __pyx_v_inner_batch = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_9);
            }
            __pyx_L4:;

            /* "pyarrow/table.pxi":3812
 *             ArrowSchema* c_schema
 * 
 *         if requested_schema is not None:             # <<<<<<<<<<<<<<
 *             target_schema = Schema._import_from_c_capsule(requested_schema)
 * 
*/
            goto __pyx_L3;
          }

          /* "pyarrow/table.pxi":3826
 *                 inner_batch = self.sp_batch
 *         else:
 *             inner_batch = self.sp_batch             # <<<<<<<<<<<<<<
 * 
 *         schema_capsule = alloc_c_schema(&c_schema)
*/
          /*else*/ {
            if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_batch");
              __PYX_ERR(17, 3826, __pyx_L1_error)
            }
            __pyx_t_9 = __pyx_v_self->sp_batch;
            __pyx_v_inner_batch = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_9);
          }
          __pyx_L3:;

          /* "pyarrow/table.pxi":3828
 *             inner_batch = self.sp_batch
 * 
 *         schema_capsule = alloc_c_schema(&c_schema)             # <<<<<<<<<<<<<<
 *         array_capsule = alloc_c_array(&c_array)
 * 
*/
          __pyx_t_3 = __pyx_f_7pyarrow_3lib_alloc_c_schema((&__pyx_v_c_schema)); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 3828, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_v_schema_capsule = __pyx_t_3;
          __pyx_t_3 = 0;

          /* "pyarrow/table.pxi":3829
 * 
 *         schema_capsule = alloc_c_schema(&c_schema)
 *         array_capsule = alloc_c_array(&c_array)             # <<<<<<<<<<<<<<
 * 
 *         with nogil:
*/
          __pyx_t_3 = __pyx_f_7pyarrow_3lib_alloc_c_array((&__pyx_v_c_array)); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 3829, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_v_array_capsule = __pyx_t_3;
          __pyx_t_3 = 0;

          /* "pyarrow/table.pxi":3831
 *         array_capsule = alloc_c_array(&c_array)
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             check_status(ExportRecordBatch(deref(inner_batch), c_array, c_schema))
 * 
*/
          {
              PyThreadState * _save;
              _save = PyEval_SaveThread();
              __Pyx_FastGIL_Remember();
              /*try:*/ {

                /* "pyarrow/table.pxi":3832
 * 
 *         with nogil:
 *             check_status(ExportRecordBatch(deref(inner_batch), c_array, c_schema))             # <<<<<<<<<<<<<<
 * 
 *         return schema_capsule, array_capsule
*/
                __pyx_t_18 = __pyx_f_7pyarrow_3lib_check_status(arrow::ExportRecordBatch((*__pyx_v_inner_batch), __pyx_v_c_array, __pyx_v_c_schema)); if (unlikely(__pyx_t_18 == ((int)-1))) __PYX_ERR(17, 3832, __pyx_L23_error)
              }

              /* "pyarrow/table.pxi":3831
 *         array_capsule = alloc_c_array(&c_array)
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             check_status(ExportRecordBatch(deref(inner_batch), c_array, c_schema))
 * 
*/
              /*finally:*/ {
                /*normal exit:*/{
                  __Pyx_FastGIL_Forget();
                  PyEval_RestoreThread(_save);
                  goto __pyx_L24;
                }
                __pyx_L23_error: {
                  __Pyx_FastGIL_Forget();
                  PyEval_RestoreThread(_save);
                  goto __pyx_L1_error;
                }
                __pyx_L24:;
              }
          }

          /* "pyarrow/table.pxi":3834
 *             check_status(ExportRecordBatch(deref(inner_batch), c_array, c_schema))
 * 
 *         return schema_capsule, array_capsule             # <<<<<<<<<<<<<<
 * 
 *     def __arrow_c_stream__(self, requested_schema=None):
*/
          __Pyx_XDECREF(__pyx_r);
          __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 3834, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_INCREF(__pyx_v_schema_capsule);
          __Pyx_GIVEREF(__pyx_v_schema_capsule);
          if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_schema_capsule) != (0)) __PYX_ERR(17, 3834, __pyx_L1_error);
          __Pyx_INCREF(__pyx_v_array_capsule);
          __Pyx_GIVEREF(__pyx_v_array_capsule);
          if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_array_capsule) != (0)) __PYX_ERR(17, 3834, __pyx_L1_error);
          __pyx_r = __pyx_t_3;
          __pyx_t_3 = 0;
          goto __pyx_L0;

          /* "pyarrow/table.pxi":3789
 *         return pyarrow_wrap_batch(c_batch)
 * 
 *     def __arrow_c_array__(self, requested_schema=None):             # <<<<<<<<<<<<<<
 *         """
 *         Get a pair of PyCapsules containing a C ArrowArray representation of the object.
*/

          /* function exit code */
          __pyx_L1_error:;
          __Pyx_XDECREF(__pyx_t_2);
          __Pyx_XDECREF(__pyx_t_3);
          __Pyx_XDECREF(__pyx_t_8);
          __Pyx_XDECREF(__pyx_t_10);
          __Pyx_XDECREF(__pyx_t_12);
          __Pyx_XDECREF(__pyx_t_13);
          __Pyx_XDECREF(__pyx_t_14);
          __Pyx_XDECREF(__pyx_t_15);
          __Pyx_XDECREF(__pyx_t_17);
          __Pyx_AddTraceback("pyarrow.lib.RecordBatch.__arrow_c_array__", __pyx_clineno, __pyx_lineno, __pyx_filename);
          __pyx_r = NULL;
          __pyx_L0:;
          __Pyx_XDECREF(__pyx_v_target_schema);
          __Pyx_XDECREF(__pyx_v_casted_batch);
          __Pyx_XDECREF(__pyx_v_e);
          __Pyx_XDECREF(__pyx_v_schema_capsule);
          __Pyx_XDECREF(__pyx_v_array_capsule);
          __Pyx_XGIVEREF(__pyx_r);
          __Pyx_RefNannyFinishContext();
          return __pyx_r;
        }

        /* "pyarrow/table.pxi":3836
 *         return schema_capsule, array_capsule
 * 
 *     def __arrow_c_stream__(self, requested_schema=None):             # <<<<<<<<<<<<<<
 *         """
 *         Export the batch as an Arrow C stream PyCapsule.
*/

        /* Python wrapper */
        static PyObject *__pyx_pw_7pyarrow_3lib_11RecordBatch_55__arrow_c_stream__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
        PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_11RecordBatch_54__arrow_c_stream__, "RecordBatch.__arrow_c_stream__(self, requested_schema=None)\n\nExport the batch as an Arrow C stream PyCapsule.\n\nParameters\n----------\nrequested_schema : PyCapsule, default None\n    The schema to which the stream should be casted, passed as a\n    PyCapsule containing a C ArrowSchema representation of the\n    requested schema.\n    Currently, this is not supported and will raise a\n    NotImplementedError if the schema doesn't match the current schema.\n\nReturns\n-------\nPyCapsule");
        static PyMethodDef __pyx_mdef_7pyarrow_3lib_11RecordBatch_55__arrow_c_stream__ = {"__arrow_c_stream__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_11RecordBatch_55__arrow_c_stream__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_11RecordBatch_54__arrow_c_stream__};
        static PyObject *__pyx_pw_7pyarrow_3lib_11RecordBatch_55__arrow_c_stream__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
          PyObject *__pyx_v_requested_schema = 0;
          #if !CYTHON_METH_FASTCALL
          CYTHON_UNUSED Py_ssize_t __pyx_nargs;
          #endif
          CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
          PyObject* values[1] = {0};
          int __pyx_lineno = 0;
          const char *__pyx_filename = NULL;
          int __pyx_clineno = 0;
          PyObject *__pyx_r = 0;
          __Pyx_RefNannyDeclarations
          __Pyx_RefNannySetupContext("__arrow_c_stream__ (wrapper)", 0);
          #if !CYTHON_METH_FASTCALL
          #if CYTHON_ASSUME_SAFE_SIZE
          __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
          #else
          __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
          #endif
          #endif
          __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
          {
            PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_requested_schema,0};
            const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
            if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(17, 3836, __pyx_L3_error)
            if (__pyx_kwds_len > 0) {
              switch (__pyx_nargs) {
                case  1:
                values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 3836, __pyx_L3_error)
                CYTHON_FALLTHROUGH;
                case  0: break;
                default: goto __pyx_L5_argtuple_error;
              }
              const Py_ssize_t kwd_pos_args = __pyx_nargs;
              if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__arrow_c_stream__", 0) < (0)) __PYX_ERR(17, 3836, __pyx_L3_error)
              if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
            } else {
              switch (__pyx_nargs) {
                case  1:
                values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 3836, __pyx_L3_error)
                CYTHON_FALLTHROUGH;
                case  0: break;
                default: goto __pyx_L5_argtuple_error;
              }
              if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
            }
            __pyx_v_requested_schema = values[0];
          }
          goto __pyx_L6_skip;
          __pyx_L5_argtuple_error:;
          __Pyx_RaiseArgtupleInvalid("__arrow_c_stream__", 0, 0, 1, __pyx_nargs); __PYX_ERR(17, 3836, __pyx_L3_error)
          __pyx_L6_skip:;
          goto __pyx_L4_argument_unpacking_done;
          __pyx_L3_error:;
          for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
            Py_XDECREF(values[__pyx_temp]);
          }
          __Pyx_AddTraceback("pyarrow.lib.RecordBatch.__arrow_c_stream__", __pyx_clineno, __pyx_lineno, __pyx_filename);
          __Pyx_RefNannyFinishContext();
          return NULL;
          __pyx_L4_argument_unpacking_done:;
          __pyx_r = __pyx_pf_7pyarrow_3lib_11RecordBatch_54__arrow_c_stream__(((struct __pyx_obj_7pyarrow_3lib_RecordBatch *)__pyx_v_self), __pyx_v_requested_schema);

          /* function exit code */
          for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
            Py_XDECREF(values[__pyx_temp]);
          }
          __Pyx_RefNannyFinishContext();
          return __pyx_r;
        }

        static PyObject *__pyx_pf_7pyarrow_3lib_11RecordBatch_54__arrow_c_stream__(struct __pyx_obj_7pyarrow_3lib_RecordBatch *__pyx_v_self, PyObject *__pyx_v_requested_schema) {
          PyObject *__pyx_r = NULL;
          __Pyx_RefNannyDeclarations
          PyObject *__pyx_t_1 = NULL;
          PyObject *__pyx_t_2 = NULL;
          PyObject *__pyx_t_3 = NULL;
          PyObject *__pyx_t_4 = NULL;
          PyObject *__pyx_t_5 = NULL;
          size_t __pyx_t_6;
          int __pyx_lineno = 0;
          const char *__pyx_filename = NULL;
          int __pyx_clineno = 0;
          __Pyx_RefNannySetupContext("__arrow_c_stream__", 0);

          /* "pyarrow/table.pxi":3853
 *         PyCapsule
 *         """
 *         self._assert_cpu()             # <<<<<<<<<<<<<<
 *         return Table.from_batches([self]).__arrow_c_stream__(requested_schema)
 * 
*/
          if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
            PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_assert_cpu");
            __PYX_ERR(17, 3853, __pyx_L1_error)
          }
          ((struct __pyx_vtabstruct_7pyarrow_3lib_RecordBatch *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._assert_cpu(((struct __pyx_obj_7pyarrow_3lib__Tabular *)__pyx_v_self)); if (unlikely(PyErr_Occurred())) __PYX_ERR(17, 3853, __pyx_L1_error)

          /* "pyarrow/table.pxi":3854
 *         """
 *         self._assert_cpu()
 *         return Table.from_batches([self]).__arrow_c_stream__(requested_schema)             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
*/
          __Pyx_XDECREF(__pyx_r);
          __pyx_t_4 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Table);
          __Pyx_INCREF(__pyx_t_4);
          __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 3854, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_INCREF((PyObject *)__pyx_v_self);
          __Pyx_GIVEREF((PyObject *)__pyx_v_self);
          if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_self)) != (0)) __PYX_ERR(17, 3854, __pyx_L1_error);
          __pyx_t_6 = 0;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_5};
            __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_from_batches, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
            if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 3854, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
          }
          __pyx_t_2 = __pyx_t_3;
          __Pyx_INCREF(__pyx_t_2);
          __pyx_t_6 = 0;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_requested_schema};
            __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_arrow_c_stream, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 3854, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_1);
          }
          __pyx_r = __pyx_t_1;
          __pyx_t_1 = 0;
          goto __pyx_L0;

          /* "pyarrow/table.pxi":3836
 *         return schema_capsule, array_capsule
 * 
 *     def __arrow_c_stream__(self, requested_schema=None):             # <<<<<<<<<<<<<<
 *         """
 *         Export the batch as an Arrow C stream PyCapsule.
*/

          /* function exit code */
          __pyx_L1_error:;
          __Pyx_XDECREF(__pyx_t_1);
          __Pyx_XDECREF(__pyx_t_2);
          __Pyx_XDECREF(__pyx_t_3);
          __Pyx_XDECREF(__pyx_t_4);
          __Pyx_XDECREF(__pyx_t_5);
          __Pyx_AddTraceback("pyarrow.lib.RecordBatch.__arrow_c_stream__", __pyx_clineno, __pyx_lineno, __pyx_filename);
          __pyx_r = NULL;
          __pyx_L0:;
          __Pyx_XGIVEREF(__pyx_r);
          __Pyx_RefNannyFinishContext();
          return __pyx_r;
        }

        /* "pyarrow/table.pxi":3856
 *         return Table.from_batches([self]).__arrow_c_stream__(requested_schema)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def _import_from_c_capsule(schema_capsule, array_capsule):
 *         """
*/

        /* Python wrapper */
        static PyObject *__pyx_pw_7pyarrow_3lib_11RecordBatch_57_import_from_c_capsule(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
        PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_11RecordBatch_56_import_from_c_capsule, "RecordBatch._import_from_c_capsule(schema_capsule, array_capsule)\n\nImport RecordBatch from a pair of PyCapsules containing a C ArrowSchema\nand ArrowArray, respectively.\n\nParameters\n----------\nschema_capsule : PyCapsule\n    A PyCapsule containing a C ArrowSchema representation of the schema.\narray_capsule : PyCapsule\n    A PyCapsule containing a C ArrowArray representation of the array.\n\nReturns\n-------\npyarrow.RecordBatch");
        static PyMethodDef __pyx_mdef_7pyarrow_3lib_11RecordBatch_57_import_from_c_capsule = {"_import_from_c_capsule", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_11RecordBatch_57_import_from_c_capsule, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_11RecordBatch_56_import_from_c_capsule};
        static PyObject *__pyx_pw_7pyarrow_3lib_11RecordBatch_57_import_from_c_capsule(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
          PyObject *__pyx_v_schema_capsule = 0;
          PyObject *__pyx_v_array_capsule = 0;
          #if !CYTHON_METH_FASTCALL
          CYTHON_UNUSED Py_ssize_t __pyx_nargs;
          #endif
          CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
          PyObject* values[2] = {0,0};
          int __pyx_lineno = 0;
          const char *__pyx_filename = NULL;
          int __pyx_clineno = 0;
          PyObject *__pyx_r = 0;
          __Pyx_RefNannyDeclarations
          __Pyx_RefNannySetupContext("_import_from_c_capsule (wrapper)", 0);
          #if !CYTHON_METH_FASTCALL
          #if CYTHON_ASSUME_SAFE_SIZE
          __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
          #else
          __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
          #endif
          #endif
          __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
          {
            PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_schema_capsule,&__pyx_mstate_global->__pyx_n_u_array_capsule,0};
            const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
            if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(17, 3856, __pyx_L3_error)
            if (__pyx_kwds_len > 0) {
              switch (__pyx_nargs) {
                case  2:
                values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(17, 3856, __pyx_L3_error)
                CYTHON_FALLTHROUGH;
                case  1:
                values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 3856, __pyx_L3_error)
                CYTHON_FALLTHROUGH;
                case  0: break;
                default: goto __pyx_L5_argtuple_error;
              }
              const Py_ssize_t kwd_pos_args = __pyx_nargs;
              if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_import_from_c_capsule", 0) < (0)) __PYX_ERR(17, 3856, __pyx_L3_error)
              for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
                if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_import_from_c_capsule", 1, 2, 2, i); __PYX_ERR(17, 3856, __pyx_L3_error) }
              }
            } else if (unlikely(__pyx_nargs != 2)) {
              goto __pyx_L5_argtuple_error;
            } else {
              values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
              if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 3856, __pyx_L3_error)
              values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
              if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(17, 3856, __pyx_L3_error)
            }
            __pyx_v_schema_capsule = values[0];
            __pyx_v_array_capsule = values[1];
          }
          goto __pyx_L6_skip;
          __pyx_L5_argtuple_error:;
          __Pyx_RaiseArgtupleInvalid("_import_from_c_capsule", 1, 2, 2, __pyx_nargs); __PYX_ERR(17, 3856, __pyx_L3_error)
          __pyx_L6_skip:;
          goto __pyx_L4_argument_unpacking_done;
          __pyx_L3_error:;
          for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
            Py_XDECREF(values[__pyx_temp]);
          }
          __Pyx_AddTraceback("pyarrow.lib.RecordBatch._import_from_c_capsule", __pyx_clineno, __pyx_lineno, __pyx_filename);
          __Pyx_RefNannyFinishContext();
          return NULL;
          __pyx_L4_argument_unpacking_done:;
          __pyx_r = __pyx_pf_7pyarrow_3lib_11RecordBatch_56_import_from_c_capsule(__pyx_v_schema_capsule, __pyx_v_array_capsule);

          /* function exit code */
          for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
            Py_XDECREF(values[__pyx_temp]);
          }
          __Pyx_RefNannyFinishContext();
          return __pyx_r;
        }

        static PyObject *__pyx_pf_7pyarrow_3lib_11RecordBatch_56_import_from_c_capsule(PyObject *__pyx_v_schema_capsule, PyObject *__pyx_v_array_capsule) {
          struct ArrowSchema *__pyx_v_c_schema;
          struct ArrowArray *__pyx_v_c_array;
          std::shared_ptr< arrow::RecordBatch>  __pyx_v_c_batch;
          PyObject *__pyx_r = NULL;
          __Pyx_RefNannyDeclarations
          void *__pyx_t_1;
          std::shared_ptr< arrow::RecordBatch>  __pyx_t_2;
          PyObject *__pyx_t_3 = NULL;
          int __pyx_lineno = 0;
          const char *__pyx_filename = NULL;
          int __pyx_clineno = 0;
          __Pyx_RefNannySetupContext("_import_from_c_capsule", 0);

          /* "pyarrow/table.pxi":3878
 *             shared_ptr[CRecordBatch] c_batch
 * 
 *         c_schema = <ArrowSchema*> PyCapsule_GetPointer(schema_capsule, 'arrow_schema')             # <<<<<<<<<<<<<<
 *         c_array = <ArrowArray*> PyCapsule_GetPointer(array_capsule, 'arrow_array')
 * 
*/
          __pyx_t_1 = PyCapsule_GetPointer(__pyx_v_schema_capsule, __pyx_k_arrow_schema); if (unlikely(__pyx_t_1 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(17, 3878, __pyx_L1_error)
          __pyx_v_c_schema = ((struct ArrowSchema *)__pyx_t_1);

          /* "pyarrow/table.pxi":3879
 * 
 *         c_schema = <ArrowSchema*> PyCapsule_GetPointer(schema_capsule, 'arrow_schema')
 *         c_array = <ArrowArray*> PyCapsule_GetPointer(array_capsule, 'arrow_array')             # <<<<<<<<<<<<<<
 * 
 *         with nogil:
*/
          __pyx_t_1 = PyCapsule_GetPointer(__pyx_v_array_capsule, __pyx_k_arrow_array); if (unlikely(__pyx_t_1 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(17, 3879, __pyx_L1_error)
          __pyx_v_c_array = ((struct ArrowArray *)__pyx_t_1);

          /* "pyarrow/table.pxi":3881
 *         c_array = <ArrowArray*> PyCapsule_GetPointer(array_capsule, 'arrow_array')
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             c_batch = GetResultValue(ImportRecordBatch(c_array, c_schema))
 * 
*/
          {
              PyThreadState * _save;
              _save = PyEval_SaveThread();
              __Pyx_FastGIL_Remember();
              /*try:*/ {

                /* "pyarrow/table.pxi":3882
 * 
 *         with nogil:
 *             c_batch = GetResultValue(ImportRecordBatch(c_array, c_schema))             # <<<<<<<<<<<<<<
 * 
 *         return pyarrow_wrap_batch(c_batch)
*/
                __pyx_t_2 = arrow::py::GetResultValue<std::shared_ptr< arrow::RecordBatch> >(arrow::ImportRecordBatch(__pyx_v_c_array, __pyx_v_c_schema)); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(17, 3882, __pyx_L4_error)
                __pyx_v_c_batch = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_2);
              }

              /* "pyarrow/table.pxi":3881
 *         c_array = <ArrowArray*> PyCapsule_GetPointer(array_capsule, 'arrow_array')
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             c_batch = GetResultValue(ImportRecordBatch(c_array, c_schema))
 * 
*/
              /*finally:*/ {
                /*normal exit:*/{
                  __Pyx_FastGIL_Forget();
                  PyEval_RestoreThread(_save);
                  goto __pyx_L5;
                }
                __pyx_L4_error: {
                  __Pyx_FastGIL_Forget();
                  PyEval_RestoreThread(_save);
                  goto __pyx_L1_error;
                }
                __pyx_L5:;
              }
          }

          /* "pyarrow/table.pxi":3884
 *             c_batch = GetResultValue(ImportRecordBatch(c_array, c_schema))
 * 
 *         return pyarrow_wrap_batch(c_batch)             # <<<<<<<<<<<<<<
 * 
 *     def _export_to_c_device(self, out_ptr, out_schema_ptr=0):
*/
          __Pyx_XDECREF(__pyx_r);
          __pyx_t_3 = pyarrow_wrap_batch(__pyx_v_c_batch); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 3884, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_r = __pyx_t_3;
          __pyx_t_3 = 0;
          goto __pyx_L0;

          /* "pyarrow/table.pxi":3856
 *         return Table.from_batches([self]).__arrow_c_stream__(requested_schema)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def _import_from_c_capsule(schema_capsule, array_capsule):
 *         """
*/

          /* function exit code */
          __pyx_L1_error:;
          __Pyx_XDECREF(__pyx_t_3);
          __Pyx_AddTraceback("pyarrow.lib.RecordBatch._import_from_c_capsule", __pyx_clineno, __pyx_lineno, __pyx_filename);
          __pyx_r = NULL;
          __pyx_L0:;
          __Pyx_XGIVEREF(__pyx_r);
          __Pyx_RefNannyFinishContext();
          return __pyx_r;
        }

        /* "pyarrow/table.pxi":3886
 *         return pyarrow_wrap_batch(c_batch)
 * 
 *     def _export_to_c_device(self, out_ptr, out_schema_ptr=0):             # <<<<<<<<<<<<<<
 *         """
 *         Export to a C ArrowDeviceArray struct, given its pointer.
*/

        /* Python wrapper */
        static PyObject *__pyx_pw_7pyarrow_3lib_11RecordBatch_59_export_to_c_device(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
        PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_11RecordBatch_58_export_to_c_device, "RecordBatch._export_to_c_device(self, out_ptr, out_schema_ptr=0)\n\nExport to a C ArrowDeviceArray struct, given its pointer.\n\nIf a C ArrowSchema struct pointer is also given, the record batch\nschema is exported to it at the same time.\n\nParameters\n----------\nout_ptr: int\n    The raw pointer to a C ArrowDeviceArray struct.\nout_schema_ptr: int (optional)\n    The raw pointer to a C ArrowSchema struct.\n\nBe careful: if you don't pass the ArrowDeviceArray struct to a consumer,\narray memory will leak.  This is a low-level function intended for\nexpert users.");
        static PyMethodDef __pyx_mdef_7pyarrow_3lib_11RecordBatch_59_export_to_c_device = {"_export_to_c_device", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_11RecordBatch_59_export_to_c_device, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_11RecordBatch_58_export_to_c_device};
        static PyObject *__pyx_pw_7pyarrow_3lib_11RecordBatch_59_export_to_c_device(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
          PyObject *__pyx_v_out_ptr = 0;
          PyObject *__pyx_v_out_schema_ptr = 0;
          #if !CYTHON_METH_FASTCALL
          CYTHON_UNUSED Py_ssize_t __pyx_nargs;
          #endif
          CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
          PyObject* values[2] = {0,0};
          int __pyx_lineno = 0;
          const char *__pyx_filename = NULL;
          int __pyx_clineno = 0;
          PyObject *__pyx_r = 0;
          __Pyx_RefNannyDeclarations
          __Pyx_RefNannySetupContext("_export_to_c_device (wrapper)", 0);
          #if !CYTHON_METH_FASTCALL
          #if CYTHON_ASSUME_SAFE_SIZE
          __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
          #else
          __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
          #endif
          #endif
          __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
          {
            PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_out_ptr,&__pyx_mstate_global->__pyx_n_u_out_schema_ptr,0};
            const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
            if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(17, 3886, __pyx_L3_error)
            if (__pyx_kwds_len > 0) {
              switch (__pyx_nargs) {
                case  2:
                values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(17, 3886, __pyx_L3_error)
                CYTHON_FALLTHROUGH;
                case  1:
                values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 3886, __pyx_L3_error)
                CYTHON_FALLTHROUGH;
                case  0: break;
                default: goto __pyx_L5_argtuple_error;
              }
              const Py_ssize_t kwd_pos_args = __pyx_nargs;
              if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_export_to_c_device", 0) < (0)) __PYX_ERR(17, 3886, __pyx_L3_error)
              if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_int_0));
              for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_export_to_c_device", 0, 1, 2, i); __PYX_ERR(17, 3886, __pyx_L3_error) }
              }
            } else {
              switch (__pyx_nargs) {
                case  2:
                values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(17, 3886, __pyx_L3_error)
                CYTHON_FALLTHROUGH;
                case  1:
                values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 3886, __pyx_L3_error)
                break;
                default: goto __pyx_L5_argtuple_error;
              }
              if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_int_0));
            }
            __pyx_v_out_ptr = values[0];
            __pyx_v_out_schema_ptr = values[1];
          }
          goto __pyx_L6_skip;
          __pyx_L5_argtuple_error:;
          __Pyx_RaiseArgtupleInvalid("_export_to_c_device", 0, 1, 2, __pyx_nargs); __PYX_ERR(17, 3886, __pyx_L3_error)
          __pyx_L6_skip:;
          goto __pyx_L4_argument_unpacking_done;
          __pyx_L3_error:;
          for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
            Py_XDECREF(values[__pyx_temp]);
          }
          __Pyx_AddTraceback("pyarrow.lib.RecordBatch._export_to_c_device", __pyx_clineno, __pyx_lineno, __pyx_filename);
          __Pyx_RefNannyFinishContext();
          return NULL;
          __pyx_L4_argument_unpacking_done:;
          __pyx_r = __pyx_pf_7pyarrow_3lib_11RecordBatch_58_export_to_c_device(((struct __pyx_obj_7pyarrow_3lib_RecordBatch *)__pyx_v_self), __pyx_v_out_ptr, __pyx_v_out_schema_ptr);

          /* function exit code */
          for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
            Py_XDECREF(values[__pyx_temp]);
          }
          __Pyx_RefNannyFinishContext();
          return __pyx_r;
        }

        static PyObject *__pyx_pf_7pyarrow_3lib_11RecordBatch_58_export_to_c_device(struct __pyx_obj_7pyarrow_3lib_RecordBatch *__pyx_v_self, PyObject *__pyx_v_out_ptr, PyObject *__pyx_v_out_schema_ptr) {
          void *__pyx_v_c_ptr;
          void *__pyx_v_c_schema_ptr;
          PyObject *__pyx_r = NULL;
          __Pyx_RefNannyDeclarations
          void *__pyx_t_1;
          struct __pyx_opt_args_7pyarrow_3lib__as_c_pointer __pyx_t_2;
          int __pyx_t_3;
          int __pyx_lineno = 0;
          const char *__pyx_filename = NULL;
          int __pyx_clineno = 0;
          __Pyx_RefNannySetupContext("_export_to_c_device", 0);

          /* "pyarrow/table.pxi":3905
 *         """
 *         cdef:
 *             void* c_ptr = _as_c_pointer(out_ptr)             # <<<<<<<<<<<<<<
 *             void* c_schema_ptr = _as_c_pointer(out_schema_ptr,
 *                                                allow_null=True)
*/
          __pyx_t_1 = __pyx_f_7pyarrow_3lib__as_c_pointer(__pyx_v_out_ptr, NULL); if (unlikely(__pyx_t_1 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(17, 3905, __pyx_L1_error)
          __pyx_v_c_ptr = __pyx_t_1;

          /* "pyarrow/table.pxi":3906
 *         cdef:
 *             void* c_ptr = _as_c_pointer(out_ptr)
 *             void* c_schema_ptr = _as_c_pointer(out_schema_ptr,             # <<<<<<<<<<<<<<
 *                                                allow_null=True)
 *         with nogil:
*/
          __pyx_t_2.__pyx_n = 1;
          __pyx_t_2.allow_null = Py_True;
          __pyx_t_1 = __pyx_f_7pyarrow_3lib__as_c_pointer(__pyx_v_out_schema_ptr, &__pyx_t_2); if (unlikely(__pyx_t_1 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(17, 3906, __pyx_L1_error)
          __pyx_v_c_schema_ptr = __pyx_t_1;

          /* "pyarrow/table.pxi":3908
 *             void* c_schema_ptr = _as_c_pointer(out_schema_ptr,
 *                                                allow_null=True)
 *         with nogil:             # <<<<<<<<<<<<<<
 *             check_status(ExportDeviceRecordBatch(
 *                 deref(self.sp_batch), <shared_ptr[CSyncEvent]>NULL,
*/
          {
              PyThreadState * _save;
              _save = PyEval_SaveThread();
              __Pyx_FastGIL_Remember();
              /*try:*/ {

                /* "pyarrow/table.pxi":3910
 *         with nogil:
 *             check_status(ExportDeviceRecordBatch(
 *                 deref(self.sp_batch), <shared_ptr[CSyncEvent]>NULL,             # <<<<<<<<<<<<<<
 *                 <ArrowDeviceArray*> c_ptr, <ArrowSchema*> c_schema_ptr)
 *             )
*/
                if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                  PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_batch");
                  __Pyx_PyGILState_Release(__pyx_gilstate_save);
                  __PYX_ERR(17, 3910, __pyx_L4_error)
                }

                /* "pyarrow/table.pxi":3909
 *                                                allow_null=True)
 *         with nogil:
 *             check_status(ExportDeviceRecordBatch(             # <<<<<<<<<<<<<<
 *                 deref(self.sp_batch), <shared_ptr[CSyncEvent]>NULL,
 *                 <ArrowDeviceArray*> c_ptr, <ArrowSchema*> c_schema_ptr)
*/
                __pyx_t_3 = __pyx_f_7pyarrow_3lib_check_status(arrow::ExportDeviceRecordBatch((*__pyx_v_self->sp_batch), ((std::shared_ptr< arrow::Device::SyncEvent> )NULL), ((struct ArrowDeviceArray *)__pyx_v_c_ptr), ((struct ArrowSchema *)__pyx_v_c_schema_ptr))); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(17, 3909, __pyx_L4_error)
              }

              /* "pyarrow/table.pxi":3908
 *             void* c_schema_ptr = _as_c_pointer(out_schema_ptr,
 *                                                allow_null=True)
 *         with nogil:             # <<<<<<<<<<<<<<
 *             check_status(ExportDeviceRecordBatch(
 *                 deref(self.sp_batch), <shared_ptr[CSyncEvent]>NULL,
*/
              /*finally:*/ {
                /*normal exit:*/{
                  __Pyx_FastGIL_Forget();
                  PyEval_RestoreThread(_save);
                  goto __pyx_L5;
                }
                __pyx_L4_error: {
                  __Pyx_FastGIL_Forget();
                  PyEval_RestoreThread(_save);
                  goto __pyx_L1_error;
                }
                __pyx_L5:;
              }
          }

          /* "pyarrow/table.pxi":3886
 *         return pyarrow_wrap_batch(c_batch)
 * 
 *     def _export_to_c_device(self, out_ptr, out_schema_ptr=0):             # <<<<<<<<<<<<<<
 *         """
 *         Export to a C ArrowDeviceArray struct, given its pointer.
*/

          /* function exit code */
          __pyx_r = Py_None; __Pyx_INCREF(Py_None);
          goto __pyx_L0;
          __pyx_L1_error:;
          __Pyx_AddTraceback("pyarrow.lib.RecordBatch._export_to_c_device", __pyx_clineno, __pyx_lineno, __pyx_filename);
          __pyx_r = NULL;
          __pyx_L0:;
          __Pyx_XGIVEREF(__pyx_r);
          __Pyx_RefNannyFinishContext();
          return __pyx_r;
        }

        /* "pyarrow/table.pxi":3914
 *             )
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def _import_from_c_device(in_ptr, schema):
 *         """
*/

        /* Python wrapper */
        static PyObject *__pyx_pw_7pyarrow_3lib_11RecordBatch_61_import_from_c_device(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
        PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_11RecordBatch_60_import_from_c_device, "RecordBatch._import_from_c_device(in_ptr, schema)\n\nImport RecordBatch from a C ArrowDeviceArray struct, given its pointer\nand the imported schema.\n\nParameters\n----------\nin_ptr: int\n    The raw pointer to a C ArrowDeviceArray struct.\ntype: Schema or int\n    Either a Schema object, or the raw pointer to a C ArrowSchema\n    struct.\n\nThis is a low-level function intended for expert users.");
        static PyMethodDef __pyx_mdef_7pyarrow_3lib_11RecordBatch_61_import_from_c_device = {"_import_from_c_device", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_11RecordBatch_61_import_from_c_device, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_11RecordBatch_60_import_from_c_device};
        static PyObject *__pyx_pw_7pyarrow_3lib_11RecordBatch_61_import_from_c_device(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
          PyObject *__pyx_v_in_ptr = 0;
          PyObject *__pyx_v_schema = 0;
          #if !CYTHON_METH_FASTCALL
          CYTHON_UNUSED Py_ssize_t __pyx_nargs;
          #endif
          CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
          PyObject* values[2] = {0,0};
          int __pyx_lineno = 0;
          const char *__pyx_filename = NULL;
          int __pyx_clineno = 0;
          PyObject *__pyx_r = 0;
          __Pyx_RefNannyDeclarations
          __Pyx_RefNannySetupContext("_import_from_c_device (wrapper)", 0);
          #if !CYTHON_METH_FASTCALL
          #if CYTHON_ASSUME_SAFE_SIZE
          __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
          #else
          __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
          #endif
          #endif
          __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
          {
            PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_in_ptr,&__pyx_mstate_global->__pyx_n_u_schema,0};
            const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
            if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(17, 3914, __pyx_L3_error)
            if (__pyx_kwds_len > 0) {
              switch (__pyx_nargs) {
                case  2:
                values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(17, 3914, __pyx_L3_error)
                CYTHON_FALLTHROUGH;
                case  1:
                values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 3914, __pyx_L3_error)
                CYTHON_FALLTHROUGH;
                case  0: break;
                default: goto __pyx_L5_argtuple_error;
              }
              const Py_ssize_t kwd_pos_args = __pyx_nargs;
              if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_import_from_c_device", 0) < (0)) __PYX_ERR(17, 3914, __pyx_L3_error)
              for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
                if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_import_from_c_device", 1, 2, 2, i); __PYX_ERR(17, 3914, __pyx_L3_error) }
              }
            } else if (unlikely(__pyx_nargs != 2)) {
              goto __pyx_L5_argtuple_error;
            } else {
              values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
              if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 3914, __pyx_L3_error)
              values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
              if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(17, 3914, __pyx_L3_error)
            }
            __pyx_v_in_ptr = values[0];
            __pyx_v_schema = values[1];
          }
          goto __pyx_L6_skip;
          __pyx_L5_argtuple_error:;
          __Pyx_RaiseArgtupleInvalid("_import_from_c_device", 1, 2, 2, __pyx_nargs); __PYX_ERR(17, 3914, __pyx_L3_error)
          __pyx_L6_skip:;
          goto __pyx_L4_argument_unpacking_done;
          __pyx_L3_error:;
          for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
            Py_XDECREF(values[__pyx_temp]);
          }
          __Pyx_AddTraceback("pyarrow.lib.RecordBatch._import_from_c_device", __pyx_clineno, __pyx_lineno, __pyx_filename);
          __Pyx_RefNannyFinishContext();
          return NULL;
          __pyx_L4_argument_unpacking_done:;
          __pyx_r = __pyx_pf_7pyarrow_3lib_11RecordBatch_60_import_from_c_device(__pyx_v_in_ptr, __pyx_v_schema);

          /* function exit code */
          for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
            Py_XDECREF(values[__pyx_temp]);
          }
          __Pyx_RefNannyFinishContext();
          return __pyx_r;
        }

        static PyObject *__pyx_pf_7pyarrow_3lib_11RecordBatch_60_import_from_c_device(PyObject *__pyx_v_in_ptr, PyObject *__pyx_v_schema) {
          struct ArrowDeviceArray *__pyx_v_c_device_array;
          void *__pyx_v_c_schema_ptr;
          std::shared_ptr< arrow::RecordBatch>  __pyx_v_c_batch;
          std::shared_ptr< arrow::Schema>  __pyx_v_c_schema;
          PyObject *__pyx_r = NULL;
          __Pyx_RefNannyDeclarations
          void *__pyx_t_1;
          int __pyx_t_2;
          PyObject *__pyx_t_3 = NULL;
          PyObject *__pyx_t_4 = NULL;
          PyObject *__pyx_t_5 = NULL;
          size_t __pyx_t_6;
          std::shared_ptr< arrow::Schema>  __pyx_t_7;
          struct __pyx_opt_args_7pyarrow_3lib__as_c_pointer __pyx_t_8;
          std::shared_ptr< arrow::RecordBatch>  __pyx_t_9;
          int __pyx_lineno = 0;
          const char *__pyx_filename = NULL;
          int __pyx_clineno = 0;
          __Pyx_RefNannySetupContext("_import_from_c_device", 0);

          /* "pyarrow/table.pxi":3931
 *         """
 *         cdef:
 *             ArrowDeviceArray* c_device_array = <ArrowDeviceArray*>_as_c_pointer(in_ptr)             # <<<<<<<<<<<<<<
 *             void* c_schema_ptr
 *             shared_ptr[CRecordBatch] c_batch
*/
          __pyx_t_1 = __pyx_f_7pyarrow_3lib__as_c_pointer(__pyx_v_in_ptr, NULL); if (unlikely(__pyx_t_1 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(17, 3931, __pyx_L1_error)
          __pyx_v_c_device_array = ((struct ArrowDeviceArray *)__pyx_t_1);

          /* "pyarrow/table.pxi":3935
 *             shared_ptr[CRecordBatch] c_batch
 * 
 *         if c_device_array.device_type == ARROW_DEVICE_CUDA:             # <<<<<<<<<<<<<<
 *             _ensure_cuda_loaded()
 * 
*/
          __pyx_t_2 = (__pyx_v_c_device_array->device_type == ARROW_DEVICE_CUDA);
          if (__pyx_t_2) {

            /* "pyarrow/table.pxi":3936
 * 
 *         if c_device_array.device_type == ARROW_DEVICE_CUDA:
 *             _ensure_cuda_loaded()             # <<<<<<<<<<<<<<
 * 
 *         c_schema = pyarrow_unwrap_schema(schema)
*/
            __pyx_t_4 = NULL;
            __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_ensure_cuda_loaded); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 3936, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            __pyx_t_6 = 1;
            #if CYTHON_UNPACK_METHODS
            if (unlikely(PyMethod_Check(__pyx_t_5))) {
              __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
              assert(__pyx_t_4);
              PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
              __Pyx_INCREF(__pyx_t_4);
              __Pyx_INCREF(__pyx__function);
              __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
              __pyx_t_6 = 0;
            }
            #endif
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
              __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
              __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
              if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 3936, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_3);
            }
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

            /* "pyarrow/table.pxi":3935
 *             shared_ptr[CRecordBatch] c_batch
 * 
 *         if c_device_array.device_type == ARROW_DEVICE_CUDA:             # <<<<<<<<<<<<<<
 *             _ensure_cuda_loaded()
 * 
*/
          }

          /* "pyarrow/table.pxi":3938
 *             _ensure_cuda_loaded()
 * 
 *         c_schema = pyarrow_unwrap_schema(schema)             # <<<<<<<<<<<<<<
 *         if c_schema == nullptr:
 *             # Not a Schema object, perhaps a raw ArrowSchema pointer
*/
          __pyx_t_7 = pyarrow_unwrap_schema(__pyx_v_schema); if (unlikely(PyErr_Occurred())) __PYX_ERR(17, 3938, __pyx_L1_error)
          __pyx_v_c_schema = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_7);

          /* "pyarrow/table.pxi":3939
 * 
 *         c_schema = pyarrow_unwrap_schema(schema)
 *         if c_schema == nullptr:             # <<<<<<<<<<<<<<
 *             # Not a Schema object, perhaps a raw ArrowSchema pointer
 *             c_schema_ptr = _as_c_pointer(schema, allow_null=True)
*/
          __pyx_t_2 = ((__pyx_v_c_schema == nullptr) != 0);
          if (__pyx_t_2) {

            /* "pyarrow/table.pxi":3941
 *         if c_schema == nullptr:
 *             # Not a Schema object, perhaps a raw ArrowSchema pointer
 *             c_schema_ptr = _as_c_pointer(schema, allow_null=True)             # <<<<<<<<<<<<<<
 *             with nogil:
 *                 c_batch = GetResultValue(ImportDeviceRecordBatch(
*/
            __pyx_t_8.__pyx_n = 1;
            __pyx_t_8.allow_null = Py_True;
            __pyx_t_1 = __pyx_f_7pyarrow_3lib__as_c_pointer(__pyx_v_schema, &__pyx_t_8); if (unlikely(__pyx_t_1 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(17, 3941, __pyx_L1_error)
            __pyx_v_c_schema_ptr = __pyx_t_1;

            /* "pyarrow/table.pxi":3942
 *             # Not a Schema object, perhaps a raw ArrowSchema pointer
 *             c_schema_ptr = _as_c_pointer(schema, allow_null=True)
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 c_batch = GetResultValue(ImportDeviceRecordBatch(
 *                     c_device_array, <ArrowSchema*> c_schema_ptr))
*/
            {
                PyThreadState * _save;
                _save = PyEval_SaveThread();
                __Pyx_FastGIL_Remember();
                /*try:*/ {

                  /* "pyarrow/table.pxi":3943
 *             c_schema_ptr = _as_c_pointer(schema, allow_null=True)
 *             with nogil:
 *                 c_batch = GetResultValue(ImportDeviceRecordBatch(             # <<<<<<<<<<<<<<
 *                     c_device_array, <ArrowSchema*> c_schema_ptr))
 *         else:
*/
                  __pyx_t_9 = arrow::py::GetResultValue<std::shared_ptr< arrow::RecordBatch> >(arrow::ImportDeviceRecordBatch(__pyx_v_c_device_array, ((struct ArrowSchema *)__pyx_v_c_schema_ptr))); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(17, 3943, __pyx_L6_error)
                  __pyx_v_c_batch = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_9);
                }

                /* "pyarrow/table.pxi":3942
 *             # Not a Schema object, perhaps a raw ArrowSchema pointer
 *             c_schema_ptr = _as_c_pointer(schema, allow_null=True)
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 c_batch = GetResultValue(ImportDeviceRecordBatch(
 *                     c_device_array, <ArrowSchema*> c_schema_ptr))
*/
                /*finally:*/ {
                  /*normal exit:*/{
                    __Pyx_FastGIL_Forget();
                    PyEval_RestoreThread(_save);
                    goto __pyx_L7;
                  }
                  __pyx_L6_error: {
                    __Pyx_FastGIL_Forget();
                    PyEval_RestoreThread(_save);
                    goto __pyx_L1_error;
                  }
                  __pyx_L7:;
                }
            }

            /* "pyarrow/table.pxi":3939
 * 
 *         c_schema = pyarrow_unwrap_schema(schema)
 *         if c_schema == nullptr:             # <<<<<<<<<<<<<<
 *             # Not a Schema object, perhaps a raw ArrowSchema pointer
 *             c_schema_ptr = _as_c_pointer(schema, allow_null=True)
*/
            goto __pyx_L4;
          }

          /* "pyarrow/table.pxi":3946
 *                     c_device_array, <ArrowSchema*> c_schema_ptr))
 *         else:
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 c_batch = GetResultValue(ImportDeviceRecordBatch(
 *                     c_device_array, c_schema))
*/
          /*else*/ {
            {
                PyThreadState * _save;
                _save = PyEval_SaveThread();
                __Pyx_FastGIL_Remember();
                /*try:*/ {

                  /* "pyarrow/table.pxi":3947
 *         else:
 *             with nogil:
 *                 c_batch = GetResultValue(ImportDeviceRecordBatch(             # <<<<<<<<<<<<<<
 *                     c_device_array, c_schema))
 *         return pyarrow_wrap_batch(c_batch)
*/
                  __pyx_t_9 = arrow::py::GetResultValue<std::shared_ptr< arrow::RecordBatch> >(arrow::ImportDeviceRecordBatch(__pyx_v_c_device_array, __pyx_v_c_schema)); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(17, 3947, __pyx_L9_error)
                  __pyx_v_c_batch = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_9);
                }

                /* "pyarrow/table.pxi":3946
 *                     c_device_array, <ArrowSchema*> c_schema_ptr))
 *         else:
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 c_batch = GetResultValue(ImportDeviceRecordBatch(
 *                     c_device_array, c_schema))
*/
                /*finally:*/ {
                  /*normal exit:*/{
                    __Pyx_FastGIL_Forget();
                    PyEval_RestoreThread(_save);
                    goto __pyx_L10;
                  }
                  __pyx_L9_error: {
                    __Pyx_FastGIL_Forget();
                    PyEval_RestoreThread(_save);
                    goto __pyx_L1_error;
                  }
                  __pyx_L10:;
                }
            }
          }
          __pyx_L4:;

          /* "pyarrow/table.pxi":3949
 *                 c_batch = GetResultValue(ImportDeviceRecordBatch(
 *                     c_device_array, c_schema))
 *         return pyarrow_wrap_batch(c_batch)             # <<<<<<<<<<<<<<
 * 
 *     def __arrow_c_device_array__(self, requested_schema=None, **kwargs):
*/
          __Pyx_XDECREF(__pyx_r);
          __pyx_t_3 = pyarrow_wrap_batch(__pyx_v_c_batch); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 3949, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_r = __pyx_t_3;
          __pyx_t_3 = 0;
          goto __pyx_L0;

          /* "pyarrow/table.pxi":3914
 *             )
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def _import_from_c_device(in_ptr, schema):
 *         """
*/

          /* function exit code */
          __pyx_L1_error:;
          __Pyx_XDECREF(__pyx_t_3);
          __Pyx_XDECREF(__pyx_t_4);
          __Pyx_XDECREF(__pyx_t_5);
          __Pyx_AddTraceback("pyarrow.lib.RecordBatch._import_from_c_device", __pyx_clineno, __pyx_lineno, __pyx_filename);
          __pyx_r = NULL;
          __pyx_L0:;
          __Pyx_XGIVEREF(__pyx_r);
          __Pyx_RefNannyFinishContext();
          return __pyx_r;
        }

        /* "pyarrow/table.pxi":3951
 *         return pyarrow_wrap_batch(c_batch)
 * 
 *     def __arrow_c_device_array__(self, requested_schema=None, **kwargs):             # <<<<<<<<<<<<<<
 *         """
 *         Get a pair of PyCapsules containing a C ArrowDeviceArray representation
*/

        /* Python wrapper */
        static PyObject *__pyx_pw_7pyarrow_3lib_11RecordBatch_63__arrow_c_device_array__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
        PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_11RecordBatch_62__arrow_c_device_array__, "RecordBatch.__arrow_c_device_array__(self, requested_schema=None, **kwargs)\n\nGet a pair of PyCapsules containing a C ArrowDeviceArray representation\nof the object.\n\nParameters\n----------\nrequested_schema : PyCapsule | None\n    A PyCapsule containing a C ArrowSchema representation of a requested\n    schema. PyArrow will attempt to cast the batch to this data type.\n    If None, the batch will be returned as-is, with a type matching the\n    one returned by :meth:`__arrow_c_schema__()`.\nkwargs\n    Currently no additional keyword arguments are supported, but\n    this method will accept any keyword with a value of ``None``\n    for compatibility with future keywords.\n\nReturns\n-------\nTuple[PyCapsule, PyCapsule]\n    A pair of PyCapsules containing a C ArrowSchema and ArrowDeviceArray,\n    respectively.");
        static PyMethodDef __pyx_mdef_7pyarrow_3lib_11RecordBatch_63__arrow_c_device_array__ = {"__arrow_c_device_array__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_11RecordBatch_63__arrow_c_device_array__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_11RecordBatch_62__arrow_c_device_array__};
        static PyObject *__pyx_pw_7pyarrow_3lib_11RecordBatch_63__arrow_c_device_array__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
          PyObject *__pyx_v_requested_schema = 0;
          PyObject *__pyx_v_kwargs = 0;
          #if !CYTHON_METH_FASTCALL
          CYTHON_UNUSED Py_ssize_t __pyx_nargs;
          #endif
          CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
          PyObject* values[1] = {0};
          int __pyx_lineno = 0;
          const char *__pyx_filename = NULL;
          int __pyx_clineno = 0;
          PyObject *__pyx_r = 0;
          __Pyx_RefNannyDeclarations
          __Pyx_RefNannySetupContext("__arrow_c_device_array__ (wrapper)", 0);
          #if !CYTHON_METH_FASTCALL
          #if CYTHON_ASSUME_SAFE_SIZE
          __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
          #else
          __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
          #endif
          #endif
          __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
          __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
          __Pyx_GOTREF(__pyx_v_kwargs);
          {
            PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_requested_schema,0};
            const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
            if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(17, 3951, __pyx_L3_error)
            if (__pyx_kwds_len > 0) {
              switch (__pyx_nargs) {
                case  1:
                values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 3951, __pyx_L3_error)
                CYTHON_FALLTHROUGH;
                case  0: break;
                default: goto __pyx_L5_argtuple_error;
              }
              const Py_ssize_t kwd_pos_args = __pyx_nargs;
              if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, __pyx_v_kwargs, values, kwd_pos_args, __pyx_kwds_len, "__arrow_c_device_array__", 1) < (0)) __PYX_ERR(17, 3951, __pyx_L3_error)
              if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
            } else {
              switch (__pyx_nargs) {
                case  1:
                values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 3951, __pyx_L3_error)
                CYTHON_FALLTHROUGH;
                case  0: break;
                default: goto __pyx_L5_argtuple_error;
              }
              if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
            }
            __pyx_v_requested_schema = values[0];
          }
          goto __pyx_L6_skip;
          __pyx_L5_argtuple_error:;
          __Pyx_RaiseArgtupleInvalid("__arrow_c_device_array__", 0, 0, 1, __pyx_nargs); __PYX_ERR(17, 3951, __pyx_L3_error)
          __pyx_L6_skip:;
          goto __pyx_L4_argument_unpacking_done;
          __pyx_L3_error:;
          for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
            Py_XDECREF(values[__pyx_temp]);
          }
          __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
          __Pyx_AddTraceback("pyarrow.lib.RecordBatch.__arrow_c_device_array__", __pyx_clineno, __pyx_lineno, __pyx_filename);
          __Pyx_RefNannyFinishContext();
          return NULL;
          __pyx_L4_argument_unpacking_done:;
          __pyx_r = __pyx_pf_7pyarrow_3lib_11RecordBatch_62__arrow_c_device_array__(((struct __pyx_obj_7pyarrow_3lib_RecordBatch *)__pyx_v_self), __pyx_v_requested_schema, __pyx_v_kwargs);

          /* function exit code */
          for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
            Py_XDECREF(values[__pyx_temp]);
          }
          __Pyx_DECREF(__pyx_v_kwargs);
          __Pyx_RefNannyFinishContext();
          return __pyx_r;
        }

        static PyObject *__pyx_pf_7pyarrow_3lib_11RecordBatch_62__arrow_c_device_array__(struct __pyx_obj_7pyarrow_3lib_RecordBatch *__pyx_v_self, PyObject *__pyx_v_requested_schema, PyObject *__pyx_v_kwargs) {
          struct ArrowDeviceArray *__pyx_v_c_array;
          struct ArrowSchema *__pyx_v_c_schema;
          std::shared_ptr< arrow::RecordBatch>  __pyx_v_inner_batch;
          PyObject *__pyx_v_non_default_kwargs = NULL;
          PyObject *__pyx_v_target_schema = NULL;
          PyObject *__pyx_v_casted_batch = NULL;
          PyObject *__pyx_v_e = NULL;
          PyObject *__pyx_v_schema_capsule = NULL;
          PyObject *__pyx_v_array_capsule = NULL;
          PyObject *__pyx_9genexpr26__pyx_v_name = NULL;
          PyObject *__pyx_9genexpr26__pyx_v_value = NULL;
          PyObject *__pyx_r = NULL;
          __Pyx_RefNannyDeclarations
          PyObject *__pyx_t_1 = NULL;
          PyObject *__pyx_t_2 = NULL;
          Py_ssize_t __pyx_t_3;
          Py_ssize_t __pyx_t_4;
          int __pyx_t_5;
          PyObject *__pyx_t_6 = NULL;
          PyObject *__pyx_t_7 = NULL;
          int __pyx_t_8;
          int __pyx_t_9;
          size_t __pyx_t_10;
          int __pyx_t_11;
          PyObject *__pyx_t_12 = NULL;
          PyObject *__pyx_t_13 = NULL;
          PyObject *__pyx_t_14 = NULL;
          std::shared_ptr< arrow::RecordBatch>  __pyx_t_15;
          PyObject *__pyx_t_16 = NULL;
          PyObject *__pyx_t_17 = NULL;
          PyObject *__pyx_t_18 = NULL;
          PyObject *__pyx_t_19 = NULL;
          PyObject *__pyx_t_20[6];
          PyObject *__pyx_t_21 = NULL;
          char const *__pyx_t_22;
          PyObject *__pyx_t_23 = NULL;
          PyObject *__pyx_t_24 = NULL;
          PyObject *__pyx_t_25 = NULL;
          PyObject *__pyx_t_26 = NULL;
          PyObject *__pyx_t_27 = NULL;
          PyObject *__pyx_t_28 = NULL;
          int __pyx_lineno = 0;
          const char *__pyx_filename = NULL;
          int __pyx_clineno = 0;
          __Pyx_RefNannySetupContext("__arrow_c_device_array__", 0);

          /* "pyarrow/table.pxi":3979
 *             shared_ptr[CRecordBatch] inner_batch
 * 
 *         non_default_kwargs = [             # <<<<<<<<<<<<<<
 *             name for name, value in kwargs.items() if value is not None
 *         ]
*/
          { /* enter inner scope */
            __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 3979, __pyx_L5_error)
            __Pyx_GOTREF(__pyx_t_1);

            /* "pyarrow/table.pxi":3980
 * 
 *         non_default_kwargs = [
 *             name for name, value in kwargs.items() if value is not None             # <<<<<<<<<<<<<<
 *         ]
 *         if non_default_kwargs:
*/
            __pyx_t_3 = 0;
            __pyx_t_6 = __Pyx_dict_iterator(__pyx_v_kwargs, 1, __pyx_mstate_global->__pyx_n_u_items, (&__pyx_t_4), (&__pyx_t_5)); if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 3980, __pyx_L5_error)
            __Pyx_GOTREF(__pyx_t_6);
            __Pyx_XDECREF(__pyx_t_2);
            __pyx_t_2 = __pyx_t_6;
            __pyx_t_6 = 0;
            while (1) {
              __pyx_t_8 = __Pyx_dict_iter_next(__pyx_t_2, __pyx_t_4, &__pyx_t_3, &__pyx_t_6, &__pyx_t_7, NULL, __pyx_t_5);
              if (unlikely(__pyx_t_8 == 0)) break;
              if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(17, 3980, __pyx_L5_error)
              __Pyx_GOTREF(__pyx_t_6);
              __Pyx_GOTREF(__pyx_t_7);
              __Pyx_XDECREF_SET(__pyx_9genexpr26__pyx_v_name, __pyx_t_6);
              __pyx_t_6 = 0;
              __Pyx_XDECREF_SET(__pyx_9genexpr26__pyx_v_value, __pyx_t_7);
              __pyx_t_7 = 0;
              __pyx_t_9 = (__pyx_9genexpr26__pyx_v_value != Py_None);
              if (__pyx_t_9) {
                if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_9genexpr26__pyx_v_name))) __PYX_ERR(17, 3979, __pyx_L5_error)
              }
            }
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_9genexpr26__pyx_v_name); __pyx_9genexpr26__pyx_v_name = 0;
            __Pyx_XDECREF(__pyx_9genexpr26__pyx_v_value); __pyx_9genexpr26__pyx_v_value = 0;
            goto __pyx_L9_exit_scope;
            __pyx_L5_error:;
            __Pyx_XDECREF(__pyx_9genexpr26__pyx_v_name); __pyx_9genexpr26__pyx_v_name = 0;
            __Pyx_XDECREF(__pyx_9genexpr26__pyx_v_value); __pyx_9genexpr26__pyx_v_value = 0;
            goto __pyx_L1_error;
            __pyx_L9_exit_scope:;
          } /* exit inner scope */
          __pyx_v_non_default_kwargs = ((PyObject*)__pyx_t_1);
          __pyx_t_1 = 0;

          /* "pyarrow/table.pxi":3982
 *             name for name, value in kwargs.items() if value is not None
 *         ]
 *         if non_default_kwargs:             # <<<<<<<<<<<<<<
 *             raise NotImplementedError(
 *                 f"Received unsupported keyword argument(s): {non_default_kwargs}"
*/
          {
            Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_v_non_default_kwargs);
            if (unlikely(((!CYTHON_ASSUME_SAFE_SIZE) && __pyx_temp < 0))) __PYX_ERR(17, 3982, __pyx_L1_error)
            __pyx_t_9 = (__pyx_temp != 0);
          }

          if (unlikely(__pyx_t_9)) {

            /* "pyarrow/table.pxi":3983
 *         ]
 *         if non_default_kwargs:
 *             raise NotImplementedError(             # <<<<<<<<<<<<<<
 *                 f"Received unsupported keyword argument(s): {non_default_kwargs}"
 *             )
*/
            __pyx_t_2 = NULL;

            /* "pyarrow/table.pxi":3984
 *         if non_default_kwargs:
 *             raise NotImplementedError(
 *                 f"Received unsupported keyword argument(s): {non_default_kwargs}"             # <<<<<<<<<<<<<<
 *             )
 * 
*/
            __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_v_non_default_kwargs, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 3984, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_7);
            __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_Received_unsupported_keyword_arg, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 3984, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_6);
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
            __pyx_t_10 = 1;
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_6};
              __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_NotImplementedError)), __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
              if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 3983, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_1);
            }
            __Pyx_Raise(__pyx_t_1, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            __PYX_ERR(17, 3983, __pyx_L1_error)

            /* "pyarrow/table.pxi":3982
 *             name for name, value in kwargs.items() if value is not None
 *         ]
 *         if non_default_kwargs:             # <<<<<<<<<<<<<<
 *             raise NotImplementedError(
 *                 f"Received unsupported keyword argument(s): {non_default_kwargs}"
*/
          }

          /* "pyarrow/table.pxi":3987
 *             )
 * 
 *         if requested_schema is not None:             # <<<<<<<<<<<<<<
 *             target_schema = Schema._import_from_c_capsule(requested_schema)
 * 
*/
          __pyx_t_9 = (__pyx_v_requested_schema != Py_None);
          if (__pyx_t_9) {

            /* "pyarrow/table.pxi":3988
 * 
 *         if requested_schema is not None:
 *             target_schema = Schema._import_from_c_capsule(requested_schema)             # <<<<<<<<<<<<<<
 * 
 *             if target_schema != self.schema:
*/
            __pyx_t_6 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Schema);
            __Pyx_INCREF(__pyx_t_6);
            __pyx_t_10 = 0;
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_requested_schema};
              __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_import_from_c_capsule, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
              __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
              if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 3988, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_1);
            }
            __pyx_v_target_schema = __pyx_t_1;
            __pyx_t_1 = 0;

            /* "pyarrow/table.pxi":3990
 *             target_schema = Schema._import_from_c_capsule(requested_schema)
 * 
 *             if target_schema != self.schema:             # <<<<<<<<<<<<<<
 *                 if not self.is_cpu:
 *                     raise NotImplementedError(
*/
            __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_schema); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 3990, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_1);
            __pyx_t_6 = PyObject_RichCompare(__pyx_v_target_schema, __pyx_t_1, Py_NE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 3990, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(17, 3990, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            if (__pyx_t_9) {

              /* "pyarrow/table.pxi":3991
 * 
 *             if target_schema != self.schema:
 *                 if not self.is_cpu:             # <<<<<<<<<<<<<<
 *                     raise NotImplementedError(
 *                         "Casting to a requested schema is only supported for CPU data"
*/
              __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_is_cpu); if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 3991, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_6);
              __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(17, 3991, __pyx_L1_error)
              __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
              __pyx_t_11 = (!__pyx_t_9);
              if (unlikely(__pyx_t_11)) {

                /* "pyarrow/table.pxi":3992
 *             if target_schema != self.schema:
 *                 if not self.is_cpu:
 *                     raise NotImplementedError(             # <<<<<<<<<<<<<<
 *                         "Casting to a requested schema is only supported for CPU data"
 *                     )
*/
                __pyx_t_1 = NULL;
                __pyx_t_10 = 1;
                {
                  PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_mstate_global->__pyx_kp_u_Casting_to_a_requested_schema_is};
                  __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_NotImplementedError)), __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
                  if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 3992, __pyx_L1_error)
                  __Pyx_GOTREF(__pyx_t_6);
                }
                __Pyx_Raise(__pyx_t_6, 0, 0, 0);
                __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                __PYX_ERR(17, 3992, __pyx_L1_error)

                /* "pyarrow/table.pxi":3991
 * 
 *             if target_schema != self.schema:
 *                 if not self.is_cpu:             # <<<<<<<<<<<<<<
 *                     raise NotImplementedError(
 *                         "Casting to a requested schema is only supported for CPU data"
*/
              }

              /* "pyarrow/table.pxi":3995
 *                         "Casting to a requested schema is only supported for CPU data"
 *                     )
 *                 try:             # <<<<<<<<<<<<<<
 *                     casted_batch = self.cast(target_schema, safe=True)
 *                     inner_batch = pyarrow_unwrap_batch(casted_batch)
*/
              {
                __Pyx_PyThreadState_declare
                __Pyx_PyThreadState_assign
                __Pyx_ExceptionSave(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14);
                __Pyx_XGOTREF(__pyx_t_12);
                __Pyx_XGOTREF(__pyx_t_13);
                __Pyx_XGOTREF(__pyx_t_14);
                /*try:*/ {

                  /* "pyarrow/table.pxi":3996
 *                     )
 *                 try:
 *                     casted_batch = self.cast(target_schema, safe=True)             # <<<<<<<<<<<<<<
 *                     inner_batch = pyarrow_unwrap_batch(casted_batch)
 *                 except ArrowInvalid as e:
*/
                  __pyx_t_1 = ((PyObject *)__pyx_v_self);
                  __Pyx_INCREF(__pyx_t_1);
                  __pyx_t_10 = 0;
                  {
                    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_1, __pyx_v_target_schema};
                    __pyx_t_2 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 3996, __pyx_L14_error)
                    __Pyx_GOTREF(__pyx_t_2);
                    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_safe, Py_True, __pyx_t_2, __pyx_callargs+2, 0) < (0)) __PYX_ERR(17, 3996, __pyx_L14_error)
                    __pyx_t_6 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_cast, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_2);
                    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
                    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                    if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 3996, __pyx_L14_error)
                    __Pyx_GOTREF(__pyx_t_6);
                  }
                  __pyx_v_casted_batch = __pyx_t_6;
                  __pyx_t_6 = 0;

                  /* "pyarrow/table.pxi":3997
 *                 try:
 *                     casted_batch = self.cast(target_schema, safe=True)
 *                     inner_batch = pyarrow_unwrap_batch(casted_batch)             # <<<<<<<<<<<<<<
 *                 except ArrowInvalid as e:
 *                     raise ValueError(
*/
                  __pyx_t_15 = pyarrow_unwrap_batch(__pyx_v_casted_batch); if (unlikely(PyErr_Occurred())) __PYX_ERR(17, 3997, __pyx_L14_error)
                  __pyx_v_inner_batch = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_15);

                  /* "pyarrow/table.pxi":3995
 *                         "Casting to a requested schema is only supported for CPU data"
 *                     )
 *                 try:             # <<<<<<<<<<<<<<
 *                     casted_batch = self.cast(target_schema, safe=True)
 *                     inner_batch = pyarrow_unwrap_batch(casted_batch)
*/
                }
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
                __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
                goto __pyx_L19_try_end;
                __pyx_L14_error:;
                __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
                __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
                __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;

                /* "pyarrow/table.pxi":3998
 *                     casted_batch = self.cast(target_schema, safe=True)
 *                     inner_batch = pyarrow_unwrap_batch(casted_batch)
 *                 except ArrowInvalid as e:             # <<<<<<<<<<<<<<
 *                     raise ValueError(
 *                         f"Could not cast {self.schema} to requested schema {target_schema}: {e}"
*/
                __Pyx_ErrFetch(&__pyx_t_6, &__pyx_t_2, &__pyx_t_1);
                __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_ArrowInvalid); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 3998, __pyx_L16_except_error)
                __Pyx_GOTREF(__pyx_t_7);
                __pyx_t_5 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_6, __pyx_t_7);
                __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
                __Pyx_ErrRestore(__pyx_t_6, __pyx_t_2, __pyx_t_1);
                __pyx_t_6 = 0; __pyx_t_2 = 0; __pyx_t_1 = 0;
                if (__pyx_t_5) {
                  __Pyx_AddTraceback("pyarrow.lib.RecordBatch.__arrow_c_device_array__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                  if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_6) < 0) __PYX_ERR(17, 3998, __pyx_L16_except_error)
                  __Pyx_XGOTREF(__pyx_t_1);
                  __Pyx_XGOTREF(__pyx_t_2);
                  __Pyx_XGOTREF(__pyx_t_6);
                  __Pyx_INCREF(__pyx_t_2);
                  __pyx_v_e = __pyx_t_2;
                  /*try:*/ {

                    /* "pyarrow/table.pxi":3999
 *                     inner_batch = pyarrow_unwrap_batch(casted_batch)
 *                 except ArrowInvalid as e:
 *                     raise ValueError(             # <<<<<<<<<<<<<<
 *                         f"Could not cast {self.schema} to requested schema {target_schema}: {e}"
 *                     )
*/
                    __pyx_t_16 = NULL;

                    /* "pyarrow/table.pxi":4000
 *                 except ArrowInvalid as e:
 *                     raise ValueError(
 *                         f"Could not cast {self.schema} to requested schema {target_schema}: {e}"             # <<<<<<<<<<<<<<
 *                     )
 *             else:
*/
                    __pyx_t_17 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_schema); if (unlikely(!__pyx_t_17)) __PYX_ERR(17, 4000, __pyx_L25_error)
                    __Pyx_GOTREF(__pyx_t_17);
                    __pyx_t_18 = __Pyx_PyObject_FormatSimple(__pyx_t_17, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_18)) __PYX_ERR(17, 4000, __pyx_L25_error)
                    __Pyx_GOTREF(__pyx_t_18);
                    __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
                    __pyx_t_17 = __Pyx_PyObject_FormatSimple(__pyx_v_target_schema, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_17)) __PYX_ERR(17, 4000, __pyx_L25_error)
                    __Pyx_GOTREF(__pyx_t_17);
                    __pyx_t_19 = __Pyx_PyObject_FormatSimple(__pyx_v_e, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_19)) __PYX_ERR(17, 4000, __pyx_L25_error)
                    __Pyx_GOTREF(__pyx_t_19);
                    __pyx_t_20[0] = __pyx_mstate_global->__pyx_kp_u_Could_not_cast;
                    __pyx_t_20[1] = __pyx_t_18;
                    __pyx_t_20[2] = __pyx_mstate_global->__pyx_kp_u_to_requested_schema;
                    __pyx_t_20[3] = __pyx_t_17;
                    __pyx_t_20[4] = __pyx_mstate_global->__pyx_kp_u__10;
                    __pyx_t_20[5] = __pyx_t_19;
                    __pyx_t_21 = __Pyx_PyUnicode_Join(__pyx_t_20, 6, 15 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_18) + 21 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_17) + 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_19), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_18) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_17) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_19));
                    if (unlikely(!__pyx_t_21)) __PYX_ERR(17, 4000, __pyx_L25_error)
                    __Pyx_GOTREF(__pyx_t_21);
                    __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
                    __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
                    __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
                    __pyx_t_10 = 1;
                    {
                      PyObject *__pyx_callargs[2] = {__pyx_t_16, __pyx_t_21};
                      __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                      __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
                      __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
                      if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 3999, __pyx_L25_error)
                      __Pyx_GOTREF(__pyx_t_7);
                    }
                    __Pyx_Raise(__pyx_t_7, 0, 0, 0);
                    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
                    __PYX_ERR(17, 3999, __pyx_L25_error)
                  }

                  /* "pyarrow/table.pxi":3998
 *                     casted_batch = self.cast(target_schema, safe=True)
 *                     inner_batch = pyarrow_unwrap_batch(casted_batch)
 *                 except ArrowInvalid as e:             # <<<<<<<<<<<<<<
 *                     raise ValueError(
 *                         f"Could not cast {self.schema} to requested schema {target_schema}: {e}"
*/
                  /*finally:*/ {
                    __pyx_L25_error:;
                    /*exception exit:*/{
                      __Pyx_PyThreadState_declare
                      __Pyx_PyThreadState_assign
                      __pyx_t_23 = 0; __pyx_t_24 = 0; __pyx_t_25 = 0; __pyx_t_26 = 0; __pyx_t_27 = 0; __pyx_t_28 = 0;
                      __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
                      __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
                      __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
                      __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
                      __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0;
                      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
                       __Pyx_ExceptionSwap(&__pyx_t_26, &__pyx_t_27, &__pyx_t_28);
                      if ( unlikely(__Pyx_GetException(&__pyx_t_23, &__pyx_t_24, &__pyx_t_25) < 0)) __Pyx_ErrFetch(&__pyx_t_23, &__pyx_t_24, &__pyx_t_25);
                      __Pyx_XGOTREF(__pyx_t_23);
                      __Pyx_XGOTREF(__pyx_t_24);
                      __Pyx_XGOTREF(__pyx_t_25);
                      __Pyx_XGOTREF(__pyx_t_26);
                      __Pyx_XGOTREF(__pyx_t_27);
                      __Pyx_XGOTREF(__pyx_t_28);
                      __pyx_t_5 = __pyx_lineno; __pyx_t_8 = __pyx_clineno; __pyx_t_22 = __pyx_filename;
                      {
                        __Pyx_DECREF(__pyx_v_e); __pyx_v_e = 0;
                      }
                      __Pyx_XGIVEREF(__pyx_t_26);
                      __Pyx_XGIVEREF(__pyx_t_27);
                      __Pyx_XGIVEREF(__pyx_t_28);
                      __Pyx_ExceptionReset(__pyx_t_26, __pyx_t_27, __pyx_t_28);
                      __Pyx_XGIVEREF(__pyx_t_23);
                      __Pyx_XGIVEREF(__pyx_t_24);
                      __Pyx_XGIVEREF(__pyx_t_25);
                      __Pyx_ErrRestore(__pyx_t_23, __pyx_t_24, __pyx_t_25);
                      __pyx_t_23 = 0; __pyx_t_24 = 0; __pyx_t_25 = 0; __pyx_t_26 = 0; __pyx_t_27 = 0; __pyx_t_28 = 0;
                      __pyx_lineno = __pyx_t_5; __pyx_clineno = __pyx_t_8; __pyx_filename = __pyx_t_22;
                      goto __pyx_L16_except_error;
                    }
                  }
                }
                goto __pyx_L16_except_error;

                /* "pyarrow/table.pxi":3995
 *                         "Casting to a requested schema is only supported for CPU data"
 *                     )
 *                 try:             # <<<<<<<<<<<<<<
 *                     casted_batch = self.cast(target_schema, safe=True)
 *                     inner_batch = pyarrow_unwrap_batch(casted_batch)
*/
                __pyx_L16_except_error:;
                __Pyx_XGIVEREF(__pyx_t_12);
                __Pyx_XGIVEREF(__pyx_t_13);
                __Pyx_XGIVEREF(__pyx_t_14);
                __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
                goto __pyx_L1_error;
                __pyx_L19_try_end:;
              }

              /* "pyarrow/table.pxi":3990
 *             target_schema = Schema._import_from_c_capsule(requested_schema)
 * 
 *             if target_schema != self.schema:             # <<<<<<<<<<<<<<
 *                 if not self.is_cpu:
 *                     raise NotImplementedError(
*/
              goto __pyx_L12;
            }

            /* "pyarrow/table.pxi":4003
 *                     )
 *             else:
 *                 inner_batch = self.sp_batch             # <<<<<<<<<<<<<<
 *         else:
 *             inner_batch = self.sp_batch
*/
            /*else*/ {
              if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_batch");
                __PYX_ERR(17, 4003, __pyx_L1_error)
              }
              __pyx_t_15 = __pyx_v_self->sp_batch;
              __pyx_v_inner_batch = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_15);
            }
            __pyx_L12:;

            /* "pyarrow/table.pxi":3987
 *             )
 * 
 *         if requested_schema is not None:             # <<<<<<<<<<<<<<
 *             target_schema = Schema._import_from_c_capsule(requested_schema)
 * 
*/
            goto __pyx_L11;
          }

          /* "pyarrow/table.pxi":4005
 *                 inner_batch = self.sp_batch
 *         else:
 *             inner_batch = self.sp_batch             # <<<<<<<<<<<<<<
 * 
 *         schema_capsule = alloc_c_schema(&c_schema)
*/
          /*else*/ {
            if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_batch");
              __PYX_ERR(17, 4005, __pyx_L1_error)
            }
            __pyx_t_15 = __pyx_v_self->sp_batch;
            __pyx_v_inner_batch = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_15);
          }
          __pyx_L11:;

          /* "pyarrow/table.pxi":4007
 *             inner_batch = self.sp_batch
 * 
 *         schema_capsule = alloc_c_schema(&c_schema)             # <<<<<<<<<<<<<<
 *         array_capsule = alloc_c_device_array(&c_array)
 * 
*/
          __pyx_t_6 = __pyx_f_7pyarrow_3lib_alloc_c_schema((&__pyx_v_c_schema)); if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 4007, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_v_schema_capsule = __pyx_t_6;
          __pyx_t_6 = 0;

          /* "pyarrow/table.pxi":4008
 * 
 *         schema_capsule = alloc_c_schema(&c_schema)
 *         array_capsule = alloc_c_device_array(&c_array)             # <<<<<<<<<<<<<<
 * 
 *         with nogil:
*/
          __pyx_t_6 = __pyx_f_7pyarrow_3lib_alloc_c_device_array((&__pyx_v_c_array)); if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 4008, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_v_array_capsule = __pyx_t_6;
          __pyx_t_6 = 0;

          /* "pyarrow/table.pxi":4010
 *         array_capsule = alloc_c_device_array(&c_array)
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             check_status(ExportDeviceRecordBatch(
 *                 deref(inner_batch), <shared_ptr[CSyncEvent]>NULL, c_array, c_schema))
*/
          {
              PyThreadState * _save;
              _save = PyEval_SaveThread();
              __Pyx_FastGIL_Remember();
              /*try:*/ {

                /* "pyarrow/table.pxi":4011
 * 
 *         with nogil:
 *             check_status(ExportDeviceRecordBatch(             # <<<<<<<<<<<<<<
 *                 deref(inner_batch), <shared_ptr[CSyncEvent]>NULL, c_array, c_schema))
 * 
*/
                __pyx_t_8 = __pyx_f_7pyarrow_3lib_check_status(arrow::ExportDeviceRecordBatch((*__pyx_v_inner_batch), ((std::shared_ptr< arrow::Device::SyncEvent> )NULL), __pyx_v_c_array, __pyx_v_c_schema)); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(17, 4011, __pyx_L32_error)
              }

              /* "pyarrow/table.pxi":4010
 *         array_capsule = alloc_c_device_array(&c_array)
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             check_status(ExportDeviceRecordBatch(
 *                 deref(inner_batch), <shared_ptr[CSyncEvent]>NULL, c_array, c_schema))
*/
              /*finally:*/ {
                /*normal exit:*/{
                  __Pyx_FastGIL_Forget();
                  PyEval_RestoreThread(_save);
                  goto __pyx_L33;
                }
                __pyx_L32_error: {
                  __Pyx_FastGIL_Forget();
                  PyEval_RestoreThread(_save);
                  goto __pyx_L1_error;
                }
                __pyx_L33:;
              }
          }

          /* "pyarrow/table.pxi":4014
 *                 deref(inner_batch), <shared_ptr[CSyncEvent]>NULL, c_array, c_schema))
 * 
 *         return schema_capsule, array_capsule             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
*/
          __Pyx_XDECREF(__pyx_r);
          __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 4014, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_INCREF(__pyx_v_schema_capsule);
          __Pyx_GIVEREF(__pyx_v_schema_capsule);
          if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_schema_capsule) != (0)) __PYX_ERR(17, 4014, __pyx_L1_error);
          __Pyx_INCREF(__pyx_v_array_capsule);
          __Pyx_GIVEREF(__pyx_v_array_capsule);
          if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_array_capsule) != (0)) __PYX_ERR(17, 4014, __pyx_L1_error);
          __pyx_r = __pyx_t_6;
          __pyx_t_6 = 0;
          goto __pyx_L0;

          /* "pyarrow/table.pxi":3951
 *         return pyarrow_wrap_batch(c_batch)
 * 
 *     def __arrow_c_device_array__(self, requested_schema=None, **kwargs):             # <<<<<<<<<<<<<<
 *         """
 *         Get a pair of PyCapsules containing a C ArrowDeviceArray representation
*/

          /* function exit code */
          __pyx_L1_error:;
          __Pyx_XDECREF(__pyx_t_1);
          __Pyx_XDECREF(__pyx_t_2);
          __Pyx_XDECREF(__pyx_t_6);
          __Pyx_XDECREF(__pyx_t_7);
          __Pyx_XDECREF(__pyx_t_16);
          __Pyx_XDECREF(__pyx_t_17);
          __Pyx_XDECREF(__pyx_t_18);
          __Pyx_XDECREF(__pyx_t_19);
          __Pyx_XDECREF(__pyx_t_21);
          __Pyx_AddTraceback("pyarrow.lib.RecordBatch.__arrow_c_device_array__", __pyx_clineno, __pyx_lineno, __pyx_filename);
          __pyx_r = NULL;
          __pyx_L0:;
          __Pyx_XDECREF(__pyx_v_non_default_kwargs);
          __Pyx_XDECREF(__pyx_v_target_schema);
          __Pyx_XDECREF(__pyx_v_casted_batch);
          __Pyx_XDECREF(__pyx_v_e);
          __Pyx_XDECREF(__pyx_v_schema_capsule);
          __Pyx_XDECREF(__pyx_v_array_capsule);
          __Pyx_XDECREF(__pyx_9genexpr26__pyx_v_name);
          __Pyx_XDECREF(__pyx_9genexpr26__pyx_v_value);
          __Pyx_XGIVEREF(__pyx_r);
          __Pyx_RefNannyFinishContext();
          return __pyx_r;
        }

        /* "pyarrow/table.pxi":4016
 *         return schema_capsule, array_capsule
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def _import_from_c_device_capsule(schema_capsule, array_capsule):
 *         """
*/

        /* Python wrapper */
        static PyObject *__pyx_pw_7pyarrow_3lib_11RecordBatch_65_import_from_c_device_capsule(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
        PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_11RecordBatch_64_import_from_c_device_capsule, "RecordBatch._import_from_c_device_capsule(schema_capsule, array_capsule)\n\nImport RecordBatch from a pair of PyCapsules containing a\nC ArrowSchema and ArrowDeviceArray, respectively.\n\nParameters\n----------\nschema_capsule : PyCapsule\n    A PyCapsule containing a C ArrowSchema representation of the schema.\narray_capsule : PyCapsule\n    A PyCapsule containing a C ArrowDeviceArray representation of the array.\n\nReturns\n-------\npyarrow.RecordBatch");
        static PyMethodDef __pyx_mdef_7pyarrow_3lib_11RecordBatch_65_import_from_c_device_capsule = {"_import_from_c_device_capsule", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_11RecordBatch_65_import_from_c_device_capsule, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_11RecordBatch_64_import_from_c_device_capsule};
        static PyObject *__pyx_pw_7pyarrow_3lib_11RecordBatch_65_import_from_c_device_capsule(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
          PyObject *__pyx_v_schema_capsule = 0;
          PyObject *__pyx_v_array_capsule = 0;
          #if !CYTHON_METH_FASTCALL
          CYTHON_UNUSED Py_ssize_t __pyx_nargs;
          #endif
          CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
          PyObject* values[2] = {0,0};
          int __pyx_lineno = 0;
          const char *__pyx_filename = NULL;
          int __pyx_clineno = 0;
          PyObject *__pyx_r = 0;
          __Pyx_RefNannyDeclarations
          __Pyx_RefNannySetupContext("_import_from_c_device_capsule (wrapper)", 0);
          #if !CYTHON_METH_FASTCALL
          #if CYTHON_ASSUME_SAFE_SIZE
          __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
          #else
          __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
          #endif
          #endif
          __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
          {
            PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_schema_capsule,&__pyx_mstate_global->__pyx_n_u_array_capsule,0};
            const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
            if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(17, 4016, __pyx_L3_error)
            if (__pyx_kwds_len > 0) {
              switch (__pyx_nargs) {
                case  2:
                values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(17, 4016, __pyx_L3_error)
                CYTHON_FALLTHROUGH;
                case  1:
                values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 4016, __pyx_L3_error)
                CYTHON_FALLTHROUGH;
                case  0: break;
                default: goto __pyx_L5_argtuple_error;
              }
              const Py_ssize_t kwd_pos_args = __pyx_nargs;
              if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_import_from_c_device_capsule", 0) < (0)) __PYX_ERR(17, 4016, __pyx_L3_error)
              for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
                if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_import_from_c_device_capsule", 1, 2, 2, i); __PYX_ERR(17, 4016, __pyx_L3_error) }
              }
            } else if (unlikely(__pyx_nargs != 2)) {
              goto __pyx_L5_argtuple_error;
            } else {
              values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
              if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 4016, __pyx_L3_error)
              values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
              if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(17, 4016, __pyx_L3_error)
            }
            __pyx_v_schema_capsule = values[0];
            __pyx_v_array_capsule = values[1];
          }
          goto __pyx_L6_skip;
          __pyx_L5_argtuple_error:;
          __Pyx_RaiseArgtupleInvalid("_import_from_c_device_capsule", 1, 2, 2, __pyx_nargs); __PYX_ERR(17, 4016, __pyx_L3_error)
          __pyx_L6_skip:;
          goto __pyx_L4_argument_unpacking_done;
          __pyx_L3_error:;
          for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
            Py_XDECREF(values[__pyx_temp]);
          }
          __Pyx_AddTraceback("pyarrow.lib.RecordBatch._import_from_c_device_capsule", __pyx_clineno, __pyx_lineno, __pyx_filename);
          __Pyx_RefNannyFinishContext();
          return NULL;
          __pyx_L4_argument_unpacking_done:;
          __pyx_r = __pyx_pf_7pyarrow_3lib_11RecordBatch_64_import_from_c_device_capsule(__pyx_v_schema_capsule, __pyx_v_array_capsule);

          /* function exit code */
          for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
            Py_XDECREF(values[__pyx_temp]);
          }
          __Pyx_RefNannyFinishContext();
          return __pyx_r;
        }

        static PyObject *__pyx_pf_7pyarrow_3lib_11RecordBatch_64_import_from_c_device_capsule(PyObject *__pyx_v_schema_capsule, PyObject *__pyx_v_array_capsule) {
          struct ArrowSchema *__pyx_v_c_schema;
          struct ArrowDeviceArray *__pyx_v_c_array;
          std::shared_ptr< arrow::RecordBatch>  __pyx_v_batch;
          PyObject *__pyx_r = NULL;
          __Pyx_RefNannyDeclarations
          void *__pyx_t_1;
          std::shared_ptr< arrow::RecordBatch>  __pyx_t_2;
          PyObject *__pyx_t_3 = NULL;
          int __pyx_lineno = 0;
          const char *__pyx_filename = NULL;
          int __pyx_clineno = 0;
          __Pyx_RefNannySetupContext("_import_from_c_device_capsule", 0);

          /* "pyarrow/table.pxi":4038
 *             shared_ptr[CRecordBatch] batch
 * 
 *         c_schema = <ArrowSchema*> PyCapsule_GetPointer(schema_capsule, 'arrow_schema')             # <<<<<<<<<<<<<<
 *         c_array = <ArrowDeviceArray*> PyCapsule_GetPointer(
 *             array_capsule, 'arrow_device_array'
*/
          __pyx_t_1 = PyCapsule_GetPointer(__pyx_v_schema_capsule, __pyx_k_arrow_schema); if (unlikely(__pyx_t_1 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(17, 4038, __pyx_L1_error)
          __pyx_v_c_schema = ((struct ArrowSchema *)__pyx_t_1);

          /* "pyarrow/table.pxi":4039
 * 
 *         c_schema = <ArrowSchema*> PyCapsule_GetPointer(schema_capsule, 'arrow_schema')
 *         c_array = <ArrowDeviceArray*> PyCapsule_GetPointer(             # <<<<<<<<<<<<<<
 *             array_capsule, 'arrow_device_array'
 *         )
*/
          __pyx_t_1 = PyCapsule_GetPointer(__pyx_v_array_capsule, __pyx_k_arrow_device_array); if (unlikely(__pyx_t_1 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(17, 4039, __pyx_L1_error)
          __pyx_v_c_array = ((struct ArrowDeviceArray *)__pyx_t_1);

          /* "pyarrow/table.pxi":4043
 *         )
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             batch = GetResultValue(ImportDeviceRecordBatch(c_array, c_schema))
 * 
*/
          {
              PyThreadState * _save;
              _save = PyEval_SaveThread();
              __Pyx_FastGIL_Remember();
              /*try:*/ {

                /* "pyarrow/table.pxi":4044
 * 
 *         with nogil:
 *             batch = GetResultValue(ImportDeviceRecordBatch(c_array, c_schema))             # <<<<<<<<<<<<<<
 * 
 *         return pyarrow_wrap_batch(batch)
*/
                __pyx_t_2 = arrow::py::GetResultValue<std::shared_ptr< arrow::RecordBatch> >(arrow::ImportDeviceRecordBatch(__pyx_v_c_array, __pyx_v_c_schema)); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(17, 4044, __pyx_L4_error)
                __pyx_v_batch = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_2);
              }

              /* "pyarrow/table.pxi":4043
 *         )
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             batch = GetResultValue(ImportDeviceRecordBatch(c_array, c_schema))
 * 
*/
              /*finally:*/ {
                /*normal exit:*/{
                  __Pyx_FastGIL_Forget();
                  PyEval_RestoreThread(_save);
                  goto __pyx_L5;
                }
                __pyx_L4_error: {
                  __Pyx_FastGIL_Forget();
                  PyEval_RestoreThread(_save);
                  goto __pyx_L1_error;
                }
                __pyx_L5:;
              }
          }

          /* "pyarrow/table.pxi":4046
 *             batch = GetResultValue(ImportDeviceRecordBatch(c_array, c_schema))
 * 
 *         return pyarrow_wrap_batch(batch)             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
          __Pyx_XDECREF(__pyx_r);
          __pyx_t_3 = pyarrow_wrap_batch(__pyx_v_batch); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 4046, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_r = __pyx_t_3;
          __pyx_t_3 = 0;
          goto __pyx_L0;

          /* "pyarrow/table.pxi":4016
 *         return schema_capsule, array_capsule
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def _import_from_c_device_capsule(schema_capsule, array_capsule):
 *         """
*/

          /* function exit code */
          __pyx_L1_error:;
          __Pyx_XDECREF(__pyx_t_3);
          __Pyx_AddTraceback("pyarrow.lib.RecordBatch._import_from_c_device_capsule", __pyx_clineno, __pyx_lineno, __pyx_filename);
          __pyx_r = NULL;
          __pyx_L0:;
          __Pyx_XGIVEREF(__pyx_r);
          __Pyx_RefNannyFinishContext();
          return __pyx_r;
        }

        /* "pyarrow/table.pxi":4048
 *         return pyarrow_wrap_batch(batch)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def device_type(self):
 *         """
*/

        /* Python wrapper */
        static PyObject *__pyx_pw_7pyarrow_3lib_11RecordBatch_11device_type_1__get__(PyObject *__pyx_v_self); /*proto*/
        static PyObject *__pyx_pw_7pyarrow_3lib_11RecordBatch_11device_type_1__get__(PyObject *__pyx_v_self) {
          CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
          PyObject *__pyx_r = 0;
          __Pyx_RefNannyDeclarations
          __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
          __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
          __pyx_r = __pyx_pf_7pyarrow_3lib_11RecordBatch_11device_type___get__(((struct __pyx_obj_7pyarrow_3lib_RecordBatch *)__pyx_v_self));

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

        static PyObject *__pyx_pf_7pyarrow_3lib_11RecordBatch_11device_type___get__(struct __pyx_obj_7pyarrow_3lib_RecordBatch *__pyx_v_self) {
          PyObject *__pyx_r = NULL;
          __Pyx_RefNannyDeclarations
          PyObject *__pyx_t_1 = NULL;
          int __pyx_lineno = 0;
          const char *__pyx_filename = NULL;
          int __pyx_clineno = 0;
          __Pyx_RefNannySetupContext("__get__", 0);

          /* "pyarrow/table.pxi":4057
 *         DeviceAllocationType
 *         """
 *         return _wrap_device_allocation_type(self.sp_batch.get().device_type())             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
          __Pyx_XDECREF(__pyx_r);
          if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
            PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_batch");
            __PYX_ERR(17, 4057, __pyx_L1_error)
          }
          __pyx_t_1 = __pyx_f_7pyarrow_3lib__wrap_device_allocation_type(__pyx_v_self->sp_batch.get()->device_type()); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 4057, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_r = __pyx_t_1;
          __pyx_t_1 = 0;
          goto __pyx_L0;

          /* "pyarrow/table.pxi":4048
 *         return pyarrow_wrap_batch(batch)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def device_type(self):
 *         """
*/

          /* function exit code */
          __pyx_L1_error:;
          __Pyx_XDECREF(__pyx_t_1);
          __Pyx_AddTraceback("pyarrow.lib.RecordBatch.device_type.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
          __pyx_r = NULL;
          __pyx_L0:;
          __Pyx_XGIVEREF(__pyx_r);
          __Pyx_RefNannyFinishContext();
          return __pyx_r;
        }

        /* "pyarrow/table.pxi":4059
 *         return _wrap_device_allocation_type(self.sp_batch.get().device_type())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_cpu(self):
 *         """
*/

        /* Python wrapper */
        static PyObject *__pyx_pw_7pyarrow_3lib_11RecordBatch_6is_cpu_1__get__(PyObject *__pyx_v_self); /*proto*/
        static PyObject *__pyx_pw_7pyarrow_3lib_11RecordBatch_6is_cpu_1__get__(PyObject *__pyx_v_self) {
          CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
          PyObject *__pyx_r = 0;
          __Pyx_RefNannyDeclarations
          __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
          __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
          __pyx_r = __pyx_pf_7pyarrow_3lib_11RecordBatch_6is_cpu___get__(((struct __pyx_obj_7pyarrow_3lib_RecordBatch *)__pyx_v_self));

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

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

          /* "pyarrow/table.pxi":4064
 *         Whether the RecordBatch's arrays are CPU-accessible.
 *         """
 *         return self.device_type == DeviceAllocationType.CPU             # <<<<<<<<<<<<<<
 * 
 *     cdef void _assert_cpu(self) except *:
*/
          __Pyx_XDECREF(__pyx_r);
          __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_device_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 4064, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_2 = __Pyx_Enum_230530__7pyarrow_3lib_enum__dunderpyx_t_7pyarrow_3lib___etc_to_py(__pyx_e_7pyarrow_3lib_CPU); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 4064, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 4064, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_r = __pyx_t_3;
          __pyx_t_3 = 0;
          goto __pyx_L0;

          /* "pyarrow/table.pxi":4059
 *         return _wrap_device_allocation_type(self.sp_batch.get().device_type())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_cpu(self):
 *         """
*/

          /* function exit code */
          __pyx_L1_error:;
          __Pyx_XDECREF(__pyx_t_1);
          __Pyx_XDECREF(__pyx_t_2);
          __Pyx_XDECREF(__pyx_t_3);
          __Pyx_AddTraceback("pyarrow.lib.RecordBatch.is_cpu.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
          __pyx_r = NULL;
          __pyx_L0:;
          __Pyx_XGIVEREF(__pyx_r);
          __Pyx_RefNannyFinishContext();
          return __pyx_r;
        }

        /* "pyarrow/table.pxi":4066
 *         return self.device_type == DeviceAllocationType.CPU
 * 
 *     cdef void _assert_cpu(self) except *:             # <<<<<<<<<<<<<<
 *         if self.sp_batch.get().device_type() != CDeviceAllocationType_kCPU:
 *             raise NotImplementedError("Implemented only for data on CPU device")
*/

        static void __pyx_f_7pyarrow_3lib_11RecordBatch__assert_cpu(struct __pyx_obj_7pyarrow_3lib_RecordBatch *__pyx_v_self) {
          __Pyx_RefNannyDeclarations
          int __pyx_t_1;
          PyObject *__pyx_t_2 = NULL;
          PyObject *__pyx_t_3 = NULL;
          size_t __pyx_t_4;
          int __pyx_lineno = 0;
          const char *__pyx_filename = NULL;
          int __pyx_clineno = 0;
          __Pyx_RefNannySetupContext("_assert_cpu", 0);

          /* "pyarrow/table.pxi":4067
 * 
 *     cdef void _assert_cpu(self) except *:
 *         if self.sp_batch.get().device_type() != CDeviceAllocationType_kCPU:             # <<<<<<<<<<<<<<
 *             raise NotImplementedError("Implemented only for data on CPU device")
 * 
*/
          if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
            PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_batch");
            __PYX_ERR(17, 4067, __pyx_L1_error)
          }
          __pyx_t_1 = (__pyx_v_self->sp_batch.get()->device_type() != arrow::DeviceAllocationType::kCPU);
          if (unlikely(__pyx_t_1)) {

            /* "pyarrow/table.pxi":4068
 *     cdef void _assert_cpu(self) except *:
 *         if self.sp_batch.get().device_type() != CDeviceAllocationType_kCPU:
 *             raise NotImplementedError("Implemented only for data on CPU device")             # <<<<<<<<<<<<<<
 * 
 * 
*/
            __pyx_t_3 = NULL;
            __pyx_t_4 = 1;
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Implemented_only_for_data_on_CPU};
              __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_NotImplementedError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 4068, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_2);
            }
            __Pyx_Raise(__pyx_t_2, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __PYX_ERR(17, 4068, __pyx_L1_error)

            /* "pyarrow/table.pxi":4067
 * 
 *     cdef void _assert_cpu(self) except *:
 *         if self.sp_batch.get().device_type() != CDeviceAllocationType_kCPU:             # <<<<<<<<<<<<<<
 *             raise NotImplementedError("Implemented only for data on CPU device")
 * 
*/
          }

          /* "pyarrow/table.pxi":4066
 *         return self.device_type == DeviceAllocationType.CPU
 * 
 *     cdef void _assert_cpu(self) except *:             # <<<<<<<<<<<<<<
 *         if self.sp_batch.get().device_type() != CDeviceAllocationType_kCPU:
 *             raise NotImplementedError("Implemented only for data on CPU device")
*/

          /* function exit code */
          goto __pyx_L0;
          __pyx_L1_error:;
          __Pyx_XDECREF(__pyx_t_2);
          __Pyx_XDECREF(__pyx_t_3);
          __Pyx_AddTraceback("pyarrow.lib.RecordBatch._assert_cpu", __pyx_clineno, __pyx_lineno, __pyx_filename);
          __pyx_L0:;
          __Pyx_RefNannyFinishContext();
        }

        /* "pyarrow/table.pxi":4071
 * 
 * 
 * def _reconstruct_record_batch(columns, schema):             # <<<<<<<<<<<<<<
 *     """
 *     Internal: reconstruct RecordBatch from pickled components.
*/

        /* Python wrapper */
        static PyObject *__pyx_pw_7pyarrow_3lib_217_reconstruct_record_batch(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
        PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_216_reconstruct_record_batch, "_reconstruct_record_batch(columns, schema)\n\nInternal: reconstruct RecordBatch from pickled components.");
        static PyMethodDef __pyx_mdef_7pyarrow_3lib_217_reconstruct_record_batch = {"_reconstruct_record_batch", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_217_reconstruct_record_batch, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_216_reconstruct_record_batch};
        static PyObject *__pyx_pw_7pyarrow_3lib_217_reconstruct_record_batch(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
          PyObject *__pyx_v_columns = 0;
          PyObject *__pyx_v_schema = 0;
          #if !CYTHON_METH_FASTCALL
          CYTHON_UNUSED Py_ssize_t __pyx_nargs;
          #endif
          CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
          PyObject* values[2] = {0,0};
          int __pyx_lineno = 0;
          const char *__pyx_filename = NULL;
          int __pyx_clineno = 0;
          PyObject *__pyx_r = 0;
          __Pyx_RefNannyDeclarations
          __Pyx_RefNannySetupContext("_reconstruct_record_batch (wrapper)", 0);
          #if !CYTHON_METH_FASTCALL
          #if CYTHON_ASSUME_SAFE_SIZE
          __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
          #else
          __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
          #endif
          #endif
          __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
          {
            PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_columns,&__pyx_mstate_global->__pyx_n_u_schema,0};
            const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
            if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(17, 4071, __pyx_L3_error)
            if (__pyx_kwds_len > 0) {
              switch (__pyx_nargs) {
                case  2:
                values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(17, 4071, __pyx_L3_error)
                CYTHON_FALLTHROUGH;
                case  1:
                values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 4071, __pyx_L3_error)
                CYTHON_FALLTHROUGH;
                case  0: break;
                default: goto __pyx_L5_argtuple_error;
              }
              const Py_ssize_t kwd_pos_args = __pyx_nargs;
              if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_reconstruct_record_batch", 0) < (0)) __PYX_ERR(17, 4071, __pyx_L3_error)
              for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
                if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_reconstruct_record_batch", 1, 2, 2, i); __PYX_ERR(17, 4071, __pyx_L3_error) }
              }
            } else if (unlikely(__pyx_nargs != 2)) {
              goto __pyx_L5_argtuple_error;
            } else {
              values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
              if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 4071, __pyx_L3_error)
              values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
              if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(17, 4071, __pyx_L3_error)
            }
            __pyx_v_columns = values[0];
            __pyx_v_schema = values[1];
          }
          goto __pyx_L6_skip;
          __pyx_L5_argtuple_error:;
          __Pyx_RaiseArgtupleInvalid("_reconstruct_record_batch", 1, 2, 2, __pyx_nargs); __PYX_ERR(17, 4071, __pyx_L3_error)
          __pyx_L6_skip:;
          goto __pyx_L4_argument_unpacking_done;
          __pyx_L3_error:;
          for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
            Py_XDECREF(values[__pyx_temp]);
          }
          __Pyx_AddTraceback("pyarrow.lib._reconstruct_record_batch", __pyx_clineno, __pyx_lineno, __pyx_filename);
          __Pyx_RefNannyFinishContext();
          return NULL;
          __pyx_L4_argument_unpacking_done:;
          __pyx_r = __pyx_pf_7pyarrow_3lib_216_reconstruct_record_batch(__pyx_self, __pyx_v_columns, __pyx_v_schema);

          /* function exit code */
          for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
            Py_XDECREF(values[__pyx_temp]);
          }
          __Pyx_RefNannyFinishContext();
          return __pyx_r;
        }

        static PyObject *__pyx_pf_7pyarrow_3lib_216_reconstruct_record_batch(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_columns, PyObject *__pyx_v_schema) {
          PyObject *__pyx_r = NULL;
          __Pyx_RefNannyDeclarations
          PyObject *__pyx_t_1 = NULL;
          PyObject *__pyx_t_2 = NULL;
          size_t __pyx_t_3;
          PyObject *__pyx_t_4 = NULL;
          int __pyx_lineno = 0;
          const char *__pyx_filename = NULL;
          int __pyx_clineno = 0;
          __Pyx_RefNannySetupContext("_reconstruct_record_batch", 0);

          /* "pyarrow/table.pxi":4075
 *     Internal: reconstruct RecordBatch from pickled components.
 *     """
 *     return RecordBatch.from_arrays(columns, schema=schema)             # <<<<<<<<<<<<<<
 * 
 * 
*/
          __Pyx_XDECREF(__pyx_r);
          __pyx_t_2 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RecordBatch);
          __Pyx_INCREF(__pyx_t_2);
          __pyx_t_3 = 0;
          {
            PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, __pyx_v_columns};
            __pyx_t_4 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 4075, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_schema, __pyx_v_schema, __pyx_t_4, __pyx_callargs+2, 0) < (0)) __PYX_ERR(17, 4075, __pyx_L1_error)
            __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_from_arrays, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_4);
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 4075, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_1);
          }
          __pyx_r = __pyx_t_1;
          __pyx_t_1 = 0;
          goto __pyx_L0;

          /* "pyarrow/table.pxi":4071
 * 
 * 
 * def _reconstruct_record_batch(columns, schema):             # <<<<<<<<<<<<<<
 *     """
 *     Internal: reconstruct RecordBatch from pickled components.
*/

          /* function exit code */
          __pyx_L1_error:;
          __Pyx_XDECREF(__pyx_t_1);
          __Pyx_XDECREF(__pyx_t_2);
          __Pyx_XDECREF(__pyx_t_4);
          __Pyx_AddTraceback("pyarrow.lib._reconstruct_record_batch", __pyx_clineno, __pyx_lineno, __pyx_filename);
          __pyx_r = NULL;
          __pyx_L0:;
          __Pyx_XGIVEREF(__pyx_r);
          __Pyx_RefNannyFinishContext();
          return __pyx_r;
        }

        /* "pyarrow/table.pxi":4078
 * 
 * 
 * def table_to_blocks(options, Table table, categories, extension_columns):             # <<<<<<<<<<<<<<
 *     cdef:
 *         PyObject* result_obj
*/

        /* Python wrapper */
        static PyObject *__pyx_pw_7pyarrow_3lib_219table_to_blocks(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
        PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_218table_to_blocks, "table_to_blocks(options, Table table, categories, extension_columns)");
        static PyMethodDef __pyx_mdef_7pyarrow_3lib_219table_to_blocks = {"table_to_blocks", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_219table_to_blocks, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_218table_to_blocks};
        static PyObject *__pyx_pw_7pyarrow_3lib_219table_to_blocks(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
          PyObject *__pyx_v_options = 0;
          struct __pyx_obj_7pyarrow_3lib_Table *__pyx_v_table = 0;
          PyObject *__pyx_v_categories = 0;
          PyObject *__pyx_v_extension_columns = 0;
          #if !CYTHON_METH_FASTCALL
          CYTHON_UNUSED Py_ssize_t __pyx_nargs;
          #endif
          CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
          PyObject* values[4] = {0,0,0,0};
          int __pyx_lineno = 0;
          const char *__pyx_filename = NULL;
          int __pyx_clineno = 0;
          PyObject *__pyx_r = 0;
          __Pyx_RefNannyDeclarations
          __Pyx_RefNannySetupContext("table_to_blocks (wrapper)", 0);
          #if !CYTHON_METH_FASTCALL
          #if CYTHON_ASSUME_SAFE_SIZE
          __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
          #else
          __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
          #endif
          #endif
          __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
          {
            PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_options,&__pyx_mstate_global->__pyx_n_u_table,&__pyx_mstate_global->__pyx_n_u_categories,&__pyx_mstate_global->__pyx_n_u_extension_columns,0};
            const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
            if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(17, 4078, __pyx_L3_error)
            if (__pyx_kwds_len > 0) {
              switch (__pyx_nargs) {
                case  4:
                values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
                if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(17, 4078, __pyx_L3_error)
                CYTHON_FALLTHROUGH;
                case  3:
                values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
                if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(17, 4078, __pyx_L3_error)
                CYTHON_FALLTHROUGH;
                case  2:
                values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(17, 4078, __pyx_L3_error)
                CYTHON_FALLTHROUGH;
                case  1:
                values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 4078, __pyx_L3_error)
                CYTHON_FALLTHROUGH;
                case  0: break;
                default: goto __pyx_L5_argtuple_error;
              }
              const Py_ssize_t kwd_pos_args = __pyx_nargs;
              if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "table_to_blocks", 0) < (0)) __PYX_ERR(17, 4078, __pyx_L3_error)
              for (Py_ssize_t i = __pyx_nargs; i < 4; i++) {
                if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("table_to_blocks", 1, 4, 4, i); __PYX_ERR(17, 4078, __pyx_L3_error) }
              }
            } else if (unlikely(__pyx_nargs != 4)) {
              goto __pyx_L5_argtuple_error;
            } else {
              values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
              if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 4078, __pyx_L3_error)
              values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
              if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(17, 4078, __pyx_L3_error)
              values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
              if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(17, 4078, __pyx_L3_error)
              values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
              if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(17, 4078, __pyx_L3_error)
            }
            __pyx_v_options = values[0];
            __pyx_v_table = ((struct __pyx_obj_7pyarrow_3lib_Table *)values[1]);
            __pyx_v_categories = values[2];
            __pyx_v_extension_columns = values[3];
          }
          goto __pyx_L6_skip;
          __pyx_L5_argtuple_error:;
          __Pyx_RaiseArgtupleInvalid("table_to_blocks", 1, 4, 4, __pyx_nargs); __PYX_ERR(17, 4078, __pyx_L3_error)
          __pyx_L6_skip:;
          goto __pyx_L4_argument_unpacking_done;
          __pyx_L3_error:;
          for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
            Py_XDECREF(values[__pyx_temp]);
          }
          __Pyx_AddTraceback("pyarrow.lib.table_to_blocks", __pyx_clineno, __pyx_lineno, __pyx_filename);
          __Pyx_RefNannyFinishContext();
          return NULL;
          __pyx_L4_argument_unpacking_done:;
          if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_table), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Table, 1, "table", 0))) __PYX_ERR(17, 4078, __pyx_L1_error)
          __pyx_r = __pyx_pf_7pyarrow_3lib_218table_to_blocks(__pyx_self, __pyx_v_options, __pyx_v_table, __pyx_v_categories, __pyx_v_extension_columns);

          /* function exit code */
          goto __pyx_L0;
          __pyx_L1_error:;
          __pyx_r = NULL;
          for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
            Py_XDECREF(values[__pyx_temp]);
          }
          goto __pyx_L7_cleaned_up;
          __pyx_L0:;
          for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
            Py_XDECREF(values[__pyx_temp]);
          }
          __pyx_L7_cleaned_up:;
          __Pyx_RefNannyFinishContext();
          return __pyx_r;
        }

        static PyObject *__pyx_pf_7pyarrow_3lib_218table_to_blocks(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_options, struct __pyx_obj_7pyarrow_3lib_Table *__pyx_v_table, PyObject *__pyx_v_categories, PyObject *__pyx_v_extension_columns) {
          PyObject *__pyx_v_result_obj;
          std::shared_ptr< arrow::Table>  __pyx_v_c_table;
          arrow::py::PandasOptions __pyx_v_c_options;
          PyObject *__pyx_9genexpr27__pyx_v_cat = NULL;
          PyObject *__pyx_9genexpr28__pyx_v_col = NULL;
          PyObject *__pyx_r = NULL;
          __Pyx_RefNannyDeclarations
          PyObject *__pyx_t_1 = NULL;
          arrow::py::PandasOptions __pyx_t_2;
          int __pyx_t_3;
          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;
          PyObject *__pyx_t_9 = NULL;
          size_t __pyx_t_10;
          std::unordered_set<std::string>  __pyx_t_11;
          std::unordered_set<std::string>  __pyx_t_12;
          std::shared_ptr<std::unordered_set<std::string> >  __pyx_t_13;
          std::shared_ptr< arrow::Table>  __pyx_t_14;
          int __pyx_t_15;
          int __pyx_lineno = 0;
          const char *__pyx_filename = NULL;
          int __pyx_clineno = 0;
          __Pyx_RefNannySetupContext("table_to_blocks", 0);

          /* "pyarrow/table.pxi":4083
 *         shared_ptr[CTable] c_table
 *         CMemoryPool* pool
 *         PandasOptions c_options = _convert_pandas_options(options)             # <<<<<<<<<<<<<<
 * 
 *     if categories is not None:
*/
          __pyx_t_1 = __pyx_v_options;
          __Pyx_INCREF(__pyx_t_1);
          if (!(likely(PyDict_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("dict", __pyx_t_1))) __PYX_ERR(17, 4083, __pyx_L1_error)
          __pyx_t_2 = __pyx_f_7pyarrow_3lib__convert_pandas_options(((PyObject*)__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(17, 4083, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __pyx_v_c_options = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_2);

          /* "pyarrow/table.pxi":4085
 *         PandasOptions c_options = _convert_pandas_options(options)
 * 
 *     if categories is not None:             # <<<<<<<<<<<<<<
 *         c_options.categorical_columns = make_shared[unordered_set[c_string]](
 *             unordered_set[c_string]({tobytes(cat) for cat in categories}))
*/
          __pyx_t_3 = (__pyx_v_categories != Py_None);
          if (__pyx_t_3) {

            /* "pyarrow/table.pxi":4087
 *     if categories is not None:
 *         c_options.categorical_columns = make_shared[unordered_set[c_string]](
 *             unordered_set[c_string]({tobytes(cat) for cat in categories}))             # <<<<<<<<<<<<<<
 *     if extension_columns is not None:
 *         c_options.extension_columns = make_shared[unordered_set[c_string]](
*/
            { /* enter inner scope */
              __pyx_t_1 = PySet_New(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 4087, __pyx_L6_error)
              __Pyx_GOTREF(__pyx_t_1);
              if (likely(PyList_CheckExact(__pyx_v_categories)) || PyTuple_CheckExact(__pyx_v_categories)) {
                __pyx_t_4 = __pyx_v_categories; __Pyx_INCREF(__pyx_t_4);
                __pyx_t_5 = 0;
                __pyx_t_6 = NULL;
              } else {
                __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_categories); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 4087, __pyx_L6_error)
                __Pyx_GOTREF(__pyx_t_4);
                __pyx_t_6 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 4087, __pyx_L6_error)
              }
              for (;;) {
                if (likely(!__pyx_t_6)) {
                  if (likely(PyList_CheckExact(__pyx_t_4))) {
                    {
                      Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_4);
                      #if !CYTHON_ASSUME_SAFE_SIZE
                      if (unlikely((__pyx_temp < 0))) __PYX_ERR(17, 4087, __pyx_L6_error)
                      #endif
                      if (__pyx_t_5 >= __pyx_temp) break;
                    }
                    __pyx_t_7 = __Pyx_PyList_GetItemRefFast(__pyx_t_4, __pyx_t_5, __Pyx_ReferenceSharing_OwnStrongReference);
                    ++__pyx_t_5;
                  } else {
                    {
                      Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_4);
                      #if !CYTHON_ASSUME_SAFE_SIZE
                      if (unlikely((__pyx_temp < 0))) __PYX_ERR(17, 4087, __pyx_L6_error)
                      #endif
                      if (__pyx_t_5 >= __pyx_temp) break;
                    }
                    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                    __pyx_t_7 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5));
                    #else
                    __pyx_t_7 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_5);
                    #endif
                    ++__pyx_t_5;
                  }
                  if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 4087, __pyx_L6_error)
                } else {
                  __pyx_t_7 = __pyx_t_6(__pyx_t_4);
                  if (unlikely(!__pyx_t_7)) {
                    PyObject* exc_type = PyErr_Occurred();
                    if (exc_type) {
                      if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(17, 4087, __pyx_L6_error)
                      PyErr_Clear();
                    }
                    break;
                  }
                }
                __Pyx_GOTREF(__pyx_t_7);
                __Pyx_XDECREF_SET(__pyx_9genexpr27__pyx_v_cat, __pyx_t_7);
                __pyx_t_7 = 0;
                __pyx_t_8 = NULL;
                __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_tobytes); if (unlikely(!__pyx_t_9)) __PYX_ERR(17, 4087, __pyx_L6_error)
                __Pyx_GOTREF(__pyx_t_9);
                __pyx_t_10 = 1;
                #if CYTHON_UNPACK_METHODS
                if (unlikely(PyMethod_Check(__pyx_t_9))) {
                  __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_9);
                  assert(__pyx_t_8);
                  PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_9);
                  __Pyx_INCREF(__pyx_t_8);
                  __Pyx_INCREF(__pyx__function);
                  __Pyx_DECREF_SET(__pyx_t_9, __pyx__function);
                  __pyx_t_10 = 0;
                }
                #endif
                {
                  PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_9genexpr27__pyx_v_cat};
                  __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
                  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
                  if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 4087, __pyx_L6_error)
                  __Pyx_GOTREF(__pyx_t_7);
                }
                if (unlikely(PySet_Add(__pyx_t_1, (PyObject*)__pyx_t_7))) __PYX_ERR(17, 4087, __pyx_L6_error)
                __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
              }
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __Pyx_XDECREF(__pyx_9genexpr27__pyx_v_cat); __pyx_9genexpr27__pyx_v_cat = 0;
              goto __pyx_L10_exit_scope;
              __pyx_L6_error:;
              __Pyx_XDECREF(__pyx_9genexpr27__pyx_v_cat); __pyx_9genexpr27__pyx_v_cat = 0;
              goto __pyx_L1_error;
              __pyx_L10_exit_scope:;
            } /* exit inner scope */
            __pyx_t_11 = __pyx_convert_unordered_set_from_py_std_3a__3a_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(17, 4087, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            try {
              __pyx_t_12 = std::unordered_set<std::string> (__pyx_t_11);
            } catch(...) {
              __Pyx_CppExn2PyErr();
              __PYX_ERR(17, 4087, __pyx_L1_error)
            }

            /* "pyarrow/table.pxi":4086
 * 
 *     if categories is not None:
 *         c_options.categorical_columns = make_shared[unordered_set[c_string]](             # <<<<<<<<<<<<<<
 *             unordered_set[c_string]({tobytes(cat) for cat in categories}))
 *     if extension_columns is not None:
*/
            try {
              __pyx_t_13 = std::make_shared<std::unordered_set<std::string> >(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_12));
            } catch(...) {
              __Pyx_CppExn2PyErr();
              __PYX_ERR(17, 4086, __pyx_L1_error)
            }
            __pyx_v_c_options.categorical_columns = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_13);

            /* "pyarrow/table.pxi":4085
 *         PandasOptions c_options = _convert_pandas_options(options)
 * 
 *     if categories is not None:             # <<<<<<<<<<<<<<
 *         c_options.categorical_columns = make_shared[unordered_set[c_string]](
 *             unordered_set[c_string]({tobytes(cat) for cat in categories}))
*/
          }

          /* "pyarrow/table.pxi":4088
 *         c_options.categorical_columns = make_shared[unordered_set[c_string]](
 *             unordered_set[c_string]({tobytes(cat) for cat in categories}))
 *     if extension_columns is not None:             # <<<<<<<<<<<<<<
 *         c_options.extension_columns = make_shared[unordered_set[c_string]](
 *             unordered_set[c_string]({tobytes(col) for col in extension_columns}))
*/
          __pyx_t_3 = (__pyx_v_extension_columns != Py_None);
          if (__pyx_t_3) {

            /* "pyarrow/table.pxi":4090
 *     if extension_columns is not None:
 *         c_options.extension_columns = make_shared[unordered_set[c_string]](
 *             unordered_set[c_string]({tobytes(col) for col in extension_columns}))             # <<<<<<<<<<<<<<
 * 
 *     if pandas_api.is_v1():
*/
            { /* enter inner scope */
              __pyx_t_1 = PySet_New(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 4090, __pyx_L14_error)
              __Pyx_GOTREF(__pyx_t_1);
              if (likely(PyList_CheckExact(__pyx_v_extension_columns)) || PyTuple_CheckExact(__pyx_v_extension_columns)) {
                __pyx_t_4 = __pyx_v_extension_columns; __Pyx_INCREF(__pyx_t_4);
                __pyx_t_5 = 0;
                __pyx_t_6 = NULL;
              } else {
                __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_extension_columns); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 4090, __pyx_L14_error)
                __Pyx_GOTREF(__pyx_t_4);
                __pyx_t_6 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 4090, __pyx_L14_error)
              }
              for (;;) {
                if (likely(!__pyx_t_6)) {
                  if (likely(PyList_CheckExact(__pyx_t_4))) {
                    {
                      Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_4);
                      #if !CYTHON_ASSUME_SAFE_SIZE
                      if (unlikely((__pyx_temp < 0))) __PYX_ERR(17, 4090, __pyx_L14_error)
                      #endif
                      if (__pyx_t_5 >= __pyx_temp) break;
                    }
                    __pyx_t_7 = __Pyx_PyList_GetItemRefFast(__pyx_t_4, __pyx_t_5, __Pyx_ReferenceSharing_OwnStrongReference);
                    ++__pyx_t_5;
                  } else {
                    {
                      Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_4);
                      #if !CYTHON_ASSUME_SAFE_SIZE
                      if (unlikely((__pyx_temp < 0))) __PYX_ERR(17, 4090, __pyx_L14_error)
                      #endif
                      if (__pyx_t_5 >= __pyx_temp) break;
                    }
                    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                    __pyx_t_7 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5));
                    #else
                    __pyx_t_7 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_5);
                    #endif
                    ++__pyx_t_5;
                  }
                  if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 4090, __pyx_L14_error)
                } else {
                  __pyx_t_7 = __pyx_t_6(__pyx_t_4);
                  if (unlikely(!__pyx_t_7)) {
                    PyObject* exc_type = PyErr_Occurred();
                    if (exc_type) {
                      if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(17, 4090, __pyx_L14_error)
                      PyErr_Clear();
                    }
                    break;
                  }
                }
                __Pyx_GOTREF(__pyx_t_7);
                __Pyx_XDECREF_SET(__pyx_9genexpr28__pyx_v_col, __pyx_t_7);
                __pyx_t_7 = 0;
                __pyx_t_9 = NULL;
                __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_tobytes); if (unlikely(!__pyx_t_8)) __PYX_ERR(17, 4090, __pyx_L14_error)
                __Pyx_GOTREF(__pyx_t_8);
                __pyx_t_10 = 1;
                #if CYTHON_UNPACK_METHODS
                if (unlikely(PyMethod_Check(__pyx_t_8))) {
                  __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
                  assert(__pyx_t_9);
                  PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8);
                  __Pyx_INCREF(__pyx_t_9);
                  __Pyx_INCREF(__pyx__function);
                  __Pyx_DECREF_SET(__pyx_t_8, __pyx__function);
                  __pyx_t_10 = 0;
                }
                #endif
                {
                  PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_9genexpr28__pyx_v_col};
                  __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
                  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                  if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 4090, __pyx_L14_error)
                  __Pyx_GOTREF(__pyx_t_7);
                }
                if (unlikely(PySet_Add(__pyx_t_1, (PyObject*)__pyx_t_7))) __PYX_ERR(17, 4090, __pyx_L14_error)
                __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
              }
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __Pyx_XDECREF(__pyx_9genexpr28__pyx_v_col); __pyx_9genexpr28__pyx_v_col = 0;
              goto __pyx_L18_exit_scope;
              __pyx_L14_error:;
              __Pyx_XDECREF(__pyx_9genexpr28__pyx_v_col); __pyx_9genexpr28__pyx_v_col = 0;
              goto __pyx_L1_error;
              __pyx_L18_exit_scope:;
            } /* exit inner scope */
            __pyx_t_12 = __pyx_convert_unordered_set_from_py_std_3a__3a_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(17, 4090, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            try {
              __pyx_t_11 = std::unordered_set<std::string> (__pyx_t_12);
            } catch(...) {
              __Pyx_CppExn2PyErr();
              __PYX_ERR(17, 4090, __pyx_L1_error)
            }

            /* "pyarrow/table.pxi":4089
 *             unordered_set[c_string]({tobytes(cat) for cat in categories}))
 *     if extension_columns is not None:
 *         c_options.extension_columns = make_shared[unordered_set[c_string]](             # <<<<<<<<<<<<<<
 *             unordered_set[c_string]({tobytes(col) for col in extension_columns}))
 * 
*/
            try {
              __pyx_t_13 = std::make_shared<std::unordered_set<std::string> >(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_11));
            } catch(...) {
              __Pyx_CppExn2PyErr();
              __PYX_ERR(17, 4089, __pyx_L1_error)
            }
            __pyx_v_c_options.extension_columns = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_13);

            /* "pyarrow/table.pxi":4088
 *         c_options.categorical_columns = make_shared[unordered_set[c_string]](
 *             unordered_set[c_string]({tobytes(cat) for cat in categories}))
 *     if extension_columns is not None:             # <<<<<<<<<<<<<<
 *         c_options.extension_columns = make_shared[unordered_set[c_string]](
 *             unordered_set[c_string]({tobytes(col) for col in extension_columns}))
*/
          }

          /* "pyarrow/table.pxi":4092
 *             unordered_set[c_string]({tobytes(col) for col in extension_columns}))
 * 
 *     if pandas_api.is_v1():             # <<<<<<<<<<<<<<
 *         # ARROW-3789: Coerce date/timestamp types to datetime64[ns]
 *         c_options.coerce_temporal_nanoseconds = True
*/
          __pyx_t_4 = ((PyObject *)__pyx_v_7pyarrow_3lib_pandas_api);
          __Pyx_INCREF(__pyx_t_4);
          __pyx_t_10 = 0;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
            __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_is_v1, __pyx_callargs+__pyx_t_10, (1-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
            if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 4092, __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(17, 4092, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          if (__pyx_t_3) {

            /* "pyarrow/table.pxi":4094
 *     if pandas_api.is_v1():
 *         # ARROW-3789: Coerce date/timestamp types to datetime64[ns]
 *         c_options.coerce_temporal_nanoseconds = True             # <<<<<<<<<<<<<<
 * 
 *     if c_options.self_destruct:
*/
            __pyx_v_c_options.coerce_temporal_nanoseconds = 1;

            /* "pyarrow/table.pxi":4092
 *             unordered_set[c_string]({tobytes(col) for col in extension_columns}))
 * 
 *     if pandas_api.is_v1():             # <<<<<<<<<<<<<<
 *         # ARROW-3789: Coerce date/timestamp types to datetime64[ns]
 *         c_options.coerce_temporal_nanoseconds = True
*/
          }

          /* "pyarrow/table.pxi":4096
 *         c_options.coerce_temporal_nanoseconds = True
 * 
 *     if c_options.self_destruct:             # <<<<<<<<<<<<<<
 *         # Move the shared_ptr, table is now unsafe to use further
 *         c_table = move(table.sp_table)
*/
          __pyx_t_3 = (__pyx_v_c_options.self_destruct != 0);
          if (__pyx_t_3) {

            /* "pyarrow/table.pxi":4098
 *     if c_options.self_destruct:
 *         # Move the shared_ptr, table is now unsafe to use further
 *         c_table = move(table.sp_table)             # <<<<<<<<<<<<<<
 *         table.table = NULL
 *     else:
*/
            if (unlikely(((PyObject *)__pyx_v_table) == Py_None)) {
              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_table");
              __PYX_ERR(17, 4098, __pyx_L1_error)
            }
            __pyx_v_c_table = cython_std::move<std::shared_ptr< arrow::Table> >(__pyx_v_table->sp_table);

            /* "pyarrow/table.pxi":4099
 *         # Move the shared_ptr, table is now unsafe to use further
 *         c_table = move(table.sp_table)
 *         table.table = NULL             # <<<<<<<<<<<<<<
 *     else:
 *         c_table = table.sp_table
*/
            if (unlikely(((PyObject *)__pyx_v_table) == Py_None)) {
              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "table");
              __PYX_ERR(17, 4099, __pyx_L1_error)
            }
            __pyx_v_table->table = NULL;

            /* "pyarrow/table.pxi":4096
 *         c_options.coerce_temporal_nanoseconds = True
 * 
 *     if c_options.self_destruct:             # <<<<<<<<<<<<<<
 *         # Move the shared_ptr, table is now unsafe to use further
 *         c_table = move(table.sp_table)
*/
            goto __pyx_L20;
          }

          /* "pyarrow/table.pxi":4101
 *         table.table = NULL
 *     else:
 *         c_table = table.sp_table             # <<<<<<<<<<<<<<
 * 
 *     with nogil:
*/
          /*else*/ {
            if (unlikely(((PyObject *)__pyx_v_table) == Py_None)) {
              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_table");
              __PYX_ERR(17, 4101, __pyx_L1_error)
            }
            __pyx_t_14 = __pyx_v_table->sp_table;
            __pyx_v_c_table = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_14);
          }
          __pyx_L20:;

          /* "pyarrow/table.pxi":4103
 *         c_table = table.sp_table
 * 
 *     with nogil:             # <<<<<<<<<<<<<<
 *         check_status(
 *             libarrow_python.ConvertTableToPandas(c_options, move(c_table),
*/
          {
              PyThreadState * _save;
              _save = PyEval_SaveThread();
              __Pyx_FastGIL_Remember();
              /*try:*/ {

                /* "pyarrow/table.pxi":4104
 * 
 *     with nogil:
 *         check_status(             # <<<<<<<<<<<<<<
 *             libarrow_python.ConvertTableToPandas(c_options, move(c_table),
 *                                                  &result_obj)
*/
                __pyx_t_15 = __pyx_f_7pyarrow_3lib_check_status(arrow::py::ConvertTableToPandas(__pyx_v_c_options, cython_std::move<std::shared_ptr< arrow::Table> >(__pyx_v_c_table), (&__pyx_v_result_obj))); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(17, 4104, __pyx_L22_error)
              }

              /* "pyarrow/table.pxi":4103
 *         c_table = table.sp_table
 * 
 *     with nogil:             # <<<<<<<<<<<<<<
 *         check_status(
 *             libarrow_python.ConvertTableToPandas(c_options, move(c_table),
*/
              /*finally:*/ {
                /*normal exit:*/{
                  __Pyx_FastGIL_Forget();
                  PyEval_RestoreThread(_save);
                  goto __pyx_L23;
                }
                __pyx_L22_error: {
                  __Pyx_FastGIL_Forget();
                  PyEval_RestoreThread(_save);
                  goto __pyx_L1_error;
                }
                __pyx_L23:;
              }
          }

          /* "pyarrow/table.pxi":4109
 *         )
 * 
 *     return PyObject_to_object(result_obj)             # <<<<<<<<<<<<<<
 * 
 * 
*/
          __Pyx_XDECREF(__pyx_r);
          __pyx_t_1 = __pyx_f_7pyarrow_8includes_6common_PyObject_to_object(__pyx_v_result_obj); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 4109, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_r = __pyx_t_1;
          __pyx_t_1 = 0;
          goto __pyx_L0;

          /* "pyarrow/table.pxi":4078
 * 
 * 
 * def table_to_blocks(options, Table table, categories, extension_columns):             # <<<<<<<<<<<<<<
 *     cdef:
 *         PyObject* result_obj
*/

          /* function exit code */
          __pyx_L1_error:;
          __Pyx_XDECREF(__pyx_t_1);
          __Pyx_XDECREF(__pyx_t_4);
          __Pyx_XDECREF(__pyx_t_7);
          __Pyx_XDECREF(__pyx_t_8);
          __Pyx_XDECREF(__pyx_t_9);
          __Pyx_AddTraceback("pyarrow.lib.table_to_blocks", __pyx_clineno, __pyx_lineno, __pyx_filename);
          __pyx_r = NULL;
          __pyx_L0:;
          __Pyx_XDECREF(__pyx_9genexpr27__pyx_v_cat);
          __Pyx_XDECREF(__pyx_9genexpr28__pyx_v_col);
          __Pyx_XGIVEREF(__pyx_r);
          __Pyx_RefNannyFinishContext();
          return __pyx_r;
        }

        /* "pyarrow/table.pxi":4224
 *     """
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self.table = NULL
 *         self._init_is_cpu = False
*/

        /* Python wrapper */
        static int __pyx_pw_7pyarrow_3lib_5Table_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
        static int __pyx_pw_7pyarrow_3lib_5Table_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
          CYTHON_UNUSED Py_ssize_t __pyx_nargs;
          CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
          int __pyx_r;
          __Pyx_RefNannyDeclarations
          __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
          #if CYTHON_ASSUME_SAFE_SIZE
          __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
          #else
          __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
          #endif
          __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
          if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, __pyx_nargs); return -1; }
          const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
          if (unlikely(__pyx_kwds_len < 0)) return -1;
          if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__cinit__", __pyx_kwds); return -1;}
          __pyx_r = __pyx_pf_7pyarrow_3lib_5Table___cinit__(((struct __pyx_obj_7pyarrow_3lib_Table *)__pyx_v_self));

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

        static int __pyx_pf_7pyarrow_3lib_5Table___cinit__(struct __pyx_obj_7pyarrow_3lib_Table *__pyx_v_self) {
          int __pyx_r;
          int __pyx_lineno = 0;
          const char *__pyx_filename = NULL;
          int __pyx_clineno = 0;

          /* "pyarrow/table.pxi":4225
 * 
 *     def __cinit__(self):
 *         self.table = NULL             # <<<<<<<<<<<<<<
 *         self._init_is_cpu = False
 * 
*/
          if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
            PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "table");
            __PYX_ERR(17, 4225, __pyx_L1_error)
          }
          __pyx_v_self->table = NULL;

          /* "pyarrow/table.pxi":4226
 *     def __cinit__(self):
 *         self.table = NULL
 *         self._init_is_cpu = False             # <<<<<<<<<<<<<<
 * 
 *     cdef void init(self, const shared_ptr[CTable]& table):
*/
          if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
            PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_init_is_cpu");
            __PYX_ERR(17, 4226, __pyx_L1_error)
          }
          __pyx_v_self->_init_is_cpu = 0;

          /* "pyarrow/table.pxi":4224
 *     """
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self.table = NULL
 *         self._init_is_cpu = False
*/

          /* function exit code */
          __pyx_r = 0;
          goto __pyx_L0;
          __pyx_L1_error:;
          __Pyx_AddTraceback("pyarrow.lib.Table.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
          __pyx_r = -1;
          __pyx_L0:;
          return __pyx_r;
        }

        /* "pyarrow/table.pxi":4228
 *         self._init_is_cpu = False
 * 
 *     cdef void init(self, const shared_ptr[CTable]& table):             # <<<<<<<<<<<<<<
 *         self.sp_table = table
 *         self.table = table.get()
*/

        static void __pyx_f_7pyarrow_3lib_5Table_init(struct __pyx_obj_7pyarrow_3lib_Table *__pyx_v_self, std::shared_ptr< arrow::Table>  const &__pyx_v_table) {
          int __pyx_lineno = 0;
          const char *__pyx_filename = NULL;
          int __pyx_clineno = 0;

          /* "pyarrow/table.pxi":4229
 * 
 *     cdef void init(self, const shared_ptr[CTable]& table):
 *         self.sp_table = table             # <<<<<<<<<<<<<<
 *         self.table = table.get()
 * 
*/
          if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
            PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_table");
            __PYX_ERR(17, 4229, __pyx_L1_error)
          }
          __pyx_v_self->sp_table = __pyx_v_table;

          /* "pyarrow/table.pxi":4230
 *     cdef void init(self, const shared_ptr[CTable]& table):
 *         self.sp_table = table
 *         self.table = table.get()             # <<<<<<<<<<<<<<
 * 
 *     def _is_initialized(self):
*/
          if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
            PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "table");
            __PYX_ERR(17, 4230, __pyx_L1_error)
          }
          __pyx_v_self->table = __pyx_v_table.get();

          /* "pyarrow/table.pxi":4228
 *         self._init_is_cpu = False
 * 
 *     cdef void init(self, const shared_ptr[CTable]& table):             # <<<<<<<<<<<<<<
 *         self.sp_table = table
 *         self.table = table.get()
*/

          /* function exit code */
          goto __pyx_L0;
          __pyx_L1_error:;
          __Pyx_AddTraceback("pyarrow.lib.Table.init", __pyx_clineno, __pyx_lineno, __pyx_filename);
          __pyx_L0:;
        }

        /* "pyarrow/table.pxi":4232
 *         self.table = table.get()
 * 
 *     def _is_initialized(self):             # <<<<<<<<<<<<<<
 *         return self.table != NULL
 * 
*/

        /* Python wrapper */
        static PyObject *__pyx_pw_7pyarrow_3lib_5Table_3_is_initialized(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
        PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_5Table_2_is_initialized, "Table._is_initialized(self)");
        static PyMethodDef __pyx_mdef_7pyarrow_3lib_5Table_3_is_initialized = {"_is_initialized", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Table_3_is_initialized, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Table_2_is_initialized};
        static PyObject *__pyx_pw_7pyarrow_3lib_5Table_3_is_initialized(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
          #if !CYTHON_METH_FASTCALL
          CYTHON_UNUSED Py_ssize_t __pyx_nargs;
          #endif
          CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
          PyObject *__pyx_r = 0;
          __Pyx_RefNannyDeclarations
          __Pyx_RefNannySetupContext("_is_initialized (wrapper)", 0);
          #if !CYTHON_METH_FASTCALL
          #if CYTHON_ASSUME_SAFE_SIZE
          __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
          #else
          __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
          #endif
          #endif
          __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
          if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("_is_initialized", 1, 0, 0, __pyx_nargs); return NULL; }
          const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
          if (unlikely(__pyx_kwds_len < 0)) return NULL;
          if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("_is_initialized", __pyx_kwds); return NULL;}
          __pyx_r = __pyx_pf_7pyarrow_3lib_5Table_2_is_initialized(((struct __pyx_obj_7pyarrow_3lib_Table *)__pyx_v_self));

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

        static PyObject *__pyx_pf_7pyarrow_3lib_5Table_2_is_initialized(struct __pyx_obj_7pyarrow_3lib_Table *__pyx_v_self) {
          PyObject *__pyx_r = NULL;
          __Pyx_RefNannyDeclarations
          PyObject *__pyx_t_1 = NULL;
          int __pyx_lineno = 0;
          const char *__pyx_filename = NULL;
          int __pyx_clineno = 0;
          __Pyx_RefNannySetupContext("_is_initialized", 0);

          /* "pyarrow/table.pxi":4233
 * 
 *     def _is_initialized(self):
 *         return self.table != NULL             # <<<<<<<<<<<<<<
 * 
 *     def validate(self, *, full=False):
*/
          __Pyx_XDECREF(__pyx_r);
          if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
            PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "table");
            __PYX_ERR(17, 4233, __pyx_L1_error)
          }
          __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_self->table != NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 4233, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_r = __pyx_t_1;
          __pyx_t_1 = 0;
          goto __pyx_L0;

          /* "pyarrow/table.pxi":4232
 *         self.table = table.get()
 * 
 *     def _is_initialized(self):             # <<<<<<<<<<<<<<
 *         return self.table != NULL
 * 
*/

          /* function exit code */
          __pyx_L1_error:;
          __Pyx_XDECREF(__pyx_t_1);
          __Pyx_AddTraceback("pyarrow.lib.Table._is_initialized", __pyx_clineno, __pyx_lineno, __pyx_filename);
          __pyx_r = NULL;
          __pyx_L0:;
          __Pyx_XGIVEREF(__pyx_r);
          __Pyx_RefNannyFinishContext();
          return __pyx_r;
        }

        /* "pyarrow/table.pxi":4235
 *         return self.table != NULL
 * 
 *     def validate(self, *, full=False):             # <<<<<<<<<<<<<<
 *         """
 *         Perform validation checks.  An exception is raised if validation fails.
*/

        /* Python wrapper */
        static PyObject *__pyx_pw_7pyarrow_3lib_5Table_5validate(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
        PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_5Table_4validate, "Table.validate(self, *, full=False)\n\nPerform validation checks.  An exception is raised if validation fails.\n\nBy default only cheap validation checks are run.  Pass `full=True`\nfor thorough validation checks (potentially O(n)).\n\nParameters\n----------\nfull : bool, default False\n    If True, run expensive checks, otherwise cheap checks only.\n\nRaises\n------\nArrowInvalid");
        static PyMethodDef __pyx_mdef_7pyarrow_3lib_5Table_5validate = {"validate", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Table_5validate, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Table_4validate};
        static PyObject *__pyx_pw_7pyarrow_3lib_5Table_5validate(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
          PyObject *__pyx_v_full = 0;
          #if !CYTHON_METH_FASTCALL
          CYTHON_UNUSED Py_ssize_t __pyx_nargs;
          #endif
          CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
          PyObject* values[1] = {0};
          int __pyx_lineno = 0;
          const char *__pyx_filename = NULL;
          int __pyx_clineno = 0;
          PyObject *__pyx_r = 0;
          __Pyx_RefNannyDeclarations
          __Pyx_RefNannySetupContext("validate (wrapper)", 0);
          #if !CYTHON_METH_FASTCALL
          #if CYTHON_ASSUME_SAFE_SIZE
          __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
          #else
          __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
          #endif
          #endif
          __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
          {
            PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_full,0};
            const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
            if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(17, 4235, __pyx_L3_error)
            if (__pyx_kwds_len > 0) {
              switch (__pyx_nargs) {
                case  0: break;
                default: goto __pyx_L5_argtuple_error;
              }
              if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, 0, __pyx_kwds_len, "validate", 0) < (0)) __PYX_ERR(17, 4235, __pyx_L3_error)
              if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_False));
            } else if (unlikely(__pyx_nargs != 0)) {
              goto __pyx_L5_argtuple_error;
            } else {
              if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_False));
            }
            __pyx_v_full = values[0];
          }
          goto __pyx_L6_skip;
          __pyx_L5_argtuple_error:;
          __Pyx_RaiseArgtupleInvalid("validate", 1, 0, 0, __pyx_nargs); __PYX_ERR(17, 4235, __pyx_L3_error)
          __pyx_L6_skip:;
          goto __pyx_L4_argument_unpacking_done;
          __pyx_L3_error:;
          for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
            Py_XDECREF(values[__pyx_temp]);
          }
          __Pyx_AddTraceback("pyarrow.lib.Table.validate", __pyx_clineno, __pyx_lineno, __pyx_filename);
          __Pyx_RefNannyFinishContext();
          return NULL;
          __pyx_L4_argument_unpacking_done:;
          __pyx_r = __pyx_pf_7pyarrow_3lib_5Table_4validate(((struct __pyx_obj_7pyarrow_3lib_Table *)__pyx_v_self), __pyx_v_full);

          /* function exit code */
          for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
            Py_XDECREF(values[__pyx_temp]);
          }
          __Pyx_RefNannyFinishContext();
          return __pyx_r;
        }

        static PyObject *__pyx_pf_7pyarrow_3lib_5Table_4validate(struct __pyx_obj_7pyarrow_3lib_Table *__pyx_v_self, PyObject *__pyx_v_full) {
          PyObject *__pyx_r = NULL;
          __Pyx_RefNannyDeclarations
          int __pyx_t_1;
          int __pyx_t_2;
          int __pyx_lineno = 0;
          const char *__pyx_filename = NULL;
          int __pyx_clineno = 0;
          __Pyx_RefNannySetupContext("validate", 0);

          /* "pyarrow/table.pxi":4251
 *         ArrowInvalid
 *         """
 *         if full:             # <<<<<<<<<<<<<<
 *             self._assert_cpu()
 *             with nogil:
*/
          __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_full); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(17, 4251, __pyx_L1_error)
          if (__pyx_t_1) {

            /* "pyarrow/table.pxi":4252
 *         """
 *         if full:
 *             self._assert_cpu()             # <<<<<<<<<<<<<<
 *             with nogil:
 *                 check_status(self.table.ValidateFull())
*/
            if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_assert_cpu");
              __PYX_ERR(17, 4252, __pyx_L1_error)
            }
            ((struct __pyx_vtabstruct_7pyarrow_3lib_Table *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._assert_cpu(((struct __pyx_obj_7pyarrow_3lib__Tabular *)__pyx_v_self)); if (unlikely(PyErr_Occurred())) __PYX_ERR(17, 4252, __pyx_L1_error)

            /* "pyarrow/table.pxi":4253
 *         if full:
 *             self._assert_cpu()
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 check_status(self.table.ValidateFull())
 *         else:
*/
            {
                PyThreadState * _save;
                _save = PyEval_SaveThread();
                __Pyx_FastGIL_Remember();
                /*try:*/ {

                  /* "pyarrow/table.pxi":4254
 *             self._assert_cpu()
 *             with nogil:
 *                 check_status(self.table.ValidateFull())             # <<<<<<<<<<<<<<
 *         else:
 *             with nogil:
*/
                  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "table");
                    __Pyx_PyGILState_Release(__pyx_gilstate_save);
                    __PYX_ERR(17, 4254, __pyx_L5_error)
                  }
                  __pyx_t_2 = __pyx_f_7pyarrow_3lib_check_status(__pyx_v_self->table->ValidateFull()); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(17, 4254, __pyx_L5_error)
                }

                /* "pyarrow/table.pxi":4253
 *         if full:
 *             self._assert_cpu()
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 check_status(self.table.ValidateFull())
 *         else:
*/
                /*finally:*/ {
                  /*normal exit:*/{
                    __Pyx_FastGIL_Forget();
                    PyEval_RestoreThread(_save);
                    goto __pyx_L6;
                  }
                  __pyx_L5_error: {
                    __Pyx_FastGIL_Forget();
                    PyEval_RestoreThread(_save);
                    goto __pyx_L1_error;
                  }
                  __pyx_L6:;
                }
            }

            /* "pyarrow/table.pxi":4251
 *         ArrowInvalid
 *         """
 *         if full:             # <<<<<<<<<<<<<<
 *             self._assert_cpu()
 *             with nogil:
*/
            goto __pyx_L3;
          }

          /* "pyarrow/table.pxi":4256
 *                 check_status(self.table.ValidateFull())
 *         else:
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 check_status(self.table.Validate())
 * 
*/
          /*else*/ {
            {
                PyThreadState * _save;
                _save = PyEval_SaveThread();
                __Pyx_FastGIL_Remember();
                /*try:*/ {

                  /* "pyarrow/table.pxi":4257
 *         else:
 *             with nogil:
 *                 check_status(self.table.Validate())             # <<<<<<<<<<<<<<
 * 
 *     def __reduce__(self):
*/
                  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "table");
                    __Pyx_PyGILState_Release(__pyx_gilstate_save);
                    __PYX_ERR(17, 4257, __pyx_L8_error)
                  }
                  __pyx_t_2 = __pyx_f_7pyarrow_3lib_check_status(__pyx_v_self->table->Validate()); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(17, 4257, __pyx_L8_error)
                }

                /* "pyarrow/table.pxi":4256
 *                 check_status(self.table.ValidateFull())
 *         else:
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 check_status(self.table.Validate())
 * 
*/
                /*finally:*/ {
                  /*normal exit:*/{
                    __Pyx_FastGIL_Forget();
                    PyEval_RestoreThread(_save);
                    goto __pyx_L9;
                  }
                  __pyx_L8_error: {
                    __Pyx_FastGIL_Forget();
                    PyEval_RestoreThread(_save);
                    goto __pyx_L1_error;
                  }
                  __pyx_L9:;
                }
            }
          }
          __pyx_L3:;

          /* "pyarrow/table.pxi":4235
 *         return self.table != NULL
 * 
 *     def validate(self, *, full=False):             # <<<<<<<<<<<<<<
 *         """
 *         Perform validation checks.  An exception is raised if validation fails.
*/

          /* function exit code */
          __pyx_r = Py_None; __Pyx_INCREF(Py_None);
          goto __pyx_L0;
          __pyx_L1_error:;
          __Pyx_AddTraceback("pyarrow.lib.Table.validate", __pyx_clineno, __pyx_lineno, __pyx_filename);
          __pyx_r = NULL;
          __pyx_L0:;
          __Pyx_XGIVEREF(__pyx_r);
          __Pyx_RefNannyFinishContext();
          return __pyx_r;
        }

        /* "pyarrow/table.pxi":4259
 *                 check_status(self.table.Validate())
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         # Reduce the columns as ChunkedArrays to avoid serializing schema
 *         # data twice
*/

        /* Python wrapper */
        static PyObject *__pyx_pw_7pyarrow_3lib_5Table_7__reduce__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
        PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_5Table_6__reduce__, "Table.__reduce__(self)");
        static PyMethodDef __pyx_mdef_7pyarrow_3lib_5Table_7__reduce__ = {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Table_7__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Table_6__reduce__};
        static PyObject *__pyx_pw_7pyarrow_3lib_5Table_7__reduce__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
          #if !CYTHON_METH_FASTCALL
          CYTHON_UNUSED Py_ssize_t __pyx_nargs;
          #endif
          CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
          PyObject *__pyx_r = 0;
          __Pyx_RefNannyDeclarations
          __Pyx_RefNannySetupContext("__reduce__ (wrapper)", 0);
          #if !CYTHON_METH_FASTCALL
          #if CYTHON_ASSUME_SAFE_SIZE
          __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
          #else
          __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
          #endif
          #endif
          __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
          if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce__", 1, 0, 0, __pyx_nargs); return NULL; }
          const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
          if (unlikely(__pyx_kwds_len < 0)) return NULL;
          if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce__", __pyx_kwds); return NULL;}
          __pyx_r = __pyx_pf_7pyarrow_3lib_5Table_6__reduce__(((struct __pyx_obj_7pyarrow_3lib_Table *)__pyx_v_self));

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

        static PyObject *__pyx_pf_7pyarrow_3lib_5Table_6__reduce__(struct __pyx_obj_7pyarrow_3lib_Table *__pyx_v_self) {
          PyObject *__pyx_v_columns = NULL;
          PyObject *__pyx_9genexpr29__pyx_v_col = NULL;
          PyObject *__pyx_r = NULL;
          __Pyx_RefNannyDeclarations
          PyObject *__pyx_t_1 = NULL;
          PyObject *__pyx_t_2 = NULL;
          PyObject *__pyx_t_3 = NULL;
          Py_ssize_t __pyx_t_4;
          PyObject *(*__pyx_t_5)(PyObject *);
          int __pyx_lineno = 0;
          const char *__pyx_filename = NULL;
          int __pyx_clineno = 0;
          __Pyx_RefNannySetupContext("__reduce__", 0);

          /* "pyarrow/table.pxi":4262
 *         # Reduce the columns as ChunkedArrays to avoid serializing schema
 *         # data twice
 *         self._assert_cpu()             # <<<<<<<<<<<<<<
 *         columns = [col for col in self.columns]
 *         return _reconstruct_table, (columns, self.schema)
*/
          if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
            PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_assert_cpu");
            __PYX_ERR(17, 4262, __pyx_L1_error)
          }
          ((struct __pyx_vtabstruct_7pyarrow_3lib_Table *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._assert_cpu(((struct __pyx_obj_7pyarrow_3lib__Tabular *)__pyx_v_self)); if (unlikely(PyErr_Occurred())) __PYX_ERR(17, 4262, __pyx_L1_error)

          /* "pyarrow/table.pxi":4263
 *         # data twice
 *         self._assert_cpu()
 *         columns = [col for col in self.columns]             # <<<<<<<<<<<<<<
 *         return _reconstruct_table, (columns, self.schema)
 * 
*/
          { /* enter inner scope */
            __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 4263, __pyx_L5_error)
            __Pyx_GOTREF(__pyx_t_1);
            __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_columns); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 4263, __pyx_L5_error)
            __Pyx_GOTREF(__pyx_t_2);
            if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
              __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3);
              __pyx_t_4 = 0;
              __pyx_t_5 = NULL;
            } else {
              __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 4263, __pyx_L5_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_5 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 4263, __pyx_L5_error)
            }
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            for (;;) {
              if (likely(!__pyx_t_5)) {
                if (likely(PyList_CheckExact(__pyx_t_3))) {
                  {
                    Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3);
                    #if !CYTHON_ASSUME_SAFE_SIZE
                    if (unlikely((__pyx_temp < 0))) __PYX_ERR(17, 4263, __pyx_L5_error)
                    #endif
                    if (__pyx_t_4 >= __pyx_temp) break;
                  }
                  __pyx_t_2 = __Pyx_PyList_GetItemRefFast(__pyx_t_3, __pyx_t_4, __Pyx_ReferenceSharing_OwnStrongReference);
                  ++__pyx_t_4;
                } else {
                  {
                    Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3);
                    #if !CYTHON_ASSUME_SAFE_SIZE
                    if (unlikely((__pyx_temp < 0))) __PYX_ERR(17, 4263, __pyx_L5_error)
                    #endif
                    if (__pyx_t_4 >= __pyx_temp) break;
                  }
                  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                  __pyx_t_2 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4));
                  #else
                  __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_4);
                  #endif
                  ++__pyx_t_4;
                }
                if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 4263, __pyx_L5_error)
              } else {
                __pyx_t_2 = __pyx_t_5(__pyx_t_3);
                if (unlikely(!__pyx_t_2)) {
                  PyObject* exc_type = PyErr_Occurred();
                  if (exc_type) {
                    if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(17, 4263, __pyx_L5_error)
                    PyErr_Clear();
                  }
                  break;
                }
              }
              __Pyx_GOTREF(__pyx_t_2);
              __Pyx_XDECREF_SET(__pyx_9genexpr29__pyx_v_col, __pyx_t_2);
              __pyx_t_2 = 0;
              if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_9genexpr29__pyx_v_col))) __PYX_ERR(17, 4263, __pyx_L5_error)
            }
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_9genexpr29__pyx_v_col); __pyx_9genexpr29__pyx_v_col = 0;
            goto __pyx_L9_exit_scope;
            __pyx_L5_error:;
            __Pyx_XDECREF(__pyx_9genexpr29__pyx_v_col); __pyx_9genexpr29__pyx_v_col = 0;
            goto __pyx_L1_error;
            __pyx_L9_exit_scope:;
          } /* exit inner scope */
          __pyx_v_columns = ((PyObject*)__pyx_t_1);
          __pyx_t_1 = 0;

          /* "pyarrow/table.pxi":4264
 *         self._assert_cpu()
 *         columns = [col for col in self.columns]
 *         return _reconstruct_table, (columns, self.schema)             # <<<<<<<<<<<<<<
 * 
 *     def slice(self, offset=0, length=None):
*/
          __Pyx_XDECREF(__pyx_r);
          __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_reconstruct_table); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 4264, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_schema); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 4264, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 4264, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_INCREF(__pyx_v_columns);
          __Pyx_GIVEREF(__pyx_v_columns);
          if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_columns) != (0)) __PYX_ERR(17, 4264, __pyx_L1_error);
          __Pyx_GIVEREF(__pyx_t_3);
          if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3) != (0)) __PYX_ERR(17, 4264, __pyx_L1_error);
          __pyx_t_3 = 0;
          __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 4264, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_GIVEREF(__pyx_t_1);
          if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1) != (0)) __PYX_ERR(17, 4264, __pyx_L1_error);
          __Pyx_GIVEREF(__pyx_t_2);
          if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2) != (0)) __PYX_ERR(17, 4264, __pyx_L1_error);
          __pyx_t_1 = 0;
          __pyx_t_2 = 0;
          __pyx_r = __pyx_t_3;
          __pyx_t_3 = 0;
          goto __pyx_L0;

          /* "pyarrow/table.pxi":4259
 *                 check_status(self.table.Validate())
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         # Reduce the columns as ChunkedArrays to avoid serializing schema
 *         # data twice
*/

          /* function exit code */
          __pyx_L1_error:;
          __Pyx_XDECREF(__pyx_t_1);
          __Pyx_XDECREF(__pyx_t_2);
          __Pyx_XDECREF(__pyx_t_3);
          __Pyx_AddTraceback("pyarrow.lib.Table.__reduce__", __pyx_clineno, __pyx_lineno, __pyx_filename);
          __pyx_r = NULL;
          __pyx_L0:;
          __Pyx_XDECREF(__pyx_v_columns);
          __Pyx_XDECREF(__pyx_9genexpr29__pyx_v_col);
          __Pyx_XGIVEREF(__pyx_r);
          __Pyx_RefNannyFinishContext();
          return __pyx_r;
        }

        /* "pyarrow/table.pxi":4266
 *         return _reconstruct_table, (columns, self.schema)
 * 
 *     def slice(self, offset=0, length=None):             # <<<<<<<<<<<<<<
 *         """
 *         Compute zero-copy slice of this Table.
*/

        /* Python wrapper */
        static PyObject *__pyx_pw_7pyarrow_3lib_5Table_9slice(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
        PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_5Table_8slice, "Table.slice(self, offset=0, length=None)\n\nCompute zero-copy slice of this Table.\n\nParameters\n----------\noffset : int, default 0\n    Offset from start of table to slice.\nlength : int, default None\n    Length of slice (default is until end of table starting from\n    offset).\n\nReturns\n-------\nTable\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> import pandas as pd\n>>> df = pd.DataFrame({'year': [2020, 2022, 2019, 2021],\n...                    'n_legs': [2, 4, 5, 100],\n...                    'animals': [\"Flamingo\", \"Horse\", \"Brittle stars\", \"Centipede\"]})\n>>> table = pa.Table.from_pandas(df)\n>>> table.slice(length=3)\npyarrow.Table\nyear: int64\nn_legs: int64\nanimals: string\n----\nyear: [[2020,2022,2019]]\nn_legs: [[2,4,5]]\nanimals: [[\"Flamingo\",\"Horse\",\"Brittle stars\"]]\n>>> table.slice(offset=2)\npyarrow.Table\nyear: int64\nn_legs: int64\nanimals: string\n----\nyear: [[2019,2021]]\nn_legs: [[5,100]]\nanimals: [[\"Brittle stars\",\"Centipede\"]]\n>>> table.slice(offset=2, length=1)\npyarrow.Table\nyear: int64\nn_legs: int64\nanimals: string\n----\nyear: [[2019]]\nn_legs: [[5]]\nanimals: [[\"Brittle stars\"]]");
        static PyMethodDef __pyx_mdef_7pyarrow_3lib_5Table_9slice = {"slice", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Table_9slice, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Table_8slice};
        static PyObject *__pyx_pw_7pyarrow_3lib_5Table_9slice(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
          PyObject *__pyx_v_offset = 0;
          PyObject *__pyx_v_length = 0;
          #if !CYTHON_METH_FASTCALL
          CYTHON_UNUSED Py_ssize_t __pyx_nargs;
          #endif
          CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
          PyObject* values[2] = {0,0};
          int __pyx_lineno = 0;
          const char *__pyx_filename = NULL;
          int __pyx_clineno = 0;
          PyObject *__pyx_r = 0;
          __Pyx_RefNannyDeclarations
          __Pyx_RefNannySetupContext("slice (wrapper)", 0);
          #if !CYTHON_METH_FASTCALL
          #if CYTHON_ASSUME_SAFE_SIZE
          __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
          #else
          __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
          #endif
          #endif
          __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
          {
            PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_offset,&__pyx_mstate_global->__pyx_n_u_length,0};
            const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
            if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(17, 4266, __pyx_L3_error)
            if (__pyx_kwds_len > 0) {
              switch (__pyx_nargs) {
                case  2:
                values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(17, 4266, __pyx_L3_error)
                CYTHON_FALLTHROUGH;
                case  1:
                values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 4266, __pyx_L3_error)
                CYTHON_FALLTHROUGH;
                case  0: break;
                default: goto __pyx_L5_argtuple_error;
              }
              const Py_ssize_t kwd_pos_args = __pyx_nargs;
              if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "slice", 0) < (0)) __PYX_ERR(17, 4266, __pyx_L3_error)
              if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_int_0));
              if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
            } else {
              switch (__pyx_nargs) {
                case  2:
                values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(17, 4266, __pyx_L3_error)
                CYTHON_FALLTHROUGH;
                case  1:
                values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 4266, __pyx_L3_error)
                CYTHON_FALLTHROUGH;
                case  0: break;
                default: goto __pyx_L5_argtuple_error;
              }
              if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_int_0));
              if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
            }
            __pyx_v_offset = values[0];
            __pyx_v_length = values[1];
          }
          goto __pyx_L6_skip;
          __pyx_L5_argtuple_error:;
          __Pyx_RaiseArgtupleInvalid("slice", 0, 0, 2, __pyx_nargs); __PYX_ERR(17, 4266, __pyx_L3_error)
          __pyx_L6_skip:;
          goto __pyx_L4_argument_unpacking_done;
          __pyx_L3_error:;
          for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
            Py_XDECREF(values[__pyx_temp]);
          }
          __Pyx_AddTraceback("pyarrow.lib.Table.slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
          __Pyx_RefNannyFinishContext();
          return NULL;
          __pyx_L4_argument_unpacking_done:;
          __pyx_r = __pyx_pf_7pyarrow_3lib_5Table_8slice(((struct __pyx_obj_7pyarrow_3lib_Table *)__pyx_v_self), __pyx_v_offset, __pyx_v_length);

          /* function exit code */
          for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
            Py_XDECREF(values[__pyx_temp]);
          }
          __Pyx_RefNannyFinishContext();
          return __pyx_r;
        }

        static PyObject *__pyx_pf_7pyarrow_3lib_5Table_8slice(struct __pyx_obj_7pyarrow_3lib_Table *__pyx_v_self, PyObject *__pyx_v_offset, PyObject *__pyx_v_length) {
          std::shared_ptr< arrow::Table>  __pyx_v_result;
          PyObject *__pyx_r = NULL;
          __Pyx_RefNannyDeclarations
          PyObject *__pyx_t_1 = NULL;
          int __pyx_t_2;
          PyObject *__pyx_t_3 = NULL;
          size_t __pyx_t_4;
          Py_ssize_t __pyx_t_5;
          PyObject *__pyx_t_6 = NULL;
          PyObject *__pyx_t_7 = NULL;
          int64_t __pyx_t_8;
          int64_t __pyx_t_9;
          int __pyx_lineno = 0;
          const char *__pyx_filename = NULL;
          int __pyx_clineno = 0;
          __Pyx_RefNannySetupContext("slice", 0);
          __Pyx_INCREF(__pyx_v_offset);

          /* "pyarrow/table.pxi":4320
 *         cdef shared_ptr[CTable] result
 * 
 *         if offset < 0:             # <<<<<<<<<<<<<<
 *             raise IndexError('Offset must be non-negative')
 * 
*/
          __pyx_t_1 = PyObject_RichCompare(__pyx_v_offset, __pyx_mstate_global->__pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 4320, __pyx_L1_error)
          __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(17, 4320, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          if (unlikely(__pyx_t_2)) {

            /* "pyarrow/table.pxi":4321
 * 
 *         if offset < 0:
 *             raise IndexError('Offset must be non-negative')             # <<<<<<<<<<<<<<
 * 
 *         offset = min(len(self), offset)
*/
            __pyx_t_3 = NULL;
            __pyx_t_4 = 1;
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Offset_must_be_non_negative};
              __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_IndexError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 4321, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_1);
            }
            __Pyx_Raise(__pyx_t_1, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            __PYX_ERR(17, 4321, __pyx_L1_error)

            /* "pyarrow/table.pxi":4320
 *         cdef shared_ptr[CTable] result
 * 
 *         if offset < 0:             # <<<<<<<<<<<<<<
 *             raise IndexError('Offset must be non-negative')
 * 
*/
          }

          /* "pyarrow/table.pxi":4323
 *             raise IndexError('Offset must be non-negative')
 * 
 *         offset = min(len(self), offset)             # <<<<<<<<<<<<<<
 *         if length is None:
 *             result = self.table.Slice(offset)
*/
          __Pyx_INCREF(__pyx_v_offset);
          __pyx_t_1 = __pyx_v_offset;
          __pyx_t_5 = PyObject_Length(((PyObject *)__pyx_v_self)); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(17, 4323, __pyx_L1_error)
          __pyx_t_6 = PyLong_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 4323, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_t_7 = PyObject_RichCompare(__pyx_t_1, __pyx_t_6, Py_LT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 4323, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(17, 4323, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          if (__pyx_t_2) {
            __Pyx_INCREF(__pyx_t_1);
            __pyx_t_3 = __pyx_t_1;
          } else {
            __pyx_t_7 = PyLong_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 4323, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_7);
            __pyx_t_3 = __pyx_t_7;
            __pyx_t_7 = 0;
          }
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __pyx_t_1 = __pyx_t_3;
          __Pyx_INCREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF_SET(__pyx_v_offset, __pyx_t_1);
          __pyx_t_1 = 0;

          /* "pyarrow/table.pxi":4324
 * 
 *         offset = min(len(self), offset)
 *         if length is None:             # <<<<<<<<<<<<<<
 *             result = self.table.Slice(offset)
 *         else:
*/
          __pyx_t_2 = (__pyx_v_length == Py_None);
          if (__pyx_t_2) {

            /* "pyarrow/table.pxi":4325
 *         offset = min(len(self), offset)
 *         if length is None:
 *             result = self.table.Slice(offset)             # <<<<<<<<<<<<<<
 *         else:
 *             result = self.table.Slice(offset, length)
*/
            if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "table");
              __PYX_ERR(17, 4325, __pyx_L1_error)
            }
            __pyx_t_8 = __Pyx_PyLong_As_int64_t(__pyx_v_offset); if (unlikely((__pyx_t_8 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(17, 4325, __pyx_L1_error)
            __pyx_v_result = __pyx_v_self->table->Slice(__pyx_t_8);

            /* "pyarrow/table.pxi":4324
 * 
 *         offset = min(len(self), offset)
 *         if length is None:             # <<<<<<<<<<<<<<
 *             result = self.table.Slice(offset)
 *         else:
*/
            goto __pyx_L4;
          }

          /* "pyarrow/table.pxi":4327
 *             result = self.table.Slice(offset)
 *         else:
 *             result = self.table.Slice(offset, length)             # <<<<<<<<<<<<<<
 * 
 *         return pyarrow_wrap_table(result)
*/
          /*else*/ {
            if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "table");
              __PYX_ERR(17, 4327, __pyx_L1_error)
            }
            __pyx_t_8 = __Pyx_PyLong_As_int64_t(__pyx_v_offset); if (unlikely((__pyx_t_8 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(17, 4327, __pyx_L1_error)
            __pyx_t_9 = __Pyx_PyLong_As_int64_t(__pyx_v_length); if (unlikely((__pyx_t_9 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(17, 4327, __pyx_L1_error)
            __pyx_v_result = __pyx_v_self->table->Slice(__pyx_t_8, __pyx_t_9);
          }
          __pyx_L4:;

          /* "pyarrow/table.pxi":4329
 *             result = self.table.Slice(offset, length)
 * 
 *         return pyarrow_wrap_table(result)             # <<<<<<<<<<<<<<
 * 
 *     def select(self, object columns):
*/
          __Pyx_XDECREF(__pyx_r);
          __pyx_t_1 = pyarrow_wrap_table(__pyx_v_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 4329, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_r = __pyx_t_1;
          __pyx_t_1 = 0;
          goto __pyx_L0;

          /* "pyarrow/table.pxi":4266
 *         return _reconstruct_table, (columns, self.schema)
 * 
 *     def slice(self, offset=0, length=None):             # <<<<<<<<<<<<<<
 *         """
 *         Compute zero-copy slice of this Table.
*/

          /* function exit code */
          __pyx_L1_error:;
          __Pyx_XDECREF(__pyx_t_1);
          __Pyx_XDECREF(__pyx_t_3);
          __Pyx_XDECREF(__pyx_t_6);
          __Pyx_XDECREF(__pyx_t_7);
          __Pyx_AddTraceback("pyarrow.lib.Table.slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
          __pyx_r = NULL;
          __pyx_L0:;
          __Pyx_XDECREF(__pyx_v_offset);
          __Pyx_XGIVEREF(__pyx_r);
          __Pyx_RefNannyFinishContext();
          return __pyx_r;
        }

        /* "pyarrow/table.pxi":4331
 *         return pyarrow_wrap_table(result)
 * 
 *     def select(self, object columns):             # <<<<<<<<<<<<<<
 *         """
 *         Select columns of the Table.
*/

        /* Python wrapper */
        static PyObject *__pyx_pw_7pyarrow_3lib_5Table_11select(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
        PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_5Table_10select, "Table.select(self, columns)\n\nSelect columns of the Table.\n\nReturns a new Table with the specified columns, and metadata\npreserved.\n\nParameters\n----------\ncolumns : list-like\n    The column names or integer indices to select.\n\nReturns\n-------\nTable\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> import pandas as pd\n>>> df = pd.DataFrame({'year': [2020, 2022, 2019, 2021],\n...                    'n_legs': [2, 4, 5, 100],\n...                    'animals': [\"Flamingo\", \"Horse\", \"Brittle stars\", \"Centipede\"]})\n>>> table = pa.Table.from_pandas(df)\n>>> table.select([0,1])\npyarrow.Table\nyear: int64\nn_legs: int64\n----\nyear: [[2020,2022,2019,2021]]\nn_legs: [[2,4,5,100]]\n>>> table.select([\"year\"])\npyarrow.Table\nyear: int64\n----\nyear: [[2020,2022,2019,2021]]");
        static PyMethodDef __pyx_mdef_7pyarrow_3lib_5Table_11select = {"select", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Table_11select, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Table_10select};
        static PyObject *__pyx_pw_7pyarrow_3lib_5Table_11select(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
          PyObject *__pyx_v_columns = 0;
          #if !CYTHON_METH_FASTCALL
          CYTHON_UNUSED Py_ssize_t __pyx_nargs;
          #endif
          CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
          PyObject* values[1] = {0};
          int __pyx_lineno = 0;
          const char *__pyx_filename = NULL;
          int __pyx_clineno = 0;
          PyObject *__pyx_r = 0;
          __Pyx_RefNannyDeclarations
          __Pyx_RefNannySetupContext("select (wrapper)", 0);
          #if !CYTHON_METH_FASTCALL
          #if CYTHON_ASSUME_SAFE_SIZE
          __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
          #else
          __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
          #endif
          #endif
          __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
          {
            PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_columns,0};
            const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
            if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(17, 4331, __pyx_L3_error)
            if (__pyx_kwds_len > 0) {
              switch (__pyx_nargs) {
                case  1:
                values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 4331, __pyx_L3_error)
                CYTHON_FALLTHROUGH;
                case  0: break;
                default: goto __pyx_L5_argtuple_error;
              }
              const Py_ssize_t kwd_pos_args = __pyx_nargs;
              if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "select", 0) < (0)) __PYX_ERR(17, 4331, __pyx_L3_error)
              for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("select", 1, 1, 1, i); __PYX_ERR(17, 4331, __pyx_L3_error) }
              }
            } else if (unlikely(__pyx_nargs != 1)) {
              goto __pyx_L5_argtuple_error;
            } else {
              values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
              if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 4331, __pyx_L3_error)
            }
            __pyx_v_columns = values[0];
          }
          goto __pyx_L6_skip;
          __pyx_L5_argtuple_error:;
          __Pyx_RaiseArgtupleInvalid("select", 1, 1, 1, __pyx_nargs); __PYX_ERR(17, 4331, __pyx_L3_error)
          __pyx_L6_skip:;
          goto __pyx_L4_argument_unpacking_done;
          __pyx_L3_error:;
          for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
            Py_XDECREF(values[__pyx_temp]);
          }
          __Pyx_AddTraceback("pyarrow.lib.Table.select", __pyx_clineno, __pyx_lineno, __pyx_filename);
          __Pyx_RefNannyFinishContext();
          return NULL;
          __pyx_L4_argument_unpacking_done:;
          __pyx_r = __pyx_pf_7pyarrow_3lib_5Table_10select(((struct __pyx_obj_7pyarrow_3lib_Table *)__pyx_v_self), __pyx_v_columns);

          /* function exit code */
          for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
            Py_XDECREF(values[__pyx_temp]);
          }
          __Pyx_RefNannyFinishContext();
          return __pyx_r;
        }

        static PyObject *__pyx_pf_7pyarrow_3lib_5Table_10select(struct __pyx_obj_7pyarrow_3lib_Table *__pyx_v_self, PyObject *__pyx_v_columns) {
          std::shared_ptr< arrow::Table>  __pyx_v_c_table;
          std::vector<int>  __pyx_v_c_indices;
          PyObject *__pyx_v_idx = NULL;
          PyObject *__pyx_r = NULL;
          __Pyx_RefNannyDeclarations
          PyObject *__pyx_t_1 = NULL;
          Py_ssize_t __pyx_t_2;
          PyObject *(*__pyx_t_3)(PyObject *);
          PyObject *__pyx_t_4 = NULL;
          PyObject *__pyx_t_5 = NULL;
          size_t __pyx_t_6;
          Py_ssize_t __pyx_t_7;
          Py_ssize_t __pyx_t_8;
          Py_ssize_t __pyx_t_9;
          int __pyx_t_10;
          std::shared_ptr< arrow::Table>  __pyx_t_11;
          int __pyx_lineno = 0;
          const char *__pyx_filename = NULL;
          int __pyx_clineno = 0;
          __Pyx_RefNannySetupContext("select", 0);

          /* "pyarrow/table.pxi":4372
 *             vector[int] c_indices
 * 
 *         for idx in columns:             # <<<<<<<<<<<<<<
 *             idx = self._ensure_integer_index(idx)
 *             idx = _normalize_index(idx, self.num_columns)
*/
          if (likely(PyList_CheckExact(__pyx_v_columns)) || PyTuple_CheckExact(__pyx_v_columns)) {
            __pyx_t_1 = __pyx_v_columns; __Pyx_INCREF(__pyx_t_1);
            __pyx_t_2 = 0;
            __pyx_t_3 = NULL;
          } else {
            __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_columns); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 4372, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_1);
            __pyx_t_3 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 4372, __pyx_L1_error)
          }
          for (;;) {
            if (likely(!__pyx_t_3)) {
              if (likely(PyList_CheckExact(__pyx_t_1))) {
                {
                  Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
                  #if !CYTHON_ASSUME_SAFE_SIZE
                  if (unlikely((__pyx_temp < 0))) __PYX_ERR(17, 4372, __pyx_L1_error)
                  #endif
                  if (__pyx_t_2 >= __pyx_temp) break;
                }
                __pyx_t_4 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_2, __Pyx_ReferenceSharing_OwnStrongReference);
                ++__pyx_t_2;
              } else {
                {
                  Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
                  #if !CYTHON_ASSUME_SAFE_SIZE
                  if (unlikely((__pyx_temp < 0))) __PYX_ERR(17, 4372, __pyx_L1_error)
                  #endif
                  if (__pyx_t_2 >= __pyx_temp) break;
                }
                #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                __pyx_t_4 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2));
                #else
                __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2);
                #endif
                ++__pyx_t_2;
              }
              if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 4372, __pyx_L1_error)
            } else {
              __pyx_t_4 = __pyx_t_3(__pyx_t_1);
              if (unlikely(!__pyx_t_4)) {
                PyObject* exc_type = PyErr_Occurred();
                if (exc_type) {
                  if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(17, 4372, __pyx_L1_error)
                  PyErr_Clear();
                }
                break;
              }
            }
            __Pyx_GOTREF(__pyx_t_4);
            __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_4);
            __pyx_t_4 = 0;

            /* "pyarrow/table.pxi":4373
 * 
 *         for idx in columns:
 *             idx = self._ensure_integer_index(idx)             # <<<<<<<<<<<<<<
 *             idx = _normalize_index(idx, self.num_columns)
 *             c_indices.push_back(<int> idx)
*/
            __pyx_t_5 = ((PyObject *)__pyx_v_self);
            __Pyx_INCREF(__pyx_t_5);
            __pyx_t_6 = 0;
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_idx};
              __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_ensure_integer_index, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
              __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
              if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 4373, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_4);
            }
            __Pyx_DECREF_SET(__pyx_v_idx, __pyx_t_4);
            __pyx_t_4 = 0;

            /* "pyarrow/table.pxi":4374
 *         for idx in columns:
 *             idx = self._ensure_integer_index(idx)
 *             idx = _normalize_index(idx, self.num_columns)             # <<<<<<<<<<<<<<
 *             c_indices.push_back(<int> idx)
 * 
*/
            __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_v_idx); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(17, 4374, __pyx_L1_error)
            __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_num_columns); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 4374, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_t_4); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(17, 4374, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            __pyx_t_9 = __pyx_f_7pyarrow_3lib__normalize_index(__pyx_t_7, __pyx_t_8); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1L))) __PYX_ERR(17, 4374, __pyx_L1_error)
            __pyx_t_4 = PyLong_FromSsize_t(__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 4374, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            __Pyx_DECREF_SET(__pyx_v_idx, __pyx_t_4);
            __pyx_t_4 = 0;

            /* "pyarrow/table.pxi":4375
 *             idx = self._ensure_integer_index(idx)
 *             idx = _normalize_index(idx, self.num_columns)
 *             c_indices.push_back(<int> idx)             # <<<<<<<<<<<<<<
 * 
 *         with nogil:
*/
            __pyx_t_10 = __Pyx_PyLong_As_int(__pyx_v_idx); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(17, 4375, __pyx_L1_error)
            try {
              __pyx_v_c_indices.push_back(((int)__pyx_t_10));
            } catch(...) {
              __Pyx_CppExn2PyErr();
              __PYX_ERR(17, 4375, __pyx_L1_error)
            }

            /* "pyarrow/table.pxi":4372
 *             vector[int] c_indices
 * 
 *         for idx in columns:             # <<<<<<<<<<<<<<
 *             idx = self._ensure_integer_index(idx)
 *             idx = _normalize_index(idx, self.num_columns)
*/
          }
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

          /* "pyarrow/table.pxi":4377
 *             c_indices.push_back(<int> idx)
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             c_table = GetResultValue(self.table.SelectColumns(move(c_indices)))
 * 
*/
          {
              PyThreadState * _save;
              _save = PyEval_SaveThread();
              __Pyx_FastGIL_Remember();
              /*try:*/ {

                /* "pyarrow/table.pxi":4378
 * 
 *         with nogil:
 *             c_table = GetResultValue(self.table.SelectColumns(move(c_indices)))             # <<<<<<<<<<<<<<
 * 
 *         return pyarrow_wrap_table(c_table)
*/
                if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                  PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "table");
                  __Pyx_PyGILState_Release(__pyx_gilstate_save);
                  __PYX_ERR(17, 4378, __pyx_L7_error)
                }
                __pyx_t_11 = arrow::py::GetResultValue<std::shared_ptr< arrow::Table> >(__pyx_v_self->table->SelectColumns(cython_std::move<std::vector<int> >(__pyx_v_c_indices))); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(17, 4378, __pyx_L7_error)
                __pyx_v_c_table = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_11);
              }

              /* "pyarrow/table.pxi":4377
 *             c_indices.push_back(<int> idx)
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             c_table = GetResultValue(self.table.SelectColumns(move(c_indices)))
 * 
*/
              /*finally:*/ {
                /*normal exit:*/{
                  __Pyx_FastGIL_Forget();
                  PyEval_RestoreThread(_save);
                  goto __pyx_L8;
                }
                __pyx_L7_error: {
                  __Pyx_FastGIL_Forget();
                  PyEval_RestoreThread(_save);
                  goto __pyx_L1_error;
                }
                __pyx_L8:;
              }
          }

          /* "pyarrow/table.pxi":4380
 *             c_table = GetResultValue(self.table.SelectColumns(move(c_indices)))
 * 
 *         return pyarrow_wrap_table(c_table)             # <<<<<<<<<<<<<<
 * 
 *     def replace_schema_metadata(self, metadata=None):
*/
          __Pyx_XDECREF(__pyx_r);
          __pyx_t_1 = pyarrow_wrap_table(__pyx_v_c_table); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 4380, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_r = __pyx_t_1;
          __pyx_t_1 = 0;
          goto __pyx_L0;

          /* "pyarrow/table.pxi":4331
 *         return pyarrow_wrap_table(result)
 * 
 *     def select(self, object columns):             # <<<<<<<<<<<<<<
 *         """
 *         Select columns of the Table.
*/

          /* function exit code */
          __pyx_L1_error:;
          __Pyx_XDECREF(__pyx_t_1);
          __Pyx_XDECREF(__pyx_t_4);
          __Pyx_XDECREF(__pyx_t_5);
          __Pyx_AddTraceback("pyarrow.lib.Table.select", __pyx_clineno, __pyx_lineno, __pyx_filename);
          __pyx_r = NULL;
          __pyx_L0:;
          __Pyx_XDECREF(__pyx_v_idx);
          __Pyx_XGIVEREF(__pyx_r);
          __Pyx_RefNannyFinishContext();
          return __pyx_r;
        }

        /* "pyarrow/table.pxi":4382
 *         return pyarrow_wrap_table(c_table)
 * 
 *     def replace_schema_metadata(self, metadata=None):             # <<<<<<<<<<<<<<
 *         """
 *         Create shallow copy of table by replacing schema
*/

        /* Python wrapper */
        static PyObject *__pyx_pw_7pyarrow_3lib_5Table_13replace_schema_metadata(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
        PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_5Table_12replace_schema_metadata, "Table.replace_schema_metadata(self, metadata=None)\n\nCreate shallow copy of table by replacing schema\nkey-value metadata with the indicated new metadata (which may be None),\nwhich deletes any existing metadata.\n\nParameters\n----------\nmetadata : dict, default None\n\nReturns\n-------\nTable\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> import pandas as pd\n>>> df = pd.DataFrame({'year': [2020, 2022, 2019, 2021],\n...                    'n_legs': [2, 4, 5, 100],\n...                    'animals': [\"Flamingo\", \"Horse\", \"Brittle stars\", \"Centipede\"]})\n>>> table = pa.Table.from_pandas(df)\n\nConstructing a Table with pyarrow schema and metadata:\n\n>>> my_schema = pa.schema([\n...     pa.field('n_legs', pa.int64()),\n...     pa.field('animals', pa.string())],\n...     metadata={\"n_legs\": \"Number of legs per animal\"})\n>>> table= pa.table(df, my_schema)\n>>> table.schema\nn_legs: int64\nanimals: string\n-- schema metadata --\nn_legs: 'Number of legs per animal'\npandas: ...\n\nCreate a shallow copy of a Table with deleted schema metadata:\n\n>>> table.replace_schema_metadata().schema\nn_legs: int64\nanimals: string\n\nCreate a shallow copy of a Table with new schema metadata:\n\n>>> metadata={\"animals\": \"Which animal\"}\n>>> table.replace_schema_metadata(metadata = metadata).schema\nn_legs: int64\nanimals: string\n-- schema metadata --\nanimals: 'Which animal'");
        static PyMethodDef __pyx_mdef_7pyarrow_3lib_5Table_13replace_schema_metadata = {"replace_schema_metadata", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Table_13replace_schema_metadata, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Table_12replace_schema_metadata};
        static PyObject *__pyx_pw_7pyarrow_3lib_5Table_13replace_schema_metadata(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
          PyObject *__pyx_v_metadata = 0;
          #if !CYTHON_METH_FASTCALL
          CYTHON_UNUSED Py_ssize_t __pyx_nargs;
          #endif
          CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
          PyObject* values[1] = {0};
          int __pyx_lineno = 0;
          const char *__pyx_filename = NULL;
          int __pyx_clineno = 0;
          PyObject *__pyx_r = 0;
          __Pyx_RefNannyDeclarations
          __Pyx_RefNannySetupContext("replace_schema_metadata (wrapper)", 0);
          #if !CYTHON_METH_FASTCALL
          #if CYTHON_ASSUME_SAFE_SIZE
          __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
          #else
          __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
          #endif
          #endif
          __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
          {
            PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_metadata,0};
            const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
            if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(17, 4382, __pyx_L3_error)
            if (__pyx_kwds_len > 0) {
              switch (__pyx_nargs) {
                case  1:
                values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 4382, __pyx_L3_error)
                CYTHON_FALLTHROUGH;
                case  0: break;
                default: goto __pyx_L5_argtuple_error;
              }
              const Py_ssize_t kwd_pos_args = __pyx_nargs;
              if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "replace_schema_metadata", 0) < (0)) __PYX_ERR(17, 4382, __pyx_L3_error)
              if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
            } else {
              switch (__pyx_nargs) {
                case  1:
                values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 4382, __pyx_L3_error)
                CYTHON_FALLTHROUGH;
                case  0: break;
                default: goto __pyx_L5_argtuple_error;
              }
              if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
            }
            __pyx_v_metadata = values[0];
          }
          goto __pyx_L6_skip;
          __pyx_L5_argtuple_error:;
          __Pyx_RaiseArgtupleInvalid("replace_schema_metadata", 0, 0, 1, __pyx_nargs); __PYX_ERR(17, 4382, __pyx_L3_error)
          __pyx_L6_skip:;
          goto __pyx_L4_argument_unpacking_done;
          __pyx_L3_error:;
          for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
            Py_XDECREF(values[__pyx_temp]);
          }
          __Pyx_AddTraceback("pyarrow.lib.Table.replace_schema_metadata", __pyx_clineno, __pyx_lineno, __pyx_filename);
          __Pyx_RefNannyFinishContext();
          return NULL;
          __pyx_L4_argument_unpacking_done:;
          __pyx_r = __pyx_pf_7pyarrow_3lib_5Table_12replace_schema_metadata(((struct __pyx_obj_7pyarrow_3lib_Table *)__pyx_v_self), __pyx_v_metadata);

          /* function exit code */
          for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
            Py_XDECREF(values[__pyx_temp]);
          }
          __Pyx_RefNannyFinishContext();
          return __pyx_r;
        }

        static PyObject *__pyx_pf_7pyarrow_3lib_5Table_12replace_schema_metadata(struct __pyx_obj_7pyarrow_3lib_Table *__pyx_v_self, PyObject *__pyx_v_metadata) {
          std::shared_ptr< arrow::KeyValueMetadata const >  __pyx_v_c_meta;
          std::shared_ptr< arrow::Table>  __pyx_v_c_table;
          PyObject *__pyx_r = NULL;
          __Pyx_RefNannyDeclarations
          PyObject *__pyx_t_1 = NULL;
          struct __pyx_opt_args_7pyarrow_3lib_ensure_metadata __pyx_t_2;
          std::shared_ptr< arrow::KeyValueMetadata const >  __pyx_t_3;
          int __pyx_lineno = 0;
          const char *__pyx_filename = NULL;
          int __pyx_clineno = 0;
          __Pyx_RefNannySetupContext("replace_schema_metadata", 0);
          __Pyx_INCREF(__pyx_v_metadata);

          /* "pyarrow/table.pxi":4438
 *             shared_ptr[CTable] c_table
 * 
 *         metadata = ensure_metadata(metadata, allow_none=True)             # <<<<<<<<<<<<<<
 *         c_meta = pyarrow_unwrap_metadata(metadata)
 *         with nogil:
*/
          __pyx_t_2.__pyx_n = 1;
          __pyx_t_2.allow_none = 1;
          __pyx_t_1 = ((PyObject *)__pyx_f_7pyarrow_3lib_ensure_metadata(__pyx_v_metadata, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 4438, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF_SET(__pyx_v_metadata, __pyx_t_1);
          __pyx_t_1 = 0;

          /* "pyarrow/table.pxi":4439
 * 
 *         metadata = ensure_metadata(metadata, allow_none=True)
 *         c_meta = pyarrow_unwrap_metadata(metadata)             # <<<<<<<<<<<<<<
 *         with nogil:
 *             c_table = self.table.ReplaceSchemaMetadata(c_meta)
*/
          __pyx_t_3 = __pyx_f_7pyarrow_3lib_pyarrow_unwrap_metadata(__pyx_v_metadata); if (unlikely(PyErr_Occurred())) __PYX_ERR(17, 4439, __pyx_L1_error)
          __pyx_v_c_meta = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_3);

          /* "pyarrow/table.pxi":4440
 *         metadata = ensure_metadata(metadata, allow_none=True)
 *         c_meta = pyarrow_unwrap_metadata(metadata)
 *         with nogil:             # <<<<<<<<<<<<<<
 *             c_table = self.table.ReplaceSchemaMetadata(c_meta)
 * 
*/
          {
              PyThreadState * _save;
              _save = PyEval_SaveThread();
              __Pyx_FastGIL_Remember();
              /*try:*/ {

                /* "pyarrow/table.pxi":4441
 *         c_meta = pyarrow_unwrap_metadata(metadata)
 *         with nogil:
 *             c_table = self.table.ReplaceSchemaMetadata(c_meta)             # <<<<<<<<<<<<<<
 * 
 *         return pyarrow_wrap_table(c_table)
*/
                if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                  PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "table");
                  __Pyx_PyGILState_Release(__pyx_gilstate_save);
                  __PYX_ERR(17, 4441, __pyx_L4_error)
                }
                __pyx_v_c_table = __pyx_v_self->table->ReplaceSchemaMetadata(__pyx_v_c_meta);
              }

              /* "pyarrow/table.pxi":4440
 *         metadata = ensure_metadata(metadata, allow_none=True)
 *         c_meta = pyarrow_unwrap_metadata(metadata)
 *         with nogil:             # <<<<<<<<<<<<<<
 *             c_table = self.table.ReplaceSchemaMetadata(c_meta)
 * 
*/
              /*finally:*/ {
                /*normal exit:*/{
                  __Pyx_FastGIL_Forget();
                  PyEval_RestoreThread(_save);
                  goto __pyx_L5;
                }
                __pyx_L4_error: {
                  __Pyx_FastGIL_Forget();
                  PyEval_RestoreThread(_save);
                  goto __pyx_L1_error;
                }
                __pyx_L5:;
              }
          }

          /* "pyarrow/table.pxi":4443
 *             c_table = self.table.ReplaceSchemaMetadata(c_meta)
 * 
 *         return pyarrow_wrap_table(c_table)             # <<<<<<<<<<<<<<
 * 
 *     def flatten(self, MemoryPool memory_pool=None):
*/
          __Pyx_XDECREF(__pyx_r);
          __pyx_t_1 = pyarrow_wrap_table(__pyx_v_c_table); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 4443, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_r = __pyx_t_1;
          __pyx_t_1 = 0;
          goto __pyx_L0;

          /* "pyarrow/table.pxi":4382
 *         return pyarrow_wrap_table(c_table)
 * 
 *     def replace_schema_metadata(self, metadata=None):             # <<<<<<<<<<<<<<
 *         """
 *         Create shallow copy of table by replacing schema
*/

          /* function exit code */
          __pyx_L1_error:;
          __Pyx_XDECREF(__pyx_t_1);
          __Pyx_AddTraceback("pyarrow.lib.Table.replace_schema_metadata", __pyx_clineno, __pyx_lineno, __pyx_filename);
          __pyx_r = NULL;
          __pyx_L0:;
          __Pyx_XDECREF(__pyx_v_metadata);
          __Pyx_XGIVEREF(__pyx_r);
          __Pyx_RefNannyFinishContext();
          return __pyx_r;
        }

        /* "pyarrow/table.pxi":4445
 *         return pyarrow_wrap_table(c_table)
 * 
 *     def flatten(self, MemoryPool memory_pool=None):             # <<<<<<<<<<<<<<
 *         """
 *         Flatten this Table.
*/

        /* Python wrapper */
        static PyObject *__pyx_pw_7pyarrow_3lib_5Table_15flatten(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
        PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_5Table_14flatten, "Table.flatten(self, MemoryPool memory_pool=None)\n\nFlatten this Table.\n\nEach column with a struct type is flattened\ninto one column per struct field.  Other columns are left unchanged.\n\nParameters\n----------\nmemory_pool : MemoryPool, default None\n    For memory allocations, if required, otherwise use default pool\n\nReturns\n-------\nTable\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> struct = pa.array([{'n_legs': 2, 'animals': 'Parrot'},\n...                    {'year': 2022, 'n_legs': 4}])\n>>> month = pa.array([4, 6])\n>>> table = pa.Table.from_arrays([struct,month],\n...                              names = [\"a\", \"month\"])\n>>> table\npyarrow.Table\na: struct<animals: string, n_legs: int64, year: int64>\n  child 0, animals: string\n  child 1, n_legs: int64\n  child 2, year: int64\nmonth: int64\n----\na: [\n  -- is_valid: all not null\n  -- child 0 type: string\n[\"Parrot\",null]\n  -- child 1 type: int64\n[2,4]\n  -- child 2 type: int64\n[null,2022]]\nmonth: [[4,6]]\n\nFlatten the columns with struct field:\n\n>>> table.flatten()\npyarrow.Table\na.animals: string\na.n_legs: int64\na.year: int64\nmonth: int64\n----\na.animals: [[\"Parrot\",null]]\na.n_legs: [[2,4]]\na.year: [[null,2022]]\nmonth: [[4,6]]");
        static PyMethodDef __pyx_mdef_7pyarrow_3lib_5Table_15flatten = {"flatten", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Table_15flatten, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Table_14flatten};
        static PyObject *__pyx_pw_7pyarrow_3lib_5Table_15flatten(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
          struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_memory_pool = 0;
          #if !CYTHON_METH_FASTCALL
          CYTHON_UNUSED Py_ssize_t __pyx_nargs;
          #endif
          CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
          PyObject* values[1] = {0};
          int __pyx_lineno = 0;
          const char *__pyx_filename = NULL;
          int __pyx_clineno = 0;
          PyObject *__pyx_r = 0;
          __Pyx_RefNannyDeclarations
          __Pyx_RefNannySetupContext("flatten (wrapper)", 0);
          #if !CYTHON_METH_FASTCALL
          #if CYTHON_ASSUME_SAFE_SIZE
          __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
          #else
          __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
          #endif
          #endif
          __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
          {
            PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_memory_pool,0};
            const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
            if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(17, 4445, __pyx_L3_error)
            if (__pyx_kwds_len > 0) {
              switch (__pyx_nargs) {
                case  1:
                values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 4445, __pyx_L3_error)
                CYTHON_FALLTHROUGH;
                case  0: break;
                default: goto __pyx_L5_argtuple_error;
              }
              const Py_ssize_t kwd_pos_args = __pyx_nargs;
              if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "flatten", 0) < (0)) __PYX_ERR(17, 4445, __pyx_L3_error)
              if (!values[0]) values[0] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)Py_None));
            } else {
              switch (__pyx_nargs) {
                case  1:
                values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 4445, __pyx_L3_error)
                CYTHON_FALLTHROUGH;
                case  0: break;
                default: goto __pyx_L5_argtuple_error;
              }
              if (!values[0]) values[0] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)Py_None));
            }
            __pyx_v_memory_pool = ((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)values[0]);
          }
          goto __pyx_L6_skip;
          __pyx_L5_argtuple_error:;
          __Pyx_RaiseArgtupleInvalid("flatten", 0, 0, 1, __pyx_nargs); __PYX_ERR(17, 4445, __pyx_L3_error)
          __pyx_L6_skip:;
          goto __pyx_L4_argument_unpacking_done;
          __pyx_L3_error:;
          for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
            Py_XDECREF(values[__pyx_temp]);
          }
          __Pyx_AddTraceback("pyarrow.lib.Table.flatten", __pyx_clineno, __pyx_lineno, __pyx_filename);
          __Pyx_RefNannyFinishContext();
          return NULL;
          __pyx_L4_argument_unpacking_done:;
          if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_memory_pool), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_MemoryPool, 1, "memory_pool", 0))) __PYX_ERR(17, 4445, __pyx_L1_error)
          __pyx_r = __pyx_pf_7pyarrow_3lib_5Table_14flatten(((struct __pyx_obj_7pyarrow_3lib_Table *)__pyx_v_self), __pyx_v_memory_pool);

          /* function exit code */
          goto __pyx_L0;
          __pyx_L1_error:;
          __pyx_r = NULL;
          for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
            Py_XDECREF(values[__pyx_temp]);
          }
          goto __pyx_L7_cleaned_up;
          __pyx_L0:;
          for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
            Py_XDECREF(values[__pyx_temp]);
          }
          __pyx_L7_cleaned_up:;
          __Pyx_RefNannyFinishContext();
          return __pyx_r;
        }

        static PyObject *__pyx_pf_7pyarrow_3lib_5Table_14flatten(struct __pyx_obj_7pyarrow_3lib_Table *__pyx_v_self, struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_memory_pool) {
          std::shared_ptr< arrow::Table>  __pyx_v_flattened;
           arrow::MemoryPool *__pyx_v_pool;
          PyObject *__pyx_r = NULL;
          __Pyx_RefNannyDeclarations
           arrow::MemoryPool *__pyx_t_1;
          std::shared_ptr< arrow::Table>  __pyx_t_2;
          PyObject *__pyx_t_3 = NULL;
          int __pyx_lineno = 0;
          const char *__pyx_filename = NULL;
          int __pyx_clineno = 0;
          __Pyx_RefNannySetupContext("flatten", 0);

          /* "pyarrow/table.pxi":4501
 *         month: [[4,6]]
 *         """
 *         self._assert_cpu()             # <<<<<<<<<<<<<<
 *         cdef:
 *             shared_ptr[CTable] flattened
*/
          if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
            PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_assert_cpu");
            __PYX_ERR(17, 4501, __pyx_L1_error)
          }
          ((struct __pyx_vtabstruct_7pyarrow_3lib_Table *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._assert_cpu(((struct __pyx_obj_7pyarrow_3lib__Tabular *)__pyx_v_self)); if (unlikely(PyErr_Occurred())) __PYX_ERR(17, 4501, __pyx_L1_error)

          /* "pyarrow/table.pxi":4504
 *         cdef:
 *             shared_ptr[CTable] flattened
 *             CMemoryPool* pool = maybe_unbox_memory_pool(memory_pool)             # <<<<<<<<<<<<<<
 * 
 *         with nogil:
*/
          __pyx_t_1 = __pyx_f_7pyarrow_3lib_maybe_unbox_memory_pool(__pyx_v_memory_pool); if (unlikely(__pyx_t_1 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(17, 4504, __pyx_L1_error)
          __pyx_v_pool = __pyx_t_1;

          /* "pyarrow/table.pxi":4506
 *             CMemoryPool* pool = maybe_unbox_memory_pool(memory_pool)
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             flattened = GetResultValue(self.table.Flatten(pool))
 * 
*/
          {
              PyThreadState * _save;
              _save = PyEval_SaveThread();
              __Pyx_FastGIL_Remember();
              /*try:*/ {

                /* "pyarrow/table.pxi":4507
 * 
 *         with nogil:
 *             flattened = GetResultValue(self.table.Flatten(pool))             # <<<<<<<<<<<<<<
 * 
 *         return pyarrow_wrap_table(flattened)
*/
                if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                  PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "table");
                  __Pyx_PyGILState_Release(__pyx_gilstate_save);
                  __PYX_ERR(17, 4507, __pyx_L4_error)
                }
                __pyx_t_2 = arrow::py::GetResultValue<std::shared_ptr< arrow::Table> >(__pyx_v_self->table->Flatten(__pyx_v_pool)); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(17, 4507, __pyx_L4_error)
                __pyx_v_flattened = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_2);
              }

              /* "pyarrow/table.pxi":4506
 *             CMemoryPool* pool = maybe_unbox_memory_pool(memory_pool)
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             flattened = GetResultValue(self.table.Flatten(pool))
 * 
*/
              /*finally:*/ {
                /*normal exit:*/{
                  __Pyx_FastGIL_Forget();
                  PyEval_RestoreThread(_save);
                  goto __pyx_L5;
                }
                __pyx_L4_error: {
                  __Pyx_FastGIL_Forget();
                  PyEval_RestoreThread(_save);
                  goto __pyx_L1_error;
                }
                __pyx_L5:;
              }
          }

          /* "pyarrow/table.pxi":4509
 *             flattened = GetResultValue(self.table.Flatten(pool))
 * 
 *         return pyarrow_wrap_table(flattened)             # <<<<<<<<<<<<<<
 * 
 *     def combine_chunks(self, MemoryPool memory_pool=None):
*/
          __Pyx_XDECREF(__pyx_r);
          __pyx_t_3 = pyarrow_wrap_table(__pyx_v_flattened); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 4509, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_r = __pyx_t_3;
          __pyx_t_3 = 0;
          goto __pyx_L0;

          /* "pyarrow/table.pxi":4445
 *         return pyarrow_wrap_table(c_table)
 * 
 *     def flatten(self, MemoryPool memory_pool=None):             # <<<<<<<<<<<<<<
 *         """
 *         Flatten this Table.
*/

          /* function exit code */
          __pyx_L1_error:;
          __Pyx_XDECREF(__pyx_t_3);
          __Pyx_AddTraceback("pyarrow.lib.Table.flatten", __pyx_clineno, __pyx_lineno, __pyx_filename);
          __pyx_r = NULL;
          __pyx_L0:;
          __Pyx_XGIVEREF(__pyx_r);
          __Pyx_RefNannyFinishContext();
          return __pyx_r;
        }

        /* "pyarrow/table.pxi":4511
 *         return pyarrow_wrap_table(flattened)
 * 
 *     def combine_chunks(self, MemoryPool memory_pool=None):             # <<<<<<<<<<<<<<
 *         """
 *         Make a new table by combining the chunks this table has.
*/

        /* Python wrapper */
        static PyObject *__pyx_pw_7pyarrow_3lib_5Table_17combine_chunks(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
        PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_5Table_16combine_chunks, "Table.combine_chunks(self, MemoryPool memory_pool=None)\n\nMake a new table by combining the chunks this table has.\n\nAll the underlying chunks in the ChunkedArray of each column are\nconcatenated into zero or one chunk.\n\nTo avoid buffer overflow, binary columns may be combined into\nmultiple chunks. Chunks will have the maximum possible length.\n\nParameters\n----------\nmemory_pool : MemoryPool, default None\n    For memory allocations, if required, otherwise use default pool.\n\nReturns\n-------\nTable\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> n_legs = pa.chunked_array([[2, 2, 4], [4, 5, 100]])\n>>> animals = pa.chunked_array([[\"Flamingo\", \"Parrot\", \"Dog\"], [\"Horse\", \"Brittle stars\", \"Centipede\"]])\n>>> names = [\"n_legs\", \"animals\"]\n>>> table = pa.table([n_legs, animals], names=names)\n>>> table\npyarrow.Table\nn_legs: int64\nanimals: string\n----\nn_legs: [[2,2,4],[4,5,100]]\nanimals: [[\"Flamingo\",\"Parrot\",\"Dog\"],[\"Horse\",\"Brittle stars\",\"Centipede\"]]\n>>> table.combine_chunks()\npyarrow.Table\nn_legs: int64\nanimals: string\n----\nn_legs: [[2,2,4,4,5,100]]\nanimals: [[\"Flamingo\",\"Parrot\",\"Dog\",\"Horse\",\"Brittle stars\",\"Centipede\"]]");
        static PyMethodDef __pyx_mdef_7pyarrow_3lib_5Table_17combine_chunks = {"combine_chunks", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Table_17combine_chunks, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Table_16combine_chunks};
        static PyObject *__pyx_pw_7pyarrow_3lib_5Table_17combine_chunks(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
          struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_memory_pool = 0;
          #if !CYTHON_METH_FASTCALL
          CYTHON_UNUSED Py_ssize_t __pyx_nargs;
          #endif
          CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
          PyObject* values[1] = {0};
          int __pyx_lineno = 0;
          const char *__pyx_filename = NULL;
          int __pyx_clineno = 0;
          PyObject *__pyx_r = 0;
          __Pyx_RefNannyDeclarations
          __Pyx_RefNannySetupContext("combine_chunks (wrapper)", 0);
          #if !CYTHON_METH_FASTCALL
          #if CYTHON_ASSUME_SAFE_SIZE
          __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
          #else
          __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
          #endif
          #endif
          __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
          {
            PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_memory_pool,0};
            const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
            if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(17, 4511, __pyx_L3_error)
            if (__pyx_kwds_len > 0) {
              switch (__pyx_nargs) {
                case  1:
                values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 4511, __pyx_L3_error)
                CYTHON_FALLTHROUGH;
                case  0: break;
                default: goto __pyx_L5_argtuple_error;
              }
              const Py_ssize_t kwd_pos_args = __pyx_nargs;
              if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "combine_chunks", 0) < (0)) __PYX_ERR(17, 4511, __pyx_L3_error)
              if (!values[0]) values[0] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)Py_None));
            } else {
              switch (__pyx_nargs) {
                case  1:
                values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 4511, __pyx_L3_error)
                CYTHON_FALLTHROUGH;
                case  0: break;
                default: goto __pyx_L5_argtuple_error;
              }
              if (!values[0]) values[0] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)Py_None));
            }
            __pyx_v_memory_pool = ((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)values[0]);
          }
          goto __pyx_L6_skip;
          __pyx_L5_argtuple_error:;
          __Pyx_RaiseArgtupleInvalid("combine_chunks", 0, 0, 1, __pyx_nargs); __PYX_ERR(17, 4511, __pyx_L3_error)
          __pyx_L6_skip:;
          goto __pyx_L4_argument_unpacking_done;
          __pyx_L3_error:;
          for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
            Py_XDECREF(values[__pyx_temp]);
          }
          __Pyx_AddTraceback("pyarrow.lib.Table.combine_chunks", __pyx_clineno, __pyx_lineno, __pyx_filename);
          __Pyx_RefNannyFinishContext();
          return NULL;
          __pyx_L4_argument_unpacking_done:;
          if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_memory_pool), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_MemoryPool, 1, "memory_pool", 0))) __PYX_ERR(17, 4511, __pyx_L1_error)
          __pyx_r = __pyx_pf_7pyarrow_3lib_5Table_16combine_chunks(((struct __pyx_obj_7pyarrow_3lib_Table *)__pyx_v_self), __pyx_v_memory_pool);

          /* function exit code */
          goto __pyx_L0;
          __pyx_L1_error:;
          __pyx_r = NULL;
          for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
            Py_XDECREF(values[__pyx_temp]);
          }
          goto __pyx_L7_cleaned_up;
          __pyx_L0:;
          for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
            Py_XDECREF(values[__pyx_temp]);
          }
          __pyx_L7_cleaned_up:;
          __Pyx_RefNannyFinishContext();
          return __pyx_r;
        }

        static PyObject *__pyx_pf_7pyarrow_3lib_5Table_16combine_chunks(struct __pyx_obj_7pyarrow_3lib_Table *__pyx_v_self, struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_memory_pool) {
          std::shared_ptr< arrow::Table>  __pyx_v_combined;
           arrow::MemoryPool *__pyx_v_pool;
          PyObject *__pyx_r = NULL;
          __Pyx_RefNannyDeclarations
           arrow::MemoryPool *__pyx_t_1;
          std::shared_ptr< arrow::Table>  __pyx_t_2;
          PyObject *__pyx_t_3 = NULL;
          int __pyx_lineno = 0;
          const char *__pyx_filename = NULL;
          int __pyx_clineno = 0;
          __Pyx_RefNannySetupContext("combine_chunks", 0);

          /* "pyarrow/table.pxi":4552
 *         animals: [["Flamingo","Parrot","Dog","Horse","Brittle stars","Centipede"]]
 *         """
 *         self._assert_cpu()             # <<<<<<<<<<<<<<
 *         cdef:
 *             shared_ptr[CTable] combined
*/
          if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
            PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_assert_cpu");
            __PYX_ERR(17, 4552, __pyx_L1_error)
          }
          ((struct __pyx_vtabstruct_7pyarrow_3lib_Table *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._assert_cpu(((struct __pyx_obj_7pyarrow_3lib__Tabular *)__pyx_v_self)); if (unlikely(PyErr_Occurred())) __PYX_ERR(17, 4552, __pyx_L1_error)

          /* "pyarrow/table.pxi":4555
 *         cdef:
 *             shared_ptr[CTable] combined
 *             CMemoryPool* pool = maybe_unbox_memory_pool(memory_pool)             # <<<<<<<<<<<<<<
 * 
 *         with nogil:
*/
          __pyx_t_1 = __pyx_f_7pyarrow_3lib_maybe_unbox_memory_pool(__pyx_v_memory_pool); if (unlikely(__pyx_t_1 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(17, 4555, __pyx_L1_error)
          __pyx_v_pool = __pyx_t_1;

          /* "pyarrow/table.pxi":4557
 *             CMemoryPool* pool = maybe_unbox_memory_pool(memory_pool)
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             combined = GetResultValue(self.table.CombineChunks(pool))
 * 
*/
          {
              PyThreadState * _save;
              _save = PyEval_SaveThread();
              __Pyx_FastGIL_Remember();
              /*try:*/ {

                /* "pyarrow/table.pxi":4558
 * 
 *         with nogil:
 *             combined = GetResultValue(self.table.CombineChunks(pool))             # <<<<<<<<<<<<<<
 * 
 *         return pyarrow_wrap_table(combined)
*/
                if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                  PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "table");
                  __Pyx_PyGILState_Release(__pyx_gilstate_save);
                  __PYX_ERR(17, 4558, __pyx_L4_error)
                }
                __pyx_t_2 = arrow::py::GetResultValue<std::shared_ptr< arrow::Table> >(__pyx_v_self->table->CombineChunks(__pyx_v_pool)); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(17, 4558, __pyx_L4_error)
                __pyx_v_combined = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_2);
              }

              /* "pyarrow/table.pxi":4557
 *             CMemoryPool* pool = maybe_unbox_memory_pool(memory_pool)
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             combined = GetResultValue(self.table.CombineChunks(pool))
 * 
*/
              /*finally:*/ {
                /*normal exit:*/{
                  __Pyx_FastGIL_Forget();
                  PyEval_RestoreThread(_save);
                  goto __pyx_L5;
                }
                __pyx_L4_error: {
                  __Pyx_FastGIL_Forget();
                  PyEval_RestoreThread(_save);
                  goto __pyx_L1_error;
                }
                __pyx_L5:;
              }
          }

          /* "pyarrow/table.pxi":4560
 *             combined = GetResultValue(self.table.CombineChunks(pool))
 * 
 *         return pyarrow_wrap_table(combined)             # <<<<<<<<<<<<<<
 * 
 *     def unify_dictionaries(self, MemoryPool memory_pool=None):
*/
          __Pyx_XDECREF(__pyx_r);
          __pyx_t_3 = pyarrow_wrap_table(__pyx_v_combined); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 4560, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_r = __pyx_t_3;
          __pyx_t_3 = 0;
          goto __pyx_L0;

          /* "pyarrow/table.pxi":4511
 *         return pyarrow_wrap_table(flattened)
 * 
 *     def combine_chunks(self, MemoryPool memory_pool=None):             # <<<<<<<<<<<<<<
 *         """
 *         Make a new table by combining the chunks this table has.
*/

          /* function exit code */
          __pyx_L1_error:;
          __Pyx_XDECREF(__pyx_t_3);
          __Pyx_AddTraceback("pyarrow.lib.Table.combine_chunks", __pyx_clineno, __pyx_lineno, __pyx_filename);
          __pyx_r = NULL;
          __pyx_L0:;
          __Pyx_XGIVEREF(__pyx_r);
          __Pyx_RefNannyFinishContext();
          return __pyx_r;
        }

        /* "pyarrow/table.pxi":4562
 *         return pyarrow_wrap_table(combined)
 * 
 *     def unify_dictionaries(self, MemoryPool memory_pool=None):             # <<<<<<<<<<<<<<
 *         """
 *         Unify dictionaries across all chunks.
*/

        /* Python wrapper */
        static PyObject *__pyx_pw_7pyarrow_3lib_5Table_19unify_dictionaries(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
        PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_5Table_18unify_dictionaries, "Table.unify_dictionaries(self, MemoryPool memory_pool=None)\n\nUnify dictionaries across all chunks.\n\nThis method returns an equivalent table, but where all chunks of\neach column share the same dictionary values.  Dictionary indices\nare transposed accordingly.\n\nColumns without dictionaries are returned unchanged.\n\nParameters\n----------\nmemory_pool : MemoryPool, default None\n    For memory allocations, if required, otherwise use default pool\n\nReturns\n-------\nTable\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> arr_1 = pa.array([\"Flamingo\", \"Parrot\", \"Dog\"]).dictionary_encode()\n>>> arr_2 = pa.array([\"Horse\", \"Brittle stars\", \"Centipede\"]).dictionary_encode()\n>>> c_arr = pa.chunked_array([arr_1, arr_2])\n>>> table = pa.table([c_arr], names=[\"animals\"])\n>>> table\npyarrow.Table\nanimals: dictionary<values=string, indices=int32, ordered=0>\n----\nanimals: [  -- dictionary:\n[\"Flamingo\",\"Parrot\",\"Dog\"]  -- indices:\n[0,1,2],  -- dictionary:\n[\"Horse\",\"Brittle stars\",\"Centipede\"]  -- indices:\n[0,1,2]]\n\nUnify dictionaries across both chunks:\n\n>>> table.unify_dictionaries()\npyarrow.Table\nanimals: dictionary<values=string, indices=int32, ordered=0>\n----\nanimals: [  -- dictionary:\n[\"Flamingo\",\"Parrot\",\"Dog\",\"Horse\",\"Brittle stars\",\"Centipede\"]  -- indices:\n[0,1,2],  -- dictionary:\n[\"Flamingo\",\"Parrot\",\"Dog\",\"Horse\",\"Brittle stars\",\"Centipede\"]  -- indices:\n[3,4,5]]");
        static PyMethodDef __pyx_mdef_7pyarrow_3lib_5Table_19unify_dictionaries = {"unify_dictionaries", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Table_19unify_dictionaries, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Table_18unify_dictionaries};
        static PyObject *__pyx_pw_7pyarrow_3lib_5Table_19unify_dictionaries(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
          struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_memory_pool = 0;
          #if !CYTHON_METH_FASTCALL
          CYTHON_UNUSED Py_ssize_t __pyx_nargs;
          #endif
          CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
          PyObject* values[1] = {0};
          int __pyx_lineno = 0;
          const char *__pyx_filename = NULL;
          int __pyx_clineno = 0;
          PyObject *__pyx_r = 0;
          __Pyx_RefNannyDeclarations
          __Pyx_RefNannySetupContext("unify_dictionaries (wrapper)", 0);
          #if !CYTHON_METH_FASTCALL
          #if CYTHON_ASSUME_SAFE_SIZE
          __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
          #else
          __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
          #endif
          #endif
          __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
          {
            PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_memory_pool,0};
            const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
            if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(17, 4562, __pyx_L3_error)
            if (__pyx_kwds_len > 0) {
              switch (__pyx_nargs) {
                case  1:
                values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 4562, __pyx_L3_error)
                CYTHON_FALLTHROUGH;
                case  0: break;
                default: goto __pyx_L5_argtuple_error;
              }
              const Py_ssize_t kwd_pos_args = __pyx_nargs;
              if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "unify_dictionaries", 0) < (0)) __PYX_ERR(17, 4562, __pyx_L3_error)
              if (!values[0]) values[0] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)Py_None));
            } else {
              switch (__pyx_nargs) {
                case  1:
                values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 4562, __pyx_L3_error)
                CYTHON_FALLTHROUGH;
                case  0: break;
                default: goto __pyx_L5_argtuple_error;
              }
              if (!values[0]) values[0] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)Py_None));
            }
            __pyx_v_memory_pool = ((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)values[0]);
          }
          goto __pyx_L6_skip;
          __pyx_L5_argtuple_error:;
          __Pyx_RaiseArgtupleInvalid("unify_dictionaries", 0, 0, 1, __pyx_nargs); __PYX_ERR(17, 4562, __pyx_L3_error)
          __pyx_L6_skip:;
          goto __pyx_L4_argument_unpacking_done;
          __pyx_L3_error:;
          for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
            Py_XDECREF(values[__pyx_temp]);
          }
          __Pyx_AddTraceback("pyarrow.lib.Table.unify_dictionaries", __pyx_clineno, __pyx_lineno, __pyx_filename);
          __Pyx_RefNannyFinishContext();
          return NULL;
          __pyx_L4_argument_unpacking_done:;
          if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_memory_pool), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_MemoryPool, 1, "memory_pool", 0))) __PYX_ERR(17, 4562, __pyx_L1_error)
          __pyx_r = __pyx_pf_7pyarrow_3lib_5Table_18unify_dictionaries(((struct __pyx_obj_7pyarrow_3lib_Table *)__pyx_v_self), __pyx_v_memory_pool);

          /* function exit code */
          goto __pyx_L0;
          __pyx_L1_error:;
          __pyx_r = NULL;
          for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
            Py_XDECREF(values[__pyx_temp]);
          }
          goto __pyx_L7_cleaned_up;
          __pyx_L0:;
          for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
            Py_XDECREF(values[__pyx_temp]);
          }
          __pyx_L7_cleaned_up:;
          __Pyx_RefNannyFinishContext();
          return __pyx_r;
        }

        static PyObject *__pyx_pf_7pyarrow_3lib_5Table_18unify_dictionaries(struct __pyx_obj_7pyarrow_3lib_Table *__pyx_v_self, struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_memory_pool) {
           arrow::MemoryPool *__pyx_v_pool;
          std::shared_ptr< arrow::Table>  __pyx_v_c_result;
          PyObject *__pyx_r = NULL;
          __Pyx_RefNannyDeclarations
           arrow::MemoryPool *__pyx_t_1;
          std::shared_ptr< arrow::Table>  __pyx_t_2;
          PyObject *__pyx_t_3 = NULL;
          int __pyx_lineno = 0;
          const char *__pyx_filename = NULL;
          int __pyx_clineno = 0;
          __Pyx_RefNannySetupContext("unify_dictionaries", 0);

          /* "pyarrow/table.pxi":4610
 *         [3,4,5]]
 *         """
 *         self._assert_cpu()             # <<<<<<<<<<<<<<
 *         cdef:
 *             CMemoryPool* pool = maybe_unbox_memory_pool(memory_pool)
*/
          if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
            PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_assert_cpu");
            __PYX_ERR(17, 4610, __pyx_L1_error)
          }
          ((struct __pyx_vtabstruct_7pyarrow_3lib_Table *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._assert_cpu(((struct __pyx_obj_7pyarrow_3lib__Tabular *)__pyx_v_self)); if (unlikely(PyErr_Occurred())) __PYX_ERR(17, 4610, __pyx_L1_error)

          /* "pyarrow/table.pxi":4612
 *         self._assert_cpu()
 *         cdef:
 *             CMemoryPool* pool = maybe_unbox_memory_pool(memory_pool)             # <<<<<<<<<<<<<<
 *             shared_ptr[CTable] c_result
 * 
*/
          __pyx_t_1 = __pyx_f_7pyarrow_3lib_maybe_unbox_memory_pool(__pyx_v_memory_pool); if (unlikely(__pyx_t_1 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(17, 4612, __pyx_L1_error)
          __pyx_v_pool = __pyx_t_1;

          /* "pyarrow/table.pxi":4615
 *             shared_ptr[CTable] c_result
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             c_result = GetResultValue(CDictionaryUnifier.UnifyTable(
 *                 deref(self.table), pool))
*/
          {
              PyThreadState * _save;
              _save = PyEval_SaveThread();
              __Pyx_FastGIL_Remember();
              /*try:*/ {

                /* "pyarrow/table.pxi":4617
 *         with nogil:
 *             c_result = GetResultValue(CDictionaryUnifier.UnifyTable(
 *                 deref(self.table), pool))             # <<<<<<<<<<<<<<
 * 
 *         return pyarrow_wrap_table(c_result)
*/
                if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                  PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "table");
                  __Pyx_PyGILState_Release(__pyx_gilstate_save);
                  __PYX_ERR(17, 4617, __pyx_L4_error)
                }

                /* "pyarrow/table.pxi":4616
 * 
 *         with nogil:
 *             c_result = GetResultValue(CDictionaryUnifier.UnifyTable(             # <<<<<<<<<<<<<<
 *                 deref(self.table), pool))
 * 
*/
                __pyx_t_2 = arrow::py::GetResultValue<std::shared_ptr< arrow::Table> >( arrow::DictionaryUnifier::UnifyTable((*__pyx_v_self->table), __pyx_v_pool)); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(17, 4616, __pyx_L4_error)
                __pyx_v_c_result = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_2);
              }

              /* "pyarrow/table.pxi":4615
 *             shared_ptr[CTable] c_result
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             c_result = GetResultValue(CDictionaryUnifier.UnifyTable(
 *                 deref(self.table), pool))
*/
              /*finally:*/ {
                /*normal exit:*/{
                  __Pyx_FastGIL_Forget();
                  PyEval_RestoreThread(_save);
                  goto __pyx_L5;
                }
                __pyx_L4_error: {
                  __Pyx_FastGIL_Forget();
                  PyEval_RestoreThread(_save);
                  goto __pyx_L1_error;
                }
                __pyx_L5:;
              }
          }

          /* "pyarrow/table.pxi":4619
 *                 deref(self.table), pool))
 * 
 *         return pyarrow_wrap_table(c_result)             # <<<<<<<<<<<<<<
 * 
 *     def equals(self, Table other, bint check_metadata=False):
*/
          __Pyx_XDECREF(__pyx_r);
          __pyx_t_3 = pyarrow_wrap_table(__pyx_v_c_result); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 4619, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_r = __pyx_t_3;
          __pyx_t_3 = 0;
          goto __pyx_L0;

          /* "pyarrow/table.pxi":4562
 *         return pyarrow_wrap_table(combined)
 * 
 *     def unify_dictionaries(self, MemoryPool memory_pool=None):             # <<<<<<<<<<<<<<
 *         """
 *         Unify dictionaries across all chunks.
*/

          /* function exit code */
          __pyx_L1_error:;
          __Pyx_XDECREF(__pyx_t_3);
          __Pyx_AddTraceback("pyarrow.lib.Table.unify_dictionaries", __pyx_clineno, __pyx_lineno, __pyx_filename);
          __pyx_r = NULL;
          __pyx_L0:;
          __Pyx_XGIVEREF(__pyx_r);
          __Pyx_RefNannyFinishContext();
          return __pyx_r;
        }

        /* "pyarrow/table.pxi":4621
 *         return pyarrow_wrap_table(c_result)
 * 
 *     def equals(self, Table other, bint check_metadata=False):             # <<<<<<<<<<<<<<
 *         """
 *         Check if contents of two tables are equal.
*/

        /* Python wrapper */
        static PyObject *__pyx_pw_7pyarrow_3lib_5Table_21equals(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
        PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_5Table_20equals, "Table.equals(self, Table other, bool check_metadata=False)\n\nCheck if contents of two tables are equal.\n\nParameters\n----------\nother : pyarrow.Table\n    Table to compare against.\ncheck_metadata : bool, default False\n    Whether schema metadata equality should be checked as well.\n\nReturns\n-------\nbool\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> n_legs = pa.array([2, 2, 4, 4, 5, 100])\n>>> animals = pa.array([\"Flamingo\", \"Parrot\", \"Dog\", \"Horse\", \"Brittle stars\", \"Centipede\"])\n>>> names=[\"n_legs\", \"animals\"]\n>>> table = pa.Table.from_arrays([n_legs, animals], names=names)\n>>> table_0 = pa.Table.from_arrays([])\n>>> table_1 = pa.Table.from_arrays([n_legs, animals],\n...                                 names=names,\n...                                 metadata={\"n_legs\": \"Number of legs per animal\"})\n>>> table.equals(table)\nTrue\n>>> table.equals(table_0)\nFalse\n>>> table.equals(table_1)\nTrue\n>>> table.equals(table_1, check_metadata=True)\nFalse");
        static PyMethodDef __pyx_mdef_7pyarrow_3lib_5Table_21equals = {"equals", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Table_21equals, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Table_20equals};
        static PyObject *__pyx_pw_7pyarrow_3lib_5Table_21equals(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
          struct __pyx_obj_7pyarrow_3lib_Table *__pyx_v_other = 0;
          int __pyx_v_check_metadata;
          #if !CYTHON_METH_FASTCALL
          CYTHON_UNUSED Py_ssize_t __pyx_nargs;
          #endif
          CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
          PyObject* values[2] = {0,0};
          int __pyx_lineno = 0;
          const char *__pyx_filename = NULL;
          int __pyx_clineno = 0;
          PyObject *__pyx_r = 0;
          __Pyx_RefNannyDeclarations
          __Pyx_RefNannySetupContext("equals (wrapper)", 0);
          #if !CYTHON_METH_FASTCALL
          #if CYTHON_ASSUME_SAFE_SIZE
          __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
          #else
          __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
          #endif
          #endif
          __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
          {
            PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_other,&__pyx_mstate_global->__pyx_n_u_check_metadata,0};
            const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
            if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(17, 4621, __pyx_L3_error)
            if (__pyx_kwds_len > 0) {
              switch (__pyx_nargs) {
                case  2:
                values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(17, 4621, __pyx_L3_error)
                CYTHON_FALLTHROUGH;
                case  1:
                values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 4621, __pyx_L3_error)
                CYTHON_FALLTHROUGH;
                case  0: break;
                default: goto __pyx_L5_argtuple_error;
              }
              const Py_ssize_t kwd_pos_args = __pyx_nargs;
              if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "equals", 0) < (0)) __PYX_ERR(17, 4621, __pyx_L3_error)
              for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("equals", 0, 1, 2, i); __PYX_ERR(17, 4621, __pyx_L3_error) }
              }
            } else {
              switch (__pyx_nargs) {
                case  2:
                values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(17, 4621, __pyx_L3_error)
                CYTHON_FALLTHROUGH;
                case  1:
                values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 4621, __pyx_L3_error)
                break;
                default: goto __pyx_L5_argtuple_error;
              }
            }
            __pyx_v_other = ((struct __pyx_obj_7pyarrow_3lib_Table *)values[0]);
            if (values[1]) {
              __pyx_v_check_metadata = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_check_metadata == (int)-1) && PyErr_Occurred())) __PYX_ERR(17, 4621, __pyx_L3_error)
            } else {
              __pyx_v_check_metadata = ((int)0);
            }
          }
          goto __pyx_L6_skip;
          __pyx_L5_argtuple_error:;
          __Pyx_RaiseArgtupleInvalid("equals", 0, 1, 2, __pyx_nargs); __PYX_ERR(17, 4621, __pyx_L3_error)
          __pyx_L6_skip:;
          goto __pyx_L4_argument_unpacking_done;
          __pyx_L3_error:;
          for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
            Py_XDECREF(values[__pyx_temp]);
          }
          __Pyx_AddTraceback("pyarrow.lib.Table.equals", __pyx_clineno, __pyx_lineno, __pyx_filename);
          __Pyx_RefNannyFinishContext();
          return NULL;
          __pyx_L4_argument_unpacking_done:;
          if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Table, 1, "other", 0))) __PYX_ERR(17, 4621, __pyx_L1_error)
          __pyx_r = __pyx_pf_7pyarrow_3lib_5Table_20equals(((struct __pyx_obj_7pyarrow_3lib_Table *)__pyx_v_self), __pyx_v_other, __pyx_v_check_metadata);

          /* function exit code */
          goto __pyx_L0;
          __pyx_L1_error:;
          __pyx_r = NULL;
          for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
            Py_XDECREF(values[__pyx_temp]);
          }
          goto __pyx_L7_cleaned_up;
          __pyx_L0:;
          for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
            Py_XDECREF(values[__pyx_temp]);
          }
          __pyx_L7_cleaned_up:;
          __Pyx_RefNannyFinishContext();
          return __pyx_r;
        }

        static PyObject *__pyx_pf_7pyarrow_3lib_5Table_20equals(struct __pyx_obj_7pyarrow_3lib_Table *__pyx_v_self, struct __pyx_obj_7pyarrow_3lib_Table *__pyx_v_other, int __pyx_v_check_metadata) {
           arrow::Table *__pyx_v_this_table;
           arrow::Table *__pyx_v_other_table;
          bool __pyx_v_result;
          PyObject *__pyx_r = NULL;
          __Pyx_RefNannyDeclarations
          int __pyx_t_1;
           arrow::Table *__pyx_t_2;
          PyObject *__pyx_t_3 = NULL;
          int __pyx_lineno = 0;
          const char *__pyx_filename = NULL;
          int __pyx_clineno = 0;
          __Pyx_RefNannySetupContext("equals", 0);

          /* "pyarrow/table.pxi":4656
 *         False
 *         """
 *         self._assert_cpu()             # <<<<<<<<<<<<<<
 *         if other is None:
 *             return False
*/
          if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
            PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_assert_cpu");
            __PYX_ERR(17, 4656, __pyx_L1_error)
          }
          ((struct __pyx_vtabstruct_7pyarrow_3lib_Table *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._assert_cpu(((struct __pyx_obj_7pyarrow_3lib__Tabular *)__pyx_v_self)); if (unlikely(PyErr_Occurred())) __PYX_ERR(17, 4656, __pyx_L1_error)

          /* "pyarrow/table.pxi":4657
 *         """
 *         self._assert_cpu()
 *         if other is None:             # <<<<<<<<<<<<<<
 *             return False
 * 
*/
          __pyx_t_1 = (((PyObject *)__pyx_v_other) == Py_None);
          if (__pyx_t_1) {

            /* "pyarrow/table.pxi":4658
 *         self._assert_cpu()
 *         if other is None:
 *             return False             # <<<<<<<<<<<<<<
 * 
 *         cdef:
*/
            __Pyx_XDECREF(__pyx_r);
            __Pyx_INCREF(Py_False);
            __pyx_r = Py_False;
            goto __pyx_L0;

            /* "pyarrow/table.pxi":4657
 *         """
 *         self._assert_cpu()
 *         if other is None:             # <<<<<<<<<<<<<<
 *             return False
 * 
*/
          }

          /* "pyarrow/table.pxi":4661
 * 
 *         cdef:
 *             CTable* this_table = self.table             # <<<<<<<<<<<<<<
 *             CTable* other_table = other.table
 *             c_bool result
*/
          if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
            PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "table");
            __PYX_ERR(17, 4661, __pyx_L1_error)
          }
          __pyx_t_2 = __pyx_v_self->table;
          __pyx_v_this_table = __pyx_t_2;

          /* "pyarrow/table.pxi":4662
 *         cdef:
 *             CTable* this_table = self.table
 *             CTable* other_table = other.table             # <<<<<<<<<<<<<<
 *             c_bool result
 * 
*/
          if (unlikely(((PyObject *)__pyx_v_other) == Py_None)) {
            PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "table");
            __PYX_ERR(17, 4662, __pyx_L1_error)
          }
          __pyx_t_2 = __pyx_v_other->table;
          __pyx_v_other_table = __pyx_t_2;

          /* "pyarrow/table.pxi":4665
 *             c_bool result
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             result = this_table.Equals(deref(other_table), check_metadata)
 * 
*/
          {
              PyThreadState * _save;
              _save = PyEval_SaveThread();
              __Pyx_FastGIL_Remember();
              /*try:*/ {

                /* "pyarrow/table.pxi":4666
 * 
 *         with nogil:
 *             result = this_table.Equals(deref(other_table), check_metadata)             # <<<<<<<<<<<<<<
 * 
 *         return result
*/
                __pyx_v_result = __pyx_v_this_table->Equals((*__pyx_v_other_table), __pyx_v_check_metadata);
              }

              /* "pyarrow/table.pxi":4665
 *             c_bool result
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             result = this_table.Equals(deref(other_table), check_metadata)
 * 
*/
              /*finally:*/ {
                /*normal exit:*/{
                  __Pyx_FastGIL_Forget();
                  PyEval_RestoreThread(_save);
                  goto __pyx_L6;
                }
                __pyx_L6:;
              }
          }

          /* "pyarrow/table.pxi":4668
 *             result = this_table.Equals(deref(other_table), check_metadata)
 * 
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     def cast(self, Schema target_schema, safe=None, options=None):
*/
          __Pyx_XDECREF(__pyx_r);
          __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_result); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 4668, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_r = __pyx_t_3;
          __pyx_t_3 = 0;
          goto __pyx_L0;

          /* "pyarrow/table.pxi":4621
 *         return pyarrow_wrap_table(c_result)
 * 
 *     def equals(self, Table other, bint check_metadata=False):             # <<<<<<<<<<<<<<
 *         """
 *         Check if contents of two tables are equal.
*/

          /* function exit code */
          __pyx_L1_error:;
          __Pyx_XDECREF(__pyx_t_3);
          __Pyx_AddTraceback("pyarrow.lib.Table.equals", __pyx_clineno, __pyx_lineno, __pyx_filename);
          __pyx_r = NULL;
          __pyx_L0:;
          __Pyx_XGIVEREF(__pyx_r);
          __Pyx_RefNannyFinishContext();
          return __pyx_r;
        }

        /* "pyarrow/table.pxi":4670
 *         return result
 * 
 *     def cast(self, Schema target_schema, safe=None, options=None):             # <<<<<<<<<<<<<<
 *         """
 *         Cast table values to another schema.
*/

        /* Python wrapper */
        static PyObject *__pyx_pw_7pyarrow_3lib_5Table_23cast(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
        PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_5Table_22cast, "Table.cast(self, Schema target_schema, safe=None, options=None)\n\nCast table values to another schema.\n\nParameters\n----------\ntarget_schema : Schema\n    Schema to cast to, the names and order of fields must match.\nsafe : bool, default True\n    Check for overflows or other unsafe conversions.\noptions : CastOptions, default None\n    Additional checks pass by CastOptions\n\nReturns\n-------\nTable\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> import pandas as pd\n>>> df = pd.DataFrame({'n_legs': [2, 4, 5, 100],\n...                    'animals': [\"Flamingo\", \"Horse\", \"Brittle stars\", \"Centipede\"]})\n>>> table = pa.Table.from_pandas(df)\n>>> table.schema\nn_legs: int64\nanimals: string\n-- schema metadata --\npandas: '{\"index_columns\": [{\"kind\": \"range\", \"name\": null, \"start\": 0, ...\n\nDefine new schema and cast table values:\n\n>>> my_schema = pa.schema([\n...     pa.field('n_legs', pa.duration('s')),\n...     pa.field('animals', pa.string())]\n...     )\n>>> table.cast(target_schema=my_schema)\npyarrow.Table\nn_legs: duration[s]\nanimals: string\n----\nn_legs: [[2,4,5,100]]\nanimals: [[\"Flamingo\",\"Horse\",\"Brittle stars\",\"Centipede\"]]");
            static PyMethodDef __pyx_mdef_7pyarrow_3lib_5Table_23cast = {"cast", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Table_23cast, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Table_22cast};
            static PyObject *__pyx_pw_7pyarrow_3lib_5Table_23cast(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
              struct __pyx_obj_7pyarrow_3lib_Schema *__pyx_v_target_schema = 0;
              PyObject *__pyx_v_safe = 0;
              PyObject *__pyx_v_options = 0;
              #if !CYTHON_METH_FASTCALL
              CYTHON_UNUSED Py_ssize_t __pyx_nargs;
              #endif
              CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
              PyObject* values[3] = {0,0,0};
              int __pyx_lineno = 0;
              const char *__pyx_filename = NULL;
              int __pyx_clineno = 0;
              PyObject *__pyx_r = 0;
              __Pyx_RefNannyDeclarations
              __Pyx_RefNannySetupContext("cast (wrapper)", 0);
              #if !CYTHON_METH_FASTCALL
              #if CYTHON_ASSUME_SAFE_SIZE
              __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
              #else
              __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
              #endif
              #endif
              __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
              {
                PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_target_schema,&__pyx_mstate_global->__pyx_n_u_safe,&__pyx_mstate_global->__pyx_n_u_options,0};
                const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(17, 4670, __pyx_L3_error)
                if (__pyx_kwds_len > 0) {
                  switch (__pyx_nargs) {
                    case  3:
                    values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
                    if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(17, 4670, __pyx_L3_error)
                    CYTHON_FALLTHROUGH;
                    case  2:
                    values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                    if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(17, 4670, __pyx_L3_error)
                    CYTHON_FALLTHROUGH;
                    case  1:
                    values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                    if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 4670, __pyx_L3_error)
                    CYTHON_FALLTHROUGH;
                    case  0: break;
                    default: goto __pyx_L5_argtuple_error;
                  }
                  const Py_ssize_t kwd_pos_args = __pyx_nargs;
                  if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "cast", 0) < (0)) __PYX_ERR(17, 4670, __pyx_L3_error)
                  if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
                  if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
                  for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                    if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("cast", 0, 1, 3, i); __PYX_ERR(17, 4670, __pyx_L3_error) }
                  }
                } else {
                  switch (__pyx_nargs) {
                    case  3:
                    values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
                    if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(17, 4670, __pyx_L3_error)
                    CYTHON_FALLTHROUGH;
                    case  2:
                    values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                    if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(17, 4670, __pyx_L3_error)
                    CYTHON_FALLTHROUGH;
                    case  1:
                    values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                    if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 4670, __pyx_L3_error)
                    break;
                    default: goto __pyx_L5_argtuple_error;
                  }
                  if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
                  if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
                }
                __pyx_v_target_schema = ((struct __pyx_obj_7pyarrow_3lib_Schema *)values[0]);
                __pyx_v_safe = values[1];
                __pyx_v_options = values[2];
              }
              goto __pyx_L6_skip;
              __pyx_L5_argtuple_error:;
              __Pyx_RaiseArgtupleInvalid("cast", 0, 1, 3, __pyx_nargs); __PYX_ERR(17, 4670, __pyx_L3_error)
              __pyx_L6_skip:;
              goto __pyx_L4_argument_unpacking_done;
              __pyx_L3_error:;
              for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                Py_XDECREF(values[__pyx_temp]);
              }
              __Pyx_AddTraceback("pyarrow.lib.Table.cast", __pyx_clineno, __pyx_lineno, __pyx_filename);
              __Pyx_RefNannyFinishContext();
              return NULL;
              __pyx_L4_argument_unpacking_done:;
              if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_target_schema), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Schema, 1, "target_schema", 0))) __PYX_ERR(17, 4670, __pyx_L1_error)
              __pyx_r = __pyx_pf_7pyarrow_3lib_5Table_22cast(((struct __pyx_obj_7pyarrow_3lib_Table *)__pyx_v_self), __pyx_v_target_schema, __pyx_v_safe, __pyx_v_options);

              /* function exit code */
              goto __pyx_L0;
              __pyx_L1_error:;
              __pyx_r = NULL;
              for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                Py_XDECREF(values[__pyx_temp]);
              }
              goto __pyx_L7_cleaned_up;
              __pyx_L0:;
              for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                Py_XDECREF(values[__pyx_temp]);
              }
              __pyx_L7_cleaned_up:;
              __Pyx_RefNannyFinishContext();
              return __pyx_r;
            }

            static PyObject *__pyx_pf_7pyarrow_3lib_5Table_22cast(struct __pyx_obj_7pyarrow_3lib_Table *__pyx_v_self, struct __pyx_obj_7pyarrow_3lib_Schema *__pyx_v_target_schema, PyObject *__pyx_v_safe, PyObject *__pyx_v_options) {
              struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_column = 0;
              struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_casted = 0;
              struct __pyx_obj_7pyarrow_3lib_Field *__pyx_v_field = 0;
              PyObject *__pyx_v_newcols = 0;
              PyObject *__pyx_r = NULL;
              __Pyx_RefNannyDeclarations
              PyObject *__pyx_t_1 = NULL;
              PyObject *__pyx_t_2 = NULL;
              PyObject *__pyx_t_3 = NULL;
              int __pyx_t_4;
              PyObject *__pyx_t_5 = NULL;
              PyObject *__pyx_t_6 = NULL;
              PyObject *__pyx_t_7[4];
              size_t __pyx_t_8;
              Py_ssize_t __pyx_t_9;
              PyObject *(*__pyx_t_10)(PyObject *);
              PyObject *(*__pyx_t_11)(PyObject *);
              int __pyx_t_12;
              int __pyx_t_13;
              PyObject *__pyx_t_14[3];
              int __pyx_t_15;
              int __pyx_lineno = 0;
              const char *__pyx_filename = NULL;
              int __pyx_clineno = 0;
              __Pyx_RefNannySetupContext("cast", 0);

              /* "pyarrow/table.pxi":4714
 *         animals: [["Flamingo","Horse","Brittle stars","Centipede"]]
 *         """
 *         self._assert_cpu()             # <<<<<<<<<<<<<<
 *         cdef:
 *             ChunkedArray column, casted
*/
              if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_assert_cpu");
                __PYX_ERR(17, 4714, __pyx_L1_error)
              }
              ((struct __pyx_vtabstruct_7pyarrow_3lib_Table *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._assert_cpu(((struct __pyx_obj_7pyarrow_3lib__Tabular *)__pyx_v_self)); if (unlikely(PyErr_Occurred())) __PYX_ERR(17, 4714, __pyx_L1_error)

              /* "pyarrow/table.pxi":4718
 *             ChunkedArray column, casted
 *             Field field
 *             list newcols = []             # <<<<<<<<<<<<<<
 * 
 *         if self.schema.names != target_schema.names:
*/
              __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 4718, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_1);
              __pyx_v_newcols = ((PyObject*)__pyx_t_1);
              __pyx_t_1 = 0;

              /* "pyarrow/table.pxi":4720
 *             list newcols = []
 * 
 *         if self.schema.names != target_schema.names:             # <<<<<<<<<<<<<<
 *             raise ValueError(f"Target schema's field names are not matching "
 *                              f"the table's field names: {self.schema.names!r}, {target_schema.names!r}")
*/
              __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_schema); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 4720, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_1);
              __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_names); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 4720, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_2);
              __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
              __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_target_schema), __pyx_mstate_global->__pyx_n_u_names); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 4720, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_1);
              __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 4720, __pyx_L1_error)
              __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
              __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(17, 4720, __pyx_L1_error)
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              if (unlikely(__pyx_t_4)) {

                /* "pyarrow/table.pxi":4721
 * 
 *         if self.schema.names != target_schema.names:
 *             raise ValueError(f"Target schema's field names are not matching "             # <<<<<<<<<<<<<<
 *                              f"the table's field names: {self.schema.names!r}, {target_schema.names!r}")
 * 
*/
                __pyx_t_1 = NULL;

                /* "pyarrow/table.pxi":4722
 *         if self.schema.names != target_schema.names:
 *             raise ValueError(f"Target schema's field names are not matching "
 *                              f"the table's field names: {self.schema.names!r}, {target_schema.names!r}")             # <<<<<<<<<<<<<<
 * 
 *         for column, field in zip(self.itercolumns(), target_schema):
*/
                __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_schema); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 4722, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_2);
                __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_names); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 4722, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_5);
                __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                __pyx_t_2 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_t_5), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 4722, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_2);
                __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_target_schema), __pyx_mstate_global->__pyx_n_u_names); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 4722, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_5);
                __pyx_t_6 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_t_5), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 4722, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_6);
                __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                __pyx_t_7[0] = __pyx_mstate_global->__pyx_kp_u_Target_schema_s_field_names_are_2;
                __pyx_t_7[1] = __pyx_t_2;
                __pyx_t_7[2] = __pyx_mstate_global->__pyx_kp_u__18;
                __pyx_t_7[3] = __pyx_t_6;

                /* "pyarrow/table.pxi":4721
 * 
 *         if self.schema.names != target_schema.names:
 *             raise ValueError(f"Target schema's field names are not matching "             # <<<<<<<<<<<<<<
 *                              f"the table's field names: {self.schema.names!r}, {target_schema.names!r}")
 * 
*/
                __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_7, 4, 70 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2) + 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6));
                if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 4721, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_5);
                __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                __pyx_t_8 = 1;
                {
                  PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_5};
                  __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
                  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                  if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 4721, __pyx_L1_error)
                  __Pyx_GOTREF(__pyx_t_3);
                }
                __Pyx_Raise(__pyx_t_3, 0, 0, 0);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __PYX_ERR(17, 4721, __pyx_L1_error)

                /* "pyarrow/table.pxi":4720
 *             list newcols = []
 * 
 *         if self.schema.names != target_schema.names:             # <<<<<<<<<<<<<<
 *             raise ValueError(f"Target schema's field names are not matching "
 *                              f"the table's field names: {self.schema.names!r}, {target_schema.names!r}")
*/
              }

              /* "pyarrow/table.pxi":4724
 *                              f"the table's field names: {self.schema.names!r}, {target_schema.names!r}")
 * 
 *         for column, field in zip(self.itercolumns(), target_schema):             # <<<<<<<<<<<<<<
 *             if not field.nullable and column.null_count > 0:
 *                 raise ValueError(
*/
              __pyx_t_5 = NULL;
              __pyx_t_6 = ((PyObject *)__pyx_v_self);
              __Pyx_INCREF(__pyx_t_6);
              __pyx_t_8 = 0;
              {
                PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
                __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_itercolumns, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
                if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 4724, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_1);
              }
              __pyx_t_8 = 1;
              {
                PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_t_1, ((PyObject *)__pyx_v_target_schema)};
                __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_zip, __pyx_callargs+__pyx_t_8, (3-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
                __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 4724, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_3);
              }
              if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
                __pyx_t_1 = __pyx_t_3; __Pyx_INCREF(__pyx_t_1);
                __pyx_t_9 = 0;
                __pyx_t_10 = NULL;
              } else {
                __pyx_t_9 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 4724, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_1);
                __pyx_t_10 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_10)) __PYX_ERR(17, 4724, __pyx_L1_error)
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              for (;;) {
                if (likely(!__pyx_t_10)) {
                  if (likely(PyList_CheckExact(__pyx_t_1))) {
                    {
                      Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
                      #if !CYTHON_ASSUME_SAFE_SIZE
                      if (unlikely((__pyx_temp < 0))) __PYX_ERR(17, 4724, __pyx_L1_error)
                      #endif
                      if (__pyx_t_9 >= __pyx_temp) break;
                    }
                    __pyx_t_3 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_9, __Pyx_ReferenceSharing_OwnStrongReference);
                    ++__pyx_t_9;
                  } else {
                    {
                      Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
                      #if !CYTHON_ASSUME_SAFE_SIZE
                      if (unlikely((__pyx_temp < 0))) __PYX_ERR(17, 4724, __pyx_L1_error)
                      #endif
                      if (__pyx_t_9 >= __pyx_temp) break;
                    }
                    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                    __pyx_t_3 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_9));
                    #else
                    __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_9);
                    #endif
                    ++__pyx_t_9;
                  }
                  if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 4724, __pyx_L1_error)
                } else {
                  __pyx_t_3 = __pyx_t_10(__pyx_t_1);
                  if (unlikely(!__pyx_t_3)) {
                    PyObject* exc_type = PyErr_Occurred();
                    if (exc_type) {
                      if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(17, 4724, __pyx_L1_error)
                      PyErr_Clear();
                    }
                    break;
                  }
                }
                __Pyx_GOTREF(__pyx_t_3);
                if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) {
                  PyObject* sequence = __pyx_t_3;
                  Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
                  if (unlikely(size != 2)) {
                    if (size > 2) __Pyx_RaiseTooManyValuesError(2);
                    else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
                    __PYX_ERR(17, 4724, __pyx_L1_error)
                  }
                  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                  if (likely(PyTuple_CheckExact(sequence))) {
                    __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0);
                    __Pyx_INCREF(__pyx_t_5);
                    __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1);
                    __Pyx_INCREF(__pyx_t_6);
                  } else {
                    __pyx_t_5 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference);
                    if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 4724, __pyx_L1_error)
                    __Pyx_XGOTREF(__pyx_t_5);
                    __pyx_t_6 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference);
                    if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 4724, __pyx_L1_error)
                    __Pyx_XGOTREF(__pyx_t_6);
                  }
                  #else
                  __pyx_t_5 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 4724, __pyx_L1_error)
                  __Pyx_GOTREF(__pyx_t_5);
                  __pyx_t_6 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 4724, __pyx_L1_error)
                  __Pyx_GOTREF(__pyx_t_6);
                  #endif
                  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                } else {
                  Py_ssize_t index = -1;
                  __pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 4724, __pyx_L1_error)
                  __Pyx_GOTREF(__pyx_t_2);
                  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __pyx_t_11 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2);
                  index = 0; __pyx_t_5 = __pyx_t_11(__pyx_t_2); if (unlikely(!__pyx_t_5)) goto __pyx_L6_unpacking_failed;
                  __Pyx_GOTREF(__pyx_t_5);
                  index = 1; __pyx_t_6 = __pyx_t_11(__pyx_t_2); if (unlikely(!__pyx_t_6)) goto __pyx_L6_unpacking_failed;
                  __Pyx_GOTREF(__pyx_t_6);
                  if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_2), 2) < (0)) __PYX_ERR(17, 4724, __pyx_L1_error)
                  __pyx_t_11 = NULL;
                  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                  goto __pyx_L7_unpacking_done;
                  __pyx_L6_unpacking_failed:;
                  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                  __pyx_t_11 = NULL;
                  if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
                  __PYX_ERR(17, 4724, __pyx_L1_error)
                  __pyx_L7_unpacking_done:;
                }
                if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ChunkedArray))))) __PYX_ERR(17, 4724, __pyx_L1_error)
                if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Field))))) __PYX_ERR(17, 4724, __pyx_L1_error)
                __Pyx_XDECREF_SET(__pyx_v_column, ((struct __pyx_obj_7pyarrow_3lib_ChunkedArray *)__pyx_t_5));
                __pyx_t_5 = 0;
                __Pyx_XDECREF_SET(__pyx_v_field, ((struct __pyx_obj_7pyarrow_3lib_Field *)__pyx_t_6));
                __pyx_t_6 = 0;

                /* "pyarrow/table.pxi":4725
 * 
 *         for column, field in zip(self.itercolumns(), target_schema):
 *             if not field.nullable and column.null_count > 0:             # <<<<<<<<<<<<<<
 *                 raise ValueError(
 *                     f"Casting field {field.name!r} with null values to non-nullable")
*/
                __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_field), __pyx_mstate_global->__pyx_n_u_nullable); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 4725, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_3);
                __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(17, 4725, __pyx_L1_error)
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_13 = (!__pyx_t_12);
                if (__pyx_t_13) {
                } else {
                  __pyx_t_4 = __pyx_t_13;
                  goto __pyx_L9_bool_binop_done;
                }
                __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_column), __pyx_mstate_global->__pyx_n_u_null_count); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 4725, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_3);
                __pyx_t_6 = PyObject_RichCompare(__pyx_t_3, __pyx_mstate_global->__pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 4725, __pyx_L1_error)
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(17, 4725, __pyx_L1_error)
                __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                __pyx_t_4 = __pyx_t_13;
                __pyx_L9_bool_binop_done:;
                if (unlikely(__pyx_t_4)) {

                  /* "pyarrow/table.pxi":4726
 *         for column, field in zip(self.itercolumns(), target_schema):
 *             if not field.nullable and column.null_count > 0:
 *                 raise ValueError(             # <<<<<<<<<<<<<<
 *                     f"Casting field {field.name!r} with null values to non-nullable")
 *             casted = column.cast(field.type, safe=safe, options=options)
*/
                  __pyx_t_3 = NULL;

                  /* "pyarrow/table.pxi":4727
 *             if not field.nullable and column.null_count > 0:
 *                 raise ValueError(
 *                     f"Casting field {field.name!r} with null values to non-nullable")             # <<<<<<<<<<<<<<
 *             casted = column.cast(field.type, safe=safe, options=options)
 *             newcols.append(casted)
*/
                  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_field), __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 4727, __pyx_L1_error)
                  __Pyx_GOTREF(__pyx_t_5);
                  __pyx_t_2 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_t_5), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 4727, __pyx_L1_error)
                  __Pyx_GOTREF(__pyx_t_2);
                  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                  __pyx_t_14[0] = __pyx_mstate_global->__pyx_kp_u_Casting_field;
                  __pyx_t_14[1] = __pyx_t_2;
                  __pyx_t_14[2] = __pyx_mstate_global->__pyx_kp_u_with_null_values_to_non_nullabl;
                  __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_14, 3, 14 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2) + 33, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2));
                  if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 4727, __pyx_L1_error)
                  __Pyx_GOTREF(__pyx_t_5);
                  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                  __pyx_t_8 = 1;
                  {
                    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
                    __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                    if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 4726, __pyx_L1_error)
                    __Pyx_GOTREF(__pyx_t_6);
                  }
                  __Pyx_Raise(__pyx_t_6, 0, 0, 0);
                  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                  __PYX_ERR(17, 4726, __pyx_L1_error)

                  /* "pyarrow/table.pxi":4725
 * 
 *         for column, field in zip(self.itercolumns(), target_schema):
 *             if not field.nullable and column.null_count > 0:             # <<<<<<<<<<<<<<
 *                 raise ValueError(
 *                     f"Casting field {field.name!r} with null values to non-nullable")
*/
                }

                /* "pyarrow/table.pxi":4728
 *                 raise ValueError(
 *                     f"Casting field {field.name!r} with null values to non-nullable")
 *             casted = column.cast(field.type, safe=safe, options=options)             # <<<<<<<<<<<<<<
 *             newcols.append(casted)
 * 
*/
                __pyx_t_5 = ((PyObject *)__pyx_v_column);
                __Pyx_INCREF(__pyx_t_5);
                if (unlikely(((PyObject *)__pyx_v_field) == Py_None)) {
                  PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "type");
                  __PYX_ERR(17, 4728, __pyx_L1_error)
                }
                __pyx_t_8 = 0;
                {
                  PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_5, ((PyObject *)__pyx_v_field->type)};
                  __pyx_t_3 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 4728, __pyx_L1_error)
                  __Pyx_GOTREF(__pyx_t_3);
                  if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_safe, __pyx_v_safe, __pyx_t_3, __pyx_callargs+2, 0) < (0)) __PYX_ERR(17, 4728, __pyx_L1_error)
                  if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_options, __pyx_v_options, __pyx_t_3, __pyx_callargs+2, 1) < (0)) __PYX_ERR(17, 4728, __pyx_L1_error)
                  __pyx_t_6 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_cast, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_3);
                  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
                  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                  if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 4728, __pyx_L1_error)
                  __Pyx_GOTREF(__pyx_t_6);
                }
                if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ChunkedArray))))) __PYX_ERR(17, 4728, __pyx_L1_error)
                __Pyx_XDECREF_SET(__pyx_v_casted, ((struct __pyx_obj_7pyarrow_3lib_ChunkedArray *)__pyx_t_6));
                __pyx_t_6 = 0;

                /* "pyarrow/table.pxi":4729
 *                     f"Casting field {field.name!r} with null values to non-nullable")
 *             casted = column.cast(field.type, safe=safe, options=options)
 *             newcols.append(casted)             # <<<<<<<<<<<<<<
 * 
 *         return Table.from_arrays(newcols, schema=target_schema)
*/
                __pyx_t_15 = __Pyx_PyList_Append(__pyx_v_newcols, ((PyObject *)__pyx_v_casted)); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(17, 4729, __pyx_L1_error)

                /* "pyarrow/table.pxi":4724
 *                              f"the table's field names: {self.schema.names!r}, {target_schema.names!r}")
 * 
 *         for column, field in zip(self.itercolumns(), target_schema):             # <<<<<<<<<<<<<<
 *             if not field.nullable and column.null_count > 0:
 *                 raise ValueError(
*/
              }
              __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

              /* "pyarrow/table.pxi":4731
 *             newcols.append(casted)
 * 
 *         return Table.from_arrays(newcols, schema=target_schema)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
*/
              __Pyx_XDECREF(__pyx_r);
              __pyx_t_6 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Table);
              __Pyx_INCREF(__pyx_t_6);
              __pyx_t_8 = 0;
              {
                PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_6, __pyx_v_newcols};
                __pyx_t_3 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 4731, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_schema, ((PyObject *)__pyx_v_target_schema), __pyx_t_3, __pyx_callargs+2, 0) < (0)) __PYX_ERR(17, 4731, __pyx_L1_error)
                __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_from_arrays, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_3);
                __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 4731, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_1);
              }
              __pyx_r = __pyx_t_1;
              __pyx_t_1 = 0;
              goto __pyx_L0;

              /* "pyarrow/table.pxi":4670
 *         return result
 * 
 *     def cast(self, Schema target_schema, safe=None, options=None):             # <<<<<<<<<<<<<<
 *         """
 *         Cast table values to another schema.
*/

              /* function exit code */
              __pyx_L1_error:;
              __Pyx_XDECREF(__pyx_t_1);
              __Pyx_XDECREF(__pyx_t_2);
              __Pyx_XDECREF(__pyx_t_3);
              __Pyx_XDECREF(__pyx_t_5);
              __Pyx_XDECREF(__pyx_t_6);
              __Pyx_AddTraceback("pyarrow.lib.Table.cast", __pyx_clineno, __pyx_lineno, __pyx_filename);
              __pyx_r = NULL;
              __pyx_L0:;
              __Pyx_XDECREF((PyObject *)__pyx_v_column);
              __Pyx_XDECREF((PyObject *)__pyx_v_casted);
              __Pyx_XDECREF((PyObject *)__pyx_v_field);
              __Pyx_XDECREF(__pyx_v_newcols);
              __Pyx_XGIVEREF(__pyx_r);
              __Pyx_RefNannyFinishContext();
              return __pyx_r;
            }

            /* "pyarrow/table.pxi":4733
 *         return Table.from_arrays(newcols, schema=target_schema)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def from_pandas(cls, df, Schema schema=None, preserve_index=None,
 *                     nthreads=None, columns=None, bint safe=True):
*/

            /* Python wrapper */
            static PyObject *__pyx_pw_7pyarrow_3lib_5Table_25from_pandas(PyObject *__pyx_v_cls, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
            PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_5Table_24from_pandas, "Table.from_pandas(cls, df, Schema schema=None, preserve_index=None, nthreads=None, columns=None, bool safe=True)\n\nConvert pandas.DataFrame to an Arrow Table.\n\nThe column types in the resulting Arrow Table are inferred from the\ndtypes of the pandas.Series in the DataFrame. In the case of non-object\nSeries, the NumPy dtype is translated to its Arrow equivalent. In the\ncase of `object`, we need to guess the datatype by looking at the\nPython objects in this Series.\n\nBe aware that Series of the `object` dtype don't carry enough\ninformation to always lead to a meaningful Arrow type. In the case that\nwe cannot infer a type, e.g. because the DataFrame is of length 0 or\nthe Series only contains None/nan objects, the type is set to\nnull. This behavior can be avoided by constructing an explicit schema\nand passing it to this function.\n\nParameters\n----------\ndf : pandas.DataFrame\nschema : pyarrow.Schema, optional\n    The expected schema of the Arrow Table. This can be used to\n    indicate the type of columns if we cannot infer it automatically.\n    If passed, the output will have exactly this schema. Columns\n    specified in the schema that are not found in the DataFrame columns\n    or its index will raise an error. Additional columns or index\n    levels in the DataFrame which are not specified in the schema will\n    be ignored.\npreserve_index : bool, optional\n    Whether to store the index as an additional column in the resulting\n    ``Table``. The default of None will store the index as a column,\n    except for RangeIndex which is stored as metadata only. Use\n    ``preserve_index=True`` to force it to be stored as a column.\nnthreads : int, default None\n    If greater than 1, convert columns to Arrow in parallel using\n    indicated number of threads. By default, this follows\n    :func:`pyarrow.cpu_count` (may use up to system CPU count threads).\ncolumns : list, optional\n   List of column to be converted. If None, use all columns.\nsafe : bo""ol, default True\n   Check for overflows or other unsafe conversions.\n\nReturns\n-------\nTable\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> import pandas as pd\n>>> df = pd.DataFrame({'n_legs': [2, 4, 5, 100],\n...                    'animals': [\"Flamingo\", \"Horse\", \"Brittle stars\", \"Centipede\"]})\n>>> pa.Table.from_pandas(df)\npyarrow.Table\nn_legs: int64\nanimals: string\n----\nn_legs: [[2,4,5,100]]\nanimals: [[\"Flamingo\",\"Horse\",\"Brittle stars\",\"Centipede\"]]");
            static PyMethodDef __pyx_mdef_7pyarrow_3lib_5Table_25from_pandas = {"from_pandas", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Table_25from_pandas, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Table_24from_pandas};
            static PyObject *__pyx_pw_7pyarrow_3lib_5Table_25from_pandas(PyObject *__pyx_v_cls, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
              PyObject *__pyx_v_df = 0;
              struct __pyx_obj_7pyarrow_3lib_Schema *__pyx_v_schema = 0;
              PyObject *__pyx_v_preserve_index = 0;
              PyObject *__pyx_v_nthreads = 0;
              PyObject *__pyx_v_columns = 0;
              int __pyx_v_safe;
              #if !CYTHON_METH_FASTCALL
              CYTHON_UNUSED Py_ssize_t __pyx_nargs;
              #endif
              CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
              PyObject* values[6] = {0,0,0,0,0,0};
              int __pyx_lineno = 0;
              const char *__pyx_filename = NULL;
              int __pyx_clineno = 0;
              PyObject *__pyx_r = 0;
              __Pyx_RefNannyDeclarations
              __Pyx_RefNannySetupContext("from_pandas (wrapper)", 0);
              #if !CYTHON_METH_FASTCALL
              #if CYTHON_ASSUME_SAFE_SIZE
              __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
              #else
              __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
              #endif
              #endif
              __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
              {
                PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_df,&__pyx_mstate_global->__pyx_n_u_schema,&__pyx_mstate_global->__pyx_n_u_preserve_index,&__pyx_mstate_global->__pyx_n_u_nthreads,&__pyx_mstate_global->__pyx_n_u_columns,&__pyx_mstate_global->__pyx_n_u_safe,0};
                const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(17, 4733, __pyx_L3_error)
                if (__pyx_kwds_len > 0) {
                  switch (__pyx_nargs) {
                    case  6:
                    values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
                    if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(17, 4733, __pyx_L3_error)
                    CYTHON_FALLTHROUGH;
                    case  5:
                    values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
                    if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(17, 4733, __pyx_L3_error)
                    CYTHON_FALLTHROUGH;
                    case  4:
                    values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
                    if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(17, 4733, __pyx_L3_error)
                    CYTHON_FALLTHROUGH;
                    case  3:
                    values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
                    if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(17, 4733, __pyx_L3_error)
                    CYTHON_FALLTHROUGH;
                    case  2:
                    values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                    if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(17, 4733, __pyx_L3_error)
                    CYTHON_FALLTHROUGH;
                    case  1:
                    values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                    if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 4733, __pyx_L3_error)
                    CYTHON_FALLTHROUGH;
                    case  0: break;
                    default: goto __pyx_L5_argtuple_error;
                  }
                  const Py_ssize_t kwd_pos_args = __pyx_nargs;
                  if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "from_pandas", 0) < (0)) __PYX_ERR(17, 4733, __pyx_L3_error)

                  /* "pyarrow/table.pxi":4734
 * 
 *     @classmethod
 *     def from_pandas(cls, df, Schema schema=None, preserve_index=None,             # <<<<<<<<<<<<<<
 *                     nthreads=None, columns=None, bint safe=True):
 *         """
*/
                  if (!values[1]) values[1] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_7pyarrow_3lib_Schema *)Py_None));
                  if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));

                  /* "pyarrow/table.pxi":4735
 *     @classmethod
 *     def from_pandas(cls, df, Schema schema=None, preserve_index=None,
 *                     nthreads=None, columns=None, bint safe=True):             # <<<<<<<<<<<<<<
 *         """
 *         Convert pandas.DataFrame to an Arrow Table.
*/
                  if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None));
                  if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)Py_None));
                  for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                    if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("from_pandas", 0, 1, 6, i); __PYX_ERR(17, 4733, __pyx_L3_error) }
                  }
                } else {
                  switch (__pyx_nargs) {
                    case  6:
                    values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
                    if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(17, 4733, __pyx_L3_error)
                    CYTHON_FALLTHROUGH;
                    case  5:
                    values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
                    if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(17, 4733, __pyx_L3_error)
                    CYTHON_FALLTHROUGH;
                    case  4:
                    values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
                    if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(17, 4733, __pyx_L3_error)
                    CYTHON_FALLTHROUGH;
                    case  3:
                    values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
                    if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(17, 4733, __pyx_L3_error)
                    CYTHON_FALLTHROUGH;
                    case  2:
                    values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                    if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(17, 4733, __pyx_L3_error)
                    CYTHON_FALLTHROUGH;
                    case  1:
                    values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                    if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 4733, __pyx_L3_error)
                    break;
                    default: goto __pyx_L5_argtuple_error;
                  }

                  /* "pyarrow/table.pxi":4734
 * 
 *     @classmethod
 *     def from_pandas(cls, df, Schema schema=None, preserve_index=None,             # <<<<<<<<<<<<<<
 *                     nthreads=None, columns=None, bint safe=True):
 *         """
*/
                  if (!values[1]) values[1] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_7pyarrow_3lib_Schema *)Py_None));
                  if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));

                  /* "pyarrow/table.pxi":4735
 *     @classmethod
 *     def from_pandas(cls, df, Schema schema=None, preserve_index=None,
 *                     nthreads=None, columns=None, bint safe=True):             # <<<<<<<<<<<<<<
 *         """
 *         Convert pandas.DataFrame to an Arrow Table.
*/
                  if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None));
                  if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)Py_None));
                }
                __pyx_v_df = values[0];
                __pyx_v_schema = ((struct __pyx_obj_7pyarrow_3lib_Schema *)values[1]);
                __pyx_v_preserve_index = values[2];
                __pyx_v_nthreads = values[3];
                __pyx_v_columns = values[4];
                if (values[5]) {
                  __pyx_v_safe = __Pyx_PyObject_IsTrue(values[5]); if (unlikely((__pyx_v_safe == (int)-1) && PyErr_Occurred())) __PYX_ERR(17, 4735, __pyx_L3_error)
                } else {
                  __pyx_v_safe = ((int)1);
                }
              }
              goto __pyx_L6_skip;
              __pyx_L5_argtuple_error:;
              __Pyx_RaiseArgtupleInvalid("from_pandas", 0, 1, 6, __pyx_nargs); __PYX_ERR(17, 4733, __pyx_L3_error)
              __pyx_L6_skip:;
              goto __pyx_L4_argument_unpacking_done;
              __pyx_L3_error:;
              for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                Py_XDECREF(values[__pyx_temp]);
              }
              __Pyx_AddTraceback("pyarrow.lib.Table.from_pandas", __pyx_clineno, __pyx_lineno, __pyx_filename);
              __Pyx_RefNannyFinishContext();
              return NULL;
              __pyx_L4_argument_unpacking_done:;
              if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_schema), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Schema, 1, "schema", 0))) __PYX_ERR(17, 4734, __pyx_L1_error)
              __pyx_r = __pyx_pf_7pyarrow_3lib_5Table_24from_pandas(((PyTypeObject*)__pyx_v_cls), __pyx_v_df, __pyx_v_schema, __pyx_v_preserve_index, __pyx_v_nthreads, __pyx_v_columns, __pyx_v_safe);

              /* "pyarrow/table.pxi":4733
 *         return Table.from_arrays(newcols, schema=target_schema)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def from_pandas(cls, df, Schema schema=None, preserve_index=None,
 *                     nthreads=None, columns=None, bint safe=True):
*/

              /* function exit code */
              goto __pyx_L0;
              __pyx_L1_error:;
              __pyx_r = NULL;
              for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                Py_XDECREF(values[__pyx_temp]);
              }
              goto __pyx_L7_cleaned_up;
              __pyx_L0:;
              for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                Py_XDECREF(values[__pyx_temp]);
              }
              __pyx_L7_cleaned_up:;
              __Pyx_RefNannyFinishContext();
              return __pyx_r;
            }

            static PyObject *__pyx_pf_7pyarrow_3lib_5Table_24from_pandas(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_df, struct __pyx_obj_7pyarrow_3lib_Schema *__pyx_v_schema, PyObject *__pyx_v_preserve_index, PyObject *__pyx_v_nthreads, PyObject *__pyx_v_columns, int __pyx_v_safe) {
              PyObject *__pyx_v_dataframe_to_arrays = NULL;
              PyObject *__pyx_v_arrays = NULL;
              PyObject *__pyx_v_n_rows = NULL;
              std::vector<std::shared_ptr< arrow::ChunkedArray> >  __pyx_v_c_arrays;
              PyObject *__pyx_r = NULL;
              __Pyx_RefNannyDeclarations
              PyObject *__pyx_t_1 = NULL;
              PyObject *__pyx_t_2 = NULL;
              Py_ssize_t __pyx_t_3;
              PyObject *__pyx_t_4 = NULL;
              PyObject *__pyx_t_5 = NULL;
              PyObject *__pyx_t_6 = NULL;
              size_t __pyx_t_7;
              PyObject *__pyx_t_8 = NULL;
              PyObject *(*__pyx_t_9)(PyObject *);
              int __pyx_t_10;
              int64_t __pyx_t_11;
              int __pyx_lineno = 0;
              const char *__pyx_filename = NULL;
              int __pyx_clineno = 0;
              __Pyx_RefNannySetupContext("from_pandas", 0);
              __Pyx_INCREF((PyObject *)__pyx_v_schema);

              /* "pyarrow/table.pxi":4795
 *         animals: [["Flamingo","Horse","Brittle stars","Centipede"]]
 *         """
 *         from pyarrow.pandas_compat import dataframe_to_arrays             # <<<<<<<<<<<<<<
 *         arrays, schema, n_rows = dataframe_to_arrays(
 *             df,
*/
              {
                PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_dataframe_to_arrays};
                __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_pyarrow_pandas_compat, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 4795, __pyx_L1_error)
              }
              __pyx_t_1 = __pyx_t_2;
              __Pyx_GOTREF(__pyx_t_1);
              {
                PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_dataframe_to_arrays};
                __pyx_t_3 = 0; {
                  __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_1, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 4795, __pyx_L1_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  switch (__pyx_t_3) {
                    case 0:
                    __Pyx_INCREF(__pyx_t_4);
                    __pyx_v_dataframe_to_arrays = __pyx_t_4;
                    break;
                    default:;
                  }
                  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                }
              }
              __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

              /* "pyarrow/table.pxi":4796
 *         """
 *         from pyarrow.pandas_compat import dataframe_to_arrays
 *         arrays, schema, n_rows = dataframe_to_arrays(             # <<<<<<<<<<<<<<
 *             df,
 *             schema=schema,
*/
              __pyx_t_4 = NULL;
              __Pyx_INCREF(__pyx_v_dataframe_to_arrays);
              __pyx_t_5 = __pyx_v_dataframe_to_arrays; 

              /* "pyarrow/table.pxi":4802
 *             nthreads=nthreads,
 *             columns=columns,
 *             safe=safe             # <<<<<<<<<<<<<<
 *         )
 * 
*/
              __pyx_t_6 = __Pyx_PyBool_FromLong(__pyx_v_safe); if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 4802, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_6);
              __pyx_t_7 = 1;
              #if CYTHON_UNPACK_METHODS
              if (unlikely(PyMethod_Check(__pyx_t_5))) {
                __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
                assert(__pyx_t_4);
                PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
                __Pyx_INCREF(__pyx_t_4);
                __Pyx_INCREF(__pyx__function);
                __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
                __pyx_t_7 = 0;
              }
              #endif
              {
                PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 5 : 0)] = {__pyx_t_4, __pyx_v_df};
                __pyx_t_8 = __Pyx_MakeVectorcallBuilderKwds(5); if (unlikely(!__pyx_t_8)) __PYX_ERR(17, 4796, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_8);
                if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_schema, ((PyObject *)__pyx_v_schema), __pyx_t_8, __pyx_callargs+2, 0) < (0)) __PYX_ERR(17, 4796, __pyx_L1_error)
                if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_preserve_index, __pyx_v_preserve_index, __pyx_t_8, __pyx_callargs+2, 1) < (0)) __PYX_ERR(17, 4796, __pyx_L1_error)
                if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_nthreads, __pyx_v_nthreads, __pyx_t_8, __pyx_callargs+2, 2) < (0)) __PYX_ERR(17, 4796, __pyx_L1_error)
                if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_columns, __pyx_v_columns, __pyx_t_8, __pyx_callargs+2, 3) < (0)) __PYX_ERR(17, 4796, __pyx_L1_error)
                if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_safe, __pyx_t_6, __pyx_t_8, __pyx_callargs+2, 4) < (0)) __PYX_ERR(17, 4796, __pyx_L1_error)
                __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_8);
                __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 4796, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_1);
              }
              if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
                PyObject* sequence = __pyx_t_1;
                Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
                if (unlikely(size != 3)) {
                  if (size > 3) __Pyx_RaiseTooManyValuesError(3);
                  else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
                  __PYX_ERR(17, 4796, __pyx_L1_error)
                }
                #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                if (likely(PyTuple_CheckExact(sequence))) {
                  __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0);
                  __Pyx_INCREF(__pyx_t_5);
                  __pyx_t_8 = PyTuple_GET_ITEM(sequence, 1);
                  __Pyx_INCREF(__pyx_t_8);
                  __pyx_t_6 = PyTuple_GET_ITEM(sequence, 2);
                  __Pyx_INCREF(__pyx_t_6);
                } else {
                  __pyx_t_5 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference);
                  if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 4796, __pyx_L1_error)
                  __Pyx_XGOTREF(__pyx_t_5);
                  __pyx_t_8 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference);
                  if (unlikely(!__pyx_t_8)) __PYX_ERR(17, 4796, __pyx_L1_error)
                  __Pyx_XGOTREF(__pyx_t_8);
                  __pyx_t_6 = __Pyx_PyList_GetItemRefFast(sequence, 2, __Pyx_ReferenceSharing_SharedReference);
                  if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 4796, __pyx_L1_error)
                  __Pyx_XGOTREF(__pyx_t_6);
                }
                #else
                __pyx_t_5 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 4796, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_5);
                __pyx_t_8 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(17, 4796, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_8);
                __pyx_t_6 = __Pyx_PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 4796, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_6);
                #endif
                __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
              } else {
                Py_ssize_t index = -1;
                __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 4796, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                __pyx_t_9 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_4);
                index = 0; __pyx_t_5 = __pyx_t_9(__pyx_t_4); if (unlikely(!__pyx_t_5)) goto __pyx_L3_unpacking_failed;
                __Pyx_GOTREF(__pyx_t_5);
                index = 1; __pyx_t_8 = __pyx_t_9(__pyx_t_4); if (unlikely(!__pyx_t_8)) goto __pyx_L3_unpacking_failed;
                __Pyx_GOTREF(__pyx_t_8);
                index = 2; __pyx_t_6 = __pyx_t_9(__pyx_t_4); if (unlikely(!__pyx_t_6)) goto __pyx_L3_unpacking_failed;
                __Pyx_GOTREF(__pyx_t_6);
                if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_4), 3) < (0)) __PYX_ERR(17, 4796, __pyx_L1_error)
                __pyx_t_9 = NULL;
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                goto __pyx_L4_unpacking_done;
                __pyx_L3_unpacking_failed:;
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_t_9 = NULL;
                if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
                __PYX_ERR(17, 4796, __pyx_L1_error)
                __pyx_L4_unpacking_done:;
              }

              /* "pyarrow/table.pxi":4796
 *         """
 *         from pyarrow.pandas_compat import dataframe_to_arrays
 *         arrays, schema, n_rows = dataframe_to_arrays(             # <<<<<<<<<<<<<<
 *             df,
 *             schema=schema,
*/
              if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Schema))))) __PYX_ERR(17, 4796, __pyx_L1_error)
              __pyx_v_arrays = __pyx_t_5;
              __pyx_t_5 = 0;
              __Pyx_DECREF_SET(__pyx_v_schema, ((struct __pyx_obj_7pyarrow_3lib_Schema *)__pyx_t_8));
              __pyx_t_8 = 0;
              __pyx_v_n_rows = __pyx_t_6;
              __pyx_t_6 = 0;

              /* "pyarrow/table.pxi":4807
 *         # If df is empty but row index is not, create empty Table with rows >0
 *         cdef vector[shared_ptr[CChunkedArray]] c_arrays
 *         if n_rows:             # <<<<<<<<<<<<<<
 *             return pyarrow_wrap_table(
 *                 CTable.MakeWithRows((<Schema> schema).sp_schema, c_arrays, n_rows))
*/
              __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_n_rows); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(17, 4807, __pyx_L1_error)
              if (__pyx_t_10) {

                /* "pyarrow/table.pxi":4808
 *         cdef vector[shared_ptr[CChunkedArray]] c_arrays
 *         if n_rows:
 *             return pyarrow_wrap_table(             # <<<<<<<<<<<<<<
 *                 CTable.MakeWithRows((<Schema> schema).sp_schema, c_arrays, n_rows))
 *         else:
*/
                __Pyx_XDECREF(__pyx_r);

                /* "pyarrow/table.pxi":4809
 *         if n_rows:
 *             return pyarrow_wrap_table(
 *                 CTable.MakeWithRows((<Schema> schema).sp_schema, c_arrays, n_rows))             # <<<<<<<<<<<<<<
 *         else:
 *             return cls.from_arrays(arrays, schema=schema)
*/
                if (unlikely(((PyObject *)__pyx_v_schema) == Py_None)) {
                  PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_schema");
                  __PYX_ERR(17, 4809, __pyx_L1_error)
                }
                __pyx_t_11 = __Pyx_PyLong_As_int64_t(__pyx_v_n_rows); if (unlikely((__pyx_t_11 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(17, 4809, __pyx_L1_error)

                /* "pyarrow/table.pxi":4808
 *         cdef vector[shared_ptr[CChunkedArray]] c_arrays
 *         if n_rows:
 *             return pyarrow_wrap_table(             # <<<<<<<<<<<<<<
 *                 CTable.MakeWithRows((<Schema> schema).sp_schema, c_arrays, n_rows))
 *         else:
*/
                __pyx_t_1 = pyarrow_wrap_table( arrow::Table::Make(((struct __pyx_obj_7pyarrow_3lib_Schema *)__pyx_v_schema)->sp_schema, __pyx_v_c_arrays, __pyx_t_11)); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 4808, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_1);
                __pyx_r = __pyx_t_1;
                __pyx_t_1 = 0;
                goto __pyx_L0;

                /* "pyarrow/table.pxi":4807
 *         # If df is empty but row index is not, create empty Table with rows >0
 *         cdef vector[shared_ptr[CChunkedArray]] c_arrays
 *         if n_rows:             # <<<<<<<<<<<<<<
 *             return pyarrow_wrap_table(
 *                 CTable.MakeWithRows((<Schema> schema).sp_schema, c_arrays, n_rows))
*/
              }

              /* "pyarrow/table.pxi":4811
 *                 CTable.MakeWithRows((<Schema> schema).sp_schema, c_arrays, n_rows))
 *         else:
 *             return cls.from_arrays(arrays, schema=schema)             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
*/
              /*else*/ {
                __Pyx_XDECREF(__pyx_r);
                __pyx_t_6 = ((PyObject *)__pyx_v_cls);
                __Pyx_INCREF(__pyx_t_6);
                __pyx_t_7 = 0;
                {
                  PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_6, __pyx_v_arrays};
                  __pyx_t_8 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(17, 4811, __pyx_L1_error)
                  __Pyx_GOTREF(__pyx_t_8);
                  if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_schema, ((PyObject *)__pyx_v_schema), __pyx_t_8, __pyx_callargs+2, 0) < (0)) __PYX_ERR(17, 4811, __pyx_L1_error)
                  __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_from_arrays, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_8);
                  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
                  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                  if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 4811, __pyx_L1_error)
                  __Pyx_GOTREF(__pyx_t_1);
                }
                __pyx_r = __pyx_t_1;
                __pyx_t_1 = 0;
                goto __pyx_L0;
              }

              /* "pyarrow/table.pxi":4733
 *         return Table.from_arrays(newcols, schema=target_schema)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def from_pandas(cls, df, Schema schema=None, preserve_index=None,
 *                     nthreads=None, columns=None, bint safe=True):
*/

              /* function exit code */
              __pyx_L1_error:;
              __Pyx_XDECREF(__pyx_t_1);
              __Pyx_XDECREF(__pyx_t_4);
              __Pyx_XDECREF(__pyx_t_5);
              __Pyx_XDECREF(__pyx_t_6);
              __Pyx_XDECREF(__pyx_t_8);
              __Pyx_AddTraceback("pyarrow.lib.Table.from_pandas", __pyx_clineno, __pyx_lineno, __pyx_filename);
              __pyx_r = NULL;
              __pyx_L0:;
              __Pyx_XDECREF(__pyx_v_dataframe_to_arrays);
              __Pyx_XDECREF(__pyx_v_arrays);
              __Pyx_XDECREF(__pyx_v_n_rows);
              __Pyx_XDECREF((PyObject *)__pyx_v_schema);
              __Pyx_XGIVEREF(__pyx_r);
              __Pyx_RefNannyFinishContext();
              return __pyx_r;
            }

            /* "pyarrow/table.pxi":4813
 *             return cls.from_arrays(arrays, schema=schema)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_arrays(arrays, names=None, schema=None, metadata=None):
 *         """
*/

            /* Python wrapper */
            static PyObject *__pyx_pw_7pyarrow_3lib_5Table_27from_arrays(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
            PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_5Table_26from_arrays, "Table.from_arrays(arrays, names=None, schema=None, metadata=None)\n\nConstruct a Table from Arrow arrays.\n\nParameters\n----------\narrays : list of pyarrow.Array or pyarrow.ChunkedArray\n    Equal-length arrays that should form the table.\nnames : list of str, optional\n    Names for the table columns. If not passed, schema must be passed.\nschema : Schema, default None\n    Schema for the created table. If not passed, names must be passed.\nmetadata : dict or Mapping, default None\n    Optional metadata for the schema (if inferred).\n\nReturns\n-------\nTable\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> n_legs = pa.array([2, 4, 5, 100])\n>>> animals = pa.array([\"Flamingo\", \"Horse\", \"Brittle stars\", \"Centipede\"])\n>>> names = [\"n_legs\", \"animals\"]\n\nConstruct a Table from arrays:\n\n>>> pa.Table.from_arrays([n_legs, animals], names=names)\npyarrow.Table\nn_legs: int64\nanimals: string\n----\nn_legs: [[2,4,5,100]]\nanimals: [[\"Flamingo\",\"Horse\",\"Brittle stars\",\"Centipede\"]]\n\nConstruct a Table from arrays with metadata:\n\n>>> my_metadata={\"n_legs\": \"Number of legs per animal\"}\n>>> pa.Table.from_arrays([n_legs, animals],\n...                       names=names,\n...                       metadata=my_metadata)\npyarrow.Table\nn_legs: int64\nanimals: string\n----\nn_legs: [[2,4,5,100]]\nanimals: [[\"Flamingo\",\"Horse\",\"Brittle stars\",\"Centipede\"]]\n>>> pa.Table.from_arrays([n_legs, animals],\n...                       names=names,\n...                       metadata=my_metadata).schema\nn_legs: int64\nanimals: string\n-- schema metadata --\nn_legs: 'Number of legs per animal'\n\nConstruct a Table from arrays with pyarrow schema:\n\n>>> my_schema = pa.schema([\n...     pa.field('n_legs', pa.int64()),\n...     pa.field('animals', pa.string())],\n...     metadata={\"animals\": \"Name of the animal species\"})\n>>> pa.Table.from_arrays([n_legs, animals],\n...                       schema=my_schema)\npyarrow.Table\nn_legs: int64""\nanimals: string\n----\nn_legs: [[2,4,5,100]]\nanimals: [[\"Flamingo\",\"Horse\",\"Brittle stars\",\"Centipede\"]]\n>>> pa.Table.from_arrays([n_legs, animals],\n...                       schema=my_schema).schema\nn_legs: int64\nanimals: string\n-- schema metadata --\nanimals: 'Name of the animal species'");
            static PyMethodDef __pyx_mdef_7pyarrow_3lib_5Table_27from_arrays = {"from_arrays", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Table_27from_arrays, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Table_26from_arrays};
            static PyObject *__pyx_pw_7pyarrow_3lib_5Table_27from_arrays(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
              PyObject *__pyx_v_arrays = 0;
              PyObject *__pyx_v_names = 0;
              PyObject *__pyx_v_schema = 0;
              PyObject *__pyx_v_metadata = 0;
              #if !CYTHON_METH_FASTCALL
              CYTHON_UNUSED Py_ssize_t __pyx_nargs;
              #endif
              CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
              PyObject* values[4] = {0,0,0,0};
              int __pyx_lineno = 0;
              const char *__pyx_filename = NULL;
              int __pyx_clineno = 0;
              PyObject *__pyx_r = 0;
              __Pyx_RefNannyDeclarations
              __Pyx_RefNannySetupContext("from_arrays (wrapper)", 0);
              #if !CYTHON_METH_FASTCALL
              #if CYTHON_ASSUME_SAFE_SIZE
              __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
              #else
              __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
              #endif
              #endif
              __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
              {
                PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_arrays,&__pyx_mstate_global->__pyx_n_u_names,&__pyx_mstate_global->__pyx_n_u_schema,&__pyx_mstate_global->__pyx_n_u_metadata,0};
                const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(17, 4813, __pyx_L3_error)
                if (__pyx_kwds_len > 0) {
                  switch (__pyx_nargs) {
                    case  4:
                    values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
                    if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(17, 4813, __pyx_L3_error)
                    CYTHON_FALLTHROUGH;
                    case  3:
                    values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
                    if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(17, 4813, __pyx_L3_error)
                    CYTHON_FALLTHROUGH;
                    case  2:
                    values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                    if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(17, 4813, __pyx_L3_error)
                    CYTHON_FALLTHROUGH;
                    case  1:
                    values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                    if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 4813, __pyx_L3_error)
                    CYTHON_FALLTHROUGH;
                    case  0: break;
                    default: goto __pyx_L5_argtuple_error;
                  }
                  const Py_ssize_t kwd_pos_args = __pyx_nargs;
                  if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "from_arrays", 0) < (0)) __PYX_ERR(17, 4813, __pyx_L3_error)

                  /* "pyarrow/table.pxi":4814
 * 
 *     @staticmethod
 *     def from_arrays(arrays, names=None, schema=None, metadata=None):             # <<<<<<<<<<<<<<
 *         """
 *         Construct a Table from Arrow arrays.
*/
                  if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
                  if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
                  if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None));
                  for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                    if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("from_arrays", 0, 1, 4, i); __PYX_ERR(17, 4813, __pyx_L3_error) }
                  }
                } else {
                  switch (__pyx_nargs) {
                    case  4:
                    values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
                    if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(17, 4813, __pyx_L3_error)
                    CYTHON_FALLTHROUGH;
                    case  3:
                    values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
                    if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(17, 4813, __pyx_L3_error)
                    CYTHON_FALLTHROUGH;
                    case  2:
                    values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                    if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(17, 4813, __pyx_L3_error)
                    CYTHON_FALLTHROUGH;
                    case  1:
                    values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                    if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 4813, __pyx_L3_error)
                    break;
                    default: goto __pyx_L5_argtuple_error;
                  }
                  if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
                  if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
                  if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None));
                }
                __pyx_v_arrays = values[0];
                __pyx_v_names = values[1];
                __pyx_v_schema = values[2];
                __pyx_v_metadata = values[3];
              }
              goto __pyx_L6_skip;
              __pyx_L5_argtuple_error:;
              __Pyx_RaiseArgtupleInvalid("from_arrays", 0, 1, 4, __pyx_nargs); __PYX_ERR(17, 4813, __pyx_L3_error)
              __pyx_L6_skip:;
              goto __pyx_L4_argument_unpacking_done;
              __pyx_L3_error:;
              for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                Py_XDECREF(values[__pyx_temp]);
              }
              __Pyx_AddTraceback("pyarrow.lib.Table.from_arrays", __pyx_clineno, __pyx_lineno, __pyx_filename);
              __Pyx_RefNannyFinishContext();
              return NULL;
              __pyx_L4_argument_unpacking_done:;
              __pyx_r = __pyx_pf_7pyarrow_3lib_5Table_26from_arrays(__pyx_v_arrays, __pyx_v_names, __pyx_v_schema, __pyx_v_metadata);

              /* "pyarrow/table.pxi":4813
 *             return cls.from_arrays(arrays, schema=schema)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_arrays(arrays, names=None, schema=None, metadata=None):
 *         """
*/

              /* function exit code */
              for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                Py_XDECREF(values[__pyx_temp]);
              }
              __Pyx_RefNannyFinishContext();
              return __pyx_r;
            }

            static PyObject *__pyx_pf_7pyarrow_3lib_5Table_26from_arrays(PyObject *__pyx_v_arrays, PyObject *__pyx_v_names, PyObject *__pyx_v_schema, PyObject *__pyx_v_metadata) {
              std::vector<std::shared_ptr< arrow::ChunkedArray> >  __pyx_v_columns;
              std::shared_ptr< arrow::Schema>  __pyx_v_c_schema;
              int __pyx_v_K;
              PyObject *__pyx_v_converted_arrays = NULL;
              PyObject *__pyx_v_item = NULL;
              PyObject *__pyx_v_result = NULL;
              PyObject *__pyx_r = NULL;
              __Pyx_RefNannyDeclarations
              Py_ssize_t __pyx_t_1;
              PyObject *__pyx_t_2 = NULL;
              PyObject *(*__pyx_t_3)(PyObject *);
              PyObject *__pyx_t_4 = NULL;
              int __pyx_t_5;
              std::shared_ptr< arrow::ChunkedArray>  __pyx_t_6;
              PyObject *__pyx_t_7 = NULL;
              size_t __pyx_t_8;
              int __pyx_lineno = 0;
              const char *__pyx_filename = NULL;
              int __pyx_clineno = 0;
              __Pyx_RefNannySetupContext("from_arrays", 0);

              /* "pyarrow/table.pxi":4894
 *             vector[shared_ptr[CChunkedArray]] columns
 *             shared_ptr[CSchema] c_schema
 *             int i, K = <int> len(arrays)             # <<<<<<<<<<<<<<
 * 
 *         converted_arrays = _sanitize_arrays(arrays, names, schema, metadata,
*/
              __pyx_t_1 = PyObject_Length(__pyx_v_arrays); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(17, 4894, __pyx_L1_error)
              __pyx_v_K = ((int)__pyx_t_1);

              /* "pyarrow/table.pxi":4896
 *             int i, K = <int> len(arrays)
 * 
 *         converted_arrays = _sanitize_arrays(arrays, names, schema, metadata,             # <<<<<<<<<<<<<<
 *                                             &c_schema)
 * 
*/
              __pyx_t_2 = __pyx_f_7pyarrow_3lib__sanitize_arrays(__pyx_v_arrays, __pyx_v_names, __pyx_v_schema, __pyx_v_metadata, (&__pyx_v_c_schema)); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 4896, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_2);
              __pyx_v_converted_arrays = __pyx_t_2;
              __pyx_t_2 = 0;

              /* "pyarrow/table.pxi":4899
 *                                             &c_schema)
 * 
 *         columns.reserve(K)             # <<<<<<<<<<<<<<
 *         for item in converted_arrays:
 *             if isinstance(item, Array):
*/
              try {
                __pyx_v_columns.reserve(__pyx_v_K);
              } catch(...) {
                __Pyx_CppExn2PyErr();
                __PYX_ERR(17, 4899, __pyx_L1_error)
              }

              /* "pyarrow/table.pxi":4900
 * 
 *         columns.reserve(K)
 *         for item in converted_arrays:             # <<<<<<<<<<<<<<
 *             if isinstance(item, Array):
 *                 columns.push_back(
*/
              if (likely(PyList_CheckExact(__pyx_v_converted_arrays)) || PyTuple_CheckExact(__pyx_v_converted_arrays)) {
                __pyx_t_2 = __pyx_v_converted_arrays; __Pyx_INCREF(__pyx_t_2);
                __pyx_t_1 = 0;
                __pyx_t_3 = NULL;
              } else {
                __pyx_t_1 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_converted_arrays); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 4900, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_2);
                __pyx_t_3 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 4900, __pyx_L1_error)
              }
              for (;;) {
                if (likely(!__pyx_t_3)) {
                  if (likely(PyList_CheckExact(__pyx_t_2))) {
                    {
                      Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2);
                      #if !CYTHON_ASSUME_SAFE_SIZE
                      if (unlikely((__pyx_temp < 0))) __PYX_ERR(17, 4900, __pyx_L1_error)
                      #endif
                      if (__pyx_t_1 >= __pyx_temp) break;
                    }
                    __pyx_t_4 = __Pyx_PyList_GetItemRefFast(__pyx_t_2, __pyx_t_1, __Pyx_ReferenceSharing_OwnStrongReference);
                    ++__pyx_t_1;
                  } else {
                    {
                      Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2);
                      #if !CYTHON_ASSUME_SAFE_SIZE
                      if (unlikely((__pyx_temp < 0))) __PYX_ERR(17, 4900, __pyx_L1_error)
                      #endif
                      if (__pyx_t_1 >= __pyx_temp) break;
                    }
                    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                    __pyx_t_4 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_1));
                    #else
                    __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_1);
                    #endif
                    ++__pyx_t_1;
                  }
                  if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 4900, __pyx_L1_error)
                } else {
                  __pyx_t_4 = __pyx_t_3(__pyx_t_2);
                  if (unlikely(!__pyx_t_4)) {
                    PyObject* exc_type = PyErr_Occurred();
                    if (exc_type) {
                      if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(17, 4900, __pyx_L1_error)
                      PyErr_Clear();
                    }
                    break;
                  }
                }
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_4);
                __pyx_t_4 = 0;

                /* "pyarrow/table.pxi":4901
 *         columns.reserve(K)
 *         for item in converted_arrays:
 *             if isinstance(item, Array):             # <<<<<<<<<<<<<<
 *                 columns.push_back(
 *                     make_shared[CChunkedArray](
*/
                __pyx_t_5 = __Pyx_TypeCheck(__pyx_v_item, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array); 
                if (__pyx_t_5) {

                  /* "pyarrow/table.pxi":4904
 *                 columns.push_back(
 *                     make_shared[CChunkedArray](
 *                         (<Array> item).sp_array             # <<<<<<<<<<<<<<
 *                     )
 *                 )
*/
                  if (unlikely(__pyx_v_item == Py_None)) {
                    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_array");
                    __PYX_ERR(17, 4904, __pyx_L1_error)
                  }

                  /* "pyarrow/table.pxi":4903
 *             if isinstance(item, Array):
 *                 columns.push_back(
 *                     make_shared[CChunkedArray](             # <<<<<<<<<<<<<<
 *                         (<Array> item).sp_array
 *                     )
*/
                  try {
                    __pyx_t_6 = std::make_shared< arrow::ChunkedArray>(((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_v_item)->sp_array);
                  } catch(...) {
                    __Pyx_CppExn2PyErr();
                    __PYX_ERR(17, 4903, __pyx_L1_error)
                  }

                  /* "pyarrow/table.pxi":4902
 *         for item in converted_arrays:
 *             if isinstance(item, Array):
 *                 columns.push_back(             # <<<<<<<<<<<<<<
 *                     make_shared[CChunkedArray](
 *                         (<Array> item).sp_array
*/
                  try {
                    __pyx_v_columns.push_back(__pyx_t_6);
                  } catch(...) {
                    __Pyx_CppExn2PyErr();
                    __PYX_ERR(17, 4902, __pyx_L1_error)
                  }

                  /* "pyarrow/table.pxi":4901
 *         columns.reserve(K)
 *         for item in converted_arrays:
 *             if isinstance(item, Array):             # <<<<<<<<<<<<<<
 *                 columns.push_back(
 *                     make_shared[CChunkedArray](
*/
                  goto __pyx_L5;
                }

                /* "pyarrow/table.pxi":4907
 *                     )
 *                 )
 *             elif isinstance(item, ChunkedArray):             # <<<<<<<<<<<<<<
 *                 columns.push_back((<ChunkedArray> item).sp_chunked_array)
 *             else:
*/
                __pyx_t_5 = __Pyx_TypeCheck(__pyx_v_item, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ChunkedArray); 
                if (likely(__pyx_t_5)) {

                  /* "pyarrow/table.pxi":4908
 *                 )
 *             elif isinstance(item, ChunkedArray):
 *                 columns.push_back((<ChunkedArray> item).sp_chunked_array)             # <<<<<<<<<<<<<<
 *             else:
 *                 raise TypeError(type(item))
*/
                  if (unlikely(__pyx_v_item == Py_None)) {
                    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_chunked_array");
                    __PYX_ERR(17, 4908, __pyx_L1_error)
                  }
                  try {
                    __pyx_v_columns.push_back(((struct __pyx_obj_7pyarrow_3lib_ChunkedArray *)__pyx_v_item)->sp_chunked_array);
                  } catch(...) {
                    __Pyx_CppExn2PyErr();
                    __PYX_ERR(17, 4908, __pyx_L1_error)
                  }

                  /* "pyarrow/table.pxi":4907
 *                     )
 *                 )
 *             elif isinstance(item, ChunkedArray):             # <<<<<<<<<<<<<<
 *                 columns.push_back((<ChunkedArray> item).sp_chunked_array)
 *             else:
*/
                  goto __pyx_L5;
                }

                /* "pyarrow/table.pxi":4910
 *                 columns.push_back((<ChunkedArray> item).sp_chunked_array)
 *             else:
 *                 raise TypeError(type(item))             # <<<<<<<<<<<<<<
 * 
 *         result = pyarrow_wrap_table(CTable.Make(c_schema, columns))
*/
                /*else*/ {
                  __pyx_t_7 = NULL;
                  __pyx_t_8 = 1;
                  {
                    PyObject *__pyx_callargs[2] = {__pyx_t_7, ((PyObject *)Py_TYPE(__pyx_v_item))};
                    __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
                    if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 4910, __pyx_L1_error)
                    __Pyx_GOTREF(__pyx_t_4);
                  }
                  __Pyx_Raise(__pyx_t_4, 0, 0, 0);
                  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                  __PYX_ERR(17, 4910, __pyx_L1_error)
                }
                __pyx_L5:;

                /* "pyarrow/table.pxi":4900
 * 
 *         columns.reserve(K)
 *         for item in converted_arrays:             # <<<<<<<<<<<<<<
 *             if isinstance(item, Array):
 *                 columns.push_back(
*/
              }
              __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

              /* "pyarrow/table.pxi":4912
 *                 raise TypeError(type(item))
 * 
 *         result = pyarrow_wrap_table(CTable.Make(c_schema, columns))             # <<<<<<<<<<<<<<
 *         result.validate()
 *         return result
*/
              __pyx_t_2 = pyarrow_wrap_table( arrow::Table::Make(__pyx_v_c_schema, __pyx_v_columns)); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 4912, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_2);
              __pyx_v_result = __pyx_t_2;
              __pyx_t_2 = 0;

              /* "pyarrow/table.pxi":4913
 * 
 *         result = pyarrow_wrap_table(CTable.Make(c_schema, columns))
 *         result.validate()             # <<<<<<<<<<<<<<
 *         return result
 * 
*/
              __pyx_t_4 = __pyx_v_result;
              __Pyx_INCREF(__pyx_t_4);
              __pyx_t_8 = 0;
              {
                PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
                __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_validate, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 4913, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_2);
              }
              __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

              /* "pyarrow/table.pxi":4914
 *         result = pyarrow_wrap_table(CTable.Make(c_schema, columns))
 *         result.validate()
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
*/
              __Pyx_XDECREF(__pyx_r);
              __Pyx_INCREF(__pyx_v_result);
              __pyx_r = __pyx_v_result;
              goto __pyx_L0;

              /* "pyarrow/table.pxi":4813
 *             return cls.from_arrays(arrays, schema=schema)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_arrays(arrays, names=None, schema=None, metadata=None):
 *         """
*/

              /* function exit code */
              __pyx_L1_error:;
              __Pyx_XDECREF(__pyx_t_2);
              __Pyx_XDECREF(__pyx_t_4);
              __Pyx_XDECREF(__pyx_t_7);
              __Pyx_AddTraceback("pyarrow.lib.Table.from_arrays", __pyx_clineno, __pyx_lineno, __pyx_filename);
              __pyx_r = NULL;
              __pyx_L0:;
              __Pyx_XDECREF(__pyx_v_converted_arrays);
              __Pyx_XDECREF(__pyx_v_item);
              __Pyx_XDECREF(__pyx_v_result);
              __Pyx_XGIVEREF(__pyx_r);
              __Pyx_RefNannyFinishContext();
              return __pyx_r;
            }

            /* "pyarrow/table.pxi":4916
 *         return result
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_struct_array(struct_array):
 *         """
*/

            /* Python wrapper */
            static PyObject *__pyx_pw_7pyarrow_3lib_5Table_29from_struct_array(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
            PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_5Table_28from_struct_array, "Table.from_struct_array(struct_array)\n\nConstruct a Table from a StructArray.\n\nEach field in the StructArray will become a column in the resulting\n``Table``.\n\nParameters\n----------\nstruct_array : StructArray or ChunkedArray\n    Array to construct the table from.\n\nReturns\n-------\npyarrow.Table\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> struct = pa.array([{'n_legs': 2, 'animals': 'Parrot'},\n...                    {'year': 2022, 'n_legs': 4}])\n>>> pa.Table.from_struct_array(struct).to_pandas()\n  animals  n_legs    year\n0  Parrot       2     NaN\n1    None       4  2022.0");
            static PyMethodDef __pyx_mdef_7pyarrow_3lib_5Table_29from_struct_array = {"from_struct_array", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Table_29from_struct_array, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Table_28from_struct_array};
            static PyObject *__pyx_pw_7pyarrow_3lib_5Table_29from_struct_array(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
              PyObject *__pyx_v_struct_array = 0;
              #if !CYTHON_METH_FASTCALL
              CYTHON_UNUSED Py_ssize_t __pyx_nargs;
              #endif
              CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
              PyObject* values[1] = {0};
              int __pyx_lineno = 0;
              const char *__pyx_filename = NULL;
              int __pyx_clineno = 0;
              PyObject *__pyx_r = 0;
              __Pyx_RefNannyDeclarations
              __Pyx_RefNannySetupContext("from_struct_array (wrapper)", 0);
              #if !CYTHON_METH_FASTCALL
              #if CYTHON_ASSUME_SAFE_SIZE
              __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
              #else
              __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
              #endif
              #endif
              __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
              {
                PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_struct_array,0};
                const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(17, 4916, __pyx_L3_error)
                if (__pyx_kwds_len > 0) {
                  switch (__pyx_nargs) {
                    case  1:
                    values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                    if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 4916, __pyx_L3_error)
                    CYTHON_FALLTHROUGH;
                    case  0: break;
                    default: goto __pyx_L5_argtuple_error;
                  }
                  const Py_ssize_t kwd_pos_args = __pyx_nargs;
                  if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "from_struct_array", 0) < (0)) __PYX_ERR(17, 4916, __pyx_L3_error)
                  for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                    if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("from_struct_array", 1, 1, 1, i); __PYX_ERR(17, 4916, __pyx_L3_error) }
                  }
                } else if (unlikely(__pyx_nargs != 1)) {
                  goto __pyx_L5_argtuple_error;
                } else {
                  values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                  if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 4916, __pyx_L3_error)
                }
                __pyx_v_struct_array = values[0];
              }
              goto __pyx_L6_skip;
              __pyx_L5_argtuple_error:;
              __Pyx_RaiseArgtupleInvalid("from_struct_array", 1, 1, 1, __pyx_nargs); __PYX_ERR(17, 4916, __pyx_L3_error)
              __pyx_L6_skip:;
              goto __pyx_L4_argument_unpacking_done;
              __pyx_L3_error:;
              for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                Py_XDECREF(values[__pyx_temp]);
              }
              __Pyx_AddTraceback("pyarrow.lib.Table.from_struct_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
              __Pyx_RefNannyFinishContext();
              return NULL;
              __pyx_L4_argument_unpacking_done:;
              __pyx_r = __pyx_pf_7pyarrow_3lib_5Table_28from_struct_array(__pyx_v_struct_array);

              /* function exit code */
              for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                Py_XDECREF(values[__pyx_temp]);
              }
              __Pyx_RefNannyFinishContext();
              return __pyx_r;
            }

            static PyObject *__pyx_pf_7pyarrow_3lib_5Table_28from_struct_array(PyObject *__pyx_v_struct_array) {
              PyObject *__pyx_9genexpr30__pyx_v_chunk = NULL;
              PyObject *__pyx_r = NULL;
              __Pyx_RefNannyDeclarations
              int __pyx_t_1;
              PyObject *__pyx_t_2 = NULL;
              PyObject *__pyx_t_3 = NULL;
              PyObject *__pyx_t_4 = NULL;
              PyObject *__pyx_t_5 = NULL;
              size_t __pyx_t_6;
              PyObject *__pyx_t_7 = NULL;
              Py_ssize_t __pyx_t_8;
              PyObject *(*__pyx_t_9)(PyObject *);
              PyObject *__pyx_t_10 = NULL;
              int __pyx_lineno = 0;
              const char *__pyx_filename = NULL;
              int __pyx_clineno = 0;
              __Pyx_RefNannySetupContext("from_struct_array", 0);

              /* "pyarrow/table.pxi":4943
 *         1    None       4  2022.0
 *         """
 *         if isinstance(struct_array, Array):             # <<<<<<<<<<<<<<
 *             return Table.from_batches([RecordBatch.from_struct_array(struct_array)])
 *         else:
*/
              __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_struct_array, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array); 
              if (__pyx_t_1) {

                /* "pyarrow/table.pxi":4944
 *         """
 *         if isinstance(struct_array, Array):
 *             return Table.from_batches([RecordBatch.from_struct_array(struct_array)])             # <<<<<<<<<<<<<<
 *         else:
 *             return Table.from_batches([
*/
                __Pyx_XDECREF(__pyx_r);
                __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Table);
                __Pyx_INCREF(__pyx_t_3);
                __pyx_t_5 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RecordBatch);
                __Pyx_INCREF(__pyx_t_5);
                __pyx_t_6 = 0;
                {
                  PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_struct_array};
                  __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_from_struct_array, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
                  if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 4944, __pyx_L1_error)
                  __Pyx_GOTREF(__pyx_t_4);
                }
                __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 4944, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_5);
                __Pyx_GIVEREF(__pyx_t_4);
                if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_t_4) != (0)) __PYX_ERR(17, 4944, __pyx_L1_error);
                __pyx_t_4 = 0;
                __pyx_t_6 = 0;
                {
                  PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
                  __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_from_batches, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                  if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 4944, __pyx_L1_error)
                  __Pyx_GOTREF(__pyx_t_2);
                }
                __pyx_r = __pyx_t_2;
                __pyx_t_2 = 0;
                goto __pyx_L0;

                /* "pyarrow/table.pxi":4943
 *         1    None       4  2022.0
 *         """
 *         if isinstance(struct_array, Array):             # <<<<<<<<<<<<<<
 *             return Table.from_batches([RecordBatch.from_struct_array(struct_array)])
 *         else:
*/
              }

              /* "pyarrow/table.pxi":4946
 *             return Table.from_batches([RecordBatch.from_struct_array(struct_array)])
 *         else:
 *             return Table.from_batches([             # <<<<<<<<<<<<<<
 *                 RecordBatch.from_struct_array(chunk)
 *                 for chunk in struct_array.chunks
*/
              /*else*/ {
                __Pyx_XDECREF(__pyx_r);
                __pyx_t_5 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Table);
                __Pyx_INCREF(__pyx_t_5);
                { /* enter inner scope */
                  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 4946, __pyx_L6_error)
                  __Pyx_GOTREF(__pyx_t_3);

                  /* "pyarrow/table.pxi":4948
 *             return Table.from_batches([
 *                 RecordBatch.from_struct_array(chunk)
 *                 for chunk in struct_array.chunks             # <<<<<<<<<<<<<<
 *             ])
 * 
*/
                  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct_array, __pyx_mstate_global->__pyx_n_u_chunks); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 4948, __pyx_L6_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) {
                    __pyx_t_7 = __pyx_t_4; __Pyx_INCREF(__pyx_t_7);
                    __pyx_t_8 = 0;
                    __pyx_t_9 = NULL;
                  } else {
                    __pyx_t_8 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 4948, __pyx_L6_error)
                    __Pyx_GOTREF(__pyx_t_7);
                    __pyx_t_9 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(17, 4948, __pyx_L6_error)
                  }
                  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                  for (;;) {
                    if (likely(!__pyx_t_9)) {
                      if (likely(PyList_CheckExact(__pyx_t_7))) {
                        {
                          Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_7);
                          #if !CYTHON_ASSUME_SAFE_SIZE
                          if (unlikely((__pyx_temp < 0))) __PYX_ERR(17, 4948, __pyx_L6_error)
                          #endif
                          if (__pyx_t_8 >= __pyx_temp) break;
                        }
                        __pyx_t_4 = __Pyx_PyList_GetItemRefFast(__pyx_t_7, __pyx_t_8, __Pyx_ReferenceSharing_OwnStrongReference);
                        ++__pyx_t_8;
                      } else {
                        {
                          Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_7);
                          #if !CYTHON_ASSUME_SAFE_SIZE
                          if (unlikely((__pyx_temp < 0))) __PYX_ERR(17, 4948, __pyx_L6_error)
                          #endif
                          if (__pyx_t_8 >= __pyx_temp) break;
                        }
                        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                        __pyx_t_4 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_8));
                        #else
                        __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_7, __pyx_t_8);
                        #endif
                        ++__pyx_t_8;
                      }
                      if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 4948, __pyx_L6_error)
                    } else {
                      __pyx_t_4 = __pyx_t_9(__pyx_t_7);
                      if (unlikely(!__pyx_t_4)) {
                        PyObject* exc_type = PyErr_Occurred();
                        if (exc_type) {
                          if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(17, 4948, __pyx_L6_error)
                          PyErr_Clear();
                        }
                        break;
                      }
                    }
                    __Pyx_GOTREF(__pyx_t_4);
                    __Pyx_XDECREF_SET(__pyx_9genexpr30__pyx_v_chunk, __pyx_t_4);
                    __pyx_t_4 = 0;

                    /* "pyarrow/table.pxi":4947
 *         else:
 *             return Table.from_batches([
 *                 RecordBatch.from_struct_array(chunk)             # <<<<<<<<<<<<<<
 *                 for chunk in struct_array.chunks
 *             ])
*/
                    __pyx_t_10 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RecordBatch);
                    __Pyx_INCREF(__pyx_t_10);
                    __pyx_t_6 = 0;
                    {
                      PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_9genexpr30__pyx_v_chunk};
                      __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_from_struct_array, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                      if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 4947, __pyx_L6_error)
                      __Pyx_GOTREF(__pyx_t_4);
                    }
                    if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_4))) __PYX_ERR(17, 4946, __pyx_L6_error)
                    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

                    /* "pyarrow/table.pxi":4948
 *             return Table.from_batches([
 *                 RecordBatch.from_struct_array(chunk)
 *                 for chunk in struct_array.chunks             # <<<<<<<<<<<<<<
 *             ])
 * 
*/
                  }
                  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
                  __Pyx_XDECREF(__pyx_9genexpr30__pyx_v_chunk); __pyx_9genexpr30__pyx_v_chunk = 0;
                  goto __pyx_L10_exit_scope;
                  __pyx_L6_error:;
                  __Pyx_XDECREF(__pyx_9genexpr30__pyx_v_chunk); __pyx_9genexpr30__pyx_v_chunk = 0;
                  goto __pyx_L1_error;
                  __pyx_L10_exit_scope:;
                } /* exit inner scope */
                __pyx_t_6 = 0;
                {
                  PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_3};
                  __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_from_batches, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
                  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                  if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 4946, __pyx_L1_error)
                  __Pyx_GOTREF(__pyx_t_2);
                }
                __pyx_r = __pyx_t_2;
                __pyx_t_2 = 0;
                goto __pyx_L0;
              }

              /* "pyarrow/table.pxi":4916
 *         return result
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_struct_array(struct_array):
 *         """
*/

              /* function exit code */
              __pyx_L1_error:;
              __Pyx_XDECREF(__pyx_t_2);
              __Pyx_XDECREF(__pyx_t_3);
              __Pyx_XDECREF(__pyx_t_4);
              __Pyx_XDECREF(__pyx_t_5);
              __Pyx_XDECREF(__pyx_t_7);
              __Pyx_XDECREF(__pyx_t_10);
              __Pyx_AddTraceback("pyarrow.lib.Table.from_struct_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
              __pyx_r = NULL;
              __pyx_L0:;
              __Pyx_XDECREF(__pyx_9genexpr30__pyx_v_chunk);
              __Pyx_XGIVEREF(__pyx_r);
              __Pyx_RefNannyFinishContext();
              return __pyx_r;
            }

            /* "pyarrow/table.pxi":4951
 *             ])
 * 
 *     def to_struct_array(self, max_chunksize=None):             # <<<<<<<<<<<<<<
 *         """
 *         Convert to a chunked array of struct type.
*/

            /* Python wrapper */
            static PyObject *__pyx_pw_7pyarrow_3lib_5Table_31to_struct_array(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
            PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_5Table_30to_struct_array, "Table.to_struct_array(self, max_chunksize=None)\n\nConvert to a chunked array of struct type.\n\nParameters\n----------\nmax_chunksize : int, default None\n    Maximum number of rows for ChunkedArray chunks. Individual chunks\n    may be smaller depending on the chunk layout of individual columns.\n\nReturns\n-------\nChunkedArray");
            static PyMethodDef __pyx_mdef_7pyarrow_3lib_5Table_31to_struct_array = {"to_struct_array", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Table_31to_struct_array, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Table_30to_struct_array};
            static PyObject *__pyx_pw_7pyarrow_3lib_5Table_31to_struct_array(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
              PyObject *__pyx_v_max_chunksize = 0;
              #if !CYTHON_METH_FASTCALL
              CYTHON_UNUSED Py_ssize_t __pyx_nargs;
              #endif
              CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
              PyObject* values[1] = {0};
              int __pyx_lineno = 0;
              const char *__pyx_filename = NULL;
              int __pyx_clineno = 0;
              PyObject *__pyx_r = 0;
              __Pyx_RefNannyDeclarations
              __Pyx_RefNannySetupContext("to_struct_array (wrapper)", 0);
              #if !CYTHON_METH_FASTCALL
              #if CYTHON_ASSUME_SAFE_SIZE
              __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
              #else
              __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
              #endif
              #endif
              __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
              {
                PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_max_chunksize,0};
                const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(17, 4951, __pyx_L3_error)
                if (__pyx_kwds_len > 0) {
                  switch (__pyx_nargs) {
                    case  1:
                    values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                    if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 4951, __pyx_L3_error)
                    CYTHON_FALLTHROUGH;
                    case  0: break;
                    default: goto __pyx_L5_argtuple_error;
                  }
                  const Py_ssize_t kwd_pos_args = __pyx_nargs;
                  if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "to_struct_array", 0) < (0)) __PYX_ERR(17, 4951, __pyx_L3_error)
                  if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
                } else {
                  switch (__pyx_nargs) {
                    case  1:
                    values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                    if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 4951, __pyx_L3_error)
                    CYTHON_FALLTHROUGH;
                    case  0: break;
                    default: goto __pyx_L5_argtuple_error;
                  }
                  if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
                }
                __pyx_v_max_chunksize = values[0];
              }
              goto __pyx_L6_skip;
              __pyx_L5_argtuple_error:;
              __Pyx_RaiseArgtupleInvalid("to_struct_array", 0, 0, 1, __pyx_nargs); __PYX_ERR(17, 4951, __pyx_L3_error)
              __pyx_L6_skip:;
              goto __pyx_L4_argument_unpacking_done;
              __pyx_L3_error:;
              for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                Py_XDECREF(values[__pyx_temp]);
              }
              __Pyx_AddTraceback("pyarrow.lib.Table.to_struct_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
              __Pyx_RefNannyFinishContext();
              return NULL;
              __pyx_L4_argument_unpacking_done:;
              __pyx_r = __pyx_pf_7pyarrow_3lib_5Table_30to_struct_array(((struct __pyx_obj_7pyarrow_3lib_Table *)__pyx_v_self), __pyx_v_max_chunksize);

              /* function exit code */
              for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                Py_XDECREF(values[__pyx_temp]);
              }
              __Pyx_RefNannyFinishContext();
              return __pyx_r;
            }

            static PyObject *__pyx_pf_7pyarrow_3lib_5Table_30to_struct_array(struct __pyx_obj_7pyarrow_3lib_Table *__pyx_v_self, PyObject *__pyx_v_max_chunksize) {
              PyObject *__pyx_v_chunks = NULL;
              PyObject *__pyx_9genexpr31__pyx_v_batch = NULL;
              PyObject *__pyx_r = NULL;
              __Pyx_RefNannyDeclarations
              PyObject *__pyx_t_1 = NULL;
              PyObject *__pyx_t_2 = NULL;
              PyObject *__pyx_t_3 = NULL;
              size_t __pyx_t_4;
              PyObject *__pyx_t_5 = NULL;
              Py_ssize_t __pyx_t_6;
              PyObject *(*__pyx_t_7)(PyObject *);
              PyObject *__pyx_t_8 = NULL;
              PyObject *__pyx_t_9 = NULL;
              PyObject *__pyx_t_10 = NULL;
              int __pyx_lineno = 0;
              const char *__pyx_filename = NULL;
              int __pyx_clineno = 0;
              __Pyx_RefNannySetupContext("to_struct_array", 0);

              /* "pyarrow/table.pxi":4965
 *         ChunkedArray
 *         """
 *         self._assert_cpu()             # <<<<<<<<<<<<<<
 *         chunks = [
 *             batch.to_struct_array()
*/
              if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_assert_cpu");
                __PYX_ERR(17, 4965, __pyx_L1_error)
              }
              ((struct __pyx_vtabstruct_7pyarrow_3lib_Table *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._assert_cpu(((struct __pyx_obj_7pyarrow_3lib__Tabular *)__pyx_v_self)); if (unlikely(PyErr_Occurred())) __PYX_ERR(17, 4965, __pyx_L1_error)

              /* "pyarrow/table.pxi":4966
 *         """
 *         self._assert_cpu()
 *         chunks = [             # <<<<<<<<<<<<<<
 *             batch.to_struct_array()
 *             for batch in self.to_batches(max_chunksize=max_chunksize)
*/
              { /* enter inner scope */
                __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 4966, __pyx_L5_error)
                __Pyx_GOTREF(__pyx_t_1);

                /* "pyarrow/table.pxi":4968
 *         chunks = [
 *             batch.to_struct_array()
 *             for batch in self.to_batches(max_chunksize=max_chunksize)             # <<<<<<<<<<<<<<
 *         ]
 *         return chunked_array(chunks, type=struct(self.schema))
*/
                __pyx_t_3 = ((PyObject *)__pyx_v_self);
                __Pyx_INCREF(__pyx_t_3);
                __pyx_t_4 = 0;
                {
                  PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_3, NULL};
                  __pyx_t_5 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 4968, __pyx_L5_error)
                  __Pyx_GOTREF(__pyx_t_5);
                  if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_max_chunksize, __pyx_v_max_chunksize, __pyx_t_5, __pyx_callargs+1, 0) < (0)) __PYX_ERR(17, 4968, __pyx_L5_error)
                  __pyx_t_2 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_to_batches, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_5);
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                  if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 4968, __pyx_L5_error)
                  __Pyx_GOTREF(__pyx_t_2);
                }
                if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
                  __pyx_t_5 = __pyx_t_2; __Pyx_INCREF(__pyx_t_5);
                  __pyx_t_6 = 0;
                  __pyx_t_7 = NULL;
                } else {
                  __pyx_t_6 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 4968, __pyx_L5_error)
                  __Pyx_GOTREF(__pyx_t_5);
                  __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 4968, __pyx_L5_error)
                }
                __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                for (;;) {
                  if (likely(!__pyx_t_7)) {
                    if (likely(PyList_CheckExact(__pyx_t_5))) {
                      {
                        Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_5);
                        #if !CYTHON_ASSUME_SAFE_SIZE
                        if (unlikely((__pyx_temp < 0))) __PYX_ERR(17, 4968, __pyx_L5_error)
                        #endif
                        if (__pyx_t_6 >= __pyx_temp) break;
                      }
                      __pyx_t_2 = __Pyx_PyList_GetItemRefFast(__pyx_t_5, __pyx_t_6, __Pyx_ReferenceSharing_OwnStrongReference);
                      ++__pyx_t_6;
                    } else {
                      {
                        Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_5);
                        #if !CYTHON_ASSUME_SAFE_SIZE
                        if (unlikely((__pyx_temp < 0))) __PYX_ERR(17, 4968, __pyx_L5_error)
                        #endif
                        if (__pyx_t_6 >= __pyx_temp) break;
                      }
                      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                      __pyx_t_2 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_6));
                      #else
                      __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_5, __pyx_t_6);
                      #endif
                      ++__pyx_t_6;
                    }
                    if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 4968, __pyx_L5_error)
                  } else {
                    __pyx_t_2 = __pyx_t_7(__pyx_t_5);
                    if (unlikely(!__pyx_t_2)) {
                      PyObject* exc_type = PyErr_Occurred();
                      if (exc_type) {
                        if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(17, 4968, __pyx_L5_error)
                        PyErr_Clear();
                      }
                      break;
                    }
                  }
                  __Pyx_GOTREF(__pyx_t_2);
                  __Pyx_XDECREF_SET(__pyx_9genexpr31__pyx_v_batch, __pyx_t_2);
                  __pyx_t_2 = 0;

                  /* "pyarrow/table.pxi":4967
 *         self._assert_cpu()
 *         chunks = [
 *             batch.to_struct_array()             # <<<<<<<<<<<<<<
 *             for batch in self.to_batches(max_chunksize=max_chunksize)
 *         ]
*/
                  __pyx_t_3 = __pyx_9genexpr31__pyx_v_batch;
                  __Pyx_INCREF(__pyx_t_3);
                  __pyx_t_4 = 0;
                  {
                    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
                    __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_to_struct_array, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                    if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 4967, __pyx_L5_error)
                    __Pyx_GOTREF(__pyx_t_2);
                  }
                  if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) __PYX_ERR(17, 4966, __pyx_L5_error)
                  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

                  /* "pyarrow/table.pxi":4968
 *         chunks = [
 *             batch.to_struct_array()
 *             for batch in self.to_batches(max_chunksize=max_chunksize)             # <<<<<<<<<<<<<<
 *         ]
 *         return chunked_array(chunks, type=struct(self.schema))
*/
                }
                __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                __Pyx_XDECREF(__pyx_9genexpr31__pyx_v_batch); __pyx_9genexpr31__pyx_v_batch = 0;
                goto __pyx_L9_exit_scope;
                __pyx_L5_error:;
                __Pyx_XDECREF(__pyx_9genexpr31__pyx_v_batch); __pyx_9genexpr31__pyx_v_batch = 0;
                goto __pyx_L1_error;
                __pyx_L9_exit_scope:;
              } /* exit inner scope */
              __pyx_v_chunks = ((PyObject*)__pyx_t_1);
              __pyx_t_1 = 0;

              /* "pyarrow/table.pxi":4970
 *             for batch in self.to_batches(max_chunksize=max_chunksize)
 *         ]
 *         return chunked_array(chunks, type=struct(self.schema))             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
*/
              __Pyx_XDECREF(__pyx_r);
              __pyx_t_5 = NULL;
              __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_chunked_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 4970, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_2);
              __pyx_t_8 = NULL;
              __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_struct); if (unlikely(!__pyx_t_9)) __PYX_ERR(17, 4970, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_9);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_schema); if (unlikely(!__pyx_t_10)) __PYX_ERR(17, 4970, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_4 = 1;
              #if CYTHON_UNPACK_METHODS
              if (unlikely(PyMethod_Check(__pyx_t_9))) {
                __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_9);
                assert(__pyx_t_8);
                PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_9);
                __Pyx_INCREF(__pyx_t_8);
                __Pyx_INCREF(__pyx__function);
                __Pyx_DECREF_SET(__pyx_t_9, __pyx__function);
                __pyx_t_4 = 0;
              }
              #endif
              {
                PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_10};
                __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
                if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 4970, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_3);
              }
              __pyx_t_4 = 1;
              #if CYTHON_UNPACK_METHODS
              if (unlikely(PyMethod_Check(__pyx_t_2))) {
                __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
                assert(__pyx_t_5);
                PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
                __Pyx_INCREF(__pyx_t_5);
                __Pyx_INCREF(__pyx__function);
                __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
                __pyx_t_4 = 0;
              }
              #endif
              {
                PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_5, __pyx_v_chunks};
                __pyx_t_9 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(17, 4970, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_9);
                if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_type, __pyx_t_3, __pyx_t_9, __pyx_callargs+2, 0) < (0)) __PYX_ERR(17, 4970, __pyx_L1_error)
                __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_9);
                __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
                __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 4970, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_1);
              }
              __pyx_r = __pyx_t_1;
              __pyx_t_1 = 0;
              goto __pyx_L0;

              /* "pyarrow/table.pxi":4951
 *             ])
 * 
 *     def to_struct_array(self, max_chunksize=None):             # <<<<<<<<<<<<<<
 *         """
 *         Convert to a chunked array of struct type.
*/

              /* function exit code */
              __pyx_L1_error:;
              __Pyx_XDECREF(__pyx_t_1);
              __Pyx_XDECREF(__pyx_t_2);
              __Pyx_XDECREF(__pyx_t_3);
              __Pyx_XDECREF(__pyx_t_5);
              __Pyx_XDECREF(__pyx_t_8);
              __Pyx_XDECREF(__pyx_t_9);
              __Pyx_XDECREF(__pyx_t_10);
              __Pyx_AddTraceback("pyarrow.lib.Table.to_struct_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
              __pyx_r = NULL;
              __pyx_L0:;
              __Pyx_XDECREF(__pyx_v_chunks);
              __Pyx_XDECREF(__pyx_9genexpr31__pyx_v_batch);
              __Pyx_XGIVEREF(__pyx_r);
              __Pyx_RefNannyFinishContext();
              return __pyx_r;
            }

            /* "pyarrow/table.pxi":4972
 *         return chunked_array(chunks, type=struct(self.schema))
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_batches(batches, Schema schema=None):
 *         """
*/

            /* Python wrapper */
            static PyObject *__pyx_pw_7pyarrow_3lib_5Table_33from_batches(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
            PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_5Table_32from_batches, "Table.from_batches(batches, Schema schema=None)\n\nConstruct a Table from a sequence or iterator of Arrow RecordBatches.\n\nParameters\n----------\nbatches : sequence or iterator of RecordBatch\n    Sequence of RecordBatch to be converted, all schemas must be equal.\nschema : Schema, default None\n    If not passed, will be inferred from the first RecordBatch.\n\nReturns\n-------\nTable\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> n_legs = pa.array([2, 4, 5, 100])\n>>> animals = pa.array([\"Flamingo\", \"Horse\", \"Brittle stars\", \"Centipede\"])\n>>> names = [\"n_legs\", \"animals\"]\n>>> batch = pa.record_batch([n_legs, animals], names=names)\n>>> batch.to_pandas()\n   n_legs        animals\n0       2       Flamingo\n1       4          Horse\n2       5  Brittle stars\n3     100      Centipede\n\nConstruct a Table from a RecordBatch:\n\n>>> pa.Table.from_batches([batch])\npyarrow.Table\nn_legs: int64\nanimals: string\n----\nn_legs: [[2,4,5,100]]\nanimals: [[\"Flamingo\",\"Horse\",\"Brittle stars\",\"Centipede\"]]\n\nConstruct a Table from a sequence of RecordBatches:\n\n>>> pa.Table.from_batches([batch, batch])\npyarrow.Table\nn_legs: int64\nanimals: string\n----\nn_legs: [[2,4,5,100],[2,4,5,100]]\nanimals: [[\"Flamingo\",\"Horse\",\"Brittle stars\",\"Centipede\"],[\"Flamingo\",\"Horse\",\"Brittle stars\",\"Centipede\"]]");
            static PyMethodDef __pyx_mdef_7pyarrow_3lib_5Table_33from_batches = {"from_batches", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Table_33from_batches, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Table_32from_batches};
            static PyObject *__pyx_pw_7pyarrow_3lib_5Table_33from_batches(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
              PyObject *__pyx_v_batches = 0;
              struct __pyx_obj_7pyarrow_3lib_Schema *__pyx_v_schema = 0;
              #if !CYTHON_METH_FASTCALL
              CYTHON_UNUSED Py_ssize_t __pyx_nargs;
              #endif
              CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
              PyObject* values[2] = {0,0};
              int __pyx_lineno = 0;
              const char *__pyx_filename = NULL;
              int __pyx_clineno = 0;
              PyObject *__pyx_r = 0;
              __Pyx_RefNannyDeclarations
              __Pyx_RefNannySetupContext("from_batches (wrapper)", 0);
              #if !CYTHON_METH_FASTCALL
              #if CYTHON_ASSUME_SAFE_SIZE
              __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
              #else
              __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
              #endif
              #endif
              __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
              {
                PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_batches,&__pyx_mstate_global->__pyx_n_u_schema,0};
                const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(17, 4972, __pyx_L3_error)
                if (__pyx_kwds_len > 0) {
                  switch (__pyx_nargs) {
                    case  2:
                    values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                    if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(17, 4972, __pyx_L3_error)
                    CYTHON_FALLTHROUGH;
                    case  1:
                    values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                    if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 4972, __pyx_L3_error)
                    CYTHON_FALLTHROUGH;
                    case  0: break;
                    default: goto __pyx_L5_argtuple_error;
                  }
                  const Py_ssize_t kwd_pos_args = __pyx_nargs;
                  if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "from_batches", 0) < (0)) __PYX_ERR(17, 4972, __pyx_L3_error)

                  /* "pyarrow/table.pxi":4973
 * 
 *     @staticmethod
 *     def from_batches(batches, Schema schema=None):             # <<<<<<<<<<<<<<
 *         """
 *         Construct a Table from a sequence or iterator of Arrow RecordBatches.
*/
                  if (!values[1]) values[1] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_7pyarrow_3lib_Schema *)Py_None));
                  for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                    if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("from_batches", 0, 1, 2, i); __PYX_ERR(17, 4972, __pyx_L3_error) }
                  }
                } else {
                  switch (__pyx_nargs) {
                    case  2:
                    values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                    if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(17, 4972, __pyx_L3_error)
                    CYTHON_FALLTHROUGH;
                    case  1:
                    values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                    if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 4972, __pyx_L3_error)
                    break;
                    default: goto __pyx_L5_argtuple_error;
                  }
                  if (!values[1]) values[1] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_7pyarrow_3lib_Schema *)Py_None));
                }
                __pyx_v_batches = values[0];
                __pyx_v_schema = ((struct __pyx_obj_7pyarrow_3lib_Schema *)values[1]);
              }
              goto __pyx_L6_skip;
              __pyx_L5_argtuple_error:;
              __Pyx_RaiseArgtupleInvalid("from_batches", 0, 1, 2, __pyx_nargs); __PYX_ERR(17, 4972, __pyx_L3_error)
              __pyx_L6_skip:;
              goto __pyx_L4_argument_unpacking_done;
              __pyx_L3_error:;
              for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                Py_XDECREF(values[__pyx_temp]);
              }
              __Pyx_AddTraceback("pyarrow.lib.Table.from_batches", __pyx_clineno, __pyx_lineno, __pyx_filename);
              __Pyx_RefNannyFinishContext();
              return NULL;
              __pyx_L4_argument_unpacking_done:;
              if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_schema), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Schema, 1, "schema", 0))) __PYX_ERR(17, 4973, __pyx_L1_error)
              __pyx_r = __pyx_pf_7pyarrow_3lib_5Table_32from_batches(__pyx_v_batches, __pyx_v_schema);

              /* "pyarrow/table.pxi":4972
 *         return chunked_array(chunks, type=struct(self.schema))
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_batches(batches, Schema schema=None):
 *         """
*/

              /* function exit code */
              goto __pyx_L0;
              __pyx_L1_error:;
              __pyx_r = NULL;
              for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                Py_XDECREF(values[__pyx_temp]);
              }
              goto __pyx_L7_cleaned_up;
              __pyx_L0:;
              for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                Py_XDECREF(values[__pyx_temp]);
              }
              __pyx_L7_cleaned_up:;
              __Pyx_RefNannyFinishContext();
              return __pyx_r;
            }

            static PyObject *__pyx_pf_7pyarrow_3lib_5Table_32from_batches(PyObject *__pyx_v_batches, struct __pyx_obj_7pyarrow_3lib_Schema *__pyx_v_schema) {
              std::vector<std::shared_ptr< arrow::RecordBatch> >  __pyx_v_c_batches;
              std::shared_ptr< arrow::Table>  __pyx_v_c_table;
              std::shared_ptr< arrow::Schema>  __pyx_v_c_schema;
              struct __pyx_obj_7pyarrow_3lib_RecordBatch *__pyx_v_batch = 0;
              PyObject *__pyx_r = NULL;
              __Pyx_RefNannyDeclarations
              PyObject *__pyx_t_1 = NULL;
              Py_ssize_t __pyx_t_2;
              PyObject *(*__pyx_t_3)(PyObject *);
              PyObject *__pyx_t_4 = NULL;
              int __pyx_t_5;
              size_t __pyx_t_6;
              std::shared_ptr< arrow::Schema>  __pyx_t_7;
              std::shared_ptr< arrow::Table>  __pyx_t_8;
              int __pyx_lineno = 0;
              const char *__pyx_filename = NULL;
              int __pyx_clineno = 0;
              __Pyx_RefNannySetupContext("from_batches", 0);

              /* "pyarrow/table.pxi":5028
 *             RecordBatch batch
 * 
 *         for batch in batches:             # <<<<<<<<<<<<<<
 *             c_batches.push_back(batch.sp_batch)
 * 
*/
              if (likely(PyList_CheckExact(__pyx_v_batches)) || PyTuple_CheckExact(__pyx_v_batches)) {
                __pyx_t_1 = __pyx_v_batches; __Pyx_INCREF(__pyx_t_1);
                __pyx_t_2 = 0;
                __pyx_t_3 = NULL;
              } else {
                __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_batches); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 5028, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_1);
                __pyx_t_3 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 5028, __pyx_L1_error)
              }
              for (;;) {
                if (likely(!__pyx_t_3)) {
                  if (likely(PyList_CheckExact(__pyx_t_1))) {
                    {
                      Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
                      #if !CYTHON_ASSUME_SAFE_SIZE
                      if (unlikely((__pyx_temp < 0))) __PYX_ERR(17, 5028, __pyx_L1_error)
                      #endif
                      if (__pyx_t_2 >= __pyx_temp) break;
                    }
                    __pyx_t_4 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_2, __Pyx_ReferenceSharing_OwnStrongReference);
                    ++__pyx_t_2;
                  } else {
                    {
                      Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
                      #if !CYTHON_ASSUME_SAFE_SIZE
                      if (unlikely((__pyx_temp < 0))) __PYX_ERR(17, 5028, __pyx_L1_error)
                      #endif
                      if (__pyx_t_2 >= __pyx_temp) break;
                    }
                    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                    __pyx_t_4 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2));
                    #else
                    __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2);
                    #endif
                    ++__pyx_t_2;
                  }
                  if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 5028, __pyx_L1_error)
                } else {
                  __pyx_t_4 = __pyx_t_3(__pyx_t_1);
                  if (unlikely(!__pyx_t_4)) {
                    PyObject* exc_type = PyErr_Occurred();
                    if (exc_type) {
                      if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(17, 5028, __pyx_L1_error)
                      PyErr_Clear();
                    }
                    break;
                  }
                }
                __Pyx_GOTREF(__pyx_t_4);
                if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RecordBatch))))) __PYX_ERR(17, 5028, __pyx_L1_error)
                __Pyx_XDECREF_SET(__pyx_v_batch, ((struct __pyx_obj_7pyarrow_3lib_RecordBatch *)__pyx_t_4));
                __pyx_t_4 = 0;

                /* "pyarrow/table.pxi":5029
 * 
 *         for batch in batches:
 *             c_batches.push_back(batch.sp_batch)             # <<<<<<<<<<<<<<
 * 
 *         if schema is None:
*/
                if (unlikely(((PyObject *)__pyx_v_batch) == Py_None)) {
                  PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_batch");
                  __PYX_ERR(17, 5029, __pyx_L1_error)
                }
                try {
                  __pyx_v_c_batches.push_back(__pyx_v_batch->sp_batch);
                } catch(...) {
                  __Pyx_CppExn2PyErr();
                  __PYX_ERR(17, 5029, __pyx_L1_error)
                }

                /* "pyarrow/table.pxi":5028
 *             RecordBatch batch
 * 
 *         for batch in batches:             # <<<<<<<<<<<<<<
 *             c_batches.push_back(batch.sp_batch)
 * 
*/
              }
              __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

              /* "pyarrow/table.pxi":5031
 *             c_batches.push_back(batch.sp_batch)
 * 
 *         if schema is None:             # <<<<<<<<<<<<<<
 *             if c_batches.size() == 0:
 *                 raise ValueError('Must pass schema, or at least '
*/
              __pyx_t_5 = (((PyObject *)__pyx_v_schema) == Py_None);
              if (__pyx_t_5) {

                /* "pyarrow/table.pxi":5032
 * 
 *         if schema is None:
 *             if c_batches.size() == 0:             # <<<<<<<<<<<<<<
 *                 raise ValueError('Must pass schema, or at least '
 *                                  'one RecordBatch')
*/
                __pyx_t_5 = (__pyx_v_c_batches.size() == 0);
                if (unlikely(__pyx_t_5)) {

                  /* "pyarrow/table.pxi":5033
 *         if schema is None:
 *             if c_batches.size() == 0:
 *                 raise ValueError('Must pass schema, or at least '             # <<<<<<<<<<<<<<
 *                                  'one RecordBatch')
 *             c_schema = c_batches[0].get().schema()
*/
                  __pyx_t_4 = NULL;
                  __pyx_t_6 = 1;
                  {
                    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Must_pass_schema_or_at_least_one};
                    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                    if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 5033, __pyx_L1_error)
                    __Pyx_GOTREF(__pyx_t_1);
                  }
                  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
                  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                  __PYX_ERR(17, 5033, __pyx_L1_error)

                  /* "pyarrow/table.pxi":5032
 * 
 *         if schema is None:
 *             if c_batches.size() == 0:             # <<<<<<<<<<<<<<
 *                 raise ValueError('Must pass schema, or at least '
 *                                  'one RecordBatch')
*/
                }

                /* "pyarrow/table.pxi":5035
 *                 raise ValueError('Must pass schema, or at least '
 *                                  'one RecordBatch')
 *             c_schema = c_batches[0].get().schema()             # <<<<<<<<<<<<<<
 *         else:
 *             c_schema = schema.sp_schema
*/
                __pyx_v_c_schema = (__pyx_v_c_batches[0]).get()->schema();

                /* "pyarrow/table.pxi":5031
 *             c_batches.push_back(batch.sp_batch)
 * 
 *         if schema is None:             # <<<<<<<<<<<<<<
 *             if c_batches.size() == 0:
 *                 raise ValueError('Must pass schema, or at least '
*/
                goto __pyx_L6;
              }

              /* "pyarrow/table.pxi":5037
 *             c_schema = c_batches[0].get().schema()
 *         else:
 *             c_schema = schema.sp_schema             # <<<<<<<<<<<<<<
 * 
 *         with nogil:
*/
              /*else*/ {
                if (unlikely(((PyObject *)__pyx_v_schema) == Py_None)) {
                  PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_schema");
                  __PYX_ERR(17, 5037, __pyx_L1_error)
                }
                __pyx_t_7 = __pyx_v_schema->sp_schema;
                __pyx_v_c_schema = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_7);
              }
              __pyx_L6:;

              /* "pyarrow/table.pxi":5039
 *             c_schema = schema.sp_schema
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             c_table = GetResultValue(
 *                 CTable.FromRecordBatches(c_schema, move(c_batches)))
*/
              {
                  PyThreadState * _save;
                  _save = PyEval_SaveThread();
                  __Pyx_FastGIL_Remember();
                  /*try:*/ {

                    /* "pyarrow/table.pxi":5040
 * 
 *         with nogil:
 *             c_table = GetResultValue(             # <<<<<<<<<<<<<<
 *                 CTable.FromRecordBatches(c_schema, move(c_batches)))
 * 
*/
                    __pyx_t_8 = arrow::py::GetResultValue<std::shared_ptr< arrow::Table> >( arrow::Table::FromRecordBatches(__pyx_v_c_schema, cython_std::move<std::vector<std::shared_ptr< arrow::RecordBatch> > >(__pyx_v_c_batches))); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(17, 5040, __pyx_L9_error)
                    __pyx_v_c_table = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_8);
                  }

                  /* "pyarrow/table.pxi":5039
 *             c_schema = schema.sp_schema
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             c_table = GetResultValue(
 *                 CTable.FromRecordBatches(c_schema, move(c_batches)))
*/
                  /*finally:*/ {
                    /*normal exit:*/{
                      __Pyx_FastGIL_Forget();
                      PyEval_RestoreThread(_save);
                      goto __pyx_L10;
                    }
                    __pyx_L9_error: {
                      __Pyx_FastGIL_Forget();
                      PyEval_RestoreThread(_save);
                      goto __pyx_L1_error;
                    }
                    __pyx_L10:;
                  }
              }

              /* "pyarrow/table.pxi":5043
 *                 CTable.FromRecordBatches(c_schema, move(c_batches)))
 * 
 *         return pyarrow_wrap_table(c_table)             # <<<<<<<<<<<<<<
 * 
 *     def to_batches(self, max_chunksize=None):
*/
              __Pyx_XDECREF(__pyx_r);
              __pyx_t_1 = pyarrow_wrap_table(__pyx_v_c_table); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 5043, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_1);
              __pyx_r = __pyx_t_1;
              __pyx_t_1 = 0;
              goto __pyx_L0;

              /* "pyarrow/table.pxi":4972
 *         return chunked_array(chunks, type=struct(self.schema))
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_batches(batches, Schema schema=None):
 *         """
*/

              /* function exit code */
              __pyx_L1_error:;
              __Pyx_XDECREF(__pyx_t_1);
              __Pyx_XDECREF(__pyx_t_4);
              __Pyx_AddTraceback("pyarrow.lib.Table.from_batches", __pyx_clineno, __pyx_lineno, __pyx_filename);
              __pyx_r = NULL;
              __pyx_L0:;
              __Pyx_XDECREF((PyObject *)__pyx_v_batch);
              __Pyx_XGIVEREF(__pyx_r);
              __Pyx_RefNannyFinishContext();
              return __pyx_r;
            }

            /* "pyarrow/table.pxi":5045
 *         return pyarrow_wrap_table(c_table)
 * 
 *     def to_batches(self, max_chunksize=None):             # <<<<<<<<<<<<<<
 *         """
 *         Convert Table to a list of RecordBatch objects.
*/

            /* Python wrapper */
            static PyObject *__pyx_pw_7pyarrow_3lib_5Table_35to_batches(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
            PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_5Table_34to_batches, "Table.to_batches(self, max_chunksize=None)\n\nConvert Table to a list of RecordBatch objects.\n\nNote that this method is zero-copy, it merely exposes the same data\nunder a different API.\n\nParameters\n----------\nmax_chunksize : int, default None\n    Maximum number of rows for each RecordBatch chunk. Individual chunks\n    may be smaller depending on the chunk layout of individual columns.\n\nReturns\n-------\nlist[RecordBatch]\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> import pandas as pd\n>>> df = pd.DataFrame({'n_legs': [2, 4, 5, 100],\n...                    'animals': [\"Flamingo\", \"Horse\", \"Brittle stars\", \"Centipede\"]})\n>>> table = pa.Table.from_pandas(df)\n\nConvert a Table to a RecordBatch:\n\n>>> table.to_batches()[0].to_pandas()\n   n_legs        animals\n0       2       Flamingo\n1       4          Horse\n2       5  Brittle stars\n3     100      Centipede\n\nConvert a Table to a list of RecordBatches:\n\n>>> table.to_batches(max_chunksize=2)[0].to_pandas()\n   n_legs   animals\n0       2  Flamingo\n1       4     Horse\n>>> table.to_batches(max_chunksize=2)[1].to_pandas()\n   n_legs        animals\n0       5  Brittle stars\n1     100      Centipede");
            static PyMethodDef __pyx_mdef_7pyarrow_3lib_5Table_35to_batches = {"to_batches", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Table_35to_batches, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Table_34to_batches};
            static PyObject *__pyx_pw_7pyarrow_3lib_5Table_35to_batches(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
              PyObject *__pyx_v_max_chunksize = 0;
              #if !CYTHON_METH_FASTCALL
              CYTHON_UNUSED Py_ssize_t __pyx_nargs;
              #endif
              CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
              PyObject* values[1] = {0};
              int __pyx_lineno = 0;
              const char *__pyx_filename = NULL;
              int __pyx_clineno = 0;
              PyObject *__pyx_r = 0;
              __Pyx_RefNannyDeclarations
              __Pyx_RefNannySetupContext("to_batches (wrapper)", 0);
              #if !CYTHON_METH_FASTCALL
              #if CYTHON_ASSUME_SAFE_SIZE
              __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
              #else
              __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
              #endif
              #endif
              __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
              {
                PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_max_chunksize,0};
                const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(17, 5045, __pyx_L3_error)
                if (__pyx_kwds_len > 0) {
                  switch (__pyx_nargs) {
                    case  1:
                    values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                    if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 5045, __pyx_L3_error)
                    CYTHON_FALLTHROUGH;
                    case  0: break;
                    default: goto __pyx_L5_argtuple_error;
                  }
                  const Py_ssize_t kwd_pos_args = __pyx_nargs;
                  if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "to_batches", 0) < (0)) __PYX_ERR(17, 5045, __pyx_L3_error)
                  if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
                } else {
                  switch (__pyx_nargs) {
                    case  1:
                    values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                    if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 5045, __pyx_L3_error)
                    CYTHON_FALLTHROUGH;
                    case  0: break;
                    default: goto __pyx_L5_argtuple_error;
                  }
                  if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
                }
                __pyx_v_max_chunksize = values[0];
              }
              goto __pyx_L6_skip;
              __pyx_L5_argtuple_error:;
              __Pyx_RaiseArgtupleInvalid("to_batches", 0, 0, 1, __pyx_nargs); __PYX_ERR(17, 5045, __pyx_L3_error)
              __pyx_L6_skip:;
              goto __pyx_L4_argument_unpacking_done;
              __pyx_L3_error:;
              for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                Py_XDECREF(values[__pyx_temp]);
              }
              __Pyx_AddTraceback("pyarrow.lib.Table.to_batches", __pyx_clineno, __pyx_lineno, __pyx_filename);
              __Pyx_RefNannyFinishContext();
              return NULL;
              __pyx_L4_argument_unpacking_done:;
              __pyx_r = __pyx_pf_7pyarrow_3lib_5Table_34to_batches(((struct __pyx_obj_7pyarrow_3lib_Table *)__pyx_v_self), __pyx_v_max_chunksize);

              /* function exit code */
              for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                Py_XDECREF(values[__pyx_temp]);
              }
              __Pyx_RefNannyFinishContext();
              return __pyx_r;
            }

            static PyObject *__pyx_pf_7pyarrow_3lib_5Table_34to_batches(struct __pyx_obj_7pyarrow_3lib_Table *__pyx_v_self, PyObject *__pyx_v_max_chunksize) {
              std::unique_ptr<arrow::TableBatchReader>  __pyx_v_reader;
              int64_t __pyx_v_c_max_chunksize;
              PyObject *__pyx_v_result = 0;
              std::shared_ptr< arrow::RecordBatch>  __pyx_v_batch;
              PyObject *__pyx_r = NULL;
              __Pyx_RefNannyDeclarations
              PyObject *__pyx_t_1 = NULL;
              int __pyx_t_2;
              int __pyx_t_3;
              PyObject *__pyx_t_4 = NULL;
              size_t __pyx_t_5;
              int64_t __pyx_t_6;
              int __pyx_t_7;
              int __pyx_t_8;
              int __pyx_lineno = 0;
              const char *__pyx_filename = NULL;
              int __pyx_clineno = 0;
              __Pyx_RefNannySetupContext("to_batches", 0);

              /* "pyarrow/table.pxi":5093
 *             unique_ptr[TableBatchReader] reader
 *             int64_t c_max_chunksize
 *             list result = []             # <<<<<<<<<<<<<<
 *             shared_ptr[CRecordBatch] batch
 * 
*/
              __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 5093, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_1);
              __pyx_v_result = ((PyObject*)__pyx_t_1);
              __pyx_t_1 = 0;

              /* "pyarrow/table.pxi":5096
 *             shared_ptr[CRecordBatch] batch
 * 
 *         reader.reset(new TableBatchReader(deref(self.table)))             # <<<<<<<<<<<<<<
 * 
 *         if max_chunksize is not None:
*/
              if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "table");
                __PYX_ERR(17, 5096, __pyx_L1_error)
              }
              __pyx_v_reader.reset(new arrow::TableBatchReader((*__pyx_v_self->table)));

              /* "pyarrow/table.pxi":5098
 *         reader.reset(new TableBatchReader(deref(self.table)))
 * 
 *         if max_chunksize is not None:             # <<<<<<<<<<<<<<
 *             if not max_chunksize > 0:
 *                 raise ValueError("'max_chunksize' should be strictly positive")
*/
              __pyx_t_2 = (__pyx_v_max_chunksize != Py_None);
              if (__pyx_t_2) {

                /* "pyarrow/table.pxi":5099
 * 
 *         if max_chunksize is not None:
 *             if not max_chunksize > 0:             # <<<<<<<<<<<<<<
 *                 raise ValueError("'max_chunksize' should be strictly positive")
 *             c_max_chunksize = max_chunksize
*/
                __pyx_t_1 = PyObject_RichCompare(__pyx_v_max_chunksize, __pyx_mstate_global->__pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 5099, __pyx_L1_error)
                __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(17, 5099, __pyx_L1_error)
                __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                __pyx_t_3 = (!__pyx_t_2);
                if (unlikely(__pyx_t_3)) {

                  /* "pyarrow/table.pxi":5100
 *         if max_chunksize is not None:
 *             if not max_chunksize > 0:
 *                 raise ValueError("'max_chunksize' should be strictly positive")             # <<<<<<<<<<<<<<
 *             c_max_chunksize = max_chunksize
 *             reader.get().set_chunksize(c_max_chunksize)
*/
                  __pyx_t_4 = NULL;
                  __pyx_t_5 = 1;
                  {
                    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_max_chunksize_should_be_strictl};
                    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                    if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 5100, __pyx_L1_error)
                    __Pyx_GOTREF(__pyx_t_1);
                  }
                  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
                  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                  __PYX_ERR(17, 5100, __pyx_L1_error)

                  /* "pyarrow/table.pxi":5099
 * 
 *         if max_chunksize is not None:
 *             if not max_chunksize > 0:             # <<<<<<<<<<<<<<
 *                 raise ValueError("'max_chunksize' should be strictly positive")
 *             c_max_chunksize = max_chunksize
*/
                }

                /* "pyarrow/table.pxi":5101
 *             if not max_chunksize > 0:
 *                 raise ValueError("'max_chunksize' should be strictly positive")
 *             c_max_chunksize = max_chunksize             # <<<<<<<<<<<<<<
 *             reader.get().set_chunksize(c_max_chunksize)
 * 
*/
                __pyx_t_6 = __Pyx_PyLong_As_int64_t(__pyx_v_max_chunksize); if (unlikely((__pyx_t_6 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(17, 5101, __pyx_L1_error)
                __pyx_v_c_max_chunksize = __pyx_t_6;

                /* "pyarrow/table.pxi":5102
 *                 raise ValueError("'max_chunksize' should be strictly positive")
 *             c_max_chunksize = max_chunksize
 *             reader.get().set_chunksize(c_max_chunksize)             # <<<<<<<<<<<<<<
 * 
 *         while True:
*/
                __pyx_v_reader.get()->set_chunksize(__pyx_v_c_max_chunksize);

                /* "pyarrow/table.pxi":5098
 *         reader.reset(new TableBatchReader(deref(self.table)))
 * 
 *         if max_chunksize is not None:             # <<<<<<<<<<<<<<
 *             if not max_chunksize > 0:
 *                 raise ValueError("'max_chunksize' should be strictly positive")
*/
              }

              /* "pyarrow/table.pxi":5104
 *             reader.get().set_chunksize(c_max_chunksize)
 * 
 *         while True:             # <<<<<<<<<<<<<<
 *             with nogil:
 *                 check_status(reader.get().ReadNext(&batch))
*/
              while (1) {

                /* "pyarrow/table.pxi":5105
 * 
 *         while True:
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 check_status(reader.get().ReadNext(&batch))
 * 
*/
                {
                    PyThreadState * _save;
                    _save = PyEval_SaveThread();
                    __Pyx_FastGIL_Remember();
                    /*try:*/ {

                      /* "pyarrow/table.pxi":5106
 *         while True:
 *             with nogil:
 *                 check_status(reader.get().ReadNext(&batch))             # <<<<<<<<<<<<<<
 * 
 *             if batch.get() == NULL:
*/
                      __pyx_t_7 = __pyx_f_7pyarrow_3lib_check_status(__pyx_v_reader.get()->ReadNext((&__pyx_v_batch))); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(17, 5106, __pyx_L10_error)
                    }

                    /* "pyarrow/table.pxi":5105
 * 
 *         while True:
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 check_status(reader.get().ReadNext(&batch))
 * 
*/
                    /*finally:*/ {
                      /*normal exit:*/{
                        __Pyx_FastGIL_Forget();
                        PyEval_RestoreThread(_save);
                        goto __pyx_L11;
                      }
                      __pyx_L10_error: {
                        __Pyx_FastGIL_Forget();
                        PyEval_RestoreThread(_save);
                        goto __pyx_L1_error;
                      }
                      __pyx_L11:;
                    }
                }

                /* "pyarrow/table.pxi":5108
 *                 check_status(reader.get().ReadNext(&batch))
 * 
 *             if batch.get() == NULL:             # <<<<<<<<<<<<<<
 *                 break
 * 
*/
                __pyx_t_3 = (__pyx_v_batch.get() == NULL);
                if (__pyx_t_3) {

                  /* "pyarrow/table.pxi":5109
 * 
 *             if batch.get() == NULL:
 *                 break             # <<<<<<<<<<<<<<
 * 
 *             result.append(pyarrow_wrap_batch(batch))
*/
                  goto __pyx_L6_break;

                  /* "pyarrow/table.pxi":5108
 *                 check_status(reader.get().ReadNext(&batch))
 * 
 *             if batch.get() == NULL:             # <<<<<<<<<<<<<<
 *                 break
 * 
*/
                }

                /* "pyarrow/table.pxi":5111
 *                 break
 * 
 *             result.append(pyarrow_wrap_batch(batch))             # <<<<<<<<<<<<<<
 * 
 *         return result
*/
                __pyx_t_1 = pyarrow_wrap_batch(__pyx_v_batch); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 5111, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_1);
                __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_result, __pyx_t_1); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(17, 5111, __pyx_L1_error)
                __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
              }
              __pyx_L6_break:;

              /* "pyarrow/table.pxi":5113
 *             result.append(pyarrow_wrap_batch(batch))
 * 
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     def to_reader(self, max_chunksize=None):
*/
              __Pyx_XDECREF(__pyx_r);
              __Pyx_INCREF(__pyx_v_result);
              __pyx_r = __pyx_v_result;
              goto __pyx_L0;

              /* "pyarrow/table.pxi":5045
 *         return pyarrow_wrap_table(c_table)
 * 
 *     def to_batches(self, max_chunksize=None):             # <<<<<<<<<<<<<<
 *         """
 *         Convert Table to a list of RecordBatch objects.
*/

              /* function exit code */
              __pyx_L1_error:;
              __Pyx_XDECREF(__pyx_t_1);
              __Pyx_XDECREF(__pyx_t_4);
              __Pyx_AddTraceback("pyarrow.lib.Table.to_batches", __pyx_clineno, __pyx_lineno, __pyx_filename);
              __pyx_r = NULL;
              __pyx_L0:;
              __Pyx_XDECREF(__pyx_v_result);
              __Pyx_XGIVEREF(__pyx_r);
              __Pyx_RefNannyFinishContext();
              return __pyx_r;
            }

            /* "pyarrow/table.pxi":5115
 *         return result
 * 
 *     def to_reader(self, max_chunksize=None):             # <<<<<<<<<<<<<<
 *         """
 *         Convert the Table to a RecordBatchReader.
*/

            /* Python wrapper */
            static PyObject *__pyx_pw_7pyarrow_3lib_5Table_37to_reader(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
            PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_5Table_36to_reader, "Table.to_reader(self, max_chunksize=None)\n\nConvert the Table to a RecordBatchReader.\n\nNote that this method is zero-copy, it merely exposes the same data\nunder a different API.\n\nParameters\n----------\nmax_chunksize : int, default None\n    Maximum number of rows for each RecordBatch chunk. Individual chunks\n    may be smaller depending on the chunk layout of individual columns.\n\nReturns\n-------\nRecordBatchReader\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> import pandas as pd\n>>> df = pd.DataFrame({'n_legs': [2, 4, 5, 100],\n...                    'animals': [\"Flamingo\", \"Horse\", \"Brittle stars\", \"Centipede\"]})\n>>> table = pa.Table.from_pandas(df)\n\nConvert a Table to a RecordBatchReader:\n\n>>> table.to_reader()\n<pyarrow.lib.RecordBatchReader object at ...>\n\n>>> reader = table.to_reader()\n>>> reader.schema\nn_legs: int64\nanimals: string\n-- schema metadata --\npandas: '{\"index_columns\": [{\"kind\": \"range\", \"name\": null, \"start\": 0, ...\n>>> reader.read_all()\npyarrow.Table\nn_legs: int64\nanimals: string\n----\nn_legs: [[2,4,5,100]]\nanimals: [[\"Flamingo\",\"Horse\",\"Brittle stars\",\"Centipede\"]]");
                static PyMethodDef __pyx_mdef_7pyarrow_3lib_5Table_37to_reader = {"to_reader", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Table_37to_reader, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Table_36to_reader};
                static PyObject *__pyx_pw_7pyarrow_3lib_5Table_37to_reader(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                  PyObject *__pyx_v_max_chunksize = 0;
                  #if !CYTHON_METH_FASTCALL
                  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                  #endif
                  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                  PyObject* values[1] = {0};
                  int __pyx_lineno = 0;
                  const char *__pyx_filename = NULL;
                  int __pyx_clineno = 0;
                  PyObject *__pyx_r = 0;
                  __Pyx_RefNannyDeclarations
                  __Pyx_RefNannySetupContext("to_reader (wrapper)", 0);
                  #if !CYTHON_METH_FASTCALL
                  #if CYTHON_ASSUME_SAFE_SIZE
                  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                  #else
                  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                  #endif
                  #endif
                  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                  {
                    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_max_chunksize,0};
                    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(17, 5115, __pyx_L3_error)
                    if (__pyx_kwds_len > 0) {
                      switch (__pyx_nargs) {
                        case  1:
                        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 5115, __pyx_L3_error)
                        CYTHON_FALLTHROUGH;
                        case  0: break;
                        default: goto __pyx_L5_argtuple_error;
                      }
                      const Py_ssize_t kwd_pos_args = __pyx_nargs;
                      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "to_reader", 0) < (0)) __PYX_ERR(17, 5115, __pyx_L3_error)
                      if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
                    } else {
                      switch (__pyx_nargs) {
                        case  1:
                        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 5115, __pyx_L3_error)
                        CYTHON_FALLTHROUGH;
                        case  0: break;
                        default: goto __pyx_L5_argtuple_error;
                      }
                      if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
                    }
                    __pyx_v_max_chunksize = values[0];
                  }
                  goto __pyx_L6_skip;
                  __pyx_L5_argtuple_error:;
                  __Pyx_RaiseArgtupleInvalid("to_reader", 0, 0, 1, __pyx_nargs); __PYX_ERR(17, 5115, __pyx_L3_error)
                  __pyx_L6_skip:;
                  goto __pyx_L4_argument_unpacking_done;
                  __pyx_L3_error:;
                  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                    Py_XDECREF(values[__pyx_temp]);
                  }
                  __Pyx_AddTraceback("pyarrow.lib.Table.to_reader", __pyx_clineno, __pyx_lineno, __pyx_filename);
                  __Pyx_RefNannyFinishContext();
                  return NULL;
                  __pyx_L4_argument_unpacking_done:;
                  __pyx_r = __pyx_pf_7pyarrow_3lib_5Table_36to_reader(((struct __pyx_obj_7pyarrow_3lib_Table *)__pyx_v_self), __pyx_v_max_chunksize);

                  /* function exit code */
                  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                    Py_XDECREF(values[__pyx_temp]);
                  }
                  __Pyx_RefNannyFinishContext();
                  return __pyx_r;
                }

                static PyObject *__pyx_pf_7pyarrow_3lib_5Table_36to_reader(struct __pyx_obj_7pyarrow_3lib_Table *__pyx_v_self, PyObject *__pyx_v_max_chunksize) {
                  std::shared_ptr< arrow::RecordBatchReader>  __pyx_v_c_reader;
                  struct __pyx_obj_7pyarrow_3lib_RecordBatchReader *__pyx_v_reader = 0;
                  std::shared_ptr<arrow::TableBatchReader>  __pyx_v_t_reader;
                  PyObject *__pyx_r = NULL;
                  __Pyx_RefNannyDeclarations
                  std::shared_ptr<arrow::TableBatchReader>  __pyx_t_1;
                  int __pyx_t_2;
                  int64_t __pyx_t_3;
                  PyObject *__pyx_t_4 = NULL;
                  int __pyx_lineno = 0;
                  const char *__pyx_filename = NULL;
                  int __pyx_clineno = 0;
                  __Pyx_RefNannySetupContext("to_reader", 0);

                  /* "pyarrow/table.pxi":5163
 *             RecordBatchReader reader
 *             shared_ptr[TableBatchReader] t_reader
 *         t_reader = make_shared[TableBatchReader](self.sp_table)             # <<<<<<<<<<<<<<
 * 
 *         if max_chunksize is not None:
*/
                  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_table");
                    __PYX_ERR(17, 5163, __pyx_L1_error)
                  }
                  try {
                    __pyx_t_1 = std::make_shared<arrow::TableBatchReader>(__pyx_v_self->sp_table);
                  } catch(...) {
                    __Pyx_CppExn2PyErr();
                    __PYX_ERR(17, 5163, __pyx_L1_error)
                  }
                  __pyx_v_t_reader = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_1);

                  /* "pyarrow/table.pxi":5165
 *         t_reader = make_shared[TableBatchReader](self.sp_table)
 * 
 *         if max_chunksize is not None:             # <<<<<<<<<<<<<<
 *             t_reader.get().set_chunksize(max_chunksize)
 * 
*/
                  __pyx_t_2 = (__pyx_v_max_chunksize != Py_None);
                  if (__pyx_t_2) {

                    /* "pyarrow/table.pxi":5166
 * 
 *         if max_chunksize is not None:
 *             t_reader.get().set_chunksize(max_chunksize)             # <<<<<<<<<<<<<<
 * 
 *         c_reader = dynamic_pointer_cast[CRecordBatchReader, TableBatchReader](
*/
                    __pyx_t_3 = __Pyx_PyLong_As_int64_t(__pyx_v_max_chunksize); if (unlikely((__pyx_t_3 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(17, 5166, __pyx_L1_error)
                    __pyx_v_t_reader.get()->set_chunksize(__pyx_t_3);

                    /* "pyarrow/table.pxi":5165
 *         t_reader = make_shared[TableBatchReader](self.sp_table)
 * 
 *         if max_chunksize is not None:             # <<<<<<<<<<<<<<
 *             t_reader.get().set_chunksize(max_chunksize)
 * 
*/
                  }

                  /* "pyarrow/table.pxi":5168
 *             t_reader.get().set_chunksize(max_chunksize)
 * 
 *         c_reader = dynamic_pointer_cast[CRecordBatchReader, TableBatchReader](             # <<<<<<<<<<<<<<
 *             t_reader)
 *         reader = RecordBatchReader.__new__(RecordBatchReader)
*/
                  __pyx_v_c_reader = std::dynamic_pointer_cast< arrow::RecordBatchReader,arrow::TableBatchReader>(__pyx_v_t_reader);

                  /* "pyarrow/table.pxi":5170
 *         c_reader = dynamic_pointer_cast[CRecordBatchReader, TableBatchReader](
 *             t_reader)
 *         reader = RecordBatchReader.__new__(RecordBatchReader)             # <<<<<<<<<<<<<<
 *         reader.reader = c_reader
 *         return reader
*/
                  __pyx_t_4 = ((PyObject *)__pyx_tp_new_7pyarrow_3lib_RecordBatchReader(((PyTypeObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RecordBatchReader), __pyx_mstate_global->__pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 5170, __pyx_L1_error)
                  __Pyx_GOTREF((PyObject *)__pyx_t_4);
                  __pyx_v_reader = ((struct __pyx_obj_7pyarrow_3lib_RecordBatchReader *)__pyx_t_4);
                  __pyx_t_4 = 0;

                  /* "pyarrow/table.pxi":5171
 *             t_reader)
 *         reader = RecordBatchReader.__new__(RecordBatchReader)
 *         reader.reader = c_reader             # <<<<<<<<<<<<<<
 *         return reader
 * 
*/
                  if (unlikely(((PyObject *)__pyx_v_reader) == Py_None)) {
                    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "reader");
                    __PYX_ERR(17, 5171, __pyx_L1_error)
                  }
                  __pyx_v_reader->reader = ((arrow::py::SharedPtrNoGIL< arrow::RecordBatchReader> )__pyx_v_c_reader);

                  /* "pyarrow/table.pxi":5172
 *         reader = RecordBatchReader.__new__(RecordBatchReader)
 *         reader.reader = c_reader
 *         return reader             # <<<<<<<<<<<<<<
 * 
 *     def _to_pandas(self, options, categories=None, ignore_metadata=False,
*/
                  __Pyx_XDECREF(__pyx_r);
                  __Pyx_INCREF((PyObject *)__pyx_v_reader);
                  __pyx_r = ((PyObject *)__pyx_v_reader);
                  goto __pyx_L0;

                  /* "pyarrow/table.pxi":5115
 *         return result
 * 
 *     def to_reader(self, max_chunksize=None):             # <<<<<<<<<<<<<<
 *         """
 *         Convert the Table to a RecordBatchReader.
*/

                  /* function exit code */
                  __pyx_L1_error:;
                  __Pyx_XDECREF(__pyx_t_4);
                  __Pyx_AddTraceback("pyarrow.lib.Table.to_reader", __pyx_clineno, __pyx_lineno, __pyx_filename);
                  __pyx_r = NULL;
                  __pyx_L0:;
                  __Pyx_XDECREF((PyObject *)__pyx_v_reader);
                  __Pyx_XGIVEREF(__pyx_r);
                  __Pyx_RefNannyFinishContext();
                  return __pyx_r;
                }

                /* "pyarrow/table.pxi":5174
 *         return reader
 * 
 *     def _to_pandas(self, options, categories=None, ignore_metadata=False,             # <<<<<<<<<<<<<<
 *                    types_mapper=None):
 *         self._assert_cpu()
*/

                /* Python wrapper */
                static PyObject *__pyx_pw_7pyarrow_3lib_5Table_39_to_pandas(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_5Table_38_to_pandas, "Table._to_pandas(self, options, categories=None, ignore_metadata=False, types_mapper=None)");
                static PyMethodDef __pyx_mdef_7pyarrow_3lib_5Table_39_to_pandas = {"_to_pandas", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Table_39_to_pandas, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Table_38_to_pandas};
                static PyObject *__pyx_pw_7pyarrow_3lib_5Table_39_to_pandas(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                  PyObject *__pyx_v_options = 0;
                  PyObject *__pyx_v_categories = 0;
                  PyObject *__pyx_v_ignore_metadata = 0;
                  PyObject *__pyx_v_types_mapper = 0;
                  #if !CYTHON_METH_FASTCALL
                  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                  #endif
                  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                  PyObject* values[4] = {0,0,0,0};
                  int __pyx_lineno = 0;
                  const char *__pyx_filename = NULL;
                  int __pyx_clineno = 0;
                  PyObject *__pyx_r = 0;
                  __Pyx_RefNannyDeclarations
                  __Pyx_RefNannySetupContext("_to_pandas (wrapper)", 0);
                  #if !CYTHON_METH_FASTCALL
                  #if CYTHON_ASSUME_SAFE_SIZE
                  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                  #else
                  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                  #endif
                  #endif
                  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                  {
                    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_options,&__pyx_mstate_global->__pyx_n_u_categories,&__pyx_mstate_global->__pyx_n_u_ignore_metadata,&__pyx_mstate_global->__pyx_n_u_types_mapper,0};
                    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(17, 5174, __pyx_L3_error)
                    if (__pyx_kwds_len > 0) {
                      switch (__pyx_nargs) {
                        case  4:
                        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
                        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(17, 5174, __pyx_L3_error)
                        CYTHON_FALLTHROUGH;
                        case  3:
                        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
                        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(17, 5174, __pyx_L3_error)
                        CYTHON_FALLTHROUGH;
                        case  2:
                        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(17, 5174, __pyx_L3_error)
                        CYTHON_FALLTHROUGH;
                        case  1:
                        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 5174, __pyx_L3_error)
                        CYTHON_FALLTHROUGH;
                        case  0: break;
                        default: goto __pyx_L5_argtuple_error;
                      }
                      const Py_ssize_t kwd_pos_args = __pyx_nargs;
                      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_to_pandas", 0) < (0)) __PYX_ERR(17, 5174, __pyx_L3_error)
                      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
                      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_False));

                      /* "pyarrow/table.pxi":5175
 * 
 *     def _to_pandas(self, options, categories=None, ignore_metadata=False,
 *                    types_mapper=None):             # <<<<<<<<<<<<<<
 *         self._assert_cpu()
 *         from pyarrow.pandas_compat import table_to_dataframe
*/
                      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None));
                      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_to_pandas", 0, 1, 4, i); __PYX_ERR(17, 5174, __pyx_L3_error) }
                      }
                    } else {
                      switch (__pyx_nargs) {
                        case  4:
                        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
                        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(17, 5174, __pyx_L3_error)
                        CYTHON_FALLTHROUGH;
                        case  3:
                        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
                        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(17, 5174, __pyx_L3_error)
                        CYTHON_FALLTHROUGH;
                        case  2:
                        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(17, 5174, __pyx_L3_error)
                        CYTHON_FALLTHROUGH;
                        case  1:
                        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 5174, __pyx_L3_error)
                        break;
                        default: goto __pyx_L5_argtuple_error;
                      }

                      /* "pyarrow/table.pxi":5174
 *         return reader
 * 
 *     def _to_pandas(self, options, categories=None, ignore_metadata=False,             # <<<<<<<<<<<<<<
 *                    types_mapper=None):
 *         self._assert_cpu()
*/
                      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
                      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_False));

                      /* "pyarrow/table.pxi":5175
 * 
 *     def _to_pandas(self, options, categories=None, ignore_metadata=False,
 *                    types_mapper=None):             # <<<<<<<<<<<<<<
 *         self._assert_cpu()
 *         from pyarrow.pandas_compat import table_to_dataframe
*/
                      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None));
                    }
                    __pyx_v_options = values[0];
                    __pyx_v_categories = values[1];
                    __pyx_v_ignore_metadata = values[2];
                    __pyx_v_types_mapper = values[3];
                  }
                  goto __pyx_L6_skip;
                  __pyx_L5_argtuple_error:;
                  __Pyx_RaiseArgtupleInvalid("_to_pandas", 0, 1, 4, __pyx_nargs); __PYX_ERR(17, 5174, __pyx_L3_error)
                  __pyx_L6_skip:;
                  goto __pyx_L4_argument_unpacking_done;
                  __pyx_L3_error:;
                  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                    Py_XDECREF(values[__pyx_temp]);
                  }
                  __Pyx_AddTraceback("pyarrow.lib.Table._to_pandas", __pyx_clineno, __pyx_lineno, __pyx_filename);
                  __Pyx_RefNannyFinishContext();
                  return NULL;
                  __pyx_L4_argument_unpacking_done:;
                  __pyx_r = __pyx_pf_7pyarrow_3lib_5Table_38_to_pandas(((struct __pyx_obj_7pyarrow_3lib_Table *)__pyx_v_self), __pyx_v_options, __pyx_v_categories, __pyx_v_ignore_metadata, __pyx_v_types_mapper);

                  /* "pyarrow/table.pxi":5174
 *         return reader
 * 
 *     def _to_pandas(self, options, categories=None, ignore_metadata=False,             # <<<<<<<<<<<<<<
 *                    types_mapper=None):
 *         self._assert_cpu()
*/

                  /* function exit code */
                  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                    Py_XDECREF(values[__pyx_temp]);
                  }
                  __Pyx_RefNannyFinishContext();
                  return __pyx_r;
                }

                static PyObject *__pyx_pf_7pyarrow_3lib_5Table_38_to_pandas(struct __pyx_obj_7pyarrow_3lib_Table *__pyx_v_self, PyObject *__pyx_v_options, PyObject *__pyx_v_categories, PyObject *__pyx_v_ignore_metadata, PyObject *__pyx_v_types_mapper) {
                  PyObject *__pyx_v_table_to_dataframe = NULL;
                  PyObject *__pyx_v_df = NULL;
                  PyObject *__pyx_r = NULL;
                  __Pyx_RefNannyDeclarations
                  PyObject *__pyx_t_1 = NULL;
                  PyObject *__pyx_t_2 = NULL;
                  Py_ssize_t __pyx_t_3;
                  PyObject *__pyx_t_4 = NULL;
                  PyObject *__pyx_t_5 = NULL;
                  size_t __pyx_t_6;
                  PyObject *__pyx_t_7 = NULL;
                  int __pyx_lineno = 0;
                  const char *__pyx_filename = NULL;
                  int __pyx_clineno = 0;
                  __Pyx_RefNannySetupContext("_to_pandas", 0);

                  /* "pyarrow/table.pxi":5176
 *     def _to_pandas(self, options, categories=None, ignore_metadata=False,
 *                    types_mapper=None):
 *         self._assert_cpu()             # <<<<<<<<<<<<<<
 *         from pyarrow.pandas_compat import table_to_dataframe
 *         df = table_to_dataframe(
*/
                  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_assert_cpu");
                    __PYX_ERR(17, 5176, __pyx_L1_error)
                  }
                  ((struct __pyx_vtabstruct_7pyarrow_3lib_Table *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._assert_cpu(((struct __pyx_obj_7pyarrow_3lib__Tabular *)__pyx_v_self)); if (unlikely(PyErr_Occurred())) __PYX_ERR(17, 5176, __pyx_L1_error)

                  /* "pyarrow/table.pxi":5177
 *                    types_mapper=None):
 *         self._assert_cpu()
 *         from pyarrow.pandas_compat import table_to_dataframe             # <<<<<<<<<<<<<<
 *         df = table_to_dataframe(
 *             options, self, categories,
*/
                  {
                    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_table_to_dataframe};
                    __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_pyarrow_pandas_compat, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 5177, __pyx_L1_error)
                  }
                  __pyx_t_1 = __pyx_t_2;
                  __Pyx_GOTREF(__pyx_t_1);
                  {
                    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_table_to_dataframe};
                    __pyx_t_3 = 0; {
                      __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_1, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 5177, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_4);
                      switch (__pyx_t_3) {
                        case 0:
                        __Pyx_INCREF(__pyx_t_4);
                        __pyx_v_table_to_dataframe = __pyx_t_4;
                        break;
                        default:;
                      }
                      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                    }
                  }
                  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

                  /* "pyarrow/table.pxi":5178
 *         self._assert_cpu()
 *         from pyarrow.pandas_compat import table_to_dataframe
 *         df = table_to_dataframe(             # <<<<<<<<<<<<<<
 *             options, self, categories,
 *             ignore_metadata=ignore_metadata,
*/
                  __pyx_t_4 = NULL;
                  __Pyx_INCREF(__pyx_v_table_to_dataframe);
                  __pyx_t_5 = __pyx_v_table_to_dataframe; 

                  /* "pyarrow/table.pxi":5181
 *             options, self, categories,
 *             ignore_metadata=ignore_metadata,
 *             types_mapper=types_mapper)             # <<<<<<<<<<<<<<
 *         return df
 * 
*/
                  __pyx_t_6 = 1;
                  #if CYTHON_UNPACK_METHODS
                  if (unlikely(PyMethod_Check(__pyx_t_5))) {
                    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
                    assert(__pyx_t_4);
                    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
                    __Pyx_INCREF(__pyx_t_4);
                    __Pyx_INCREF(__pyx__function);
                    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
                    __pyx_t_6 = 0;
                  }
                  #endif
                  {
                    PyObject *__pyx_callargs[4 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_4, __pyx_v_options, ((PyObject *)__pyx_v_self), __pyx_v_categories};
                    __pyx_t_7 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 5178, __pyx_L1_error)
                    __Pyx_GOTREF(__pyx_t_7);
                    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_ignore_metadata, __pyx_v_ignore_metadata, __pyx_t_7, __pyx_callargs+4, 0) < (0)) __PYX_ERR(17, 5178, __pyx_L1_error)
                    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_types_mapper, __pyx_v_types_mapper, __pyx_t_7, __pyx_callargs+4, 1) < (0)) __PYX_ERR(17, 5178, __pyx_L1_error)
                    __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (4-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_7);
                    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
                    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                    if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 5178, __pyx_L1_error)
                    __Pyx_GOTREF(__pyx_t_1);
                  }
                  __pyx_v_df = __pyx_t_1;
                  __pyx_t_1 = 0;

                  /* "pyarrow/table.pxi":5182
 *             ignore_metadata=ignore_metadata,
 *             types_mapper=types_mapper)
 *         return df             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
                  __Pyx_XDECREF(__pyx_r);
                  __Pyx_INCREF(__pyx_v_df);
                  __pyx_r = __pyx_v_df;
                  goto __pyx_L0;

                  /* "pyarrow/table.pxi":5174
 *         return reader
 * 
 *     def _to_pandas(self, options, categories=None, ignore_metadata=False,             # <<<<<<<<<<<<<<
 *                    types_mapper=None):
 *         self._assert_cpu()
*/

                  /* function exit code */
                  __pyx_L1_error:;
                  __Pyx_XDECREF(__pyx_t_1);
                  __Pyx_XDECREF(__pyx_t_4);
                  __Pyx_XDECREF(__pyx_t_5);
                  __Pyx_XDECREF(__pyx_t_7);
                  __Pyx_AddTraceback("pyarrow.lib.Table._to_pandas", __pyx_clineno, __pyx_lineno, __pyx_filename);
                  __pyx_r = NULL;
                  __pyx_L0:;
                  __Pyx_XDECREF(__pyx_v_table_to_dataframe);
                  __Pyx_XDECREF(__pyx_v_df);
                  __Pyx_XGIVEREF(__pyx_r);
                  __Pyx_RefNannyFinishContext();
                  return __pyx_r;
                }

                /* "pyarrow/table.pxi":5184
 *         return df
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def schema(self):
 *         """
*/

                /* Python wrapper */
                static PyObject *__pyx_pw_7pyarrow_3lib_5Table_6schema_1__get__(PyObject *__pyx_v_self); /*proto*/
                static PyObject *__pyx_pw_7pyarrow_3lib_5Table_6schema_1__get__(PyObject *__pyx_v_self) {
                  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                  PyObject *__pyx_r = 0;
                  __Pyx_RefNannyDeclarations
                  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
                  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                  __pyx_r = __pyx_pf_7pyarrow_3lib_5Table_6schema___get__(((struct __pyx_obj_7pyarrow_3lib_Table *)__pyx_v_self));

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

                static PyObject *__pyx_pf_7pyarrow_3lib_5Table_6schema___get__(struct __pyx_obj_7pyarrow_3lib_Table *__pyx_v_self) {
                  PyObject *__pyx_r = NULL;
                  __Pyx_RefNannyDeclarations
                  PyObject *__pyx_t_1 = NULL;
                  int __pyx_lineno = 0;
                  const char *__pyx_filename = NULL;
                  int __pyx_clineno = 0;
                  __Pyx_RefNannySetupContext("__get__", 0);

                  /* "pyarrow/table.pxi":5206
 *         pandas: '{"index_columns": [{"kind": "range", "name": null, "start": 0, "' ...
 *         """
 *         return pyarrow_wrap_schema(self.table.schema())             # <<<<<<<<<<<<<<
 * 
 *     def _column(self, int i):
*/
                  __Pyx_XDECREF(__pyx_r);
                  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "table");
                    __PYX_ERR(17, 5206, __pyx_L1_error)
                  }
                  __pyx_t_1 = pyarrow_wrap_schema(__pyx_v_self->table->schema()); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 5206, __pyx_L1_error)
                  __Pyx_GOTREF(__pyx_t_1);
                  __pyx_r = __pyx_t_1;
                  __pyx_t_1 = 0;
                  goto __pyx_L0;

                  /* "pyarrow/table.pxi":5184
 *         return df
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def schema(self):
 *         """
*/

                  /* function exit code */
                  __pyx_L1_error:;
                  __Pyx_XDECREF(__pyx_t_1);
                  __Pyx_AddTraceback("pyarrow.lib.Table.schema.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                  __pyx_r = NULL;
                  __pyx_L0:;
                  __Pyx_XGIVEREF(__pyx_r);
                  __Pyx_RefNannyFinishContext();
                  return __pyx_r;
                }

                /* "pyarrow/table.pxi":5208
 *         return pyarrow_wrap_schema(self.table.schema())
 * 
 *     def _column(self, int i):             # <<<<<<<<<<<<<<
 *         """
 *         Select a column by its numeric index.
*/

                /* Python wrapper */
                static PyObject *__pyx_pw_7pyarrow_3lib_5Table_41_column(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_5Table_40_column, "Table._column(self, int i)\n\nSelect a column by its numeric index.\n\nParameters\n----------\ni : int\n    The index of the column to retrieve.\n\nReturns\n-------\nChunkedArray");
                static PyMethodDef __pyx_mdef_7pyarrow_3lib_5Table_41_column = {"_column", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Table_41_column, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Table_40_column};
                static PyObject *__pyx_pw_7pyarrow_3lib_5Table_41_column(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                  int __pyx_v_i;
                  #if !CYTHON_METH_FASTCALL
                  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                  #endif
                  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                  PyObject* values[1] = {0};
                  int __pyx_lineno = 0;
                  const char *__pyx_filename = NULL;
                  int __pyx_clineno = 0;
                  PyObject *__pyx_r = 0;
                  __Pyx_RefNannyDeclarations
                  __Pyx_RefNannySetupContext("_column (wrapper)", 0);
                  #if !CYTHON_METH_FASTCALL
                  #if CYTHON_ASSUME_SAFE_SIZE
                  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                  #else
                  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                  #endif
                  #endif
                  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                  {
                    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_i,0};
                    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(17, 5208, __pyx_L3_error)
                    if (__pyx_kwds_len > 0) {
                      switch (__pyx_nargs) {
                        case  1:
                        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 5208, __pyx_L3_error)
                        CYTHON_FALLTHROUGH;
                        case  0: break;
                        default: goto __pyx_L5_argtuple_error;
                      }
                      const Py_ssize_t kwd_pos_args = __pyx_nargs;
                      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_column", 0) < (0)) __PYX_ERR(17, 5208, __pyx_L3_error)
                      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_column", 1, 1, 1, i); __PYX_ERR(17, 5208, __pyx_L3_error) }
                      }
                    } else if (unlikely(__pyx_nargs != 1)) {
                      goto __pyx_L5_argtuple_error;
                    } else {
                      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 5208, __pyx_L3_error)
                    }
                    __pyx_v_i = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_i == (int)-1) && PyErr_Occurred())) __PYX_ERR(17, 5208, __pyx_L3_error)
                  }
                  goto __pyx_L6_skip;
                  __pyx_L5_argtuple_error:;
                  __Pyx_RaiseArgtupleInvalid("_column", 1, 1, 1, __pyx_nargs); __PYX_ERR(17, 5208, __pyx_L3_error)
                  __pyx_L6_skip:;
                  goto __pyx_L4_argument_unpacking_done;
                  __pyx_L3_error:;
                  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                    Py_XDECREF(values[__pyx_temp]);
                  }
                  __Pyx_AddTraceback("pyarrow.lib.Table._column", __pyx_clineno, __pyx_lineno, __pyx_filename);
                  __Pyx_RefNannyFinishContext();
                  return NULL;
                  __pyx_L4_argument_unpacking_done:;
                  __pyx_r = __pyx_pf_7pyarrow_3lib_5Table_40_column(((struct __pyx_obj_7pyarrow_3lib_Table *)__pyx_v_self), __pyx_v_i);

                  /* function exit code */
                  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                    Py_XDECREF(values[__pyx_temp]);
                  }
                  __Pyx_RefNannyFinishContext();
                  return __pyx_r;
                }

                static PyObject *__pyx_pf_7pyarrow_3lib_5Table_40_column(struct __pyx_obj_7pyarrow_3lib_Table *__pyx_v_self, int __pyx_v_i) {
                  int __pyx_v_index;
                  struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_result = 0;
                  PyObject *__pyx_r = NULL;
                  __Pyx_RefNannyDeclarations
                  PyObject *__pyx_t_1 = NULL;
                  Py_ssize_t __pyx_t_2;
                  Py_ssize_t __pyx_t_3;
                  PyObject *__pyx_t_4 = NULL;
                  int __pyx_lineno = 0;
                  const char *__pyx_filename = NULL;
                  int __pyx_clineno = 0;
                  __Pyx_RefNannySetupContext("_column", 0);

                  /* "pyarrow/table.pxi":5221
 *         ChunkedArray
 *         """
 *         cdef int index = <int> _normalize_index(i, self.num_columns)             # <<<<<<<<<<<<<<
 *         cdef ChunkedArray result = pyarrow_wrap_chunked_array(
 *             self.table.column(index))
*/
                  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_num_columns); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 5221, __pyx_L1_error)
                  __Pyx_GOTREF(__pyx_t_1);
                  __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(17, 5221, __pyx_L1_error)
                  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                  __pyx_t_3 = __pyx_f_7pyarrow_3lib__normalize_index(__pyx_v_i, __pyx_t_2); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1L))) __PYX_ERR(17, 5221, __pyx_L1_error)
                  __pyx_v_index = ((int)__pyx_t_3);

                  /* "pyarrow/table.pxi":5223
 *         cdef int index = <int> _normalize_index(i, self.num_columns)
 *         cdef ChunkedArray result = pyarrow_wrap_chunked_array(
 *             self.table.column(index))             # <<<<<<<<<<<<<<
 *         result._name = self.schema[index].name
 *         return result
*/
                  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "table");
                    __PYX_ERR(17, 5223, __pyx_L1_error)
                  }

                  /* "pyarrow/table.pxi":5222
 *         """
 *         cdef int index = <int> _normalize_index(i, self.num_columns)
 *         cdef ChunkedArray result = pyarrow_wrap_chunked_array(             # <<<<<<<<<<<<<<
 *             self.table.column(index))
 *         result._name = self.schema[index].name
*/
                  __pyx_t_1 = pyarrow_wrap_chunked_array(__pyx_v_self->table->column(__pyx_v_index)); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 5222, __pyx_L1_error)
                  __Pyx_GOTREF(__pyx_t_1);
                  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ChunkedArray))))) __PYX_ERR(17, 5222, __pyx_L1_error)
                  __pyx_v_result = ((struct __pyx_obj_7pyarrow_3lib_ChunkedArray *)__pyx_t_1);
                  __pyx_t_1 = 0;

                  /* "pyarrow/table.pxi":5224
 *         cdef ChunkedArray result = pyarrow_wrap_chunked_array(
 *             self.table.column(index))
 *         result._name = self.schema[index].name             # <<<<<<<<<<<<<<
 *         return result
 * 
*/
                  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_schema); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 5224, __pyx_L1_error)
                  __Pyx_GOTREF(__pyx_t_1);
                  if (unlikely(__pyx_t_1 == Py_None)) {
                    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
                    __PYX_ERR(17, 5224, __pyx_L1_error)
                  }
                  __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_1, __pyx_v_index, int, 1, __Pyx_PyLong_From_int, 0, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 5224, __pyx_L1_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 5224, __pyx_L1_error)
                  __Pyx_GOTREF(__pyx_t_1);
                  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                  if (unlikely(((PyObject *)__pyx_v_result) == Py_None)) {
                    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_name");
                    __PYX_ERR(17, 5224, __pyx_L1_error)
                  }
                  __Pyx_GIVEREF(__pyx_t_1);
                  __Pyx_GOTREF(__pyx_v_result->_name);
                  __Pyx_DECREF(__pyx_v_result->_name);
                  __pyx_v_result->_name = __pyx_t_1;
                  __pyx_t_1 = 0;

                  /* "pyarrow/table.pxi":5225
 *             self.table.column(index))
 *         result._name = self.schema[index].name
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
                  __Pyx_XDECREF(__pyx_r);
                  __Pyx_INCREF((PyObject *)__pyx_v_result);
                  __pyx_r = ((PyObject *)__pyx_v_result);
                  goto __pyx_L0;

                  /* "pyarrow/table.pxi":5208
 *         return pyarrow_wrap_schema(self.table.schema())
 * 
 *     def _column(self, int i):             # <<<<<<<<<<<<<<
 *         """
 *         Select a column by its numeric index.
*/

                  /* function exit code */
                  __pyx_L1_error:;
                  __Pyx_XDECREF(__pyx_t_1);
                  __Pyx_XDECREF(__pyx_t_4);
                  __Pyx_AddTraceback("pyarrow.lib.Table._column", __pyx_clineno, __pyx_lineno, __pyx_filename);
                  __pyx_r = NULL;
                  __pyx_L0:;
                  __Pyx_XDECREF((PyObject *)__pyx_v_result);
                  __Pyx_XGIVEREF(__pyx_r);
                  __Pyx_RefNannyFinishContext();
                  return __pyx_r;
                }

                /* "pyarrow/table.pxi":5227
 *         return result
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def num_columns(self):
 *         """
*/

                /* Python wrapper */
                static PyObject *__pyx_pw_7pyarrow_3lib_5Table_11num_columns_1__get__(PyObject *__pyx_v_self); /*proto*/
                static PyObject *__pyx_pw_7pyarrow_3lib_5Table_11num_columns_1__get__(PyObject *__pyx_v_self) {
                  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                  PyObject *__pyx_r = 0;
                  __Pyx_RefNannyDeclarations
                  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
                  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                  __pyx_r = __pyx_pf_7pyarrow_3lib_5Table_11num_columns___get__(((struct __pyx_obj_7pyarrow_3lib_Table *)__pyx_v_self));

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

                static PyObject *__pyx_pf_7pyarrow_3lib_5Table_11num_columns___get__(struct __pyx_obj_7pyarrow_3lib_Table *__pyx_v_self) {
                  PyObject *__pyx_r = NULL;
                  __Pyx_RefNannyDeclarations
                  PyObject *__pyx_t_1 = NULL;
                  int __pyx_lineno = 0;
                  const char *__pyx_filename = NULL;
                  int __pyx_clineno = 0;
                  __Pyx_RefNannySetupContext("__get__", 0);

                  /* "pyarrow/table.pxi":5246
 *         2
 *         """
 *         return self.table.num_columns()             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
                  __Pyx_XDECREF(__pyx_r);
                  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "table");
                    __PYX_ERR(17, 5246, __pyx_L1_error)
                  }
                  __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_v_self->table->num_columns()); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 5246, __pyx_L1_error)
                  __Pyx_GOTREF(__pyx_t_1);
                  __pyx_r = __pyx_t_1;
                  __pyx_t_1 = 0;
                  goto __pyx_L0;

                  /* "pyarrow/table.pxi":5227
 *         return result
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def num_columns(self):
 *         """
*/

                  /* function exit code */
                  __pyx_L1_error:;
                  __Pyx_XDECREF(__pyx_t_1);
                  __Pyx_AddTraceback("pyarrow.lib.Table.num_columns.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                  __pyx_r = NULL;
                  __pyx_L0:;
                  __Pyx_XGIVEREF(__pyx_r);
                  __Pyx_RefNannyFinishContext();
                  return __pyx_r;
                }

                /* "pyarrow/table.pxi":5248
 *         return self.table.num_columns()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def num_rows(self):
 *         """
*/

                /* Python wrapper */
                static PyObject *__pyx_pw_7pyarrow_3lib_5Table_8num_rows_1__get__(PyObject *__pyx_v_self); /*proto*/
                static PyObject *__pyx_pw_7pyarrow_3lib_5Table_8num_rows_1__get__(PyObject *__pyx_v_self) {
                  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                  PyObject *__pyx_r = 0;
                  __Pyx_RefNannyDeclarations
                  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
                  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                  __pyx_r = __pyx_pf_7pyarrow_3lib_5Table_8num_rows___get__(((struct __pyx_obj_7pyarrow_3lib_Table *)__pyx_v_self));

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

                static PyObject *__pyx_pf_7pyarrow_3lib_5Table_8num_rows___get__(struct __pyx_obj_7pyarrow_3lib_Table *__pyx_v_self) {
                  PyObject *__pyx_r = NULL;
                  __Pyx_RefNannyDeclarations
                  PyObject *__pyx_t_1 = NULL;
                  int __pyx_lineno = 0;
                  const char *__pyx_filename = NULL;
                  int __pyx_clineno = 0;
                  __Pyx_RefNannySetupContext("__get__", 0);

                  /* "pyarrow/table.pxi":5270
 *         4
 *         """
 *         return self.table.num_rows()             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
                  __Pyx_XDECREF(__pyx_r);
                  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "table");
                    __PYX_ERR(17, 5270, __pyx_L1_error)
                  }
                  __pyx_t_1 = __Pyx_PyLong_From_int64_t(__pyx_v_self->table->num_rows()); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 5270, __pyx_L1_error)
                  __Pyx_GOTREF(__pyx_t_1);
                  __pyx_r = __pyx_t_1;
                  __pyx_t_1 = 0;
                  goto __pyx_L0;

                  /* "pyarrow/table.pxi":5248
 *         return self.table.num_columns()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def num_rows(self):
 *         """
*/

                  /* function exit code */
                  __pyx_L1_error:;
                  __Pyx_XDECREF(__pyx_t_1);
                  __Pyx_AddTraceback("pyarrow.lib.Table.num_rows.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                  __pyx_r = NULL;
                  __pyx_L0:;
                  __Pyx_XGIVEREF(__pyx_r);
                  __Pyx_RefNannyFinishContext();
                  return __pyx_r;
                }

                /* "pyarrow/table.pxi":5272
 *         return self.table.num_rows()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def nbytes(self):
 *         """
*/

                /* Python wrapper */
                static PyObject *__pyx_pw_7pyarrow_3lib_5Table_6nbytes_1__get__(PyObject *__pyx_v_self); /*proto*/
                static PyObject *__pyx_pw_7pyarrow_3lib_5Table_6nbytes_1__get__(PyObject *__pyx_v_self) {
                  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                  PyObject *__pyx_r = 0;
                  __Pyx_RefNannyDeclarations
                  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
                  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                  __pyx_r = __pyx_pf_7pyarrow_3lib_5Table_6nbytes___get__(((struct __pyx_obj_7pyarrow_3lib_Table *)__pyx_v_self));

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

                static PyObject *__pyx_pf_7pyarrow_3lib_5Table_6nbytes___get__(struct __pyx_obj_7pyarrow_3lib_Table *__pyx_v_self) {
                  arrow::Result<int64_t>  __pyx_v_c_res_buffer;
                  int64_t __pyx_v_size;
                  PyObject *__pyx_r = NULL;
                  __Pyx_RefNannyDeclarations
                  int64_t __pyx_t_1;
                  PyObject *__pyx_t_2 = NULL;
                  int __pyx_lineno = 0;
                  const char *__pyx_filename = NULL;
                  int __pyx_clineno = 0;
                  __Pyx_RefNannySetupContext("__get__", 0);

                  /* "pyarrow/table.pxi":5298
 *         72
 *         """
 *         self._assert_cpu()             # <<<<<<<<<<<<<<
 *         cdef:
 *             CResult[int64_t] c_res_buffer
*/
                  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_assert_cpu");
                    __PYX_ERR(17, 5298, __pyx_L1_error)
                  }
                  ((struct __pyx_vtabstruct_7pyarrow_3lib_Table *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._assert_cpu(((struct __pyx_obj_7pyarrow_3lib__Tabular *)__pyx_v_self)); if (unlikely(PyErr_Occurred())) __PYX_ERR(17, 5298, __pyx_L1_error)

                  /* "pyarrow/table.pxi":5302
 *             CResult[int64_t] c_res_buffer
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             c_res_buffer = ReferencedBufferSize(deref(self.table))
 *             size = GetResultValue(c_res_buffer)
*/
                  {
                      PyThreadState * _save;
                      _save = PyEval_SaveThread();
                      __Pyx_FastGIL_Remember();
                      /*try:*/ {

                        /* "pyarrow/table.pxi":5303
 * 
 *         with nogil:
 *             c_res_buffer = ReferencedBufferSize(deref(self.table))             # <<<<<<<<<<<<<<
 *             size = GetResultValue(c_res_buffer)
 *         return size
*/
                        if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "table");
                          __Pyx_PyGILState_Release(__pyx_gilstate_save);
                          __PYX_ERR(17, 5303, __pyx_L4_error)
                        }
                        __pyx_v_c_res_buffer = arrow::util::ReferencedBufferSize((*__pyx_v_self->table));

                        /* "pyarrow/table.pxi":5304
 *         with nogil:
 *             c_res_buffer = ReferencedBufferSize(deref(self.table))
 *             size = GetResultValue(c_res_buffer)             # <<<<<<<<<<<<<<
 *         return size
 * 
*/
                        __pyx_t_1 = arrow::py::GetResultValue<int64_t>(__pyx_v_c_res_buffer); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(17, 5304, __pyx_L4_error)
                        __pyx_v_size = __pyx_t_1;
                      }

                      /* "pyarrow/table.pxi":5302
 *             CResult[int64_t] c_res_buffer
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             c_res_buffer = ReferencedBufferSize(deref(self.table))
 *             size = GetResultValue(c_res_buffer)
*/
                      /*finally:*/ {
                        /*normal exit:*/{
                          __Pyx_FastGIL_Forget();
                          PyEval_RestoreThread(_save);
                          goto __pyx_L5;
                        }
                        __pyx_L4_error: {
                          __Pyx_FastGIL_Forget();
                          PyEval_RestoreThread(_save);
                          goto __pyx_L1_error;
                        }
                        __pyx_L5:;
                      }
                  }

                  /* "pyarrow/table.pxi":5305
 *             c_res_buffer = ReferencedBufferSize(deref(self.table))
 *             size = GetResultValue(c_res_buffer)
 *         return size             # <<<<<<<<<<<<<<
 * 
 *     def get_total_buffer_size(self):
*/
                  __Pyx_XDECREF(__pyx_r);
                  __pyx_t_2 = __Pyx_PyLong_From_int64_t(__pyx_v_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 5305, __pyx_L1_error)
                  __Pyx_GOTREF(__pyx_t_2);
                  __pyx_r = __pyx_t_2;
                  __pyx_t_2 = 0;
                  goto __pyx_L0;

                  /* "pyarrow/table.pxi":5272
 *         return self.table.num_rows()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def nbytes(self):
 *         """
*/

                  /* function exit code */
                  __pyx_L1_error:;
                  __Pyx_XDECREF(__pyx_t_2);
                  __Pyx_AddTraceback("pyarrow.lib.Table.nbytes.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                  __pyx_r = NULL;
                  __pyx_L0:;
                  __Pyx_XGIVEREF(__pyx_r);
                  __Pyx_RefNannyFinishContext();
                  return __pyx_r;
                }

                /* "pyarrow/table.pxi":5307
 *         return size
 * 
 *     def get_total_buffer_size(self):             # <<<<<<<<<<<<<<
 *         """
 *         The sum of bytes in each buffer referenced by the table.
*/

                /* Python wrapper */
                static PyObject *__pyx_pw_7pyarrow_3lib_5Table_43get_total_buffer_size(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_5Table_42get_total_buffer_size, "Table.get_total_buffer_size(self)\n\nThe sum of bytes in each buffer referenced by the table.\n\nAn array may only reference a portion of a buffer.\nThis method will overestimate in this case and return the\nbyte size of the entire buffer.\n\nIf a buffer is referenced multiple times then it will\nonly be counted once.\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> import pandas as pd\n>>> df = pd.DataFrame({'n_legs': [None, 4, 5, None],\n...                    'animals': [\"Flamingo\", \"Horse\", None, \"Centipede\"]})\n>>> table = pa.Table.from_pandas(df)\n>>> table.get_total_buffer_size()\n76");
                static PyMethodDef __pyx_mdef_7pyarrow_3lib_5Table_43get_total_buffer_size = {"get_total_buffer_size", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Table_43get_total_buffer_size, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Table_42get_total_buffer_size};
                static PyObject *__pyx_pw_7pyarrow_3lib_5Table_43get_total_buffer_size(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                  #if !CYTHON_METH_FASTCALL
                  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                  #endif
                  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                  PyObject *__pyx_r = 0;
                  __Pyx_RefNannyDeclarations
                  __Pyx_RefNannySetupContext("get_total_buffer_size (wrapper)", 0);
                  #if !CYTHON_METH_FASTCALL
                  #if CYTHON_ASSUME_SAFE_SIZE
                  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                  #else
                  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                  #endif
                  #endif
                  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("get_total_buffer_size", 1, 0, 0, __pyx_nargs); return NULL; }
                  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                  if (unlikely(__pyx_kwds_len < 0)) return NULL;
                  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("get_total_buffer_size", __pyx_kwds); return NULL;}
                  __pyx_r = __pyx_pf_7pyarrow_3lib_5Table_42get_total_buffer_size(((struct __pyx_obj_7pyarrow_3lib_Table *)__pyx_v_self));

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

                static PyObject *__pyx_pf_7pyarrow_3lib_5Table_42get_total_buffer_size(struct __pyx_obj_7pyarrow_3lib_Table *__pyx_v_self) {
                  int64_t __pyx_v_total_buffer_size;
                  PyObject *__pyx_r = NULL;
                  __Pyx_RefNannyDeclarations
                  PyObject *__pyx_t_1 = NULL;
                  int __pyx_lineno = 0;
                  const char *__pyx_filename = NULL;
                  int __pyx_clineno = 0;
                  __Pyx_RefNannySetupContext("get_total_buffer_size", 0);

                  /* "pyarrow/table.pxi":5328
 *         76
 *         """
 *         self._assert_cpu()             # <<<<<<<<<<<<<<
 *         cdef:
 *             int64_t total_buffer_size
*/
                  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_assert_cpu");
                    __PYX_ERR(17, 5328, __pyx_L1_error)
                  }
                  ((struct __pyx_vtabstruct_7pyarrow_3lib_Table *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._assert_cpu(((struct __pyx_obj_7pyarrow_3lib__Tabular *)__pyx_v_self)); if (unlikely(PyErr_Occurred())) __PYX_ERR(17, 5328, __pyx_L1_error)

                  /* "pyarrow/table.pxi":5332
 *             int64_t total_buffer_size
 * 
 *         total_buffer_size = TotalBufferSize(deref(self.table))             # <<<<<<<<<<<<<<
 *         return total_buffer_size
 * 
*/
                  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "table");
                    __PYX_ERR(17, 5332, __pyx_L1_error)
                  }
                  __pyx_v_total_buffer_size = arrow::util::TotalBufferSize((*__pyx_v_self->table));

                  /* "pyarrow/table.pxi":5333
 * 
 *         total_buffer_size = TotalBufferSize(deref(self.table))
 *         return total_buffer_size             # <<<<<<<<<<<<<<
 * 
 *     def __sizeof__(self):
*/
                  __Pyx_XDECREF(__pyx_r);
                  __pyx_t_1 = __Pyx_PyLong_From_int64_t(__pyx_v_total_buffer_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 5333, __pyx_L1_error)
                  __Pyx_GOTREF(__pyx_t_1);
                  __pyx_r = __pyx_t_1;
                  __pyx_t_1 = 0;
                  goto __pyx_L0;

                  /* "pyarrow/table.pxi":5307
 *         return size
 * 
 *     def get_total_buffer_size(self):             # <<<<<<<<<<<<<<
 *         """
 *         The sum of bytes in each buffer referenced by the table.
*/

                  /* function exit code */
                  __pyx_L1_error:;
                  __Pyx_XDECREF(__pyx_t_1);
                  __Pyx_AddTraceback("pyarrow.lib.Table.get_total_buffer_size", __pyx_clineno, __pyx_lineno, __pyx_filename);
                  __pyx_r = NULL;
                  __pyx_L0:;
                  __Pyx_XGIVEREF(__pyx_r);
                  __Pyx_RefNannyFinishContext();
                  return __pyx_r;
                }

                /* "pyarrow/table.pxi":5335
 *         return total_buffer_size
 * 
 *     def __sizeof__(self):             # <<<<<<<<<<<<<<
 *         return super(Table, self).__sizeof__() + self.nbytes
 * 
*/

                /* Python wrapper */
                static PyObject *__pyx_pw_7pyarrow_3lib_5Table_45__sizeof__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_5Table_44__sizeof__, "Table.__sizeof__(self)");
                static PyMethodDef __pyx_mdef_7pyarrow_3lib_5Table_45__sizeof__ = {"__sizeof__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Table_45__sizeof__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Table_44__sizeof__};
                static PyObject *__pyx_pw_7pyarrow_3lib_5Table_45__sizeof__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                  #if !CYTHON_METH_FASTCALL
                  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                  #endif
                  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                  PyObject *__pyx_r = 0;
                  __Pyx_RefNannyDeclarations
                  __Pyx_RefNannySetupContext("__sizeof__ (wrapper)", 0);
                  #if !CYTHON_METH_FASTCALL
                  #if CYTHON_ASSUME_SAFE_SIZE
                  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                  #else
                  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                  #endif
                  #endif
                  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__sizeof__", 1, 0, 0, __pyx_nargs); return NULL; }
                  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                  if (unlikely(__pyx_kwds_len < 0)) return NULL;
                  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__sizeof__", __pyx_kwds); return NULL;}
                  __pyx_r = __pyx_pf_7pyarrow_3lib_5Table_44__sizeof__(((struct __pyx_obj_7pyarrow_3lib_Table *)__pyx_v_self));

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

                static PyObject *__pyx_pf_7pyarrow_3lib_5Table_44__sizeof__(struct __pyx_obj_7pyarrow_3lib_Table *__pyx_v_self) {
                  PyObject *__pyx_r = NULL;
                  __Pyx_RefNannyDeclarations
                  PyObject *__pyx_t_1 = NULL;
                  PyObject *__pyx_t_2 = NULL;
                  PyObject *__pyx_t_3 = NULL;
                  PyObject *__pyx_t_4 = NULL;
                  size_t __pyx_t_5;
                  int __pyx_lineno = 0;
                  const char *__pyx_filename = NULL;
                  int __pyx_clineno = 0;
                  __Pyx_RefNannySetupContext("__sizeof__", 0);

                  /* "pyarrow/table.pxi":5336
 * 
 *     def __sizeof__(self):
 *         return super(Table, self).__sizeof__() + self.nbytes             # <<<<<<<<<<<<<<
 * 
 *     def add_column(self, int i, field_, column):
*/
                  __Pyx_XDECREF(__pyx_r);
                  __pyx_t_4 = NULL;
                  __pyx_t_5 = 1;
                  {
                    PyObject *__pyx_callargs[3] = {__pyx_t_4, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Table), ((PyObject *)__pyx_v_self)};
                    __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_super, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                    if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 5336, __pyx_L1_error)
                    __Pyx_GOTREF(__pyx_t_3);
                  }
                  __pyx_t_2 = __pyx_t_3;
                  __Pyx_INCREF(__pyx_t_2);
                  __pyx_t_5 = 0;
                  {
                    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
                    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_sizeof, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                    if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 5336, __pyx_L1_error)
                    __Pyx_GOTREF(__pyx_t_1);
                  }
                  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_nbytes); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 5336, __pyx_L1_error)
                  __Pyx_GOTREF(__pyx_t_3);
                  __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 5336, __pyx_L1_error)
                  __Pyx_GOTREF(__pyx_t_2);
                  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __pyx_r = __pyx_t_2;
                  __pyx_t_2 = 0;
                  goto __pyx_L0;

                  /* "pyarrow/table.pxi":5335
 *         return total_buffer_size
 * 
 *     def __sizeof__(self):             # <<<<<<<<<<<<<<
 *         return super(Table, self).__sizeof__() + self.nbytes
 * 
*/

                  /* function exit code */
                  __pyx_L1_error:;
                  __Pyx_XDECREF(__pyx_t_1);
                  __Pyx_XDECREF(__pyx_t_2);
                  __Pyx_XDECREF(__pyx_t_3);
                  __Pyx_XDECREF(__pyx_t_4);
                  __Pyx_AddTraceback("pyarrow.lib.Table.__sizeof__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                  __pyx_r = NULL;
                  __pyx_L0:;
                  __Pyx_XGIVEREF(__pyx_r);
                  __Pyx_RefNannyFinishContext();
                  return __pyx_r;
                }

                /* "pyarrow/table.pxi":5338
 *         return super(Table, self).__sizeof__() + self.nbytes
 * 
 *     def add_column(self, int i, field_, column):             # <<<<<<<<<<<<<<
 *         """
 *         Add column to Table at position.
*/

                /* Python wrapper */
                static PyObject *__pyx_pw_7pyarrow_3lib_5Table_47add_column(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_5Table_46add_column, "Table.add_column(self, int i, field_, column)\n\nAdd column to Table at position.\n\nA new table is returned with the column added, the original table\nobject is left unchanged.\n\nParameters\n----------\ni : int\n    Index to place the column at.\nfield_ : str or Field\n    If a string is passed then the type is deduced from the column\n    data.\ncolumn : Array, list of Array, or values coercible to arrays\n    Column data.\n\nReturns\n-------\nTable\n    New table with the passed column added.\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> import pandas as pd\n>>> df = pd.DataFrame({'n_legs': [2, 4, 5, 100],\n...                    'animals': [\"Flamingo\", \"Horse\", \"Brittle stars\", \"Centipede\"]})\n>>> table = pa.Table.from_pandas(df)\n\nAdd column:\n\n>>> year = [2021, 2022, 2019, 2021]\n>>> table.add_column(0,\"year\", [year])\npyarrow.Table\nyear: int64\nn_legs: int64\nanimals: string\n----\nyear: [[2021,2022,2019,2021]]\nn_legs: [[2,4,5,100]]\nanimals: [[\"Flamingo\",\"Horse\",\"Brittle stars\",\"Centipede\"]]\n\nOriginal table is left unchanged:\n\n>>> table\npyarrow.Table\nn_legs: int64\nanimals: string\n----\nn_legs: [[2,4,5,100]]\nanimals: [[\"Flamingo\",\"Horse\",\"Brittle stars\",\"Centipede\"]]");
                static PyMethodDef __pyx_mdef_7pyarrow_3lib_5Table_47add_column = {"add_column", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Table_47add_column, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Table_46add_column};
                static PyObject *__pyx_pw_7pyarrow_3lib_5Table_47add_column(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                  int __pyx_v_i;
                  PyObject *__pyx_v_field_ = 0;
                  PyObject *__pyx_v_column = 0;
                  #if !CYTHON_METH_FASTCALL
                  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                  #endif
                  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                  PyObject* values[3] = {0,0,0};
                  int __pyx_lineno = 0;
                  const char *__pyx_filename = NULL;
                  int __pyx_clineno = 0;
                  PyObject *__pyx_r = 0;
                  __Pyx_RefNannyDeclarations
                  __Pyx_RefNannySetupContext("add_column (wrapper)", 0);
                  #if !CYTHON_METH_FASTCALL
                  #if CYTHON_ASSUME_SAFE_SIZE
                  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                  #else
                  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                  #endif
                  #endif
                  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                  {
                    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_i,&__pyx_mstate_global->__pyx_n_u_field_3,&__pyx_mstate_global->__pyx_n_u_column,0};
                    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(17, 5338, __pyx_L3_error)
                    if (__pyx_kwds_len > 0) {
                      switch (__pyx_nargs) {
                        case  3:
                        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
                        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(17, 5338, __pyx_L3_error)
                        CYTHON_FALLTHROUGH;
                        case  2:
                        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(17, 5338, __pyx_L3_error)
                        CYTHON_FALLTHROUGH;
                        case  1:
                        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 5338, __pyx_L3_error)
                        CYTHON_FALLTHROUGH;
                        case  0: break;
                        default: goto __pyx_L5_argtuple_error;
                      }
                      const Py_ssize_t kwd_pos_args = __pyx_nargs;
                      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "add_column", 0) < (0)) __PYX_ERR(17, 5338, __pyx_L3_error)
                      for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
                        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("add_column", 1, 3, 3, i); __PYX_ERR(17, 5338, __pyx_L3_error) }
                      }
                    } else if (unlikely(__pyx_nargs != 3)) {
                      goto __pyx_L5_argtuple_error;
                    } else {
                      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 5338, __pyx_L3_error)
                      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(17, 5338, __pyx_L3_error)
                      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
                      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(17, 5338, __pyx_L3_error)
                    }
                    __pyx_v_i = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_i == (int)-1) && PyErr_Occurred())) __PYX_ERR(17, 5338, __pyx_L3_error)
                    __pyx_v_field_ = values[1];
                    __pyx_v_column = values[2];
                  }
                  goto __pyx_L6_skip;
                  __pyx_L5_argtuple_error:;
                  __Pyx_RaiseArgtupleInvalid("add_column", 1, 3, 3, __pyx_nargs); __PYX_ERR(17, 5338, __pyx_L3_error)
                  __pyx_L6_skip:;
                  goto __pyx_L4_argument_unpacking_done;
                  __pyx_L3_error:;
                  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                    Py_XDECREF(values[__pyx_temp]);
                  }
                  __Pyx_AddTraceback("pyarrow.lib.Table.add_column", __pyx_clineno, __pyx_lineno, __pyx_filename);
                  __Pyx_RefNannyFinishContext();
                  return NULL;
                  __pyx_L4_argument_unpacking_done:;
                  __pyx_r = __pyx_pf_7pyarrow_3lib_5Table_46add_column(((struct __pyx_obj_7pyarrow_3lib_Table *)__pyx_v_self), __pyx_v_i, __pyx_v_field_, __pyx_v_column);

                  /* function exit code */
                  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                    Py_XDECREF(values[__pyx_temp]);
                  }
                  __Pyx_RefNannyFinishContext();
                  return __pyx_r;
                }

                static PyObject *__pyx_pf_7pyarrow_3lib_5Table_46add_column(struct __pyx_obj_7pyarrow_3lib_Table *__pyx_v_self, int __pyx_v_i, PyObject *__pyx_v_field_, PyObject *__pyx_v_column) {
                  std::shared_ptr< arrow::Table>  __pyx_v_c_table;
                  struct __pyx_obj_7pyarrow_3lib_Field *__pyx_v_c_field = 0;
                  struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_c_arr = 0;
                  PyObject *__pyx_r = NULL;
                  __Pyx_RefNannyDeclarations
                  int __pyx_t_1;
                  PyObject *__pyx_t_2 = NULL;
                  PyObject *__pyx_t_3 = NULL;
                  PyObject *__pyx_t_4 = NULL;
                  size_t __pyx_t_5;
                  PyObject *__pyx_t_6 = NULL;
                  std::shared_ptr< arrow::Table>  __pyx_t_7;
                  int __pyx_lineno = 0;
                  const char *__pyx_filename = NULL;
                  int __pyx_clineno = 0;
                  __Pyx_RefNannySetupContext("add_column", 0);

                  /* "pyarrow/table.pxi":5396
 *             ChunkedArray c_arr
 * 
 *         if isinstance(column, ChunkedArray):             # <<<<<<<<<<<<<<
 *             c_arr = column
 *         else:
*/
                  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_column, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ChunkedArray); 
                  if (__pyx_t_1) {

                    /* "pyarrow/table.pxi":5397
 * 
 *         if isinstance(column, ChunkedArray):
 *             c_arr = column             # <<<<<<<<<<<<<<
 *         else:
 *             c_arr = chunked_array(column)
*/
                    __pyx_t_2 = __pyx_v_column;
                    __Pyx_INCREF(__pyx_t_2);
                    if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ChunkedArray))))) __PYX_ERR(17, 5397, __pyx_L1_error)
                    __pyx_v_c_arr = ((struct __pyx_obj_7pyarrow_3lib_ChunkedArray *)__pyx_t_2);
                    __pyx_t_2 = 0;

                    /* "pyarrow/table.pxi":5396
 *             ChunkedArray c_arr
 * 
 *         if isinstance(column, ChunkedArray):             # <<<<<<<<<<<<<<
 *             c_arr = column
 *         else:
*/
                    goto __pyx_L3;
                  }

                  /* "pyarrow/table.pxi":5399
 *             c_arr = column
 *         else:
 *             c_arr = chunked_array(column)             # <<<<<<<<<<<<<<
 * 
 *         if isinstance(field_, Field):
*/
                  /*else*/ {
                    __pyx_t_3 = NULL;
                    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_chunked_array); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 5399, __pyx_L1_error)
                    __Pyx_GOTREF(__pyx_t_4);
                    __pyx_t_5 = 1;
                    #if CYTHON_UNPACK_METHODS
                    if (unlikely(PyMethod_Check(__pyx_t_4))) {
                      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
                      assert(__pyx_t_3);
                      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
                      __Pyx_INCREF(__pyx_t_3);
                      __Pyx_INCREF(__pyx__function);
                      __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
                      __pyx_t_5 = 0;
                    }
                    #endif
                    {
                      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_column};
                      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                      if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 5399, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_2);
                    }
                    if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ChunkedArray))))) __PYX_ERR(17, 5399, __pyx_L1_error)
                    __pyx_v_c_arr = ((struct __pyx_obj_7pyarrow_3lib_ChunkedArray *)__pyx_t_2);
                    __pyx_t_2 = 0;
                  }
                  __pyx_L3:;

                  /* "pyarrow/table.pxi":5401
 *             c_arr = chunked_array(column)
 * 
 *         if isinstance(field_, Field):             # <<<<<<<<<<<<<<
 *             c_field = field_
 *         else:
*/
                  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_field_, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Field); 
                  if (__pyx_t_1) {

                    /* "pyarrow/table.pxi":5402
 * 
 *         if isinstance(field_, Field):
 *             c_field = field_             # <<<<<<<<<<<<<<
 *         else:
 *             c_field = field(field_, c_arr.type)
*/
                    __pyx_t_2 = __pyx_v_field_;
                    __Pyx_INCREF(__pyx_t_2);
                    if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Field))))) __PYX_ERR(17, 5402, __pyx_L1_error)
                    __pyx_v_c_field = ((struct __pyx_obj_7pyarrow_3lib_Field *)__pyx_t_2);
                    __pyx_t_2 = 0;

                    /* "pyarrow/table.pxi":5401
 *             c_arr = chunked_array(column)
 * 
 *         if isinstance(field_, Field):             # <<<<<<<<<<<<<<
 *             c_field = field_
 *         else:
*/
                    goto __pyx_L4;
                  }

                  /* "pyarrow/table.pxi":5404
 *             c_field = field_
 *         else:
 *             c_field = field(field_, c_arr.type)             # <<<<<<<<<<<<<<
 * 
 *         with nogil:
*/
                  /*else*/ {
                    __pyx_t_4 = NULL;
                    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_field); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 5404, __pyx_L1_error)
                    __Pyx_GOTREF(__pyx_t_3);
                    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_c_arr), __pyx_mstate_global->__pyx_n_u_type); if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 5404, __pyx_L1_error)
                    __Pyx_GOTREF(__pyx_t_6);
                    __pyx_t_5 = 1;
                    #if CYTHON_UNPACK_METHODS
                    if (unlikely(PyMethod_Check(__pyx_t_3))) {
                      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
                      assert(__pyx_t_4);
                      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
                      __Pyx_INCREF(__pyx_t_4);
                      __Pyx_INCREF(__pyx__function);
                      __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
                      __pyx_t_5 = 0;
                    }
                    #endif
                    {
                      PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_v_field_, __pyx_t_6};
                      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                      if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 5404, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_2);
                    }
                    if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Field))))) __PYX_ERR(17, 5404, __pyx_L1_error)
                    __pyx_v_c_field = ((struct __pyx_obj_7pyarrow_3lib_Field *)__pyx_t_2);
                    __pyx_t_2 = 0;
                  }
                  __pyx_L4:;

                  /* "pyarrow/table.pxi":5406
 *             c_field = field(field_, c_arr.type)
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             c_table = GetResultValue(self.table.AddColumn(
 *                 i, c_field.sp_field, c_arr.sp_chunked_array))
*/
                  {
                      PyThreadState * _save;
                      _save = PyEval_SaveThread();
                      __Pyx_FastGIL_Remember();
                      /*try:*/ {

                        /* "pyarrow/table.pxi":5407
 * 
 *         with nogil:
 *             c_table = GetResultValue(self.table.AddColumn(             # <<<<<<<<<<<<<<
 *                 i, c_field.sp_field, c_arr.sp_chunked_array))
 * 
*/
                        if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "table");
                          __Pyx_PyGILState_Release(__pyx_gilstate_save);
                          __PYX_ERR(17, 5407, __pyx_L6_error)
                        }

                        /* "pyarrow/table.pxi":5408
 *         with nogil:
 *             c_table = GetResultValue(self.table.AddColumn(
 *                 i, c_field.sp_field, c_arr.sp_chunked_array))             # <<<<<<<<<<<<<<
 * 
 *         return pyarrow_wrap_table(c_table)
*/
                        if (unlikely(((PyObject *)__pyx_v_c_field) == Py_None)) {
                          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_field");
                          __Pyx_PyGILState_Release(__pyx_gilstate_save);
                          __PYX_ERR(17, 5408, __pyx_L6_error)
                        }
                        if (unlikely(((PyObject *)__pyx_v_c_arr) == Py_None)) {
                          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_chunked_array");
                          __Pyx_PyGILState_Release(__pyx_gilstate_save);
                          __PYX_ERR(17, 5408, __pyx_L6_error)
                        }

                        /* "pyarrow/table.pxi":5407
 * 
 *         with nogil:
 *             c_table = GetResultValue(self.table.AddColumn(             # <<<<<<<<<<<<<<
 *                 i, c_field.sp_field, c_arr.sp_chunked_array))
 * 
*/
                        __pyx_t_7 = arrow::py::GetResultValue<std::shared_ptr< arrow::Table> >(__pyx_v_self->table->AddColumn(__pyx_v_i, __pyx_v_c_field->sp_field, __pyx_v_c_arr->sp_chunked_array)); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(17, 5407, __pyx_L6_error)
                        __pyx_v_c_table = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_7);
                      }

                      /* "pyarrow/table.pxi":5406
 *             c_field = field(field_, c_arr.type)
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             c_table = GetResultValue(self.table.AddColumn(
 *                 i, c_field.sp_field, c_arr.sp_chunked_array))
*/
                      /*finally:*/ {
                        /*normal exit:*/{
                          __Pyx_FastGIL_Forget();
                          PyEval_RestoreThread(_save);
                          goto __pyx_L7;
                        }
                        __pyx_L6_error: {
                          __Pyx_FastGIL_Forget();
                          PyEval_RestoreThread(_save);
                          goto __pyx_L1_error;
                        }
                        __pyx_L7:;
                      }
                  }

                  /* "pyarrow/table.pxi":5410
 *                 i, c_field.sp_field, c_arr.sp_chunked_array))
 * 
 *         return pyarrow_wrap_table(c_table)             # <<<<<<<<<<<<<<
 * 
 *     def remove_column(self, int i):
*/
                  __Pyx_XDECREF(__pyx_r);
                  __pyx_t_2 = pyarrow_wrap_table(__pyx_v_c_table); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 5410, __pyx_L1_error)
                  __Pyx_GOTREF(__pyx_t_2);
                  __pyx_r = __pyx_t_2;
                  __pyx_t_2 = 0;
                  goto __pyx_L0;

                  /* "pyarrow/table.pxi":5338
 *         return super(Table, self).__sizeof__() + self.nbytes
 * 
 *     def add_column(self, int i, field_, column):             # <<<<<<<<<<<<<<
 *         """
 *         Add column to Table at position.
*/

                  /* function exit code */
                  __pyx_L1_error:;
                  __Pyx_XDECREF(__pyx_t_2);
                  __Pyx_XDECREF(__pyx_t_3);
                  __Pyx_XDECREF(__pyx_t_4);
                  __Pyx_XDECREF(__pyx_t_6);
                  __Pyx_AddTraceback("pyarrow.lib.Table.add_column", __pyx_clineno, __pyx_lineno, __pyx_filename);
                  __pyx_r = NULL;
                  __pyx_L0:;
                  __Pyx_XDECREF((PyObject *)__pyx_v_c_field);
                  __Pyx_XDECREF((PyObject *)__pyx_v_c_arr);
                  __Pyx_XGIVEREF(__pyx_r);
                  __Pyx_RefNannyFinishContext();
                  return __pyx_r;
                }

                /* "pyarrow/table.pxi":5412
 *         return pyarrow_wrap_table(c_table)
 * 
 *     def remove_column(self, int i):             # <<<<<<<<<<<<<<
 *         """
 *         Create new Table with the indicated column removed.
*/

                /* Python wrapper */
                static PyObject *__pyx_pw_7pyarrow_3lib_5Table_49remove_column(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_5Table_48remove_column, "Table.remove_column(self, int i)\n\nCreate new Table with the indicated column removed.\n\nParameters\n----------\ni : int\n    Index of column to remove.\n\nReturns\n-------\nTable\n    New table without the column.\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> import pandas as pd\n>>> df = pd.DataFrame({'n_legs': [2, 4, 5, 100],\n...                    'animals': [\"Flamingo\", \"Horse\", \"Brittle stars\", \"Centipede\"]})\n>>> table = pa.Table.from_pandas(df)\n>>> table.remove_column(1)\npyarrow.Table\nn_legs: int64\n----\nn_legs: [[2,4,5,100]]");
                static PyMethodDef __pyx_mdef_7pyarrow_3lib_5Table_49remove_column = {"remove_column", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Table_49remove_column, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Table_48remove_column};
                static PyObject *__pyx_pw_7pyarrow_3lib_5Table_49remove_column(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                  int __pyx_v_i;
                  #if !CYTHON_METH_FASTCALL
                  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                  #endif
                  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                  PyObject* values[1] = {0};
                  int __pyx_lineno = 0;
                  const char *__pyx_filename = NULL;
                  int __pyx_clineno = 0;
                  PyObject *__pyx_r = 0;
                  __Pyx_RefNannyDeclarations
                  __Pyx_RefNannySetupContext("remove_column (wrapper)", 0);
                  #if !CYTHON_METH_FASTCALL
                  #if CYTHON_ASSUME_SAFE_SIZE
                  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                  #else
                  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                  #endif
                  #endif
                  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                  {
                    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_i,0};
                    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(17, 5412, __pyx_L3_error)
                    if (__pyx_kwds_len > 0) {
                      switch (__pyx_nargs) {
                        case  1:
                        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 5412, __pyx_L3_error)
                        CYTHON_FALLTHROUGH;
                        case  0: break;
                        default: goto __pyx_L5_argtuple_error;
                      }
                      const Py_ssize_t kwd_pos_args = __pyx_nargs;
                      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "remove_column", 0) < (0)) __PYX_ERR(17, 5412, __pyx_L3_error)
                      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("remove_column", 1, 1, 1, i); __PYX_ERR(17, 5412, __pyx_L3_error) }
                      }
                    } else if (unlikely(__pyx_nargs != 1)) {
                      goto __pyx_L5_argtuple_error;
                    } else {
                      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 5412, __pyx_L3_error)
                    }
                    __pyx_v_i = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_i == (int)-1) && PyErr_Occurred())) __PYX_ERR(17, 5412, __pyx_L3_error)
                  }
                  goto __pyx_L6_skip;
                  __pyx_L5_argtuple_error:;
                  __Pyx_RaiseArgtupleInvalid("remove_column", 1, 1, 1, __pyx_nargs); __PYX_ERR(17, 5412, __pyx_L3_error)
                  __pyx_L6_skip:;
                  goto __pyx_L4_argument_unpacking_done;
                  __pyx_L3_error:;
                  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                    Py_XDECREF(values[__pyx_temp]);
                  }
                  __Pyx_AddTraceback("pyarrow.lib.Table.remove_column", __pyx_clineno, __pyx_lineno, __pyx_filename);
                  __Pyx_RefNannyFinishContext();
                  return NULL;
                  __pyx_L4_argument_unpacking_done:;
                  __pyx_r = __pyx_pf_7pyarrow_3lib_5Table_48remove_column(((struct __pyx_obj_7pyarrow_3lib_Table *)__pyx_v_self), __pyx_v_i);

                  /* function exit code */
                  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                    Py_XDECREF(values[__pyx_temp]);
                  }
                  __Pyx_RefNannyFinishContext();
                  return __pyx_r;
                }

                static PyObject *__pyx_pf_7pyarrow_3lib_5Table_48remove_column(struct __pyx_obj_7pyarrow_3lib_Table *__pyx_v_self, int __pyx_v_i) {
                  std::shared_ptr< arrow::Table>  __pyx_v_c_table;
                  PyObject *__pyx_r = NULL;
                  __Pyx_RefNannyDeclarations
                  std::shared_ptr< arrow::Table>  __pyx_t_1;
                  PyObject *__pyx_t_2 = NULL;
                  int __pyx_lineno = 0;
                  const char *__pyx_filename = NULL;
                  int __pyx_clineno = 0;
                  __Pyx_RefNannySetupContext("remove_column", 0);

                  /* "pyarrow/table.pxi":5441
 *         cdef shared_ptr[CTable] c_table
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             c_table = GetResultValue(self.table.RemoveColumn(i))
 * 
*/
                  {
                      PyThreadState * _save;
                      _save = PyEval_SaveThread();
                      __Pyx_FastGIL_Remember();
                      /*try:*/ {

                        /* "pyarrow/table.pxi":5442
 * 
 *         with nogil:
 *             c_table = GetResultValue(self.table.RemoveColumn(i))             # <<<<<<<<<<<<<<
 * 
 *         return pyarrow_wrap_table(c_table)
*/
                        if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "table");
                          __Pyx_PyGILState_Release(__pyx_gilstate_save);
                          __PYX_ERR(17, 5442, __pyx_L4_error)
                        }
                        __pyx_t_1 = arrow::py::GetResultValue<std::shared_ptr< arrow::Table> >(__pyx_v_self->table->RemoveColumn(__pyx_v_i)); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(17, 5442, __pyx_L4_error)
                        __pyx_v_c_table = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_1);
                      }

                      /* "pyarrow/table.pxi":5441
 *         cdef shared_ptr[CTable] c_table
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             c_table = GetResultValue(self.table.RemoveColumn(i))
 * 
*/
                      /*finally:*/ {
                        /*normal exit:*/{
                          __Pyx_FastGIL_Forget();
                          PyEval_RestoreThread(_save);
                          goto __pyx_L5;
                        }
                        __pyx_L4_error: {
                          __Pyx_FastGIL_Forget();
                          PyEval_RestoreThread(_save);
                          goto __pyx_L1_error;
                        }
                        __pyx_L5:;
                      }
                  }

                  /* "pyarrow/table.pxi":5444
 *             c_table = GetResultValue(self.table.RemoveColumn(i))
 * 
 *         return pyarrow_wrap_table(c_table)             # <<<<<<<<<<<<<<
 * 
 *     def set_column(self, int i, field_, column):
*/
                  __Pyx_XDECREF(__pyx_r);
                  __pyx_t_2 = pyarrow_wrap_table(__pyx_v_c_table); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 5444, __pyx_L1_error)
                  __Pyx_GOTREF(__pyx_t_2);
                  __pyx_r = __pyx_t_2;
                  __pyx_t_2 = 0;
                  goto __pyx_L0;

                  /* "pyarrow/table.pxi":5412
 *         return pyarrow_wrap_table(c_table)
 * 
 *     def remove_column(self, int i):             # <<<<<<<<<<<<<<
 *         """
 *         Create new Table with the indicated column removed.
*/

                  /* function exit code */
                  __pyx_L1_error:;
                  __Pyx_XDECREF(__pyx_t_2);
                  __Pyx_AddTraceback("pyarrow.lib.Table.remove_column", __pyx_clineno, __pyx_lineno, __pyx_filename);
                  __pyx_r = NULL;
                  __pyx_L0:;
                  __Pyx_XGIVEREF(__pyx_r);
                  __Pyx_RefNannyFinishContext();
                  return __pyx_r;
                }

                /* "pyarrow/table.pxi":5446
 *         return pyarrow_wrap_table(c_table)
 * 
 *     def set_column(self, int i, field_, column):             # <<<<<<<<<<<<<<
 *         """
 *         Replace column in Table at position.
*/

                /* Python wrapper */
                static PyObject *__pyx_pw_7pyarrow_3lib_5Table_51set_column(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_5Table_50set_column, "Table.set_column(self, int i, field_, column)\n\nReplace column in Table at position.\n\nParameters\n----------\ni : int\n    Index to place the column at.\nfield_ : str or Field\n    If a string is passed then the type is deduced from the column\n    data.\ncolumn : Array, list of Array, or values coercible to arrays\n    Column data.\n\nReturns\n-------\nTable\n    New table with the passed column set.\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> import pandas as pd\n>>> df = pd.DataFrame({'n_legs': [2, 4, 5, 100],\n...                    'animals': [\"Flamingo\", \"Horse\", \"Brittle stars\", \"Centipede\"]})\n>>> table = pa.Table.from_pandas(df)\n\nReplace a column:\n\n>>> year = [2021, 2022, 2019, 2021]\n>>> table.set_column(1,'year', [year])\npyarrow.Table\nn_legs: int64\nyear: int64\n----\nn_legs: [[2,4,5,100]]\nyear: [[2021,2022,2019,2021]]");
                static PyMethodDef __pyx_mdef_7pyarrow_3lib_5Table_51set_column = {"set_column", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Table_51set_column, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Table_50set_column};
                static PyObject *__pyx_pw_7pyarrow_3lib_5Table_51set_column(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                  int __pyx_v_i;
                  PyObject *__pyx_v_field_ = 0;
                  PyObject *__pyx_v_column = 0;
                  #if !CYTHON_METH_FASTCALL
                  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                  #endif
                  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                  PyObject* values[3] = {0,0,0};
                  int __pyx_lineno = 0;
                  const char *__pyx_filename = NULL;
                  int __pyx_clineno = 0;
                  PyObject *__pyx_r = 0;
                  __Pyx_RefNannyDeclarations
                  __Pyx_RefNannySetupContext("set_column (wrapper)", 0);
                  #if !CYTHON_METH_FASTCALL
                  #if CYTHON_ASSUME_SAFE_SIZE
                  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                  #else
                  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                  #endif
                  #endif
                  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                  {
                    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_i,&__pyx_mstate_global->__pyx_n_u_field_3,&__pyx_mstate_global->__pyx_n_u_column,0};
                    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(17, 5446, __pyx_L3_error)
                    if (__pyx_kwds_len > 0) {
                      switch (__pyx_nargs) {
                        case  3:
                        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
                        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(17, 5446, __pyx_L3_error)
                        CYTHON_FALLTHROUGH;
                        case  2:
                        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(17, 5446, __pyx_L3_error)
                        CYTHON_FALLTHROUGH;
                        case  1:
                        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 5446, __pyx_L3_error)
                        CYTHON_FALLTHROUGH;
                        case  0: break;
                        default: goto __pyx_L5_argtuple_error;
                      }
                      const Py_ssize_t kwd_pos_args = __pyx_nargs;
                      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "set_column", 0) < (0)) __PYX_ERR(17, 5446, __pyx_L3_error)
                      for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
                        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("set_column", 1, 3, 3, i); __PYX_ERR(17, 5446, __pyx_L3_error) }
                      }
                    } else if (unlikely(__pyx_nargs != 3)) {
                      goto __pyx_L5_argtuple_error;
                    } else {
                      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 5446, __pyx_L3_error)
                      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(17, 5446, __pyx_L3_error)
                      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
                      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(17, 5446, __pyx_L3_error)
                    }
                    __pyx_v_i = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_i == (int)-1) && PyErr_Occurred())) __PYX_ERR(17, 5446, __pyx_L3_error)
                    __pyx_v_field_ = values[1];
                    __pyx_v_column = values[2];
                  }
                  goto __pyx_L6_skip;
                  __pyx_L5_argtuple_error:;
                  __Pyx_RaiseArgtupleInvalid("set_column", 1, 3, 3, __pyx_nargs); __PYX_ERR(17, 5446, __pyx_L3_error)
                  __pyx_L6_skip:;
                  goto __pyx_L4_argument_unpacking_done;
                  __pyx_L3_error:;
                  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                    Py_XDECREF(values[__pyx_temp]);
                  }
                  __Pyx_AddTraceback("pyarrow.lib.Table.set_column", __pyx_clineno, __pyx_lineno, __pyx_filename);
                  __Pyx_RefNannyFinishContext();
                  return NULL;
                  __pyx_L4_argument_unpacking_done:;
                  __pyx_r = __pyx_pf_7pyarrow_3lib_5Table_50set_column(((struct __pyx_obj_7pyarrow_3lib_Table *)__pyx_v_self), __pyx_v_i, __pyx_v_field_, __pyx_v_column);

                  /* function exit code */
                  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                    Py_XDECREF(values[__pyx_temp]);
                  }
                  __Pyx_RefNannyFinishContext();
                  return __pyx_r;
                }

                static PyObject *__pyx_pf_7pyarrow_3lib_5Table_50set_column(struct __pyx_obj_7pyarrow_3lib_Table *__pyx_v_self, int __pyx_v_i, PyObject *__pyx_v_field_, PyObject *__pyx_v_column) {
                  std::shared_ptr< arrow::Table>  __pyx_v_c_table;
                  struct __pyx_obj_7pyarrow_3lib_Field *__pyx_v_c_field = 0;
                  struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_c_arr = 0;
                  PyObject *__pyx_r = NULL;
                  __Pyx_RefNannyDeclarations
                  int __pyx_t_1;
                  PyObject *__pyx_t_2 = NULL;
                  PyObject *__pyx_t_3 = NULL;
                  PyObject *__pyx_t_4 = NULL;
                  size_t __pyx_t_5;
                  PyObject *__pyx_t_6 = NULL;
                  std::shared_ptr< arrow::Table>  __pyx_t_7;
                  int __pyx_lineno = 0;
                  const char *__pyx_filename = NULL;
                  int __pyx_clineno = 0;
                  __Pyx_RefNannySetupContext("set_column", 0);

                  /* "pyarrow/table.pxi":5489
 *             ChunkedArray c_arr
 * 
 *         if isinstance(column, ChunkedArray):             # <<<<<<<<<<<<<<
 *             c_arr = column
 *         else:
*/
                  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_column, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ChunkedArray); 
                  if (__pyx_t_1) {

                    /* "pyarrow/table.pxi":5490
 * 
 *         if isinstance(column, ChunkedArray):
 *             c_arr = column             # <<<<<<<<<<<<<<
 *         else:
 *             c_arr = chunked_array(column)
*/
                    __pyx_t_2 = __pyx_v_column;
                    __Pyx_INCREF(__pyx_t_2);
                    if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ChunkedArray))))) __PYX_ERR(17, 5490, __pyx_L1_error)
                    __pyx_v_c_arr = ((struct __pyx_obj_7pyarrow_3lib_ChunkedArray *)__pyx_t_2);
                    __pyx_t_2 = 0;

                    /* "pyarrow/table.pxi":5489
 *             ChunkedArray c_arr
 * 
 *         if isinstance(column, ChunkedArray):             # <<<<<<<<<<<<<<
 *             c_arr = column
 *         else:
*/
                    goto __pyx_L3;
                  }

                  /* "pyarrow/table.pxi":5492
 *             c_arr = column
 *         else:
 *             c_arr = chunked_array(column)             # <<<<<<<<<<<<<<
 * 
 *         if isinstance(field_, Field):
*/
                  /*else*/ {
                    __pyx_t_3 = NULL;
                    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_chunked_array); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 5492, __pyx_L1_error)
                    __Pyx_GOTREF(__pyx_t_4);
                    __pyx_t_5 = 1;
                    #if CYTHON_UNPACK_METHODS
                    if (unlikely(PyMethod_Check(__pyx_t_4))) {
                      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
                      assert(__pyx_t_3);
                      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
                      __Pyx_INCREF(__pyx_t_3);
                      __Pyx_INCREF(__pyx__function);
                      __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
                      __pyx_t_5 = 0;
                    }
                    #endif
                    {
                      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_column};
                      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                      if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 5492, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_2);
                    }
                    if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ChunkedArray))))) __PYX_ERR(17, 5492, __pyx_L1_error)
                    __pyx_v_c_arr = ((struct __pyx_obj_7pyarrow_3lib_ChunkedArray *)__pyx_t_2);
                    __pyx_t_2 = 0;
                  }
                  __pyx_L3:;

                  /* "pyarrow/table.pxi":5494
 *             c_arr = chunked_array(column)
 * 
 *         if isinstance(field_, Field):             # <<<<<<<<<<<<<<
 *             c_field = field_
 *         else:
*/
                  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_field_, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Field); 
                  if (__pyx_t_1) {

                    /* "pyarrow/table.pxi":5495
 * 
 *         if isinstance(field_, Field):
 *             c_field = field_             # <<<<<<<<<<<<<<
 *         else:
 *             c_field = field(field_, c_arr.type)
*/
                    __pyx_t_2 = __pyx_v_field_;
                    __Pyx_INCREF(__pyx_t_2);
                    if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Field))))) __PYX_ERR(17, 5495, __pyx_L1_error)
                    __pyx_v_c_field = ((struct __pyx_obj_7pyarrow_3lib_Field *)__pyx_t_2);
                    __pyx_t_2 = 0;

                    /* "pyarrow/table.pxi":5494
 *             c_arr = chunked_array(column)
 * 
 *         if isinstance(field_, Field):             # <<<<<<<<<<<<<<
 *             c_field = field_
 *         else:
*/
                    goto __pyx_L4;
                  }

                  /* "pyarrow/table.pxi":5497
 *             c_field = field_
 *         else:
 *             c_field = field(field_, c_arr.type)             # <<<<<<<<<<<<<<
 * 
 *         with nogil:
*/
                  /*else*/ {
                    __pyx_t_4 = NULL;
                    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_field); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 5497, __pyx_L1_error)
                    __Pyx_GOTREF(__pyx_t_3);
                    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_c_arr), __pyx_mstate_global->__pyx_n_u_type); if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 5497, __pyx_L1_error)
                    __Pyx_GOTREF(__pyx_t_6);
                    __pyx_t_5 = 1;
                    #if CYTHON_UNPACK_METHODS
                    if (unlikely(PyMethod_Check(__pyx_t_3))) {
                      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
                      assert(__pyx_t_4);
                      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
                      __Pyx_INCREF(__pyx_t_4);
                      __Pyx_INCREF(__pyx__function);
                      __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
                      __pyx_t_5 = 0;
                    }
                    #endif
                    {
                      PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_v_field_, __pyx_t_6};
                      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                      if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 5497, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_2);
                    }
                    if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Field))))) __PYX_ERR(17, 5497, __pyx_L1_error)
                    __pyx_v_c_field = ((struct __pyx_obj_7pyarrow_3lib_Field *)__pyx_t_2);
                    __pyx_t_2 = 0;
                  }
                  __pyx_L4:;

                  /* "pyarrow/table.pxi":5499
 *             c_field = field(field_, c_arr.type)
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             c_table = GetResultValue(self.table.SetColumn(
 *                 i, c_field.sp_field, c_arr.sp_chunked_array))
*/
                  {
                      PyThreadState * _save;
                      _save = PyEval_SaveThread();
                      __Pyx_FastGIL_Remember();
                      /*try:*/ {

                        /* "pyarrow/table.pxi":5500
 * 
 *         with nogil:
 *             c_table = GetResultValue(self.table.SetColumn(             # <<<<<<<<<<<<<<
 *                 i, c_field.sp_field, c_arr.sp_chunked_array))
 * 
*/
                        if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "table");
                          __Pyx_PyGILState_Release(__pyx_gilstate_save);
                          __PYX_ERR(17, 5500, __pyx_L6_error)
                        }

                        /* "pyarrow/table.pxi":5501
 *         with nogil:
 *             c_table = GetResultValue(self.table.SetColumn(
 *                 i, c_field.sp_field, c_arr.sp_chunked_array))             # <<<<<<<<<<<<<<
 * 
 *         return pyarrow_wrap_table(c_table)
*/
                        if (unlikely(((PyObject *)__pyx_v_c_field) == Py_None)) {
                          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_field");
                          __Pyx_PyGILState_Release(__pyx_gilstate_save);
                          __PYX_ERR(17, 5501, __pyx_L6_error)
                        }
                        if (unlikely(((PyObject *)__pyx_v_c_arr) == Py_None)) {
                          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_chunked_array");
                          __Pyx_PyGILState_Release(__pyx_gilstate_save);
                          __PYX_ERR(17, 5501, __pyx_L6_error)
                        }

                        /* "pyarrow/table.pxi":5500
 * 
 *         with nogil:
 *             c_table = GetResultValue(self.table.SetColumn(             # <<<<<<<<<<<<<<
 *                 i, c_field.sp_field, c_arr.sp_chunked_array))
 * 
*/
                        __pyx_t_7 = arrow::py::GetResultValue<std::shared_ptr< arrow::Table> >(__pyx_v_self->table->SetColumn(__pyx_v_i, __pyx_v_c_field->sp_field, __pyx_v_c_arr->sp_chunked_array)); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(17, 5500, __pyx_L6_error)
                        __pyx_v_c_table = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_7);
                      }

                      /* "pyarrow/table.pxi":5499
 *             c_field = field(field_, c_arr.type)
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             c_table = GetResultValue(self.table.SetColumn(
 *                 i, c_field.sp_field, c_arr.sp_chunked_array))
*/
                      /*finally:*/ {
                        /*normal exit:*/{
                          __Pyx_FastGIL_Forget();
                          PyEval_RestoreThread(_save);
                          goto __pyx_L7;
                        }
                        __pyx_L6_error: {
                          __Pyx_FastGIL_Forget();
                          PyEval_RestoreThread(_save);
                          goto __pyx_L1_error;
                        }
                        __pyx_L7:;
                      }
                  }

                  /* "pyarrow/table.pxi":5503
 *                 i, c_field.sp_field, c_arr.sp_chunked_array))
 * 
 *         return pyarrow_wrap_table(c_table)             # <<<<<<<<<<<<<<
 * 
 *     def rename_columns(self, names):
*/
                  __Pyx_XDECREF(__pyx_r);
                  __pyx_t_2 = pyarrow_wrap_table(__pyx_v_c_table); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 5503, __pyx_L1_error)
                  __Pyx_GOTREF(__pyx_t_2);
                  __pyx_r = __pyx_t_2;
                  __pyx_t_2 = 0;
                  goto __pyx_L0;

                  /* "pyarrow/table.pxi":5446
 *         return pyarrow_wrap_table(c_table)
 * 
 *     def set_column(self, int i, field_, column):             # <<<<<<<<<<<<<<
 *         """
 *         Replace column in Table at position.
*/

                  /* function exit code */
                  __pyx_L1_error:;
                  __Pyx_XDECREF(__pyx_t_2);
                  __Pyx_XDECREF(__pyx_t_3);
                  __Pyx_XDECREF(__pyx_t_4);
                  __Pyx_XDECREF(__pyx_t_6);
                  __Pyx_AddTraceback("pyarrow.lib.Table.set_column", __pyx_clineno, __pyx_lineno, __pyx_filename);
                  __pyx_r = NULL;
                  __pyx_L0:;
                  __Pyx_XDECREF((PyObject *)__pyx_v_c_field);
                  __Pyx_XDECREF((PyObject *)__pyx_v_c_arr);
                  __Pyx_XGIVEREF(__pyx_r);
                  __Pyx_RefNannyFinishContext();
                  return __pyx_r;
                }

                /* "pyarrow/table.pxi":5505
 *         return pyarrow_wrap_table(c_table)
 * 
 *     def rename_columns(self, names):             # <<<<<<<<<<<<<<
 *         """
 *         Create new table with columns renamed to provided names.
*/

                /* Python wrapper */
                static PyObject *__pyx_pw_7pyarrow_3lib_5Table_53rename_columns(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_5Table_52rename_columns, "Table.rename_columns(self, names)\n\nCreate new table with columns renamed to provided names.\n\nParameters\n----------\nnames : list[str] or dict[str, str]\n    List of new column names or mapping of old column names to new column names.\n\n    If a mapping of old to new column names is passed, then all columns which are\n    found to match a provided old column name will be renamed to the new column name.\n    If any column names are not found in the mapping, a KeyError will be raised.\n\nRaises\n------\nKeyError\n    If any of the column names passed in the names mapping do not exist.\n\nReturns\n-------\nTable\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> import pandas as pd\n>>> df = pd.DataFrame({'n_legs': [2, 4, 5, 100],\n...                    'animals': [\"Flamingo\", \"Horse\", \"Brittle stars\", \"Centipede\"]})\n>>> table = pa.Table.from_pandas(df)\n>>> new_names = [\"n\", \"name\"]\n>>> table.rename_columns(new_names)\npyarrow.Table\nn: int64\nname: string\n----\nn: [[2,4,5,100]]\nname: [[\"Flamingo\",\"Horse\",\"Brittle stars\",\"Centipede\"]]\n>>> new_names = {\"n_legs\": \"n\", \"animals\": \"name\"}\n>>> table.rename_columns(new_names)\npyarrow.Table\nn: int64\nname: string\n----\nn: [[2,4,5,100]]\nname: [[\"Flamingo\",\"Horse\",\"Brittle stars\",\"Centipede\"]]");
                static PyMethodDef __pyx_mdef_7pyarrow_3lib_5Table_53rename_columns = {"rename_columns", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Table_53rename_columns, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Table_52rename_columns};
                static PyObject *__pyx_pw_7pyarrow_3lib_5Table_53rename_columns(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                  PyObject *__pyx_v_names = 0;
                  #if !CYTHON_METH_FASTCALL
                  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                  #endif
                  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                  PyObject* values[1] = {0};
                  int __pyx_lineno = 0;
                  const char *__pyx_filename = NULL;
                  int __pyx_clineno = 0;
                  PyObject *__pyx_r = 0;
                  __Pyx_RefNannyDeclarations
                  __Pyx_RefNannySetupContext("rename_columns (wrapper)", 0);
                  #if !CYTHON_METH_FASTCALL
                  #if CYTHON_ASSUME_SAFE_SIZE
                  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                  #else
                  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                  #endif
                  #endif
                  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                  {
                    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_names,0};
                    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(17, 5505, __pyx_L3_error)
                    if (__pyx_kwds_len > 0) {
                      switch (__pyx_nargs) {
                        case  1:
                        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 5505, __pyx_L3_error)
                        CYTHON_FALLTHROUGH;
                        case  0: break;
                        default: goto __pyx_L5_argtuple_error;
                      }
                      const Py_ssize_t kwd_pos_args = __pyx_nargs;
                      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "rename_columns", 0) < (0)) __PYX_ERR(17, 5505, __pyx_L3_error)
                      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("rename_columns", 1, 1, 1, i); __PYX_ERR(17, 5505, __pyx_L3_error) }
                      }
                    } else if (unlikely(__pyx_nargs != 1)) {
                      goto __pyx_L5_argtuple_error;
                    } else {
                      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 5505, __pyx_L3_error)
                    }
                    __pyx_v_names = values[0];
                  }
                  goto __pyx_L6_skip;
                  __pyx_L5_argtuple_error:;
                  __Pyx_RaiseArgtupleInvalid("rename_columns", 1, 1, 1, __pyx_nargs); __PYX_ERR(17, 5505, __pyx_L3_error)
                  __pyx_L6_skip:;
                  goto __pyx_L4_argument_unpacking_done;
                  __pyx_L3_error:;
                  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                    Py_XDECREF(values[__pyx_temp]);
                  }
                  __Pyx_AddTraceback("pyarrow.lib.Table.rename_columns", __pyx_clineno, __pyx_lineno, __pyx_filename);
                  __Pyx_RefNannyFinishContext();
                  return NULL;
                  __pyx_L4_argument_unpacking_done:;
                  __pyx_r = __pyx_pf_7pyarrow_3lib_5Table_52rename_columns(((struct __pyx_obj_7pyarrow_3lib_Table *)__pyx_v_self), __pyx_v_names);

                  /* function exit code */
                  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                    Py_XDECREF(values[__pyx_temp]);
                  }
                  __Pyx_RefNannyFinishContext();
                  return __pyx_r;
                }

                static PyObject *__pyx_pf_7pyarrow_3lib_5Table_52rename_columns(struct __pyx_obj_7pyarrow_3lib_Table *__pyx_v_self, PyObject *__pyx_v_names) {
                  std::shared_ptr< arrow::Table>  __pyx_v_c_table;
                  std::vector<std::string>  __pyx_v_c_names;
                  PyObject *__pyx_v_name = NULL;
                  PyObject *__pyx_v_idx_to_new_name = NULL;
                  PyObject *__pyx_v_new_name = NULL;
                  PyObject *__pyx_v_indices = NULL;
                  PyObject *__pyx_v_index = NULL;
                  PyObject *__pyx_v_i = NULL;
                  PyObject *__pyx_r = NULL;
                  __Pyx_RefNannyDeclarations
                  int __pyx_t_1;
                  int __pyx_t_2;
                  PyObject *__pyx_t_3 = NULL;
                  Py_ssize_t __pyx_t_4;
                  PyObject *(*__pyx_t_5)(PyObject *);
                  PyObject *__pyx_t_6 = NULL;
                  PyObject *__pyx_t_7 = NULL;
                  PyObject *__pyx_t_8 = NULL;
                  size_t __pyx_t_9;
                  std::string __pyx_t_10;
                  Py_ssize_t __pyx_t_11;
                  int __pyx_t_12;
                  int __pyx_t_13;
                  PyObject *__pyx_t_14[3];
                  PyObject *__pyx_t_15 = NULL;
                  Py_ssize_t __pyx_t_16;
                  PyObject *__pyx_t_17 = NULL;
                  std::shared_ptr< arrow::Table>  __pyx_t_18;
                  int __pyx_lineno = 0;
                  const char *__pyx_filename = NULL;
                  int __pyx_clineno = 0;
                  __Pyx_RefNannySetupContext("rename_columns", 0);

                  /* "pyarrow/table.pxi":5555
 *             vector[c_string] c_names
 * 
 *         if isinstance(names, (list, tuple)):             # <<<<<<<<<<<<<<
 *             for name in names:
 *                 c_names.push_back(tobytes(name))
*/
                  __pyx_t_2 = PyList_Check(__pyx_v_names); 
                  if (!__pyx_t_2) {
                  } else {
                    __pyx_t_1 = __pyx_t_2;
                    goto __pyx_L4_bool_binop_done;
                  }
                  __pyx_t_2 = PyTuple_Check(__pyx_v_names); 
                  __pyx_t_1 = __pyx_t_2;
                  __pyx_L4_bool_binop_done:;
                  if (__pyx_t_1) {

                    /* "pyarrow/table.pxi":5556
 * 
 *         if isinstance(names, (list, tuple)):
 *             for name in names:             # <<<<<<<<<<<<<<
 *                 c_names.push_back(tobytes(name))
 *         elif isinstance(names, dict):
*/
                    if (likely(PyList_CheckExact(__pyx_v_names)) || PyTuple_CheckExact(__pyx_v_names)) {
                      __pyx_t_3 = __pyx_v_names; __Pyx_INCREF(__pyx_t_3);
                      __pyx_t_4 = 0;
                      __pyx_t_5 = NULL;
                    } else {
                      __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_names); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 5556, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_3);
                      __pyx_t_5 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 5556, __pyx_L1_error)
                    }
                    for (;;) {
                      if (likely(!__pyx_t_5)) {
                        if (likely(PyList_CheckExact(__pyx_t_3))) {
                          {
                            Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3);
                            #if !CYTHON_ASSUME_SAFE_SIZE
                            if (unlikely((__pyx_temp < 0))) __PYX_ERR(17, 5556, __pyx_L1_error)
                            #endif
                            if (__pyx_t_4 >= __pyx_temp) break;
                          }
                          __pyx_t_6 = __Pyx_PyList_GetItemRefFast(__pyx_t_3, __pyx_t_4, __Pyx_ReferenceSharing_OwnStrongReference);
                          ++__pyx_t_4;
                        } else {
                          {
                            Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3);
                            #if !CYTHON_ASSUME_SAFE_SIZE
                            if (unlikely((__pyx_temp < 0))) __PYX_ERR(17, 5556, __pyx_L1_error)
                            #endif
                            if (__pyx_t_4 >= __pyx_temp) break;
                          }
                          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                          __pyx_t_6 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4));
                          #else
                          __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_4);
                          #endif
                          ++__pyx_t_4;
                        }
                        if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 5556, __pyx_L1_error)
                      } else {
                        __pyx_t_6 = __pyx_t_5(__pyx_t_3);
                        if (unlikely(!__pyx_t_6)) {
                          PyObject* exc_type = PyErr_Occurred();
                          if (exc_type) {
                            if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(17, 5556, __pyx_L1_error)
                            PyErr_Clear();
                          }
                          break;
                        }
                      }
                      __Pyx_GOTREF(__pyx_t_6);
                      __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_6);
                      __pyx_t_6 = 0;

                      /* "pyarrow/table.pxi":5557
 *         if isinstance(names, (list, tuple)):
 *             for name in names:
 *                 c_names.push_back(tobytes(name))             # <<<<<<<<<<<<<<
 *         elif isinstance(names, dict):
 *             idx_to_new_name = {}
*/
                      __pyx_t_7 = NULL;
                      __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_tobytes); if (unlikely(!__pyx_t_8)) __PYX_ERR(17, 5557, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_8);
                      __pyx_t_9 = 1;
                      #if CYTHON_UNPACK_METHODS
                      if (unlikely(PyMethod_Check(__pyx_t_8))) {
                        __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8);
                        assert(__pyx_t_7);
                        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8);
                        __Pyx_INCREF(__pyx_t_7);
                        __Pyx_INCREF(__pyx__function);
                        __Pyx_DECREF_SET(__pyx_t_8, __pyx__function);
                        __pyx_t_9 = 0;
                      }
                      #endif
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_name};
                        __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
                        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                        if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 5557, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_6);
                      }
                      __pyx_t_10 = __pyx_convert_string_from_py_6libcpp_6string_std__in_string(__pyx_t_6); if (unlikely(PyErr_Occurred())) __PYX_ERR(17, 5557, __pyx_L1_error)
                      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                      try {
                        __pyx_v_c_names.push_back(__pyx_t_10);
                      } catch(...) {
                        __Pyx_CppExn2PyErr();
                        __PYX_ERR(17, 5557, __pyx_L1_error)
                      }

                      /* "pyarrow/table.pxi":5556
 * 
 *         if isinstance(names, (list, tuple)):
 *             for name in names:             # <<<<<<<<<<<<<<
 *                 c_names.push_back(tobytes(name))
 *         elif isinstance(names, dict):
*/
                    }
                    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

                    /* "pyarrow/table.pxi":5555
 *             vector[c_string] c_names
 * 
 *         if isinstance(names, (list, tuple)):             # <<<<<<<<<<<<<<
 *             for name in names:
 *                 c_names.push_back(tobytes(name))
*/
                    goto __pyx_L3;
                  }

                  /* "pyarrow/table.pxi":5558
 *             for name in names:
 *                 c_names.push_back(tobytes(name))
 *         elif isinstance(names, dict):             # <<<<<<<<<<<<<<
 *             idx_to_new_name = {}
 *             for name, new_name in names.items():
*/
                  __pyx_t_1 = PyDict_Check(__pyx_v_names); 
                  if (likely(__pyx_t_1)) {

                    /* "pyarrow/table.pxi":5559
 *                 c_names.push_back(tobytes(name))
 *         elif isinstance(names, dict):
 *             idx_to_new_name = {}             # <<<<<<<<<<<<<<
 *             for name, new_name in names.items():
 *                 indices = self.schema.get_all_field_indices(name)
*/
                    __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 5559, __pyx_L1_error)
                    __Pyx_GOTREF(__pyx_t_3);
                    __pyx_v_idx_to_new_name = ((PyObject*)__pyx_t_3);
                    __pyx_t_3 = 0;

                    /* "pyarrow/table.pxi":5560
 *         elif isinstance(names, dict):
 *             idx_to_new_name = {}
 *             for name, new_name in names.items():             # <<<<<<<<<<<<<<
 *                 indices = self.schema.get_all_field_indices(name)
 * 
*/
                    __pyx_t_4 = 0;
                    if (unlikely(__pyx_v_names == Py_None)) {
                      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items");
                      __PYX_ERR(17, 5560, __pyx_L1_error)
                    }
                    __pyx_t_6 = __Pyx_dict_iterator(__pyx_v_names, 0, __pyx_mstate_global->__pyx_n_u_items, (&__pyx_t_11), (&__pyx_t_12)); if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 5560, __pyx_L1_error)
                    __Pyx_GOTREF(__pyx_t_6);
                    __Pyx_XDECREF(__pyx_t_3);
                    __pyx_t_3 = __pyx_t_6;
                    __pyx_t_6 = 0;
                    while (1) {
                      __pyx_t_13 = __Pyx_dict_iter_next(__pyx_t_3, __pyx_t_11, &__pyx_t_4, &__pyx_t_6, &__pyx_t_8, NULL, __pyx_t_12);
                      if (unlikely(__pyx_t_13 == 0)) break;
                      if (unlikely(__pyx_t_13 == -1)) __PYX_ERR(17, 5560, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_6);
                      __Pyx_GOTREF(__pyx_t_8);
                      __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_6);
                      __pyx_t_6 = 0;
                      __Pyx_XDECREF_SET(__pyx_v_new_name, __pyx_t_8);
                      __pyx_t_8 = 0;

                      /* "pyarrow/table.pxi":5561
 *             idx_to_new_name = {}
 *             for name, new_name in names.items():
 *                 indices = self.schema.get_all_field_indices(name)             # <<<<<<<<<<<<<<
 * 
 *                 if not indices:
*/
                      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_schema); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 5561, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_7);
                      __pyx_t_6 = __pyx_t_7;
                      __Pyx_INCREF(__pyx_t_6);
                      __pyx_t_9 = 0;
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_name};
                        __pyx_t_8 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_all_field_indices, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
                        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
                        if (unlikely(!__pyx_t_8)) __PYX_ERR(17, 5561, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_8);
                      }
                      __Pyx_XDECREF_SET(__pyx_v_indices, __pyx_t_8);
                      __pyx_t_8 = 0;

                      /* "pyarrow/table.pxi":5563
 *                 indices = self.schema.get_all_field_indices(name)
 * 
 *                 if not indices:             # <<<<<<<<<<<<<<
 *                     raise KeyError(f"Column {name!r} not found")
 * 
*/
                      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_indices); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(17, 5563, __pyx_L1_error)
                      __pyx_t_2 = (!__pyx_t_1);
                      if (unlikely(__pyx_t_2)) {

                        /* "pyarrow/table.pxi":5564
 * 
 *                 if not indices:
 *                     raise KeyError(f"Column {name!r} not found")             # <<<<<<<<<<<<<<
 * 
 *                 for index in indices:
*/
                        __pyx_t_7 = NULL;
                        __pyx_t_6 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_name), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 5564, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_6);
                        __pyx_t_14[0] = __pyx_mstate_global->__pyx_kp_u_Column;
                        __pyx_t_14[1] = __pyx_t_6;
                        __pyx_t_14[2] = __pyx_mstate_global->__pyx_kp_u_not_found;
                        __pyx_t_15 = __Pyx_PyUnicode_Join(__pyx_t_14, 3, 7 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6) + 10, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6));
                        if (unlikely(!__pyx_t_15)) __PYX_ERR(17, 5564, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_15);
                        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                        __pyx_t_9 = 1;
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_15};
                          __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_KeyError)), __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
                          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
                          if (unlikely(!__pyx_t_8)) __PYX_ERR(17, 5564, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_8);
                        }
                        __Pyx_Raise(__pyx_t_8, 0, 0, 0);
                        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                        __PYX_ERR(17, 5564, __pyx_L1_error)

                        /* "pyarrow/table.pxi":5563
 *                 indices = self.schema.get_all_field_indices(name)
 * 
 *                 if not indices:             # <<<<<<<<<<<<<<
 *                     raise KeyError(f"Column {name!r} not found")
 * 
*/
                      }

                      /* "pyarrow/table.pxi":5566
 *                     raise KeyError(f"Column {name!r} not found")
 * 
 *                 for index in indices:             # <<<<<<<<<<<<<<
 *                     idx_to_new_name[index] = new_name
 * 
*/
                      if (likely(PyList_CheckExact(__pyx_v_indices)) || PyTuple_CheckExact(__pyx_v_indices)) {
                        __pyx_t_8 = __pyx_v_indices; __Pyx_INCREF(__pyx_t_8);
                        __pyx_t_16 = 0;
                        __pyx_t_5 = NULL;
                      } else {
                        __pyx_t_16 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_v_indices); if (unlikely(!__pyx_t_8)) __PYX_ERR(17, 5566, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_8);
                        __pyx_t_5 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 5566, __pyx_L1_error)
                      }
                      for (;;) {
                        if (likely(!__pyx_t_5)) {
                          if (likely(PyList_CheckExact(__pyx_t_8))) {
                            {
                              Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_8);
                              #if !CYTHON_ASSUME_SAFE_SIZE
                              if (unlikely((__pyx_temp < 0))) __PYX_ERR(17, 5566, __pyx_L1_error)
                              #endif
                              if (__pyx_t_16 >= __pyx_temp) break;
                            }
                            __pyx_t_15 = __Pyx_PyList_GetItemRefFast(__pyx_t_8, __pyx_t_16, __Pyx_ReferenceSharing_OwnStrongReference);
                            ++__pyx_t_16;
                          } else {
                            {
                              Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_8);
                              #if !CYTHON_ASSUME_SAFE_SIZE
                              if (unlikely((__pyx_temp < 0))) __PYX_ERR(17, 5566, __pyx_L1_error)
                              #endif
                              if (__pyx_t_16 >= __pyx_temp) break;
                            }
                            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                            __pyx_t_15 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_16));
                            #else
                            __pyx_t_15 = __Pyx_PySequence_ITEM(__pyx_t_8, __pyx_t_16);
                            #endif
                            ++__pyx_t_16;
                          }
                          if (unlikely(!__pyx_t_15)) __PYX_ERR(17, 5566, __pyx_L1_error)
                        } else {
                          __pyx_t_15 = __pyx_t_5(__pyx_t_8);
                          if (unlikely(!__pyx_t_15)) {
                            PyObject* exc_type = PyErr_Occurred();
                            if (exc_type) {
                              if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(17, 5566, __pyx_L1_error)
                              PyErr_Clear();
                            }
                            break;
                          }
                        }
                        __Pyx_GOTREF(__pyx_t_15);
                        __Pyx_XDECREF_SET(__pyx_v_index, __pyx_t_15);
                        __pyx_t_15 = 0;

                        /* "pyarrow/table.pxi":5567
 * 
 *                 for index in indices:
 *                     idx_to_new_name[index] = new_name             # <<<<<<<<<<<<<<
 * 
 *             for i in range(self.num_columns):
*/
                        if (unlikely((PyDict_SetItem(__pyx_v_idx_to_new_name, __pyx_v_index, __pyx_v_new_name) < 0))) __PYX_ERR(17, 5567, __pyx_L1_error)

                        /* "pyarrow/table.pxi":5566
 *                     raise KeyError(f"Column {name!r} not found")
 * 
 *                 for index in indices:             # <<<<<<<<<<<<<<
 *                     idx_to_new_name[index] = new_name
 * 
*/
                      }
                      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                    }
                    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

                    /* "pyarrow/table.pxi":5569
 *                     idx_to_new_name[index] = new_name
 * 
 *             for i in range(self.num_columns):             # <<<<<<<<<<<<<<
 *                 c_names.push_back(tobytes(idx_to_new_name.get(i, self.schema[i].name)))
 *         else:
*/
                    __pyx_t_8 = NULL;
                    __pyx_t_15 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_num_columns); if (unlikely(!__pyx_t_15)) __PYX_ERR(17, 5569, __pyx_L1_error)
                    __Pyx_GOTREF(__pyx_t_15);
                    __pyx_t_9 = 1;
                    {
                      PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_15};
                      __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(&PyRange_Type), __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
                      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
                      if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 5569, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_3);
                    }
                    __pyx_t_15 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_15)) __PYX_ERR(17, 5569, __pyx_L1_error)
                    __Pyx_GOTREF(__pyx_t_15);
                    __pyx_t_5 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_15); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 5569, __pyx_L1_error)
                    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                    for (;;) {
                      {
                        __pyx_t_3 = __pyx_t_5(__pyx_t_15);
                        if (unlikely(!__pyx_t_3)) {
                          PyObject* exc_type = PyErr_Occurred();
                          if (exc_type) {
                            if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(17, 5569, __pyx_L1_error)
                            PyErr_Clear();
                          }
                          break;
                        }
                      }
                      __Pyx_GOTREF(__pyx_t_3);
                      __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_3);
                      __pyx_t_3 = 0;

                      /* "pyarrow/table.pxi":5570
 * 
 *             for i in range(self.num_columns):
 *                 c_names.push_back(tobytes(idx_to_new_name.get(i, self.schema[i].name)))             # <<<<<<<<<<<<<<
 *         else:
 *             raise TypeError(f"names must be a list or dict not {type(names)!r}")
*/
                      __pyx_t_8 = NULL;
                      __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_tobytes); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 5570, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_7);
                      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_schema); if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 5570, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_6);
                      if (unlikely(__pyx_t_6 == Py_None)) {
                        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
                        __PYX_ERR(17, 5570, __pyx_L1_error)
                      }
                      __pyx_t_17 = __Pyx_PyObject_GetItem(__pyx_t_6, __pyx_v_i); if (unlikely(!__pyx_t_17)) __PYX_ERR(17, 5570, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_17);
                      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_17, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 5570, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_6);
                      __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
                      __pyx_t_17 = __Pyx_PyDict_GetItemDefault(__pyx_v_idx_to_new_name, __pyx_v_i, __pyx_t_6); if (unlikely(!__pyx_t_17)) __PYX_ERR(17, 5570, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_17);
                      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                      __pyx_t_9 = 1;
                      #if CYTHON_UNPACK_METHODS
                      if (unlikely(PyMethod_Check(__pyx_t_7))) {
                        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
                        assert(__pyx_t_8);
                        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
                        __Pyx_INCREF(__pyx_t_8);
                        __Pyx_INCREF(__pyx__function);
                        __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
                        __pyx_t_9 = 0;
                      }
                      #endif
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_17};
                        __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
                        __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
                        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
                        if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 5570, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_3);
                      }
                      __pyx_t_10 = __pyx_convert_string_from_py_6libcpp_6string_std__in_string(__pyx_t_3); if (unlikely(PyErr_Occurred())) __PYX_ERR(17, 5570, __pyx_L1_error)
                      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                      try {
                        __pyx_v_c_names.push_back(__pyx_t_10);
                      } catch(...) {
                        __Pyx_CppExn2PyErr();
                        __PYX_ERR(17, 5570, __pyx_L1_error)
                      }

                      /* "pyarrow/table.pxi":5569
 *                     idx_to_new_name[index] = new_name
 * 
 *             for i in range(self.num_columns):             # <<<<<<<<<<<<<<
 *                 c_names.push_back(tobytes(idx_to_new_name.get(i, self.schema[i].name)))
 *         else:
*/
                    }
                    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;

                    /* "pyarrow/table.pxi":5558
 *             for name in names:
 *                 c_names.push_back(tobytes(name))
 *         elif isinstance(names, dict):             # <<<<<<<<<<<<<<
 *             idx_to_new_name = {}
 *             for name, new_name in names.items():
*/
                    goto __pyx_L3;
                  }

                  /* "pyarrow/table.pxi":5572
 *                 c_names.push_back(tobytes(idx_to_new_name.get(i, self.schema[i].name)))
 *         else:
 *             raise TypeError(f"names must be a list or dict not {type(names)!r}")             # <<<<<<<<<<<<<<
 * 
 *         with nogil:
*/
                  /*else*/ {
                    __pyx_t_3 = NULL;
                    __pyx_t_7 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(((PyObject *)Py_TYPE(__pyx_v_names))), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 5572, __pyx_L1_error)
                    __Pyx_GOTREF(__pyx_t_7);
                    __pyx_t_17 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_names_must_be_a_list_or_dict_not, __pyx_t_7); if (unlikely(!__pyx_t_17)) __PYX_ERR(17, 5572, __pyx_L1_error)
                    __Pyx_GOTREF(__pyx_t_17);
                    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
                    __pyx_t_9 = 1;
                    {
                      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_17};
                      __pyx_t_15 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                      __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
                      if (unlikely(!__pyx_t_15)) __PYX_ERR(17, 5572, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_15);
                    }
                    __Pyx_Raise(__pyx_t_15, 0, 0, 0);
                    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
                    __PYX_ERR(17, 5572, __pyx_L1_error)
                  }
                  __pyx_L3:;

                  /* "pyarrow/table.pxi":5574
 *             raise TypeError(f"names must be a list or dict not {type(names)!r}")
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             c_table = GetResultValue(self.table.RenameColumns(move(c_names)))
 * 
*/
                  {
                      PyThreadState * _save;
                      _save = PyEval_SaveThread();
                      __Pyx_FastGIL_Remember();
                      /*try:*/ {

                        /* "pyarrow/table.pxi":5575
 * 
 *         with nogil:
 *             c_table = GetResultValue(self.table.RenameColumns(move(c_names)))             # <<<<<<<<<<<<<<
 * 
 *         return pyarrow_wrap_table(c_table)
*/
                        if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "table");
                          __Pyx_PyGILState_Release(__pyx_gilstate_save);
                          __PYX_ERR(17, 5575, __pyx_L19_error)
                        }
                        __pyx_t_18 = arrow::py::GetResultValue<std::shared_ptr< arrow::Table> >(__pyx_v_self->table->RenameColumns(cython_std::move<std::vector<std::string> >(__pyx_v_c_names))); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(17, 5575, __pyx_L19_error)
                        __pyx_v_c_table = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_18);
                      }

                      /* "pyarrow/table.pxi":5574
 *             raise TypeError(f"names must be a list or dict not {type(names)!r}")
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             c_table = GetResultValue(self.table.RenameColumns(move(c_names)))
 * 
*/
                      /*finally:*/ {
                        /*normal exit:*/{
                          __Pyx_FastGIL_Forget();
                          PyEval_RestoreThread(_save);
                          goto __pyx_L20;
                        }
                        __pyx_L19_error: {
                          __Pyx_FastGIL_Forget();
                          PyEval_RestoreThread(_save);
                          goto __pyx_L1_error;
                        }
                        __pyx_L20:;
                      }
                  }

                  /* "pyarrow/table.pxi":5577
 *             c_table = GetResultValue(self.table.RenameColumns(move(c_names)))
 * 
 *         return pyarrow_wrap_table(c_table)             # <<<<<<<<<<<<<<
 * 
 *     def drop(self, columns):
*/
                  __Pyx_XDECREF(__pyx_r);
                  __pyx_t_15 = pyarrow_wrap_table(__pyx_v_c_table); if (unlikely(!__pyx_t_15)) __PYX_ERR(17, 5577, __pyx_L1_error)
                  __Pyx_GOTREF(__pyx_t_15);
                  __pyx_r = __pyx_t_15;
                  __pyx_t_15 = 0;
                  goto __pyx_L0;

                  /* "pyarrow/table.pxi":5505
 *         return pyarrow_wrap_table(c_table)
 * 
 *     def rename_columns(self, names):             # <<<<<<<<<<<<<<
 *         """
 *         Create new table with columns renamed to provided names.
*/

                  /* function exit code */
                  __pyx_L1_error:;
                  __Pyx_XDECREF(__pyx_t_3);
                  __Pyx_XDECREF(__pyx_t_6);
                  __Pyx_XDECREF(__pyx_t_7);
                  __Pyx_XDECREF(__pyx_t_8);
                  __Pyx_XDECREF(__pyx_t_15);
                  __Pyx_XDECREF(__pyx_t_17);
                  __Pyx_AddTraceback("pyarrow.lib.Table.rename_columns", __pyx_clineno, __pyx_lineno, __pyx_filename);
                  __pyx_r = NULL;
                  __pyx_L0:;
                  __Pyx_XDECREF(__pyx_v_name);
                  __Pyx_XDECREF(__pyx_v_idx_to_new_name);
                  __Pyx_XDECREF(__pyx_v_new_name);
                  __Pyx_XDECREF(__pyx_v_indices);
                  __Pyx_XDECREF(__pyx_v_index);
                  __Pyx_XDECREF(__pyx_v_i);
                  __Pyx_XGIVEREF(__pyx_r);
                  __Pyx_RefNannyFinishContext();
                  return __pyx_r;
                }

                /* "pyarrow/table.pxi":5579
 *         return pyarrow_wrap_table(c_table)
 * 
 *     def drop(self, columns):             # <<<<<<<<<<<<<<
 *         """
 *         Drop one or more columns and return a new table.
*/

                /* Python wrapper */
                static PyObject *__pyx_pw_7pyarrow_3lib_5Table_55drop(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_5Table_54drop, "Table.drop(self, columns)\n\nDrop one or more columns and return a new table.\n\nAlias of Table.drop_columns, but kept for backwards compatibility.\n\nParameters\n----------\ncolumns : str or list[str]\n    Field name(s) referencing existing column(s).\n\nReturns\n-------\nTable\n    New table without the column(s).");
                static PyMethodDef __pyx_mdef_7pyarrow_3lib_5Table_55drop = {"drop", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Table_55drop, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Table_54drop};
                static PyObject *__pyx_pw_7pyarrow_3lib_5Table_55drop(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                  PyObject *__pyx_v_columns = 0;
                  #if !CYTHON_METH_FASTCALL
                  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                  #endif
                  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                  PyObject* values[1] = {0};
                  int __pyx_lineno = 0;
                  const char *__pyx_filename = NULL;
                  int __pyx_clineno = 0;
                  PyObject *__pyx_r = 0;
                  __Pyx_RefNannyDeclarations
                  __Pyx_RefNannySetupContext("drop (wrapper)", 0);
                  #if !CYTHON_METH_FASTCALL
                  #if CYTHON_ASSUME_SAFE_SIZE
                  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                  #else
                  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                  #endif
                  #endif
                  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                  {
                    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_columns,0};
                    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(17, 5579, __pyx_L3_error)
                    if (__pyx_kwds_len > 0) {
                      switch (__pyx_nargs) {
                        case  1:
                        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 5579, __pyx_L3_error)
                        CYTHON_FALLTHROUGH;
                        case  0: break;
                        default: goto __pyx_L5_argtuple_error;
                      }
                      const Py_ssize_t kwd_pos_args = __pyx_nargs;
                      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "drop", 0) < (0)) __PYX_ERR(17, 5579, __pyx_L3_error)
                      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("drop", 1, 1, 1, i); __PYX_ERR(17, 5579, __pyx_L3_error) }
                      }
                    } else if (unlikely(__pyx_nargs != 1)) {
                      goto __pyx_L5_argtuple_error;
                    } else {
                      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 5579, __pyx_L3_error)
                    }
                    __pyx_v_columns = values[0];
                  }
                  goto __pyx_L6_skip;
                  __pyx_L5_argtuple_error:;
                  __Pyx_RaiseArgtupleInvalid("drop", 1, 1, 1, __pyx_nargs); __PYX_ERR(17, 5579, __pyx_L3_error)
                  __pyx_L6_skip:;
                  goto __pyx_L4_argument_unpacking_done;
                  __pyx_L3_error:;
                  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                    Py_XDECREF(values[__pyx_temp]);
                  }
                  __Pyx_AddTraceback("pyarrow.lib.Table.drop", __pyx_clineno, __pyx_lineno, __pyx_filename);
                  __Pyx_RefNannyFinishContext();
                  return NULL;
                  __pyx_L4_argument_unpacking_done:;
                  __pyx_r = __pyx_pf_7pyarrow_3lib_5Table_54drop(((struct __pyx_obj_7pyarrow_3lib_Table *)__pyx_v_self), __pyx_v_columns);

                  /* function exit code */
                  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                    Py_XDECREF(values[__pyx_temp]);
                  }
                  __Pyx_RefNannyFinishContext();
                  return __pyx_r;
                }

                static PyObject *__pyx_pf_7pyarrow_3lib_5Table_54drop(struct __pyx_obj_7pyarrow_3lib_Table *__pyx_v_self, PyObject *__pyx_v_columns) {
                  PyObject *__pyx_r = NULL;
                  __Pyx_RefNannyDeclarations
                  PyObject *__pyx_t_1 = NULL;
                  PyObject *__pyx_t_2 = NULL;
                  size_t __pyx_t_3;
                  int __pyx_lineno = 0;
                  const char *__pyx_filename = NULL;
                  int __pyx_clineno = 0;
                  __Pyx_RefNannySetupContext("drop", 0);

                  /* "pyarrow/table.pxi":5595
 *             New table without the column(s).
 *         """
 *         return self.drop_columns(columns)             # <<<<<<<<<<<<<<
 * 
 *     def group_by(self, keys, use_threads=True):
*/
                  __Pyx_XDECREF(__pyx_r);
                  __pyx_t_2 = ((PyObject *)__pyx_v_self);
                  __Pyx_INCREF(__pyx_t_2);
                  __pyx_t_3 = 0;
                  {
                    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_columns};
                    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_drop_columns, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                    if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 5595, __pyx_L1_error)
                    __Pyx_GOTREF(__pyx_t_1);
                  }
                  __pyx_r = __pyx_t_1;
                  __pyx_t_1 = 0;
                  goto __pyx_L0;

                  /* "pyarrow/table.pxi":5579
 *         return pyarrow_wrap_table(c_table)
 * 
 *     def drop(self, columns):             # <<<<<<<<<<<<<<
 *         """
 *         Drop one or more columns and return a new table.
*/

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

                /* "pyarrow/table.pxi":5597
 *         return self.drop_columns(columns)
 * 
 *     def group_by(self, keys, use_threads=True):             # <<<<<<<<<<<<<<
 *         """
 *         Declare a grouping over the columns of the table.
*/

                /* Python wrapper */
                static PyObject *__pyx_pw_7pyarrow_3lib_5Table_57group_by(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_5Table_56group_by, "Table.group_by(self, keys, use_threads=True)\n\nDeclare a grouping over the columns of the table.\n\nResulting grouping can then be used to perform aggregations\nwith a subsequent ``aggregate()`` method.\n\nParameters\n----------\nkeys : str or list[str]\n    Name of the columns that should be used as the grouping key.\nuse_threads : bool, default True\n    Whether to use multithreading or not. When set to True (the\n    default), no stable ordering of the output is guaranteed.\n\nReturns\n-------\nTableGroupBy\n\nSee Also\n--------\nTableGroupBy.aggregate\n\nExamples\n--------\n>>> import pandas as pd\n>>> import pyarrow as pa\n>>> df = pd.DataFrame({'year': [2020, 2022, 2021, 2022, 2019, 2021],\n...                    'n_legs': [2, 2, 4, 4, 5, 100],\n...                    'animal': [\"Flamingo\", \"Parrot\", \"Dog\", \"Horse\",\n...                    \"Brittle stars\", \"Centipede\"]})\n>>> table = pa.Table.from_pandas(df)\n>>> table.group_by('year').aggregate([('n_legs', 'sum')])\npyarrow.Table\nyear: int64\nn_legs_sum: int64\n----\nyear: [[2020,2022,2021,2019]]\nn_legs_sum: [[2,6,104,5]]");
                static PyMethodDef __pyx_mdef_7pyarrow_3lib_5Table_57group_by = {"group_by", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Table_57group_by, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Table_56group_by};
                static PyObject *__pyx_pw_7pyarrow_3lib_5Table_57group_by(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                  PyObject *__pyx_v_keys = 0;
                  PyObject *__pyx_v_use_threads = 0;
                  #if !CYTHON_METH_FASTCALL
                  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                  #endif
                  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                  PyObject* values[2] = {0,0};
                  int __pyx_lineno = 0;
                  const char *__pyx_filename = NULL;
                  int __pyx_clineno = 0;
                  PyObject *__pyx_r = 0;
                  __Pyx_RefNannyDeclarations
                  __Pyx_RefNannySetupContext("group_by (wrapper)", 0);
                  #if !CYTHON_METH_FASTCALL
                  #if CYTHON_ASSUME_SAFE_SIZE
                  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                  #else
                  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                  #endif
                  #endif
                  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                  {
                    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_keys,&__pyx_mstate_global->__pyx_n_u_use_threads,0};
                    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(17, 5597, __pyx_L3_error)
                    if (__pyx_kwds_len > 0) {
                      switch (__pyx_nargs) {
                        case  2:
                        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(17, 5597, __pyx_L3_error)
                        CYTHON_FALLTHROUGH;
                        case  1:
                        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 5597, __pyx_L3_error)
                        CYTHON_FALLTHROUGH;
                        case  0: break;
                        default: goto __pyx_L5_argtuple_error;
                      }
                      const Py_ssize_t kwd_pos_args = __pyx_nargs;
                      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "group_by", 0) < (0)) __PYX_ERR(17, 5597, __pyx_L3_error)
                      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_True));
                      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("group_by", 0, 1, 2, i); __PYX_ERR(17, 5597, __pyx_L3_error) }
                      }
                    } else {
                      switch (__pyx_nargs) {
                        case  2:
                        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(17, 5597, __pyx_L3_error)
                        CYTHON_FALLTHROUGH;
                        case  1:
                        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 5597, __pyx_L3_error)
                        break;
                        default: goto __pyx_L5_argtuple_error;
                      }
                      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_True));
                    }
                    __pyx_v_keys = values[0];
                    __pyx_v_use_threads = values[1];
                  }
                  goto __pyx_L6_skip;
                  __pyx_L5_argtuple_error:;
                  __Pyx_RaiseArgtupleInvalid("group_by", 0, 1, 2, __pyx_nargs); __PYX_ERR(17, 5597, __pyx_L3_error)
                  __pyx_L6_skip:;
                  goto __pyx_L4_argument_unpacking_done;
                  __pyx_L3_error:;
                  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                    Py_XDECREF(values[__pyx_temp]);
                  }
                  __Pyx_AddTraceback("pyarrow.lib.Table.group_by", __pyx_clineno, __pyx_lineno, __pyx_filename);
                  __Pyx_RefNannyFinishContext();
                  return NULL;
                  __pyx_L4_argument_unpacking_done:;
                  __pyx_r = __pyx_pf_7pyarrow_3lib_5Table_56group_by(((struct __pyx_obj_7pyarrow_3lib_Table *)__pyx_v_self), __pyx_v_keys, __pyx_v_use_threads);

                  /* function exit code */
                  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                    Py_XDECREF(values[__pyx_temp]);
                  }
                  __Pyx_RefNannyFinishContext();
                  return __pyx_r;
                }

                static PyObject *__pyx_pf_7pyarrow_3lib_5Table_56group_by(struct __pyx_obj_7pyarrow_3lib_Table *__pyx_v_self, PyObject *__pyx_v_keys, PyObject *__pyx_v_use_threads) {
                  PyObject *__pyx_r = NULL;
                  __Pyx_RefNannyDeclarations
                  PyObject *__pyx_t_1 = NULL;
                  PyObject *__pyx_t_2 = NULL;
                  PyObject *__pyx_t_3 = NULL;
                  size_t __pyx_t_4;
                  PyObject *__pyx_t_5 = NULL;
                  int __pyx_lineno = 0;
                  const char *__pyx_filename = NULL;
                  int __pyx_clineno = 0;
                  __Pyx_RefNannySetupContext("group_by", 0);

                  /* "pyarrow/table.pxi":5637
 *         n_legs_sum: [[2,6,104,5]]
 *         """
 *         self._assert_cpu()             # <<<<<<<<<<<<<<
 *         return TableGroupBy(self, keys, use_threads=use_threads)
 * 
*/
                  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_assert_cpu");
                    __PYX_ERR(17, 5637, __pyx_L1_error)
                  }
                  ((struct __pyx_vtabstruct_7pyarrow_3lib_Table *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._assert_cpu(((struct __pyx_obj_7pyarrow_3lib__Tabular *)__pyx_v_self)); if (unlikely(PyErr_Occurred())) __PYX_ERR(17, 5637, __pyx_L1_error)

                  /* "pyarrow/table.pxi":5638
 *         """
 *         self._assert_cpu()
 *         return TableGroupBy(self, keys, use_threads=use_threads)             # <<<<<<<<<<<<<<
 * 
 *     def join(self, right_table, keys, right_keys=None, join_type="left outer",
*/
                  __Pyx_XDECREF(__pyx_r);
                  __pyx_t_2 = NULL;
                  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_TableGroupBy); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 5638, __pyx_L1_error)
                  __Pyx_GOTREF(__pyx_t_3);
                  __pyx_t_4 = 1;
                  #if CYTHON_UNPACK_METHODS
                  if (unlikely(PyMethod_Check(__pyx_t_3))) {
                    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
                    assert(__pyx_t_2);
                    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
                    __Pyx_INCREF(__pyx_t_2);
                    __Pyx_INCREF(__pyx__function);
                    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
                    __pyx_t_4 = 0;
                  }
                  #endif
                  {
                    PyObject *__pyx_callargs[3 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, ((PyObject *)__pyx_v_self), __pyx_v_keys};
                    __pyx_t_5 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 5638, __pyx_L1_error)
                    __Pyx_GOTREF(__pyx_t_5);
                    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_use_threads, __pyx_v_use_threads, __pyx_t_5, __pyx_callargs+3, 0) < (0)) __PYX_ERR(17, 5638, __pyx_L1_error)
                    __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_5);
                    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                    if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 5638, __pyx_L1_error)
                    __Pyx_GOTREF(__pyx_t_1);
                  }
                  __pyx_r = __pyx_t_1;
                  __pyx_t_1 = 0;
                  goto __pyx_L0;

                  /* "pyarrow/table.pxi":5597
 *         return self.drop_columns(columns)
 * 
 *     def group_by(self, keys, use_threads=True):             # <<<<<<<<<<<<<<
 *         """
 *         Declare a grouping over the columns of the table.
*/

                  /* function exit code */
                  __pyx_L1_error:;
                  __Pyx_XDECREF(__pyx_t_1);
                  __Pyx_XDECREF(__pyx_t_2);
                  __Pyx_XDECREF(__pyx_t_3);
                  __Pyx_XDECREF(__pyx_t_5);
                  __Pyx_AddTraceback("pyarrow.lib.Table.group_by", __pyx_clineno, __pyx_lineno, __pyx_filename);
                  __pyx_r = NULL;
                  __pyx_L0:;
                  __Pyx_XGIVEREF(__pyx_r);
                  __Pyx_RefNannyFinishContext();
                  return __pyx_r;
                }

                /* "pyarrow/table.pxi":5640
 *         return TableGroupBy(self, keys, use_threads=use_threads)
 * 
 *     def join(self, right_table, keys, right_keys=None, join_type="left outer",             # <<<<<<<<<<<<<<
 *              left_suffix=None, right_suffix=None, coalesce_keys=True,
 *              use_threads=True, filter_expression=None):
*/

                /* Python wrapper */
                static PyObject *__pyx_pw_7pyarrow_3lib_5Table_59join(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_5Table_58join, "Table.join(self, right_table, keys, right_keys=None, join_type='left outer', left_suffix=None, right_suffix=None, coalesce_keys=True, use_threads=True, filter_expression=None)\n\nPerform a join between this table and another one.\n\nResult of the join will be a new Table, where further\noperations can be applied.\n\nParameters\n----------\nright_table : Table\n    The table to join to the current one, acting as the right table\n    in the join operation.\nkeys : str or list[str]\n    The columns from current table that should be used as keys\n    of the join operation left side.\nright_keys : str or list[str], default None\n    The columns from the right_table that should be used as keys\n    on the join operation right side.\n    When ``None`` use the same key names as the left table.\njoin_type : str, default \"left outer\"\n    The kind of join that should be performed, one of\n    (\"left semi\", \"right semi\", \"left anti\", \"right anti\",\n    \"inner\", \"left outer\", \"right outer\", \"full outer\")\nleft_suffix : str, default None\n    Which suffix to add to left column names. This prevents confusion\n    when the columns in left and right tables have colliding names.\nright_suffix : str, default None\n    Which suffix to add to the right column names. This prevents confusion\n    when the columns in left and right tables have colliding names.\ncoalesce_keys : bool, default True\n    If the duplicated keys should be omitted from one of the sides\n    in the join result.\nuse_threads : bool, default True\n    Whether to use multithreading or not.\nfilter_expression : pyarrow.compute.Expression\n    Residual filter which is applied to matching row.\n\nReturns\n-------\nTable\n\nExamples\n--------\n>>> import pandas as pd\n>>> import pyarrow as pa\n>>> import pyarrow.compute as pc\n>>> df1 = pd.DataFrame({'id': [1, 2, 3],\n...                     'year': [2020, 2022, 2019]})\n>>> df2 = pd.DataFrame({'id': [3, 4],\n...                     'n_legs': [5, 100],""\n...                     'animal': [\"Brittle stars\", \"Centipede\"]})\n>>> t1 = pa.Table.from_pandas(df1)\n>>> t2 = pa.Table.from_pandas(df2)\n\nLeft outer join:\n\n>>> t1.join(t2, 'id').combine_chunks().sort_by('year')\npyarrow.Table\nid: int64\nyear: int64\nn_legs: int64\nanimal: string\n----\nid: [[3,1,2]]\nyear: [[2019,2020,2022]]\nn_legs: [[5,null,null]]\nanimal: [[\"Brittle stars\",null,null]]\n\nFull outer join:\n\n>>> t1.join(t2, 'id', join_type=\"full outer\").combine_chunks().sort_by('year')\npyarrow.Table\nid: int64\nyear: int64\nn_legs: int64\nanimal: string\n----\nid: [[3,1,2,4]]\nyear: [[2019,2020,2022,null]]\nn_legs: [[5,null,null,100]]\nanimal: [[\"Brittle stars\",null,null,\"Centipede\"]]\n\nRight outer join:\n\n>>> t1.join(t2, 'id', join_type=\"right outer\").combine_chunks().sort_by('year')\npyarrow.Table\nyear: int64\nid: int64\nn_legs: int64\nanimal: string\n----\nyear: [[2019,null]]\nid: [[3,4]]\nn_legs: [[5,100]]\nanimal: [[\"Brittle stars\",\"Centipede\"]]\n\nRight anti join:\n\n>>> t1.join(t2, 'id', join_type=\"right anti\")\npyarrow.Table\nid: int64\nn_legs: int64\nanimal: string\n----\nid: [[4]]\nn_legs: [[100]]\nanimal: [[\"Centipede\"]]\n\nInner join with intended mismatch filter expression:\n\n>>> t1.join(t2, 'id', join_type=\"inner\", filter_expression=pc.equal(pc.field(\"n_legs\"), 100))\npyarrow.Table\nid: int64\nyear: int64\nn_legs: int64\nanimal: string\n----\nid: []\nyear: []\nn_legs: []\nanimal: []");
                static PyMethodDef __pyx_mdef_7pyarrow_3lib_5Table_59join = {"join", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Table_59join, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Table_58join};
                static PyObject *__pyx_pw_7pyarrow_3lib_5Table_59join(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                  PyObject *__pyx_v_right_table = 0;
                  PyObject *__pyx_v_keys = 0;
                  PyObject *__pyx_v_right_keys = 0;
                  PyObject *__pyx_v_join_type = 0;
                  PyObject *__pyx_v_left_suffix = 0;
                  PyObject *__pyx_v_right_suffix = 0;
                  PyObject *__pyx_v_coalesce_keys = 0;
                  PyObject *__pyx_v_use_threads = 0;
                  PyObject *__pyx_v_filter_expression = 0;
                  #if !CYTHON_METH_FASTCALL
                  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                  #endif
                  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                  PyObject* values[9] = {0,0,0,0,0,0,0,0,0};
                  int __pyx_lineno = 0;
                  const char *__pyx_filename = NULL;
                  int __pyx_clineno = 0;
                  PyObject *__pyx_r = 0;
                  __Pyx_RefNannyDeclarations
                  __Pyx_RefNannySetupContext("join (wrapper)", 0);
                  #if !CYTHON_METH_FASTCALL
                  #if CYTHON_ASSUME_SAFE_SIZE
                  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                  #else
                  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                  #endif
                  #endif
                  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                  {
                    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_right_table,&__pyx_mstate_global->__pyx_n_u_keys,&__pyx_mstate_global->__pyx_n_u_right_keys,&__pyx_mstate_global->__pyx_n_u_join_type,&__pyx_mstate_global->__pyx_n_u_left_suffix,&__pyx_mstate_global->__pyx_n_u_right_suffix,&__pyx_mstate_global->__pyx_n_u_coalesce_keys,&__pyx_mstate_global->__pyx_n_u_use_threads,&__pyx_mstate_global->__pyx_n_u_filter_expression,0};
                    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(17, 5640, __pyx_L3_error)
                    if (__pyx_kwds_len > 0) {
                      switch (__pyx_nargs) {
                        case  9:
                        values[8] = __Pyx_ArgRef_FASTCALL(__pyx_args, 8);
                        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(17, 5640, __pyx_L3_error)
                        CYTHON_FALLTHROUGH;
                        case  8:
                        values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7);
                        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(17, 5640, __pyx_L3_error)
                        CYTHON_FALLTHROUGH;
                        case  7:
                        values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
                        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(17, 5640, __pyx_L3_error)
                        CYTHON_FALLTHROUGH;
                        case  6:
                        values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
                        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(17, 5640, __pyx_L3_error)
                        CYTHON_FALLTHROUGH;
                        case  5:
                        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
                        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(17, 5640, __pyx_L3_error)
                        CYTHON_FALLTHROUGH;
                        case  4:
                        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
                        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(17, 5640, __pyx_L3_error)
                        CYTHON_FALLTHROUGH;
                        case  3:
                        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
                        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(17, 5640, __pyx_L3_error)
                        CYTHON_FALLTHROUGH;
                        case  2:
                        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(17, 5640, __pyx_L3_error)
                        CYTHON_FALLTHROUGH;
                        case  1:
                        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 5640, __pyx_L3_error)
                        CYTHON_FALLTHROUGH;
                        case  0: break;
                        default: goto __pyx_L5_argtuple_error;
                      }
                      const Py_ssize_t kwd_pos_args = __pyx_nargs;
                      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "join", 0) < (0)) __PYX_ERR(17, 5640, __pyx_L3_error)
                      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
                      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_kp_u_left_outer));

                      /* "pyarrow/table.pxi":5641
 * 
 *     def join(self, right_table, keys, right_keys=None, join_type="left outer",
 *              left_suffix=None, right_suffix=None, coalesce_keys=True,             # <<<<<<<<<<<<<<
 *              use_threads=True, filter_expression=None):
 *         """
*/
                      if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)Py_None));
                      if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)Py_None));
                      if (!values[6]) values[6] = __Pyx_NewRef(((PyObject *)Py_True));

                      /* "pyarrow/table.pxi":5642
 *     def join(self, right_table, keys, right_keys=None, join_type="left outer",
 *              left_suffix=None, right_suffix=None, coalesce_keys=True,
 *              use_threads=True, filter_expression=None):             # <<<<<<<<<<<<<<
 *         """
 *         Perform a join between this table and another one.
*/
                      if (!values[7]) values[7] = __Pyx_NewRef(((PyObject *)Py_True));
                      if (!values[8]) values[8] = __Pyx_NewRef(((PyObject *)Py_None));
                      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
                        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("join", 0, 2, 9, i); __PYX_ERR(17, 5640, __pyx_L3_error) }
                      }
                    } else {
                      switch (__pyx_nargs) {
                        case  9:
                        values[8] = __Pyx_ArgRef_FASTCALL(__pyx_args, 8);
                        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(17, 5640, __pyx_L3_error)
                        CYTHON_FALLTHROUGH;
                        case  8:
                        values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7);
                        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(17, 5640, __pyx_L3_error)
                        CYTHON_FALLTHROUGH;
                        case  7:
                        values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
                        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(17, 5640, __pyx_L3_error)
                        CYTHON_FALLTHROUGH;
                        case  6:
                        values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
                        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(17, 5640, __pyx_L3_error)
                        CYTHON_FALLTHROUGH;
                        case  5:
                        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
                        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(17, 5640, __pyx_L3_error)
                        CYTHON_FALLTHROUGH;
                        case  4:
                        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
                        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(17, 5640, __pyx_L3_error)
                        CYTHON_FALLTHROUGH;
                        case  3:
                        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
                        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(17, 5640, __pyx_L3_error)
                        CYTHON_FALLTHROUGH;
                        case  2:
                        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(17, 5640, __pyx_L3_error)
                        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 5640, __pyx_L3_error)
                        break;
                        default: goto __pyx_L5_argtuple_error;
                      }

                      /* "pyarrow/table.pxi":5640
 *         return TableGroupBy(self, keys, use_threads=use_threads)
 * 
 *     def join(self, right_table, keys, right_keys=None, join_type="left outer",             # <<<<<<<<<<<<<<
 *              left_suffix=None, right_suffix=None, coalesce_keys=True,
 *              use_threads=True, filter_expression=None):
*/
                      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
                      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_kp_u_left_outer));

                      /* "pyarrow/table.pxi":5641
 * 
 *     def join(self, right_table, keys, right_keys=None, join_type="left outer",
 *              left_suffix=None, right_suffix=None, coalesce_keys=True,             # <<<<<<<<<<<<<<
 *              use_threads=True, filter_expression=None):
 *         """
*/
                      if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)Py_None));
                      if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)Py_None));
                      if (!values[6]) values[6] = __Pyx_NewRef(((PyObject *)Py_True));

                      /* "pyarrow/table.pxi":5642
 *     def join(self, right_table, keys, right_keys=None, join_type="left outer",
 *              left_suffix=None, right_suffix=None, coalesce_keys=True,
 *              use_threads=True, filter_expression=None):             # <<<<<<<<<<<<<<
 *         """
 *         Perform a join between this table and another one.
*/
                      if (!values[7]) values[7] = __Pyx_NewRef(((PyObject *)Py_True));
                      if (!values[8]) values[8] = __Pyx_NewRef(((PyObject *)Py_None));
                    }
                    __pyx_v_right_table = values[0];
                    __pyx_v_keys = values[1];
                    __pyx_v_right_keys = values[2];
                    __pyx_v_join_type = values[3];
                    __pyx_v_left_suffix = values[4];
                    __pyx_v_right_suffix = values[5];
                    __pyx_v_coalesce_keys = values[6];
                    __pyx_v_use_threads = values[7];
                    __pyx_v_filter_expression = values[8];
                  }
                  goto __pyx_L6_skip;
                  __pyx_L5_argtuple_error:;
                  __Pyx_RaiseArgtupleInvalid("join", 0, 2, 9, __pyx_nargs); __PYX_ERR(17, 5640, __pyx_L3_error)
                  __pyx_L6_skip:;
                  goto __pyx_L4_argument_unpacking_done;
                  __pyx_L3_error:;
                  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                    Py_XDECREF(values[__pyx_temp]);
                  }
                  __Pyx_AddTraceback("pyarrow.lib.Table.join", __pyx_clineno, __pyx_lineno, __pyx_filename);
                  __Pyx_RefNannyFinishContext();
                  return NULL;
                  __pyx_L4_argument_unpacking_done:;
                  __pyx_r = __pyx_pf_7pyarrow_3lib_5Table_58join(((struct __pyx_obj_7pyarrow_3lib_Table *)__pyx_v_self), __pyx_v_right_table, __pyx_v_keys, __pyx_v_right_keys, __pyx_v_join_type, __pyx_v_left_suffix, __pyx_v_right_suffix, __pyx_v_coalesce_keys, __pyx_v_use_threads, __pyx_v_filter_expression);

                  /* "pyarrow/table.pxi":5640
 *         return TableGroupBy(self, keys, use_threads=use_threads)
 * 
 *     def join(self, right_table, keys, right_keys=None, join_type="left outer",             # <<<<<<<<<<<<<<
 *              left_suffix=None, right_suffix=None, coalesce_keys=True,
 *              use_threads=True, filter_expression=None):
*/

                  /* function exit code */
                  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                    Py_XDECREF(values[__pyx_temp]);
                  }
                  __Pyx_RefNannyFinishContext();
                  return __pyx_r;
                }

                static PyObject *__pyx_pf_7pyarrow_3lib_5Table_58join(struct __pyx_obj_7pyarrow_3lib_Table *__pyx_v_self, PyObject *__pyx_v_right_table, PyObject *__pyx_v_keys, PyObject *__pyx_v_right_keys, PyObject *__pyx_v_join_type, PyObject *__pyx_v_left_suffix, PyObject *__pyx_v_right_suffix, PyObject *__pyx_v_coalesce_keys, PyObject *__pyx_v_use_threads, PyObject *__pyx_v_filter_expression) {
                  PyObject *__pyx_r = NULL;
                  __Pyx_RefNannyDeclarations
                  int __pyx_t_1;
                  PyObject *__pyx_t_2 = NULL;
                  PyObject *__pyx_t_3 = NULL;
                  PyObject *__pyx_t_4 = NULL;
                  PyObject *__pyx_t_5 = NULL;
                  PyObject *__pyx_t_6 = NULL;
                  size_t __pyx_t_7;
                  int __pyx_lineno = 0;
                  const char *__pyx_filename = NULL;
                  int __pyx_clineno = 0;
                  __Pyx_RefNannySetupContext("join", 0);
                  __Pyx_INCREF(__pyx_v_right_keys);

                  /* "pyarrow/table.pxi":5764
 *         animal: []
 *         """
 *         self._assert_cpu()             # <<<<<<<<<<<<<<
 *         if right_keys is None:
 *             right_keys = keys
*/
                  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_assert_cpu");
                    __PYX_ERR(17, 5764, __pyx_L1_error)
                  }
                  ((struct __pyx_vtabstruct_7pyarrow_3lib_Table *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._assert_cpu(((struct __pyx_obj_7pyarrow_3lib__Tabular *)__pyx_v_self)); if (unlikely(PyErr_Occurred())) __PYX_ERR(17, 5764, __pyx_L1_error)

                  /* "pyarrow/table.pxi":5765
 *         """
 *         self._assert_cpu()
 *         if right_keys is None:             # <<<<<<<<<<<<<<
 *             right_keys = keys
 *         return _pac()._perform_join(
*/
                  __pyx_t_1 = (__pyx_v_right_keys == Py_None);
                  if (__pyx_t_1) {

                    /* "pyarrow/table.pxi":5766
 *         self._assert_cpu()
 *         if right_keys is None:
 *             right_keys = keys             # <<<<<<<<<<<<<<
 *         return _pac()._perform_join(
 *             join_type, self, keys, right_table, right_keys,
*/
                    __Pyx_INCREF(__pyx_v_keys);
                    __Pyx_DECREF_SET(__pyx_v_right_keys, __pyx_v_keys);

                    /* "pyarrow/table.pxi":5765
 *         """
 *         self._assert_cpu()
 *         if right_keys is None:             # <<<<<<<<<<<<<<
 *             right_keys = keys
 *         return _pac()._perform_join(
*/
                  }

                  /* "pyarrow/table.pxi":5767
 *         if right_keys is None:
 *             right_keys = keys
 *         return _pac()._perform_join(             # <<<<<<<<<<<<<<
 *             join_type, self, keys, right_table, right_keys,
 *             left_suffix=left_suffix, right_suffix=right_suffix,
*/
                  __Pyx_XDECREF(__pyx_r);
                  __pyx_t_5 = NULL;
                  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_pac_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 5767, __pyx_L1_error)
                  __Pyx_GOTREF(__pyx_t_6);
                  __pyx_t_7 = 1;
                  #if CYTHON_UNPACK_METHODS
                  if (unlikely(PyMethod_Check(__pyx_t_6))) {
                    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
                    assert(__pyx_t_5);
                    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
                    __Pyx_INCREF(__pyx_t_5);
                    __Pyx_INCREF(__pyx__function);
                    __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
                    __pyx_t_7 = 0;
                  }
                  #endif
                  {
                    PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
                    __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
                    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                    if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 5767, __pyx_L1_error)
                    __Pyx_GOTREF(__pyx_t_4);
                  }
                  __pyx_t_3 = __pyx_t_4;
                  __Pyx_INCREF(__pyx_t_3);

                  /* "pyarrow/table.pxi":5772
 *             use_threads=use_threads, coalesce_keys=coalesce_keys,
 *             output_type=Table,
 *             filter_expression=filter_expression,             # <<<<<<<<<<<<<<
 *         )
 * 
*/
                  __pyx_t_7 = 0;
                  {
                    PyObject *__pyx_callargs[6 + ((CYTHON_VECTORCALL) ? 6 : 0)] = {__pyx_t_3, __pyx_v_join_type, ((PyObject *)__pyx_v_self), __pyx_v_keys, __pyx_v_right_table, __pyx_v_right_keys};
                    __pyx_t_6 = __Pyx_MakeVectorcallBuilderKwds(6); if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 5767, __pyx_L1_error)
                    __Pyx_GOTREF(__pyx_t_6);
                    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_left_suffix, __pyx_v_left_suffix, __pyx_t_6, __pyx_callargs+6, 0) < (0)) __PYX_ERR(17, 5767, __pyx_L1_error)
                    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_right_suffix, __pyx_v_right_suffix, __pyx_t_6, __pyx_callargs+6, 1) < (0)) __PYX_ERR(17, 5767, __pyx_L1_error)
                    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_use_threads, __pyx_v_use_threads, __pyx_t_6, __pyx_callargs+6, 2) < (0)) __PYX_ERR(17, 5767, __pyx_L1_error)
                    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_coalesce_keys, __pyx_v_coalesce_keys, __pyx_t_6, __pyx_callargs+6, 3) < (0)) __PYX_ERR(17, 5767, __pyx_L1_error)
                    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_output_type, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Table), __pyx_t_6, __pyx_callargs+6, 4) < (0)) __PYX_ERR(17, 5767, __pyx_L1_error)
                    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_filter_expression, __pyx_v_filter_expression, __pyx_t_6, __pyx_callargs+6, 5) < (0)) __PYX_ERR(17, 5767, __pyx_L1_error)
                    __pyx_t_2 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_perform_join, __pyx_callargs+__pyx_t_7, (6-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_6);
                    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                    if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 5767, __pyx_L1_error)
                    __Pyx_GOTREF(__pyx_t_2);
                  }
                  __pyx_r = __pyx_t_2;
                  __pyx_t_2 = 0;
                  goto __pyx_L0;

                  /* "pyarrow/table.pxi":5640
 *         return TableGroupBy(self, keys, use_threads=use_threads)
 * 
 *     def join(self, right_table, keys, right_keys=None, join_type="left outer",             # <<<<<<<<<<<<<<
 *              left_suffix=None, right_suffix=None, coalesce_keys=True,
 *              use_threads=True, filter_expression=None):
*/

                  /* function exit code */
                  __pyx_L1_error:;
                  __Pyx_XDECREF(__pyx_t_2);
                  __Pyx_XDECREF(__pyx_t_3);
                  __Pyx_XDECREF(__pyx_t_4);
                  __Pyx_XDECREF(__pyx_t_5);
                  __Pyx_XDECREF(__pyx_t_6);
                  __Pyx_AddTraceback("pyarrow.lib.Table.join", __pyx_clineno, __pyx_lineno, __pyx_filename);
                  __pyx_r = NULL;
                  __pyx_L0:;
                  __Pyx_XDECREF(__pyx_v_right_keys);
                  __Pyx_XGIVEREF(__pyx_r);
                  __Pyx_RefNannyFinishContext();
                  return __pyx_r;
                }

                /* "pyarrow/table.pxi":5775
 *         )
 * 
 *     def join_asof(self, right_table, on, by, tolerance, right_on=None, right_by=None):             # <<<<<<<<<<<<<<
 *         """
 *         Perform an asof join between this table and another one.
*/

                /* Python wrapper */
                static PyObject *__pyx_pw_7pyarrow_3lib_5Table_61join_asof(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_5Table_60join_asof, "Table.join_asof(self, right_table, on, by, tolerance, right_on=None, right_by=None)\n\nPerform an asof join between this table and another one.\n\nThis is similar to a left-join except that we match on nearest key rather\nthan equal keys. Both tables must be sorted by the key. This type of join\nis most useful for time series data that are not perfectly aligned.\n\nOptionally match on equivalent keys with \"by\" before searching with \"on\".\n\nResult of the join will be a new Table, where further\noperations can be applied.\n\nParameters\n----------\nright_table : Table\n    The table to join to the current one, acting as the right table\n    in the join operation.\non : str\n    The column from current table that should be used as the \"on\" key\n    of the join operation left side.\n\n    An inexact match is used on the \"on\" key, i.e. a row is considered a\n    match if and only if ``right.on - left.on`` is in the range\n    ``[min(0, tolerance), max(0, tolerance)]``.\n\n    The input dataset must be sorted by the \"on\" key. Must be a single\n    field of a common type.\n\n    Currently, the \"on\" key must be an integer, date, or timestamp type.\nby : str or list[str]\n    The columns from current table that should be used as the keys\n    of the join operation left side. The join operation is then done\n    only for the matches in these columns.\ntolerance : int\n    The tolerance for inexact \"on\" key matching. A right row is considered\n    a match with a left row if ``right.on - left.on`` is in the range\n    ``[min(0, tolerance), max(0, tolerance)]``. ``tolerance`` may be:\n\n    - negative, in which case a past-as-of-join occurs\n      (match iff ``tolerance <= right.on - left.on <= 0``);\n    - or positive, in which case a future-as-of-join occurs\n      (match iff ``0 <= right.on - left.on <= tolerance``);\n    - or zero, in which case an exact-as-of-join occurs\n      (match iff ``right.on == left.on``).\n\n    The tolerance is interpreted in the sa""me units as the \"on\" key.\nright_on : str or list[str], default None\n    The columns from the right_table that should be used as the on key\n    on the join operation right side.\n    When ``None`` use the same key name as the left table.\nright_by : str or list[str], default None\n    The columns from the right_table that should be used as keys\n    on the join operation right side.\n    When ``None`` use the same key names as the left table.\n\nReturns\n-------\nTable\n\nExample\n--------\n>>> import pyarrow as pa\n>>> t1 = pa.table({'id': [1, 3, 2, 3, 3],\n...                'year': [2020, 2021, 2022, 2022, 2023]})\n>>> t2 = pa.table({'id': [3, 4],\n...                'year': [2020, 2021],\n...                'n_legs': [5, 100],\n...                'animal': [\"Brittle stars\", \"Centipede\"]})\n\n>>> t1.join_asof(t2, on='year', by='id', tolerance=-2)\npyarrow.Table\nid: int64\nyear: int64\nn_legs: int64\nanimal: string\n----\nid: [[1,3,2,3,3]]\nyear: [[2020,2021,2022,2022,2023]]\nn_legs: [[null,5,null,5,null]]\nanimal: [[null,\"Brittle stars\",null,\"Brittle stars\",null]]");
                static PyMethodDef __pyx_mdef_7pyarrow_3lib_5Table_61join_asof = {"join_asof", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Table_61join_asof, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Table_60join_asof};
                static PyObject *__pyx_pw_7pyarrow_3lib_5Table_61join_asof(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                  PyObject *__pyx_v_right_table = 0;
                  PyObject *__pyx_v_on = 0;
                  PyObject *__pyx_v_by = 0;
                  PyObject *__pyx_v_tolerance = 0;
                  PyObject *__pyx_v_right_on = 0;
                  PyObject *__pyx_v_right_by = 0;
                  #if !CYTHON_METH_FASTCALL
                  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                  #endif
                  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                  PyObject* values[6] = {0,0,0,0,0,0};
                  int __pyx_lineno = 0;
                  const char *__pyx_filename = NULL;
                  int __pyx_clineno = 0;
                  PyObject *__pyx_r = 0;
                  __Pyx_RefNannyDeclarations
                  __Pyx_RefNannySetupContext("join_asof (wrapper)", 0);
                  #if !CYTHON_METH_FASTCALL
                  #if CYTHON_ASSUME_SAFE_SIZE
                  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                  #else
                  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                  #endif
                  #endif
                  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                  {
                    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_right_table,&__pyx_mstate_global->__pyx_n_u_on,&__pyx_mstate_global->__pyx_n_u_by,&__pyx_mstate_global->__pyx_n_u_tolerance,&__pyx_mstate_global->__pyx_n_u_right_on,&__pyx_mstate_global->__pyx_n_u_right_by,0};
                    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(17, 5775, __pyx_L3_error)
                    if (__pyx_kwds_len > 0) {
                      switch (__pyx_nargs) {
                        case  6:
                        values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
                        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(17, 5775, __pyx_L3_error)
                        CYTHON_FALLTHROUGH;
                        case  5:
                        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
                        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(17, 5775, __pyx_L3_error)
                        CYTHON_FALLTHROUGH;
                        case  4:
                        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
                        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(17, 5775, __pyx_L3_error)
                        CYTHON_FALLTHROUGH;
                        case  3:
                        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
                        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(17, 5775, __pyx_L3_error)
                        CYTHON_FALLTHROUGH;
                        case  2:
                        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(17, 5775, __pyx_L3_error)
                        CYTHON_FALLTHROUGH;
                        case  1:
                        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 5775, __pyx_L3_error)
                        CYTHON_FALLTHROUGH;
                        case  0: break;
                        default: goto __pyx_L5_argtuple_error;
                      }
                      const Py_ssize_t kwd_pos_args = __pyx_nargs;
                      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "join_asof", 0) < (0)) __PYX_ERR(17, 5775, __pyx_L3_error)
                      if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)Py_None));
                      if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)Py_None));
                      for (Py_ssize_t i = __pyx_nargs; i < 4; i++) {
                        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("join_asof", 0, 4, 6, i); __PYX_ERR(17, 5775, __pyx_L3_error) }
                      }
                    } else {
                      switch (__pyx_nargs) {
                        case  6:
                        values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
                        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(17, 5775, __pyx_L3_error)
                        CYTHON_FALLTHROUGH;
                        case  5:
                        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
                        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(17, 5775, __pyx_L3_error)
                        CYTHON_FALLTHROUGH;
                        case  4:
                        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
                        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(17, 5775, __pyx_L3_error)
                        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
                        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(17, 5775, __pyx_L3_error)
                        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(17, 5775, __pyx_L3_error)
                        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 5775, __pyx_L3_error)
                        break;
                        default: goto __pyx_L5_argtuple_error;
                      }
                      if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)Py_None));
                      if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)Py_None));
                    }
                    __pyx_v_right_table = values[0];
                    __pyx_v_on = values[1];
                    __pyx_v_by = values[2];
                    __pyx_v_tolerance = values[3];
                    __pyx_v_right_on = values[4];
                    __pyx_v_right_by = values[5];
                  }
                  goto __pyx_L6_skip;
                  __pyx_L5_argtuple_error:;
                  __Pyx_RaiseArgtupleInvalid("join_asof", 0, 4, 6, __pyx_nargs); __PYX_ERR(17, 5775, __pyx_L3_error)
                  __pyx_L6_skip:;
                  goto __pyx_L4_argument_unpacking_done;
                  __pyx_L3_error:;
                  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                    Py_XDECREF(values[__pyx_temp]);
                  }
                  __Pyx_AddTraceback("pyarrow.lib.Table.join_asof", __pyx_clineno, __pyx_lineno, __pyx_filename);
                  __Pyx_RefNannyFinishContext();
                  return NULL;
                  __pyx_L4_argument_unpacking_done:;
                  __pyx_r = __pyx_pf_7pyarrow_3lib_5Table_60join_asof(((struct __pyx_obj_7pyarrow_3lib_Table *)__pyx_v_self), __pyx_v_right_table, __pyx_v_on, __pyx_v_by, __pyx_v_tolerance, __pyx_v_right_on, __pyx_v_right_by);

                  /* function exit code */
                  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                    Py_XDECREF(values[__pyx_temp]);
                  }
                  __Pyx_RefNannyFinishContext();
                  return __pyx_r;
                }

                static PyObject *__pyx_pf_7pyarrow_3lib_5Table_60join_asof(struct __pyx_obj_7pyarrow_3lib_Table *__pyx_v_self, PyObject *__pyx_v_right_table, PyObject *__pyx_v_on, PyObject *__pyx_v_by, PyObject *__pyx_v_tolerance, PyObject *__pyx_v_right_on, PyObject *__pyx_v_right_by) {
                  PyObject *__pyx_r = NULL;
                  __Pyx_RefNannyDeclarations
                  int __pyx_t_1;
                  PyObject *__pyx_t_2 = NULL;
                  PyObject *__pyx_t_3 = NULL;
                  PyObject *__pyx_t_4 = NULL;
                  PyObject *__pyx_t_5 = NULL;
                  PyObject *__pyx_t_6 = NULL;
                  size_t __pyx_t_7;
                  int __pyx_lineno = 0;
                  const char *__pyx_filename = NULL;
                  int __pyx_clineno = 0;
                  __Pyx_RefNannySetupContext("join_asof", 0);
                  __Pyx_INCREF(__pyx_v_right_on);
                  __Pyx_INCREF(__pyx_v_right_by);

                  /* "pyarrow/table.pxi":5857
 *         animal: [[null,"Brittle stars",null,"Brittle stars",null]]
 *         """
 *         self._assert_cpu()             # <<<<<<<<<<<<<<
 *         if right_on is None:
 *             right_on = on
*/
                  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_assert_cpu");
                    __PYX_ERR(17, 5857, __pyx_L1_error)
                  }
                  ((struct __pyx_vtabstruct_7pyarrow_3lib_Table *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._assert_cpu(((struct __pyx_obj_7pyarrow_3lib__Tabular *)__pyx_v_self)); if (unlikely(PyErr_Occurred())) __PYX_ERR(17, 5857, __pyx_L1_error)

                  /* "pyarrow/table.pxi":5858
 *         """
 *         self._assert_cpu()
 *         if right_on is None:             # <<<<<<<<<<<<<<
 *             right_on = on
 *         if right_by is None:
*/
                  __pyx_t_1 = (__pyx_v_right_on == Py_None);
                  if (__pyx_t_1) {

                    /* "pyarrow/table.pxi":5859
 *         self._assert_cpu()
 *         if right_on is None:
 *             right_on = on             # <<<<<<<<<<<<<<
 *         if right_by is None:
 *             right_by = by
*/
                    __Pyx_INCREF(__pyx_v_on);
                    __Pyx_DECREF_SET(__pyx_v_right_on, __pyx_v_on);

                    /* "pyarrow/table.pxi":5858
 *         """
 *         self._assert_cpu()
 *         if right_on is None:             # <<<<<<<<<<<<<<
 *             right_on = on
 *         if right_by is None:
*/
                  }

                  /* "pyarrow/table.pxi":5860
 *         if right_on is None:
 *             right_on = on
 *         if right_by is None:             # <<<<<<<<<<<<<<
 *             right_by = by
 *         return _pac()._perform_join_asof(self, on, by,
*/
                  __pyx_t_1 = (__pyx_v_right_by == Py_None);
                  if (__pyx_t_1) {

                    /* "pyarrow/table.pxi":5861
 *             right_on = on
 *         if right_by is None:
 *             right_by = by             # <<<<<<<<<<<<<<
 *         return _pac()._perform_join_asof(self, on, by,
 *                                          right_table, right_on, right_by,
*/
                    __Pyx_INCREF(__pyx_v_by);
                    __Pyx_DECREF_SET(__pyx_v_right_by, __pyx_v_by);

                    /* "pyarrow/table.pxi":5860
 *         if right_on is None:
 *             right_on = on
 *         if right_by is None:             # <<<<<<<<<<<<<<
 *             right_by = by
 *         return _pac()._perform_join_asof(self, on, by,
*/
                  }

                  /* "pyarrow/table.pxi":5862
 *         if right_by is None:
 *             right_by = by
 *         return _pac()._perform_join_asof(self, on, by,             # <<<<<<<<<<<<<<
 *                                          right_table, right_on, right_by,
 *                                          tolerance, output_type=Table)
*/
                  __Pyx_XDECREF(__pyx_r);
                  __pyx_t_5 = NULL;
                  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_pac_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 5862, __pyx_L1_error)
                  __Pyx_GOTREF(__pyx_t_6);
                  __pyx_t_7 = 1;
                  #if CYTHON_UNPACK_METHODS
                  if (unlikely(PyMethod_Check(__pyx_t_6))) {
                    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
                    assert(__pyx_t_5);
                    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
                    __Pyx_INCREF(__pyx_t_5);
                    __Pyx_INCREF(__pyx__function);
                    __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
                    __pyx_t_7 = 0;
                  }
                  #endif
                  {
                    PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
                    __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
                    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                    if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 5862, __pyx_L1_error)
                    __Pyx_GOTREF(__pyx_t_4);
                  }
                  __pyx_t_3 = __pyx_t_4;
                  __Pyx_INCREF(__pyx_t_3);

                  /* "pyarrow/table.pxi":5864
 *         return _pac()._perform_join_asof(self, on, by,
 *                                          right_table, right_on, right_by,
 *                                          tolerance, output_type=Table)             # <<<<<<<<<<<<<<
 * 
 *     def __arrow_c_stream__(self, requested_schema=None):
*/
                  __pyx_t_7 = 0;
                  {
                    PyObject *__pyx_callargs[8 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_3, ((PyObject *)__pyx_v_self), __pyx_v_on, __pyx_v_by, __pyx_v_right_table, __pyx_v_right_on, __pyx_v_right_by, __pyx_v_tolerance};
                    __pyx_t_6 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 5862, __pyx_L1_error)
                    __Pyx_GOTREF(__pyx_t_6);
                    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_output_type, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Table), __pyx_t_6, __pyx_callargs+8, 0) < (0)) __PYX_ERR(17, 5862, __pyx_L1_error)
                    __pyx_t_2 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_perform_join_asof, __pyx_callargs+__pyx_t_7, (8-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_6);
                    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                    if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 5862, __pyx_L1_error)
                    __Pyx_GOTREF(__pyx_t_2);
                  }
                  __pyx_r = __pyx_t_2;
                  __pyx_t_2 = 0;
                  goto __pyx_L0;

                  /* "pyarrow/table.pxi":5775
 *         )
 * 
 *     def join_asof(self, right_table, on, by, tolerance, right_on=None, right_by=None):             # <<<<<<<<<<<<<<
 *         """
 *         Perform an asof join between this table and another one.
*/

                  /* function exit code */
                  __pyx_L1_error:;
                  __Pyx_XDECREF(__pyx_t_2);
                  __Pyx_XDECREF(__pyx_t_3);
                  __Pyx_XDECREF(__pyx_t_4);
                  __Pyx_XDECREF(__pyx_t_5);
                  __Pyx_XDECREF(__pyx_t_6);
                  __Pyx_AddTraceback("pyarrow.lib.Table.join_asof", __pyx_clineno, __pyx_lineno, __pyx_filename);
                  __pyx_r = NULL;
                  __pyx_L0:;
                  __Pyx_XDECREF(__pyx_v_right_on);
                  __Pyx_XDECREF(__pyx_v_right_by);
                  __Pyx_XGIVEREF(__pyx_r);
                  __Pyx_RefNannyFinishContext();
                  return __pyx_r;
                }

                /* "pyarrow/table.pxi":5866
 *                                          tolerance, output_type=Table)
 * 
 *     def __arrow_c_stream__(self, requested_schema=None):             # <<<<<<<<<<<<<<
 *         """
 *         Export the table as an Arrow C stream PyCapsule.
*/

                /* Python wrapper */
                static PyObject *__pyx_pw_7pyarrow_3lib_5Table_63__arrow_c_stream__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_5Table_62__arrow_c_stream__, "Table.__arrow_c_stream__(self, requested_schema=None)\n\nExport the table as an Arrow C stream PyCapsule.\n\nParameters\n----------\nrequested_schema : PyCapsule, default None\n    The schema to which the stream should be casted, passed as a\n    PyCapsule containing a C ArrowSchema representation of the\n    requested schema.\n    Currently, this is not supported and will raise a\n    NotImplementedError if the schema doesn't match the current schema.\n\nReturns\n-------\nPyCapsule");
                static PyMethodDef __pyx_mdef_7pyarrow_3lib_5Table_63__arrow_c_stream__ = {"__arrow_c_stream__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Table_63__arrow_c_stream__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Table_62__arrow_c_stream__};
                static PyObject *__pyx_pw_7pyarrow_3lib_5Table_63__arrow_c_stream__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                  PyObject *__pyx_v_requested_schema = 0;
                  #if !CYTHON_METH_FASTCALL
                  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                  #endif
                  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                  PyObject* values[1] = {0};
                  int __pyx_lineno = 0;
                  const char *__pyx_filename = NULL;
                  int __pyx_clineno = 0;
                  PyObject *__pyx_r = 0;
                  __Pyx_RefNannyDeclarations
                  __Pyx_RefNannySetupContext("__arrow_c_stream__ (wrapper)", 0);
                  #if !CYTHON_METH_FASTCALL
                  #if CYTHON_ASSUME_SAFE_SIZE
                  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                  #else
                  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                  #endif
                  #endif
                  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                  {
                    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_requested_schema,0};
                    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(17, 5866, __pyx_L3_error)
                    if (__pyx_kwds_len > 0) {
                      switch (__pyx_nargs) {
                        case  1:
                        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 5866, __pyx_L3_error)
                        CYTHON_FALLTHROUGH;
                        case  0: break;
                        default: goto __pyx_L5_argtuple_error;
                      }
                      const Py_ssize_t kwd_pos_args = __pyx_nargs;
                      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__arrow_c_stream__", 0) < (0)) __PYX_ERR(17, 5866, __pyx_L3_error)
                      if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
                    } else {
                      switch (__pyx_nargs) {
                        case  1:
                        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 5866, __pyx_L3_error)
                        CYTHON_FALLTHROUGH;
                        case  0: break;
                        default: goto __pyx_L5_argtuple_error;
                      }
                      if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
                    }
                    __pyx_v_requested_schema = values[0];
                  }
                  goto __pyx_L6_skip;
                  __pyx_L5_argtuple_error:;
                  __Pyx_RaiseArgtupleInvalid("__arrow_c_stream__", 0, 0, 1, __pyx_nargs); __PYX_ERR(17, 5866, __pyx_L3_error)
                  __pyx_L6_skip:;
                  goto __pyx_L4_argument_unpacking_done;
                  __pyx_L3_error:;
                  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                    Py_XDECREF(values[__pyx_temp]);
                  }
                  __Pyx_AddTraceback("pyarrow.lib.Table.__arrow_c_stream__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                  __Pyx_RefNannyFinishContext();
                  return NULL;
                  __pyx_L4_argument_unpacking_done:;
                  __pyx_r = __pyx_pf_7pyarrow_3lib_5Table_62__arrow_c_stream__(((struct __pyx_obj_7pyarrow_3lib_Table *)__pyx_v_self), __pyx_v_requested_schema);

                  /* function exit code */
                  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                    Py_XDECREF(values[__pyx_temp]);
                  }
                  __Pyx_RefNannyFinishContext();
                  return __pyx_r;
                }

                static PyObject *__pyx_pf_7pyarrow_3lib_5Table_62__arrow_c_stream__(struct __pyx_obj_7pyarrow_3lib_Table *__pyx_v_self, PyObject *__pyx_v_requested_schema) {
                  PyObject *__pyx_r = NULL;
                  __Pyx_RefNannyDeclarations
                  PyObject *__pyx_t_1 = NULL;
                  PyObject *__pyx_t_2 = NULL;
                  PyObject *__pyx_t_3 = NULL;
                  PyObject *__pyx_t_4 = NULL;
                  size_t __pyx_t_5;
                  int __pyx_lineno = 0;
                  const char *__pyx_filename = NULL;
                  int __pyx_clineno = 0;
                  __Pyx_RefNannySetupContext("__arrow_c_stream__", 0);

                  /* "pyarrow/table.pxi":5883
 *         PyCapsule
 *         """
 *         self._assert_cpu()             # <<<<<<<<<<<<<<
 *         return self.to_reader().__arrow_c_stream__(requested_schema)
 * 
*/
                  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_assert_cpu");
                    __PYX_ERR(17, 5883, __pyx_L1_error)
                  }
                  ((struct __pyx_vtabstruct_7pyarrow_3lib_Table *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._assert_cpu(((struct __pyx_obj_7pyarrow_3lib__Tabular *)__pyx_v_self)); if (unlikely(PyErr_Occurred())) __PYX_ERR(17, 5883, __pyx_L1_error)

                  /* "pyarrow/table.pxi":5884
 *         """
 *         self._assert_cpu()
 *         return self.to_reader().__arrow_c_stream__(requested_schema)             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
                  __Pyx_XDECREF(__pyx_r);
                  __pyx_t_4 = ((PyObject *)__pyx_v_self);
                  __Pyx_INCREF(__pyx_t_4);
                  __pyx_t_5 = 0;
                  {
                    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
                    __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_to_reader, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                    if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 5884, __pyx_L1_error)
                    __Pyx_GOTREF(__pyx_t_3);
                  }
                  __pyx_t_2 = __pyx_t_3;
                  __Pyx_INCREF(__pyx_t_2);
                  __pyx_t_5 = 0;
                  {
                    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_requested_schema};
                    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_arrow_c_stream, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                    if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 5884, __pyx_L1_error)
                    __Pyx_GOTREF(__pyx_t_1);
                  }
                  __pyx_r = __pyx_t_1;
                  __pyx_t_1 = 0;
                  goto __pyx_L0;

                  /* "pyarrow/table.pxi":5866
 *                                          tolerance, output_type=Table)
 * 
 *     def __arrow_c_stream__(self, requested_schema=None):             # <<<<<<<<<<<<<<
 *         """
 *         Export the table as an Arrow C stream PyCapsule.
*/

                  /* function exit code */
                  __pyx_L1_error:;
                  __Pyx_XDECREF(__pyx_t_1);
                  __Pyx_XDECREF(__pyx_t_2);
                  __Pyx_XDECREF(__pyx_t_3);
                  __Pyx_XDECREF(__pyx_t_4);
                  __Pyx_AddTraceback("pyarrow.lib.Table.__arrow_c_stream__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                  __pyx_r = NULL;
                  __pyx_L0:;
                  __Pyx_XGIVEREF(__pyx_r);
                  __Pyx_RefNannyFinishContext();
                  return __pyx_r;
                }

                /* "pyarrow/table.pxi":5886
 *         return self.to_reader().__arrow_c_stream__(requested_schema)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_cpu(self):
 *         """
*/

                /* Python wrapper */
                static PyObject *__pyx_pw_7pyarrow_3lib_5Table_6is_cpu_1__get__(PyObject *__pyx_v_self); /*proto*/
                static PyObject *__pyx_pw_7pyarrow_3lib_5Table_6is_cpu_1__get__(PyObject *__pyx_v_self) {
                  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                  PyObject *__pyx_r = 0;
                  __Pyx_RefNannyDeclarations
                  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
                  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                  __pyx_r = __pyx_pf_7pyarrow_3lib_5Table_6is_cpu___get__(((struct __pyx_obj_7pyarrow_3lib_Table *)__pyx_v_self));

                  /* function exit code */
                  __Pyx_RefNannyFinishContext();
                  return __pyx_r;
                }
                static PyObject *__pyx_gb_7pyarrow_3lib_5Table_6is_cpu_7__get___2generator16(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

                /* "pyarrow/table.pxi":5892
 *         """
 *         if not self._init_is_cpu:
 *             self._is_cpu = all(c.is_cpu for c in self.itercolumns())             # <<<<<<<<<<<<<<
 *             self._init_is_cpu = True
 *         return self._is_cpu
*/

                static PyObject *__pyx_pf_7pyarrow_3lib_5Table_6is_cpu_7__get___genexpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0) {
                  struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_16_genexpr *__pyx_cur_scope;
                  PyObject *__pyx_r = NULL;
                  __Pyx_RefNannyDeclarations
                  int __pyx_lineno = 0;
                  const char *__pyx_filename = NULL;
                  int __pyx_clineno = 0;
                  __Pyx_RefNannySetupContext("genexpr", 0);
                  __pyx_cur_scope = (struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_16_genexpr *)__pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_16_genexpr(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_16_genexpr, __pyx_mstate_global->__pyx_empty_tuple, NULL);
                  if (unlikely(!__pyx_cur_scope)) {
                    __pyx_cur_scope = ((struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_16_genexpr *)Py_None);
                    __Pyx_INCREF(Py_None);
                    __PYX_ERR(17, 5892, __pyx_L1_error)
                  } else {
                    __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
                  }
                  __pyx_cur_scope->__pyx_genexpr_arg_0 = __pyx_genexpr_arg_0;
                  __Pyx_INCREF(__pyx_cur_scope->__pyx_genexpr_arg_0);
                  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_genexpr_arg_0);
                  {
                    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7pyarrow_3lib_5Table_6is_cpu_7__get___2generator16, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[15]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_Table___get___locals_genexpr, __pyx_mstate_global->__pyx_n_u_pyarrow_lib); if (unlikely(!gen)) __PYX_ERR(17, 5892, __pyx_L1_error)
                    __Pyx_DECREF(__pyx_cur_scope);
                    __Pyx_RefNannyFinishContext();
                    return (PyObject *) gen;
                  }

                  /* function exit code */
                  __pyx_L1_error:;
                  __Pyx_AddTraceback("pyarrow.lib.Table.is_cpu.__get__.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
                  __pyx_r = NULL;
                  __Pyx_DECREF((PyObject *)__pyx_cur_scope);
                  __Pyx_XGIVEREF(__pyx_r);
                  __Pyx_RefNannyFinishContext();
                  return __pyx_r;
                }

                static PyObject *__pyx_gb_7pyarrow_3lib_5Table_6is_cpu_7__get___2generator16(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
                  struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_16_genexpr *__pyx_cur_scope = ((struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_16_genexpr *)__pyx_generator->closure);
                  PyObject *__pyx_r = NULL;
                  PyObject *__pyx_t_1 = NULL;
                  Py_ssize_t __pyx_t_2;
                  PyObject *(*__pyx_t_3)(PyObject *);
                  PyObject *__pyx_t_4 = NULL;
                  int __pyx_t_5;
                  int __pyx_t_6;
                  int __pyx_lineno = 0;
                  const char *__pyx_filename = NULL;
                  int __pyx_clineno = 0;
                  __Pyx_RefNannyDeclarations
                  __Pyx_RefNannySetupContext("genexpr", 0);
                  switch (__pyx_generator->resume_label) {
                    case 0: goto __pyx_L3_first_run;
                    default: /* CPython raises the right error here */
                    __Pyx_RefNannyFinishContext();
                    return NULL;
                  }
                  __pyx_L3_first_run:;
                  if (unlikely(!__pyx_sent_value)) __PYX_ERR(17, 5892, __pyx_L1_error)
                  if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(17, 5892, __pyx_L1_error) }
                  if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_genexpr_arg_0)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_genexpr_arg_0)) {
                    __pyx_t_1 = __pyx_cur_scope->__pyx_genexpr_arg_0; __Pyx_INCREF(__pyx_t_1);
                    __pyx_t_2 = 0;
                    __pyx_t_3 = NULL;
                  } else {
                    __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_genexpr_arg_0); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 5892, __pyx_L1_error)
                    __Pyx_GOTREF(__pyx_t_1);
                    __pyx_t_3 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 5892, __pyx_L1_error)
                  }
                  for (;;) {
                    if (likely(!__pyx_t_3)) {
                      if (likely(PyList_CheckExact(__pyx_t_1))) {
                        {
                          Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
                          #if !CYTHON_ASSUME_SAFE_SIZE
                          if (unlikely((__pyx_temp < 0))) __PYX_ERR(17, 5892, __pyx_L1_error)
                          #endif
                          if (__pyx_t_2 >= __pyx_temp) break;
                        }
                        __pyx_t_4 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_2, __Pyx_ReferenceSharing_OwnStrongReference);
                        ++__pyx_t_2;
                      } else {
                        {
                          Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
                          #if !CYTHON_ASSUME_SAFE_SIZE
                          if (unlikely((__pyx_temp < 0))) __PYX_ERR(17, 5892, __pyx_L1_error)
                          #endif
                          if (__pyx_t_2 >= __pyx_temp) break;
                        }
                        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                        __pyx_t_4 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2));
                        #else
                        __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2);
                        #endif
                        ++__pyx_t_2;
                      }
                      if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 5892, __pyx_L1_error)
                    } else {
                      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
                      if (unlikely(!__pyx_t_4)) {
                        PyObject* exc_type = PyErr_Occurred();
                        if (exc_type) {
                          if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(17, 5892, __pyx_L1_error)
                          PyErr_Clear();
                        }
                        break;
                      }
                    }
                    __Pyx_GOTREF(__pyx_t_4);
                    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_c);
                    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_c, __pyx_t_4);
                    __Pyx_GIVEREF(__pyx_t_4);
                    __pyx_t_4 = 0;
                    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_c, __pyx_mstate_global->__pyx_n_u_is_cpu); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 5892, __pyx_L1_error)
                    __Pyx_GOTREF(__pyx_t_4);
                    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(17, 5892, __pyx_L1_error)
                    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                    __pyx_t_6 = (!__pyx_t_5);
                    if (__pyx_t_6) {
                      __Pyx_XDECREF(__pyx_r);
                      __Pyx_INCREF(Py_False);
                      __pyx_r = Py_False;
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      goto __pyx_L0;
                    }
                  }
                  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                  /*else*/ {
                    __Pyx_XDECREF(__pyx_r);
                    __Pyx_INCREF(Py_True);
                    __pyx_r = Py_True;
                    goto __pyx_L0;
                  }
                  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

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

                /* "pyarrow/table.pxi":5886
 *         return self.to_reader().__arrow_c_stream__(requested_schema)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_cpu(self):
 *         """
*/

                static PyObject *__pyx_pf_7pyarrow_3lib_5Table_6is_cpu___get__(struct __pyx_obj_7pyarrow_3lib_Table *__pyx_v_self) {
                  PyObject *__pyx_gb_7pyarrow_3lib_5Table_6is_cpu_7__get___2generator16 = 0;
                  PyObject *__pyx_r = NULL;
                  __Pyx_RefNannyDeclarations
                  int __pyx_t_1;
                  PyObject *__pyx_t_2 = NULL;
                  PyObject *__pyx_t_3 = NULL;
                  size_t __pyx_t_4;
                  bool __pyx_t_5;
                  int __pyx_lineno = 0;
                  const char *__pyx_filename = NULL;
                  int __pyx_clineno = 0;
                  __Pyx_RefNannySetupContext("__get__", 0);

                  /* "pyarrow/table.pxi":5891
 *         Whether all ChunkedArrays are CPU-accessible.
 *         """
 *         if not self._init_is_cpu:             # <<<<<<<<<<<<<<
 *             self._is_cpu = all(c.is_cpu for c in self.itercolumns())
 *             self._init_is_cpu = True
*/
                  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_init_is_cpu");
                    __PYX_ERR(17, 5891, __pyx_L1_error)
                  }
                  __pyx_t_1 = (!(__pyx_v_self->_init_is_cpu != 0));
                  if (__pyx_t_1) {

                    /* "pyarrow/table.pxi":5892
 *         """
 *         if not self._init_is_cpu:
 *             self._is_cpu = all(c.is_cpu for c in self.itercolumns())             # <<<<<<<<<<<<<<
 *             self._init_is_cpu = True
 *         return self._is_cpu
*/
                    __pyx_t_3 = ((PyObject *)__pyx_v_self);
                    __Pyx_INCREF(__pyx_t_3);
                    __pyx_t_4 = 0;
                    {
                      PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
                      __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_itercolumns, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                      if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 5892, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_2);
                    }
                    __pyx_t_3 = __pyx_pf_7pyarrow_3lib_5Table_6is_cpu_7__get___genexpr(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 5892, __pyx_L1_error)
                    __Pyx_GOTREF(__pyx_t_3);
                    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                    __pyx_t_2 = __Pyx_Generator_GetInlinedResult(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 5892, __pyx_L1_error)
                    __Pyx_GOTREF(__pyx_t_2);
                    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(17, 5892, __pyx_L1_error)
                    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                    if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_is_cpu");
                      __PYX_ERR(17, 5892, __pyx_L1_error)
                    }
                    __pyx_v_self->_is_cpu = __pyx_t_5;

                    /* "pyarrow/table.pxi":5893
 *         if not self._init_is_cpu:
 *             self._is_cpu = all(c.is_cpu for c in self.itercolumns())
 *             self._init_is_cpu = True             # <<<<<<<<<<<<<<
 *         return self._is_cpu
 * 
*/
                    if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_init_is_cpu");
                      __PYX_ERR(17, 5893, __pyx_L1_error)
                    }
                    __pyx_v_self->_init_is_cpu = 1;

                    /* "pyarrow/table.pxi":5891
 *         Whether all ChunkedArrays are CPU-accessible.
 *         """
 *         if not self._init_is_cpu:             # <<<<<<<<<<<<<<
 *             self._is_cpu = all(c.is_cpu for c in self.itercolumns())
 *             self._init_is_cpu = True
*/
                  }

                  /* "pyarrow/table.pxi":5894
 *             self._is_cpu = all(c.is_cpu for c in self.itercolumns())
 *             self._init_is_cpu = True
 *         return self._is_cpu             # <<<<<<<<<<<<<<
 * 
 *     cdef void _assert_cpu(self) except *:
*/
                  __Pyx_XDECREF(__pyx_r);
                  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_is_cpu");
                    __PYX_ERR(17, 5894, __pyx_L1_error)
                  }
                  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_self->_is_cpu); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 5894, __pyx_L1_error)
                  __Pyx_GOTREF(__pyx_t_2);
                  __pyx_r = __pyx_t_2;
                  __pyx_t_2 = 0;
                  goto __pyx_L0;

                  /* "pyarrow/table.pxi":5886
 *         return self.to_reader().__arrow_c_stream__(requested_schema)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_cpu(self):
 *         """
*/

                  /* function exit code */
                  __pyx_L1_error:;
                  __Pyx_XDECREF(__pyx_t_2);
                  __Pyx_XDECREF(__pyx_t_3);
                  __Pyx_AddTraceback("pyarrow.lib.Table.is_cpu.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                  __pyx_r = NULL;
                  __pyx_L0:;
                  __Pyx_XDECREF(__pyx_gb_7pyarrow_3lib_5Table_6is_cpu_7__get___2generator16);
                  __Pyx_XGIVEREF(__pyx_r);
                  __Pyx_RefNannyFinishContext();
                  return __pyx_r;
                }

                /* "pyarrow/table.pxi":5896
 *         return self._is_cpu
 * 
 *     cdef void _assert_cpu(self) except *:             # <<<<<<<<<<<<<<
 *         if not self.is_cpu:
 *             raise NotImplementedError("Implemented only for data on CPU device")
*/

                static void __pyx_f_7pyarrow_3lib_5Table__assert_cpu(struct __pyx_obj_7pyarrow_3lib_Table *__pyx_v_self) {
                  __Pyx_RefNannyDeclarations
                  PyObject *__pyx_t_1 = NULL;
                  int __pyx_t_2;
                  int __pyx_t_3;
                  PyObject *__pyx_t_4 = NULL;
                  size_t __pyx_t_5;
                  int __pyx_lineno = 0;
                  const char *__pyx_filename = NULL;
                  int __pyx_clineno = 0;
                  __Pyx_RefNannySetupContext("_assert_cpu", 0);

                  /* "pyarrow/table.pxi":5897
 * 
 *     cdef void _assert_cpu(self) except *:
 *         if not self.is_cpu:             # <<<<<<<<<<<<<<
 *             raise NotImplementedError("Implemented only for data on CPU device")
 * 
*/
                  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_is_cpu); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 5897, __pyx_L1_error)
                  __Pyx_GOTREF(__pyx_t_1);
                  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(17, 5897, __pyx_L1_error)
                  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                  __pyx_t_3 = (!__pyx_t_2);
                  if (unlikely(__pyx_t_3)) {

                    /* "pyarrow/table.pxi":5898
 *     cdef void _assert_cpu(self) except *:
 *         if not self.is_cpu:
 *             raise NotImplementedError("Implemented only for data on CPU device")             # <<<<<<<<<<<<<<
 * 
 * 
*/
                    __pyx_t_4 = NULL;
                    __pyx_t_5 = 1;
                    {
                      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Implemented_only_for_data_on_CPU};
                      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_NotImplementedError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                      if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 5898, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                    }
                    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
                    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                    __PYX_ERR(17, 5898, __pyx_L1_error)

                    /* "pyarrow/table.pxi":5897
 * 
 *     cdef void _assert_cpu(self) except *:
 *         if not self.is_cpu:             # <<<<<<<<<<<<<<
 *             raise NotImplementedError("Implemented only for data on CPU device")
 * 
*/
                  }

                  /* "pyarrow/table.pxi":5896
 *         return self._is_cpu
 * 
 *     cdef void _assert_cpu(self) except *:             # <<<<<<<<<<<<<<
 *         if not self.is_cpu:
 *             raise NotImplementedError("Implemented only for data on CPU device")
*/

                  /* function exit code */
                  goto __pyx_L0;
                  __pyx_L1_error:;
                  __Pyx_XDECREF(__pyx_t_1);
                  __Pyx_XDECREF(__pyx_t_4);
                  __Pyx_AddTraceback("pyarrow.lib.Table._assert_cpu", __pyx_clineno, __pyx_lineno, __pyx_filename);
                  __pyx_L0:;
                  __Pyx_RefNannyFinishContext();
                }

                /* "pyarrow/table.pxi":5901
 * 
 * 
 * def _reconstruct_table(arrays, schema):             # <<<<<<<<<<<<<<
 *     """
 *     Internal: reconstruct pa.Table from pickled components.
*/

                /* Python wrapper */
                static PyObject *__pyx_pw_7pyarrow_3lib_221_reconstruct_table(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_220_reconstruct_table, "_reconstruct_table(arrays, schema)\n\nInternal: reconstruct pa.Table from pickled components.");
                static PyMethodDef __pyx_mdef_7pyarrow_3lib_221_reconstruct_table = {"_reconstruct_table", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_221_reconstruct_table, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_220_reconstruct_table};
                static PyObject *__pyx_pw_7pyarrow_3lib_221_reconstruct_table(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                  PyObject *__pyx_v_arrays = 0;
                  PyObject *__pyx_v_schema = 0;
                  #if !CYTHON_METH_FASTCALL
                  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                  #endif
                  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                  PyObject* values[2] = {0,0};
                  int __pyx_lineno = 0;
                  const char *__pyx_filename = NULL;
                  int __pyx_clineno = 0;
                  PyObject *__pyx_r = 0;
                  __Pyx_RefNannyDeclarations
                  __Pyx_RefNannySetupContext("_reconstruct_table (wrapper)", 0);
                  #if !CYTHON_METH_FASTCALL
                  #if CYTHON_ASSUME_SAFE_SIZE
                  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                  #else
                  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                  #endif
                  #endif
                  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                  {
                    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_arrays,&__pyx_mstate_global->__pyx_n_u_schema,0};
                    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(17, 5901, __pyx_L3_error)
                    if (__pyx_kwds_len > 0) {
                      switch (__pyx_nargs) {
                        case  2:
                        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(17, 5901, __pyx_L3_error)
                        CYTHON_FALLTHROUGH;
                        case  1:
                        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 5901, __pyx_L3_error)
                        CYTHON_FALLTHROUGH;
                        case  0: break;
                        default: goto __pyx_L5_argtuple_error;
                      }
                      const Py_ssize_t kwd_pos_args = __pyx_nargs;
                      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_reconstruct_table", 0) < (0)) __PYX_ERR(17, 5901, __pyx_L3_error)
                      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
                        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_reconstruct_table", 1, 2, 2, i); __PYX_ERR(17, 5901, __pyx_L3_error) }
                      }
                    } else if (unlikely(__pyx_nargs != 2)) {
                      goto __pyx_L5_argtuple_error;
                    } else {
                      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 5901, __pyx_L3_error)
                      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(17, 5901, __pyx_L3_error)
                    }
                    __pyx_v_arrays = values[0];
                    __pyx_v_schema = values[1];
                  }
                  goto __pyx_L6_skip;
                  __pyx_L5_argtuple_error:;
                  __Pyx_RaiseArgtupleInvalid("_reconstruct_table", 1, 2, 2, __pyx_nargs); __PYX_ERR(17, 5901, __pyx_L3_error)
                  __pyx_L6_skip:;
                  goto __pyx_L4_argument_unpacking_done;
                  __pyx_L3_error:;
                  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                    Py_XDECREF(values[__pyx_temp]);
                  }
                  __Pyx_AddTraceback("pyarrow.lib._reconstruct_table", __pyx_clineno, __pyx_lineno, __pyx_filename);
                  __Pyx_RefNannyFinishContext();
                  return NULL;
                  __pyx_L4_argument_unpacking_done:;
                  __pyx_r = __pyx_pf_7pyarrow_3lib_220_reconstruct_table(__pyx_self, __pyx_v_arrays, __pyx_v_schema);

                  /* function exit code */
                  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                    Py_XDECREF(values[__pyx_temp]);
                  }
                  __Pyx_RefNannyFinishContext();
                  return __pyx_r;
                }

                static PyObject *__pyx_pf_7pyarrow_3lib_220_reconstruct_table(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_arrays, PyObject *__pyx_v_schema) {
                  PyObject *__pyx_r = NULL;
                  __Pyx_RefNannyDeclarations
                  PyObject *__pyx_t_1 = NULL;
                  PyObject *__pyx_t_2 = NULL;
                  size_t __pyx_t_3;
                  PyObject *__pyx_t_4 = NULL;
                  int __pyx_lineno = 0;
                  const char *__pyx_filename = NULL;
                  int __pyx_clineno = 0;
                  __Pyx_RefNannySetupContext("_reconstruct_table", 0);

                  /* "pyarrow/table.pxi":5905
 *     Internal: reconstruct pa.Table from pickled components.
 *     """
 *     return Table.from_arrays(arrays, schema=schema)             # <<<<<<<<<<<<<<
 * 
 * 
*/
                  __Pyx_XDECREF(__pyx_r);
                  __pyx_t_2 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Table);
                  __Pyx_INCREF(__pyx_t_2);
                  __pyx_t_3 = 0;
                  {
                    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, __pyx_v_arrays};
                    __pyx_t_4 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 5905, __pyx_L1_error)
                    __Pyx_GOTREF(__pyx_t_4);
                    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_schema, __pyx_v_schema, __pyx_t_4, __pyx_callargs+2, 0) < (0)) __PYX_ERR(17, 5905, __pyx_L1_error)
                    __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_from_arrays, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_4);
                    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                    if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 5905, __pyx_L1_error)
                    __Pyx_GOTREF(__pyx_t_1);
                  }
                  __pyx_r = __pyx_t_1;
                  __pyx_t_1 = 0;
                  goto __pyx_L0;

                  /* "pyarrow/table.pxi":5901
 * 
 * 
 * def _reconstruct_table(arrays, schema):             # <<<<<<<<<<<<<<
 *     """
 *     Internal: reconstruct pa.Table from pickled components.
*/

                  /* function exit code */
                  __pyx_L1_error:;
                  __Pyx_XDECREF(__pyx_t_1);
                  __Pyx_XDECREF(__pyx_t_2);
                  __Pyx_XDECREF(__pyx_t_4);
                  __Pyx_AddTraceback("pyarrow.lib._reconstruct_table", __pyx_clineno, __pyx_lineno, __pyx_filename);
                  __pyx_r = NULL;
                  __pyx_L0:;
                  __Pyx_XGIVEREF(__pyx_r);
                  __Pyx_RefNannyFinishContext();
                  return __pyx_r;
                }

                /* "pyarrow/table.pxi":5908
 * 
 * 
 * def record_batch(data, names=None, schema=None, metadata=None):             # <<<<<<<<<<<<<<
 *     """
 *     Create a pyarrow.RecordBatch from another Python data structure or sequence
*/

                /* Python wrapper */
                static PyObject *__pyx_pw_7pyarrow_3lib_223record_batch(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_222record_batch, "record_batch(data, names=None, schema=None, metadata=None)\n\nCreate a pyarrow.RecordBatch from another Python data structure or sequence\nof arrays.\n\nParameters\n----------\ndata : dict, list, pandas.DataFrame, Arrow-compatible table\n    A mapping of strings to Arrays or Python lists, a list of Arrays,\n    a pandas DataFame, or any tabular object implementing the\n    Arrow PyCapsule Protocol (has an ``__arrow_c_array__`` or\n    ``__arrow_c_device_array__`` method).\nnames : list, default None\n    Column names if list of arrays passed as data. Mutually exclusive with\n    'schema' argument.\nschema : Schema, default None\n    The expected schema of the RecordBatch. If not passed, will be inferred\n    from the data. Mutually exclusive with 'names' argument.\nmetadata : dict or Mapping, default None\n    Optional metadata for the schema (if schema not passed).\n\nReturns\n-------\nRecordBatch\n\nSee Also\n--------\nRecordBatch.from_arrays, RecordBatch.from_pandas, table\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> n_legs = pa.array([2, 2, 4, 4, 5, 100])\n>>> animals = pa.array([\"Flamingo\", \"Parrot\", \"Dog\", \"Horse\", \"Brittle stars\", \"Centipede\"])\n>>> names = [\"n_legs\", \"animals\"]\n\nConstruct a RecordBatch from a python dictionary:\n\n>>> pa.record_batch({\"n_legs\": n_legs, \"animals\": animals})\npyarrow.RecordBatch\nn_legs: int64\nanimals: string\n----\nn_legs: [2,2,4,4,5,100]\nanimals: [\"Flamingo\",\"Parrot\",\"Dog\",\"Horse\",\"Brittle stars\",\"Centipede\"]\n>>> pa.record_batch({\"n_legs\": n_legs, \"animals\": animals}).to_pandas()\n   n_legs        animals\n0       2       Flamingo\n1       2         Parrot\n2       4            Dog\n3       4          Horse\n4       5  Brittle stars\n5     100      Centipede\n\nCreating a RecordBatch from a list of arrays with names:\n\n>>> pa.record_batch([n_legs, animals], names=names)\npyarrow.RecordBatch\nn_legs: int64\nanimals: string\n----\nn_legs: [2,2,4,4,5,100]\nanimals: [\"Flamingo""\",\"Parrot\",\"Dog\",\"Horse\",\"Brittle stars\",\"Centipede\"]\n\nCreating a RecordBatch from a list of arrays with names and metadata:\n\n>>> my_metadata={\"n_legs\": \"How many legs does an animal have?\"}\n>>> pa.record_batch([n_legs, animals],\n...                  names=names,\n...                  metadata = my_metadata)\npyarrow.RecordBatch\nn_legs: int64\nanimals: string\n----\nn_legs: [2,2,4,4,5,100]\nanimals: [\"Flamingo\",\"Parrot\",\"Dog\",\"Horse\",\"Brittle stars\",\"Centipede\"]\n>>> pa.record_batch([n_legs, animals],\n...                  names=names,\n...                  metadata = my_metadata).schema\nn_legs: int64\nanimals: string\n-- schema metadata --\nn_legs: 'How many legs does an animal have?'\n\nCreating a RecordBatch from a pandas DataFrame:\n\n>>> import pandas as pd\n>>> df = pd.DataFrame({'year': [2020, 2022, 2021, 2022],\n...                    'month': [3, 5, 7, 9],\n...                    'day': [1, 5, 9, 13],\n...                    'n_legs': [2, 4, 5, 100],\n...                    'animals': [\"Flamingo\", \"Horse\", \"Brittle stars\", \"Centipede\"]})\n>>> pa.record_batch(df)\npyarrow.RecordBatch\nyear: int64\nmonth: int64\nday: int64\nn_legs: int64\nanimals: string\n----\nyear: [2020,2022,2021,2022]\nmonth: [3,5,7,9]\nday: [1,5,9,13]\nn_legs: [2,4,5,100]\nanimals: [\"Flamingo\",\"Horse\",\"Brittle stars\",\"Centipede\"]\n\n>>> pa.record_batch(df).to_pandas()\n   year  month  day  n_legs        animals\n0  2020      3    1       2       Flamingo\n1  2022      5    5       4          Horse\n2  2021      7    9       5  Brittle stars\n3  2022      9   13     100      Centipede\n\nCreating a RecordBatch from a pandas DataFrame with schema:\n\n>>> my_schema = pa.schema([\n...     pa.field('n_legs', pa.int64()),\n...     pa.field('animals', pa.string())],\n...     metadata={\"n_legs\": \"Number of legs per animal\"})\n>>> pa.record_batch(df, my_schema).schema\nn_legs: int64\nanimals: string\n-- schema metadata --\nn_legs: 'Number of ""legs per animal'\npandas: ...\n>>> pa.record_batch(df, my_schema).to_pandas()\n   n_legs        animals\n0       2       Flamingo\n1       4          Horse\n2       5  Brittle stars\n3     100      Centipede");
                static PyMethodDef __pyx_mdef_7pyarrow_3lib_223record_batch = {"record_batch", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_223record_batch, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_222record_batch};
                static PyObject *__pyx_pw_7pyarrow_3lib_223record_batch(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                  PyObject *__pyx_v_data = 0;
                  PyObject *__pyx_v_names = 0;
                  PyObject *__pyx_v_schema = 0;
                  PyObject *__pyx_v_metadata = 0;
                  #if !CYTHON_METH_FASTCALL
                  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                  #endif
                  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                  PyObject* values[4] = {0,0,0,0};
                  int __pyx_lineno = 0;
                  const char *__pyx_filename = NULL;
                  int __pyx_clineno = 0;
                  PyObject *__pyx_r = 0;
                  __Pyx_RefNannyDeclarations
                  __Pyx_RefNannySetupContext("record_batch (wrapper)", 0);
                  #if !CYTHON_METH_FASTCALL
                  #if CYTHON_ASSUME_SAFE_SIZE
                  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                  #else
                  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                  #endif
                  #endif
                  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                  {
                    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_data,&__pyx_mstate_global->__pyx_n_u_names,&__pyx_mstate_global->__pyx_n_u_schema,&__pyx_mstate_global->__pyx_n_u_metadata,0};
                    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(17, 5908, __pyx_L3_error)
                    if (__pyx_kwds_len > 0) {
                      switch (__pyx_nargs) {
                        case  4:
                        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
                        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(17, 5908, __pyx_L3_error)
                        CYTHON_FALLTHROUGH;
                        case  3:
                        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
                        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(17, 5908, __pyx_L3_error)
                        CYTHON_FALLTHROUGH;
                        case  2:
                        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(17, 5908, __pyx_L3_error)
                        CYTHON_FALLTHROUGH;
                        case  1:
                        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 5908, __pyx_L3_error)
                        CYTHON_FALLTHROUGH;
                        case  0: break;
                        default: goto __pyx_L5_argtuple_error;
                      }
                      const Py_ssize_t kwd_pos_args = __pyx_nargs;
                      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "record_batch", 0) < (0)) __PYX_ERR(17, 5908, __pyx_L3_error)
                      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
                      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
                      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None));
                      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("record_batch", 0, 1, 4, i); __PYX_ERR(17, 5908, __pyx_L3_error) }
                      }
                    } else {
                      switch (__pyx_nargs) {
                        case  4:
                        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
                        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(17, 5908, __pyx_L3_error)
                        CYTHON_FALLTHROUGH;
                        case  3:
                        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
                        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(17, 5908, __pyx_L3_error)
                        CYTHON_FALLTHROUGH;
                        case  2:
                        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(17, 5908, __pyx_L3_error)
                        CYTHON_FALLTHROUGH;
                        case  1:
                        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 5908, __pyx_L3_error)
                        break;
                        default: goto __pyx_L5_argtuple_error;
                      }
                      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
                      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
                      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None));
                    }
                    __pyx_v_data = values[0];
                    __pyx_v_names = values[1];
                    __pyx_v_schema = values[2];
                    __pyx_v_metadata = values[3];
                  }
                  goto __pyx_L6_skip;
                  __pyx_L5_argtuple_error:;
                  __Pyx_RaiseArgtupleInvalid("record_batch", 0, 1, 4, __pyx_nargs); __PYX_ERR(17, 5908, __pyx_L3_error)
                  __pyx_L6_skip:;
                  goto __pyx_L4_argument_unpacking_done;
                  __pyx_L3_error:;
                  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                    Py_XDECREF(values[__pyx_temp]);
                  }
                  __Pyx_AddTraceback("pyarrow.lib.record_batch", __pyx_clineno, __pyx_lineno, __pyx_filename);
                  __Pyx_RefNannyFinishContext();
                  return NULL;
                  __pyx_L4_argument_unpacking_done:;
                  __pyx_r = __pyx_pf_7pyarrow_3lib_222record_batch(__pyx_self, __pyx_v_data, __pyx_v_names, __pyx_v_schema, __pyx_v_metadata);

                  /* function exit code */
                  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                    Py_XDECREF(values[__pyx_temp]);
                  }
                  __Pyx_RefNannyFinishContext();
                  return __pyx_r;
                }

                static PyObject *__pyx_pf_7pyarrow_3lib_222record_batch(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_data, PyObject *__pyx_v_names, PyObject *__pyx_v_schema, PyObject *__pyx_v_metadata) {
                  PyObject *__pyx_v_requested_schema = NULL;
                  PyObject *__pyx_v_schema_capsule = NULL;
                  PyObject *__pyx_v_array_capsule = NULL;
                  PyObject *__pyx_v_batch = NULL;
                  PyObject *__pyx_r = NULL;
                  __Pyx_RefNannyDeclarations
                  int __pyx_t_1;
                  int __pyx_t_2;
                  PyObject *__pyx_t_3 = NULL;
                  PyObject *__pyx_t_4 = NULL;
                  size_t __pyx_t_5;
                  PyObject *__pyx_t_6 = NULL;
                  PyObject *__pyx_t_7 = NULL;
                  PyObject *(*__pyx_t_8)(PyObject *);
                  int __pyx_lineno = 0;
                  const char *__pyx_filename = NULL;
                  int __pyx_clineno = 0;
                  __Pyx_RefNannySetupContext("record_batch", 0);
                  __Pyx_INCREF(__pyx_v_names);
                  __Pyx_INCREF(__pyx_v_schema);

                  /* "pyarrow/table.pxi":6041
 *     """
 *     # accept schema as first argument for backwards compatibility / usability
 *     if isinstance(names, Schema) and schema is None:             # <<<<<<<<<<<<<<
 *         schema = names
 *         names = None
*/
                  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_names, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Schema); 
                  if (__pyx_t_2) {
                  } else {
                    __pyx_t_1 = __pyx_t_2;
                    goto __pyx_L4_bool_binop_done;
                  }
                  __pyx_t_2 = (__pyx_v_schema == Py_None);
                  __pyx_t_1 = __pyx_t_2;
                  __pyx_L4_bool_binop_done:;
                  if (__pyx_t_1) {

                    /* "pyarrow/table.pxi":6042
 *     # accept schema as first argument for backwards compatibility / usability
 *     if isinstance(names, Schema) and schema is None:
 *         schema = names             # <<<<<<<<<<<<<<
 *         names = None
 * 
*/
                    __Pyx_INCREF(__pyx_v_names);
                    __Pyx_DECREF_SET(__pyx_v_schema, __pyx_v_names);

                    /* "pyarrow/table.pxi":6043
 *     if isinstance(names, Schema) and schema is None:
 *         schema = names
 *         names = None             # <<<<<<<<<<<<<<
 * 
 *     if isinstance(data, (list, tuple)):
*/
                    __Pyx_INCREF(Py_None);
                    __Pyx_DECREF_SET(__pyx_v_names, Py_None);

                    /* "pyarrow/table.pxi":6041
 *     """
 *     # accept schema as first argument for backwards compatibility / usability
 *     if isinstance(names, Schema) and schema is None:             # <<<<<<<<<<<<<<
 *         schema = names
 *         names = None
*/
                  }

                  /* "pyarrow/table.pxi":6045
 *         names = None
 * 
 *     if isinstance(data, (list, tuple)):             # <<<<<<<<<<<<<<
 *         return RecordBatch.from_arrays(data, names=names, schema=schema,
 *                                        metadata=metadata)
*/
                  __pyx_t_2 = PyList_Check(__pyx_v_data); 
                  if (!__pyx_t_2) {
                  } else {
                    __pyx_t_1 = __pyx_t_2;
                    goto __pyx_L7_bool_binop_done;
                  }
                  __pyx_t_2 = PyTuple_Check(__pyx_v_data); 
                  __pyx_t_1 = __pyx_t_2;
                  __pyx_L7_bool_binop_done:;
                  if (__pyx_t_1) {

                    /* "pyarrow/table.pxi":6046
 * 
 *     if isinstance(data, (list, tuple)):
 *         return RecordBatch.from_arrays(data, names=names, schema=schema,             # <<<<<<<<<<<<<<
 *                                        metadata=metadata)
 *     elif isinstance(data, dict):
*/
                    __Pyx_XDECREF(__pyx_r);
                    __pyx_t_4 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RecordBatch);
                    __Pyx_INCREF(__pyx_t_4);

                    /* "pyarrow/table.pxi":6047
 *     if isinstance(data, (list, tuple)):
 *         return RecordBatch.from_arrays(data, names=names, schema=schema,
 *                                        metadata=metadata)             # <<<<<<<<<<<<<<
 *     elif isinstance(data, dict):
 *         if names is not None:
*/
                    __pyx_t_5 = 0;
                    {
                      PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 3 : 0)] = {__pyx_t_4, __pyx_v_data};
                      __pyx_t_6 = __Pyx_MakeVectorcallBuilderKwds(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 6046, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_6);
                      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_names, __pyx_v_names, __pyx_t_6, __pyx_callargs+2, 0) < (0)) __PYX_ERR(17, 6046, __pyx_L1_error)
                      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_schema, __pyx_v_schema, __pyx_t_6, __pyx_callargs+2, 1) < (0)) __PYX_ERR(17, 6046, __pyx_L1_error)
                      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_metadata, __pyx_v_metadata, __pyx_t_6, __pyx_callargs+2, 2) < (0)) __PYX_ERR(17, 6046, __pyx_L1_error)
                      __pyx_t_3 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_from_arrays, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_6);
                      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                      if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 6046, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_3);
                    }
                    __pyx_r = __pyx_t_3;
                    __pyx_t_3 = 0;
                    goto __pyx_L0;

                    /* "pyarrow/table.pxi":6045
 *         names = None
 * 
 *     if isinstance(data, (list, tuple)):             # <<<<<<<<<<<<<<
 *         return RecordBatch.from_arrays(data, names=names, schema=schema,
 *                                        metadata=metadata)
*/
                  }

                  /* "pyarrow/table.pxi":6048
 *         return RecordBatch.from_arrays(data, names=names, schema=schema,
 *                                        metadata=metadata)
 *     elif isinstance(data, dict):             # <<<<<<<<<<<<<<
 *         if names is not None:
 *             raise ValueError(
*/
                  __pyx_t_1 = PyDict_Check(__pyx_v_data); 
                  if (__pyx_t_1) {

                    /* "pyarrow/table.pxi":6049
 *                                        metadata=metadata)
 *     elif isinstance(data, dict):
 *         if names is not None:             # <<<<<<<<<<<<<<
 *             raise ValueError(
 *                 "The 'names' argument is not valid when passing a dictionary")
*/
                    __pyx_t_1 = (__pyx_v_names != Py_None);
                    if (unlikely(__pyx_t_1)) {

                      /* "pyarrow/table.pxi":6050
 *     elif isinstance(data, dict):
 *         if names is not None:
 *             raise ValueError(             # <<<<<<<<<<<<<<
 *                 "The 'names' argument is not valid when passing a dictionary")
 *         return RecordBatch.from_pydict(data, schema=schema, metadata=metadata)
*/
                      __pyx_t_6 = NULL;
                      __pyx_t_5 = 1;
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_mstate_global->__pyx_kp_u_The_names_argument_is_not_valid};
                        __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
                        if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 6050, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_3);
                      }
                      __Pyx_Raise(__pyx_t_3, 0, 0, 0);
                      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                      __PYX_ERR(17, 6050, __pyx_L1_error)

                      /* "pyarrow/table.pxi":6049
 *                                        metadata=metadata)
 *     elif isinstance(data, dict):
 *         if names is not None:             # <<<<<<<<<<<<<<
 *             raise ValueError(
 *                 "The 'names' argument is not valid when passing a dictionary")
*/
                    }

                    /* "pyarrow/table.pxi":6052
 *             raise ValueError(
 *                 "The 'names' argument is not valid when passing a dictionary")
 *         return RecordBatch.from_pydict(data, schema=schema, metadata=metadata)             # <<<<<<<<<<<<<<
 *     elif hasattr(data, "__arrow_c_device_array__"):
 *         if schema is not None:
*/
                    __Pyx_XDECREF(__pyx_r);
                    __pyx_t_6 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RecordBatch);
                    __Pyx_INCREF(__pyx_t_6);
                    __pyx_t_5 = 0;
                    {
                      PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_6, __pyx_v_data};
                      __pyx_t_4 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 6052, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_4);
                      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_schema, __pyx_v_schema, __pyx_t_4, __pyx_callargs+2, 0) < (0)) __PYX_ERR(17, 6052, __pyx_L1_error)
                      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_metadata, __pyx_v_metadata, __pyx_t_4, __pyx_callargs+2, 1) < (0)) __PYX_ERR(17, 6052, __pyx_L1_error)
                      __pyx_t_3 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_from_pydict_2, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_4);
                      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
                      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                      if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 6052, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_3);
                    }
                    __pyx_r = __pyx_t_3;
                    __pyx_t_3 = 0;
                    goto __pyx_L0;

                    /* "pyarrow/table.pxi":6048
 *         return RecordBatch.from_arrays(data, names=names, schema=schema,
 *                                        metadata=metadata)
 *     elif isinstance(data, dict):             # <<<<<<<<<<<<<<
 *         if names is not None:
 *             raise ValueError(
*/
                  }

                  /* "pyarrow/table.pxi":6053
 *                 "The 'names' argument is not valid when passing a dictionary")
 *         return RecordBatch.from_pydict(data, schema=schema, metadata=metadata)
 *     elif hasattr(data, "__arrow_c_device_array__"):             # <<<<<<<<<<<<<<
 *         if schema is not None:
 *             requested_schema = schema.__arrow_c_schema__()
*/
                  __pyx_t_1 = __Pyx_HasAttr(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_arrow_c_device_array); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(17, 6053, __pyx_L1_error)
                  if (__pyx_t_1) {

                    /* "pyarrow/table.pxi":6054
 *         return RecordBatch.from_pydict(data, schema=schema, metadata=metadata)
 *     elif hasattr(data, "__arrow_c_device_array__"):
 *         if schema is not None:             # <<<<<<<<<<<<<<
 *             requested_schema = schema.__arrow_c_schema__()
 *         else:
*/
                    __pyx_t_1 = (__pyx_v_schema != Py_None);
                    if (__pyx_t_1) {

                      /* "pyarrow/table.pxi":6055
 *     elif hasattr(data, "__arrow_c_device_array__"):
 *         if schema is not None:
 *             requested_schema = schema.__arrow_c_schema__()             # <<<<<<<<<<<<<<
 *         else:
 *             requested_schema = None
*/
                      __pyx_t_4 = __pyx_v_schema;
                      __Pyx_INCREF(__pyx_t_4);
                      __pyx_t_5 = 0;
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
                        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_arrow_c_schema, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                        if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 6055, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_3);
                      }
                      __pyx_v_requested_schema = __pyx_t_3;
                      __pyx_t_3 = 0;

                      /* "pyarrow/table.pxi":6054
 *         return RecordBatch.from_pydict(data, schema=schema, metadata=metadata)
 *     elif hasattr(data, "__arrow_c_device_array__"):
 *         if schema is not None:             # <<<<<<<<<<<<<<
 *             requested_schema = schema.__arrow_c_schema__()
 *         else:
*/
                      goto __pyx_L10;
                    }

                    /* "pyarrow/table.pxi":6057
 *             requested_schema = schema.__arrow_c_schema__()
 *         else:
 *             requested_schema = None             # <<<<<<<<<<<<<<
 *         schema_capsule, array_capsule = data.__arrow_c_device_array__(requested_schema)
 *         batch = RecordBatch._import_from_c_device_capsule(schema_capsule, array_capsule)
*/
                    /*else*/ {
                      __Pyx_INCREF(Py_None);
                      __pyx_v_requested_schema = Py_None;
                    }
                    __pyx_L10:;

                    /* "pyarrow/table.pxi":6058
 *         else:
 *             requested_schema = None
 *         schema_capsule, array_capsule = data.__arrow_c_device_array__(requested_schema)             # <<<<<<<<<<<<<<
 *         batch = RecordBatch._import_from_c_device_capsule(schema_capsule, array_capsule)
 *         if schema is not None and batch.schema != schema:
*/
                    __pyx_t_4 = __pyx_v_data;
                    __Pyx_INCREF(__pyx_t_4);
                    __pyx_t_5 = 0;
                    {
                      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_requested_schema};
                      __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_arrow_c_device_array, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                      if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 6058, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_3);
                    }
                    if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) {
                      PyObject* sequence = __pyx_t_3;
                      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
                      if (unlikely(size != 2)) {
                        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
                        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
                        __PYX_ERR(17, 6058, __pyx_L1_error)
                      }
                      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                      if (likely(PyTuple_CheckExact(sequence))) {
                        __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0);
                        __Pyx_INCREF(__pyx_t_4);
                        __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1);
                        __Pyx_INCREF(__pyx_t_6);
                      } else {
                        __pyx_t_4 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference);
                        if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 6058, __pyx_L1_error)
                        __Pyx_XGOTREF(__pyx_t_4);
                        __pyx_t_6 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference);
                        if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 6058, __pyx_L1_error)
                        __Pyx_XGOTREF(__pyx_t_6);
                      }
                      #else
                      __pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 6058, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_4);
                      __pyx_t_6 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 6058, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_6);
                      #endif
                      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                    } else {
                      Py_ssize_t index = -1;
                      __pyx_t_7 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 6058, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_7);
                      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                      __pyx_t_8 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_7);
                      index = 0; __pyx_t_4 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_4)) goto __pyx_L11_unpacking_failed;
                      __Pyx_GOTREF(__pyx_t_4);
                      index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L11_unpacking_failed;
                      __Pyx_GOTREF(__pyx_t_6);
                      if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < (0)) __PYX_ERR(17, 6058, __pyx_L1_error)
                      __pyx_t_8 = NULL;
                      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
                      goto __pyx_L12_unpacking_done;
                      __pyx_L11_unpacking_failed:;
                      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
                      __pyx_t_8 = NULL;
                      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
                      __PYX_ERR(17, 6058, __pyx_L1_error)
                      __pyx_L12_unpacking_done:;
                    }
                    __pyx_v_schema_capsule = __pyx_t_4;
                    __pyx_t_4 = 0;
                    __pyx_v_array_capsule = __pyx_t_6;
                    __pyx_t_6 = 0;

                    /* "pyarrow/table.pxi":6059
 *             requested_schema = None
 *         schema_capsule, array_capsule = data.__arrow_c_device_array__(requested_schema)
 *         batch = RecordBatch._import_from_c_device_capsule(schema_capsule, array_capsule)             # <<<<<<<<<<<<<<
 *         if schema is not None and batch.schema != schema:
 *             # __arrow_c_device_array__ coerces schema with best effort, so we might
*/
                    __pyx_t_6 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RecordBatch);
                    __Pyx_INCREF(__pyx_t_6);
                    __pyx_t_5 = 0;
                    {
                      PyObject *__pyx_callargs[3] = {__pyx_t_6, __pyx_v_schema_capsule, __pyx_v_array_capsule};
                      __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_import_from_c_device_capsule, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
                      if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 6059, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_3);
                    }
                    __pyx_v_batch = __pyx_t_3;
                    __pyx_t_3 = 0;

                    /* "pyarrow/table.pxi":6060
 *         schema_capsule, array_capsule = data.__arrow_c_device_array__(requested_schema)
 *         batch = RecordBatch._import_from_c_device_capsule(schema_capsule, array_capsule)
 *         if schema is not None and batch.schema != schema:             # <<<<<<<<<<<<<<
 *             # __arrow_c_device_array__ coerces schema with best effort, so we might
 *             # need to cast it if the producer wasn't able to cast to exact schema.
*/
                    __pyx_t_2 = (__pyx_v_schema != Py_None);
                    if (__pyx_t_2) {
                    } else {
                      __pyx_t_1 = __pyx_t_2;
                      goto __pyx_L14_bool_binop_done;
                    }
                    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_batch, __pyx_mstate_global->__pyx_n_u_schema); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 6060, __pyx_L1_error)
                    __Pyx_GOTREF(__pyx_t_3);
                    __pyx_t_6 = PyObject_RichCompare(__pyx_t_3, __pyx_v_schema, Py_NE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 6060, __pyx_L1_error)
                    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(17, 6060, __pyx_L1_error)
                    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                    __pyx_t_1 = __pyx_t_2;
                    __pyx_L14_bool_binop_done:;
                    if (__pyx_t_1) {

                      /* "pyarrow/table.pxi":6063
 *             # __arrow_c_device_array__ coerces schema with best effort, so we might
 *             # need to cast it if the producer wasn't able to cast to exact schema.
 *             batch = batch.cast(schema)             # <<<<<<<<<<<<<<
 *         return batch
 *     elif hasattr(data, "__arrow_c_array__"):
*/
                      __pyx_t_3 = __pyx_v_batch;
                      __Pyx_INCREF(__pyx_t_3);
                      __pyx_t_5 = 0;
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_schema};
                        __pyx_t_6 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_cast, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                        if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 6063, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_6);
                      }
                      __Pyx_DECREF_SET(__pyx_v_batch, __pyx_t_6);
                      __pyx_t_6 = 0;

                      /* "pyarrow/table.pxi":6060
 *         schema_capsule, array_capsule = data.__arrow_c_device_array__(requested_schema)
 *         batch = RecordBatch._import_from_c_device_capsule(schema_capsule, array_capsule)
 *         if schema is not None and batch.schema != schema:             # <<<<<<<<<<<<<<
 *             # __arrow_c_device_array__ coerces schema with best effort, so we might
 *             # need to cast it if the producer wasn't able to cast to exact schema.
*/
                    }

                    /* "pyarrow/table.pxi":6064
 *             # need to cast it if the producer wasn't able to cast to exact schema.
 *             batch = batch.cast(schema)
 *         return batch             # <<<<<<<<<<<<<<
 *     elif hasattr(data, "__arrow_c_array__"):
 *         if schema is not None:
*/
                    __Pyx_XDECREF(__pyx_r);
                    __Pyx_INCREF(__pyx_v_batch);
                    __pyx_r = __pyx_v_batch;
                    goto __pyx_L0;

                    /* "pyarrow/table.pxi":6053
 *                 "The 'names' argument is not valid when passing a dictionary")
 *         return RecordBatch.from_pydict(data, schema=schema, metadata=metadata)
 *     elif hasattr(data, "__arrow_c_device_array__"):             # <<<<<<<<<<<<<<
 *         if schema is not None:
 *             requested_schema = schema.__arrow_c_schema__()
*/
                  }

                  /* "pyarrow/table.pxi":6065
 *             batch = batch.cast(schema)
 *         return batch
 *     elif hasattr(data, "__arrow_c_array__"):             # <<<<<<<<<<<<<<
 *         if schema is not None:
 *             requested_schema = schema.__arrow_c_schema__()
*/
                  __pyx_t_1 = __Pyx_HasAttr(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_arrow_c_array); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(17, 6065, __pyx_L1_error)
                  if (__pyx_t_1) {

                    /* "pyarrow/table.pxi":6066
 *         return batch
 *     elif hasattr(data, "__arrow_c_array__"):
 *         if schema is not None:             # <<<<<<<<<<<<<<
 *             requested_schema = schema.__arrow_c_schema__()
 *         else:
*/
                    __pyx_t_1 = (__pyx_v_schema != Py_None);
                    if (__pyx_t_1) {

                      /* "pyarrow/table.pxi":6067
 *     elif hasattr(data, "__arrow_c_array__"):
 *         if schema is not None:
 *             requested_schema = schema.__arrow_c_schema__()             # <<<<<<<<<<<<<<
 *         else:
 *             requested_schema = None
*/
                      __pyx_t_3 = __pyx_v_schema;
                      __Pyx_INCREF(__pyx_t_3);
                      __pyx_t_5 = 0;
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
                        __pyx_t_6 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_arrow_c_schema, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                        if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 6067, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_6);
                      }
                      __pyx_v_requested_schema = __pyx_t_6;
                      __pyx_t_6 = 0;

                      /* "pyarrow/table.pxi":6066
 *         return batch
 *     elif hasattr(data, "__arrow_c_array__"):
 *         if schema is not None:             # <<<<<<<<<<<<<<
 *             requested_schema = schema.__arrow_c_schema__()
 *         else:
*/
                      goto __pyx_L16;
                    }

                    /* "pyarrow/table.pxi":6069
 *             requested_schema = schema.__arrow_c_schema__()
 *         else:
 *             requested_schema = None             # <<<<<<<<<<<<<<
 *         schema_capsule, array_capsule = data.__arrow_c_array__(requested_schema)
 *         batch = RecordBatch._import_from_c_capsule(schema_capsule, array_capsule)
*/
                    /*else*/ {
                      __Pyx_INCREF(Py_None);
                      __pyx_v_requested_schema = Py_None;
                    }
                    __pyx_L16:;

                    /* "pyarrow/table.pxi":6070
 *         else:
 *             requested_schema = None
 *         schema_capsule, array_capsule = data.__arrow_c_array__(requested_schema)             # <<<<<<<<<<<<<<
 *         batch = RecordBatch._import_from_c_capsule(schema_capsule, array_capsule)
 *         if schema is not None and batch.schema != schema:
*/
                    __pyx_t_3 = __pyx_v_data;
                    __Pyx_INCREF(__pyx_t_3);
                    __pyx_t_5 = 0;
                    {
                      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_requested_schema};
                      __pyx_t_6 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_arrow_c_array, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                      if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 6070, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_6);
                    }
                    if ((likely(PyTuple_CheckExact(__pyx_t_6))) || (PyList_CheckExact(__pyx_t_6))) {
                      PyObject* sequence = __pyx_t_6;
                      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(17, 6070, __pyx_L1_error)
                      }
                      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                      if (likely(PyTuple_CheckExact(sequence))) {
                        __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0);
                        __Pyx_INCREF(__pyx_t_3);
                        __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1);
                        __Pyx_INCREF(__pyx_t_4);
                      } else {
                        __pyx_t_3 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference);
                        if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 6070, __pyx_L1_error)
                        __Pyx_XGOTREF(__pyx_t_3);
                        __pyx_t_4 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference);
                        if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 6070, __pyx_L1_error)
                        __Pyx_XGOTREF(__pyx_t_4);
                      }
                      #else
                      __pyx_t_3 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 6070, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_3);
                      __pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 6070, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_4);
                      #endif
                      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                    } else {
                      Py_ssize_t index = -1;
                      __pyx_t_7 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 6070, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_7);
                      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                      __pyx_t_8 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_7);
                      index = 0; __pyx_t_3 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_3)) goto __pyx_L17_unpacking_failed;
                      __Pyx_GOTREF(__pyx_t_3);
                      index = 1; __pyx_t_4 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_4)) goto __pyx_L17_unpacking_failed;
                      __Pyx_GOTREF(__pyx_t_4);
                      if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < (0)) __PYX_ERR(17, 6070, __pyx_L1_error)
                      __pyx_t_8 = NULL;
                      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
                      goto __pyx_L18_unpacking_done;
                      __pyx_L17_unpacking_failed:;
                      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
                      __pyx_t_8 = NULL;
                      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
                      __PYX_ERR(17, 6070, __pyx_L1_error)
                      __pyx_L18_unpacking_done:;
                    }
                    __pyx_v_schema_capsule = __pyx_t_3;
                    __pyx_t_3 = 0;
                    __pyx_v_array_capsule = __pyx_t_4;
                    __pyx_t_4 = 0;

                    /* "pyarrow/table.pxi":6071
 *             requested_schema = None
 *         schema_capsule, array_capsule = data.__arrow_c_array__(requested_schema)
 *         batch = RecordBatch._import_from_c_capsule(schema_capsule, array_capsule)             # <<<<<<<<<<<<<<
 *         if schema is not None and batch.schema != schema:
 *             # __arrow_c_array__ coerces schema with best effort, so we might
*/
                    __pyx_t_4 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RecordBatch);
                    __Pyx_INCREF(__pyx_t_4);
                    __pyx_t_5 = 0;
                    {
                      PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_v_schema_capsule, __pyx_v_array_capsule};
                      __pyx_t_6 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_import_from_c_capsule, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                      if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 6071, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_6);
                    }
                    __pyx_v_batch = __pyx_t_6;
                    __pyx_t_6 = 0;

                    /* "pyarrow/table.pxi":6072
 *         schema_capsule, array_capsule = data.__arrow_c_array__(requested_schema)
 *         batch = RecordBatch._import_from_c_capsule(schema_capsule, array_capsule)
 *         if schema is not None and batch.schema != schema:             # <<<<<<<<<<<<<<
 *             # __arrow_c_array__ coerces schema with best effort, so we might
 *             # need to cast it if the producer wasn't able to cast to exact schema.
*/
                    __pyx_t_2 = (__pyx_v_schema != Py_None);
                    if (__pyx_t_2) {
                    } else {
                      __pyx_t_1 = __pyx_t_2;
                      goto __pyx_L20_bool_binop_done;
                    }
                    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_batch, __pyx_mstate_global->__pyx_n_u_schema); if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 6072, __pyx_L1_error)
                    __Pyx_GOTREF(__pyx_t_6);
                    __pyx_t_4 = PyObject_RichCompare(__pyx_t_6, __pyx_v_schema, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 6072, __pyx_L1_error)
                    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(17, 6072, __pyx_L1_error)
                    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                    __pyx_t_1 = __pyx_t_2;
                    __pyx_L20_bool_binop_done:;
                    if (__pyx_t_1) {

                      /* "pyarrow/table.pxi":6075
 *             # __arrow_c_array__ coerces schema with best effort, so we might
 *             # need to cast it if the producer wasn't able to cast to exact schema.
 *             batch = batch.cast(schema)             # <<<<<<<<<<<<<<
 *         return batch
 * 
*/
                      __pyx_t_6 = __pyx_v_batch;
                      __Pyx_INCREF(__pyx_t_6);
                      __pyx_t_5 = 0;
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_schema};
                        __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_cast, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
                        if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 6075, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_4);
                      }
                      __Pyx_DECREF_SET(__pyx_v_batch, __pyx_t_4);
                      __pyx_t_4 = 0;

                      /* "pyarrow/table.pxi":6072
 *         schema_capsule, array_capsule = data.__arrow_c_array__(requested_schema)
 *         batch = RecordBatch._import_from_c_capsule(schema_capsule, array_capsule)
 *         if schema is not None and batch.schema != schema:             # <<<<<<<<<<<<<<
 *             # __arrow_c_array__ coerces schema with best effort, so we might
 *             # need to cast it if the producer wasn't able to cast to exact schema.
*/
                    }

                    /* "pyarrow/table.pxi":6076
 *             # need to cast it if the producer wasn't able to cast to exact schema.
 *             batch = batch.cast(schema)
 *         return batch             # <<<<<<<<<<<<<<
 * 
 *     elif _pandas_api.is_data_frame(data):
*/
                    __Pyx_XDECREF(__pyx_r);
                    __Pyx_INCREF(__pyx_v_batch);
                    __pyx_r = __pyx_v_batch;
                    goto __pyx_L0;

                    /* "pyarrow/table.pxi":6065
 *             batch = batch.cast(schema)
 *         return batch
 *     elif hasattr(data, "__arrow_c_array__"):             # <<<<<<<<<<<<<<
 *         if schema is not None:
 *             requested_schema = schema.__arrow_c_schema__()
*/
                  }

                  /* "pyarrow/table.pxi":6078
 *         return batch
 * 
 *     elif _pandas_api.is_data_frame(data):             # <<<<<<<<<<<<<<
 *         return RecordBatch.from_pandas(data, schema=schema)
 * 
*/
                  __pyx_t_6 = NULL;
                  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_pandas_api); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 6078, __pyx_L1_error)
                  __Pyx_GOTREF(__pyx_t_3);
                  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_is_data_frame); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 6078, __pyx_L1_error)
                  __Pyx_GOTREF(__pyx_t_7);
                  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __pyx_t_5 = 1;
                  #if CYTHON_UNPACK_METHODS
                  if (unlikely(PyMethod_Check(__pyx_t_7))) {
                    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
                    assert(__pyx_t_6);
                    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
                    __Pyx_INCREF(__pyx_t_6);
                    __Pyx_INCREF(__pyx__function);
                    __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
                    __pyx_t_5 = 0;
                  }
                  #endif
                  {
                    PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_data};
                    __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
                    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
                    if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 6078, __pyx_L1_error)
                    __Pyx_GOTREF(__pyx_t_4);
                  }
                  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(17, 6078, __pyx_L1_error)
                  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                  if (likely(__pyx_t_1)) {

                    /* "pyarrow/table.pxi":6079
 * 
 *     elif _pandas_api.is_data_frame(data):
 *         return RecordBatch.from_pandas(data, schema=schema)             # <<<<<<<<<<<<<<
 * 
 *     else:
*/
                    __Pyx_XDECREF(__pyx_r);
                    __pyx_t_7 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RecordBatch);
                    __Pyx_INCREF(__pyx_t_7);
                    __pyx_t_5 = 0;
                    {
                      PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_7, __pyx_v_data};
                      __pyx_t_6 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 6079, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_6);
                      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_schema, __pyx_v_schema, __pyx_t_6, __pyx_callargs+2, 0) < (0)) __PYX_ERR(17, 6079, __pyx_L1_error)
                      __pyx_t_4 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_from_pandas, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_6);
                      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
                      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                      if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 6079, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_4);
                    }
                    __pyx_r = __pyx_t_4;
                    __pyx_t_4 = 0;
                    goto __pyx_L0;

                    /* "pyarrow/table.pxi":6078
 *         return batch
 * 
 *     elif _pandas_api.is_data_frame(data):             # <<<<<<<<<<<<<<
 *         return RecordBatch.from_pandas(data, schema=schema)
 * 
*/
                  }

                  /* "pyarrow/table.pxi":6082
 * 
 *     else:
 *         raise TypeError("Expected pandas DataFrame or list of arrays")             # <<<<<<<<<<<<<<
 * 
 * 
*/
                  /*else*/ {
                    __pyx_t_6 = NULL;
                    __pyx_t_5 = 1;
                    {
                      PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_mstate_global->__pyx_kp_u_Expected_pandas_DataFrame_or_lis};
                      __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
                      if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 6082, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_4);
                    }
                    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
                    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                    __PYX_ERR(17, 6082, __pyx_L1_error)
                  }

                  /* "pyarrow/table.pxi":5908
 * 
 * 
 * def record_batch(data, names=None, schema=None, metadata=None):             # <<<<<<<<<<<<<<
 *     """
 *     Create a pyarrow.RecordBatch from another Python data structure or sequence
*/

                  /* function exit code */
                  __pyx_L1_error:;
                  __Pyx_XDECREF(__pyx_t_3);
                  __Pyx_XDECREF(__pyx_t_4);
                  __Pyx_XDECREF(__pyx_t_6);
                  __Pyx_XDECREF(__pyx_t_7);
                  __Pyx_AddTraceback("pyarrow.lib.record_batch", __pyx_clineno, __pyx_lineno, __pyx_filename);
                  __pyx_r = NULL;
                  __pyx_L0:;
                  __Pyx_XDECREF(__pyx_v_requested_schema);
                  __Pyx_XDECREF(__pyx_v_schema_capsule);
                  __Pyx_XDECREF(__pyx_v_array_capsule);
                  __Pyx_XDECREF(__pyx_v_batch);
                  __Pyx_XDECREF(__pyx_v_names);
                  __Pyx_XDECREF(__pyx_v_schema);
                  __Pyx_XGIVEREF(__pyx_r);
                  __Pyx_RefNannyFinishContext();
                  return __pyx_r;
                }

                /* "pyarrow/table.pxi":6085
 * 
 * 
 * def table(data, names=None, schema=None, metadata=None, nthreads=None):             # <<<<<<<<<<<<<<
 *     """
 *     Create a pyarrow.Table from a Python data structure or sequence of arrays.
*/

                /* Python wrapper */
                static PyObject *__pyx_pw_7pyarrow_3lib_225table(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_224table, "table(data, names=None, schema=None, metadata=None, nthreads=None)\n\nCreate a pyarrow.Table from a Python data structure or sequence of arrays.\n\nParameters\n----------\ndata : dict, list, pandas.DataFrame, Arrow-compatible table\n    A mapping of strings to Arrays or Python lists, a list of arrays or\n    chunked arrays, a pandas DataFame, or any tabular object implementing\n    the Arrow PyCapsule Protocol (has an ``__arrow_c_array__``,\n    ``__arrow_c_device_array__`` or ``__arrow_c_stream__`` method).\nnames : list, default None\n    Column names if list of arrays passed as data. Mutually exclusive with\n    'schema' argument.\nschema : Schema, default None\n    The expected schema of the Arrow Table. If not passed, will be inferred\n    from the data. Mutually exclusive with 'names' argument.\n    If passed, the output will have exactly this schema (raising an error\n    when columns are not found in the data and ignoring additional data not\n    specified in the schema, when data is a dict or DataFrame).\nmetadata : dict or Mapping, default None\n    Optional metadata for the schema (if schema not passed).\nnthreads : int, default None\n    For pandas.DataFrame inputs: if greater than 1, convert columns to\n    Arrow in parallel using indicated number of threads. By default,\n    this follows :func:`pyarrow.cpu_count` (may use up to system CPU count\n    threads).\n\nReturns\n-------\nTable\n\nSee Also\n--------\nTable.from_arrays, Table.from_pandas, Table.from_pydict\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> n_legs = pa.array([2, 4, 5, 100])\n>>> animals = pa.array([\"Flamingo\", \"Horse\", \"Brittle stars\", \"Centipede\"])\n>>> names = [\"n_legs\", \"animals\"]\n\nConstruct a Table from a python dictionary:\n\n>>> pa.table({\"n_legs\": n_legs, \"animals\": animals})\npyarrow.Table\nn_legs: int64\nanimals: string\n----\nn_legs: [[2,4,5,100]]\nanimals: [[\"Flamingo\",\"Horse\",\"Brittle stars\",\"Centipede\"]]\n\nConstruct a Table from arrays:""\n\n>>> pa.table([n_legs, animals], names=names)\npyarrow.Table\nn_legs: int64\nanimals: string\n----\nn_legs: [[2,4,5,100]]\nanimals: [[\"Flamingo\",\"Horse\",\"Brittle stars\",\"Centipede\"]]\n\nConstruct a Table from arrays with metadata:\n\n>>> my_metadata={\"n_legs\": \"Number of legs per animal\"}\n>>> pa.table([n_legs, animals], names=names, metadata = my_metadata).schema\nn_legs: int64\nanimals: string\n-- schema metadata --\nn_legs: 'Number of legs per animal'\n\nConstruct a Table from pandas DataFrame:\n\n>>> import pandas as pd\n>>> df = pd.DataFrame({'year': [2020, 2022, 2019, 2021],\n...                    'n_legs': [2, 4, 5, 100],\n...                    'animals': [\"Flamingo\", \"Horse\", \"Brittle stars\", \"Centipede\"]})\n>>> pa.table(df)\npyarrow.Table\nyear: int64\nn_legs: int64\nanimals: string\n----\nyear: [[2020,2022,2019,2021]]\nn_legs: [[2,4,5,100]]\nanimals: [[\"Flamingo\",\"Horse\",\"Brittle stars\",\"Centipede\"]]\n\nConstruct a Table from pandas DataFrame with pyarrow schema:\n\n>>> my_schema = pa.schema([\n...     pa.field('n_legs', pa.int64()),\n...     pa.field('animals', pa.string())],\n...     metadata={\"n_legs\": \"Number of legs per animal\"})\n>>> pa.table(df, my_schema).schema\nn_legs: int64\nanimals: string\n-- schema metadata --\nn_legs: 'Number of legs per animal'\npandas: '{\"index_columns\": [], \"column_indexes\": [{\"name\": null, ...\n\nConstruct a Table from chunked arrays:\n\n>>> n_legs = pa.chunked_array([[2, 2, 4], [4, 5, 100]])\n>>> animals = pa.chunked_array([[\"Flamingo\", \"Parrot\", \"Dog\"], [\"Horse\", \"Brittle stars\", \"Centipede\"]])\n>>> table = pa.table([n_legs, animals], names=names)\n>>> table\npyarrow.Table\nn_legs: int64\nanimals: string\n----\nn_legs: [[2,2,4],[4,5,100]]\nanimals: [[\"Flamingo\",\"Parrot\",\"Dog\"],[\"Horse\",\"Brittle stars\",\"Centipede\"]]");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_225table = {"table", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_225table, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_224table};
                    static PyObject *__pyx_pw_7pyarrow_3lib_225table(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      PyObject *__pyx_v_data = 0;
                      PyObject *__pyx_v_names = 0;
                      PyObject *__pyx_v_schema = 0;
                      PyObject *__pyx_v_metadata = 0;
                      PyObject *__pyx_v_nthreads = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[5] = {0,0,0,0,0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("table (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_data,&__pyx_mstate_global->__pyx_n_u_names,&__pyx_mstate_global->__pyx_n_u_schema,&__pyx_mstate_global->__pyx_n_u_metadata,&__pyx_mstate_global->__pyx_n_u_nthreads,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(17, 6085, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  5:
                            values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(17, 6085, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  4:
                            values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(17, 6085, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  3:
                            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(17, 6085, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  2:
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(17, 6085, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 6085, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "table", 0) < (0)) __PYX_ERR(17, 6085, __pyx_L3_error)
                          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
                          if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
                          if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None));
                          if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)Py_None));
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("table", 0, 1, 5, i); __PYX_ERR(17, 6085, __pyx_L3_error) }
                          }
                        } else {
                          switch (__pyx_nargs) {
                            case  5:
                            values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(17, 6085, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  4:
                            values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(17, 6085, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  3:
                            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(17, 6085, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  2:
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(17, 6085, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 6085, __pyx_L3_error)
                            break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
                          if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
                          if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None));
                          if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)Py_None));
                        }
                        __pyx_v_data = values[0];
                        __pyx_v_names = values[1];
                        __pyx_v_schema = values[2];
                        __pyx_v_metadata = values[3];
                        __pyx_v_nthreads = values[4];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("table", 0, 1, 5, __pyx_nargs); __PYX_ERR(17, 6085, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.table", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_224table(__pyx_self, __pyx_v_data, __pyx_v_names, __pyx_v_schema, __pyx_v_metadata, __pyx_v_nthreads);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_224table(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_data, PyObject *__pyx_v_names, PyObject *__pyx_v_schema, PyObject *__pyx_v_metadata, PyObject *__pyx_v_nthreads) {
                      PyObject *__pyx_v_requested = NULL;
                      PyObject *__pyx_v_capsule = NULL;
                      PyObject *__pyx_v_reader = NULL;
                      PyObject *__pyx_v_table = NULL;
                      PyObject *__pyx_v_batch = NULL;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_t_1;
                      int __pyx_t_2;
                      PyObject *__pyx_t_3 = NULL;
                      PyObject *__pyx_t_4 = NULL;
                      size_t __pyx_t_5;
                      PyObject *__pyx_t_6 = NULL;
                      PyObject *__pyx_t_7 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("table", 0);
                      __Pyx_INCREF(__pyx_v_names);
                      __Pyx_INCREF(__pyx_v_schema);

                      /* "pyarrow/table.pxi":6200
 *     """
 *     # accept schema as first argument for backwards compatibility / usability
 *     if isinstance(names, Schema) and schema is None:             # <<<<<<<<<<<<<<
 *         schema = names
 *         names = None
*/
                      __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_names, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Schema); 
                      if (__pyx_t_2) {
                      } else {
                        __pyx_t_1 = __pyx_t_2;
                        goto __pyx_L4_bool_binop_done;
                      }
                      __pyx_t_2 = (__pyx_v_schema == Py_None);
                      __pyx_t_1 = __pyx_t_2;
                      __pyx_L4_bool_binop_done:;
                      if (__pyx_t_1) {

                        /* "pyarrow/table.pxi":6201
 *     # accept schema as first argument for backwards compatibility / usability
 *     if isinstance(names, Schema) and schema is None:
 *         schema = names             # <<<<<<<<<<<<<<
 *         names = None
 * 
*/
                        __Pyx_INCREF(__pyx_v_names);
                        __Pyx_DECREF_SET(__pyx_v_schema, __pyx_v_names);

                        /* "pyarrow/table.pxi":6202
 *     if isinstance(names, Schema) and schema is None:
 *         schema = names
 *         names = None             # <<<<<<<<<<<<<<
 * 
 *     if isinstance(data, (list, tuple)):
*/
                        __Pyx_INCREF(Py_None);
                        __Pyx_DECREF_SET(__pyx_v_names, Py_None);

                        /* "pyarrow/table.pxi":6200
 *     """
 *     # accept schema as first argument for backwards compatibility / usability
 *     if isinstance(names, Schema) and schema is None:             # <<<<<<<<<<<<<<
 *         schema = names
 *         names = None
*/
                      }

                      /* "pyarrow/table.pxi":6204
 *         names = None
 * 
 *     if isinstance(data, (list, tuple)):             # <<<<<<<<<<<<<<
 *         return Table.from_arrays(data, names=names, schema=schema,
 *                                  metadata=metadata)
*/
                      __pyx_t_2 = PyList_Check(__pyx_v_data); 
                      if (!__pyx_t_2) {
                      } else {
                        __pyx_t_1 = __pyx_t_2;
                        goto __pyx_L7_bool_binop_done;
                      }
                      __pyx_t_2 = PyTuple_Check(__pyx_v_data); 
                      __pyx_t_1 = __pyx_t_2;
                      __pyx_L7_bool_binop_done:;
                      if (__pyx_t_1) {

                        /* "pyarrow/table.pxi":6205
 * 
 *     if isinstance(data, (list, tuple)):
 *         return Table.from_arrays(data, names=names, schema=schema,             # <<<<<<<<<<<<<<
 *                                  metadata=metadata)
 *     elif isinstance(data, dict):
*/
                        __Pyx_XDECREF(__pyx_r);
                        __pyx_t_4 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Table);
                        __Pyx_INCREF(__pyx_t_4);

                        /* "pyarrow/table.pxi":6206
 *     if isinstance(data, (list, tuple)):
 *         return Table.from_arrays(data, names=names, schema=schema,
 *                                  metadata=metadata)             # <<<<<<<<<<<<<<
 *     elif isinstance(data, dict):
 *         if names is not None:
*/
                        __pyx_t_5 = 0;
                        {
                          PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 3 : 0)] = {__pyx_t_4, __pyx_v_data};
                          __pyx_t_6 = __Pyx_MakeVectorcallBuilderKwds(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 6205, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_6);
                          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_names, __pyx_v_names, __pyx_t_6, __pyx_callargs+2, 0) < (0)) __PYX_ERR(17, 6205, __pyx_L1_error)
                          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_schema, __pyx_v_schema, __pyx_t_6, __pyx_callargs+2, 1) < (0)) __PYX_ERR(17, 6205, __pyx_L1_error)
                          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_metadata, __pyx_v_metadata, __pyx_t_6, __pyx_callargs+2, 2) < (0)) __PYX_ERR(17, 6205, __pyx_L1_error)
                          __pyx_t_3 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_from_arrays, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_6);
                          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                          if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 6205, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_3);
                        }
                        __pyx_r = __pyx_t_3;
                        __pyx_t_3 = 0;
                        goto __pyx_L0;

                        /* "pyarrow/table.pxi":6204
 *         names = None
 * 
 *     if isinstance(data, (list, tuple)):             # <<<<<<<<<<<<<<
 *         return Table.from_arrays(data, names=names, schema=schema,
 *                                  metadata=metadata)
*/
                      }

                      /* "pyarrow/table.pxi":6207
 *         return Table.from_arrays(data, names=names, schema=schema,
 *                                  metadata=metadata)
 *     elif isinstance(data, dict):             # <<<<<<<<<<<<<<
 *         if names is not None:
 *             raise ValueError(
*/
                      __pyx_t_1 = PyDict_Check(__pyx_v_data); 
                      if (__pyx_t_1) {

                        /* "pyarrow/table.pxi":6208
 *                                  metadata=metadata)
 *     elif isinstance(data, dict):
 *         if names is not None:             # <<<<<<<<<<<<<<
 *             raise ValueError(
 *                 "The 'names' argument is not valid when passing a dictionary")
*/
                        __pyx_t_1 = (__pyx_v_names != Py_None);
                        if (unlikely(__pyx_t_1)) {

                          /* "pyarrow/table.pxi":6209
 *     elif isinstance(data, dict):
 *         if names is not None:
 *             raise ValueError(             # <<<<<<<<<<<<<<
 *                 "The 'names' argument is not valid when passing a dictionary")
 *         return Table.from_pydict(data, schema=schema, metadata=metadata)
*/
                          __pyx_t_6 = NULL;
                          __pyx_t_5 = 1;
                          {
                            PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_mstate_global->__pyx_kp_u_The_names_argument_is_not_valid};
                            __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                            __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
                            if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 6209, __pyx_L1_error)
                            __Pyx_GOTREF(__pyx_t_3);
                          }
                          __Pyx_Raise(__pyx_t_3, 0, 0, 0);
                          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                          __PYX_ERR(17, 6209, __pyx_L1_error)

                          /* "pyarrow/table.pxi":6208
 *                                  metadata=metadata)
 *     elif isinstance(data, dict):
 *         if names is not None:             # <<<<<<<<<<<<<<
 *             raise ValueError(
 *                 "The 'names' argument is not valid when passing a dictionary")
*/
                        }

                        /* "pyarrow/table.pxi":6211
 *             raise ValueError(
 *                 "The 'names' argument is not valid when passing a dictionary")
 *         return Table.from_pydict(data, schema=schema, metadata=metadata)             # <<<<<<<<<<<<<<
 *     elif _pandas_api.is_data_frame(data):
 *         if names is not None or metadata is not None:
*/
                        __Pyx_XDECREF(__pyx_r);
                        __pyx_t_6 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Table);
                        __Pyx_INCREF(__pyx_t_6);
                        __pyx_t_5 = 0;
                        {
                          PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_6, __pyx_v_data};
                          __pyx_t_4 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 6211, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_4);
                          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_schema, __pyx_v_schema, __pyx_t_4, __pyx_callargs+2, 0) < (0)) __PYX_ERR(17, 6211, __pyx_L1_error)
                          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_metadata, __pyx_v_metadata, __pyx_t_4, __pyx_callargs+2, 1) < (0)) __PYX_ERR(17, 6211, __pyx_L1_error)
                          __pyx_t_3 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_from_pydict_2, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_4);
                          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
                          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                          if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 6211, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_3);
                        }
                        __pyx_r = __pyx_t_3;
                        __pyx_t_3 = 0;
                        goto __pyx_L0;

                        /* "pyarrow/table.pxi":6207
 *         return Table.from_arrays(data, names=names, schema=schema,
 *                                  metadata=metadata)
 *     elif isinstance(data, dict):             # <<<<<<<<<<<<<<
 *         if names is not None:
 *             raise ValueError(
*/
                      }

                      /* "pyarrow/table.pxi":6212
 *                 "The 'names' argument is not valid when passing a dictionary")
 *         return Table.from_pydict(data, schema=schema, metadata=metadata)
 *     elif _pandas_api.is_data_frame(data):             # <<<<<<<<<<<<<<
 *         if names is not None or metadata is not None:
 *             raise ValueError(
*/
                      __pyx_t_4 = NULL;
                      __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_pandas_api); if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 6212, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_6);
                      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_is_data_frame); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 6212, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_7);
                      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                      __pyx_t_5 = 1;
                      #if CYTHON_UNPACK_METHODS
                      if (unlikely(PyMethod_Check(__pyx_t_7))) {
                        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_7);
                        assert(__pyx_t_4);
                        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
                        __Pyx_INCREF(__pyx_t_4);
                        __Pyx_INCREF(__pyx__function);
                        __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
                        __pyx_t_5 = 0;
                      }
                      #endif
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_data};
                        __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
                        if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 6212, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_3);
                      }
                      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(17, 6212, __pyx_L1_error)
                      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                      if (__pyx_t_1) {

                        /* "pyarrow/table.pxi":6213
 *         return Table.from_pydict(data, schema=schema, metadata=metadata)
 *     elif _pandas_api.is_data_frame(data):
 *         if names is not None or metadata is not None:             # <<<<<<<<<<<<<<
 *             raise ValueError(
 *                 "The 'names' and 'metadata' arguments are not valid when "
*/
                        __pyx_t_2 = (__pyx_v_names != Py_None);
                        if (!__pyx_t_2) {
                        } else {
                          __pyx_t_1 = __pyx_t_2;
                          goto __pyx_L11_bool_binop_done;
                        }
                        __pyx_t_2 = (__pyx_v_metadata != Py_None);
                        __pyx_t_1 = __pyx_t_2;
                        __pyx_L11_bool_binop_done:;
                        if (unlikely(__pyx_t_1)) {

                          /* "pyarrow/table.pxi":6214
 *     elif _pandas_api.is_data_frame(data):
 *         if names is not None or metadata is not None:
 *             raise ValueError(             # <<<<<<<<<<<<<<
 *                 "The 'names' and 'metadata' arguments are not valid when "
 *                 "passing a pandas DataFrame")
*/
                          __pyx_t_7 = NULL;
                          __pyx_t_5 = 1;
                          {
                            PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_The_names_and_metadata_arguments};
                            __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
                            if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 6214, __pyx_L1_error)
                            __Pyx_GOTREF(__pyx_t_3);
                          }
                          __Pyx_Raise(__pyx_t_3, 0, 0, 0);
                          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                          __PYX_ERR(17, 6214, __pyx_L1_error)

                          /* "pyarrow/table.pxi":6213
 *         return Table.from_pydict(data, schema=schema, metadata=metadata)
 *     elif _pandas_api.is_data_frame(data):
 *         if names is not None or metadata is not None:             # <<<<<<<<<<<<<<
 *             raise ValueError(
 *                 "The 'names' and 'metadata' arguments are not valid when "
*/
                        }

                        /* "pyarrow/table.pxi":6217
 *                 "The 'names' and 'metadata' arguments are not valid when "
 *                 "passing a pandas DataFrame")
 *         return Table.from_pandas(data, schema=schema, nthreads=nthreads)             # <<<<<<<<<<<<<<
 *     elif hasattr(data, "__arrow_c_stream__"):
 *         if names is not None or metadata is not None:
*/
                        __Pyx_XDECREF(__pyx_r);
                        __pyx_t_7 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Table);
                        __Pyx_INCREF(__pyx_t_7);
                        __pyx_t_5 = 0;
                        {
                          PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_7, __pyx_v_data};
                          __pyx_t_4 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 6217, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_4);
                          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_schema, __pyx_v_schema, __pyx_t_4, __pyx_callargs+2, 0) < (0)) __PYX_ERR(17, 6217, __pyx_L1_error)
                          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_nthreads, __pyx_v_nthreads, __pyx_t_4, __pyx_callargs+2, 1) < (0)) __PYX_ERR(17, 6217, __pyx_L1_error)
                          __pyx_t_3 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_from_pandas, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_4);
                          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
                          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                          if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 6217, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_3);
                        }
                        __pyx_r = __pyx_t_3;
                        __pyx_t_3 = 0;
                        goto __pyx_L0;

                        /* "pyarrow/table.pxi":6212
 *                 "The 'names' argument is not valid when passing a dictionary")
 *         return Table.from_pydict(data, schema=schema, metadata=metadata)
 *     elif _pandas_api.is_data_frame(data):             # <<<<<<<<<<<<<<
 *         if names is not None or metadata is not None:
 *             raise ValueError(
*/
                      }

                      /* "pyarrow/table.pxi":6218
 *                 "passing a pandas DataFrame")
 *         return Table.from_pandas(data, schema=schema, nthreads=nthreads)
 *     elif hasattr(data, "__arrow_c_stream__"):             # <<<<<<<<<<<<<<
 *         if names is not None or metadata is not None:
 *             raise ValueError(
*/
                      __pyx_t_1 = __Pyx_HasAttr(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_arrow_c_stream); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(17, 6218, __pyx_L1_error)
                      if (__pyx_t_1) {

                        /* "pyarrow/table.pxi":6219
 *         return Table.from_pandas(data, schema=schema, nthreads=nthreads)
 *     elif hasattr(data, "__arrow_c_stream__"):
 *         if names is not None or metadata is not None:             # <<<<<<<<<<<<<<
 *             raise ValueError(
 *                 "The 'names' and 'metadata' arguments are not valid when "
*/
                        __pyx_t_2 = (__pyx_v_names != Py_None);
                        if (!__pyx_t_2) {
                        } else {
                          __pyx_t_1 = __pyx_t_2;
                          goto __pyx_L14_bool_binop_done;
                        }
                        __pyx_t_2 = (__pyx_v_metadata != Py_None);
                        __pyx_t_1 = __pyx_t_2;
                        __pyx_L14_bool_binop_done:;
                        if (unlikely(__pyx_t_1)) {

                          /* "pyarrow/table.pxi":6220
 *     elif hasattr(data, "__arrow_c_stream__"):
 *         if names is not None or metadata is not None:
 *             raise ValueError(             # <<<<<<<<<<<<<<
 *                 "The 'names' and 'metadata' arguments are not valid when "
 *                 "using Arrow PyCapsule Interface")
*/
                          __pyx_t_4 = NULL;
                          __pyx_t_5 = 1;
                          {
                            PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_The_names_and_metadata_arguments_2};
                            __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                            if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 6220, __pyx_L1_error)
                            __Pyx_GOTREF(__pyx_t_3);
                          }
                          __Pyx_Raise(__pyx_t_3, 0, 0, 0);
                          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                          __PYX_ERR(17, 6220, __pyx_L1_error)

                          /* "pyarrow/table.pxi":6219
 *         return Table.from_pandas(data, schema=schema, nthreads=nthreads)
 *     elif hasattr(data, "__arrow_c_stream__"):
 *         if names is not None or metadata is not None:             # <<<<<<<<<<<<<<
 *             raise ValueError(
 *                 "The 'names' and 'metadata' arguments are not valid when "
*/
                        }

                        /* "pyarrow/table.pxi":6223
 *                 "The 'names' and 'metadata' arguments are not valid when "
 *                 "using Arrow PyCapsule Interface")
 *         if schema is not None:             # <<<<<<<<<<<<<<
 *             requested = schema.__arrow_c_schema__()
 *         else:
*/
                        __pyx_t_1 = (__pyx_v_schema != Py_None);
                        if (__pyx_t_1) {

                          /* "pyarrow/table.pxi":6224
 *                 "using Arrow PyCapsule Interface")
 *         if schema is not None:
 *             requested = schema.__arrow_c_schema__()             # <<<<<<<<<<<<<<
 *         else:
 *             requested = None
*/
                          __pyx_t_4 = __pyx_v_schema;
                          __Pyx_INCREF(__pyx_t_4);
                          __pyx_t_5 = 0;
                          {
                            PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
                            __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_arrow_c_schema, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                            if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 6224, __pyx_L1_error)
                            __Pyx_GOTREF(__pyx_t_3);
                          }
                          __pyx_v_requested = __pyx_t_3;
                          __pyx_t_3 = 0;

                          /* "pyarrow/table.pxi":6223
 *                 "The 'names' and 'metadata' arguments are not valid when "
 *                 "using Arrow PyCapsule Interface")
 *         if schema is not None:             # <<<<<<<<<<<<<<
 *             requested = schema.__arrow_c_schema__()
 *         else:
*/
                          goto __pyx_L16;
                        }

                        /* "pyarrow/table.pxi":6226
 *             requested = schema.__arrow_c_schema__()
 *         else:
 *             requested = None             # <<<<<<<<<<<<<<
 *         capsule = data.__arrow_c_stream__(requested)
 *         reader = RecordBatchReader._import_from_c_capsule(capsule)
*/
                        /*else*/ {
                          __Pyx_INCREF(Py_None);
                          __pyx_v_requested = Py_None;
                        }
                        __pyx_L16:;

                        /* "pyarrow/table.pxi":6227
 *         else:
 *             requested = None
 *         capsule = data.__arrow_c_stream__(requested)             # <<<<<<<<<<<<<<
 *         reader = RecordBatchReader._import_from_c_capsule(capsule)
 *         table = reader.read_all()
*/
                        __pyx_t_4 = __pyx_v_data;
                        __Pyx_INCREF(__pyx_t_4);
                        __pyx_t_5 = 0;
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_requested};
                          __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_arrow_c_stream, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                          if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 6227, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_3);
                        }
                        __pyx_v_capsule = __pyx_t_3;
                        __pyx_t_3 = 0;

                        /* "pyarrow/table.pxi":6228
 *             requested = None
 *         capsule = data.__arrow_c_stream__(requested)
 *         reader = RecordBatchReader._import_from_c_capsule(capsule)             # <<<<<<<<<<<<<<
 *         table = reader.read_all()
 *         if schema is not None and table.schema != schema:
*/
                        __pyx_t_4 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RecordBatchReader);
                        __Pyx_INCREF(__pyx_t_4);
                        __pyx_t_5 = 0;
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_capsule};
                          __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_import_from_c_capsule, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                          if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 6228, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_3);
                        }
                        __pyx_v_reader = __pyx_t_3;
                        __pyx_t_3 = 0;

                        /* "pyarrow/table.pxi":6229
 *         capsule = data.__arrow_c_stream__(requested)
 *         reader = RecordBatchReader._import_from_c_capsule(capsule)
 *         table = reader.read_all()             # <<<<<<<<<<<<<<
 *         if schema is not None and table.schema != schema:
 *             # __arrow_c_array__ coerces schema with best effort, so we might
*/
                        __pyx_t_4 = __pyx_v_reader;
                        __Pyx_INCREF(__pyx_t_4);
                        __pyx_t_5 = 0;
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
                          __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_read_all, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                          if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 6229, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_3);
                        }
                        __pyx_v_table = __pyx_t_3;
                        __pyx_t_3 = 0;

                        /* "pyarrow/table.pxi":6230
 *         reader = RecordBatchReader._import_from_c_capsule(capsule)
 *         table = reader.read_all()
 *         if schema is not None and table.schema != schema:             # <<<<<<<<<<<<<<
 *             # __arrow_c_array__ coerces schema with best effort, so we might
 *             # need to cast it if the producer wasn't able to cast to exact schema.
*/
                        __pyx_t_2 = (__pyx_v_schema != Py_None);
                        if (__pyx_t_2) {
                        } else {
                          __pyx_t_1 = __pyx_t_2;
                          goto __pyx_L18_bool_binop_done;
                        }
                        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_table, __pyx_mstate_global->__pyx_n_u_schema); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 6230, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_3);
                        __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_v_schema, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 6230, __pyx_L1_error)
                        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                        __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(17, 6230, __pyx_L1_error)
                        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                        __pyx_t_1 = __pyx_t_2;
                        __pyx_L18_bool_binop_done:;
                        if (__pyx_t_1) {

                          /* "pyarrow/table.pxi":6233
 *             # __arrow_c_array__ coerces schema with best effort, so we might
 *             # need to cast it if the producer wasn't able to cast to exact schema.
 *             table = table.cast(schema)             # <<<<<<<<<<<<<<
 *         return table
 *     elif hasattr(data, "__arrow_c_array__") or hasattr(data, "__arrow_c_device_array__"):
*/
                          __pyx_t_3 = __pyx_v_table;
                          __Pyx_INCREF(__pyx_t_3);
                          __pyx_t_5 = 0;
                          {
                            PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_schema};
                            __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_cast, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                            if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 6233, __pyx_L1_error)
                            __Pyx_GOTREF(__pyx_t_4);
                          }
                          __Pyx_DECREF_SET(__pyx_v_table, __pyx_t_4);
                          __pyx_t_4 = 0;

                          /* "pyarrow/table.pxi":6230
 *         reader = RecordBatchReader._import_from_c_capsule(capsule)
 *         table = reader.read_all()
 *         if schema is not None and table.schema != schema:             # <<<<<<<<<<<<<<
 *             # __arrow_c_array__ coerces schema with best effort, so we might
 *             # need to cast it if the producer wasn't able to cast to exact schema.
*/
                        }

                        /* "pyarrow/table.pxi":6234
 *             # need to cast it if the producer wasn't able to cast to exact schema.
 *             table = table.cast(schema)
 *         return table             # <<<<<<<<<<<<<<
 *     elif hasattr(data, "__arrow_c_array__") or hasattr(data, "__arrow_c_device_array__"):
 *         if names is not None or metadata is not None:
*/
                        __Pyx_XDECREF(__pyx_r);
                        __Pyx_INCREF(__pyx_v_table);
                        __pyx_r = __pyx_v_table;
                        goto __pyx_L0;

                        /* "pyarrow/table.pxi":6218
 *                 "passing a pandas DataFrame")
 *         return Table.from_pandas(data, schema=schema, nthreads=nthreads)
 *     elif hasattr(data, "__arrow_c_stream__"):             # <<<<<<<<<<<<<<
 *         if names is not None or metadata is not None:
 *             raise ValueError(
*/
                      }

                      /* "pyarrow/table.pxi":6235
 *             table = table.cast(schema)
 *         return table
 *     elif hasattr(data, "__arrow_c_array__") or hasattr(data, "__arrow_c_device_array__"):             # <<<<<<<<<<<<<<
 *         if names is not None or metadata is not None:
 *             raise ValueError(
*/
                      __pyx_t_2 = __Pyx_HasAttr(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_arrow_c_array); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(17, 6235, __pyx_L1_error)
                      if (!__pyx_t_2) {
                      } else {
                        __pyx_t_1 = __pyx_t_2;
                        goto __pyx_L20_bool_binop_done;
                      }
                      __pyx_t_2 = __Pyx_HasAttr(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_arrow_c_device_array); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(17, 6235, __pyx_L1_error)
                      __pyx_t_1 = __pyx_t_2;
                      __pyx_L20_bool_binop_done:;
                      if (likely(__pyx_t_1)) {

                        /* "pyarrow/table.pxi":6236
 *         return table
 *     elif hasattr(data, "__arrow_c_array__") or hasattr(data, "__arrow_c_device_array__"):
 *         if names is not None or metadata is not None:             # <<<<<<<<<<<<<<
 *             raise ValueError(
 *                 "The 'names' and 'metadata' arguments are not valid when "
*/
                        __pyx_t_2 = (__pyx_v_names != Py_None);
                        if (!__pyx_t_2) {
                        } else {
                          __pyx_t_1 = __pyx_t_2;
                          goto __pyx_L23_bool_binop_done;
                        }
                        __pyx_t_2 = (__pyx_v_metadata != Py_None);
                        __pyx_t_1 = __pyx_t_2;
                        __pyx_L23_bool_binop_done:;
                        if (unlikely(__pyx_t_1)) {

                          /* "pyarrow/table.pxi":6237
 *     elif hasattr(data, "__arrow_c_array__") or hasattr(data, "__arrow_c_device_array__"):
 *         if names is not None or metadata is not None:
 *             raise ValueError(             # <<<<<<<<<<<<<<
 *                 "The 'names' and 'metadata' arguments are not valid when "
 *                 "using Arrow PyCapsule Interface")
*/
                          __pyx_t_3 = NULL;
                          __pyx_t_5 = 1;
                          {
                            PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_The_names_and_metadata_arguments_2};
                            __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                            if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 6237, __pyx_L1_error)
                            __Pyx_GOTREF(__pyx_t_4);
                          }
                          __Pyx_Raise(__pyx_t_4, 0, 0, 0);
                          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                          __PYX_ERR(17, 6237, __pyx_L1_error)

                          /* "pyarrow/table.pxi":6236
 *         return table
 *     elif hasattr(data, "__arrow_c_array__") or hasattr(data, "__arrow_c_device_array__"):
 *         if names is not None or metadata is not None:             # <<<<<<<<<<<<<<
 *             raise ValueError(
 *                 "The 'names' and 'metadata' arguments are not valid when "
*/
                        }

                        /* "pyarrow/table.pxi":6240
 *                 "The 'names' and 'metadata' arguments are not valid when "
 *                 "using Arrow PyCapsule Interface")
 *         batch = record_batch(data, schema)             # <<<<<<<<<<<<<<
 *         return Table.from_batches([batch])
 *     else:
*/
                        __pyx_t_3 = NULL;
                        __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_record_batch); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 6240, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_7);
                        __pyx_t_5 = 1;
                        #if CYTHON_UNPACK_METHODS
                        if (unlikely(PyMethod_Check(__pyx_t_7))) {
                          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_7);
                          assert(__pyx_t_3);
                          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
                          __Pyx_INCREF(__pyx_t_3);
                          __Pyx_INCREF(__pyx__function);
                          __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
                          __pyx_t_5 = 0;
                        }
                        #endif
                        {
                          PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_data, __pyx_v_schema};
                          __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
                          if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 6240, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_4);
                        }
                        __pyx_v_batch = __pyx_t_4;
                        __pyx_t_4 = 0;

                        /* "pyarrow/table.pxi":6241
 *                 "using Arrow PyCapsule Interface")
 *         batch = record_batch(data, schema)
 *         return Table.from_batches([batch])             # <<<<<<<<<<<<<<
 *     else:
 *         raise TypeError(
*/
                        __Pyx_XDECREF(__pyx_r);
                        __pyx_t_7 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Table);
                        __Pyx_INCREF(__pyx_t_7);
                        __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 6241, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_3);
                        __Pyx_INCREF(__pyx_v_batch);
                        __Pyx_GIVEREF(__pyx_v_batch);
                        if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_v_batch) != (0)) __PYX_ERR(17, 6241, __pyx_L1_error);
                        __pyx_t_5 = 0;
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_3};
                          __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_from_batches, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
                          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                          if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 6241, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_4);
                        }
                        __pyx_r = __pyx_t_4;
                        __pyx_t_4 = 0;
                        goto __pyx_L0;

                        /* "pyarrow/table.pxi":6235
 *             table = table.cast(schema)
 *         return table
 *     elif hasattr(data, "__arrow_c_array__") or hasattr(data, "__arrow_c_device_array__"):             # <<<<<<<<<<<<<<
 *         if names is not None or metadata is not None:
 *             raise ValueError(
*/
                      }

                      /* "pyarrow/table.pxi":6243
 *         return Table.from_batches([batch])
 *     else:
 *         raise TypeError(             # <<<<<<<<<<<<<<
 *             "Expected pandas DataFrame, python dictionary or list of arrays")
 * 
*/
                      /*else*/ {
                        __pyx_t_3 = NULL;
                        __pyx_t_5 = 1;
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Expected_pandas_DataFrame_python};
                          __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                          if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 6243, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_4);
                        }
                        __Pyx_Raise(__pyx_t_4, 0, 0, 0);
                        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                        __PYX_ERR(17, 6243, __pyx_L1_error)
                      }

                      /* "pyarrow/table.pxi":6085
 * 
 * 
 * def table(data, names=None, schema=None, metadata=None, nthreads=None):             # <<<<<<<<<<<<<<
 *     """
 *     Create a pyarrow.Table from a Python data structure or sequence of arrays.
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_XDECREF(__pyx_t_4);
                      __Pyx_XDECREF(__pyx_t_6);
                      __Pyx_XDECREF(__pyx_t_7);
                      __Pyx_AddTraceback("pyarrow.lib.table", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XDECREF(__pyx_v_requested);
                      __Pyx_XDECREF(__pyx_v_capsule);
                      __Pyx_XDECREF(__pyx_v_reader);
                      __Pyx_XDECREF(__pyx_v_table);
                      __Pyx_XDECREF(__pyx_v_batch);
                      __Pyx_XDECREF(__pyx_v_names);
                      __Pyx_XDECREF(__pyx_v_schema);
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/table.pxi":6247
 * 
 * 
 * def concat_tables(tables, MemoryPool memory_pool=None, str promote_options="none", **kwargs):             # <<<<<<<<<<<<<<
 *     """
 *     Concatenate pyarrow.Table objects.
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_227concat_tables(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_226concat_tables, "concat_tables(tables, MemoryPool memory_pool=None, str promote_options='none', **kwargs)\n\nConcatenate pyarrow.Table objects.\n\nIf promote_options=\"none\", a zero-copy concatenation will be performed. The schemas\nof all the Tables must be the same (except the metadata), otherwise an\nexception will be raised. The result Table will share the metadata with the\nfirst table.\n\nIf promote_options=\"default\", any null type arrays will be casted to the type of other\narrays in the column of the same name. If a table is missing a particular\nfield, null values of the appropriate type will be generated to take the\nplace of the missing field. The new schema will share the metadata with the\nfirst table. Each field in the new schema will share the metadata with the\nfirst table which has the field defined. Note that type promotions may\ninvolve additional allocations on the given ``memory_pool``.\n\nIf promote_options=\"permissive\", the behavior of default plus types will be promoted\nto the common denominator that fits all the fields.\n\nParameters\n----------\ntables : iterable of pyarrow.Table objects\n    Pyarrow tables to concatenate into a single Table.\nmemory_pool : MemoryPool, default None\n    For memory allocations, if required, otherwise use default pool.\npromote_options : str, default none\n    Accepts strings \"none\", \"default\" and \"permissive\".\n**kwargs : dict, optional\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> t1 = pa.table([\n...     pa.array([2, 4, 5, 100]),\n...     pa.array([\"Flamingo\", \"Horse\", \"Brittle stars\", \"Centipede\"])\n...     ], names=['n_legs', 'animals'])\n>>> t2 = pa.table([\n...     pa.array([2, 4]),\n...     pa.array([\"Parrot\", \"Dog\"])\n...     ], names=['n_legs', 'animals'])\n>>> pa.concat_tables([t1,t2])\npyarrow.Table\nn_legs: int64\nanimals: string\n----\nn_legs: [[2,4,5,100],[2,4]]\nanimals: [[\"Flamingo\",\"Horse\",\"Brittle stars\",\"Centipede\"],[\"Parrot\",\"Dog\"]]");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_227concat_tables = {"concat_tables", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_227concat_tables, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_226concat_tables};
                    static PyObject *__pyx_pw_7pyarrow_3lib_227concat_tables(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      PyObject *__pyx_v_tables = 0;
                      struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_memory_pool = 0;
                      PyObject *__pyx_v_promote_options = 0;
                      PyObject *__pyx_v_kwargs = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[3] = {0,0,0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("concat_tables (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
                      __Pyx_GOTREF(__pyx_v_kwargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_tables,&__pyx_mstate_global->__pyx_n_u_memory_pool,&__pyx_mstate_global->__pyx_n_u_promote_options,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(17, 6247, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  3:
                            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(17, 6247, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  2:
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(17, 6247, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 6247, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, __pyx_v_kwargs, values, kwd_pos_args, __pyx_kwds_len, "concat_tables", 1) < (0)) __PYX_ERR(17, 6247, __pyx_L3_error)
                          if (!values[1]) values[1] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)Py_None));
                          if (!values[2]) values[2] = __Pyx_NewRef(((PyObject*)((PyObject*)__pyx_mstate_global->__pyx_n_u_none)));
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("concat_tables", 0, 1, 3, i); __PYX_ERR(17, 6247, __pyx_L3_error) }
                          }
                        } else {
                          switch (__pyx_nargs) {
                            case  3:
                            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(17, 6247, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  2:
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(17, 6247, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 6247, __pyx_L3_error)
                            break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          if (!values[1]) values[1] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)Py_None));
                          if (!values[2]) values[2] = __Pyx_NewRef(((PyObject*)((PyObject*)__pyx_mstate_global->__pyx_n_u_none)));
                        }
                        __pyx_v_tables = values[0];
                        __pyx_v_memory_pool = ((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)values[1]);
                        __pyx_v_promote_options = ((PyObject*)values[2]);
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("concat_tables", 0, 1, 3, __pyx_nargs); __PYX_ERR(17, 6247, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
                      __Pyx_AddTraceback("pyarrow.lib.concat_tables", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_memory_pool), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_MemoryPool, 1, "memory_pool", 0))) __PYX_ERR(17, 6247, __pyx_L1_error)
                      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_promote_options), (&PyUnicode_Type), 1, "promote_options", 1))) __PYX_ERR(17, 6247, __pyx_L1_error)
                      __pyx_r = __pyx_pf_7pyarrow_3lib_226concat_tables(__pyx_self, __pyx_v_tables, __pyx_v_memory_pool, __pyx_v_promote_options, __pyx_v_kwargs);

                      /* function exit code */
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __pyx_r = NULL;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      goto __pyx_L7_cleaned_up;
                      __pyx_L0:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __pyx_L7_cleaned_up:;
                      __Pyx_DECREF(__pyx_v_kwargs);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_226concat_tables(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_tables, struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_memory_pool, PyObject *__pyx_v_promote_options, PyObject *__pyx_v_kwargs) {
                      std::vector<std::shared_ptr< arrow::Table> >  __pyx_v_c_tables;
                      std::shared_ptr< arrow::Table>  __pyx_v_c_result_table;
                       arrow::MemoryPool *__pyx_v_pool;
                      struct __pyx_obj_7pyarrow_3lib_Table *__pyx_v_table = 0;
                       arrow::ConcatenateTablesOptions __pyx_v_options;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                       arrow::MemoryPool *__pyx_t_1;
                      int __pyx_t_2;
                      PyObject *__pyx_t_3 = NULL;
                      PyObject *__pyx_t_4 = NULL;
                      PyObject *__pyx_t_5 = NULL;
                      PyObject *__pyx_t_6 = NULL;
                      size_t __pyx_t_7;
                      Py_ssize_t __pyx_t_8;
                      PyObject *(*__pyx_t_9)(PyObject *);
                       arrow::Field::MergeOptions __pyx_t_10;
                      std::shared_ptr< arrow::Table>  __pyx_t_11;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("concat_tables", 0);
                      __Pyx_INCREF(__pyx_v_promote_options);

                      /* "pyarrow/table.pxi":6300
 *         vector[shared_ptr[CTable]] c_tables
 *         shared_ptr[CTable] c_result_table
 *         CMemoryPool* pool = maybe_unbox_memory_pool(memory_pool)             # <<<<<<<<<<<<<<
 *         Table table
 *         CConcatenateTablesOptions options = (
*/
                      __pyx_t_1 = __pyx_f_7pyarrow_3lib_maybe_unbox_memory_pool(__pyx_v_memory_pool); if (unlikely(__pyx_t_1 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(17, 6300, __pyx_L1_error)
                      __pyx_v_pool = __pyx_t_1;

                      /* "pyarrow/table.pxi":6303
 *         Table table
 *         CConcatenateTablesOptions options = (
 *             CConcatenateTablesOptions.Defaults())             # <<<<<<<<<<<<<<
 * 
 *     if "promote" in kwargs:
*/
                      __pyx_v_options =  arrow::ConcatenateTablesOptions::Defaults();

                      /* "pyarrow/table.pxi":6305
 *             CConcatenateTablesOptions.Defaults())
 * 
 *     if "promote" in kwargs:             # <<<<<<<<<<<<<<
 *         warnings.warn(
 *             "promote has been superseded by promote_options='default'.",
*/
                      __pyx_t_2 = (__Pyx_PyDict_ContainsTF(__pyx_mstate_global->__pyx_n_u_promote, __pyx_v_kwargs, Py_EQ)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(17, 6305, __pyx_L1_error)
                      if (__pyx_t_2) {

                        /* "pyarrow/table.pxi":6306
 * 
 *     if "promote" in kwargs:
 *         warnings.warn(             # <<<<<<<<<<<<<<
 *             "promote has been superseded by promote_options='default'.",
 *             FutureWarning, stacklevel=2)
*/
                        __pyx_t_4 = NULL;
                        __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_warnings); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 6306, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_5);
                        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_warn); if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 6306, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_6);
                        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

                        /* "pyarrow/table.pxi":6308
 *         warnings.warn(
 *             "promote has been superseded by promote_options='default'.",
 *             FutureWarning, stacklevel=2)             # <<<<<<<<<<<<<<
 *         if kwargs['promote'] is True:
 *             promote_options = "default"
*/
                        __pyx_t_7 = 1;
                        #if CYTHON_UNPACK_METHODS
                        if (unlikely(PyMethod_Check(__pyx_t_6))) {
                          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
                          assert(__pyx_t_4);
                          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
                          __Pyx_INCREF(__pyx_t_4);
                          __Pyx_INCREF(__pyx__function);
                          __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
                          __pyx_t_7 = 0;
                        }
                        #endif
                        {
                          PyObject *__pyx_callargs[3 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_promote_has_been_superseded_by_p, ((PyObject *)(((PyTypeObject*)PyExc_FutureWarning)))};
                          __pyx_t_5 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 6306, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_5);
                          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_stacklevel, __pyx_mstate_global->__pyx_int_2, __pyx_t_5, __pyx_callargs+3, 0) < (0)) __PYX_ERR(17, 6306, __pyx_L1_error)
                          __pyx_t_3 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_7, (3-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_5);
                          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                          if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 6306, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_3);
                        }
                        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

                        /* "pyarrow/table.pxi":6309
 *             "promote has been superseded by promote_options='default'.",
 *             FutureWarning, stacklevel=2)
 *         if kwargs['promote'] is True:             # <<<<<<<<<<<<<<
 *             promote_options = "default"
 * 
*/
                        __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_kwargs, __pyx_mstate_global->__pyx_n_u_promote); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 6309, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_3);
                        __pyx_t_2 = (__pyx_t_3 == Py_True);
                        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                        if (__pyx_t_2) {

                          /* "pyarrow/table.pxi":6310
 *             FutureWarning, stacklevel=2)
 *         if kwargs['promote'] is True:
 *             promote_options = "default"             # <<<<<<<<<<<<<<
 * 
 *     for table in tables:
*/
                          __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_default);
                          __Pyx_DECREF_SET(__pyx_v_promote_options, __pyx_mstate_global->__pyx_n_u_default);

                          /* "pyarrow/table.pxi":6309
 *             "promote has been superseded by promote_options='default'.",
 *             FutureWarning, stacklevel=2)
 *         if kwargs['promote'] is True:             # <<<<<<<<<<<<<<
 *             promote_options = "default"
 * 
*/
                        }

                        /* "pyarrow/table.pxi":6305
 *             CConcatenateTablesOptions.Defaults())
 * 
 *     if "promote" in kwargs:             # <<<<<<<<<<<<<<
 *         warnings.warn(
 *             "promote has been superseded by promote_options='default'.",
*/
                      }

                      /* "pyarrow/table.pxi":6312
 *             promote_options = "default"
 * 
 *     for table in tables:             # <<<<<<<<<<<<<<
 *         c_tables.push_back(table.sp_table)
 * 
*/
                      if (likely(PyList_CheckExact(__pyx_v_tables)) || PyTuple_CheckExact(__pyx_v_tables)) {
                        __pyx_t_3 = __pyx_v_tables; __Pyx_INCREF(__pyx_t_3);
                        __pyx_t_8 = 0;
                        __pyx_t_9 = NULL;
                      } else {
                        __pyx_t_8 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_tables); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 6312, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_3);
                        __pyx_t_9 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(17, 6312, __pyx_L1_error)
                      }
                      for (;;) {
                        if (likely(!__pyx_t_9)) {
                          if (likely(PyList_CheckExact(__pyx_t_3))) {
                            {
                              Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3);
                              #if !CYTHON_ASSUME_SAFE_SIZE
                              if (unlikely((__pyx_temp < 0))) __PYX_ERR(17, 6312, __pyx_L1_error)
                              #endif
                              if (__pyx_t_8 >= __pyx_temp) break;
                            }
                            __pyx_t_6 = __Pyx_PyList_GetItemRefFast(__pyx_t_3, __pyx_t_8, __Pyx_ReferenceSharing_OwnStrongReference);
                            ++__pyx_t_8;
                          } else {
                            {
                              Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3);
                              #if !CYTHON_ASSUME_SAFE_SIZE
                              if (unlikely((__pyx_temp < 0))) __PYX_ERR(17, 6312, __pyx_L1_error)
                              #endif
                              if (__pyx_t_8 >= __pyx_temp) break;
                            }
                            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                            __pyx_t_6 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_8));
                            #else
                            __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_8);
                            #endif
                            ++__pyx_t_8;
                          }
                          if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 6312, __pyx_L1_error)
                        } else {
                          __pyx_t_6 = __pyx_t_9(__pyx_t_3);
                          if (unlikely(!__pyx_t_6)) {
                            PyObject* exc_type = PyErr_Occurred();
                            if (exc_type) {
                              if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(17, 6312, __pyx_L1_error)
                              PyErr_Clear();
                            }
                            break;
                          }
                        }
                        __Pyx_GOTREF(__pyx_t_6);
                        if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Table))))) __PYX_ERR(17, 6312, __pyx_L1_error)
                        __Pyx_XDECREF_SET(__pyx_v_table, ((struct __pyx_obj_7pyarrow_3lib_Table *)__pyx_t_6));
                        __pyx_t_6 = 0;

                        /* "pyarrow/table.pxi":6313
 * 
 *     for table in tables:
 *         c_tables.push_back(table.sp_table)             # <<<<<<<<<<<<<<
 * 
 *     options.field_merge_options = _parse_field_merge_options(
*/
                        if (unlikely(((PyObject *)__pyx_v_table) == Py_None)) {
                          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_table");
                          __PYX_ERR(17, 6313, __pyx_L1_error)
                        }
                        try {
                          __pyx_v_c_tables.push_back(__pyx_v_table->sp_table);
                        } catch(...) {
                          __Pyx_CppExn2PyErr();
                          __PYX_ERR(17, 6313, __pyx_L1_error)
                        }

                        /* "pyarrow/table.pxi":6312
 *             promote_options = "default"
 * 
 *     for table in tables:             # <<<<<<<<<<<<<<
 *         c_tables.push_back(table.sp_table)
 * 
*/
                      }
                      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

                      /* "pyarrow/table.pxi":6316
 * 
 *     options.field_merge_options = _parse_field_merge_options(
 *         "default" if promote_options == "none" else promote_options             # <<<<<<<<<<<<<<
 *     )
 * 
*/
                      __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_v_promote_options, __pyx_mstate_global->__pyx_n_u_none, Py_EQ)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(17, 6316, __pyx_L1_error)
                      if (__pyx_t_2) {
                        __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_default);
                        __pyx_t_3 = __pyx_mstate_global->__pyx_n_u_default;
                      } else {
                        __Pyx_INCREF(__pyx_v_promote_options);
                        __pyx_t_3 = __pyx_v_promote_options;
                      }

                      /* "pyarrow/table.pxi":6315
 *         c_tables.push_back(table.sp_table)
 * 
 *     options.field_merge_options = _parse_field_merge_options(             # <<<<<<<<<<<<<<
 *         "default" if promote_options == "none" else promote_options
 *     )
*/
                      __pyx_t_10 = __pyx_f_7pyarrow_3lib__parse_field_merge_options(((PyObject*)__pyx_t_3)); if (unlikely(PyErr_Occurred())) __PYX_ERR(17, 6315, __pyx_L1_error)
                      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                      __pyx_v_options.field_merge_options = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_10);

                      /* "pyarrow/table.pxi":6319
 *     )
 * 
 *     options.unify_schemas = promote_options != "none"             # <<<<<<<<<<<<<<
 *     with nogil:
 *         c_result_table = GetResultValue(
*/
                      __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_v_promote_options, __pyx_mstate_global->__pyx_n_u_none, Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(17, 6319, __pyx_L1_error)
                      __pyx_v_options.unify_schemas = __pyx_t_2;

                      /* "pyarrow/table.pxi":6320
 * 
 *     options.unify_schemas = promote_options != "none"
 *     with nogil:             # <<<<<<<<<<<<<<
 *         c_result_table = GetResultValue(
 *             ConcatenateTables(c_tables, options, pool))
*/
                      {
                          PyThreadState * _save;
                          _save = PyEval_SaveThread();
                          __Pyx_FastGIL_Remember();
                          /*try:*/ {

                            /* "pyarrow/table.pxi":6321
 *     options.unify_schemas = promote_options != "none"
 *     with nogil:
 *         c_result_table = GetResultValue(             # <<<<<<<<<<<<<<
 *             ConcatenateTables(c_tables, options, pool))
 * 
*/
                            __pyx_t_11 = arrow::py::GetResultValue<std::shared_ptr< arrow::Table> >(arrow::ConcatenateTables(__pyx_v_c_tables, __pyx_v_options, __pyx_v_pool)); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(17, 6321, __pyx_L9_error)
                            __pyx_v_c_result_table = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_11);
                          }

                          /* "pyarrow/table.pxi":6320
 * 
 *     options.unify_schemas = promote_options != "none"
 *     with nogil:             # <<<<<<<<<<<<<<
 *         c_result_table = GetResultValue(
 *             ConcatenateTables(c_tables, options, pool))
*/
                          /*finally:*/ {
                            /*normal exit:*/{
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L10;
                            }
                            __pyx_L9_error: {
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L1_error;
                            }
                            __pyx_L10:;
                          }
                      }

                      /* "pyarrow/table.pxi":6324
 *             ConcatenateTables(c_tables, options, pool))
 * 
 *     return pyarrow_wrap_table(c_result_table)             # <<<<<<<<<<<<<<
 * 
 * 
*/
                      __Pyx_XDECREF(__pyx_r);
                      __pyx_t_3 = pyarrow_wrap_table(__pyx_v_c_result_table); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 6324, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_3);
                      __pyx_r = __pyx_t_3;
                      __pyx_t_3 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/table.pxi":6247
 * 
 * 
 * def concat_tables(tables, MemoryPool memory_pool=None, str promote_options="none", **kwargs):             # <<<<<<<<<<<<<<
 *     """
 *     Concatenate pyarrow.Table objects.
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_XDECREF(__pyx_t_4);
                      __Pyx_XDECREF(__pyx_t_5);
                      __Pyx_XDECREF(__pyx_t_6);
                      __Pyx_AddTraceback("pyarrow.lib.concat_tables", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XDECREF((PyObject *)__pyx_v_table);
                      __Pyx_XDECREF(__pyx_v_promote_options);
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/table.pxi":6327
 * 
 * 
 * def concat_batches(recordbatches, MemoryPool memory_pool=None):             # <<<<<<<<<<<<<<
 *     """
 *     Concatenate pyarrow.RecordBatch objects.
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_229concat_batches(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_228concat_batches, "concat_batches(recordbatches, MemoryPool memory_pool=None)\n\nConcatenate pyarrow.RecordBatch objects.\n\nAll recordbatches must share the same Schema,\nthe operation implies a copy of the data to merge\nthe arrays of the different RecordBatches.\n\nParameters\n----------\nrecordbatches : iterable of pyarrow.RecordBatch objects\n    Pyarrow record batches to concatenate into a single RecordBatch.\nmemory_pool : MemoryPool, default None\n    For memory allocations, if required, otherwise use default pool.\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> t1 = pa.record_batch([\n...     pa.array([2, 4, 5, 100]),\n...     pa.array([\"Flamingo\", \"Horse\", \"Brittle stars\", \"Centipede\"])\n...     ], names=['n_legs', 'animals'])\n>>> t2 = pa.record_batch([\n...     pa.array([2, 4]),\n...     pa.array([\"Parrot\", \"Dog\"])\n...     ], names=['n_legs', 'animals'])\n>>> pa.concat_batches([t1,t2])\npyarrow.RecordBatch\nn_legs: int64\nanimals: string\n----\nn_legs: [2,4,5,100,2,4]\nanimals: [\"Flamingo\",\"Horse\",\"Brittle stars\",\"Centipede\",\"Parrot\",\"Dog\"]");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_229concat_batches = {"concat_batches", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_229concat_batches, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_228concat_batches};
                    static PyObject *__pyx_pw_7pyarrow_3lib_229concat_batches(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      PyObject *__pyx_v_recordbatches = 0;
                      struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_memory_pool = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[2] = {0,0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("concat_batches (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_recordbatches,&__pyx_mstate_global->__pyx_n_u_memory_pool,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(17, 6327, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  2:
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(17, 6327, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 6327, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "concat_batches", 0) < (0)) __PYX_ERR(17, 6327, __pyx_L3_error)
                          if (!values[1]) values[1] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)Py_None));
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("concat_batches", 0, 1, 2, i); __PYX_ERR(17, 6327, __pyx_L3_error) }
                          }
                        } else {
                          switch (__pyx_nargs) {
                            case  2:
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(17, 6327, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 6327, __pyx_L3_error)
                            break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          if (!values[1]) values[1] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)Py_None));
                        }
                        __pyx_v_recordbatches = values[0];
                        __pyx_v_memory_pool = ((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)values[1]);
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("concat_batches", 0, 1, 2, __pyx_nargs); __PYX_ERR(17, 6327, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.concat_batches", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_memory_pool), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_MemoryPool, 1, "memory_pool", 0))) __PYX_ERR(17, 6327, __pyx_L1_error)
                      __pyx_r = __pyx_pf_7pyarrow_3lib_228concat_batches(__pyx_self, __pyx_v_recordbatches, __pyx_v_memory_pool);

                      /* function exit code */
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __pyx_r = NULL;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      goto __pyx_L7_cleaned_up;
                      __pyx_L0:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __pyx_L7_cleaned_up:;
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_228concat_batches(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_recordbatches, struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_memory_pool) {
                      std::vector<std::shared_ptr< arrow::RecordBatch> >  __pyx_v_c_recordbatches;
                      std::shared_ptr< arrow::RecordBatch>  __pyx_v_c_result_recordbatch;
                      struct __pyx_obj_7pyarrow_3lib_RecordBatch *__pyx_v_recordbatch = 0;
                       arrow::MemoryPool *__pyx_v_pool;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                       arrow::MemoryPool *__pyx_t_1;
                      PyObject *__pyx_t_2 = NULL;
                      Py_ssize_t __pyx_t_3;
                      PyObject *(*__pyx_t_4)(PyObject *);
                      PyObject *__pyx_t_5 = NULL;
                      std::shared_ptr< arrow::RecordBatch>  __pyx_t_6;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("concat_batches", 0);

                      /* "pyarrow/table.pxi":6366
 *         shared_ptr[CRecordBatch] c_result_recordbatch
 *         RecordBatch recordbatch
 *         CMemoryPool* pool = maybe_unbox_memory_pool(memory_pool)             # <<<<<<<<<<<<<<
 * 
 *     for recordbatch in recordbatches:
*/
                      __pyx_t_1 = __pyx_f_7pyarrow_3lib_maybe_unbox_memory_pool(__pyx_v_memory_pool); if (unlikely(__pyx_t_1 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(17, 6366, __pyx_L1_error)
                      __pyx_v_pool = __pyx_t_1;

                      /* "pyarrow/table.pxi":6368
 *         CMemoryPool* pool = maybe_unbox_memory_pool(memory_pool)
 * 
 *     for recordbatch in recordbatches:             # <<<<<<<<<<<<<<
 *         c_recordbatches.push_back(recordbatch.sp_batch)
 * 
*/
                      if (likely(PyList_CheckExact(__pyx_v_recordbatches)) || PyTuple_CheckExact(__pyx_v_recordbatches)) {
                        __pyx_t_2 = __pyx_v_recordbatches; __Pyx_INCREF(__pyx_t_2);
                        __pyx_t_3 = 0;
                        __pyx_t_4 = NULL;
                      } else {
                        __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_recordbatches); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 6368, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_2);
                        __pyx_t_4 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 6368, __pyx_L1_error)
                      }
                      for (;;) {
                        if (likely(!__pyx_t_4)) {
                          if (likely(PyList_CheckExact(__pyx_t_2))) {
                            {
                              Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2);
                              #if !CYTHON_ASSUME_SAFE_SIZE
                              if (unlikely((__pyx_temp < 0))) __PYX_ERR(17, 6368, __pyx_L1_error)
                              #endif
                              if (__pyx_t_3 >= __pyx_temp) break;
                            }
                            __pyx_t_5 = __Pyx_PyList_GetItemRefFast(__pyx_t_2, __pyx_t_3, __Pyx_ReferenceSharing_OwnStrongReference);
                            ++__pyx_t_3;
                          } else {
                            {
                              Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2);
                              #if !CYTHON_ASSUME_SAFE_SIZE
                              if (unlikely((__pyx_temp < 0))) __PYX_ERR(17, 6368, __pyx_L1_error)
                              #endif
                              if (__pyx_t_3 >= __pyx_temp) break;
                            }
                            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                            __pyx_t_5 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3));
                            #else
                            __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_3);
                            #endif
                            ++__pyx_t_3;
                          }
                          if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 6368, __pyx_L1_error)
                        } else {
                          __pyx_t_5 = __pyx_t_4(__pyx_t_2);
                          if (unlikely(!__pyx_t_5)) {
                            PyObject* exc_type = PyErr_Occurred();
                            if (exc_type) {
                              if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(17, 6368, __pyx_L1_error)
                              PyErr_Clear();
                            }
                            break;
                          }
                        }
                        __Pyx_GOTREF(__pyx_t_5);
                        if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RecordBatch))))) __PYX_ERR(17, 6368, __pyx_L1_error)
                        __Pyx_XDECREF_SET(__pyx_v_recordbatch, ((struct __pyx_obj_7pyarrow_3lib_RecordBatch *)__pyx_t_5));
                        __pyx_t_5 = 0;

                        /* "pyarrow/table.pxi":6369
 * 
 *     for recordbatch in recordbatches:
 *         c_recordbatches.push_back(recordbatch.sp_batch)             # <<<<<<<<<<<<<<
 * 
 *     with nogil:
*/
                        if (unlikely(((PyObject *)__pyx_v_recordbatch) == Py_None)) {
                          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_batch");
                          __PYX_ERR(17, 6369, __pyx_L1_error)
                        }
                        try {
                          __pyx_v_c_recordbatches.push_back(__pyx_v_recordbatch->sp_batch);
                        } catch(...) {
                          __Pyx_CppExn2PyErr();
                          __PYX_ERR(17, 6369, __pyx_L1_error)
                        }

                        /* "pyarrow/table.pxi":6368
 *         CMemoryPool* pool = maybe_unbox_memory_pool(memory_pool)
 * 
 *     for recordbatch in recordbatches:             # <<<<<<<<<<<<<<
 *         c_recordbatches.push_back(recordbatch.sp_batch)
 * 
*/
                      }
                      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

                      /* "pyarrow/table.pxi":6371
 *         c_recordbatches.push_back(recordbatch.sp_batch)
 * 
 *     with nogil:             # <<<<<<<<<<<<<<
 *         c_result_recordbatch = GetResultValue(
 *             ConcatenateRecordBatches(c_recordbatches, pool))
*/
                      {
                          PyThreadState * _save;
                          _save = PyEval_SaveThread();
                          __Pyx_FastGIL_Remember();
                          /*try:*/ {

                            /* "pyarrow/table.pxi":6372
 * 
 *     with nogil:
 *         c_result_recordbatch = GetResultValue(             # <<<<<<<<<<<<<<
 *             ConcatenateRecordBatches(c_recordbatches, pool))
 * 
*/
                            __pyx_t_6 = arrow::py::GetResultValue<std::shared_ptr< arrow::RecordBatch> >(arrow::ConcatenateRecordBatches(__pyx_v_c_recordbatches, __pyx_v_pool)); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(17, 6372, __pyx_L7_error)
                            __pyx_v_c_result_recordbatch = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_6);
                          }

                          /* "pyarrow/table.pxi":6371
 *         c_recordbatches.push_back(recordbatch.sp_batch)
 * 
 *     with nogil:             # <<<<<<<<<<<<<<
 *         c_result_recordbatch = GetResultValue(
 *             ConcatenateRecordBatches(c_recordbatches, pool))
*/
                          /*finally:*/ {
                            /*normal exit:*/{
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L8;
                            }
                            __pyx_L7_error: {
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L1_error;
                            }
                            __pyx_L8:;
                          }
                      }

                      /* "pyarrow/table.pxi":6375
 *             ConcatenateRecordBatches(c_recordbatches, pool))
 * 
 *     return pyarrow_wrap_batch(c_result_recordbatch)             # <<<<<<<<<<<<<<
 * 
 * 
*/
                      __Pyx_XDECREF(__pyx_r);
                      __pyx_t_2 = pyarrow_wrap_batch(__pyx_v_c_result_recordbatch); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 6375, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_2);
                      __pyx_r = __pyx_t_2;
                      __pyx_t_2 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/table.pxi":6327
 * 
 * 
 * def concat_batches(recordbatches, MemoryPool memory_pool=None):             # <<<<<<<<<<<<<<
 *     """
 *     Concatenate pyarrow.RecordBatch objects.
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_XDECREF(__pyx_t_5);
                      __Pyx_AddTraceback("pyarrow.lib.concat_batches", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XDECREF((PyObject *)__pyx_v_recordbatch);
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/table.pxi":6378
 * 
 * 
 * def _from_pydict(cls, mapping, schema, metadata):             # <<<<<<<<<<<<<<
 *     """
 *     Construct a Table/RecordBatch from Arrow arrays or columns.
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_231_from_pydict(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_230_from_pydict, "_from_pydict(cls, mapping, schema, metadata)\n\nConstruct a Table/RecordBatch from Arrow arrays or columns.\n\nParameters\n----------\ncls : Class Table/RecordBatch\nmapping : dict or Mapping\n    A mapping of strings to Arrays or Python lists.\nschema : Schema, default None\n    If not passed, will be inferred from the Mapping values.\nmetadata : dict or Mapping, default None\n    Optional metadata for the schema (if inferred).\n\nReturns\n-------\nTable/RecordBatch");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_231_from_pydict = {"_from_pydict", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_231_from_pydict, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_230_from_pydict};
                    static PyObject *__pyx_pw_7pyarrow_3lib_231_from_pydict(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      PyObject *__pyx_v_cls = 0;
                      PyObject *__pyx_v_mapping = 0;
                      PyObject *__pyx_v_schema = 0;
                      PyObject *__pyx_v_metadata = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[4] = {0,0,0,0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("_from_pydict (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cls,&__pyx_mstate_global->__pyx_n_u_mapping,&__pyx_mstate_global->__pyx_n_u_schema,&__pyx_mstate_global->__pyx_n_u_metadata,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(17, 6378, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  4:
                            values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(17, 6378, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  3:
                            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(17, 6378, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  2:
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(17, 6378, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 6378, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_from_pydict", 0) < (0)) __PYX_ERR(17, 6378, __pyx_L3_error)
                          for (Py_ssize_t i = __pyx_nargs; i < 4; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_from_pydict", 1, 4, 4, i); __PYX_ERR(17, 6378, __pyx_L3_error) }
                          }
                        } else if (unlikely(__pyx_nargs != 4)) {
                          goto __pyx_L5_argtuple_error;
                        } else {
                          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 6378, __pyx_L3_error)
                          values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(17, 6378, __pyx_L3_error)
                          values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(17, 6378, __pyx_L3_error)
                          values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(17, 6378, __pyx_L3_error)
                        }
                        __pyx_v_cls = values[0];
                        __pyx_v_mapping = values[1];
                        __pyx_v_schema = values[2];
                        __pyx_v_metadata = values[3];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("_from_pydict", 1, 4, 4, __pyx_nargs); __PYX_ERR(17, 6378, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib._from_pydict", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_230_from_pydict(__pyx_self, __pyx_v_cls, __pyx_v_mapping, __pyx_v_schema, __pyx_v_metadata);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_230_from_pydict(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_mapping, PyObject *__pyx_v_schema, PyObject *__pyx_v_metadata) {
                      PyObject *__pyx_v_arrays = NULL;
                      PyObject *__pyx_v_names = NULL;
                      PyObject *__pyx_v_k = NULL;
                      PyObject *__pyx_v_v = NULL;
                      PyObject *__pyx_v_field = NULL;
                      PyObject *__pyx_v_present = NULL;
                      PyObject *__pyx_v_missing = NULL;
                      PyObject *__pyx_9genexpr33__pyx_v_n = NULL;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      int __pyx_t_2;
                      Py_ssize_t __pyx_t_3;
                      Py_ssize_t __pyx_t_4;
                      int __pyx_t_5;
                      PyObject *__pyx_t_6 = NULL;
                      PyObject *__pyx_t_7 = NULL;
                      int __pyx_t_8;
                      int __pyx_t_9;
                      PyObject *__pyx_t_10 = NULL;
                      size_t __pyx_t_11;
                      PyObject *(*__pyx_t_12)(PyObject *);
                      PyObject *__pyx_t_13 = NULL;
                      PyObject *__pyx_t_14 = NULL;
                      PyObject *__pyx_t_15 = NULL;
                      PyObject *__pyx_t_16 = NULL;
                      PyObject *__pyx_t_17 = NULL;
                      PyObject *__pyx_t_18 = NULL;
                      PyObject *__pyx_t_19 = NULL;
                      PyObject *__pyx_t_20 = NULL;
                      PyObject *__pyx_t_21 = NULL;
                      PyObject *__pyx_t_22 = NULL;
                      PyObject *__pyx_t_23 = NULL;
                      PyObject *__pyx_t_24 = NULL;
                      PyObject *(*__pyx_t_25)(PyObject *);
                      PyObject *__pyx_t_26 = NULL;
                      PyObject *__pyx_t_27 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("_from_pydict", 0);

                      /* "pyarrow/table.pxi":6397
 *     """
 * 
 *     arrays = []             # <<<<<<<<<<<<<<
 *     if schema is None:
 *         names = []
*/
                      __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 6397, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_v_arrays = ((PyObject*)__pyx_t_1);
                      __pyx_t_1 = 0;

                      /* "pyarrow/table.pxi":6398
 * 
 *     arrays = []
 *     if schema is None:             # <<<<<<<<<<<<<<
 *         names = []
 *         for k, v in mapping.items():
*/
                      __pyx_t_2 = (__pyx_v_schema == Py_None);
                      if (__pyx_t_2) {

                        /* "pyarrow/table.pxi":6399
 *     arrays = []
 *     if schema is None:
 *         names = []             # <<<<<<<<<<<<<<
 *         for k, v in mapping.items():
 *             names.append(k)
*/
                        __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 6399, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                        __pyx_v_names = ((PyObject*)__pyx_t_1);
                        __pyx_t_1 = 0;

                        /* "pyarrow/table.pxi":6400
 *     if schema is None:
 *         names = []
 *         for k, v in mapping.items():             # <<<<<<<<<<<<<<
 *             names.append(k)
 *             arrays.append(asarray(v))
*/
                        __pyx_t_3 = 0;
                        if (unlikely(__pyx_v_mapping == Py_None)) {
                          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items");
                          __PYX_ERR(17, 6400, __pyx_L1_error)
                        }
                        __pyx_t_6 = __Pyx_dict_iterator(__pyx_v_mapping, 0, __pyx_mstate_global->__pyx_n_u_items, (&__pyx_t_4), (&__pyx_t_5)); if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 6400, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_6);
                        __Pyx_XDECREF(__pyx_t_1);
                        __pyx_t_1 = __pyx_t_6;
                        __pyx_t_6 = 0;
                        while (1) {
                          __pyx_t_8 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_4, &__pyx_t_3, &__pyx_t_6, &__pyx_t_7, NULL, __pyx_t_5);
                          if (unlikely(__pyx_t_8 == 0)) break;
                          if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(17, 6400, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_6);
                          __Pyx_GOTREF(__pyx_t_7);
                          __Pyx_XDECREF_SET(__pyx_v_k, __pyx_t_6);
                          __pyx_t_6 = 0;
                          __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_7);
                          __pyx_t_7 = 0;

                          /* "pyarrow/table.pxi":6401
 *         names = []
 *         for k, v in mapping.items():
 *             names.append(k)             # <<<<<<<<<<<<<<
 *             arrays.append(asarray(v))
 *         return cls.from_arrays(arrays, names, metadata=metadata)
*/
                          __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_names, __pyx_v_k); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(17, 6401, __pyx_L1_error)

                          /* "pyarrow/table.pxi":6402
 *         for k, v in mapping.items():
 *             names.append(k)
 *             arrays.append(asarray(v))             # <<<<<<<<<<<<<<
 *         return cls.from_arrays(arrays, names, metadata=metadata)
 *     elif isinstance(schema, Schema):
*/
                          __pyx_t_6 = NULL;
                          __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_asarray); if (unlikely(!__pyx_t_10)) __PYX_ERR(17, 6402, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_10);
                          __pyx_t_11 = 1;
                          #if CYTHON_UNPACK_METHODS
                          if (unlikely(PyMethod_Check(__pyx_t_10))) {
                            __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_10);
                            assert(__pyx_t_6);
                            PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_10);
                            __Pyx_INCREF(__pyx_t_6);
                            __Pyx_INCREF(__pyx__function);
                            __Pyx_DECREF_SET(__pyx_t_10, __pyx__function);
                            __pyx_t_11 = 0;
                          }
                          #endif
                          {
                            PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_v};
                            __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_10, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (__pyx_t_11*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                            __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
                            __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                            if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 6402, __pyx_L1_error)
                            __Pyx_GOTREF(__pyx_t_7);
                          }
                          __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_arrays, __pyx_t_7); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(17, 6402, __pyx_L1_error)
                          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
                        }
                        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

                        /* "pyarrow/table.pxi":6403
 *             names.append(k)
 *             arrays.append(asarray(v))
 *         return cls.from_arrays(arrays, names, metadata=metadata)             # <<<<<<<<<<<<<<
 *     elif isinstance(schema, Schema):
 *         for field in schema:
*/
                        __Pyx_XDECREF(__pyx_r);
                        __pyx_t_7 = __pyx_v_cls;
                        __Pyx_INCREF(__pyx_t_7);
                        __pyx_t_11 = 0;
                        {
                          PyObject *__pyx_callargs[3 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_7, __pyx_v_arrays, __pyx_v_names};
                          __pyx_t_10 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(17, 6403, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_10);
                          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_metadata, __pyx_v_metadata, __pyx_t_10, __pyx_callargs+3, 0) < (0)) __PYX_ERR(17, 6403, __pyx_L1_error)
                          __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_from_arrays, __pyx_callargs+__pyx_t_11, (3-__pyx_t_11) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_10);
                          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
                          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                          if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 6403, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_1);
                        }
                        __pyx_r = __pyx_t_1;
                        __pyx_t_1 = 0;
                        goto __pyx_L0;

                        /* "pyarrow/table.pxi":6398
 * 
 *     arrays = []
 *     if schema is None:             # <<<<<<<<<<<<<<
 *         names = []
 *         for k, v in mapping.items():
*/
                      }

                      /* "pyarrow/table.pxi":6404
 *             arrays.append(asarray(v))
 *         return cls.from_arrays(arrays, names, metadata=metadata)
 *     elif isinstance(schema, Schema):             # <<<<<<<<<<<<<<
 *         for field in schema:
 *             try:
*/
                      __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_schema, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Schema); 
                      if (likely(__pyx_t_2)) {

                        /* "pyarrow/table.pxi":6405
 *         return cls.from_arrays(arrays, names, metadata=metadata)
 *     elif isinstance(schema, Schema):
 *         for field in schema:             # <<<<<<<<<<<<<<
 *             try:
 *                 v = mapping[field.name]
*/
                        if (likely(PyList_CheckExact(__pyx_v_schema)) || PyTuple_CheckExact(__pyx_v_schema)) {
                          __pyx_t_1 = __pyx_v_schema; __Pyx_INCREF(__pyx_t_1);
                          __pyx_t_4 = 0;
                          __pyx_t_12 = NULL;
                        } else {
                          __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_schema); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 6405, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_1);
                          __pyx_t_12 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_12)) __PYX_ERR(17, 6405, __pyx_L1_error)
                        }
                        for (;;) {
                          if (likely(!__pyx_t_12)) {
                            if (likely(PyList_CheckExact(__pyx_t_1))) {
                              {
                                Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
                                #if !CYTHON_ASSUME_SAFE_SIZE
                                if (unlikely((__pyx_temp < 0))) __PYX_ERR(17, 6405, __pyx_L1_error)
                                #endif
                                if (__pyx_t_4 >= __pyx_temp) break;
                              }
                              __pyx_t_10 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_4, __Pyx_ReferenceSharing_OwnStrongReference);
                              ++__pyx_t_4;
                            } else {
                              {
                                Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
                                #if !CYTHON_ASSUME_SAFE_SIZE
                                if (unlikely((__pyx_temp < 0))) __PYX_ERR(17, 6405, __pyx_L1_error)
                                #endif
                                if (__pyx_t_4 >= __pyx_temp) break;
                              }
                              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                              __pyx_t_10 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4));
                              #else
                              __pyx_t_10 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_4);
                              #endif
                              ++__pyx_t_4;
                            }
                            if (unlikely(!__pyx_t_10)) __PYX_ERR(17, 6405, __pyx_L1_error)
                          } else {
                            __pyx_t_10 = __pyx_t_12(__pyx_t_1);
                            if (unlikely(!__pyx_t_10)) {
                              PyObject* exc_type = PyErr_Occurred();
                              if (exc_type) {
                                if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(17, 6405, __pyx_L1_error)
                                PyErr_Clear();
                              }
                              break;
                            }
                          }
                          __Pyx_GOTREF(__pyx_t_10);
                          __Pyx_XDECREF_SET(__pyx_v_field, __pyx_t_10);
                          __pyx_t_10 = 0;

                          /* "pyarrow/table.pxi":6406
 *     elif isinstance(schema, Schema):
 *         for field in schema:
 *             try:             # <<<<<<<<<<<<<<
 *                 v = mapping[field.name]
 *             except KeyError:
*/
                          {
                            __Pyx_PyThreadState_declare
                            __Pyx_PyThreadState_assign
                            __Pyx_ExceptionSave(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
                            __Pyx_XGOTREF(__pyx_t_13);
                            __Pyx_XGOTREF(__pyx_t_14);
                            __Pyx_XGOTREF(__pyx_t_15);
                            /*try:*/ {

                              /* "pyarrow/table.pxi":6407
 *         for field in schema:
 *             try:
 *                 v = mapping[field.name]             # <<<<<<<<<<<<<<
 *             except KeyError:
 *                 try:
*/
                              if (unlikely(__pyx_v_mapping == Py_None)) {
                                PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
                                __PYX_ERR(17, 6407, __pyx_L8_error)
                              }
                              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_field, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_10)) __PYX_ERR(17, 6407, __pyx_L8_error)
                              __Pyx_GOTREF(__pyx_t_10);
                              __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_mapping, __pyx_t_10); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 6407, __pyx_L8_error)
                              __Pyx_GOTREF(__pyx_t_7);
                              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                              __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_7);
                              __pyx_t_7 = 0;

                              /* "pyarrow/table.pxi":6406
 *     elif isinstance(schema, Schema):
 *         for field in schema:
 *             try:             # <<<<<<<<<<<<<<
 *                 v = mapping[field.name]
 *             except KeyError:
*/
                            }
                            __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
                            __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
                            __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
                            goto __pyx_L15_try_end;
                            __pyx_L8_error:;
                            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                            __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
                            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;

                            /* "pyarrow/table.pxi":6408
 *             try:
 *                 v = mapping[field.name]
 *             except KeyError:             # <<<<<<<<<<<<<<
 *                 try:
 *                     v = mapping[tobytes(field.name)]
*/
                            __pyx_t_5 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_KeyError))));
                            if (__pyx_t_5) {
                              __Pyx_AddTraceback("pyarrow.lib._from_pydict", __pyx_clineno, __pyx_lineno, __pyx_filename);
                              if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_10, &__pyx_t_6) < 0) __PYX_ERR(17, 6408, __pyx_L10_except_error)
                              __Pyx_XGOTREF(__pyx_t_7);
                              __Pyx_XGOTREF(__pyx_t_10);
                              __Pyx_XGOTREF(__pyx_t_6);

                              /* "pyarrow/table.pxi":6409
 *                 v = mapping[field.name]
 *             except KeyError:
 *                 try:             # <<<<<<<<<<<<<<
 *                     v = mapping[tobytes(field.name)]
 *                 except KeyError:
*/
                              {
                                __Pyx_PyThreadState_declare
                                __Pyx_PyThreadState_assign
                                __Pyx_ExceptionSave(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18);
                                __Pyx_XGOTREF(__pyx_t_16);
                                __Pyx_XGOTREF(__pyx_t_17);
                                __Pyx_XGOTREF(__pyx_t_18);
                                /*try:*/ {

                                  /* "pyarrow/table.pxi":6410
 *             except KeyError:
 *                 try:
 *                     v = mapping[tobytes(field.name)]             # <<<<<<<<<<<<<<
 *                 except KeyError:
 *                     present = mapping.keys()
*/
                                  if (unlikely(__pyx_v_mapping == Py_None)) {
                                    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
                                    __PYX_ERR(17, 6410, __pyx_L18_error)
                                  }
                                  __pyx_t_20 = NULL;
                                  __Pyx_GetModuleGlobalName(__pyx_t_21, __pyx_mstate_global->__pyx_n_u_tobytes); if (unlikely(!__pyx_t_21)) __PYX_ERR(17, 6410, __pyx_L18_error)
                                  __Pyx_GOTREF(__pyx_t_21);
                                  __pyx_t_22 = __Pyx_PyObject_GetAttrStr(__pyx_v_field, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_22)) __PYX_ERR(17, 6410, __pyx_L18_error)
                                  __Pyx_GOTREF(__pyx_t_22);
                                  __pyx_t_11 = 1;
                                  #if CYTHON_UNPACK_METHODS
                                  if (unlikely(PyMethod_Check(__pyx_t_21))) {
                                    __pyx_t_20 = PyMethod_GET_SELF(__pyx_t_21);
                                    assert(__pyx_t_20);
                                    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_21);
                                    __Pyx_INCREF(__pyx_t_20);
                                    __Pyx_INCREF(__pyx__function);
                                    __Pyx_DECREF_SET(__pyx_t_21, __pyx__function);
                                    __pyx_t_11 = 0;
                                  }
                                  #endif
                                  {
                                    PyObject *__pyx_callargs[2] = {__pyx_t_20, __pyx_t_22};
                                    __pyx_t_19 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_21, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (__pyx_t_11*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                                    __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0;
                                    __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
                                    __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
                                    if (unlikely(!__pyx_t_19)) __PYX_ERR(17, 6410, __pyx_L18_error)
                                    __Pyx_GOTREF(__pyx_t_19);
                                  }
                                  __pyx_t_21 = __Pyx_PyObject_GetItem(__pyx_v_mapping, __pyx_t_19); if (unlikely(!__pyx_t_21)) __PYX_ERR(17, 6410, __pyx_L18_error)
                                  __Pyx_GOTREF(__pyx_t_21);
                                  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
                                  __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_21);
                                  __pyx_t_21 = 0;

                                  /* "pyarrow/table.pxi":6409
 *                 v = mapping[field.name]
 *             except KeyError:
 *                 try:             # <<<<<<<<<<<<<<
 *                     v = mapping[tobytes(field.name)]
 *                 except KeyError:
*/
                                }
                                __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
                                __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
                                __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
                                goto __pyx_L25_try_end;
                                __pyx_L18_error:;
                                __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
                                __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0;
                                __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0;
                                __Pyx_XDECREF(__pyx_t_22); __pyx_t_22 = 0;

                                /* "pyarrow/table.pxi":6411
 *                 try:
 *                     v = mapping[tobytes(field.name)]
 *                 except KeyError:             # <<<<<<<<<<<<<<
 *                     present = mapping.keys()
 *                     missing = [n for n in schema.names if n not in present]
*/
                                __pyx_t_5 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_KeyError))));
                                if (__pyx_t_5) {
                                  __Pyx_AddTraceback("pyarrow.lib._from_pydict", __pyx_clineno, __pyx_lineno, __pyx_filename);
                                  if (__Pyx_GetException(&__pyx_t_21, &__pyx_t_19, &__pyx_t_22) < 0) __PYX_ERR(17, 6411, __pyx_L20_except_error)
                                  __Pyx_XGOTREF(__pyx_t_21);
                                  __Pyx_XGOTREF(__pyx_t_19);
                                  __Pyx_XGOTREF(__pyx_t_22);

                                  /* "pyarrow/table.pxi":6412
 *                     v = mapping[tobytes(field.name)]
 *                 except KeyError:
 *                     present = mapping.keys()             # <<<<<<<<<<<<<<
 *                     missing = [n for n in schema.names if n not in present]
 *                     raise KeyError(
*/
                                  __pyx_t_23 = __pyx_v_mapping;
                                  __Pyx_INCREF(__pyx_t_23);
                                  __pyx_t_11 = 0;
                                  {
                                    PyObject *__pyx_callargs[2] = {__pyx_t_23, NULL};
                                    __pyx_t_20 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_keys, __pyx_callargs+__pyx_t_11, (1-__pyx_t_11) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                                    __Pyx_XDECREF(__pyx_t_23); __pyx_t_23 = 0;
                                    if (unlikely(!__pyx_t_20)) __PYX_ERR(17, 6412, __pyx_L20_except_error)
                                    __Pyx_GOTREF(__pyx_t_20);
                                  }
                                  __pyx_v_present = __pyx_t_20;
                                  __pyx_t_20 = 0;

                                  /* "pyarrow/table.pxi":6413
 *                 except KeyError:
 *                     present = mapping.keys()
 *                     missing = [n for n in schema.names if n not in present]             # <<<<<<<<<<<<<<
 *                     raise KeyError(
 *                         "The passed mapping doesn't contain the "
*/
                                  { /* enter inner scope */
                                    __pyx_t_20 = PyList_New(0); if (unlikely(!__pyx_t_20)) __PYX_ERR(17, 6413, __pyx_L30_error)
                                    __Pyx_GOTREF(__pyx_t_20);
                                    __pyx_t_23 = __Pyx_PyObject_GetAttrStr(__pyx_v_schema, __pyx_mstate_global->__pyx_n_u_names); if (unlikely(!__pyx_t_23)) __PYX_ERR(17, 6413, __pyx_L30_error)
                                    __Pyx_GOTREF(__pyx_t_23);
                                    if (likely(PyList_CheckExact(__pyx_t_23)) || PyTuple_CheckExact(__pyx_t_23)) {
                                      __pyx_t_24 = __pyx_t_23; __Pyx_INCREF(__pyx_t_24);
                                      __pyx_t_3 = 0;
                                      __pyx_t_25 = NULL;
                                    } else {
                                      __pyx_t_3 = -1; __pyx_t_24 = PyObject_GetIter(__pyx_t_23); if (unlikely(!__pyx_t_24)) __PYX_ERR(17, 6413, __pyx_L30_error)
                                      __Pyx_GOTREF(__pyx_t_24);
                                      __pyx_t_25 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_24); if (unlikely(!__pyx_t_25)) __PYX_ERR(17, 6413, __pyx_L30_error)
                                    }
                                    __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
                                    for (;;) {
                                      if (likely(!__pyx_t_25)) {
                                        if (likely(PyList_CheckExact(__pyx_t_24))) {
                                          {
                                            Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_24);
                                            #if !CYTHON_ASSUME_SAFE_SIZE
                                            if (unlikely((__pyx_temp < 0))) __PYX_ERR(17, 6413, __pyx_L30_error)
                                            #endif
                                            if (__pyx_t_3 >= __pyx_temp) break;
                                          }
                                          __pyx_t_23 = __Pyx_PyList_GetItemRefFast(__pyx_t_24, __pyx_t_3, __Pyx_ReferenceSharing_OwnStrongReference);
                                          ++__pyx_t_3;
                                        } else {
                                          {
                                            Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_24);
                                            #if !CYTHON_ASSUME_SAFE_SIZE
                                            if (unlikely((__pyx_temp < 0))) __PYX_ERR(17, 6413, __pyx_L30_error)
                                            #endif
                                            if (__pyx_t_3 >= __pyx_temp) break;
                                          }
                                          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                                          __pyx_t_23 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_24, __pyx_t_3));
                                          #else
                                          __pyx_t_23 = __Pyx_PySequence_ITEM(__pyx_t_24, __pyx_t_3);
                                          #endif
                                          ++__pyx_t_3;
                                        }
                                        if (unlikely(!__pyx_t_23)) __PYX_ERR(17, 6413, __pyx_L30_error)
                                      } else {
                                        __pyx_t_23 = __pyx_t_25(__pyx_t_24);
                                        if (unlikely(!__pyx_t_23)) {
                                          PyObject* exc_type = PyErr_Occurred();
                                          if (exc_type) {
                                            if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(17, 6413, __pyx_L30_error)
                                            PyErr_Clear();
                                          }
                                          break;
                                        }
                                      }
                                      __Pyx_GOTREF(__pyx_t_23);
                                      __Pyx_XDECREF_SET(__pyx_9genexpr33__pyx_v_n, __pyx_t_23);
                                      __pyx_t_23 = 0;
                                      __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_9genexpr33__pyx_v_n, __pyx_v_present, Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(17, 6413, __pyx_L30_error)
                                      if (__pyx_t_2) {
                                        if (unlikely(__Pyx_ListComp_Append(__pyx_t_20, (PyObject*)__pyx_9genexpr33__pyx_v_n))) __PYX_ERR(17, 6413, __pyx_L30_error)
                                      }
                                    }
                                    __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
                                    __Pyx_XDECREF(__pyx_9genexpr33__pyx_v_n); __pyx_9genexpr33__pyx_v_n = 0;
                                    goto __pyx_L35_exit_scope;
                                    __pyx_L30_error:;
                                    __Pyx_XDECREF(__pyx_9genexpr33__pyx_v_n); __pyx_9genexpr33__pyx_v_n = 0;
                                    goto __pyx_L20_except_error;
                                    __pyx_L35_exit_scope:;
                                  } /* exit inner scope */
                                  __pyx_v_missing = ((PyObject*)__pyx_t_20);
                                  __pyx_t_20 = 0;

                                  /* "pyarrow/table.pxi":6414
 *                     present = mapping.keys()
 *                     missing = [n for n in schema.names if n not in present]
 *                     raise KeyError(             # <<<<<<<<<<<<<<
 *                         "The passed mapping doesn't contain the "
 *                         "following field(s) of the schema: {}".
*/
                                  __pyx_t_24 = NULL;

                                  /* "pyarrow/table.pxi":6417
 *                         "The passed mapping doesn't contain the "
 *                         "following field(s) of the schema: {}".
 *                         format(', '.join(missing))             # <<<<<<<<<<<<<<
 *                     )
 *             arrays.append(asarray(v, type=field.type))
*/
                                  __pyx_t_26 = __pyx_mstate_global->__pyx_kp_u_The_passed_mapping_doesn_t_conta;
                                  __Pyx_INCREF(__pyx_t_26);
                                  __pyx_t_27 = PyUnicode_Join(__pyx_mstate_global->__pyx_kp_u__18, __pyx_v_missing); if (unlikely(!__pyx_t_27)) __PYX_ERR(17, 6417, __pyx_L20_except_error)
                                  __Pyx_GOTREF(__pyx_t_27);
                                  __pyx_t_11 = 0;
                                  {
                                    PyObject *__pyx_callargs[2] = {__pyx_t_26, __pyx_t_27};
                                    __pyx_t_23 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                                    __Pyx_XDECREF(__pyx_t_26); __pyx_t_26 = 0;
                                    __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
                                    if (unlikely(!__pyx_t_23)) __PYX_ERR(17, 6417, __pyx_L20_except_error)
                                    __Pyx_GOTREF(__pyx_t_23);
                                  }
                                  __pyx_t_11 = 1;
                                  {
                                    PyObject *__pyx_callargs[2] = {__pyx_t_24, __pyx_t_23};
                                    __pyx_t_20 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_KeyError)), __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (__pyx_t_11*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                                    __Pyx_XDECREF(__pyx_t_24); __pyx_t_24 = 0;
                                    __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
                                    if (unlikely(!__pyx_t_20)) __PYX_ERR(17, 6414, __pyx_L20_except_error)
                                    __Pyx_GOTREF(__pyx_t_20);
                                  }
                                  __Pyx_Raise(__pyx_t_20, 0, 0, 0);
                                  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
                                  __PYX_ERR(17, 6414, __pyx_L20_except_error)
                                }
                                goto __pyx_L20_except_error;

                                /* "pyarrow/table.pxi":6409
 *                 v = mapping[field.name]
 *             except KeyError:
 *                 try:             # <<<<<<<<<<<<<<
 *                     v = mapping[tobytes(field.name)]
 *                 except KeyError:
*/
                                __pyx_L20_except_error:;
                                __Pyx_XGIVEREF(__pyx_t_16);
                                __Pyx_XGIVEREF(__pyx_t_17);
                                __Pyx_XGIVEREF(__pyx_t_18);
                                __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18);
                                goto __pyx_L10_except_error;
                                __pyx_L25_try_end:;
                              }
                              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
                              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                              __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
                              goto __pyx_L9_exception_handled;
                            }
                            goto __pyx_L10_except_error;

                            /* "pyarrow/table.pxi":6406
 *     elif isinstance(schema, Schema):
 *         for field in schema:
 *             try:             # <<<<<<<<<<<<<<
 *                 v = mapping[field.name]
 *             except KeyError:
*/
                            __pyx_L10_except_error:;
                            __Pyx_XGIVEREF(__pyx_t_13);
                            __Pyx_XGIVEREF(__pyx_t_14);
                            __Pyx_XGIVEREF(__pyx_t_15);
                            __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
                            goto __pyx_L1_error;
                            __pyx_L9_exception_handled:;
                            __Pyx_XGIVEREF(__pyx_t_13);
                            __Pyx_XGIVEREF(__pyx_t_14);
                            __Pyx_XGIVEREF(__pyx_t_15);
                            __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
                            __pyx_L15_try_end:;
                          }

                          /* "pyarrow/table.pxi":6419
 *                         format(', '.join(missing))
 *                     )
 *             arrays.append(asarray(v, type=field.type))             # <<<<<<<<<<<<<<
 *         # Will raise if metadata is not None
 *         return cls.from_arrays(arrays, schema=schema, metadata=metadata)
*/
                          __pyx_t_10 = NULL;
                          __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_asarray); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 6419, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_7);
                          __pyx_t_22 = __Pyx_PyObject_GetAttrStr(__pyx_v_field, __pyx_mstate_global->__pyx_n_u_type); if (unlikely(!__pyx_t_22)) __PYX_ERR(17, 6419, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_22);
                          __pyx_t_11 = 1;
                          #if CYTHON_UNPACK_METHODS
                          if (unlikely(PyMethod_Check(__pyx_t_7))) {
                            __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_7);
                            assert(__pyx_t_10);
                            PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
                            __Pyx_INCREF(__pyx_t_10);
                            __Pyx_INCREF(__pyx__function);
                            __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
                            __pyx_t_11 = 0;
                          }
                          #endif
                          {
                            PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_10, __pyx_v_v};
                            __pyx_t_19 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_19)) __PYX_ERR(17, 6419, __pyx_L1_error)
                            __Pyx_GOTREF(__pyx_t_19);
                            if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_type, __pyx_t_22, __pyx_t_19, __pyx_callargs+2, 0) < (0)) __PYX_ERR(17, 6419, __pyx_L1_error)
                            __pyx_t_6 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (__pyx_t_11*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_19);
                            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                            __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
                            __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
                            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
                            if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 6419, __pyx_L1_error)
                            __Pyx_GOTREF(__pyx_t_6);
                          }
                          __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_arrays, __pyx_t_6); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(17, 6419, __pyx_L1_error)
                          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

                          /* "pyarrow/table.pxi":6405
 *         return cls.from_arrays(arrays, names, metadata=metadata)
 *     elif isinstance(schema, Schema):
 *         for field in schema:             # <<<<<<<<<<<<<<
 *             try:
 *                 v = mapping[field.name]
*/
                        }
                        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

                        /* "pyarrow/table.pxi":6421
 *             arrays.append(asarray(v, type=field.type))
 *         # Will raise if metadata is not None
 *         return cls.from_arrays(arrays, schema=schema, metadata=metadata)             # <<<<<<<<<<<<<<
 *     else:
 *         raise TypeError('Schema must be an instance of pyarrow.Schema')
*/
                        __Pyx_XDECREF(__pyx_r);
                        __pyx_t_6 = __pyx_v_cls;
                        __Pyx_INCREF(__pyx_t_6);
                        __pyx_t_11 = 0;
                        {
                          PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_6, __pyx_v_arrays};
                          __pyx_t_7 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 6421, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_7);
                          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_schema, __pyx_v_schema, __pyx_t_7, __pyx_callargs+2, 0) < (0)) __PYX_ERR(17, 6421, __pyx_L1_error)
                          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_metadata, __pyx_v_metadata, __pyx_t_7, __pyx_callargs+2, 1) < (0)) __PYX_ERR(17, 6421, __pyx_L1_error)
                          __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_from_arrays, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_7);
                          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
                          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
                          if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 6421, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_1);
                        }
                        __pyx_r = __pyx_t_1;
                        __pyx_t_1 = 0;
                        goto __pyx_L0;

                        /* "pyarrow/table.pxi":6404
 *             arrays.append(asarray(v))
 *         return cls.from_arrays(arrays, names, metadata=metadata)
 *     elif isinstance(schema, Schema):             # <<<<<<<<<<<<<<
 *         for field in schema:
 *             try:
*/
                      }

                      /* "pyarrow/table.pxi":6423
 *         return cls.from_arrays(arrays, schema=schema, metadata=metadata)
 *     else:
 *         raise TypeError('Schema must be an instance of pyarrow.Schema')             # <<<<<<<<<<<<<<
 * 
 * 
*/
                      /*else*/ {
                        __pyx_t_7 = NULL;
                        __pyx_t_11 = 1;
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_Schema_must_be_an_instance_of_py};
                          __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (__pyx_t_11*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
                          if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 6423, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_1);
                        }
                        __Pyx_Raise(__pyx_t_1, 0, 0, 0);
                        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                        __PYX_ERR(17, 6423, __pyx_L1_error)
                      }

                      /* "pyarrow/table.pxi":6378
 * 
 * 
 * def _from_pydict(cls, mapping, schema, metadata):             # <<<<<<<<<<<<<<
 *     """
 *     Construct a Table/RecordBatch from Arrow arrays or columns.
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_6);
                      __Pyx_XDECREF(__pyx_t_7);
                      __Pyx_XDECREF(__pyx_t_10);
                      __Pyx_XDECREF(__pyx_t_19);
                      __Pyx_XDECREF(__pyx_t_20);
                      __Pyx_XDECREF(__pyx_t_21);
                      __Pyx_XDECREF(__pyx_t_22);
                      __Pyx_XDECREF(__pyx_t_23);
                      __Pyx_XDECREF(__pyx_t_24);
                      __Pyx_XDECREF(__pyx_t_26);
                      __Pyx_XDECREF(__pyx_t_27);
                      __Pyx_AddTraceback("pyarrow.lib._from_pydict", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XDECREF(__pyx_v_arrays);
                      __Pyx_XDECREF(__pyx_v_names);
                      __Pyx_XDECREF(__pyx_v_k);
                      __Pyx_XDECREF(__pyx_v_v);
                      __Pyx_XDECREF(__pyx_v_field);
                      __Pyx_XDECREF(__pyx_v_present);
                      __Pyx_XDECREF(__pyx_v_missing);
                      __Pyx_XDECREF(__pyx_9genexpr33__pyx_v_n);
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/table.pxi":6426
 * 
 * 
 * def _from_pylist(cls, mapping, schema, metadata):             # <<<<<<<<<<<<<<
 *     """
 *     Construct a Table/RecordBatch from list of rows / dictionaries.
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_233_from_pylist(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_232_from_pylist, "_from_pylist(cls, mapping, schema, metadata)\n\nConstruct a Table/RecordBatch from list of rows / dictionaries.\n\nParameters\n----------\ncls : Class Table/RecordBatch\nmapping : list of dicts of rows\n    A mapping of strings to row values.\nschema : Schema, default None\n    If not passed, will be inferred from the first row of the\n    mapping values.\nmetadata : dict or Mapping, default None\n    Optional metadata for the schema (if inferred).\n\nReturns\n-------\nTable/RecordBatch");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_233_from_pylist = {"_from_pylist", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_233_from_pylist, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_232_from_pylist};
                    static PyObject *__pyx_pw_7pyarrow_3lib_233_from_pylist(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      PyObject *__pyx_v_cls = 0;
                      PyObject *__pyx_v_mapping = 0;
                      PyObject *__pyx_v_schema = 0;
                      PyObject *__pyx_v_metadata = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[4] = {0,0,0,0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("_from_pylist (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cls,&__pyx_mstate_global->__pyx_n_u_mapping,&__pyx_mstate_global->__pyx_n_u_schema,&__pyx_mstate_global->__pyx_n_u_metadata,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(17, 6426, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  4:
                            values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(17, 6426, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  3:
                            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(17, 6426, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  2:
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(17, 6426, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 6426, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_from_pylist", 0) < (0)) __PYX_ERR(17, 6426, __pyx_L3_error)
                          for (Py_ssize_t i = __pyx_nargs; i < 4; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_from_pylist", 1, 4, 4, i); __PYX_ERR(17, 6426, __pyx_L3_error) }
                          }
                        } else if (unlikely(__pyx_nargs != 4)) {
                          goto __pyx_L5_argtuple_error;
                        } else {
                          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 6426, __pyx_L3_error)
                          values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(17, 6426, __pyx_L3_error)
                          values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(17, 6426, __pyx_L3_error)
                          values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(17, 6426, __pyx_L3_error)
                        }
                        __pyx_v_cls = values[0];
                        __pyx_v_mapping = values[1];
                        __pyx_v_schema = values[2];
                        __pyx_v_metadata = values[3];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("_from_pylist", 1, 4, 4, __pyx_nargs); __PYX_ERR(17, 6426, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib._from_pylist", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_232_from_pylist(__pyx_self, __pyx_v_cls, __pyx_v_mapping, __pyx_v_schema, __pyx_v_metadata);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_232_from_pylist(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_mapping, PyObject *__pyx_v_schema, PyObject *__pyx_v_metadata) {
                      PyObject *__pyx_v_arrays = NULL;
                      PyObject *__pyx_v_names = NULL;
                      PyObject *__pyx_v_n = NULL;
                      PyObject *__pyx_v_v = NULL;
                      PyObject *__pyx_9genexpr34__pyx_v_row = NULL;
                      PyObject *__pyx_9genexpr35__pyx_v_row = NULL;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      int __pyx_t_2;
                      PyObject *__pyx_t_3 = NULL;
                      PyObject *__pyx_t_4 = NULL;
                      size_t __pyx_t_5;
                      Py_ssize_t __pyx_t_6;
                      Py_ssize_t __pyx_t_7;
                      PyObject *(*__pyx_t_8)(PyObject *);
                      PyObject *__pyx_t_9 = NULL;
                      PyObject *__pyx_t_10 = NULL;
                      int __pyx_t_11;
                      PyObject *(*__pyx_t_12)(PyObject *);
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("_from_pylist", 0);

                      /* "pyarrow/table.pxi":6446
 *     """
 * 
 *     arrays = []             # <<<<<<<<<<<<<<
 *     if schema is None:
 *         names = []
*/
                      __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 6446, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_v_arrays = ((PyObject*)__pyx_t_1);
                      __pyx_t_1 = 0;

                      /* "pyarrow/table.pxi":6447
 * 
 *     arrays = []
 *     if schema is None:             # <<<<<<<<<<<<<<
 *         names = []
 *         if mapping:
*/
                      __pyx_t_2 = (__pyx_v_schema == Py_None);
                      if (__pyx_t_2) {

                        /* "pyarrow/table.pxi":6448
 *     arrays = []
 *     if schema is None:
 *         names = []             # <<<<<<<<<<<<<<
 *         if mapping:
 *             names = list(mapping[0].keys())
*/
                        __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 6448, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                        __pyx_v_names = ((PyObject*)__pyx_t_1);
                        __pyx_t_1 = 0;

                        /* "pyarrow/table.pxi":6449
 *     if schema is None:
 *         names = []
 *         if mapping:             # <<<<<<<<<<<<<<
 *             names = list(mapping[0].keys())
 *         for n in names:
*/
                        __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_mapping); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(17, 6449, __pyx_L1_error)
                        if (__pyx_t_2) {

                          /* "pyarrow/table.pxi":6450
 *         names = []
 *         if mapping:
 *             names = list(mapping[0].keys())             # <<<<<<<<<<<<<<
 *         for n in names:
 *             v = [row[n] if n in row else None for row in mapping]
*/
                          if (unlikely(__pyx_v_mapping == Py_None)) {
                            PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
                            __PYX_ERR(17, 6450, __pyx_L1_error)
                          }
                          __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_mapping, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 6450, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_4);
                          __pyx_t_3 = __pyx_t_4;
                          __Pyx_INCREF(__pyx_t_3);
                          __pyx_t_5 = 0;
                          {
                            PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
                            __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_keys, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                            if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 6450, __pyx_L1_error)
                            __Pyx_GOTREF(__pyx_t_1);
                          }
                          __pyx_t_4 = __Pyx_PySequence_ListKeepNew(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 6450, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_4);
                          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                          __Pyx_DECREF_SET(__pyx_v_names, ((PyObject*)__pyx_t_4));
                          __pyx_t_4 = 0;

                          /* "pyarrow/table.pxi":6449
 *     if schema is None:
 *         names = []
 *         if mapping:             # <<<<<<<<<<<<<<
 *             names = list(mapping[0].keys())
 *         for n in names:
*/
                        }

                        /* "pyarrow/table.pxi":6451
 *         if mapping:
 *             names = list(mapping[0].keys())
 *         for n in names:             # <<<<<<<<<<<<<<
 *             v = [row[n] if n in row else None for row in mapping]
 *             arrays.append(v)
*/
                        __pyx_t_4 = __pyx_v_names; __Pyx_INCREF(__pyx_t_4);
                        __pyx_t_6 = 0;
                        for (;;) {
                          {
                            Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_4);
                            #if !CYTHON_ASSUME_SAFE_SIZE
                            if (unlikely((__pyx_temp < 0))) __PYX_ERR(17, 6451, __pyx_L1_error)
                            #endif
                            if (__pyx_t_6 >= __pyx_temp) break;
                          }
                          __pyx_t_1 = __Pyx_PyList_GetItemRefFast(__pyx_t_4, __pyx_t_6, __Pyx_ReferenceSharing_OwnStrongReference);
                          ++__pyx_t_6;
                          if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 6451, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_1);
                          __Pyx_XDECREF_SET(__pyx_v_n, __pyx_t_1);
                          __pyx_t_1 = 0;

                          /* "pyarrow/table.pxi":6452
 *             names = list(mapping[0].keys())
 *         for n in names:
 *             v = [row[n] if n in row else None for row in mapping]             # <<<<<<<<<<<<<<
 *             arrays.append(v)
 *         return cls.from_arrays(arrays, names, metadata=metadata)
*/
                          { /* enter inner scope */
                            __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 6452, __pyx_L9_error)
                            __Pyx_GOTREF(__pyx_t_1);
                            if (likely(PyList_CheckExact(__pyx_v_mapping)) || PyTuple_CheckExact(__pyx_v_mapping)) {
                              __pyx_t_3 = __pyx_v_mapping; __Pyx_INCREF(__pyx_t_3);
                              __pyx_t_7 = 0;
                              __pyx_t_8 = NULL;
                            } else {
                              __pyx_t_7 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_mapping); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 6452, __pyx_L9_error)
                              __Pyx_GOTREF(__pyx_t_3);
                              __pyx_t_8 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(17, 6452, __pyx_L9_error)
                            }
                            for (;;) {
                              if (likely(!__pyx_t_8)) {
                                if (likely(PyList_CheckExact(__pyx_t_3))) {
                                  {
                                    Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3);
                                    #if !CYTHON_ASSUME_SAFE_SIZE
                                    if (unlikely((__pyx_temp < 0))) __PYX_ERR(17, 6452, __pyx_L9_error)
                                    #endif
                                    if (__pyx_t_7 >= __pyx_temp) break;
                                  }
                                  __pyx_t_9 = __Pyx_PyList_GetItemRefFast(__pyx_t_3, __pyx_t_7, __Pyx_ReferenceSharing_OwnStrongReference);
                                  ++__pyx_t_7;
                                } else {
                                  {
                                    Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3);
                                    #if !CYTHON_ASSUME_SAFE_SIZE
                                    if (unlikely((__pyx_temp < 0))) __PYX_ERR(17, 6452, __pyx_L9_error)
                                    #endif
                                    if (__pyx_t_7 >= __pyx_temp) break;
                                  }
                                  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                                  __pyx_t_9 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_7));
                                  #else
                                  __pyx_t_9 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_7);
                                  #endif
                                  ++__pyx_t_7;
                                }
                                if (unlikely(!__pyx_t_9)) __PYX_ERR(17, 6452, __pyx_L9_error)
                              } else {
                                __pyx_t_9 = __pyx_t_8(__pyx_t_3);
                                if (unlikely(!__pyx_t_9)) {
                                  PyObject* exc_type = PyErr_Occurred();
                                  if (exc_type) {
                                    if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(17, 6452, __pyx_L9_error)
                                    PyErr_Clear();
                                  }
                                  break;
                                }
                              }
                              __Pyx_GOTREF(__pyx_t_9);
                              __Pyx_XDECREF_SET(__pyx_9genexpr34__pyx_v_row, __pyx_t_9);
                              __pyx_t_9 = 0;
                              __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_v_n, __pyx_9genexpr34__pyx_v_row, Py_EQ)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(17, 6452, __pyx_L9_error)
                              if (__pyx_t_2) {
                                if (unlikely(__pyx_9genexpr34__pyx_v_row == Py_None)) {
                                  PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
                                  __PYX_ERR(17, 6452, __pyx_L9_error)
                                }
                                __pyx_t_10 = __Pyx_PyObject_GetItem(__pyx_9genexpr34__pyx_v_row, __pyx_v_n); if (unlikely(!__pyx_t_10)) __PYX_ERR(17, 6452, __pyx_L9_error)
                                __Pyx_GOTREF(__pyx_t_10);
                                __pyx_t_9 = __pyx_t_10;
                                __pyx_t_10 = 0;
                              } else {
                                __Pyx_INCREF(Py_None);
                                __pyx_t_9 = Py_None;
                              }
                              if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_9))) __PYX_ERR(17, 6452, __pyx_L9_error)
                              __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
                            }
                            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                            __Pyx_XDECREF(__pyx_9genexpr34__pyx_v_row); __pyx_9genexpr34__pyx_v_row = 0;
                            goto __pyx_L13_exit_scope;
                            __pyx_L9_error:;
                            __Pyx_XDECREF(__pyx_9genexpr34__pyx_v_row); __pyx_9genexpr34__pyx_v_row = 0;
                            goto __pyx_L1_error;
                            __pyx_L13_exit_scope:;
                          } /* exit inner scope */
                          __Pyx_XDECREF_SET(__pyx_v_v, ((PyObject*)__pyx_t_1));
                          __pyx_t_1 = 0;

                          /* "pyarrow/table.pxi":6453
 *         for n in names:
 *             v = [row[n] if n in row else None for row in mapping]
 *             arrays.append(v)             # <<<<<<<<<<<<<<
 *         return cls.from_arrays(arrays, names, metadata=metadata)
 *     else:
*/
                          __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_arrays, __pyx_v_v); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(17, 6453, __pyx_L1_error)

                          /* "pyarrow/table.pxi":6451
 *         if mapping:
 *             names = list(mapping[0].keys())
 *         for n in names:             # <<<<<<<<<<<<<<
 *             v = [row[n] if n in row else None for row in mapping]
 *             arrays.append(v)
*/
                        }
                        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

                        /* "pyarrow/table.pxi":6454
 *             v = [row[n] if n in row else None for row in mapping]
 *             arrays.append(v)
 *         return cls.from_arrays(arrays, names, metadata=metadata)             # <<<<<<<<<<<<<<
 *     else:
 *         if isinstance(schema, Schema):
*/
                        __Pyx_XDECREF(__pyx_r);
                        __pyx_t_1 = __pyx_v_cls;
                        __Pyx_INCREF(__pyx_t_1);
                        __pyx_t_5 = 0;
                        {
                          PyObject *__pyx_callargs[3 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_1, __pyx_v_arrays, __pyx_v_names};
                          __pyx_t_3 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 6454, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_3);
                          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_metadata, __pyx_v_metadata, __pyx_t_3, __pyx_callargs+3, 0) < (0)) __PYX_ERR(17, 6454, __pyx_L1_error)
                          __pyx_t_4 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_from_arrays, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_3);
                          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
                          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                          if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 6454, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_4);
                        }
                        __pyx_r = __pyx_t_4;
                        __pyx_t_4 = 0;
                        goto __pyx_L0;

                        /* "pyarrow/table.pxi":6447
 * 
 *     arrays = []
 *     if schema is None:             # <<<<<<<<<<<<<<
 *         names = []
 *         if mapping:
*/
                      }

                      /* "pyarrow/table.pxi":6456
 *         return cls.from_arrays(arrays, names, metadata=metadata)
 *     else:
 *         if isinstance(schema, Schema):             # <<<<<<<<<<<<<<
 *             for n in schema.names:
 *                 v = [row[n] if n in row else None for row in mapping]
*/
                      /*else*/ {
                        __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_schema, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Schema); 
                        if (likely(__pyx_t_2)) {

                          /* "pyarrow/table.pxi":6457
 *     else:
 *         if isinstance(schema, Schema):
 *             for n in schema.names:             # <<<<<<<<<<<<<<
 *                 v = [row[n] if n in row else None for row in mapping]
 *                 arrays.append(v)
*/
                          __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_schema, __pyx_mstate_global->__pyx_n_u_names); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 6457, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_4);
                          if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) {
                            __pyx_t_3 = __pyx_t_4; __Pyx_INCREF(__pyx_t_3);
                            __pyx_t_6 = 0;
                            __pyx_t_8 = NULL;
                          } else {
                            __pyx_t_6 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 6457, __pyx_L1_error)
                            __Pyx_GOTREF(__pyx_t_3);
                            __pyx_t_8 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(17, 6457, __pyx_L1_error)
                          }
                          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                          for (;;) {
                            if (likely(!__pyx_t_8)) {
                              if (likely(PyList_CheckExact(__pyx_t_3))) {
                                {
                                  Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3);
                                  #if !CYTHON_ASSUME_SAFE_SIZE
                                  if (unlikely((__pyx_temp < 0))) __PYX_ERR(17, 6457, __pyx_L1_error)
                                  #endif
                                  if (__pyx_t_6 >= __pyx_temp) break;
                                }
                                __pyx_t_4 = __Pyx_PyList_GetItemRefFast(__pyx_t_3, __pyx_t_6, __Pyx_ReferenceSharing_OwnStrongReference);
                                ++__pyx_t_6;
                              } else {
                                {
                                  Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3);
                                  #if !CYTHON_ASSUME_SAFE_SIZE
                                  if (unlikely((__pyx_temp < 0))) __PYX_ERR(17, 6457, __pyx_L1_error)
                                  #endif
                                  if (__pyx_t_6 >= __pyx_temp) break;
                                }
                                #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                                __pyx_t_4 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_6));
                                #else
                                __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_6);
                                #endif
                                ++__pyx_t_6;
                              }
                              if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 6457, __pyx_L1_error)
                            } else {
                              __pyx_t_4 = __pyx_t_8(__pyx_t_3);
                              if (unlikely(!__pyx_t_4)) {
                                PyObject* exc_type = PyErr_Occurred();
                                if (exc_type) {
                                  if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(17, 6457, __pyx_L1_error)
                                  PyErr_Clear();
                                }
                                break;
                              }
                            }
                            __Pyx_GOTREF(__pyx_t_4);
                            __Pyx_XDECREF_SET(__pyx_v_n, __pyx_t_4);
                            __pyx_t_4 = 0;

                            /* "pyarrow/table.pxi":6458
 *         if isinstance(schema, Schema):
 *             for n in schema.names:
 *                 v = [row[n] if n in row else None for row in mapping]             # <<<<<<<<<<<<<<
 *                 arrays.append(v)
 *             # Will raise if metadata is not None
*/
                            { /* enter inner scope */
                              __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 6458, __pyx_L20_error)
                              __Pyx_GOTREF(__pyx_t_4);
                              if (likely(PyList_CheckExact(__pyx_v_mapping)) || PyTuple_CheckExact(__pyx_v_mapping)) {
                                __pyx_t_1 = __pyx_v_mapping; __Pyx_INCREF(__pyx_t_1);
                                __pyx_t_7 = 0;
                                __pyx_t_12 = NULL;
                              } else {
                                __pyx_t_7 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_mapping); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 6458, __pyx_L20_error)
                                __Pyx_GOTREF(__pyx_t_1);
                                __pyx_t_12 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_12)) __PYX_ERR(17, 6458, __pyx_L20_error)
                              }
                              for (;;) {
                                if (likely(!__pyx_t_12)) {
                                  if (likely(PyList_CheckExact(__pyx_t_1))) {
                                    {
                                      Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
                                      #if !CYTHON_ASSUME_SAFE_SIZE
                                      if (unlikely((__pyx_temp < 0))) __PYX_ERR(17, 6458, __pyx_L20_error)
                                      #endif
                                      if (__pyx_t_7 >= __pyx_temp) break;
                                    }
                                    __pyx_t_9 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_7, __Pyx_ReferenceSharing_OwnStrongReference);
                                    ++__pyx_t_7;
                                  } else {
                                    {
                                      Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
                                      #if !CYTHON_ASSUME_SAFE_SIZE
                                      if (unlikely((__pyx_temp < 0))) __PYX_ERR(17, 6458, __pyx_L20_error)
                                      #endif
                                      if (__pyx_t_7 >= __pyx_temp) break;
                                    }
                                    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                                    __pyx_t_9 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_7));
                                    #else
                                    __pyx_t_9 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_7);
                                    #endif
                                    ++__pyx_t_7;
                                  }
                                  if (unlikely(!__pyx_t_9)) __PYX_ERR(17, 6458, __pyx_L20_error)
                                } else {
                                  __pyx_t_9 = __pyx_t_12(__pyx_t_1);
                                  if (unlikely(!__pyx_t_9)) {
                                    PyObject* exc_type = PyErr_Occurred();
                                    if (exc_type) {
                                      if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(17, 6458, __pyx_L20_error)
                                      PyErr_Clear();
                                    }
                                    break;
                                  }
                                }
                                __Pyx_GOTREF(__pyx_t_9);
                                __Pyx_XDECREF_SET(__pyx_9genexpr35__pyx_v_row, __pyx_t_9);
                                __pyx_t_9 = 0;
                                __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_v_n, __pyx_9genexpr35__pyx_v_row, Py_EQ)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(17, 6458, __pyx_L20_error)
                                if (__pyx_t_2) {
                                  if (unlikely(__pyx_9genexpr35__pyx_v_row == Py_None)) {
                                    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
                                    __PYX_ERR(17, 6458, __pyx_L20_error)
                                  }
                                  __pyx_t_10 = __Pyx_PyObject_GetItem(__pyx_9genexpr35__pyx_v_row, __pyx_v_n); if (unlikely(!__pyx_t_10)) __PYX_ERR(17, 6458, __pyx_L20_error)
                                  __Pyx_GOTREF(__pyx_t_10);
                                  __pyx_t_9 = __pyx_t_10;
                                  __pyx_t_10 = 0;
                                } else {
                                  __Pyx_INCREF(Py_None);
                                  __pyx_t_9 = Py_None;
                                }
                                if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_9))) __PYX_ERR(17, 6458, __pyx_L20_error)
                                __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
                              }
                              __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                              __Pyx_XDECREF(__pyx_9genexpr35__pyx_v_row); __pyx_9genexpr35__pyx_v_row = 0;
                              goto __pyx_L24_exit_scope;
                              __pyx_L20_error:;
                              __Pyx_XDECREF(__pyx_9genexpr35__pyx_v_row); __pyx_9genexpr35__pyx_v_row = 0;
                              goto __pyx_L1_error;
                              __pyx_L24_exit_scope:;
                            } /* exit inner scope */
                            __Pyx_XDECREF_SET(__pyx_v_v, ((PyObject*)__pyx_t_4));
                            __pyx_t_4 = 0;

                            /* "pyarrow/table.pxi":6459
 *             for n in schema.names:
 *                 v = [row[n] if n in row else None for row in mapping]
 *                 arrays.append(v)             # <<<<<<<<<<<<<<
 *             # Will raise if metadata is not None
 *             return cls.from_arrays(arrays, schema=schema, metadata=metadata)
*/
                            __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_arrays, __pyx_v_v); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(17, 6459, __pyx_L1_error)

                            /* "pyarrow/table.pxi":6457
 *     else:
 *         if isinstance(schema, Schema):
 *             for n in schema.names:             # <<<<<<<<<<<<<<
 *                 v = [row[n] if n in row else None for row in mapping]
 *                 arrays.append(v)
*/
                          }
                          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

                          /* "pyarrow/table.pxi":6461
 *                 arrays.append(v)
 *             # Will raise if metadata is not None
 *             return cls.from_arrays(arrays, schema=schema, metadata=metadata)             # <<<<<<<<<<<<<<
 *         else:
 *             raise TypeError('Schema must be an instance of pyarrow.Schema')
*/
                          __Pyx_XDECREF(__pyx_r);
                          __pyx_t_4 = __pyx_v_cls;
                          __Pyx_INCREF(__pyx_t_4);
                          __pyx_t_5 = 0;
                          {
                            PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_4, __pyx_v_arrays};
                            __pyx_t_1 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 6461, __pyx_L1_error)
                            __Pyx_GOTREF(__pyx_t_1);
                            if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_schema, __pyx_v_schema, __pyx_t_1, __pyx_callargs+2, 0) < (0)) __PYX_ERR(17, 6461, __pyx_L1_error)
                            if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_metadata, __pyx_v_metadata, __pyx_t_1, __pyx_callargs+2, 1) < (0)) __PYX_ERR(17, 6461, __pyx_L1_error)
                            __pyx_t_3 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_from_arrays, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_1);
                            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                            if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 6461, __pyx_L1_error)
                            __Pyx_GOTREF(__pyx_t_3);
                          }
                          __pyx_r = __pyx_t_3;
                          __pyx_t_3 = 0;
                          goto __pyx_L0;

                          /* "pyarrow/table.pxi":6456
 *         return cls.from_arrays(arrays, names, metadata=metadata)
 *     else:
 *         if isinstance(schema, Schema):             # <<<<<<<<<<<<<<
 *             for n in schema.names:
 *                 v = [row[n] if n in row else None for row in mapping]
*/
                        }

                        /* "pyarrow/table.pxi":6463
 *             return cls.from_arrays(arrays, schema=schema, metadata=metadata)
 *         else:
 *             raise TypeError('Schema must be an instance of pyarrow.Schema')             # <<<<<<<<<<<<<<
 * 
 * 
*/
                        /*else*/ {
                          __pyx_t_1 = NULL;
                          __pyx_t_5 = 1;
                          {
                            PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_mstate_global->__pyx_kp_u_Schema_must_be_an_instance_of_py};
                            __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                            __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
                            if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 6463, __pyx_L1_error)
                            __Pyx_GOTREF(__pyx_t_3);
                          }
                          __Pyx_Raise(__pyx_t_3, 0, 0, 0);
                          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                          __PYX_ERR(17, 6463, __pyx_L1_error)
                        }
                      }

                      /* "pyarrow/table.pxi":6426
 * 
 * 
 * def _from_pylist(cls, mapping, schema, metadata):             # <<<<<<<<<<<<<<
 *     """
 *     Construct a Table/RecordBatch from list of rows / dictionaries.
*/

                      /* 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_9);
                      __Pyx_XDECREF(__pyx_t_10);
                      __Pyx_AddTraceback("pyarrow.lib._from_pylist", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XDECREF(__pyx_v_arrays);
                      __Pyx_XDECREF(__pyx_v_names);
                      __Pyx_XDECREF(__pyx_v_n);
                      __Pyx_XDECREF(__pyx_v_v);
                      __Pyx_XDECREF(__pyx_9genexpr34__pyx_v_row);
                      __Pyx_XDECREF(__pyx_9genexpr35__pyx_v_row);
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/table.pxi":6504
 *     """
 * 
 *     def __init__(self, table, keys, use_threads=True):             # <<<<<<<<<<<<<<
 *         if isinstance(keys, str):
 *             keys = [keys]
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_12TableGroupBy_1__init__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_12TableGroupBy___init__, "TableGroupBy.__init__(self, table, keys, use_threads=True)");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_12TableGroupBy_1__init__ = {"__init__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12TableGroupBy_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12TableGroupBy___init__};
                    static PyObject *__pyx_pw_7pyarrow_3lib_12TableGroupBy_1__init__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      PyObject *__pyx_v_self = 0;
                      PyObject *__pyx_v_table = 0;
                      PyObject *__pyx_v_keys = 0;
                      PyObject *__pyx_v_use_threads = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[4] = {0,0,0,0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_table,&__pyx_mstate_global->__pyx_n_u_keys,&__pyx_mstate_global->__pyx_n_u_use_threads,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(17, 6504, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  4:
                            values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(17, 6504, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  3:
                            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(17, 6504, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  2:
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(17, 6504, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 6504, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(17, 6504, __pyx_L3_error)
                          if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_True)));
                          for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 4, i); __PYX_ERR(17, 6504, __pyx_L3_error) }
                          }
                        } else {
                          switch (__pyx_nargs) {
                            case  4:
                            values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(17, 6504, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  3:
                            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(17, 6504, __pyx_L3_error)
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(17, 6504, __pyx_L3_error)
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 6504, __pyx_L3_error)
                            break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_True)));
                        }
                        __pyx_v_self = values[0];
                        __pyx_v_table = values[1];
                        __pyx_v_keys = values[2];
                        __pyx_v_use_threads = values[3];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 4, __pyx_nargs); __PYX_ERR(17, 6504, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.TableGroupBy.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_12TableGroupBy___init__(__pyx_self, __pyx_v_self, __pyx_v_table, __pyx_v_keys, __pyx_v_use_threads);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_12TableGroupBy___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_table, PyObject *__pyx_v_keys, PyObject *__pyx_v_use_threads) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_t_1;
                      PyObject *__pyx_t_2 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__init__", 0);
                      __Pyx_INCREF(__pyx_v_keys);

                      /* "pyarrow/table.pxi":6505
 * 
 *     def __init__(self, table, keys, use_threads=True):
 *         if isinstance(keys, str):             # <<<<<<<<<<<<<<
 *             keys = [keys]
 * 
*/
                      __pyx_t_1 = PyUnicode_Check(__pyx_v_keys); 
                      if (__pyx_t_1) {

                        /* "pyarrow/table.pxi":6506
 *     def __init__(self, table, keys, use_threads=True):
 *         if isinstance(keys, str):
 *             keys = [keys]             # <<<<<<<<<<<<<<
 * 
 *         self._table = table
*/
                        __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 6506, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_2);
                        __Pyx_INCREF(__pyx_v_keys);
                        __Pyx_GIVEREF(__pyx_v_keys);
                        if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_v_keys) != (0)) __PYX_ERR(17, 6506, __pyx_L1_error);
                        __Pyx_DECREF_SET(__pyx_v_keys, __pyx_t_2);
                        __pyx_t_2 = 0;

                        /* "pyarrow/table.pxi":6505
 * 
 *     def __init__(self, table, keys, use_threads=True):
 *         if isinstance(keys, str):             # <<<<<<<<<<<<<<
 *             keys = [keys]
 * 
*/
                      }

                      /* "pyarrow/table.pxi":6508
 *             keys = [keys]
 * 
 *         self._table = table             # <<<<<<<<<<<<<<
 *         self.keys = keys
 *         self._use_threads = use_threads
*/
                      if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_table_2, __pyx_v_table) < (0)) __PYX_ERR(17, 6508, __pyx_L1_error)

                      /* "pyarrow/table.pxi":6509
 * 
 *         self._table = table
 *         self.keys = keys             # <<<<<<<<<<<<<<
 *         self._use_threads = use_threads
 * 
*/
                      if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_keys, __pyx_v_keys) < (0)) __PYX_ERR(17, 6509, __pyx_L1_error)

                      /* "pyarrow/table.pxi":6510
 *         self._table = table
 *         self.keys = keys
 *         self._use_threads = use_threads             # <<<<<<<<<<<<<<
 * 
 *     def aggregate(self, aggregations):
*/
                      if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_use_threads_2, __pyx_v_use_threads) < (0)) __PYX_ERR(17, 6510, __pyx_L1_error)

                      /* "pyarrow/table.pxi":6504
 *     """
 * 
 *     def __init__(self, table, keys, use_threads=True):             # <<<<<<<<<<<<<<
 *         if isinstance(keys, str):
 *             keys = [keys]
*/

                      /* function exit code */
                      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_AddTraceback("pyarrow.lib.TableGroupBy.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XDECREF(__pyx_v_keys);
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/table.pxi":6512
 *         self._use_threads = use_threads
 * 
 *     def aggregate(self, aggregations):             # <<<<<<<<<<<<<<
 *         """
 *         Perform an aggregation over the grouped columns of the table.
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_12TableGroupBy_3aggregate(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_12TableGroupBy_2aggregate, "TableGroupBy.aggregate(self, aggregations)\n\nPerform an aggregation over the grouped columns of the table.\n\nParameters\n----------\naggregations : list[tuple(str, str)] or list[tuple(str, str, FunctionOptions)]\n    List of tuples, where each tuple is one aggregation specification\n    and consists of: aggregation column name followed\n    by function name and optionally aggregation function option.\n    Pass empty list to get a single row for each group.\n    The column name can be a string, an empty list or a list of\n    column names, for unary, nullary and n-ary aggregation functions\n    respectively.\n\n    For the list of function names and respective aggregation\n    function options see :ref:`py-grouped-aggrs`.\n\nReturns\n-------\nTable\n    Results of the aggregation functions.\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> t = pa.table([\n...       pa.array([\"a\", \"a\", \"b\", \"b\", \"c\"]),\n...       pa.array([1, 2, 3, 4, 5]),\n... ], names=[\"keys\", \"values\"])\n\nSum the column \"values\" over the grouped column \"keys\":\n\n>>> t.group_by(\"keys\").aggregate([(\"values\", \"sum\")])\npyarrow.Table\nkeys: string\nvalues_sum: int64\n----\nkeys: [[\"a\",\"b\",\"c\"]]\nvalues_sum: [[3,7,5]]\n\nCount the rows over the grouped column \"keys\":\n\n>>> t.group_by(\"keys\").aggregate([([], \"count_all\")])\npyarrow.Table\nkeys: string\ncount_all: int64\n----\nkeys: [[\"a\",\"b\",\"c\"]]\ncount_all: [[2,2,1]]\n\nDo multiple aggregations:\n\n>>> t.group_by(\"keys\").aggregate([\n...    (\"values\", \"sum\"),\n...    (\"keys\", \"count\")\n... ])\npyarrow.Table\nkeys: string\nvalues_sum: int64\nkeys_count: int64\n----\nkeys: [[\"a\",\"b\",\"c\"]]\nvalues_sum: [[3,7,5]]\nkeys_count: [[2,2,1]]\n\nCount the number of non-null values for column \"values\"\nover the grouped column \"keys\":\n\n>>> import pyarrow.compute as pc\n>>> t.group_by([\"keys\"]).aggregate([\n...    (\"values\", \"count\", pc.CountOptions(mode=\"only_valid\"))\n... ])\npyarrow.T""able\nkeys: string\nvalues_count: int64\n----\nkeys: [[\"a\",\"b\",\"c\"]]\nvalues_count: [[2,2,1]]\n\nGet a single row for each group in column \"keys\":\n\n>>> t.group_by(\"keys\").aggregate([])\npyarrow.Table\nkeys: string\n----\nkeys: [[\"a\",\"b\",\"c\"]]");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_12TableGroupBy_3aggregate = {"aggregate", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12TableGroupBy_3aggregate, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12TableGroupBy_2aggregate};
                    static PyObject *__pyx_pw_7pyarrow_3lib_12TableGroupBy_3aggregate(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      PyObject *__pyx_v_self = 0;
                      PyObject *__pyx_v_aggregations = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[2] = {0,0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("aggregate (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_aggregations,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(17, 6512, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  2:
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(17, 6512, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 6512, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "aggregate", 0) < (0)) __PYX_ERR(17, 6512, __pyx_L3_error)
                          for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("aggregate", 1, 2, 2, i); __PYX_ERR(17, 6512, __pyx_L3_error) }
                          }
                        } else if (unlikely(__pyx_nargs != 2)) {
                          goto __pyx_L5_argtuple_error;
                        } else {
                          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(17, 6512, __pyx_L3_error)
                          values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(17, 6512, __pyx_L3_error)
                        }
                        __pyx_v_self = values[0];
                        __pyx_v_aggregations = values[1];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("aggregate", 1, 2, 2, __pyx_nargs); __PYX_ERR(17, 6512, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.TableGroupBy.aggregate", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_12TableGroupBy_2aggregate(__pyx_self, __pyx_v_self, __pyx_v_aggregations);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_12TableGroupBy_2aggregate(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_aggregations) {
                      PyObject *__pyx_v_group_by_aggrs = NULL;
                      PyObject *__pyx_v_aggr = NULL;
                      PyObject *__pyx_v_target = NULL;
                      PyObject *__pyx_v_func = NULL;
                      PyObject *__pyx_v_opt = NULL;
                      PyObject *__pyx_v_func_nohash = NULL;
                      PyObject *__pyx_v_aggr_name = NULL;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      Py_ssize_t __pyx_t_2;
                      PyObject *(*__pyx_t_3)(PyObject *);
                      PyObject *__pyx_t_4 = NULL;
                      Py_ssize_t __pyx_t_5;
                      int __pyx_t_6;
                      PyObject *__pyx_t_7 = NULL;
                      PyObject *__pyx_t_8 = NULL;
                      PyObject *(*__pyx_t_9)(PyObject *);
                      PyObject *__pyx_t_10 = NULL;
                      int __pyx_t_11;
                      size_t __pyx_t_12;
                      int __pyx_t_13;
                      int __pyx_t_14;
                      PyObject *__pyx_t_15 = NULL;
                      PyObject *__pyx_t_16 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("aggregate", 0);

                      /* "pyarrow/table.pxi":6601
 *         keys: [["a","b","c"]]
 *         """
 *         group_by_aggrs = []             # <<<<<<<<<<<<<<
 *         for aggr in aggregations:
 *             # Set opt to None if not specified
*/
                      __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 6601, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_v_group_by_aggrs = ((PyObject*)__pyx_t_1);
                      __pyx_t_1 = 0;

                      /* "pyarrow/table.pxi":6602
 *         """
 *         group_by_aggrs = []
 *         for aggr in aggregations:             # <<<<<<<<<<<<<<
 *             # Set opt to None if not specified
 *             if len(aggr) == 2:
*/
                      if (likely(PyList_CheckExact(__pyx_v_aggregations)) || PyTuple_CheckExact(__pyx_v_aggregations)) {
                        __pyx_t_1 = __pyx_v_aggregations; __Pyx_INCREF(__pyx_t_1);
                        __pyx_t_2 = 0;
                        __pyx_t_3 = NULL;
                      } else {
                        __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_aggregations); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 6602, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                        __pyx_t_3 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 6602, __pyx_L1_error)
                      }
                      for (;;) {
                        if (likely(!__pyx_t_3)) {
                          if (likely(PyList_CheckExact(__pyx_t_1))) {
                            {
                              Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
                              #if !CYTHON_ASSUME_SAFE_SIZE
                              if (unlikely((__pyx_temp < 0))) __PYX_ERR(17, 6602, __pyx_L1_error)
                              #endif
                              if (__pyx_t_2 >= __pyx_temp) break;
                            }
                            __pyx_t_4 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_2, __Pyx_ReferenceSharing_OwnStrongReference);
                            ++__pyx_t_2;
                          } else {
                            {
                              Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
                              #if !CYTHON_ASSUME_SAFE_SIZE
                              if (unlikely((__pyx_temp < 0))) __PYX_ERR(17, 6602, __pyx_L1_error)
                              #endif
                              if (__pyx_t_2 >= __pyx_temp) break;
                            }
                            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                            __pyx_t_4 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2));
                            #else
                            __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2);
                            #endif
                            ++__pyx_t_2;
                          }
                          if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 6602, __pyx_L1_error)
                        } else {
                          __pyx_t_4 = __pyx_t_3(__pyx_t_1);
                          if (unlikely(!__pyx_t_4)) {
                            PyObject* exc_type = PyErr_Occurred();
                            if (exc_type) {
                              if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(17, 6602, __pyx_L1_error)
                              PyErr_Clear();
                            }
                            break;
                          }
                        }
                        __Pyx_GOTREF(__pyx_t_4);
                        __Pyx_XDECREF_SET(__pyx_v_aggr, __pyx_t_4);
                        __pyx_t_4 = 0;

                        /* "pyarrow/table.pxi":6604
 *         for aggr in aggregations:
 *             # Set opt to None if not specified
 *             if len(aggr) == 2:             # <<<<<<<<<<<<<<
 *                 target, func = aggr
 *                 opt = None
*/
                        __pyx_t_5 = PyObject_Length(__pyx_v_aggr); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(17, 6604, __pyx_L1_error)
                        __pyx_t_6 = (__pyx_t_5 == 2);
                        if (__pyx_t_6) {

                          /* "pyarrow/table.pxi":6605
 *             # Set opt to None if not specified
 *             if len(aggr) == 2:
 *                 target, func = aggr             # <<<<<<<<<<<<<<
 *                 opt = None
 *             else:
*/
                          if ((likely(PyTuple_CheckExact(__pyx_v_aggr))) || (PyList_CheckExact(__pyx_v_aggr))) {
                            PyObject* sequence = __pyx_v_aggr;
                            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(17, 6605, __pyx_L1_error)
                            }
                            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                            if (likely(PyTuple_CheckExact(sequence))) {
                              __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0);
                              __Pyx_INCREF(__pyx_t_4);
                              __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1);
                              __Pyx_INCREF(__pyx_t_7);
                            } else {
                              __pyx_t_4 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference);
                              if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 6605, __pyx_L1_error)
                              __Pyx_XGOTREF(__pyx_t_4);
                              __pyx_t_7 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference);
                              if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 6605, __pyx_L1_error)
                              __Pyx_XGOTREF(__pyx_t_7);
                            }
                            #else
                            __pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 6605, __pyx_L1_error)
                            __Pyx_GOTREF(__pyx_t_4);
                            __pyx_t_7 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 6605, __pyx_L1_error)
                            __Pyx_GOTREF(__pyx_t_7);
                            #endif
                          } else {
                            Py_ssize_t index = -1;
                            __pyx_t_8 = PyObject_GetIter(__pyx_v_aggr); if (unlikely(!__pyx_t_8)) __PYX_ERR(17, 6605, __pyx_L1_error)
                            __Pyx_GOTREF(__pyx_t_8);
                            __pyx_t_9 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_8);
                            index = 0; __pyx_t_4 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_4)) goto __pyx_L6_unpacking_failed;
                            __Pyx_GOTREF(__pyx_t_4);
                            index = 1; __pyx_t_7 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_7)) goto __pyx_L6_unpacking_failed;
                            __Pyx_GOTREF(__pyx_t_7);
                            if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < (0)) __PYX_ERR(17, 6605, __pyx_L1_error)
                            __pyx_t_9 = NULL;
                            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                            goto __pyx_L7_unpacking_done;
                            __pyx_L6_unpacking_failed:;
                            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                            __pyx_t_9 = NULL;
                            if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
                            __PYX_ERR(17, 6605, __pyx_L1_error)
                            __pyx_L7_unpacking_done:;
                          }
                          __Pyx_XDECREF_SET(__pyx_v_target, __pyx_t_4);
                          __pyx_t_4 = 0;
                          __Pyx_XDECREF_SET(__pyx_v_func, __pyx_t_7);
                          __pyx_t_7 = 0;

                          /* "pyarrow/table.pxi":6606
 *             if len(aggr) == 2:
 *                 target, func = aggr
 *                 opt = None             # <<<<<<<<<<<<<<
 *             else:
 *                 target, func, opt = aggr
*/
                          __Pyx_INCREF(Py_None);
                          __Pyx_XDECREF_SET(__pyx_v_opt, Py_None);

                          /* "pyarrow/table.pxi":6604
 *         for aggr in aggregations:
 *             # Set opt to None if not specified
 *             if len(aggr) == 2:             # <<<<<<<<<<<<<<
 *                 target, func = aggr
 *                 opt = None
*/
                          goto __pyx_L5;
                        }

                        /* "pyarrow/table.pxi":6608
 *                 opt = None
 *             else:
 *                 target, func, opt = aggr             # <<<<<<<<<<<<<<
 *             # Ensure target is a list
 *             if not isinstance(target, (list, tuple)):
*/
                        /*else*/ {
                          if ((likely(PyTuple_CheckExact(__pyx_v_aggr))) || (PyList_CheckExact(__pyx_v_aggr))) {
                            PyObject* sequence = __pyx_v_aggr;
                            Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
                            if (unlikely(size != 3)) {
                              if (size > 3) __Pyx_RaiseTooManyValuesError(3);
                              else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
                              __PYX_ERR(17, 6608, __pyx_L1_error)
                            }
                            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                            if (likely(PyTuple_CheckExact(sequence))) {
                              __pyx_t_7 = PyTuple_GET_ITEM(sequence, 0);
                              __Pyx_INCREF(__pyx_t_7);
                              __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1);
                              __Pyx_INCREF(__pyx_t_4);
                              __pyx_t_8 = PyTuple_GET_ITEM(sequence, 2);
                              __Pyx_INCREF(__pyx_t_8);
                            } else {
                              __pyx_t_7 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference);
                              if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 6608, __pyx_L1_error)
                              __Pyx_XGOTREF(__pyx_t_7);
                              __pyx_t_4 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference);
                              if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 6608, __pyx_L1_error)
                              __Pyx_XGOTREF(__pyx_t_4);
                              __pyx_t_8 = __Pyx_PyList_GetItemRefFast(sequence, 2, __Pyx_ReferenceSharing_SharedReference);
                              if (unlikely(!__pyx_t_8)) __PYX_ERR(17, 6608, __pyx_L1_error)
                              __Pyx_XGOTREF(__pyx_t_8);
                            }
                            #else
                            __pyx_t_7 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 6608, __pyx_L1_error)
                            __Pyx_GOTREF(__pyx_t_7);
                            __pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 6608, __pyx_L1_error)
                            __Pyx_GOTREF(__pyx_t_4);
                            __pyx_t_8 = __Pyx_PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_8)) __PYX_ERR(17, 6608, __pyx_L1_error)
                            __Pyx_GOTREF(__pyx_t_8);
                            #endif
                          } else {
                            Py_ssize_t index = -1;
                            __pyx_t_10 = PyObject_GetIter(__pyx_v_aggr); if (unlikely(!__pyx_t_10)) __PYX_ERR(17, 6608, __pyx_L1_error)
                            __Pyx_GOTREF(__pyx_t_10);
                            __pyx_t_9 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_10);
                            index = 0; __pyx_t_7 = __pyx_t_9(__pyx_t_10); if (unlikely(!__pyx_t_7)) goto __pyx_L8_unpacking_failed;
                            __Pyx_GOTREF(__pyx_t_7);
                            index = 1; __pyx_t_4 = __pyx_t_9(__pyx_t_10); if (unlikely(!__pyx_t_4)) goto __pyx_L8_unpacking_failed;
                            __Pyx_GOTREF(__pyx_t_4);
                            index = 2; __pyx_t_8 = __pyx_t_9(__pyx_t_10); if (unlikely(!__pyx_t_8)) goto __pyx_L8_unpacking_failed;
                            __Pyx_GOTREF(__pyx_t_8);
                            if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_10), 3) < (0)) __PYX_ERR(17, 6608, __pyx_L1_error)
                            __pyx_t_9 = NULL;
                            __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                            goto __pyx_L9_unpacking_done;
                            __pyx_L8_unpacking_failed:;
                            __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                            __pyx_t_9 = NULL;
                            if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
                            __PYX_ERR(17, 6608, __pyx_L1_error)
                            __pyx_L9_unpacking_done:;
                          }
                          __Pyx_XDECREF_SET(__pyx_v_target, __pyx_t_7);
                          __pyx_t_7 = 0;
                          __Pyx_XDECREF_SET(__pyx_v_func, __pyx_t_4);
                          __pyx_t_4 = 0;
                          __Pyx_XDECREF_SET(__pyx_v_opt, __pyx_t_8);
                          __pyx_t_8 = 0;
                        }
                        __pyx_L5:;

                        /* "pyarrow/table.pxi":6610
 *                 target, func, opt = aggr
 *             # Ensure target is a list
 *             if not isinstance(target, (list, tuple)):             # <<<<<<<<<<<<<<
 *                 target = [target]
 *             # Ensure aggregate function is hash_ if needed
*/
                        __pyx_t_11 = PyList_Check(__pyx_v_target); 
                        if (!__pyx_t_11) {
                        } else {
                          __pyx_t_6 = __pyx_t_11;
                          goto __pyx_L11_bool_binop_done;
                        }
                        __pyx_t_11 = PyTuple_Check(__pyx_v_target); 
                        __pyx_t_6 = __pyx_t_11;
                        __pyx_L11_bool_binop_done:;
                        __pyx_t_11 = (!__pyx_t_6);
                        if (__pyx_t_11) {

                          /* "pyarrow/table.pxi":6611
 *             # Ensure target is a list
 *             if not isinstance(target, (list, tuple)):
 *                 target = [target]             # <<<<<<<<<<<<<<
 *             # Ensure aggregate function is hash_ if needed
 *             if len(self.keys) > 0 and not func.startswith("hash_"):
*/
                          __pyx_t_8 = PyList_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(17, 6611, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_8);
                          __Pyx_INCREF(__pyx_v_target);
                          __Pyx_GIVEREF(__pyx_v_target);
                          if (__Pyx_PyList_SET_ITEM(__pyx_t_8, 0, __pyx_v_target) != (0)) __PYX_ERR(17, 6611, __pyx_L1_error);
                          __Pyx_DECREF_SET(__pyx_v_target, __pyx_t_8);
                          __pyx_t_8 = 0;

                          /* "pyarrow/table.pxi":6610
 *                 target, func, opt = aggr
 *             # Ensure target is a list
 *             if not isinstance(target, (list, tuple)):             # <<<<<<<<<<<<<<
 *                 target = [target]
 *             # Ensure aggregate function is hash_ if needed
*/
                        }

                        /* "pyarrow/table.pxi":6613
 *                 target = [target]
 *             # Ensure aggregate function is hash_ if needed
 *             if len(self.keys) > 0 and not func.startswith("hash_"):             # <<<<<<<<<<<<<<
 *                 func = "hash_" + func
 *             if len(self.keys) == 0 and func.startswith("hash_"):
*/
                        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_keys); if (unlikely(!__pyx_t_8)) __PYX_ERR(17, 6613, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_8);
                        __pyx_t_5 = PyObject_Length(__pyx_t_8); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(17, 6613, __pyx_L1_error)
                        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                        __pyx_t_6 = (__pyx_t_5 > 0);
                        if (__pyx_t_6) {
                        } else {
                          __pyx_t_11 = __pyx_t_6;
                          goto __pyx_L14_bool_binop_done;
                        }
                        __pyx_t_4 = __pyx_v_func;
                        __Pyx_INCREF(__pyx_t_4);
                        __pyx_t_12 = 0;
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_n_u_hash};
                          __pyx_t_8 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_startswith, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                          if (unlikely(!__pyx_t_8)) __PYX_ERR(17, 6613, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_8);
                        }
                        __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(17, 6613, __pyx_L1_error)
                        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                        __pyx_t_13 = (!__pyx_t_6);
                        __pyx_t_11 = __pyx_t_13;
                        __pyx_L14_bool_binop_done:;
                        if (__pyx_t_11) {

                          /* "pyarrow/table.pxi":6614
 *             # Ensure aggregate function is hash_ if needed
 *             if len(self.keys) > 0 and not func.startswith("hash_"):
 *                 func = "hash_" + func             # <<<<<<<<<<<<<<
 *             if len(self.keys) == 0 and func.startswith("hash_"):
 *                 func = func[5:]
*/
                          __pyx_t_8 = PyNumber_Add(__pyx_mstate_global->__pyx_n_u_hash, __pyx_v_func); if (unlikely(!__pyx_t_8)) __PYX_ERR(17, 6614, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_8);
                          __Pyx_DECREF_SET(__pyx_v_func, __pyx_t_8);
                          __pyx_t_8 = 0;

                          /* "pyarrow/table.pxi":6613
 *                 target = [target]
 *             # Ensure aggregate function is hash_ if needed
 *             if len(self.keys) > 0 and not func.startswith("hash_"):             # <<<<<<<<<<<<<<
 *                 func = "hash_" + func
 *             if len(self.keys) == 0 and func.startswith("hash_"):
*/
                        }

                        /* "pyarrow/table.pxi":6615
 *             if len(self.keys) > 0 and not func.startswith("hash_"):
 *                 func = "hash_" + func
 *             if len(self.keys) == 0 and func.startswith("hash_"):             # <<<<<<<<<<<<<<
 *                 func = func[5:]
 *             # Determine output field name
*/
                        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_keys); if (unlikely(!__pyx_t_8)) __PYX_ERR(17, 6615, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_8);
                        __pyx_t_5 = PyObject_Length(__pyx_t_8); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(17, 6615, __pyx_L1_error)
                        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                        __pyx_t_13 = (__pyx_t_5 == 0);
                        if (__pyx_t_13) {
                        } else {
                          __pyx_t_11 = __pyx_t_13;
                          goto __pyx_L17_bool_binop_done;
                        }
                        __pyx_t_4 = __pyx_v_func;
                        __Pyx_INCREF(__pyx_t_4);
                        __pyx_t_12 = 0;
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_n_u_hash};
                          __pyx_t_8 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_startswith, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                          if (unlikely(!__pyx_t_8)) __PYX_ERR(17, 6615, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_8);
                        }
                        __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(17, 6615, __pyx_L1_error)
                        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                        __pyx_t_11 = __pyx_t_13;
                        __pyx_L17_bool_binop_done:;
                        if (__pyx_t_11) {

                          /* "pyarrow/table.pxi":6616
 *                 func = "hash_" + func
 *             if len(self.keys) == 0 and func.startswith("hash_"):
 *                 func = func[5:]             # <<<<<<<<<<<<<<
 *             # Determine output field name
 *             func_nohash = func if not func.startswith("hash_") else func[5:]
*/
                          __pyx_t_8 = __Pyx_PyObject_GetSlice(__pyx_v_func, 5, 0, NULL, NULL, &__pyx_mstate_global->__pyx_slice[1], 1, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(17, 6616, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_8);
                          __Pyx_DECREF_SET(__pyx_v_func, __pyx_t_8);
                          __pyx_t_8 = 0;

                          /* "pyarrow/table.pxi":6615
 *             if len(self.keys) > 0 and not func.startswith("hash_"):
 *                 func = "hash_" + func
 *             if len(self.keys) == 0 and func.startswith("hash_"):             # <<<<<<<<<<<<<<
 *                 func = func[5:]
 *             # Determine output field name
*/
                        }

                        /* "pyarrow/table.pxi":6618
 *                 func = func[5:]
 *             # Determine output field name
 *             func_nohash = func if not func.startswith("hash_") else func[5:]             # <<<<<<<<<<<<<<
 *             if len(target) == 0:
 *                 aggr_name = func_nohash
*/
                        __pyx_t_7 = __pyx_v_func;
                        __Pyx_INCREF(__pyx_t_7);
                        __pyx_t_12 = 0;
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_mstate_global->__pyx_n_u_hash};
                          __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_startswith, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
                          if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 6618, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_4);
                        }
                        __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(17, 6618, __pyx_L1_error)
                        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                        __pyx_t_13 = (!__pyx_t_11);
                        if (__pyx_t_13) {
                          __Pyx_INCREF(__pyx_v_func);
                          __pyx_t_8 = __pyx_v_func;
                        } else {
                          __pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_v_func, 5, 0, NULL, NULL, &__pyx_mstate_global->__pyx_slice[1], 1, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 6618, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_4);
                          __pyx_t_8 = __pyx_t_4;
                          __pyx_t_4 = 0;
                        }
                        __Pyx_XDECREF_SET(__pyx_v_func_nohash, __pyx_t_8);
                        __pyx_t_8 = 0;

                        /* "pyarrow/table.pxi":6619
 *             # Determine output field name
 *             func_nohash = func if not func.startswith("hash_") else func[5:]
 *             if len(target) == 0:             # <<<<<<<<<<<<<<
 *                 aggr_name = func_nohash
 *             else:
*/
                        __pyx_t_5 = PyObject_Length(__pyx_v_target); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(17, 6619, __pyx_L1_error)
                        __pyx_t_13 = (__pyx_t_5 == 0);
                        if (__pyx_t_13) {

                          /* "pyarrow/table.pxi":6620
 *             func_nohash = func if not func.startswith("hash_") else func[5:]
 *             if len(target) == 0:
 *                 aggr_name = func_nohash             # <<<<<<<<<<<<<<
 *             else:
 *                 aggr_name = "_".join(target) + "_" + func_nohash
*/
                          __Pyx_INCREF(__pyx_v_func_nohash);
                          __Pyx_XDECREF_SET(__pyx_v_aggr_name, __pyx_v_func_nohash);

                          /* "pyarrow/table.pxi":6619
 *             # Determine output field name
 *             func_nohash = func if not func.startswith("hash_") else func[5:]
 *             if len(target) == 0:             # <<<<<<<<<<<<<<
 *                 aggr_name = func_nohash
 *             else:
*/
                          goto __pyx_L19;
                        }

                        /* "pyarrow/table.pxi":6622
 *                 aggr_name = func_nohash
 *             else:
 *                 aggr_name = "_".join(target) + "_" + func_nohash             # <<<<<<<<<<<<<<
 *             group_by_aggrs.append((target, func, opt, aggr_name))
 * 
*/
                        /*else*/ {
                          __pyx_t_8 = PyUnicode_Join(__pyx_mstate_global->__pyx_n_u__3, __pyx_v_target); if (unlikely(!__pyx_t_8)) __PYX_ERR(17, 6622, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_8);
                          __pyx_t_4 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_t_8, __pyx_mstate_global->__pyx_n_u__3); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 6622, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_4);
                          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                          __pyx_t_8 = PyNumber_Add(__pyx_t_4, __pyx_v_func_nohash); if (unlikely(!__pyx_t_8)) __PYX_ERR(17, 6622, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_8);
                          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                          __Pyx_XDECREF_SET(__pyx_v_aggr_name, __pyx_t_8);
                          __pyx_t_8 = 0;
                        }
                        __pyx_L19:;

                        /* "pyarrow/table.pxi":6623
 *             else:
 *                 aggr_name = "_".join(target) + "_" + func_nohash
 *             group_by_aggrs.append((target, func, opt, aggr_name))             # <<<<<<<<<<<<<<
 * 
 *         return _pac()._group_by(
*/
                        __pyx_t_8 = PyTuple_New(4); if (unlikely(!__pyx_t_8)) __PYX_ERR(17, 6623, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_8);
                        __Pyx_INCREF(__pyx_v_target);
                        __Pyx_GIVEREF(__pyx_v_target);
                        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_target) != (0)) __PYX_ERR(17, 6623, __pyx_L1_error);
                        __Pyx_INCREF(__pyx_v_func);
                        __Pyx_GIVEREF(__pyx_v_func);
                        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_func) != (0)) __PYX_ERR(17, 6623, __pyx_L1_error);
                        __Pyx_INCREF(__pyx_v_opt);
                        __Pyx_GIVEREF(__pyx_v_opt);
                        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_v_opt) != (0)) __PYX_ERR(17, 6623, __pyx_L1_error);
                        __Pyx_INCREF(__pyx_v_aggr_name);
                        __Pyx_GIVEREF(__pyx_v_aggr_name);
                        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 3, __pyx_v_aggr_name) != (0)) __PYX_ERR(17, 6623, __pyx_L1_error);
                        __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_group_by_aggrs, __pyx_t_8); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(17, 6623, __pyx_L1_error)
                        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

                        /* "pyarrow/table.pxi":6602
 *         """
 *         group_by_aggrs = []
 *         for aggr in aggregations:             # <<<<<<<<<<<<<<
 *             # Set opt to None if not specified
 *             if len(aggr) == 2:
*/
                      }
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

                      /* "pyarrow/table.pxi":6625
 *             group_by_aggrs.append((target, func, opt, aggr_name))
 * 
 *         return _pac()._group_by(             # <<<<<<<<<<<<<<
 *             self._table, group_by_aggrs, self.keys, use_threads=self._use_threads
 *         )
*/
                      __Pyx_XDECREF(__pyx_r);
                      __pyx_t_7 = NULL;
                      __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_pac_2); if (unlikely(!__pyx_t_10)) __PYX_ERR(17, 6625, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_10);
                      __pyx_t_12 = 1;
                      #if CYTHON_UNPACK_METHODS
                      if (unlikely(PyMethod_Check(__pyx_t_10))) {
                        __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_10);
                        assert(__pyx_t_7);
                        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_10);
                        __Pyx_INCREF(__pyx_t_7);
                        __Pyx_INCREF(__pyx__function);
                        __Pyx_DECREF_SET(__pyx_t_10, __pyx__function);
                        __pyx_t_12 = 0;
                      }
                      #endif
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL};
                        __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_10, __pyx_callargs+__pyx_t_12, (1-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
                        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                        if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 6625, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_4);
                      }
                      __pyx_t_8 = __pyx_t_4;
                      __Pyx_INCREF(__pyx_t_8);

                      /* "pyarrow/table.pxi":6626
 * 
 *         return _pac()._group_by(
 *             self._table, group_by_aggrs, self.keys, use_threads=self._use_threads             # <<<<<<<<<<<<<<
 *         )
*/
                      __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_table_2); if (unlikely(!__pyx_t_10)) __PYX_ERR(17, 6626, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_10);
                      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_keys); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 6626, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_7);
                      __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_use_threads_2); if (unlikely(!__pyx_t_15)) __PYX_ERR(17, 6626, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_15);
                      __pyx_t_12 = 0;
                      {
                        PyObject *__pyx_callargs[4 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_8, __pyx_t_10, __pyx_v_group_by_aggrs, __pyx_t_7};
                        __pyx_t_16 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_16)) __PYX_ERR(17, 6625, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_16);
                        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_use_threads, __pyx_t_15, __pyx_t_16, __pyx_callargs+4, 0) < (0)) __PYX_ERR(17, 6625, __pyx_L1_error)
                        __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_group_by, __pyx_callargs+__pyx_t_12, (4-__pyx_t_12) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_16);
                        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
                        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
                        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
                        __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
                        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 6625, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __pyx_r = __pyx_t_1;
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/table.pxi":6512
 *         self._use_threads = use_threads
 * 
 *     def aggregate(self, aggregations):             # <<<<<<<<<<<<<<
 *         """
 *         Perform an aggregation over the grouped columns of the table.
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_4);
                      __Pyx_XDECREF(__pyx_t_7);
                      __Pyx_XDECREF(__pyx_t_8);
                      __Pyx_XDECREF(__pyx_t_10);
                      __Pyx_XDECREF(__pyx_t_15);
                      __Pyx_XDECREF(__pyx_t_16);
                      __Pyx_AddTraceback("pyarrow.lib.TableGroupBy.aggregate", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XDECREF(__pyx_v_group_by_aggrs);
                      __Pyx_XDECREF(__pyx_v_aggr);
                      __Pyx_XDECREF(__pyx_v_target);
                      __Pyx_XDECREF(__pyx_v_func);
                      __Pyx_XDECREF(__pyx_v_opt);
                      __Pyx_XDECREF(__pyx_v_func_nohash);
                      __Pyx_XDECREF(__pyx_v_aggr_name);
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/tensor.pxi":38
 *     """
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         raise TypeError("Do not call Tensor's constructor directly, use one "
 *                         "of the `pyarrow.Tensor.from_*` functions instead.")
*/

                    /* Python wrapper */
                    static int __pyx_pw_7pyarrow_3lib_6Tensor_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
                    static int __pyx_pw_7pyarrow_3lib_6Tensor_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      int __pyx_r;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, __pyx_nargs); return -1; }
                      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
                      if (unlikely(__pyx_kwds_len < 0)) return -1;
                      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__init__", __pyx_kwds); return -1;}
                      __pyx_r = __pyx_pf_7pyarrow_3lib_6Tensor___init__(((struct __pyx_obj_7pyarrow_3lib_Tensor *)__pyx_v_self));

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

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

                      /* "pyarrow/tensor.pxi":39
 * 
 *     def __init__(self):
 *         raise TypeError("Do not call Tensor's constructor directly, use one "             # <<<<<<<<<<<<<<
 *                         "of the `pyarrow.Tensor.from_*` functions instead.")
 * 
*/
                      __pyx_t_2 = NULL;
                      __pyx_t_3 = 1;
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Do_not_call_Tensor_s_constructor};
                        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 39, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      __PYX_ERR(5, 39, __pyx_L1_error)

                      /* "pyarrow/tensor.pxi":38
 *     """
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         raise TypeError("Do not call Tensor's constructor directly, use one "
 *                         "of the `pyarrow.Tensor.from_*` functions instead.")
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_AddTraceback("pyarrow.lib.Tensor.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = -1;
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/tensor.pxi":42
 *                         "of the `pyarrow.Tensor.from_*` functions instead.")
 * 
 *     cdef void init(self, const shared_ptr[CTensor]& sp_tensor):             # <<<<<<<<<<<<<<
 *         self.sp_tensor = sp_tensor
 *         self.tp = sp_tensor.get()
*/

                    static void __pyx_f_7pyarrow_3lib_6Tensor_init(struct __pyx_obj_7pyarrow_3lib_Tensor *__pyx_v_self, std::shared_ptr< arrow::Tensor>  const &__pyx_v_sp_tensor) {
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      PyObject *__pyx_t_3 = NULL;
                      size_t __pyx_t_4;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("init", 0);

                      /* "pyarrow/tensor.pxi":43
 * 
 *     cdef void init(self, const shared_ptr[CTensor]& sp_tensor):
 *         self.sp_tensor = sp_tensor             # <<<<<<<<<<<<<<
 *         self.tp = sp_tensor.get()
 *         self.type = pyarrow_wrap_data_type(self.tp.type())
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_tensor");
                        __PYX_ERR(5, 43, __pyx_L1_error)
                      }
                      __pyx_v_self->sp_tensor = __pyx_v_sp_tensor;

                      /* "pyarrow/tensor.pxi":44
 *     cdef void init(self, const shared_ptr[CTensor]& sp_tensor):
 *         self.sp_tensor = sp_tensor
 *         self.tp = sp_tensor.get()             # <<<<<<<<<<<<<<
 *         self.type = pyarrow_wrap_data_type(self.tp.type())
 *         self._ssize_t_shape = self._make_shape_or_strides_buffer(self.shape)
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "tp");
                        __PYX_ERR(5, 44, __pyx_L1_error)
                      }
                      __pyx_v_self->tp = __pyx_v_sp_tensor.get();

                      /* "pyarrow/tensor.pxi":45
 *         self.sp_tensor = sp_tensor
 *         self.tp = sp_tensor.get()
 *         self.type = pyarrow_wrap_data_type(self.tp.type())             # <<<<<<<<<<<<<<
 *         self._ssize_t_shape = self._make_shape_or_strides_buffer(self.shape)
 *         self._ssize_t_strides = self._make_shape_or_strides_buffer(self.strides)
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "tp");
                        __PYX_ERR(5, 45, __pyx_L1_error)
                      }
                      __pyx_t_1 = pyarrow_wrap_data_type(__pyx_v_self->tp->type()); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 45, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType))))) __PYX_ERR(5, 45, __pyx_L1_error)
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "type");
                        __PYX_ERR(5, 45, __pyx_L1_error)
                      }
                      __Pyx_GIVEREF(__pyx_t_1);
                      __Pyx_GOTREF((PyObject *)__pyx_v_self->type);
                      __Pyx_DECREF((PyObject *)__pyx_v_self->type);
                      __pyx_v_self->type = ((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_t_1);
                      __pyx_t_1 = 0;

                      /* "pyarrow/tensor.pxi":46
 *         self.tp = sp_tensor.get()
 *         self.type = pyarrow_wrap_data_type(self.tp.type())
 *         self._ssize_t_shape = self._make_shape_or_strides_buffer(self.shape)             # <<<<<<<<<<<<<<
 *         self._ssize_t_strides = self._make_shape_or_strides_buffer(self.strides)
 * 
*/
                      __pyx_t_2 = ((PyObject *)__pyx_v_self);
                      __Pyx_INCREF(__pyx_t_2);
                      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_shape); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 46, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_3);
                      __pyx_t_4 = 0;
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
                        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_make_shape_or_strides_buffer, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 46, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(5, 46, __pyx_L1_error)
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_ssize_t_shape");
                        __PYX_ERR(5, 46, __pyx_L1_error)
                      }
                      __Pyx_GIVEREF(__pyx_t_1);
                      __Pyx_GOTREF(__pyx_v_self->_ssize_t_shape);
                      __Pyx_DECREF(__pyx_v_self->_ssize_t_shape);
                      __pyx_v_self->_ssize_t_shape = ((PyObject*)__pyx_t_1);
                      __pyx_t_1 = 0;

                      /* "pyarrow/tensor.pxi":47
 *         self.type = pyarrow_wrap_data_type(self.tp.type())
 *         self._ssize_t_shape = self._make_shape_or_strides_buffer(self.shape)
 *         self._ssize_t_strides = self._make_shape_or_strides_buffer(self.strides)             # <<<<<<<<<<<<<<
 * 
 *     def _make_shape_or_strides_buffer(self, values):
*/
                      __pyx_t_3 = ((PyObject *)__pyx_v_self);
                      __Pyx_INCREF(__pyx_t_3);
                      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_strides); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 47, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_2);
                      __pyx_t_4 = 0;
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_2};
                        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_make_shape_or_strides_buffer, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 47, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(5, 47, __pyx_L1_error)
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_ssize_t_strides");
                        __PYX_ERR(5, 47, __pyx_L1_error)
                      }
                      __Pyx_GIVEREF(__pyx_t_1);
                      __Pyx_GOTREF(__pyx_v_self->_ssize_t_strides);
                      __Pyx_DECREF(__pyx_v_self->_ssize_t_strides);
                      __pyx_v_self->_ssize_t_strides = ((PyObject*)__pyx_t_1);
                      __pyx_t_1 = 0;

                      /* "pyarrow/tensor.pxi":42
 *                         "of the `pyarrow.Tensor.from_*` functions instead.")
 * 
 *     cdef void init(self, const shared_ptr[CTensor]& sp_tensor):             # <<<<<<<<<<<<<<
 *         self.sp_tensor = sp_tensor
 *         self.tp = sp_tensor.get()
*/

                      /* function exit code */
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_AddTraceback("pyarrow.lib.Tensor.init", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_L0:;
                      __Pyx_RefNannyFinishContext();
                    }

                    /* "pyarrow/tensor.pxi":49
 *         self._ssize_t_strides = self._make_shape_or_strides_buffer(self.strides)
 * 
 *     def _make_shape_or_strides_buffer(self, values):             # <<<<<<<<<<<<<<
 *         """
 *         Make a bytes object holding an array of `values` cast to `Py_ssize_t`.
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_6Tensor_3_make_shape_or_strides_buffer(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_6Tensor_2_make_shape_or_strides_buffer, "Tensor._make_shape_or_strides_buffer(self, values)\n\nMake a bytes object holding an array of `values` cast to `Py_ssize_t`.");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_6Tensor_3_make_shape_or_strides_buffer = {"_make_shape_or_strides_buffer", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_6Tensor_3_make_shape_or_strides_buffer, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_6Tensor_2_make_shape_or_strides_buffer};
                    static PyObject *__pyx_pw_7pyarrow_3lib_6Tensor_3_make_shape_or_strides_buffer(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      PyObject *__pyx_v_values = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[1] = {0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("_make_shape_or_strides_buffer (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_values,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(5, 49, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(5, 49, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_make_shape_or_strides_buffer", 0) < (0)) __PYX_ERR(5, 49, __pyx_L3_error)
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_make_shape_or_strides_buffer", 1, 1, 1, i); __PYX_ERR(5, 49, __pyx_L3_error) }
                          }
                        } else if (unlikely(__pyx_nargs != 1)) {
                          goto __pyx_L5_argtuple_error;
                        } else {
                          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(5, 49, __pyx_L3_error)
                        }
                        __pyx_v_values = values[0];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("_make_shape_or_strides_buffer", 1, 1, 1, __pyx_nargs); __PYX_ERR(5, 49, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.Tensor._make_shape_or_strides_buffer", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_6Tensor_2_make_shape_or_strides_buffer(((struct __pyx_obj_7pyarrow_3lib_Tensor *)__pyx_v_self), __pyx_v_values);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_6Tensor_2_make_shape_or_strides_buffer(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_Tensor *__pyx_v_self, PyObject *__pyx_v_values) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      Py_ssize_t __pyx_t_3;
                      PyObject *__pyx_t_4 = NULL;
                      PyObject *__pyx_t_5 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("_make_shape_or_strides_buffer", 0);

                      /* "pyarrow/tensor.pxi":53
 *         Make a bytes object holding an array of `values` cast to `Py_ssize_t`.
 *         """
 *         return _struct.pack(f"{len(values)}n", *values)             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
*/
                      __Pyx_XDECREF(__pyx_r);
                      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_struct_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 53, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_pack); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 53, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_2);
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      __pyx_t_3 = PyObject_Length(__pyx_v_values); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(5, 53, __pyx_L1_error)
                      __pyx_t_1 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_t_3, 0, ' ', 'd'); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 53, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_t_4 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_n); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 53, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_4);
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 53, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __Pyx_GIVEREF(__pyx_t_4);
                      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4) != (0)) __PYX_ERR(5, 53, __pyx_L1_error);
                      __pyx_t_4 = 0;
                      __pyx_t_4 = __Pyx_PySequence_Tuple(__pyx_v_values); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 53, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_4);
                      __pyx_t_5 = PyNumber_Add(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 53, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_5);
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 53, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_4);
                      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                      __pyx_r = __pyx_t_4;
                      __pyx_t_4 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/tensor.pxi":49
 *         self._ssize_t_strides = self._make_shape_or_strides_buffer(self.strides)
 * 
 *     def _make_shape_or_strides_buffer(self, values):             # <<<<<<<<<<<<<<
 *         """
 *         Make a bytes object holding an array of `values` cast to `Py_ssize_t`.
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_XDECREF(__pyx_t_4);
                      __Pyx_XDECREF(__pyx_t_5);
                      __Pyx_AddTraceback("pyarrow.lib.Tensor._make_shape_or_strides_buffer", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/tensor.pxi":55
 *         return _struct.pack(f"{len(values)}n", *values)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return f"""<pyarrow.Tensor>
 * type: {self.type}
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_6Tensor_5__repr__(PyObject *__pyx_v_self); /*proto*/
                    static PyObject *__pyx_pw_7pyarrow_3lib_6Tensor_5__repr__(PyObject *__pyx_v_self) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_6Tensor_4__repr__(((struct __pyx_obj_7pyarrow_3lib_Tensor *)__pyx_v_self));

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

                    static PyObject *__pyx_pf_7pyarrow_3lib_6Tensor_4__repr__(struct __pyx_obj_7pyarrow_3lib_Tensor *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      PyObject *__pyx_t_3 = NULL;
                      PyObject *__pyx_t_4 = NULL;
                      PyObject *__pyx_t_5[6];
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__repr__", 0);

                      /* "pyarrow/tensor.pxi":56
 * 
 *     def __repr__(self):
 *         return f"""<pyarrow.Tensor>             # <<<<<<<<<<<<<<
 * type: {self.type}
 * shape: {self.shape}
*/
                      __Pyx_XDECREF(__pyx_r);

                      /* "pyarrow/tensor.pxi":57
 *     def __repr__(self):
 *         return f"""<pyarrow.Tensor>
 * type: {self.type}             # <<<<<<<<<<<<<<
 * shape: {self.shape}
 * strides: {self.strides}"""
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "type");
                        __PYX_ERR(5, 57, __pyx_L1_error)
                      }
                      __pyx_t_1 = __Pyx_PyObject_FormatSimple(((PyObject *)__pyx_v_self->type), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 57, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);

                      /* "pyarrow/tensor.pxi":58
 *         return f"""<pyarrow.Tensor>
 * type: {self.type}
 * shape: {self.shape}             # <<<<<<<<<<<<<<
 * strides: {self.strides}"""
 * 
*/
                      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_shape); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 58, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_2);
                      __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_t_2, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 58, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_3);
                      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

                      /* "pyarrow/tensor.pxi":59
 * type: {self.type}
 * shape: {self.shape}
 * strides: {self.strides}"""             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
*/
                      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_strides); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 59, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_2);
                      __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_2, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 59, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_4);
                      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                      __pyx_t_5[0] = __pyx_mstate_global->__pyx_kp_u_pyarrow_Tensor_type;
                      __pyx_t_5[1] = __pyx_t_1;
                      __pyx_t_5[2] = __pyx_mstate_global->__pyx_kp_u_shape_2;
                      __pyx_t_5[3] = __pyx_t_3;
                      __pyx_t_5[4] = __pyx_mstate_global->__pyx_kp_u_strides_2;
                      __pyx_t_5[5] = __pyx_t_4;

                      /* "pyarrow/tensor.pxi":56
 * 
 *     def __repr__(self):
 *         return f"""<pyarrow.Tensor>             # <<<<<<<<<<<<<<
 * type: {self.type}
 * shape: {self.shape}
*/
                      __pyx_t_2 = __Pyx_PyUnicode_Join(__pyx_t_5, 6, 23 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1) + 8 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + 10 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4));
                      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 56, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_2);
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                      __pyx_r = __pyx_t_2;
                      __pyx_t_2 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/tensor.pxi":55
 *         return _struct.pack(f"{len(values)}n", *values)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return f"""<pyarrow.Tensor>
 * type: {self.type}
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_XDECREF(__pyx_t_4);
                      __Pyx_AddTraceback("pyarrow.lib.Tensor.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/tensor.pxi":61
 * strides: {self.strides}"""
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_numpy(obj, dim_names=None):
 *         """
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_6Tensor_7from_numpy(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_6Tensor_6from_numpy, "Tensor.from_numpy(obj, dim_names=None)\n\nCreate a Tensor from a numpy array.\n\nParameters\n----------\nobj : numpy.ndarray\n    The source numpy array\ndim_names : list, optional\n    Names of each dimension of the Tensor.\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> import numpy as np\n>>> x = np.array([[2, 2, 4], [4, 5, 100]], np.int32)\n>>> pa.Tensor.from_numpy(x, dim_names=[\"dim1\",\"dim2\"])\n<pyarrow.Tensor>\ntype: int32\nshape: (2, 3)\nstrides: (12, 4)");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_6Tensor_7from_numpy = {"from_numpy", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_6Tensor_7from_numpy, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_6Tensor_6from_numpy};
                    static PyObject *__pyx_pw_7pyarrow_3lib_6Tensor_7from_numpy(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      PyObject *__pyx_v_obj = 0;
                      PyObject *__pyx_v_dim_names = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[2] = {0,0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("from_numpy (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_obj,&__pyx_mstate_global->__pyx_n_u_dim_names,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(5, 61, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  2:
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(5, 61, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(5, 61, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "from_numpy", 0) < (0)) __PYX_ERR(5, 61, __pyx_L3_error)

                          /* "pyarrow/tensor.pxi":62
 * 
 *     @staticmethod
 *     def from_numpy(obj, dim_names=None):             # <<<<<<<<<<<<<<
 *         """
 *         Create a Tensor from a numpy array.
*/
                          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("from_numpy", 0, 1, 2, i); __PYX_ERR(5, 61, __pyx_L3_error) }
                          }
                        } else {
                          switch (__pyx_nargs) {
                            case  2:
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(5, 61, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(5, 61, __pyx_L3_error)
                            break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
                        }
                        __pyx_v_obj = values[0];
                        __pyx_v_dim_names = values[1];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("from_numpy", 0, 1, 2, __pyx_nargs); __PYX_ERR(5, 61, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.Tensor.from_numpy", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_6Tensor_6from_numpy(__pyx_v_obj, __pyx_v_dim_names);

                      /* "pyarrow/tensor.pxi":61
 * strides: {self.strides}"""
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_numpy(obj, dim_names=None):
 *         """
*/

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_6Tensor_6from_numpy(PyObject *__pyx_v_obj, PyObject *__pyx_v_dim_names) {
                      std::vector<std::string>  __pyx_v_c_dim_names;
                      std::shared_ptr< arrow::Tensor>  __pyx_v_ctensor;
                      PyObject *__pyx_v_x = NULL;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_t_1;
                      PyObject *__pyx_t_2 = NULL;
                      Py_ssize_t __pyx_t_3;
                      PyObject *(*__pyx_t_4)(PyObject *);
                      PyObject *__pyx_t_5 = NULL;
                      PyObject *__pyx_t_6 = NULL;
                      PyObject *__pyx_t_7 = NULL;
                      size_t __pyx_t_8;
                      std::string __pyx_t_9;
                      int __pyx_t_10;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("from_numpy", 0);

                      /* "pyarrow/tensor.pxi":88
 *             shared_ptr[CTensor] ctensor
 * 
 *         if dim_names is not None:             # <<<<<<<<<<<<<<
 *             for x in dim_names:
 *                 c_dim_names.push_back(tobytes(x))
*/
                      __pyx_t_1 = (__pyx_v_dim_names != Py_None);
                      if (__pyx_t_1) {

                        /* "pyarrow/tensor.pxi":89
 * 
 *         if dim_names is not None:
 *             for x in dim_names:             # <<<<<<<<<<<<<<
 *                 c_dim_names.push_back(tobytes(x))
 * 
*/
                        if (likely(PyList_CheckExact(__pyx_v_dim_names)) || PyTuple_CheckExact(__pyx_v_dim_names)) {
                          __pyx_t_2 = __pyx_v_dim_names; __Pyx_INCREF(__pyx_t_2);
                          __pyx_t_3 = 0;
                          __pyx_t_4 = NULL;
                        } else {
                          __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_dim_names); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 89, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_2);
                          __pyx_t_4 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 89, __pyx_L1_error)
                        }
                        for (;;) {
                          if (likely(!__pyx_t_4)) {
                            if (likely(PyList_CheckExact(__pyx_t_2))) {
                              {
                                Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2);
                                #if !CYTHON_ASSUME_SAFE_SIZE
                                if (unlikely((__pyx_temp < 0))) __PYX_ERR(5, 89, __pyx_L1_error)
                                #endif
                                if (__pyx_t_3 >= __pyx_temp) break;
                              }
                              __pyx_t_5 = __Pyx_PyList_GetItemRefFast(__pyx_t_2, __pyx_t_3, __Pyx_ReferenceSharing_OwnStrongReference);
                              ++__pyx_t_3;
                            } else {
                              {
                                Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2);
                                #if !CYTHON_ASSUME_SAFE_SIZE
                                if (unlikely((__pyx_temp < 0))) __PYX_ERR(5, 89, __pyx_L1_error)
                                #endif
                                if (__pyx_t_3 >= __pyx_temp) break;
                              }
                              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                              __pyx_t_5 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3));
                              #else
                              __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_3);
                              #endif
                              ++__pyx_t_3;
                            }
                            if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 89, __pyx_L1_error)
                          } else {
                            __pyx_t_5 = __pyx_t_4(__pyx_t_2);
                            if (unlikely(!__pyx_t_5)) {
                              PyObject* exc_type = PyErr_Occurred();
                              if (exc_type) {
                                if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(5, 89, __pyx_L1_error)
                                PyErr_Clear();
                              }
                              break;
                            }
                          }
                          __Pyx_GOTREF(__pyx_t_5);
                          __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_5);
                          __pyx_t_5 = 0;

                          /* "pyarrow/tensor.pxi":90
 *         if dim_names is not None:
 *             for x in dim_names:
 *                 c_dim_names.push_back(tobytes(x))             # <<<<<<<<<<<<<<
 * 
 *         check_status(NdarrayToTensor(c_default_memory_pool(), obj,
*/
                          __pyx_t_6 = NULL;
                          __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_tobytes); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 90, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_7);
                          __pyx_t_8 = 1;
                          #if CYTHON_UNPACK_METHODS
                          if (unlikely(PyMethod_Check(__pyx_t_7))) {
                            __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
                            assert(__pyx_t_6);
                            PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
                            __Pyx_INCREF(__pyx_t_6);
                            __Pyx_INCREF(__pyx__function);
                            __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
                            __pyx_t_8 = 0;
                          }
                          #endif
                          {
                            PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_x};
                            __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                            __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
                            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
                            if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 90, __pyx_L1_error)
                            __Pyx_GOTREF(__pyx_t_5);
                          }
                          __pyx_t_9 = __pyx_convert_string_from_py_6libcpp_6string_std__in_string(__pyx_t_5); if (unlikely(PyErr_Occurred())) __PYX_ERR(5, 90, __pyx_L1_error)
                          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                          try {
                            __pyx_v_c_dim_names.push_back(__pyx_t_9);
                          } catch(...) {
                            __Pyx_CppExn2PyErr();
                            __PYX_ERR(5, 90, __pyx_L1_error)
                          }

                          /* "pyarrow/tensor.pxi":89
 * 
 *         if dim_names is not None:
 *             for x in dim_names:             # <<<<<<<<<<<<<<
 *                 c_dim_names.push_back(tobytes(x))
 * 
*/
                        }
                        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

                        /* "pyarrow/tensor.pxi":88
 *             shared_ptr[CTensor] ctensor
 * 
 *         if dim_names is not None:             # <<<<<<<<<<<<<<
 *             for x in dim_names:
 *                 c_dim_names.push_back(tobytes(x))
*/
                      }

                      /* "pyarrow/tensor.pxi":92
 *                 c_dim_names.push_back(tobytes(x))
 * 
 *         check_status(NdarrayToTensor(c_default_memory_pool(), obj,             # <<<<<<<<<<<<<<
 *                                      c_dim_names, &ctensor))
 *         return pyarrow_wrap_tensor(ctensor)
*/
                      __pyx_t_10 = __pyx_f_7pyarrow_3lib_check_status(arrow::py::NdarrayToTensor( arrow::default_memory_pool(), __pyx_v_obj, __pyx_v_c_dim_names, (&__pyx_v_ctensor))); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(5, 92, __pyx_L1_error)

                      /* "pyarrow/tensor.pxi":94
 *         check_status(NdarrayToTensor(c_default_memory_pool(), obj,
 *                                      c_dim_names, &ctensor))
 *         return pyarrow_wrap_tensor(ctensor)             # <<<<<<<<<<<<<<
 * 
 *     def to_numpy(self):
*/
                      __Pyx_XDECREF(__pyx_r);
                      __pyx_t_2 = pyarrow_wrap_tensor(__pyx_v_ctensor); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 94, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_2);
                      __pyx_r = __pyx_t_2;
                      __pyx_t_2 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/tensor.pxi":61
 * strides: {self.strides}"""
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_numpy(obj, dim_names=None):
 *         """
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_XDECREF(__pyx_t_5);
                      __Pyx_XDECREF(__pyx_t_6);
                      __Pyx_XDECREF(__pyx_t_7);
                      __Pyx_AddTraceback("pyarrow.lib.Tensor.from_numpy", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XDECREF(__pyx_v_x);
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/tensor.pxi":96
 *         return pyarrow_wrap_tensor(ctensor)
 * 
 *     def to_numpy(self):             # <<<<<<<<<<<<<<
 *         """
 *         Convert arrow::Tensor to numpy.ndarray with zero copy
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_6Tensor_9to_numpy(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_6Tensor_8to_numpy, "Tensor.to_numpy(self)\n\nConvert arrow::Tensor to numpy.ndarray with zero copy\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> import numpy as np\n>>> x = np.array([[2, 2, 4], [4, 5, 100]], np.int32)\n>>> tensor = pa.Tensor.from_numpy(x, dim_names=[\"dim1\",\"dim2\"])\n>>> tensor.to_numpy()\narray([[  2,   2,   4],\n       [  4,   5, 100]], dtype=int32)");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_6Tensor_9to_numpy = {"to_numpy", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_6Tensor_9to_numpy, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_6Tensor_8to_numpy};
                    static PyObject *__pyx_pw_7pyarrow_3lib_6Tensor_9to_numpy(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("to_numpy (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("to_numpy", 1, 0, 0, __pyx_nargs); return NULL; }
                      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                      if (unlikely(__pyx_kwds_len < 0)) return NULL;
                      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("to_numpy", __pyx_kwds); return NULL;}
                      __pyx_r = __pyx_pf_7pyarrow_3lib_6Tensor_8to_numpy(((struct __pyx_obj_7pyarrow_3lib_Tensor *)__pyx_v_self));

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

                    static PyObject *__pyx_pf_7pyarrow_3lib_6Tensor_8to_numpy(struct __pyx_obj_7pyarrow_3lib_Tensor *__pyx_v_self) {
                      PyObject *__pyx_v_out;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      int __pyx_t_2;
                      PyObject *__pyx_t_3 = NULL;
                      size_t __pyx_t_4;
                      int __pyx_t_5;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("to_numpy", 0);

                      /* "pyarrow/tensor.pxi":110
 *                [  4,   5, 100]], dtype=int32)
 *         """
 *         if np is None:             # <<<<<<<<<<<<<<
 *             raise ImportError(
 *                 "Cannot return a numpy.ndarray if NumPy is not present")
*/
                      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 110, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_t_2 = (__pyx_t_1 == Py_None);
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      if (unlikely(__pyx_t_2)) {

                        /* "pyarrow/tensor.pxi":111
 *         """
 *         if np is None:
 *             raise ImportError(             # <<<<<<<<<<<<<<
 *                 "Cannot return a numpy.ndarray if NumPy is not present")
 *         cdef PyObject* out
*/
                        __pyx_t_3 = NULL;
                        __pyx_t_4 = 1;
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Cannot_return_a_numpy_ndarray_if};
                          __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ImportError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                          if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 111, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_1);
                        }
                        __Pyx_Raise(__pyx_t_1, 0, 0, 0);
                        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                        __PYX_ERR(5, 111, __pyx_L1_error)

                        /* "pyarrow/tensor.pxi":110
 *                [  4,   5, 100]], dtype=int32)
 *         """
 *         if np is None:             # <<<<<<<<<<<<<<
 *             raise ImportError(
 *                 "Cannot return a numpy.ndarray if NumPy is not present")
*/
                      }

                      /* "pyarrow/tensor.pxi":115
 *         cdef PyObject* out
 * 
 *         check_status(TensorToNdarray(self.sp_tensor, self, &out))             # <<<<<<<<<<<<<<
 *         return PyObject_to_object(out)
 * 
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_tensor");
                        __PYX_ERR(5, 115, __pyx_L1_error)
                      }
                      __pyx_t_5 = __pyx_f_7pyarrow_3lib_check_status(arrow::py::TensorToNdarray(__pyx_v_self->sp_tensor, ((PyObject *)__pyx_v_self), (&__pyx_v_out))); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(5, 115, __pyx_L1_error)

                      /* "pyarrow/tensor.pxi":116
 * 
 *         check_status(TensorToNdarray(self.sp_tensor, self, &out))
 *         return PyObject_to_object(out)             # <<<<<<<<<<<<<<
 * 
 *     def equals(self, Tensor other):
*/
                      __Pyx_XDECREF(__pyx_r);
                      __pyx_t_1 = __pyx_f_7pyarrow_8includes_6common_PyObject_to_object(__pyx_v_out); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 116, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_r = __pyx_t_1;
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/tensor.pxi":96
 *         return pyarrow_wrap_tensor(ctensor)
 * 
 *     def to_numpy(self):             # <<<<<<<<<<<<<<
 *         """
 *         Convert arrow::Tensor to numpy.ndarray with zero copy
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_AddTraceback("pyarrow.lib.Tensor.to_numpy", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/tensor.pxi":118
 *         return PyObject_to_object(out)
 * 
 *     def equals(self, Tensor other):             # <<<<<<<<<<<<<<
 *         """
 *         Return true if the tensors contains exactly equal data.
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_6Tensor_11equals(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_6Tensor_10equals, "Tensor.equals(self, Tensor other)\n\nReturn true if the tensors contains exactly equal data.\n\nParameters\n----------\nother : Tensor\n    The other tensor to compare for equality.\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> import numpy as np\n>>> x = np.array([[2, 2, 4], [4, 5, 100]], np.int32)\n>>> tensor = pa.Tensor.from_numpy(x, dim_names=[\"dim1\",\"dim2\"])\n>>> y = np.array([[2, 2, 4], [4, 5, 10]], np.int32)\n>>> tensor2 = pa.Tensor.from_numpy(y, dim_names=[\"a\",\"b\"])\n>>> tensor.equals(tensor)\nTrue\n>>> tensor.equals(tensor2)\nFalse");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_6Tensor_11equals = {"equals", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_6Tensor_11equals, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_6Tensor_10equals};
                    static PyObject *__pyx_pw_7pyarrow_3lib_6Tensor_11equals(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      struct __pyx_obj_7pyarrow_3lib_Tensor *__pyx_v_other = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[1] = {0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("equals (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_other,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(5, 118, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(5, 118, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "equals", 0) < (0)) __PYX_ERR(5, 118, __pyx_L3_error)
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("equals", 1, 1, 1, i); __PYX_ERR(5, 118, __pyx_L3_error) }
                          }
                        } else if (unlikely(__pyx_nargs != 1)) {
                          goto __pyx_L5_argtuple_error;
                        } else {
                          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(5, 118, __pyx_L3_error)
                        }
                        __pyx_v_other = ((struct __pyx_obj_7pyarrow_3lib_Tensor *)values[0]);
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("equals", 1, 1, 1, __pyx_nargs); __PYX_ERR(5, 118, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.Tensor.equals", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Tensor, 1, "other", 0))) __PYX_ERR(5, 118, __pyx_L1_error)
                      __pyx_r = __pyx_pf_7pyarrow_3lib_6Tensor_10equals(((struct __pyx_obj_7pyarrow_3lib_Tensor *)__pyx_v_self), __pyx_v_other);

                      /* function exit code */
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __pyx_r = NULL;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      goto __pyx_L7_cleaned_up;
                      __pyx_L0:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __pyx_L7_cleaned_up:;
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_6Tensor_10equals(struct __pyx_obj_7pyarrow_3lib_Tensor *__pyx_v_self, struct __pyx_obj_7pyarrow_3lib_Tensor *__pyx_v_other) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("equals", 0);

                      /* "pyarrow/tensor.pxi":140
 *         False
 *         """
 *         return self.tp.Equals(deref(other.tp))             # <<<<<<<<<<<<<<
 * 
 *     def __eq__(self, other):
*/
                      __Pyx_XDECREF(__pyx_r);
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "tp");
                        __PYX_ERR(5, 140, __pyx_L1_error)
                      }
                      if (unlikely(((PyObject *)__pyx_v_other) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "tp");
                        __PYX_ERR(5, 140, __pyx_L1_error)
                      }
                      __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->tp->Equals((*__pyx_v_other->tp))); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 140, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_r = __pyx_t_1;
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/tensor.pxi":118
 *         return PyObject_to_object(out)
 * 
 *     def equals(self, Tensor other):             # <<<<<<<<<<<<<<
 *         """
 *         Return true if the tensors contains exactly equal data.
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_AddTraceback("pyarrow.lib.Tensor.equals", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/tensor.pxi":142
 *         return self.tp.Equals(deref(other.tp))
 * 
 *     def __eq__(self, other):             # <<<<<<<<<<<<<<
 *         if isinstance(other, Tensor):
 *             return self.equals(other)
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_6Tensor_13__eq__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
                    static PyObject *__pyx_pw_7pyarrow_3lib_6Tensor_13__eq__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__eq__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_6Tensor_12__eq__(((struct __pyx_obj_7pyarrow_3lib_Tensor *)__pyx_v_self), ((PyObject *)__pyx_v_other));

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

                    static PyObject *__pyx_pf_7pyarrow_3lib_6Tensor_12__eq__(struct __pyx_obj_7pyarrow_3lib_Tensor *__pyx_v_self, PyObject *__pyx_v_other) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_t_1;
                      PyObject *__pyx_t_2 = NULL;
                      PyObject *__pyx_t_3 = NULL;
                      size_t __pyx_t_4;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__eq__", 0);

                      /* "pyarrow/tensor.pxi":143
 * 
 *     def __eq__(self, other):
 *         if isinstance(other, Tensor):             # <<<<<<<<<<<<<<
 *             return self.equals(other)
 *         else:
*/
                      __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_other, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Tensor); 
                      if (__pyx_t_1) {

                        /* "pyarrow/tensor.pxi":144
 *     def __eq__(self, other):
 *         if isinstance(other, Tensor):
 *             return self.equals(other)             # <<<<<<<<<<<<<<
 *         else:
 *             return NotImplemented
*/
                        __Pyx_XDECREF(__pyx_r);
                        __pyx_t_3 = ((PyObject *)__pyx_v_self);
                        __Pyx_INCREF(__pyx_t_3);
                        __pyx_t_4 = 0;
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_other};
                          __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_equals, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                          if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 144, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_2);
                        }
                        __pyx_r = __pyx_t_2;
                        __pyx_t_2 = 0;
                        goto __pyx_L0;

                        /* "pyarrow/tensor.pxi":143
 * 
 *     def __eq__(self, other):
 *         if isinstance(other, Tensor):             # <<<<<<<<<<<<<<
 *             return self.equals(other)
 *         else:
*/
                      }

                      /* "pyarrow/tensor.pxi":146
 *             return self.equals(other)
 *         else:
 *             return NotImplemented             # <<<<<<<<<<<<<<
 * 
 *     def dim_name(self, i):
*/
                      /*else*/ {
                        __Pyx_XDECREF(__pyx_r);
                        __Pyx_INCREF(__pyx_builtin_NotImplemented);
                        __pyx_r = __pyx_builtin_NotImplemented;
                        goto __pyx_L0;
                      }

                      /* "pyarrow/tensor.pxi":142
 *         return self.tp.Equals(deref(other.tp))
 * 
 *     def __eq__(self, other):             # <<<<<<<<<<<<<<
 *         if isinstance(other, Tensor):
 *             return self.equals(other)
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_AddTraceback("pyarrow.lib.Tensor.__eq__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/tensor.pxi":148
 *             return NotImplemented
 * 
 *     def dim_name(self, i):             # <<<<<<<<<<<<<<
 *         """
 *         Returns the name of the i-th tensor dimension.
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_6Tensor_15dim_name(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_6Tensor_14dim_name, "Tensor.dim_name(self, i)\n\nReturns the name of the i-th tensor dimension.\n\nParameters\n----------\ni : int\n    The physical index of the tensor dimension.\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> import numpy as np\n>>> x = np.array([[2, 2, 4], [4, 5, 100]], np.int32)\n>>> tensor = pa.Tensor.from_numpy(x, dim_names=[\"dim1\",\"dim2\"])\n>>> tensor.dim_name(0)\n'dim1'\n>>> tensor.dim_name(1)\n'dim2'");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_6Tensor_15dim_name = {"dim_name", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_6Tensor_15dim_name, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_6Tensor_14dim_name};
                    static PyObject *__pyx_pw_7pyarrow_3lib_6Tensor_15dim_name(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      PyObject *__pyx_v_i = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[1] = {0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("dim_name (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_i,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(5, 148, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(5, 148, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "dim_name", 0) < (0)) __PYX_ERR(5, 148, __pyx_L3_error)
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("dim_name", 1, 1, 1, i); __PYX_ERR(5, 148, __pyx_L3_error) }
                          }
                        } else if (unlikely(__pyx_nargs != 1)) {
                          goto __pyx_L5_argtuple_error;
                        } else {
                          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(5, 148, __pyx_L3_error)
                        }
                        __pyx_v_i = values[0];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("dim_name", 1, 1, 1, __pyx_nargs); __PYX_ERR(5, 148, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.Tensor.dim_name", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_6Tensor_14dim_name(((struct __pyx_obj_7pyarrow_3lib_Tensor *)__pyx_v_self), __pyx_v_i);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_6Tensor_14dim_name(struct __pyx_obj_7pyarrow_3lib_Tensor *__pyx_v_self, PyObject *__pyx_v_i) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      PyObject *__pyx_t_3 = NULL;
                      int __pyx_t_4;
                      PyObject *__pyx_t_5 = NULL;
                      size_t __pyx_t_6;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("dim_name", 0);

                      /* "pyarrow/tensor.pxi":168
 *         'dim2'
 *         """
 *         return frombytes(self.tp.dim_name(i))             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
                      __Pyx_XDECREF(__pyx_r);
                      __pyx_t_2 = NULL;
                      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_frombytes); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 168, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_3);
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "tp");
                        __PYX_ERR(5, 168, __pyx_L1_error)
                      }
                      __pyx_t_4 = __Pyx_PyLong_As_int(__pyx_v_i); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(5, 168, __pyx_L1_error)
                      __pyx_t_5 = __pyx_convert_PyBytes_string_to_py_6libcpp_6string_std__in_string(__pyx_v_self->tp->dim_name(__pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 168, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_5);
                      __pyx_t_6 = 1;
                      #if CYTHON_UNPACK_METHODS
                      if (unlikely(PyMethod_Check(__pyx_t_3))) {
                        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
                        assert(__pyx_t_2);
                        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
                        __Pyx_INCREF(__pyx_t_2);
                        __Pyx_INCREF(__pyx__function);
                        __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
                        __pyx_t_6 = 0;
                      }
                      #endif
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_5};
                        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 168, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __pyx_r = __pyx_t_1;
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/tensor.pxi":148
 *             return NotImplemented
 * 
 *     def dim_name(self, i):             # <<<<<<<<<<<<<<
 *         """
 *         Returns the name of the i-th tensor dimension.
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_XDECREF(__pyx_t_5);
                      __Pyx_AddTraceback("pyarrow.lib.Tensor.dim_name", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/tensor.pxi":170
 *         return frombytes(self.tp.dim_name(i))
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def dim_names(self):
 *         """
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_6Tensor_9dim_names_1__get__(PyObject *__pyx_v_self); /*proto*/
                    static PyObject *__pyx_pw_7pyarrow_3lib_6Tensor_9dim_names_1__get__(PyObject *__pyx_v_self) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_6Tensor_9dim_names___get__(((struct __pyx_obj_7pyarrow_3lib_Tensor *)__pyx_v_self));

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

                    static PyObject *__pyx_pf_7pyarrow_3lib_6Tensor_9dim_names___get__(struct __pyx_obj_7pyarrow_3lib_Tensor *__pyx_v_self) {
                      PyObject *__pyx_9genexpr36__pyx_v_x = NULL;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      PyObject *__pyx_t_3 = NULL;
                      Py_ssize_t __pyx_t_4;
                      PyObject *__pyx_t_5 = NULL;
                      PyObject *__pyx_t_6 = NULL;
                      size_t __pyx_t_7;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__get__", 0);

                      /* "pyarrow/tensor.pxi":184
 *         ['dim1', 'dim2']
 *         """
 *         return [frombytes(x) for x in tuple(self.tp.dim_names())]             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
                      __Pyx_XDECREF(__pyx_r);
                      { /* enter inner scope */
                        __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 184, __pyx_L5_error)
                        __Pyx_GOTREF(__pyx_t_1);
                        if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "tp");
                          __PYX_ERR(5, 184, __pyx_L5_error)
                        }
                        __pyx_t_2 = __pyx_convert_vector_to_py_std_3a__3a_string(__pyx_v_self->tp->dim_names()); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 184, __pyx_L5_error)
                        __Pyx_GOTREF(__pyx_t_2);
                        __pyx_t_3 = __Pyx_PySequence_Tuple(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 184, __pyx_L5_error)
                        __Pyx_GOTREF(__pyx_t_3);
                        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                        __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2);
                        __pyx_t_4 = 0;
                        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                        for (;;) {
                          {
                            Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2);
                            #if !CYTHON_ASSUME_SAFE_SIZE
                            if (unlikely((__pyx_temp < 0))) __PYX_ERR(5, 184, __pyx_L5_error)
                            #endif
                            if (__pyx_t_4 >= __pyx_temp) break;
                          }
                          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                          __pyx_t_3 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4));
                          #else
                          __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_4);
                          #endif
                          ++__pyx_t_4;
                          if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 184, __pyx_L5_error)
                          __Pyx_GOTREF(__pyx_t_3);
                          __Pyx_XDECREF_SET(__pyx_9genexpr36__pyx_v_x, __pyx_t_3);
                          __pyx_t_3 = 0;
                          __pyx_t_5 = NULL;
                          __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_frombytes); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 184, __pyx_L5_error)
                          __Pyx_GOTREF(__pyx_t_6);
                          __pyx_t_7 = 1;
                          #if CYTHON_UNPACK_METHODS
                          if (unlikely(PyMethod_Check(__pyx_t_6))) {
                            __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
                            assert(__pyx_t_5);
                            PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
                            __Pyx_INCREF(__pyx_t_5);
                            __Pyx_INCREF(__pyx__function);
                            __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
                            __pyx_t_7 = 0;
                          }
                          #endif
                          {
                            PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_9genexpr36__pyx_v_x};
                            __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                            __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
                            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                            if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 184, __pyx_L5_error)
                            __Pyx_GOTREF(__pyx_t_3);
                          }
                          if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_3))) __PYX_ERR(5, 184, __pyx_L5_error)
                          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                        }
                        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                        __Pyx_XDECREF(__pyx_9genexpr36__pyx_v_x); __pyx_9genexpr36__pyx_v_x = 0;
                        goto __pyx_L9_exit_scope;
                        __pyx_L5_error:;
                        __Pyx_XDECREF(__pyx_9genexpr36__pyx_v_x); __pyx_9genexpr36__pyx_v_x = 0;
                        goto __pyx_L1_error;
                        __pyx_L9_exit_scope:;
                      } /* exit inner scope */
                      __pyx_r = __pyx_t_1;
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/tensor.pxi":170
 *         return frombytes(self.tp.dim_name(i))
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def dim_names(self):
 *         """
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_XDECREF(__pyx_t_5);
                      __Pyx_XDECREF(__pyx_t_6);
                      __Pyx_AddTraceback("pyarrow.lib.Tensor.dim_names.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XDECREF(__pyx_9genexpr36__pyx_v_x);
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/tensor.pxi":186
 *         return [frombytes(x) for x in tuple(self.tp.dim_names())]
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_mutable(self):
 *         """
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_6Tensor_10is_mutable_1__get__(PyObject *__pyx_v_self); /*proto*/
                    static PyObject *__pyx_pw_7pyarrow_3lib_6Tensor_10is_mutable_1__get__(PyObject *__pyx_v_self) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_6Tensor_10is_mutable___get__(((struct __pyx_obj_7pyarrow_3lib_Tensor *)__pyx_v_self));

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

                    static PyObject *__pyx_pf_7pyarrow_3lib_6Tensor_10is_mutable___get__(struct __pyx_obj_7pyarrow_3lib_Tensor *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__get__", 0);

                      /* "pyarrow/tensor.pxi":200
 *         True
 *         """
 *         return self.tp.is_mutable()             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
                      __Pyx_XDECREF(__pyx_r);
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "tp");
                        __PYX_ERR(5, 200, __pyx_L1_error)
                      }
                      __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->tp->is_mutable()); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 200, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_r = __pyx_t_1;
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/tensor.pxi":186
 *         return [frombytes(x) for x in tuple(self.tp.dim_names())]
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_mutable(self):
 *         """
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_AddTraceback("pyarrow.lib.Tensor.is_mutable.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/tensor.pxi":202
 *         return self.tp.is_mutable()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_contiguous(self):
 *         """
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_6Tensor_13is_contiguous_1__get__(PyObject *__pyx_v_self); /*proto*/
                    static PyObject *__pyx_pw_7pyarrow_3lib_6Tensor_13is_contiguous_1__get__(PyObject *__pyx_v_self) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_6Tensor_13is_contiguous___get__(((struct __pyx_obj_7pyarrow_3lib_Tensor *)__pyx_v_self));

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

                    static PyObject *__pyx_pf_7pyarrow_3lib_6Tensor_13is_contiguous___get__(struct __pyx_obj_7pyarrow_3lib_Tensor *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__get__", 0);

                      /* "pyarrow/tensor.pxi":216
 *         True
 *         """
 *         return self.tp.is_contiguous()             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
                      __Pyx_XDECREF(__pyx_r);
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "tp");
                        __PYX_ERR(5, 216, __pyx_L1_error)
                      }
                      __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->tp->is_contiguous()); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 216, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_r = __pyx_t_1;
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/tensor.pxi":202
 *         return self.tp.is_mutable()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_contiguous(self):
 *         """
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_AddTraceback("pyarrow.lib.Tensor.is_contiguous.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/tensor.pxi":218
 *         return self.tp.is_contiguous()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def ndim(self):
 *         """
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_6Tensor_4ndim_1__get__(PyObject *__pyx_v_self); /*proto*/
                    static PyObject *__pyx_pw_7pyarrow_3lib_6Tensor_4ndim_1__get__(PyObject *__pyx_v_self) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_6Tensor_4ndim___get__(((struct __pyx_obj_7pyarrow_3lib_Tensor *)__pyx_v_self));

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

                    static PyObject *__pyx_pf_7pyarrow_3lib_6Tensor_4ndim___get__(struct __pyx_obj_7pyarrow_3lib_Tensor *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__get__", 0);

                      /* "pyarrow/tensor.pxi":232
 *         2
 *         """
 *         return self.tp.ndim()             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
                      __Pyx_XDECREF(__pyx_r);
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "tp");
                        __PYX_ERR(5, 232, __pyx_L1_error)
                      }
                      __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_v_self->tp->ndim()); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 232, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_r = __pyx_t_1;
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/tensor.pxi":218
 *         return self.tp.is_contiguous()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def ndim(self):
 *         """
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_AddTraceback("pyarrow.lib.Tensor.ndim.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/tensor.pxi":234
 *         return self.tp.ndim()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def size(self):
 *         """
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_6Tensor_4size_1__get__(PyObject *__pyx_v_self); /*proto*/
                    static PyObject *__pyx_pw_7pyarrow_3lib_6Tensor_4size_1__get__(PyObject *__pyx_v_self) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_6Tensor_4size___get__(((struct __pyx_obj_7pyarrow_3lib_Tensor *)__pyx_v_self));

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

                    static PyObject *__pyx_pf_7pyarrow_3lib_6Tensor_4size___get__(struct __pyx_obj_7pyarrow_3lib_Tensor *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__get__", 0);

                      /* "pyarrow/tensor.pxi":248
 *         6
 *         """
 *         return self.tp.size()             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
                      __Pyx_XDECREF(__pyx_r);
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "tp");
                        __PYX_ERR(5, 248, __pyx_L1_error)
                      }
                      __pyx_t_1 = __Pyx_PyLong_From_int64_t(__pyx_v_self->tp->size()); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 248, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_r = __pyx_t_1;
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/tensor.pxi":234
 *         return self.tp.ndim()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def size(self):
 *         """
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_AddTraceback("pyarrow.lib.Tensor.size.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/tensor.pxi":250
 *         return self.tp.size()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def shape(self):
 *         """
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_6Tensor_5shape_1__get__(PyObject *__pyx_v_self); /*proto*/
                    static PyObject *__pyx_pw_7pyarrow_3lib_6Tensor_5shape_1__get__(PyObject *__pyx_v_self) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_6Tensor_5shape___get__(((struct __pyx_obj_7pyarrow_3lib_Tensor *)__pyx_v_self));

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

                    static PyObject *__pyx_pf_7pyarrow_3lib_6Tensor_5shape___get__(struct __pyx_obj_7pyarrow_3lib_Tensor *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__get__", 0);

                      /* "pyarrow/tensor.pxi":265
 *         """
 *         # Cython knows how to convert a vector[T] to a Python list
 *         return tuple(self.tp.shape())             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
                      __Pyx_XDECREF(__pyx_r);
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "tp");
                        __PYX_ERR(5, 265, __pyx_L1_error)
                      }
                      __pyx_t_1 = __pyx_convert_vector_to_py_int64_t(__pyx_v_self->tp->shape()); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 265, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_t_2 = __Pyx_PySequence_Tuple(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 265, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_2);
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      __pyx_r = __pyx_t_2;
                      __pyx_t_2 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/tensor.pxi":250
 *         return self.tp.size()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def shape(self):
 *         """
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_AddTraceback("pyarrow.lib.Tensor.shape.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/tensor.pxi":267
 *         return tuple(self.tp.shape())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def strides(self):
 *         """
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_6Tensor_7strides_1__get__(PyObject *__pyx_v_self); /*proto*/
                    static PyObject *__pyx_pw_7pyarrow_3lib_6Tensor_7strides_1__get__(PyObject *__pyx_v_self) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_6Tensor_7strides___get__(((struct __pyx_obj_7pyarrow_3lib_Tensor *)__pyx_v_self));

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

                    static PyObject *__pyx_pf_7pyarrow_3lib_6Tensor_7strides___get__(struct __pyx_obj_7pyarrow_3lib_Tensor *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__get__", 0);

                      /* "pyarrow/tensor.pxi":281
 *         (12, 4)
 *         """
 *         return tuple(self.tp.strides())             # <<<<<<<<<<<<<<
 * 
 *     def __getbuffer__(self, cp.Py_buffer* buffer, int flags):
*/
                      __Pyx_XDECREF(__pyx_r);
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "tp");
                        __PYX_ERR(5, 281, __pyx_L1_error)
                      }
                      __pyx_t_1 = __pyx_convert_vector_to_py_int64_t(__pyx_v_self->tp->strides()); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 281, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_t_2 = __Pyx_PySequence_Tuple(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 281, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_2);
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      __pyx_r = __pyx_t_2;
                      __pyx_t_2 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/tensor.pxi":267
 *         return tuple(self.tp.shape())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def strides(self):
 *         """
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_AddTraceback("pyarrow.lib.Tensor.strides.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/tensor.pxi":283
 *         return tuple(self.tp.strides())
 * 
 *     def __getbuffer__(self, cp.Py_buffer* buffer, int flags):             # <<<<<<<<<<<<<<
 *         buffer.buf = <char *> self.tp.data().get().data()
 *         pep3118_format = self.type.pep3118_format
*/

                    /* Python wrapper */
                    CYTHON_UNUSED static int __pyx_pw_7pyarrow_3lib_6Tensor_17__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_buffer, int __pyx_v_flags); /*proto*/
                    CYTHON_UNUSED static int __pyx_pw_7pyarrow_3lib_6Tensor_17__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_buffer, int __pyx_v_flags) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      int __pyx_r;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_6Tensor_16__getbuffer__(((struct __pyx_obj_7pyarrow_3lib_Tensor *)__pyx_v_self), ((Py_buffer *)__pyx_v_buffer), ((int)__pyx_v_flags));

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

                    static int __pyx_pf_7pyarrow_3lib_6Tensor_16__getbuffer__(struct __pyx_obj_7pyarrow_3lib_Tensor *__pyx_v_self, Py_buffer *__pyx_v_buffer, CYTHON_UNUSED int __pyx_v_flags) {
                      PyObject *__pyx_v_pep3118_format = NULL;
                      int __pyx_r;
                      __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[3];
                      PyObject *__pyx_t_6 = NULL;
                      size_t __pyx_t_7;
                      char *__pyx_t_8;
                      Py_ssize_t __pyx_t_9;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      if (unlikely(__pyx_v_buffer == NULL)) {
                        PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete");
                        return -1;
                      }
                      __Pyx_RefNannySetupContext("__getbuffer__", 0);
                      __pyx_v_buffer->obj = Py_None; __Pyx_INCREF(Py_None);
                      __Pyx_GIVEREF(__pyx_v_buffer->obj);

                      /* "pyarrow/tensor.pxi":284
 * 
 *     def __getbuffer__(self, cp.Py_buffer* buffer, int flags):
 *         buffer.buf = <char *> self.tp.data().get().data()             # <<<<<<<<<<<<<<
 *         pep3118_format = self.type.pep3118_format
 *         if pep3118_format is None:
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "tp");
                        __PYX_ERR(5, 284, __pyx_L1_error)
                      }
                      __pyx_v_buffer->buf = ((char *)__pyx_v_self->tp->data().get()->data());

                      /* "pyarrow/tensor.pxi":285
 *     def __getbuffer__(self, cp.Py_buffer* buffer, int flags):
 *         buffer.buf = <char *> self.tp.data().get().data()
 *         pep3118_format = self.type.pep3118_format             # <<<<<<<<<<<<<<
 *         if pep3118_format is None:
 *             raise NotImplementedError("type %s not supported for buffer "
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "type");
                        __PYX_ERR(5, 285, __pyx_L1_error)
                      }
                      if (unlikely(((PyObject *)__pyx_v_self->type) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "pep3118_format");
                        __PYX_ERR(5, 285, __pyx_L1_error)
                      }
                      __pyx_t_1 = __pyx_v_self->type->pep3118_format;
                      __Pyx_INCREF(__pyx_t_1);
                      __pyx_v_pep3118_format = ((PyObject*)__pyx_t_1);
                      __pyx_t_1 = 0;

                      /* "pyarrow/tensor.pxi":286
 *         buffer.buf = <char *> self.tp.data().get().data()
 *         pep3118_format = self.type.pep3118_format
 *         if pep3118_format is None:             # <<<<<<<<<<<<<<
 *             raise NotImplementedError("type %s not supported for buffer "
 *                                       "protocol" % (self.type,))
*/
                      __pyx_t_2 = (__pyx_v_pep3118_format == ((PyObject*)Py_None));
                      if (unlikely(__pyx_t_2)) {

                        /* "pyarrow/tensor.pxi":287
 *         pep3118_format = self.type.pep3118_format
 *         if pep3118_format is None:
 *             raise NotImplementedError("type %s not supported for buffer "             # <<<<<<<<<<<<<<
 *                                       "protocol" % (self.type,))
 *         buffer.format = pep3118_format
*/
                        __pyx_t_3 = NULL;

                        /* "pyarrow/tensor.pxi":288
 *         if pep3118_format is None:
 *             raise NotImplementedError("type %s not supported for buffer "
 *                                       "protocol" % (self.type,))             # <<<<<<<<<<<<<<
 *         buffer.format = pep3118_format
 *         buffer.itemsize = self.type.bit_width // 8
*/
                        if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "type");
                          __PYX_ERR(5, 288, __pyx_L1_error)
                        }
                        __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(((PyObject *)__pyx_v_self->type)), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 288, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_4);
                        __pyx_t_5[0] = __pyx_mstate_global->__pyx_kp_u_type_2;
                        __pyx_t_5[1] = __pyx_t_4;
                        __pyx_t_5[2] = __pyx_mstate_global->__pyx_kp_u_not_supported_for_buffer_protoc;

                        /* "pyarrow/tensor.pxi":287
 *         pep3118_format = self.type.pep3118_format
 *         if pep3118_format is None:
 *             raise NotImplementedError("type %s not supported for buffer "             # <<<<<<<<<<<<<<
 *                                       "protocol" % (self.type,))
 *         buffer.format = pep3118_format
*/
                        __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_5, 3, 5 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + 34, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4));
                        if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 287, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_6);
                        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                        __pyx_t_7 = 1;
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_6};
                          __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_NotImplementedError)), __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                          if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 287, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_1);
                        }
                        __Pyx_Raise(__pyx_t_1, 0, 0, 0);
                        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                        __PYX_ERR(5, 287, __pyx_L1_error)

                        /* "pyarrow/tensor.pxi":286
 *         buffer.buf = <char *> self.tp.data().get().data()
 *         pep3118_format = self.type.pep3118_format
 *         if pep3118_format is None:             # <<<<<<<<<<<<<<
 *             raise NotImplementedError("type %s not supported for buffer "
 *                                       "protocol" % (self.type,))
*/
                      }

                      /* "pyarrow/tensor.pxi":289
 *             raise NotImplementedError("type %s not supported for buffer "
 *                                       "protocol" % (self.type,))
 *         buffer.format = pep3118_format             # <<<<<<<<<<<<<<
 *         buffer.itemsize = self.type.bit_width // 8
 *         buffer.internal = NULL
*/
                      if (unlikely(__pyx_v_pep3118_format == Py_None)) {
                        PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
                        __PYX_ERR(5, 289, __pyx_L1_error)
                      }
                      __pyx_t_8 = __Pyx_PyBytes_AsWritableString(__pyx_v_pep3118_format); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) __PYX_ERR(5, 289, __pyx_L1_error)
                      __pyx_v_buffer->format = __pyx_t_8;

                      /* "pyarrow/tensor.pxi":290
 *                                       "protocol" % (self.type,))
 *         buffer.format = pep3118_format
 *         buffer.itemsize = self.type.bit_width // 8             # <<<<<<<<<<<<<<
 *         buffer.internal = NULL
 *         buffer.len = self.tp.size() * buffer.itemsize
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "type");
                        __PYX_ERR(5, 290, __pyx_L1_error)
                      }
                      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->type), __pyx_mstate_global->__pyx_n_u_bit_width); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 290, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_t_6 = __Pyx_PyLong_FloorDivideObjC(__pyx_t_1, __pyx_mstate_global->__pyx_int_8, 8, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 290, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_6);
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(5, 290, __pyx_L1_error)
                      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                      __pyx_v_buffer->itemsize = __pyx_t_9;

                      /* "pyarrow/tensor.pxi":291
 *         buffer.format = pep3118_format
 *         buffer.itemsize = self.type.bit_width // 8
 *         buffer.internal = NULL             # <<<<<<<<<<<<<<
 *         buffer.len = self.tp.size() * buffer.itemsize
 *         buffer.ndim = self.tp.ndim()
*/
                      __pyx_v_buffer->internal = NULL;

                      /* "pyarrow/tensor.pxi":292
 *         buffer.itemsize = self.type.bit_width // 8
 *         buffer.internal = NULL
 *         buffer.len = self.tp.size() * buffer.itemsize             # <<<<<<<<<<<<<<
 *         buffer.ndim = self.tp.ndim()
 *         buffer.obj = self
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "tp");
                        __PYX_ERR(5, 292, __pyx_L1_error)
                      }
                      __pyx_v_buffer->len = (__pyx_v_self->tp->size() * __pyx_v_buffer->itemsize);

                      /* "pyarrow/tensor.pxi":293
 *         buffer.internal = NULL
 *         buffer.len = self.tp.size() * buffer.itemsize
 *         buffer.ndim = self.tp.ndim()             # <<<<<<<<<<<<<<
 *         buffer.obj = self
 *         if self.tp.is_mutable():
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "tp");
                        __PYX_ERR(5, 293, __pyx_L1_error)
                      }
                      __pyx_v_buffer->ndim = __pyx_v_self->tp->ndim();

                      /* "pyarrow/tensor.pxi":294
 *         buffer.len = self.tp.size() * buffer.itemsize
 *         buffer.ndim = self.tp.ndim()
 *         buffer.obj = self             # <<<<<<<<<<<<<<
 *         if self.tp.is_mutable():
 *             buffer.readonly = 0
*/
                      __Pyx_INCREF((PyObject *)__pyx_v_self);
                      __Pyx_GIVEREF((PyObject *)__pyx_v_self);
                      __Pyx_GOTREF(__pyx_v_buffer->obj);
                      __Pyx_DECREF(__pyx_v_buffer->obj);
                      __pyx_v_buffer->obj = ((PyObject *)__pyx_v_self);

                      /* "pyarrow/tensor.pxi":295
 *         buffer.ndim = self.tp.ndim()
 *         buffer.obj = self
 *         if self.tp.is_mutable():             # <<<<<<<<<<<<<<
 *             buffer.readonly = 0
 *         else:
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "tp");
                        __PYX_ERR(5, 295, __pyx_L1_error)
                      }
                      __pyx_t_2 = (__pyx_v_self->tp->is_mutable() != 0);
                      if (__pyx_t_2) {

                        /* "pyarrow/tensor.pxi":296
 *         buffer.obj = self
 *         if self.tp.is_mutable():
 *             buffer.readonly = 0             # <<<<<<<<<<<<<<
 *         else:
 *             buffer.readonly = 1
*/
                        __pyx_v_buffer->readonly = 0;

                        /* "pyarrow/tensor.pxi":295
 *         buffer.ndim = self.tp.ndim()
 *         buffer.obj = self
 *         if self.tp.is_mutable():             # <<<<<<<<<<<<<<
 *             buffer.readonly = 0
 *         else:
*/
                        goto __pyx_L4;
                      }

                      /* "pyarrow/tensor.pxi":298
 *             buffer.readonly = 0
 *         else:
 *             buffer.readonly = 1             # <<<<<<<<<<<<<<
 *         buffer.shape = <Py_ssize_t *> cp.PyBytes_AsString(self._ssize_t_shape)
 *         buffer.strides = <Py_ssize_t *> cp.PyBytes_AsString(self._ssize_t_strides)
*/
                      /*else*/ {
                        __pyx_v_buffer->readonly = 1;
                      }
                      __pyx_L4:;

                      /* "pyarrow/tensor.pxi":299
 *         else:
 *             buffer.readonly = 1
 *         buffer.shape = <Py_ssize_t *> cp.PyBytes_AsString(self._ssize_t_shape)             # <<<<<<<<<<<<<<
 *         buffer.strides = <Py_ssize_t *> cp.PyBytes_AsString(self._ssize_t_strides)
 *         buffer.suboffsets = NULL
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_ssize_t_shape");
                        __PYX_ERR(5, 299, __pyx_L1_error)
                      }
                      __pyx_t_6 = __pyx_v_self->_ssize_t_shape;
                      __Pyx_INCREF(__pyx_t_6);
                      __pyx_t_8 = PyBytes_AsString(__pyx_t_6); if (unlikely(__pyx_t_8 == ((void *)NULL))) __PYX_ERR(5, 299, __pyx_L1_error)
                      __pyx_v_buffer->shape = ((Py_ssize_t *)__pyx_t_8);
                      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

                      /* "pyarrow/tensor.pxi":300
 *             buffer.readonly = 1
 *         buffer.shape = <Py_ssize_t *> cp.PyBytes_AsString(self._ssize_t_shape)
 *         buffer.strides = <Py_ssize_t *> cp.PyBytes_AsString(self._ssize_t_strides)             # <<<<<<<<<<<<<<
 *         buffer.suboffsets = NULL
 * 
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_ssize_t_strides");
                        __PYX_ERR(5, 300, __pyx_L1_error)
                      }
                      __pyx_t_6 = __pyx_v_self->_ssize_t_strides;
                      __Pyx_INCREF(__pyx_t_6);
                      __pyx_t_8 = PyBytes_AsString(__pyx_t_6); if (unlikely(__pyx_t_8 == ((void *)NULL))) __PYX_ERR(5, 300, __pyx_L1_error)
                      __pyx_v_buffer->strides = ((Py_ssize_t *)__pyx_t_8);
                      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

                      /* "pyarrow/tensor.pxi":301
 *         buffer.shape = <Py_ssize_t *> cp.PyBytes_AsString(self._ssize_t_shape)
 *         buffer.strides = <Py_ssize_t *> cp.PyBytes_AsString(self._ssize_t_strides)
 *         buffer.suboffsets = NULL             # <<<<<<<<<<<<<<
 * 
 *     def __dlpack__(self, stream=None):
*/
                      __pyx_v_buffer->suboffsets = NULL;

                      /* "pyarrow/tensor.pxi":283
 *         return tuple(self.tp.strides())
 * 
 *     def __getbuffer__(self, cp.Py_buffer* buffer, int flags):             # <<<<<<<<<<<<<<
 *         buffer.buf = <char *> self.tp.data().get().data()
 *         pep3118_format = self.type.pep3118_format
*/

                      /* function exit code */
                      __pyx_r = 0;
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_XDECREF(__pyx_t_4);
                      __Pyx_XDECREF(__pyx_t_6);
                      __Pyx_AddTraceback("pyarrow.lib.Tensor.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = -1;
                      if (__pyx_v_buffer->obj != NULL) {
                        __Pyx_GOTREF(__pyx_v_buffer->obj);
                        __Pyx_DECREF(__pyx_v_buffer->obj); __pyx_v_buffer->obj = 0;
                      }
                      goto __pyx_L2;
                      __pyx_L0:;
                      if (__pyx_v_buffer->obj == Py_None) {
                        __Pyx_GOTREF(__pyx_v_buffer->obj);
                        __Pyx_DECREF(__pyx_v_buffer->obj); __pyx_v_buffer->obj = 0;
                      }
                      __pyx_L2:;
                      __Pyx_XDECREF(__pyx_v_pep3118_format);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/tensor.pxi":303
 *         buffer.suboffsets = NULL
 * 
 *     def __dlpack__(self, stream=None):             # <<<<<<<<<<<<<<
 *         """
 *         Export a Tensor as a DLPack capsule.
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_6Tensor_19__dlpack__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_6Tensor_18__dlpack__, "Tensor.__dlpack__(self, stream=None)\n\nExport a Tensor as a DLPack capsule.\n\nParameters\n----------\nstream : int, optional\n    A Python integer representing a pointer to a stream. Currently not supported.\n    Stream is provided by the consumer to the producer to instruct the producer\n    to ensure that operations can safely be performed on the array.\n\nReturns\n-------\ncapsule : PyCapsule\n    A DLPack capsule for the tensor, pointing to a DLManagedTensor.");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_6Tensor_19__dlpack__ = {"__dlpack__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_6Tensor_19__dlpack__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_6Tensor_18__dlpack__};
                    static PyObject *__pyx_pw_7pyarrow_3lib_6Tensor_19__dlpack__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      PyObject *__pyx_v_stream = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[1] = {0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__dlpack__ (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_stream,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(5, 303, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(5, 303, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__dlpack__", 0) < (0)) __PYX_ERR(5, 303, __pyx_L3_error)
                          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
                        } else {
                          switch (__pyx_nargs) {
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(5, 303, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
                        }
                        __pyx_v_stream = values[0];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("__dlpack__", 0, 0, 1, __pyx_nargs); __PYX_ERR(5, 303, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.Tensor.__dlpack__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_6Tensor_18__dlpack__(((struct __pyx_obj_7pyarrow_3lib_Tensor *)__pyx_v_self), __pyx_v_stream);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_6Tensor_18__dlpack__(struct __pyx_obj_7pyarrow_3lib_Tensor *__pyx_v_self, PyObject *__pyx_v_stream) {
                      DLManagedTensor *__pyx_v_dlm_tensor;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_t_1;
                      DLManagedTensor *__pyx_t_2;
                      PyObject *__pyx_t_3 = NULL;
                      PyObject *__pyx_t_4 = NULL;
                      size_t __pyx_t_5;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__dlpack__", 0);

                      /* "pyarrow/tensor.pxi":319
 *             A DLPack capsule for the tensor, pointing to a DLManagedTensor.
 *         """
 *         if stream is None:             # <<<<<<<<<<<<<<
 *             dlm_tensor = GetResultValue(ExportTensorToDLPack(self.sp_tensor))
 * 
*/
                      __pyx_t_1 = (__pyx_v_stream == Py_None);
                      if (likely(__pyx_t_1)) {

                        /* "pyarrow/tensor.pxi":320
 *         """
 *         if stream is None:
 *             dlm_tensor = GetResultValue(ExportTensorToDLPack(self.sp_tensor))             # <<<<<<<<<<<<<<
 * 
 *             return PyCapsule_New(dlm_tensor, 'dltensor', dlpack_pycapsule_deleter)
*/
                        if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_tensor");
                          __PYX_ERR(5, 320, __pyx_L1_error)
                        }
                        __pyx_t_2 = arrow::py::GetResultValue<DLManagedTensor *>( arrow::dlpack::ExportTensor(__pyx_v_self->sp_tensor)); if (unlikely(PyErr_Occurred())) __PYX_ERR(5, 320, __pyx_L1_error)
                        __pyx_v_dlm_tensor = __pyx_t_2;

                        /* "pyarrow/tensor.pxi":322
 *             dlm_tensor = GetResultValue(ExportTensorToDLPack(self.sp_tensor))
 * 
 *             return PyCapsule_New(dlm_tensor, 'dltensor', dlpack_pycapsule_deleter)             # <<<<<<<<<<<<<<
 *         else:
 *             raise NotImplementedError(
*/
                        __Pyx_XDECREF(__pyx_r);
                        __pyx_t_3 = PyCapsule_New(__pyx_v_dlm_tensor, __pyx_k_dltensor, __pyx_f_7pyarrow_3lib_dlpack_pycapsule_deleter); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 322, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_3);
                        __pyx_r = __pyx_t_3;
                        __pyx_t_3 = 0;
                        goto __pyx_L0;

                        /* "pyarrow/tensor.pxi":319
 *             A DLPack capsule for the tensor, pointing to a DLManagedTensor.
 *         """
 *         if stream is None:             # <<<<<<<<<<<<<<
 *             dlm_tensor = GetResultValue(ExportTensorToDLPack(self.sp_tensor))
 * 
*/
                      }

                      /* "pyarrow/tensor.pxi":324
 *             return PyCapsule_New(dlm_tensor, 'dltensor', dlpack_pycapsule_deleter)
 *         else:
 *             raise NotImplementedError(             # <<<<<<<<<<<<<<
 *                 "Only stream=None is supported."
 *             )
*/
                      /*else*/ {
                        __pyx_t_4 = NULL;
                        __pyx_t_5 = 1;
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Only_stream_None_is_supported};
                          __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_NotImplementedError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                          if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 324, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_3);
                        }
                        __Pyx_Raise(__pyx_t_3, 0, 0, 0);
                        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                        __PYX_ERR(5, 324, __pyx_L1_error)
                      }

                      /* "pyarrow/tensor.pxi":303
 *         buffer.suboffsets = NULL
 * 
 *     def __dlpack__(self, stream=None):             # <<<<<<<<<<<<<<
 *         """
 *         Export a Tensor as a DLPack capsule.
*/

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

                    /* "pyarrow/tensor.pxi":328
 *             )
 * 
 *     def __dlpack_device__(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the DLPack device tuple this tensor resides on.
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_6Tensor_21__dlpack_device__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_6Tensor_20__dlpack_device__, "Tensor.__dlpack_device__(self)\n\nReturn the DLPack device tuple this tensor resides on.\n\nReturns\n-------\ntuple : Tuple[int, int]\n    Tuple with index specifying the type of the device (where\n    CPU = 1, see cpp/src/arrow/c/dpack_abi.h) and index of the\n    device which is 0 by default for CPU.");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_6Tensor_21__dlpack_device__ = {"__dlpack_device__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_6Tensor_21__dlpack_device__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_6Tensor_20__dlpack_device__};
                    static PyObject *__pyx_pw_7pyarrow_3lib_6Tensor_21__dlpack_device__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__dlpack_device__ (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__dlpack_device__", 1, 0, 0, __pyx_nargs); return NULL; }
                      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                      if (unlikely(__pyx_kwds_len < 0)) return NULL;
                      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__dlpack_device__", __pyx_kwds); return NULL;}
                      __pyx_r = __pyx_pf_7pyarrow_3lib_6Tensor_20__dlpack_device__(((struct __pyx_obj_7pyarrow_3lib_Tensor *)__pyx_v_self));

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

                    static PyObject *__pyx_pf_7pyarrow_3lib_6Tensor_20__dlpack_device__(struct __pyx_obj_7pyarrow_3lib_Tensor *__pyx_v_self) {
                      DLDevice __pyx_v_device;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      DLDevice __pyx_t_1;
                      PyObject *__pyx_t_2 = NULL;
                      PyObject *__pyx_t_3 = NULL;
                      PyObject *__pyx_t_4 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__dlpack_device__", 0);

                      /* "pyarrow/tensor.pxi":339
 *             device which is 0 by default for CPU.
 *         """
 *         device = GetResultValue(ExportDevice(self.sp_tensor))             # <<<<<<<<<<<<<<
 *         return device.device_type, device.device_id
 * 
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_tensor");
                        __PYX_ERR(5, 339, __pyx_L1_error)
                      }
                      __pyx_t_1 = arrow::py::GetResultValue<DLDevice>(arrow::dlpack::ExportDevice(__pyx_v_self->sp_tensor)); if (unlikely(PyErr_Occurred())) __PYX_ERR(5, 339, __pyx_L1_error)
                      __pyx_v_device = __pyx_t_1;

                      /* "pyarrow/tensor.pxi":340
 *         """
 *         device = GetResultValue(ExportDevice(self.sp_tensor))
 *         return device.device_type, device.device_id             # <<<<<<<<<<<<<<
 * 
 * 
*/
                      __Pyx_XDECREF(__pyx_r);
                      __pyx_t_2 = __Pyx_PyLong_From_DLDeviceType(__pyx_v_device.device_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 340, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_2);
                      __pyx_t_3 = __Pyx_PyLong_From_int32_t(__pyx_v_device.device_id); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 340, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_3);
                      __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 340, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_4);
                      __Pyx_GIVEREF(__pyx_t_2);
                      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2) != (0)) __PYX_ERR(5, 340, __pyx_L1_error);
                      __Pyx_GIVEREF(__pyx_t_3);
                      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3) != (0)) __PYX_ERR(5, 340, __pyx_L1_error);
                      __pyx_t_2 = 0;
                      __pyx_t_3 = 0;
                      __pyx_r = __pyx_t_4;
                      __pyx_t_4 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/tensor.pxi":328
 *             )
 * 
 *     def __dlpack_device__(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the DLPack device tuple this tensor resides on.
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_XDECREF(__pyx_t_4);
                      __Pyx_AddTraceback("pyarrow.lib.Tensor.__dlpack_device__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/lib.pxd":303
 * 
 *     cdef readonly:
 *         DataType type             # <<<<<<<<<<<<<<
 *         bytes _ssize_t_shape
 *         bytes _ssize_t_strides
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_6Tensor_4type_1__get__(PyObject *__pyx_v_self); /*proto*/
                    static PyObject *__pyx_pw_7pyarrow_3lib_6Tensor_4type_1__get__(PyObject *__pyx_v_self) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_6Tensor_4type___get__(((struct __pyx_obj_7pyarrow_3lib_Tensor *)__pyx_v_self));

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

                    static PyObject *__pyx_pf_7pyarrow_3lib_6Tensor_4type___get__(struct __pyx_obj_7pyarrow_3lib_Tensor *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__get__", 0);
                      __Pyx_XDECREF(__pyx_r);
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "type");
                        __PYX_ERR(15, 303, __pyx_L1_error)
                      }
                      __Pyx_INCREF((PyObject *)__pyx_v_self->type);
                      __pyx_r = ((PyObject *)__pyx_v_self->type);
                      goto __pyx_L0;

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib.Tensor.type.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/lib.pxd":304
 *     cdef readonly:
 *         DataType type
 *         bytes _ssize_t_shape             # <<<<<<<<<<<<<<
 *         bytes _ssize_t_strides
 * 
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_6Tensor_14_ssize_t_shape_1__get__(PyObject *__pyx_v_self); /*proto*/
                    static PyObject *__pyx_pw_7pyarrow_3lib_6Tensor_14_ssize_t_shape_1__get__(PyObject *__pyx_v_self) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_6Tensor_14_ssize_t_shape___get__(((struct __pyx_obj_7pyarrow_3lib_Tensor *)__pyx_v_self));

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

                    static PyObject *__pyx_pf_7pyarrow_3lib_6Tensor_14_ssize_t_shape___get__(struct __pyx_obj_7pyarrow_3lib_Tensor *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__get__", 0);
                      __Pyx_XDECREF(__pyx_r);
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_ssize_t_shape");
                        __PYX_ERR(15, 304, __pyx_L1_error)
                      }
                      __Pyx_INCREF(__pyx_v_self->_ssize_t_shape);
                      __pyx_r = __pyx_v_self->_ssize_t_shape;
                      goto __pyx_L0;

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib.Tensor._ssize_t_shape.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/lib.pxd":305
 *         DataType type
 *         bytes _ssize_t_shape
 *         bytes _ssize_t_strides             # <<<<<<<<<<<<<<
 * 
 *     cdef void init(self, const shared_ptr[CTensor]& sp_tensor)
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_6Tensor_16_ssize_t_strides_1__get__(PyObject *__pyx_v_self); /*proto*/
                    static PyObject *__pyx_pw_7pyarrow_3lib_6Tensor_16_ssize_t_strides_1__get__(PyObject *__pyx_v_self) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_6Tensor_16_ssize_t_strides___get__(((struct __pyx_obj_7pyarrow_3lib_Tensor *)__pyx_v_self));

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

                    static PyObject *__pyx_pf_7pyarrow_3lib_6Tensor_16_ssize_t_strides___get__(struct __pyx_obj_7pyarrow_3lib_Tensor *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__get__", 0);
                      __Pyx_XDECREF(__pyx_r);
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_ssize_t_strides");
                        __PYX_ERR(15, 305, __pyx_L1_error)
                      }
                      __Pyx_INCREF(__pyx_v_self->_ssize_t_strides);
                      __pyx_r = __pyx_v_self->_ssize_t_strides;
                      goto __pyx_L0;

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib.Tensor._ssize_t_strides.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.sp_tensor,self.tp cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_6Tensor_23__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_6Tensor_22__reduce_cython__, "Tensor.__reduce_cython__(self)");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_6Tensor_23__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_6Tensor_23__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_6Tensor_22__reduce_cython__};
                    static PyObject *__pyx_pw_7pyarrow_3lib_6Tensor_23__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; }
                      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                      if (unlikely(__pyx_kwds_len < 0)) return NULL;
                      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;}
                      __pyx_r = __pyx_pf_7pyarrow_3lib_6Tensor_22__reduce_cython__(((struct __pyx_obj_7pyarrow_3lib_Tensor *)__pyx_v_self));

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

                    static PyObject *__pyx_pf_7pyarrow_3lib_6Tensor_22__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_Tensor *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__reduce_cython__", 0);

                      /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "self.sp_tensor,self.tp cannot be converted to a Python object for pickling"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "self.sp_tensor,self.tp cannot be converted to a Python object for pickling"
*/
                      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_self_sp_tensor_self_tp_cannot_be, 0, 0);
                      __PYX_ERR(7, 2, __pyx_L1_error)

                      /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.sp_tensor,self.tp cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib.Tensor.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "self.sp_tensor,self.tp cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.sp_tensor,self.tp cannot be converted to a Python object for pickling"
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_6Tensor_25__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_6Tensor_24__setstate_cython__, "Tensor.__setstate_cython__(self, __pyx_state)");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_6Tensor_25__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_6Tensor_25__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_6Tensor_24__setstate_cython__};
                    static PyObject *__pyx_pw_7pyarrow_3lib_6Tensor_25__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[1] = {0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(7, 3, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(7, 3, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(7, 3, __pyx_L3_error)
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(7, 3, __pyx_L3_error) }
                          }
                        } else if (unlikely(__pyx_nargs != 1)) {
                          goto __pyx_L5_argtuple_error;
                        } else {
                          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(7, 3, __pyx_L3_error)
                        }
                        __pyx_v___pyx_state = values[0];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(7, 3, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.Tensor.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_6Tensor_24__setstate_cython__(((struct __pyx_obj_7pyarrow_3lib_Tensor *)__pyx_v_self), __pyx_v___pyx_state);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

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

                      /* "(tree fragment)":4
 *     raise TypeError, "self.sp_tensor,self.tp cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "self.sp_tensor,self.tp cannot be converted to a Python object for pickling"             # <<<<<<<<<<<<<<
*/
                      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_self_sp_tensor_self_tp_cannot_be, 0, 0);
                      __PYX_ERR(7, 4, __pyx_L1_error)

                      /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "self.sp_tensor,self.tp cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.sp_tensor,self.tp cannot be converted to a Python object for pickling"
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib.Tensor.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/tensor.pxi":351
 *     """
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         raise TypeError("Do not call SparseCOOTensor's constructor directly, "
 *                         "use one of the `pyarrow.SparseCOOTensor.from_*` "
*/

                    /* Python wrapper */
                    static int __pyx_pw_7pyarrow_3lib_15SparseCOOTensor_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
                    static int __pyx_pw_7pyarrow_3lib_15SparseCOOTensor_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      int __pyx_r;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, __pyx_nargs); return -1; }
                      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
                      if (unlikely(__pyx_kwds_len < 0)) return -1;
                      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__init__", __pyx_kwds); return -1;}
                      __pyx_r = __pyx_pf_7pyarrow_3lib_15SparseCOOTensor___init__(((struct __pyx_obj_7pyarrow_3lib_SparseCOOTensor *)__pyx_v_self));

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

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

                      /* "pyarrow/tensor.pxi":352
 * 
 *     def __init__(self):
 *         raise TypeError("Do not call SparseCOOTensor's constructor directly, "             # <<<<<<<<<<<<<<
 *                         "use one of the `pyarrow.SparseCOOTensor.from_*` "
 *                         "functions instead.")
*/
                      __pyx_t_2 = NULL;
                      __pyx_t_3 = 1;
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Do_not_call_SparseCOOTensor_s_co};
                        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 352, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      __PYX_ERR(5, 352, __pyx_L1_error)

                      /* "pyarrow/tensor.pxi":351
 *     """
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         raise TypeError("Do not call SparseCOOTensor's constructor directly, "
 *                         "use one of the `pyarrow.SparseCOOTensor.from_*` "
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_AddTraceback("pyarrow.lib.SparseCOOTensor.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = -1;
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/tensor.pxi":356
 *                         "functions instead.")
 * 
 *     cdef void init(self, const shared_ptr[CSparseCOOTensor]& sp_sparse_tensor):             # <<<<<<<<<<<<<<
 *         self.sp_sparse_tensor = sp_sparse_tensor
 *         self.stp = sp_sparse_tensor.get()
*/

                    static void __pyx_f_7pyarrow_3lib_15SparseCOOTensor_init(struct __pyx_obj_7pyarrow_3lib_SparseCOOTensor *__pyx_v_self, std::shared_ptr< arrow::SparseCOOTensor>  const &__pyx_v_sp_sparse_tensor) {
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("init", 0);

                      /* "pyarrow/tensor.pxi":357
 * 
 *     cdef void init(self, const shared_ptr[CSparseCOOTensor]& sp_sparse_tensor):
 *         self.sp_sparse_tensor = sp_sparse_tensor             # <<<<<<<<<<<<<<
 *         self.stp = sp_sparse_tensor.get()
 *         self.type = pyarrow_wrap_data_type(self.stp.type())
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_sparse_tensor");
                        __PYX_ERR(5, 357, __pyx_L1_error)
                      }
                      __pyx_v_self->sp_sparse_tensor = __pyx_v_sp_sparse_tensor;

                      /* "pyarrow/tensor.pxi":358
 *     cdef void init(self, const shared_ptr[CSparseCOOTensor]& sp_sparse_tensor):
 *         self.sp_sparse_tensor = sp_sparse_tensor
 *         self.stp = sp_sparse_tensor.get()             # <<<<<<<<<<<<<<
 *         self.type = pyarrow_wrap_data_type(self.stp.type())
 * 
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "stp");
                        __PYX_ERR(5, 358, __pyx_L1_error)
                      }
                      __pyx_v_self->stp = __pyx_v_sp_sparse_tensor.get();

                      /* "pyarrow/tensor.pxi":359
 *         self.sp_sparse_tensor = sp_sparse_tensor
 *         self.stp = sp_sparse_tensor.get()
 *         self.type = pyarrow_wrap_data_type(self.stp.type())             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "stp");
                        __PYX_ERR(5, 359, __pyx_L1_error)
                      }
                      __pyx_t_1 = pyarrow_wrap_data_type(__pyx_v_self->stp->type()); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 359, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType))))) __PYX_ERR(5, 359, __pyx_L1_error)
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "type");
                        __PYX_ERR(5, 359, __pyx_L1_error)
                      }
                      __Pyx_GIVEREF(__pyx_t_1);
                      __Pyx_GOTREF((PyObject *)__pyx_v_self->type);
                      __Pyx_DECREF((PyObject *)__pyx_v_self->type);
                      __pyx_v_self->type = ((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_t_1);
                      __pyx_t_1 = 0;

                      /* "pyarrow/tensor.pxi":356
 *                         "functions instead.")
 * 
 *     cdef void init(self, const shared_ptr[CSparseCOOTensor]& sp_sparse_tensor):             # <<<<<<<<<<<<<<
 *         self.sp_sparse_tensor = sp_sparse_tensor
 *         self.stp = sp_sparse_tensor.get()
*/

                      /* function exit code */
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_AddTraceback("pyarrow.lib.SparseCOOTensor.init", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_L0:;
                      __Pyx_RefNannyFinishContext();
                    }

                    /* "pyarrow/tensor.pxi":361
 *         self.type = pyarrow_wrap_data_type(self.stp.type())
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return """<pyarrow.SparseCOOTensor>
 * type: {self.type}
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCOOTensor_3__repr__(PyObject *__pyx_v_self); /*proto*/
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCOOTensor_3__repr__(PyObject *__pyx_v_self) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_15SparseCOOTensor_2__repr__(((struct __pyx_obj_7pyarrow_3lib_SparseCOOTensor *)__pyx_v_self));

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

                    static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCOOTensor_2__repr__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_SparseCOOTensor *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__repr__", 0);

                      /* "pyarrow/tensor.pxi":362
 * 
 *     def __repr__(self):
 *         return """<pyarrow.SparseCOOTensor>             # <<<<<<<<<<<<<<
 * type: {self.type}
 * shape: {self.shape}"""
*/
                      __Pyx_XDECREF(__pyx_r);
                      __Pyx_INCREF(__pyx_mstate_global->__pyx_kp_u_pyarrow_SparseCOOTensor_type_se);
                      __pyx_r = __pyx_mstate_global->__pyx_kp_u_pyarrow_SparseCOOTensor_type_se;
                      goto __pyx_L0;

                      /* "pyarrow/tensor.pxi":361
 *         self.type = pyarrow_wrap_data_type(self.stp.type())
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return """<pyarrow.SparseCOOTensor>
 * type: {self.type}
*/

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

                    /* "pyarrow/tensor.pxi":366
 * shape: {self.shape}"""
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def from_dense_numpy(cls, obj, dim_names=None):
 *         """
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCOOTensor_5from_dense_numpy(PyObject *__pyx_v_cls, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_15SparseCOOTensor_4from_dense_numpy, "SparseCOOTensor.from_dense_numpy(cls, obj, dim_names=None)\n\nConvert numpy.ndarray to arrow::SparseCOOTensor\n\nParameters\n----------\nobj : numpy.ndarray\n    Data used to populate the rows.\ndim_names : list[str], optional\n    Names of the dimensions.\n\nReturns\n-------\npyarrow.SparseCOOTensor");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_15SparseCOOTensor_5from_dense_numpy = {"from_dense_numpy", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15SparseCOOTensor_5from_dense_numpy, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15SparseCOOTensor_4from_dense_numpy};
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCOOTensor_5from_dense_numpy(PyObject *__pyx_v_cls, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      PyObject *__pyx_v_obj = 0;
                      PyObject *__pyx_v_dim_names = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[2] = {0,0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("from_dense_numpy (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_obj,&__pyx_mstate_global->__pyx_n_u_dim_names,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(5, 366, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  2:
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(5, 366, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(5, 366, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "from_dense_numpy", 0) < (0)) __PYX_ERR(5, 366, __pyx_L3_error)

                          /* "pyarrow/tensor.pxi":367
 * 
 *     @classmethod
 *     def from_dense_numpy(cls, obj, dim_names=None):             # <<<<<<<<<<<<<<
 *         """
 *         Convert numpy.ndarray to arrow::SparseCOOTensor
*/
                          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("from_dense_numpy", 0, 1, 2, i); __PYX_ERR(5, 366, __pyx_L3_error) }
                          }
                        } else {
                          switch (__pyx_nargs) {
                            case  2:
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(5, 366, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(5, 366, __pyx_L3_error)
                            break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
                        }
                        __pyx_v_obj = values[0];
                        __pyx_v_dim_names = values[1];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("from_dense_numpy", 0, 1, 2, __pyx_nargs); __PYX_ERR(5, 366, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.SparseCOOTensor.from_dense_numpy", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_15SparseCOOTensor_4from_dense_numpy(((PyTypeObject*)__pyx_v_cls), __pyx_v_obj, __pyx_v_dim_names);

                      /* "pyarrow/tensor.pxi":366
 * shape: {self.shape}"""
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def from_dense_numpy(cls, obj, dim_names=None):
 *         """
*/

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCOOTensor_4from_dense_numpy(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_obj, PyObject *__pyx_v_dim_names) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      PyObject *__pyx_t_3 = NULL;
                      PyObject *__pyx_t_4 = NULL;
                      size_t __pyx_t_5;
                      PyObject *__pyx_t_6 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("from_dense_numpy", 0);

                      /* "pyarrow/tensor.pxi":382
 *         pyarrow.SparseCOOTensor
 *         """
 *         return cls.from_tensor(Tensor.from_numpy(obj, dim_names=dim_names))             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
*/
                      __Pyx_XDECREF(__pyx_r);
                      __pyx_t_2 = ((PyObject *)__pyx_v_cls);
                      __Pyx_INCREF(__pyx_t_2);
                      __pyx_t_4 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Tensor);
                      __Pyx_INCREF(__pyx_t_4);
                      __pyx_t_5 = 0;
                      {
                        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_4, __pyx_v_obj};
                        __pyx_t_6 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 382, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_6);
                        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_dim_names, __pyx_v_dim_names, __pyx_t_6, __pyx_callargs+2, 0) < (0)) __PYX_ERR(5, 382, __pyx_L1_error)
                        __pyx_t_3 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_from_numpy, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_6);
                        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                        if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 382, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_3);
                      }
                      __pyx_t_5 = 0;
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
                        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_from_tensor, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 382, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __pyx_r = __pyx_t_1;
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/tensor.pxi":366
 * shape: {self.shape}"""
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def from_dense_numpy(cls, obj, dim_names=None):
 *         """
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_XDECREF(__pyx_t_4);
                      __Pyx_XDECREF(__pyx_t_6);
                      __Pyx_AddTraceback("pyarrow.lib.SparseCOOTensor.from_dense_numpy", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/tensor.pxi":384
 *         return cls.from_tensor(Tensor.from_numpy(obj, dim_names=dim_names))
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_numpy(data, coords, shape, dim_names=None):
 *         """
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCOOTensor_7from_numpy(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_15SparseCOOTensor_6from_numpy, "SparseCOOTensor.from_numpy(data, coords, shape, dim_names=None)\n\nCreate arrow::SparseCOOTensor from numpy.ndarrays\n\nParameters\n----------\ndata : numpy.ndarray\n    Data used to populate the rows.\ncoords : numpy.ndarray\n    Coordinates of the data.\nshape : tuple\n    Shape of the tensor.\ndim_names : list, optional\n    Names of the dimensions.");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_15SparseCOOTensor_7from_numpy = {"from_numpy", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15SparseCOOTensor_7from_numpy, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15SparseCOOTensor_6from_numpy};
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCOOTensor_7from_numpy(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      PyObject *__pyx_v_data = 0;
                      PyObject *__pyx_v_coords = 0;
                      PyObject *__pyx_v_shape = 0;
                      PyObject *__pyx_v_dim_names = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[4] = {0,0,0,0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("from_numpy (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_data,&__pyx_mstate_global->__pyx_n_u_coords,&__pyx_mstate_global->__pyx_n_u_shape,&__pyx_mstate_global->__pyx_n_u_dim_names,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(5, 384, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  4:
                            values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(5, 384, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  3:
                            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(5, 384, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  2:
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(5, 384, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(5, 384, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "from_numpy", 0) < (0)) __PYX_ERR(5, 384, __pyx_L3_error)

                          /* "pyarrow/tensor.pxi":385
 * 
 *     @staticmethod
 *     def from_numpy(data, coords, shape, dim_names=None):             # <<<<<<<<<<<<<<
 *         """
 *         Create arrow::SparseCOOTensor from numpy.ndarrays
*/
                          if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None));
                          for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("from_numpy", 0, 3, 4, i); __PYX_ERR(5, 384, __pyx_L3_error) }
                          }
                        } else {
                          switch (__pyx_nargs) {
                            case  4:
                            values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(5, 384, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  3:
                            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(5, 384, __pyx_L3_error)
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(5, 384, __pyx_L3_error)
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(5, 384, __pyx_L3_error)
                            break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None));
                        }
                        __pyx_v_data = values[0];
                        __pyx_v_coords = values[1];
                        __pyx_v_shape = values[2];
                        __pyx_v_dim_names = values[3];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("from_numpy", 0, 3, 4, __pyx_nargs); __PYX_ERR(5, 384, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.SparseCOOTensor.from_numpy", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_15SparseCOOTensor_6from_numpy(__pyx_v_data, __pyx_v_coords, __pyx_v_shape, __pyx_v_dim_names);

                      /* "pyarrow/tensor.pxi":384
 *         return cls.from_tensor(Tensor.from_numpy(obj, dim_names=dim_names))
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_numpy(data, coords, shape, dim_names=None):
 *         """
*/

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCOOTensor_6from_numpy(PyObject *__pyx_v_data, PyObject *__pyx_v_coords, PyObject *__pyx_v_shape, PyObject *__pyx_v_dim_names) {
                      std::shared_ptr< arrow::SparseCOOTensor>  __pyx_v_csparse_tensor;
                      std::vector<int64_t>  __pyx_v_c_shape;
                      std::vector<std::string>  __pyx_v_c_dim_names;
                      PyObject *__pyx_v_x = NULL;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      Py_ssize_t __pyx_t_2;
                      PyObject *(*__pyx_t_3)(PyObject *);
                      PyObject *__pyx_t_4 = NULL;
                      int64_t __pyx_t_5;
                      int __pyx_t_6;
                      PyObject *__pyx_t_7 = NULL;
                      PyObject *__pyx_t_8 = NULL;
                      size_t __pyx_t_9;
                      std::string __pyx_t_10;
                      int __pyx_t_11;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("from_numpy", 0);
                      __Pyx_INCREF(__pyx_v_coords);

                      /* "pyarrow/tensor.pxi":404
 *         cdef vector[c_string] c_dim_names
 * 
 *         for x in shape:             # <<<<<<<<<<<<<<
 *             c_shape.push_back(x)
 *         if dim_names is not None:
*/
                      if (likely(PyList_CheckExact(__pyx_v_shape)) || PyTuple_CheckExact(__pyx_v_shape)) {
                        __pyx_t_1 = __pyx_v_shape; __Pyx_INCREF(__pyx_t_1);
                        __pyx_t_2 = 0;
                        __pyx_t_3 = NULL;
                      } else {
                        __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 404, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                        __pyx_t_3 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 404, __pyx_L1_error)
                      }
                      for (;;) {
                        if (likely(!__pyx_t_3)) {
                          if (likely(PyList_CheckExact(__pyx_t_1))) {
                            {
                              Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
                              #if !CYTHON_ASSUME_SAFE_SIZE
                              if (unlikely((__pyx_temp < 0))) __PYX_ERR(5, 404, __pyx_L1_error)
                              #endif
                              if (__pyx_t_2 >= __pyx_temp) break;
                            }
                            __pyx_t_4 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_2, __Pyx_ReferenceSharing_OwnStrongReference);
                            ++__pyx_t_2;
                          } else {
                            {
                              Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
                              #if !CYTHON_ASSUME_SAFE_SIZE
                              if (unlikely((__pyx_temp < 0))) __PYX_ERR(5, 404, __pyx_L1_error)
                              #endif
                              if (__pyx_t_2 >= __pyx_temp) break;
                            }
                            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                            __pyx_t_4 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2));
                            #else
                            __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2);
                            #endif
                            ++__pyx_t_2;
                          }
                          if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 404, __pyx_L1_error)
                        } else {
                          __pyx_t_4 = __pyx_t_3(__pyx_t_1);
                          if (unlikely(!__pyx_t_4)) {
                            PyObject* exc_type = PyErr_Occurred();
                            if (exc_type) {
                              if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(5, 404, __pyx_L1_error)
                              PyErr_Clear();
                            }
                            break;
                          }
                        }
                        __Pyx_GOTREF(__pyx_t_4);
                        __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_4);
                        __pyx_t_4 = 0;

                        /* "pyarrow/tensor.pxi":405
 * 
 *         for x in shape:
 *             c_shape.push_back(x)             # <<<<<<<<<<<<<<
 *         if dim_names is not None:
 *             for x in dim_names:
*/
                        __pyx_t_5 = __Pyx_PyLong_As_int64_t(__pyx_v_x); if (unlikely((__pyx_t_5 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(5, 405, __pyx_L1_error)
                        try {
                          __pyx_v_c_shape.push_back(__pyx_t_5);
                        } catch(...) {
                          __Pyx_CppExn2PyErr();
                          __PYX_ERR(5, 405, __pyx_L1_error)
                        }

                        /* "pyarrow/tensor.pxi":404
 *         cdef vector[c_string] c_dim_names
 * 
 *         for x in shape:             # <<<<<<<<<<<<<<
 *             c_shape.push_back(x)
 *         if dim_names is not None:
*/
                      }
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

                      /* "pyarrow/tensor.pxi":406
 *         for x in shape:
 *             c_shape.push_back(x)
 *         if dim_names is not None:             # <<<<<<<<<<<<<<
 *             for x in dim_names:
 *                 c_dim_names.push_back(tobytes(x))
*/
                      __pyx_t_6 = (__pyx_v_dim_names != Py_None);
                      if (__pyx_t_6) {

                        /* "pyarrow/tensor.pxi":407
 *             c_shape.push_back(x)
 *         if dim_names is not None:
 *             for x in dim_names:             # <<<<<<<<<<<<<<
 *                 c_dim_names.push_back(tobytes(x))
 * 
*/
                        if (likely(PyList_CheckExact(__pyx_v_dim_names)) || PyTuple_CheckExact(__pyx_v_dim_names)) {
                          __pyx_t_1 = __pyx_v_dim_names; __Pyx_INCREF(__pyx_t_1);
                          __pyx_t_2 = 0;
                          __pyx_t_3 = NULL;
                        } else {
                          __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_dim_names); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 407, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_1);
                          __pyx_t_3 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 407, __pyx_L1_error)
                        }
                        for (;;) {
                          if (likely(!__pyx_t_3)) {
                            if (likely(PyList_CheckExact(__pyx_t_1))) {
                              {
                                Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
                                #if !CYTHON_ASSUME_SAFE_SIZE
                                if (unlikely((__pyx_temp < 0))) __PYX_ERR(5, 407, __pyx_L1_error)
                                #endif
                                if (__pyx_t_2 >= __pyx_temp) break;
                              }
                              __pyx_t_4 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_2, __Pyx_ReferenceSharing_OwnStrongReference);
                              ++__pyx_t_2;
                            } else {
                              {
                                Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
                                #if !CYTHON_ASSUME_SAFE_SIZE
                                if (unlikely((__pyx_temp < 0))) __PYX_ERR(5, 407, __pyx_L1_error)
                                #endif
                                if (__pyx_t_2 >= __pyx_temp) break;
                              }
                              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                              __pyx_t_4 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2));
                              #else
                              __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2);
                              #endif
                              ++__pyx_t_2;
                            }
                            if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 407, __pyx_L1_error)
                          } else {
                            __pyx_t_4 = __pyx_t_3(__pyx_t_1);
                            if (unlikely(!__pyx_t_4)) {
                              PyObject* exc_type = PyErr_Occurred();
                              if (exc_type) {
                                if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(5, 407, __pyx_L1_error)
                                PyErr_Clear();
                              }
                              break;
                            }
                          }
                          __Pyx_GOTREF(__pyx_t_4);
                          __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_4);
                          __pyx_t_4 = 0;

                          /* "pyarrow/tensor.pxi":408
 *         if dim_names is not None:
 *             for x in dim_names:
 *                 c_dim_names.push_back(tobytes(x))             # <<<<<<<<<<<<<<
 * 
 *         # Enforce precondition for SparseCOOTensor indices
*/
                          __pyx_t_7 = NULL;
                          __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_tobytes); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 408, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_8);
                          __pyx_t_9 = 1;
                          #if CYTHON_UNPACK_METHODS
                          if (unlikely(PyMethod_Check(__pyx_t_8))) {
                            __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8);
                            assert(__pyx_t_7);
                            PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8);
                            __Pyx_INCREF(__pyx_t_7);
                            __Pyx_INCREF(__pyx__function);
                            __Pyx_DECREF_SET(__pyx_t_8, __pyx__function);
                            __pyx_t_9 = 0;
                          }
                          #endif
                          {
                            PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_x};
                            __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
                            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                            if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 408, __pyx_L1_error)
                            __Pyx_GOTREF(__pyx_t_4);
                          }
                          __pyx_t_10 = __pyx_convert_string_from_py_6libcpp_6string_std__in_string(__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(5, 408, __pyx_L1_error)
                          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                          try {
                            __pyx_v_c_dim_names.push_back(__pyx_t_10);
                          } catch(...) {
                            __Pyx_CppExn2PyErr();
                            __PYX_ERR(5, 408, __pyx_L1_error)
                          }

                          /* "pyarrow/tensor.pxi":407
 *             c_shape.push_back(x)
 *         if dim_names is not None:
 *             for x in dim_names:             # <<<<<<<<<<<<<<
 *                 c_dim_names.push_back(tobytes(x))
 * 
*/
                        }
                        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

                        /* "pyarrow/tensor.pxi":406
 *         for x in shape:
 *             c_shape.push_back(x)
 *         if dim_names is not None:             # <<<<<<<<<<<<<<
 *             for x in dim_names:
 *                 c_dim_names.push_back(tobytes(x))
*/
                      }

                      /* "pyarrow/tensor.pxi":411
 * 
 *         # Enforce precondition for SparseCOOTensor indices
 *         coords = np.require(coords, dtype='i8', requirements='C')             # <<<<<<<<<<<<<<
 *         if coords.ndim != 2:
 *             raise ValueError("Expected 2-dimensional array for "
*/
                      __pyx_t_4 = NULL;
                      __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 411, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_8);
                      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_require); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 411, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_7);
                      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                      __pyx_t_9 = 1;
                      #if CYTHON_UNPACK_METHODS
                      if (unlikely(PyMethod_Check(__pyx_t_7))) {
                        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_7);
                        assert(__pyx_t_4);
                        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
                        __Pyx_INCREF(__pyx_t_4);
                        __Pyx_INCREF(__pyx__function);
                        __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
                        __pyx_t_9 = 0;
                      }
                      #endif
                      {
                        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_4, __pyx_v_coords};
                        __pyx_t_8 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 411, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_8);
                        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_dtype, __pyx_mstate_global->__pyx_n_u_i8, __pyx_t_8, __pyx_callargs+2, 0) < (0)) __PYX_ERR(5, 411, __pyx_L1_error)
                        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_requirements, __pyx_mstate_global->__pyx_n_u_C, __pyx_t_8, __pyx_callargs+2, 1) < (0)) __PYX_ERR(5, 411, __pyx_L1_error)
                        __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_8);
                        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 411, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __Pyx_DECREF_SET(__pyx_v_coords, __pyx_t_1);
                      __pyx_t_1 = 0;

                      /* "pyarrow/tensor.pxi":412
 *         # Enforce precondition for SparseCOOTensor indices
 *         coords = np.require(coords, dtype='i8', requirements='C')
 *         if coords.ndim != 2:             # <<<<<<<<<<<<<<
 *             raise ValueError("Expected 2-dimensional array for "
 *                              "SparseCOOTensor indices")
*/
                      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_coords, __pyx_mstate_global->__pyx_n_u_ndim); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 412, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_t_6 = (__Pyx_PyLong_BoolNeObjC(__pyx_t_1, __pyx_mstate_global->__pyx_int_2, 2, 0)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(5, 412, __pyx_L1_error)
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      if (unlikely(__pyx_t_6)) {

                        /* "pyarrow/tensor.pxi":413
 *         coords = np.require(coords, dtype='i8', requirements='C')
 *         if coords.ndim != 2:
 *             raise ValueError("Expected 2-dimensional array for "             # <<<<<<<<<<<<<<
 *                              "SparseCOOTensor indices")
 * 
*/
                        __pyx_t_7 = NULL;
                        __pyx_t_9 = 1;
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_Expected_2_dimensional_array_for};
                          __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
                          if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 413, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_1);
                        }
                        __Pyx_Raise(__pyx_t_1, 0, 0, 0);
                        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                        __PYX_ERR(5, 413, __pyx_L1_error)

                        /* "pyarrow/tensor.pxi":412
 *         # Enforce precondition for SparseCOOTensor indices
 *         coords = np.require(coords, dtype='i8', requirements='C')
 *         if coords.ndim != 2:             # <<<<<<<<<<<<<<
 *             raise ValueError("Expected 2-dimensional array for "
 *                              "SparseCOOTensor indices")
*/
                      }

                      /* "pyarrow/tensor.pxi":416
 *                              "SparseCOOTensor indices")
 * 
 *         check_status(NdarraysToSparseCOOTensor(c_default_memory_pool(),             # <<<<<<<<<<<<<<
 *                                                data, coords, c_shape,
 *                                                c_dim_names, &csparse_tensor))
*/
                      __pyx_t_11 = __pyx_f_7pyarrow_3lib_check_status(arrow::py::NdarraysToSparseCOOTensor( arrow::default_memory_pool(), __pyx_v_data, __pyx_v_coords, __pyx_v_c_shape, __pyx_v_c_dim_names, (&__pyx_v_csparse_tensor))); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(5, 416, __pyx_L1_error)

                      /* "pyarrow/tensor.pxi":419
 *                                                data, coords, c_shape,
 *                                                c_dim_names, &csparse_tensor))
 *         return pyarrow_wrap_sparse_coo_tensor(csparse_tensor)             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
*/
                      __Pyx_XDECREF(__pyx_r);
                      __pyx_t_1 = pyarrow_wrap_sparse_coo_tensor(__pyx_v_csparse_tensor); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 419, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_r = __pyx_t_1;
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/tensor.pxi":384
 *         return cls.from_tensor(Tensor.from_numpy(obj, dim_names=dim_names))
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_numpy(data, coords, shape, dim_names=None):
 *         """
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_4);
                      __Pyx_XDECREF(__pyx_t_7);
                      __Pyx_XDECREF(__pyx_t_8);
                      __Pyx_AddTraceback("pyarrow.lib.SparseCOOTensor.from_numpy", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XDECREF(__pyx_v_x);
                      __Pyx_XDECREF(__pyx_v_coords);
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/tensor.pxi":421
 *         return pyarrow_wrap_sparse_coo_tensor(csparse_tensor)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_scipy(obj, dim_names=None):
 *         """
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCOOTensor_9from_scipy(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_15SparseCOOTensor_8from_scipy, "SparseCOOTensor.from_scipy(obj, dim_names=None)\n\nConvert scipy.sparse.coo_array or scipy.sparse.coo_matrix to arrow::SparseCOOTensor\n\nParameters\n----------\nobj : scipy.sparse.coo_array or scipy.sparse.coo_matrix\n    The scipy array or matrix that should be converted.\ndim_names : list, optional\n    Names of the dimensions.");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_15SparseCOOTensor_9from_scipy = {"from_scipy", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15SparseCOOTensor_9from_scipy, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15SparseCOOTensor_8from_scipy};
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCOOTensor_9from_scipy(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      PyObject *__pyx_v_obj = 0;
                      PyObject *__pyx_v_dim_names = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[2] = {0,0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("from_scipy (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_obj,&__pyx_mstate_global->__pyx_n_u_dim_names,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(5, 421, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  2:
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(5, 421, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(5, 421, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "from_scipy", 0) < (0)) __PYX_ERR(5, 421, __pyx_L3_error)

                          /* "pyarrow/tensor.pxi":422
 * 
 *     @staticmethod
 *     def from_scipy(obj, dim_names=None):             # <<<<<<<<<<<<<<
 *         """
 *         Convert scipy.sparse.coo_array or scipy.sparse.coo_matrix to arrow::SparseCOOTensor
*/
                          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("from_scipy", 0, 1, 2, i); __PYX_ERR(5, 421, __pyx_L3_error) }
                          }
                        } else {
                          switch (__pyx_nargs) {
                            case  2:
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(5, 421, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(5, 421, __pyx_L3_error)
                            break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
                        }
                        __pyx_v_obj = values[0];
                        __pyx_v_dim_names = values[1];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("from_scipy", 0, 1, 2, __pyx_nargs); __PYX_ERR(5, 421, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.SparseCOOTensor.from_scipy", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_15SparseCOOTensor_8from_scipy(__pyx_v_obj, __pyx_v_dim_names);

                      /* "pyarrow/tensor.pxi":421
 *         return pyarrow_wrap_sparse_coo_tensor(csparse_tensor)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_scipy(obj, dim_names=None):
 *         """
*/

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCOOTensor_8from_scipy(PyObject *__pyx_v_obj, PyObject *__pyx_v_dim_names) {
                      PyObject *__pyx_v_scipy = NULL;
                      std::shared_ptr< arrow::SparseCOOTensor>  __pyx_v_csparse_tensor;
                      std::vector<int64_t>  __pyx_v_c_shape;
                      std::vector<std::string>  __pyx_v_c_dim_names;
                      PyObject *__pyx_v_x = NULL;
                      PyObject *__pyx_v_row = NULL;
                      PyObject *__pyx_v_col = NULL;
                      PyObject *__pyx_v_order = NULL;
                      PyObject *__pyx_v_coords = NULL;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      PyObject *__pyx_t_3 = NULL;
                      PyObject *__pyx_t_4 = NULL;
                      int __pyx_t_5;
                      int __pyx_t_6;
                      PyObject *__pyx_t_7 = NULL;
                      size_t __pyx_t_8;
                      Py_ssize_t __pyx_t_9;
                      PyObject *(*__pyx_t_10)(PyObject *);
                      int64_t __pyx_t_11;
                      std::string __pyx_t_12;
                      int __pyx_t_13;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("from_scipy", 0);

                      /* "pyarrow/tensor.pxi":433
 *             Names of the dimensions.
 *         """
 *         import scipy.sparse             # <<<<<<<<<<<<<<
 *         if not isinstance(obj, (scipy.sparse.coo_array, scipy.sparse.coo_matrix)):
 *             raise TypeError(
*/
                      __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_scipy_sparse, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 433, __pyx_L1_error)
                      __pyx_t_1 = __pyx_t_2;
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_v_scipy = __pyx_t_1;
                      __pyx_t_1 = 0;

                      /* "pyarrow/tensor.pxi":434
 *         """
 *         import scipy.sparse
 *         if not isinstance(obj, (scipy.sparse.coo_array, scipy.sparse.coo_matrix)):             # <<<<<<<<<<<<<<
 *             raise TypeError(
 *                 f"Expected scipy.sparse.coo_array or scipy.sparse.coo_matrix, got {type(obj)}")
*/
                      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_scipy, __pyx_mstate_global->__pyx_n_u_sparse); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 434, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_coo_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 434, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_3);
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_scipy, __pyx_mstate_global->__pyx_n_u_sparse); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 434, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_coo_matrix); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 434, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_4);
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      __pyx_t_6 = PyObject_IsInstance(__pyx_v_obj, __pyx_t_3); 
                      if (!__pyx_t_6) {
                      } else {
                        __pyx_t_5 = __pyx_t_6;
                        goto __pyx_L4_bool_binop_done;
                      }
                      __pyx_t_6 = PyObject_IsInstance(__pyx_v_obj, __pyx_t_4); 
                      __pyx_t_5 = __pyx_t_6;
                      __pyx_L4_bool_binop_done:;
                      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                      __pyx_t_6 = (!__pyx_t_5);
                      if (unlikely(__pyx_t_6)) {

                        /* "pyarrow/tensor.pxi":435
 *         import scipy.sparse
 *         if not isinstance(obj, (scipy.sparse.coo_array, scipy.sparse.coo_matrix)):
 *             raise TypeError(             # <<<<<<<<<<<<<<
 *                 f"Expected scipy.sparse.coo_array or scipy.sparse.coo_matrix, got {type(obj)}")
 * 
*/
                        __pyx_t_4 = NULL;

                        /* "pyarrow/tensor.pxi":436
 *         if not isinstance(obj, (scipy.sparse.coo_array, scipy.sparse.coo_matrix)):
 *             raise TypeError(
 *                 f"Expected scipy.sparse.coo_array or scipy.sparse.coo_matrix, got {type(obj)}")             # <<<<<<<<<<<<<<
 * 
 *         cdef shared_ptr[CSparseCOOTensor] csparse_tensor
*/
                        __pyx_t_1 = __Pyx_PyObject_FormatSimple(((PyObject *)Py_TYPE(__pyx_v_obj)), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 436, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                        __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_Expected_scipy_sparse_coo_array, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 436, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_7);
                        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                        __pyx_t_8 = 1;
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_7};
                          __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
                          if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 435, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_3);
                        }
                        __Pyx_Raise(__pyx_t_3, 0, 0, 0);
                        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                        __PYX_ERR(5, 435, __pyx_L1_error)

                        /* "pyarrow/tensor.pxi":434
 *         """
 *         import scipy.sparse
 *         if not isinstance(obj, (scipy.sparse.coo_array, scipy.sparse.coo_matrix)):             # <<<<<<<<<<<<<<
 *             raise TypeError(
 *                 f"Expected scipy.sparse.coo_array or scipy.sparse.coo_matrix, got {type(obj)}")
*/
                      }

                      /* "pyarrow/tensor.pxi":442
 *         cdef vector[c_string] c_dim_names
 * 
 *         for x in obj.shape:             # <<<<<<<<<<<<<<
 *             c_shape.push_back(x)
 *         if dim_names is not None:
*/
                      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_mstate_global->__pyx_n_u_shape); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 442, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_3);
                      if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
                        __pyx_t_7 = __pyx_t_3; __Pyx_INCREF(__pyx_t_7);
                        __pyx_t_9 = 0;
                        __pyx_t_10 = NULL;
                      } else {
                        __pyx_t_9 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 442, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_7);
                        __pyx_t_10 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_7); if (unlikely(!__pyx_t_10)) __PYX_ERR(5, 442, __pyx_L1_error)
                      }
                      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                      for (;;) {
                        if (likely(!__pyx_t_10)) {
                          if (likely(PyList_CheckExact(__pyx_t_7))) {
                            {
                              Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_7);
                              #if !CYTHON_ASSUME_SAFE_SIZE
                              if (unlikely((__pyx_temp < 0))) __PYX_ERR(5, 442, __pyx_L1_error)
                              #endif
                              if (__pyx_t_9 >= __pyx_temp) break;
                            }
                            __pyx_t_3 = __Pyx_PyList_GetItemRefFast(__pyx_t_7, __pyx_t_9, __Pyx_ReferenceSharing_OwnStrongReference);
                            ++__pyx_t_9;
                          } else {
                            {
                              Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_7);
                              #if !CYTHON_ASSUME_SAFE_SIZE
                              if (unlikely((__pyx_temp < 0))) __PYX_ERR(5, 442, __pyx_L1_error)
                              #endif
                              if (__pyx_t_9 >= __pyx_temp) break;
                            }
                            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                            __pyx_t_3 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_9));
                            #else
                            __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_7, __pyx_t_9);
                            #endif
                            ++__pyx_t_9;
                          }
                          if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 442, __pyx_L1_error)
                        } else {
                          __pyx_t_3 = __pyx_t_10(__pyx_t_7);
                          if (unlikely(!__pyx_t_3)) {
                            PyObject* exc_type = PyErr_Occurred();
                            if (exc_type) {
                              if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(5, 442, __pyx_L1_error)
                              PyErr_Clear();
                            }
                            break;
                          }
                        }
                        __Pyx_GOTREF(__pyx_t_3);
                        __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_3);
                        __pyx_t_3 = 0;

                        /* "pyarrow/tensor.pxi":443
 * 
 *         for x in obj.shape:
 *             c_shape.push_back(x)             # <<<<<<<<<<<<<<
 *         if dim_names is not None:
 *             for x in dim_names:
*/
                        __pyx_t_11 = __Pyx_PyLong_As_int64_t(__pyx_v_x); if (unlikely((__pyx_t_11 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(5, 443, __pyx_L1_error)
                        try {
                          __pyx_v_c_shape.push_back(__pyx_t_11);
                        } catch(...) {
                          __Pyx_CppExn2PyErr();
                          __PYX_ERR(5, 443, __pyx_L1_error)
                        }

                        /* "pyarrow/tensor.pxi":442
 *         cdef vector[c_string] c_dim_names
 * 
 *         for x in obj.shape:             # <<<<<<<<<<<<<<
 *             c_shape.push_back(x)
 *         if dim_names is not None:
*/
                      }
                      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

                      /* "pyarrow/tensor.pxi":444
 *         for x in obj.shape:
 *             c_shape.push_back(x)
 *         if dim_names is not None:             # <<<<<<<<<<<<<<
 *             for x in dim_names:
 *                 c_dim_names.push_back(tobytes(x))
*/
                      __pyx_t_6 = (__pyx_v_dim_names != Py_None);
                      if (__pyx_t_6) {

                        /* "pyarrow/tensor.pxi":445
 *             c_shape.push_back(x)
 *         if dim_names is not None:
 *             for x in dim_names:             # <<<<<<<<<<<<<<
 *                 c_dim_names.push_back(tobytes(x))
 * 
*/
                        if (likely(PyList_CheckExact(__pyx_v_dim_names)) || PyTuple_CheckExact(__pyx_v_dim_names)) {
                          __pyx_t_7 = __pyx_v_dim_names; __Pyx_INCREF(__pyx_t_7);
                          __pyx_t_9 = 0;
                          __pyx_t_10 = NULL;
                        } else {
                          __pyx_t_9 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_v_dim_names); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 445, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_7);
                          __pyx_t_10 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_7); if (unlikely(!__pyx_t_10)) __PYX_ERR(5, 445, __pyx_L1_error)
                        }
                        for (;;) {
                          if (likely(!__pyx_t_10)) {
                            if (likely(PyList_CheckExact(__pyx_t_7))) {
                              {
                                Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_7);
                                #if !CYTHON_ASSUME_SAFE_SIZE
                                if (unlikely((__pyx_temp < 0))) __PYX_ERR(5, 445, __pyx_L1_error)
                                #endif
                                if (__pyx_t_9 >= __pyx_temp) break;
                              }
                              __pyx_t_3 = __Pyx_PyList_GetItemRefFast(__pyx_t_7, __pyx_t_9, __Pyx_ReferenceSharing_OwnStrongReference);
                              ++__pyx_t_9;
                            } else {
                              {
                                Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_7);
                                #if !CYTHON_ASSUME_SAFE_SIZE
                                if (unlikely((__pyx_temp < 0))) __PYX_ERR(5, 445, __pyx_L1_error)
                                #endif
                                if (__pyx_t_9 >= __pyx_temp) break;
                              }
                              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                              __pyx_t_3 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_9));
                              #else
                              __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_7, __pyx_t_9);
                              #endif
                              ++__pyx_t_9;
                            }
                            if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 445, __pyx_L1_error)
                          } else {
                            __pyx_t_3 = __pyx_t_10(__pyx_t_7);
                            if (unlikely(!__pyx_t_3)) {
                              PyObject* exc_type = PyErr_Occurred();
                              if (exc_type) {
                                if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(5, 445, __pyx_L1_error)
                                PyErr_Clear();
                              }
                              break;
                            }
                          }
                          __Pyx_GOTREF(__pyx_t_3);
                          __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_3);
                          __pyx_t_3 = 0;

                          /* "pyarrow/tensor.pxi":446
 *         if dim_names is not None:
 *             for x in dim_names:
 *                 c_dim_names.push_back(tobytes(x))             # <<<<<<<<<<<<<<
 * 
 *         row = obj.row
*/
                          __pyx_t_4 = NULL;
                          __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_tobytes); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 446, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_1);
                          __pyx_t_8 = 1;
                          #if CYTHON_UNPACK_METHODS
                          if (unlikely(PyMethod_Check(__pyx_t_1))) {
                            __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
                            assert(__pyx_t_4);
                            PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_1);
                            __Pyx_INCREF(__pyx_t_4);
                            __Pyx_INCREF(__pyx__function);
                            __Pyx_DECREF_SET(__pyx_t_1, __pyx__function);
                            __pyx_t_8 = 0;
                          }
                          #endif
                          {
                            PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_x};
                            __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_1, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                            if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 446, __pyx_L1_error)
                            __Pyx_GOTREF(__pyx_t_3);
                          }
                          __pyx_t_12 = __pyx_convert_string_from_py_6libcpp_6string_std__in_string(__pyx_t_3); if (unlikely(PyErr_Occurred())) __PYX_ERR(5, 446, __pyx_L1_error)
                          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                          try {
                            __pyx_v_c_dim_names.push_back(__pyx_t_12);
                          } catch(...) {
                            __Pyx_CppExn2PyErr();
                            __PYX_ERR(5, 446, __pyx_L1_error)
                          }

                          /* "pyarrow/tensor.pxi":445
 *             c_shape.push_back(x)
 *         if dim_names is not None:
 *             for x in dim_names:             # <<<<<<<<<<<<<<
 *                 c_dim_names.push_back(tobytes(x))
 * 
*/
                        }
                        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

                        /* "pyarrow/tensor.pxi":444
 *         for x in obj.shape:
 *             c_shape.push_back(x)
 *         if dim_names is not None:             # <<<<<<<<<<<<<<
 *             for x in dim_names:
 *                 c_dim_names.push_back(tobytes(x))
*/
                      }

                      /* "pyarrow/tensor.pxi":448
 *                 c_dim_names.push_back(tobytes(x))
 * 
 *         row = obj.row             # <<<<<<<<<<<<<<
 *         col = obj.col
 * 
*/
                      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_mstate_global->__pyx_n_u_row); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 448, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_7);
                      __pyx_v_row = __pyx_t_7;
                      __pyx_t_7 = 0;

                      /* "pyarrow/tensor.pxi":449
 * 
 *         row = obj.row
 *         col = obj.col             # <<<<<<<<<<<<<<
 * 
 *         # When SciPy's coo_array and coo_matrix have canonical format, their
*/
                      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_mstate_global->__pyx_n_u_col); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 449, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_7);
                      __pyx_v_col = __pyx_t_7;
                      __pyx_t_7 = 0;

                      /* "pyarrow/tensor.pxi":456
 *         # we must sort indices matrix into row-major order to keep it's
 *         # canonicalness here.
 *         if obj.has_canonical_format:             # <<<<<<<<<<<<<<
 *             order = np.lexsort((col, row))  # sort in row-major order
 *             row = row[order]
*/
                      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_mstate_global->__pyx_n_u_has_canonical_format); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 456, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_7);
                      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(5, 456, __pyx_L1_error)
                      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
                      if (__pyx_t_6) {

                        /* "pyarrow/tensor.pxi":457
 *         # canonicalness here.
 *         if obj.has_canonical_format:
 *             order = np.lexsort((col, row))  # sort in row-major order             # <<<<<<<<<<<<<<
 *             row = row[order]
 *             col = col[order]
*/
                        __pyx_t_3 = NULL;
                        __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 457, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_lexsort); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 457, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_4);
                        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                        __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 457, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                        __Pyx_INCREF(__pyx_v_col);
                        __Pyx_GIVEREF(__pyx_v_col);
                        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_col) != (0)) __PYX_ERR(5, 457, __pyx_L1_error);
                        __Pyx_INCREF(__pyx_v_row);
                        __Pyx_GIVEREF(__pyx_v_row);
                        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_row) != (0)) __PYX_ERR(5, 457, __pyx_L1_error);
                        __pyx_t_8 = 1;
                        #if CYTHON_UNPACK_METHODS
                        if (unlikely(PyMethod_Check(__pyx_t_4))) {
                          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
                          assert(__pyx_t_3);
                          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
                          __Pyx_INCREF(__pyx_t_3);
                          __Pyx_INCREF(__pyx__function);
                          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
                          __pyx_t_8 = 0;
                        }
                        #endif
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_1};
                          __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                          if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 457, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_7);
                        }
                        __pyx_v_order = __pyx_t_7;
                        __pyx_t_7 = 0;

                        /* "pyarrow/tensor.pxi":458
 *         if obj.has_canonical_format:
 *             order = np.lexsort((col, row))  # sort in row-major order
 *             row = row[order]             # <<<<<<<<<<<<<<
 *             col = col[order]
 *         coords = np.vstack([row, col]).T
*/
                        if (unlikely(__pyx_v_row == Py_None)) {
                          PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
                          __PYX_ERR(5, 458, __pyx_L1_error)
                        }
                        __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_row, __pyx_v_order); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 458, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_7);
                        __Pyx_DECREF_SET(__pyx_v_row, __pyx_t_7);
                        __pyx_t_7 = 0;

                        /* "pyarrow/tensor.pxi":459
 *             order = np.lexsort((col, row))  # sort in row-major order
 *             row = row[order]
 *             col = col[order]             # <<<<<<<<<<<<<<
 *         coords = np.vstack([row, col]).T
 *         coords = np.require(coords, dtype='i8', requirements='C')
*/
                        if (unlikely(__pyx_v_col == Py_None)) {
                          PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
                          __PYX_ERR(5, 459, __pyx_L1_error)
                        }
                        __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_col, __pyx_v_order); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 459, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_7);
                        __Pyx_DECREF_SET(__pyx_v_col, __pyx_t_7);
                        __pyx_t_7 = 0;

                        /* "pyarrow/tensor.pxi":456
 *         # we must sort indices matrix into row-major order to keep it's
 *         # canonicalness here.
 *         if obj.has_canonical_format:             # <<<<<<<<<<<<<<
 *             order = np.lexsort((col, row))  # sort in row-major order
 *             row = row[order]
*/
                      }

                      /* "pyarrow/tensor.pxi":460
 *             row = row[order]
 *             col = col[order]
 *         coords = np.vstack([row, col]).T             # <<<<<<<<<<<<<<
 *         coords = np.require(coords, dtype='i8', requirements='C')
 * 
*/
                      __pyx_t_4 = NULL;
                      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 460, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_vstack); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 460, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_3);
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      __pyx_t_1 = PyList_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 460, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __Pyx_INCREF(__pyx_v_row);
                      __Pyx_GIVEREF(__pyx_v_row);
                      if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_v_row) != (0)) __PYX_ERR(5, 460, __pyx_L1_error);
                      __Pyx_INCREF(__pyx_v_col);
                      __Pyx_GIVEREF(__pyx_v_col);
                      if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 1, __pyx_v_col) != (0)) __PYX_ERR(5, 460, __pyx_L1_error);
                      __pyx_t_8 = 1;
                      #if CYTHON_UNPACK_METHODS
                      if (unlikely(PyMethod_Check(__pyx_t_3))) {
                        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
                        assert(__pyx_t_4);
                        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
                        __Pyx_INCREF(__pyx_t_4);
                        __Pyx_INCREF(__pyx__function);
                        __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
                        __pyx_t_8 = 0;
                      }
                      #endif
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_1};
                        __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                        if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 460, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_7);
                      }
                      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_T); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 460, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_3);
                      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
                      __pyx_v_coords = __pyx_t_3;
                      __pyx_t_3 = 0;

                      /* "pyarrow/tensor.pxi":461
 *             col = col[order]
 *         coords = np.vstack([row, col]).T
 *         coords = np.require(coords, dtype='i8', requirements='C')             # <<<<<<<<<<<<<<
 * 
 *         check_status(NdarraysToSparseCOOTensor(c_default_memory_pool(),
*/
                      __pyx_t_7 = NULL;
                      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 461, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_require); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 461, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_4);
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      __pyx_t_8 = 1;
                      #if CYTHON_UNPACK_METHODS
                      if (unlikely(PyMethod_Check(__pyx_t_4))) {
                        __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
                        assert(__pyx_t_7);
                        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
                        __Pyx_INCREF(__pyx_t_7);
                        __Pyx_INCREF(__pyx__function);
                        __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
                        __pyx_t_8 = 0;
                      }
                      #endif
                      {
                        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_7, __pyx_v_coords};
                        __pyx_t_1 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 461, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_dtype, __pyx_mstate_global->__pyx_n_u_i8, __pyx_t_1, __pyx_callargs+2, 0) < (0)) __PYX_ERR(5, 461, __pyx_L1_error)
                        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_requirements, __pyx_mstate_global->__pyx_n_u_C, __pyx_t_1, __pyx_callargs+2, 1) < (0)) __PYX_ERR(5, 461, __pyx_L1_error)
                        __pyx_t_3 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_1);
                        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
                        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                        if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 461, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_3);
                      }
                      __Pyx_DECREF_SET(__pyx_v_coords, __pyx_t_3);
                      __pyx_t_3 = 0;

                      /* "pyarrow/tensor.pxi":464
 * 
 *         check_status(NdarraysToSparseCOOTensor(c_default_memory_pool(),
 *                                                obj.data, coords, c_shape,             # <<<<<<<<<<<<<<
 *                                                c_dim_names, &csparse_tensor))
 *         return pyarrow_wrap_sparse_coo_tensor(csparse_tensor)
*/
                      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_mstate_global->__pyx_n_u_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 464, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_3);

                      /* "pyarrow/tensor.pxi":463
 *         coords = np.require(coords, dtype='i8', requirements='C')
 * 
 *         check_status(NdarraysToSparseCOOTensor(c_default_memory_pool(),             # <<<<<<<<<<<<<<
 *                                                obj.data, coords, c_shape,
 *                                                c_dim_names, &csparse_tensor))
*/
                      __pyx_t_13 = __pyx_f_7pyarrow_3lib_check_status(arrow::py::NdarraysToSparseCOOTensor( arrow::default_memory_pool(), __pyx_t_3, __pyx_v_coords, __pyx_v_c_shape, __pyx_v_c_dim_names, (&__pyx_v_csparse_tensor))); if (unlikely(__pyx_t_13 == ((int)-1))) __PYX_ERR(5, 463, __pyx_L1_error)
                      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

                      /* "pyarrow/tensor.pxi":466
 *                                                obj.data, coords, c_shape,
 *                                                c_dim_names, &csparse_tensor))
 *         return pyarrow_wrap_sparse_coo_tensor(csparse_tensor)             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
*/
                      __Pyx_XDECREF(__pyx_r);
                      __pyx_t_3 = pyarrow_wrap_sparse_coo_tensor(__pyx_v_csparse_tensor); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 466, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_3);
                      __pyx_r = __pyx_t_3;
                      __pyx_t_3 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/tensor.pxi":421
 *         return pyarrow_wrap_sparse_coo_tensor(csparse_tensor)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_scipy(obj, dim_names=None):
 *         """
*/

                      /* 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_AddTraceback("pyarrow.lib.SparseCOOTensor.from_scipy", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XDECREF(__pyx_v_scipy);
                      __Pyx_XDECREF(__pyx_v_x);
                      __Pyx_XDECREF(__pyx_v_row);
                      __Pyx_XDECREF(__pyx_v_col);
                      __Pyx_XDECREF(__pyx_v_order);
                      __Pyx_XDECREF(__pyx_v_coords);
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/tensor.pxi":468
 *         return pyarrow_wrap_sparse_coo_tensor(csparse_tensor)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_pydata_sparse(obj, dim_names=None):
 *         """
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCOOTensor_11from_pydata_sparse(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_15SparseCOOTensor_10from_pydata_sparse, "SparseCOOTensor.from_pydata_sparse(obj, dim_names=None)\n\nConvert pydata/sparse.COO to arrow::SparseCOOTensor.\n\nParameters\n----------\nobj : pydata.sparse.COO\n    The sparse multidimensional array that should be converted.\ndim_names : list, optional\n    Names of the dimensions.");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_15SparseCOOTensor_11from_pydata_sparse = {"from_pydata_sparse", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15SparseCOOTensor_11from_pydata_sparse, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15SparseCOOTensor_10from_pydata_sparse};
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCOOTensor_11from_pydata_sparse(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      PyObject *__pyx_v_obj = 0;
                      PyObject *__pyx_v_dim_names = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[2] = {0,0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("from_pydata_sparse (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_obj,&__pyx_mstate_global->__pyx_n_u_dim_names,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(5, 468, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  2:
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(5, 468, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(5, 468, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "from_pydata_sparse", 0) < (0)) __PYX_ERR(5, 468, __pyx_L3_error)

                          /* "pyarrow/tensor.pxi":469
 * 
 *     @staticmethod
 *     def from_pydata_sparse(obj, dim_names=None):             # <<<<<<<<<<<<<<
 *         """
 *         Convert pydata/sparse.COO to arrow::SparseCOOTensor.
*/
                          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("from_pydata_sparse", 0, 1, 2, i); __PYX_ERR(5, 468, __pyx_L3_error) }
                          }
                        } else {
                          switch (__pyx_nargs) {
                            case  2:
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(5, 468, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(5, 468, __pyx_L3_error)
                            break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
                        }
                        __pyx_v_obj = values[0];
                        __pyx_v_dim_names = values[1];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("from_pydata_sparse", 0, 1, 2, __pyx_nargs); __PYX_ERR(5, 468, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.SparseCOOTensor.from_pydata_sparse", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_15SparseCOOTensor_10from_pydata_sparse(__pyx_v_obj, __pyx_v_dim_names);

                      /* "pyarrow/tensor.pxi":468
 *         return pyarrow_wrap_sparse_coo_tensor(csparse_tensor)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_pydata_sparse(obj, dim_names=None):
 *         """
*/

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCOOTensor_10from_pydata_sparse(PyObject *__pyx_v_obj, PyObject *__pyx_v_dim_names) {
                      PyObject *__pyx_v_sparse = NULL;
                      std::shared_ptr< arrow::SparseCOOTensor>  __pyx_v_csparse_tensor;
                      std::vector<int64_t>  __pyx_v_c_shape;
                      std::vector<std::string>  __pyx_v_c_dim_names;
                      PyObject *__pyx_v_x = NULL;
                      PyObject *__pyx_v_coords = NULL;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      int __pyx_t_3;
                      int __pyx_t_4;
                      PyObject *__pyx_t_5 = NULL;
                      PyObject *__pyx_t_6 = NULL;
                      PyObject *__pyx_t_7 = NULL;
                      size_t __pyx_t_8;
                      Py_ssize_t __pyx_t_9;
                      PyObject *(*__pyx_t_10)(PyObject *);
                      int64_t __pyx_t_11;
                      std::string __pyx_t_12;
                      PyObject *__pyx_t_13 = NULL;
                      int __pyx_t_14;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("from_pydata_sparse", 0);

                      /* "pyarrow/tensor.pxi":480
 *             Names of the dimensions.
 *         """
 *         import sparse             # <<<<<<<<<<<<<<
 *         if not isinstance(obj, sparse.COO):
 *             raise TypeError(
*/
                      __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sparse, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 480, __pyx_L1_error)
                      __pyx_t_1 = __pyx_t_2;
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_v_sparse = __pyx_t_1;
                      __pyx_t_1 = 0;

                      /* "pyarrow/tensor.pxi":481
 *         """
 *         import sparse
 *         if not isinstance(obj, sparse.COO):             # <<<<<<<<<<<<<<
 *             raise TypeError(
 *                 f"Expected sparse.COO, got {type(obj)}")
*/
                      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sparse, __pyx_mstate_global->__pyx_n_u_COO); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 481, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_t_3 = PyObject_IsInstance(__pyx_v_obj, __pyx_t_1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(5, 481, __pyx_L1_error)
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      __pyx_t_4 = (!__pyx_t_3);
                      if (unlikely(__pyx_t_4)) {

                        /* "pyarrow/tensor.pxi":482
 *         import sparse
 *         if not isinstance(obj, sparse.COO):
 *             raise TypeError(             # <<<<<<<<<<<<<<
 *                 f"Expected sparse.COO, got {type(obj)}")
 * 
*/
                        __pyx_t_5 = NULL;

                        /* "pyarrow/tensor.pxi":483
 *         if not isinstance(obj, sparse.COO):
 *             raise TypeError(
 *                 f"Expected sparse.COO, got {type(obj)}")             # <<<<<<<<<<<<<<
 * 
 *         cdef shared_ptr[CSparseCOOTensor] csparse_tensor
*/
                        __pyx_t_6 = __Pyx_PyObject_FormatSimple(((PyObject *)Py_TYPE(__pyx_v_obj)), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 483, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_6);
                        __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_Expected_sparse_COO_got, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 483, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_7);
                        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                        __pyx_t_8 = 1;
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_7};
                          __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
                          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
                          if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 482, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_1);
                        }
                        __Pyx_Raise(__pyx_t_1, 0, 0, 0);
                        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                        __PYX_ERR(5, 482, __pyx_L1_error)

                        /* "pyarrow/tensor.pxi":481
 *         """
 *         import sparse
 *         if not isinstance(obj, sparse.COO):             # <<<<<<<<<<<<<<
 *             raise TypeError(
 *                 f"Expected sparse.COO, got {type(obj)}")
*/
                      }

                      /* "pyarrow/tensor.pxi":489
 *         cdef vector[c_string] c_dim_names
 * 
 *         for x in obj.shape:             # <<<<<<<<<<<<<<
 *             c_shape.push_back(x)
 *         if dim_names is not None:
*/
                      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_mstate_global->__pyx_n_u_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 489, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
                        __pyx_t_7 = __pyx_t_1; __Pyx_INCREF(__pyx_t_7);
                        __pyx_t_9 = 0;
                        __pyx_t_10 = NULL;
                      } else {
                        __pyx_t_9 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 489, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_7);
                        __pyx_t_10 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_7); if (unlikely(!__pyx_t_10)) __PYX_ERR(5, 489, __pyx_L1_error)
                      }
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      for (;;) {
                        if (likely(!__pyx_t_10)) {
                          if (likely(PyList_CheckExact(__pyx_t_7))) {
                            {
                              Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_7);
                              #if !CYTHON_ASSUME_SAFE_SIZE
                              if (unlikely((__pyx_temp < 0))) __PYX_ERR(5, 489, __pyx_L1_error)
                              #endif
                              if (__pyx_t_9 >= __pyx_temp) break;
                            }
                            __pyx_t_1 = __Pyx_PyList_GetItemRefFast(__pyx_t_7, __pyx_t_9, __Pyx_ReferenceSharing_OwnStrongReference);
                            ++__pyx_t_9;
                          } else {
                            {
                              Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_7);
                              #if !CYTHON_ASSUME_SAFE_SIZE
                              if (unlikely((__pyx_temp < 0))) __PYX_ERR(5, 489, __pyx_L1_error)
                              #endif
                              if (__pyx_t_9 >= __pyx_temp) break;
                            }
                            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                            __pyx_t_1 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_9));
                            #else
                            __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_7, __pyx_t_9);
                            #endif
                            ++__pyx_t_9;
                          }
                          if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 489, __pyx_L1_error)
                        } else {
                          __pyx_t_1 = __pyx_t_10(__pyx_t_7);
                          if (unlikely(!__pyx_t_1)) {
                            PyObject* exc_type = PyErr_Occurred();
                            if (exc_type) {
                              if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(5, 489, __pyx_L1_error)
                              PyErr_Clear();
                            }
                            break;
                          }
                        }
                        __Pyx_GOTREF(__pyx_t_1);
                        __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_1);
                        __pyx_t_1 = 0;

                        /* "pyarrow/tensor.pxi":490
 * 
 *         for x in obj.shape:
 *             c_shape.push_back(x)             # <<<<<<<<<<<<<<
 *         if dim_names is not None:
 *             for x in dim_names:
*/
                        __pyx_t_11 = __Pyx_PyLong_As_int64_t(__pyx_v_x); if (unlikely((__pyx_t_11 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(5, 490, __pyx_L1_error)
                        try {
                          __pyx_v_c_shape.push_back(__pyx_t_11);
                        } catch(...) {
                          __Pyx_CppExn2PyErr();
                          __PYX_ERR(5, 490, __pyx_L1_error)
                        }

                        /* "pyarrow/tensor.pxi":489
 *         cdef vector[c_string] c_dim_names
 * 
 *         for x in obj.shape:             # <<<<<<<<<<<<<<
 *             c_shape.push_back(x)
 *         if dim_names is not None:
*/
                      }
                      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

                      /* "pyarrow/tensor.pxi":491
 *         for x in obj.shape:
 *             c_shape.push_back(x)
 *         if dim_names is not None:             # <<<<<<<<<<<<<<
 *             for x in dim_names:
 *                 c_dim_names.push_back(tobytes(x))
*/
                      __pyx_t_4 = (__pyx_v_dim_names != Py_None);
                      if (__pyx_t_4) {

                        /* "pyarrow/tensor.pxi":492
 *             c_shape.push_back(x)
 *         if dim_names is not None:
 *             for x in dim_names:             # <<<<<<<<<<<<<<
 *                 c_dim_names.push_back(tobytes(x))
 * 
*/
                        if (likely(PyList_CheckExact(__pyx_v_dim_names)) || PyTuple_CheckExact(__pyx_v_dim_names)) {
                          __pyx_t_7 = __pyx_v_dim_names; __Pyx_INCREF(__pyx_t_7);
                          __pyx_t_9 = 0;
                          __pyx_t_10 = NULL;
                        } else {
                          __pyx_t_9 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_v_dim_names); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 492, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_7);
                          __pyx_t_10 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_7); if (unlikely(!__pyx_t_10)) __PYX_ERR(5, 492, __pyx_L1_error)
                        }
                        for (;;) {
                          if (likely(!__pyx_t_10)) {
                            if (likely(PyList_CheckExact(__pyx_t_7))) {
                              {
                                Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_7);
                                #if !CYTHON_ASSUME_SAFE_SIZE
                                if (unlikely((__pyx_temp < 0))) __PYX_ERR(5, 492, __pyx_L1_error)
                                #endif
                                if (__pyx_t_9 >= __pyx_temp) break;
                              }
                              __pyx_t_1 = __Pyx_PyList_GetItemRefFast(__pyx_t_7, __pyx_t_9, __Pyx_ReferenceSharing_OwnStrongReference);
                              ++__pyx_t_9;
                            } else {
                              {
                                Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_7);
                                #if !CYTHON_ASSUME_SAFE_SIZE
                                if (unlikely((__pyx_temp < 0))) __PYX_ERR(5, 492, __pyx_L1_error)
                                #endif
                                if (__pyx_t_9 >= __pyx_temp) break;
                              }
                              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                              __pyx_t_1 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_9));
                              #else
                              __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_7, __pyx_t_9);
                              #endif
                              ++__pyx_t_9;
                            }
                            if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 492, __pyx_L1_error)
                          } else {
                            __pyx_t_1 = __pyx_t_10(__pyx_t_7);
                            if (unlikely(!__pyx_t_1)) {
                              PyObject* exc_type = PyErr_Occurred();
                              if (exc_type) {
                                if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(5, 492, __pyx_L1_error)
                                PyErr_Clear();
                              }
                              break;
                            }
                          }
                          __Pyx_GOTREF(__pyx_t_1);
                          __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_1);
                          __pyx_t_1 = 0;

                          /* "pyarrow/tensor.pxi":493
 *         if dim_names is not None:
 *             for x in dim_names:
 *                 c_dim_names.push_back(tobytes(x))             # <<<<<<<<<<<<<<
 * 
 *         coords = np.require(obj.coords.T, dtype='i8', requirements='C')
*/
                          __pyx_t_5 = NULL;
                          __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_tobytes); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 493, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_6);
                          __pyx_t_8 = 1;
                          #if CYTHON_UNPACK_METHODS
                          if (unlikely(PyMethod_Check(__pyx_t_6))) {
                            __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
                            assert(__pyx_t_5);
                            PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
                            __Pyx_INCREF(__pyx_t_5);
                            __Pyx_INCREF(__pyx__function);
                            __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
                            __pyx_t_8 = 0;
                          }
                          #endif
                          {
                            PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_x};
                            __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                            __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
                            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                            if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 493, __pyx_L1_error)
                            __Pyx_GOTREF(__pyx_t_1);
                          }
                          __pyx_t_12 = __pyx_convert_string_from_py_6libcpp_6string_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(5, 493, __pyx_L1_error)
                          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                          try {
                            __pyx_v_c_dim_names.push_back(__pyx_t_12);
                          } catch(...) {
                            __Pyx_CppExn2PyErr();
                            __PYX_ERR(5, 493, __pyx_L1_error)
                          }

                          /* "pyarrow/tensor.pxi":492
 *             c_shape.push_back(x)
 *         if dim_names is not None:
 *             for x in dim_names:             # <<<<<<<<<<<<<<
 *                 c_dim_names.push_back(tobytes(x))
 * 
*/
                        }
                        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

                        /* "pyarrow/tensor.pxi":491
 *         for x in obj.shape:
 *             c_shape.push_back(x)
 *         if dim_names is not None:             # <<<<<<<<<<<<<<
 *             for x in dim_names:
 *                 c_dim_names.push_back(tobytes(x))
*/
                      }

                      /* "pyarrow/tensor.pxi":495
 *                 c_dim_names.push_back(tobytes(x))
 * 
 *         coords = np.require(obj.coords.T, dtype='i8', requirements='C')             # <<<<<<<<<<<<<<
 * 
 *         check_status(NdarraysToSparseCOOTensor(c_default_memory_pool(),
*/
                      __pyx_t_1 = NULL;
                      __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 495, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_6);
                      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_require); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 495, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_5);
                      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_mstate_global->__pyx_n_u_coords); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 495, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_6);
                      __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_T); if (unlikely(!__pyx_t_13)) __PYX_ERR(5, 495, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_13);
                      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                      __pyx_t_8 = 1;
                      #if CYTHON_UNPACK_METHODS
                      if (unlikely(PyMethod_Check(__pyx_t_5))) {
                        __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_5);
                        assert(__pyx_t_1);
                        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
                        __Pyx_INCREF(__pyx_t_1);
                        __Pyx_INCREF(__pyx__function);
                        __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
                        __pyx_t_8 = 0;
                      }
                      #endif
                      {
                        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_1, __pyx_t_13};
                        __pyx_t_6 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 495, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_6);
                        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_dtype, __pyx_mstate_global->__pyx_n_u_i8, __pyx_t_6, __pyx_callargs+2, 0) < (0)) __PYX_ERR(5, 495, __pyx_L1_error)
                        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_requirements, __pyx_mstate_global->__pyx_n_u_C, __pyx_t_6, __pyx_callargs+2, 1) < (0)) __PYX_ERR(5, 495, __pyx_L1_error)
                        __pyx_t_7 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_6);
                        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
                        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
                        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                        if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 495, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_7);
                      }
                      __pyx_v_coords = __pyx_t_7;
                      __pyx_t_7 = 0;

                      /* "pyarrow/tensor.pxi":498
 * 
 *         check_status(NdarraysToSparseCOOTensor(c_default_memory_pool(),
 *                                                obj.data, coords, c_shape,             # <<<<<<<<<<<<<<
 *                                                c_dim_names, &csparse_tensor))
 *         return pyarrow_wrap_sparse_coo_tensor(csparse_tensor)
*/
                      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_mstate_global->__pyx_n_u_data); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 498, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_7);

                      /* "pyarrow/tensor.pxi":497
 *         coords = np.require(obj.coords.T, dtype='i8', requirements='C')
 * 
 *         check_status(NdarraysToSparseCOOTensor(c_default_memory_pool(),             # <<<<<<<<<<<<<<
 *                                                obj.data, coords, c_shape,
 *                                                c_dim_names, &csparse_tensor))
*/
                      __pyx_t_14 = __pyx_f_7pyarrow_3lib_check_status(arrow::py::NdarraysToSparseCOOTensor( arrow::default_memory_pool(), __pyx_t_7, __pyx_v_coords, __pyx_v_c_shape, __pyx_v_c_dim_names, (&__pyx_v_csparse_tensor))); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(5, 497, __pyx_L1_error)
                      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

                      /* "pyarrow/tensor.pxi":500
 *                                                obj.data, coords, c_shape,
 *                                                c_dim_names, &csparse_tensor))
 *         return pyarrow_wrap_sparse_coo_tensor(csparse_tensor)             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
*/
                      __Pyx_XDECREF(__pyx_r);
                      __pyx_t_7 = pyarrow_wrap_sparse_coo_tensor(__pyx_v_csparse_tensor); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 500, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_7);
                      __pyx_r = __pyx_t_7;
                      __pyx_t_7 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/tensor.pxi":468
 *         return pyarrow_wrap_sparse_coo_tensor(csparse_tensor)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_pydata_sparse(obj, dim_names=None):
 *         """
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_5);
                      __Pyx_XDECREF(__pyx_t_6);
                      __Pyx_XDECREF(__pyx_t_7);
                      __Pyx_XDECREF(__pyx_t_13);
                      __Pyx_AddTraceback("pyarrow.lib.SparseCOOTensor.from_pydata_sparse", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XDECREF(__pyx_v_sparse);
                      __Pyx_XDECREF(__pyx_v_x);
                      __Pyx_XDECREF(__pyx_v_coords);
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/tensor.pxi":502
 *         return pyarrow_wrap_sparse_coo_tensor(csparse_tensor)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_tensor(obj):
 *         """
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCOOTensor_13from_tensor(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_15SparseCOOTensor_12from_tensor, "SparseCOOTensor.from_tensor(obj)\n\nConvert arrow::Tensor to arrow::SparseCOOTensor.\n\nParameters\n----------\nobj : Tensor\n    The tensor that should be converted.");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_15SparseCOOTensor_13from_tensor = {"from_tensor", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15SparseCOOTensor_13from_tensor, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15SparseCOOTensor_12from_tensor};
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCOOTensor_13from_tensor(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      PyObject *__pyx_v_obj = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[1] = {0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("from_tensor (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_obj,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(5, 502, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(5, 502, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "from_tensor", 0) < (0)) __PYX_ERR(5, 502, __pyx_L3_error)
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("from_tensor", 1, 1, 1, i); __PYX_ERR(5, 502, __pyx_L3_error) }
                          }
                        } else if (unlikely(__pyx_nargs != 1)) {
                          goto __pyx_L5_argtuple_error;
                        } else {
                          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(5, 502, __pyx_L3_error)
                        }
                        __pyx_v_obj = values[0];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("from_tensor", 1, 1, 1, __pyx_nargs); __PYX_ERR(5, 502, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.SparseCOOTensor.from_tensor", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_15SparseCOOTensor_12from_tensor(__pyx_v_obj);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCOOTensor_12from_tensor(PyObject *__pyx_v_obj) {
                      std::shared_ptr< arrow::SparseCOOTensor>  __pyx_v_csparse_tensor;
                      std::shared_ptr< arrow::Tensor>  __pyx_v_ctensor;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      std::shared_ptr< arrow::Tensor>  __pyx_t_1;
                      int __pyx_t_2;
                      PyObject *__pyx_t_3 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("from_tensor", 0);

                      /* "pyarrow/tensor.pxi":513
 *         """
 *         cdef shared_ptr[CSparseCOOTensor] csparse_tensor
 *         cdef shared_ptr[CTensor] ctensor = pyarrow_unwrap_tensor(obj)             # <<<<<<<<<<<<<<
 * 
 *         with nogil:
*/
                      __pyx_t_1 = pyarrow_unwrap_tensor(__pyx_v_obj); if (unlikely(PyErr_Occurred())) __PYX_ERR(5, 513, __pyx_L1_error)
                      __pyx_v_ctensor = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_1);

                      /* "pyarrow/tensor.pxi":515
 *         cdef shared_ptr[CTensor] ctensor = pyarrow_unwrap_tensor(obj)
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             check_status(TensorToSparseCOOTensor(ctensor, &csparse_tensor))
 * 
*/
                      {
                          PyThreadState * _save;
                          _save = PyEval_SaveThread();
                          __Pyx_FastGIL_Remember();
                          /*try:*/ {

                            /* "pyarrow/tensor.pxi":516
 * 
 *         with nogil:
 *             check_status(TensorToSparseCOOTensor(ctensor, &csparse_tensor))             # <<<<<<<<<<<<<<
 * 
 *         return pyarrow_wrap_sparse_coo_tensor(csparse_tensor)
*/
                            __pyx_t_2 = __pyx_f_7pyarrow_3lib_check_status(arrow::py::TensorToSparseCOOTensor(__pyx_v_ctensor, (&__pyx_v_csparse_tensor))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 516, __pyx_L4_error)
                          }

                          /* "pyarrow/tensor.pxi":515
 *         cdef shared_ptr[CTensor] ctensor = pyarrow_unwrap_tensor(obj)
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             check_status(TensorToSparseCOOTensor(ctensor, &csparse_tensor))
 * 
*/
                          /*finally:*/ {
                            /*normal exit:*/{
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L5;
                            }
                            __pyx_L4_error: {
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L1_error;
                            }
                            __pyx_L5:;
                          }
                      }

                      /* "pyarrow/tensor.pxi":518
 *             check_status(TensorToSparseCOOTensor(ctensor, &csparse_tensor))
 * 
 *         return pyarrow_wrap_sparse_coo_tensor(csparse_tensor)             # <<<<<<<<<<<<<<
 * 
 *     def to_numpy(self):
*/
                      __Pyx_XDECREF(__pyx_r);
                      __pyx_t_3 = pyarrow_wrap_sparse_coo_tensor(__pyx_v_csparse_tensor); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 518, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_3);
                      __pyx_r = __pyx_t_3;
                      __pyx_t_3 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/tensor.pxi":502
 *         return pyarrow_wrap_sparse_coo_tensor(csparse_tensor)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_tensor(obj):
 *         """
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_AddTraceback("pyarrow.lib.SparseCOOTensor.from_tensor", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/tensor.pxi":520
 *         return pyarrow_wrap_sparse_coo_tensor(csparse_tensor)
 * 
 *     def to_numpy(self):             # <<<<<<<<<<<<<<
 *         """
 *         Convert arrow::SparseCOOTensor to numpy.ndarrays with zero copy.
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCOOTensor_15to_numpy(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_15SparseCOOTensor_14to_numpy, "SparseCOOTensor.to_numpy(self)\n\nConvert arrow::SparseCOOTensor to numpy.ndarrays with zero copy.");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_15SparseCOOTensor_15to_numpy = {"to_numpy", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15SparseCOOTensor_15to_numpy, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15SparseCOOTensor_14to_numpy};
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCOOTensor_15to_numpy(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("to_numpy (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("to_numpy", 1, 0, 0, __pyx_nargs); return NULL; }
                      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                      if (unlikely(__pyx_kwds_len < 0)) return NULL;
                      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("to_numpy", __pyx_kwds); return NULL;}
                      __pyx_r = __pyx_pf_7pyarrow_3lib_15SparseCOOTensor_14to_numpy(((struct __pyx_obj_7pyarrow_3lib_SparseCOOTensor *)__pyx_v_self));

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

                    static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCOOTensor_14to_numpy(struct __pyx_obj_7pyarrow_3lib_SparseCOOTensor *__pyx_v_self) {
                      PyObject *__pyx_v_out_data;
                      PyObject *__pyx_v_out_coords;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      int __pyx_t_2;
                      PyObject *__pyx_t_3 = NULL;
                      size_t __pyx_t_4;
                      int __pyx_t_5;
                      PyObject *__pyx_t_6 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("to_numpy", 0);

                      /* "pyarrow/tensor.pxi":524
 *         Convert arrow::SparseCOOTensor to numpy.ndarrays with zero copy.
 *         """
 *         if np is None:             # <<<<<<<<<<<<<<
 *             raise ImportError(
 *                 "Cannot return a numpy.ndarray if NumPy is not present")
*/
                      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 524, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_t_2 = (__pyx_t_1 == Py_None);
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      if (unlikely(__pyx_t_2)) {

                        /* "pyarrow/tensor.pxi":525
 *         """
 *         if np is None:
 *             raise ImportError(             # <<<<<<<<<<<<<<
 *                 "Cannot return a numpy.ndarray if NumPy is not present")
 *         cdef PyObject* out_data
*/
                        __pyx_t_3 = NULL;
                        __pyx_t_4 = 1;
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Cannot_return_a_numpy_ndarray_if};
                          __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ImportError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                          if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 525, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_1);
                        }
                        __Pyx_Raise(__pyx_t_1, 0, 0, 0);
                        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                        __PYX_ERR(5, 525, __pyx_L1_error)

                        /* "pyarrow/tensor.pxi":524
 *         Convert arrow::SparseCOOTensor to numpy.ndarrays with zero copy.
 *         """
 *         if np is None:             # <<<<<<<<<<<<<<
 *             raise ImportError(
 *                 "Cannot return a numpy.ndarray if NumPy is not present")
*/
                      }

                      /* "pyarrow/tensor.pxi":530
 *         cdef PyObject* out_coords
 * 
 *         check_status(SparseCOOTensorToNdarray(self.sp_sparse_tensor, self,             # <<<<<<<<<<<<<<
 *                                               &out_data, &out_coords))
 *         return PyObject_to_object(out_data), PyObject_to_object(out_coords)
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_sparse_tensor");
                        __PYX_ERR(5, 530, __pyx_L1_error)
                      }

                      /* "pyarrow/tensor.pxi":531
 * 
 *         check_status(SparseCOOTensorToNdarray(self.sp_sparse_tensor, self,
 *                                               &out_data, &out_coords))             # <<<<<<<<<<<<<<
 *         return PyObject_to_object(out_data), PyObject_to_object(out_coords)
 * 
*/
                      __pyx_t_5 = __pyx_f_7pyarrow_3lib_check_status(arrow::py::SparseCOOTensorToNdarray(__pyx_v_self->sp_sparse_tensor, ((PyObject *)__pyx_v_self), (&__pyx_v_out_data), (&__pyx_v_out_coords))); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(5, 530, __pyx_L1_error)

                      /* "pyarrow/tensor.pxi":532
 *         check_status(SparseCOOTensorToNdarray(self.sp_sparse_tensor, self,
 *                                               &out_data, &out_coords))
 *         return PyObject_to_object(out_data), PyObject_to_object(out_coords)             # <<<<<<<<<<<<<<
 * 
 *     def to_scipy(self):
*/
                      __Pyx_XDECREF(__pyx_r);
                      __pyx_t_1 = __pyx_f_7pyarrow_8includes_6common_PyObject_to_object(__pyx_v_out_data); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 532, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_t_3 = __pyx_f_7pyarrow_8includes_6common_PyObject_to_object(__pyx_v_out_coords); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 532, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_3);
                      __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 532, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_6);
                      __Pyx_GIVEREF(__pyx_t_1);
                      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1) != (0)) __PYX_ERR(5, 532, __pyx_L1_error);
                      __Pyx_GIVEREF(__pyx_t_3);
                      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_3) != (0)) __PYX_ERR(5, 532, __pyx_L1_error);
                      __pyx_t_1 = 0;
                      __pyx_t_3 = 0;
                      __pyx_r = __pyx_t_6;
                      __pyx_t_6 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/tensor.pxi":520
 *         return pyarrow_wrap_sparse_coo_tensor(csparse_tensor)
 * 
 *     def to_numpy(self):             # <<<<<<<<<<<<<<
 *         """
 *         Convert arrow::SparseCOOTensor to numpy.ndarrays with zero copy.
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_XDECREF(__pyx_t_6);
                      __Pyx_AddTraceback("pyarrow.lib.SparseCOOTensor.to_numpy", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/tensor.pxi":534
 *         return PyObject_to_object(out_data), PyObject_to_object(out_coords)
 * 
 *     def to_scipy(self):             # <<<<<<<<<<<<<<
 *         """
 *         Convert arrow::SparseCOOTensor to scipy.sparse.coo_array.
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCOOTensor_17to_scipy(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_15SparseCOOTensor_16to_scipy, "SparseCOOTensor.to_scipy(self)\n\nConvert arrow::SparseCOOTensor to scipy.sparse.coo_array.");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_15SparseCOOTensor_17to_scipy = {"to_scipy", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15SparseCOOTensor_17to_scipy, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15SparseCOOTensor_16to_scipy};
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCOOTensor_17to_scipy(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("to_scipy (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("to_scipy", 1, 0, 0, __pyx_nargs); return NULL; }
                      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                      if (unlikely(__pyx_kwds_len < 0)) return NULL;
                      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("to_scipy", __pyx_kwds); return NULL;}
                      __pyx_r = __pyx_pf_7pyarrow_3lib_15SparseCOOTensor_16to_scipy(((struct __pyx_obj_7pyarrow_3lib_SparseCOOTensor *)__pyx_v_self));

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

                    static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCOOTensor_16to_scipy(struct __pyx_obj_7pyarrow_3lib_SparseCOOTensor *__pyx_v_self) {
                      PyObject *__pyx_v_coo_array = NULL;
                      PyObject *__pyx_v_out_data;
                      PyObject *__pyx_v_out_coords;
                      PyObject *__pyx_v_data = NULL;
                      PyObject *__pyx_v_coords = NULL;
                      PyObject *__pyx_v_row = NULL;
                      PyObject *__pyx_v_col = NULL;
                      PyObject *__pyx_v_result = NULL;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      Py_ssize_t __pyx_t_3;
                      PyObject *__pyx_t_4 = NULL;
                      int __pyx_t_5;
                      PyObject *__pyx_t_6 = NULL;
                      PyObject *__pyx_t_7 = NULL;
                      PyObject *__pyx_t_8 = NULL;
                      PyObject *__pyx_t_9 = NULL;
                      size_t __pyx_t_10;
                      int __pyx_t_11;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("to_scipy", 0);

                      /* "pyarrow/tensor.pxi":538
 *         Convert arrow::SparseCOOTensor to scipy.sparse.coo_array.
 *         """
 *         from scipy.sparse import coo_array             # <<<<<<<<<<<<<<
 *         cdef PyObject* out_data
 *         cdef PyObject* out_coords
*/
                      {
                        PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_coo_array};
                        __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_scipy_sparse, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 538, __pyx_L1_error)
                      }
                      __pyx_t_1 = __pyx_t_2;
                      __Pyx_GOTREF(__pyx_t_1);
                      {
                        PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_coo_array};
                        __pyx_t_3 = 0; {
                          __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_1, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 538, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_4);
                          switch (__pyx_t_3) {
                            case 0:
                            __Pyx_INCREF(__pyx_t_4);
                            __pyx_v_coo_array = __pyx_t_4;
                            break;
                            default:;
                          }
                          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                        }
                      }
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

                      /* "pyarrow/tensor.pxi":542
 *         cdef PyObject* out_coords
 * 
 *         check_status(SparseCOOTensorToNdarray(self.sp_sparse_tensor, self,             # <<<<<<<<<<<<<<
 *                                               &out_data, &out_coords))
 *         data = PyObject_to_object(out_data)
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_sparse_tensor");
                        __PYX_ERR(5, 542, __pyx_L1_error)
                      }

                      /* "pyarrow/tensor.pxi":543
 * 
 *         check_status(SparseCOOTensorToNdarray(self.sp_sparse_tensor, self,
 *                                               &out_data, &out_coords))             # <<<<<<<<<<<<<<
 *         data = PyObject_to_object(out_data)
 *         coords = PyObject_to_object(out_coords)
*/
                      __pyx_t_5 = __pyx_f_7pyarrow_3lib_check_status(arrow::py::SparseCOOTensorToNdarray(__pyx_v_self->sp_sparse_tensor, ((PyObject *)__pyx_v_self), (&__pyx_v_out_data), (&__pyx_v_out_coords))); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(5, 542, __pyx_L1_error)

                      /* "pyarrow/tensor.pxi":544
 *         check_status(SparseCOOTensorToNdarray(self.sp_sparse_tensor, self,
 *                                               &out_data, &out_coords))
 *         data = PyObject_to_object(out_data)             # <<<<<<<<<<<<<<
 *         coords = PyObject_to_object(out_coords)
 *         row, col = coords[:, 0], coords[:, 1]
*/
                      __pyx_t_1 = __pyx_f_7pyarrow_8includes_6common_PyObject_to_object(__pyx_v_out_data); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 544, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_v_data = __pyx_t_1;
                      __pyx_t_1 = 0;

                      /* "pyarrow/tensor.pxi":545
 *                                               &out_data, &out_coords))
 *         data = PyObject_to_object(out_data)
 *         coords = PyObject_to_object(out_coords)             # <<<<<<<<<<<<<<
 *         row, col = coords[:, 0], coords[:, 1]
 *         result = coo_array((data[:, 0], (row, col)), shape=self.shape)
*/
                      __pyx_t_1 = __pyx_f_7pyarrow_8includes_6common_PyObject_to_object(__pyx_v_out_coords); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 545, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_v_coords = __pyx_t_1;
                      __pyx_t_1 = 0;

                      /* "pyarrow/tensor.pxi":546
 *         data = PyObject_to_object(out_data)
 *         coords = PyObject_to_object(out_coords)
 *         row, col = coords[:, 0], coords[:, 1]             # <<<<<<<<<<<<<<
 *         result = coo_array((data[:, 0], (row, col)), shape=self.shape)
 * 
*/
                      if (unlikely(__pyx_v_coords == Py_None)) {
                        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
                        __PYX_ERR(5, 546, __pyx_L1_error)
                      }
                      __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_coords, __pyx_mstate_global->__pyx_tuple[4]); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 546, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      if (unlikely(__pyx_v_coords == Py_None)) {
                        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
                        __PYX_ERR(5, 546, __pyx_L1_error)
                      }
                      __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v_coords, __pyx_mstate_global->__pyx_tuple[5]); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 546, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_4);
                      __pyx_v_row = __pyx_t_1;
                      __pyx_t_1 = 0;
                      __pyx_v_col = __pyx_t_4;
                      __pyx_t_4 = 0;

                      /* "pyarrow/tensor.pxi":547
 *         coords = PyObject_to_object(out_coords)
 *         row, col = coords[:, 0], coords[:, 1]
 *         result = coo_array((data[:, 0], (row, col)), shape=self.shape)             # <<<<<<<<<<<<<<
 * 
 *         # As the description in from_scipy above, we sorted indices matrix
*/
                      __pyx_t_1 = NULL;
                      __Pyx_INCREF(__pyx_v_coo_array);
                      __pyx_t_6 = __pyx_v_coo_array; 
                      if (unlikely(__pyx_v_data == Py_None)) {
                        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
                        __PYX_ERR(5, 547, __pyx_L1_error)
                      }
                      __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_data, __pyx_mstate_global->__pyx_tuple[4]); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 547, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_7);
                      __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 547, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_8);
                      __Pyx_INCREF(__pyx_v_row);
                      __Pyx_GIVEREF(__pyx_v_row);
                      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_row) != (0)) __PYX_ERR(5, 547, __pyx_L1_error);
                      __Pyx_INCREF(__pyx_v_col);
                      __Pyx_GIVEREF(__pyx_v_col);
                      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_col) != (0)) __PYX_ERR(5, 547, __pyx_L1_error);
                      __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 547, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_9);
                      __Pyx_GIVEREF(__pyx_t_7);
                      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7) != (0)) __PYX_ERR(5, 547, __pyx_L1_error);
                      __Pyx_GIVEREF(__pyx_t_8);
                      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_8) != (0)) __PYX_ERR(5, 547, __pyx_L1_error);
                      __pyx_t_7 = 0;
                      __pyx_t_8 = 0;
                      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_shape); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 547, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_8);
                      __pyx_t_10 = 1;
                      #if CYTHON_UNPACK_METHODS
                      if (unlikely(PyMethod_Check(__pyx_t_6))) {
                        __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
                        assert(__pyx_t_1);
                        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
                        __Pyx_INCREF(__pyx_t_1);
                        __Pyx_INCREF(__pyx__function);
                        __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
                        __pyx_t_10 = 0;
                      }
                      #endif
                      {
                        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_1, __pyx_t_9};
                        __pyx_t_7 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 547, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_7);
                        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_shape, __pyx_t_8, __pyx_t_7, __pyx_callargs+2, 0) < (0)) __PYX_ERR(5, 547, __pyx_L1_error)
                        __pyx_t_4 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_7);
                        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
                        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
                        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
                        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                        if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 547, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_4);
                      }
                      __pyx_v_result = __pyx_t_4;
                      __pyx_t_4 = 0;

                      /* "pyarrow/tensor.pxi":553
 *         # So, we must call sum_duplicates() to make the resulting coo_array
 *         # have canonical format.
 *         if self.has_canonical_format:             # <<<<<<<<<<<<<<
 *             result.sum_duplicates()
 *         return result
*/
                      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_has_canonical_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 553, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_4);
                      __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(5, 553, __pyx_L1_error)
                      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                      if (__pyx_t_11) {

                        /* "pyarrow/tensor.pxi":554
 *         # have canonical format.
 *         if self.has_canonical_format:
 *             result.sum_duplicates()             # <<<<<<<<<<<<<<
 *         return result
 * 
*/
                        __pyx_t_6 = __pyx_v_result;
                        __Pyx_INCREF(__pyx_t_6);
                        __pyx_t_10 = 0;
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
                          __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_sum_duplicates, __pyx_callargs+__pyx_t_10, (1-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
                          if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 554, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_4);
                        }
                        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

                        /* "pyarrow/tensor.pxi":553
 *         # So, we must call sum_duplicates() to make the resulting coo_array
 *         # have canonical format.
 *         if self.has_canonical_format:             # <<<<<<<<<<<<<<
 *             result.sum_duplicates()
 *         return result
*/
                      }

                      /* "pyarrow/tensor.pxi":555
 *         if self.has_canonical_format:
 *             result.sum_duplicates()
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     def to_pydata_sparse(self):
*/
                      __Pyx_XDECREF(__pyx_r);
                      __Pyx_INCREF(__pyx_v_result);
                      __pyx_r = __pyx_v_result;
                      goto __pyx_L0;

                      /* "pyarrow/tensor.pxi":534
 *         return PyObject_to_object(out_data), PyObject_to_object(out_coords)
 * 
 *     def to_scipy(self):             # <<<<<<<<<<<<<<
 *         """
 *         Convert arrow::SparseCOOTensor to scipy.sparse.coo_array.
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_4);
                      __Pyx_XDECREF(__pyx_t_6);
                      __Pyx_XDECREF(__pyx_t_7);
                      __Pyx_XDECREF(__pyx_t_8);
                      __Pyx_XDECREF(__pyx_t_9);
                      __Pyx_AddTraceback("pyarrow.lib.SparseCOOTensor.to_scipy", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XDECREF(__pyx_v_coo_array);
                      __Pyx_XDECREF(__pyx_v_data);
                      __Pyx_XDECREF(__pyx_v_coords);
                      __Pyx_XDECREF(__pyx_v_row);
                      __Pyx_XDECREF(__pyx_v_col);
                      __Pyx_XDECREF(__pyx_v_result);
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/tensor.pxi":557
 *         return result
 * 
 *     def to_pydata_sparse(self):             # <<<<<<<<<<<<<<
 *         """
 *         Convert arrow::SparseCOOTensor to pydata/sparse.COO.
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCOOTensor_19to_pydata_sparse(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_15SparseCOOTensor_18to_pydata_sparse, "SparseCOOTensor.to_pydata_sparse(self)\n\nConvert arrow::SparseCOOTensor to pydata/sparse.COO.");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_15SparseCOOTensor_19to_pydata_sparse = {"to_pydata_sparse", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15SparseCOOTensor_19to_pydata_sparse, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15SparseCOOTensor_18to_pydata_sparse};
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCOOTensor_19to_pydata_sparse(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("to_pydata_sparse (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("to_pydata_sparse", 1, 0, 0, __pyx_nargs); return NULL; }
                      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                      if (unlikely(__pyx_kwds_len < 0)) return NULL;
                      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("to_pydata_sparse", __pyx_kwds); return NULL;}
                      __pyx_r = __pyx_pf_7pyarrow_3lib_15SparseCOOTensor_18to_pydata_sparse(((struct __pyx_obj_7pyarrow_3lib_SparseCOOTensor *)__pyx_v_self));

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

                    static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCOOTensor_18to_pydata_sparse(struct __pyx_obj_7pyarrow_3lib_SparseCOOTensor *__pyx_v_self) {
                      PyObject *__pyx_v_COO = NULL;
                      PyObject *__pyx_v_out_data;
                      PyObject *__pyx_v_out_coords;
                      PyObject *__pyx_v_data = NULL;
                      PyObject *__pyx_v_coords = NULL;
                      PyObject *__pyx_v_result = NULL;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      Py_ssize_t __pyx_t_3;
                      PyObject *__pyx_t_4 = NULL;
                      int __pyx_t_5;
                      PyObject *__pyx_t_6 = NULL;
                      PyObject *__pyx_t_7 = NULL;
                      PyObject *__pyx_t_8 = NULL;
                      PyObject *__pyx_t_9 = NULL;
                      size_t __pyx_t_10;
                      PyObject *__pyx_t_11 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("to_pydata_sparse", 0);

                      /* "pyarrow/tensor.pxi":561
 *         Convert arrow::SparseCOOTensor to pydata/sparse.COO.
 *         """
 *         from sparse import COO             # <<<<<<<<<<<<<<
 *         cdef PyObject* out_data
 *         cdef PyObject* out_coords
*/
                      {
                        PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_COO};
                        __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sparse, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 561, __pyx_L1_error)
                      }
                      __pyx_t_1 = __pyx_t_2;
                      __Pyx_GOTREF(__pyx_t_1);
                      {
                        PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_COO};
                        __pyx_t_3 = 0; {
                          __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_1, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 561, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_4);
                          switch (__pyx_t_3) {
                            case 0:
                            __Pyx_INCREF(__pyx_t_4);
                            __pyx_v_COO = __pyx_t_4;
                            break;
                            default:;
                          }
                          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                        }
                      }
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

                      /* "pyarrow/tensor.pxi":565
 *         cdef PyObject* out_coords
 * 
 *         check_status(SparseCOOTensorToNdarray(self.sp_sparse_tensor, self,             # <<<<<<<<<<<<<<
 *                                               &out_data, &out_coords))
 *         data = PyObject_to_object(out_data)
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_sparse_tensor");
                        __PYX_ERR(5, 565, __pyx_L1_error)
                      }

                      /* "pyarrow/tensor.pxi":566
 * 
 *         check_status(SparseCOOTensorToNdarray(self.sp_sparse_tensor, self,
 *                                               &out_data, &out_coords))             # <<<<<<<<<<<<<<
 *         data = PyObject_to_object(out_data)
 *         coords = PyObject_to_object(out_coords)
*/
                      __pyx_t_5 = __pyx_f_7pyarrow_3lib_check_status(arrow::py::SparseCOOTensorToNdarray(__pyx_v_self->sp_sparse_tensor, ((PyObject *)__pyx_v_self), (&__pyx_v_out_data), (&__pyx_v_out_coords))); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(5, 565, __pyx_L1_error)

                      /* "pyarrow/tensor.pxi":567
 *         check_status(SparseCOOTensorToNdarray(self.sp_sparse_tensor, self,
 *                                               &out_data, &out_coords))
 *         data = PyObject_to_object(out_data)             # <<<<<<<<<<<<<<
 *         coords = PyObject_to_object(out_coords)
 *         result = COO(data=data[:, 0], coords=coords.T, shape=self.shape)
*/
                      __pyx_t_1 = __pyx_f_7pyarrow_8includes_6common_PyObject_to_object(__pyx_v_out_data); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 567, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_v_data = __pyx_t_1;
                      __pyx_t_1 = 0;

                      /* "pyarrow/tensor.pxi":568
 *                                               &out_data, &out_coords))
 *         data = PyObject_to_object(out_data)
 *         coords = PyObject_to_object(out_coords)             # <<<<<<<<<<<<<<
 *         result = COO(data=data[:, 0], coords=coords.T, shape=self.shape)
 *         return result
*/
                      __pyx_t_1 = __pyx_f_7pyarrow_8includes_6common_PyObject_to_object(__pyx_v_out_coords); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 568, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_v_coords = __pyx_t_1;
                      __pyx_t_1 = 0;

                      /* "pyarrow/tensor.pxi":569
 *         data = PyObject_to_object(out_data)
 *         coords = PyObject_to_object(out_coords)
 *         result = COO(data=data[:, 0], coords=coords.T, shape=self.shape)             # <<<<<<<<<<<<<<
 *         return result
 * 
*/
                      __pyx_t_4 = NULL;
                      __Pyx_INCREF(__pyx_v_COO);
                      __pyx_t_6 = __pyx_v_COO; 
                      if (unlikely(__pyx_v_data == Py_None)) {
                        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
                        __PYX_ERR(5, 569, __pyx_L1_error)
                      }
                      __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_data, __pyx_mstate_global->__pyx_tuple[4]); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 569, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_7);
                      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_coords, __pyx_mstate_global->__pyx_n_u_T); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 569, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_8);
                      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_shape); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 569, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_9);
                      __pyx_t_10 = 1;
                      #if CYTHON_UNPACK_METHODS
                      if (unlikely(PyMethod_Check(__pyx_t_6))) {
                        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
                        assert(__pyx_t_4);
                        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
                        __Pyx_INCREF(__pyx_t_4);
                        __Pyx_INCREF(__pyx__function);
                        __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
                        __pyx_t_10 = 0;
                      }
                      #endif
                      {
                        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 3 : 0)] = {__pyx_t_4, NULL};
                        __pyx_t_11 = __Pyx_MakeVectorcallBuilderKwds(3); if (unlikely(!__pyx_t_11)) __PYX_ERR(5, 569, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_11);
                        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_data, __pyx_t_7, __pyx_t_11, __pyx_callargs+1, 0) < (0)) __PYX_ERR(5, 569, __pyx_L1_error)
                        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_coords, __pyx_t_8, __pyx_t_11, __pyx_callargs+1, 1) < (0)) __PYX_ERR(5, 569, __pyx_L1_error)
                        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_shape, __pyx_t_9, __pyx_t_11, __pyx_callargs+1, 2) < (0)) __PYX_ERR(5, 569, __pyx_L1_error)
                        __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_10, (1-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_11);
                        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
                        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
                        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
                        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 569, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __pyx_v_result = __pyx_t_1;
                      __pyx_t_1 = 0;

                      /* "pyarrow/tensor.pxi":570
 *         coords = PyObject_to_object(out_coords)
 *         result = COO(data=data[:, 0], coords=coords.T, shape=self.shape)
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     def to_tensor(self):
*/
                      __Pyx_XDECREF(__pyx_r);
                      __Pyx_INCREF(__pyx_v_result);
                      __pyx_r = __pyx_v_result;
                      goto __pyx_L0;

                      /* "pyarrow/tensor.pxi":557
 *         return result
 * 
 *     def to_pydata_sparse(self):             # <<<<<<<<<<<<<<
 *         """
 *         Convert arrow::SparseCOOTensor to pydata/sparse.COO.
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_4);
                      __Pyx_XDECREF(__pyx_t_6);
                      __Pyx_XDECREF(__pyx_t_7);
                      __Pyx_XDECREF(__pyx_t_8);
                      __Pyx_XDECREF(__pyx_t_9);
                      __Pyx_XDECREF(__pyx_t_11);
                      __Pyx_AddTraceback("pyarrow.lib.SparseCOOTensor.to_pydata_sparse", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XDECREF(__pyx_v_COO);
                      __Pyx_XDECREF(__pyx_v_data);
                      __Pyx_XDECREF(__pyx_v_coords);
                      __Pyx_XDECREF(__pyx_v_result);
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/tensor.pxi":572
 *         return result
 * 
 *     def to_tensor(self):             # <<<<<<<<<<<<<<
 *         """
 *         Convert arrow::SparseCOOTensor to arrow::Tensor.
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCOOTensor_21to_tensor(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_15SparseCOOTensor_20to_tensor, "SparseCOOTensor.to_tensor(self)\n\nConvert arrow::SparseCOOTensor to arrow::Tensor.");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_15SparseCOOTensor_21to_tensor = {"to_tensor", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15SparseCOOTensor_21to_tensor, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15SparseCOOTensor_20to_tensor};
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCOOTensor_21to_tensor(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("to_tensor (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("to_tensor", 1, 0, 0, __pyx_nargs); return NULL; }
                      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                      if (unlikely(__pyx_kwds_len < 0)) return NULL;
                      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("to_tensor", __pyx_kwds); return NULL;}
                      __pyx_r = __pyx_pf_7pyarrow_3lib_15SparseCOOTensor_20to_tensor(((struct __pyx_obj_7pyarrow_3lib_SparseCOOTensor *)__pyx_v_self));

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

                    static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCOOTensor_20to_tensor(struct __pyx_obj_7pyarrow_3lib_SparseCOOTensor *__pyx_v_self) {
                      std::shared_ptr< arrow::Tensor>  __pyx_v_ctensor;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      std::shared_ptr< arrow::Tensor>  __pyx_t_1;
                      PyObject *__pyx_t_2 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("to_tensor", 0);

                      /* "pyarrow/tensor.pxi":578
 * 
 *         cdef shared_ptr[CTensor] ctensor
 *         with nogil:             # <<<<<<<<<<<<<<
 *             ctensor = GetResultValue(self.stp.ToTensor())
 * 
*/
                      {
                          PyThreadState * _save;
                          _save = PyEval_SaveThread();
                          __Pyx_FastGIL_Remember();
                          /*try:*/ {

                            /* "pyarrow/tensor.pxi":579
 *         cdef shared_ptr[CTensor] ctensor
 *         with nogil:
 *             ctensor = GetResultValue(self.stp.ToTensor())             # <<<<<<<<<<<<<<
 * 
 *         return pyarrow_wrap_tensor(ctensor)
*/
                            if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                              PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "stp");
                              __Pyx_PyGILState_Release(__pyx_gilstate_save);
                              __PYX_ERR(5, 579, __pyx_L4_error)
                            }
                            __pyx_t_1 = arrow::py::GetResultValue<std::shared_ptr< arrow::Tensor> >(__pyx_v_self->stp->ToTensor()); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(5, 579, __pyx_L4_error)
                            __pyx_v_ctensor = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_1);
                          }

                          /* "pyarrow/tensor.pxi":578
 * 
 *         cdef shared_ptr[CTensor] ctensor
 *         with nogil:             # <<<<<<<<<<<<<<
 *             ctensor = GetResultValue(self.stp.ToTensor())
 * 
*/
                          /*finally:*/ {
                            /*normal exit:*/{
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L5;
                            }
                            __pyx_L4_error: {
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L1_error;
                            }
                            __pyx_L5:;
                          }
                      }

                      /* "pyarrow/tensor.pxi":581
 *             ctensor = GetResultValue(self.stp.ToTensor())
 * 
 *         return pyarrow_wrap_tensor(ctensor)             # <<<<<<<<<<<<<<
 * 
 *     def equals(self, SparseCOOTensor other):
*/
                      __Pyx_XDECREF(__pyx_r);
                      __pyx_t_2 = pyarrow_wrap_tensor(__pyx_v_ctensor); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 581, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_2);
                      __pyx_r = __pyx_t_2;
                      __pyx_t_2 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/tensor.pxi":572
 *         return result
 * 
 *     def to_tensor(self):             # <<<<<<<<<<<<<<
 *         """
 *         Convert arrow::SparseCOOTensor to arrow::Tensor.
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_AddTraceback("pyarrow.lib.SparseCOOTensor.to_tensor", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/tensor.pxi":583
 *         return pyarrow_wrap_tensor(ctensor)
 * 
 *     def equals(self, SparseCOOTensor other):             # <<<<<<<<<<<<<<
 *         """
 *         Return true if sparse tensors contains exactly equal data.
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCOOTensor_23equals(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_15SparseCOOTensor_22equals, "SparseCOOTensor.equals(self, SparseCOOTensor other)\n\nReturn true if sparse tensors contains exactly equal data.\n\nParameters\n----------\nother : SparseCOOTensor\n    The other tensor to compare for equality.");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_15SparseCOOTensor_23equals = {"equals", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15SparseCOOTensor_23equals, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15SparseCOOTensor_22equals};
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCOOTensor_23equals(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      struct __pyx_obj_7pyarrow_3lib_SparseCOOTensor *__pyx_v_other = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[1] = {0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("equals (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_other,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(5, 583, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(5, 583, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "equals", 0) < (0)) __PYX_ERR(5, 583, __pyx_L3_error)
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("equals", 1, 1, 1, i); __PYX_ERR(5, 583, __pyx_L3_error) }
                          }
                        } else if (unlikely(__pyx_nargs != 1)) {
                          goto __pyx_L5_argtuple_error;
                        } else {
                          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(5, 583, __pyx_L3_error)
                        }
                        __pyx_v_other = ((struct __pyx_obj_7pyarrow_3lib_SparseCOOTensor *)values[0]);
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("equals", 1, 1, 1, __pyx_nargs); __PYX_ERR(5, 583, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.SparseCOOTensor.equals", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_SparseCOOTensor, 1, "other", 0))) __PYX_ERR(5, 583, __pyx_L1_error)
                      __pyx_r = __pyx_pf_7pyarrow_3lib_15SparseCOOTensor_22equals(((struct __pyx_obj_7pyarrow_3lib_SparseCOOTensor *)__pyx_v_self), __pyx_v_other);

                      /* function exit code */
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __pyx_r = NULL;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      goto __pyx_L7_cleaned_up;
                      __pyx_L0:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __pyx_L7_cleaned_up:;
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCOOTensor_22equals(struct __pyx_obj_7pyarrow_3lib_SparseCOOTensor *__pyx_v_self, struct __pyx_obj_7pyarrow_3lib_SparseCOOTensor *__pyx_v_other) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("equals", 0);

                      /* "pyarrow/tensor.pxi":592
 *             The other tensor to compare for equality.
 *         """
 *         return self.stp.Equals(deref(other.stp))             # <<<<<<<<<<<<<<
 * 
 *     def __eq__(self, other):
*/
                      __Pyx_XDECREF(__pyx_r);
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "stp");
                        __PYX_ERR(5, 592, __pyx_L1_error)
                      }
                      if (unlikely(((PyObject *)__pyx_v_other) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "stp");
                        __PYX_ERR(5, 592, __pyx_L1_error)
                      }
                      __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->stp->Equals((*__pyx_v_other->stp))); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 592, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_r = __pyx_t_1;
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/tensor.pxi":583
 *         return pyarrow_wrap_tensor(ctensor)
 * 
 *     def equals(self, SparseCOOTensor other):             # <<<<<<<<<<<<<<
 *         """
 *         Return true if sparse tensors contains exactly equal data.
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_AddTraceback("pyarrow.lib.SparseCOOTensor.equals", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/tensor.pxi":594
 *         return self.stp.Equals(deref(other.stp))
 * 
 *     def __eq__(self, other):             # <<<<<<<<<<<<<<
 *         if isinstance(other, SparseCOOTensor):
 *             return self.equals(other)
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCOOTensor_25__eq__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCOOTensor_25__eq__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__eq__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_15SparseCOOTensor_24__eq__(((struct __pyx_obj_7pyarrow_3lib_SparseCOOTensor *)__pyx_v_self), ((PyObject *)__pyx_v_other));

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

                    static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCOOTensor_24__eq__(struct __pyx_obj_7pyarrow_3lib_SparseCOOTensor *__pyx_v_self, PyObject *__pyx_v_other) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_t_1;
                      PyObject *__pyx_t_2 = NULL;
                      PyObject *__pyx_t_3 = NULL;
                      size_t __pyx_t_4;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__eq__", 0);

                      /* "pyarrow/tensor.pxi":595
 * 
 *     def __eq__(self, other):
 *         if isinstance(other, SparseCOOTensor):             # <<<<<<<<<<<<<<
 *             return self.equals(other)
 *         else:
*/
                      __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_other, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_SparseCOOTensor); 
                      if (__pyx_t_1) {

                        /* "pyarrow/tensor.pxi":596
 *     def __eq__(self, other):
 *         if isinstance(other, SparseCOOTensor):
 *             return self.equals(other)             # <<<<<<<<<<<<<<
 *         else:
 *             return NotImplemented
*/
                        __Pyx_XDECREF(__pyx_r);
                        __pyx_t_3 = ((PyObject *)__pyx_v_self);
                        __Pyx_INCREF(__pyx_t_3);
                        __pyx_t_4 = 0;
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_other};
                          __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_equals, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                          if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 596, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_2);
                        }
                        __pyx_r = __pyx_t_2;
                        __pyx_t_2 = 0;
                        goto __pyx_L0;

                        /* "pyarrow/tensor.pxi":595
 * 
 *     def __eq__(self, other):
 *         if isinstance(other, SparseCOOTensor):             # <<<<<<<<<<<<<<
 *             return self.equals(other)
 *         else:
*/
                      }

                      /* "pyarrow/tensor.pxi":598
 *             return self.equals(other)
 *         else:
 *             return NotImplemented             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
                      /*else*/ {
                        __Pyx_XDECREF(__pyx_r);
                        __Pyx_INCREF(__pyx_builtin_NotImplemented);
                        __pyx_r = __pyx_builtin_NotImplemented;
                        goto __pyx_L0;
                      }

                      /* "pyarrow/tensor.pxi":594
 *         return self.stp.Equals(deref(other.stp))
 * 
 *     def __eq__(self, other):             # <<<<<<<<<<<<<<
 *         if isinstance(other, SparseCOOTensor):
 *             return self.equals(other)
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_AddTraceback("pyarrow.lib.SparseCOOTensor.__eq__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/tensor.pxi":600
 *             return NotImplemented
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_mutable(self):
 *         return self.stp.is_mutable()
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCOOTensor_10is_mutable_1__get__(PyObject *__pyx_v_self); /*proto*/
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCOOTensor_10is_mutable_1__get__(PyObject *__pyx_v_self) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_15SparseCOOTensor_10is_mutable___get__(((struct __pyx_obj_7pyarrow_3lib_SparseCOOTensor *)__pyx_v_self));

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

                    static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCOOTensor_10is_mutable___get__(struct __pyx_obj_7pyarrow_3lib_SparseCOOTensor *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__get__", 0);

                      /* "pyarrow/tensor.pxi":602
 *     @property
 *     def is_mutable(self):
 *         return self.stp.is_mutable()             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
                      __Pyx_XDECREF(__pyx_r);
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "stp");
                        __PYX_ERR(5, 602, __pyx_L1_error)
                      }
                      __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->stp->is_mutable()); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 602, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_r = __pyx_t_1;
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/tensor.pxi":600
 *             return NotImplemented
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_mutable(self):
 *         return self.stp.is_mutable()
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_AddTraceback("pyarrow.lib.SparseCOOTensor.is_mutable.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/tensor.pxi":604
 *         return self.stp.is_mutable()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def ndim(self):
 *         return self.stp.ndim()
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCOOTensor_4ndim_1__get__(PyObject *__pyx_v_self); /*proto*/
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCOOTensor_4ndim_1__get__(PyObject *__pyx_v_self) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_15SparseCOOTensor_4ndim___get__(((struct __pyx_obj_7pyarrow_3lib_SparseCOOTensor *)__pyx_v_self));

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

                    static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCOOTensor_4ndim___get__(struct __pyx_obj_7pyarrow_3lib_SparseCOOTensor *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__get__", 0);

                      /* "pyarrow/tensor.pxi":606
 *     @property
 *     def ndim(self):
 *         return self.stp.ndim()             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
                      __Pyx_XDECREF(__pyx_r);
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "stp");
                        __PYX_ERR(5, 606, __pyx_L1_error)
                      }
                      __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_v_self->stp->ndim()); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 606, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_r = __pyx_t_1;
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/tensor.pxi":604
 *         return self.stp.is_mutable()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def ndim(self):
 *         return self.stp.ndim()
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_AddTraceback("pyarrow.lib.SparseCOOTensor.ndim.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/tensor.pxi":608
 *         return self.stp.ndim()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def shape(self):
 *         # Cython knows how to convert a vector[T] to a Python list
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCOOTensor_5shape_1__get__(PyObject *__pyx_v_self); /*proto*/
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCOOTensor_5shape_1__get__(PyObject *__pyx_v_self) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_15SparseCOOTensor_5shape___get__(((struct __pyx_obj_7pyarrow_3lib_SparseCOOTensor *)__pyx_v_self));

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

                    static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCOOTensor_5shape___get__(struct __pyx_obj_7pyarrow_3lib_SparseCOOTensor *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__get__", 0);

                      /* "pyarrow/tensor.pxi":611
 *     def shape(self):
 *         # Cython knows how to convert a vector[T] to a Python list
 *         return tuple(self.stp.shape())             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
                      __Pyx_XDECREF(__pyx_r);
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "stp");
                        __PYX_ERR(5, 611, __pyx_L1_error)
                      }
                      __pyx_t_1 = __pyx_convert_vector_to_py_int64_t(__pyx_v_self->stp->shape()); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 611, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_t_2 = __Pyx_PySequence_Tuple(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 611, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_2);
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      __pyx_r = __pyx_t_2;
                      __pyx_t_2 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/tensor.pxi":608
 *         return self.stp.ndim()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def shape(self):
 *         # Cython knows how to convert a vector[T] to a Python list
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_AddTraceback("pyarrow.lib.SparseCOOTensor.shape.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/tensor.pxi":613
 *         return tuple(self.stp.shape())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def size(self):
 *         return self.stp.size()
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCOOTensor_4size_1__get__(PyObject *__pyx_v_self); /*proto*/
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCOOTensor_4size_1__get__(PyObject *__pyx_v_self) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_15SparseCOOTensor_4size___get__(((struct __pyx_obj_7pyarrow_3lib_SparseCOOTensor *)__pyx_v_self));

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

                    static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCOOTensor_4size___get__(struct __pyx_obj_7pyarrow_3lib_SparseCOOTensor *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__get__", 0);

                      /* "pyarrow/tensor.pxi":615
 *     @property
 *     def size(self):
 *         return self.stp.size()             # <<<<<<<<<<<<<<
 * 
 *     def dim_name(self, i):
*/
                      __Pyx_XDECREF(__pyx_r);
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "stp");
                        __PYX_ERR(5, 615, __pyx_L1_error)
                      }
                      __pyx_t_1 = __Pyx_PyLong_From_int64_t(__pyx_v_self->stp->size()); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 615, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_r = __pyx_t_1;
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/tensor.pxi":613
 *         return tuple(self.stp.shape())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def size(self):
 *         return self.stp.size()
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_AddTraceback("pyarrow.lib.SparseCOOTensor.size.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/tensor.pxi":617
 *         return self.stp.size()
 * 
 *     def dim_name(self, i):             # <<<<<<<<<<<<<<
 *         """
 *         Returns the name of the i-th tensor dimension.
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCOOTensor_27dim_name(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_15SparseCOOTensor_26dim_name, "SparseCOOTensor.dim_name(self, i)\n\nReturns the name of the i-th tensor dimension.\n\nParameters\n----------\ni : int\n    The physical index of the tensor dimension.\n\nReturns\n-------\nstr");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_15SparseCOOTensor_27dim_name = {"dim_name", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15SparseCOOTensor_27dim_name, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15SparseCOOTensor_26dim_name};
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCOOTensor_27dim_name(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      PyObject *__pyx_v_i = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[1] = {0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("dim_name (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_i,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(5, 617, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(5, 617, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "dim_name", 0) < (0)) __PYX_ERR(5, 617, __pyx_L3_error)
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("dim_name", 1, 1, 1, i); __PYX_ERR(5, 617, __pyx_L3_error) }
                          }
                        } else if (unlikely(__pyx_nargs != 1)) {
                          goto __pyx_L5_argtuple_error;
                        } else {
                          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(5, 617, __pyx_L3_error)
                        }
                        __pyx_v_i = values[0];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("dim_name", 1, 1, 1, __pyx_nargs); __PYX_ERR(5, 617, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.SparseCOOTensor.dim_name", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_15SparseCOOTensor_26dim_name(((struct __pyx_obj_7pyarrow_3lib_SparseCOOTensor *)__pyx_v_self), __pyx_v_i);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCOOTensor_26dim_name(struct __pyx_obj_7pyarrow_3lib_SparseCOOTensor *__pyx_v_self, PyObject *__pyx_v_i) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      PyObject *__pyx_t_3 = NULL;
                      int __pyx_t_4;
                      PyObject *__pyx_t_5 = NULL;
                      size_t __pyx_t_6;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("dim_name", 0);

                      /* "pyarrow/tensor.pxi":630
 *         str
 *         """
 *         return frombytes(self.stp.dim_name(i))             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
                      __Pyx_XDECREF(__pyx_r);
                      __pyx_t_2 = NULL;
                      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_frombytes); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 630, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_3);
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "stp");
                        __PYX_ERR(5, 630, __pyx_L1_error)
                      }
                      __pyx_t_4 = __Pyx_PyLong_As_int(__pyx_v_i); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(5, 630, __pyx_L1_error)
                      __pyx_t_5 = __pyx_convert_PyBytes_string_to_py_6libcpp_6string_std__in_string(__pyx_v_self->stp->dim_name(__pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 630, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_5);
                      __pyx_t_6 = 1;
                      #if CYTHON_UNPACK_METHODS
                      if (unlikely(PyMethod_Check(__pyx_t_3))) {
                        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
                        assert(__pyx_t_2);
                        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
                        __Pyx_INCREF(__pyx_t_2);
                        __Pyx_INCREF(__pyx__function);
                        __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
                        __pyx_t_6 = 0;
                      }
                      #endif
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_5};
                        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 630, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __pyx_r = __pyx_t_1;
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/tensor.pxi":617
 *         return self.stp.size()
 * 
 *     def dim_name(self, i):             # <<<<<<<<<<<<<<
 *         """
 *         Returns the name of the i-th tensor dimension.
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_XDECREF(__pyx_t_5);
                      __Pyx_AddTraceback("pyarrow.lib.SparseCOOTensor.dim_name", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/tensor.pxi":632
 *         return frombytes(self.stp.dim_name(i))
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def dim_names(self):
 *         names_tuple = tuple(self.stp.dim_names())
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCOOTensor_9dim_names_1__get__(PyObject *__pyx_v_self); /*proto*/
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCOOTensor_9dim_names_1__get__(PyObject *__pyx_v_self) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_15SparseCOOTensor_9dim_names___get__(((struct __pyx_obj_7pyarrow_3lib_SparseCOOTensor *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }
                    static PyObject *__pyx_gb_7pyarrow_3lib_15SparseCOOTensor_9dim_names_7__get___2generator17(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

                    /* "pyarrow/tensor.pxi":635
 *     def dim_names(self):
 *         names_tuple = tuple(self.stp.dim_names())
 *         return tuple(frombytes(x) for x in names_tuple)             # <<<<<<<<<<<<<<
 * 
 *     @property
*/

                    static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCOOTensor_9dim_names_7__get___genexpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0) {
                      struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_17_genexpr *__pyx_cur_scope;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("genexpr", 0);
                      __pyx_cur_scope = (struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_17_genexpr *)__pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_17_genexpr(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_17_genexpr, __pyx_mstate_global->__pyx_empty_tuple, NULL);
                      if (unlikely(!__pyx_cur_scope)) {
                        __pyx_cur_scope = ((struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_17_genexpr *)Py_None);
                        __Pyx_INCREF(Py_None);
                        __PYX_ERR(5, 635, __pyx_L1_error)
                      } else {
                        __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
                      }
                      __pyx_cur_scope->__pyx_genexpr_arg_0 = __pyx_genexpr_arg_0;
                      __Pyx_INCREF(__pyx_cur_scope->__pyx_genexpr_arg_0);
                      __Pyx_GIVEREF(__pyx_cur_scope->__pyx_genexpr_arg_0);
                      {
                        __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7pyarrow_3lib_15SparseCOOTensor_9dim_names_7__get___2generator17, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[16]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_SparseCOOTensor___get___locals_g, __pyx_mstate_global->__pyx_n_u_pyarrow_lib); if (unlikely(!gen)) __PYX_ERR(5, 635, __pyx_L1_error)
                        __Pyx_DECREF(__pyx_cur_scope);
                        __Pyx_RefNannyFinishContext();
                        return (PyObject *) gen;
                      }

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib.SparseCOOTensor.dim_names.__get__.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __Pyx_DECREF((PyObject *)__pyx_cur_scope);
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_gb_7pyarrow_3lib_15SparseCOOTensor_9dim_names_7__get___2generator17(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
                      struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_17_genexpr *__pyx_cur_scope = ((struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_17_genexpr *)__pyx_generator->closure);
                      PyObject *__pyx_r = NULL;
                      PyObject *__pyx_t_1 = NULL;
                      Py_ssize_t __pyx_t_2;
                      PyObject *__pyx_t_3 = NULL;
                      PyObject *__pyx_t_4 = NULL;
                      PyObject *__pyx_t_5 = NULL;
                      size_t __pyx_t_6;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("genexpr", 0);
                      switch (__pyx_generator->resume_label) {
                        case 0: goto __pyx_L3_first_run;
                        case 1: goto __pyx_L6_resume_from_yield;
                        default: /* CPython raises the right error here */
                        __Pyx_RefNannyFinishContext();
                        return NULL;
                      }
                      __pyx_L3_first_run:;
                      if (unlikely(__pyx_sent_value != Py_None)) {
                        if (unlikely(__pyx_sent_value)) PyErr_SetString(PyExc_TypeError, "can't send non-None value to a just-started generator");
                        __PYX_ERR(5, 635, __pyx_L1_error)
                      }
                      if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(5, 635, __pyx_L1_error) }
                      __pyx_t_1 = __pyx_cur_scope->__pyx_genexpr_arg_0; __Pyx_INCREF(__pyx_t_1);
                      __pyx_t_2 = 0;
                      for (;;) {
                        {
                          Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
                          #if !CYTHON_ASSUME_SAFE_SIZE
                          if (unlikely((__pyx_temp < 0))) __PYX_ERR(5, 635, __pyx_L1_error)
                          #endif
                          if (__pyx_t_2 >= __pyx_temp) break;
                        }
                        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                        __pyx_t_3 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2));
                        #else
                        __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2);
                        #endif
                        ++__pyx_t_2;
                        if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 635, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_3);
                        __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_x);
                        __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_x, __pyx_t_3);
                        __Pyx_GIVEREF(__pyx_t_3);
                        __pyx_t_3 = 0;
                        __pyx_t_4 = NULL;
                        __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_frombytes); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 635, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_5);
                        __pyx_t_6 = 1;
                        #if CYTHON_UNPACK_METHODS
                        if (unlikely(PyMethod_Check(__pyx_t_5))) {
                          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
                          assert(__pyx_t_4);
                          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
                          __Pyx_INCREF(__pyx_t_4);
                          __Pyx_INCREF(__pyx__function);
                          __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
                          __pyx_t_6 = 0;
                        }
                        #endif
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_cur_scope->__pyx_v_x};
                          __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                          if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 635, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_3);
                        }
                        __pyx_r = __pyx_t_3;
                        __pyx_t_3 = 0;
                        __Pyx_XGIVEREF(__pyx_t_1);
                        __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
                        __pyx_cur_scope->__pyx_t_1 = __pyx_t_2;
                        __Pyx_XGIVEREF(__pyx_r);
                        __Pyx_RefNannyFinishContext();
                        __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
                        /* return from generator, yielding value */
                        __pyx_generator->resume_label = 1;
                        return __pyx_r;
                        __pyx_L6_resume_from_yield:;
                        __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
                        __pyx_cur_scope->__pyx_t_0 = 0;
                        __Pyx_XGOTREF(__pyx_t_1);
                        __pyx_t_2 = __pyx_cur_scope->__pyx_t_1;
                        if (unlikely(!__pyx_sent_value)) __PYX_ERR(5, 635, __pyx_L1_error)
                      }
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

                      /* function exit code */
                      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_XDECREF(__pyx_t_4);
                      __Pyx_XDECREF(__pyx_t_5);
                      if (__Pyx_PyErr_Occurred()) {
                        __Pyx_Generator_Replace_StopIteration(0);
                        __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      }
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      #if !CYTHON_USE_EXC_INFO_STACK
                      __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
                      #endif
                      __pyx_generator->resume_label = -1;
                      __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/tensor.pxi":632
 *         return frombytes(self.stp.dim_name(i))
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def dim_names(self):
 *         names_tuple = tuple(self.stp.dim_names())
*/

                    static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCOOTensor_9dim_names___get__(struct __pyx_obj_7pyarrow_3lib_SparseCOOTensor *__pyx_v_self) {
                      PyObject *__pyx_v_names_tuple = NULL;
                      PyObject *__pyx_gb_7pyarrow_3lib_15SparseCOOTensor_9dim_names_7__get___2generator17 = 0;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__get__", 0);

                      /* "pyarrow/tensor.pxi":634
 *     @property
 *     def dim_names(self):
 *         names_tuple = tuple(self.stp.dim_names())             # <<<<<<<<<<<<<<
 *         return tuple(frombytes(x) for x in names_tuple)
 * 
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "stp");
                        __PYX_ERR(5, 634, __pyx_L1_error)
                      }
                      __pyx_t_1 = __pyx_convert_vector_to_py_std_3a__3a_string(__pyx_v_self->stp->dim_names()); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 634, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_t_2 = __Pyx_PySequence_Tuple(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 634, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_2);
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      __pyx_v_names_tuple = ((PyObject*)__pyx_t_2);
                      __pyx_t_2 = 0;

                      /* "pyarrow/tensor.pxi":635
 *     def dim_names(self):
 *         names_tuple = tuple(self.stp.dim_names())
 *         return tuple(frombytes(x) for x in names_tuple)             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
                      __Pyx_XDECREF(__pyx_r);
                      __pyx_t_2 = __pyx_pf_7pyarrow_3lib_15SparseCOOTensor_9dim_names_7__get___genexpr(NULL, __pyx_v_names_tuple); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 635, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_2);
                      __pyx_t_1 = __Pyx_PySequence_Tuple(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 635, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                      __pyx_r = __pyx_t_1;
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/tensor.pxi":632
 *         return frombytes(self.stp.dim_name(i))
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def dim_names(self):
 *         names_tuple = tuple(self.stp.dim_names())
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_AddTraceback("pyarrow.lib.SparseCOOTensor.dim_names.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XDECREF(__pyx_v_names_tuple);
                      __Pyx_XDECREF(__pyx_gb_7pyarrow_3lib_15SparseCOOTensor_9dim_names_7__get___2generator17);
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/tensor.pxi":637
 *         return tuple(frombytes(x) for x in names_tuple)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def non_zero_length(self):
 *         return self.stp.non_zero_length()
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCOOTensor_15non_zero_length_1__get__(PyObject *__pyx_v_self); /*proto*/
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCOOTensor_15non_zero_length_1__get__(PyObject *__pyx_v_self) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_15SparseCOOTensor_15non_zero_length___get__(((struct __pyx_obj_7pyarrow_3lib_SparseCOOTensor *)__pyx_v_self));

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

                    static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCOOTensor_15non_zero_length___get__(struct __pyx_obj_7pyarrow_3lib_SparseCOOTensor *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__get__", 0);

                      /* "pyarrow/tensor.pxi":639
 *     @property
 *     def non_zero_length(self):
 *         return self.stp.non_zero_length()             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
                      __Pyx_XDECREF(__pyx_r);
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "stp");
                        __PYX_ERR(5, 639, __pyx_L1_error)
                      }
                      __pyx_t_1 = __Pyx_PyLong_From_int64_t(__pyx_v_self->stp->non_zero_length()); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 639, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_r = __pyx_t_1;
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/tensor.pxi":637
 *         return tuple(frombytes(x) for x in names_tuple)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def non_zero_length(self):
 *         return self.stp.non_zero_length()
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_AddTraceback("pyarrow.lib.SparseCOOTensor.non_zero_length.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/tensor.pxi":641
 *         return self.stp.non_zero_length()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def has_canonical_format(self):
 *         cdef:
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCOOTensor_20has_canonical_format_1__get__(PyObject *__pyx_v_self); /*proto*/
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCOOTensor_20has_canonical_format_1__get__(PyObject *__pyx_v_self) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_15SparseCOOTensor_20has_canonical_format___get__(((struct __pyx_obj_7pyarrow_3lib_SparseCOOTensor *)__pyx_v_self));

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

                    static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCOOTensor_20has_canonical_format___get__(struct __pyx_obj_7pyarrow_3lib_SparseCOOTensor *__pyx_v_self) {
                      __pyx_t_7pyarrow_3lib__CSparseCOOIndexPtr __pyx_v_csi;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_t_1;
                      PyObject *__pyx_t_2 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__get__", 0);

                      /* "pyarrow/tensor.pxi":646
 *             _CSparseCOOIndexPtr csi
 * 
 *         csi = <_CSparseCOOIndexPtr>(self.stp.sparse_index().get())             # <<<<<<<<<<<<<<
 *         if csi != nullptr:
 *             return csi.is_canonical()
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "stp");
                        __PYX_ERR(5, 646, __pyx_L1_error)
                      }
                      __pyx_v_csi = ((__pyx_t_7pyarrow_3lib__CSparseCOOIndexPtr)__pyx_v_self->stp->sparse_index().get());

                      /* "pyarrow/tensor.pxi":647
 * 
 *         csi = <_CSparseCOOIndexPtr>(self.stp.sparse_index().get())
 *         if csi != nullptr:             # <<<<<<<<<<<<<<
 *             return csi.is_canonical()
 *         return True
*/
                      __pyx_t_1 = (__pyx_v_csi != nullptr);
                      if (__pyx_t_1) {

                        /* "pyarrow/tensor.pxi":648
 *         csi = <_CSparseCOOIndexPtr>(self.stp.sparse_index().get())
 *         if csi != nullptr:
 *             return csi.is_canonical()             # <<<<<<<<<<<<<<
 *         return True
 * 
*/
                        __Pyx_XDECREF(__pyx_r);
                        __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_csi->is_canonical()); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 648, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_2);
                        __pyx_r = __pyx_t_2;
                        __pyx_t_2 = 0;
                        goto __pyx_L0;

                        /* "pyarrow/tensor.pxi":647
 * 
 *         csi = <_CSparseCOOIndexPtr>(self.stp.sparse_index().get())
 *         if csi != nullptr:             # <<<<<<<<<<<<<<
 *             return csi.is_canonical()
 *         return True
*/
                      }

                      /* "pyarrow/tensor.pxi":649
 *         if csi != nullptr:
 *             return csi.is_canonical()
 *         return True             # <<<<<<<<<<<<<<
 * 
 * cdef class SparseCSRMatrix(_Weakrefable):
*/
                      __Pyx_XDECREF(__pyx_r);
                      __Pyx_INCREF(Py_True);
                      __pyx_r = Py_True;
                      goto __pyx_L0;

                      /* "pyarrow/tensor.pxi":641
 *         return self.stp.non_zero_length()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def has_canonical_format(self):
 *         cdef:
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_AddTraceback("pyarrow.lib.SparseCOOTensor.has_canonical_format.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/lib.pxd":338
 * 
 *     cdef readonly:
 *         DataType type             # <<<<<<<<<<<<<<
 * 
 *     cdef void init(self, const shared_ptr[CSparseCOOTensor]& sp_sparse_tensor)
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCOOTensor_4type_1__get__(PyObject *__pyx_v_self); /*proto*/
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCOOTensor_4type_1__get__(PyObject *__pyx_v_self) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_15SparseCOOTensor_4type___get__(((struct __pyx_obj_7pyarrow_3lib_SparseCOOTensor *)__pyx_v_self));

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

                    static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCOOTensor_4type___get__(struct __pyx_obj_7pyarrow_3lib_SparseCOOTensor *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__get__", 0);
                      __Pyx_XDECREF(__pyx_r);
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "type");
                        __PYX_ERR(15, 338, __pyx_L1_error)
                      }
                      __Pyx_INCREF((PyObject *)__pyx_v_self->type);
                      __pyx_r = ((PyObject *)__pyx_v_self->type);
                      goto __pyx_L0;

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib.SparseCOOTensor.type.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.sp_sparse_tensor,self.stp cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCOOTensor_29__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_15SparseCOOTensor_28__reduce_cython__, "SparseCOOTensor.__reduce_cython__(self)");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_15SparseCOOTensor_29__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15SparseCOOTensor_29__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15SparseCOOTensor_28__reduce_cython__};
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCOOTensor_29__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; }
                      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                      if (unlikely(__pyx_kwds_len < 0)) return NULL;
                      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;}
                      __pyx_r = __pyx_pf_7pyarrow_3lib_15SparseCOOTensor_28__reduce_cython__(((struct __pyx_obj_7pyarrow_3lib_SparseCOOTensor *)__pyx_v_self));

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

                    static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCOOTensor_28__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_SparseCOOTensor *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__reduce_cython__", 0);

                      /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "self.sp_sparse_tensor,self.stp cannot be converted to a Python object for pickling"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "self.sp_sparse_tensor,self.stp cannot be converted to a Python object for pickling"
*/
                      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_self_sp_sparse_tensor_self_stp_c, 0, 0);
                      __PYX_ERR(7, 2, __pyx_L1_error)

                      /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.sp_sparse_tensor,self.stp cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib.SparseCOOTensor.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "self.sp_sparse_tensor,self.stp cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.sp_sparse_tensor,self.stp cannot be converted to a Python object for pickling"
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCOOTensor_31__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_15SparseCOOTensor_30__setstate_cython__, "SparseCOOTensor.__setstate_cython__(self, __pyx_state)");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_15SparseCOOTensor_31__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15SparseCOOTensor_31__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15SparseCOOTensor_30__setstate_cython__};
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCOOTensor_31__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[1] = {0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(7, 3, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(7, 3, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(7, 3, __pyx_L3_error)
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(7, 3, __pyx_L3_error) }
                          }
                        } else if (unlikely(__pyx_nargs != 1)) {
                          goto __pyx_L5_argtuple_error;
                        } else {
                          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(7, 3, __pyx_L3_error)
                        }
                        __pyx_v___pyx_state = values[0];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(7, 3, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.SparseCOOTensor.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_15SparseCOOTensor_30__setstate_cython__(((struct __pyx_obj_7pyarrow_3lib_SparseCOOTensor *)__pyx_v_self), __pyx_v___pyx_state);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

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

                      /* "(tree fragment)":4
 *     raise TypeError, "self.sp_sparse_tensor,self.stp cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "self.sp_sparse_tensor,self.stp cannot be converted to a Python object for pickling"             # <<<<<<<<<<<<<<
*/
                      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_self_sp_sparse_tensor_self_stp_c, 0, 0);
                      __PYX_ERR(7, 4, __pyx_L1_error)

                      /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "self.sp_sparse_tensor,self.stp cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.sp_sparse_tensor,self.stp cannot be converted to a Python object for pickling"
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib.SparseCOOTensor.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/tensor.pxi":656
 *     """
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         raise TypeError("Do not call SparseCSRMatrix's constructor directly, "
 *                         "use one of the `pyarrow.SparseCSRMatrix.from_*` "
*/

                    /* Python wrapper */
                    static int __pyx_pw_7pyarrow_3lib_15SparseCSRMatrix_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
                    static int __pyx_pw_7pyarrow_3lib_15SparseCSRMatrix_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      int __pyx_r;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, __pyx_nargs); return -1; }
                      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
                      if (unlikely(__pyx_kwds_len < 0)) return -1;
                      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__init__", __pyx_kwds); return -1;}
                      __pyx_r = __pyx_pf_7pyarrow_3lib_15SparseCSRMatrix___init__(((struct __pyx_obj_7pyarrow_3lib_SparseCSRMatrix *)__pyx_v_self));

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

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

                      /* "pyarrow/tensor.pxi":657
 * 
 *     def __init__(self):
 *         raise TypeError("Do not call SparseCSRMatrix's constructor directly, "             # <<<<<<<<<<<<<<
 *                         "use one of the `pyarrow.SparseCSRMatrix.from_*` "
 *                         "functions instead.")
*/
                      __pyx_t_2 = NULL;
                      __pyx_t_3 = 1;
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Do_not_call_SparseCSRMatrix_s_co};
                        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 657, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      __PYX_ERR(5, 657, __pyx_L1_error)

                      /* "pyarrow/tensor.pxi":656
 *     """
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         raise TypeError("Do not call SparseCSRMatrix's constructor directly, "
 *                         "use one of the `pyarrow.SparseCSRMatrix.from_*` "
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_AddTraceback("pyarrow.lib.SparseCSRMatrix.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = -1;
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/tensor.pxi":661
 *                         "functions instead.")
 * 
 *     cdef void init(self, const shared_ptr[CSparseCSRMatrix]& sp_sparse_tensor):             # <<<<<<<<<<<<<<
 *         self.sp_sparse_tensor = sp_sparse_tensor
 *         self.stp = sp_sparse_tensor.get()
*/

                    static void __pyx_f_7pyarrow_3lib_15SparseCSRMatrix_init(struct __pyx_obj_7pyarrow_3lib_SparseCSRMatrix *__pyx_v_self, std::shared_ptr< arrow::SparseCSRMatrix>  const &__pyx_v_sp_sparse_tensor) {
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("init", 0);

                      /* "pyarrow/tensor.pxi":662
 * 
 *     cdef void init(self, const shared_ptr[CSparseCSRMatrix]& sp_sparse_tensor):
 *         self.sp_sparse_tensor = sp_sparse_tensor             # <<<<<<<<<<<<<<
 *         self.stp = sp_sparse_tensor.get()
 *         self.type = pyarrow_wrap_data_type(self.stp.type())
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_sparse_tensor");
                        __PYX_ERR(5, 662, __pyx_L1_error)
                      }
                      __pyx_v_self->sp_sparse_tensor = __pyx_v_sp_sparse_tensor;

                      /* "pyarrow/tensor.pxi":663
 *     cdef void init(self, const shared_ptr[CSparseCSRMatrix]& sp_sparse_tensor):
 *         self.sp_sparse_tensor = sp_sparse_tensor
 *         self.stp = sp_sparse_tensor.get()             # <<<<<<<<<<<<<<
 *         self.type = pyarrow_wrap_data_type(self.stp.type())
 * 
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "stp");
                        __PYX_ERR(5, 663, __pyx_L1_error)
                      }
                      __pyx_v_self->stp = __pyx_v_sp_sparse_tensor.get();

                      /* "pyarrow/tensor.pxi":664
 *         self.sp_sparse_tensor = sp_sparse_tensor
 *         self.stp = sp_sparse_tensor.get()
 *         self.type = pyarrow_wrap_data_type(self.stp.type())             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "stp");
                        __PYX_ERR(5, 664, __pyx_L1_error)
                      }
                      __pyx_t_1 = pyarrow_wrap_data_type(__pyx_v_self->stp->type()); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 664, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType))))) __PYX_ERR(5, 664, __pyx_L1_error)
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "type");
                        __PYX_ERR(5, 664, __pyx_L1_error)
                      }
                      __Pyx_GIVEREF(__pyx_t_1);
                      __Pyx_GOTREF((PyObject *)__pyx_v_self->type);
                      __Pyx_DECREF((PyObject *)__pyx_v_self->type);
                      __pyx_v_self->type = ((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_t_1);
                      __pyx_t_1 = 0;

                      /* "pyarrow/tensor.pxi":661
 *                         "functions instead.")
 * 
 *     cdef void init(self, const shared_ptr[CSparseCSRMatrix]& sp_sparse_tensor):             # <<<<<<<<<<<<<<
 *         self.sp_sparse_tensor = sp_sparse_tensor
 *         self.stp = sp_sparse_tensor.get()
*/

                      /* function exit code */
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_AddTraceback("pyarrow.lib.SparseCSRMatrix.init", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_L0:;
                      __Pyx_RefNannyFinishContext();
                    }

                    /* "pyarrow/tensor.pxi":666
 *         self.type = pyarrow_wrap_data_type(self.stp.type())
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return f"""<pyarrow.SparseCSRMatrix>
 * type: {self.type}
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSRMatrix_3__repr__(PyObject *__pyx_v_self); /*proto*/
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSRMatrix_3__repr__(PyObject *__pyx_v_self) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_15SparseCSRMatrix_2__repr__(((struct __pyx_obj_7pyarrow_3lib_SparseCSRMatrix *)__pyx_v_self));

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

                    static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSRMatrix_2__repr__(struct __pyx_obj_7pyarrow_3lib_SparseCSRMatrix *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      PyObject *__pyx_t_3 = NULL;
                      PyObject *__pyx_t_4[4];
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__repr__", 0);

                      /* "pyarrow/tensor.pxi":667
 * 
 *     def __repr__(self):
 *         return f"""<pyarrow.SparseCSRMatrix>             # <<<<<<<<<<<<<<
 * type: {self.type}
 * shape: {self.shape}"""
*/
                      __Pyx_XDECREF(__pyx_r);

                      /* "pyarrow/tensor.pxi":668
 *     def __repr__(self):
 *         return f"""<pyarrow.SparseCSRMatrix>
 * type: {self.type}             # <<<<<<<<<<<<<<
 * shape: {self.shape}"""
 * 
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "type");
                        __PYX_ERR(5, 668, __pyx_L1_error)
                      }
                      __pyx_t_1 = __Pyx_PyObject_FormatSimple(((PyObject *)__pyx_v_self->type), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 668, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);

                      /* "pyarrow/tensor.pxi":669
 *         return f"""<pyarrow.SparseCSRMatrix>
 * type: {self.type}
 * shape: {self.shape}"""             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
*/
                      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_shape); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 669, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_2);
                      __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_t_2, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 669, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_3);
                      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                      __pyx_t_4[0] = __pyx_mstate_global->__pyx_kp_u_pyarrow_SparseCSRMatrix_type;
                      __pyx_t_4[1] = __pyx_t_1;
                      __pyx_t_4[2] = __pyx_mstate_global->__pyx_kp_u_shape_2;
                      __pyx_t_4[3] = __pyx_t_3;

                      /* "pyarrow/tensor.pxi":667
 * 
 *     def __repr__(self):
 *         return f"""<pyarrow.SparseCSRMatrix>             # <<<<<<<<<<<<<<
 * type: {self.type}
 * shape: {self.shape}"""
*/
                      __pyx_t_2 = __Pyx_PyUnicode_Join(__pyx_t_4, 4, 32 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1) + 8 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3));
                      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 667, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_2);
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                      __pyx_r = __pyx_t_2;
                      __pyx_t_2 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/tensor.pxi":666
 *         self.type = pyarrow_wrap_data_type(self.stp.type())
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return f"""<pyarrow.SparseCSRMatrix>
 * type: {self.type}
*/

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

                    /* "pyarrow/tensor.pxi":671
 * shape: {self.shape}"""
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def from_dense_numpy(cls, obj, dim_names=None):
 *         """
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSRMatrix_5from_dense_numpy(PyObject *__pyx_v_cls, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_15SparseCSRMatrix_4from_dense_numpy, "SparseCSRMatrix.from_dense_numpy(cls, obj, dim_names=None)\n\nConvert numpy.ndarray to arrow::SparseCSRMatrix\n\nParameters\n----------\nobj : numpy.ndarray\n    The dense numpy array that should be converted.\ndim_names : list, optional\n    The names of the dimensions.\n\nReturns\n-------\npyarrow.SparseCSRMatrix");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_15SparseCSRMatrix_5from_dense_numpy = {"from_dense_numpy", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15SparseCSRMatrix_5from_dense_numpy, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15SparseCSRMatrix_4from_dense_numpy};
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSRMatrix_5from_dense_numpy(PyObject *__pyx_v_cls, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      PyObject *__pyx_v_obj = 0;
                      PyObject *__pyx_v_dim_names = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[2] = {0,0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("from_dense_numpy (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_obj,&__pyx_mstate_global->__pyx_n_u_dim_names,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(5, 671, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  2:
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(5, 671, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(5, 671, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "from_dense_numpy", 0) < (0)) __PYX_ERR(5, 671, __pyx_L3_error)

                          /* "pyarrow/tensor.pxi":672
 * 
 *     @classmethod
 *     def from_dense_numpy(cls, obj, dim_names=None):             # <<<<<<<<<<<<<<
 *         """
 *         Convert numpy.ndarray to arrow::SparseCSRMatrix
*/
                          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("from_dense_numpy", 0, 1, 2, i); __PYX_ERR(5, 671, __pyx_L3_error) }
                          }
                        } else {
                          switch (__pyx_nargs) {
                            case  2:
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(5, 671, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(5, 671, __pyx_L3_error)
                            break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
                        }
                        __pyx_v_obj = values[0];
                        __pyx_v_dim_names = values[1];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("from_dense_numpy", 0, 1, 2, __pyx_nargs); __PYX_ERR(5, 671, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.SparseCSRMatrix.from_dense_numpy", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_15SparseCSRMatrix_4from_dense_numpy(((PyTypeObject*)__pyx_v_cls), __pyx_v_obj, __pyx_v_dim_names);

                      /* "pyarrow/tensor.pxi":671
 * shape: {self.shape}"""
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def from_dense_numpy(cls, obj, dim_names=None):
 *         """
*/

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSRMatrix_4from_dense_numpy(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_obj, PyObject *__pyx_v_dim_names) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      PyObject *__pyx_t_3 = NULL;
                      PyObject *__pyx_t_4 = NULL;
                      size_t __pyx_t_5;
                      PyObject *__pyx_t_6 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("from_dense_numpy", 0);

                      /* "pyarrow/tensor.pxi":687
 *         pyarrow.SparseCSRMatrix
 *         """
 *         return cls.from_tensor(Tensor.from_numpy(obj, dim_names=dim_names))             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
*/
                      __Pyx_XDECREF(__pyx_r);
                      __pyx_t_2 = ((PyObject *)__pyx_v_cls);
                      __Pyx_INCREF(__pyx_t_2);
                      __pyx_t_4 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Tensor);
                      __Pyx_INCREF(__pyx_t_4);
                      __pyx_t_5 = 0;
                      {
                        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_4, __pyx_v_obj};
                        __pyx_t_6 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 687, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_6);
                        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_dim_names, __pyx_v_dim_names, __pyx_t_6, __pyx_callargs+2, 0) < (0)) __PYX_ERR(5, 687, __pyx_L1_error)
                        __pyx_t_3 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_from_numpy, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_6);
                        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                        if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 687, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_3);
                      }
                      __pyx_t_5 = 0;
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
                        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_from_tensor, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 687, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __pyx_r = __pyx_t_1;
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/tensor.pxi":671
 * shape: {self.shape}"""
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def from_dense_numpy(cls, obj, dim_names=None):
 *         """
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_XDECREF(__pyx_t_4);
                      __Pyx_XDECREF(__pyx_t_6);
                      __Pyx_AddTraceback("pyarrow.lib.SparseCSRMatrix.from_dense_numpy", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/tensor.pxi":689
 *         return cls.from_tensor(Tensor.from_numpy(obj, dim_names=dim_names))
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_numpy(data, indptr, indices, shape, dim_names=None):
 *         """
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSRMatrix_7from_numpy(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_15SparseCSRMatrix_6from_numpy, "SparseCSRMatrix.from_numpy(data, indptr, indices, shape, dim_names=None)\n\nCreate arrow::SparseCSRMatrix from numpy.ndarrays.\n\nParameters\n----------\ndata : numpy.ndarray\n    Data used to populate the sparse matrix.\nindptr : numpy.ndarray\n    Range of the rows,\n    The i-th row spans from `indptr[i]` to `indptr[i+1]` in the data.\nindices : numpy.ndarray\n    Column indices of the corresponding non-zero values.\nshape : tuple\n    Shape of the matrix.\ndim_names : list, optional\n    Names of the dimensions.");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_15SparseCSRMatrix_7from_numpy = {"from_numpy", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15SparseCSRMatrix_7from_numpy, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15SparseCSRMatrix_6from_numpy};
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSRMatrix_7from_numpy(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      PyObject *__pyx_v_data = 0;
                      PyObject *__pyx_v_indptr = 0;
                      PyObject *__pyx_v_indices = 0;
                      PyObject *__pyx_v_shape = 0;
                      PyObject *__pyx_v_dim_names = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[5] = {0,0,0,0,0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("from_numpy (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_data,&__pyx_mstate_global->__pyx_n_u_indptr,&__pyx_mstate_global->__pyx_n_u_indices,&__pyx_mstate_global->__pyx_n_u_shape,&__pyx_mstate_global->__pyx_n_u_dim_names,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(5, 689, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  5:
                            values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(5, 689, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  4:
                            values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(5, 689, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  3:
                            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(5, 689, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  2:
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(5, 689, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(5, 689, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "from_numpy", 0) < (0)) __PYX_ERR(5, 689, __pyx_L3_error)

                          /* "pyarrow/tensor.pxi":690
 * 
 *     @staticmethod
 *     def from_numpy(data, indptr, indices, shape, dim_names=None):             # <<<<<<<<<<<<<<
 *         """
 *         Create arrow::SparseCSRMatrix from numpy.ndarrays.
*/
                          if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)Py_None));
                          for (Py_ssize_t i = __pyx_nargs; i < 4; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("from_numpy", 0, 4, 5, i); __PYX_ERR(5, 689, __pyx_L3_error) }
                          }
                        } else {
                          switch (__pyx_nargs) {
                            case  5:
                            values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(5, 689, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  4:
                            values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(5, 689, __pyx_L3_error)
                            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(5, 689, __pyx_L3_error)
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(5, 689, __pyx_L3_error)
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(5, 689, __pyx_L3_error)
                            break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)Py_None));
                        }
                        __pyx_v_data = values[0];
                        __pyx_v_indptr = values[1];
                        __pyx_v_indices = values[2];
                        __pyx_v_shape = values[3];
                        __pyx_v_dim_names = values[4];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("from_numpy", 0, 4, 5, __pyx_nargs); __PYX_ERR(5, 689, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.SparseCSRMatrix.from_numpy", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_15SparseCSRMatrix_6from_numpy(__pyx_v_data, __pyx_v_indptr, __pyx_v_indices, __pyx_v_shape, __pyx_v_dim_names);

                      /* "pyarrow/tensor.pxi":689
 *         return cls.from_tensor(Tensor.from_numpy(obj, dim_names=dim_names))
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_numpy(data, indptr, indices, shape, dim_names=None):
 *         """
*/

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSRMatrix_6from_numpy(PyObject *__pyx_v_data, PyObject *__pyx_v_indptr, PyObject *__pyx_v_indices, PyObject *__pyx_v_shape, PyObject *__pyx_v_dim_names) {
                      std::shared_ptr< arrow::SparseCSRMatrix>  __pyx_v_csparse_tensor;
                      std::vector<int64_t>  __pyx_v_c_shape;
                      std::vector<std::string>  __pyx_v_c_dim_names;
                      PyObject *__pyx_v_x = NULL;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      Py_ssize_t __pyx_t_2;
                      PyObject *(*__pyx_t_3)(PyObject *);
                      PyObject *__pyx_t_4 = NULL;
                      int64_t __pyx_t_5;
                      int __pyx_t_6;
                      PyObject *__pyx_t_7 = NULL;
                      PyObject *__pyx_t_8 = NULL;
                      size_t __pyx_t_9;
                      std::string __pyx_t_10;
                      int __pyx_t_11;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("from_numpy", 0);
                      __Pyx_INCREF(__pyx_v_indptr);
                      __Pyx_INCREF(__pyx_v_indices);

                      /* "pyarrow/tensor.pxi":712
 *         cdef vector[c_string] c_dim_names
 * 
 *         for x in shape:             # <<<<<<<<<<<<<<
 *             c_shape.push_back(x)
 *         if dim_names is not None:
*/
                      if (likely(PyList_CheckExact(__pyx_v_shape)) || PyTuple_CheckExact(__pyx_v_shape)) {
                        __pyx_t_1 = __pyx_v_shape; __Pyx_INCREF(__pyx_t_1);
                        __pyx_t_2 = 0;
                        __pyx_t_3 = NULL;
                      } else {
                        __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 712, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                        __pyx_t_3 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 712, __pyx_L1_error)
                      }
                      for (;;) {
                        if (likely(!__pyx_t_3)) {
                          if (likely(PyList_CheckExact(__pyx_t_1))) {
                            {
                              Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
                              #if !CYTHON_ASSUME_SAFE_SIZE
                              if (unlikely((__pyx_temp < 0))) __PYX_ERR(5, 712, __pyx_L1_error)
                              #endif
                              if (__pyx_t_2 >= __pyx_temp) break;
                            }
                            __pyx_t_4 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_2, __Pyx_ReferenceSharing_OwnStrongReference);
                            ++__pyx_t_2;
                          } else {
                            {
                              Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
                              #if !CYTHON_ASSUME_SAFE_SIZE
                              if (unlikely((__pyx_temp < 0))) __PYX_ERR(5, 712, __pyx_L1_error)
                              #endif
                              if (__pyx_t_2 >= __pyx_temp) break;
                            }
                            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                            __pyx_t_4 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2));
                            #else
                            __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2);
                            #endif
                            ++__pyx_t_2;
                          }
                          if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 712, __pyx_L1_error)
                        } else {
                          __pyx_t_4 = __pyx_t_3(__pyx_t_1);
                          if (unlikely(!__pyx_t_4)) {
                            PyObject* exc_type = PyErr_Occurred();
                            if (exc_type) {
                              if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(5, 712, __pyx_L1_error)
                              PyErr_Clear();
                            }
                            break;
                          }
                        }
                        __Pyx_GOTREF(__pyx_t_4);
                        __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_4);
                        __pyx_t_4 = 0;

                        /* "pyarrow/tensor.pxi":713
 * 
 *         for x in shape:
 *             c_shape.push_back(x)             # <<<<<<<<<<<<<<
 *         if dim_names is not None:
 *             for x in dim_names:
*/
                        __pyx_t_5 = __Pyx_PyLong_As_int64_t(__pyx_v_x); if (unlikely((__pyx_t_5 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(5, 713, __pyx_L1_error)
                        try {
                          __pyx_v_c_shape.push_back(__pyx_t_5);
                        } catch(...) {
                          __Pyx_CppExn2PyErr();
                          __PYX_ERR(5, 713, __pyx_L1_error)
                        }

                        /* "pyarrow/tensor.pxi":712
 *         cdef vector[c_string] c_dim_names
 * 
 *         for x in shape:             # <<<<<<<<<<<<<<
 *             c_shape.push_back(x)
 *         if dim_names is not None:
*/
                      }
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

                      /* "pyarrow/tensor.pxi":714
 *         for x in shape:
 *             c_shape.push_back(x)
 *         if dim_names is not None:             # <<<<<<<<<<<<<<
 *             for x in dim_names:
 *                 c_dim_names.push_back(tobytes(x))
*/
                      __pyx_t_6 = (__pyx_v_dim_names != Py_None);
                      if (__pyx_t_6) {

                        /* "pyarrow/tensor.pxi":715
 *             c_shape.push_back(x)
 *         if dim_names is not None:
 *             for x in dim_names:             # <<<<<<<<<<<<<<
 *                 c_dim_names.push_back(tobytes(x))
 * 
*/
                        if (likely(PyList_CheckExact(__pyx_v_dim_names)) || PyTuple_CheckExact(__pyx_v_dim_names)) {
                          __pyx_t_1 = __pyx_v_dim_names; __Pyx_INCREF(__pyx_t_1);
                          __pyx_t_2 = 0;
                          __pyx_t_3 = NULL;
                        } else {
                          __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_dim_names); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 715, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_1);
                          __pyx_t_3 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 715, __pyx_L1_error)
                        }
                        for (;;) {
                          if (likely(!__pyx_t_3)) {
                            if (likely(PyList_CheckExact(__pyx_t_1))) {
                              {
                                Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
                                #if !CYTHON_ASSUME_SAFE_SIZE
                                if (unlikely((__pyx_temp < 0))) __PYX_ERR(5, 715, __pyx_L1_error)
                                #endif
                                if (__pyx_t_2 >= __pyx_temp) break;
                              }
                              __pyx_t_4 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_2, __Pyx_ReferenceSharing_OwnStrongReference);
                              ++__pyx_t_2;
                            } else {
                              {
                                Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
                                #if !CYTHON_ASSUME_SAFE_SIZE
                                if (unlikely((__pyx_temp < 0))) __PYX_ERR(5, 715, __pyx_L1_error)
                                #endif
                                if (__pyx_t_2 >= __pyx_temp) break;
                              }
                              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                              __pyx_t_4 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2));
                              #else
                              __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2);
                              #endif
                              ++__pyx_t_2;
                            }
                            if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 715, __pyx_L1_error)
                          } else {
                            __pyx_t_4 = __pyx_t_3(__pyx_t_1);
                            if (unlikely(!__pyx_t_4)) {
                              PyObject* exc_type = PyErr_Occurred();
                              if (exc_type) {
                                if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(5, 715, __pyx_L1_error)
                                PyErr_Clear();
                              }
                              break;
                            }
                          }
                          __Pyx_GOTREF(__pyx_t_4);
                          __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_4);
                          __pyx_t_4 = 0;

                          /* "pyarrow/tensor.pxi":716
 *         if dim_names is not None:
 *             for x in dim_names:
 *                 c_dim_names.push_back(tobytes(x))             # <<<<<<<<<<<<<<
 * 
 *         # Enforce precondition for SparseCSRMatrix indices
*/
                          __pyx_t_7 = NULL;
                          __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_tobytes); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 716, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_8);
                          __pyx_t_9 = 1;
                          #if CYTHON_UNPACK_METHODS
                          if (unlikely(PyMethod_Check(__pyx_t_8))) {
                            __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8);
                            assert(__pyx_t_7);
                            PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8);
                            __Pyx_INCREF(__pyx_t_7);
                            __Pyx_INCREF(__pyx__function);
                            __Pyx_DECREF_SET(__pyx_t_8, __pyx__function);
                            __pyx_t_9 = 0;
                          }
                          #endif
                          {
                            PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_x};
                            __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
                            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                            if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 716, __pyx_L1_error)
                            __Pyx_GOTREF(__pyx_t_4);
                          }
                          __pyx_t_10 = __pyx_convert_string_from_py_6libcpp_6string_std__in_string(__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(5, 716, __pyx_L1_error)
                          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                          try {
                            __pyx_v_c_dim_names.push_back(__pyx_t_10);
                          } catch(...) {
                            __Pyx_CppExn2PyErr();
                            __PYX_ERR(5, 716, __pyx_L1_error)
                          }

                          /* "pyarrow/tensor.pxi":715
 *             c_shape.push_back(x)
 *         if dim_names is not None:
 *             for x in dim_names:             # <<<<<<<<<<<<<<
 *                 c_dim_names.push_back(tobytes(x))
 * 
*/
                        }
                        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

                        /* "pyarrow/tensor.pxi":714
 *         for x in shape:
 *             c_shape.push_back(x)
 *         if dim_names is not None:             # <<<<<<<<<<<<<<
 *             for x in dim_names:
 *                 c_dim_names.push_back(tobytes(x))
*/
                      }

                      /* "pyarrow/tensor.pxi":719
 * 
 *         # Enforce precondition for SparseCSRMatrix indices
 *         indptr = np.require(indptr, dtype='i8')             # <<<<<<<<<<<<<<
 *         indices = np.require(indices, dtype='i8')
 *         if indptr.ndim != 1:
*/
                      __pyx_t_4 = NULL;
                      __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 719, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_8);
                      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_require); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 719, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_7);
                      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                      __pyx_t_9 = 1;
                      #if CYTHON_UNPACK_METHODS
                      if (unlikely(PyMethod_Check(__pyx_t_7))) {
                        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_7);
                        assert(__pyx_t_4);
                        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
                        __Pyx_INCREF(__pyx_t_4);
                        __Pyx_INCREF(__pyx__function);
                        __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
                        __pyx_t_9 = 0;
                      }
                      #endif
                      {
                        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_4, __pyx_v_indptr};
                        __pyx_t_8 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 719, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_8);
                        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_dtype, __pyx_mstate_global->__pyx_n_u_i8, __pyx_t_8, __pyx_callargs+2, 0) < (0)) __PYX_ERR(5, 719, __pyx_L1_error)
                        __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_8);
                        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 719, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __Pyx_DECREF_SET(__pyx_v_indptr, __pyx_t_1);
                      __pyx_t_1 = 0;

                      /* "pyarrow/tensor.pxi":720
 *         # Enforce precondition for SparseCSRMatrix indices
 *         indptr = np.require(indptr, dtype='i8')
 *         indices = np.require(indices, dtype='i8')             # <<<<<<<<<<<<<<
 *         if indptr.ndim != 1:
 *             raise ValueError("Expected 1-dimensional array for "
*/
                      __pyx_t_7 = NULL;
                      __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 720, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_8);
                      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_require); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 720, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_4);
                      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                      __pyx_t_9 = 1;
                      #if CYTHON_UNPACK_METHODS
                      if (unlikely(PyMethod_Check(__pyx_t_4))) {
                        __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
                        assert(__pyx_t_7);
                        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
                        __Pyx_INCREF(__pyx_t_7);
                        __Pyx_INCREF(__pyx__function);
                        __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
                        __pyx_t_9 = 0;
                      }
                      #endif
                      {
                        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_7, __pyx_v_indices};
                        __pyx_t_8 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 720, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_8);
                        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_dtype, __pyx_mstate_global->__pyx_n_u_i8, __pyx_t_8, __pyx_callargs+2, 0) < (0)) __PYX_ERR(5, 720, __pyx_L1_error)
                        __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_8);
                        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
                        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 720, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __Pyx_DECREF_SET(__pyx_v_indices, __pyx_t_1);
                      __pyx_t_1 = 0;

                      /* "pyarrow/tensor.pxi":721
 *         indptr = np.require(indptr, dtype='i8')
 *         indices = np.require(indices, dtype='i8')
 *         if indptr.ndim != 1:             # <<<<<<<<<<<<<<
 *             raise ValueError("Expected 1-dimensional array for "
 *                              "SparseCSRMatrix indptr")
*/
                      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_indptr, __pyx_mstate_global->__pyx_n_u_ndim); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 721, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_t_6 = (__Pyx_PyLong_BoolNeObjC(__pyx_t_1, __pyx_mstate_global->__pyx_int_1, 1, 0)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(5, 721, __pyx_L1_error)
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      if (unlikely(__pyx_t_6)) {

                        /* "pyarrow/tensor.pxi":722
 *         indices = np.require(indices, dtype='i8')
 *         if indptr.ndim != 1:
 *             raise ValueError("Expected 1-dimensional array for "             # <<<<<<<<<<<<<<
 *                              "SparseCSRMatrix indptr")
 *         if indices.ndim != 1:
*/
                        __pyx_t_4 = NULL;
                        __pyx_t_9 = 1;
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Expected_1_dimensional_array_for};
                          __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                          if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 722, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_1);
                        }
                        __Pyx_Raise(__pyx_t_1, 0, 0, 0);
                        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                        __PYX_ERR(5, 722, __pyx_L1_error)

                        /* "pyarrow/tensor.pxi":721
 *         indptr = np.require(indptr, dtype='i8')
 *         indices = np.require(indices, dtype='i8')
 *         if indptr.ndim != 1:             # <<<<<<<<<<<<<<
 *             raise ValueError("Expected 1-dimensional array for "
 *                              "SparseCSRMatrix indptr")
*/
                      }

                      /* "pyarrow/tensor.pxi":724
 *             raise ValueError("Expected 1-dimensional array for "
 *                              "SparseCSRMatrix indptr")
 *         if indices.ndim != 1:             # <<<<<<<<<<<<<<
 *             raise ValueError("Expected 1-dimensional array for "
 *                              "SparseCSRMatrix indices")
*/
                      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_indices, __pyx_mstate_global->__pyx_n_u_ndim); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 724, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_t_6 = (__Pyx_PyLong_BoolNeObjC(__pyx_t_1, __pyx_mstate_global->__pyx_int_1, 1, 0)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(5, 724, __pyx_L1_error)
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      if (unlikely(__pyx_t_6)) {

                        /* "pyarrow/tensor.pxi":725
 *                              "SparseCSRMatrix indptr")
 *         if indices.ndim != 1:
 *             raise ValueError("Expected 1-dimensional array for "             # <<<<<<<<<<<<<<
 *                              "SparseCSRMatrix indices")
 * 
*/
                        __pyx_t_4 = NULL;
                        __pyx_t_9 = 1;
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Expected_1_dimensional_array_for_2};
                          __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                          if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 725, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_1);
                        }
                        __Pyx_Raise(__pyx_t_1, 0, 0, 0);
                        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                        __PYX_ERR(5, 725, __pyx_L1_error)

                        /* "pyarrow/tensor.pxi":724
 *             raise ValueError("Expected 1-dimensional array for "
 *                              "SparseCSRMatrix indptr")
 *         if indices.ndim != 1:             # <<<<<<<<<<<<<<
 *             raise ValueError("Expected 1-dimensional array for "
 *                              "SparseCSRMatrix indices")
*/
                      }

                      /* "pyarrow/tensor.pxi":728
 *                              "SparseCSRMatrix indices")
 * 
 *         check_status(NdarraysToSparseCSRMatrix(c_default_memory_pool(),             # <<<<<<<<<<<<<<
 *                                                data, indptr, indices, c_shape,
 *                                                c_dim_names, &csparse_tensor))
*/
                      __pyx_t_11 = __pyx_f_7pyarrow_3lib_check_status(arrow::py::NdarraysToSparseCSRMatrix( arrow::default_memory_pool(), __pyx_v_data, __pyx_v_indptr, __pyx_v_indices, __pyx_v_c_shape, __pyx_v_c_dim_names, (&__pyx_v_csparse_tensor))); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(5, 728, __pyx_L1_error)

                      /* "pyarrow/tensor.pxi":731
 *                                                data, indptr, indices, c_shape,
 *                                                c_dim_names, &csparse_tensor))
 *         return pyarrow_wrap_sparse_csr_matrix(csparse_tensor)             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
*/
                      __Pyx_XDECREF(__pyx_r);
                      __pyx_t_1 = pyarrow_wrap_sparse_csr_matrix(__pyx_v_csparse_tensor); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 731, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_r = __pyx_t_1;
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/tensor.pxi":689
 *         return cls.from_tensor(Tensor.from_numpy(obj, dim_names=dim_names))
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_numpy(data, indptr, indices, shape, dim_names=None):
 *         """
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_4);
                      __Pyx_XDECREF(__pyx_t_7);
                      __Pyx_XDECREF(__pyx_t_8);
                      __Pyx_AddTraceback("pyarrow.lib.SparseCSRMatrix.from_numpy", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XDECREF(__pyx_v_x);
                      __Pyx_XDECREF(__pyx_v_indptr);
                      __Pyx_XDECREF(__pyx_v_indices);
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/tensor.pxi":733
 *         return pyarrow_wrap_sparse_csr_matrix(csparse_tensor)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_scipy(obj, dim_names=None):
 *         """
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSRMatrix_9from_scipy(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_15SparseCSRMatrix_8from_scipy, "SparseCSRMatrix.from_scipy(obj, dim_names=None)\n\nConvert scipy.sparse.csr_array or scipy.sparse.csr_matrix to arrow::SparseCSRMatrix.\n\nParameters\n----------\nobj : scipy.sparse.csr_array or scipy.sparse.csr_matrix\n    The scipy matrix that should be converted.\ndim_names : list, optional\n    Names of the dimensions.");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_15SparseCSRMatrix_9from_scipy = {"from_scipy", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15SparseCSRMatrix_9from_scipy, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15SparseCSRMatrix_8from_scipy};
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSRMatrix_9from_scipy(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      PyObject *__pyx_v_obj = 0;
                      PyObject *__pyx_v_dim_names = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[2] = {0,0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("from_scipy (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_obj,&__pyx_mstate_global->__pyx_n_u_dim_names,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(5, 733, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  2:
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(5, 733, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(5, 733, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "from_scipy", 0) < (0)) __PYX_ERR(5, 733, __pyx_L3_error)

                          /* "pyarrow/tensor.pxi":734
 * 
 *     @staticmethod
 *     def from_scipy(obj, dim_names=None):             # <<<<<<<<<<<<<<
 *         """
 *         Convert scipy.sparse.csr_array or scipy.sparse.csr_matrix to arrow::SparseCSRMatrix.
*/
                          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("from_scipy", 0, 1, 2, i); __PYX_ERR(5, 733, __pyx_L3_error) }
                          }
                        } else {
                          switch (__pyx_nargs) {
                            case  2:
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(5, 733, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(5, 733, __pyx_L3_error)
                            break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
                        }
                        __pyx_v_obj = values[0];
                        __pyx_v_dim_names = values[1];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("from_scipy", 0, 1, 2, __pyx_nargs); __PYX_ERR(5, 733, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.SparseCSRMatrix.from_scipy", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_15SparseCSRMatrix_8from_scipy(__pyx_v_obj, __pyx_v_dim_names);

                      /* "pyarrow/tensor.pxi":733
 *         return pyarrow_wrap_sparse_csr_matrix(csparse_tensor)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_scipy(obj, dim_names=None):
 *         """
*/

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSRMatrix_8from_scipy(PyObject *__pyx_v_obj, PyObject *__pyx_v_dim_names) {
                      PyObject *__pyx_v_scipy = NULL;
                      std::shared_ptr< arrow::SparseCSRMatrix>  __pyx_v_csparse_tensor;
                      std::vector<int64_t>  __pyx_v_c_shape;
                      std::vector<std::string>  __pyx_v_c_dim_names;
                      PyObject *__pyx_v_x = NULL;
                      PyObject *__pyx_v_indptr = NULL;
                      PyObject *__pyx_v_indices = NULL;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      PyObject *__pyx_t_3 = NULL;
                      PyObject *__pyx_t_4 = NULL;
                      int __pyx_t_5;
                      int __pyx_t_6;
                      PyObject *__pyx_t_7 = NULL;
                      size_t __pyx_t_8;
                      Py_ssize_t __pyx_t_9;
                      PyObject *(*__pyx_t_10)(PyObject *);
                      int64_t __pyx_t_11;
                      std::string __pyx_t_12;
                      PyObject *__pyx_t_13 = NULL;
                      int __pyx_t_14;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("from_scipy", 0);

                      /* "pyarrow/tensor.pxi":745
 *             Names of the dimensions.
 *         """
 *         import scipy.sparse             # <<<<<<<<<<<<<<
 *         if not isinstance(obj, (scipy.sparse.csr_array, scipy.sparse.csr_matrix)):
 *             raise TypeError(
*/
                      __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_scipy_sparse, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 745, __pyx_L1_error)
                      __pyx_t_1 = __pyx_t_2;
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_v_scipy = __pyx_t_1;
                      __pyx_t_1 = 0;

                      /* "pyarrow/tensor.pxi":746
 *         """
 *         import scipy.sparse
 *         if not isinstance(obj, (scipy.sparse.csr_array, scipy.sparse.csr_matrix)):             # <<<<<<<<<<<<<<
 *             raise TypeError(
 *                 f"Expected scipy.sparse.csr_array or scipy.sparse.csr_matrix, got {type(obj)}")
*/
                      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_scipy, __pyx_mstate_global->__pyx_n_u_sparse); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 746, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_csr_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 746, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_3);
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_scipy, __pyx_mstate_global->__pyx_n_u_sparse); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 746, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_csr_matrix); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 746, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_4);
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      __pyx_t_6 = PyObject_IsInstance(__pyx_v_obj, __pyx_t_3); 
                      if (!__pyx_t_6) {
                      } else {
                        __pyx_t_5 = __pyx_t_6;
                        goto __pyx_L4_bool_binop_done;
                      }
                      __pyx_t_6 = PyObject_IsInstance(__pyx_v_obj, __pyx_t_4); 
                      __pyx_t_5 = __pyx_t_6;
                      __pyx_L4_bool_binop_done:;
                      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                      __pyx_t_6 = (!__pyx_t_5);
                      if (unlikely(__pyx_t_6)) {

                        /* "pyarrow/tensor.pxi":747
 *         import scipy.sparse
 *         if not isinstance(obj, (scipy.sparse.csr_array, scipy.sparse.csr_matrix)):
 *             raise TypeError(             # <<<<<<<<<<<<<<
 *                 f"Expected scipy.sparse.csr_array or scipy.sparse.csr_matrix, got {type(obj)}")
 * 
*/
                        __pyx_t_4 = NULL;

                        /* "pyarrow/tensor.pxi":748
 *         if not isinstance(obj, (scipy.sparse.csr_array, scipy.sparse.csr_matrix)):
 *             raise TypeError(
 *                 f"Expected scipy.sparse.csr_array or scipy.sparse.csr_matrix, got {type(obj)}")             # <<<<<<<<<<<<<<
 * 
 *         cdef shared_ptr[CSparseCSRMatrix] csparse_tensor
*/
                        __pyx_t_1 = __Pyx_PyObject_FormatSimple(((PyObject *)Py_TYPE(__pyx_v_obj)), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 748, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                        __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_Expected_scipy_sparse_csr_array, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 748, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_7);
                        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                        __pyx_t_8 = 1;
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_7};
                          __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
                          if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 747, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_3);
                        }
                        __Pyx_Raise(__pyx_t_3, 0, 0, 0);
                        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                        __PYX_ERR(5, 747, __pyx_L1_error)

                        /* "pyarrow/tensor.pxi":746
 *         """
 *         import scipy.sparse
 *         if not isinstance(obj, (scipy.sparse.csr_array, scipy.sparse.csr_matrix)):             # <<<<<<<<<<<<<<
 *             raise TypeError(
 *                 f"Expected scipy.sparse.csr_array or scipy.sparse.csr_matrix, got {type(obj)}")
*/
                      }

                      /* "pyarrow/tensor.pxi":754
 *         cdef vector[c_string] c_dim_names
 * 
 *         for x in obj.shape:             # <<<<<<<<<<<<<<
 *             c_shape.push_back(x)
 *         if dim_names is not None:
*/
                      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_mstate_global->__pyx_n_u_shape); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 754, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_3);
                      if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
                        __pyx_t_7 = __pyx_t_3; __Pyx_INCREF(__pyx_t_7);
                        __pyx_t_9 = 0;
                        __pyx_t_10 = NULL;
                      } else {
                        __pyx_t_9 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 754, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_7);
                        __pyx_t_10 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_7); if (unlikely(!__pyx_t_10)) __PYX_ERR(5, 754, __pyx_L1_error)
                      }
                      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                      for (;;) {
                        if (likely(!__pyx_t_10)) {
                          if (likely(PyList_CheckExact(__pyx_t_7))) {
                            {
                              Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_7);
                              #if !CYTHON_ASSUME_SAFE_SIZE
                              if (unlikely((__pyx_temp < 0))) __PYX_ERR(5, 754, __pyx_L1_error)
                              #endif
                              if (__pyx_t_9 >= __pyx_temp) break;
                            }
                            __pyx_t_3 = __Pyx_PyList_GetItemRefFast(__pyx_t_7, __pyx_t_9, __Pyx_ReferenceSharing_OwnStrongReference);
                            ++__pyx_t_9;
                          } else {
                            {
                              Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_7);
                              #if !CYTHON_ASSUME_SAFE_SIZE
                              if (unlikely((__pyx_temp < 0))) __PYX_ERR(5, 754, __pyx_L1_error)
                              #endif
                              if (__pyx_t_9 >= __pyx_temp) break;
                            }
                            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                            __pyx_t_3 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_9));
                            #else
                            __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_7, __pyx_t_9);
                            #endif
                            ++__pyx_t_9;
                          }
                          if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 754, __pyx_L1_error)
                        } else {
                          __pyx_t_3 = __pyx_t_10(__pyx_t_7);
                          if (unlikely(!__pyx_t_3)) {
                            PyObject* exc_type = PyErr_Occurred();
                            if (exc_type) {
                              if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(5, 754, __pyx_L1_error)
                              PyErr_Clear();
                            }
                            break;
                          }
                        }
                        __Pyx_GOTREF(__pyx_t_3);
                        __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_3);
                        __pyx_t_3 = 0;

                        /* "pyarrow/tensor.pxi":755
 * 
 *         for x in obj.shape:
 *             c_shape.push_back(x)             # <<<<<<<<<<<<<<
 *         if dim_names is not None:
 *             for x in dim_names:
*/
                        __pyx_t_11 = __Pyx_PyLong_As_int64_t(__pyx_v_x); if (unlikely((__pyx_t_11 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(5, 755, __pyx_L1_error)
                        try {
                          __pyx_v_c_shape.push_back(__pyx_t_11);
                        } catch(...) {
                          __Pyx_CppExn2PyErr();
                          __PYX_ERR(5, 755, __pyx_L1_error)
                        }

                        /* "pyarrow/tensor.pxi":754
 *         cdef vector[c_string] c_dim_names
 * 
 *         for x in obj.shape:             # <<<<<<<<<<<<<<
 *             c_shape.push_back(x)
 *         if dim_names is not None:
*/
                      }
                      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

                      /* "pyarrow/tensor.pxi":756
 *         for x in obj.shape:
 *             c_shape.push_back(x)
 *         if dim_names is not None:             # <<<<<<<<<<<<<<
 *             for x in dim_names:
 *                 c_dim_names.push_back(tobytes(x))
*/
                      __pyx_t_6 = (__pyx_v_dim_names != Py_None);
                      if (__pyx_t_6) {

                        /* "pyarrow/tensor.pxi":757
 *             c_shape.push_back(x)
 *         if dim_names is not None:
 *             for x in dim_names:             # <<<<<<<<<<<<<<
 *                 c_dim_names.push_back(tobytes(x))
 * 
*/
                        if (likely(PyList_CheckExact(__pyx_v_dim_names)) || PyTuple_CheckExact(__pyx_v_dim_names)) {
                          __pyx_t_7 = __pyx_v_dim_names; __Pyx_INCREF(__pyx_t_7);
                          __pyx_t_9 = 0;
                          __pyx_t_10 = NULL;
                        } else {
                          __pyx_t_9 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_v_dim_names); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 757, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_7);
                          __pyx_t_10 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_7); if (unlikely(!__pyx_t_10)) __PYX_ERR(5, 757, __pyx_L1_error)
                        }
                        for (;;) {
                          if (likely(!__pyx_t_10)) {
                            if (likely(PyList_CheckExact(__pyx_t_7))) {
                              {
                                Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_7);
                                #if !CYTHON_ASSUME_SAFE_SIZE
                                if (unlikely((__pyx_temp < 0))) __PYX_ERR(5, 757, __pyx_L1_error)
                                #endif
                                if (__pyx_t_9 >= __pyx_temp) break;
                              }
                              __pyx_t_3 = __Pyx_PyList_GetItemRefFast(__pyx_t_7, __pyx_t_9, __Pyx_ReferenceSharing_OwnStrongReference);
                              ++__pyx_t_9;
                            } else {
                              {
                                Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_7);
                                #if !CYTHON_ASSUME_SAFE_SIZE
                                if (unlikely((__pyx_temp < 0))) __PYX_ERR(5, 757, __pyx_L1_error)
                                #endif
                                if (__pyx_t_9 >= __pyx_temp) break;
                              }
                              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                              __pyx_t_3 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_9));
                              #else
                              __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_7, __pyx_t_9);
                              #endif
                              ++__pyx_t_9;
                            }
                            if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 757, __pyx_L1_error)
                          } else {
                            __pyx_t_3 = __pyx_t_10(__pyx_t_7);
                            if (unlikely(!__pyx_t_3)) {
                              PyObject* exc_type = PyErr_Occurred();
                              if (exc_type) {
                                if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(5, 757, __pyx_L1_error)
                                PyErr_Clear();
                              }
                              break;
                            }
                          }
                          __Pyx_GOTREF(__pyx_t_3);
                          __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_3);
                          __pyx_t_3 = 0;

                          /* "pyarrow/tensor.pxi":758
 *         if dim_names is not None:
 *             for x in dim_names:
 *                 c_dim_names.push_back(tobytes(x))             # <<<<<<<<<<<<<<
 * 
 *         # Enforce precondition for CSparseCSRMatrix indices
*/
                          __pyx_t_4 = NULL;
                          __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_tobytes); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 758, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_1);
                          __pyx_t_8 = 1;
                          #if CYTHON_UNPACK_METHODS
                          if (unlikely(PyMethod_Check(__pyx_t_1))) {
                            __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
                            assert(__pyx_t_4);
                            PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_1);
                            __Pyx_INCREF(__pyx_t_4);
                            __Pyx_INCREF(__pyx__function);
                            __Pyx_DECREF_SET(__pyx_t_1, __pyx__function);
                            __pyx_t_8 = 0;
                          }
                          #endif
                          {
                            PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_x};
                            __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_1, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                            if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 758, __pyx_L1_error)
                            __Pyx_GOTREF(__pyx_t_3);
                          }
                          __pyx_t_12 = __pyx_convert_string_from_py_6libcpp_6string_std__in_string(__pyx_t_3); if (unlikely(PyErr_Occurred())) __PYX_ERR(5, 758, __pyx_L1_error)
                          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                          try {
                            __pyx_v_c_dim_names.push_back(__pyx_t_12);
                          } catch(...) {
                            __Pyx_CppExn2PyErr();
                            __PYX_ERR(5, 758, __pyx_L1_error)
                          }

                          /* "pyarrow/tensor.pxi":757
 *             c_shape.push_back(x)
 *         if dim_names is not None:
 *             for x in dim_names:             # <<<<<<<<<<<<<<
 *                 c_dim_names.push_back(tobytes(x))
 * 
*/
                        }
                        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

                        /* "pyarrow/tensor.pxi":756
 *         for x in obj.shape:
 *             c_shape.push_back(x)
 *         if dim_names is not None:             # <<<<<<<<<<<<<<
 *             for x in dim_names:
 *                 c_dim_names.push_back(tobytes(x))
*/
                      }

                      /* "pyarrow/tensor.pxi":761
 * 
 *         # Enforce precondition for CSparseCSRMatrix indices
 *         indptr = np.require(obj.indptr, dtype='i8')             # <<<<<<<<<<<<<<
 *         indices = np.require(obj.indices, dtype='i8')
 * 
*/
                      __pyx_t_3 = NULL;
                      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 761, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_require); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 761, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_4);
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_mstate_global->__pyx_n_u_indptr); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 761, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_t_8 = 1;
                      #if CYTHON_UNPACK_METHODS
                      if (unlikely(PyMethod_Check(__pyx_t_4))) {
                        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
                        assert(__pyx_t_3);
                        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
                        __Pyx_INCREF(__pyx_t_3);
                        __Pyx_INCREF(__pyx__function);
                        __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
                        __pyx_t_8 = 0;
                      }
                      #endif
                      {
                        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_3, __pyx_t_1};
                        __pyx_t_13 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_13)) __PYX_ERR(5, 761, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_13);
                        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_dtype, __pyx_mstate_global->__pyx_n_u_i8, __pyx_t_13, __pyx_callargs+2, 0) < (0)) __PYX_ERR(5, 761, __pyx_L1_error)
                        __pyx_t_7 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_13);
                        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
                        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                        if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 761, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_7);
                      }
                      __pyx_v_indptr = __pyx_t_7;
                      __pyx_t_7 = 0;

                      /* "pyarrow/tensor.pxi":762
 *         # Enforce precondition for CSparseCSRMatrix indices
 *         indptr = np.require(obj.indptr, dtype='i8')
 *         indices = np.require(obj.indices, dtype='i8')             # <<<<<<<<<<<<<<
 * 
 *         check_status(NdarraysToSparseCSRMatrix(c_default_memory_pool(),
*/
                      __pyx_t_4 = NULL;
                      __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_13)) __PYX_ERR(5, 762, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_13);
                      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_require); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 762, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
                      __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_mstate_global->__pyx_n_u_indices); if (unlikely(!__pyx_t_13)) __PYX_ERR(5, 762, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_13);
                      __pyx_t_8 = 1;
                      #if CYTHON_UNPACK_METHODS
                      if (unlikely(PyMethod_Check(__pyx_t_1))) {
                        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
                        assert(__pyx_t_4);
                        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_1);
                        __Pyx_INCREF(__pyx_t_4);
                        __Pyx_INCREF(__pyx__function);
                        __Pyx_DECREF_SET(__pyx_t_1, __pyx__function);
                        __pyx_t_8 = 0;
                      }
                      #endif
                      {
                        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_4, __pyx_t_13};
                        __pyx_t_3 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 762, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_3);
                        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_dtype, __pyx_mstate_global->__pyx_n_u_i8, __pyx_t_3, __pyx_callargs+2, 0) < (0)) __PYX_ERR(5, 762, __pyx_L1_error)
                        __pyx_t_7 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_1, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_3);
                        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
                        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                        if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 762, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_7);
                      }
                      __pyx_v_indices = __pyx_t_7;
                      __pyx_t_7 = 0;

                      /* "pyarrow/tensor.pxi":765
 * 
 *         check_status(NdarraysToSparseCSRMatrix(c_default_memory_pool(),
 *                                                obj.data, indptr, indices,             # <<<<<<<<<<<<<<
 *                                                c_shape, c_dim_names,
 *                                                &csparse_tensor))
*/
                      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_mstate_global->__pyx_n_u_data); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 765, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_7);

                      /* "pyarrow/tensor.pxi":764
 *         indices = np.require(obj.indices, dtype='i8')
 * 
 *         check_status(NdarraysToSparseCSRMatrix(c_default_memory_pool(),             # <<<<<<<<<<<<<<
 *                                                obj.data, indptr, indices,
 *                                                c_shape, c_dim_names,
*/
                      __pyx_t_14 = __pyx_f_7pyarrow_3lib_check_status(arrow::py::NdarraysToSparseCSRMatrix( arrow::default_memory_pool(), __pyx_t_7, __pyx_v_indptr, __pyx_v_indices, __pyx_v_c_shape, __pyx_v_c_dim_names, (&__pyx_v_csparse_tensor))); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(5, 764, __pyx_L1_error)
                      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

                      /* "pyarrow/tensor.pxi":768
 *                                                c_shape, c_dim_names,
 *                                                &csparse_tensor))
 *         return pyarrow_wrap_sparse_csr_matrix(csparse_tensor)             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
*/
                      __Pyx_XDECREF(__pyx_r);
                      __pyx_t_7 = pyarrow_wrap_sparse_csr_matrix(__pyx_v_csparse_tensor); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 768, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_7);
                      __pyx_r = __pyx_t_7;
                      __pyx_t_7 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/tensor.pxi":733
 *         return pyarrow_wrap_sparse_csr_matrix(csparse_tensor)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_scipy(obj, dim_names=None):
 *         """
*/

                      /* 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_13);
                      __Pyx_AddTraceback("pyarrow.lib.SparseCSRMatrix.from_scipy", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XDECREF(__pyx_v_scipy);
                      __Pyx_XDECREF(__pyx_v_x);
                      __Pyx_XDECREF(__pyx_v_indptr);
                      __Pyx_XDECREF(__pyx_v_indices);
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/tensor.pxi":770
 *         return pyarrow_wrap_sparse_csr_matrix(csparse_tensor)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_tensor(obj):
 *         """
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSRMatrix_11from_tensor(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_15SparseCSRMatrix_10from_tensor, "SparseCSRMatrix.from_tensor(obj)\n\nConvert arrow::Tensor to arrow::SparseCSRMatrix.\n\nParameters\n----------\nobj : Tensor\n    The dense tensor that should be converted.");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_15SparseCSRMatrix_11from_tensor = {"from_tensor", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15SparseCSRMatrix_11from_tensor, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15SparseCSRMatrix_10from_tensor};
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSRMatrix_11from_tensor(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      PyObject *__pyx_v_obj = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[1] = {0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("from_tensor (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_obj,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(5, 770, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(5, 770, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "from_tensor", 0) < (0)) __PYX_ERR(5, 770, __pyx_L3_error)
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("from_tensor", 1, 1, 1, i); __PYX_ERR(5, 770, __pyx_L3_error) }
                          }
                        } else if (unlikely(__pyx_nargs != 1)) {
                          goto __pyx_L5_argtuple_error;
                        } else {
                          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(5, 770, __pyx_L3_error)
                        }
                        __pyx_v_obj = values[0];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("from_tensor", 1, 1, 1, __pyx_nargs); __PYX_ERR(5, 770, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.SparseCSRMatrix.from_tensor", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_15SparseCSRMatrix_10from_tensor(__pyx_v_obj);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSRMatrix_10from_tensor(PyObject *__pyx_v_obj) {
                      std::shared_ptr< arrow::SparseCSRMatrix>  __pyx_v_csparse_tensor;
                      std::shared_ptr< arrow::Tensor>  __pyx_v_ctensor;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      std::shared_ptr< arrow::Tensor>  __pyx_t_1;
                      int __pyx_t_2;
                      PyObject *__pyx_t_3 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("from_tensor", 0);

                      /* "pyarrow/tensor.pxi":781
 *         """
 *         cdef shared_ptr[CSparseCSRMatrix] csparse_tensor
 *         cdef shared_ptr[CTensor] ctensor = pyarrow_unwrap_tensor(obj)             # <<<<<<<<<<<<<<
 * 
 *         with nogil:
*/
                      __pyx_t_1 = pyarrow_unwrap_tensor(__pyx_v_obj); if (unlikely(PyErr_Occurred())) __PYX_ERR(5, 781, __pyx_L1_error)
                      __pyx_v_ctensor = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_1);

                      /* "pyarrow/tensor.pxi":783
 *         cdef shared_ptr[CTensor] ctensor = pyarrow_unwrap_tensor(obj)
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             check_status(TensorToSparseCSRMatrix(ctensor, &csparse_tensor))
 * 
*/
                      {
                          PyThreadState * _save;
                          _save = PyEval_SaveThread();
                          __Pyx_FastGIL_Remember();
                          /*try:*/ {

                            /* "pyarrow/tensor.pxi":784
 * 
 *         with nogil:
 *             check_status(TensorToSparseCSRMatrix(ctensor, &csparse_tensor))             # <<<<<<<<<<<<<<
 * 
 *         return pyarrow_wrap_sparse_csr_matrix(csparse_tensor)
*/
                            __pyx_t_2 = __pyx_f_7pyarrow_3lib_check_status(arrow::py::TensorToSparseCSRMatrix(__pyx_v_ctensor, (&__pyx_v_csparse_tensor))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 784, __pyx_L4_error)
                          }

                          /* "pyarrow/tensor.pxi":783
 *         cdef shared_ptr[CTensor] ctensor = pyarrow_unwrap_tensor(obj)
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             check_status(TensorToSparseCSRMatrix(ctensor, &csparse_tensor))
 * 
*/
                          /*finally:*/ {
                            /*normal exit:*/{
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L5;
                            }
                            __pyx_L4_error: {
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L1_error;
                            }
                            __pyx_L5:;
                          }
                      }

                      /* "pyarrow/tensor.pxi":786
 *             check_status(TensorToSparseCSRMatrix(ctensor, &csparse_tensor))
 * 
 *         return pyarrow_wrap_sparse_csr_matrix(csparse_tensor)             # <<<<<<<<<<<<<<
 * 
 *     def to_numpy(self):
*/
                      __Pyx_XDECREF(__pyx_r);
                      __pyx_t_3 = pyarrow_wrap_sparse_csr_matrix(__pyx_v_csparse_tensor); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 786, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_3);
                      __pyx_r = __pyx_t_3;
                      __pyx_t_3 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/tensor.pxi":770
 *         return pyarrow_wrap_sparse_csr_matrix(csparse_tensor)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_tensor(obj):
 *         """
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_AddTraceback("pyarrow.lib.SparseCSRMatrix.from_tensor", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/tensor.pxi":788
 *         return pyarrow_wrap_sparse_csr_matrix(csparse_tensor)
 * 
 *     def to_numpy(self):             # <<<<<<<<<<<<<<
 *         """
 *         Convert arrow::SparseCSRMatrix to numpy.ndarrays with zero copy.
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSRMatrix_13to_numpy(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_15SparseCSRMatrix_12to_numpy, "SparseCSRMatrix.to_numpy(self)\n\nConvert arrow::SparseCSRMatrix to numpy.ndarrays with zero copy.");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_15SparseCSRMatrix_13to_numpy = {"to_numpy", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15SparseCSRMatrix_13to_numpy, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15SparseCSRMatrix_12to_numpy};
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSRMatrix_13to_numpy(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("to_numpy (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("to_numpy", 1, 0, 0, __pyx_nargs); return NULL; }
                      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                      if (unlikely(__pyx_kwds_len < 0)) return NULL;
                      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("to_numpy", __pyx_kwds); return NULL;}
                      __pyx_r = __pyx_pf_7pyarrow_3lib_15SparseCSRMatrix_12to_numpy(((struct __pyx_obj_7pyarrow_3lib_SparseCSRMatrix *)__pyx_v_self));

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

                    static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSRMatrix_12to_numpy(struct __pyx_obj_7pyarrow_3lib_SparseCSRMatrix *__pyx_v_self) {
                      PyObject *__pyx_v_out_data;
                      PyObject *__pyx_v_out_indptr;
                      PyObject *__pyx_v_out_indices;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      int __pyx_t_2;
                      PyObject *__pyx_t_3 = NULL;
                      size_t __pyx_t_4;
                      int __pyx_t_5;
                      PyObject *__pyx_t_6 = NULL;
                      PyObject *__pyx_t_7 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("to_numpy", 0);

                      /* "pyarrow/tensor.pxi":792
 *         Convert arrow::SparseCSRMatrix to numpy.ndarrays with zero copy.
 *         """
 *         if np is None:             # <<<<<<<<<<<<<<
 *             raise ImportError(
 *                 "Cannot return a numpy.ndarray if NumPy is not present")
*/
                      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 792, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_t_2 = (__pyx_t_1 == Py_None);
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      if (unlikely(__pyx_t_2)) {

                        /* "pyarrow/tensor.pxi":793
 *         """
 *         if np is None:
 *             raise ImportError(             # <<<<<<<<<<<<<<
 *                 "Cannot return a numpy.ndarray if NumPy is not present")
 *         cdef PyObject* out_data
*/
                        __pyx_t_3 = NULL;
                        __pyx_t_4 = 1;
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Cannot_return_a_numpy_ndarray_if};
                          __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ImportError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                          if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 793, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_1);
                        }
                        __Pyx_Raise(__pyx_t_1, 0, 0, 0);
                        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                        __PYX_ERR(5, 793, __pyx_L1_error)

                        /* "pyarrow/tensor.pxi":792
 *         Convert arrow::SparseCSRMatrix to numpy.ndarrays with zero copy.
 *         """
 *         if np is None:             # <<<<<<<<<<<<<<
 *             raise ImportError(
 *                 "Cannot return a numpy.ndarray if NumPy is not present")
*/
                      }

                      /* "pyarrow/tensor.pxi":799
 *         cdef PyObject* out_indices
 * 
 *         check_status(SparseCSRMatrixToNdarray(self.sp_sparse_tensor, self,             # <<<<<<<<<<<<<<
 *                                               &out_data, &out_indptr,
 *                                               &out_indices))
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_sparse_tensor");
                        __PYX_ERR(5, 799, __pyx_L1_error)
                      }

                      /* "pyarrow/tensor.pxi":801
 *         check_status(SparseCSRMatrixToNdarray(self.sp_sparse_tensor, self,
 *                                               &out_data, &out_indptr,
 *                                               &out_indices))             # <<<<<<<<<<<<<<
 *         return (PyObject_to_object(out_data), PyObject_to_object(out_indptr),
 *                 PyObject_to_object(out_indices))
*/
                      __pyx_t_5 = __pyx_f_7pyarrow_3lib_check_status(arrow::py::SparseCSRMatrixToNdarray(__pyx_v_self->sp_sparse_tensor, ((PyObject *)__pyx_v_self), (&__pyx_v_out_data), (&__pyx_v_out_indptr), (&__pyx_v_out_indices))); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(5, 799, __pyx_L1_error)

                      /* "pyarrow/tensor.pxi":802
 *                                               &out_data, &out_indptr,
 *                                               &out_indices))
 *         return (PyObject_to_object(out_data), PyObject_to_object(out_indptr),             # <<<<<<<<<<<<<<
 *                 PyObject_to_object(out_indices))
 * 
*/
                      __Pyx_XDECREF(__pyx_r);
                      __pyx_t_1 = __pyx_f_7pyarrow_8includes_6common_PyObject_to_object(__pyx_v_out_data); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 802, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_t_3 = __pyx_f_7pyarrow_8includes_6common_PyObject_to_object(__pyx_v_out_indptr); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 802, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_3);

                      /* "pyarrow/tensor.pxi":803
 *                                               &out_indices))
 *         return (PyObject_to_object(out_data), PyObject_to_object(out_indptr),
 *                 PyObject_to_object(out_indices))             # <<<<<<<<<<<<<<
 * 
 *     def to_scipy(self):
*/
                      __pyx_t_6 = __pyx_f_7pyarrow_8includes_6common_PyObject_to_object(__pyx_v_out_indices); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 803, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_6);

                      /* "pyarrow/tensor.pxi":802
 *                                               &out_data, &out_indptr,
 *                                               &out_indices))
 *         return (PyObject_to_object(out_data), PyObject_to_object(out_indptr),             # <<<<<<<<<<<<<<
 *                 PyObject_to_object(out_indices))
 * 
*/
                      __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 802, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_7);
                      __Pyx_GIVEREF(__pyx_t_1);
                      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1) != (0)) __PYX_ERR(5, 802, __pyx_L1_error);
                      __Pyx_GIVEREF(__pyx_t_3);
                      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_3) != (0)) __PYX_ERR(5, 802, __pyx_L1_error);
                      __Pyx_GIVEREF(__pyx_t_6);
                      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_6) != (0)) __PYX_ERR(5, 802, __pyx_L1_error);
                      __pyx_t_1 = 0;
                      __pyx_t_3 = 0;
                      __pyx_t_6 = 0;
                      __pyx_r = __pyx_t_7;
                      __pyx_t_7 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/tensor.pxi":788
 *         return pyarrow_wrap_sparse_csr_matrix(csparse_tensor)
 * 
 *     def to_numpy(self):             # <<<<<<<<<<<<<<
 *         """
 *         Convert arrow::SparseCSRMatrix to numpy.ndarrays with zero copy.
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_XDECREF(__pyx_t_6);
                      __Pyx_XDECREF(__pyx_t_7);
                      __Pyx_AddTraceback("pyarrow.lib.SparseCSRMatrix.to_numpy", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/tensor.pxi":805
 *                 PyObject_to_object(out_indices))
 * 
 *     def to_scipy(self):             # <<<<<<<<<<<<<<
 *         """
 *         Convert arrow::SparseCSRMatrix to scipy.sparse.csr_array.
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSRMatrix_15to_scipy(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_15SparseCSRMatrix_14to_scipy, "SparseCSRMatrix.to_scipy(self)\n\nConvert arrow::SparseCSRMatrix to scipy.sparse.csr_array.");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_15SparseCSRMatrix_15to_scipy = {"to_scipy", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15SparseCSRMatrix_15to_scipy, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15SparseCSRMatrix_14to_scipy};
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSRMatrix_15to_scipy(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("to_scipy (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("to_scipy", 1, 0, 0, __pyx_nargs); return NULL; }
                      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                      if (unlikely(__pyx_kwds_len < 0)) return NULL;
                      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("to_scipy", __pyx_kwds); return NULL;}
                      __pyx_r = __pyx_pf_7pyarrow_3lib_15SparseCSRMatrix_14to_scipy(((struct __pyx_obj_7pyarrow_3lib_SparseCSRMatrix *)__pyx_v_self));

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

                    static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSRMatrix_14to_scipy(struct __pyx_obj_7pyarrow_3lib_SparseCSRMatrix *__pyx_v_self) {
                      PyObject *__pyx_v_csr_array = NULL;
                      PyObject *__pyx_v_out_data;
                      PyObject *__pyx_v_out_indptr;
                      PyObject *__pyx_v_out_indices;
                      PyObject *__pyx_v_data = NULL;
                      PyObject *__pyx_v_indptr = NULL;
                      PyObject *__pyx_v_indices = NULL;
                      PyObject *__pyx_v_result = NULL;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      Py_ssize_t __pyx_t_3;
                      PyObject *__pyx_t_4 = NULL;
                      int __pyx_t_5;
                      PyObject *__pyx_t_6 = NULL;
                      PyObject *__pyx_t_7 = NULL;
                      PyObject *__pyx_t_8 = NULL;
                      size_t __pyx_t_9;
                      PyObject *__pyx_t_10 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("to_scipy", 0);

                      /* "pyarrow/tensor.pxi":809
 *         Convert arrow::SparseCSRMatrix to scipy.sparse.csr_array.
 *         """
 *         from scipy.sparse import csr_array             # <<<<<<<<<<<<<<
 *         cdef PyObject* out_data
 *         cdef PyObject* out_indptr
*/
                      {
                        PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_csr_array};
                        __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_scipy_sparse, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 809, __pyx_L1_error)
                      }
                      __pyx_t_1 = __pyx_t_2;
                      __Pyx_GOTREF(__pyx_t_1);
                      {
                        PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_csr_array};
                        __pyx_t_3 = 0; {
                          __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_1, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 809, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_4);
                          switch (__pyx_t_3) {
                            case 0:
                            __Pyx_INCREF(__pyx_t_4);
                            __pyx_v_csr_array = __pyx_t_4;
                            break;
                            default:;
                          }
                          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                        }
                      }
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

                      /* "pyarrow/tensor.pxi":814
 *         cdef PyObject* out_indices
 * 
 *         check_status(SparseCSRMatrixToNdarray(self.sp_sparse_tensor, self,             # <<<<<<<<<<<<<<
 *                                               &out_data, &out_indptr,
 *                                               &out_indices))
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_sparse_tensor");
                        __PYX_ERR(5, 814, __pyx_L1_error)
                      }

                      /* "pyarrow/tensor.pxi":816
 *         check_status(SparseCSRMatrixToNdarray(self.sp_sparse_tensor, self,
 *                                               &out_data, &out_indptr,
 *                                               &out_indices))             # <<<<<<<<<<<<<<
 * 
 *         data = PyObject_to_object(out_data)
*/
                      __pyx_t_5 = __pyx_f_7pyarrow_3lib_check_status(arrow::py::SparseCSRMatrixToNdarray(__pyx_v_self->sp_sparse_tensor, ((PyObject *)__pyx_v_self), (&__pyx_v_out_data), (&__pyx_v_out_indptr), (&__pyx_v_out_indices))); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(5, 814, __pyx_L1_error)

                      /* "pyarrow/tensor.pxi":818
 *                                               &out_indices))
 * 
 *         data = PyObject_to_object(out_data)             # <<<<<<<<<<<<<<
 *         indptr = PyObject_to_object(out_indptr)
 *         indices = PyObject_to_object(out_indices)
*/
                      __pyx_t_1 = __pyx_f_7pyarrow_8includes_6common_PyObject_to_object(__pyx_v_out_data); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 818, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_v_data = __pyx_t_1;
                      __pyx_t_1 = 0;

                      /* "pyarrow/tensor.pxi":819
 * 
 *         data = PyObject_to_object(out_data)
 *         indptr = PyObject_to_object(out_indptr)             # <<<<<<<<<<<<<<
 *         indices = PyObject_to_object(out_indices)
 *         result = csr_array((data[:, 0], indices, indptr), shape=self.shape)
*/
                      __pyx_t_1 = __pyx_f_7pyarrow_8includes_6common_PyObject_to_object(__pyx_v_out_indptr); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 819, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_v_indptr = __pyx_t_1;
                      __pyx_t_1 = 0;

                      /* "pyarrow/tensor.pxi":820
 *         data = PyObject_to_object(out_data)
 *         indptr = PyObject_to_object(out_indptr)
 *         indices = PyObject_to_object(out_indices)             # <<<<<<<<<<<<<<
 *         result = csr_array((data[:, 0], indices, indptr), shape=self.shape)
 *         return result
*/
                      __pyx_t_1 = __pyx_f_7pyarrow_8includes_6common_PyObject_to_object(__pyx_v_out_indices); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 820, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_v_indices = __pyx_t_1;
                      __pyx_t_1 = 0;

                      /* "pyarrow/tensor.pxi":821
 *         indptr = PyObject_to_object(out_indptr)
 *         indices = PyObject_to_object(out_indices)
 *         result = csr_array((data[:, 0], indices, indptr), shape=self.shape)             # <<<<<<<<<<<<<<
 *         return result
 * 
*/
                      __pyx_t_4 = NULL;
                      __Pyx_INCREF(__pyx_v_csr_array);
                      __pyx_t_6 = __pyx_v_csr_array; 
                      if (unlikely(__pyx_v_data == Py_None)) {
                        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
                        __PYX_ERR(5, 821, __pyx_L1_error)
                      }
                      __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_data, __pyx_mstate_global->__pyx_tuple[4]); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 821, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_7);
                      __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 821, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_8);
                      __Pyx_GIVEREF(__pyx_t_7);
                      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7) != (0)) __PYX_ERR(5, 821, __pyx_L1_error);
                      __Pyx_INCREF(__pyx_v_indices);
                      __Pyx_GIVEREF(__pyx_v_indices);
                      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_indices) != (0)) __PYX_ERR(5, 821, __pyx_L1_error);
                      __Pyx_INCREF(__pyx_v_indptr);
                      __Pyx_GIVEREF(__pyx_v_indptr);
                      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_v_indptr) != (0)) __PYX_ERR(5, 821, __pyx_L1_error);
                      __pyx_t_7 = 0;
                      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_shape); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 821, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_7);
                      __pyx_t_9 = 1;
                      #if CYTHON_UNPACK_METHODS
                      if (unlikely(PyMethod_Check(__pyx_t_6))) {
                        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
                        assert(__pyx_t_4);
                        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
                        __Pyx_INCREF(__pyx_t_4);
                        __Pyx_INCREF(__pyx__function);
                        __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
                        __pyx_t_9 = 0;
                      }
                      #endif
                      {
                        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_4, __pyx_t_8};
                        __pyx_t_10 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(5, 821, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_10);
                        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_shape, __pyx_t_7, __pyx_t_10, __pyx_callargs+2, 0) < (0)) __PYX_ERR(5, 821, __pyx_L1_error)
                        __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_10);
                        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
                        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 821, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __pyx_v_result = __pyx_t_1;
                      __pyx_t_1 = 0;

                      /* "pyarrow/tensor.pxi":822
 *         indices = PyObject_to_object(out_indices)
 *         result = csr_array((data[:, 0], indices, indptr), shape=self.shape)
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     def to_tensor(self):
*/
                      __Pyx_XDECREF(__pyx_r);
                      __Pyx_INCREF(__pyx_v_result);
                      __pyx_r = __pyx_v_result;
                      goto __pyx_L0;

                      /* "pyarrow/tensor.pxi":805
 *                 PyObject_to_object(out_indices))
 * 
 *     def to_scipy(self):             # <<<<<<<<<<<<<<
 *         """
 *         Convert arrow::SparseCSRMatrix to scipy.sparse.csr_array.
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_4);
                      __Pyx_XDECREF(__pyx_t_6);
                      __Pyx_XDECREF(__pyx_t_7);
                      __Pyx_XDECREF(__pyx_t_8);
                      __Pyx_XDECREF(__pyx_t_10);
                      __Pyx_AddTraceback("pyarrow.lib.SparseCSRMatrix.to_scipy", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XDECREF(__pyx_v_csr_array);
                      __Pyx_XDECREF(__pyx_v_data);
                      __Pyx_XDECREF(__pyx_v_indptr);
                      __Pyx_XDECREF(__pyx_v_indices);
                      __Pyx_XDECREF(__pyx_v_result);
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/tensor.pxi":824
 *         return result
 * 
 *     def to_tensor(self):             # <<<<<<<<<<<<<<
 *         """
 *         Convert arrow::SparseCSRMatrix to arrow::Tensor.
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSRMatrix_17to_tensor(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_15SparseCSRMatrix_16to_tensor, "SparseCSRMatrix.to_tensor(self)\n\nConvert arrow::SparseCSRMatrix to arrow::Tensor.");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_15SparseCSRMatrix_17to_tensor = {"to_tensor", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15SparseCSRMatrix_17to_tensor, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15SparseCSRMatrix_16to_tensor};
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSRMatrix_17to_tensor(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("to_tensor (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("to_tensor", 1, 0, 0, __pyx_nargs); return NULL; }
                      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                      if (unlikely(__pyx_kwds_len < 0)) return NULL;
                      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("to_tensor", __pyx_kwds); return NULL;}
                      __pyx_r = __pyx_pf_7pyarrow_3lib_15SparseCSRMatrix_16to_tensor(((struct __pyx_obj_7pyarrow_3lib_SparseCSRMatrix *)__pyx_v_self));

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

                    static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSRMatrix_16to_tensor(struct __pyx_obj_7pyarrow_3lib_SparseCSRMatrix *__pyx_v_self) {
                      std::shared_ptr< arrow::Tensor>  __pyx_v_ctensor;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      std::shared_ptr< arrow::Tensor>  __pyx_t_1;
                      PyObject *__pyx_t_2 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("to_tensor", 0);

                      /* "pyarrow/tensor.pxi":829
 *         """
 *         cdef shared_ptr[CTensor] ctensor
 *         with nogil:             # <<<<<<<<<<<<<<
 *             ctensor = GetResultValue(self.stp.ToTensor())
 * 
*/
                      {
                          PyThreadState * _save;
                          _save = PyEval_SaveThread();
                          __Pyx_FastGIL_Remember();
                          /*try:*/ {

                            /* "pyarrow/tensor.pxi":830
 *         cdef shared_ptr[CTensor] ctensor
 *         with nogil:
 *             ctensor = GetResultValue(self.stp.ToTensor())             # <<<<<<<<<<<<<<
 * 
 *         return pyarrow_wrap_tensor(ctensor)
*/
                            if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                              PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "stp");
                              __Pyx_PyGILState_Release(__pyx_gilstate_save);
                              __PYX_ERR(5, 830, __pyx_L4_error)
                            }
                            __pyx_t_1 = arrow::py::GetResultValue<std::shared_ptr< arrow::Tensor> >(__pyx_v_self->stp->ToTensor()); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(5, 830, __pyx_L4_error)
                            __pyx_v_ctensor = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_1);
                          }

                          /* "pyarrow/tensor.pxi":829
 *         """
 *         cdef shared_ptr[CTensor] ctensor
 *         with nogil:             # <<<<<<<<<<<<<<
 *             ctensor = GetResultValue(self.stp.ToTensor())
 * 
*/
                          /*finally:*/ {
                            /*normal exit:*/{
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L5;
                            }
                            __pyx_L4_error: {
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L1_error;
                            }
                            __pyx_L5:;
                          }
                      }

                      /* "pyarrow/tensor.pxi":832
 *             ctensor = GetResultValue(self.stp.ToTensor())
 * 
 *         return pyarrow_wrap_tensor(ctensor)             # <<<<<<<<<<<<<<
 * 
 *     def equals(self, SparseCSRMatrix other):
*/
                      __Pyx_XDECREF(__pyx_r);
                      __pyx_t_2 = pyarrow_wrap_tensor(__pyx_v_ctensor); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 832, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_2);
                      __pyx_r = __pyx_t_2;
                      __pyx_t_2 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/tensor.pxi":824
 *         return result
 * 
 *     def to_tensor(self):             # <<<<<<<<<<<<<<
 *         """
 *         Convert arrow::SparseCSRMatrix to arrow::Tensor.
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_AddTraceback("pyarrow.lib.SparseCSRMatrix.to_tensor", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/tensor.pxi":834
 *         return pyarrow_wrap_tensor(ctensor)
 * 
 *     def equals(self, SparseCSRMatrix other):             # <<<<<<<<<<<<<<
 *         """
 *         Return true if sparse tensors contains exactly equal data.
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSRMatrix_19equals(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_15SparseCSRMatrix_18equals, "SparseCSRMatrix.equals(self, SparseCSRMatrix other)\n\nReturn true if sparse tensors contains exactly equal data.\n\nParameters\n----------\nother : SparseCSRMatrix\n    The other tensor to compare for equality.");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_15SparseCSRMatrix_19equals = {"equals", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15SparseCSRMatrix_19equals, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15SparseCSRMatrix_18equals};
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSRMatrix_19equals(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      struct __pyx_obj_7pyarrow_3lib_SparseCSRMatrix *__pyx_v_other = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[1] = {0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("equals (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_other,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(5, 834, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(5, 834, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "equals", 0) < (0)) __PYX_ERR(5, 834, __pyx_L3_error)
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("equals", 1, 1, 1, i); __PYX_ERR(5, 834, __pyx_L3_error) }
                          }
                        } else if (unlikely(__pyx_nargs != 1)) {
                          goto __pyx_L5_argtuple_error;
                        } else {
                          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(5, 834, __pyx_L3_error)
                        }
                        __pyx_v_other = ((struct __pyx_obj_7pyarrow_3lib_SparseCSRMatrix *)values[0]);
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("equals", 1, 1, 1, __pyx_nargs); __PYX_ERR(5, 834, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.SparseCSRMatrix.equals", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_SparseCSRMatrix, 1, "other", 0))) __PYX_ERR(5, 834, __pyx_L1_error)
                      __pyx_r = __pyx_pf_7pyarrow_3lib_15SparseCSRMatrix_18equals(((struct __pyx_obj_7pyarrow_3lib_SparseCSRMatrix *)__pyx_v_self), __pyx_v_other);

                      /* function exit code */
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __pyx_r = NULL;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      goto __pyx_L7_cleaned_up;
                      __pyx_L0:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __pyx_L7_cleaned_up:;
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSRMatrix_18equals(struct __pyx_obj_7pyarrow_3lib_SparseCSRMatrix *__pyx_v_self, struct __pyx_obj_7pyarrow_3lib_SparseCSRMatrix *__pyx_v_other) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("equals", 0);

                      /* "pyarrow/tensor.pxi":843
 *             The other tensor to compare for equality.
 *         """
 *         return self.stp.Equals(deref(other.stp))             # <<<<<<<<<<<<<<
 * 
 *     def __eq__(self, other):
*/
                      __Pyx_XDECREF(__pyx_r);
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "stp");
                        __PYX_ERR(5, 843, __pyx_L1_error)
                      }
                      if (unlikely(((PyObject *)__pyx_v_other) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "stp");
                        __PYX_ERR(5, 843, __pyx_L1_error)
                      }
                      __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->stp->Equals((*__pyx_v_other->stp))); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 843, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_r = __pyx_t_1;
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/tensor.pxi":834
 *         return pyarrow_wrap_tensor(ctensor)
 * 
 *     def equals(self, SparseCSRMatrix other):             # <<<<<<<<<<<<<<
 *         """
 *         Return true if sparse tensors contains exactly equal data.
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_AddTraceback("pyarrow.lib.SparseCSRMatrix.equals", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/tensor.pxi":845
 *         return self.stp.Equals(deref(other.stp))
 * 
 *     def __eq__(self, other):             # <<<<<<<<<<<<<<
 *         if isinstance(other, SparseCSRMatrix):
 *             return self.equals(other)
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSRMatrix_21__eq__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSRMatrix_21__eq__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__eq__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_15SparseCSRMatrix_20__eq__(((struct __pyx_obj_7pyarrow_3lib_SparseCSRMatrix *)__pyx_v_self), ((PyObject *)__pyx_v_other));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSRMatrix_20__eq__(struct __pyx_obj_7pyarrow_3lib_SparseCSRMatrix *__pyx_v_self, PyObject *__pyx_v_other) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_t_1;
                      PyObject *__pyx_t_2 = NULL;
                      PyObject *__pyx_t_3 = NULL;
                      size_t __pyx_t_4;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__eq__", 0);

                      /* "pyarrow/tensor.pxi":846
 * 
 *     def __eq__(self, other):
 *         if isinstance(other, SparseCSRMatrix):             # <<<<<<<<<<<<<<
 *             return self.equals(other)
 *         else:
*/
                      __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_other, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_SparseCSRMatrix); 
                      if (__pyx_t_1) {

                        /* "pyarrow/tensor.pxi":847
 *     def __eq__(self, other):
 *         if isinstance(other, SparseCSRMatrix):
 *             return self.equals(other)             # <<<<<<<<<<<<<<
 *         else:
 *             return NotImplemented
*/
                        __Pyx_XDECREF(__pyx_r);
                        __pyx_t_3 = ((PyObject *)__pyx_v_self);
                        __Pyx_INCREF(__pyx_t_3);
                        __pyx_t_4 = 0;
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_other};
                          __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_equals, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                          if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 847, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_2);
                        }
                        __pyx_r = __pyx_t_2;
                        __pyx_t_2 = 0;
                        goto __pyx_L0;

                        /* "pyarrow/tensor.pxi":846
 * 
 *     def __eq__(self, other):
 *         if isinstance(other, SparseCSRMatrix):             # <<<<<<<<<<<<<<
 *             return self.equals(other)
 *         else:
*/
                      }

                      /* "pyarrow/tensor.pxi":849
 *             return self.equals(other)
 *         else:
 *             return NotImplemented             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
                      /*else*/ {
                        __Pyx_XDECREF(__pyx_r);
                        __Pyx_INCREF(__pyx_builtin_NotImplemented);
                        __pyx_r = __pyx_builtin_NotImplemented;
                        goto __pyx_L0;
                      }

                      /* "pyarrow/tensor.pxi":845
 *         return self.stp.Equals(deref(other.stp))
 * 
 *     def __eq__(self, other):             # <<<<<<<<<<<<<<
 *         if isinstance(other, SparseCSRMatrix):
 *             return self.equals(other)
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_AddTraceback("pyarrow.lib.SparseCSRMatrix.__eq__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/tensor.pxi":851
 *             return NotImplemented
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_mutable(self):
 *         return self.stp.is_mutable()
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSRMatrix_10is_mutable_1__get__(PyObject *__pyx_v_self); /*proto*/
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSRMatrix_10is_mutable_1__get__(PyObject *__pyx_v_self) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_15SparseCSRMatrix_10is_mutable___get__(((struct __pyx_obj_7pyarrow_3lib_SparseCSRMatrix *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSRMatrix_10is_mutable___get__(struct __pyx_obj_7pyarrow_3lib_SparseCSRMatrix *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__get__", 0);

                      /* "pyarrow/tensor.pxi":853
 *     @property
 *     def is_mutable(self):
 *         return self.stp.is_mutable()             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
                      __Pyx_XDECREF(__pyx_r);
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "stp");
                        __PYX_ERR(5, 853, __pyx_L1_error)
                      }
                      __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->stp->is_mutable()); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 853, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_r = __pyx_t_1;
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/tensor.pxi":851
 *             return NotImplemented
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_mutable(self):
 *         return self.stp.is_mutable()
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_AddTraceback("pyarrow.lib.SparseCSRMatrix.is_mutable.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/tensor.pxi":855
 *         return self.stp.is_mutable()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def ndim(self):
 *         return self.stp.ndim()
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSRMatrix_4ndim_1__get__(PyObject *__pyx_v_self); /*proto*/
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSRMatrix_4ndim_1__get__(PyObject *__pyx_v_self) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_15SparseCSRMatrix_4ndim___get__(((struct __pyx_obj_7pyarrow_3lib_SparseCSRMatrix *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSRMatrix_4ndim___get__(struct __pyx_obj_7pyarrow_3lib_SparseCSRMatrix *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__get__", 0);

                      /* "pyarrow/tensor.pxi":857
 *     @property
 *     def ndim(self):
 *         return self.stp.ndim()             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
                      __Pyx_XDECREF(__pyx_r);
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "stp");
                        __PYX_ERR(5, 857, __pyx_L1_error)
                      }
                      __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_v_self->stp->ndim()); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 857, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_r = __pyx_t_1;
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/tensor.pxi":855
 *         return self.stp.is_mutable()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def ndim(self):
 *         return self.stp.ndim()
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_AddTraceback("pyarrow.lib.SparseCSRMatrix.ndim.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/tensor.pxi":859
 *         return self.stp.ndim()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def shape(self):
 *         # Cython knows how to convert a vector[T] to a Python list
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSRMatrix_5shape_1__get__(PyObject *__pyx_v_self); /*proto*/
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSRMatrix_5shape_1__get__(PyObject *__pyx_v_self) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_15SparseCSRMatrix_5shape___get__(((struct __pyx_obj_7pyarrow_3lib_SparseCSRMatrix *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSRMatrix_5shape___get__(struct __pyx_obj_7pyarrow_3lib_SparseCSRMatrix *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__get__", 0);

                      /* "pyarrow/tensor.pxi":862
 *     def shape(self):
 *         # Cython knows how to convert a vector[T] to a Python list
 *         return tuple(self.stp.shape())             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
                      __Pyx_XDECREF(__pyx_r);
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "stp");
                        __PYX_ERR(5, 862, __pyx_L1_error)
                      }
                      __pyx_t_1 = __pyx_convert_vector_to_py_int64_t(__pyx_v_self->stp->shape()); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 862, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_t_2 = __Pyx_PySequence_Tuple(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 862, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_2);
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      __pyx_r = __pyx_t_2;
                      __pyx_t_2 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/tensor.pxi":859
 *         return self.stp.ndim()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def shape(self):
 *         # Cython knows how to convert a vector[T] to a Python list
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_AddTraceback("pyarrow.lib.SparseCSRMatrix.shape.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/tensor.pxi":864
 *         return tuple(self.stp.shape())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def size(self):
 *         return self.stp.size()
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSRMatrix_4size_1__get__(PyObject *__pyx_v_self); /*proto*/
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSRMatrix_4size_1__get__(PyObject *__pyx_v_self) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_15SparseCSRMatrix_4size___get__(((struct __pyx_obj_7pyarrow_3lib_SparseCSRMatrix *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSRMatrix_4size___get__(struct __pyx_obj_7pyarrow_3lib_SparseCSRMatrix *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__get__", 0);

                      /* "pyarrow/tensor.pxi":866
 *     @property
 *     def size(self):
 *         return self.stp.size()             # <<<<<<<<<<<<<<
 * 
 *     def dim_name(self, i):
*/
                      __Pyx_XDECREF(__pyx_r);
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "stp");
                        __PYX_ERR(5, 866, __pyx_L1_error)
                      }
                      __pyx_t_1 = __Pyx_PyLong_From_int64_t(__pyx_v_self->stp->size()); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 866, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_r = __pyx_t_1;
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/tensor.pxi":864
 *         return tuple(self.stp.shape())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def size(self):
 *         return self.stp.size()
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_AddTraceback("pyarrow.lib.SparseCSRMatrix.size.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/tensor.pxi":868
 *         return self.stp.size()
 * 
 *     def dim_name(self, i):             # <<<<<<<<<<<<<<
 *         """
 *         Returns the name of the i-th tensor dimension.
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSRMatrix_23dim_name(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_15SparseCSRMatrix_22dim_name, "SparseCSRMatrix.dim_name(self, i)\n\nReturns the name of the i-th tensor dimension.\n\nParameters\n----------\ni : int\n    The physical index of the tensor dimension.\n\nReturns\n-------\nstr");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_15SparseCSRMatrix_23dim_name = {"dim_name", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15SparseCSRMatrix_23dim_name, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15SparseCSRMatrix_22dim_name};
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSRMatrix_23dim_name(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      PyObject *__pyx_v_i = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[1] = {0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("dim_name (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_i,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(5, 868, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(5, 868, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "dim_name", 0) < (0)) __PYX_ERR(5, 868, __pyx_L3_error)
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("dim_name", 1, 1, 1, i); __PYX_ERR(5, 868, __pyx_L3_error) }
                          }
                        } else if (unlikely(__pyx_nargs != 1)) {
                          goto __pyx_L5_argtuple_error;
                        } else {
                          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(5, 868, __pyx_L3_error)
                        }
                        __pyx_v_i = values[0];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("dim_name", 1, 1, 1, __pyx_nargs); __PYX_ERR(5, 868, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.SparseCSRMatrix.dim_name", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_15SparseCSRMatrix_22dim_name(((struct __pyx_obj_7pyarrow_3lib_SparseCSRMatrix *)__pyx_v_self), __pyx_v_i);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSRMatrix_22dim_name(struct __pyx_obj_7pyarrow_3lib_SparseCSRMatrix *__pyx_v_self, PyObject *__pyx_v_i) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      PyObject *__pyx_t_3 = NULL;
                      int __pyx_t_4;
                      PyObject *__pyx_t_5 = NULL;
                      size_t __pyx_t_6;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("dim_name", 0);

                      /* "pyarrow/tensor.pxi":881
 *         str
 *         """
 *         return frombytes(self.stp.dim_name(i))             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
                      __Pyx_XDECREF(__pyx_r);
                      __pyx_t_2 = NULL;
                      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_frombytes); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 881, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_3);
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "stp");
                        __PYX_ERR(5, 881, __pyx_L1_error)
                      }
                      __pyx_t_4 = __Pyx_PyLong_As_int(__pyx_v_i); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(5, 881, __pyx_L1_error)
                      __pyx_t_5 = __pyx_convert_PyBytes_string_to_py_6libcpp_6string_std__in_string(__pyx_v_self->stp->dim_name(__pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 881, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_5);
                      __pyx_t_6 = 1;
                      #if CYTHON_UNPACK_METHODS
                      if (unlikely(PyMethod_Check(__pyx_t_3))) {
                        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
                        assert(__pyx_t_2);
                        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
                        __Pyx_INCREF(__pyx_t_2);
                        __Pyx_INCREF(__pyx__function);
                        __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
                        __pyx_t_6 = 0;
                      }
                      #endif
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_5};
                        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 881, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __pyx_r = __pyx_t_1;
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/tensor.pxi":868
 *         return self.stp.size()
 * 
 *     def dim_name(self, i):             # <<<<<<<<<<<<<<
 *         """
 *         Returns the name of the i-th tensor dimension.
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_XDECREF(__pyx_t_5);
                      __Pyx_AddTraceback("pyarrow.lib.SparseCSRMatrix.dim_name", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/tensor.pxi":883
 *         return frombytes(self.stp.dim_name(i))
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def dim_names(self):
 *         names_tuple = tuple(self.stp.dim_names())
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSRMatrix_9dim_names_1__get__(PyObject *__pyx_v_self); /*proto*/
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSRMatrix_9dim_names_1__get__(PyObject *__pyx_v_self) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_15SparseCSRMatrix_9dim_names___get__(((struct __pyx_obj_7pyarrow_3lib_SparseCSRMatrix *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }
                    static PyObject *__pyx_gb_7pyarrow_3lib_15SparseCSRMatrix_9dim_names_7__get___2generator18(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

                    /* "pyarrow/tensor.pxi":886
 *     def dim_names(self):
 *         names_tuple = tuple(self.stp.dim_names())
 *         return tuple(frombytes(x) for x in names_tuple)             # <<<<<<<<<<<<<<
 * 
 *     @property
*/

                    static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSRMatrix_9dim_names_7__get___genexpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0) {
                      struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_18_genexpr *__pyx_cur_scope;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("genexpr", 0);
                      __pyx_cur_scope = (struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_18_genexpr *)__pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_18_genexpr(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_18_genexpr, __pyx_mstate_global->__pyx_empty_tuple, NULL);
                      if (unlikely(!__pyx_cur_scope)) {
                        __pyx_cur_scope = ((struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_18_genexpr *)Py_None);
                        __Pyx_INCREF(Py_None);
                        __PYX_ERR(5, 886, __pyx_L1_error)
                      } else {
                        __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
                      }
                      __pyx_cur_scope->__pyx_genexpr_arg_0 = __pyx_genexpr_arg_0;
                      __Pyx_INCREF(__pyx_cur_scope->__pyx_genexpr_arg_0);
                      __Pyx_GIVEREF(__pyx_cur_scope->__pyx_genexpr_arg_0);
                      {
                        __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7pyarrow_3lib_15SparseCSRMatrix_9dim_names_7__get___2generator18, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[17]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_SparseCSRMatrix___get___locals_g, __pyx_mstate_global->__pyx_n_u_pyarrow_lib); if (unlikely(!gen)) __PYX_ERR(5, 886, __pyx_L1_error)
                        __Pyx_DECREF(__pyx_cur_scope);
                        __Pyx_RefNannyFinishContext();
                        return (PyObject *) gen;
                      }

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib.SparseCSRMatrix.dim_names.__get__.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __Pyx_DECREF((PyObject *)__pyx_cur_scope);
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_gb_7pyarrow_3lib_15SparseCSRMatrix_9dim_names_7__get___2generator18(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
                      struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_18_genexpr *__pyx_cur_scope = ((struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_18_genexpr *)__pyx_generator->closure);
                      PyObject *__pyx_r = NULL;
                      PyObject *__pyx_t_1 = NULL;
                      Py_ssize_t __pyx_t_2;
                      PyObject *__pyx_t_3 = NULL;
                      PyObject *__pyx_t_4 = NULL;
                      PyObject *__pyx_t_5 = NULL;
                      size_t __pyx_t_6;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("genexpr", 0);
                      switch (__pyx_generator->resume_label) {
                        case 0: goto __pyx_L3_first_run;
                        case 1: goto __pyx_L6_resume_from_yield;
                        default: /* CPython raises the right error here */
                        __Pyx_RefNannyFinishContext();
                        return NULL;
                      }
                      __pyx_L3_first_run:;
                      if (unlikely(__pyx_sent_value != Py_None)) {
                        if (unlikely(__pyx_sent_value)) PyErr_SetString(PyExc_TypeError, "can't send non-None value to a just-started generator");
                        __PYX_ERR(5, 886, __pyx_L1_error)
                      }
                      if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(5, 886, __pyx_L1_error) }
                      __pyx_t_1 = __pyx_cur_scope->__pyx_genexpr_arg_0; __Pyx_INCREF(__pyx_t_1);
                      __pyx_t_2 = 0;
                      for (;;) {
                        {
                          Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
                          #if !CYTHON_ASSUME_SAFE_SIZE
                          if (unlikely((__pyx_temp < 0))) __PYX_ERR(5, 886, __pyx_L1_error)
                          #endif
                          if (__pyx_t_2 >= __pyx_temp) break;
                        }
                        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                        __pyx_t_3 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2));
                        #else
                        __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2);
                        #endif
                        ++__pyx_t_2;
                        if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 886, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_3);
                        __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_x);
                        __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_x, __pyx_t_3);
                        __Pyx_GIVEREF(__pyx_t_3);
                        __pyx_t_3 = 0;
                        __pyx_t_4 = NULL;
                        __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_frombytes); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 886, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_5);
                        __pyx_t_6 = 1;
                        #if CYTHON_UNPACK_METHODS
                        if (unlikely(PyMethod_Check(__pyx_t_5))) {
                          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
                          assert(__pyx_t_4);
                          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
                          __Pyx_INCREF(__pyx_t_4);
                          __Pyx_INCREF(__pyx__function);
                          __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
                          __pyx_t_6 = 0;
                        }
                        #endif
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_cur_scope->__pyx_v_x};
                          __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                          if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 886, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_3);
                        }
                        __pyx_r = __pyx_t_3;
                        __pyx_t_3 = 0;
                        __Pyx_XGIVEREF(__pyx_t_1);
                        __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
                        __pyx_cur_scope->__pyx_t_1 = __pyx_t_2;
                        __Pyx_XGIVEREF(__pyx_r);
                        __Pyx_RefNannyFinishContext();
                        __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
                        /* return from generator, yielding value */
                        __pyx_generator->resume_label = 1;
                        return __pyx_r;
                        __pyx_L6_resume_from_yield:;
                        __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
                        __pyx_cur_scope->__pyx_t_0 = 0;
                        __Pyx_XGOTREF(__pyx_t_1);
                        __pyx_t_2 = __pyx_cur_scope->__pyx_t_1;
                        if (unlikely(!__pyx_sent_value)) __PYX_ERR(5, 886, __pyx_L1_error)
                      }
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

                      /* function exit code */
                      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_XDECREF(__pyx_t_4);
                      __Pyx_XDECREF(__pyx_t_5);
                      if (__Pyx_PyErr_Occurred()) {
                        __Pyx_Generator_Replace_StopIteration(0);
                        __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      }
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      #if !CYTHON_USE_EXC_INFO_STACK
                      __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
                      #endif
                      __pyx_generator->resume_label = -1;
                      __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/tensor.pxi":883
 *         return frombytes(self.stp.dim_name(i))
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def dim_names(self):
 *         names_tuple = tuple(self.stp.dim_names())
*/

                    static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSRMatrix_9dim_names___get__(struct __pyx_obj_7pyarrow_3lib_SparseCSRMatrix *__pyx_v_self) {
                      PyObject *__pyx_v_names_tuple = NULL;
                      PyObject *__pyx_gb_7pyarrow_3lib_15SparseCSRMatrix_9dim_names_7__get___2generator18 = 0;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__get__", 0);

                      /* "pyarrow/tensor.pxi":885
 *     @property
 *     def dim_names(self):
 *         names_tuple = tuple(self.stp.dim_names())             # <<<<<<<<<<<<<<
 *         return tuple(frombytes(x) for x in names_tuple)
 * 
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "stp");
                        __PYX_ERR(5, 885, __pyx_L1_error)
                      }
                      __pyx_t_1 = __pyx_convert_vector_to_py_std_3a__3a_string(__pyx_v_self->stp->dim_names()); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 885, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_t_2 = __Pyx_PySequence_Tuple(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 885, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_2);
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      __pyx_v_names_tuple = ((PyObject*)__pyx_t_2);
                      __pyx_t_2 = 0;

                      /* "pyarrow/tensor.pxi":886
 *     def dim_names(self):
 *         names_tuple = tuple(self.stp.dim_names())
 *         return tuple(frombytes(x) for x in names_tuple)             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
                      __Pyx_XDECREF(__pyx_r);
                      __pyx_t_2 = __pyx_pf_7pyarrow_3lib_15SparseCSRMatrix_9dim_names_7__get___genexpr(NULL, __pyx_v_names_tuple); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 886, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_2);
                      __pyx_t_1 = __Pyx_PySequence_Tuple(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 886, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                      __pyx_r = __pyx_t_1;
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/tensor.pxi":883
 *         return frombytes(self.stp.dim_name(i))
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def dim_names(self):
 *         names_tuple = tuple(self.stp.dim_names())
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_AddTraceback("pyarrow.lib.SparseCSRMatrix.dim_names.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XDECREF(__pyx_v_names_tuple);
                      __Pyx_XDECREF(__pyx_gb_7pyarrow_3lib_15SparseCSRMatrix_9dim_names_7__get___2generator18);
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/tensor.pxi":888
 *         return tuple(frombytes(x) for x in names_tuple)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def non_zero_length(self):
 *         return self.stp.non_zero_length()
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSRMatrix_15non_zero_length_1__get__(PyObject *__pyx_v_self); /*proto*/
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSRMatrix_15non_zero_length_1__get__(PyObject *__pyx_v_self) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_15SparseCSRMatrix_15non_zero_length___get__(((struct __pyx_obj_7pyarrow_3lib_SparseCSRMatrix *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSRMatrix_15non_zero_length___get__(struct __pyx_obj_7pyarrow_3lib_SparseCSRMatrix *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__get__", 0);

                      /* "pyarrow/tensor.pxi":890
 *     @property
 *     def non_zero_length(self):
 *         return self.stp.non_zero_length()             # <<<<<<<<<<<<<<
 * 
 * cdef class SparseCSCMatrix(_Weakrefable):
*/
                      __Pyx_XDECREF(__pyx_r);
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "stp");
                        __PYX_ERR(5, 890, __pyx_L1_error)
                      }
                      __pyx_t_1 = __Pyx_PyLong_From_int64_t(__pyx_v_self->stp->non_zero_length()); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 890, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_r = __pyx_t_1;
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/tensor.pxi":888
 *         return tuple(frombytes(x) for x in names_tuple)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def non_zero_length(self):
 *         return self.stp.non_zero_length()
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_AddTraceback("pyarrow.lib.SparseCSRMatrix.non_zero_length.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/lib.pxd":316
 * 
 *     cdef readonly:
 *         DataType type             # <<<<<<<<<<<<<<
 * 
 *     cdef void init(self, const shared_ptr[CSparseCSRMatrix]& sp_sparse_tensor)
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSRMatrix_4type_1__get__(PyObject *__pyx_v_self); /*proto*/
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSRMatrix_4type_1__get__(PyObject *__pyx_v_self) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_15SparseCSRMatrix_4type___get__(((struct __pyx_obj_7pyarrow_3lib_SparseCSRMatrix *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSRMatrix_4type___get__(struct __pyx_obj_7pyarrow_3lib_SparseCSRMatrix *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__get__", 0);
                      __Pyx_XDECREF(__pyx_r);
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "type");
                        __PYX_ERR(15, 316, __pyx_L1_error)
                      }
                      __Pyx_INCREF((PyObject *)__pyx_v_self->type);
                      __pyx_r = ((PyObject *)__pyx_v_self->type);
                      goto __pyx_L0;

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib.SparseCSRMatrix.type.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.sp_sparse_tensor,self.stp cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSRMatrix_25__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_15SparseCSRMatrix_24__reduce_cython__, "SparseCSRMatrix.__reduce_cython__(self)");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_15SparseCSRMatrix_25__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15SparseCSRMatrix_25__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15SparseCSRMatrix_24__reduce_cython__};
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSRMatrix_25__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; }
                      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                      if (unlikely(__pyx_kwds_len < 0)) return NULL;
                      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;}
                      __pyx_r = __pyx_pf_7pyarrow_3lib_15SparseCSRMatrix_24__reduce_cython__(((struct __pyx_obj_7pyarrow_3lib_SparseCSRMatrix *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSRMatrix_24__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_SparseCSRMatrix *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__reduce_cython__", 0);

                      /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "self.sp_sparse_tensor,self.stp cannot be converted to a Python object for pickling"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "self.sp_sparse_tensor,self.stp cannot be converted to a Python object for pickling"
*/
                      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_self_sp_sparse_tensor_self_stp_c, 0, 0);
                      __PYX_ERR(7, 2, __pyx_L1_error)

                      /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.sp_sparse_tensor,self.stp cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib.SparseCSRMatrix.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "self.sp_sparse_tensor,self.stp cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.sp_sparse_tensor,self.stp cannot be converted to a Python object for pickling"
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSRMatrix_27__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_15SparseCSRMatrix_26__setstate_cython__, "SparseCSRMatrix.__setstate_cython__(self, __pyx_state)");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_15SparseCSRMatrix_27__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15SparseCSRMatrix_27__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15SparseCSRMatrix_26__setstate_cython__};
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSRMatrix_27__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[1] = {0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(7, 3, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(7, 3, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(7, 3, __pyx_L3_error)
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(7, 3, __pyx_L3_error) }
                          }
                        } else if (unlikely(__pyx_nargs != 1)) {
                          goto __pyx_L5_argtuple_error;
                        } else {
                          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(7, 3, __pyx_L3_error)
                        }
                        __pyx_v___pyx_state = values[0];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(7, 3, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.SparseCSRMatrix.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_15SparseCSRMatrix_26__setstate_cython__(((struct __pyx_obj_7pyarrow_3lib_SparseCSRMatrix *)__pyx_v_self), __pyx_v___pyx_state);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSRMatrix_26__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_SparseCSRMatrix *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__setstate_cython__", 0);

                      /* "(tree fragment)":4
 *     raise TypeError, "self.sp_sparse_tensor,self.stp cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "self.sp_sparse_tensor,self.stp cannot be converted to a Python object for pickling"             # <<<<<<<<<<<<<<
*/
                      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_self_sp_sparse_tensor_self_stp_c, 0, 0);
                      __PYX_ERR(7, 4, __pyx_L1_error)

                      /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "self.sp_sparse_tensor,self.stp cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.sp_sparse_tensor,self.stp cannot be converted to a Python object for pickling"
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib.SparseCSRMatrix.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/tensor.pxi":897
 *     """
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         raise TypeError("Do not call SparseCSCMatrix's constructor directly, "
 *                         "use one of the `pyarrow.SparseCSCMatrix.from_*` "
*/

                    /* Python wrapper */
                    static int __pyx_pw_7pyarrow_3lib_15SparseCSCMatrix_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
                    static int __pyx_pw_7pyarrow_3lib_15SparseCSCMatrix_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      int __pyx_r;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, __pyx_nargs); return -1; }
                      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
                      if (unlikely(__pyx_kwds_len < 0)) return -1;
                      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__init__", __pyx_kwds); return -1;}
                      __pyx_r = __pyx_pf_7pyarrow_3lib_15SparseCSCMatrix___init__(((struct __pyx_obj_7pyarrow_3lib_SparseCSCMatrix *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static int __pyx_pf_7pyarrow_3lib_15SparseCSCMatrix___init__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_SparseCSCMatrix *__pyx_v_self) {
                      int __pyx_r;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      size_t __pyx_t_3;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__init__", 0);

                      /* "pyarrow/tensor.pxi":898
 * 
 *     def __init__(self):
 *         raise TypeError("Do not call SparseCSCMatrix's constructor directly, "             # <<<<<<<<<<<<<<
 *                         "use one of the `pyarrow.SparseCSCMatrix.from_*` "
 *                         "functions instead.")
*/
                      __pyx_t_2 = NULL;
                      __pyx_t_3 = 1;
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Do_not_call_SparseCSCMatrix_s_co};
                        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 898, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      __PYX_ERR(5, 898, __pyx_L1_error)

                      /* "pyarrow/tensor.pxi":897
 *     """
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         raise TypeError("Do not call SparseCSCMatrix's constructor directly, "
 *                         "use one of the `pyarrow.SparseCSCMatrix.from_*` "
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_AddTraceback("pyarrow.lib.SparseCSCMatrix.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = -1;
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/tensor.pxi":902
 *                         "functions instead.")
 * 
 *     cdef void init(self, const shared_ptr[CSparseCSCMatrix]& sp_sparse_tensor):             # <<<<<<<<<<<<<<
 *         self.sp_sparse_tensor = sp_sparse_tensor
 *         self.stp = sp_sparse_tensor.get()
*/

                    static void __pyx_f_7pyarrow_3lib_15SparseCSCMatrix_init(struct __pyx_obj_7pyarrow_3lib_SparseCSCMatrix *__pyx_v_self, std::shared_ptr< arrow::SparseCSCMatrix>  const &__pyx_v_sp_sparse_tensor) {
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("init", 0);

                      /* "pyarrow/tensor.pxi":903
 * 
 *     cdef void init(self, const shared_ptr[CSparseCSCMatrix]& sp_sparse_tensor):
 *         self.sp_sparse_tensor = sp_sparse_tensor             # <<<<<<<<<<<<<<
 *         self.stp = sp_sparse_tensor.get()
 *         self.type = pyarrow_wrap_data_type(self.stp.type())
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_sparse_tensor");
                        __PYX_ERR(5, 903, __pyx_L1_error)
                      }
                      __pyx_v_self->sp_sparse_tensor = __pyx_v_sp_sparse_tensor;

                      /* "pyarrow/tensor.pxi":904
 *     cdef void init(self, const shared_ptr[CSparseCSCMatrix]& sp_sparse_tensor):
 *         self.sp_sparse_tensor = sp_sparse_tensor
 *         self.stp = sp_sparse_tensor.get()             # <<<<<<<<<<<<<<
 *         self.type = pyarrow_wrap_data_type(self.stp.type())
 * 
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "stp");
                        __PYX_ERR(5, 904, __pyx_L1_error)
                      }
                      __pyx_v_self->stp = __pyx_v_sp_sparse_tensor.get();

                      /* "pyarrow/tensor.pxi":905
 *         self.sp_sparse_tensor = sp_sparse_tensor
 *         self.stp = sp_sparse_tensor.get()
 *         self.type = pyarrow_wrap_data_type(self.stp.type())             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "stp");
                        __PYX_ERR(5, 905, __pyx_L1_error)
                      }
                      __pyx_t_1 = pyarrow_wrap_data_type(__pyx_v_self->stp->type()); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 905, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType))))) __PYX_ERR(5, 905, __pyx_L1_error)
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "type");
                        __PYX_ERR(5, 905, __pyx_L1_error)
                      }
                      __Pyx_GIVEREF(__pyx_t_1);
                      __Pyx_GOTREF((PyObject *)__pyx_v_self->type);
                      __Pyx_DECREF((PyObject *)__pyx_v_self->type);
                      __pyx_v_self->type = ((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_t_1);
                      __pyx_t_1 = 0;

                      /* "pyarrow/tensor.pxi":902
 *                         "functions instead.")
 * 
 *     cdef void init(self, const shared_ptr[CSparseCSCMatrix]& sp_sparse_tensor):             # <<<<<<<<<<<<<<
 *         self.sp_sparse_tensor = sp_sparse_tensor
 *         self.stp = sp_sparse_tensor.get()
*/

                      /* function exit code */
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_AddTraceback("pyarrow.lib.SparseCSCMatrix.init", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_L0:;
                      __Pyx_RefNannyFinishContext();
                    }

                    /* "pyarrow/tensor.pxi":907
 *         self.type = pyarrow_wrap_data_type(self.stp.type())
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return f"""<pyarrow.SparseCSCMatrix>
 * type: {self.type}
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSCMatrix_3__repr__(PyObject *__pyx_v_self); /*proto*/
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSCMatrix_3__repr__(PyObject *__pyx_v_self) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_15SparseCSCMatrix_2__repr__(((struct __pyx_obj_7pyarrow_3lib_SparseCSCMatrix *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSCMatrix_2__repr__(struct __pyx_obj_7pyarrow_3lib_SparseCSCMatrix *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      PyObject *__pyx_t_3 = NULL;
                      PyObject *__pyx_t_4[4];
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__repr__", 0);

                      /* "pyarrow/tensor.pxi":908
 * 
 *     def __repr__(self):
 *         return f"""<pyarrow.SparseCSCMatrix>             # <<<<<<<<<<<<<<
 * type: {self.type}
 * shape: {self.shape}"""
*/
                      __Pyx_XDECREF(__pyx_r);

                      /* "pyarrow/tensor.pxi":909
 *     def __repr__(self):
 *         return f"""<pyarrow.SparseCSCMatrix>
 * type: {self.type}             # <<<<<<<<<<<<<<
 * shape: {self.shape}"""
 * 
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "type");
                        __PYX_ERR(5, 909, __pyx_L1_error)
                      }
                      __pyx_t_1 = __Pyx_PyObject_FormatSimple(((PyObject *)__pyx_v_self->type), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 909, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);

                      /* "pyarrow/tensor.pxi":910
 *         return f"""<pyarrow.SparseCSCMatrix>
 * type: {self.type}
 * shape: {self.shape}"""             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
*/
                      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_shape); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 910, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_2);
                      __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_t_2, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 910, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_3);
                      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                      __pyx_t_4[0] = __pyx_mstate_global->__pyx_kp_u_pyarrow_SparseCSCMatrix_type;
                      __pyx_t_4[1] = __pyx_t_1;
                      __pyx_t_4[2] = __pyx_mstate_global->__pyx_kp_u_shape_2;
                      __pyx_t_4[3] = __pyx_t_3;

                      /* "pyarrow/tensor.pxi":908
 * 
 *     def __repr__(self):
 *         return f"""<pyarrow.SparseCSCMatrix>             # <<<<<<<<<<<<<<
 * type: {self.type}
 * shape: {self.shape}"""
*/
                      __pyx_t_2 = __Pyx_PyUnicode_Join(__pyx_t_4, 4, 32 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1) + 8 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3));
                      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 908, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_2);
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                      __pyx_r = __pyx_t_2;
                      __pyx_t_2 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/tensor.pxi":907
 *         self.type = pyarrow_wrap_data_type(self.stp.type())
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return f"""<pyarrow.SparseCSCMatrix>
 * type: {self.type}
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_AddTraceback("pyarrow.lib.SparseCSCMatrix.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/tensor.pxi":912
 * shape: {self.shape}"""
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def from_dense_numpy(cls, obj, dim_names=None):
 *         """
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSCMatrix_5from_dense_numpy(PyObject *__pyx_v_cls, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_15SparseCSCMatrix_4from_dense_numpy, "SparseCSCMatrix.from_dense_numpy(cls, obj, dim_names=None)\n\nConvert numpy.ndarray to arrow::SparseCSCMatrix\n\nParameters\n----------\nobj : numpy.ndarray\n    Data used to populate the rows.\ndim_names : list[str], optional\n    Names of the dimensions.\n\nReturns\n-------\npyarrow.SparseCSCMatrix");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_15SparseCSCMatrix_5from_dense_numpy = {"from_dense_numpy", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15SparseCSCMatrix_5from_dense_numpy, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15SparseCSCMatrix_4from_dense_numpy};
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSCMatrix_5from_dense_numpy(PyObject *__pyx_v_cls, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      PyObject *__pyx_v_obj = 0;
                      PyObject *__pyx_v_dim_names = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[2] = {0,0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("from_dense_numpy (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_obj,&__pyx_mstate_global->__pyx_n_u_dim_names,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(5, 912, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  2:
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(5, 912, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(5, 912, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "from_dense_numpy", 0) < (0)) __PYX_ERR(5, 912, __pyx_L3_error)

                          /* "pyarrow/tensor.pxi":913
 * 
 *     @classmethod
 *     def from_dense_numpy(cls, obj, dim_names=None):             # <<<<<<<<<<<<<<
 *         """
 *         Convert numpy.ndarray to arrow::SparseCSCMatrix
*/
                          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("from_dense_numpy", 0, 1, 2, i); __PYX_ERR(5, 912, __pyx_L3_error) }
                          }
                        } else {
                          switch (__pyx_nargs) {
                            case  2:
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(5, 912, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(5, 912, __pyx_L3_error)
                            break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
                        }
                        __pyx_v_obj = values[0];
                        __pyx_v_dim_names = values[1];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("from_dense_numpy", 0, 1, 2, __pyx_nargs); __PYX_ERR(5, 912, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.SparseCSCMatrix.from_dense_numpy", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_15SparseCSCMatrix_4from_dense_numpy(((PyTypeObject*)__pyx_v_cls), __pyx_v_obj, __pyx_v_dim_names);

                      /* "pyarrow/tensor.pxi":912
 * shape: {self.shape}"""
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def from_dense_numpy(cls, obj, dim_names=None):
 *         """
*/

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSCMatrix_4from_dense_numpy(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_obj, PyObject *__pyx_v_dim_names) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      PyObject *__pyx_t_3 = NULL;
                      PyObject *__pyx_t_4 = NULL;
                      size_t __pyx_t_5;
                      PyObject *__pyx_t_6 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("from_dense_numpy", 0);

                      /* "pyarrow/tensor.pxi":928
 *         pyarrow.SparseCSCMatrix
 *         """
 *         return cls.from_tensor(Tensor.from_numpy(obj, dim_names=dim_names))             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
*/
                      __Pyx_XDECREF(__pyx_r);
                      __pyx_t_2 = ((PyObject *)__pyx_v_cls);
                      __Pyx_INCREF(__pyx_t_2);
                      __pyx_t_4 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Tensor);
                      __Pyx_INCREF(__pyx_t_4);
                      __pyx_t_5 = 0;
                      {
                        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_4, __pyx_v_obj};
                        __pyx_t_6 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 928, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_6);
                        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_dim_names, __pyx_v_dim_names, __pyx_t_6, __pyx_callargs+2, 0) < (0)) __PYX_ERR(5, 928, __pyx_L1_error)
                        __pyx_t_3 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_from_numpy, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_6);
                        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                        if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 928, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_3);
                      }
                      __pyx_t_5 = 0;
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
                        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_from_tensor, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 928, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __pyx_r = __pyx_t_1;
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/tensor.pxi":912
 * shape: {self.shape}"""
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def from_dense_numpy(cls, obj, dim_names=None):
 *         """
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_XDECREF(__pyx_t_4);
                      __Pyx_XDECREF(__pyx_t_6);
                      __Pyx_AddTraceback("pyarrow.lib.SparseCSCMatrix.from_dense_numpy", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/tensor.pxi":930
 *         return cls.from_tensor(Tensor.from_numpy(obj, dim_names=dim_names))
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_numpy(data, indptr, indices, shape, dim_names=None):
 *         """
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSCMatrix_7from_numpy(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_15SparseCSCMatrix_6from_numpy, "SparseCSCMatrix.from_numpy(data, indptr, indices, shape, dim_names=None)\n\nCreate arrow::SparseCSCMatrix from numpy.ndarrays\n\nParameters\n----------\ndata : numpy.ndarray\n    Data used to populate the sparse matrix.\nindptr : numpy.ndarray\n    Range of the rows,\n    The i-th row spans from `indptr[i]` to `indptr[i+1]` in the data.\nindices : numpy.ndarray\n    Column indices of the corresponding non-zero values.\nshape : tuple\n    Shape of the matrix.\ndim_names : list, optional\n    Names of the dimensions.");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_15SparseCSCMatrix_7from_numpy = {"from_numpy", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15SparseCSCMatrix_7from_numpy, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15SparseCSCMatrix_6from_numpy};
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSCMatrix_7from_numpy(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      PyObject *__pyx_v_data = 0;
                      PyObject *__pyx_v_indptr = 0;
                      PyObject *__pyx_v_indices = 0;
                      PyObject *__pyx_v_shape = 0;
                      PyObject *__pyx_v_dim_names = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[5] = {0,0,0,0,0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("from_numpy (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_data,&__pyx_mstate_global->__pyx_n_u_indptr,&__pyx_mstate_global->__pyx_n_u_indices,&__pyx_mstate_global->__pyx_n_u_shape,&__pyx_mstate_global->__pyx_n_u_dim_names,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(5, 930, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  5:
                            values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(5, 930, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  4:
                            values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(5, 930, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  3:
                            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(5, 930, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  2:
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(5, 930, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(5, 930, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "from_numpy", 0) < (0)) __PYX_ERR(5, 930, __pyx_L3_error)

                          /* "pyarrow/tensor.pxi":931
 * 
 *     @staticmethod
 *     def from_numpy(data, indptr, indices, shape, dim_names=None):             # <<<<<<<<<<<<<<
 *         """
 *         Create arrow::SparseCSCMatrix from numpy.ndarrays
*/
                          if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)Py_None));
                          for (Py_ssize_t i = __pyx_nargs; i < 4; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("from_numpy", 0, 4, 5, i); __PYX_ERR(5, 930, __pyx_L3_error) }
                          }
                        } else {
                          switch (__pyx_nargs) {
                            case  5:
                            values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(5, 930, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  4:
                            values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(5, 930, __pyx_L3_error)
                            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(5, 930, __pyx_L3_error)
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(5, 930, __pyx_L3_error)
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(5, 930, __pyx_L3_error)
                            break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)Py_None));
                        }
                        __pyx_v_data = values[0];
                        __pyx_v_indptr = values[1];
                        __pyx_v_indices = values[2];
                        __pyx_v_shape = values[3];
                        __pyx_v_dim_names = values[4];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("from_numpy", 0, 4, 5, __pyx_nargs); __PYX_ERR(5, 930, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.SparseCSCMatrix.from_numpy", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_15SparseCSCMatrix_6from_numpy(__pyx_v_data, __pyx_v_indptr, __pyx_v_indices, __pyx_v_shape, __pyx_v_dim_names);

                      /* "pyarrow/tensor.pxi":930
 *         return cls.from_tensor(Tensor.from_numpy(obj, dim_names=dim_names))
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_numpy(data, indptr, indices, shape, dim_names=None):
 *         """
*/

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSCMatrix_6from_numpy(PyObject *__pyx_v_data, PyObject *__pyx_v_indptr, PyObject *__pyx_v_indices, PyObject *__pyx_v_shape, PyObject *__pyx_v_dim_names) {
                      std::shared_ptr< arrow::SparseCSCMatrix>  __pyx_v_csparse_tensor;
                      std::vector<int64_t>  __pyx_v_c_shape;
                      std::vector<std::string>  __pyx_v_c_dim_names;
                      PyObject *__pyx_v_x = NULL;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      Py_ssize_t __pyx_t_2;
                      PyObject *(*__pyx_t_3)(PyObject *);
                      PyObject *__pyx_t_4 = NULL;
                      int64_t __pyx_t_5;
                      int __pyx_t_6;
                      PyObject *__pyx_t_7 = NULL;
                      PyObject *__pyx_t_8 = NULL;
                      size_t __pyx_t_9;
                      std::string __pyx_t_10;
                      int __pyx_t_11;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("from_numpy", 0);
                      __Pyx_INCREF(__pyx_v_indptr);
                      __Pyx_INCREF(__pyx_v_indices);

                      /* "pyarrow/tensor.pxi":953
 *         cdef vector[c_string] c_dim_names
 * 
 *         for x in shape:             # <<<<<<<<<<<<<<
 *             c_shape.push_back(x)
 *         if dim_names is not None:
*/
                      if (likely(PyList_CheckExact(__pyx_v_shape)) || PyTuple_CheckExact(__pyx_v_shape)) {
                        __pyx_t_1 = __pyx_v_shape; __Pyx_INCREF(__pyx_t_1);
                        __pyx_t_2 = 0;
                        __pyx_t_3 = NULL;
                      } else {
                        __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 953, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                        __pyx_t_3 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 953, __pyx_L1_error)
                      }
                      for (;;) {
                        if (likely(!__pyx_t_3)) {
                          if (likely(PyList_CheckExact(__pyx_t_1))) {
                            {
                              Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
                              #if !CYTHON_ASSUME_SAFE_SIZE
                              if (unlikely((__pyx_temp < 0))) __PYX_ERR(5, 953, __pyx_L1_error)
                              #endif
                              if (__pyx_t_2 >= __pyx_temp) break;
                            }
                            __pyx_t_4 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_2, __Pyx_ReferenceSharing_OwnStrongReference);
                            ++__pyx_t_2;
                          } else {
                            {
                              Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
                              #if !CYTHON_ASSUME_SAFE_SIZE
                              if (unlikely((__pyx_temp < 0))) __PYX_ERR(5, 953, __pyx_L1_error)
                              #endif
                              if (__pyx_t_2 >= __pyx_temp) break;
                            }
                            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                            __pyx_t_4 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2));
                            #else
                            __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2);
                            #endif
                            ++__pyx_t_2;
                          }
                          if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 953, __pyx_L1_error)
                        } else {
                          __pyx_t_4 = __pyx_t_3(__pyx_t_1);
                          if (unlikely(!__pyx_t_4)) {
                            PyObject* exc_type = PyErr_Occurred();
                            if (exc_type) {
                              if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(5, 953, __pyx_L1_error)
                              PyErr_Clear();
                            }
                            break;
                          }
                        }
                        __Pyx_GOTREF(__pyx_t_4);
                        __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_4);
                        __pyx_t_4 = 0;

                        /* "pyarrow/tensor.pxi":954
 * 
 *         for x in shape:
 *             c_shape.push_back(x)             # <<<<<<<<<<<<<<
 *         if dim_names is not None:
 *             for x in dim_names:
*/
                        __pyx_t_5 = __Pyx_PyLong_As_int64_t(__pyx_v_x); if (unlikely((__pyx_t_5 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(5, 954, __pyx_L1_error)
                        try {
                          __pyx_v_c_shape.push_back(__pyx_t_5);
                        } catch(...) {
                          __Pyx_CppExn2PyErr();
                          __PYX_ERR(5, 954, __pyx_L1_error)
                        }

                        /* "pyarrow/tensor.pxi":953
 *         cdef vector[c_string] c_dim_names
 * 
 *         for x in shape:             # <<<<<<<<<<<<<<
 *             c_shape.push_back(x)
 *         if dim_names is not None:
*/
                      }
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

                      /* "pyarrow/tensor.pxi":955
 *         for x in shape:
 *             c_shape.push_back(x)
 *         if dim_names is not None:             # <<<<<<<<<<<<<<
 *             for x in dim_names:
 *                 c_dim_names.push_back(tobytes(x))
*/
                      __pyx_t_6 = (__pyx_v_dim_names != Py_None);
                      if (__pyx_t_6) {

                        /* "pyarrow/tensor.pxi":956
 *             c_shape.push_back(x)
 *         if dim_names is not None:
 *             for x in dim_names:             # <<<<<<<<<<<<<<
 *                 c_dim_names.push_back(tobytes(x))
 * 
*/
                        if (likely(PyList_CheckExact(__pyx_v_dim_names)) || PyTuple_CheckExact(__pyx_v_dim_names)) {
                          __pyx_t_1 = __pyx_v_dim_names; __Pyx_INCREF(__pyx_t_1);
                          __pyx_t_2 = 0;
                          __pyx_t_3 = NULL;
                        } else {
                          __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_dim_names); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 956, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_1);
                          __pyx_t_3 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 956, __pyx_L1_error)
                        }
                        for (;;) {
                          if (likely(!__pyx_t_3)) {
                            if (likely(PyList_CheckExact(__pyx_t_1))) {
                              {
                                Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
                                #if !CYTHON_ASSUME_SAFE_SIZE
                                if (unlikely((__pyx_temp < 0))) __PYX_ERR(5, 956, __pyx_L1_error)
                                #endif
                                if (__pyx_t_2 >= __pyx_temp) break;
                              }
                              __pyx_t_4 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_2, __Pyx_ReferenceSharing_OwnStrongReference);
                              ++__pyx_t_2;
                            } else {
                              {
                                Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
                                #if !CYTHON_ASSUME_SAFE_SIZE
                                if (unlikely((__pyx_temp < 0))) __PYX_ERR(5, 956, __pyx_L1_error)
                                #endif
                                if (__pyx_t_2 >= __pyx_temp) break;
                              }
                              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                              __pyx_t_4 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2));
                              #else
                              __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2);
                              #endif
                              ++__pyx_t_2;
                            }
                            if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 956, __pyx_L1_error)
                          } else {
                            __pyx_t_4 = __pyx_t_3(__pyx_t_1);
                            if (unlikely(!__pyx_t_4)) {
                              PyObject* exc_type = PyErr_Occurred();
                              if (exc_type) {
                                if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(5, 956, __pyx_L1_error)
                                PyErr_Clear();
                              }
                              break;
                            }
                          }
                          __Pyx_GOTREF(__pyx_t_4);
                          __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_4);
                          __pyx_t_4 = 0;

                          /* "pyarrow/tensor.pxi":957
 *         if dim_names is not None:
 *             for x in dim_names:
 *                 c_dim_names.push_back(tobytes(x))             # <<<<<<<<<<<<<<
 * 
 *         # Enforce precondition for SparseCSCMatrix indices
*/
                          __pyx_t_7 = NULL;
                          __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_tobytes); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 957, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_8);
                          __pyx_t_9 = 1;
                          #if CYTHON_UNPACK_METHODS
                          if (unlikely(PyMethod_Check(__pyx_t_8))) {
                            __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8);
                            assert(__pyx_t_7);
                            PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8);
                            __Pyx_INCREF(__pyx_t_7);
                            __Pyx_INCREF(__pyx__function);
                            __Pyx_DECREF_SET(__pyx_t_8, __pyx__function);
                            __pyx_t_9 = 0;
                          }
                          #endif
                          {
                            PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_x};
                            __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
                            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                            if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 957, __pyx_L1_error)
                            __Pyx_GOTREF(__pyx_t_4);
                          }
                          __pyx_t_10 = __pyx_convert_string_from_py_6libcpp_6string_std__in_string(__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(5, 957, __pyx_L1_error)
                          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                          try {
                            __pyx_v_c_dim_names.push_back(__pyx_t_10);
                          } catch(...) {
                            __Pyx_CppExn2PyErr();
                            __PYX_ERR(5, 957, __pyx_L1_error)
                          }

                          /* "pyarrow/tensor.pxi":956
 *             c_shape.push_back(x)
 *         if dim_names is not None:
 *             for x in dim_names:             # <<<<<<<<<<<<<<
 *                 c_dim_names.push_back(tobytes(x))
 * 
*/
                        }
                        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

                        /* "pyarrow/tensor.pxi":955
 *         for x in shape:
 *             c_shape.push_back(x)
 *         if dim_names is not None:             # <<<<<<<<<<<<<<
 *             for x in dim_names:
 *                 c_dim_names.push_back(tobytes(x))
*/
                      }

                      /* "pyarrow/tensor.pxi":960
 * 
 *         # Enforce precondition for SparseCSCMatrix indices
 *         indptr = np.require(indptr, dtype='i8')             # <<<<<<<<<<<<<<
 *         indices = np.require(indices, dtype='i8')
 *         if indptr.ndim != 1:
*/
                      __pyx_t_4 = NULL;
                      __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 960, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_8);
                      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_require); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 960, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_7);
                      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                      __pyx_t_9 = 1;
                      #if CYTHON_UNPACK_METHODS
                      if (unlikely(PyMethod_Check(__pyx_t_7))) {
                        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_7);
                        assert(__pyx_t_4);
                        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
                        __Pyx_INCREF(__pyx_t_4);
                        __Pyx_INCREF(__pyx__function);
                        __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
                        __pyx_t_9 = 0;
                      }
                      #endif
                      {
                        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_4, __pyx_v_indptr};
                        __pyx_t_8 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 960, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_8);
                        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_dtype, __pyx_mstate_global->__pyx_n_u_i8, __pyx_t_8, __pyx_callargs+2, 0) < (0)) __PYX_ERR(5, 960, __pyx_L1_error)
                        __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_8);
                        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 960, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __Pyx_DECREF_SET(__pyx_v_indptr, __pyx_t_1);
                      __pyx_t_1 = 0;

                      /* "pyarrow/tensor.pxi":961
 *         # Enforce precondition for SparseCSCMatrix indices
 *         indptr = np.require(indptr, dtype='i8')
 *         indices = np.require(indices, dtype='i8')             # <<<<<<<<<<<<<<
 *         if indptr.ndim != 1:
 *             raise ValueError("Expected 1-dimensional array for "
*/
                      __pyx_t_7 = NULL;
                      __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 961, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_8);
                      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_require); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 961, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_4);
                      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                      __pyx_t_9 = 1;
                      #if CYTHON_UNPACK_METHODS
                      if (unlikely(PyMethod_Check(__pyx_t_4))) {
                        __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
                        assert(__pyx_t_7);
                        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
                        __Pyx_INCREF(__pyx_t_7);
                        __Pyx_INCREF(__pyx__function);
                        __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
                        __pyx_t_9 = 0;
                      }
                      #endif
                      {
                        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_7, __pyx_v_indices};
                        __pyx_t_8 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 961, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_8);
                        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_dtype, __pyx_mstate_global->__pyx_n_u_i8, __pyx_t_8, __pyx_callargs+2, 0) < (0)) __PYX_ERR(5, 961, __pyx_L1_error)
                        __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_8);
                        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
                        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 961, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __Pyx_DECREF_SET(__pyx_v_indices, __pyx_t_1);
                      __pyx_t_1 = 0;

                      /* "pyarrow/tensor.pxi":962
 *         indptr = np.require(indptr, dtype='i8')
 *         indices = np.require(indices, dtype='i8')
 *         if indptr.ndim != 1:             # <<<<<<<<<<<<<<
 *             raise ValueError("Expected 1-dimensional array for "
 *                              "SparseCSCMatrix indptr")
*/
                      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_indptr, __pyx_mstate_global->__pyx_n_u_ndim); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 962, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_t_6 = (__Pyx_PyLong_BoolNeObjC(__pyx_t_1, __pyx_mstate_global->__pyx_int_1, 1, 0)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(5, 962, __pyx_L1_error)
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      if (unlikely(__pyx_t_6)) {

                        /* "pyarrow/tensor.pxi":963
 *         indices = np.require(indices, dtype='i8')
 *         if indptr.ndim != 1:
 *             raise ValueError("Expected 1-dimensional array for "             # <<<<<<<<<<<<<<
 *                              "SparseCSCMatrix indptr")
 *         if indices.ndim != 1:
*/
                        __pyx_t_4 = NULL;
                        __pyx_t_9 = 1;
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Expected_1_dimensional_array_for_3};
                          __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                          if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 963, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_1);
                        }
                        __Pyx_Raise(__pyx_t_1, 0, 0, 0);
                        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                        __PYX_ERR(5, 963, __pyx_L1_error)

                        /* "pyarrow/tensor.pxi":962
 *         indptr = np.require(indptr, dtype='i8')
 *         indices = np.require(indices, dtype='i8')
 *         if indptr.ndim != 1:             # <<<<<<<<<<<<<<
 *             raise ValueError("Expected 1-dimensional array for "
 *                              "SparseCSCMatrix indptr")
*/
                      }

                      /* "pyarrow/tensor.pxi":965
 *             raise ValueError("Expected 1-dimensional array for "
 *                              "SparseCSCMatrix indptr")
 *         if indices.ndim != 1:             # <<<<<<<<<<<<<<
 *             raise ValueError("Expected 1-dimensional array for "
 *                              "SparseCSCMatrix indices")
*/
                      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_indices, __pyx_mstate_global->__pyx_n_u_ndim); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 965, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_t_6 = (__Pyx_PyLong_BoolNeObjC(__pyx_t_1, __pyx_mstate_global->__pyx_int_1, 1, 0)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(5, 965, __pyx_L1_error)
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      if (unlikely(__pyx_t_6)) {

                        /* "pyarrow/tensor.pxi":966
 *                              "SparseCSCMatrix indptr")
 *         if indices.ndim != 1:
 *             raise ValueError("Expected 1-dimensional array for "             # <<<<<<<<<<<<<<
 *                              "SparseCSCMatrix indices")
 * 
*/
                        __pyx_t_4 = NULL;
                        __pyx_t_9 = 1;
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Expected_1_dimensional_array_for_4};
                          __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                          if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 966, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_1);
                        }
                        __Pyx_Raise(__pyx_t_1, 0, 0, 0);
                        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                        __PYX_ERR(5, 966, __pyx_L1_error)

                        /* "pyarrow/tensor.pxi":965
 *             raise ValueError("Expected 1-dimensional array for "
 *                              "SparseCSCMatrix indptr")
 *         if indices.ndim != 1:             # <<<<<<<<<<<<<<
 *             raise ValueError("Expected 1-dimensional array for "
 *                              "SparseCSCMatrix indices")
*/
                      }

                      /* "pyarrow/tensor.pxi":969
 *                              "SparseCSCMatrix indices")
 * 
 *         check_status(NdarraysToSparseCSCMatrix(c_default_memory_pool(),             # <<<<<<<<<<<<<<
 *                                                data, indptr, indices, c_shape,
 *                                                c_dim_names, &csparse_tensor))
*/
                      __pyx_t_11 = __pyx_f_7pyarrow_3lib_check_status(arrow::py::NdarraysToSparseCSCMatrix( arrow::default_memory_pool(), __pyx_v_data, __pyx_v_indptr, __pyx_v_indices, __pyx_v_c_shape, __pyx_v_c_dim_names, (&__pyx_v_csparse_tensor))); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(5, 969, __pyx_L1_error)

                      /* "pyarrow/tensor.pxi":972
 *                                                data, indptr, indices, c_shape,
 *                                                c_dim_names, &csparse_tensor))
 *         return pyarrow_wrap_sparse_csc_matrix(csparse_tensor)             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
*/
                      __Pyx_XDECREF(__pyx_r);
                      __pyx_t_1 = pyarrow_wrap_sparse_csc_matrix(__pyx_v_csparse_tensor); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 972, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_r = __pyx_t_1;
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/tensor.pxi":930
 *         return cls.from_tensor(Tensor.from_numpy(obj, dim_names=dim_names))
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_numpy(data, indptr, indices, shape, dim_names=None):
 *         """
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_4);
                      __Pyx_XDECREF(__pyx_t_7);
                      __Pyx_XDECREF(__pyx_t_8);
                      __Pyx_AddTraceback("pyarrow.lib.SparseCSCMatrix.from_numpy", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XDECREF(__pyx_v_x);
                      __Pyx_XDECREF(__pyx_v_indptr);
                      __Pyx_XDECREF(__pyx_v_indices);
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/tensor.pxi":974
 *         return pyarrow_wrap_sparse_csc_matrix(csparse_tensor)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_scipy(obj, dim_names=None):
 *         """
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSCMatrix_9from_scipy(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_15SparseCSCMatrix_8from_scipy, "SparseCSCMatrix.from_scipy(obj, dim_names=None)\n\nConvert scipy.sparse.csc_array or scipy.sparse.csc_matrix to arrow::SparseCSCMatrix\n\nParameters\n----------\nobj : scipy.sparse.csc_array or scipy.sparse.csc_matrix\n    The scipy matrix that should be converted.\ndim_names : list, optional\n    Names of the dimensions.");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_15SparseCSCMatrix_9from_scipy = {"from_scipy", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15SparseCSCMatrix_9from_scipy, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15SparseCSCMatrix_8from_scipy};
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSCMatrix_9from_scipy(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      PyObject *__pyx_v_obj = 0;
                      PyObject *__pyx_v_dim_names = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[2] = {0,0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("from_scipy (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_obj,&__pyx_mstate_global->__pyx_n_u_dim_names,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(5, 974, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  2:
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(5, 974, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(5, 974, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "from_scipy", 0) < (0)) __PYX_ERR(5, 974, __pyx_L3_error)

                          /* "pyarrow/tensor.pxi":975
 * 
 *     @staticmethod
 *     def from_scipy(obj, dim_names=None):             # <<<<<<<<<<<<<<
 *         """
 *         Convert scipy.sparse.csc_array or scipy.sparse.csc_matrix to arrow::SparseCSCMatrix
*/
                          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("from_scipy", 0, 1, 2, i); __PYX_ERR(5, 974, __pyx_L3_error) }
                          }
                        } else {
                          switch (__pyx_nargs) {
                            case  2:
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(5, 974, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(5, 974, __pyx_L3_error)
                            break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
                        }
                        __pyx_v_obj = values[0];
                        __pyx_v_dim_names = values[1];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("from_scipy", 0, 1, 2, __pyx_nargs); __PYX_ERR(5, 974, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.SparseCSCMatrix.from_scipy", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_15SparseCSCMatrix_8from_scipy(__pyx_v_obj, __pyx_v_dim_names);

                      /* "pyarrow/tensor.pxi":974
 *         return pyarrow_wrap_sparse_csc_matrix(csparse_tensor)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_scipy(obj, dim_names=None):
 *         """
*/

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSCMatrix_8from_scipy(PyObject *__pyx_v_obj, PyObject *__pyx_v_dim_names) {
                      PyObject *__pyx_v_scipy = NULL;
                      std::shared_ptr< arrow::SparseCSCMatrix>  __pyx_v_csparse_tensor;
                      std::vector<int64_t>  __pyx_v_c_shape;
                      std::vector<std::string>  __pyx_v_c_dim_names;
                      PyObject *__pyx_v_x = NULL;
                      PyObject *__pyx_v_indptr = NULL;
                      PyObject *__pyx_v_indices = NULL;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      PyObject *__pyx_t_3 = NULL;
                      PyObject *__pyx_t_4 = NULL;
                      int __pyx_t_5;
                      int __pyx_t_6;
                      PyObject *__pyx_t_7 = NULL;
                      size_t __pyx_t_8;
                      Py_ssize_t __pyx_t_9;
                      PyObject *(*__pyx_t_10)(PyObject *);
                      int64_t __pyx_t_11;
                      std::string __pyx_t_12;
                      PyObject *__pyx_t_13 = NULL;
                      int __pyx_t_14;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("from_scipy", 0);

                      /* "pyarrow/tensor.pxi":986
 *             Names of the dimensions.
 *         """
 *         import scipy.sparse             # <<<<<<<<<<<<<<
 *         if not isinstance(obj, (scipy.sparse.csc_array, scipy.sparse.csc_matrix)):
 *             raise TypeError(
*/
                      __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_scipy_sparse, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 986, __pyx_L1_error)
                      __pyx_t_1 = __pyx_t_2;
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_v_scipy = __pyx_t_1;
                      __pyx_t_1 = 0;

                      /* "pyarrow/tensor.pxi":987
 *         """
 *         import scipy.sparse
 *         if not isinstance(obj, (scipy.sparse.csc_array, scipy.sparse.csc_matrix)):             # <<<<<<<<<<<<<<
 *             raise TypeError(
 *                 f"Expected scipy.sparse.csc_array or scipy.sparse.csc_matrix, got {type(obj)}")
*/
                      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_scipy, __pyx_mstate_global->__pyx_n_u_sparse); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 987, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_csc_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 987, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_3);
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_scipy, __pyx_mstate_global->__pyx_n_u_sparse); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 987, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_csc_matrix); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 987, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_4);
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      __pyx_t_6 = PyObject_IsInstance(__pyx_v_obj, __pyx_t_3); 
                      if (!__pyx_t_6) {
                      } else {
                        __pyx_t_5 = __pyx_t_6;
                        goto __pyx_L4_bool_binop_done;
                      }
                      __pyx_t_6 = PyObject_IsInstance(__pyx_v_obj, __pyx_t_4); 
                      __pyx_t_5 = __pyx_t_6;
                      __pyx_L4_bool_binop_done:;
                      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                      __pyx_t_6 = (!__pyx_t_5);
                      if (unlikely(__pyx_t_6)) {

                        /* "pyarrow/tensor.pxi":988
 *         import scipy.sparse
 *         if not isinstance(obj, (scipy.sparse.csc_array, scipy.sparse.csc_matrix)):
 *             raise TypeError(             # <<<<<<<<<<<<<<
 *                 f"Expected scipy.sparse.csc_array or scipy.sparse.csc_matrix, got {type(obj)}")
 * 
*/
                        __pyx_t_4 = NULL;

                        /* "pyarrow/tensor.pxi":989
 *         if not isinstance(obj, (scipy.sparse.csc_array, scipy.sparse.csc_matrix)):
 *             raise TypeError(
 *                 f"Expected scipy.sparse.csc_array or scipy.sparse.csc_matrix, got {type(obj)}")             # <<<<<<<<<<<<<<
 * 
 *         cdef shared_ptr[CSparseCSCMatrix] csparse_tensor
*/
                        __pyx_t_1 = __Pyx_PyObject_FormatSimple(((PyObject *)Py_TYPE(__pyx_v_obj)), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 989, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                        __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_Expected_scipy_sparse_csc_array, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 989, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_7);
                        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                        __pyx_t_8 = 1;
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_7};
                          __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
                          if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 988, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_3);
                        }
                        __Pyx_Raise(__pyx_t_3, 0, 0, 0);
                        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                        __PYX_ERR(5, 988, __pyx_L1_error)

                        /* "pyarrow/tensor.pxi":987
 *         """
 *         import scipy.sparse
 *         if not isinstance(obj, (scipy.sparse.csc_array, scipy.sparse.csc_matrix)):             # <<<<<<<<<<<<<<
 *             raise TypeError(
 *                 f"Expected scipy.sparse.csc_array or scipy.sparse.csc_matrix, got {type(obj)}")
*/
                      }

                      /* "pyarrow/tensor.pxi":995
 *         cdef vector[c_string] c_dim_names
 * 
 *         for x in obj.shape:             # <<<<<<<<<<<<<<
 *             c_shape.push_back(x)
 *         if dim_names is not None:
*/
                      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_mstate_global->__pyx_n_u_shape); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 995, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_3);
                      if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
                        __pyx_t_7 = __pyx_t_3; __Pyx_INCREF(__pyx_t_7);
                        __pyx_t_9 = 0;
                        __pyx_t_10 = NULL;
                      } else {
                        __pyx_t_9 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 995, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_7);
                        __pyx_t_10 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_7); if (unlikely(!__pyx_t_10)) __PYX_ERR(5, 995, __pyx_L1_error)
                      }
                      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                      for (;;) {
                        if (likely(!__pyx_t_10)) {
                          if (likely(PyList_CheckExact(__pyx_t_7))) {
                            {
                              Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_7);
                              #if !CYTHON_ASSUME_SAFE_SIZE
                              if (unlikely((__pyx_temp < 0))) __PYX_ERR(5, 995, __pyx_L1_error)
                              #endif
                              if (__pyx_t_9 >= __pyx_temp) break;
                            }
                            __pyx_t_3 = __Pyx_PyList_GetItemRefFast(__pyx_t_7, __pyx_t_9, __Pyx_ReferenceSharing_OwnStrongReference);
                            ++__pyx_t_9;
                          } else {
                            {
                              Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_7);
                              #if !CYTHON_ASSUME_SAFE_SIZE
                              if (unlikely((__pyx_temp < 0))) __PYX_ERR(5, 995, __pyx_L1_error)
                              #endif
                              if (__pyx_t_9 >= __pyx_temp) break;
                            }
                            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                            __pyx_t_3 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_9));
                            #else
                            __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_7, __pyx_t_9);
                            #endif
                            ++__pyx_t_9;
                          }
                          if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 995, __pyx_L1_error)
                        } else {
                          __pyx_t_3 = __pyx_t_10(__pyx_t_7);
                          if (unlikely(!__pyx_t_3)) {
                            PyObject* exc_type = PyErr_Occurred();
                            if (exc_type) {
                              if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(5, 995, __pyx_L1_error)
                              PyErr_Clear();
                            }
                            break;
                          }
                        }
                        __Pyx_GOTREF(__pyx_t_3);
                        __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_3);
                        __pyx_t_3 = 0;

                        /* "pyarrow/tensor.pxi":996
 * 
 *         for x in obj.shape:
 *             c_shape.push_back(x)             # <<<<<<<<<<<<<<
 *         if dim_names is not None:
 *             for x in dim_names:
*/
                        __pyx_t_11 = __Pyx_PyLong_As_int64_t(__pyx_v_x); if (unlikely((__pyx_t_11 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(5, 996, __pyx_L1_error)
                        try {
                          __pyx_v_c_shape.push_back(__pyx_t_11);
                        } catch(...) {
                          __Pyx_CppExn2PyErr();
                          __PYX_ERR(5, 996, __pyx_L1_error)
                        }

                        /* "pyarrow/tensor.pxi":995
 *         cdef vector[c_string] c_dim_names
 * 
 *         for x in obj.shape:             # <<<<<<<<<<<<<<
 *             c_shape.push_back(x)
 *         if dim_names is not None:
*/
                      }
                      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

                      /* "pyarrow/tensor.pxi":997
 *         for x in obj.shape:
 *             c_shape.push_back(x)
 *         if dim_names is not None:             # <<<<<<<<<<<<<<
 *             for x in dim_names:
 *                 c_dim_names.push_back(tobytes(x))
*/
                      __pyx_t_6 = (__pyx_v_dim_names != Py_None);
                      if (__pyx_t_6) {

                        /* "pyarrow/tensor.pxi":998
 *             c_shape.push_back(x)
 *         if dim_names is not None:
 *             for x in dim_names:             # <<<<<<<<<<<<<<
 *                 c_dim_names.push_back(tobytes(x))
 * 
*/
                        if (likely(PyList_CheckExact(__pyx_v_dim_names)) || PyTuple_CheckExact(__pyx_v_dim_names)) {
                          __pyx_t_7 = __pyx_v_dim_names; __Pyx_INCREF(__pyx_t_7);
                          __pyx_t_9 = 0;
                          __pyx_t_10 = NULL;
                        } else {
                          __pyx_t_9 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_v_dim_names); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 998, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_7);
                          __pyx_t_10 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_7); if (unlikely(!__pyx_t_10)) __PYX_ERR(5, 998, __pyx_L1_error)
                        }
                        for (;;) {
                          if (likely(!__pyx_t_10)) {
                            if (likely(PyList_CheckExact(__pyx_t_7))) {
                              {
                                Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_7);
                                #if !CYTHON_ASSUME_SAFE_SIZE
                                if (unlikely((__pyx_temp < 0))) __PYX_ERR(5, 998, __pyx_L1_error)
                                #endif
                                if (__pyx_t_9 >= __pyx_temp) break;
                              }
                              __pyx_t_3 = __Pyx_PyList_GetItemRefFast(__pyx_t_7, __pyx_t_9, __Pyx_ReferenceSharing_OwnStrongReference);
                              ++__pyx_t_9;
                            } else {
                              {
                                Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_7);
                                #if !CYTHON_ASSUME_SAFE_SIZE
                                if (unlikely((__pyx_temp < 0))) __PYX_ERR(5, 998, __pyx_L1_error)
                                #endif
                                if (__pyx_t_9 >= __pyx_temp) break;
                              }
                              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                              __pyx_t_3 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_9));
                              #else
                              __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_7, __pyx_t_9);
                              #endif
                              ++__pyx_t_9;
                            }
                            if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 998, __pyx_L1_error)
                          } else {
                            __pyx_t_3 = __pyx_t_10(__pyx_t_7);
                            if (unlikely(!__pyx_t_3)) {
                              PyObject* exc_type = PyErr_Occurred();
                              if (exc_type) {
                                if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(5, 998, __pyx_L1_error)
                                PyErr_Clear();
                              }
                              break;
                            }
                          }
                          __Pyx_GOTREF(__pyx_t_3);
                          __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_3);
                          __pyx_t_3 = 0;

                          /* "pyarrow/tensor.pxi":999
 *         if dim_names is not None:
 *             for x in dim_names:
 *                 c_dim_names.push_back(tobytes(x))             # <<<<<<<<<<<<<<
 * 
 *         # Enforce precondition for CSparseCSCMatrix indices
*/
                          __pyx_t_4 = NULL;
                          __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_tobytes); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 999, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_1);
                          __pyx_t_8 = 1;
                          #if CYTHON_UNPACK_METHODS
                          if (unlikely(PyMethod_Check(__pyx_t_1))) {
                            __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
                            assert(__pyx_t_4);
                            PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_1);
                            __Pyx_INCREF(__pyx_t_4);
                            __Pyx_INCREF(__pyx__function);
                            __Pyx_DECREF_SET(__pyx_t_1, __pyx__function);
                            __pyx_t_8 = 0;
                          }
                          #endif
                          {
                            PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_x};
                            __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_1, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                            if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 999, __pyx_L1_error)
                            __Pyx_GOTREF(__pyx_t_3);
                          }
                          __pyx_t_12 = __pyx_convert_string_from_py_6libcpp_6string_std__in_string(__pyx_t_3); if (unlikely(PyErr_Occurred())) __PYX_ERR(5, 999, __pyx_L1_error)
                          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                          try {
                            __pyx_v_c_dim_names.push_back(__pyx_t_12);
                          } catch(...) {
                            __Pyx_CppExn2PyErr();
                            __PYX_ERR(5, 999, __pyx_L1_error)
                          }

                          /* "pyarrow/tensor.pxi":998
 *             c_shape.push_back(x)
 *         if dim_names is not None:
 *             for x in dim_names:             # <<<<<<<<<<<<<<
 *                 c_dim_names.push_back(tobytes(x))
 * 
*/
                        }
                        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

                        /* "pyarrow/tensor.pxi":997
 *         for x in obj.shape:
 *             c_shape.push_back(x)
 *         if dim_names is not None:             # <<<<<<<<<<<<<<
 *             for x in dim_names:
 *                 c_dim_names.push_back(tobytes(x))
*/
                      }

                      /* "pyarrow/tensor.pxi":1002
 * 
 *         # Enforce precondition for CSparseCSCMatrix indices
 *         indptr = np.require(obj.indptr, dtype='i8')             # <<<<<<<<<<<<<<
 *         indices = np.require(obj.indices, dtype='i8')
 * 
*/
                      __pyx_t_3 = NULL;
                      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 1002, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_require); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1002, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_4);
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_mstate_global->__pyx_n_u_indptr); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 1002, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_t_8 = 1;
                      #if CYTHON_UNPACK_METHODS
                      if (unlikely(PyMethod_Check(__pyx_t_4))) {
                        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
                        assert(__pyx_t_3);
                        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
                        __Pyx_INCREF(__pyx_t_3);
                        __Pyx_INCREF(__pyx__function);
                        __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
                        __pyx_t_8 = 0;
                      }
                      #endif
                      {
                        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_3, __pyx_t_1};
                        __pyx_t_13 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_13)) __PYX_ERR(5, 1002, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_13);
                        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_dtype, __pyx_mstate_global->__pyx_n_u_i8, __pyx_t_13, __pyx_callargs+2, 0) < (0)) __PYX_ERR(5, 1002, __pyx_L1_error)
                        __pyx_t_7 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_13);
                        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
                        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                        if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 1002, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_7);
                      }
                      __pyx_v_indptr = __pyx_t_7;
                      __pyx_t_7 = 0;

                      /* "pyarrow/tensor.pxi":1003
 *         # Enforce precondition for CSparseCSCMatrix indices
 *         indptr = np.require(obj.indptr, dtype='i8')
 *         indices = np.require(obj.indices, dtype='i8')             # <<<<<<<<<<<<<<
 * 
 *         check_status(NdarraysToSparseCSCMatrix(c_default_memory_pool(),
*/
                      __pyx_t_4 = NULL;
                      __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_13)) __PYX_ERR(5, 1003, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_13);
                      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_require); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 1003, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
                      __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_mstate_global->__pyx_n_u_indices); if (unlikely(!__pyx_t_13)) __PYX_ERR(5, 1003, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_13);
                      __pyx_t_8 = 1;
                      #if CYTHON_UNPACK_METHODS
                      if (unlikely(PyMethod_Check(__pyx_t_1))) {
                        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
                        assert(__pyx_t_4);
                        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_1);
                        __Pyx_INCREF(__pyx_t_4);
                        __Pyx_INCREF(__pyx__function);
                        __Pyx_DECREF_SET(__pyx_t_1, __pyx__function);
                        __pyx_t_8 = 0;
                      }
                      #endif
                      {
                        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_4, __pyx_t_13};
                        __pyx_t_3 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 1003, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_3);
                        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_dtype, __pyx_mstate_global->__pyx_n_u_i8, __pyx_t_3, __pyx_callargs+2, 0) < (0)) __PYX_ERR(5, 1003, __pyx_L1_error)
                        __pyx_t_7 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_1, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_3);
                        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
                        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                        if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 1003, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_7);
                      }
                      __pyx_v_indices = __pyx_t_7;
                      __pyx_t_7 = 0;

                      /* "pyarrow/tensor.pxi":1006
 * 
 *         check_status(NdarraysToSparseCSCMatrix(c_default_memory_pool(),
 *                                                obj.data, indptr, indices,             # <<<<<<<<<<<<<<
 *                                                c_shape, c_dim_names,
 *                                                &csparse_tensor))
*/
                      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_mstate_global->__pyx_n_u_data); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 1006, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_7);

                      /* "pyarrow/tensor.pxi":1005
 *         indices = np.require(obj.indices, dtype='i8')
 * 
 *         check_status(NdarraysToSparseCSCMatrix(c_default_memory_pool(),             # <<<<<<<<<<<<<<
 *                                                obj.data, indptr, indices,
 *                                                c_shape, c_dim_names,
*/
                      __pyx_t_14 = __pyx_f_7pyarrow_3lib_check_status(arrow::py::NdarraysToSparseCSCMatrix( arrow::default_memory_pool(), __pyx_t_7, __pyx_v_indptr, __pyx_v_indices, __pyx_v_c_shape, __pyx_v_c_dim_names, (&__pyx_v_csparse_tensor))); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(5, 1005, __pyx_L1_error)
                      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

                      /* "pyarrow/tensor.pxi":1009
 *                                                c_shape, c_dim_names,
 *                                                &csparse_tensor))
 *         return pyarrow_wrap_sparse_csc_matrix(csparse_tensor)             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
*/
                      __Pyx_XDECREF(__pyx_r);
                      __pyx_t_7 = pyarrow_wrap_sparse_csc_matrix(__pyx_v_csparse_tensor); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 1009, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_7);
                      __pyx_r = __pyx_t_7;
                      __pyx_t_7 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/tensor.pxi":974
 *         return pyarrow_wrap_sparse_csc_matrix(csparse_tensor)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_scipy(obj, dim_names=None):
 *         """
*/

                      /* 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_13);
                      __Pyx_AddTraceback("pyarrow.lib.SparseCSCMatrix.from_scipy", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XDECREF(__pyx_v_scipy);
                      __Pyx_XDECREF(__pyx_v_x);
                      __Pyx_XDECREF(__pyx_v_indptr);
                      __Pyx_XDECREF(__pyx_v_indices);
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/tensor.pxi":1011
 *         return pyarrow_wrap_sparse_csc_matrix(csparse_tensor)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_tensor(obj):
 *         """
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSCMatrix_11from_tensor(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_15SparseCSCMatrix_10from_tensor, "SparseCSCMatrix.from_tensor(obj)\n\nConvert arrow::Tensor to arrow::SparseCSCMatrix\n\nParameters\n----------\nobj : Tensor\n    The dense tensor that should be converted.");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_15SparseCSCMatrix_11from_tensor = {"from_tensor", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15SparseCSCMatrix_11from_tensor, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15SparseCSCMatrix_10from_tensor};
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSCMatrix_11from_tensor(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      PyObject *__pyx_v_obj = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[1] = {0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("from_tensor (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_obj,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(5, 1011, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(5, 1011, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "from_tensor", 0) < (0)) __PYX_ERR(5, 1011, __pyx_L3_error)
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("from_tensor", 1, 1, 1, i); __PYX_ERR(5, 1011, __pyx_L3_error) }
                          }
                        } else if (unlikely(__pyx_nargs != 1)) {
                          goto __pyx_L5_argtuple_error;
                        } else {
                          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(5, 1011, __pyx_L3_error)
                        }
                        __pyx_v_obj = values[0];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("from_tensor", 1, 1, 1, __pyx_nargs); __PYX_ERR(5, 1011, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.SparseCSCMatrix.from_tensor", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_15SparseCSCMatrix_10from_tensor(__pyx_v_obj);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSCMatrix_10from_tensor(PyObject *__pyx_v_obj) {
                      std::shared_ptr< arrow::SparseCSCMatrix>  __pyx_v_csparse_tensor;
                      std::shared_ptr< arrow::Tensor>  __pyx_v_ctensor;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      std::shared_ptr< arrow::Tensor>  __pyx_t_1;
                      int __pyx_t_2;
                      PyObject *__pyx_t_3 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("from_tensor", 0);

                      /* "pyarrow/tensor.pxi":1022
 *         """
 *         cdef shared_ptr[CSparseCSCMatrix] csparse_tensor
 *         cdef shared_ptr[CTensor] ctensor = pyarrow_unwrap_tensor(obj)             # <<<<<<<<<<<<<<
 * 
 *         with nogil:
*/
                      __pyx_t_1 = pyarrow_unwrap_tensor(__pyx_v_obj); if (unlikely(PyErr_Occurred())) __PYX_ERR(5, 1022, __pyx_L1_error)
                      __pyx_v_ctensor = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_1);

                      /* "pyarrow/tensor.pxi":1024
 *         cdef shared_ptr[CTensor] ctensor = pyarrow_unwrap_tensor(obj)
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             check_status(TensorToSparseCSCMatrix(ctensor, &csparse_tensor))
 * 
*/
                      {
                          PyThreadState * _save;
                          _save = PyEval_SaveThread();
                          __Pyx_FastGIL_Remember();
                          /*try:*/ {

                            /* "pyarrow/tensor.pxi":1025
 * 
 *         with nogil:
 *             check_status(TensorToSparseCSCMatrix(ctensor, &csparse_tensor))             # <<<<<<<<<<<<<<
 * 
 *         return pyarrow_wrap_sparse_csc_matrix(csparse_tensor)
*/
                            __pyx_t_2 = __pyx_f_7pyarrow_3lib_check_status(arrow::py::TensorToSparseCSCMatrix(__pyx_v_ctensor, (&__pyx_v_csparse_tensor))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 1025, __pyx_L4_error)
                          }

                          /* "pyarrow/tensor.pxi":1024
 *         cdef shared_ptr[CTensor] ctensor = pyarrow_unwrap_tensor(obj)
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             check_status(TensorToSparseCSCMatrix(ctensor, &csparse_tensor))
 * 
*/
                          /*finally:*/ {
                            /*normal exit:*/{
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L5;
                            }
                            __pyx_L4_error: {
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L1_error;
                            }
                            __pyx_L5:;
                          }
                      }

                      /* "pyarrow/tensor.pxi":1027
 *             check_status(TensorToSparseCSCMatrix(ctensor, &csparse_tensor))
 * 
 *         return pyarrow_wrap_sparse_csc_matrix(csparse_tensor)             # <<<<<<<<<<<<<<
 * 
 *     def to_numpy(self):
*/
                      __Pyx_XDECREF(__pyx_r);
                      __pyx_t_3 = pyarrow_wrap_sparse_csc_matrix(__pyx_v_csparse_tensor); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 1027, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_3);
                      __pyx_r = __pyx_t_3;
                      __pyx_t_3 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/tensor.pxi":1011
 *         return pyarrow_wrap_sparse_csc_matrix(csparse_tensor)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_tensor(obj):
 *         """
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_AddTraceback("pyarrow.lib.SparseCSCMatrix.from_tensor", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/tensor.pxi":1029
 *         return pyarrow_wrap_sparse_csc_matrix(csparse_tensor)
 * 
 *     def to_numpy(self):             # <<<<<<<<<<<<<<
 *         """
 *         Convert arrow::SparseCSCMatrix to numpy.ndarrays with zero copy
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSCMatrix_13to_numpy(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_15SparseCSCMatrix_12to_numpy, "SparseCSCMatrix.to_numpy(self)\n\nConvert arrow::SparseCSCMatrix to numpy.ndarrays with zero copy");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_15SparseCSCMatrix_13to_numpy = {"to_numpy", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15SparseCSCMatrix_13to_numpy, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15SparseCSCMatrix_12to_numpy};
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSCMatrix_13to_numpy(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("to_numpy (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("to_numpy", 1, 0, 0, __pyx_nargs); return NULL; }
                      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                      if (unlikely(__pyx_kwds_len < 0)) return NULL;
                      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("to_numpy", __pyx_kwds); return NULL;}
                      __pyx_r = __pyx_pf_7pyarrow_3lib_15SparseCSCMatrix_12to_numpy(((struct __pyx_obj_7pyarrow_3lib_SparseCSCMatrix *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSCMatrix_12to_numpy(struct __pyx_obj_7pyarrow_3lib_SparseCSCMatrix *__pyx_v_self) {
                      PyObject *__pyx_v_out_data;
                      PyObject *__pyx_v_out_indptr;
                      PyObject *__pyx_v_out_indices;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      int __pyx_t_2;
                      PyObject *__pyx_t_3 = NULL;
                      size_t __pyx_t_4;
                      int __pyx_t_5;
                      PyObject *__pyx_t_6 = NULL;
                      PyObject *__pyx_t_7 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("to_numpy", 0);

                      /* "pyarrow/tensor.pxi":1033
 *         Convert arrow::SparseCSCMatrix to numpy.ndarrays with zero copy
 *         """
 *         if np is None:             # <<<<<<<<<<<<<<
 *             raise ImportError(
 *                 "Cannot return a numpy.ndarray if NumPy is not present")
*/
                      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 1033, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_t_2 = (__pyx_t_1 == Py_None);
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      if (unlikely(__pyx_t_2)) {

                        /* "pyarrow/tensor.pxi":1034
 *         """
 *         if np is None:
 *             raise ImportError(             # <<<<<<<<<<<<<<
 *                 "Cannot return a numpy.ndarray if NumPy is not present")
 *         cdef PyObject* out_data
*/
                        __pyx_t_3 = NULL;
                        __pyx_t_4 = 1;
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Cannot_return_a_numpy_ndarray_if};
                          __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ImportError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                          if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 1034, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_1);
                        }
                        __Pyx_Raise(__pyx_t_1, 0, 0, 0);
                        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                        __PYX_ERR(5, 1034, __pyx_L1_error)

                        /* "pyarrow/tensor.pxi":1033
 *         Convert arrow::SparseCSCMatrix to numpy.ndarrays with zero copy
 *         """
 *         if np is None:             # <<<<<<<<<<<<<<
 *             raise ImportError(
 *                 "Cannot return a numpy.ndarray if NumPy is not present")
*/
                      }

                      /* "pyarrow/tensor.pxi":1040
 *         cdef PyObject* out_indices
 * 
 *         check_status(SparseCSCMatrixToNdarray(self.sp_sparse_tensor, self,             # <<<<<<<<<<<<<<
 *                                               &out_data, &out_indptr,
 *                                               &out_indices))
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_sparse_tensor");
                        __PYX_ERR(5, 1040, __pyx_L1_error)
                      }

                      /* "pyarrow/tensor.pxi":1042
 *         check_status(SparseCSCMatrixToNdarray(self.sp_sparse_tensor, self,
 *                                               &out_data, &out_indptr,
 *                                               &out_indices))             # <<<<<<<<<<<<<<
 *         return (PyObject_to_object(out_data), PyObject_to_object(out_indptr),
 *                 PyObject_to_object(out_indices))
*/
                      __pyx_t_5 = __pyx_f_7pyarrow_3lib_check_status(arrow::py::SparseCSCMatrixToNdarray(__pyx_v_self->sp_sparse_tensor, ((PyObject *)__pyx_v_self), (&__pyx_v_out_data), (&__pyx_v_out_indptr), (&__pyx_v_out_indices))); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(5, 1040, __pyx_L1_error)

                      /* "pyarrow/tensor.pxi":1043
 *                                               &out_data, &out_indptr,
 *                                               &out_indices))
 *         return (PyObject_to_object(out_data), PyObject_to_object(out_indptr),             # <<<<<<<<<<<<<<
 *                 PyObject_to_object(out_indices))
 * 
*/
                      __Pyx_XDECREF(__pyx_r);
                      __pyx_t_1 = __pyx_f_7pyarrow_8includes_6common_PyObject_to_object(__pyx_v_out_data); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 1043, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_t_3 = __pyx_f_7pyarrow_8includes_6common_PyObject_to_object(__pyx_v_out_indptr); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 1043, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_3);

                      /* "pyarrow/tensor.pxi":1044
 *                                               &out_indices))
 *         return (PyObject_to_object(out_data), PyObject_to_object(out_indptr),
 *                 PyObject_to_object(out_indices))             # <<<<<<<<<<<<<<
 * 
 *     def to_scipy(self):
*/
                      __pyx_t_6 = __pyx_f_7pyarrow_8includes_6common_PyObject_to_object(__pyx_v_out_indices); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 1044, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_6);

                      /* "pyarrow/tensor.pxi":1043
 *                                               &out_data, &out_indptr,
 *                                               &out_indices))
 *         return (PyObject_to_object(out_data), PyObject_to_object(out_indptr),             # <<<<<<<<<<<<<<
 *                 PyObject_to_object(out_indices))
 * 
*/
                      __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 1043, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_7);
                      __Pyx_GIVEREF(__pyx_t_1);
                      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1) != (0)) __PYX_ERR(5, 1043, __pyx_L1_error);
                      __Pyx_GIVEREF(__pyx_t_3);
                      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_3) != (0)) __PYX_ERR(5, 1043, __pyx_L1_error);
                      __Pyx_GIVEREF(__pyx_t_6);
                      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_6) != (0)) __PYX_ERR(5, 1043, __pyx_L1_error);
                      __pyx_t_1 = 0;
                      __pyx_t_3 = 0;
                      __pyx_t_6 = 0;
                      __pyx_r = __pyx_t_7;
                      __pyx_t_7 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/tensor.pxi":1029
 *         return pyarrow_wrap_sparse_csc_matrix(csparse_tensor)
 * 
 *     def to_numpy(self):             # <<<<<<<<<<<<<<
 *         """
 *         Convert arrow::SparseCSCMatrix to numpy.ndarrays with zero copy
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_XDECREF(__pyx_t_6);
                      __Pyx_XDECREF(__pyx_t_7);
                      __Pyx_AddTraceback("pyarrow.lib.SparseCSCMatrix.to_numpy", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/tensor.pxi":1046
 *                 PyObject_to_object(out_indices))
 * 
 *     def to_scipy(self):             # <<<<<<<<<<<<<<
 *         """
 *         Convert arrow::SparseCSCMatrix to scipy.sparse.csc_array
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSCMatrix_15to_scipy(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_15SparseCSCMatrix_14to_scipy, "SparseCSCMatrix.to_scipy(self)\n\nConvert arrow::SparseCSCMatrix to scipy.sparse.csc_array");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_15SparseCSCMatrix_15to_scipy = {"to_scipy", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15SparseCSCMatrix_15to_scipy, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15SparseCSCMatrix_14to_scipy};
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSCMatrix_15to_scipy(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("to_scipy (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("to_scipy", 1, 0, 0, __pyx_nargs); return NULL; }
                      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                      if (unlikely(__pyx_kwds_len < 0)) return NULL;
                      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("to_scipy", __pyx_kwds); return NULL;}
                      __pyx_r = __pyx_pf_7pyarrow_3lib_15SparseCSCMatrix_14to_scipy(((struct __pyx_obj_7pyarrow_3lib_SparseCSCMatrix *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSCMatrix_14to_scipy(struct __pyx_obj_7pyarrow_3lib_SparseCSCMatrix *__pyx_v_self) {
                      PyObject *__pyx_v_csc_array = NULL;
                      PyObject *__pyx_v_out_data;
                      PyObject *__pyx_v_out_indptr;
                      PyObject *__pyx_v_out_indices;
                      PyObject *__pyx_v_data = NULL;
                      PyObject *__pyx_v_indptr = NULL;
                      PyObject *__pyx_v_indices = NULL;
                      PyObject *__pyx_v_result = NULL;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      Py_ssize_t __pyx_t_3;
                      PyObject *__pyx_t_4 = NULL;
                      int __pyx_t_5;
                      PyObject *__pyx_t_6 = NULL;
                      PyObject *__pyx_t_7 = NULL;
                      PyObject *__pyx_t_8 = NULL;
                      size_t __pyx_t_9;
                      PyObject *__pyx_t_10 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("to_scipy", 0);

                      /* "pyarrow/tensor.pxi":1050
 *         Convert arrow::SparseCSCMatrix to scipy.sparse.csc_array
 *         """
 *         from scipy.sparse import csc_array             # <<<<<<<<<<<<<<
 *         cdef PyObject* out_data
 *         cdef PyObject* out_indptr
*/
                      {
                        PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_csc_array};
                        __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_scipy_sparse, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1050, __pyx_L1_error)
                      }
                      __pyx_t_1 = __pyx_t_2;
                      __Pyx_GOTREF(__pyx_t_1);
                      {
                        PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_csc_array};
                        __pyx_t_3 = 0; {
                          __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_1, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1050, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_4);
                          switch (__pyx_t_3) {
                            case 0:
                            __Pyx_INCREF(__pyx_t_4);
                            __pyx_v_csc_array = __pyx_t_4;
                            break;
                            default:;
                          }
                          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                        }
                      }
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

                      /* "pyarrow/tensor.pxi":1055
 *         cdef PyObject* out_indices
 * 
 *         check_status(SparseCSCMatrixToNdarray(self.sp_sparse_tensor, self,             # <<<<<<<<<<<<<<
 *                                               &out_data, &out_indptr,
 *                                               &out_indices))
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_sparse_tensor");
                        __PYX_ERR(5, 1055, __pyx_L1_error)
                      }

                      /* "pyarrow/tensor.pxi":1057
 *         check_status(SparseCSCMatrixToNdarray(self.sp_sparse_tensor, self,
 *                                               &out_data, &out_indptr,
 *                                               &out_indices))             # <<<<<<<<<<<<<<
 * 
 *         data = PyObject_to_object(out_data)
*/
                      __pyx_t_5 = __pyx_f_7pyarrow_3lib_check_status(arrow::py::SparseCSCMatrixToNdarray(__pyx_v_self->sp_sparse_tensor, ((PyObject *)__pyx_v_self), (&__pyx_v_out_data), (&__pyx_v_out_indptr), (&__pyx_v_out_indices))); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(5, 1055, __pyx_L1_error)

                      /* "pyarrow/tensor.pxi":1059
 *                                               &out_indices))
 * 
 *         data = PyObject_to_object(out_data)             # <<<<<<<<<<<<<<
 *         indptr = PyObject_to_object(out_indptr)
 *         indices = PyObject_to_object(out_indices)
*/
                      __pyx_t_1 = __pyx_f_7pyarrow_8includes_6common_PyObject_to_object(__pyx_v_out_data); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 1059, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_v_data = __pyx_t_1;
                      __pyx_t_1 = 0;

                      /* "pyarrow/tensor.pxi":1060
 * 
 *         data = PyObject_to_object(out_data)
 *         indptr = PyObject_to_object(out_indptr)             # <<<<<<<<<<<<<<
 *         indices = PyObject_to_object(out_indices)
 *         result = csc_array((data[:, 0], indices, indptr), shape=self.shape)
*/
                      __pyx_t_1 = __pyx_f_7pyarrow_8includes_6common_PyObject_to_object(__pyx_v_out_indptr); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 1060, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_v_indptr = __pyx_t_1;
                      __pyx_t_1 = 0;

                      /* "pyarrow/tensor.pxi":1061
 *         data = PyObject_to_object(out_data)
 *         indptr = PyObject_to_object(out_indptr)
 *         indices = PyObject_to_object(out_indices)             # <<<<<<<<<<<<<<
 *         result = csc_array((data[:, 0], indices, indptr), shape=self.shape)
 *         return result
*/
                      __pyx_t_1 = __pyx_f_7pyarrow_8includes_6common_PyObject_to_object(__pyx_v_out_indices); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 1061, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_v_indices = __pyx_t_1;
                      __pyx_t_1 = 0;

                      /* "pyarrow/tensor.pxi":1062
 *         indptr = PyObject_to_object(out_indptr)
 *         indices = PyObject_to_object(out_indices)
 *         result = csc_array((data[:, 0], indices, indptr), shape=self.shape)             # <<<<<<<<<<<<<<
 *         return result
 * 
*/
                      __pyx_t_4 = NULL;
                      __Pyx_INCREF(__pyx_v_csc_array);
                      __pyx_t_6 = __pyx_v_csc_array; 
                      if (unlikely(__pyx_v_data == Py_None)) {
                        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
                        __PYX_ERR(5, 1062, __pyx_L1_error)
                      }
                      __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_data, __pyx_mstate_global->__pyx_tuple[4]); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 1062, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_7);
                      __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 1062, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_8);
                      __Pyx_GIVEREF(__pyx_t_7);
                      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7) != (0)) __PYX_ERR(5, 1062, __pyx_L1_error);
                      __Pyx_INCREF(__pyx_v_indices);
                      __Pyx_GIVEREF(__pyx_v_indices);
                      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_indices) != (0)) __PYX_ERR(5, 1062, __pyx_L1_error);
                      __Pyx_INCREF(__pyx_v_indptr);
                      __Pyx_GIVEREF(__pyx_v_indptr);
                      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_v_indptr) != (0)) __PYX_ERR(5, 1062, __pyx_L1_error);
                      __pyx_t_7 = 0;
                      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_shape); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 1062, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_7);
                      __pyx_t_9 = 1;
                      #if CYTHON_UNPACK_METHODS
                      if (unlikely(PyMethod_Check(__pyx_t_6))) {
                        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
                        assert(__pyx_t_4);
                        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
                        __Pyx_INCREF(__pyx_t_4);
                        __Pyx_INCREF(__pyx__function);
                        __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
                        __pyx_t_9 = 0;
                      }
                      #endif
                      {
                        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_4, __pyx_t_8};
                        __pyx_t_10 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(5, 1062, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_10);
                        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_shape, __pyx_t_7, __pyx_t_10, __pyx_callargs+2, 0) < (0)) __PYX_ERR(5, 1062, __pyx_L1_error)
                        __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_10);
                        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
                        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 1062, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __pyx_v_result = __pyx_t_1;
                      __pyx_t_1 = 0;

                      /* "pyarrow/tensor.pxi":1063
 *         indices = PyObject_to_object(out_indices)
 *         result = csc_array((data[:, 0], indices, indptr), shape=self.shape)
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     def to_tensor(self):
*/
                      __Pyx_XDECREF(__pyx_r);
                      __Pyx_INCREF(__pyx_v_result);
                      __pyx_r = __pyx_v_result;
                      goto __pyx_L0;

                      /* "pyarrow/tensor.pxi":1046
 *                 PyObject_to_object(out_indices))
 * 
 *     def to_scipy(self):             # <<<<<<<<<<<<<<
 *         """
 *         Convert arrow::SparseCSCMatrix to scipy.sparse.csc_array
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_4);
                      __Pyx_XDECREF(__pyx_t_6);
                      __Pyx_XDECREF(__pyx_t_7);
                      __Pyx_XDECREF(__pyx_t_8);
                      __Pyx_XDECREF(__pyx_t_10);
                      __Pyx_AddTraceback("pyarrow.lib.SparseCSCMatrix.to_scipy", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XDECREF(__pyx_v_csc_array);
                      __Pyx_XDECREF(__pyx_v_data);
                      __Pyx_XDECREF(__pyx_v_indptr);
                      __Pyx_XDECREF(__pyx_v_indices);
                      __Pyx_XDECREF(__pyx_v_result);
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/tensor.pxi":1065
 *         return result
 * 
 *     def to_tensor(self):             # <<<<<<<<<<<<<<
 *         """
 *         Convert arrow::SparseCSCMatrix to arrow::Tensor
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSCMatrix_17to_tensor(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_15SparseCSCMatrix_16to_tensor, "SparseCSCMatrix.to_tensor(self)\n\nConvert arrow::SparseCSCMatrix to arrow::Tensor");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_15SparseCSCMatrix_17to_tensor = {"to_tensor", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15SparseCSCMatrix_17to_tensor, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15SparseCSCMatrix_16to_tensor};
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSCMatrix_17to_tensor(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("to_tensor (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("to_tensor", 1, 0, 0, __pyx_nargs); return NULL; }
                      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                      if (unlikely(__pyx_kwds_len < 0)) return NULL;
                      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("to_tensor", __pyx_kwds); return NULL;}
                      __pyx_r = __pyx_pf_7pyarrow_3lib_15SparseCSCMatrix_16to_tensor(((struct __pyx_obj_7pyarrow_3lib_SparseCSCMatrix *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSCMatrix_16to_tensor(struct __pyx_obj_7pyarrow_3lib_SparseCSCMatrix *__pyx_v_self) {
                      std::shared_ptr< arrow::Tensor>  __pyx_v_ctensor;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      std::shared_ptr< arrow::Tensor>  __pyx_t_1;
                      PyObject *__pyx_t_2 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("to_tensor", 0);

                      /* "pyarrow/tensor.pxi":1071
 * 
 *         cdef shared_ptr[CTensor] ctensor
 *         with nogil:             # <<<<<<<<<<<<<<
 *             ctensor = GetResultValue(self.stp.ToTensor())
 * 
*/
                      {
                          PyThreadState * _save;
                          _save = PyEval_SaveThread();
                          __Pyx_FastGIL_Remember();
                          /*try:*/ {

                            /* "pyarrow/tensor.pxi":1072
 *         cdef shared_ptr[CTensor] ctensor
 *         with nogil:
 *             ctensor = GetResultValue(self.stp.ToTensor())             # <<<<<<<<<<<<<<
 * 
 *         return pyarrow_wrap_tensor(ctensor)
*/
                            if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                              PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "stp");
                              __Pyx_PyGILState_Release(__pyx_gilstate_save);
                              __PYX_ERR(5, 1072, __pyx_L4_error)
                            }
                            __pyx_t_1 = arrow::py::GetResultValue<std::shared_ptr< arrow::Tensor> >(__pyx_v_self->stp->ToTensor()); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(5, 1072, __pyx_L4_error)
                            __pyx_v_ctensor = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_1);
                          }

                          /* "pyarrow/tensor.pxi":1071
 * 
 *         cdef shared_ptr[CTensor] ctensor
 *         with nogil:             # <<<<<<<<<<<<<<
 *             ctensor = GetResultValue(self.stp.ToTensor())
 * 
*/
                          /*finally:*/ {
                            /*normal exit:*/{
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L5;
                            }
                            __pyx_L4_error: {
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L1_error;
                            }
                            __pyx_L5:;
                          }
                      }

                      /* "pyarrow/tensor.pxi":1074
 *             ctensor = GetResultValue(self.stp.ToTensor())
 * 
 *         return pyarrow_wrap_tensor(ctensor)             # <<<<<<<<<<<<<<
 * 
 *     def equals(self, SparseCSCMatrix other):
*/
                      __Pyx_XDECREF(__pyx_r);
                      __pyx_t_2 = pyarrow_wrap_tensor(__pyx_v_ctensor); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1074, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_2);
                      __pyx_r = __pyx_t_2;
                      __pyx_t_2 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/tensor.pxi":1065
 *         return result
 * 
 *     def to_tensor(self):             # <<<<<<<<<<<<<<
 *         """
 *         Convert arrow::SparseCSCMatrix to arrow::Tensor
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_AddTraceback("pyarrow.lib.SparseCSCMatrix.to_tensor", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/tensor.pxi":1076
 *         return pyarrow_wrap_tensor(ctensor)
 * 
 *     def equals(self, SparseCSCMatrix other):             # <<<<<<<<<<<<<<
 *         """
 *         Return true if sparse tensors contains exactly equal data
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSCMatrix_19equals(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_15SparseCSCMatrix_18equals, "SparseCSCMatrix.equals(self, SparseCSCMatrix other)\n\nReturn true if sparse tensors contains exactly equal data\n\nParameters\n----------\nother : SparseCSCMatrix\n    The other tensor to compare for equality.");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_15SparseCSCMatrix_19equals = {"equals", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15SparseCSCMatrix_19equals, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15SparseCSCMatrix_18equals};
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSCMatrix_19equals(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      struct __pyx_obj_7pyarrow_3lib_SparseCSCMatrix *__pyx_v_other = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[1] = {0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("equals (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_other,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(5, 1076, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(5, 1076, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "equals", 0) < (0)) __PYX_ERR(5, 1076, __pyx_L3_error)
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("equals", 1, 1, 1, i); __PYX_ERR(5, 1076, __pyx_L3_error) }
                          }
                        } else if (unlikely(__pyx_nargs != 1)) {
                          goto __pyx_L5_argtuple_error;
                        } else {
                          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(5, 1076, __pyx_L3_error)
                        }
                        __pyx_v_other = ((struct __pyx_obj_7pyarrow_3lib_SparseCSCMatrix *)values[0]);
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("equals", 1, 1, 1, __pyx_nargs); __PYX_ERR(5, 1076, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.SparseCSCMatrix.equals", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_SparseCSCMatrix, 1, "other", 0))) __PYX_ERR(5, 1076, __pyx_L1_error)
                      __pyx_r = __pyx_pf_7pyarrow_3lib_15SparseCSCMatrix_18equals(((struct __pyx_obj_7pyarrow_3lib_SparseCSCMatrix *)__pyx_v_self), __pyx_v_other);

                      /* function exit code */
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __pyx_r = NULL;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      goto __pyx_L7_cleaned_up;
                      __pyx_L0:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __pyx_L7_cleaned_up:;
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSCMatrix_18equals(struct __pyx_obj_7pyarrow_3lib_SparseCSCMatrix *__pyx_v_self, struct __pyx_obj_7pyarrow_3lib_SparseCSCMatrix *__pyx_v_other) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("equals", 0);

                      /* "pyarrow/tensor.pxi":1085
 *             The other tensor to compare for equality.
 *         """
 *         return self.stp.Equals(deref(other.stp))             # <<<<<<<<<<<<<<
 * 
 *     def __eq__(self, other):
*/
                      __Pyx_XDECREF(__pyx_r);
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "stp");
                        __PYX_ERR(5, 1085, __pyx_L1_error)
                      }
                      if (unlikely(((PyObject *)__pyx_v_other) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "stp");
                        __PYX_ERR(5, 1085, __pyx_L1_error)
                      }
                      __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->stp->Equals((*__pyx_v_other->stp))); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 1085, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_r = __pyx_t_1;
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/tensor.pxi":1076
 *         return pyarrow_wrap_tensor(ctensor)
 * 
 *     def equals(self, SparseCSCMatrix other):             # <<<<<<<<<<<<<<
 *         """
 *         Return true if sparse tensors contains exactly equal data
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_AddTraceback("pyarrow.lib.SparseCSCMatrix.equals", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/tensor.pxi":1087
 *         return self.stp.Equals(deref(other.stp))
 * 
 *     def __eq__(self, other):             # <<<<<<<<<<<<<<
 *         if isinstance(other, SparseCSCMatrix):
 *             return self.equals(other)
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSCMatrix_21__eq__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSCMatrix_21__eq__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__eq__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_15SparseCSCMatrix_20__eq__(((struct __pyx_obj_7pyarrow_3lib_SparseCSCMatrix *)__pyx_v_self), ((PyObject *)__pyx_v_other));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSCMatrix_20__eq__(struct __pyx_obj_7pyarrow_3lib_SparseCSCMatrix *__pyx_v_self, PyObject *__pyx_v_other) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_t_1;
                      PyObject *__pyx_t_2 = NULL;
                      PyObject *__pyx_t_3 = NULL;
                      size_t __pyx_t_4;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__eq__", 0);

                      /* "pyarrow/tensor.pxi":1088
 * 
 *     def __eq__(self, other):
 *         if isinstance(other, SparseCSCMatrix):             # <<<<<<<<<<<<<<
 *             return self.equals(other)
 *         else:
*/
                      __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_other, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_SparseCSCMatrix); 
                      if (__pyx_t_1) {

                        /* "pyarrow/tensor.pxi":1089
 *     def __eq__(self, other):
 *         if isinstance(other, SparseCSCMatrix):
 *             return self.equals(other)             # <<<<<<<<<<<<<<
 *         else:
 *             return NotImplemented
*/
                        __Pyx_XDECREF(__pyx_r);
                        __pyx_t_3 = ((PyObject *)__pyx_v_self);
                        __Pyx_INCREF(__pyx_t_3);
                        __pyx_t_4 = 0;
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_other};
                          __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_equals, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                          if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1089, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_2);
                        }
                        __pyx_r = __pyx_t_2;
                        __pyx_t_2 = 0;
                        goto __pyx_L0;

                        /* "pyarrow/tensor.pxi":1088
 * 
 *     def __eq__(self, other):
 *         if isinstance(other, SparseCSCMatrix):             # <<<<<<<<<<<<<<
 *             return self.equals(other)
 *         else:
*/
                      }

                      /* "pyarrow/tensor.pxi":1091
 *             return self.equals(other)
 *         else:
 *             return NotImplemented             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
                      /*else*/ {
                        __Pyx_XDECREF(__pyx_r);
                        __Pyx_INCREF(__pyx_builtin_NotImplemented);
                        __pyx_r = __pyx_builtin_NotImplemented;
                        goto __pyx_L0;
                      }

                      /* "pyarrow/tensor.pxi":1087
 *         return self.stp.Equals(deref(other.stp))
 * 
 *     def __eq__(self, other):             # <<<<<<<<<<<<<<
 *         if isinstance(other, SparseCSCMatrix):
 *             return self.equals(other)
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_AddTraceback("pyarrow.lib.SparseCSCMatrix.__eq__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/tensor.pxi":1093
 *             return NotImplemented
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_mutable(self):
 *         return self.stp.is_mutable()
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSCMatrix_10is_mutable_1__get__(PyObject *__pyx_v_self); /*proto*/
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSCMatrix_10is_mutable_1__get__(PyObject *__pyx_v_self) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_15SparseCSCMatrix_10is_mutable___get__(((struct __pyx_obj_7pyarrow_3lib_SparseCSCMatrix *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSCMatrix_10is_mutable___get__(struct __pyx_obj_7pyarrow_3lib_SparseCSCMatrix *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__get__", 0);

                      /* "pyarrow/tensor.pxi":1095
 *     @property
 *     def is_mutable(self):
 *         return self.stp.is_mutable()             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
                      __Pyx_XDECREF(__pyx_r);
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "stp");
                        __PYX_ERR(5, 1095, __pyx_L1_error)
                      }
                      __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->stp->is_mutable()); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 1095, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_r = __pyx_t_1;
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/tensor.pxi":1093
 *             return NotImplemented
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_mutable(self):
 *         return self.stp.is_mutable()
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_AddTraceback("pyarrow.lib.SparseCSCMatrix.is_mutable.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/tensor.pxi":1097
 *         return self.stp.is_mutable()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def ndim(self):
 *         return self.stp.ndim()
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSCMatrix_4ndim_1__get__(PyObject *__pyx_v_self); /*proto*/
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSCMatrix_4ndim_1__get__(PyObject *__pyx_v_self) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_15SparseCSCMatrix_4ndim___get__(((struct __pyx_obj_7pyarrow_3lib_SparseCSCMatrix *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSCMatrix_4ndim___get__(struct __pyx_obj_7pyarrow_3lib_SparseCSCMatrix *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__get__", 0);

                      /* "pyarrow/tensor.pxi":1099
 *     @property
 *     def ndim(self):
 *         return self.stp.ndim()             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
                      __Pyx_XDECREF(__pyx_r);
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "stp");
                        __PYX_ERR(5, 1099, __pyx_L1_error)
                      }
                      __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_v_self->stp->ndim()); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 1099, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_r = __pyx_t_1;
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/tensor.pxi":1097
 *         return self.stp.is_mutable()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def ndim(self):
 *         return self.stp.ndim()
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_AddTraceback("pyarrow.lib.SparseCSCMatrix.ndim.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/tensor.pxi":1101
 *         return self.stp.ndim()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def shape(self):
 *         # Cython knows how to convert a vector[T] to a Python list
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSCMatrix_5shape_1__get__(PyObject *__pyx_v_self); /*proto*/
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSCMatrix_5shape_1__get__(PyObject *__pyx_v_self) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_15SparseCSCMatrix_5shape___get__(((struct __pyx_obj_7pyarrow_3lib_SparseCSCMatrix *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSCMatrix_5shape___get__(struct __pyx_obj_7pyarrow_3lib_SparseCSCMatrix *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__get__", 0);

                      /* "pyarrow/tensor.pxi":1104
 *     def shape(self):
 *         # Cython knows how to convert a vector[T] to a Python list
 *         return tuple(self.stp.shape())             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
                      __Pyx_XDECREF(__pyx_r);
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "stp");
                        __PYX_ERR(5, 1104, __pyx_L1_error)
                      }
                      __pyx_t_1 = __pyx_convert_vector_to_py_int64_t(__pyx_v_self->stp->shape()); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 1104, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_t_2 = __Pyx_PySequence_Tuple(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1104, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_2);
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      __pyx_r = __pyx_t_2;
                      __pyx_t_2 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/tensor.pxi":1101
 *         return self.stp.ndim()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def shape(self):
 *         # Cython knows how to convert a vector[T] to a Python list
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_AddTraceback("pyarrow.lib.SparseCSCMatrix.shape.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/tensor.pxi":1106
 *         return tuple(self.stp.shape())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def size(self):
 *         return self.stp.size()
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSCMatrix_4size_1__get__(PyObject *__pyx_v_self); /*proto*/
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSCMatrix_4size_1__get__(PyObject *__pyx_v_self) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_15SparseCSCMatrix_4size___get__(((struct __pyx_obj_7pyarrow_3lib_SparseCSCMatrix *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSCMatrix_4size___get__(struct __pyx_obj_7pyarrow_3lib_SparseCSCMatrix *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__get__", 0);

                      /* "pyarrow/tensor.pxi":1108
 *     @property
 *     def size(self):
 *         return self.stp.size()             # <<<<<<<<<<<<<<
 * 
 *     def dim_name(self, i):
*/
                      __Pyx_XDECREF(__pyx_r);
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "stp");
                        __PYX_ERR(5, 1108, __pyx_L1_error)
                      }
                      __pyx_t_1 = __Pyx_PyLong_From_int64_t(__pyx_v_self->stp->size()); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 1108, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_r = __pyx_t_1;
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/tensor.pxi":1106
 *         return tuple(self.stp.shape())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def size(self):
 *         return self.stp.size()
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_AddTraceback("pyarrow.lib.SparseCSCMatrix.size.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/tensor.pxi":1110
 *         return self.stp.size()
 * 
 *     def dim_name(self, i):             # <<<<<<<<<<<<<<
 *         """
 *         Returns the name of the i-th tensor dimension.
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSCMatrix_23dim_name(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_15SparseCSCMatrix_22dim_name, "SparseCSCMatrix.dim_name(self, i)\n\nReturns the name of the i-th tensor dimension.\n\nParameters\n----------\ni : int\n    The physical index of the tensor dimension.\n\nReturns\n-------\nstr");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_15SparseCSCMatrix_23dim_name = {"dim_name", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15SparseCSCMatrix_23dim_name, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15SparseCSCMatrix_22dim_name};
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSCMatrix_23dim_name(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      PyObject *__pyx_v_i = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[1] = {0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("dim_name (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_i,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(5, 1110, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(5, 1110, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "dim_name", 0) < (0)) __PYX_ERR(5, 1110, __pyx_L3_error)
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("dim_name", 1, 1, 1, i); __PYX_ERR(5, 1110, __pyx_L3_error) }
                          }
                        } else if (unlikely(__pyx_nargs != 1)) {
                          goto __pyx_L5_argtuple_error;
                        } else {
                          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(5, 1110, __pyx_L3_error)
                        }
                        __pyx_v_i = values[0];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("dim_name", 1, 1, 1, __pyx_nargs); __PYX_ERR(5, 1110, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.SparseCSCMatrix.dim_name", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_15SparseCSCMatrix_22dim_name(((struct __pyx_obj_7pyarrow_3lib_SparseCSCMatrix *)__pyx_v_self), __pyx_v_i);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSCMatrix_22dim_name(struct __pyx_obj_7pyarrow_3lib_SparseCSCMatrix *__pyx_v_self, PyObject *__pyx_v_i) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      PyObject *__pyx_t_3 = NULL;
                      int __pyx_t_4;
                      PyObject *__pyx_t_5 = NULL;
                      size_t __pyx_t_6;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("dim_name", 0);

                      /* "pyarrow/tensor.pxi":1123
 *         str
 *         """
 *         return frombytes(self.stp.dim_name(i))             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
                      __Pyx_XDECREF(__pyx_r);
                      __pyx_t_2 = NULL;
                      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_frombytes); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 1123, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_3);
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "stp");
                        __PYX_ERR(5, 1123, __pyx_L1_error)
                      }
                      __pyx_t_4 = __Pyx_PyLong_As_int(__pyx_v_i); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(5, 1123, __pyx_L1_error)
                      __pyx_t_5 = __pyx_convert_PyBytes_string_to_py_6libcpp_6string_std__in_string(__pyx_v_self->stp->dim_name(__pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 1123, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_5);
                      __pyx_t_6 = 1;
                      #if CYTHON_UNPACK_METHODS
                      if (unlikely(PyMethod_Check(__pyx_t_3))) {
                        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
                        assert(__pyx_t_2);
                        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
                        __Pyx_INCREF(__pyx_t_2);
                        __Pyx_INCREF(__pyx__function);
                        __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
                        __pyx_t_6 = 0;
                      }
                      #endif
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_5};
                        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 1123, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __pyx_r = __pyx_t_1;
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/tensor.pxi":1110
 *         return self.stp.size()
 * 
 *     def dim_name(self, i):             # <<<<<<<<<<<<<<
 *         """
 *         Returns the name of the i-th tensor dimension.
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_XDECREF(__pyx_t_5);
                      __Pyx_AddTraceback("pyarrow.lib.SparseCSCMatrix.dim_name", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/tensor.pxi":1125
 *         return frombytes(self.stp.dim_name(i))
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def dim_names(self):
 *         names_tuple = tuple(self.stp.dim_names())
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSCMatrix_9dim_names_1__get__(PyObject *__pyx_v_self); /*proto*/
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSCMatrix_9dim_names_1__get__(PyObject *__pyx_v_self) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_15SparseCSCMatrix_9dim_names___get__(((struct __pyx_obj_7pyarrow_3lib_SparseCSCMatrix *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }
                    static PyObject *__pyx_gb_7pyarrow_3lib_15SparseCSCMatrix_9dim_names_7__get___2generator19(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

                    /* "pyarrow/tensor.pxi":1128
 *     def dim_names(self):
 *         names_tuple = tuple(self.stp.dim_names())
 *         return tuple(frombytes(x) for x in names_tuple)             # <<<<<<<<<<<<<<
 * 
 *     @property
*/

                    static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSCMatrix_9dim_names_7__get___genexpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0) {
                      struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_19_genexpr *__pyx_cur_scope;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("genexpr", 0);
                      __pyx_cur_scope = (struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_19_genexpr *)__pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_19_genexpr(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_19_genexpr, __pyx_mstate_global->__pyx_empty_tuple, NULL);
                      if (unlikely(!__pyx_cur_scope)) {
                        __pyx_cur_scope = ((struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_19_genexpr *)Py_None);
                        __Pyx_INCREF(Py_None);
                        __PYX_ERR(5, 1128, __pyx_L1_error)
                      } else {
                        __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
                      }
                      __pyx_cur_scope->__pyx_genexpr_arg_0 = __pyx_genexpr_arg_0;
                      __Pyx_INCREF(__pyx_cur_scope->__pyx_genexpr_arg_0);
                      __Pyx_GIVEREF(__pyx_cur_scope->__pyx_genexpr_arg_0);
                      {
                        __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7pyarrow_3lib_15SparseCSCMatrix_9dim_names_7__get___2generator19, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[18]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_SparseCSCMatrix___get___locals_g, __pyx_mstate_global->__pyx_n_u_pyarrow_lib); if (unlikely(!gen)) __PYX_ERR(5, 1128, __pyx_L1_error)
                        __Pyx_DECREF(__pyx_cur_scope);
                        __Pyx_RefNannyFinishContext();
                        return (PyObject *) gen;
                      }

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib.SparseCSCMatrix.dim_names.__get__.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __Pyx_DECREF((PyObject *)__pyx_cur_scope);
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_gb_7pyarrow_3lib_15SparseCSCMatrix_9dim_names_7__get___2generator19(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
                      struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_19_genexpr *__pyx_cur_scope = ((struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_19_genexpr *)__pyx_generator->closure);
                      PyObject *__pyx_r = NULL;
                      PyObject *__pyx_t_1 = NULL;
                      Py_ssize_t __pyx_t_2;
                      PyObject *__pyx_t_3 = NULL;
                      PyObject *__pyx_t_4 = NULL;
                      PyObject *__pyx_t_5 = NULL;
                      size_t __pyx_t_6;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("genexpr", 0);
                      switch (__pyx_generator->resume_label) {
                        case 0: goto __pyx_L3_first_run;
                        case 1: goto __pyx_L6_resume_from_yield;
                        default: /* CPython raises the right error here */
                        __Pyx_RefNannyFinishContext();
                        return NULL;
                      }
                      __pyx_L3_first_run:;
                      if (unlikely(__pyx_sent_value != Py_None)) {
                        if (unlikely(__pyx_sent_value)) PyErr_SetString(PyExc_TypeError, "can't send non-None value to a just-started generator");
                        __PYX_ERR(5, 1128, __pyx_L1_error)
                      }
                      if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(5, 1128, __pyx_L1_error) }
                      __pyx_t_1 = __pyx_cur_scope->__pyx_genexpr_arg_0; __Pyx_INCREF(__pyx_t_1);
                      __pyx_t_2 = 0;
                      for (;;) {
                        {
                          Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
                          #if !CYTHON_ASSUME_SAFE_SIZE
                          if (unlikely((__pyx_temp < 0))) __PYX_ERR(5, 1128, __pyx_L1_error)
                          #endif
                          if (__pyx_t_2 >= __pyx_temp) break;
                        }
                        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                        __pyx_t_3 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2));
                        #else
                        __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2);
                        #endif
                        ++__pyx_t_2;
                        if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 1128, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_3);
                        __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_x);
                        __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_x, __pyx_t_3);
                        __Pyx_GIVEREF(__pyx_t_3);
                        __pyx_t_3 = 0;
                        __pyx_t_4 = NULL;
                        __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_frombytes); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 1128, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_5);
                        __pyx_t_6 = 1;
                        #if CYTHON_UNPACK_METHODS
                        if (unlikely(PyMethod_Check(__pyx_t_5))) {
                          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
                          assert(__pyx_t_4);
                          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
                          __Pyx_INCREF(__pyx_t_4);
                          __Pyx_INCREF(__pyx__function);
                          __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
                          __pyx_t_6 = 0;
                        }
                        #endif
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_cur_scope->__pyx_v_x};
                          __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                          if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 1128, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_3);
                        }
                        __pyx_r = __pyx_t_3;
                        __pyx_t_3 = 0;
                        __Pyx_XGIVEREF(__pyx_t_1);
                        __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
                        __pyx_cur_scope->__pyx_t_1 = __pyx_t_2;
                        __Pyx_XGIVEREF(__pyx_r);
                        __Pyx_RefNannyFinishContext();
                        __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
                        /* return from generator, yielding value */
                        __pyx_generator->resume_label = 1;
                        return __pyx_r;
                        __pyx_L6_resume_from_yield:;
                        __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
                        __pyx_cur_scope->__pyx_t_0 = 0;
                        __Pyx_XGOTREF(__pyx_t_1);
                        __pyx_t_2 = __pyx_cur_scope->__pyx_t_1;
                        if (unlikely(!__pyx_sent_value)) __PYX_ERR(5, 1128, __pyx_L1_error)
                      }
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

                      /* function exit code */
                      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_XDECREF(__pyx_t_4);
                      __Pyx_XDECREF(__pyx_t_5);
                      if (__Pyx_PyErr_Occurred()) {
                        __Pyx_Generator_Replace_StopIteration(0);
                        __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      }
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      #if !CYTHON_USE_EXC_INFO_STACK
                      __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
                      #endif
                      __pyx_generator->resume_label = -1;
                      __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/tensor.pxi":1125
 *         return frombytes(self.stp.dim_name(i))
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def dim_names(self):
 *         names_tuple = tuple(self.stp.dim_names())
*/

                    static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSCMatrix_9dim_names___get__(struct __pyx_obj_7pyarrow_3lib_SparseCSCMatrix *__pyx_v_self) {
                      PyObject *__pyx_v_names_tuple = NULL;
                      PyObject *__pyx_gb_7pyarrow_3lib_15SparseCSCMatrix_9dim_names_7__get___2generator19 = 0;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__get__", 0);

                      /* "pyarrow/tensor.pxi":1127
 *     @property
 *     def dim_names(self):
 *         names_tuple = tuple(self.stp.dim_names())             # <<<<<<<<<<<<<<
 *         return tuple(frombytes(x) for x in names_tuple)
 * 
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "stp");
                        __PYX_ERR(5, 1127, __pyx_L1_error)
                      }
                      __pyx_t_1 = __pyx_convert_vector_to_py_std_3a__3a_string(__pyx_v_self->stp->dim_names()); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 1127, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_t_2 = __Pyx_PySequence_Tuple(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1127, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_2);
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      __pyx_v_names_tuple = ((PyObject*)__pyx_t_2);
                      __pyx_t_2 = 0;

                      /* "pyarrow/tensor.pxi":1128
 *     def dim_names(self):
 *         names_tuple = tuple(self.stp.dim_names())
 *         return tuple(frombytes(x) for x in names_tuple)             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
                      __Pyx_XDECREF(__pyx_r);
                      __pyx_t_2 = __pyx_pf_7pyarrow_3lib_15SparseCSCMatrix_9dim_names_7__get___genexpr(NULL, __pyx_v_names_tuple); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1128, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_2);
                      __pyx_t_1 = __Pyx_PySequence_Tuple(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 1128, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                      __pyx_r = __pyx_t_1;
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/tensor.pxi":1125
 *         return frombytes(self.stp.dim_name(i))
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def dim_names(self):
 *         names_tuple = tuple(self.stp.dim_names())
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_AddTraceback("pyarrow.lib.SparseCSCMatrix.dim_names.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XDECREF(__pyx_v_names_tuple);
                      __Pyx_XDECREF(__pyx_gb_7pyarrow_3lib_15SparseCSCMatrix_9dim_names_7__get___2generator19);
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/tensor.pxi":1130
 *         return tuple(frombytes(x) for x in names_tuple)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def non_zero_length(self):
 *         return self.stp.non_zero_length()
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSCMatrix_15non_zero_length_1__get__(PyObject *__pyx_v_self); /*proto*/
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSCMatrix_15non_zero_length_1__get__(PyObject *__pyx_v_self) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_15SparseCSCMatrix_15non_zero_length___get__(((struct __pyx_obj_7pyarrow_3lib_SparseCSCMatrix *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSCMatrix_15non_zero_length___get__(struct __pyx_obj_7pyarrow_3lib_SparseCSCMatrix *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__get__", 0);

                      /* "pyarrow/tensor.pxi":1132
 *     @property
 *     def non_zero_length(self):
 *         return self.stp.non_zero_length()             # <<<<<<<<<<<<<<
 * 
 * 
*/
                      __Pyx_XDECREF(__pyx_r);
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "stp");
                        __PYX_ERR(5, 1132, __pyx_L1_error)
                      }
                      __pyx_t_1 = __Pyx_PyLong_From_int64_t(__pyx_v_self->stp->non_zero_length()); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 1132, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_r = __pyx_t_1;
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/tensor.pxi":1130
 *         return tuple(frombytes(x) for x in names_tuple)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def non_zero_length(self):
 *         return self.stp.non_zero_length()
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_AddTraceback("pyarrow.lib.SparseCSCMatrix.non_zero_length.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/lib.pxd":327
 * 
 *     cdef readonly:
 *         DataType type             # <<<<<<<<<<<<<<
 * 
 *     cdef void init(self, const shared_ptr[CSparseCSCMatrix]& sp_sparse_tensor)
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSCMatrix_4type_1__get__(PyObject *__pyx_v_self); /*proto*/
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSCMatrix_4type_1__get__(PyObject *__pyx_v_self) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_15SparseCSCMatrix_4type___get__(((struct __pyx_obj_7pyarrow_3lib_SparseCSCMatrix *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSCMatrix_4type___get__(struct __pyx_obj_7pyarrow_3lib_SparseCSCMatrix *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__get__", 0);
                      __Pyx_XDECREF(__pyx_r);
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "type");
                        __PYX_ERR(15, 327, __pyx_L1_error)
                      }
                      __Pyx_INCREF((PyObject *)__pyx_v_self->type);
                      __pyx_r = ((PyObject *)__pyx_v_self->type);
                      goto __pyx_L0;

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib.SparseCSCMatrix.type.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.sp_sparse_tensor,self.stp cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSCMatrix_25__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_15SparseCSCMatrix_24__reduce_cython__, "SparseCSCMatrix.__reduce_cython__(self)");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_15SparseCSCMatrix_25__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15SparseCSCMatrix_25__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15SparseCSCMatrix_24__reduce_cython__};
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSCMatrix_25__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; }
                      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                      if (unlikely(__pyx_kwds_len < 0)) return NULL;
                      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;}
                      __pyx_r = __pyx_pf_7pyarrow_3lib_15SparseCSCMatrix_24__reduce_cython__(((struct __pyx_obj_7pyarrow_3lib_SparseCSCMatrix *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSCMatrix_24__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_SparseCSCMatrix *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__reduce_cython__", 0);

                      /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "self.sp_sparse_tensor,self.stp cannot be converted to a Python object for pickling"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "self.sp_sparse_tensor,self.stp cannot be converted to a Python object for pickling"
*/
                      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_self_sp_sparse_tensor_self_stp_c, 0, 0);
                      __PYX_ERR(7, 2, __pyx_L1_error)

                      /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.sp_sparse_tensor,self.stp cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib.SparseCSCMatrix.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "self.sp_sparse_tensor,self.stp cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.sp_sparse_tensor,self.stp cannot be converted to a Python object for pickling"
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSCMatrix_27__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_15SparseCSCMatrix_26__setstate_cython__, "SparseCSCMatrix.__setstate_cython__(self, __pyx_state)");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_15SparseCSCMatrix_27__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15SparseCSCMatrix_27__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15SparseCSCMatrix_26__setstate_cython__};
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSCMatrix_27__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[1] = {0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(7, 3, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(7, 3, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(7, 3, __pyx_L3_error)
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(7, 3, __pyx_L3_error) }
                          }
                        } else if (unlikely(__pyx_nargs != 1)) {
                          goto __pyx_L5_argtuple_error;
                        } else {
                          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(7, 3, __pyx_L3_error)
                        }
                        __pyx_v___pyx_state = values[0];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(7, 3, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.SparseCSCMatrix.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_15SparseCSCMatrix_26__setstate_cython__(((struct __pyx_obj_7pyarrow_3lib_SparseCSCMatrix *)__pyx_v_self), __pyx_v___pyx_state);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSCMatrix_26__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_SparseCSCMatrix *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__setstate_cython__", 0);

                      /* "(tree fragment)":4
 *     raise TypeError, "self.sp_sparse_tensor,self.stp cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "self.sp_sparse_tensor,self.stp cannot be converted to a Python object for pickling"             # <<<<<<<<<<<<<<
*/
                      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_self_sp_sparse_tensor_self_stp_c, 0, 0);
                      __PYX_ERR(7, 4, __pyx_L1_error)

                      /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "self.sp_sparse_tensor,self.stp cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.sp_sparse_tensor,self.stp cannot be converted to a Python object for pickling"
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib.SparseCSCMatrix.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/tensor.pxi":1147
 *     """
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         raise TypeError("Do not call SparseCSFTensor's constructor directly, "
 *                         "use one of the `pyarrow.SparseCSFTensor.from_*` "
*/

                    /* Python wrapper */
                    static int __pyx_pw_7pyarrow_3lib_15SparseCSFTensor_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
                    static int __pyx_pw_7pyarrow_3lib_15SparseCSFTensor_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      int __pyx_r;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, __pyx_nargs); return -1; }
                      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
                      if (unlikely(__pyx_kwds_len < 0)) return -1;
                      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__init__", __pyx_kwds); return -1;}
                      __pyx_r = __pyx_pf_7pyarrow_3lib_15SparseCSFTensor___init__(((struct __pyx_obj_7pyarrow_3lib_SparseCSFTensor *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static int __pyx_pf_7pyarrow_3lib_15SparseCSFTensor___init__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_SparseCSFTensor *__pyx_v_self) {
                      int __pyx_r;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      size_t __pyx_t_3;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__init__", 0);

                      /* "pyarrow/tensor.pxi":1148
 * 
 *     def __init__(self):
 *         raise TypeError("Do not call SparseCSFTensor's constructor directly, "             # <<<<<<<<<<<<<<
 *                         "use one of the `pyarrow.SparseCSFTensor.from_*` "
 *                         "functions instead.")
*/
                      __pyx_t_2 = NULL;
                      __pyx_t_3 = 1;
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Do_not_call_SparseCSFTensor_s_co};
                        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 1148, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      __PYX_ERR(5, 1148, __pyx_L1_error)

                      /* "pyarrow/tensor.pxi":1147
 *     """
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         raise TypeError("Do not call SparseCSFTensor's constructor directly, "
 *                         "use one of the `pyarrow.SparseCSFTensor.from_*` "
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_AddTraceback("pyarrow.lib.SparseCSFTensor.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = -1;
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/tensor.pxi":1152
 *                         "functions instead.")
 * 
 *     cdef void init(self, const shared_ptr[CSparseCSFTensor]& sp_sparse_tensor):             # <<<<<<<<<<<<<<
 *         self.sp_sparse_tensor = sp_sparse_tensor
 *         self.stp = sp_sparse_tensor.get()
*/

                    static void __pyx_f_7pyarrow_3lib_15SparseCSFTensor_init(struct __pyx_obj_7pyarrow_3lib_SparseCSFTensor *__pyx_v_self, std::shared_ptr< arrow::SparseCSFTensor>  const &__pyx_v_sp_sparse_tensor) {
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("init", 0);

                      /* "pyarrow/tensor.pxi":1153
 * 
 *     cdef void init(self, const shared_ptr[CSparseCSFTensor]& sp_sparse_tensor):
 *         self.sp_sparse_tensor = sp_sparse_tensor             # <<<<<<<<<<<<<<
 *         self.stp = sp_sparse_tensor.get()
 *         self.type = pyarrow_wrap_data_type(self.stp.type())
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_sparse_tensor");
                        __PYX_ERR(5, 1153, __pyx_L1_error)
                      }
                      __pyx_v_self->sp_sparse_tensor = __pyx_v_sp_sparse_tensor;

                      /* "pyarrow/tensor.pxi":1154
 *     cdef void init(self, const shared_ptr[CSparseCSFTensor]& sp_sparse_tensor):
 *         self.sp_sparse_tensor = sp_sparse_tensor
 *         self.stp = sp_sparse_tensor.get()             # <<<<<<<<<<<<<<
 *         self.type = pyarrow_wrap_data_type(self.stp.type())
 * 
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "stp");
                        __PYX_ERR(5, 1154, __pyx_L1_error)
                      }
                      __pyx_v_self->stp = __pyx_v_sp_sparse_tensor.get();

                      /* "pyarrow/tensor.pxi":1155
 *         self.sp_sparse_tensor = sp_sparse_tensor
 *         self.stp = sp_sparse_tensor.get()
 *         self.type = pyarrow_wrap_data_type(self.stp.type())             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "stp");
                        __PYX_ERR(5, 1155, __pyx_L1_error)
                      }
                      __pyx_t_1 = pyarrow_wrap_data_type(__pyx_v_self->stp->type()); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 1155, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType))))) __PYX_ERR(5, 1155, __pyx_L1_error)
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "type");
                        __PYX_ERR(5, 1155, __pyx_L1_error)
                      }
                      __Pyx_GIVEREF(__pyx_t_1);
                      __Pyx_GOTREF((PyObject *)__pyx_v_self->type);
                      __Pyx_DECREF((PyObject *)__pyx_v_self->type);
                      __pyx_v_self->type = ((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_t_1);
                      __pyx_t_1 = 0;

                      /* "pyarrow/tensor.pxi":1152
 *                         "functions instead.")
 * 
 *     cdef void init(self, const shared_ptr[CSparseCSFTensor]& sp_sparse_tensor):             # <<<<<<<<<<<<<<
 *         self.sp_sparse_tensor = sp_sparse_tensor
 *         self.stp = sp_sparse_tensor.get()
*/

                      /* function exit code */
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_AddTraceback("pyarrow.lib.SparseCSFTensor.init", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_L0:;
                      __Pyx_RefNannyFinishContext();
                    }

                    /* "pyarrow/tensor.pxi":1157
 *         self.type = pyarrow_wrap_data_type(self.stp.type())
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return f"""<pyarrow.SparseCSFTensor>
 * type: {self.type}
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSFTensor_3__repr__(PyObject *__pyx_v_self); /*proto*/
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSFTensor_3__repr__(PyObject *__pyx_v_self) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_15SparseCSFTensor_2__repr__(((struct __pyx_obj_7pyarrow_3lib_SparseCSFTensor *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSFTensor_2__repr__(struct __pyx_obj_7pyarrow_3lib_SparseCSFTensor *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      PyObject *__pyx_t_3 = NULL;
                      PyObject *__pyx_t_4[4];
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__repr__", 0);

                      /* "pyarrow/tensor.pxi":1158
 * 
 *     def __repr__(self):
 *         return f"""<pyarrow.SparseCSFTensor>             # <<<<<<<<<<<<<<
 * type: {self.type}
 * shape: {self.shape}"""
*/
                      __Pyx_XDECREF(__pyx_r);

                      /* "pyarrow/tensor.pxi":1159
 *     def __repr__(self):
 *         return f"""<pyarrow.SparseCSFTensor>
 * type: {self.type}             # <<<<<<<<<<<<<<
 * shape: {self.shape}"""
 * 
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "type");
                        __PYX_ERR(5, 1159, __pyx_L1_error)
                      }
                      __pyx_t_1 = __Pyx_PyObject_FormatSimple(((PyObject *)__pyx_v_self->type), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 1159, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);

                      /* "pyarrow/tensor.pxi":1160
 *         return f"""<pyarrow.SparseCSFTensor>
 * type: {self.type}
 * shape: {self.shape}"""             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
*/
                      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_shape); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1160, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_2);
                      __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_t_2, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 1160, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_3);
                      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                      __pyx_t_4[0] = __pyx_mstate_global->__pyx_kp_u_pyarrow_SparseCSFTensor_type;
                      __pyx_t_4[1] = __pyx_t_1;
                      __pyx_t_4[2] = __pyx_mstate_global->__pyx_kp_u_shape_2;
                      __pyx_t_4[3] = __pyx_t_3;

                      /* "pyarrow/tensor.pxi":1158
 * 
 *     def __repr__(self):
 *         return f"""<pyarrow.SparseCSFTensor>             # <<<<<<<<<<<<<<
 * type: {self.type}
 * shape: {self.shape}"""
*/
                      __pyx_t_2 = __Pyx_PyUnicode_Join(__pyx_t_4, 4, 32 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1) + 8 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3));
                      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1158, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_2);
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                      __pyx_r = __pyx_t_2;
                      __pyx_t_2 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/tensor.pxi":1157
 *         self.type = pyarrow_wrap_data_type(self.stp.type())
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return f"""<pyarrow.SparseCSFTensor>
 * type: {self.type}
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_AddTraceback("pyarrow.lib.SparseCSFTensor.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/tensor.pxi":1162
 * shape: {self.shape}"""
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def from_dense_numpy(cls, obj, dim_names=None):
 *         """
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSFTensor_5from_dense_numpy(PyObject *__pyx_v_cls, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_15SparseCSFTensor_4from_dense_numpy, "SparseCSFTensor.from_dense_numpy(cls, obj, dim_names=None)\n\nConvert numpy.ndarray to arrow::SparseCSFTensor\n\nParameters\n----------\nobj : numpy.ndarray\n    Data used to populate the rows.\ndim_names : list[str], optional\n    Names of the dimensions.\n\nReturns\n-------\npyarrow.SparseCSFTensor");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_15SparseCSFTensor_5from_dense_numpy = {"from_dense_numpy", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15SparseCSFTensor_5from_dense_numpy, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15SparseCSFTensor_4from_dense_numpy};
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSFTensor_5from_dense_numpy(PyObject *__pyx_v_cls, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      PyObject *__pyx_v_obj = 0;
                      PyObject *__pyx_v_dim_names = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[2] = {0,0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("from_dense_numpy (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_obj,&__pyx_mstate_global->__pyx_n_u_dim_names,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(5, 1162, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  2:
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(5, 1162, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(5, 1162, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "from_dense_numpy", 0) < (0)) __PYX_ERR(5, 1162, __pyx_L3_error)

                          /* "pyarrow/tensor.pxi":1163
 * 
 *     @classmethod
 *     def from_dense_numpy(cls, obj, dim_names=None):             # <<<<<<<<<<<<<<
 *         """
 *         Convert numpy.ndarray to arrow::SparseCSFTensor
*/
                          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("from_dense_numpy", 0, 1, 2, i); __PYX_ERR(5, 1162, __pyx_L3_error) }
                          }
                        } else {
                          switch (__pyx_nargs) {
                            case  2:
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(5, 1162, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(5, 1162, __pyx_L3_error)
                            break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
                        }
                        __pyx_v_obj = values[0];
                        __pyx_v_dim_names = values[1];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("from_dense_numpy", 0, 1, 2, __pyx_nargs); __PYX_ERR(5, 1162, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.SparseCSFTensor.from_dense_numpy", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_15SparseCSFTensor_4from_dense_numpy(((PyTypeObject*)__pyx_v_cls), __pyx_v_obj, __pyx_v_dim_names);

                      /* "pyarrow/tensor.pxi":1162
 * shape: {self.shape}"""
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def from_dense_numpy(cls, obj, dim_names=None):
 *         """
*/

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSFTensor_4from_dense_numpy(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_obj, PyObject *__pyx_v_dim_names) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      PyObject *__pyx_t_3 = NULL;
                      PyObject *__pyx_t_4 = NULL;
                      size_t __pyx_t_5;
                      PyObject *__pyx_t_6 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("from_dense_numpy", 0);

                      /* "pyarrow/tensor.pxi":1178
 *         pyarrow.SparseCSFTensor
 *         """
 *         return cls.from_tensor(Tensor.from_numpy(obj, dim_names=dim_names))             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
*/
                      __Pyx_XDECREF(__pyx_r);
                      __pyx_t_2 = ((PyObject *)__pyx_v_cls);
                      __Pyx_INCREF(__pyx_t_2);
                      __pyx_t_4 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Tensor);
                      __Pyx_INCREF(__pyx_t_4);
                      __pyx_t_5 = 0;
                      {
                        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_4, __pyx_v_obj};
                        __pyx_t_6 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 1178, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_6);
                        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_dim_names, __pyx_v_dim_names, __pyx_t_6, __pyx_callargs+2, 0) < (0)) __PYX_ERR(5, 1178, __pyx_L1_error)
                        __pyx_t_3 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_from_numpy, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_6);
                        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                        if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 1178, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_3);
                      }
                      __pyx_t_5 = 0;
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
                        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_from_tensor, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 1178, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __pyx_r = __pyx_t_1;
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/tensor.pxi":1162
 * shape: {self.shape}"""
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def from_dense_numpy(cls, obj, dim_names=None):
 *         """
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_XDECREF(__pyx_t_4);
                      __Pyx_XDECREF(__pyx_t_6);
                      __Pyx_AddTraceback("pyarrow.lib.SparseCSFTensor.from_dense_numpy", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/tensor.pxi":1180
 *         return cls.from_tensor(Tensor.from_numpy(obj, dim_names=dim_names))
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_numpy(data, indptr, indices, shape, axis_order=None,
 *                    dim_names=None):
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSFTensor_7from_numpy(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_15SparseCSFTensor_6from_numpy, "SparseCSFTensor.from_numpy(data, indptr, indices, shape, axis_order=None, dim_names=None)\n\nCreate arrow::SparseCSFTensor from numpy.ndarrays\n\nParameters\n----------\ndata : numpy.ndarray\n    Data used to populate the sparse tensor.\nindptr : numpy.ndarray\n    The sparsity structure.\n    Each two consecutive dimensions in a tensor correspond to\n    a buffer in indices.\n    A pair of consecutive values at `indptr[dim][i]`\n    `indptr[dim][i + 1]` signify a range of nodes in\n    `indices[dim + 1]` who are children of `indices[dim][i]` node.\nindices : numpy.ndarray\n    Stores values of nodes.\n    Each tensor dimension corresponds to a buffer in indptr.\nshape : tuple\n    Shape of the matrix.\naxis_order : list, optional\n    the sequence in which dimensions were traversed to\n    produce the prefix tree.\ndim_names : list, optional\n    Names of the dimensions.");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_15SparseCSFTensor_7from_numpy = {"from_numpy", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15SparseCSFTensor_7from_numpy, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15SparseCSFTensor_6from_numpy};
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSFTensor_7from_numpy(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      PyObject *__pyx_v_data = 0;
                      PyObject *__pyx_v_indptr = 0;
                      PyObject *__pyx_v_indices = 0;
                      PyObject *__pyx_v_shape = 0;
                      PyObject *__pyx_v_axis_order = 0;
                      PyObject *__pyx_v_dim_names = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[6] = {0,0,0,0,0,0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("from_numpy (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_data,&__pyx_mstate_global->__pyx_n_u_indptr,&__pyx_mstate_global->__pyx_n_u_indices,&__pyx_mstate_global->__pyx_n_u_shape,&__pyx_mstate_global->__pyx_n_u_axis_order,&__pyx_mstate_global->__pyx_n_u_dim_names,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(5, 1180, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  6:
                            values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(5, 1180, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  5:
                            values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(5, 1180, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  4:
                            values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(5, 1180, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  3:
                            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(5, 1180, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  2:
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(5, 1180, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(5, 1180, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "from_numpy", 0) < (0)) __PYX_ERR(5, 1180, __pyx_L3_error)

                          /* "pyarrow/tensor.pxi":1181
 * 
 *     @staticmethod
 *     def from_numpy(data, indptr, indices, shape, axis_order=None,             # <<<<<<<<<<<<<<
 *                    dim_names=None):
 *         """
*/
                          if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)Py_None));

                          /* "pyarrow/tensor.pxi":1182
 *     @staticmethod
 *     def from_numpy(data, indptr, indices, shape, axis_order=None,
 *                    dim_names=None):             # <<<<<<<<<<<<<<
 *         """
 *         Create arrow::SparseCSFTensor from numpy.ndarrays
*/
                          if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)Py_None));
                          for (Py_ssize_t i = __pyx_nargs; i < 4; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("from_numpy", 0, 4, 6, i); __PYX_ERR(5, 1180, __pyx_L3_error) }
                          }
                        } else {
                          switch (__pyx_nargs) {
                            case  6:
                            values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(5, 1180, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  5:
                            values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(5, 1180, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  4:
                            values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(5, 1180, __pyx_L3_error)
                            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(5, 1180, __pyx_L3_error)
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(5, 1180, __pyx_L3_error)
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(5, 1180, __pyx_L3_error)
                            break;
                            default: goto __pyx_L5_argtuple_error;
                          }

                          /* "pyarrow/tensor.pxi":1181
 * 
 *     @staticmethod
 *     def from_numpy(data, indptr, indices, shape, axis_order=None,             # <<<<<<<<<<<<<<
 *                    dim_names=None):
 *         """
*/
                          if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)Py_None));

                          /* "pyarrow/tensor.pxi":1182
 *     @staticmethod
 *     def from_numpy(data, indptr, indices, shape, axis_order=None,
 *                    dim_names=None):             # <<<<<<<<<<<<<<
 *         """
 *         Create arrow::SparseCSFTensor from numpy.ndarrays
*/
                          if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)Py_None));
                        }
                        __pyx_v_data = values[0];
                        __pyx_v_indptr = values[1];
                        __pyx_v_indices = values[2];
                        __pyx_v_shape = values[3];
                        __pyx_v_axis_order = values[4];
                        __pyx_v_dim_names = values[5];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("from_numpy", 0, 4, 6, __pyx_nargs); __PYX_ERR(5, 1180, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.SparseCSFTensor.from_numpy", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_15SparseCSFTensor_6from_numpy(__pyx_v_data, __pyx_v_indptr, __pyx_v_indices, __pyx_v_shape, __pyx_v_axis_order, __pyx_v_dim_names);

                      /* "pyarrow/tensor.pxi":1180
 *         return cls.from_tensor(Tensor.from_numpy(obj, dim_names=dim_names))
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_numpy(data, indptr, indices, shape, axis_order=None,
 *                    dim_names=None):
*/

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSFTensor_6from_numpy(PyObject *__pyx_v_data, PyObject *__pyx_v_indptr, PyObject *__pyx_v_indices, PyObject *__pyx_v_shape, PyObject *__pyx_v_axis_order, PyObject *__pyx_v_dim_names) {
                      std::shared_ptr< arrow::SparseCSFTensor>  __pyx_v_csparse_tensor;
                      std::vector<int64_t>  __pyx_v_c_axis_order;
                      std::vector<int64_t>  __pyx_v_c_shape;
                      std::vector<std::string>  __pyx_v_c_dim_names;
                      PyObject *__pyx_v_x = NULL;
                      PyObject *__pyx_9genexpr40__pyx_v_x = NULL;
                      PyObject *__pyx_9genexpr41__pyx_v_x = NULL;
                      PyObject *__pyx_9genexpr42__pyx_v_arr = NULL;
                      PyObject *__pyx_9genexpr43__pyx_v_arr = NULL;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      Py_ssize_t __pyx_t_2;
                      PyObject *(*__pyx_t_3)(PyObject *);
                      PyObject *__pyx_t_4 = NULL;
                      int64_t __pyx_t_5;
                      int __pyx_t_6;
                      int __pyx_t_7;
                      PyObject *__pyx_t_8 = NULL;
                      PyObject *__pyx_t_9 = NULL;
                      size_t __pyx_t_10;
                      std::string __pyx_t_11;
                      int __pyx_t_12;
                      PyObject *__pyx_t_13[4];
                      PyObject *__pyx_t_14 = NULL;
                      Py_ssize_t __pyx_t_15;
                      PyObject *__pyx_t_16[3];
                      PyObject *__pyx_t_17 = NULL;
                      int __pyx_t_18;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("from_numpy", 0);
                      __Pyx_INCREF(__pyx_v_indptr);
                      __Pyx_INCREF(__pyx_v_indices);
                      __Pyx_INCREF(__pyx_v_axis_order);

                      /* "pyarrow/tensor.pxi":1213
 *         cdef vector[c_string] c_dim_names
 * 
 *         for x in shape:             # <<<<<<<<<<<<<<
 *             c_shape.push_back(x)
 *         if not axis_order:
*/
                      if (likely(PyList_CheckExact(__pyx_v_shape)) || PyTuple_CheckExact(__pyx_v_shape)) {
                        __pyx_t_1 = __pyx_v_shape; __Pyx_INCREF(__pyx_t_1);
                        __pyx_t_2 = 0;
                        __pyx_t_3 = NULL;
                      } else {
                        __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 1213, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                        __pyx_t_3 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 1213, __pyx_L1_error)
                      }
                      for (;;) {
                        if (likely(!__pyx_t_3)) {
                          if (likely(PyList_CheckExact(__pyx_t_1))) {
                            {
                              Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
                              #if !CYTHON_ASSUME_SAFE_SIZE
                              if (unlikely((__pyx_temp < 0))) __PYX_ERR(5, 1213, __pyx_L1_error)
                              #endif
                              if (__pyx_t_2 >= __pyx_temp) break;
                            }
                            __pyx_t_4 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_2, __Pyx_ReferenceSharing_OwnStrongReference);
                            ++__pyx_t_2;
                          } else {
                            {
                              Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
                              #if !CYTHON_ASSUME_SAFE_SIZE
                              if (unlikely((__pyx_temp < 0))) __PYX_ERR(5, 1213, __pyx_L1_error)
                              #endif
                              if (__pyx_t_2 >= __pyx_temp) break;
                            }
                            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                            __pyx_t_4 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2));
                            #else
                            __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2);
                            #endif
                            ++__pyx_t_2;
                          }
                          if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1213, __pyx_L1_error)
                        } else {
                          __pyx_t_4 = __pyx_t_3(__pyx_t_1);
                          if (unlikely(!__pyx_t_4)) {
                            PyObject* exc_type = PyErr_Occurred();
                            if (exc_type) {
                              if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(5, 1213, __pyx_L1_error)
                              PyErr_Clear();
                            }
                            break;
                          }
                        }
                        __Pyx_GOTREF(__pyx_t_4);
                        __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_4);
                        __pyx_t_4 = 0;

                        /* "pyarrow/tensor.pxi":1214
 * 
 *         for x in shape:
 *             c_shape.push_back(x)             # <<<<<<<<<<<<<<
 *         if not axis_order:
 *             axis_order = np.argsort(shape)
*/
                        __pyx_t_5 = __Pyx_PyLong_As_int64_t(__pyx_v_x); if (unlikely((__pyx_t_5 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(5, 1214, __pyx_L1_error)
                        try {
                          __pyx_v_c_shape.push_back(__pyx_t_5);
                        } catch(...) {
                          __Pyx_CppExn2PyErr();
                          __PYX_ERR(5, 1214, __pyx_L1_error)
                        }

                        /* "pyarrow/tensor.pxi":1213
 *         cdef vector[c_string] c_dim_names
 * 
 *         for x in shape:             # <<<<<<<<<<<<<<
 *             c_shape.push_back(x)
 *         if not axis_order:
*/
                      }
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

                      /* "pyarrow/tensor.pxi":1215
 *         for x in shape:
 *             c_shape.push_back(x)
 *         if not axis_order:             # <<<<<<<<<<<<<<
 *             axis_order = np.argsort(shape)
 *         for x in axis_order:
*/
                      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_axis_order); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(5, 1215, __pyx_L1_error)
                      __pyx_t_7 = (!__pyx_t_6);
                      if (__pyx_t_7) {

                        /* "pyarrow/tensor.pxi":1216
 *             c_shape.push_back(x)
 *         if not axis_order:
 *             axis_order = np.argsort(shape)             # <<<<<<<<<<<<<<
 *         for x in axis_order:
 *             c_axis_order.push_back(x)
*/
                        __pyx_t_4 = NULL;
                        __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 1216, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_8);
                        __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_argsort); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 1216, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_9);
                        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                        __pyx_t_10 = 1;
                        #if CYTHON_UNPACK_METHODS
                        if (unlikely(PyMethod_Check(__pyx_t_9))) {
                          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_9);
                          assert(__pyx_t_4);
                          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_9);
                          __Pyx_INCREF(__pyx_t_4);
                          __Pyx_INCREF(__pyx__function);
                          __Pyx_DECREF_SET(__pyx_t_9, __pyx__function);
                          __pyx_t_10 = 0;
                        }
                        #endif
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_shape};
                          __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
                          if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 1216, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_1);
                        }
                        __Pyx_DECREF_SET(__pyx_v_axis_order, __pyx_t_1);
                        __pyx_t_1 = 0;

                        /* "pyarrow/tensor.pxi":1215
 *         for x in shape:
 *             c_shape.push_back(x)
 *         if not axis_order:             # <<<<<<<<<<<<<<
 *             axis_order = np.argsort(shape)
 *         for x in axis_order:
*/
                      }

                      /* "pyarrow/tensor.pxi":1217
 *         if not axis_order:
 *             axis_order = np.argsort(shape)
 *         for x in axis_order:             # <<<<<<<<<<<<<<
 *             c_axis_order.push_back(x)
 *         if dim_names is not None:
*/
                      if (likely(PyList_CheckExact(__pyx_v_axis_order)) || PyTuple_CheckExact(__pyx_v_axis_order)) {
                        __pyx_t_1 = __pyx_v_axis_order; __Pyx_INCREF(__pyx_t_1);
                        __pyx_t_2 = 0;
                        __pyx_t_3 = NULL;
                      } else {
                        __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_axis_order); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 1217, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                        __pyx_t_3 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 1217, __pyx_L1_error)
                      }
                      for (;;) {
                        if (likely(!__pyx_t_3)) {
                          if (likely(PyList_CheckExact(__pyx_t_1))) {
                            {
                              Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
                              #if !CYTHON_ASSUME_SAFE_SIZE
                              if (unlikely((__pyx_temp < 0))) __PYX_ERR(5, 1217, __pyx_L1_error)
                              #endif
                              if (__pyx_t_2 >= __pyx_temp) break;
                            }
                            __pyx_t_9 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_2, __Pyx_ReferenceSharing_OwnStrongReference);
                            ++__pyx_t_2;
                          } else {
                            {
                              Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
                              #if !CYTHON_ASSUME_SAFE_SIZE
                              if (unlikely((__pyx_temp < 0))) __PYX_ERR(5, 1217, __pyx_L1_error)
                              #endif
                              if (__pyx_t_2 >= __pyx_temp) break;
                            }
                            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                            __pyx_t_9 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2));
                            #else
                            __pyx_t_9 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2);
                            #endif
                            ++__pyx_t_2;
                          }
                          if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 1217, __pyx_L1_error)
                        } else {
                          __pyx_t_9 = __pyx_t_3(__pyx_t_1);
                          if (unlikely(!__pyx_t_9)) {
                            PyObject* exc_type = PyErr_Occurred();
                            if (exc_type) {
                              if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(5, 1217, __pyx_L1_error)
                              PyErr_Clear();
                            }
                            break;
                          }
                        }
                        __Pyx_GOTREF(__pyx_t_9);
                        __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_9);
                        __pyx_t_9 = 0;

                        /* "pyarrow/tensor.pxi":1218
 *             axis_order = np.argsort(shape)
 *         for x in axis_order:
 *             c_axis_order.push_back(x)             # <<<<<<<<<<<<<<
 *         if dim_names is not None:
 *             for x in dim_names:
*/
                        __pyx_t_5 = __Pyx_PyLong_As_int64_t(__pyx_v_x); if (unlikely((__pyx_t_5 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(5, 1218, __pyx_L1_error)
                        try {
                          __pyx_v_c_axis_order.push_back(__pyx_t_5);
                        } catch(...) {
                          __Pyx_CppExn2PyErr();
                          __PYX_ERR(5, 1218, __pyx_L1_error)
                        }

                        /* "pyarrow/tensor.pxi":1217
 *         if not axis_order:
 *             axis_order = np.argsort(shape)
 *         for x in axis_order:             # <<<<<<<<<<<<<<
 *             c_axis_order.push_back(x)
 *         if dim_names is not None:
*/
                      }
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

                      /* "pyarrow/tensor.pxi":1219
 *         for x in axis_order:
 *             c_axis_order.push_back(x)
 *         if dim_names is not None:             # <<<<<<<<<<<<<<
 *             for x in dim_names:
 *                 c_dim_names.push_back(tobytes(x))
*/
                      __pyx_t_7 = (__pyx_v_dim_names != Py_None);
                      if (__pyx_t_7) {

                        /* "pyarrow/tensor.pxi":1220
 *             c_axis_order.push_back(x)
 *         if dim_names is not None:
 *             for x in dim_names:             # <<<<<<<<<<<<<<
 *                 c_dim_names.push_back(tobytes(x))
 * 
*/
                        if (likely(PyList_CheckExact(__pyx_v_dim_names)) || PyTuple_CheckExact(__pyx_v_dim_names)) {
                          __pyx_t_1 = __pyx_v_dim_names; __Pyx_INCREF(__pyx_t_1);
                          __pyx_t_2 = 0;
                          __pyx_t_3 = NULL;
                        } else {
                          __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_dim_names); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 1220, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_1);
                          __pyx_t_3 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 1220, __pyx_L1_error)
                        }
                        for (;;) {
                          if (likely(!__pyx_t_3)) {
                            if (likely(PyList_CheckExact(__pyx_t_1))) {
                              {
                                Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
                                #if !CYTHON_ASSUME_SAFE_SIZE
                                if (unlikely((__pyx_temp < 0))) __PYX_ERR(5, 1220, __pyx_L1_error)
                                #endif
                                if (__pyx_t_2 >= __pyx_temp) break;
                              }
                              __pyx_t_9 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_2, __Pyx_ReferenceSharing_OwnStrongReference);
                              ++__pyx_t_2;
                            } else {
                              {
                                Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
                                #if !CYTHON_ASSUME_SAFE_SIZE
                                if (unlikely((__pyx_temp < 0))) __PYX_ERR(5, 1220, __pyx_L1_error)
                                #endif
                                if (__pyx_t_2 >= __pyx_temp) break;
                              }
                              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                              __pyx_t_9 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2));
                              #else
                              __pyx_t_9 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2);
                              #endif
                              ++__pyx_t_2;
                            }
                            if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 1220, __pyx_L1_error)
                          } else {
                            __pyx_t_9 = __pyx_t_3(__pyx_t_1);
                            if (unlikely(!__pyx_t_9)) {
                              PyObject* exc_type = PyErr_Occurred();
                              if (exc_type) {
                                if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(5, 1220, __pyx_L1_error)
                                PyErr_Clear();
                              }
                              break;
                            }
                          }
                          __Pyx_GOTREF(__pyx_t_9);
                          __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_9);
                          __pyx_t_9 = 0;

                          /* "pyarrow/tensor.pxi":1221
 *         if dim_names is not None:
 *             for x in dim_names:
 *                 c_dim_names.push_back(tobytes(x))             # <<<<<<<<<<<<<<
 * 
 *         # Enforce preconditions for SparseCSFTensor indices
*/
                          __pyx_t_4 = NULL;
                          __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_tobytes); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 1221, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_8);
                          __pyx_t_10 = 1;
                          #if CYTHON_UNPACK_METHODS
                          if (unlikely(PyMethod_Check(__pyx_t_8))) {
                            __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_8);
                            assert(__pyx_t_4);
                            PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8);
                            __Pyx_INCREF(__pyx_t_4);
                            __Pyx_INCREF(__pyx__function);
                            __Pyx_DECREF_SET(__pyx_t_8, __pyx__function);
                            __pyx_t_10 = 0;
                          }
                          #endif
                          {
                            PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_x};
                            __pyx_t_9 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                            if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 1221, __pyx_L1_error)
                            __Pyx_GOTREF(__pyx_t_9);
                          }
                          __pyx_t_11 = __pyx_convert_string_from_py_6libcpp_6string_std__in_string(__pyx_t_9); if (unlikely(PyErr_Occurred())) __PYX_ERR(5, 1221, __pyx_L1_error)
                          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
                          try {
                            __pyx_v_c_dim_names.push_back(__pyx_t_11);
                          } catch(...) {
                            __Pyx_CppExn2PyErr();
                            __PYX_ERR(5, 1221, __pyx_L1_error)
                          }

                          /* "pyarrow/tensor.pxi":1220
 *             c_axis_order.push_back(x)
 *         if dim_names is not None:
 *             for x in dim_names:             # <<<<<<<<<<<<<<
 *                 c_dim_names.push_back(tobytes(x))
 * 
*/
                        }
                        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

                        /* "pyarrow/tensor.pxi":1219
 *         for x in axis_order:
 *             c_axis_order.push_back(x)
 *         if dim_names is not None:             # <<<<<<<<<<<<<<
 *             for x in dim_names:
 *                 c_dim_names.push_back(tobytes(x))
*/
                      }

                      /* "pyarrow/tensor.pxi":1224
 * 
 *         # Enforce preconditions for SparseCSFTensor indices
 *         if not (isinstance(indptr, (list, tuple)) and             # <<<<<<<<<<<<<<
 *                 isinstance(indices, (list, tuple))):
 *             raise TypeError(
*/
                      __pyx_t_12 = PyList_Check(__pyx_v_indptr); 
                      if (!__pyx_t_12) {
                      } else {
                        __pyx_t_6 = __pyx_t_12;
                        goto __pyx_L17_bool_binop_done;
                      }
                      __pyx_t_12 = PyTuple_Check(__pyx_v_indptr); 
                      __pyx_t_6 = __pyx_t_12;
                      __pyx_L17_bool_binop_done:;
                      if (__pyx_t_6) {
                      } else {
                        __pyx_t_7 = __pyx_t_6;
                        goto __pyx_L15_bool_binop_done;
                      }

                      /* "pyarrow/tensor.pxi":1225
 *         # Enforce preconditions for SparseCSFTensor indices
 *         if not (isinstance(indptr, (list, tuple)) and
 *                 isinstance(indices, (list, tuple))):             # <<<<<<<<<<<<<<
 *             raise TypeError(
 *                 f"Expected list or tuple, got {type(indptr)}, {type(indices)}")
*/
                      __pyx_t_12 = PyList_Check(__pyx_v_indices); 
                      if (!__pyx_t_12) {
                      } else {
                        __pyx_t_6 = __pyx_t_12;
                        goto __pyx_L19_bool_binop_done;
                      }
                      __pyx_t_12 = PyTuple_Check(__pyx_v_indices); 
                      __pyx_t_6 = __pyx_t_12;
                      __pyx_L19_bool_binop_done:;
                      __pyx_t_7 = __pyx_t_6;
                      __pyx_L15_bool_binop_done:;

                      /* "pyarrow/tensor.pxi":1224
 * 
 *         # Enforce preconditions for SparseCSFTensor indices
 *         if not (isinstance(indptr, (list, tuple)) and             # <<<<<<<<<<<<<<
 *                 isinstance(indices, (list, tuple))):
 *             raise TypeError(
*/
                      __pyx_t_6 = (!__pyx_t_7);
                      if (unlikely(__pyx_t_6)) {

                        /* "pyarrow/tensor.pxi":1226
 *         if not (isinstance(indptr, (list, tuple)) and
 *                 isinstance(indices, (list, tuple))):
 *             raise TypeError(             # <<<<<<<<<<<<<<
 *                 f"Expected list or tuple, got {type(indptr)}, {type(indices)}")
 *         if len(indptr) != len(shape) - 1:
*/
                        __pyx_t_9 = NULL;

                        /* "pyarrow/tensor.pxi":1227
 *                 isinstance(indices, (list, tuple))):
 *             raise TypeError(
 *                 f"Expected list or tuple, got {type(indptr)}, {type(indices)}")             # <<<<<<<<<<<<<<
 *         if len(indptr) != len(shape) - 1:
 *             raise ValueError(f"Expected list of {len(shape)} np.arrays for "
*/
                        __pyx_t_8 = __Pyx_PyObject_FormatSimple(((PyObject *)Py_TYPE(__pyx_v_indptr)), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 1227, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_8);
                        __pyx_t_4 = __Pyx_PyObject_FormatSimple(((PyObject *)Py_TYPE(__pyx_v_indices)), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1227, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_4);
                        __pyx_t_13[0] = __pyx_mstate_global->__pyx_kp_u_Expected_list_or_tuple_got;
                        __pyx_t_13[1] = __pyx_t_8;
                        __pyx_t_13[2] = __pyx_mstate_global->__pyx_kp_u__18;
                        __pyx_t_13[3] = __pyx_t_4;
                        __pyx_t_14 = __Pyx_PyUnicode_Join(__pyx_t_13, 4, 28 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8) + 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4));
                        if (unlikely(!__pyx_t_14)) __PYX_ERR(5, 1227, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_14);
                        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                        __pyx_t_10 = 1;
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_14};
                          __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
                          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
                          if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 1226, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_1);
                        }
                        __Pyx_Raise(__pyx_t_1, 0, 0, 0);
                        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                        __PYX_ERR(5, 1226, __pyx_L1_error)

                        /* "pyarrow/tensor.pxi":1224
 * 
 *         # Enforce preconditions for SparseCSFTensor indices
 *         if not (isinstance(indptr, (list, tuple)) and             # <<<<<<<<<<<<<<
 *                 isinstance(indices, (list, tuple))):
 *             raise TypeError(
*/
                      }

                      /* "pyarrow/tensor.pxi":1228
 *             raise TypeError(
 *                 f"Expected list or tuple, got {type(indptr)}, {type(indices)}")
 *         if len(indptr) != len(shape) - 1:             # <<<<<<<<<<<<<<
 *             raise ValueError(f"Expected list of {len(shape)} np.arrays for "
 *                              "SparseCSFTensor.indptr")
*/
                      __pyx_t_2 = PyObject_Length(__pyx_v_indptr); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(5, 1228, __pyx_L1_error)
                      __pyx_t_15 = PyObject_Length(__pyx_v_shape); if (unlikely(__pyx_t_15 == ((Py_ssize_t)-1))) __PYX_ERR(5, 1228, __pyx_L1_error)
                      __pyx_t_6 = (__pyx_t_2 != (__pyx_t_15 - 1));
                      if (unlikely(__pyx_t_6)) {

                        /* "pyarrow/tensor.pxi":1229
 *                 f"Expected list or tuple, got {type(indptr)}, {type(indices)}")
 *         if len(indptr) != len(shape) - 1:
 *             raise ValueError(f"Expected list of {len(shape)} np.arrays for "             # <<<<<<<<<<<<<<
 *                              "SparseCSFTensor.indptr")
 *         if len(indices) != len(shape):
*/
                        __pyx_t_14 = NULL;
                        __pyx_t_15 = PyObject_Length(__pyx_v_shape); if (unlikely(__pyx_t_15 == ((Py_ssize_t)-1))) __PYX_ERR(5, 1229, __pyx_L1_error)
                        __pyx_t_9 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_t_15, 0, ' ', 'd'); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 1229, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_9);
                        __pyx_t_16[0] = __pyx_mstate_global->__pyx_kp_u_Expected_list_of;
                        __pyx_t_16[1] = __pyx_t_9;
                        __pyx_t_16[2] = __pyx_mstate_global->__pyx_kp_u_np_arrays_for_SparseCSFTensor_i;
                        __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_16, 3, 17 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9) + 37, 127);
                        if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1229, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_4);
                        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
                        __pyx_t_10 = 1;
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_14, __pyx_t_4};
                          __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
                          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                          if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 1229, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_1);
                        }
                        __Pyx_Raise(__pyx_t_1, 0, 0, 0);
                        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                        __PYX_ERR(5, 1229, __pyx_L1_error)

                        /* "pyarrow/tensor.pxi":1228
 *             raise TypeError(
 *                 f"Expected list or tuple, got {type(indptr)}, {type(indices)}")
 *         if len(indptr) != len(shape) - 1:             # <<<<<<<<<<<<<<
 *             raise ValueError(f"Expected list of {len(shape)} np.arrays for "
 *                              "SparseCSFTensor.indptr")
*/
                      }

                      /* "pyarrow/tensor.pxi":1231
 *             raise ValueError(f"Expected list of {len(shape)} np.arrays for "
 *                              "SparseCSFTensor.indptr")
 *         if len(indices) != len(shape):             # <<<<<<<<<<<<<<
 *             raise ValueError(f"Expected list of {len(shape)} np.arrays for "
 *                              "SparseCSFTensor.indices")
*/
                      __pyx_t_15 = PyObject_Length(__pyx_v_indices); if (unlikely(__pyx_t_15 == ((Py_ssize_t)-1))) __PYX_ERR(5, 1231, __pyx_L1_error)
                      __pyx_t_2 = PyObject_Length(__pyx_v_shape); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(5, 1231, __pyx_L1_error)
                      __pyx_t_6 = (__pyx_t_15 != __pyx_t_2);
                      if (unlikely(__pyx_t_6)) {

                        /* "pyarrow/tensor.pxi":1232
 *                              "SparseCSFTensor.indptr")
 *         if len(indices) != len(shape):
 *             raise ValueError(f"Expected list of {len(shape)} np.arrays for "             # <<<<<<<<<<<<<<
 *                              "SparseCSFTensor.indices")
 *         if any([x.ndim != 1 for x in indptr]):
*/
                        __pyx_t_4 = NULL;
                        __pyx_t_2 = PyObject_Length(__pyx_v_shape); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(5, 1232, __pyx_L1_error)
                        __pyx_t_14 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_t_2, 0, ' ', 'd'); if (unlikely(!__pyx_t_14)) __PYX_ERR(5, 1232, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_14);
                        __pyx_t_16[0] = __pyx_mstate_global->__pyx_kp_u_Expected_list_of;
                        __pyx_t_16[1] = __pyx_t_14;
                        __pyx_t_16[2] = __pyx_mstate_global->__pyx_kp_u_np_arrays_for_SparseCSFTensor_i_2;
                        __pyx_t_9 = __Pyx_PyUnicode_Join(__pyx_t_16, 3, 17 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_14) + 38, 127);
                        if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 1232, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_9);
                        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
                        __pyx_t_10 = 1;
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_9};
                          __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
                          if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 1232, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_1);
                        }
                        __Pyx_Raise(__pyx_t_1, 0, 0, 0);
                        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                        __PYX_ERR(5, 1232, __pyx_L1_error)

                        /* "pyarrow/tensor.pxi":1231
 *             raise ValueError(f"Expected list of {len(shape)} np.arrays for "
 *                              "SparseCSFTensor.indptr")
 *         if len(indices) != len(shape):             # <<<<<<<<<<<<<<
 *             raise ValueError(f"Expected list of {len(shape)} np.arrays for "
 *                              "SparseCSFTensor.indices")
*/
                      }

                      /* "pyarrow/tensor.pxi":1234
 *             raise ValueError(f"Expected list of {len(shape)} np.arrays for "
 *                              "SparseCSFTensor.indices")
 *         if any([x.ndim != 1 for x in indptr]):             # <<<<<<<<<<<<<<
 *             raise ValueError("Expected a list of 1-dimensional arrays for "
 *                              "SparseCSFTensor.indptr")
*/
                      __pyx_t_9 = NULL;
                      { /* enter inner scope */
                        __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1234, __pyx_L26_error)
                        __Pyx_GOTREF(__pyx_t_4);
                        if (likely(PyList_CheckExact(__pyx_v_indptr)) || PyTuple_CheckExact(__pyx_v_indptr)) {
                          __pyx_t_14 = __pyx_v_indptr; __Pyx_INCREF(__pyx_t_14);
                          __pyx_t_2 = 0;
                          __pyx_t_3 = NULL;
                        } else {
                          __pyx_t_2 = -1; __pyx_t_14 = PyObject_GetIter(__pyx_v_indptr); if (unlikely(!__pyx_t_14)) __PYX_ERR(5, 1234, __pyx_L26_error)
                          __Pyx_GOTREF(__pyx_t_14);
                          __pyx_t_3 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_14); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 1234, __pyx_L26_error)
                        }
                        for (;;) {
                          if (likely(!__pyx_t_3)) {
                            if (likely(PyList_CheckExact(__pyx_t_14))) {
                              {
                                Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_14);
                                #if !CYTHON_ASSUME_SAFE_SIZE
                                if (unlikely((__pyx_temp < 0))) __PYX_ERR(5, 1234, __pyx_L26_error)
                                #endif
                                if (__pyx_t_2 >= __pyx_temp) break;
                              }
                              __pyx_t_8 = __Pyx_PyList_GetItemRefFast(__pyx_t_14, __pyx_t_2, __Pyx_ReferenceSharing_OwnStrongReference);
                              ++__pyx_t_2;
                            } else {
                              {
                                Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_14);
                                #if !CYTHON_ASSUME_SAFE_SIZE
                                if (unlikely((__pyx_temp < 0))) __PYX_ERR(5, 1234, __pyx_L26_error)
                                #endif
                                if (__pyx_t_2 >= __pyx_temp) break;
                              }
                              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                              __pyx_t_8 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_14, __pyx_t_2));
                              #else
                              __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_14, __pyx_t_2);
                              #endif
                              ++__pyx_t_2;
                            }
                            if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 1234, __pyx_L26_error)
                          } else {
                            __pyx_t_8 = __pyx_t_3(__pyx_t_14);
                            if (unlikely(!__pyx_t_8)) {
                              PyObject* exc_type = PyErr_Occurred();
                              if (exc_type) {
                                if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(5, 1234, __pyx_L26_error)
                                PyErr_Clear();
                              }
                              break;
                            }
                          }
                          __Pyx_GOTREF(__pyx_t_8);
                          __Pyx_XDECREF_SET(__pyx_9genexpr40__pyx_v_x, __pyx_t_8);
                          __pyx_t_8 = 0;
                          __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_9genexpr40__pyx_v_x, __pyx_mstate_global->__pyx_n_u_ndim); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 1234, __pyx_L26_error)
                          __Pyx_GOTREF(__pyx_t_8);
                          __pyx_t_17 = __Pyx_PyLong_NeObjC(__pyx_t_8, __pyx_mstate_global->__pyx_int_1, 1, 0); if (unlikely(!__pyx_t_17)) __PYX_ERR(5, 1234, __pyx_L26_error)
                          __Pyx_GOTREF(__pyx_t_17);
                          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                          if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_17))) __PYX_ERR(5, 1234, __pyx_L26_error)
                          __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
                        }
                        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
                        __Pyx_XDECREF(__pyx_9genexpr40__pyx_v_x); __pyx_9genexpr40__pyx_v_x = 0;
                        goto __pyx_L30_exit_scope;
                        __pyx_L26_error:;
                        __Pyx_XDECREF(__pyx_9genexpr40__pyx_v_x); __pyx_9genexpr40__pyx_v_x = 0;
                        goto __pyx_L1_error;
                        __pyx_L30_exit_scope:;
                      } /* exit inner scope */
                      __pyx_t_10 = 1;
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_4};
                        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_any, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
                        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 1234, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(5, 1234, __pyx_L1_error)
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      if (unlikely(__pyx_t_6)) {

                        /* "pyarrow/tensor.pxi":1235
 *                              "SparseCSFTensor.indices")
 *         if any([x.ndim != 1 for x in indptr]):
 *             raise ValueError("Expected a list of 1-dimensional arrays for "             # <<<<<<<<<<<<<<
 *                              "SparseCSFTensor.indptr")
 *         if any([x.ndim != 1 for x in indices]):
*/
                        __pyx_t_4 = NULL;
                        __pyx_t_10 = 1;
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Expected_a_list_of_1_dimensional};
                          __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                          if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 1235, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_1);
                        }
                        __Pyx_Raise(__pyx_t_1, 0, 0, 0);
                        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                        __PYX_ERR(5, 1235, __pyx_L1_error)

                        /* "pyarrow/tensor.pxi":1234
 *             raise ValueError(f"Expected list of {len(shape)} np.arrays for "
 *                              "SparseCSFTensor.indices")
 *         if any([x.ndim != 1 for x in indptr]):             # <<<<<<<<<<<<<<
 *             raise ValueError("Expected a list of 1-dimensional arrays for "
 *                              "SparseCSFTensor.indptr")
*/
                      }

                      /* "pyarrow/tensor.pxi":1237
 *             raise ValueError("Expected a list of 1-dimensional arrays for "
 *                              "SparseCSFTensor.indptr")
 *         if any([x.ndim != 1 for x in indices]):             # <<<<<<<<<<<<<<
 *             raise ValueError("Expected a list of 1-dimensional arrays for "
 *                              "SparseCSFTensor.indices")
*/
                      __pyx_t_4 = NULL;
                      { /* enter inner scope */
                        __pyx_t_9 = PyList_New(0); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 1237, __pyx_L34_error)
                        __Pyx_GOTREF(__pyx_t_9);
                        if (likely(PyList_CheckExact(__pyx_v_indices)) || PyTuple_CheckExact(__pyx_v_indices)) {
                          __pyx_t_14 = __pyx_v_indices; __Pyx_INCREF(__pyx_t_14);
                          __pyx_t_2 = 0;
                          __pyx_t_3 = NULL;
                        } else {
                          __pyx_t_2 = -1; __pyx_t_14 = PyObject_GetIter(__pyx_v_indices); if (unlikely(!__pyx_t_14)) __PYX_ERR(5, 1237, __pyx_L34_error)
                          __Pyx_GOTREF(__pyx_t_14);
                          __pyx_t_3 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_14); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 1237, __pyx_L34_error)
                        }
                        for (;;) {
                          if (likely(!__pyx_t_3)) {
                            if (likely(PyList_CheckExact(__pyx_t_14))) {
                              {
                                Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_14);
                                #if !CYTHON_ASSUME_SAFE_SIZE
                                if (unlikely((__pyx_temp < 0))) __PYX_ERR(5, 1237, __pyx_L34_error)
                                #endif
                                if (__pyx_t_2 >= __pyx_temp) break;
                              }
                              __pyx_t_17 = __Pyx_PyList_GetItemRefFast(__pyx_t_14, __pyx_t_2, __Pyx_ReferenceSharing_OwnStrongReference);
                              ++__pyx_t_2;
                            } else {
                              {
                                Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_14);
                                #if !CYTHON_ASSUME_SAFE_SIZE
                                if (unlikely((__pyx_temp < 0))) __PYX_ERR(5, 1237, __pyx_L34_error)
                                #endif
                                if (__pyx_t_2 >= __pyx_temp) break;
                              }
                              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                              __pyx_t_17 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_14, __pyx_t_2));
                              #else
                              __pyx_t_17 = __Pyx_PySequence_ITEM(__pyx_t_14, __pyx_t_2);
                              #endif
                              ++__pyx_t_2;
                            }
                            if (unlikely(!__pyx_t_17)) __PYX_ERR(5, 1237, __pyx_L34_error)
                          } else {
                            __pyx_t_17 = __pyx_t_3(__pyx_t_14);
                            if (unlikely(!__pyx_t_17)) {
                              PyObject* exc_type = PyErr_Occurred();
                              if (exc_type) {
                                if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(5, 1237, __pyx_L34_error)
                                PyErr_Clear();
                              }
                              break;
                            }
                          }
                          __Pyx_GOTREF(__pyx_t_17);
                          __Pyx_XDECREF_SET(__pyx_9genexpr41__pyx_v_x, __pyx_t_17);
                          __pyx_t_17 = 0;
                          __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_9genexpr41__pyx_v_x, __pyx_mstate_global->__pyx_n_u_ndim); if (unlikely(!__pyx_t_17)) __PYX_ERR(5, 1237, __pyx_L34_error)
                          __Pyx_GOTREF(__pyx_t_17);
                          __pyx_t_8 = __Pyx_PyLong_NeObjC(__pyx_t_17, __pyx_mstate_global->__pyx_int_1, 1, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 1237, __pyx_L34_error)
                          __Pyx_GOTREF(__pyx_t_8);
                          __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
                          if (unlikely(__Pyx_ListComp_Append(__pyx_t_9, (PyObject*)__pyx_t_8))) __PYX_ERR(5, 1237, __pyx_L34_error)
                          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                        }
                        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
                        __Pyx_XDECREF(__pyx_9genexpr41__pyx_v_x); __pyx_9genexpr41__pyx_v_x = 0;
                        goto __pyx_L38_exit_scope;
                        __pyx_L34_error:;
                        __Pyx_XDECREF(__pyx_9genexpr41__pyx_v_x); __pyx_9genexpr41__pyx_v_x = 0;
                        goto __pyx_L1_error;
                        __pyx_L38_exit_scope:;
                      } /* exit inner scope */
                      __pyx_t_10 = 1;
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_9};
                        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_any, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 1237, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(5, 1237, __pyx_L1_error)
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      if (unlikely(__pyx_t_6)) {

                        /* "pyarrow/tensor.pxi":1238
 *                              "SparseCSFTensor.indptr")
 *         if any([x.ndim != 1 for x in indices]):
 *             raise ValueError("Expected a list of 1-dimensional arrays for "             # <<<<<<<<<<<<<<
 *                              "SparseCSFTensor.indices")
 *         indptr = [np.require(arr, dtype='i8') for arr in indptr]
*/
                        __pyx_t_9 = NULL;
                        __pyx_t_10 = 1;
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_mstate_global->__pyx_kp_u_Expected_a_list_of_1_dimensional_2};
                          __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
                          if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 1238, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_1);
                        }
                        __Pyx_Raise(__pyx_t_1, 0, 0, 0);
                        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                        __PYX_ERR(5, 1238, __pyx_L1_error)

                        /* "pyarrow/tensor.pxi":1237
 *             raise ValueError("Expected a list of 1-dimensional arrays for "
 *                              "SparseCSFTensor.indptr")
 *         if any([x.ndim != 1 for x in indices]):             # <<<<<<<<<<<<<<
 *             raise ValueError("Expected a list of 1-dimensional arrays for "
 *                              "SparseCSFTensor.indices")
*/
                      }

                      /* "pyarrow/tensor.pxi":1240
 *             raise ValueError("Expected a list of 1-dimensional arrays for "
 *                              "SparseCSFTensor.indices")
 *         indptr = [np.require(arr, dtype='i8') for arr in indptr]             # <<<<<<<<<<<<<<
 *         indices = [np.require(arr, dtype='i8') for arr in indices]
 * 
*/
                      { /* enter inner scope */
                        __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 1240, __pyx_L41_error)
                        __Pyx_GOTREF(__pyx_t_1);
                        if (likely(PyList_CheckExact(__pyx_v_indptr)) || PyTuple_CheckExact(__pyx_v_indptr)) {
                          __pyx_t_9 = __pyx_v_indptr; __Pyx_INCREF(__pyx_t_9);
                          __pyx_t_2 = 0;
                          __pyx_t_3 = NULL;
                        } else {
                          __pyx_t_2 = -1; __pyx_t_9 = PyObject_GetIter(__pyx_v_indptr); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 1240, __pyx_L41_error)
                          __Pyx_GOTREF(__pyx_t_9);
                          __pyx_t_3 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 1240, __pyx_L41_error)
                        }
                        for (;;) {
                          if (likely(!__pyx_t_3)) {
                            if (likely(PyList_CheckExact(__pyx_t_9))) {
                              {
                                Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_9);
                                #if !CYTHON_ASSUME_SAFE_SIZE
                                if (unlikely((__pyx_temp < 0))) __PYX_ERR(5, 1240, __pyx_L41_error)
                                #endif
                                if (__pyx_t_2 >= __pyx_temp) break;
                              }
                              __pyx_t_4 = __Pyx_PyList_GetItemRefFast(__pyx_t_9, __pyx_t_2, __Pyx_ReferenceSharing_OwnStrongReference);
                              ++__pyx_t_2;
                            } else {
                              {
                                Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_9);
                                #if !CYTHON_ASSUME_SAFE_SIZE
                                if (unlikely((__pyx_temp < 0))) __PYX_ERR(5, 1240, __pyx_L41_error)
                                #endif
                                if (__pyx_t_2 >= __pyx_temp) break;
                              }
                              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                              __pyx_t_4 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_9, __pyx_t_2));
                              #else
                              __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_9, __pyx_t_2);
                              #endif
                              ++__pyx_t_2;
                            }
                            if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1240, __pyx_L41_error)
                          } else {
                            __pyx_t_4 = __pyx_t_3(__pyx_t_9);
                            if (unlikely(!__pyx_t_4)) {
                              PyObject* exc_type = PyErr_Occurred();
                              if (exc_type) {
                                if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(5, 1240, __pyx_L41_error)
                                PyErr_Clear();
                              }
                              break;
                            }
                          }
                          __Pyx_GOTREF(__pyx_t_4);
                          __Pyx_XDECREF_SET(__pyx_9genexpr42__pyx_v_arr, __pyx_t_4);
                          __pyx_t_4 = 0;
                          __pyx_t_14 = NULL;
                          __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 1240, __pyx_L41_error)
                          __Pyx_GOTREF(__pyx_t_8);
                          __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_require); if (unlikely(!__pyx_t_17)) __PYX_ERR(5, 1240, __pyx_L41_error)
                          __Pyx_GOTREF(__pyx_t_17);
                          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                          __pyx_t_10 = 1;
                          #if CYTHON_UNPACK_METHODS
                          if (unlikely(PyMethod_Check(__pyx_t_17))) {
                            __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_17);
                            assert(__pyx_t_14);
                            PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_17);
                            __Pyx_INCREF(__pyx_t_14);
                            __Pyx_INCREF(__pyx__function);
                            __Pyx_DECREF_SET(__pyx_t_17, __pyx__function);
                            __pyx_t_10 = 0;
                          }
                          #endif
                          {
                            PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_14, __pyx_9genexpr42__pyx_v_arr};
                            __pyx_t_8 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 1240, __pyx_L41_error)
                            __Pyx_GOTREF(__pyx_t_8);
                            if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_dtype, __pyx_mstate_global->__pyx_n_u_i8, __pyx_t_8, __pyx_callargs+2, 0) < (0)) __PYX_ERR(5, 1240, __pyx_L41_error)
                            __pyx_t_4 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_17, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_8);
                            __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
                            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                            __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
                            if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1240, __pyx_L41_error)
                            __Pyx_GOTREF(__pyx_t_4);
                          }
                          if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_4))) __PYX_ERR(5, 1240, __pyx_L41_error)
                          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                        }
                        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
                        __Pyx_XDECREF(__pyx_9genexpr42__pyx_v_arr); __pyx_9genexpr42__pyx_v_arr = 0;
                        goto __pyx_L45_exit_scope;
                        __pyx_L41_error:;
                        __Pyx_XDECREF(__pyx_9genexpr42__pyx_v_arr); __pyx_9genexpr42__pyx_v_arr = 0;
                        goto __pyx_L1_error;
                        __pyx_L45_exit_scope:;
                      } /* exit inner scope */
                      __Pyx_DECREF_SET(__pyx_v_indptr, __pyx_t_1);
                      __pyx_t_1 = 0;

                      /* "pyarrow/tensor.pxi":1241
 *                              "SparseCSFTensor.indices")
 *         indptr = [np.require(arr, dtype='i8') for arr in indptr]
 *         indices = [np.require(arr, dtype='i8') for arr in indices]             # <<<<<<<<<<<<<<
 * 
 *         check_status(NdarraysToSparseCSFTensor(c_default_memory_pool(), data,
*/
                      { /* enter inner scope */
                        __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 1241, __pyx_L48_error)
                        __Pyx_GOTREF(__pyx_t_1);
                        if (likely(PyList_CheckExact(__pyx_v_indices)) || PyTuple_CheckExact(__pyx_v_indices)) {
                          __pyx_t_9 = __pyx_v_indices; __Pyx_INCREF(__pyx_t_9);
                          __pyx_t_2 = 0;
                          __pyx_t_3 = NULL;
                        } else {
                          __pyx_t_2 = -1; __pyx_t_9 = PyObject_GetIter(__pyx_v_indices); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 1241, __pyx_L48_error)
                          __Pyx_GOTREF(__pyx_t_9);
                          __pyx_t_3 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 1241, __pyx_L48_error)
                        }
                        for (;;) {
                          if (likely(!__pyx_t_3)) {
                            if (likely(PyList_CheckExact(__pyx_t_9))) {
                              {
                                Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_9);
                                #if !CYTHON_ASSUME_SAFE_SIZE
                                if (unlikely((__pyx_temp < 0))) __PYX_ERR(5, 1241, __pyx_L48_error)
                                #endif
                                if (__pyx_t_2 >= __pyx_temp) break;
                              }
                              __pyx_t_4 = __Pyx_PyList_GetItemRefFast(__pyx_t_9, __pyx_t_2, __Pyx_ReferenceSharing_OwnStrongReference);
                              ++__pyx_t_2;
                            } else {
                              {
                                Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_9);
                                #if !CYTHON_ASSUME_SAFE_SIZE
                                if (unlikely((__pyx_temp < 0))) __PYX_ERR(5, 1241, __pyx_L48_error)
                                #endif
                                if (__pyx_t_2 >= __pyx_temp) break;
                              }
                              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                              __pyx_t_4 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_9, __pyx_t_2));
                              #else
                              __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_9, __pyx_t_2);
                              #endif
                              ++__pyx_t_2;
                            }
                            if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1241, __pyx_L48_error)
                          } else {
                            __pyx_t_4 = __pyx_t_3(__pyx_t_9);
                            if (unlikely(!__pyx_t_4)) {
                              PyObject* exc_type = PyErr_Occurred();
                              if (exc_type) {
                                if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(5, 1241, __pyx_L48_error)
                                PyErr_Clear();
                              }
                              break;
                            }
                          }
                          __Pyx_GOTREF(__pyx_t_4);
                          __Pyx_XDECREF_SET(__pyx_9genexpr43__pyx_v_arr, __pyx_t_4);
                          __pyx_t_4 = 0;
                          __pyx_t_17 = NULL;
                          __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 1241, __pyx_L48_error)
                          __Pyx_GOTREF(__pyx_t_8);
                          __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_require); if (unlikely(!__pyx_t_14)) __PYX_ERR(5, 1241, __pyx_L48_error)
                          __Pyx_GOTREF(__pyx_t_14);
                          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                          __pyx_t_10 = 1;
                          #if CYTHON_UNPACK_METHODS
                          if (unlikely(PyMethod_Check(__pyx_t_14))) {
                            __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_14);
                            assert(__pyx_t_17);
                            PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_14);
                            __Pyx_INCREF(__pyx_t_17);
                            __Pyx_INCREF(__pyx__function);
                            __Pyx_DECREF_SET(__pyx_t_14, __pyx__function);
                            __pyx_t_10 = 0;
                          }
                          #endif
                          {
                            PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_17, __pyx_9genexpr43__pyx_v_arr};
                            __pyx_t_8 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 1241, __pyx_L48_error)
                            __Pyx_GOTREF(__pyx_t_8);
                            if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_dtype, __pyx_mstate_global->__pyx_n_u_i8, __pyx_t_8, __pyx_callargs+2, 0) < (0)) __PYX_ERR(5, 1241, __pyx_L48_error)
                            __pyx_t_4 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_14, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_8);
                            __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
                            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                            __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
                            if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1241, __pyx_L48_error)
                            __Pyx_GOTREF(__pyx_t_4);
                          }
                          if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_4))) __PYX_ERR(5, 1241, __pyx_L48_error)
                          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                        }
                        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
                        __Pyx_XDECREF(__pyx_9genexpr43__pyx_v_arr); __pyx_9genexpr43__pyx_v_arr = 0;
                        goto __pyx_L52_exit_scope;
                        __pyx_L48_error:;
                        __Pyx_XDECREF(__pyx_9genexpr43__pyx_v_arr); __pyx_9genexpr43__pyx_v_arr = 0;
                        goto __pyx_L1_error;
                        __pyx_L52_exit_scope:;
                      } /* exit inner scope */
                      __Pyx_DECREF_SET(__pyx_v_indices, __pyx_t_1);
                      __pyx_t_1 = 0;

                      /* "pyarrow/tensor.pxi":1243
 *         indices = [np.require(arr, dtype='i8') for arr in indices]
 * 
 *         check_status(NdarraysToSparseCSFTensor(c_default_memory_pool(), data,             # <<<<<<<<<<<<<<
 *                                                indptr, indices, c_shape,
 *                                                c_axis_order, c_dim_names,
*/
                      __pyx_t_18 = __pyx_f_7pyarrow_3lib_check_status(arrow::py::NdarraysToSparseCSFTensor( arrow::default_memory_pool(), __pyx_v_data, __pyx_v_indptr, __pyx_v_indices, __pyx_v_c_shape, __pyx_v_c_axis_order, __pyx_v_c_dim_names, (&__pyx_v_csparse_tensor))); if (unlikely(__pyx_t_18 == ((int)-1))) __PYX_ERR(5, 1243, __pyx_L1_error)

                      /* "pyarrow/tensor.pxi":1247
 *                                                c_axis_order, c_dim_names,
 *                                                &csparse_tensor))
 *         return pyarrow_wrap_sparse_csf_tensor(csparse_tensor)             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
*/
                      __Pyx_XDECREF(__pyx_r);
                      __pyx_t_1 = pyarrow_wrap_sparse_csf_tensor(__pyx_v_csparse_tensor); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 1247, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_r = __pyx_t_1;
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/tensor.pxi":1180
 *         return cls.from_tensor(Tensor.from_numpy(obj, dim_names=dim_names))
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_numpy(data, indptr, indices, shape, axis_order=None,
 *                    dim_names=None):
*/

                      /* function exit code */
                      __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_14);
                      __Pyx_XDECREF(__pyx_t_17);
                      __Pyx_AddTraceback("pyarrow.lib.SparseCSFTensor.from_numpy", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XDECREF(__pyx_v_x);
                      __Pyx_XDECREF(__pyx_9genexpr40__pyx_v_x);
                      __Pyx_XDECREF(__pyx_9genexpr41__pyx_v_x);
                      __Pyx_XDECREF(__pyx_9genexpr42__pyx_v_arr);
                      __Pyx_XDECREF(__pyx_9genexpr43__pyx_v_arr);
                      __Pyx_XDECREF(__pyx_v_indptr);
                      __Pyx_XDECREF(__pyx_v_indices);
                      __Pyx_XDECREF(__pyx_v_axis_order);
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/tensor.pxi":1249
 *         return pyarrow_wrap_sparse_csf_tensor(csparse_tensor)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_tensor(obj):
 *         """
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSFTensor_9from_tensor(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_15SparseCSFTensor_8from_tensor, "SparseCSFTensor.from_tensor(obj)\n\nConvert arrow::Tensor to arrow::SparseCSFTensor\n\nParameters\n----------\nobj : Tensor\n    The dense tensor that should be converted.");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_15SparseCSFTensor_9from_tensor = {"from_tensor", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15SparseCSFTensor_9from_tensor, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15SparseCSFTensor_8from_tensor};
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSFTensor_9from_tensor(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      PyObject *__pyx_v_obj = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[1] = {0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("from_tensor (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_obj,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(5, 1249, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(5, 1249, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "from_tensor", 0) < (0)) __PYX_ERR(5, 1249, __pyx_L3_error)
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("from_tensor", 1, 1, 1, i); __PYX_ERR(5, 1249, __pyx_L3_error) }
                          }
                        } else if (unlikely(__pyx_nargs != 1)) {
                          goto __pyx_L5_argtuple_error;
                        } else {
                          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(5, 1249, __pyx_L3_error)
                        }
                        __pyx_v_obj = values[0];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("from_tensor", 1, 1, 1, __pyx_nargs); __PYX_ERR(5, 1249, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.SparseCSFTensor.from_tensor", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_15SparseCSFTensor_8from_tensor(__pyx_v_obj);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSFTensor_8from_tensor(PyObject *__pyx_v_obj) {
                      std::shared_ptr< arrow::SparseCSFTensor>  __pyx_v_csparse_tensor;
                      std::shared_ptr< arrow::Tensor>  __pyx_v_ctensor;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      std::shared_ptr< arrow::Tensor>  __pyx_t_1;
                      int __pyx_t_2;
                      PyObject *__pyx_t_3 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("from_tensor", 0);

                      /* "pyarrow/tensor.pxi":1260
 *         """
 *         cdef shared_ptr[CSparseCSFTensor] csparse_tensor
 *         cdef shared_ptr[CTensor] ctensor = pyarrow_unwrap_tensor(obj)             # <<<<<<<<<<<<<<
 * 
 *         with nogil:
*/
                      __pyx_t_1 = pyarrow_unwrap_tensor(__pyx_v_obj); if (unlikely(PyErr_Occurred())) __PYX_ERR(5, 1260, __pyx_L1_error)
                      __pyx_v_ctensor = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_1);

                      /* "pyarrow/tensor.pxi":1262
 *         cdef shared_ptr[CTensor] ctensor = pyarrow_unwrap_tensor(obj)
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             check_status(TensorToSparseCSFTensor(ctensor, &csparse_tensor))
 * 
*/
                      {
                          PyThreadState * _save;
                          _save = PyEval_SaveThread();
                          __Pyx_FastGIL_Remember();
                          /*try:*/ {

                            /* "pyarrow/tensor.pxi":1263
 * 
 *         with nogil:
 *             check_status(TensorToSparseCSFTensor(ctensor, &csparse_tensor))             # <<<<<<<<<<<<<<
 * 
 *         return pyarrow_wrap_sparse_csf_tensor(csparse_tensor)
*/
                            __pyx_t_2 = __pyx_f_7pyarrow_3lib_check_status(arrow::py::TensorToSparseCSFTensor(__pyx_v_ctensor, (&__pyx_v_csparse_tensor))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 1263, __pyx_L4_error)
                          }

                          /* "pyarrow/tensor.pxi":1262
 *         cdef shared_ptr[CTensor] ctensor = pyarrow_unwrap_tensor(obj)
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             check_status(TensorToSparseCSFTensor(ctensor, &csparse_tensor))
 * 
*/
                          /*finally:*/ {
                            /*normal exit:*/{
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L5;
                            }
                            __pyx_L4_error: {
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L1_error;
                            }
                            __pyx_L5:;
                          }
                      }

                      /* "pyarrow/tensor.pxi":1265
 *             check_status(TensorToSparseCSFTensor(ctensor, &csparse_tensor))
 * 
 *         return pyarrow_wrap_sparse_csf_tensor(csparse_tensor)             # <<<<<<<<<<<<<<
 * 
 *     def to_numpy(self):
*/
                      __Pyx_XDECREF(__pyx_r);
                      __pyx_t_3 = pyarrow_wrap_sparse_csf_tensor(__pyx_v_csparse_tensor); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 1265, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_3);
                      __pyx_r = __pyx_t_3;
                      __pyx_t_3 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/tensor.pxi":1249
 *         return pyarrow_wrap_sparse_csf_tensor(csparse_tensor)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_tensor(obj):
 *         """
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_AddTraceback("pyarrow.lib.SparseCSFTensor.from_tensor", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/tensor.pxi":1267
 *         return pyarrow_wrap_sparse_csf_tensor(csparse_tensor)
 * 
 *     def to_numpy(self):             # <<<<<<<<<<<<<<
 *         """
 *         Convert arrow::SparseCSFTensor to numpy.ndarrays with zero copy
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSFTensor_11to_numpy(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_15SparseCSFTensor_10to_numpy, "SparseCSFTensor.to_numpy(self)\n\nConvert arrow::SparseCSFTensor to numpy.ndarrays with zero copy");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_15SparseCSFTensor_11to_numpy = {"to_numpy", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15SparseCSFTensor_11to_numpy, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15SparseCSFTensor_10to_numpy};
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSFTensor_11to_numpy(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("to_numpy (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("to_numpy", 1, 0, 0, __pyx_nargs); return NULL; }
                      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                      if (unlikely(__pyx_kwds_len < 0)) return NULL;
                      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("to_numpy", __pyx_kwds); return NULL;}
                      __pyx_r = __pyx_pf_7pyarrow_3lib_15SparseCSFTensor_10to_numpy(((struct __pyx_obj_7pyarrow_3lib_SparseCSFTensor *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSFTensor_10to_numpy(struct __pyx_obj_7pyarrow_3lib_SparseCSFTensor *__pyx_v_self) {
                      PyObject *__pyx_v_out_data;
                      PyObject *__pyx_v_out_indptr;
                      PyObject *__pyx_v_out_indices;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      int __pyx_t_2;
                      PyObject *__pyx_t_3 = NULL;
                      size_t __pyx_t_4;
                      int __pyx_t_5;
                      PyObject *__pyx_t_6 = NULL;
                      PyObject *__pyx_t_7 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("to_numpy", 0);

                      /* "pyarrow/tensor.pxi":1271
 *         Convert arrow::SparseCSFTensor to numpy.ndarrays with zero copy
 *         """
 *         if np is None:             # <<<<<<<<<<<<<<
 *             raise ImportError(
 *                 "Cannot return a numpy.ndarray if NumPy is not present")
*/
                      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 1271, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_t_2 = (__pyx_t_1 == Py_None);
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      if (unlikely(__pyx_t_2)) {

                        /* "pyarrow/tensor.pxi":1272
 *         """
 *         if np is None:
 *             raise ImportError(             # <<<<<<<<<<<<<<
 *                 "Cannot return a numpy.ndarray if NumPy is not present")
 *         cdef PyObject* out_data
*/
                        __pyx_t_3 = NULL;
                        __pyx_t_4 = 1;
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Cannot_return_a_numpy_ndarray_if};
                          __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ImportError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                          if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 1272, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_1);
                        }
                        __Pyx_Raise(__pyx_t_1, 0, 0, 0);
                        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                        __PYX_ERR(5, 1272, __pyx_L1_error)

                        /* "pyarrow/tensor.pxi":1271
 *         Convert arrow::SparseCSFTensor to numpy.ndarrays with zero copy
 *         """
 *         if np is None:             # <<<<<<<<<<<<<<
 *             raise ImportError(
 *                 "Cannot return a numpy.ndarray if NumPy is not present")
*/
                      }

                      /* "pyarrow/tensor.pxi":1278
 *         cdef PyObject* out_indices
 * 
 *         check_status(SparseCSFTensorToNdarray(self.sp_sparse_tensor, self,             # <<<<<<<<<<<<<<
 *                                               &out_data, &out_indptr,
 *                                               &out_indices))
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_sparse_tensor");
                        __PYX_ERR(5, 1278, __pyx_L1_error)
                      }

                      /* "pyarrow/tensor.pxi":1280
 *         check_status(SparseCSFTensorToNdarray(self.sp_sparse_tensor, self,
 *                                               &out_data, &out_indptr,
 *                                               &out_indices))             # <<<<<<<<<<<<<<
 *         return (PyObject_to_object(out_data), PyObject_to_object(out_indptr),
 *                 PyObject_to_object(out_indices))
*/
                      __pyx_t_5 = __pyx_f_7pyarrow_3lib_check_status(arrow::py::SparseCSFTensorToNdarray(__pyx_v_self->sp_sparse_tensor, ((PyObject *)__pyx_v_self), (&__pyx_v_out_data), (&__pyx_v_out_indptr), (&__pyx_v_out_indices))); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(5, 1278, __pyx_L1_error)

                      /* "pyarrow/tensor.pxi":1281
 *                                               &out_data, &out_indptr,
 *                                               &out_indices))
 *         return (PyObject_to_object(out_data), PyObject_to_object(out_indptr),             # <<<<<<<<<<<<<<
 *                 PyObject_to_object(out_indices))
 * 
*/
                      __Pyx_XDECREF(__pyx_r);
                      __pyx_t_1 = __pyx_f_7pyarrow_8includes_6common_PyObject_to_object(__pyx_v_out_data); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 1281, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_t_3 = __pyx_f_7pyarrow_8includes_6common_PyObject_to_object(__pyx_v_out_indptr); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 1281, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_3);

                      /* "pyarrow/tensor.pxi":1282
 *                                               &out_indices))
 *         return (PyObject_to_object(out_data), PyObject_to_object(out_indptr),
 *                 PyObject_to_object(out_indices))             # <<<<<<<<<<<<<<
 * 
 *     def to_tensor(self):
*/
                      __pyx_t_6 = __pyx_f_7pyarrow_8includes_6common_PyObject_to_object(__pyx_v_out_indices); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 1282, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_6);

                      /* "pyarrow/tensor.pxi":1281
 *                                               &out_data, &out_indptr,
 *                                               &out_indices))
 *         return (PyObject_to_object(out_data), PyObject_to_object(out_indptr),             # <<<<<<<<<<<<<<
 *                 PyObject_to_object(out_indices))
 * 
*/
                      __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 1281, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_7);
                      __Pyx_GIVEREF(__pyx_t_1);
                      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1) != (0)) __PYX_ERR(5, 1281, __pyx_L1_error);
                      __Pyx_GIVEREF(__pyx_t_3);
                      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_3) != (0)) __PYX_ERR(5, 1281, __pyx_L1_error);
                      __Pyx_GIVEREF(__pyx_t_6);
                      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_6) != (0)) __PYX_ERR(5, 1281, __pyx_L1_error);
                      __pyx_t_1 = 0;
                      __pyx_t_3 = 0;
                      __pyx_t_6 = 0;
                      __pyx_r = __pyx_t_7;
                      __pyx_t_7 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/tensor.pxi":1267
 *         return pyarrow_wrap_sparse_csf_tensor(csparse_tensor)
 * 
 *     def to_numpy(self):             # <<<<<<<<<<<<<<
 *         """
 *         Convert arrow::SparseCSFTensor to numpy.ndarrays with zero copy
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_XDECREF(__pyx_t_6);
                      __Pyx_XDECREF(__pyx_t_7);
                      __Pyx_AddTraceback("pyarrow.lib.SparseCSFTensor.to_numpy", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/tensor.pxi":1284
 *                 PyObject_to_object(out_indices))
 * 
 *     def to_tensor(self):             # <<<<<<<<<<<<<<
 *         """
 *         Convert arrow::SparseCSFTensor to arrow::Tensor
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSFTensor_13to_tensor(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_15SparseCSFTensor_12to_tensor, "SparseCSFTensor.to_tensor(self)\n\nConvert arrow::SparseCSFTensor to arrow::Tensor");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_15SparseCSFTensor_13to_tensor = {"to_tensor", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15SparseCSFTensor_13to_tensor, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15SparseCSFTensor_12to_tensor};
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSFTensor_13to_tensor(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("to_tensor (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("to_tensor", 1, 0, 0, __pyx_nargs); return NULL; }
                      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                      if (unlikely(__pyx_kwds_len < 0)) return NULL;
                      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("to_tensor", __pyx_kwds); return NULL;}
                      __pyx_r = __pyx_pf_7pyarrow_3lib_15SparseCSFTensor_12to_tensor(((struct __pyx_obj_7pyarrow_3lib_SparseCSFTensor *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSFTensor_12to_tensor(struct __pyx_obj_7pyarrow_3lib_SparseCSFTensor *__pyx_v_self) {
                      std::shared_ptr< arrow::Tensor>  __pyx_v_ctensor;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      std::shared_ptr< arrow::Tensor>  __pyx_t_1;
                      PyObject *__pyx_t_2 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("to_tensor", 0);

                      /* "pyarrow/tensor.pxi":1290
 * 
 *         cdef shared_ptr[CTensor] ctensor
 *         with nogil:             # <<<<<<<<<<<<<<
 *             ctensor = GetResultValue(self.stp.ToTensor())
 * 
*/
                      {
                          PyThreadState * _save;
                          _save = PyEval_SaveThread();
                          __Pyx_FastGIL_Remember();
                          /*try:*/ {

                            /* "pyarrow/tensor.pxi":1291
 *         cdef shared_ptr[CTensor] ctensor
 *         with nogil:
 *             ctensor = GetResultValue(self.stp.ToTensor())             # <<<<<<<<<<<<<<
 * 
 *         return pyarrow_wrap_tensor(ctensor)
*/
                            if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                              PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "stp");
                              __Pyx_PyGILState_Release(__pyx_gilstate_save);
                              __PYX_ERR(5, 1291, __pyx_L4_error)
                            }
                            __pyx_t_1 = arrow::py::GetResultValue<std::shared_ptr< arrow::Tensor> >(__pyx_v_self->stp->ToTensor()); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(5, 1291, __pyx_L4_error)
                            __pyx_v_ctensor = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_1);
                          }

                          /* "pyarrow/tensor.pxi":1290
 * 
 *         cdef shared_ptr[CTensor] ctensor
 *         with nogil:             # <<<<<<<<<<<<<<
 *             ctensor = GetResultValue(self.stp.ToTensor())
 * 
*/
                          /*finally:*/ {
                            /*normal exit:*/{
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L5;
                            }
                            __pyx_L4_error: {
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L1_error;
                            }
                            __pyx_L5:;
                          }
                      }

                      /* "pyarrow/tensor.pxi":1293
 *             ctensor = GetResultValue(self.stp.ToTensor())
 * 
 *         return pyarrow_wrap_tensor(ctensor)             # <<<<<<<<<<<<<<
 * 
 *     def equals(self, SparseCSFTensor other):
*/
                      __Pyx_XDECREF(__pyx_r);
                      __pyx_t_2 = pyarrow_wrap_tensor(__pyx_v_ctensor); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1293, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_2);
                      __pyx_r = __pyx_t_2;
                      __pyx_t_2 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/tensor.pxi":1284
 *                 PyObject_to_object(out_indices))
 * 
 *     def to_tensor(self):             # <<<<<<<<<<<<<<
 *         """
 *         Convert arrow::SparseCSFTensor to arrow::Tensor
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_AddTraceback("pyarrow.lib.SparseCSFTensor.to_tensor", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/tensor.pxi":1295
 *         return pyarrow_wrap_tensor(ctensor)
 * 
 *     def equals(self, SparseCSFTensor other):             # <<<<<<<<<<<<<<
 *         """
 *         Return true if sparse tensors contains exactly equal data
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSFTensor_15equals(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_15SparseCSFTensor_14equals, "SparseCSFTensor.equals(self, SparseCSFTensor other)\n\nReturn true if sparse tensors contains exactly equal data\n\nParameters\n----------\nother : SparseCSFTensor\n    The other tensor to compare for equality.");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_15SparseCSFTensor_15equals = {"equals", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15SparseCSFTensor_15equals, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15SparseCSFTensor_14equals};
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSFTensor_15equals(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      struct __pyx_obj_7pyarrow_3lib_SparseCSFTensor *__pyx_v_other = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[1] = {0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("equals (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_other,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(5, 1295, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(5, 1295, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "equals", 0) < (0)) __PYX_ERR(5, 1295, __pyx_L3_error)
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("equals", 1, 1, 1, i); __PYX_ERR(5, 1295, __pyx_L3_error) }
                          }
                        } else if (unlikely(__pyx_nargs != 1)) {
                          goto __pyx_L5_argtuple_error;
                        } else {
                          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(5, 1295, __pyx_L3_error)
                        }
                        __pyx_v_other = ((struct __pyx_obj_7pyarrow_3lib_SparseCSFTensor *)values[0]);
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("equals", 1, 1, 1, __pyx_nargs); __PYX_ERR(5, 1295, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.SparseCSFTensor.equals", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_SparseCSFTensor, 1, "other", 0))) __PYX_ERR(5, 1295, __pyx_L1_error)
                      __pyx_r = __pyx_pf_7pyarrow_3lib_15SparseCSFTensor_14equals(((struct __pyx_obj_7pyarrow_3lib_SparseCSFTensor *)__pyx_v_self), __pyx_v_other);

                      /* function exit code */
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __pyx_r = NULL;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      goto __pyx_L7_cleaned_up;
                      __pyx_L0:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __pyx_L7_cleaned_up:;
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSFTensor_14equals(struct __pyx_obj_7pyarrow_3lib_SparseCSFTensor *__pyx_v_self, struct __pyx_obj_7pyarrow_3lib_SparseCSFTensor *__pyx_v_other) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("equals", 0);

                      /* "pyarrow/tensor.pxi":1304
 *             The other tensor to compare for equality.
 *         """
 *         return self.stp.Equals(deref(other.stp))             # <<<<<<<<<<<<<<
 * 
 *     def __eq__(self, other):
*/
                      __Pyx_XDECREF(__pyx_r);
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "stp");
                        __PYX_ERR(5, 1304, __pyx_L1_error)
                      }
                      if (unlikely(((PyObject *)__pyx_v_other) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "stp");
                        __PYX_ERR(5, 1304, __pyx_L1_error)
                      }
                      __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->stp->Equals((*__pyx_v_other->stp))); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 1304, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_r = __pyx_t_1;
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/tensor.pxi":1295
 *         return pyarrow_wrap_tensor(ctensor)
 * 
 *     def equals(self, SparseCSFTensor other):             # <<<<<<<<<<<<<<
 *         """
 *         Return true if sparse tensors contains exactly equal data
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_AddTraceback("pyarrow.lib.SparseCSFTensor.equals", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/tensor.pxi":1306
 *         return self.stp.Equals(deref(other.stp))
 * 
 *     def __eq__(self, other):             # <<<<<<<<<<<<<<
 *         if isinstance(other, SparseCSFTensor):
 *             return self.equals(other)
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSFTensor_17__eq__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSFTensor_17__eq__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__eq__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_15SparseCSFTensor_16__eq__(((struct __pyx_obj_7pyarrow_3lib_SparseCSFTensor *)__pyx_v_self), ((PyObject *)__pyx_v_other));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSFTensor_16__eq__(struct __pyx_obj_7pyarrow_3lib_SparseCSFTensor *__pyx_v_self, PyObject *__pyx_v_other) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_t_1;
                      PyObject *__pyx_t_2 = NULL;
                      PyObject *__pyx_t_3 = NULL;
                      size_t __pyx_t_4;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__eq__", 0);

                      /* "pyarrow/tensor.pxi":1307
 * 
 *     def __eq__(self, other):
 *         if isinstance(other, SparseCSFTensor):             # <<<<<<<<<<<<<<
 *             return self.equals(other)
 *         else:
*/
                      __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_other, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_SparseCSFTensor); 
                      if (__pyx_t_1) {

                        /* "pyarrow/tensor.pxi":1308
 *     def __eq__(self, other):
 *         if isinstance(other, SparseCSFTensor):
 *             return self.equals(other)             # <<<<<<<<<<<<<<
 *         else:
 *             return NotImplemented
*/
                        __Pyx_XDECREF(__pyx_r);
                        __pyx_t_3 = ((PyObject *)__pyx_v_self);
                        __Pyx_INCREF(__pyx_t_3);
                        __pyx_t_4 = 0;
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_other};
                          __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_equals, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                          if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1308, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_2);
                        }
                        __pyx_r = __pyx_t_2;
                        __pyx_t_2 = 0;
                        goto __pyx_L0;

                        /* "pyarrow/tensor.pxi":1307
 * 
 *     def __eq__(self, other):
 *         if isinstance(other, SparseCSFTensor):             # <<<<<<<<<<<<<<
 *             return self.equals(other)
 *         else:
*/
                      }

                      /* "pyarrow/tensor.pxi":1310
 *             return self.equals(other)
 *         else:
 *             return NotImplemented             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
                      /*else*/ {
                        __Pyx_XDECREF(__pyx_r);
                        __Pyx_INCREF(__pyx_builtin_NotImplemented);
                        __pyx_r = __pyx_builtin_NotImplemented;
                        goto __pyx_L0;
                      }

                      /* "pyarrow/tensor.pxi":1306
 *         return self.stp.Equals(deref(other.stp))
 * 
 *     def __eq__(self, other):             # <<<<<<<<<<<<<<
 *         if isinstance(other, SparseCSFTensor):
 *             return self.equals(other)
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_AddTraceback("pyarrow.lib.SparseCSFTensor.__eq__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/tensor.pxi":1312
 *             return NotImplemented
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_mutable(self):
 *         return self.stp.is_mutable()
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSFTensor_10is_mutable_1__get__(PyObject *__pyx_v_self); /*proto*/
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSFTensor_10is_mutable_1__get__(PyObject *__pyx_v_self) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_15SparseCSFTensor_10is_mutable___get__(((struct __pyx_obj_7pyarrow_3lib_SparseCSFTensor *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSFTensor_10is_mutable___get__(struct __pyx_obj_7pyarrow_3lib_SparseCSFTensor *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__get__", 0);

                      /* "pyarrow/tensor.pxi":1314
 *     @property
 *     def is_mutable(self):
 *         return self.stp.is_mutable()             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
                      __Pyx_XDECREF(__pyx_r);
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "stp");
                        __PYX_ERR(5, 1314, __pyx_L1_error)
                      }
                      __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->stp->is_mutable()); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 1314, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_r = __pyx_t_1;
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/tensor.pxi":1312
 *             return NotImplemented
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_mutable(self):
 *         return self.stp.is_mutable()
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_AddTraceback("pyarrow.lib.SparseCSFTensor.is_mutable.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/tensor.pxi":1316
 *         return self.stp.is_mutable()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def ndim(self):
 *         return self.stp.ndim()
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSFTensor_4ndim_1__get__(PyObject *__pyx_v_self); /*proto*/
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSFTensor_4ndim_1__get__(PyObject *__pyx_v_self) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_15SparseCSFTensor_4ndim___get__(((struct __pyx_obj_7pyarrow_3lib_SparseCSFTensor *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSFTensor_4ndim___get__(struct __pyx_obj_7pyarrow_3lib_SparseCSFTensor *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__get__", 0);

                      /* "pyarrow/tensor.pxi":1318
 *     @property
 *     def ndim(self):
 *         return self.stp.ndim()             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
                      __Pyx_XDECREF(__pyx_r);
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "stp");
                        __PYX_ERR(5, 1318, __pyx_L1_error)
                      }
                      __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_v_self->stp->ndim()); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 1318, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_r = __pyx_t_1;
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/tensor.pxi":1316
 *         return self.stp.is_mutable()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def ndim(self):
 *         return self.stp.ndim()
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_AddTraceback("pyarrow.lib.SparseCSFTensor.ndim.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/tensor.pxi":1320
 *         return self.stp.ndim()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def shape(self):
 *         # Cython knows how to convert a vector[T] to a Python list
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSFTensor_5shape_1__get__(PyObject *__pyx_v_self); /*proto*/
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSFTensor_5shape_1__get__(PyObject *__pyx_v_self) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_15SparseCSFTensor_5shape___get__(((struct __pyx_obj_7pyarrow_3lib_SparseCSFTensor *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSFTensor_5shape___get__(struct __pyx_obj_7pyarrow_3lib_SparseCSFTensor *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__get__", 0);

                      /* "pyarrow/tensor.pxi":1323
 *     def shape(self):
 *         # Cython knows how to convert a vector[T] to a Python list
 *         return tuple(self.stp.shape())             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
                      __Pyx_XDECREF(__pyx_r);
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "stp");
                        __PYX_ERR(5, 1323, __pyx_L1_error)
                      }
                      __pyx_t_1 = __pyx_convert_vector_to_py_int64_t(__pyx_v_self->stp->shape()); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 1323, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_t_2 = __Pyx_PySequence_Tuple(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1323, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_2);
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      __pyx_r = __pyx_t_2;
                      __pyx_t_2 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/tensor.pxi":1320
 *         return self.stp.ndim()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def shape(self):
 *         # Cython knows how to convert a vector[T] to a Python list
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_AddTraceback("pyarrow.lib.SparseCSFTensor.shape.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/tensor.pxi":1325
 *         return tuple(self.stp.shape())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def size(self):
 *         return self.stp.size()
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSFTensor_4size_1__get__(PyObject *__pyx_v_self); /*proto*/
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSFTensor_4size_1__get__(PyObject *__pyx_v_self) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_15SparseCSFTensor_4size___get__(((struct __pyx_obj_7pyarrow_3lib_SparseCSFTensor *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSFTensor_4size___get__(struct __pyx_obj_7pyarrow_3lib_SparseCSFTensor *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__get__", 0);

                      /* "pyarrow/tensor.pxi":1327
 *     @property
 *     def size(self):
 *         return self.stp.size()             # <<<<<<<<<<<<<<
 * 
 *     def dim_name(self, i):
*/
                      __Pyx_XDECREF(__pyx_r);
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "stp");
                        __PYX_ERR(5, 1327, __pyx_L1_error)
                      }
                      __pyx_t_1 = __Pyx_PyLong_From_int64_t(__pyx_v_self->stp->size()); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 1327, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_r = __pyx_t_1;
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/tensor.pxi":1325
 *         return tuple(self.stp.shape())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def size(self):
 *         return self.stp.size()
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_AddTraceback("pyarrow.lib.SparseCSFTensor.size.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/tensor.pxi":1329
 *         return self.stp.size()
 * 
 *     def dim_name(self, i):             # <<<<<<<<<<<<<<
 *         """
 *         Returns the name of the i-th tensor dimension.
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSFTensor_19dim_name(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_15SparseCSFTensor_18dim_name, "SparseCSFTensor.dim_name(self, i)\n\nReturns the name of the i-th tensor dimension.\n\nParameters\n----------\ni : int\n    The physical index of the tensor dimension.\n\nReturns\n-------\nstr");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_15SparseCSFTensor_19dim_name = {"dim_name", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15SparseCSFTensor_19dim_name, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15SparseCSFTensor_18dim_name};
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSFTensor_19dim_name(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      PyObject *__pyx_v_i = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[1] = {0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("dim_name (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_i,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(5, 1329, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(5, 1329, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "dim_name", 0) < (0)) __PYX_ERR(5, 1329, __pyx_L3_error)
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("dim_name", 1, 1, 1, i); __PYX_ERR(5, 1329, __pyx_L3_error) }
                          }
                        } else if (unlikely(__pyx_nargs != 1)) {
                          goto __pyx_L5_argtuple_error;
                        } else {
                          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(5, 1329, __pyx_L3_error)
                        }
                        __pyx_v_i = values[0];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("dim_name", 1, 1, 1, __pyx_nargs); __PYX_ERR(5, 1329, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.SparseCSFTensor.dim_name", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_15SparseCSFTensor_18dim_name(((struct __pyx_obj_7pyarrow_3lib_SparseCSFTensor *)__pyx_v_self), __pyx_v_i);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSFTensor_18dim_name(struct __pyx_obj_7pyarrow_3lib_SparseCSFTensor *__pyx_v_self, PyObject *__pyx_v_i) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      PyObject *__pyx_t_3 = NULL;
                      int __pyx_t_4;
                      PyObject *__pyx_t_5 = NULL;
                      size_t __pyx_t_6;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("dim_name", 0);

                      /* "pyarrow/tensor.pxi":1342
 *         str
 *         """
 *         return frombytes(self.stp.dim_name(i))             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
                      __Pyx_XDECREF(__pyx_r);
                      __pyx_t_2 = NULL;
                      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_frombytes); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 1342, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_3);
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "stp");
                        __PYX_ERR(5, 1342, __pyx_L1_error)
                      }
                      __pyx_t_4 = __Pyx_PyLong_As_int(__pyx_v_i); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(5, 1342, __pyx_L1_error)
                      __pyx_t_5 = __pyx_convert_PyBytes_string_to_py_6libcpp_6string_std__in_string(__pyx_v_self->stp->dim_name(__pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 1342, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_5);
                      __pyx_t_6 = 1;
                      #if CYTHON_UNPACK_METHODS
                      if (unlikely(PyMethod_Check(__pyx_t_3))) {
                        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
                        assert(__pyx_t_2);
                        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
                        __Pyx_INCREF(__pyx_t_2);
                        __Pyx_INCREF(__pyx__function);
                        __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
                        __pyx_t_6 = 0;
                      }
                      #endif
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_5};
                        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 1342, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __pyx_r = __pyx_t_1;
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/tensor.pxi":1329
 *         return self.stp.size()
 * 
 *     def dim_name(self, i):             # <<<<<<<<<<<<<<
 *         """
 *         Returns the name of the i-th tensor dimension.
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_XDECREF(__pyx_t_5);
                      __Pyx_AddTraceback("pyarrow.lib.SparseCSFTensor.dim_name", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/tensor.pxi":1344
 *         return frombytes(self.stp.dim_name(i))
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def dim_names(self):
 *         names_tuple = tuple(self.stp.dim_names())
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSFTensor_9dim_names_1__get__(PyObject *__pyx_v_self); /*proto*/
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSFTensor_9dim_names_1__get__(PyObject *__pyx_v_self) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_15SparseCSFTensor_9dim_names___get__(((struct __pyx_obj_7pyarrow_3lib_SparseCSFTensor *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }
                    static PyObject *__pyx_gb_7pyarrow_3lib_15SparseCSFTensor_9dim_names_7__get___2generator20(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

                    /* "pyarrow/tensor.pxi":1347
 *     def dim_names(self):
 *         names_tuple = tuple(self.stp.dim_names())
 *         return tuple(frombytes(x) for x in names_tuple)             # <<<<<<<<<<<<<<
 * 
 *     @property
*/

                    static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSFTensor_9dim_names_7__get___genexpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0) {
                      struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_20_genexpr *__pyx_cur_scope;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("genexpr", 0);
                      __pyx_cur_scope = (struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_20_genexpr *)__pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_20_genexpr(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_20_genexpr, __pyx_mstate_global->__pyx_empty_tuple, NULL);
                      if (unlikely(!__pyx_cur_scope)) {
                        __pyx_cur_scope = ((struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_20_genexpr *)Py_None);
                        __Pyx_INCREF(Py_None);
                        __PYX_ERR(5, 1347, __pyx_L1_error)
                      } else {
                        __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
                      }
                      __pyx_cur_scope->__pyx_genexpr_arg_0 = __pyx_genexpr_arg_0;
                      __Pyx_INCREF(__pyx_cur_scope->__pyx_genexpr_arg_0);
                      __Pyx_GIVEREF(__pyx_cur_scope->__pyx_genexpr_arg_0);
                      {
                        __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7pyarrow_3lib_15SparseCSFTensor_9dim_names_7__get___2generator20, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[19]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_SparseCSFTensor___get___locals_g, __pyx_mstate_global->__pyx_n_u_pyarrow_lib); if (unlikely(!gen)) __PYX_ERR(5, 1347, __pyx_L1_error)
                        __Pyx_DECREF(__pyx_cur_scope);
                        __Pyx_RefNannyFinishContext();
                        return (PyObject *) gen;
                      }

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib.SparseCSFTensor.dim_names.__get__.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __Pyx_DECREF((PyObject *)__pyx_cur_scope);
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_gb_7pyarrow_3lib_15SparseCSFTensor_9dim_names_7__get___2generator20(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
                      struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_20_genexpr *__pyx_cur_scope = ((struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_20_genexpr *)__pyx_generator->closure);
                      PyObject *__pyx_r = NULL;
                      PyObject *__pyx_t_1 = NULL;
                      Py_ssize_t __pyx_t_2;
                      PyObject *__pyx_t_3 = NULL;
                      PyObject *__pyx_t_4 = NULL;
                      PyObject *__pyx_t_5 = NULL;
                      size_t __pyx_t_6;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("genexpr", 0);
                      switch (__pyx_generator->resume_label) {
                        case 0: goto __pyx_L3_first_run;
                        case 1: goto __pyx_L6_resume_from_yield;
                        default: /* CPython raises the right error here */
                        __Pyx_RefNannyFinishContext();
                        return NULL;
                      }
                      __pyx_L3_first_run:;
                      if (unlikely(__pyx_sent_value != Py_None)) {
                        if (unlikely(__pyx_sent_value)) PyErr_SetString(PyExc_TypeError, "can't send non-None value to a just-started generator");
                        __PYX_ERR(5, 1347, __pyx_L1_error)
                      }
                      if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(5, 1347, __pyx_L1_error) }
                      __pyx_t_1 = __pyx_cur_scope->__pyx_genexpr_arg_0; __Pyx_INCREF(__pyx_t_1);
                      __pyx_t_2 = 0;
                      for (;;) {
                        {
                          Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
                          #if !CYTHON_ASSUME_SAFE_SIZE
                          if (unlikely((__pyx_temp < 0))) __PYX_ERR(5, 1347, __pyx_L1_error)
                          #endif
                          if (__pyx_t_2 >= __pyx_temp) break;
                        }
                        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                        __pyx_t_3 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2));
                        #else
                        __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2);
                        #endif
                        ++__pyx_t_2;
                        if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 1347, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_3);
                        __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_x);
                        __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_x, __pyx_t_3);
                        __Pyx_GIVEREF(__pyx_t_3);
                        __pyx_t_3 = 0;
                        __pyx_t_4 = NULL;
                        __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_frombytes); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 1347, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_5);
                        __pyx_t_6 = 1;
                        #if CYTHON_UNPACK_METHODS
                        if (unlikely(PyMethod_Check(__pyx_t_5))) {
                          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
                          assert(__pyx_t_4);
                          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
                          __Pyx_INCREF(__pyx_t_4);
                          __Pyx_INCREF(__pyx__function);
                          __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
                          __pyx_t_6 = 0;
                        }
                        #endif
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_cur_scope->__pyx_v_x};
                          __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                          if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 1347, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_3);
                        }
                        __pyx_r = __pyx_t_3;
                        __pyx_t_3 = 0;
                        __Pyx_XGIVEREF(__pyx_t_1);
                        __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
                        __pyx_cur_scope->__pyx_t_1 = __pyx_t_2;
                        __Pyx_XGIVEREF(__pyx_r);
                        __Pyx_RefNannyFinishContext();
                        __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
                        /* return from generator, yielding value */
                        __pyx_generator->resume_label = 1;
                        return __pyx_r;
                        __pyx_L6_resume_from_yield:;
                        __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
                        __pyx_cur_scope->__pyx_t_0 = 0;
                        __Pyx_XGOTREF(__pyx_t_1);
                        __pyx_t_2 = __pyx_cur_scope->__pyx_t_1;
                        if (unlikely(!__pyx_sent_value)) __PYX_ERR(5, 1347, __pyx_L1_error)
                      }
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

                      /* function exit code */
                      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_XDECREF(__pyx_t_4);
                      __Pyx_XDECREF(__pyx_t_5);
                      if (__Pyx_PyErr_Occurred()) {
                        __Pyx_Generator_Replace_StopIteration(0);
                        __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      }
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      #if !CYTHON_USE_EXC_INFO_STACK
                      __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
                      #endif
                      __pyx_generator->resume_label = -1;
                      __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/tensor.pxi":1344
 *         return frombytes(self.stp.dim_name(i))
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def dim_names(self):
 *         names_tuple = tuple(self.stp.dim_names())
*/

                    static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSFTensor_9dim_names___get__(struct __pyx_obj_7pyarrow_3lib_SparseCSFTensor *__pyx_v_self) {
                      PyObject *__pyx_v_names_tuple = NULL;
                      PyObject *__pyx_gb_7pyarrow_3lib_15SparseCSFTensor_9dim_names_7__get___2generator20 = 0;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__get__", 0);

                      /* "pyarrow/tensor.pxi":1346
 *     @property
 *     def dim_names(self):
 *         names_tuple = tuple(self.stp.dim_names())             # <<<<<<<<<<<<<<
 *         return tuple(frombytes(x) for x in names_tuple)
 * 
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "stp");
                        __PYX_ERR(5, 1346, __pyx_L1_error)
                      }
                      __pyx_t_1 = __pyx_convert_vector_to_py_std_3a__3a_string(__pyx_v_self->stp->dim_names()); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 1346, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_t_2 = __Pyx_PySequence_Tuple(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1346, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_2);
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      __pyx_v_names_tuple = ((PyObject*)__pyx_t_2);
                      __pyx_t_2 = 0;

                      /* "pyarrow/tensor.pxi":1347
 *     def dim_names(self):
 *         names_tuple = tuple(self.stp.dim_names())
 *         return tuple(frombytes(x) for x in names_tuple)             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
                      __Pyx_XDECREF(__pyx_r);
                      __pyx_t_2 = __pyx_pf_7pyarrow_3lib_15SparseCSFTensor_9dim_names_7__get___genexpr(NULL, __pyx_v_names_tuple); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1347, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_2);
                      __pyx_t_1 = __Pyx_PySequence_Tuple(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 1347, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                      __pyx_r = __pyx_t_1;
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/tensor.pxi":1344
 *         return frombytes(self.stp.dim_name(i))
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def dim_names(self):
 *         names_tuple = tuple(self.stp.dim_names())
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_AddTraceback("pyarrow.lib.SparseCSFTensor.dim_names.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XDECREF(__pyx_v_names_tuple);
                      __Pyx_XDECREF(__pyx_gb_7pyarrow_3lib_15SparseCSFTensor_9dim_names_7__get___2generator20);
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/tensor.pxi":1349
 *         return tuple(frombytes(x) for x in names_tuple)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def non_zero_length(self):
 *         return self.stp.non_zero_length()
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSFTensor_15non_zero_length_1__get__(PyObject *__pyx_v_self); /*proto*/
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSFTensor_15non_zero_length_1__get__(PyObject *__pyx_v_self) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_15SparseCSFTensor_15non_zero_length___get__(((struct __pyx_obj_7pyarrow_3lib_SparseCSFTensor *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSFTensor_15non_zero_length___get__(struct __pyx_obj_7pyarrow_3lib_SparseCSFTensor *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__get__", 0);

                      /* "pyarrow/tensor.pxi":1351
 *     @property
 *     def non_zero_length(self):
 *         return self.stp.non_zero_length()             # <<<<<<<<<<<<<<
*/
                      __Pyx_XDECREF(__pyx_r);
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "stp");
                        __PYX_ERR(5, 1351, __pyx_L1_error)
                      }
                      __pyx_t_1 = __Pyx_PyLong_From_int64_t(__pyx_v_self->stp->non_zero_length()); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 1351, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_r = __pyx_t_1;
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/tensor.pxi":1349
 *         return tuple(frombytes(x) for x in names_tuple)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def non_zero_length(self):
 *         return self.stp.non_zero_length()
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_AddTraceback("pyarrow.lib.SparseCSFTensor.non_zero_length.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/lib.pxd":349
 * 
 *     cdef readonly:
 *         DataType type             # <<<<<<<<<<<<<<
 * 
 *     cdef void init(self, const shared_ptr[CSparseCSFTensor]& sp_sparse_tensor)
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSFTensor_4type_1__get__(PyObject *__pyx_v_self); /*proto*/
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSFTensor_4type_1__get__(PyObject *__pyx_v_self) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_15SparseCSFTensor_4type___get__(((struct __pyx_obj_7pyarrow_3lib_SparseCSFTensor *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSFTensor_4type___get__(struct __pyx_obj_7pyarrow_3lib_SparseCSFTensor *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__get__", 0);
                      __Pyx_XDECREF(__pyx_r);
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "type");
                        __PYX_ERR(15, 349, __pyx_L1_error)
                      }
                      __Pyx_INCREF((PyObject *)__pyx_v_self->type);
                      __pyx_r = ((PyObject *)__pyx_v_self->type);
                      goto __pyx_L0;

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib.SparseCSFTensor.type.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.sp_sparse_tensor,self.stp cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSFTensor_21__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_15SparseCSFTensor_20__reduce_cython__, "SparseCSFTensor.__reduce_cython__(self)");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_15SparseCSFTensor_21__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15SparseCSFTensor_21__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15SparseCSFTensor_20__reduce_cython__};
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSFTensor_21__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; }
                      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                      if (unlikely(__pyx_kwds_len < 0)) return NULL;
                      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;}
                      __pyx_r = __pyx_pf_7pyarrow_3lib_15SparseCSFTensor_20__reduce_cython__(((struct __pyx_obj_7pyarrow_3lib_SparseCSFTensor *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSFTensor_20__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_SparseCSFTensor *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__reduce_cython__", 0);

                      /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "self.sp_sparse_tensor,self.stp cannot be converted to a Python object for pickling"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "self.sp_sparse_tensor,self.stp cannot be converted to a Python object for pickling"
*/
                      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_self_sp_sparse_tensor_self_stp_c, 0, 0);
                      __PYX_ERR(7, 2, __pyx_L1_error)

                      /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.sp_sparse_tensor,self.stp cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib.SparseCSFTensor.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "self.sp_sparse_tensor,self.stp cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.sp_sparse_tensor,self.stp cannot be converted to a Python object for pickling"
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSFTensor_23__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_15SparseCSFTensor_22__setstate_cython__, "SparseCSFTensor.__setstate_cython__(self, __pyx_state)");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_15SparseCSFTensor_23__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15SparseCSFTensor_23__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15SparseCSFTensor_22__setstate_cython__};
                    static PyObject *__pyx_pw_7pyarrow_3lib_15SparseCSFTensor_23__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[1] = {0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(7, 3, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(7, 3, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(7, 3, __pyx_L3_error)
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(7, 3, __pyx_L3_error) }
                          }
                        } else if (unlikely(__pyx_nargs != 1)) {
                          goto __pyx_L5_argtuple_error;
                        } else {
                          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(7, 3, __pyx_L3_error)
                        }
                        __pyx_v___pyx_state = values[0];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(7, 3, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.SparseCSFTensor.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_15SparseCSFTensor_22__setstate_cython__(((struct __pyx_obj_7pyarrow_3lib_SparseCSFTensor *)__pyx_v_self), __pyx_v___pyx_state);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_15SparseCSFTensor_22__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_SparseCSFTensor *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__setstate_cython__", 0);

                      /* "(tree fragment)":4
 *     raise TypeError, "self.sp_sparse_tensor,self.stp cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "self.sp_sparse_tensor,self.stp cannot be converted to a Python object for pickling"             # <<<<<<<<<<<<<<
*/
                      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_self_sp_sparse_tensor_self_stp_c, 0, 0);
                      __PYX_ERR(7, 4, __pyx_L1_error)

                      /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "self.sp_sparse_tensor,self.stp cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.sp_sparse_tensor,self.stp cannot be converted to a Python object for pickling"
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib.SparseCSFTensor.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/_dlpack.pxi":22
 * 
 * 
 * cdef void dlpack_pycapsule_deleter(object dltensor) noexcept:             # <<<<<<<<<<<<<<
 *     cdef DLManagedTensor* dlm_tensor
 *     cdef PyObject* err_type
*/

                    static void __pyx_f_7pyarrow_3lib_dlpack_pycapsule_deleter(PyObject *__pyx_v_dltensor) {
                      DLManagedTensor *__pyx_v_dlm_tensor;
                      PyObject *__pyx_v_err_type;
                      PyObject *__pyx_v_err_value;
                      PyObject *__pyx_v_err_traceback;
                      int __pyx_t_1;
                      void *__pyx_t_2;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;

                      /* "pyarrow/_dlpack.pxi":29
 * 
 *     # Do nothing if the capsule has been consumed
 *     if cpython.PyCapsule_IsValid(dltensor, "used_dltensor"):             # <<<<<<<<<<<<<<
 *         return
 * 
*/
                      __pyx_t_1 = PyCapsule_IsValid(__pyx_v_dltensor, __pyx_k_used_dltensor);
                      if (__pyx_t_1) {

                        /* "pyarrow/_dlpack.pxi":30
 *     # Do nothing if the capsule has been consumed
 *     if cpython.PyCapsule_IsValid(dltensor, "used_dltensor"):
 *         return             # <<<<<<<<<<<<<<
 * 
 *     # An exception may be in-flight, we must save it in case
*/
                        goto __pyx_L0;

                        /* "pyarrow/_dlpack.pxi":29
 * 
 *     # Do nothing if the capsule has been consumed
 *     if cpython.PyCapsule_IsValid(dltensor, "used_dltensor"):             # <<<<<<<<<<<<<<
 *         return
 * 
*/
                      }

                      /* "pyarrow/_dlpack.pxi":34
 *     # An exception may be in-flight, we must save it in case
 *     # we create another one
 *     cpython.PyErr_Fetch(&err_type, &err_value, &err_traceback)             # <<<<<<<<<<<<<<
 * 
 *     dlm_tensor = <DLManagedTensor*>cpython.PyCapsule_GetPointer(dltensor, 'dltensor')
*/
                      PyErr_Fetch((&__pyx_v_err_type), (&__pyx_v_err_value), (&__pyx_v_err_traceback));

                      /* "pyarrow/_dlpack.pxi":36
 *     cpython.PyErr_Fetch(&err_type, &err_value, &err_traceback)
 * 
 *     dlm_tensor = <DLManagedTensor*>cpython.PyCapsule_GetPointer(dltensor, 'dltensor')             # <<<<<<<<<<<<<<
 *     if dlm_tensor == NULL:
 *         cpython.PyErr_WriteUnraisable(dltensor)
*/
                      __pyx_t_2 = PyCapsule_GetPointer(__pyx_v_dltensor, __pyx_k_dltensor); if (unlikely(__pyx_t_2 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(18, 36, __pyx_L1_error)
                      __pyx_v_dlm_tensor = ((DLManagedTensor *)__pyx_t_2);

                      /* "pyarrow/_dlpack.pxi":37
 * 
 *     dlm_tensor = <DLManagedTensor*>cpython.PyCapsule_GetPointer(dltensor, 'dltensor')
 *     if dlm_tensor == NULL:             # <<<<<<<<<<<<<<
 *         cpython.PyErr_WriteUnraisable(dltensor)
 *     # The deleter can be NULL if there is no way for the caller
*/
                      __pyx_t_1 = (__pyx_v_dlm_tensor == NULL);
                      if (__pyx_t_1) {

                        /* "pyarrow/_dlpack.pxi":38
 *     dlm_tensor = <DLManagedTensor*>cpython.PyCapsule_GetPointer(dltensor, 'dltensor')
 *     if dlm_tensor == NULL:
 *         cpython.PyErr_WriteUnraisable(dltensor)             # <<<<<<<<<<<<<<
 *     # The deleter can be NULL if there is no way for the caller
 *     # to provide a reasonable destructor
*/
                        PyErr_WriteUnraisable(__pyx_v_dltensor);

                        /* "pyarrow/_dlpack.pxi":37
 * 
 *     dlm_tensor = <DLManagedTensor*>cpython.PyCapsule_GetPointer(dltensor, 'dltensor')
 *     if dlm_tensor == NULL:             # <<<<<<<<<<<<<<
 *         cpython.PyErr_WriteUnraisable(dltensor)
 *     # The deleter can be NULL if there is no way for the caller
*/
                        goto __pyx_L4;
                      }

                      /* "pyarrow/_dlpack.pxi":41
 *     # The deleter can be NULL if there is no way for the caller
 *     # to provide a reasonable destructor
 *     elif dlm_tensor.deleter:             # <<<<<<<<<<<<<<
 *         dlm_tensor.deleter(dlm_tensor)
 *         assert (not cpython.PyErr_Occurred())
*/
                      __pyx_t_1 = (__pyx_v_dlm_tensor->deleter != 0);
                      if (__pyx_t_1) {

                        /* "pyarrow/_dlpack.pxi":42
 *     # to provide a reasonable destructor
 *     elif dlm_tensor.deleter:
 *         dlm_tensor.deleter(dlm_tensor)             # <<<<<<<<<<<<<<
 *         assert (not cpython.PyErr_Occurred())
 * 
*/
                        __pyx_v_dlm_tensor->deleter(__pyx_v_dlm_tensor);

                        /* "pyarrow/_dlpack.pxi":43
 *     elif dlm_tensor.deleter:
 *         dlm_tensor.deleter(dlm_tensor)
 *         assert (not cpython.PyErr_Occurred())             # <<<<<<<<<<<<<<
 * 
 *     # Set the error indicator from err_type, err_value, err_traceback
*/
                        #ifndef CYTHON_WITHOUT_ASSERTIONS
                        if (unlikely(__pyx_assertions_enabled())) {
                          __pyx_t_1 = (!(PyErr_Occurred() != 0));
                          if (unlikely(!__pyx_t_1)) {
                            __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
                            __PYX_ERR(18, 43, __pyx_L1_error)
                          }
                        }
                        #else
                        if ((1)); else __PYX_ERR(18, 43, __pyx_L1_error)
                        #endif

                        /* "pyarrow/_dlpack.pxi":41
 *     # The deleter can be NULL if there is no way for the caller
 *     # to provide a reasonable destructor
 *     elif dlm_tensor.deleter:             # <<<<<<<<<<<<<<
 *         dlm_tensor.deleter(dlm_tensor)
 *         assert (not cpython.PyErr_Occurred())
*/
                      }
                      __pyx_L4:;

                      /* "pyarrow/_dlpack.pxi":46
 * 
 *     # Set the error indicator from err_type, err_value, err_traceback
 *     cpython.PyErr_Restore(err_type, err_value, err_traceback)             # <<<<<<<<<<<<<<
*/
                      PyErr_Restore(__pyx_v_err_type, __pyx_v_err_value, __pyx_v_err_traceback);

                      /* "pyarrow/_dlpack.pxi":22
 * 
 * 
 * cdef void dlpack_pycapsule_deleter(object dltensor) noexcept:             # <<<<<<<<<<<<<<
 *     cdef DLManagedTensor* dlm_tensor
 *     cdef PyObject* err_type
*/

                      /* function exit code */
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __Pyx_WriteUnraisable("pyarrow.lib.dlpack_pycapsule_deleter", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
                      __pyx_L0:;
                    }

                    /* "pyarrow/io.pxi":49
 * 
 * 
 * def have_libhdfs():             # <<<<<<<<<<<<<<
 *     """
 *     Return true if HDFS (HadoopFileSystem) library is set up correctly.
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_235have_libhdfs(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_234have_libhdfs, "have_libhdfs()\n\nReturn true if HDFS (HadoopFileSystem) library is set up correctly.");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_235have_libhdfs = {"have_libhdfs", (PyCFunction)__pyx_pw_7pyarrow_3lib_235have_libhdfs, METH_NOARGS, __pyx_doc_7pyarrow_3lib_234have_libhdfs};
                    static PyObject *__pyx_pw_7pyarrow_3lib_235have_libhdfs(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("have_libhdfs (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_234have_libhdfs(__pyx_self);

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_234have_libhdfs(CYTHON_UNUSED PyObject *__pyx_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      PyObject *__pyx_t_3 = NULL;
                      int __pyx_t_4;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("have_libhdfs", 0);

                      /* "pyarrow/io.pxi":53
 *     Return true if HDFS (HadoopFileSystem) library is set up correctly.
 *     """
 *     try:             # <<<<<<<<<<<<<<
 *         with nogil:
 *             check_status(HaveLibHdfs())
*/
                      {
                        __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:*/ {

                          /* "pyarrow/io.pxi":54
 *     """
 *     try:
 *         with nogil:             # <<<<<<<<<<<<<<
 *             check_status(HaveLibHdfs())
 *         return True
*/
                          {
                              PyThreadState * _save;
                              _save = PyEval_SaveThread();
                              __Pyx_FastGIL_Remember();
                              /*try:*/ {

                                /* "pyarrow/io.pxi":55
 *     try:
 *         with nogil:
 *             check_status(HaveLibHdfs())             # <<<<<<<<<<<<<<
 *         return True
 *     except Exception:
*/
                                __pyx_t_4 = __pyx_f_7pyarrow_3lib_check_status(arrow::io::HaveLibHdfs()); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(6, 55, __pyx_L10_error)
                              }

                              /* "pyarrow/io.pxi":54
 *     """
 *     try:
 *         with nogil:             # <<<<<<<<<<<<<<
 *             check_status(HaveLibHdfs())
 *         return True
*/
                              /*finally:*/ {
                                /*normal exit:*/{
                                  __Pyx_FastGIL_Forget();
                                  PyEval_RestoreThread(_save);
                                  goto __pyx_L11;
                                }
                                __pyx_L10_error: {
                                  __Pyx_FastGIL_Forget();
                                  PyEval_RestoreThread(_save);
                                  goto __pyx_L3_error;
                                }
                                __pyx_L11:;
                              }
                          }

                          /* "pyarrow/io.pxi":56
 *         with nogil:
 *             check_status(HaveLibHdfs())
 *         return True             # <<<<<<<<<<<<<<
 *     except Exception:
 *         return False
*/
                          __Pyx_XDECREF(__pyx_r);
                          __Pyx_INCREF(Py_True);
                          __pyx_r = Py_True;
                          goto __pyx_L7_try_return;

                          /* "pyarrow/io.pxi":53
 *     Return true if HDFS (HadoopFileSystem) library is set up correctly.
 *     """
 *     try:             # <<<<<<<<<<<<<<
 *         with nogil:
 *             check_status(HaveLibHdfs())
*/
                        }
                        __pyx_L3_error:;

                        /* "pyarrow/io.pxi":57
 *             check_status(HaveLibHdfs())
 *         return True
 *     except Exception:             # <<<<<<<<<<<<<<
 *         return False
 * 
*/
                        __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
                        if (__pyx_t_4) {
                          __Pyx_ErrRestore(0,0,0);

                          /* "pyarrow/io.pxi":58
 *         return True
 *     except Exception:
 *         return False             # <<<<<<<<<<<<<<
 * 
 * 
*/
                          __Pyx_XDECREF(__pyx_r);
                          __Pyx_INCREF(Py_False);
                          __pyx_r = Py_False;
                          goto __pyx_L6_except_return;
                        }
                        goto __pyx_L5_except_error;

                        /* "pyarrow/io.pxi":53
 *     Return true if HDFS (HadoopFileSystem) library is set up correctly.
 *     """
 *     try:             # <<<<<<<<<<<<<<
 *         with nogil:
 *             check_status(HaveLibHdfs())
*/
                        __pyx_L5_except_error:;
                        __Pyx_XGIVEREF(__pyx_t_1);
                        __Pyx_XGIVEREF(__pyx_t_2);
                        __Pyx_XGIVEREF(__pyx_t_3);
                        __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
                        goto __pyx_L1_error;
                        __pyx_L7_try_return:;
                        __Pyx_XGIVEREF(__pyx_t_1);
                        __Pyx_XGIVEREF(__pyx_t_2);
                        __Pyx_XGIVEREF(__pyx_t_3);
                        __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
                        goto __pyx_L0;
                        __pyx_L6_except_return:;
                        __Pyx_XGIVEREF(__pyx_t_1);
                        __Pyx_XGIVEREF(__pyx_t_2);
                        __Pyx_XGIVEREF(__pyx_t_3);
                        __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
                        goto __pyx_L0;
                      }

                      /* "pyarrow/io.pxi":49
 * 
 * 
 * def have_libhdfs():             # <<<<<<<<<<<<<<
 *     """
 *     Return true if HDFS (HadoopFileSystem) library is set up correctly.
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib.have_libhdfs", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":61
 * 
 * 
 * def io_thread_count():             # <<<<<<<<<<<<<<
 *     """
 *     Return the number of threads to use for I/O operations.
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_237io_thread_count(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_236io_thread_count, "io_thread_count()\n\nReturn the number of threads to use for I/O operations.\n\nMany operations, such as scanning a dataset, will implicitly make\nuse of this pool. The number of threads is set to a fixed value at\nstartup. It can be modified at runtime by calling\n:func:`set_io_thread_count()`.\n\nSee Also\n--------\nset_io_thread_count : Modify the size of this pool.\ncpu_count : The analogous function for the CPU thread pool.");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_237io_thread_count = {"io_thread_count", (PyCFunction)__pyx_pw_7pyarrow_3lib_237io_thread_count, METH_NOARGS, __pyx_doc_7pyarrow_3lib_236io_thread_count};
                    static PyObject *__pyx_pw_7pyarrow_3lib_237io_thread_count(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("io_thread_count (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_236io_thread_count(__pyx_self);

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_236io_thread_count(CYTHON_UNUSED PyObject *__pyx_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("io_thread_count", 0);

                      /* "pyarrow/io.pxi":75
 *     cpu_count : The analogous function for the CPU thread pool.
 *     """
 *     return GetIOThreadPoolCapacity()             # <<<<<<<<<<<<<<
 * 
 * 
*/
                      __Pyx_XDECREF(__pyx_r);
                      __pyx_t_1 = __Pyx_PyLong_From_int(arrow::io::GetIOThreadPoolCapacity()); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 75, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_r = __pyx_t_1;
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/io.pxi":61
 * 
 * 
 * def io_thread_count():             # <<<<<<<<<<<<<<
 *     """
 *     Return the number of threads to use for I/O operations.
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_AddTraceback("pyarrow.lib.io_thread_count", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":78
 * 
 * 
 * def set_io_thread_count(int count):             # <<<<<<<<<<<<<<
 *     """
 *     Set the number of threads to use for I/O operations.
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_239set_io_thread_count(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_238set_io_thread_count, "set_io_thread_count(int count)\n\nSet the number of threads to use for I/O operations.\n\nMany operations, such as scanning a dataset, will implicitly make\nuse of this pool.\n\nParameters\n----------\ncount : int\n    The max number of threads that may be used for I/O.\n    Must be positive.\n\nSee Also\n--------\nio_thread_count : Get the size of this pool.\nset_cpu_count : The analogous function for the CPU thread pool.");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_239set_io_thread_count = {"set_io_thread_count", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_239set_io_thread_count, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_238set_io_thread_count};
                    static PyObject *__pyx_pw_7pyarrow_3lib_239set_io_thread_count(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      int __pyx_v_count;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[1] = {0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("set_io_thread_count (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_count,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(6, 78, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 78, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "set_io_thread_count", 0) < (0)) __PYX_ERR(6, 78, __pyx_L3_error)
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("set_io_thread_count", 1, 1, 1, i); __PYX_ERR(6, 78, __pyx_L3_error) }
                          }
                        } else if (unlikely(__pyx_nargs != 1)) {
                          goto __pyx_L5_argtuple_error;
                        } else {
                          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 78, __pyx_L3_error)
                        }
                        __pyx_v_count = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_count == (int)-1) && PyErr_Occurred())) __PYX_ERR(6, 78, __pyx_L3_error)
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("set_io_thread_count", 1, 1, 1, __pyx_nargs); __PYX_ERR(6, 78, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.set_io_thread_count", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_238set_io_thread_count(__pyx_self, __pyx_v_count);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_238set_io_thread_count(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_count) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_t_1;
                      PyObject *__pyx_t_2 = NULL;
                      PyObject *__pyx_t_3 = NULL;
                      size_t __pyx_t_4;
                      int __pyx_t_5;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("set_io_thread_count", 0);

                      /* "pyarrow/io.pxi":96
 *     set_cpu_count : The analogous function for the CPU thread pool.
 *     """
 *     if count < 1:             # <<<<<<<<<<<<<<
 *         raise ValueError("IO thread count must be strictly positive")
 *     check_status(SetIOThreadPoolCapacity(count))
*/
                      __pyx_t_1 = (__pyx_v_count < 1);
                      if (unlikely(__pyx_t_1)) {

                        /* "pyarrow/io.pxi":97
 *     """
 *     if count < 1:
 *         raise ValueError("IO thread count must be strictly positive")             # <<<<<<<<<<<<<<
 *     check_status(SetIOThreadPoolCapacity(count))
 * 
*/
                        __pyx_t_3 = NULL;
                        __pyx_t_4 = 1;
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_IO_thread_count_must_be_strictly};
                          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                          if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 97, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_2);
                        }
                        __Pyx_Raise(__pyx_t_2, 0, 0, 0);
                        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                        __PYX_ERR(6, 97, __pyx_L1_error)

                        /* "pyarrow/io.pxi":96
 *     set_cpu_count : The analogous function for the CPU thread pool.
 *     """
 *     if count < 1:             # <<<<<<<<<<<<<<
 *         raise ValueError("IO thread count must be strictly positive")
 *     check_status(SetIOThreadPoolCapacity(count))
*/
                      }

                      /* "pyarrow/io.pxi":98
 *     if count < 1:
 *         raise ValueError("IO thread count must be strictly positive")
 *     check_status(SetIOThreadPoolCapacity(count))             # <<<<<<<<<<<<<<
 * 
 * 
*/
                      __pyx_t_5 = __pyx_f_7pyarrow_3lib_check_status(arrow::io::SetIOThreadPoolCapacity(__pyx_v_count)); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(6, 98, __pyx_L1_error)

                      /* "pyarrow/io.pxi":78
 * 
 * 
 * def set_io_thread_count(int count):             # <<<<<<<<<<<<<<
 *     """
 *     Set the number of threads to use for I/O operations.
*/

                      /* 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_AddTraceback("pyarrow.lib.set_io_thread_count", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":121
 *     _default_chunk_size = 256 * 1024
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self.own_file = False
 *         self.is_readable = False
*/

                    /* Python wrapper */
                    static int __pyx_pw_7pyarrow_3lib_10NativeFile_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
                    static int __pyx_pw_7pyarrow_3lib_10NativeFile_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      int __pyx_r;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, __pyx_nargs); return -1; }
                      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
                      if (unlikely(__pyx_kwds_len < 0)) return -1;
                      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__cinit__", __pyx_kwds); return -1;}
                      __pyx_r = __pyx_pf_7pyarrow_3lib_10NativeFile___cinit__(((struct __pyx_obj_7pyarrow_3lib_NativeFile *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static int __pyx_pf_7pyarrow_3lib_10NativeFile___cinit__(struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_self) {
                      int __pyx_r;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;

                      /* "pyarrow/io.pxi":122
 * 
 *     def __cinit__(self):
 *         self.own_file = False             # <<<<<<<<<<<<<<
 *         self.is_readable = False
 *         self.is_writable = False
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "own_file");
                        __PYX_ERR(6, 122, __pyx_L1_error)
                      }
                      __pyx_v_self->own_file = 0;

                      /* "pyarrow/io.pxi":123
 *     def __cinit__(self):
 *         self.own_file = False
 *         self.is_readable = False             # <<<<<<<<<<<<<<
 *         self.is_writable = False
 *         self.is_seekable = False
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "is_readable");
                        __PYX_ERR(6, 123, __pyx_L1_error)
                      }
                      __pyx_v_self->is_readable = 0;

                      /* "pyarrow/io.pxi":124
 *         self.own_file = False
 *         self.is_readable = False
 *         self.is_writable = False             # <<<<<<<<<<<<<<
 *         self.is_seekable = False
 *         self._is_appending = False
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "is_writable");
                        __PYX_ERR(6, 124, __pyx_L1_error)
                      }
                      __pyx_v_self->is_writable = 0;

                      /* "pyarrow/io.pxi":125
 *         self.is_readable = False
 *         self.is_writable = False
 *         self.is_seekable = False             # <<<<<<<<<<<<<<
 *         self._is_appending = False
 * 
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "is_seekable");
                        __PYX_ERR(6, 125, __pyx_L1_error)
                      }
                      __pyx_v_self->is_seekable = 0;

                      /* "pyarrow/io.pxi":126
 *         self.is_writable = False
 *         self.is_seekable = False
 *         self._is_appending = False             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_is_appending");
                        __PYX_ERR(6, 126, __pyx_L1_error)
                      }
                      __pyx_v_self->_is_appending = 0;

                      /* "pyarrow/io.pxi":121
 *     _default_chunk_size = 256 * 1024
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self.own_file = False
 *         self.is_readable = False
*/

                      /* function exit code */
                      __pyx_r = 0;
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib.NativeFile.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = -1;
                      __pyx_L0:;
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":128
 *         self._is_appending = False
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         if self.own_file:
 *             self.close()
*/

                    /* Python wrapper */
                    static void __pyx_pw_7pyarrow_3lib_10NativeFile_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
                    static void __pyx_pw_7pyarrow_3lib_10NativeFile_3__dealloc__(PyObject *__pyx_v_self) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_pf_7pyarrow_3lib_10NativeFile_2__dealloc__(((struct __pyx_obj_7pyarrow_3lib_NativeFile *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                    }

                    static void __pyx_pf_7pyarrow_3lib_10NativeFile_2__dealloc__(struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_self) {
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      size_t __pyx_t_3;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__dealloc__", 0);

                      /* "pyarrow/io.pxi":129
 * 
 *     def __dealloc__(self):
 *         if self.own_file:             # <<<<<<<<<<<<<<
 *             self.close()
 * 
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "own_file");
                        __PYX_ERR(6, 129, __pyx_L1_error)
                      }
                      if (__pyx_v_self->own_file) {

                        /* "pyarrow/io.pxi":130
 *     def __dealloc__(self):
 *         if self.own_file:
 *             self.close()             # <<<<<<<<<<<<<<
 * 
 *     def __enter__(self):
*/
                        __pyx_t_2 = ((PyObject *)__pyx_v_self);
                        __Pyx_INCREF(__pyx_t_2);
                        __pyx_t_3 = 0;
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
                          __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_close, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                          if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 130, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_1);
                        }
                        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

                        /* "pyarrow/io.pxi":129
 * 
 *     def __dealloc__(self):
 *         if self.own_file:             # <<<<<<<<<<<<<<
 *             self.close()
 * 
*/
                      }

                      /* "pyarrow/io.pxi":128
 *         self._is_appending = False
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         if self.own_file:
 *             self.close()
*/

                      /* function exit code */
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_WriteUnraisable("pyarrow.lib.NativeFile.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
                      __pyx_L0:;
                      __Pyx_RefNannyFinishContext();
                    }

                    /* "pyarrow/io.pxi":132
 *             self.close()
 * 
 *     def __enter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_10NativeFile_5__enter__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_10NativeFile_4__enter__, "NativeFile.__enter__(self)");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_10NativeFile_5__enter__ = {"__enter__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10NativeFile_5__enter__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10NativeFile_4__enter__};
                    static PyObject *__pyx_pw_7pyarrow_3lib_10NativeFile_5__enter__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__enter__ (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__enter__", 1, 0, 0, __pyx_nargs); return NULL; }
                      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                      if (unlikely(__pyx_kwds_len < 0)) return NULL;
                      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__enter__", __pyx_kwds); return NULL;}
                      __pyx_r = __pyx_pf_7pyarrow_3lib_10NativeFile_4__enter__(((struct __pyx_obj_7pyarrow_3lib_NativeFile *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_10NativeFile_4__enter__(struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__enter__", 0);

                      /* "pyarrow/io.pxi":133
 * 
 *     def __enter__(self):
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def __exit__(self, exc_type, exc_value, tb):
*/
                      __Pyx_XDECREF(__pyx_r);
                      __Pyx_INCREF((PyObject *)__pyx_v_self);
                      __pyx_r = ((PyObject *)__pyx_v_self);
                      goto __pyx_L0;

                      /* "pyarrow/io.pxi":132
 *             self.close()
 * 
 *     def __enter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
*/

                      /* function exit code */
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":135
 *         return self
 * 
 *     def __exit__(self, exc_type, exc_value, tb):             # <<<<<<<<<<<<<<
 *         self.close()
 * 
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_10NativeFile_7__exit__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_10NativeFile_6__exit__, "NativeFile.__exit__(self, exc_type, exc_value, tb)");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_10NativeFile_7__exit__ = {"__exit__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10NativeFile_7__exit__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10NativeFile_6__exit__};
                    static PyObject *__pyx_pw_7pyarrow_3lib_10NativeFile_7__exit__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      CYTHON_UNUSED PyObject *__pyx_v_exc_type = 0;
                      CYTHON_UNUSED PyObject *__pyx_v_exc_value = 0;
                      CYTHON_UNUSED PyObject *__pyx_v_tb = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[3] = {0,0,0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__exit__ (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_exc_type,&__pyx_mstate_global->__pyx_n_u_exc_value,&__pyx_mstate_global->__pyx_n_u_tb,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(6, 135, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  3:
                            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(6, 135, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  2:
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(6, 135, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 135, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__exit__", 0) < (0)) __PYX_ERR(6, 135, __pyx_L3_error)
                          for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, i); __PYX_ERR(6, 135, __pyx_L3_error) }
                          }
                        } else if (unlikely(__pyx_nargs != 3)) {
                          goto __pyx_L5_argtuple_error;
                        } else {
                          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 135, __pyx_L3_error)
                          values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(6, 135, __pyx_L3_error)
                          values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(6, 135, __pyx_L3_error)
                        }
                        __pyx_v_exc_type = values[0];
                        __pyx_v_exc_value = values[1];
                        __pyx_v_tb = values[2];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, __pyx_nargs); __PYX_ERR(6, 135, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.NativeFile.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_10NativeFile_6__exit__(((struct __pyx_obj_7pyarrow_3lib_NativeFile *)__pyx_v_self), __pyx_v_exc_type, __pyx_v_exc_value, __pyx_v_tb);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_10NativeFile_6__exit__(struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_exc_type, CYTHON_UNUSED PyObject *__pyx_v_exc_value, CYTHON_UNUSED PyObject *__pyx_v_tb) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      size_t __pyx_t_3;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__exit__", 0);

                      /* "pyarrow/io.pxi":136
 * 
 *     def __exit__(self, exc_type, exc_value, tb):
 *         self.close()             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
*/
                      __pyx_t_2 = ((PyObject *)__pyx_v_self);
                      __Pyx_INCREF(__pyx_t_2);
                      __pyx_t_3 = 0;
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
                        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_close, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 136, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

                      /* "pyarrow/io.pxi":135
 *         return self
 * 
 *     def __exit__(self, exc_type, exc_value, tb):             # <<<<<<<<<<<<<<
 *         self.close()
 * 
*/

                      /* function exit code */
                      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_AddTraceback("pyarrow.lib.NativeFile.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":138
 *         self.close()
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         name = f"pyarrow.{self.__class__.__name__}"
 *         return (f"<{name} "
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_10NativeFile_9__repr__(PyObject *__pyx_v_self); /*proto*/
                    static PyObject *__pyx_pw_7pyarrow_3lib_10NativeFile_9__repr__(PyObject *__pyx_v_self) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_10NativeFile_8__repr__(((struct __pyx_obj_7pyarrow_3lib_NativeFile *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_10NativeFile_8__repr__(struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_self) {
                      PyObject *__pyx_v_name = NULL;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      PyObject *__pyx_t_3 = NULL;
                      PyObject *__pyx_t_4 = NULL;
                      PyObject *__pyx_t_5 = NULL;
                      PyObject *__pyx_t_6[13];
                      PyObject *__pyx_t_7 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__repr__", 0);

                      /* "pyarrow/io.pxi":139
 * 
 *     def __repr__(self):
 *         name = f"pyarrow.{self.__class__.__name__}"             # <<<<<<<<<<<<<<
 *         return (f"<{name} "
 *                 f"closed={self.closed} "
*/
                      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 139, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_name_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 139, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_2);
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_t_2, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 139, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                      __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_pyarrow, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 139, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_2);
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      __pyx_v_name = ((PyObject*)__pyx_t_2);
                      __pyx_t_2 = 0;

                      /* "pyarrow/io.pxi":140
 *     def __repr__(self):
 *         name = f"pyarrow.{self.__class__.__name__}"
 *         return (f"<{name} "             # <<<<<<<<<<<<<<
 *                 f"closed={self.closed} "
 *                 f"own_file={self.own_file} "
*/
                      __Pyx_XDECREF(__pyx_r);

                      /* "pyarrow/io.pxi":141
 *         name = f"pyarrow.{self.__class__.__name__}"
 *         return (f"<{name} "
 *                 f"closed={self.closed} "             # <<<<<<<<<<<<<<
 *                 f"own_file={self.own_file} "
 *                 f"is_seekable={self.is_seekable} "
*/
                      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_closed_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 141, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_2);
                      __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_t_2, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 141, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

                      /* "pyarrow/io.pxi":142
 *         return (f"<{name} "
 *                 f"closed={self.closed} "
 *                 f"own_file={self.own_file} "             # <<<<<<<<<<<<<<
 *                 f"is_seekable={self.is_seekable} "
 *                 f"is_writable={self.is_writable} "
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "own_file");
                        __PYX_ERR(6, 142, __pyx_L1_error)
                      }
                      __pyx_t_2 = __Pyx_PyUnicode_FromBInt_bint(__pyx_v_self->own_file); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 142, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_2);

                      /* "pyarrow/io.pxi":143
 *                 f"closed={self.closed} "
 *                 f"own_file={self.own_file} "
 *                 f"is_seekable={self.is_seekable} "             # <<<<<<<<<<<<<<
 *                 f"is_writable={self.is_writable} "
 *                 f"is_readable={self.is_readable}>")
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "is_seekable");
                        __PYX_ERR(6, 143, __pyx_L1_error)
                      }
                      __pyx_t_3 = __Pyx_PyUnicode_FromBInt_bint(__pyx_v_self->is_seekable); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 143, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_3);

                      /* "pyarrow/io.pxi":144
 *                 f"own_file={self.own_file} "
 *                 f"is_seekable={self.is_seekable} "
 *                 f"is_writable={self.is_writable} "             # <<<<<<<<<<<<<<
 *                 f"is_readable={self.is_readable}>")
 * 
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "is_writable");
                        __PYX_ERR(6, 144, __pyx_L1_error)
                      }
                      __pyx_t_4 = __Pyx_PyUnicode_FromBInt_bint(__pyx_v_self->is_writable); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 144, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_4);

                      /* "pyarrow/io.pxi":145
 *                 f"is_seekable={self.is_seekable} "
 *                 f"is_writable={self.is_writable} "
 *                 f"is_readable={self.is_readable}>")             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "is_readable");
                        __PYX_ERR(6, 145, __pyx_L1_error)
                      }
                      __pyx_t_5 = __Pyx_PyUnicode_FromBInt_bint(__pyx_v_self->is_readable); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 145, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_5);
                      __pyx_t_6[0] = __pyx_mstate_global->__pyx_kp_u__4;
                      __pyx_t_6[1] = __pyx_v_name;
                      __pyx_t_6[2] = __pyx_mstate_global->__pyx_kp_u_closed;
                      __pyx_t_6[3] = __pyx_t_1;
                      __pyx_t_6[4] = __pyx_mstate_global->__pyx_kp_u_own_file;
                      __pyx_t_6[5] = __pyx_t_2;
                      __pyx_t_6[6] = __pyx_mstate_global->__pyx_kp_u_is_seekable;
                      __pyx_t_6[7] = __pyx_t_3;
                      __pyx_t_6[8] = __pyx_mstate_global->__pyx_kp_u_is_writable;
                      __pyx_t_6[9] = __pyx_t_4;
                      __pyx_t_6[10] = __pyx_mstate_global->__pyx_kp_u_is_readable;
                      __pyx_t_6[11] = __pyx_t_5;
                      __pyx_t_6[12] = __pyx_mstate_global->__pyx_kp_u__5;

                      /* "pyarrow/io.pxi":140
 *     def __repr__(self):
 *         name = f"pyarrow.{self.__class__.__name__}"
 *         return (f"<{name} "             # <<<<<<<<<<<<<<
 *                 f"closed={self.closed} "
 *                 f"own_file={self.own_file} "
*/
                      __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_6, 13, 1 * 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_v_name) + 8 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1) + 10 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2) + 13 * 3 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_v_name) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1));
                      if (unlikely(!__pyx_t_7)) __PYX_ERR(6, 140, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_7);
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                      __pyx_r = __pyx_t_7;
                      __pyx_t_7 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/io.pxi":138
 *         self.close()
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         name = f"pyarrow.{self.__class__.__name__}"
 *         return (f"<{name} "
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_XDECREF(__pyx_t_4);
                      __Pyx_XDECREF(__pyx_t_5);
                      __Pyx_XDECREF(__pyx_t_7);
                      __Pyx_AddTraceback("pyarrow.lib.NativeFile.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XDECREF(__pyx_v_name);
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":147
 *                 f"is_readable={self.is_readable}>")
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def mode(self):
 *         """
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_10NativeFile_4mode_1__get__(PyObject *__pyx_v_self); /*proto*/
                    static PyObject *__pyx_pw_7pyarrow_3lib_10NativeFile_4mode_1__get__(PyObject *__pyx_v_self) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_10NativeFile_4mode___get__(((struct __pyx_obj_7pyarrow_3lib_NativeFile *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_10NativeFile_4mode___get__(struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_t_1;
                      PyObject *__pyx_t_2 = NULL;
                      PyObject *__pyx_t_3 = NULL;
                      size_t __pyx_t_4;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__get__", 0);

                      /* "pyarrow/io.pxi":158
 *         """
 *         # Emulate built-in file modes
 *         if self.is_readable and self.is_writable:             # <<<<<<<<<<<<<<
 *             return 'rb+'
 *         elif self.is_readable:
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "is_readable");
                        __PYX_ERR(6, 158, __pyx_L1_error)
                      }
                      if (__pyx_v_self->is_readable) {
                      } else {
                        __pyx_t_1 = __pyx_v_self->is_readable;
                        goto __pyx_L4_bool_binop_done;
                      }
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "is_writable");
                        __PYX_ERR(6, 158, __pyx_L1_error)
                      }
                      __pyx_t_1 = __pyx_v_self->is_writable;
                      __pyx_L4_bool_binop_done:;
                      if (__pyx_t_1) {

                        /* "pyarrow/io.pxi":159
 *         # Emulate built-in file modes
 *         if self.is_readable and self.is_writable:
 *             return 'rb+'             # <<<<<<<<<<<<<<
 *         elif self.is_readable:
 *             return 'rb'
*/
                        __Pyx_XDECREF(__pyx_r);
                        __Pyx_INCREF(__pyx_mstate_global->__pyx_kp_u_rb);
                        __pyx_r = __pyx_mstate_global->__pyx_kp_u_rb;
                        goto __pyx_L0;

                        /* "pyarrow/io.pxi":158
 *         """
 *         # Emulate built-in file modes
 *         if self.is_readable and self.is_writable:             # <<<<<<<<<<<<<<
 *             return 'rb+'
 *         elif self.is_readable:
*/
                      }

                      /* "pyarrow/io.pxi":160
 *         if self.is_readable and self.is_writable:
 *             return 'rb+'
 *         elif self.is_readable:             # <<<<<<<<<<<<<<
 *             return 'rb'
 *         elif self.is_writable and self._is_appending:
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "is_readable");
                        __PYX_ERR(6, 160, __pyx_L1_error)
                      }
                      if (__pyx_v_self->is_readable) {

                        /* "pyarrow/io.pxi":161
 *             return 'rb+'
 *         elif self.is_readable:
 *             return 'rb'             # <<<<<<<<<<<<<<
 *         elif self.is_writable and self._is_appending:
 *             return 'ab'
*/
                        __Pyx_XDECREF(__pyx_r);
                        __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_rb_2);
                        __pyx_r = __pyx_mstate_global->__pyx_n_u_rb_2;
                        goto __pyx_L0;

                        /* "pyarrow/io.pxi":160
 *         if self.is_readable and self.is_writable:
 *             return 'rb+'
 *         elif self.is_readable:             # <<<<<<<<<<<<<<
 *             return 'rb'
 *         elif self.is_writable and self._is_appending:
*/
                      }

                      /* "pyarrow/io.pxi":162
 *         elif self.is_readable:
 *             return 'rb'
 *         elif self.is_writable and self._is_appending:             # <<<<<<<<<<<<<<
 *             return 'ab'
 *         elif self.is_writable:
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "is_writable");
                        __PYX_ERR(6, 162, __pyx_L1_error)
                      }
                      if (__pyx_v_self->is_writable) {
                      } else {
                        __pyx_t_1 = __pyx_v_self->is_writable;
                        goto __pyx_L6_bool_binop_done;
                      }
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_is_appending");
                        __PYX_ERR(6, 162, __pyx_L1_error)
                      }
                      __pyx_t_1 = __pyx_v_self->_is_appending;
                      __pyx_L6_bool_binop_done:;
                      if (__pyx_t_1) {

                        /* "pyarrow/io.pxi":163
 *             return 'rb'
 *         elif self.is_writable and self._is_appending:
 *             return 'ab'             # <<<<<<<<<<<<<<
 *         elif self.is_writable:
 *             return 'wb'
*/
                        __Pyx_XDECREF(__pyx_r);
                        __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_ab);
                        __pyx_r = __pyx_mstate_global->__pyx_n_u_ab;
                        goto __pyx_L0;

                        /* "pyarrow/io.pxi":162
 *         elif self.is_readable:
 *             return 'rb'
 *         elif self.is_writable and self._is_appending:             # <<<<<<<<<<<<<<
 *             return 'ab'
 *         elif self.is_writable:
*/
                      }

                      /* "pyarrow/io.pxi":164
 *         elif self.is_writable and self._is_appending:
 *             return 'ab'
 *         elif self.is_writable:             # <<<<<<<<<<<<<<
 *             return 'wb'
 *         else:
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "is_writable");
                        __PYX_ERR(6, 164, __pyx_L1_error)
                      }
                      if (likely(__pyx_v_self->is_writable)) {

                        /* "pyarrow/io.pxi":165
 *             return 'ab'
 *         elif self.is_writable:
 *             return 'wb'             # <<<<<<<<<<<<<<
 *         else:
 *             raise ValueError('File object is malformed, has no mode')
*/
                        __Pyx_XDECREF(__pyx_r);
                        __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_wb);
                        __pyx_r = __pyx_mstate_global->__pyx_n_u_wb;
                        goto __pyx_L0;

                        /* "pyarrow/io.pxi":164
 *         elif self.is_writable and self._is_appending:
 *             return 'ab'
 *         elif self.is_writable:             # <<<<<<<<<<<<<<
 *             return 'wb'
 *         else:
*/
                      }

                      /* "pyarrow/io.pxi":167
 *             return 'wb'
 *         else:
 *             raise ValueError('File object is malformed, has no mode')             # <<<<<<<<<<<<<<
 * 
 *     def readable(self):
*/
                      /*else*/ {
                        __pyx_t_3 = NULL;
                        __pyx_t_4 = 1;
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_File_object_is_malformed_has_no};
                          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                          if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 167, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_2);
                        }
                        __Pyx_Raise(__pyx_t_2, 0, 0, 0);
                        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                        __PYX_ERR(6, 167, __pyx_L1_error)
                      }

                      /* "pyarrow/io.pxi":147
 *                 f"is_readable={self.is_readable}>")
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def mode(self):
 *         """
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_AddTraceback("pyarrow.lib.NativeFile.mode.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":169
 *             raise ValueError('File object is malformed, has no mode')
 * 
 *     def readable(self):             # <<<<<<<<<<<<<<
 *         self._assert_open()
 *         return self.is_readable
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_10NativeFile_11readable(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_10NativeFile_10readable, "NativeFile.readable(self)");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_10NativeFile_11readable = {"readable", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10NativeFile_11readable, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10NativeFile_10readable};
                    static PyObject *__pyx_pw_7pyarrow_3lib_10NativeFile_11readable(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("readable (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("readable", 1, 0, 0, __pyx_nargs); return NULL; }
                      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                      if (unlikely(__pyx_kwds_len < 0)) return NULL;
                      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("readable", __pyx_kwds); return NULL;}
                      __pyx_r = __pyx_pf_7pyarrow_3lib_10NativeFile_10readable(((struct __pyx_obj_7pyarrow_3lib_NativeFile *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_10NativeFile_10readable(struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      size_t __pyx_t_3;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("readable", 0);

                      /* "pyarrow/io.pxi":170
 * 
 *     def readable(self):
 *         self._assert_open()             # <<<<<<<<<<<<<<
 *         return self.is_readable
 * 
*/
                      __pyx_t_2 = ((PyObject *)__pyx_v_self);
                      __Pyx_INCREF(__pyx_t_2);
                      __pyx_t_3 = 0;
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
                        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_assert_open, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 170, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

                      /* "pyarrow/io.pxi":171
 *     def readable(self):
 *         self._assert_open()
 *         return self.is_readable             # <<<<<<<<<<<<<<
 * 
 *     def writable(self):
*/
                      __Pyx_XDECREF(__pyx_r);
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "is_readable");
                        __PYX_ERR(6, 171, __pyx_L1_error)
                      }
                      __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->is_readable); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 171, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_r = __pyx_t_1;
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/io.pxi":169
 *             raise ValueError('File object is malformed, has no mode')
 * 
 *     def readable(self):             # <<<<<<<<<<<<<<
 *         self._assert_open()
 *         return self.is_readable
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_AddTraceback("pyarrow.lib.NativeFile.readable", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":173
 *         return self.is_readable
 * 
 *     def writable(self):             # <<<<<<<<<<<<<<
 *         self._assert_open()
 *         return self.is_writable
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_10NativeFile_13writable(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_10NativeFile_12writable, "NativeFile.writable(self)");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_10NativeFile_13writable = {"writable", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10NativeFile_13writable, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10NativeFile_12writable};
                    static PyObject *__pyx_pw_7pyarrow_3lib_10NativeFile_13writable(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("writable (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("writable", 1, 0, 0, __pyx_nargs); return NULL; }
                      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                      if (unlikely(__pyx_kwds_len < 0)) return NULL;
                      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("writable", __pyx_kwds); return NULL;}
                      __pyx_r = __pyx_pf_7pyarrow_3lib_10NativeFile_12writable(((struct __pyx_obj_7pyarrow_3lib_NativeFile *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_10NativeFile_12writable(struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      size_t __pyx_t_3;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("writable", 0);

                      /* "pyarrow/io.pxi":174
 * 
 *     def writable(self):
 *         self._assert_open()             # <<<<<<<<<<<<<<
 *         return self.is_writable
 * 
*/
                      __pyx_t_2 = ((PyObject *)__pyx_v_self);
                      __Pyx_INCREF(__pyx_t_2);
                      __pyx_t_3 = 0;
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
                        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_assert_open, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 174, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

                      /* "pyarrow/io.pxi":175
 *     def writable(self):
 *         self._assert_open()
 *         return self.is_writable             # <<<<<<<<<<<<<<
 * 
 *     def seekable(self):
*/
                      __Pyx_XDECREF(__pyx_r);
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "is_writable");
                        __PYX_ERR(6, 175, __pyx_L1_error)
                      }
                      __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->is_writable); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 175, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_r = __pyx_t_1;
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/io.pxi":173
 *         return self.is_readable
 * 
 *     def writable(self):             # <<<<<<<<<<<<<<
 *         self._assert_open()
 *         return self.is_writable
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_AddTraceback("pyarrow.lib.NativeFile.writable", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":177
 *         return self.is_writable
 * 
 *     def seekable(self):             # <<<<<<<<<<<<<<
 *         self._assert_open()
 *         return self.is_seekable
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_10NativeFile_15seekable(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_10NativeFile_14seekable, "NativeFile.seekable(self)");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_10NativeFile_15seekable = {"seekable", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10NativeFile_15seekable, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10NativeFile_14seekable};
                    static PyObject *__pyx_pw_7pyarrow_3lib_10NativeFile_15seekable(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("seekable (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("seekable", 1, 0, 0, __pyx_nargs); return NULL; }
                      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                      if (unlikely(__pyx_kwds_len < 0)) return NULL;
                      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("seekable", __pyx_kwds); return NULL;}
                      __pyx_r = __pyx_pf_7pyarrow_3lib_10NativeFile_14seekable(((struct __pyx_obj_7pyarrow_3lib_NativeFile *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_10NativeFile_14seekable(struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      size_t __pyx_t_3;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("seekable", 0);

                      /* "pyarrow/io.pxi":178
 * 
 *     def seekable(self):
 *         self._assert_open()             # <<<<<<<<<<<<<<
 *         return self.is_seekable
 * 
*/
                      __pyx_t_2 = ((PyObject *)__pyx_v_self);
                      __Pyx_INCREF(__pyx_t_2);
                      __pyx_t_3 = 0;
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
                        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_assert_open, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 178, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

                      /* "pyarrow/io.pxi":179
 *     def seekable(self):
 *         self._assert_open()
 *         return self.is_seekable             # <<<<<<<<<<<<<<
 * 
 *     def isatty(self):
*/
                      __Pyx_XDECREF(__pyx_r);
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "is_seekable");
                        __PYX_ERR(6, 179, __pyx_L1_error)
                      }
                      __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->is_seekable); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 179, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_r = __pyx_t_1;
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/io.pxi":177
 *         return self.is_writable
 * 
 *     def seekable(self):             # <<<<<<<<<<<<<<
 *         self._assert_open()
 *         return self.is_seekable
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_AddTraceback("pyarrow.lib.NativeFile.seekable", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":181
 *         return self.is_seekable
 * 
 *     def isatty(self):             # <<<<<<<<<<<<<<
 *         self._assert_open()
 *         return False
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_10NativeFile_17isatty(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_10NativeFile_16isatty, "NativeFile.isatty(self)");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_10NativeFile_17isatty = {"isatty", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10NativeFile_17isatty, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10NativeFile_16isatty};
                    static PyObject *__pyx_pw_7pyarrow_3lib_10NativeFile_17isatty(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("isatty (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("isatty", 1, 0, 0, __pyx_nargs); return NULL; }
                      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                      if (unlikely(__pyx_kwds_len < 0)) return NULL;
                      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("isatty", __pyx_kwds); return NULL;}
                      __pyx_r = __pyx_pf_7pyarrow_3lib_10NativeFile_16isatty(((struct __pyx_obj_7pyarrow_3lib_NativeFile *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_10NativeFile_16isatty(struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      size_t __pyx_t_3;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("isatty", 0);

                      /* "pyarrow/io.pxi":182
 * 
 *     def isatty(self):
 *         self._assert_open()             # <<<<<<<<<<<<<<
 *         return False
 * 
*/
                      __pyx_t_2 = ((PyObject *)__pyx_v_self);
                      __Pyx_INCREF(__pyx_t_2);
                      __pyx_t_3 = 0;
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
                        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_assert_open, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 182, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

                      /* "pyarrow/io.pxi":183
 *     def isatty(self):
 *         self._assert_open()
 *         return False             # <<<<<<<<<<<<<<
 * 
 *     def fileno(self):
*/
                      __Pyx_XDECREF(__pyx_r);
                      __Pyx_INCREF(Py_False);
                      __pyx_r = Py_False;
                      goto __pyx_L0;

                      /* "pyarrow/io.pxi":181
 *         return self.is_seekable
 * 
 *     def isatty(self):             # <<<<<<<<<<<<<<
 *         self._assert_open()
 *         return False
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_AddTraceback("pyarrow.lib.NativeFile.isatty", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":185
 *         return False
 * 
 *     def fileno(self):             # <<<<<<<<<<<<<<
 *         """
 *         NOT IMPLEMENTED
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_10NativeFile_19fileno(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_10NativeFile_18fileno, "NativeFile.fileno(self)\n\nNOT IMPLEMENTED");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_10NativeFile_19fileno = {"fileno", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10NativeFile_19fileno, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10NativeFile_18fileno};
                    static PyObject *__pyx_pw_7pyarrow_3lib_10NativeFile_19fileno(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("fileno (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("fileno", 1, 0, 0, __pyx_nargs); return NULL; }
                      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                      if (unlikely(__pyx_kwds_len < 0)) return NULL;
                      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("fileno", __pyx_kwds); return NULL;}
                      __pyx_r = __pyx_pf_7pyarrow_3lib_10NativeFile_18fileno(((struct __pyx_obj_7pyarrow_3lib_NativeFile *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_10NativeFile_18fileno(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      PyObject *__pyx_t_3 = NULL;
                      size_t __pyx_t_4;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("fileno", 0);

                      /* "pyarrow/io.pxi":189
 *         NOT IMPLEMENTED
 *         """
 *         raise UnsupportedOperation()             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
                      __pyx_t_2 = NULL;
                      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_UnsupportedOperation); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 189, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_3);
                      __pyx_t_4 = 1;
                      #if CYTHON_UNPACK_METHODS
                      if (unlikely(PyMethod_Check(__pyx_t_3))) {
                        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
                        assert(__pyx_t_2);
                        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
                        __Pyx_INCREF(__pyx_t_2);
                        __Pyx_INCREF(__pyx__function);
                        __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
                        __pyx_t_4 = 0;
                      }
                      #endif
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
                        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 189, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      __PYX_ERR(6, 189, __pyx_L1_error)

                      /* "pyarrow/io.pxi":185
 *         return False
 * 
 *     def fileno(self):             # <<<<<<<<<<<<<<
 *         """
 *         NOT IMPLEMENTED
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_AddTraceback("pyarrow.lib.NativeFile.fileno", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":191
 *         raise UnsupportedOperation()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def closed(self):
 *         if self.is_readable:
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_10NativeFile_6closed_1__get__(PyObject *__pyx_v_self); /*proto*/
                    static PyObject *__pyx_pw_7pyarrow_3lib_10NativeFile_6closed_1__get__(PyObject *__pyx_v_self) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_10NativeFile_6closed___get__(((struct __pyx_obj_7pyarrow_3lib_NativeFile *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_10NativeFile_6closed___get__(struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__get__", 0);

                      /* "pyarrow/io.pxi":193
 *     @property
 *     def closed(self):
 *         if self.is_readable:             # <<<<<<<<<<<<<<
 *             return self.input_stream.get().closed()
 *         elif self.is_writable:
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "is_readable");
                        __PYX_ERR(6, 193, __pyx_L1_error)
                      }
                      if (__pyx_v_self->is_readable) {

                        /* "pyarrow/io.pxi":194
 *     def closed(self):
 *         if self.is_readable:
 *             return self.input_stream.get().closed()             # <<<<<<<<<<<<<<
 *         elif self.is_writable:
 *             return self.output_stream.get().closed()
*/
                        __Pyx_XDECREF(__pyx_r);
                        if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "input_stream");
                          __PYX_ERR(6, 194, __pyx_L1_error)
                        }
                        __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->input_stream.get()->closed()); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 194, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                        __pyx_r = __pyx_t_1;
                        __pyx_t_1 = 0;
                        goto __pyx_L0;

                        /* "pyarrow/io.pxi":193
 *     @property
 *     def closed(self):
 *         if self.is_readable:             # <<<<<<<<<<<<<<
 *             return self.input_stream.get().closed()
 *         elif self.is_writable:
*/
                      }

                      /* "pyarrow/io.pxi":195
 *         if self.is_readable:
 *             return self.input_stream.get().closed()
 *         elif self.is_writable:             # <<<<<<<<<<<<<<
 *             return self.output_stream.get().closed()
 *         else:
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "is_writable");
                        __PYX_ERR(6, 195, __pyx_L1_error)
                      }
                      if (__pyx_v_self->is_writable) {

                        /* "pyarrow/io.pxi":196
 *             return self.input_stream.get().closed()
 *         elif self.is_writable:
 *             return self.output_stream.get().closed()             # <<<<<<<<<<<<<<
 *         else:
 *             return True
*/
                        __Pyx_XDECREF(__pyx_r);
                        if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "output_stream");
                          __PYX_ERR(6, 196, __pyx_L1_error)
                        }
                        __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->output_stream.get()->closed()); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 196, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                        __pyx_r = __pyx_t_1;
                        __pyx_t_1 = 0;
                        goto __pyx_L0;

                        /* "pyarrow/io.pxi":195
 *         if self.is_readable:
 *             return self.input_stream.get().closed()
 *         elif self.is_writable:             # <<<<<<<<<<<<<<
 *             return self.output_stream.get().closed()
 *         else:
*/
                      }

                      /* "pyarrow/io.pxi":198
 *             return self.output_stream.get().closed()
 *         else:
 *             return True             # <<<<<<<<<<<<<<
 * 
 *     def close(self):
*/
                      /*else*/ {
                        __Pyx_XDECREF(__pyx_r);
                        __Pyx_INCREF(Py_True);
                        __pyx_r = Py_True;
                        goto __pyx_L0;
                      }

                      /* "pyarrow/io.pxi":191
 *         raise UnsupportedOperation()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def closed(self):
 *         if self.is_readable:
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_AddTraceback("pyarrow.lib.NativeFile.closed.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":200
 *             return True
 * 
 *     def close(self):             # <<<<<<<<<<<<<<
 *         if not self.closed:
 *             with nogil:
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_10NativeFile_21close(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_10NativeFile_20close, "NativeFile.close(self)");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_10NativeFile_21close = {"close", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10NativeFile_21close, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10NativeFile_20close};
                    static PyObject *__pyx_pw_7pyarrow_3lib_10NativeFile_21close(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("close (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("close", 1, 0, 0, __pyx_nargs); return NULL; }
                      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                      if (unlikely(__pyx_kwds_len < 0)) return NULL;
                      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("close", __pyx_kwds); return NULL;}
                      __pyx_r = __pyx_pf_7pyarrow_3lib_10NativeFile_20close(((struct __pyx_obj_7pyarrow_3lib_NativeFile *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_10NativeFile_20close(struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      int __pyx_t_2;
                      int __pyx_t_3;
                      int __pyx_t_4;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("close", 0);

                      /* "pyarrow/io.pxi":201
 * 
 *     def close(self):
 *         if not self.closed:             # <<<<<<<<<<<<<<
 *             with nogil:
 *                 if self.is_readable:
*/
                      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_closed_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 201, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(6, 201, __pyx_L1_error)
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      __pyx_t_3 = (!__pyx_t_2);
                      if (__pyx_t_3) {

                        /* "pyarrow/io.pxi":202
 *     def close(self):
 *         if not self.closed:
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 if self.is_readable:
 *                     check_status(self.input_stream.get().Close())
*/
                        {
                            PyThreadState * _save;
                            _save = PyEval_SaveThread();
                            __Pyx_FastGIL_Remember();
                            /*try:*/ {

                              /* "pyarrow/io.pxi":203
 *         if not self.closed:
 *             with nogil:
 *                 if self.is_readable:             # <<<<<<<<<<<<<<
 *                     check_status(self.input_stream.get().Close())
 *                 else:
*/
                              if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                                PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                                PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "is_readable");
                                __Pyx_PyGILState_Release(__pyx_gilstate_save);
                                __PYX_ERR(6, 203, __pyx_L5_error)
                              }
                              if (__pyx_v_self->is_readable) {

                                /* "pyarrow/io.pxi":204
 *             with nogil:
 *                 if self.is_readable:
 *                     check_status(self.input_stream.get().Close())             # <<<<<<<<<<<<<<
 *                 else:
 *                     check_status(self.output_stream.get().Close())
*/
                                if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                                  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                                  PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "input_stream");
                                  __Pyx_PyGILState_Release(__pyx_gilstate_save);
                                  __PYX_ERR(6, 204, __pyx_L5_error)
                                }
                                __pyx_t_4 = __pyx_f_7pyarrow_3lib_check_status(__pyx_v_self->input_stream.get()->Close()); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(6, 204, __pyx_L5_error)

                                /* "pyarrow/io.pxi":203
 *         if not self.closed:
 *             with nogil:
 *                 if self.is_readable:             # <<<<<<<<<<<<<<
 *                     check_status(self.input_stream.get().Close())
 *                 else:
*/
                                goto __pyx_L7;
                              }

                              /* "pyarrow/io.pxi":206
 *                     check_status(self.input_stream.get().Close())
 *                 else:
 *                     check_status(self.output_stream.get().Close())             # <<<<<<<<<<<<<<
 * 
 *     cdef set_random_access_file(self, shared_ptr[CRandomAccessFile] handle):
*/
                              /*else*/ {
                                if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                                  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                                  PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "output_stream");
                                  __Pyx_PyGILState_Release(__pyx_gilstate_save);
                                  __PYX_ERR(6, 206, __pyx_L5_error)
                                }
                                __pyx_t_4 = __pyx_f_7pyarrow_3lib_check_status(__pyx_v_self->output_stream.get()->Close()); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(6, 206, __pyx_L5_error)
                              }
                              __pyx_L7:;
                            }

                            /* "pyarrow/io.pxi":202
 *     def close(self):
 *         if not self.closed:
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 if self.is_readable:
 *                     check_status(self.input_stream.get().Close())
*/
                            /*finally:*/ {
                              /*normal exit:*/{
                                __Pyx_FastGIL_Forget();
                                PyEval_RestoreThread(_save);
                                goto __pyx_L6;
                              }
                              __pyx_L5_error: {
                                __Pyx_FastGIL_Forget();
                                PyEval_RestoreThread(_save);
                                goto __pyx_L1_error;
                              }
                              __pyx_L6:;
                            }
                        }

                        /* "pyarrow/io.pxi":201
 * 
 *     def close(self):
 *         if not self.closed:             # <<<<<<<<<<<<<<
 *             with nogil:
 *                 if self.is_readable:
*/
                      }

                      /* "pyarrow/io.pxi":200
 *             return True
 * 
 *     def close(self):             # <<<<<<<<<<<<<<
 *         if not self.closed:
 *             with nogil:
*/

                      /* function exit code */
                      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_AddTraceback("pyarrow.lib.NativeFile.close", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":208
 *                     check_status(self.output_stream.get().Close())
 * 
 *     cdef set_random_access_file(self, shared_ptr[CRandomAccessFile] handle):             # <<<<<<<<<<<<<<
 *         self.input_stream = <shared_ptr[CInputStream]> handle
 *         self.random_access = handle
*/

                    static PyObject *__pyx_f_7pyarrow_3lib_10NativeFile_set_random_access_file(struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_self, std::shared_ptr< arrow::io::RandomAccessFile>  __pyx_v_handle) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("set_random_access_file", 0);

                      /* "pyarrow/io.pxi":209
 * 
 *     cdef set_random_access_file(self, shared_ptr[CRandomAccessFile] handle):
 *         self.input_stream = <shared_ptr[CInputStream]> handle             # <<<<<<<<<<<<<<
 *         self.random_access = handle
 *         self.is_seekable = True
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "input_stream");
                        __PYX_ERR(6, 209, __pyx_L1_error)
                      }
                      __pyx_v_self->input_stream = ((std::shared_ptr< arrow::io::InputStream> )__pyx_v_handle);

                      /* "pyarrow/io.pxi":210
 *     cdef set_random_access_file(self, shared_ptr[CRandomAccessFile] handle):
 *         self.input_stream = <shared_ptr[CInputStream]> handle
 *         self.random_access = handle             # <<<<<<<<<<<<<<
 *         self.is_seekable = True
 * 
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "random_access");
                        __PYX_ERR(6, 210, __pyx_L1_error)
                      }
                      __pyx_v_self->random_access = __pyx_v_handle;

                      /* "pyarrow/io.pxi":211
 *         self.input_stream = <shared_ptr[CInputStream]> handle
 *         self.random_access = handle
 *         self.is_seekable = True             # <<<<<<<<<<<<<<
 * 
 *     cdef set_input_stream(self, shared_ptr[CInputStream] handle):
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "is_seekable");
                        __PYX_ERR(6, 211, __pyx_L1_error)
                      }
                      __pyx_v_self->is_seekable = 1;

                      /* "pyarrow/io.pxi":208
 *                     check_status(self.output_stream.get().Close())
 * 
 *     cdef set_random_access_file(self, shared_ptr[CRandomAccessFile] handle):             # <<<<<<<<<<<<<<
 *         self.input_stream = <shared_ptr[CInputStream]> handle
 *         self.random_access = handle
*/

                      /* function exit code */
                      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib.NativeFile.set_random_access_file", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = 0;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":213
 *         self.is_seekable = True
 * 
 *     cdef set_input_stream(self, shared_ptr[CInputStream] handle):             # <<<<<<<<<<<<<<
 *         self.input_stream = handle
 *         self.random_access.reset()
*/

                    static PyObject *__pyx_f_7pyarrow_3lib_10NativeFile_set_input_stream(struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_self, std::shared_ptr< arrow::io::InputStream>  __pyx_v_handle) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("set_input_stream", 0);

                      /* "pyarrow/io.pxi":214
 * 
 *     cdef set_input_stream(self, shared_ptr[CInputStream] handle):
 *         self.input_stream = handle             # <<<<<<<<<<<<<<
 *         self.random_access.reset()
 *         self.is_seekable = False
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "input_stream");
                        __PYX_ERR(6, 214, __pyx_L1_error)
                      }
                      __pyx_v_self->input_stream = __pyx_v_handle;

                      /* "pyarrow/io.pxi":215
 *     cdef set_input_stream(self, shared_ptr[CInputStream] handle):
 *         self.input_stream = handle
 *         self.random_access.reset()             # <<<<<<<<<<<<<<
 *         self.is_seekable = False
 * 
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "random_access");
                        __PYX_ERR(6, 215, __pyx_L1_error)
                      }
                      __pyx_v_self->random_access.reset();

                      /* "pyarrow/io.pxi":216
 *         self.input_stream = handle
 *         self.random_access.reset()
 *         self.is_seekable = False             # <<<<<<<<<<<<<<
 * 
 *     cdef set_output_stream(self, shared_ptr[COutputStream] handle):
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "is_seekable");
                        __PYX_ERR(6, 216, __pyx_L1_error)
                      }
                      __pyx_v_self->is_seekable = 0;

                      /* "pyarrow/io.pxi":213
 *         self.is_seekable = True
 * 
 *     cdef set_input_stream(self, shared_ptr[CInputStream] handle):             # <<<<<<<<<<<<<<
 *         self.input_stream = handle
 *         self.random_access.reset()
*/

                      /* function exit code */
                      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib.NativeFile.set_input_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = 0;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":218
 *         self.is_seekable = False
 * 
 *     cdef set_output_stream(self, shared_ptr[COutputStream] handle):             # <<<<<<<<<<<<<<
 *         self.output_stream = handle
 * 
*/

                    static PyObject *__pyx_f_7pyarrow_3lib_10NativeFile_set_output_stream(struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_self, std::shared_ptr< arrow::io::OutputStream>  __pyx_v_handle) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("set_output_stream", 0);

                      /* "pyarrow/io.pxi":219
 * 
 *     cdef set_output_stream(self, shared_ptr[COutputStream] handle):
 *         self.output_stream = handle             # <<<<<<<<<<<<<<
 * 
 *     cdef shared_ptr[CRandomAccessFile] get_random_access_file(self) except *:
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "output_stream");
                        __PYX_ERR(6, 219, __pyx_L1_error)
                      }
                      __pyx_v_self->output_stream = __pyx_v_handle;

                      /* "pyarrow/io.pxi":218
 *         self.is_seekable = False
 * 
 *     cdef set_output_stream(self, shared_ptr[COutputStream] handle):             # <<<<<<<<<<<<<<
 *         self.output_stream = handle
 * 
*/

                      /* function exit code */
                      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib.NativeFile.set_output_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = 0;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":221
 *         self.output_stream = handle
 * 
 *     cdef shared_ptr[CRandomAccessFile] get_random_access_file(self) except *:             # <<<<<<<<<<<<<<
 *         self._assert_readable()
 *         self._assert_seekable()
*/

                    static std::shared_ptr< arrow::io::RandomAccessFile>  __pyx_f_7pyarrow_3lib_10NativeFile_get_random_access_file(struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_self) {
                      std::shared_ptr< arrow::io::RandomAccessFile>  __pyx_r;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      size_t __pyx_t_3;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("get_random_access_file", 0);

                      /* "pyarrow/io.pxi":222
 * 
 *     cdef shared_ptr[CRandomAccessFile] get_random_access_file(self) except *:
 *         self._assert_readable()             # <<<<<<<<<<<<<<
 *         self._assert_seekable()
 *         return self.random_access
*/
                      __pyx_t_2 = ((PyObject *)__pyx_v_self);
                      __Pyx_INCREF(__pyx_t_2);
                      __pyx_t_3 = 0;
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
                        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_assert_readable, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 222, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

                      /* "pyarrow/io.pxi":223
 *     cdef shared_ptr[CRandomAccessFile] get_random_access_file(self) except *:
 *         self._assert_readable()
 *         self._assert_seekable()             # <<<<<<<<<<<<<<
 *         return self.random_access
 * 
*/
                      __pyx_t_2 = ((PyObject *)__pyx_v_self);
                      __Pyx_INCREF(__pyx_t_2);
                      __pyx_t_3 = 0;
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
                        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_assert_seekable, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 223, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

                      /* "pyarrow/io.pxi":224
 *         self._assert_readable()
 *         self._assert_seekable()
 *         return self.random_access             # <<<<<<<<<<<<<<
 * 
 *     cdef shared_ptr[CInputStream] get_input_stream(self) except *:
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "random_access");
                        __PYX_ERR(6, 224, __pyx_L1_error)
                      }
                      __pyx_r = __pyx_v_self->random_access;
                      goto __pyx_L0;

                      /* "pyarrow/io.pxi":221
 *         self.output_stream = handle
 * 
 *     cdef shared_ptr[CRandomAccessFile] get_random_access_file(self) except *:             # <<<<<<<<<<<<<<
 *         self._assert_readable()
 *         self._assert_seekable()
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_AddTraceback("pyarrow.lib.NativeFile.get_random_access_file", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_pretend_to_initialize(&__pyx_r);
                      __pyx_L0:;
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":226
 *         return self.random_access
 * 
 *     cdef shared_ptr[CInputStream] get_input_stream(self) except *:             # <<<<<<<<<<<<<<
 *         self._assert_readable()
 *         return self.input_stream
*/

                    static std::shared_ptr< arrow::io::InputStream>  __pyx_f_7pyarrow_3lib_10NativeFile_get_input_stream(struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_self) {
                      std::shared_ptr< arrow::io::InputStream>  __pyx_r;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      size_t __pyx_t_3;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("get_input_stream", 0);

                      /* "pyarrow/io.pxi":227
 * 
 *     cdef shared_ptr[CInputStream] get_input_stream(self) except *:
 *         self._assert_readable()             # <<<<<<<<<<<<<<
 *         return self.input_stream
 * 
*/
                      __pyx_t_2 = ((PyObject *)__pyx_v_self);
                      __Pyx_INCREF(__pyx_t_2);
                      __pyx_t_3 = 0;
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
                        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_assert_readable, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 227, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

                      /* "pyarrow/io.pxi":228
 *     cdef shared_ptr[CInputStream] get_input_stream(self) except *:
 *         self._assert_readable()
 *         return self.input_stream             # <<<<<<<<<<<<<<
 * 
 *     cdef shared_ptr[COutputStream] get_output_stream(self) except *:
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "input_stream");
                        __PYX_ERR(6, 228, __pyx_L1_error)
                      }
                      __pyx_r = __pyx_v_self->input_stream;
                      goto __pyx_L0;

                      /* "pyarrow/io.pxi":226
 *         return self.random_access
 * 
 *     cdef shared_ptr[CInputStream] get_input_stream(self) except *:             # <<<<<<<<<<<<<<
 *         self._assert_readable()
 *         return self.input_stream
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_AddTraceback("pyarrow.lib.NativeFile.get_input_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_pretend_to_initialize(&__pyx_r);
                      __pyx_L0:;
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":230
 *         return self.input_stream
 * 
 *     cdef shared_ptr[COutputStream] get_output_stream(self) except *:             # <<<<<<<<<<<<<<
 *         self._assert_writable()
 *         return self.output_stream
*/

                    static std::shared_ptr< arrow::io::OutputStream>  __pyx_f_7pyarrow_3lib_10NativeFile_get_output_stream(struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_self) {
                      std::shared_ptr< arrow::io::OutputStream>  __pyx_r;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      size_t __pyx_t_3;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("get_output_stream", 0);

                      /* "pyarrow/io.pxi":231
 * 
 *     cdef shared_ptr[COutputStream] get_output_stream(self) except *:
 *         self._assert_writable()             # <<<<<<<<<<<<<<
 *         return self.output_stream
 * 
*/
                      __pyx_t_2 = ((PyObject *)__pyx_v_self);
                      __Pyx_INCREF(__pyx_t_2);
                      __pyx_t_3 = 0;
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
                        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_assert_writable, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 231, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

                      /* "pyarrow/io.pxi":232
 *     cdef shared_ptr[COutputStream] get_output_stream(self) except *:
 *         self._assert_writable()
 *         return self.output_stream             # <<<<<<<<<<<<<<
 * 
 *     def _assert_open(self):
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "output_stream");
                        __PYX_ERR(6, 232, __pyx_L1_error)
                      }
                      __pyx_r = __pyx_v_self->output_stream;
                      goto __pyx_L0;

                      /* "pyarrow/io.pxi":230
 *         return self.input_stream
 * 
 *     cdef shared_ptr[COutputStream] get_output_stream(self) except *:             # <<<<<<<<<<<<<<
 *         self._assert_writable()
 *         return self.output_stream
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_AddTraceback("pyarrow.lib.NativeFile.get_output_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_pretend_to_initialize(&__pyx_r);
                      __pyx_L0:;
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":234
 *         return self.output_stream
 * 
 *     def _assert_open(self):             # <<<<<<<<<<<<<<
 *         if self.closed:
 *             raise ValueError("I/O operation on closed file")
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_10NativeFile_23_assert_open(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_10NativeFile_22_assert_open, "NativeFile._assert_open(self)");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_10NativeFile_23_assert_open = {"_assert_open", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10NativeFile_23_assert_open, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10NativeFile_22_assert_open};
                    static PyObject *__pyx_pw_7pyarrow_3lib_10NativeFile_23_assert_open(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("_assert_open (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("_assert_open", 1, 0, 0, __pyx_nargs); return NULL; }
                      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                      if (unlikely(__pyx_kwds_len < 0)) return NULL;
                      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("_assert_open", __pyx_kwds); return NULL;}
                      __pyx_r = __pyx_pf_7pyarrow_3lib_10NativeFile_22_assert_open(((struct __pyx_obj_7pyarrow_3lib_NativeFile *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_10NativeFile_22_assert_open(struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      int __pyx_t_2;
                      PyObject *__pyx_t_3 = NULL;
                      size_t __pyx_t_4;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("_assert_open", 0);

                      /* "pyarrow/io.pxi":235
 * 
 *     def _assert_open(self):
 *         if self.closed:             # <<<<<<<<<<<<<<
 *             raise ValueError("I/O operation on closed file")
 * 
*/
                      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_closed_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 235, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(6, 235, __pyx_L1_error)
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      if (unlikely(__pyx_t_2)) {

                        /* "pyarrow/io.pxi":236
 *     def _assert_open(self):
 *         if self.closed:
 *             raise ValueError("I/O operation on closed file")             # <<<<<<<<<<<<<<
 * 
 *     def _assert_readable(self):
*/
                        __pyx_t_3 = NULL;
                        __pyx_t_4 = 1;
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_I_O_operation_on_closed_file};
                          __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                          if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 236, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_1);
                        }
                        __Pyx_Raise(__pyx_t_1, 0, 0, 0);
                        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                        __PYX_ERR(6, 236, __pyx_L1_error)

                        /* "pyarrow/io.pxi":235
 * 
 *     def _assert_open(self):
 *         if self.closed:             # <<<<<<<<<<<<<<
 *             raise ValueError("I/O operation on closed file")
 * 
*/
                      }

                      /* "pyarrow/io.pxi":234
 *         return self.output_stream
 * 
 *     def _assert_open(self):             # <<<<<<<<<<<<<<
 *         if self.closed:
 *             raise ValueError("I/O operation on closed file")
*/

                      /* function exit code */
                      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_AddTraceback("pyarrow.lib.NativeFile._assert_open", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":238
 *             raise ValueError("I/O operation on closed file")
 * 
 *     def _assert_readable(self):             # <<<<<<<<<<<<<<
 *         self._assert_open()
 *         if not self.is_readable:
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_10NativeFile_25_assert_readable(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_10NativeFile_24_assert_readable, "NativeFile._assert_readable(self)");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_10NativeFile_25_assert_readable = {"_assert_readable", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10NativeFile_25_assert_readable, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10NativeFile_24_assert_readable};
                    static PyObject *__pyx_pw_7pyarrow_3lib_10NativeFile_25_assert_readable(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("_assert_readable (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("_assert_readable", 1, 0, 0, __pyx_nargs); return NULL; }
                      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                      if (unlikely(__pyx_kwds_len < 0)) return NULL;
                      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("_assert_readable", __pyx_kwds); return NULL;}
                      __pyx_r = __pyx_pf_7pyarrow_3lib_10NativeFile_24_assert_readable(((struct __pyx_obj_7pyarrow_3lib_NativeFile *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_10NativeFile_24_assert_readable(struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      size_t __pyx_t_3;
                      int __pyx_t_4;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("_assert_readable", 0);

                      /* "pyarrow/io.pxi":239
 * 
 *     def _assert_readable(self):
 *         self._assert_open()             # <<<<<<<<<<<<<<
 *         if not self.is_readable:
 *             # XXX UnsupportedOperation
*/
                      __pyx_t_2 = ((PyObject *)__pyx_v_self);
                      __Pyx_INCREF(__pyx_t_2);
                      __pyx_t_3 = 0;
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
                        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_assert_open, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 239, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

                      /* "pyarrow/io.pxi":240
 *     def _assert_readable(self):
 *         self._assert_open()
 *         if not self.is_readable:             # <<<<<<<<<<<<<<
 *             # XXX UnsupportedOperation
 *             raise IOError("only valid on readable files")
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "is_readable");
                        __PYX_ERR(6, 240, __pyx_L1_error)
                      }
                      __pyx_t_4 = (!__pyx_v_self->is_readable);
                      if (unlikely(__pyx_t_4)) {

                        /* "pyarrow/io.pxi":242
 *         if not self.is_readable:
 *             # XXX UnsupportedOperation
 *             raise IOError("only valid on readable files")             # <<<<<<<<<<<<<<
 * 
 *     def _assert_writable(self):
*/
                        __pyx_t_2 = NULL;
                        __pyx_t_3 = 1;
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_only_valid_on_readable_files};
                          __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_IOError)), __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                          if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 242, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_1);
                        }
                        __Pyx_Raise(__pyx_t_1, 0, 0, 0);
                        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                        __PYX_ERR(6, 242, __pyx_L1_error)

                        /* "pyarrow/io.pxi":240
 *     def _assert_readable(self):
 *         self._assert_open()
 *         if not self.is_readable:             # <<<<<<<<<<<<<<
 *             # XXX UnsupportedOperation
 *             raise IOError("only valid on readable files")
*/
                      }

                      /* "pyarrow/io.pxi":238
 *             raise ValueError("I/O operation on closed file")
 * 
 *     def _assert_readable(self):             # <<<<<<<<<<<<<<
 *         self._assert_open()
 *         if not self.is_readable:
*/

                      /* function exit code */
                      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_AddTraceback("pyarrow.lib.NativeFile._assert_readable", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":244
 *             raise IOError("only valid on readable files")
 * 
 *     def _assert_writable(self):             # <<<<<<<<<<<<<<
 *         self._assert_open()
 *         if not self.is_writable:
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_10NativeFile_27_assert_writable(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_10NativeFile_26_assert_writable, "NativeFile._assert_writable(self)");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_10NativeFile_27_assert_writable = {"_assert_writable", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10NativeFile_27_assert_writable, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10NativeFile_26_assert_writable};
                    static PyObject *__pyx_pw_7pyarrow_3lib_10NativeFile_27_assert_writable(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("_assert_writable (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("_assert_writable", 1, 0, 0, __pyx_nargs); return NULL; }
                      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                      if (unlikely(__pyx_kwds_len < 0)) return NULL;
                      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("_assert_writable", __pyx_kwds); return NULL;}
                      __pyx_r = __pyx_pf_7pyarrow_3lib_10NativeFile_26_assert_writable(((struct __pyx_obj_7pyarrow_3lib_NativeFile *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_10NativeFile_26_assert_writable(struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      size_t __pyx_t_3;
                      int __pyx_t_4;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("_assert_writable", 0);

                      /* "pyarrow/io.pxi":245
 * 
 *     def _assert_writable(self):
 *         self._assert_open()             # <<<<<<<<<<<<<<
 *         if not self.is_writable:
 *             raise IOError("only valid on writable files")
*/
                      __pyx_t_2 = ((PyObject *)__pyx_v_self);
                      __Pyx_INCREF(__pyx_t_2);
                      __pyx_t_3 = 0;
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
                        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_assert_open, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 245, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

                      /* "pyarrow/io.pxi":246
 *     def _assert_writable(self):
 *         self._assert_open()
 *         if not self.is_writable:             # <<<<<<<<<<<<<<
 *             raise IOError("only valid on writable files")
 * 
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "is_writable");
                        __PYX_ERR(6, 246, __pyx_L1_error)
                      }
                      __pyx_t_4 = (!__pyx_v_self->is_writable);
                      if (unlikely(__pyx_t_4)) {

                        /* "pyarrow/io.pxi":247
 *         self._assert_open()
 *         if not self.is_writable:
 *             raise IOError("only valid on writable files")             # <<<<<<<<<<<<<<
 * 
 *     def _assert_seekable(self):
*/
                        __pyx_t_2 = NULL;
                        __pyx_t_3 = 1;
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_only_valid_on_writable_files};
                          __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_IOError)), __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                          if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 247, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_1);
                        }
                        __Pyx_Raise(__pyx_t_1, 0, 0, 0);
                        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                        __PYX_ERR(6, 247, __pyx_L1_error)

                        /* "pyarrow/io.pxi":246
 *     def _assert_writable(self):
 *         self._assert_open()
 *         if not self.is_writable:             # <<<<<<<<<<<<<<
 *             raise IOError("only valid on writable files")
 * 
*/
                      }

                      /* "pyarrow/io.pxi":244
 *             raise IOError("only valid on readable files")
 * 
 *     def _assert_writable(self):             # <<<<<<<<<<<<<<
 *         self._assert_open()
 *         if not self.is_writable:
*/

                      /* function exit code */
                      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_AddTraceback("pyarrow.lib.NativeFile._assert_writable", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":249
 *             raise IOError("only valid on writable files")
 * 
 *     def _assert_seekable(self):             # <<<<<<<<<<<<<<
 *         self._assert_open()
 *         if not self.is_seekable:
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_10NativeFile_29_assert_seekable(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_10NativeFile_28_assert_seekable, "NativeFile._assert_seekable(self)");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_10NativeFile_29_assert_seekable = {"_assert_seekable", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10NativeFile_29_assert_seekable, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10NativeFile_28_assert_seekable};
                    static PyObject *__pyx_pw_7pyarrow_3lib_10NativeFile_29_assert_seekable(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("_assert_seekable (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("_assert_seekable", 1, 0, 0, __pyx_nargs); return NULL; }
                      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                      if (unlikely(__pyx_kwds_len < 0)) return NULL;
                      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("_assert_seekable", __pyx_kwds); return NULL;}
                      __pyx_r = __pyx_pf_7pyarrow_3lib_10NativeFile_28_assert_seekable(((struct __pyx_obj_7pyarrow_3lib_NativeFile *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_10NativeFile_28_assert_seekable(struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      size_t __pyx_t_3;
                      int __pyx_t_4;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("_assert_seekable", 0);

                      /* "pyarrow/io.pxi":250
 * 
 *     def _assert_seekable(self):
 *         self._assert_open()             # <<<<<<<<<<<<<<
 *         if not self.is_seekable:
 *             raise IOError("only valid on seekable files")
*/
                      __pyx_t_2 = ((PyObject *)__pyx_v_self);
                      __Pyx_INCREF(__pyx_t_2);
                      __pyx_t_3 = 0;
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
                        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_assert_open, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 250, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

                      /* "pyarrow/io.pxi":251
 *     def _assert_seekable(self):
 *         self._assert_open()
 *         if not self.is_seekable:             # <<<<<<<<<<<<<<
 *             raise IOError("only valid on seekable files")
 * 
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "is_seekable");
                        __PYX_ERR(6, 251, __pyx_L1_error)
                      }
                      __pyx_t_4 = (!__pyx_v_self->is_seekable);
                      if (unlikely(__pyx_t_4)) {

                        /* "pyarrow/io.pxi":252
 *         self._assert_open()
 *         if not self.is_seekable:
 *             raise IOError("only valid on seekable files")             # <<<<<<<<<<<<<<
 * 
 *     def size(self):
*/
                        __pyx_t_2 = NULL;
                        __pyx_t_3 = 1;
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_only_valid_on_seekable_files};
                          __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_IOError)), __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                          if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 252, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_1);
                        }
                        __Pyx_Raise(__pyx_t_1, 0, 0, 0);
                        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                        __PYX_ERR(6, 252, __pyx_L1_error)

                        /* "pyarrow/io.pxi":251
 *     def _assert_seekable(self):
 *         self._assert_open()
 *         if not self.is_seekable:             # <<<<<<<<<<<<<<
 *             raise IOError("only valid on seekable files")
 * 
*/
                      }

                      /* "pyarrow/io.pxi":249
 *             raise IOError("only valid on writable files")
 * 
 *     def _assert_seekable(self):             # <<<<<<<<<<<<<<
 *         self._assert_open()
 *         if not self.is_seekable:
*/

                      /* function exit code */
                      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_AddTraceback("pyarrow.lib.NativeFile._assert_seekable", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":254
 *             raise IOError("only valid on seekable files")
 * 
 *     def size(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return file size
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_10NativeFile_31size(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_10NativeFile_30size, "NativeFile.size(self)\n\nReturn file size");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_10NativeFile_31size = {"size", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10NativeFile_31size, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10NativeFile_30size};
                    static PyObject *__pyx_pw_7pyarrow_3lib_10NativeFile_31size(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("size (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("size", 1, 0, 0, __pyx_nargs); return NULL; }
                      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                      if (unlikely(__pyx_kwds_len < 0)) return NULL;
                      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("size", __pyx_kwds); return NULL;}
                      __pyx_r = __pyx_pf_7pyarrow_3lib_10NativeFile_30size(((struct __pyx_obj_7pyarrow_3lib_NativeFile *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_10NativeFile_30size(struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_self) {
                      int64_t __pyx_v_size;
                      std::shared_ptr< arrow::io::RandomAccessFile>  __pyx_v_handle;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      std::shared_ptr< arrow::io::RandomAccessFile>  __pyx_t_1;
                      int64_t __pyx_t_2;
                      PyObject *__pyx_t_3 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("size", 0);

                      /* "pyarrow/io.pxi":260
 *         cdef int64_t size
 * 
 *         handle = self.get_random_access_file()             # <<<<<<<<<<<<<<
 *         with nogil:
 *             size = GetResultValue(handle.get().GetSize())
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get_random_access_file");
                        __PYX_ERR(6, 260, __pyx_L1_error)
                      }
                      __pyx_t_1 = ((struct __pyx_vtabstruct_7pyarrow_3lib_NativeFile *)__pyx_v_self->__pyx_vtab)->get_random_access_file(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 260, __pyx_L1_error)
                      __pyx_v_handle = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_1);

                      /* "pyarrow/io.pxi":261
 * 
 *         handle = self.get_random_access_file()
 *         with nogil:             # <<<<<<<<<<<<<<
 *             size = GetResultValue(handle.get().GetSize())
 * 
*/
                      {
                          PyThreadState * _save;
                          _save = PyEval_SaveThread();
                          __Pyx_FastGIL_Remember();
                          /*try:*/ {

                            /* "pyarrow/io.pxi":262
 *         handle = self.get_random_access_file()
 *         with nogil:
 *             size = GetResultValue(handle.get().GetSize())             # <<<<<<<<<<<<<<
 * 
 *         return size
*/
                            __pyx_t_2 = arrow::py::GetResultValue<int64_t>(__pyx_v_handle.get()->GetSize()); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(6, 262, __pyx_L4_error)
                            __pyx_v_size = __pyx_t_2;
                          }

                          /* "pyarrow/io.pxi":261
 * 
 *         handle = self.get_random_access_file()
 *         with nogil:             # <<<<<<<<<<<<<<
 *             size = GetResultValue(handle.get().GetSize())
 * 
*/
                          /*finally:*/ {
                            /*normal exit:*/{
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L5;
                            }
                            __pyx_L4_error: {
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L1_error;
                            }
                            __pyx_L5:;
                          }
                      }

                      /* "pyarrow/io.pxi":264
 *             size = GetResultValue(handle.get().GetSize())
 * 
 *         return size             # <<<<<<<<<<<<<<
 * 
 *     def metadata(self):
*/
                      __Pyx_XDECREF(__pyx_r);
                      __pyx_t_3 = __Pyx_PyLong_From_int64_t(__pyx_v_size); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 264, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_3);
                      __pyx_r = __pyx_t_3;
                      __pyx_t_3 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/io.pxi":254
 *             raise IOError("only valid on seekable files")
 * 
 *     def size(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return file size
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_AddTraceback("pyarrow.lib.NativeFile.size", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":266
 *         return size
 * 
 *     def metadata(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return file metadata
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_10NativeFile_33metadata(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_10NativeFile_32metadata, "NativeFile.metadata(self)\n\nReturn file metadata");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_10NativeFile_33metadata = {"metadata", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10NativeFile_33metadata, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10NativeFile_32metadata};
                    static PyObject *__pyx_pw_7pyarrow_3lib_10NativeFile_33metadata(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("metadata (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("metadata", 1, 0, 0, __pyx_nargs); return NULL; }
                      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                      if (unlikely(__pyx_kwds_len < 0)) return NULL;
                      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("metadata", __pyx_kwds); return NULL;}
                      __pyx_r = __pyx_pf_7pyarrow_3lib_10NativeFile_32metadata(((struct __pyx_obj_7pyarrow_3lib_NativeFile *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_10NativeFile_32metadata(struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_self) {
                      std::shared_ptr< arrow::KeyValueMetadata const >  __pyx_v_c_metadata;
                      std::shared_ptr< arrow::io::InputStream>  __pyx_v_handle;
                      PyObject *__pyx_v_metadata = NULL;
                      int64_t __pyx_v_i;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      std::shared_ptr< arrow::io::InputStream>  __pyx_t_1;
                      std::shared_ptr< arrow::KeyValueMetadata const >  __pyx_t_2;
                      PyObject *__pyx_t_3 = NULL;
                      int __pyx_t_4;
                      int64_t __pyx_t_5;
                      int64_t __pyx_t_6;
                      int64_t __pyx_t_7;
                      PyObject *__pyx_t_8 = NULL;
                      PyObject *__pyx_t_9 = NULL;
                      PyObject *__pyx_t_10 = NULL;
                      PyObject *__pyx_t_11 = NULL;
                      size_t __pyx_t_12;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("metadata", 0);

                      /* "pyarrow/io.pxi":273
 *             shared_ptr[const CKeyValueMetadata] c_metadata
 * 
 *         handle = self.get_input_stream()             # <<<<<<<<<<<<<<
 *         with nogil:
 *             c_metadata = GetResultValue(handle.get().ReadMetadata())
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get_input_stream");
                        __PYX_ERR(6, 273, __pyx_L1_error)
                      }
                      __pyx_t_1 = ((struct __pyx_vtabstruct_7pyarrow_3lib_NativeFile *)__pyx_v_self->__pyx_vtab)->get_input_stream(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 273, __pyx_L1_error)
                      __pyx_v_handle = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_1);

                      /* "pyarrow/io.pxi":274
 * 
 *         handle = self.get_input_stream()
 *         with nogil:             # <<<<<<<<<<<<<<
 *             c_metadata = GetResultValue(handle.get().ReadMetadata())
 * 
*/
                      {
                          PyThreadState * _save;
                          _save = PyEval_SaveThread();
                          __Pyx_FastGIL_Remember();
                          /*try:*/ {

                            /* "pyarrow/io.pxi":275
 *         handle = self.get_input_stream()
 *         with nogil:
 *             c_metadata = GetResultValue(handle.get().ReadMetadata())             # <<<<<<<<<<<<<<
 * 
 *         metadata = {}
*/
                            __pyx_t_2 = arrow::py::GetResultValue<std::shared_ptr< arrow::KeyValueMetadata const > >(__pyx_v_handle.get()->ReadMetadata()); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(6, 275, __pyx_L4_error)
                            __pyx_v_c_metadata = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_2);
                          }

                          /* "pyarrow/io.pxi":274
 * 
 *         handle = self.get_input_stream()
 *         with nogil:             # <<<<<<<<<<<<<<
 *             c_metadata = GetResultValue(handle.get().ReadMetadata())
 * 
*/
                          /*finally:*/ {
                            /*normal exit:*/{
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L5;
                            }
                            __pyx_L4_error: {
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L1_error;
                            }
                            __pyx_L5:;
                          }
                      }

                      /* "pyarrow/io.pxi":277
 *             c_metadata = GetResultValue(handle.get().ReadMetadata())
 * 
 *         metadata = {}             # <<<<<<<<<<<<<<
 *         if c_metadata.get() != nullptr:
 *             for i in range(c_metadata.get().size()):
*/
                      __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 277, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_3);
                      __pyx_v_metadata = ((PyObject*)__pyx_t_3);
                      __pyx_t_3 = 0;

                      /* "pyarrow/io.pxi":278
 * 
 *         metadata = {}
 *         if c_metadata.get() != nullptr:             # <<<<<<<<<<<<<<
 *             for i in range(c_metadata.get().size()):
 *                 metadata[frombytes(c_metadata.get().key(i))] = \
*/
                      __pyx_t_4 = (__pyx_v_c_metadata.get() != nullptr);
                      if (__pyx_t_4) {

                        /* "pyarrow/io.pxi":279
 *         metadata = {}
 *         if c_metadata.get() != nullptr:
 *             for i in range(c_metadata.get().size()):             # <<<<<<<<<<<<<<
 *                 metadata[frombytes(c_metadata.get().key(i))] = \
 *                     c_metadata.get().value(i)
*/
                        __pyx_t_5 = __pyx_v_c_metadata.get()->size();
                        __pyx_t_6 = __pyx_t_5;
                        for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
                          __pyx_v_i = __pyx_t_7;

                          /* "pyarrow/io.pxi":281
 *             for i in range(c_metadata.get().size()):
 *                 metadata[frombytes(c_metadata.get().key(i))] = \
 *                     c_metadata.get().value(i)             # <<<<<<<<<<<<<<
 *         return metadata
 * 
*/
                          __pyx_t_3 = __pyx_convert_PyBytes_string_to_py_6libcpp_6string_std__in_string(__pyx_v_c_metadata.get()->value(__pyx_v_i)); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 281, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_3);

                          /* "pyarrow/io.pxi":280
 *         if c_metadata.get() != nullptr:
 *             for i in range(c_metadata.get().size()):
 *                 metadata[frombytes(c_metadata.get().key(i))] = \             # <<<<<<<<<<<<<<
 *                     c_metadata.get().value(i)
 *         return metadata
*/
                          __pyx_t_9 = NULL;
                          __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_frombytes); if (unlikely(!__pyx_t_10)) __PYX_ERR(6, 280, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_10);
                          __pyx_t_11 = __pyx_convert_PyBytes_string_to_py_6libcpp_6string_std__in_string(__pyx_v_c_metadata.get()->key(__pyx_v_i)); if (unlikely(!__pyx_t_11)) __PYX_ERR(6, 280, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_11);
                          __pyx_t_12 = 1;
                          #if CYTHON_UNPACK_METHODS
                          if (unlikely(PyMethod_Check(__pyx_t_10))) {
                            __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_10);
                            assert(__pyx_t_9);
                            PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_10);
                            __Pyx_INCREF(__pyx_t_9);
                            __Pyx_INCREF(__pyx__function);
                            __Pyx_DECREF_SET(__pyx_t_10, __pyx__function);
                            __pyx_t_12 = 0;
                          }
                          #endif
                          {
                            PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_11};
                            __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_10, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
                            __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
                            __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                            if (unlikely(!__pyx_t_8)) __PYX_ERR(6, 280, __pyx_L1_error)
                            __Pyx_GOTREF(__pyx_t_8);
                          }
                          if (unlikely((PyDict_SetItem(__pyx_v_metadata, __pyx_t_8, __pyx_t_3) < 0))) __PYX_ERR(6, 280, __pyx_L1_error)
                          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                        }

                        /* "pyarrow/io.pxi":278
 * 
 *         metadata = {}
 *         if c_metadata.get() != nullptr:             # <<<<<<<<<<<<<<
 *             for i in range(c_metadata.get().size()):
 *                 metadata[frombytes(c_metadata.get().key(i))] = \
*/
                      }

                      /* "pyarrow/io.pxi":282
 *                 metadata[frombytes(c_metadata.get().key(i))] = \
 *                     c_metadata.get().value(i)
 *         return metadata             # <<<<<<<<<<<<<<
 * 
 *     def tell(self):
*/
                      __Pyx_XDECREF(__pyx_r);
                      __Pyx_INCREF(__pyx_v_metadata);
                      __pyx_r = __pyx_v_metadata;
                      goto __pyx_L0;

                      /* "pyarrow/io.pxi":266
 *         return size
 * 
 *     def metadata(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return file metadata
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_XDECREF(__pyx_t_8);
                      __Pyx_XDECREF(__pyx_t_9);
                      __Pyx_XDECREF(__pyx_t_10);
                      __Pyx_XDECREF(__pyx_t_11);
                      __Pyx_AddTraceback("pyarrow.lib.NativeFile.metadata", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XDECREF(__pyx_v_metadata);
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":284
 *         return metadata
 * 
 *     def tell(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return current stream position
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_10NativeFile_35tell(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_10NativeFile_34tell, "NativeFile.tell(self)\n\nReturn current stream position");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_10NativeFile_35tell = {"tell", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10NativeFile_35tell, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10NativeFile_34tell};
                    static PyObject *__pyx_pw_7pyarrow_3lib_10NativeFile_35tell(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("tell (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("tell", 1, 0, 0, __pyx_nargs); return NULL; }
                      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                      if (unlikely(__pyx_kwds_len < 0)) return NULL;
                      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("tell", __pyx_kwds); return NULL;}
                      __pyx_r = __pyx_pf_7pyarrow_3lib_10NativeFile_34tell(((struct __pyx_obj_7pyarrow_3lib_NativeFile *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_10NativeFile_34tell(struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_self) {
                      int64_t __pyx_v_position;
                      std::shared_ptr< arrow::io::RandomAccessFile>  __pyx_v_rd_handle;
                      std::shared_ptr< arrow::io::OutputStream>  __pyx_v_wr_handle;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      std::shared_ptr< arrow::io::RandomAccessFile>  __pyx_t_1;
                      int64_t __pyx_t_2;
                      std::shared_ptr< arrow::io::OutputStream>  __pyx_t_3;
                      PyObject *__pyx_t_4 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("tell", 0);

                      /* "pyarrow/io.pxi":290
 *         cdef int64_t position
 * 
 *         if self.is_readable:             # <<<<<<<<<<<<<<
 *             rd_handle = self.get_random_access_file()
 *             with nogil:
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "is_readable");
                        __PYX_ERR(6, 290, __pyx_L1_error)
                      }
                      if (__pyx_v_self->is_readable) {

                        /* "pyarrow/io.pxi":291
 * 
 *         if self.is_readable:
 *             rd_handle = self.get_random_access_file()             # <<<<<<<<<<<<<<
 *             with nogil:
 *                 position = GetResultValue(rd_handle.get().Tell())
*/
                        if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get_random_access_file");
                          __PYX_ERR(6, 291, __pyx_L1_error)
                        }
                        __pyx_t_1 = ((struct __pyx_vtabstruct_7pyarrow_3lib_NativeFile *)__pyx_v_self->__pyx_vtab)->get_random_access_file(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 291, __pyx_L1_error)
                        __pyx_v_rd_handle = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_1);

                        /* "pyarrow/io.pxi":292
 *         if self.is_readable:
 *             rd_handle = self.get_random_access_file()
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 position = GetResultValue(rd_handle.get().Tell())
 *         else:
*/
                        {
                            PyThreadState * _save;
                            _save = PyEval_SaveThread();
                            __Pyx_FastGIL_Remember();
                            /*try:*/ {

                              /* "pyarrow/io.pxi":293
 *             rd_handle = self.get_random_access_file()
 *             with nogil:
 *                 position = GetResultValue(rd_handle.get().Tell())             # <<<<<<<<<<<<<<
 *         else:
 *             wr_handle = self.get_output_stream()
*/
                              __pyx_t_2 = arrow::py::GetResultValue<int64_t>(__pyx_v_rd_handle.get()->Tell()); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(6, 293, __pyx_L5_error)
                              __pyx_v_position = __pyx_t_2;
                            }

                            /* "pyarrow/io.pxi":292
 *         if self.is_readable:
 *             rd_handle = self.get_random_access_file()
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 position = GetResultValue(rd_handle.get().Tell())
 *         else:
*/
                            /*finally:*/ {
                              /*normal exit:*/{
                                __Pyx_FastGIL_Forget();
                                PyEval_RestoreThread(_save);
                                goto __pyx_L6;
                              }
                              __pyx_L5_error: {
                                __Pyx_FastGIL_Forget();
                                PyEval_RestoreThread(_save);
                                goto __pyx_L1_error;
                              }
                              __pyx_L6:;
                            }
                        }

                        /* "pyarrow/io.pxi":290
 *         cdef int64_t position
 * 
 *         if self.is_readable:             # <<<<<<<<<<<<<<
 *             rd_handle = self.get_random_access_file()
 *             with nogil:
*/
                        goto __pyx_L3;
                      }

                      /* "pyarrow/io.pxi":295
 *                 position = GetResultValue(rd_handle.get().Tell())
 *         else:
 *             wr_handle = self.get_output_stream()             # <<<<<<<<<<<<<<
 *             with nogil:
 *                 position = GetResultValue(wr_handle.get().Tell())
*/
                      /*else*/ {
                        if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get_output_stream");
                          __PYX_ERR(6, 295, __pyx_L1_error)
                        }
                        __pyx_t_3 = ((struct __pyx_vtabstruct_7pyarrow_3lib_NativeFile *)__pyx_v_self->__pyx_vtab)->get_output_stream(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 295, __pyx_L1_error)
                        __pyx_v_wr_handle = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_3);

                        /* "pyarrow/io.pxi":296
 *         else:
 *             wr_handle = self.get_output_stream()
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 position = GetResultValue(wr_handle.get().Tell())
 * 
*/
                        {
                            PyThreadState * _save;
                            _save = PyEval_SaveThread();
                            __Pyx_FastGIL_Remember();
                            /*try:*/ {

                              /* "pyarrow/io.pxi":297
 *             wr_handle = self.get_output_stream()
 *             with nogil:
 *                 position = GetResultValue(wr_handle.get().Tell())             # <<<<<<<<<<<<<<
 * 
 *         return position
*/
                              __pyx_t_2 = arrow::py::GetResultValue<int64_t>(__pyx_v_wr_handle.get()->Tell()); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(6, 297, __pyx_L8_error)
                              __pyx_v_position = __pyx_t_2;
                            }

                            /* "pyarrow/io.pxi":296
 *         else:
 *             wr_handle = self.get_output_stream()
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 position = GetResultValue(wr_handle.get().Tell())
 * 
*/
                            /*finally:*/ {
                              /*normal exit:*/{
                                __Pyx_FastGIL_Forget();
                                PyEval_RestoreThread(_save);
                                goto __pyx_L9;
                              }
                              __pyx_L8_error: {
                                __Pyx_FastGIL_Forget();
                                PyEval_RestoreThread(_save);
                                goto __pyx_L1_error;
                              }
                              __pyx_L9:;
                            }
                        }
                      }
                      __pyx_L3:;

                      /* "pyarrow/io.pxi":299
 *                 position = GetResultValue(wr_handle.get().Tell())
 * 
 *         return position             # <<<<<<<<<<<<<<
 * 
 *     def seek(self, int64_t position, int whence=0):
*/
                      __Pyx_XDECREF(__pyx_r);
                      __pyx_t_4 = __Pyx_PyLong_From_int64_t(__pyx_v_position); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 299, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_4);
                      __pyx_r = __pyx_t_4;
                      __pyx_t_4 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/io.pxi":284
 *         return metadata
 * 
 *     def tell(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return current stream position
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_4);
                      __Pyx_AddTraceback("pyarrow.lib.NativeFile.tell", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":301
 *         return position
 * 
 *     def seek(self, int64_t position, int whence=0):             # <<<<<<<<<<<<<<
 *         """
 *         Change current file stream position
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_10NativeFile_37seek(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_10NativeFile_36seek, "NativeFile.seek(self, int64_t position, int whence=0)\n\nChange current file stream position\n\nParameters\n----------\nposition : int\n    Byte offset, interpreted relative to value of whence argument\nwhence : int, default 0\n    Point of reference for seek offset\n\nNotes\n-----\nValues of whence:\n* 0 -- start of stream (the default); offset should be zero or positive\n* 1 -- current stream position; offset may be negative\n* 2 -- end of stream; offset is usually negative\n\nReturns\n-------\nint\n    The new absolute stream position.");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_10NativeFile_37seek = {"seek", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10NativeFile_37seek, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10NativeFile_36seek};
                    static PyObject *__pyx_pw_7pyarrow_3lib_10NativeFile_37seek(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      int64_t __pyx_v_position;
                      int __pyx_v_whence;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[2] = {0,0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("seek (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_position,&__pyx_mstate_global->__pyx_n_u_whence,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(6, 301, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  2:
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(6, 301, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 301, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "seek", 0) < (0)) __PYX_ERR(6, 301, __pyx_L3_error)
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("seek", 0, 1, 2, i); __PYX_ERR(6, 301, __pyx_L3_error) }
                          }
                        } else {
                          switch (__pyx_nargs) {
                            case  2:
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(6, 301, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 301, __pyx_L3_error)
                            break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                        }
                        __pyx_v_position = __Pyx_PyLong_As_int64_t(values[0]); if (unlikely((__pyx_v_position == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(6, 301, __pyx_L3_error)
                        if (values[1]) {
                          __pyx_v_whence = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_whence == (int)-1) && PyErr_Occurred())) __PYX_ERR(6, 301, __pyx_L3_error)
                        } else {
                          __pyx_v_whence = ((int)0);
                        }
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("seek", 0, 1, 2, __pyx_nargs); __PYX_ERR(6, 301, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.NativeFile.seek", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_10NativeFile_36seek(((struct __pyx_obj_7pyarrow_3lib_NativeFile *)__pyx_v_self), __pyx_v_position, __pyx_v_whence);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_10NativeFile_36seek(struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_self, int64_t __pyx_v_position, int __pyx_v_whence) {
                      int64_t __pyx_v_offset;
                      std::shared_ptr< arrow::io::RandomAccessFile>  __pyx_v_handle;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      std::shared_ptr< arrow::io::RandomAccessFile>  __pyx_t_1;
                      int64_t __pyx_t_2;
                      PyObject *__pyx_t_3 = NULL;
                      PyObject *__pyx_t_4 = NULL;
                      PyObject *__pyx_t_5 = NULL;
                      PyObject *__pyx_t_6 = NULL;
                      size_t __pyx_t_7;
                      int __pyx_t_8;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("seek", 0);

                      /* "pyarrow/io.pxi":325
 *         """
 *         cdef int64_t offset
 *         handle = self.get_random_access_file()             # <<<<<<<<<<<<<<
 * 
 *         with nogil:
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get_random_access_file");
                        __PYX_ERR(6, 325, __pyx_L1_error)
                      }
                      __pyx_t_1 = ((struct __pyx_vtabstruct_7pyarrow_3lib_NativeFile *)__pyx_v_self->__pyx_vtab)->get_random_access_file(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 325, __pyx_L1_error)
                      __pyx_v_handle = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_1);

                      /* "pyarrow/io.pxi":327
 *         handle = self.get_random_access_file()
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             if whence == 0:
 *                 offset = position
*/
                      {
                          PyThreadState * _save;
                          _save = PyEval_SaveThread();
                          __Pyx_FastGIL_Remember();
                          /*try:*/ {

                            /* "pyarrow/io.pxi":328
 * 
 *         with nogil:
 *             if whence == 0:             # <<<<<<<<<<<<<<
 *                 offset = position
 *             elif whence == 1:
*/
                            switch (__pyx_v_whence) {
                              case 0:

                              /* "pyarrow/io.pxi":329
 *         with nogil:
 *             if whence == 0:
 *                 offset = position             # <<<<<<<<<<<<<<
 *             elif whence == 1:
 *                 offset = GetResultValue(handle.get().Tell())
*/
                              __pyx_v_offset = __pyx_v_position;

                              /* "pyarrow/io.pxi":328
 * 
 *         with nogil:
 *             if whence == 0:             # <<<<<<<<<<<<<<
 *                 offset = position
 *             elif whence == 1:
*/
                              break;
                              case 1:

                              /* "pyarrow/io.pxi":331
 *                 offset = position
 *             elif whence == 1:
 *                 offset = GetResultValue(handle.get().Tell())             # <<<<<<<<<<<<<<
 *                 offset = offset + position
 *             elif whence == 2:
*/
                              __pyx_t_2 = arrow::py::GetResultValue<int64_t>(__pyx_v_handle.get()->Tell()); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(6, 331, __pyx_L4_error)
                              __pyx_v_offset = __pyx_t_2;

                              /* "pyarrow/io.pxi":332
 *             elif whence == 1:
 *                 offset = GetResultValue(handle.get().Tell())
 *                 offset = offset + position             # <<<<<<<<<<<<<<
 *             elif whence == 2:
 *                 offset = GetResultValue(handle.get().GetSize())
*/
                              __pyx_v_offset = (__pyx_v_offset + __pyx_v_position);

                              /* "pyarrow/io.pxi":330
 *             if whence == 0:
 *                 offset = position
 *             elif whence == 1:             # <<<<<<<<<<<<<<
 *                 offset = GetResultValue(handle.get().Tell())
 *                 offset = offset + position
*/
                              break;
                              case 2:

                              /* "pyarrow/io.pxi":334
 *                 offset = offset + position
 *             elif whence == 2:
 *                 offset = GetResultValue(handle.get().GetSize())             # <<<<<<<<<<<<<<
 *                 offset = offset + position
 *             else:
*/
                              __pyx_t_2 = arrow::py::GetResultValue<int64_t>(__pyx_v_handle.get()->GetSize()); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(6, 334, __pyx_L4_error)
                              __pyx_v_offset = __pyx_t_2;

                              /* "pyarrow/io.pxi":335
 *             elif whence == 2:
 *                 offset = GetResultValue(handle.get().GetSize())
 *                 offset = offset + position             # <<<<<<<<<<<<<<
 *             else:
 *                 with gil:
*/
                              __pyx_v_offset = (__pyx_v_offset + __pyx_v_position);

                              /* "pyarrow/io.pxi":333
 *                 offset = GetResultValue(handle.get().Tell())
 *                 offset = offset + position
 *             elif whence == 2:             # <<<<<<<<<<<<<<
 *                 offset = GetResultValue(handle.get().GetSize())
 *                 offset = offset + position
*/
                              break;
                              default:

                              /* "pyarrow/io.pxi":337
 *                 offset = offset + position
 *             else:
 *                 with gil:             # <<<<<<<<<<<<<<
 *                     raise ValueError(f"Invalid value of whence: {whence}")
 *             check_status(handle.get().Seek(offset))
*/
                              {
                                  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                                  /*try:*/ {

                                    /* "pyarrow/io.pxi":338
 *             else:
 *                 with gil:
 *                     raise ValueError(f"Invalid value of whence: {whence}")             # <<<<<<<<<<<<<<
 *             check_status(handle.get().Seek(offset))
 * 
*/
                                    __pyx_t_4 = NULL;
                                    __pyx_t_5 = __Pyx_PyUnicode_From_int(__pyx_v_whence, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 338, __pyx_L7_error)
                                    __Pyx_GOTREF(__pyx_t_5);
                                    __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_Invalid_value_of_whence, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 338, __pyx_L7_error)
                                    __Pyx_GOTREF(__pyx_t_6);
                                    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                                    __pyx_t_7 = 1;
                                    {
                                      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_6};
                                      __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                                      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                                      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                                      if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 338, __pyx_L7_error)
                                      __Pyx_GOTREF(__pyx_t_3);
                                    }
                                    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
                                    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                                    __PYX_ERR(6, 338, __pyx_L7_error)
                                  }

                                  /* "pyarrow/io.pxi":337
 *                 offset = offset + position
 *             else:
 *                 with gil:             # <<<<<<<<<<<<<<
 *                     raise ValueError(f"Invalid value of whence: {whence}")
 *             check_status(handle.get().Seek(offset))
*/
                                  /*finally:*/ {
                                    __pyx_L7_error: {
                                      __Pyx_PyGILState_Release(__pyx_gilstate_save);
                                      goto __pyx_L4_error;
                                    }
                                  }
                              }
                              break;
                            }

                            /* "pyarrow/io.pxi":339
 *                 with gil:
 *                     raise ValueError(f"Invalid value of whence: {whence}")
 *             check_status(handle.get().Seek(offset))             # <<<<<<<<<<<<<<
 * 
 *         return self.tell()
*/
                            __pyx_t_8 = __pyx_f_7pyarrow_3lib_check_status(__pyx_v_handle.get()->Seek(__pyx_v_offset)); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(6, 339, __pyx_L4_error)
                          }

                          /* "pyarrow/io.pxi":327
 *         handle = self.get_random_access_file()
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             if whence == 0:
 *                 offset = position
*/
                          /*finally:*/ {
                            /*normal exit:*/{
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L5;
                            }
                            __pyx_L4_error: {
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L1_error;
                            }
                            __pyx_L5:;
                          }
                      }

                      /* "pyarrow/io.pxi":341
 *             check_status(handle.get().Seek(offset))
 * 
 *         return self.tell()             # <<<<<<<<<<<<<<
 * 
 *     def flush(self):
*/
                      __Pyx_XDECREF(__pyx_r);
                      __pyx_t_6 = ((PyObject *)__pyx_v_self);
                      __Pyx_INCREF(__pyx_t_6);
                      __pyx_t_7 = 0;
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
                        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_tell, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
                        if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 341, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_3);
                      }
                      __pyx_r = __pyx_t_3;
                      __pyx_t_3 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/io.pxi":301
 *         return position
 * 
 *     def seek(self, int64_t position, int whence=0):             # <<<<<<<<<<<<<<
 *         """
 *         Change current file stream position
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_XDECREF(__pyx_t_4);
                      __Pyx_XDECREF(__pyx_t_5);
                      __Pyx_XDECREF(__pyx_t_6);
                      __Pyx_AddTraceback("pyarrow.lib.NativeFile.seek", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":343
 *         return self.tell()
 * 
 *     def flush(self):             # <<<<<<<<<<<<<<
 *         """
 *         Flush the stream, if applicable.
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_10NativeFile_39flush(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_10NativeFile_38flush, "NativeFile.flush(self)\n\nFlush the stream, if applicable.\n\nAn error is raised if stream is not writable.");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_10NativeFile_39flush = {"flush", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10NativeFile_39flush, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10NativeFile_38flush};
                    static PyObject *__pyx_pw_7pyarrow_3lib_10NativeFile_39flush(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("flush (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("flush", 1, 0, 0, __pyx_nargs); return NULL; }
                      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                      if (unlikely(__pyx_kwds_len < 0)) return NULL;
                      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("flush", __pyx_kwds); return NULL;}
                      __pyx_r = __pyx_pf_7pyarrow_3lib_10NativeFile_38flush(((struct __pyx_obj_7pyarrow_3lib_NativeFile *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_10NativeFile_38flush(struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_self) {
                      std::shared_ptr< arrow::io::OutputStream>  __pyx_v_handle;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      size_t __pyx_t_3;
                      std::shared_ptr< arrow::io::OutputStream>  __pyx_t_4;
                      int __pyx_t_5;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("flush", 0);

                      /* "pyarrow/io.pxi":349
 *         An error is raised if stream is not writable.
 *         """
 *         self._assert_open()             # <<<<<<<<<<<<<<
 *         # For IOBase compatibility, flush() on an input stream is a no-op
 *         if self.is_writable:
*/
                      __pyx_t_2 = ((PyObject *)__pyx_v_self);
                      __Pyx_INCREF(__pyx_t_2);
                      __pyx_t_3 = 0;
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
                        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_assert_open, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 349, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

                      /* "pyarrow/io.pxi":351
 *         self._assert_open()
 *         # For IOBase compatibility, flush() on an input stream is a no-op
 *         if self.is_writable:             # <<<<<<<<<<<<<<
 *             handle = self.get_output_stream()
 *             with nogil:
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "is_writable");
                        __PYX_ERR(6, 351, __pyx_L1_error)
                      }
                      if (__pyx_v_self->is_writable) {

                        /* "pyarrow/io.pxi":352
 *         # For IOBase compatibility, flush() on an input stream is a no-op
 *         if self.is_writable:
 *             handle = self.get_output_stream()             # <<<<<<<<<<<<<<
 *             with nogil:
 *                 check_status(handle.get().Flush())
*/
                        if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get_output_stream");
                          __PYX_ERR(6, 352, __pyx_L1_error)
                        }
                        __pyx_t_4 = ((struct __pyx_vtabstruct_7pyarrow_3lib_NativeFile *)__pyx_v_self->__pyx_vtab)->get_output_stream(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 352, __pyx_L1_error)
                        __pyx_v_handle = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_4);

                        /* "pyarrow/io.pxi":353
 *         if self.is_writable:
 *             handle = self.get_output_stream()
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 check_status(handle.get().Flush())
 * 
*/
                        {
                            PyThreadState * _save;
                            _save = PyEval_SaveThread();
                            __Pyx_FastGIL_Remember();
                            /*try:*/ {

                              /* "pyarrow/io.pxi":354
 *             handle = self.get_output_stream()
 *             with nogil:
 *                 check_status(handle.get().Flush())             # <<<<<<<<<<<<<<
 * 
 *     def write(self, data):
*/
                              __pyx_t_5 = __pyx_f_7pyarrow_3lib_check_status(__pyx_v_handle.get()->Flush()); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(6, 354, __pyx_L5_error)
                            }

                            /* "pyarrow/io.pxi":353
 *         if self.is_writable:
 *             handle = self.get_output_stream()
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 check_status(handle.get().Flush())
 * 
*/
                            /*finally:*/ {
                              /*normal exit:*/{
                                __Pyx_FastGIL_Forget();
                                PyEval_RestoreThread(_save);
                                goto __pyx_L6;
                              }
                              __pyx_L5_error: {
                                __Pyx_FastGIL_Forget();
                                PyEval_RestoreThread(_save);
                                goto __pyx_L1_error;
                              }
                              __pyx_L6:;
                            }
                        }

                        /* "pyarrow/io.pxi":351
 *         self._assert_open()
 *         # For IOBase compatibility, flush() on an input stream is a no-op
 *         if self.is_writable:             # <<<<<<<<<<<<<<
 *             handle = self.get_output_stream()
 *             with nogil:
*/
                      }

                      /* "pyarrow/io.pxi":343
 *         return self.tell()
 * 
 *     def flush(self):             # <<<<<<<<<<<<<<
 *         """
 *         Flush the stream, if applicable.
*/

                      /* function exit code */
                      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_AddTraceback("pyarrow.lib.NativeFile.flush", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":356
 *                 check_status(handle.get().Flush())
 * 
 *     def write(self, data):             # <<<<<<<<<<<<<<
 *         """
 *         Write data to the file.
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_10NativeFile_41write(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_10NativeFile_40write, "NativeFile.write(self, data)\n\nWrite data to the file.\n\nParameters\n----------\ndata : bytes-like object or exporter of buffer protocol\n\nReturns\n-------\nint\n    nbytes: number of bytes written");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_10NativeFile_41write = {"write", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10NativeFile_41write, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10NativeFile_40write};
                    static PyObject *__pyx_pw_7pyarrow_3lib_10NativeFile_41write(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      PyObject *__pyx_v_data = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[1] = {0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("write (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_data,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(6, 356, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 356, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "write", 0) < (0)) __PYX_ERR(6, 356, __pyx_L3_error)
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("write", 1, 1, 1, i); __PYX_ERR(6, 356, __pyx_L3_error) }
                          }
                        } else if (unlikely(__pyx_nargs != 1)) {
                          goto __pyx_L5_argtuple_error;
                        } else {
                          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 356, __pyx_L3_error)
                        }
                        __pyx_v_data = values[0];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("write", 1, 1, 1, __pyx_nargs); __PYX_ERR(6, 356, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.NativeFile.write", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_10NativeFile_40write(((struct __pyx_obj_7pyarrow_3lib_NativeFile *)__pyx_v_self), __pyx_v_data);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_10NativeFile_40write(struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_self, PyObject *__pyx_v_data) {
                      std::shared_ptr< arrow::io::OutputStream>  __pyx_v_handle;
                      std::shared_ptr< arrow::Buffer>  __pyx_v_buf;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      size_t __pyx_t_3;
                      std::shared_ptr< arrow::io::OutputStream>  __pyx_t_4;
                      std::shared_ptr< arrow::Buffer>  __pyx_t_5;
                      int __pyx_t_6;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("write", 0);

                      /* "pyarrow/io.pxi":369
 *             nbytes: number of bytes written
 *         """
 *         self._assert_writable()             # <<<<<<<<<<<<<<
 *         handle = self.get_output_stream()
 * 
*/
                      __pyx_t_2 = ((PyObject *)__pyx_v_self);
                      __Pyx_INCREF(__pyx_t_2);
                      __pyx_t_3 = 0;
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
                        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_assert_writable, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 369, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

                      /* "pyarrow/io.pxi":370
 *         """
 *         self._assert_writable()
 *         handle = self.get_output_stream()             # <<<<<<<<<<<<<<
 * 
 *         cdef shared_ptr[CBuffer] buf = as_c_buffer(data)
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get_output_stream");
                        __PYX_ERR(6, 370, __pyx_L1_error)
                      }
                      __pyx_t_4 = ((struct __pyx_vtabstruct_7pyarrow_3lib_NativeFile *)__pyx_v_self->__pyx_vtab)->get_output_stream(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 370, __pyx_L1_error)
                      __pyx_v_handle = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_4);

                      /* "pyarrow/io.pxi":372
 *         handle = self.get_output_stream()
 * 
 *         cdef shared_ptr[CBuffer] buf = as_c_buffer(data)             # <<<<<<<<<<<<<<
 * 
 *         with nogil:
*/
                      __pyx_t_5 = __pyx_f_7pyarrow_3lib_as_c_buffer(__pyx_v_data); if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 372, __pyx_L1_error)
                      __pyx_v_buf = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_5);

                      /* "pyarrow/io.pxi":374
 *         cdef shared_ptr[CBuffer] buf = as_c_buffer(data)
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             check_status(handle.get().WriteBuffer(buf))
 *         return buf.get().size()
*/
                      {
                          PyThreadState * _save;
                          _save = PyEval_SaveThread();
                          __Pyx_FastGIL_Remember();
                          /*try:*/ {

                            /* "pyarrow/io.pxi":375
 * 
 *         with nogil:
 *             check_status(handle.get().WriteBuffer(buf))             # <<<<<<<<<<<<<<
 *         return buf.get().size()
 * 
*/
                            __pyx_t_6 = __pyx_f_7pyarrow_3lib_check_status(__pyx_v_handle.get()-> Write(__pyx_v_buf)); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(6, 375, __pyx_L4_error)
                          }

                          /* "pyarrow/io.pxi":374
 *         cdef shared_ptr[CBuffer] buf = as_c_buffer(data)
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             check_status(handle.get().WriteBuffer(buf))
 *         return buf.get().size()
*/
                          /*finally:*/ {
                            /*normal exit:*/{
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L5;
                            }
                            __pyx_L4_error: {
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L1_error;
                            }
                            __pyx_L5:;
                          }
                      }

                      /* "pyarrow/io.pxi":376
 *         with nogil:
 *             check_status(handle.get().WriteBuffer(buf))
 *         return buf.get().size()             # <<<<<<<<<<<<<<
 * 
 *     def read(self, nbytes=None):
*/
                      __Pyx_XDECREF(__pyx_r);
                      __pyx_t_1 = __Pyx_PyLong_From_int64_t(__pyx_v_buf.get()->size()); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 376, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_r = __pyx_t_1;
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/io.pxi":356
 *                 check_status(handle.get().Flush())
 * 
 *     def write(self, data):             # <<<<<<<<<<<<<<
 *         """
 *         Write data to the file.
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_AddTraceback("pyarrow.lib.NativeFile.write", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":378
 *         return buf.get().size()
 * 
 *     def read(self, nbytes=None):             # <<<<<<<<<<<<<<
 *         """
 *         Read and return up to n bytes.
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_10NativeFile_43read(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_10NativeFile_42read, "NativeFile.read(self, nbytes=None)\n\nRead and return up to n bytes.\n\nIf *nbytes* is None, then the entire remaining file contents are read.\n\nParameters\n----------\nnbytes : int, default None\n\nReturns\n-------\ndata : bytes");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_10NativeFile_43read = {"read", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10NativeFile_43read, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10NativeFile_42read};
                    static PyObject *__pyx_pw_7pyarrow_3lib_10NativeFile_43read(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      PyObject *__pyx_v_nbytes = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[1] = {0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("read (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_nbytes,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(6, 378, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 378, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "read", 0) < (0)) __PYX_ERR(6, 378, __pyx_L3_error)
                          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
                        } else {
                          switch (__pyx_nargs) {
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 378, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
                        }
                        __pyx_v_nbytes = values[0];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("read", 0, 0, 1, __pyx_nargs); __PYX_ERR(6, 378, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.NativeFile.read", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_10NativeFile_42read(((struct __pyx_obj_7pyarrow_3lib_NativeFile *)__pyx_v_self), __pyx_v_nbytes);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_10NativeFile_42read(struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_self, PyObject *__pyx_v_nbytes) {
                      int64_t __pyx_v_c_nbytes;
                      int64_t __pyx_v_bytes_read;
                      PyObject *__pyx_v_obj;
                      PyObject *__pyx_v_bs = NULL;
                      PyObject *__pyx_v_chunks = NULL;
                      PyObject *__pyx_v_chunk = NULL;
                      std::shared_ptr< arrow::io::InputStream>  __pyx_v_handle;
                      uint8_t *__pyx_v_buf;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_t_1;
                      PyObject *__pyx_t_2 = NULL;
                      PyObject *__pyx_t_3 = NULL;
                      size_t __pyx_t_4;
                      int __pyx_t_5;
                      int __pyx_t_6;
                      PyObject *__pyx_t_7 = NULL;
                      int64_t __pyx_t_8;
                      std::shared_ptr< arrow::io::InputStream>  __pyx_t_9;
                      PyObject *__pyx_t_10;
                      int __pyx_t_11;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("read", 0);

                      /* "pyarrow/io.pxi":394
 *         cdef:
 *             int64_t c_nbytes
 *             int64_t bytes_read = 0             # <<<<<<<<<<<<<<
 *             PyObject* obj
 * 
*/
                      __pyx_v_bytes_read = 0;

                      /* "pyarrow/io.pxi":397
 *             PyObject* obj
 * 
 *         if nbytes is None:             # <<<<<<<<<<<<<<
 *             if not self.is_seekable:
 *                 # Cannot get file size => read chunkwise
*/
                      __pyx_t_1 = (__pyx_v_nbytes == Py_None);
                      if (__pyx_t_1) {

                        /* "pyarrow/io.pxi":398
 * 
 *         if nbytes is None:
 *             if not self.is_seekable:             # <<<<<<<<<<<<<<
 *                 # Cannot get file size => read chunkwise
 *                 bs = self._default_chunk_size
*/
                        if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "is_seekable");
                          __PYX_ERR(6, 398, __pyx_L1_error)
                        }
                        __pyx_t_1 = (!__pyx_v_self->is_seekable);
                        if (__pyx_t_1) {

                          /* "pyarrow/io.pxi":400
 *             if not self.is_seekable:
 *                 # Cannot get file size => read chunkwise
 *                 bs = self._default_chunk_size             # <<<<<<<<<<<<<<
 *                 chunks = []
 *                 while True:
*/
                          __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_default_chunk_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 400, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_2);
                          __pyx_v_bs = __pyx_t_2;
                          __pyx_t_2 = 0;

                          /* "pyarrow/io.pxi":401
 *                 # Cannot get file size => read chunkwise
 *                 bs = self._default_chunk_size
 *                 chunks = []             # <<<<<<<<<<<<<<
 *                 while True:
 *                     chunk = self.read(bs)
*/
                          __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 401, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_2);
                          __pyx_v_chunks = ((PyObject*)__pyx_t_2);
                          __pyx_t_2 = 0;

                          /* "pyarrow/io.pxi":402
 *                 bs = self._default_chunk_size
 *                 chunks = []
 *                 while True:             # <<<<<<<<<<<<<<
 *                     chunk = self.read(bs)
 *                     if not chunk:
*/
                          while (1) {

                            /* "pyarrow/io.pxi":403
 *                 chunks = []
 *                 while True:
 *                     chunk = self.read(bs)             # <<<<<<<<<<<<<<
 *                     if not chunk:
 *                         break
*/
                            __pyx_t_3 = ((PyObject *)__pyx_v_self);
                            __Pyx_INCREF(__pyx_t_3);
                            __pyx_t_4 = 0;
                            {
                              PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_bs};
                              __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_read, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                              if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 403, __pyx_L1_error)
                              __Pyx_GOTREF(__pyx_t_2);
                            }
                            __Pyx_XDECREF_SET(__pyx_v_chunk, __pyx_t_2);
                            __pyx_t_2 = 0;

                            /* "pyarrow/io.pxi":404
 *                 while True:
 *                     chunk = self.read(bs)
 *                     if not chunk:             # <<<<<<<<<<<<<<
 *                         break
 *                     chunks.append(chunk)
*/
                            __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_chunk); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(6, 404, __pyx_L1_error)
                            __pyx_t_5 = (!__pyx_t_1);
                            if (__pyx_t_5) {

                              /* "pyarrow/io.pxi":405
 *                     chunk = self.read(bs)
 *                     if not chunk:
 *                         break             # <<<<<<<<<<<<<<
 *                     chunks.append(chunk)
 *                 return b"".join(chunks)
*/
                              goto __pyx_L6_break;

                              /* "pyarrow/io.pxi":404
 *                 while True:
 *                     chunk = self.read(bs)
 *                     if not chunk:             # <<<<<<<<<<<<<<
 *                         break
 *                     chunks.append(chunk)
*/
                            }

                            /* "pyarrow/io.pxi":406
 *                     if not chunk:
 *                         break
 *                     chunks.append(chunk)             # <<<<<<<<<<<<<<
 *                 return b"".join(chunks)
 * 
*/
                            __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_chunks, __pyx_v_chunk); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(6, 406, __pyx_L1_error)
                          }
                          __pyx_L6_break:;

                          /* "pyarrow/io.pxi":407
 *                         break
 *                     chunks.append(chunk)
 *                 return b"".join(chunks)             # <<<<<<<<<<<<<<
 * 
 *             c_nbytes = self.size() - self.tell()
*/
                          __Pyx_XDECREF(__pyx_r);
                          __pyx_t_2 = __Pyx_PyBytes_Join(__pyx_mstate_global->__pyx_kp_b__15, __pyx_v_chunks); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 407, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_2);
                          __pyx_r = __pyx_t_2;
                          __pyx_t_2 = 0;
                          goto __pyx_L0;

                          /* "pyarrow/io.pxi":398
 * 
 *         if nbytes is None:
 *             if not self.is_seekable:             # <<<<<<<<<<<<<<
 *                 # Cannot get file size => read chunkwise
 *                 bs = self._default_chunk_size
*/
                        }

                        /* "pyarrow/io.pxi":409
 *                 return b"".join(chunks)
 * 
 *             c_nbytes = self.size() - self.tell()             # <<<<<<<<<<<<<<
 *         else:
 *             c_nbytes = nbytes
*/
                        __pyx_t_3 = ((PyObject *)__pyx_v_self);
                        __Pyx_INCREF(__pyx_t_3);
                        __pyx_t_4 = 0;
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
                          __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_size, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                          if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 409, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_2);
                        }
                        __pyx_t_7 = ((PyObject *)__pyx_v_self);
                        __Pyx_INCREF(__pyx_t_7);
                        __pyx_t_4 = 0;
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL};
                          __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_tell, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
                          if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 409, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_3);
                        }
                        __pyx_t_7 = PyNumber_Subtract(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(6, 409, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_7);
                        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                        __pyx_t_8 = __Pyx_PyLong_As_int64_t(__pyx_t_7); if (unlikely((__pyx_t_8 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(6, 409, __pyx_L1_error)
                        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
                        __pyx_v_c_nbytes = __pyx_t_8;

                        /* "pyarrow/io.pxi":397
 *             PyObject* obj
 * 
 *         if nbytes is None:             # <<<<<<<<<<<<<<
 *             if not self.is_seekable:
 *                 # Cannot get file size => read chunkwise
*/
                        goto __pyx_L3;
                      }

                      /* "pyarrow/io.pxi":411
 *             c_nbytes = self.size() - self.tell()
 *         else:
 *             c_nbytes = nbytes             # <<<<<<<<<<<<<<
 * 
 *         handle = self.get_input_stream()
*/
                      /*else*/ {
                        __pyx_t_8 = __Pyx_PyLong_As_int64_t(__pyx_v_nbytes); if (unlikely((__pyx_t_8 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(6, 411, __pyx_L1_error)
                        __pyx_v_c_nbytes = __pyx_t_8;
                      }
                      __pyx_L3:;

                      /* "pyarrow/io.pxi":413
 *             c_nbytes = nbytes
 * 
 *         handle = self.get_input_stream()             # <<<<<<<<<<<<<<
 * 
 *         # Allocate empty write space
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get_input_stream");
                        __PYX_ERR(6, 413, __pyx_L1_error)
                      }
                      __pyx_t_9 = ((struct __pyx_vtabstruct_7pyarrow_3lib_NativeFile *)__pyx_v_self->__pyx_vtab)->get_input_stream(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 413, __pyx_L1_error)
                      __pyx_v_handle = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_9);

                      /* "pyarrow/io.pxi":416
 * 
 *         # Allocate empty write space
 *         obj = PyBytes_FromStringAndSizeNative(NULL, c_nbytes)             # <<<<<<<<<<<<<<
 * 
 *         cdef uint8_t* buf = <uint8_t*> cp.PyBytes_AS_STRING(<object> obj)
*/
                      __pyx_t_10 =  PyBytes_FromStringAndSize(NULL, __pyx_v_c_nbytes); if (unlikely(__pyx_t_10 == ((void *)NULL))) __PYX_ERR(6, 416, __pyx_L1_error)
                      __pyx_v_obj = __pyx_t_10;

                      /* "pyarrow/io.pxi":418
 *         obj = PyBytes_FromStringAndSizeNative(NULL, c_nbytes)
 * 
 *         cdef uint8_t* buf = <uint8_t*> cp.PyBytes_AS_STRING(<object> obj)             # <<<<<<<<<<<<<<
 *         with nogil:
 *             bytes_read = GetResultValue(handle.get().Read(c_nbytes, buf))
*/
                      __pyx_v_buf = ((uint8_t *)PyBytes_AS_STRING(((PyObject *)__pyx_v_obj)));

                      /* "pyarrow/io.pxi":419
 * 
 *         cdef uint8_t* buf = <uint8_t*> cp.PyBytes_AS_STRING(<object> obj)
 *         with nogil:             # <<<<<<<<<<<<<<
 *             bytes_read = GetResultValue(handle.get().Read(c_nbytes, buf))
 * 
*/
                      {
                          PyThreadState * _save;
                          _save = PyEval_SaveThread();
                          __Pyx_FastGIL_Remember();
                          /*try:*/ {

                            /* "pyarrow/io.pxi":420
 *         cdef uint8_t* buf = <uint8_t*> cp.PyBytes_AS_STRING(<object> obj)
 *         with nogil:
 *             bytes_read = GetResultValue(handle.get().Read(c_nbytes, buf))             # <<<<<<<<<<<<<<
 * 
 *         if bytes_read < c_nbytes:
*/
                            __pyx_t_8 = arrow::py::GetResultValue<int64_t>(__pyx_v_handle.get()->Read(__pyx_v_c_nbytes, __pyx_v_buf)); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(6, 420, __pyx_L9_error)
                            __pyx_v_bytes_read = __pyx_t_8;
                          }

                          /* "pyarrow/io.pxi":419
 * 
 *         cdef uint8_t* buf = <uint8_t*> cp.PyBytes_AS_STRING(<object> obj)
 *         with nogil:             # <<<<<<<<<<<<<<
 *             bytes_read = GetResultValue(handle.get().Read(c_nbytes, buf))
 * 
*/
                          /*finally:*/ {
                            /*normal exit:*/{
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L10;
                            }
                            __pyx_L9_error: {
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L1_error;
                            }
                            __pyx_L10:;
                          }
                      }

                      /* "pyarrow/io.pxi":422
 *             bytes_read = GetResultValue(handle.get().Read(c_nbytes, buf))
 * 
 *         if bytes_read < c_nbytes:             # <<<<<<<<<<<<<<
 *             cp._PyBytes_Resize(&obj, <Py_ssize_t> bytes_read)
 * 
*/
                      __pyx_t_5 = (__pyx_v_bytes_read < __pyx_v_c_nbytes);
                      if (__pyx_t_5) {

                        /* "pyarrow/io.pxi":423
 * 
 *         if bytes_read < c_nbytes:
 *             cp._PyBytes_Resize(&obj, <Py_ssize_t> bytes_read)             # <<<<<<<<<<<<<<
 * 
 *         return PyObject_to_object(obj)
*/
                        __pyx_t_11 = _PyBytes_Resize((&__pyx_v_obj), ((Py_ssize_t)__pyx_v_bytes_read)); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(6, 423, __pyx_L1_error)

                        /* "pyarrow/io.pxi":422
 *             bytes_read = GetResultValue(handle.get().Read(c_nbytes, buf))
 * 
 *         if bytes_read < c_nbytes:             # <<<<<<<<<<<<<<
 *             cp._PyBytes_Resize(&obj, <Py_ssize_t> bytes_read)
 * 
*/
                      }

                      /* "pyarrow/io.pxi":425
 *             cp._PyBytes_Resize(&obj, <Py_ssize_t> bytes_read)
 * 
 *         return PyObject_to_object(obj)             # <<<<<<<<<<<<<<
 * 
 *     def get_stream(self, file_offset, nbytes):
*/
                      __Pyx_XDECREF(__pyx_r);
                      __pyx_t_7 = __pyx_f_7pyarrow_8includes_6common_PyObject_to_object(__pyx_v_obj); if (unlikely(!__pyx_t_7)) __PYX_ERR(6, 425, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_7);
                      __pyx_r = __pyx_t_7;
                      __pyx_t_7 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/io.pxi":378
 *         return buf.get().size()
 * 
 *     def read(self, nbytes=None):             # <<<<<<<<<<<<<<
 *         """
 *         Read and return up to n bytes.
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_XDECREF(__pyx_t_7);
                      __Pyx_AddTraceback("pyarrow.lib.NativeFile.read", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XDECREF(__pyx_v_bs);
                      __Pyx_XDECREF(__pyx_v_chunks);
                      __Pyx_XDECREF(__pyx_v_chunk);
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":427
 *         return PyObject_to_object(obj)
 * 
 *     def get_stream(self, file_offset, nbytes):             # <<<<<<<<<<<<<<
 *         """
 *         Return an input stream that reads a file segment independent of the
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_10NativeFile_45get_stream(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_10NativeFile_44get_stream, "NativeFile.get_stream(self, file_offset, nbytes)\n\nReturn an input stream that reads a file segment independent of the\nstate of the file.\n\nAllows reading portions of a random access file as an input stream\nwithout interfering with each other.\n\nParameters\n----------\nfile_offset : int\nnbytes : int\n\nReturns\n-------\nstream : NativeFile");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_10NativeFile_45get_stream = {"get_stream", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10NativeFile_45get_stream, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10NativeFile_44get_stream};
                    static PyObject *__pyx_pw_7pyarrow_3lib_10NativeFile_45get_stream(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      PyObject *__pyx_v_file_offset = 0;
                      PyObject *__pyx_v_nbytes = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[2] = {0,0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("get_stream (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_file_offset,&__pyx_mstate_global->__pyx_n_u_nbytes,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(6, 427, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  2:
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(6, 427, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 427, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "get_stream", 0) < (0)) __PYX_ERR(6, 427, __pyx_L3_error)
                          for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("get_stream", 1, 2, 2, i); __PYX_ERR(6, 427, __pyx_L3_error) }
                          }
                        } else if (unlikely(__pyx_nargs != 2)) {
                          goto __pyx_L5_argtuple_error;
                        } else {
                          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 427, __pyx_L3_error)
                          values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(6, 427, __pyx_L3_error)
                        }
                        __pyx_v_file_offset = values[0];
                        __pyx_v_nbytes = values[1];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("get_stream", 1, 2, 2, __pyx_nargs); __PYX_ERR(6, 427, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.NativeFile.get_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_10NativeFile_44get_stream(((struct __pyx_obj_7pyarrow_3lib_NativeFile *)__pyx_v_self), __pyx_v_file_offset, __pyx_v_nbytes);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_10NativeFile_44get_stream(struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_self, PyObject *__pyx_v_file_offset, PyObject *__pyx_v_nbytes) {
                      std::shared_ptr< arrow::io::InputStream>  __pyx_v_data;
                      int64_t __pyx_v_c_file_offset;
                      int64_t __pyx_v_c_nbytes;
                      std::shared_ptr< arrow::io::RandomAccessFile>  __pyx_v_handle;
                      struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_stream = NULL;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int64_t __pyx_t_1;
                      std::shared_ptr< arrow::io::RandomAccessFile>  __pyx_t_2;
                      std::shared_ptr< arrow::io::InputStream>  __pyx_t_3;
                      PyObject *__pyx_t_4 = NULL;
                      PyObject *__pyx_t_5 = NULL;
                      size_t __pyx_t_6;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("get_stream", 0);

                      /* "pyarrow/io.pxi":449
 *             int64_t c_nbytes
 * 
 *         c_file_offset = file_offset             # <<<<<<<<<<<<<<
 *         c_nbytes = nbytes
 * 
*/
                      __pyx_t_1 = __Pyx_PyLong_As_int64_t(__pyx_v_file_offset); if (unlikely((__pyx_t_1 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(6, 449, __pyx_L1_error)
                      __pyx_v_c_file_offset = __pyx_t_1;

                      /* "pyarrow/io.pxi":450
 * 
 *         c_file_offset = file_offset
 *         c_nbytes = nbytes             # <<<<<<<<<<<<<<
 * 
 *         handle = self.get_random_access_file()
*/
                      __pyx_t_1 = __Pyx_PyLong_As_int64_t(__pyx_v_nbytes); if (unlikely((__pyx_t_1 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(6, 450, __pyx_L1_error)
                      __pyx_v_c_nbytes = __pyx_t_1;

                      /* "pyarrow/io.pxi":452
 *         c_nbytes = nbytes
 * 
 *         handle = self.get_random_access_file()             # <<<<<<<<<<<<<<
 * 
 *         data = GetResultValue(
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get_random_access_file");
                        __PYX_ERR(6, 452, __pyx_L1_error)
                      }
                      __pyx_t_2 = ((struct __pyx_vtabstruct_7pyarrow_3lib_NativeFile *)__pyx_v_self->__pyx_vtab)->get_random_access_file(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 452, __pyx_L1_error)
                      __pyx_v_handle = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_2);

                      /* "pyarrow/io.pxi":454
 *         handle = self.get_random_access_file()
 * 
 *         data = GetResultValue(             # <<<<<<<<<<<<<<
 *             CRandomAccessFile.GetStream(handle, c_file_offset, c_nbytes))
 * 
*/
                      __pyx_t_3 = arrow::py::GetResultValue<std::shared_ptr< arrow::io::InputStream> >( arrow::io::RandomAccessFile::GetStream(__pyx_v_handle, __pyx_v_c_file_offset, __pyx_v_c_nbytes)); if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 454, __pyx_L1_error)
                      __pyx_v_data = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_3);

                      /* "pyarrow/io.pxi":457
 *             CRandomAccessFile.GetStream(handle, c_file_offset, c_nbytes))
 * 
 *         stream = NativeFile()             # <<<<<<<<<<<<<<
 *         stream.set_input_stream(data)
 *         stream.is_readable = True
*/
                      __pyx_t_5 = NULL;
                      __pyx_t_6 = 1;
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
                        __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NativeFile, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
                        if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 457, __pyx_L1_error)
                        __Pyx_GOTREF((PyObject *)__pyx_t_4);
                      }
                      __pyx_v_stream = ((struct __pyx_obj_7pyarrow_3lib_NativeFile *)__pyx_t_4);
                      __pyx_t_4 = 0;

                      /* "pyarrow/io.pxi":458
 * 
 *         stream = NativeFile()
 *         stream.set_input_stream(data)             # <<<<<<<<<<<<<<
 *         stream.is_readable = True
 * 
*/
                      __pyx_t_4 = ((struct __pyx_vtabstruct_7pyarrow_3lib_NativeFile *)__pyx_v_stream->__pyx_vtab)->set_input_stream(__pyx_v_stream, __pyx_v_data); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 458, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_4);
                      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

                      /* "pyarrow/io.pxi":459
 *         stream = NativeFile()
 *         stream.set_input_stream(data)
 *         stream.is_readable = True             # <<<<<<<<<<<<<<
 * 
 *         return stream
*/
                      __pyx_v_stream->is_readable = 1;

                      /* "pyarrow/io.pxi":461
 *         stream.is_readable = True
 * 
 *         return stream             # <<<<<<<<<<<<<<
 * 
 *     def read_at(self, nbytes, offset):
*/
                      __Pyx_XDECREF(__pyx_r);
                      __Pyx_INCREF((PyObject *)__pyx_v_stream);
                      __pyx_r = ((PyObject *)__pyx_v_stream);
                      goto __pyx_L0;

                      /* "pyarrow/io.pxi":427
 *         return PyObject_to_object(obj)
 * 
 *     def get_stream(self, file_offset, nbytes):             # <<<<<<<<<<<<<<
 *         """
 *         Return an input stream that reads a file segment independent of the
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_4);
                      __Pyx_XDECREF(__pyx_t_5);
                      __Pyx_AddTraceback("pyarrow.lib.NativeFile.get_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XDECREF((PyObject *)__pyx_v_stream);
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":463
 *         return stream
 * 
 *     def read_at(self, nbytes, offset):             # <<<<<<<<<<<<<<
 *         """
 *         Read indicated number of bytes at offset from the file
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_10NativeFile_47read_at(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_10NativeFile_46read_at, "NativeFile.read_at(self, nbytes, offset)\n\nRead indicated number of bytes at offset from the file\n\nParameters\n----------\nnbytes : int\noffset : int\n\nReturns\n-------\ndata : bytes");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_10NativeFile_47read_at = {"read_at", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10NativeFile_47read_at, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10NativeFile_46read_at};
                    static PyObject *__pyx_pw_7pyarrow_3lib_10NativeFile_47read_at(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      PyObject *__pyx_v_nbytes = 0;
                      PyObject *__pyx_v_offset = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[2] = {0,0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("read_at (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_nbytes,&__pyx_mstate_global->__pyx_n_u_offset,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(6, 463, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  2:
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(6, 463, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 463, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "read_at", 0) < (0)) __PYX_ERR(6, 463, __pyx_L3_error)
                          for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("read_at", 1, 2, 2, i); __PYX_ERR(6, 463, __pyx_L3_error) }
                          }
                        } else if (unlikely(__pyx_nargs != 2)) {
                          goto __pyx_L5_argtuple_error;
                        } else {
                          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 463, __pyx_L3_error)
                          values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(6, 463, __pyx_L3_error)
                        }
                        __pyx_v_nbytes = values[0];
                        __pyx_v_offset = values[1];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("read_at", 1, 2, 2, __pyx_nargs); __PYX_ERR(6, 463, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.NativeFile.read_at", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_10NativeFile_46read_at(((struct __pyx_obj_7pyarrow_3lib_NativeFile *)__pyx_v_self), __pyx_v_nbytes, __pyx_v_offset);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_10NativeFile_46read_at(struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_self, PyObject *__pyx_v_nbytes, PyObject *__pyx_v_offset) {
                      int64_t __pyx_v_c_nbytes;
                      int64_t __pyx_v_c_offset;
                      int64_t __pyx_v_bytes_read;
                      PyObject *__pyx_v_obj;
                      std::shared_ptr< arrow::io::RandomAccessFile>  __pyx_v_handle;
                      uint8_t *__pyx_v_buf;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int64_t __pyx_t_1;
                      std::shared_ptr< arrow::io::RandomAccessFile>  __pyx_t_2;
                      PyObject *__pyx_t_3;
                      int __pyx_t_4;
                      int __pyx_t_5;
                      PyObject *__pyx_t_6 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("read_at", 0);

                      /* "pyarrow/io.pxi":479
 *             int64_t c_nbytes
 *             int64_t c_offset
 *             int64_t bytes_read = 0             # <<<<<<<<<<<<<<
 *             PyObject* obj
 * 
*/
                      __pyx_v_bytes_read = 0;

                      /* "pyarrow/io.pxi":482
 *             PyObject* obj
 * 
 *         c_nbytes = nbytes             # <<<<<<<<<<<<<<
 * 
 *         c_offset = offset
*/
                      __pyx_t_1 = __Pyx_PyLong_As_int64_t(__pyx_v_nbytes); if (unlikely((__pyx_t_1 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(6, 482, __pyx_L1_error)
                      __pyx_v_c_nbytes = __pyx_t_1;

                      /* "pyarrow/io.pxi":484
 *         c_nbytes = nbytes
 * 
 *         c_offset = offset             # <<<<<<<<<<<<<<
 * 
 *         handle = self.get_random_access_file()
*/
                      __pyx_t_1 = __Pyx_PyLong_As_int64_t(__pyx_v_offset); if (unlikely((__pyx_t_1 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(6, 484, __pyx_L1_error)
                      __pyx_v_c_offset = __pyx_t_1;

                      /* "pyarrow/io.pxi":486
 *         c_offset = offset
 * 
 *         handle = self.get_random_access_file()             # <<<<<<<<<<<<<<
 * 
 *         # Allocate empty write space
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get_random_access_file");
                        __PYX_ERR(6, 486, __pyx_L1_error)
                      }
                      __pyx_t_2 = ((struct __pyx_vtabstruct_7pyarrow_3lib_NativeFile *)__pyx_v_self->__pyx_vtab)->get_random_access_file(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 486, __pyx_L1_error)
                      __pyx_v_handle = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_2);

                      /* "pyarrow/io.pxi":489
 * 
 *         # Allocate empty write space
 *         obj = PyBytes_FromStringAndSizeNative(NULL, c_nbytes)             # <<<<<<<<<<<<<<
 * 
 *         cdef uint8_t* buf = <uint8_t*> cp.PyBytes_AS_STRING(<object> obj)
*/
                      __pyx_t_3 =  PyBytes_FromStringAndSize(NULL, __pyx_v_c_nbytes); if (unlikely(__pyx_t_3 == ((void *)NULL))) __PYX_ERR(6, 489, __pyx_L1_error)
                      __pyx_v_obj = __pyx_t_3;

                      /* "pyarrow/io.pxi":491
 *         obj = PyBytes_FromStringAndSizeNative(NULL, c_nbytes)
 * 
 *         cdef uint8_t* buf = <uint8_t*> cp.PyBytes_AS_STRING(<object> obj)             # <<<<<<<<<<<<<<
 *         with nogil:
 *             bytes_read = GetResultValue(handle.get().
*/
                      __pyx_v_buf = ((uint8_t *)PyBytes_AS_STRING(((PyObject *)__pyx_v_obj)));

                      /* "pyarrow/io.pxi":492
 * 
 *         cdef uint8_t* buf = <uint8_t*> cp.PyBytes_AS_STRING(<object> obj)
 *         with nogil:             # <<<<<<<<<<<<<<
 *             bytes_read = GetResultValue(handle.get().
 *                                         ReadAt(c_offset, c_nbytes, buf))
*/
                      {
                          PyThreadState * _save;
                          _save = PyEval_SaveThread();
                          __Pyx_FastGIL_Remember();
                          /*try:*/ {

                            /* "pyarrow/io.pxi":493
 *         cdef uint8_t* buf = <uint8_t*> cp.PyBytes_AS_STRING(<object> obj)
 *         with nogil:
 *             bytes_read = GetResultValue(handle.get().             # <<<<<<<<<<<<<<
 *                                         ReadAt(c_offset, c_nbytes, buf))
 * 
*/
                            __pyx_t_1 = arrow::py::GetResultValue<int64_t>(__pyx_v_handle.get()->ReadAt(__pyx_v_c_offset, __pyx_v_c_nbytes, __pyx_v_buf)); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(6, 493, __pyx_L4_error)
                            __pyx_v_bytes_read = __pyx_t_1;
                          }

                          /* "pyarrow/io.pxi":492
 * 
 *         cdef uint8_t* buf = <uint8_t*> cp.PyBytes_AS_STRING(<object> obj)
 *         with nogil:             # <<<<<<<<<<<<<<
 *             bytes_read = GetResultValue(handle.get().
 *                                         ReadAt(c_offset, c_nbytes, buf))
*/
                          /*finally:*/ {
                            /*normal exit:*/{
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L5;
                            }
                            __pyx_L4_error: {
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L1_error;
                            }
                            __pyx_L5:;
                          }
                      }

                      /* "pyarrow/io.pxi":496
 *                                         ReadAt(c_offset, c_nbytes, buf))
 * 
 *         if bytes_read < c_nbytes:             # <<<<<<<<<<<<<<
 *             cp._PyBytes_Resize(&obj, <Py_ssize_t> bytes_read)
 * 
*/
                      __pyx_t_4 = (__pyx_v_bytes_read < __pyx_v_c_nbytes);
                      if (__pyx_t_4) {

                        /* "pyarrow/io.pxi":497
 * 
 *         if bytes_read < c_nbytes:
 *             cp._PyBytes_Resize(&obj, <Py_ssize_t> bytes_read)             # <<<<<<<<<<<<<<
 * 
 *         return PyObject_to_object(obj)
*/
                        __pyx_t_5 = _PyBytes_Resize((&__pyx_v_obj), ((Py_ssize_t)__pyx_v_bytes_read)); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(6, 497, __pyx_L1_error)

                        /* "pyarrow/io.pxi":496
 *                                         ReadAt(c_offset, c_nbytes, buf))
 * 
 *         if bytes_read < c_nbytes:             # <<<<<<<<<<<<<<
 *             cp._PyBytes_Resize(&obj, <Py_ssize_t> bytes_read)
 * 
*/
                      }

                      /* "pyarrow/io.pxi":499
 *             cp._PyBytes_Resize(&obj, <Py_ssize_t> bytes_read)
 * 
 *         return PyObject_to_object(obj)             # <<<<<<<<<<<<<<
 * 
 *     def read1(self, nbytes=None):
*/
                      __Pyx_XDECREF(__pyx_r);
                      __pyx_t_6 = __pyx_f_7pyarrow_8includes_6common_PyObject_to_object(__pyx_v_obj); if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 499, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_6);
                      __pyx_r = __pyx_t_6;
                      __pyx_t_6 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/io.pxi":463
 *         return stream
 * 
 *     def read_at(self, nbytes, offset):             # <<<<<<<<<<<<<<
 *         """
 *         Read indicated number of bytes at offset from the file
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_6);
                      __Pyx_AddTraceback("pyarrow.lib.NativeFile.read_at", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":501
 *         return PyObject_to_object(obj)
 * 
 *     def read1(self, nbytes=None):             # <<<<<<<<<<<<<<
 *         """Read and return up to n bytes.
 * 
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_10NativeFile_49read1(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_10NativeFile_48read1, "NativeFile.read1(self, nbytes=None)\n\nRead and return up to n bytes.\n\nUnlike read(), if *nbytes* is None then a chunk is read, not the\nentire file.\n\nParameters\n----------\nnbytes : int, default None\n    The maximum number of bytes to read.\n\nReturns\n-------\ndata : bytes");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_10NativeFile_49read1 = {"read1", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10NativeFile_49read1, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10NativeFile_48read1};
                    static PyObject *__pyx_pw_7pyarrow_3lib_10NativeFile_49read1(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      PyObject *__pyx_v_nbytes = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[1] = {0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("read1 (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_nbytes,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(6, 501, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 501, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "read1", 0) < (0)) __PYX_ERR(6, 501, __pyx_L3_error)
                          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
                        } else {
                          switch (__pyx_nargs) {
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 501, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
                        }
                        __pyx_v_nbytes = values[0];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("read1", 0, 0, 1, __pyx_nargs); __PYX_ERR(6, 501, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.NativeFile.read1", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_10NativeFile_48read1(((struct __pyx_obj_7pyarrow_3lib_NativeFile *)__pyx_v_self), __pyx_v_nbytes);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_10NativeFile_48read1(struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_self, PyObject *__pyx_v_nbytes) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_t_1;
                      PyObject *__pyx_t_2 = NULL;
                      PyObject *__pyx_t_3 = NULL;
                      size_t __pyx_t_4;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("read1", 0);
                      __Pyx_INCREF(__pyx_v_nbytes);

                      /* "pyarrow/io.pxi":516
 *         data : bytes
 *         """
 *         if nbytes is None:             # <<<<<<<<<<<<<<
 *             # The expectation when passing `nbytes=None` is not to read the
 *             # entire file but to issue a single underlying read call up to
*/
                      __pyx_t_1 = (__pyx_v_nbytes == Py_None);
                      if (__pyx_t_1) {

                        /* "pyarrow/io.pxi":521
 *             # a reasonable size (the use case being to read a bufferable
 *             # amount of bytes, such as with io.TextIOWrapper).
 *             nbytes = self._default_chunk_size             # <<<<<<<<<<<<<<
 *         return self.read(nbytes)
 * 
*/
                        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_default_chunk_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 521, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_2);
                        __Pyx_DECREF_SET(__pyx_v_nbytes, __pyx_t_2);
                        __pyx_t_2 = 0;

                        /* "pyarrow/io.pxi":516
 *         data : bytes
 *         """
 *         if nbytes is None:             # <<<<<<<<<<<<<<
 *             # The expectation when passing `nbytes=None` is not to read the
 *             # entire file but to issue a single underlying read call up to
*/
                      }

                      /* "pyarrow/io.pxi":522
 *             # amount of bytes, such as with io.TextIOWrapper).
 *             nbytes = self._default_chunk_size
 *         return self.read(nbytes)             # <<<<<<<<<<<<<<
 * 
 *     def readall(self):
*/
                      __Pyx_XDECREF(__pyx_r);
                      __pyx_t_3 = ((PyObject *)__pyx_v_self);
                      __Pyx_INCREF(__pyx_t_3);
                      __pyx_t_4 = 0;
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_nbytes};
                        __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_read, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                        if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 522, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_2);
                      }
                      __pyx_r = __pyx_t_2;
                      __pyx_t_2 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/io.pxi":501
 *         return PyObject_to_object(obj)
 * 
 *     def read1(self, nbytes=None):             # <<<<<<<<<<<<<<
 *         """Read and return up to n bytes.
 * 
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_AddTraceback("pyarrow.lib.NativeFile.read1", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XDECREF(__pyx_v_nbytes);
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":524
 *         return self.read(nbytes)
 * 
 *     def readall(self):             # <<<<<<<<<<<<<<
 *         return self.read()
 * 
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_10NativeFile_51readall(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_10NativeFile_50readall, "NativeFile.readall(self)");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_10NativeFile_51readall = {"readall", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10NativeFile_51readall, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10NativeFile_50readall};
                    static PyObject *__pyx_pw_7pyarrow_3lib_10NativeFile_51readall(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("readall (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("readall", 1, 0, 0, __pyx_nargs); return NULL; }
                      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                      if (unlikely(__pyx_kwds_len < 0)) return NULL;
                      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("readall", __pyx_kwds); return NULL;}
                      __pyx_r = __pyx_pf_7pyarrow_3lib_10NativeFile_50readall(((struct __pyx_obj_7pyarrow_3lib_NativeFile *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_10NativeFile_50readall(struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      size_t __pyx_t_3;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("readall", 0);

                      /* "pyarrow/io.pxi":525
 * 
 *     def readall(self):
 *         return self.read()             # <<<<<<<<<<<<<<
 * 
 *     def readinto(self, b):
*/
                      __Pyx_XDECREF(__pyx_r);
                      __pyx_t_2 = ((PyObject *)__pyx_v_self);
                      __Pyx_INCREF(__pyx_t_2);
                      __pyx_t_3 = 0;
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
                        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_read, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 525, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __pyx_r = __pyx_t_1;
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/io.pxi":524
 *         return self.read(nbytes)
 * 
 *     def readall(self):             # <<<<<<<<<<<<<<
 *         return self.read()
 * 
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_AddTraceback("pyarrow.lib.NativeFile.readall", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":527
 *         return self.read()
 * 
 *     def readinto(self, b):             # <<<<<<<<<<<<<<
 *         """
 *         Read into the supplied buffer
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_10NativeFile_53readinto(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_10NativeFile_52readinto, "NativeFile.readinto(self, b)\n\nRead into the supplied buffer\n\nParameters\n----------\nb : buffer-like object\n    A writable buffer object (such as a bytearray).\n\nReturns\n-------\nwritten : int\n    number of bytes written");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_10NativeFile_53readinto = {"readinto", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10NativeFile_53readinto, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10NativeFile_52readinto};
                    static PyObject *__pyx_pw_7pyarrow_3lib_10NativeFile_53readinto(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      PyObject *__pyx_v_b = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[1] = {0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("readinto (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_b,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(6, 527, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 527, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "readinto", 0) < (0)) __PYX_ERR(6, 527, __pyx_L3_error)
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("readinto", 1, 1, 1, i); __PYX_ERR(6, 527, __pyx_L3_error) }
                          }
                        } else if (unlikely(__pyx_nargs != 1)) {
                          goto __pyx_L5_argtuple_error;
                        } else {
                          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 527, __pyx_L3_error)
                        }
                        __pyx_v_b = values[0];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("readinto", 1, 1, 1, __pyx_nargs); __PYX_ERR(6, 527, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.NativeFile.readinto", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_10NativeFile_52readinto(((struct __pyx_obj_7pyarrow_3lib_NativeFile *)__pyx_v_self), __pyx_v_b);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_10NativeFile_52readinto(struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_self, PyObject *__pyx_v_b) {
                      int64_t __pyx_v_bytes_read;
                      uint8_t *__pyx_v_buf;
                      struct __pyx_obj_7pyarrow_3lib_Buffer *__pyx_v_py_buf = 0;
                      int64_t __pyx_v_buf_len;
                      std::shared_ptr< arrow::io::InputStream>  __pyx_v_handle;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      std::shared_ptr< arrow::io::InputStream>  __pyx_t_1;
                      PyObject *__pyx_t_2 = NULL;
                      PyObject *__pyx_t_3 = NULL;
                      PyObject *__pyx_t_4 = NULL;
                      size_t __pyx_t_5;
                      int64_t __pyx_t_6;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("readinto", 0);

                      /* "pyarrow/io.pxi":548
 *             int64_t buf_len
 * 
 *         handle = self.get_input_stream()             # <<<<<<<<<<<<<<
 * 
 *         py_buf = py_buffer(b)
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get_input_stream");
                        __PYX_ERR(6, 548, __pyx_L1_error)
                      }
                      __pyx_t_1 = ((struct __pyx_vtabstruct_7pyarrow_3lib_NativeFile *)__pyx_v_self->__pyx_vtab)->get_input_stream(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 548, __pyx_L1_error)
                      __pyx_v_handle = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_1);

                      /* "pyarrow/io.pxi":550
 *         handle = self.get_input_stream()
 * 
 *         py_buf = py_buffer(b)             # <<<<<<<<<<<<<<
 *         buf_len = py_buf.size
 *         buf = py_buf.buffer.get().mutable_data()
*/
                      __pyx_t_3 = NULL;
                      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_py_buffer); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 550, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_4);
                      __pyx_t_5 = 1;
                      #if CYTHON_UNPACK_METHODS
                      if (unlikely(PyMethod_Check(__pyx_t_4))) {
                        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
                        assert(__pyx_t_3);
                        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
                        __Pyx_INCREF(__pyx_t_3);
                        __Pyx_INCREF(__pyx__function);
                        __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
                        __pyx_t_5 = 0;
                      }
                      #endif
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_b};
                        __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                        if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 550, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_2);
                      }
                      if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Buffer))))) __PYX_ERR(6, 550, __pyx_L1_error)
                      __pyx_v_py_buf = ((struct __pyx_obj_7pyarrow_3lib_Buffer *)__pyx_t_2);
                      __pyx_t_2 = 0;

                      /* "pyarrow/io.pxi":551
 * 
 *         py_buf = py_buffer(b)
 *         buf_len = py_buf.size             # <<<<<<<<<<<<<<
 *         buf = py_buf.buffer.get().mutable_data()
 * 
*/
                      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_py_buf), __pyx_mstate_global->__pyx_n_u_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 551, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_2);
                      __pyx_t_6 = __Pyx_PyLong_As_int64_t(__pyx_t_2); if (unlikely((__pyx_t_6 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(6, 551, __pyx_L1_error)
                      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                      __pyx_v_buf_len = __pyx_t_6;

                      /* "pyarrow/io.pxi":552
 *         py_buf = py_buffer(b)
 *         buf_len = py_buf.size
 *         buf = py_buf.buffer.get().mutable_data()             # <<<<<<<<<<<<<<
 * 
 *         with nogil:
*/
                      if (unlikely(((PyObject *)__pyx_v_py_buf) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "buffer");
                        __PYX_ERR(6, 552, __pyx_L1_error)
                      }
                      __pyx_v_buf = __pyx_v_py_buf->buffer.get()->mutable_data();

                      /* "pyarrow/io.pxi":554
 *         buf = py_buf.buffer.get().mutable_data()
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             bytes_read = GetResultValue(handle.get().Read(buf_len, buf))
 * 
*/
                      {
                          PyThreadState * _save;
                          _save = PyEval_SaveThread();
                          __Pyx_FastGIL_Remember();
                          /*try:*/ {

                            /* "pyarrow/io.pxi":555
 * 
 *         with nogil:
 *             bytes_read = GetResultValue(handle.get().Read(buf_len, buf))             # <<<<<<<<<<<<<<
 * 
 *         return bytes_read
*/
                            __pyx_t_6 = arrow::py::GetResultValue<int64_t>(__pyx_v_handle.get()->Read(__pyx_v_buf_len, __pyx_v_buf)); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(6, 555, __pyx_L4_error)
                            __pyx_v_bytes_read = __pyx_t_6;
                          }

                          /* "pyarrow/io.pxi":554
 *         buf = py_buf.buffer.get().mutable_data()
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             bytes_read = GetResultValue(handle.get().Read(buf_len, buf))
 * 
*/
                          /*finally:*/ {
                            /*normal exit:*/{
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L5;
                            }
                            __pyx_L4_error: {
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L1_error;
                            }
                            __pyx_L5:;
                          }
                      }

                      /* "pyarrow/io.pxi":557
 *             bytes_read = GetResultValue(handle.get().Read(buf_len, buf))
 * 
 *         return bytes_read             # <<<<<<<<<<<<<<
 * 
 *     def readline(self, size=None):
*/
                      __Pyx_XDECREF(__pyx_r);
                      __pyx_t_2 = __Pyx_PyLong_From_int64_t(__pyx_v_bytes_read); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 557, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_2);
                      __pyx_r = __pyx_t_2;
                      __pyx_t_2 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/io.pxi":527
 *         return self.read()
 * 
 *     def readinto(self, b):             # <<<<<<<<<<<<<<
 *         """
 *         Read into the supplied buffer
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_XDECREF(__pyx_t_4);
                      __Pyx_AddTraceback("pyarrow.lib.NativeFile.readinto", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XDECREF((PyObject *)__pyx_v_py_buf);
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":559
 *         return bytes_read
 * 
 *     def readline(self, size=None):             # <<<<<<<<<<<<<<
 *         """NOT IMPLEMENTED. Read and return a line of bytes from the file.
 * 
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_10NativeFile_55readline(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_10NativeFile_54readline, "NativeFile.readline(self, size=None)\n\nNOT IMPLEMENTED. Read and return a line of bytes from the file.\n\nIf size is specified, read at most size bytes.\n\nLine terminator is always b\"\\n\".\n\nParameters\n----------\nsize : int\n    maximum number of bytes read");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_10NativeFile_55readline = {"readline", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10NativeFile_55readline, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10NativeFile_54readline};
                    static PyObject *__pyx_pw_7pyarrow_3lib_10NativeFile_55readline(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      CYTHON_UNUSED PyObject *__pyx_v_size = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[1] = {0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("readline (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_size,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(6, 559, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 559, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "readline", 0) < (0)) __PYX_ERR(6, 559, __pyx_L3_error)
                          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
                        } else {
                          switch (__pyx_nargs) {
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 559, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
                        }
                        __pyx_v_size = values[0];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("readline", 0, 0, 1, __pyx_nargs); __PYX_ERR(6, 559, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.NativeFile.readline", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_10NativeFile_54readline(((struct __pyx_obj_7pyarrow_3lib_NativeFile *)__pyx_v_self), __pyx_v_size);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_10NativeFile_54readline(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_size) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      PyObject *__pyx_t_3 = NULL;
                      size_t __pyx_t_4;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("readline", 0);

                      /* "pyarrow/io.pxi":571
 *             maximum number of bytes read
 *         """
 *         raise UnsupportedOperation()             # <<<<<<<<<<<<<<
 * 
 *     def readlines(self, hint=None):
*/
                      __pyx_t_2 = NULL;
                      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_UnsupportedOperation); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 571, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_3);
                      __pyx_t_4 = 1;
                      #if CYTHON_UNPACK_METHODS
                      if (unlikely(PyMethod_Check(__pyx_t_3))) {
                        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
                        assert(__pyx_t_2);
                        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
                        __Pyx_INCREF(__pyx_t_2);
                        __Pyx_INCREF(__pyx__function);
                        __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
                        __pyx_t_4 = 0;
                      }
                      #endif
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
                        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 571, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      __PYX_ERR(6, 571, __pyx_L1_error)

                      /* "pyarrow/io.pxi":559
 *         return bytes_read
 * 
 *     def readline(self, size=None):             # <<<<<<<<<<<<<<
 *         """NOT IMPLEMENTED. Read and return a line of bytes from the file.
 * 
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_AddTraceback("pyarrow.lib.NativeFile.readline", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":573
 *         raise UnsupportedOperation()
 * 
 *     def readlines(self, hint=None):             # <<<<<<<<<<<<<<
 *         """NOT IMPLEMENTED. Read lines of the file
 * 
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_10NativeFile_57readlines(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_10NativeFile_56readlines, "NativeFile.readlines(self, hint=None)\n\nNOT IMPLEMENTED. Read lines of the file\n\nParameters\n----------\nhint : int\n    maximum number of bytes read until we stop");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_10NativeFile_57readlines = {"readlines", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10NativeFile_57readlines, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10NativeFile_56readlines};
                    static PyObject *__pyx_pw_7pyarrow_3lib_10NativeFile_57readlines(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      CYTHON_UNUSED PyObject *__pyx_v_hint = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[1] = {0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("readlines (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_hint,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(6, 573, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 573, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "readlines", 0) < (0)) __PYX_ERR(6, 573, __pyx_L3_error)
                          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
                        } else {
                          switch (__pyx_nargs) {
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 573, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
                        }
                        __pyx_v_hint = values[0];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("readlines", 0, 0, 1, __pyx_nargs); __PYX_ERR(6, 573, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.NativeFile.readlines", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_10NativeFile_56readlines(((struct __pyx_obj_7pyarrow_3lib_NativeFile *)__pyx_v_self), __pyx_v_hint);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_10NativeFile_56readlines(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_hint) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      PyObject *__pyx_t_3 = NULL;
                      size_t __pyx_t_4;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("readlines", 0);

                      /* "pyarrow/io.pxi":581
 *             maximum number of bytes read until we stop
 *         """
 *         raise UnsupportedOperation()             # <<<<<<<<<<<<<<
 * 
 *     def __iter__(self):
*/
                      __pyx_t_2 = NULL;
                      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_UnsupportedOperation); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 581, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_3);
                      __pyx_t_4 = 1;
                      #if CYTHON_UNPACK_METHODS
                      if (unlikely(PyMethod_Check(__pyx_t_3))) {
                        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
                        assert(__pyx_t_2);
                        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
                        __Pyx_INCREF(__pyx_t_2);
                        __Pyx_INCREF(__pyx__function);
                        __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
                        __pyx_t_4 = 0;
                      }
                      #endif
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
                        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 581, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      __PYX_ERR(6, 581, __pyx_L1_error)

                      /* "pyarrow/io.pxi":573
 *         raise UnsupportedOperation()
 * 
 *     def readlines(self, hint=None):             # <<<<<<<<<<<<<<
 *         """NOT IMPLEMENTED. Read lines of the file
 * 
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_AddTraceback("pyarrow.lib.NativeFile.readlines", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":583
 *         raise UnsupportedOperation()
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         self._assert_readable()
 *         return self
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_10NativeFile_59__iter__(PyObject *__pyx_v_self); /*proto*/
                    static PyObject *__pyx_pw_7pyarrow_3lib_10NativeFile_59__iter__(PyObject *__pyx_v_self) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_10NativeFile_58__iter__(((struct __pyx_obj_7pyarrow_3lib_NativeFile *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_10NativeFile_58__iter__(struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      size_t __pyx_t_3;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__iter__", 0);

                      /* "pyarrow/io.pxi":584
 * 
 *     def __iter__(self):
 *         self._assert_readable()             # <<<<<<<<<<<<<<
 *         return self
 * 
*/
                      __pyx_t_2 = ((PyObject *)__pyx_v_self);
                      __Pyx_INCREF(__pyx_t_2);
                      __pyx_t_3 = 0;
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
                        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_assert_readable, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 584, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

                      /* "pyarrow/io.pxi":585
 *     def __iter__(self):
 *         self._assert_readable()
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def __next__(self):
*/
                      __Pyx_XDECREF(__pyx_r);
                      __Pyx_INCREF((PyObject *)__pyx_v_self);
                      __pyx_r = ((PyObject *)__pyx_v_self);
                      goto __pyx_L0;

                      /* "pyarrow/io.pxi":583
 *         raise UnsupportedOperation()
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         self._assert_readable()
 *         return self
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_AddTraceback("pyarrow.lib.NativeFile.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":587
 *         return self
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         line = self.readline()
 *         if not line:
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_10NativeFile_61__next__(PyObject *__pyx_v_self); /*proto*/
                    static PyObject *__pyx_pw_7pyarrow_3lib_10NativeFile_61__next__(PyObject *__pyx_v_self) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_10NativeFile_60__next__(((struct __pyx_obj_7pyarrow_3lib_NativeFile *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_10NativeFile_60__next__(struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_self) {
                      PyObject *__pyx_v_line = NULL;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_error_without_exception = 0; /* StopIteration */
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      size_t __pyx_t_3;
                      int __pyx_t_4;
                      int __pyx_t_5;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__next__", 0);

                      /* "pyarrow/io.pxi":588
 * 
 *     def __next__(self):
 *         line = self.readline()             # <<<<<<<<<<<<<<
 *         if not line:
 *             raise StopIteration
*/
                      __pyx_t_2 = ((PyObject *)__pyx_v_self);
                      __Pyx_INCREF(__pyx_t_2);
                      __pyx_t_3 = 0;
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
                        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_readline, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 588, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __pyx_v_line = __pyx_t_1;
                      __pyx_t_1 = 0;

                      /* "pyarrow/io.pxi":589
 *     def __next__(self):
 *         line = self.readline()
 *         if not line:             # <<<<<<<<<<<<<<
 *             raise StopIteration
 *         return line
*/
                      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_line); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(6, 589, __pyx_L1_error)
                      __pyx_t_5 = (!__pyx_t_4);
                      if (unlikely(__pyx_t_5)) {

                        /* "pyarrow/io.pxi":590
 *         line = self.readline()
 *         if not line:
 *             raise StopIteration             # <<<<<<<<<<<<<<
 *         return line
 * 
*/
                        __pyx_error_without_exception = 1;
                        goto __pyx_L1_error;;

                        /* "pyarrow/io.pxi":589
 *     def __next__(self):
 *         line = self.readline()
 *         if not line:             # <<<<<<<<<<<<<<
 *             raise StopIteration
 *         return line
*/
                      }

                      /* "pyarrow/io.pxi":591
 *         if not line:
 *             raise StopIteration
 *         return line             # <<<<<<<<<<<<<<
 * 
 *     def read_buffer(self, nbytes=None):
*/
                      __Pyx_XDECREF(__pyx_r);
                      __Pyx_INCREF(__pyx_v_line);
                      __pyx_r = __pyx_v_line;
                      goto __pyx_L0;

                      /* "pyarrow/io.pxi":587
 *         return self
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         line = self.readline()
 *         if not line:
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      if (!__pyx_error_without_exception) {
                        __Pyx_AddTraceback("pyarrow.lib.NativeFile.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      }
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XDECREF(__pyx_v_line);
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":593
 *         return line
 * 
 *     def read_buffer(self, nbytes=None):             # <<<<<<<<<<<<<<
 *         """
 *         Read from buffer.
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_10NativeFile_63read_buffer(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_10NativeFile_62read_buffer, "NativeFile.read_buffer(self, nbytes=None)\n\nRead from buffer.\n\nParameters\n----------\nnbytes : int, optional\n    maximum number of bytes read");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_10NativeFile_63read_buffer = {"read_buffer", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10NativeFile_63read_buffer, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10NativeFile_62read_buffer};
                    static PyObject *__pyx_pw_7pyarrow_3lib_10NativeFile_63read_buffer(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      PyObject *__pyx_v_nbytes = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[1] = {0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("read_buffer (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_nbytes,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(6, 593, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 593, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "read_buffer", 0) < (0)) __PYX_ERR(6, 593, __pyx_L3_error)
                          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
                        } else {
                          switch (__pyx_nargs) {
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 593, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
                        }
                        __pyx_v_nbytes = values[0];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("read_buffer", 0, 0, 1, __pyx_nargs); __PYX_ERR(6, 593, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.NativeFile.read_buffer", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_10NativeFile_62read_buffer(((struct __pyx_obj_7pyarrow_3lib_NativeFile *)__pyx_v_self), __pyx_v_nbytes);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_10NativeFile_62read_buffer(struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_self, PyObject *__pyx_v_nbytes) {
                      int64_t __pyx_v_c_nbytes;
                      CYTHON_UNUSED int64_t __pyx_v_bytes_read;
                      std::shared_ptr< arrow::Buffer>  __pyx_v_output;
                      std::shared_ptr< arrow::io::InputStream>  __pyx_v_handle;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      std::shared_ptr< arrow::io::InputStream>  __pyx_t_1;
                      int __pyx_t_2;
                      PyObject *__pyx_t_3 = NULL;
                      PyObject *__pyx_t_4 = NULL;
                      PyObject *__pyx_t_5 = NULL;
                      PyObject *__pyx_t_6 = NULL;
                      PyObject *__pyx_t_7 = NULL;
                      size_t __pyx_t_8;
                      int64_t __pyx_t_9;
                      std::shared_ptr< arrow::Buffer>  __pyx_t_10;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("read_buffer", 0);

                      /* "pyarrow/io.pxi":604
 *         cdef:
 *             int64_t c_nbytes
 *             int64_t bytes_read = 0             # <<<<<<<<<<<<<<
 *             shared_ptr[CBuffer] output
 * 
*/
                      __pyx_v_bytes_read = 0;

                      /* "pyarrow/io.pxi":607
 *             shared_ptr[CBuffer] output
 * 
 *         handle = self.get_input_stream()             # <<<<<<<<<<<<<<
 * 
 *         if nbytes is None:
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get_input_stream");
                        __PYX_ERR(6, 607, __pyx_L1_error)
                      }
                      __pyx_t_1 = ((struct __pyx_vtabstruct_7pyarrow_3lib_NativeFile *)__pyx_v_self->__pyx_vtab)->get_input_stream(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 607, __pyx_L1_error)
                      __pyx_v_handle = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_1);

                      /* "pyarrow/io.pxi":609
 *         handle = self.get_input_stream()
 * 
 *         if nbytes is None:             # <<<<<<<<<<<<<<
 *             if not self.is_seekable:
 *                 # Cannot get file size => read chunkwise
*/
                      __pyx_t_2 = (__pyx_v_nbytes == Py_None);
                      if (__pyx_t_2) {

                        /* "pyarrow/io.pxi":610
 * 
 *         if nbytes is None:
 *             if not self.is_seekable:             # <<<<<<<<<<<<<<
 *                 # Cannot get file size => read chunkwise
 *                 return py_buffer(self.read())
*/
                        if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "is_seekable");
                          __PYX_ERR(6, 610, __pyx_L1_error)
                        }
                        __pyx_t_2 = (!__pyx_v_self->is_seekable);
                        if (__pyx_t_2) {

                          /* "pyarrow/io.pxi":612
 *             if not self.is_seekable:
 *                 # Cannot get file size => read chunkwise
 *                 return py_buffer(self.read())             # <<<<<<<<<<<<<<
 *             c_nbytes = self.size() - self.tell()
 *         else:
*/
                          __Pyx_XDECREF(__pyx_r);
                          __pyx_t_4 = NULL;
                          __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_py_buffer); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 612, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_5);
                          __pyx_t_7 = ((PyObject *)__pyx_v_self);
                          __Pyx_INCREF(__pyx_t_7);
                          __pyx_t_8 = 0;
                          {
                            PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL};
                            __pyx_t_6 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_read, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
                            if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 612, __pyx_L1_error)
                            __Pyx_GOTREF(__pyx_t_6);
                          }
                          __pyx_t_8 = 1;
                          #if CYTHON_UNPACK_METHODS
                          if (unlikely(PyMethod_Check(__pyx_t_5))) {
                            __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
                            assert(__pyx_t_4);
                            PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
                            __Pyx_INCREF(__pyx_t_4);
                            __Pyx_INCREF(__pyx__function);
                            __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
                            __pyx_t_8 = 0;
                          }
                          #endif
                          {
                            PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_6};
                            __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                            if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 612, __pyx_L1_error)
                            __Pyx_GOTREF(__pyx_t_3);
                          }
                          __pyx_r = __pyx_t_3;
                          __pyx_t_3 = 0;
                          goto __pyx_L0;

                          /* "pyarrow/io.pxi":610
 * 
 *         if nbytes is None:
 *             if not self.is_seekable:             # <<<<<<<<<<<<<<
 *                 # Cannot get file size => read chunkwise
 *                 return py_buffer(self.read())
*/
                        }

                        /* "pyarrow/io.pxi":613
 *                 # Cannot get file size => read chunkwise
 *                 return py_buffer(self.read())
 *             c_nbytes = self.size() - self.tell()             # <<<<<<<<<<<<<<
 *         else:
 *             c_nbytes = nbytes
*/
                        __pyx_t_5 = ((PyObject *)__pyx_v_self);
                        __Pyx_INCREF(__pyx_t_5);
                        __pyx_t_8 = 0;
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
                          __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_size, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
                          if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 613, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_3);
                        }
                        __pyx_t_6 = ((PyObject *)__pyx_v_self);
                        __Pyx_INCREF(__pyx_t_6);
                        __pyx_t_8 = 0;
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
                          __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_tell, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
                          if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 613, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_5);
                        }
                        __pyx_t_6 = PyNumber_Subtract(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 613, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_6);
                        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                        __pyx_t_9 = __Pyx_PyLong_As_int64_t(__pyx_t_6); if (unlikely((__pyx_t_9 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(6, 613, __pyx_L1_error)
                        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                        __pyx_v_c_nbytes = __pyx_t_9;

                        /* "pyarrow/io.pxi":609
 *         handle = self.get_input_stream()
 * 
 *         if nbytes is None:             # <<<<<<<<<<<<<<
 *             if not self.is_seekable:
 *                 # Cannot get file size => read chunkwise
*/
                        goto __pyx_L3;
                      }

                      /* "pyarrow/io.pxi":615
 *             c_nbytes = self.size() - self.tell()
 *         else:
 *             c_nbytes = nbytes             # <<<<<<<<<<<<<<
 * 
 *         with nogil:
*/
                      /*else*/ {
                        __pyx_t_9 = __Pyx_PyLong_As_int64_t(__pyx_v_nbytes); if (unlikely((__pyx_t_9 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(6, 615, __pyx_L1_error)
                        __pyx_v_c_nbytes = __pyx_t_9;
                      }
                      __pyx_L3:;

                      /* "pyarrow/io.pxi":617
 *             c_nbytes = nbytes
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             output = GetResultValue(handle.get().ReadBuffer(c_nbytes))
 * 
*/
                      {
                          PyThreadState * _save;
                          _save = PyEval_SaveThread();
                          __Pyx_FastGIL_Remember();
                          /*try:*/ {

                            /* "pyarrow/io.pxi":618
 * 
 *         with nogil:
 *             output = GetResultValue(handle.get().ReadBuffer(c_nbytes))             # <<<<<<<<<<<<<<
 * 
 *         return pyarrow_wrap_buffer(output)
*/
                            __pyx_t_10 = arrow::py::GetResultValue<std::shared_ptr< arrow::Buffer> >(__pyx_v_handle.get()-> Read(__pyx_v_c_nbytes)); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(6, 618, __pyx_L6_error)
                            __pyx_v_output = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_10);
                          }

                          /* "pyarrow/io.pxi":617
 *             c_nbytes = nbytes
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             output = GetResultValue(handle.get().ReadBuffer(c_nbytes))
 * 
*/
                          /*finally:*/ {
                            /*normal exit:*/{
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L7;
                            }
                            __pyx_L6_error: {
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L1_error;
                            }
                            __pyx_L7:;
                          }
                      }

                      /* "pyarrow/io.pxi":620
 *             output = GetResultValue(handle.get().ReadBuffer(c_nbytes))
 * 
 *         return pyarrow_wrap_buffer(output)             # <<<<<<<<<<<<<<
 * 
 *     def truncate(self):
*/
                      __Pyx_XDECREF(__pyx_r);
                      __pyx_t_6 = pyarrow_wrap_buffer(__pyx_v_output); if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 620, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_6);
                      __pyx_r = __pyx_t_6;
                      __pyx_t_6 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/io.pxi":593
 *         return line
 * 
 *     def read_buffer(self, nbytes=None):             # <<<<<<<<<<<<<<
 *         """
 *         Read from buffer.
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_XDECREF(__pyx_t_4);
                      __Pyx_XDECREF(__pyx_t_5);
                      __Pyx_XDECREF(__pyx_t_6);
                      __Pyx_XDECREF(__pyx_t_7);
                      __Pyx_AddTraceback("pyarrow.lib.NativeFile.read_buffer", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":622
 *         return pyarrow_wrap_buffer(output)
 * 
 *     def truncate(self):             # <<<<<<<<<<<<<<
 *         """
 *         NOT IMPLEMENTED
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_10NativeFile_65truncate(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_10NativeFile_64truncate, "NativeFile.truncate(self)\n\nNOT IMPLEMENTED");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_10NativeFile_65truncate = {"truncate", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10NativeFile_65truncate, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10NativeFile_64truncate};
                    static PyObject *__pyx_pw_7pyarrow_3lib_10NativeFile_65truncate(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("truncate (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("truncate", 1, 0, 0, __pyx_nargs); return NULL; }
                      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                      if (unlikely(__pyx_kwds_len < 0)) return NULL;
                      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("truncate", __pyx_kwds); return NULL;}
                      __pyx_r = __pyx_pf_7pyarrow_3lib_10NativeFile_64truncate(((struct __pyx_obj_7pyarrow_3lib_NativeFile *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_10NativeFile_64truncate(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      PyObject *__pyx_t_3 = NULL;
                      size_t __pyx_t_4;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("truncate", 0);

                      /* "pyarrow/io.pxi":626
 *         NOT IMPLEMENTED
 *         """
 *         raise UnsupportedOperation()             # <<<<<<<<<<<<<<
 * 
 *     def writelines(self, lines):
*/
                      __pyx_t_2 = NULL;
                      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_UnsupportedOperation); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 626, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_3);
                      __pyx_t_4 = 1;
                      #if CYTHON_UNPACK_METHODS
                      if (unlikely(PyMethod_Check(__pyx_t_3))) {
                        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
                        assert(__pyx_t_2);
                        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
                        __Pyx_INCREF(__pyx_t_2);
                        __Pyx_INCREF(__pyx__function);
                        __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
                        __pyx_t_4 = 0;
                      }
                      #endif
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
                        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 626, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      __PYX_ERR(6, 626, __pyx_L1_error)

                      /* "pyarrow/io.pxi":622
 *         return pyarrow_wrap_buffer(output)
 * 
 *     def truncate(self):             # <<<<<<<<<<<<<<
 *         """
 *         NOT IMPLEMENTED
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_AddTraceback("pyarrow.lib.NativeFile.truncate", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":628
 *         raise UnsupportedOperation()
 * 
 *     def writelines(self, lines):             # <<<<<<<<<<<<<<
 *         """
 *         Write lines to the file.
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_10NativeFile_67writelines(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_10NativeFile_66writelines, "NativeFile.writelines(self, lines)\n\nWrite lines to the file.\n\nParameters\n----------\nlines : iterable\n    Iterable of bytes-like objects or exporters of buffer protocol");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_10NativeFile_67writelines = {"writelines", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10NativeFile_67writelines, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10NativeFile_66writelines};
                    static PyObject *__pyx_pw_7pyarrow_3lib_10NativeFile_67writelines(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      PyObject *__pyx_v_lines = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[1] = {0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("writelines (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_lines,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(6, 628, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 628, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "writelines", 0) < (0)) __PYX_ERR(6, 628, __pyx_L3_error)
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("writelines", 1, 1, 1, i); __PYX_ERR(6, 628, __pyx_L3_error) }
                          }
                        } else if (unlikely(__pyx_nargs != 1)) {
                          goto __pyx_L5_argtuple_error;
                        } else {
                          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 628, __pyx_L3_error)
                        }
                        __pyx_v_lines = values[0];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("writelines", 1, 1, 1, __pyx_nargs); __PYX_ERR(6, 628, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.NativeFile.writelines", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_10NativeFile_66writelines(((struct __pyx_obj_7pyarrow_3lib_NativeFile *)__pyx_v_self), __pyx_v_lines);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_10NativeFile_66writelines(struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_self, PyObject *__pyx_v_lines) {
                      PyObject *__pyx_v_line = NULL;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      size_t __pyx_t_3;
                      Py_ssize_t __pyx_t_4;
                      PyObject *(*__pyx_t_5)(PyObject *);
                      PyObject *__pyx_t_6 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("writelines", 0);

                      /* "pyarrow/io.pxi":637
 *             Iterable of bytes-like objects or exporters of buffer protocol
 *         """
 *         self._assert_writable()             # <<<<<<<<<<<<<<
 * 
 *         for line in lines:
*/
                      __pyx_t_2 = ((PyObject *)__pyx_v_self);
                      __Pyx_INCREF(__pyx_t_2);
                      __pyx_t_3 = 0;
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
                        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_assert_writable, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 637, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

                      /* "pyarrow/io.pxi":639
 *         self._assert_writable()
 * 
 *         for line in lines:             # <<<<<<<<<<<<<<
 *             self.write(line)
 * 
*/
                      if (likely(PyList_CheckExact(__pyx_v_lines)) || PyTuple_CheckExact(__pyx_v_lines)) {
                        __pyx_t_1 = __pyx_v_lines; __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_lines); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 639, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                        __pyx_t_5 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 639, __pyx_L1_error)
                      }
                      for (;;) {
                        if (likely(!__pyx_t_5)) {
                          if (likely(PyList_CheckExact(__pyx_t_1))) {
                            {
                              Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
                              #if !CYTHON_ASSUME_SAFE_SIZE
                              if (unlikely((__pyx_temp < 0))) __PYX_ERR(6, 639, __pyx_L1_error)
                              #endif
                              if (__pyx_t_4 >= __pyx_temp) break;
                            }
                            __pyx_t_2 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_4, __Pyx_ReferenceSharing_OwnStrongReference);
                            ++__pyx_t_4;
                          } else {
                            {
                              Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
                              #if !CYTHON_ASSUME_SAFE_SIZE
                              if (unlikely((__pyx_temp < 0))) __PYX_ERR(6, 639, __pyx_L1_error)
                              #endif
                              if (__pyx_t_4 >= __pyx_temp) break;
                            }
                            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                            __pyx_t_2 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4));
                            #else
                            __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_4);
                            #endif
                            ++__pyx_t_4;
                          }
                          if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 639, __pyx_L1_error)
                        } else {
                          __pyx_t_2 = __pyx_t_5(__pyx_t_1);
                          if (unlikely(!__pyx_t_2)) {
                            PyObject* exc_type = PyErr_Occurred();
                            if (exc_type) {
                              if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(6, 639, __pyx_L1_error)
                              PyErr_Clear();
                            }
                            break;
                          }
                        }
                        __Pyx_GOTREF(__pyx_t_2);
                        __Pyx_XDECREF_SET(__pyx_v_line, __pyx_t_2);
                        __pyx_t_2 = 0;

                        /* "pyarrow/io.pxi":640
 * 
 *         for line in lines:
 *             self.write(line)             # <<<<<<<<<<<<<<
 * 
 *     def download(self, stream_or_path, buffer_size=None):
*/
                        __pyx_t_6 = ((PyObject *)__pyx_v_self);
                        __Pyx_INCREF(__pyx_t_6);
                        __pyx_t_3 = 0;
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_line};
                          __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_write, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
                          if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 640, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_2);
                        }
                        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

                        /* "pyarrow/io.pxi":639
 *         self._assert_writable()
 * 
 *         for line in lines:             # <<<<<<<<<<<<<<
 *             self.write(line)
 * 
*/
                      }
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

                      /* "pyarrow/io.pxi":628
 *         raise UnsupportedOperation()
 * 
 *     def writelines(self, lines):             # <<<<<<<<<<<<<<
 *         """
 *         Write lines to the file.
*/

                      /* 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_6);
                      __Pyx_AddTraceback("pyarrow.lib.NativeFile.writelines", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XDECREF(__pyx_v_line);
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":642
 *             self.write(line)
 * 
 *     def download(self, stream_or_path, buffer_size=None):             # <<<<<<<<<<<<<<
 *         """
 *         Read this file completely to a local path or destination stream.
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_10NativeFile_69download(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_10NativeFile_68download, "NativeFile.download(self, stream_or_path, buffer_size=None)\n\nRead this file completely to a local path or destination stream.\n\nThis method first seeks to the beginning of the file.\n\nParameters\n----------\nstream_or_path : str or file-like object\n    If a string, a local file path to write to; otherwise,\n    should be a writable stream.\nbuffer_size : int, optional\n    The buffer size to use for data transfers.");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_10NativeFile_69download = {"download", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10NativeFile_69download, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10NativeFile_68download};
                    static PyObject *__pyx_pw_7pyarrow_3lib_10NativeFile_69download(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      PyObject *__pyx_v_stream_or_path = 0;
                      PyObject *__pyx_v_buffer_size = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[2] = {0,0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("download (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_stream_or_path,&__pyx_mstate_global->__pyx_n_u_buffer_size,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(6, 642, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  2:
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(6, 642, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 642, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "download", 0) < (0)) __PYX_ERR(6, 642, __pyx_L3_error)
                          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("download", 0, 1, 2, i); __PYX_ERR(6, 642, __pyx_L3_error) }
                          }
                        } else {
                          switch (__pyx_nargs) {
                            case  2:
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(6, 642, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 642, __pyx_L3_error)
                            break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
                        }
                        __pyx_v_stream_or_path = values[0];
                        __pyx_v_buffer_size = values[1];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("download", 0, 1, 2, __pyx_nargs); __PYX_ERR(6, 642, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.NativeFile.download", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_10NativeFile_68download(((struct __pyx_obj_7pyarrow_3lib_NativeFile *)__pyx_v_self), __pyx_v_stream_or_path, __pyx_v_buffer_size);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":672
 *             stream = open(stream_or_path, 'wb')
 * 
 *             def cleanup():             # <<<<<<<<<<<<<<
 *                 stream.close()
 *         else:
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_10NativeFile_8download_1cleanup(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_10NativeFile_8download_1cleanup = {"cleanup", (PyCFunction)__pyx_pw_7pyarrow_3lib_10NativeFile_8download_1cleanup, METH_NOARGS, 0};
                    static PyObject *__pyx_pw_7pyarrow_3lib_10NativeFile_8download_1cleanup(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("cleanup (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_10NativeFile_8download_cleanup(__pyx_self);

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_10NativeFile_8download_cleanup(PyObject *__pyx_self) {
                      struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_21_download *__pyx_cur_scope;
                      struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_21_download *__pyx_outer_scope;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      size_t __pyx_t_3;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("cleanup", 0);
                      __pyx_outer_scope = (struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_21_download *) __Pyx_CyFunction_GetClosure(__pyx_self);
                      __pyx_cur_scope = __pyx_outer_scope;

                      /* "pyarrow/io.pxi":673
 * 
 *             def cleanup():
 *                 stream.close()             # <<<<<<<<<<<<<<
 *         else:
 *             stream = stream_or_path
*/
                      if (unlikely(!__pyx_cur_scope->__pyx_v_stream)) { __Pyx_RaiseClosureNameError("stream"); __PYX_ERR(6, 673, __pyx_L1_error) }
                      __pyx_t_2 = __pyx_cur_scope->__pyx_v_stream;
                      __Pyx_INCREF(__pyx_t_2);
                      __pyx_t_3 = 0;
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
                        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_close, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 673, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

                      /* "pyarrow/io.pxi":672
 *             stream = open(stream_or_path, 'wb')
 * 
 *             def cleanup():             # <<<<<<<<<<<<<<
 *                 stream.close()
 *         else:
*/

                      /* function exit code */
                      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_AddTraceback("pyarrow.lib.NativeFile.download.cleanup", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":677
 *             stream = stream_or_path
 * 
 *             def cleanup():             # <<<<<<<<<<<<<<
 *                 pass
 * 
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_10NativeFile_8download_3cleanup(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_10NativeFile_8download_3cleanup = {"cleanup", (PyCFunction)__pyx_pw_7pyarrow_3lib_10NativeFile_8download_3cleanup, METH_NOARGS, 0};
                    static PyObject *__pyx_pw_7pyarrow_3lib_10NativeFile_8download_3cleanup(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("cleanup (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_10NativeFile_8download_2cleanup(__pyx_self);

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_10NativeFile_8download_2cleanup(CYTHON_UNUSED PyObject *__pyx_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("cleanup", 0);

                      /* function exit code */
                      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":683
 *         exc_info = None
 * 
 *         def bg_write():             # <<<<<<<<<<<<<<
 *             try:
 *                 while not done or write_queue.qsize() > 0:
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_10NativeFile_8download_5bg_write(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_10NativeFile_8download_5bg_write = {"bg_write", (PyCFunction)__pyx_pw_7pyarrow_3lib_10NativeFile_8download_5bg_write, METH_NOARGS, 0};
                    static PyObject *__pyx_pw_7pyarrow_3lib_10NativeFile_8download_5bg_write(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("bg_write (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_10NativeFile_8download_4bg_write(__pyx_self);

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_10NativeFile_8download_4bg_write(PyObject *__pyx_self) {
                      struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_21_download *__pyx_cur_scope;
                      struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_21_download *__pyx_outer_scope;
                      PyObject *__pyx_v_buf = NULL;
                      CYTHON_UNUSED PyObject *__pyx_v_e = NULL;
                      CYTHON_UNUSED PyObject *__pyx_v_exc_info = NULL;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      PyObject *__pyx_t_3 = NULL;
                      int __pyx_t_4;
                      int __pyx_t_5;
                      PyObject *__pyx_t_6 = NULL;
                      PyObject *__pyx_t_7 = NULL;
                      size_t __pyx_t_8;
                      PyObject *__pyx_t_9 = NULL;
                      PyObject *__pyx_t_10 = NULL;
                      PyObject *__pyx_t_11 = NULL;
                      PyObject *__pyx_t_12 = NULL;
                      PyObject *__pyx_t_13 = NULL;
                      int __pyx_t_14;
                      PyObject *__pyx_t_15 = NULL;
                      PyObject *__pyx_t_16 = NULL;
                      PyObject *__pyx_t_17 = NULL;
                      int __pyx_t_18;
                      char const *__pyx_t_19;
                      PyObject *__pyx_t_20 = NULL;
                      PyObject *__pyx_t_21 = NULL;
                      PyObject *__pyx_t_22 = NULL;
                      char const *__pyx_t_23;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("bg_write", 0);
                      __pyx_outer_scope = (struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_21_download *) __Pyx_CyFunction_GetClosure(__pyx_self);
                      __pyx_cur_scope = __pyx_outer_scope;

                      /* "pyarrow/io.pxi":684
 * 
 *         def bg_write():
 *             try:             # <<<<<<<<<<<<<<
 *                 while not done or write_queue.qsize() > 0:
 *                     try:
*/
                      /*try:*/ {
                        {
                          __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:*/ {

                            /* "pyarrow/io.pxi":685
 *         def bg_write():
 *             try:
 *                 while not done or write_queue.qsize() > 0:             # <<<<<<<<<<<<<<
 *                     try:
 *                         buf = write_queue.get(timeout=0.01)
*/
                            while (1) {
                              __pyx_t_5 = (!__pyx_cur_scope->__pyx_v_done);
                              if (!__pyx_t_5) {
                              } else {
                                __pyx_t_4 = __pyx_t_5;
                                goto __pyx_L14_bool_binop_done;
                              }
                              if (unlikely(!__pyx_cur_scope->__pyx_v_write_queue)) { __Pyx_RaiseClosureNameError("write_queue"); __PYX_ERR(6, 685, __pyx_L6_error) }
                              __pyx_t_7 = __pyx_cur_scope->__pyx_v_write_queue;
                              __Pyx_INCREF(__pyx_t_7);
                              __pyx_t_8 = 0;
                              {
                                PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL};
                                __pyx_t_6 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_qsize, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                                __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
                                if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 685, __pyx_L6_error)
                                __Pyx_GOTREF(__pyx_t_6);
                              }
                              __pyx_t_7 = PyObject_RichCompare(__pyx_t_6, __pyx_mstate_global->__pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(6, 685, __pyx_L6_error)
                              __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                              __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(6, 685, __pyx_L6_error)
                              __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
                              __pyx_t_4 = __pyx_t_5;
                              __pyx_L14_bool_binop_done:;
                              if (!__pyx_t_4) break;

                              /* "pyarrow/io.pxi":686
 *             try:
 *                 while not done or write_queue.qsize() > 0:
 *                     try:             # <<<<<<<<<<<<<<
 *                         buf = write_queue.get(timeout=0.01)
 *                     except QueueEmpty:
*/
                              {
                                __Pyx_PyThreadState_declare
                                __Pyx_PyThreadState_assign
                                __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
                                __Pyx_XGOTREF(__pyx_t_9);
                                __Pyx_XGOTREF(__pyx_t_10);
                                __Pyx_XGOTREF(__pyx_t_11);
                                /*try:*/ {

                                  /* "pyarrow/io.pxi":687
 *                 while not done or write_queue.qsize() > 0:
 *                     try:
 *                         buf = write_queue.get(timeout=0.01)             # <<<<<<<<<<<<<<
 *                     except QueueEmpty:
 *                         continue
*/
                                  if (unlikely(!__pyx_cur_scope->__pyx_v_write_queue)) { __Pyx_RaiseClosureNameError("write_queue"); __PYX_ERR(6, 687, __pyx_L16_error) }
                                  __pyx_t_6 = __pyx_cur_scope->__pyx_v_write_queue;
                                  __Pyx_INCREF(__pyx_t_6);
                                  __pyx_t_8 = 0;
                                  {
                                    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_6, NULL};
                                    __pyx_t_12 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 687, __pyx_L16_error)
                                    __Pyx_GOTREF(__pyx_t_12);
                                    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_timeout, __pyx_mstate_global->__pyx_float_0_01, __pyx_t_12, __pyx_callargs+1, 0) < (0)) __PYX_ERR(6, 687, __pyx_L16_error)
                                    __pyx_t_7 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_get, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_12);
                                    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
                                    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                                    if (unlikely(!__pyx_t_7)) __PYX_ERR(6, 687, __pyx_L16_error)
                                    __Pyx_GOTREF(__pyx_t_7);
                                  }
                                  __Pyx_XDECREF_SET(__pyx_v_buf, __pyx_t_7);
                                  __pyx_t_7 = 0;

                                  /* "pyarrow/io.pxi":686
 *             try:
 *                 while not done or write_queue.qsize() > 0:
 *                     try:             # <<<<<<<<<<<<<<
 *                         buf = write_queue.get(timeout=0.01)
 *                     except QueueEmpty:
*/
                                }
                                __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
                                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                                __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
                                goto __pyx_L23_try_end;
                                __pyx_L16_error:;
                                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                                __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
                                __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;

                                /* "pyarrow/io.pxi":688
 *                     try:
 *                         buf = write_queue.get(timeout=0.01)
 *                     except QueueEmpty:             # <<<<<<<<<<<<<<
 *                         continue
 *                     stream.write(buf)
*/
                                __Pyx_ErrFetch(&__pyx_t_7, &__pyx_t_12, &__pyx_t_6);
                                __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_QueueEmpty); if (unlikely(!__pyx_t_13)) __PYX_ERR(6, 688, __pyx_L18_except_error)
                                __Pyx_GOTREF(__pyx_t_13);
                                __pyx_t_14 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_7, __pyx_t_13);
                                __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
                                __Pyx_ErrRestore(__pyx_t_7, __pyx_t_12, __pyx_t_6);
                                __pyx_t_7 = 0; __pyx_t_12 = 0; __pyx_t_6 = 0;
                                if (__pyx_t_14) {
                                  __Pyx_AddTraceback("pyarrow.lib.NativeFile.download.bg_write", __pyx_clineno, __pyx_lineno, __pyx_filename);
                                  if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_12, &__pyx_t_7) < 0) __PYX_ERR(6, 688, __pyx_L18_except_error)
                                  __Pyx_XGOTREF(__pyx_t_6);
                                  __Pyx_XGOTREF(__pyx_t_12);
                                  __Pyx_XGOTREF(__pyx_t_7);

                                  /* "pyarrow/io.pxi":689
 *                         buf = write_queue.get(timeout=0.01)
 *                     except QueueEmpty:
 *                         continue             # <<<<<<<<<<<<<<
 *                     stream.write(buf)
 *             except Exception as e:
*/
                                  goto __pyx_L24_except_continue;
                                  __pyx_L24_except_continue:;
                                  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                                  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                                  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
                                  goto __pyx_L22_try_continue;
                                }
                                goto __pyx_L18_except_error;

                                /* "pyarrow/io.pxi":686
 *             try:
 *                 while not done or write_queue.qsize() > 0:
 *                     try:             # <<<<<<<<<<<<<<
 *                         buf = write_queue.get(timeout=0.01)
 *                     except QueueEmpty:
*/
                                __pyx_L18_except_error:;
                                __Pyx_XGIVEREF(__pyx_t_9);
                                __Pyx_XGIVEREF(__pyx_t_10);
                                __Pyx_XGIVEREF(__pyx_t_11);
                                __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11);
                                goto __pyx_L6_error;
                                __pyx_L22_try_continue:;
                                __Pyx_XGIVEREF(__pyx_t_9);
                                __Pyx_XGIVEREF(__pyx_t_10);
                                __Pyx_XGIVEREF(__pyx_t_11);
                                __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11);
                                goto __pyx_L12_continue;
                                __pyx_L23_try_end:;
                              }

                              /* "pyarrow/io.pxi":690
 *                     except QueueEmpty:
 *                         continue
 *                     stream.write(buf)             # <<<<<<<<<<<<<<
 *             except Exception as e:
 *                 exc_info = sys.exc_info()
*/
                              if (unlikely(!__pyx_cur_scope->__pyx_v_stream)) { __Pyx_RaiseClosureNameError("stream"); __PYX_ERR(6, 690, __pyx_L6_error) }
                              __pyx_t_12 = __pyx_cur_scope->__pyx_v_stream;
                              __Pyx_INCREF(__pyx_t_12);
                              __pyx_t_8 = 0;
                              {
                                PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_v_buf};
                                __pyx_t_7 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_write, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                                if (unlikely(!__pyx_t_7)) __PYX_ERR(6, 690, __pyx_L6_error)
                                __Pyx_GOTREF(__pyx_t_7);
                              }
                              __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
                              __pyx_L12_continue:;
                            }

                            /* "pyarrow/io.pxi":684
 * 
 *         def bg_write():
 *             try:             # <<<<<<<<<<<<<<
 *                 while not done or write_queue.qsize() > 0:
 *                     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_L11_try_end;
                          __pyx_L6_error:;
                          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                          __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
                          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
                          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;

                          /* "pyarrow/io.pxi":691
 *                         continue
 *                     stream.write(buf)
 *             except Exception as e:             # <<<<<<<<<<<<<<
 *                 exc_info = sys.exc_info()
 *             finally:
*/
                          __pyx_t_14 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
                          if (__pyx_t_14) {
                            __Pyx_AddTraceback("pyarrow.lib.NativeFile.download.bg_write", __pyx_clineno, __pyx_lineno, __pyx_filename);
                            if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_12, &__pyx_t_6) < 0) __PYX_ERR(6, 691, __pyx_L8_except_error)
                            __Pyx_XGOTREF(__pyx_t_7);
                            __Pyx_XGOTREF(__pyx_t_12);
                            __Pyx_XGOTREF(__pyx_t_6);
                            __Pyx_INCREF(__pyx_t_12);
                            __pyx_v_e = __pyx_t_12;
                            /*try:*/ {

                              /* "pyarrow/io.pxi":692
 *                     stream.write(buf)
 *             except Exception as e:
 *                 exc_info = sys.exc_info()             # <<<<<<<<<<<<<<
 *             finally:
 *                 cleanup()
*/
                              __pyx_t_15 = NULL;
                              __Pyx_GetModuleGlobalName(__pyx_t_16, __pyx_mstate_global->__pyx_n_u_sys); if (unlikely(!__pyx_t_16)) __PYX_ERR(6, 692, __pyx_L31_error)
                              __Pyx_GOTREF(__pyx_t_16);
                              __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_t_16, __pyx_mstate_global->__pyx_n_u_exc_info); if (unlikely(!__pyx_t_17)) __PYX_ERR(6, 692, __pyx_L31_error)
                              __Pyx_GOTREF(__pyx_t_17);
                              __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
                              __pyx_t_8 = 1;
                              #if CYTHON_UNPACK_METHODS
                              if (unlikely(PyMethod_Check(__pyx_t_17))) {
                                __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_17);
                                assert(__pyx_t_15);
                                PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_17);
                                __Pyx_INCREF(__pyx_t_15);
                                __Pyx_INCREF(__pyx__function);
                                __Pyx_DECREF_SET(__pyx_t_17, __pyx__function);
                                __pyx_t_8 = 0;
                              }
                              #endif
                              {
                                PyObject *__pyx_callargs[2] = {__pyx_t_15, NULL};
                                __pyx_t_13 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_17, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                                __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
                                __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
                                if (unlikely(!__pyx_t_13)) __PYX_ERR(6, 692, __pyx_L31_error)
                                __Pyx_GOTREF(__pyx_t_13);
                              }
                              __pyx_v_exc_info = __pyx_t_13;
                              __pyx_t_13 = 0;
                            }

                            /* "pyarrow/io.pxi":691
 *                         continue
 *                     stream.write(buf)
 *             except Exception as e:             # <<<<<<<<<<<<<<
 *                 exc_info = sys.exc_info()
 *             finally:
*/
                            /*finally:*/ {
                              /*normal exit:*/{
                                __Pyx_DECREF(__pyx_v_e); __pyx_v_e = 0;
                                goto __pyx_L32;
                              }
                              __pyx_L31_error:;
                              /*exception exit:*/{
                                __Pyx_PyThreadState_declare
                                __Pyx_PyThreadState_assign
                                __pyx_t_11 = 0; __pyx_t_10 = 0; __pyx_t_9 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0;
                                __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
                                __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
                                __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
                                __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
                                 __Pyx_ExceptionSwap(&__pyx_t_20, &__pyx_t_21, &__pyx_t_22);
                                if ( unlikely(__Pyx_GetException(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9) < 0)) __Pyx_ErrFetch(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9);
                                __Pyx_XGOTREF(__pyx_t_11);
                                __Pyx_XGOTREF(__pyx_t_10);
                                __Pyx_XGOTREF(__pyx_t_9);
                                __Pyx_XGOTREF(__pyx_t_20);
                                __Pyx_XGOTREF(__pyx_t_21);
                                __Pyx_XGOTREF(__pyx_t_22);
                                __pyx_t_14 = __pyx_lineno; __pyx_t_18 = __pyx_clineno; __pyx_t_19 = __pyx_filename;
                                {
                                  __Pyx_DECREF(__pyx_v_e); __pyx_v_e = 0;
                                }
                                __Pyx_XGIVEREF(__pyx_t_20);
                                __Pyx_XGIVEREF(__pyx_t_21);
                                __Pyx_XGIVEREF(__pyx_t_22);
                                __Pyx_ExceptionReset(__pyx_t_20, __pyx_t_21, __pyx_t_22);
                                __Pyx_XGIVEREF(__pyx_t_11);
                                __Pyx_XGIVEREF(__pyx_t_10);
                                __Pyx_XGIVEREF(__pyx_t_9);
                                __Pyx_ErrRestore(__pyx_t_11, __pyx_t_10, __pyx_t_9);
                                __pyx_t_11 = 0; __pyx_t_10 = 0; __pyx_t_9 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0;
                                __pyx_lineno = __pyx_t_14; __pyx_clineno = __pyx_t_18; __pyx_filename = __pyx_t_19;
                                goto __pyx_L8_except_error;
                              }
                              __pyx_L32:;
                            }
                            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
                            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                            __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
                            goto __pyx_L7_exception_handled;
                          }
                          goto __pyx_L8_except_error;

                          /* "pyarrow/io.pxi":684
 * 
 *         def bg_write():
 *             try:             # <<<<<<<<<<<<<<
 *                 while not done or write_queue.qsize() > 0:
 *                     try:
*/
                          __pyx_L8_except_error:;
                          __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_L4_error;
                          __pyx_L7_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_L11_try_end:;
                        }
                      }

                      /* "pyarrow/io.pxi":694
 *                 exc_info = sys.exc_info()
 *             finally:
 *                 cleanup()             # <<<<<<<<<<<<<<
 * 
 *         self.seek(0)
*/
                      /*finally:*/ {
                        /*normal exit:*/{
                          if (unlikely(!__pyx_cur_scope->__pyx_v_cleanup)) { __Pyx_RaiseClosureNameError("cleanup"); __PYX_ERR(6, 694, __pyx_L1_error) }
                          __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_cur_scope->__pyx_v_cleanup); if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 694, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_6);
                          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                          goto __pyx_L5;
                        }
                        __pyx_L4_error:;
                        /*exception exit:*/{
                          __Pyx_PyThreadState_declare
                          __Pyx_PyThreadState_assign
                          __pyx_t_3 = 0; __pyx_t_2 = 0; __pyx_t_1 = 0; __pyx_t_22 = 0; __pyx_t_21 = 0; __pyx_t_20 = 0;
                          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                          __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
                          __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
                          __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
                          __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
                          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
                          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
                           __Pyx_ExceptionSwap(&__pyx_t_22, &__pyx_t_21, &__pyx_t_20);
                          if ( unlikely(__Pyx_GetException(&__pyx_t_3, &__pyx_t_2, &__pyx_t_1) < 0)) __Pyx_ErrFetch(&__pyx_t_3, &__pyx_t_2, &__pyx_t_1);
                          __Pyx_XGOTREF(__pyx_t_3);
                          __Pyx_XGOTREF(__pyx_t_2);
                          __Pyx_XGOTREF(__pyx_t_1);
                          __Pyx_XGOTREF(__pyx_t_22);
                          __Pyx_XGOTREF(__pyx_t_21);
                          __Pyx_XGOTREF(__pyx_t_20);
                          __pyx_t_18 = __pyx_lineno; __pyx_t_14 = __pyx_clineno; __pyx_t_23 = __pyx_filename;
                          {
                            if (unlikely(!__pyx_cur_scope->__pyx_v_cleanup)) { __Pyx_RaiseClosureNameError("cleanup"); __PYX_ERR(6, 694, __pyx_L38_error) }
                            __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_cur_scope->__pyx_v_cleanup); if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 694, __pyx_L38_error)
                            __Pyx_GOTREF(__pyx_t_6);
                            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                          }
                          __Pyx_XGIVEREF(__pyx_t_22);
                          __Pyx_XGIVEREF(__pyx_t_21);
                          __Pyx_XGIVEREF(__pyx_t_20);
                          __Pyx_ExceptionReset(__pyx_t_22, __pyx_t_21, __pyx_t_20);
                          __Pyx_XGIVEREF(__pyx_t_3);
                          __Pyx_XGIVEREF(__pyx_t_2);
                          __Pyx_XGIVEREF(__pyx_t_1);
                          __Pyx_ErrRestore(__pyx_t_3, __pyx_t_2, __pyx_t_1);
                          __pyx_t_3 = 0; __pyx_t_2 = 0; __pyx_t_1 = 0; __pyx_t_22 = 0; __pyx_t_21 = 0; __pyx_t_20 = 0;
                          __pyx_lineno = __pyx_t_18; __pyx_clineno = __pyx_t_14; __pyx_filename = __pyx_t_23;
                          goto __pyx_L1_error;
                          __pyx_L38_error:;
                          __Pyx_XGIVEREF(__pyx_t_22);
                          __Pyx_XGIVEREF(__pyx_t_21);
                          __Pyx_XGIVEREF(__pyx_t_20);
                          __Pyx_ExceptionReset(__pyx_t_22, __pyx_t_21, __pyx_t_20);
                          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
                          __pyx_t_22 = 0; __pyx_t_21 = 0; __pyx_t_20 = 0;
                          goto __pyx_L1_error;
                        }
                        __pyx_L5:;
                      }

                      /* "pyarrow/io.pxi":683
 *         exc_info = None
 * 
 *         def bg_write():             # <<<<<<<<<<<<<<
 *             try:
 *                 while not done or write_queue.qsize() > 0:
*/

                      /* function exit code */
                      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_6);
                      __Pyx_XDECREF(__pyx_t_7);
                      __Pyx_XDECREF(__pyx_t_12);
                      __Pyx_XDECREF(__pyx_t_13);
                      __Pyx_XDECREF(__pyx_t_15);
                      __Pyx_XDECREF(__pyx_t_16);
                      __Pyx_XDECREF(__pyx_t_17);
                      __Pyx_AddTraceback("pyarrow.lib.NativeFile.download.bg_write", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XDECREF(__pyx_v_buf);
                      __Pyx_XDECREF(__pyx_v_e);
                      __Pyx_XDECREF(__pyx_v_exc_info);
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":642
 *             self.write(line)
 * 
 *     def download(self, stream_or_path, buffer_size=None):             # <<<<<<<<<<<<<<
 *         """
 *         Read this file completely to a local path or destination stream.
*/

                    static PyObject *__pyx_pf_7pyarrow_3lib_10NativeFile_68download(struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_self, PyObject *__pyx_v_stream_or_path, PyObject *__pyx_v_buffer_size) {
                      struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_21_download *__pyx_cur_scope;
                      int64_t __pyx_v_bytes_read;
                      uint8_t *__pyx_v_buf;
                      std::shared_ptr< arrow::io::InputStream>  __pyx_v_handle;
                      PyObject *__pyx_v_exc_info = NULL;
                      PyObject *__pyx_v_bg_write = 0;
                      PyObject *__pyx_v_writer_thread = NULL;
                      int64_t __pyx_v_total_bytes;
                      int32_t __pyx_v_c_buffer_size;
                      PyObject *__pyx_v_pybuf = NULL;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      PyObject *__pyx_t_3 = NULL;
                      size_t __pyx_t_4;
                      int __pyx_t_5;
                      int __pyx_t_6;
                      std::shared_ptr< arrow::io::InputStream>  __pyx_t_7;
                      PyObject *__pyx_t_8 = NULL;
                      PyObject *__pyx_t_9[3];
                      int32_t __pyx_t_10;
                      int64_t __pyx_t_11;
                      int __pyx_t_12;
                      int __pyx_t_13;
                      char const *__pyx_t_14;
                      PyObject *__pyx_t_15 = NULL;
                      PyObject *__pyx_t_16 = NULL;
                      PyObject *__pyx_t_17 = NULL;
                      PyObject *__pyx_t_18 = NULL;
                      PyObject *__pyx_t_19 = NULL;
                      PyObject *__pyx_t_20 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("download", 0);
                      __pyx_cur_scope = (struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_21_download *)__pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_21_download(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_21_download, __pyx_mstate_global->__pyx_empty_tuple, NULL);
                      if (unlikely(!__pyx_cur_scope)) {
                        __pyx_cur_scope = ((struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_21_download *)Py_None);
                        __Pyx_INCREF(Py_None);
                        __PYX_ERR(6, 642, __pyx_L1_error)
                      } else {
                        __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
                      }
                      __Pyx_INCREF(__pyx_v_buffer_size);

                      /* "pyarrow/io.pxi":657
 *         """
 *         cdef:
 *             int64_t bytes_read = 0             # <<<<<<<<<<<<<<
 *             uint8_t* buf
 * 
*/
                      __pyx_v_bytes_read = 0;

                      /* "pyarrow/io.pxi":660
 *             uint8_t* buf
 * 
 *         if not is_threading_enabled():             # <<<<<<<<<<<<<<
 *             return self._download_nothreads(stream_or_path, buffer_size)
 * 
*/
                      __pyx_t_2 = NULL;
                      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_is_threading_enabled); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 660, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_3);
                      __pyx_t_4 = 1;
                      #if CYTHON_UNPACK_METHODS
                      if (unlikely(PyMethod_Check(__pyx_t_3))) {
                        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
                        assert(__pyx_t_2);
                        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
                        __Pyx_INCREF(__pyx_t_2);
                        __Pyx_INCREF(__pyx__function);
                        __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
                        __pyx_t_4 = 0;
                      }
                      #endif
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
                        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 660, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(6, 660, __pyx_L1_error)
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      __pyx_t_6 = (!__pyx_t_5);
                      if (__pyx_t_6) {

                        /* "pyarrow/io.pxi":661
 * 
 *         if not is_threading_enabled():
 *             return self._download_nothreads(stream_or_path, buffer_size)             # <<<<<<<<<<<<<<
 * 
 *         handle = self.get_input_stream()
*/
                        __Pyx_XDECREF(__pyx_r);
                        __pyx_t_3 = ((PyObject *)__pyx_v_self);
                        __Pyx_INCREF(__pyx_t_3);
                        __pyx_t_4 = 0;
                        {
                          PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_stream_or_path, __pyx_v_buffer_size};
                          __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_download_nothreads, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                          if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 661, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_1);
                        }
                        __pyx_r = __pyx_t_1;
                        __pyx_t_1 = 0;
                        goto __pyx_L0;

                        /* "pyarrow/io.pxi":660
 *             uint8_t* buf
 * 
 *         if not is_threading_enabled():             # <<<<<<<<<<<<<<
 *             return self._download_nothreads(stream_or_path, buffer_size)
 * 
*/
                      }

                      /* "pyarrow/io.pxi":663
 *             return self._download_nothreads(stream_or_path, buffer_size)
 * 
 *         handle = self.get_input_stream()             # <<<<<<<<<<<<<<
 * 
 *         buffer_size = buffer_size or DEFAULT_BUFFER_SIZE
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get_input_stream");
                        __PYX_ERR(6, 663, __pyx_L1_error)
                      }
                      __pyx_t_7 = ((struct __pyx_vtabstruct_7pyarrow_3lib_NativeFile *)__pyx_v_self->__pyx_vtab)->get_input_stream(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 663, __pyx_L1_error)
                      __pyx_v_handle = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_7);

                      /* "pyarrow/io.pxi":665
 *         handle = self.get_input_stream()
 * 
 *         buffer_size = buffer_size or DEFAULT_BUFFER_SIZE             # <<<<<<<<<<<<<<
 * 
 *         write_queue = Queue(50)
*/
                      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_buffer_size); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(6, 665, __pyx_L1_error)
                      if (!__pyx_t_6) {
                      } else {
                        __Pyx_INCREF(__pyx_v_buffer_size);
                        __pyx_t_1 = __pyx_v_buffer_size;
                        goto __pyx_L4_bool_binop_done;
                      }
                      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_DEFAULT_BUFFER_SIZE); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 665, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_3);
                      __Pyx_INCREF(__pyx_t_3);
                      __pyx_t_1 = __pyx_t_3;
                      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                      __pyx_L4_bool_binop_done:;
                      __Pyx_DECREF_SET(__pyx_v_buffer_size, __pyx_t_1);
                      __pyx_t_1 = 0;

                      /* "pyarrow/io.pxi":667
 *         buffer_size = buffer_size or DEFAULT_BUFFER_SIZE
 * 
 *         write_queue = Queue(50)             # <<<<<<<<<<<<<<
 * 
 *         if not hasattr(stream_or_path, 'read'):
*/
                      __pyx_t_3 = NULL;
                      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Queue); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 667, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_2);
                      __pyx_t_4 = 1;
                      #if CYTHON_UNPACK_METHODS
                      if (unlikely(PyMethod_Check(__pyx_t_2))) {
                        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
                        assert(__pyx_t_3);
                        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
                        __Pyx_INCREF(__pyx_t_3);
                        __Pyx_INCREF(__pyx__function);
                        __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
                        __pyx_t_4 = 0;
                      }
                      #endif
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_int_50};
                        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 667, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __Pyx_GIVEREF(__pyx_t_1);
                      __pyx_cur_scope->__pyx_v_write_queue = __pyx_t_1;
                      __pyx_t_1 = 0;

                      /* "pyarrow/io.pxi":669
 *         write_queue = Queue(50)
 * 
 *         if not hasattr(stream_or_path, 'read'):             # <<<<<<<<<<<<<<
 *             stream = open(stream_or_path, 'wb')
 * 
*/
                      __pyx_t_6 = __Pyx_HasAttr(__pyx_v_stream_or_path, __pyx_mstate_global->__pyx_n_u_read); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(6, 669, __pyx_L1_error)
                      __pyx_t_5 = (!__pyx_t_6);
                      if (__pyx_t_5) {

                        /* "pyarrow/io.pxi":670
 * 
 *         if not hasattr(stream_or_path, 'read'):
 *             stream = open(stream_or_path, 'wb')             # <<<<<<<<<<<<<<
 * 
 *             def cleanup():
*/
                        __pyx_t_2 = NULL;
                        __pyx_t_4 = 1;
                        {
                          PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_stream_or_path, __pyx_mstate_global->__pyx_n_u_wb};
                          __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_open, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                          if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 670, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_1);
                        }
                        __Pyx_GIVEREF(__pyx_t_1);
                        __pyx_cur_scope->__pyx_v_stream = __pyx_t_1;
                        __pyx_t_1 = 0;

                        /* "pyarrow/io.pxi":672
 *             stream = open(stream_or_path, 'wb')
 * 
 *             def cleanup():             # <<<<<<<<<<<<<<
 *                 stream.close()
 *         else:
*/
                        __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_10NativeFile_8download_1cleanup, 0, __pyx_mstate_global->__pyx_n_u_download_locals_cleanup, ((PyObject*)__pyx_cur_scope), __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[20])); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 672, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                        __Pyx_GIVEREF(__pyx_t_1);
                        __pyx_cur_scope->__pyx_v_cleanup = __pyx_t_1;
                        __pyx_t_1 = 0;

                        /* "pyarrow/io.pxi":669
 *         write_queue = Queue(50)
 * 
 *         if not hasattr(stream_or_path, 'read'):             # <<<<<<<<<<<<<<
 *             stream = open(stream_or_path, 'wb')
 * 
*/
                        goto __pyx_L6;
                      }

                      /* "pyarrow/io.pxi":675
 *                 stream.close()
 *         else:
 *             stream = stream_or_path             # <<<<<<<<<<<<<<
 * 
 *             def cleanup():
*/
                      /*else*/ {
                        __Pyx_INCREF(__pyx_v_stream_or_path);
                        __Pyx_GIVEREF(__pyx_v_stream_or_path);
                        __pyx_cur_scope->__pyx_v_stream = __pyx_v_stream_or_path;

                        /* "pyarrow/io.pxi":677
 *             stream = stream_or_path
 * 
 *             def cleanup():             # <<<<<<<<<<<<<<
 *                 pass
 * 
*/
                        __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_10NativeFile_8download_3cleanup, 0, __pyx_mstate_global->__pyx_n_u_download_locals_cleanup, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[21])); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 677, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                        __Pyx_GIVEREF(__pyx_t_1);
                        __pyx_cur_scope->__pyx_v_cleanup = __pyx_t_1;
                        __pyx_t_1 = 0;
                      }
                      __pyx_L6:;

                      /* "pyarrow/io.pxi":680
 *                 pass
 * 
 *         done = False             # <<<<<<<<<<<<<<
 *         exc_info = None
 * 
*/
                      __pyx_cur_scope->__pyx_v_done = 0;

                      /* "pyarrow/io.pxi":681
 * 
 *         done = False
 *         exc_info = None             # <<<<<<<<<<<<<<
 * 
 *         def bg_write():
*/
                      __Pyx_INCREF(Py_None);
                      __pyx_v_exc_info = Py_None;

                      /* "pyarrow/io.pxi":683
 *         exc_info = None
 * 
 *         def bg_write():             # <<<<<<<<<<<<<<
 *             try:
 *                 while not done or write_queue.qsize() > 0:
*/
                      __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_10NativeFile_8download_5bg_write, 0, __pyx_mstate_global->__pyx_n_u_download_locals_bg_write, ((PyObject*)__pyx_cur_scope), __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[22])); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 683, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_v_bg_write = __pyx_t_1;
                      __pyx_t_1 = 0;

                      /* "pyarrow/io.pxi":696
 *                 cleanup()
 * 
 *         self.seek(0)             # <<<<<<<<<<<<<<
 * 
 *         writer_thread = threading.Thread(target=bg_write)
*/
                      __pyx_t_2 = ((PyObject *)__pyx_v_self);
                      __Pyx_INCREF(__pyx_t_2);
                      __pyx_t_4 = 0;
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_int_0};
                        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_seek, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 696, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

                      /* "pyarrow/io.pxi":698
 *         self.seek(0)
 * 
 *         writer_thread = threading.Thread(target=bg_write)             # <<<<<<<<<<<<<<
 * 
 *         # This isn't ideal -- PyBytes_FromStringAndSize copies the data from
*/
                      __pyx_t_2 = NULL;
                      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_threading); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 698, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_3);
                      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Thread); if (unlikely(!__pyx_t_8)) __PYX_ERR(6, 698, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_8);
                      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                      __pyx_t_4 = 1;
                      #if CYTHON_UNPACK_METHODS
                      if (unlikely(PyMethod_Check(__pyx_t_8))) {
                        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_8);
                        assert(__pyx_t_2);
                        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8);
                        __Pyx_INCREF(__pyx_t_2);
                        __Pyx_INCREF(__pyx__function);
                        __Pyx_DECREF_SET(__pyx_t_8, __pyx__function);
                        __pyx_t_4 = 0;
                      }
                      #endif
                      {
                        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, NULL};
                        __pyx_t_3 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 698, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_3);
                        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_target, __pyx_v_bg_write, __pyx_t_3, __pyx_callargs+1, 0) < (0)) __PYX_ERR(6, 698, __pyx_L1_error)
                        __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_3);
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 698, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __pyx_v_writer_thread = __pyx_t_1;
                      __pyx_t_1 = 0;

                      /* "pyarrow/io.pxi":702
 *         # This isn't ideal -- PyBytes_FromStringAndSize copies the data from
 *         # the passed buffer, so it's hard for us to avoid doubling the memory
 *         buf = <uint8_t*> malloc(buffer_size)             # <<<<<<<<<<<<<<
 *         if buf == NULL:
 *             raise MemoryError(f"Failed to allocate {buffer_size} bytes")
*/
                      __pyx_t_4 = __Pyx_PyLong_As_size_t(__pyx_v_buffer_size); if (unlikely((__pyx_t_4 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(6, 702, __pyx_L1_error)
                      __pyx_v_buf = ((uint8_t *)malloc(__pyx_t_4));

                      /* "pyarrow/io.pxi":703
 *         # the passed buffer, so it's hard for us to avoid doubling the memory
 *         buf = <uint8_t*> malloc(buffer_size)
 *         if buf == NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError(f"Failed to allocate {buffer_size} bytes")
 * 
*/
                      __pyx_t_5 = (__pyx_v_buf == NULL);
                      if (unlikely(__pyx_t_5)) {

                        /* "pyarrow/io.pxi":704
 *         buf = <uint8_t*> malloc(buffer_size)
 *         if buf == NULL:
 *             raise MemoryError(f"Failed to allocate {buffer_size} bytes")             # <<<<<<<<<<<<<<
 * 
 *         writer_thread.start()
*/
                        __pyx_t_8 = NULL;
                        __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_v_buffer_size, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 704, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_3);
                        __pyx_t_9[0] = __pyx_mstate_global->__pyx_kp_u_Failed_to_allocate;
                        __pyx_t_9[1] = __pyx_t_3;
                        __pyx_t_9[2] = __pyx_mstate_global->__pyx_kp_u_bytes_2;
                        __pyx_t_2 = __Pyx_PyUnicode_Join(__pyx_t_9, 3, 19 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + 6, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3));
                        if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 704, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_2);
                        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                        __pyx_t_4 = 1;
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_2};
                          __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_MemoryError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
                          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                          if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 704, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_1);
                        }
                        __Pyx_Raise(__pyx_t_1, 0, 0, 0);
                        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                        __PYX_ERR(6, 704, __pyx_L1_error)

                        /* "pyarrow/io.pxi":703
 *         # the passed buffer, so it's hard for us to avoid doubling the memory
 *         buf = <uint8_t*> malloc(buffer_size)
 *         if buf == NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError(f"Failed to allocate {buffer_size} bytes")
 * 
*/
                      }

                      /* "pyarrow/io.pxi":706
 *             raise MemoryError(f"Failed to allocate {buffer_size} bytes")
 * 
 *         writer_thread.start()             # <<<<<<<<<<<<<<
 * 
 *         cdef int64_t total_bytes = 0
*/
                      __pyx_t_2 = __pyx_v_writer_thread;
                      __Pyx_INCREF(__pyx_t_2);
                      __pyx_t_4 = 0;
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
                        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_start, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 706, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

                      /* "pyarrow/io.pxi":708
 *         writer_thread.start()
 * 
 *         cdef int64_t total_bytes = 0             # <<<<<<<<<<<<<<
 *         cdef int32_t c_buffer_size = buffer_size
 * 
*/
                      __pyx_v_total_bytes = 0;

                      /* "pyarrow/io.pxi":709
 * 
 *         cdef int64_t total_bytes = 0
 *         cdef int32_t c_buffer_size = buffer_size             # <<<<<<<<<<<<<<
 * 
 *         try:
*/
                      __pyx_t_10 = __Pyx_PyLong_As_int32_t(__pyx_v_buffer_size); if (unlikely((__pyx_t_10 == ((int32_t)-1)) && PyErr_Occurred())) __PYX_ERR(6, 709, __pyx_L1_error)
                      __pyx_v_c_buffer_size = __pyx_t_10;

                      /* "pyarrow/io.pxi":711
 *         cdef int32_t c_buffer_size = buffer_size
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             while True:
 *                 with nogil:
*/
                      /*try:*/ {

                        /* "pyarrow/io.pxi":712
 * 
 *         try:
 *             while True:             # <<<<<<<<<<<<<<
 *                 with nogil:
 *                     bytes_read = GetResultValue(
*/
                        while (1) {

                          /* "pyarrow/io.pxi":713
 *         try:
 *             while True:
 *                 with nogil:             # <<<<<<<<<<<<<<
 *                     bytes_read = GetResultValue(
 *                         handle.get().Read(c_buffer_size, buf))
*/
                          {
                              PyThreadState * _save;
                              _save = PyEval_SaveThread();
                              __Pyx_FastGIL_Remember();
                              /*try:*/ {

                                /* "pyarrow/io.pxi":714
 *             while True:
 *                 with nogil:
 *                     bytes_read = GetResultValue(             # <<<<<<<<<<<<<<
 *                         handle.get().Read(c_buffer_size, buf))
 * 
*/
                                __pyx_t_11 = arrow::py::GetResultValue<int64_t>(__pyx_v_handle.get()->Read(__pyx_v_c_buffer_size, __pyx_v_buf)); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(6, 714, __pyx_L16_error)
                                __pyx_v_bytes_read = __pyx_t_11;
                              }

                              /* "pyarrow/io.pxi":713
 *         try:
 *             while True:
 *                 with nogil:             # <<<<<<<<<<<<<<
 *                     bytes_read = GetResultValue(
 *                         handle.get().Read(c_buffer_size, buf))
*/
                              /*finally:*/ {
                                /*normal exit:*/{
                                  __Pyx_FastGIL_Forget();
                                  PyEval_RestoreThread(_save);
                                  goto __pyx_L17;
                                }
                                __pyx_L16_error: {
                                  __Pyx_FastGIL_Forget();
                                  PyEval_RestoreThread(_save);
                                  goto __pyx_L9_error;
                                }
                                __pyx_L17:;
                              }
                          }

                          /* "pyarrow/io.pxi":717
 *                         handle.get().Read(c_buffer_size, buf))
 * 
 *                 total_bytes += bytes_read             # <<<<<<<<<<<<<<
 * 
 *                 # EOF
*/
                          __pyx_v_total_bytes = (__pyx_v_total_bytes + __pyx_v_bytes_read);

                          /* "pyarrow/io.pxi":720
 * 
 *                 # EOF
 *                 if bytes_read == 0:             # <<<<<<<<<<<<<<
 *                     break
 * 
*/
                          __pyx_t_5 = (__pyx_v_bytes_read == 0);
                          if (__pyx_t_5) {

                            /* "pyarrow/io.pxi":721
 *                 # EOF
 *                 if bytes_read == 0:
 *                     break             # <<<<<<<<<<<<<<
 * 
 *                 pybuf = cp.PyBytes_FromStringAndSize(<const char*>buf,
*/
                            goto __pyx_L12_break;

                            /* "pyarrow/io.pxi":720
 * 
 *                 # EOF
 *                 if bytes_read == 0:             # <<<<<<<<<<<<<<
 *                     break
 * 
*/
                          }

                          /* "pyarrow/io.pxi":723
 *                     break
 * 
 *                 pybuf = cp.PyBytes_FromStringAndSize(<const char*>buf,             # <<<<<<<<<<<<<<
 *                                                      bytes_read)
 * 
*/
                          __pyx_t_1 = PyBytes_FromStringAndSize(((char const *)__pyx_v_buf), __pyx_v_bytes_read); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 723, __pyx_L9_error)
                          __Pyx_GOTREF(__pyx_t_1);
                          __Pyx_XDECREF_SET(__pyx_v_pybuf, ((PyObject*)__pyx_t_1));
                          __pyx_t_1 = 0;

                          /* "pyarrow/io.pxi":726
 *                                                      bytes_read)
 * 
 *                 if writer_thread.is_alive():             # <<<<<<<<<<<<<<
 *                     while write_queue.full():
 *                         time.sleep(0.01)
*/
                          __pyx_t_2 = __pyx_v_writer_thread;
                          __Pyx_INCREF(__pyx_t_2);
                          __pyx_t_4 = 0;
                          {
                            PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
                            __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_is_alive, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                            if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 726, __pyx_L9_error)
                            __Pyx_GOTREF(__pyx_t_1);
                          }
                          __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(6, 726, __pyx_L9_error)
                          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                          if (__pyx_t_5) {

                            /* "pyarrow/io.pxi":727
 * 
 *                 if writer_thread.is_alive():
 *                     while write_queue.full():             # <<<<<<<<<<<<<<
 *                         time.sleep(0.01)
 *                 else:
*/
                            while (1) {
                              __pyx_t_2 = __pyx_cur_scope->__pyx_v_write_queue;
                              __Pyx_INCREF(__pyx_t_2);
                              __pyx_t_4 = 0;
                              {
                                PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
                                __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_full, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                                __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                                if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 727, __pyx_L9_error)
                                __Pyx_GOTREF(__pyx_t_1);
                              }
                              __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(6, 727, __pyx_L9_error)
                              __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                              if (!__pyx_t_5) break;

                              /* "pyarrow/io.pxi":728
 *                 if writer_thread.is_alive():
 *                     while write_queue.full():
 *                         time.sleep(0.01)             # <<<<<<<<<<<<<<
 *                 else:
 *                     break
*/
                              __pyx_t_2 = NULL;
                              __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_time); if (unlikely(!__pyx_t_8)) __PYX_ERR(6, 728, __pyx_L9_error)
                              __Pyx_GOTREF(__pyx_t_8);
                              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_sleep); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 728, __pyx_L9_error)
                              __Pyx_GOTREF(__pyx_t_3);
                              __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                              __pyx_t_4 = 1;
                              #if CYTHON_UNPACK_METHODS
                              if (unlikely(PyMethod_Check(__pyx_t_3))) {
                                __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
                                assert(__pyx_t_2);
                                PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
                                __Pyx_INCREF(__pyx_t_2);
                                __Pyx_INCREF(__pyx__function);
                                __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
                                __pyx_t_4 = 0;
                              }
                              #endif
                              {
                                PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_float_0_01};
                                __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                                __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                                if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 728, __pyx_L9_error)
                                __Pyx_GOTREF(__pyx_t_1);
                              }
                              __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                            }

                            /* "pyarrow/io.pxi":726
 *                                                      bytes_read)
 * 
 *                 if writer_thread.is_alive():             # <<<<<<<<<<<<<<
 *                     while write_queue.full():
 *                         time.sleep(0.01)
*/
                            goto __pyx_L19;
                          }

                          /* "pyarrow/io.pxi":730
 *                         time.sleep(0.01)
 *                 else:
 *                     break             # <<<<<<<<<<<<<<
 * 
 *                 write_queue.put_nowait(pybuf)
*/
                          /*else*/ {
                            goto __pyx_L12_break;
                          }
                          __pyx_L19:;

                          /* "pyarrow/io.pxi":732
 *                     break
 * 
 *                 write_queue.put_nowait(pybuf)             # <<<<<<<<<<<<<<
 *         finally:
 *             free(buf)
*/
                          __pyx_t_3 = __pyx_cur_scope->__pyx_v_write_queue;
                          __Pyx_INCREF(__pyx_t_3);
                          __pyx_t_4 = 0;
                          {
                            PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_pybuf};
                            __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_put_nowait, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                            if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 732, __pyx_L9_error)
                            __Pyx_GOTREF(__pyx_t_1);
                          }
                          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                        }
                        __pyx_L12_break:;
                      }

                      /* "pyarrow/io.pxi":734
 *                 write_queue.put_nowait(pybuf)
 *         finally:
 *             free(buf)             # <<<<<<<<<<<<<<
 *             done = True
 * 
*/
                      /*finally:*/ {
                        /*normal exit:*/{
                          free(__pyx_v_buf);

                          /* "pyarrow/io.pxi":735
 *         finally:
 *             free(buf)
 *             done = True             # <<<<<<<<<<<<<<
 * 
 *         writer_thread.join()
*/
                          __pyx_cur_scope->__pyx_v_done = 1;
                          goto __pyx_L10;
                        }
                        __pyx_L9_error:;
                        /*exception exit:*/{
                          __Pyx_PyThreadState_declare
                          __Pyx_PyThreadState_assign
                          __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0;
                          __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_8); __pyx_t_8 = 0;
                           __Pyx_ExceptionSwap(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20);
                          if ( unlikely(__Pyx_GetException(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17) < 0)) __Pyx_ErrFetch(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17);
                          __Pyx_XGOTREF(__pyx_t_15);
                          __Pyx_XGOTREF(__pyx_t_16);
                          __Pyx_XGOTREF(__pyx_t_17);
                          __Pyx_XGOTREF(__pyx_t_18);
                          __Pyx_XGOTREF(__pyx_t_19);
                          __Pyx_XGOTREF(__pyx_t_20);
                          __pyx_t_12 = __pyx_lineno; __pyx_t_13 = __pyx_clineno; __pyx_t_14 = __pyx_filename;
                          {

                            /* "pyarrow/io.pxi":734
 *                 write_queue.put_nowait(pybuf)
 *         finally:
 *             free(buf)             # <<<<<<<<<<<<<<
 *             done = True
 * 
*/
                            free(__pyx_v_buf);

                            /* "pyarrow/io.pxi":735
 *         finally:
 *             free(buf)
 *             done = True             # <<<<<<<<<<<<<<
 * 
 *         writer_thread.join()
*/
                            __pyx_cur_scope->__pyx_v_done = 1;
                          }
                          __Pyx_XGIVEREF(__pyx_t_18);
                          __Pyx_XGIVEREF(__pyx_t_19);
                          __Pyx_XGIVEREF(__pyx_t_20);
                          __Pyx_ExceptionReset(__pyx_t_18, __pyx_t_19, __pyx_t_20);
                          __Pyx_XGIVEREF(__pyx_t_15);
                          __Pyx_XGIVEREF(__pyx_t_16);
                          __Pyx_XGIVEREF(__pyx_t_17);
                          __Pyx_ErrRestore(__pyx_t_15, __pyx_t_16, __pyx_t_17);
                          __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0;
                          __pyx_lineno = __pyx_t_12; __pyx_clineno = __pyx_t_13; __pyx_filename = __pyx_t_14;
                          goto __pyx_L1_error;
                        }
                        __pyx_L10:;
                      }

                      /* "pyarrow/io.pxi":737
 *             done = True
 * 
 *         writer_thread.join()             # <<<<<<<<<<<<<<
 *         if exc_info is not None:
 *             raise exc_info[0], exc_info[1], exc_info[2]
*/
                      __pyx_t_3 = __pyx_v_writer_thread;
                      __Pyx_INCREF(__pyx_t_3);
                      __pyx_t_4 = 0;
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
                        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_join, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 737, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

                      /* "pyarrow/io.pxi":738
 * 
 *         writer_thread.join()
 *         if exc_info is not None:             # <<<<<<<<<<<<<<
 *             raise exc_info[0], exc_info[1], exc_info[2]
 * 
*/
                      __pyx_t_5 = (__pyx_v_exc_info != Py_None);
                      if (unlikely(__pyx_t_5)) {

                        /* "pyarrow/io.pxi":739
 *         writer_thread.join()
 *         if exc_info is not None:
 *             raise exc_info[0], exc_info[1], exc_info[2]             # <<<<<<<<<<<<<<
 * 
 *     def _download_nothreads(self, stream_or_path, buffer_size=None):
*/
                        if (unlikely(__pyx_v_exc_info == Py_None)) {
                          PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
                          __PYX_ERR(6, 739, __pyx_L1_error)
                        }
                        __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_exc_info, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 739, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                        if (unlikely(__pyx_v_exc_info == Py_None)) {
                          PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
                          __PYX_ERR(6, 739, __pyx_L1_error)
                        }
                        __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_exc_info, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 739, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_3);
                        if (unlikely(__pyx_v_exc_info == Py_None)) {
                          PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
                          __PYX_ERR(6, 739, __pyx_L1_error)
                        }
                        __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_exc_info, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 739, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_2);
                        __Pyx_Raise(__pyx_t_1, __pyx_t_3, __pyx_t_2, 0);
                        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                        __PYX_ERR(6, 739, __pyx_L1_error)

                        /* "pyarrow/io.pxi":738
 * 
 *         writer_thread.join()
 *         if exc_info is not None:             # <<<<<<<<<<<<<<
 *             raise exc_info[0], exc_info[1], exc_info[2]
 * 
*/
                      }

                      /* "pyarrow/io.pxi":642
 *             self.write(line)
 * 
 *     def download(self, stream_or_path, buffer_size=None):             # <<<<<<<<<<<<<<
 *         """
 *         Read this file completely to a local path or destination stream.
*/

                      /* 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_8);
                      __Pyx_AddTraceback("pyarrow.lib.NativeFile.download", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XDECREF(__pyx_v_exc_info);
                      __Pyx_XDECREF(__pyx_v_bg_write);
                      __Pyx_XDECREF(__pyx_v_writer_thread);
                      __Pyx_XDECREF(__pyx_v_pybuf);
                      __Pyx_XDECREF(__pyx_v_buffer_size);
                      __Pyx_DECREF((PyObject *)__pyx_cur_scope);
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":741
 *             raise exc_info[0], exc_info[1], exc_info[2]
 * 
 *     def _download_nothreads(self, stream_or_path, buffer_size=None):             # <<<<<<<<<<<<<<
 *         """
 *         Internal method to do a download without separate threads, queues etc.
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_10NativeFile_71_download_nothreads(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_10NativeFile_70_download_nothreads, "NativeFile._download_nothreads(self, stream_or_path, buffer_size=None)\n\nInternal method to do a download without separate threads, queues etc.\nCalled by download above if is_threading_enabled() == False");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_10NativeFile_71_download_nothreads = {"_download_nothreads", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10NativeFile_71_download_nothreads, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10NativeFile_70_download_nothreads};
                    static PyObject *__pyx_pw_7pyarrow_3lib_10NativeFile_71_download_nothreads(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      PyObject *__pyx_v_stream_or_path = 0;
                      PyObject *__pyx_v_buffer_size = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[2] = {0,0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("_download_nothreads (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_stream_or_path,&__pyx_mstate_global->__pyx_n_u_buffer_size,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(6, 741, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  2:
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(6, 741, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 741, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_download_nothreads", 0) < (0)) __PYX_ERR(6, 741, __pyx_L3_error)
                          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_download_nothreads", 0, 1, 2, i); __PYX_ERR(6, 741, __pyx_L3_error) }
                          }
                        } else {
                          switch (__pyx_nargs) {
                            case  2:
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(6, 741, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 741, __pyx_L3_error)
                            break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
                        }
                        __pyx_v_stream_or_path = values[0];
                        __pyx_v_buffer_size = values[1];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("_download_nothreads", 0, 1, 2, __pyx_nargs); __PYX_ERR(6, 741, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.NativeFile._download_nothreads", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_10NativeFile_70_download_nothreads(((struct __pyx_obj_7pyarrow_3lib_NativeFile *)__pyx_v_self), __pyx_v_stream_or_path, __pyx_v_buffer_size);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":757
 *             stream = open(stream_or_path, 'wb')
 * 
 *             def cleanup():             # <<<<<<<<<<<<<<
 *                 stream.close()
 *         else:
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_10NativeFile_19_download_nothreads_1cleanup(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_10NativeFile_19_download_nothreads_1cleanup = {"cleanup", (PyCFunction)__pyx_pw_7pyarrow_3lib_10NativeFile_19_download_nothreads_1cleanup, METH_NOARGS, 0};
                    static PyObject *__pyx_pw_7pyarrow_3lib_10NativeFile_19_download_nothreads_1cleanup(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("cleanup (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_10NativeFile_19_download_nothreads_cleanup(__pyx_self);

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_10NativeFile_19_download_nothreads_cleanup(PyObject *__pyx_self) {
                      struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_22__download_nothreads *__pyx_cur_scope;
                      struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_22__download_nothreads *__pyx_outer_scope;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      size_t __pyx_t_3;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("cleanup", 0);
                      __pyx_outer_scope = (struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_22__download_nothreads *) __Pyx_CyFunction_GetClosure(__pyx_self);
                      __pyx_cur_scope = __pyx_outer_scope;

                      /* "pyarrow/io.pxi":758
 * 
 *             def cleanup():
 *                 stream.close()             # <<<<<<<<<<<<<<
 *         else:
 *             stream = stream_or_path
*/
                      if (unlikely(!__pyx_cur_scope->__pyx_v_stream)) { __Pyx_RaiseClosureNameError("stream"); __PYX_ERR(6, 758, __pyx_L1_error) }
                      __pyx_t_2 = __pyx_cur_scope->__pyx_v_stream;
                      __Pyx_INCREF(__pyx_t_2);
                      __pyx_t_3 = 0;
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
                        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_close, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 758, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

                      /* "pyarrow/io.pxi":757
 *             stream = open(stream_or_path, 'wb')
 * 
 *             def cleanup():             # <<<<<<<<<<<<<<
 *                 stream.close()
 *         else:
*/

                      /* function exit code */
                      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_AddTraceback("pyarrow.lib.NativeFile._download_nothreads.cleanup", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":762
 *             stream = stream_or_path
 * 
 *             def cleanup():             # <<<<<<<<<<<<<<
 *                 pass
 * 
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_10NativeFile_19_download_nothreads_3cleanup(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_10NativeFile_19_download_nothreads_3cleanup = {"cleanup", (PyCFunction)__pyx_pw_7pyarrow_3lib_10NativeFile_19_download_nothreads_3cleanup, METH_NOARGS, 0};
                    static PyObject *__pyx_pw_7pyarrow_3lib_10NativeFile_19_download_nothreads_3cleanup(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("cleanup (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_10NativeFile_19_download_nothreads_2cleanup(__pyx_self);

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_10NativeFile_19_download_nothreads_2cleanup(CYTHON_UNUSED PyObject *__pyx_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("cleanup", 0);

                      /* function exit code */
                      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":741
 *             raise exc_info[0], exc_info[1], exc_info[2]
 * 
 *     def _download_nothreads(self, stream_or_path, buffer_size=None):             # <<<<<<<<<<<<<<
 *         """
 *         Internal method to do a download without separate threads, queues etc.
*/

                    static PyObject *__pyx_pf_7pyarrow_3lib_10NativeFile_70_download_nothreads(struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_self, PyObject *__pyx_v_stream_or_path, PyObject *__pyx_v_buffer_size) {
                      struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_22__download_nothreads *__pyx_cur_scope;
                      int64_t __pyx_v_bytes_read;
                      uint8_t *__pyx_v_buf;
                      std::shared_ptr< arrow::io::InputStream>  __pyx_v_handle;
                      PyObject *__pyx_v_cleanup = 0;
                      int64_t __pyx_v_total_bytes;
                      int32_t __pyx_v_c_buffer_size;
                      PyObject *__pyx_v_pybuf = NULL;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      std::shared_ptr< arrow::io::InputStream>  __pyx_t_1;
                      PyObject *__pyx_t_2 = NULL;
                      int __pyx_t_3;
                      PyObject *__pyx_t_4 = NULL;
                      int __pyx_t_5;
                      size_t __pyx_t_6;
                      PyObject *__pyx_t_7 = NULL;
                      PyObject *__pyx_t_8[3];
                      PyObject *__pyx_t_9 = NULL;
                      int32_t __pyx_t_10;
                      int64_t __pyx_t_11;
                      int __pyx_t_12;
                      int __pyx_t_13;
                      char const *__pyx_t_14;
                      PyObject *__pyx_t_15 = NULL;
                      PyObject *__pyx_t_16 = NULL;
                      PyObject *__pyx_t_17 = NULL;
                      PyObject *__pyx_t_18 = NULL;
                      PyObject *__pyx_t_19 = NULL;
                      PyObject *__pyx_t_20 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("_download_nothreads", 0);
                      __pyx_cur_scope = (struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_22__download_nothreads *)__pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_22__download_nothreads(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_22__download_nothreads, __pyx_mstate_global->__pyx_empty_tuple, NULL);
                      if (unlikely(!__pyx_cur_scope)) {
                        __pyx_cur_scope = ((struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_22__download_nothreads *)Py_None);
                        __Pyx_INCREF(Py_None);
                        __PYX_ERR(6, 741, __pyx_L1_error)
                      } else {
                        __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
                      }
                      __Pyx_INCREF(__pyx_v_buffer_size);

                      /* "pyarrow/io.pxi":747
 *         """
 *         cdef:
 *             int64_t bytes_read = 0             # <<<<<<<<<<<<<<
 *             uint8_t* buf
 * 
*/
                      __pyx_v_bytes_read = 0;

                      /* "pyarrow/io.pxi":750
 *             uint8_t* buf
 * 
 *         handle = self.get_input_stream()             # <<<<<<<<<<<<<<
 * 
 *         buffer_size = buffer_size or DEFAULT_BUFFER_SIZE
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get_input_stream");
                        __PYX_ERR(6, 750, __pyx_L1_error)
                      }
                      __pyx_t_1 = ((struct __pyx_vtabstruct_7pyarrow_3lib_NativeFile *)__pyx_v_self->__pyx_vtab)->get_input_stream(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 750, __pyx_L1_error)
                      __pyx_v_handle = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_1);

                      /* "pyarrow/io.pxi":752
 *         handle = self.get_input_stream()
 * 
 *         buffer_size = buffer_size or DEFAULT_BUFFER_SIZE             # <<<<<<<<<<<<<<
 * 
 *         if not hasattr(stream_or_path, 'read'):
*/
                      __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_buffer_size); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(6, 752, __pyx_L1_error)
                      if (!__pyx_t_3) {
                      } else {
                        __Pyx_INCREF(__pyx_v_buffer_size);
                        __pyx_t_2 = __pyx_v_buffer_size;
                        goto __pyx_L3_bool_binop_done;
                      }
                      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_DEFAULT_BUFFER_SIZE); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 752, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_4);
                      __Pyx_INCREF(__pyx_t_4);
                      __pyx_t_2 = __pyx_t_4;
                      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                      __pyx_L3_bool_binop_done:;
                      __Pyx_DECREF_SET(__pyx_v_buffer_size, __pyx_t_2);
                      __pyx_t_2 = 0;

                      /* "pyarrow/io.pxi":754
 *         buffer_size = buffer_size or DEFAULT_BUFFER_SIZE
 * 
 *         if not hasattr(stream_or_path, 'read'):             # <<<<<<<<<<<<<<
 *             stream = open(stream_or_path, 'wb')
 * 
*/
                      __pyx_t_3 = __Pyx_HasAttr(__pyx_v_stream_or_path, __pyx_mstate_global->__pyx_n_u_read); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(6, 754, __pyx_L1_error)
                      __pyx_t_5 = (!__pyx_t_3);
                      if (__pyx_t_5) {

                        /* "pyarrow/io.pxi":755
 * 
 *         if not hasattr(stream_or_path, 'read'):
 *             stream = open(stream_or_path, 'wb')             # <<<<<<<<<<<<<<
 * 
 *             def cleanup():
*/
                        __pyx_t_4 = NULL;
                        __pyx_t_6 = 1;
                        {
                          PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_v_stream_or_path, __pyx_mstate_global->__pyx_n_u_wb};
                          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_open, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                          if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 755, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_2);
                        }
                        __Pyx_GIVEREF(__pyx_t_2);
                        __pyx_cur_scope->__pyx_v_stream = __pyx_t_2;
                        __pyx_t_2 = 0;

                        /* "pyarrow/io.pxi":757
 *             stream = open(stream_or_path, 'wb')
 * 
 *             def cleanup():             # <<<<<<<<<<<<<<
 *                 stream.close()
 *         else:
*/
                        __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_10NativeFile_19_download_nothreads_1cleanup, 0, __pyx_mstate_global->__pyx_n_u_download_nothreads_locals_clean, ((PyObject*)__pyx_cur_scope), __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[23])); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 757, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_2);
                        __pyx_v_cleanup = __pyx_t_2;
                        __pyx_t_2 = 0;

                        /* "pyarrow/io.pxi":754
 *         buffer_size = buffer_size or DEFAULT_BUFFER_SIZE
 * 
 *         if not hasattr(stream_or_path, 'read'):             # <<<<<<<<<<<<<<
 *             stream = open(stream_or_path, 'wb')
 * 
*/
                        goto __pyx_L5;
                      }

                      /* "pyarrow/io.pxi":760
 *                 stream.close()
 *         else:
 *             stream = stream_or_path             # <<<<<<<<<<<<<<
 * 
 *             def cleanup():
*/
                      /*else*/ {
                        __Pyx_INCREF(__pyx_v_stream_or_path);
                        __Pyx_GIVEREF(__pyx_v_stream_or_path);
                        __pyx_cur_scope->__pyx_v_stream = __pyx_v_stream_or_path;

                        /* "pyarrow/io.pxi":762
 *             stream = stream_or_path
 * 
 *             def cleanup():             # <<<<<<<<<<<<<<
 *                 pass
 * 
*/
                        __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_10NativeFile_19_download_nothreads_3cleanup, 0, __pyx_mstate_global->__pyx_n_u_download_nothreads_locals_clean, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[24])); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 762, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_2);
                        __pyx_v_cleanup = __pyx_t_2;
                        __pyx_t_2 = 0;
                      }
                      __pyx_L5:;

                      /* "pyarrow/io.pxi":765
 *                 pass
 * 
 *         self.seek(0)             # <<<<<<<<<<<<<<
 * 
 *         # This isn't ideal -- PyBytes_FromStringAndSize copies the data from
*/
                      __pyx_t_4 = ((PyObject *)__pyx_v_self);
                      __Pyx_INCREF(__pyx_t_4);
                      __pyx_t_6 = 0;
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_int_0};
                        __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_seek, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                        if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 765, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_2);
                      }
                      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

                      /* "pyarrow/io.pxi":769
 *         # This isn't ideal -- PyBytes_FromStringAndSize copies the data from
 *         # the passed buffer, so it's hard for us to avoid doubling the memory
 *         buf = <uint8_t*> malloc(buffer_size)             # <<<<<<<<<<<<<<
 *         if buf == NULL:
 *             raise MemoryError(f"Failed to allocate {buffer_size} bytes")
*/
                      __pyx_t_6 = __Pyx_PyLong_As_size_t(__pyx_v_buffer_size); if (unlikely((__pyx_t_6 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(6, 769, __pyx_L1_error)
                      __pyx_v_buf = ((uint8_t *)malloc(__pyx_t_6));

                      /* "pyarrow/io.pxi":770
 *         # the passed buffer, so it's hard for us to avoid doubling the memory
 *         buf = <uint8_t*> malloc(buffer_size)
 *         if buf == NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError(f"Failed to allocate {buffer_size} bytes")
 * 
*/
                      __pyx_t_5 = (__pyx_v_buf == NULL);
                      if (unlikely(__pyx_t_5)) {

                        /* "pyarrow/io.pxi":771
 *         buf = <uint8_t*> malloc(buffer_size)
 *         if buf == NULL:
 *             raise MemoryError(f"Failed to allocate {buffer_size} bytes")             # <<<<<<<<<<<<<<
 * 
 *         cdef int64_t total_bytes = 0
*/
                        __pyx_t_4 = NULL;
                        __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_v_buffer_size, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(6, 771, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_7);
                        __pyx_t_8[0] = __pyx_mstate_global->__pyx_kp_u_Failed_to_allocate;
                        __pyx_t_8[1] = __pyx_t_7;
                        __pyx_t_8[2] = __pyx_mstate_global->__pyx_kp_u_bytes_2;
                        __pyx_t_9 = __Pyx_PyUnicode_Join(__pyx_t_8, 3, 19 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7) + 6, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7));
                        if (unlikely(!__pyx_t_9)) __PYX_ERR(6, 771, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_9);
                        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
                        __pyx_t_6 = 1;
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_9};
                          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_MemoryError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
                          if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 771, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_2);
                        }
                        __Pyx_Raise(__pyx_t_2, 0, 0, 0);
                        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                        __PYX_ERR(6, 771, __pyx_L1_error)

                        /* "pyarrow/io.pxi":770
 *         # the passed buffer, so it's hard for us to avoid doubling the memory
 *         buf = <uint8_t*> malloc(buffer_size)
 *         if buf == NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError(f"Failed to allocate {buffer_size} bytes")
 * 
*/
                      }

                      /* "pyarrow/io.pxi":773
 *             raise MemoryError(f"Failed to allocate {buffer_size} bytes")
 * 
 *         cdef int64_t total_bytes = 0             # <<<<<<<<<<<<<<
 *         cdef int32_t c_buffer_size = buffer_size
 * 
*/
                      __pyx_v_total_bytes = 0;

                      /* "pyarrow/io.pxi":774
 * 
 *         cdef int64_t total_bytes = 0
 *         cdef int32_t c_buffer_size = buffer_size             # <<<<<<<<<<<<<<
 * 
 *         try:
*/
                      __pyx_t_10 = __Pyx_PyLong_As_int32_t(__pyx_v_buffer_size); if (unlikely((__pyx_t_10 == ((int32_t)-1)) && PyErr_Occurred())) __PYX_ERR(6, 774, __pyx_L1_error)
                      __pyx_v_c_buffer_size = __pyx_t_10;

                      /* "pyarrow/io.pxi":776
 *         cdef int32_t c_buffer_size = buffer_size
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             while True:
 *                 with nogil:
*/
                      /*try:*/ {

                        /* "pyarrow/io.pxi":777
 * 
 *         try:
 *             while True:             # <<<<<<<<<<<<<<
 *                 with nogil:
 *                     bytes_read = GetResultValue(
*/
                        while (1) {

                          /* "pyarrow/io.pxi":778
 *         try:
 *             while True:
 *                 with nogil:             # <<<<<<<<<<<<<<
 *                     bytes_read = GetResultValue(
 *                         handle.get().Read(c_buffer_size, buf))
*/
                          {
                              PyThreadState * _save;
                              _save = PyEval_SaveThread();
                              __Pyx_FastGIL_Remember();
                              /*try:*/ {

                                /* "pyarrow/io.pxi":779
 *             while True:
 *                 with nogil:
 *                     bytes_read = GetResultValue(             # <<<<<<<<<<<<<<
 *                         handle.get().Read(c_buffer_size, buf))
 * 
*/
                                __pyx_t_11 = arrow::py::GetResultValue<int64_t>(__pyx_v_handle.get()->Read(__pyx_v_c_buffer_size, __pyx_v_buf)); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(6, 779, __pyx_L15_error)
                                __pyx_v_bytes_read = __pyx_t_11;
                              }

                              /* "pyarrow/io.pxi":778
 *         try:
 *             while True:
 *                 with nogil:             # <<<<<<<<<<<<<<
 *                     bytes_read = GetResultValue(
 *                         handle.get().Read(c_buffer_size, buf))
*/
                              /*finally:*/ {
                                /*normal exit:*/{
                                  __Pyx_FastGIL_Forget();
                                  PyEval_RestoreThread(_save);
                                  goto __pyx_L16;
                                }
                                __pyx_L15_error: {
                                  __Pyx_FastGIL_Forget();
                                  PyEval_RestoreThread(_save);
                                  goto __pyx_L8_error;
                                }
                                __pyx_L16:;
                              }
                          }

                          /* "pyarrow/io.pxi":782
 *                         handle.get().Read(c_buffer_size, buf))
 * 
 *                 total_bytes += bytes_read             # <<<<<<<<<<<<<<
 * 
 *                 # EOF
*/
                          __pyx_v_total_bytes = (__pyx_v_total_bytes + __pyx_v_bytes_read);

                          /* "pyarrow/io.pxi":785
 * 
 *                 # EOF
 *                 if bytes_read == 0:             # <<<<<<<<<<<<<<
 *                     break
 * 
*/
                          __pyx_t_5 = (__pyx_v_bytes_read == 0);
                          if (__pyx_t_5) {

                            /* "pyarrow/io.pxi":786
 *                 # EOF
 *                 if bytes_read == 0:
 *                     break             # <<<<<<<<<<<<<<
 * 
 *                 pybuf = cp.PyBytes_FromStringAndSize(<const char*>buf,
*/
                            goto __pyx_L11_break;

                            /* "pyarrow/io.pxi":785
 * 
 *                 # EOF
 *                 if bytes_read == 0:             # <<<<<<<<<<<<<<
 *                     break
 * 
*/
                          }

                          /* "pyarrow/io.pxi":788
 *                     break
 * 
 *                 pybuf = cp.PyBytes_FromStringAndSize(<const char*>buf,             # <<<<<<<<<<<<<<
 *                                                      bytes_read)
 * 
*/
                          __pyx_t_2 = PyBytes_FromStringAndSize(((char const *)__pyx_v_buf), __pyx_v_bytes_read); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 788, __pyx_L8_error)
                          __Pyx_GOTREF(__pyx_t_2);
                          __Pyx_XDECREF_SET(__pyx_v_pybuf, ((PyObject*)__pyx_t_2));
                          __pyx_t_2 = 0;

                          /* "pyarrow/io.pxi":792
 * 
 *                 # no background thread - write on main thread
 *                 stream.write(pybuf)             # <<<<<<<<<<<<<<
 *         finally:
 *             free(buf)
*/
                          __pyx_t_9 = __pyx_cur_scope->__pyx_v_stream;
                          __Pyx_INCREF(__pyx_t_9);
                          __pyx_t_6 = 0;
                          {
                            PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_v_pybuf};
                            __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_write, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
                            if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 792, __pyx_L8_error)
                            __Pyx_GOTREF(__pyx_t_2);
                          }
                          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                        }
                        __pyx_L11_break:;
                      }

                      /* "pyarrow/io.pxi":794
 *                 stream.write(pybuf)
 *         finally:
 *             free(buf)             # <<<<<<<<<<<<<<
 *             cleanup()
 * 
*/
                      /*finally:*/ {
                        /*normal exit:*/{
                          free(__pyx_v_buf);

                          /* "pyarrow/io.pxi":795
 *         finally:
 *             free(buf)
 *             cleanup()             # <<<<<<<<<<<<<<
 * 
 *     def upload(self, stream, buffer_size=None):
*/
                          __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_v_cleanup); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 795, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_2);
                          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                          goto __pyx_L9;
                        }
                        __pyx_L8_error:;
                        /*exception exit:*/{
                          __Pyx_PyThreadState_declare
                          __Pyx_PyThreadState_assign
                          __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0;
                          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
                          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
                           __Pyx_ExceptionSwap(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20);
                          if ( unlikely(__Pyx_GetException(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17) < 0)) __Pyx_ErrFetch(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17);
                          __Pyx_XGOTREF(__pyx_t_15);
                          __Pyx_XGOTREF(__pyx_t_16);
                          __Pyx_XGOTREF(__pyx_t_17);
                          __Pyx_XGOTREF(__pyx_t_18);
                          __Pyx_XGOTREF(__pyx_t_19);
                          __Pyx_XGOTREF(__pyx_t_20);
                          __pyx_t_12 = __pyx_lineno; __pyx_t_13 = __pyx_clineno; __pyx_t_14 = __pyx_filename;
                          {

                            /* "pyarrow/io.pxi":794
 *                 stream.write(pybuf)
 *         finally:
 *             free(buf)             # <<<<<<<<<<<<<<
 *             cleanup()
 * 
*/
                            free(__pyx_v_buf);

                            /* "pyarrow/io.pxi":795
 *         finally:
 *             free(buf)
 *             cleanup()             # <<<<<<<<<<<<<<
 * 
 *     def upload(self, stream, buffer_size=None):
*/
                            __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_v_cleanup); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 795, __pyx_L19_error)
                            __Pyx_GOTREF(__pyx_t_2);
                            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                          }
                          __Pyx_XGIVEREF(__pyx_t_18);
                          __Pyx_XGIVEREF(__pyx_t_19);
                          __Pyx_XGIVEREF(__pyx_t_20);
                          __Pyx_ExceptionReset(__pyx_t_18, __pyx_t_19, __pyx_t_20);
                          __Pyx_XGIVEREF(__pyx_t_15);
                          __Pyx_XGIVEREF(__pyx_t_16);
                          __Pyx_XGIVEREF(__pyx_t_17);
                          __Pyx_ErrRestore(__pyx_t_15, __pyx_t_16, __pyx_t_17);
                          __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0;
                          __pyx_lineno = __pyx_t_12; __pyx_clineno = __pyx_t_13; __pyx_filename = __pyx_t_14;
                          goto __pyx_L1_error;
                          __pyx_L19_error:;
                          __Pyx_XGIVEREF(__pyx_t_18);
                          __Pyx_XGIVEREF(__pyx_t_19);
                          __Pyx_XGIVEREF(__pyx_t_20);
                          __Pyx_ExceptionReset(__pyx_t_18, __pyx_t_19, __pyx_t_20);
                          __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
                          __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
                          __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
                          __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0;
                          goto __pyx_L1_error;
                        }
                        __pyx_L9:;
                      }

                      /* "pyarrow/io.pxi":741
 *             raise exc_info[0], exc_info[1], exc_info[2]
 * 
 *     def _download_nothreads(self, stream_or_path, buffer_size=None):             # <<<<<<<<<<<<<<
 *         """
 *         Internal method to do a download without separate threads, queues etc.
*/

                      /* 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_4);
                      __Pyx_XDECREF(__pyx_t_7);
                      __Pyx_XDECREF(__pyx_t_9);
                      __Pyx_AddTraceback("pyarrow.lib.NativeFile._download_nothreads", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XDECREF(__pyx_v_cleanup);
                      __Pyx_XDECREF(__pyx_v_pybuf);
                      __Pyx_XDECREF(__pyx_v_buffer_size);
                      __Pyx_DECREF((PyObject *)__pyx_cur_scope);
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":797
 *             cleanup()
 * 
 *     def upload(self, stream, buffer_size=None):             # <<<<<<<<<<<<<<
 *         """
 *         Write from a source stream to this file.
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_10NativeFile_73upload(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_10NativeFile_72upload, "NativeFile.upload(self, stream, buffer_size=None)\n\nWrite from a source stream to this file.\n\nParameters\n----------\nstream : file-like object\n    Source stream to pipe to this file.\nbuffer_size : int, optional\n    The buffer size to use for data transfers.");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_10NativeFile_73upload = {"upload", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10NativeFile_73upload, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10NativeFile_72upload};
                    static PyObject *__pyx_pw_7pyarrow_3lib_10NativeFile_73upload(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      PyObject *__pyx_v_stream = 0;
                      PyObject *__pyx_v_buffer_size = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[2] = {0,0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("upload (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_stream,&__pyx_mstate_global->__pyx_n_u_buffer_size,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(6, 797, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  2:
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(6, 797, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 797, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "upload", 0) < (0)) __PYX_ERR(6, 797, __pyx_L3_error)
                          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("upload", 0, 1, 2, i); __PYX_ERR(6, 797, __pyx_L3_error) }
                          }
                        } else {
                          switch (__pyx_nargs) {
                            case  2:
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(6, 797, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 797, __pyx_L3_error)
                            break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
                        }
                        __pyx_v_stream = values[0];
                        __pyx_v_buffer_size = values[1];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("upload", 0, 1, 2, __pyx_nargs); __PYX_ERR(6, 797, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.NativeFile.upload", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_10NativeFile_72upload(((struct __pyx_obj_7pyarrow_3lib_NativeFile *)__pyx_v_self), __pyx_v_stream, __pyx_v_buffer_size);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":819
 *         exc_info = None
 * 
 *         def bg_write():             # <<<<<<<<<<<<<<
 *             try:
 *                 while not done or write_queue.qsize() > 0:
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_10NativeFile_6upload_1bg_write(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_10NativeFile_6upload_1bg_write = {"bg_write", (PyCFunction)__pyx_pw_7pyarrow_3lib_10NativeFile_6upload_1bg_write, METH_NOARGS, 0};
                    static PyObject *__pyx_pw_7pyarrow_3lib_10NativeFile_6upload_1bg_write(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("bg_write (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_10NativeFile_6upload_bg_write(__pyx_self);

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_10NativeFile_6upload_bg_write(PyObject *__pyx_self) {
                      struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_23_upload *__pyx_cur_scope;
                      struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_23_upload *__pyx_outer_scope;
                      PyObject *__pyx_v_buf = NULL;
                      CYTHON_UNUSED PyObject *__pyx_v_e = NULL;
                      CYTHON_UNUSED PyObject *__pyx_v_exc_info = NULL;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      PyObject *__pyx_t_3 = NULL;
                      int __pyx_t_4;
                      int __pyx_t_5;
                      PyObject *__pyx_t_6 = NULL;
                      PyObject *__pyx_t_7 = NULL;
                      size_t __pyx_t_8;
                      PyObject *__pyx_t_9 = NULL;
                      PyObject *__pyx_t_10 = NULL;
                      PyObject *__pyx_t_11 = NULL;
                      PyObject *__pyx_t_12 = NULL;
                      PyObject *__pyx_t_13 = NULL;
                      int __pyx_t_14;
                      PyObject *__pyx_t_15 = NULL;
                      PyObject *__pyx_t_16 = NULL;
                      PyObject *__pyx_t_17 = NULL;
                      int __pyx_t_18;
                      char const *__pyx_t_19;
                      PyObject *__pyx_t_20 = NULL;
                      PyObject *__pyx_t_21 = NULL;
                      PyObject *__pyx_t_22 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("bg_write", 0);
                      __pyx_outer_scope = (struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_23_upload *) __Pyx_CyFunction_GetClosure(__pyx_self);
                      __pyx_cur_scope = __pyx_outer_scope;

                      /* "pyarrow/io.pxi":820
 * 
 *         def bg_write():
 *             try:             # <<<<<<<<<<<<<<
 *                 while not done or write_queue.qsize() > 0:
 *                     try:
*/
                      {
                        __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:*/ {

                          /* "pyarrow/io.pxi":821
 *         def bg_write():
 *             try:
 *                 while not done or write_queue.qsize() > 0:             # <<<<<<<<<<<<<<
 *                     try:
 *                         buf = write_queue.get(timeout=0.01)
*/
                          while (1) {
                            __pyx_t_5 = (!__pyx_cur_scope->__pyx_v_done);
                            if (!__pyx_t_5) {
                            } else {
                              __pyx_t_4 = __pyx_t_5;
                              goto __pyx_L11_bool_binop_done;
                            }
                            if (unlikely(!__pyx_cur_scope->__pyx_v_write_queue)) { __Pyx_RaiseClosureNameError("write_queue"); __PYX_ERR(6, 821, __pyx_L3_error) }
                            __pyx_t_7 = __pyx_cur_scope->__pyx_v_write_queue;
                            __Pyx_INCREF(__pyx_t_7);
                            __pyx_t_8 = 0;
                            {
                              PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL};
                              __pyx_t_6 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_qsize, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
                              if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 821, __pyx_L3_error)
                              __Pyx_GOTREF(__pyx_t_6);
                            }
                            __pyx_t_7 = PyObject_RichCompare(__pyx_t_6, __pyx_mstate_global->__pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(6, 821, __pyx_L3_error)
                            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                            __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(6, 821, __pyx_L3_error)
                            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
                            __pyx_t_4 = __pyx_t_5;
                            __pyx_L11_bool_binop_done:;
                            if (!__pyx_t_4) break;

                            /* "pyarrow/io.pxi":822
 *             try:
 *                 while not done or write_queue.qsize() > 0:
 *                     try:             # <<<<<<<<<<<<<<
 *                         buf = write_queue.get(timeout=0.01)
 *                     except QueueEmpty:
*/
                            {
                              __Pyx_PyThreadState_declare
                              __Pyx_PyThreadState_assign
                              __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
                              __Pyx_XGOTREF(__pyx_t_9);
                              __Pyx_XGOTREF(__pyx_t_10);
                              __Pyx_XGOTREF(__pyx_t_11);
                              /*try:*/ {

                                /* "pyarrow/io.pxi":823
 *                 while not done or write_queue.qsize() > 0:
 *                     try:
 *                         buf = write_queue.get(timeout=0.01)             # <<<<<<<<<<<<<<
 *                     except QueueEmpty:
 *                         continue
*/
                                if (unlikely(!__pyx_cur_scope->__pyx_v_write_queue)) { __Pyx_RaiseClosureNameError("write_queue"); __PYX_ERR(6, 823, __pyx_L13_error) }
                                __pyx_t_6 = __pyx_cur_scope->__pyx_v_write_queue;
                                __Pyx_INCREF(__pyx_t_6);
                                __pyx_t_8 = 0;
                                {
                                  PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_6, NULL};
                                  __pyx_t_12 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 823, __pyx_L13_error)
                                  __Pyx_GOTREF(__pyx_t_12);
                                  if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_timeout, __pyx_mstate_global->__pyx_float_0_01, __pyx_t_12, __pyx_callargs+1, 0) < (0)) __PYX_ERR(6, 823, __pyx_L13_error)
                                  __pyx_t_7 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_get, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_12);
                                  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
                                  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                                  if (unlikely(!__pyx_t_7)) __PYX_ERR(6, 823, __pyx_L13_error)
                                  __Pyx_GOTREF(__pyx_t_7);
                                }
                                __Pyx_XDECREF_SET(__pyx_v_buf, __pyx_t_7);
                                __pyx_t_7 = 0;

                                /* "pyarrow/io.pxi":822
 *             try:
 *                 while not done or write_queue.qsize() > 0:
 *                     try:             # <<<<<<<<<<<<<<
 *                         buf = write_queue.get(timeout=0.01)
 *                     except QueueEmpty:
*/
                              }
                              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
                              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                              __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
                              goto __pyx_L20_try_end;
                              __pyx_L13_error:;
                              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                              __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
                              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;

                              /* "pyarrow/io.pxi":824
 *                     try:
 *                         buf = write_queue.get(timeout=0.01)
 *                     except QueueEmpty:             # <<<<<<<<<<<<<<
 *                         continue
 * 
*/
                              __Pyx_ErrFetch(&__pyx_t_7, &__pyx_t_12, &__pyx_t_6);
                              __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_QueueEmpty); if (unlikely(!__pyx_t_13)) __PYX_ERR(6, 824, __pyx_L15_except_error)
                              __Pyx_GOTREF(__pyx_t_13);
                              __pyx_t_14 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_7, __pyx_t_13);
                              __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
                              __Pyx_ErrRestore(__pyx_t_7, __pyx_t_12, __pyx_t_6);
                              __pyx_t_7 = 0; __pyx_t_12 = 0; __pyx_t_6 = 0;
                              if (__pyx_t_14) {
                                __Pyx_AddTraceback("pyarrow.lib.NativeFile.upload.bg_write", __pyx_clineno, __pyx_lineno, __pyx_filename);
                                if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_12, &__pyx_t_7) < 0) __PYX_ERR(6, 824, __pyx_L15_except_error)
                                __Pyx_XGOTREF(__pyx_t_6);
                                __Pyx_XGOTREF(__pyx_t_12);
                                __Pyx_XGOTREF(__pyx_t_7);

                                /* "pyarrow/io.pxi":825
 *                         buf = write_queue.get(timeout=0.01)
 *                     except QueueEmpty:
 *                         continue             # <<<<<<<<<<<<<<
 * 
 *                     self.write(buf)
*/
                                goto __pyx_L21_except_continue;
                                __pyx_L21_except_continue:;
                                __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                                __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
                                goto __pyx_L19_try_continue;
                              }
                              goto __pyx_L15_except_error;

                              /* "pyarrow/io.pxi":822
 *             try:
 *                 while not done or write_queue.qsize() > 0:
 *                     try:             # <<<<<<<<<<<<<<
 *                         buf = write_queue.get(timeout=0.01)
 *                     except QueueEmpty:
*/
                              __pyx_L15_except_error:;
                              __Pyx_XGIVEREF(__pyx_t_9);
                              __Pyx_XGIVEREF(__pyx_t_10);
                              __Pyx_XGIVEREF(__pyx_t_11);
                              __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11);
                              goto __pyx_L3_error;
                              __pyx_L19_try_continue:;
                              __Pyx_XGIVEREF(__pyx_t_9);
                              __Pyx_XGIVEREF(__pyx_t_10);
                              __Pyx_XGIVEREF(__pyx_t_11);
                              __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11);
                              goto __pyx_L9_continue;
                              __pyx_L20_try_end:;
                            }

                            /* "pyarrow/io.pxi":827
 *                         continue
 * 
 *                     self.write(buf)             # <<<<<<<<<<<<<<
 * 
 *             except Exception as e:
*/
                            if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(6, 827, __pyx_L3_error) }
                            __pyx_t_12 = ((PyObject *)__pyx_cur_scope->__pyx_v_self);
                            __Pyx_INCREF(__pyx_t_12);
                            __pyx_t_8 = 0;
                            {
                              PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_v_buf};
                              __pyx_t_7 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_write, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                              if (unlikely(!__pyx_t_7)) __PYX_ERR(6, 827, __pyx_L3_error)
                              __Pyx_GOTREF(__pyx_t_7);
                            }
                            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
                            __pyx_L9_continue:;
                          }

                          /* "pyarrow/io.pxi":820
 * 
 *         def bg_write():
 *             try:             # <<<<<<<<<<<<<<
 *                 while not done or write_queue.qsize() > 0:
 *                     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_12); __pyx_t_12 = 0;
                        __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
                        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
                        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;

                        /* "pyarrow/io.pxi":829
 *                     self.write(buf)
 * 
 *             except Exception as e:             # <<<<<<<<<<<<<<
 *                 exc_info = sys.exc_info()
 * 
*/
                        __pyx_t_14 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
                        if (__pyx_t_14) {
                          __Pyx_AddTraceback("pyarrow.lib.NativeFile.upload.bg_write", __pyx_clineno, __pyx_lineno, __pyx_filename);
                          if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_12, &__pyx_t_6) < 0) __PYX_ERR(6, 829, __pyx_L5_except_error)
                          __Pyx_XGOTREF(__pyx_t_7);
                          __Pyx_XGOTREF(__pyx_t_12);
                          __Pyx_XGOTREF(__pyx_t_6);
                          __Pyx_INCREF(__pyx_t_12);
                          __pyx_v_e = __pyx_t_12;
                          /*try:*/ {

                            /* "pyarrow/io.pxi":830
 * 
 *             except Exception as e:
 *                 exc_info = sys.exc_info()             # <<<<<<<<<<<<<<
 * 
 *         writer_thread = threading.Thread(target=bg_write)
*/
                            __pyx_t_15 = NULL;
                            __Pyx_GetModuleGlobalName(__pyx_t_16, __pyx_mstate_global->__pyx_n_u_sys); if (unlikely(!__pyx_t_16)) __PYX_ERR(6, 830, __pyx_L28_error)
                            __Pyx_GOTREF(__pyx_t_16);
                            __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_t_16, __pyx_mstate_global->__pyx_n_u_exc_info); if (unlikely(!__pyx_t_17)) __PYX_ERR(6, 830, __pyx_L28_error)
                            __Pyx_GOTREF(__pyx_t_17);
                            __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
                            __pyx_t_8 = 1;
                            #if CYTHON_UNPACK_METHODS
                            if (unlikely(PyMethod_Check(__pyx_t_17))) {
                              __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_17);
                              assert(__pyx_t_15);
                              PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_17);
                              __Pyx_INCREF(__pyx_t_15);
                              __Pyx_INCREF(__pyx__function);
                              __Pyx_DECREF_SET(__pyx_t_17, __pyx__function);
                              __pyx_t_8 = 0;
                            }
                            #endif
                            {
                              PyObject *__pyx_callargs[2] = {__pyx_t_15, NULL};
                              __pyx_t_13 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_17, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                              __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
                              __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
                              if (unlikely(!__pyx_t_13)) __PYX_ERR(6, 830, __pyx_L28_error)
                              __Pyx_GOTREF(__pyx_t_13);
                            }
                            __pyx_v_exc_info = __pyx_t_13;
                            __pyx_t_13 = 0;
                          }

                          /* "pyarrow/io.pxi":829
 *                     self.write(buf)
 * 
 *             except Exception as e:             # <<<<<<<<<<<<<<
 *                 exc_info = sys.exc_info()
 * 
*/
                          /*finally:*/ {
                            /*normal exit:*/{
                              __Pyx_DECREF(__pyx_v_e); __pyx_v_e = 0;
                              goto __pyx_L29;
                            }
                            __pyx_L28_error:;
                            /*exception exit:*/{
                              __Pyx_PyThreadState_declare
                              __Pyx_PyThreadState_assign
                              __pyx_t_11 = 0; __pyx_t_10 = 0; __pyx_t_9 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0;
                              __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
                              __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
                              __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
                              __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
                               __Pyx_ExceptionSwap(&__pyx_t_20, &__pyx_t_21, &__pyx_t_22);
                              if ( unlikely(__Pyx_GetException(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9) < 0)) __Pyx_ErrFetch(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9);
                              __Pyx_XGOTREF(__pyx_t_11);
                              __Pyx_XGOTREF(__pyx_t_10);
                              __Pyx_XGOTREF(__pyx_t_9);
                              __Pyx_XGOTREF(__pyx_t_20);
                              __Pyx_XGOTREF(__pyx_t_21);
                              __Pyx_XGOTREF(__pyx_t_22);
                              __pyx_t_14 = __pyx_lineno; __pyx_t_18 = __pyx_clineno; __pyx_t_19 = __pyx_filename;
                              {
                                __Pyx_DECREF(__pyx_v_e); __pyx_v_e = 0;
                              }
                              __Pyx_XGIVEREF(__pyx_t_20);
                              __Pyx_XGIVEREF(__pyx_t_21);
                              __Pyx_XGIVEREF(__pyx_t_22);
                              __Pyx_ExceptionReset(__pyx_t_20, __pyx_t_21, __pyx_t_22);
                              __Pyx_XGIVEREF(__pyx_t_11);
                              __Pyx_XGIVEREF(__pyx_t_10);
                              __Pyx_XGIVEREF(__pyx_t_9);
                              __Pyx_ErrRestore(__pyx_t_11, __pyx_t_10, __pyx_t_9);
                              __pyx_t_11 = 0; __pyx_t_10 = 0; __pyx_t_9 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0;
                              __pyx_lineno = __pyx_t_14; __pyx_clineno = __pyx_t_18; __pyx_filename = __pyx_t_19;
                              goto __pyx_L5_except_error;
                            }
                            __pyx_L29:;
                          }
                          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
                          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
                          goto __pyx_L4_exception_handled;
                        }
                        goto __pyx_L5_except_error;

                        /* "pyarrow/io.pxi":820
 * 
 *         def bg_write():
 *             try:             # <<<<<<<<<<<<<<
 *                 while not done or write_queue.qsize() > 0:
 *                     try:
*/
                        __pyx_L5_except_error:;
                        __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:;
                      }

                      /* "pyarrow/io.pxi":819
 *         exc_info = None
 * 
 *         def bg_write():             # <<<<<<<<<<<<<<
 *             try:
 *                 while not done or write_queue.qsize() > 0:
*/

                      /* function exit code */
                      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_6);
                      __Pyx_XDECREF(__pyx_t_7);
                      __Pyx_XDECREF(__pyx_t_12);
                      __Pyx_XDECREF(__pyx_t_13);
                      __Pyx_XDECREF(__pyx_t_15);
                      __Pyx_XDECREF(__pyx_t_16);
                      __Pyx_XDECREF(__pyx_t_17);
                      __Pyx_AddTraceback("pyarrow.lib.NativeFile.upload.bg_write", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XDECREF(__pyx_v_buf);
                      __Pyx_XDECREF(__pyx_v_e);
                      __Pyx_XDECREF(__pyx_v_exc_info);
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":797
 *             cleanup()
 * 
 *     def upload(self, stream, buffer_size=None):             # <<<<<<<<<<<<<<
 *         """
 *         Write from a source stream to this file.
*/

                    static PyObject *__pyx_pf_7pyarrow_3lib_10NativeFile_72upload(struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_self, PyObject *__pyx_v_stream, PyObject *__pyx_v_buffer_size) {
                      struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_23_upload *__pyx_cur_scope;
                      PyObject *__pyx_v_exc_info = NULL;
                      PyObject *__pyx_v_bg_write = 0;
                      PyObject *__pyx_v_writer_thread = NULL;
                      PyObject *__pyx_v_buf = NULL;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      PyObject *__pyx_t_3 = NULL;
                      size_t __pyx_t_4;
                      int __pyx_t_5;
                      int __pyx_t_6;
                      PyObject *__pyx_t_7 = NULL;
                      int __pyx_t_8;
                      int __pyx_t_9;
                      char const *__pyx_t_10;
                      PyObject *__pyx_t_11 = NULL;
                      PyObject *__pyx_t_12 = NULL;
                      PyObject *__pyx_t_13 = NULL;
                      PyObject *__pyx_t_14 = NULL;
                      PyObject *__pyx_t_15 = NULL;
                      PyObject *__pyx_t_16 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("upload", 0);
                      __pyx_cur_scope = (struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_23_upload *)__pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_23_upload(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_23_upload, __pyx_mstate_global->__pyx_empty_tuple, NULL);
                      if (unlikely(!__pyx_cur_scope)) {
                        __pyx_cur_scope = ((struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_23_upload *)Py_None);
                        __Pyx_INCREF(Py_None);
                        __PYX_ERR(6, 797, __pyx_L1_error)
                      } else {
                        __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
                      }
                      __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
                      __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
                      __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
                      __Pyx_INCREF(__pyx_v_buffer_size);

                      /* "pyarrow/io.pxi":808
 *             The buffer size to use for data transfers.
 *         """
 *         if not is_threading_enabled():             # <<<<<<<<<<<<<<
 *             return self._upload_nothreads(stream, buffer_size)
 * 
*/
                      __pyx_t_2 = NULL;
                      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_is_threading_enabled); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 808, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_3);
                      __pyx_t_4 = 1;
                      #if CYTHON_UNPACK_METHODS
                      if (unlikely(PyMethod_Check(__pyx_t_3))) {
                        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
                        assert(__pyx_t_2);
                        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
                        __Pyx_INCREF(__pyx_t_2);
                        __Pyx_INCREF(__pyx__function);
                        __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
                        __pyx_t_4 = 0;
                      }
                      #endif
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
                        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 808, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(6, 808, __pyx_L1_error)
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      __pyx_t_6 = (!__pyx_t_5);
                      if (__pyx_t_6) {

                        /* "pyarrow/io.pxi":809
 *         """
 *         if not is_threading_enabled():
 *             return self._upload_nothreads(stream, buffer_size)             # <<<<<<<<<<<<<<
 * 
 *         write_queue = Queue(50)
*/
                        __Pyx_XDECREF(__pyx_r);
                        __pyx_t_3 = ((PyObject *)__pyx_cur_scope->__pyx_v_self);
                        __Pyx_INCREF(__pyx_t_3);
                        __pyx_t_4 = 0;
                        {
                          PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_stream, __pyx_v_buffer_size};
                          __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_upload_nothreads, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                          if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 809, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_1);
                        }
                        __pyx_r = __pyx_t_1;
                        __pyx_t_1 = 0;
                        goto __pyx_L0;

                        /* "pyarrow/io.pxi":808
 *             The buffer size to use for data transfers.
 *         """
 *         if not is_threading_enabled():             # <<<<<<<<<<<<<<
 *             return self._upload_nothreads(stream, buffer_size)
 * 
*/
                      }

                      /* "pyarrow/io.pxi":811
 *             return self._upload_nothreads(stream, buffer_size)
 * 
 *         write_queue = Queue(50)             # <<<<<<<<<<<<<<
 *         self._assert_writable()
 * 
*/
                      __pyx_t_3 = NULL;
                      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Queue); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 811, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_2);
                      __pyx_t_4 = 1;
                      #if CYTHON_UNPACK_METHODS
                      if (unlikely(PyMethod_Check(__pyx_t_2))) {
                        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
                        assert(__pyx_t_3);
                        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
                        __Pyx_INCREF(__pyx_t_3);
                        __Pyx_INCREF(__pyx__function);
                        __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
                        __pyx_t_4 = 0;
                      }
                      #endif
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_int_50};
                        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 811, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __Pyx_GIVEREF(__pyx_t_1);
                      __pyx_cur_scope->__pyx_v_write_queue = __pyx_t_1;
                      __pyx_t_1 = 0;

                      /* "pyarrow/io.pxi":812
 * 
 *         write_queue = Queue(50)
 *         self._assert_writable()             # <<<<<<<<<<<<<<
 * 
 *         buffer_size = buffer_size or DEFAULT_BUFFER_SIZE
*/
                      __pyx_t_2 = ((PyObject *)__pyx_cur_scope->__pyx_v_self);
                      __Pyx_INCREF(__pyx_t_2);
                      __pyx_t_4 = 0;
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
                        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_assert_writable, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 812, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

                      /* "pyarrow/io.pxi":814
 *         self._assert_writable()
 * 
 *         buffer_size = buffer_size or DEFAULT_BUFFER_SIZE             # <<<<<<<<<<<<<<
 * 
 *         done = False
*/
                      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_buffer_size); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(6, 814, __pyx_L1_error)
                      if (!__pyx_t_6) {
                      } else {
                        __Pyx_INCREF(__pyx_v_buffer_size);
                        __pyx_t_1 = __pyx_v_buffer_size;
                        goto __pyx_L4_bool_binop_done;
                      }
                      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_DEFAULT_BUFFER_SIZE); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 814, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_2);
                      __Pyx_INCREF(__pyx_t_2);
                      __pyx_t_1 = __pyx_t_2;
                      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                      __pyx_L4_bool_binop_done:;
                      __Pyx_DECREF_SET(__pyx_v_buffer_size, __pyx_t_1);
                      __pyx_t_1 = 0;

                      /* "pyarrow/io.pxi":816
 *         buffer_size = buffer_size or DEFAULT_BUFFER_SIZE
 * 
 *         done = False             # <<<<<<<<<<<<<<
 *         exc_info = None
 * 
*/
                      __pyx_cur_scope->__pyx_v_done = 0;

                      /* "pyarrow/io.pxi":817
 * 
 *         done = False
 *         exc_info = None             # <<<<<<<<<<<<<<
 * 
 *         def bg_write():
*/
                      __Pyx_INCREF(Py_None);
                      __pyx_v_exc_info = Py_None;

                      /* "pyarrow/io.pxi":819
 *         exc_info = None
 * 
 *         def bg_write():             # <<<<<<<<<<<<<<
 *             try:
 *                 while not done or write_queue.qsize() > 0:
*/
                      __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_10NativeFile_6upload_1bg_write, 0, __pyx_mstate_global->__pyx_n_u_upload_locals_bg_write, ((PyObject*)__pyx_cur_scope), __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[25])); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 819, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_v_bg_write = __pyx_t_1;
                      __pyx_t_1 = 0;

                      /* "pyarrow/io.pxi":832
 *                 exc_info = sys.exc_info()
 * 
 *         writer_thread = threading.Thread(target=bg_write)             # <<<<<<<<<<<<<<
 *         writer_thread.start()
 * 
*/
                      __pyx_t_2 = NULL;
                      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_threading); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 832, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_3);
                      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Thread); if (unlikely(!__pyx_t_7)) __PYX_ERR(6, 832, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_7);
                      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                      __pyx_t_4 = 1;
                      #if CYTHON_UNPACK_METHODS
                      if (unlikely(PyMethod_Check(__pyx_t_7))) {
                        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_7);
                        assert(__pyx_t_2);
                        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
                        __Pyx_INCREF(__pyx_t_2);
                        __Pyx_INCREF(__pyx__function);
                        __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
                        __pyx_t_4 = 0;
                      }
                      #endif
                      {
                        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, NULL};
                        __pyx_t_3 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 832, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_3);
                        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_target, __pyx_v_bg_write, __pyx_t_3, __pyx_callargs+1, 0) < (0)) __PYX_ERR(6, 832, __pyx_L1_error)
                        __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_3);
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 832, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __pyx_v_writer_thread = __pyx_t_1;
                      __pyx_t_1 = 0;

                      /* "pyarrow/io.pxi":833
 * 
 *         writer_thread = threading.Thread(target=bg_write)
 *         writer_thread.start()             # <<<<<<<<<<<<<<
 * 
 *         try:
*/
                      __pyx_t_7 = __pyx_v_writer_thread;
                      __Pyx_INCREF(__pyx_t_7);
                      __pyx_t_4 = 0;
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL};
                        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_start, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 833, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

                      /* "pyarrow/io.pxi":835
 *         writer_thread.start()
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             while True:
 *                 buf = stream.read(buffer_size)
*/
                      /*try:*/ {

                        /* "pyarrow/io.pxi":836
 * 
 *         try:
 *             while True:             # <<<<<<<<<<<<<<
 *                 buf = stream.read(buffer_size)
 *                 if not buf:
*/
                        while (1) {

                          /* "pyarrow/io.pxi":837
 *         try:
 *             while True:
 *                 buf = stream.read(buffer_size)             # <<<<<<<<<<<<<<
 *                 if not buf:
 *                     break
*/
                          __pyx_t_7 = __pyx_v_stream;
                          __Pyx_INCREF(__pyx_t_7);
                          __pyx_t_4 = 0;
                          {
                            PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_buffer_size};
                            __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_read, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
                            if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 837, __pyx_L7_error)
                            __Pyx_GOTREF(__pyx_t_1);
                          }
                          __Pyx_XDECREF_SET(__pyx_v_buf, __pyx_t_1);
                          __pyx_t_1 = 0;

                          /* "pyarrow/io.pxi":838
 *             while True:
 *                 buf = stream.read(buffer_size)
 *                 if not buf:             # <<<<<<<<<<<<<<
 *                     break
 * 
*/
                          __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_buf); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(6, 838, __pyx_L7_error)
                          __pyx_t_5 = (!__pyx_t_6);
                          if (__pyx_t_5) {

                            /* "pyarrow/io.pxi":839
 *                 buf = stream.read(buffer_size)
 *                 if not buf:
 *                     break             # <<<<<<<<<<<<<<
 * 
 *                 if writer_thread.is_alive():
*/
                            goto __pyx_L10_break;

                            /* "pyarrow/io.pxi":838
 *             while True:
 *                 buf = stream.read(buffer_size)
 *                 if not buf:             # <<<<<<<<<<<<<<
 *                     break
 * 
*/
                          }

                          /* "pyarrow/io.pxi":841
 *                     break
 * 
 *                 if writer_thread.is_alive():             # <<<<<<<<<<<<<<
 *                     while write_queue.full():
 *                         time.sleep(0.01)
*/
                          __pyx_t_7 = __pyx_v_writer_thread;
                          __Pyx_INCREF(__pyx_t_7);
                          __pyx_t_4 = 0;
                          {
                            PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL};
                            __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_is_alive, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
                            if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 841, __pyx_L7_error)
                            __Pyx_GOTREF(__pyx_t_1);
                          }
                          __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(6, 841, __pyx_L7_error)
                          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                          if (__pyx_t_5) {

                            /* "pyarrow/io.pxi":842
 * 
 *                 if writer_thread.is_alive():
 *                     while write_queue.full():             # <<<<<<<<<<<<<<
 *                         time.sleep(0.01)
 *                 else:
*/
                            while (1) {
                              __pyx_t_7 = __pyx_cur_scope->__pyx_v_write_queue;
                              __Pyx_INCREF(__pyx_t_7);
                              __pyx_t_4 = 0;
                              {
                                PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL};
                                __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_full, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                                __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
                                if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 842, __pyx_L7_error)
                                __Pyx_GOTREF(__pyx_t_1);
                              }
                              __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(6, 842, __pyx_L7_error)
                              __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                              if (!__pyx_t_5) break;

                              /* "pyarrow/io.pxi":843
 *                 if writer_thread.is_alive():
 *                     while write_queue.full():
 *                         time.sleep(0.01)             # <<<<<<<<<<<<<<
 *                 else:
 *                     break
*/
                              __pyx_t_7 = NULL;
                              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_time); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 843, __pyx_L7_error)
                              __Pyx_GOTREF(__pyx_t_3);
                              __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sleep); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 843, __pyx_L7_error)
                              __Pyx_GOTREF(__pyx_t_2);
                              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                              __pyx_t_4 = 1;
                              #if CYTHON_UNPACK_METHODS
                              if (unlikely(PyMethod_Check(__pyx_t_2))) {
                                __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
                                assert(__pyx_t_7);
                                PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
                                __Pyx_INCREF(__pyx_t_7);
                                __Pyx_INCREF(__pyx__function);
                                __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
                                __pyx_t_4 = 0;
                              }
                              #endif
                              {
                                PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_mstate_global->__pyx_float_0_01};
                                __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                                __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
                                __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                                if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 843, __pyx_L7_error)
                                __Pyx_GOTREF(__pyx_t_1);
                              }
                              __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                            }

                            /* "pyarrow/io.pxi":841
 *                     break
 * 
 *                 if writer_thread.is_alive():             # <<<<<<<<<<<<<<
 *                     while write_queue.full():
 *                         time.sleep(0.01)
*/
                            goto __pyx_L12;
                          }

                          /* "pyarrow/io.pxi":845
 *                         time.sleep(0.01)
 *                 else:
 *                     break             # <<<<<<<<<<<<<<
 * 
 *                 write_queue.put_nowait(buf)
*/
                          /*else*/ {
                            goto __pyx_L10_break;
                          }
                          __pyx_L12:;

                          /* "pyarrow/io.pxi":847
 *                     break
 * 
 *                 write_queue.put_nowait(buf)             # <<<<<<<<<<<<<<
 *         finally:
 *             done = True
*/
                          __pyx_t_2 = __pyx_cur_scope->__pyx_v_write_queue;
                          __Pyx_INCREF(__pyx_t_2);
                          __pyx_t_4 = 0;
                          {
                            PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_buf};
                            __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_put_nowait, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                            if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 847, __pyx_L7_error)
                            __Pyx_GOTREF(__pyx_t_1);
                          }
                          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                        }
                        __pyx_L10_break:;
                      }

                      /* "pyarrow/io.pxi":849
 *                 write_queue.put_nowait(buf)
 *         finally:
 *             done = True             # <<<<<<<<<<<<<<
 * 
 *         writer_thread.join()
*/
                      /*finally:*/ {
                        /*normal exit:*/{
                          __pyx_cur_scope->__pyx_v_done = 1;
                          goto __pyx_L8;
                        }
                        __pyx_L7_error:;
                        /*exception exit:*/{
                          __Pyx_PyThreadState_declare
                          __Pyx_PyThreadState_assign
                          __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0;
                          __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_7); __pyx_t_7 = 0;
                           __Pyx_ExceptionSwap(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16);
                          if ( unlikely(__Pyx_GetException(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13) < 0)) __Pyx_ErrFetch(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
                          __Pyx_XGOTREF(__pyx_t_11);
                          __Pyx_XGOTREF(__pyx_t_12);
                          __Pyx_XGOTREF(__pyx_t_13);
                          __Pyx_XGOTREF(__pyx_t_14);
                          __Pyx_XGOTREF(__pyx_t_15);
                          __Pyx_XGOTREF(__pyx_t_16);
                          __pyx_t_8 = __pyx_lineno; __pyx_t_9 = __pyx_clineno; __pyx_t_10 = __pyx_filename;
                          {
                            __pyx_cur_scope->__pyx_v_done = 1;
                          }
                          __Pyx_XGIVEREF(__pyx_t_14);
                          __Pyx_XGIVEREF(__pyx_t_15);
                          __Pyx_XGIVEREF(__pyx_t_16);
                          __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_15, __pyx_t_16);
                          __Pyx_XGIVEREF(__pyx_t_11);
                          __Pyx_XGIVEREF(__pyx_t_12);
                          __Pyx_XGIVEREF(__pyx_t_13);
                          __Pyx_ErrRestore(__pyx_t_11, __pyx_t_12, __pyx_t_13);
                          __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0;
                          __pyx_lineno = __pyx_t_8; __pyx_clineno = __pyx_t_9; __pyx_filename = __pyx_t_10;
                          goto __pyx_L1_error;
                        }
                        __pyx_L8:;
                      }

                      /* "pyarrow/io.pxi":851
 *             done = True
 * 
 *         writer_thread.join()             # <<<<<<<<<<<<<<
 *         if exc_info is not None:
 *             raise exc_info[0], exc_info[1], exc_info[2]
*/
                      __pyx_t_2 = __pyx_v_writer_thread;
                      __Pyx_INCREF(__pyx_t_2);
                      __pyx_t_4 = 0;
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
                        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_join, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 851, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

                      /* "pyarrow/io.pxi":852
 * 
 *         writer_thread.join()
 *         if exc_info is not None:             # <<<<<<<<<<<<<<
 *             raise exc_info[0], exc_info[1], exc_info[2]
 * 
*/
                      __pyx_t_5 = (__pyx_v_exc_info != Py_None);
                      if (unlikely(__pyx_t_5)) {

                        /* "pyarrow/io.pxi":853
 *         writer_thread.join()
 *         if exc_info is not None:
 *             raise exc_info[0], exc_info[1], exc_info[2]             # <<<<<<<<<<<<<<
 * 
 *     def _upload_nothreads(self, stream, buffer_size=None):
*/
                        if (unlikely(__pyx_v_exc_info == Py_None)) {
                          PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
                          __PYX_ERR(6, 853, __pyx_L1_error)
                        }
                        __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_exc_info, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 853, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                        if (unlikely(__pyx_v_exc_info == Py_None)) {
                          PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
                          __PYX_ERR(6, 853, __pyx_L1_error)
                        }
                        __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_exc_info, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 853, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_2);
                        if (unlikely(__pyx_v_exc_info == Py_None)) {
                          PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
                          __PYX_ERR(6, 853, __pyx_L1_error)
                        }
                        __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_exc_info, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_7)) __PYX_ERR(6, 853, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_7);
                        __Pyx_Raise(__pyx_t_1, __pyx_t_2, __pyx_t_7, 0);
                        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
                        __PYX_ERR(6, 853, __pyx_L1_error)

                        /* "pyarrow/io.pxi":852
 * 
 *         writer_thread.join()
 *         if exc_info is not None:             # <<<<<<<<<<<<<<
 *             raise exc_info[0], exc_info[1], exc_info[2]
 * 
*/
                      }

                      /* "pyarrow/io.pxi":797
 *             cleanup()
 * 
 *     def upload(self, stream, buffer_size=None):             # <<<<<<<<<<<<<<
 *         """
 *         Write from a source stream to this file.
*/

                      /* function exit code */
                      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_XDECREF(__pyx_t_7);
                      __Pyx_AddTraceback("pyarrow.lib.NativeFile.upload", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XDECREF(__pyx_v_exc_info);
                      __Pyx_XDECREF(__pyx_v_bg_write);
                      __Pyx_XDECREF(__pyx_v_writer_thread);
                      __Pyx_XDECREF(__pyx_v_buf);
                      __Pyx_XDECREF(__pyx_v_buffer_size);
                      __Pyx_DECREF((PyObject *)__pyx_cur_scope);
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":855
 *             raise exc_info[0], exc_info[1], exc_info[2]
 * 
 *     def _upload_nothreads(self, stream, buffer_size=None):             # <<<<<<<<<<<<<<
 *         """
 *         Internal method to do an upload without separate threads, queues etc.
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_10NativeFile_75_upload_nothreads(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_10NativeFile_74_upload_nothreads, "NativeFile._upload_nothreads(self, stream, buffer_size=None)\n\nInternal method to do an upload without separate threads, queues etc.\nCalled by upload above if is_threading_enabled() == False");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_10NativeFile_75_upload_nothreads = {"_upload_nothreads", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10NativeFile_75_upload_nothreads, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10NativeFile_74_upload_nothreads};
                    static PyObject *__pyx_pw_7pyarrow_3lib_10NativeFile_75_upload_nothreads(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      PyObject *__pyx_v_stream = 0;
                      PyObject *__pyx_v_buffer_size = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[2] = {0,0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("_upload_nothreads (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_stream,&__pyx_mstate_global->__pyx_n_u_buffer_size,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(6, 855, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  2:
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(6, 855, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 855, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_upload_nothreads", 0) < (0)) __PYX_ERR(6, 855, __pyx_L3_error)
                          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_upload_nothreads", 0, 1, 2, i); __PYX_ERR(6, 855, __pyx_L3_error) }
                          }
                        } else {
                          switch (__pyx_nargs) {
                            case  2:
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(6, 855, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 855, __pyx_L3_error)
                            break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
                        }
                        __pyx_v_stream = values[0];
                        __pyx_v_buffer_size = values[1];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("_upload_nothreads", 0, 1, 2, __pyx_nargs); __PYX_ERR(6, 855, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.NativeFile._upload_nothreads", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_10NativeFile_74_upload_nothreads(((struct __pyx_obj_7pyarrow_3lib_NativeFile *)__pyx_v_self), __pyx_v_stream, __pyx_v_buffer_size);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_10NativeFile_74_upload_nothreads(struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_self, PyObject *__pyx_v_stream, PyObject *__pyx_v_buffer_size) {
                      PyObject *__pyx_v_buf = NULL;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      size_t __pyx_t_3;
                      int __pyx_t_4;
                      int __pyx_t_5;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("_upload_nothreads", 0);
                      __Pyx_INCREF(__pyx_v_buffer_size);

                      /* "pyarrow/io.pxi":860
 *         Called by upload above if is_threading_enabled() == False
 *         """
 *         self._assert_writable()             # <<<<<<<<<<<<<<
 * 
 *         buffer_size = buffer_size or DEFAULT_BUFFER_SIZE
*/
                      __pyx_t_2 = ((PyObject *)__pyx_v_self);
                      __Pyx_INCREF(__pyx_t_2);
                      __pyx_t_3 = 0;
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
                        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_assert_writable, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 860, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

                      /* "pyarrow/io.pxi":862
 *         self._assert_writable()
 * 
 *         buffer_size = buffer_size or DEFAULT_BUFFER_SIZE             # <<<<<<<<<<<<<<
 * 
 *         while True:
*/
                      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_buffer_size); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(6, 862, __pyx_L1_error)
                      if (!__pyx_t_4) {
                      } else {
                        __Pyx_INCREF(__pyx_v_buffer_size);
                        __pyx_t_1 = __pyx_v_buffer_size;
                        goto __pyx_L3_bool_binop_done;
                      }
                      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_DEFAULT_BUFFER_SIZE); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 862, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_2);
                      __Pyx_INCREF(__pyx_t_2);
                      __pyx_t_1 = __pyx_t_2;
                      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                      __pyx_L3_bool_binop_done:;
                      __Pyx_DECREF_SET(__pyx_v_buffer_size, __pyx_t_1);
                      __pyx_t_1 = 0;

                      /* "pyarrow/io.pxi":864
 *         buffer_size = buffer_size or DEFAULT_BUFFER_SIZE
 * 
 *         while True:             # <<<<<<<<<<<<<<
 *             buf = stream.read(buffer_size)
 *             if not buf:
*/
                      while (1) {

                        /* "pyarrow/io.pxi":865
 * 
 *         while True:
 *             buf = stream.read(buffer_size)             # <<<<<<<<<<<<<<
 *             if not buf:
 *                 break
*/
                        __pyx_t_2 = __pyx_v_stream;
                        __Pyx_INCREF(__pyx_t_2);
                        __pyx_t_3 = 0;
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_buffer_size};
                          __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_read, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                          if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 865, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_1);
                        }
                        __Pyx_XDECREF_SET(__pyx_v_buf, __pyx_t_1);
                        __pyx_t_1 = 0;

                        /* "pyarrow/io.pxi":866
 *         while True:
 *             buf = stream.read(buffer_size)
 *             if not buf:             # <<<<<<<<<<<<<<
 *                 break
 * 
*/
                        __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_buf); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(6, 866, __pyx_L1_error)
                        __pyx_t_5 = (!__pyx_t_4);
                        if (__pyx_t_5) {

                          /* "pyarrow/io.pxi":867
 *             buf = stream.read(buffer_size)
 *             if not buf:
 *                 break             # <<<<<<<<<<<<<<
 * 
 *             # no threading - just write
*/
                          goto __pyx_L6_break;

                          /* "pyarrow/io.pxi":866
 *         while True:
 *             buf = stream.read(buffer_size)
 *             if not buf:             # <<<<<<<<<<<<<<
 *                 break
 * 
*/
                        }

                        /* "pyarrow/io.pxi":870
 * 
 *             # no threading - just write
 *             self.write(buf)             # <<<<<<<<<<<<<<
 * 
 * 
*/
                        __pyx_t_2 = ((PyObject *)__pyx_v_self);
                        __Pyx_INCREF(__pyx_t_2);
                        __pyx_t_3 = 0;
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_buf};
                          __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_write, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                          if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 870, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_1);
                        }
                        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      }
                      __pyx_L6_break:;

                      /* "pyarrow/io.pxi":855
 *             raise exc_info[0], exc_info[1], exc_info[2]
 * 
 *     def _upload_nothreads(self, stream, buffer_size=None):             # <<<<<<<<<<<<<<
 *         """
 *         Internal method to do an upload without separate threads, queues etc.
*/

                      /* function exit code */
                      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_AddTraceback("pyarrow.lib.NativeFile._upload_nothreads", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XDECREF(__pyx_v_buf);
                      __Pyx_XDECREF(__pyx_v_buffer_size);
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_10NativeFile_77__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_10NativeFile_76__reduce_cython__, "NativeFile.__reduce_cython__(self)");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_10NativeFile_77__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10NativeFile_77__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10NativeFile_76__reduce_cython__};
                    static PyObject *__pyx_pw_7pyarrow_3lib_10NativeFile_77__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; }
                      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                      if (unlikely(__pyx_kwds_len < 0)) return NULL;
                      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;}
                      __pyx_r = __pyx_pf_7pyarrow_3lib_10NativeFile_76__reduce_cython__(((struct __pyx_obj_7pyarrow_3lib_NativeFile *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_10NativeFile_76__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__reduce_cython__", 0);

                      /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/
                      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0);
                      __PYX_ERR(7, 2, __pyx_L1_error)

                      /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib.NativeFile.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_10NativeFile_79__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_10NativeFile_78__setstate_cython__, "NativeFile.__setstate_cython__(self, __pyx_state)");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_10NativeFile_79__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10NativeFile_79__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10NativeFile_78__setstate_cython__};
                    static PyObject *__pyx_pw_7pyarrow_3lib_10NativeFile_79__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[1] = {0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(7, 3, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(7, 3, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(7, 3, __pyx_L3_error)
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(7, 3, __pyx_L3_error) }
                          }
                        } else if (unlikely(__pyx_nargs != 1)) {
                          goto __pyx_L5_argtuple_error;
                        } else {
                          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(7, 3, __pyx_L3_error)
                        }
                        __pyx_v___pyx_state = values[0];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(7, 3, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.NativeFile.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_10NativeFile_78__setstate_cython__(((struct __pyx_obj_7pyarrow_3lib_NativeFile *)__pyx_v_self), __pyx_v___pyx_state);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_10NativeFile_78__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__setstate_cython__", 0);

                      /* "(tree fragment)":4
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
*/
                      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0);
                      __PYX_ERR(7, 4, __pyx_L1_error)

                      /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib.NativeFile.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":928
 *         object handle
 * 
 *     def __cinit__(self, handle, mode=None):             # <<<<<<<<<<<<<<
 *         self.handle = handle
 * 
*/

                    /* Python wrapper */
                    static int __pyx_pw_7pyarrow_3lib_10PythonFile_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
                    static int __pyx_pw_7pyarrow_3lib_10PythonFile_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
                      PyObject *__pyx_v_handle = 0;
                      PyObject *__pyx_v_mode = 0;
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[2] = {0,0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      int __pyx_r;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_handle,&__pyx_mstate_global->__pyx_n_u_mode,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(6, 928, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  2:
                            values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(6, 928, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 928, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__cinit__", 0) < (0)) __PYX_ERR(6, 928, __pyx_L3_error)
                          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 1, 2, i); __PYX_ERR(6, 928, __pyx_L3_error) }
                          }
                        } else {
                          switch (__pyx_nargs) {
                            case  2:
                            values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(6, 928, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 928, __pyx_L3_error)
                            break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
                        }
                        __pyx_v_handle = values[0];
                        __pyx_v_mode = values[1];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 1, 2, __pyx_nargs); __PYX_ERR(6, 928, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.PythonFile.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return -1;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_10PythonFile___cinit__(((struct __pyx_obj_7pyarrow_3lib_PythonFile *)__pyx_v_self), __pyx_v_handle, __pyx_v_mode);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static int __pyx_pf_7pyarrow_3lib_10PythonFile___cinit__(struct __pyx_obj_7pyarrow_3lib_PythonFile *__pyx_v_self, PyObject *__pyx_v_handle, PyObject *__pyx_v_mode) {
                      PyObject *__pyx_v_inferred_mode = NULL;
                      PyObject *__pyx_v_kind = NULL;
                      int __pyx_r;
                      __Pyx_RefNannyDeclarations
                      int __pyx_t_1;
                      PyObject *__pyx_t_2 = NULL;
                      PyObject *__pyx_t_3 = NULL;
                      PyObject *__pyx_t_4 = NULL;
                      PyObject *__pyx_t_5 = NULL;
                      int __pyx_t_6;
                      PyObject *__pyx_t_7 = NULL;
                      PyObject *__pyx_t_8 = NULL;
                      PyObject *__pyx_t_9 = NULL;
                      PyObject *__pyx_t_10 = NULL;
                      PyObject *__pyx_t_11 = NULL;
                      PyObject *__pyx_t_12 = NULL;
                      PyObject *__pyx_t_13 = NULL;
                      PyObject *__pyx_t_14 = NULL;
                      size_t __pyx_t_15;
                      PyObject *__pyx_t_16 = NULL;
                      PyObject *__pyx_t_17 = NULL;
                      PyObject *__pyx_t_18 = NULL;
                      PyObject *__pyx_t_19[3];
                      PyObject *__pyx_t_20 = NULL;
                      int __pyx_t_21;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__cinit__", 0);

                      /* "pyarrow/io.pxi":929
 * 
 *     def __cinit__(self, handle, mode=None):
 *         self.handle = handle             # <<<<<<<<<<<<<<
 * 
 *         if mode is None:
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "handle");
                        __PYX_ERR(6, 929, __pyx_L1_error)
                      }
                      __Pyx_INCREF(__pyx_v_handle);
                      __Pyx_GIVEREF(__pyx_v_handle);
                      __Pyx_GOTREF(__pyx_v_self->handle);
                      __Pyx_DECREF(__pyx_v_self->handle);
                      __pyx_v_self->handle = __pyx_v_handle;

                      /* "pyarrow/io.pxi":931
 *         self.handle = handle
 * 
 *         if mode is None:             # <<<<<<<<<<<<<<
 *             try:
 *                 inferred_mode = handle.mode
*/
                      __pyx_t_1 = (__pyx_v_mode == Py_None);
                      if (__pyx_t_1) {

                        /* "pyarrow/io.pxi":932
 * 
 *         if mode is None:
 *             try:             # <<<<<<<<<<<<<<
 *                 inferred_mode = handle.mode
 *             except AttributeError:
*/
                        {
                          __Pyx_PyThreadState_declare
                          __Pyx_PyThreadState_assign
                          __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4);
                          __Pyx_XGOTREF(__pyx_t_2);
                          __Pyx_XGOTREF(__pyx_t_3);
                          __Pyx_XGOTREF(__pyx_t_4);
                          /*try:*/ {

                            /* "pyarrow/io.pxi":933
 *         if mode is None:
 *             try:
 *                 inferred_mode = handle.mode             # <<<<<<<<<<<<<<
 *             except AttributeError:
 *                 # Not all file-like objects have a mode attribute
*/
                            __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_handle, __pyx_mstate_global->__pyx_n_u_mode); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 933, __pyx_L4_error)
                            __Pyx_GOTREF(__pyx_t_5);
                            __pyx_v_inferred_mode = __pyx_t_5;
                            __pyx_t_5 = 0;

                            /* "pyarrow/io.pxi":932
 * 
 *         if mode is None:
 *             try:             # <<<<<<<<<<<<<<
 *                 inferred_mode = handle.mode
 *             except AttributeError:
*/
                          }
                          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                          goto __pyx_L9_try_end;
                          __pyx_L4_error:;
                          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

                          /* "pyarrow/io.pxi":934
 *             try:
 *                 inferred_mode = handle.mode
 *             except AttributeError:             # <<<<<<<<<<<<<<
 *                 # Not all file-like objects have a mode attribute
 *                 # (e.g. BytesIO)
*/
                          __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_AttributeError))));
                          if (__pyx_t_6) {
                            __Pyx_AddTraceback("pyarrow.lib.PythonFile.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                            if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_7, &__pyx_t_8) < 0) __PYX_ERR(6, 934, __pyx_L6_except_error)
                            __Pyx_XGOTREF(__pyx_t_5);
                            __Pyx_XGOTREF(__pyx_t_7);
                            __Pyx_XGOTREF(__pyx_t_8);

                            /* "pyarrow/io.pxi":937
 *                 # Not all file-like objects have a mode attribute
 *                 # (e.g. BytesIO)
 *                 try:             # <<<<<<<<<<<<<<
 *                     inferred_mode = 'w' if handle.writable() else 'r'
 *                 except AttributeError:
*/
                            {
                              __Pyx_PyThreadState_declare
                              __Pyx_PyThreadState_assign
                              __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
                              __Pyx_XGOTREF(__pyx_t_9);
                              __Pyx_XGOTREF(__pyx_t_10);
                              __Pyx_XGOTREF(__pyx_t_11);
                              /*try:*/ {

                                /* "pyarrow/io.pxi":938
 *                 # (e.g. BytesIO)
 *                 try:
 *                     inferred_mode = 'w' if handle.writable() else 'r'             # <<<<<<<<<<<<<<
 *                 except AttributeError:
 *                     raise ValueError("could not infer open mode for file-like "
*/
                                __pyx_t_14 = __pyx_v_handle;
                                __Pyx_INCREF(__pyx_t_14);
                                __pyx_t_15 = 0;
                                {
                                  PyObject *__pyx_callargs[2] = {__pyx_t_14, NULL};
                                  __pyx_t_13 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_writable, __pyx_callargs+__pyx_t_15, (1-__pyx_t_15) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                                  __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
                                  if (unlikely(!__pyx_t_13)) __PYX_ERR(6, 938, __pyx_L12_error)
                                  __Pyx_GOTREF(__pyx_t_13);
                                }
                                __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_13); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(6, 938, __pyx_L12_error)
                                __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
                                if (__pyx_t_1) {
                                  __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_w);
                                  __pyx_t_12 = __pyx_mstate_global->__pyx_n_u_w;
                                } else {
                                  __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_r);
                                  __pyx_t_12 = __pyx_mstate_global->__pyx_n_u_r;
                                }
                                __Pyx_XDECREF_SET(__pyx_v_inferred_mode, __pyx_t_12);
                                __pyx_t_12 = 0;

                                /* "pyarrow/io.pxi":937
 *                 # Not all file-like objects have a mode attribute
 *                 # (e.g. BytesIO)
 *                 try:             # <<<<<<<<<<<<<<
 *                     inferred_mode = 'w' if handle.writable() else 'r'
 *                 except AttributeError:
*/
                              }
                              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
                              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                              __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
                              goto __pyx_L19_try_end;
                              __pyx_L12_error:;
                              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                              __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
                              __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;

                              /* "pyarrow/io.pxi":939
 *                 try:
 *                     inferred_mode = 'w' if handle.writable() else 'r'
 *                 except AttributeError:             # <<<<<<<<<<<<<<
 *                     raise ValueError("could not infer open mode for file-like "
 *                                      "object %r, please pass it explicitly"
*/
                              __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_AttributeError))));
                              if (__pyx_t_6) {
                                __Pyx_AddTraceback("pyarrow.lib.PythonFile.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                                if (__Pyx_GetException(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14) < 0) __PYX_ERR(6, 939, __pyx_L14_except_error)
                                __Pyx_XGOTREF(__pyx_t_12);
                                __Pyx_XGOTREF(__pyx_t_13);
                                __Pyx_XGOTREF(__pyx_t_14);

                                /* "pyarrow/io.pxi":940
 *                     inferred_mode = 'w' if handle.writable() else 'r'
 *                 except AttributeError:
 *                     raise ValueError("could not infer open mode for file-like "             # <<<<<<<<<<<<<<
 *                                      "object %r, please pass it explicitly"
 *                                      % (handle,))
*/
                                __pyx_t_17 = NULL;

                                /* "pyarrow/io.pxi":942
 *                     raise ValueError("could not infer open mode for file-like "
 *                                      "object %r, please pass it explicitly"
 *                                      % (handle,))             # <<<<<<<<<<<<<<
 *         else:
 *             inferred_mode = mode
*/
                                __pyx_t_18 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_handle), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_18)) __PYX_ERR(6, 942, __pyx_L14_except_error)
                                __Pyx_GOTREF(__pyx_t_18);
                                __pyx_t_19[0] = __pyx_mstate_global->__pyx_kp_u_could_not_infer_open_mode_for_fi;
                                __pyx_t_19[1] = __pyx_t_18;
                                __pyx_t_19[2] = __pyx_mstate_global->__pyx_kp_u_please_pass_it_explicitly;

                                /* "pyarrow/io.pxi":940
 *                     inferred_mode = 'w' if handle.writable() else 'r'
 *                 except AttributeError:
 *                     raise ValueError("could not infer open mode for file-like "             # <<<<<<<<<<<<<<
 *                                      "object %r, please pass it explicitly"
 *                                      % (handle,))
*/
                                __pyx_t_20 = __Pyx_PyUnicode_Join(__pyx_t_19, 3, 47 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_18) + 27, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_18));
                                if (unlikely(!__pyx_t_20)) __PYX_ERR(6, 940, __pyx_L14_except_error)
                                __Pyx_GOTREF(__pyx_t_20);
                                __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
                                __pyx_t_15 = 1;
                                {
                                  PyObject *__pyx_callargs[2] = {__pyx_t_17, __pyx_t_20};
                                  __pyx_t_16 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_15, (2-__pyx_t_15) | (__pyx_t_15*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                                  __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
                                  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
                                  if (unlikely(!__pyx_t_16)) __PYX_ERR(6, 940, __pyx_L14_except_error)
                                  __Pyx_GOTREF(__pyx_t_16);
                                }
                                __Pyx_Raise(__pyx_t_16, 0, 0, 0);
                                __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
                                __PYX_ERR(6, 940, __pyx_L14_except_error)
                              }
                              goto __pyx_L14_except_error;

                              /* "pyarrow/io.pxi":937
 *                 # Not all file-like objects have a mode attribute
 *                 # (e.g. BytesIO)
 *                 try:             # <<<<<<<<<<<<<<
 *                     inferred_mode = 'w' if handle.writable() else 'r'
 *                 except AttributeError:
*/
                              __pyx_L14_except_error:;
                              __Pyx_XGIVEREF(__pyx_t_9);
                              __Pyx_XGIVEREF(__pyx_t_10);
                              __Pyx_XGIVEREF(__pyx_t_11);
                              __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11);
                              goto __pyx_L6_except_error;
                              __pyx_L19_try_end:;
                            }
                            __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
                            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
                            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
                            goto __pyx_L5_exception_handled;
                          }
                          goto __pyx_L6_except_error;

                          /* "pyarrow/io.pxi":932
 * 
 *         if mode is None:
 *             try:             # <<<<<<<<<<<<<<
 *                 inferred_mode = handle.mode
 *             except AttributeError:
*/
                          __pyx_L6_except_error:;
                          __Pyx_XGIVEREF(__pyx_t_2);
                          __Pyx_XGIVEREF(__pyx_t_3);
                          __Pyx_XGIVEREF(__pyx_t_4);
                          __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
                          goto __pyx_L1_error;
                          __pyx_L5_exception_handled:;
                          __Pyx_XGIVEREF(__pyx_t_2);
                          __Pyx_XGIVEREF(__pyx_t_3);
                          __Pyx_XGIVEREF(__pyx_t_4);
                          __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
                          __pyx_L9_try_end:;
                        }

                        /* "pyarrow/io.pxi":931
 *         self.handle = handle
 * 
 *         if mode is None:             # <<<<<<<<<<<<<<
 *             try:
 *                 inferred_mode = handle.mode
*/
                        goto __pyx_L3;
                      }

                      /* "pyarrow/io.pxi":944
 *                                      % (handle,))
 *         else:
 *             inferred_mode = mode             # <<<<<<<<<<<<<<
 * 
 *         if inferred_mode.startswith('w'):
*/
                      /*else*/ {
                        __Pyx_INCREF(__pyx_v_mode);
                        __pyx_v_inferred_mode = __pyx_v_mode;
                      }
                      __pyx_L3:;

                      /* "pyarrow/io.pxi":946
 *             inferred_mode = mode
 * 
 *         if inferred_mode.startswith('w'):             # <<<<<<<<<<<<<<
 *             kind = 'w'
 *         elif inferred_mode.startswith('r'):
*/
                      __pyx_t_7 = __pyx_v_inferred_mode;
                      __Pyx_INCREF(__pyx_t_7);
                      __pyx_t_15 = 0;
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_mstate_global->__pyx_n_u_w};
                        __pyx_t_8 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_startswith, __pyx_callargs+__pyx_t_15, (2-__pyx_t_15) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
                        if (unlikely(!__pyx_t_8)) __PYX_ERR(6, 946, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_8);
                      }
                      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(6, 946, __pyx_L1_error)
                      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                      if (__pyx_t_1) {

                        /* "pyarrow/io.pxi":947
 * 
 *         if inferred_mode.startswith('w'):
 *             kind = 'w'             # <<<<<<<<<<<<<<
 *         elif inferred_mode.startswith('r'):
 *             kind = 'r'
*/
                        __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_w);
                        __pyx_v_kind = __pyx_mstate_global->__pyx_n_u_w;

                        /* "pyarrow/io.pxi":946
 *             inferred_mode = mode
 * 
 *         if inferred_mode.startswith('w'):             # <<<<<<<<<<<<<<
 *             kind = 'w'
 *         elif inferred_mode.startswith('r'):
*/
                        goto __pyx_L22;
                      }

                      /* "pyarrow/io.pxi":948
 *         if inferred_mode.startswith('w'):
 *             kind = 'w'
 *         elif inferred_mode.startswith('r'):             # <<<<<<<<<<<<<<
 *             kind = 'r'
 *         else:
*/
                      __pyx_t_7 = __pyx_v_inferred_mode;
                      __Pyx_INCREF(__pyx_t_7);
                      __pyx_t_15 = 0;
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_mstate_global->__pyx_n_u_r};
                        __pyx_t_8 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_startswith, __pyx_callargs+__pyx_t_15, (2-__pyx_t_15) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
                        if (unlikely(!__pyx_t_8)) __PYX_ERR(6, 948, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_8);
                      }
                      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(6, 948, __pyx_L1_error)
                      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                      if (likely(__pyx_t_1)) {

                        /* "pyarrow/io.pxi":949
 *             kind = 'w'
 *         elif inferred_mode.startswith('r'):
 *             kind = 'r'             # <<<<<<<<<<<<<<
 *         else:
 *             raise ValueError(f'Invalid file mode: {mode}')
*/
                        __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_r);
                        __pyx_v_kind = __pyx_mstate_global->__pyx_n_u_r;

                        /* "pyarrow/io.pxi":948
 *         if inferred_mode.startswith('w'):
 *             kind = 'w'
 *         elif inferred_mode.startswith('r'):             # <<<<<<<<<<<<<<
 *             kind = 'r'
 *         else:
*/
                        goto __pyx_L22;
                      }

                      /* "pyarrow/io.pxi":951
 *             kind = 'r'
 *         else:
 *             raise ValueError(f'Invalid file mode: {mode}')             # <<<<<<<<<<<<<<
 * 
 *         # If mode was given, check it matches the given file
*/
                      /*else*/ {
                        __pyx_t_7 = NULL;
                        __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_v_mode, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 951, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_5);
                        __pyx_t_14 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_Invalid_file_mode, __pyx_t_5); if (unlikely(!__pyx_t_14)) __PYX_ERR(6, 951, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_14);
                        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                        __pyx_t_15 = 1;
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_14};
                          __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_15, (2-__pyx_t_15) | (__pyx_t_15*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
                          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
                          if (unlikely(!__pyx_t_8)) __PYX_ERR(6, 951, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_8);
                        }
                        __Pyx_Raise(__pyx_t_8, 0, 0, 0);
                        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                        __PYX_ERR(6, 951, __pyx_L1_error)
                      }
                      __pyx_L22:;

                      /* "pyarrow/io.pxi":954
 * 
 *         # If mode was given, check it matches the given file
 *         if mode is not None:             # <<<<<<<<<<<<<<
 *             if isinstance(handle, IOBase):
 *                 # Python 3 IO object
*/
                      __pyx_t_1 = (__pyx_v_mode != Py_None);
                      if (__pyx_t_1) {

                        /* "pyarrow/io.pxi":955
 *         # If mode was given, check it matches the given file
 *         if mode is not None:
 *             if isinstance(handle, IOBase):             # <<<<<<<<<<<<<<
 *                 # Python 3 IO object
 *                 if kind == 'r':
*/
                        __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_IOBase); if (unlikely(!__pyx_t_8)) __PYX_ERR(6, 955, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_8);
                        __pyx_t_1 = PyObject_IsInstance(__pyx_v_handle, __pyx_t_8); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(6, 955, __pyx_L1_error)
                        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                        if (__pyx_t_1) {

                          /* "pyarrow/io.pxi":957
 *             if isinstance(handle, IOBase):
 *                 # Python 3 IO object
 *                 if kind == 'r':             # <<<<<<<<<<<<<<
 *                     if not handle.readable():
 *                         raise TypeError("readable file expected")
*/
                          __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_kind, __pyx_mstate_global->__pyx_n_u_r, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(6, 957, __pyx_L1_error)
                          if (__pyx_t_1) {

                            /* "pyarrow/io.pxi":958
 *                 # Python 3 IO object
 *                 if kind == 'r':
 *                     if not handle.readable():             # <<<<<<<<<<<<<<
 *                         raise TypeError("readable file expected")
 *                 else:
*/
                            __pyx_t_14 = __pyx_v_handle;
                            __Pyx_INCREF(__pyx_t_14);
                            __pyx_t_15 = 0;
                            {
                              PyObject *__pyx_callargs[2] = {__pyx_t_14, NULL};
                              __pyx_t_8 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_readable, __pyx_callargs+__pyx_t_15, (1-__pyx_t_15) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                              __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
                              if (unlikely(!__pyx_t_8)) __PYX_ERR(6, 958, __pyx_L1_error)
                              __Pyx_GOTREF(__pyx_t_8);
                            }
                            __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(6, 958, __pyx_L1_error)
                            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                            __pyx_t_21 = (!__pyx_t_1);
                            if (unlikely(__pyx_t_21)) {

                              /* "pyarrow/io.pxi":959
 *                 if kind == 'r':
 *                     if not handle.readable():
 *                         raise TypeError("readable file expected")             # <<<<<<<<<<<<<<
 *                 else:
 *                     if not handle.writable():
*/
                              __pyx_t_14 = NULL;
                              __pyx_t_15 = 1;
                              {
                                PyObject *__pyx_callargs[2] = {__pyx_t_14, __pyx_mstate_global->__pyx_kp_u_readable_file_expected};
                                __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_15, (2-__pyx_t_15) | (__pyx_t_15*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                                __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
                                if (unlikely(!__pyx_t_8)) __PYX_ERR(6, 959, __pyx_L1_error)
                                __Pyx_GOTREF(__pyx_t_8);
                              }
                              __Pyx_Raise(__pyx_t_8, 0, 0, 0);
                              __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                              __PYX_ERR(6, 959, __pyx_L1_error)

                              /* "pyarrow/io.pxi":958
 *                 # Python 3 IO object
 *                 if kind == 'r':
 *                     if not handle.readable():             # <<<<<<<<<<<<<<
 *                         raise TypeError("readable file expected")
 *                 else:
*/
                            }

                            /* "pyarrow/io.pxi":957
 *             if isinstance(handle, IOBase):
 *                 # Python 3 IO object
 *                 if kind == 'r':             # <<<<<<<<<<<<<<
 *                     if not handle.readable():
 *                         raise TypeError("readable file expected")
*/
                            goto __pyx_L25;
                          }

                          /* "pyarrow/io.pxi":961
 *                         raise TypeError("readable file expected")
 *                 else:
 *                     if not handle.writable():             # <<<<<<<<<<<<<<
 *                         raise TypeError("writable file expected")
 *             # (other duck-typed file-like objects are possible)
*/
                          /*else*/ {
                            __pyx_t_14 = __pyx_v_handle;
                            __Pyx_INCREF(__pyx_t_14);
                            __pyx_t_15 = 0;
                            {
                              PyObject *__pyx_callargs[2] = {__pyx_t_14, NULL};
                              __pyx_t_8 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_writable, __pyx_callargs+__pyx_t_15, (1-__pyx_t_15) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                              __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
                              if (unlikely(!__pyx_t_8)) __PYX_ERR(6, 961, __pyx_L1_error)
                              __Pyx_GOTREF(__pyx_t_8);
                            }
                            __pyx_t_21 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_21 < 0))) __PYX_ERR(6, 961, __pyx_L1_error)
                            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                            __pyx_t_1 = (!__pyx_t_21);
                            if (unlikely(__pyx_t_1)) {

                              /* "pyarrow/io.pxi":962
 *                 else:
 *                     if not handle.writable():
 *                         raise TypeError("writable file expected")             # <<<<<<<<<<<<<<
 *             # (other duck-typed file-like objects are possible)
 * 
*/
                              __pyx_t_14 = NULL;
                              __pyx_t_15 = 1;
                              {
                                PyObject *__pyx_callargs[2] = {__pyx_t_14, __pyx_mstate_global->__pyx_kp_u_writable_file_expected};
                                __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_15, (2-__pyx_t_15) | (__pyx_t_15*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                                __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
                                if (unlikely(!__pyx_t_8)) __PYX_ERR(6, 962, __pyx_L1_error)
                                __Pyx_GOTREF(__pyx_t_8);
                              }
                              __Pyx_Raise(__pyx_t_8, 0, 0, 0);
                              __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                              __PYX_ERR(6, 962, __pyx_L1_error)

                              /* "pyarrow/io.pxi":961
 *                         raise TypeError("readable file expected")
 *                 else:
 *                     if not handle.writable():             # <<<<<<<<<<<<<<
 *                         raise TypeError("writable file expected")
 *             # (other duck-typed file-like objects are possible)
*/
                            }
                          }
                          __pyx_L25:;

                          /* "pyarrow/io.pxi":955
 *         # If mode was given, check it matches the given file
 *         if mode is not None:
 *             if isinstance(handle, IOBase):             # <<<<<<<<<<<<<<
 *                 # Python 3 IO object
 *                 if kind == 'r':
*/
                        }

                        /* "pyarrow/io.pxi":954
 * 
 *         # If mode was given, check it matches the given file
 *         if mode is not None:             # <<<<<<<<<<<<<<
 *             if isinstance(handle, IOBase):
 *                 # Python 3 IO object
*/
                      }

                      /* "pyarrow/io.pxi":966
 * 
 *         # If possible, check the file is a binary file
 *         if isinstance(handle, TextIOBase):             # <<<<<<<<<<<<<<
 *             raise TypeError("binary file expected, got text file")
 * 
*/
                      __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_TextIOBase); if (unlikely(!__pyx_t_8)) __PYX_ERR(6, 966, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_8);
                      __pyx_t_1 = PyObject_IsInstance(__pyx_v_handle, __pyx_t_8); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(6, 966, __pyx_L1_error)
                      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                      if (unlikely(__pyx_t_1)) {

                        /* "pyarrow/io.pxi":967
 *         # If possible, check the file is a binary file
 *         if isinstance(handle, TextIOBase):
 *             raise TypeError("binary file expected, got text file")             # <<<<<<<<<<<<<<
 * 
 *         if kind == 'r':
*/
                        __pyx_t_14 = NULL;
                        __pyx_t_15 = 1;
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_14, __pyx_mstate_global->__pyx_kp_u_binary_file_expected_got_text_fi};
                          __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_15, (2-__pyx_t_15) | (__pyx_t_15*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
                          if (unlikely(!__pyx_t_8)) __PYX_ERR(6, 967, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_8);
                        }
                        __Pyx_Raise(__pyx_t_8, 0, 0, 0);
                        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                        __PYX_ERR(6, 967, __pyx_L1_error)

                        /* "pyarrow/io.pxi":966
 * 
 *         # If possible, check the file is a binary file
 *         if isinstance(handle, TextIOBase):             # <<<<<<<<<<<<<<
 *             raise TypeError("binary file expected, got text file")
 * 
*/
                      }

                      /* "pyarrow/io.pxi":969
 *             raise TypeError("binary file expected, got text file")
 * 
 *         if kind == 'r':             # <<<<<<<<<<<<<<
 *             self.set_random_access_file(
 *                 shared_ptr[CRandomAccessFile](new PyReadableFile(handle)))
*/
                      __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_kind, __pyx_mstate_global->__pyx_n_u_r, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(6, 969, __pyx_L1_error)
                      if (__pyx_t_1) {

                        /* "pyarrow/io.pxi":970
 * 
 *         if kind == 'r':
 *             self.set_random_access_file(             # <<<<<<<<<<<<<<
 *                 shared_ptr[CRandomAccessFile](new PyReadableFile(handle)))
 *             self.is_readable = True
*/
                        if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "set_random_access_file");
                          __PYX_ERR(6, 970, __pyx_L1_error)
                        }

                        /* "pyarrow/io.pxi":971
 *         if kind == 'r':
 *             self.set_random_access_file(
 *                 shared_ptr[CRandomAccessFile](new PyReadableFile(handle)))             # <<<<<<<<<<<<<<
 *             self.is_readable = True
 *         else:
*/
                        __pyx_t_8 = ((struct __pyx_vtabstruct_7pyarrow_3lib_PythonFile *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.set_random_access_file(((struct __pyx_obj_7pyarrow_3lib_NativeFile *)__pyx_v_self), std::shared_ptr< arrow::io::RandomAccessFile> (new arrow::py::PyReadableFile(__pyx_v_handle))); if (unlikely(!__pyx_t_8)) __PYX_ERR(6, 970, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_8);
                        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

                        /* "pyarrow/io.pxi":972
 *             self.set_random_access_file(
 *                 shared_ptr[CRandomAccessFile](new PyReadableFile(handle)))
 *             self.is_readable = True             # <<<<<<<<<<<<<<
 *         else:
 *             self.set_output_stream(
*/
                        if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "is_readable");
                          __PYX_ERR(6, 972, __pyx_L1_error)
                        }
                        __pyx_v_self->__pyx_base.is_readable = 1;

                        /* "pyarrow/io.pxi":969
 *             raise TypeError("binary file expected, got text file")
 * 
 *         if kind == 'r':             # <<<<<<<<<<<<<<
 *             self.set_random_access_file(
 *                 shared_ptr[CRandomAccessFile](new PyReadableFile(handle)))
*/
                        goto __pyx_L29;
                      }

                      /* "pyarrow/io.pxi":974
 *             self.is_readable = True
 *         else:
 *             self.set_output_stream(             # <<<<<<<<<<<<<<
 *                 shared_ptr[COutputStream](new PyOutputStream(handle)))
 *             self.is_writable = True
*/
                      /*else*/ {
                        if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "set_output_stream");
                          __PYX_ERR(6, 974, __pyx_L1_error)
                        }

                        /* "pyarrow/io.pxi":975
 *         else:
 *             self.set_output_stream(
 *                 shared_ptr[COutputStream](new PyOutputStream(handle)))             # <<<<<<<<<<<<<<
 *             self.is_writable = True
 * 
*/
                        __pyx_t_8 = ((struct __pyx_vtabstruct_7pyarrow_3lib_PythonFile *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.set_output_stream(((struct __pyx_obj_7pyarrow_3lib_NativeFile *)__pyx_v_self), std::shared_ptr< arrow::io::OutputStream> (new arrow::py::PyOutputStream(__pyx_v_handle))); if (unlikely(!__pyx_t_8)) __PYX_ERR(6, 974, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_8);
                        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

                        /* "pyarrow/io.pxi":976
 *             self.set_output_stream(
 *                 shared_ptr[COutputStream](new PyOutputStream(handle)))
 *             self.is_writable = True             # <<<<<<<<<<<<<<
 * 
 *     def truncate(self, pos=None):
*/
                        if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "is_writable");
                          __PYX_ERR(6, 976, __pyx_L1_error)
                        }
                        __pyx_v_self->__pyx_base.is_writable = 1;
                      }
                      __pyx_L29:;

                      /* "pyarrow/io.pxi":928
 *         object handle
 * 
 *     def __cinit__(self, handle, mode=None):             # <<<<<<<<<<<<<<
 *         self.handle = handle
 * 
*/

                      /* function exit code */
                      __pyx_r = 0;
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_5);
                      __Pyx_XDECREF(__pyx_t_7);
                      __Pyx_XDECREF(__pyx_t_8);
                      __Pyx_XDECREF(__pyx_t_12);
                      __Pyx_XDECREF(__pyx_t_13);
                      __Pyx_XDECREF(__pyx_t_14);
                      __Pyx_XDECREF(__pyx_t_16);
                      __Pyx_XDECREF(__pyx_t_17);
                      __Pyx_XDECREF(__pyx_t_18);
                      __Pyx_XDECREF(__pyx_t_20);
                      __Pyx_AddTraceback("pyarrow.lib.PythonFile.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = -1;
                      __pyx_L0:;
                      __Pyx_XDECREF(__pyx_v_inferred_mode);
                      __Pyx_XDECREF(__pyx_v_kind);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":978
 *             self.is_writable = True
 * 
 *     def truncate(self, pos=None):             # <<<<<<<<<<<<<<
 *         """
 *         Parameters
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_10PythonFile_3truncate(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_10PythonFile_2truncate, "PythonFile.truncate(self, pos=None)\n\nParameters\n----------\npos : int, optional");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_10PythonFile_3truncate = {"truncate", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10PythonFile_3truncate, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10PythonFile_2truncate};
                    static PyObject *__pyx_pw_7pyarrow_3lib_10PythonFile_3truncate(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      PyObject *__pyx_v_pos = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[1] = {0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("truncate (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pos,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(6, 978, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 978, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "truncate", 0) < (0)) __PYX_ERR(6, 978, __pyx_L3_error)
                          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
                        } else {
                          switch (__pyx_nargs) {
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 978, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
                        }
                        __pyx_v_pos = values[0];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("truncate", 0, 0, 1, __pyx_nargs); __PYX_ERR(6, 978, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.PythonFile.truncate", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_10PythonFile_2truncate(((struct __pyx_obj_7pyarrow_3lib_PythonFile *)__pyx_v_self), __pyx_v_pos);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_10PythonFile_2truncate(struct __pyx_obj_7pyarrow_3lib_PythonFile *__pyx_v_self, PyObject *__pyx_v_pos) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      size_t __pyx_t_3;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("truncate", 0);

                      /* "pyarrow/io.pxi":984
 *         pos : int, optional
 *         """
 *         self.handle.truncate(pos)             # <<<<<<<<<<<<<<
 * 
 *     def readline(self, size=None):
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "handle");
                        __PYX_ERR(6, 984, __pyx_L1_error)
                      }
                      __pyx_t_2 = __pyx_v_self->handle;
                      __Pyx_INCREF(__pyx_t_2);
                      __pyx_t_3 = 0;
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_pos};
                        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_truncate, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 984, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

                      /* "pyarrow/io.pxi":978
 *             self.is_writable = True
 * 
 *     def truncate(self, pos=None):             # <<<<<<<<<<<<<<
 *         """
 *         Parameters
*/

                      /* function exit code */
                      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_AddTraceback("pyarrow.lib.PythonFile.truncate", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":986
 *         self.handle.truncate(pos)
 * 
 *     def readline(self, size=None):             # <<<<<<<<<<<<<<
 *         """
 *         Read and return a line of bytes from the file.
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_10PythonFile_5readline(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_10PythonFile_4readline, "PythonFile.readline(self, size=None)\n\nRead and return a line of bytes from the file.\n\nIf size is specified, read at most size bytes.\n\nParameters\n----------\nsize : int\n    Maximum number of bytes read");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_10PythonFile_5readline = {"readline", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10PythonFile_5readline, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10PythonFile_4readline};
                    static PyObject *__pyx_pw_7pyarrow_3lib_10PythonFile_5readline(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      PyObject *__pyx_v_size = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[1] = {0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("readline (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_size,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(6, 986, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 986, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "readline", 0) < (0)) __PYX_ERR(6, 986, __pyx_L3_error)
                          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
                        } else {
                          switch (__pyx_nargs) {
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 986, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
                        }
                        __pyx_v_size = values[0];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("readline", 0, 0, 1, __pyx_nargs); __PYX_ERR(6, 986, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.PythonFile.readline", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_10PythonFile_4readline(((struct __pyx_obj_7pyarrow_3lib_PythonFile *)__pyx_v_self), __pyx_v_size);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_10PythonFile_4readline(struct __pyx_obj_7pyarrow_3lib_PythonFile *__pyx_v_self, PyObject *__pyx_v_size) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      size_t __pyx_t_3;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("readline", 0);

                      /* "pyarrow/io.pxi":997
 *             Maximum number of bytes read
 *         """
 *         return self.handle.readline(size)             # <<<<<<<<<<<<<<
 * 
 *     def readlines(self, hint=None):
*/
                      __Pyx_XDECREF(__pyx_r);
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "handle");
                        __PYX_ERR(6, 997, __pyx_L1_error)
                      }
                      __pyx_t_2 = __pyx_v_self->handle;
                      __Pyx_INCREF(__pyx_t_2);
                      __pyx_t_3 = 0;
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_size};
                        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_readline, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 997, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __pyx_r = __pyx_t_1;
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/io.pxi":986
 *         self.handle.truncate(pos)
 * 
 *     def readline(self, size=None):             # <<<<<<<<<<<<<<
 *         """
 *         Read and return a line of bytes from the file.
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_AddTraceback("pyarrow.lib.PythonFile.readline", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":999
 *         return self.handle.readline(size)
 * 
 *     def readlines(self, hint=None):             # <<<<<<<<<<<<<<
 *         """
 *         Read lines of the file.
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_10PythonFile_7readlines(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_10PythonFile_6readlines, "PythonFile.readlines(self, hint=None)\n\nRead lines of the file.\n\nParameters\n----------\nhint : int\n    Maximum number of bytes read until we stop");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_10PythonFile_7readlines = {"readlines", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10PythonFile_7readlines, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10PythonFile_6readlines};
                    static PyObject *__pyx_pw_7pyarrow_3lib_10PythonFile_7readlines(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      PyObject *__pyx_v_hint = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[1] = {0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("readlines (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_hint,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(6, 999, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 999, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "readlines", 0) < (0)) __PYX_ERR(6, 999, __pyx_L3_error)
                          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
                        } else {
                          switch (__pyx_nargs) {
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 999, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
                        }
                        __pyx_v_hint = values[0];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("readlines", 0, 0, 1, __pyx_nargs); __PYX_ERR(6, 999, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.PythonFile.readlines", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_10PythonFile_6readlines(((struct __pyx_obj_7pyarrow_3lib_PythonFile *)__pyx_v_self), __pyx_v_hint);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_10PythonFile_6readlines(struct __pyx_obj_7pyarrow_3lib_PythonFile *__pyx_v_self, PyObject *__pyx_v_hint) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      size_t __pyx_t_3;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("readlines", 0);

                      /* "pyarrow/io.pxi":1008
 *             Maximum number of bytes read until we stop
 *         """
 *         return self.handle.readlines(hint)             # <<<<<<<<<<<<<<
 * 
 * 
*/
                      __Pyx_XDECREF(__pyx_r);
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "handle");
                        __PYX_ERR(6, 1008, __pyx_L1_error)
                      }
                      __pyx_t_2 = __pyx_v_self->handle;
                      __Pyx_INCREF(__pyx_t_2);
                      __pyx_t_3 = 0;
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_hint};
                        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_readlines, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 1008, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __pyx_r = __pyx_t_1;
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/io.pxi":999
 *         return self.handle.readline(size)
 * 
 *     def readlines(self, hint=None):             # <<<<<<<<<<<<<<
 *         """
 *         Read lines of the file.
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_AddTraceback("pyarrow.lib.PythonFile.readlines", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_10PythonFile_9__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_10PythonFile_8__reduce_cython__, "PythonFile.__reduce_cython__(self)");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_10PythonFile_9__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10PythonFile_9__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10PythonFile_8__reduce_cython__};
                    static PyObject *__pyx_pw_7pyarrow_3lib_10PythonFile_9__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; }
                      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                      if (unlikely(__pyx_kwds_len < 0)) return NULL;
                      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;}
                      __pyx_r = __pyx_pf_7pyarrow_3lib_10PythonFile_8__reduce_cython__(((struct __pyx_obj_7pyarrow_3lib_PythonFile *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_10PythonFile_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_PythonFile *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__reduce_cython__", 0);

                      /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/
                      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0);
                      __PYX_ERR(7, 2, __pyx_L1_error)

                      /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib.PythonFile.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_10PythonFile_11__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_10PythonFile_10__setstate_cython__, "PythonFile.__setstate_cython__(self, __pyx_state)");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_10PythonFile_11__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10PythonFile_11__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10PythonFile_10__setstate_cython__};
                    static PyObject *__pyx_pw_7pyarrow_3lib_10PythonFile_11__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[1] = {0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(7, 3, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(7, 3, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(7, 3, __pyx_L3_error)
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(7, 3, __pyx_L3_error) }
                          }
                        } else if (unlikely(__pyx_nargs != 1)) {
                          goto __pyx_L5_argtuple_error;
                        } else {
                          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(7, 3, __pyx_L3_error)
                        }
                        __pyx_v___pyx_state = values[0];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(7, 3, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.PythonFile.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_10PythonFile_10__setstate_cython__(((struct __pyx_obj_7pyarrow_3lib_PythonFile *)__pyx_v_self), __pyx_v___pyx_state);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_10PythonFile_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_PythonFile *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__setstate_cython__", 0);

                      /* "(tree fragment)":4
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
*/
                      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0);
                      __PYX_ERR(7, 4, __pyx_L1_error)

                      /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib.PythonFile.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":1038
 *         object path
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def create(path, size):
 *         """
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_16MemoryMappedFile_1create(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_16MemoryMappedFile_create, "MemoryMappedFile.create(path, size)\n\nCreate a MemoryMappedFile\n\nParameters\n----------\npath : str\n    Where to create the file.\nsize : int\n    Size of the memory mapped file.");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_16MemoryMappedFile_1create = {"create", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_16MemoryMappedFile_1create, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_16MemoryMappedFile_create};
                    static PyObject *__pyx_pw_7pyarrow_3lib_16MemoryMappedFile_1create(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      PyObject *__pyx_v_path = 0;
                      PyObject *__pyx_v_size = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[2] = {0,0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("create (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_path,&__pyx_mstate_global->__pyx_n_u_size,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(6, 1038, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  2:
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(6, 1038, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 1038, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "create", 0) < (0)) __PYX_ERR(6, 1038, __pyx_L3_error)
                          for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("create", 1, 2, 2, i); __PYX_ERR(6, 1038, __pyx_L3_error) }
                          }
                        } else if (unlikely(__pyx_nargs != 2)) {
                          goto __pyx_L5_argtuple_error;
                        } else {
                          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 1038, __pyx_L3_error)
                          values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(6, 1038, __pyx_L3_error)
                        }
                        __pyx_v_path = values[0];
                        __pyx_v_size = values[1];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("create", 1, 2, 2, __pyx_nargs); __PYX_ERR(6, 1038, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.MemoryMappedFile.create", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_16MemoryMappedFile_create(__pyx_v_path, __pyx_v_size);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_16MemoryMappedFile_create(PyObject *__pyx_v_path, PyObject *__pyx_v_size) {
                      std::shared_ptr< arrow::io::MemoryMappedFile>  __pyx_v_handle;
                      std::string __pyx_v_c_path;
                      int64_t __pyx_v_c_size;
                      struct __pyx_obj_7pyarrow_3lib_MemoryMappedFile *__pyx_v_result = 0;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      PyObject *__pyx_t_3 = NULL;
                      size_t __pyx_t_4;
                      std::string __pyx_t_5;
                      int64_t __pyx_t_6;
                      std::shared_ptr< arrow::io::MemoryMappedFile>  __pyx_t_7;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("create", 0);

                      /* "pyarrow/io.pxi":1052
 *         cdef:
 *             shared_ptr[CMemoryMappedFile] handle
 *             c_string c_path = encode_file_path(path)             # <<<<<<<<<<<<<<
 *             int64_t c_size = size
 * 
*/
                      __pyx_t_2 = NULL;
                      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_encode_file_path); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 1052, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_3);
                      __pyx_t_4 = 1;
                      #if CYTHON_UNPACK_METHODS
                      if (unlikely(PyMethod_Check(__pyx_t_3))) {
                        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
                        assert(__pyx_t_2);
                        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
                        __Pyx_INCREF(__pyx_t_2);
                        __Pyx_INCREF(__pyx__function);
                        __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
                        __pyx_t_4 = 0;
                      }
                      #endif
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_path};
                        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 1052, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __pyx_t_5 = __pyx_convert_string_from_py_6libcpp_6string_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 1052, __pyx_L1_error)
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      __pyx_v_c_path = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_5);

                      /* "pyarrow/io.pxi":1053
 *             shared_ptr[CMemoryMappedFile] handle
 *             c_string c_path = encode_file_path(path)
 *             int64_t c_size = size             # <<<<<<<<<<<<<<
 * 
 *         with nogil:
*/
                      __pyx_t_6 = __Pyx_PyLong_As_int64_t(__pyx_v_size); if (unlikely((__pyx_t_6 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(6, 1053, __pyx_L1_error)
                      __pyx_v_c_size = __pyx_t_6;

                      /* "pyarrow/io.pxi":1055
 *             int64_t c_size = size
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             handle = GetResultValue(CMemoryMappedFile.Create(c_path, c_size))
 * 
*/
                      {
                          PyThreadState * _save;
                          _save = PyEval_SaveThread();
                          __Pyx_FastGIL_Remember();
                          /*try:*/ {

                            /* "pyarrow/io.pxi":1056
 * 
 *         with nogil:
 *             handle = GetResultValue(CMemoryMappedFile.Create(c_path, c_size))             # <<<<<<<<<<<<<<
 * 
 *         cdef MemoryMappedFile result = MemoryMappedFile()
*/
                            __pyx_t_7 = arrow::py::GetResultValue<std::shared_ptr< arrow::io::MemoryMappedFile> >( arrow::io::MemoryMappedFile::Create(__pyx_v_c_path, __pyx_v_c_size)); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(6, 1056, __pyx_L4_error)
                            __pyx_v_handle = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_7);
                          }

                          /* "pyarrow/io.pxi":1055
 *             int64_t c_size = size
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             handle = GetResultValue(CMemoryMappedFile.Create(c_path, c_size))
 * 
*/
                          /*finally:*/ {
                            /*normal exit:*/{
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L5;
                            }
                            __pyx_L4_error: {
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L1_error;
                            }
                            __pyx_L5:;
                          }
                      }

                      /* "pyarrow/io.pxi":1058
 *             handle = GetResultValue(CMemoryMappedFile.Create(c_path, c_size))
 * 
 *         cdef MemoryMappedFile result = MemoryMappedFile()             # <<<<<<<<<<<<<<
 *         result.path = path
 *         result.is_readable = True
*/
                      __pyx_t_3 = NULL;
                      __pyx_t_4 = 1;
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
                        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_MemoryMappedFile, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 1058, __pyx_L1_error)
                        __Pyx_GOTREF((PyObject *)__pyx_t_1);
                      }
                      __pyx_v_result = ((struct __pyx_obj_7pyarrow_3lib_MemoryMappedFile *)__pyx_t_1);
                      __pyx_t_1 = 0;

                      /* "pyarrow/io.pxi":1059
 * 
 *         cdef MemoryMappedFile result = MemoryMappedFile()
 *         result.path = path             # <<<<<<<<<<<<<<
 *         result.is_readable = True
 *         result.is_writable = True
*/
                      __Pyx_INCREF(__pyx_v_path);
                      __Pyx_GIVEREF(__pyx_v_path);
                      __Pyx_GOTREF(__pyx_v_result->path);
                      __Pyx_DECREF(__pyx_v_result->path);
                      __pyx_v_result->path = __pyx_v_path;

                      /* "pyarrow/io.pxi":1060
 *         cdef MemoryMappedFile result = MemoryMappedFile()
 *         result.path = path
 *         result.is_readable = True             # <<<<<<<<<<<<<<
 *         result.is_writable = True
 *         result.set_output_stream(<shared_ptr[COutputStream]> handle)
*/
                      __pyx_v_result->__pyx_base.is_readable = 1;

                      /* "pyarrow/io.pxi":1061
 *         result.path = path
 *         result.is_readable = True
 *         result.is_writable = True             # <<<<<<<<<<<<<<
 *         result.set_output_stream(<shared_ptr[COutputStream]> handle)
 *         result.set_random_access_file(<shared_ptr[CRandomAccessFile]> handle)
*/
                      __pyx_v_result->__pyx_base.is_writable = 1;

                      /* "pyarrow/io.pxi":1062
 *         result.is_readable = True
 *         result.is_writable = True
 *         result.set_output_stream(<shared_ptr[COutputStream]> handle)             # <<<<<<<<<<<<<<
 *         result.set_random_access_file(<shared_ptr[CRandomAccessFile]> handle)
 *         result.handle = handle
*/
                      __pyx_t_1 = ((struct __pyx_vtabstruct_7pyarrow_3lib_MemoryMappedFile *)__pyx_v_result->__pyx_base.__pyx_vtab)->__pyx_base.set_output_stream(((struct __pyx_obj_7pyarrow_3lib_NativeFile *)__pyx_v_result), ((std::shared_ptr< arrow::io::OutputStream> )__pyx_v_handle)); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 1062, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

                      /* "pyarrow/io.pxi":1063
 *         result.is_writable = True
 *         result.set_output_stream(<shared_ptr[COutputStream]> handle)
 *         result.set_random_access_file(<shared_ptr[CRandomAccessFile]> handle)             # <<<<<<<<<<<<<<
 *         result.handle = handle
 * 
*/
                      __pyx_t_1 = ((struct __pyx_vtabstruct_7pyarrow_3lib_MemoryMappedFile *)__pyx_v_result->__pyx_base.__pyx_vtab)->__pyx_base.set_random_access_file(((struct __pyx_obj_7pyarrow_3lib_NativeFile *)__pyx_v_result), ((std::shared_ptr< arrow::io::RandomAccessFile> )__pyx_v_handle)); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 1063, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

                      /* "pyarrow/io.pxi":1064
 *         result.set_output_stream(<shared_ptr[COutputStream]> handle)
 *         result.set_random_access_file(<shared_ptr[CRandomAccessFile]> handle)
 *         result.handle = handle             # <<<<<<<<<<<<<<
 * 
 *         return result
*/
                      __pyx_v_result->handle = __pyx_v_handle;

                      /* "pyarrow/io.pxi":1066
 *         result.handle = handle
 * 
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     def _open(self, path, mode='r'):
*/
                      __Pyx_XDECREF(__pyx_r);
                      __Pyx_INCREF((PyObject *)__pyx_v_result);
                      __pyx_r = ((PyObject *)__pyx_v_result);
                      goto __pyx_L0;

                      /* "pyarrow/io.pxi":1038
 *         object path
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def create(path, size):
 *         """
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_AddTraceback("pyarrow.lib.MemoryMappedFile.create", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XDECREF((PyObject *)__pyx_v_result);
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":1068
 *         return result
 * 
 *     def _open(self, path, mode='r'):             # <<<<<<<<<<<<<<
 *         self.path = path
 * 
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_16MemoryMappedFile_3_open(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_16MemoryMappedFile_2_open, "MemoryMappedFile._open(self, path, mode='r')");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_16MemoryMappedFile_3_open = {"_open", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_16MemoryMappedFile_3_open, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_16MemoryMappedFile_2_open};
                    static PyObject *__pyx_pw_7pyarrow_3lib_16MemoryMappedFile_3_open(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      PyObject *__pyx_v_path = 0;
                      PyObject *__pyx_v_mode = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[2] = {0,0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("_open (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_path,&__pyx_mstate_global->__pyx_n_u_mode,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(6, 1068, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  2:
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(6, 1068, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 1068, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_open", 0) < (0)) __PYX_ERR(6, 1068, __pyx_L3_error)
                          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_n_u_r));
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_open", 0, 1, 2, i); __PYX_ERR(6, 1068, __pyx_L3_error) }
                          }
                        } else {
                          switch (__pyx_nargs) {
                            case  2:
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(6, 1068, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 1068, __pyx_L3_error)
                            break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_n_u_r));
                        }
                        __pyx_v_path = values[0];
                        __pyx_v_mode = values[1];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("_open", 0, 1, 2, __pyx_nargs); __PYX_ERR(6, 1068, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.MemoryMappedFile._open", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_16MemoryMappedFile_2_open(((struct __pyx_obj_7pyarrow_3lib_MemoryMappedFile *)__pyx_v_self), __pyx_v_path, __pyx_v_mode);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_16MemoryMappedFile_2_open(struct __pyx_obj_7pyarrow_3lib_MemoryMappedFile *__pyx_v_self, PyObject *__pyx_v_path, PyObject *__pyx_v_mode) {
                      enum  arrow::io::FileMode::type __pyx_v_c_mode;
                      std::shared_ptr< arrow::io::MemoryMappedFile>  __pyx_v_handle;
                      std::string __pyx_v_c_path;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      PyObject *__pyx_t_3 = NULL;
                      size_t __pyx_t_4;
                      std::string __pyx_t_5;
                      int __pyx_t_6;
                      int __pyx_t_7;
                      PyObject *__pyx_t_8 = NULL;
                      std::shared_ptr< arrow::io::MemoryMappedFile>  __pyx_t_9;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("_open", 0);

                      /* "pyarrow/io.pxi":1069
 * 
 *     def _open(self, path, mode='r'):
 *         self.path = path             # <<<<<<<<<<<<<<
 * 
 *         cdef:
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "path");
                        __PYX_ERR(6, 1069, __pyx_L1_error)
                      }
                      __Pyx_INCREF(__pyx_v_path);
                      __Pyx_GIVEREF(__pyx_v_path);
                      __Pyx_GOTREF(__pyx_v_self->path);
                      __Pyx_DECREF(__pyx_v_self->path);
                      __pyx_v_self->path = __pyx_v_path;

                      /* "pyarrow/io.pxi":1074
 *             FileMode c_mode
 *             shared_ptr[CMemoryMappedFile] handle
 *             c_string c_path = encode_file_path(path)             # <<<<<<<<<<<<<<
 * 
 *         if mode in ('r', 'rb'):
*/
                      __pyx_t_2 = NULL;
                      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_encode_file_path); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 1074, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_3);
                      __pyx_t_4 = 1;
                      #if CYTHON_UNPACK_METHODS
                      if (unlikely(PyMethod_Check(__pyx_t_3))) {
                        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
                        assert(__pyx_t_2);
                        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
                        __Pyx_INCREF(__pyx_t_2);
                        __Pyx_INCREF(__pyx__function);
                        __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
                        __pyx_t_4 = 0;
                      }
                      #endif
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_path};
                        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 1074, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __pyx_t_5 = __pyx_convert_string_from_py_6libcpp_6string_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 1074, __pyx_L1_error)
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      __pyx_v_c_path = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_5);

                      /* "pyarrow/io.pxi":1076
 *             c_string c_path = encode_file_path(path)
 * 
 *         if mode in ('r', 'rb'):             # <<<<<<<<<<<<<<
 *             c_mode = FileMode_READ
 *             self.is_readable = True
*/
                      __Pyx_INCREF(__pyx_v_mode);
                      __pyx_t_1 = __pyx_v_mode;
                      __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_r, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(6, 1076, __pyx_L1_error)
                      if (!__pyx_t_7) {
                      } else {
                        __pyx_t_6 = __pyx_t_7;
                        goto __pyx_L4_bool_binop_done;
                      }
                      __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_rb_2, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(6, 1076, __pyx_L1_error)
                      __pyx_t_6 = __pyx_t_7;
                      __pyx_L4_bool_binop_done:;
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      __pyx_t_7 = __pyx_t_6;
                      if (__pyx_t_7) {

                        /* "pyarrow/io.pxi":1077
 * 
 *         if mode in ('r', 'rb'):
 *             c_mode = FileMode_READ             # <<<<<<<<<<<<<<
 *             self.is_readable = True
 *         elif mode in ('w', 'wb'):
*/
                        __pyx_v_c_mode =  arrow::io::FileMode::READ;

                        /* "pyarrow/io.pxi":1078
 *         if mode in ('r', 'rb'):
 *             c_mode = FileMode_READ
 *             self.is_readable = True             # <<<<<<<<<<<<<<
 *         elif mode in ('w', 'wb'):
 *             c_mode = FileMode_WRITE
*/
                        if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "is_readable");
                          __PYX_ERR(6, 1078, __pyx_L1_error)
                        }
                        __pyx_v_self->__pyx_base.is_readable = 1;

                        /* "pyarrow/io.pxi":1076
 *             c_string c_path = encode_file_path(path)
 * 
 *         if mode in ('r', 'rb'):             # <<<<<<<<<<<<<<
 *             c_mode = FileMode_READ
 *             self.is_readable = True
*/
                        goto __pyx_L3;
                      }

                      /* "pyarrow/io.pxi":1079
 *             c_mode = FileMode_READ
 *             self.is_readable = True
 *         elif mode in ('w', 'wb'):             # <<<<<<<<<<<<<<
 *             c_mode = FileMode_WRITE
 *             self.is_writable = True
*/
                      __Pyx_INCREF(__pyx_v_mode);
                      __pyx_t_1 = __pyx_v_mode;
                      __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_w, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(6, 1079, __pyx_L1_error)
                      if (!__pyx_t_6) {
                      } else {
                        __pyx_t_7 = __pyx_t_6;
                        goto __pyx_L6_bool_binop_done;
                      }
                      __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_wb, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(6, 1079, __pyx_L1_error)
                      __pyx_t_7 = __pyx_t_6;
                      __pyx_L6_bool_binop_done:;
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      __pyx_t_6 = __pyx_t_7;
                      if (__pyx_t_6) {

                        /* "pyarrow/io.pxi":1080
 *             self.is_readable = True
 *         elif mode in ('w', 'wb'):
 *             c_mode = FileMode_WRITE             # <<<<<<<<<<<<<<
 *             self.is_writable = True
 *         elif mode in ('r+', 'r+b', 'rb+'):
*/
                        __pyx_v_c_mode =  arrow::io::FileMode::WRITE;

                        /* "pyarrow/io.pxi":1081
 *         elif mode in ('w', 'wb'):
 *             c_mode = FileMode_WRITE
 *             self.is_writable = True             # <<<<<<<<<<<<<<
 *         elif mode in ('r+', 'r+b', 'rb+'):
 *             c_mode = FileMode_READWRITE
*/
                        if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "is_writable");
                          __PYX_ERR(6, 1081, __pyx_L1_error)
                        }
                        __pyx_v_self->__pyx_base.is_writable = 1;

                        /* "pyarrow/io.pxi":1079
 *             c_mode = FileMode_READ
 *             self.is_readable = True
 *         elif mode in ('w', 'wb'):             # <<<<<<<<<<<<<<
 *             c_mode = FileMode_WRITE
 *             self.is_writable = True
*/
                        goto __pyx_L3;
                      }

                      /* "pyarrow/io.pxi":1082
 *             c_mode = FileMode_WRITE
 *             self.is_writable = True
 *         elif mode in ('r+', 'r+b', 'rb+'):             # <<<<<<<<<<<<<<
 *             c_mode = FileMode_READWRITE
 *             self.is_readable = True
*/
                      __Pyx_INCREF(__pyx_v_mode);
                      __pyx_t_1 = __pyx_v_mode;
                      __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_mstate_global->__pyx_kp_u_r_2, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(6, 1082, __pyx_L1_error)
                      if (!__pyx_t_7) {
                      } else {
                        __pyx_t_6 = __pyx_t_7;
                        goto __pyx_L8_bool_binop_done;
                      }
                      __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_mstate_global->__pyx_kp_u_r_b, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(6, 1082, __pyx_L1_error)
                      if (!__pyx_t_7) {
                      } else {
                        __pyx_t_6 = __pyx_t_7;
                        goto __pyx_L8_bool_binop_done;
                      }
                      __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_mstate_global->__pyx_kp_u_rb, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(6, 1082, __pyx_L1_error)
                      __pyx_t_6 = __pyx_t_7;
                      __pyx_L8_bool_binop_done:;
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      __pyx_t_7 = __pyx_t_6;
                      if (likely(__pyx_t_7)) {

                        /* "pyarrow/io.pxi":1083
 *             self.is_writable = True
 *         elif mode in ('r+', 'r+b', 'rb+'):
 *             c_mode = FileMode_READWRITE             # <<<<<<<<<<<<<<
 *             self.is_readable = True
 *             self.is_writable = True
*/
                        __pyx_v_c_mode =  arrow::io::FileMode::READWRITE;

                        /* "pyarrow/io.pxi":1084
 *         elif mode in ('r+', 'r+b', 'rb+'):
 *             c_mode = FileMode_READWRITE
 *             self.is_readable = True             # <<<<<<<<<<<<<<
 *             self.is_writable = True
 *         else:
*/
                        if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "is_readable");
                          __PYX_ERR(6, 1084, __pyx_L1_error)
                        }
                        __pyx_v_self->__pyx_base.is_readable = 1;

                        /* "pyarrow/io.pxi":1085
 *             c_mode = FileMode_READWRITE
 *             self.is_readable = True
 *             self.is_writable = True             # <<<<<<<<<<<<<<
 *         else:
 *             raise ValueError(f'Invalid file mode: {mode}')
*/
                        if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "is_writable");
                          __PYX_ERR(6, 1085, __pyx_L1_error)
                        }
                        __pyx_v_self->__pyx_base.is_writable = 1;

                        /* "pyarrow/io.pxi":1082
 *             c_mode = FileMode_WRITE
 *             self.is_writable = True
 *         elif mode in ('r+', 'r+b', 'rb+'):             # <<<<<<<<<<<<<<
 *             c_mode = FileMode_READWRITE
 *             self.is_readable = True
*/
                        goto __pyx_L3;
                      }

                      /* "pyarrow/io.pxi":1087
 *             self.is_writable = True
 *         else:
 *             raise ValueError(f'Invalid file mode: {mode}')             # <<<<<<<<<<<<<<
 * 
 *         with nogil:
*/
                      /*else*/ {
                        __pyx_t_3 = NULL;
                        __pyx_t_2 = __Pyx_PyObject_FormatSimple(__pyx_v_mode, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 1087, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_2);
                        __pyx_t_8 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_Invalid_file_mode, __pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(6, 1087, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_8);
                        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                        __pyx_t_4 = 1;
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_8};
                          __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                          if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 1087, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_1);
                        }
                        __Pyx_Raise(__pyx_t_1, 0, 0, 0);
                        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                        __PYX_ERR(6, 1087, __pyx_L1_error)
                      }
                      __pyx_L3:;

                      /* "pyarrow/io.pxi":1089
 *             raise ValueError(f'Invalid file mode: {mode}')
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             handle = GetResultValue(CMemoryMappedFile.Open(c_path, c_mode))
 * 
*/
                      {
                          PyThreadState * _save;
                          _save = PyEval_SaveThread();
                          __Pyx_FastGIL_Remember();
                          /*try:*/ {

                            /* "pyarrow/io.pxi":1090
 * 
 *         with nogil:
 *             handle = GetResultValue(CMemoryMappedFile.Open(c_path, c_mode))             # <<<<<<<<<<<<<<
 * 
 *         self.set_output_stream(<shared_ptr[COutputStream]> handle)
*/
                            __pyx_t_9 = arrow::py::GetResultValue<std::shared_ptr< arrow::io::MemoryMappedFile> >( arrow::io::MemoryMappedFile::Open(__pyx_v_c_path, __pyx_v_c_mode)); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(6, 1090, __pyx_L12_error)
                            __pyx_v_handle = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_9);
                          }

                          /* "pyarrow/io.pxi":1089
 *             raise ValueError(f'Invalid file mode: {mode}')
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             handle = GetResultValue(CMemoryMappedFile.Open(c_path, c_mode))
 * 
*/
                          /*finally:*/ {
                            /*normal exit:*/{
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L13;
                            }
                            __pyx_L12_error: {
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L1_error;
                            }
                            __pyx_L13:;
                          }
                      }

                      /* "pyarrow/io.pxi":1092
 *             handle = GetResultValue(CMemoryMappedFile.Open(c_path, c_mode))
 * 
 *         self.set_output_stream(<shared_ptr[COutputStream]> handle)             # <<<<<<<<<<<<<<
 *         self.set_random_access_file(<shared_ptr[CRandomAccessFile]> handle)
 *         self.handle = handle
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "set_output_stream");
                        __PYX_ERR(6, 1092, __pyx_L1_error)
                      }
                      __pyx_t_1 = ((struct __pyx_vtabstruct_7pyarrow_3lib_MemoryMappedFile *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.set_output_stream(((struct __pyx_obj_7pyarrow_3lib_NativeFile *)__pyx_v_self), ((std::shared_ptr< arrow::io::OutputStream> )__pyx_v_handle)); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 1092, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

                      /* "pyarrow/io.pxi":1093
 * 
 *         self.set_output_stream(<shared_ptr[COutputStream]> handle)
 *         self.set_random_access_file(<shared_ptr[CRandomAccessFile]> handle)             # <<<<<<<<<<<<<<
 *         self.handle = handle
 * 
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "set_random_access_file");
                        __PYX_ERR(6, 1093, __pyx_L1_error)
                      }
                      __pyx_t_1 = ((struct __pyx_vtabstruct_7pyarrow_3lib_MemoryMappedFile *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.set_random_access_file(((struct __pyx_obj_7pyarrow_3lib_NativeFile *)__pyx_v_self), ((std::shared_ptr< arrow::io::RandomAccessFile> )__pyx_v_handle)); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 1093, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

                      /* "pyarrow/io.pxi":1094
 *         self.set_output_stream(<shared_ptr[COutputStream]> handle)
 *         self.set_random_access_file(<shared_ptr[CRandomAccessFile]> handle)
 *         self.handle = handle             # <<<<<<<<<<<<<<
 * 
 *     def resize(self, new_size):
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "handle");
                        __PYX_ERR(6, 1094, __pyx_L1_error)
                      }
                      __pyx_v_self->handle = __pyx_v_handle;

                      /* "pyarrow/io.pxi":1068
 *         return result
 * 
 *     def _open(self, path, mode='r'):             # <<<<<<<<<<<<<<
 *         self.path = path
 * 
*/

                      /* 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_8);
                      __Pyx_AddTraceback("pyarrow.lib.MemoryMappedFile._open", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":1096
 *         self.handle = handle
 * 
 *     def resize(self, new_size):             # <<<<<<<<<<<<<<
 *         """
 *         Resize the map and underlying file.
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_16MemoryMappedFile_5resize(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_16MemoryMappedFile_4resize, "MemoryMappedFile.resize(self, new_size)\n\nResize the map and underlying file.\n\nParameters\n----------\nnew_size : new size in bytes");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_16MemoryMappedFile_5resize = {"resize", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_16MemoryMappedFile_5resize, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_16MemoryMappedFile_4resize};
                    static PyObject *__pyx_pw_7pyarrow_3lib_16MemoryMappedFile_5resize(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      PyObject *__pyx_v_new_size = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[1] = {0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("resize (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_new_size,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(6, 1096, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 1096, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "resize", 0) < (0)) __PYX_ERR(6, 1096, __pyx_L3_error)
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("resize", 1, 1, 1, i); __PYX_ERR(6, 1096, __pyx_L3_error) }
                          }
                        } else if (unlikely(__pyx_nargs != 1)) {
                          goto __pyx_L5_argtuple_error;
                        } else {
                          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 1096, __pyx_L3_error)
                        }
                        __pyx_v_new_size = values[0];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("resize", 1, 1, 1, __pyx_nargs); __PYX_ERR(6, 1096, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.MemoryMappedFile.resize", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_16MemoryMappedFile_4resize(((struct __pyx_obj_7pyarrow_3lib_MemoryMappedFile *)__pyx_v_self), __pyx_v_new_size);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_16MemoryMappedFile_4resize(struct __pyx_obj_7pyarrow_3lib_MemoryMappedFile *__pyx_v_self, PyObject *__pyx_v_new_size) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int64_t __pyx_t_1;
                      int __pyx_t_2;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("resize", 0);

                      /* "pyarrow/io.pxi":1104
 *         new_size : new size in bytes
 *         """
 *         check_status(self.handle.get().Resize(new_size))             # <<<<<<<<<<<<<<
 * 
 *     def fileno(self):
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "handle");
                        __PYX_ERR(6, 1104, __pyx_L1_error)
                      }
                      __pyx_t_1 = __Pyx_PyLong_As_int64_t(__pyx_v_new_size); if (unlikely((__pyx_t_1 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(6, 1104, __pyx_L1_error)
                      __pyx_t_2 = __pyx_f_7pyarrow_3lib_check_status(__pyx_v_self->handle.get()->Resize(__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(6, 1104, __pyx_L1_error)

                      /* "pyarrow/io.pxi":1096
 *         self.handle = handle
 * 
 *     def resize(self, new_size):             # <<<<<<<<<<<<<<
 *         """
 *         Resize the map and underlying file.
*/

                      /* function exit code */
                      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib.MemoryMappedFile.resize", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":1106
 *         check_status(self.handle.get().Resize(new_size))
 * 
 *     def fileno(self):             # <<<<<<<<<<<<<<
 *         self._assert_open()
 *         return self.handle.get().file_descriptor()
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_16MemoryMappedFile_7fileno(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_16MemoryMappedFile_6fileno, "MemoryMappedFile.fileno(self)");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_16MemoryMappedFile_7fileno = {"fileno", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_16MemoryMappedFile_7fileno, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_16MemoryMappedFile_6fileno};
                    static PyObject *__pyx_pw_7pyarrow_3lib_16MemoryMappedFile_7fileno(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("fileno (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("fileno", 1, 0, 0, __pyx_nargs); return NULL; }
                      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                      if (unlikely(__pyx_kwds_len < 0)) return NULL;
                      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("fileno", __pyx_kwds); return NULL;}
                      __pyx_r = __pyx_pf_7pyarrow_3lib_16MemoryMappedFile_6fileno(((struct __pyx_obj_7pyarrow_3lib_MemoryMappedFile *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_16MemoryMappedFile_6fileno(struct __pyx_obj_7pyarrow_3lib_MemoryMappedFile *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      size_t __pyx_t_3;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("fileno", 0);

                      /* "pyarrow/io.pxi":1107
 * 
 *     def fileno(self):
 *         self._assert_open()             # <<<<<<<<<<<<<<
 *         return self.handle.get().file_descriptor()
 * 
*/
                      __pyx_t_2 = ((PyObject *)__pyx_v_self);
                      __Pyx_INCREF(__pyx_t_2);
                      __pyx_t_3 = 0;
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
                        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_assert_open, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 1107, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

                      /* "pyarrow/io.pxi":1108
 *     def fileno(self):
 *         self._assert_open()
 *         return self.handle.get().file_descriptor()             # <<<<<<<<<<<<<<
 * 
 * 
*/
                      __Pyx_XDECREF(__pyx_r);
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "handle");
                        __PYX_ERR(6, 1108, __pyx_L1_error)
                      }
                      __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_v_self->handle.get()->file_descriptor()); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 1108, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_r = __pyx_t_1;
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/io.pxi":1106
 *         check_status(self.handle.get().Resize(new_size))
 * 
 *     def fileno(self):             # <<<<<<<<<<<<<<
 *         self._assert_open()
 *         return self.handle.get().file_descriptor()
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_AddTraceback("pyarrow.lib.MemoryMappedFile.fileno", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_16MemoryMappedFile_9__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_16MemoryMappedFile_8__reduce_cython__, "MemoryMappedFile.__reduce_cython__(self)");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_16MemoryMappedFile_9__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_16MemoryMappedFile_9__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_16MemoryMappedFile_8__reduce_cython__};
                    static PyObject *__pyx_pw_7pyarrow_3lib_16MemoryMappedFile_9__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; }
                      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                      if (unlikely(__pyx_kwds_len < 0)) return NULL;
                      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;}
                      __pyx_r = __pyx_pf_7pyarrow_3lib_16MemoryMappedFile_8__reduce_cython__(((struct __pyx_obj_7pyarrow_3lib_MemoryMappedFile *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_16MemoryMappedFile_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_MemoryMappedFile *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__reduce_cython__", 0);

                      /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/
                      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0);
                      __PYX_ERR(7, 2, __pyx_L1_error)

                      /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib.MemoryMappedFile.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_16MemoryMappedFile_11__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_16MemoryMappedFile_10__setstate_cython__, "MemoryMappedFile.__setstate_cython__(self, __pyx_state)");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_16MemoryMappedFile_11__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_16MemoryMappedFile_11__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_16MemoryMappedFile_10__setstate_cython__};
                    static PyObject *__pyx_pw_7pyarrow_3lib_16MemoryMappedFile_11__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[1] = {0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(7, 3, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(7, 3, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(7, 3, __pyx_L3_error)
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(7, 3, __pyx_L3_error) }
                          }
                        } else if (unlikely(__pyx_nargs != 1)) {
                          goto __pyx_L5_argtuple_error;
                        } else {
                          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(7, 3, __pyx_L3_error)
                        }
                        __pyx_v___pyx_state = values[0];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(7, 3, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.MemoryMappedFile.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_16MemoryMappedFile_10__setstate_cython__(((struct __pyx_obj_7pyarrow_3lib_MemoryMappedFile *)__pyx_v_self), __pyx_v___pyx_state);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_16MemoryMappedFile_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_MemoryMappedFile *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__setstate_cython__", 0);

                      /* "(tree fragment)":4
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
*/
                      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0);
                      __PYX_ERR(7, 4, __pyx_L1_error)

                      /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib.MemoryMappedFile.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":1111
 * 
 * 
 * def memory_map(path, mode='r'):             # <<<<<<<<<<<<<<
 *     """
 *     Open memory map at file path. Size of the memory map cannot change.
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_241memory_map(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_240memory_map, "memory_map(path, mode='r')\n\nOpen memory map at file path. Size of the memory map cannot change.\n\nParameters\n----------\npath : str\nmode : {'r', 'r+', 'w'}, default 'r'\n    Whether the file is opened for reading ('r'), writing ('w')\n    or both ('r+').\n\nReturns\n-------\nmmap : MemoryMappedFile\n\nExamples\n--------\nReading from a memory map without any memory allocation or copying:\n\n>>> import pyarrow as pa\n>>> with pa.output_stream('example_mmap.txt') as stream:\n...     stream.write(b'Constructing a buffer referencing the mapped memory')\n...\n51\n>>> with pa.memory_map('example_mmap.txt') as mmap:\n...     mmap.read_at(6,45)\n...\nb'memory'");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_241memory_map = {"memory_map", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_241memory_map, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_240memory_map};
                    static PyObject *__pyx_pw_7pyarrow_3lib_241memory_map(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      PyObject *__pyx_v_path = 0;
                      PyObject *__pyx_v_mode = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[2] = {0,0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("memory_map (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_path,&__pyx_mstate_global->__pyx_n_u_mode,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(6, 1111, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  2:
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(6, 1111, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 1111, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "memory_map", 0) < (0)) __PYX_ERR(6, 1111, __pyx_L3_error)
                          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_n_u_r)));
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("memory_map", 0, 1, 2, i); __PYX_ERR(6, 1111, __pyx_L3_error) }
                          }
                        } else {
                          switch (__pyx_nargs) {
                            case  2:
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(6, 1111, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 1111, __pyx_L3_error)
                            break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_n_u_r)));
                        }
                        __pyx_v_path = values[0];
                        __pyx_v_mode = values[1];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("memory_map", 0, 1, 2, __pyx_nargs); __PYX_ERR(6, 1111, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.memory_map", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_240memory_map(__pyx_self, __pyx_v_path, __pyx_v_mode);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_240memory_map(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_path, PyObject *__pyx_v_mode) {
                      struct __pyx_obj_7pyarrow_3lib_MemoryMappedFile *__pyx_v_mmap = 0;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      size_t __pyx_t_3;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("memory_map", 0);

                      /* "pyarrow/io.pxi":1140
 *     b'memory'
 *     """
 *     _check_is_file(path)             # <<<<<<<<<<<<<<
 * 
 *     cdef MemoryMappedFile mmap = MemoryMappedFile()
*/
                      __pyx_t_1 = __pyx_f_7pyarrow_3lib__check_is_file(__pyx_v_path); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 1140, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

                      /* "pyarrow/io.pxi":1142
 *     _check_is_file(path)
 * 
 *     cdef MemoryMappedFile mmap = MemoryMappedFile()             # <<<<<<<<<<<<<<
 *     mmap._open(path, mode)
 *     return mmap
*/
                      __pyx_t_2 = NULL;
                      __pyx_t_3 = 1;
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
                        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_MemoryMappedFile, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 1142, __pyx_L1_error)
                        __Pyx_GOTREF((PyObject *)__pyx_t_1);
                      }
                      __pyx_v_mmap = ((struct __pyx_obj_7pyarrow_3lib_MemoryMappedFile *)__pyx_t_1);
                      __pyx_t_1 = 0;

                      /* "pyarrow/io.pxi":1143
 * 
 *     cdef MemoryMappedFile mmap = MemoryMappedFile()
 *     mmap._open(path, mode)             # <<<<<<<<<<<<<<
 *     return mmap
 * 
*/
                      __pyx_t_2 = ((PyObject *)__pyx_v_mmap);
                      __Pyx_INCREF(__pyx_t_2);
                      __pyx_t_3 = 0;
                      {
                        PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_path, __pyx_v_mode};
                        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_open_2, __pyx_callargs+__pyx_t_3, (3-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 1143, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

                      /* "pyarrow/io.pxi":1144
 *     cdef MemoryMappedFile mmap = MemoryMappedFile()
 *     mmap._open(path, mode)
 *     return mmap             # <<<<<<<<<<<<<<
 * 
 * 
*/
                      __Pyx_XDECREF(__pyx_r);
                      __Pyx_INCREF((PyObject *)__pyx_v_mmap);
                      __pyx_r = ((PyObject *)__pyx_v_mmap);
                      goto __pyx_L0;

                      /* "pyarrow/io.pxi":1111
 * 
 * 
 * def memory_map(path, mode='r'):             # <<<<<<<<<<<<<<
 *     """
 *     Open memory map at file path. Size of the memory map cannot change.
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_AddTraceback("pyarrow.lib.memory_map", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XDECREF((PyObject *)__pyx_v_mmap);
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":1147
 * 
 * 
 * cdef _check_is_file(path):             # <<<<<<<<<<<<<<
 *     if os.path.isdir(path):
 *         raise IOError(f"Expected file path, but {path} is a directory")
*/

                    static PyObject *__pyx_f_7pyarrow_3lib__check_is_file(PyObject *__pyx_v_path) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      PyObject *__pyx_t_3 = NULL;
                      PyObject *__pyx_t_4 = NULL;
                      size_t __pyx_t_5;
                      int __pyx_t_6;
                      PyObject *__pyx_t_7[3];
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("_check_is_file", 0);

                      /* "pyarrow/io.pxi":1148
 * 
 * cdef _check_is_file(path):
 *     if os.path.isdir(path):             # <<<<<<<<<<<<<<
 *         raise IOError(f"Expected file path, but {path} is a directory")
 * 
*/
                      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_os); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 1148, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_3);
                      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_path); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 1148, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_4);
                      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                      __pyx_t_2 = __pyx_t_4;
                      __Pyx_INCREF(__pyx_t_2);
                      __pyx_t_5 = 0;
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_path};
                        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_isdir, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 1148, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(6, 1148, __pyx_L1_error)
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      if (unlikely(__pyx_t_6)) {

                        /* "pyarrow/io.pxi":1149
 * cdef _check_is_file(path):
 *     if os.path.isdir(path):
 *         raise IOError(f"Expected file path, but {path} is a directory")             # <<<<<<<<<<<<<<
 * 
 * 
*/
                        __pyx_t_4 = NULL;
                        __pyx_t_2 = __Pyx_PyObject_FormatSimple(__pyx_v_path, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 1149, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_2);
                        __pyx_t_7[0] = __pyx_mstate_global->__pyx_kp_u_Expected_file_path_but;
                        __pyx_t_7[1] = __pyx_t_2;
                        __pyx_t_7[2] = __pyx_mstate_global->__pyx_kp_u_is_a_directory;
                        __pyx_t_3 = __Pyx_PyUnicode_Join(__pyx_t_7, 3, 24 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2) + 15, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2));
                        if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 1149, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_3);
                        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                        __pyx_t_5 = 1;
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3};
                          __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_IOError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __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(6, 1149, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_1);
                        }
                        __Pyx_Raise(__pyx_t_1, 0, 0, 0);
                        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                        __PYX_ERR(6, 1149, __pyx_L1_error)

                        /* "pyarrow/io.pxi":1148
 * 
 * cdef _check_is_file(path):
 *     if os.path.isdir(path):             # <<<<<<<<<<<<<<
 *         raise IOError(f"Expected file path, but {path} is a directory")
 * 
*/
                      }

                      /* "pyarrow/io.pxi":1147
 * 
 * 
 * cdef _check_is_file(path):             # <<<<<<<<<<<<<<
 *     if os.path.isdir(path):
 *         raise IOError(f"Expected file path, but {path} is a directory")
*/

                      /* 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("pyarrow.lib._check_is_file", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = 0;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":1152
 * 
 * 
 * def create_memory_map(path, size):             # <<<<<<<<<<<<<<
 *     """
 *     Create a file of the given size and memory-map it.
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_243create_memory_map(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_242create_memory_map, "create_memory_map(path, size)\n\nCreate a file of the given size and memory-map it.\n\nParameters\n----------\npath : str\n    The file path to create, on the local filesystem.\nsize : int\n    The file size to create.\n\nReturns\n-------\nmmap : MemoryMappedFile\n\nExamples\n--------\nCreate a file with a memory map:\n\n>>> import pyarrow as pa\n>>> with pa.create_memory_map('example_mmap_create.dat', 27) as mmap:\n...     mmap.write(b'Create a memory-mapped file')\n...     mmap.read_at(10, 9)\n...\n27\nb'memory-map'");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_243create_memory_map = {"create_memory_map", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_243create_memory_map, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_242create_memory_map};
                    static PyObject *__pyx_pw_7pyarrow_3lib_243create_memory_map(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      PyObject *__pyx_v_path = 0;
                      PyObject *__pyx_v_size = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[2] = {0,0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("create_memory_map (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_path,&__pyx_mstate_global->__pyx_n_u_size,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(6, 1152, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  2:
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(6, 1152, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 1152, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "create_memory_map", 0) < (0)) __PYX_ERR(6, 1152, __pyx_L3_error)
                          for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("create_memory_map", 1, 2, 2, i); __PYX_ERR(6, 1152, __pyx_L3_error) }
                          }
                        } else if (unlikely(__pyx_nargs != 2)) {
                          goto __pyx_L5_argtuple_error;
                        } else {
                          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 1152, __pyx_L3_error)
                          values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(6, 1152, __pyx_L3_error)
                        }
                        __pyx_v_path = values[0];
                        __pyx_v_size = values[1];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("create_memory_map", 1, 2, 2, __pyx_nargs); __PYX_ERR(6, 1152, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.create_memory_map", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_242create_memory_map(__pyx_self, __pyx_v_path, __pyx_v_size);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_242create_memory_map(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_path, PyObject *__pyx_v_size) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      size_t __pyx_t_3;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("create_memory_map", 0);

                      /* "pyarrow/io.pxi":1179
 *     b'memory-map'
 *     """
 *     return MemoryMappedFile.create(path, size)             # <<<<<<<<<<<<<<
 * 
 * 
*/
                      __Pyx_XDECREF(__pyx_r);
                      __pyx_t_2 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_MemoryMappedFile);
                      __Pyx_INCREF(__pyx_t_2);
                      __pyx_t_3 = 0;
                      {
                        PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_path, __pyx_v_size};
                        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_create, __pyx_callargs+__pyx_t_3, (3-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 1179, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __pyx_r = __pyx_t_1;
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/io.pxi":1152
 * 
 * 
 * def create_memory_map(path, size):             # <<<<<<<<<<<<<<
 *     """
 *     Create a file of the given size and memory-map it.
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_AddTraceback("pyarrow.lib.create_memory_map", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":1230
 *         object path
 * 
 *     def __cinit__(self, path, mode='r', MemoryPool memory_pool=None):             # <<<<<<<<<<<<<<
 *         _check_is_file(path)
 *         self.path = path
*/

                    /* Python wrapper */
                    static int __pyx_pw_7pyarrow_3lib_6OSFile_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
                    static int __pyx_pw_7pyarrow_3lib_6OSFile_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
                      PyObject *__pyx_v_path = 0;
                      PyObject *__pyx_v_mode = 0;
                      struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_memory_pool = 0;
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[3] = {0,0,0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      int __pyx_r;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_path,&__pyx_mstate_global->__pyx_n_u_mode,&__pyx_mstate_global->__pyx_n_u_memory_pool,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(6, 1230, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  3:
                            values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(6, 1230, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  2:
                            values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(6, 1230, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 1230, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__cinit__", 0) < (0)) __PYX_ERR(6, 1230, __pyx_L3_error)
                          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_n_u_r));
                          if (!values[2]) values[2] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)Py_None));
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 1, 3, i); __PYX_ERR(6, 1230, __pyx_L3_error) }
                          }
                        } else {
                          switch (__pyx_nargs) {
                            case  3:
                            values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(6, 1230, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  2:
                            values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(6, 1230, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 1230, __pyx_L3_error)
                            break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_n_u_r));
                          if (!values[2]) values[2] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)Py_None));
                        }
                        __pyx_v_path = values[0];
                        __pyx_v_mode = values[1];
                        __pyx_v_memory_pool = ((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)values[2]);
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 1, 3, __pyx_nargs); __PYX_ERR(6, 1230, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.OSFile.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return -1;
                      __pyx_L4_argument_unpacking_done:;
                      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_memory_pool), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_MemoryPool, 1, "memory_pool", 0))) __PYX_ERR(6, 1230, __pyx_L1_error)
                      __pyx_r = __pyx_pf_7pyarrow_3lib_6OSFile___cinit__(((struct __pyx_obj_7pyarrow_3lib_OSFile *)__pyx_v_self), __pyx_v_path, __pyx_v_mode, __pyx_v_memory_pool);

                      /* function exit code */
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __pyx_r = -1;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      goto __pyx_L7_cleaned_up;
                      __pyx_L0:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __pyx_L7_cleaned_up:;
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static int __pyx_pf_7pyarrow_3lib_6OSFile___cinit__(struct __pyx_obj_7pyarrow_3lib_OSFile *__pyx_v_self, PyObject *__pyx_v_path, PyObject *__pyx_v_mode, struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_memory_pool) {
                      std::string __pyx_v_c_path;
                      int __pyx_r;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      PyObject *__pyx_t_3 = NULL;
                      size_t __pyx_t_4;
                      std::string __pyx_t_5;
                      int __pyx_t_6;
                      int __pyx_t_7;
                       arrow::MemoryPool *__pyx_t_8;
                      struct __pyx_opt_args_7pyarrow_3lib_6OSFile__open_writable __pyx_t_9;
                      PyObject *__pyx_t_10 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__cinit__", 0);

                      /* "pyarrow/io.pxi":1231
 * 
 *     def __cinit__(self, path, mode='r', MemoryPool memory_pool=None):
 *         _check_is_file(path)             # <<<<<<<<<<<<<<
 *         self.path = path
 * 
*/
                      __pyx_t_1 = __pyx_f_7pyarrow_3lib__check_is_file(__pyx_v_path); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 1231, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

                      /* "pyarrow/io.pxi":1232
 *     def __cinit__(self, path, mode='r', MemoryPool memory_pool=None):
 *         _check_is_file(path)
 *         self.path = path             # <<<<<<<<<<<<<<
 * 
 *         cdef:
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "path");
                        __PYX_ERR(6, 1232, __pyx_L1_error)
                      }
                      __Pyx_INCREF(__pyx_v_path);
                      __Pyx_GIVEREF(__pyx_v_path);
                      __Pyx_GOTREF(__pyx_v_self->path);
                      __Pyx_DECREF(__pyx_v_self->path);
                      __pyx_v_self->path = __pyx_v_path;

                      /* "pyarrow/io.pxi":1237
 *             FileMode c_mode
 *             shared_ptr[Readable] handle
 *             c_string c_path = encode_file_path(path)             # <<<<<<<<<<<<<<
 * 
 *         if mode in ('r', 'rb'):
*/
                      __pyx_t_2 = NULL;
                      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_encode_file_path); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 1237, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_3);
                      __pyx_t_4 = 1;
                      #if CYTHON_UNPACK_METHODS
                      if (unlikely(PyMethod_Check(__pyx_t_3))) {
                        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
                        assert(__pyx_t_2);
                        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
                        __Pyx_INCREF(__pyx_t_2);
                        __Pyx_INCREF(__pyx__function);
                        __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
                        __pyx_t_4 = 0;
                      }
                      #endif
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_path};
                        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 1237, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __pyx_t_5 = __pyx_convert_string_from_py_6libcpp_6string_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 1237, __pyx_L1_error)
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      __pyx_v_c_path = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_5);

                      /* "pyarrow/io.pxi":1239
 *             c_string c_path = encode_file_path(path)
 * 
 *         if mode in ('r', 'rb'):             # <<<<<<<<<<<<<<
 *             self._open_readable(c_path, maybe_unbox_memory_pool(memory_pool))
 *         elif mode in ('w', 'wb'):
*/
                      __Pyx_INCREF(__pyx_v_mode);
                      __pyx_t_1 = __pyx_v_mode;
                      __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_r, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(6, 1239, __pyx_L1_error)
                      if (!__pyx_t_7) {
                      } else {
                        __pyx_t_6 = __pyx_t_7;
                        goto __pyx_L4_bool_binop_done;
                      }
                      __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_rb_2, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(6, 1239, __pyx_L1_error)
                      __pyx_t_6 = __pyx_t_7;
                      __pyx_L4_bool_binop_done:;
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      __pyx_t_7 = __pyx_t_6;
                      if (__pyx_t_7) {

                        /* "pyarrow/io.pxi":1240
 * 
 *         if mode in ('r', 'rb'):
 *             self._open_readable(c_path, maybe_unbox_memory_pool(memory_pool))             # <<<<<<<<<<<<<<
 *         elif mode in ('w', 'wb'):
 *             self._open_writable(c_path)
*/
                        if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_open_readable");
                          __PYX_ERR(6, 1240, __pyx_L1_error)
                        }
                        __pyx_t_8 = __pyx_f_7pyarrow_3lib_maybe_unbox_memory_pool(__pyx_v_memory_pool); if (unlikely(__pyx_t_8 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(6, 1240, __pyx_L1_error)
                        __pyx_t_1 = ((struct __pyx_vtabstruct_7pyarrow_3lib_OSFile *)__pyx_v_self->__pyx_base.__pyx_vtab)->_open_readable(__pyx_v_self, __pyx_v_c_path, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 1240, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

                        /* "pyarrow/io.pxi":1239
 *             c_string c_path = encode_file_path(path)
 * 
 *         if mode in ('r', 'rb'):             # <<<<<<<<<<<<<<
 *             self._open_readable(c_path, maybe_unbox_memory_pool(memory_pool))
 *         elif mode in ('w', 'wb'):
*/
                        goto __pyx_L3;
                      }

                      /* "pyarrow/io.pxi":1241
 *         if mode in ('r', 'rb'):
 *             self._open_readable(c_path, maybe_unbox_memory_pool(memory_pool))
 *         elif mode in ('w', 'wb'):             # <<<<<<<<<<<<<<
 *             self._open_writable(c_path)
 *         elif mode in ('a', 'ab'):
*/
                      __Pyx_INCREF(__pyx_v_mode);
                      __pyx_t_1 = __pyx_v_mode;
                      __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_w, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(6, 1241, __pyx_L1_error)
                      if (!__pyx_t_6) {
                      } else {
                        __pyx_t_7 = __pyx_t_6;
                        goto __pyx_L6_bool_binop_done;
                      }
                      __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_wb, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(6, 1241, __pyx_L1_error)
                      __pyx_t_7 = __pyx_t_6;
                      __pyx_L6_bool_binop_done:;
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      __pyx_t_6 = __pyx_t_7;
                      if (__pyx_t_6) {

                        /* "pyarrow/io.pxi":1242
 *             self._open_readable(c_path, maybe_unbox_memory_pool(memory_pool))
 *         elif mode in ('w', 'wb'):
 *             self._open_writable(c_path)             # <<<<<<<<<<<<<<
 *         elif mode in ('a', 'ab'):
 *             self._open_writable(c_path, append=True)
*/
                        if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_open_writable");
                          __PYX_ERR(6, 1242, __pyx_L1_error)
                        }
                        __pyx_t_1 = ((struct __pyx_vtabstruct_7pyarrow_3lib_OSFile *)__pyx_v_self->__pyx_base.__pyx_vtab)->_open_writable(__pyx_v_self, __pyx_v_c_path, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 1242, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

                        /* "pyarrow/io.pxi":1241
 *         if mode in ('r', 'rb'):
 *             self._open_readable(c_path, maybe_unbox_memory_pool(memory_pool))
 *         elif mode in ('w', 'wb'):             # <<<<<<<<<<<<<<
 *             self._open_writable(c_path)
 *         elif mode in ('a', 'ab'):
*/
                        goto __pyx_L3;
                      }

                      /* "pyarrow/io.pxi":1243
 *         elif mode in ('w', 'wb'):
 *             self._open_writable(c_path)
 *         elif mode in ('a', 'ab'):             # <<<<<<<<<<<<<<
 *             self._open_writable(c_path, append=True)
 *         else:
*/
                      __Pyx_INCREF(__pyx_v_mode);
                      __pyx_t_1 = __pyx_v_mode;
                      __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_a, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(6, 1243, __pyx_L1_error)
                      if (!__pyx_t_7) {
                      } else {
                        __pyx_t_6 = __pyx_t_7;
                        goto __pyx_L8_bool_binop_done;
                      }
                      __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_ab, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(6, 1243, __pyx_L1_error)
                      __pyx_t_6 = __pyx_t_7;
                      __pyx_L8_bool_binop_done:;
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      __pyx_t_7 = __pyx_t_6;
                      if (likely(__pyx_t_7)) {

                        /* "pyarrow/io.pxi":1244
 *             self._open_writable(c_path)
 *         elif mode in ('a', 'ab'):
 *             self._open_writable(c_path, append=True)             # <<<<<<<<<<<<<<
 *         else:
 *             raise ValueError(f'Invalid file mode: {mode}')
*/
                        if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_open_writable");
                          __PYX_ERR(6, 1244, __pyx_L1_error)
                        }
                        __pyx_t_9.__pyx_n = 1;
                        __pyx_t_9.append = 1;
                        __pyx_t_1 = ((struct __pyx_vtabstruct_7pyarrow_3lib_OSFile *)__pyx_v_self->__pyx_base.__pyx_vtab)->_open_writable(__pyx_v_self, __pyx_v_c_path, &__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 1244, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

                        /* "pyarrow/io.pxi":1243
 *         elif mode in ('w', 'wb'):
 *             self._open_writable(c_path)
 *         elif mode in ('a', 'ab'):             # <<<<<<<<<<<<<<
 *             self._open_writable(c_path, append=True)
 *         else:
*/
                        goto __pyx_L3;
                      }

                      /* "pyarrow/io.pxi":1246
 *             self._open_writable(c_path, append=True)
 *         else:
 *             raise ValueError(f'Invalid file mode: {mode}')             # <<<<<<<<<<<<<<
 * 
 *     cdef _open_readable(self, c_string path, CMemoryPool* pool):
*/
                      /*else*/ {
                        __pyx_t_3 = NULL;
                        __pyx_t_2 = __Pyx_PyObject_FormatSimple(__pyx_v_mode, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 1246, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_2);
                        __pyx_t_10 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_Invalid_file_mode, __pyx_t_2); if (unlikely(!__pyx_t_10)) __PYX_ERR(6, 1246, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_10);
                        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                        __pyx_t_4 = 1;
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_10};
                          __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                          if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 1246, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_1);
                        }
                        __Pyx_Raise(__pyx_t_1, 0, 0, 0);
                        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                        __PYX_ERR(6, 1246, __pyx_L1_error)
                      }
                      __pyx_L3:;

                      /* "pyarrow/io.pxi":1230
 *         object path
 * 
 *     def __cinit__(self, path, mode='r', MemoryPool memory_pool=None):             # <<<<<<<<<<<<<<
 *         _check_is_file(path)
 *         self.path = path
*/

                      /* function exit code */
                      __pyx_r = 0;
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_XDECREF(__pyx_t_10);
                      __Pyx_AddTraceback("pyarrow.lib.OSFile.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = -1;
                      __pyx_L0:;
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":1248
 *             raise ValueError(f'Invalid file mode: {mode}')
 * 
 *     cdef _open_readable(self, c_string path, CMemoryPool* pool):             # <<<<<<<<<<<<<<
 *         cdef shared_ptr[ReadableFile] handle
 * 
*/

                    static PyObject *__pyx_f_7pyarrow_3lib_6OSFile__open_readable(struct __pyx_obj_7pyarrow_3lib_OSFile *__pyx_v_self, std::string __pyx_v_path,  arrow::MemoryPool *__pyx_v_pool) {
                      std::shared_ptr<arrow::io::ReadableFile>  __pyx_v_handle;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      std::shared_ptr<arrow::io::ReadableFile>  __pyx_t_1;
                      PyObject *__pyx_t_2 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("_open_readable", 0);

                      /* "pyarrow/io.pxi":1251
 *         cdef shared_ptr[ReadableFile] handle
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             handle = GetResultValue(ReadableFile.Open(path, pool))
 * 
*/
                      {
                          PyThreadState * _save;
                          _save = PyEval_SaveThread();
                          __Pyx_FastGIL_Remember();
                          /*try:*/ {

                            /* "pyarrow/io.pxi":1252
 * 
 *         with nogil:
 *             handle = GetResultValue(ReadableFile.Open(path, pool))             # <<<<<<<<<<<<<<
 * 
 *         self.is_readable = True
*/
                            __pyx_t_1 = arrow::py::GetResultValue<std::shared_ptr<arrow::io::ReadableFile> >(arrow::io::ReadableFile::Open(__pyx_v_path, __pyx_v_pool)); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(6, 1252, __pyx_L4_error)
                            __pyx_v_handle = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_1);
                          }

                          /* "pyarrow/io.pxi":1251
 *         cdef shared_ptr[ReadableFile] handle
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             handle = GetResultValue(ReadableFile.Open(path, pool))
 * 
*/
                          /*finally:*/ {
                            /*normal exit:*/{
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L5;
                            }
                            __pyx_L4_error: {
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L1_error;
                            }
                            __pyx_L5:;
                          }
                      }

                      /* "pyarrow/io.pxi":1254
 *             handle = GetResultValue(ReadableFile.Open(path, pool))
 * 
 *         self.is_readable = True             # <<<<<<<<<<<<<<
 *         self.set_random_access_file(<shared_ptr[CRandomAccessFile]> handle)
 * 
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "is_readable");
                        __PYX_ERR(6, 1254, __pyx_L1_error)
                      }
                      __pyx_v_self->__pyx_base.is_readable = 1;

                      /* "pyarrow/io.pxi":1255
 * 
 *         self.is_readable = True
 *         self.set_random_access_file(<shared_ptr[CRandomAccessFile]> handle)             # <<<<<<<<<<<<<<
 * 
 *     cdef _open_writable(self, c_string path, c_bool append=False):
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "set_random_access_file");
                        __PYX_ERR(6, 1255, __pyx_L1_error)
                      }
                      __pyx_t_2 = ((struct __pyx_vtabstruct_7pyarrow_3lib_OSFile *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.set_random_access_file(((struct __pyx_obj_7pyarrow_3lib_NativeFile *)__pyx_v_self), ((std::shared_ptr< arrow::io::RandomAccessFile> )__pyx_v_handle)); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 1255, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_2);
                      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

                      /* "pyarrow/io.pxi":1248
 *             raise ValueError(f'Invalid file mode: {mode}')
 * 
 *     cdef _open_readable(self, c_string path, CMemoryPool* pool):             # <<<<<<<<<<<<<<
 *         cdef shared_ptr[ReadableFile] handle
 * 
*/

                      /* function exit code */
                      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_AddTraceback("pyarrow.lib.OSFile._open_readable", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = 0;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":1257
 *         self.set_random_access_file(<shared_ptr[CRandomAccessFile]> handle)
 * 
 *     cdef _open_writable(self, c_string path, c_bool append=False):             # <<<<<<<<<<<<<<
 *         with nogil:
 *             self.output_stream = GetResultValue(
*/

                    static PyObject *__pyx_f_7pyarrow_3lib_6OSFile__open_writable(struct __pyx_obj_7pyarrow_3lib_OSFile *__pyx_v_self, std::string __pyx_v_path, struct __pyx_opt_args_7pyarrow_3lib_6OSFile__open_writable *__pyx_optional_args) {
                      bool __pyx_v_append = ((bool)0);
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      std::shared_ptr< arrow::io::OutputStream>  __pyx_t_1;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("_open_writable", 0);
                      if (__pyx_optional_args) {
                        if (__pyx_optional_args->__pyx_n > 0) {
                          __pyx_v_append = __pyx_optional_args->append;
                        }
                      }

                      /* "pyarrow/io.pxi":1258
 * 
 *     cdef _open_writable(self, c_string path, c_bool append=False):
 *         with nogil:             # <<<<<<<<<<<<<<
 *             self.output_stream = GetResultValue(
 *                 FileOutputStream.OpenWithAppend(path, append)
*/
                      {
                          PyThreadState * _save;
                          _save = PyEval_SaveThread();
                          __Pyx_FastGIL_Remember();
                          /*try:*/ {

                            /* "pyarrow/io.pxi":1259
 *     cdef _open_writable(self, c_string path, c_bool append=False):
 *         with nogil:
 *             self.output_stream = GetResultValue(             # <<<<<<<<<<<<<<
 *                 FileOutputStream.OpenWithAppend(path, append)
 *             )
*/
                            __pyx_t_1 = arrow::py::GetResultValue<std::shared_ptr< arrow::io::OutputStream> >(arrow::io::FileOutputStream:: Open(__pyx_v_path, __pyx_v_append)); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(6, 1259, __pyx_L4_error)
                            if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                              PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "output_stream");
                              __Pyx_PyGILState_Release(__pyx_gilstate_save);
                              __PYX_ERR(6, 1259, __pyx_L4_error)
                            }
                            __pyx_v_self->__pyx_base.output_stream = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_1);
                          }

                          /* "pyarrow/io.pxi":1258
 * 
 *     cdef _open_writable(self, c_string path, c_bool append=False):
 *         with nogil:             # <<<<<<<<<<<<<<
 *             self.output_stream = GetResultValue(
 *                 FileOutputStream.OpenWithAppend(path, append)
*/
                          /*finally:*/ {
                            /*normal exit:*/{
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L5;
                            }
                            __pyx_L4_error: {
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L1_error;
                            }
                            __pyx_L5:;
                          }
                      }

                      /* "pyarrow/io.pxi":1262
 *                 FileOutputStream.OpenWithAppend(path, append)
 *             )
 *         self.is_writable = True             # <<<<<<<<<<<<<<
 *         self._is_appending = append
 * 
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "is_writable");
                        __PYX_ERR(6, 1262, __pyx_L1_error)
                      }
                      __pyx_v_self->__pyx_base.is_writable = 1;

                      /* "pyarrow/io.pxi":1263
 *             )
 *         self.is_writable = True
 *         self._is_appending = append             # <<<<<<<<<<<<<<
 * 
 *     def fileno(self):
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_is_appending");
                        __PYX_ERR(6, 1263, __pyx_L1_error)
                      }
                      __pyx_v_self->__pyx_base._is_appending = __pyx_v_append;

                      /* "pyarrow/io.pxi":1257
 *         self.set_random_access_file(<shared_ptr[CRandomAccessFile]> handle)
 * 
 *     cdef _open_writable(self, c_string path, c_bool append=False):             # <<<<<<<<<<<<<<
 *         with nogil:
 *             self.output_stream = GetResultValue(
*/

                      /* function exit code */
                      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib.OSFile._open_writable", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = 0;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":1265
 *         self._is_appending = append
 * 
 *     def fileno(self):             # <<<<<<<<<<<<<<
 *         self._assert_open()
 *         return self.handle.file_descriptor()
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_6OSFile_3fileno(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_6OSFile_2fileno, "OSFile.fileno(self)");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_6OSFile_3fileno = {"fileno", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_6OSFile_3fileno, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_6OSFile_2fileno};
                    static PyObject *__pyx_pw_7pyarrow_3lib_6OSFile_3fileno(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("fileno (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("fileno", 1, 0, 0, __pyx_nargs); return NULL; }
                      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                      if (unlikely(__pyx_kwds_len < 0)) return NULL;
                      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("fileno", __pyx_kwds); return NULL;}
                      __pyx_r = __pyx_pf_7pyarrow_3lib_6OSFile_2fileno(((struct __pyx_obj_7pyarrow_3lib_OSFile *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_6OSFile_2fileno(struct __pyx_obj_7pyarrow_3lib_OSFile *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      size_t __pyx_t_3;
                      PyObject *__pyx_t_4 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("fileno", 0);

                      /* "pyarrow/io.pxi":1266
 * 
 *     def fileno(self):
 *         self._assert_open()             # <<<<<<<<<<<<<<
 *         return self.handle.file_descriptor()
 * 
*/
                      __pyx_t_2 = ((PyObject *)__pyx_v_self);
                      __Pyx_INCREF(__pyx_t_2);
                      __pyx_t_3 = 0;
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
                        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_assert_open, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 1266, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

                      /* "pyarrow/io.pxi":1267
 *     def fileno(self):
 *         self._assert_open()
 *         return self.handle.file_descriptor()             # <<<<<<<<<<<<<<
 * 
 * 
*/
                      __Pyx_XDECREF(__pyx_r);
                      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_handle); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 1267, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_4);
                      __pyx_t_2 = __pyx_t_4;
                      __Pyx_INCREF(__pyx_t_2);
                      __pyx_t_3 = 0;
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
                        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_file_descriptor, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 1267, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __pyx_r = __pyx_t_1;
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/io.pxi":1265
 *         self._is_appending = append
 * 
 *     def fileno(self):             # <<<<<<<<<<<<<<
 *         self._assert_open()
 *         return self.handle.file_descriptor()
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_XDECREF(__pyx_t_4);
                      __Pyx_AddTraceback("pyarrow.lib.OSFile.fileno", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_6OSFile_5__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_6OSFile_4__reduce_cython__, "OSFile.__reduce_cython__(self)");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_6OSFile_5__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_6OSFile_5__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_6OSFile_4__reduce_cython__};
                    static PyObject *__pyx_pw_7pyarrow_3lib_6OSFile_5__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; }
                      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                      if (unlikely(__pyx_kwds_len < 0)) return NULL;
                      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;}
                      __pyx_r = __pyx_pf_7pyarrow_3lib_6OSFile_4__reduce_cython__(((struct __pyx_obj_7pyarrow_3lib_OSFile *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_6OSFile_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_OSFile *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__reduce_cython__", 0);

                      /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/
                      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0);
                      __PYX_ERR(7, 2, __pyx_L1_error)

                      /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib.OSFile.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_6OSFile_7__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_6OSFile_6__setstate_cython__, "OSFile.__setstate_cython__(self, __pyx_state)");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_6OSFile_7__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_6OSFile_7__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_6OSFile_6__setstate_cython__};
                    static PyObject *__pyx_pw_7pyarrow_3lib_6OSFile_7__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[1] = {0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(7, 3, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(7, 3, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(7, 3, __pyx_L3_error)
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(7, 3, __pyx_L3_error) }
                          }
                        } else if (unlikely(__pyx_nargs != 1)) {
                          goto __pyx_L5_argtuple_error;
                        } else {
                          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(7, 3, __pyx_L3_error)
                        }
                        __pyx_v___pyx_state = values[0];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(7, 3, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.OSFile.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_6OSFile_6__setstate_cython__(((struct __pyx_obj_7pyarrow_3lib_OSFile *)__pyx_v_self), __pyx_v___pyx_state);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_6OSFile_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_OSFile *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__setstate_cython__", 0);

                      /* "(tree fragment)":4
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
*/
                      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0);
                      __PYX_ERR(7, 4, __pyx_L1_error)

                      /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib.OSFile.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":1295
 *     """
 * 
 *     def __cinit__(self, Buffer buffer):             # <<<<<<<<<<<<<<
 *         self.output_stream.reset(new CFixedSizeBufferWriter(buffer.buffer))
 *         self.is_writable = True
*/

                    /* Python wrapper */
                    static int __pyx_pw_7pyarrow_3lib_21FixedSizeBufferWriter_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
                    static int __pyx_pw_7pyarrow_3lib_21FixedSizeBufferWriter_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
                      struct __pyx_obj_7pyarrow_3lib_Buffer *__pyx_v_buffer = 0;
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[1] = {0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      int __pyx_r;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_buffer,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(6, 1295, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  1:
                            values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 1295, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__cinit__", 0) < (0)) __PYX_ERR(6, 1295, __pyx_L3_error)
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, i); __PYX_ERR(6, 1295, __pyx_L3_error) }
                          }
                        } else if (unlikely(__pyx_nargs != 1)) {
                          goto __pyx_L5_argtuple_error;
                        } else {
                          values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 1295, __pyx_L3_error)
                        }
                        __pyx_v_buffer = ((struct __pyx_obj_7pyarrow_3lib_Buffer *)values[0]);
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, __pyx_nargs); __PYX_ERR(6, 1295, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.FixedSizeBufferWriter.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return -1;
                      __pyx_L4_argument_unpacking_done:;
                      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_buffer), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Buffer, 1, "buffer", 0))) __PYX_ERR(6, 1295, __pyx_L1_error)
                      __pyx_r = __pyx_pf_7pyarrow_3lib_21FixedSizeBufferWriter___cinit__(((struct __pyx_obj_7pyarrow_3lib_FixedSizeBufferWriter *)__pyx_v_self), __pyx_v_buffer);

                      /* function exit code */
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __pyx_r = -1;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      goto __pyx_L7_cleaned_up;
                      __pyx_L0:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __pyx_L7_cleaned_up:;
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static int __pyx_pf_7pyarrow_3lib_21FixedSizeBufferWriter___cinit__(struct __pyx_obj_7pyarrow_3lib_FixedSizeBufferWriter *__pyx_v_self, struct __pyx_obj_7pyarrow_3lib_Buffer *__pyx_v_buffer) {
                      int __pyx_r;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;

                      /* "pyarrow/io.pxi":1296
 * 
 *     def __cinit__(self, Buffer buffer):
 *         self.output_stream.reset(new CFixedSizeBufferWriter(buffer.buffer))             # <<<<<<<<<<<<<<
 *         self.is_writable = True
 * 
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "output_stream");
                        __PYX_ERR(6, 1296, __pyx_L1_error)
                      }
                      if (unlikely(((PyObject *)__pyx_v_buffer) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "buffer");
                        __PYX_ERR(6, 1296, __pyx_L1_error)
                      }
                      __pyx_v_self->__pyx_base.output_stream.reset(new  arrow::io::FixedSizeBufferWriter(__pyx_v_buffer->buffer));

                      /* "pyarrow/io.pxi":1297
 *     def __cinit__(self, Buffer buffer):
 *         self.output_stream.reset(new CFixedSizeBufferWriter(buffer.buffer))
 *         self.is_writable = True             # <<<<<<<<<<<<<<
 * 
 *     def set_memcopy_threads(self, int num_threads):
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "is_writable");
                        __PYX_ERR(6, 1297, __pyx_L1_error)
                      }
                      __pyx_v_self->__pyx_base.is_writable = 1;

                      /* "pyarrow/io.pxi":1295
 *     """
 * 
 *     def __cinit__(self, Buffer buffer):             # <<<<<<<<<<<<<<
 *         self.output_stream.reset(new CFixedSizeBufferWriter(buffer.buffer))
 *         self.is_writable = True
*/

                      /* function exit code */
                      __pyx_r = 0;
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib.FixedSizeBufferWriter.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = -1;
                      __pyx_L0:;
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":1299
 *         self.is_writable = True
 * 
 *     def set_memcopy_threads(self, int num_threads):             # <<<<<<<<<<<<<<
 *         """
 *         Parameters
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_21FixedSizeBufferWriter_3set_memcopy_threads(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_21FixedSizeBufferWriter_2set_memcopy_threads, "FixedSizeBufferWriter.set_memcopy_threads(self, int num_threads)\n\nParameters\n----------\nnum_threads : int");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_21FixedSizeBufferWriter_3set_memcopy_threads = {"set_memcopy_threads", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_21FixedSizeBufferWriter_3set_memcopy_threads, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_21FixedSizeBufferWriter_2set_memcopy_threads};
                    static PyObject *__pyx_pw_7pyarrow_3lib_21FixedSizeBufferWriter_3set_memcopy_threads(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      int __pyx_v_num_threads;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[1] = {0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("set_memcopy_threads (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_num_threads,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(6, 1299, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 1299, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "set_memcopy_threads", 0) < (0)) __PYX_ERR(6, 1299, __pyx_L3_error)
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("set_memcopy_threads", 1, 1, 1, i); __PYX_ERR(6, 1299, __pyx_L3_error) }
                          }
                        } else if (unlikely(__pyx_nargs != 1)) {
                          goto __pyx_L5_argtuple_error;
                        } else {
                          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 1299, __pyx_L3_error)
                        }
                        __pyx_v_num_threads = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_num_threads == (int)-1) && PyErr_Occurred())) __PYX_ERR(6, 1299, __pyx_L3_error)
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("set_memcopy_threads", 1, 1, 1, __pyx_nargs); __PYX_ERR(6, 1299, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.FixedSizeBufferWriter.set_memcopy_threads", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_21FixedSizeBufferWriter_2set_memcopy_threads(((struct __pyx_obj_7pyarrow_3lib_FixedSizeBufferWriter *)__pyx_v_self), __pyx_v_num_threads);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_21FixedSizeBufferWriter_2set_memcopy_threads(struct __pyx_obj_7pyarrow_3lib_FixedSizeBufferWriter *__pyx_v_self, int __pyx_v_num_threads) {
                       arrow::io::FixedSizeBufferWriter *__pyx_v_writer;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("set_memcopy_threads", 0);

                      /* "pyarrow/io.pxi":1306
 *         """
 *         cdef CFixedSizeBufferWriter* writer = \
 *             <CFixedSizeBufferWriter*> self.output_stream.get()             # <<<<<<<<<<<<<<
 *         writer.set_memcopy_threads(num_threads)
 * 
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "output_stream");
                        __PYX_ERR(6, 1306, __pyx_L1_error)
                      }
                      __pyx_v_writer = (( arrow::io::FixedSizeBufferWriter *)__pyx_v_self->__pyx_base.output_stream.get());

                      /* "pyarrow/io.pxi":1307
 *         cdef CFixedSizeBufferWriter* writer = \
 *             <CFixedSizeBufferWriter*> self.output_stream.get()
 *         writer.set_memcopy_threads(num_threads)             # <<<<<<<<<<<<<<
 * 
 *     def set_memcopy_blocksize(self, int64_t blocksize):
*/
                      __pyx_v_writer->set_memcopy_threads(__pyx_v_num_threads);

                      /* "pyarrow/io.pxi":1299
 *         self.is_writable = True
 * 
 *     def set_memcopy_threads(self, int num_threads):             # <<<<<<<<<<<<<<
 *         """
 *         Parameters
*/

                      /* function exit code */
                      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib.FixedSizeBufferWriter.set_memcopy_threads", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":1309
 *         writer.set_memcopy_threads(num_threads)
 * 
 *     def set_memcopy_blocksize(self, int64_t blocksize):             # <<<<<<<<<<<<<<
 *         """
 *         Parameters
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_21FixedSizeBufferWriter_5set_memcopy_blocksize(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_21FixedSizeBufferWriter_4set_memcopy_blocksize, "FixedSizeBufferWriter.set_memcopy_blocksize(self, int64_t blocksize)\n\nParameters\n----------\nblocksize : int64");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_21FixedSizeBufferWriter_5set_memcopy_blocksize = {"set_memcopy_blocksize", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_21FixedSizeBufferWriter_5set_memcopy_blocksize, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_21FixedSizeBufferWriter_4set_memcopy_blocksize};
                    static PyObject *__pyx_pw_7pyarrow_3lib_21FixedSizeBufferWriter_5set_memcopy_blocksize(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      int64_t __pyx_v_blocksize;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[1] = {0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("set_memcopy_blocksize (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_blocksize,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(6, 1309, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 1309, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "set_memcopy_blocksize", 0) < (0)) __PYX_ERR(6, 1309, __pyx_L3_error)
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("set_memcopy_blocksize", 1, 1, 1, i); __PYX_ERR(6, 1309, __pyx_L3_error) }
                          }
                        } else if (unlikely(__pyx_nargs != 1)) {
                          goto __pyx_L5_argtuple_error;
                        } else {
                          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 1309, __pyx_L3_error)
                        }
                        __pyx_v_blocksize = __Pyx_PyLong_As_int64_t(values[0]); if (unlikely((__pyx_v_blocksize == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(6, 1309, __pyx_L3_error)
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("set_memcopy_blocksize", 1, 1, 1, __pyx_nargs); __PYX_ERR(6, 1309, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.FixedSizeBufferWriter.set_memcopy_blocksize", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_21FixedSizeBufferWriter_4set_memcopy_blocksize(((struct __pyx_obj_7pyarrow_3lib_FixedSizeBufferWriter *)__pyx_v_self), __pyx_v_blocksize);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_21FixedSizeBufferWriter_4set_memcopy_blocksize(struct __pyx_obj_7pyarrow_3lib_FixedSizeBufferWriter *__pyx_v_self, int64_t __pyx_v_blocksize) {
                       arrow::io::FixedSizeBufferWriter *__pyx_v_writer;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("set_memcopy_blocksize", 0);

                      /* "pyarrow/io.pxi":1316
 *         """
 *         cdef CFixedSizeBufferWriter* writer = \
 *             <CFixedSizeBufferWriter*> self.output_stream.get()             # <<<<<<<<<<<<<<
 *         writer.set_memcopy_blocksize(blocksize)
 * 
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "output_stream");
                        __PYX_ERR(6, 1316, __pyx_L1_error)
                      }
                      __pyx_v_writer = (( arrow::io::FixedSizeBufferWriter *)__pyx_v_self->__pyx_base.output_stream.get());

                      /* "pyarrow/io.pxi":1317
 *         cdef CFixedSizeBufferWriter* writer = \
 *             <CFixedSizeBufferWriter*> self.output_stream.get()
 *         writer.set_memcopy_blocksize(blocksize)             # <<<<<<<<<<<<<<
 * 
 *     def set_memcopy_threshold(self, int64_t threshold):
*/
                      __pyx_v_writer->set_memcopy_blocksize(__pyx_v_blocksize);

                      /* "pyarrow/io.pxi":1309
 *         writer.set_memcopy_threads(num_threads)
 * 
 *     def set_memcopy_blocksize(self, int64_t blocksize):             # <<<<<<<<<<<<<<
 *         """
 *         Parameters
*/

                      /* function exit code */
                      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib.FixedSizeBufferWriter.set_memcopy_blocksize", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":1319
 *         writer.set_memcopy_blocksize(blocksize)
 * 
 *     def set_memcopy_threshold(self, int64_t threshold):             # <<<<<<<<<<<<<<
 *         """
 *         Parameters
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_21FixedSizeBufferWriter_7set_memcopy_threshold(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_21FixedSizeBufferWriter_6set_memcopy_threshold, "FixedSizeBufferWriter.set_memcopy_threshold(self, int64_t threshold)\n\nParameters\n----------\nthreshold : int64");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_21FixedSizeBufferWriter_7set_memcopy_threshold = {"set_memcopy_threshold", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_21FixedSizeBufferWriter_7set_memcopy_threshold, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_21FixedSizeBufferWriter_6set_memcopy_threshold};
                    static PyObject *__pyx_pw_7pyarrow_3lib_21FixedSizeBufferWriter_7set_memcopy_threshold(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      int64_t __pyx_v_threshold;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[1] = {0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("set_memcopy_threshold (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_threshold,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(6, 1319, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 1319, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "set_memcopy_threshold", 0) < (0)) __PYX_ERR(6, 1319, __pyx_L3_error)
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("set_memcopy_threshold", 1, 1, 1, i); __PYX_ERR(6, 1319, __pyx_L3_error) }
                          }
                        } else if (unlikely(__pyx_nargs != 1)) {
                          goto __pyx_L5_argtuple_error;
                        } else {
                          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 1319, __pyx_L3_error)
                        }
                        __pyx_v_threshold = __Pyx_PyLong_As_int64_t(values[0]); if (unlikely((__pyx_v_threshold == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(6, 1319, __pyx_L3_error)
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("set_memcopy_threshold", 1, 1, 1, __pyx_nargs); __PYX_ERR(6, 1319, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.FixedSizeBufferWriter.set_memcopy_threshold", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_21FixedSizeBufferWriter_6set_memcopy_threshold(((struct __pyx_obj_7pyarrow_3lib_FixedSizeBufferWriter *)__pyx_v_self), __pyx_v_threshold);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_21FixedSizeBufferWriter_6set_memcopy_threshold(struct __pyx_obj_7pyarrow_3lib_FixedSizeBufferWriter *__pyx_v_self, int64_t __pyx_v_threshold) {
                       arrow::io::FixedSizeBufferWriter *__pyx_v_writer;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("set_memcopy_threshold", 0);

                      /* "pyarrow/io.pxi":1326
 *         """
 *         cdef CFixedSizeBufferWriter* writer = \
 *             <CFixedSizeBufferWriter*> self.output_stream.get()             # <<<<<<<<<<<<<<
 *         writer.set_memcopy_threshold(threshold)
 * 
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "output_stream");
                        __PYX_ERR(6, 1326, __pyx_L1_error)
                      }
                      __pyx_v_writer = (( arrow::io::FixedSizeBufferWriter *)__pyx_v_self->__pyx_base.output_stream.get());

                      /* "pyarrow/io.pxi":1327
 *         cdef CFixedSizeBufferWriter* writer = \
 *             <CFixedSizeBufferWriter*> self.output_stream.get()
 *         writer.set_memcopy_threshold(threshold)             # <<<<<<<<<<<<<<
 * 
 * 
*/
                      __pyx_v_writer->set_memcopy_threshold(__pyx_v_threshold);

                      /* "pyarrow/io.pxi":1319
 *         writer.set_memcopy_blocksize(blocksize)
 * 
 *     def set_memcopy_threshold(self, int64_t threshold):             # <<<<<<<<<<<<<<
 *         """
 *         Parameters
*/

                      /* function exit code */
                      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib.FixedSizeBufferWriter.set_memcopy_threshold", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_21FixedSizeBufferWriter_9__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_21FixedSizeBufferWriter_8__reduce_cython__, "FixedSizeBufferWriter.__reduce_cython__(self)");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_21FixedSizeBufferWriter_9__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_21FixedSizeBufferWriter_9__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_21FixedSizeBufferWriter_8__reduce_cython__};
                    static PyObject *__pyx_pw_7pyarrow_3lib_21FixedSizeBufferWriter_9__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; }
                      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                      if (unlikely(__pyx_kwds_len < 0)) return NULL;
                      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;}
                      __pyx_r = __pyx_pf_7pyarrow_3lib_21FixedSizeBufferWriter_8__reduce_cython__(((struct __pyx_obj_7pyarrow_3lib_FixedSizeBufferWriter *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_21FixedSizeBufferWriter_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_FixedSizeBufferWriter *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__reduce_cython__", 0);

                      /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/
                      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0);
                      __PYX_ERR(7, 2, __pyx_L1_error)

                      /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib.FixedSizeBufferWriter.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_21FixedSizeBufferWriter_11__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_21FixedSizeBufferWriter_10__setstate_cython__, "FixedSizeBufferWriter.__setstate_cython__(self, __pyx_state)");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_21FixedSizeBufferWriter_11__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_21FixedSizeBufferWriter_11__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_21FixedSizeBufferWriter_10__setstate_cython__};
                    static PyObject *__pyx_pw_7pyarrow_3lib_21FixedSizeBufferWriter_11__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[1] = {0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(7, 3, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(7, 3, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(7, 3, __pyx_L3_error)
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(7, 3, __pyx_L3_error) }
                          }
                        } else if (unlikely(__pyx_nargs != 1)) {
                          goto __pyx_L5_argtuple_error;
                        } else {
                          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(7, 3, __pyx_L3_error)
                        }
                        __pyx_v___pyx_state = values[0];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(7, 3, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.FixedSizeBufferWriter.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_21FixedSizeBufferWriter_10__setstate_cython__(((struct __pyx_obj_7pyarrow_3lib_FixedSizeBufferWriter *)__pyx_v_self), __pyx_v___pyx_state);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_21FixedSizeBufferWriter_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_FixedSizeBufferWriter *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__setstate_cython__", 0);

                      /* "(tree fragment)":4
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
*/
                      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0);
                      __PYX_ERR(7, 4, __pyx_L1_error)

                      /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib.FixedSizeBufferWriter.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":1342
 *     """
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         pass
 * 
*/

                    /* Python wrapper */
                    static int __pyx_pw_7pyarrow_3lib_6Buffer_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
                    static int __pyx_pw_7pyarrow_3lib_6Buffer_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      int __pyx_r;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, __pyx_nargs); return -1; }
                      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
                      if (unlikely(__pyx_kwds_len < 0)) return -1;
                      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__cinit__", __pyx_kwds); return -1;}
                      __pyx_r = __pyx_pf_7pyarrow_3lib_6Buffer___cinit__(((struct __pyx_obj_7pyarrow_3lib_Buffer *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static int __pyx_pf_7pyarrow_3lib_6Buffer___cinit__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_Buffer *__pyx_v_self) {
                      int __pyx_r;

                      /* function exit code */
                      __pyx_r = 0;
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":1345
 *         pass
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         raise TypeError("Do not call Buffer's constructor directly, use "
 *                         "`pyarrow.py_buffer` function instead.")
*/

                    /* Python wrapper */
                    static int __pyx_pw_7pyarrow_3lib_6Buffer_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
                    static int __pyx_pw_7pyarrow_3lib_6Buffer_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      int __pyx_r;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, __pyx_nargs); return -1; }
                      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
                      if (unlikely(__pyx_kwds_len < 0)) return -1;
                      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__init__", __pyx_kwds); return -1;}
                      __pyx_r = __pyx_pf_7pyarrow_3lib_6Buffer_2__init__(((struct __pyx_obj_7pyarrow_3lib_Buffer *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static int __pyx_pf_7pyarrow_3lib_6Buffer_2__init__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_Buffer *__pyx_v_self) {
                      int __pyx_r;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      size_t __pyx_t_3;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__init__", 0);

                      /* "pyarrow/io.pxi":1346
 * 
 *     def __init__(self):
 *         raise TypeError("Do not call Buffer's constructor directly, use "             # <<<<<<<<<<<<<<
 *                         "`pyarrow.py_buffer` function instead.")
 * 
*/
                      __pyx_t_2 = NULL;
                      __pyx_t_3 = 1;
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Do_not_call_Buffer_s_constructor};
                        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 1346, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      __PYX_ERR(6, 1346, __pyx_L1_error)

                      /* "pyarrow/io.pxi":1345
 *         pass
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         raise TypeError("Do not call Buffer's constructor directly, use "
 *                         "`pyarrow.py_buffer` function instead.")
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_AddTraceback("pyarrow.lib.Buffer.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = -1;
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":1349
 *                         "`pyarrow.py_buffer` function instead.")
 * 
 *     cdef void init(self, const shared_ptr[CBuffer]& buffer):             # <<<<<<<<<<<<<<
 *         self.buffer = buffer
 *         self.shape[0] = self.size
*/

                    static void __pyx_f_7pyarrow_3lib_6Buffer_init(struct __pyx_obj_7pyarrow_3lib_Buffer *__pyx_v_self, std::shared_ptr< arrow::Buffer>  const &__pyx_v_buffer) {
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      Py_ssize_t __pyx_t_2;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("init", 0);

                      /* "pyarrow/io.pxi":1350
 * 
 *     cdef void init(self, const shared_ptr[CBuffer]& buffer):
 *         self.buffer = buffer             # <<<<<<<<<<<<<<
 *         self.shape[0] = self.size
 *         self.strides[0] = <Py_ssize_t>(1)
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "buffer");
                        __PYX_ERR(6, 1350, __pyx_L1_error)
                      }
                      __pyx_v_self->buffer = __pyx_v_buffer;

                      /* "pyarrow/io.pxi":1351
 *     cdef void init(self, const shared_ptr[CBuffer]& buffer):
 *         self.buffer = buffer
 *         self.shape[0] = self.size             # <<<<<<<<<<<<<<
 *         self.strides[0] = <Py_ssize_t>(1)
 * 
*/
                      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 1351, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(6, 1351, __pyx_L1_error)
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "shape");
                        __PYX_ERR(6, 1351, __pyx_L1_error)
                      }
                      (__pyx_v_self->shape[0]) = __pyx_t_2;

                      /* "pyarrow/io.pxi":1352
 *         self.buffer = buffer
 *         self.shape[0] = self.size
 *         self.strides[0] = <Py_ssize_t>(1)             # <<<<<<<<<<<<<<
 * 
 *     def __len__(self):
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "strides");
                        __PYX_ERR(6, 1352, __pyx_L1_error)
                      }
                      (__pyx_v_self->strides[0]) = ((Py_ssize_t)1);

                      /* "pyarrow/io.pxi":1349
 *                         "`pyarrow.py_buffer` function instead.")
 * 
 *     cdef void init(self, const shared_ptr[CBuffer]& buffer):             # <<<<<<<<<<<<<<
 *         self.buffer = buffer
 *         self.shape[0] = self.size
*/

                      /* function exit code */
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_AddTraceback("pyarrow.lib.Buffer.init", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_L0:;
                      __Pyx_RefNannyFinishContext();
                    }

                    /* "pyarrow/io.pxi":1354
 *         self.strides[0] = <Py_ssize_t>(1)
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self.size
 * 
*/

                    /* Python wrapper */
                    static Py_ssize_t __pyx_pw_7pyarrow_3lib_6Buffer_5__len__(PyObject *__pyx_v_self); /*proto*/
                    static Py_ssize_t __pyx_pw_7pyarrow_3lib_6Buffer_5__len__(PyObject *__pyx_v_self) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      Py_ssize_t __pyx_r;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_6Buffer_4__len__(((struct __pyx_obj_7pyarrow_3lib_Buffer *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static Py_ssize_t __pyx_pf_7pyarrow_3lib_6Buffer_4__len__(struct __pyx_obj_7pyarrow_3lib_Buffer *__pyx_v_self) {
                      Py_ssize_t __pyx_r;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      Py_ssize_t __pyx_t_2;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__len__", 0);

                      /* "pyarrow/io.pxi":1355
 * 
 *     def __len__(self):
 *         return self.size             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
*/
                      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 1355, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(6, 1355, __pyx_L1_error)
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      __pyx_r = __pyx_t_2;
                      goto __pyx_L0;

                      /* "pyarrow/io.pxi":1354
 *         self.strides[0] = <Py_ssize_t>(1)
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self.size
 * 
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_AddTraceback("pyarrow.lib.Buffer.__len__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = -1;
                      __pyx_L0:;
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":1357
 *         return self.size
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         name = f"pyarrow.{self.__class__.__name__}"
 *         return (f"<{name} "
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_6Buffer_7__repr__(PyObject *__pyx_v_self); /*proto*/
                    static PyObject *__pyx_pw_7pyarrow_3lib_6Buffer_7__repr__(PyObject *__pyx_v_self) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_6Buffer_6__repr__(((struct __pyx_obj_7pyarrow_3lib_Buffer *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_6Buffer_6__repr__(struct __pyx_obj_7pyarrow_3lib_Buffer *__pyx_v_self) {
                      PyObject *__pyx_v_name = NULL;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      PyObject *__pyx_t_3 = NULL;
                      PyObject *__pyx_t_4 = NULL;
                      PyObject *__pyx_t_5 = NULL;
                      PyObject *__pyx_t_6[11];
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__repr__", 0);

                      /* "pyarrow/io.pxi":1358
 * 
 *     def __repr__(self):
 *         name = f"pyarrow.{self.__class__.__name__}"             # <<<<<<<<<<<<<<
 *         return (f"<{name} "
 *                 f"address={hex(self.address)} "
*/
                      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 1358, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_name_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 1358, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_2);
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_t_2, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 1358, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                      __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_pyarrow, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 1358, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_2);
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      __pyx_v_name = ((PyObject*)__pyx_t_2);
                      __pyx_t_2 = 0;

                      /* "pyarrow/io.pxi":1359
 *     def __repr__(self):
 *         name = f"pyarrow.{self.__class__.__name__}"
 *         return (f"<{name} "             # <<<<<<<<<<<<<<
 *                 f"address={hex(self.address)} "
 *                 f"size={self.size} "
*/
                      __Pyx_XDECREF(__pyx_r);

                      /* "pyarrow/io.pxi":1360
 *         name = f"pyarrow.{self.__class__.__name__}"
 *         return (f"<{name} "
 *                 f"address={hex(self.address)} "             # <<<<<<<<<<<<<<
 *                 f"size={self.size} "
 *                 f"is_cpu={self.is_cpu} "
*/
                      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_address_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 1360, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_2);
                      __pyx_t_1 = __Pyx_PyNumber_Hex(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 1360, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                      __pyx_t_2 = __Pyx_PyUnicode_Unicode(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 1360, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_2);
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

                      /* "pyarrow/io.pxi":1361
 *         return (f"<{name} "
 *                 f"address={hex(self.address)} "
 *                 f"size={self.size} "             # <<<<<<<<<<<<<<
 *                 f"is_cpu={self.is_cpu} "
 *                 f"is_mutable={self.is_mutable}>")
*/
                      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 1361, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_t_1, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 1361, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_3);
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

                      /* "pyarrow/io.pxi":1362
 *                 f"address={hex(self.address)} "
 *                 f"size={self.size} "
 *                 f"is_cpu={self.is_cpu} "             # <<<<<<<<<<<<<<
 *                 f"is_mutable={self.is_mutable}>")
 * 
*/
                      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_is_cpu); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 1362, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_1, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 1362, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_4);
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

                      /* "pyarrow/io.pxi":1363
 *                 f"size={self.size} "
 *                 f"is_cpu={self.is_cpu} "
 *                 f"is_mutable={self.is_mutable}>")             # <<<<<<<<<<<<<<
 * 
 *     def _assert_cpu(self):
*/
                      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_is_mutable_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 1363, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_t_1, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 1363, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_5);
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      __pyx_t_6[0] = __pyx_mstate_global->__pyx_kp_u__4;
                      __pyx_t_6[1] = __pyx_v_name;
                      __pyx_t_6[2] = __pyx_mstate_global->__pyx_kp_u_address;
                      __pyx_t_6[3] = __pyx_t_2;
                      __pyx_t_6[4] = __pyx_mstate_global->__pyx_kp_u_size_2;
                      __pyx_t_6[5] = __pyx_t_3;
                      __pyx_t_6[6] = __pyx_mstate_global->__pyx_kp_u_is_cpu_2;
                      __pyx_t_6[7] = __pyx_t_4;
                      __pyx_t_6[8] = __pyx_mstate_global->__pyx_kp_u_is_mutable;
                      __pyx_t_6[9] = __pyx_t_5;
                      __pyx_t_6[10] = __pyx_mstate_global->__pyx_kp_u__5;

                      /* "pyarrow/io.pxi":1359
 *     def __repr__(self):
 *         name = f"pyarrow.{self.__class__.__name__}"
 *         return (f"<{name} "             # <<<<<<<<<<<<<<
 *                 f"address={hex(self.address)} "
 *                 f"size={self.size} "
*/
                      __pyx_t_1 = __Pyx_PyUnicode_Join(__pyx_t_6, 11, 1 * 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_v_name) + 9 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2) + 6 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + 8 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + 12 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_v_name) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5));
                      if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 1359, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                      __pyx_r = __pyx_t_1;
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/io.pxi":1357
 *         return self.size
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         name = f"pyarrow.{self.__class__.__name__}"
 *         return (f"<{name} "
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_XDECREF(__pyx_t_4);
                      __Pyx_XDECREF(__pyx_t_5);
                      __Pyx_AddTraceback("pyarrow.lib.Buffer.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XDECREF(__pyx_v_name);
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":1365
 *                 f"is_mutable={self.is_mutable}>")
 * 
 *     def _assert_cpu(self):             # <<<<<<<<<<<<<<
 *         if not self.is_cpu:
 *             raise NotImplementedError("Implemented only for data on CPU device")
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_6Buffer_9_assert_cpu(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_6Buffer_8_assert_cpu, "Buffer._assert_cpu(self)");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_6Buffer_9_assert_cpu = {"_assert_cpu", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_6Buffer_9_assert_cpu, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_6Buffer_8_assert_cpu};
                    static PyObject *__pyx_pw_7pyarrow_3lib_6Buffer_9_assert_cpu(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("_assert_cpu (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("_assert_cpu", 1, 0, 0, __pyx_nargs); return NULL; }
                      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                      if (unlikely(__pyx_kwds_len < 0)) return NULL;
                      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("_assert_cpu", __pyx_kwds); return NULL;}
                      __pyx_r = __pyx_pf_7pyarrow_3lib_6Buffer_8_assert_cpu(((struct __pyx_obj_7pyarrow_3lib_Buffer *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_6Buffer_8_assert_cpu(struct __pyx_obj_7pyarrow_3lib_Buffer *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      int __pyx_t_2;
                      int __pyx_t_3;
                      PyObject *__pyx_t_4 = NULL;
                      size_t __pyx_t_5;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("_assert_cpu", 0);

                      /* "pyarrow/io.pxi":1366
 * 
 *     def _assert_cpu(self):
 *         if not self.is_cpu:             # <<<<<<<<<<<<<<
 *             raise NotImplementedError("Implemented only for data on CPU device")
 * 
*/
                      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_is_cpu); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 1366, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(6, 1366, __pyx_L1_error)
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      __pyx_t_3 = (!__pyx_t_2);
                      if (unlikely(__pyx_t_3)) {

                        /* "pyarrow/io.pxi":1367
 *     def _assert_cpu(self):
 *         if not self.is_cpu:
 *             raise NotImplementedError("Implemented only for data on CPU device")             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
                        __pyx_t_4 = NULL;
                        __pyx_t_5 = 1;
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Implemented_only_for_data_on_CPU};
                          __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_NotImplementedError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                          if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 1367, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_1);
                        }
                        __Pyx_Raise(__pyx_t_1, 0, 0, 0);
                        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                        __PYX_ERR(6, 1367, __pyx_L1_error)

                        /* "pyarrow/io.pxi":1366
 * 
 *     def _assert_cpu(self):
 *         if not self.is_cpu:             # <<<<<<<<<<<<<<
 *             raise NotImplementedError("Implemented only for data on CPU device")
 * 
*/
                      }

                      /* "pyarrow/io.pxi":1365
 *                 f"is_mutable={self.is_mutable}>")
 * 
 *     def _assert_cpu(self):             # <<<<<<<<<<<<<<
 *         if not self.is_cpu:
 *             raise NotImplementedError("Implemented only for data on CPU device")
*/

                      /* 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_AddTraceback("pyarrow.lib.Buffer._assert_cpu", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":1369
 *             raise NotImplementedError("Implemented only for data on CPU device")
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def size(self):
 *         """
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_6Buffer_4size_1__get__(PyObject *__pyx_v_self); /*proto*/
                    static PyObject *__pyx_pw_7pyarrow_3lib_6Buffer_4size_1__get__(PyObject *__pyx_v_self) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_6Buffer_4size___get__(((struct __pyx_obj_7pyarrow_3lib_Buffer *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_6Buffer_4size___get__(struct __pyx_obj_7pyarrow_3lib_Buffer *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__get__", 0);

                      /* "pyarrow/io.pxi":1374
 *         The buffer size in bytes.
 *         """
 *         return self.buffer.get().size()             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
                      __Pyx_XDECREF(__pyx_r);
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "buffer");
                        __PYX_ERR(6, 1374, __pyx_L1_error)
                      }
                      __pyx_t_1 = __Pyx_PyLong_From_int64_t(__pyx_v_self->buffer.get()->size()); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 1374, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_r = __pyx_t_1;
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/io.pxi":1369
 *             raise NotImplementedError("Implemented only for data on CPU device")
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def size(self):
 *         """
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_AddTraceback("pyarrow.lib.Buffer.size.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":1376
 *         return self.buffer.get().size()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def address(self):
 *         """
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_6Buffer_7address_1__get__(PyObject *__pyx_v_self); /*proto*/
                    static PyObject *__pyx_pw_7pyarrow_3lib_6Buffer_7address_1__get__(PyObject *__pyx_v_self) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_6Buffer_7address___get__(((struct __pyx_obj_7pyarrow_3lib_Buffer *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_6Buffer_7address___get__(struct __pyx_obj_7pyarrow_3lib_Buffer *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__get__", 0);

                      /* "pyarrow/io.pxi":1384
 *         Use `is_cpu()` to disambiguate.
 *         """
 *         return self.buffer.get().address()             # <<<<<<<<<<<<<<
 * 
 *     def hex(self):
*/
                      __Pyx_XDECREF(__pyx_r);
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "buffer");
                        __PYX_ERR(6, 1384, __pyx_L1_error)
                      }
                      __pyx_t_1 = __Pyx_PyLong_FromSize_t(__pyx_v_self->buffer.get()->address()); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 1384, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_r = __pyx_t_1;
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/io.pxi":1376
 *         return self.buffer.get().size()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def address(self):
 *         """
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_AddTraceback("pyarrow.lib.Buffer.address.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":1386
 *         return self.buffer.get().address()
 * 
 *     def hex(self):             # <<<<<<<<<<<<<<
 *         """
 *         Compute hexadecimal representation of the buffer.
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_6Buffer_11hex(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_6Buffer_10hex, "Buffer.hex(self)\n\nCompute hexadecimal representation of the buffer.\n\nReturns\n-------\n: bytes");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_6Buffer_11hex = {"hex", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_6Buffer_11hex, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_6Buffer_10hex};
                    static PyObject *__pyx_pw_7pyarrow_3lib_6Buffer_11hex(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("hex (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("hex", 1, 0, 0, __pyx_nargs); return NULL; }
                      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                      if (unlikely(__pyx_kwds_len < 0)) return NULL;
                      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("hex", __pyx_kwds); return NULL;}
                      __pyx_r = __pyx_pf_7pyarrow_3lib_6Buffer_10hex(((struct __pyx_obj_7pyarrow_3lib_Buffer *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_6Buffer_10hex(struct __pyx_obj_7pyarrow_3lib_Buffer *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      size_t __pyx_t_3;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("hex", 0);

                      /* "pyarrow/io.pxi":1394
 *         : bytes
 *         """
 *         self._assert_cpu()             # <<<<<<<<<<<<<<
 *         return self.buffer.get().ToHexString()
 * 
*/
                      __pyx_t_2 = ((PyObject *)__pyx_v_self);
                      __Pyx_INCREF(__pyx_t_2);
                      __pyx_t_3 = 0;
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
                        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_assert_cpu, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 1394, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

                      /* "pyarrow/io.pxi":1395
 *         """
 *         self._assert_cpu()
 *         return self.buffer.get().ToHexString()             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
                      __Pyx_XDECREF(__pyx_r);
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "buffer");
                        __PYX_ERR(6, 1395, __pyx_L1_error)
                      }
                      __pyx_t_1 = __pyx_convert_PyBytes_string_to_py_6libcpp_6string_std__in_string(__pyx_v_self->buffer.get()->ToHexString()); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 1395, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_r = __pyx_t_1;
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/io.pxi":1386
 *         return self.buffer.get().address()
 * 
 *     def hex(self):             # <<<<<<<<<<<<<<
 *         """
 *         Compute hexadecimal representation of the buffer.
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_AddTraceback("pyarrow.lib.Buffer.hex", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":1397
 *         return self.buffer.get().ToHexString()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_mutable(self):
 *         """
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_6Buffer_10is_mutable_1__get__(PyObject *__pyx_v_self); /*proto*/
                    static PyObject *__pyx_pw_7pyarrow_3lib_6Buffer_10is_mutable_1__get__(PyObject *__pyx_v_self) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_6Buffer_10is_mutable___get__(((struct __pyx_obj_7pyarrow_3lib_Buffer *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_6Buffer_10is_mutable___get__(struct __pyx_obj_7pyarrow_3lib_Buffer *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__get__", 0);

                      /* "pyarrow/io.pxi":1402
 *         Whether the buffer is mutable.
 *         """
 *         return self.buffer.get().is_mutable()             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
                      __Pyx_XDECREF(__pyx_r);
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "buffer");
                        __PYX_ERR(6, 1402, __pyx_L1_error)
                      }
                      __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->buffer.get()->is_mutable()); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 1402, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_r = __pyx_t_1;
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/io.pxi":1397
 *         return self.buffer.get().ToHexString()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_mutable(self):
 *         """
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_AddTraceback("pyarrow.lib.Buffer.is_mutable.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":1404
 *         return self.buffer.get().is_mutable()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_cpu(self):
 *         """
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_6Buffer_6is_cpu_1__get__(PyObject *__pyx_v_self); /*proto*/
                    static PyObject *__pyx_pw_7pyarrow_3lib_6Buffer_6is_cpu_1__get__(PyObject *__pyx_v_self) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_6Buffer_6is_cpu___get__(((struct __pyx_obj_7pyarrow_3lib_Buffer *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_6Buffer_6is_cpu___get__(struct __pyx_obj_7pyarrow_3lib_Buffer *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__get__", 0);

                      /* "pyarrow/io.pxi":1409
 *         Whether the buffer is CPU-accessible.
 *         """
 *         return self.buffer.get().is_cpu()             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
                      __Pyx_XDECREF(__pyx_r);
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "buffer");
                        __PYX_ERR(6, 1409, __pyx_L1_error)
                      }
                      __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->buffer.get()->is_cpu()); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 1409, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_r = __pyx_t_1;
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/io.pxi":1404
 *         return self.buffer.get().is_mutable()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_cpu(self):
 *         """
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_AddTraceback("pyarrow.lib.Buffer.is_cpu.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":1411
 *         return self.buffer.get().is_cpu()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def device(self):
 *         """
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_6Buffer_6device_1__get__(PyObject *__pyx_v_self); /*proto*/
                    static PyObject *__pyx_pw_7pyarrow_3lib_6Buffer_6device_1__get__(PyObject *__pyx_v_self) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_6Buffer_6device___get__(((struct __pyx_obj_7pyarrow_3lib_Buffer *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_6Buffer_6device___get__(struct __pyx_obj_7pyarrow_3lib_Buffer *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__get__", 0);

                      /* "pyarrow/io.pxi":1420
 *         Device
 *         """
 *         return Device.wrap(self.buffer.get().device())             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
                      __Pyx_XDECREF(__pyx_r);
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "buffer");
                        __PYX_ERR(6, 1420, __pyx_L1_error)
                      }
                      __pyx_t_1 = __pyx_f_7pyarrow_3lib_6Device_wrap(__pyx_v_self->buffer.get()->device()); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 1420, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_r = __pyx_t_1;
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/io.pxi":1411
 *         return self.buffer.get().is_cpu()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def device(self):
 *         """
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_AddTraceback("pyarrow.lib.Buffer.device.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":1422
 *         return Device.wrap(self.buffer.get().device())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def memory_manager(self):
 *         """
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_6Buffer_14memory_manager_1__get__(PyObject *__pyx_v_self); /*proto*/
                    static PyObject *__pyx_pw_7pyarrow_3lib_6Buffer_14memory_manager_1__get__(PyObject *__pyx_v_self) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_6Buffer_14memory_manager___get__(((struct __pyx_obj_7pyarrow_3lib_Buffer *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_6Buffer_14memory_manager___get__(struct __pyx_obj_7pyarrow_3lib_Buffer *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__get__", 0);

                      /* "pyarrow/io.pxi":1431
 *         MemoryManager
 *         """
 *         return MemoryManager.wrap(self.buffer.get().memory_manager())             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
                      __Pyx_XDECREF(__pyx_r);
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "buffer");
                        __PYX_ERR(6, 1431, __pyx_L1_error)
                      }
                      __pyx_t_1 = __pyx_f_7pyarrow_3lib_13MemoryManager_wrap(__pyx_v_self->buffer.get()->memory_manager()); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 1431, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_r = __pyx_t_1;
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/io.pxi":1422
 *         return Device.wrap(self.buffer.get().device())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def memory_manager(self):
 *         """
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_AddTraceback("pyarrow.lib.Buffer.memory_manager.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":1433
 *         return MemoryManager.wrap(self.buffer.get().memory_manager())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def device_type(self):
 *         """
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_6Buffer_11device_type_1__get__(PyObject *__pyx_v_self); /*proto*/
                    static PyObject *__pyx_pw_7pyarrow_3lib_6Buffer_11device_type_1__get__(PyObject *__pyx_v_self) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_6Buffer_11device_type___get__(((struct __pyx_obj_7pyarrow_3lib_Buffer *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_6Buffer_11device_type___get__(struct __pyx_obj_7pyarrow_3lib_Buffer *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__get__", 0);

                      /* "pyarrow/io.pxi":1442
 *         DeviceAllocationType
 *         """
 *         return _wrap_device_allocation_type(self.buffer.get().device_type())             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
                      __Pyx_XDECREF(__pyx_r);
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "buffer");
                        __PYX_ERR(6, 1442, __pyx_L1_error)
                      }
                      __pyx_t_1 = __pyx_f_7pyarrow_3lib__wrap_device_allocation_type(__pyx_v_self->buffer.get()->device_type()); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 1442, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_r = __pyx_t_1;
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/io.pxi":1433
 *         return MemoryManager.wrap(self.buffer.get().memory_manager())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def device_type(self):
 *         """
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_AddTraceback("pyarrow.lib.Buffer.device_type.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":1444
 *         return _wrap_device_allocation_type(self.buffer.get().device_type())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def parent(self):
 *         cdef shared_ptr[CBuffer] parent_buf = self.buffer.get().parent()
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_6Buffer_6parent_1__get__(PyObject *__pyx_v_self); /*proto*/
                    static PyObject *__pyx_pw_7pyarrow_3lib_6Buffer_6parent_1__get__(PyObject *__pyx_v_self) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_6Buffer_6parent___get__(((struct __pyx_obj_7pyarrow_3lib_Buffer *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_6Buffer_6parent___get__(struct __pyx_obj_7pyarrow_3lib_Buffer *__pyx_v_self) {
                      std::shared_ptr< arrow::Buffer>  __pyx_v_parent_buf;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_t_1;
                      PyObject *__pyx_t_2 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__get__", 0);

                      /* "pyarrow/io.pxi":1446
 *     @property
 *     def parent(self):
 *         cdef shared_ptr[CBuffer] parent_buf = self.buffer.get().parent()             # <<<<<<<<<<<<<<
 * 
 *         if parent_buf.get() == NULL:
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "buffer");
                        __PYX_ERR(6, 1446, __pyx_L1_error)
                      }
                      __pyx_v_parent_buf = __pyx_v_self->buffer.get()->parent();

                      /* "pyarrow/io.pxi":1448
 *         cdef shared_ptr[CBuffer] parent_buf = self.buffer.get().parent()
 * 
 *         if parent_buf.get() == NULL:             # <<<<<<<<<<<<<<
 *             return None
 *         else:
*/
                      __pyx_t_1 = (__pyx_v_parent_buf.get() == NULL);
                      if (__pyx_t_1) {

                        /* "pyarrow/io.pxi":1449
 * 
 *         if parent_buf.get() == NULL:
 *             return None             # <<<<<<<<<<<<<<
 *         else:
 *             return pyarrow_wrap_buffer(parent_buf)
*/
                        __Pyx_XDECREF(__pyx_r);
                        __pyx_r = Py_None; __Pyx_INCREF(Py_None);
                        goto __pyx_L0;

                        /* "pyarrow/io.pxi":1448
 *         cdef shared_ptr[CBuffer] parent_buf = self.buffer.get().parent()
 * 
 *         if parent_buf.get() == NULL:             # <<<<<<<<<<<<<<
 *             return None
 *         else:
*/
                      }

                      /* "pyarrow/io.pxi":1451
 *             return None
 *         else:
 *             return pyarrow_wrap_buffer(parent_buf)             # <<<<<<<<<<<<<<
 * 
 *     def __getitem__(self, key):
*/
                      /*else*/ {
                        __Pyx_XDECREF(__pyx_r);
                        __pyx_t_2 = pyarrow_wrap_buffer(__pyx_v_parent_buf); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 1451, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_2);
                        __pyx_r = __pyx_t_2;
                        __pyx_t_2 = 0;
                        goto __pyx_L0;
                      }

                      /* "pyarrow/io.pxi":1444
 *         return _wrap_device_allocation_type(self.buffer.get().device_type())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def parent(self):
 *         cdef shared_ptr[CBuffer] parent_buf = self.buffer.get().parent()
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_AddTraceback("pyarrow.lib.Buffer.parent.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":1453
 *             return pyarrow_wrap_buffer(parent_buf)
 * 
 *     def __getitem__(self, key):             # <<<<<<<<<<<<<<
 *         if isinstance(key, slice):
 *             if (key.step or 1) != 1:
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_6Buffer_13__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
                    static PyObject *__pyx_pw_7pyarrow_3lib_6Buffer_13__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_6Buffer_12__getitem__(((struct __pyx_obj_7pyarrow_3lib_Buffer *)__pyx_v_self), ((PyObject *)__pyx_v_key));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_6Buffer_12__getitem__(struct __pyx_obj_7pyarrow_3lib_Buffer *__pyx_v_self, PyObject *__pyx_v_key) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_t_1;
                      PyObject *__pyx_t_2 = NULL;
                      PyObject *__pyx_t_3 = NULL;
                      size_t __pyx_t_4;
                      PyObject *__pyx_t_5 = NULL;
                      Py_ssize_t __pyx_t_6;
                      Py_ssize_t __pyx_t_7;
                      Py_ssize_t __pyx_t_8;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__getitem__", 0);

                      /* "pyarrow/io.pxi":1454
 * 
 *     def __getitem__(self, key):
 *         if isinstance(key, slice):             # <<<<<<<<<<<<<<
 *             if (key.step or 1) != 1:
 *                 raise IndexError('only slices with step 1 supported')
*/
                      __pyx_t_1 = PySlice_Check(__pyx_v_key); 
                      if (__pyx_t_1) {

                        /* "pyarrow/io.pxi":1455
 *     def __getitem__(self, key):
 *         if isinstance(key, slice):
 *             if (key.step or 1) != 1:             # <<<<<<<<<<<<<<
 *                 raise IndexError('only slices with step 1 supported')
 *             return _normalize_slice(self, key)
*/
                        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_key, __pyx_mstate_global->__pyx_n_u_step); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 1455, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_3);
                        __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(6, 1455, __pyx_L1_error)
                        if (!__pyx_t_1) {
                          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                        } else {
                          __Pyx_INCREF(__pyx_t_3);
                          __pyx_t_2 = __pyx_t_3;
                          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                          goto __pyx_L5_bool_binop_done;
                        }
                        __pyx_t_3 = __Pyx_PyLong_From_long(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 1455, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_3);
                        __pyx_t_2 = __pyx_t_3;
                        __pyx_t_3 = 0;
                        __pyx_L5_bool_binop_done:;
                        __pyx_t_1 = (__Pyx_PyLong_BoolNeObjC(__pyx_t_2, __pyx_mstate_global->__pyx_int_1, 1, 0)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(6, 1455, __pyx_L1_error)
                        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                        if (unlikely(__pyx_t_1)) {

                          /* "pyarrow/io.pxi":1456
 *         if isinstance(key, slice):
 *             if (key.step or 1) != 1:
 *                 raise IndexError('only slices with step 1 supported')             # <<<<<<<<<<<<<<
 *             return _normalize_slice(self, key)
 * 
*/
                          __pyx_t_3 = NULL;
                          __pyx_t_4 = 1;
                          {
                            PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_only_slices_with_step_1_supporte};
                            __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_IndexError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                            if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 1456, __pyx_L1_error)
                            __Pyx_GOTREF(__pyx_t_2);
                          }
                          __Pyx_Raise(__pyx_t_2, 0, 0, 0);
                          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                          __PYX_ERR(6, 1456, __pyx_L1_error)

                          /* "pyarrow/io.pxi":1455
 *     def __getitem__(self, key):
 *         if isinstance(key, slice):
 *             if (key.step or 1) != 1:             # <<<<<<<<<<<<<<
 *                 raise IndexError('only slices with step 1 supported')
 *             return _normalize_slice(self, key)
*/
                        }

                        /* "pyarrow/io.pxi":1457
 *             if (key.step or 1) != 1:
 *                 raise IndexError('only slices with step 1 supported')
 *             return _normalize_slice(self, key)             # <<<<<<<<<<<<<<
 * 
 *         return self.getitem(_normalize_index(key, self.size))
*/
                        __Pyx_XDECREF(__pyx_r);
                        __pyx_t_3 = NULL;
                        __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_normalize_slice); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 1457, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_5);
                        __pyx_t_4 = 1;
                        #if CYTHON_UNPACK_METHODS
                        if (unlikely(PyMethod_Check(__pyx_t_5))) {
                          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
                          assert(__pyx_t_3);
                          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
                          __Pyx_INCREF(__pyx_t_3);
                          __Pyx_INCREF(__pyx__function);
                          __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
                          __pyx_t_4 = 0;
                        }
                        #endif
                        {
                          PyObject *__pyx_callargs[3] = {__pyx_t_3, ((PyObject *)__pyx_v_self), __pyx_v_key};
                          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                          if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 1457, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_2);
                        }
                        __pyx_r = __pyx_t_2;
                        __pyx_t_2 = 0;
                        goto __pyx_L0;

                        /* "pyarrow/io.pxi":1454
 * 
 *     def __getitem__(self, key):
 *         if isinstance(key, slice):             # <<<<<<<<<<<<<<
 *             if (key.step or 1) != 1:
 *                 raise IndexError('only slices with step 1 supported')
*/
                      }

                      /* "pyarrow/io.pxi":1459
 *             return _normalize_slice(self, key)
 * 
 *         return self.getitem(_normalize_index(key, self.size))             # <<<<<<<<<<<<<<
 * 
 *     cdef getitem(self, int64_t i):
*/
                      __Pyx_XDECREF(__pyx_r);
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "getitem");
                        __PYX_ERR(6, 1459, __pyx_L1_error)
                      }
                      __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_v_key); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(6, 1459, __pyx_L1_error)
                      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 1459, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_2);
                      __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(6, 1459, __pyx_L1_error)
                      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                      __pyx_t_8 = __pyx_f_7pyarrow_3lib__normalize_index(__pyx_t_6, __pyx_t_7); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1L))) __PYX_ERR(6, 1459, __pyx_L1_error)
                      __pyx_t_2 = ((struct __pyx_vtabstruct_7pyarrow_3lib_Buffer *)__pyx_v_self->__pyx_vtab)->getitem(__pyx_v_self, __pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 1459, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_2);
                      __pyx_r = __pyx_t_2;
                      __pyx_t_2 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/io.pxi":1453
 *             return pyarrow_wrap_buffer(parent_buf)
 * 
 *     def __getitem__(self, key):             # <<<<<<<<<<<<<<
 *         if isinstance(key, slice):
 *             if (key.step or 1) != 1:
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_XDECREF(__pyx_t_5);
                      __Pyx_AddTraceback("pyarrow.lib.Buffer.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":1461
 *         return self.getitem(_normalize_index(key, self.size))
 * 
 *     cdef getitem(self, int64_t i):             # <<<<<<<<<<<<<<
 *         self._assert_cpu()
 *         return self.buffer.get().data()[i]
*/

                    static PyObject *__pyx_f_7pyarrow_3lib_6Buffer_getitem(struct __pyx_obj_7pyarrow_3lib_Buffer *__pyx_v_self, int64_t __pyx_v_i) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      size_t __pyx_t_3;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("getitem", 0);

                      /* "pyarrow/io.pxi":1462
 * 
 *     cdef getitem(self, int64_t i):
 *         self._assert_cpu()             # <<<<<<<<<<<<<<
 *         return self.buffer.get().data()[i]
 * 
*/
                      __pyx_t_2 = ((PyObject *)__pyx_v_self);
                      __Pyx_INCREF(__pyx_t_2);
                      __pyx_t_3 = 0;
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
                        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_assert_cpu, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 1462, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

                      /* "pyarrow/io.pxi":1463
 *     cdef getitem(self, int64_t i):
 *         self._assert_cpu()
 *         return self.buffer.get().data()[i]             # <<<<<<<<<<<<<<
 * 
 *     def slice(self, offset=0, length=None):
*/
                      __Pyx_XDECREF(__pyx_r);
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "buffer");
                        __PYX_ERR(6, 1463, __pyx_L1_error)
                      }
                      __pyx_t_1 = __Pyx_PyLong_From_uint8_t((__pyx_v_self->buffer.get()->data()[__pyx_v_i])); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 1463, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_r = __pyx_t_1;
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/io.pxi":1461
 *         return self.getitem(_normalize_index(key, self.size))
 * 
 *     cdef getitem(self, int64_t i):             # <<<<<<<<<<<<<<
 *         self._assert_cpu()
 *         return self.buffer.get().data()[i]
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_AddTraceback("pyarrow.lib.Buffer.getitem", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = 0;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":1465
 *         return self.buffer.get().data()[i]
 * 
 *     def slice(self, offset=0, length=None):             # <<<<<<<<<<<<<<
 *         """
 *         Slice this buffer.  Memory is not copied.
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_6Buffer_15slice(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_6Buffer_14slice, "Buffer.slice(self, offset=0, length=None)\n\nSlice this buffer.  Memory is not copied.\n\nYou can also use the Python slice notation ``buffer[start:stop]``.\n\nParameters\n----------\noffset : int, default 0\n    Offset from start of buffer to slice.\nlength : int, default None\n    Length of slice (default is until end of Buffer starting from\n    offset).\n\nReturns\n-------\nsliced : Buffer\n    A logical view over this buffer.");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_6Buffer_15slice = {"slice", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_6Buffer_15slice, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_6Buffer_14slice};
                    static PyObject *__pyx_pw_7pyarrow_3lib_6Buffer_15slice(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      PyObject *__pyx_v_offset = 0;
                      PyObject *__pyx_v_length = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[2] = {0,0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("slice (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_offset,&__pyx_mstate_global->__pyx_n_u_length,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(6, 1465, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  2:
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(6, 1465, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 1465, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "slice", 0) < (0)) __PYX_ERR(6, 1465, __pyx_L3_error)
                          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_int_0));
                          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
                        } else {
                          switch (__pyx_nargs) {
                            case  2:
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(6, 1465, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 1465, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_int_0));
                          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
                        }
                        __pyx_v_offset = values[0];
                        __pyx_v_length = values[1];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("slice", 0, 0, 2, __pyx_nargs); __PYX_ERR(6, 1465, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.Buffer.slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_6Buffer_14slice(((struct __pyx_obj_7pyarrow_3lib_Buffer *)__pyx_v_self), __pyx_v_offset, __pyx_v_length);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_6Buffer_14slice(struct __pyx_obj_7pyarrow_3lib_Buffer *__pyx_v_self, PyObject *__pyx_v_offset, PyObject *__pyx_v_length) {
                      std::shared_ptr< arrow::Buffer>  __pyx_v_result;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      int __pyx_t_2;
                      PyObject *__pyx_t_3 = NULL;
                      size_t __pyx_t_4;
                      int64_t __pyx_t_5;
                      std::shared_ptr< arrow::Buffer>  __pyx_t_6;
                      int64_t __pyx_t_7;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("slice", 0);

                      /* "pyarrow/io.pxi":1486
 *         cdef shared_ptr[CBuffer] result
 * 
 *         if offset < 0:             # <<<<<<<<<<<<<<
 *             raise IndexError('Offset must be non-negative')
 * 
*/
                      __pyx_t_1 = PyObject_RichCompare(__pyx_v_offset, __pyx_mstate_global->__pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 1486, __pyx_L1_error)
                      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(6, 1486, __pyx_L1_error)
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      if (unlikely(__pyx_t_2)) {

                        /* "pyarrow/io.pxi":1487
 * 
 *         if offset < 0:
 *             raise IndexError('Offset must be non-negative')             # <<<<<<<<<<<<<<
 * 
 *         if length is None:
*/
                        __pyx_t_3 = NULL;
                        __pyx_t_4 = 1;
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Offset_must_be_non_negative};
                          __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_IndexError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                          if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 1487, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_1);
                        }
                        __Pyx_Raise(__pyx_t_1, 0, 0, 0);
                        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                        __PYX_ERR(6, 1487, __pyx_L1_error)

                        /* "pyarrow/io.pxi":1486
 *         cdef shared_ptr[CBuffer] result
 * 
 *         if offset < 0:             # <<<<<<<<<<<<<<
 *             raise IndexError('Offset must be non-negative')
 * 
*/
                      }

                      /* "pyarrow/io.pxi":1489
 *             raise IndexError('Offset must be non-negative')
 * 
 *         if length is None:             # <<<<<<<<<<<<<<
 *             result = GetResultValue(SliceBufferSafe(self.buffer, offset))
 *         else:
*/
                      __pyx_t_2 = (__pyx_v_length == Py_None);
                      if (__pyx_t_2) {

                        /* "pyarrow/io.pxi":1490
 * 
 *         if length is None:
 *             result = GetResultValue(SliceBufferSafe(self.buffer, offset))             # <<<<<<<<<<<<<<
 *         else:
 *             result = GetResultValue(SliceBufferSafe(self.buffer, offset,
*/
                        if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "buffer");
                          __PYX_ERR(6, 1490, __pyx_L1_error)
                        }
                        __pyx_t_5 = __Pyx_PyLong_As_int64_t(__pyx_v_offset); if (unlikely((__pyx_t_5 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(6, 1490, __pyx_L1_error)
                        __pyx_t_6 = arrow::py::GetResultValue<std::shared_ptr< arrow::Buffer> >(arrow::SliceBufferSafe(__pyx_v_self->buffer, __pyx_t_5)); if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 1490, __pyx_L1_error)
                        __pyx_v_result = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_6);

                        /* "pyarrow/io.pxi":1489
 *             raise IndexError('Offset must be non-negative')
 * 
 *         if length is None:             # <<<<<<<<<<<<<<
 *             result = GetResultValue(SliceBufferSafe(self.buffer, offset))
 *         else:
*/
                        goto __pyx_L4;
                      }

                      /* "pyarrow/io.pxi":1492
 *             result = GetResultValue(SliceBufferSafe(self.buffer, offset))
 *         else:
 *             result = GetResultValue(SliceBufferSafe(self.buffer, offset,             # <<<<<<<<<<<<<<
 *                                                     length))
 *         return pyarrow_wrap_buffer(result)
*/
                      /*else*/ {
                        if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "buffer");
                          __PYX_ERR(6, 1492, __pyx_L1_error)
                        }
                        __pyx_t_5 = __Pyx_PyLong_As_int64_t(__pyx_v_offset); if (unlikely((__pyx_t_5 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(6, 1492, __pyx_L1_error)

                        /* "pyarrow/io.pxi":1493
 *         else:
 *             result = GetResultValue(SliceBufferSafe(self.buffer, offset,
 *                                                     length))             # <<<<<<<<<<<<<<
 *         return pyarrow_wrap_buffer(result)
 * 
*/
                        __pyx_t_7 = __Pyx_PyLong_As_int64_t(__pyx_v_length); if (unlikely((__pyx_t_7 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(6, 1493, __pyx_L1_error)

                        /* "pyarrow/io.pxi":1492
 *             result = GetResultValue(SliceBufferSafe(self.buffer, offset))
 *         else:
 *             result = GetResultValue(SliceBufferSafe(self.buffer, offset,             # <<<<<<<<<<<<<<
 *                                                     length))
 *         return pyarrow_wrap_buffer(result)
*/
                        __pyx_t_6 = arrow::py::GetResultValue<std::shared_ptr< arrow::Buffer> >(arrow::SliceBufferSafe(__pyx_v_self->buffer, __pyx_t_5, __pyx_t_7)); if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 1492, __pyx_L1_error)
                        __pyx_v_result = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_6);
                      }
                      __pyx_L4:;

                      /* "pyarrow/io.pxi":1494
 *             result = GetResultValue(SliceBufferSafe(self.buffer, offset,
 *                                                     length))
 *         return pyarrow_wrap_buffer(result)             # <<<<<<<<<<<<<<
 * 
 *     def equals(self, Buffer other):
*/
                      __Pyx_XDECREF(__pyx_r);
                      __pyx_t_1 = pyarrow_wrap_buffer(__pyx_v_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 1494, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_r = __pyx_t_1;
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/io.pxi":1465
 *         return self.buffer.get().data()[i]
 * 
 *     def slice(self, offset=0, length=None):             # <<<<<<<<<<<<<<
 *         """
 *         Slice this buffer.  Memory is not copied.
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_AddTraceback("pyarrow.lib.Buffer.slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":1496
 *         return pyarrow_wrap_buffer(result)
 * 
 *     def equals(self, Buffer other):             # <<<<<<<<<<<<<<
 *         """
 *         Determine if two buffers contain exactly the same data.
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_6Buffer_17equals(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_6Buffer_16equals, "Buffer.equals(self, Buffer other)\n\nDetermine if two buffers contain exactly the same data.\n\nParameters\n----------\nother : Buffer\n\nReturns\n-------\nare_equal : bool\n    True if buffer contents and size are equal");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_6Buffer_17equals = {"equals", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_6Buffer_17equals, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_6Buffer_16equals};
                    static PyObject *__pyx_pw_7pyarrow_3lib_6Buffer_17equals(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      struct __pyx_obj_7pyarrow_3lib_Buffer *__pyx_v_other = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[1] = {0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("equals (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_other,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(6, 1496, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 1496, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "equals", 0) < (0)) __PYX_ERR(6, 1496, __pyx_L3_error)
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("equals", 1, 1, 1, i); __PYX_ERR(6, 1496, __pyx_L3_error) }
                          }
                        } else if (unlikely(__pyx_nargs != 1)) {
                          goto __pyx_L5_argtuple_error;
                        } else {
                          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 1496, __pyx_L3_error)
                        }
                        __pyx_v_other = ((struct __pyx_obj_7pyarrow_3lib_Buffer *)values[0]);
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("equals", 1, 1, 1, __pyx_nargs); __PYX_ERR(6, 1496, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.Buffer.equals", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Buffer, 1, "other", 0))) __PYX_ERR(6, 1496, __pyx_L1_error)
                      __pyx_r = __pyx_pf_7pyarrow_3lib_6Buffer_16equals(((struct __pyx_obj_7pyarrow_3lib_Buffer *)__pyx_v_self), __pyx_v_other);

                      /* function exit code */
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __pyx_r = NULL;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      goto __pyx_L7_cleaned_up;
                      __pyx_L0:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __pyx_L7_cleaned_up:;
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_6Buffer_16equals(struct __pyx_obj_7pyarrow_3lib_Buffer *__pyx_v_self, struct __pyx_obj_7pyarrow_3lib_Buffer *__pyx_v_other) {
                      bool __pyx_v_result;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      PyObject *__pyx_t_3 = NULL;
                      int __pyx_t_4;
                      PyObject *__pyx_t_5 = NULL;
                      PyObject *__pyx_t_6 = NULL;
                      PyObject *__pyx_t_7[5];
                      size_t __pyx_t_8;
                      int __pyx_t_9;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("equals", 0);

                      /* "pyarrow/io.pxi":1509
 *             True if buffer contents and size are equal
 *         """
 *         if self.device != other.device:             # <<<<<<<<<<<<<<
 *             raise ValueError(
 *                 "Device on which the data resides differs between buffers: "
*/
                      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_device); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 1509, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_mstate_global->__pyx_n_u_device); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 1509, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_2);
                      __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 1509, __pyx_L1_error)
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(6, 1509, __pyx_L1_error)
                      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                      if (unlikely(__pyx_t_4)) {

                        /* "pyarrow/io.pxi":1510
 *         """
 *         if self.device != other.device:
 *             raise ValueError(             # <<<<<<<<<<<<<<
 *                 "Device on which the data resides differs between buffers: "
 *                 f"{self.device.type_name} and {other.device.type_name}."
*/
                        __pyx_t_2 = NULL;

                        /* "pyarrow/io.pxi":1512
 *             raise ValueError(
 *                 "Device on which the data resides differs between buffers: "
 *                 f"{self.device.type_name} and {other.device.type_name}."             # <<<<<<<<<<<<<<
 *             )
 *         if not self.is_cpu:
*/
                        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_device); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 1512, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_type_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 1512, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_5);
                        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                        __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 1512, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_mstate_global->__pyx_n_u_device); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 1512, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_5);
                        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_type_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 1512, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_6);
                        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                        __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_t_6, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 1512, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_5);
                        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                        __pyx_t_7[0] = __pyx_mstate_global->__pyx_kp_u_Device_on_which_the_data_resides;
                        __pyx_t_7[1] = __pyx_t_1;
                        __pyx_t_7[2] = __pyx_mstate_global->__pyx_kp_u_and;
                        __pyx_t_7[3] = __pyx_t_5;
                        __pyx_t_7[4] = __pyx_mstate_global->__pyx_kp_u_;

                        /* "pyarrow/io.pxi":1511
 *         if self.device != other.device:
 *             raise ValueError(
 *                 "Device on which the data resides differs between buffers: "             # <<<<<<<<<<<<<<
 *                 f"{self.device.type_name} and {other.device.type_name}."
 *             )
*/
                        __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_7, 5, 58 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1) + 5 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5));
                        if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 1511, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_6);
                        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                        __pyx_t_8 = 1;
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_6};
                          __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                          if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 1510, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_3);
                        }
                        __Pyx_Raise(__pyx_t_3, 0, 0, 0);
                        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                        __PYX_ERR(6, 1510, __pyx_L1_error)

                        /* "pyarrow/io.pxi":1509
 *             True if buffer contents and size are equal
 *         """
 *         if self.device != other.device:             # <<<<<<<<<<<<<<
 *             raise ValueError(
 *                 "Device on which the data resides differs between buffers: "
*/
                      }

                      /* "pyarrow/io.pxi":1514
 *                 f"{self.device.type_name} and {other.device.type_name}."
 *             )
 *         if not self.is_cpu:             # <<<<<<<<<<<<<<
 *             if self.address != other.address:
 *                 raise NotImplementedError(
*/
                      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_is_cpu); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 1514, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_3);
                      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(6, 1514, __pyx_L1_error)
                      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                      __pyx_t_9 = (!__pyx_t_4);
                      if (__pyx_t_9) {

                        /* "pyarrow/io.pxi":1515
 *             )
 *         if not self.is_cpu:
 *             if self.address != other.address:             # <<<<<<<<<<<<<<
 *                 raise NotImplementedError(
 *                     "Implemented only for data on CPU device or data with equal "
*/
                        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_address_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 1515, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_3);
                        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_mstate_global->__pyx_n_u_address_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 1515, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_6);
                        __pyx_t_2 = PyObject_RichCompare(__pyx_t_3, __pyx_t_6, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 1515, __pyx_L1_error)
                        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                        __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(6, 1515, __pyx_L1_error)
                        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                        if (unlikely(__pyx_t_9)) {

                          /* "pyarrow/io.pxi":1516
 *         if not self.is_cpu:
 *             if self.address != other.address:
 *                 raise NotImplementedError(             # <<<<<<<<<<<<<<
 *                     "Implemented only for data on CPU device or data with equal "
 *                     "addresses"
*/
                          __pyx_t_6 = NULL;
                          __pyx_t_8 = 1;
                          {
                            PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_mstate_global->__pyx_kp_u_Implemented_only_for_data_on_CPU_2};
                            __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_NotImplementedError)), __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                            __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
                            if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 1516, __pyx_L1_error)
                            __Pyx_GOTREF(__pyx_t_2);
                          }
                          __Pyx_Raise(__pyx_t_2, 0, 0, 0);
                          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                          __PYX_ERR(6, 1516, __pyx_L1_error)

                          /* "pyarrow/io.pxi":1515
 *             )
 *         if not self.is_cpu:
 *             if self.address != other.address:             # <<<<<<<<<<<<<<
 *                 raise NotImplementedError(
 *                     "Implemented only for data on CPU device or data with equal "
*/
                        }

                        /* "pyarrow/io.pxi":1514
 *                 f"{self.device.type_name} and {other.device.type_name}."
 *             )
 *         if not self.is_cpu:             # <<<<<<<<<<<<<<
 *             if self.address != other.address:
 *                 raise NotImplementedError(
*/
                      }

                      /* "pyarrow/io.pxi":1521
 *                 )
 * 
 *         cdef c_bool result = False             # <<<<<<<<<<<<<<
 *         with nogil:
 *             result = self.buffer.get().Equals(deref(other.buffer.get()))
*/
                      __pyx_v_result = 0;

                      /* "pyarrow/io.pxi":1522
 * 
 *         cdef c_bool result = False
 *         with nogil:             # <<<<<<<<<<<<<<
 *             result = self.buffer.get().Equals(deref(other.buffer.get()))
 *         return result
*/
                      {
                          PyThreadState * _save;
                          _save = PyEval_SaveThread();
                          __Pyx_FastGIL_Remember();
                          /*try:*/ {

                            /* "pyarrow/io.pxi":1523
 *         cdef c_bool result = False
 *         with nogil:
 *             result = self.buffer.get().Equals(deref(other.buffer.get()))             # <<<<<<<<<<<<<<
 *         return result
 * 
*/
                            if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                              PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "buffer");
                              __Pyx_PyGILState_Release(__pyx_gilstate_save);
                              __PYX_ERR(6, 1523, __pyx_L7_error)
                            }
                            if (unlikely(((PyObject *)__pyx_v_other) == Py_None)) {
                              PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "buffer");
                              __Pyx_PyGILState_Release(__pyx_gilstate_save);
                              __PYX_ERR(6, 1523, __pyx_L7_error)
                            }
                            __pyx_v_result = __pyx_v_self->buffer.get()->Equals((*__pyx_v_other->buffer.get()));
                          }

                          /* "pyarrow/io.pxi":1522
 * 
 *         cdef c_bool result = False
 *         with nogil:             # <<<<<<<<<<<<<<
 *             result = self.buffer.get().Equals(deref(other.buffer.get()))
 *         return result
*/
                          /*finally:*/ {
                            /*normal exit:*/{
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L8;
                            }
                            __pyx_L7_error: {
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L1_error;
                            }
                            __pyx_L8:;
                          }
                      }

                      /* "pyarrow/io.pxi":1524
 *         with nogil:
 *             result = self.buffer.get().Equals(deref(other.buffer.get()))
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     def __eq__(self, other):
*/
                      __Pyx_XDECREF(__pyx_r);
                      __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_result); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 1524, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_2);
                      __pyx_r = __pyx_t_2;
                      __pyx_t_2 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/io.pxi":1496
 *         return pyarrow_wrap_buffer(result)
 * 
 *     def equals(self, Buffer other):             # <<<<<<<<<<<<<<
 *         """
 *         Determine if two buffers contain exactly the same data.
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_XDECREF(__pyx_t_5);
                      __Pyx_XDECREF(__pyx_t_6);
                      __Pyx_AddTraceback("pyarrow.lib.Buffer.equals", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":1526
 *         return result
 * 
 *     def __eq__(self, other):             # <<<<<<<<<<<<<<
 *         if isinstance(other, Buffer):
 *             return self.equals(other)
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_6Buffer_19__eq__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
                    static PyObject *__pyx_pw_7pyarrow_3lib_6Buffer_19__eq__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__eq__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_6Buffer_18__eq__(((struct __pyx_obj_7pyarrow_3lib_Buffer *)__pyx_v_self), ((PyObject *)__pyx_v_other));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_6Buffer_18__eq__(struct __pyx_obj_7pyarrow_3lib_Buffer *__pyx_v_self, PyObject *__pyx_v_other) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_t_1;
                      PyObject *__pyx_t_2 = NULL;
                      PyObject *__pyx_t_3 = NULL;
                      size_t __pyx_t_4;
                      PyObject *__pyx_t_5 = NULL;
                      PyObject *__pyx_t_6 = NULL;
                      PyObject *__pyx_t_7 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__eq__", 0);

                      /* "pyarrow/io.pxi":1527
 * 
 *     def __eq__(self, other):
 *         if isinstance(other, Buffer):             # <<<<<<<<<<<<<<
 *             return self.equals(other)
 *         else:
*/
                      __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_other, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Buffer); 
                      if (__pyx_t_1) {

                        /* "pyarrow/io.pxi":1528
 *     def __eq__(self, other):
 *         if isinstance(other, Buffer):
 *             return self.equals(other)             # <<<<<<<<<<<<<<
 *         else:
 *             return self.equals(py_buffer(other))
*/
                        __Pyx_XDECREF(__pyx_r);
                        __pyx_t_3 = ((PyObject *)__pyx_v_self);
                        __Pyx_INCREF(__pyx_t_3);
                        __pyx_t_4 = 0;
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_other};
                          __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_equals, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                          if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 1528, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_2);
                        }
                        __pyx_r = __pyx_t_2;
                        __pyx_t_2 = 0;
                        goto __pyx_L0;

                        /* "pyarrow/io.pxi":1527
 * 
 *     def __eq__(self, other):
 *         if isinstance(other, Buffer):             # <<<<<<<<<<<<<<
 *             return self.equals(other)
 *         else:
*/
                      }

                      /* "pyarrow/io.pxi":1530
 *             return self.equals(other)
 *         else:
 *             return self.equals(py_buffer(other))             # <<<<<<<<<<<<<<
 * 
 *     def __reduce_ex__(self, protocol):
*/
                      /*else*/ {
                        __Pyx_XDECREF(__pyx_r);
                        __pyx_t_3 = ((PyObject *)__pyx_v_self);
                        __Pyx_INCREF(__pyx_t_3);
                        __pyx_t_6 = NULL;
                        __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_py_buffer); if (unlikely(!__pyx_t_7)) __PYX_ERR(6, 1530, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_7);
                        __pyx_t_4 = 1;
                        #if CYTHON_UNPACK_METHODS
                        if (unlikely(PyMethod_Check(__pyx_t_7))) {
                          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
                          assert(__pyx_t_6);
                          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
                          __Pyx_INCREF(__pyx_t_6);
                          __Pyx_INCREF(__pyx__function);
                          __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
                          __pyx_t_4 = 0;
                        }
                        #endif
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_other};
                          __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
                          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
                          if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 1530, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_5);
                        }
                        __pyx_t_4 = 0;
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
                          __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_equals, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                          if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 1530, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_2);
                        }
                        __pyx_r = __pyx_t_2;
                        __pyx_t_2 = 0;
                        goto __pyx_L0;
                      }

                      /* "pyarrow/io.pxi":1526
 *         return result
 * 
 *     def __eq__(self, other):             # <<<<<<<<<<<<<<
 *         if isinstance(other, Buffer):
 *             return self.equals(other)
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_XDECREF(__pyx_t_5);
                      __Pyx_XDECREF(__pyx_t_6);
                      __Pyx_XDECREF(__pyx_t_7);
                      __Pyx_AddTraceback("pyarrow.lib.Buffer.__eq__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":1532
 *             return self.equals(py_buffer(other))
 * 
 *     def __reduce_ex__(self, protocol):             # <<<<<<<<<<<<<<
 *         self._assert_cpu()
 * 
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_6Buffer_21__reduce_ex__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_6Buffer_20__reduce_ex__, "Buffer.__reduce_ex__(self, protocol)");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_6Buffer_21__reduce_ex__ = {"__reduce_ex__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_6Buffer_21__reduce_ex__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_6Buffer_20__reduce_ex__};
                    static PyObject *__pyx_pw_7pyarrow_3lib_6Buffer_21__reduce_ex__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      PyObject *__pyx_v_protocol = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[1] = {0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__reduce_ex__ (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_protocol,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(6, 1532, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 1532, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__reduce_ex__", 0) < (0)) __PYX_ERR(6, 1532, __pyx_L3_error)
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__reduce_ex__", 1, 1, 1, i); __PYX_ERR(6, 1532, __pyx_L3_error) }
                          }
                        } else if (unlikely(__pyx_nargs != 1)) {
                          goto __pyx_L5_argtuple_error;
                        } else {
                          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 1532, __pyx_L3_error)
                        }
                        __pyx_v_protocol = values[0];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("__reduce_ex__", 1, 1, 1, __pyx_nargs); __PYX_ERR(6, 1532, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.Buffer.__reduce_ex__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_6Buffer_20__reduce_ex__(((struct __pyx_obj_7pyarrow_3lib_Buffer *)__pyx_v_self), __pyx_v_protocol);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_6Buffer_20__reduce_ex__(struct __pyx_obj_7pyarrow_3lib_Buffer *__pyx_v_self, PyObject *__pyx_v_protocol) {
                      PyObject *__pyx_v_bufobj = NULL;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      size_t __pyx_t_3;
                      int __pyx_t_4;
                      PyObject *__pyx_t_5 = NULL;
                      PyObject *__pyx_t_6 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__reduce_ex__", 0);

                      /* "pyarrow/io.pxi":1533
 * 
 *     def __reduce_ex__(self, protocol):
 *         self._assert_cpu()             # <<<<<<<<<<<<<<
 * 
 *         if protocol >= 5:
*/
                      __pyx_t_2 = ((PyObject *)__pyx_v_self);
                      __Pyx_INCREF(__pyx_t_2);
                      __pyx_t_3 = 0;
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
                        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_assert_cpu, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 1533, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

                      /* "pyarrow/io.pxi":1535
 *         self._assert_cpu()
 * 
 *         if protocol >= 5:             # <<<<<<<<<<<<<<
 *             bufobj = pickle.PickleBuffer(self)
 *         elif self.buffer.get().is_mutable():
*/
                      __pyx_t_1 = PyObject_RichCompare(__pyx_v_protocol, __pyx_mstate_global->__pyx_int_5, Py_GE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 1535, __pyx_L1_error)
                      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(6, 1535, __pyx_L1_error)
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      if (__pyx_t_4) {

                        /* "pyarrow/io.pxi":1536
 * 
 *         if protocol >= 5:
 *             bufobj = pickle.PickleBuffer(self)             # <<<<<<<<<<<<<<
 *         elif self.buffer.get().is_mutable():
 *             # Need to pass a bytearray to recreate a mutable buffer when
*/
                        __pyx_t_2 = NULL;
                        __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pickle); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 1536, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_5);
                        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_PickleBuffer); if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 1536, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_6);
                        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                        __pyx_t_3 = 1;
                        #if CYTHON_UNPACK_METHODS
                        if (unlikely(PyMethod_Check(__pyx_t_6))) {
                          __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_6);
                          assert(__pyx_t_2);
                          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
                          __Pyx_INCREF(__pyx_t_2);
                          __Pyx_INCREF(__pyx__function);
                          __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
                          __pyx_t_3 = 0;
                        }
                        #endif
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_2, ((PyObject *)__pyx_v_self)};
                          __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                          if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 1536, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_1);
                        }
                        __pyx_v_bufobj = __pyx_t_1;
                        __pyx_t_1 = 0;

                        /* "pyarrow/io.pxi":1535
 *         self._assert_cpu()
 * 
 *         if protocol >= 5:             # <<<<<<<<<<<<<<
 *             bufobj = pickle.PickleBuffer(self)
 *         elif self.buffer.get().is_mutable():
*/
                        goto __pyx_L3;
                      }

                      /* "pyarrow/io.pxi":1537
 *         if protocol >= 5:
 *             bufobj = pickle.PickleBuffer(self)
 *         elif self.buffer.get().is_mutable():             # <<<<<<<<<<<<<<
 *             # Need to pass a bytearray to recreate a mutable buffer when
 *             # unpickling.
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "buffer");
                        __PYX_ERR(6, 1537, __pyx_L1_error)
                      }
                      __pyx_t_4 = (__pyx_v_self->buffer.get()->is_mutable() != 0);
                      if (__pyx_t_4) {

                        /* "pyarrow/io.pxi":1541
 *             # unpickling.
 *             bufobj = PyByteArray_FromStringAndSize(
 *                 <const char*>self.buffer.get().data(),             # <<<<<<<<<<<<<<
 *                 self.buffer.get().size())
 *         else:
*/
                        if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "buffer");
                          __PYX_ERR(6, 1541, __pyx_L1_error)
                        }

                        /* "pyarrow/io.pxi":1542
 *             bufobj = PyByteArray_FromStringAndSize(
 *                 <const char*>self.buffer.get().data(),
 *                 self.buffer.get().size())             # <<<<<<<<<<<<<<
 *         else:
 *             bufobj = self.to_pybytes()
*/
                        if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "buffer");
                          __PYX_ERR(6, 1542, __pyx_L1_error)
                        }

                        /* "pyarrow/io.pxi":1540
 *             # Need to pass a bytearray to recreate a mutable buffer when
 *             # unpickling.
 *             bufobj = PyByteArray_FromStringAndSize(             # <<<<<<<<<<<<<<
 *                 <const char*>self.buffer.get().data(),
 *                 self.buffer.get().size())
*/
                        __pyx_t_1 = PyByteArray_FromStringAndSize(((char const *)__pyx_v_self->buffer.get()->data()), __pyx_v_self->buffer.get()->size()); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 1540, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                        __pyx_v_bufobj = __pyx_t_1;
                        __pyx_t_1 = 0;

                        /* "pyarrow/io.pxi":1537
 *         if protocol >= 5:
 *             bufobj = pickle.PickleBuffer(self)
 *         elif self.buffer.get().is_mutable():             # <<<<<<<<<<<<<<
 *             # Need to pass a bytearray to recreate a mutable buffer when
 *             # unpickling.
*/
                        goto __pyx_L3;
                      }

                      /* "pyarrow/io.pxi":1544
 *                 self.buffer.get().size())
 *         else:
 *             bufobj = self.to_pybytes()             # <<<<<<<<<<<<<<
 *         return py_buffer, (bufobj,)
 * 
*/
                      /*else*/ {
                        __pyx_t_6 = ((PyObject *)__pyx_v_self);
                        __Pyx_INCREF(__pyx_t_6);
                        __pyx_t_3 = 0;
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
                          __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_to_pybytes, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
                          if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 1544, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_1);
                        }
                        __pyx_v_bufobj = __pyx_t_1;
                        __pyx_t_1 = 0;
                      }
                      __pyx_L3:;

                      /* "pyarrow/io.pxi":1545
 *         else:
 *             bufobj = self.to_pybytes()
 *         return py_buffer, (bufobj,)             # <<<<<<<<<<<<<<
 * 
 *     def to_pybytes(self):
*/
                      __Pyx_XDECREF(__pyx_r);
                      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_py_buffer); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 1545, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 1545, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_6);
                      __Pyx_INCREF(__pyx_v_bufobj);
                      __Pyx_GIVEREF(__pyx_v_bufobj);
                      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_bufobj) != (0)) __PYX_ERR(6, 1545, __pyx_L1_error);
                      __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 1545, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_2);
                      __Pyx_GIVEREF(__pyx_t_1);
                      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1) != (0)) __PYX_ERR(6, 1545, __pyx_L1_error);
                      __Pyx_GIVEREF(__pyx_t_6);
                      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_6) != (0)) __PYX_ERR(6, 1545, __pyx_L1_error);
                      __pyx_t_1 = 0;
                      __pyx_t_6 = 0;
                      __pyx_r = __pyx_t_2;
                      __pyx_t_2 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/io.pxi":1532
 *             return self.equals(py_buffer(other))
 * 
 *     def __reduce_ex__(self, protocol):             # <<<<<<<<<<<<<<
 *         self._assert_cpu()
 * 
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_XDECREF(__pyx_t_5);
                      __Pyx_XDECREF(__pyx_t_6);
                      __Pyx_AddTraceback("pyarrow.lib.Buffer.__reduce_ex__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XDECREF(__pyx_v_bufobj);
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":1547
 *         return py_buffer, (bufobj,)
 * 
 *     def to_pybytes(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return this buffer as a Python bytes object. Memory is copied.
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_6Buffer_23to_pybytes(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_6Buffer_22to_pybytes, "Buffer.to_pybytes(self)\n\nReturn this buffer as a Python bytes object. Memory is copied.");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_6Buffer_23to_pybytes = {"to_pybytes", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_6Buffer_23to_pybytes, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_6Buffer_22to_pybytes};
                    static PyObject *__pyx_pw_7pyarrow_3lib_6Buffer_23to_pybytes(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("to_pybytes (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("to_pybytes", 1, 0, 0, __pyx_nargs); return NULL; }
                      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                      if (unlikely(__pyx_kwds_len < 0)) return NULL;
                      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("to_pybytes", __pyx_kwds); return NULL;}
                      __pyx_r = __pyx_pf_7pyarrow_3lib_6Buffer_22to_pybytes(((struct __pyx_obj_7pyarrow_3lib_Buffer *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_6Buffer_22to_pybytes(struct __pyx_obj_7pyarrow_3lib_Buffer *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      size_t __pyx_t_3;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("to_pybytes", 0);

                      /* "pyarrow/io.pxi":1551
 *         Return this buffer as a Python bytes object. Memory is copied.
 *         """
 *         self._assert_cpu()             # <<<<<<<<<<<<<<
 * 
 *         return cp.PyBytes_FromStringAndSize(
*/
                      __pyx_t_2 = ((PyObject *)__pyx_v_self);
                      __Pyx_INCREF(__pyx_t_2);
                      __pyx_t_3 = 0;
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
                        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_assert_cpu, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 1551, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

                      /* "pyarrow/io.pxi":1553
 *         self._assert_cpu()
 * 
 *         return cp.PyBytes_FromStringAndSize(             # <<<<<<<<<<<<<<
 *             <const char*>self.buffer.get().data(),
 *             self.buffer.get().size())
*/
                      __Pyx_XDECREF(__pyx_r);

                      /* "pyarrow/io.pxi":1554
 * 
 *         return cp.PyBytes_FromStringAndSize(
 *             <const char*>self.buffer.get().data(),             # <<<<<<<<<<<<<<
 *             self.buffer.get().size())
 * 
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "buffer");
                        __PYX_ERR(6, 1554, __pyx_L1_error)
                      }

                      /* "pyarrow/io.pxi":1555
 *         return cp.PyBytes_FromStringAndSize(
 *             <const char*>self.buffer.get().data(),
 *             self.buffer.get().size())             # <<<<<<<<<<<<<<
 * 
 *     def __getbuffer__(self, cp.Py_buffer* buffer, int flags):
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "buffer");
                        __PYX_ERR(6, 1555, __pyx_L1_error)
                      }

                      /* "pyarrow/io.pxi":1553
 *         self._assert_cpu()
 * 
 *         return cp.PyBytes_FromStringAndSize(             # <<<<<<<<<<<<<<
 *             <const char*>self.buffer.get().data(),
 *             self.buffer.get().size())
*/
                      __pyx_t_1 = PyBytes_FromStringAndSize(((char const *)__pyx_v_self->buffer.get()->data()), __pyx_v_self->buffer.get()->size()); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 1553, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_r = __pyx_t_1;
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/io.pxi":1547
 *         return py_buffer, (bufobj,)
 * 
 *     def to_pybytes(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return this buffer as a Python bytes object. Memory is copied.
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_AddTraceback("pyarrow.lib.Buffer.to_pybytes", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":1557
 *             self.buffer.get().size())
 * 
 *     def __getbuffer__(self, cp.Py_buffer* buffer, int flags):             # <<<<<<<<<<<<<<
 *         self._assert_cpu()
 * 
*/

                    /* Python wrapper */
                    CYTHON_UNUSED static int __pyx_pw_7pyarrow_3lib_6Buffer_25__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_buffer, int __pyx_v_flags); /*proto*/
                    CYTHON_UNUSED static int __pyx_pw_7pyarrow_3lib_6Buffer_25__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_buffer, int __pyx_v_flags) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      int __pyx_r;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_6Buffer_24__getbuffer__(((struct __pyx_obj_7pyarrow_3lib_Buffer *)__pyx_v_self), ((Py_buffer *)__pyx_v_buffer), ((int)__pyx_v_flags));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static int __pyx_pf_7pyarrow_3lib_6Buffer_24__getbuffer__(struct __pyx_obj_7pyarrow_3lib_Buffer *__pyx_v_self, Py_buffer *__pyx_v_buffer, int __pyx_v_flags) {
                      int __pyx_r;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      size_t __pyx_t_3;
                      int __pyx_t_4;
                      Py_ssize_t __pyx_t_5;
                      Py_ssize_t *__pyx_t_6;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      if (unlikely(__pyx_v_buffer == NULL)) {
                        PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete");
                        return -1;
                      }
                      __Pyx_RefNannySetupContext("__getbuffer__", 0);
                      __pyx_v_buffer->obj = Py_None; __Pyx_INCREF(Py_None);
                      __Pyx_GIVEREF(__pyx_v_buffer->obj);

                      /* "pyarrow/io.pxi":1558
 * 
 *     def __getbuffer__(self, cp.Py_buffer* buffer, int flags):
 *         self._assert_cpu()             # <<<<<<<<<<<<<<
 * 
 *         if self.buffer.get().is_mutable():
*/
                      __pyx_t_2 = ((PyObject *)__pyx_v_self);
                      __Pyx_INCREF(__pyx_t_2);
                      __pyx_t_3 = 0;
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
                        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_assert_cpu, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 1558, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

                      /* "pyarrow/io.pxi":1560
 *         self._assert_cpu()
 * 
 *         if self.buffer.get().is_mutable():             # <<<<<<<<<<<<<<
 *             buffer.readonly = 0
 *         else:
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "buffer");
                        __PYX_ERR(6, 1560, __pyx_L1_error)
                      }
                      __pyx_t_4 = (__pyx_v_self->buffer.get()->is_mutable() != 0);
                      if (__pyx_t_4) {

                        /* "pyarrow/io.pxi":1561
 * 
 *         if self.buffer.get().is_mutable():
 *             buffer.readonly = 0             # <<<<<<<<<<<<<<
 *         else:
 *             if flags & cp.PyBUF_WRITABLE:
*/
                        __pyx_v_buffer->readonly = 0;

                        /* "pyarrow/io.pxi":1560
 *         self._assert_cpu()
 * 
 *         if self.buffer.get().is_mutable():             # <<<<<<<<<<<<<<
 *             buffer.readonly = 0
 *         else:
*/
                        goto __pyx_L3;
                      }

                      /* "pyarrow/io.pxi":1563
 *             buffer.readonly = 0
 *         else:
 *             if flags & cp.PyBUF_WRITABLE:             # <<<<<<<<<<<<<<
 *                 raise BufferError("Writable buffer requested but Arrow "
 *                                   "buffer was not mutable")
*/
                      /*else*/ {
                        __pyx_t_4 = ((__pyx_v_flags & PyBUF_WRITABLE) != 0);
                        if (unlikely(__pyx_t_4)) {

                          /* "pyarrow/io.pxi":1564
 *         else:
 *             if flags & cp.PyBUF_WRITABLE:
 *                 raise BufferError("Writable buffer requested but Arrow "             # <<<<<<<<<<<<<<
 *                                   "buffer was not mutable")
 *             buffer.readonly = 1
*/
                          __pyx_t_2 = NULL;
                          __pyx_t_3 = 1;
                          {
                            PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Writable_buffer_requested_but_Ar};
                            __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_BufferError)), __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                            if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 1564, __pyx_L1_error)
                            __Pyx_GOTREF(__pyx_t_1);
                          }
                          __Pyx_Raise(__pyx_t_1, 0, 0, 0);
                          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                          __PYX_ERR(6, 1564, __pyx_L1_error)

                          /* "pyarrow/io.pxi":1563
 *             buffer.readonly = 0
 *         else:
 *             if flags & cp.PyBUF_WRITABLE:             # <<<<<<<<<<<<<<
 *                 raise BufferError("Writable buffer requested but Arrow "
 *                                   "buffer was not mutable")
*/
                        }

                        /* "pyarrow/io.pxi":1566
 *                 raise BufferError("Writable buffer requested but Arrow "
 *                                   "buffer was not mutable")
 *             buffer.readonly = 1             # <<<<<<<<<<<<<<
 *         buffer.buf = <char *>self.buffer.get().data()
 *         buffer.len = self.size
*/
                        __pyx_v_buffer->readonly = 1;
                      }
                      __pyx_L3:;

                      /* "pyarrow/io.pxi":1567
 *                                   "buffer was not mutable")
 *             buffer.readonly = 1
 *         buffer.buf = <char *>self.buffer.get().data()             # <<<<<<<<<<<<<<
 *         buffer.len = self.size
 *         if buffer.buf == NULL:
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "buffer");
                        __PYX_ERR(6, 1567, __pyx_L1_error)
                      }
                      __pyx_v_buffer->buf = ((char *)__pyx_v_self->buffer.get()->data());

                      /* "pyarrow/io.pxi":1568
 *             buffer.readonly = 1
 *         buffer.buf = <char *>self.buffer.get().data()
 *         buffer.len = self.size             # <<<<<<<<<<<<<<
 *         if buffer.buf == NULL:
 *             # ARROW-16048: Ensure we don't export a NULL address.
*/
                      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 1568, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(6, 1568, __pyx_L1_error)
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      __pyx_v_buffer->len = __pyx_t_5;

                      /* "pyarrow/io.pxi":1569
 *         buffer.buf = <char *>self.buffer.get().data()
 *         buffer.len = self.size
 *         if buffer.buf == NULL:             # <<<<<<<<<<<<<<
 *             # ARROW-16048: Ensure we don't export a NULL address.
 *             assert buffer.len == 0
*/
                      __pyx_t_4 = (__pyx_v_buffer->buf == NULL);
                      if (__pyx_t_4) {

                        /* "pyarrow/io.pxi":1571
 *         if buffer.buf == NULL:
 *             # ARROW-16048: Ensure we don't export a NULL address.
 *             assert buffer.len == 0             # <<<<<<<<<<<<<<
 *             buffer.buf = cp.PyBytes_AS_STRING(b"")
 *         buffer.format = 'b'
*/
                        #ifndef CYTHON_WITHOUT_ASSERTIONS
                        if (unlikely(__pyx_assertions_enabled())) {
                          __pyx_t_4 = (__pyx_v_buffer->len == 0);
                          if (unlikely(!__pyx_t_4)) {
                            __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
                            __PYX_ERR(6, 1571, __pyx_L1_error)
                          }
                        }
                        #else
                        if ((1)); else __PYX_ERR(6, 1571, __pyx_L1_error)
                        #endif

                        /* "pyarrow/io.pxi":1572
 *             # ARROW-16048: Ensure we don't export a NULL address.
 *             assert buffer.len == 0
 *             buffer.buf = cp.PyBytes_AS_STRING(b"")             # <<<<<<<<<<<<<<
 *         buffer.format = 'b'
 *         buffer.internal = NULL
*/
                        __pyx_v_buffer->buf = PyBytes_AS_STRING(__pyx_mstate_global->__pyx_kp_b__15);

                        /* "pyarrow/io.pxi":1569
 *         buffer.buf = <char *>self.buffer.get().data()
 *         buffer.len = self.size
 *         if buffer.buf == NULL:             # <<<<<<<<<<<<<<
 *             # ARROW-16048: Ensure we don't export a NULL address.
 *             assert buffer.len == 0
*/
                      }

                      /* "pyarrow/io.pxi":1573
 *             assert buffer.len == 0
 *             buffer.buf = cp.PyBytes_AS_STRING(b"")
 *         buffer.format = 'b'             # <<<<<<<<<<<<<<
 *         buffer.internal = NULL
 *         buffer.itemsize = 1
*/
                      __pyx_v_buffer->format = ((char *)"b");

                      /* "pyarrow/io.pxi":1574
 *             buffer.buf = cp.PyBytes_AS_STRING(b"")
 *         buffer.format = 'b'
 *         buffer.internal = NULL             # <<<<<<<<<<<<<<
 *         buffer.itemsize = 1
 *         buffer.ndim = 1
*/
                      __pyx_v_buffer->internal = NULL;

                      /* "pyarrow/io.pxi":1575
 *         buffer.format = 'b'
 *         buffer.internal = NULL
 *         buffer.itemsize = 1             # <<<<<<<<<<<<<<
 *         buffer.ndim = 1
 *         buffer.obj = self
*/
                      __pyx_v_buffer->itemsize = 1;

                      /* "pyarrow/io.pxi":1576
 *         buffer.internal = NULL
 *         buffer.itemsize = 1
 *         buffer.ndim = 1             # <<<<<<<<<<<<<<
 *         buffer.obj = self
 *         buffer.shape = self.shape
*/
                      __pyx_v_buffer->ndim = 1;

                      /* "pyarrow/io.pxi":1577
 *         buffer.itemsize = 1
 *         buffer.ndim = 1
 *         buffer.obj = self             # <<<<<<<<<<<<<<
 *         buffer.shape = self.shape
 *         buffer.strides = self.strides
*/
                      __Pyx_INCREF((PyObject *)__pyx_v_self);
                      __Pyx_GIVEREF((PyObject *)__pyx_v_self);
                      __Pyx_GOTREF(__pyx_v_buffer->obj);
                      __Pyx_DECREF(__pyx_v_buffer->obj);
                      __pyx_v_buffer->obj = ((PyObject *)__pyx_v_self);

                      /* "pyarrow/io.pxi":1578
 *         buffer.ndim = 1
 *         buffer.obj = self
 *         buffer.shape = self.shape             # <<<<<<<<<<<<<<
 *         buffer.strides = self.strides
 *         buffer.suboffsets = NULL
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "shape");
                        __PYX_ERR(6, 1578, __pyx_L1_error)
                      }
                      __pyx_t_6 = __pyx_v_self->shape;
                      __pyx_v_buffer->shape = __pyx_t_6;

                      /* "pyarrow/io.pxi":1579
 *         buffer.obj = self
 *         buffer.shape = self.shape
 *         buffer.strides = self.strides             # <<<<<<<<<<<<<<
 *         buffer.suboffsets = NULL
 * 
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "strides");
                        __PYX_ERR(6, 1579, __pyx_L1_error)
                      }
                      __pyx_t_6 = __pyx_v_self->strides;
                      __pyx_v_buffer->strides = __pyx_t_6;

                      /* "pyarrow/io.pxi":1580
 *         buffer.shape = self.shape
 *         buffer.strides = self.strides
 *         buffer.suboffsets = NULL             # <<<<<<<<<<<<<<
 * 
 * 
*/
                      __pyx_v_buffer->suboffsets = NULL;

                      /* "pyarrow/io.pxi":1557
 *             self.buffer.get().size())
 * 
 *     def __getbuffer__(self, cp.Py_buffer* buffer, int flags):             # <<<<<<<<<<<<<<
 *         self._assert_cpu()
 * 
*/

                      /* function exit code */
                      __pyx_r = 0;
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_AddTraceback("pyarrow.lib.Buffer.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = -1;
                      if (__pyx_v_buffer->obj != NULL) {
                        __Pyx_GOTREF(__pyx_v_buffer->obj);
                        __Pyx_DECREF(__pyx_v_buffer->obj); __pyx_v_buffer->obj = 0;
                      }
                      goto __pyx_L2;
                      __pyx_L0:;
                      if (__pyx_v_buffer->obj == Py_None) {
                        __Pyx_GOTREF(__pyx_v_buffer->obj);
                        __Pyx_DECREF(__pyx_v_buffer->obj); __pyx_v_buffer->obj = 0;
                      }
                      __pyx_L2:;
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":1588
 *     """
 * 
 *     cdef void init_rz(self, const shared_ptr[CResizableBuffer]& buffer):             # <<<<<<<<<<<<<<
 *         self.init(<shared_ptr[CBuffer]> buffer)
 * 
*/

                    static void __pyx_f_7pyarrow_3lib_15ResizableBuffer_init_rz(struct __pyx_obj_7pyarrow_3lib_ResizableBuffer *__pyx_v_self, std::shared_ptr< arrow::ResizableBuffer>  const &__pyx_v_buffer) {
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;

                      /* "pyarrow/io.pxi":1589
 * 
 *     cdef void init_rz(self, const shared_ptr[CResizableBuffer]& buffer):
 *         self.init(<shared_ptr[CBuffer]> buffer)             # <<<<<<<<<<<<<<
 * 
 *     def resize(self, int64_t new_size, shrink_to_fit=False):
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "init");
                        __PYX_ERR(6, 1589, __pyx_L1_error)
                      }
                      ((struct __pyx_vtabstruct_7pyarrow_3lib_ResizableBuffer *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.init(((struct __pyx_obj_7pyarrow_3lib_Buffer *)__pyx_v_self), ((std::shared_ptr< arrow::Buffer> )__pyx_v_buffer)); if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 1589, __pyx_L1_error)

                      /* "pyarrow/io.pxi":1588
 *     """
 * 
 *     cdef void init_rz(self, const shared_ptr[CResizableBuffer]& buffer):             # <<<<<<<<<<<<<<
 *         self.init(<shared_ptr[CBuffer]> buffer)
 * 
*/

                      /* function exit code */
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib.ResizableBuffer.init_rz", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_L0:;
                    }

                    /* "pyarrow/io.pxi":1591
 *         self.init(<shared_ptr[CBuffer]> buffer)
 * 
 *     def resize(self, int64_t new_size, shrink_to_fit=False):             # <<<<<<<<<<<<<<
 *         """
 *         Resize buffer to indicated size.
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_15ResizableBuffer_1resize(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_15ResizableBuffer_resize, "ResizableBuffer.resize(self, int64_t new_size, shrink_to_fit=False)\n\nResize buffer to indicated size.\n\nParameters\n----------\nnew_size : int\n    New size of buffer (padding may be added internally).\nshrink_to_fit : bool, default False\n    If this is true, the buffer is shrunk when new_size is less\n    than the current size.\n    If this is false, the buffer is never shrunk.");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_15ResizableBuffer_1resize = {"resize", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15ResizableBuffer_1resize, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15ResizableBuffer_resize};
                    static PyObject *__pyx_pw_7pyarrow_3lib_15ResizableBuffer_1resize(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      int64_t __pyx_v_new_size;
                      PyObject *__pyx_v_shrink_to_fit = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[2] = {0,0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("resize (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_new_size,&__pyx_mstate_global->__pyx_n_u_shrink_to_fit,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(6, 1591, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  2:
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(6, 1591, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 1591, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "resize", 0) < (0)) __PYX_ERR(6, 1591, __pyx_L3_error)
                          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_False));
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("resize", 0, 1, 2, i); __PYX_ERR(6, 1591, __pyx_L3_error) }
                          }
                        } else {
                          switch (__pyx_nargs) {
                            case  2:
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(6, 1591, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 1591, __pyx_L3_error)
                            break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_False));
                        }
                        __pyx_v_new_size = __Pyx_PyLong_As_int64_t(values[0]); if (unlikely((__pyx_v_new_size == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(6, 1591, __pyx_L3_error)
                        __pyx_v_shrink_to_fit = values[1];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("resize", 0, 1, 2, __pyx_nargs); __PYX_ERR(6, 1591, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.ResizableBuffer.resize", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_15ResizableBuffer_resize(((struct __pyx_obj_7pyarrow_3lib_ResizableBuffer *)__pyx_v_self), __pyx_v_new_size, __pyx_v_shrink_to_fit);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_15ResizableBuffer_resize(struct __pyx_obj_7pyarrow_3lib_ResizableBuffer *__pyx_v_self, int64_t __pyx_v_new_size, PyObject *__pyx_v_shrink_to_fit) {
                      bool __pyx_v_c_shrink_to_fit;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      bool __pyx_t_1;
                      int __pyx_t_2;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("resize", 0);

                      /* "pyarrow/io.pxi":1604
 *             If this is false, the buffer is never shrunk.
 *         """
 *         cdef c_bool c_shrink_to_fit = shrink_to_fit             # <<<<<<<<<<<<<<
 *         with nogil:
 *             check_status((<CResizableBuffer*> self.buffer.get())
*/
                      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_shrink_to_fit); if (unlikely((__pyx_t_1 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(6, 1604, __pyx_L1_error)
                      __pyx_v_c_shrink_to_fit = __pyx_t_1;

                      /* "pyarrow/io.pxi":1605
 *         """
 *         cdef c_bool c_shrink_to_fit = shrink_to_fit
 *         with nogil:             # <<<<<<<<<<<<<<
 *             check_status((<CResizableBuffer*> self.buffer.get())
 *                          .Resize(new_size, c_shrink_to_fit))
*/
                      {
                          PyThreadState * _save;
                          _save = PyEval_SaveThread();
                          __Pyx_FastGIL_Remember();
                          /*try:*/ {

                            /* "pyarrow/io.pxi":1606
 *         cdef c_bool c_shrink_to_fit = shrink_to_fit
 *         with nogil:
 *             check_status((<CResizableBuffer*> self.buffer.get())             # <<<<<<<<<<<<<<
 *                          .Resize(new_size, c_shrink_to_fit))
 * 
*/
                            if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                              PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "buffer");
                              __Pyx_PyGILState_Release(__pyx_gilstate_save);
                              __PYX_ERR(6, 1606, __pyx_L4_error)
                            }

                            /* "pyarrow/io.pxi":1607
 *         with nogil:
 *             check_status((<CResizableBuffer*> self.buffer.get())
 *                          .Resize(new_size, c_shrink_to_fit))             # <<<<<<<<<<<<<<
 * 
 * 
*/
                            __pyx_t_2 = __pyx_f_7pyarrow_3lib_check_status((( arrow::ResizableBuffer *)__pyx_v_self->__pyx_base.buffer.get())->Resize(__pyx_v_new_size, __pyx_v_c_shrink_to_fit)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(6, 1606, __pyx_L4_error)
                          }

                          /* "pyarrow/io.pxi":1605
 *         """
 *         cdef c_bool c_shrink_to_fit = shrink_to_fit
 *         with nogil:             # <<<<<<<<<<<<<<
 *             check_status((<CResizableBuffer*> self.buffer.get())
 *                          .Resize(new_size, c_shrink_to_fit))
*/
                          /*finally:*/ {
                            /*normal exit:*/{
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L5;
                            }
                            __pyx_L4_error: {
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L1_error;
                            }
                            __pyx_L5:;
                          }
                      }

                      /* "pyarrow/io.pxi":1591
 *         self.init(<shared_ptr[CBuffer]> buffer)
 * 
 *     def resize(self, int64_t new_size, shrink_to_fit=False):             # <<<<<<<<<<<<<<
 *         """
 *         Resize buffer to indicated size.
*/

                      /* function exit code */
                      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib.ResizableBuffer.resize", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":1610
 * 
 * 
 * cdef shared_ptr[CResizableBuffer] _allocate_buffer(CMemoryPool* pool) except *:             # <<<<<<<<<<<<<<
 *     with nogil:
 *         return to_shared(GetResultValue(AllocateResizableBuffer(0, pool)))
*/

                    static std::shared_ptr< arrow::ResizableBuffer>  __pyx_f_7pyarrow_3lib__allocate_buffer( arrow::MemoryPool *__pyx_v_pool) {
                      std::shared_ptr< arrow::ResizableBuffer>  __pyx_r;
                      std::unique_ptr< arrow::ResizableBuffer>  __pyx_t_1;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;

                      /* "pyarrow/io.pxi":1611
 * 
 * cdef shared_ptr[CResizableBuffer] _allocate_buffer(CMemoryPool* pool) except *:
 *     with nogil:             # <<<<<<<<<<<<<<
 *         return to_shared(GetResultValue(AllocateResizableBuffer(0, pool)))
 * 
*/
                      {
                          PyThreadState * _save;
                          _save = PyEval_SaveThread();
                          __Pyx_FastGIL_Remember();
                          /*try:*/ {

                            /* "pyarrow/io.pxi":1612
 * cdef shared_ptr[CResizableBuffer] _allocate_buffer(CMemoryPool* pool) except *:
 *     with nogil:
 *         return to_shared(GetResultValue(AllocateResizableBuffer(0, pool)))             # <<<<<<<<<<<<<<
 * 
 * 
*/
                            __pyx_t_1 = arrow::py::GetResultValue<std::unique_ptr< arrow::ResizableBuffer> >(arrow::AllocateResizableBuffer(0, __pyx_v_pool)); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(6, 1612, __pyx_L4_error)
                            __pyx_r =  arrow::py::to_shared< arrow::ResizableBuffer>(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_1));
                            goto __pyx_L3_return;
                          }

                          /* "pyarrow/io.pxi":1611
 * 
 * cdef shared_ptr[CResizableBuffer] _allocate_buffer(CMemoryPool* pool) except *:
 *     with nogil:             # <<<<<<<<<<<<<<
 *         return to_shared(GetResultValue(AllocateResizableBuffer(0, pool)))
 * 
*/
                          /*finally:*/ {
                            __pyx_L3_return: {
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L0;
                            }
                            __pyx_L4_error: {
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L1_error;
                            }
                          }
                      }

                      /* "pyarrow/io.pxi":1610
 * 
 * 
 * cdef shared_ptr[CResizableBuffer] _allocate_buffer(CMemoryPool* pool) except *:             # <<<<<<<<<<<<<<
 *     with nogil:
 *         return to_shared(GetResultValue(AllocateResizableBuffer(0, pool)))
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib._allocate_buffer", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_pretend_to_initialize(&__pyx_r);
                      __pyx_L0:;
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":1615
 * 
 * 
 * def allocate_buffer(int64_t size, MemoryPool memory_pool=None,             # <<<<<<<<<<<<<<
 *                     resizable=False):
 *     """
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_245allocate_buffer(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_244allocate_buffer, "allocate_buffer(int64_t size, MemoryPool memory_pool=None, resizable=False)\n\nAllocate a mutable buffer.\n\nParameters\n----------\nsize : int\n    Number of bytes to allocate (plus internal padding)\nmemory_pool : MemoryPool, optional\n    The pool to allocate memory from.\n    If not given, the default memory pool is used.\nresizable : bool, default False\n    If true, the returned buffer is resizable.\n\nReturns\n-------\nbuffer : Buffer or ResizableBuffer");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_245allocate_buffer = {"allocate_buffer", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_245allocate_buffer, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_244allocate_buffer};
                    static PyObject *__pyx_pw_7pyarrow_3lib_245allocate_buffer(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      int64_t __pyx_v_size;
                      struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_memory_pool = 0;
                      PyObject *__pyx_v_resizable = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[3] = {0,0,0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("allocate_buffer (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_size,&__pyx_mstate_global->__pyx_n_u_memory_pool,&__pyx_mstate_global->__pyx_n_u_resizable,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(6, 1615, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  3:
                            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(6, 1615, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  2:
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(6, 1615, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 1615, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "allocate_buffer", 0) < (0)) __PYX_ERR(6, 1615, __pyx_L3_error)
                          if (!values[1]) values[1] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)Py_None));

                          /* "pyarrow/io.pxi":1616
 * 
 * def allocate_buffer(int64_t size, MemoryPool memory_pool=None,
 *                     resizable=False):             # <<<<<<<<<<<<<<
 *     """
 *     Allocate a mutable buffer.
*/
                          if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False)));
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("allocate_buffer", 0, 1, 3, i); __PYX_ERR(6, 1615, __pyx_L3_error) }
                          }
                        } else {
                          switch (__pyx_nargs) {
                            case  3:
                            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(6, 1615, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  2:
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(6, 1615, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 1615, __pyx_L3_error)
                            break;
                            default: goto __pyx_L5_argtuple_error;
                          }

                          /* "pyarrow/io.pxi":1615
 * 
 * 
 * def allocate_buffer(int64_t size, MemoryPool memory_pool=None,             # <<<<<<<<<<<<<<
 *                     resizable=False):
 *     """
*/
                          if (!values[1]) values[1] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)Py_None));
                          if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False)));
                        }
                        __pyx_v_size = __Pyx_PyLong_As_int64_t(values[0]); if (unlikely((__pyx_v_size == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(6, 1615, __pyx_L3_error)
                        __pyx_v_memory_pool = ((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)values[1]);
                        __pyx_v_resizable = values[2];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("allocate_buffer", 0, 1, 3, __pyx_nargs); __PYX_ERR(6, 1615, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.allocate_buffer", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_memory_pool), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_MemoryPool, 1, "memory_pool", 0))) __PYX_ERR(6, 1615, __pyx_L1_error)
                      __pyx_r = __pyx_pf_7pyarrow_3lib_244allocate_buffer(__pyx_self, __pyx_v_size, __pyx_v_memory_pool, __pyx_v_resizable);

                      /* function exit code */
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __pyx_r = NULL;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      goto __pyx_L7_cleaned_up;
                      __pyx_L0:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __pyx_L7_cleaned_up:;
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_244allocate_buffer(CYTHON_UNUSED PyObject *__pyx_self, int64_t __pyx_v_size, struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_memory_pool, PyObject *__pyx_v_resizable) {
                       arrow::MemoryPool *__pyx_v_cpool;
                      std::shared_ptr< arrow::ResizableBuffer>  __pyx_v_c_rz_buffer;
                      std::shared_ptr< arrow::Buffer>  __pyx_v_c_buffer;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                       arrow::MemoryPool *__pyx_t_1;
                      int __pyx_t_2;
                      std::unique_ptr< arrow::ResizableBuffer>  __pyx_t_3;
                      PyObject *__pyx_t_4 = NULL;
                      std::unique_ptr< arrow::Buffer>  __pyx_t_5;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("allocate_buffer", 0);

                      /* "pyarrow/io.pxi":1635
 *     """
 *     cdef:
 *         CMemoryPool* cpool = maybe_unbox_memory_pool(memory_pool)             # <<<<<<<<<<<<<<
 *         shared_ptr[CResizableBuffer] c_rz_buffer
 *         shared_ptr[CBuffer] c_buffer
*/
                      __pyx_t_1 = __pyx_f_7pyarrow_3lib_maybe_unbox_memory_pool(__pyx_v_memory_pool); if (unlikely(__pyx_t_1 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(6, 1635, __pyx_L1_error)
                      __pyx_v_cpool = __pyx_t_1;

                      /* "pyarrow/io.pxi":1639
 *         shared_ptr[CBuffer] c_buffer
 * 
 *     if resizable:             # <<<<<<<<<<<<<<
 *         with nogil:
 *             c_rz_buffer = to_shared(GetResultValue(
*/
                      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_resizable); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(6, 1639, __pyx_L1_error)
                      if (__pyx_t_2) {

                        /* "pyarrow/io.pxi":1640
 * 
 *     if resizable:
 *         with nogil:             # <<<<<<<<<<<<<<
 *             c_rz_buffer = to_shared(GetResultValue(
 *                 AllocateResizableBuffer(size, cpool)))
*/
                        {
                            PyThreadState * _save;
                            _save = PyEval_SaveThread();
                            __Pyx_FastGIL_Remember();
                            /*try:*/ {

                              /* "pyarrow/io.pxi":1641
 *     if resizable:
 *         with nogil:
 *             c_rz_buffer = to_shared(GetResultValue(             # <<<<<<<<<<<<<<
 *                 AllocateResizableBuffer(size, cpool)))
 *         return pyarrow_wrap_resizable_buffer(c_rz_buffer)
*/
                              __pyx_t_3 = arrow::py::GetResultValue<std::unique_ptr< arrow::ResizableBuffer> >(arrow::AllocateResizableBuffer(__pyx_v_size, __pyx_v_cpool)); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(6, 1641, __pyx_L5_error)
                              __pyx_v_c_rz_buffer =  arrow::py::to_shared< arrow::ResizableBuffer>(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_3));
                            }

                            /* "pyarrow/io.pxi":1640
 * 
 *     if resizable:
 *         with nogil:             # <<<<<<<<<<<<<<
 *             c_rz_buffer = to_shared(GetResultValue(
 *                 AllocateResizableBuffer(size, cpool)))
*/
                            /*finally:*/ {
                              /*normal exit:*/{
                                __Pyx_FastGIL_Forget();
                                PyEval_RestoreThread(_save);
                                goto __pyx_L6;
                              }
                              __pyx_L5_error: {
                                __Pyx_FastGIL_Forget();
                                PyEval_RestoreThread(_save);
                                goto __pyx_L1_error;
                              }
                              __pyx_L6:;
                            }
                        }

                        /* "pyarrow/io.pxi":1643
 *             c_rz_buffer = to_shared(GetResultValue(
 *                 AllocateResizableBuffer(size, cpool)))
 *         return pyarrow_wrap_resizable_buffer(c_rz_buffer)             # <<<<<<<<<<<<<<
 *     else:
 *         with nogil:
*/
                        __Pyx_XDECREF(__pyx_r);
                        __pyx_t_4 = pyarrow_wrap_resizable_buffer(__pyx_v_c_rz_buffer); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 1643, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_4);
                        __pyx_r = __pyx_t_4;
                        __pyx_t_4 = 0;
                        goto __pyx_L0;

                        /* "pyarrow/io.pxi":1639
 *         shared_ptr[CBuffer] c_buffer
 * 
 *     if resizable:             # <<<<<<<<<<<<<<
 *         with nogil:
 *             c_rz_buffer = to_shared(GetResultValue(
*/
                      }

                      /* "pyarrow/io.pxi":1645
 *         return pyarrow_wrap_resizable_buffer(c_rz_buffer)
 *     else:
 *         with nogil:             # <<<<<<<<<<<<<<
 *             c_buffer = to_shared(GetResultValue(AllocateBuffer(size, cpool)))
 *         return pyarrow_wrap_buffer(c_buffer)
*/
                      /*else*/ {
                        {
                            PyThreadState * _save;
                            _save = PyEval_SaveThread();
                            __Pyx_FastGIL_Remember();
                            /*try:*/ {

                              /* "pyarrow/io.pxi":1646
 *     else:
 *         with nogil:
 *             c_buffer = to_shared(GetResultValue(AllocateBuffer(size, cpool)))             # <<<<<<<<<<<<<<
 *         return pyarrow_wrap_buffer(c_buffer)
 * 
*/
                              __pyx_t_5 = arrow::py::GetResultValue<std::unique_ptr< arrow::Buffer> >(arrow::AllocateBuffer(__pyx_v_size, __pyx_v_cpool)); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(6, 1646, __pyx_L8_error)
                              __pyx_v_c_buffer =  arrow::py::to_shared< arrow::Buffer>(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_5));
                            }

                            /* "pyarrow/io.pxi":1645
 *         return pyarrow_wrap_resizable_buffer(c_rz_buffer)
 *     else:
 *         with nogil:             # <<<<<<<<<<<<<<
 *             c_buffer = to_shared(GetResultValue(AllocateBuffer(size, cpool)))
 *         return pyarrow_wrap_buffer(c_buffer)
*/
                            /*finally:*/ {
                              /*normal exit:*/{
                                __Pyx_FastGIL_Forget();
                                PyEval_RestoreThread(_save);
                                goto __pyx_L9;
                              }
                              __pyx_L8_error: {
                                __Pyx_FastGIL_Forget();
                                PyEval_RestoreThread(_save);
                                goto __pyx_L1_error;
                              }
                              __pyx_L9:;
                            }
                        }

                        /* "pyarrow/io.pxi":1647
 *         with nogil:
 *             c_buffer = to_shared(GetResultValue(AllocateBuffer(size, cpool)))
 *         return pyarrow_wrap_buffer(c_buffer)             # <<<<<<<<<<<<<<
 * 
 * 
*/
                        __Pyx_XDECREF(__pyx_r);
                        __pyx_t_4 = pyarrow_wrap_buffer(__pyx_v_c_buffer); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 1647, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_4);
                        __pyx_r = __pyx_t_4;
                        __pyx_t_4 = 0;
                        goto __pyx_L0;
                      }

                      /* "pyarrow/io.pxi":1615
 * 
 * 
 * def allocate_buffer(int64_t size, MemoryPool memory_pool=None,             # <<<<<<<<<<<<<<
 *                     resizable=False):
 *     """
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_4);
                      __Pyx_AddTraceback("pyarrow.lib.allocate_buffer", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":1676
 *         shared_ptr[CResizableBuffer] buffer
 * 
 *     def __cinit__(self, MemoryPool memory_pool=None):             # <<<<<<<<<<<<<<
 *         self.buffer = _allocate_buffer(maybe_unbox_memory_pool(memory_pool))
 *         self.output_stream.reset(new CBufferOutputStream(
*/

                    /* Python wrapper */
                    static int __pyx_pw_7pyarrow_3lib_18BufferOutputStream_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
                    static int __pyx_pw_7pyarrow_3lib_18BufferOutputStream_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
                      struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_memory_pool = 0;
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[1] = {0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      int __pyx_r;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_memory_pool,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(6, 1676, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  1:
                            values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 1676, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__cinit__", 0) < (0)) __PYX_ERR(6, 1676, __pyx_L3_error)
                          if (!values[0]) values[0] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)Py_None));
                        } else {
                          switch (__pyx_nargs) {
                            case  1:
                            values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 1676, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          if (!values[0]) values[0] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)Py_None));
                        }
                        __pyx_v_memory_pool = ((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)values[0]);
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 1, __pyx_nargs); __PYX_ERR(6, 1676, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.BufferOutputStream.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return -1;
                      __pyx_L4_argument_unpacking_done:;
                      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_memory_pool), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_MemoryPool, 1, "memory_pool", 0))) __PYX_ERR(6, 1676, __pyx_L1_error)
                      __pyx_r = __pyx_pf_7pyarrow_3lib_18BufferOutputStream___cinit__(((struct __pyx_obj_7pyarrow_3lib_BufferOutputStream *)__pyx_v_self), __pyx_v_memory_pool);

                      /* function exit code */
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __pyx_r = -1;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      goto __pyx_L7_cleaned_up;
                      __pyx_L0:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __pyx_L7_cleaned_up:;
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static int __pyx_pf_7pyarrow_3lib_18BufferOutputStream___cinit__(struct __pyx_obj_7pyarrow_3lib_BufferOutputStream *__pyx_v_self, struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_memory_pool) {
                      int __pyx_r;
                       arrow::MemoryPool *__pyx_t_1;
                      std::shared_ptr< arrow::ResizableBuffer>  __pyx_t_2;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;

                      /* "pyarrow/io.pxi":1677
 * 
 *     def __cinit__(self, MemoryPool memory_pool=None):
 *         self.buffer = _allocate_buffer(maybe_unbox_memory_pool(memory_pool))             # <<<<<<<<<<<<<<
 *         self.output_stream.reset(new CBufferOutputStream(
 *             <shared_ptr[CResizableBuffer]> self.buffer))
*/
                      __pyx_t_1 = __pyx_f_7pyarrow_3lib_maybe_unbox_memory_pool(__pyx_v_memory_pool); if (unlikely(__pyx_t_1 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(6, 1677, __pyx_L1_error)
                      __pyx_t_2 = __pyx_f_7pyarrow_3lib__allocate_buffer(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 1677, __pyx_L1_error)
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "buffer");
                        __PYX_ERR(6, 1677, __pyx_L1_error)
                      }
                      __pyx_v_self->buffer = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_2);

                      /* "pyarrow/io.pxi":1678
 *     def __cinit__(self, MemoryPool memory_pool=None):
 *         self.buffer = _allocate_buffer(maybe_unbox_memory_pool(memory_pool))
 *         self.output_stream.reset(new CBufferOutputStream(             # <<<<<<<<<<<<<<
 *             <shared_ptr[CResizableBuffer]> self.buffer))
 *         self.is_writable = True
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "output_stream");
                        __PYX_ERR(6, 1678, __pyx_L1_error)
                      }

                      /* "pyarrow/io.pxi":1679
 *         self.buffer = _allocate_buffer(maybe_unbox_memory_pool(memory_pool))
 *         self.output_stream.reset(new CBufferOutputStream(
 *             <shared_ptr[CResizableBuffer]> self.buffer))             # <<<<<<<<<<<<<<
 *         self.is_writable = True
 * 
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "buffer");
                        __PYX_ERR(6, 1679, __pyx_L1_error)
                      }

                      /* "pyarrow/io.pxi":1678
 *     def __cinit__(self, MemoryPool memory_pool=None):
 *         self.buffer = _allocate_buffer(maybe_unbox_memory_pool(memory_pool))
 *         self.output_stream.reset(new CBufferOutputStream(             # <<<<<<<<<<<<<<
 *             <shared_ptr[CResizableBuffer]> self.buffer))
 *         self.is_writable = True
*/
                      __pyx_v_self->__pyx_base.output_stream.reset(new  arrow::io::BufferOutputStream(((std::shared_ptr< arrow::ResizableBuffer> )__pyx_v_self->buffer)));

                      /* "pyarrow/io.pxi":1680
 *         self.output_stream.reset(new CBufferOutputStream(
 *             <shared_ptr[CResizableBuffer]> self.buffer))
 *         self.is_writable = True             # <<<<<<<<<<<<<<
 * 
 *     def getvalue(self):
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "is_writable");
                        __PYX_ERR(6, 1680, __pyx_L1_error)
                      }
                      __pyx_v_self->__pyx_base.is_writable = 1;

                      /* "pyarrow/io.pxi":1676
 *         shared_ptr[CResizableBuffer] buffer
 * 
 *     def __cinit__(self, MemoryPool memory_pool=None):             # <<<<<<<<<<<<<<
 *         self.buffer = _allocate_buffer(maybe_unbox_memory_pool(memory_pool))
 *         self.output_stream.reset(new CBufferOutputStream(
*/

                      /* function exit code */
                      __pyx_r = 0;
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib.BufferOutputStream.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = -1;
                      __pyx_L0:;
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":1682
 *         self.is_writable = True
 * 
 *     def getvalue(self):             # <<<<<<<<<<<<<<
 *         """
 *         Finalize output stream and return result as pyarrow.Buffer.
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_18BufferOutputStream_3getvalue(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_18BufferOutputStream_2getvalue, "BufferOutputStream.getvalue(self)\n\nFinalize output stream and return result as pyarrow.Buffer.\n\nReturns\n-------\nvalue : Buffer");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_18BufferOutputStream_3getvalue = {"getvalue", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_18BufferOutputStream_3getvalue, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_18BufferOutputStream_2getvalue};
                    static PyObject *__pyx_pw_7pyarrow_3lib_18BufferOutputStream_3getvalue(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("getvalue (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("getvalue", 1, 0, 0, __pyx_nargs); return NULL; }
                      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                      if (unlikely(__pyx_kwds_len < 0)) return NULL;
                      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("getvalue", __pyx_kwds); return NULL;}
                      __pyx_r = __pyx_pf_7pyarrow_3lib_18BufferOutputStream_2getvalue(((struct __pyx_obj_7pyarrow_3lib_BufferOutputStream *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_18BufferOutputStream_2getvalue(struct __pyx_obj_7pyarrow_3lib_BufferOutputStream *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_t_1;
                      PyObject *__pyx_t_2 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("getvalue", 0);

                      /* "pyarrow/io.pxi":1690
 *         value : Buffer
 *         """
 *         with nogil:             # <<<<<<<<<<<<<<
 *             check_status(self.output_stream.get().Close())
 *         return pyarrow_wrap_buffer(<shared_ptr[CBuffer]> self.buffer)
*/
                      {
                          PyThreadState * _save;
                          _save = PyEval_SaveThread();
                          __Pyx_FastGIL_Remember();
                          /*try:*/ {

                            /* "pyarrow/io.pxi":1691
 *         """
 *         with nogil:
 *             check_status(self.output_stream.get().Close())             # <<<<<<<<<<<<<<
 *         return pyarrow_wrap_buffer(<shared_ptr[CBuffer]> self.buffer)
 * 
*/
                            if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                              PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "output_stream");
                              __Pyx_PyGILState_Release(__pyx_gilstate_save);
                              __PYX_ERR(6, 1691, __pyx_L4_error)
                            }
                            __pyx_t_1 = __pyx_f_7pyarrow_3lib_check_status(__pyx_v_self->__pyx_base.output_stream.get()->Close()); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(6, 1691, __pyx_L4_error)
                          }

                          /* "pyarrow/io.pxi":1690
 *         value : Buffer
 *         """
 *         with nogil:             # <<<<<<<<<<<<<<
 *             check_status(self.output_stream.get().Close())
 *         return pyarrow_wrap_buffer(<shared_ptr[CBuffer]> self.buffer)
*/
                          /*finally:*/ {
                            /*normal exit:*/{
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L5;
                            }
                            __pyx_L4_error: {
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L1_error;
                            }
                            __pyx_L5:;
                          }
                      }

                      /* "pyarrow/io.pxi":1692
 *         with nogil:
 *             check_status(self.output_stream.get().Close())
 *         return pyarrow_wrap_buffer(<shared_ptr[CBuffer]> self.buffer)             # <<<<<<<<<<<<<<
 * 
 * 
*/
                      __Pyx_XDECREF(__pyx_r);
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "buffer");
                        __PYX_ERR(6, 1692, __pyx_L1_error)
                      }
                      __pyx_t_2 = pyarrow_wrap_buffer(((std::shared_ptr< arrow::Buffer> )__pyx_v_self->buffer)); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 1692, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_2);
                      __pyx_r = __pyx_t_2;
                      __pyx_t_2 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/io.pxi":1682
 *         self.is_writable = True
 * 
 *     def getvalue(self):             # <<<<<<<<<<<<<<
 *         """
 *         Finalize output stream and return result as pyarrow.Buffer.
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_AddTraceback("pyarrow.lib.BufferOutputStream.getvalue", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_18BufferOutputStream_5__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_18BufferOutputStream_4__reduce_cython__, "BufferOutputStream.__reduce_cython__(self)");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_18BufferOutputStream_5__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_18BufferOutputStream_5__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_18BufferOutputStream_4__reduce_cython__};
                    static PyObject *__pyx_pw_7pyarrow_3lib_18BufferOutputStream_5__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; }
                      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                      if (unlikely(__pyx_kwds_len < 0)) return NULL;
                      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;}
                      __pyx_r = __pyx_pf_7pyarrow_3lib_18BufferOutputStream_4__reduce_cython__(((struct __pyx_obj_7pyarrow_3lib_BufferOutputStream *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_18BufferOutputStream_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_BufferOutputStream *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__reduce_cython__", 0);

                      /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/
                      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0);
                      __PYX_ERR(7, 2, __pyx_L1_error)

                      /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib.BufferOutputStream.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_18BufferOutputStream_7__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_18BufferOutputStream_6__setstate_cython__, "BufferOutputStream.__setstate_cython__(self, __pyx_state)");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_18BufferOutputStream_7__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_18BufferOutputStream_7__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_18BufferOutputStream_6__setstate_cython__};
                    static PyObject *__pyx_pw_7pyarrow_3lib_18BufferOutputStream_7__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[1] = {0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(7, 3, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(7, 3, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(7, 3, __pyx_L3_error)
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(7, 3, __pyx_L3_error) }
                          }
                        } else if (unlikely(__pyx_nargs != 1)) {
                          goto __pyx_L5_argtuple_error;
                        } else {
                          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(7, 3, __pyx_L3_error)
                        }
                        __pyx_v___pyx_state = values[0];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(7, 3, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.BufferOutputStream.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_18BufferOutputStream_6__setstate_cython__(((struct __pyx_obj_7pyarrow_3lib_BufferOutputStream *)__pyx_v_self), __pyx_v___pyx_state);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_18BufferOutputStream_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_BufferOutputStream *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__setstate_cython__", 0);

                      /* "(tree fragment)":4
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
*/
                      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0);
                      __PYX_ERR(7, 4, __pyx_L1_error)

                      /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib.BufferOutputStream.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":1697
 * cdef class MockOutputStream(NativeFile):
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self.output_stream.reset(new CMockOutputStream())
 *         self.is_writable = True
*/

                    /* Python wrapper */
                    static int __pyx_pw_7pyarrow_3lib_16MockOutputStream_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
                    static int __pyx_pw_7pyarrow_3lib_16MockOutputStream_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      int __pyx_r;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, __pyx_nargs); return -1; }
                      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
                      if (unlikely(__pyx_kwds_len < 0)) return -1;
                      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__cinit__", __pyx_kwds); return -1;}
                      __pyx_r = __pyx_pf_7pyarrow_3lib_16MockOutputStream___cinit__(((struct __pyx_obj_7pyarrow_3lib_MockOutputStream *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static int __pyx_pf_7pyarrow_3lib_16MockOutputStream___cinit__(struct __pyx_obj_7pyarrow_3lib_MockOutputStream *__pyx_v_self) {
                      int __pyx_r;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;

                      /* "pyarrow/io.pxi":1698
 * 
 *     def __cinit__(self):
 *         self.output_stream.reset(new CMockOutputStream())             # <<<<<<<<<<<<<<
 *         self.is_writable = True
 * 
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "output_stream");
                        __PYX_ERR(6, 1698, __pyx_L1_error)
                      }
                      __pyx_v_self->__pyx_base.output_stream.reset(new  arrow::io::MockOutputStream());

                      /* "pyarrow/io.pxi":1699
 *     def __cinit__(self):
 *         self.output_stream.reset(new CMockOutputStream())
 *         self.is_writable = True             # <<<<<<<<<<<<<<
 * 
 *     def size(self):
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "is_writable");
                        __PYX_ERR(6, 1699, __pyx_L1_error)
                      }
                      __pyx_v_self->__pyx_base.is_writable = 1;

                      /* "pyarrow/io.pxi":1697
 * cdef class MockOutputStream(NativeFile):
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self.output_stream.reset(new CMockOutputStream())
 *         self.is_writable = True
*/

                      /* function exit code */
                      __pyx_r = 0;
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib.MockOutputStream.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = -1;
                      __pyx_L0:;
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":1701
 *         self.is_writable = True
 * 
 *     def size(self):             # <<<<<<<<<<<<<<
 *         handle = <CMockOutputStream*> self.output_stream.get()
 *         return handle.GetExtentBytesWritten()
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_16MockOutputStream_3size(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_16MockOutputStream_2size, "MockOutputStream.size(self)");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_16MockOutputStream_3size = {"size", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_16MockOutputStream_3size, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_16MockOutputStream_2size};
                    static PyObject *__pyx_pw_7pyarrow_3lib_16MockOutputStream_3size(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("size (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("size", 1, 0, 0, __pyx_nargs); return NULL; }
                      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                      if (unlikely(__pyx_kwds_len < 0)) return NULL;
                      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("size", __pyx_kwds); return NULL;}
                      __pyx_r = __pyx_pf_7pyarrow_3lib_16MockOutputStream_2size(((struct __pyx_obj_7pyarrow_3lib_MockOutputStream *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_16MockOutputStream_2size(struct __pyx_obj_7pyarrow_3lib_MockOutputStream *__pyx_v_self) {
                       arrow::io::MockOutputStream *__pyx_v_handle;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("size", 0);

                      /* "pyarrow/io.pxi":1702
 * 
 *     def size(self):
 *         handle = <CMockOutputStream*> self.output_stream.get()             # <<<<<<<<<<<<<<
 *         return handle.GetExtentBytesWritten()
 * 
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "output_stream");
                        __PYX_ERR(6, 1702, __pyx_L1_error)
                      }
                      __pyx_v_handle = (( arrow::io::MockOutputStream *)__pyx_v_self->__pyx_base.output_stream.get());

                      /* "pyarrow/io.pxi":1703
 *     def size(self):
 *         handle = <CMockOutputStream*> self.output_stream.get()
 *         return handle.GetExtentBytesWritten()             # <<<<<<<<<<<<<<
 * 
 * 
*/
                      __Pyx_XDECREF(__pyx_r);
                      __pyx_t_1 = __Pyx_PyLong_From_int64_t(__pyx_v_handle->GetExtentBytesWritten()); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 1703, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_r = __pyx_t_1;
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/io.pxi":1701
 *         self.is_writable = True
 * 
 *     def size(self):             # <<<<<<<<<<<<<<
 *         handle = <CMockOutputStream*> self.output_stream.get()
 *         return handle.GetExtentBytesWritten()
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_AddTraceback("pyarrow.lib.MockOutputStream.size", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_16MockOutputStream_5__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_16MockOutputStream_4__reduce_cython__, "MockOutputStream.__reduce_cython__(self)");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_16MockOutputStream_5__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_16MockOutputStream_5__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_16MockOutputStream_4__reduce_cython__};
                    static PyObject *__pyx_pw_7pyarrow_3lib_16MockOutputStream_5__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; }
                      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                      if (unlikely(__pyx_kwds_len < 0)) return NULL;
                      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;}
                      __pyx_r = __pyx_pf_7pyarrow_3lib_16MockOutputStream_4__reduce_cython__(((struct __pyx_obj_7pyarrow_3lib_MockOutputStream *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_16MockOutputStream_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_MockOutputStream *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__reduce_cython__", 0);

                      /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/
                      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0);
                      __PYX_ERR(7, 2, __pyx_L1_error)

                      /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib.MockOutputStream.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_16MockOutputStream_7__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_16MockOutputStream_6__setstate_cython__, "MockOutputStream.__setstate_cython__(self, __pyx_state)");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_16MockOutputStream_7__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_16MockOutputStream_7__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_16MockOutputStream_6__setstate_cython__};
                    static PyObject *__pyx_pw_7pyarrow_3lib_16MockOutputStream_7__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[1] = {0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(7, 3, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(7, 3, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(7, 3, __pyx_L3_error)
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(7, 3, __pyx_L3_error) }
                          }
                        } else if (unlikely(__pyx_nargs != 1)) {
                          goto __pyx_L5_argtuple_error;
                        } else {
                          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(7, 3, __pyx_L3_error)
                        }
                        __pyx_v___pyx_state = values[0];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(7, 3, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.MockOutputStream.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_16MockOutputStream_6__setstate_cython__(((struct __pyx_obj_7pyarrow_3lib_MockOutputStream *)__pyx_v_self), __pyx_v___pyx_state);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_16MockOutputStream_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_MockOutputStream *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__setstate_cython__", 0);

                      /* "(tree fragment)":4
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
*/
                      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0);
                      __PYX_ERR(7, 4, __pyx_L1_error)

                      /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib.MockOutputStream.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":1736
 * 
 *     # XXX Needed to make numpydoc happy
 *     def __init__(self, obj):             # <<<<<<<<<<<<<<
 *         pass
 * 
*/

                    /* Python wrapper */
                    static int __pyx_pw_7pyarrow_3lib_12BufferReader_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
                    static int __pyx_pw_7pyarrow_3lib_12BufferReader_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
                      CYTHON_UNUSED PyObject *__pyx_v_obj = 0;
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[1] = {0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      int __pyx_r;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_obj,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(6, 1736, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  1:
                            values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 1736, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(6, 1736, __pyx_L3_error)
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, i); __PYX_ERR(6, 1736, __pyx_L3_error) }
                          }
                        } else if (unlikely(__pyx_nargs != 1)) {
                          goto __pyx_L5_argtuple_error;
                        } else {
                          values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 1736, __pyx_L3_error)
                        }
                        __pyx_v_obj = values[0];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, __pyx_nargs); __PYX_ERR(6, 1736, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.BufferReader.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return -1;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_12BufferReader___init__(((struct __pyx_obj_7pyarrow_3lib_BufferReader *)__pyx_v_self), __pyx_v_obj);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static int __pyx_pf_7pyarrow_3lib_12BufferReader___init__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_BufferReader *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_obj) {
                      int __pyx_r;

                      /* function exit code */
                      __pyx_r = 0;
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":1739
 *         pass
 * 
 *     def __cinit__(self, object obj):             # <<<<<<<<<<<<<<
 *         self.buffer = as_buffer(obj)
 *         self.set_random_access_file(shared_ptr[CRandomAccessFile](
*/

                    /* Python wrapper */
                    static int __pyx_pw_7pyarrow_3lib_12BufferReader_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
                    static int __pyx_pw_7pyarrow_3lib_12BufferReader_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
                      PyObject *__pyx_v_obj = 0;
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[1] = {0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      int __pyx_r;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_obj,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(6, 1739, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  1:
                            values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 1739, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__cinit__", 0) < (0)) __PYX_ERR(6, 1739, __pyx_L3_error)
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, i); __PYX_ERR(6, 1739, __pyx_L3_error) }
                          }
                        } else if (unlikely(__pyx_nargs != 1)) {
                          goto __pyx_L5_argtuple_error;
                        } else {
                          values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 1739, __pyx_L3_error)
                        }
                        __pyx_v_obj = values[0];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, __pyx_nargs); __PYX_ERR(6, 1739, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.BufferReader.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return -1;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_12BufferReader_2__cinit__(((struct __pyx_obj_7pyarrow_3lib_BufferReader *)__pyx_v_self), __pyx_v_obj);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static int __pyx_pf_7pyarrow_3lib_12BufferReader_2__cinit__(struct __pyx_obj_7pyarrow_3lib_BufferReader *__pyx_v_self, PyObject *__pyx_v_obj) {
                      int __pyx_r;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      PyObject *__pyx_t_3 = NULL;
                      size_t __pyx_t_4;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__cinit__", 0);

                      /* "pyarrow/io.pxi":1740
 * 
 *     def __cinit__(self, object obj):
 *         self.buffer = as_buffer(obj)             # <<<<<<<<<<<<<<
 *         self.set_random_access_file(shared_ptr[CRandomAccessFile](
 *             new CBufferReader(self.buffer.buffer)))
*/
                      __pyx_t_2 = NULL;
                      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_as_buffer); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 1740, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_3);
                      __pyx_t_4 = 1;
                      #if CYTHON_UNPACK_METHODS
                      if (unlikely(PyMethod_Check(__pyx_t_3))) {
                        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
                        assert(__pyx_t_2);
                        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
                        __Pyx_INCREF(__pyx_t_2);
                        __Pyx_INCREF(__pyx__function);
                        __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
                        __pyx_t_4 = 0;
                      }
                      #endif
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_obj};
                        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 1740, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Buffer))))) __PYX_ERR(6, 1740, __pyx_L1_error)
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "buffer");
                        __PYX_ERR(6, 1740, __pyx_L1_error)
                      }
                      __Pyx_GIVEREF(__pyx_t_1);
                      __Pyx_GOTREF((PyObject *)__pyx_v_self->buffer);
                      __Pyx_DECREF((PyObject *)__pyx_v_self->buffer);
                      __pyx_v_self->buffer = ((struct __pyx_obj_7pyarrow_3lib_Buffer *)__pyx_t_1);
                      __pyx_t_1 = 0;

                      /* "pyarrow/io.pxi":1741
 *     def __cinit__(self, object obj):
 *         self.buffer = as_buffer(obj)
 *         self.set_random_access_file(shared_ptr[CRandomAccessFile](             # <<<<<<<<<<<<<<
 *             new CBufferReader(self.buffer.buffer)))
 *         self.is_readable = True
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "set_random_access_file");
                        __PYX_ERR(6, 1741, __pyx_L1_error)
                      }

                      /* "pyarrow/io.pxi":1742
 *         self.buffer = as_buffer(obj)
 *         self.set_random_access_file(shared_ptr[CRandomAccessFile](
 *             new CBufferReader(self.buffer.buffer)))             # <<<<<<<<<<<<<<
 *         self.is_readable = True
 * 
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "buffer");
                        __PYX_ERR(6, 1742, __pyx_L1_error)
                      }
                      if (unlikely(((PyObject *)__pyx_v_self->buffer) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "buffer");
                        __PYX_ERR(6, 1742, __pyx_L1_error)
                      }

                      /* "pyarrow/io.pxi":1741
 *     def __cinit__(self, object obj):
 *         self.buffer = as_buffer(obj)
 *         self.set_random_access_file(shared_ptr[CRandomAccessFile](             # <<<<<<<<<<<<<<
 *             new CBufferReader(self.buffer.buffer)))
 *         self.is_readable = True
*/
                      __pyx_t_1 = ((struct __pyx_vtabstruct_7pyarrow_3lib_BufferReader *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.set_random_access_file(((struct __pyx_obj_7pyarrow_3lib_NativeFile *)__pyx_v_self), std::shared_ptr< arrow::io::RandomAccessFile> (new  arrow::io::BufferReader(__pyx_v_self->buffer->buffer))); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 1741, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

                      /* "pyarrow/io.pxi":1743
 *         self.set_random_access_file(shared_ptr[CRandomAccessFile](
 *             new CBufferReader(self.buffer.buffer)))
 *         self.is_readable = True             # <<<<<<<<<<<<<<
 * 
 * 
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "is_readable");
                        __PYX_ERR(6, 1743, __pyx_L1_error)
                      }
                      __pyx_v_self->__pyx_base.is_readable = 1;

                      /* "pyarrow/io.pxi":1739
 *         pass
 * 
 *     def __cinit__(self, object obj):             # <<<<<<<<<<<<<<
 *         self.buffer = as_buffer(obj)
 *         self.set_random_access_file(shared_ptr[CRandomAccessFile](
*/

                      /* function exit code */
                      __pyx_r = 0;
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_AddTraceback("pyarrow.lib.BufferReader.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = -1;
                      __pyx_L0:;
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_12BufferReader_5__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_12BufferReader_4__reduce_cython__, "BufferReader.__reduce_cython__(self)");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_12BufferReader_5__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12BufferReader_5__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12BufferReader_4__reduce_cython__};
                    static PyObject *__pyx_pw_7pyarrow_3lib_12BufferReader_5__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; }
                      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                      if (unlikely(__pyx_kwds_len < 0)) return NULL;
                      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;}
                      __pyx_r = __pyx_pf_7pyarrow_3lib_12BufferReader_4__reduce_cython__(((struct __pyx_obj_7pyarrow_3lib_BufferReader *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_12BufferReader_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_BufferReader *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__reduce_cython__", 0);

                      /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/
                      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0);
                      __PYX_ERR(7, 2, __pyx_L1_error)

                      /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib.BufferReader.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_12BufferReader_7__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_12BufferReader_6__setstate_cython__, "BufferReader.__setstate_cython__(self, __pyx_state)");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_12BufferReader_7__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12BufferReader_7__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12BufferReader_6__setstate_cython__};
                    static PyObject *__pyx_pw_7pyarrow_3lib_12BufferReader_7__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[1] = {0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(7, 3, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(7, 3, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(7, 3, __pyx_L3_error)
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(7, 3, __pyx_L3_error) }
                          }
                        } else if (unlikely(__pyx_nargs != 1)) {
                          goto __pyx_L5_argtuple_error;
                        } else {
                          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(7, 3, __pyx_L3_error)
                        }
                        __pyx_v___pyx_state = values[0];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(7, 3, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.BufferReader.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_12BufferReader_6__setstate_cython__(((struct __pyx_obj_7pyarrow_3lib_BufferReader *)__pyx_v_self), __pyx_v___pyx_state);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_12BufferReader_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_BufferReader *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__setstate_cython__", 0);

                      /* "(tree fragment)":4
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
*/
                      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0);
                      __PYX_ERR(7, 4, __pyx_L1_error)

                      /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib.BufferReader.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":1788
 *     """
 * 
 *     def __init__(self, object stream, str compression not None):             # <<<<<<<<<<<<<<
 *         cdef:
 *             NativeFile nf
*/

                    /* Python wrapper */
                    static int __pyx_pw_7pyarrow_3lib_21CompressedInputStream_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
                    static int __pyx_pw_7pyarrow_3lib_21CompressedInputStream_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
                      PyObject *__pyx_v_stream = 0;
                      PyObject *__pyx_v_compression = 0;
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[2] = {0,0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      int __pyx_r;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_stream,&__pyx_mstate_global->__pyx_n_u_compression,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(6, 1788, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  2:
                            values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(6, 1788, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 1788, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(6, 1788, __pyx_L3_error)
                          for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, i); __PYX_ERR(6, 1788, __pyx_L3_error) }
                          }
                        } else if (unlikely(__pyx_nargs != 2)) {
                          goto __pyx_L5_argtuple_error;
                        } else {
                          values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 1788, __pyx_L3_error)
                          values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(6, 1788, __pyx_L3_error)
                        }
                        __pyx_v_stream = values[0];
                        __pyx_v_compression = ((PyObject*)values[1]);
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, __pyx_nargs); __PYX_ERR(6, 1788, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.CompressedInputStream.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return -1;
                      __pyx_L4_argument_unpacking_done:;
                      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_compression), (&PyUnicode_Type), 0, "compression", 1))) __PYX_ERR(6, 1788, __pyx_L1_error)
                      __pyx_r = __pyx_pf_7pyarrow_3lib_21CompressedInputStream___init__(((struct __pyx_obj_7pyarrow_3lib_CompressedInputStream *)__pyx_v_self), __pyx_v_stream, __pyx_v_compression);

                      /* function exit code */
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __pyx_r = -1;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      goto __pyx_L7_cleaned_up;
                      __pyx_L0:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __pyx_L7_cleaned_up:;
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static int __pyx_pf_7pyarrow_3lib_21CompressedInputStream___init__(struct __pyx_obj_7pyarrow_3lib_CompressedInputStream *__pyx_v_self, PyObject *__pyx_v_stream, PyObject *__pyx_v_compression) {
                      struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_nf = 0;
                      struct __pyx_obj_7pyarrow_3lib_Codec *__pyx_v_codec = 0;
                      std::shared_ptr< arrow::io::InputStream>  __pyx_v_c_reader;
                      std::shared_ptr< arrow::io::CompressedInputStream>  __pyx_v_compressed_stream;
                      int __pyx_r;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      size_t __pyx_t_3;
                      std::shared_ptr< arrow::io::InputStream>  __pyx_t_4;
                       arrow::util::Codec *__pyx_t_5;
                      std::shared_ptr< arrow::io::CompressedInputStream>  __pyx_t_6;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__init__", 0);

                      /* "pyarrow/io.pxi":1791
 *         cdef:
 *             NativeFile nf
 *             Codec codec = Codec(compression)             # <<<<<<<<<<<<<<
 *             shared_ptr[CInputStream] c_reader
 *             shared_ptr[CCompressedInputStream] compressed_stream
*/
                      __pyx_t_2 = NULL;
                      __pyx_t_3 = 1;
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_compression};
                        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Codec, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 1791, __pyx_L1_error)
                        __Pyx_GOTREF((PyObject *)__pyx_t_1);
                      }
                      __pyx_v_codec = ((struct __pyx_obj_7pyarrow_3lib_Codec *)__pyx_t_1);
                      __pyx_t_1 = 0;

                      /* "pyarrow/io.pxi":1794
 *             shared_ptr[CInputStream] c_reader
 *             shared_ptr[CCompressedInputStream] compressed_stream
 *         nf = get_native_file(stream, False)             # <<<<<<<<<<<<<<
 *         c_reader = nf.get_input_stream()
 *         compressed_stream = GetResultValue(
*/
                      __pyx_t_1 = ((PyObject *)__pyx_f_7pyarrow_3lib_get_native_file(__pyx_v_stream, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 1794, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_v_nf = ((struct __pyx_obj_7pyarrow_3lib_NativeFile *)__pyx_t_1);
                      __pyx_t_1 = 0;

                      /* "pyarrow/io.pxi":1795
 *             shared_ptr[CCompressedInputStream] compressed_stream
 *         nf = get_native_file(stream, False)
 *         c_reader = nf.get_input_stream()             # <<<<<<<<<<<<<<
 *         compressed_stream = GetResultValue(
 *             CCompressedInputStream.Make(codec.unwrap(), c_reader)
*/
                      if (unlikely(((PyObject *)__pyx_v_nf) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get_input_stream");
                        __PYX_ERR(6, 1795, __pyx_L1_error)
                      }
                      __pyx_t_4 = ((struct __pyx_vtabstruct_7pyarrow_3lib_NativeFile *)__pyx_v_nf->__pyx_vtab)->get_input_stream(__pyx_v_nf); if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 1795, __pyx_L1_error)
                      __pyx_v_c_reader = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_4);

                      /* "pyarrow/io.pxi":1797
 *         c_reader = nf.get_input_stream()
 *         compressed_stream = GetResultValue(
 *             CCompressedInputStream.Make(codec.unwrap(), c_reader)             # <<<<<<<<<<<<<<
 *         )
 *         self.set_input_stream(<shared_ptr[CInputStream]> compressed_stream)
*/
                      __pyx_t_5 = __pyx_f_7pyarrow_3lib_5Codec_unwrap(__pyx_v_codec); if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 1797, __pyx_L1_error)

                      /* "pyarrow/io.pxi":1796
 *         nf = get_native_file(stream, False)
 *         c_reader = nf.get_input_stream()
 *         compressed_stream = GetResultValue(             # <<<<<<<<<<<<<<
 *             CCompressedInputStream.Make(codec.unwrap(), c_reader)
 *         )
*/
                      __pyx_t_6 = arrow::py::GetResultValue<std::shared_ptr< arrow::io::CompressedInputStream> >( arrow::io::CompressedInputStream::Make(__pyx_t_5, __pyx_v_c_reader)); if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 1796, __pyx_L1_error)
                      __pyx_v_compressed_stream = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_6);

                      /* "pyarrow/io.pxi":1799
 *             CCompressedInputStream.Make(codec.unwrap(), c_reader)
 *         )
 *         self.set_input_stream(<shared_ptr[CInputStream]> compressed_stream)             # <<<<<<<<<<<<<<
 *         self.is_readable = True
 * 
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "set_input_stream");
                        __PYX_ERR(6, 1799, __pyx_L1_error)
                      }
                      __pyx_t_1 = ((struct __pyx_vtabstruct_7pyarrow_3lib_CompressedInputStream *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.set_input_stream(((struct __pyx_obj_7pyarrow_3lib_NativeFile *)__pyx_v_self), ((std::shared_ptr< arrow::io::InputStream> )__pyx_v_compressed_stream)); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 1799, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

                      /* "pyarrow/io.pxi":1800
 *         )
 *         self.set_input_stream(<shared_ptr[CInputStream]> compressed_stream)
 *         self.is_readable = True             # <<<<<<<<<<<<<<
 * 
 * 
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "is_readable");
                        __PYX_ERR(6, 1800, __pyx_L1_error)
                      }
                      __pyx_v_self->__pyx_base.is_readable = 1;

                      /* "pyarrow/io.pxi":1788
 *     """
 * 
 *     def __init__(self, object stream, str compression not None):             # <<<<<<<<<<<<<<
 *         cdef:
 *             NativeFile nf
*/

                      /* function exit code */
                      __pyx_r = 0;
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_AddTraceback("pyarrow.lib.CompressedInputStream.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = -1;
                      __pyx_L0:;
                      __Pyx_XDECREF((PyObject *)__pyx_v_nf);
                      __Pyx_XDECREF((PyObject *)__pyx_v_codec);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_21CompressedInputStream_3__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_21CompressedInputStream_2__reduce_cython__, "CompressedInputStream.__reduce_cython__(self)");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_21CompressedInputStream_3__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_21CompressedInputStream_3__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_21CompressedInputStream_2__reduce_cython__};
                    static PyObject *__pyx_pw_7pyarrow_3lib_21CompressedInputStream_3__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; }
                      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                      if (unlikely(__pyx_kwds_len < 0)) return NULL;
                      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;}
                      __pyx_r = __pyx_pf_7pyarrow_3lib_21CompressedInputStream_2__reduce_cython__(((struct __pyx_obj_7pyarrow_3lib_CompressedInputStream *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_21CompressedInputStream_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_CompressedInputStream *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__reduce_cython__", 0);

                      /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/
                      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0);
                      __PYX_ERR(7, 2, __pyx_L1_error)

                      /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib.CompressedInputStream.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_21CompressedInputStream_5__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_21CompressedInputStream_4__setstate_cython__, "CompressedInputStream.__setstate_cython__(self, __pyx_state)");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_21CompressedInputStream_5__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_21CompressedInputStream_5__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_21CompressedInputStream_4__setstate_cython__};
                    static PyObject *__pyx_pw_7pyarrow_3lib_21CompressedInputStream_5__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[1] = {0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(7, 3, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(7, 3, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(7, 3, __pyx_L3_error)
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(7, 3, __pyx_L3_error) }
                          }
                        } else if (unlikely(__pyx_nargs != 1)) {
                          goto __pyx_L5_argtuple_error;
                        } else {
                          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(7, 3, __pyx_L3_error)
                        }
                        __pyx_v___pyx_state = values[0];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(7, 3, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.CompressedInputStream.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_21CompressedInputStream_4__setstate_cython__(((struct __pyx_obj_7pyarrow_3lib_CompressedInputStream *)__pyx_v_self), __pyx_v___pyx_state);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_21CompressedInputStream_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_CompressedInputStream *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__setstate_cython__", 0);

                      /* "(tree fragment)":4
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
*/
                      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0);
                      __PYX_ERR(7, 4, __pyx_L1_error)

                      /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib.CompressedInputStream.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":1827
 *     """
 * 
 *     def __init__(self, object stream, str compression not None):             # <<<<<<<<<<<<<<
 *         cdef:
 *             Codec codec = Codec(compression)
*/

                    /* Python wrapper */
                    static int __pyx_pw_7pyarrow_3lib_22CompressedOutputStream_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
                    static int __pyx_pw_7pyarrow_3lib_22CompressedOutputStream_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
                      PyObject *__pyx_v_stream = 0;
                      PyObject *__pyx_v_compression = 0;
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[2] = {0,0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      int __pyx_r;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_stream,&__pyx_mstate_global->__pyx_n_u_compression,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(6, 1827, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  2:
                            values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(6, 1827, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 1827, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(6, 1827, __pyx_L3_error)
                          for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, i); __PYX_ERR(6, 1827, __pyx_L3_error) }
                          }
                        } else if (unlikely(__pyx_nargs != 2)) {
                          goto __pyx_L5_argtuple_error;
                        } else {
                          values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 1827, __pyx_L3_error)
                          values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(6, 1827, __pyx_L3_error)
                        }
                        __pyx_v_stream = values[0];
                        __pyx_v_compression = ((PyObject*)values[1]);
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, __pyx_nargs); __PYX_ERR(6, 1827, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.CompressedOutputStream.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return -1;
                      __pyx_L4_argument_unpacking_done:;
                      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_compression), (&PyUnicode_Type), 0, "compression", 1))) __PYX_ERR(6, 1827, __pyx_L1_error)
                      __pyx_r = __pyx_pf_7pyarrow_3lib_22CompressedOutputStream___init__(((struct __pyx_obj_7pyarrow_3lib_CompressedOutputStream *)__pyx_v_self), __pyx_v_stream, __pyx_v_compression);

                      /* function exit code */
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __pyx_r = -1;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      goto __pyx_L7_cleaned_up;
                      __pyx_L0:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __pyx_L7_cleaned_up:;
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static int __pyx_pf_7pyarrow_3lib_22CompressedOutputStream___init__(struct __pyx_obj_7pyarrow_3lib_CompressedOutputStream *__pyx_v_self, PyObject *__pyx_v_stream, PyObject *__pyx_v_compression) {
                      struct __pyx_obj_7pyarrow_3lib_Codec *__pyx_v_codec = 0;
                      std::shared_ptr< arrow::io::OutputStream>  __pyx_v_c_writer;
                      std::shared_ptr< arrow::io::CompressedOutputStream>  __pyx_v_compressed_stream;
                      int __pyx_r;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      size_t __pyx_t_3;
                       arrow::util::Codec *__pyx_t_4;
                      std::shared_ptr< arrow::io::CompressedOutputStream>  __pyx_t_5;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__init__", 0);

                      /* "pyarrow/io.pxi":1829
 *     def __init__(self, object stream, str compression not None):
 *         cdef:
 *             Codec codec = Codec(compression)             # <<<<<<<<<<<<<<
 *             shared_ptr[COutputStream] c_writer
 *             shared_ptr[CCompressedOutputStream] compressed_stream
*/
                      __pyx_t_2 = NULL;
                      __pyx_t_3 = 1;
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_compression};
                        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Codec, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 1829, __pyx_L1_error)
                        __Pyx_GOTREF((PyObject *)__pyx_t_1);
                      }
                      __pyx_v_codec = ((struct __pyx_obj_7pyarrow_3lib_Codec *)__pyx_t_1);
                      __pyx_t_1 = 0;

                      /* "pyarrow/io.pxi":1832
 *             shared_ptr[COutputStream] c_writer
 *             shared_ptr[CCompressedOutputStream] compressed_stream
 *         get_writer(stream, &c_writer)             # <<<<<<<<<<<<<<
 *         compressed_stream = GetResultValue(
 *             CCompressedOutputStream.Make(codec.unwrap(), c_writer)
*/
                      __pyx_t_1 = __pyx_f_7pyarrow_3lib_get_writer(__pyx_v_stream, (&__pyx_v_c_writer)); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 1832, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

                      /* "pyarrow/io.pxi":1834
 *         get_writer(stream, &c_writer)
 *         compressed_stream = GetResultValue(
 *             CCompressedOutputStream.Make(codec.unwrap(), c_writer)             # <<<<<<<<<<<<<<
 *         )
 *         self.set_output_stream(<shared_ptr[COutputStream]> compressed_stream)
*/
                      __pyx_t_4 = __pyx_f_7pyarrow_3lib_5Codec_unwrap(__pyx_v_codec); if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 1834, __pyx_L1_error)

                      /* "pyarrow/io.pxi":1833
 *             shared_ptr[CCompressedOutputStream] compressed_stream
 *         get_writer(stream, &c_writer)
 *         compressed_stream = GetResultValue(             # <<<<<<<<<<<<<<
 *             CCompressedOutputStream.Make(codec.unwrap(), c_writer)
 *         )
*/
                      __pyx_t_5 = arrow::py::GetResultValue<std::shared_ptr< arrow::io::CompressedOutputStream> >( arrow::io::CompressedOutputStream::Make(__pyx_t_4, __pyx_v_c_writer)); if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 1833, __pyx_L1_error)
                      __pyx_v_compressed_stream = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_5);

                      /* "pyarrow/io.pxi":1836
 *             CCompressedOutputStream.Make(codec.unwrap(), c_writer)
 *         )
 *         self.set_output_stream(<shared_ptr[COutputStream]> compressed_stream)             # <<<<<<<<<<<<<<
 *         self.is_writable = True
 * 
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "set_output_stream");
                        __PYX_ERR(6, 1836, __pyx_L1_error)
                      }
                      __pyx_t_1 = ((struct __pyx_vtabstruct_7pyarrow_3lib_CompressedOutputStream *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.set_output_stream(((struct __pyx_obj_7pyarrow_3lib_NativeFile *)__pyx_v_self), ((std::shared_ptr< arrow::io::OutputStream> )__pyx_v_compressed_stream)); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 1836, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

                      /* "pyarrow/io.pxi":1837
 *         )
 *         self.set_output_stream(<shared_ptr[COutputStream]> compressed_stream)
 *         self.is_writable = True             # <<<<<<<<<<<<<<
 * 
 * 
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "is_writable");
                        __PYX_ERR(6, 1837, __pyx_L1_error)
                      }
                      __pyx_v_self->__pyx_base.is_writable = 1;

                      /* "pyarrow/io.pxi":1827
 *     """
 * 
 *     def __init__(self, object stream, str compression not None):             # <<<<<<<<<<<<<<
 *         cdef:
 *             Codec codec = Codec(compression)
*/

                      /* function exit code */
                      __pyx_r = 0;
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_AddTraceback("pyarrow.lib.CompressedOutputStream.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = -1;
                      __pyx_L0:;
                      __Pyx_XDECREF((PyObject *)__pyx_v_codec);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_22CompressedOutputStream_3__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_22CompressedOutputStream_2__reduce_cython__, "CompressedOutputStream.__reduce_cython__(self)");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_22CompressedOutputStream_3__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_22CompressedOutputStream_3__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_22CompressedOutputStream_2__reduce_cython__};
                    static PyObject *__pyx_pw_7pyarrow_3lib_22CompressedOutputStream_3__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; }
                      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                      if (unlikely(__pyx_kwds_len < 0)) return NULL;
                      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;}
                      __pyx_r = __pyx_pf_7pyarrow_3lib_22CompressedOutputStream_2__reduce_cython__(((struct __pyx_obj_7pyarrow_3lib_CompressedOutputStream *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_22CompressedOutputStream_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_CompressedOutputStream *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__reduce_cython__", 0);

                      /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/
                      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0);
                      __PYX_ERR(7, 2, __pyx_L1_error)

                      /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib.CompressedOutputStream.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_22CompressedOutputStream_5__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_22CompressedOutputStream_4__setstate_cython__, "CompressedOutputStream.__setstate_cython__(self, __pyx_state)");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_22CompressedOutputStream_5__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_22CompressedOutputStream_5__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_22CompressedOutputStream_4__setstate_cython__};
                    static PyObject *__pyx_pw_7pyarrow_3lib_22CompressedOutputStream_5__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[1] = {0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(7, 3, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(7, 3, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(7, 3, __pyx_L3_error)
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(7, 3, __pyx_L3_error) }
                          }
                        } else if (unlikely(__pyx_nargs != 1)) {
                          goto __pyx_L5_argtuple_error;
                        } else {
                          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(7, 3, __pyx_L3_error)
                        }
                        __pyx_v___pyx_state = values[0];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(7, 3, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.CompressedOutputStream.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_22CompressedOutputStream_4__setstate_cython__(((struct __pyx_obj_7pyarrow_3lib_CompressedOutputStream *)__pyx_v_self), __pyx_v___pyx_state);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_22CompressedOutputStream_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_CompressedOutputStream *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__setstate_cython__", 0);

                      /* "(tree fragment)":4
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
*/
                      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0);
                      __PYX_ERR(7, 4, __pyx_L1_error)

                      /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib.CompressedOutputStream.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":1861
 *     """
 * 
 *     def __init__(self, NativeFile stream, int buffer_size,             # <<<<<<<<<<<<<<
 *                  MemoryPool memory_pool=None):
 *         cdef shared_ptr[CBufferedInputStream] buffered_stream
*/

                    /* Python wrapper */
                    static int __pyx_pw_7pyarrow_3lib_19BufferedInputStream_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
                    static int __pyx_pw_7pyarrow_3lib_19BufferedInputStream_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
                      struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_stream = 0;
                      int __pyx_v_buffer_size;
                      struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_memory_pool = 0;
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[3] = {0,0,0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      int __pyx_r;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_stream,&__pyx_mstate_global->__pyx_n_u_buffer_size,&__pyx_mstate_global->__pyx_n_u_memory_pool,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(6, 1861, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  3:
                            values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(6, 1861, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  2:
                            values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(6, 1861, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 1861, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(6, 1861, __pyx_L3_error)

                          /* "pyarrow/io.pxi":1862
 * 
 *     def __init__(self, NativeFile stream, int buffer_size,
 *                  MemoryPool memory_pool=None):             # <<<<<<<<<<<<<<
 *         cdef shared_ptr[CBufferedInputStream] buffered_stream
 * 
*/
                          if (!values[2]) values[2] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)Py_None));
                          for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, i); __PYX_ERR(6, 1861, __pyx_L3_error) }
                          }
                        } else {
                          switch (__pyx_nargs) {
                            case  3:
                            values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(6, 1861, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  2:
                            values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(6, 1861, __pyx_L3_error)
                            values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 1861, __pyx_L3_error)
                            break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          if (!values[2]) values[2] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)Py_None));
                        }
                        __pyx_v_stream = ((struct __pyx_obj_7pyarrow_3lib_NativeFile *)values[0]);
                        __pyx_v_buffer_size = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_buffer_size == (int)-1) && PyErr_Occurred())) __PYX_ERR(6, 1861, __pyx_L3_error)
                        __pyx_v_memory_pool = ((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)values[2]);
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, __pyx_nargs); __PYX_ERR(6, 1861, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.BufferedInputStream.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return -1;
                      __pyx_L4_argument_unpacking_done:;
                      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_stream), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NativeFile, 1, "stream", 0))) __PYX_ERR(6, 1861, __pyx_L1_error)
                      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_memory_pool), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_MemoryPool, 1, "memory_pool", 0))) __PYX_ERR(6, 1862, __pyx_L1_error)
                      __pyx_r = __pyx_pf_7pyarrow_3lib_19BufferedInputStream___init__(((struct __pyx_obj_7pyarrow_3lib_BufferedInputStream *)__pyx_v_self), __pyx_v_stream, __pyx_v_buffer_size, __pyx_v_memory_pool);

                      /* "pyarrow/io.pxi":1861
 *     """
 * 
 *     def __init__(self, NativeFile stream, int buffer_size,             # <<<<<<<<<<<<<<
 *                  MemoryPool memory_pool=None):
 *         cdef shared_ptr[CBufferedInputStream] buffered_stream
*/

                      /* function exit code */
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __pyx_r = -1;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      goto __pyx_L7_cleaned_up;
                      __pyx_L0:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __pyx_L7_cleaned_up:;
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static int __pyx_pf_7pyarrow_3lib_19BufferedInputStream___init__(struct __pyx_obj_7pyarrow_3lib_BufferedInputStream *__pyx_v_self, struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_stream, int __pyx_v_buffer_size, struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_memory_pool) {
                      std::shared_ptr< arrow::io::BufferedInputStream>  __pyx_v_buffered_stream;
                      int __pyx_r;
                      __Pyx_RefNannyDeclarations
                      int __pyx_t_1;
                      PyObject *__pyx_t_2 = NULL;
                      PyObject *__pyx_t_3 = NULL;
                      size_t __pyx_t_4;
                       arrow::MemoryPool *__pyx_t_5;
                      std::shared_ptr< arrow::io::InputStream>  __pyx_t_6;
                      std::shared_ptr< arrow::io::BufferedInputStream>  __pyx_t_7;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__init__", 0);

                      /* "pyarrow/io.pxi":1865
 *         cdef shared_ptr[CBufferedInputStream] buffered_stream
 * 
 *         if buffer_size <= 0:             # <<<<<<<<<<<<<<
 *             raise ValueError('Buffer size must be larger than zero')
 *         buffered_stream = GetResultValue(CBufferedInputStream.Create(
*/
                      __pyx_t_1 = (__pyx_v_buffer_size <= 0);
                      if (unlikely(__pyx_t_1)) {

                        /* "pyarrow/io.pxi":1866
 * 
 *         if buffer_size <= 0:
 *             raise ValueError('Buffer size must be larger than zero')             # <<<<<<<<<<<<<<
 *         buffered_stream = GetResultValue(CBufferedInputStream.Create(
 *             buffer_size, maybe_unbox_memory_pool(memory_pool),
*/
                        __pyx_t_3 = NULL;
                        __pyx_t_4 = 1;
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Buffer_size_must_be_larger_than};
                          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                          if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 1866, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_2);
                        }
                        __Pyx_Raise(__pyx_t_2, 0, 0, 0);
                        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                        __PYX_ERR(6, 1866, __pyx_L1_error)

                        /* "pyarrow/io.pxi":1865
 *         cdef shared_ptr[CBufferedInputStream] buffered_stream
 * 
 *         if buffer_size <= 0:             # <<<<<<<<<<<<<<
 *             raise ValueError('Buffer size must be larger than zero')
 *         buffered_stream = GetResultValue(CBufferedInputStream.Create(
*/
                      }

                      /* "pyarrow/io.pxi":1868
 *             raise ValueError('Buffer size must be larger than zero')
 *         buffered_stream = GetResultValue(CBufferedInputStream.Create(
 *             buffer_size, maybe_unbox_memory_pool(memory_pool),             # <<<<<<<<<<<<<<
 *             stream.get_input_stream()))
 * 
*/
                      __pyx_t_5 = __pyx_f_7pyarrow_3lib_maybe_unbox_memory_pool(__pyx_v_memory_pool); if (unlikely(__pyx_t_5 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(6, 1868, __pyx_L1_error)

                      /* "pyarrow/io.pxi":1869
 *         buffered_stream = GetResultValue(CBufferedInputStream.Create(
 *             buffer_size, maybe_unbox_memory_pool(memory_pool),
 *             stream.get_input_stream()))             # <<<<<<<<<<<<<<
 * 
 *         self.set_input_stream(<shared_ptr[CInputStream]> buffered_stream)
*/
                      if (unlikely(((PyObject *)__pyx_v_stream) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get_input_stream");
                        __PYX_ERR(6, 1869, __pyx_L1_error)
                      }
                      __pyx_t_6 = ((struct __pyx_vtabstruct_7pyarrow_3lib_NativeFile *)__pyx_v_stream->__pyx_vtab)->get_input_stream(__pyx_v_stream); if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 1869, __pyx_L1_error)

                      /* "pyarrow/io.pxi":1867
 *         if buffer_size <= 0:
 *             raise ValueError('Buffer size must be larger than zero')
 *         buffered_stream = GetResultValue(CBufferedInputStream.Create(             # <<<<<<<<<<<<<<
 *             buffer_size, maybe_unbox_memory_pool(memory_pool),
 *             stream.get_input_stream()))
*/
                      __pyx_t_7 = arrow::py::GetResultValue<std::shared_ptr< arrow::io::BufferedInputStream> >( arrow::io::BufferedInputStream::Create(__pyx_v_buffer_size, __pyx_t_5, __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_6))); if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 1867, __pyx_L1_error)
                      __pyx_v_buffered_stream = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_7);

                      /* "pyarrow/io.pxi":1871
 *             stream.get_input_stream()))
 * 
 *         self.set_input_stream(<shared_ptr[CInputStream]> buffered_stream)             # <<<<<<<<<<<<<<
 *         self.is_readable = True
 * 
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "set_input_stream");
                        __PYX_ERR(6, 1871, __pyx_L1_error)
                      }
                      __pyx_t_2 = ((struct __pyx_vtabstruct_7pyarrow_3lib_BufferedInputStream *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.set_input_stream(((struct __pyx_obj_7pyarrow_3lib_NativeFile *)__pyx_v_self), ((std::shared_ptr< arrow::io::InputStream> )__pyx_v_buffered_stream)); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 1871, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_2);
                      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

                      /* "pyarrow/io.pxi":1872
 * 
 *         self.set_input_stream(<shared_ptr[CInputStream]> buffered_stream)
 *         self.is_readable = True             # <<<<<<<<<<<<<<
 * 
 *     def detach(self):
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "is_readable");
                        __PYX_ERR(6, 1872, __pyx_L1_error)
                      }
                      __pyx_v_self->__pyx_base.is_readable = 1;

                      /* "pyarrow/io.pxi":1861
 *     """
 * 
 *     def __init__(self, NativeFile stream, int buffer_size,             # <<<<<<<<<<<<<<
 *                  MemoryPool memory_pool=None):
 *         cdef shared_ptr[CBufferedInputStream] buffered_stream
*/

                      /* function exit code */
                      __pyx_r = 0;
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_AddTraceback("pyarrow.lib.BufferedInputStream.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = -1;
                      __pyx_L0:;
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":1874
 *         self.is_readable = True
 * 
 *     def detach(self):             # <<<<<<<<<<<<<<
 *         """
 *         Release the raw InputStream.
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_19BufferedInputStream_3detach(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_19BufferedInputStream_2detach, "BufferedInputStream.detach(self)\n\nRelease the raw InputStream.\nFurther operations on this stream are invalid.\n\nReturns\n-------\nraw : NativeFile\n    The underlying raw input stream");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_19BufferedInputStream_3detach = {"detach", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_19BufferedInputStream_3detach, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_19BufferedInputStream_2detach};
                    static PyObject *__pyx_pw_7pyarrow_3lib_19BufferedInputStream_3detach(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("detach (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("detach", 1, 0, 0, __pyx_nargs); return NULL; }
                      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                      if (unlikely(__pyx_kwds_len < 0)) return NULL;
                      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("detach", __pyx_kwds); return NULL;}
                      __pyx_r = __pyx_pf_7pyarrow_3lib_19BufferedInputStream_2detach(((struct __pyx_obj_7pyarrow_3lib_BufferedInputStream *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_19BufferedInputStream_2detach(struct __pyx_obj_7pyarrow_3lib_BufferedInputStream *__pyx_v_self) {
                      std::shared_ptr< arrow::io::InputStream>  __pyx_v_c_raw;
                      __pyx_t_7pyarrow_3lib__CBufferedInputStreamPtr __pyx_v_buffered;
                      struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_raw = 0;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      __pyx_t_7pyarrow_3lib__CBufferedInputStreamPtr __pyx_t_1;
                      int __pyx_t_2;
                      std::shared_ptr< arrow::io::InputStream>  __pyx_t_3;
                      PyObject *__pyx_t_4 = NULL;
                      PyObject *__pyx_t_5 = NULL;
                      size_t __pyx_t_6;
                      __pyx_t_7pyarrow_3lib__RandomAccessFilePtr __pyx_t_7;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("detach", 0);

                      /* "pyarrow/io.pxi":1890
 * 
 *         buffered = dynamic_cast[_CBufferedInputStreamPtr](
 *             self.input_stream.get())             # <<<<<<<<<<<<<<
 *         assert buffered != nullptr
 * 
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "input_stream");
                        __PYX_ERR(6, 1890, __pyx_L1_error)
                      }

                      /* "pyarrow/io.pxi":1889
 *             NativeFile raw
 * 
 *         buffered = dynamic_cast[_CBufferedInputStreamPtr](             # <<<<<<<<<<<<<<
 *             self.input_stream.get())
 *         assert buffered != nullptr
*/
                      try {
                        __pyx_t_1 = dynamic_cast<__pyx_t_7pyarrow_3lib__CBufferedInputStreamPtr>(__pyx_v_self->__pyx_base.input_stream.get());
                      } catch(...) {
                        __Pyx_CppExn2PyErr();
                        __PYX_ERR(6, 1889, __pyx_L1_error)
                      }
                      __pyx_v_buffered = __pyx_t_1;

                      /* "pyarrow/io.pxi":1891
 *         buffered = dynamic_cast[_CBufferedInputStreamPtr](
 *             self.input_stream.get())
 *         assert buffered != nullptr             # <<<<<<<<<<<<<<
 * 
 *         with nogil:
*/
                      #ifndef CYTHON_WITHOUT_ASSERTIONS
                      if (unlikely(__pyx_assertions_enabled())) {
                        __pyx_t_2 = (__pyx_v_buffered != nullptr);
                        if (unlikely(!__pyx_t_2)) {
                          __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
                          __PYX_ERR(6, 1891, __pyx_L1_error)
                        }
                      }
                      #else
                      if ((1)); else __PYX_ERR(6, 1891, __pyx_L1_error)
                      #endif

                      /* "pyarrow/io.pxi":1893
 *         assert buffered != nullptr
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             c_raw = GetResultValue(buffered.Detach())
 * 
*/
                      {
                          PyThreadState * _save;
                          _save = PyEval_SaveThread();
                          __Pyx_FastGIL_Remember();
                          /*try:*/ {

                            /* "pyarrow/io.pxi":1894
 * 
 *         with nogil:
 *             c_raw = GetResultValue(buffered.Detach())             # <<<<<<<<<<<<<<
 * 
 *         raw = NativeFile()
*/
                            __pyx_t_3 = arrow::py::GetResultValue<std::shared_ptr< arrow::io::InputStream> >(__pyx_v_buffered->Detach()); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(6, 1894, __pyx_L4_error)
                            __pyx_v_c_raw = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_3);
                          }

                          /* "pyarrow/io.pxi":1893
 *         assert buffered != nullptr
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             c_raw = GetResultValue(buffered.Detach())
 * 
*/
                          /*finally:*/ {
                            /*normal exit:*/{
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L5;
                            }
                            __pyx_L4_error: {
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L1_error;
                            }
                            __pyx_L5:;
                          }
                      }

                      /* "pyarrow/io.pxi":1896
 *             c_raw = GetResultValue(buffered.Detach())
 * 
 *         raw = NativeFile()             # <<<<<<<<<<<<<<
 *         raw.is_readable = True
 *         # Find out whether the raw stream is a RandomAccessFile
*/
                      __pyx_t_5 = NULL;
                      __pyx_t_6 = 1;
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
                        __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NativeFile, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
                        if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 1896, __pyx_L1_error)
                        __Pyx_GOTREF((PyObject *)__pyx_t_4);
                      }
                      __pyx_v_raw = ((struct __pyx_obj_7pyarrow_3lib_NativeFile *)__pyx_t_4);
                      __pyx_t_4 = 0;

                      /* "pyarrow/io.pxi":1897
 * 
 *         raw = NativeFile()
 *         raw.is_readable = True             # <<<<<<<<<<<<<<
 *         # Find out whether the raw stream is a RandomAccessFile
 *         # or a mere InputStream.  This helps us support seek() etc.
*/
                      __pyx_v_raw->is_readable = 1;

                      /* "pyarrow/io.pxi":1901
 *         # or a mere InputStream.  This helps us support seek() etc.
 *         # selectively.
 *         if dynamic_cast[_RandomAccessFilePtr](c_raw.get()) != nullptr:             # <<<<<<<<<<<<<<
 *             raw.set_random_access_file(
 *                 static_pointer_cast[CRandomAccessFile, CInputStream](c_raw))
*/
                      try {
                        __pyx_t_7 = dynamic_cast<__pyx_t_7pyarrow_3lib__RandomAccessFilePtr>(__pyx_v_c_raw.get());
                      } catch(...) {
                        __Pyx_CppExn2PyErr();
                        __PYX_ERR(6, 1901, __pyx_L1_error)
                      }
                      __pyx_t_2 = (__pyx_t_7 != nullptr);
                      if (__pyx_t_2) {

                        /* "pyarrow/io.pxi":1902
 *         # selectively.
 *         if dynamic_cast[_RandomAccessFilePtr](c_raw.get()) != nullptr:
 *             raw.set_random_access_file(             # <<<<<<<<<<<<<<
 *                 static_pointer_cast[CRandomAccessFile, CInputStream](c_raw))
 *         else:
*/
                        __pyx_t_4 = ((struct __pyx_vtabstruct_7pyarrow_3lib_NativeFile *)__pyx_v_raw->__pyx_vtab)->set_random_access_file(__pyx_v_raw, std::static_pointer_cast< arrow::io::RandomAccessFile, arrow::io::InputStream>(__pyx_v_c_raw)); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 1902, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_4);
                        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

                        /* "pyarrow/io.pxi":1901
 *         # or a mere InputStream.  This helps us support seek() etc.
 *         # selectively.
 *         if dynamic_cast[_RandomAccessFilePtr](c_raw.get()) != nullptr:             # <<<<<<<<<<<<<<
 *             raw.set_random_access_file(
 *                 static_pointer_cast[CRandomAccessFile, CInputStream](c_raw))
*/
                        goto __pyx_L6;
                      }

                      /* "pyarrow/io.pxi":1905
 *                 static_pointer_cast[CRandomAccessFile, CInputStream](c_raw))
 *         else:
 *             raw.set_input_stream(c_raw)             # <<<<<<<<<<<<<<
 *         return raw
 * 
*/
                      /*else*/ {
                        __pyx_t_4 = ((struct __pyx_vtabstruct_7pyarrow_3lib_NativeFile *)__pyx_v_raw->__pyx_vtab)->set_input_stream(__pyx_v_raw, __pyx_v_c_raw); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 1905, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_4);
                        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                      }
                      __pyx_L6:;

                      /* "pyarrow/io.pxi":1906
 *         else:
 *             raw.set_input_stream(c_raw)
 *         return raw             # <<<<<<<<<<<<<<
 * 
 * 
*/
                      __Pyx_XDECREF(__pyx_r);
                      __Pyx_INCREF((PyObject *)__pyx_v_raw);
                      __pyx_r = ((PyObject *)__pyx_v_raw);
                      goto __pyx_L0;

                      /* "pyarrow/io.pxi":1874
 *         self.is_readable = True
 * 
 *     def detach(self):             # <<<<<<<<<<<<<<
 *         """
 *         Release the raw InputStream.
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_4);
                      __Pyx_XDECREF(__pyx_t_5);
                      __Pyx_AddTraceback("pyarrow.lib.BufferedInputStream.detach", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XDECREF((PyObject *)__pyx_v_raw);
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_19BufferedInputStream_5__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_19BufferedInputStream_4__reduce_cython__, "BufferedInputStream.__reduce_cython__(self)");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_19BufferedInputStream_5__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_19BufferedInputStream_5__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_19BufferedInputStream_4__reduce_cython__};
                    static PyObject *__pyx_pw_7pyarrow_3lib_19BufferedInputStream_5__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; }
                      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                      if (unlikely(__pyx_kwds_len < 0)) return NULL;
                      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;}
                      __pyx_r = __pyx_pf_7pyarrow_3lib_19BufferedInputStream_4__reduce_cython__(((struct __pyx_obj_7pyarrow_3lib_BufferedInputStream *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_19BufferedInputStream_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_BufferedInputStream *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__reduce_cython__", 0);

                      /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/
                      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0);
                      __PYX_ERR(7, 2, __pyx_L1_error)

                      /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib.BufferedInputStream.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_19BufferedInputStream_7__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_19BufferedInputStream_6__setstate_cython__, "BufferedInputStream.__setstate_cython__(self, __pyx_state)");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_19BufferedInputStream_7__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_19BufferedInputStream_7__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_19BufferedInputStream_6__setstate_cython__};
                    static PyObject *__pyx_pw_7pyarrow_3lib_19BufferedInputStream_7__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[1] = {0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(7, 3, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(7, 3, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(7, 3, __pyx_L3_error)
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(7, 3, __pyx_L3_error) }
                          }
                        } else if (unlikely(__pyx_nargs != 1)) {
                          goto __pyx_L5_argtuple_error;
                        } else {
                          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(7, 3, __pyx_L3_error)
                        }
                        __pyx_v___pyx_state = values[0];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(7, 3, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.BufferedInputStream.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_19BufferedInputStream_6__setstate_cython__(((struct __pyx_obj_7pyarrow_3lib_BufferedInputStream *)__pyx_v_self), __pyx_v___pyx_state);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_19BufferedInputStream_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_BufferedInputStream *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__setstate_cython__", 0);

                      /* "(tree fragment)":4
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
*/
                      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0);
                      __PYX_ERR(7, 4, __pyx_L1_error)

                      /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib.BufferedInputStream.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":1925
 *     """
 * 
 *     def __init__(self, NativeFile stream, int buffer_size,             # <<<<<<<<<<<<<<
 *                  MemoryPool memory_pool=None):
 *         cdef shared_ptr[CBufferedOutputStream] buffered_stream
*/

                    /* Python wrapper */
                    static int __pyx_pw_7pyarrow_3lib_20BufferedOutputStream_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
                    static int __pyx_pw_7pyarrow_3lib_20BufferedOutputStream_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
                      struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_stream = 0;
                      int __pyx_v_buffer_size;
                      struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_memory_pool = 0;
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[3] = {0,0,0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      int __pyx_r;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_stream,&__pyx_mstate_global->__pyx_n_u_buffer_size,&__pyx_mstate_global->__pyx_n_u_memory_pool,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(6, 1925, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  3:
                            values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(6, 1925, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  2:
                            values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(6, 1925, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 1925, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(6, 1925, __pyx_L3_error)

                          /* "pyarrow/io.pxi":1926
 * 
 *     def __init__(self, NativeFile stream, int buffer_size,
 *                  MemoryPool memory_pool=None):             # <<<<<<<<<<<<<<
 *         cdef shared_ptr[CBufferedOutputStream] buffered_stream
 * 
*/
                          if (!values[2]) values[2] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)Py_None));
                          for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, i); __PYX_ERR(6, 1925, __pyx_L3_error) }
                          }
                        } else {
                          switch (__pyx_nargs) {
                            case  3:
                            values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(6, 1925, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  2:
                            values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(6, 1925, __pyx_L3_error)
                            values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 1925, __pyx_L3_error)
                            break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          if (!values[2]) values[2] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)Py_None));
                        }
                        __pyx_v_stream = ((struct __pyx_obj_7pyarrow_3lib_NativeFile *)values[0]);
                        __pyx_v_buffer_size = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_buffer_size == (int)-1) && PyErr_Occurred())) __PYX_ERR(6, 1925, __pyx_L3_error)
                        __pyx_v_memory_pool = ((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)values[2]);
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, __pyx_nargs); __PYX_ERR(6, 1925, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.BufferedOutputStream.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return -1;
                      __pyx_L4_argument_unpacking_done:;
                      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_stream), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NativeFile, 1, "stream", 0))) __PYX_ERR(6, 1925, __pyx_L1_error)
                      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_memory_pool), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_MemoryPool, 1, "memory_pool", 0))) __PYX_ERR(6, 1926, __pyx_L1_error)
                      __pyx_r = __pyx_pf_7pyarrow_3lib_20BufferedOutputStream___init__(((struct __pyx_obj_7pyarrow_3lib_BufferedOutputStream *)__pyx_v_self), __pyx_v_stream, __pyx_v_buffer_size, __pyx_v_memory_pool);

                      /* "pyarrow/io.pxi":1925
 *     """
 * 
 *     def __init__(self, NativeFile stream, int buffer_size,             # <<<<<<<<<<<<<<
 *                  MemoryPool memory_pool=None):
 *         cdef shared_ptr[CBufferedOutputStream] buffered_stream
*/

                      /* function exit code */
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __pyx_r = -1;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      goto __pyx_L7_cleaned_up;
                      __pyx_L0:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __pyx_L7_cleaned_up:;
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static int __pyx_pf_7pyarrow_3lib_20BufferedOutputStream___init__(struct __pyx_obj_7pyarrow_3lib_BufferedOutputStream *__pyx_v_self, struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_stream, int __pyx_v_buffer_size, struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_memory_pool) {
                      std::shared_ptr< arrow::io::BufferedOutputStream>  __pyx_v_buffered_stream;
                      int __pyx_r;
                      __Pyx_RefNannyDeclarations
                      int __pyx_t_1;
                      PyObject *__pyx_t_2 = NULL;
                      PyObject *__pyx_t_3 = NULL;
                      size_t __pyx_t_4;
                       arrow::MemoryPool *__pyx_t_5;
                      std::shared_ptr< arrow::io::OutputStream>  __pyx_t_6;
                      std::shared_ptr< arrow::io::BufferedOutputStream>  __pyx_t_7;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__init__", 0);

                      /* "pyarrow/io.pxi":1929
 *         cdef shared_ptr[CBufferedOutputStream] buffered_stream
 * 
 *         if buffer_size <= 0:             # <<<<<<<<<<<<<<
 *             raise ValueError('Buffer size must be larger than zero')
 *         buffered_stream = GetResultValue(CBufferedOutputStream.Create(
*/
                      __pyx_t_1 = (__pyx_v_buffer_size <= 0);
                      if (unlikely(__pyx_t_1)) {

                        /* "pyarrow/io.pxi":1930
 * 
 *         if buffer_size <= 0:
 *             raise ValueError('Buffer size must be larger than zero')             # <<<<<<<<<<<<<<
 *         buffered_stream = GetResultValue(CBufferedOutputStream.Create(
 *             buffer_size, maybe_unbox_memory_pool(memory_pool),
*/
                        __pyx_t_3 = NULL;
                        __pyx_t_4 = 1;
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Buffer_size_must_be_larger_than};
                          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                          if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 1930, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_2);
                        }
                        __Pyx_Raise(__pyx_t_2, 0, 0, 0);
                        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                        __PYX_ERR(6, 1930, __pyx_L1_error)

                        /* "pyarrow/io.pxi":1929
 *         cdef shared_ptr[CBufferedOutputStream] buffered_stream
 * 
 *         if buffer_size <= 0:             # <<<<<<<<<<<<<<
 *             raise ValueError('Buffer size must be larger than zero')
 *         buffered_stream = GetResultValue(CBufferedOutputStream.Create(
*/
                      }

                      /* "pyarrow/io.pxi":1932
 *             raise ValueError('Buffer size must be larger than zero')
 *         buffered_stream = GetResultValue(CBufferedOutputStream.Create(
 *             buffer_size, maybe_unbox_memory_pool(memory_pool),             # <<<<<<<<<<<<<<
 *             stream.get_output_stream()))
 * 
*/
                      __pyx_t_5 = __pyx_f_7pyarrow_3lib_maybe_unbox_memory_pool(__pyx_v_memory_pool); if (unlikely(__pyx_t_5 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(6, 1932, __pyx_L1_error)

                      /* "pyarrow/io.pxi":1933
 *         buffered_stream = GetResultValue(CBufferedOutputStream.Create(
 *             buffer_size, maybe_unbox_memory_pool(memory_pool),
 *             stream.get_output_stream()))             # <<<<<<<<<<<<<<
 * 
 *         self.set_output_stream(<shared_ptr[COutputStream]> buffered_stream)
*/
                      if (unlikely(((PyObject *)__pyx_v_stream) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get_output_stream");
                        __PYX_ERR(6, 1933, __pyx_L1_error)
                      }
                      __pyx_t_6 = ((struct __pyx_vtabstruct_7pyarrow_3lib_NativeFile *)__pyx_v_stream->__pyx_vtab)->get_output_stream(__pyx_v_stream); if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 1933, __pyx_L1_error)

                      /* "pyarrow/io.pxi":1931
 *         if buffer_size <= 0:
 *             raise ValueError('Buffer size must be larger than zero')
 *         buffered_stream = GetResultValue(CBufferedOutputStream.Create(             # <<<<<<<<<<<<<<
 *             buffer_size, maybe_unbox_memory_pool(memory_pool),
 *             stream.get_output_stream()))
*/
                      __pyx_t_7 = arrow::py::GetResultValue<std::shared_ptr< arrow::io::BufferedOutputStream> >( arrow::io::BufferedOutputStream::Create(__pyx_v_buffer_size, __pyx_t_5, __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_6))); if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 1931, __pyx_L1_error)
                      __pyx_v_buffered_stream = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_7);

                      /* "pyarrow/io.pxi":1935
 *             stream.get_output_stream()))
 * 
 *         self.set_output_stream(<shared_ptr[COutputStream]> buffered_stream)             # <<<<<<<<<<<<<<
 *         self.is_writable = True
 * 
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "set_output_stream");
                        __PYX_ERR(6, 1935, __pyx_L1_error)
                      }
                      __pyx_t_2 = ((struct __pyx_vtabstruct_7pyarrow_3lib_BufferedOutputStream *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.set_output_stream(((struct __pyx_obj_7pyarrow_3lib_NativeFile *)__pyx_v_self), ((std::shared_ptr< arrow::io::OutputStream> )__pyx_v_buffered_stream)); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 1935, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_2);
                      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

                      /* "pyarrow/io.pxi":1936
 * 
 *         self.set_output_stream(<shared_ptr[COutputStream]> buffered_stream)
 *         self.is_writable = True             # <<<<<<<<<<<<<<
 * 
 *     def detach(self):
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "is_writable");
                        __PYX_ERR(6, 1936, __pyx_L1_error)
                      }
                      __pyx_v_self->__pyx_base.is_writable = 1;

                      /* "pyarrow/io.pxi":1925
 *     """
 * 
 *     def __init__(self, NativeFile stream, int buffer_size,             # <<<<<<<<<<<<<<
 *                  MemoryPool memory_pool=None):
 *         cdef shared_ptr[CBufferedOutputStream] buffered_stream
*/

                      /* function exit code */
                      __pyx_r = 0;
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_AddTraceback("pyarrow.lib.BufferedOutputStream.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = -1;
                      __pyx_L0:;
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":1938
 *         self.is_writable = True
 * 
 *     def detach(self):             # <<<<<<<<<<<<<<
 *         """
 *         Flush any buffered writes and release the raw OutputStream.
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_20BufferedOutputStream_3detach(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_20BufferedOutputStream_2detach, "BufferedOutputStream.detach(self)\n\nFlush any buffered writes and release the raw OutputStream.\nFurther operations on this stream are invalid.\n\nReturns\n-------\nraw : NativeFile\n    The underlying raw output stream.");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_20BufferedOutputStream_3detach = {"detach", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_20BufferedOutputStream_3detach, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_20BufferedOutputStream_2detach};
                    static PyObject *__pyx_pw_7pyarrow_3lib_20BufferedOutputStream_3detach(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("detach (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("detach", 1, 0, 0, __pyx_nargs); return NULL; }
                      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                      if (unlikely(__pyx_kwds_len < 0)) return NULL;
                      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("detach", __pyx_kwds); return NULL;}
                      __pyx_r = __pyx_pf_7pyarrow_3lib_20BufferedOutputStream_2detach(((struct __pyx_obj_7pyarrow_3lib_BufferedOutputStream *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_20BufferedOutputStream_2detach(struct __pyx_obj_7pyarrow_3lib_BufferedOutputStream *__pyx_v_self) {
                      std::shared_ptr< arrow::io::OutputStream>  __pyx_v_c_raw;
                      __pyx_t_7pyarrow_3lib__CBufferedOutputStreamPtr __pyx_v_buffered;
                      struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_raw = 0;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      __pyx_t_7pyarrow_3lib__CBufferedOutputStreamPtr __pyx_t_1;
                      int __pyx_t_2;
                      std::shared_ptr< arrow::io::OutputStream>  __pyx_t_3;
                      PyObject *__pyx_t_4 = NULL;
                      PyObject *__pyx_t_5 = NULL;
                      size_t __pyx_t_6;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("detach", 0);

                      /* "pyarrow/io.pxi":1954
 * 
 *         buffered = dynamic_cast[_CBufferedOutputStreamPtr](
 *             self.output_stream.get())             # <<<<<<<<<<<<<<
 *         assert buffered != nullptr
 * 
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "output_stream");
                        __PYX_ERR(6, 1954, __pyx_L1_error)
                      }

                      /* "pyarrow/io.pxi":1953
 *             NativeFile raw
 * 
 *         buffered = dynamic_cast[_CBufferedOutputStreamPtr](             # <<<<<<<<<<<<<<
 *             self.output_stream.get())
 *         assert buffered != nullptr
*/
                      try {
                        __pyx_t_1 = dynamic_cast<__pyx_t_7pyarrow_3lib__CBufferedOutputStreamPtr>(__pyx_v_self->__pyx_base.output_stream.get());
                      } catch(...) {
                        __Pyx_CppExn2PyErr();
                        __PYX_ERR(6, 1953, __pyx_L1_error)
                      }
                      __pyx_v_buffered = __pyx_t_1;

                      /* "pyarrow/io.pxi":1955
 *         buffered = dynamic_cast[_CBufferedOutputStreamPtr](
 *             self.output_stream.get())
 *         assert buffered != nullptr             # <<<<<<<<<<<<<<
 * 
 *         with nogil:
*/
                      #ifndef CYTHON_WITHOUT_ASSERTIONS
                      if (unlikely(__pyx_assertions_enabled())) {
                        __pyx_t_2 = (__pyx_v_buffered != nullptr);
                        if (unlikely(!__pyx_t_2)) {
                          __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
                          __PYX_ERR(6, 1955, __pyx_L1_error)
                        }
                      }
                      #else
                      if ((1)); else __PYX_ERR(6, 1955, __pyx_L1_error)
                      #endif

                      /* "pyarrow/io.pxi":1957
 *         assert buffered != nullptr
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             c_raw = GetResultValue(buffered.Detach())
 * 
*/
                      {
                          PyThreadState * _save;
                          _save = PyEval_SaveThread();
                          __Pyx_FastGIL_Remember();
                          /*try:*/ {

                            /* "pyarrow/io.pxi":1958
 * 
 *         with nogil:
 *             c_raw = GetResultValue(buffered.Detach())             # <<<<<<<<<<<<<<
 * 
 *         raw = NativeFile()
*/
                            __pyx_t_3 = arrow::py::GetResultValue<std::shared_ptr< arrow::io::OutputStream> >(__pyx_v_buffered->Detach()); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(6, 1958, __pyx_L4_error)
                            __pyx_v_c_raw = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_3);
                          }

                          /* "pyarrow/io.pxi":1957
 *         assert buffered != nullptr
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             c_raw = GetResultValue(buffered.Detach())
 * 
*/
                          /*finally:*/ {
                            /*normal exit:*/{
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L5;
                            }
                            __pyx_L4_error: {
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L1_error;
                            }
                            __pyx_L5:;
                          }
                      }

                      /* "pyarrow/io.pxi":1960
 *             c_raw = GetResultValue(buffered.Detach())
 * 
 *         raw = NativeFile()             # <<<<<<<<<<<<<<
 *         raw.is_writable = True
 *         raw.set_output_stream(c_raw)
*/
                      __pyx_t_5 = NULL;
                      __pyx_t_6 = 1;
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
                        __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NativeFile, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
                        if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 1960, __pyx_L1_error)
                        __Pyx_GOTREF((PyObject *)__pyx_t_4);
                      }
                      __pyx_v_raw = ((struct __pyx_obj_7pyarrow_3lib_NativeFile *)__pyx_t_4);
                      __pyx_t_4 = 0;

                      /* "pyarrow/io.pxi":1961
 * 
 *         raw = NativeFile()
 *         raw.is_writable = True             # <<<<<<<<<<<<<<
 *         raw.set_output_stream(c_raw)
 *         return raw
*/
                      __pyx_v_raw->is_writable = 1;

                      /* "pyarrow/io.pxi":1962
 *         raw = NativeFile()
 *         raw.is_writable = True
 *         raw.set_output_stream(c_raw)             # <<<<<<<<<<<<<<
 *         return raw
 * 
*/
                      __pyx_t_4 = ((struct __pyx_vtabstruct_7pyarrow_3lib_NativeFile *)__pyx_v_raw->__pyx_vtab)->set_output_stream(__pyx_v_raw, __pyx_v_c_raw); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 1962, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_4);
                      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

                      /* "pyarrow/io.pxi":1963
 *         raw.is_writable = True
 *         raw.set_output_stream(c_raw)
 *         return raw             # <<<<<<<<<<<<<<
 * 
 * 
*/
                      __Pyx_XDECREF(__pyx_r);
                      __Pyx_INCREF((PyObject *)__pyx_v_raw);
                      __pyx_r = ((PyObject *)__pyx_v_raw);
                      goto __pyx_L0;

                      /* "pyarrow/io.pxi":1938
 *         self.is_writable = True
 * 
 *     def detach(self):             # <<<<<<<<<<<<<<
 *         """
 *         Flush any buffered writes and release the raw OutputStream.
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_4);
                      __Pyx_XDECREF(__pyx_t_5);
                      __Pyx_AddTraceback("pyarrow.lib.BufferedOutputStream.detach", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XDECREF((PyObject *)__pyx_v_raw);
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_20BufferedOutputStream_5__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_20BufferedOutputStream_4__reduce_cython__, "BufferedOutputStream.__reduce_cython__(self)");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_20BufferedOutputStream_5__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_20BufferedOutputStream_5__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_20BufferedOutputStream_4__reduce_cython__};
                    static PyObject *__pyx_pw_7pyarrow_3lib_20BufferedOutputStream_5__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; }
                      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                      if (unlikely(__pyx_kwds_len < 0)) return NULL;
                      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;}
                      __pyx_r = __pyx_pf_7pyarrow_3lib_20BufferedOutputStream_4__reduce_cython__(((struct __pyx_obj_7pyarrow_3lib_BufferedOutputStream *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_20BufferedOutputStream_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_BufferedOutputStream *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__reduce_cython__", 0);

                      /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/
                      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0);
                      __PYX_ERR(7, 2, __pyx_L1_error)

                      /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib.BufferedOutputStream.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_20BufferedOutputStream_7__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_20BufferedOutputStream_6__setstate_cython__, "BufferedOutputStream.__setstate_cython__(self, __pyx_state)");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_20BufferedOutputStream_7__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_20BufferedOutputStream_7__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_20BufferedOutputStream_6__setstate_cython__};
                    static PyObject *__pyx_pw_7pyarrow_3lib_20BufferedOutputStream_7__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[1] = {0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(7, 3, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(7, 3, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(7, 3, __pyx_L3_error)
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(7, 3, __pyx_L3_error) }
                          }
                        } else if (unlikely(__pyx_nargs != 1)) {
                          goto __pyx_L5_argtuple_error;
                        } else {
                          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(7, 3, __pyx_L3_error)
                        }
                        __pyx_v___pyx_state = values[0];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(7, 3, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.BufferedOutputStream.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_20BufferedOutputStream_6__setstate_cython__(((struct __pyx_obj_7pyarrow_3lib_BufferedOutputStream *)__pyx_v_self), __pyx_v___pyx_state);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_20BufferedOutputStream_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_BufferedOutputStream *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__setstate_cython__", 0);

                      /* "(tree fragment)":4
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
*/
                      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0);
                      __PYX_ERR(7, 4, __pyx_L1_error)

                      /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib.BufferedOutputStream.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":1966
 * 
 * 
 * cdef void _cb_transform(transform_func, const shared_ptr[CBuffer]& src,             # <<<<<<<<<<<<<<
 *                         shared_ptr[CBuffer]* dest) except *:
 *     py_dest = transform_func(pyarrow_wrap_buffer(src))
*/

                    static void __pyx_f_7pyarrow_3lib__cb_transform(PyObject *__pyx_v_transform_func, std::shared_ptr< arrow::Buffer>  const &__pyx_v_src, std::shared_ptr< arrow::Buffer>  *__pyx_v_dest) {
                      PyObject *__pyx_v_py_dest = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      PyObject *__pyx_t_3 = NULL;
                      PyObject *__pyx_t_4 = NULL;
                      size_t __pyx_t_5;
                      std::shared_ptr< arrow::Buffer>  __pyx_t_6;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("_cb_transform", 0);

                      /* "pyarrow/io.pxi":1968
 * cdef void _cb_transform(transform_func, const shared_ptr[CBuffer]& src,
 *                         shared_ptr[CBuffer]* dest) except *:
 *     py_dest = transform_func(pyarrow_wrap_buffer(src))             # <<<<<<<<<<<<<<
 *     dest[0] = pyarrow_unwrap_buffer(py_buffer(py_dest))
 * 
*/
                      __pyx_t_2 = NULL;
                      __Pyx_INCREF(__pyx_v_transform_func);
                      __pyx_t_3 = __pyx_v_transform_func; 
                      __pyx_t_4 = pyarrow_wrap_buffer(__pyx_v_src); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 1968, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_4);
                      __pyx_t_5 = 1;
                      #if CYTHON_UNPACK_METHODS
                      if (unlikely(PyMethod_Check(__pyx_t_3))) {
                        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
                        assert(__pyx_t_2);
                        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
                        __Pyx_INCREF(__pyx_t_2);
                        __Pyx_INCREF(__pyx__function);
                        __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
                        __pyx_t_5 = 0;
                      }
                      #endif
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4};
                        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 1968, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __pyx_v_py_dest = __pyx_t_1;
                      __pyx_t_1 = 0;

                      /* "pyarrow/io.pxi":1969
 *                         shared_ptr[CBuffer]* dest) except *:
 *     py_dest = transform_func(pyarrow_wrap_buffer(src))
 *     dest[0] = pyarrow_unwrap_buffer(py_buffer(py_dest))             # <<<<<<<<<<<<<<
 * 
 * 
*/
                      __pyx_t_3 = NULL;
                      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_py_buffer); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 1969, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_4);
                      __pyx_t_5 = 1;
                      #if CYTHON_UNPACK_METHODS
                      if (unlikely(PyMethod_Check(__pyx_t_4))) {
                        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
                        assert(__pyx_t_3);
                        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
                        __Pyx_INCREF(__pyx_t_3);
                        __Pyx_INCREF(__pyx__function);
                        __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
                        __pyx_t_5 = 0;
                      }
                      #endif
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_py_dest};
                        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 1969, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __pyx_t_6 = pyarrow_unwrap_buffer(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 1969, __pyx_L1_error)
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      (__pyx_v_dest[0]) = __pyx_t_6;

                      /* "pyarrow/io.pxi":1966
 * 
 * 
 * cdef void _cb_transform(transform_func, const shared_ptr[CBuffer]& src,             # <<<<<<<<<<<<<<
 *                         shared_ptr[CBuffer]* dest) except *:
 *     py_dest = transform_func(pyarrow_wrap_buffer(src))
*/

                      /* function exit 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_AddTraceback("pyarrow.lib._cb_transform", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_L0:;
                      __Pyx_XDECREF(__pyx_v_py_dest);
                      __Pyx_RefNannyFinishContext();
                    }

                    /* "pyarrow/io.pxi":1984
 *     """
 * 
 *     def __init__(self, NativeFile stream, transform_func):             # <<<<<<<<<<<<<<
 *         self.set_input_stream(TransformInputStream.make_native(
 *             stream.get_input_stream(), transform_func))
*/

                    /* Python wrapper */
                    static int __pyx_pw_7pyarrow_3lib_20TransformInputStream_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
                    static int __pyx_pw_7pyarrow_3lib_20TransformInputStream_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
                      struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_stream = 0;
                      PyObject *__pyx_v_transform_func = 0;
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[2] = {0,0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      int __pyx_r;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_stream,&__pyx_mstate_global->__pyx_n_u_transform_func,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(6, 1984, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  2:
                            values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(6, 1984, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 1984, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(6, 1984, __pyx_L3_error)
                          for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, i); __PYX_ERR(6, 1984, __pyx_L3_error) }
                          }
                        } else if (unlikely(__pyx_nargs != 2)) {
                          goto __pyx_L5_argtuple_error;
                        } else {
                          values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 1984, __pyx_L3_error)
                          values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(6, 1984, __pyx_L3_error)
                        }
                        __pyx_v_stream = ((struct __pyx_obj_7pyarrow_3lib_NativeFile *)values[0]);
                        __pyx_v_transform_func = values[1];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, __pyx_nargs); __PYX_ERR(6, 1984, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.TransformInputStream.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return -1;
                      __pyx_L4_argument_unpacking_done:;
                      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_stream), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NativeFile, 1, "stream", 0))) __PYX_ERR(6, 1984, __pyx_L1_error)
                      __pyx_r = __pyx_pf_7pyarrow_3lib_20TransformInputStream___init__(((struct __pyx_obj_7pyarrow_3lib_TransformInputStream *)__pyx_v_self), __pyx_v_stream, __pyx_v_transform_func);

                      /* function exit code */
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __pyx_r = -1;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      goto __pyx_L7_cleaned_up;
                      __pyx_L0:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __pyx_L7_cleaned_up:;
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static int __pyx_pf_7pyarrow_3lib_20TransformInputStream___init__(struct __pyx_obj_7pyarrow_3lib_TransformInputStream *__pyx_v_self, struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_stream, PyObject *__pyx_v_transform_func) {
                      int __pyx_r;
                      __Pyx_RefNannyDeclarations
                      std::shared_ptr< arrow::io::InputStream>  __pyx_t_1;
                      std::shared_ptr< arrow::io::InputStream>  __pyx_t_2;
                      PyObject *__pyx_t_3 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__init__", 0);

                      /* "pyarrow/io.pxi":1985
 * 
 *     def __init__(self, NativeFile stream, transform_func):
 *         self.set_input_stream(TransformInputStream.make_native(             # <<<<<<<<<<<<<<
 *             stream.get_input_stream(), transform_func))
 *         self.is_readable = True
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "set_input_stream");
                        __PYX_ERR(6, 1985, __pyx_L1_error)
                      }

                      /* "pyarrow/io.pxi":1986
 *     def __init__(self, NativeFile stream, transform_func):
 *         self.set_input_stream(TransformInputStream.make_native(
 *             stream.get_input_stream(), transform_func))             # <<<<<<<<<<<<<<
 *         self.is_readable = True
 * 
*/
                      if (unlikely(((PyObject *)__pyx_v_stream) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get_input_stream");
                        __PYX_ERR(6, 1986, __pyx_L1_error)
                      }
                      __pyx_t_1 = ((struct __pyx_vtabstruct_7pyarrow_3lib_NativeFile *)__pyx_v_stream->__pyx_vtab)->get_input_stream(__pyx_v_stream); if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 1986, __pyx_L1_error)

                      /* "pyarrow/io.pxi":1985
 * 
 *     def __init__(self, NativeFile stream, transform_func):
 *         self.set_input_stream(TransformInputStream.make_native(             # <<<<<<<<<<<<<<
 *             stream.get_input_stream(), transform_func))
 *         self.is_readable = True
*/
                      __pyx_t_2 = __pyx_f_7pyarrow_3lib_20TransformInputStream_make_native(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_1), __pyx_v_transform_func); if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 1985, __pyx_L1_error)
                      __pyx_t_3 = ((struct __pyx_vtabstruct_7pyarrow_3lib_TransformInputStream *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.set_input_stream(((struct __pyx_obj_7pyarrow_3lib_NativeFile *)__pyx_v_self), __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 1985, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_3);
                      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

                      /* "pyarrow/io.pxi":1987
 *         self.set_input_stream(TransformInputStream.make_native(
 *             stream.get_input_stream(), transform_func))
 *         self.is_readable = True             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "is_readable");
                        __PYX_ERR(6, 1987, __pyx_L1_error)
                      }
                      __pyx_v_self->__pyx_base.is_readable = 1;

                      /* "pyarrow/io.pxi":1984
 *     """
 * 
 *     def __init__(self, NativeFile stream, transform_func):             # <<<<<<<<<<<<<<
 *         self.set_input_stream(TransformInputStream.make_native(
 *             stream.get_input_stream(), transform_func))
*/

                      /* function exit code */
                      __pyx_r = 0;
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_AddTraceback("pyarrow.lib.TransformInputStream.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = -1;
                      __pyx_L0:;
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":1989
 *         self.is_readable = True
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     cdef shared_ptr[CInputStream] make_native(
 *             shared_ptr[CInputStream] stream, transform_func) except *:
*/

                    static std::shared_ptr< arrow::io::InputStream>  __pyx_f_7pyarrow_3lib_20TransformInputStream_make_native(std::shared_ptr< arrow::io::InputStream>  __pyx_v_stream, PyObject *__pyx_v_transform_func) {
                      arrow::py::TransformInputStreamVTable __pyx_v_vtable;
                      std::shared_ptr< arrow::io::InputStream>  __pyx_r;

                      /* "pyarrow/io.pxi":1996
 *             CTransformInputStreamVTable vtable
 * 
 *         vtable.transform = _cb_transform             # <<<<<<<<<<<<<<
 *         return MakeTransformInputStream(stream, move(vtable),
 *                                         transform_func)
*/
                      __pyx_v_vtable.transform = ((std::function<__pyx_t_7pyarrow_8includes_8libarrow_CallbackTransform> )__pyx_f_7pyarrow_3lib__cb_transform);

                      /* "pyarrow/io.pxi":1997
 * 
 *         vtable.transform = _cb_transform
 *         return MakeTransformInputStream(stream, move(vtable),             # <<<<<<<<<<<<<<
 *                                         transform_func)
 * 
*/
                      __pyx_r = arrow::py::MakeTransformInputStream(__pyx_v_stream, cython_std::move<arrow::py::TransformInputStreamVTable>(__pyx_v_vtable), __pyx_v_transform_func);
                      goto __pyx_L0;

                      /* "pyarrow/io.pxi":1989
 *         self.is_readable = True
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     cdef shared_ptr[CInputStream] make_native(
 *             shared_ptr[CInputStream] stream, transform_func) except *:
*/

                      /* function exit code */
                      __pyx_L0:;
                      return __pyx_r;
                    }

                    /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_20TransformInputStream_3__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_20TransformInputStream_2__reduce_cython__, "TransformInputStream.__reduce_cython__(self)");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_20TransformInputStream_3__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_20TransformInputStream_3__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_20TransformInputStream_2__reduce_cython__};
                    static PyObject *__pyx_pw_7pyarrow_3lib_20TransformInputStream_3__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; }
                      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                      if (unlikely(__pyx_kwds_len < 0)) return NULL;
                      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;}
                      __pyx_r = __pyx_pf_7pyarrow_3lib_20TransformInputStream_2__reduce_cython__(((struct __pyx_obj_7pyarrow_3lib_TransformInputStream *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_20TransformInputStream_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_TransformInputStream *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__reduce_cython__", 0);

                      /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/
                      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0);
                      __PYX_ERR(7, 2, __pyx_L1_error)

                      /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib.TransformInputStream.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_20TransformInputStream_5__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_20TransformInputStream_4__setstate_cython__, "TransformInputStream.__setstate_cython__(self, __pyx_state)");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_20TransformInputStream_5__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_20TransformInputStream_5__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_20TransformInputStream_4__setstate_cython__};
                    static PyObject *__pyx_pw_7pyarrow_3lib_20TransformInputStream_5__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[1] = {0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(7, 3, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(7, 3, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(7, 3, __pyx_L3_error)
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(7, 3, __pyx_L3_error) }
                          }
                        } else if (unlikely(__pyx_nargs != 1)) {
                          goto __pyx_L5_argtuple_error;
                        } else {
                          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(7, 3, __pyx_L3_error)
                        }
                        __pyx_v___pyx_state = values[0];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(7, 3, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.TransformInputStream.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_20TransformInputStream_4__setstate_cython__(((struct __pyx_obj_7pyarrow_3lib_TransformInputStream *)__pyx_v_self), __pyx_v___pyx_state);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_20TransformInputStream_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_TransformInputStream *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__setstate_cython__", 0);

                      /* "(tree fragment)":4
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
*/
                      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0);
                      __PYX_ERR(7, 4, __pyx_L1_error)

                      /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib.TransformInputStream.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":2003
 * class Transcoder:
 * 
 *     def __init__(self, decoder, encoder):             # <<<<<<<<<<<<<<
 *         self._decoder = decoder
 *         self._encoder = encoder
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_10Transcoder_1__init__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_10Transcoder___init__, "Transcoder.__init__(self, decoder, encoder)");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_10Transcoder_1__init__ = {"__init__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10Transcoder_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10Transcoder___init__};
                    static PyObject *__pyx_pw_7pyarrow_3lib_10Transcoder_1__init__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      PyObject *__pyx_v_self = 0;
                      PyObject *__pyx_v_decoder = 0;
                      PyObject *__pyx_v_encoder = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[3] = {0,0,0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_decoder,&__pyx_mstate_global->__pyx_n_u_encoder,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(6, 2003, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  3:
                            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(6, 2003, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  2:
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(6, 2003, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 2003, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(6, 2003, __pyx_L3_error)
                          for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, i); __PYX_ERR(6, 2003, __pyx_L3_error) }
                          }
                        } else if (unlikely(__pyx_nargs != 3)) {
                          goto __pyx_L5_argtuple_error;
                        } else {
                          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 2003, __pyx_L3_error)
                          values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(6, 2003, __pyx_L3_error)
                          values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(6, 2003, __pyx_L3_error)
                        }
                        __pyx_v_self = values[0];
                        __pyx_v_decoder = values[1];
                        __pyx_v_encoder = values[2];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, __pyx_nargs); __PYX_ERR(6, 2003, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.Transcoder.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_10Transcoder___init__(__pyx_self, __pyx_v_self, __pyx_v_decoder, __pyx_v_encoder);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_10Transcoder___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_decoder, PyObject *__pyx_v_encoder) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__init__", 0);

                      /* "pyarrow/io.pxi":2004
 * 
 *     def __init__(self, decoder, encoder):
 *         self._decoder = decoder             # <<<<<<<<<<<<<<
 *         self._encoder = encoder
 * 
*/
                      if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_decoder_2, __pyx_v_decoder) < (0)) __PYX_ERR(6, 2004, __pyx_L1_error)

                      /* "pyarrow/io.pxi":2005
 *     def __init__(self, decoder, encoder):
 *         self._decoder = decoder
 *         self._encoder = encoder             # <<<<<<<<<<<<<<
 * 
 *     def __call__(self, buf):
*/
                      if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_encoder_2, __pyx_v_encoder) < (0)) __PYX_ERR(6, 2005, __pyx_L1_error)

                      /* "pyarrow/io.pxi":2003
 * class Transcoder:
 * 
 *     def __init__(self, decoder, encoder):             # <<<<<<<<<<<<<<
 *         self._decoder = decoder
 *         self._encoder = encoder
*/

                      /* function exit code */
                      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib.Transcoder.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":2007
 *         self._encoder = encoder
 * 
 *     def __call__(self, buf):             # <<<<<<<<<<<<<<
 *         final = len(buf) == 0
 *         return self._encoder.encode(self._decoder.decode(buf, final), final)
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_10Transcoder_3__call__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_10Transcoder_2__call__, "Transcoder.__call__(self, buf)");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_10Transcoder_3__call__ = {"__call__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10Transcoder_3__call__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10Transcoder_2__call__};
                    static PyObject *__pyx_pw_7pyarrow_3lib_10Transcoder_3__call__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      PyObject *__pyx_v_self = 0;
                      PyObject *__pyx_v_buf = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[2] = {0,0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__call__ (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_buf,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(6, 2007, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  2:
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(6, 2007, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 2007, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__call__", 0) < (0)) __PYX_ERR(6, 2007, __pyx_L3_error)
                          for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__call__", 1, 2, 2, i); __PYX_ERR(6, 2007, __pyx_L3_error) }
                          }
                        } else if (unlikely(__pyx_nargs != 2)) {
                          goto __pyx_L5_argtuple_error;
                        } else {
                          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 2007, __pyx_L3_error)
                          values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(6, 2007, __pyx_L3_error)
                        }
                        __pyx_v_self = values[0];
                        __pyx_v_buf = values[1];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("__call__", 1, 2, 2, __pyx_nargs); __PYX_ERR(6, 2007, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.Transcoder.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_10Transcoder_2__call__(__pyx_self, __pyx_v_self, __pyx_v_buf);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_10Transcoder_2__call__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_buf) {
                      PyObject *__pyx_v_final = NULL;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      Py_ssize_t __pyx_t_1;
                      PyObject *__pyx_t_2 = NULL;
                      PyObject *__pyx_t_3 = NULL;
                      PyObject *__pyx_t_4 = NULL;
                      PyObject *__pyx_t_5 = NULL;
                      PyObject *__pyx_t_6 = NULL;
                      PyObject *__pyx_t_7 = NULL;
                      size_t __pyx_t_8;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__call__", 0);

                      /* "pyarrow/io.pxi":2008
 * 
 *     def __call__(self, buf):
 *         final = len(buf) == 0             # <<<<<<<<<<<<<<
 *         return self._encoder.encode(self._decoder.decode(buf, final), final)
 * 
*/
                      __pyx_t_1 = PyObject_Length(__pyx_v_buf); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(6, 2008, __pyx_L1_error)
                      __pyx_t_2 = __Pyx_PyBool_FromLong((__pyx_t_1 == 0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 2008, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_2);
                      __pyx_v_final = __pyx_t_2;
                      __pyx_t_2 = 0;

                      /* "pyarrow/io.pxi":2009
 *     def __call__(self, buf):
 *         final = len(buf) == 0
 *         return self._encoder.encode(self._decoder.decode(buf, final), final)             # <<<<<<<<<<<<<<
 * 
 * 
*/
                      __Pyx_XDECREF(__pyx_r);
                      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_encoder_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 2009, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_4);
                      __pyx_t_3 = __pyx_t_4;
                      __Pyx_INCREF(__pyx_t_3);
                      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_decoder_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(6, 2009, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_7);
                      __pyx_t_6 = __pyx_t_7;
                      __Pyx_INCREF(__pyx_t_6);
                      __pyx_t_8 = 0;
                      {
                        PyObject *__pyx_callargs[3] = {__pyx_t_6, __pyx_v_buf, __pyx_v_final};
                        __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_decode, __pyx_callargs+__pyx_t_8, (3-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
                        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
                        if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 2009, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_5);
                      }
                      __pyx_t_8 = 0;
                      {
                        PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_t_5, __pyx_v_final};
                        __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_encode, __pyx_callargs+__pyx_t_8, (3-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                        if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 2009, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_2);
                      }
                      __pyx_r = __pyx_t_2;
                      __pyx_t_2 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/io.pxi":2007
 *         self._encoder = encoder
 * 
 *     def __call__(self, buf):             # <<<<<<<<<<<<<<
 *         final = len(buf) == 0
 *         return self._encoder.encode(self._decoder.decode(buf, final), final)
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_XDECREF(__pyx_t_4);
                      __Pyx_XDECREF(__pyx_t_5);
                      __Pyx_XDECREF(__pyx_t_6);
                      __Pyx_XDECREF(__pyx_t_7);
                      __Pyx_AddTraceback("pyarrow.lib.Transcoder.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XDECREF(__pyx_v_final);
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":2012
 * 
 * 
 * cdef shared_ptr[function[StreamWrapFunc]] make_streamwrap_func(             # <<<<<<<<<<<<<<
 *         src_encoding, dest_encoding) except *:
 *     """
*/

                    static std::shared_ptr<std::function<__pyx_t_7pyarrow_8includes_8libarrow_StreamWrapFunc> >  __pyx_f_7pyarrow_3lib_make_streamwrap_func(PyObject *__pyx_v_src_encoding, PyObject *__pyx_v_dest_encoding) {
                      arrow::py::TransformInputStreamVTable __pyx_v_vtable;
                      PyObject *__pyx_v_src_codec = NULL;
                      PyObject *__pyx_v_dest_codec = NULL;
                      std::shared_ptr<std::function<__pyx_t_7pyarrow_8includes_8libarrow_StreamWrapFunc> >  __pyx_r;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      PyObject *__pyx_t_3 = NULL;
                      PyObject *__pyx_t_4 = NULL;
                      size_t __pyx_t_5;
                      PyObject *__pyx_t_6 = NULL;
                      PyObject *__pyx_t_7 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("make_streamwrap_func", 0);

                      /* "pyarrow/io.pxi":2031
 *         CTransformInputStreamVTable vtable
 * 
 *     vtable.transform = _cb_transform             # <<<<<<<<<<<<<<
 *     src_codec = codecs.lookup(src_encoding)
 *     dest_codec = codecs.lookup(dest_encoding)
*/
                      __pyx_v_vtable.transform = ((std::function<__pyx_t_7pyarrow_8includes_8libarrow_CallbackTransform> )__pyx_f_7pyarrow_3lib__cb_transform);

                      /* "pyarrow/io.pxi":2032
 * 
 *     vtable.transform = _cb_transform
 *     src_codec = codecs.lookup(src_encoding)             # <<<<<<<<<<<<<<
 *     dest_codec = codecs.lookup(dest_encoding)
 *     return MakeStreamTransformFunc(move(vtable),
*/
                      __pyx_t_2 = NULL;
                      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_codecs); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 2032, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_3);
                      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_lookup); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 2032, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_4);
                      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                      __pyx_t_5 = 1;
                      #if CYTHON_UNPACK_METHODS
                      if (unlikely(PyMethod_Check(__pyx_t_4))) {
                        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
                        assert(__pyx_t_2);
                        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
                        __Pyx_INCREF(__pyx_t_2);
                        __Pyx_INCREF(__pyx__function);
                        __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
                        __pyx_t_5 = 0;
                      }
                      #endif
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_src_encoding};
                        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 2032, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __pyx_v_src_codec = __pyx_t_1;
                      __pyx_t_1 = 0;

                      /* "pyarrow/io.pxi":2033
 *     vtable.transform = _cb_transform
 *     src_codec = codecs.lookup(src_encoding)
 *     dest_codec = codecs.lookup(dest_encoding)             # <<<<<<<<<<<<<<
 *     return MakeStreamTransformFunc(move(vtable),
 *                                    Transcoder(src_codec.incrementaldecoder(),
*/
                      __pyx_t_4 = NULL;
                      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_codecs); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 2033, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_2);
                      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_lookup); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 2033, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_3);
                      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                      __pyx_t_5 = 1;
                      #if CYTHON_UNPACK_METHODS
                      if (unlikely(PyMethod_Check(__pyx_t_3))) {
                        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
                        assert(__pyx_t_4);
                        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
                        __Pyx_INCREF(__pyx_t_4);
                        __Pyx_INCREF(__pyx__function);
                        __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
                        __pyx_t_5 = 0;
                      }
                      #endif
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_dest_encoding};
                        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __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(6, 2033, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __pyx_v_dest_codec = __pyx_t_1;
                      __pyx_t_1 = 0;

                      /* "pyarrow/io.pxi":2035
 *     dest_codec = codecs.lookup(dest_encoding)
 *     return MakeStreamTransformFunc(move(vtable),
 *                                    Transcoder(src_codec.incrementaldecoder(),             # <<<<<<<<<<<<<<
 *                                    dest_codec.incrementalencoder()))
 * 
*/
                      __pyx_t_3 = NULL;
                      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Transcoder); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 2035, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_4);
                      __pyx_t_6 = __pyx_v_src_codec;
                      __Pyx_INCREF(__pyx_t_6);
                      __pyx_t_5 = 0;
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
                        __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_incrementaldecoder, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
                        if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 2035, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_2);
                      }

                      /* "pyarrow/io.pxi":2036
 *     return MakeStreamTransformFunc(move(vtable),
 *                                    Transcoder(src_codec.incrementaldecoder(),
 *                                    dest_codec.incrementalencoder()))             # <<<<<<<<<<<<<<
 * 
 * 
*/
                      __pyx_t_7 = __pyx_v_dest_codec;
                      __Pyx_INCREF(__pyx_t_7);
                      __pyx_t_5 = 0;
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL};
                        __pyx_t_6 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_incrementalencoder, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
                        if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 2036, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_6);
                      }
                      __pyx_t_5 = 1;
                      #if CYTHON_UNPACK_METHODS
                      if (unlikely(PyMethod_Check(__pyx_t_4))) {
                        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
                        assert(__pyx_t_3);
                        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
                        __Pyx_INCREF(__pyx_t_3);
                        __Pyx_INCREF(__pyx__function);
                        __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
                        __pyx_t_5 = 0;
                      }
                      #endif
                      {
                        PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_t_2, __pyx_t_6};
                        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 2035, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }

                      /* "pyarrow/io.pxi":2034
 *     src_codec = codecs.lookup(src_encoding)
 *     dest_codec = codecs.lookup(dest_encoding)
 *     return MakeStreamTransformFunc(move(vtable),             # <<<<<<<<<<<<<<
 *                                    Transcoder(src_codec.incrementaldecoder(),
 *                                    dest_codec.incrementalencoder()))
*/
                      __pyx_r = arrow::py::MakeStreamTransformFunc(cython_std::move<arrow::py::TransformInputStreamVTable>(__pyx_v_vtable), __pyx_t_1);
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/io.pxi":2012
 * 
 * 
 * cdef shared_ptr[function[StreamWrapFunc]] make_streamwrap_func(             # <<<<<<<<<<<<<<
 *         src_encoding, dest_encoding) except *:
 *     """
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_XDECREF(__pyx_t_4);
                      __Pyx_XDECREF(__pyx_t_6);
                      __Pyx_XDECREF(__pyx_t_7);
                      __Pyx_AddTraceback("pyarrow.lib.make_streamwrap_func", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_pretend_to_initialize(&__pyx_r);
                      __pyx_L0:;
                      __Pyx_XDECREF(__pyx_v_src_codec);
                      __Pyx_XDECREF(__pyx_v_dest_codec);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":2039
 * 
 * 
 * def transcoding_input_stream(stream, src_encoding, dest_encoding):             # <<<<<<<<<<<<<<
 *     """
 *     Add a transcoding transformation to the stream.
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_247transcoding_input_stream(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_246transcoding_input_stream, "transcoding_input_stream(stream, src_encoding, dest_encoding)\n\nAdd a transcoding transformation to the stream.\nIncoming data will be decoded according to ``src_encoding`` and\nthen re-encoded according to ``dest_encoding``.\n\nParameters\n----------\nstream : NativeFile\n    The stream to which the transformation should be applied.\nsrc_encoding : str\n    The codec to use when reading data.\ndest_encoding : str\n    The codec to use for emitted data.");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_247transcoding_input_stream = {"transcoding_input_stream", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_247transcoding_input_stream, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_246transcoding_input_stream};
                    static PyObject *__pyx_pw_7pyarrow_3lib_247transcoding_input_stream(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      PyObject *__pyx_v_stream = 0;
                      PyObject *__pyx_v_src_encoding = 0;
                      PyObject *__pyx_v_dest_encoding = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[3] = {0,0,0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("transcoding_input_stream (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_stream,&__pyx_mstate_global->__pyx_n_u_src_encoding,&__pyx_mstate_global->__pyx_n_u_dest_encoding,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(6, 2039, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  3:
                            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(6, 2039, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  2:
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(6, 2039, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 2039, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "transcoding_input_stream", 0) < (0)) __PYX_ERR(6, 2039, __pyx_L3_error)
                          for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("transcoding_input_stream", 1, 3, 3, i); __PYX_ERR(6, 2039, __pyx_L3_error) }
                          }
                        } else if (unlikely(__pyx_nargs != 3)) {
                          goto __pyx_L5_argtuple_error;
                        } else {
                          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 2039, __pyx_L3_error)
                          values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(6, 2039, __pyx_L3_error)
                          values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(6, 2039, __pyx_L3_error)
                        }
                        __pyx_v_stream = values[0];
                        __pyx_v_src_encoding = values[1];
                        __pyx_v_dest_encoding = values[2];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("transcoding_input_stream", 1, 3, 3, __pyx_nargs); __PYX_ERR(6, 2039, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.transcoding_input_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_246transcoding_input_stream(__pyx_self, __pyx_v_stream, __pyx_v_src_encoding, __pyx_v_dest_encoding);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_246transcoding_input_stream(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_stream, PyObject *__pyx_v_src_encoding, PyObject *__pyx_v_dest_encoding) {
                      PyObject *__pyx_v_src_codec = NULL;
                      PyObject *__pyx_v_dest_codec = NULL;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      PyObject *__pyx_t_3 = NULL;
                      PyObject *__pyx_t_4 = NULL;
                      size_t __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;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("transcoding_input_stream", 0);

                      /* "pyarrow/io.pxi":2054
 *         The codec to use for emitted data.
 *     """
 *     src_codec = codecs.lookup(src_encoding)             # <<<<<<<<<<<<<<
 *     dest_codec = codecs.lookup(dest_encoding)
 *     if src_codec.name == dest_codec.name:
*/
                      __pyx_t_2 = NULL;
                      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_codecs); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 2054, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_3);
                      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_lookup); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 2054, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_4);
                      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                      __pyx_t_5 = 1;
                      #if CYTHON_UNPACK_METHODS
                      if (unlikely(PyMethod_Check(__pyx_t_4))) {
                        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
                        assert(__pyx_t_2);
                        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
                        __Pyx_INCREF(__pyx_t_2);
                        __Pyx_INCREF(__pyx__function);
                        __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
                        __pyx_t_5 = 0;
                      }
                      #endif
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_src_encoding};
                        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 2054, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __pyx_v_src_codec = __pyx_t_1;
                      __pyx_t_1 = 0;

                      /* "pyarrow/io.pxi":2055
 *     """
 *     src_codec = codecs.lookup(src_encoding)
 *     dest_codec = codecs.lookup(dest_encoding)             # <<<<<<<<<<<<<<
 *     if src_codec.name == dest_codec.name:
 *         # Avoid losing performance on no-op transcoding
*/
                      __pyx_t_4 = NULL;
                      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_codecs); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 2055, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_2);
                      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_lookup); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 2055, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_3);
                      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                      __pyx_t_5 = 1;
                      #if CYTHON_UNPACK_METHODS
                      if (unlikely(PyMethod_Check(__pyx_t_3))) {
                        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
                        assert(__pyx_t_4);
                        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
                        __Pyx_INCREF(__pyx_t_4);
                        __Pyx_INCREF(__pyx__function);
                        __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
                        __pyx_t_5 = 0;
                      }
                      #endif
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_dest_encoding};
                        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __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(6, 2055, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __pyx_v_dest_codec = __pyx_t_1;
                      __pyx_t_1 = 0;

                      /* "pyarrow/io.pxi":2056
 *     src_codec = codecs.lookup(src_encoding)
 *     dest_codec = codecs.lookup(dest_encoding)
 *     if src_codec.name == dest_codec.name:             # <<<<<<<<<<<<<<
 *         # Avoid losing performance on no-op transcoding
 *         # (encoding errors won't be detected)
*/
                      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_src_codec, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 2056, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_dest_codec, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 2056, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_3);
                      __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 2056, __pyx_L1_error)
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(6, 2056, __pyx_L1_error)
                      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                      if (__pyx_t_6) {

                        /* "pyarrow/io.pxi":2059
 *         # Avoid losing performance on no-op transcoding
 *         # (encoding errors won't be detected)
 *         return stream             # <<<<<<<<<<<<<<
 *     return TransformInputStream(stream,
 *                                 Transcoder(src_codec.incrementaldecoder(),
*/
                        __Pyx_XDECREF(__pyx_r);
                        __Pyx_INCREF(__pyx_v_stream);
                        __pyx_r = __pyx_v_stream;
                        goto __pyx_L0;

                        /* "pyarrow/io.pxi":2056
 *     src_codec = codecs.lookup(src_encoding)
 *     dest_codec = codecs.lookup(dest_encoding)
 *     if src_codec.name == dest_codec.name:             # <<<<<<<<<<<<<<
 *         # Avoid losing performance on no-op transcoding
 *         # (encoding errors won't be detected)
*/
                      }

                      /* "pyarrow/io.pxi":2060
 *         # (encoding errors won't be detected)
 *         return stream
 *     return TransformInputStream(stream,             # <<<<<<<<<<<<<<
 *                                 Transcoder(src_codec.incrementaldecoder(),
 *                                            dest_codec.incrementalencoder()))
*/
                      __Pyx_XDECREF(__pyx_r);
                      __pyx_t_3 = NULL;

                      /* "pyarrow/io.pxi":2061
 *         return stream
 *     return TransformInputStream(stream,
 *                                 Transcoder(src_codec.incrementaldecoder(),             # <<<<<<<<<<<<<<
 *                                            dest_codec.incrementalencoder()))
 * 
*/
                      __pyx_t_2 = NULL;
                      __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_Transcoder); if (unlikely(!__pyx_t_7)) __PYX_ERR(6, 2061, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_7);
                      __pyx_t_9 = __pyx_v_src_codec;
                      __Pyx_INCREF(__pyx_t_9);
                      __pyx_t_5 = 0;
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL};
                        __pyx_t_8 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_incrementaldecoder, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
                        if (unlikely(!__pyx_t_8)) __PYX_ERR(6, 2061, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_8);
                      }

                      /* "pyarrow/io.pxi":2062
 *     return TransformInputStream(stream,
 *                                 Transcoder(src_codec.incrementaldecoder(),
 *                                            dest_codec.incrementalencoder()))             # <<<<<<<<<<<<<<
 * 
 * 
*/
                      __pyx_t_10 = __pyx_v_dest_codec;
                      __Pyx_INCREF(__pyx_t_10);
                      __pyx_t_5 = 0;
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_10, NULL};
                        __pyx_t_9 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_incrementalencoder, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                        if (unlikely(!__pyx_t_9)) __PYX_ERR(6, 2062, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_9);
                      }
                      __pyx_t_5 = 1;
                      #if CYTHON_UNPACK_METHODS
                      if (unlikely(PyMethod_Check(__pyx_t_7))) {
                        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_7);
                        assert(__pyx_t_2);
                        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
                        __Pyx_INCREF(__pyx_t_2);
                        __Pyx_INCREF(__pyx__function);
                        __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
                        __pyx_t_5 = 0;
                      }
                      #endif
                      {
                        PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_t_8, __pyx_t_9};
                        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
                        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 2061, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __pyx_t_5 = 1;
                      {
                        PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_stream, __pyx_t_1};
                        __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_TransformInputStream, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                        if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 2060, __pyx_L1_error)
                        __Pyx_GOTREF((PyObject *)__pyx_t_4);
                      }
                      __pyx_r = ((PyObject *)__pyx_t_4);
                      __pyx_t_4 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/io.pxi":2039
 * 
 * 
 * def transcoding_input_stream(stream, src_encoding, dest_encoding):             # <<<<<<<<<<<<<<
 *     """
 *     Add a transcoding transformation to the stream.
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_XDECREF(__pyx_t_4);
                      __Pyx_XDECREF(__pyx_t_7);
                      __Pyx_XDECREF(__pyx_t_8);
                      __Pyx_XDECREF(__pyx_t_9);
                      __Pyx_XDECREF(__pyx_t_10);
                      __Pyx_AddTraceback("pyarrow.lib.transcoding_input_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XDECREF(__pyx_v_src_codec);
                      __Pyx_XDECREF(__pyx_v_dest_codec);
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":2065
 * 
 * 
 * cdef shared_ptr[CInputStream] native_transcoding_input_stream(             # <<<<<<<<<<<<<<
 *         shared_ptr[CInputStream] stream, src_encoding,
 *         dest_encoding) except *:
*/

                    static std::shared_ptr< arrow::io::InputStream>  __pyx_f_7pyarrow_3lib_native_transcoding_input_stream(std::shared_ptr< arrow::io::InputStream>  __pyx_v_stream, PyObject *__pyx_v_src_encoding, PyObject *__pyx_v_dest_encoding) {
                      PyObject *__pyx_v_src_codec = NULL;
                      PyObject *__pyx_v_dest_codec = NULL;
                      std::shared_ptr< arrow::io::InputStream>  __pyx_r;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      PyObject *__pyx_t_3 = NULL;
                      PyObject *__pyx_t_4 = NULL;
                      size_t __pyx_t_5;
                      int __pyx_t_6;
                      PyObject *__pyx_t_7 = NULL;
                      PyObject *__pyx_t_8 = NULL;
                      std::shared_ptr< arrow::io::InputStream>  __pyx_t_9;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("native_transcoding_input_stream", 0);

                      /* "pyarrow/io.pxi":2068
 *         shared_ptr[CInputStream] stream, src_encoding,
 *         dest_encoding) except *:
 *     src_codec = codecs.lookup(src_encoding)             # <<<<<<<<<<<<<<
 *     dest_codec = codecs.lookup(dest_encoding)
 *     if src_codec.name == dest_codec.name:
*/
                      __pyx_t_2 = NULL;
                      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_codecs); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 2068, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_3);
                      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_lookup); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 2068, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_4);
                      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                      __pyx_t_5 = 1;
                      #if CYTHON_UNPACK_METHODS
                      if (unlikely(PyMethod_Check(__pyx_t_4))) {
                        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
                        assert(__pyx_t_2);
                        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
                        __Pyx_INCREF(__pyx_t_2);
                        __Pyx_INCREF(__pyx__function);
                        __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
                        __pyx_t_5 = 0;
                      }
                      #endif
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_src_encoding};
                        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 2068, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __pyx_v_src_codec = __pyx_t_1;
                      __pyx_t_1 = 0;

                      /* "pyarrow/io.pxi":2069
 *         dest_encoding) except *:
 *     src_codec = codecs.lookup(src_encoding)
 *     dest_codec = codecs.lookup(dest_encoding)             # <<<<<<<<<<<<<<
 *     if src_codec.name == dest_codec.name:
 *         # Avoid losing performance on no-op transcoding
*/
                      __pyx_t_4 = NULL;
                      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_codecs); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 2069, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_2);
                      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_lookup); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 2069, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_3);
                      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                      __pyx_t_5 = 1;
                      #if CYTHON_UNPACK_METHODS
                      if (unlikely(PyMethod_Check(__pyx_t_3))) {
                        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
                        assert(__pyx_t_4);
                        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
                        __Pyx_INCREF(__pyx_t_4);
                        __Pyx_INCREF(__pyx__function);
                        __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
                        __pyx_t_5 = 0;
                      }
                      #endif
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_dest_encoding};
                        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __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(6, 2069, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __pyx_v_dest_codec = __pyx_t_1;
                      __pyx_t_1 = 0;

                      /* "pyarrow/io.pxi":2070
 *     src_codec = codecs.lookup(src_encoding)
 *     dest_codec = codecs.lookup(dest_encoding)
 *     if src_codec.name == dest_codec.name:             # <<<<<<<<<<<<<<
 *         # Avoid losing performance on no-op transcoding
 *         # (encoding errors won't be detected)
*/
                      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_src_codec, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 2070, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_dest_codec, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 2070, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_3);
                      __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 2070, __pyx_L1_error)
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(6, 2070, __pyx_L1_error)
                      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                      if (__pyx_t_6) {

                        /* "pyarrow/io.pxi":2073
 *         # Avoid losing performance on no-op transcoding
 *         # (encoding errors won't be detected)
 *         return stream             # <<<<<<<<<<<<<<
 *     return TransformInputStream.make_native(
 *         stream, Transcoder(src_codec.incrementaldecoder(),
*/
                        __pyx_r = __pyx_v_stream;
                        goto __pyx_L0;

                        /* "pyarrow/io.pxi":2070
 *     src_codec = codecs.lookup(src_encoding)
 *     dest_codec = codecs.lookup(dest_encoding)
 *     if src_codec.name == dest_codec.name:             # <<<<<<<<<<<<<<
 *         # Avoid losing performance on no-op transcoding
 *         # (encoding errors won't be detected)
*/
                      }

                      /* "pyarrow/io.pxi":2075
 *         return stream
 *     return TransformInputStream.make_native(
 *         stream, Transcoder(src_codec.incrementaldecoder(),             # <<<<<<<<<<<<<<
 *                            dest_codec.incrementalencoder()))
 * 
*/
                      __pyx_t_3 = NULL;
                      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_Transcoder); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 2075, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_t_7 = __pyx_v_src_codec;
                      __Pyx_INCREF(__pyx_t_7);
                      __pyx_t_5 = 0;
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL};
                        __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_incrementaldecoder, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
                        if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 2075, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_2);
                      }

                      /* "pyarrow/io.pxi":2076
 *     return TransformInputStream.make_native(
 *         stream, Transcoder(src_codec.incrementaldecoder(),
 *                            dest_codec.incrementalencoder()))             # <<<<<<<<<<<<<<
 * 
 * 
*/
                      __pyx_t_8 = __pyx_v_dest_codec;
                      __Pyx_INCREF(__pyx_t_8);
                      __pyx_t_5 = 0;
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_8, NULL};
                        __pyx_t_7 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_incrementalencoder, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
                        if (unlikely(!__pyx_t_7)) __PYX_ERR(6, 2076, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_7);
                      }
                      __pyx_t_5 = 1;
                      #if CYTHON_UNPACK_METHODS
                      if (unlikely(PyMethod_Check(__pyx_t_1))) {
                        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
                        assert(__pyx_t_3);
                        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_1);
                        __Pyx_INCREF(__pyx_t_3);
                        __Pyx_INCREF(__pyx__function);
                        __Pyx_DECREF_SET(__pyx_t_1, __pyx__function);
                        __pyx_t_5 = 0;
                      }
                      #endif
                      {
                        PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_t_2, __pyx_t_7};
                        __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_1, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
                        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                        if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 2075, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_4);
                      }

                      /* "pyarrow/io.pxi":2074
 *         # (encoding errors won't be detected)
 *         return stream
 *     return TransformInputStream.make_native(             # <<<<<<<<<<<<<<
 *         stream, Transcoder(src_codec.incrementaldecoder(),
 *                            dest_codec.incrementalencoder()))
*/
                      __pyx_t_9 = __pyx_f_7pyarrow_3lib_20TransformInputStream_make_native(__pyx_v_stream, __pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 2074, __pyx_L1_error)
                      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                      __pyx_r = __pyx_t_9;
                      goto __pyx_L0;

                      /* "pyarrow/io.pxi":2065
 * 
 * 
 * cdef shared_ptr[CInputStream] native_transcoding_input_stream(             # <<<<<<<<<<<<<<
 *         shared_ptr[CInputStream] stream, src_encoding,
 *         dest_encoding) except *:
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_XDECREF(__pyx_t_4);
                      __Pyx_XDECREF(__pyx_t_7);
                      __Pyx_XDECREF(__pyx_t_8);
                      __Pyx_AddTraceback("pyarrow.lib.native_transcoding_input_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_pretend_to_initialize(&__pyx_r);
                      __pyx_L0:;
                      __Pyx_XDECREF(__pyx_v_src_codec);
                      __Pyx_XDECREF(__pyx_v_dest_codec);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":2079
 * 
 * 
 * def py_buffer(object obj):             # <<<<<<<<<<<<<<
 *     """
 *     Construct an Arrow buffer from a Python bytes-like or buffer-like object
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_249py_buffer(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_248py_buffer, "py_buffer(obj)\n\nConstruct an Arrow buffer from a Python bytes-like or buffer-like object\n\nParameters\n----------\nobj : object\n    the object from which the buffer should be constructed.");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_249py_buffer = {"py_buffer", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_249py_buffer, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_248py_buffer};
                    static PyObject *__pyx_pw_7pyarrow_3lib_249py_buffer(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      PyObject *__pyx_v_obj = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[1] = {0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("py_buffer (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_obj,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(6, 2079, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 2079, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "py_buffer", 0) < (0)) __PYX_ERR(6, 2079, __pyx_L3_error)
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("py_buffer", 1, 1, 1, i); __PYX_ERR(6, 2079, __pyx_L3_error) }
                          }
                        } else if (unlikely(__pyx_nargs != 1)) {
                          goto __pyx_L5_argtuple_error;
                        } else {
                          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 2079, __pyx_L3_error)
                        }
                        __pyx_v_obj = values[0];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("py_buffer", 1, 1, 1, __pyx_nargs); __PYX_ERR(6, 2079, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.py_buffer", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_248py_buffer(__pyx_self, __pyx_v_obj);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_248py_buffer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
                      std::shared_ptr< arrow::Buffer>  __pyx_v_buf;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      std::shared_ptr< arrow::Buffer>  __pyx_t_1;
                      PyObject *__pyx_t_2 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("py_buffer", 0);

                      /* "pyarrow/io.pxi":2089
 *     """
 *     cdef shared_ptr[CBuffer] buf
 *     buf = GetResultValue(PyBuffer.FromPyObject(obj))             # <<<<<<<<<<<<<<
 *     return pyarrow_wrap_buffer(buf)
 * 
*/
                      __pyx_t_1 = arrow::py::GetResultValue<std::shared_ptr< arrow::Buffer> >(arrow::py::PyBuffer::FromPyObject(__pyx_v_obj)); if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 2089, __pyx_L1_error)
                      __pyx_v_buf = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_1);

                      /* "pyarrow/io.pxi":2090
 *     cdef shared_ptr[CBuffer] buf
 *     buf = GetResultValue(PyBuffer.FromPyObject(obj))
 *     return pyarrow_wrap_buffer(buf)             # <<<<<<<<<<<<<<
 * 
 * 
*/
                      __Pyx_XDECREF(__pyx_r);
                      __pyx_t_2 = pyarrow_wrap_buffer(__pyx_v_buf); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 2090, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_2);
                      __pyx_r = __pyx_t_2;
                      __pyx_t_2 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/io.pxi":2079
 * 
 * 
 * def py_buffer(object obj):             # <<<<<<<<<<<<<<
 *     """
 *     Construct an Arrow buffer from a Python bytes-like or buffer-like object
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_AddTraceback("pyarrow.lib.py_buffer", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":2093
 * 
 * 
 * def foreign_buffer(address, size, base=None):             # <<<<<<<<<<<<<<
 *     """
 *     Construct an Arrow buffer with the given *address* and *size*.
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_251foreign_buffer(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_250foreign_buffer, "foreign_buffer(address, size, base=None)\n\nConstruct an Arrow buffer with the given *address* and *size*.\n\nThe buffer will be optionally backed by the Python *base* object, if given.\nThe *base* object will be kept alive as long as this buffer is alive,\nincluding across language boundaries (for example if the buffer is\nreferenced by C++ code).\n\nParameters\n----------\naddress : int\n    The starting address of the buffer. The address can\n    refer to both device or host memory but it must be\n    accessible from device after mapping it with\n    `get_device_address` method.\nsize : int\n    The size of device buffer in bytes.\nbase : {None, object}\n    Object that owns the referenced memory.");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_251foreign_buffer = {"foreign_buffer", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_251foreign_buffer, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_250foreign_buffer};
                    static PyObject *__pyx_pw_7pyarrow_3lib_251foreign_buffer(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      PyObject *__pyx_v_address = 0;
                      PyObject *__pyx_v_size = 0;
                      PyObject *__pyx_v_base = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[3] = {0,0,0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("foreign_buffer (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_address_2,&__pyx_mstate_global->__pyx_n_u_size,&__pyx_mstate_global->__pyx_n_u_base,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(6, 2093, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  3:
                            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(6, 2093, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  2:
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(6, 2093, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 2093, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "foreign_buffer", 0) < (0)) __PYX_ERR(6, 2093, __pyx_L3_error)
                          if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
                          for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("foreign_buffer", 0, 2, 3, i); __PYX_ERR(6, 2093, __pyx_L3_error) }
                          }
                        } else {
                          switch (__pyx_nargs) {
                            case  3:
                            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(6, 2093, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  2:
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(6, 2093, __pyx_L3_error)
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 2093, __pyx_L3_error)
                            break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
                        }
                        __pyx_v_address = values[0];
                        __pyx_v_size = values[1];
                        __pyx_v_base = values[2];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("foreign_buffer", 0, 2, 3, __pyx_nargs); __PYX_ERR(6, 2093, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.foreign_buffer", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_250foreign_buffer(__pyx_self, __pyx_v_address, __pyx_v_size, __pyx_v_base);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_250foreign_buffer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_address, PyObject *__pyx_v_size, PyObject *__pyx_v_base) {
                      uintptr_t __pyx_v_c_addr;
                      int64_t __pyx_v_c_size;
                      std::shared_ptr< arrow::Buffer>  __pyx_v_buf;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      uintptr_t __pyx_t_1;
                      int64_t __pyx_t_2;
                      int __pyx_t_3;
                      PyObject *__pyx_t_4 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("foreign_buffer", 0);

                      /* "pyarrow/io.pxi":2115
 *     """
 *     cdef:
 *         uintptr_t c_addr = address             # <<<<<<<<<<<<<<
 *         int64_t c_size = size
 *         shared_ptr[CBuffer] buf
*/
                      __pyx_t_1 = __Pyx_PyLong_As_size_t(__pyx_v_address); if (unlikely((__pyx_t_1 == ((uintptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(6, 2115, __pyx_L1_error)
                      __pyx_v_c_addr = __pyx_t_1;

                      /* "pyarrow/io.pxi":2116
 *     cdef:
 *         uintptr_t c_addr = address
 *         int64_t c_size = size             # <<<<<<<<<<<<<<
 *         shared_ptr[CBuffer] buf
 * 
*/
                      __pyx_t_2 = __Pyx_PyLong_As_int64_t(__pyx_v_size); if (unlikely((__pyx_t_2 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(6, 2116, __pyx_L1_error)
                      __pyx_v_c_size = __pyx_t_2;

                      /* "pyarrow/io.pxi":2119
 *         shared_ptr[CBuffer] buf
 * 
 *     check_status(PyForeignBuffer.Make(<uint8_t*> c_addr, c_size,             # <<<<<<<<<<<<<<
 *                                       base, &buf))
 *     return pyarrow_wrap_buffer(buf)
*/
                      __pyx_t_3 = __pyx_f_7pyarrow_3lib_check_status(arrow::py::PyForeignBuffer::Make(((uint8_t *)__pyx_v_c_addr), __pyx_v_c_size, __pyx_v_base, (&__pyx_v_buf))); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(6, 2119, __pyx_L1_error)

                      /* "pyarrow/io.pxi":2121
 *     check_status(PyForeignBuffer.Make(<uint8_t*> c_addr, c_size,
 *                                       base, &buf))
 *     return pyarrow_wrap_buffer(buf)             # <<<<<<<<<<<<<<
 * 
 * 
*/
                      __Pyx_XDECREF(__pyx_r);
                      __pyx_t_4 = pyarrow_wrap_buffer(__pyx_v_buf); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 2121, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_4);
                      __pyx_r = __pyx_t_4;
                      __pyx_t_4 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/io.pxi":2093
 * 
 * 
 * def foreign_buffer(address, size, base=None):             # <<<<<<<<<<<<<<
 *     """
 *     Construct an Arrow buffer with the given *address* and *size*.
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_4);
                      __Pyx_AddTraceback("pyarrow.lib.foreign_buffer", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":2124
 * 
 * 
 * def as_buffer(object o):             # <<<<<<<<<<<<<<
 *     if isinstance(o, Buffer):
 *         return o
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_253as_buffer(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_252as_buffer, "as_buffer(o)");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_253as_buffer = {"as_buffer", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_253as_buffer, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_252as_buffer};
                    static PyObject *__pyx_pw_7pyarrow_3lib_253as_buffer(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      PyObject *__pyx_v_o = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[1] = {0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("as_buffer (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_o,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(6, 2124, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 2124, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "as_buffer", 0) < (0)) __PYX_ERR(6, 2124, __pyx_L3_error)
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("as_buffer", 1, 1, 1, i); __PYX_ERR(6, 2124, __pyx_L3_error) }
                          }
                        } else if (unlikely(__pyx_nargs != 1)) {
                          goto __pyx_L5_argtuple_error;
                        } else {
                          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 2124, __pyx_L3_error)
                        }
                        __pyx_v_o = values[0];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("as_buffer", 1, 1, 1, __pyx_nargs); __PYX_ERR(6, 2124, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.as_buffer", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_252as_buffer(__pyx_self, __pyx_v_o);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_252as_buffer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_o) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_t_1;
                      PyObject *__pyx_t_2 = NULL;
                      PyObject *__pyx_t_3 = NULL;
                      PyObject *__pyx_t_4 = NULL;
                      size_t __pyx_t_5;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("as_buffer", 0);

                      /* "pyarrow/io.pxi":2125
 * 
 * def as_buffer(object o):
 *     if isinstance(o, Buffer):             # <<<<<<<<<<<<<<
 *         return o
 *     return py_buffer(o)
*/
                      __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_o, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Buffer); 
                      if (__pyx_t_1) {

                        /* "pyarrow/io.pxi":2126
 * def as_buffer(object o):
 *     if isinstance(o, Buffer):
 *         return o             # <<<<<<<<<<<<<<
 *     return py_buffer(o)
 * 
*/
                        __Pyx_XDECREF(__pyx_r);
                        __Pyx_INCREF(__pyx_v_o);
                        __pyx_r = __pyx_v_o;
                        goto __pyx_L0;

                        /* "pyarrow/io.pxi":2125
 * 
 * def as_buffer(object o):
 *     if isinstance(o, Buffer):             # <<<<<<<<<<<<<<
 *         return o
 *     return py_buffer(o)
*/
                      }

                      /* "pyarrow/io.pxi":2127
 *     if isinstance(o, Buffer):
 *         return o
 *     return py_buffer(o)             # <<<<<<<<<<<<<<
 * 
 * 
*/
                      __Pyx_XDECREF(__pyx_r);
                      __pyx_t_3 = NULL;
                      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_py_buffer); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 2127, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_4);
                      __pyx_t_5 = 1;
                      #if CYTHON_UNPACK_METHODS
                      if (unlikely(PyMethod_Check(__pyx_t_4))) {
                        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
                        assert(__pyx_t_3);
                        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
                        __Pyx_INCREF(__pyx_t_3);
                        __Pyx_INCREF(__pyx__function);
                        __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
                        __pyx_t_5 = 0;
                      }
                      #endif
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_o};
                        __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                        if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 2127, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_2);
                      }
                      __pyx_r = __pyx_t_2;
                      __pyx_t_2 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/io.pxi":2124
 * 
 * 
 * def as_buffer(object o):             # <<<<<<<<<<<<<<
 *     if isinstance(o, Buffer):
 *         return o
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_XDECREF(__pyx_t_4);
                      __Pyx_AddTraceback("pyarrow.lib.as_buffer", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":2130
 * 
 * 
 * cdef shared_ptr[CBuffer] as_c_buffer(object o) except *:             # <<<<<<<<<<<<<<
 *     cdef shared_ptr[CBuffer] buf
 *     if isinstance(o, Buffer):
*/

                    static std::shared_ptr< arrow::Buffer>  __pyx_f_7pyarrow_3lib_as_c_buffer(PyObject *__pyx_v_o) {
                      std::shared_ptr< arrow::Buffer>  __pyx_v_buf;
                      std::shared_ptr< arrow::Buffer>  __pyx_r;
                      __Pyx_RefNannyDeclarations
                      int __pyx_t_1;
                      std::shared_ptr< arrow::Buffer>  __pyx_t_2;
                      PyObject *__pyx_t_3 = NULL;
                      PyObject *__pyx_t_4 = NULL;
                      size_t __pyx_t_5;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("as_c_buffer", 0);

                      /* "pyarrow/io.pxi":2132
 * cdef shared_ptr[CBuffer] as_c_buffer(object o) except *:
 *     cdef shared_ptr[CBuffer] buf
 *     if isinstance(o, Buffer):             # <<<<<<<<<<<<<<
 *         buf = (<Buffer> o).buffer
 *         if buf == nullptr:
*/
                      __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_o, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Buffer); 
                      if (__pyx_t_1) {

                        /* "pyarrow/io.pxi":2133
 *     cdef shared_ptr[CBuffer] buf
 *     if isinstance(o, Buffer):
 *         buf = (<Buffer> o).buffer             # <<<<<<<<<<<<<<
 *         if buf == nullptr:
 *             raise ValueError("got null buffer")
*/
                        if (unlikely(__pyx_v_o == Py_None)) {
                          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "buffer");
                          __PYX_ERR(6, 2133, __pyx_L1_error)
                        }
                        __pyx_t_2 = ((struct __pyx_obj_7pyarrow_3lib_Buffer *)__pyx_v_o)->buffer;
                        __pyx_v_buf = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_2);

                        /* "pyarrow/io.pxi":2134
 *     if isinstance(o, Buffer):
 *         buf = (<Buffer> o).buffer
 *         if buf == nullptr:             # <<<<<<<<<<<<<<
 *             raise ValueError("got null buffer")
 *     else:
*/
                        __pyx_t_1 = ((__pyx_v_buf == nullptr) != 0);
                        if (unlikely(__pyx_t_1)) {

                          /* "pyarrow/io.pxi":2135
 *         buf = (<Buffer> o).buffer
 *         if buf == nullptr:
 *             raise ValueError("got null buffer")             # <<<<<<<<<<<<<<
 *     else:
 *         buf = GetResultValue(PyBuffer.FromPyObject(o))
*/
                          __pyx_t_4 = NULL;
                          __pyx_t_5 = 1;
                          {
                            PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_got_null_buffer};
                            __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                            if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 2135, __pyx_L1_error)
                            __Pyx_GOTREF(__pyx_t_3);
                          }
                          __Pyx_Raise(__pyx_t_3, 0, 0, 0);
                          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                          __PYX_ERR(6, 2135, __pyx_L1_error)

                          /* "pyarrow/io.pxi":2134
 *     if isinstance(o, Buffer):
 *         buf = (<Buffer> o).buffer
 *         if buf == nullptr:             # <<<<<<<<<<<<<<
 *             raise ValueError("got null buffer")
 *     else:
*/
                        }

                        /* "pyarrow/io.pxi":2132
 * cdef shared_ptr[CBuffer] as_c_buffer(object o) except *:
 *     cdef shared_ptr[CBuffer] buf
 *     if isinstance(o, Buffer):             # <<<<<<<<<<<<<<
 *         buf = (<Buffer> o).buffer
 *         if buf == nullptr:
*/
                        goto __pyx_L3;
                      }

                      /* "pyarrow/io.pxi":2137
 *             raise ValueError("got null buffer")
 *     else:
 *         buf = GetResultValue(PyBuffer.FromPyObject(o))             # <<<<<<<<<<<<<<
 *     return buf
 * 
*/
                      /*else*/ {
                        __pyx_t_2 = arrow::py::GetResultValue<std::shared_ptr< arrow::Buffer> >(arrow::py::PyBuffer::FromPyObject(__pyx_v_o)); if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 2137, __pyx_L1_error)
                        __pyx_v_buf = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_2);
                      }
                      __pyx_L3:;

                      /* "pyarrow/io.pxi":2138
 *     else:
 *         buf = GetResultValue(PyBuffer.FromPyObject(o))
 *     return buf             # <<<<<<<<<<<<<<
 * 
 * 
*/
                      __pyx_r = __pyx_v_buf;
                      goto __pyx_L0;

                      /* "pyarrow/io.pxi":2130
 * 
 * 
 * cdef shared_ptr[CBuffer] as_c_buffer(object o) except *:             # <<<<<<<<<<<<<<
 *     cdef shared_ptr[CBuffer] buf
 *     if isinstance(o, Buffer):
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_XDECREF(__pyx_t_4);
                      __Pyx_AddTraceback("pyarrow.lib.as_c_buffer", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_pretend_to_initialize(&__pyx_r);
                      __pyx_L0:;
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":2141
 * 
 * 
 * cdef NativeFile get_native_file(object source, c_bool use_memory_map):             # <<<<<<<<<<<<<<
 *     try:
 *         source_path = _stringify_path(source)
*/

                    static struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_f_7pyarrow_3lib_get_native_file(PyObject *__pyx_v_source, bool __pyx_v_use_memory_map) {
                      PyObject *__pyx_v_source_path = NULL;
                      struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      PyObject *__pyx_t_3 = NULL;
                      PyObject *__pyx_t_4 = NULL;
                      PyObject *__pyx_t_5 = NULL;
                      PyObject *__pyx_t_6 = NULL;
                      size_t __pyx_t_7;
                      int __pyx_t_8;
                      PyObject *__pyx_t_9 = NULL;
                      int __pyx_t_10;
                      PyObject *__pyx_t_11 = NULL;
                      int __pyx_t_12;
                      int __pyx_t_13;
                      PyObject *__pyx_t_14 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("get_native_file", 0);
                      __Pyx_INCREF(__pyx_v_source);

                      /* "pyarrow/io.pxi":2142
 * 
 * cdef NativeFile get_native_file(object source, c_bool use_memory_map):
 *     try:             # <<<<<<<<<<<<<<
 *         source_path = _stringify_path(source)
 *     except TypeError:
*/
                      {
                        __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:*/ {

                          /* "pyarrow/io.pxi":2143
 * cdef NativeFile get_native_file(object source, c_bool use_memory_map):
 *     try:
 *         source_path = _stringify_path(source)             # <<<<<<<<<<<<<<
 *     except TypeError:
 *         if isinstance(source, Buffer):
*/
                          __pyx_t_5 = NULL;
                          __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_stringify_path); if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 2143, __pyx_L3_error)
                          __Pyx_GOTREF(__pyx_t_6);
                          __pyx_t_7 = 1;
                          #if CYTHON_UNPACK_METHODS
                          if (unlikely(PyMethod_Check(__pyx_t_6))) {
                            __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
                            assert(__pyx_t_5);
                            PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
                            __Pyx_INCREF(__pyx_t_5);
                            __Pyx_INCREF(__pyx__function);
                            __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
                            __pyx_t_7 = 0;
                          }
                          #endif
                          {
                            PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_source};
                            __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                            __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
                            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                            if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 2143, __pyx_L3_error)
                            __Pyx_GOTREF(__pyx_t_4);
                          }
                          __pyx_v_source_path = __pyx_t_4;
                          __pyx_t_4 = 0;

                          /* "pyarrow/io.pxi":2142
 * 
 * cdef NativeFile get_native_file(object source, c_bool use_memory_map):
 *     try:             # <<<<<<<<<<<<<<
 *         source_path = _stringify_path(source)
 *     except TypeError:
*/
                        }

                        /* "pyarrow/io.pxi":2151
 *             source = PythonFile(source, mode='r')
 *     else:
 *         if use_memory_map:             # <<<<<<<<<<<<<<
 *             source = memory_map(source_path, mode='r')
 *         else:
*/
                        /*else:*/ {
                          __pyx_t_8 = (__pyx_v_use_memory_map != 0);
                          if (__pyx_t_8) {

                            /* "pyarrow/io.pxi":2152
 *     else:
 *         if use_memory_map:
 *             source = memory_map(source_path, mode='r')             # <<<<<<<<<<<<<<
 *         else:
 *             source = OSFile(source_path, mode='r')
*/
                            __pyx_t_6 = NULL;
                            __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_memory_map); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 2152, __pyx_L5_except_error)
                            __Pyx_GOTREF(__pyx_t_5);
                            __pyx_t_7 = 1;
                            #if CYTHON_UNPACK_METHODS
                            if (unlikely(PyMethod_Check(__pyx_t_5))) {
                              __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
                              assert(__pyx_t_6);
                              PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
                              __Pyx_INCREF(__pyx_t_6);
                              __Pyx_INCREF(__pyx__function);
                              __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
                              __pyx_t_7 = 0;
                            }
                            #endif
                            {
                              PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_6, __pyx_v_source_path};
                              __pyx_t_9 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(6, 2152, __pyx_L5_except_error)
                              __Pyx_GOTREF(__pyx_t_9);
                              if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_mode, __pyx_mstate_global->__pyx_n_u_r, __pyx_t_9, __pyx_callargs+2, 0) < (0)) __PYX_ERR(6, 2152, __pyx_L5_except_error)
                              __pyx_t_4 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_9);
                              __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
                              __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
                              __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                              if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 2152, __pyx_L5_except_error)
                              __Pyx_GOTREF(__pyx_t_4);
                            }
                            __Pyx_DECREF_SET(__pyx_v_source, __pyx_t_4);
                            __pyx_t_4 = 0;

                            /* "pyarrow/io.pxi":2151
 *             source = PythonFile(source, mode='r')
 *     else:
 *         if use_memory_map:             # <<<<<<<<<<<<<<
 *             source = memory_map(source_path, mode='r')
 *         else:
*/
                            goto __pyx_L9;
                          }

                          /* "pyarrow/io.pxi":2154
 *             source = memory_map(source_path, mode='r')
 *         else:
 *             source = OSFile(source_path, mode='r')             # <<<<<<<<<<<<<<
 * 
 *     return source
*/
                          /*else*/ {
                            __pyx_t_5 = NULL;
                            __pyx_t_7 = 1;
                            {
                              PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_5, __pyx_v_source_path};
                              __pyx_t_9 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(6, 2154, __pyx_L5_except_error)
                              __Pyx_GOTREF(__pyx_t_9);
                              if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_mode, __pyx_mstate_global->__pyx_n_u_r, __pyx_t_9, __pyx_callargs+2, 0) < (0)) __PYX_ERR(6, 2154, __pyx_L5_except_error)
                              __pyx_t_4 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_OSFile, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_9);
                              __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
                              __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
                              if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 2154, __pyx_L5_except_error)
                              __Pyx_GOTREF((PyObject *)__pyx_t_4);
                            }
                            __Pyx_DECREF_SET(__pyx_v_source, ((PyObject *)__pyx_t_4));
                            __pyx_t_4 = 0;
                          }
                          __pyx_L9:;
                        }
                        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                        goto __pyx_L8_try_end;
                        __pyx_L3_error:;
                        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
                        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;

                        /* "pyarrow/io.pxi":2144
 *     try:
 *         source_path = _stringify_path(source)
 *     except TypeError:             # <<<<<<<<<<<<<<
 *         if isinstance(source, Buffer):
 *             source = BufferReader(source)
*/
                        __pyx_t_10 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_TypeError))));
                        if (__pyx_t_10) {
                          __Pyx_AddTraceback("pyarrow.lib.get_native_file", __pyx_clineno, __pyx_lineno, __pyx_filename);
                          if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_9, &__pyx_t_5) < 0) __PYX_ERR(6, 2144, __pyx_L5_except_error)
                          __Pyx_XGOTREF(__pyx_t_4);
                          __Pyx_XGOTREF(__pyx_t_9);
                          __Pyx_XGOTREF(__pyx_t_5);

                          /* "pyarrow/io.pxi":2145
 *         source_path = _stringify_path(source)
 *     except TypeError:
 *         if isinstance(source, Buffer):             # <<<<<<<<<<<<<<
 *             source = BufferReader(source)
 *         elif not isinstance(source, NativeFile) and hasattr(source, 'read'):
*/
                          __pyx_t_8 = __Pyx_TypeCheck(__pyx_v_source, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Buffer); 
                          if (__pyx_t_8) {

                            /* "pyarrow/io.pxi":2146
 *     except TypeError:
 *         if isinstance(source, Buffer):
 *             source = BufferReader(source)             # <<<<<<<<<<<<<<
 *         elif not isinstance(source, NativeFile) and hasattr(source, 'read'):
 *             # Optimistically hope this is file-like
*/
                            __pyx_t_11 = NULL;
                            __pyx_t_7 = 1;
                            {
                              PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_v_source};
                              __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_BufferReader, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                              __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
                              if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 2146, __pyx_L5_except_error)
                              __Pyx_GOTREF((PyObject *)__pyx_t_6);
                            }
                            __Pyx_DECREF_SET(__pyx_v_source, ((PyObject *)__pyx_t_6));
                            __pyx_t_6 = 0;

                            /* "pyarrow/io.pxi":2145
 *         source_path = _stringify_path(source)
 *     except TypeError:
 *         if isinstance(source, Buffer):             # <<<<<<<<<<<<<<
 *             source = BufferReader(source)
 *         elif not isinstance(source, NativeFile) and hasattr(source, 'read'):
*/
                            goto __pyx_L12;
                          }

                          /* "pyarrow/io.pxi":2147
 *         if isinstance(source, Buffer):
 *             source = BufferReader(source)
 *         elif not isinstance(source, NativeFile) and hasattr(source, 'read'):             # <<<<<<<<<<<<<<
 *             # Optimistically hope this is file-like
 *             source = PythonFile(source, mode='r')
*/
                          __pyx_t_12 = __Pyx_TypeCheck(__pyx_v_source, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NativeFile); 
                          __pyx_t_13 = (!__pyx_t_12);
                          if (__pyx_t_13) {
                          } else {
                            __pyx_t_8 = __pyx_t_13;
                            goto __pyx_L13_bool_binop_done;
                          }
                          __pyx_t_13 = __Pyx_HasAttr(__pyx_v_source, __pyx_mstate_global->__pyx_n_u_read); if (unlikely(__pyx_t_13 == ((int)-1))) __PYX_ERR(6, 2147, __pyx_L5_except_error)
                          __pyx_t_8 = __pyx_t_13;
                          __pyx_L13_bool_binop_done:;
                          if (__pyx_t_8) {

                            /* "pyarrow/io.pxi":2149
 *         elif not isinstance(source, NativeFile) and hasattr(source, 'read'):
 *             # Optimistically hope this is file-like
 *             source = PythonFile(source, mode='r')             # <<<<<<<<<<<<<<
 *     else:
 *         if use_memory_map:
*/
                            __pyx_t_11 = NULL;
                            __pyx_t_7 = 1;
                            {
                              PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_11, __pyx_v_source};
                              __pyx_t_14 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_14)) __PYX_ERR(6, 2149, __pyx_L5_except_error)
                              __Pyx_GOTREF(__pyx_t_14);
                              if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_mode, __pyx_mstate_global->__pyx_n_u_r, __pyx_t_14, __pyx_callargs+2, 0) < (0)) __PYX_ERR(6, 2149, __pyx_L5_except_error)
                              __pyx_t_6 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_PythonFile, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_14);
                              __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
                              __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
                              if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 2149, __pyx_L5_except_error)
                              __Pyx_GOTREF((PyObject *)__pyx_t_6);
                            }
                            __Pyx_DECREF_SET(__pyx_v_source, ((PyObject *)__pyx_t_6));
                            __pyx_t_6 = 0;

                            /* "pyarrow/io.pxi":2147
 *         if isinstance(source, Buffer):
 *             source = BufferReader(source)
 *         elif not isinstance(source, NativeFile) and hasattr(source, 'read'):             # <<<<<<<<<<<<<<
 *             # Optimistically hope this is file-like
 *             source = PythonFile(source, mode='r')
*/
                          }
                          __pyx_L12:;
                          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
                          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
                          goto __pyx_L4_exception_handled;
                        }
                        goto __pyx_L5_except_error;

                        /* "pyarrow/io.pxi":2142
 * 
 * cdef NativeFile get_native_file(object source, c_bool use_memory_map):
 *     try:             # <<<<<<<<<<<<<<
 *         source_path = _stringify_path(source)
 *     except TypeError:
*/
                        __pyx_L5_except_error:;
                        __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:;
                      }

                      /* "pyarrow/io.pxi":2156
 *             source = OSFile(source_path, mode='r')
 * 
 *     return source             # <<<<<<<<<<<<<<
 * 
 * 
*/
                      __Pyx_XDECREF((PyObject *)__pyx_r);
                      if (!(likely(((__pyx_v_source) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_source, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NativeFile))))) __PYX_ERR(6, 2156, __pyx_L1_error)
                      __Pyx_INCREF(__pyx_v_source);
                      __pyx_r = ((struct __pyx_obj_7pyarrow_3lib_NativeFile *)__pyx_v_source);
                      goto __pyx_L0;

                      /* "pyarrow/io.pxi":2141
 * 
 * 
 * cdef NativeFile get_native_file(object source, c_bool use_memory_map):             # <<<<<<<<<<<<<<
 *     try:
 *         source_path = _stringify_path(source)
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_4);
                      __Pyx_XDECREF(__pyx_t_5);
                      __Pyx_XDECREF(__pyx_t_6);
                      __Pyx_XDECREF(__pyx_t_9);
                      __Pyx_XDECREF(__pyx_t_11);
                      __Pyx_XDECREF(__pyx_t_14);
                      __Pyx_AddTraceback("pyarrow.lib.get_native_file", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = 0;
                      __pyx_L0:;
                      __Pyx_XDECREF(__pyx_v_source_path);
                      __Pyx_XDECREF(__pyx_v_source);
                      __Pyx_XGIVEREF((PyObject *)__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":2159
 * 
 * 
 * cdef get_reader(object source, c_bool use_memory_map,             # <<<<<<<<<<<<<<
 *                 shared_ptr[CRandomAccessFile]* reader):
 *     cdef NativeFile nf
*/

                    static PyObject *__pyx_f_7pyarrow_3lib_get_reader(PyObject *__pyx_v_source, bool __pyx_v_use_memory_map, std::shared_ptr< arrow::io::RandomAccessFile>  *__pyx_v_reader) {
                      struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_nf = 0;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      std::shared_ptr< arrow::io::RandomAccessFile>  __pyx_t_2;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("get_reader", 0);

                      /* "pyarrow/io.pxi":2163
 *     cdef NativeFile nf
 * 
 *     nf = get_native_file(source, use_memory_map)             # <<<<<<<<<<<<<<
 *     reader[0] = nf.get_random_access_file()
 * 
*/
                      __pyx_t_1 = ((PyObject *)__pyx_f_7pyarrow_3lib_get_native_file(__pyx_v_source, __pyx_v_use_memory_map)); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 2163, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_v_nf = ((struct __pyx_obj_7pyarrow_3lib_NativeFile *)__pyx_t_1);
                      __pyx_t_1 = 0;

                      /* "pyarrow/io.pxi":2164
 * 
 *     nf = get_native_file(source, use_memory_map)
 *     reader[0] = nf.get_random_access_file()             # <<<<<<<<<<<<<<
 * 
 * 
*/
                      if (unlikely(((PyObject *)__pyx_v_nf) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get_random_access_file");
                        __PYX_ERR(6, 2164, __pyx_L1_error)
                      }
                      __pyx_t_2 = ((struct __pyx_vtabstruct_7pyarrow_3lib_NativeFile *)__pyx_v_nf->__pyx_vtab)->get_random_access_file(__pyx_v_nf); if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 2164, __pyx_L1_error)
                      (__pyx_v_reader[0]) = __pyx_t_2;

                      /* "pyarrow/io.pxi":2159
 * 
 * 
 * cdef get_reader(object source, c_bool use_memory_map,             # <<<<<<<<<<<<<<
 *                 shared_ptr[CRandomAccessFile]* reader):
 *     cdef NativeFile nf
*/

                      /* function exit code */
                      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_AddTraceback("pyarrow.lib.get_reader", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = 0;
                      __pyx_L0:;
                      __Pyx_XDECREF((PyObject *)__pyx_v_nf);
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":2167
 * 
 * 
 * cdef get_input_stream(object source, c_bool use_memory_map,             # <<<<<<<<<<<<<<
 *                       shared_ptr[CInputStream]* out):
 *     """
*/

                    static PyObject *__pyx_f_7pyarrow_3lib_get_input_stream(PyObject *__pyx_v_source, bool __pyx_v_use_memory_map, std::shared_ptr< arrow::io::InputStream>  *__pyx_v_out) {
                      struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_nf = 0;
                      struct __pyx_obj_7pyarrow_3lib_Codec *__pyx_v_codec = 0;
                      std::shared_ptr< arrow::io::InputStream>  __pyx_v_input_stream;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      PyObject *__pyx_t_3 = NULL;
                      PyObject *__pyx_t_4 = NULL;
                      PyObject *__pyx_t_5 = NULL;
                      size_t __pyx_t_6;
                      int __pyx_t_7;
                      std::shared_ptr< arrow::io::InputStream>  __pyx_t_8;
                      int __pyx_t_9;
                       arrow::util::Codec *__pyx_t_10;
                      std::shared_ptr< arrow::io::CompressedInputStream>  __pyx_t_11;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("get_input_stream", 0);

                      /* "pyarrow/io.pxi":2178
 *         shared_ptr[CInputStream] input_stream
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         codec = Codec.detect(source)
 *     except TypeError:
*/
                      {
                        __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:*/ {

                          /* "pyarrow/io.pxi":2179
 * 
 *     try:
 *         codec = Codec.detect(source)             # <<<<<<<<<<<<<<
 *     except TypeError:
 *         codec = None
*/
                          __pyx_t_5 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Codec);
                          __Pyx_INCREF(__pyx_t_5);
                          __pyx_t_6 = 0;
                          {
                            PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_source};
                            __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_detect, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                            __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
                            if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 2179, __pyx_L3_error)
                            __Pyx_GOTREF(__pyx_t_4);
                          }
                          if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Codec))))) __PYX_ERR(6, 2179, __pyx_L3_error)
                          __pyx_v_codec = ((struct __pyx_obj_7pyarrow_3lib_Codec *)__pyx_t_4);
                          __pyx_t_4 = 0;

                          /* "pyarrow/io.pxi":2178
 *         shared_ptr[CInputStream] input_stream
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         codec = Codec.detect(source)
 *     except TypeError:
*/
                        }
                        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                        goto __pyx_L8_try_end;
                        __pyx_L3_error:;
                        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

                        /* "pyarrow/io.pxi":2180
 *     try:
 *         codec = Codec.detect(source)
 *     except TypeError:             # <<<<<<<<<<<<<<
 *         codec = None
 * 
*/
                        __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_TypeError))));
                        if (__pyx_t_7) {
                          __Pyx_ErrRestore(0,0,0);

                          /* "pyarrow/io.pxi":2181
 *         codec = Codec.detect(source)
 *     except TypeError:
 *         codec = None             # <<<<<<<<<<<<<<
 * 
 *     nf = get_native_file(source, use_memory_map)
*/
                          __Pyx_INCREF(Py_None);
                          __Pyx_XDECREF_SET(__pyx_v_codec, ((struct __pyx_obj_7pyarrow_3lib_Codec *)Py_None));
                          goto __pyx_L4_exception_handled;
                        }
                        goto __pyx_L5_except_error;

                        /* "pyarrow/io.pxi":2178
 *         shared_ptr[CInputStream] input_stream
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         codec = Codec.detect(source)
 *     except TypeError:
*/
                        __pyx_L5_except_error:;
                        __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:;
                      }

                      /* "pyarrow/io.pxi":2183
 *         codec = None
 * 
 *     nf = get_native_file(source, use_memory_map)             # <<<<<<<<<<<<<<
 *     input_stream = nf.get_input_stream()
 * 
*/
                      __pyx_t_4 = ((PyObject *)__pyx_f_7pyarrow_3lib_get_native_file(__pyx_v_source, __pyx_v_use_memory_map)); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 2183, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_4);
                      __pyx_v_nf = ((struct __pyx_obj_7pyarrow_3lib_NativeFile *)__pyx_t_4);
                      __pyx_t_4 = 0;

                      /* "pyarrow/io.pxi":2184
 * 
 *     nf = get_native_file(source, use_memory_map)
 *     input_stream = nf.get_input_stream()             # <<<<<<<<<<<<<<
 * 
 *     # codec is None if compression can't be detected
*/
                      if (unlikely(((PyObject *)__pyx_v_nf) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get_input_stream");
                        __PYX_ERR(6, 2184, __pyx_L1_error)
                      }
                      __pyx_t_8 = ((struct __pyx_vtabstruct_7pyarrow_3lib_NativeFile *)__pyx_v_nf->__pyx_vtab)->get_input_stream(__pyx_v_nf); if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 2184, __pyx_L1_error)
                      __pyx_v_input_stream = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_8);

                      /* "pyarrow/io.pxi":2187
 * 
 *     # codec is None if compression can't be detected
 *     if codec is not None:             # <<<<<<<<<<<<<<
 *         input_stream = <shared_ptr[CInputStream]> GetResultValue(
 *             CCompressedInputStream.Make(codec.unwrap(), input_stream)
*/
                      __pyx_t_9 = (((PyObject *)__pyx_v_codec) != Py_None);
                      if (__pyx_t_9) {

                        /* "pyarrow/io.pxi":2189
 *     if codec is not None:
 *         input_stream = <shared_ptr[CInputStream]> GetResultValue(
 *             CCompressedInputStream.Make(codec.unwrap(), input_stream)             # <<<<<<<<<<<<<<
 *         )
 * 
*/
                        if (unlikely(((PyObject *)__pyx_v_codec) == Py_None)) {
                          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "unwrap");
                          __PYX_ERR(6, 2189, __pyx_L1_error)
                        }
                        __pyx_t_10 = __pyx_f_7pyarrow_3lib_5Codec_unwrap(__pyx_v_codec); if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 2189, __pyx_L1_error)

                        /* "pyarrow/io.pxi":2188
 *     # codec is None if compression can't be detected
 *     if codec is not None:
 *         input_stream = <shared_ptr[CInputStream]> GetResultValue(             # <<<<<<<<<<<<<<
 *             CCompressedInputStream.Make(codec.unwrap(), input_stream)
 *         )
*/
                        __pyx_t_11 = arrow::py::GetResultValue<std::shared_ptr< arrow::io::CompressedInputStream> >( arrow::io::CompressedInputStream::Make(__pyx_t_10, __pyx_v_input_stream)); if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 2188, __pyx_L1_error)
                        __pyx_v_input_stream = ((std::shared_ptr< arrow::io::InputStream> )__pyx_t_11);

                        /* "pyarrow/io.pxi":2187
 * 
 *     # codec is None if compression can't be detected
 *     if codec is not None:             # <<<<<<<<<<<<<<
 *         input_stream = <shared_ptr[CInputStream]> GetResultValue(
 *             CCompressedInputStream.Make(codec.unwrap(), input_stream)
*/
                      }

                      /* "pyarrow/io.pxi":2192
 *         )
 * 
 *     out[0] = input_stream             # <<<<<<<<<<<<<<
 * 
 * 
*/
                      (__pyx_v_out[0]) = __pyx_v_input_stream;

                      /* "pyarrow/io.pxi":2167
 * 
 * 
 * cdef get_input_stream(object source, c_bool use_memory_map,             # <<<<<<<<<<<<<<
 *                       shared_ptr[CInputStream]* out):
 *     """
*/

                      /* function exit code */
                      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_4);
                      __Pyx_XDECREF(__pyx_t_5);
                      __Pyx_AddTraceback("pyarrow.lib.get_input_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = 0;
                      __pyx_L0:;
                      __Pyx_XDECREF((PyObject *)__pyx_v_nf);
                      __Pyx_XDECREF((PyObject *)__pyx_v_codec);
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":2195
 * 
 * 
 * cdef get_writer(object source, shared_ptr[COutputStream]* writer):             # <<<<<<<<<<<<<<
 *     cdef NativeFile nf
 * 
*/

                    static PyObject *__pyx_f_7pyarrow_3lib_get_writer(PyObject *__pyx_v_source, std::shared_ptr< arrow::io::OutputStream>  *__pyx_v_writer) {
                      struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_nf = 0;
                      PyObject *__pyx_v_source_path = NULL;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      PyObject *__pyx_t_3 = NULL;
                      PyObject *__pyx_t_4 = NULL;
                      PyObject *__pyx_t_5 = NULL;
                      PyObject *__pyx_t_6 = NULL;
                      size_t __pyx_t_7;
                      int __pyx_t_8;
                      int __pyx_t_9;
                      int __pyx_t_10;
                      int __pyx_t_11;
                      PyObject *__pyx_t_12 = NULL;
                      PyObject *__pyx_t_13 = NULL;
                      PyObject *__pyx_t_14 = NULL;
                      std::shared_ptr< arrow::io::OutputStream>  __pyx_t_15;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("get_writer", 0);
                      __Pyx_INCREF(__pyx_v_source);

                      /* "pyarrow/io.pxi":2198
 *     cdef NativeFile nf
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         source_path = _stringify_path(source)
 *     except TypeError:
*/
                      {
                        __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:*/ {

                          /* "pyarrow/io.pxi":2199
 * 
 *     try:
 *         source_path = _stringify_path(source)             # <<<<<<<<<<<<<<
 *     except TypeError:
 *         if not isinstance(source, NativeFile) and hasattr(source, 'write'):
*/
                          __pyx_t_5 = NULL;
                          __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_stringify_path); if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 2199, __pyx_L3_error)
                          __Pyx_GOTREF(__pyx_t_6);
                          __pyx_t_7 = 1;
                          #if CYTHON_UNPACK_METHODS
                          if (unlikely(PyMethod_Check(__pyx_t_6))) {
                            __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
                            assert(__pyx_t_5);
                            PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
                            __Pyx_INCREF(__pyx_t_5);
                            __Pyx_INCREF(__pyx__function);
                            __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
                            __pyx_t_7 = 0;
                          }
                          #endif
                          {
                            PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_source};
                            __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                            __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
                            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                            if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 2199, __pyx_L3_error)
                            __Pyx_GOTREF(__pyx_t_4);
                          }
                          __pyx_v_source_path = __pyx_t_4;
                          __pyx_t_4 = 0;

                          /* "pyarrow/io.pxi":2198
 *     cdef NativeFile nf
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         source_path = _stringify_path(source)
 *     except TypeError:
*/
                        }

                        /* "pyarrow/io.pxi":2205
 *             source = PythonFile(source, mode='w')
 *     else:
 *         source = OSFile(source_path, mode='w')             # <<<<<<<<<<<<<<
 * 
 *     if isinstance(source, NativeFile):
*/
                        /*else:*/ {
                          __pyx_t_6 = NULL;
                          __pyx_t_7 = 1;
                          {
                            PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_6, __pyx_v_source_path};
                            __pyx_t_5 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 2205, __pyx_L5_except_error)
                            __Pyx_GOTREF(__pyx_t_5);
                            if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_mode, __pyx_mstate_global->__pyx_n_u_w, __pyx_t_5, __pyx_callargs+2, 0) < (0)) __PYX_ERR(6, 2205, __pyx_L5_except_error)
                            __pyx_t_4 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_OSFile, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_5);
                            __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
                            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                            if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 2205, __pyx_L5_except_error)
                            __Pyx_GOTREF((PyObject *)__pyx_t_4);
                          }
                          __Pyx_DECREF_SET(__pyx_v_source, ((PyObject *)__pyx_t_4));
                          __pyx_t_4 = 0;
                        }
                        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                        goto __pyx_L8_try_end;
                        __pyx_L3_error:;
                        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
                        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;

                        /* "pyarrow/io.pxi":2200
 *     try:
 *         source_path = _stringify_path(source)
 *     except TypeError:             # <<<<<<<<<<<<<<
 *         if not isinstance(source, NativeFile) and hasattr(source, 'write'):
 *             # Optimistically hope this is file-like
*/
                        __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_TypeError))));
                        if (__pyx_t_8) {
                          __Pyx_AddTraceback("pyarrow.lib.get_writer", __pyx_clineno, __pyx_lineno, __pyx_filename);
                          if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6) < 0) __PYX_ERR(6, 2200, __pyx_L5_except_error)
                          __Pyx_XGOTREF(__pyx_t_4);
                          __Pyx_XGOTREF(__pyx_t_5);
                          __Pyx_XGOTREF(__pyx_t_6);

                          /* "pyarrow/io.pxi":2201
 *         source_path = _stringify_path(source)
 *     except TypeError:
 *         if not isinstance(source, NativeFile) and hasattr(source, 'write'):             # <<<<<<<<<<<<<<
 *             # Optimistically hope this is file-like
 *             source = PythonFile(source, mode='w')
*/
                          __pyx_t_10 = __Pyx_TypeCheck(__pyx_v_source, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NativeFile); 
                          __pyx_t_11 = (!__pyx_t_10);
                          if (__pyx_t_11) {
                          } else {
                            __pyx_t_9 = __pyx_t_11;
                            goto __pyx_L12_bool_binop_done;
                          }
                          __pyx_t_11 = __Pyx_HasAttr(__pyx_v_source, __pyx_mstate_global->__pyx_n_u_write); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(6, 2201, __pyx_L5_except_error)
                          __pyx_t_9 = __pyx_t_11;
                          __pyx_L12_bool_binop_done:;
                          if (__pyx_t_9) {

                            /* "pyarrow/io.pxi":2203
 *         if not isinstance(source, NativeFile) and hasattr(source, 'write'):
 *             # Optimistically hope this is file-like
 *             source = PythonFile(source, mode='w')             # <<<<<<<<<<<<<<
 *     else:
 *         source = OSFile(source_path, mode='w')
*/
                            __pyx_t_13 = NULL;
                            __pyx_t_7 = 1;
                            {
                              PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_13, __pyx_v_source};
                              __pyx_t_14 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_14)) __PYX_ERR(6, 2203, __pyx_L5_except_error)
                              __Pyx_GOTREF(__pyx_t_14);
                              if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_mode, __pyx_mstate_global->__pyx_n_u_w, __pyx_t_14, __pyx_callargs+2, 0) < (0)) __PYX_ERR(6, 2203, __pyx_L5_except_error)
                              __pyx_t_12 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_PythonFile, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_14);
                              __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
                              __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
                              if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 2203, __pyx_L5_except_error)
                              __Pyx_GOTREF((PyObject *)__pyx_t_12);
                            }
                            __Pyx_DECREF_SET(__pyx_v_source, ((PyObject *)__pyx_t_12));
                            __pyx_t_12 = 0;

                            /* "pyarrow/io.pxi":2201
 *         source_path = _stringify_path(source)
 *     except TypeError:
 *         if not isinstance(source, NativeFile) and hasattr(source, 'write'):             # <<<<<<<<<<<<<<
 *             # Optimistically hope this is file-like
 *             source = PythonFile(source, mode='w')
*/
                          }
                          __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_L4_exception_handled;
                        }
                        goto __pyx_L5_except_error;

                        /* "pyarrow/io.pxi":2198
 *     cdef NativeFile nf
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         source_path = _stringify_path(source)
 *     except TypeError:
*/
                        __pyx_L5_except_error:;
                        __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:;
                      }

                      /* "pyarrow/io.pxi":2207
 *         source = OSFile(source_path, mode='w')
 * 
 *     if isinstance(source, NativeFile):             # <<<<<<<<<<<<<<
 *         nf = source
 *         writer[0] = nf.get_output_stream()
*/
                      __pyx_t_9 = __Pyx_TypeCheck(__pyx_v_source, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NativeFile); 
                      if (likely(__pyx_t_9)) {

                        /* "pyarrow/io.pxi":2208
 * 
 *     if isinstance(source, NativeFile):
 *         nf = source             # <<<<<<<<<<<<<<
 *         writer[0] = nf.get_output_stream()
 *     else:
*/
                        __pyx_t_6 = __pyx_v_source;
                        __Pyx_INCREF(__pyx_t_6);
                        if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NativeFile))))) __PYX_ERR(6, 2208, __pyx_L1_error)
                        __pyx_v_nf = ((struct __pyx_obj_7pyarrow_3lib_NativeFile *)__pyx_t_6);
                        __pyx_t_6 = 0;

                        /* "pyarrow/io.pxi":2209
 *     if isinstance(source, NativeFile):
 *         nf = source
 *         writer[0] = nf.get_output_stream()             # <<<<<<<<<<<<<<
 *     else:
 *         raise TypeError(f'Unable to write to object of type: {type(source)}')
*/
                        if (unlikely(((PyObject *)__pyx_v_nf) == Py_None)) {
                          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get_output_stream");
                          __PYX_ERR(6, 2209, __pyx_L1_error)
                        }
                        __pyx_t_15 = ((struct __pyx_vtabstruct_7pyarrow_3lib_NativeFile *)__pyx_v_nf->__pyx_vtab)->get_output_stream(__pyx_v_nf); if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 2209, __pyx_L1_error)
                        (__pyx_v_writer[0]) = __pyx_t_15;

                        /* "pyarrow/io.pxi":2207
 *         source = OSFile(source_path, mode='w')
 * 
 *     if isinstance(source, NativeFile):             # <<<<<<<<<<<<<<
 *         nf = source
 *         writer[0] = nf.get_output_stream()
*/
                        goto __pyx_L14;
                      }

                      /* "pyarrow/io.pxi":2211
 *         writer[0] = nf.get_output_stream()
 *     else:
 *         raise TypeError(f'Unable to write to object of type: {type(source)}')             # <<<<<<<<<<<<<<
 * 
 * 
*/
                      /*else*/ {
                        __pyx_t_5 = NULL;
                        __pyx_t_4 = __Pyx_PyObject_FormatSimple(((PyObject *)Py_TYPE(__pyx_v_source)), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 2211, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_4);
                        __pyx_t_12 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_Unable_to_write_to_object_of_typ, __pyx_t_4); if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 2211, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_12);
                        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                        __pyx_t_7 = 1;
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_12};
                          __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
                          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                          if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 2211, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_6);
                        }
                        __Pyx_Raise(__pyx_t_6, 0, 0, 0);
                        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                        __PYX_ERR(6, 2211, __pyx_L1_error)
                      }
                      __pyx_L14:;

                      /* "pyarrow/io.pxi":2195
 * 
 * 
 * cdef get_writer(object source, shared_ptr[COutputStream]* writer):             # <<<<<<<<<<<<<<
 *     cdef NativeFile nf
 * 
*/

                      /* function exit code */
                      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_4);
                      __Pyx_XDECREF(__pyx_t_5);
                      __Pyx_XDECREF(__pyx_t_6);
                      __Pyx_XDECREF(__pyx_t_12);
                      __Pyx_XDECREF(__pyx_t_13);
                      __Pyx_XDECREF(__pyx_t_14);
                      __Pyx_AddTraceback("pyarrow.lib.get_writer", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = 0;
                      __pyx_L0:;
                      __Pyx_XDECREF((PyObject *)__pyx_v_nf);
                      __Pyx_XDECREF(__pyx_v_source_path);
                      __Pyx_XDECREF(__pyx_v_source);
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":2217
 * 
 * 
 * def _detect_compression(path):             # <<<<<<<<<<<<<<
 *     if isinstance(path, str):
 *         if path.endswith('.bz2'):
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_255_detect_compression(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_254_detect_compression, "_detect_compression(path)");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_255_detect_compression = {"_detect_compression", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_255_detect_compression, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_254_detect_compression};
                    static PyObject *__pyx_pw_7pyarrow_3lib_255_detect_compression(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      PyObject *__pyx_v_path = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[1] = {0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("_detect_compression (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_path,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(6, 2217, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 2217, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_detect_compression", 0) < (0)) __PYX_ERR(6, 2217, __pyx_L3_error)
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_detect_compression", 1, 1, 1, i); __PYX_ERR(6, 2217, __pyx_L3_error) }
                          }
                        } else if (unlikely(__pyx_nargs != 1)) {
                          goto __pyx_L5_argtuple_error;
                        } else {
                          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 2217, __pyx_L3_error)
                        }
                        __pyx_v_path = values[0];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("_detect_compression", 1, 1, 1, __pyx_nargs); __PYX_ERR(6, 2217, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib._detect_compression", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_254_detect_compression(__pyx_self, __pyx_v_path);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_254_detect_compression(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_path) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_t_1;
                      PyObject *__pyx_t_2 = NULL;
                      PyObject *__pyx_t_3 = NULL;
                      size_t __pyx_t_4;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("_detect_compression", 0);

                      /* "pyarrow/io.pxi":2218
 * 
 * def _detect_compression(path):
 *     if isinstance(path, str):             # <<<<<<<<<<<<<<
 *         if path.endswith('.bz2'):
 *             return 'bz2'
*/
                      __pyx_t_1 = PyUnicode_Check(__pyx_v_path); 
                      if (__pyx_t_1) {

                        /* "pyarrow/io.pxi":2219
 * def _detect_compression(path):
 *     if isinstance(path, str):
 *         if path.endswith('.bz2'):             # <<<<<<<<<<<<<<
 *             return 'bz2'
 *         elif path.endswith('.gz'):
*/
                        __pyx_t_3 = __pyx_v_path;
                        __Pyx_INCREF(__pyx_t_3);
                        __pyx_t_4 = 0;
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_bz2};
                          __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_endswith, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                          if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 2219, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_2);
                        }
                        __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(6, 2219, __pyx_L1_error)
                        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                        if (__pyx_t_1) {

                          /* "pyarrow/io.pxi":2220
 *     if isinstance(path, str):
 *         if path.endswith('.bz2'):
 *             return 'bz2'             # <<<<<<<<<<<<<<
 *         elif path.endswith('.gz'):
 *             return 'gzip'
*/
                          __Pyx_XDECREF(__pyx_r);
                          __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_bz2_2);
                          __pyx_r = __pyx_mstate_global->__pyx_n_u_bz2_2;
                          goto __pyx_L0;

                          /* "pyarrow/io.pxi":2219
 * def _detect_compression(path):
 *     if isinstance(path, str):
 *         if path.endswith('.bz2'):             # <<<<<<<<<<<<<<
 *             return 'bz2'
 *         elif path.endswith('.gz'):
*/
                        }

                        /* "pyarrow/io.pxi":2221
 *         if path.endswith('.bz2'):
 *             return 'bz2'
 *         elif path.endswith('.gz'):             # <<<<<<<<<<<<<<
 *             return 'gzip'
 *         elif path.endswith('.lz4'):
*/
                        __pyx_t_3 = __pyx_v_path;
                        __Pyx_INCREF(__pyx_t_3);
                        __pyx_t_4 = 0;
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_gz};
                          __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_endswith, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                          if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 2221, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_2);
                        }
                        __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(6, 2221, __pyx_L1_error)
                        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                        if (__pyx_t_1) {

                          /* "pyarrow/io.pxi":2222
 *             return 'bz2'
 *         elif path.endswith('.gz'):
 *             return 'gzip'             # <<<<<<<<<<<<<<
 *         elif path.endswith('.lz4'):
 *             return 'lz4'
*/
                          __Pyx_XDECREF(__pyx_r);
                          __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_gzip);
                          __pyx_r = __pyx_mstate_global->__pyx_n_u_gzip;
                          goto __pyx_L0;

                          /* "pyarrow/io.pxi":2221
 *         if path.endswith('.bz2'):
 *             return 'bz2'
 *         elif path.endswith('.gz'):             # <<<<<<<<<<<<<<
 *             return 'gzip'
 *         elif path.endswith('.lz4'):
*/
                        }

                        /* "pyarrow/io.pxi":2223
 *         elif path.endswith('.gz'):
 *             return 'gzip'
 *         elif path.endswith('.lz4'):             # <<<<<<<<<<<<<<
 *             return 'lz4'
 *         elif path.endswith('.zst'):
*/
                        __pyx_t_3 = __pyx_v_path;
                        __Pyx_INCREF(__pyx_t_3);
                        __pyx_t_4 = 0;
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_lz4};
                          __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_endswith, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                          if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 2223, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_2);
                        }
                        __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(6, 2223, __pyx_L1_error)
                        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                        if (__pyx_t_1) {

                          /* "pyarrow/io.pxi":2224
 *             return 'gzip'
 *         elif path.endswith('.lz4'):
 *             return 'lz4'             # <<<<<<<<<<<<<<
 *         elif path.endswith('.zst'):
 *             return 'zstd'
*/
                          __Pyx_XDECREF(__pyx_r);
                          __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_lz4_2);
                          __pyx_r = __pyx_mstate_global->__pyx_n_u_lz4_2;
                          goto __pyx_L0;

                          /* "pyarrow/io.pxi":2223
 *         elif path.endswith('.gz'):
 *             return 'gzip'
 *         elif path.endswith('.lz4'):             # <<<<<<<<<<<<<<
 *             return 'lz4'
 *         elif path.endswith('.zst'):
*/
                        }

                        /* "pyarrow/io.pxi":2225
 *         elif path.endswith('.lz4'):
 *             return 'lz4'
 *         elif path.endswith('.zst'):             # <<<<<<<<<<<<<<
 *             return 'zstd'
 * 
*/
                        __pyx_t_3 = __pyx_v_path;
                        __Pyx_INCREF(__pyx_t_3);
                        __pyx_t_4 = 0;
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_zst};
                          __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_endswith, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                          if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 2225, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_2);
                        }
                        __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(6, 2225, __pyx_L1_error)
                        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                        if (__pyx_t_1) {

                          /* "pyarrow/io.pxi":2226
 *             return 'lz4'
 *         elif path.endswith('.zst'):
 *             return 'zstd'             # <<<<<<<<<<<<<<
 * 
 * 
*/
                          __Pyx_XDECREF(__pyx_r);
                          __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_zstd);
                          __pyx_r = __pyx_mstate_global->__pyx_n_u_zstd;
                          goto __pyx_L0;

                          /* "pyarrow/io.pxi":2225
 *         elif path.endswith('.lz4'):
 *             return 'lz4'
 *         elif path.endswith('.zst'):             # <<<<<<<<<<<<<<
 *             return 'zstd'
 * 
*/
                        }

                        /* "pyarrow/io.pxi":2218
 * 
 * def _detect_compression(path):
 *     if isinstance(path, str):             # <<<<<<<<<<<<<<
 *         if path.endswith('.bz2'):
 *             return 'bz2'
*/
                      }

                      /* "pyarrow/io.pxi":2217
 * 
 * 
 * def _detect_compression(path):             # <<<<<<<<<<<<<<
 *     if isinstance(path, str):
 *         if path.endswith('.bz2'):
*/

                      /* 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_AddTraceback("pyarrow.lib._detect_compression", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":2229
 * 
 * 
 * cdef CCompressionType _ensure_compression(str name) except *:             # <<<<<<<<<<<<<<
 *     uppercase = name.upper()
 *     if uppercase == 'BZ2':
*/

                    static enum  arrow::Compression::type __pyx_f_7pyarrow_3lib__ensure_compression(PyObject *__pyx_v_name) {
                      PyObject *__pyx_v_uppercase = NULL;
                      enum  arrow::Compression::type __pyx_r;
                      __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;
                      size_t __pyx_t_7;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("_ensure_compression", 0);

                      /* "pyarrow/io.pxi":2230
 * 
 * cdef CCompressionType _ensure_compression(str name) except *:
 *     uppercase = name.upper()             # <<<<<<<<<<<<<<
 *     if uppercase == 'BZ2':
 *         return CCompressionType_BZ2
*/
                      __pyx_t_1 = __Pyx_CallUnboundCMethod0(&__pyx_mstate_global->__pyx_umethod_PyUnicode_Type__upper, __pyx_v_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 2230, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_v_uppercase = ((PyObject*)__pyx_t_1);
                      __pyx_t_1 = 0;

                      /* "pyarrow/io.pxi":2231
 * cdef CCompressionType _ensure_compression(str name) except *:
 *     uppercase = name.upper()
 *     if uppercase == 'BZ2':             # <<<<<<<<<<<<<<
 *         return CCompressionType_BZ2
 *     elif uppercase == 'GZIP':
*/
                      __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_v_uppercase, __pyx_mstate_global->__pyx_n_u_BZ2, Py_EQ)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(6, 2231, __pyx_L1_error)
                      if (__pyx_t_2) {

                        /* "pyarrow/io.pxi":2232
 *     uppercase = name.upper()
 *     if uppercase == 'BZ2':
 *         return CCompressionType_BZ2             # <<<<<<<<<<<<<<
 *     elif uppercase == 'GZIP':
 *         return CCompressionType_GZIP
*/
                        __pyx_r =  arrow::Compression::BZ2;
                        goto __pyx_L0;

                        /* "pyarrow/io.pxi":2231
 * cdef CCompressionType _ensure_compression(str name) except *:
 *     uppercase = name.upper()
 *     if uppercase == 'BZ2':             # <<<<<<<<<<<<<<
 *         return CCompressionType_BZ2
 *     elif uppercase == 'GZIP':
*/
                      }

                      /* "pyarrow/io.pxi":2233
 *     if uppercase == 'BZ2':
 *         return CCompressionType_BZ2
 *     elif uppercase == 'GZIP':             # <<<<<<<<<<<<<<
 *         return CCompressionType_GZIP
 *     elif uppercase == 'BROTLI':
*/
                      __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_v_uppercase, __pyx_mstate_global->__pyx_n_u_GZIP, Py_EQ)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(6, 2233, __pyx_L1_error)
                      if (__pyx_t_2) {

                        /* "pyarrow/io.pxi":2234
 *         return CCompressionType_BZ2
 *     elif uppercase == 'GZIP':
 *         return CCompressionType_GZIP             # <<<<<<<<<<<<<<
 *     elif uppercase == 'BROTLI':
 *         return CCompressionType_BROTLI
*/
                        __pyx_r =  arrow::Compression::GZIP;
                        goto __pyx_L0;

                        /* "pyarrow/io.pxi":2233
 *     if uppercase == 'BZ2':
 *         return CCompressionType_BZ2
 *     elif uppercase == 'GZIP':             # <<<<<<<<<<<<<<
 *         return CCompressionType_GZIP
 *     elif uppercase == 'BROTLI':
*/
                      }

                      /* "pyarrow/io.pxi":2235
 *     elif uppercase == 'GZIP':
 *         return CCompressionType_GZIP
 *     elif uppercase == 'BROTLI':             # <<<<<<<<<<<<<<
 *         return CCompressionType_BROTLI
 *     elif uppercase == 'LZ4' or uppercase == 'LZ4_FRAME':
*/
                      __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_v_uppercase, __pyx_mstate_global->__pyx_n_u_BROTLI, Py_EQ)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(6, 2235, __pyx_L1_error)
                      if (__pyx_t_2) {

                        /* "pyarrow/io.pxi":2236
 *         return CCompressionType_GZIP
 *     elif uppercase == 'BROTLI':
 *         return CCompressionType_BROTLI             # <<<<<<<<<<<<<<
 *     elif uppercase == 'LZ4' or uppercase == 'LZ4_FRAME':
 *         return CCompressionType_LZ4_FRAME
*/
                        __pyx_r =  arrow::Compression::BROTLI;
                        goto __pyx_L0;

                        /* "pyarrow/io.pxi":2235
 *     elif uppercase == 'GZIP':
 *         return CCompressionType_GZIP
 *     elif uppercase == 'BROTLI':             # <<<<<<<<<<<<<<
 *         return CCompressionType_BROTLI
 *     elif uppercase == 'LZ4' or uppercase == 'LZ4_FRAME':
*/
                      }

                      /* "pyarrow/io.pxi":2237
 *     elif uppercase == 'BROTLI':
 *         return CCompressionType_BROTLI
 *     elif uppercase == 'LZ4' or uppercase == 'LZ4_FRAME':             # <<<<<<<<<<<<<<
 *         return CCompressionType_LZ4_FRAME
 *     elif uppercase == 'LZ4_RAW':
*/
                      __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_v_uppercase, __pyx_mstate_global->__pyx_n_u_LZ4, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(6, 2237, __pyx_L1_error)
                      if (!__pyx_t_3) {
                      } else {
                        __pyx_t_2 = __pyx_t_3;
                        goto __pyx_L4_bool_binop_done;
                      }
                      __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_v_uppercase, __pyx_mstate_global->__pyx_n_u_LZ4_FRAME, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(6, 2237, __pyx_L1_error)
                      __pyx_t_2 = __pyx_t_3;
                      __pyx_L4_bool_binop_done:;
                      if (__pyx_t_2) {

                        /* "pyarrow/io.pxi":2238
 *         return CCompressionType_BROTLI
 *     elif uppercase == 'LZ4' or uppercase == 'LZ4_FRAME':
 *         return CCompressionType_LZ4_FRAME             # <<<<<<<<<<<<<<
 *     elif uppercase == 'LZ4_RAW':
 *         return CCompressionType_LZ4
*/
                        __pyx_r =  arrow::Compression::LZ4_FRAME;
                        goto __pyx_L0;

                        /* "pyarrow/io.pxi":2237
 *     elif uppercase == 'BROTLI':
 *         return CCompressionType_BROTLI
 *     elif uppercase == 'LZ4' or uppercase == 'LZ4_FRAME':             # <<<<<<<<<<<<<<
 *         return CCompressionType_LZ4_FRAME
 *     elif uppercase == 'LZ4_RAW':
*/
                      }

                      /* "pyarrow/io.pxi":2239
 *     elif uppercase == 'LZ4' or uppercase == 'LZ4_FRAME':
 *         return CCompressionType_LZ4_FRAME
 *     elif uppercase == 'LZ4_RAW':             # <<<<<<<<<<<<<<
 *         return CCompressionType_LZ4
 *     elif uppercase == 'SNAPPY':
*/
                      __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_v_uppercase, __pyx_mstate_global->__pyx_n_u_LZ4_RAW, Py_EQ)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(6, 2239, __pyx_L1_error)
                      if (__pyx_t_2) {

                        /* "pyarrow/io.pxi":2240
 *         return CCompressionType_LZ4_FRAME
 *     elif uppercase == 'LZ4_RAW':
 *         return CCompressionType_LZ4             # <<<<<<<<<<<<<<
 *     elif uppercase == 'SNAPPY':
 *         return CCompressionType_SNAPPY
*/
                        __pyx_r =  arrow::Compression::LZ4;
                        goto __pyx_L0;

                        /* "pyarrow/io.pxi":2239
 *     elif uppercase == 'LZ4' or uppercase == 'LZ4_FRAME':
 *         return CCompressionType_LZ4_FRAME
 *     elif uppercase == 'LZ4_RAW':             # <<<<<<<<<<<<<<
 *         return CCompressionType_LZ4
 *     elif uppercase == 'SNAPPY':
*/
                      }

                      /* "pyarrow/io.pxi":2241
 *     elif uppercase == 'LZ4_RAW':
 *         return CCompressionType_LZ4
 *     elif uppercase == 'SNAPPY':             # <<<<<<<<<<<<<<
 *         return CCompressionType_SNAPPY
 *     elif uppercase == 'ZSTD':
*/
                      __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_v_uppercase, __pyx_mstate_global->__pyx_n_u_SNAPPY, Py_EQ)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(6, 2241, __pyx_L1_error)
                      if (__pyx_t_2) {

                        /* "pyarrow/io.pxi":2242
 *         return CCompressionType_LZ4
 *     elif uppercase == 'SNAPPY':
 *         return CCompressionType_SNAPPY             # <<<<<<<<<<<<<<
 *     elif uppercase == 'ZSTD':
 *         return CCompressionType_ZSTD
*/
                        __pyx_r =  arrow::Compression::SNAPPY;
                        goto __pyx_L0;

                        /* "pyarrow/io.pxi":2241
 *     elif uppercase == 'LZ4_RAW':
 *         return CCompressionType_LZ4
 *     elif uppercase == 'SNAPPY':             # <<<<<<<<<<<<<<
 *         return CCompressionType_SNAPPY
 *     elif uppercase == 'ZSTD':
*/
                      }

                      /* "pyarrow/io.pxi":2243
 *     elif uppercase == 'SNAPPY':
 *         return CCompressionType_SNAPPY
 *     elif uppercase == 'ZSTD':             # <<<<<<<<<<<<<<
 *         return CCompressionType_ZSTD
 *     else:
*/
                      __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_v_uppercase, __pyx_mstate_global->__pyx_n_u_ZSTD, Py_EQ)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(6, 2243, __pyx_L1_error)
                      if (likely(__pyx_t_2)) {

                        /* "pyarrow/io.pxi":2244
 *         return CCompressionType_SNAPPY
 *     elif uppercase == 'ZSTD':
 *         return CCompressionType_ZSTD             # <<<<<<<<<<<<<<
 *     else:
 *         raise ValueError(f'Invalid value for compression: {name!r}')
*/
                        __pyx_r =  arrow::Compression::ZSTD;
                        goto __pyx_L0;

                        /* "pyarrow/io.pxi":2243
 *     elif uppercase == 'SNAPPY':
 *         return CCompressionType_SNAPPY
 *     elif uppercase == 'ZSTD':             # <<<<<<<<<<<<<<
 *         return CCompressionType_ZSTD
 *     else:
*/
                      }

                      /* "pyarrow/io.pxi":2246
 *         return CCompressionType_ZSTD
 *     else:
 *         raise ValueError(f'Invalid value for compression: {name!r}')             # <<<<<<<<<<<<<<
 * 
 * 
*/
                      /*else*/ {
                        __pyx_t_4 = NULL;
                        __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_name), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 2246, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_5);
                        __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_Invalid_value_for_compression, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 2246, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_6);
                        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                        __pyx_t_7 = 1;
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_6};
                          __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                          if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 2246, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_1);
                        }
                        __Pyx_Raise(__pyx_t_1, 0, 0, 0);
                        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                        __PYX_ERR(6, 2246, __pyx_L1_error)
                      }

                      /* "pyarrow/io.pxi":2229
 * 
 * 
 * cdef CCompressionType _ensure_compression(str name) except *:             # <<<<<<<<<<<<<<
 *     uppercase = name.upper()
 *     if uppercase == 'BZ2':
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_4);
                      __Pyx_XDECREF(__pyx_t_5);
                      __Pyx_XDECREF(__pyx_t_6);
                      __Pyx_AddTraceback("pyarrow.lib._ensure_compression", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = (enum  arrow::Compression::type) 0;
                      __pyx_L0:;
                      __Pyx_XDECREF(__pyx_v_uppercase);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":2274
 *     """
 * 
 *     def __init__(self, *, hole_size_limit=None, range_size_limit=None, lazy=None, prefetch_limit=None):             # <<<<<<<<<<<<<<
 *         self.wrapped = CCacheOptions.LazyDefaults()
 *         if hole_size_limit is not None:
*/

                    /* Python wrapper */
                    static int __pyx_pw_7pyarrow_3lib_12CacheOptions_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
                    static int __pyx_pw_7pyarrow_3lib_12CacheOptions_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
                      PyObject *__pyx_v_hole_size_limit = 0;
                      PyObject *__pyx_v_range_size_limit = 0;
                      PyObject *__pyx_v_lazy = 0;
                      PyObject *__pyx_v_prefetch_limit = 0;
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[4] = {0,0,0,0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      int __pyx_r;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_hole_size_limit,&__pyx_mstate_global->__pyx_n_u_range_size_limit,&__pyx_mstate_global->__pyx_n_u_lazy,&__pyx_mstate_global->__pyx_n_u_prefetch_limit,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(6, 2274, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, 0, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(6, 2274, __pyx_L3_error)
                          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
                          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
                          if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
                          if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None));
                        } else if (unlikely(__pyx_nargs != 0)) {
                          goto __pyx_L5_argtuple_error;
                        } else {
                          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
                          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
                          if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
                          if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None));
                        }
                        __pyx_v_hole_size_limit = values[0];
                        __pyx_v_range_size_limit = values[1];
                        __pyx_v_lazy = values[2];
                        __pyx_v_prefetch_limit = values[3];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, __pyx_nargs); __PYX_ERR(6, 2274, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.CacheOptions.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return -1;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_12CacheOptions___init__(((struct __pyx_obj_7pyarrow_3lib_CacheOptions *)__pyx_v_self), __pyx_v_hole_size_limit, __pyx_v_range_size_limit, __pyx_v_lazy, __pyx_v_prefetch_limit);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static int __pyx_pf_7pyarrow_3lib_12CacheOptions___init__(struct __pyx_obj_7pyarrow_3lib_CacheOptions *__pyx_v_self, PyObject *__pyx_v_hole_size_limit, PyObject *__pyx_v_range_size_limit, PyObject *__pyx_v_lazy, PyObject *__pyx_v_prefetch_limit) {
                      int __pyx_r;
                      int __pyx_t_1;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;

                      /* "pyarrow/io.pxi":2275
 * 
 *     def __init__(self, *, hole_size_limit=None, range_size_limit=None, lazy=None, prefetch_limit=None):
 *         self.wrapped = CCacheOptions.LazyDefaults()             # <<<<<<<<<<<<<<
 *         if hole_size_limit is not None:
 *             self.hole_size_limit = hole_size_limit
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "wrapped");
                        __PYX_ERR(6, 2275, __pyx_L1_error)
                      }
                      __pyx_v_self->wrapped = arrow::io::CacheOptions::LazyDefaults();

                      /* "pyarrow/io.pxi":2276
 *     def __init__(self, *, hole_size_limit=None, range_size_limit=None, lazy=None, prefetch_limit=None):
 *         self.wrapped = CCacheOptions.LazyDefaults()
 *         if hole_size_limit is not None:             # <<<<<<<<<<<<<<
 *             self.hole_size_limit = hole_size_limit
 *         if range_size_limit is not None:
*/
                      __pyx_t_1 = (__pyx_v_hole_size_limit != Py_None);
                      if (__pyx_t_1) {

                        /* "pyarrow/io.pxi":2277
 *         self.wrapped = CCacheOptions.LazyDefaults()
 *         if hole_size_limit is not None:
 *             self.hole_size_limit = hole_size_limit             # <<<<<<<<<<<<<<
 *         if range_size_limit is not None:
 *             self.range_size_limit = range_size_limit
*/
                        if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_hole_size_limit, __pyx_v_hole_size_limit) < (0)) __PYX_ERR(6, 2277, __pyx_L1_error)

                        /* "pyarrow/io.pxi":2276
 *     def __init__(self, *, hole_size_limit=None, range_size_limit=None, lazy=None, prefetch_limit=None):
 *         self.wrapped = CCacheOptions.LazyDefaults()
 *         if hole_size_limit is not None:             # <<<<<<<<<<<<<<
 *             self.hole_size_limit = hole_size_limit
 *         if range_size_limit is not None:
*/
                      }

                      /* "pyarrow/io.pxi":2278
 *         if hole_size_limit is not None:
 *             self.hole_size_limit = hole_size_limit
 *         if range_size_limit is not None:             # <<<<<<<<<<<<<<
 *             self.range_size_limit = range_size_limit
 *         if lazy is not None:
*/
                      __pyx_t_1 = (__pyx_v_range_size_limit != Py_None);
                      if (__pyx_t_1) {

                        /* "pyarrow/io.pxi":2279
 *             self.hole_size_limit = hole_size_limit
 *         if range_size_limit is not None:
 *             self.range_size_limit = range_size_limit             # <<<<<<<<<<<<<<
 *         if lazy is not None:
 *             self.lazy = lazy
*/
                        if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_range_size_limit, __pyx_v_range_size_limit) < (0)) __PYX_ERR(6, 2279, __pyx_L1_error)

                        /* "pyarrow/io.pxi":2278
 *         if hole_size_limit is not None:
 *             self.hole_size_limit = hole_size_limit
 *         if range_size_limit is not None:             # <<<<<<<<<<<<<<
 *             self.range_size_limit = range_size_limit
 *         if lazy is not None:
*/
                      }

                      /* "pyarrow/io.pxi":2280
 *         if range_size_limit is not None:
 *             self.range_size_limit = range_size_limit
 *         if lazy is not None:             # <<<<<<<<<<<<<<
 *             self.lazy = lazy
 *         if prefetch_limit is not None:
*/
                      __pyx_t_1 = (__pyx_v_lazy != Py_None);
                      if (__pyx_t_1) {

                        /* "pyarrow/io.pxi":2281
 *             self.range_size_limit = range_size_limit
 *         if lazy is not None:
 *             self.lazy = lazy             # <<<<<<<<<<<<<<
 *         if prefetch_limit is not None:
 *             self.prefetch_limit = prefetch_limit
*/
                        if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_lazy, __pyx_v_lazy) < (0)) __PYX_ERR(6, 2281, __pyx_L1_error)

                        /* "pyarrow/io.pxi":2280
 *         if range_size_limit is not None:
 *             self.range_size_limit = range_size_limit
 *         if lazy is not None:             # <<<<<<<<<<<<<<
 *             self.lazy = lazy
 *         if prefetch_limit is not None:
*/
                      }

                      /* "pyarrow/io.pxi":2282
 *         if lazy is not None:
 *             self.lazy = lazy
 *         if prefetch_limit is not None:             # <<<<<<<<<<<<<<
 *             self.prefetch_limit = prefetch_limit
 * 
*/
                      __pyx_t_1 = (__pyx_v_prefetch_limit != Py_None);
                      if (__pyx_t_1) {

                        /* "pyarrow/io.pxi":2283
 *             self.lazy = lazy
 *         if prefetch_limit is not None:
 *             self.prefetch_limit = prefetch_limit             # <<<<<<<<<<<<<<
 * 
 *     cdef void init(self, CCacheOptions options):
*/
                        if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_prefetch_limit, __pyx_v_prefetch_limit) < (0)) __PYX_ERR(6, 2283, __pyx_L1_error)

                        /* "pyarrow/io.pxi":2282
 *         if lazy is not None:
 *             self.lazy = lazy
 *         if prefetch_limit is not None:             # <<<<<<<<<<<<<<
 *             self.prefetch_limit = prefetch_limit
 * 
*/
                      }

                      /* "pyarrow/io.pxi":2274
 *     """
 * 
 *     def __init__(self, *, hole_size_limit=None, range_size_limit=None, lazy=None, prefetch_limit=None):             # <<<<<<<<<<<<<<
 *         self.wrapped = CCacheOptions.LazyDefaults()
 *         if hole_size_limit is not None:
*/

                      /* function exit code */
                      __pyx_r = 0;
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib.CacheOptions.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = -1;
                      __pyx_L0:;
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":2285
 *             self.prefetch_limit = prefetch_limit
 * 
 *     cdef void init(self, CCacheOptions options):             # <<<<<<<<<<<<<<
 *         self.wrapped = options
 * 
*/

                    static void __pyx_f_7pyarrow_3lib_12CacheOptions_init(struct __pyx_obj_7pyarrow_3lib_CacheOptions *__pyx_v_self, arrow::io::CacheOptions __pyx_v_options) {
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;

                      /* "pyarrow/io.pxi":2286
 * 
 *     cdef void init(self, CCacheOptions options):
 *         self.wrapped = options             # <<<<<<<<<<<<<<
 * 
 *     cdef inline CCacheOptions unwrap(self):
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "wrapped");
                        __PYX_ERR(6, 2286, __pyx_L1_error)
                      }
                      __pyx_v_self->wrapped = __pyx_v_options;

                      /* "pyarrow/io.pxi":2285
 *             self.prefetch_limit = prefetch_limit
 * 
 *     cdef void init(self, CCacheOptions options):             # <<<<<<<<<<<<<<
 *         self.wrapped = options
 * 
*/

                      /* function exit code */
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib.CacheOptions.init", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_L0:;
                    }

                    /* "pyarrow/io.pxi":2288
 *         self.wrapped = options
 * 
 *     cdef inline CCacheOptions unwrap(self):             # <<<<<<<<<<<<<<
 *         return self.wrapped
 * 
*/

                    static CYTHON_INLINE arrow::io::CacheOptions __pyx_f_7pyarrow_3lib_12CacheOptions_unwrap(struct __pyx_obj_7pyarrow_3lib_CacheOptions *__pyx_v_self) {
                      arrow::io::CacheOptions __pyx_r;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;

                      /* "pyarrow/io.pxi":2289
 * 
 *     cdef inline CCacheOptions unwrap(self):
 *         return self.wrapped             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "wrapped");
                        __PYX_ERR(6, 2289, __pyx_L1_error)
                      }
                      __pyx_r = __pyx_v_self->wrapped;
                      goto __pyx_L0;

                      /* "pyarrow/io.pxi":2288
 *         self.wrapped = options
 * 
 *     cdef inline CCacheOptions unwrap(self):             # <<<<<<<<<<<<<<
 *         return self.wrapped
 * 
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib.CacheOptions.unwrap", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_pretend_to_initialize(&__pyx_r);
                      __pyx_L0:;
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":2291
 *         return self.wrapped
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     cdef wrap(CCacheOptions options):
 *         self = CacheOptions()
*/

                    static PyObject *__pyx_f_7pyarrow_3lib_12CacheOptions_wrap(arrow::io::CacheOptions __pyx_v_options) {
                      struct __pyx_obj_7pyarrow_3lib_CacheOptions *__pyx_v_self = NULL;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      size_t __pyx_t_3;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("wrap", 0);

                      /* "pyarrow/io.pxi":2293
 *     @staticmethod
 *     cdef wrap(CCacheOptions options):
 *         self = CacheOptions()             # <<<<<<<<<<<<<<
 *         self.init(options)
 *         return self
*/
                      __pyx_t_2 = NULL;
                      __pyx_t_3 = 1;
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
                        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_CacheOptions, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 2293, __pyx_L1_error)
                        __Pyx_GOTREF((PyObject *)__pyx_t_1);
                      }
                      __pyx_v_self = ((struct __pyx_obj_7pyarrow_3lib_CacheOptions *)__pyx_t_1);
                      __pyx_t_1 = 0;

                      /* "pyarrow/io.pxi":2294
 *     cdef wrap(CCacheOptions options):
 *         self = CacheOptions()
 *         self.init(options)             # <<<<<<<<<<<<<<
 *         return self
 * 
*/
                      ((struct __pyx_vtabstruct_7pyarrow_3lib_CacheOptions *)__pyx_v_self->__pyx_vtab)->init(__pyx_v_self, __pyx_v_options); if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 2294, __pyx_L1_error)

                      /* "pyarrow/io.pxi":2295
 *         self = CacheOptions()
 *         self.init(options)
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
                      __Pyx_XDECREF(__pyx_r);
                      __Pyx_INCREF((PyObject *)__pyx_v_self);
                      __pyx_r = ((PyObject *)__pyx_v_self);
                      goto __pyx_L0;

                      /* "pyarrow/io.pxi":2291
 *         return self.wrapped
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     cdef wrap(CCacheOptions options):
 *         self = CacheOptions()
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_AddTraceback("pyarrow.lib.CacheOptions.wrap", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = 0;
                      __pyx_L0:;
                      __Pyx_XDECREF((PyObject *)__pyx_v_self);
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":2297
 *         return self
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def hole_size_limit(self):
 *         return self.wrapped.hole_size_limit
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_12CacheOptions_15hole_size_limit_1__get__(PyObject *__pyx_v_self); /*proto*/
                    static PyObject *__pyx_pw_7pyarrow_3lib_12CacheOptions_15hole_size_limit_1__get__(PyObject *__pyx_v_self) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_12CacheOptions_15hole_size_limit___get__(((struct __pyx_obj_7pyarrow_3lib_CacheOptions *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_12CacheOptions_15hole_size_limit___get__(struct __pyx_obj_7pyarrow_3lib_CacheOptions *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__get__", 0);

                      /* "pyarrow/io.pxi":2299
 *     @property
 *     def hole_size_limit(self):
 *         return self.wrapped.hole_size_limit             # <<<<<<<<<<<<<<
 * 
 *     @hole_size_limit.setter
*/
                      __Pyx_XDECREF(__pyx_r);
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "wrapped");
                        __PYX_ERR(6, 2299, __pyx_L1_error)
                      }
                      __pyx_t_1 = __Pyx_PyLong_From_int64_t(__pyx_v_self->wrapped.hole_size_limit); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 2299, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_r = __pyx_t_1;
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/io.pxi":2297
 *         return self
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def hole_size_limit(self):
 *         return self.wrapped.hole_size_limit
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_AddTraceback("pyarrow.lib.CacheOptions.hole_size_limit.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":2301
 *         return self.wrapped.hole_size_limit
 * 
 *     @hole_size_limit.setter             # <<<<<<<<<<<<<<
 *     def hole_size_limit(self, hole_size_limit):
 *         self.wrapped.hole_size_limit = hole_size_limit
*/

                    /* Python wrapper */
                    static int __pyx_pw_7pyarrow_3lib_12CacheOptions_15hole_size_limit_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_hole_size_limit); /*proto*/
                    static int __pyx_pw_7pyarrow_3lib_12CacheOptions_15hole_size_limit_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_hole_size_limit) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      int __pyx_r;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_12CacheOptions_15hole_size_limit_2__set__(((struct __pyx_obj_7pyarrow_3lib_CacheOptions *)__pyx_v_self), ((PyObject *)__pyx_v_hole_size_limit));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static int __pyx_pf_7pyarrow_3lib_12CacheOptions_15hole_size_limit_2__set__(struct __pyx_obj_7pyarrow_3lib_CacheOptions *__pyx_v_self, PyObject *__pyx_v_hole_size_limit) {
                      int __pyx_r;
                      int64_t __pyx_t_1;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;

                      /* "pyarrow/io.pxi":2303
 *     @hole_size_limit.setter
 *     def hole_size_limit(self, hole_size_limit):
 *         self.wrapped.hole_size_limit = hole_size_limit             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
                      __pyx_t_1 = __Pyx_PyLong_As_int64_t(__pyx_v_hole_size_limit); if (unlikely((__pyx_t_1 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(6, 2303, __pyx_L1_error)
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "wrapped");
                        __PYX_ERR(6, 2303, __pyx_L1_error)
                      }
                      __pyx_v_self->wrapped.hole_size_limit = __pyx_t_1;

                      /* "pyarrow/io.pxi":2301
 *         return self.wrapped.hole_size_limit
 * 
 *     @hole_size_limit.setter             # <<<<<<<<<<<<<<
 *     def hole_size_limit(self, hole_size_limit):
 *         self.wrapped.hole_size_limit = hole_size_limit
*/

                      /* function exit code */
                      __pyx_r = 0;
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib.CacheOptions.hole_size_limit.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = -1;
                      __pyx_L0:;
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":2305
 *         self.wrapped.hole_size_limit = hole_size_limit
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def range_size_limit(self):
 *         return self.wrapped.range_size_limit
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_12CacheOptions_16range_size_limit_1__get__(PyObject *__pyx_v_self); /*proto*/
                    static PyObject *__pyx_pw_7pyarrow_3lib_12CacheOptions_16range_size_limit_1__get__(PyObject *__pyx_v_self) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_12CacheOptions_16range_size_limit___get__(((struct __pyx_obj_7pyarrow_3lib_CacheOptions *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_12CacheOptions_16range_size_limit___get__(struct __pyx_obj_7pyarrow_3lib_CacheOptions *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__get__", 0);

                      /* "pyarrow/io.pxi":2307
 *     @property
 *     def range_size_limit(self):
 *         return self.wrapped.range_size_limit             # <<<<<<<<<<<<<<
 * 
 *     @range_size_limit.setter
*/
                      __Pyx_XDECREF(__pyx_r);
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "wrapped");
                        __PYX_ERR(6, 2307, __pyx_L1_error)
                      }
                      __pyx_t_1 = __Pyx_PyLong_From_int64_t(__pyx_v_self->wrapped.range_size_limit); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 2307, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_r = __pyx_t_1;
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/io.pxi":2305
 *         self.wrapped.hole_size_limit = hole_size_limit
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def range_size_limit(self):
 *         return self.wrapped.range_size_limit
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_AddTraceback("pyarrow.lib.CacheOptions.range_size_limit.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":2309
 *         return self.wrapped.range_size_limit
 * 
 *     @range_size_limit.setter             # <<<<<<<<<<<<<<
 *     def range_size_limit(self, range_size_limit):
 *         self.wrapped.range_size_limit = range_size_limit
*/

                    /* Python wrapper */
                    static int __pyx_pw_7pyarrow_3lib_12CacheOptions_16range_size_limit_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_range_size_limit); /*proto*/
                    static int __pyx_pw_7pyarrow_3lib_12CacheOptions_16range_size_limit_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_range_size_limit) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      int __pyx_r;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_12CacheOptions_16range_size_limit_2__set__(((struct __pyx_obj_7pyarrow_3lib_CacheOptions *)__pyx_v_self), ((PyObject *)__pyx_v_range_size_limit));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static int __pyx_pf_7pyarrow_3lib_12CacheOptions_16range_size_limit_2__set__(struct __pyx_obj_7pyarrow_3lib_CacheOptions *__pyx_v_self, PyObject *__pyx_v_range_size_limit) {
                      int __pyx_r;
                      int64_t __pyx_t_1;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;

                      /* "pyarrow/io.pxi":2311
 *     @range_size_limit.setter
 *     def range_size_limit(self, range_size_limit):
 *         self.wrapped.range_size_limit = range_size_limit             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
                      __pyx_t_1 = __Pyx_PyLong_As_int64_t(__pyx_v_range_size_limit); if (unlikely((__pyx_t_1 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(6, 2311, __pyx_L1_error)
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "wrapped");
                        __PYX_ERR(6, 2311, __pyx_L1_error)
                      }
                      __pyx_v_self->wrapped.range_size_limit = __pyx_t_1;

                      /* "pyarrow/io.pxi":2309
 *         return self.wrapped.range_size_limit
 * 
 *     @range_size_limit.setter             # <<<<<<<<<<<<<<
 *     def range_size_limit(self, range_size_limit):
 *         self.wrapped.range_size_limit = range_size_limit
*/

                      /* function exit code */
                      __pyx_r = 0;
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib.CacheOptions.range_size_limit.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = -1;
                      __pyx_L0:;
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":2313
 *         self.wrapped.range_size_limit = range_size_limit
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def lazy(self):
 *         return self.wrapped.lazy
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_12CacheOptions_4lazy_1__get__(PyObject *__pyx_v_self); /*proto*/
                    static PyObject *__pyx_pw_7pyarrow_3lib_12CacheOptions_4lazy_1__get__(PyObject *__pyx_v_self) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_12CacheOptions_4lazy___get__(((struct __pyx_obj_7pyarrow_3lib_CacheOptions *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_12CacheOptions_4lazy___get__(struct __pyx_obj_7pyarrow_3lib_CacheOptions *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__get__", 0);

                      /* "pyarrow/io.pxi":2315
 *     @property
 *     def lazy(self):
 *         return self.wrapped.lazy             # <<<<<<<<<<<<<<
 * 
 *     @lazy.setter
*/
                      __Pyx_XDECREF(__pyx_r);
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "wrapped");
                        __PYX_ERR(6, 2315, __pyx_L1_error)
                      }
                      __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->wrapped.lazy); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 2315, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_r = __pyx_t_1;
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/io.pxi":2313
 *         self.wrapped.range_size_limit = range_size_limit
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def lazy(self):
 *         return self.wrapped.lazy
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_AddTraceback("pyarrow.lib.CacheOptions.lazy.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":2317
 *         return self.wrapped.lazy
 * 
 *     @lazy.setter             # <<<<<<<<<<<<<<
 *     def lazy(self, lazy):
 *         self.wrapped.lazy = lazy
*/

                    /* Python wrapper */
                    static int __pyx_pw_7pyarrow_3lib_12CacheOptions_4lazy_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_lazy); /*proto*/
                    static int __pyx_pw_7pyarrow_3lib_12CacheOptions_4lazy_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_lazy) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      int __pyx_r;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_12CacheOptions_4lazy_2__set__(((struct __pyx_obj_7pyarrow_3lib_CacheOptions *)__pyx_v_self), ((PyObject *)__pyx_v_lazy));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static int __pyx_pf_7pyarrow_3lib_12CacheOptions_4lazy_2__set__(struct __pyx_obj_7pyarrow_3lib_CacheOptions *__pyx_v_self, PyObject *__pyx_v_lazy) {
                      int __pyx_r;
                      bool __pyx_t_1;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;

                      /* "pyarrow/io.pxi":2319
 *     @lazy.setter
 *     def lazy(self, lazy):
 *         self.wrapped.lazy = lazy             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
                      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_lazy); if (unlikely((__pyx_t_1 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(6, 2319, __pyx_L1_error)
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "wrapped");
                        __PYX_ERR(6, 2319, __pyx_L1_error)
                      }
                      __pyx_v_self->wrapped.lazy = __pyx_t_1;

                      /* "pyarrow/io.pxi":2317
 *         return self.wrapped.lazy
 * 
 *     @lazy.setter             # <<<<<<<<<<<<<<
 *     def lazy(self, lazy):
 *         self.wrapped.lazy = lazy
*/

                      /* function exit code */
                      __pyx_r = 0;
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib.CacheOptions.lazy.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = -1;
                      __pyx_L0:;
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":2321
 *         self.wrapped.lazy = lazy
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def prefetch_limit(self):
 *         return self.wrapped.prefetch_limit
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_12CacheOptions_14prefetch_limit_1__get__(PyObject *__pyx_v_self); /*proto*/
                    static PyObject *__pyx_pw_7pyarrow_3lib_12CacheOptions_14prefetch_limit_1__get__(PyObject *__pyx_v_self) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_12CacheOptions_14prefetch_limit___get__(((struct __pyx_obj_7pyarrow_3lib_CacheOptions *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_12CacheOptions_14prefetch_limit___get__(struct __pyx_obj_7pyarrow_3lib_CacheOptions *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__get__", 0);

                      /* "pyarrow/io.pxi":2323
 *     @property
 *     def prefetch_limit(self):
 *         return self.wrapped.prefetch_limit             # <<<<<<<<<<<<<<
 * 
 *     @prefetch_limit.setter
*/
                      __Pyx_XDECREF(__pyx_r);
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "wrapped");
                        __PYX_ERR(6, 2323, __pyx_L1_error)
                      }
                      __pyx_t_1 = __Pyx_PyLong_From_int64_t(__pyx_v_self->wrapped.prefetch_limit); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 2323, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_r = __pyx_t_1;
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/io.pxi":2321
 *         self.wrapped.lazy = lazy
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def prefetch_limit(self):
 *         return self.wrapped.prefetch_limit
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_AddTraceback("pyarrow.lib.CacheOptions.prefetch_limit.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":2325
 *         return self.wrapped.prefetch_limit
 * 
 *     @prefetch_limit.setter             # <<<<<<<<<<<<<<
 *     def prefetch_limit(self, prefetch_limit):
 *         self.wrapped.prefetch_limit = prefetch_limit
*/

                    /* Python wrapper */
                    static int __pyx_pw_7pyarrow_3lib_12CacheOptions_14prefetch_limit_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_prefetch_limit); /*proto*/
                    static int __pyx_pw_7pyarrow_3lib_12CacheOptions_14prefetch_limit_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_prefetch_limit) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      int __pyx_r;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_12CacheOptions_14prefetch_limit_2__set__(((struct __pyx_obj_7pyarrow_3lib_CacheOptions *)__pyx_v_self), ((PyObject *)__pyx_v_prefetch_limit));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static int __pyx_pf_7pyarrow_3lib_12CacheOptions_14prefetch_limit_2__set__(struct __pyx_obj_7pyarrow_3lib_CacheOptions *__pyx_v_self, PyObject *__pyx_v_prefetch_limit) {
                      int __pyx_r;
                      int64_t __pyx_t_1;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;

                      /* "pyarrow/io.pxi":2327
 *     @prefetch_limit.setter
 *     def prefetch_limit(self, prefetch_limit):
 *         self.wrapped.prefetch_limit = prefetch_limit             # <<<<<<<<<<<<<<
 * 
 *     def __eq__(self, CacheOptions other):
*/
                      __pyx_t_1 = __Pyx_PyLong_As_int64_t(__pyx_v_prefetch_limit); if (unlikely((__pyx_t_1 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(6, 2327, __pyx_L1_error)
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "wrapped");
                        __PYX_ERR(6, 2327, __pyx_L1_error)
                      }
                      __pyx_v_self->wrapped.prefetch_limit = __pyx_t_1;

                      /* "pyarrow/io.pxi":2325
 *         return self.wrapped.prefetch_limit
 * 
 *     @prefetch_limit.setter             # <<<<<<<<<<<<<<
 *     def prefetch_limit(self, prefetch_limit):
 *         self.wrapped.prefetch_limit = prefetch_limit
*/

                      /* function exit code */
                      __pyx_r = 0;
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib.CacheOptions.prefetch_limit.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = -1;
                      __pyx_L0:;
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":2329
 *         self.wrapped.prefetch_limit = prefetch_limit
 * 
 *     def __eq__(self, CacheOptions other):             # <<<<<<<<<<<<<<
 *         try:
 *             return self.unwrap().Equals(other.unwrap())
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_12CacheOptions_3__eq__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
                    static PyObject *__pyx_pw_7pyarrow_3lib_12CacheOptions_3__eq__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__eq__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_CacheOptions, 1, "other", 0))) __PYX_ERR(6, 2329, __pyx_L1_error)
                      __pyx_r = __pyx_pf_7pyarrow_3lib_12CacheOptions_2__eq__(((struct __pyx_obj_7pyarrow_3lib_CacheOptions *)__pyx_v_self), ((struct __pyx_obj_7pyarrow_3lib_CacheOptions *)__pyx_v_other));

                      /* function exit code */
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __pyx_r = NULL;
                      goto __pyx_L5_cleaned_up;
                      __pyx_L0:;
                      __pyx_L5_cleaned_up:;
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_12CacheOptions_2__eq__(struct __pyx_obj_7pyarrow_3lib_CacheOptions *__pyx_v_self, struct __pyx_obj_7pyarrow_3lib_CacheOptions *__pyx_v_other) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      PyObject *__pyx_t_3 = NULL;
                      arrow::io::CacheOptions __pyx_t_4;
                      arrow::io::CacheOptions __pyx_t_5;
                      PyObject *__pyx_t_6 = NULL;
                      int __pyx_t_7;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__eq__", 0);

                      /* "pyarrow/io.pxi":2330
 * 
 *     def __eq__(self, CacheOptions other):
 *         try:             # <<<<<<<<<<<<<<
 *             return self.unwrap().Equals(other.unwrap())
 *         except TypeError:
*/
                      {
                        __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:*/ {

                          /* "pyarrow/io.pxi":2331
 *     def __eq__(self, CacheOptions other):
 *         try:
 *             return self.unwrap().Equals(other.unwrap())             # <<<<<<<<<<<<<<
 *         except TypeError:
 *             return False
*/
                          __Pyx_XDECREF(__pyx_r);
                          if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                            PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "unwrap");
                            __PYX_ERR(6, 2331, __pyx_L3_error)
                          }
                          __pyx_t_4 = __pyx_f_7pyarrow_3lib_12CacheOptions_unwrap(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 2331, __pyx_L3_error)
                          if (unlikely(((PyObject *)__pyx_v_other) == Py_None)) {
                            PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "unwrap");
                            __PYX_ERR(6, 2331, __pyx_L3_error)
                          }
                          __pyx_t_5 = __pyx_f_7pyarrow_3lib_12CacheOptions_unwrap(__pyx_v_other); if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 2331, __pyx_L3_error)
                          __pyx_t_6 = __Pyx_PyBool_FromLong(__pyx_t_4.operator==(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_5))); if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 2331, __pyx_L3_error)
                          __Pyx_GOTREF(__pyx_t_6);
                          __pyx_r = __pyx_t_6;
                          __pyx_t_6 = 0;
                          goto __pyx_L7_try_return;

                          /* "pyarrow/io.pxi":2330
 * 
 *     def __eq__(self, CacheOptions other):
 *         try:             # <<<<<<<<<<<<<<
 *             return self.unwrap().Equals(other.unwrap())
 *         except TypeError:
*/
                        }
                        __pyx_L3_error:;
                        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;

                        /* "pyarrow/io.pxi":2332
 *         try:
 *             return self.unwrap().Equals(other.unwrap())
 *         except TypeError:             # <<<<<<<<<<<<<<
 *             return False
 * 
*/
                        __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_TypeError))));
                        if (__pyx_t_7) {
                          __Pyx_ErrRestore(0,0,0);

                          /* "pyarrow/io.pxi":2333
 *             return self.unwrap().Equals(other.unwrap())
 *         except TypeError:
 *             return False             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
*/
                          __Pyx_XDECREF(__pyx_r);
                          __Pyx_INCREF(Py_False);
                          __pyx_r = Py_False;
                          goto __pyx_L6_except_return;
                        }
                        goto __pyx_L5_except_error;

                        /* "pyarrow/io.pxi":2330
 * 
 *     def __eq__(self, CacheOptions other):
 *         try:             # <<<<<<<<<<<<<<
 *             return self.unwrap().Equals(other.unwrap())
 *         except TypeError:
*/
                        __pyx_L5_except_error:;
                        __Pyx_XGIVEREF(__pyx_t_1);
                        __Pyx_XGIVEREF(__pyx_t_2);
                        __Pyx_XGIVEREF(__pyx_t_3);
                        __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
                        goto __pyx_L1_error;
                        __pyx_L7_try_return:;
                        __Pyx_XGIVEREF(__pyx_t_1);
                        __Pyx_XGIVEREF(__pyx_t_2);
                        __Pyx_XGIVEREF(__pyx_t_3);
                        __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
                        goto __pyx_L0;
                        __pyx_L6_except_return:;
                        __Pyx_XGIVEREF(__pyx_t_1);
                        __Pyx_XGIVEREF(__pyx_t_2);
                        __Pyx_XGIVEREF(__pyx_t_3);
                        __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
                        goto __pyx_L0;
                      }

                      /* "pyarrow/io.pxi":2329
 *         self.wrapped.prefetch_limit = prefetch_limit
 * 
 *     def __eq__(self, CacheOptions other):             # <<<<<<<<<<<<<<
 *         try:
 *             return self.unwrap().Equals(other.unwrap())
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_6);
                      __Pyx_AddTraceback("pyarrow.lib.CacheOptions.__eq__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":2335
 *             return False
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_network_metrics(time_to_first_byte_millis, transfer_bandwidth_mib_per_sec,
 *                              ideal_bandwidth_utilization_frac=0.9, max_ideal_request_size_mib=64):
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_12CacheOptions_5from_network_metrics(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_12CacheOptions_4from_network_metrics, "CacheOptions.from_network_metrics(time_to_first_byte_millis, transfer_bandwidth_mib_per_sec, ideal_bandwidth_utilization_frac=0.9, max_ideal_request_size_mib=64)\n\nCreate suitable CacheOptions based on provided network metrics.\n\nTypically this will be used with object storage solutions like Amazon S3,\nGoogle Cloud Storage and Azure Blob Storage.\n\nParameters\n----------\ntime_to_first_byte_millis : int\n    Seek-time or Time-To-First-Byte (TTFB) in milliseconds, also called call\n    setup latency of a new read request. The value is a positive integer.\ntransfer_bandwidth_mib_per_sec : int\n    Data transfer Bandwidth (BW) in MiB/sec (per connection). The value is a positive\n    integer.\nideal_bandwidth_utilization_frac : int, default 0.9\n    Transfer bandwidth utilization fraction (per connection) to maximize the net\n    data load. The value is a positive float less than 1.\nmax_ideal_request_size_mib : int, default 64\n    The maximum single data request size (in MiB) to maximize the net data load.\n\nReturns\n-------\nCacheOptions");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_12CacheOptions_5from_network_metrics = {"from_network_metrics", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12CacheOptions_5from_network_metrics, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12CacheOptions_4from_network_metrics};
                    static PyObject *__pyx_pw_7pyarrow_3lib_12CacheOptions_5from_network_metrics(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      PyObject *__pyx_v_time_to_first_byte_millis = 0;
                      PyObject *__pyx_v_transfer_bandwidth_mib_per_sec = 0;
                      PyObject *__pyx_v_ideal_bandwidth_utilization_frac = 0;
                      PyObject *__pyx_v_max_ideal_request_size_mib = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[4] = {0,0,0,0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("from_network_metrics (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_time_to_first_byte_millis,&__pyx_mstate_global->__pyx_n_u_transfer_bandwidth_mib_per_sec,&__pyx_mstate_global->__pyx_n_u_ideal_bandwidth_utilization_frac,&__pyx_mstate_global->__pyx_n_u_max_ideal_request_size_mib,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(6, 2335, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  4:
                            values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(6, 2335, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  3:
                            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(6, 2335, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  2:
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(6, 2335, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 2335, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "from_network_metrics", 0) < (0)) __PYX_ERR(6, 2335, __pyx_L3_error)
                          if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_float_0_9));
                          if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_int_64));
                          for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("from_network_metrics", 0, 2, 4, i); __PYX_ERR(6, 2335, __pyx_L3_error) }
                          }
                        } else {
                          switch (__pyx_nargs) {
                            case  4:
                            values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(6, 2335, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  3:
                            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(6, 2335, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  2:
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(6, 2335, __pyx_L3_error)
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 2335, __pyx_L3_error)
                            break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_float_0_9));
                          if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_int_64));
                        }
                        __pyx_v_time_to_first_byte_millis = values[0];
                        __pyx_v_transfer_bandwidth_mib_per_sec = values[1];
                        __pyx_v_ideal_bandwidth_utilization_frac = values[2];
                        __pyx_v_max_ideal_request_size_mib = values[3];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("from_network_metrics", 0, 2, 4, __pyx_nargs); __PYX_ERR(6, 2335, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.CacheOptions.from_network_metrics", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_12CacheOptions_4from_network_metrics(__pyx_v_time_to_first_byte_millis, __pyx_v_transfer_bandwidth_mib_per_sec, __pyx_v_ideal_bandwidth_utilization_frac, __pyx_v_max_ideal_request_size_mib);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_12CacheOptions_4from_network_metrics(PyObject *__pyx_v_time_to_first_byte_millis, PyObject *__pyx_v_transfer_bandwidth_mib_per_sec, PyObject *__pyx_v_ideal_bandwidth_utilization_frac, PyObject *__pyx_v_max_ideal_request_size_mib) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int64_t __pyx_t_1;
                      int64_t __pyx_t_2;
                      double __pyx_t_3;
                      int64_t __pyx_t_4;
                      PyObject *__pyx_t_5 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("from_network_metrics", 0);

                      /* "pyarrow/io.pxi":2362
 *         CacheOptions
 *         """
 *         return CacheOptions.wrap(CCacheOptions.MakeFromNetworkMetrics(             # <<<<<<<<<<<<<<
 *             time_to_first_byte_millis, transfer_bandwidth_mib_per_sec,
 *             ideal_bandwidth_utilization_frac, max_ideal_request_size_mib))
*/
                      __Pyx_XDECREF(__pyx_r);

                      /* "pyarrow/io.pxi":2363
 *         """
 *         return CacheOptions.wrap(CCacheOptions.MakeFromNetworkMetrics(
 *             time_to_first_byte_millis, transfer_bandwidth_mib_per_sec,             # <<<<<<<<<<<<<<
 *             ideal_bandwidth_utilization_frac, max_ideal_request_size_mib))
 * 
*/
                      __pyx_t_1 = __Pyx_PyLong_As_int64_t(__pyx_v_time_to_first_byte_millis); if (unlikely((__pyx_t_1 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(6, 2363, __pyx_L1_error)
                      __pyx_t_2 = __Pyx_PyLong_As_int64_t(__pyx_v_transfer_bandwidth_mib_per_sec); if (unlikely((__pyx_t_2 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(6, 2363, __pyx_L1_error)

                      /* "pyarrow/io.pxi":2364
 *         return CacheOptions.wrap(CCacheOptions.MakeFromNetworkMetrics(
 *             time_to_first_byte_millis, transfer_bandwidth_mib_per_sec,
 *             ideal_bandwidth_utilization_frac, max_ideal_request_size_mib))             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
*/
                      __pyx_t_3 = __Pyx_PyFloat_AsDouble(__pyx_v_ideal_bandwidth_utilization_frac); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(6, 2364, __pyx_L1_error)
                      __pyx_t_4 = __Pyx_PyLong_As_int64_t(__pyx_v_max_ideal_request_size_mib); if (unlikely((__pyx_t_4 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(6, 2364, __pyx_L1_error)

                      /* "pyarrow/io.pxi":2362
 *         CacheOptions
 *         """
 *         return CacheOptions.wrap(CCacheOptions.MakeFromNetworkMetrics(             # <<<<<<<<<<<<<<
 *             time_to_first_byte_millis, transfer_bandwidth_mib_per_sec,
 *             ideal_bandwidth_utilization_frac, max_ideal_request_size_mib))
*/
                      __pyx_t_5 = __pyx_f_7pyarrow_3lib_12CacheOptions_wrap(arrow::io::CacheOptions::MakeFromNetworkMetrics(__pyx_t_1, __pyx_t_2, __pyx_t_3, __pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 2362, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_5);
                      __pyx_r = __pyx_t_5;
                      __pyx_t_5 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/io.pxi":2335
 *             return False
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_network_metrics(time_to_first_byte_millis, transfer_bandwidth_mib_per_sec,
 *                              ideal_bandwidth_utilization_frac=0.9, max_ideal_request_size_mib=64):
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_5);
                      __Pyx_AddTraceback("pyarrow.lib.CacheOptions.from_network_metrics", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":2366
 *             ideal_bandwidth_utilization_frac, max_ideal_request_size_mib))
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def _reconstruct(kwargs):
 *         # __reduce__ doesn't allow passing named arguments directly to the
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_12CacheOptions_7_reconstruct(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_12CacheOptions_6_reconstruct, "CacheOptions._reconstruct(kwargs)");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_12CacheOptions_7_reconstruct = {"_reconstruct", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12CacheOptions_7_reconstruct, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12CacheOptions_6_reconstruct};
                    static PyObject *__pyx_pw_7pyarrow_3lib_12CacheOptions_7_reconstruct(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      PyObject *__pyx_v_kwargs = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[1] = {0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("_reconstruct (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_kwargs,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(6, 2366, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 2366, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_reconstruct", 0) < (0)) __PYX_ERR(6, 2366, __pyx_L3_error)
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_reconstruct", 1, 1, 1, i); __PYX_ERR(6, 2366, __pyx_L3_error) }
                          }
                        } else if (unlikely(__pyx_nargs != 1)) {
                          goto __pyx_L5_argtuple_error;
                        } else {
                          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 2366, __pyx_L3_error)
                        }
                        __pyx_v_kwargs = values[0];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("_reconstruct", 1, 1, 1, __pyx_nargs); __PYX_ERR(6, 2366, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.CacheOptions._reconstruct", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_12CacheOptions_6_reconstruct(__pyx_v_kwargs);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_12CacheOptions_6_reconstruct(PyObject *__pyx_v_kwargs) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("_reconstruct", 0);

                      /* "pyarrow/io.pxi":2370
 *         # __reduce__ doesn't allow passing named arguments directly to the
 *         # reconstructor, hence this wrapper.
 *         return CacheOptions(**kwargs)             # <<<<<<<<<<<<<<
 * 
 *     def __reduce__(self):
*/
                      __Pyx_XDECREF(__pyx_r);
                      if (unlikely(__pyx_v_kwargs == Py_None)) {
                        PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType");
                        __PYX_ERR(6, 2370, __pyx_L1_error)
                      }
                      if (likely(PyDict_CheckExact(__pyx_v_kwargs))) {
                        __pyx_t_1 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 2370, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      } else {
                        __pyx_t_1 = __Pyx_PyObject_CallOneArg((PyObject*)&PyDict_Type, __pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 2370, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_CacheOptions), __pyx_mstate_global->__pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 2370, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_2);
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      __pyx_r = __pyx_t_2;
                      __pyx_t_2 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/io.pxi":2366
 *             ideal_bandwidth_utilization_frac, max_ideal_request_size_mib))
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def _reconstruct(kwargs):
 *         # __reduce__ doesn't allow passing named arguments directly to the
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_AddTraceback("pyarrow.lib.CacheOptions._reconstruct", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":2372
 *         return CacheOptions(**kwargs)
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         kwargs = dict(
 *             hole_size_limit=self.hole_size_limit,
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_12CacheOptions_9__reduce__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_12CacheOptions_8__reduce__, "CacheOptions.__reduce__(self)");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_12CacheOptions_9__reduce__ = {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12CacheOptions_9__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12CacheOptions_8__reduce__};
                    static PyObject *__pyx_pw_7pyarrow_3lib_12CacheOptions_9__reduce__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__reduce__ (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce__", 1, 0, 0, __pyx_nargs); return NULL; }
                      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                      if (unlikely(__pyx_kwds_len < 0)) return NULL;
                      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce__", __pyx_kwds); return NULL;}
                      __pyx_r = __pyx_pf_7pyarrow_3lib_12CacheOptions_8__reduce__(((struct __pyx_obj_7pyarrow_3lib_CacheOptions *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_12CacheOptions_8__reduce__(struct __pyx_obj_7pyarrow_3lib_CacheOptions *__pyx_v_self) {
                      PyObject *__pyx_v_kwargs = NULL;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      PyObject *__pyx_t_3 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__reduce__", 0);

                      /* "pyarrow/io.pxi":2374
 *     def __reduce__(self):
 *         kwargs = dict(
 *             hole_size_limit=self.hole_size_limit,             # <<<<<<<<<<<<<<
 *             range_size_limit=self.range_size_limit,
 *             lazy=self.lazy,
*/
                      __pyx_t_1 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 2374, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_hole_size_limit); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 2374, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_2);
                      if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_hole_size_limit, __pyx_t_2) < (0)) __PYX_ERR(6, 2374, __pyx_L1_error)
                      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

                      /* "pyarrow/io.pxi":2375
 *         kwargs = dict(
 *             hole_size_limit=self.hole_size_limit,
 *             range_size_limit=self.range_size_limit,             # <<<<<<<<<<<<<<
 *             lazy=self.lazy,
 *             prefetch_limit=self.prefetch_limit,
*/
                      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_range_size_limit); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 2375, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_2);
                      if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_range_size_limit, __pyx_t_2) < (0)) __PYX_ERR(6, 2374, __pyx_L1_error)
                      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

                      /* "pyarrow/io.pxi":2376
 *             hole_size_limit=self.hole_size_limit,
 *             range_size_limit=self.range_size_limit,
 *             lazy=self.lazy,             # <<<<<<<<<<<<<<
 *             prefetch_limit=self.prefetch_limit,
 *         )
*/
                      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_lazy); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 2376, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_2);
                      if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_lazy, __pyx_t_2) < (0)) __PYX_ERR(6, 2374, __pyx_L1_error)
                      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

                      /* "pyarrow/io.pxi":2377
 *             range_size_limit=self.range_size_limit,
 *             lazy=self.lazy,
 *             prefetch_limit=self.prefetch_limit,             # <<<<<<<<<<<<<<
 *         )
 *         return CacheOptions._reconstruct, (kwargs,)
*/
                      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_prefetch_limit); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 2377, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_2);
                      if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_prefetch_limit, __pyx_t_2) < (0)) __PYX_ERR(6, 2374, __pyx_L1_error)
                      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                      __pyx_v_kwargs = ((PyObject*)__pyx_t_1);
                      __pyx_t_1 = 0;

                      /* "pyarrow/io.pxi":2379
 *             prefetch_limit=self.prefetch_limit,
 *         )
 *         return CacheOptions._reconstruct, (kwargs,)             # <<<<<<<<<<<<<<
 * 
 * 
*/
                      __Pyx_XDECREF(__pyx_r);
                      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_CacheOptions), __pyx_mstate_global->__pyx_n_u_reconstruct); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 2379, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 2379, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_2);
                      __Pyx_INCREF(__pyx_v_kwargs);
                      __Pyx_GIVEREF(__pyx_v_kwargs);
                      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_kwargs) != (0)) __PYX_ERR(6, 2379, __pyx_L1_error);
                      __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 2379, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_3);
                      __Pyx_GIVEREF(__pyx_t_1);
                      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1) != (0)) __PYX_ERR(6, 2379, __pyx_L1_error);
                      __Pyx_GIVEREF(__pyx_t_2);
                      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2) != (0)) __PYX_ERR(6, 2379, __pyx_L1_error);
                      __pyx_t_1 = 0;
                      __pyx_t_2 = 0;
                      __pyx_r = __pyx_t_3;
                      __pyx_t_3 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/io.pxi":2372
 *         return CacheOptions(**kwargs)
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         kwargs = dict(
 *             hole_size_limit=self.hole_size_limit,
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_AddTraceback("pyarrow.lib.CacheOptions.__reduce__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XDECREF(__pyx_v_kwargs);
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":2444
 *     """
 * 
 *     def __init__(self, str compression not None, compression_level=None):             # <<<<<<<<<<<<<<
 *         cdef CCompressionType typ = _ensure_compression(compression)
 *         if compression_level is not None:
*/

                    /* Python wrapper */
                    static int __pyx_pw_7pyarrow_3lib_5Codec_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
                    static int __pyx_pw_7pyarrow_3lib_5Codec_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
                      PyObject *__pyx_v_compression = 0;
                      PyObject *__pyx_v_compression_level = 0;
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[2] = {0,0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      int __pyx_r;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_compression,&__pyx_mstate_global->__pyx_n_u_compression_level,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(6, 2444, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  2:
                            values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(6, 2444, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 2444, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(6, 2444, __pyx_L3_error)
                          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 2, i); __PYX_ERR(6, 2444, __pyx_L3_error) }
                          }
                        } else {
                          switch (__pyx_nargs) {
                            case  2:
                            values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(6, 2444, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 2444, __pyx_L3_error)
                            break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
                        }
                        __pyx_v_compression = ((PyObject*)values[0]);
                        __pyx_v_compression_level = values[1];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 2, __pyx_nargs); __PYX_ERR(6, 2444, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.Codec.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return -1;
                      __pyx_L4_argument_unpacking_done:;
                      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_compression), (&PyUnicode_Type), 0, "compression", 1))) __PYX_ERR(6, 2444, __pyx_L1_error)
                      __pyx_r = __pyx_pf_7pyarrow_3lib_5Codec___init__(((struct __pyx_obj_7pyarrow_3lib_Codec *)__pyx_v_self), __pyx_v_compression, __pyx_v_compression_level);

                      /* function exit code */
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __pyx_r = -1;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      goto __pyx_L7_cleaned_up;
                      __pyx_L0:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __pyx_L7_cleaned_up:;
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static int __pyx_pf_7pyarrow_3lib_5Codec___init__(struct __pyx_obj_7pyarrow_3lib_Codec *__pyx_v_self, PyObject *__pyx_v_compression, PyObject *__pyx_v_compression_level) {
                      enum  arrow::Compression::type __pyx_v_typ;
                      int __pyx_r;
                      enum  arrow::Compression::type __pyx_t_1;
                      int __pyx_t_2;
                      int __pyx_t_3;
                      std::unique_ptr< arrow::util::Codec>  __pyx_t_4;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;

                      /* "pyarrow/io.pxi":2445
 * 
 *     def __init__(self, str compression not None, compression_level=None):
 *         cdef CCompressionType typ = _ensure_compression(compression)             # <<<<<<<<<<<<<<
 *         if compression_level is not None:
 *             self.wrapped = shared_ptr[CCodec](move(GetResultValue(
*/
                      __pyx_t_1 = __pyx_f_7pyarrow_3lib__ensure_compression(__pyx_v_compression); if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 2445, __pyx_L1_error)
                      __pyx_v_typ = __pyx_t_1;

                      /* "pyarrow/io.pxi":2446
 *     def __init__(self, str compression not None, compression_level=None):
 *         cdef CCompressionType typ = _ensure_compression(compression)
 *         if compression_level is not None:             # <<<<<<<<<<<<<<
 *             self.wrapped = shared_ptr[CCodec](move(GetResultValue(
 *                 CCodec.CreateWithLevel(typ, compression_level))))
*/
                      __pyx_t_2 = (__pyx_v_compression_level != Py_None);
                      if (__pyx_t_2) {

                        /* "pyarrow/io.pxi":2448
 *         if compression_level is not None:
 *             self.wrapped = shared_ptr[CCodec](move(GetResultValue(
 *                 CCodec.CreateWithLevel(typ, compression_level))))             # <<<<<<<<<<<<<<
 *         else:
 *             self.wrapped = shared_ptr[CCodec](move(GetResultValue(
*/
                        __pyx_t_3 = __Pyx_PyLong_As_int(__pyx_v_compression_level); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(6, 2448, __pyx_L1_error)

                        /* "pyarrow/io.pxi":2447
 *         cdef CCompressionType typ = _ensure_compression(compression)
 *         if compression_level is not None:
 *             self.wrapped = shared_ptr[CCodec](move(GetResultValue(             # <<<<<<<<<<<<<<
 *                 CCodec.CreateWithLevel(typ, compression_level))))
 *         else:
*/
                        __pyx_t_4 = arrow::py::GetResultValue<std::unique_ptr< arrow::util::Codec> >( arrow::util::Codec:: Create(__pyx_v_typ, __pyx_t_3)); if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 2447, __pyx_L1_error)
                        if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "wrapped");
                          __PYX_ERR(6, 2447, __pyx_L1_error)
                        }
                        __pyx_v_self->wrapped = std::shared_ptr< arrow::util::Codec> (cython_std::move<std::unique_ptr< arrow::util::Codec> >(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_4)));

                        /* "pyarrow/io.pxi":2446
 *     def __init__(self, str compression not None, compression_level=None):
 *         cdef CCompressionType typ = _ensure_compression(compression)
 *         if compression_level is not None:             # <<<<<<<<<<<<<<
 *             self.wrapped = shared_ptr[CCodec](move(GetResultValue(
 *                 CCodec.CreateWithLevel(typ, compression_level))))
*/
                        goto __pyx_L3;
                      }

                      /* "pyarrow/io.pxi":2450
 *                 CCodec.CreateWithLevel(typ, compression_level))))
 *         else:
 *             self.wrapped = shared_ptr[CCodec](move(GetResultValue(             # <<<<<<<<<<<<<<
 *                 CCodec.Create(typ))))
 * 
*/
                      /*else*/ {

                        /* "pyarrow/io.pxi":2451
 *         else:
 *             self.wrapped = shared_ptr[CCodec](move(GetResultValue(
 *                 CCodec.Create(typ))))             # <<<<<<<<<<<<<<
 * 
 *     cdef inline CCodec* unwrap(self) nogil:
*/
                        __pyx_t_4 = arrow::py::GetResultValue<std::unique_ptr< arrow::util::Codec> >( arrow::util::Codec::Create(__pyx_v_typ)); if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 2450, __pyx_L1_error)

                        /* "pyarrow/io.pxi":2450
 *                 CCodec.CreateWithLevel(typ, compression_level))))
 *         else:
 *             self.wrapped = shared_ptr[CCodec](move(GetResultValue(             # <<<<<<<<<<<<<<
 *                 CCodec.Create(typ))))
 * 
*/
                        if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "wrapped");
                          __PYX_ERR(6, 2450, __pyx_L1_error)
                        }
                        __pyx_v_self->wrapped = std::shared_ptr< arrow::util::Codec> (cython_std::move<std::unique_ptr< arrow::util::Codec> >(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_4)));
                      }
                      __pyx_L3:;

                      /* "pyarrow/io.pxi":2444
 *     """
 * 
 *     def __init__(self, str compression not None, compression_level=None):             # <<<<<<<<<<<<<<
 *         cdef CCompressionType typ = _ensure_compression(compression)
 *         if compression_level is not None:
*/

                      /* function exit code */
                      __pyx_r = 0;
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib.Codec.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = -1;
                      __pyx_L0:;
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":2453
 *                 CCodec.Create(typ))))
 * 
 *     cdef inline CCodec* unwrap(self) nogil:             # <<<<<<<<<<<<<<
 *         return self.wrapped.get()
 * 
*/

                    static CYTHON_INLINE  arrow::util::Codec *__pyx_f_7pyarrow_3lib_5Codec_unwrap(struct __pyx_obj_7pyarrow_3lib_Codec *__pyx_v_self) {
                       arrow::util::Codec *__pyx_r;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyGILState_STATE __pyx_gilstate_save;

                      /* "pyarrow/io.pxi":2454
 * 
 *     cdef inline CCodec* unwrap(self) nogil:
 *         return self.wrapped.get()             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "wrapped");
                        __Pyx_PyGILState_Release(__pyx_gilstate_save);
                        __PYX_ERR(6, 2454, __pyx_L1_error)
                      }
                      __pyx_r = __pyx_v_self->wrapped.get();
                      goto __pyx_L0;

                      /* "pyarrow/io.pxi":2453
 *                 CCodec.Create(typ))))
 * 
 *     cdef inline CCodec* unwrap(self) nogil:             # <<<<<<<<<<<<<<
 *         return self.wrapped.get()
 * 
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                      __Pyx_AddTraceback("pyarrow.lib.Codec.unwrap", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = 0;
                      __Pyx_PyGILState_Release(__pyx_gilstate_save);
                      __pyx_L0:;
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":2456
 *         return self.wrapped.get()
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def detect(path):
 *         """
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_5Codec_3detect(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_5Codec_2detect, "Codec.detect(path)\n\nDetect and instantiate compression codec based on file extension.\n\nParameters\n----------\npath : str, path-like\n    File-path to detect compression from.\n\nRaises\n------\nTypeError\n    If the passed value is not path-like.\nValueError\n    If the compression can't be detected from the path.\n\nReturns\n-------\nCodec");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_5Codec_3detect = {"detect", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Codec_3detect, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Codec_2detect};
                    static PyObject *__pyx_pw_7pyarrow_3lib_5Codec_3detect(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      PyObject *__pyx_v_path = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[1] = {0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("detect (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_path,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(6, 2456, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 2456, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "detect", 0) < (0)) __PYX_ERR(6, 2456, __pyx_L3_error)
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("detect", 1, 1, 1, i); __PYX_ERR(6, 2456, __pyx_L3_error) }
                          }
                        } else if (unlikely(__pyx_nargs != 1)) {
                          goto __pyx_L5_argtuple_error;
                        } else {
                          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 2456, __pyx_L3_error)
                        }
                        __pyx_v_path = values[0];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("detect", 1, 1, 1, __pyx_nargs); __PYX_ERR(6, 2456, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.Codec.detect", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_5Codec_2detect(__pyx_v_path);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_5Codec_2detect(PyObject *__pyx_v_path) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      PyObject *__pyx_t_3 = NULL;
                      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;
                      size_t __pyx_t_9;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("detect", 0);

                      /* "pyarrow/io.pxi":2477
 *         Codec
 *         """
 *         return Codec(_detect_compression(_stringify_path(path)))             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
*/
                      __Pyx_XDECREF(__pyx_r);
                      __pyx_t_2 = NULL;
                      __pyx_t_4 = NULL;
                      __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_detect_compression); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 2477, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_5);
                      __pyx_t_7 = NULL;
                      __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_stringify_path); if (unlikely(!__pyx_t_8)) __PYX_ERR(6, 2477, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_8);
                      __pyx_t_9 = 1;
                      #if CYTHON_UNPACK_METHODS
                      if (unlikely(PyMethod_Check(__pyx_t_8))) {
                        __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8);
                        assert(__pyx_t_7);
                        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8);
                        __Pyx_INCREF(__pyx_t_7);
                        __Pyx_INCREF(__pyx__function);
                        __Pyx_DECREF_SET(__pyx_t_8, __pyx__function);
                        __pyx_t_9 = 0;
                      }
                      #endif
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_path};
                        __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
                        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                        if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 2477, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_6);
                      }
                      __pyx_t_9 = 1;
                      #if CYTHON_UNPACK_METHODS
                      if (unlikely(PyMethod_Check(__pyx_t_5))) {
                        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
                        assert(__pyx_t_4);
                        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
                        __Pyx_INCREF(__pyx_t_4);
                        __Pyx_INCREF(__pyx__function);
                        __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
                        __pyx_t_9 = 0;
                      }
                      #endif
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_6};
                        __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                        if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 2477, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_3);
                      }
                      __pyx_t_9 = 1;
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
                        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Codec, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 2477, __pyx_L1_error)
                        __Pyx_GOTREF((PyObject *)__pyx_t_1);
                      }
                      __pyx_r = ((PyObject *)__pyx_t_1);
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/io.pxi":2456
 *         return self.wrapped.get()
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def detect(path):
 *         """
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_XDECREF(__pyx_t_4);
                      __Pyx_XDECREF(__pyx_t_5);
                      __Pyx_XDECREF(__pyx_t_6);
                      __Pyx_XDECREF(__pyx_t_7);
                      __Pyx_XDECREF(__pyx_t_8);
                      __Pyx_AddTraceback("pyarrow.lib.Codec.detect", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":2479
 *         return Codec(_detect_compression(_stringify_path(path)))
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def is_available(str compression not None):
 *         """
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_5Codec_5is_available(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_5Codec_4is_available, "Codec.is_available(str compression)\n\nReturns whether the compression support has been built and enabled.\n\nParameters\n----------\ncompression : str\n     Type of compression codec,\n     refer to Codec docstring for a list of supported ones.\n\nReturns\n-------\nbool");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_5Codec_5is_available = {"is_available", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Codec_5is_available, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Codec_4is_available};
                    static PyObject *__pyx_pw_7pyarrow_3lib_5Codec_5is_available(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      PyObject *__pyx_v_compression = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[1] = {0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("is_available (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_compression,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(6, 2479, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 2479, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "is_available", 0) < (0)) __PYX_ERR(6, 2479, __pyx_L3_error)
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("is_available", 1, 1, 1, i); __PYX_ERR(6, 2479, __pyx_L3_error) }
                          }
                        } else if (unlikely(__pyx_nargs != 1)) {
                          goto __pyx_L5_argtuple_error;
                        } else {
                          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 2479, __pyx_L3_error)
                        }
                        __pyx_v_compression = ((PyObject*)values[0]);
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("is_available", 1, 1, 1, __pyx_nargs); __PYX_ERR(6, 2479, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.Codec.is_available", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_compression), (&PyUnicode_Type), 0, "compression", 1))) __PYX_ERR(6, 2480, __pyx_L1_error)
                      __pyx_r = __pyx_pf_7pyarrow_3lib_5Codec_4is_available(__pyx_v_compression);

                      /* function exit code */
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __pyx_r = NULL;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      goto __pyx_L7_cleaned_up;
                      __pyx_L0:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __pyx_L7_cleaned_up:;
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_5Codec_4is_available(PyObject *__pyx_v_compression) {
                      enum  arrow::Compression::type __pyx_v_typ;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      enum  arrow::Compression::type __pyx_t_1;
                      PyObject *__pyx_t_2 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("is_available", 0);

                      /* "pyarrow/io.pxi":2494
 *         bool
 *         """
 *         cdef CCompressionType typ = _ensure_compression(compression)             # <<<<<<<<<<<<<<
 *         return CCodec.IsAvailable(typ)
 * 
*/
                      __pyx_t_1 = __pyx_f_7pyarrow_3lib__ensure_compression(__pyx_v_compression); if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 2494, __pyx_L1_error)
                      __pyx_v_typ = __pyx_t_1;

                      /* "pyarrow/io.pxi":2495
 *         """
 *         cdef CCompressionType typ = _ensure_compression(compression)
 *         return CCodec.IsAvailable(typ)             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
*/
                      __Pyx_XDECREF(__pyx_r);
                      __pyx_t_2 = __Pyx_PyBool_FromLong( arrow::util::Codec::IsAvailable(__pyx_v_typ)); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 2495, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_2);
                      __pyx_r = __pyx_t_2;
                      __pyx_t_2 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/io.pxi":2479
 *         return Codec(_detect_compression(_stringify_path(path)))
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def is_available(str compression not None):
 *         """
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_AddTraceback("pyarrow.lib.Codec.is_available", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":2497
 *         return CCodec.IsAvailable(typ)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def supports_compression_level(str compression not None):
 *         """
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_5Codec_7supports_compression_level(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_5Codec_6supports_compression_level, "Codec.supports_compression_level(str compression)\n\nReturns true if the compression level parameter is supported\nfor the given codec.\n\nParameters\n----------\ncompression : str\n    Type of compression codec,\n    refer to Codec docstring for a list of supported ones.");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_5Codec_7supports_compression_level = {"supports_compression_level", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Codec_7supports_compression_level, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Codec_6supports_compression_level};
                    static PyObject *__pyx_pw_7pyarrow_3lib_5Codec_7supports_compression_level(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      PyObject *__pyx_v_compression = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[1] = {0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("supports_compression_level (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_compression,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(6, 2497, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 2497, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "supports_compression_level", 0) < (0)) __PYX_ERR(6, 2497, __pyx_L3_error)
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("supports_compression_level", 1, 1, 1, i); __PYX_ERR(6, 2497, __pyx_L3_error) }
                          }
                        } else if (unlikely(__pyx_nargs != 1)) {
                          goto __pyx_L5_argtuple_error;
                        } else {
                          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 2497, __pyx_L3_error)
                        }
                        __pyx_v_compression = ((PyObject*)values[0]);
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("supports_compression_level", 1, 1, 1, __pyx_nargs); __PYX_ERR(6, 2497, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.Codec.supports_compression_level", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_compression), (&PyUnicode_Type), 0, "compression", 1))) __PYX_ERR(6, 2498, __pyx_L1_error)
                      __pyx_r = __pyx_pf_7pyarrow_3lib_5Codec_6supports_compression_level(__pyx_v_compression);

                      /* function exit code */
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __pyx_r = NULL;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      goto __pyx_L7_cleaned_up;
                      __pyx_L0:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __pyx_L7_cleaned_up:;
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_5Codec_6supports_compression_level(PyObject *__pyx_v_compression) {
                      enum  arrow::Compression::type __pyx_v_typ;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      enum  arrow::Compression::type __pyx_t_1;
                      PyObject *__pyx_t_2 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("supports_compression_level", 0);

                      /* "pyarrow/io.pxi":2509
 *             refer to Codec docstring for a list of supported ones.
 *         """
 *         cdef CCompressionType typ = _ensure_compression(compression)             # <<<<<<<<<<<<<<
 *         return CCodec.SupportsCompressionLevel(typ)
 * 
*/
                      __pyx_t_1 = __pyx_f_7pyarrow_3lib__ensure_compression(__pyx_v_compression); if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 2509, __pyx_L1_error)
                      __pyx_v_typ = __pyx_t_1;

                      /* "pyarrow/io.pxi":2510
 *         """
 *         cdef CCompressionType typ = _ensure_compression(compression)
 *         return CCodec.SupportsCompressionLevel(typ)             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
*/
                      __Pyx_XDECREF(__pyx_r);
                      __pyx_t_2 = __Pyx_PyBool_FromLong( arrow::util::Codec::SupportsCompressionLevel(__pyx_v_typ)); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 2510, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_2);
                      __pyx_r = __pyx_t_2;
                      __pyx_t_2 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/io.pxi":2497
 *         return CCodec.IsAvailable(typ)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def supports_compression_level(str compression not None):
 *         """
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_AddTraceback("pyarrow.lib.Codec.supports_compression_level", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":2512
 *         return CCodec.SupportsCompressionLevel(typ)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def default_compression_level(str compression not None):
 *         """
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_5Codec_9default_compression_level(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_5Codec_8default_compression_level, "Codec.default_compression_level(str compression)\n\nReturns the compression level that Arrow will use for the codec if\nNone is specified.\n\nParameters\n----------\ncompression : str\n    Type of compression codec,\n    refer to Codec docstring for a list of supported ones.");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_5Codec_9default_compression_level = {"default_compression_level", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Codec_9default_compression_level, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Codec_8default_compression_level};
                    static PyObject *__pyx_pw_7pyarrow_3lib_5Codec_9default_compression_level(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      PyObject *__pyx_v_compression = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[1] = {0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("default_compression_level (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_compression,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(6, 2512, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 2512, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "default_compression_level", 0) < (0)) __PYX_ERR(6, 2512, __pyx_L3_error)
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("default_compression_level", 1, 1, 1, i); __PYX_ERR(6, 2512, __pyx_L3_error) }
                          }
                        } else if (unlikely(__pyx_nargs != 1)) {
                          goto __pyx_L5_argtuple_error;
                        } else {
                          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 2512, __pyx_L3_error)
                        }
                        __pyx_v_compression = ((PyObject*)values[0]);
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("default_compression_level", 1, 1, 1, __pyx_nargs); __PYX_ERR(6, 2512, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.Codec.default_compression_level", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_compression), (&PyUnicode_Type), 0, "compression", 1))) __PYX_ERR(6, 2513, __pyx_L1_error)
                      __pyx_r = __pyx_pf_7pyarrow_3lib_5Codec_8default_compression_level(__pyx_v_compression);

                      /* function exit code */
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __pyx_r = NULL;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      goto __pyx_L7_cleaned_up;
                      __pyx_L0:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __pyx_L7_cleaned_up:;
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_5Codec_8default_compression_level(PyObject *__pyx_v_compression) {
                      enum  arrow::Compression::type __pyx_v_typ;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      enum  arrow::Compression::type __pyx_t_1;
                      int __pyx_t_2;
                      PyObject *__pyx_t_3 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("default_compression_level", 0);

                      /* "pyarrow/io.pxi":2524
 *             refer to Codec docstring for a list of supported ones.
 *         """
 *         cdef CCompressionType typ = _ensure_compression(compression)             # <<<<<<<<<<<<<<
 *         return GetResultValue(CCodec.DefaultCompressionLevel(typ))
 * 
*/
                      __pyx_t_1 = __pyx_f_7pyarrow_3lib__ensure_compression(__pyx_v_compression); if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 2524, __pyx_L1_error)
                      __pyx_v_typ = __pyx_t_1;

                      /* "pyarrow/io.pxi":2525
 *         """
 *         cdef CCompressionType typ = _ensure_compression(compression)
 *         return GetResultValue(CCodec.DefaultCompressionLevel(typ))             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
*/
                      __Pyx_XDECREF(__pyx_r);
                      __pyx_t_2 = arrow::py::GetResultValue<int>( arrow::util::Codec::DefaultCompressionLevel(__pyx_v_typ)); if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 2525, __pyx_L1_error)
                      __pyx_t_3 = __Pyx_PyLong_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 2525, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_3);
                      __pyx_r = __pyx_t_3;
                      __pyx_t_3 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/io.pxi":2512
 *         return CCodec.SupportsCompressionLevel(typ)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def default_compression_level(str compression not None):
 *         """
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_AddTraceback("pyarrow.lib.Codec.default_compression_level", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":2527
 *         return GetResultValue(CCodec.DefaultCompressionLevel(typ))
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def minimum_compression_level(str compression not None):
 *         """
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_5Codec_11minimum_compression_level(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_5Codec_10minimum_compression_level, "Codec.minimum_compression_level(str compression)\n\nReturns the smallest valid value for the compression level\n\nParameters\n----------\ncompression : str\n    Type of compression codec,\n    refer to Codec docstring for a list of supported ones.");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_5Codec_11minimum_compression_level = {"minimum_compression_level", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Codec_11minimum_compression_level, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Codec_10minimum_compression_level};
                    static PyObject *__pyx_pw_7pyarrow_3lib_5Codec_11minimum_compression_level(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      PyObject *__pyx_v_compression = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[1] = {0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("minimum_compression_level (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_compression,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(6, 2527, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 2527, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "minimum_compression_level", 0) < (0)) __PYX_ERR(6, 2527, __pyx_L3_error)
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("minimum_compression_level", 1, 1, 1, i); __PYX_ERR(6, 2527, __pyx_L3_error) }
                          }
                        } else if (unlikely(__pyx_nargs != 1)) {
                          goto __pyx_L5_argtuple_error;
                        } else {
                          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 2527, __pyx_L3_error)
                        }
                        __pyx_v_compression = ((PyObject*)values[0]);
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("minimum_compression_level", 1, 1, 1, __pyx_nargs); __PYX_ERR(6, 2527, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.Codec.minimum_compression_level", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_compression), (&PyUnicode_Type), 0, "compression", 1))) __PYX_ERR(6, 2528, __pyx_L1_error)
                      __pyx_r = __pyx_pf_7pyarrow_3lib_5Codec_10minimum_compression_level(__pyx_v_compression);

                      /* function exit code */
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __pyx_r = NULL;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      goto __pyx_L7_cleaned_up;
                      __pyx_L0:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __pyx_L7_cleaned_up:;
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_5Codec_10minimum_compression_level(PyObject *__pyx_v_compression) {
                      enum  arrow::Compression::type __pyx_v_typ;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      enum  arrow::Compression::type __pyx_t_1;
                      int __pyx_t_2;
                      PyObject *__pyx_t_3 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("minimum_compression_level", 0);

                      /* "pyarrow/io.pxi":2538
 *             refer to Codec docstring for a list of supported ones.
 *         """
 *         cdef CCompressionType typ = _ensure_compression(compression)             # <<<<<<<<<<<<<<
 *         return GetResultValue(CCodec.MinimumCompressionLevel(typ))
 * 
*/
                      __pyx_t_1 = __pyx_f_7pyarrow_3lib__ensure_compression(__pyx_v_compression); if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 2538, __pyx_L1_error)
                      __pyx_v_typ = __pyx_t_1;

                      /* "pyarrow/io.pxi":2539
 *         """
 *         cdef CCompressionType typ = _ensure_compression(compression)
 *         return GetResultValue(CCodec.MinimumCompressionLevel(typ))             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
*/
                      __Pyx_XDECREF(__pyx_r);
                      __pyx_t_2 = arrow::py::GetResultValue<int>( arrow::util::Codec::MinimumCompressionLevel(__pyx_v_typ)); if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 2539, __pyx_L1_error)
                      __pyx_t_3 = __Pyx_PyLong_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 2539, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_3);
                      __pyx_r = __pyx_t_3;
                      __pyx_t_3 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/io.pxi":2527
 *         return GetResultValue(CCodec.DefaultCompressionLevel(typ))
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def minimum_compression_level(str compression not None):
 *         """
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_AddTraceback("pyarrow.lib.Codec.minimum_compression_level", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":2541
 *         return GetResultValue(CCodec.MinimumCompressionLevel(typ))
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def maximum_compression_level(str compression not None):
 *         """
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_5Codec_13maximum_compression_level(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_5Codec_12maximum_compression_level, "Codec.maximum_compression_level(str compression)\n\nReturns the largest valid value for the compression level\n\nParameters\n----------\ncompression : str\n    Type of compression codec,\n    refer to Codec docstring for a list of supported ones.");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_5Codec_13maximum_compression_level = {"maximum_compression_level", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Codec_13maximum_compression_level, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Codec_12maximum_compression_level};
                    static PyObject *__pyx_pw_7pyarrow_3lib_5Codec_13maximum_compression_level(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      PyObject *__pyx_v_compression = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[1] = {0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("maximum_compression_level (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_compression,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(6, 2541, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 2541, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "maximum_compression_level", 0) < (0)) __PYX_ERR(6, 2541, __pyx_L3_error)
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("maximum_compression_level", 1, 1, 1, i); __PYX_ERR(6, 2541, __pyx_L3_error) }
                          }
                        } else if (unlikely(__pyx_nargs != 1)) {
                          goto __pyx_L5_argtuple_error;
                        } else {
                          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 2541, __pyx_L3_error)
                        }
                        __pyx_v_compression = ((PyObject*)values[0]);
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("maximum_compression_level", 1, 1, 1, __pyx_nargs); __PYX_ERR(6, 2541, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.Codec.maximum_compression_level", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_compression), (&PyUnicode_Type), 0, "compression", 1))) __PYX_ERR(6, 2542, __pyx_L1_error)
                      __pyx_r = __pyx_pf_7pyarrow_3lib_5Codec_12maximum_compression_level(__pyx_v_compression);

                      /* function exit code */
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __pyx_r = NULL;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      goto __pyx_L7_cleaned_up;
                      __pyx_L0:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __pyx_L7_cleaned_up:;
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_5Codec_12maximum_compression_level(PyObject *__pyx_v_compression) {
                      enum  arrow::Compression::type __pyx_v_typ;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      enum  arrow::Compression::type __pyx_t_1;
                      int __pyx_t_2;
                      PyObject *__pyx_t_3 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("maximum_compression_level", 0);

                      /* "pyarrow/io.pxi":2552
 *             refer to Codec docstring for a list of supported ones.
 *         """
 *         cdef CCompressionType typ = _ensure_compression(compression)             # <<<<<<<<<<<<<<
 *         return GetResultValue(CCodec.MaximumCompressionLevel(typ))
 * 
*/
                      __pyx_t_1 = __pyx_f_7pyarrow_3lib__ensure_compression(__pyx_v_compression); if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 2552, __pyx_L1_error)
                      __pyx_v_typ = __pyx_t_1;

                      /* "pyarrow/io.pxi":2553
 *         """
 *         cdef CCompressionType typ = _ensure_compression(compression)
 *         return GetResultValue(CCodec.MaximumCompressionLevel(typ))             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
                      __Pyx_XDECREF(__pyx_r);
                      __pyx_t_2 = arrow::py::GetResultValue<int>( arrow::util::Codec::MaximumCompressionLevel(__pyx_v_typ)); if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 2553, __pyx_L1_error)
                      __pyx_t_3 = __Pyx_PyLong_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 2553, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_3);
                      __pyx_r = __pyx_t_3;
                      __pyx_t_3 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/io.pxi":2541
 *         return GetResultValue(CCodec.MinimumCompressionLevel(typ))
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def maximum_compression_level(str compression not None):
 *         """
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_AddTraceback("pyarrow.lib.Codec.maximum_compression_level", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":2555
 *         return GetResultValue(CCodec.MaximumCompressionLevel(typ))
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def name(self):
 *         """Returns the name of the codec"""
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_5Codec_4name_1__get__(PyObject *__pyx_v_self); /*proto*/
                    static PyObject *__pyx_pw_7pyarrow_3lib_5Codec_4name_1__get__(PyObject *__pyx_v_self) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_5Codec_4name___get__(((struct __pyx_obj_7pyarrow_3lib_Codec *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_5Codec_4name___get__(struct __pyx_obj_7pyarrow_3lib_Codec *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      PyObject *__pyx_t_3 = NULL;
                       arrow::util::Codec *__pyx_t_4;
                      PyObject *__pyx_t_5 = NULL;
                      size_t __pyx_t_6;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__get__", 0);

                      /* "pyarrow/io.pxi":2558
 *     def name(self):
 *         """Returns the name of the codec"""
 *         return frombytes(self.unwrap().name())             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
                      __Pyx_XDECREF(__pyx_r);
                      __pyx_t_2 = NULL;
                      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_frombytes); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 2558, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_3);
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "unwrap");
                        __PYX_ERR(6, 2558, __pyx_L1_error)
                      }
                      __pyx_t_4 = __pyx_f_7pyarrow_3lib_5Codec_unwrap(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 2558, __pyx_L1_error)
                      __pyx_t_5 = __pyx_convert_PyBytes_string_to_py_6libcpp_6string_std__in_string(__pyx_t_4->name()); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 2558, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_5);
                      __pyx_t_6 = 1;
                      #if CYTHON_UNPACK_METHODS
                      if (unlikely(PyMethod_Check(__pyx_t_3))) {
                        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
                        assert(__pyx_t_2);
                        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
                        __Pyx_INCREF(__pyx_t_2);
                        __Pyx_INCREF(__pyx__function);
                        __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
                        __pyx_t_6 = 0;
                      }
                      #endif
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_5};
                        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 2558, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __pyx_r = __pyx_t_1;
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/io.pxi":2555
 *         return GetResultValue(CCodec.MaximumCompressionLevel(typ))
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def name(self):
 *         """Returns the name of the codec"""
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_XDECREF(__pyx_t_5);
                      __Pyx_AddTraceback("pyarrow.lib.Codec.name.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":2560
 *         return frombytes(self.unwrap().name())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def compression_level(self):
 *         """Returns the compression level parameter of the codec"""
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_5Codec_17compression_level_1__get__(PyObject *__pyx_v_self); /*proto*/
                    static PyObject *__pyx_pw_7pyarrow_3lib_5Codec_17compression_level_1__get__(PyObject *__pyx_v_self) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_5Codec_17compression_level___get__(((struct __pyx_obj_7pyarrow_3lib_Codec *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_5Codec_17compression_level___get__(struct __pyx_obj_7pyarrow_3lib_Codec *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      int __pyx_t_2;
                       arrow::util::Codec *__pyx_t_3;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__get__", 0);

                      /* "pyarrow/io.pxi":2563
 *     def compression_level(self):
 *         """Returns the compression level parameter of the codec"""
 *         if self.name == 'snappy':             # <<<<<<<<<<<<<<
 *             return None
 *         return self.unwrap().compression_level()
*/
                      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 2563, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_snappy, Py_EQ)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(6, 2563, __pyx_L1_error)
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      if (__pyx_t_2) {

                        /* "pyarrow/io.pxi":2564
 *         """Returns the compression level parameter of the codec"""
 *         if self.name == 'snappy':
 *             return None             # <<<<<<<<<<<<<<
 *         return self.unwrap().compression_level()
 * 
*/
                        __Pyx_XDECREF(__pyx_r);
                        __pyx_r = Py_None; __Pyx_INCREF(Py_None);
                        goto __pyx_L0;

                        /* "pyarrow/io.pxi":2563
 *     def compression_level(self):
 *         """Returns the compression level parameter of the codec"""
 *         if self.name == 'snappy':             # <<<<<<<<<<<<<<
 *             return None
 *         return self.unwrap().compression_level()
*/
                      }

                      /* "pyarrow/io.pxi":2565
 *         if self.name == 'snappy':
 *             return None
 *         return self.unwrap().compression_level()             # <<<<<<<<<<<<<<
 * 
 *     def compress(self, object buf, asbytes=False, memory_pool=None):
*/
                      __Pyx_XDECREF(__pyx_r);
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "unwrap");
                        __PYX_ERR(6, 2565, __pyx_L1_error)
                      }
                      __pyx_t_3 = __pyx_f_7pyarrow_3lib_5Codec_unwrap(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 2565, __pyx_L1_error)
                      __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_t_3->compression_level()); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 2565, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_r = __pyx_t_1;
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/io.pxi":2560
 *         return frombytes(self.unwrap().name())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def compression_level(self):
 *         """Returns the compression level parameter of the codec"""
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_AddTraceback("pyarrow.lib.Codec.compression_level.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":2567
 *         return self.unwrap().compression_level()
 * 
 *     def compress(self, object buf, asbytes=False, memory_pool=None):             # <<<<<<<<<<<<<<
 *         """
 *         Compress data from buffer-like object.
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_5Codec_15compress(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_5Codec_14compress, "Codec.compress(self, buf, asbytes=False, memory_pool=None)\n\nCompress data from buffer-like object.\n\nParameters\n----------\nbuf : pyarrow.Buffer, bytes, or other object supporting buffer protocol\nasbytes : bool, default False\n    Return result as Python bytes object, otherwise Buffer\nmemory_pool : MemoryPool, default None\n    Memory pool to use for buffer allocations, if any\n\nReturns\n-------\ncompressed : pyarrow.Buffer or bytes (if asbytes=True)");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_5Codec_15compress = {"compress", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Codec_15compress, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Codec_14compress};
                    static PyObject *__pyx_pw_7pyarrow_3lib_5Codec_15compress(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      PyObject *__pyx_v_buf = 0;
                      PyObject *__pyx_v_asbytes = 0;
                      PyObject *__pyx_v_memory_pool = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[3] = {0,0,0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("compress (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_buf,&__pyx_mstate_global->__pyx_n_u_asbytes,&__pyx_mstate_global->__pyx_n_u_memory_pool,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(6, 2567, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  3:
                            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(6, 2567, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  2:
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(6, 2567, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 2567, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "compress", 0) < (0)) __PYX_ERR(6, 2567, __pyx_L3_error)
                          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_False));
                          if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("compress", 0, 1, 3, i); __PYX_ERR(6, 2567, __pyx_L3_error) }
                          }
                        } else {
                          switch (__pyx_nargs) {
                            case  3:
                            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(6, 2567, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  2:
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(6, 2567, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 2567, __pyx_L3_error)
                            break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_False));
                          if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
                        }
                        __pyx_v_buf = values[0];
                        __pyx_v_asbytes = values[1];
                        __pyx_v_memory_pool = values[2];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("compress", 0, 1, 3, __pyx_nargs); __PYX_ERR(6, 2567, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.Codec.compress", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_5Codec_14compress(((struct __pyx_obj_7pyarrow_3lib_Codec *)__pyx_v_self), __pyx_v_buf, __pyx_v_asbytes, __pyx_v_memory_pool);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_5Codec_14compress(struct __pyx_obj_7pyarrow_3lib_Codec *__pyx_v_self, PyObject *__pyx_v_buf, PyObject *__pyx_v_asbytes, PyObject *__pyx_v_memory_pool) {
                      std::shared_ptr< arrow::Buffer>  __pyx_v_owned_buf;
                       arrow::Buffer *__pyx_v_c_buf;
                      PyObject *__pyx_v_pyobj;
                      struct __pyx_obj_7pyarrow_3lib_ResizableBuffer *__pyx_v_out_buf = 0;
                      int64_t __pyx_v_max_output_size;
                      int64_t __pyx_v_output_length;
                      uint8_t *__pyx_v_output_buffer;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      std::shared_ptr< arrow::Buffer>  __pyx_t_1;
                      int __pyx_t_2;
                      PyObject *__pyx_t_3;
                      PyObject *__pyx_t_4 = NULL;
                      PyObject *__pyx_t_5 = NULL;
                      PyObject *__pyx_t_6 = NULL;
                      PyObject *__pyx_t_7 = NULL;
                      size_t __pyx_t_8;
                      PyObject *__pyx_t_9 = NULL;
                       arrow::util::Codec *__pyx_t_10;
                      int64_t __pyx_t_11;
                      int __pyx_t_12;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("compress", 0);

                      /* "pyarrow/io.pxi":2590
 *             int64_t max_output_size
 *             int64_t output_length
 *             uint8_t* output_buffer = NULL             # <<<<<<<<<<<<<<
 * 
 *         owned_buf = as_c_buffer(buf)
*/
                      __pyx_v_output_buffer = NULL;

                      /* "pyarrow/io.pxi":2592
 *             uint8_t* output_buffer = NULL
 * 
 *         owned_buf = as_c_buffer(buf)             # <<<<<<<<<<<<<<
 *         c_buf = owned_buf.get()
 * 
*/
                      __pyx_t_1 = __pyx_f_7pyarrow_3lib_as_c_buffer(__pyx_v_buf); if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 2592, __pyx_L1_error)
                      __pyx_v_owned_buf = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_1);

                      /* "pyarrow/io.pxi":2593
 * 
 *         owned_buf = as_c_buffer(buf)
 *         c_buf = owned_buf.get()             # <<<<<<<<<<<<<<
 * 
 *         max_output_size = self.wrapped.get().MaxCompressedLen(
*/
                      __pyx_v_c_buf = __pyx_v_owned_buf.get();

                      /* "pyarrow/io.pxi":2595
 *         c_buf = owned_buf.get()
 * 
 *         max_output_size = self.wrapped.get().MaxCompressedLen(             # <<<<<<<<<<<<<<
 *             c_buf.size(), c_buf.data()
 *         )
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "wrapped");
                        __PYX_ERR(6, 2595, __pyx_L1_error)
                      }

                      /* "pyarrow/io.pxi":2596
 * 
 *         max_output_size = self.wrapped.get().MaxCompressedLen(
 *             c_buf.size(), c_buf.data()             # <<<<<<<<<<<<<<
 *         )
 * 
*/
                      __pyx_v_max_output_size = __pyx_v_self->wrapped.get()->MaxCompressedLen(__pyx_v_c_buf->size(), __pyx_v_c_buf->data());

                      /* "pyarrow/io.pxi":2599
 *         )
 * 
 *         if asbytes:             # <<<<<<<<<<<<<<
 *             pyobj = PyBytes_FromStringAndSizeNative(NULL, max_output_size)
 *             output_buffer = <uint8_t*> cp.PyBytes_AS_STRING(<object> pyobj)
*/
                      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_asbytes); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(6, 2599, __pyx_L1_error)
                      if (__pyx_t_2) {

                        /* "pyarrow/io.pxi":2600
 * 
 *         if asbytes:
 *             pyobj = PyBytes_FromStringAndSizeNative(NULL, max_output_size)             # <<<<<<<<<<<<<<
 *             output_buffer = <uint8_t*> cp.PyBytes_AS_STRING(<object> pyobj)
 *         else:
*/
                        __pyx_t_3 =  PyBytes_FromStringAndSize(NULL, __pyx_v_max_output_size); if (unlikely(__pyx_t_3 == ((void *)NULL))) __PYX_ERR(6, 2600, __pyx_L1_error)
                        __pyx_v_pyobj = __pyx_t_3;

                        /* "pyarrow/io.pxi":2601
 *         if asbytes:
 *             pyobj = PyBytes_FromStringAndSizeNative(NULL, max_output_size)
 *             output_buffer = <uint8_t*> cp.PyBytes_AS_STRING(<object> pyobj)             # <<<<<<<<<<<<<<
 *         else:
 *             out_buf = allocate_buffer(
*/
                        __pyx_v_output_buffer = ((uint8_t *)PyBytes_AS_STRING(((PyObject *)__pyx_v_pyobj)));

                        /* "pyarrow/io.pxi":2599
 *         )
 * 
 *         if asbytes:             # <<<<<<<<<<<<<<
 *             pyobj = PyBytes_FromStringAndSizeNative(NULL, max_output_size)
 *             output_buffer = <uint8_t*> cp.PyBytes_AS_STRING(<object> pyobj)
*/
                        goto __pyx_L3;
                      }

                      /* "pyarrow/io.pxi":2603
 *             output_buffer = <uint8_t*> cp.PyBytes_AS_STRING(<object> pyobj)
 *         else:
 *             out_buf = allocate_buffer(             # <<<<<<<<<<<<<<
 *                 max_output_size, memory_pool=memory_pool, resizable=True
 *             )
*/
                      /*else*/ {
                        __pyx_t_5 = NULL;
                        __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_allocate_buffer); if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 2603, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_6);

                        /* "pyarrow/io.pxi":2604
 *         else:
 *             out_buf = allocate_buffer(
 *                 max_output_size, memory_pool=memory_pool, resizable=True             # <<<<<<<<<<<<<<
 *             )
 *             output_buffer = out_buf.buffer.get().mutable_data()
*/
                        __pyx_t_7 = __Pyx_PyLong_From_int64_t(__pyx_v_max_output_size); if (unlikely(!__pyx_t_7)) __PYX_ERR(6, 2604, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_7);
                        __pyx_t_8 = 1;
                        #if CYTHON_UNPACK_METHODS
                        if (unlikely(PyMethod_Check(__pyx_t_6))) {
                          __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
                          assert(__pyx_t_5);
                          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
                          __Pyx_INCREF(__pyx_t_5);
                          __Pyx_INCREF(__pyx__function);
                          __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
                          __pyx_t_8 = 0;
                        }
                        #endif
                        {
                          PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_5, __pyx_t_7};
                          __pyx_t_9 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(6, 2603, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_9);
                          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_memory_pool, __pyx_v_memory_pool, __pyx_t_9, __pyx_callargs+2, 0) < (0)) __PYX_ERR(6, 2603, __pyx_L1_error)
                          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_resizable, Py_True, __pyx_t_9, __pyx_callargs+2, 1) < (0)) __PYX_ERR(6, 2603, __pyx_L1_error)
                          __pyx_t_4 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_9);
                          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
                          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
                          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
                          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                          if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 2603, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_4);
                        }

                        /* "pyarrow/io.pxi":2603
 *             output_buffer = <uint8_t*> cp.PyBytes_AS_STRING(<object> pyobj)
 *         else:
 *             out_buf = allocate_buffer(             # <<<<<<<<<<<<<<
 *                 max_output_size, memory_pool=memory_pool, resizable=True
 *             )
*/
                        if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ResizableBuffer))))) __PYX_ERR(6, 2603, __pyx_L1_error)
                        __pyx_v_out_buf = ((struct __pyx_obj_7pyarrow_3lib_ResizableBuffer *)__pyx_t_4);
                        __pyx_t_4 = 0;

                        /* "pyarrow/io.pxi":2606
 *                 max_output_size, memory_pool=memory_pool, resizable=True
 *             )
 *             output_buffer = out_buf.buffer.get().mutable_data()             # <<<<<<<<<<<<<<
 * 
 *         with nogil:
*/
                        if (unlikely(((PyObject *)__pyx_v_out_buf) == Py_None)) {
                          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "buffer");
                          __PYX_ERR(6, 2606, __pyx_L1_error)
                        }
                        __pyx_v_output_buffer = __pyx_v_out_buf->__pyx_base.buffer.get()->mutable_data();
                      }
                      __pyx_L3:;

                      /* "pyarrow/io.pxi":2608
 *             output_buffer = out_buf.buffer.get().mutable_data()
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             output_length = GetResultValue(
 *                 self.unwrap().Compress(
*/
                      {
                          PyThreadState * _save;
                          _save = PyEval_SaveThread();
                          __Pyx_FastGIL_Remember();
                          /*try:*/ {

                            /* "pyarrow/io.pxi":2610
 *         with nogil:
 *             output_length = GetResultValue(
 *                 self.unwrap().Compress(             # <<<<<<<<<<<<<<
 *                     c_buf.size(),
 *                     c_buf.data(),
*/
                            if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                              PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "unwrap");
                              __Pyx_PyGILState_Release(__pyx_gilstate_save);
                              __PYX_ERR(6, 2610, __pyx_L5_error)
                            }
                            __pyx_t_10 = __pyx_f_7pyarrow_3lib_5Codec_unwrap(__pyx_v_self); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(6, 2610, __pyx_L5_error)

                            /* "pyarrow/io.pxi":2609
 * 
 *         with nogil:
 *             output_length = GetResultValue(             # <<<<<<<<<<<<<<
 *                 self.unwrap().Compress(
 *                     c_buf.size(),
*/
                            __pyx_t_11 = arrow::py::GetResultValue<int64_t>(__pyx_t_10->Compress(__pyx_v_c_buf->size(), __pyx_v_c_buf->data(), __pyx_v_max_output_size, __pyx_v_output_buffer)); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(6, 2609, __pyx_L5_error)
                            __pyx_v_output_length = __pyx_t_11;
                          }

                          /* "pyarrow/io.pxi":2608
 *             output_buffer = out_buf.buffer.get().mutable_data()
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             output_length = GetResultValue(
 *                 self.unwrap().Compress(
*/
                          /*finally:*/ {
                            /*normal exit:*/{
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L6;
                            }
                            __pyx_L5_error: {
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L1_error;
                            }
                            __pyx_L6:;
                          }
                      }

                      /* "pyarrow/io.pxi":2618
 *             )
 * 
 *         if asbytes:             # <<<<<<<<<<<<<<
 *             cp._PyBytes_Resize(&pyobj, <Py_ssize_t> output_length)
 *             return PyObject_to_object(pyobj)
*/
                      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_asbytes); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(6, 2618, __pyx_L1_error)
                      if (__pyx_t_2) {

                        /* "pyarrow/io.pxi":2619
 * 
 *         if asbytes:
 *             cp._PyBytes_Resize(&pyobj, <Py_ssize_t> output_length)             # <<<<<<<<<<<<<<
 *             return PyObject_to_object(pyobj)
 *         else:
*/
                        __pyx_t_12 = _PyBytes_Resize((&__pyx_v_pyobj), ((Py_ssize_t)__pyx_v_output_length)); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(6, 2619, __pyx_L1_error)

                        /* "pyarrow/io.pxi":2620
 *         if asbytes:
 *             cp._PyBytes_Resize(&pyobj, <Py_ssize_t> output_length)
 *             return PyObject_to_object(pyobj)             # <<<<<<<<<<<<<<
 *         else:
 *             out_buf.resize(output_length)
*/
                        __Pyx_XDECREF(__pyx_r);
                        __pyx_t_4 = __pyx_f_7pyarrow_8includes_6common_PyObject_to_object(__pyx_v_pyobj); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 2620, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_4);
                        __pyx_r = __pyx_t_4;
                        __pyx_t_4 = 0;
                        goto __pyx_L0;

                        /* "pyarrow/io.pxi":2618
 *             )
 * 
 *         if asbytes:             # <<<<<<<<<<<<<<
 *             cp._PyBytes_Resize(&pyobj, <Py_ssize_t> output_length)
 *             return PyObject_to_object(pyobj)
*/
                      }

                      /* "pyarrow/io.pxi":2622
 *             return PyObject_to_object(pyobj)
 *         else:
 *             out_buf.resize(output_length)             # <<<<<<<<<<<<<<
 *             return out_buf
 * 
*/
                      /*else*/ {
                        if (unlikely(!__pyx_v_out_buf)) { __Pyx_RaiseUnboundLocalError("out_buf"); __PYX_ERR(6, 2622, __pyx_L1_error) }
                        __pyx_t_6 = ((PyObject *)__pyx_v_out_buf);
                        __Pyx_INCREF(__pyx_t_6);
                        __pyx_t_9 = __Pyx_PyLong_From_int64_t(__pyx_v_output_length); if (unlikely(!__pyx_t_9)) __PYX_ERR(6, 2622, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_9);
                        __pyx_t_8 = 0;
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_9};
                          __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_resize, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
                          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
                          if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 2622, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_4);
                        }
                        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

                        /* "pyarrow/io.pxi":2623
 *         else:
 *             out_buf.resize(output_length)
 *             return out_buf             # <<<<<<<<<<<<<<
 * 
 *     def decompress(self, object buf, decompressed_size=None, asbytes=False,
*/
                        __Pyx_XDECREF(__pyx_r);
                        if (unlikely(!__pyx_v_out_buf)) { __Pyx_RaiseUnboundLocalError("out_buf"); __PYX_ERR(6, 2623, __pyx_L1_error) }
                        __Pyx_INCREF((PyObject *)__pyx_v_out_buf);
                        __pyx_r = ((PyObject *)__pyx_v_out_buf);
                        goto __pyx_L0;
                      }

                      /* "pyarrow/io.pxi":2567
 *         return self.unwrap().compression_level()
 * 
 *     def compress(self, object buf, asbytes=False, memory_pool=None):             # <<<<<<<<<<<<<<
 *         """
 *         Compress data from buffer-like object.
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_4);
                      __Pyx_XDECREF(__pyx_t_5);
                      __Pyx_XDECREF(__pyx_t_6);
                      __Pyx_XDECREF(__pyx_t_7);
                      __Pyx_XDECREF(__pyx_t_9);
                      __Pyx_AddTraceback("pyarrow.lib.Codec.compress", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XDECREF((PyObject *)__pyx_v_out_buf);
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":2625
 *             return out_buf
 * 
 *     def decompress(self, object buf, decompressed_size=None, asbytes=False,             # <<<<<<<<<<<<<<
 *                    memory_pool=None):
 *         """
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_5Codec_17decompress(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_5Codec_16decompress, "Codec.decompress(self, buf, decompressed_size=None, asbytes=False, memory_pool=None)\n\nDecompress data from buffer-like object.\n\nParameters\n----------\nbuf : pyarrow.Buffer, bytes, or memoryview-compatible object\ndecompressed_size : int, default None\n    Size of the decompressed result\nasbytes : boolean, default False\n    Return result as Python bytes object, otherwise Buffer\nmemory_pool : MemoryPool, default None\n    Memory pool to use for buffer allocations, if any.\n\nReturns\n-------\nuncompressed : pyarrow.Buffer or bytes (if asbytes=True)");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_5Codec_17decompress = {"decompress", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Codec_17decompress, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Codec_16decompress};
                    static PyObject *__pyx_pw_7pyarrow_3lib_5Codec_17decompress(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      PyObject *__pyx_v_buf = 0;
                      PyObject *__pyx_v_decompressed_size = 0;
                      PyObject *__pyx_v_asbytes = 0;
                      PyObject *__pyx_v_memory_pool = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[4] = {0,0,0,0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("decompress (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_buf,&__pyx_mstate_global->__pyx_n_u_decompressed_size,&__pyx_mstate_global->__pyx_n_u_asbytes,&__pyx_mstate_global->__pyx_n_u_memory_pool,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(6, 2625, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  4:
                            values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(6, 2625, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  3:
                            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(6, 2625, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  2:
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(6, 2625, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 2625, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "decompress", 0) < (0)) __PYX_ERR(6, 2625, __pyx_L3_error)
                          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
                          if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_False));

                          /* "pyarrow/io.pxi":2626
 * 
 *     def decompress(self, object buf, decompressed_size=None, asbytes=False,
 *                    memory_pool=None):             # <<<<<<<<<<<<<<
 *         """
 *         Decompress data from buffer-like object.
*/
                          if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None));
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("decompress", 0, 1, 4, i); __PYX_ERR(6, 2625, __pyx_L3_error) }
                          }
                        } else {
                          switch (__pyx_nargs) {
                            case  4:
                            values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(6, 2625, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  3:
                            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(6, 2625, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  2:
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(6, 2625, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 2625, __pyx_L3_error)
                            break;
                            default: goto __pyx_L5_argtuple_error;
                          }

                          /* "pyarrow/io.pxi":2625
 *             return out_buf
 * 
 *     def decompress(self, object buf, decompressed_size=None, asbytes=False,             # <<<<<<<<<<<<<<
 *                    memory_pool=None):
 *         """
*/
                          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
                          if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_False));

                          /* "pyarrow/io.pxi":2626
 * 
 *     def decompress(self, object buf, decompressed_size=None, asbytes=False,
 *                    memory_pool=None):             # <<<<<<<<<<<<<<
 *         """
 *         Decompress data from buffer-like object.
*/
                          if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None));
                        }
                        __pyx_v_buf = values[0];
                        __pyx_v_decompressed_size = values[1];
                        __pyx_v_asbytes = values[2];
                        __pyx_v_memory_pool = values[3];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("decompress", 0, 1, 4, __pyx_nargs); __PYX_ERR(6, 2625, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.Codec.decompress", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_5Codec_16decompress(((struct __pyx_obj_7pyarrow_3lib_Codec *)__pyx_v_self), __pyx_v_buf, __pyx_v_decompressed_size, __pyx_v_asbytes, __pyx_v_memory_pool);

                      /* "pyarrow/io.pxi":2625
 *             return out_buf
 * 
 *     def decompress(self, object buf, decompressed_size=None, asbytes=False,             # <<<<<<<<<<<<<<
 *                    memory_pool=None):
 *         """
*/

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_5Codec_16decompress(struct __pyx_obj_7pyarrow_3lib_Codec *__pyx_v_self, PyObject *__pyx_v_buf, PyObject *__pyx_v_decompressed_size, PyObject *__pyx_v_asbytes, PyObject *__pyx_v_memory_pool) {
                      std::shared_ptr< arrow::Buffer>  __pyx_v_owned_buf;
                       arrow::Buffer *__pyx_v_c_buf;
                      struct __pyx_obj_7pyarrow_3lib_Buffer *__pyx_v_out_buf = 0;
                      int64_t __pyx_v_output_size;
                      uint8_t *__pyx_v_output_buffer;
                      PyObject *__pyx_v_pybuf = NULL;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      std::shared_ptr< arrow::Buffer>  __pyx_t_1;
                      int __pyx_t_2;
                      PyObject *__pyx_t_3 = NULL;
                      PyObject *__pyx_t_4 = NULL;
                      size_t __pyx_t_5;
                      int64_t __pyx_t_6;
                      PyObject *__pyx_t_7 = NULL;
                      PyObject *__pyx_t_8 = NULL;
                      PyObject *__pyx_t_9 = NULL;
                       arrow::util::Codec *__pyx_t_10;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("decompress", 0);

                      /* "pyarrow/io.pxi":2649
 *             Buffer out_buf
 *             int64_t output_size
 *             uint8_t* output_buffer = NULL             # <<<<<<<<<<<<<<
 * 
 *         owned_buf = as_c_buffer(buf)
*/
                      __pyx_v_output_buffer = NULL;

                      /* "pyarrow/io.pxi":2651
 *             uint8_t* output_buffer = NULL
 * 
 *         owned_buf = as_c_buffer(buf)             # <<<<<<<<<<<<<<
 *         c_buf = owned_buf.get()
 * 
*/
                      __pyx_t_1 = __pyx_f_7pyarrow_3lib_as_c_buffer(__pyx_v_buf); if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 2651, __pyx_L1_error)
                      __pyx_v_owned_buf = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_1);

                      /* "pyarrow/io.pxi":2652
 * 
 *         owned_buf = as_c_buffer(buf)
 *         c_buf = owned_buf.get()             # <<<<<<<<<<<<<<
 * 
 *         if decompressed_size is None:
*/
                      __pyx_v_c_buf = __pyx_v_owned_buf.get();

                      /* "pyarrow/io.pxi":2654
 *         c_buf = owned_buf.get()
 * 
 *         if decompressed_size is None:             # <<<<<<<<<<<<<<
 *             raise ValueError(
 *                 "Must pass decompressed_size"
*/
                      __pyx_t_2 = (__pyx_v_decompressed_size == Py_None);
                      if (unlikely(__pyx_t_2)) {

                        /* "pyarrow/io.pxi":2655
 * 
 *         if decompressed_size is None:
 *             raise ValueError(             # <<<<<<<<<<<<<<
 *                 "Must pass decompressed_size"
 *             )
*/
                        __pyx_t_4 = NULL;
                        __pyx_t_5 = 1;
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Must_pass_decompressed_size};
                          __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                          if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 2655, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_3);
                        }
                        __Pyx_Raise(__pyx_t_3, 0, 0, 0);
                        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                        __PYX_ERR(6, 2655, __pyx_L1_error)

                        /* "pyarrow/io.pxi":2654
 *         c_buf = owned_buf.get()
 * 
 *         if decompressed_size is None:             # <<<<<<<<<<<<<<
 *             raise ValueError(
 *                 "Must pass decompressed_size"
*/
                      }

                      /* "pyarrow/io.pxi":2659
 *             )
 * 
 *         output_size = decompressed_size             # <<<<<<<<<<<<<<
 * 
 *         if asbytes:
*/
                      __pyx_t_6 = __Pyx_PyLong_As_int64_t(__pyx_v_decompressed_size); if (unlikely((__pyx_t_6 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(6, 2659, __pyx_L1_error)
                      __pyx_v_output_size = __pyx_t_6;

                      /* "pyarrow/io.pxi":2661
 *         output_size = decompressed_size
 * 
 *         if asbytes:             # <<<<<<<<<<<<<<
 *             pybuf = cp.PyBytes_FromStringAndSize(NULL, output_size)
 *             output_buffer = <uint8_t*> cp.PyBytes_AS_STRING(pybuf)
*/
                      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_asbytes); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(6, 2661, __pyx_L1_error)
                      if (__pyx_t_2) {

                        /* "pyarrow/io.pxi":2662
 * 
 *         if asbytes:
 *             pybuf = cp.PyBytes_FromStringAndSize(NULL, output_size)             # <<<<<<<<<<<<<<
 *             output_buffer = <uint8_t*> cp.PyBytes_AS_STRING(pybuf)
 *         else:
*/
                        __pyx_t_3 = PyBytes_FromStringAndSize(NULL, __pyx_v_output_size); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 2662, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_3);
                        __pyx_v_pybuf = ((PyObject*)__pyx_t_3);
                        __pyx_t_3 = 0;

                        /* "pyarrow/io.pxi":2663
 *         if asbytes:
 *             pybuf = cp.PyBytes_FromStringAndSize(NULL, output_size)
 *             output_buffer = <uint8_t*> cp.PyBytes_AS_STRING(pybuf)             # <<<<<<<<<<<<<<
 *         else:
 *             out_buf = allocate_buffer(output_size, memory_pool=memory_pool)
*/
                        __pyx_v_output_buffer = ((uint8_t *)PyBytes_AS_STRING(__pyx_v_pybuf));

                        /* "pyarrow/io.pxi":2661
 *         output_size = decompressed_size
 * 
 *         if asbytes:             # <<<<<<<<<<<<<<
 *             pybuf = cp.PyBytes_FromStringAndSize(NULL, output_size)
 *             output_buffer = <uint8_t*> cp.PyBytes_AS_STRING(pybuf)
*/
                        goto __pyx_L4;
                      }

                      /* "pyarrow/io.pxi":2665
 *             output_buffer = <uint8_t*> cp.PyBytes_AS_STRING(pybuf)
 *         else:
 *             out_buf = allocate_buffer(output_size, memory_pool=memory_pool)             # <<<<<<<<<<<<<<
 *             output_buffer = out_buf.buffer.get().mutable_data()
 * 
*/
                      /*else*/ {
                        __pyx_t_4 = NULL;
                        __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_allocate_buffer); if (unlikely(!__pyx_t_7)) __PYX_ERR(6, 2665, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_7);
                        __pyx_t_8 = __Pyx_PyLong_From_int64_t(__pyx_v_output_size); if (unlikely(!__pyx_t_8)) __PYX_ERR(6, 2665, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_8);
                        __pyx_t_5 = 1;
                        #if CYTHON_UNPACK_METHODS
                        if (unlikely(PyMethod_Check(__pyx_t_7))) {
                          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_7);
                          assert(__pyx_t_4);
                          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
                          __Pyx_INCREF(__pyx_t_4);
                          __Pyx_INCREF(__pyx__function);
                          __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
                          __pyx_t_5 = 0;
                        }
                        #endif
                        {
                          PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_4, __pyx_t_8};
                          __pyx_t_9 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(6, 2665, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_9);
                          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_memory_pool, __pyx_v_memory_pool, __pyx_t_9, __pyx_callargs+2, 0) < (0)) __PYX_ERR(6, 2665, __pyx_L1_error)
                          __pyx_t_3 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_9);
                          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
                          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
                          if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 2665, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_3);
                        }
                        if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Buffer))))) __PYX_ERR(6, 2665, __pyx_L1_error)
                        __pyx_v_out_buf = ((struct __pyx_obj_7pyarrow_3lib_Buffer *)__pyx_t_3);
                        __pyx_t_3 = 0;

                        /* "pyarrow/io.pxi":2666
 *         else:
 *             out_buf = allocate_buffer(output_size, memory_pool=memory_pool)
 *             output_buffer = out_buf.buffer.get().mutable_data()             # <<<<<<<<<<<<<<
 * 
 *         with nogil:
*/
                        if (unlikely(((PyObject *)__pyx_v_out_buf) == Py_None)) {
                          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "buffer");
                          __PYX_ERR(6, 2666, __pyx_L1_error)
                        }
                        __pyx_v_output_buffer = __pyx_v_out_buf->buffer.get()->mutable_data();
                      }
                      __pyx_L4:;

                      /* "pyarrow/io.pxi":2668
 *             output_buffer = out_buf.buffer.get().mutable_data()
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             GetResultValue(
 *                 self.unwrap().Decompress(
*/
                      {
                          PyThreadState * _save;
                          _save = PyEval_SaveThread();
                          __Pyx_FastGIL_Remember();
                          /*try:*/ {

                            /* "pyarrow/io.pxi":2670
 *         with nogil:
 *             GetResultValue(
 *                 self.unwrap().Decompress(             # <<<<<<<<<<<<<<
 *                     c_buf.size(),
 *                     c_buf.data(),
*/
                            if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                              PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "unwrap");
                              __Pyx_PyGILState_Release(__pyx_gilstate_save);
                              __PYX_ERR(6, 2670, __pyx_L6_error)
                            }
                            __pyx_t_10 = __pyx_f_7pyarrow_3lib_5Codec_unwrap(__pyx_v_self); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(6, 2670, __pyx_L6_error)

                            /* "pyarrow/io.pxi":2669
 * 
 *         with nogil:
 *             GetResultValue(             # <<<<<<<<<<<<<<
 *                 self.unwrap().Decompress(
 *                     c_buf.size(),
*/
                            arrow::py::GetResultValue<int64_t>(__pyx_t_10->Decompress(__pyx_v_c_buf->size(), __pyx_v_c_buf->data(), __pyx_v_output_size, __pyx_v_output_buffer)); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(6, 2669, __pyx_L6_error)
                          }

                          /* "pyarrow/io.pxi":2668
 *             output_buffer = out_buf.buffer.get().mutable_data()
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             GetResultValue(
 *                 self.unwrap().Decompress(
*/
                          /*finally:*/ {
                            /*normal exit:*/{
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L7;
                            }
                            __pyx_L6_error: {
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L1_error;
                            }
                            __pyx_L7:;
                          }
                      }

                      /* "pyarrow/io.pxi":2678
 *             )
 * 
 *         return pybuf if asbytes else out_buf             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
*/
                      __Pyx_XDECREF(__pyx_r);
                      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_asbytes); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(6, 2678, __pyx_L1_error)
                      if (__pyx_t_2) {
                        if (unlikely(!__pyx_v_pybuf)) { __Pyx_RaiseUnboundLocalError("pybuf"); __PYX_ERR(6, 2678, __pyx_L1_error) }
                        __Pyx_INCREF(__pyx_v_pybuf);
                        __pyx_t_3 = __pyx_v_pybuf;
                      } else {
                        if (unlikely(!__pyx_v_out_buf)) { __Pyx_RaiseUnboundLocalError("out_buf"); __PYX_ERR(6, 2678, __pyx_L1_error) }
                        __Pyx_INCREF((PyObject *)__pyx_v_out_buf);
                        __pyx_t_3 = ((PyObject *)__pyx_v_out_buf);
                      }
                      __pyx_r = __pyx_t_3;
                      __pyx_t_3 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/io.pxi":2625
 *             return out_buf
 * 
 *     def decompress(self, object buf, decompressed_size=None, asbytes=False,             # <<<<<<<<<<<<<<
 *                    memory_pool=None):
 *         """
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_XDECREF(__pyx_t_4);
                      __Pyx_XDECREF(__pyx_t_7);
                      __Pyx_XDECREF(__pyx_t_8);
                      __Pyx_XDECREF(__pyx_t_9);
                      __Pyx_AddTraceback("pyarrow.lib.Codec.decompress", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XDECREF((PyObject *)__pyx_v_out_buf);
                      __Pyx_XDECREF(__pyx_v_pybuf);
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":2680
 *         return pybuf if asbytes else out_buf
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         name = f"pyarrow.{self.__class__.__name__}"
 *         return (f"<{name} "
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_5Codec_19__repr__(PyObject *__pyx_v_self); /*proto*/
                    static PyObject *__pyx_pw_7pyarrow_3lib_5Codec_19__repr__(PyObject *__pyx_v_self) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_5Codec_18__repr__(((struct __pyx_obj_7pyarrow_3lib_Codec *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_5Codec_18__repr__(struct __pyx_obj_7pyarrow_3lib_Codec *__pyx_v_self) {
                      PyObject *__pyx_v_name = NULL;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      PyObject *__pyx_t_3 = NULL;
                      PyObject *__pyx_t_4[7];
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__repr__", 0);

                      /* "pyarrow/io.pxi":2681
 * 
 *     def __repr__(self):
 *         name = f"pyarrow.{self.__class__.__name__}"             # <<<<<<<<<<<<<<
 *         return (f"<{name} "
 *                 f"name={self.name} "
*/
                      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 2681, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_name_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 2681, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_2);
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_t_2, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 2681, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                      __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_pyarrow, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 2681, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_2);
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      __pyx_v_name = ((PyObject*)__pyx_t_2);
                      __pyx_t_2 = 0;

                      /* "pyarrow/io.pxi":2682
 *     def __repr__(self):
 *         name = f"pyarrow.{self.__class__.__name__}"
 *         return (f"<{name} "             # <<<<<<<<<<<<<<
 *                 f"name={self.name} "
 *                 f"compression_level={self.compression_level}>")
*/
                      __Pyx_XDECREF(__pyx_r);

                      /* "pyarrow/io.pxi":2683
 *         name = f"pyarrow.{self.__class__.__name__}"
 *         return (f"<{name} "
 *                 f"name={self.name} "             # <<<<<<<<<<<<<<
 *                 f"compression_level={self.compression_level}>")
 * 
*/
                      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 2683, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_2);
                      __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_t_2, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 2683, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

                      /* "pyarrow/io.pxi":2684
 *         return (f"<{name} "
 *                 f"name={self.name} "
 *                 f"compression_level={self.compression_level}>")             # <<<<<<<<<<<<<<
 * 
 * 
*/
                      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_compression_level); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 2684, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_2);
                      __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_t_2, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 2684, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_3);
                      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                      __pyx_t_4[0] = __pyx_mstate_global->__pyx_kp_u__4;
                      __pyx_t_4[1] = __pyx_v_name;
                      __pyx_t_4[2] = __pyx_mstate_global->__pyx_kp_u_name_4;
                      __pyx_t_4[3] = __pyx_t_1;
                      __pyx_t_4[4] = __pyx_mstate_global->__pyx_kp_u_compression_level_2;
                      __pyx_t_4[5] = __pyx_t_3;
                      __pyx_t_4[6] = __pyx_mstate_global->__pyx_kp_u__5;

                      /* "pyarrow/io.pxi":2682
 *     def __repr__(self):
 *         name = f"pyarrow.{self.__class__.__name__}"
 *         return (f"<{name} "             # <<<<<<<<<<<<<<
 *                 f"name={self.name} "
 *                 f"compression_level={self.compression_level}>")
*/
                      __pyx_t_2 = __Pyx_PyUnicode_Join(__pyx_t_4, 7, 1 * 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_v_name) + 6 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1) + 19 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_v_name) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3));
                      if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 2682, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_2);
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                      __pyx_r = __pyx_t_2;
                      __pyx_t_2 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/io.pxi":2680
 *         return pybuf if asbytes else out_buf
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         name = f"pyarrow.{self.__class__.__name__}"
 *         return (f"<{name} "
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_AddTraceback("pyarrow.lib.Codec.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XDECREF(__pyx_v_name);
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.wrapped cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_5Codec_21__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_5Codec_20__reduce_cython__, "Codec.__reduce_cython__(self)");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_5Codec_21__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Codec_21__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Codec_20__reduce_cython__};
                    static PyObject *__pyx_pw_7pyarrow_3lib_5Codec_21__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; }
                      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                      if (unlikely(__pyx_kwds_len < 0)) return NULL;
                      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;}
                      __pyx_r = __pyx_pf_7pyarrow_3lib_5Codec_20__reduce_cython__(((struct __pyx_obj_7pyarrow_3lib_Codec *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_5Codec_20__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_Codec *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__reduce_cython__", 0);

                      /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "self.wrapped cannot be converted to a Python object for pickling"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "self.wrapped cannot be converted to a Python object for pickling"
*/
                      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_self_wrapped_cannot_be_converted, 0, 0);
                      __PYX_ERR(7, 2, __pyx_L1_error)

                      /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.wrapped cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib.Codec.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "self.wrapped cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.wrapped cannot be converted to a Python object for pickling"
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_5Codec_23__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_5Codec_22__setstate_cython__, "Codec.__setstate_cython__(self, __pyx_state)");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_5Codec_23__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Codec_23__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Codec_22__setstate_cython__};
                    static PyObject *__pyx_pw_7pyarrow_3lib_5Codec_23__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[1] = {0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(7, 3, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(7, 3, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(7, 3, __pyx_L3_error)
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(7, 3, __pyx_L3_error) }
                          }
                        } else if (unlikely(__pyx_nargs != 1)) {
                          goto __pyx_L5_argtuple_error;
                        } else {
                          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(7, 3, __pyx_L3_error)
                        }
                        __pyx_v___pyx_state = values[0];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(7, 3, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.Codec.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_5Codec_22__setstate_cython__(((struct __pyx_obj_7pyarrow_3lib_Codec *)__pyx_v_self), __pyx_v___pyx_state);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_5Codec_22__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_Codec *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__setstate_cython__", 0);

                      /* "(tree fragment)":4
 *     raise TypeError, "self.wrapped cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "self.wrapped cannot be converted to a Python object for pickling"             # <<<<<<<<<<<<<<
*/
                      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_self_wrapped_cannot_be_converted, 0, 0);
                      __PYX_ERR(7, 4, __pyx_L1_error)

                      /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "self.wrapped cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.wrapped cannot be converted to a Python object for pickling"
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib.Codec.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":2687
 * 
 * 
 * def compress(object buf, codec='lz4', asbytes=False, memory_pool=None):             # <<<<<<<<<<<<<<
 *     """
 *     Compress data from buffer-like object.
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_257compress(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_256compress, "compress(buf, codec='lz4', asbytes=False, memory_pool=None)\n\nCompress data from buffer-like object.\n\nParameters\n----------\nbuf : pyarrow.Buffer, bytes, or other object supporting buffer protocol\ncodec : str, default 'lz4'\n    Compression codec.\n    Supported types: {'brotli, 'gzip', 'lz4', 'lz4_raw', 'snappy', 'zstd'}\nasbytes : bool, default False\n    Return result as Python bytes object, otherwise Buffer.\nmemory_pool : MemoryPool, default None\n    Memory pool to use for buffer allocations, if any.\n\nReturns\n-------\ncompressed : pyarrow.Buffer or bytes (if asbytes=True)");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_257compress = {"compress", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_257compress, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_256compress};
                    static PyObject *__pyx_pw_7pyarrow_3lib_257compress(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      PyObject *__pyx_v_buf = 0;
                      PyObject *__pyx_v_codec = 0;
                      PyObject *__pyx_v_asbytes = 0;
                      PyObject *__pyx_v_memory_pool = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[4] = {0,0,0,0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("compress (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_buf,&__pyx_mstate_global->__pyx_n_u_codec,&__pyx_mstate_global->__pyx_n_u_asbytes,&__pyx_mstate_global->__pyx_n_u_memory_pool,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(6, 2687, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  4:
                            values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(6, 2687, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  3:
                            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(6, 2687, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  2:
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(6, 2687, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 2687, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "compress", 0) < (0)) __PYX_ERR(6, 2687, __pyx_L3_error)
                          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_n_u_lz4_2)));
                          if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False)));
                          if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None));
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("compress", 0, 1, 4, i); __PYX_ERR(6, 2687, __pyx_L3_error) }
                          }
                        } else {
                          switch (__pyx_nargs) {
                            case  4:
                            values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(6, 2687, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  3:
                            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(6, 2687, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  2:
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(6, 2687, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 2687, __pyx_L3_error)
                            break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_n_u_lz4_2)));
                          if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False)));
                          if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None));
                        }
                        __pyx_v_buf = values[0];
                        __pyx_v_codec = values[1];
                        __pyx_v_asbytes = values[2];
                        __pyx_v_memory_pool = values[3];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("compress", 0, 1, 4, __pyx_nargs); __PYX_ERR(6, 2687, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.compress", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_256compress(__pyx_self, __pyx_v_buf, __pyx_v_codec, __pyx_v_asbytes, __pyx_v_memory_pool);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_256compress(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_buf, PyObject *__pyx_v_codec, PyObject *__pyx_v_asbytes, PyObject *__pyx_v_memory_pool) {
                      struct __pyx_obj_7pyarrow_3lib_Codec *__pyx_v_coder = 0;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      size_t __pyx_t_3;
                      PyObject *__pyx_t_4 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("compress", 0);

                      /* "pyarrow/io.pxi":2706
 *     compressed : pyarrow.Buffer or bytes (if asbytes=True)
 *     """
 *     cdef Codec coder = Codec(codec)             # <<<<<<<<<<<<<<
 *     return coder.compress(buf, asbytes=asbytes, memory_pool=memory_pool)
 * 
*/
                      __pyx_t_2 = NULL;
                      __pyx_t_3 = 1;
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_codec};
                        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Codec, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 2706, __pyx_L1_error)
                        __Pyx_GOTREF((PyObject *)__pyx_t_1);
                      }
                      __pyx_v_coder = ((struct __pyx_obj_7pyarrow_3lib_Codec *)__pyx_t_1);
                      __pyx_t_1 = 0;

                      /* "pyarrow/io.pxi":2707
 *     """
 *     cdef Codec coder = Codec(codec)
 *     return coder.compress(buf, asbytes=asbytes, memory_pool=memory_pool)             # <<<<<<<<<<<<<<
 * 
 * 
*/
                      __Pyx_XDECREF(__pyx_r);
                      __pyx_t_2 = ((PyObject *)__pyx_v_coder);
                      __Pyx_INCREF(__pyx_t_2);
                      __pyx_t_3 = 0;
                      {
                        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_2, __pyx_v_buf};
                        __pyx_t_4 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 2707, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_4);
                        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_asbytes, __pyx_v_asbytes, __pyx_t_4, __pyx_callargs+2, 0) < (0)) __PYX_ERR(6, 2707, __pyx_L1_error)
                        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_memory_pool, __pyx_v_memory_pool, __pyx_t_4, __pyx_callargs+2, 1) < (0)) __PYX_ERR(6, 2707, __pyx_L1_error)
                        __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_compress, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_4);
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 2707, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __pyx_r = __pyx_t_1;
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/io.pxi":2687
 * 
 * 
 * def compress(object buf, codec='lz4', asbytes=False, memory_pool=None):             # <<<<<<<<<<<<<<
 *     """
 *     Compress data from buffer-like object.
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_XDECREF(__pyx_t_4);
                      __Pyx_AddTraceback("pyarrow.lib.compress", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XDECREF((PyObject *)__pyx_v_coder);
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":2710
 * 
 * 
 * def decompress(object buf, decompressed_size=None, codec='lz4',             # <<<<<<<<<<<<<<
 *                asbytes=False, memory_pool=None):
 *     """
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_259decompress(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_258decompress, "decompress(buf, decompressed_size=None, codec='lz4', asbytes=False, memory_pool=None)\n\nDecompress data from buffer-like object.\n\nParameters\n----------\nbuf : pyarrow.Buffer, bytes, or memoryview-compatible object\n    Input object to decompress data from.\ndecompressed_size : int, default None\n    Size of the decompressed result\ncodec : str, default 'lz4'\n    Compression codec.\n    Supported types: {'brotli, 'gzip', 'lz4', 'lz4_raw', 'snappy', 'zstd'}\nasbytes : bool, default False\n    Return result as Python bytes object, otherwise Buffer.\nmemory_pool : MemoryPool, default None\n    Memory pool to use for buffer allocations, if any.\n\nReturns\n-------\nuncompressed : pyarrow.Buffer or bytes (if asbytes=True)");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_259decompress = {"decompress", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_259decompress, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_258decompress};
                    static PyObject *__pyx_pw_7pyarrow_3lib_259decompress(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      PyObject *__pyx_v_buf = 0;
                      PyObject *__pyx_v_decompressed_size = 0;
                      PyObject *__pyx_v_codec = 0;
                      PyObject *__pyx_v_asbytes = 0;
                      PyObject *__pyx_v_memory_pool = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[5] = {0,0,0,0,0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("decompress (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_buf,&__pyx_mstate_global->__pyx_n_u_decompressed_size,&__pyx_mstate_global->__pyx_n_u_codec,&__pyx_mstate_global->__pyx_n_u_asbytes,&__pyx_mstate_global->__pyx_n_u_memory_pool,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(6, 2710, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  5:
                            values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(6, 2710, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  4:
                            values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(6, 2710, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  3:
                            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(6, 2710, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  2:
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(6, 2710, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 2710, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "decompress", 0) < (0)) __PYX_ERR(6, 2710, __pyx_L3_error)
                          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
                          if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_n_u_lz4_2)));

                          /* "pyarrow/io.pxi":2711
 * 
 * def decompress(object buf, decompressed_size=None, codec='lz4',
 *                asbytes=False, memory_pool=None):             # <<<<<<<<<<<<<<
 *     """
 *     Decompress data from buffer-like object.
*/
                          if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False)));
                          if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)Py_None));
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("decompress", 0, 1, 5, i); __PYX_ERR(6, 2710, __pyx_L3_error) }
                          }
                        } else {
                          switch (__pyx_nargs) {
                            case  5:
                            values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(6, 2710, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  4:
                            values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(6, 2710, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  3:
                            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(6, 2710, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  2:
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(6, 2710, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 2710, __pyx_L3_error)
                            break;
                            default: goto __pyx_L5_argtuple_error;
                          }

                          /* "pyarrow/io.pxi":2710
 * 
 * 
 * def decompress(object buf, decompressed_size=None, codec='lz4',             # <<<<<<<<<<<<<<
 *                asbytes=False, memory_pool=None):
 *     """
*/
                          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
                          if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_n_u_lz4_2)));
                          if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False)));

                          /* "pyarrow/io.pxi":2711
 * 
 * def decompress(object buf, decompressed_size=None, codec='lz4',
 *                asbytes=False, memory_pool=None):             # <<<<<<<<<<<<<<
 *     """
 *     Decompress data from buffer-like object.
*/
                          if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)Py_None));
                        }
                        __pyx_v_buf = values[0];
                        __pyx_v_decompressed_size = values[1];
                        __pyx_v_codec = values[2];
                        __pyx_v_asbytes = values[3];
                        __pyx_v_memory_pool = values[4];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("decompress", 0, 1, 5, __pyx_nargs); __PYX_ERR(6, 2710, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.decompress", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_258decompress(__pyx_self, __pyx_v_buf, __pyx_v_decompressed_size, __pyx_v_codec, __pyx_v_asbytes, __pyx_v_memory_pool);

                      /* "pyarrow/io.pxi":2710
 * 
 * 
 * def decompress(object buf, decompressed_size=None, codec='lz4',             # <<<<<<<<<<<<<<
 *                asbytes=False, memory_pool=None):
 *     """
*/

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_258decompress(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_buf, PyObject *__pyx_v_decompressed_size, PyObject *__pyx_v_codec, PyObject *__pyx_v_asbytes, PyObject *__pyx_v_memory_pool) {
                      struct __pyx_obj_7pyarrow_3lib_Codec *__pyx_v_decoder = 0;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      size_t __pyx_t_3;
                      PyObject *__pyx_t_4 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("decompress", 0);

                      /* "pyarrow/io.pxi":2733
 *     uncompressed : pyarrow.Buffer or bytes (if asbytes=True)
 *     """
 *     cdef Codec decoder = Codec(codec)             # <<<<<<<<<<<<<<
 *     return decoder.decompress(buf, asbytes=asbytes, memory_pool=memory_pool,
 *                               decompressed_size=decompressed_size)
*/
                      __pyx_t_2 = NULL;
                      __pyx_t_3 = 1;
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_codec};
                        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Codec, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 2733, __pyx_L1_error)
                        __Pyx_GOTREF((PyObject *)__pyx_t_1);
                      }
                      __pyx_v_decoder = ((struct __pyx_obj_7pyarrow_3lib_Codec *)__pyx_t_1);
                      __pyx_t_1 = 0;

                      /* "pyarrow/io.pxi":2734
 *     """
 *     cdef Codec decoder = Codec(codec)
 *     return decoder.decompress(buf, asbytes=asbytes, memory_pool=memory_pool,             # <<<<<<<<<<<<<<
 *                               decompressed_size=decompressed_size)
 * 
*/
                      __Pyx_XDECREF(__pyx_r);
                      __pyx_t_2 = ((PyObject *)__pyx_v_decoder);
                      __Pyx_INCREF(__pyx_t_2);

                      /* "pyarrow/io.pxi":2735
 *     cdef Codec decoder = Codec(codec)
 *     return decoder.decompress(buf, asbytes=asbytes, memory_pool=memory_pool,
 *                               decompressed_size=decompressed_size)             # <<<<<<<<<<<<<<
 * 
 * 
*/
                      __pyx_t_3 = 0;
                      {
                        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 3 : 0)] = {__pyx_t_2, __pyx_v_buf};
                        __pyx_t_4 = __Pyx_MakeVectorcallBuilderKwds(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 2734, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_4);
                        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_asbytes, __pyx_v_asbytes, __pyx_t_4, __pyx_callargs+2, 0) < (0)) __PYX_ERR(6, 2734, __pyx_L1_error)
                        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_memory_pool, __pyx_v_memory_pool, __pyx_t_4, __pyx_callargs+2, 1) < (0)) __PYX_ERR(6, 2734, __pyx_L1_error)
                        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_decompressed_size, __pyx_v_decompressed_size, __pyx_t_4, __pyx_callargs+2, 2) < (0)) __PYX_ERR(6, 2734, __pyx_L1_error)
                        __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_decompress, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_4);
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 2734, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __pyx_r = __pyx_t_1;
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/io.pxi":2710
 * 
 * 
 * def decompress(object buf, decompressed_size=None, codec='lz4',             # <<<<<<<<<<<<<<
 *                asbytes=False, memory_pool=None):
 *     """
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_XDECREF(__pyx_t_4);
                      __Pyx_AddTraceback("pyarrow.lib.decompress", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XDECREF((PyObject *)__pyx_v_decoder);
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":2738
 * 
 * 
 * def input_stream(source, compression='detect', buffer_size=None):             # <<<<<<<<<<<<<<
 *     """
 *     Create an Arrow input stream.
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_261input_stream(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_260input_stream, "input_stream(source, compression='detect', buffer_size=None)\n\nCreate an Arrow input stream.\n\nParameters\n----------\nsource : str, Path, buffer, or file-like object\n    The source to open for reading.\ncompression : str optional, default 'detect'\n    The compression algorithm to use for on-the-fly decompression.\n    If \"detect\" and source is a file path, then compression will be\n    chosen based on the file extension.\n    If None, no compression will be applied.\n    Otherwise, a well-known algorithm name must be supplied (e.g. \"gzip\").\nbuffer_size : int, default None\n    If None or 0, no buffering will happen. Otherwise the size of the\n    temporary read buffer.\n\nExamples\n--------\nCreate a readable BufferReader (NativeFile) from a Buffer or a memoryview object:\n\n>>> import pyarrow as pa\n>>> buf = memoryview(b\"some data\")\n>>> with pa.input_stream(buf) as stream:\n...     stream.read(4)\n...\nb'some'\n\nCreate a readable OSFile (NativeFile) from a string or file path:\n\n>>> import gzip\n>>> with gzip.open('example.gz', 'wb') as f:\n...     f.write(b'some data')\n...\n9\n>>> with pa.input_stream('example.gz') as stream:\n...     stream.read()\n...\nb'some data'\n\nCreate a readable PythonFile (NativeFile) from a a Python file object:\n\n>>> with open('example.txt', mode='w') as f:\n...     f.write('some text')\n...\n9\n>>> with pa.input_stream('example.txt') as stream:\n...     stream.read(6)\n...\nb'some t'");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_261input_stream = {"input_stream", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_261input_stream, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_260input_stream};
                    static PyObject *__pyx_pw_7pyarrow_3lib_261input_stream(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      PyObject *__pyx_v_source = 0;
                      PyObject *__pyx_v_compression = 0;
                      PyObject *__pyx_v_buffer_size = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[3] = {0,0,0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("input_stream (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_source,&__pyx_mstate_global->__pyx_n_u_compression,&__pyx_mstate_global->__pyx_n_u_buffer_size,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(6, 2738, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  3:
                            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(6, 2738, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  2:
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(6, 2738, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 2738, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "input_stream", 0) < (0)) __PYX_ERR(6, 2738, __pyx_L3_error)
                          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_n_u_detect)));
                          if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("input_stream", 0, 1, 3, i); __PYX_ERR(6, 2738, __pyx_L3_error) }
                          }
                        } else {
                          switch (__pyx_nargs) {
                            case  3:
                            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(6, 2738, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  2:
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(6, 2738, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 2738, __pyx_L3_error)
                            break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_n_u_detect)));
                          if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
                        }
                        __pyx_v_source = values[0];
                        __pyx_v_compression = values[1];
                        __pyx_v_buffer_size = values[2];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("input_stream", 0, 1, 3, __pyx_nargs); __PYX_ERR(6, 2738, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.input_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_260input_stream(__pyx_self, __pyx_v_source, __pyx_v_compression, __pyx_v_buffer_size);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_260input_stream(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_source, PyObject *__pyx_v_compression, PyObject *__pyx_v_buffer_size) {
                      struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_stream = 0;
                      PyObject *__pyx_v_source_path = NULL;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      PyObject *__pyx_t_3 = NULL;
                      PyObject *__pyx_t_4 = NULL;
                      PyObject *__pyx_t_5 = NULL;
                      PyObject *__pyx_t_6 = NULL;
                      size_t __pyx_t_7;
                      int __pyx_t_8;
                      int __pyx_t_9;
                      int __pyx_t_10;
                      PyObject *__pyx_t_11 = NULL;
                      PyObject *__pyx_t_12 = NULL;
                      PyObject *__pyx_t_13[3];
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("input_stream", 0);
                      __Pyx_INCREF(__pyx_v_compression);

                      /* "pyarrow/io.pxi":2792
 *     cdef NativeFile stream
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         source_path = _stringify_path(source)
 *     except TypeError:
*/
                      {
                        __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:*/ {

                          /* "pyarrow/io.pxi":2793
 * 
 *     try:
 *         source_path = _stringify_path(source)             # <<<<<<<<<<<<<<
 *     except TypeError:
 *         source_path = None
*/
                          __pyx_t_5 = NULL;
                          __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_stringify_path); if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 2793, __pyx_L3_error)
                          __Pyx_GOTREF(__pyx_t_6);
                          __pyx_t_7 = 1;
                          #if CYTHON_UNPACK_METHODS
                          if (unlikely(PyMethod_Check(__pyx_t_6))) {
                            __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
                            assert(__pyx_t_5);
                            PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
                            __Pyx_INCREF(__pyx_t_5);
                            __Pyx_INCREF(__pyx__function);
                            __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
                            __pyx_t_7 = 0;
                          }
                          #endif
                          {
                            PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_source};
                            __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                            __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
                            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                            if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 2793, __pyx_L3_error)
                            __Pyx_GOTREF(__pyx_t_4);
                          }
                          __pyx_v_source_path = __pyx_t_4;
                          __pyx_t_4 = 0;

                          /* "pyarrow/io.pxi":2792
 *     cdef NativeFile stream
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         source_path = _stringify_path(source)
 *     except TypeError:
*/
                        }
                        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                        goto __pyx_L8_try_end;
                        __pyx_L3_error:;
                        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
                        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;

                        /* "pyarrow/io.pxi":2794
 *     try:
 *         source_path = _stringify_path(source)
 *     except TypeError:             # <<<<<<<<<<<<<<
 *         source_path = None
 * 
*/
                        __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_TypeError))));
                        if (__pyx_t_8) {
                          __Pyx_ErrRestore(0,0,0);

                          /* "pyarrow/io.pxi":2795
 *         source_path = _stringify_path(source)
 *     except TypeError:
 *         source_path = None             # <<<<<<<<<<<<<<
 * 
 *     if isinstance(source, NativeFile):
*/
                          __Pyx_INCREF(Py_None);
                          __Pyx_XDECREF_SET(__pyx_v_source_path, Py_None);
                          goto __pyx_L4_exception_handled;
                        }
                        goto __pyx_L5_except_error;

                        /* "pyarrow/io.pxi":2792
 *     cdef NativeFile stream
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         source_path = _stringify_path(source)
 *     except TypeError:
*/
                        __pyx_L5_except_error:;
                        __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:;
                      }

                      /* "pyarrow/io.pxi":2797
 *         source_path = None
 * 
 *     if isinstance(source, NativeFile):             # <<<<<<<<<<<<<<
 *         stream = source
 *     elif source_path is not None:
*/
                      __pyx_t_9 = __Pyx_TypeCheck(__pyx_v_source, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NativeFile); 
                      if (__pyx_t_9) {

                        /* "pyarrow/io.pxi":2798
 * 
 *     if isinstance(source, NativeFile):
 *         stream = source             # <<<<<<<<<<<<<<
 *     elif source_path is not None:
 *         stream = OSFile(source_path, 'r')
*/
                        __pyx_t_4 = __pyx_v_source;
                        __Pyx_INCREF(__pyx_t_4);
                        if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NativeFile))))) __PYX_ERR(6, 2798, __pyx_L1_error)
                        __pyx_v_stream = ((struct __pyx_obj_7pyarrow_3lib_NativeFile *)__pyx_t_4);
                        __pyx_t_4 = 0;

                        /* "pyarrow/io.pxi":2797
 *         source_path = None
 * 
 *     if isinstance(source, NativeFile):             # <<<<<<<<<<<<<<
 *         stream = source
 *     elif source_path is not None:
*/
                        goto __pyx_L11;
                      }

                      /* "pyarrow/io.pxi":2799
 *     if isinstance(source, NativeFile):
 *         stream = source
 *     elif source_path is not None:             # <<<<<<<<<<<<<<
 *         stream = OSFile(source_path, 'r')
 *     elif isinstance(source, (Buffer, memoryview)):
*/
                      __pyx_t_9 = (__pyx_v_source_path != Py_None);
                      if (__pyx_t_9) {

                        /* "pyarrow/io.pxi":2800
 *         stream = source
 *     elif source_path is not None:
 *         stream = OSFile(source_path, 'r')             # <<<<<<<<<<<<<<
 *     elif isinstance(source, (Buffer, memoryview)):
 *         stream = BufferReader(as_buffer(source))
*/
                        __pyx_t_6 = NULL;
                        __pyx_t_7 = 1;
                        {
                          PyObject *__pyx_callargs[3] = {__pyx_t_6, __pyx_v_source_path, __pyx_mstate_global->__pyx_n_u_r};
                          __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_OSFile, __pyx_callargs+__pyx_t_7, (3-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
                          if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 2800, __pyx_L1_error)
                          __Pyx_GOTREF((PyObject *)__pyx_t_4);
                        }
                        __pyx_v_stream = ((struct __pyx_obj_7pyarrow_3lib_NativeFile *)__pyx_t_4);
                        __pyx_t_4 = 0;

                        /* "pyarrow/io.pxi":2799
 *     if isinstance(source, NativeFile):
 *         stream = source
 *     elif source_path is not None:             # <<<<<<<<<<<<<<
 *         stream = OSFile(source_path, 'r')
 *     elif isinstance(source, (Buffer, memoryview)):
*/
                        goto __pyx_L11;
                      }

                      /* "pyarrow/io.pxi":2801
 *     elif source_path is not None:
 *         stream = OSFile(source_path, 'r')
 *     elif isinstance(source, (Buffer, memoryview)):             # <<<<<<<<<<<<<<
 *         stream = BufferReader(as_buffer(source))
 *     elif (hasattr(source, 'read') and
*/
                      __pyx_t_10 = __Pyx_TypeCheck(__pyx_v_source, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Buffer); 
                      if (!__pyx_t_10) {
                      } else {
                        __pyx_t_9 = __pyx_t_10;
                        goto __pyx_L12_bool_binop_done;
                      }
                      __pyx_t_10 = PyMemoryView_Check(__pyx_v_source); 
                      __pyx_t_9 = __pyx_t_10;
                      __pyx_L12_bool_binop_done:;
                      if (__pyx_t_9) {

                        /* "pyarrow/io.pxi":2802
 *         stream = OSFile(source_path, 'r')
 *     elif isinstance(source, (Buffer, memoryview)):
 *         stream = BufferReader(as_buffer(source))             # <<<<<<<<<<<<<<
 *     elif (hasattr(source, 'read') and
 *           hasattr(source, 'close') and
*/
                        __pyx_t_6 = NULL;
                        __pyx_t_11 = NULL;
                        __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_as_buffer); if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 2802, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_12);
                        __pyx_t_7 = 1;
                        #if CYTHON_UNPACK_METHODS
                        if (unlikely(PyMethod_Check(__pyx_t_12))) {
                          __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_12);
                          assert(__pyx_t_11);
                          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_12);
                          __Pyx_INCREF(__pyx_t_11);
                          __Pyx_INCREF(__pyx__function);
                          __Pyx_DECREF_SET(__pyx_t_12, __pyx__function);
                          __pyx_t_7 = 0;
                        }
                        #endif
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_v_source};
                          __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_12, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
                          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                          if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 2802, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_5);
                        }
                        __pyx_t_7 = 1;
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_5};
                          __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_BufferReader, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
                          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                          if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 2802, __pyx_L1_error)
                          __Pyx_GOTREF((PyObject *)__pyx_t_4);
                        }
                        __pyx_v_stream = ((struct __pyx_obj_7pyarrow_3lib_NativeFile *)__pyx_t_4);
                        __pyx_t_4 = 0;

                        /* "pyarrow/io.pxi":2801
 *     elif source_path is not None:
 *         stream = OSFile(source_path, 'r')
 *     elif isinstance(source, (Buffer, memoryview)):             # <<<<<<<<<<<<<<
 *         stream = BufferReader(as_buffer(source))
 *     elif (hasattr(source, 'read') and
*/
                        goto __pyx_L11;
                      }

                      /* "pyarrow/io.pxi":2803
 *     elif isinstance(source, (Buffer, memoryview)):
 *         stream = BufferReader(as_buffer(source))
 *     elif (hasattr(source, 'read') and             # <<<<<<<<<<<<<<
 *           hasattr(source, 'close') and
 *           hasattr(source, 'closed')):
*/
                      __pyx_t_10 = __Pyx_HasAttr(__pyx_v_source, __pyx_mstate_global->__pyx_n_u_read); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(6, 2803, __pyx_L1_error)
                      if (__pyx_t_10) {
                      } else {
                        __pyx_t_9 = __pyx_t_10;
                        goto __pyx_L14_bool_binop_done;
                      }

                      /* "pyarrow/io.pxi":2804
 *         stream = BufferReader(as_buffer(source))
 *     elif (hasattr(source, 'read') and
 *           hasattr(source, 'close') and             # <<<<<<<<<<<<<<
 *           hasattr(source, 'closed')):
 *         stream = PythonFile(source, 'r')
*/
                      __pyx_t_10 = __Pyx_HasAttr(__pyx_v_source, __pyx_mstate_global->__pyx_n_u_close); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(6, 2804, __pyx_L1_error)
                      if (__pyx_t_10) {
                      } else {
                        __pyx_t_9 = __pyx_t_10;
                        goto __pyx_L14_bool_binop_done;
                      }

                      /* "pyarrow/io.pxi":2805
 *     elif (hasattr(source, 'read') and
 *           hasattr(source, 'close') and
 *           hasattr(source, 'closed')):             # <<<<<<<<<<<<<<
 *         stream = PythonFile(source, 'r')
 *     else:
*/
                      __pyx_t_10 = __Pyx_HasAttr(__pyx_v_source, __pyx_mstate_global->__pyx_n_u_closed_2); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(6, 2805, __pyx_L1_error)
                      __pyx_t_9 = __pyx_t_10;
                      __pyx_L14_bool_binop_done:;

                      /* "pyarrow/io.pxi":2803
 *     elif isinstance(source, (Buffer, memoryview)):
 *         stream = BufferReader(as_buffer(source))
 *     elif (hasattr(source, 'read') and             # <<<<<<<<<<<<<<
 *           hasattr(source, 'close') and
 *           hasattr(source, 'closed')):
*/
                      if (likely(__pyx_t_9)) {

                        /* "pyarrow/io.pxi":2806
 *           hasattr(source, 'close') and
 *           hasattr(source, 'closed')):
 *         stream = PythonFile(source, 'r')             # <<<<<<<<<<<<<<
 *     else:
 *         raise TypeError(
*/
                        __pyx_t_5 = NULL;
                        __pyx_t_7 = 1;
                        {
                          PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_v_source, __pyx_mstate_global->__pyx_n_u_r};
                          __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_PythonFile, __pyx_callargs+__pyx_t_7, (3-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
                          if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 2806, __pyx_L1_error)
                          __Pyx_GOTREF((PyObject *)__pyx_t_4);
                        }
                        __pyx_v_stream = ((struct __pyx_obj_7pyarrow_3lib_NativeFile *)__pyx_t_4);
                        __pyx_t_4 = 0;

                        /* "pyarrow/io.pxi":2803
 *     elif isinstance(source, (Buffer, memoryview)):
 *         stream = BufferReader(as_buffer(source))
 *     elif (hasattr(source, 'read') and             # <<<<<<<<<<<<<<
 *           hasattr(source, 'close') and
 *           hasattr(source, 'closed')):
*/
                        goto __pyx_L11;
                      }

                      /* "pyarrow/io.pxi":2808
 *         stream = PythonFile(source, 'r')
 *     else:
 *         raise TypeError(             # <<<<<<<<<<<<<<
 *             f"pa.input_stream() called with instance of '{source.__class__}'")
 * 
*/
                      /*else*/ {
                        __pyx_t_5 = NULL;

                        /* "pyarrow/io.pxi":2809
 *     else:
 *         raise TypeError(
 *             f"pa.input_stream() called with instance of '{source.__class__}'")             # <<<<<<<<<<<<<<
 * 
 *     if compression == 'detect':
*/
                        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_source, __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 2809, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_6);
                        __pyx_t_12 = __Pyx_PyObject_FormatSimple(__pyx_t_6, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 2809, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_12);
                        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                        __pyx_t_13[0] = __pyx_mstate_global->__pyx_kp_u_pa_input_stream_called_with_inst;
                        __pyx_t_13[1] = __pyx_t_12;
                        __pyx_t_13[2] = __pyx_mstate_global->__pyx_kp_u__8;
                        __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_13, 3, 43 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_12) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12));
                        if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 2809, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_6);
                        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                        __pyx_t_7 = 1;
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_6};
                          __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
                          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                          if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 2808, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_4);
                        }
                        __Pyx_Raise(__pyx_t_4, 0, 0, 0);
                        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                        __PYX_ERR(6, 2808, __pyx_L1_error)
                      }
                      __pyx_L11:;

                      /* "pyarrow/io.pxi":2811
 *             f"pa.input_stream() called with instance of '{source.__class__}'")
 * 
 *     if compression == 'detect':             # <<<<<<<<<<<<<<
 *         # detect for OSFile too
 *         compression = _detect_compression(source_path)
*/
                      __pyx_t_9 = (__Pyx_PyUnicode_Equals(__pyx_v_compression, __pyx_mstate_global->__pyx_n_u_detect, Py_EQ)); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(6, 2811, __pyx_L1_error)
                      if (__pyx_t_9) {

                        /* "pyarrow/io.pxi":2813
 *     if compression == 'detect':
 *         # detect for OSFile too
 *         compression = _detect_compression(source_path)             # <<<<<<<<<<<<<<
 * 
 *     if buffer_size is not None and buffer_size != 0:
*/
                        __pyx_t_6 = NULL;
                        __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_detect_compression); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 2813, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_5);
                        __pyx_t_7 = 1;
                        #if CYTHON_UNPACK_METHODS
                        if (unlikely(PyMethod_Check(__pyx_t_5))) {
                          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
                          assert(__pyx_t_6);
                          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
                          __Pyx_INCREF(__pyx_t_6);
                          __Pyx_INCREF(__pyx__function);
                          __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
                          __pyx_t_7 = 0;
                        }
                        #endif
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_source_path};
                          __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
                          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                          if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 2813, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_4);
                        }
                        __Pyx_DECREF_SET(__pyx_v_compression, __pyx_t_4);
                        __pyx_t_4 = 0;

                        /* "pyarrow/io.pxi":2811
 *             f"pa.input_stream() called with instance of '{source.__class__}'")
 * 
 *     if compression == 'detect':             # <<<<<<<<<<<<<<
 *         # detect for OSFile too
 *         compression = _detect_compression(source_path)
*/
                      }

                      /* "pyarrow/io.pxi":2815
 *         compression = _detect_compression(source_path)
 * 
 *     if buffer_size is not None and buffer_size != 0:             # <<<<<<<<<<<<<<
 *         stream = BufferedInputStream(stream, buffer_size)
 * 
*/
                      __pyx_t_10 = (__pyx_v_buffer_size != Py_None);
                      if (__pyx_t_10) {
                      } else {
                        __pyx_t_9 = __pyx_t_10;
                        goto __pyx_L19_bool_binop_done;
                      }
                      __pyx_t_10 = (__Pyx_PyLong_BoolNeObjC(__pyx_v_buffer_size, __pyx_mstate_global->__pyx_int_0, 0, 0)); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(6, 2815, __pyx_L1_error)
                      __pyx_t_9 = __pyx_t_10;
                      __pyx_L19_bool_binop_done:;
                      if (__pyx_t_9) {

                        /* "pyarrow/io.pxi":2816
 * 
 *     if buffer_size is not None and buffer_size != 0:
 *         stream = BufferedInputStream(stream, buffer_size)             # <<<<<<<<<<<<<<
 * 
 *     if compression is not None:
*/
                        __pyx_t_5 = NULL;
                        __pyx_t_7 = 1;
                        {
                          PyObject *__pyx_callargs[3] = {__pyx_t_5, ((PyObject *)__pyx_v_stream), __pyx_v_buffer_size};
                          __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_BufferedInputStream, __pyx_callargs+__pyx_t_7, (3-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
                          if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 2816, __pyx_L1_error)
                          __Pyx_GOTREF((PyObject *)__pyx_t_4);
                        }
                        __Pyx_DECREF_SET(__pyx_v_stream, ((struct __pyx_obj_7pyarrow_3lib_NativeFile *)__pyx_t_4));
                        __pyx_t_4 = 0;

                        /* "pyarrow/io.pxi":2815
 *         compression = _detect_compression(source_path)
 * 
 *     if buffer_size is not None and buffer_size != 0:             # <<<<<<<<<<<<<<
 *         stream = BufferedInputStream(stream, buffer_size)
 * 
*/
                      }

                      /* "pyarrow/io.pxi":2818
 *         stream = BufferedInputStream(stream, buffer_size)
 * 
 *     if compression is not None:             # <<<<<<<<<<<<<<
 *         stream = CompressedInputStream(stream, compression)
 * 
*/
                      __pyx_t_9 = (__pyx_v_compression != Py_None);
                      if (__pyx_t_9) {

                        /* "pyarrow/io.pxi":2819
 * 
 *     if compression is not None:
 *         stream = CompressedInputStream(stream, compression)             # <<<<<<<<<<<<<<
 * 
 *     return stream
*/
                        __pyx_t_5 = NULL;
                        __pyx_t_7 = 1;
                        {
                          PyObject *__pyx_callargs[3] = {__pyx_t_5, ((PyObject *)__pyx_v_stream), __pyx_v_compression};
                          __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_CompressedInputStream, __pyx_callargs+__pyx_t_7, (3-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
                          if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 2819, __pyx_L1_error)
                          __Pyx_GOTREF((PyObject *)__pyx_t_4);
                        }
                        __Pyx_DECREF_SET(__pyx_v_stream, ((struct __pyx_obj_7pyarrow_3lib_NativeFile *)__pyx_t_4));
                        __pyx_t_4 = 0;

                        /* "pyarrow/io.pxi":2818
 *         stream = BufferedInputStream(stream, buffer_size)
 * 
 *     if compression is not None:             # <<<<<<<<<<<<<<
 *         stream = CompressedInputStream(stream, compression)
 * 
*/
                      }

                      /* "pyarrow/io.pxi":2821
 *         stream = CompressedInputStream(stream, compression)
 * 
 *     return stream             # <<<<<<<<<<<<<<
 * 
 * 
*/
                      __Pyx_XDECREF(__pyx_r);
                      __Pyx_INCREF((PyObject *)__pyx_v_stream);
                      __pyx_r = ((PyObject *)__pyx_v_stream);
                      goto __pyx_L0;

                      /* "pyarrow/io.pxi":2738
 * 
 * 
 * def input_stream(source, compression='detect', buffer_size=None):             # <<<<<<<<<<<<<<
 *     """
 *     Create an Arrow input stream.
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_4);
                      __Pyx_XDECREF(__pyx_t_5);
                      __Pyx_XDECREF(__pyx_t_6);
                      __Pyx_XDECREF(__pyx_t_11);
                      __Pyx_XDECREF(__pyx_t_12);
                      __Pyx_AddTraceback("pyarrow.lib.input_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XDECREF((PyObject *)__pyx_v_stream);
                      __Pyx_XDECREF(__pyx_v_source_path);
                      __Pyx_XDECREF(__pyx_v_compression);
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/io.pxi":2824
 * 
 * 
 * def output_stream(source, compression='detect', buffer_size=None):             # <<<<<<<<<<<<<<
 *     """
 *     Create an Arrow output stream.
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_263output_stream(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_262output_stream, "output_stream(source, compression='detect', buffer_size=None)\n\nCreate an Arrow output stream.\n\nParameters\n----------\nsource : str, Path, buffer, file-like object\n    The source to open for writing.\ncompression : str optional, default 'detect'\n    The compression algorithm to use for on-the-fly compression.\n    If \"detect\" and source is a file path, then compression will be\n    chosen based on the file extension.\n    If None, no compression will be applied.\n    Otherwise, a well-known algorithm name must be supplied (e.g. \"gzip\").\nbuffer_size : int, default None\n    If None or 0, no buffering will happen. Otherwise the size of the\n    temporary write buffer.\n\nExamples\n--------\nCreate a writable NativeFile from a pyarrow Buffer:\n\n>>> import pyarrow as pa\n>>> data = b\"buffer data\"\n>>> empty_obj = bytearray(11)\n>>> buf = pa.py_buffer(empty_obj)\n>>> with pa.output_stream(buf) as stream:\n...     stream.write(data)\n...\n11\n>>> with pa.input_stream(buf) as stream:\n...     stream.read(6)\n...\nb'buffer'\n\nor from a memoryview object:\n\n>>> buf = memoryview(empty_obj)\n>>> with pa.output_stream(buf) as stream:\n...     stream.write(data)\n...\n11\n>>> with pa.input_stream(buf) as stream:\n...     stream.read()\n...\nb'buffer data'\n\nCreate a writable NativeFile from a string or file path:\n\n>>> with pa.output_stream('example_second.txt') as stream:\n...     stream.write(b'Write some data')\n...\n15\n>>> with pa.input_stream('example_second.txt') as stream:\n...     stream.read()\n...\nb'Write some data'");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_263output_stream = {"output_stream", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_263output_stream, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_262output_stream};
                    static PyObject *__pyx_pw_7pyarrow_3lib_263output_stream(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      PyObject *__pyx_v_source = 0;
                      PyObject *__pyx_v_compression = 0;
                      PyObject *__pyx_v_buffer_size = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[3] = {0,0,0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("output_stream (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_source,&__pyx_mstate_global->__pyx_n_u_compression,&__pyx_mstate_global->__pyx_n_u_buffer_size,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(6, 2824, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  3:
                            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(6, 2824, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  2:
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(6, 2824, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 2824, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "output_stream", 0) < (0)) __PYX_ERR(6, 2824, __pyx_L3_error)
                          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_n_u_detect)));
                          if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("output_stream", 0, 1, 3, i); __PYX_ERR(6, 2824, __pyx_L3_error) }
                          }
                        } else {
                          switch (__pyx_nargs) {
                            case  3:
                            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(6, 2824, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  2:
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(6, 2824, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 2824, __pyx_L3_error)
                            break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_n_u_detect)));
                          if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
                        }
                        __pyx_v_source = values[0];
                        __pyx_v_compression = values[1];
                        __pyx_v_buffer_size = values[2];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("output_stream", 0, 1, 3, __pyx_nargs); __PYX_ERR(6, 2824, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.output_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_262output_stream(__pyx_self, __pyx_v_source, __pyx_v_compression, __pyx_v_buffer_size);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_262output_stream(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_source, PyObject *__pyx_v_compression, PyObject *__pyx_v_buffer_size) {
                      struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_stream = 0;
                      PyObject *__pyx_v_source_path = NULL;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      PyObject *__pyx_t_3 = NULL;
                      PyObject *__pyx_t_4 = NULL;
                      PyObject *__pyx_t_5 = NULL;
                      PyObject *__pyx_t_6 = NULL;
                      size_t __pyx_t_7;
                      int __pyx_t_8;
                      int __pyx_t_9;
                      int __pyx_t_10;
                      PyObject *__pyx_t_11 = NULL;
                      PyObject *__pyx_t_12 = NULL;
                      PyObject *__pyx_t_13[3];
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("output_stream", 0);
                      __Pyx_INCREF(__pyx_v_compression);

                      /* "pyarrow/io.pxi":2884
 *     cdef NativeFile stream
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         source_path = _stringify_path(source)
 *     except TypeError:
*/
                      {
                        __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:*/ {

                          /* "pyarrow/io.pxi":2885
 * 
 *     try:
 *         source_path = _stringify_path(source)             # <<<<<<<<<<<<<<
 *     except TypeError:
 *         source_path = None
*/
                          __pyx_t_5 = NULL;
                          __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_stringify_path); if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 2885, __pyx_L3_error)
                          __Pyx_GOTREF(__pyx_t_6);
                          __pyx_t_7 = 1;
                          #if CYTHON_UNPACK_METHODS
                          if (unlikely(PyMethod_Check(__pyx_t_6))) {
                            __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
                            assert(__pyx_t_5);
                            PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
                            __Pyx_INCREF(__pyx_t_5);
                            __Pyx_INCREF(__pyx__function);
                            __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
                            __pyx_t_7 = 0;
                          }
                          #endif
                          {
                            PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_source};
                            __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                            __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
                            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                            if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 2885, __pyx_L3_error)
                            __Pyx_GOTREF(__pyx_t_4);
                          }
                          __pyx_v_source_path = __pyx_t_4;
                          __pyx_t_4 = 0;

                          /* "pyarrow/io.pxi":2884
 *     cdef NativeFile stream
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         source_path = _stringify_path(source)
 *     except TypeError:
*/
                        }
                        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                        goto __pyx_L8_try_end;
                        __pyx_L3_error:;
                        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
                        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;

                        /* "pyarrow/io.pxi":2886
 *     try:
 *         source_path = _stringify_path(source)
 *     except TypeError:             # <<<<<<<<<<<<<<
 *         source_path = None
 * 
*/
                        __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_TypeError))));
                        if (__pyx_t_8) {
                          __Pyx_ErrRestore(0,0,0);

                          /* "pyarrow/io.pxi":2887
 *         source_path = _stringify_path(source)
 *     except TypeError:
 *         source_path = None             # <<<<<<<<<<<<<<
 * 
 *     if isinstance(source, NativeFile):
*/
                          __Pyx_INCREF(Py_None);
                          __Pyx_XDECREF_SET(__pyx_v_source_path, Py_None);
                          goto __pyx_L4_exception_handled;
                        }
                        goto __pyx_L5_except_error;

                        /* "pyarrow/io.pxi":2884
 *     cdef NativeFile stream
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         source_path = _stringify_path(source)
 *     except TypeError:
*/
                        __pyx_L5_except_error:;
                        __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:;
                      }

                      /* "pyarrow/io.pxi":2889
 *         source_path = None
 * 
 *     if isinstance(source, NativeFile):             # <<<<<<<<<<<<<<
 *         stream = source
 *     elif source_path is not None:
*/
                      __pyx_t_9 = __Pyx_TypeCheck(__pyx_v_source, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NativeFile); 
                      if (__pyx_t_9) {

                        /* "pyarrow/io.pxi":2890
 * 
 *     if isinstance(source, NativeFile):
 *         stream = source             # <<<<<<<<<<<<<<
 *     elif source_path is not None:
 *         stream = OSFile(source_path, 'w')
*/
                        __pyx_t_4 = __pyx_v_source;
                        __Pyx_INCREF(__pyx_t_4);
                        if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NativeFile))))) __PYX_ERR(6, 2890, __pyx_L1_error)
                        __pyx_v_stream = ((struct __pyx_obj_7pyarrow_3lib_NativeFile *)__pyx_t_4);
                        __pyx_t_4 = 0;

                        /* "pyarrow/io.pxi":2889
 *         source_path = None
 * 
 *     if isinstance(source, NativeFile):             # <<<<<<<<<<<<<<
 *         stream = source
 *     elif source_path is not None:
*/
                        goto __pyx_L11;
                      }

                      /* "pyarrow/io.pxi":2891
 *     if isinstance(source, NativeFile):
 *         stream = source
 *     elif source_path is not None:             # <<<<<<<<<<<<<<
 *         stream = OSFile(source_path, 'w')
 *     elif isinstance(source, (Buffer, memoryview)):
*/
                      __pyx_t_9 = (__pyx_v_source_path != Py_None);
                      if (__pyx_t_9) {

                        /* "pyarrow/io.pxi":2892
 *         stream = source
 *     elif source_path is not None:
 *         stream = OSFile(source_path, 'w')             # <<<<<<<<<<<<<<
 *     elif isinstance(source, (Buffer, memoryview)):
 *         stream = FixedSizeBufferWriter(as_buffer(source))
*/
                        __pyx_t_6 = NULL;
                        __pyx_t_7 = 1;
                        {
                          PyObject *__pyx_callargs[3] = {__pyx_t_6, __pyx_v_source_path, __pyx_mstate_global->__pyx_n_u_w};
                          __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_OSFile, __pyx_callargs+__pyx_t_7, (3-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
                          if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 2892, __pyx_L1_error)
                          __Pyx_GOTREF((PyObject *)__pyx_t_4);
                        }
                        __pyx_v_stream = ((struct __pyx_obj_7pyarrow_3lib_NativeFile *)__pyx_t_4);
                        __pyx_t_4 = 0;

                        /* "pyarrow/io.pxi":2891
 *     if isinstance(source, NativeFile):
 *         stream = source
 *     elif source_path is not None:             # <<<<<<<<<<<<<<
 *         stream = OSFile(source_path, 'w')
 *     elif isinstance(source, (Buffer, memoryview)):
*/
                        goto __pyx_L11;
                      }

                      /* "pyarrow/io.pxi":2893
 *     elif source_path is not None:
 *         stream = OSFile(source_path, 'w')
 *     elif isinstance(source, (Buffer, memoryview)):             # <<<<<<<<<<<<<<
 *         stream = FixedSizeBufferWriter(as_buffer(source))
 *     elif (hasattr(source, 'write') and
*/
                      __pyx_t_10 = __Pyx_TypeCheck(__pyx_v_source, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Buffer); 
                      if (!__pyx_t_10) {
                      } else {
                        __pyx_t_9 = __pyx_t_10;
                        goto __pyx_L12_bool_binop_done;
                      }
                      __pyx_t_10 = PyMemoryView_Check(__pyx_v_source); 
                      __pyx_t_9 = __pyx_t_10;
                      __pyx_L12_bool_binop_done:;
                      if (__pyx_t_9) {

                        /* "pyarrow/io.pxi":2894
 *         stream = OSFile(source_path, 'w')
 *     elif isinstance(source, (Buffer, memoryview)):
 *         stream = FixedSizeBufferWriter(as_buffer(source))             # <<<<<<<<<<<<<<
 *     elif (hasattr(source, 'write') and
 *           hasattr(source, 'close') and
*/
                        __pyx_t_6 = NULL;
                        __pyx_t_11 = NULL;
                        __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_as_buffer); if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 2894, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_12);
                        __pyx_t_7 = 1;
                        #if CYTHON_UNPACK_METHODS
                        if (unlikely(PyMethod_Check(__pyx_t_12))) {
                          __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_12);
                          assert(__pyx_t_11);
                          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_12);
                          __Pyx_INCREF(__pyx_t_11);
                          __Pyx_INCREF(__pyx__function);
                          __Pyx_DECREF_SET(__pyx_t_12, __pyx__function);
                          __pyx_t_7 = 0;
                        }
                        #endif
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_v_source};
                          __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_12, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
                          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                          if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 2894, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_5);
                        }
                        __pyx_t_7 = 1;
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_5};
                          __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_FixedSizeBufferWriter, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
                          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                          if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 2894, __pyx_L1_error)
                          __Pyx_GOTREF((PyObject *)__pyx_t_4);
                        }
                        __pyx_v_stream = ((struct __pyx_obj_7pyarrow_3lib_NativeFile *)__pyx_t_4);
                        __pyx_t_4 = 0;

                        /* "pyarrow/io.pxi":2893
 *     elif source_path is not None:
 *         stream = OSFile(source_path, 'w')
 *     elif isinstance(source, (Buffer, memoryview)):             # <<<<<<<<<<<<<<
 *         stream = FixedSizeBufferWriter(as_buffer(source))
 *     elif (hasattr(source, 'write') and
*/
                        goto __pyx_L11;
                      }

                      /* "pyarrow/io.pxi":2895
 *     elif isinstance(source, (Buffer, memoryview)):
 *         stream = FixedSizeBufferWriter(as_buffer(source))
 *     elif (hasattr(source, 'write') and             # <<<<<<<<<<<<<<
 *           hasattr(source, 'close') and
 *           hasattr(source, 'closed')):
*/
                      __pyx_t_10 = __Pyx_HasAttr(__pyx_v_source, __pyx_mstate_global->__pyx_n_u_write); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(6, 2895, __pyx_L1_error)
                      if (__pyx_t_10) {
                      } else {
                        __pyx_t_9 = __pyx_t_10;
                        goto __pyx_L14_bool_binop_done;
                      }

                      /* "pyarrow/io.pxi":2896
 *         stream = FixedSizeBufferWriter(as_buffer(source))
 *     elif (hasattr(source, 'write') and
 *           hasattr(source, 'close') and             # <<<<<<<<<<<<<<
 *           hasattr(source, 'closed')):
 *         stream = PythonFile(source, 'w')
*/
                      __pyx_t_10 = __Pyx_HasAttr(__pyx_v_source, __pyx_mstate_global->__pyx_n_u_close); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(6, 2896, __pyx_L1_error)
                      if (__pyx_t_10) {
                      } else {
                        __pyx_t_9 = __pyx_t_10;
                        goto __pyx_L14_bool_binop_done;
                      }

                      /* "pyarrow/io.pxi":2897
 *     elif (hasattr(source, 'write') and
 *           hasattr(source, 'close') and
 *           hasattr(source, 'closed')):             # <<<<<<<<<<<<<<
 *         stream = PythonFile(source, 'w')
 *     else:
*/
                      __pyx_t_10 = __Pyx_HasAttr(__pyx_v_source, __pyx_mstate_global->__pyx_n_u_closed_2); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(6, 2897, __pyx_L1_error)
                      __pyx_t_9 = __pyx_t_10;
                      __pyx_L14_bool_binop_done:;

                      /* "pyarrow/io.pxi":2895
 *     elif isinstance(source, (Buffer, memoryview)):
 *         stream = FixedSizeBufferWriter(as_buffer(source))
 *     elif (hasattr(source, 'write') and             # <<<<<<<<<<<<<<
 *           hasattr(source, 'close') and
 *           hasattr(source, 'closed')):
*/
                      if (likely(__pyx_t_9)) {

                        /* "pyarrow/io.pxi":2898
 *           hasattr(source, 'close') and
 *           hasattr(source, 'closed')):
 *         stream = PythonFile(source, 'w')             # <<<<<<<<<<<<<<
 *     else:
 *         raise TypeError(
*/
                        __pyx_t_5 = NULL;
                        __pyx_t_7 = 1;
                        {
                          PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_v_source, __pyx_mstate_global->__pyx_n_u_w};
                          __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_PythonFile, __pyx_callargs+__pyx_t_7, (3-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
                          if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 2898, __pyx_L1_error)
                          __Pyx_GOTREF((PyObject *)__pyx_t_4);
                        }
                        __pyx_v_stream = ((struct __pyx_obj_7pyarrow_3lib_NativeFile *)__pyx_t_4);
                        __pyx_t_4 = 0;

                        /* "pyarrow/io.pxi":2895
 *     elif isinstance(source, (Buffer, memoryview)):
 *         stream = FixedSizeBufferWriter(as_buffer(source))
 *     elif (hasattr(source, 'write') and             # <<<<<<<<<<<<<<
 *           hasattr(source, 'close') and
 *           hasattr(source, 'closed')):
*/
                        goto __pyx_L11;
                      }

                      /* "pyarrow/io.pxi":2900
 *         stream = PythonFile(source, 'w')
 *     else:
 *         raise TypeError(             # <<<<<<<<<<<<<<
 *             f"pa.output_stream() called with instance of '{source.__class__}'")
 * 
*/
                      /*else*/ {
                        __pyx_t_5 = NULL;

                        /* "pyarrow/io.pxi":2901
 *     else:
 *         raise TypeError(
 *             f"pa.output_stream() called with instance of '{source.__class__}'")             # <<<<<<<<<<<<<<
 * 
 *     if compression == 'detect':
*/
                        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_source, __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 2901, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_6);
                        __pyx_t_12 = __Pyx_PyObject_FormatSimple(__pyx_t_6, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 2901, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_12);
                        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                        __pyx_t_13[0] = __pyx_mstate_global->__pyx_kp_u_pa_output_stream_called_with_ins;
                        __pyx_t_13[1] = __pyx_t_12;
                        __pyx_t_13[2] = __pyx_mstate_global->__pyx_kp_u__8;
                        __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_13, 3, 44 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_12) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12));
                        if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 2901, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_6);
                        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                        __pyx_t_7 = 1;
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_6};
                          __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
                          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                          if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 2900, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_4);
                        }
                        __Pyx_Raise(__pyx_t_4, 0, 0, 0);
                        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                        __PYX_ERR(6, 2900, __pyx_L1_error)
                      }
                      __pyx_L11:;

                      /* "pyarrow/io.pxi":2903
 *             f"pa.output_stream() called with instance of '{source.__class__}'")
 * 
 *     if compression == 'detect':             # <<<<<<<<<<<<<<
 *         compression = _detect_compression(source_path)
 * 
*/
                      __pyx_t_9 = (__Pyx_PyUnicode_Equals(__pyx_v_compression, __pyx_mstate_global->__pyx_n_u_detect, Py_EQ)); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(6, 2903, __pyx_L1_error)
                      if (__pyx_t_9) {

                        /* "pyarrow/io.pxi":2904
 * 
 *     if compression == 'detect':
 *         compression = _detect_compression(source_path)             # <<<<<<<<<<<<<<
 * 
 *     if buffer_size is not None and buffer_size != 0:
*/
                        __pyx_t_6 = NULL;
                        __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_detect_compression); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 2904, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_5);
                        __pyx_t_7 = 1;
                        #if CYTHON_UNPACK_METHODS
                        if (unlikely(PyMethod_Check(__pyx_t_5))) {
                          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
                          assert(__pyx_t_6);
                          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
                          __Pyx_INCREF(__pyx_t_6);
                          __Pyx_INCREF(__pyx__function);
                          __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
                          __pyx_t_7 = 0;
                        }
                        #endif
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_source_path};
                          __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
                          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                          if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 2904, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_4);
                        }
                        __Pyx_DECREF_SET(__pyx_v_compression, __pyx_t_4);
                        __pyx_t_4 = 0;

                        /* "pyarrow/io.pxi":2903
 *             f"pa.output_stream() called with instance of '{source.__class__}'")
 * 
 *     if compression == 'detect':             # <<<<<<<<<<<<<<
 *         compression = _detect_compression(source_path)
 * 
*/
                      }

                      /* "pyarrow/io.pxi":2906
 *         compression = _detect_compression(source_path)
 * 
 *     if buffer_size is not None and buffer_size != 0:             # <<<<<<<<<<<<<<
 *         stream = BufferedOutputStream(stream, buffer_size)
 * 
*/
                      __pyx_t_10 = (__pyx_v_buffer_size != Py_None);
                      if (__pyx_t_10) {
                      } else {
                        __pyx_t_9 = __pyx_t_10;
                        goto __pyx_L19_bool_binop_done;
                      }
                      __pyx_t_10 = (__Pyx_PyLong_BoolNeObjC(__pyx_v_buffer_size, __pyx_mstate_global->__pyx_int_0, 0, 0)); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(6, 2906, __pyx_L1_error)
                      __pyx_t_9 = __pyx_t_10;
                      __pyx_L19_bool_binop_done:;
                      if (__pyx_t_9) {

                        /* "pyarrow/io.pxi":2907
 * 
 *     if buffer_size is not None and buffer_size != 0:
 *         stream = BufferedOutputStream(stream, buffer_size)             # <<<<<<<<<<<<<<
 * 
 *     if compression is not None:
*/
                        __pyx_t_5 = NULL;
                        __pyx_t_7 = 1;
                        {
                          PyObject *__pyx_callargs[3] = {__pyx_t_5, ((PyObject *)__pyx_v_stream), __pyx_v_buffer_size};
                          __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_BufferedOutputStream, __pyx_callargs+__pyx_t_7, (3-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
                          if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 2907, __pyx_L1_error)
                          __Pyx_GOTREF((PyObject *)__pyx_t_4);
                        }
                        __Pyx_DECREF_SET(__pyx_v_stream, ((struct __pyx_obj_7pyarrow_3lib_NativeFile *)__pyx_t_4));
                        __pyx_t_4 = 0;

                        /* "pyarrow/io.pxi":2906
 *         compression = _detect_compression(source_path)
 * 
 *     if buffer_size is not None and buffer_size != 0:             # <<<<<<<<<<<<<<
 *         stream = BufferedOutputStream(stream, buffer_size)
 * 
*/
                      }

                      /* "pyarrow/io.pxi":2909
 *         stream = BufferedOutputStream(stream, buffer_size)
 * 
 *     if compression is not None:             # <<<<<<<<<<<<<<
 *         stream = CompressedOutputStream(stream, compression)
 * 
*/
                      __pyx_t_9 = (__pyx_v_compression != Py_None);
                      if (__pyx_t_9) {

                        /* "pyarrow/io.pxi":2910
 * 
 *     if compression is not None:
 *         stream = CompressedOutputStream(stream, compression)             # <<<<<<<<<<<<<<
 * 
 *     return stream
*/
                        __pyx_t_5 = NULL;
                        __pyx_t_7 = 1;
                        {
                          PyObject *__pyx_callargs[3] = {__pyx_t_5, ((PyObject *)__pyx_v_stream), __pyx_v_compression};
                          __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_CompressedOutputStream, __pyx_callargs+__pyx_t_7, (3-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
                          if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 2910, __pyx_L1_error)
                          __Pyx_GOTREF((PyObject *)__pyx_t_4);
                        }
                        __Pyx_DECREF_SET(__pyx_v_stream, ((struct __pyx_obj_7pyarrow_3lib_NativeFile *)__pyx_t_4));
                        __pyx_t_4 = 0;

                        /* "pyarrow/io.pxi":2909
 *         stream = BufferedOutputStream(stream, buffer_size)
 * 
 *     if compression is not None:             # <<<<<<<<<<<<<<
 *         stream = CompressedOutputStream(stream, compression)
 * 
*/
                      }

                      /* "pyarrow/io.pxi":2912
 *         stream = CompressedOutputStream(stream, compression)
 * 
 *     return stream             # <<<<<<<<<<<<<<
*/
                      __Pyx_XDECREF(__pyx_r);
                      __Pyx_INCREF((PyObject *)__pyx_v_stream);
                      __pyx_r = ((PyObject *)__pyx_v_stream);
                      goto __pyx_L0;

                      /* "pyarrow/io.pxi":2824
 * 
 * 
 * def output_stream(source, compression='detect', buffer_size=None):             # <<<<<<<<<<<<<<
 *     """
 *     Create an Arrow output stream.
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_4);
                      __Pyx_XDECREF(__pyx_t_5);
                      __Pyx_XDECREF(__pyx_t_6);
                      __Pyx_XDECREF(__pyx_t_11);
                      __Pyx_XDECREF(__pyx_t_12);
                      __Pyx_AddTraceback("pyarrow.lib.output_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XDECREF((PyObject *)__pyx_v_stream);
                      __Pyx_XDECREF(__pyx_v_source_path);
                      __Pyx_XDECREF(__pyx_v_compression);
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/ipc.pxi":32
 * 
 * 
 * cdef object _wrap_metadata_version(CMetadataVersion version):             # <<<<<<<<<<<<<<
 *     return MetadataVersion(<char> version)
 * 
*/

                    static PyObject *__pyx_f_7pyarrow_3lib__wrap_metadata_version( arrow::ipc::MetadataVersion __pyx_v_version) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      PyObject *__pyx_t_3 = NULL;
                      PyObject *__pyx_t_4 = NULL;
                      size_t __pyx_t_5;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("_wrap_metadata_version", 0);

                      /* "pyarrow/ipc.pxi":33
 * 
 * cdef object _wrap_metadata_version(CMetadataVersion version):
 *     return MetadataVersion(<char> version)             # <<<<<<<<<<<<<<
 * 
 * 
*/
                      __Pyx_XDECREF(__pyx_r);
                      __pyx_t_2 = NULL;
                      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_MetadataVersion); if (unlikely(!__pyx_t_3)) __PYX_ERR(19, 33, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_3);
                      __pyx_t_4 = __Pyx_PyLong_From_char(((char)__pyx_v_version)); if (unlikely(!__pyx_t_4)) __PYX_ERR(19, 33, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_4);
                      __pyx_t_5 = 1;
                      #if CYTHON_UNPACK_METHODS
                      if (unlikely(PyMethod_Check(__pyx_t_3))) {
                        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
                        assert(__pyx_t_2);
                        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
                        __Pyx_INCREF(__pyx_t_2);
                        __Pyx_INCREF(__pyx__function);
                        __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
                        __pyx_t_5 = 0;
                      }
                      #endif
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4};
                        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 33, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __pyx_r = __pyx_t_1;
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/ipc.pxi":32
 * 
 * 
 * cdef object _wrap_metadata_version(CMetadataVersion version):             # <<<<<<<<<<<<<<
 *     return MetadataVersion(<char> version)
 * 
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_XDECREF(__pyx_t_4);
                      __Pyx_AddTraceback("pyarrow.lib._wrap_metadata_version", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = 0;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/ipc.pxi":36
 * 
 * 
 * cdef CMetadataVersion _unwrap_metadata_version(             # <<<<<<<<<<<<<<
 *         MetadataVersion version) except *:
 *     if version == MetadataVersion.V1:
*/

                    static  arrow::ipc::MetadataVersion __pyx_f_7pyarrow_3lib__unwrap_metadata_version(enum __pyx_t_7pyarrow_3lib_MetadataVersion __pyx_v_version) {
                       arrow::ipc::MetadataVersion __pyx_r;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      PyObject *__pyx_t_3 = NULL;
                      PyObject *__pyx_t_4 = NULL;
                      size_t __pyx_t_5;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("_unwrap_metadata_version", 0);

                      /* "pyarrow/ipc.pxi":38
 * cdef CMetadataVersion _unwrap_metadata_version(
 *         MetadataVersion version) except *:
 *     if version == MetadataVersion.V1:             # <<<<<<<<<<<<<<
 *         return CMetadataVersion_V1
 *     elif version == MetadataVersion.V2:
*/
                      switch (__pyx_v_version) {
                        case __pyx_e_7pyarrow_3lib_V1:

                        /* "pyarrow/ipc.pxi":39
 *         MetadataVersion version) except *:
 *     if version == MetadataVersion.V1:
 *         return CMetadataVersion_V1             # <<<<<<<<<<<<<<
 *     elif version == MetadataVersion.V2:
 *         return CMetadataVersion_V2
*/
                        __pyx_r =  arrow::ipc::MetadataVersion::V1;
                        goto __pyx_L0;

                        /* "pyarrow/ipc.pxi":38
 * cdef CMetadataVersion _unwrap_metadata_version(
 *         MetadataVersion version) except *:
 *     if version == MetadataVersion.V1:             # <<<<<<<<<<<<<<
 *         return CMetadataVersion_V1
 *     elif version == MetadataVersion.V2:
*/
                        break;
                        case __pyx_e_7pyarrow_3lib_V2:

                        /* "pyarrow/ipc.pxi":41
 *         return CMetadataVersion_V1
 *     elif version == MetadataVersion.V2:
 *         return CMetadataVersion_V2             # <<<<<<<<<<<<<<
 *     elif version == MetadataVersion.V3:
 *         return CMetadataVersion_V3
*/
                        __pyx_r =  arrow::ipc::MetadataVersion::V2;
                        goto __pyx_L0;

                        /* "pyarrow/ipc.pxi":40
 *     if version == MetadataVersion.V1:
 *         return CMetadataVersion_V1
 *     elif version == MetadataVersion.V2:             # <<<<<<<<<<<<<<
 *         return CMetadataVersion_V2
 *     elif version == MetadataVersion.V3:
*/
                        break;
                        case __pyx_e_7pyarrow_3lib_V3:

                        /* "pyarrow/ipc.pxi":43
 *         return CMetadataVersion_V2
 *     elif version == MetadataVersion.V3:
 *         return CMetadataVersion_V3             # <<<<<<<<<<<<<<
 *     elif version == MetadataVersion.V4:
 *         return CMetadataVersion_V4
*/
                        __pyx_r =  arrow::ipc::MetadataVersion::V3;
                        goto __pyx_L0;

                        /* "pyarrow/ipc.pxi":42
 *     elif version == MetadataVersion.V2:
 *         return CMetadataVersion_V2
 *     elif version == MetadataVersion.V3:             # <<<<<<<<<<<<<<
 *         return CMetadataVersion_V3
 *     elif version == MetadataVersion.V4:
*/
                        break;
                        case __pyx_e_7pyarrow_3lib_V4:

                        /* "pyarrow/ipc.pxi":45
 *         return CMetadataVersion_V3
 *     elif version == MetadataVersion.V4:
 *         return CMetadataVersion_V4             # <<<<<<<<<<<<<<
 *     elif version == MetadataVersion.V5:
 *         return CMetadataVersion_V5
*/
                        __pyx_r =  arrow::ipc::MetadataVersion::V4;
                        goto __pyx_L0;

                        /* "pyarrow/ipc.pxi":44
 *     elif version == MetadataVersion.V3:
 *         return CMetadataVersion_V3
 *     elif version == MetadataVersion.V4:             # <<<<<<<<<<<<<<
 *         return CMetadataVersion_V4
 *     elif version == MetadataVersion.V5:
*/
                        break;
                        case __pyx_e_7pyarrow_3lib_V5:

                        /* "pyarrow/ipc.pxi":47
 *         return CMetadataVersion_V4
 *     elif version == MetadataVersion.V5:
 *         return CMetadataVersion_V5             # <<<<<<<<<<<<<<
 *     raise ValueError("Not a metadata version: " + repr(version))
 * 
*/
                        __pyx_r =  arrow::ipc::MetadataVersion::V5;
                        goto __pyx_L0;

                        /* "pyarrow/ipc.pxi":46
 *     elif version == MetadataVersion.V4:
 *         return CMetadataVersion_V4
 *     elif version == MetadataVersion.V5:             # <<<<<<<<<<<<<<
 *         return CMetadataVersion_V5
 *     raise ValueError("Not a metadata version: " + repr(version))
*/
                        break;
                        default: break;
                      }

                      /* "pyarrow/ipc.pxi":48
 *     elif version == MetadataVersion.V5:
 *         return CMetadataVersion_V5
 *     raise ValueError("Not a metadata version: " + repr(version))             # <<<<<<<<<<<<<<
 * 
 * 
*/
                      __pyx_t_2 = NULL;
                      __pyx_t_3 = __Pyx_Enum_7pyarrow_3lib_enum__dunderpyx_t_7pyarrow_3lib_MetadataVersion_to_py(__pyx_v_version); if (unlikely(!__pyx_t_3)) __PYX_ERR(19, 48, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_3);
                      __pyx_t_4 = PyObject_Repr(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(19, 48, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_4);
                      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                      __pyx_t_3 = __Pyx_PyUnicode_ConcatSafe(__pyx_mstate_global->__pyx_kp_u_Not_a_metadata_version, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(19, 48, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_3);
                      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                      __pyx_t_5 = 1;
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
                        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 48, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      __PYX_ERR(19, 48, __pyx_L1_error)

                      /* "pyarrow/ipc.pxi":36
 * 
 * 
 * cdef CMetadataVersion _unwrap_metadata_version(             # <<<<<<<<<<<<<<
 *         MetadataVersion version) except *:
 *     if version == MetadataVersion.V1:
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_XDECREF(__pyx_t_4);
                      __Pyx_AddTraceback("pyarrow.lib._unwrap_metadata_version", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = ( arrow::ipc::MetadataVersion) 0;
                      __pyx_L0:;
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/ipc.pxi":57
 * 
 * 
 * cdef object _wrap_alignment(CAlignment alignment):             # <<<<<<<<<<<<<<
 *     return Alignment(<int64_t> alignment)
 * 
*/

                    static PyObject *__pyx_f_7pyarrow_3lib__wrap_alignment( arrow::ipc::Alignment __pyx_v_alignment) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      PyObject *__pyx_t_3 = NULL;
                      PyObject *__pyx_t_4 = NULL;
                      size_t __pyx_t_5;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("_wrap_alignment", 0);

                      /* "pyarrow/ipc.pxi":58
 * 
 * cdef object _wrap_alignment(CAlignment alignment):
 *     return Alignment(<int64_t> alignment)             # <<<<<<<<<<<<<<
 * 
 * 
*/
                      __Pyx_XDECREF(__pyx_r);
                      __pyx_t_2 = NULL;
                      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Alignment); if (unlikely(!__pyx_t_3)) __PYX_ERR(19, 58, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_3);
                      __pyx_t_4 = __Pyx_PyLong_From_int64_t(((int64_t)__pyx_v_alignment)); if (unlikely(!__pyx_t_4)) __PYX_ERR(19, 58, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_4);
                      __pyx_t_5 = 1;
                      #if CYTHON_UNPACK_METHODS
                      if (unlikely(PyMethod_Check(__pyx_t_3))) {
                        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
                        assert(__pyx_t_2);
                        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
                        __Pyx_INCREF(__pyx_t_2);
                        __Pyx_INCREF(__pyx__function);
                        __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
                        __pyx_t_5 = 0;
                      }
                      #endif
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4};
                        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 58, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __pyx_r = __pyx_t_1;
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/ipc.pxi":57
 * 
 * 
 * cdef object _wrap_alignment(CAlignment alignment):             # <<<<<<<<<<<<<<
 *     return Alignment(<int64_t> alignment)
 * 
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_XDECREF(__pyx_t_4);
                      __Pyx_AddTraceback("pyarrow.lib._wrap_alignment", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = 0;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/ipc.pxi":61
 * 
 * 
 * cdef CAlignment _unwrap_alignment(Alignment alignment) except *:             # <<<<<<<<<<<<<<
 *     if alignment == Alignment.Any:
 *         return CAlignment_Any
*/

                    static  arrow::ipc::Alignment __pyx_f_7pyarrow_3lib__unwrap_alignment(enum __pyx_t_7pyarrow_3lib_Alignment __pyx_v_alignment) {
                       arrow::ipc::Alignment __pyx_r;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      PyObject *__pyx_t_3 = NULL;
                      PyObject *__pyx_t_4 = NULL;
                      size_t __pyx_t_5;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("_unwrap_alignment", 0);

                      /* "pyarrow/ipc.pxi":62
 * 
 * cdef CAlignment _unwrap_alignment(Alignment alignment) except *:
 *     if alignment == Alignment.Any:             # <<<<<<<<<<<<<<
 *         return CAlignment_Any
 *     elif alignment == Alignment.DataTypeSpecific:
*/
                      switch (__pyx_v_alignment) {
                        case __pyx_e_7pyarrow_3lib_Any:

                        /* "pyarrow/ipc.pxi":63
 * cdef CAlignment _unwrap_alignment(Alignment alignment) except *:
 *     if alignment == Alignment.Any:
 *         return CAlignment_Any             # <<<<<<<<<<<<<<
 *     elif alignment == Alignment.DataTypeSpecific:
 *         return CAlignment_DataTypeSpecific
*/
                        __pyx_r =  arrow::ipc::Alignment::kAnyAlignment;
                        goto __pyx_L0;

                        /* "pyarrow/ipc.pxi":62
 * 
 * cdef CAlignment _unwrap_alignment(Alignment alignment) except *:
 *     if alignment == Alignment.Any:             # <<<<<<<<<<<<<<
 *         return CAlignment_Any
 *     elif alignment == Alignment.DataTypeSpecific:
*/
                        break;
                        case __pyx_e_7pyarrow_3lib_DataTypeSpecific:

                        /* "pyarrow/ipc.pxi":65
 *         return CAlignment_Any
 *     elif alignment == Alignment.DataTypeSpecific:
 *         return CAlignment_DataTypeSpecific             # <<<<<<<<<<<<<<
 *     elif alignment == Alignment.At64Byte:
 *         return CAlignment_64Byte
*/
                        __pyx_r =  arrow::ipc::Alignment::kDataTypeSpecificAlignment;
                        goto __pyx_L0;

                        /* "pyarrow/ipc.pxi":64
 *     if alignment == Alignment.Any:
 *         return CAlignment_Any
 *     elif alignment == Alignment.DataTypeSpecific:             # <<<<<<<<<<<<<<
 *         return CAlignment_DataTypeSpecific
 *     elif alignment == Alignment.At64Byte:
*/
                        break;
                        case __pyx_e_7pyarrow_3lib_At64Byte:

                        /* "pyarrow/ipc.pxi":67
 *         return CAlignment_DataTypeSpecific
 *     elif alignment == Alignment.At64Byte:
 *         return CAlignment_64Byte             # <<<<<<<<<<<<<<
 *     raise ValueError("Not an alignment: " + repr(alignment))
 * 
*/
                        __pyx_r =  arrow::ipc::Alignment::k64ByteAlignment;
                        goto __pyx_L0;

                        /* "pyarrow/ipc.pxi":66
 *     elif alignment == Alignment.DataTypeSpecific:
 *         return CAlignment_DataTypeSpecific
 *     elif alignment == Alignment.At64Byte:             # <<<<<<<<<<<<<<
 *         return CAlignment_64Byte
 *     raise ValueError("Not an alignment: " + repr(alignment))
*/
                        break;
                        default: break;
                      }

                      /* "pyarrow/ipc.pxi":68
 *     elif alignment == Alignment.At64Byte:
 *         return CAlignment_64Byte
 *     raise ValueError("Not an alignment: " + repr(alignment))             # <<<<<<<<<<<<<<
 * 
 * 
*/
                      __pyx_t_2 = NULL;
                      __pyx_t_3 = __Pyx_Enum_7pyarrow_3lib_enum__dunderpyx_t_7pyarrow_3lib_Alignment_to_py(__pyx_v_alignment); if (unlikely(!__pyx_t_3)) __PYX_ERR(19, 68, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_3);
                      __pyx_t_4 = PyObject_Repr(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(19, 68, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_4);
                      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                      __pyx_t_3 = __Pyx_PyUnicode_ConcatSafe(__pyx_mstate_global->__pyx_kp_u_Not_an_alignment, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(19, 68, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_3);
                      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                      __pyx_t_5 = 1;
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
                        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 68, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      __PYX_ERR(19, 68, __pyx_L1_error)

                      /* "pyarrow/ipc.pxi":61
 * 
 * 
 * cdef CAlignment _unwrap_alignment(Alignment alignment) except *:             # <<<<<<<<<<<<<<
 *     if alignment == Alignment.Any:
 *         return CAlignment_Any
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_XDECREF(__pyx_t_4);
                      __Pyx_AddTraceback("pyarrow.lib._unwrap_alignment", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = ( arrow::ipc::Alignment) 0;
                      __pyx_L0:;
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/ipc.pxi":96
 * 
 * 
 * @staticmethod             # <<<<<<<<<<<<<<
 * cdef _wrap_write_stats(CIpcWriteStats c):
 *     return WriteStats(c.num_messages, c.num_record_batches,
*/

                    static PyObject *__pyx_f_7pyarrow_3lib__wrap_write_stats( arrow::ipc::WriteStats __pyx_v_c) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      PyObject *__pyx_t_3 = NULL;
                      PyObject *__pyx_t_4 = NULL;
                      PyObject *__pyx_t_5 = NULL;
                      PyObject *__pyx_t_6 = NULL;
                      PyObject *__pyx_t_7 = NULL;
                      PyObject *__pyx_t_8 = NULL;
                      size_t __pyx_t_9;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("_wrap_write_stats", 0);

                      /* "pyarrow/ipc.pxi":98
 * @staticmethod
 * cdef _wrap_write_stats(CIpcWriteStats c):
 *     return WriteStats(c.num_messages, c.num_record_batches,             # <<<<<<<<<<<<<<
 *                       c.num_dictionary_batches, c.num_dictionary_deltas,
 *                       c.num_replaced_dictionaries)
*/
                      __Pyx_XDECREF(__pyx_r);
                      __pyx_t_2 = NULL;
                      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_WriteStats); if (unlikely(!__pyx_t_3)) __PYX_ERR(19, 98, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_3);
                      __pyx_t_4 = __Pyx_PyLong_From_int64_t(__pyx_v_c.num_messages); if (unlikely(!__pyx_t_4)) __PYX_ERR(19, 98, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_4);
                      __pyx_t_5 = __Pyx_PyLong_From_int64_t(__pyx_v_c.num_record_batches); if (unlikely(!__pyx_t_5)) __PYX_ERR(19, 98, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_5);

                      /* "pyarrow/ipc.pxi":99
 * cdef _wrap_write_stats(CIpcWriteStats c):
 *     return WriteStats(c.num_messages, c.num_record_batches,
 *                       c.num_dictionary_batches, c.num_dictionary_deltas,             # <<<<<<<<<<<<<<
 *                       c.num_replaced_dictionaries)
 * 
*/
                      __pyx_t_6 = __Pyx_PyLong_From_int64_t(__pyx_v_c.num_dictionary_batches); if (unlikely(!__pyx_t_6)) __PYX_ERR(19, 99, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_6);
                      __pyx_t_7 = __Pyx_PyLong_From_int64_t(__pyx_v_c.num_dictionary_deltas); if (unlikely(!__pyx_t_7)) __PYX_ERR(19, 99, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_7);

                      /* "pyarrow/ipc.pxi":100
 *     return WriteStats(c.num_messages, c.num_record_batches,
 *                       c.num_dictionary_batches, c.num_dictionary_deltas,
 *                       c.num_replaced_dictionaries)             # <<<<<<<<<<<<<<
 * 
 * 
*/
                      __pyx_t_8 = __Pyx_PyLong_From_int64_t(__pyx_v_c.num_replaced_dictionaries); if (unlikely(!__pyx_t_8)) __PYX_ERR(19, 100, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_8);
                      __pyx_t_9 = 1;
                      #if CYTHON_UNPACK_METHODS
                      if (unlikely(PyMethod_Check(__pyx_t_3))) {
                        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
                        assert(__pyx_t_2);
                        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
                        __Pyx_INCREF(__pyx_t_2);
                        __Pyx_INCREF(__pyx__function);
                        __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
                        __pyx_t_9 = 0;
                      }
                      #endif
                      {
                        PyObject *__pyx_callargs[6] = {__pyx_t_2, __pyx_t_4, __pyx_t_5, __pyx_t_6, __pyx_t_7, __pyx_t_8};
                        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_9, (6-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
                        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 98, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __pyx_r = __pyx_t_1;
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/ipc.pxi":96
 * 
 * 
 * @staticmethod             # <<<<<<<<<<<<<<
 * cdef _wrap_write_stats(CIpcWriteStats c):
 *     return WriteStats(c.num_messages, c.num_record_batches,
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_XDECREF(__pyx_t_4);
                      __Pyx_XDECREF(__pyx_t_5);
                      __Pyx_XDECREF(__pyx_t_6);
                      __Pyx_XDECREF(__pyx_t_7);
                      __Pyx_XDECREF(__pyx_t_8);
                      __Pyx_AddTraceback("pyarrow.lib._wrap_write_stats", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = 0;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/ipc.pxi":128
 * 
 * 
 * cdef _wrap_read_stats(CIpcReadStats c):             # <<<<<<<<<<<<<<
 *     return ReadStats(c.num_messages, c.num_record_batches,
 *                      c.num_dictionary_batches, c.num_dictionary_deltas,
*/

                    static PyObject *__pyx_f_7pyarrow_3lib__wrap_read_stats( arrow::ipc::ReadStats __pyx_v_c) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      PyObject *__pyx_t_3 = NULL;
                      PyObject *__pyx_t_4 = NULL;
                      PyObject *__pyx_t_5 = NULL;
                      PyObject *__pyx_t_6 = NULL;
                      PyObject *__pyx_t_7 = NULL;
                      PyObject *__pyx_t_8 = NULL;
                      size_t __pyx_t_9;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("_wrap_read_stats", 0);

                      /* "pyarrow/ipc.pxi":129
 * 
 * cdef _wrap_read_stats(CIpcReadStats c):
 *     return ReadStats(c.num_messages, c.num_record_batches,             # <<<<<<<<<<<<<<
 *                      c.num_dictionary_batches, c.num_dictionary_deltas,
 *                      c.num_replaced_dictionaries)
*/
                      __Pyx_XDECREF(__pyx_r);
                      __pyx_t_2 = NULL;
                      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ReadStats); if (unlikely(!__pyx_t_3)) __PYX_ERR(19, 129, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_3);
                      __pyx_t_4 = __Pyx_PyLong_From_int64_t(__pyx_v_c.num_messages); if (unlikely(!__pyx_t_4)) __PYX_ERR(19, 129, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_4);
                      __pyx_t_5 = __Pyx_PyLong_From_int64_t(__pyx_v_c.num_record_batches); if (unlikely(!__pyx_t_5)) __PYX_ERR(19, 129, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_5);

                      /* "pyarrow/ipc.pxi":130
 * cdef _wrap_read_stats(CIpcReadStats c):
 *     return ReadStats(c.num_messages, c.num_record_batches,
 *                      c.num_dictionary_batches, c.num_dictionary_deltas,             # <<<<<<<<<<<<<<
 *                      c.num_replaced_dictionaries)
 * 
*/
                      __pyx_t_6 = __Pyx_PyLong_From_int64_t(__pyx_v_c.num_dictionary_batches); if (unlikely(!__pyx_t_6)) __PYX_ERR(19, 130, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_6);
                      __pyx_t_7 = __Pyx_PyLong_From_int64_t(__pyx_v_c.num_dictionary_deltas); if (unlikely(!__pyx_t_7)) __PYX_ERR(19, 130, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_7);

                      /* "pyarrow/ipc.pxi":131
 *     return ReadStats(c.num_messages, c.num_record_batches,
 *                      c.num_dictionary_batches, c.num_dictionary_deltas,
 *                      c.num_replaced_dictionaries)             # <<<<<<<<<<<<<<
 * 
 * 
*/
                      __pyx_t_8 = __Pyx_PyLong_From_int64_t(__pyx_v_c.num_replaced_dictionaries); if (unlikely(!__pyx_t_8)) __PYX_ERR(19, 131, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_8);
                      __pyx_t_9 = 1;
                      #if CYTHON_UNPACK_METHODS
                      if (unlikely(PyMethod_Check(__pyx_t_3))) {
                        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
                        assert(__pyx_t_2);
                        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
                        __Pyx_INCREF(__pyx_t_2);
                        __Pyx_INCREF(__pyx__function);
                        __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
                        __pyx_t_9 = 0;
                      }
                      #endif
                      {
                        PyObject *__pyx_callargs[6] = {__pyx_t_2, __pyx_t_4, __pyx_t_5, __pyx_t_6, __pyx_t_7, __pyx_t_8};
                        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_9, (6-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
                        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 129, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __pyx_r = __pyx_t_1;
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/ipc.pxi":128
 * 
 * 
 * cdef _wrap_read_stats(CIpcReadStats c):             # <<<<<<<<<<<<<<
 *     return ReadStats(c.num_messages, c.num_record_batches,
 *                      c.num_dictionary_batches, c.num_dictionary_deltas,
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_XDECREF(__pyx_t_4);
                      __Pyx_XDECREF(__pyx_t_5);
                      __Pyx_XDECREF(__pyx_t_6);
                      __Pyx_XDECREF(__pyx_t_7);
                      __Pyx_XDECREF(__pyx_t_8);
                      __Pyx_AddTraceback("pyarrow.lib._wrap_read_stats", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = 0;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/ipc.pxi":158
 *     # cdef block is in lib.pxd
 * 
 *     def __init__(self, *, bint ensure_native_endian=True,             # <<<<<<<<<<<<<<
 *                  Alignment ensure_alignment=Alignment.Any,
 *                  bint use_threads=True, list included_fields=None):
*/

                    /* Python wrapper */
                    static int __pyx_pw_7pyarrow_3lib_14IpcReadOptions_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
                    static int __pyx_pw_7pyarrow_3lib_14IpcReadOptions_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
                      int __pyx_v_ensure_native_endian;
                      enum __pyx_t_7pyarrow_3lib_Alignment __pyx_v_ensure_alignment;
                      int __pyx_v_use_threads;
                      PyObject *__pyx_v_included_fields = 0;
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[4] = {0,0,0,0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      int __pyx_r;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_ensure_native_endian,&__pyx_mstate_global->__pyx_n_u_ensure_alignment,&__pyx_mstate_global->__pyx_n_u_use_threads,&__pyx_mstate_global->__pyx_n_u_included_fields,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(19, 158, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, 0, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(19, 158, __pyx_L3_error)

                          /* "pyarrow/ipc.pxi":160
 *     def __init__(self, *, bint ensure_native_endian=True,
 *                  Alignment ensure_alignment=Alignment.Any,
 *                  bint use_threads=True, list included_fields=None):             # <<<<<<<<<<<<<<
 *         self.c_options = CIpcReadOptions.Defaults()
 *         self.ensure_native_endian = ensure_native_endian
*/
                          if (!values[3]) values[3] = __Pyx_NewRef(((PyObject*)Py_None));
                        } else if (unlikely(__pyx_nargs != 0)) {
                          goto __pyx_L5_argtuple_error;
                        } else {
                          if (!values[3]) values[3] = __Pyx_NewRef(((PyObject*)Py_None));
                        }
                        if (values[0]) {
                          __pyx_v_ensure_native_endian = __Pyx_PyObject_IsTrue(values[0]); if (unlikely((__pyx_v_ensure_native_endian == (int)-1) && PyErr_Occurred())) __PYX_ERR(19, 158, __pyx_L3_error)
                        } else {

                          /* "pyarrow/ipc.pxi":158
 *     # cdef block is in lib.pxd
 * 
 *     def __init__(self, *, bint ensure_native_endian=True,             # <<<<<<<<<<<<<<
 *                  Alignment ensure_alignment=Alignment.Any,
 *                  bint use_threads=True, list included_fields=None):
*/
                          __pyx_v_ensure_native_endian = ((int)1);
                        }
                        if (values[1]) {
                          __pyx_v_ensure_alignment = ((enum __pyx_t_7pyarrow_3lib_Alignment)__Pyx_PyLong_As_enum____pyx_t_7pyarrow_3lib_Alignment(values[1])); if (unlikely(PyErr_Occurred())) __PYX_ERR(19, 159, __pyx_L3_error)
                        } else {
                          __pyx_v_ensure_alignment = __pyx_mstate_global->__pyx_k__19;
                        }
                        if (values[2]) {
                          __pyx_v_use_threads = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_use_threads == (int)-1) && PyErr_Occurred())) __PYX_ERR(19, 160, __pyx_L3_error)
                        } else {

                          /* "pyarrow/ipc.pxi":160
 *     def __init__(self, *, bint ensure_native_endian=True,
 *                  Alignment ensure_alignment=Alignment.Any,
 *                  bint use_threads=True, list included_fields=None):             # <<<<<<<<<<<<<<
 *         self.c_options = CIpcReadOptions.Defaults()
 *         self.ensure_native_endian = ensure_native_endian
*/
                          __pyx_v_use_threads = ((int)1);
                        }
                        __pyx_v_included_fields = ((PyObject*)values[3]);
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, __pyx_nargs); __PYX_ERR(19, 158, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.IpcReadOptions.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return -1;
                      __pyx_L4_argument_unpacking_done:;
                      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_included_fields), (&PyList_Type), 1, "included_fields", 1))) __PYX_ERR(19, 160, __pyx_L1_error)
                      __pyx_r = __pyx_pf_7pyarrow_3lib_14IpcReadOptions___init__(((struct __pyx_obj_7pyarrow_3lib_IpcReadOptions *)__pyx_v_self), __pyx_v_ensure_native_endian, __pyx_v_ensure_alignment, __pyx_v_use_threads, __pyx_v_included_fields);

                      /* "pyarrow/ipc.pxi":158
 *     # cdef block is in lib.pxd
 * 
 *     def __init__(self, *, bint ensure_native_endian=True,             # <<<<<<<<<<<<<<
 *                  Alignment ensure_alignment=Alignment.Any,
 *                  bint use_threads=True, list included_fields=None):
*/

                      /* function exit code */
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __pyx_r = -1;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      goto __pyx_L7_cleaned_up;
                      __pyx_L0:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __pyx_L7_cleaned_up:;
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static int __pyx_pf_7pyarrow_3lib_14IpcReadOptions___init__(struct __pyx_obj_7pyarrow_3lib_IpcReadOptions *__pyx_v_self, int __pyx_v_ensure_native_endian, enum __pyx_t_7pyarrow_3lib_Alignment __pyx_v_ensure_alignment, int __pyx_v_use_threads, PyObject *__pyx_v_included_fields) {
                      int __pyx_r;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      int __pyx_t_2;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__init__", 0);

                      /* "pyarrow/ipc.pxi":161
 *                  Alignment ensure_alignment=Alignment.Any,
 *                  bint use_threads=True, list included_fields=None):
 *         self.c_options = CIpcReadOptions.Defaults()             # <<<<<<<<<<<<<<
 *         self.ensure_native_endian = ensure_native_endian
 *         self.ensure_alignment = ensure_alignment
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "c_options");
                        __PYX_ERR(19, 161, __pyx_L1_error)
                      }
                      __pyx_v_self->c_options =  arrow::ipc::IpcReadOptions::Defaults();

                      /* "pyarrow/ipc.pxi":162
 *                  bint use_threads=True, list included_fields=None):
 *         self.c_options = CIpcReadOptions.Defaults()
 *         self.ensure_native_endian = ensure_native_endian             # <<<<<<<<<<<<<<
 *         self.ensure_alignment = ensure_alignment
 *         self.use_threads = use_threads
*/
                      __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_ensure_native_endian); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 162, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_ensure_native_endian, __pyx_t_1) < (0)) __PYX_ERR(19, 162, __pyx_L1_error)
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

                      /* "pyarrow/ipc.pxi":163
 *         self.c_options = CIpcReadOptions.Defaults()
 *         self.ensure_native_endian = ensure_native_endian
 *         self.ensure_alignment = ensure_alignment             # <<<<<<<<<<<<<<
 *         self.use_threads = use_threads
 *         if included_fields is not None:
*/
                      __pyx_t_1 = __Pyx_Enum_7pyarrow_3lib_enum__dunderpyx_t_7pyarrow_3lib_Alignment_to_py(__pyx_v_ensure_alignment); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 163, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_ensure_alignment, __pyx_t_1) < (0)) __PYX_ERR(19, 163, __pyx_L1_error)
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

                      /* "pyarrow/ipc.pxi":164
 *         self.ensure_native_endian = ensure_native_endian
 *         self.ensure_alignment = ensure_alignment
 *         self.use_threads = use_threads             # <<<<<<<<<<<<<<
 *         if included_fields is not None:
 *             self.included_fields = included_fields
*/
                      __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_use_threads); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 164, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_use_threads, __pyx_t_1) < (0)) __PYX_ERR(19, 164, __pyx_L1_error)
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

                      /* "pyarrow/ipc.pxi":165
 *         self.ensure_alignment = ensure_alignment
 *         self.use_threads = use_threads
 *         if included_fields is not None:             # <<<<<<<<<<<<<<
 *             self.included_fields = included_fields
 * 
*/
                      __pyx_t_2 = (__pyx_v_included_fields != ((PyObject*)Py_None));
                      if (__pyx_t_2) {

                        /* "pyarrow/ipc.pxi":166
 *         self.use_threads = use_threads
 *         if included_fields is not None:
 *             self.included_fields = included_fields             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
                        if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_included_fields, __pyx_v_included_fields) < (0)) __PYX_ERR(19, 166, __pyx_L1_error)

                        /* "pyarrow/ipc.pxi":165
 *         self.ensure_alignment = ensure_alignment
 *         self.use_threads = use_threads
 *         if included_fields is not None:             # <<<<<<<<<<<<<<
 *             self.included_fields = included_fields
 * 
*/
                      }

                      /* "pyarrow/ipc.pxi":158
 *     # cdef block is in lib.pxd
 * 
 *     def __init__(self, *, bint ensure_native_endian=True,             # <<<<<<<<<<<<<<
 *                  Alignment ensure_alignment=Alignment.Any,
 *                  bint use_threads=True, list included_fields=None):
*/

                      /* function exit code */
                      __pyx_r = 0;
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_AddTraceback("pyarrow.lib.IpcReadOptions.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = -1;
                      __pyx_L0:;
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/ipc.pxi":168
 *             self.included_fields = included_fields
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def ensure_native_endian(self):
 *         return self.c_options.ensure_native_endian
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_14IpcReadOptions_20ensure_native_endian_1__get__(PyObject *__pyx_v_self); /*proto*/
                    static PyObject *__pyx_pw_7pyarrow_3lib_14IpcReadOptions_20ensure_native_endian_1__get__(PyObject *__pyx_v_self) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_14IpcReadOptions_20ensure_native_endian___get__(((struct __pyx_obj_7pyarrow_3lib_IpcReadOptions *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_14IpcReadOptions_20ensure_native_endian___get__(struct __pyx_obj_7pyarrow_3lib_IpcReadOptions *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__get__", 0);

                      /* "pyarrow/ipc.pxi":170
 *     @property
 *     def ensure_native_endian(self):
 *         return self.c_options.ensure_native_endian             # <<<<<<<<<<<<<<
 * 
 *     @ensure_native_endian.setter
*/
                      __Pyx_XDECREF(__pyx_r);
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "c_options");
                        __PYX_ERR(19, 170, __pyx_L1_error)
                      }
                      __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->c_options.ensure_native_endian); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 170, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_r = __pyx_t_1;
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/ipc.pxi":168
 *             self.included_fields = included_fields
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def ensure_native_endian(self):
 *         return self.c_options.ensure_native_endian
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_AddTraceback("pyarrow.lib.IpcReadOptions.ensure_native_endian.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/ipc.pxi":172
 *         return self.c_options.ensure_native_endian
 * 
 *     @ensure_native_endian.setter             # <<<<<<<<<<<<<<
 *     def ensure_native_endian(self, bint value):
 *         self.c_options.ensure_native_endian = value
*/

                    /* Python wrapper */
                    static int __pyx_pw_7pyarrow_3lib_14IpcReadOptions_20ensure_native_endian_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_value); /*proto*/
                    static int __pyx_pw_7pyarrow_3lib_14IpcReadOptions_20ensure_native_endian_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_value) {
                      int __pyx_v_value;
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      int __pyx_r;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      assert(__pyx_arg_value); {
                        __pyx_v_value = __Pyx_PyObject_IsTrue(__pyx_arg_value); if (unlikely((__pyx_v_value == (int)-1) && PyErr_Occurred())) __PYX_ERR(19, 173, __pyx_L3_error)
                      }
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      __Pyx_AddTraceback("pyarrow.lib.IpcReadOptions.ensure_native_endian.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return -1;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_14IpcReadOptions_20ensure_native_endian_2__set__(((struct __pyx_obj_7pyarrow_3lib_IpcReadOptions *)__pyx_v_self), ((int)__pyx_v_value));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static int __pyx_pf_7pyarrow_3lib_14IpcReadOptions_20ensure_native_endian_2__set__(struct __pyx_obj_7pyarrow_3lib_IpcReadOptions *__pyx_v_self, int __pyx_v_value) {
                      int __pyx_r;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;

                      /* "pyarrow/ipc.pxi":174
 *     @ensure_native_endian.setter
 *     def ensure_native_endian(self, bint value):
 *         self.c_options.ensure_native_endian = value             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "c_options");
                        __PYX_ERR(19, 174, __pyx_L1_error)
                      }
                      __pyx_v_self->c_options.ensure_native_endian = __pyx_v_value;

                      /* "pyarrow/ipc.pxi":172
 *         return self.c_options.ensure_native_endian
 * 
 *     @ensure_native_endian.setter             # <<<<<<<<<<<<<<
 *     def ensure_native_endian(self, bint value):
 *         self.c_options.ensure_native_endian = value
*/

                      /* function exit code */
                      __pyx_r = 0;
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib.IpcReadOptions.ensure_native_endian.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = -1;
                      __pyx_L0:;
                      return __pyx_r;
                    }

                    /* "pyarrow/ipc.pxi":176
 *         self.c_options.ensure_native_endian = value
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def ensure_alignment(self):
 *         return _wrap_alignment(self.c_options.ensure_alignment)
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_14IpcReadOptions_16ensure_alignment_1__get__(PyObject *__pyx_v_self); /*proto*/
                    static PyObject *__pyx_pw_7pyarrow_3lib_14IpcReadOptions_16ensure_alignment_1__get__(PyObject *__pyx_v_self) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_14IpcReadOptions_16ensure_alignment___get__(((struct __pyx_obj_7pyarrow_3lib_IpcReadOptions *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_14IpcReadOptions_16ensure_alignment___get__(struct __pyx_obj_7pyarrow_3lib_IpcReadOptions *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__get__", 0);

                      /* "pyarrow/ipc.pxi":178
 *     @property
 *     def ensure_alignment(self):
 *         return _wrap_alignment(self.c_options.ensure_alignment)             # <<<<<<<<<<<<<<
 * 
 *     @ensure_alignment.setter
*/
                      __Pyx_XDECREF(__pyx_r);
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "c_options");
                        __PYX_ERR(19, 178, __pyx_L1_error)
                      }
                      __pyx_t_1 = __pyx_f_7pyarrow_3lib__wrap_alignment(__pyx_v_self->c_options.ensure_alignment); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 178, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_r = __pyx_t_1;
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/ipc.pxi":176
 *         self.c_options.ensure_native_endian = value
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def ensure_alignment(self):
 *         return _wrap_alignment(self.c_options.ensure_alignment)
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_AddTraceback("pyarrow.lib.IpcReadOptions.ensure_alignment.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/ipc.pxi":180
 *         return _wrap_alignment(self.c_options.ensure_alignment)
 * 
 *     @ensure_alignment.setter             # <<<<<<<<<<<<<<
 *     def ensure_alignment(self, Alignment value):
 *         self.c_options.ensure_alignment = _unwrap_alignment(value)
*/

                    /* Python wrapper */
                    static int __pyx_pw_7pyarrow_3lib_14IpcReadOptions_16ensure_alignment_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_value); /*proto*/
                    static int __pyx_pw_7pyarrow_3lib_14IpcReadOptions_16ensure_alignment_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_value) {
                      enum __pyx_t_7pyarrow_3lib_Alignment __pyx_v_value;
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      int __pyx_r;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      assert(__pyx_arg_value); {
                        __pyx_v_value = ((enum __pyx_t_7pyarrow_3lib_Alignment)__Pyx_PyLong_As_enum____pyx_t_7pyarrow_3lib_Alignment(__pyx_arg_value)); if (unlikely(PyErr_Occurred())) __PYX_ERR(19, 181, __pyx_L3_error)
                      }
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      __Pyx_AddTraceback("pyarrow.lib.IpcReadOptions.ensure_alignment.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return -1;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_14IpcReadOptions_16ensure_alignment_2__set__(((struct __pyx_obj_7pyarrow_3lib_IpcReadOptions *)__pyx_v_self), ((enum __pyx_t_7pyarrow_3lib_Alignment)__pyx_v_value));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static int __pyx_pf_7pyarrow_3lib_14IpcReadOptions_16ensure_alignment_2__set__(struct __pyx_obj_7pyarrow_3lib_IpcReadOptions *__pyx_v_self, enum __pyx_t_7pyarrow_3lib_Alignment __pyx_v_value) {
                      int __pyx_r;
                       arrow::ipc::Alignment __pyx_t_1;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;

                      /* "pyarrow/ipc.pxi":182
 *     @ensure_alignment.setter
 *     def ensure_alignment(self, Alignment value):
 *         self.c_options.ensure_alignment = _unwrap_alignment(value)             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
                      __pyx_t_1 = __pyx_f_7pyarrow_3lib__unwrap_alignment(__pyx_v_value); if (unlikely(PyErr_Occurred())) __PYX_ERR(19, 182, __pyx_L1_error)
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "c_options");
                        __PYX_ERR(19, 182, __pyx_L1_error)
                      }
                      __pyx_v_self->c_options.ensure_alignment = __pyx_t_1;

                      /* "pyarrow/ipc.pxi":180
 *         return _wrap_alignment(self.c_options.ensure_alignment)
 * 
 *     @ensure_alignment.setter             # <<<<<<<<<<<<<<
 *     def ensure_alignment(self, Alignment value):
 *         self.c_options.ensure_alignment = _unwrap_alignment(value)
*/

                      /* function exit code */
                      __pyx_r = 0;
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib.IpcReadOptions.ensure_alignment.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = -1;
                      __pyx_L0:;
                      return __pyx_r;
                    }

                    /* "pyarrow/ipc.pxi":184
 *         self.c_options.ensure_alignment = _unwrap_alignment(value)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def use_threads(self):
 *         return self.c_options.use_threads
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_14IpcReadOptions_11use_threads_1__get__(PyObject *__pyx_v_self); /*proto*/
                    static PyObject *__pyx_pw_7pyarrow_3lib_14IpcReadOptions_11use_threads_1__get__(PyObject *__pyx_v_self) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_14IpcReadOptions_11use_threads___get__(((struct __pyx_obj_7pyarrow_3lib_IpcReadOptions *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_14IpcReadOptions_11use_threads___get__(struct __pyx_obj_7pyarrow_3lib_IpcReadOptions *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__get__", 0);

                      /* "pyarrow/ipc.pxi":186
 *     @property
 *     def use_threads(self):
 *         return self.c_options.use_threads             # <<<<<<<<<<<<<<
 * 
 *     @use_threads.setter
*/
                      __Pyx_XDECREF(__pyx_r);
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "c_options");
                        __PYX_ERR(19, 186, __pyx_L1_error)
                      }
                      __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->c_options.use_threads); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 186, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_r = __pyx_t_1;
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/ipc.pxi":184
 *         self.c_options.ensure_alignment = _unwrap_alignment(value)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def use_threads(self):
 *         return self.c_options.use_threads
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_AddTraceback("pyarrow.lib.IpcReadOptions.use_threads.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/ipc.pxi":188
 *         return self.c_options.use_threads
 * 
 *     @use_threads.setter             # <<<<<<<<<<<<<<
 *     def use_threads(self, bint value):
 *         self.c_options.use_threads = value
*/

                    /* Python wrapper */
                    static int __pyx_pw_7pyarrow_3lib_14IpcReadOptions_11use_threads_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_value); /*proto*/
                    static int __pyx_pw_7pyarrow_3lib_14IpcReadOptions_11use_threads_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_value) {
                      int __pyx_v_value;
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      int __pyx_r;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      assert(__pyx_arg_value); {
                        __pyx_v_value = __Pyx_PyObject_IsTrue(__pyx_arg_value); if (unlikely((__pyx_v_value == (int)-1) && PyErr_Occurred())) __PYX_ERR(19, 189, __pyx_L3_error)
                      }
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      __Pyx_AddTraceback("pyarrow.lib.IpcReadOptions.use_threads.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return -1;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_14IpcReadOptions_11use_threads_2__set__(((struct __pyx_obj_7pyarrow_3lib_IpcReadOptions *)__pyx_v_self), ((int)__pyx_v_value));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static int __pyx_pf_7pyarrow_3lib_14IpcReadOptions_11use_threads_2__set__(struct __pyx_obj_7pyarrow_3lib_IpcReadOptions *__pyx_v_self, int __pyx_v_value) {
                      int __pyx_r;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;

                      /* "pyarrow/ipc.pxi":190
 *     @use_threads.setter
 *     def use_threads(self, bint value):
 *         self.c_options.use_threads = value             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "c_options");
                        __PYX_ERR(19, 190, __pyx_L1_error)
                      }
                      __pyx_v_self->c_options.use_threads = __pyx_v_value;

                      /* "pyarrow/ipc.pxi":188
 *         return self.c_options.use_threads
 * 
 *     @use_threads.setter             # <<<<<<<<<<<<<<
 *     def use_threads(self, bint value):
 *         self.c_options.use_threads = value
*/

                      /* function exit code */
                      __pyx_r = 0;
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib.IpcReadOptions.use_threads.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = -1;
                      __pyx_L0:;
                      return __pyx_r;
                    }

                    /* "pyarrow/ipc.pxi":192
 *         self.c_options.use_threads = value
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def included_fields(self):
 *         return self.c_options.included_fields
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_14IpcReadOptions_15included_fields_1__get__(PyObject *__pyx_v_self); /*proto*/
                    static PyObject *__pyx_pw_7pyarrow_3lib_14IpcReadOptions_15included_fields_1__get__(PyObject *__pyx_v_self) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_14IpcReadOptions_15included_fields___get__(((struct __pyx_obj_7pyarrow_3lib_IpcReadOptions *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_14IpcReadOptions_15included_fields___get__(struct __pyx_obj_7pyarrow_3lib_IpcReadOptions *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__get__", 0);

                      /* "pyarrow/ipc.pxi":194
 *     @property
 *     def included_fields(self):
 *         return self.c_options.included_fields             # <<<<<<<<<<<<<<
 * 
 *     @included_fields.setter
*/
                      __Pyx_XDECREF(__pyx_r);
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "c_options");
                        __PYX_ERR(19, 194, __pyx_L1_error)
                      }
                      __pyx_t_1 = __pyx_convert_vector_to_py_int(__pyx_v_self->c_options.included_fields); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 194, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_r = __pyx_t_1;
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/ipc.pxi":192
 *         self.c_options.use_threads = value
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def included_fields(self):
 *         return self.c_options.included_fields
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_AddTraceback("pyarrow.lib.IpcReadOptions.included_fields.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/ipc.pxi":196
 *         return self.c_options.included_fields
 * 
 *     @included_fields.setter             # <<<<<<<<<<<<<<
 *     def included_fields(self, list value not None):
 *         self.c_options.included_fields = value
*/

                    /* Python wrapper */
                    static int __pyx_pw_7pyarrow_3lib_14IpcReadOptions_15included_fields_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
                    static int __pyx_pw_7pyarrow_3lib_14IpcReadOptions_15included_fields_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      int __pyx_r;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_value), (&PyList_Type), 0, "value", 1))) __PYX_ERR(19, 197, __pyx_L1_error)
                      __pyx_r = __pyx_pf_7pyarrow_3lib_14IpcReadOptions_15included_fields_2__set__(((struct __pyx_obj_7pyarrow_3lib_IpcReadOptions *)__pyx_v_self), ((PyObject*)__pyx_v_value));

                      /* function exit code */
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __pyx_r = -1;
                      goto __pyx_L5_cleaned_up;
                      __pyx_L0:;
                      __pyx_L5_cleaned_up:;
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static int __pyx_pf_7pyarrow_3lib_14IpcReadOptions_15included_fields_2__set__(struct __pyx_obj_7pyarrow_3lib_IpcReadOptions *__pyx_v_self, PyObject *__pyx_v_value) {
                      int __pyx_r;
                      std::vector<int>  __pyx_t_1;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;

                      /* "pyarrow/ipc.pxi":198
 *     @included_fields.setter
 *     def included_fields(self, list value not None):
 *         self.c_options.included_fields = value             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
*/
                      __pyx_t_1 = __pyx_convert_vector_from_py_int(__pyx_v_value); if (unlikely(PyErr_Occurred())) __PYX_ERR(19, 198, __pyx_L1_error)
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "c_options");
                        __PYX_ERR(19, 198, __pyx_L1_error)
                      }
                      __pyx_v_self->c_options.included_fields = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_1);

                      /* "pyarrow/ipc.pxi":196
 *         return self.c_options.included_fields
 * 
 *     @included_fields.setter             # <<<<<<<<<<<<<<
 *     def included_fields(self, list value not None):
 *         self.c_options.included_fields = value
*/

                      /* function exit code */
                      __pyx_r = 0;
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib.IpcReadOptions.included_fields.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = -1;
                      __pyx_L0:;
                      return __pyx_r;
                    }

                    /* "pyarrow/ipc.pxi":200
 *         self.c_options.included_fields = value
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         alignment = Alignment(self.ensure_alignment).name
 * 
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_14IpcReadOptions_3__repr__(PyObject *__pyx_v_self); /*proto*/
                    static PyObject *__pyx_pw_7pyarrow_3lib_14IpcReadOptions_3__repr__(PyObject *__pyx_v_self) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_14IpcReadOptions_2__repr__(((struct __pyx_obj_7pyarrow_3lib_IpcReadOptions *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_14IpcReadOptions_2__repr__(struct __pyx_obj_7pyarrow_3lib_IpcReadOptions *__pyx_v_self) {
                      PyObject *__pyx_v_alignment = NULL;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      PyObject *__pyx_t_3 = NULL;
                      PyObject *__pyx_t_4 = NULL;
                      size_t __pyx_t_5;
                      PyObject *__pyx_t_6 = NULL;
                      PyObject *__pyx_t_7[9];
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__repr__", 0);

                      /* "pyarrow/ipc.pxi":201
 * 
 *     def __repr__(self):
 *         alignment = Alignment(self.ensure_alignment).name             # <<<<<<<<<<<<<<
 * 
 *         return (f"<pyarrow.ipc.IpcReadOptions "
*/
                      __pyx_t_2 = NULL;
                      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Alignment); if (unlikely(!__pyx_t_3)) __PYX_ERR(19, 201, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_3);
                      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_ensure_alignment); if (unlikely(!__pyx_t_4)) __PYX_ERR(19, 201, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_4);
                      __pyx_t_5 = 1;
                      #if CYTHON_UNPACK_METHODS
                      if (unlikely(PyMethod_Check(__pyx_t_3))) {
                        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
                        assert(__pyx_t_2);
                        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
                        __Pyx_INCREF(__pyx_t_2);
                        __Pyx_INCREF(__pyx__function);
                        __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
                        __pyx_t_5 = 0;
                      }
                      #endif
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4};
                        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 201, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(19, 201, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_3);
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      __pyx_v_alignment = __pyx_t_3;
                      __pyx_t_3 = 0;

                      /* "pyarrow/ipc.pxi":203
 *         alignment = Alignment(self.ensure_alignment).name
 * 
 *         return (f"<pyarrow.ipc.IpcReadOptions "             # <<<<<<<<<<<<<<
 *                 f"ensure_native_endian={self.ensure_native_endian} "
 *                 f"ensure_alignment={alignment} "
*/
                      __Pyx_XDECREF(__pyx_r);

                      /* "pyarrow/ipc.pxi":204
 * 
 *         return (f"<pyarrow.ipc.IpcReadOptions "
 *                 f"ensure_native_endian={self.ensure_native_endian} "             # <<<<<<<<<<<<<<
 *                 f"ensure_alignment={alignment} "
 *                 f"use_threads={self.use_threads} "
*/
                      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_ensure_native_endian); if (unlikely(!__pyx_t_3)) __PYX_ERR(19, 204, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_3);
                      __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_t_3, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 204, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

                      /* "pyarrow/ipc.pxi":205
 *         return (f"<pyarrow.ipc.IpcReadOptions "
 *                 f"ensure_native_endian={self.ensure_native_endian} "
 *                 f"ensure_alignment={alignment} "             # <<<<<<<<<<<<<<
 *                 f"use_threads={self.use_threads} "
 *                 f"included_fields={self.included_fields}>")
*/
                      __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_v_alignment, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(19, 205, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_3);

                      /* "pyarrow/ipc.pxi":206
 *                 f"ensure_native_endian={self.ensure_native_endian} "
 *                 f"ensure_alignment={alignment} "
 *                 f"use_threads={self.use_threads} "             # <<<<<<<<<<<<<<
 *                 f"included_fields={self.included_fields}>")
 * 
*/
                      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_use_threads); if (unlikely(!__pyx_t_4)) __PYX_ERR(19, 206, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_4);
                      __pyx_t_2 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(19, 206, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_2);
                      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

                      /* "pyarrow/ipc.pxi":207
 *                 f"ensure_alignment={alignment} "
 *                 f"use_threads={self.use_threads} "
 *                 f"included_fields={self.included_fields}>")             # <<<<<<<<<<<<<<
 * 
 * 
*/
                      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_included_fields); if (unlikely(!__pyx_t_4)) __PYX_ERR(19, 207, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_4);
                      __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(19, 207, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_6);
                      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                      __pyx_t_7[0] = __pyx_mstate_global->__pyx_kp_u_pyarrow_ipc_IpcReadOptions_ensu;
                      __pyx_t_7[1] = __pyx_t_1;
                      __pyx_t_7[2] = __pyx_mstate_global->__pyx_kp_u_ensure_alignment_2;
                      __pyx_t_7[3] = __pyx_t_3;
                      __pyx_t_7[4] = __pyx_mstate_global->__pyx_kp_u_use_threads_3;
                      __pyx_t_7[5] = __pyx_t_2;
                      __pyx_t_7[6] = __pyx_mstate_global->__pyx_kp_u_included_fields_2;
                      __pyx_t_7[7] = __pyx_t_6;
                      __pyx_t_7[8] = __pyx_mstate_global->__pyx_kp_u__5;

                      /* "pyarrow/ipc.pxi":203
 *         alignment = Alignment(self.ensure_alignment).name
 * 
 *         return (f"<pyarrow.ipc.IpcReadOptions "             # <<<<<<<<<<<<<<
 *                 f"ensure_native_endian={self.ensure_native_endian} "
 *                 f"ensure_alignment={alignment} "
*/
                      __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_7, 9, 49 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1) + 18 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + 13 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2) + 17 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6));
                      if (unlikely(!__pyx_t_4)) __PYX_ERR(19, 203, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_4);
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                      __pyx_r = __pyx_t_4;
                      __pyx_t_4 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/ipc.pxi":200
 *         self.c_options.included_fields = value
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         alignment = Alignment(self.ensure_alignment).name
 * 
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_XDECREF(__pyx_t_4);
                      __Pyx_XDECREF(__pyx_t_6);
                      __Pyx_AddTraceback("pyarrow.lib.IpcReadOptions.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XDECREF(__pyx_v_alignment);
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.c_options cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_14IpcReadOptions_5__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_14IpcReadOptions_4__reduce_cython__, "IpcReadOptions.__reduce_cython__(self)");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_14IpcReadOptions_5__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_14IpcReadOptions_5__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_14IpcReadOptions_4__reduce_cython__};
                    static PyObject *__pyx_pw_7pyarrow_3lib_14IpcReadOptions_5__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; }
                      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                      if (unlikely(__pyx_kwds_len < 0)) return NULL;
                      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;}
                      __pyx_r = __pyx_pf_7pyarrow_3lib_14IpcReadOptions_4__reduce_cython__(((struct __pyx_obj_7pyarrow_3lib_IpcReadOptions *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_14IpcReadOptions_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_IpcReadOptions *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__reduce_cython__", 0);

                      /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "self.c_options cannot be converted to a Python object for pickling"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "self.c_options cannot be converted to a Python object for pickling"
*/
                      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_self_c_options_cannot_be_convert, 0, 0);
                      __PYX_ERR(7, 2, __pyx_L1_error)

                      /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.c_options cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib.IpcReadOptions.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "self.c_options cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.c_options cannot be converted to a Python object for pickling"
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_14IpcReadOptions_7__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_14IpcReadOptions_6__setstate_cython__, "IpcReadOptions.__setstate_cython__(self, __pyx_state)");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_14IpcReadOptions_7__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_14IpcReadOptions_7__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_14IpcReadOptions_6__setstate_cython__};
                    static PyObject *__pyx_pw_7pyarrow_3lib_14IpcReadOptions_7__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[1] = {0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(7, 3, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(7, 3, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(7, 3, __pyx_L3_error)
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(7, 3, __pyx_L3_error) }
                          }
                        } else if (unlikely(__pyx_nargs != 1)) {
                          goto __pyx_L5_argtuple_error;
                        } else {
                          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(7, 3, __pyx_L3_error)
                        }
                        __pyx_v___pyx_state = values[0];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(7, 3, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.IpcReadOptions.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_14IpcReadOptions_6__setstate_cython__(((struct __pyx_obj_7pyarrow_3lib_IpcReadOptions *)__pyx_v_self), __pyx_v___pyx_state);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_14IpcReadOptions_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_IpcReadOptions *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__setstate_cython__", 0);

                      /* "(tree fragment)":4
 *     raise TypeError, "self.c_options cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "self.c_options cannot be converted to a Python object for pickling"             # <<<<<<<<<<<<<<
*/
                      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_self_c_options_cannot_be_convert, 0, 0);
                      __PYX_ERR(7, 4, __pyx_L1_error)

                      /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "self.c_options cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.c_options cannot be converted to a Python object for pickling"
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib.IpcReadOptions.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/ipc.pxi":210
 * 
 * 
 * cdef IpcReadOptions wrap_ipc_read_options(CIpcReadOptions c):             # <<<<<<<<<<<<<<
 *     """Get Python's IpcReadOptions from C++'s IpcReadOptions
 *     """
*/

                    static struct __pyx_obj_7pyarrow_3lib_IpcReadOptions *__pyx_f_7pyarrow_3lib_wrap_ipc_read_options( arrow::ipc::IpcReadOptions __pyx_v_c) {
                      struct __pyx_obj_7pyarrow_3lib_IpcReadOptions *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      PyObject *__pyx_t_3 = NULL;
                      PyObject *__pyx_t_4 = NULL;
                      PyObject *__pyx_t_5 = NULL;
                      PyObject *__pyx_t_6 = NULL;
                      size_t __pyx_t_7;
                      PyObject *__pyx_t_8 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("wrap_ipc_read_options", 0);

                      /* "pyarrow/ipc.pxi":214
 *     """
 * 
 *     return IpcReadOptions(             # <<<<<<<<<<<<<<
 *         ensure_native_endian=c.ensure_native_endian,
 *         ensure_alignment=c.ensure_alignment,
*/
                      __Pyx_XDECREF((PyObject *)__pyx_r);
                      __pyx_t_2 = NULL;

                      /* "pyarrow/ipc.pxi":215
 * 
 *     return IpcReadOptions(
 *         ensure_native_endian=c.ensure_native_endian,             # <<<<<<<<<<<<<<
 *         ensure_alignment=c.ensure_alignment,
 *         use_threads=c.use_threads,
*/
                      __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_c.ensure_native_endian); if (unlikely(!__pyx_t_3)) __PYX_ERR(19, 215, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_3);

                      /* "pyarrow/ipc.pxi":216
 *     return IpcReadOptions(
 *         ensure_native_endian=c.ensure_native_endian,
 *         ensure_alignment=c.ensure_alignment,             # <<<<<<<<<<<<<<
 *         use_threads=c.use_threads,
 *         included_fields=c.included_fields,
*/
                      __pyx_t_4 = __Pyx_PyLong_From___arrow_3a__3a_ipc_3a__3a_Alignment(__pyx_v_c.ensure_alignment); if (unlikely(!__pyx_t_4)) __PYX_ERR(19, 216, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_4);

                      /* "pyarrow/ipc.pxi":217
 *         ensure_native_endian=c.ensure_native_endian,
 *         ensure_alignment=c.ensure_alignment,
 *         use_threads=c.use_threads,             # <<<<<<<<<<<<<<
 *         included_fields=c.included_fields,
 *     )
*/
                      __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_c.use_threads); if (unlikely(!__pyx_t_5)) __PYX_ERR(19, 217, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_5);

                      /* "pyarrow/ipc.pxi":218
 *         ensure_alignment=c.ensure_alignment,
 *         use_threads=c.use_threads,
 *         included_fields=c.included_fields,             # <<<<<<<<<<<<<<
 *     )
 * 
*/
                      __pyx_t_6 = __pyx_convert_vector_to_py_int(__pyx_v_c.included_fields); if (unlikely(!__pyx_t_6)) __PYX_ERR(19, 218, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_6);
                      __pyx_t_7 = 1;
                      {
                        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 4 : 0)] = {__pyx_t_2, NULL};
                        __pyx_t_8 = __Pyx_MakeVectorcallBuilderKwds(4); if (unlikely(!__pyx_t_8)) __PYX_ERR(19, 214, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_8);
                        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_ensure_native_endian, __pyx_t_3, __pyx_t_8, __pyx_callargs+1, 0) < (0)) __PYX_ERR(19, 214, __pyx_L1_error)
                        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_ensure_alignment, __pyx_t_4, __pyx_t_8, __pyx_callargs+1, 1) < (0)) __PYX_ERR(19, 214, __pyx_L1_error)
                        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_use_threads, __pyx_t_5, __pyx_t_8, __pyx_callargs+1, 2) < (0)) __PYX_ERR(19, 214, __pyx_L1_error)
                        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_included_fields, __pyx_t_6, __pyx_t_8, __pyx_callargs+1, 3) < (0)) __PYX_ERR(19, 214, __pyx_L1_error)
                        __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_IpcReadOptions, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_8);
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 214, __pyx_L1_error)
                        __Pyx_GOTREF((PyObject *)__pyx_t_1);
                      }
                      __pyx_r = ((struct __pyx_obj_7pyarrow_3lib_IpcReadOptions *)__pyx_t_1);
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/ipc.pxi":210
 * 
 * 
 * cdef IpcReadOptions wrap_ipc_read_options(CIpcReadOptions c):             # <<<<<<<<<<<<<<
 *     """Get Python's IpcReadOptions from C++'s IpcReadOptions
 *     """
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_XDECREF(__pyx_t_4);
                      __Pyx_XDECREF(__pyx_t_5);
                      __Pyx_XDECREF(__pyx_t_6);
                      __Pyx_XDECREF(__pyx_t_8);
                      __Pyx_AddTraceback("pyarrow.lib.wrap_ipc_read_options", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = 0;
                      __pyx_L0:;
                      __Pyx_XGIVEREF((PyObject *)__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/ipc.pxi":222
 * 
 * 
 * cdef object _get_compression_from_codec(shared_ptr[CCodec] codec):             # <<<<<<<<<<<<<<
 *     if codec == nullptr:
 *         return None
*/

                    static PyObject *__pyx_f_7pyarrow_3lib__get_compression_from_codec(std::shared_ptr< arrow::util::Codec>  __pyx_v_codec) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_t_1;
                      PyObject *__pyx_t_2 = NULL;
                      PyObject *__pyx_t_3 = NULL;
                      PyObject *__pyx_t_4 = NULL;
                      PyObject *__pyx_t_5 = NULL;
                      size_t __pyx_t_6;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("_get_compression_from_codec", 0);

                      /* "pyarrow/ipc.pxi":223
 * 
 * cdef object _get_compression_from_codec(shared_ptr[CCodec] codec):
 *     if codec == nullptr:             # <<<<<<<<<<<<<<
 *         return None
 *     else:
*/
                      __pyx_t_1 = ((__pyx_v_codec == nullptr) != 0);
                      if (__pyx_t_1) {

                        /* "pyarrow/ipc.pxi":224
 * cdef object _get_compression_from_codec(shared_ptr[CCodec] codec):
 *     if codec == nullptr:
 *         return None             # <<<<<<<<<<<<<<
 *     else:
 *         return frombytes(codec.get().name())
*/
                        __Pyx_XDECREF(__pyx_r);
                        __pyx_r = Py_None; __Pyx_INCREF(Py_None);
                        goto __pyx_L0;

                        /* "pyarrow/ipc.pxi":223
 * 
 * cdef object _get_compression_from_codec(shared_ptr[CCodec] codec):
 *     if codec == nullptr:             # <<<<<<<<<<<<<<
 *         return None
 *     else:
*/
                      }

                      /* "pyarrow/ipc.pxi":226
 *         return None
 *     else:
 *         return frombytes(codec.get().name())             # <<<<<<<<<<<<<<
 * 
 * 
*/
                      /*else*/ {
                        __Pyx_XDECREF(__pyx_r);
                        __pyx_t_3 = NULL;
                        __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_frombytes); if (unlikely(!__pyx_t_4)) __PYX_ERR(19, 226, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_4);
                        __pyx_t_5 = __pyx_convert_PyBytes_string_to_py_6libcpp_6string_std__in_string(__pyx_v_codec.get()->name()); if (unlikely(!__pyx_t_5)) __PYX_ERR(19, 226, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_5);
                        __pyx_t_6 = 1;
                        #if CYTHON_UNPACK_METHODS
                        if (unlikely(PyMethod_Check(__pyx_t_4))) {
                          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
                          assert(__pyx_t_3);
                          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
                          __Pyx_INCREF(__pyx_t_3);
                          __Pyx_INCREF(__pyx__function);
                          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
                          __pyx_t_6 = 0;
                        }
                        #endif
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
                          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                          if (unlikely(!__pyx_t_2)) __PYX_ERR(19, 226, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_2);
                        }
                        __pyx_r = __pyx_t_2;
                        __pyx_t_2 = 0;
                        goto __pyx_L0;
                      }

                      /* "pyarrow/ipc.pxi":222
 * 
 * 
 * cdef object _get_compression_from_codec(shared_ptr[CCodec] codec):             # <<<<<<<<<<<<<<
 *     if codec == nullptr:
 *         return None
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_XDECREF(__pyx_t_4);
                      __Pyx_XDECREF(__pyx_t_5);
                      __Pyx_AddTraceback("pyarrow.lib._get_compression_from_codec", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = 0;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/ipc.pxi":267
 *     # cdef block is in lib.pxd
 * 
 *     def __init__(self, *, metadata_version=MetadataVersion.V5,             # <<<<<<<<<<<<<<
 *                  bint allow_64bit=False, use_legacy_format=False,
 *                  compression=None, bint use_threads=True,
*/

                    /* Python wrapper */
                    static int __pyx_pw_7pyarrow_3lib_15IpcWriteOptions_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
                    static int __pyx_pw_7pyarrow_3lib_15IpcWriteOptions_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
                      PyObject *__pyx_v_metadata_version = 0;
                      int __pyx_v_allow_64bit;
                      PyObject *__pyx_v_use_legacy_format = 0;
                      PyObject *__pyx_v_compression = 0;
                      int __pyx_v_use_threads;
                      int __pyx_v_emit_dictionary_deltas;
                      int __pyx_v_unify_dictionaries;
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[7] = {0,0,0,0,0,0,0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      int __pyx_r;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_metadata_version,&__pyx_mstate_global->__pyx_n_u_allow_64bit,&__pyx_mstate_global->__pyx_n_u_use_legacy_format,&__pyx_mstate_global->__pyx_n_u_compression,&__pyx_mstate_global->__pyx_n_u_use_threads,&__pyx_mstate_global->__pyx_n_u_emit_dictionary_deltas,&__pyx_mstate_global->__pyx_n_u_unify_dictionaries,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(19, 267, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, 0, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(19, 267, __pyx_L3_error)
                          if (!values[0]) values[0] = __Pyx_NewRef(__pyx_mstate_global->__pyx_k__20);

                          /* "pyarrow/ipc.pxi":268
 * 
 *     def __init__(self, *, metadata_version=MetadataVersion.V5,
 *                  bint allow_64bit=False, use_legacy_format=False,             # <<<<<<<<<<<<<<
 *                  compression=None, bint use_threads=True,
 *                  bint emit_dictionary_deltas=False,
*/
                          if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_False));

                          /* "pyarrow/ipc.pxi":269
 *     def __init__(self, *, metadata_version=MetadataVersion.V5,
 *                  bint allow_64bit=False, use_legacy_format=False,
 *                  compression=None, bint use_threads=True,             # <<<<<<<<<<<<<<
 *                  bint emit_dictionary_deltas=False,
 *                  bint unify_dictionaries=False):
*/
                          if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None));
                        } else if (unlikely(__pyx_nargs != 0)) {
                          goto __pyx_L5_argtuple_error;
                        } else {
                          if (!values[0]) values[0] = __Pyx_NewRef(__pyx_mstate_global->__pyx_k__20);

                          /* "pyarrow/ipc.pxi":268
 * 
 *     def __init__(self, *, metadata_version=MetadataVersion.V5,
 *                  bint allow_64bit=False, use_legacy_format=False,             # <<<<<<<<<<<<<<
 *                  compression=None, bint use_threads=True,
 *                  bint emit_dictionary_deltas=False,
*/
                          if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_False));

                          /* "pyarrow/ipc.pxi":269
 *     def __init__(self, *, metadata_version=MetadataVersion.V5,
 *                  bint allow_64bit=False, use_legacy_format=False,
 *                  compression=None, bint use_threads=True,             # <<<<<<<<<<<<<<
 *                  bint emit_dictionary_deltas=False,
 *                  bint unify_dictionaries=False):
*/
                          if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None));
                        }
                        __pyx_v_metadata_version = values[0];
                        if (values[1]) {
                          __pyx_v_allow_64bit = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_allow_64bit == (int)-1) && PyErr_Occurred())) __PYX_ERR(19, 268, __pyx_L3_error)
                        } else {

                          /* "pyarrow/ipc.pxi":268
 * 
 *     def __init__(self, *, metadata_version=MetadataVersion.V5,
 *                  bint allow_64bit=False, use_legacy_format=False,             # <<<<<<<<<<<<<<
 *                  compression=None, bint use_threads=True,
 *                  bint emit_dictionary_deltas=False,
*/
                          __pyx_v_allow_64bit = ((int)0);
                        }
                        __pyx_v_use_legacy_format = values[2];
                        __pyx_v_compression = values[3];
                        if (values[4]) {
                          __pyx_v_use_threads = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_use_threads == (int)-1) && PyErr_Occurred())) __PYX_ERR(19, 269, __pyx_L3_error)
                        } else {

                          /* "pyarrow/ipc.pxi":269
 *     def __init__(self, *, metadata_version=MetadataVersion.V5,
 *                  bint allow_64bit=False, use_legacy_format=False,
 *                  compression=None, bint use_threads=True,             # <<<<<<<<<<<<<<
 *                  bint emit_dictionary_deltas=False,
 *                  bint unify_dictionaries=False):
*/
                          __pyx_v_use_threads = ((int)1);
                        }
                        if (values[5]) {
                          __pyx_v_emit_dictionary_deltas = __Pyx_PyObject_IsTrue(values[5]); if (unlikely((__pyx_v_emit_dictionary_deltas == (int)-1) && PyErr_Occurred())) __PYX_ERR(19, 270, __pyx_L3_error)
                        } else {

                          /* "pyarrow/ipc.pxi":270
 *                  bint allow_64bit=False, use_legacy_format=False,
 *                  compression=None, bint use_threads=True,
 *                  bint emit_dictionary_deltas=False,             # <<<<<<<<<<<<<<
 *                  bint unify_dictionaries=False):
 *         self.c_options = CIpcWriteOptions.Defaults()
*/
                          __pyx_v_emit_dictionary_deltas = ((int)0);
                        }
                        if (values[6]) {
                          __pyx_v_unify_dictionaries = __Pyx_PyObject_IsTrue(values[6]); if (unlikely((__pyx_v_unify_dictionaries == (int)-1) && PyErr_Occurred())) __PYX_ERR(19, 271, __pyx_L3_error)
                        } else {

                          /* "pyarrow/ipc.pxi":271
 *                  compression=None, bint use_threads=True,
 *                  bint emit_dictionary_deltas=False,
 *                  bint unify_dictionaries=False):             # <<<<<<<<<<<<<<
 *         self.c_options = CIpcWriteOptions.Defaults()
 *         self.allow_64bit = allow_64bit
*/
                          __pyx_v_unify_dictionaries = ((int)0);
                        }
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, __pyx_nargs); __PYX_ERR(19, 267, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.IpcWriteOptions.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return -1;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_15IpcWriteOptions___init__(((struct __pyx_obj_7pyarrow_3lib_IpcWriteOptions *)__pyx_v_self), __pyx_v_metadata_version, __pyx_v_allow_64bit, __pyx_v_use_legacy_format, __pyx_v_compression, __pyx_v_use_threads, __pyx_v_emit_dictionary_deltas, __pyx_v_unify_dictionaries);

                      /* "pyarrow/ipc.pxi":267
 *     # cdef block is in lib.pxd
 * 
 *     def __init__(self, *, metadata_version=MetadataVersion.V5,             # <<<<<<<<<<<<<<
 *                  bint allow_64bit=False, use_legacy_format=False,
 *                  compression=None, bint use_threads=True,
*/

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static int __pyx_pf_7pyarrow_3lib_15IpcWriteOptions___init__(struct __pyx_obj_7pyarrow_3lib_IpcWriteOptions *__pyx_v_self, PyObject *__pyx_v_metadata_version, int __pyx_v_allow_64bit, PyObject *__pyx_v_use_legacy_format, PyObject *__pyx_v_compression, int __pyx_v_use_threads, int __pyx_v_emit_dictionary_deltas, int __pyx_v_unify_dictionaries) {
                      int __pyx_r;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      int __pyx_t_2;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__init__", 0);

                      /* "pyarrow/ipc.pxi":272
 *                  bint emit_dictionary_deltas=False,
 *                  bint unify_dictionaries=False):
 *         self.c_options = CIpcWriteOptions.Defaults()             # <<<<<<<<<<<<<<
 *         self.allow_64bit = allow_64bit
 *         self.use_legacy_format = use_legacy_format
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "c_options");
                        __PYX_ERR(19, 272, __pyx_L1_error)
                      }
                      __pyx_v_self->c_options =  arrow::ipc::IpcWriteOptions::Defaults();

                      /* "pyarrow/ipc.pxi":273
 *                  bint unify_dictionaries=False):
 *         self.c_options = CIpcWriteOptions.Defaults()
 *         self.allow_64bit = allow_64bit             # <<<<<<<<<<<<<<
 *         self.use_legacy_format = use_legacy_format
 *         self.metadata_version = metadata_version
*/
                      __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_allow_64bit); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 273, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_allow_64bit, __pyx_t_1) < (0)) __PYX_ERR(19, 273, __pyx_L1_error)
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

                      /* "pyarrow/ipc.pxi":274
 *         self.c_options = CIpcWriteOptions.Defaults()
 *         self.allow_64bit = allow_64bit
 *         self.use_legacy_format = use_legacy_format             # <<<<<<<<<<<<<<
 *         self.metadata_version = metadata_version
 *         if compression is not None:
*/
                      if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_use_legacy_format, __pyx_v_use_legacy_format) < (0)) __PYX_ERR(19, 274, __pyx_L1_error)

                      /* "pyarrow/ipc.pxi":275
 *         self.allow_64bit = allow_64bit
 *         self.use_legacy_format = use_legacy_format
 *         self.metadata_version = metadata_version             # <<<<<<<<<<<<<<
 *         if compression is not None:
 *             self.compression = compression
*/
                      if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_metadata_version, __pyx_v_metadata_version) < (0)) __PYX_ERR(19, 275, __pyx_L1_error)

                      /* "pyarrow/ipc.pxi":276
 *         self.use_legacy_format = use_legacy_format
 *         self.metadata_version = metadata_version
 *         if compression is not None:             # <<<<<<<<<<<<<<
 *             self.compression = compression
 *         self.use_threads = use_threads
*/
                      __pyx_t_2 = (__pyx_v_compression != Py_None);
                      if (__pyx_t_2) {

                        /* "pyarrow/ipc.pxi":277
 *         self.metadata_version = metadata_version
 *         if compression is not None:
 *             self.compression = compression             # <<<<<<<<<<<<<<
 *         self.use_threads = use_threads
 *         self.emit_dictionary_deltas = emit_dictionary_deltas
*/
                        if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_compression, __pyx_v_compression) < (0)) __PYX_ERR(19, 277, __pyx_L1_error)

                        /* "pyarrow/ipc.pxi":276
 *         self.use_legacy_format = use_legacy_format
 *         self.metadata_version = metadata_version
 *         if compression is not None:             # <<<<<<<<<<<<<<
 *             self.compression = compression
 *         self.use_threads = use_threads
*/
                      }

                      /* "pyarrow/ipc.pxi":278
 *         if compression is not None:
 *             self.compression = compression
 *         self.use_threads = use_threads             # <<<<<<<<<<<<<<
 *         self.emit_dictionary_deltas = emit_dictionary_deltas
 *         self.unify_dictionaries = unify_dictionaries
*/
                      __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_use_threads); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 278, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_use_threads, __pyx_t_1) < (0)) __PYX_ERR(19, 278, __pyx_L1_error)
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

                      /* "pyarrow/ipc.pxi":279
 *             self.compression = compression
 *         self.use_threads = use_threads
 *         self.emit_dictionary_deltas = emit_dictionary_deltas             # <<<<<<<<<<<<<<
 *         self.unify_dictionaries = unify_dictionaries
 * 
*/
                      __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_emit_dictionary_deltas); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 279, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_emit_dictionary_deltas, __pyx_t_1) < (0)) __PYX_ERR(19, 279, __pyx_L1_error)
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

                      /* "pyarrow/ipc.pxi":280
 *         self.use_threads = use_threads
 *         self.emit_dictionary_deltas = emit_dictionary_deltas
 *         self.unify_dictionaries = unify_dictionaries             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
                      __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_unify_dictionaries); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 280, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_unify_dictionaries, __pyx_t_1) < (0)) __PYX_ERR(19, 280, __pyx_L1_error)
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

                      /* "pyarrow/ipc.pxi":267
 *     # cdef block is in lib.pxd
 * 
 *     def __init__(self, *, metadata_version=MetadataVersion.V5,             # <<<<<<<<<<<<<<
 *                  bint allow_64bit=False, use_legacy_format=False,
 *                  compression=None, bint use_threads=True,
*/

                      /* function exit code */
                      __pyx_r = 0;
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_AddTraceback("pyarrow.lib.IpcWriteOptions.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = -1;
                      __pyx_L0:;
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/ipc.pxi":282
 *         self.unify_dictionaries = unify_dictionaries
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def allow_64bit(self):
 *         return self.c_options.allow_64bit
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_15IpcWriteOptions_11allow_64bit_1__get__(PyObject *__pyx_v_self); /*proto*/
                    static PyObject *__pyx_pw_7pyarrow_3lib_15IpcWriteOptions_11allow_64bit_1__get__(PyObject *__pyx_v_self) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_15IpcWriteOptions_11allow_64bit___get__(((struct __pyx_obj_7pyarrow_3lib_IpcWriteOptions *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_15IpcWriteOptions_11allow_64bit___get__(struct __pyx_obj_7pyarrow_3lib_IpcWriteOptions *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__get__", 0);

                      /* "pyarrow/ipc.pxi":284
 *     @property
 *     def allow_64bit(self):
 *         return self.c_options.allow_64bit             # <<<<<<<<<<<<<<
 * 
 *     @allow_64bit.setter
*/
                      __Pyx_XDECREF(__pyx_r);
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "c_options");
                        __PYX_ERR(19, 284, __pyx_L1_error)
                      }
                      __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->c_options.allow_64bit); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 284, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_r = __pyx_t_1;
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/ipc.pxi":282
 *         self.unify_dictionaries = unify_dictionaries
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def allow_64bit(self):
 *         return self.c_options.allow_64bit
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_AddTraceback("pyarrow.lib.IpcWriteOptions.allow_64bit.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/ipc.pxi":286
 *         return self.c_options.allow_64bit
 * 
 *     @allow_64bit.setter             # <<<<<<<<<<<<<<
 *     def allow_64bit(self, bint value):
 *         self.c_options.allow_64bit = value
*/

                    /* Python wrapper */
                    static int __pyx_pw_7pyarrow_3lib_15IpcWriteOptions_11allow_64bit_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_value); /*proto*/
                    static int __pyx_pw_7pyarrow_3lib_15IpcWriteOptions_11allow_64bit_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_value) {
                      int __pyx_v_value;
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      int __pyx_r;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      assert(__pyx_arg_value); {
                        __pyx_v_value = __Pyx_PyObject_IsTrue(__pyx_arg_value); if (unlikely((__pyx_v_value == (int)-1) && PyErr_Occurred())) __PYX_ERR(19, 287, __pyx_L3_error)
                      }
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      __Pyx_AddTraceback("pyarrow.lib.IpcWriteOptions.allow_64bit.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return -1;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_15IpcWriteOptions_11allow_64bit_2__set__(((struct __pyx_obj_7pyarrow_3lib_IpcWriteOptions *)__pyx_v_self), ((int)__pyx_v_value));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static int __pyx_pf_7pyarrow_3lib_15IpcWriteOptions_11allow_64bit_2__set__(struct __pyx_obj_7pyarrow_3lib_IpcWriteOptions *__pyx_v_self, int __pyx_v_value) {
                      int __pyx_r;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;

                      /* "pyarrow/ipc.pxi":288
 *     @allow_64bit.setter
 *     def allow_64bit(self, bint value):
 *         self.c_options.allow_64bit = value             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "c_options");
                        __PYX_ERR(19, 288, __pyx_L1_error)
                      }
                      __pyx_v_self->c_options.allow_64bit = __pyx_v_value;

                      /* "pyarrow/ipc.pxi":286
 *         return self.c_options.allow_64bit
 * 
 *     @allow_64bit.setter             # <<<<<<<<<<<<<<
 *     def allow_64bit(self, bint value):
 *         self.c_options.allow_64bit = value
*/

                      /* function exit code */
                      __pyx_r = 0;
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib.IpcWriteOptions.allow_64bit.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = -1;
                      __pyx_L0:;
                      return __pyx_r;
                    }

                    /* "pyarrow/ipc.pxi":290
 *         self.c_options.allow_64bit = value
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def use_legacy_format(self):
 *         return self.c_options.write_legacy_ipc_format
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_15IpcWriteOptions_17use_legacy_format_1__get__(PyObject *__pyx_v_self); /*proto*/
                    static PyObject *__pyx_pw_7pyarrow_3lib_15IpcWriteOptions_17use_legacy_format_1__get__(PyObject *__pyx_v_self) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_15IpcWriteOptions_17use_legacy_format___get__(((struct __pyx_obj_7pyarrow_3lib_IpcWriteOptions *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_15IpcWriteOptions_17use_legacy_format___get__(struct __pyx_obj_7pyarrow_3lib_IpcWriteOptions *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__get__", 0);

                      /* "pyarrow/ipc.pxi":292
 *     @property
 *     def use_legacy_format(self):
 *         return self.c_options.write_legacy_ipc_format             # <<<<<<<<<<<<<<
 * 
 *     @use_legacy_format.setter
*/
                      __Pyx_XDECREF(__pyx_r);
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "c_options");
                        __PYX_ERR(19, 292, __pyx_L1_error)
                      }
                      __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->c_options.write_legacy_ipc_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 292, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_r = __pyx_t_1;
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/ipc.pxi":290
 *         self.c_options.allow_64bit = value
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def use_legacy_format(self):
 *         return self.c_options.write_legacy_ipc_format
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_AddTraceback("pyarrow.lib.IpcWriteOptions.use_legacy_format.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/ipc.pxi":294
 *         return self.c_options.write_legacy_ipc_format
 * 
 *     @use_legacy_format.setter             # <<<<<<<<<<<<<<
 *     def use_legacy_format(self, bint value):
 *         self.c_options.write_legacy_ipc_format = value
*/

                    /* Python wrapper */
                    static int __pyx_pw_7pyarrow_3lib_15IpcWriteOptions_17use_legacy_format_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_value); /*proto*/
                    static int __pyx_pw_7pyarrow_3lib_15IpcWriteOptions_17use_legacy_format_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_value) {
                      int __pyx_v_value;
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      int __pyx_r;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      assert(__pyx_arg_value); {
                        __pyx_v_value = __Pyx_PyObject_IsTrue(__pyx_arg_value); if (unlikely((__pyx_v_value == (int)-1) && PyErr_Occurred())) __PYX_ERR(19, 295, __pyx_L3_error)
                      }
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      __Pyx_AddTraceback("pyarrow.lib.IpcWriteOptions.use_legacy_format.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return -1;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_15IpcWriteOptions_17use_legacy_format_2__set__(((struct __pyx_obj_7pyarrow_3lib_IpcWriteOptions *)__pyx_v_self), ((int)__pyx_v_value));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static int __pyx_pf_7pyarrow_3lib_15IpcWriteOptions_17use_legacy_format_2__set__(struct __pyx_obj_7pyarrow_3lib_IpcWriteOptions *__pyx_v_self, int __pyx_v_value) {
                      int __pyx_r;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;

                      /* "pyarrow/ipc.pxi":296
 *     @use_legacy_format.setter
 *     def use_legacy_format(self, bint value):
 *         self.c_options.write_legacy_ipc_format = value             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "c_options");
                        __PYX_ERR(19, 296, __pyx_L1_error)
                      }
                      __pyx_v_self->c_options.write_legacy_ipc_format = __pyx_v_value;

                      /* "pyarrow/ipc.pxi":294
 *         return self.c_options.write_legacy_ipc_format
 * 
 *     @use_legacy_format.setter             # <<<<<<<<<<<<<<
 *     def use_legacy_format(self, bint value):
 *         self.c_options.write_legacy_ipc_format = value
*/

                      /* function exit code */
                      __pyx_r = 0;
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib.IpcWriteOptions.use_legacy_format.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = -1;
                      __pyx_L0:;
                      return __pyx_r;
                    }

                    /* "pyarrow/ipc.pxi":298
 *         self.c_options.write_legacy_ipc_format = value
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def metadata_version(self):
 *         return _wrap_metadata_version(self.c_options.metadata_version)
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_15IpcWriteOptions_16metadata_version_1__get__(PyObject *__pyx_v_self); /*proto*/
                    static PyObject *__pyx_pw_7pyarrow_3lib_15IpcWriteOptions_16metadata_version_1__get__(PyObject *__pyx_v_self) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_15IpcWriteOptions_16metadata_version___get__(((struct __pyx_obj_7pyarrow_3lib_IpcWriteOptions *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_15IpcWriteOptions_16metadata_version___get__(struct __pyx_obj_7pyarrow_3lib_IpcWriteOptions *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__get__", 0);

                      /* "pyarrow/ipc.pxi":300
 *     @property
 *     def metadata_version(self):
 *         return _wrap_metadata_version(self.c_options.metadata_version)             # <<<<<<<<<<<<<<
 * 
 *     @metadata_version.setter
*/
                      __Pyx_XDECREF(__pyx_r);
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "c_options");
                        __PYX_ERR(19, 300, __pyx_L1_error)
                      }
                      __pyx_t_1 = __pyx_f_7pyarrow_3lib__wrap_metadata_version(__pyx_v_self->c_options.metadata_version); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 300, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_r = __pyx_t_1;
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/ipc.pxi":298
 *         self.c_options.write_legacy_ipc_format = value
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def metadata_version(self):
 *         return _wrap_metadata_version(self.c_options.metadata_version)
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_AddTraceback("pyarrow.lib.IpcWriteOptions.metadata_version.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/ipc.pxi":302
 *         return _wrap_metadata_version(self.c_options.metadata_version)
 * 
 *     @metadata_version.setter             # <<<<<<<<<<<<<<
 *     def metadata_version(self, value):
 *         self.c_options.metadata_version = _unwrap_metadata_version(value)
*/

                    /* Python wrapper */
                    static int __pyx_pw_7pyarrow_3lib_15IpcWriteOptions_16metadata_version_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
                    static int __pyx_pw_7pyarrow_3lib_15IpcWriteOptions_16metadata_version_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      int __pyx_r;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_15IpcWriteOptions_16metadata_version_2__set__(((struct __pyx_obj_7pyarrow_3lib_IpcWriteOptions *)__pyx_v_self), ((PyObject *)__pyx_v_value));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static int __pyx_pf_7pyarrow_3lib_15IpcWriteOptions_16metadata_version_2__set__(struct __pyx_obj_7pyarrow_3lib_IpcWriteOptions *__pyx_v_self, PyObject *__pyx_v_value) {
                      int __pyx_r;
                      enum __pyx_t_7pyarrow_3lib_MetadataVersion __pyx_t_1;
                       arrow::ipc::MetadataVersion __pyx_t_2;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;

                      /* "pyarrow/ipc.pxi":304
 *     @metadata_version.setter
 *     def metadata_version(self, value):
 *         self.c_options.metadata_version = _unwrap_metadata_version(value)             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
                      __pyx_t_1 = ((enum __pyx_t_7pyarrow_3lib_MetadataVersion)__Pyx_PyLong_As_enum____pyx_t_7pyarrow_3lib_MetadataVersion(__pyx_v_value)); if (unlikely(PyErr_Occurred())) __PYX_ERR(19, 304, __pyx_L1_error)
                      __pyx_t_2 = __pyx_f_7pyarrow_3lib__unwrap_metadata_version(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(19, 304, __pyx_L1_error)
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "c_options");
                        __PYX_ERR(19, 304, __pyx_L1_error)
                      }
                      __pyx_v_self->c_options.metadata_version = __pyx_t_2;

                      /* "pyarrow/ipc.pxi":302
 *         return _wrap_metadata_version(self.c_options.metadata_version)
 * 
 *     @metadata_version.setter             # <<<<<<<<<<<<<<
 *     def metadata_version(self, value):
 *         self.c_options.metadata_version = _unwrap_metadata_version(value)
*/

                      /* function exit code */
                      __pyx_r = 0;
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib.IpcWriteOptions.metadata_version.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = -1;
                      __pyx_L0:;
                      return __pyx_r;
                    }

                    /* "pyarrow/ipc.pxi":306
 *         self.c_options.metadata_version = _unwrap_metadata_version(value)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def compression(self):
 *         return _get_compression_from_codec(self.c_options.codec)
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_15IpcWriteOptions_11compression_1__get__(PyObject *__pyx_v_self); /*proto*/
                    static PyObject *__pyx_pw_7pyarrow_3lib_15IpcWriteOptions_11compression_1__get__(PyObject *__pyx_v_self) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_15IpcWriteOptions_11compression___get__(((struct __pyx_obj_7pyarrow_3lib_IpcWriteOptions *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_15IpcWriteOptions_11compression___get__(struct __pyx_obj_7pyarrow_3lib_IpcWriteOptions *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__get__", 0);

                      /* "pyarrow/ipc.pxi":308
 *     @property
 *     def compression(self):
 *         return _get_compression_from_codec(self.c_options.codec)             # <<<<<<<<<<<<<<
 * 
 *     @compression.setter
*/
                      __Pyx_XDECREF(__pyx_r);
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "c_options");
                        __PYX_ERR(19, 308, __pyx_L1_error)
                      }
                      __pyx_t_1 = __pyx_f_7pyarrow_3lib__get_compression_from_codec(__pyx_v_self->c_options.codec); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 308, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_r = __pyx_t_1;
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/ipc.pxi":306
 *         self.c_options.metadata_version = _unwrap_metadata_version(value)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def compression(self):
 *         return _get_compression_from_codec(self.c_options.codec)
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_AddTraceback("pyarrow.lib.IpcWriteOptions.compression.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/ipc.pxi":310
 *         return _get_compression_from_codec(self.c_options.codec)
 * 
 *     @compression.setter             # <<<<<<<<<<<<<<
 *     def compression(self, value):
 *         if value is None:
*/

                    /* Python wrapper */
                    static int __pyx_pw_7pyarrow_3lib_15IpcWriteOptions_11compression_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
                    static int __pyx_pw_7pyarrow_3lib_15IpcWriteOptions_11compression_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      int __pyx_r;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_15IpcWriteOptions_11compression_2__set__(((struct __pyx_obj_7pyarrow_3lib_IpcWriteOptions *)__pyx_v_self), ((PyObject *)__pyx_v_value));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static int __pyx_pf_7pyarrow_3lib_15IpcWriteOptions_11compression_2__set__(struct __pyx_obj_7pyarrow_3lib_IpcWriteOptions *__pyx_v_self, PyObject *__pyx_v_value) {
                      enum  arrow::Compression::type __pyx_v_codec_type;
                      int __pyx_r;
                      __Pyx_RefNannyDeclarations
                      int __pyx_t_1;
                      PyObject *__pyx_t_2 = NULL;
                      enum  arrow::Compression::type __pyx_t_3;
                      PyObject *__pyx_t_4 = NULL;
                      size_t __pyx_t_5;
                      std::unique_ptr< arrow::util::Codec>  __pyx_t_6;
                      int __pyx_t_7;
                      std::shared_ptr< arrow::util::Codec>  __pyx_t_8;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__set__", 0);

                      /* "pyarrow/ipc.pxi":312
 *     @compression.setter
 *     def compression(self, value):
 *         if value is None:             # <<<<<<<<<<<<<<
 *             self.c_options.codec.reset()
 *         elif isinstance(value, str):
*/
                      __pyx_t_1 = (__pyx_v_value == Py_None);
                      if (__pyx_t_1) {

                        /* "pyarrow/ipc.pxi":313
 *     def compression(self, value):
 *         if value is None:
 *             self.c_options.codec.reset()             # <<<<<<<<<<<<<<
 *         elif isinstance(value, str):
 *             codec_type = _ensure_compression(value)
*/
                        if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "c_options");
                          __PYX_ERR(19, 313, __pyx_L1_error)
                        }
                        __pyx_v_self->c_options.codec.reset();

                        /* "pyarrow/ipc.pxi":312
 *     @compression.setter
 *     def compression(self, value):
 *         if value is None:             # <<<<<<<<<<<<<<
 *             self.c_options.codec.reset()
 *         elif isinstance(value, str):
*/
                        goto __pyx_L3;
                      }

                      /* "pyarrow/ipc.pxi":314
 *         if value is None:
 *             self.c_options.codec.reset()
 *         elif isinstance(value, str):             # <<<<<<<<<<<<<<
 *             codec_type = _ensure_compression(value)
 *             if codec_type != CCompressionType_ZSTD and codec_type != CCompressionType_LZ4_FRAME:
*/
                      __pyx_t_1 = PyUnicode_Check(__pyx_v_value); 
                      if (__pyx_t_1) {

                        /* "pyarrow/ipc.pxi":315
 *             self.c_options.codec.reset()
 *         elif isinstance(value, str):
 *             codec_type = _ensure_compression(value)             # <<<<<<<<<<<<<<
 *             if codec_type != CCompressionType_ZSTD and codec_type != CCompressionType_LZ4_FRAME:
 *                 raise ValueError("Compression type must be lz4, zstd or None")
*/
                        __pyx_t_2 = __pyx_v_value;
                        __Pyx_INCREF(__pyx_t_2);
                        if (!(likely(PyUnicode_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_2))) __PYX_ERR(19, 315, __pyx_L1_error)
                        __pyx_t_3 = __pyx_f_7pyarrow_3lib__ensure_compression(((PyObject*)__pyx_t_2)); if (unlikely(PyErr_Occurred())) __PYX_ERR(19, 315, __pyx_L1_error)
                        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                        __pyx_v_codec_type = __pyx_t_3;

                        /* "pyarrow/ipc.pxi":316
 *         elif isinstance(value, str):
 *             codec_type = _ensure_compression(value)
 *             if codec_type != CCompressionType_ZSTD and codec_type != CCompressionType_LZ4_FRAME:             # <<<<<<<<<<<<<<
 *                 raise ValueError("Compression type must be lz4, zstd or None")
 *             self.c_options.codec = shared_ptr[CCodec](GetResultValue(
*/
                        switch (__pyx_v_codec_type) {
                          case  arrow::Compression::ZSTD:
                          case  arrow::Compression::LZ4_FRAME:
                          __pyx_t_1 = 0;
                          break;
                          default:
                          __pyx_t_1 = 1;
                          break;
                        }
                        if (unlikely(__pyx_t_1)) {

                          /* "pyarrow/ipc.pxi":317
 *             codec_type = _ensure_compression(value)
 *             if codec_type != CCompressionType_ZSTD and codec_type != CCompressionType_LZ4_FRAME:
 *                 raise ValueError("Compression type must be lz4, zstd or None")             # <<<<<<<<<<<<<<
 *             self.c_options.codec = shared_ptr[CCodec](GetResultValue(
 *                 CCodec.Create(codec_type)).release())
*/
                          __pyx_t_4 = NULL;
                          __pyx_t_5 = 1;
                          {
                            PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Compression_type_must_be_lz4_zst};
                            __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                            if (unlikely(!__pyx_t_2)) __PYX_ERR(19, 317, __pyx_L1_error)
                            __Pyx_GOTREF(__pyx_t_2);
                          }
                          __Pyx_Raise(__pyx_t_2, 0, 0, 0);
                          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                          __PYX_ERR(19, 317, __pyx_L1_error)

                          /* "pyarrow/ipc.pxi":316
 *         elif isinstance(value, str):
 *             codec_type = _ensure_compression(value)
 *             if codec_type != CCompressionType_ZSTD and codec_type != CCompressionType_LZ4_FRAME:             # <<<<<<<<<<<<<<
 *                 raise ValueError("Compression type must be lz4, zstd or None")
 *             self.c_options.codec = shared_ptr[CCodec](GetResultValue(
*/
                        }

                        /* "pyarrow/ipc.pxi":318
 *             if codec_type != CCompressionType_ZSTD and codec_type != CCompressionType_LZ4_FRAME:
 *                 raise ValueError("Compression type must be lz4, zstd or None")
 *             self.c_options.codec = shared_ptr[CCodec](GetResultValue(             # <<<<<<<<<<<<<<
 *                 CCodec.Create(codec_type)).release())
 *         elif isinstance(value, Codec):
*/
                        __pyx_t_6 = arrow::py::GetResultValue<std::unique_ptr< arrow::util::Codec> >( arrow::util::Codec::Create(__pyx_v_codec_type)); if (unlikely(PyErr_Occurred())) __PYX_ERR(19, 318, __pyx_L1_error)

                        /* "pyarrow/ipc.pxi":319
 *                 raise ValueError("Compression type must be lz4, zstd or None")
 *             self.c_options.codec = shared_ptr[CCodec](GetResultValue(
 *                 CCodec.Create(codec_type)).release())             # <<<<<<<<<<<<<<
 *         elif isinstance(value, Codec):
 *             if value.name != "lz4" and value.name != "zstd":
*/
                        if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "c_options");
                          __PYX_ERR(19, 318, __pyx_L1_error)
                        }

                        /* "pyarrow/ipc.pxi":318
 *             if codec_type != CCompressionType_ZSTD and codec_type != CCompressionType_LZ4_FRAME:
 *                 raise ValueError("Compression type must be lz4, zstd or None")
 *             self.c_options.codec = shared_ptr[CCodec](GetResultValue(             # <<<<<<<<<<<<<<
 *                 CCodec.Create(codec_type)).release())
 *         elif isinstance(value, Codec):
*/
                        __pyx_v_self->c_options.codec = std::shared_ptr< arrow::util::Codec> (__pyx_t_6.release());

                        /* "pyarrow/ipc.pxi":314
 *         if value is None:
 *             self.c_options.codec.reset()
 *         elif isinstance(value, str):             # <<<<<<<<<<<<<<
 *             codec_type = _ensure_compression(value)
 *             if codec_type != CCompressionType_ZSTD and codec_type != CCompressionType_LZ4_FRAME:
*/
                        goto __pyx_L3;
                      }

                      /* "pyarrow/ipc.pxi":320
 *             self.c_options.codec = shared_ptr[CCodec](GetResultValue(
 *                 CCodec.Create(codec_type)).release())
 *         elif isinstance(value, Codec):             # <<<<<<<<<<<<<<
 *             if value.name != "lz4" and value.name != "zstd":
 *                 raise ValueError("Compression type must be lz4, zstd or None")
*/
                      __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_value, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Codec); 
                      if (likely(__pyx_t_1)) {

                        /* "pyarrow/ipc.pxi":321
 *                 CCodec.Create(codec_type)).release())
 *         elif isinstance(value, Codec):
 *             if value.name != "lz4" and value.name != "zstd":             # <<<<<<<<<<<<<<
 *                 raise ValueError("Compression type must be lz4, zstd or None")
 *             self.c_options.codec = (<Codec>value).wrapped
*/
                        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(19, 321, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_2);
                        __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_lz4_2, Py_NE)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(19, 321, __pyx_L1_error)
                        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                        if (__pyx_t_7) {
                        } else {
                          __pyx_t_1 = __pyx_t_7;
                          goto __pyx_L6_bool_binop_done;
                        }
                        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(19, 321, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_2);
                        __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_zstd, Py_NE)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(19, 321, __pyx_L1_error)
                        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                        __pyx_t_1 = __pyx_t_7;
                        __pyx_L6_bool_binop_done:;
                        if (unlikely(__pyx_t_1)) {

                          /* "pyarrow/ipc.pxi":322
 *         elif isinstance(value, Codec):
 *             if value.name != "lz4" and value.name != "zstd":
 *                 raise ValueError("Compression type must be lz4, zstd or None")             # <<<<<<<<<<<<<<
 *             self.c_options.codec = (<Codec>value).wrapped
 *         else:
*/
                          __pyx_t_4 = NULL;
                          __pyx_t_5 = 1;
                          {
                            PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Compression_type_must_be_lz4_zst};
                            __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                            if (unlikely(!__pyx_t_2)) __PYX_ERR(19, 322, __pyx_L1_error)
                            __Pyx_GOTREF(__pyx_t_2);
                          }
                          __Pyx_Raise(__pyx_t_2, 0, 0, 0);
                          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                          __PYX_ERR(19, 322, __pyx_L1_error)

                          /* "pyarrow/ipc.pxi":321
 *                 CCodec.Create(codec_type)).release())
 *         elif isinstance(value, Codec):
 *             if value.name != "lz4" and value.name != "zstd":             # <<<<<<<<<<<<<<
 *                 raise ValueError("Compression type must be lz4, zstd or None")
 *             self.c_options.codec = (<Codec>value).wrapped
*/
                        }

                        /* "pyarrow/ipc.pxi":323
 *             if value.name != "lz4" and value.name != "zstd":
 *                 raise ValueError("Compression type must be lz4, zstd or None")
 *             self.c_options.codec = (<Codec>value).wrapped             # <<<<<<<<<<<<<<
 *         else:
 *             raise TypeError(
*/
                        if (unlikely(__pyx_v_value == Py_None)) {
                          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "wrapped");
                          __PYX_ERR(19, 323, __pyx_L1_error)
                        }
                        __pyx_t_8 = ((struct __pyx_obj_7pyarrow_3lib_Codec *)__pyx_v_value)->wrapped;
                        if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "c_options");
                          __PYX_ERR(19, 323, __pyx_L1_error)
                        }
                        __pyx_v_self->c_options.codec = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_8);

                        /* "pyarrow/ipc.pxi":320
 *             self.c_options.codec = shared_ptr[CCodec](GetResultValue(
 *                 CCodec.Create(codec_type)).release())
 *         elif isinstance(value, Codec):             # <<<<<<<<<<<<<<
 *             if value.name != "lz4" and value.name != "zstd":
 *                 raise ValueError("Compression type must be lz4, zstd or None")
*/
                        goto __pyx_L3;
                      }

                      /* "pyarrow/ipc.pxi":325
 *             self.c_options.codec = (<Codec>value).wrapped
 *         else:
 *             raise TypeError(             # <<<<<<<<<<<<<<
 *                 "Property `compression` must be None, str, or pyarrow.Codec")
 * 
*/
                      /*else*/ {
                        __pyx_t_4 = NULL;
                        __pyx_t_5 = 1;
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Property_compression_must_be_Non};
                          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                          if (unlikely(!__pyx_t_2)) __PYX_ERR(19, 325, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_2);
                        }
                        __Pyx_Raise(__pyx_t_2, 0, 0, 0);
                        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                        __PYX_ERR(19, 325, __pyx_L1_error)
                      }
                      __pyx_L3:;

                      /* "pyarrow/ipc.pxi":310
 *         return _get_compression_from_codec(self.c_options.codec)
 * 
 *     @compression.setter             # <<<<<<<<<<<<<<
 *     def compression(self, value):
 *         if value is None:
*/

                      /* function exit code */
                      __pyx_r = 0;
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_XDECREF(__pyx_t_4);
                      __Pyx_AddTraceback("pyarrow.lib.IpcWriteOptions.compression.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = -1;
                      __pyx_L0:;
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/ipc.pxi":328
 *                 "Property `compression` must be None, str, or pyarrow.Codec")
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def use_threads(self):
 *         return self.c_options.use_threads
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_15IpcWriteOptions_11use_threads_1__get__(PyObject *__pyx_v_self); /*proto*/
                    static PyObject *__pyx_pw_7pyarrow_3lib_15IpcWriteOptions_11use_threads_1__get__(PyObject *__pyx_v_self) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_15IpcWriteOptions_11use_threads___get__(((struct __pyx_obj_7pyarrow_3lib_IpcWriteOptions *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_15IpcWriteOptions_11use_threads___get__(struct __pyx_obj_7pyarrow_3lib_IpcWriteOptions *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__get__", 0);

                      /* "pyarrow/ipc.pxi":330
 *     @property
 *     def use_threads(self):
 *         return self.c_options.use_threads             # <<<<<<<<<<<<<<
 * 
 *     @use_threads.setter
*/
                      __Pyx_XDECREF(__pyx_r);
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "c_options");
                        __PYX_ERR(19, 330, __pyx_L1_error)
                      }
                      __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->c_options.use_threads); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 330, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_r = __pyx_t_1;
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/ipc.pxi":328
 *                 "Property `compression` must be None, str, or pyarrow.Codec")
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def use_threads(self):
 *         return self.c_options.use_threads
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_AddTraceback("pyarrow.lib.IpcWriteOptions.use_threads.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/ipc.pxi":332
 *         return self.c_options.use_threads
 * 
 *     @use_threads.setter             # <<<<<<<<<<<<<<
 *     def use_threads(self, bint value):
 *         self.c_options.use_threads = value
*/

                    /* Python wrapper */
                    static int __pyx_pw_7pyarrow_3lib_15IpcWriteOptions_11use_threads_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_value); /*proto*/
                    static int __pyx_pw_7pyarrow_3lib_15IpcWriteOptions_11use_threads_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_value) {
                      int __pyx_v_value;
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      int __pyx_r;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      assert(__pyx_arg_value); {
                        __pyx_v_value = __Pyx_PyObject_IsTrue(__pyx_arg_value); if (unlikely((__pyx_v_value == (int)-1) && PyErr_Occurred())) __PYX_ERR(19, 333, __pyx_L3_error)
                      }
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      __Pyx_AddTraceback("pyarrow.lib.IpcWriteOptions.use_threads.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return -1;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_15IpcWriteOptions_11use_threads_2__set__(((struct __pyx_obj_7pyarrow_3lib_IpcWriteOptions *)__pyx_v_self), ((int)__pyx_v_value));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static int __pyx_pf_7pyarrow_3lib_15IpcWriteOptions_11use_threads_2__set__(struct __pyx_obj_7pyarrow_3lib_IpcWriteOptions *__pyx_v_self, int __pyx_v_value) {
                      int __pyx_r;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;

                      /* "pyarrow/ipc.pxi":334
 *     @use_threads.setter
 *     def use_threads(self, bint value):
 *         self.c_options.use_threads = value             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "c_options");
                        __PYX_ERR(19, 334, __pyx_L1_error)
                      }
                      __pyx_v_self->c_options.use_threads = __pyx_v_value;

                      /* "pyarrow/ipc.pxi":332
 *         return self.c_options.use_threads
 * 
 *     @use_threads.setter             # <<<<<<<<<<<<<<
 *     def use_threads(self, bint value):
 *         self.c_options.use_threads = value
*/

                      /* function exit code */
                      __pyx_r = 0;
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib.IpcWriteOptions.use_threads.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = -1;
                      __pyx_L0:;
                      return __pyx_r;
                    }

                    /* "pyarrow/ipc.pxi":336
 *         self.c_options.use_threads = value
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def emit_dictionary_deltas(self):
 *         return self.c_options.emit_dictionary_deltas
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_15IpcWriteOptions_22emit_dictionary_deltas_1__get__(PyObject *__pyx_v_self); /*proto*/
                    static PyObject *__pyx_pw_7pyarrow_3lib_15IpcWriteOptions_22emit_dictionary_deltas_1__get__(PyObject *__pyx_v_self) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_15IpcWriteOptions_22emit_dictionary_deltas___get__(((struct __pyx_obj_7pyarrow_3lib_IpcWriteOptions *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_15IpcWriteOptions_22emit_dictionary_deltas___get__(struct __pyx_obj_7pyarrow_3lib_IpcWriteOptions *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__get__", 0);

                      /* "pyarrow/ipc.pxi":338
 *     @property
 *     def emit_dictionary_deltas(self):
 *         return self.c_options.emit_dictionary_deltas             # <<<<<<<<<<<<<<
 * 
 *     @emit_dictionary_deltas.setter
*/
                      __Pyx_XDECREF(__pyx_r);
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "c_options");
                        __PYX_ERR(19, 338, __pyx_L1_error)
                      }
                      __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->c_options.emit_dictionary_deltas); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 338, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_r = __pyx_t_1;
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/ipc.pxi":336
 *         self.c_options.use_threads = value
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def emit_dictionary_deltas(self):
 *         return self.c_options.emit_dictionary_deltas
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_AddTraceback("pyarrow.lib.IpcWriteOptions.emit_dictionary_deltas.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/ipc.pxi":340
 *         return self.c_options.emit_dictionary_deltas
 * 
 *     @emit_dictionary_deltas.setter             # <<<<<<<<<<<<<<
 *     def emit_dictionary_deltas(self, bint value):
 *         self.c_options.emit_dictionary_deltas = value
*/

                    /* Python wrapper */
                    static int __pyx_pw_7pyarrow_3lib_15IpcWriteOptions_22emit_dictionary_deltas_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_value); /*proto*/
                    static int __pyx_pw_7pyarrow_3lib_15IpcWriteOptions_22emit_dictionary_deltas_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_value) {
                      int __pyx_v_value;
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      int __pyx_r;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      assert(__pyx_arg_value); {
                        __pyx_v_value = __Pyx_PyObject_IsTrue(__pyx_arg_value); if (unlikely((__pyx_v_value == (int)-1) && PyErr_Occurred())) __PYX_ERR(19, 341, __pyx_L3_error)
                      }
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      __Pyx_AddTraceback("pyarrow.lib.IpcWriteOptions.emit_dictionary_deltas.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return -1;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_15IpcWriteOptions_22emit_dictionary_deltas_2__set__(((struct __pyx_obj_7pyarrow_3lib_IpcWriteOptions *)__pyx_v_self), ((int)__pyx_v_value));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static int __pyx_pf_7pyarrow_3lib_15IpcWriteOptions_22emit_dictionary_deltas_2__set__(struct __pyx_obj_7pyarrow_3lib_IpcWriteOptions *__pyx_v_self, int __pyx_v_value) {
                      int __pyx_r;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;

                      /* "pyarrow/ipc.pxi":342
 *     @emit_dictionary_deltas.setter
 *     def emit_dictionary_deltas(self, bint value):
 *         self.c_options.emit_dictionary_deltas = value             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "c_options");
                        __PYX_ERR(19, 342, __pyx_L1_error)
                      }
                      __pyx_v_self->c_options.emit_dictionary_deltas = __pyx_v_value;

                      /* "pyarrow/ipc.pxi":340
 *         return self.c_options.emit_dictionary_deltas
 * 
 *     @emit_dictionary_deltas.setter             # <<<<<<<<<<<<<<
 *     def emit_dictionary_deltas(self, bint value):
 *         self.c_options.emit_dictionary_deltas = value
*/

                      /* function exit code */
                      __pyx_r = 0;
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib.IpcWriteOptions.emit_dictionary_deltas.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = -1;
                      __pyx_L0:;
                      return __pyx_r;
                    }

                    /* "pyarrow/ipc.pxi":344
 *         self.c_options.emit_dictionary_deltas = value
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def unify_dictionaries(self):
 *         return self.c_options.unify_dictionaries
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_15IpcWriteOptions_18unify_dictionaries_1__get__(PyObject *__pyx_v_self); /*proto*/
                    static PyObject *__pyx_pw_7pyarrow_3lib_15IpcWriteOptions_18unify_dictionaries_1__get__(PyObject *__pyx_v_self) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_15IpcWriteOptions_18unify_dictionaries___get__(((struct __pyx_obj_7pyarrow_3lib_IpcWriteOptions *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_15IpcWriteOptions_18unify_dictionaries___get__(struct __pyx_obj_7pyarrow_3lib_IpcWriteOptions *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__get__", 0);

                      /* "pyarrow/ipc.pxi":346
 *     @property
 *     def unify_dictionaries(self):
 *         return self.c_options.unify_dictionaries             # <<<<<<<<<<<<<<
 * 
 *     @unify_dictionaries.setter
*/
                      __Pyx_XDECREF(__pyx_r);
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "c_options");
                        __PYX_ERR(19, 346, __pyx_L1_error)
                      }
                      __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->c_options.unify_dictionaries); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 346, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_r = __pyx_t_1;
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/ipc.pxi":344
 *         self.c_options.emit_dictionary_deltas = value
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def unify_dictionaries(self):
 *         return self.c_options.unify_dictionaries
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_AddTraceback("pyarrow.lib.IpcWriteOptions.unify_dictionaries.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/ipc.pxi":348
 *         return self.c_options.unify_dictionaries
 * 
 *     @unify_dictionaries.setter             # <<<<<<<<<<<<<<
 *     def unify_dictionaries(self, bint value):
 *         self.c_options.unify_dictionaries = value
*/

                    /* Python wrapper */
                    static int __pyx_pw_7pyarrow_3lib_15IpcWriteOptions_18unify_dictionaries_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_value); /*proto*/
                    static int __pyx_pw_7pyarrow_3lib_15IpcWriteOptions_18unify_dictionaries_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_value) {
                      int __pyx_v_value;
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      int __pyx_r;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      assert(__pyx_arg_value); {
                        __pyx_v_value = __Pyx_PyObject_IsTrue(__pyx_arg_value); if (unlikely((__pyx_v_value == (int)-1) && PyErr_Occurred())) __PYX_ERR(19, 349, __pyx_L3_error)
                      }
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      __Pyx_AddTraceback("pyarrow.lib.IpcWriteOptions.unify_dictionaries.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return -1;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_15IpcWriteOptions_18unify_dictionaries_2__set__(((struct __pyx_obj_7pyarrow_3lib_IpcWriteOptions *)__pyx_v_self), ((int)__pyx_v_value));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static int __pyx_pf_7pyarrow_3lib_15IpcWriteOptions_18unify_dictionaries_2__set__(struct __pyx_obj_7pyarrow_3lib_IpcWriteOptions *__pyx_v_self, int __pyx_v_value) {
                      int __pyx_r;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;

                      /* "pyarrow/ipc.pxi":350
 *     @unify_dictionaries.setter
 *     def unify_dictionaries(self, bint value):
 *         self.c_options.unify_dictionaries = value             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "c_options");
                        __PYX_ERR(19, 350, __pyx_L1_error)
                      }
                      __pyx_v_self->c_options.unify_dictionaries = __pyx_v_value;

                      /* "pyarrow/ipc.pxi":348
 *         return self.c_options.unify_dictionaries
 * 
 *     @unify_dictionaries.setter             # <<<<<<<<<<<<<<
 *     def unify_dictionaries(self, bint value):
 *         self.c_options.unify_dictionaries = value
*/

                      /* function exit code */
                      __pyx_r = 0;
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib.IpcWriteOptions.unify_dictionaries.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = -1;
                      __pyx_L0:;
                      return __pyx_r;
                    }

                    /* "pyarrow/ipc.pxi":352
 *         self.c_options.unify_dictionaries = value
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         compression_repr = f"compression=\"{self.compression}\" " \
 *             if self.compression is not None else ""
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_15IpcWriteOptions_3__repr__(PyObject *__pyx_v_self); /*proto*/
                    static PyObject *__pyx_pw_7pyarrow_3lib_15IpcWriteOptions_3__repr__(PyObject *__pyx_v_self) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_15IpcWriteOptions_2__repr__(((struct __pyx_obj_7pyarrow_3lib_IpcWriteOptions *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_15IpcWriteOptions_2__repr__(struct __pyx_obj_7pyarrow_3lib_IpcWriteOptions *__pyx_v_self) {
                      PyObject *__pyx_v_compression_repr = NULL;
                      PyObject *__pyx_v_metadata_version = NULL;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      int __pyx_t_3;
                      PyObject *__pyx_t_4 = NULL;
                      PyObject *__pyx_t_5[3];
                      PyObject *__pyx_t_6 = NULL;
                      size_t __pyx_t_7;
                      PyObject *__pyx_t_8 = NULL;
                      PyObject *__pyx_t_9 = NULL;
                      PyObject *__pyx_t_10 = NULL;
                      PyObject *__pyx_t_11 = NULL;
                      PyObject *__pyx_t_12[15];
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__repr__", 0);

                      /* "pyarrow/ipc.pxi":354
 *     def __repr__(self):
 *         compression_repr = f"compression=\"{self.compression}\" " \
 *             if self.compression is not None else ""             # <<<<<<<<<<<<<<
 * 
 *         metadata_version = MetadataVersion(self.metadata_version).name
*/
                      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_compression); if (unlikely(!__pyx_t_2)) __PYX_ERR(19, 354, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_2);
                      __pyx_t_3 = (__pyx_t_2 != Py_None);
                      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                      if (__pyx_t_3) {

                        /* "pyarrow/ipc.pxi":353
 * 
 *     def __repr__(self):
 *         compression_repr = f"compression=\"{self.compression}\" " \             # <<<<<<<<<<<<<<
 *             if self.compression is not None else ""
 * 
*/
                        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_compression); if (unlikely(!__pyx_t_2)) __PYX_ERR(19, 353, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_2);
                        __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_2, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(19, 353, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_4);
                        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                        __pyx_t_5[0] = __pyx_mstate_global->__pyx_kp_u_compression_2;
                        __pyx_t_5[1] = __pyx_t_4;
                        __pyx_t_5[2] = __pyx_mstate_global->__pyx_kp_u__21;
                        __pyx_t_2 = __Pyx_PyUnicode_Join(__pyx_t_5, 3, 13 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + 2, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4));
                        if (unlikely(!__pyx_t_2)) __PYX_ERR(19, 353, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_2);
                        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                        __pyx_t_1 = __pyx_t_2;
                        __pyx_t_2 = 0;
                      } else {
                        __Pyx_INCREF(__pyx_mstate_global->__pyx_kp_u__15);
                        __pyx_t_1 = __pyx_mstate_global->__pyx_kp_u__15;
                      }
                      __pyx_v_compression_repr = ((PyObject*)__pyx_t_1);
                      __pyx_t_1 = 0;

                      /* "pyarrow/ipc.pxi":356
 *             if self.compression is not None else ""
 * 
 *         metadata_version = MetadataVersion(self.metadata_version).name             # <<<<<<<<<<<<<<
 * 
 *         return (f"<pyarrow.ipc.IpcWriteOptions "
*/
                      __pyx_t_2 = NULL;
                      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_MetadataVersion); if (unlikely(!__pyx_t_4)) __PYX_ERR(19, 356, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_4);
                      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_metadata_version); if (unlikely(!__pyx_t_6)) __PYX_ERR(19, 356, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_6);
                      __pyx_t_7 = 1;
                      #if CYTHON_UNPACK_METHODS
                      if (unlikely(PyMethod_Check(__pyx_t_4))) {
                        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
                        assert(__pyx_t_2);
                        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
                        __Pyx_INCREF(__pyx_t_2);
                        __Pyx_INCREF(__pyx__function);
                        __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
                        __pyx_t_7 = 0;
                      }
                      #endif
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_6};
                        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 356, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(19, 356, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_4);
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      __pyx_v_metadata_version = __pyx_t_4;
                      __pyx_t_4 = 0;

                      /* "pyarrow/ipc.pxi":358
 *         metadata_version = MetadataVersion(self.metadata_version).name
 * 
 *         return (f"<pyarrow.ipc.IpcWriteOptions "             # <<<<<<<<<<<<<<
 *                 f"allow_64bit={self.allow_64bit} "
 *                 f"use_legacy_format={self.use_legacy_format} "
*/
                      __Pyx_XDECREF(__pyx_r);

                      /* "pyarrow/ipc.pxi":359
 * 
 *         return (f"<pyarrow.ipc.IpcWriteOptions "
 *                 f"allow_64bit={self.allow_64bit} "             # <<<<<<<<<<<<<<
 *                 f"use_legacy_format={self.use_legacy_format} "
 *                 f"metadata_version={metadata_version} "
*/
                      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_allow_64bit); if (unlikely(!__pyx_t_4)) __PYX_ERR(19, 359, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_4);
                      __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 359, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

                      /* "pyarrow/ipc.pxi":360
 *         return (f"<pyarrow.ipc.IpcWriteOptions "
 *                 f"allow_64bit={self.allow_64bit} "
 *                 f"use_legacy_format={self.use_legacy_format} "             # <<<<<<<<<<<<<<
 *                 f"metadata_version={metadata_version} "
 *                 f"{compression_repr}"
*/
                      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_use_legacy_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(19, 360, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_4);
                      __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(19, 360, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_6);
                      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

                      /* "pyarrow/ipc.pxi":361
 *                 f"allow_64bit={self.allow_64bit} "
 *                 f"use_legacy_format={self.use_legacy_format} "
 *                 f"metadata_version={metadata_version} "             # <<<<<<<<<<<<<<
 *                 f"{compression_repr}"
 *                 f"use_threads={self.use_threads} "
*/
                      __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_v_metadata_version, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(19, 361, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_4);

                      /* "pyarrow/ipc.pxi":362
 *                 f"use_legacy_format={self.use_legacy_format} "
 *                 f"metadata_version={metadata_version} "
 *                 f"{compression_repr}"             # <<<<<<<<<<<<<<
 *                 f"use_threads={self.use_threads} "
 *                 f"emit_dictionary_deltas={self.emit_dictionary_deltas} "
*/
                      __pyx_t_2 = __Pyx_PyUnicode_Unicode(__pyx_v_compression_repr); if (unlikely(!__pyx_t_2)) __PYX_ERR(19, 362, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_2);

                      /* "pyarrow/ipc.pxi":363
 *                 f"metadata_version={metadata_version} "
 *                 f"{compression_repr}"
 *                 f"use_threads={self.use_threads} "             # <<<<<<<<<<<<<<
 *                 f"emit_dictionary_deltas={self.emit_dictionary_deltas} "
 *                 f"unify_dictionaries={self.unify_dictionaries}>")
*/
                      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_use_threads); if (unlikely(!__pyx_t_8)) __PYX_ERR(19, 363, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_8);
                      __pyx_t_9 = __Pyx_PyObject_FormatSimple(__pyx_t_8, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(19, 363, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_9);
                      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

                      /* "pyarrow/ipc.pxi":364
 *                 f"{compression_repr}"
 *                 f"use_threads={self.use_threads} "
 *                 f"emit_dictionary_deltas={self.emit_dictionary_deltas} "             # <<<<<<<<<<<<<<
 *                 f"unify_dictionaries={self.unify_dictionaries}>")
 * 
*/
                      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_emit_dictionary_deltas); if (unlikely(!__pyx_t_8)) __PYX_ERR(19, 364, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_8);
                      __pyx_t_10 = __Pyx_PyObject_FormatSimple(__pyx_t_8, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_10)) __PYX_ERR(19, 364, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_10);
                      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

                      /* "pyarrow/ipc.pxi":365
 *                 f"use_threads={self.use_threads} "
 *                 f"emit_dictionary_deltas={self.emit_dictionary_deltas} "
 *                 f"unify_dictionaries={self.unify_dictionaries}>")             # <<<<<<<<<<<<<<
 * 
 * 
*/
                      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_unify_dictionaries); if (unlikely(!__pyx_t_8)) __PYX_ERR(19, 365, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_8);
                      __pyx_t_11 = __Pyx_PyObject_FormatSimple(__pyx_t_8, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_11)) __PYX_ERR(19, 365, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_11);
                      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                      __pyx_t_12[0] = __pyx_mstate_global->__pyx_kp_u_pyarrow_ipc_IpcWriteOptions_all;
                      __pyx_t_12[1] = __pyx_t_1;
                      __pyx_t_12[2] = __pyx_mstate_global->__pyx_kp_u_use_legacy_format_2;
                      __pyx_t_12[3] = __pyx_t_6;
                      __pyx_t_12[4] = __pyx_mstate_global->__pyx_kp_u_metadata_version_2;
                      __pyx_t_12[5] = __pyx_t_4;
                      __pyx_t_12[6] = __pyx_mstate_global->__pyx_kp_u__22;
                      __pyx_t_12[7] = __pyx_t_2;
                      __pyx_t_12[8] = __pyx_mstate_global->__pyx_kp_u_use_threads_4;
                      __pyx_t_12[9] = __pyx_t_9;
                      __pyx_t_12[10] = __pyx_mstate_global->__pyx_kp_u_emit_dictionary_deltas_2;
                      __pyx_t_12[11] = __pyx_t_10;
                      __pyx_t_12[12] = __pyx_mstate_global->__pyx_kp_u_unify_dictionaries_2;
                      __pyx_t_12[13] = __pyx_t_11;
                      __pyx_t_12[14] = __pyx_mstate_global->__pyx_kp_u__5;

                      /* "pyarrow/ipc.pxi":358
 *         metadata_version = MetadataVersion(self.metadata_version).name
 * 
 *         return (f"<pyarrow.ipc.IpcWriteOptions "             # <<<<<<<<<<<<<<
 *                 f"allow_64bit={self.allow_64bit} "
 *                 f"use_legacy_format={self.use_legacy_format} "
*/
                      __pyx_t_8 = __Pyx_PyUnicode_Join(__pyx_t_12, 15, 41 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1) + 19 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6) + 18 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + 1 * 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2) + 12 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9) + 24 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_10) + 20 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_11), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_10) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_11));
                      if (unlikely(!__pyx_t_8)) __PYX_ERR(19, 358, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_8);
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
                      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
                      __pyx_r = __pyx_t_8;
                      __pyx_t_8 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/ipc.pxi":352
 *         self.c_options.unify_dictionaries = value
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         compression_repr = f"compression=\"{self.compression}\" " \
 *             if self.compression is not None else ""
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_XDECREF(__pyx_t_4);
                      __Pyx_XDECREF(__pyx_t_6);
                      __Pyx_XDECREF(__pyx_t_8);
                      __Pyx_XDECREF(__pyx_t_9);
                      __Pyx_XDECREF(__pyx_t_10);
                      __Pyx_XDECREF(__pyx_t_11);
                      __Pyx_AddTraceback("pyarrow.lib.IpcWriteOptions.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XDECREF(__pyx_v_compression_repr);
                      __Pyx_XDECREF(__pyx_v_metadata_version);
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.c_options cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_15IpcWriteOptions_5__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_15IpcWriteOptions_4__reduce_cython__, "IpcWriteOptions.__reduce_cython__(self)");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_15IpcWriteOptions_5__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15IpcWriteOptions_5__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15IpcWriteOptions_4__reduce_cython__};
                    static PyObject *__pyx_pw_7pyarrow_3lib_15IpcWriteOptions_5__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; }
                      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                      if (unlikely(__pyx_kwds_len < 0)) return NULL;
                      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;}
                      __pyx_r = __pyx_pf_7pyarrow_3lib_15IpcWriteOptions_4__reduce_cython__(((struct __pyx_obj_7pyarrow_3lib_IpcWriteOptions *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_15IpcWriteOptions_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_IpcWriteOptions *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__reduce_cython__", 0);

                      /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "self.c_options cannot be converted to a Python object for pickling"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "self.c_options cannot be converted to a Python object for pickling"
*/
                      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_self_c_options_cannot_be_convert, 0, 0);
                      __PYX_ERR(7, 2, __pyx_L1_error)

                      /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.c_options cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib.IpcWriteOptions.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "self.c_options cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.c_options cannot be converted to a Python object for pickling"
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_15IpcWriteOptions_7__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_15IpcWriteOptions_6__setstate_cython__, "IpcWriteOptions.__setstate_cython__(self, __pyx_state)");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_15IpcWriteOptions_7__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15IpcWriteOptions_7__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15IpcWriteOptions_6__setstate_cython__};
                    static PyObject *__pyx_pw_7pyarrow_3lib_15IpcWriteOptions_7__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[1] = {0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(7, 3, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(7, 3, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(7, 3, __pyx_L3_error)
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(7, 3, __pyx_L3_error) }
                          }
                        } else if (unlikely(__pyx_nargs != 1)) {
                          goto __pyx_L5_argtuple_error;
                        } else {
                          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(7, 3, __pyx_L3_error)
                        }
                        __pyx_v___pyx_state = values[0];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(7, 3, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.IpcWriteOptions.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_15IpcWriteOptions_6__setstate_cython__(((struct __pyx_obj_7pyarrow_3lib_IpcWriteOptions *)__pyx_v_self), __pyx_v___pyx_state);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_15IpcWriteOptions_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_IpcWriteOptions *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__setstate_cython__", 0);

                      /* "(tree fragment)":4
 *     raise TypeError, "self.c_options cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "self.c_options cannot be converted to a Python object for pickling"             # <<<<<<<<<<<<<<
*/
                      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_self_c_options_cannot_be_convert, 0, 0);
                      __PYX_ERR(7, 4, __pyx_L1_error)

                      /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "self.c_options cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.c_options cannot be converted to a Python object for pickling"
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib.IpcWriteOptions.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/ipc.pxi":368
 * 
 * 
 * cdef IpcWriteOptions wrap_ipc_write_options(CIpcWriteOptions c):             # <<<<<<<<<<<<<<
 *     """Get Python's IpcWriteOptions from C++'s IpcWriteOptions
 *     """
*/

                    static struct __pyx_obj_7pyarrow_3lib_IpcWriteOptions *__pyx_f_7pyarrow_3lib_wrap_ipc_write_options( arrow::ipc::IpcWriteOptions __pyx_v_c) {
                      struct __pyx_obj_7pyarrow_3lib_IpcWriteOptions *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      PyObject *__pyx_t_3 = NULL;
                      PyObject *__pyx_t_4 = NULL;
                      PyObject *__pyx_t_5 = NULL;
                      PyObject *__pyx_t_6 = NULL;
                      PyObject *__pyx_t_7 = NULL;
                      PyObject *__pyx_t_8 = NULL;
                      PyObject *__pyx_t_9 = NULL;
                      size_t __pyx_t_10;
                      PyObject *__pyx_t_11 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("wrap_ipc_write_options", 0);

                      /* "pyarrow/ipc.pxi":372
 *     """
 * 
 *     return IpcWriteOptions(             # <<<<<<<<<<<<<<
 *         metadata_version=c.metadata_version,
 *         allow_64bit=c.allow_64bit,
*/
                      __Pyx_XDECREF((PyObject *)__pyx_r);
                      __pyx_t_2 = NULL;

                      /* "pyarrow/ipc.pxi":373
 * 
 *     return IpcWriteOptions(
 *         metadata_version=c.metadata_version,             # <<<<<<<<<<<<<<
 *         allow_64bit=c.allow_64bit,
 *         use_legacy_format=c.write_legacy_ipc_format,
*/
                      __pyx_t_3 = __Pyx_PyLong_From___arrow_3a__3a_ipc_3a__3a_MetadataVersion(__pyx_v_c.metadata_version); if (unlikely(!__pyx_t_3)) __PYX_ERR(19, 373, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_3);

                      /* "pyarrow/ipc.pxi":374
 *     return IpcWriteOptions(
 *         metadata_version=c.metadata_version,
 *         allow_64bit=c.allow_64bit,             # <<<<<<<<<<<<<<
 *         use_legacy_format=c.write_legacy_ipc_format,
 *         compression=_get_compression_from_codec(c.codec),
*/
                      __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_c.allow_64bit); if (unlikely(!__pyx_t_4)) __PYX_ERR(19, 374, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_4);

                      /* "pyarrow/ipc.pxi":375
 *         metadata_version=c.metadata_version,
 *         allow_64bit=c.allow_64bit,
 *         use_legacy_format=c.write_legacy_ipc_format,             # <<<<<<<<<<<<<<
 *         compression=_get_compression_from_codec(c.codec),
 *         use_threads=c.use_threads,
*/
                      __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_c.write_legacy_ipc_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(19, 375, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_5);

                      /* "pyarrow/ipc.pxi":376
 *         allow_64bit=c.allow_64bit,
 *         use_legacy_format=c.write_legacy_ipc_format,
 *         compression=_get_compression_from_codec(c.codec),             # <<<<<<<<<<<<<<
 *         use_threads=c.use_threads,
 *         emit_dictionary_deltas=c.emit_dictionary_deltas,
*/
                      __pyx_t_6 = __pyx_f_7pyarrow_3lib__get_compression_from_codec(__pyx_v_c.codec); if (unlikely(!__pyx_t_6)) __PYX_ERR(19, 376, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_6);

                      /* "pyarrow/ipc.pxi":377
 *         use_legacy_format=c.write_legacy_ipc_format,
 *         compression=_get_compression_from_codec(c.codec),
 *         use_threads=c.use_threads,             # <<<<<<<<<<<<<<
 *         emit_dictionary_deltas=c.emit_dictionary_deltas,
 *         unify_dictionaries=c.unify_dictionaries,
*/
                      __pyx_t_7 = __Pyx_PyBool_FromLong(__pyx_v_c.use_threads); if (unlikely(!__pyx_t_7)) __PYX_ERR(19, 377, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_7);

                      /* "pyarrow/ipc.pxi":378
 *         compression=_get_compression_from_codec(c.codec),
 *         use_threads=c.use_threads,
 *         emit_dictionary_deltas=c.emit_dictionary_deltas,             # <<<<<<<<<<<<<<
 *         unify_dictionaries=c.unify_dictionaries,
 *     )
*/
                      __pyx_t_8 = __Pyx_PyBool_FromLong(__pyx_v_c.emit_dictionary_deltas); if (unlikely(!__pyx_t_8)) __PYX_ERR(19, 378, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_8);

                      /* "pyarrow/ipc.pxi":379
 *         use_threads=c.use_threads,
 *         emit_dictionary_deltas=c.emit_dictionary_deltas,
 *         unify_dictionaries=c.unify_dictionaries,             # <<<<<<<<<<<<<<
 *     )
 * 
*/
                      __pyx_t_9 = __Pyx_PyBool_FromLong(__pyx_v_c.unify_dictionaries); if (unlikely(!__pyx_t_9)) __PYX_ERR(19, 379, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_9);
                      __pyx_t_10 = 1;
                      {
                        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 7 : 0)] = {__pyx_t_2, NULL};
                        __pyx_t_11 = __Pyx_MakeVectorcallBuilderKwds(7); if (unlikely(!__pyx_t_11)) __PYX_ERR(19, 372, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_11);
                        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_metadata_version, __pyx_t_3, __pyx_t_11, __pyx_callargs+1, 0) < (0)) __PYX_ERR(19, 372, __pyx_L1_error)
                        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_allow_64bit, __pyx_t_4, __pyx_t_11, __pyx_callargs+1, 1) < (0)) __PYX_ERR(19, 372, __pyx_L1_error)
                        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_use_legacy_format, __pyx_t_5, __pyx_t_11, __pyx_callargs+1, 2) < (0)) __PYX_ERR(19, 372, __pyx_L1_error)
                        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_compression, __pyx_t_6, __pyx_t_11, __pyx_callargs+1, 3) < (0)) __PYX_ERR(19, 372, __pyx_L1_error)
                        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_use_threads, __pyx_t_7, __pyx_t_11, __pyx_callargs+1, 4) < (0)) __PYX_ERR(19, 372, __pyx_L1_error)
                        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_emit_dictionary_deltas, __pyx_t_8, __pyx_t_11, __pyx_callargs+1, 5) < (0)) __PYX_ERR(19, 372, __pyx_L1_error)
                        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_unify_dictionaries, __pyx_t_9, __pyx_t_11, __pyx_callargs+1, 6) < (0)) __PYX_ERR(19, 372, __pyx_L1_error)
                        __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_IpcWriteOptions, __pyx_callargs+__pyx_t_10, (1-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_11);
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
                        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
                        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 372, __pyx_L1_error)
                        __Pyx_GOTREF((PyObject *)__pyx_t_1);
                      }
                      __pyx_r = ((struct __pyx_obj_7pyarrow_3lib_IpcWriteOptions *)__pyx_t_1);
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/ipc.pxi":368
 * 
 * 
 * cdef IpcWriteOptions wrap_ipc_write_options(CIpcWriteOptions c):             # <<<<<<<<<<<<<<
 *     """Get Python's IpcWriteOptions from C++'s IpcWriteOptions
 *     """
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_XDECREF(__pyx_t_4);
                      __Pyx_XDECREF(__pyx_t_5);
                      __Pyx_XDECREF(__pyx_t_6);
                      __Pyx_XDECREF(__pyx_t_7);
                      __Pyx_XDECREF(__pyx_t_8);
                      __Pyx_XDECREF(__pyx_t_9);
                      __Pyx_XDECREF(__pyx_t_11);
                      __Pyx_AddTraceback("pyarrow.lib.wrap_ipc_write_options", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = 0;
                      __pyx_L0:;
                      __Pyx_XGIVEREF((PyObject *)__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/ipc.pxi":388
 *     """
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         pass
 * 
*/

                    /* Python wrapper */
                    static int __pyx_pw_7pyarrow_3lib_7Message_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
                    static int __pyx_pw_7pyarrow_3lib_7Message_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      int __pyx_r;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, __pyx_nargs); return -1; }
                      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
                      if (unlikely(__pyx_kwds_len < 0)) return -1;
                      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__cinit__", __pyx_kwds); return -1;}
                      __pyx_r = __pyx_pf_7pyarrow_3lib_7Message___cinit__(((struct __pyx_obj_7pyarrow_3lib_Message *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static int __pyx_pf_7pyarrow_3lib_7Message___cinit__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_Message *__pyx_v_self) {
                      int __pyx_r;

                      /* function exit code */
                      __pyx_r = 0;
                      return __pyx_r;
                    }

                    /* "pyarrow/ipc.pxi":391
 *         pass
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         raise TypeError(f"Do not call {self.__class__.__name__}'s constructor directly, use "
 *                         "`pyarrow.ipc.read_message` function instead.")
*/

                    /* Python wrapper */
                    static int __pyx_pw_7pyarrow_3lib_7Message_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
                    static int __pyx_pw_7pyarrow_3lib_7Message_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      int __pyx_r;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, __pyx_nargs); return -1; }
                      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
                      if (unlikely(__pyx_kwds_len < 0)) return -1;
                      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__init__", __pyx_kwds); return -1;}
                      __pyx_r = __pyx_pf_7pyarrow_3lib_7Message_2__init__(((struct __pyx_obj_7pyarrow_3lib_Message *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static int __pyx_pf_7pyarrow_3lib_7Message_2__init__(struct __pyx_obj_7pyarrow_3lib_Message *__pyx_v_self) {
                      int __pyx_r;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      PyObject *__pyx_t_3 = NULL;
                      PyObject *__pyx_t_4 = NULL;
                      PyObject *__pyx_t_5[3];
                      size_t __pyx_t_6;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__init__", 0);

                      /* "pyarrow/ipc.pxi":392
 * 
 *     def __init__(self):
 *         raise TypeError(f"Do not call {self.__class__.__name__}'s constructor directly, use "             # <<<<<<<<<<<<<<
 *                         "`pyarrow.ipc.read_message` function instead.")
 * 
*/
                      __pyx_t_2 = NULL;
                      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(19, 392, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_3);
                      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_name_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(19, 392, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_4);
                      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                      __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(19, 392, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_3);
                      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                      __pyx_t_5[0] = __pyx_mstate_global->__pyx_kp_u_Do_not_call;
                      __pyx_t_5[1] = __pyx_t_3;
                      __pyx_t_5[2] = __pyx_mstate_global->__pyx_kp_u_s_constructor_directly_use_pyar_4;
                      __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_5, 3, 12 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + 73, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3));
                      if (unlikely(!__pyx_t_4)) __PYX_ERR(19, 392, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_4);
                      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                      __pyx_t_6 = 1;
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4};
                        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 392, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      __PYX_ERR(19, 392, __pyx_L1_error)

                      /* "pyarrow/ipc.pxi":391
 *         pass
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         raise TypeError(f"Do not call {self.__class__.__name__}'s constructor directly, use "
 *                         "`pyarrow.ipc.read_message` function instead.")
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_XDECREF(__pyx_t_4);
                      __Pyx_AddTraceback("pyarrow.lib.Message.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = -1;
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/ipc.pxi":395
 *                         "`pyarrow.ipc.read_message` function instead.")
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def type(self):
 *         return frombytes(FormatMessageType(self.message.get().type()))
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_7Message_4type_1__get__(PyObject *__pyx_v_self); /*proto*/
                    static PyObject *__pyx_pw_7pyarrow_3lib_7Message_4type_1__get__(PyObject *__pyx_v_self) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_7Message_4type___get__(((struct __pyx_obj_7pyarrow_3lib_Message *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_7Message_4type___get__(struct __pyx_obj_7pyarrow_3lib_Message *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      PyObject *__pyx_t_3 = NULL;
                      PyObject *__pyx_t_4 = NULL;
                      size_t __pyx_t_5;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__get__", 0);

                      /* "pyarrow/ipc.pxi":397
 *     @property
 *     def type(self):
 *         return frombytes(FormatMessageType(self.message.get().type()))             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
                      __Pyx_XDECREF(__pyx_r);
                      __pyx_t_2 = NULL;
                      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_frombytes); if (unlikely(!__pyx_t_3)) __PYX_ERR(19, 397, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_3);
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "message");
                        __PYX_ERR(19, 397, __pyx_L1_error)
                      }
                      __pyx_t_4 = __pyx_convert_PyBytes_string_to_py_6libcpp_6string_std__in_string(arrow::ipc::FormatMessageType(__pyx_v_self->message.get()->type())); if (unlikely(!__pyx_t_4)) __PYX_ERR(19, 397, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_4);
                      __pyx_t_5 = 1;
                      #if CYTHON_UNPACK_METHODS
                      if (unlikely(PyMethod_Check(__pyx_t_3))) {
                        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
                        assert(__pyx_t_2);
                        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
                        __Pyx_INCREF(__pyx_t_2);
                        __Pyx_INCREF(__pyx__function);
                        __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
                        __pyx_t_5 = 0;
                      }
                      #endif
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4};
                        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 397, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __pyx_r = __pyx_t_1;
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/ipc.pxi":395
 *                         "`pyarrow.ipc.read_message` function instead.")
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def type(self):
 *         return frombytes(FormatMessageType(self.message.get().type()))
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_XDECREF(__pyx_t_4);
                      __Pyx_AddTraceback("pyarrow.lib.Message.type.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/ipc.pxi":399
 *         return frombytes(FormatMessageType(self.message.get().type()))
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def metadata(self):
 *         return pyarrow_wrap_buffer(self.message.get().metadata())
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_7Message_8metadata_1__get__(PyObject *__pyx_v_self); /*proto*/
                    static PyObject *__pyx_pw_7pyarrow_3lib_7Message_8metadata_1__get__(PyObject *__pyx_v_self) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_7Message_8metadata___get__(((struct __pyx_obj_7pyarrow_3lib_Message *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_7Message_8metadata___get__(struct __pyx_obj_7pyarrow_3lib_Message *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__get__", 0);

                      /* "pyarrow/ipc.pxi":401
 *     @property
 *     def metadata(self):
 *         return pyarrow_wrap_buffer(self.message.get().metadata())             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
                      __Pyx_XDECREF(__pyx_r);
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "message");
                        __PYX_ERR(19, 401, __pyx_L1_error)
                      }
                      __pyx_t_1 = pyarrow_wrap_buffer(__pyx_v_self->message.get()->metadata()); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 401, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_r = __pyx_t_1;
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/ipc.pxi":399
 *         return frombytes(FormatMessageType(self.message.get().type()))
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def metadata(self):
 *         return pyarrow_wrap_buffer(self.message.get().metadata())
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_AddTraceback("pyarrow.lib.Message.metadata.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/ipc.pxi":403
 *         return pyarrow_wrap_buffer(self.message.get().metadata())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def metadata_version(self):
 *         return _wrap_metadata_version(self.message.get().metadata_version())
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_7Message_16metadata_version_1__get__(PyObject *__pyx_v_self); /*proto*/
                    static PyObject *__pyx_pw_7pyarrow_3lib_7Message_16metadata_version_1__get__(PyObject *__pyx_v_self) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_7Message_16metadata_version___get__(((struct __pyx_obj_7pyarrow_3lib_Message *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_7Message_16metadata_version___get__(struct __pyx_obj_7pyarrow_3lib_Message *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__get__", 0);

                      /* "pyarrow/ipc.pxi":405
 *     @property
 *     def metadata_version(self):
 *         return _wrap_metadata_version(self.message.get().metadata_version())             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
                      __Pyx_XDECREF(__pyx_r);
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "message");
                        __PYX_ERR(19, 405, __pyx_L1_error)
                      }
                      __pyx_t_1 = __pyx_f_7pyarrow_3lib__wrap_metadata_version(__pyx_v_self->message.get()->metadata_version()); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 405, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_r = __pyx_t_1;
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/ipc.pxi":403
 *         return pyarrow_wrap_buffer(self.message.get().metadata())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def metadata_version(self):
 *         return _wrap_metadata_version(self.message.get().metadata_version())
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_AddTraceback("pyarrow.lib.Message.metadata_version.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/ipc.pxi":407
 *         return _wrap_metadata_version(self.message.get().metadata_version())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def body(self):
 *         cdef shared_ptr[CBuffer] body = self.message.get().body()
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_7Message_4body_1__get__(PyObject *__pyx_v_self); /*proto*/
                    static PyObject *__pyx_pw_7pyarrow_3lib_7Message_4body_1__get__(PyObject *__pyx_v_self) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_7Message_4body___get__(((struct __pyx_obj_7pyarrow_3lib_Message *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_7Message_4body___get__(struct __pyx_obj_7pyarrow_3lib_Message *__pyx_v_self) {
                      std::shared_ptr< arrow::Buffer>  __pyx_v_body;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_t_1;
                      PyObject *__pyx_t_2 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__get__", 0);

                      /* "pyarrow/ipc.pxi":409
 *     @property
 *     def body(self):
 *         cdef shared_ptr[CBuffer] body = self.message.get().body()             # <<<<<<<<<<<<<<
 *         if body.get() == NULL:
 *             return None
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "message");
                        __PYX_ERR(19, 409, __pyx_L1_error)
                      }
                      __pyx_v_body = __pyx_v_self->message.get()->body();

                      /* "pyarrow/ipc.pxi":410
 *     def body(self):
 *         cdef shared_ptr[CBuffer] body = self.message.get().body()
 *         if body.get() == NULL:             # <<<<<<<<<<<<<<
 *             return None
 *         else:
*/
                      __pyx_t_1 = (__pyx_v_body.get() == NULL);
                      if (__pyx_t_1) {

                        /* "pyarrow/ipc.pxi":411
 *         cdef shared_ptr[CBuffer] body = self.message.get().body()
 *         if body.get() == NULL:
 *             return None             # <<<<<<<<<<<<<<
 *         else:
 *             return pyarrow_wrap_buffer(body)
*/
                        __Pyx_XDECREF(__pyx_r);
                        __pyx_r = Py_None; __Pyx_INCREF(Py_None);
                        goto __pyx_L0;

                        /* "pyarrow/ipc.pxi":410
 *     def body(self):
 *         cdef shared_ptr[CBuffer] body = self.message.get().body()
 *         if body.get() == NULL:             # <<<<<<<<<<<<<<
 *             return None
 *         else:
*/
                      }

                      /* "pyarrow/ipc.pxi":413
 *             return None
 *         else:
 *             return pyarrow_wrap_buffer(body)             # <<<<<<<<<<<<<<
 * 
 *     def equals(self, Message other):
*/
                      /*else*/ {
                        __Pyx_XDECREF(__pyx_r);
                        __pyx_t_2 = pyarrow_wrap_buffer(__pyx_v_body); if (unlikely(!__pyx_t_2)) __PYX_ERR(19, 413, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_2);
                        __pyx_r = __pyx_t_2;
                        __pyx_t_2 = 0;
                        goto __pyx_L0;
                      }

                      /* "pyarrow/ipc.pxi":407
 *         return _wrap_metadata_version(self.message.get().metadata_version())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def body(self):
 *         cdef shared_ptr[CBuffer] body = self.message.get().body()
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_AddTraceback("pyarrow.lib.Message.body.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/ipc.pxi":415
 *             return pyarrow_wrap_buffer(body)
 * 
 *     def equals(self, Message other):             # <<<<<<<<<<<<<<
 *         """
 *         Returns True if the message contents (metadata and body) are identical
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_7Message_5equals(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_7Message_4equals, "Message.equals(self, Message other)\n\nReturns True if the message contents (metadata and body) are identical\n\nParameters\n----------\nother : Message\n\nReturns\n-------\nare_equal : bool");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_7Message_5equals = {"equals", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_7Message_5equals, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_7Message_4equals};
                    static PyObject *__pyx_pw_7pyarrow_3lib_7Message_5equals(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      struct __pyx_obj_7pyarrow_3lib_Message *__pyx_v_other = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[1] = {0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("equals (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_other,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(19, 415, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(19, 415, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "equals", 0) < (0)) __PYX_ERR(19, 415, __pyx_L3_error)
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("equals", 1, 1, 1, i); __PYX_ERR(19, 415, __pyx_L3_error) }
                          }
                        } else if (unlikely(__pyx_nargs != 1)) {
                          goto __pyx_L5_argtuple_error;
                        } else {
                          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(19, 415, __pyx_L3_error)
                        }
                        __pyx_v_other = ((struct __pyx_obj_7pyarrow_3lib_Message *)values[0]);
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("equals", 1, 1, 1, __pyx_nargs); __PYX_ERR(19, 415, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.Message.equals", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Message, 1, "other", 0))) __PYX_ERR(19, 415, __pyx_L1_error)
                      __pyx_r = __pyx_pf_7pyarrow_3lib_7Message_4equals(((struct __pyx_obj_7pyarrow_3lib_Message *)__pyx_v_self), __pyx_v_other);

                      /* function exit code */
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __pyx_r = NULL;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      goto __pyx_L7_cleaned_up;
                      __pyx_L0:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __pyx_L7_cleaned_up:;
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_7Message_4equals(struct __pyx_obj_7pyarrow_3lib_Message *__pyx_v_self, struct __pyx_obj_7pyarrow_3lib_Message *__pyx_v_other) {
                      bool __pyx_v_result;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("equals", 0);

                      /* "pyarrow/ipc.pxi":428
 *         """
 *         cdef c_bool result
 *         with nogil:             # <<<<<<<<<<<<<<
 *             result = self.message.get().Equals(deref(other.message.get()))
 *         return result
*/
                      {
                          PyThreadState * _save;
                          _save = PyEval_SaveThread();
                          __Pyx_FastGIL_Remember();
                          /*try:*/ {

                            /* "pyarrow/ipc.pxi":429
 *         cdef c_bool result
 *         with nogil:
 *             result = self.message.get().Equals(deref(other.message.get()))             # <<<<<<<<<<<<<<
 *         return result
 * 
*/
                            if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                              PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "message");
                              __Pyx_PyGILState_Release(__pyx_gilstate_save);
                              __PYX_ERR(19, 429, __pyx_L4_error)
                            }
                            if (unlikely(((PyObject *)__pyx_v_other) == Py_None)) {
                              PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "message");
                              __Pyx_PyGILState_Release(__pyx_gilstate_save);
                              __PYX_ERR(19, 429, __pyx_L4_error)
                            }
                            __pyx_v_result = __pyx_v_self->message.get()->Equals((*__pyx_v_other->message.get()));
                          }

                          /* "pyarrow/ipc.pxi":428
 *         """
 *         cdef c_bool result
 *         with nogil:             # <<<<<<<<<<<<<<
 *             result = self.message.get().Equals(deref(other.message.get()))
 *         return result
*/
                          /*finally:*/ {
                            /*normal exit:*/{
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L5;
                            }
                            __pyx_L4_error: {
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L1_error;
                            }
                            __pyx_L5:;
                          }
                      }

                      /* "pyarrow/ipc.pxi":430
 *         with nogil:
 *             result = self.message.get().Equals(deref(other.message.get()))
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     def serialize_to(self, NativeFile sink, alignment=8, memory_pool=None):
*/
                      __Pyx_XDECREF(__pyx_r);
                      __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 430, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_r = __pyx_t_1;
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/ipc.pxi":415
 *             return pyarrow_wrap_buffer(body)
 * 
 *     def equals(self, Message other):             # <<<<<<<<<<<<<<
 *         """
 *         Returns True if the message contents (metadata and body) are identical
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_AddTraceback("pyarrow.lib.Message.equals", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/ipc.pxi":432
 *         return result
 * 
 *     def serialize_to(self, NativeFile sink, alignment=8, memory_pool=None):             # <<<<<<<<<<<<<<
 *         """
 *         Write message to generic OutputStream
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_7Message_7serialize_to(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_7Message_6serialize_to, "Message.serialize_to(self, NativeFile sink, alignment=8, memory_pool=None)\n\nWrite message to generic OutputStream\n\nParameters\n----------\nsink : NativeFile\nalignment : int, default 8\n    Byte alignment for metadata and body\nmemory_pool : MemoryPool, default None\n    Uses default memory pool if not specified");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_7Message_7serialize_to = {"serialize_to", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_7Message_7serialize_to, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_7Message_6serialize_to};
                    static PyObject *__pyx_pw_7pyarrow_3lib_7Message_7serialize_to(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_sink = 0;
                      PyObject *__pyx_v_alignment = 0;
                      CYTHON_UNUSED PyObject *__pyx_v_memory_pool = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[3] = {0,0,0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("serialize_to (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_sink,&__pyx_mstate_global->__pyx_n_u_alignment,&__pyx_mstate_global->__pyx_n_u_memory_pool,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(19, 432, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  3:
                            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(19, 432, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  2:
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(19, 432, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(19, 432, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "serialize_to", 0) < (0)) __PYX_ERR(19, 432, __pyx_L3_error)
                          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_int_8));
                          if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("serialize_to", 0, 1, 3, i); __PYX_ERR(19, 432, __pyx_L3_error) }
                          }
                        } else {
                          switch (__pyx_nargs) {
                            case  3:
                            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(19, 432, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  2:
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(19, 432, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(19, 432, __pyx_L3_error)
                            break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_int_8));
                          if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
                        }
                        __pyx_v_sink = ((struct __pyx_obj_7pyarrow_3lib_NativeFile *)values[0]);
                        __pyx_v_alignment = values[1];
                        __pyx_v_memory_pool = values[2];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("serialize_to", 0, 1, 3, __pyx_nargs); __PYX_ERR(19, 432, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.Message.serialize_to", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_sink), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NativeFile, 1, "sink", 0))) __PYX_ERR(19, 432, __pyx_L1_error)
                      __pyx_r = __pyx_pf_7pyarrow_3lib_7Message_6serialize_to(((struct __pyx_obj_7pyarrow_3lib_Message *)__pyx_v_self), __pyx_v_sink, __pyx_v_alignment, __pyx_v_memory_pool);

                      /* function exit code */
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __pyx_r = NULL;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      goto __pyx_L7_cleaned_up;
                      __pyx_L0:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __pyx_L7_cleaned_up:;
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_7Message_6serialize_to(struct __pyx_obj_7pyarrow_3lib_Message *__pyx_v_self, struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_sink, PyObject *__pyx_v_alignment, CYTHON_UNUSED PyObject *__pyx_v_memory_pool) {
                      int64_t __pyx_v_output_length;
                       arrow::io::OutputStream *__pyx_v_out;
                       arrow::ipc::IpcWriteOptions __pyx_v_options;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int32_t __pyx_t_1;
                      std::shared_ptr< arrow::io::OutputStream>  __pyx_t_2;
                      int __pyx_t_3;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("serialize_to", 0);

                      /* "pyarrow/ipc.pxi":445
 *         """
 *         cdef:
 *             int64_t output_length = 0             # <<<<<<<<<<<<<<
 *             COutputStream* out
 *             CIpcWriteOptions options
*/
                      __pyx_v_output_length = 0;

                      /* "pyarrow/ipc.pxi":449
 *             CIpcWriteOptions options
 * 
 *         options.alignment = alignment             # <<<<<<<<<<<<<<
 *         out = sink.get_output_stream().get()
 *         with nogil:
*/
                      __pyx_t_1 = __Pyx_PyLong_As_int32_t(__pyx_v_alignment); if (unlikely((__pyx_t_1 == ((int32_t)-1)) && PyErr_Occurred())) __PYX_ERR(19, 449, __pyx_L1_error)
                      __pyx_v_options.alignment = __pyx_t_1;

                      /* "pyarrow/ipc.pxi":450
 * 
 *         options.alignment = alignment
 *         out = sink.get_output_stream().get()             # <<<<<<<<<<<<<<
 *         with nogil:
 *             check_status(self.message.get()
*/
                      if (unlikely(((PyObject *)__pyx_v_sink) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get_output_stream");
                        __PYX_ERR(19, 450, __pyx_L1_error)
                      }
                      __pyx_t_2 = ((struct __pyx_vtabstruct_7pyarrow_3lib_NativeFile *)__pyx_v_sink->__pyx_vtab)->get_output_stream(__pyx_v_sink); if (unlikely(PyErr_Occurred())) __PYX_ERR(19, 450, __pyx_L1_error)
                      __pyx_v_out = __pyx_t_2.get();

                      /* "pyarrow/ipc.pxi":451
 *         options.alignment = alignment
 *         out = sink.get_output_stream().get()
 *         with nogil:             # <<<<<<<<<<<<<<
 *             check_status(self.message.get()
 *                          .SerializeTo(out, options, &output_length))
*/
                      {
                          PyThreadState * _save;
                          _save = PyEval_SaveThread();
                          __Pyx_FastGIL_Remember();
                          /*try:*/ {

                            /* "pyarrow/ipc.pxi":452
 *         out = sink.get_output_stream().get()
 *         with nogil:
 *             check_status(self.message.get()             # <<<<<<<<<<<<<<
 *                          .SerializeTo(out, options, &output_length))
 * 
*/
                            if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                              PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "message");
                              __Pyx_PyGILState_Release(__pyx_gilstate_save);
                              __PYX_ERR(19, 452, __pyx_L4_error)
                            }

                            /* "pyarrow/ipc.pxi":453
 *         with nogil:
 *             check_status(self.message.get()
 *                          .SerializeTo(out, options, &output_length))             # <<<<<<<<<<<<<<
 * 
 *     def serialize(self, alignment=8, memory_pool=None):
*/
                            __pyx_t_3 = __pyx_f_7pyarrow_3lib_check_status(__pyx_v_self->message.get()->SerializeTo(__pyx_v_out, __pyx_v_options, (&__pyx_v_output_length))); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(19, 452, __pyx_L4_error)
                          }

                          /* "pyarrow/ipc.pxi":451
 *         options.alignment = alignment
 *         out = sink.get_output_stream().get()
 *         with nogil:             # <<<<<<<<<<<<<<
 *             check_status(self.message.get()
 *                          .SerializeTo(out, options, &output_length))
*/
                          /*finally:*/ {
                            /*normal exit:*/{
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L5;
                            }
                            __pyx_L4_error: {
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L1_error;
                            }
                            __pyx_L5:;
                          }
                      }

                      /* "pyarrow/ipc.pxi":432
 *         return result
 * 
 *     def serialize_to(self, NativeFile sink, alignment=8, memory_pool=None):             # <<<<<<<<<<<<<<
 *         """
 *         Write message to generic OutputStream
*/

                      /* function exit code */
                      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib.Message.serialize_to", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/ipc.pxi":455
 *                          .SerializeTo(out, options, &output_length))
 * 
 *     def serialize(self, alignment=8, memory_pool=None):             # <<<<<<<<<<<<<<
 *         """
 *         Write message as encapsulated IPC message
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_7Message_9serialize(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_7Message_8serialize, "Message.serialize(self, alignment=8, memory_pool=None)\n\nWrite message as encapsulated IPC message\n\nParameters\n----------\nalignment : int, default 8\n    Byte alignment for metadata and body\nmemory_pool : MemoryPool, default None\n    Uses default memory pool if not specified\n\nReturns\n-------\nserialized : Buffer");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_7Message_9serialize = {"serialize", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_7Message_9serialize, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_7Message_8serialize};
                    static PyObject *__pyx_pw_7pyarrow_3lib_7Message_9serialize(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      PyObject *__pyx_v_alignment = 0;
                      PyObject *__pyx_v_memory_pool = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[2] = {0,0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("serialize (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_alignment,&__pyx_mstate_global->__pyx_n_u_memory_pool,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(19, 455, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  2:
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(19, 455, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(19, 455, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "serialize", 0) < (0)) __PYX_ERR(19, 455, __pyx_L3_error)
                          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_int_8));
                          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
                        } else {
                          switch (__pyx_nargs) {
                            case  2:
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(19, 455, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(19, 455, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_int_8));
                          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
                        }
                        __pyx_v_alignment = values[0];
                        __pyx_v_memory_pool = values[1];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("serialize", 0, 0, 2, __pyx_nargs); __PYX_ERR(19, 455, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.Message.serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_7Message_8serialize(((struct __pyx_obj_7pyarrow_3lib_Message *)__pyx_v_self), __pyx_v_alignment, __pyx_v_memory_pool);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_7Message_8serialize(struct __pyx_obj_7pyarrow_3lib_Message *__pyx_v_self, PyObject *__pyx_v_alignment, PyObject *__pyx_v_memory_pool) {
                      struct __pyx_obj_7pyarrow_3lib_BufferOutputStream *__pyx_v_stream = NULL;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      size_t __pyx_t_3;
                      PyObject *__pyx_t_4 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("serialize", 0);

                      /* "pyarrow/ipc.pxi":470
 *         serialized : Buffer
 *         """
 *         stream = BufferOutputStream(memory_pool)             # <<<<<<<<<<<<<<
 *         self.serialize_to(stream, alignment=alignment, memory_pool=memory_pool)
 *         return stream.getvalue()
*/
                      __pyx_t_2 = NULL;
                      __pyx_t_3 = 1;
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_memory_pool};
                        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_BufferOutputStream, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 470, __pyx_L1_error)
                        __Pyx_GOTREF((PyObject *)__pyx_t_1);
                      }
                      __pyx_v_stream = ((struct __pyx_obj_7pyarrow_3lib_BufferOutputStream *)__pyx_t_1);
                      __pyx_t_1 = 0;

                      /* "pyarrow/ipc.pxi":471
 *         """
 *         stream = BufferOutputStream(memory_pool)
 *         self.serialize_to(stream, alignment=alignment, memory_pool=memory_pool)             # <<<<<<<<<<<<<<
 *         return stream.getvalue()
 * 
*/
                      __pyx_t_2 = ((PyObject *)__pyx_v_self);
                      __Pyx_INCREF(__pyx_t_2);
                      __pyx_t_3 = 0;
                      {
                        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_2, ((PyObject *)__pyx_v_stream)};
                        __pyx_t_4 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(19, 471, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_4);
                        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_alignment, __pyx_v_alignment, __pyx_t_4, __pyx_callargs+2, 0) < (0)) __PYX_ERR(19, 471, __pyx_L1_error)
                        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_memory_pool, __pyx_v_memory_pool, __pyx_t_4, __pyx_callargs+2, 1) < (0)) __PYX_ERR(19, 471, __pyx_L1_error)
                        __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_serialize_to, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_4);
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 471, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

                      /* "pyarrow/ipc.pxi":472
 *         stream = BufferOutputStream(memory_pool)
 *         self.serialize_to(stream, alignment=alignment, memory_pool=memory_pool)
 *         return stream.getvalue()             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
*/
                      __Pyx_XDECREF(__pyx_r);
                      __pyx_t_4 = ((PyObject *)__pyx_v_stream);
                      __Pyx_INCREF(__pyx_t_4);
                      __pyx_t_3 = 0;
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
                        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_getvalue, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 472, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __pyx_r = __pyx_t_1;
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/ipc.pxi":455
 *                          .SerializeTo(out, options, &output_length))
 * 
 *     def serialize(self, alignment=8, memory_pool=None):             # <<<<<<<<<<<<<<
 *         """
 *         Write message as encapsulated IPC message
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_XDECREF(__pyx_t_4);
                      __Pyx_AddTraceback("pyarrow.lib.Message.serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XDECREF((PyObject *)__pyx_v_stream);
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/ipc.pxi":474
 *         return stream.getvalue()
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self.message == nullptr:
 *             return """pyarrow.Message(uninitialized)"""
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_7Message_11__repr__(PyObject *__pyx_v_self); /*proto*/
                    static PyObject *__pyx_pw_7pyarrow_3lib_7Message_11__repr__(PyObject *__pyx_v_self) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_7Message_10__repr__(((struct __pyx_obj_7pyarrow_3lib_Message *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_7Message_10__repr__(struct __pyx_obj_7pyarrow_3lib_Message *__pyx_v_self) {
                      PyObject *__pyx_v_metadata_len = NULL;
                      PyObject *__pyx_v_body = NULL;
                      PyObject *__pyx_v_body_len = NULL;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_t_1;
                      PyObject *__pyx_t_2 = NULL;
                      PyObject *__pyx_t_3 = NULL;
                      PyObject *__pyx_t_4 = NULL;
                      PyObject *__pyx_t_5[6];
                      PyObject *__pyx_t_6 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__repr__", 0);

                      /* "pyarrow/ipc.pxi":475
 * 
 *     def __repr__(self):
 *         if self.message == nullptr:             # <<<<<<<<<<<<<<
 *             return """pyarrow.Message(uninitialized)"""
 * 
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "message");
                        __PYX_ERR(19, 475, __pyx_L1_error)
                      }
                      __pyx_t_1 = ((__pyx_v_self->message == nullptr) != 0);
                      if (__pyx_t_1) {

                        /* "pyarrow/ipc.pxi":476
 *     def __repr__(self):
 *         if self.message == nullptr:
 *             return """pyarrow.Message(uninitialized)"""             # <<<<<<<<<<<<<<
 * 
 *         metadata_len = self.metadata.size
*/
                        __Pyx_XDECREF(__pyx_r);
                        __Pyx_INCREF(__pyx_mstate_global->__pyx_kp_u_pyarrow_Message_uninitialized);
                        __pyx_r = __pyx_mstate_global->__pyx_kp_u_pyarrow_Message_uninitialized;
                        goto __pyx_L0;

                        /* "pyarrow/ipc.pxi":475
 * 
 *     def __repr__(self):
 *         if self.message == nullptr:             # <<<<<<<<<<<<<<
 *             return """pyarrow.Message(uninitialized)"""
 * 
*/
                      }

                      /* "pyarrow/ipc.pxi":478
 *             return """pyarrow.Message(uninitialized)"""
 * 
 *         metadata_len = self.metadata.size             # <<<<<<<<<<<<<<
 *         body = self.body
 *         body_len = 0 if body is None else body.size
*/
                      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_metadata); if (unlikely(!__pyx_t_2)) __PYX_ERR(19, 478, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_2);
                      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_size); if (unlikely(!__pyx_t_3)) __PYX_ERR(19, 478, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_3);
                      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                      __pyx_v_metadata_len = __pyx_t_3;
                      __pyx_t_3 = 0;

                      /* "pyarrow/ipc.pxi":479
 * 
 *         metadata_len = self.metadata.size
 *         body = self.body             # <<<<<<<<<<<<<<
 *         body_len = 0 if body is None else body.size
 * 
*/
                      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_body); if (unlikely(!__pyx_t_3)) __PYX_ERR(19, 479, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_3);
                      __pyx_v_body = __pyx_t_3;
                      __pyx_t_3 = 0;

                      /* "pyarrow/ipc.pxi":480
 *         metadata_len = self.metadata.size
 *         body = self.body
 *         body_len = 0 if body is None else body.size             # <<<<<<<<<<<<<<
 * 
 *         return f"""pyarrow.Message
*/
                      __pyx_t_1 = (__pyx_v_body == Py_None);
                      if (__pyx_t_1) {
                        __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0);
                        __pyx_t_3 = __pyx_mstate_global->__pyx_int_0;
                      } else {
                        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_body, __pyx_mstate_global->__pyx_n_u_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(19, 480, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_2);
                        __pyx_t_3 = __pyx_t_2;
                        __pyx_t_2 = 0;
                      }
                      __pyx_v_body_len = __pyx_t_3;
                      __pyx_t_3 = 0;

                      /* "pyarrow/ipc.pxi":482
 *         body_len = 0 if body is None else body.size
 * 
 *         return f"""pyarrow.Message             # <<<<<<<<<<<<<<
 * type: {self.type}
 * metadata length: {metadata_len}
*/
                      __Pyx_XDECREF(__pyx_r);

                      /* "pyarrow/ipc.pxi":483
 * 
 *         return f"""pyarrow.Message
 * type: {self.type}             # <<<<<<<<<<<<<<
 * metadata length: {metadata_len}
 * body length: {body_len}"""
*/
                      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(19, 483, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_3);
                      __pyx_t_2 = __Pyx_PyObject_FormatSimple(__pyx_t_3, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(19, 483, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_2);
                      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

                      /* "pyarrow/ipc.pxi":484
 *         return f"""pyarrow.Message
 * type: {self.type}
 * metadata length: {metadata_len}             # <<<<<<<<<<<<<<
 * body length: {body_len}"""
 * 
*/
                      __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_v_metadata_len, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(19, 484, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_3);

                      /* "pyarrow/ipc.pxi":485
 * type: {self.type}
 * metadata length: {metadata_len}
 * body length: {body_len}"""             # <<<<<<<<<<<<<<
 * 
 * 
*/
                      __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_v_body_len, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(19, 485, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_4);
                      __pyx_t_5[0] = __pyx_mstate_global->__pyx_kp_u_pyarrow_Message_type;
                      __pyx_t_5[1] = __pyx_t_2;
                      __pyx_t_5[2] = __pyx_mstate_global->__pyx_kp_u_metadata_length;
                      __pyx_t_5[3] = __pyx_t_3;
                      __pyx_t_5[4] = __pyx_mstate_global->__pyx_kp_u_body_length;
                      __pyx_t_5[5] = __pyx_t_4;

                      /* "pyarrow/ipc.pxi":482
 *         body_len = 0 if body is None else body.size
 * 
 *         return f"""pyarrow.Message             # <<<<<<<<<<<<<<
 * type: {self.type}
 * metadata length: {metadata_len}
*/
                      __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_5, 6, 22 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2) + 18 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + 14 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4));
                      if (unlikely(!__pyx_t_6)) __PYX_ERR(19, 482, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_6);
                      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                      __pyx_r = __pyx_t_6;
                      __pyx_t_6 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/ipc.pxi":474
 *         return stream.getvalue()
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self.message == nullptr:
 *             return """pyarrow.Message(uninitialized)"""
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_XDECREF(__pyx_t_4);
                      __Pyx_XDECREF(__pyx_t_6);
                      __Pyx_AddTraceback("pyarrow.lib.Message.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XDECREF(__pyx_v_metadata_len);
                      __Pyx_XDECREF(__pyx_v_body);
                      __Pyx_XDECREF(__pyx_v_body_len);
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_7Message_13__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_7Message_12__reduce_cython__, "Message.__reduce_cython__(self)");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_7Message_13__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_7Message_13__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_7Message_12__reduce_cython__};
                    static PyObject *__pyx_pw_7pyarrow_3lib_7Message_13__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; }
                      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                      if (unlikely(__pyx_kwds_len < 0)) return NULL;
                      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;}
                      __pyx_r = __pyx_pf_7pyarrow_3lib_7Message_12__reduce_cython__(((struct __pyx_obj_7pyarrow_3lib_Message *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_7Message_12__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_Message *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__reduce_cython__", 0);

                      /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/
                      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0);
                      __PYX_ERR(7, 2, __pyx_L1_error)

                      /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib.Message.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_7Message_15__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_7Message_14__setstate_cython__, "Message.__setstate_cython__(self, __pyx_state)");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_7Message_15__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_7Message_15__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_7Message_14__setstate_cython__};
                    static PyObject *__pyx_pw_7pyarrow_3lib_7Message_15__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[1] = {0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(7, 3, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(7, 3, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(7, 3, __pyx_L3_error)
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(7, 3, __pyx_L3_error) }
                          }
                        } else if (unlikely(__pyx_nargs != 1)) {
                          goto __pyx_L5_argtuple_error;
                        } else {
                          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(7, 3, __pyx_L3_error)
                        }
                        __pyx_v___pyx_state = values[0];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(7, 3, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.Message.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_7Message_14__setstate_cython__(((struct __pyx_obj_7pyarrow_3lib_Message *)__pyx_v_self), __pyx_v___pyx_state);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_7Message_14__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_Message *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__setstate_cython__", 0);

                      /* "(tree fragment)":4
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
*/
                      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0);
                      __PYX_ERR(7, 4, __pyx_L1_error)

                      /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib.Message.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/ipc.pxi":496
 *         unique_ptr[CMessageReader] reader
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         pass
 * 
*/

                    /* Python wrapper */
                    static int __pyx_pw_7pyarrow_3lib_13MessageReader_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
                    static int __pyx_pw_7pyarrow_3lib_13MessageReader_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      int __pyx_r;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, __pyx_nargs); return -1; }
                      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
                      if (unlikely(__pyx_kwds_len < 0)) return -1;
                      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__cinit__", __pyx_kwds); return -1;}
                      __pyx_r = __pyx_pf_7pyarrow_3lib_13MessageReader___cinit__(((struct __pyx_obj_7pyarrow_3lib_MessageReader *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static int __pyx_pf_7pyarrow_3lib_13MessageReader___cinit__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_MessageReader *__pyx_v_self) {
                      int __pyx_r;

                      /* function exit code */
                      __pyx_r = 0;
                      return __pyx_r;
                    }

                    /* "pyarrow/ipc.pxi":499
 *         pass
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         raise TypeError(f"Do not call {self.__class__.__name__}'s constructor directly, use "
 *                         "`pyarrow.ipc.MessageReader.open_stream` function "
*/

                    /* Python wrapper */
                    static int __pyx_pw_7pyarrow_3lib_13MessageReader_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
                    static int __pyx_pw_7pyarrow_3lib_13MessageReader_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      int __pyx_r;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, __pyx_nargs); return -1; }
                      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
                      if (unlikely(__pyx_kwds_len < 0)) return -1;
                      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__init__", __pyx_kwds); return -1;}
                      __pyx_r = __pyx_pf_7pyarrow_3lib_13MessageReader_2__init__(((struct __pyx_obj_7pyarrow_3lib_MessageReader *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static int __pyx_pf_7pyarrow_3lib_13MessageReader_2__init__(struct __pyx_obj_7pyarrow_3lib_MessageReader *__pyx_v_self) {
                      int __pyx_r;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      PyObject *__pyx_t_3 = NULL;
                      PyObject *__pyx_t_4 = NULL;
                      PyObject *__pyx_t_5[3];
                      size_t __pyx_t_6;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__init__", 0);

                      /* "pyarrow/ipc.pxi":500
 * 
 *     def __init__(self):
 *         raise TypeError(f"Do not call {self.__class__.__name__}'s constructor directly, use "             # <<<<<<<<<<<<<<
 *                         "`pyarrow.ipc.MessageReader.open_stream` function "
 *                         "instead.")
*/
                      __pyx_t_2 = NULL;
                      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(19, 500, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_3);
                      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_name_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(19, 500, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_4);
                      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                      __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(19, 500, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_3);
                      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                      __pyx_t_5[0] = __pyx_mstate_global->__pyx_kp_u_Do_not_call;
                      __pyx_t_5[1] = __pyx_t_3;
                      __pyx_t_5[2] = __pyx_mstate_global->__pyx_kp_u_s_constructor_directly_use_pyar_5;
                      __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_5, 3, 12 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + 86, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3));
                      if (unlikely(!__pyx_t_4)) __PYX_ERR(19, 500, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_4);
                      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                      __pyx_t_6 = 1;
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4};
                        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 500, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      __PYX_ERR(19, 500, __pyx_L1_error)

                      /* "pyarrow/ipc.pxi":499
 *         pass
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         raise TypeError(f"Do not call {self.__class__.__name__}'s constructor directly, use "
 *                         "`pyarrow.ipc.MessageReader.open_stream` function "
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_XDECREF(__pyx_t_4);
                      __Pyx_AddTraceback("pyarrow.lib.MessageReader.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = -1;
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/ipc.pxi":504
 *                         "instead.")
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def open_stream(source):
 *         """
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_13MessageReader_5open_stream(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_13MessageReader_4open_stream, "MessageReader.open_stream(source)\n\nOpen stream from source, if you want to use memory map use\nMemoryMappedFile as source.\n\nParameters\n----------\nsource : bytes/buffer-like, pyarrow.NativeFile, or file-like Python object\n    A readable source, like an InputStream");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_13MessageReader_5open_stream = {"open_stream", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_13MessageReader_5open_stream, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_13MessageReader_4open_stream};
                    static PyObject *__pyx_pw_7pyarrow_3lib_13MessageReader_5open_stream(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      PyObject *__pyx_v_source = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[1] = {0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("open_stream (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_source,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(19, 504, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(19, 504, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "open_stream", 0) < (0)) __PYX_ERR(19, 504, __pyx_L3_error)
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("open_stream", 1, 1, 1, i); __PYX_ERR(19, 504, __pyx_L3_error) }
                          }
                        } else if (unlikely(__pyx_nargs != 1)) {
                          goto __pyx_L5_argtuple_error;
                        } else {
                          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(19, 504, __pyx_L3_error)
                        }
                        __pyx_v_source = values[0];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("open_stream", 1, 1, 1, __pyx_nargs); __PYX_ERR(19, 504, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.MessageReader.open_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_13MessageReader_4open_stream(__pyx_v_source);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_13MessageReader_4open_stream(PyObject *__pyx_v_source) {
                      struct __pyx_obj_7pyarrow_3lib_MessageReader *__pyx_v_result = 0;
                      std::shared_ptr< arrow::io::InputStream>  __pyx_v_in_stream;
                      std::unique_ptr< arrow::ipc::MessageReader>  __pyx_v_reader;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("open_stream", 0);

                      /* "pyarrow/ipc.pxi":516
 *         """
 *         cdef:
 *             MessageReader result = MessageReader.__new__(MessageReader)             # <<<<<<<<<<<<<<
 *             shared_ptr[CInputStream] in_stream
 *             unique_ptr[CMessageReader] reader
*/
                      __pyx_t_1 = ((PyObject *)__pyx_tp_new_7pyarrow_3lib_MessageReader(((PyTypeObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_MessageReader), __pyx_mstate_global->__pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 516, __pyx_L1_error)
                      __Pyx_GOTREF((PyObject *)__pyx_t_1);
                      __pyx_v_result = ((struct __pyx_obj_7pyarrow_3lib_MessageReader *)__pyx_t_1);
                      __pyx_t_1 = 0;

                      /* "pyarrow/ipc.pxi":520
 *             unique_ptr[CMessageReader] reader
 * 
 *         _get_input_stream(source, &in_stream)             # <<<<<<<<<<<<<<
 *         with nogil:
 *             reader = CMessageReader.Open(in_stream)
*/
                      __pyx_t_1 = __pyx_f_7pyarrow_3lib__get_input_stream(__pyx_v_source, (&__pyx_v_in_stream)); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 520, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

                      /* "pyarrow/ipc.pxi":521
 * 
 *         _get_input_stream(source, &in_stream)
 *         with nogil:             # <<<<<<<<<<<<<<
 *             reader = CMessageReader.Open(in_stream)
 *             result.reader.reset(reader.release())
*/
                      {
                          PyThreadState * _save;
                          _save = PyEval_SaveThread();
                          __Pyx_FastGIL_Remember();
                          /*try:*/ {

                            /* "pyarrow/ipc.pxi":522
 *         _get_input_stream(source, &in_stream)
 *         with nogil:
 *             reader = CMessageReader.Open(in_stream)             # <<<<<<<<<<<<<<
 *             result.reader.reset(reader.release())
 * 
*/
                            __pyx_v_reader =  arrow::ipc::MessageReader::Open(__pyx_v_in_stream);

                            /* "pyarrow/ipc.pxi":523
 *         with nogil:
 *             reader = CMessageReader.Open(in_stream)
 *             result.reader.reset(reader.release())             # <<<<<<<<<<<<<<
 * 
 *         return result
*/
                            if (unlikely(((PyObject *)__pyx_v_result) == Py_None)) {
                              PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "reader");
                              __Pyx_PyGILState_Release(__pyx_gilstate_save);
                              __PYX_ERR(19, 523, __pyx_L4_error)
                            }
                            __pyx_v_result->reader.reset(__pyx_v_reader.release());
                          }

                          /* "pyarrow/ipc.pxi":521
 * 
 *         _get_input_stream(source, &in_stream)
 *         with nogil:             # <<<<<<<<<<<<<<
 *             reader = CMessageReader.Open(in_stream)
 *             result.reader.reset(reader.release())
*/
                          /*finally:*/ {
                            /*normal exit:*/{
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L5;
                            }
                            __pyx_L4_error: {
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L1_error;
                            }
                            __pyx_L5:;
                          }
                      }

                      /* "pyarrow/ipc.pxi":525
 *             result.reader.reset(reader.release())
 * 
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     def __iter__(self):
*/
                      __Pyx_XDECREF(__pyx_r);
                      __Pyx_INCREF((PyObject *)__pyx_v_result);
                      __pyx_r = ((PyObject *)__pyx_v_result);
                      goto __pyx_L0;

                      /* "pyarrow/ipc.pxi":504
 *                         "instead.")
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def open_stream(source):
 *         """
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_AddTraceback("pyarrow.lib.MessageReader.open_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XDECREF((PyObject *)__pyx_v_result);
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/ipc.pxi":527
 *         return result
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_13MessageReader_7__iter__(PyObject *__pyx_v_self); /*proto*/
                    static PyObject *__pyx_pw_7pyarrow_3lib_13MessageReader_7__iter__(PyObject *__pyx_v_self) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_13MessageReader_6__iter__(((struct __pyx_obj_7pyarrow_3lib_MessageReader *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_13MessageReader_6__iter__(struct __pyx_obj_7pyarrow_3lib_MessageReader *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__iter__", 0);

                      /* "pyarrow/ipc.pxi":528
 * 
 *     def __iter__(self):
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def __next__(self):
*/
                      __Pyx_XDECREF(__pyx_r);
                      __Pyx_INCREF((PyObject *)__pyx_v_self);
                      __pyx_r = ((PyObject *)__pyx_v_self);
                      goto __pyx_L0;

                      /* "pyarrow/ipc.pxi":527
 *         return result
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
*/

                      /* function exit code */
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/ipc.pxi":530
 *         return self
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         return self.read_next_message()
 * 
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_13MessageReader_9__next__(PyObject *__pyx_v_self); /*proto*/
                    static PyObject *__pyx_pw_7pyarrow_3lib_13MessageReader_9__next__(PyObject *__pyx_v_self) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_13MessageReader_8__next__(((struct __pyx_obj_7pyarrow_3lib_MessageReader *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_13MessageReader_8__next__(struct __pyx_obj_7pyarrow_3lib_MessageReader *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      size_t __pyx_t_3;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__next__", 0);

                      /* "pyarrow/ipc.pxi":531
 * 
 *     def __next__(self):
 *         return self.read_next_message()             # <<<<<<<<<<<<<<
 * 
 *     def read_next_message(self):
*/
                      __Pyx_XDECREF(__pyx_r);
                      __pyx_t_2 = ((PyObject *)__pyx_v_self);
                      __Pyx_INCREF(__pyx_t_2);
                      __pyx_t_3 = 0;
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
                        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_read_next_message, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 531, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __pyx_r = __pyx_t_1;
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/ipc.pxi":530
 *         return self
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         return self.read_next_message()
 * 
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_AddTraceback("pyarrow.lib.MessageReader.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/ipc.pxi":533
 *         return self.read_next_message()
 * 
 *     def read_next_message(self):             # <<<<<<<<<<<<<<
 *         """
 *         Read next Message from the stream.
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_13MessageReader_11read_next_message(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_13MessageReader_10read_next_message, "MessageReader.read_next_message(self)\n\nRead next Message from the stream.\n\nRaises\n------\nStopIteration\n    At end of stream");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_13MessageReader_11read_next_message = {"read_next_message", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_13MessageReader_11read_next_message, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_13MessageReader_10read_next_message};
                    static PyObject *__pyx_pw_7pyarrow_3lib_13MessageReader_11read_next_message(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("read_next_message (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("read_next_message", 1, 0, 0, __pyx_nargs); return NULL; }
                      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                      if (unlikely(__pyx_kwds_len < 0)) return NULL;
                      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("read_next_message", __pyx_kwds); return NULL;}
                      __pyx_r = __pyx_pf_7pyarrow_3lib_13MessageReader_10read_next_message(((struct __pyx_obj_7pyarrow_3lib_MessageReader *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_13MessageReader_10read_next_message(struct __pyx_obj_7pyarrow_3lib_MessageReader *__pyx_v_self) {
                      struct __pyx_obj_7pyarrow_3lib_Message *__pyx_v_result = 0;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      std::unique_ptr< arrow::ipc::Message>  __pyx_t_2;
                      int __pyx_t_3;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("read_next_message", 0);

                      /* "pyarrow/ipc.pxi":542
 *             At end of stream
 *         """
 *         cdef Message result = Message.__new__(Message)             # <<<<<<<<<<<<<<
 * 
 *         with nogil:
*/
                      __pyx_t_1 = ((PyObject *)__pyx_tp_new_7pyarrow_3lib_Message(((PyTypeObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Message), __pyx_mstate_global->__pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 542, __pyx_L1_error)
                      __Pyx_GOTREF((PyObject *)__pyx_t_1);
                      __pyx_v_result = ((struct __pyx_obj_7pyarrow_3lib_Message *)__pyx_t_1);
                      __pyx_t_1 = 0;

                      /* "pyarrow/ipc.pxi":544
 *         cdef Message result = Message.__new__(Message)
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             result.message = move(GetResultValue(self.reader.get()
 *                                                  .ReadNextMessage()))
*/
                      {
                          PyThreadState * _save;
                          _save = PyEval_SaveThread();
                          __Pyx_FastGIL_Remember();
                          /*try:*/ {

                            /* "pyarrow/ipc.pxi":545
 * 
 *         with nogil:
 *             result.message = move(GetResultValue(self.reader.get()             # <<<<<<<<<<<<<<
 *                                                  .ReadNextMessage()))
 * 
*/
                            if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                              PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "reader");
                              __Pyx_PyGILState_Release(__pyx_gilstate_save);
                              __PYX_ERR(19, 545, __pyx_L4_error)
                            }

                            /* "pyarrow/ipc.pxi":546
 *         with nogil:
 *             result.message = move(GetResultValue(self.reader.get()
 *                                                  .ReadNextMessage()))             # <<<<<<<<<<<<<<
 * 
 *         if result.message.get() == NULL:
*/
                            __pyx_t_2 = arrow::py::GetResultValue<std::unique_ptr< arrow::ipc::Message> >(__pyx_v_self->reader.get()->ReadNextMessage()); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(19, 545, __pyx_L4_error)

                            /* "pyarrow/ipc.pxi":545
 * 
 *         with nogil:
 *             result.message = move(GetResultValue(self.reader.get()             # <<<<<<<<<<<<<<
 *                                                  .ReadNextMessage()))
 * 
*/
                            if (unlikely(((PyObject *)__pyx_v_result) == Py_None)) {
                              PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "message");
                              __Pyx_PyGILState_Release(__pyx_gilstate_save);
                              __PYX_ERR(19, 545, __pyx_L4_error)
                            }
                            __pyx_v_result->message = cython_std::move<std::unique_ptr< arrow::ipc::Message> >(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_2));
                          }

                          /* "pyarrow/ipc.pxi":544
 *         cdef Message result = Message.__new__(Message)
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             result.message = move(GetResultValue(self.reader.get()
 *                                                  .ReadNextMessage()))
*/
                          /*finally:*/ {
                            /*normal exit:*/{
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L5;
                            }
                            __pyx_L4_error: {
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L1_error;
                            }
                            __pyx_L5:;
                          }
                      }

                      /* "pyarrow/ipc.pxi":548
 *                                                  .ReadNextMessage()))
 * 
 *         if result.message.get() == NULL:             # <<<<<<<<<<<<<<
 *             raise StopIteration
 * 
*/
                      if (unlikely(((PyObject *)__pyx_v_result) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "message");
                        __PYX_ERR(19, 548, __pyx_L1_error)
                      }
                      __pyx_t_3 = (__pyx_v_result->message.get() == NULL);
                      if (unlikely(__pyx_t_3)) {

                        /* "pyarrow/ipc.pxi":549
 * 
 *         if result.message.get() == NULL:
 *             raise StopIteration             # <<<<<<<<<<<<<<
 * 
 *         return result
*/
                        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_StopIteration))), 0, 0, 0);
                        __PYX_ERR(19, 549, __pyx_L1_error)

                        /* "pyarrow/ipc.pxi":548
 *                                                  .ReadNextMessage()))
 * 
 *         if result.message.get() == NULL:             # <<<<<<<<<<<<<<
 *             raise StopIteration
 * 
*/
                      }

                      /* "pyarrow/ipc.pxi":551
 *             raise StopIteration
 * 
 *         return result             # <<<<<<<<<<<<<<
 * 
 * # ----------------------------------------------------------------------
*/
                      __Pyx_XDECREF(__pyx_r);
                      __Pyx_INCREF((PyObject *)__pyx_v_result);
                      __pyx_r = ((PyObject *)__pyx_v_result);
                      goto __pyx_L0;

                      /* "pyarrow/ipc.pxi":533
 *         return self.read_next_message()
 * 
 *     def read_next_message(self):             # <<<<<<<<<<<<<<
 *         """
 *         Read next Message from the stream.
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_AddTraceback("pyarrow.lib.MessageReader.read_next_message", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XDECREF((PyObject *)__pyx_v_result);
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_13MessageReader_13__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_13MessageReader_12__reduce_cython__, "MessageReader.__reduce_cython__(self)");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_13MessageReader_13__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_13MessageReader_13__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_13MessageReader_12__reduce_cython__};
                    static PyObject *__pyx_pw_7pyarrow_3lib_13MessageReader_13__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; }
                      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                      if (unlikely(__pyx_kwds_len < 0)) return NULL;
                      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;}
                      __pyx_r = __pyx_pf_7pyarrow_3lib_13MessageReader_12__reduce_cython__(((struct __pyx_obj_7pyarrow_3lib_MessageReader *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_13MessageReader_12__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_MessageReader *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__reduce_cython__", 0);

                      /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/
                      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0);
                      __PYX_ERR(7, 2, __pyx_L1_error)

                      /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib.MessageReader.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_13MessageReader_15__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_13MessageReader_14__setstate_cython__, "MessageReader.__setstate_cython__(self, __pyx_state)");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_13MessageReader_15__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_13MessageReader_15__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_13MessageReader_14__setstate_cython__};
                    static PyObject *__pyx_pw_7pyarrow_3lib_13MessageReader_15__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[1] = {0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(7, 3, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(7, 3, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(7, 3, __pyx_L3_error)
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(7, 3, __pyx_L3_error) }
                          }
                        } else if (unlikely(__pyx_nargs != 1)) {
                          goto __pyx_L5_argtuple_error;
                        } else {
                          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(7, 3, __pyx_L3_error)
                        }
                        __pyx_v___pyx_state = values[0];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(7, 3, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.MessageReader.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_13MessageReader_14__setstate_cython__(((struct __pyx_obj_7pyarrow_3lib_MessageReader *)__pyx_v_self), __pyx_v___pyx_state);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_13MessageReader_14__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_MessageReader *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__setstate_cython__", 0);

                      /* "(tree fragment)":4
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
*/
                      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0);
                      __PYX_ERR(7, 4, __pyx_L1_error)

                      /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib.MessageReader.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/ipc.pxi":565
 *     # cdef block is in lib.pxd
 * 
 *     def write(self, table_or_batch):             # <<<<<<<<<<<<<<
 *         """
 *         Write RecordBatch or Table to stream.
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_19_CRecordBatchWriter_1write(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_19_CRecordBatchWriter_write, "_CRecordBatchWriter.write(self, table_or_batch)\n\nWrite RecordBatch or Table to stream.\n\nParameters\n----------\ntable_or_batch : {RecordBatch, Table}");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_19_CRecordBatchWriter_1write = {"write", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_19_CRecordBatchWriter_1write, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_19_CRecordBatchWriter_write};
                    static PyObject *__pyx_pw_7pyarrow_3lib_19_CRecordBatchWriter_1write(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      PyObject *__pyx_v_table_or_batch = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[1] = {0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("write (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_table_or_batch,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(19, 565, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(19, 565, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "write", 0) < (0)) __PYX_ERR(19, 565, __pyx_L3_error)
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("write", 1, 1, 1, i); __PYX_ERR(19, 565, __pyx_L3_error) }
                          }
                        } else if (unlikely(__pyx_nargs != 1)) {
                          goto __pyx_L5_argtuple_error;
                        } else {
                          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(19, 565, __pyx_L3_error)
                        }
                        __pyx_v_table_or_batch = values[0];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("write", 1, 1, 1, __pyx_nargs); __PYX_ERR(19, 565, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib._CRecordBatchWriter.write", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_19_CRecordBatchWriter_write(((struct __pyx_obj_7pyarrow_3lib__CRecordBatchWriter *)__pyx_v_self), __pyx_v_table_or_batch);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_19_CRecordBatchWriter_write(struct __pyx_obj_7pyarrow_3lib__CRecordBatchWriter *__pyx_v_self, PyObject *__pyx_v_table_or_batch) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_t_1;
                      PyObject *__pyx_t_2 = NULL;
                      PyObject *__pyx_t_3 = NULL;
                      size_t __pyx_t_4;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("write", 0);

                      /* "pyarrow/ipc.pxi":573
 *         table_or_batch : {RecordBatch, Table}
 *         """
 *         if isinstance(table_or_batch, RecordBatch):             # <<<<<<<<<<<<<<
 *             self.write_batch(table_or_batch)
 *         elif isinstance(table_or_batch, Table):
*/
                      __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_table_or_batch, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RecordBatch); 
                      if (__pyx_t_1) {

                        /* "pyarrow/ipc.pxi":574
 *         """
 *         if isinstance(table_or_batch, RecordBatch):
 *             self.write_batch(table_or_batch)             # <<<<<<<<<<<<<<
 *         elif isinstance(table_or_batch, Table):
 *             self.write_table(table_or_batch)
*/
                        __pyx_t_3 = ((PyObject *)__pyx_v_self);
                        __Pyx_INCREF(__pyx_t_3);
                        __pyx_t_4 = 0;
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_table_or_batch};
                          __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_write_batch, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                          if (unlikely(!__pyx_t_2)) __PYX_ERR(19, 574, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_2);
                        }
                        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

                        /* "pyarrow/ipc.pxi":573
 *         table_or_batch : {RecordBatch, Table}
 *         """
 *         if isinstance(table_or_batch, RecordBatch):             # <<<<<<<<<<<<<<
 *             self.write_batch(table_or_batch)
 *         elif isinstance(table_or_batch, Table):
*/
                        goto __pyx_L3;
                      }

                      /* "pyarrow/ipc.pxi":575
 *         if isinstance(table_or_batch, RecordBatch):
 *             self.write_batch(table_or_batch)
 *         elif isinstance(table_or_batch, Table):             # <<<<<<<<<<<<<<
 *             self.write_table(table_or_batch)
 *         else:
*/
                      __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_table_or_batch, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Table); 
                      if (likely(__pyx_t_1)) {

                        /* "pyarrow/ipc.pxi":576
 *             self.write_batch(table_or_batch)
 *         elif isinstance(table_or_batch, Table):
 *             self.write_table(table_or_batch)             # <<<<<<<<<<<<<<
 *         else:
 *             raise ValueError(type(table_or_batch))
*/
                        __pyx_t_3 = ((PyObject *)__pyx_v_self);
                        __Pyx_INCREF(__pyx_t_3);
                        __pyx_t_4 = 0;
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_table_or_batch};
                          __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_write_table, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                          if (unlikely(!__pyx_t_2)) __PYX_ERR(19, 576, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_2);
                        }
                        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

                        /* "pyarrow/ipc.pxi":575
 *         if isinstance(table_or_batch, RecordBatch):
 *             self.write_batch(table_or_batch)
 *         elif isinstance(table_or_batch, Table):             # <<<<<<<<<<<<<<
 *             self.write_table(table_or_batch)
 *         else:
*/
                        goto __pyx_L3;
                      }

                      /* "pyarrow/ipc.pxi":578
 *             self.write_table(table_or_batch)
 *         else:
 *             raise ValueError(type(table_or_batch))             # <<<<<<<<<<<<<<
 * 
 *     def write_batch(self, RecordBatch batch, custom_metadata=None):
*/
                      /*else*/ {
                        __pyx_t_3 = NULL;
                        __pyx_t_4 = 1;
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_3, ((PyObject *)Py_TYPE(__pyx_v_table_or_batch))};
                          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                          if (unlikely(!__pyx_t_2)) __PYX_ERR(19, 578, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_2);
                        }
                        __Pyx_Raise(__pyx_t_2, 0, 0, 0);
                        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                        __PYX_ERR(19, 578, __pyx_L1_error)
                      }
                      __pyx_L3:;

                      /* "pyarrow/ipc.pxi":565
 *     # cdef block is in lib.pxd
 * 
 *     def write(self, table_or_batch):             # <<<<<<<<<<<<<<
 *         """
 *         Write RecordBatch or Table to stream.
*/

                      /* 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_AddTraceback("pyarrow.lib._CRecordBatchWriter.write", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/ipc.pxi":580
 *             raise ValueError(type(table_or_batch))
 * 
 *     def write_batch(self, RecordBatch batch, custom_metadata=None):             # <<<<<<<<<<<<<<
 *         """
 *         Write RecordBatch to stream.
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_19_CRecordBatchWriter_3write_batch(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_19_CRecordBatchWriter_2write_batch, "_CRecordBatchWriter.write_batch(self, RecordBatch batch, custom_metadata=None)\n\nWrite RecordBatch to stream.\n\nParameters\n----------\nbatch : RecordBatch\ncustom_metadata : mapping or KeyValueMetadata\n    Keys and values must be string-like / coercible to bytes");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_19_CRecordBatchWriter_3write_batch = {"write_batch", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_19_CRecordBatchWriter_3write_batch, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_19_CRecordBatchWriter_2write_batch};
                    static PyObject *__pyx_pw_7pyarrow_3lib_19_CRecordBatchWriter_3write_batch(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      struct __pyx_obj_7pyarrow_3lib_RecordBatch *__pyx_v_batch = 0;
                      PyObject *__pyx_v_custom_metadata = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[2] = {0,0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("write_batch (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_batch,&__pyx_mstate_global->__pyx_n_u_custom_metadata,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(19, 580, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  2:
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(19, 580, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(19, 580, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "write_batch", 0) < (0)) __PYX_ERR(19, 580, __pyx_L3_error)
                          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("write_batch", 0, 1, 2, i); __PYX_ERR(19, 580, __pyx_L3_error) }
                          }
                        } else {
                          switch (__pyx_nargs) {
                            case  2:
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(19, 580, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(19, 580, __pyx_L3_error)
                            break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
                        }
                        __pyx_v_batch = ((struct __pyx_obj_7pyarrow_3lib_RecordBatch *)values[0]);
                        __pyx_v_custom_metadata = values[1];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("write_batch", 0, 1, 2, __pyx_nargs); __PYX_ERR(19, 580, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib._CRecordBatchWriter.write_batch", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_batch), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RecordBatch, 1, "batch", 0))) __PYX_ERR(19, 580, __pyx_L1_error)
                      __pyx_r = __pyx_pf_7pyarrow_3lib_19_CRecordBatchWriter_2write_batch(((struct __pyx_obj_7pyarrow_3lib__CRecordBatchWriter *)__pyx_v_self), __pyx_v_batch, __pyx_v_custom_metadata);

                      /* function exit code */
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __pyx_r = NULL;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      goto __pyx_L7_cleaned_up;
                      __pyx_L0:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __pyx_L7_cleaned_up:;
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_19_CRecordBatchWriter_2write_batch(struct __pyx_obj_7pyarrow_3lib__CRecordBatchWriter *__pyx_v_self, struct __pyx_obj_7pyarrow_3lib_RecordBatch *__pyx_v_batch, PyObject *__pyx_v_custom_metadata) {
                      struct __pyx_obj_7pyarrow_3lib_KeyValueMetadata *__pyx_v_metadata = NULL;
                      std::shared_ptr< arrow::KeyValueMetadata const >  __pyx_v_c_meta;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      struct __pyx_opt_args_7pyarrow_3lib_ensure_metadata __pyx_t_2;
                      std::shared_ptr< arrow::KeyValueMetadata const >  __pyx_t_3;
                      int __pyx_t_4;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("write_batch", 0);

                      /* "pyarrow/ipc.pxi":590
 *             Keys and values must be string-like / coercible to bytes
 *         """
 *         metadata = ensure_metadata(custom_metadata, allow_none=True)             # <<<<<<<<<<<<<<
 *         c_meta = pyarrow_unwrap_metadata(metadata)
 * 
*/
                      __pyx_t_2.__pyx_n = 1;
                      __pyx_t_2.allow_none = 1;
                      __pyx_t_1 = ((PyObject *)__pyx_f_7pyarrow_3lib_ensure_metadata(__pyx_v_custom_metadata, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 590, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_v_metadata = ((struct __pyx_obj_7pyarrow_3lib_KeyValueMetadata *)__pyx_t_1);
                      __pyx_t_1 = 0;

                      /* "pyarrow/ipc.pxi":591
 *         """
 *         metadata = ensure_metadata(custom_metadata, allow_none=True)
 *         c_meta = pyarrow_unwrap_metadata(metadata)             # <<<<<<<<<<<<<<
 * 
 *         with nogil:
*/
                      __pyx_t_3 = __pyx_f_7pyarrow_3lib_pyarrow_unwrap_metadata(((PyObject *)__pyx_v_metadata)); if (unlikely(PyErr_Occurred())) __PYX_ERR(19, 591, __pyx_L1_error)
                      __pyx_v_c_meta = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_3);

                      /* "pyarrow/ipc.pxi":593
 *         c_meta = pyarrow_unwrap_metadata(metadata)
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             check_status(self.writer.get()
 *                          .WriteRecordBatch(deref(batch.batch), c_meta))
*/
                      {
                          PyThreadState * _save;
                          _save = PyEval_SaveThread();
                          __Pyx_FastGIL_Remember();
                          /*try:*/ {

                            /* "pyarrow/ipc.pxi":594
 * 
 *         with nogil:
 *             check_status(self.writer.get()             # <<<<<<<<<<<<<<
 *                          .WriteRecordBatch(deref(batch.batch), c_meta))
 * 
*/
                            if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                              PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "writer");
                              __Pyx_PyGILState_Release(__pyx_gilstate_save);
                              __PYX_ERR(19, 594, __pyx_L4_error)
                            }

                            /* "pyarrow/ipc.pxi":595
 *         with nogil:
 *             check_status(self.writer.get()
 *                          .WriteRecordBatch(deref(batch.batch), c_meta))             # <<<<<<<<<<<<<<
 * 
 *     def write_table(self, Table table, max_chunksize=None):
*/
                            if (unlikely(((PyObject *)__pyx_v_batch) == Py_None)) {
                              PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "batch");
                              __Pyx_PyGILState_Release(__pyx_gilstate_save);
                              __PYX_ERR(19, 595, __pyx_L4_error)
                            }

                            /* "pyarrow/ipc.pxi":594
 * 
 *         with nogil:
 *             check_status(self.writer.get()             # <<<<<<<<<<<<<<
 *                          .WriteRecordBatch(deref(batch.batch), c_meta))
 * 
*/
                            __pyx_t_4 = __pyx_f_7pyarrow_3lib_check_status(__pyx_v_self->writer.get()->WriteRecordBatch((*__pyx_v_batch->batch), __pyx_v_c_meta)); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(19, 594, __pyx_L4_error)
                          }

                          /* "pyarrow/ipc.pxi":593
 *         c_meta = pyarrow_unwrap_metadata(metadata)
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             check_status(self.writer.get()
 *                          .WriteRecordBatch(deref(batch.batch), c_meta))
*/
                          /*finally:*/ {
                            /*normal exit:*/{
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L5;
                            }
                            __pyx_L4_error: {
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L1_error;
                            }
                            __pyx_L5:;
                          }
                      }

                      /* "pyarrow/ipc.pxi":580
 *             raise ValueError(type(table_or_batch))
 * 
 *     def write_batch(self, RecordBatch batch, custom_metadata=None):             # <<<<<<<<<<<<<<
 *         """
 *         Write RecordBatch to stream.
*/

                      /* function exit code */
                      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_AddTraceback("pyarrow.lib._CRecordBatchWriter.write_batch", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XDECREF((PyObject *)__pyx_v_metadata);
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/ipc.pxi":597
 *                          .WriteRecordBatch(deref(batch.batch), c_meta))
 * 
 *     def write_table(self, Table table, max_chunksize=None):             # <<<<<<<<<<<<<<
 *         """
 *         Write Table to stream in (contiguous) RecordBatch objects.
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_19_CRecordBatchWriter_5write_table(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_19_CRecordBatchWriter_4write_table, "_CRecordBatchWriter.write_table(self, Table table, max_chunksize=None)\n\nWrite Table to stream in (contiguous) RecordBatch objects.\n\nParameters\n----------\ntable : Table\nmax_chunksize : int, default None\n    Maximum number of rows for RecordBatch chunks. Individual chunks may\n    be smaller depending on the chunk layout of individual columns.");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_19_CRecordBatchWriter_5write_table = {"write_table", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_19_CRecordBatchWriter_5write_table, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_19_CRecordBatchWriter_4write_table};
                    static PyObject *__pyx_pw_7pyarrow_3lib_19_CRecordBatchWriter_5write_table(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      struct __pyx_obj_7pyarrow_3lib_Table *__pyx_v_table = 0;
                      PyObject *__pyx_v_max_chunksize = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[2] = {0,0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("write_table (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_table,&__pyx_mstate_global->__pyx_n_u_max_chunksize,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(19, 597, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  2:
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(19, 597, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(19, 597, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "write_table", 0) < (0)) __PYX_ERR(19, 597, __pyx_L3_error)
                          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("write_table", 0, 1, 2, i); __PYX_ERR(19, 597, __pyx_L3_error) }
                          }
                        } else {
                          switch (__pyx_nargs) {
                            case  2:
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(19, 597, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(19, 597, __pyx_L3_error)
                            break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
                        }
                        __pyx_v_table = ((struct __pyx_obj_7pyarrow_3lib_Table *)values[0]);
                        __pyx_v_max_chunksize = values[1];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("write_table", 0, 1, 2, __pyx_nargs); __PYX_ERR(19, 597, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib._CRecordBatchWriter.write_table", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_table), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Table, 1, "table", 0))) __PYX_ERR(19, 597, __pyx_L1_error)
                      __pyx_r = __pyx_pf_7pyarrow_3lib_19_CRecordBatchWriter_4write_table(((struct __pyx_obj_7pyarrow_3lib__CRecordBatchWriter *)__pyx_v_self), __pyx_v_table, __pyx_v_max_chunksize);

                      /* function exit code */
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __pyx_r = NULL;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      goto __pyx_L7_cleaned_up;
                      __pyx_L0:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __pyx_L7_cleaned_up:;
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_19_CRecordBatchWriter_4write_table(struct __pyx_obj_7pyarrow_3lib__CRecordBatchWriter *__pyx_v_self, struct __pyx_obj_7pyarrow_3lib_Table *__pyx_v_table, PyObject *__pyx_v_max_chunksize) {
                      int64_t __pyx_v_c_max_chunksize;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_t_1;
                      int64_t __pyx_t_2;
                      int __pyx_t_3;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("write_table", 0);

                      /* "pyarrow/ipc.pxi":610
 *         cdef:
 *             # max_chunksize must be > 0 to have any impact
 *             int64_t c_max_chunksize = -1             # <<<<<<<<<<<<<<
 * 
 *         if max_chunksize is not None:
*/
                      __pyx_v_c_max_chunksize = -1L;

                      /* "pyarrow/ipc.pxi":612
 *             int64_t c_max_chunksize = -1
 * 
 *         if max_chunksize is not None:             # <<<<<<<<<<<<<<
 *             c_max_chunksize = max_chunksize
 * 
*/
                      __pyx_t_1 = (__pyx_v_max_chunksize != Py_None);
                      if (__pyx_t_1) {

                        /* "pyarrow/ipc.pxi":613
 * 
 *         if max_chunksize is not None:
 *             c_max_chunksize = max_chunksize             # <<<<<<<<<<<<<<
 * 
 *         with nogil:
*/
                        __pyx_t_2 = __Pyx_PyLong_As_int64_t(__pyx_v_max_chunksize); if (unlikely((__pyx_t_2 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(19, 613, __pyx_L1_error)
                        __pyx_v_c_max_chunksize = __pyx_t_2;

                        /* "pyarrow/ipc.pxi":612
 *             int64_t c_max_chunksize = -1
 * 
 *         if max_chunksize is not None:             # <<<<<<<<<<<<<<
 *             c_max_chunksize = max_chunksize
 * 
*/
                      }

                      /* "pyarrow/ipc.pxi":615
 *             c_max_chunksize = max_chunksize
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             check_status(self.writer.get().WriteTable(table.table[0],
 *                                                       c_max_chunksize))
*/
                      {
                          PyThreadState * _save;
                          _save = PyEval_SaveThread();
                          __Pyx_FastGIL_Remember();
                          /*try:*/ {

                            /* "pyarrow/ipc.pxi":616
 * 
 *         with nogil:
 *             check_status(self.writer.get().WriteTable(table.table[0],             # <<<<<<<<<<<<<<
 *                                                       c_max_chunksize))
 * 
*/
                            if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                              PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "writer");
                              __Pyx_PyGILState_Release(__pyx_gilstate_save);
                              __PYX_ERR(19, 616, __pyx_L5_error)
                            }
                            if (unlikely(((PyObject *)__pyx_v_table) == Py_None)) {
                              PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "table");
                              __Pyx_PyGILState_Release(__pyx_gilstate_save);
                              __PYX_ERR(19, 616, __pyx_L5_error)
                            }

                            /* "pyarrow/ipc.pxi":617
 *         with nogil:
 *             check_status(self.writer.get().WriteTable(table.table[0],
 *                                                       c_max_chunksize))             # <<<<<<<<<<<<<<
 * 
 *     def close(self):
*/
                            __pyx_t_3 = __pyx_f_7pyarrow_3lib_check_status(__pyx_v_self->writer.get()->WriteTable((__pyx_v_table->table[0]), __pyx_v_c_max_chunksize)); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(19, 616, __pyx_L5_error)
                          }

                          /* "pyarrow/ipc.pxi":615
 *             c_max_chunksize = max_chunksize
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             check_status(self.writer.get().WriteTable(table.table[0],
 *                                                       c_max_chunksize))
*/
                          /*finally:*/ {
                            /*normal exit:*/{
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L6;
                            }
                            __pyx_L5_error: {
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L1_error;
                            }
                            __pyx_L6:;
                          }
                      }

                      /* "pyarrow/ipc.pxi":597
 *                          .WriteRecordBatch(deref(batch.batch), c_meta))
 * 
 *     def write_table(self, Table table, max_chunksize=None):             # <<<<<<<<<<<<<<
 *         """
 *         Write Table to stream in (contiguous) RecordBatch objects.
*/

                      /* function exit code */
                      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib._CRecordBatchWriter.write_table", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/ipc.pxi":619
 *                                                       c_max_chunksize))
 * 
 *     def close(self):             # <<<<<<<<<<<<<<
 *         """
 *         Close stream and write end-of-stream 0 marker.
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_19_CRecordBatchWriter_7close(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_19_CRecordBatchWriter_6close, "_CRecordBatchWriter.close(self)\n\nClose stream and write end-of-stream 0 marker.");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_19_CRecordBatchWriter_7close = {"close", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_19_CRecordBatchWriter_7close, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_19_CRecordBatchWriter_6close};
                    static PyObject *__pyx_pw_7pyarrow_3lib_19_CRecordBatchWriter_7close(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("close (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("close", 1, 0, 0, __pyx_nargs); return NULL; }
                      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                      if (unlikely(__pyx_kwds_len < 0)) return NULL;
                      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("close", __pyx_kwds); return NULL;}
                      __pyx_r = __pyx_pf_7pyarrow_3lib_19_CRecordBatchWriter_6close(((struct __pyx_obj_7pyarrow_3lib__CRecordBatchWriter *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_19_CRecordBatchWriter_6close(struct __pyx_obj_7pyarrow_3lib__CRecordBatchWriter *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_t_1;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("close", 0);

                      /* "pyarrow/ipc.pxi":623
 *         Close stream and write end-of-stream 0 marker.
 *         """
 *         with nogil:             # <<<<<<<<<<<<<<
 *             check_status(self.writer.get().Close())
 * 
*/
                      {
                          PyThreadState * _save;
                          _save = PyEval_SaveThread();
                          __Pyx_FastGIL_Remember();
                          /*try:*/ {

                            /* "pyarrow/ipc.pxi":624
 *         """
 *         with nogil:
 *             check_status(self.writer.get().Close())             # <<<<<<<<<<<<<<
 * 
 *     def __enter__(self):
*/
                            if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                              PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "writer");
                              __Pyx_PyGILState_Release(__pyx_gilstate_save);
                              __PYX_ERR(19, 624, __pyx_L4_error)
                            }
                            __pyx_t_1 = __pyx_f_7pyarrow_3lib_check_status(__pyx_v_self->writer.get()->Close()); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(19, 624, __pyx_L4_error)
                          }

                          /* "pyarrow/ipc.pxi":623
 *         Close stream and write end-of-stream 0 marker.
 *         """
 *         with nogil:             # <<<<<<<<<<<<<<
 *             check_status(self.writer.get().Close())
 * 
*/
                          /*finally:*/ {
                            /*normal exit:*/{
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L5;
                            }
                            __pyx_L4_error: {
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L1_error;
                            }
                            __pyx_L5:;
                          }
                      }

                      /* "pyarrow/ipc.pxi":619
 *                                                       c_max_chunksize))
 * 
 *     def close(self):             # <<<<<<<<<<<<<<
 *         """
 *         Close stream and write end-of-stream 0 marker.
*/

                      /* function exit code */
                      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib._CRecordBatchWriter.close", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/ipc.pxi":626
 *             check_status(self.writer.get().Close())
 * 
 *     def __enter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_19_CRecordBatchWriter_9__enter__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_19_CRecordBatchWriter_8__enter__, "_CRecordBatchWriter.__enter__(self)");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_19_CRecordBatchWriter_9__enter__ = {"__enter__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_19_CRecordBatchWriter_9__enter__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_19_CRecordBatchWriter_8__enter__};
                    static PyObject *__pyx_pw_7pyarrow_3lib_19_CRecordBatchWriter_9__enter__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__enter__ (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__enter__", 1, 0, 0, __pyx_nargs); return NULL; }
                      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                      if (unlikely(__pyx_kwds_len < 0)) return NULL;
                      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__enter__", __pyx_kwds); return NULL;}
                      __pyx_r = __pyx_pf_7pyarrow_3lib_19_CRecordBatchWriter_8__enter__(((struct __pyx_obj_7pyarrow_3lib__CRecordBatchWriter *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_19_CRecordBatchWriter_8__enter__(struct __pyx_obj_7pyarrow_3lib__CRecordBatchWriter *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__enter__", 0);

                      /* "pyarrow/ipc.pxi":627
 * 
 *     def __enter__(self):
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def __exit__(self, exc_type, exc_val, exc_tb):
*/
                      __Pyx_XDECREF(__pyx_r);
                      __Pyx_INCREF((PyObject *)__pyx_v_self);
                      __pyx_r = ((PyObject *)__pyx_v_self);
                      goto __pyx_L0;

                      /* "pyarrow/ipc.pxi":626
 *             check_status(self.writer.get().Close())
 * 
 *     def __enter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
*/

                      /* function exit code */
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/ipc.pxi":629
 *         return self
 * 
 *     def __exit__(self, exc_type, exc_val, exc_tb):             # <<<<<<<<<<<<<<
 *         self.close()
 * 
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_19_CRecordBatchWriter_11__exit__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_19_CRecordBatchWriter_10__exit__, "_CRecordBatchWriter.__exit__(self, exc_type, exc_val, exc_tb)");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_19_CRecordBatchWriter_11__exit__ = {"__exit__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_19_CRecordBatchWriter_11__exit__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_19_CRecordBatchWriter_10__exit__};
                    static PyObject *__pyx_pw_7pyarrow_3lib_19_CRecordBatchWriter_11__exit__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      CYTHON_UNUSED PyObject *__pyx_v_exc_type = 0;
                      CYTHON_UNUSED PyObject *__pyx_v_exc_val = 0;
                      CYTHON_UNUSED PyObject *__pyx_v_exc_tb = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[3] = {0,0,0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__exit__ (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_exc_type,&__pyx_mstate_global->__pyx_n_u_exc_val,&__pyx_mstate_global->__pyx_n_u_exc_tb,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(19, 629, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  3:
                            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(19, 629, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  2:
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(19, 629, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(19, 629, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__exit__", 0) < (0)) __PYX_ERR(19, 629, __pyx_L3_error)
                          for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, i); __PYX_ERR(19, 629, __pyx_L3_error) }
                          }
                        } else if (unlikely(__pyx_nargs != 3)) {
                          goto __pyx_L5_argtuple_error;
                        } else {
                          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(19, 629, __pyx_L3_error)
                          values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(19, 629, __pyx_L3_error)
                          values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(19, 629, __pyx_L3_error)
                        }
                        __pyx_v_exc_type = values[0];
                        __pyx_v_exc_val = values[1];
                        __pyx_v_exc_tb = values[2];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, __pyx_nargs); __PYX_ERR(19, 629, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib._CRecordBatchWriter.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_19_CRecordBatchWriter_10__exit__(((struct __pyx_obj_7pyarrow_3lib__CRecordBatchWriter *)__pyx_v_self), __pyx_v_exc_type, __pyx_v_exc_val, __pyx_v_exc_tb);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_19_CRecordBatchWriter_10__exit__(struct __pyx_obj_7pyarrow_3lib__CRecordBatchWriter *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_exc_type, CYTHON_UNUSED PyObject *__pyx_v_exc_val, CYTHON_UNUSED PyObject *__pyx_v_exc_tb) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      size_t __pyx_t_3;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__exit__", 0);

                      /* "pyarrow/ipc.pxi":630
 * 
 *     def __exit__(self, exc_type, exc_val, exc_tb):
 *         self.close()             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
                      __pyx_t_2 = ((PyObject *)__pyx_v_self);
                      __Pyx_INCREF(__pyx_t_2);
                      __pyx_t_3 = 0;
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
                        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_close, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 630, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

                      /* "pyarrow/ipc.pxi":629
 *         return self
 * 
 *     def __exit__(self, exc_type, exc_val, exc_tb):             # <<<<<<<<<<<<<<
 *         self.close()
 * 
*/

                      /* function exit code */
                      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_AddTraceback("pyarrow.lib._CRecordBatchWriter.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/ipc.pxi":632
 *         self.close()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def stats(self):
 *         """
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_19_CRecordBatchWriter_5stats_1__get__(PyObject *__pyx_v_self); /*proto*/
                    static PyObject *__pyx_pw_7pyarrow_3lib_19_CRecordBatchWriter_5stats_1__get__(PyObject *__pyx_v_self) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_19_CRecordBatchWriter_5stats___get__(((struct __pyx_obj_7pyarrow_3lib__CRecordBatchWriter *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_19_CRecordBatchWriter_5stats___get__(struct __pyx_obj_7pyarrow_3lib__CRecordBatchWriter *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_t_1;
                      PyObject *__pyx_t_2 = NULL;
                      PyObject *__pyx_t_3 = NULL;
                      size_t __pyx_t_4;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__get__", 0);

                      /* "pyarrow/ipc.pxi":637
 *         Current IPC write statistics.
 *         """
 *         if not self.writer:             # <<<<<<<<<<<<<<
 *             raise ValueError("Operation on closed writer")
 *         return _wrap_write_stats(self.writer.get().stats())
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "writer");
                        __PYX_ERR(19, 637, __pyx_L1_error)
                      }
                      __pyx_t_1 = ((!__pyx_v_self->writer) != 0);
                      if (unlikely(__pyx_t_1)) {

                        /* "pyarrow/ipc.pxi":638
 *         """
 *         if not self.writer:
 *             raise ValueError("Operation on closed writer")             # <<<<<<<<<<<<<<
 *         return _wrap_write_stats(self.writer.get().stats())
 * 
*/
                        __pyx_t_3 = NULL;
                        __pyx_t_4 = 1;
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Operation_on_closed_writer};
                          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                          if (unlikely(!__pyx_t_2)) __PYX_ERR(19, 638, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_2);
                        }
                        __Pyx_Raise(__pyx_t_2, 0, 0, 0);
                        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                        __PYX_ERR(19, 638, __pyx_L1_error)

                        /* "pyarrow/ipc.pxi":637
 *         Current IPC write statistics.
 *         """
 *         if not self.writer:             # <<<<<<<<<<<<<<
 *             raise ValueError("Operation on closed writer")
 *         return _wrap_write_stats(self.writer.get().stats())
*/
                      }

                      /* "pyarrow/ipc.pxi":639
 *         if not self.writer:
 *             raise ValueError("Operation on closed writer")
 *         return _wrap_write_stats(self.writer.get().stats())             # <<<<<<<<<<<<<<
 * 
 * 
*/
                      __Pyx_XDECREF(__pyx_r);
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "writer");
                        __PYX_ERR(19, 639, __pyx_L1_error)
                      }
                      __pyx_t_2 = __pyx_f_7pyarrow_3lib__wrap_write_stats(__pyx_v_self->writer.get()->stats()); if (unlikely(!__pyx_t_2)) __PYX_ERR(19, 639, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_2);
                      __pyx_r = __pyx_t_2;
                      __pyx_t_2 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/ipc.pxi":632
 *         self.close()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def stats(self):
 *         """
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_AddTraceback("pyarrow.lib._CRecordBatchWriter.stats.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.writer cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_19_CRecordBatchWriter_13__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_19_CRecordBatchWriter_12__reduce_cython__, "_CRecordBatchWriter.__reduce_cython__(self)");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_19_CRecordBatchWriter_13__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_19_CRecordBatchWriter_13__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_19_CRecordBatchWriter_12__reduce_cython__};
                    static PyObject *__pyx_pw_7pyarrow_3lib_19_CRecordBatchWriter_13__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; }
                      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                      if (unlikely(__pyx_kwds_len < 0)) return NULL;
                      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;}
                      __pyx_r = __pyx_pf_7pyarrow_3lib_19_CRecordBatchWriter_12__reduce_cython__(((struct __pyx_obj_7pyarrow_3lib__CRecordBatchWriter *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_19_CRecordBatchWriter_12__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib__CRecordBatchWriter *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__reduce_cython__", 0);

                      /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "self.writer cannot be converted to a Python object for pickling"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "self.writer cannot be converted to a Python object for pickling"
*/
                      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_self_writer_cannot_be_converted, 0, 0);
                      __PYX_ERR(7, 2, __pyx_L1_error)

                      /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.writer cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib._CRecordBatchWriter.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "self.writer cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.writer cannot be converted to a Python object for pickling"
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_19_CRecordBatchWriter_15__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_19_CRecordBatchWriter_14__setstate_cython__, "_CRecordBatchWriter.__setstate_cython__(self, __pyx_state)");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_19_CRecordBatchWriter_15__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_19_CRecordBatchWriter_15__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_19_CRecordBatchWriter_14__setstate_cython__};
                    static PyObject *__pyx_pw_7pyarrow_3lib_19_CRecordBatchWriter_15__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[1] = {0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(7, 3, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(7, 3, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(7, 3, __pyx_L3_error)
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(7, 3, __pyx_L3_error) }
                          }
                        } else if (unlikely(__pyx_nargs != 1)) {
                          goto __pyx_L5_argtuple_error;
                        } else {
                          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(7, 3, __pyx_L3_error)
                        }
                        __pyx_v___pyx_state = values[0];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(7, 3, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib._CRecordBatchWriter.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_19_CRecordBatchWriter_14__setstate_cython__(((struct __pyx_obj_7pyarrow_3lib__CRecordBatchWriter *)__pyx_v_self), __pyx_v___pyx_state);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_19_CRecordBatchWriter_14__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib__CRecordBatchWriter *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__setstate_cython__", 0);

                      /* "(tree fragment)":4
 *     raise TypeError, "self.writer cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "self.writer cannot be converted to a Python object for pickling"             # <<<<<<<<<<<<<<
*/
                      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_self_writer_cannot_be_converted, 0, 0);
                      __PYX_ERR(7, 4, __pyx_L1_error)

                      /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "self.writer cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.writer cannot be converted to a Python object for pickling"
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib._CRecordBatchWriter.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/ipc.pxi":647
 *         bint closed
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         pass
 * 
*/

                    /* Python wrapper */
                    static int __pyx_pw_7pyarrow_3lib_24_RecordBatchStreamWriter_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
                    static int __pyx_pw_7pyarrow_3lib_24_RecordBatchStreamWriter_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      int __pyx_r;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, __pyx_nargs); return -1; }
                      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
                      if (unlikely(__pyx_kwds_len < 0)) return -1;
                      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__cinit__", __pyx_kwds); return -1;}
                      __pyx_r = __pyx_pf_7pyarrow_3lib_24_RecordBatchStreamWriter___cinit__(((struct __pyx_obj_7pyarrow_3lib__RecordBatchStreamWriter *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static int __pyx_pf_7pyarrow_3lib_24_RecordBatchStreamWriter___cinit__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib__RecordBatchStreamWriter *__pyx_v_self) {
                      int __pyx_r;

                      /* function exit code */
                      __pyx_r = 0;
                      return __pyx_r;
                    }

                    /* "pyarrow/ipc.pxi":650
 *         pass
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         pass
 * 
*/

                    /* Python wrapper */
                    static void __pyx_pw_7pyarrow_3lib_24_RecordBatchStreamWriter_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
                    static void __pyx_pw_7pyarrow_3lib_24_RecordBatchStreamWriter_3__dealloc__(PyObject *__pyx_v_self) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_pf_7pyarrow_3lib_24_RecordBatchStreamWriter_2__dealloc__(((struct __pyx_obj_7pyarrow_3lib__RecordBatchStreamWriter *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                    }

                    static void __pyx_pf_7pyarrow_3lib_24_RecordBatchStreamWriter_2__dealloc__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib__RecordBatchStreamWriter *__pyx_v_self) {

                      /* function exit code */
                    }

                    /* "pyarrow/ipc.pxi":653
 *         pass
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def _use_legacy_format(self):
 *         # For testing (see test_ipc.py)
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_24_RecordBatchStreamWriter_18_use_legacy_format_1__get__(PyObject *__pyx_v_self); /*proto*/
                    static PyObject *__pyx_pw_7pyarrow_3lib_24_RecordBatchStreamWriter_18_use_legacy_format_1__get__(PyObject *__pyx_v_self) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_24_RecordBatchStreamWriter_18_use_legacy_format___get__(((struct __pyx_obj_7pyarrow_3lib__RecordBatchStreamWriter *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_24_RecordBatchStreamWriter_18_use_legacy_format___get__(struct __pyx_obj_7pyarrow_3lib__RecordBatchStreamWriter *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__get__", 0);

                      /* "pyarrow/ipc.pxi":656
 *     def _use_legacy_format(self):
 *         # For testing (see test_ipc.py)
 *         return self.options.write_legacy_ipc_format             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
                      __Pyx_XDECREF(__pyx_r);
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "options");
                        __PYX_ERR(19, 656, __pyx_L1_error)
                      }
                      __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->options.write_legacy_ipc_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 656, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_r = __pyx_t_1;
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/ipc.pxi":653
 *         pass
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def _use_legacy_format(self):
 *         # For testing (see test_ipc.py)
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_AddTraceback("pyarrow.lib._RecordBatchStreamWriter._use_legacy_format.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/ipc.pxi":658
 *         return self.options.write_legacy_ipc_format
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def _metadata_version(self):
 *         # For testing (see test_ipc.py)
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_24_RecordBatchStreamWriter_17_metadata_version_1__get__(PyObject *__pyx_v_self); /*proto*/
                    static PyObject *__pyx_pw_7pyarrow_3lib_24_RecordBatchStreamWriter_17_metadata_version_1__get__(PyObject *__pyx_v_self) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_24_RecordBatchStreamWriter_17_metadata_version___get__(((struct __pyx_obj_7pyarrow_3lib__RecordBatchStreamWriter *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_24_RecordBatchStreamWriter_17_metadata_version___get__(struct __pyx_obj_7pyarrow_3lib__RecordBatchStreamWriter *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__get__", 0);

                      /* "pyarrow/ipc.pxi":661
 *     def _metadata_version(self):
 *         # For testing (see test_ipc.py)
 *         return _wrap_metadata_version(self.options.metadata_version)             # <<<<<<<<<<<<<<
 * 
 *     def _open(self, sink, Schema schema not None,
*/
                      __Pyx_XDECREF(__pyx_r);
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "options");
                        __PYX_ERR(19, 661, __pyx_L1_error)
                      }
                      __pyx_t_1 = __pyx_f_7pyarrow_3lib__wrap_metadata_version(__pyx_v_self->options.metadata_version); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 661, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_r = __pyx_t_1;
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/ipc.pxi":658
 *         return self.options.write_legacy_ipc_format
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def _metadata_version(self):
 *         # For testing (see test_ipc.py)
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_AddTraceback("pyarrow.lib._RecordBatchStreamWriter._metadata_version.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/ipc.pxi":663
 *         return _wrap_metadata_version(self.options.metadata_version)
 * 
 *     def _open(self, sink, Schema schema not None,             # <<<<<<<<<<<<<<
 *               IpcWriteOptions options=IpcWriteOptions()):
 *         cdef:
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_24_RecordBatchStreamWriter_5_open(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_24_RecordBatchStreamWriter_4_open, "_RecordBatchStreamWriter._open(self, sink, Schema schema, IpcWriteOptions options=IpcWriteOptions())");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_24_RecordBatchStreamWriter_5_open = {"_open", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_24_RecordBatchStreamWriter_5_open, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_24_RecordBatchStreamWriter_4_open};
                    static PyObject *__pyx_pw_7pyarrow_3lib_24_RecordBatchStreamWriter_5_open(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      PyObject *__pyx_v_sink = 0;
                      struct __pyx_obj_7pyarrow_3lib_Schema *__pyx_v_schema = 0;
                      struct __pyx_obj_7pyarrow_3lib_IpcWriteOptions *__pyx_v_options = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[3] = {0,0,0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("_open (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_sink,&__pyx_mstate_global->__pyx_n_u_schema,&__pyx_mstate_global->__pyx_n_u_options,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(19, 663, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  3:
                            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(19, 663, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  2:
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(19, 663, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(19, 663, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_open", 0) < (0)) __PYX_ERR(19, 663, __pyx_L3_error)
                          if (!values[2]) values[2] = __Pyx_NewRef((PyObject *)__pyx_mstate_global->__pyx_k__23);
                          for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_open", 0, 2, 3, i); __PYX_ERR(19, 663, __pyx_L3_error) }
                          }
                        } else {
                          switch (__pyx_nargs) {
                            case  3:
                            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(19, 663, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  2:
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(19, 663, __pyx_L3_error)
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(19, 663, __pyx_L3_error)
                            break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          if (!values[2]) values[2] = __Pyx_NewRef((PyObject *)__pyx_mstate_global->__pyx_k__23);
                        }
                        __pyx_v_sink = values[0];
                        __pyx_v_schema = ((struct __pyx_obj_7pyarrow_3lib_Schema *)values[1]);
                        __pyx_v_options = ((struct __pyx_obj_7pyarrow_3lib_IpcWriteOptions *)values[2]);
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("_open", 0, 2, 3, __pyx_nargs); __PYX_ERR(19, 663, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib._RecordBatchStreamWriter._open", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_schema), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Schema, 0, "schema", 0))) __PYX_ERR(19, 663, __pyx_L1_error)
                      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_options), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_IpcWriteOptions, 1, "options", 0))) __PYX_ERR(19, 664, __pyx_L1_error)
                      __pyx_r = __pyx_pf_7pyarrow_3lib_24_RecordBatchStreamWriter_4_open(((struct __pyx_obj_7pyarrow_3lib__RecordBatchStreamWriter *)__pyx_v_self), __pyx_v_sink, __pyx_v_schema, __pyx_v_options);

                      /* function exit code */
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __pyx_r = NULL;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      goto __pyx_L7_cleaned_up;
                      __pyx_L0:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __pyx_L7_cleaned_up:;
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_24_RecordBatchStreamWriter_4_open(struct __pyx_obj_7pyarrow_3lib__RecordBatchStreamWriter *__pyx_v_self, PyObject *__pyx_v_sink, struct __pyx_obj_7pyarrow_3lib_Schema *__pyx_v_schema, struct __pyx_obj_7pyarrow_3lib_IpcWriteOptions *__pyx_v_options) {
                      std::shared_ptr< arrow::io::OutputStream>  __pyx_v_c_sink;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                       arrow::ipc::IpcWriteOptions __pyx_t_1;
                      PyObject *__pyx_t_2 = NULL;
                      std::shared_ptr< arrow::ipc::RecordBatchWriter>  __pyx_t_3;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("_open", 0);

                      /* "pyarrow/ipc.pxi":668
 *             shared_ptr[COutputStream] c_sink
 * 
 *         self.options = options.c_options             # <<<<<<<<<<<<<<
 *         get_writer(sink, &c_sink)
 *         with nogil:
*/
                      if (unlikely(((PyObject *)__pyx_v_options) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "c_options");
                        __PYX_ERR(19, 668, __pyx_L1_error)
                      }
                      __pyx_t_1 = __pyx_v_options->c_options;
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "options");
                        __PYX_ERR(19, 668, __pyx_L1_error)
                      }
                      __pyx_v_self->options = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_1);

                      /* "pyarrow/ipc.pxi":669
 * 
 *         self.options = options.c_options
 *         get_writer(sink, &c_sink)             # <<<<<<<<<<<<<<
 *         with nogil:
 *             self.writer = GetResultValue(
*/
                      __pyx_t_2 = __pyx_f_7pyarrow_3lib_get_writer(__pyx_v_sink, (&__pyx_v_c_sink)); if (unlikely(!__pyx_t_2)) __PYX_ERR(19, 669, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_2);
                      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

                      /* "pyarrow/ipc.pxi":670
 *         self.options = options.c_options
 *         get_writer(sink, &c_sink)
 *         with nogil:             # <<<<<<<<<<<<<<
 *             self.writer = GetResultValue(
 *                 MakeStreamWriter(c_sink, schema.sp_schema,
*/
                      {
                          PyThreadState * _save;
                          _save = PyEval_SaveThread();
                          __Pyx_FastGIL_Remember();
                          /*try:*/ {

                            /* "pyarrow/ipc.pxi":673
 *             self.writer = GetResultValue(
 *                 MakeStreamWriter(c_sink, schema.sp_schema,
 *                                  self.options))             # <<<<<<<<<<<<<<
 * 
 * 
*/
                            if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                              PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "options");
                              __Pyx_PyGILState_Release(__pyx_gilstate_save);
                              __PYX_ERR(19, 673, __pyx_L4_error)
                            }

                            /* "pyarrow/ipc.pxi":671
 *         get_writer(sink, &c_sink)
 *         with nogil:
 *             self.writer = GetResultValue(             # <<<<<<<<<<<<<<
 *                 MakeStreamWriter(c_sink, schema.sp_schema,
 *                                  self.options))
*/
                            __pyx_t_3 = arrow::py::GetResultValue<std::shared_ptr< arrow::ipc::RecordBatchWriter> >(arrow::ipc::MakeStreamWriter(__pyx_v_c_sink, __pyx_v_schema->sp_schema, __pyx_v_self->options)); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(19, 671, __pyx_L4_error)
                            if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                              PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "writer");
                              __Pyx_PyGILState_Release(__pyx_gilstate_save);
                              __PYX_ERR(19, 671, __pyx_L4_error)
                            }
                            __pyx_v_self->__pyx_base.writer = __PYX_STD_MOVE_IF_SUPPORTED(((arrow::py::SharedPtrNoGIL< arrow::ipc::RecordBatchWriter> )__pyx_t_3));
                          }

                          /* "pyarrow/ipc.pxi":670
 *         self.options = options.c_options
 *         get_writer(sink, &c_sink)
 *         with nogil:             # <<<<<<<<<<<<<<
 *             self.writer = GetResultValue(
 *                 MakeStreamWriter(c_sink, schema.sp_schema,
*/
                          /*finally:*/ {
                            /*normal exit:*/{
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L5;
                            }
                            __pyx_L4_error: {
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L1_error;
                            }
                            __pyx_L5:;
                          }
                      }

                      /* "pyarrow/ipc.pxi":663
 *         return _wrap_metadata_version(self.options.metadata_version)
 * 
 *     def _open(self, sink, Schema schema not None,             # <<<<<<<<<<<<<<
 *               IpcWriteOptions options=IpcWriteOptions()):
 *         cdef:
*/

                      /* function exit code */
                      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_AddTraceback("pyarrow.lib._RecordBatchStreamWriter._open", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_24_RecordBatchStreamWriter_7__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_24_RecordBatchStreamWriter_6__reduce_cython__, "_RecordBatchStreamWriter.__reduce_cython__(self)");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_24_RecordBatchStreamWriter_7__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_24_RecordBatchStreamWriter_7__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_24_RecordBatchStreamWriter_6__reduce_cython__};
                    static PyObject *__pyx_pw_7pyarrow_3lib_24_RecordBatchStreamWriter_7__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; }
                      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                      if (unlikely(__pyx_kwds_len < 0)) return NULL;
                      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;}
                      __pyx_r = __pyx_pf_7pyarrow_3lib_24_RecordBatchStreamWriter_6__reduce_cython__(((struct __pyx_obj_7pyarrow_3lib__RecordBatchStreamWriter *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_24_RecordBatchStreamWriter_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib__RecordBatchStreamWriter *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__reduce_cython__", 0);

                      /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/
                      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0);
                      __PYX_ERR(7, 2, __pyx_L1_error)

                      /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib._RecordBatchStreamWriter.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_24_RecordBatchStreamWriter_9__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_24_RecordBatchStreamWriter_8__setstate_cython__, "_RecordBatchStreamWriter.__setstate_cython__(self, __pyx_state)");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_24_RecordBatchStreamWriter_9__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_24_RecordBatchStreamWriter_9__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_24_RecordBatchStreamWriter_8__setstate_cython__};
                    static PyObject *__pyx_pw_7pyarrow_3lib_24_RecordBatchStreamWriter_9__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[1] = {0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(7, 3, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(7, 3, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(7, 3, __pyx_L3_error)
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(7, 3, __pyx_L3_error) }
                          }
                        } else if (unlikely(__pyx_nargs != 1)) {
                          goto __pyx_L5_argtuple_error;
                        } else {
                          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(7, 3, __pyx_L3_error)
                        }
                        __pyx_v___pyx_state = values[0];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(7, 3, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib._RecordBatchStreamWriter.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_24_RecordBatchStreamWriter_8__setstate_cython__(((struct __pyx_obj_7pyarrow_3lib__RecordBatchStreamWriter *)__pyx_v_self), __pyx_v___pyx_state);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_24_RecordBatchStreamWriter_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib__RecordBatchStreamWriter *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__setstate_cython__", 0);

                      /* "(tree fragment)":4
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
*/
                      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0);
                      __PYX_ERR(7, 4, __pyx_L1_error)

                      /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib._RecordBatchStreamWriter.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/ipc.pxi":676
 * 
 * 
 * cdef _get_input_stream(object source, shared_ptr[CInputStream]* out):             # <<<<<<<<<<<<<<
 *     try:
 *         source = as_buffer(source)
*/

                    static PyObject *__pyx_f_7pyarrow_3lib__get_input_stream(PyObject *__pyx_v_source, std::shared_ptr< arrow::io::InputStream>  *__pyx_v_out) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      PyObject *__pyx_t_3 = NULL;
                      PyObject *__pyx_t_4 = NULL;
                      PyObject *__pyx_t_5 = NULL;
                      PyObject *__pyx_t_6 = NULL;
                      size_t __pyx_t_7;
                      int __pyx_t_8;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("_get_input_stream", 0);
                      __Pyx_INCREF(__pyx_v_source);

                      /* "pyarrow/ipc.pxi":677
 * 
 * cdef _get_input_stream(object source, shared_ptr[CInputStream]* out):
 *     try:             # <<<<<<<<<<<<<<
 *         source = as_buffer(source)
 *     except TypeError:
*/
                      {
                        __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:*/ {

                          /* "pyarrow/ipc.pxi":678
 * cdef _get_input_stream(object source, shared_ptr[CInputStream]* out):
 *     try:
 *         source = as_buffer(source)             # <<<<<<<<<<<<<<
 *     except TypeError:
 *         # Non-buffer-like
*/
                          __pyx_t_5 = NULL;
                          __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_as_buffer); if (unlikely(!__pyx_t_6)) __PYX_ERR(19, 678, __pyx_L3_error)
                          __Pyx_GOTREF(__pyx_t_6);
                          __pyx_t_7 = 1;
                          #if CYTHON_UNPACK_METHODS
                          if (unlikely(PyMethod_Check(__pyx_t_6))) {
                            __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
                            assert(__pyx_t_5);
                            PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
                            __Pyx_INCREF(__pyx_t_5);
                            __Pyx_INCREF(__pyx__function);
                            __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
                            __pyx_t_7 = 0;
                          }
                          #endif
                          {
                            PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_source};
                            __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                            __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
                            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                            if (unlikely(!__pyx_t_4)) __PYX_ERR(19, 678, __pyx_L3_error)
                            __Pyx_GOTREF(__pyx_t_4);
                          }
                          __Pyx_DECREF_SET(__pyx_v_source, __pyx_t_4);
                          __pyx_t_4 = 0;

                          /* "pyarrow/ipc.pxi":677
 * 
 * cdef _get_input_stream(object source, shared_ptr[CInputStream]* out):
 *     try:             # <<<<<<<<<<<<<<
 *         source = as_buffer(source)
 *     except TypeError:
*/
                        }
                        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                        goto __pyx_L8_try_end;
                        __pyx_L3_error:;
                        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
                        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;

                        /* "pyarrow/ipc.pxi":679
 *     try:
 *         source = as_buffer(source)
 *     except TypeError:             # <<<<<<<<<<<<<<
 *         # Non-buffer-like
 *         pass
*/
                        __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_TypeError))));
                        if (__pyx_t_8) {
                          __Pyx_ErrRestore(0,0,0);
                          goto __pyx_L4_exception_handled;
                        }
                        goto __pyx_L5_except_error;

                        /* "pyarrow/ipc.pxi":677
 * 
 * cdef _get_input_stream(object source, shared_ptr[CInputStream]* out):
 *     try:             # <<<<<<<<<<<<<<
 *         source = as_buffer(source)
 *     except TypeError:
*/
                        __pyx_L5_except_error:;
                        __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:;
                      }

                      /* "pyarrow/ipc.pxi":683
 *         pass
 * 
 *     get_input_stream(source, True, out)             # <<<<<<<<<<<<<<
 * 
 * 
*/
                      __pyx_t_4 = __pyx_f_7pyarrow_3lib_get_input_stream(__pyx_v_source, 1, __pyx_v_out); if (unlikely(!__pyx_t_4)) __PYX_ERR(19, 683, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_4);
                      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

                      /* "pyarrow/ipc.pxi":676
 * 
 * 
 * cdef _get_input_stream(object source, shared_ptr[CInputStream]* out):             # <<<<<<<<<<<<<<
 *     try:
 *         source = as_buffer(source)
*/

                      /* function exit code */
                      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_4);
                      __Pyx_XDECREF(__pyx_t_5);
                      __Pyx_XDECREF(__pyx_t_6);
                      __Pyx_AddTraceback("pyarrow.lib._get_input_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = 0;
                      __pyx_L0:;
                      __Pyx_XDECREF(__pyx_v_source);
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/ipc.pxi":688
 * class _ReadPandasMixin:
 * 
 *     def read_pandas(self, **options):             # <<<<<<<<<<<<<<
 *         """
 *         Read contents of stream to a pandas.DataFrame.
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_16_ReadPandasMixin_1read_pandas(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_16_ReadPandasMixin_read_pandas, "_ReadPandasMixin.read_pandas(self, **options)\n\nRead contents of stream to a pandas.DataFrame.\n\nRead all record batches as a pyarrow.Table then convert it to a\npandas.DataFrame using Table.to_pandas.\n\nParameters\n----------\n**options\n    Arguments to forward to :meth:`Table.to_pandas`.\n\nReturns\n-------\ndf : pandas.DataFrame");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_16_ReadPandasMixin_1read_pandas = {"read_pandas", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_16_ReadPandasMixin_1read_pandas, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_16_ReadPandasMixin_read_pandas};
                    static PyObject *__pyx_pw_7pyarrow_3lib_16_ReadPandasMixin_1read_pandas(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      PyObject *__pyx_v_self = 0;
                      PyObject *__pyx_v_options = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[1] = {0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("read_pandas (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      __pyx_v_options = PyDict_New(); if (unlikely(!__pyx_v_options)) return NULL;
                      __Pyx_GOTREF(__pyx_v_options);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(19, 688, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(19, 688, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, __pyx_v_options, values, kwd_pos_args, __pyx_kwds_len, "read_pandas", 1) < (0)) __PYX_ERR(19, 688, __pyx_L3_error)
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("read_pandas", 1, 1, 1, i); __PYX_ERR(19, 688, __pyx_L3_error) }
                          }
                        } else if (unlikely(__pyx_nargs != 1)) {
                          goto __pyx_L5_argtuple_error;
                        } else {
                          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(19, 688, __pyx_L3_error)
                        }
                        __pyx_v_self = values[0];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("read_pandas", 1, 1, 1, __pyx_nargs); __PYX_ERR(19, 688, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_DECREF(__pyx_v_options); __pyx_v_options = 0;
                      __Pyx_AddTraceback("pyarrow.lib._ReadPandasMixin.read_pandas", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_16_ReadPandasMixin_read_pandas(__pyx_self, __pyx_v_self, __pyx_v_options);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_DECREF(__pyx_v_options);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_16_ReadPandasMixin_read_pandas(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_options) {
                      PyObject *__pyx_v_table = NULL;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      size_t __pyx_t_3;
                      PyObject *__pyx_t_4 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("read_pandas", 0);

                      /* "pyarrow/ipc.pxi":704
 *         df : pandas.DataFrame
 *         """
 *         table = self.read_all()             # <<<<<<<<<<<<<<
 *         return table.to_pandas(**options)
 * 
*/
                      __pyx_t_2 = __pyx_v_self;
                      __Pyx_INCREF(__pyx_t_2);
                      __pyx_t_3 = 0;
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
                        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_read_all, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 704, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __pyx_v_table = __pyx_t_1;
                      __pyx_t_1 = 0;

                      /* "pyarrow/ipc.pxi":705
 *         """
 *         table = self.read_all()
 *         return table.to_pandas(**options)             # <<<<<<<<<<<<<<
 * 
 * 
*/
                      __Pyx_XDECREF(__pyx_r);
                      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_table, __pyx_mstate_global->__pyx_n_u_to_pandas_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 705, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_t_2 = PyDict_Copy(__pyx_v_options); if (unlikely(!__pyx_t_2)) __PYX_ERR(19, 705, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_2);
                      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_mstate_global->__pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(19, 705, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_4);
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                      __pyx_r = __pyx_t_4;
                      __pyx_t_4 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/ipc.pxi":688
 * class _ReadPandasMixin:
 * 
 *     def read_pandas(self, **options):             # <<<<<<<<<<<<<<
 *         """
 *         Read contents of stream to a pandas.DataFrame.
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_XDECREF(__pyx_t_4);
                      __Pyx_AddTraceback("pyarrow.lib._ReadPandasMixin.read_pandas", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XDECREF(__pyx_v_table);
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/ipc.pxi":749
 *     # cdef block is in lib.pxd
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         raise TypeError(f"Do not call {self.__class__.__name__}'s constructor directly, "
 *                         "use one of the RecordBatchReader.from_* functions instead.")
*/

                    /* Python wrapper */
                    static int __pyx_pw_7pyarrow_3lib_17RecordBatchReader_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
                    static int __pyx_pw_7pyarrow_3lib_17RecordBatchReader_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      int __pyx_r;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, __pyx_nargs); return -1; }
                      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
                      if (unlikely(__pyx_kwds_len < 0)) return -1;
                      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__init__", __pyx_kwds); return -1;}
                      __pyx_r = __pyx_pf_7pyarrow_3lib_17RecordBatchReader___init__(((struct __pyx_obj_7pyarrow_3lib_RecordBatchReader *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static int __pyx_pf_7pyarrow_3lib_17RecordBatchReader___init__(struct __pyx_obj_7pyarrow_3lib_RecordBatchReader *__pyx_v_self) {
                      int __pyx_r;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      PyObject *__pyx_t_3 = NULL;
                      PyObject *__pyx_t_4 = NULL;
                      PyObject *__pyx_t_5[3];
                      size_t __pyx_t_6;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__init__", 0);

                      /* "pyarrow/ipc.pxi":750
 * 
 *     def __init__(self):
 *         raise TypeError(f"Do not call {self.__class__.__name__}'s constructor directly, "             # <<<<<<<<<<<<<<
 *                         "use one of the RecordBatchReader.from_* functions instead.")
 * 
*/
                      __pyx_t_2 = NULL;
                      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(19, 750, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_3);
                      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_name_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(19, 750, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_4);
                      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                      __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(19, 750, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_3);
                      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                      __pyx_t_5[0] = __pyx_mstate_global->__pyx_kp_u_Do_not_call;
                      __pyx_t_5[1] = __pyx_t_3;
                      __pyx_t_5[2] = __pyx_mstate_global->__pyx_kp_u_s_constructor_directly_use_one_3;
                      __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_5, 3, 12 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + 83, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3));
                      if (unlikely(!__pyx_t_4)) __PYX_ERR(19, 750, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_4);
                      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                      __pyx_t_6 = 1;
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4};
                        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 750, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      __PYX_ERR(19, 750, __pyx_L1_error)

                      /* "pyarrow/ipc.pxi":749
 *     # cdef block is in lib.pxd
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         raise TypeError(f"Do not call {self.__class__.__name__}'s constructor directly, "
 *                         "use one of the RecordBatchReader.from_* functions instead.")
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_XDECREF(__pyx_t_4);
                      __Pyx_AddTraceback("pyarrow.lib.RecordBatchReader.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = -1;
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/ipc.pxi":753
 *                         "use one of the RecordBatchReader.from_* functions instead.")
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_17RecordBatchReader_3__iter__(PyObject *__pyx_v_self); /*proto*/
                    static PyObject *__pyx_pw_7pyarrow_3lib_17RecordBatchReader_3__iter__(PyObject *__pyx_v_self) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_17RecordBatchReader_2__iter__(((struct __pyx_obj_7pyarrow_3lib_RecordBatchReader *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_17RecordBatchReader_2__iter__(struct __pyx_obj_7pyarrow_3lib_RecordBatchReader *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__iter__", 0);

                      /* "pyarrow/ipc.pxi":754
 * 
 *     def __iter__(self):
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def __next__(self):
*/
                      __Pyx_XDECREF(__pyx_r);
                      __Pyx_INCREF((PyObject *)__pyx_v_self);
                      __pyx_r = ((PyObject *)__pyx_v_self);
                      goto __pyx_L0;

                      /* "pyarrow/ipc.pxi":753
 *                         "use one of the RecordBatchReader.from_* functions instead.")
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
*/

                      /* function exit code */
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/ipc.pxi":756
 *         return self
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         return self.read_next_batch()
 * 
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_17RecordBatchReader_5__next__(PyObject *__pyx_v_self); /*proto*/
                    static PyObject *__pyx_pw_7pyarrow_3lib_17RecordBatchReader_5__next__(PyObject *__pyx_v_self) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_17RecordBatchReader_4__next__(((struct __pyx_obj_7pyarrow_3lib_RecordBatchReader *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_17RecordBatchReader_4__next__(struct __pyx_obj_7pyarrow_3lib_RecordBatchReader *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      size_t __pyx_t_3;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__next__", 0);

                      /* "pyarrow/ipc.pxi":757
 * 
 *     def __next__(self):
 *         return self.read_next_batch()             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
                      __Pyx_XDECREF(__pyx_r);
                      __pyx_t_2 = ((PyObject *)__pyx_v_self);
                      __Pyx_INCREF(__pyx_t_2);
                      __pyx_t_3 = 0;
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
                        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_read_next_batch, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 757, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __pyx_r = __pyx_t_1;
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/ipc.pxi":756
 *         return self
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         return self.read_next_batch()
 * 
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_AddTraceback("pyarrow.lib.RecordBatchReader.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/ipc.pxi":759
 *         return self.read_next_batch()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def schema(self):
 *         """
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_17RecordBatchReader_6schema_1__get__(PyObject *__pyx_v_self); /*proto*/
                    static PyObject *__pyx_pw_7pyarrow_3lib_17RecordBatchReader_6schema_1__get__(PyObject *__pyx_v_self) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_17RecordBatchReader_6schema___get__(((struct __pyx_obj_7pyarrow_3lib_RecordBatchReader *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_17RecordBatchReader_6schema___get__(struct __pyx_obj_7pyarrow_3lib_RecordBatchReader *__pyx_v_self) {
                      std::shared_ptr< arrow::Schema>  __pyx_v_c_schema;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__get__", 0);

                      /* "pyarrow/ipc.pxi":770
 *         cdef shared_ptr[CSchema] c_schema
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             c_schema = self.reader.get().schema()
 * 
*/
                      {
                          PyThreadState * _save;
                          _save = PyEval_SaveThread();
                          __Pyx_FastGIL_Remember();
                          /*try:*/ {

                            /* "pyarrow/ipc.pxi":771
 * 
 *         with nogil:
 *             c_schema = self.reader.get().schema()             # <<<<<<<<<<<<<<
 * 
 *         return pyarrow_wrap_schema(c_schema)
*/
                            if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                              PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "reader");
                              __Pyx_PyGILState_Release(__pyx_gilstate_save);
                              __PYX_ERR(19, 771, __pyx_L4_error)
                            }
                            __pyx_v_c_schema = __pyx_v_self->reader.get()->schema();
                          }

                          /* "pyarrow/ipc.pxi":770
 *         cdef shared_ptr[CSchema] c_schema
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             c_schema = self.reader.get().schema()
 * 
*/
                          /*finally:*/ {
                            /*normal exit:*/{
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L5;
                            }
                            __pyx_L4_error: {
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L1_error;
                            }
                            __pyx_L5:;
                          }
                      }

                      /* "pyarrow/ipc.pxi":773
 *             c_schema = self.reader.get().schema()
 * 
 *         return pyarrow_wrap_schema(c_schema)             # <<<<<<<<<<<<<<
 * 
 *     def read_next_batch(self):
*/
                      __Pyx_XDECREF(__pyx_r);
                      __pyx_t_1 = pyarrow_wrap_schema(__pyx_v_c_schema); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 773, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_r = __pyx_t_1;
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/ipc.pxi":759
 *         return self.read_next_batch()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def schema(self):
 *         """
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_AddTraceback("pyarrow.lib.RecordBatchReader.schema.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/ipc.pxi":775
 *         return pyarrow_wrap_schema(c_schema)
 * 
 *     def read_next_batch(self):             # <<<<<<<<<<<<<<
 *         """
 *         Read next RecordBatch from the stream.
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_17RecordBatchReader_7read_next_batch(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_17RecordBatchReader_6read_next_batch, "RecordBatchReader.read_next_batch(self)\n\nRead next RecordBatch from the stream.\n\nRaises\n------\nStopIteration:\n    At end of stream.\n\nReturns\n-------\nRecordBatch");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_17RecordBatchReader_7read_next_batch = {"read_next_batch", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_17RecordBatchReader_7read_next_batch, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_17RecordBatchReader_6read_next_batch};
                    static PyObject *__pyx_pw_7pyarrow_3lib_17RecordBatchReader_7read_next_batch(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("read_next_batch (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("read_next_batch", 1, 0, 0, __pyx_nargs); return NULL; }
                      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                      if (unlikely(__pyx_kwds_len < 0)) return NULL;
                      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("read_next_batch", __pyx_kwds); return NULL;}
                      __pyx_r = __pyx_pf_7pyarrow_3lib_17RecordBatchReader_6read_next_batch(((struct __pyx_obj_7pyarrow_3lib_RecordBatchReader *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_17RecordBatchReader_6read_next_batch(struct __pyx_obj_7pyarrow_3lib_RecordBatchReader *__pyx_v_self) {
                      std::shared_ptr< arrow::RecordBatch>  __pyx_v_batch;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_t_1;
                      int __pyx_t_2;
                      PyObject *__pyx_t_3 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("read_next_batch", 0);

                      /* "pyarrow/ipc.pxi":790
 *         cdef shared_ptr[CRecordBatch] batch
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             check_status(self.reader.get().ReadNext(&batch))
 * 
*/
                      {
                          PyThreadState * _save;
                          _save = PyEval_SaveThread();
                          __Pyx_FastGIL_Remember();
                          /*try:*/ {

                            /* "pyarrow/ipc.pxi":791
 * 
 *         with nogil:
 *             check_status(self.reader.get().ReadNext(&batch))             # <<<<<<<<<<<<<<
 * 
 *         if batch.get() == NULL:
*/
                            if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                              PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "reader");
                              __Pyx_PyGILState_Release(__pyx_gilstate_save);
                              __PYX_ERR(19, 791, __pyx_L4_error)
                            }
                            __pyx_t_1 = __pyx_f_7pyarrow_3lib_check_status(__pyx_v_self->reader.get()->ReadNext((&__pyx_v_batch))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(19, 791, __pyx_L4_error)
                          }

                          /* "pyarrow/ipc.pxi":790
 *         cdef shared_ptr[CRecordBatch] batch
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             check_status(self.reader.get().ReadNext(&batch))
 * 
*/
                          /*finally:*/ {
                            /*normal exit:*/{
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L5;
                            }
                            __pyx_L4_error: {
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L1_error;
                            }
                            __pyx_L5:;
                          }
                      }

                      /* "pyarrow/ipc.pxi":793
 *             check_status(self.reader.get().ReadNext(&batch))
 * 
 *         if batch.get() == NULL:             # <<<<<<<<<<<<<<
 *             raise StopIteration
 * 
*/
                      __pyx_t_2 = (__pyx_v_batch.get() == NULL);
                      if (unlikely(__pyx_t_2)) {

                        /* "pyarrow/ipc.pxi":794
 * 
 *         if batch.get() == NULL:
 *             raise StopIteration             # <<<<<<<<<<<<<<
 * 
 *         return pyarrow_wrap_batch(batch)
*/
                        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_StopIteration))), 0, 0, 0);
                        __PYX_ERR(19, 794, __pyx_L1_error)

                        /* "pyarrow/ipc.pxi":793
 *             check_status(self.reader.get().ReadNext(&batch))
 * 
 *         if batch.get() == NULL:             # <<<<<<<<<<<<<<
 *             raise StopIteration
 * 
*/
                      }

                      /* "pyarrow/ipc.pxi":796
 *             raise StopIteration
 * 
 *         return pyarrow_wrap_batch(batch)             # <<<<<<<<<<<<<<
 * 
 *     def read_next_batch_with_custom_metadata(self):
*/
                      __Pyx_XDECREF(__pyx_r);
                      __pyx_t_3 = pyarrow_wrap_batch(__pyx_v_batch); if (unlikely(!__pyx_t_3)) __PYX_ERR(19, 796, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_3);
                      __pyx_r = __pyx_t_3;
                      __pyx_t_3 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/ipc.pxi":775
 *         return pyarrow_wrap_schema(c_schema)
 * 
 *     def read_next_batch(self):             # <<<<<<<<<<<<<<
 *         """
 *         Read next RecordBatch from the stream.
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_AddTraceback("pyarrow.lib.RecordBatchReader.read_next_batch", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/ipc.pxi":798
 *         return pyarrow_wrap_batch(batch)
 * 
 *     def read_next_batch_with_custom_metadata(self):             # <<<<<<<<<<<<<<
 *         """
 *         Read next RecordBatch from the stream along with its custom metadata.
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_17RecordBatchReader_9read_next_batch_with_custom_metadata(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_17RecordBatchReader_8read_next_batch_with_custom_metadata, "RecordBatchReader.read_next_batch_with_custom_metadata(self)\n\nRead next RecordBatch from the stream along with its custom metadata.\n\nRaises\n------\nStopIteration:\n    At end of stream.\n\nReturns\n-------\nbatch : RecordBatch\ncustom_metadata : KeyValueMetadata");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_17RecordBatchReader_9read_next_batch_with_custom_metadata = {"read_next_batch_with_custom_metadata", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_17RecordBatchReader_9read_next_batch_with_custom_metadata, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_17RecordBatchReader_8read_next_batch_with_custom_metadata};
                    static PyObject *__pyx_pw_7pyarrow_3lib_17RecordBatchReader_9read_next_batch_with_custom_metadata(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("read_next_batch_with_custom_metadata (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("read_next_batch_with_custom_metadata", 1, 0, 0, __pyx_nargs); return NULL; }
                      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                      if (unlikely(__pyx_kwds_len < 0)) return NULL;
                      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("read_next_batch_with_custom_metadata", __pyx_kwds); return NULL;}
                      __pyx_r = __pyx_pf_7pyarrow_3lib_17RecordBatchReader_8read_next_batch_with_custom_metadata(((struct __pyx_obj_7pyarrow_3lib_RecordBatchReader *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_17RecordBatchReader_8read_next_batch_with_custom_metadata(struct __pyx_obj_7pyarrow_3lib_RecordBatchReader *__pyx_v_self) {
                       arrow::RecordBatchWithMetadata __pyx_v_batch_with_metadata;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                       arrow::RecordBatchWithMetadata __pyx_t_1;
                      int __pyx_t_2;
                      PyObject *__pyx_t_3 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("read_next_batch_with_custom_metadata", 0);

                      /* "pyarrow/ipc.pxi":815
 *             CRecordBatchWithMetadata batch_with_metadata
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             batch_with_metadata = GetResultValue(self.reader.get().ReadNext())
 * 
*/
                      {
                          PyThreadState * _save;
                          _save = PyEval_SaveThread();
                          __Pyx_FastGIL_Remember();
                          /*try:*/ {

                            /* "pyarrow/ipc.pxi":816
 * 
 *         with nogil:
 *             batch_with_metadata = GetResultValue(self.reader.get().ReadNext())             # <<<<<<<<<<<<<<
 * 
 *         if batch_with_metadata.batch.get() == NULL:
*/
                            if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                              PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "reader");
                              __Pyx_PyGILState_Release(__pyx_gilstate_save);
                              __PYX_ERR(19, 816, __pyx_L4_error)
                            }
                            __pyx_t_1 = arrow::py::GetResultValue< arrow::RecordBatchWithMetadata>(__pyx_v_self->reader.get()->ReadNext()); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(19, 816, __pyx_L4_error)
                            __pyx_v_batch_with_metadata = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_1);
                          }

                          /* "pyarrow/ipc.pxi":815
 *             CRecordBatchWithMetadata batch_with_metadata
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             batch_with_metadata = GetResultValue(self.reader.get().ReadNext())
 * 
*/
                          /*finally:*/ {
                            /*normal exit:*/{
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L5;
                            }
                            __pyx_L4_error: {
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L1_error;
                            }
                            __pyx_L5:;
                          }
                      }

                      /* "pyarrow/ipc.pxi":818
 *             batch_with_metadata = GetResultValue(self.reader.get().ReadNext())
 * 
 *         if batch_with_metadata.batch.get() == NULL:             # <<<<<<<<<<<<<<
 *             raise StopIteration
 * 
*/
                      __pyx_t_2 = (__pyx_v_batch_with_metadata.batch.get() == NULL);
                      if (unlikely(__pyx_t_2)) {

                        /* "pyarrow/ipc.pxi":819
 * 
 *         if batch_with_metadata.batch.get() == NULL:
 *             raise StopIteration             # <<<<<<<<<<<<<<
 * 
 *         return _wrap_record_batch_with_metadata(batch_with_metadata)
*/
                        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_StopIteration))), 0, 0, 0);
                        __PYX_ERR(19, 819, __pyx_L1_error)

                        /* "pyarrow/ipc.pxi":818
 *             batch_with_metadata = GetResultValue(self.reader.get().ReadNext())
 * 
 *         if batch_with_metadata.batch.get() == NULL:             # <<<<<<<<<<<<<<
 *             raise StopIteration
 * 
*/
                      }

                      /* "pyarrow/ipc.pxi":821
 *             raise StopIteration
 * 
 *         return _wrap_record_batch_with_metadata(batch_with_metadata)             # <<<<<<<<<<<<<<
 * 
 *     def iter_batches_with_custom_metadata(self):
*/
                      __Pyx_XDECREF(__pyx_r);
                      __pyx_t_3 = __pyx_f_7pyarrow_3lib__wrap_record_batch_with_metadata(__pyx_v_batch_with_metadata); if (unlikely(!__pyx_t_3)) __PYX_ERR(19, 821, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_3);
                      __pyx_r = __pyx_t_3;
                      __pyx_t_3 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/ipc.pxi":798
 *         return pyarrow_wrap_batch(batch)
 * 
 *     def read_next_batch_with_custom_metadata(self):             # <<<<<<<<<<<<<<
 *         """
 *         Read next RecordBatch from the stream along with its custom metadata.
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_AddTraceback("pyarrow.lib.RecordBatchReader.read_next_batch_with_custom_metadata", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }
                    static PyObject *__pyx_gb_7pyarrow_3lib_17RecordBatchReader_12generator12(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

                    /* "pyarrow/ipc.pxi":823
 *         return _wrap_record_batch_with_metadata(batch_with_metadata)
 * 
 *     def iter_batches_with_custom_metadata(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterate over record batches from the stream along with their custom
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_17RecordBatchReader_11iter_batches_with_custom_metadata(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_17RecordBatchReader_10iter_batches_with_custom_metadata, "RecordBatchReader.iter_batches_with_custom_metadata(self)\n\nIterate over record batches from the stream along with their custom\nmetadata.\n\nYields\n------\nRecordBatchWithMetadata");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_17RecordBatchReader_11iter_batches_with_custom_metadata = {"iter_batches_with_custom_metadata", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_17RecordBatchReader_11iter_batches_with_custom_metadata, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_17RecordBatchReader_10iter_batches_with_custom_metadata};
                    static PyObject *__pyx_pw_7pyarrow_3lib_17RecordBatchReader_11iter_batches_with_custom_metadata(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("iter_batches_with_custom_metadata (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("iter_batches_with_custom_metadata", 1, 0, 0, __pyx_nargs); return NULL; }
                      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                      if (unlikely(__pyx_kwds_len < 0)) return NULL;
                      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("iter_batches_with_custom_metadata", __pyx_kwds); return NULL;}
                      __pyx_r = __pyx_pf_7pyarrow_3lib_17RecordBatchReader_10iter_batches_with_custom_metadata(((struct __pyx_obj_7pyarrow_3lib_RecordBatchReader *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_17RecordBatchReader_10iter_batches_with_custom_metadata(struct __pyx_obj_7pyarrow_3lib_RecordBatchReader *__pyx_v_self) {
                      struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_24_iter_batches_with_custom_metadata *__pyx_cur_scope;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("iter_batches_with_custom_metadata", 0);
                      __pyx_cur_scope = (struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_24_iter_batches_with_custom_metadata *)__pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_24_iter_batches_with_custom_metadata(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_24_iter_batches_with_custom_metadata, __pyx_mstate_global->__pyx_empty_tuple, NULL);
                      if (unlikely(!__pyx_cur_scope)) {
                        __pyx_cur_scope = ((struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_24_iter_batches_with_custom_metadata *)Py_None);
                        __Pyx_INCREF(Py_None);
                        __PYX_ERR(19, 823, __pyx_L1_error)
                      } else {
                        __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
                      }
                      __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
                      __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
                      __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
                      {
                        __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7pyarrow_3lib_17RecordBatchReader_12generator12, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[26]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_iter_batches_with_custom_metadat, __pyx_mstate_global->__pyx_n_u_RecordBatchReader_iter_batches_w, __pyx_mstate_global->__pyx_n_u_pyarrow_lib); if (unlikely(!gen)) __PYX_ERR(19, 823, __pyx_L1_error)
                        __Pyx_DECREF(__pyx_cur_scope);
                        __Pyx_RefNannyFinishContext();
                        return (PyObject *) gen;
                      }

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib.RecordBatchReader.iter_batches_with_custom_metadata", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __Pyx_DECREF((PyObject *)__pyx_cur_scope);
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_gb_7pyarrow_3lib_17RecordBatchReader_12generator12(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
                      struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_24_iter_batches_with_custom_metadata *__pyx_cur_scope = ((struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_24_iter_batches_with_custom_metadata *)__pyx_generator->closure);
                      PyObject *__pyx_r = NULL;
                      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;
                      size_t __pyx_t_6;
                      int __pyx_t_7;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("iter_batches_with_custom_metadata", 0);
                      switch (__pyx_generator->resume_label) {
                        case 0: goto __pyx_L3_first_run;
                        case 1: goto __pyx_L14_resume_from_yield;
                        default: /* CPython raises the right error here */
                        __Pyx_RefNannyFinishContext();
                        return NULL;
                      }
                      __pyx_L3_first_run:;
                      if (unlikely(__pyx_sent_value != Py_None)) {
                        if (unlikely(__pyx_sent_value)) PyErr_SetString(PyExc_TypeError, "can't send non-None value to a just-started generator");
                        __PYX_ERR(19, 823, __pyx_L1_error)
                      }

                      /* "pyarrow/ipc.pxi":832
 *         RecordBatchWithMetadata
 *         """
 *         while True:             # <<<<<<<<<<<<<<
 *             try:
 *                 yield self.read_next_batch_with_custom_metadata()
*/
                      while (1) {

                        /* "pyarrow/ipc.pxi":833
 *         """
 *         while True:
 *             try:             # <<<<<<<<<<<<<<
 *                 yield self.read_next_batch_with_custom_metadata()
 *             except StopIteration:
*/
                        {
                          __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:*/ {

                            /* "pyarrow/ipc.pxi":834
 *         while True:
 *             try:
 *                 yield self.read_next_batch_with_custom_metadata()             # <<<<<<<<<<<<<<
 *             except StopIteration:
 *                 return
*/
                            __pyx_t_5 = ((PyObject *)__pyx_cur_scope->__pyx_v_self);
                            __Pyx_INCREF(__pyx_t_5);
                            __pyx_t_6 = 0;
                            {
                              PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
                              __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_read_next_batch_with_custom_meta, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                              __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
                              if (unlikely(!__pyx_t_4)) __PYX_ERR(19, 834, __pyx_L6_error)
                              __Pyx_GOTREF(__pyx_t_4);
                            }
                            __pyx_r = __pyx_t_4;
                            __pyx_t_4 = 0;
                            __Pyx_XGIVEREF(__pyx_t_1);
                            __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
                            __Pyx_XGIVEREF(__pyx_t_2);
                            __pyx_cur_scope->__pyx_t_1 = __pyx_t_2;
                            __Pyx_XGIVEREF(__pyx_t_3);
                            __pyx_cur_scope->__pyx_t_2 = __pyx_t_3;
                            __Pyx_XGIVEREF(__pyx_r);
                            __Pyx_RefNannyFinishContext();
                            __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
                            /* return from generator, yielding value */
                            __pyx_generator->resume_label = 1;
                            return __pyx_r;
                            __pyx_L14_resume_from_yield:;
                            __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
                            __pyx_cur_scope->__pyx_t_0 = 0;
                            __Pyx_XGOTREF(__pyx_t_1);
                            __pyx_t_2 = __pyx_cur_scope->__pyx_t_1;
                            __pyx_cur_scope->__pyx_t_1 = 0;
                            __Pyx_XGOTREF(__pyx_t_2);
                            __pyx_t_3 = __pyx_cur_scope->__pyx_t_2;
                            __pyx_cur_scope->__pyx_t_2 = 0;
                            __Pyx_XGOTREF(__pyx_t_3);
                            if (unlikely(!__pyx_sent_value)) __PYX_ERR(19, 834, __pyx_L6_error)

                            /* "pyarrow/ipc.pxi":833
 *         """
 *         while True:
 *             try:             # <<<<<<<<<<<<<<
 *                 yield self.read_next_batch_with_custom_metadata()
 *             except StopIteration:
*/
                          }
                          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
                          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                          goto __pyx_L13_try_end;
                          __pyx_L6_error:;
                          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

                          /* "pyarrow/ipc.pxi":835
 *             try:
 *                 yield self.read_next_batch_with_custom_metadata()
 *             except StopIteration:             # <<<<<<<<<<<<<<
 *                 return
 * 
*/
                          __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_StopIteration))));
                          if (__pyx_t_7) {
                            __Pyx_ErrRestore(0,0,0);

                            /* "pyarrow/ipc.pxi":836
 *                 yield self.read_next_batch_with_custom_metadata()
 *             except StopIteration:
 *                 return             # <<<<<<<<<<<<<<
 * 
 *     def read_all(self):
*/
                            __Pyx_XDECREF(__pyx_r);
                            __pyx_r = Py_None; __Pyx_INCREF(Py_None);
                            goto __pyx_L9_except_return;
                          }
                          goto __pyx_L8_except_error;

                          /* "pyarrow/ipc.pxi":833
 *         """
 *         while True:
 *             try:             # <<<<<<<<<<<<<<
 *                 yield self.read_next_batch_with_custom_metadata()
 *             except StopIteration:
*/
                          __pyx_L8_except_error:;
                          __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_L9_except_return:;
                          __Pyx_XGIVEREF(__pyx_t_1);
                          __Pyx_XGIVEREF(__pyx_t_2);
                          __Pyx_XGIVEREF(__pyx_t_3);
                          __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
                          goto __pyx_L0;
                          __pyx_L13_try_end:;
                        }
                      }
                      CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

                      /* "pyarrow/ipc.pxi":823
 *         return _wrap_record_batch_with_metadata(batch_with_metadata)
 * 
 *     def iter_batches_with_custom_metadata(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterate over record batches from the stream along with their custom
*/

                      /* function exit code */
                      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_4);
                      __Pyx_XDECREF(__pyx_t_5);
                      if (__Pyx_PyErr_Occurred()) {
                        __Pyx_Generator_Replace_StopIteration(0);
                        __Pyx_AddTraceback("iter_batches_with_custom_metadata", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      }
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      #if !CYTHON_USE_EXC_INFO_STACK
                      __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
                      #endif
                      __pyx_generator->resume_label = -1;
                      __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/ipc.pxi":838
 *                 return
 * 
 *     def read_all(self):             # <<<<<<<<<<<<<<
 *         """
 *         Read all record batches as a pyarrow.Table.
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_17RecordBatchReader_14read_all(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_17RecordBatchReader_13read_all, "RecordBatchReader.read_all(self)\n\nRead all record batches as a pyarrow.Table.\n\nReturns\n-------\nTable");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_17RecordBatchReader_14read_all = {"read_all", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_17RecordBatchReader_14read_all, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_17RecordBatchReader_13read_all};
                    static PyObject *__pyx_pw_7pyarrow_3lib_17RecordBatchReader_14read_all(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("read_all (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("read_all", 1, 0, 0, __pyx_nargs); return NULL; }
                      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                      if (unlikely(__pyx_kwds_len < 0)) return NULL;
                      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("read_all", __pyx_kwds); return NULL;}
                      __pyx_r = __pyx_pf_7pyarrow_3lib_17RecordBatchReader_13read_all(((struct __pyx_obj_7pyarrow_3lib_RecordBatchReader *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_17RecordBatchReader_13read_all(struct __pyx_obj_7pyarrow_3lib_RecordBatchReader *__pyx_v_self) {
                      std::shared_ptr< arrow::Table>  __pyx_v_table;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_t_1;
                      PyObject *__pyx_t_2 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("read_all", 0);

                      /* "pyarrow/ipc.pxi":847
 *         """
 *         cdef shared_ptr[CTable] table
 *         with nogil:             # <<<<<<<<<<<<<<
 *             check_status(self.reader.get().ToTable().Value(&table))
 *         return pyarrow_wrap_table(table)
*/
                      {
                          PyThreadState * _save;
                          _save = PyEval_SaveThread();
                          __Pyx_FastGIL_Remember();
                          /*try:*/ {

                            /* "pyarrow/ipc.pxi":848
 *         cdef shared_ptr[CTable] table
 *         with nogil:
 *             check_status(self.reader.get().ToTable().Value(&table))             # <<<<<<<<<<<<<<
 *         return pyarrow_wrap_table(table)
 * 
*/
                            if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                              PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "reader");
                              __Pyx_PyGILState_Release(__pyx_gilstate_save);
                              __PYX_ERR(19, 848, __pyx_L4_error)
                            }
                            __pyx_t_1 = __pyx_f_7pyarrow_3lib_check_status(__pyx_v_self->reader.get()->ToTable().Value((&__pyx_v_table))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(19, 848, __pyx_L4_error)
                          }

                          /* "pyarrow/ipc.pxi":847
 *         """
 *         cdef shared_ptr[CTable] table
 *         with nogil:             # <<<<<<<<<<<<<<
 *             check_status(self.reader.get().ToTable().Value(&table))
 *         return pyarrow_wrap_table(table)
*/
                          /*finally:*/ {
                            /*normal exit:*/{
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L5;
                            }
                            __pyx_L4_error: {
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L1_error;
                            }
                            __pyx_L5:;
                          }
                      }

                      /* "pyarrow/ipc.pxi":849
 *         with nogil:
 *             check_status(self.reader.get().ToTable().Value(&table))
 *         return pyarrow_wrap_table(table)             # <<<<<<<<<<<<<<
 * 
 *     read_pandas = _ReadPandasMixin.read_pandas
*/
                      __Pyx_XDECREF(__pyx_r);
                      __pyx_t_2 = pyarrow_wrap_table(__pyx_v_table); if (unlikely(!__pyx_t_2)) __PYX_ERR(19, 849, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_2);
                      __pyx_r = __pyx_t_2;
                      __pyx_t_2 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/ipc.pxi":838
 *                 return
 * 
 *     def read_all(self):             # <<<<<<<<<<<<<<
 *         """
 *         Read all record batches as a pyarrow.Table.
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_AddTraceback("pyarrow.lib.RecordBatchReader.read_all", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/ipc.pxi":853
 *     read_pandas = _ReadPandasMixin.read_pandas
 * 
 *     def close(self):             # <<<<<<<<<<<<<<
 *         """
 *         Release any resources associated with the reader.
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_17RecordBatchReader_16close(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_17RecordBatchReader_15close, "RecordBatchReader.close(self)\n\nRelease any resources associated with the reader.");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_17RecordBatchReader_16close = {"close", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_17RecordBatchReader_16close, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_17RecordBatchReader_15close};
                    static PyObject *__pyx_pw_7pyarrow_3lib_17RecordBatchReader_16close(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("close (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("close", 1, 0, 0, __pyx_nargs); return NULL; }
                      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                      if (unlikely(__pyx_kwds_len < 0)) return NULL;
                      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("close", __pyx_kwds); return NULL;}
                      __pyx_r = __pyx_pf_7pyarrow_3lib_17RecordBatchReader_15close(((struct __pyx_obj_7pyarrow_3lib_RecordBatchReader *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_17RecordBatchReader_15close(struct __pyx_obj_7pyarrow_3lib_RecordBatchReader *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_t_1;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("close", 0);

                      /* "pyarrow/ipc.pxi":857
 *         Release any resources associated with the reader.
 *         """
 *         with nogil:             # <<<<<<<<<<<<<<
 *             check_status(self.reader.get().Close())
 * 
*/
                      {
                          PyThreadState * _save;
                          _save = PyEval_SaveThread();
                          __Pyx_FastGIL_Remember();
                          /*try:*/ {

                            /* "pyarrow/ipc.pxi":858
 *         """
 *         with nogil:
 *             check_status(self.reader.get().Close())             # <<<<<<<<<<<<<<
 * 
 *     def __enter__(self):
*/
                            if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                              PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "reader");
                              __Pyx_PyGILState_Release(__pyx_gilstate_save);
                              __PYX_ERR(19, 858, __pyx_L4_error)
                            }
                            __pyx_t_1 = __pyx_f_7pyarrow_3lib_check_status(__pyx_v_self->reader.get()->Close()); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(19, 858, __pyx_L4_error)
                          }

                          /* "pyarrow/ipc.pxi":857
 *         Release any resources associated with the reader.
 *         """
 *         with nogil:             # <<<<<<<<<<<<<<
 *             check_status(self.reader.get().Close())
 * 
*/
                          /*finally:*/ {
                            /*normal exit:*/{
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L5;
                            }
                            __pyx_L4_error: {
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L1_error;
                            }
                            __pyx_L5:;
                          }
                      }

                      /* "pyarrow/ipc.pxi":853
 *     read_pandas = _ReadPandasMixin.read_pandas
 * 
 *     def close(self):             # <<<<<<<<<<<<<<
 *         """
 *         Release any resources associated with the reader.
*/

                      /* function exit code */
                      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib.RecordBatchReader.close", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/ipc.pxi":860
 *             check_status(self.reader.get().Close())
 * 
 *     def __enter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_17RecordBatchReader_18__enter__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_17RecordBatchReader_17__enter__, "RecordBatchReader.__enter__(self)");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_17RecordBatchReader_18__enter__ = {"__enter__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_17RecordBatchReader_18__enter__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_17RecordBatchReader_17__enter__};
                    static PyObject *__pyx_pw_7pyarrow_3lib_17RecordBatchReader_18__enter__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__enter__ (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__enter__", 1, 0, 0, __pyx_nargs); return NULL; }
                      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                      if (unlikely(__pyx_kwds_len < 0)) return NULL;
                      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__enter__", __pyx_kwds); return NULL;}
                      __pyx_r = __pyx_pf_7pyarrow_3lib_17RecordBatchReader_17__enter__(((struct __pyx_obj_7pyarrow_3lib_RecordBatchReader *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_17RecordBatchReader_17__enter__(struct __pyx_obj_7pyarrow_3lib_RecordBatchReader *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__enter__", 0);

                      /* "pyarrow/ipc.pxi":861
 * 
 *     def __enter__(self):
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def __exit__(self, exc_type, exc_val, exc_tb):
*/
                      __Pyx_XDECREF(__pyx_r);
                      __Pyx_INCREF((PyObject *)__pyx_v_self);
                      __pyx_r = ((PyObject *)__pyx_v_self);
                      goto __pyx_L0;

                      /* "pyarrow/ipc.pxi":860
 *             check_status(self.reader.get().Close())
 * 
 *     def __enter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
*/

                      /* function exit code */
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/ipc.pxi":863
 *         return self
 * 
 *     def __exit__(self, exc_type, exc_val, exc_tb):             # <<<<<<<<<<<<<<
 *         self.close()
 * 
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_17RecordBatchReader_20__exit__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_17RecordBatchReader_19__exit__, "RecordBatchReader.__exit__(self, exc_type, exc_val, exc_tb)");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_17RecordBatchReader_20__exit__ = {"__exit__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_17RecordBatchReader_20__exit__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_17RecordBatchReader_19__exit__};
                    static PyObject *__pyx_pw_7pyarrow_3lib_17RecordBatchReader_20__exit__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      CYTHON_UNUSED PyObject *__pyx_v_exc_type = 0;
                      CYTHON_UNUSED PyObject *__pyx_v_exc_val = 0;
                      CYTHON_UNUSED PyObject *__pyx_v_exc_tb = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[3] = {0,0,0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__exit__ (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_exc_type,&__pyx_mstate_global->__pyx_n_u_exc_val,&__pyx_mstate_global->__pyx_n_u_exc_tb,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(19, 863, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  3:
                            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(19, 863, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  2:
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(19, 863, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(19, 863, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__exit__", 0) < (0)) __PYX_ERR(19, 863, __pyx_L3_error)
                          for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, i); __PYX_ERR(19, 863, __pyx_L3_error) }
                          }
                        } else if (unlikely(__pyx_nargs != 3)) {
                          goto __pyx_L5_argtuple_error;
                        } else {
                          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(19, 863, __pyx_L3_error)
                          values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(19, 863, __pyx_L3_error)
                          values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(19, 863, __pyx_L3_error)
                        }
                        __pyx_v_exc_type = values[0];
                        __pyx_v_exc_val = values[1];
                        __pyx_v_exc_tb = values[2];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, __pyx_nargs); __PYX_ERR(19, 863, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.RecordBatchReader.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_17RecordBatchReader_19__exit__(((struct __pyx_obj_7pyarrow_3lib_RecordBatchReader *)__pyx_v_self), __pyx_v_exc_type, __pyx_v_exc_val, __pyx_v_exc_tb);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_17RecordBatchReader_19__exit__(struct __pyx_obj_7pyarrow_3lib_RecordBatchReader *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_exc_type, CYTHON_UNUSED PyObject *__pyx_v_exc_val, CYTHON_UNUSED PyObject *__pyx_v_exc_tb) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      size_t __pyx_t_3;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__exit__", 0);

                      /* "pyarrow/ipc.pxi":864
 * 
 *     def __exit__(self, exc_type, exc_val, exc_tb):
 *         self.close()             # <<<<<<<<<<<<<<
 * 
 *     def cast(self, target_schema):
*/
                      __pyx_t_2 = ((PyObject *)__pyx_v_self);
                      __Pyx_INCREF(__pyx_t_2);
                      __pyx_t_3 = 0;
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
                        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_close, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 864, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

                      /* "pyarrow/ipc.pxi":863
 *         return self
 * 
 *     def __exit__(self, exc_type, exc_val, exc_tb):             # <<<<<<<<<<<<<<
 *         self.close()
 * 
*/

                      /* function exit code */
                      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_AddTraceback("pyarrow.lib.RecordBatchReader.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/ipc.pxi":866
 *         self.close()
 * 
 *     def cast(self, target_schema):             # <<<<<<<<<<<<<<
 *         """
 *         Wrap this reader with one that casts each batch lazily as it is pulled.
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_17RecordBatchReader_22cast(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_17RecordBatchReader_21cast, "RecordBatchReader.cast(self, target_schema)\n\nWrap this reader with one that casts each batch lazily as it is pulled.\nCurrently only a safe cast to target_schema is implemented.\n\nParameters\n----------\ntarget_schema : Schema\n    Schema to cast to, the names and order of fields must match.\n\nReturns\n-------\nRecordBatchReader");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_17RecordBatchReader_22cast = {"cast", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_17RecordBatchReader_22cast, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_17RecordBatchReader_21cast};
                    static PyObject *__pyx_pw_7pyarrow_3lib_17RecordBatchReader_22cast(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      PyObject *__pyx_v_target_schema = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[1] = {0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("cast (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_target_schema,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(19, 866, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(19, 866, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "cast", 0) < (0)) __PYX_ERR(19, 866, __pyx_L3_error)
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("cast", 1, 1, 1, i); __PYX_ERR(19, 866, __pyx_L3_error) }
                          }
                        } else if (unlikely(__pyx_nargs != 1)) {
                          goto __pyx_L5_argtuple_error;
                        } else {
                          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(19, 866, __pyx_L3_error)
                        }
                        __pyx_v_target_schema = values[0];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("cast", 1, 1, 1, __pyx_nargs); __PYX_ERR(19, 866, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.RecordBatchReader.cast", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_17RecordBatchReader_21cast(((struct __pyx_obj_7pyarrow_3lib_RecordBatchReader *)__pyx_v_self), __pyx_v_target_schema);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_17RecordBatchReader_21cast(struct __pyx_obj_7pyarrow_3lib_RecordBatchReader *__pyx_v_self, PyObject *__pyx_v_target_schema) {
                      std::shared_ptr< arrow::Schema>  __pyx_v_c_schema;
                      std::shared_ptr< arrow::RecordBatchReader>  __pyx_v_c_reader;
                      struct __pyx_obj_7pyarrow_3lib_RecordBatchReader *__pyx_v_out = 0;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      PyObject *__pyx_t_3 = NULL;
                      int __pyx_t_4;
                      PyObject *__pyx_t_5 = NULL;
                      PyObject *__pyx_t_6 = NULL;
                      PyObject *__pyx_t_7[4];
                      size_t __pyx_t_8;
                      std::shared_ptr< arrow::Schema>  __pyx_t_9;
                      std::shared_ptr< arrow::RecordBatchReader>  __pyx_t_10;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("cast", 0);

                      /* "pyarrow/ipc.pxi":885
 *             RecordBatchReader out
 * 
 *         if self.schema.names != target_schema.names:             # <<<<<<<<<<<<<<
 *             raise ValueError("Target schema's field names are not matching "
 *                              f"the table's field names: {self.schema.names}, "
*/
                      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_schema); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 885, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_names); if (unlikely(!__pyx_t_2)) __PYX_ERR(19, 885, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_2);
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_target_schema, __pyx_mstate_global->__pyx_n_u_names); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 885, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(19, 885, __pyx_L1_error)
                      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(19, 885, __pyx_L1_error)
                      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                      if (unlikely(__pyx_t_4)) {

                        /* "pyarrow/ipc.pxi":886
 * 
 *         if self.schema.names != target_schema.names:
 *             raise ValueError("Target schema's field names are not matching "             # <<<<<<<<<<<<<<
 *                              f"the table's field names: {self.schema.names}, "
 *                              f"{target_schema.names}")
*/
                        __pyx_t_1 = NULL;

                        /* "pyarrow/ipc.pxi":887
 *         if self.schema.names != target_schema.names:
 *             raise ValueError("Target schema's field names are not matching "
 *                              f"the table's field names: {self.schema.names}, "             # <<<<<<<<<<<<<<
 *                              f"{target_schema.names}")
 * 
*/
                        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_schema); if (unlikely(!__pyx_t_2)) __PYX_ERR(19, 887, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_2);
                        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_names); if (unlikely(!__pyx_t_5)) __PYX_ERR(19, 887, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_5);
                        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                        __pyx_t_2 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(19, 887, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_2);
                        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

                        /* "pyarrow/ipc.pxi":888
 *             raise ValueError("Target schema's field names are not matching "
 *                              f"the table's field names: {self.schema.names}, "
 *                              f"{target_schema.names}")             # <<<<<<<<<<<<<<
 * 
 *         c_schema = pyarrow_unwrap_schema(target_schema)
*/
                        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_target_schema, __pyx_mstate_global->__pyx_n_u_names); if (unlikely(!__pyx_t_5)) __PYX_ERR(19, 888, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_5);
                        __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(19, 888, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_6);
                        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                        __pyx_t_7[0] = __pyx_mstate_global->__pyx_kp_u_Target_schema_s_field_names_are_2;
                        __pyx_t_7[1] = __pyx_t_2;
                        __pyx_t_7[2] = __pyx_mstate_global->__pyx_kp_u__18;
                        __pyx_t_7[3] = __pyx_t_6;

                        /* "pyarrow/ipc.pxi":886
 * 
 *         if self.schema.names != target_schema.names:
 *             raise ValueError("Target schema's field names are not matching "             # <<<<<<<<<<<<<<
 *                              f"the table's field names: {self.schema.names}, "
 *                              f"{target_schema.names}")
*/
                        __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_7, 4, 70 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2) + 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6));
                        if (unlikely(!__pyx_t_5)) __PYX_ERR(19, 886, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_5);
                        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                        __pyx_t_8 = 1;
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_5};
                          __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
                          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                          if (unlikely(!__pyx_t_3)) __PYX_ERR(19, 886, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_3);
                        }
                        __Pyx_Raise(__pyx_t_3, 0, 0, 0);
                        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                        __PYX_ERR(19, 886, __pyx_L1_error)

                        /* "pyarrow/ipc.pxi":885
 *             RecordBatchReader out
 * 
 *         if self.schema.names != target_schema.names:             # <<<<<<<<<<<<<<
 *             raise ValueError("Target schema's field names are not matching "
 *                              f"the table's field names: {self.schema.names}, "
*/
                      }

                      /* "pyarrow/ipc.pxi":890
 *                              f"{target_schema.names}")
 * 
 *         c_schema = pyarrow_unwrap_schema(target_schema)             # <<<<<<<<<<<<<<
 *         c_reader = GetResultValue(CCastingRecordBatchReader.Make(
 *             self.reader, c_schema))
*/
                      __pyx_t_9 = pyarrow_unwrap_schema(__pyx_v_target_schema); if (unlikely(PyErr_Occurred())) __PYX_ERR(19, 890, __pyx_L1_error)
                      __pyx_v_c_schema = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_9);

                      /* "pyarrow/ipc.pxi":892
 *         c_schema = pyarrow_unwrap_schema(target_schema)
 *         c_reader = GetResultValue(CCastingRecordBatchReader.Make(
 *             self.reader, c_schema))             # <<<<<<<<<<<<<<
 * 
 *         out = RecordBatchReader.__new__(RecordBatchReader)
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "reader");
                        __PYX_ERR(19, 892, __pyx_L1_error)
                      }

                      /* "pyarrow/ipc.pxi":891
 * 
 *         c_schema = pyarrow_unwrap_schema(target_schema)
 *         c_reader = GetResultValue(CCastingRecordBatchReader.Make(             # <<<<<<<<<<<<<<
 *             self.reader, c_schema))
 * 
*/
                      __pyx_t_10 = arrow::py::GetResultValue<std::shared_ptr< arrow::RecordBatchReader> >( arrow::py::CastingRecordBatchReader::Make(__pyx_v_self->reader, __pyx_v_c_schema)); if (unlikely(PyErr_Occurred())) __PYX_ERR(19, 891, __pyx_L1_error)
                      __pyx_v_c_reader = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_10);

                      /* "pyarrow/ipc.pxi":894
 *             self.reader, c_schema))
 * 
 *         out = RecordBatchReader.__new__(RecordBatchReader)             # <<<<<<<<<<<<<<
 *         out.reader = c_reader
 *         return out
*/
                      __pyx_t_3 = ((PyObject *)__pyx_tp_new_7pyarrow_3lib_RecordBatchReader(((PyTypeObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RecordBatchReader), __pyx_mstate_global->__pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(19, 894, __pyx_L1_error)
                      __Pyx_GOTREF((PyObject *)__pyx_t_3);
                      __pyx_v_out = ((struct __pyx_obj_7pyarrow_3lib_RecordBatchReader *)__pyx_t_3);
                      __pyx_t_3 = 0;

                      /* "pyarrow/ipc.pxi":895
 * 
 *         out = RecordBatchReader.__new__(RecordBatchReader)
 *         out.reader = c_reader             # <<<<<<<<<<<<<<
 *         return out
 * 
*/
                      if (unlikely(((PyObject *)__pyx_v_out) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "reader");
                        __PYX_ERR(19, 895, __pyx_L1_error)
                      }
                      __pyx_v_out->reader = ((arrow::py::SharedPtrNoGIL< arrow::RecordBatchReader> )__pyx_v_c_reader);

                      /* "pyarrow/ipc.pxi":896
 *         out = RecordBatchReader.__new__(RecordBatchReader)
 *         out.reader = c_reader
 *         return out             # <<<<<<<<<<<<<<
 * 
 *     def _export_to_c(self, out_ptr):
*/
                      __Pyx_XDECREF(__pyx_r);
                      __Pyx_INCREF((PyObject *)__pyx_v_out);
                      __pyx_r = ((PyObject *)__pyx_v_out);
                      goto __pyx_L0;

                      /* "pyarrow/ipc.pxi":866
 *         self.close()
 * 
 *     def cast(self, target_schema):             # <<<<<<<<<<<<<<
 *         """
 *         Wrap this reader with one that casts each batch lazily as it is pulled.
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_XDECREF(__pyx_t_5);
                      __Pyx_XDECREF(__pyx_t_6);
                      __Pyx_AddTraceback("pyarrow.lib.RecordBatchReader.cast", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XDECREF((PyObject *)__pyx_v_out);
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/ipc.pxi":898
 *         return out
 * 
 *     def _export_to_c(self, out_ptr):             # <<<<<<<<<<<<<<
 *         """
 *         Export to a C ArrowArrayStream struct, given its pointer.
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_17RecordBatchReader_24_export_to_c(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_17RecordBatchReader_23_export_to_c, "RecordBatchReader._export_to_c(self, out_ptr)\n\nExport to a C ArrowArrayStream struct, given its pointer.\n\nParameters\n----------\nout_ptr: int\n    The raw pointer to a C ArrowArrayStream struct.\n\nBe careful: if you don't pass the ArrowArrayStream struct to a\nconsumer, array memory will leak.  This is a low-level function\nintended for expert users.");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_17RecordBatchReader_24_export_to_c = {"_export_to_c", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_17RecordBatchReader_24_export_to_c, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_17RecordBatchReader_23_export_to_c};
                    static PyObject *__pyx_pw_7pyarrow_3lib_17RecordBatchReader_24_export_to_c(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      PyObject *__pyx_v_out_ptr = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[1] = {0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("_export_to_c (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_out_ptr,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(19, 898, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(19, 898, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_export_to_c", 0) < (0)) __PYX_ERR(19, 898, __pyx_L3_error)
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_export_to_c", 1, 1, 1, i); __PYX_ERR(19, 898, __pyx_L3_error) }
                          }
                        } else if (unlikely(__pyx_nargs != 1)) {
                          goto __pyx_L5_argtuple_error;
                        } else {
                          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(19, 898, __pyx_L3_error)
                        }
                        __pyx_v_out_ptr = values[0];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("_export_to_c", 1, 1, 1, __pyx_nargs); __PYX_ERR(19, 898, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.RecordBatchReader._export_to_c", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_17RecordBatchReader_23_export_to_c(((struct __pyx_obj_7pyarrow_3lib_RecordBatchReader *)__pyx_v_self), __pyx_v_out_ptr);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_17RecordBatchReader_23_export_to_c(struct __pyx_obj_7pyarrow_3lib_RecordBatchReader *__pyx_v_self, PyObject *__pyx_v_out_ptr) {
                      void *__pyx_v_c_ptr;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      void *__pyx_t_1;
                      int __pyx_t_2;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("_export_to_c", 0);

                      /* "pyarrow/ipc.pxi":912
 *         """
 *         cdef:
 *             void* c_ptr = _as_c_pointer(out_ptr)             # <<<<<<<<<<<<<<
 *         with nogil:
 *             check_status(ExportRecordBatchReader(
*/
                      __pyx_t_1 = __pyx_f_7pyarrow_3lib__as_c_pointer(__pyx_v_out_ptr, NULL); if (unlikely(__pyx_t_1 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(19, 912, __pyx_L1_error)
                      __pyx_v_c_ptr = __pyx_t_1;

                      /* "pyarrow/ipc.pxi":913
 *         cdef:
 *             void* c_ptr = _as_c_pointer(out_ptr)
 *         with nogil:             # <<<<<<<<<<<<<<
 *             check_status(ExportRecordBatchReader(
 *                 self.reader, <ArrowArrayStream*> c_ptr))
*/
                      {
                          PyThreadState * _save;
                          _save = PyEval_SaveThread();
                          __Pyx_FastGIL_Remember();
                          /*try:*/ {

                            /* "pyarrow/ipc.pxi":915
 *         with nogil:
 *             check_status(ExportRecordBatchReader(
 *                 self.reader, <ArrowArrayStream*> c_ptr))             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
*/
                            if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                              PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "reader");
                              __Pyx_PyGILState_Release(__pyx_gilstate_save);
                              __PYX_ERR(19, 915, __pyx_L4_error)
                            }

                            /* "pyarrow/ipc.pxi":914
 *             void* c_ptr = _as_c_pointer(out_ptr)
 *         with nogil:
 *             check_status(ExportRecordBatchReader(             # <<<<<<<<<<<<<<
 *                 self.reader, <ArrowArrayStream*> c_ptr))
 * 
*/
                            __pyx_t_2 = __pyx_f_7pyarrow_3lib_check_status(arrow::ExportRecordBatchReader(__pyx_v_self->reader, ((struct ArrowArrayStream *)__pyx_v_c_ptr))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(19, 914, __pyx_L4_error)
                          }

                          /* "pyarrow/ipc.pxi":913
 *         cdef:
 *             void* c_ptr = _as_c_pointer(out_ptr)
 *         with nogil:             # <<<<<<<<<<<<<<
 *             check_status(ExportRecordBatchReader(
 *                 self.reader, <ArrowArrayStream*> c_ptr))
*/
                          /*finally:*/ {
                            /*normal exit:*/{
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L5;
                            }
                            __pyx_L4_error: {
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L1_error;
                            }
                            __pyx_L5:;
                          }
                      }

                      /* "pyarrow/ipc.pxi":898
 *         return out
 * 
 *     def _export_to_c(self, out_ptr):             # <<<<<<<<<<<<<<
 *         """
 *         Export to a C ArrowArrayStream struct, given its pointer.
*/

                      /* function exit code */
                      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib.RecordBatchReader._export_to_c", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/ipc.pxi":917
 *                 self.reader, <ArrowArrayStream*> c_ptr))
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def _import_from_c(in_ptr):
 *         """
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_17RecordBatchReader_26_import_from_c(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_17RecordBatchReader_25_import_from_c, "RecordBatchReader._import_from_c(in_ptr)\n\nImport RecordBatchReader from a C ArrowArrayStream struct,\ngiven its pointer.\n\nParameters\n----------\nin_ptr: int\n    The raw pointer to a C ArrowArrayStream struct.\n\nThis is a low-level function intended for expert users.");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_17RecordBatchReader_26_import_from_c = {"_import_from_c", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_17RecordBatchReader_26_import_from_c, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_17RecordBatchReader_25_import_from_c};
                    static PyObject *__pyx_pw_7pyarrow_3lib_17RecordBatchReader_26_import_from_c(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      PyObject *__pyx_v_in_ptr = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[1] = {0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("_import_from_c (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_in_ptr,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(19, 917, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(19, 917, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_import_from_c", 0) < (0)) __PYX_ERR(19, 917, __pyx_L3_error)
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_import_from_c", 1, 1, 1, i); __PYX_ERR(19, 917, __pyx_L3_error) }
                          }
                        } else if (unlikely(__pyx_nargs != 1)) {
                          goto __pyx_L5_argtuple_error;
                        } else {
                          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(19, 917, __pyx_L3_error)
                        }
                        __pyx_v_in_ptr = values[0];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("_import_from_c", 1, 1, 1, __pyx_nargs); __PYX_ERR(19, 917, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.RecordBatchReader._import_from_c", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_17RecordBatchReader_25_import_from_c(__pyx_v_in_ptr);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_17RecordBatchReader_25_import_from_c(PyObject *__pyx_v_in_ptr) {
                      void *__pyx_v_c_ptr;
                      std::shared_ptr< arrow::RecordBatchReader>  __pyx_v_c_reader;
                      struct __pyx_obj_7pyarrow_3lib_RecordBatchReader *__pyx_v_self = 0;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      void *__pyx_t_1;
                      std::shared_ptr< arrow::RecordBatchReader>  __pyx_t_2;
                      PyObject *__pyx_t_3 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("_import_from_c", 0);

                      /* "pyarrow/ipc.pxi":931
 *         """
 *         cdef:
 *             void* c_ptr = _as_c_pointer(in_ptr)             # <<<<<<<<<<<<<<
 *             shared_ptr[CRecordBatchReader] c_reader
 *             RecordBatchReader self
*/
                      __pyx_t_1 = __pyx_f_7pyarrow_3lib__as_c_pointer(__pyx_v_in_ptr, NULL); if (unlikely(__pyx_t_1 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(19, 931, __pyx_L1_error)
                      __pyx_v_c_ptr = __pyx_t_1;

                      /* "pyarrow/ipc.pxi":935
 *             RecordBatchReader self
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             c_reader = GetResultValue(ImportRecordBatchReader(
 *                 <ArrowArrayStream*> c_ptr))
*/
                      {
                          PyThreadState * _save;
                          _save = PyEval_SaveThread();
                          __Pyx_FastGIL_Remember();
                          /*try:*/ {

                            /* "pyarrow/ipc.pxi":936
 * 
 *         with nogil:
 *             c_reader = GetResultValue(ImportRecordBatchReader(             # <<<<<<<<<<<<<<
 *                 <ArrowArrayStream*> c_ptr))
 * 
*/
                            __pyx_t_2 = arrow::py::GetResultValue<std::shared_ptr< arrow::RecordBatchReader> >(arrow::ImportRecordBatchReader(((struct ArrowArrayStream *)__pyx_v_c_ptr))); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(19, 936, __pyx_L4_error)
                            __pyx_v_c_reader = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_2);
                          }

                          /* "pyarrow/ipc.pxi":935
 *             RecordBatchReader self
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             c_reader = GetResultValue(ImportRecordBatchReader(
 *                 <ArrowArrayStream*> c_ptr))
*/
                          /*finally:*/ {
                            /*normal exit:*/{
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L5;
                            }
                            __pyx_L4_error: {
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L1_error;
                            }
                            __pyx_L5:;
                          }
                      }

                      /* "pyarrow/ipc.pxi":939
 *                 <ArrowArrayStream*> c_ptr))
 * 
 *         self = RecordBatchReader.__new__(RecordBatchReader)             # <<<<<<<<<<<<<<
 *         self.reader = c_reader
 *         return self
*/
                      __pyx_t_3 = ((PyObject *)__pyx_tp_new_7pyarrow_3lib_RecordBatchReader(((PyTypeObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RecordBatchReader), __pyx_mstate_global->__pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(19, 939, __pyx_L1_error)
                      __Pyx_GOTREF((PyObject *)__pyx_t_3);
                      __pyx_v_self = ((struct __pyx_obj_7pyarrow_3lib_RecordBatchReader *)__pyx_t_3);
                      __pyx_t_3 = 0;

                      /* "pyarrow/ipc.pxi":940
 * 
 *         self = RecordBatchReader.__new__(RecordBatchReader)
 *         self.reader = c_reader             # <<<<<<<<<<<<<<
 *         return self
 * 
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "reader");
                        __PYX_ERR(19, 940, __pyx_L1_error)
                      }
                      __pyx_v_self->reader = ((arrow::py::SharedPtrNoGIL< arrow::RecordBatchReader> )__pyx_v_c_reader);

                      /* "pyarrow/ipc.pxi":941
 *         self = RecordBatchReader.__new__(RecordBatchReader)
 *         self.reader = c_reader
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def __arrow_c_stream__(self, requested_schema=None):
*/
                      __Pyx_XDECREF(__pyx_r);
                      __Pyx_INCREF((PyObject *)__pyx_v_self);
                      __pyx_r = ((PyObject *)__pyx_v_self);
                      goto __pyx_L0;

                      /* "pyarrow/ipc.pxi":917
 *                 self.reader, <ArrowArrayStream*> c_ptr))
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def _import_from_c(in_ptr):
 *         """
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_AddTraceback("pyarrow.lib.RecordBatchReader._import_from_c", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XDECREF((PyObject *)__pyx_v_self);
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/ipc.pxi":943
 *         return self
 * 
 *     def __arrow_c_stream__(self, requested_schema=None):             # <<<<<<<<<<<<<<
 *         """
 *         Export to a C ArrowArrayStream PyCapsule.
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_17RecordBatchReader_28__arrow_c_stream__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_17RecordBatchReader_27__arrow_c_stream__, "RecordBatchReader.__arrow_c_stream__(self, requested_schema=None)\n\nExport to a C ArrowArrayStream PyCapsule.\n\nParameters\n----------\nrequested_schema : PyCapsule, default None\n    The schema to which the stream should be casted, passed as a\n    PyCapsule containing a C ArrowSchema representation of the\n    requested schema.\n\nReturns\n-------\nPyCapsule\n    A capsule containing a C ArrowArrayStream struct.");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_17RecordBatchReader_28__arrow_c_stream__ = {"__arrow_c_stream__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_17RecordBatchReader_28__arrow_c_stream__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_17RecordBatchReader_27__arrow_c_stream__};
                    static PyObject *__pyx_pw_7pyarrow_3lib_17RecordBatchReader_28__arrow_c_stream__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      PyObject *__pyx_v_requested_schema = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[1] = {0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__arrow_c_stream__ (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_requested_schema,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(19, 943, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(19, 943, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__arrow_c_stream__", 0) < (0)) __PYX_ERR(19, 943, __pyx_L3_error)
                          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
                        } else {
                          switch (__pyx_nargs) {
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(19, 943, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
                        }
                        __pyx_v_requested_schema = values[0];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("__arrow_c_stream__", 0, 0, 1, __pyx_nargs); __PYX_ERR(19, 943, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.RecordBatchReader.__arrow_c_stream__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_17RecordBatchReader_27__arrow_c_stream__(((struct __pyx_obj_7pyarrow_3lib_RecordBatchReader *)__pyx_v_self), __pyx_v_requested_schema);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_17RecordBatchReader_27__arrow_c_stream__(struct __pyx_obj_7pyarrow_3lib_RecordBatchReader *__pyx_v_self, PyObject *__pyx_v_requested_schema) {
                      struct ArrowArrayStream *__pyx_v_c_stream;
                      PyObject *__pyx_v_out_schema = NULL;
                      PyObject *__pyx_v_stream_capsule = NULL;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_t_1;
                      PyObject *__pyx_t_2 = NULL;
                      PyObject *__pyx_t_3 = NULL;
                      size_t __pyx_t_4;
                      PyObject *__pyx_t_5 = NULL;
                      PyObject *__pyx_t_6 = NULL;
                      int __pyx_t_7;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__arrow_c_stream__", 0);

                      /* "pyarrow/ipc.pxi":962
 *             ArrowArrayStream* c_stream
 * 
 *         if requested_schema is not None:             # <<<<<<<<<<<<<<
 *             out_schema = Schema._import_from_c_capsule(requested_schema)
 *             if self.schema != out_schema:
*/
                      __pyx_t_1 = (__pyx_v_requested_schema != Py_None);
                      if (__pyx_t_1) {

                        /* "pyarrow/ipc.pxi":963
 * 
 *         if requested_schema is not None:
 *             out_schema = Schema._import_from_c_capsule(requested_schema)             # <<<<<<<<<<<<<<
 *             if self.schema != out_schema:
 *                 return self.cast(out_schema).__arrow_c_stream__()
*/
                        __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Schema);
                        __Pyx_INCREF(__pyx_t_3);
                        __pyx_t_4 = 0;
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_requested_schema};
                          __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_import_from_c_capsule, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                          if (unlikely(!__pyx_t_2)) __PYX_ERR(19, 963, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_2);
                        }
                        __pyx_v_out_schema = __pyx_t_2;
                        __pyx_t_2 = 0;

                        /* "pyarrow/ipc.pxi":964
 *         if requested_schema is not None:
 *             out_schema = Schema._import_from_c_capsule(requested_schema)
 *             if self.schema != out_schema:             # <<<<<<<<<<<<<<
 *                 return self.cast(out_schema).__arrow_c_stream__()
 * 
*/
                        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_schema); if (unlikely(!__pyx_t_2)) __PYX_ERR(19, 964, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_2);
                        __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_v_out_schema, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(19, 964, __pyx_L1_error)
                        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                        __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(19, 964, __pyx_L1_error)
                        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                        if (__pyx_t_1) {

                          /* "pyarrow/ipc.pxi":965
 *             out_schema = Schema._import_from_c_capsule(requested_schema)
 *             if self.schema != out_schema:
 *                 return self.cast(out_schema).__arrow_c_stream__()             # <<<<<<<<<<<<<<
 * 
 *         stream_capsule = alloc_c_stream(&c_stream)
*/
                          __Pyx_XDECREF(__pyx_r);
                          __pyx_t_6 = ((PyObject *)__pyx_v_self);
                          __Pyx_INCREF(__pyx_t_6);
                          __pyx_t_4 = 0;
                          {
                            PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_out_schema};
                            __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_cast, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                            __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
                            if (unlikely(!__pyx_t_5)) __PYX_ERR(19, 965, __pyx_L1_error)
                            __Pyx_GOTREF(__pyx_t_5);
                          }
                          __pyx_t_2 = __pyx_t_5;
                          __Pyx_INCREF(__pyx_t_2);
                          __pyx_t_4 = 0;
                          {
                            PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
                            __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_arrow_c_stream, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                            if (unlikely(!__pyx_t_3)) __PYX_ERR(19, 965, __pyx_L1_error)
                            __Pyx_GOTREF(__pyx_t_3);
                          }
                          __pyx_r = __pyx_t_3;
                          __pyx_t_3 = 0;
                          goto __pyx_L0;

                          /* "pyarrow/ipc.pxi":964
 *         if requested_schema is not None:
 *             out_schema = Schema._import_from_c_capsule(requested_schema)
 *             if self.schema != out_schema:             # <<<<<<<<<<<<<<
 *                 return self.cast(out_schema).__arrow_c_stream__()
 * 
*/
                        }

                        /* "pyarrow/ipc.pxi":962
 *             ArrowArrayStream* c_stream
 * 
 *         if requested_schema is not None:             # <<<<<<<<<<<<<<
 *             out_schema = Schema._import_from_c_capsule(requested_schema)
 *             if self.schema != out_schema:
*/
                      }

                      /* "pyarrow/ipc.pxi":967
 *                 return self.cast(out_schema).__arrow_c_stream__()
 * 
 *         stream_capsule = alloc_c_stream(&c_stream)             # <<<<<<<<<<<<<<
 * 
 *         with nogil:
*/
                      __pyx_t_3 = __pyx_f_7pyarrow_3lib_alloc_c_stream((&__pyx_v_c_stream)); if (unlikely(!__pyx_t_3)) __PYX_ERR(19, 967, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_3);
                      __pyx_v_stream_capsule = __pyx_t_3;
                      __pyx_t_3 = 0;

                      /* "pyarrow/ipc.pxi":969
 *         stream_capsule = alloc_c_stream(&c_stream)
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             check_status(ExportRecordBatchReader(self.reader, c_stream))
 * 
*/
                      {
                          PyThreadState * _save;
                          _save = PyEval_SaveThread();
                          __Pyx_FastGIL_Remember();
                          /*try:*/ {

                            /* "pyarrow/ipc.pxi":970
 * 
 *         with nogil:
 *             check_status(ExportRecordBatchReader(self.reader, c_stream))             # <<<<<<<<<<<<<<
 * 
 *         return stream_capsule
*/
                            if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                              PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "reader");
                              __Pyx_PyGILState_Release(__pyx_gilstate_save);
                              __PYX_ERR(19, 970, __pyx_L6_error)
                            }
                            __pyx_t_7 = __pyx_f_7pyarrow_3lib_check_status(arrow::ExportRecordBatchReader(__pyx_v_self->reader, __pyx_v_c_stream)); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(19, 970, __pyx_L6_error)
                          }

                          /* "pyarrow/ipc.pxi":969
 *         stream_capsule = alloc_c_stream(&c_stream)
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             check_status(ExportRecordBatchReader(self.reader, c_stream))
 * 
*/
                          /*finally:*/ {
                            /*normal exit:*/{
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L7;
                            }
                            __pyx_L6_error: {
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L1_error;
                            }
                            __pyx_L7:;
                          }
                      }

                      /* "pyarrow/ipc.pxi":972
 *             check_status(ExportRecordBatchReader(self.reader, c_stream))
 * 
 *         return stream_capsule             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
*/
                      __Pyx_XDECREF(__pyx_r);
                      __Pyx_INCREF(__pyx_v_stream_capsule);
                      __pyx_r = __pyx_v_stream_capsule;
                      goto __pyx_L0;

                      /* "pyarrow/ipc.pxi":943
 *         return self
 * 
 *     def __arrow_c_stream__(self, requested_schema=None):             # <<<<<<<<<<<<<<
 *         """
 *         Export to a C ArrowArrayStream PyCapsule.
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_XDECREF(__pyx_t_5);
                      __Pyx_XDECREF(__pyx_t_6);
                      __Pyx_AddTraceback("pyarrow.lib.RecordBatchReader.__arrow_c_stream__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XDECREF(__pyx_v_out_schema);
                      __Pyx_XDECREF(__pyx_v_stream_capsule);
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/ipc.pxi":974
 *         return stream_capsule
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def _import_from_c_capsule(stream):
 *         """
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_17RecordBatchReader_30_import_from_c_capsule(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_17RecordBatchReader_29_import_from_c_capsule, "RecordBatchReader._import_from_c_capsule(stream)\n\nImport RecordBatchReader from a C ArrowArrayStream PyCapsule.\n\nParameters\n----------\nstream: PyCapsule\n    A capsule containing a C ArrowArrayStream PyCapsule.\n\nReturns\n-------\nRecordBatchReader");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_17RecordBatchReader_30_import_from_c_capsule = {"_import_from_c_capsule", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_17RecordBatchReader_30_import_from_c_capsule, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_17RecordBatchReader_29_import_from_c_capsule};
                    static PyObject *__pyx_pw_7pyarrow_3lib_17RecordBatchReader_30_import_from_c_capsule(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      PyObject *__pyx_v_stream = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[1] = {0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("_import_from_c_capsule (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_stream,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(19, 974, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(19, 974, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_import_from_c_capsule", 0) < (0)) __PYX_ERR(19, 974, __pyx_L3_error)
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_import_from_c_capsule", 1, 1, 1, i); __PYX_ERR(19, 974, __pyx_L3_error) }
                          }
                        } else if (unlikely(__pyx_nargs != 1)) {
                          goto __pyx_L5_argtuple_error;
                        } else {
                          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(19, 974, __pyx_L3_error)
                        }
                        __pyx_v_stream = values[0];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("_import_from_c_capsule", 1, 1, 1, __pyx_nargs); __PYX_ERR(19, 974, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.RecordBatchReader._import_from_c_capsule", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_17RecordBatchReader_29_import_from_c_capsule(__pyx_v_stream);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_17RecordBatchReader_29_import_from_c_capsule(PyObject *__pyx_v_stream) {
                      struct ArrowArrayStream *__pyx_v_c_stream;
                      std::shared_ptr< arrow::RecordBatchReader>  __pyx_v_c_reader;
                      struct __pyx_obj_7pyarrow_3lib_RecordBatchReader *__pyx_v_self = 0;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      void *__pyx_t_1;
                      std::shared_ptr< arrow::RecordBatchReader>  __pyx_t_2;
                      PyObject *__pyx_t_3 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("_import_from_c_capsule", 0);

                      /* "pyarrow/ipc.pxi":993
 *             RecordBatchReader self
 * 
 *         c_stream = <ArrowArrayStream*>PyCapsule_GetPointer(             # <<<<<<<<<<<<<<
 *             stream, 'arrow_array_stream'
 *         )
*/
                      __pyx_t_1 = PyCapsule_GetPointer(__pyx_v_stream, __pyx_k_arrow_array_stream); if (unlikely(__pyx_t_1 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(19, 993, __pyx_L1_error)
                      __pyx_v_c_stream = ((struct ArrowArrayStream *)__pyx_t_1);

                      /* "pyarrow/ipc.pxi":997
 *         )
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             c_reader = GetResultValue(ImportRecordBatchReader(c_stream))
 * 
*/
                      {
                          PyThreadState * _save;
                          _save = PyEval_SaveThread();
                          __Pyx_FastGIL_Remember();
                          /*try:*/ {

                            /* "pyarrow/ipc.pxi":998
 * 
 *         with nogil:
 *             c_reader = GetResultValue(ImportRecordBatchReader(c_stream))             # <<<<<<<<<<<<<<
 * 
 *         self = RecordBatchReader.__new__(RecordBatchReader)
*/
                            __pyx_t_2 = arrow::py::GetResultValue<std::shared_ptr< arrow::RecordBatchReader> >(arrow::ImportRecordBatchReader(__pyx_v_c_stream)); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(19, 998, __pyx_L4_error)
                            __pyx_v_c_reader = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_2);
                          }

                          /* "pyarrow/ipc.pxi":997
 *         )
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             c_reader = GetResultValue(ImportRecordBatchReader(c_stream))
 * 
*/
                          /*finally:*/ {
                            /*normal exit:*/{
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L5;
                            }
                            __pyx_L4_error: {
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L1_error;
                            }
                            __pyx_L5:;
                          }
                      }

                      /* "pyarrow/ipc.pxi":1000
 *             c_reader = GetResultValue(ImportRecordBatchReader(c_stream))
 * 
 *         self = RecordBatchReader.__new__(RecordBatchReader)             # <<<<<<<<<<<<<<
 *         self.reader = c_reader
 *         return self
*/
                      __pyx_t_3 = ((PyObject *)__pyx_tp_new_7pyarrow_3lib_RecordBatchReader(((PyTypeObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RecordBatchReader), __pyx_mstate_global->__pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(19, 1000, __pyx_L1_error)
                      __Pyx_GOTREF((PyObject *)__pyx_t_3);
                      __pyx_v_self = ((struct __pyx_obj_7pyarrow_3lib_RecordBatchReader *)__pyx_t_3);
                      __pyx_t_3 = 0;

                      /* "pyarrow/ipc.pxi":1001
 * 
 *         self = RecordBatchReader.__new__(RecordBatchReader)
 *         self.reader = c_reader             # <<<<<<<<<<<<<<
 *         return self
 * 
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "reader");
                        __PYX_ERR(19, 1001, __pyx_L1_error)
                      }
                      __pyx_v_self->reader = ((arrow::py::SharedPtrNoGIL< arrow::RecordBatchReader> )__pyx_v_c_reader);

                      /* "pyarrow/ipc.pxi":1002
 *         self = RecordBatchReader.__new__(RecordBatchReader)
 *         self.reader = c_reader
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
*/
                      __Pyx_XDECREF(__pyx_r);
                      __Pyx_INCREF((PyObject *)__pyx_v_self);
                      __pyx_r = ((PyObject *)__pyx_v_self);
                      goto __pyx_L0;

                      /* "pyarrow/ipc.pxi":974
 *         return stream_capsule
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def _import_from_c_capsule(stream):
 *         """
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_AddTraceback("pyarrow.lib.RecordBatchReader._import_from_c_capsule", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XDECREF((PyObject *)__pyx_v_self);
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/ipc.pxi":1004
 *         return self
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_stream(data, schema=None):
 *         """
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_17RecordBatchReader_32from_stream(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_17RecordBatchReader_31from_stream, "RecordBatchReader.from_stream(data, schema=None)\n\nCreate RecordBatchReader from a Arrow-compatible stream object.\n\nThis accepts objects implementing the Arrow PyCapsule Protocol for\nstreams, i.e. objects that have a ``__arrow_c_stream__`` method.\n\nParameters\n----------\ndata : Arrow-compatible stream object\n    Any object that implements the Arrow PyCapsule Protocol for\n    streams.\nschema : Schema, default None\n    The schema to which the stream should be casted, if supported\n    by the stream object.\n\nReturns\n-------\nRecordBatchReader");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_17RecordBatchReader_32from_stream = {"from_stream", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_17RecordBatchReader_32from_stream, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_17RecordBatchReader_31from_stream};
                    static PyObject *__pyx_pw_7pyarrow_3lib_17RecordBatchReader_32from_stream(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      PyObject *__pyx_v_data = 0;
                      PyObject *__pyx_v_schema = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[2] = {0,0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("from_stream (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_data,&__pyx_mstate_global->__pyx_n_u_schema,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(19, 1004, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  2:
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(19, 1004, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(19, 1004, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "from_stream", 0) < (0)) __PYX_ERR(19, 1004, __pyx_L3_error)

                          /* "pyarrow/ipc.pxi":1005
 * 
 *     @staticmethod
 *     def from_stream(data, schema=None):             # <<<<<<<<<<<<<<
 *         """
 *         Create RecordBatchReader from a Arrow-compatible stream object.
*/
                          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("from_stream", 0, 1, 2, i); __PYX_ERR(19, 1004, __pyx_L3_error) }
                          }
                        } else {
                          switch (__pyx_nargs) {
                            case  2:
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(19, 1004, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(19, 1004, __pyx_L3_error)
                            break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
                        }
                        __pyx_v_data = values[0];
                        __pyx_v_schema = values[1];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("from_stream", 0, 1, 2, __pyx_nargs); __PYX_ERR(19, 1004, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.RecordBatchReader.from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_17RecordBatchReader_31from_stream(__pyx_v_data, __pyx_v_schema);

                      /* "pyarrow/ipc.pxi":1004
 *         return self
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_stream(data, schema=None):
 *         """
*/

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_17RecordBatchReader_31from_stream(PyObject *__pyx_v_data, PyObject *__pyx_v_schema) {
                      PyObject *__pyx_v_requested = NULL;
                      PyObject *__pyx_v_capsule = NULL;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_t_1;
                      int __pyx_t_2;
                      PyObject *__pyx_t_3 = NULL;
                      PyObject *__pyx_t_4 = NULL;
                      PyObject *__pyx_t_5 = NULL;
                      PyObject *__pyx_t_6[3];
                      PyObject *__pyx_t_7 = NULL;
                      size_t __pyx_t_8;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("from_stream", 0);

                      /* "pyarrow/ipc.pxi":1026
 *         """
 * 
 *         if not hasattr(data, "__arrow_c_stream__"):             # <<<<<<<<<<<<<<
 *             raise TypeError(
 *                 "Expected an object implementing the Arrow PyCapsule Protocol for "
*/
                      __pyx_t_1 = __Pyx_HasAttr(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_arrow_c_stream); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(19, 1026, __pyx_L1_error)
                      __pyx_t_2 = (!__pyx_t_1);
                      if (unlikely(__pyx_t_2)) {

                        /* "pyarrow/ipc.pxi":1027
 * 
 *         if not hasattr(data, "__arrow_c_stream__"):
 *             raise TypeError(             # <<<<<<<<<<<<<<
 *                 "Expected an object implementing the Arrow PyCapsule Protocol for "
 *                 "streams (i.e. having a `__arrow_c_stream__` method), "
*/
                        __pyx_t_4 = NULL;

                        /* "pyarrow/ipc.pxi":1030
 *                 "Expected an object implementing the Arrow PyCapsule Protocol for "
 *                 "streams (i.e. having a `__arrow_c_stream__` method), "
 *                 f"got {type(data)!r}."             # <<<<<<<<<<<<<<
 *             )
 * 
*/
                        __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(((PyObject *)Py_TYPE(__pyx_v_data))), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(19, 1030, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_5);
                        __pyx_t_6[0] = __pyx_mstate_global->__pyx_kp_u_Expected_an_object_implementing;
                        __pyx_t_6[1] = __pyx_t_5;
                        __pyx_t_6[2] = __pyx_mstate_global->__pyx_kp_u_;

                        /* "pyarrow/ipc.pxi":1028
 *         if not hasattr(data, "__arrow_c_stream__"):
 *             raise TypeError(
 *                 "Expected an object implementing the Arrow PyCapsule Protocol for "             # <<<<<<<<<<<<<<
 *                 "streams (i.e. having a `__arrow_c_stream__` method), "
 *                 f"got {type(data)!r}."
*/
                        __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_6, 3, 122 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5));
                        if (unlikely(!__pyx_t_7)) __PYX_ERR(19, 1028, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_7);
                        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                        __pyx_t_8 = 1;
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_7};
                          __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
                          if (unlikely(!__pyx_t_3)) __PYX_ERR(19, 1027, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_3);
                        }
                        __Pyx_Raise(__pyx_t_3, 0, 0, 0);
                        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                        __PYX_ERR(19, 1027, __pyx_L1_error)

                        /* "pyarrow/ipc.pxi":1026
 *         """
 * 
 *         if not hasattr(data, "__arrow_c_stream__"):             # <<<<<<<<<<<<<<
 *             raise TypeError(
 *                 "Expected an object implementing the Arrow PyCapsule Protocol for "
*/
                      }

                      /* "pyarrow/ipc.pxi":1033
 *             )
 * 
 *         if schema is not None:             # <<<<<<<<<<<<<<
 *             if not hasattr(schema, "__arrow_c_schema__"):
 *                 raise TypeError(
*/
                      __pyx_t_2 = (__pyx_v_schema != Py_None);
                      if (__pyx_t_2) {

                        /* "pyarrow/ipc.pxi":1034
 * 
 *         if schema is not None:
 *             if not hasattr(schema, "__arrow_c_schema__"):             # <<<<<<<<<<<<<<
 *                 raise TypeError(
 *                     "Expected an object implementing the Arrow PyCapsule Protocol for "
*/
                        __pyx_t_2 = __Pyx_HasAttr(__pyx_v_schema, __pyx_mstate_global->__pyx_n_u_arrow_c_schema); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(19, 1034, __pyx_L1_error)
                        __pyx_t_1 = (!__pyx_t_2);
                        if (unlikely(__pyx_t_1)) {

                          /* "pyarrow/ipc.pxi":1035
 *         if schema is not None:
 *             if not hasattr(schema, "__arrow_c_schema__"):
 *                 raise TypeError(             # <<<<<<<<<<<<<<
 *                     "Expected an object implementing the Arrow PyCapsule Protocol for "
 *                     "schema (i.e. having a `__arrow_c_schema__` method), "
*/
                          __pyx_t_7 = NULL;

                          /* "pyarrow/ipc.pxi":1038
 *                     "Expected an object implementing the Arrow PyCapsule Protocol for "
 *                     "schema (i.e. having a `__arrow_c_schema__` method), "
 *                     f"got {type(schema)!r}."             # <<<<<<<<<<<<<<
 *                 )
 *             requested = schema.__arrow_c_schema__()
*/
                          __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(((PyObject *)Py_TYPE(__pyx_v_schema))), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(19, 1038, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_4);
                          __pyx_t_6[0] = __pyx_mstate_global->__pyx_kp_u_Expected_an_object_implementing_2;
                          __pyx_t_6[1] = __pyx_t_4;
                          __pyx_t_6[2] = __pyx_mstate_global->__pyx_kp_u_;

                          /* "pyarrow/ipc.pxi":1036
 *             if not hasattr(schema, "__arrow_c_schema__"):
 *                 raise TypeError(
 *                     "Expected an object implementing the Arrow PyCapsule Protocol for "             # <<<<<<<<<<<<<<
 *                     "schema (i.e. having a `__arrow_c_schema__` method), "
 *                     f"got {type(schema)!r}."
*/
                          __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_6, 3, 121 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4));
                          if (unlikely(!__pyx_t_5)) __PYX_ERR(19, 1036, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_5);
                          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                          __pyx_t_8 = 1;
                          {
                            PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_5};
                            __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
                            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                            if (unlikely(!__pyx_t_3)) __PYX_ERR(19, 1035, __pyx_L1_error)
                            __Pyx_GOTREF(__pyx_t_3);
                          }
                          __Pyx_Raise(__pyx_t_3, 0, 0, 0);
                          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                          __PYX_ERR(19, 1035, __pyx_L1_error)

                          /* "pyarrow/ipc.pxi":1034
 * 
 *         if schema is not None:
 *             if not hasattr(schema, "__arrow_c_schema__"):             # <<<<<<<<<<<<<<
 *                 raise TypeError(
 *                     "Expected an object implementing the Arrow PyCapsule Protocol for "
*/
                        }

                        /* "pyarrow/ipc.pxi":1040
 *                     f"got {type(schema)!r}."
 *                 )
 *             requested = schema.__arrow_c_schema__()             # <<<<<<<<<<<<<<
 *         else:
 *             requested = None
*/
                        __pyx_t_5 = __pyx_v_schema;
                        __Pyx_INCREF(__pyx_t_5);
                        __pyx_t_8 = 0;
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
                          __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_arrow_c_schema, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
                          if (unlikely(!__pyx_t_3)) __PYX_ERR(19, 1040, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_3);
                        }
                        __pyx_v_requested = __pyx_t_3;
                        __pyx_t_3 = 0;

                        /* "pyarrow/ipc.pxi":1033
 *             )
 * 
 *         if schema is not None:             # <<<<<<<<<<<<<<
 *             if not hasattr(schema, "__arrow_c_schema__"):
 *                 raise TypeError(
*/
                        goto __pyx_L4;
                      }

                      /* "pyarrow/ipc.pxi":1042
 *             requested = schema.__arrow_c_schema__()
 *         else:
 *             requested = None             # <<<<<<<<<<<<<<
 * 
 *         capsule = data.__arrow_c_stream__(requested)
*/
                      /*else*/ {
                        __Pyx_INCREF(Py_None);
                        __pyx_v_requested = Py_None;
                      }
                      __pyx_L4:;

                      /* "pyarrow/ipc.pxi":1044
 *             requested = None
 * 
 *         capsule = data.__arrow_c_stream__(requested)             # <<<<<<<<<<<<<<
 *         return RecordBatchReader._import_from_c_capsule(capsule)
 * 
*/
                      __pyx_t_5 = __pyx_v_data;
                      __Pyx_INCREF(__pyx_t_5);
                      __pyx_t_8 = 0;
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_requested};
                        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_arrow_c_stream, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
                        if (unlikely(!__pyx_t_3)) __PYX_ERR(19, 1044, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_3);
                      }
                      __pyx_v_capsule = __pyx_t_3;
                      __pyx_t_3 = 0;

                      /* "pyarrow/ipc.pxi":1045
 * 
 *         capsule = data.__arrow_c_stream__(requested)
 *         return RecordBatchReader._import_from_c_capsule(capsule)             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
*/
                      __Pyx_XDECREF(__pyx_r);
                      __pyx_t_5 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RecordBatchReader);
                      __Pyx_INCREF(__pyx_t_5);
                      __pyx_t_8 = 0;
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_capsule};
                        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_import_from_c_capsule, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
                        if (unlikely(!__pyx_t_3)) __PYX_ERR(19, 1045, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_3);
                      }
                      __pyx_r = __pyx_t_3;
                      __pyx_t_3 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/ipc.pxi":1004
 *         return self
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_stream(data, schema=None):
 *         """
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_XDECREF(__pyx_t_4);
                      __Pyx_XDECREF(__pyx_t_5);
                      __Pyx_XDECREF(__pyx_t_7);
                      __Pyx_AddTraceback("pyarrow.lib.RecordBatchReader.from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XDECREF(__pyx_v_requested);
                      __Pyx_XDECREF(__pyx_v_capsule);
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/ipc.pxi":1047
 *         return RecordBatchReader._import_from_c_capsule(capsule)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_batches(Schema schema not None, batches):
 *         """
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_17RecordBatchReader_34from_batches(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_17RecordBatchReader_33from_batches, "RecordBatchReader.from_batches(Schema schema, batches)\n\nCreate RecordBatchReader from an iterable of batches.\n\nParameters\n----------\nschema : Schema\n    The shared schema of the record batches\nbatches : Iterable[RecordBatch]\n    The batches that this reader will return.\n\nReturns\n-------\nreader : RecordBatchReader");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_17RecordBatchReader_34from_batches = {"from_batches", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_17RecordBatchReader_34from_batches, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_17RecordBatchReader_33from_batches};
                    static PyObject *__pyx_pw_7pyarrow_3lib_17RecordBatchReader_34from_batches(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      struct __pyx_obj_7pyarrow_3lib_Schema *__pyx_v_schema = 0;
                      PyObject *__pyx_v_batches = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[2] = {0,0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("from_batches (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_schema,&__pyx_mstate_global->__pyx_n_u_batches,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(19, 1047, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  2:
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(19, 1047, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(19, 1047, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "from_batches", 0) < (0)) __PYX_ERR(19, 1047, __pyx_L3_error)
                          for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("from_batches", 1, 2, 2, i); __PYX_ERR(19, 1047, __pyx_L3_error) }
                          }
                        } else if (unlikely(__pyx_nargs != 2)) {
                          goto __pyx_L5_argtuple_error;
                        } else {
                          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(19, 1047, __pyx_L3_error)
                          values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(19, 1047, __pyx_L3_error)
                        }
                        __pyx_v_schema = ((struct __pyx_obj_7pyarrow_3lib_Schema *)values[0]);
                        __pyx_v_batches = values[1];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("from_batches", 1, 2, 2, __pyx_nargs); __PYX_ERR(19, 1047, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.RecordBatchReader.from_batches", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_schema), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Schema, 0, "schema", 0))) __PYX_ERR(19, 1048, __pyx_L1_error)
                      __pyx_r = __pyx_pf_7pyarrow_3lib_17RecordBatchReader_33from_batches(__pyx_v_schema, __pyx_v_batches);

                      /* function exit code */
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __pyx_r = NULL;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      goto __pyx_L7_cleaned_up;
                      __pyx_L0:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __pyx_L7_cleaned_up:;
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_17RecordBatchReader_33from_batches(struct __pyx_obj_7pyarrow_3lib_Schema *__pyx_v_schema, PyObject *__pyx_v_batches) {
                      std::shared_ptr< arrow::Schema>  __pyx_v_c_schema;
                      std::shared_ptr< arrow::RecordBatchReader>  __pyx_v_c_reader;
                      struct __pyx_obj_7pyarrow_3lib_RecordBatchReader *__pyx_v_self = 0;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      std::shared_ptr< arrow::Schema>  __pyx_t_1;
                      std::shared_ptr< arrow::RecordBatchReader>  __pyx_t_2;
                      PyObject *__pyx_t_3 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("from_batches", 0);

                      /* "pyarrow/ipc.pxi":1068
 *             RecordBatchReader self
 * 
 *         c_schema = pyarrow_unwrap_schema(schema)             # <<<<<<<<<<<<<<
 *         c_reader = GetResultValue(CPyRecordBatchReader.Make(
 *             c_schema, batches))
*/
                      __pyx_t_1 = pyarrow_unwrap_schema(((PyObject *)__pyx_v_schema)); if (unlikely(PyErr_Occurred())) __PYX_ERR(19, 1068, __pyx_L1_error)
                      __pyx_v_c_schema = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_1);

                      /* "pyarrow/ipc.pxi":1069
 * 
 *         c_schema = pyarrow_unwrap_schema(schema)
 *         c_reader = GetResultValue(CPyRecordBatchReader.Make(             # <<<<<<<<<<<<<<
 *             c_schema, batches))
 * 
*/
                      __pyx_t_2 = arrow::py::GetResultValue<std::shared_ptr< arrow::RecordBatchReader> >( arrow::py::PyRecordBatchReader::Make(__pyx_v_c_schema, __pyx_v_batches)); if (unlikely(PyErr_Occurred())) __PYX_ERR(19, 1069, __pyx_L1_error)
                      __pyx_v_c_reader = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_2);

                      /* "pyarrow/ipc.pxi":1072
 *             c_schema, batches))
 * 
 *         self = RecordBatchReader.__new__(RecordBatchReader)             # <<<<<<<<<<<<<<
 *         self.reader = c_reader
 *         return self
*/
                      __pyx_t_3 = ((PyObject *)__pyx_tp_new_7pyarrow_3lib_RecordBatchReader(((PyTypeObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RecordBatchReader), __pyx_mstate_global->__pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(19, 1072, __pyx_L1_error)
                      __Pyx_GOTREF((PyObject *)__pyx_t_3);
                      __pyx_v_self = ((struct __pyx_obj_7pyarrow_3lib_RecordBatchReader *)__pyx_t_3);
                      __pyx_t_3 = 0;

                      /* "pyarrow/ipc.pxi":1073
 * 
 *         self = RecordBatchReader.__new__(RecordBatchReader)
 *         self.reader = c_reader             # <<<<<<<<<<<<<<
 *         return self
 * 
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "reader");
                        __PYX_ERR(19, 1073, __pyx_L1_error)
                      }
                      __pyx_v_self->reader = ((arrow::py::SharedPtrNoGIL< arrow::RecordBatchReader> )__pyx_v_c_reader);

                      /* "pyarrow/ipc.pxi":1074
 *         self = RecordBatchReader.__new__(RecordBatchReader)
 *         self.reader = c_reader
 *         return self             # <<<<<<<<<<<<<<
 * 
 * 
*/
                      __Pyx_XDECREF(__pyx_r);
                      __Pyx_INCREF((PyObject *)__pyx_v_self);
                      __pyx_r = ((PyObject *)__pyx_v_self);
                      goto __pyx_L0;

                      /* "pyarrow/ipc.pxi":1047
 *         return RecordBatchReader._import_from_c_capsule(capsule)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_batches(Schema schema not None, batches):
 *         """
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_AddTraceback("pyarrow.lib.RecordBatchReader.from_batches", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XDECREF((PyObject *)__pyx_v_self);
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.reader cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_17RecordBatchReader_36__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_17RecordBatchReader_35__reduce_cython__, "RecordBatchReader.__reduce_cython__(self)");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_17RecordBatchReader_36__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_17RecordBatchReader_36__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_17RecordBatchReader_35__reduce_cython__};
                    static PyObject *__pyx_pw_7pyarrow_3lib_17RecordBatchReader_36__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; }
                      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                      if (unlikely(__pyx_kwds_len < 0)) return NULL;
                      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;}
                      __pyx_r = __pyx_pf_7pyarrow_3lib_17RecordBatchReader_35__reduce_cython__(((struct __pyx_obj_7pyarrow_3lib_RecordBatchReader *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_17RecordBatchReader_35__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_RecordBatchReader *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__reduce_cython__", 0);

                      /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "self.reader cannot be converted to a Python object for pickling"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "self.reader cannot be converted to a Python object for pickling"
*/
                      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_self_reader_cannot_be_converted, 0, 0);
                      __PYX_ERR(7, 2, __pyx_L1_error)

                      /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.reader cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib.RecordBatchReader.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "self.reader cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.reader cannot be converted to a Python object for pickling"
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_17RecordBatchReader_38__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_17RecordBatchReader_37__setstate_cython__, "RecordBatchReader.__setstate_cython__(self, __pyx_state)");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_17RecordBatchReader_38__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_17RecordBatchReader_38__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_17RecordBatchReader_37__setstate_cython__};
                    static PyObject *__pyx_pw_7pyarrow_3lib_17RecordBatchReader_38__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[1] = {0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(7, 3, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(7, 3, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(7, 3, __pyx_L3_error)
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(7, 3, __pyx_L3_error) }
                          }
                        } else if (unlikely(__pyx_nargs != 1)) {
                          goto __pyx_L5_argtuple_error;
                        } else {
                          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(7, 3, __pyx_L3_error)
                        }
                        __pyx_v___pyx_state = values[0];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(7, 3, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.RecordBatchReader.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_17RecordBatchReader_37__setstate_cython__(((struct __pyx_obj_7pyarrow_3lib_RecordBatchReader *)__pyx_v_self), __pyx_v___pyx_state);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_17RecordBatchReader_37__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib_RecordBatchReader *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__setstate_cython__", 0);

                      /* "(tree fragment)":4
 *     raise TypeError, "self.reader cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "self.reader cannot be converted to a Python object for pickling"             # <<<<<<<<<<<<<<
*/
                      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_self_reader_cannot_be_converted, 0, 0);
                      __PYX_ERR(7, 4, __pyx_L1_error)

                      /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "self.reader cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.reader cannot be converted to a Python object for pickling"
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib.RecordBatchReader.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/ipc.pxi":1083
 *         CRecordBatchStreamReader* stream_reader
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         pass
 * 
*/

                    /* Python wrapper */
                    static int __pyx_pw_7pyarrow_3lib_24_RecordBatchStreamReader_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
                    static int __pyx_pw_7pyarrow_3lib_24_RecordBatchStreamReader_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      int __pyx_r;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, __pyx_nargs); return -1; }
                      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
                      if (unlikely(__pyx_kwds_len < 0)) return -1;
                      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__cinit__", __pyx_kwds); return -1;}
                      __pyx_r = __pyx_pf_7pyarrow_3lib_24_RecordBatchStreamReader___cinit__(((struct __pyx_obj_7pyarrow_3lib__RecordBatchStreamReader *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static int __pyx_pf_7pyarrow_3lib_24_RecordBatchStreamReader___cinit__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib__RecordBatchStreamReader *__pyx_v_self) {
                      int __pyx_r;

                      /* function exit code */
                      __pyx_r = 0;
                      return __pyx_r;
                    }

                    /* "pyarrow/ipc.pxi":1086
 *         pass
 * 
 *     def _open(self, source, IpcReadOptions options=IpcReadOptions(),             # <<<<<<<<<<<<<<
 *               MemoryPool memory_pool=None):
 *         self.options = options.c_options
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_24_RecordBatchStreamReader_3_open(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_24_RecordBatchStreamReader_2_open, "_RecordBatchStreamReader._open(self, source, IpcReadOptions options=IpcReadOptions(), MemoryPool memory_pool=None)");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_24_RecordBatchStreamReader_3_open = {"_open", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_24_RecordBatchStreamReader_3_open, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_24_RecordBatchStreamReader_2_open};
                    static PyObject *__pyx_pw_7pyarrow_3lib_24_RecordBatchStreamReader_3_open(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      PyObject *__pyx_v_source = 0;
                      struct __pyx_obj_7pyarrow_3lib_IpcReadOptions *__pyx_v_options = 0;
                      struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_memory_pool = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[3] = {0,0,0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("_open (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_source,&__pyx_mstate_global->__pyx_n_u_options,&__pyx_mstate_global->__pyx_n_u_memory_pool,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(19, 1086, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  3:
                            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(19, 1086, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  2:
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(19, 1086, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(19, 1086, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_open", 0) < (0)) __PYX_ERR(19, 1086, __pyx_L3_error)
                          if (!values[1]) values[1] = __Pyx_NewRef((PyObject *)__pyx_mstate_global->__pyx_k__24);

                          /* "pyarrow/ipc.pxi":1087
 * 
 *     def _open(self, source, IpcReadOptions options=IpcReadOptions(),
 *               MemoryPool memory_pool=None):             # <<<<<<<<<<<<<<
 *         self.options = options.c_options
 *         self.options.memory_pool = maybe_unbox_memory_pool(memory_pool)
*/
                          if (!values[2]) values[2] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)Py_None));
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_open", 0, 1, 3, i); __PYX_ERR(19, 1086, __pyx_L3_error) }
                          }
                        } else {
                          switch (__pyx_nargs) {
                            case  3:
                            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(19, 1086, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  2:
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(19, 1086, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(19, 1086, __pyx_L3_error)
                            break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          if (!values[1]) values[1] = __Pyx_NewRef((PyObject *)__pyx_mstate_global->__pyx_k__24);
                          if (!values[2]) values[2] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)Py_None));
                        }
                        __pyx_v_source = values[0];
                        __pyx_v_options = ((struct __pyx_obj_7pyarrow_3lib_IpcReadOptions *)values[1]);
                        __pyx_v_memory_pool = ((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)values[2]);
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("_open", 0, 1, 3, __pyx_nargs); __PYX_ERR(19, 1086, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib._RecordBatchStreamReader._open", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_options), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_IpcReadOptions, 1, "options", 0))) __PYX_ERR(19, 1086, __pyx_L1_error)
                      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_memory_pool), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_MemoryPool, 1, "memory_pool", 0))) __PYX_ERR(19, 1087, __pyx_L1_error)
                      __pyx_r = __pyx_pf_7pyarrow_3lib_24_RecordBatchStreamReader_2_open(((struct __pyx_obj_7pyarrow_3lib__RecordBatchStreamReader *)__pyx_v_self), __pyx_v_source, __pyx_v_options, __pyx_v_memory_pool);

                      /* "pyarrow/ipc.pxi":1086
 *         pass
 * 
 *     def _open(self, source, IpcReadOptions options=IpcReadOptions(),             # <<<<<<<<<<<<<<
 *               MemoryPool memory_pool=None):
 *         self.options = options.c_options
*/

                      /* function exit code */
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __pyx_r = NULL;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      goto __pyx_L7_cleaned_up;
                      __pyx_L0:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __pyx_L7_cleaned_up:;
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_24_RecordBatchStreamReader_2_open(struct __pyx_obj_7pyarrow_3lib__RecordBatchStreamReader *__pyx_v_self, PyObject *__pyx_v_source, struct __pyx_obj_7pyarrow_3lib_IpcReadOptions *__pyx_v_options, struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_memory_pool) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                       arrow::ipc::IpcReadOptions __pyx_t_1;
                       arrow::MemoryPool *__pyx_t_2;
                      PyObject *__pyx_t_3 = NULL;
                      std::shared_ptr< arrow::RecordBatchReader>  __pyx_t_4;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("_open", 0);

                      /* "pyarrow/ipc.pxi":1088
 *     def _open(self, source, IpcReadOptions options=IpcReadOptions(),
 *               MemoryPool memory_pool=None):
 *         self.options = options.c_options             # <<<<<<<<<<<<<<
 *         self.options.memory_pool = maybe_unbox_memory_pool(memory_pool)
 *         _get_input_stream(source, &self.in_stream)
*/
                      if (unlikely(((PyObject *)__pyx_v_options) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "c_options");
                        __PYX_ERR(19, 1088, __pyx_L1_error)
                      }
                      __pyx_t_1 = __pyx_v_options->c_options;
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "options");
                        __PYX_ERR(19, 1088, __pyx_L1_error)
                      }
                      __pyx_v_self->options = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_1);

                      /* "pyarrow/ipc.pxi":1089
 *               MemoryPool memory_pool=None):
 *         self.options = options.c_options
 *         self.options.memory_pool = maybe_unbox_memory_pool(memory_pool)             # <<<<<<<<<<<<<<
 *         _get_input_stream(source, &self.in_stream)
 *         with nogil:
*/
                      __pyx_t_2 = __pyx_f_7pyarrow_3lib_maybe_unbox_memory_pool(__pyx_v_memory_pool); if (unlikely(__pyx_t_2 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(19, 1089, __pyx_L1_error)
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "options");
                        __PYX_ERR(19, 1089, __pyx_L1_error)
                      }
                      __pyx_v_self->options.memory_pool = __pyx_t_2;

                      /* "pyarrow/ipc.pxi":1090
 *         self.options = options.c_options
 *         self.options.memory_pool = maybe_unbox_memory_pool(memory_pool)
 *         _get_input_stream(source, &self.in_stream)             # <<<<<<<<<<<<<<
 *         with nogil:
 *             self.reader = GetResultValue(CRecordBatchStreamReader.Open(
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "in_stream");
                        __PYX_ERR(19, 1090, __pyx_L1_error)
                      }
                      __pyx_t_3 = __pyx_f_7pyarrow_3lib__get_input_stream(__pyx_v_source, (&__pyx_v_self->in_stream)); if (unlikely(!__pyx_t_3)) __PYX_ERR(19, 1090, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_3);
                      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

                      /* "pyarrow/ipc.pxi":1091
 *         self.options.memory_pool = maybe_unbox_memory_pool(memory_pool)
 *         _get_input_stream(source, &self.in_stream)
 *         with nogil:             # <<<<<<<<<<<<<<
 *             self.reader = GetResultValue(CRecordBatchStreamReader.Open(
 *                 self.in_stream, self.options))
*/
                      {
                          PyThreadState * _save;
                          _save = PyEval_SaveThread();
                          __Pyx_FastGIL_Remember();
                          /*try:*/ {

                            /* "pyarrow/ipc.pxi":1093
 *         with nogil:
 *             self.reader = GetResultValue(CRecordBatchStreamReader.Open(
 *                 self.in_stream, self.options))             # <<<<<<<<<<<<<<
 *             self.stream_reader = <CRecordBatchStreamReader*> self.reader.get()
 * 
*/
                            if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                              PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "in_stream");
                              __Pyx_PyGILState_Release(__pyx_gilstate_save);
                              __PYX_ERR(19, 1093, __pyx_L4_error)
                            }
                            if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                              PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "options");
                              __Pyx_PyGILState_Release(__pyx_gilstate_save);
                              __PYX_ERR(19, 1093, __pyx_L4_error)
                            }

                            /* "pyarrow/ipc.pxi":1092
 *         _get_input_stream(source, &self.in_stream)
 *         with nogil:
 *             self.reader = GetResultValue(CRecordBatchStreamReader.Open(             # <<<<<<<<<<<<<<
 *                 self.in_stream, self.options))
 *             self.stream_reader = <CRecordBatchStreamReader*> self.reader.get()
*/
                            __pyx_t_4 = arrow::py::GetResultValue<std::shared_ptr< arrow::RecordBatchReader> >( arrow::ipc::RecordBatchStreamReader::Open(__pyx_v_self->in_stream, __pyx_v_self->options)); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(19, 1092, __pyx_L4_error)
                            if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                              PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "reader");
                              __Pyx_PyGILState_Release(__pyx_gilstate_save);
                              __PYX_ERR(19, 1092, __pyx_L4_error)
                            }
                            __pyx_v_self->__pyx_base.reader = __PYX_STD_MOVE_IF_SUPPORTED(((arrow::py::SharedPtrNoGIL< arrow::RecordBatchReader> )__pyx_t_4));

                            /* "pyarrow/ipc.pxi":1094
 *             self.reader = GetResultValue(CRecordBatchStreamReader.Open(
 *                 self.in_stream, self.options))
 *             self.stream_reader = <CRecordBatchStreamReader*> self.reader.get()             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
                            if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                              PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "reader");
                              __Pyx_PyGILState_Release(__pyx_gilstate_save);
                              __PYX_ERR(19, 1094, __pyx_L4_error)
                            }
                            if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                              PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "stream_reader");
                              __Pyx_PyGILState_Release(__pyx_gilstate_save);
                              __PYX_ERR(19, 1094, __pyx_L4_error)
                            }
                            __pyx_v_self->stream_reader = (( arrow::ipc::RecordBatchStreamReader *)__pyx_v_self->__pyx_base.reader.get());
                          }

                          /* "pyarrow/ipc.pxi":1091
 *         self.options.memory_pool = maybe_unbox_memory_pool(memory_pool)
 *         _get_input_stream(source, &self.in_stream)
 *         with nogil:             # <<<<<<<<<<<<<<
 *             self.reader = GetResultValue(CRecordBatchStreamReader.Open(
 *                 self.in_stream, self.options))
*/
                          /*finally:*/ {
                            /*normal exit:*/{
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L5;
                            }
                            __pyx_L4_error: {
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L1_error;
                            }
                            __pyx_L5:;
                          }
                      }

                      /* "pyarrow/ipc.pxi":1086
 *         pass
 * 
 *     def _open(self, source, IpcReadOptions options=IpcReadOptions(),             # <<<<<<<<<<<<<<
 *               MemoryPool memory_pool=None):
 *         self.options = options.c_options
*/

                      /* function exit code */
                      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_AddTraceback("pyarrow.lib._RecordBatchStreamReader._open", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/ipc.pxi":1096
 *             self.stream_reader = <CRecordBatchStreamReader*> self.reader.get()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def stats(self):
 *         """
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_24_RecordBatchStreamReader_5stats_1__get__(PyObject *__pyx_v_self); /*proto*/
                    static PyObject *__pyx_pw_7pyarrow_3lib_24_RecordBatchStreamReader_5stats_1__get__(PyObject *__pyx_v_self) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_24_RecordBatchStreamReader_5stats___get__(((struct __pyx_obj_7pyarrow_3lib__RecordBatchStreamReader *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_24_RecordBatchStreamReader_5stats___get__(struct __pyx_obj_7pyarrow_3lib__RecordBatchStreamReader *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_t_1;
                      PyObject *__pyx_t_2 = NULL;
                      PyObject *__pyx_t_3 = NULL;
                      size_t __pyx_t_4;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__get__", 0);

                      /* "pyarrow/ipc.pxi":1101
 *         Current IPC read statistics.
 *         """
 *         if not self.reader:             # <<<<<<<<<<<<<<
 *             raise ValueError("Operation on closed reader")
 *         return _wrap_read_stats(self.stream_reader.stats())
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "reader");
                        __PYX_ERR(19, 1101, __pyx_L1_error)
                      }
                      __pyx_t_1 = ((!__pyx_v_self->__pyx_base.reader) != 0);
                      if (unlikely(__pyx_t_1)) {

                        /* "pyarrow/ipc.pxi":1102
 *         """
 *         if not self.reader:
 *             raise ValueError("Operation on closed reader")             # <<<<<<<<<<<<<<
 *         return _wrap_read_stats(self.stream_reader.stats())
 * 
*/
                        __pyx_t_3 = NULL;
                        __pyx_t_4 = 1;
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Operation_on_closed_reader};
                          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                          if (unlikely(!__pyx_t_2)) __PYX_ERR(19, 1102, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_2);
                        }
                        __Pyx_Raise(__pyx_t_2, 0, 0, 0);
                        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                        __PYX_ERR(19, 1102, __pyx_L1_error)

                        /* "pyarrow/ipc.pxi":1101
 *         Current IPC read statistics.
 *         """
 *         if not self.reader:             # <<<<<<<<<<<<<<
 *             raise ValueError("Operation on closed reader")
 *         return _wrap_read_stats(self.stream_reader.stats())
*/
                      }

                      /* "pyarrow/ipc.pxi":1103
 *         if not self.reader:
 *             raise ValueError("Operation on closed reader")
 *         return _wrap_read_stats(self.stream_reader.stats())             # <<<<<<<<<<<<<<
 * 
 * 
*/
                      __Pyx_XDECREF(__pyx_r);
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "stream_reader");
                        __PYX_ERR(19, 1103, __pyx_L1_error)
                      }
                      __pyx_t_2 = __pyx_f_7pyarrow_3lib__wrap_read_stats(__pyx_v_self->stream_reader->stats()); if (unlikely(!__pyx_t_2)) __PYX_ERR(19, 1103, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_2);
                      __pyx_r = __pyx_t_2;
                      __pyx_t_2 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/ipc.pxi":1096
 *             self.stream_reader = <CRecordBatchStreamReader*> self.reader.get()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def stats(self):
 *         """
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_AddTraceback("pyarrow.lib._RecordBatchStreamReader.stats.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_24_RecordBatchStreamReader_5__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_24_RecordBatchStreamReader_4__reduce_cython__, "_RecordBatchStreamReader.__reduce_cython__(self)");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_24_RecordBatchStreamReader_5__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_24_RecordBatchStreamReader_5__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_24_RecordBatchStreamReader_4__reduce_cython__};
                    static PyObject *__pyx_pw_7pyarrow_3lib_24_RecordBatchStreamReader_5__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; }
                      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                      if (unlikely(__pyx_kwds_len < 0)) return NULL;
                      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;}
                      __pyx_r = __pyx_pf_7pyarrow_3lib_24_RecordBatchStreamReader_4__reduce_cython__(((struct __pyx_obj_7pyarrow_3lib__RecordBatchStreamReader *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_24_RecordBatchStreamReader_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib__RecordBatchStreamReader *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__reduce_cython__", 0);

                      /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/
                      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0);
                      __PYX_ERR(7, 2, __pyx_L1_error)

                      /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib._RecordBatchStreamReader.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_24_RecordBatchStreamReader_7__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_24_RecordBatchStreamReader_6__setstate_cython__, "_RecordBatchStreamReader.__setstate_cython__(self, __pyx_state)");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_24_RecordBatchStreamReader_7__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_24_RecordBatchStreamReader_7__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_24_RecordBatchStreamReader_6__setstate_cython__};
                    static PyObject *__pyx_pw_7pyarrow_3lib_24_RecordBatchStreamReader_7__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[1] = {0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(7, 3, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(7, 3, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(7, 3, __pyx_L3_error)
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(7, 3, __pyx_L3_error) }
                          }
                        } else if (unlikely(__pyx_nargs != 1)) {
                          goto __pyx_L5_argtuple_error;
                        } else {
                          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(7, 3, __pyx_L3_error)
                        }
                        __pyx_v___pyx_state = values[0];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(7, 3, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib._RecordBatchStreamReader.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_24_RecordBatchStreamReader_6__setstate_cython__(((struct __pyx_obj_7pyarrow_3lib__RecordBatchStreamReader *)__pyx_v_self), __pyx_v___pyx_state);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_24_RecordBatchStreamReader_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib__RecordBatchStreamReader *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__setstate_cython__", 0);

                      /* "(tree fragment)":4
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
*/
                      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0);
                      __PYX_ERR(7, 4, __pyx_L1_error)

                      /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib._RecordBatchStreamReader.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/ipc.pxi":1108
 * cdef class _RecordBatchFileWriter(_RecordBatchStreamWriter):
 * 
 *     def _open(self, sink, Schema schema not None,             # <<<<<<<<<<<<<<
 *               IpcWriteOptions options=IpcWriteOptions(),
 *               metadata=None):
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_22_RecordBatchFileWriter_1_open(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_22_RecordBatchFileWriter__open, "_RecordBatchFileWriter._open(self, sink, Schema schema, IpcWriteOptions options=IpcWriteOptions(), metadata=None)");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_22_RecordBatchFileWriter_1_open = {"_open", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_22_RecordBatchFileWriter_1_open, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_22_RecordBatchFileWriter__open};
                    static PyObject *__pyx_pw_7pyarrow_3lib_22_RecordBatchFileWriter_1_open(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      PyObject *__pyx_v_sink = 0;
                      struct __pyx_obj_7pyarrow_3lib_Schema *__pyx_v_schema = 0;
                      struct __pyx_obj_7pyarrow_3lib_IpcWriteOptions *__pyx_v_options = 0;
                      PyObject *__pyx_v_metadata = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[4] = {0,0,0,0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("_open (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_sink,&__pyx_mstate_global->__pyx_n_u_schema,&__pyx_mstate_global->__pyx_n_u_options,&__pyx_mstate_global->__pyx_n_u_metadata,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(19, 1108, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  4:
                            values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(19, 1108, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  3:
                            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(19, 1108, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  2:
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(19, 1108, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(19, 1108, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_open", 0) < (0)) __PYX_ERR(19, 1108, __pyx_L3_error)
                          if (!values[2]) values[2] = __Pyx_NewRef((PyObject *)__pyx_mstate_global->__pyx_k__25);

                          /* "pyarrow/ipc.pxi":1110
 *     def _open(self, sink, Schema schema not None,
 *               IpcWriteOptions options=IpcWriteOptions(),
 *               metadata=None):             # <<<<<<<<<<<<<<
 *         cdef:
 *             shared_ptr[COutputStream] c_sink
*/
                          if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None));
                          for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_open", 0, 2, 4, i); __PYX_ERR(19, 1108, __pyx_L3_error) }
                          }
                        } else {
                          switch (__pyx_nargs) {
                            case  4:
                            values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(19, 1108, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  3:
                            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(19, 1108, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  2:
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(19, 1108, __pyx_L3_error)
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(19, 1108, __pyx_L3_error)
                            break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          if (!values[2]) values[2] = __Pyx_NewRef((PyObject *)__pyx_mstate_global->__pyx_k__25);
                          if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None));
                        }
                        __pyx_v_sink = values[0];
                        __pyx_v_schema = ((struct __pyx_obj_7pyarrow_3lib_Schema *)values[1]);
                        __pyx_v_options = ((struct __pyx_obj_7pyarrow_3lib_IpcWriteOptions *)values[2]);
                        __pyx_v_metadata = values[3];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("_open", 0, 2, 4, __pyx_nargs); __PYX_ERR(19, 1108, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib._RecordBatchFileWriter._open", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_schema), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Schema, 0, "schema", 0))) __PYX_ERR(19, 1108, __pyx_L1_error)
                      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_options), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_IpcWriteOptions, 1, "options", 0))) __PYX_ERR(19, 1109, __pyx_L1_error)
                      __pyx_r = __pyx_pf_7pyarrow_3lib_22_RecordBatchFileWriter__open(((struct __pyx_obj_7pyarrow_3lib__RecordBatchFileWriter *)__pyx_v_self), __pyx_v_sink, __pyx_v_schema, __pyx_v_options, __pyx_v_metadata);

                      /* "pyarrow/ipc.pxi":1108
 * cdef class _RecordBatchFileWriter(_RecordBatchStreamWriter):
 * 
 *     def _open(self, sink, Schema schema not None,             # <<<<<<<<<<<<<<
 *               IpcWriteOptions options=IpcWriteOptions(),
 *               metadata=None):
*/

                      /* function exit code */
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __pyx_r = NULL;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      goto __pyx_L7_cleaned_up;
                      __pyx_L0:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __pyx_L7_cleaned_up:;
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_22_RecordBatchFileWriter__open(struct __pyx_obj_7pyarrow_3lib__RecordBatchFileWriter *__pyx_v_self, PyObject *__pyx_v_sink, struct __pyx_obj_7pyarrow_3lib_Schema *__pyx_v_schema, struct __pyx_obj_7pyarrow_3lib_IpcWriteOptions *__pyx_v_options, PyObject *__pyx_v_metadata) {
                      std::shared_ptr< arrow::io::OutputStream>  __pyx_v_c_sink;
                      std::shared_ptr< arrow::KeyValueMetadata const >  __pyx_v_c_meta;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                       arrow::ipc::IpcWriteOptions __pyx_t_1;
                      PyObject *__pyx_t_2 = NULL;
                      struct __pyx_opt_args_7pyarrow_3lib_ensure_metadata __pyx_t_3;
                      std::shared_ptr< arrow::KeyValueMetadata const >  __pyx_t_4;
                      std::shared_ptr< arrow::ipc::RecordBatchWriter>  __pyx_t_5;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("_open", 0);
                      __Pyx_INCREF(__pyx_v_metadata);

                      /* "pyarrow/ipc.pxi":1115
 *             shared_ptr[const CKeyValueMetadata] c_meta
 * 
 *         self.options = options.c_options             # <<<<<<<<<<<<<<
 *         get_writer(sink, &c_sink)
 * 
*/
                      if (unlikely(((PyObject *)__pyx_v_options) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "c_options");
                        __PYX_ERR(19, 1115, __pyx_L1_error)
                      }
                      __pyx_t_1 = __pyx_v_options->c_options;
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "options");
                        __PYX_ERR(19, 1115, __pyx_L1_error)
                      }
                      __pyx_v_self->__pyx_base.options = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_1);

                      /* "pyarrow/ipc.pxi":1116
 * 
 *         self.options = options.c_options
 *         get_writer(sink, &c_sink)             # <<<<<<<<<<<<<<
 * 
 *         metadata = ensure_metadata(metadata, allow_none=True)
*/
                      __pyx_t_2 = __pyx_f_7pyarrow_3lib_get_writer(__pyx_v_sink, (&__pyx_v_c_sink)); if (unlikely(!__pyx_t_2)) __PYX_ERR(19, 1116, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_2);
                      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

                      /* "pyarrow/ipc.pxi":1118
 *         get_writer(sink, &c_sink)
 * 
 *         metadata = ensure_metadata(metadata, allow_none=True)             # <<<<<<<<<<<<<<
 *         c_meta = pyarrow_unwrap_metadata(metadata)
 * 
*/
                      __pyx_t_3.__pyx_n = 1;
                      __pyx_t_3.allow_none = 1;
                      __pyx_t_2 = ((PyObject *)__pyx_f_7pyarrow_3lib_ensure_metadata(__pyx_v_metadata, 0, &__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(19, 1118, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_2);
                      __Pyx_DECREF_SET(__pyx_v_metadata, __pyx_t_2);
                      __pyx_t_2 = 0;

                      /* "pyarrow/ipc.pxi":1119
 * 
 *         metadata = ensure_metadata(metadata, allow_none=True)
 *         c_meta = pyarrow_unwrap_metadata(metadata)             # <<<<<<<<<<<<<<
 * 
 *         with nogil:
*/
                      __pyx_t_4 = __pyx_f_7pyarrow_3lib_pyarrow_unwrap_metadata(__pyx_v_metadata); if (unlikely(PyErr_Occurred())) __PYX_ERR(19, 1119, __pyx_L1_error)
                      __pyx_v_c_meta = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_4);

                      /* "pyarrow/ipc.pxi":1121
 *         c_meta = pyarrow_unwrap_metadata(metadata)
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             self.writer = GetResultValue(
 *                 MakeFileWriter(c_sink, schema.sp_schema, self.options, c_meta))
*/
                      {
                          PyThreadState * _save;
                          _save = PyEval_SaveThread();
                          __Pyx_FastGIL_Remember();
                          /*try:*/ {

                            /* "pyarrow/ipc.pxi":1123
 *         with nogil:
 *             self.writer = GetResultValue(
 *                 MakeFileWriter(c_sink, schema.sp_schema, self.options, c_meta))             # <<<<<<<<<<<<<<
 * 
 * _RecordBatchWithMetadata = namedtuple(
*/
                            if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                              PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "options");
                              __Pyx_PyGILState_Release(__pyx_gilstate_save);
                              __PYX_ERR(19, 1123, __pyx_L4_error)
                            }

                            /* "pyarrow/ipc.pxi":1122
 * 
 *         with nogil:
 *             self.writer = GetResultValue(             # <<<<<<<<<<<<<<
 *                 MakeFileWriter(c_sink, schema.sp_schema, self.options, c_meta))
 * 
*/
                            __pyx_t_5 = arrow::py::GetResultValue<std::shared_ptr< arrow::ipc::RecordBatchWriter> >(arrow::ipc::MakeFileWriter(__pyx_v_c_sink, __pyx_v_schema->sp_schema, __pyx_v_self->__pyx_base.options, __pyx_v_c_meta)); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(19, 1122, __pyx_L4_error)
                            if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                              PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "writer");
                              __Pyx_PyGILState_Release(__pyx_gilstate_save);
                              __PYX_ERR(19, 1122, __pyx_L4_error)
                            }
                            __pyx_v_self->__pyx_base.__pyx_base.writer = __PYX_STD_MOVE_IF_SUPPORTED(((arrow::py::SharedPtrNoGIL< arrow::ipc::RecordBatchWriter> )__pyx_t_5));
                          }

                          /* "pyarrow/ipc.pxi":1121
 *         c_meta = pyarrow_unwrap_metadata(metadata)
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             self.writer = GetResultValue(
 *                 MakeFileWriter(c_sink, schema.sp_schema, self.options, c_meta))
*/
                          /*finally:*/ {
                            /*normal exit:*/{
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L5;
                            }
                            __pyx_L4_error: {
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L1_error;
                            }
                            __pyx_L5:;
                          }
                      }

                      /* "pyarrow/ipc.pxi":1108
 * cdef class _RecordBatchFileWriter(_RecordBatchStreamWriter):
 * 
 *     def _open(self, sink, Schema schema not None,             # <<<<<<<<<<<<<<
 *               IpcWriteOptions options=IpcWriteOptions(),
 *               metadata=None):
*/

                      /* function exit code */
                      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_AddTraceback("pyarrow.lib._RecordBatchFileWriter._open", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XDECREF(__pyx_v_metadata);
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_22_RecordBatchFileWriter_3__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_22_RecordBatchFileWriter_2__reduce_cython__, "_RecordBatchFileWriter.__reduce_cython__(self)");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_22_RecordBatchFileWriter_3__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_22_RecordBatchFileWriter_3__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_22_RecordBatchFileWriter_2__reduce_cython__};
                    static PyObject *__pyx_pw_7pyarrow_3lib_22_RecordBatchFileWriter_3__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; }
                      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                      if (unlikely(__pyx_kwds_len < 0)) return NULL;
                      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;}
                      __pyx_r = __pyx_pf_7pyarrow_3lib_22_RecordBatchFileWriter_2__reduce_cython__(((struct __pyx_obj_7pyarrow_3lib__RecordBatchFileWriter *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_22_RecordBatchFileWriter_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib__RecordBatchFileWriter *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__reduce_cython__", 0);

                      /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/
                      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0);
                      __PYX_ERR(7, 2, __pyx_L1_error)

                      /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib._RecordBatchFileWriter.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_22_RecordBatchFileWriter_5__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_22_RecordBatchFileWriter_4__setstate_cython__, "_RecordBatchFileWriter.__setstate_cython__(self, __pyx_state)");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_22_RecordBatchFileWriter_5__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_22_RecordBatchFileWriter_5__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_22_RecordBatchFileWriter_4__setstate_cython__};
                    static PyObject *__pyx_pw_7pyarrow_3lib_22_RecordBatchFileWriter_5__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[1] = {0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(7, 3, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(7, 3, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(7, 3, __pyx_L3_error)
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(7, 3, __pyx_L3_error) }
                          }
                        } else if (unlikely(__pyx_nargs != 1)) {
                          goto __pyx_L5_argtuple_error;
                        } else {
                          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(7, 3, __pyx_L3_error)
                        }
                        __pyx_v___pyx_state = values[0];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(7, 3, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib._RecordBatchFileWriter.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_22_RecordBatchFileWriter_4__setstate_cython__(((struct __pyx_obj_7pyarrow_3lib__RecordBatchFileWriter *)__pyx_v_self), __pyx_v___pyx_state);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_22_RecordBatchFileWriter_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib__RecordBatchFileWriter *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__setstate_cython__", 0);

                      /* "(tree fragment)":4
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
*/
                      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0);
                      __PYX_ERR(7, 4, __pyx_L1_error)

                      /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib._RecordBatchFileWriter.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/ipc.pxi":1141
 * 
 * 
 * @staticmethod             # <<<<<<<<<<<<<<
 * cdef _wrap_record_batch_with_metadata(CRecordBatchWithMetadata c):
 *     return RecordBatchWithMetadata(pyarrow_wrap_batch(c.batch),
*/

                    static PyObject *__pyx_f_7pyarrow_3lib__wrap_record_batch_with_metadata( arrow::RecordBatchWithMetadata __pyx_v_c) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      PyObject *__pyx_t_2 = NULL;
                      PyObject *__pyx_t_3 = NULL;
                      PyObject *__pyx_t_4 = NULL;
                      PyObject *__pyx_t_5 = NULL;
                      size_t __pyx_t_6;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("_wrap_record_batch_with_metadata", 0);

                      /* "pyarrow/ipc.pxi":1143
 * @staticmethod
 * cdef _wrap_record_batch_with_metadata(CRecordBatchWithMetadata c):
 *     return RecordBatchWithMetadata(pyarrow_wrap_batch(c.batch),             # <<<<<<<<<<<<<<
 *                                    pyarrow_wrap_metadata(c.custom_metadata))
 * 
*/
                      __Pyx_XDECREF(__pyx_r);
                      __pyx_t_2 = NULL;
                      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_RecordBatchWithMetadata); if (unlikely(!__pyx_t_3)) __PYX_ERR(19, 1143, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_3);
                      __pyx_t_4 = pyarrow_wrap_batch(__pyx_v_c.batch); if (unlikely(!__pyx_t_4)) __PYX_ERR(19, 1143, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_4);

                      /* "pyarrow/ipc.pxi":1144
 * cdef _wrap_record_batch_with_metadata(CRecordBatchWithMetadata c):
 *     return RecordBatchWithMetadata(pyarrow_wrap_batch(c.batch),
 *                                    pyarrow_wrap_metadata(c.custom_metadata))             # <<<<<<<<<<<<<<
 * 
 * 
*/
                      __pyx_t_5 = __pyx_f_7pyarrow_3lib_pyarrow_wrap_metadata(__pyx_v_c.custom_metadata); if (unlikely(!__pyx_t_5)) __PYX_ERR(19, 1144, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_5);
                      __pyx_t_6 = 1;
                      #if CYTHON_UNPACK_METHODS
                      if (unlikely(PyMethod_Check(__pyx_t_3))) {
                        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
                        assert(__pyx_t_2);
                        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
                        __Pyx_INCREF(__pyx_t_2);
                        __Pyx_INCREF(__pyx__function);
                        __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
                        __pyx_t_6 = 0;
                      }
                      #endif
                      {
                        PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_t_4, __pyx_t_5};
                        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                        if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 1143, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_1);
                      }
                      __pyx_r = __pyx_t_1;
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/ipc.pxi":1141
 * 
 * 
 * @staticmethod             # <<<<<<<<<<<<<<
 * cdef _wrap_record_batch_with_metadata(CRecordBatchWithMetadata c):
 *     return RecordBatchWithMetadata(pyarrow_wrap_batch(c.batch),
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_XDECREF(__pyx_t_4);
                      __Pyx_XDECREF(__pyx_t_5);
                      __Pyx_AddTraceback("pyarrow.lib._wrap_record_batch_with_metadata", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = 0;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/ipc.pxi":1156
 *         Schema schema
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         pass
 * 
*/

                    /* Python wrapper */
                    static int __pyx_pw_7pyarrow_3lib_22_RecordBatchFileReader_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
                    static int __pyx_pw_7pyarrow_3lib_22_RecordBatchFileReader_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      int __pyx_r;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, __pyx_nargs); return -1; }
                      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
                      if (unlikely(__pyx_kwds_len < 0)) return -1;
                      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__cinit__", __pyx_kwds); return -1;}
                      __pyx_r = __pyx_pf_7pyarrow_3lib_22_RecordBatchFileReader___cinit__(((struct __pyx_obj_7pyarrow_3lib__RecordBatchFileReader *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static int __pyx_pf_7pyarrow_3lib_22_RecordBatchFileReader___cinit__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib__RecordBatchFileReader *__pyx_v_self) {
                      int __pyx_r;

                      /* function exit code */
                      __pyx_r = 0;
                      return __pyx_r;
                    }

                    /* "pyarrow/ipc.pxi":1159
 *         pass
 * 
 *     def _open(self, source, footer_offset=None,             # <<<<<<<<<<<<<<
 *               IpcReadOptions options=IpcReadOptions(),
 *               MemoryPool memory_pool=None):
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_22_RecordBatchFileReader_3_open(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_22_RecordBatchFileReader_2_open, "_RecordBatchFileReader._open(self, source, footer_offset=None, IpcReadOptions options=IpcReadOptions(), MemoryPool memory_pool=None)");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_22_RecordBatchFileReader_3_open = {"_open", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_22_RecordBatchFileReader_3_open, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_22_RecordBatchFileReader_2_open};
                    static PyObject *__pyx_pw_7pyarrow_3lib_22_RecordBatchFileReader_3_open(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      PyObject *__pyx_v_source = 0;
                      PyObject *__pyx_v_footer_offset = 0;
                      struct __pyx_obj_7pyarrow_3lib_IpcReadOptions *__pyx_v_options = 0;
                      struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_memory_pool = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[4] = {0,0,0,0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("_open (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_source,&__pyx_mstate_global->__pyx_n_u_footer_offset,&__pyx_mstate_global->__pyx_n_u_options,&__pyx_mstate_global->__pyx_n_u_memory_pool,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(19, 1159, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  4:
                            values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(19, 1159, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  3:
                            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(19, 1159, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  2:
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(19, 1159, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(19, 1159, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_open", 0) < (0)) __PYX_ERR(19, 1159, __pyx_L3_error)
                          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
                          if (!values[2]) values[2] = __Pyx_NewRef((PyObject *)__pyx_mstate_global->__pyx_k__26);

                          /* "pyarrow/ipc.pxi":1161
 *     def _open(self, source, footer_offset=None,
 *               IpcReadOptions options=IpcReadOptions(),
 *               MemoryPool memory_pool=None):             # <<<<<<<<<<<<<<
 *         self.options = options.c_options
 *         self.options.memory_pool = maybe_unbox_memory_pool(memory_pool)
*/
                          if (!values[3]) values[3] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)Py_None));
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_open", 0, 1, 4, i); __PYX_ERR(19, 1159, __pyx_L3_error) }
                          }
                        } else {
                          switch (__pyx_nargs) {
                            case  4:
                            values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(19, 1159, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  3:
                            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(19, 1159, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  2:
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(19, 1159, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(19, 1159, __pyx_L3_error)
                            break;
                            default: goto __pyx_L5_argtuple_error;
                          }

                          /* "pyarrow/ipc.pxi":1159
 *         pass
 * 
 *     def _open(self, source, footer_offset=None,             # <<<<<<<<<<<<<<
 *               IpcReadOptions options=IpcReadOptions(),
 *               MemoryPool memory_pool=None):
*/
                          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
                          if (!values[2]) values[2] = __Pyx_NewRef((PyObject *)__pyx_mstate_global->__pyx_k__26);

                          /* "pyarrow/ipc.pxi":1161
 *     def _open(self, source, footer_offset=None,
 *               IpcReadOptions options=IpcReadOptions(),
 *               MemoryPool memory_pool=None):             # <<<<<<<<<<<<<<
 *         self.options = options.c_options
 *         self.options.memory_pool = maybe_unbox_memory_pool(memory_pool)
*/
                          if (!values[3]) values[3] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)Py_None));
                        }
                        __pyx_v_source = values[0];
                        __pyx_v_footer_offset = values[1];
                        __pyx_v_options = ((struct __pyx_obj_7pyarrow_3lib_IpcReadOptions *)values[2]);
                        __pyx_v_memory_pool = ((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)values[3]);
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("_open", 0, 1, 4, __pyx_nargs); __PYX_ERR(19, 1159, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib._RecordBatchFileReader._open", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_options), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_IpcReadOptions, 1, "options", 0))) __PYX_ERR(19, 1160, __pyx_L1_error)
                      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_memory_pool), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_MemoryPool, 1, "memory_pool", 0))) __PYX_ERR(19, 1161, __pyx_L1_error)
                      __pyx_r = __pyx_pf_7pyarrow_3lib_22_RecordBatchFileReader_2_open(((struct __pyx_obj_7pyarrow_3lib__RecordBatchFileReader *)__pyx_v_self), __pyx_v_source, __pyx_v_footer_offset, __pyx_v_options, __pyx_v_memory_pool);

                      /* "pyarrow/ipc.pxi":1159
 *         pass
 * 
 *     def _open(self, source, footer_offset=None,             # <<<<<<<<<<<<<<
 *               IpcReadOptions options=IpcReadOptions(),
 *               MemoryPool memory_pool=None):
*/

                      /* function exit code */
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __pyx_r = NULL;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      goto __pyx_L7_cleaned_up;
                      __pyx_L0:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __pyx_L7_cleaned_up:;
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_22_RecordBatchFileReader_2_open(struct __pyx_obj_7pyarrow_3lib__RecordBatchFileReader *__pyx_v_self, PyObject *__pyx_v_source, PyObject *__pyx_v_footer_offset, struct __pyx_obj_7pyarrow_3lib_IpcReadOptions *__pyx_v_options, struct __pyx_obj_7pyarrow_3lib_MemoryPool *__pyx_v_memory_pool) {
                      int64_t __pyx_v_offset;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                       arrow::ipc::IpcReadOptions __pyx_t_1;
                       arrow::MemoryPool *__pyx_t_2;
                      PyObject *__pyx_t_3 = NULL;
                      PyObject *__pyx_t_4 = NULL;
                      PyObject *__pyx_t_5 = NULL;
                      PyObject *__pyx_t_6 = NULL;
                      PyObject *__pyx_t_7 = NULL;
                      PyObject *__pyx_t_8 = NULL;
                      size_t __pyx_t_9;
                      int __pyx_t_10;
                      int __pyx_t_11;
                      int64_t __pyx_t_12;
                      std::shared_ptr< arrow::ipc::RecordBatchFileReader>  __pyx_t_13;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("_open", 0);
                      __Pyx_INCREF(__pyx_v_source);

                      /* "pyarrow/ipc.pxi":1162
 *               IpcReadOptions options=IpcReadOptions(),
 *               MemoryPool memory_pool=None):
 *         self.options = options.c_options             # <<<<<<<<<<<<<<
 *         self.options.memory_pool = maybe_unbox_memory_pool(memory_pool)
 *         try:
*/
                      if (unlikely(((PyObject *)__pyx_v_options) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "c_options");
                        __PYX_ERR(19, 1162, __pyx_L1_error)
                      }
                      __pyx_t_1 = __pyx_v_options->c_options;
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "options");
                        __PYX_ERR(19, 1162, __pyx_L1_error)
                      }
                      __pyx_v_self->options = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_1);

                      /* "pyarrow/ipc.pxi":1163
 *               MemoryPool memory_pool=None):
 *         self.options = options.c_options
 *         self.options.memory_pool = maybe_unbox_memory_pool(memory_pool)             # <<<<<<<<<<<<<<
 *         try:
 *             source = as_buffer(source)
*/
                      __pyx_t_2 = __pyx_f_7pyarrow_3lib_maybe_unbox_memory_pool(__pyx_v_memory_pool); if (unlikely(__pyx_t_2 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(19, 1163, __pyx_L1_error)
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "options");
                        __PYX_ERR(19, 1163, __pyx_L1_error)
                      }
                      __pyx_v_self->options.memory_pool = __pyx_t_2;

                      /* "pyarrow/ipc.pxi":1164
 *         self.options = options.c_options
 *         self.options.memory_pool = maybe_unbox_memory_pool(memory_pool)
 *         try:             # <<<<<<<<<<<<<<
 *             source = as_buffer(source)
 *         except TypeError:
*/
                      {
                        __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:*/ {

                          /* "pyarrow/ipc.pxi":1165
 *         self.options.memory_pool = maybe_unbox_memory_pool(memory_pool)
 *         try:
 *             source = as_buffer(source)             # <<<<<<<<<<<<<<
 *         except TypeError:
 *             pass
*/
                          __pyx_t_7 = NULL;
                          __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_as_buffer); if (unlikely(!__pyx_t_8)) __PYX_ERR(19, 1165, __pyx_L3_error)
                          __Pyx_GOTREF(__pyx_t_8);
                          __pyx_t_9 = 1;
                          #if CYTHON_UNPACK_METHODS
                          if (unlikely(PyMethod_Check(__pyx_t_8))) {
                            __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8);
                            assert(__pyx_t_7);
                            PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8);
                            __Pyx_INCREF(__pyx_t_7);
                            __Pyx_INCREF(__pyx__function);
                            __Pyx_DECREF_SET(__pyx_t_8, __pyx__function);
                            __pyx_t_9 = 0;
                          }
                          #endif
                          {
                            PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_source};
                            __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
                            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                            if (unlikely(!__pyx_t_6)) __PYX_ERR(19, 1165, __pyx_L3_error)
                            __Pyx_GOTREF(__pyx_t_6);
                          }
                          __Pyx_DECREF_SET(__pyx_v_source, __pyx_t_6);
                          __pyx_t_6 = 0;

                          /* "pyarrow/ipc.pxi":1164
 *         self.options = options.c_options
 *         self.options.memory_pool = maybe_unbox_memory_pool(memory_pool)
 *         try:             # <<<<<<<<<<<<<<
 *             source = as_buffer(source)
 *         except TypeError:
*/
                        }
                        __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_L8_try_end;
                        __pyx_L3_error:;
                        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
                        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
                        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;

                        /* "pyarrow/ipc.pxi":1166
 *         try:
 *             source = as_buffer(source)
 *         except TypeError:             # <<<<<<<<<<<<<<
 *             pass
 * 
*/
                        __pyx_t_10 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_TypeError))));
                        if (__pyx_t_10) {
                          __Pyx_ErrRestore(0,0,0);
                          goto __pyx_L4_exception_handled;
                        }
                        goto __pyx_L5_except_error;

                        /* "pyarrow/ipc.pxi":1164
 *         self.options = options.c_options
 *         self.options.memory_pool = maybe_unbox_memory_pool(memory_pool)
 *         try:             # <<<<<<<<<<<<<<
 *             source = as_buffer(source)
 *         except TypeError:
*/
                        __pyx_L5_except_error:;
                        __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_L4_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_L8_try_end:;
                      }

                      /* "pyarrow/ipc.pxi":1169
 *             pass
 * 
 *         get_reader(source, False, &self.file)             # <<<<<<<<<<<<<<
 * 
 *         cdef int64_t offset = 0
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "file");
                        __PYX_ERR(19, 1169, __pyx_L1_error)
                      }
                      __pyx_t_6 = __pyx_f_7pyarrow_3lib_get_reader(__pyx_v_source, 0, (&__pyx_v_self->file)); if (unlikely(!__pyx_t_6)) __PYX_ERR(19, 1169, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_6);
                      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

                      /* "pyarrow/ipc.pxi":1171
 *         get_reader(source, False, &self.file)
 * 
 *         cdef int64_t offset = 0             # <<<<<<<<<<<<<<
 *         if footer_offset is not None:
 *             offset = footer_offset
*/
                      __pyx_v_offset = 0;

                      /* "pyarrow/ipc.pxi":1172
 * 
 *         cdef int64_t offset = 0
 *         if footer_offset is not None:             # <<<<<<<<<<<<<<
 *             offset = footer_offset
 * 
*/
                      __pyx_t_11 = (__pyx_v_footer_offset != Py_None);
                      if (__pyx_t_11) {

                        /* "pyarrow/ipc.pxi":1173
 *         cdef int64_t offset = 0
 *         if footer_offset is not None:
 *             offset = footer_offset             # <<<<<<<<<<<<<<
 * 
 *         with nogil:
*/
                        __pyx_t_12 = __Pyx_PyLong_As_int64_t(__pyx_v_footer_offset); if (unlikely((__pyx_t_12 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(19, 1173, __pyx_L1_error)
                        __pyx_v_offset = __pyx_t_12;

                        /* "pyarrow/ipc.pxi":1172
 * 
 *         cdef int64_t offset = 0
 *         if footer_offset is not None:             # <<<<<<<<<<<<<<
 *             offset = footer_offset
 * 
*/
                      }

                      /* "pyarrow/ipc.pxi":1175
 *             offset = footer_offset
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             if offset != 0:
 *                 self.reader = GetResultValue(
*/
                      {
                          PyThreadState * _save;
                          _save = PyEval_SaveThread();
                          __Pyx_FastGIL_Remember();
                          /*try:*/ {

                            /* "pyarrow/ipc.pxi":1176
 * 
 *         with nogil:
 *             if offset != 0:             # <<<<<<<<<<<<<<
 *                 self.reader = GetResultValue(
 *                     CRecordBatchFileReader.Open2(self.file.get(), offset,
*/
                            __pyx_t_11 = (__pyx_v_offset != 0);
                            if (__pyx_t_11) {

                              /* "pyarrow/ipc.pxi":1178
 *             if offset != 0:
 *                 self.reader = GetResultValue(
 *                     CRecordBatchFileReader.Open2(self.file.get(), offset,             # <<<<<<<<<<<<<<
 *                                                  self.options))
 * 
*/
                              if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                                PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                                PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "file");
                                __Pyx_PyGILState_Release(__pyx_gilstate_save);
                                __PYX_ERR(19, 1178, __pyx_L13_error)
                              }

                              /* "pyarrow/ipc.pxi":1179
 *                 self.reader = GetResultValue(
 *                     CRecordBatchFileReader.Open2(self.file.get(), offset,
 *                                                  self.options))             # <<<<<<<<<<<<<<
 * 
 *             else:
*/
                              if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                                PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                                PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "options");
                                __Pyx_PyGILState_Release(__pyx_gilstate_save);
                                __PYX_ERR(19, 1179, __pyx_L13_error)
                              }

                              /* "pyarrow/ipc.pxi":1177
 *         with nogil:
 *             if offset != 0:
 *                 self.reader = GetResultValue(             # <<<<<<<<<<<<<<
 *                     CRecordBatchFileReader.Open2(self.file.get(), offset,
 *                                                  self.options))
*/
                              __pyx_t_13 = arrow::py::GetResultValue<std::shared_ptr< arrow::ipc::RecordBatchFileReader> >( arrow::ipc::RecordBatchFileReader:: Open(__pyx_v_self->file.get(), __pyx_v_offset, __pyx_v_self->options)); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(19, 1177, __pyx_L13_error)
                              if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                                PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                                PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "reader");
                                __Pyx_PyGILState_Release(__pyx_gilstate_save);
                                __PYX_ERR(19, 1177, __pyx_L13_error)
                              }
                              __pyx_v_self->reader = __PYX_STD_MOVE_IF_SUPPORTED(((arrow::py::SharedPtrNoGIL< arrow::ipc::RecordBatchFileReader> )__pyx_t_13));

                              /* "pyarrow/ipc.pxi":1176
 * 
 *         with nogil:
 *             if offset != 0:             # <<<<<<<<<<<<<<
 *                 self.reader = GetResultValue(
 *                     CRecordBatchFileReader.Open2(self.file.get(), offset,
*/
                              goto __pyx_L15;
                            }

                            /* "pyarrow/ipc.pxi":1182
 * 
 *             else:
 *                 self.reader = GetResultValue(             # <<<<<<<<<<<<<<
 *                     CRecordBatchFileReader.Open(self.file.get(),
 *                                                 self.options))
*/
                            /*else*/ {

                              /* "pyarrow/ipc.pxi":1183
 *             else:
 *                 self.reader = GetResultValue(
 *                     CRecordBatchFileReader.Open(self.file.get(),             # <<<<<<<<<<<<<<
 *                                                 self.options))
 * 
*/
                              if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                                PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                                PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "file");
                                __Pyx_PyGILState_Release(__pyx_gilstate_save);
                                __PYX_ERR(19, 1183, __pyx_L13_error)
                              }

                              /* "pyarrow/ipc.pxi":1184
 *                 self.reader = GetResultValue(
 *                     CRecordBatchFileReader.Open(self.file.get(),
 *                                                 self.options))             # <<<<<<<<<<<<<<
 * 
 *         self.schema = pyarrow_wrap_schema(self.reader.get().schema())
*/
                              if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                                PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                                PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "options");
                                __Pyx_PyGILState_Release(__pyx_gilstate_save);
                                __PYX_ERR(19, 1184, __pyx_L13_error)
                              }

                              /* "pyarrow/ipc.pxi":1182
 * 
 *             else:
 *                 self.reader = GetResultValue(             # <<<<<<<<<<<<<<
 *                     CRecordBatchFileReader.Open(self.file.get(),
 *                                                 self.options))
*/
                              __pyx_t_13 = arrow::py::GetResultValue<std::shared_ptr< arrow::ipc::RecordBatchFileReader> >( arrow::ipc::RecordBatchFileReader::Open(__pyx_v_self->file.get(), __pyx_v_self->options)); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(19, 1182, __pyx_L13_error)
                              if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                                PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                                PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "reader");
                                __Pyx_PyGILState_Release(__pyx_gilstate_save);
                                __PYX_ERR(19, 1182, __pyx_L13_error)
                              }
                              __pyx_v_self->reader = __PYX_STD_MOVE_IF_SUPPORTED(((arrow::py::SharedPtrNoGIL< arrow::ipc::RecordBatchFileReader> )__pyx_t_13));
                            }
                            __pyx_L15:;
                          }

                          /* "pyarrow/ipc.pxi":1175
 *             offset = footer_offset
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             if offset != 0:
 *                 self.reader = GetResultValue(
*/
                          /*finally:*/ {
                            /*normal exit:*/{
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L14;
                            }
                            __pyx_L13_error: {
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L1_error;
                            }
                            __pyx_L14:;
                          }
                      }

                      /* "pyarrow/ipc.pxi":1186
 *                                                 self.options))
 * 
 *         self.schema = pyarrow_wrap_schema(self.reader.get().schema())             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "reader");
                        __PYX_ERR(19, 1186, __pyx_L1_error)
                      }
                      __pyx_t_6 = pyarrow_wrap_schema(__pyx_v_self->reader.get()->schema()); if (unlikely(!__pyx_t_6)) __PYX_ERR(19, 1186, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_6);
                      if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Schema))))) __PYX_ERR(19, 1186, __pyx_L1_error)
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "schema");
                        __PYX_ERR(19, 1186, __pyx_L1_error)
                      }
                      __Pyx_GIVEREF(__pyx_t_6);
                      __Pyx_GOTREF((PyObject *)__pyx_v_self->schema);
                      __Pyx_DECREF((PyObject *)__pyx_v_self->schema);
                      __pyx_v_self->schema = ((struct __pyx_obj_7pyarrow_3lib_Schema *)__pyx_t_6);
                      __pyx_t_6 = 0;

                      /* "pyarrow/ipc.pxi":1159
 *         pass
 * 
 *     def _open(self, source, footer_offset=None,             # <<<<<<<<<<<<<<
 *               IpcReadOptions options=IpcReadOptions(),
 *               MemoryPool memory_pool=None):
*/

                      /* function exit code */
                      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_6);
                      __Pyx_XDECREF(__pyx_t_7);
                      __Pyx_XDECREF(__pyx_t_8);
                      __Pyx_AddTraceback("pyarrow.lib._RecordBatchFileReader._open", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XDECREF(__pyx_v_source);
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/ipc.pxi":1188
 *         self.schema = pyarrow_wrap_schema(self.reader.get().schema())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def num_record_batches(self):
 *         """
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_22_RecordBatchFileReader_18num_record_batches_1__get__(PyObject *__pyx_v_self); /*proto*/
                    static PyObject *__pyx_pw_7pyarrow_3lib_22_RecordBatchFileReader_18num_record_batches_1__get__(PyObject *__pyx_v_self) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_22_RecordBatchFileReader_18num_record_batches___get__(((struct __pyx_obj_7pyarrow_3lib__RecordBatchFileReader *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_22_RecordBatchFileReader_18num_record_batches___get__(struct __pyx_obj_7pyarrow_3lib__RecordBatchFileReader *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__get__", 0);

                      /* "pyarrow/ipc.pxi":1193
 *         The number of record batches in the IPC file.
 *         """
 *         return self.reader.get().num_record_batches()             # <<<<<<<<<<<<<<
 * 
 *     def get_batch(self, int i):
*/
                      __Pyx_XDECREF(__pyx_r);
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "reader");
                        __PYX_ERR(19, 1193, __pyx_L1_error)
                      }
                      __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_v_self->reader.get()->num_record_batches()); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 1193, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_r = __pyx_t_1;
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/ipc.pxi":1188
 *         self.schema = pyarrow_wrap_schema(self.reader.get().schema())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def num_record_batches(self):
 *         """
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_AddTraceback("pyarrow.lib._RecordBatchFileReader.num_record_batches.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/ipc.pxi":1195
 *         return self.reader.get().num_record_batches()
 * 
 *     def get_batch(self, int i):             # <<<<<<<<<<<<<<
 *         """
 *         Read the record batch with the given index.
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_22_RecordBatchFileReader_5get_batch(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_22_RecordBatchFileReader_4get_batch, "_RecordBatchFileReader.get_batch(self, int i)\n\nRead the record batch with the given index.\n\nParameters\n----------\ni : int\n    The index of the record batch in the IPC file.\n\nReturns\n-------\nbatch : RecordBatch");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_22_RecordBatchFileReader_5get_batch = {"get_batch", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_22_RecordBatchFileReader_5get_batch, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_22_RecordBatchFileReader_4get_batch};
                    static PyObject *__pyx_pw_7pyarrow_3lib_22_RecordBatchFileReader_5get_batch(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      int __pyx_v_i;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[1] = {0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("get_batch (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_i,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(19, 1195, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(19, 1195, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "get_batch", 0) < (0)) __PYX_ERR(19, 1195, __pyx_L3_error)
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("get_batch", 1, 1, 1, i); __PYX_ERR(19, 1195, __pyx_L3_error) }
                          }
                        } else if (unlikely(__pyx_nargs != 1)) {
                          goto __pyx_L5_argtuple_error;
                        } else {
                          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(19, 1195, __pyx_L3_error)
                        }
                        __pyx_v_i = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_i == (int)-1) && PyErr_Occurred())) __PYX_ERR(19, 1195, __pyx_L3_error)
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("get_batch", 1, 1, 1, __pyx_nargs); __PYX_ERR(19, 1195, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib._RecordBatchFileReader.get_batch", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_22_RecordBatchFileReader_4get_batch(((struct __pyx_obj_7pyarrow_3lib__RecordBatchFileReader *)__pyx_v_self), __pyx_v_i);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_22_RecordBatchFileReader_4get_batch(struct __pyx_obj_7pyarrow_3lib__RecordBatchFileReader *__pyx_v_self, int __pyx_v_i) {
                      std::shared_ptr< arrow::RecordBatch>  __pyx_v_batch;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_t_1;
                      int __pyx_t_2;
                      PyObject *__pyx_t_3 = NULL;
                      PyObject *__pyx_t_4 = NULL;
                      PyObject *__pyx_t_5 = NULL;
                      PyObject *__pyx_t_6[3];
                      PyObject *__pyx_t_7 = NULL;
                      size_t __pyx_t_8;
                      std::shared_ptr< arrow::RecordBatch>  __pyx_t_9;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("get_batch", 0);

                      /* "pyarrow/ipc.pxi":1210
 *         cdef shared_ptr[CRecordBatch] batch
 * 
 *         if i < 0 or i >= self.num_record_batches:             # <<<<<<<<<<<<<<
 *             raise ValueError(f'Batch number {i} out of range')
 * 
*/
                      __pyx_t_2 = (__pyx_v_i < 0);
                      if (!__pyx_t_2) {
                      } else {
                        __pyx_t_1 = __pyx_t_2;
                        goto __pyx_L4_bool_binop_done;
                      }
                      __pyx_t_3 = __Pyx_PyLong_From_int(__pyx_v_i); if (unlikely(!__pyx_t_3)) __PYX_ERR(19, 1210, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_3);
                      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_num_record_batches); if (unlikely(!__pyx_t_4)) __PYX_ERR(19, 1210, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_4);
                      __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, __pyx_t_4, Py_GE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(19, 1210, __pyx_L1_error)
                      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(19, 1210, __pyx_L1_error)
                      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                      __pyx_t_1 = __pyx_t_2;
                      __pyx_L4_bool_binop_done:;
                      if (unlikely(__pyx_t_1)) {

                        /* "pyarrow/ipc.pxi":1211
 * 
 *         if i < 0 or i >= self.num_record_batches:
 *             raise ValueError(f'Batch number {i} out of range')             # <<<<<<<<<<<<<<
 * 
 *         with nogil:
*/
                        __pyx_t_4 = NULL;
                        __pyx_t_3 = __Pyx_PyUnicode_From_int(__pyx_v_i, 0, ' ', 'd'); if (unlikely(!__pyx_t_3)) __PYX_ERR(19, 1211, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_3);
                        __pyx_t_6[0] = __pyx_mstate_global->__pyx_kp_u_Batch_number;
                        __pyx_t_6[1] = __pyx_t_3;
                        __pyx_t_6[2] = __pyx_mstate_global->__pyx_kp_u_out_of_range;
                        __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_6, 3, 13 * 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3), 127);
                        if (unlikely(!__pyx_t_7)) __PYX_ERR(19, 1211, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_7);
                        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                        __pyx_t_8 = 1;
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_7};
                          __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
                          if (unlikely(!__pyx_t_5)) __PYX_ERR(19, 1211, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_5);
                        }
                        __Pyx_Raise(__pyx_t_5, 0, 0, 0);
                        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                        __PYX_ERR(19, 1211, __pyx_L1_error)

                        /* "pyarrow/ipc.pxi":1210
 *         cdef shared_ptr[CRecordBatch] batch
 * 
 *         if i < 0 or i >= self.num_record_batches:             # <<<<<<<<<<<<<<
 *             raise ValueError(f'Batch number {i} out of range')
 * 
*/
                      }

                      /* "pyarrow/ipc.pxi":1213
 *             raise ValueError(f'Batch number {i} out of range')
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             batch = GetResultValue(self.reader.get().ReadRecordBatch(i))
 * 
*/
                      {
                          PyThreadState * _save;
                          _save = PyEval_SaveThread();
                          __Pyx_FastGIL_Remember();
                          /*try:*/ {

                            /* "pyarrow/ipc.pxi":1214
 * 
 *         with nogil:
 *             batch = GetResultValue(self.reader.get().ReadRecordBatch(i))             # <<<<<<<<<<<<<<
 * 
 *         return pyarrow_wrap_batch(batch)
*/
                            if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                              PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "reader");
                              __Pyx_PyGILState_Release(__pyx_gilstate_save);
                              __PYX_ERR(19, 1214, __pyx_L7_error)
                            }
                            __pyx_t_9 = arrow::py::GetResultValue<std::shared_ptr< arrow::RecordBatch> >(__pyx_v_self->reader.get()->ReadRecordBatch(__pyx_v_i)); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(19, 1214, __pyx_L7_error)
                            __pyx_v_batch = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_9);
                          }

                          /* "pyarrow/ipc.pxi":1213
 *             raise ValueError(f'Batch number {i} out of range')
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             batch = GetResultValue(self.reader.get().ReadRecordBatch(i))
 * 
*/
                          /*finally:*/ {
                            /*normal exit:*/{
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L8;
                            }
                            __pyx_L7_error: {
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L1_error;
                            }
                            __pyx_L8:;
                          }
                      }

                      /* "pyarrow/ipc.pxi":1216
 *             batch = GetResultValue(self.reader.get().ReadRecordBatch(i))
 * 
 *         return pyarrow_wrap_batch(batch)             # <<<<<<<<<<<<<<
 * 
 *     # TODO(wesm): ARROW-503: Function was renamed. Remove after a period of
*/
                      __Pyx_XDECREF(__pyx_r);
                      __pyx_t_5 = pyarrow_wrap_batch(__pyx_v_batch); if (unlikely(!__pyx_t_5)) __PYX_ERR(19, 1216, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_5);
                      __pyx_r = __pyx_t_5;
                      __pyx_t_5 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/ipc.pxi":1195
 *         return self.reader.get().num_record_batches()
 * 
 *     def get_batch(self, int i):             # <<<<<<<<<<<<<<
 *         """
 *         Read the record batch with the given index.
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_XDECREF(__pyx_t_4);
                      __Pyx_XDECREF(__pyx_t_5);
                      __Pyx_XDECREF(__pyx_t_7);
                      __Pyx_AddTraceback("pyarrow.lib._RecordBatchFileReader.get_batch", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/ipc.pxi":1222
 *     get_record_batch = get_batch
 * 
 *     def get_batch_with_custom_metadata(self, int i):             # <<<<<<<<<<<<<<
 *         """
 *         Read the record batch with the given index along with
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_22_RecordBatchFileReader_7get_batch_with_custom_metadata(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_22_RecordBatchFileReader_6get_batch_with_custom_metadata, "_RecordBatchFileReader.get_batch_with_custom_metadata(self, int i)\n\nRead the record batch with the given index along with\nits custom metadata\n\nParameters\n----------\ni : int\n    The index of the record batch in the IPC file.\n\nReturns\n-------\nbatch : RecordBatch\ncustom_metadata : KeyValueMetadata");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_22_RecordBatchFileReader_7get_batch_with_custom_metadata = {"get_batch_with_custom_metadata", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_22_RecordBatchFileReader_7get_batch_with_custom_metadata, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_22_RecordBatchFileReader_6get_batch_with_custom_metadata};
                    static PyObject *__pyx_pw_7pyarrow_3lib_22_RecordBatchFileReader_7get_batch_with_custom_metadata(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      int __pyx_v_i;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[1] = {0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("get_batch_with_custom_metadata (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_i,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(19, 1222, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(19, 1222, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "get_batch_with_custom_metadata", 0) < (0)) __PYX_ERR(19, 1222, __pyx_L3_error)
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("get_batch_with_custom_metadata", 1, 1, 1, i); __PYX_ERR(19, 1222, __pyx_L3_error) }
                          }
                        } else if (unlikely(__pyx_nargs != 1)) {
                          goto __pyx_L5_argtuple_error;
                        } else {
                          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(19, 1222, __pyx_L3_error)
                        }
                        __pyx_v_i = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_i == (int)-1) && PyErr_Occurred())) __PYX_ERR(19, 1222, __pyx_L3_error)
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("get_batch_with_custom_metadata", 1, 1, 1, __pyx_nargs); __PYX_ERR(19, 1222, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib._RecordBatchFileReader.get_batch_with_custom_metadata", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_22_RecordBatchFileReader_6get_batch_with_custom_metadata(((struct __pyx_obj_7pyarrow_3lib__RecordBatchFileReader *)__pyx_v_self), __pyx_v_i);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_22_RecordBatchFileReader_6get_batch_with_custom_metadata(struct __pyx_obj_7pyarrow_3lib__RecordBatchFileReader *__pyx_v_self, int __pyx_v_i) {
                       arrow::RecordBatchWithMetadata __pyx_v_batch_with_metadata;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_t_1;
                      int __pyx_t_2;
                      PyObject *__pyx_t_3 = NULL;
                      PyObject *__pyx_t_4 = NULL;
                      PyObject *__pyx_t_5 = NULL;
                      PyObject *__pyx_t_6[3];
                      PyObject *__pyx_t_7 = NULL;
                      size_t __pyx_t_8;
                       arrow::RecordBatchWithMetadata __pyx_t_9;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("get_batch_with_custom_metadata", 0);

                      /* "pyarrow/ipc.pxi":1240
 *             CRecordBatchWithMetadata batch_with_metadata
 * 
 *         if i < 0 or i >= self.num_record_batches:             # <<<<<<<<<<<<<<
 *             raise ValueError(f'Batch number {i} out of range')
 * 
*/
                      __pyx_t_2 = (__pyx_v_i < 0);
                      if (!__pyx_t_2) {
                      } else {
                        __pyx_t_1 = __pyx_t_2;
                        goto __pyx_L4_bool_binop_done;
                      }
                      __pyx_t_3 = __Pyx_PyLong_From_int(__pyx_v_i); if (unlikely(!__pyx_t_3)) __PYX_ERR(19, 1240, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_3);
                      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_num_record_batches); if (unlikely(!__pyx_t_4)) __PYX_ERR(19, 1240, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_4);
                      __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, __pyx_t_4, Py_GE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(19, 1240, __pyx_L1_error)
                      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(19, 1240, __pyx_L1_error)
                      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                      __pyx_t_1 = __pyx_t_2;
                      __pyx_L4_bool_binop_done:;
                      if (unlikely(__pyx_t_1)) {

                        /* "pyarrow/ipc.pxi":1241
 * 
 *         if i < 0 or i >= self.num_record_batches:
 *             raise ValueError(f'Batch number {i} out of range')             # <<<<<<<<<<<<<<
 * 
 *         with nogil:
*/
                        __pyx_t_4 = NULL;
                        __pyx_t_3 = __Pyx_PyUnicode_From_int(__pyx_v_i, 0, ' ', 'd'); if (unlikely(!__pyx_t_3)) __PYX_ERR(19, 1241, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_3);
                        __pyx_t_6[0] = __pyx_mstate_global->__pyx_kp_u_Batch_number;
                        __pyx_t_6[1] = __pyx_t_3;
                        __pyx_t_6[2] = __pyx_mstate_global->__pyx_kp_u_out_of_range;
                        __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_6, 3, 13 * 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3), 127);
                        if (unlikely(!__pyx_t_7)) __PYX_ERR(19, 1241, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_7);
                        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                        __pyx_t_8 = 1;
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_7};
                          __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
                          if (unlikely(!__pyx_t_5)) __PYX_ERR(19, 1241, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_5);
                        }
                        __Pyx_Raise(__pyx_t_5, 0, 0, 0);
                        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                        __PYX_ERR(19, 1241, __pyx_L1_error)

                        /* "pyarrow/ipc.pxi":1240
 *             CRecordBatchWithMetadata batch_with_metadata
 * 
 *         if i < 0 or i >= self.num_record_batches:             # <<<<<<<<<<<<<<
 *             raise ValueError(f'Batch number {i} out of range')
 * 
*/
                      }

                      /* "pyarrow/ipc.pxi":1243
 *             raise ValueError(f'Batch number {i} out of range')
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             batch_with_metadata = GetResultValue(
 *                 self.reader.get().ReadRecordBatchWithCustomMetadata(i))
*/
                      {
                          PyThreadState * _save;
                          _save = PyEval_SaveThread();
                          __Pyx_FastGIL_Remember();
                          /*try:*/ {

                            /* "pyarrow/ipc.pxi":1245
 *         with nogil:
 *             batch_with_metadata = GetResultValue(
 *                 self.reader.get().ReadRecordBatchWithCustomMetadata(i))             # <<<<<<<<<<<<<<
 * 
 *         return _wrap_record_batch_with_metadata(batch_with_metadata)
*/
                            if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                              PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "reader");
                              __Pyx_PyGILState_Release(__pyx_gilstate_save);
                              __PYX_ERR(19, 1245, __pyx_L7_error)
                            }

                            /* "pyarrow/ipc.pxi":1244
 * 
 *         with nogil:
 *             batch_with_metadata = GetResultValue(             # <<<<<<<<<<<<<<
 *                 self.reader.get().ReadRecordBatchWithCustomMetadata(i))
 * 
*/
                            __pyx_t_9 = arrow::py::GetResultValue< arrow::RecordBatchWithMetadata>(__pyx_v_self->reader.get()->ReadRecordBatchWithCustomMetadata(__pyx_v_i)); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(19, 1244, __pyx_L7_error)
                            __pyx_v_batch_with_metadata = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_9);
                          }

                          /* "pyarrow/ipc.pxi":1243
 *             raise ValueError(f'Batch number {i} out of range')
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             batch_with_metadata = GetResultValue(
 *                 self.reader.get().ReadRecordBatchWithCustomMetadata(i))
*/
                          /*finally:*/ {
                            /*normal exit:*/{
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L8;
                            }
                            __pyx_L7_error: {
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L1_error;
                            }
                            __pyx_L8:;
                          }
                      }

                      /* "pyarrow/ipc.pxi":1247
 *                 self.reader.get().ReadRecordBatchWithCustomMetadata(i))
 * 
 *         return _wrap_record_batch_with_metadata(batch_with_metadata)             # <<<<<<<<<<<<<<
 * 
 *     def read_all(self):
*/
                      __Pyx_XDECREF(__pyx_r);
                      __pyx_t_5 = __pyx_f_7pyarrow_3lib__wrap_record_batch_with_metadata(__pyx_v_batch_with_metadata); if (unlikely(!__pyx_t_5)) __PYX_ERR(19, 1247, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_5);
                      __pyx_r = __pyx_t_5;
                      __pyx_t_5 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/ipc.pxi":1222
 *     get_record_batch = get_batch
 * 
 *     def get_batch_with_custom_metadata(self, int i):             # <<<<<<<<<<<<<<
 *         """
 *         Read the record batch with the given index along with
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_XDECREF(__pyx_t_4);
                      __Pyx_XDECREF(__pyx_t_5);
                      __Pyx_XDECREF(__pyx_t_7);
                      __Pyx_AddTraceback("pyarrow.lib._RecordBatchFileReader.get_batch_with_custom_metadata", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/ipc.pxi":1249
 *         return _wrap_record_batch_with_metadata(batch_with_metadata)
 * 
 *     def read_all(self):             # <<<<<<<<<<<<<<
 *         """
 *         Read all record batches as a pyarrow.Table
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_22_RecordBatchFileReader_9read_all(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_22_RecordBatchFileReader_8read_all, "_RecordBatchFileReader.read_all(self)\n\nRead all record batches as a pyarrow.Table");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_22_RecordBatchFileReader_9read_all = {"read_all", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_22_RecordBatchFileReader_9read_all, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_22_RecordBatchFileReader_8read_all};
                    static PyObject *__pyx_pw_7pyarrow_3lib_22_RecordBatchFileReader_9read_all(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("read_all (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("read_all", 1, 0, 0, __pyx_nargs); return NULL; }
                      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                      if (unlikely(__pyx_kwds_len < 0)) return NULL;
                      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("read_all", __pyx_kwds); return NULL;}
                      __pyx_r = __pyx_pf_7pyarrow_3lib_22_RecordBatchFileReader_8read_all(((struct __pyx_obj_7pyarrow_3lib__RecordBatchFileReader *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_22_RecordBatchFileReader_8read_all(struct __pyx_obj_7pyarrow_3lib__RecordBatchFileReader *__pyx_v_self) {
                      std::vector<std::shared_ptr< arrow::RecordBatch> >  __pyx_v_batches;
                      std::shared_ptr< arrow::Table>  __pyx_v_table;
                      int __pyx_v_i;
                      int __pyx_v_nbatches;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      int __pyx_t_2;
                      int __pyx_t_3;
                      int __pyx_t_4;
                      std::shared_ptr< arrow::RecordBatch>  __pyx_t_5;
                      std::shared_ptr< arrow::Table>  __pyx_t_6;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("read_all", 0);

                      /* "pyarrow/ipc.pxi":1258
 *             int i, nbatches
 * 
 *         nbatches = self.num_record_batches             # <<<<<<<<<<<<<<
 * 
 *         batches.resize(nbatches)
*/
                      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_num_record_batches); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 1258, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_t_2 = __Pyx_PyLong_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(19, 1258, __pyx_L1_error)
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      __pyx_v_nbatches = __pyx_t_2;

                      /* "pyarrow/ipc.pxi":1260
 *         nbatches = self.num_record_batches
 * 
 *         batches.resize(nbatches)             # <<<<<<<<<<<<<<
 *         with nogil:
 *             for i in range(nbatches):
*/
                      try {
                        __pyx_v_batches.resize(__pyx_v_nbatches);
                      } catch(...) {
                        __Pyx_CppExn2PyErr();
                        __PYX_ERR(19, 1260, __pyx_L1_error)
                      }

                      /* "pyarrow/ipc.pxi":1261
 * 
 *         batches.resize(nbatches)
 *         with nogil:             # <<<<<<<<<<<<<<
 *             for i in range(nbatches):
 *                 batches[i] = GetResultValue(self.reader.get()
*/
                      {
                          PyThreadState * _save;
                          _save = PyEval_SaveThread();
                          __Pyx_FastGIL_Remember();
                          /*try:*/ {

                            /* "pyarrow/ipc.pxi":1262
 *         batches.resize(nbatches)
 *         with nogil:
 *             for i in range(nbatches):             # <<<<<<<<<<<<<<
 *                 batches[i] = GetResultValue(self.reader.get()
 *                                             .ReadRecordBatch(i))
*/
                            __pyx_t_2 = __pyx_v_nbatches;
                            __pyx_t_3 = __pyx_t_2;
                            for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
                              __pyx_v_i = __pyx_t_4;

                              /* "pyarrow/ipc.pxi":1263
 *         with nogil:
 *             for i in range(nbatches):
 *                 batches[i] = GetResultValue(self.reader.get()             # <<<<<<<<<<<<<<
 *                                             .ReadRecordBatch(i))
 *             table = GetResultValue(
*/
                              if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                                PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                                PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "reader");
                                __Pyx_PyGILState_Release(__pyx_gilstate_save);
                                __PYX_ERR(19, 1263, __pyx_L4_error)
                              }

                              /* "pyarrow/ipc.pxi":1264
 *             for i in range(nbatches):
 *                 batches[i] = GetResultValue(self.reader.get()
 *                                             .ReadRecordBatch(i))             # <<<<<<<<<<<<<<
 *             table = GetResultValue(
 *                 CTable.FromRecordBatches(self.schema.sp_schema, move(batches)))
*/
                              __pyx_t_5 = arrow::py::GetResultValue<std::shared_ptr< arrow::RecordBatch> >(__pyx_v_self->reader.get()->ReadRecordBatch(__pyx_v_i)); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(19, 1263, __pyx_L4_error)

                              /* "pyarrow/ipc.pxi":1263
 *         with nogil:
 *             for i in range(nbatches):
 *                 batches[i] = GetResultValue(self.reader.get()             # <<<<<<<<<<<<<<
 *                                             .ReadRecordBatch(i))
 *             table = GetResultValue(
*/
                              (__pyx_v_batches[__pyx_v_i]) = __pyx_t_5;
                            }

                            /* "pyarrow/ipc.pxi":1266
 *                                             .ReadRecordBatch(i))
 *             table = GetResultValue(
 *                 CTable.FromRecordBatches(self.schema.sp_schema, move(batches)))             # <<<<<<<<<<<<<<
 * 
 *         return pyarrow_wrap_table(table)
*/
                            if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                              PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "schema");
                              __Pyx_PyGILState_Release(__pyx_gilstate_save);
                              __PYX_ERR(19, 1266, __pyx_L4_error)
                            }
                            if (unlikely(((PyObject *)__pyx_v_self->schema) == Py_None)) {
                              PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_schema");
                              __Pyx_PyGILState_Release(__pyx_gilstate_save);
                              __PYX_ERR(19, 1266, __pyx_L4_error)
                            }

                            /* "pyarrow/ipc.pxi":1265
 *                 batches[i] = GetResultValue(self.reader.get()
 *                                             .ReadRecordBatch(i))
 *             table = GetResultValue(             # <<<<<<<<<<<<<<
 *                 CTable.FromRecordBatches(self.schema.sp_schema, move(batches)))
 * 
*/
                            __pyx_t_6 = arrow::py::GetResultValue<std::shared_ptr< arrow::Table> >( arrow::Table::FromRecordBatches(__pyx_v_self->schema->sp_schema, cython_std::move<std::vector<std::shared_ptr< arrow::RecordBatch> > >(__pyx_v_batches))); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(19, 1265, __pyx_L4_error)
                            __pyx_v_table = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_6);
                          }

                          /* "pyarrow/ipc.pxi":1261
 * 
 *         batches.resize(nbatches)
 *         with nogil:             # <<<<<<<<<<<<<<
 *             for i in range(nbatches):
 *                 batches[i] = GetResultValue(self.reader.get()
*/
                          /*finally:*/ {
                            /*normal exit:*/{
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L5;
                            }
                            __pyx_L4_error: {
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L1_error;
                            }
                            __pyx_L5:;
                          }
                      }

                      /* "pyarrow/ipc.pxi":1268
 *                 CTable.FromRecordBatches(self.schema.sp_schema, move(batches)))
 * 
 *         return pyarrow_wrap_table(table)             # <<<<<<<<<<<<<<
 * 
 *     read_pandas = _ReadPandasMixin.read_pandas
*/
                      __Pyx_XDECREF(__pyx_r);
                      __pyx_t_1 = pyarrow_wrap_table(__pyx_v_table); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 1268, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_r = __pyx_t_1;
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/ipc.pxi":1249
 *         return _wrap_record_batch_with_metadata(batch_with_metadata)
 * 
 *     def read_all(self):             # <<<<<<<<<<<<<<
 *         """
 *         Read all record batches as a pyarrow.Table
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_AddTraceback("pyarrow.lib._RecordBatchFileReader.read_all", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/ipc.pxi":1272
 *     read_pandas = _ReadPandasMixin.read_pandas
 * 
 *     def __enter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_22_RecordBatchFileReader_11__enter__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_22_RecordBatchFileReader_10__enter__, "_RecordBatchFileReader.__enter__(self)");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_22_RecordBatchFileReader_11__enter__ = {"__enter__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_22_RecordBatchFileReader_11__enter__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_22_RecordBatchFileReader_10__enter__};
                    static PyObject *__pyx_pw_7pyarrow_3lib_22_RecordBatchFileReader_11__enter__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__enter__ (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__enter__", 1, 0, 0, __pyx_nargs); return NULL; }
                      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                      if (unlikely(__pyx_kwds_len < 0)) return NULL;
                      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__enter__", __pyx_kwds); return NULL;}
                      __pyx_r = __pyx_pf_7pyarrow_3lib_22_RecordBatchFileReader_10__enter__(((struct __pyx_obj_7pyarrow_3lib__RecordBatchFileReader *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_22_RecordBatchFileReader_10__enter__(struct __pyx_obj_7pyarrow_3lib__RecordBatchFileReader *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__enter__", 0);

                      /* "pyarrow/ipc.pxi":1273
 * 
 *     def __enter__(self):
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def __exit__(self, exc_type, exc_value, traceback):
*/
                      __Pyx_XDECREF(__pyx_r);
                      __Pyx_INCREF((PyObject *)__pyx_v_self);
                      __pyx_r = ((PyObject *)__pyx_v_self);
                      goto __pyx_L0;

                      /* "pyarrow/ipc.pxi":1272
 *     read_pandas = _ReadPandasMixin.read_pandas
 * 
 *     def __enter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
*/

                      /* function exit code */
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/ipc.pxi":1275
 *         return self
 * 
 *     def __exit__(self, exc_type, exc_value, traceback):             # <<<<<<<<<<<<<<
 *         pass
 * 
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_22_RecordBatchFileReader_13__exit__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_22_RecordBatchFileReader_12__exit__, "_RecordBatchFileReader.__exit__(self, exc_type, exc_value, traceback)");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_22_RecordBatchFileReader_13__exit__ = {"__exit__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_22_RecordBatchFileReader_13__exit__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_22_RecordBatchFileReader_12__exit__};
                    static PyObject *__pyx_pw_7pyarrow_3lib_22_RecordBatchFileReader_13__exit__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      CYTHON_UNUSED PyObject *__pyx_v_exc_type = 0;
                      CYTHON_UNUSED PyObject *__pyx_v_exc_value = 0;
                      CYTHON_UNUSED PyObject *__pyx_v_traceback = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[3] = {0,0,0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__exit__ (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_exc_type,&__pyx_mstate_global->__pyx_n_u_exc_value,&__pyx_mstate_global->__pyx_n_u_traceback,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(19, 1275, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  3:
                            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(19, 1275, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  2:
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(19, 1275, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(19, 1275, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__exit__", 0) < (0)) __PYX_ERR(19, 1275, __pyx_L3_error)
                          for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, i); __PYX_ERR(19, 1275, __pyx_L3_error) }
                          }
                        } else if (unlikely(__pyx_nargs != 3)) {
                          goto __pyx_L5_argtuple_error;
                        } else {
                          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(19, 1275, __pyx_L3_error)
                          values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(19, 1275, __pyx_L3_error)
                          values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(19, 1275, __pyx_L3_error)
                        }
                        __pyx_v_exc_type = values[0];
                        __pyx_v_exc_value = values[1];
                        __pyx_v_traceback = values[2];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, __pyx_nargs); __PYX_ERR(19, 1275, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib._RecordBatchFileReader.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_22_RecordBatchFileReader_12__exit__(((struct __pyx_obj_7pyarrow_3lib__RecordBatchFileReader *)__pyx_v_self), __pyx_v_exc_type, __pyx_v_exc_value, __pyx_v_traceback);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_22_RecordBatchFileReader_12__exit__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib__RecordBatchFileReader *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_exc_type, CYTHON_UNUSED PyObject *__pyx_v_exc_value, CYTHON_UNUSED PyObject *__pyx_v_traceback) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__exit__", 0);

                      /* function exit code */
                      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/ipc.pxi":1278
 *         pass
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def stats(self):
 *         """
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_22_RecordBatchFileReader_5stats_1__get__(PyObject *__pyx_v_self); /*proto*/
                    static PyObject *__pyx_pw_7pyarrow_3lib_22_RecordBatchFileReader_5stats_1__get__(PyObject *__pyx_v_self) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_22_RecordBatchFileReader_5stats___get__(((struct __pyx_obj_7pyarrow_3lib__RecordBatchFileReader *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_22_RecordBatchFileReader_5stats___get__(struct __pyx_obj_7pyarrow_3lib__RecordBatchFileReader *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_t_1;
                      PyObject *__pyx_t_2 = NULL;
                      PyObject *__pyx_t_3 = NULL;
                      size_t __pyx_t_4;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__get__", 0);

                      /* "pyarrow/ipc.pxi":1283
 *         Current IPC read statistics.
 *         """
 *         if not self.reader:             # <<<<<<<<<<<<<<
 *             raise ValueError("Operation on closed reader")
 *         return _wrap_read_stats(self.reader.get().stats())
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "reader");
                        __PYX_ERR(19, 1283, __pyx_L1_error)
                      }
                      __pyx_t_1 = ((!__pyx_v_self->reader) != 0);
                      if (unlikely(__pyx_t_1)) {

                        /* "pyarrow/ipc.pxi":1284
 *         """
 *         if not self.reader:
 *             raise ValueError("Operation on closed reader")             # <<<<<<<<<<<<<<
 *         return _wrap_read_stats(self.reader.get().stats())
 * 
*/
                        __pyx_t_3 = NULL;
                        __pyx_t_4 = 1;
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Operation_on_closed_reader};
                          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                          if (unlikely(!__pyx_t_2)) __PYX_ERR(19, 1284, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_2);
                        }
                        __Pyx_Raise(__pyx_t_2, 0, 0, 0);
                        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                        __PYX_ERR(19, 1284, __pyx_L1_error)

                        /* "pyarrow/ipc.pxi":1283
 *         Current IPC read statistics.
 *         """
 *         if not self.reader:             # <<<<<<<<<<<<<<
 *             raise ValueError("Operation on closed reader")
 *         return _wrap_read_stats(self.reader.get().stats())
*/
                      }

                      /* "pyarrow/ipc.pxi":1285
 *         if not self.reader:
 *             raise ValueError("Operation on closed reader")
 *         return _wrap_read_stats(self.reader.get().stats())             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
                      __Pyx_XDECREF(__pyx_r);
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "reader");
                        __PYX_ERR(19, 1285, __pyx_L1_error)
                      }
                      __pyx_t_2 = __pyx_f_7pyarrow_3lib__wrap_read_stats(__pyx_v_self->reader.get()->stats()); if (unlikely(!__pyx_t_2)) __PYX_ERR(19, 1285, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_2);
                      __pyx_r = __pyx_t_2;
                      __pyx_t_2 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/ipc.pxi":1278
 *         pass
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def stats(self):
 *         """
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_AddTraceback("pyarrow.lib._RecordBatchFileReader.stats.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/ipc.pxi":1287
 *         return _wrap_read_stats(self.reader.get().stats())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def metadata(self):
 *         """
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_22_RecordBatchFileReader_8metadata_1__get__(PyObject *__pyx_v_self); /*proto*/
                    static PyObject *__pyx_pw_7pyarrow_3lib_22_RecordBatchFileReader_8metadata_1__get__(PyObject *__pyx_v_self) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_22_RecordBatchFileReader_8metadata___get__(((struct __pyx_obj_7pyarrow_3lib__RecordBatchFileReader *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_22_RecordBatchFileReader_8metadata___get__(struct __pyx_obj_7pyarrow_3lib__RecordBatchFileReader *__pyx_v_self) {
                      PyObject *__pyx_v_wrapped = NULL;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      int __pyx_t_2;
                      PyObject *__pyx_t_3 = NULL;
                      PyObject *__pyx_t_4 = NULL;
                      size_t __pyx_t_5;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__get__", 0);

                      /* "pyarrow/ipc.pxi":1293
 *         This kind of metadata can be written via ``ipc.new_file(..., metadata=...)``.
 *         """
 *         wrapped = pyarrow_wrap_metadata(self.reader.get().metadata())             # <<<<<<<<<<<<<<
 *         return wrapped.to_dict() if wrapped is not None else None
 * 
*/
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "reader");
                        __PYX_ERR(19, 1293, __pyx_L1_error)
                      }
                      __pyx_t_1 = __pyx_f_7pyarrow_3lib_pyarrow_wrap_metadata(__pyx_v_self->reader.get()->metadata()); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 1293, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_v_wrapped = __pyx_t_1;
                      __pyx_t_1 = 0;

                      /* "pyarrow/ipc.pxi":1294
 *         """
 *         wrapped = pyarrow_wrap_metadata(self.reader.get().metadata())
 *         return wrapped.to_dict() if wrapped is not None else None             # <<<<<<<<<<<<<<
 * 
 * 
*/
                      __Pyx_XDECREF(__pyx_r);
                      __pyx_t_2 = (__pyx_v_wrapped != Py_None);
                      if (__pyx_t_2) {
                        __pyx_t_4 = __pyx_v_wrapped;
                        __Pyx_INCREF(__pyx_t_4);
                        __pyx_t_5 = 0;
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
                          __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_to_dict, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                          if (unlikely(!__pyx_t_3)) __PYX_ERR(19, 1294, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_3);
                        }
                        __pyx_t_1 = __pyx_t_3;
                        __pyx_t_3 = 0;
                      } else {
                        __Pyx_INCREF(Py_None);
                        __pyx_t_1 = Py_None;
                      }
                      __pyx_r = __pyx_t_1;
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/ipc.pxi":1287
 *         return _wrap_read_stats(self.reader.get().stats())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def metadata(self):
 *         """
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_XDECREF(__pyx_t_4);
                      __Pyx_AddTraceback("pyarrow.lib._RecordBatchFileReader.metadata.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XDECREF(__pyx_v_wrapped);
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/ipc.pxi":1154
 * 
 *     cdef readonly:
 *         Schema schema             # <<<<<<<<<<<<<<
 * 
 *     def __cinit__(self):
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_22_RecordBatchFileReader_6schema_1__get__(PyObject *__pyx_v_self); /*proto*/
                    static PyObject *__pyx_pw_7pyarrow_3lib_22_RecordBatchFileReader_6schema_1__get__(PyObject *__pyx_v_self) {
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
                      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
                      __pyx_r = __pyx_pf_7pyarrow_3lib_22_RecordBatchFileReader_6schema___get__(((struct __pyx_obj_7pyarrow_3lib__RecordBatchFileReader *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_22_RecordBatchFileReader_6schema___get__(struct __pyx_obj_7pyarrow_3lib__RecordBatchFileReader *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__get__", 0);
                      __Pyx_XDECREF(__pyx_r);
                      if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "schema");
                        __PYX_ERR(19, 1154, __pyx_L1_error)
                      }
                      __Pyx_INCREF((PyObject *)__pyx_v_self->schema);
                      __pyx_r = ((PyObject *)__pyx_v_self->schema);
                      goto __pyx_L0;

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib._RecordBatchFileReader.schema.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_22_RecordBatchFileReader_15__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_22_RecordBatchFileReader_14__reduce_cython__, "_RecordBatchFileReader.__reduce_cython__(self)");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_22_RecordBatchFileReader_15__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_22_RecordBatchFileReader_15__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_22_RecordBatchFileReader_14__reduce_cython__};
                    static PyObject *__pyx_pw_7pyarrow_3lib_22_RecordBatchFileReader_15__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; }
                      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                      if (unlikely(__pyx_kwds_len < 0)) return NULL;
                      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;}
                      __pyx_r = __pyx_pf_7pyarrow_3lib_22_RecordBatchFileReader_14__reduce_cython__(((struct __pyx_obj_7pyarrow_3lib__RecordBatchFileReader *)__pyx_v_self));

                      /* function exit code */
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_22_RecordBatchFileReader_14__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib__RecordBatchFileReader *__pyx_v_self) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__reduce_cython__", 0);

                      /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/
                      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0);
                      __PYX_ERR(7, 2, __pyx_L1_error)

                      /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib._RecordBatchFileReader.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_22_RecordBatchFileReader_17__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_22_RecordBatchFileReader_16__setstate_cython__, "_RecordBatchFileReader.__setstate_cython__(self, __pyx_state)");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_22_RecordBatchFileReader_17__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_22_RecordBatchFileReader_17__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_22_RecordBatchFileReader_16__setstate_cython__};
                    static PyObject *__pyx_pw_7pyarrow_3lib_22_RecordBatchFileReader_17__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[1] = {0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(7, 3, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(7, 3, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(7, 3, __pyx_L3_error)
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(7, 3, __pyx_L3_error) }
                          }
                        } else if (unlikely(__pyx_nargs != 1)) {
                          goto __pyx_L5_argtuple_error;
                        } else {
                          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(7, 3, __pyx_L3_error)
                        }
                        __pyx_v___pyx_state = values[0];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(7, 3, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib._RecordBatchFileReader.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_22_RecordBatchFileReader_16__setstate_cython__(((struct __pyx_obj_7pyarrow_3lib__RecordBatchFileReader *)__pyx_v_self), __pyx_v___pyx_state);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_22_RecordBatchFileReader_16__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7pyarrow_3lib__RecordBatchFileReader *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__setstate_cython__", 0);

                      /* "(tree fragment)":4
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
*/
                      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0);
                      __PYX_ERR(7, 4, __pyx_L1_error)

                      /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib._RecordBatchFileReader.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/ipc.pxi":1297
 * 
 * 
 * def get_tensor_size(Tensor tensor):             # <<<<<<<<<<<<<<
 *     """
 *     Return total size of serialized Tensor including metadata and padding.
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_265get_tensor_size(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_264get_tensor_size, "get_tensor_size(Tensor tensor)\n\nReturn total size of serialized Tensor including metadata and padding.\n\nParameters\n----------\ntensor : Tensor\n    The tensor for which we want to known the size.");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_265get_tensor_size = {"get_tensor_size", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_265get_tensor_size, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_264get_tensor_size};
                    static PyObject *__pyx_pw_7pyarrow_3lib_265get_tensor_size(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      struct __pyx_obj_7pyarrow_3lib_Tensor *__pyx_v_tensor = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[1] = {0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("get_tensor_size (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_tensor,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(19, 1297, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(19, 1297, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "get_tensor_size", 0) < (0)) __PYX_ERR(19, 1297, __pyx_L3_error)
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("get_tensor_size", 1, 1, 1, i); __PYX_ERR(19, 1297, __pyx_L3_error) }
                          }
                        } else if (unlikely(__pyx_nargs != 1)) {
                          goto __pyx_L5_argtuple_error;
                        } else {
                          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(19, 1297, __pyx_L3_error)
                        }
                        __pyx_v_tensor = ((struct __pyx_obj_7pyarrow_3lib_Tensor *)values[0]);
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("get_tensor_size", 1, 1, 1, __pyx_nargs); __PYX_ERR(19, 1297, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.get_tensor_size", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_tensor), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Tensor, 1, "tensor", 0))) __PYX_ERR(19, 1297, __pyx_L1_error)
                      __pyx_r = __pyx_pf_7pyarrow_3lib_264get_tensor_size(__pyx_self, __pyx_v_tensor);

                      /* function exit code */
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __pyx_r = NULL;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      goto __pyx_L7_cleaned_up;
                      __pyx_L0:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __pyx_L7_cleaned_up:;
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_264get_tensor_size(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_7pyarrow_3lib_Tensor *__pyx_v_tensor) {
                      int64_t __pyx_v_size;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_t_1;
                      PyObject *__pyx_t_2 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("get_tensor_size", 0);

                      /* "pyarrow/ipc.pxi":1307
 *     """
 *     cdef int64_t size
 *     with nogil:             # <<<<<<<<<<<<<<
 *         check_status(GetTensorSize(deref(tensor.tp), &size))
 *     return size
*/
                      {
                          PyThreadState * _save;
                          _save = PyEval_SaveThread();
                          __Pyx_FastGIL_Remember();
                          /*try:*/ {

                            /* "pyarrow/ipc.pxi":1308
 *     cdef int64_t size
 *     with nogil:
 *         check_status(GetTensorSize(deref(tensor.tp), &size))             # <<<<<<<<<<<<<<
 *     return size
 * 
*/
                            if (unlikely(((PyObject *)__pyx_v_tensor) == Py_None)) {
                              PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "tp");
                              __Pyx_PyGILState_Release(__pyx_gilstate_save);
                              __PYX_ERR(19, 1308, __pyx_L4_error)
                            }
                            __pyx_t_1 = __pyx_f_7pyarrow_3lib_check_status(arrow::ipc::GetTensorSize((*__pyx_v_tensor->tp), (&__pyx_v_size))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(19, 1308, __pyx_L4_error)
                          }

                          /* "pyarrow/ipc.pxi":1307
 *     """
 *     cdef int64_t size
 *     with nogil:             # <<<<<<<<<<<<<<
 *         check_status(GetTensorSize(deref(tensor.tp), &size))
 *     return size
*/
                          /*finally:*/ {
                            /*normal exit:*/{
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L5;
                            }
                            __pyx_L4_error: {
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L1_error;
                            }
                            __pyx_L5:;
                          }
                      }

                      /* "pyarrow/ipc.pxi":1309
 *     with nogil:
 *         check_status(GetTensorSize(deref(tensor.tp), &size))
 *     return size             # <<<<<<<<<<<<<<
 * 
 * 
*/
                      __Pyx_XDECREF(__pyx_r);
                      __pyx_t_2 = __Pyx_PyLong_From_int64_t(__pyx_v_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(19, 1309, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_2);
                      __pyx_r = __pyx_t_2;
                      __pyx_t_2 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/ipc.pxi":1297
 * 
 * 
 * def get_tensor_size(Tensor tensor):             # <<<<<<<<<<<<<<
 *     """
 *     Return total size of serialized Tensor including metadata and padding.
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_AddTraceback("pyarrow.lib.get_tensor_size", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/ipc.pxi":1312
 * 
 * 
 * def get_record_batch_size(RecordBatch batch):             # <<<<<<<<<<<<<<
 *     """
 *     Return total size of serialized RecordBatch including metadata and padding.
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_267get_record_batch_size(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_266get_record_batch_size, "get_record_batch_size(RecordBatch batch)\n\nReturn total size of serialized RecordBatch including metadata and padding.\n\nParameters\n----------\nbatch : RecordBatch\n    The recordbatch for which we want to know the size.");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_267get_record_batch_size = {"get_record_batch_size", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_267get_record_batch_size, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_266get_record_batch_size};
                    static PyObject *__pyx_pw_7pyarrow_3lib_267get_record_batch_size(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      struct __pyx_obj_7pyarrow_3lib_RecordBatch *__pyx_v_batch = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[1] = {0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("get_record_batch_size (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_batch,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(19, 1312, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(19, 1312, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "get_record_batch_size", 0) < (0)) __PYX_ERR(19, 1312, __pyx_L3_error)
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("get_record_batch_size", 1, 1, 1, i); __PYX_ERR(19, 1312, __pyx_L3_error) }
                          }
                        } else if (unlikely(__pyx_nargs != 1)) {
                          goto __pyx_L5_argtuple_error;
                        } else {
                          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(19, 1312, __pyx_L3_error)
                        }
                        __pyx_v_batch = ((struct __pyx_obj_7pyarrow_3lib_RecordBatch *)values[0]);
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("get_record_batch_size", 1, 1, 1, __pyx_nargs); __PYX_ERR(19, 1312, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.get_record_batch_size", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_batch), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RecordBatch, 1, "batch", 0))) __PYX_ERR(19, 1312, __pyx_L1_error)
                      __pyx_r = __pyx_pf_7pyarrow_3lib_266get_record_batch_size(__pyx_self, __pyx_v_batch);

                      /* function exit code */
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __pyx_r = NULL;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      goto __pyx_L7_cleaned_up;
                      __pyx_L0:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __pyx_L7_cleaned_up:;
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_266get_record_batch_size(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_7pyarrow_3lib_RecordBatch *__pyx_v_batch) {
                      int64_t __pyx_v_size;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_t_1;
                      PyObject *__pyx_t_2 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("get_record_batch_size", 0);

                      /* "pyarrow/ipc.pxi":1322
 *     """
 *     cdef int64_t size
 *     with nogil:             # <<<<<<<<<<<<<<
 *         check_status(GetRecordBatchSize(deref(batch.batch), &size))
 *     return size
*/
                      {
                          PyThreadState * _save;
                          _save = PyEval_SaveThread();
                          __Pyx_FastGIL_Remember();
                          /*try:*/ {

                            /* "pyarrow/ipc.pxi":1323
 *     cdef int64_t size
 *     with nogil:
 *         check_status(GetRecordBatchSize(deref(batch.batch), &size))             # <<<<<<<<<<<<<<
 *     return size
 * 
*/
                            if (unlikely(((PyObject *)__pyx_v_batch) == Py_None)) {
                              PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "batch");
                              __Pyx_PyGILState_Release(__pyx_gilstate_save);
                              __PYX_ERR(19, 1323, __pyx_L4_error)
                            }
                            __pyx_t_1 = __pyx_f_7pyarrow_3lib_check_status(arrow::ipc::GetRecordBatchSize((*__pyx_v_batch->batch), (&__pyx_v_size))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(19, 1323, __pyx_L4_error)
                          }

                          /* "pyarrow/ipc.pxi":1322
 *     """
 *     cdef int64_t size
 *     with nogil:             # <<<<<<<<<<<<<<
 *         check_status(GetRecordBatchSize(deref(batch.batch), &size))
 *     return size
*/
                          /*finally:*/ {
                            /*normal exit:*/{
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L5;
                            }
                            __pyx_L4_error: {
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L1_error;
                            }
                            __pyx_L5:;
                          }
                      }

                      /* "pyarrow/ipc.pxi":1324
 *     with nogil:
 *         check_status(GetRecordBatchSize(deref(batch.batch), &size))
 *     return size             # <<<<<<<<<<<<<<
 * 
 * 
*/
                      __Pyx_XDECREF(__pyx_r);
                      __pyx_t_2 = __Pyx_PyLong_From_int64_t(__pyx_v_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(19, 1324, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_2);
                      __pyx_r = __pyx_t_2;
                      __pyx_t_2 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/ipc.pxi":1312
 * 
 * 
 * def get_record_batch_size(RecordBatch batch):             # <<<<<<<<<<<<<<
 *     """
 *     Return total size of serialized RecordBatch including metadata and padding.
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_AddTraceback("pyarrow.lib.get_record_batch_size", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/ipc.pxi":1327
 * 
 * 
 * def write_tensor(Tensor tensor, NativeFile dest):             # <<<<<<<<<<<<<<
 *     """
 *     Write pyarrow.Tensor to pyarrow.NativeFile object its current position.
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_269write_tensor(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_268write_tensor, "write_tensor(Tensor tensor, NativeFile dest)\n\nWrite pyarrow.Tensor to pyarrow.NativeFile object its current position.\n\nParameters\n----------\ntensor : pyarrow.Tensor\ndest : pyarrow.NativeFile\n\nReturns\n-------\nbytes_written : int\n    Total number of bytes written to the file");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_269write_tensor = {"write_tensor", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_269write_tensor, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_268write_tensor};
                    static PyObject *__pyx_pw_7pyarrow_3lib_269write_tensor(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      struct __pyx_obj_7pyarrow_3lib_Tensor *__pyx_v_tensor = 0;
                      struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_dest = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[2] = {0,0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("write_tensor (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_tensor,&__pyx_mstate_global->__pyx_n_u_dest,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(19, 1327, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  2:
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(19, 1327, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(19, 1327, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "write_tensor", 0) < (0)) __PYX_ERR(19, 1327, __pyx_L3_error)
                          for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("write_tensor", 1, 2, 2, i); __PYX_ERR(19, 1327, __pyx_L3_error) }
                          }
                        } else if (unlikely(__pyx_nargs != 2)) {
                          goto __pyx_L5_argtuple_error;
                        } else {
                          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(19, 1327, __pyx_L3_error)
                          values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(19, 1327, __pyx_L3_error)
                        }
                        __pyx_v_tensor = ((struct __pyx_obj_7pyarrow_3lib_Tensor *)values[0]);
                        __pyx_v_dest = ((struct __pyx_obj_7pyarrow_3lib_NativeFile *)values[1]);
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("write_tensor", 1, 2, 2, __pyx_nargs); __PYX_ERR(19, 1327, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.write_tensor", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_tensor), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Tensor, 1, "tensor", 0))) __PYX_ERR(19, 1327, __pyx_L1_error)
                      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dest), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NativeFile, 1, "dest", 0))) __PYX_ERR(19, 1327, __pyx_L1_error)
                      __pyx_r = __pyx_pf_7pyarrow_3lib_268write_tensor(__pyx_self, __pyx_v_tensor, __pyx_v_dest);

                      /* function exit code */
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __pyx_r = NULL;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      goto __pyx_L7_cleaned_up;
                      __pyx_L0:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __pyx_L7_cleaned_up:;
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_268write_tensor(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_7pyarrow_3lib_Tensor *__pyx_v_tensor, struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_dest) {
                      int32_t __pyx_v_metadata_length;
                      int64_t __pyx_v_body_length;
                      std::shared_ptr< arrow::io::OutputStream>  __pyx_v_handle;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      std::shared_ptr< arrow::io::OutputStream>  __pyx_t_1;
                      int __pyx_t_2;
                      PyObject *__pyx_t_3 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("write_tensor", 0);

                      /* "pyarrow/ipc.pxi":1345
 *         int64_t body_length
 * 
 *     handle = dest.get_output_stream()             # <<<<<<<<<<<<<<
 * 
 *     with nogil:
*/
                      if (unlikely(((PyObject *)__pyx_v_dest) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get_output_stream");
                        __PYX_ERR(19, 1345, __pyx_L1_error)
                      }
                      __pyx_t_1 = ((struct __pyx_vtabstruct_7pyarrow_3lib_NativeFile *)__pyx_v_dest->__pyx_vtab)->get_output_stream(__pyx_v_dest); if (unlikely(PyErr_Occurred())) __PYX_ERR(19, 1345, __pyx_L1_error)
                      __pyx_v_handle = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_1);

                      /* "pyarrow/ipc.pxi":1347
 *     handle = dest.get_output_stream()
 * 
 *     with nogil:             # <<<<<<<<<<<<<<
 *         check_status(
 *             WriteTensor(deref(tensor.tp), handle.get(),
*/
                      {
                          PyThreadState * _save;
                          _save = PyEval_SaveThread();
                          __Pyx_FastGIL_Remember();
                          /*try:*/ {

                            /* "pyarrow/ipc.pxi":1349
 *     with nogil:
 *         check_status(
 *             WriteTensor(deref(tensor.tp), handle.get(),             # <<<<<<<<<<<<<<
 *                         &metadata_length, &body_length))
 * 
*/
                            if (unlikely(((PyObject *)__pyx_v_tensor) == Py_None)) {
                              PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "tp");
                              __Pyx_PyGILState_Release(__pyx_gilstate_save);
                              __PYX_ERR(19, 1349, __pyx_L4_error)
                            }

                            /* "pyarrow/ipc.pxi":1348
 * 
 *     with nogil:
 *         check_status(             # <<<<<<<<<<<<<<
 *             WriteTensor(deref(tensor.tp), handle.get(),
 *                         &metadata_length, &body_length))
*/
                            __pyx_t_2 = __pyx_f_7pyarrow_3lib_check_status(arrow::ipc::WriteTensor((*__pyx_v_tensor->tp), __pyx_v_handle.get(), (&__pyx_v_metadata_length), (&__pyx_v_body_length))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(19, 1348, __pyx_L4_error)
                          }

                          /* "pyarrow/ipc.pxi":1347
 *     handle = dest.get_output_stream()
 * 
 *     with nogil:             # <<<<<<<<<<<<<<
 *         check_status(
 *             WriteTensor(deref(tensor.tp), handle.get(),
*/
                          /*finally:*/ {
                            /*normal exit:*/{
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L5;
                            }
                            __pyx_L4_error: {
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L1_error;
                            }
                            __pyx_L5:;
                          }
                      }

                      /* "pyarrow/ipc.pxi":1352
 *                         &metadata_length, &body_length))
 * 
 *     return metadata_length + body_length             # <<<<<<<<<<<<<<
 * 
 * 
*/
                      __Pyx_XDECREF(__pyx_r);
                      __pyx_t_3 = __Pyx_PyLong_From_int64_t((__pyx_v_metadata_length + __pyx_v_body_length)); if (unlikely(!__pyx_t_3)) __PYX_ERR(19, 1352, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_3);
                      __pyx_r = __pyx_t_3;
                      __pyx_t_3 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/ipc.pxi":1327
 * 
 * 
 * def write_tensor(Tensor tensor, NativeFile dest):             # <<<<<<<<<<<<<<
 *     """
 *     Write pyarrow.Tensor to pyarrow.NativeFile object its current position.
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_AddTraceback("pyarrow.lib.write_tensor", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/ipc.pxi":1355
 * 
 * 
 * cdef NativeFile as_native_file(source):             # <<<<<<<<<<<<<<
 *     if not isinstance(source, NativeFile):
 *         if hasattr(source, 'read'):
*/

                    static struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_f_7pyarrow_3lib_as_native_file(PyObject *__pyx_v_source) {
                      struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_t_1;
                      int __pyx_t_2;
                      PyObject *__pyx_t_3 = NULL;
                      PyObject *__pyx_t_4 = NULL;
                      size_t __pyx_t_5;
                      PyObject *__pyx_t_6 = NULL;
                      PyObject *__pyx_t_7 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("as_native_file", 0);
                      __Pyx_INCREF(__pyx_v_source);

                      /* "pyarrow/ipc.pxi":1356
 * 
 * cdef NativeFile as_native_file(source):
 *     if not isinstance(source, NativeFile):             # <<<<<<<<<<<<<<
 *         if hasattr(source, 'read'):
 *             source = PythonFile(source)
*/
                      __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_source, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NativeFile); 
                      __pyx_t_2 = (!__pyx_t_1);
                      if (__pyx_t_2) {

                        /* "pyarrow/ipc.pxi":1357
 * cdef NativeFile as_native_file(source):
 *     if not isinstance(source, NativeFile):
 *         if hasattr(source, 'read'):             # <<<<<<<<<<<<<<
 *             source = PythonFile(source)
 *         else:
*/
                        __pyx_t_2 = __Pyx_HasAttr(__pyx_v_source, __pyx_mstate_global->__pyx_n_u_read); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(19, 1357, __pyx_L1_error)
                        if (__pyx_t_2) {

                          /* "pyarrow/ipc.pxi":1358
 *     if not isinstance(source, NativeFile):
 *         if hasattr(source, 'read'):
 *             source = PythonFile(source)             # <<<<<<<<<<<<<<
 *         else:
 *             source = BufferReader(source)
*/
                          __pyx_t_4 = NULL;
                          __pyx_t_5 = 1;
                          {
                            PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_source};
                            __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_PythonFile, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                            if (unlikely(!__pyx_t_3)) __PYX_ERR(19, 1358, __pyx_L1_error)
                            __Pyx_GOTREF((PyObject *)__pyx_t_3);
                          }
                          __Pyx_DECREF_SET(__pyx_v_source, ((PyObject *)__pyx_t_3));
                          __pyx_t_3 = 0;

                          /* "pyarrow/ipc.pxi":1357
 * cdef NativeFile as_native_file(source):
 *     if not isinstance(source, NativeFile):
 *         if hasattr(source, 'read'):             # <<<<<<<<<<<<<<
 *             source = PythonFile(source)
 *         else:
*/
                          goto __pyx_L4;
                        }

                        /* "pyarrow/ipc.pxi":1360
 *             source = PythonFile(source)
 *         else:
 *             source = BufferReader(source)             # <<<<<<<<<<<<<<
 * 
 *     if not isinstance(source, NativeFile):
*/
                        /*else*/ {
                          __pyx_t_4 = NULL;
                          __pyx_t_5 = 1;
                          {
                            PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_source};
                            __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_BufferReader, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                            if (unlikely(!__pyx_t_3)) __PYX_ERR(19, 1360, __pyx_L1_error)
                            __Pyx_GOTREF((PyObject *)__pyx_t_3);
                          }
                          __Pyx_DECREF_SET(__pyx_v_source, ((PyObject *)__pyx_t_3));
                          __pyx_t_3 = 0;
                        }
                        __pyx_L4:;

                        /* "pyarrow/ipc.pxi":1356
 * 
 * cdef NativeFile as_native_file(source):
 *     if not isinstance(source, NativeFile):             # <<<<<<<<<<<<<<
 *         if hasattr(source, 'read'):
 *             source = PythonFile(source)
*/
                      }

                      /* "pyarrow/ipc.pxi":1362
 *             source = BufferReader(source)
 * 
 *     if not isinstance(source, NativeFile):             # <<<<<<<<<<<<<<
 *         raise ValueError(
 *             f'Unable to read message from object with type: {type(source)}')
*/
                      __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_source, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NativeFile); 
                      __pyx_t_1 = (!__pyx_t_2);
                      if (unlikely(__pyx_t_1)) {

                        /* "pyarrow/ipc.pxi":1363
 * 
 *     if not isinstance(source, NativeFile):
 *         raise ValueError(             # <<<<<<<<<<<<<<
 *             f'Unable to read message from object with type: {type(source)}')
 *     return source
*/
                        __pyx_t_4 = NULL;

                        /* "pyarrow/ipc.pxi":1364
 *     if not isinstance(source, NativeFile):
 *         raise ValueError(
 *             f'Unable to read message from object with type: {type(source)}')             # <<<<<<<<<<<<<<
 *     return source
 * 
*/
                        __pyx_t_6 = __Pyx_PyObject_FormatSimple(((PyObject *)Py_TYPE(__pyx_v_source)), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(19, 1364, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_6);
                        __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_Unable_to_read_message_from_obje, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(19, 1364, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_7);
                        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                        __pyx_t_5 = 1;
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_7};
                          __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
                          if (unlikely(!__pyx_t_3)) __PYX_ERR(19, 1363, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_3);
                        }
                        __Pyx_Raise(__pyx_t_3, 0, 0, 0);
                        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                        __PYX_ERR(19, 1363, __pyx_L1_error)

                        /* "pyarrow/ipc.pxi":1362
 *             source = BufferReader(source)
 * 
 *     if not isinstance(source, NativeFile):             # <<<<<<<<<<<<<<
 *         raise ValueError(
 *             f'Unable to read message from object with type: {type(source)}')
*/
                      }

                      /* "pyarrow/ipc.pxi":1365
 *         raise ValueError(
 *             f'Unable to read message from object with type: {type(source)}')
 *     return source             # <<<<<<<<<<<<<<
 * 
 * 
*/
                      __Pyx_XDECREF((PyObject *)__pyx_r);
                      if (!(likely(((__pyx_v_source) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_source, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NativeFile))))) __PYX_ERR(19, 1365, __pyx_L1_error)
                      __Pyx_INCREF(__pyx_v_source);
                      __pyx_r = ((struct __pyx_obj_7pyarrow_3lib_NativeFile *)__pyx_v_source);
                      goto __pyx_L0;

                      /* "pyarrow/ipc.pxi":1355
 * 
 * 
 * cdef NativeFile as_native_file(source):             # <<<<<<<<<<<<<<
 *     if not isinstance(source, NativeFile):
 *         if hasattr(source, 'read'):
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_XDECREF(__pyx_t_4);
                      __Pyx_XDECREF(__pyx_t_6);
                      __Pyx_XDECREF(__pyx_t_7);
                      __Pyx_AddTraceback("pyarrow.lib.as_native_file", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = 0;
                      __pyx_L0:;
                      __Pyx_XDECREF(__pyx_v_source);
                      __Pyx_XGIVEREF((PyObject *)__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/ipc.pxi":1368
 * 
 * 
 * def read_tensor(source):             # <<<<<<<<<<<<<<
 *     """Read pyarrow.Tensor from pyarrow.NativeFile object from current
 *     position. If the file source supports zero copy (e.g. a memory map), then
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_271read_tensor(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_270read_tensor, "read_tensor(source)\n\nRead pyarrow.Tensor from pyarrow.NativeFile object from current\nposition. If the file source supports zero copy (e.g. a memory map), then\nthis operation does not allocate any memory. This function not assume that\nthe stream is aligned\n\nParameters\n----------\nsource : pyarrow.NativeFile\n\nReturns\n-------\ntensor : Tensor");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_271read_tensor = {"read_tensor", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_271read_tensor, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_270read_tensor};
                    static PyObject *__pyx_pw_7pyarrow_3lib_271read_tensor(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      PyObject *__pyx_v_source = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[1] = {0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("read_tensor (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_source,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(19, 1368, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(19, 1368, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "read_tensor", 0) < (0)) __PYX_ERR(19, 1368, __pyx_L3_error)
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("read_tensor", 1, 1, 1, i); __PYX_ERR(19, 1368, __pyx_L3_error) }
                          }
                        } else if (unlikely(__pyx_nargs != 1)) {
                          goto __pyx_L5_argtuple_error;
                        } else {
                          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(19, 1368, __pyx_L3_error)
                        }
                        __pyx_v_source = values[0];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("read_tensor", 1, 1, 1, __pyx_nargs); __PYX_ERR(19, 1368, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.read_tensor", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_270read_tensor(__pyx_self, __pyx_v_source);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_270read_tensor(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_source) {
                      std::shared_ptr< arrow::Tensor>  __pyx_v_sp_tensor;
                       arrow::io::InputStream *__pyx_v_c_stream;
                      struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_nf = 0;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      std::shared_ptr< arrow::io::InputStream>  __pyx_t_2;
                      std::shared_ptr< arrow::Tensor>  __pyx_t_3;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("read_tensor", 0);

                      /* "pyarrow/ipc.pxi":1386
 *         shared_ptr[CTensor] sp_tensor
 *         CInputStream* c_stream
 *         NativeFile nf = as_native_file(source)             # <<<<<<<<<<<<<<
 * 
 *     c_stream = nf.get_input_stream().get()
*/
                      __pyx_t_1 = ((PyObject *)__pyx_f_7pyarrow_3lib_as_native_file(__pyx_v_source)); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 1386, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_v_nf = ((struct __pyx_obj_7pyarrow_3lib_NativeFile *)__pyx_t_1);
                      __pyx_t_1 = 0;

                      /* "pyarrow/ipc.pxi":1388
 *         NativeFile nf = as_native_file(source)
 * 
 *     c_stream = nf.get_input_stream().get()             # <<<<<<<<<<<<<<
 *     with nogil:
 *         sp_tensor = GetResultValue(ReadTensor(c_stream))
*/
                      if (unlikely(((PyObject *)__pyx_v_nf) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get_input_stream");
                        __PYX_ERR(19, 1388, __pyx_L1_error)
                      }
                      __pyx_t_2 = ((struct __pyx_vtabstruct_7pyarrow_3lib_NativeFile *)__pyx_v_nf->__pyx_vtab)->get_input_stream(__pyx_v_nf); if (unlikely(PyErr_Occurred())) __PYX_ERR(19, 1388, __pyx_L1_error)
                      __pyx_v_c_stream = __pyx_t_2.get();

                      /* "pyarrow/ipc.pxi":1389
 * 
 *     c_stream = nf.get_input_stream().get()
 *     with nogil:             # <<<<<<<<<<<<<<
 *         sp_tensor = GetResultValue(ReadTensor(c_stream))
 *     return pyarrow_wrap_tensor(sp_tensor)
*/
                      {
                          PyThreadState * _save;
                          _save = PyEval_SaveThread();
                          __Pyx_FastGIL_Remember();
                          /*try:*/ {

                            /* "pyarrow/ipc.pxi":1390
 *     c_stream = nf.get_input_stream().get()
 *     with nogil:
 *         sp_tensor = GetResultValue(ReadTensor(c_stream))             # <<<<<<<<<<<<<<
 *     return pyarrow_wrap_tensor(sp_tensor)
 * 
*/
                            __pyx_t_3 = arrow::py::GetResultValue<std::shared_ptr< arrow::Tensor> >(arrow::ipc::ReadTensor(__pyx_v_c_stream)); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(19, 1390, __pyx_L4_error)
                            __pyx_v_sp_tensor = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_3);
                          }

                          /* "pyarrow/ipc.pxi":1389
 * 
 *     c_stream = nf.get_input_stream().get()
 *     with nogil:             # <<<<<<<<<<<<<<
 *         sp_tensor = GetResultValue(ReadTensor(c_stream))
 *     return pyarrow_wrap_tensor(sp_tensor)
*/
                          /*finally:*/ {
                            /*normal exit:*/{
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L5;
                            }
                            __pyx_L4_error: {
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L1_error;
                            }
                            __pyx_L5:;
                          }
                      }

                      /* "pyarrow/ipc.pxi":1391
 *     with nogil:
 *         sp_tensor = GetResultValue(ReadTensor(c_stream))
 *     return pyarrow_wrap_tensor(sp_tensor)             # <<<<<<<<<<<<<<
 * 
 * 
*/
                      __Pyx_XDECREF(__pyx_r);
                      __pyx_t_1 = pyarrow_wrap_tensor(__pyx_v_sp_tensor); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 1391, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_r = __pyx_t_1;
                      __pyx_t_1 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/ipc.pxi":1368
 * 
 * 
 * def read_tensor(source):             # <<<<<<<<<<<<<<
 *     """Read pyarrow.Tensor from pyarrow.NativeFile object from current
 *     position. If the file source supports zero copy (e.g. a memory map), then
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_AddTraceback("pyarrow.lib.read_tensor", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XDECREF((PyObject *)__pyx_v_nf);
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/ipc.pxi":1394
 * 
 * 
 * def read_message(source):             # <<<<<<<<<<<<<<
 *     """
 *     Read length-prefixed message from file or buffer-like object
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_273read_message(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_272read_message, "read_message(source)\n\nRead length-prefixed message from file or buffer-like object\n\nParameters\n----------\nsource : pyarrow.NativeFile, file-like object, or buffer-like object\n\nReturns\n-------\nmessage : Message");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_273read_message = {"read_message", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_273read_message, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_272read_message};
                    static PyObject *__pyx_pw_7pyarrow_3lib_273read_message(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      PyObject *__pyx_v_source = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[1] = {0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("read_message (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_source,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(19, 1394, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(19, 1394, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "read_message", 0) < (0)) __PYX_ERR(19, 1394, __pyx_L3_error)
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("read_message", 1, 1, 1, i); __PYX_ERR(19, 1394, __pyx_L3_error) }
                          }
                        } else if (unlikely(__pyx_nargs != 1)) {
                          goto __pyx_L5_argtuple_error;
                        } else {
                          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(19, 1394, __pyx_L3_error)
                        }
                        __pyx_v_source = values[0];
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("read_message", 1, 1, 1, __pyx_nargs); __PYX_ERR(19, 1394, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.read_message", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      __pyx_r = __pyx_pf_7pyarrow_3lib_272read_message(__pyx_self, __pyx_v_source);

                      /* function exit code */
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_272read_message(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_source) {
                      struct __pyx_obj_7pyarrow_3lib_Message *__pyx_v_result = 0;
                       arrow::io::InputStream *__pyx_v_c_stream;
                      struct __pyx_obj_7pyarrow_3lib_NativeFile *__pyx_v_nf = 0;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      std::shared_ptr< arrow::io::InputStream>  __pyx_t_2;
                      std::unique_ptr< arrow::ipc::Message>  __pyx_t_3;
                      int __pyx_t_4;
                      PyObject *__pyx_t_5 = NULL;
                      size_t __pyx_t_6;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("read_message", 0);

                      /* "pyarrow/ipc.pxi":1407
 *     """
 *     cdef:
 *         Message result = Message.__new__(Message)             # <<<<<<<<<<<<<<
 *         CInputStream* c_stream
 * 
*/
                      __pyx_t_1 = ((PyObject *)__pyx_tp_new_7pyarrow_3lib_Message(((PyTypeObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Message), __pyx_mstate_global->__pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 1407, __pyx_L1_error)
                      __Pyx_GOTREF((PyObject *)__pyx_t_1);
                      __pyx_v_result = ((struct __pyx_obj_7pyarrow_3lib_Message *)__pyx_t_1);
                      __pyx_t_1 = 0;

                      /* "pyarrow/ipc.pxi":1410
 *         CInputStream* c_stream
 * 
 *     cdef NativeFile nf = as_native_file(source)             # <<<<<<<<<<<<<<
 *     c_stream = nf.get_input_stream().get()
 * 
*/
                      __pyx_t_1 = ((PyObject *)__pyx_f_7pyarrow_3lib_as_native_file(__pyx_v_source)); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 1410, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_v_nf = ((struct __pyx_obj_7pyarrow_3lib_NativeFile *)__pyx_t_1);
                      __pyx_t_1 = 0;

                      /* "pyarrow/ipc.pxi":1411
 * 
 *     cdef NativeFile nf = as_native_file(source)
 *     c_stream = nf.get_input_stream().get()             # <<<<<<<<<<<<<<
 * 
 *     with nogil:
*/
                      if (unlikely(((PyObject *)__pyx_v_nf) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get_input_stream");
                        __PYX_ERR(19, 1411, __pyx_L1_error)
                      }
                      __pyx_t_2 = ((struct __pyx_vtabstruct_7pyarrow_3lib_NativeFile *)__pyx_v_nf->__pyx_vtab)->get_input_stream(__pyx_v_nf); if (unlikely(PyErr_Occurred())) __PYX_ERR(19, 1411, __pyx_L1_error)
                      __pyx_v_c_stream = __pyx_t_2.get();

                      /* "pyarrow/ipc.pxi":1413
 *     c_stream = nf.get_input_stream().get()
 * 
 *     with nogil:             # <<<<<<<<<<<<<<
 *         result.message = move(
 *             GetResultValue(ReadMessage(c_stream, c_default_memory_pool())))
*/
                      {
                          PyThreadState * _save;
                          _save = PyEval_SaveThread();
                          __Pyx_FastGIL_Remember();
                          /*try:*/ {

                            /* "pyarrow/ipc.pxi":1415
 *     with nogil:
 *         result.message = move(
 *             GetResultValue(ReadMessage(c_stream, c_default_memory_pool())))             # <<<<<<<<<<<<<<
 * 
 *     if result.message == nullptr:
*/
                            __pyx_t_3 = arrow::py::GetResultValue<std::unique_ptr< arrow::ipc::Message> >(arrow::ipc::ReadMessage(__pyx_v_c_stream,  arrow::default_memory_pool())); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(19, 1415, __pyx_L4_error)

                            /* "pyarrow/ipc.pxi":1414
 * 
 *     with nogil:
 *         result.message = move(             # <<<<<<<<<<<<<<
 *             GetResultValue(ReadMessage(c_stream, c_default_memory_pool())))
 * 
*/
                            if (unlikely(((PyObject *)__pyx_v_result) == Py_None)) {
                              PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "message");
                              __Pyx_PyGILState_Release(__pyx_gilstate_save);
                              __PYX_ERR(19, 1414, __pyx_L4_error)
                            }
                            __pyx_v_result->message = cython_std::move<std::unique_ptr< arrow::ipc::Message> >(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_3));
                          }

                          /* "pyarrow/ipc.pxi":1413
 *     c_stream = nf.get_input_stream().get()
 * 
 *     with nogil:             # <<<<<<<<<<<<<<
 *         result.message = move(
 *             GetResultValue(ReadMessage(c_stream, c_default_memory_pool())))
*/
                          /*finally:*/ {
                            /*normal exit:*/{
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L5;
                            }
                            __pyx_L4_error: {
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L1_error;
                            }
                            __pyx_L5:;
                          }
                      }

                      /* "pyarrow/ipc.pxi":1417
 *             GetResultValue(ReadMessage(c_stream, c_default_memory_pool())))
 * 
 *     if result.message == nullptr:             # <<<<<<<<<<<<<<
 *         raise EOFError("End of Arrow stream")
 * 
*/
                      if (unlikely(((PyObject *)__pyx_v_result) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "message");
                        __PYX_ERR(19, 1417, __pyx_L1_error)
                      }
                      __pyx_t_4 = ((__pyx_v_result->message == nullptr) != 0);
                      if (unlikely(__pyx_t_4)) {

                        /* "pyarrow/ipc.pxi":1418
 * 
 *     if result.message == nullptr:
 *         raise EOFError("End of Arrow stream")             # <<<<<<<<<<<<<<
 * 
 *     return result
*/
                        __pyx_t_5 = NULL;
                        __pyx_t_6 = 1;
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_End_of_Arrow_stream};
                          __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_EOFError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
                          if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 1418, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_1);
                        }
                        __Pyx_Raise(__pyx_t_1, 0, 0, 0);
                        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                        __PYX_ERR(19, 1418, __pyx_L1_error)

                        /* "pyarrow/ipc.pxi":1417
 *             GetResultValue(ReadMessage(c_stream, c_default_memory_pool())))
 * 
 *     if result.message == nullptr:             # <<<<<<<<<<<<<<
 *         raise EOFError("End of Arrow stream")
 * 
*/
                      }

                      /* "pyarrow/ipc.pxi":1420
 *         raise EOFError("End of Arrow stream")
 * 
 *     return result             # <<<<<<<<<<<<<<
 * 
 * 
*/
                      __Pyx_XDECREF(__pyx_r);
                      __Pyx_INCREF((PyObject *)__pyx_v_result);
                      __pyx_r = ((PyObject *)__pyx_v_result);
                      goto __pyx_L0;

                      /* "pyarrow/ipc.pxi":1394
 * 
 * 
 * def read_message(source):             # <<<<<<<<<<<<<<
 *     """
 *     Read length-prefixed message from file or buffer-like object
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_XDECREF(__pyx_t_5);
                      __Pyx_AddTraceback("pyarrow.lib.read_message", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XDECREF((PyObject *)__pyx_v_result);
                      __Pyx_XDECREF((PyObject *)__pyx_v_nf);
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/ipc.pxi":1423
 * 
 * 
 * def read_schema(obj, DictionaryMemo dictionary_memo=None):             # <<<<<<<<<<<<<<
 *     """
 *     Read Schema from message or buffer
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_275read_schema(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_274read_schema, "read_schema(obj, DictionaryMemo dictionary_memo=None)\n\nRead Schema from message or buffer\n\nParameters\n----------\nobj : buffer or Message\ndictionary_memo : DictionaryMemo, optional\n    Needed to be able to reconstruct dictionary-encoded fields\n    with read_record_batch\n\nReturns\n-------\nschema : Schema");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_275read_schema = {"read_schema", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_275read_schema, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_274read_schema};
                    static PyObject *__pyx_pw_7pyarrow_3lib_275read_schema(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      PyObject *__pyx_v_obj = 0;
                      struct __pyx_obj_7pyarrow_3lib_DictionaryMemo *__pyx_v_dictionary_memo = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[2] = {0,0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("read_schema (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_obj,&__pyx_mstate_global->__pyx_n_u_dictionary_memo,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(19, 1423, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  2:
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(19, 1423, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(19, 1423, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "read_schema", 0) < (0)) __PYX_ERR(19, 1423, __pyx_L3_error)
                          if (!values[1]) values[1] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_7pyarrow_3lib_DictionaryMemo *)Py_None));
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("read_schema", 0, 1, 2, i); __PYX_ERR(19, 1423, __pyx_L3_error) }
                          }
                        } else {
                          switch (__pyx_nargs) {
                            case  2:
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(19, 1423, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(19, 1423, __pyx_L3_error)
                            break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          if (!values[1]) values[1] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_7pyarrow_3lib_DictionaryMemo *)Py_None));
                        }
                        __pyx_v_obj = values[0];
                        __pyx_v_dictionary_memo = ((struct __pyx_obj_7pyarrow_3lib_DictionaryMemo *)values[1]);
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("read_schema", 0, 1, 2, __pyx_nargs); __PYX_ERR(19, 1423, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.read_schema", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dictionary_memo), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DictionaryMemo, 1, "dictionary_memo", 0))) __PYX_ERR(19, 1423, __pyx_L1_error)
                      __pyx_r = __pyx_pf_7pyarrow_3lib_274read_schema(__pyx_self, __pyx_v_obj, __pyx_v_dictionary_memo);

                      /* function exit code */
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __pyx_r = NULL;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      goto __pyx_L7_cleaned_up;
                      __pyx_L0:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __pyx_L7_cleaned_up:;
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_274read_schema(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, struct __pyx_obj_7pyarrow_3lib_DictionaryMemo *__pyx_v_dictionary_memo) {
                      std::shared_ptr< arrow::Schema>  __pyx_v_result;
                      std::shared_ptr< arrow::io::RandomAccessFile>  __pyx_v_cpp_file;
                      struct __pyx_obj_7pyarrow_3lib_Message *__pyx_v_message = 0;
                       arrow::ipc::DictionaryMemo __pyx_v_temp_memo;
                       arrow::ipc::DictionaryMemo *__pyx_v_arg_dict_memo;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_t_1;
                       arrow::ipc::DictionaryMemo *__pyx_t_2;
                      PyObject *__pyx_t_3 = NULL;
                      std::shared_ptr< arrow::Schema>  __pyx_t_4;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("read_schema", 0);

                      /* "pyarrow/ipc.pxi":1445
 *         CDictionaryMemo* arg_dict_memo
 * 
 *     if dictionary_memo is not None:             # <<<<<<<<<<<<<<
 *         arg_dict_memo = dictionary_memo.memo
 *     else:
*/
                      __pyx_t_1 = (((PyObject *)__pyx_v_dictionary_memo) != Py_None);
                      if (__pyx_t_1) {

                        /* "pyarrow/ipc.pxi":1446
 * 
 *     if dictionary_memo is not None:
 *         arg_dict_memo = dictionary_memo.memo             # <<<<<<<<<<<<<<
 *     else:
 *         arg_dict_memo = &temp_memo
*/
                        if (unlikely(((PyObject *)__pyx_v_dictionary_memo) == Py_None)) {
                          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "memo");
                          __PYX_ERR(19, 1446, __pyx_L1_error)
                        }
                        __pyx_t_2 = __pyx_v_dictionary_memo->memo;
                        __pyx_v_arg_dict_memo = __pyx_t_2;

                        /* "pyarrow/ipc.pxi":1445
 *         CDictionaryMemo* arg_dict_memo
 * 
 *     if dictionary_memo is not None:             # <<<<<<<<<<<<<<
 *         arg_dict_memo = dictionary_memo.memo
 *     else:
*/
                        goto __pyx_L3;
                      }

                      /* "pyarrow/ipc.pxi":1448
 *         arg_dict_memo = dictionary_memo.memo
 *     else:
 *         arg_dict_memo = &temp_memo             # <<<<<<<<<<<<<<
 * 
 *     if isinstance(obj, Message):
*/
                      /*else*/ {
                        __pyx_v_arg_dict_memo = (&__pyx_v_temp_memo);
                      }
                      __pyx_L3:;

                      /* "pyarrow/ipc.pxi":1450
 *         arg_dict_memo = &temp_memo
 * 
 *     if isinstance(obj, Message):             # <<<<<<<<<<<<<<
 *         message = obj
 *         with nogil:
*/
                      __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_obj, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Message); 
                      if (__pyx_t_1) {

                        /* "pyarrow/ipc.pxi":1451
 * 
 *     if isinstance(obj, Message):
 *         message = obj             # <<<<<<<<<<<<<<
 *         with nogil:
 *             result = GetResultValue(ReadSchema(
*/
                        __pyx_t_3 = __pyx_v_obj;
                        __Pyx_INCREF(__pyx_t_3);
                        if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Message))))) __PYX_ERR(19, 1451, __pyx_L1_error)
                        __pyx_v_message = ((struct __pyx_obj_7pyarrow_3lib_Message *)__pyx_t_3);
                        __pyx_t_3 = 0;

                        /* "pyarrow/ipc.pxi":1452
 *     if isinstance(obj, Message):
 *         message = obj
 *         with nogil:             # <<<<<<<<<<<<<<
 *             result = GetResultValue(ReadSchema(
 *                 deref(message.message.get()), arg_dict_memo))
*/
                        {
                            PyThreadState * _save;
                            _save = PyEval_SaveThread();
                            __Pyx_FastGIL_Remember();
                            /*try:*/ {

                              /* "pyarrow/ipc.pxi":1454
 *         with nogil:
 *             result = GetResultValue(ReadSchema(
 *                 deref(message.message.get()), arg_dict_memo))             # <<<<<<<<<<<<<<
 *     else:
 *         get_reader(obj, False, &cpp_file)
*/
                              if (unlikely(((PyObject *)__pyx_v_message) == Py_None)) {
                                PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                                PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "message");
                                __Pyx_PyGILState_Release(__pyx_gilstate_save);
                                __PYX_ERR(19, 1454, __pyx_L6_error)
                              }

                              /* "pyarrow/ipc.pxi":1453
 *         message = obj
 *         with nogil:
 *             result = GetResultValue(ReadSchema(             # <<<<<<<<<<<<<<
 *                 deref(message.message.get()), arg_dict_memo))
 *     else:
*/
                              __pyx_t_4 = arrow::py::GetResultValue<std::shared_ptr< arrow::Schema> >(arrow::ipc::ReadSchema((*__pyx_v_message->message.get()), __pyx_v_arg_dict_memo)); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(19, 1453, __pyx_L6_error)
                              __pyx_v_result = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_4);
                            }

                            /* "pyarrow/ipc.pxi":1452
 *     if isinstance(obj, Message):
 *         message = obj
 *         with nogil:             # <<<<<<<<<<<<<<
 *             result = GetResultValue(ReadSchema(
 *                 deref(message.message.get()), arg_dict_memo))
*/
                            /*finally:*/ {
                              /*normal exit:*/{
                                __Pyx_FastGIL_Forget();
                                PyEval_RestoreThread(_save);
                                goto __pyx_L7;
                              }
                              __pyx_L6_error: {
                                __Pyx_FastGIL_Forget();
                                PyEval_RestoreThread(_save);
                                goto __pyx_L1_error;
                              }
                              __pyx_L7:;
                            }
                        }

                        /* "pyarrow/ipc.pxi":1450
 *         arg_dict_memo = &temp_memo
 * 
 *     if isinstance(obj, Message):             # <<<<<<<<<<<<<<
 *         message = obj
 *         with nogil:
*/
                        goto __pyx_L4;
                      }

                      /* "pyarrow/ipc.pxi":1456
 *                 deref(message.message.get()), arg_dict_memo))
 *     else:
 *         get_reader(obj, False, &cpp_file)             # <<<<<<<<<<<<<<
 *         with nogil:
 *             result = GetResultValue(ReadSchema(cpp_file.get(), arg_dict_memo))
*/
                      /*else*/ {
                        __pyx_t_3 = __pyx_f_7pyarrow_3lib_get_reader(__pyx_v_obj, 0, (&__pyx_v_cpp_file)); if (unlikely(!__pyx_t_3)) __PYX_ERR(19, 1456, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_3);
                        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

                        /* "pyarrow/ipc.pxi":1457
 *     else:
 *         get_reader(obj, False, &cpp_file)
 *         with nogil:             # <<<<<<<<<<<<<<
 *             result = GetResultValue(ReadSchema(cpp_file.get(), arg_dict_memo))
 * 
*/
                        {
                            PyThreadState * _save;
                            _save = PyEval_SaveThread();
                            __Pyx_FastGIL_Remember();
                            /*try:*/ {

                              /* "pyarrow/ipc.pxi":1458
 *         get_reader(obj, False, &cpp_file)
 *         with nogil:
 *             result = GetResultValue(ReadSchema(cpp_file.get(), arg_dict_memo))             # <<<<<<<<<<<<<<
 * 
 *     return pyarrow_wrap_schema(result)
*/
                              __pyx_t_4 = arrow::py::GetResultValue<std::shared_ptr< arrow::Schema> >(arrow::ipc::ReadSchema(__pyx_v_cpp_file.get(), __pyx_v_arg_dict_memo)); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(19, 1458, __pyx_L9_error)
                              __pyx_v_result = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_4);
                            }

                            /* "pyarrow/ipc.pxi":1457
 *     else:
 *         get_reader(obj, False, &cpp_file)
 *         with nogil:             # <<<<<<<<<<<<<<
 *             result = GetResultValue(ReadSchema(cpp_file.get(), arg_dict_memo))
 * 
*/
                            /*finally:*/ {
                              /*normal exit:*/{
                                __Pyx_FastGIL_Forget();
                                PyEval_RestoreThread(_save);
                                goto __pyx_L10;
                              }
                              __pyx_L9_error: {
                                __Pyx_FastGIL_Forget();
                                PyEval_RestoreThread(_save);
                                goto __pyx_L1_error;
                              }
                              __pyx_L10:;
                            }
                        }
                      }
                      __pyx_L4:;

                      /* "pyarrow/ipc.pxi":1460
 *             result = GetResultValue(ReadSchema(cpp_file.get(), arg_dict_memo))
 * 
 *     return pyarrow_wrap_schema(result)             # <<<<<<<<<<<<<<
 * 
 * 
*/
                      __Pyx_XDECREF(__pyx_r);
                      __pyx_t_3 = pyarrow_wrap_schema(__pyx_v_result); if (unlikely(!__pyx_t_3)) __PYX_ERR(19, 1460, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_3);
                      __pyx_r = __pyx_t_3;
                      __pyx_t_3 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/ipc.pxi":1423
 * 
 * 
 * def read_schema(obj, DictionaryMemo dictionary_memo=None):             # <<<<<<<<<<<<<<
 *     """
 *     Read Schema from message or buffer
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_AddTraceback("pyarrow.lib.read_schema", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XDECREF((PyObject *)__pyx_v_message);
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/ipc.pxi":1463
 * 
 * 
 * def read_record_batch(obj, Schema schema,             # <<<<<<<<<<<<<<
 *                       DictionaryMemo dictionary_memo=None):
 *     """
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_277read_record_batch(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_276read_record_batch, "read_record_batch(obj, Schema schema, DictionaryMemo dictionary_memo=None)\n\nRead RecordBatch from message, given a known schema. If reading data from a\ncomplete IPC stream, use ipc.open_stream instead\n\nParameters\n----------\nobj : Message or Buffer-like\nschema : Schema\ndictionary_memo : DictionaryMemo, optional\n    If message contains dictionaries, must pass a populated\n    DictionaryMemo\n\nReturns\n-------\nbatch : RecordBatch");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_277read_record_batch = {"read_record_batch", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_277read_record_batch, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_276read_record_batch};
                    static PyObject *__pyx_pw_7pyarrow_3lib_277read_record_batch(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      PyObject *__pyx_v_obj = 0;
                      struct __pyx_obj_7pyarrow_3lib_Schema *__pyx_v_schema = 0;
                      struct __pyx_obj_7pyarrow_3lib_DictionaryMemo *__pyx_v_dictionary_memo = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[3] = {0,0,0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("read_record_batch (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_obj,&__pyx_mstate_global->__pyx_n_u_schema,&__pyx_mstate_global->__pyx_n_u_dictionary_memo,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(19, 1463, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  3:
                            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(19, 1463, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  2:
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(19, 1463, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(19, 1463, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "read_record_batch", 0) < (0)) __PYX_ERR(19, 1463, __pyx_L3_error)

                          /* "pyarrow/ipc.pxi":1464
 * 
 * def read_record_batch(obj, Schema schema,
 *                       DictionaryMemo dictionary_memo=None):             # <<<<<<<<<<<<<<
 *     """
 *     Read RecordBatch from message, given a known schema. If reading data from a
*/
                          if (!values[2]) values[2] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_7pyarrow_3lib_DictionaryMemo *)Py_None));
                          for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("read_record_batch", 0, 2, 3, i); __PYX_ERR(19, 1463, __pyx_L3_error) }
                          }
                        } else {
                          switch (__pyx_nargs) {
                            case  3:
                            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(19, 1463, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  2:
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(19, 1463, __pyx_L3_error)
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(19, 1463, __pyx_L3_error)
                            break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          if (!values[2]) values[2] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_7pyarrow_3lib_DictionaryMemo *)Py_None));
                        }
                        __pyx_v_obj = values[0];
                        __pyx_v_schema = ((struct __pyx_obj_7pyarrow_3lib_Schema *)values[1]);
                        __pyx_v_dictionary_memo = ((struct __pyx_obj_7pyarrow_3lib_DictionaryMemo *)values[2]);
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("read_record_batch", 0, 2, 3, __pyx_nargs); __PYX_ERR(19, 1463, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.read_record_batch", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_schema), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Schema, 1, "schema", 0))) __PYX_ERR(19, 1463, __pyx_L1_error)
                      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dictionary_memo), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DictionaryMemo, 1, "dictionary_memo", 0))) __PYX_ERR(19, 1464, __pyx_L1_error)
                      __pyx_r = __pyx_pf_7pyarrow_3lib_276read_record_batch(__pyx_self, __pyx_v_obj, __pyx_v_schema, __pyx_v_dictionary_memo);

                      /* "pyarrow/ipc.pxi":1463
 * 
 * 
 * def read_record_batch(obj, Schema schema,             # <<<<<<<<<<<<<<
 *                       DictionaryMemo dictionary_memo=None):
 *     """
*/

                      /* function exit code */
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __pyx_r = NULL;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      goto __pyx_L7_cleaned_up;
                      __pyx_L0:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __pyx_L7_cleaned_up:;
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_276read_record_batch(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, struct __pyx_obj_7pyarrow_3lib_Schema *__pyx_v_schema, struct __pyx_obj_7pyarrow_3lib_DictionaryMemo *__pyx_v_dictionary_memo) {
                      std::shared_ptr< arrow::RecordBatch>  __pyx_v_result;
                      struct __pyx_obj_7pyarrow_3lib_Message *__pyx_v_message = 0;
                       arrow::ipc::DictionaryMemo __pyx_v_temp_memo;
                       arrow::ipc::DictionaryMemo *__pyx_v_arg_dict_memo;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_t_1;
                      PyObject *__pyx_t_2 = NULL;
                      PyObject *__pyx_t_3 = NULL;
                      PyObject *__pyx_t_4 = NULL;
                      size_t __pyx_t_5;
                       arrow::ipc::DictionaryMemo *__pyx_t_6;
                      std::shared_ptr< arrow::RecordBatch>  __pyx_t_7;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("read_record_batch", 0);

                      /* "pyarrow/ipc.pxi":1487
 *         CDictionaryMemo* arg_dict_memo
 * 
 *     if isinstance(obj, Message):             # <<<<<<<<<<<<<<
 *         message = obj
 *     else:
*/
                      __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_obj, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Message); 
                      if (__pyx_t_1) {

                        /* "pyarrow/ipc.pxi":1488
 * 
 *     if isinstance(obj, Message):
 *         message = obj             # <<<<<<<<<<<<<<
 *     else:
 *         message = read_message(obj)
*/
                        __pyx_t_2 = __pyx_v_obj;
                        __Pyx_INCREF(__pyx_t_2);
                        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Message))))) __PYX_ERR(19, 1488, __pyx_L1_error)
                        __pyx_v_message = ((struct __pyx_obj_7pyarrow_3lib_Message *)__pyx_t_2);
                        __pyx_t_2 = 0;

                        /* "pyarrow/ipc.pxi":1487
 *         CDictionaryMemo* arg_dict_memo
 * 
 *     if isinstance(obj, Message):             # <<<<<<<<<<<<<<
 *         message = obj
 *     else:
*/
                        goto __pyx_L3;
                      }

                      /* "pyarrow/ipc.pxi":1490
 *         message = obj
 *     else:
 *         message = read_message(obj)             # <<<<<<<<<<<<<<
 * 
 *     if dictionary_memo is not None:
*/
                      /*else*/ {
                        __pyx_t_3 = NULL;
                        __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_read_message); if (unlikely(!__pyx_t_4)) __PYX_ERR(19, 1490, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_4);
                        __pyx_t_5 = 1;
                        #if CYTHON_UNPACK_METHODS
                        if (unlikely(PyMethod_Check(__pyx_t_4))) {
                          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
                          assert(__pyx_t_3);
                          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
                          __Pyx_INCREF(__pyx_t_3);
                          __Pyx_INCREF(__pyx__function);
                          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
                          __pyx_t_5 = 0;
                        }
                        #endif
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_obj};
                          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                          if (unlikely(!__pyx_t_2)) __PYX_ERR(19, 1490, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_2);
                        }
                        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Message))))) __PYX_ERR(19, 1490, __pyx_L1_error)
                        __pyx_v_message = ((struct __pyx_obj_7pyarrow_3lib_Message *)__pyx_t_2);
                        __pyx_t_2 = 0;
                      }
                      __pyx_L3:;

                      /* "pyarrow/ipc.pxi":1492
 *         message = read_message(obj)
 * 
 *     if dictionary_memo is not None:             # <<<<<<<<<<<<<<
 *         arg_dict_memo = dictionary_memo.memo
 *     else:
*/
                      __pyx_t_1 = (((PyObject *)__pyx_v_dictionary_memo) != Py_None);
                      if (__pyx_t_1) {

                        /* "pyarrow/ipc.pxi":1493
 * 
 *     if dictionary_memo is not None:
 *         arg_dict_memo = dictionary_memo.memo             # <<<<<<<<<<<<<<
 *     else:
 *         arg_dict_memo = &temp_memo
*/
                        if (unlikely(((PyObject *)__pyx_v_dictionary_memo) == Py_None)) {
                          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "memo");
                          __PYX_ERR(19, 1493, __pyx_L1_error)
                        }
                        __pyx_t_6 = __pyx_v_dictionary_memo->memo;
                        __pyx_v_arg_dict_memo = __pyx_t_6;

                        /* "pyarrow/ipc.pxi":1492
 *         message = read_message(obj)
 * 
 *     if dictionary_memo is not None:             # <<<<<<<<<<<<<<
 *         arg_dict_memo = dictionary_memo.memo
 *     else:
*/
                        goto __pyx_L4;
                      }

                      /* "pyarrow/ipc.pxi":1495
 *         arg_dict_memo = dictionary_memo.memo
 *     else:
 *         arg_dict_memo = &temp_memo             # <<<<<<<<<<<<<<
 * 
 *     with nogil:
*/
                      /*else*/ {
                        __pyx_v_arg_dict_memo = (&__pyx_v_temp_memo);
                      }
                      __pyx_L4:;

                      /* "pyarrow/ipc.pxi":1497
 *         arg_dict_memo = &temp_memo
 * 
 *     with nogil:             # <<<<<<<<<<<<<<
 *         result = GetResultValue(
 *             ReadRecordBatch(deref(message.message.get()),
*/
                      {
                          PyThreadState * _save;
                          _save = PyEval_SaveThread();
                          __Pyx_FastGIL_Remember();
                          /*try:*/ {

                            /* "pyarrow/ipc.pxi":1499
 *     with nogil:
 *         result = GetResultValue(
 *             ReadRecordBatch(deref(message.message.get()),             # <<<<<<<<<<<<<<
 *                             schema.sp_schema,
 *                             arg_dict_memo,
*/
                            if (unlikely(((PyObject *)__pyx_v_message) == Py_None)) {
                              PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "message");
                              __Pyx_PyGILState_Release(__pyx_gilstate_save);
                              __PYX_ERR(19, 1499, __pyx_L6_error)
                            }

                            /* "pyarrow/ipc.pxi":1500
 *         result = GetResultValue(
 *             ReadRecordBatch(deref(message.message.get()),
 *                             schema.sp_schema,             # <<<<<<<<<<<<<<
 *                             arg_dict_memo,
 *                             CIpcReadOptions.Defaults()))
*/
                            if (unlikely(((PyObject *)__pyx_v_schema) == Py_None)) {
                              PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_schema");
                              __Pyx_PyGILState_Release(__pyx_gilstate_save);
                              __PYX_ERR(19, 1500, __pyx_L6_error)
                            }

                            /* "pyarrow/ipc.pxi":1498
 * 
 *     with nogil:
 *         result = GetResultValue(             # <<<<<<<<<<<<<<
 *             ReadRecordBatch(deref(message.message.get()),
 *                             schema.sp_schema,
*/
                            __pyx_t_7 = arrow::py::GetResultValue<std::shared_ptr< arrow::RecordBatch> >(arrow::ipc::ReadRecordBatch((*__pyx_v_message->message.get()), __pyx_v_schema->sp_schema, __pyx_v_arg_dict_memo,  arrow::ipc::IpcReadOptions::Defaults())); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(19, 1498, __pyx_L6_error)
                            __pyx_v_result = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_7);
                          }

                          /* "pyarrow/ipc.pxi":1497
 *         arg_dict_memo = &temp_memo
 * 
 *     with nogil:             # <<<<<<<<<<<<<<
 *         result = GetResultValue(
 *             ReadRecordBatch(deref(message.message.get()),
*/
                          /*finally:*/ {
                            /*normal exit:*/{
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L7;
                            }
                            __pyx_L6_error: {
                              __Pyx_FastGIL_Forget();
                              PyEval_RestoreThread(_save);
                              goto __pyx_L1_error;
                            }
                            __pyx_L7:;
                          }
                      }

                      /* "pyarrow/ipc.pxi":1504
 *                             CIpcReadOptions.Defaults()))
 * 
 *     return pyarrow_wrap_batch(result)             # <<<<<<<<<<<<<<
*/
                      __Pyx_XDECREF(__pyx_r);
                      __pyx_t_2 = pyarrow_wrap_batch(__pyx_v_result); if (unlikely(!__pyx_t_2)) __PYX_ERR(19, 1504, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_2);
                      __pyx_r = __pyx_t_2;
                      __pyx_t_2 = 0;
                      goto __pyx_L0;

                      /* "pyarrow/ipc.pxi":1463
 * 
 * 
 * def read_record_batch(obj, Schema schema,             # <<<<<<<<<<<<<<
 *                       DictionaryMemo dictionary_memo=None):
 *     """
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_XDECREF(__pyx_t_4);
                      __Pyx_AddTraceback("pyarrow.lib.read_record_batch", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XDECREF((PyObject *)__pyx_v_message);
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/benchmark.pxi":19
 * 
 * 
 * def benchmark_PandasObjectIsNull(list obj):             # <<<<<<<<<<<<<<
 *     Benchmark_PandasObjectIsNull(obj)
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_279benchmark_PandasObjectIsNull(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_278benchmark_PandasObjectIsNull, "benchmark_PandasObjectIsNull(list obj)");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_279benchmark_PandasObjectIsNull = {"benchmark_PandasObjectIsNull", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_279benchmark_PandasObjectIsNull, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_278benchmark_PandasObjectIsNull};
                    static PyObject *__pyx_pw_7pyarrow_3lib_279benchmark_PandasObjectIsNull(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      PyObject *__pyx_v_obj = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[1] = {0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("benchmark_PandasObjectIsNull (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_obj,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(20, 19, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(20, 19, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "benchmark_PandasObjectIsNull", 0) < (0)) __PYX_ERR(20, 19, __pyx_L3_error)
                          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("benchmark_PandasObjectIsNull", 1, 1, 1, i); __PYX_ERR(20, 19, __pyx_L3_error) }
                          }
                        } else if (unlikely(__pyx_nargs != 1)) {
                          goto __pyx_L5_argtuple_error;
                        } else {
                          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(20, 19, __pyx_L3_error)
                        }
                        __pyx_v_obj = ((PyObject*)values[0]);
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("benchmark_PandasObjectIsNull", 1, 1, 1, __pyx_nargs); __PYX_ERR(20, 19, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.benchmark_PandasObjectIsNull", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_obj), (&PyList_Type), 1, "obj", 1))) __PYX_ERR(20, 19, __pyx_L1_error)
                      __pyx_r = __pyx_pf_7pyarrow_3lib_278benchmark_PandasObjectIsNull(__pyx_self, __pyx_v_obj);

                      /* function exit code */
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __pyx_r = NULL;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      goto __pyx_L7_cleaned_up;
                      __pyx_L0:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __pyx_L7_cleaned_up:;
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_278benchmark_PandasObjectIsNull(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("benchmark_PandasObjectIsNull", 0);

                      /* "pyarrow/benchmark.pxi":20
 * 
 * def benchmark_PandasObjectIsNull(list obj):
 *     Benchmark_PandasObjectIsNull(obj)             # <<<<<<<<<<<<<<
*/
                      arrow::py::benchmark::Benchmark_PandasObjectIsNull(__pyx_v_obj); if (unlikely(PyErr_Occurred())) __PYX_ERR(20, 20, __pyx_L1_error)

                      /* "pyarrow/benchmark.pxi":19
 * 
 * 
 * def benchmark_PandasObjectIsNull(list obj):             # <<<<<<<<<<<<<<
 *     Benchmark_PandasObjectIsNull(obj)
*/

                      /* function exit code */
                      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib.benchmark_PandasObjectIsNull", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/public-api.pxi":29
 * 
 * 
 * cdef api bint pyarrow_is_buffer(object buffer):             # <<<<<<<<<<<<<<
 *     return isinstance(buffer, Buffer)
 * 
*/

                    static int __pyx_f_7pyarrow_3lib_pyarrow_is_buffer(PyObject *__pyx_v_buffer) {
                      int __pyx_r;
                      int __pyx_t_1;

                      /* "pyarrow/public-api.pxi":30
 * 
 * cdef api bint pyarrow_is_buffer(object buffer):
 *     return isinstance(buffer, Buffer)             # <<<<<<<<<<<<<<
 * 
 * 
*/
                      __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_buffer, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Buffer); 
                      __pyx_r = __pyx_t_1;
                      goto __pyx_L0;

                      /* "pyarrow/public-api.pxi":29
 * 
 * 
 * cdef api bint pyarrow_is_buffer(object buffer):             # <<<<<<<<<<<<<<
 *     return isinstance(buffer, Buffer)
 * 
*/

                      /* function exit code */
                      __pyx_L0:;
                      return __pyx_r;
                    }

                    /* "pyarrow/public-api.pxi":33
 * 
 * 
 * cdef api shared_ptr[CBuffer] pyarrow_unwrap_buffer(object buffer):             # <<<<<<<<<<<<<<
 *     cdef Buffer buf
 *     if pyarrow_is_buffer(buffer):
*/

                    std::shared_ptr< arrow::Buffer>  pyarrow_unwrap_buffer(PyObject *__pyx_v_buffer) {
                      struct __pyx_obj_7pyarrow_3lib_Buffer *__pyx_v_buf = 0;
                      std::shared_ptr< arrow::Buffer>  __pyx_r;
                      __Pyx_RefNannyDeclarations
                      int __pyx_t_1;
                      PyObject *__pyx_t_2 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("pyarrow_unwrap_buffer", 0);

                      /* "pyarrow/public-api.pxi":35
 * cdef api shared_ptr[CBuffer] pyarrow_unwrap_buffer(object buffer):
 *     cdef Buffer buf
 *     if pyarrow_is_buffer(buffer):             # <<<<<<<<<<<<<<
 *         buf = <Buffer>(buffer)
 *         return buf.buffer
*/
                      __pyx_t_1 = __pyx_f_7pyarrow_3lib_pyarrow_is_buffer(__pyx_v_buffer); if (unlikely(__pyx_t_1 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(21, 35, __pyx_L1_error)
                      if (__pyx_t_1) {

                        /* "pyarrow/public-api.pxi":36
 *     cdef Buffer buf
 *     if pyarrow_is_buffer(buffer):
 *         buf = <Buffer>(buffer)             # <<<<<<<<<<<<<<
 *         return buf.buffer
 * 
*/
                        __pyx_t_2 = __pyx_v_buffer;
                        __Pyx_INCREF(__pyx_t_2);
                        __pyx_v_buf = ((struct __pyx_obj_7pyarrow_3lib_Buffer *)__pyx_t_2);
                        __pyx_t_2 = 0;

                        /* "pyarrow/public-api.pxi":37
 *     if pyarrow_is_buffer(buffer):
 *         buf = <Buffer>(buffer)
 *         return buf.buffer             # <<<<<<<<<<<<<<
 * 
 *     return shared_ptr[CBuffer]()
*/
                        if (unlikely(((PyObject *)__pyx_v_buf) == Py_None)) {
                          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "buffer");
                          __PYX_ERR(21, 37, __pyx_L1_error)
                        }
                        __pyx_r = __pyx_v_buf->buffer;
                        goto __pyx_L0;

                        /* "pyarrow/public-api.pxi":35
 * cdef api shared_ptr[CBuffer] pyarrow_unwrap_buffer(object buffer):
 *     cdef Buffer buf
 *     if pyarrow_is_buffer(buffer):             # <<<<<<<<<<<<<<
 *         buf = <Buffer>(buffer)
 *         return buf.buffer
*/
                      }

                      /* "pyarrow/public-api.pxi":39
 *         return buf.buffer
 * 
 *     return shared_ptr[CBuffer]()             # <<<<<<<<<<<<<<
 * 
 * 
*/
                      __pyx_r = std::shared_ptr< arrow::Buffer> ();
                      goto __pyx_L0;

                      /* "pyarrow/public-api.pxi":33
 * 
 * 
 * cdef api shared_ptr[CBuffer] pyarrow_unwrap_buffer(object buffer):             # <<<<<<<<<<<<<<
 *     cdef Buffer buf
 *     if pyarrow_is_buffer(buffer):
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_AddTraceback("pyarrow.lib.pyarrow_unwrap_buffer", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_pretend_to_initialize(&__pyx_r);
                      __pyx_L0:;
                      __Pyx_XDECREF((PyObject *)__pyx_v_buf);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/public-api.pxi":42
 * 
 * 
 * cdef api object pyarrow_wrap_buffer(const shared_ptr[CBuffer]& buf):             # <<<<<<<<<<<<<<
 *     cdef Buffer result = Buffer.__new__(Buffer)
 *     result.init(buf)
*/

                    PyObject *pyarrow_wrap_buffer(std::shared_ptr< arrow::Buffer>  const &__pyx_v_buf) {
                      struct __pyx_obj_7pyarrow_3lib_Buffer *__pyx_v_result = 0;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("pyarrow_wrap_buffer", 0);

                      /* "pyarrow/public-api.pxi":43
 * 
 * cdef api object pyarrow_wrap_buffer(const shared_ptr[CBuffer]& buf):
 *     cdef Buffer result = Buffer.__new__(Buffer)             # <<<<<<<<<<<<<<
 *     result.init(buf)
 *     return result
*/
                      __pyx_t_1 = ((PyObject *)__pyx_tp_new_7pyarrow_3lib_Buffer(((PyTypeObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Buffer), __pyx_mstate_global->__pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 43, __pyx_L1_error)
                      __Pyx_GOTREF((PyObject *)__pyx_t_1);
                      __pyx_v_result = ((struct __pyx_obj_7pyarrow_3lib_Buffer *)__pyx_t_1);
                      __pyx_t_1 = 0;

                      /* "pyarrow/public-api.pxi":44
 * cdef api object pyarrow_wrap_buffer(const shared_ptr[CBuffer]& buf):
 *     cdef Buffer result = Buffer.__new__(Buffer)
 *     result.init(buf)             # <<<<<<<<<<<<<<
 *     return result
 * 
*/
                      if (unlikely(((PyObject *)__pyx_v_result) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "init");
                        __PYX_ERR(21, 44, __pyx_L1_error)
                      }
                      ((struct __pyx_vtabstruct_7pyarrow_3lib_Buffer *)__pyx_v_result->__pyx_vtab)->init(__pyx_v_result, __pyx_v_buf); if (unlikely(PyErr_Occurred())) __PYX_ERR(21, 44, __pyx_L1_error)

                      /* "pyarrow/public-api.pxi":45
 *     cdef Buffer result = Buffer.__new__(Buffer)
 *     result.init(buf)
 *     return result             # <<<<<<<<<<<<<<
 * 
 * 
*/
                      __Pyx_XDECREF(__pyx_r);
                      __Pyx_INCREF((PyObject *)__pyx_v_result);
                      __pyx_r = ((PyObject *)__pyx_v_result);
                      goto __pyx_L0;

                      /* "pyarrow/public-api.pxi":42
 * 
 * 
 * cdef api object pyarrow_wrap_buffer(const shared_ptr[CBuffer]& buf):             # <<<<<<<<<<<<<<
 *     cdef Buffer result = Buffer.__new__(Buffer)
 *     result.init(buf)
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_AddTraceback("pyarrow.lib.pyarrow_wrap_buffer", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = 0;
                      __pyx_L0:;
                      __Pyx_XDECREF((PyObject *)__pyx_v_result);
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/public-api.pxi":48
 * 
 * 
 * cdef api object pyarrow_wrap_resizable_buffer(             # <<<<<<<<<<<<<<
 *         const shared_ptr[CResizableBuffer]& buf):
 *     cdef ResizableBuffer result = ResizableBuffer.__new__(ResizableBuffer)
*/

                    PyObject *pyarrow_wrap_resizable_buffer(std::shared_ptr< arrow::ResizableBuffer>  const &__pyx_v_buf) {
                      struct __pyx_obj_7pyarrow_3lib_ResizableBuffer *__pyx_v_result = 0;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("pyarrow_wrap_resizable_buffer", 0);

                      /* "pyarrow/public-api.pxi":50
 * cdef api object pyarrow_wrap_resizable_buffer(
 *         const shared_ptr[CResizableBuffer]& buf):
 *     cdef ResizableBuffer result = ResizableBuffer.__new__(ResizableBuffer)             # <<<<<<<<<<<<<<
 *     result.init_rz(buf)
 *     return result
*/
                      __pyx_t_1 = ((PyObject *)__pyx_tp_new_7pyarrow_3lib_ResizableBuffer(((PyTypeObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ResizableBuffer), __pyx_mstate_global->__pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 50, __pyx_L1_error)
                      __Pyx_GOTREF((PyObject *)__pyx_t_1);
                      __pyx_v_result = ((struct __pyx_obj_7pyarrow_3lib_ResizableBuffer *)__pyx_t_1);
                      __pyx_t_1 = 0;

                      /* "pyarrow/public-api.pxi":51
 *         const shared_ptr[CResizableBuffer]& buf):
 *     cdef ResizableBuffer result = ResizableBuffer.__new__(ResizableBuffer)
 *     result.init_rz(buf)             # <<<<<<<<<<<<<<
 *     return result
 * 
*/
                      if (unlikely(((PyObject *)__pyx_v_result) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "init_rz");
                        __PYX_ERR(21, 51, __pyx_L1_error)
                      }
                      ((struct __pyx_vtabstruct_7pyarrow_3lib_ResizableBuffer *)__pyx_v_result->__pyx_base.__pyx_vtab)->init_rz(__pyx_v_result, __pyx_v_buf); if (unlikely(PyErr_Occurred())) __PYX_ERR(21, 51, __pyx_L1_error)

                      /* "pyarrow/public-api.pxi":52
 *     cdef ResizableBuffer result = ResizableBuffer.__new__(ResizableBuffer)
 *     result.init_rz(buf)
 *     return result             # <<<<<<<<<<<<<<
 * 
 * 
*/
                      __Pyx_XDECREF(__pyx_r);
                      __Pyx_INCREF((PyObject *)__pyx_v_result);
                      __pyx_r = ((PyObject *)__pyx_v_result);
                      goto __pyx_L0;

                      /* "pyarrow/public-api.pxi":48
 * 
 * 
 * cdef api object pyarrow_wrap_resizable_buffer(             # <<<<<<<<<<<<<<
 *         const shared_ptr[CResizableBuffer]& buf):
 *     cdef ResizableBuffer result = ResizableBuffer.__new__(ResizableBuffer)
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_AddTraceback("pyarrow.lib.pyarrow_wrap_resizable_buffer", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = 0;
                      __pyx_L0:;
                      __Pyx_XDECREF((PyObject *)__pyx_v_result);
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/public-api.pxi":55
 * 
 * 
 * cdef api bint pyarrow_is_data_type(object type_):             # <<<<<<<<<<<<<<
 *     return isinstance(type_, DataType)
 * 
*/

                    static int __pyx_f_7pyarrow_3lib_pyarrow_is_data_type(PyObject *__pyx_v_type_) {
                      int __pyx_r;
                      int __pyx_t_1;

                      /* "pyarrow/public-api.pxi":56
 * 
 * cdef api bint pyarrow_is_data_type(object type_):
 *     return isinstance(type_, DataType)             # <<<<<<<<<<<<<<
 * 
 * 
*/
                      __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_type_, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType); 
                      __pyx_r = __pyx_t_1;
                      goto __pyx_L0;

                      /* "pyarrow/public-api.pxi":55
 * 
 * 
 * cdef api bint pyarrow_is_data_type(object type_):             # <<<<<<<<<<<<<<
 *     return isinstance(type_, DataType)
 * 
*/

                      /* function exit code */
                      __pyx_L0:;
                      return __pyx_r;
                    }

                    /* "pyarrow/public-api.pxi":59
 * 
 * 
 * cdef api shared_ptr[CDataType] pyarrow_unwrap_data_type(             # <<<<<<<<<<<<<<
 *         object data_type):
 *     cdef DataType type_
*/

                    std::shared_ptr< arrow::DataType>  pyarrow_unwrap_data_type(PyObject *__pyx_v_data_type) {
                      struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v_type_ = 0;
                      std::shared_ptr< arrow::DataType>  __pyx_r;
                      __Pyx_RefNannyDeclarations
                      int __pyx_t_1;
                      PyObject *__pyx_t_2 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("pyarrow_unwrap_data_type", 0);

                      /* "pyarrow/public-api.pxi":62
 *         object data_type):
 *     cdef DataType type_
 *     if pyarrow_is_data_type(data_type):             # <<<<<<<<<<<<<<
 *         type_ = <DataType>(data_type)
 *         return type_.sp_type
*/
                      __pyx_t_1 = __pyx_f_7pyarrow_3lib_pyarrow_is_data_type(__pyx_v_data_type); if (unlikely(__pyx_t_1 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(21, 62, __pyx_L1_error)
                      if (__pyx_t_1) {

                        /* "pyarrow/public-api.pxi":63
 *     cdef DataType type_
 *     if pyarrow_is_data_type(data_type):
 *         type_ = <DataType>(data_type)             # <<<<<<<<<<<<<<
 *         return type_.sp_type
 * 
*/
                        __pyx_t_2 = __pyx_v_data_type;
                        __Pyx_INCREF(__pyx_t_2);
                        __pyx_v_type_ = ((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_t_2);
                        __pyx_t_2 = 0;

                        /* "pyarrow/public-api.pxi":64
 *     if pyarrow_is_data_type(data_type):
 *         type_ = <DataType>(data_type)
 *         return type_.sp_type             # <<<<<<<<<<<<<<
 * 
 *     return shared_ptr[CDataType]()
*/
                        if (unlikely(((PyObject *)__pyx_v_type_) == Py_None)) {
                          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_type");
                          __PYX_ERR(21, 64, __pyx_L1_error)
                        }
                        __pyx_r = __pyx_v_type_->sp_type;
                        goto __pyx_L0;

                        /* "pyarrow/public-api.pxi":62
 *         object data_type):
 *     cdef DataType type_
 *     if pyarrow_is_data_type(data_type):             # <<<<<<<<<<<<<<
 *         type_ = <DataType>(data_type)
 *         return type_.sp_type
*/
                      }

                      /* "pyarrow/public-api.pxi":66
 *         return type_.sp_type
 * 
 *     return shared_ptr[CDataType]()             # <<<<<<<<<<<<<<
 * 
 * 
*/
                      __pyx_r = std::shared_ptr< arrow::DataType> ();
                      goto __pyx_L0;

                      /* "pyarrow/public-api.pxi":59
 * 
 * 
 * cdef api shared_ptr[CDataType] pyarrow_unwrap_data_type(             # <<<<<<<<<<<<<<
 *         object data_type):
 *     cdef DataType type_
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_AddTraceback("pyarrow.lib.pyarrow_unwrap_data_type", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_pretend_to_initialize(&__pyx_r);
                      __pyx_L0:;
                      __Pyx_XDECREF((PyObject *)__pyx_v_type_);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/public-api.pxi":74
 * 
 * 
 * cdef api object pyarrow_wrap_data_type(             # <<<<<<<<<<<<<<
 *         const shared_ptr[CDataType]& type):
 *     cdef:
*/

                    PyObject *pyarrow_wrap_data_type(std::shared_ptr< arrow::DataType>  const &__pyx_v_type) {
                       arrow::ExtensionType const *__pyx_v_ext_type;
                       arrow::py::PyExtensionType const *__pyx_v_cpy_ext_type;
                      struct __pyx_obj_7pyarrow_3lib_DataType *__pyx_v_out = 0;
                      std::string __pyx_v_extension_name;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_t_1;
                      PyObject *__pyx_t_2 = NULL;
                      __pyx_t_7pyarrow_3lib__CPyExtensionTypePtr __pyx_t_3;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("pyarrow_wrap_data_type", 0);

                      /* "pyarrow/public-api.pxi":81
 *         DataType out
 * 
 *     if type.get() == NULL:             # <<<<<<<<<<<<<<
 *         return None
 * 
*/
                      __pyx_t_1 = (__pyx_v_type.get() == NULL);
                      if (__pyx_t_1) {

                        /* "pyarrow/public-api.pxi":82
 * 
 *     if type.get() == NULL:
 *         return None             # <<<<<<<<<<<<<<
 * 
 *     if type.get().id() == _Type_DICTIONARY:
*/
                        __Pyx_XDECREF(__pyx_r);
                        __pyx_r = Py_None; __Pyx_INCREF(Py_None);
                        goto __pyx_L0;

                        /* "pyarrow/public-api.pxi":81
 *         DataType out
 * 
 *     if type.get() == NULL:             # <<<<<<<<<<<<<<
 *         return None
 * 
*/
                      }

                      /* "pyarrow/public-api.pxi":84
 *         return None
 * 
 *     if type.get().id() == _Type_DICTIONARY:             # <<<<<<<<<<<<<<
 *         out = DictionaryType.__new__(DictionaryType)
 *     elif type.get().id() == _Type_LIST:
*/
                      __pyx_t_1 = (__pyx_v_type.get()->id() ==  arrow::Type::DICTIONARY);
                      if (__pyx_t_1) {

                        /* "pyarrow/public-api.pxi":85
 * 
 *     if type.get().id() == _Type_DICTIONARY:
 *         out = DictionaryType.__new__(DictionaryType)             # <<<<<<<<<<<<<<
 *     elif type.get().id() == _Type_LIST:
 *         out = ListType.__new__(ListType)
*/
                        __pyx_t_2 = ((PyObject *)__pyx_tp_new_7pyarrow_3lib_DictionaryType(((PyTypeObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DictionaryType), __pyx_mstate_global->__pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 85, __pyx_L1_error)
                        __Pyx_GOTREF((PyObject *)__pyx_t_2);
                        if (!(likely(__Pyx_TypeTest(((PyObject *)__pyx_t_2), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType)))) __PYX_ERR(21, 85, __pyx_L1_error)
                        __pyx_v_out = ((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_t_2);
                        __pyx_t_2 = 0;

                        /* "pyarrow/public-api.pxi":84
 *         return None
 * 
 *     if type.get().id() == _Type_DICTIONARY:             # <<<<<<<<<<<<<<
 *         out = DictionaryType.__new__(DictionaryType)
 *     elif type.get().id() == _Type_LIST:
*/
                        goto __pyx_L4;
                      }

                      /* "pyarrow/public-api.pxi":86
 *     if type.get().id() == _Type_DICTIONARY:
 *         out = DictionaryType.__new__(DictionaryType)
 *     elif type.get().id() == _Type_LIST:             # <<<<<<<<<<<<<<
 *         out = ListType.__new__(ListType)
 *     elif type.get().id() == _Type_LARGE_LIST:
*/
                      __pyx_t_1 = (__pyx_v_type.get()->id() ==  arrow::Type::LIST);
                      if (__pyx_t_1) {

                        /* "pyarrow/public-api.pxi":87
 *         out = DictionaryType.__new__(DictionaryType)
 *     elif type.get().id() == _Type_LIST:
 *         out = ListType.__new__(ListType)             # <<<<<<<<<<<<<<
 *     elif type.get().id() == _Type_LARGE_LIST:
 *         out = LargeListType.__new__(LargeListType)
*/
                        __pyx_t_2 = ((PyObject *)__pyx_tp_new_7pyarrow_3lib_ListType(((PyTypeObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ListType), __pyx_mstate_global->__pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 87, __pyx_L1_error)
                        __Pyx_GOTREF((PyObject *)__pyx_t_2);
                        if (!(likely(__Pyx_TypeTest(((PyObject *)__pyx_t_2), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType)))) __PYX_ERR(21, 87, __pyx_L1_error)
                        __pyx_v_out = ((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_t_2);
                        __pyx_t_2 = 0;

                        /* "pyarrow/public-api.pxi":86
 *     if type.get().id() == _Type_DICTIONARY:
 *         out = DictionaryType.__new__(DictionaryType)
 *     elif type.get().id() == _Type_LIST:             # <<<<<<<<<<<<<<
 *         out = ListType.__new__(ListType)
 *     elif type.get().id() == _Type_LARGE_LIST:
*/
                        goto __pyx_L4;
                      }

                      /* "pyarrow/public-api.pxi":88
 *     elif type.get().id() == _Type_LIST:
 *         out = ListType.__new__(ListType)
 *     elif type.get().id() == _Type_LARGE_LIST:             # <<<<<<<<<<<<<<
 *         out = LargeListType.__new__(LargeListType)
 *     elif type.get().id() == _Type_LIST_VIEW:
*/
                      __pyx_t_1 = (__pyx_v_type.get()->id() ==  arrow::Type::LARGE_LIST);
                      if (__pyx_t_1) {

                        /* "pyarrow/public-api.pxi":89
 *         out = ListType.__new__(ListType)
 *     elif type.get().id() == _Type_LARGE_LIST:
 *         out = LargeListType.__new__(LargeListType)             # <<<<<<<<<<<<<<
 *     elif type.get().id() == _Type_LIST_VIEW:
 *         out = ListViewType.__new__(ListViewType)
*/
                        __pyx_t_2 = ((PyObject *)__pyx_tp_new_7pyarrow_3lib_LargeListType(((PyTypeObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_LargeListType), __pyx_mstate_global->__pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 89, __pyx_L1_error)
                        __Pyx_GOTREF((PyObject *)__pyx_t_2);
                        if (!(likely(__Pyx_TypeTest(((PyObject *)__pyx_t_2), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType)))) __PYX_ERR(21, 89, __pyx_L1_error)
                        __pyx_v_out = ((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_t_2);
                        __pyx_t_2 = 0;

                        /* "pyarrow/public-api.pxi":88
 *     elif type.get().id() == _Type_LIST:
 *         out = ListType.__new__(ListType)
 *     elif type.get().id() == _Type_LARGE_LIST:             # <<<<<<<<<<<<<<
 *         out = LargeListType.__new__(LargeListType)
 *     elif type.get().id() == _Type_LIST_VIEW:
*/
                        goto __pyx_L4;
                      }

                      /* "pyarrow/public-api.pxi":90
 *     elif type.get().id() == _Type_LARGE_LIST:
 *         out = LargeListType.__new__(LargeListType)
 *     elif type.get().id() == _Type_LIST_VIEW:             # <<<<<<<<<<<<<<
 *         out = ListViewType.__new__(ListViewType)
 *     elif type.get().id() == _Type_LARGE_LIST_VIEW:
*/
                      __pyx_t_1 = (__pyx_v_type.get()->id() ==  arrow::Type::LIST_VIEW);
                      if (__pyx_t_1) {

                        /* "pyarrow/public-api.pxi":91
 *         out = LargeListType.__new__(LargeListType)
 *     elif type.get().id() == _Type_LIST_VIEW:
 *         out = ListViewType.__new__(ListViewType)             # <<<<<<<<<<<<<<
 *     elif type.get().id() == _Type_LARGE_LIST_VIEW:
 *         out = LargeListViewType.__new__(LargeListViewType)
*/
                        __pyx_t_2 = ((PyObject *)__pyx_tp_new_7pyarrow_3lib_ListViewType(((PyTypeObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ListViewType), __pyx_mstate_global->__pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 91, __pyx_L1_error)
                        __Pyx_GOTREF((PyObject *)__pyx_t_2);
                        if (!(likely(__Pyx_TypeTest(((PyObject *)__pyx_t_2), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType)))) __PYX_ERR(21, 91, __pyx_L1_error)
                        __pyx_v_out = ((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_t_2);
                        __pyx_t_2 = 0;

                        /* "pyarrow/public-api.pxi":90
 *     elif type.get().id() == _Type_LARGE_LIST:
 *         out = LargeListType.__new__(LargeListType)
 *     elif type.get().id() == _Type_LIST_VIEW:             # <<<<<<<<<<<<<<
 *         out = ListViewType.__new__(ListViewType)
 *     elif type.get().id() == _Type_LARGE_LIST_VIEW:
*/
                        goto __pyx_L4;
                      }

                      /* "pyarrow/public-api.pxi":92
 *     elif type.get().id() == _Type_LIST_VIEW:
 *         out = ListViewType.__new__(ListViewType)
 *     elif type.get().id() == _Type_LARGE_LIST_VIEW:             # <<<<<<<<<<<<<<
 *         out = LargeListViewType.__new__(LargeListViewType)
 *     elif type.get().id() == _Type_MAP:
*/
                      __pyx_t_1 = (__pyx_v_type.get()->id() ==  arrow::Type::LARGE_LIST_VIEW);
                      if (__pyx_t_1) {

                        /* "pyarrow/public-api.pxi":93
 *         out = ListViewType.__new__(ListViewType)
 *     elif type.get().id() == _Type_LARGE_LIST_VIEW:
 *         out = LargeListViewType.__new__(LargeListViewType)             # <<<<<<<<<<<<<<
 *     elif type.get().id() == _Type_MAP:
 *         out = MapType.__new__(MapType)
*/
                        __pyx_t_2 = ((PyObject *)__pyx_tp_new_7pyarrow_3lib_LargeListViewType(((PyTypeObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_LargeListViewType), __pyx_mstate_global->__pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 93, __pyx_L1_error)
                        __Pyx_GOTREF((PyObject *)__pyx_t_2);
                        if (!(likely(__Pyx_TypeTest(((PyObject *)__pyx_t_2), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType)))) __PYX_ERR(21, 93, __pyx_L1_error)
                        __pyx_v_out = ((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_t_2);
                        __pyx_t_2 = 0;

                        /* "pyarrow/public-api.pxi":92
 *     elif type.get().id() == _Type_LIST_VIEW:
 *         out = ListViewType.__new__(ListViewType)
 *     elif type.get().id() == _Type_LARGE_LIST_VIEW:             # <<<<<<<<<<<<<<
 *         out = LargeListViewType.__new__(LargeListViewType)
 *     elif type.get().id() == _Type_MAP:
*/
                        goto __pyx_L4;
                      }

                      /* "pyarrow/public-api.pxi":94
 *     elif type.get().id() == _Type_LARGE_LIST_VIEW:
 *         out = LargeListViewType.__new__(LargeListViewType)
 *     elif type.get().id() == _Type_MAP:             # <<<<<<<<<<<<<<
 *         out = MapType.__new__(MapType)
 *     elif type.get().id() == _Type_FIXED_SIZE_LIST:
*/
                      __pyx_t_1 = (__pyx_v_type.get()->id() ==  arrow::Type::MAP);
                      if (__pyx_t_1) {

                        /* "pyarrow/public-api.pxi":95
 *         out = LargeListViewType.__new__(LargeListViewType)
 *     elif type.get().id() == _Type_MAP:
 *         out = MapType.__new__(MapType)             # <<<<<<<<<<<<<<
 *     elif type.get().id() == _Type_FIXED_SIZE_LIST:
 *         out = FixedSizeListType.__new__(FixedSizeListType)
*/
                        __pyx_t_2 = ((PyObject *)__pyx_tp_new_7pyarrow_3lib_MapType(((PyTypeObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_MapType), __pyx_mstate_global->__pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 95, __pyx_L1_error)
                        __Pyx_GOTREF((PyObject *)__pyx_t_2);
                        if (!(likely(__Pyx_TypeTest(((PyObject *)__pyx_t_2), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType)))) __PYX_ERR(21, 95, __pyx_L1_error)
                        __pyx_v_out = ((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_t_2);
                        __pyx_t_2 = 0;

                        /* "pyarrow/public-api.pxi":94
 *     elif type.get().id() == _Type_LARGE_LIST_VIEW:
 *         out = LargeListViewType.__new__(LargeListViewType)
 *     elif type.get().id() == _Type_MAP:             # <<<<<<<<<<<<<<
 *         out = MapType.__new__(MapType)
 *     elif type.get().id() == _Type_FIXED_SIZE_LIST:
*/
                        goto __pyx_L4;
                      }

                      /* "pyarrow/public-api.pxi":96
 *     elif type.get().id() == _Type_MAP:
 *         out = MapType.__new__(MapType)
 *     elif type.get().id() == _Type_FIXED_SIZE_LIST:             # <<<<<<<<<<<<<<
 *         out = FixedSizeListType.__new__(FixedSizeListType)
 *     elif type.get().id() == _Type_STRUCT:
*/
                      __pyx_t_1 = (__pyx_v_type.get()->id() ==  arrow::Type::FIXED_SIZE_LIST);
                      if (__pyx_t_1) {

                        /* "pyarrow/public-api.pxi":97
 *         out = MapType.__new__(MapType)
 *     elif type.get().id() == _Type_FIXED_SIZE_LIST:
 *         out = FixedSizeListType.__new__(FixedSizeListType)             # <<<<<<<<<<<<<<
 *     elif type.get().id() == _Type_STRUCT:
 *         out = StructType.__new__(StructType)
*/
                        __pyx_t_2 = ((PyObject *)__pyx_tp_new_7pyarrow_3lib_FixedSizeListType(((PyTypeObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_FixedSizeListType), __pyx_mstate_global->__pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 97, __pyx_L1_error)
                        __Pyx_GOTREF((PyObject *)__pyx_t_2);
                        if (!(likely(__Pyx_TypeTest(((PyObject *)__pyx_t_2), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType)))) __PYX_ERR(21, 97, __pyx_L1_error)
                        __pyx_v_out = ((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_t_2);
                        __pyx_t_2 = 0;

                        /* "pyarrow/public-api.pxi":96
 *     elif type.get().id() == _Type_MAP:
 *         out = MapType.__new__(MapType)
 *     elif type.get().id() == _Type_FIXED_SIZE_LIST:             # <<<<<<<<<<<<<<
 *         out = FixedSizeListType.__new__(FixedSizeListType)
 *     elif type.get().id() == _Type_STRUCT:
*/
                        goto __pyx_L4;
                      }

                      /* "pyarrow/public-api.pxi":98
 *     elif type.get().id() == _Type_FIXED_SIZE_LIST:
 *         out = FixedSizeListType.__new__(FixedSizeListType)
 *     elif type.get().id() == _Type_STRUCT:             # <<<<<<<<<<<<<<
 *         out = StructType.__new__(StructType)
 *     elif type.get().id() == _Type_SPARSE_UNION:
*/
                      __pyx_t_1 = (__pyx_v_type.get()->id() ==  arrow::Type::STRUCT);
                      if (__pyx_t_1) {

                        /* "pyarrow/public-api.pxi":99
 *         out = FixedSizeListType.__new__(FixedSizeListType)
 *     elif type.get().id() == _Type_STRUCT:
 *         out = StructType.__new__(StructType)             # <<<<<<<<<<<<<<
 *     elif type.get().id() == _Type_SPARSE_UNION:
 *         out = SparseUnionType.__new__(SparseUnionType)
*/
                        __pyx_t_2 = ((PyObject *)__pyx_tp_new_7pyarrow_3lib_StructType(((PyTypeObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_StructType), __pyx_mstate_global->__pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 99, __pyx_L1_error)
                        __Pyx_GOTREF((PyObject *)__pyx_t_2);
                        if (!(likely(__Pyx_TypeTest(((PyObject *)__pyx_t_2), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType)))) __PYX_ERR(21, 99, __pyx_L1_error)
                        __pyx_v_out = ((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_t_2);
                        __pyx_t_2 = 0;

                        /* "pyarrow/public-api.pxi":98
 *     elif type.get().id() == _Type_FIXED_SIZE_LIST:
 *         out = FixedSizeListType.__new__(FixedSizeListType)
 *     elif type.get().id() == _Type_STRUCT:             # <<<<<<<<<<<<<<
 *         out = StructType.__new__(StructType)
 *     elif type.get().id() == _Type_SPARSE_UNION:
*/
                        goto __pyx_L4;
                      }

                      /* "pyarrow/public-api.pxi":100
 *     elif type.get().id() == _Type_STRUCT:
 *         out = StructType.__new__(StructType)
 *     elif type.get().id() == _Type_SPARSE_UNION:             # <<<<<<<<<<<<<<
 *         out = SparseUnionType.__new__(SparseUnionType)
 *     elif type.get().id() == _Type_DENSE_UNION:
*/
                      __pyx_t_1 = (__pyx_v_type.get()->id() ==  arrow::Type::SPARSE_UNION);
                      if (__pyx_t_1) {

                        /* "pyarrow/public-api.pxi":101
 *         out = StructType.__new__(StructType)
 *     elif type.get().id() == _Type_SPARSE_UNION:
 *         out = SparseUnionType.__new__(SparseUnionType)             # <<<<<<<<<<<<<<
 *     elif type.get().id() == _Type_DENSE_UNION:
 *         out = DenseUnionType.__new__(DenseUnionType)
*/
                        __pyx_t_2 = ((PyObject *)__pyx_tp_new_7pyarrow_3lib_SparseUnionType(((PyTypeObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_SparseUnionType), __pyx_mstate_global->__pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 101, __pyx_L1_error)
                        __Pyx_GOTREF((PyObject *)__pyx_t_2);
                        if (!(likely(__Pyx_TypeTest(((PyObject *)__pyx_t_2), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType)))) __PYX_ERR(21, 101, __pyx_L1_error)
                        __pyx_v_out = ((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_t_2);
                        __pyx_t_2 = 0;

                        /* "pyarrow/public-api.pxi":100
 *     elif type.get().id() == _Type_STRUCT:
 *         out = StructType.__new__(StructType)
 *     elif type.get().id() == _Type_SPARSE_UNION:             # <<<<<<<<<<<<<<
 *         out = SparseUnionType.__new__(SparseUnionType)
 *     elif type.get().id() == _Type_DENSE_UNION:
*/
                        goto __pyx_L4;
                      }

                      /* "pyarrow/public-api.pxi":102
 *     elif type.get().id() == _Type_SPARSE_UNION:
 *         out = SparseUnionType.__new__(SparseUnionType)
 *     elif type.get().id() == _Type_DENSE_UNION:             # <<<<<<<<<<<<<<
 *         out = DenseUnionType.__new__(DenseUnionType)
 *     elif type.get().id() == _Type_TIME32:
*/
                      __pyx_t_1 = (__pyx_v_type.get()->id() ==  arrow::Type::DENSE_UNION);
                      if (__pyx_t_1) {

                        /* "pyarrow/public-api.pxi":103
 *         out = SparseUnionType.__new__(SparseUnionType)
 *     elif type.get().id() == _Type_DENSE_UNION:
 *         out = DenseUnionType.__new__(DenseUnionType)             # <<<<<<<<<<<<<<
 *     elif type.get().id() == _Type_TIME32:
 *         out = Time32Type.__new__(Time32Type)
*/
                        __pyx_t_2 = ((PyObject *)__pyx_tp_new_7pyarrow_3lib_DenseUnionType(((PyTypeObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DenseUnionType), __pyx_mstate_global->__pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 103, __pyx_L1_error)
                        __Pyx_GOTREF((PyObject *)__pyx_t_2);
                        if (!(likely(__Pyx_TypeTest(((PyObject *)__pyx_t_2), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType)))) __PYX_ERR(21, 103, __pyx_L1_error)
                        __pyx_v_out = ((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_t_2);
                        __pyx_t_2 = 0;

                        /* "pyarrow/public-api.pxi":102
 *     elif type.get().id() == _Type_SPARSE_UNION:
 *         out = SparseUnionType.__new__(SparseUnionType)
 *     elif type.get().id() == _Type_DENSE_UNION:             # <<<<<<<<<<<<<<
 *         out = DenseUnionType.__new__(DenseUnionType)
 *     elif type.get().id() == _Type_TIME32:
*/
                        goto __pyx_L4;
                      }

                      /* "pyarrow/public-api.pxi":104
 *     elif type.get().id() == _Type_DENSE_UNION:
 *         out = DenseUnionType.__new__(DenseUnionType)
 *     elif type.get().id() == _Type_TIME32:             # <<<<<<<<<<<<<<
 *         out = Time32Type.__new__(Time32Type)
 *     elif type.get().id() == _Type_TIME64:
*/
                      __pyx_t_1 = (__pyx_v_type.get()->id() ==  arrow::Type::TIME32);
                      if (__pyx_t_1) {

                        /* "pyarrow/public-api.pxi":105
 *         out = DenseUnionType.__new__(DenseUnionType)
 *     elif type.get().id() == _Type_TIME32:
 *         out = Time32Type.__new__(Time32Type)             # <<<<<<<<<<<<<<
 *     elif type.get().id() == _Type_TIME64:
 *         out = Time64Type.__new__(Time64Type)
*/
                        __pyx_t_2 = ((PyObject *)__pyx_tp_new_7pyarrow_3lib_Time32Type(((PyTypeObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Time32Type), __pyx_mstate_global->__pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 105, __pyx_L1_error)
                        __Pyx_GOTREF((PyObject *)__pyx_t_2);
                        if (!(likely(__Pyx_TypeTest(((PyObject *)__pyx_t_2), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType)))) __PYX_ERR(21, 105, __pyx_L1_error)
                        __pyx_v_out = ((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_t_2);
                        __pyx_t_2 = 0;

                        /* "pyarrow/public-api.pxi":104
 *     elif type.get().id() == _Type_DENSE_UNION:
 *         out = DenseUnionType.__new__(DenseUnionType)
 *     elif type.get().id() == _Type_TIME32:             # <<<<<<<<<<<<<<
 *         out = Time32Type.__new__(Time32Type)
 *     elif type.get().id() == _Type_TIME64:
*/
                        goto __pyx_L4;
                      }

                      /* "pyarrow/public-api.pxi":106
 *     elif type.get().id() == _Type_TIME32:
 *         out = Time32Type.__new__(Time32Type)
 *     elif type.get().id() == _Type_TIME64:             # <<<<<<<<<<<<<<
 *         out = Time64Type.__new__(Time64Type)
 *     elif type.get().id() == _Type_TIMESTAMP:
*/
                      __pyx_t_1 = (__pyx_v_type.get()->id() ==  arrow::Type::TIME64);
                      if (__pyx_t_1) {

                        /* "pyarrow/public-api.pxi":107
 *         out = Time32Type.__new__(Time32Type)
 *     elif type.get().id() == _Type_TIME64:
 *         out = Time64Type.__new__(Time64Type)             # <<<<<<<<<<<<<<
 *     elif type.get().id() == _Type_TIMESTAMP:
 *         out = TimestampType.__new__(TimestampType)
*/
                        __pyx_t_2 = ((PyObject *)__pyx_tp_new_7pyarrow_3lib_Time64Type(((PyTypeObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Time64Type), __pyx_mstate_global->__pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 107, __pyx_L1_error)
                        __Pyx_GOTREF((PyObject *)__pyx_t_2);
                        if (!(likely(__Pyx_TypeTest(((PyObject *)__pyx_t_2), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType)))) __PYX_ERR(21, 107, __pyx_L1_error)
                        __pyx_v_out = ((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_t_2);
                        __pyx_t_2 = 0;

                        /* "pyarrow/public-api.pxi":106
 *     elif type.get().id() == _Type_TIME32:
 *         out = Time32Type.__new__(Time32Type)
 *     elif type.get().id() == _Type_TIME64:             # <<<<<<<<<<<<<<
 *         out = Time64Type.__new__(Time64Type)
 *     elif type.get().id() == _Type_TIMESTAMP:
*/
                        goto __pyx_L4;
                      }

                      /* "pyarrow/public-api.pxi":108
 *     elif type.get().id() == _Type_TIME64:
 *         out = Time64Type.__new__(Time64Type)
 *     elif type.get().id() == _Type_TIMESTAMP:             # <<<<<<<<<<<<<<
 *         out = TimestampType.__new__(TimestampType)
 *     elif type.get().id() == _Type_DURATION:
*/
                      __pyx_t_1 = (__pyx_v_type.get()->id() ==  arrow::Type::TIMESTAMP);
                      if (__pyx_t_1) {

                        /* "pyarrow/public-api.pxi":109
 *         out = Time64Type.__new__(Time64Type)
 *     elif type.get().id() == _Type_TIMESTAMP:
 *         out = TimestampType.__new__(TimestampType)             # <<<<<<<<<<<<<<
 *     elif type.get().id() == _Type_DURATION:
 *         out = DurationType.__new__(DurationType)
*/
                        __pyx_t_2 = ((PyObject *)__pyx_tp_new_7pyarrow_3lib_TimestampType(((PyTypeObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_TimestampType), __pyx_mstate_global->__pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 109, __pyx_L1_error)
                        __Pyx_GOTREF((PyObject *)__pyx_t_2);
                        if (!(likely(__Pyx_TypeTest(((PyObject *)__pyx_t_2), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType)))) __PYX_ERR(21, 109, __pyx_L1_error)
                        __pyx_v_out = ((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_t_2);
                        __pyx_t_2 = 0;

                        /* "pyarrow/public-api.pxi":108
 *     elif type.get().id() == _Type_TIME64:
 *         out = Time64Type.__new__(Time64Type)
 *     elif type.get().id() == _Type_TIMESTAMP:             # <<<<<<<<<<<<<<
 *         out = TimestampType.__new__(TimestampType)
 *     elif type.get().id() == _Type_DURATION:
*/
                        goto __pyx_L4;
                      }

                      /* "pyarrow/public-api.pxi":110
 *     elif type.get().id() == _Type_TIMESTAMP:
 *         out = TimestampType.__new__(TimestampType)
 *     elif type.get().id() == _Type_DURATION:             # <<<<<<<<<<<<<<
 *         out = DurationType.__new__(DurationType)
 *     elif type.get().id() == _Type_FIXED_SIZE_BINARY:
*/
                      __pyx_t_1 = (__pyx_v_type.get()->id() ==  arrow::Type::DURATION);
                      if (__pyx_t_1) {

                        /* "pyarrow/public-api.pxi":111
 *         out = TimestampType.__new__(TimestampType)
 *     elif type.get().id() == _Type_DURATION:
 *         out = DurationType.__new__(DurationType)             # <<<<<<<<<<<<<<
 *     elif type.get().id() == _Type_FIXED_SIZE_BINARY:
 *         out = FixedSizeBinaryType.__new__(FixedSizeBinaryType)
*/
                        __pyx_t_2 = ((PyObject *)__pyx_tp_new_7pyarrow_3lib_DurationType(((PyTypeObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DurationType), __pyx_mstate_global->__pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 111, __pyx_L1_error)
                        __Pyx_GOTREF((PyObject *)__pyx_t_2);
                        if (!(likely(__Pyx_TypeTest(((PyObject *)__pyx_t_2), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType)))) __PYX_ERR(21, 111, __pyx_L1_error)
                        __pyx_v_out = ((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_t_2);
                        __pyx_t_2 = 0;

                        /* "pyarrow/public-api.pxi":110
 *     elif type.get().id() == _Type_TIMESTAMP:
 *         out = TimestampType.__new__(TimestampType)
 *     elif type.get().id() == _Type_DURATION:             # <<<<<<<<<<<<<<
 *         out = DurationType.__new__(DurationType)
 *     elif type.get().id() == _Type_FIXED_SIZE_BINARY:
*/
                        goto __pyx_L4;
                      }

                      /* "pyarrow/public-api.pxi":112
 *     elif type.get().id() == _Type_DURATION:
 *         out = DurationType.__new__(DurationType)
 *     elif type.get().id() == _Type_FIXED_SIZE_BINARY:             # <<<<<<<<<<<<<<
 *         out = FixedSizeBinaryType.__new__(FixedSizeBinaryType)
 *     elif type.get().id() == _Type_DECIMAL32:
*/
                      __pyx_t_1 = (__pyx_v_type.get()->id() ==  arrow::Type::FIXED_SIZE_BINARY);
                      if (__pyx_t_1) {

                        /* "pyarrow/public-api.pxi":113
 *         out = DurationType.__new__(DurationType)
 *     elif type.get().id() == _Type_FIXED_SIZE_BINARY:
 *         out = FixedSizeBinaryType.__new__(FixedSizeBinaryType)             # <<<<<<<<<<<<<<
 *     elif type.get().id() == _Type_DECIMAL32:
 *         out = Decimal32Type.__new__(Decimal32Type)
*/
                        __pyx_t_2 = ((PyObject *)__pyx_tp_new_7pyarrow_3lib_FixedSizeBinaryType(((PyTypeObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_FixedSizeBinaryType), __pyx_mstate_global->__pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 113, __pyx_L1_error)
                        __Pyx_GOTREF((PyObject *)__pyx_t_2);
                        if (!(likely(__Pyx_TypeTest(((PyObject *)__pyx_t_2), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType)))) __PYX_ERR(21, 113, __pyx_L1_error)
                        __pyx_v_out = ((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_t_2);
                        __pyx_t_2 = 0;

                        /* "pyarrow/public-api.pxi":112
 *     elif type.get().id() == _Type_DURATION:
 *         out = DurationType.__new__(DurationType)
 *     elif type.get().id() == _Type_FIXED_SIZE_BINARY:             # <<<<<<<<<<<<<<
 *         out = FixedSizeBinaryType.__new__(FixedSizeBinaryType)
 *     elif type.get().id() == _Type_DECIMAL32:
*/
                        goto __pyx_L4;
                      }

                      /* "pyarrow/public-api.pxi":114
 *     elif type.get().id() == _Type_FIXED_SIZE_BINARY:
 *         out = FixedSizeBinaryType.__new__(FixedSizeBinaryType)
 *     elif type.get().id() == _Type_DECIMAL32:             # <<<<<<<<<<<<<<
 *         out = Decimal32Type.__new__(Decimal32Type)
 *     elif type.get().id() == _Type_DECIMAL64:
*/
                      __pyx_t_1 = (__pyx_v_type.get()->id() ==  arrow::Type::DECIMAL32);
                      if (__pyx_t_1) {

                        /* "pyarrow/public-api.pxi":115
 *         out = FixedSizeBinaryType.__new__(FixedSizeBinaryType)
 *     elif type.get().id() == _Type_DECIMAL32:
 *         out = Decimal32Type.__new__(Decimal32Type)             # <<<<<<<<<<<<<<
 *     elif type.get().id() == _Type_DECIMAL64:
 *         out = Decimal64Type.__new__(Decimal64Type)
*/
                        __pyx_t_2 = ((PyObject *)__pyx_tp_new_7pyarrow_3lib_Decimal32Type(((PyTypeObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Decimal32Type), __pyx_mstate_global->__pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 115, __pyx_L1_error)
                        __Pyx_GOTREF((PyObject *)__pyx_t_2);
                        if (!(likely(__Pyx_TypeTest(((PyObject *)__pyx_t_2), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType)))) __PYX_ERR(21, 115, __pyx_L1_error)
                        __pyx_v_out = ((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_t_2);
                        __pyx_t_2 = 0;

                        /* "pyarrow/public-api.pxi":114
 *     elif type.get().id() == _Type_FIXED_SIZE_BINARY:
 *         out = FixedSizeBinaryType.__new__(FixedSizeBinaryType)
 *     elif type.get().id() == _Type_DECIMAL32:             # <<<<<<<<<<<<<<
 *         out = Decimal32Type.__new__(Decimal32Type)
 *     elif type.get().id() == _Type_DECIMAL64:
*/
                        goto __pyx_L4;
                      }

                      /* "pyarrow/public-api.pxi":116
 *     elif type.get().id() == _Type_DECIMAL32:
 *         out = Decimal32Type.__new__(Decimal32Type)
 *     elif type.get().id() == _Type_DECIMAL64:             # <<<<<<<<<<<<<<
 *         out = Decimal64Type.__new__(Decimal64Type)
 *     elif type.get().id() == _Type_DECIMAL128:
*/
                      __pyx_t_1 = (__pyx_v_type.get()->id() ==  arrow::Type::DECIMAL64);
                      if (__pyx_t_1) {

                        /* "pyarrow/public-api.pxi":117
 *         out = Decimal32Type.__new__(Decimal32Type)
 *     elif type.get().id() == _Type_DECIMAL64:
 *         out = Decimal64Type.__new__(Decimal64Type)             # <<<<<<<<<<<<<<
 *     elif type.get().id() == _Type_DECIMAL128:
 *         out = Decimal128Type.__new__(Decimal128Type)
*/
                        __pyx_t_2 = ((PyObject *)__pyx_tp_new_7pyarrow_3lib_Decimal64Type(((PyTypeObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Decimal64Type), __pyx_mstate_global->__pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 117, __pyx_L1_error)
                        __Pyx_GOTREF((PyObject *)__pyx_t_2);
                        if (!(likely(__Pyx_TypeTest(((PyObject *)__pyx_t_2), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType)))) __PYX_ERR(21, 117, __pyx_L1_error)
                        __pyx_v_out = ((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_t_2);
                        __pyx_t_2 = 0;

                        /* "pyarrow/public-api.pxi":116
 *     elif type.get().id() == _Type_DECIMAL32:
 *         out = Decimal32Type.__new__(Decimal32Type)
 *     elif type.get().id() == _Type_DECIMAL64:             # <<<<<<<<<<<<<<
 *         out = Decimal64Type.__new__(Decimal64Type)
 *     elif type.get().id() == _Type_DECIMAL128:
*/
                        goto __pyx_L4;
                      }

                      /* "pyarrow/public-api.pxi":118
 *     elif type.get().id() == _Type_DECIMAL64:
 *         out = Decimal64Type.__new__(Decimal64Type)
 *     elif type.get().id() == _Type_DECIMAL128:             # <<<<<<<<<<<<<<
 *         out = Decimal128Type.__new__(Decimal128Type)
 *     elif type.get().id() == _Type_DECIMAL256:
*/
                      __pyx_t_1 = (__pyx_v_type.get()->id() ==  arrow::Type::DECIMAL128);
                      if (__pyx_t_1) {

                        /* "pyarrow/public-api.pxi":119
 *         out = Decimal64Type.__new__(Decimal64Type)
 *     elif type.get().id() == _Type_DECIMAL128:
 *         out = Decimal128Type.__new__(Decimal128Type)             # <<<<<<<<<<<<<<
 *     elif type.get().id() == _Type_DECIMAL256:
 *         out = Decimal256Type.__new__(Decimal256Type)
*/
                        __pyx_t_2 = ((PyObject *)__pyx_tp_new_7pyarrow_3lib_Decimal128Type(((PyTypeObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Decimal128Type), __pyx_mstate_global->__pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 119, __pyx_L1_error)
                        __Pyx_GOTREF((PyObject *)__pyx_t_2);
                        if (!(likely(__Pyx_TypeTest(((PyObject *)__pyx_t_2), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType)))) __PYX_ERR(21, 119, __pyx_L1_error)
                        __pyx_v_out = ((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_t_2);
                        __pyx_t_2 = 0;

                        /* "pyarrow/public-api.pxi":118
 *     elif type.get().id() == _Type_DECIMAL64:
 *         out = Decimal64Type.__new__(Decimal64Type)
 *     elif type.get().id() == _Type_DECIMAL128:             # <<<<<<<<<<<<<<
 *         out = Decimal128Type.__new__(Decimal128Type)
 *     elif type.get().id() == _Type_DECIMAL256:
*/
                        goto __pyx_L4;
                      }

                      /* "pyarrow/public-api.pxi":120
 *     elif type.get().id() == _Type_DECIMAL128:
 *         out = Decimal128Type.__new__(Decimal128Type)
 *     elif type.get().id() == _Type_DECIMAL256:             # <<<<<<<<<<<<<<
 *         out = Decimal256Type.__new__(Decimal256Type)
 *     elif type.get().id() == _Type_RUN_END_ENCODED:
*/
                      __pyx_t_1 = (__pyx_v_type.get()->id() ==  arrow::Type::DECIMAL256);
                      if (__pyx_t_1) {

                        /* "pyarrow/public-api.pxi":121
 *         out = Decimal128Type.__new__(Decimal128Type)
 *     elif type.get().id() == _Type_DECIMAL256:
 *         out = Decimal256Type.__new__(Decimal256Type)             # <<<<<<<<<<<<<<
 *     elif type.get().id() == _Type_RUN_END_ENCODED:
 *         out = RunEndEncodedType.__new__(RunEndEncodedType)
*/
                        __pyx_t_2 = ((PyObject *)__pyx_tp_new_7pyarrow_3lib_Decimal256Type(((PyTypeObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Decimal256Type), __pyx_mstate_global->__pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 121, __pyx_L1_error)
                        __Pyx_GOTREF((PyObject *)__pyx_t_2);
                        if (!(likely(__Pyx_TypeTest(((PyObject *)__pyx_t_2), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType)))) __PYX_ERR(21, 121, __pyx_L1_error)
                        __pyx_v_out = ((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_t_2);
                        __pyx_t_2 = 0;

                        /* "pyarrow/public-api.pxi":120
 *     elif type.get().id() == _Type_DECIMAL128:
 *         out = Decimal128Type.__new__(Decimal128Type)
 *     elif type.get().id() == _Type_DECIMAL256:             # <<<<<<<<<<<<<<
 *         out = Decimal256Type.__new__(Decimal256Type)
 *     elif type.get().id() == _Type_RUN_END_ENCODED:
*/
                        goto __pyx_L4;
                      }

                      /* "pyarrow/public-api.pxi":122
 *     elif type.get().id() == _Type_DECIMAL256:
 *         out = Decimal256Type.__new__(Decimal256Type)
 *     elif type.get().id() == _Type_RUN_END_ENCODED:             # <<<<<<<<<<<<<<
 *         out = RunEndEncodedType.__new__(RunEndEncodedType)
 *     elif type.get().id() == _Type_EXTENSION:
*/
                      __pyx_t_1 = (__pyx_v_type.get()->id() ==  arrow::Type::RUN_END_ENCODED);
                      if (__pyx_t_1) {

                        /* "pyarrow/public-api.pxi":123
 *         out = Decimal256Type.__new__(Decimal256Type)
 *     elif type.get().id() == _Type_RUN_END_ENCODED:
 *         out = RunEndEncodedType.__new__(RunEndEncodedType)             # <<<<<<<<<<<<<<
 *     elif type.get().id() == _Type_EXTENSION:
 *         ext_type = <const CExtensionType*> type.get()
*/
                        __pyx_t_2 = ((PyObject *)__pyx_tp_new_7pyarrow_3lib_RunEndEncodedType(((PyTypeObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RunEndEncodedType), __pyx_mstate_global->__pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 123, __pyx_L1_error)
                        __Pyx_GOTREF((PyObject *)__pyx_t_2);
                        if (!(likely(__Pyx_TypeTest(((PyObject *)__pyx_t_2), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType)))) __PYX_ERR(21, 123, __pyx_L1_error)
                        __pyx_v_out = ((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_t_2);
                        __pyx_t_2 = 0;

                        /* "pyarrow/public-api.pxi":122
 *     elif type.get().id() == _Type_DECIMAL256:
 *         out = Decimal256Type.__new__(Decimal256Type)
 *     elif type.get().id() == _Type_RUN_END_ENCODED:             # <<<<<<<<<<<<<<
 *         out = RunEndEncodedType.__new__(RunEndEncodedType)
 *     elif type.get().id() == _Type_EXTENSION:
*/
                        goto __pyx_L4;
                      }

                      /* "pyarrow/public-api.pxi":124
 *     elif type.get().id() == _Type_RUN_END_ENCODED:
 *         out = RunEndEncodedType.__new__(RunEndEncodedType)
 *     elif type.get().id() == _Type_EXTENSION:             # <<<<<<<<<<<<<<
 *         ext_type = <const CExtensionType*> type.get()
 *         cpy_ext_type = dynamic_cast[_CPyExtensionTypePtr](ext_type)
*/
                      __pyx_t_1 = (__pyx_v_type.get()->id() ==  arrow::Type::EXTENSION);
                      if (__pyx_t_1) {

                        /* "pyarrow/public-api.pxi":125
 *         out = RunEndEncodedType.__new__(RunEndEncodedType)
 *     elif type.get().id() == _Type_EXTENSION:
 *         ext_type = <const CExtensionType*> type.get()             # <<<<<<<<<<<<<<
 *         cpy_ext_type = dynamic_cast[_CPyExtensionTypePtr](ext_type)
 *         extension_name = ext_type.extension_name()
*/
                        __pyx_v_ext_type = (( arrow::ExtensionType const *)__pyx_v_type.get());

                        /* "pyarrow/public-api.pxi":126
 *     elif type.get().id() == _Type_EXTENSION:
 *         ext_type = <const CExtensionType*> type.get()
 *         cpy_ext_type = dynamic_cast[_CPyExtensionTypePtr](ext_type)             # <<<<<<<<<<<<<<
 *         extension_name = ext_type.extension_name()
 *         if cpy_ext_type != nullptr:
*/
                        try {
                          __pyx_t_3 = dynamic_cast<__pyx_t_7pyarrow_3lib__CPyExtensionTypePtr>(__pyx_v_ext_type);
                        } catch(...) {
                          __Pyx_CppExn2PyErr();
                          __PYX_ERR(21, 126, __pyx_L1_error)
                        }
                        __pyx_v_cpy_ext_type = __pyx_t_3;

                        /* "pyarrow/public-api.pxi":127
 *         ext_type = <const CExtensionType*> type.get()
 *         cpy_ext_type = dynamic_cast[_CPyExtensionTypePtr](ext_type)
 *         extension_name = ext_type.extension_name()             # <<<<<<<<<<<<<<
 *         if cpy_ext_type != nullptr:
 *             return cpy_ext_type.GetInstance()
*/
                        __pyx_v_extension_name = __pyx_v_ext_type->extension_name();

                        /* "pyarrow/public-api.pxi":128
 *         cpy_ext_type = dynamic_cast[_CPyExtensionTypePtr](ext_type)
 *         extension_name = ext_type.extension_name()
 *         if cpy_ext_type != nullptr:             # <<<<<<<<<<<<<<
 *             return cpy_ext_type.GetInstance()
 *         elif extension_name == b"arrow.bool8":
*/
                        __pyx_t_1 = (__pyx_v_cpy_ext_type != nullptr);
                        if (__pyx_t_1) {

                          /* "pyarrow/public-api.pxi":129
 *         extension_name = ext_type.extension_name()
 *         if cpy_ext_type != nullptr:
 *             return cpy_ext_type.GetInstance()             # <<<<<<<<<<<<<<
 *         elif extension_name == b"arrow.bool8":
 *             out = Bool8Type.__new__(Bool8Type)
*/
                          __Pyx_XDECREF(__pyx_r);
                          __pyx_t_2 = __pyx_v_cpy_ext_type->GetInstance(); if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 129, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_2);
                          __pyx_r = __pyx_t_2;
                          __pyx_t_2 = 0;
                          goto __pyx_L0;

                          /* "pyarrow/public-api.pxi":128
 *         cpy_ext_type = dynamic_cast[_CPyExtensionTypePtr](ext_type)
 *         extension_name = ext_type.extension_name()
 *         if cpy_ext_type != nullptr:             # <<<<<<<<<<<<<<
 *             return cpy_ext_type.GetInstance()
 *         elif extension_name == b"arrow.bool8":
*/
                        }

                        /* "pyarrow/public-api.pxi":130
 *         if cpy_ext_type != nullptr:
 *             return cpy_ext_type.GetInstance()
 *         elif extension_name == b"arrow.bool8":             # <<<<<<<<<<<<<<
 *             out = Bool8Type.__new__(Bool8Type)
 *         elif extension_name == b"arrow.fixed_shape_tensor":
*/
                        __pyx_t_1 = (__pyx_v_extension_name == __pyx_k_arrow_bool8);
                        if (__pyx_t_1) {

                          /* "pyarrow/public-api.pxi":131
 *             return cpy_ext_type.GetInstance()
 *         elif extension_name == b"arrow.bool8":
 *             out = Bool8Type.__new__(Bool8Type)             # <<<<<<<<<<<<<<
 *         elif extension_name == b"arrow.fixed_shape_tensor":
 *             out = FixedShapeTensorType.__new__(FixedShapeTensorType)
*/
                          __pyx_t_2 = ((PyObject *)__pyx_tp_new_7pyarrow_3lib_Bool8Type(((PyTypeObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Bool8Type), __pyx_mstate_global->__pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 131, __pyx_L1_error)
                          __Pyx_GOTREF((PyObject *)__pyx_t_2);
                          if (!(likely(__Pyx_TypeTest(((PyObject *)__pyx_t_2), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType)))) __PYX_ERR(21, 131, __pyx_L1_error)
                          __pyx_v_out = ((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_t_2);
                          __pyx_t_2 = 0;

                          /* "pyarrow/public-api.pxi":130
 *         if cpy_ext_type != nullptr:
 *             return cpy_ext_type.GetInstance()
 *         elif extension_name == b"arrow.bool8":             # <<<<<<<<<<<<<<
 *             out = Bool8Type.__new__(Bool8Type)
 *         elif extension_name == b"arrow.fixed_shape_tensor":
*/
                          goto __pyx_L5;
                        }

                        /* "pyarrow/public-api.pxi":132
 *         elif extension_name == b"arrow.bool8":
 *             out = Bool8Type.__new__(Bool8Type)
 *         elif extension_name == b"arrow.fixed_shape_tensor":             # <<<<<<<<<<<<<<
 *             out = FixedShapeTensorType.__new__(FixedShapeTensorType)
 *         elif extension_name == b"arrow.opaque":
*/
                        __pyx_t_1 = (__pyx_v_extension_name == __pyx_k_arrow_fixed_shape_tensor);
                        if (__pyx_t_1) {

                          /* "pyarrow/public-api.pxi":133
 *             out = Bool8Type.__new__(Bool8Type)
 *         elif extension_name == b"arrow.fixed_shape_tensor":
 *             out = FixedShapeTensorType.__new__(FixedShapeTensorType)             # <<<<<<<<<<<<<<
 *         elif extension_name == b"arrow.opaque":
 *             out = OpaqueType.__new__(OpaqueType)
*/
                          __pyx_t_2 = ((PyObject *)__pyx_tp_new_7pyarrow_3lib_FixedShapeTensorType(((PyTypeObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_FixedShapeTensorType), __pyx_mstate_global->__pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 133, __pyx_L1_error)
                          __Pyx_GOTREF((PyObject *)__pyx_t_2);
                          if (!(likely(__Pyx_TypeTest(((PyObject *)__pyx_t_2), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType)))) __PYX_ERR(21, 133, __pyx_L1_error)
                          __pyx_v_out = ((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_t_2);
                          __pyx_t_2 = 0;

                          /* "pyarrow/public-api.pxi":132
 *         elif extension_name == b"arrow.bool8":
 *             out = Bool8Type.__new__(Bool8Type)
 *         elif extension_name == b"arrow.fixed_shape_tensor":             # <<<<<<<<<<<<<<
 *             out = FixedShapeTensorType.__new__(FixedShapeTensorType)
 *         elif extension_name == b"arrow.opaque":
*/
                          goto __pyx_L5;
                        }

                        /* "pyarrow/public-api.pxi":134
 *         elif extension_name == b"arrow.fixed_shape_tensor":
 *             out = FixedShapeTensorType.__new__(FixedShapeTensorType)
 *         elif extension_name == b"arrow.opaque":             # <<<<<<<<<<<<<<
 *             out = OpaqueType.__new__(OpaqueType)
 *         elif extension_name == b"arrow.uuid":
*/
                        __pyx_t_1 = (__pyx_v_extension_name == __pyx_k_arrow_opaque);
                        if (__pyx_t_1) {

                          /* "pyarrow/public-api.pxi":135
 *             out = FixedShapeTensorType.__new__(FixedShapeTensorType)
 *         elif extension_name == b"arrow.opaque":
 *             out = OpaqueType.__new__(OpaqueType)             # <<<<<<<<<<<<<<
 *         elif extension_name == b"arrow.uuid":
 *             out = UuidType.__new__(UuidType)
*/
                          __pyx_t_2 = ((PyObject *)__pyx_tp_new_7pyarrow_3lib_OpaqueType(((PyTypeObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_OpaqueType), __pyx_mstate_global->__pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 135, __pyx_L1_error)
                          __Pyx_GOTREF((PyObject *)__pyx_t_2);
                          if (!(likely(__Pyx_TypeTest(((PyObject *)__pyx_t_2), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType)))) __PYX_ERR(21, 135, __pyx_L1_error)
                          __pyx_v_out = ((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_t_2);
                          __pyx_t_2 = 0;

                          /* "pyarrow/public-api.pxi":134
 *         elif extension_name == b"arrow.fixed_shape_tensor":
 *             out = FixedShapeTensorType.__new__(FixedShapeTensorType)
 *         elif extension_name == b"arrow.opaque":             # <<<<<<<<<<<<<<
 *             out = OpaqueType.__new__(OpaqueType)
 *         elif extension_name == b"arrow.uuid":
*/
                          goto __pyx_L5;
                        }

                        /* "pyarrow/public-api.pxi":136
 *         elif extension_name == b"arrow.opaque":
 *             out = OpaqueType.__new__(OpaqueType)
 *         elif extension_name == b"arrow.uuid":             # <<<<<<<<<<<<<<
 *             out = UuidType.__new__(UuidType)
 *         elif extension_name == b"arrow.json":
*/
                        __pyx_t_1 = (__pyx_v_extension_name == __pyx_k_arrow_uuid);
                        if (__pyx_t_1) {

                          /* "pyarrow/public-api.pxi":137
 *             out = OpaqueType.__new__(OpaqueType)
 *         elif extension_name == b"arrow.uuid":
 *             out = UuidType.__new__(UuidType)             # <<<<<<<<<<<<<<
 *         elif extension_name == b"arrow.json":
 *             out = JsonType.__new__(JsonType)
*/
                          __pyx_t_2 = ((PyObject *)__pyx_tp_new_7pyarrow_3lib_UuidType(((PyTypeObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_UuidType), __pyx_mstate_global->__pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 137, __pyx_L1_error)
                          __Pyx_GOTREF((PyObject *)__pyx_t_2);
                          if (!(likely(__Pyx_TypeTest(((PyObject *)__pyx_t_2), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType)))) __PYX_ERR(21, 137, __pyx_L1_error)
                          __pyx_v_out = ((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_t_2);
                          __pyx_t_2 = 0;

                          /* "pyarrow/public-api.pxi":136
 *         elif extension_name == b"arrow.opaque":
 *             out = OpaqueType.__new__(OpaqueType)
 *         elif extension_name == b"arrow.uuid":             # <<<<<<<<<<<<<<
 *             out = UuidType.__new__(UuidType)
 *         elif extension_name == b"arrow.json":
*/
                          goto __pyx_L5;
                        }

                        /* "pyarrow/public-api.pxi":138
 *         elif extension_name == b"arrow.uuid":
 *             out = UuidType.__new__(UuidType)
 *         elif extension_name == b"arrow.json":             # <<<<<<<<<<<<<<
 *             out = JsonType.__new__(JsonType)
 *         else:
*/
                        __pyx_t_1 = (__pyx_v_extension_name == __pyx_k_arrow_json);
                        if (__pyx_t_1) {

                          /* "pyarrow/public-api.pxi":139
 *             out = UuidType.__new__(UuidType)
 *         elif extension_name == b"arrow.json":
 *             out = JsonType.__new__(JsonType)             # <<<<<<<<<<<<<<
 *         else:
 *             out = BaseExtensionType.__new__(BaseExtensionType)
*/
                          __pyx_t_2 = ((PyObject *)__pyx_tp_new_7pyarrow_3lib_JsonType(((PyTypeObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_JsonType), __pyx_mstate_global->__pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 139, __pyx_L1_error)
                          __Pyx_GOTREF((PyObject *)__pyx_t_2);
                          if (!(likely(__Pyx_TypeTest(((PyObject *)__pyx_t_2), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType)))) __PYX_ERR(21, 139, __pyx_L1_error)
                          __pyx_v_out = ((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_t_2);
                          __pyx_t_2 = 0;

                          /* "pyarrow/public-api.pxi":138
 *         elif extension_name == b"arrow.uuid":
 *             out = UuidType.__new__(UuidType)
 *         elif extension_name == b"arrow.json":             # <<<<<<<<<<<<<<
 *             out = JsonType.__new__(JsonType)
 *         else:
*/
                          goto __pyx_L5;
                        }

                        /* "pyarrow/public-api.pxi":141
 *             out = JsonType.__new__(JsonType)
 *         else:
 *             out = BaseExtensionType.__new__(BaseExtensionType)             # <<<<<<<<<<<<<<
 *     else:
 *         out = DataType.__new__(DataType)
*/
                        /*else*/ {
                          __pyx_t_2 = ((PyObject *)__pyx_tp_new_7pyarrow_3lib_BaseExtensionType(((PyTypeObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_BaseExtensionType), __pyx_mstate_global->__pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 141, __pyx_L1_error)
                          __Pyx_GOTREF((PyObject *)__pyx_t_2);
                          if (!(likely(__Pyx_TypeTest(((PyObject *)__pyx_t_2), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType)))) __PYX_ERR(21, 141, __pyx_L1_error)
                          __pyx_v_out = ((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_t_2);
                          __pyx_t_2 = 0;
                        }
                        __pyx_L5:;

                        /* "pyarrow/public-api.pxi":124
 *     elif type.get().id() == _Type_RUN_END_ENCODED:
 *         out = RunEndEncodedType.__new__(RunEndEncodedType)
 *     elif type.get().id() == _Type_EXTENSION:             # <<<<<<<<<<<<<<
 *         ext_type = <const CExtensionType*> type.get()
 *         cpy_ext_type = dynamic_cast[_CPyExtensionTypePtr](ext_type)
*/
                        goto __pyx_L4;
                      }

                      /* "pyarrow/public-api.pxi":143
 *             out = BaseExtensionType.__new__(BaseExtensionType)
 *     else:
 *         out = DataType.__new__(DataType)             # <<<<<<<<<<<<<<
 * 
 *     out.init(type)
*/
                      /*else*/ {
                        __pyx_t_2 = ((PyObject *)__pyx_tp_new_7pyarrow_3lib_DataType(((PyTypeObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType), __pyx_mstate_global->__pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 143, __pyx_L1_error)
                        __Pyx_GOTREF((PyObject *)__pyx_t_2);
                        __pyx_v_out = ((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_t_2);
                        __pyx_t_2 = 0;
                      }
                      __pyx_L4:;

                      /* "pyarrow/public-api.pxi":145
 *         out = DataType.__new__(DataType)
 * 
 *     out.init(type)             # <<<<<<<<<<<<<<
 *     return out
 * 
*/
                      if (unlikely(((PyObject *)__pyx_v_out) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "init");
                        __PYX_ERR(21, 145, __pyx_L1_error)
                      }
                      ((struct __pyx_vtabstruct_7pyarrow_3lib_DataType *)__pyx_v_out->__pyx_vtab)->init(__pyx_v_out, __pyx_v_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(21, 145, __pyx_L1_error)

                      /* "pyarrow/public-api.pxi":146
 * 
 *     out.init(type)
 *     return out             # <<<<<<<<<<<<<<
 * 
 * 
*/
                      __Pyx_XDECREF(__pyx_r);
                      __Pyx_INCREF((PyObject *)__pyx_v_out);
                      __pyx_r = ((PyObject *)__pyx_v_out);
                      goto __pyx_L0;

                      /* "pyarrow/public-api.pxi":74
 * 
 * 
 * cdef api object pyarrow_wrap_data_type(             # <<<<<<<<<<<<<<
 *         const shared_ptr[CDataType]& type):
 *     cdef:
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_AddTraceback("pyarrow.lib.pyarrow_wrap_data_type", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = 0;
                      __pyx_L0:;
                      __Pyx_XDECREF((PyObject *)__pyx_v_out);
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/public-api.pxi":149
 * 
 * 
 * cdef object pyarrow_wrap_metadata(             # <<<<<<<<<<<<<<
 *         const shared_ptr[const CKeyValueMetadata]& meta):
 *     if meta.get() == nullptr:
*/

                    static PyObject *__pyx_f_7pyarrow_3lib_pyarrow_wrap_metadata(std::shared_ptr< arrow::KeyValueMetadata const >  const &__pyx_v_meta) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_t_1;
                      PyObject *__pyx_t_2 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("pyarrow_wrap_metadata", 0);

                      /* "pyarrow/public-api.pxi":151
 * cdef object pyarrow_wrap_metadata(
 *         const shared_ptr[const CKeyValueMetadata]& meta):
 *     if meta.get() == nullptr:             # <<<<<<<<<<<<<<
 *         return None
 *     else:
*/
                      __pyx_t_1 = (__pyx_v_meta.get() == nullptr);
                      if (__pyx_t_1) {

                        /* "pyarrow/public-api.pxi":152
 *         const shared_ptr[const CKeyValueMetadata]& meta):
 *     if meta.get() == nullptr:
 *         return None             # <<<<<<<<<<<<<<
 *     else:
 *         return KeyValueMetadata.wrap(meta)
*/
                        __Pyx_XDECREF(__pyx_r);
                        __pyx_r = Py_None; __Pyx_INCREF(Py_None);
                        goto __pyx_L0;

                        /* "pyarrow/public-api.pxi":151
 * cdef object pyarrow_wrap_metadata(
 *         const shared_ptr[const CKeyValueMetadata]& meta):
 *     if meta.get() == nullptr:             # <<<<<<<<<<<<<<
 *         return None
 *     else:
*/
                      }

                      /* "pyarrow/public-api.pxi":154
 *         return None
 *     else:
 *         return KeyValueMetadata.wrap(meta)             # <<<<<<<<<<<<<<
 * 
 * 
*/
                      /*else*/ {
                        __Pyx_XDECREF(__pyx_r);
                        __pyx_t_2 = __pyx_f_7pyarrow_3lib_16KeyValueMetadata_wrap(__pyx_v_meta); if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 154, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_2);
                        __pyx_r = __pyx_t_2;
                        __pyx_t_2 = 0;
                        goto __pyx_L0;
                      }

                      /* "pyarrow/public-api.pxi":149
 * 
 * 
 * cdef object pyarrow_wrap_metadata(             # <<<<<<<<<<<<<<
 *         const shared_ptr[const CKeyValueMetadata]& meta):
 *     if meta.get() == nullptr:
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_AddTraceback("pyarrow.lib.pyarrow_wrap_metadata", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = 0;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/public-api.pxi":157
 * 
 * 
 * cdef api bint pyarrow_is_metadata(object metadata):             # <<<<<<<<<<<<<<
 *     return isinstance(metadata, KeyValueMetadata)
 * 
*/

                    static int __pyx_f_7pyarrow_3lib_pyarrow_is_metadata(PyObject *__pyx_v_metadata) {
                      int __pyx_r;
                      int __pyx_t_1;

                      /* "pyarrow/public-api.pxi":158
 * 
 * cdef api bint pyarrow_is_metadata(object metadata):
 *     return isinstance(metadata, KeyValueMetadata)             # <<<<<<<<<<<<<<
 * 
 * 
*/
                      __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_metadata, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_KeyValueMetadata); 
                      __pyx_r = __pyx_t_1;
                      goto __pyx_L0;

                      /* "pyarrow/public-api.pxi":157
 * 
 * 
 * cdef api bint pyarrow_is_metadata(object metadata):             # <<<<<<<<<<<<<<
 *     return isinstance(metadata, KeyValueMetadata)
 * 
*/

                      /* function exit code */
                      __pyx_L0:;
                      return __pyx_r;
                    }

                    /* "pyarrow/public-api.pxi":161
 * 
 * 
 * cdef shared_ptr[const CKeyValueMetadata] pyarrow_unwrap_metadata(object meta):             # <<<<<<<<<<<<<<
 *     cdef shared_ptr[const CKeyValueMetadata] c_meta
 *     if pyarrow_is_metadata(meta):
*/

                    static std::shared_ptr< arrow::KeyValueMetadata const >  __pyx_f_7pyarrow_3lib_pyarrow_unwrap_metadata(PyObject *__pyx_v_meta) {
                      std::shared_ptr< arrow::KeyValueMetadata const >  __pyx_v_c_meta;
                      std::shared_ptr< arrow::KeyValueMetadata const >  __pyx_r;
                      int __pyx_t_1;
                      std::shared_ptr< arrow::KeyValueMetadata const >  __pyx_t_2;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;

                      /* "pyarrow/public-api.pxi":163
 * cdef shared_ptr[const CKeyValueMetadata] pyarrow_unwrap_metadata(object meta):
 *     cdef shared_ptr[const CKeyValueMetadata] c_meta
 *     if pyarrow_is_metadata(meta):             # <<<<<<<<<<<<<<
 *         c_meta = (<KeyValueMetadata>meta).unwrap()
 *     return c_meta
*/
                      __pyx_t_1 = __pyx_f_7pyarrow_3lib_pyarrow_is_metadata(__pyx_v_meta); if (unlikely(__pyx_t_1 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(21, 163, __pyx_L1_error)
                      if (__pyx_t_1) {

                        /* "pyarrow/public-api.pxi":164
 *     cdef shared_ptr[const CKeyValueMetadata] c_meta
 *     if pyarrow_is_metadata(meta):
 *         c_meta = (<KeyValueMetadata>meta).unwrap()             # <<<<<<<<<<<<<<
 *     return c_meta
 * 
*/
                        if (unlikely(__pyx_v_meta == Py_None)) {
                          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "unwrap");
                          __PYX_ERR(21, 164, __pyx_L1_error)
                        }
                        __pyx_t_2 = __pyx_f_7pyarrow_3lib_16KeyValueMetadata_unwrap(((struct __pyx_obj_7pyarrow_3lib_KeyValueMetadata *)__pyx_v_meta)); if (unlikely(PyErr_Occurred())) __PYX_ERR(21, 164, __pyx_L1_error)
                        __pyx_v_c_meta = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_2);

                        /* "pyarrow/public-api.pxi":163
 * cdef shared_ptr[const CKeyValueMetadata] pyarrow_unwrap_metadata(object meta):
 *     cdef shared_ptr[const CKeyValueMetadata] c_meta
 *     if pyarrow_is_metadata(meta):             # <<<<<<<<<<<<<<
 *         c_meta = (<KeyValueMetadata>meta).unwrap()
 *     return c_meta
*/
                      }

                      /* "pyarrow/public-api.pxi":165
 *     if pyarrow_is_metadata(meta):
 *         c_meta = (<KeyValueMetadata>meta).unwrap()
 *     return c_meta             # <<<<<<<<<<<<<<
 * 
 * 
*/
                      __pyx_r = __pyx_v_c_meta;
                      goto __pyx_L0;

                      /* "pyarrow/public-api.pxi":161
 * 
 * 
 * cdef shared_ptr[const CKeyValueMetadata] pyarrow_unwrap_metadata(object meta):             # <<<<<<<<<<<<<<
 *     cdef shared_ptr[const CKeyValueMetadata] c_meta
 *     if pyarrow_is_metadata(meta):
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib.pyarrow_unwrap_metadata", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_pretend_to_initialize(&__pyx_r);
                      __pyx_L0:;
                      return __pyx_r;
                    }

                    /* "pyarrow/public-api.pxi":168
 * 
 * 
 * cdef api bint pyarrow_is_field(object field):             # <<<<<<<<<<<<<<
 *     return isinstance(field, Field)
 * 
*/

                    static int __pyx_f_7pyarrow_3lib_pyarrow_is_field(PyObject *__pyx_v_field) {
                      int __pyx_r;
                      int __pyx_t_1;

                      /* "pyarrow/public-api.pxi":169
 * 
 * cdef api bint pyarrow_is_field(object field):
 *     return isinstance(field, Field)             # <<<<<<<<<<<<<<
 * 
 * 
*/
                      __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_field, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Field); 
                      __pyx_r = __pyx_t_1;
                      goto __pyx_L0;

                      /* "pyarrow/public-api.pxi":168
 * 
 * 
 * cdef api bint pyarrow_is_field(object field):             # <<<<<<<<<<<<<<
 *     return isinstance(field, Field)
 * 
*/

                      /* function exit code */
                      __pyx_L0:;
                      return __pyx_r;
                    }

                    /* "pyarrow/public-api.pxi":172
 * 
 * 
 * cdef api shared_ptr[CField] pyarrow_unwrap_field(object field):             # <<<<<<<<<<<<<<
 *     cdef Field field_
 *     if pyarrow_is_field(field):
*/

                    std::shared_ptr< arrow::Field>  pyarrow_unwrap_field(PyObject *__pyx_v_field) {
                      struct __pyx_obj_7pyarrow_3lib_Field *__pyx_v_field_ = 0;
                      std::shared_ptr< arrow::Field>  __pyx_r;
                      __Pyx_RefNannyDeclarations
                      int __pyx_t_1;
                      PyObject *__pyx_t_2 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("pyarrow_unwrap_field", 0);

                      /* "pyarrow/public-api.pxi":174
 * cdef api shared_ptr[CField] pyarrow_unwrap_field(object field):
 *     cdef Field field_
 *     if pyarrow_is_field(field):             # <<<<<<<<<<<<<<
 *         field_ = <Field>(field)
 *         return field_.sp_field
*/
                      __pyx_t_1 = __pyx_f_7pyarrow_3lib_pyarrow_is_field(__pyx_v_field); if (unlikely(__pyx_t_1 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(21, 174, __pyx_L1_error)
                      if (__pyx_t_1) {

                        /* "pyarrow/public-api.pxi":175
 *     cdef Field field_
 *     if pyarrow_is_field(field):
 *         field_ = <Field>(field)             # <<<<<<<<<<<<<<
 *         return field_.sp_field
 * 
*/
                        __pyx_t_2 = __pyx_v_field;
                        __Pyx_INCREF(__pyx_t_2);
                        __pyx_v_field_ = ((struct __pyx_obj_7pyarrow_3lib_Field *)__pyx_t_2);
                        __pyx_t_2 = 0;

                        /* "pyarrow/public-api.pxi":176
 *     if pyarrow_is_field(field):
 *         field_ = <Field>(field)
 *         return field_.sp_field             # <<<<<<<<<<<<<<
 * 
 *     return shared_ptr[CField]()
*/
                        if (unlikely(((PyObject *)__pyx_v_field_) == Py_None)) {
                          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_field");
                          __PYX_ERR(21, 176, __pyx_L1_error)
                        }
                        __pyx_r = __pyx_v_field_->sp_field;
                        goto __pyx_L0;

                        /* "pyarrow/public-api.pxi":174
 * cdef api shared_ptr[CField] pyarrow_unwrap_field(object field):
 *     cdef Field field_
 *     if pyarrow_is_field(field):             # <<<<<<<<<<<<<<
 *         field_ = <Field>(field)
 *         return field_.sp_field
*/
                      }

                      /* "pyarrow/public-api.pxi":178
 *         return field_.sp_field
 * 
 *     return shared_ptr[CField]()             # <<<<<<<<<<<<<<
 * 
 * 
*/
                      __pyx_r = std::shared_ptr< arrow::Field> ();
                      goto __pyx_L0;

                      /* "pyarrow/public-api.pxi":172
 * 
 * 
 * cdef api shared_ptr[CField] pyarrow_unwrap_field(object field):             # <<<<<<<<<<<<<<
 *     cdef Field field_
 *     if pyarrow_is_field(field):
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_AddTraceback("pyarrow.lib.pyarrow_unwrap_field", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_pretend_to_initialize(&__pyx_r);
                      __pyx_L0:;
                      __Pyx_XDECREF((PyObject *)__pyx_v_field_);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/public-api.pxi":181
 * 
 * 
 * cdef api object pyarrow_wrap_field(const shared_ptr[CField]& field):             # <<<<<<<<<<<<<<
 *     if field.get() == NULL:
 *         return None
*/

                    PyObject *pyarrow_wrap_field(std::shared_ptr< arrow::Field>  const &__pyx_v_field) {
                      struct __pyx_obj_7pyarrow_3lib_Field *__pyx_v_out = 0;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_t_1;
                      PyObject *__pyx_t_2 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("pyarrow_wrap_field", 0);

                      /* "pyarrow/public-api.pxi":182
 * 
 * cdef api object pyarrow_wrap_field(const shared_ptr[CField]& field):
 *     if field.get() == NULL:             # <<<<<<<<<<<<<<
 *         return None
 *     cdef Field out = Field.__new__(Field)
*/
                      __pyx_t_1 = (__pyx_v_field.get() == NULL);
                      if (__pyx_t_1) {

                        /* "pyarrow/public-api.pxi":183
 * cdef api object pyarrow_wrap_field(const shared_ptr[CField]& field):
 *     if field.get() == NULL:
 *         return None             # <<<<<<<<<<<<<<
 *     cdef Field out = Field.__new__(Field)
 *     out.init(field)
*/
                        __Pyx_XDECREF(__pyx_r);
                        __pyx_r = Py_None; __Pyx_INCREF(Py_None);
                        goto __pyx_L0;

                        /* "pyarrow/public-api.pxi":182
 * 
 * cdef api object pyarrow_wrap_field(const shared_ptr[CField]& field):
 *     if field.get() == NULL:             # <<<<<<<<<<<<<<
 *         return None
 *     cdef Field out = Field.__new__(Field)
*/
                      }

                      /* "pyarrow/public-api.pxi":184
 *     if field.get() == NULL:
 *         return None
 *     cdef Field out = Field.__new__(Field)             # <<<<<<<<<<<<<<
 *     out.init(field)
 *     return out
*/
                      __pyx_t_2 = ((PyObject *)__pyx_tp_new_7pyarrow_3lib_Field(((PyTypeObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Field), __pyx_mstate_global->__pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 184, __pyx_L1_error)
                      __Pyx_GOTREF((PyObject *)__pyx_t_2);
                      __pyx_v_out = ((struct __pyx_obj_7pyarrow_3lib_Field *)__pyx_t_2);
                      __pyx_t_2 = 0;

                      /* "pyarrow/public-api.pxi":185
 *         return None
 *     cdef Field out = Field.__new__(Field)
 *     out.init(field)             # <<<<<<<<<<<<<<
 *     return out
 * 
*/
                      if (unlikely(((PyObject *)__pyx_v_out) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "init");
                        __PYX_ERR(21, 185, __pyx_L1_error)
                      }
                      ((struct __pyx_vtabstruct_7pyarrow_3lib_Field *)__pyx_v_out->__pyx_vtab)->init(__pyx_v_out, __pyx_v_field); if (unlikely(PyErr_Occurred())) __PYX_ERR(21, 185, __pyx_L1_error)

                      /* "pyarrow/public-api.pxi":186
 *     cdef Field out = Field.__new__(Field)
 *     out.init(field)
 *     return out             # <<<<<<<<<<<<<<
 * 
 * 
*/
                      __Pyx_XDECREF(__pyx_r);
                      __Pyx_INCREF((PyObject *)__pyx_v_out);
                      __pyx_r = ((PyObject *)__pyx_v_out);
                      goto __pyx_L0;

                      /* "pyarrow/public-api.pxi":181
 * 
 * 
 * cdef api object pyarrow_wrap_field(const shared_ptr[CField]& field):             # <<<<<<<<<<<<<<
 *     if field.get() == NULL:
 *         return None
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_AddTraceback("pyarrow.lib.pyarrow_wrap_field", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = 0;
                      __pyx_L0:;
                      __Pyx_XDECREF((PyObject *)__pyx_v_out);
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/public-api.pxi":189
 * 
 * 
 * cdef api bint pyarrow_is_schema(object schema):             # <<<<<<<<<<<<<<
 *     return isinstance(schema, Schema)
 * 
*/

                    static int __pyx_f_7pyarrow_3lib_pyarrow_is_schema(PyObject *__pyx_v_schema) {
                      int __pyx_r;
                      int __pyx_t_1;

                      /* "pyarrow/public-api.pxi":190
 * 
 * cdef api bint pyarrow_is_schema(object schema):
 *     return isinstance(schema, Schema)             # <<<<<<<<<<<<<<
 * 
 * 
*/
                      __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_schema, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Schema); 
                      __pyx_r = __pyx_t_1;
                      goto __pyx_L0;

                      /* "pyarrow/public-api.pxi":189
 * 
 * 
 * cdef api bint pyarrow_is_schema(object schema):             # <<<<<<<<<<<<<<
 *     return isinstance(schema, Schema)
 * 
*/

                      /* function exit code */
                      __pyx_L0:;
                      return __pyx_r;
                    }

                    /* "pyarrow/public-api.pxi":193
 * 
 * 
 * cdef api shared_ptr[CSchema] pyarrow_unwrap_schema(object schema):             # <<<<<<<<<<<<<<
 *     cdef Schema sch
 *     if pyarrow_is_schema(schema):
*/

                    std::shared_ptr< arrow::Schema>  pyarrow_unwrap_schema(PyObject *__pyx_v_schema) {
                      struct __pyx_obj_7pyarrow_3lib_Schema *__pyx_v_sch = 0;
                      std::shared_ptr< arrow::Schema>  __pyx_r;
                      __Pyx_RefNannyDeclarations
                      int __pyx_t_1;
                      PyObject *__pyx_t_2 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("pyarrow_unwrap_schema", 0);

                      /* "pyarrow/public-api.pxi":195
 * cdef api shared_ptr[CSchema] pyarrow_unwrap_schema(object schema):
 *     cdef Schema sch
 *     if pyarrow_is_schema(schema):             # <<<<<<<<<<<<<<
 *         sch = <Schema>(schema)
 *         return sch.sp_schema
*/
                      __pyx_t_1 = __pyx_f_7pyarrow_3lib_pyarrow_is_schema(__pyx_v_schema); if (unlikely(__pyx_t_1 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(21, 195, __pyx_L1_error)
                      if (__pyx_t_1) {

                        /* "pyarrow/public-api.pxi":196
 *     cdef Schema sch
 *     if pyarrow_is_schema(schema):
 *         sch = <Schema>(schema)             # <<<<<<<<<<<<<<
 *         return sch.sp_schema
 * 
*/
                        __pyx_t_2 = __pyx_v_schema;
                        __Pyx_INCREF(__pyx_t_2);
                        __pyx_v_sch = ((struct __pyx_obj_7pyarrow_3lib_Schema *)__pyx_t_2);
                        __pyx_t_2 = 0;

                        /* "pyarrow/public-api.pxi":197
 *     if pyarrow_is_schema(schema):
 *         sch = <Schema>(schema)
 *         return sch.sp_schema             # <<<<<<<<<<<<<<
 * 
 *     return shared_ptr[CSchema]()
*/
                        if (unlikely(((PyObject *)__pyx_v_sch) == Py_None)) {
                          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_schema");
                          __PYX_ERR(21, 197, __pyx_L1_error)
                        }
                        __pyx_r = __pyx_v_sch->sp_schema;
                        goto __pyx_L0;

                        /* "pyarrow/public-api.pxi":195
 * cdef api shared_ptr[CSchema] pyarrow_unwrap_schema(object schema):
 *     cdef Schema sch
 *     if pyarrow_is_schema(schema):             # <<<<<<<<<<<<<<
 *         sch = <Schema>(schema)
 *         return sch.sp_schema
*/
                      }

                      /* "pyarrow/public-api.pxi":199
 *         return sch.sp_schema
 * 
 *     return shared_ptr[CSchema]()             # <<<<<<<<<<<<<<
 * 
 * 
*/
                      __pyx_r = std::shared_ptr< arrow::Schema> ();
                      goto __pyx_L0;

                      /* "pyarrow/public-api.pxi":193
 * 
 * 
 * cdef api shared_ptr[CSchema] pyarrow_unwrap_schema(object schema):             # <<<<<<<<<<<<<<
 *     cdef Schema sch
 *     if pyarrow_is_schema(schema):
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_AddTraceback("pyarrow.lib.pyarrow_unwrap_schema", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_pretend_to_initialize(&__pyx_r);
                      __pyx_L0:;
                      __Pyx_XDECREF((PyObject *)__pyx_v_sch);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/public-api.pxi":202
 * 
 * 
 * cdef api object pyarrow_wrap_schema(const shared_ptr[CSchema]& schema):             # <<<<<<<<<<<<<<
 *     cdef Schema out = Schema.__new__(Schema)
 *     out.init_schema(schema)
*/

                    PyObject *pyarrow_wrap_schema(std::shared_ptr< arrow::Schema>  const &__pyx_v_schema) {
                      struct __pyx_obj_7pyarrow_3lib_Schema *__pyx_v_out = 0;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("pyarrow_wrap_schema", 0);

                      /* "pyarrow/public-api.pxi":203
 * 
 * cdef api object pyarrow_wrap_schema(const shared_ptr[CSchema]& schema):
 *     cdef Schema out = Schema.__new__(Schema)             # <<<<<<<<<<<<<<
 *     out.init_schema(schema)
 *     return out
*/
                      __pyx_t_1 = ((PyObject *)__pyx_tp_new_7pyarrow_3lib_Schema(((PyTypeObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Schema), __pyx_mstate_global->__pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 203, __pyx_L1_error)
                      __Pyx_GOTREF((PyObject *)__pyx_t_1);
                      __pyx_v_out = ((struct __pyx_obj_7pyarrow_3lib_Schema *)__pyx_t_1);
                      __pyx_t_1 = 0;

                      /* "pyarrow/public-api.pxi":204
 * cdef api object pyarrow_wrap_schema(const shared_ptr[CSchema]& schema):
 *     cdef Schema out = Schema.__new__(Schema)
 *     out.init_schema(schema)             # <<<<<<<<<<<<<<
 *     return out
 * 
*/
                      if (unlikely(((PyObject *)__pyx_v_out) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "init_schema");
                        __PYX_ERR(21, 204, __pyx_L1_error)
                      }
                      ((struct __pyx_vtabstruct_7pyarrow_3lib_Schema *)__pyx_v_out->__pyx_vtab)->init_schema(__pyx_v_out, __pyx_v_schema); if (unlikely(PyErr_Occurred())) __PYX_ERR(21, 204, __pyx_L1_error)

                      /* "pyarrow/public-api.pxi":205
 *     cdef Schema out = Schema.__new__(Schema)
 *     out.init_schema(schema)
 *     return out             # <<<<<<<<<<<<<<
 * 
 * 
*/
                      __Pyx_XDECREF(__pyx_r);
                      __Pyx_INCREF((PyObject *)__pyx_v_out);
                      __pyx_r = ((PyObject *)__pyx_v_out);
                      goto __pyx_L0;

                      /* "pyarrow/public-api.pxi":202
 * 
 * 
 * cdef api object pyarrow_wrap_schema(const shared_ptr[CSchema]& schema):             # <<<<<<<<<<<<<<
 *     cdef Schema out = Schema.__new__(Schema)
 *     out.init_schema(schema)
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_AddTraceback("pyarrow.lib.pyarrow_wrap_schema", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = 0;
                      __pyx_L0:;
                      __Pyx_XDECREF((PyObject *)__pyx_v_out);
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/public-api.pxi":208
 * 
 * 
 * cdef api bint pyarrow_is_array(object array):             # <<<<<<<<<<<<<<
 *     return isinstance(array, Array)
 * 
*/

                    static int __pyx_f_7pyarrow_3lib_pyarrow_is_array(PyObject *__pyx_v_array) {
                      int __pyx_r;
                      int __pyx_t_1;

                      /* "pyarrow/public-api.pxi":209
 * 
 * cdef api bint pyarrow_is_array(object array):
 *     return isinstance(array, Array)             # <<<<<<<<<<<<<<
 * 
 * 
*/
                      __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_array, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array); 
                      __pyx_r = __pyx_t_1;
                      goto __pyx_L0;

                      /* "pyarrow/public-api.pxi":208
 * 
 * 
 * cdef api bint pyarrow_is_array(object array):             # <<<<<<<<<<<<<<
 *     return isinstance(array, Array)
 * 
*/

                      /* function exit code */
                      __pyx_L0:;
                      return __pyx_r;
                    }

                    /* "pyarrow/public-api.pxi":212
 * 
 * 
 * cdef api shared_ptr[CArray] pyarrow_unwrap_array(object array):             # <<<<<<<<<<<<<<
 *     cdef Array arr
 *     if pyarrow_is_array(array):
*/

                    std::shared_ptr< arrow::Array>  pyarrow_unwrap_array(PyObject *__pyx_v_array) {
                      struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_arr = 0;
                      std::shared_ptr< arrow::Array>  __pyx_r;
                      __Pyx_RefNannyDeclarations
                      int __pyx_t_1;
                      PyObject *__pyx_t_2 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("pyarrow_unwrap_array", 0);

                      /* "pyarrow/public-api.pxi":214
 * cdef api shared_ptr[CArray] pyarrow_unwrap_array(object array):
 *     cdef Array arr
 *     if pyarrow_is_array(array):             # <<<<<<<<<<<<<<
 *         arr = <Array>(array)
 *         return arr.sp_array
*/
                      __pyx_t_1 = __pyx_f_7pyarrow_3lib_pyarrow_is_array(__pyx_v_array); if (unlikely(__pyx_t_1 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(21, 214, __pyx_L1_error)
                      if (__pyx_t_1) {

                        /* "pyarrow/public-api.pxi":215
 *     cdef Array arr
 *     if pyarrow_is_array(array):
 *         arr = <Array>(array)             # <<<<<<<<<<<<<<
 *         return arr.sp_array
 * 
*/
                        __pyx_t_2 = __pyx_v_array;
                        __Pyx_INCREF(__pyx_t_2);
                        __pyx_v_arr = ((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_t_2);
                        __pyx_t_2 = 0;

                        /* "pyarrow/public-api.pxi":216
 *     if pyarrow_is_array(array):
 *         arr = <Array>(array)
 *         return arr.sp_array             # <<<<<<<<<<<<<<
 * 
 *     return shared_ptr[CArray]()
*/
                        if (unlikely(((PyObject *)__pyx_v_arr) == Py_None)) {
                          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_array");
                          __PYX_ERR(21, 216, __pyx_L1_error)
                        }
                        __pyx_r = __pyx_v_arr->sp_array;
                        goto __pyx_L0;

                        /* "pyarrow/public-api.pxi":214
 * cdef api shared_ptr[CArray] pyarrow_unwrap_array(object array):
 *     cdef Array arr
 *     if pyarrow_is_array(array):             # <<<<<<<<<<<<<<
 *         arr = <Array>(array)
 *         return arr.sp_array
*/
                      }

                      /* "pyarrow/public-api.pxi":218
 *         return arr.sp_array
 * 
 *     return shared_ptr[CArray]()             # <<<<<<<<<<<<<<
 * 
 * 
*/
                      __pyx_r = std::shared_ptr< arrow::Array> ();
                      goto __pyx_L0;

                      /* "pyarrow/public-api.pxi":212
 * 
 * 
 * cdef api shared_ptr[CArray] pyarrow_unwrap_array(object array):             # <<<<<<<<<<<<<<
 *     cdef Array arr
 *     if pyarrow_is_array(array):
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_AddTraceback("pyarrow.lib.pyarrow_unwrap_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_pretend_to_initialize(&__pyx_r);
                      __pyx_L0:;
                      __Pyx_XDECREF((PyObject *)__pyx_v_arr);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/public-api.pxi":221
 * 
 * 
 * cdef api object pyarrow_wrap_array(const shared_ptr[CArray]& sp_array):             # <<<<<<<<<<<<<<
 *     if sp_array.get() == NULL:
 *         raise ValueError('Array was NULL')
*/

                    PyObject *pyarrow_wrap_array(std::shared_ptr< arrow::Array>  const &__pyx_v_sp_array) {
                      PyObject *__pyx_v_klass = NULL;
                      struct __pyx_obj_7pyarrow_3lib_Array *__pyx_v_arr = 0;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_t_1;
                      PyObject *__pyx_t_2 = NULL;
                      PyObject *__pyx_t_3 = NULL;
                      size_t __pyx_t_4;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("pyarrow_wrap_array", 0);

                      /* "pyarrow/public-api.pxi":222
 * 
 * cdef api object pyarrow_wrap_array(const shared_ptr[CArray]& sp_array):
 *     if sp_array.get() == NULL:             # <<<<<<<<<<<<<<
 *         raise ValueError('Array was NULL')
 * 
*/
                      __pyx_t_1 = (__pyx_v_sp_array.get() == NULL);
                      if (unlikely(__pyx_t_1)) {

                        /* "pyarrow/public-api.pxi":223
 * cdef api object pyarrow_wrap_array(const shared_ptr[CArray]& sp_array):
 *     if sp_array.get() == NULL:
 *         raise ValueError('Array was NULL')             # <<<<<<<<<<<<<<
 * 
 *     klass = get_array_class_from_type(sp_array.get().type())
*/
                        __pyx_t_3 = NULL;
                        __pyx_t_4 = 1;
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Array_was_NULL};
                          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                          if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 223, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_2);
                        }
                        __Pyx_Raise(__pyx_t_2, 0, 0, 0);
                        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                        __PYX_ERR(21, 223, __pyx_L1_error)

                        /* "pyarrow/public-api.pxi":222
 * 
 * cdef api object pyarrow_wrap_array(const shared_ptr[CArray]& sp_array):
 *     if sp_array.get() == NULL:             # <<<<<<<<<<<<<<
 *         raise ValueError('Array was NULL')
 * 
*/
                      }

                      /* "pyarrow/public-api.pxi":225
 *         raise ValueError('Array was NULL')
 * 
 *     klass = get_array_class_from_type(sp_array.get().type())             # <<<<<<<<<<<<<<
 * 
 *     cdef Array arr = klass.__new__(klass)
*/
                      __pyx_t_2 = __pyx_f_7pyarrow_3lib_get_array_class_from_type(__pyx_v_sp_array.get()->type()); if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 225, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_2);
                      __pyx_v_klass = __pyx_t_2;
                      __pyx_t_2 = 0;

                      /* "pyarrow/public-api.pxi":227
 *     klass = get_array_class_from_type(sp_array.get().type())
 * 
 *     cdef Array arr = klass.__new__(klass)             # <<<<<<<<<<<<<<
 *     arr.init(sp_array)
 *     return arr
*/
                      __pyx_t_3 = __pyx_v_klass;
                      __Pyx_INCREF(__pyx_t_3);
                      __pyx_t_4 = 0;
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_klass};
                        __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                        if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 227, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_2);
                      }
                      if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array))))) __PYX_ERR(21, 227, __pyx_L1_error)
                      __pyx_v_arr = ((struct __pyx_obj_7pyarrow_3lib_Array *)__pyx_t_2);
                      __pyx_t_2 = 0;

                      /* "pyarrow/public-api.pxi":228
 * 
 *     cdef Array arr = klass.__new__(klass)
 *     arr.init(sp_array)             # <<<<<<<<<<<<<<
 *     return arr
 * 
*/
                      if (unlikely(((PyObject *)__pyx_v_arr) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "init");
                        __PYX_ERR(21, 228, __pyx_L1_error)
                      }
                      ((struct __pyx_vtabstruct_7pyarrow_3lib_Array *)__pyx_v_arr->__pyx_vtab)->init(__pyx_v_arr, __pyx_v_sp_array); if (unlikely(PyErr_Occurred())) __PYX_ERR(21, 228, __pyx_L1_error)

                      /* "pyarrow/public-api.pxi":229
 *     cdef Array arr = klass.__new__(klass)
 *     arr.init(sp_array)
 *     return arr             # <<<<<<<<<<<<<<
 * 
 * 
*/
                      __Pyx_XDECREF(__pyx_r);
                      __Pyx_INCREF((PyObject *)__pyx_v_arr);
                      __pyx_r = ((PyObject *)__pyx_v_arr);
                      goto __pyx_L0;

                      /* "pyarrow/public-api.pxi":221
 * 
 * 
 * cdef api object pyarrow_wrap_array(const shared_ptr[CArray]& sp_array):             # <<<<<<<<<<<<<<
 *     if sp_array.get() == NULL:
 *         raise ValueError('Array was NULL')
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_AddTraceback("pyarrow.lib.pyarrow_wrap_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = 0;
                      __pyx_L0:;
                      __Pyx_XDECREF(__pyx_v_klass);
                      __Pyx_XDECREF((PyObject *)__pyx_v_arr);
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/public-api.pxi":232
 * 
 * 
 * cdef api bint pyarrow_is_chunked_array(object array):             # <<<<<<<<<<<<<<
 *     return isinstance(array, ChunkedArray)
 * 
*/

                    static int __pyx_f_7pyarrow_3lib_pyarrow_is_chunked_array(PyObject *__pyx_v_array) {
                      int __pyx_r;
                      int __pyx_t_1;

                      /* "pyarrow/public-api.pxi":233
 * 
 * cdef api bint pyarrow_is_chunked_array(object array):
 *     return isinstance(array, ChunkedArray)             # <<<<<<<<<<<<<<
 * 
 * 
*/
                      __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_array, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ChunkedArray); 
                      __pyx_r = __pyx_t_1;
                      goto __pyx_L0;

                      /* "pyarrow/public-api.pxi":232
 * 
 * 
 * cdef api bint pyarrow_is_chunked_array(object array):             # <<<<<<<<<<<<<<
 *     return isinstance(array, ChunkedArray)
 * 
*/

                      /* function exit code */
                      __pyx_L0:;
                      return __pyx_r;
                    }

                    /* "pyarrow/public-api.pxi":236
 * 
 * 
 * cdef api shared_ptr[CChunkedArray] pyarrow_unwrap_chunked_array(object array):             # <<<<<<<<<<<<<<
 *     cdef ChunkedArray arr
 *     if pyarrow_is_chunked_array(array):
*/

                    std::shared_ptr< arrow::ChunkedArray>  pyarrow_unwrap_chunked_array(PyObject *__pyx_v_array) {
                      struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_arr = 0;
                      std::shared_ptr< arrow::ChunkedArray>  __pyx_r;
                      __Pyx_RefNannyDeclarations
                      int __pyx_t_1;
                      PyObject *__pyx_t_2 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("pyarrow_unwrap_chunked_array", 0);

                      /* "pyarrow/public-api.pxi":238
 * cdef api shared_ptr[CChunkedArray] pyarrow_unwrap_chunked_array(object array):
 *     cdef ChunkedArray arr
 *     if pyarrow_is_chunked_array(array):             # <<<<<<<<<<<<<<
 *         arr = <ChunkedArray>(array)
 *         return arr.sp_chunked_array
*/
                      __pyx_t_1 = __pyx_f_7pyarrow_3lib_pyarrow_is_chunked_array(__pyx_v_array); if (unlikely(__pyx_t_1 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(21, 238, __pyx_L1_error)
                      if (__pyx_t_1) {

                        /* "pyarrow/public-api.pxi":239
 *     cdef ChunkedArray arr
 *     if pyarrow_is_chunked_array(array):
 *         arr = <ChunkedArray>(array)             # <<<<<<<<<<<<<<
 *         return arr.sp_chunked_array
 * 
*/
                        __pyx_t_2 = __pyx_v_array;
                        __Pyx_INCREF(__pyx_t_2);
                        __pyx_v_arr = ((struct __pyx_obj_7pyarrow_3lib_ChunkedArray *)__pyx_t_2);
                        __pyx_t_2 = 0;

                        /* "pyarrow/public-api.pxi":240
 *     if pyarrow_is_chunked_array(array):
 *         arr = <ChunkedArray>(array)
 *         return arr.sp_chunked_array             # <<<<<<<<<<<<<<
 * 
 *     return shared_ptr[CChunkedArray]()
*/
                        if (unlikely(((PyObject *)__pyx_v_arr) == Py_None)) {
                          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_chunked_array");
                          __PYX_ERR(21, 240, __pyx_L1_error)
                        }
                        __pyx_r = __pyx_v_arr->sp_chunked_array;
                        goto __pyx_L0;

                        /* "pyarrow/public-api.pxi":238
 * cdef api shared_ptr[CChunkedArray] pyarrow_unwrap_chunked_array(object array):
 *     cdef ChunkedArray arr
 *     if pyarrow_is_chunked_array(array):             # <<<<<<<<<<<<<<
 *         arr = <ChunkedArray>(array)
 *         return arr.sp_chunked_array
*/
                      }

                      /* "pyarrow/public-api.pxi":242
 *         return arr.sp_chunked_array
 * 
 *     return shared_ptr[CChunkedArray]()             # <<<<<<<<<<<<<<
 * 
 * 
*/
                      __pyx_r = std::shared_ptr< arrow::ChunkedArray> ();
                      goto __pyx_L0;

                      /* "pyarrow/public-api.pxi":236
 * 
 * 
 * cdef api shared_ptr[CChunkedArray] pyarrow_unwrap_chunked_array(object array):             # <<<<<<<<<<<<<<
 *     cdef ChunkedArray arr
 *     if pyarrow_is_chunked_array(array):
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_AddTraceback("pyarrow.lib.pyarrow_unwrap_chunked_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_pretend_to_initialize(&__pyx_r);
                      __pyx_L0:;
                      __Pyx_XDECREF((PyObject *)__pyx_v_arr);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/public-api.pxi":245
 * 
 * 
 * cdef api object pyarrow_wrap_chunked_array(             # <<<<<<<<<<<<<<
 *         const shared_ptr[CChunkedArray]& sp_array):
 *     if sp_array.get() == NULL:
*/

                    PyObject *pyarrow_wrap_chunked_array(std::shared_ptr< arrow::ChunkedArray>  const &__pyx_v_sp_array) {
                       arrow::DataType *__pyx_v_data_type;
                      struct __pyx_obj_7pyarrow_3lib_ChunkedArray *__pyx_v_arr = 0;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_t_1;
                      PyObject *__pyx_t_2 = NULL;
                      PyObject *__pyx_t_3 = NULL;
                      size_t __pyx_t_4;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("pyarrow_wrap_chunked_array", 0);

                      /* "pyarrow/public-api.pxi":247
 * cdef api object pyarrow_wrap_chunked_array(
 *         const shared_ptr[CChunkedArray]& sp_array):
 *     if sp_array.get() == NULL:             # <<<<<<<<<<<<<<
 *         raise ValueError('ChunkedArray was NULL')
 * 
*/
                      __pyx_t_1 = (__pyx_v_sp_array.get() == NULL);
                      if (unlikely(__pyx_t_1)) {

                        /* "pyarrow/public-api.pxi":248
 *         const shared_ptr[CChunkedArray]& sp_array):
 *     if sp_array.get() == NULL:
 *         raise ValueError('ChunkedArray was NULL')             # <<<<<<<<<<<<<<
 * 
 *     cdef CDataType* data_type = sp_array.get().type().get()
*/
                        __pyx_t_3 = NULL;
                        __pyx_t_4 = 1;
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_ChunkedArray_was_NULL};
                          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                          if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 248, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_2);
                        }
                        __Pyx_Raise(__pyx_t_2, 0, 0, 0);
                        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                        __PYX_ERR(21, 248, __pyx_L1_error)

                        /* "pyarrow/public-api.pxi":247
 * cdef api object pyarrow_wrap_chunked_array(
 *         const shared_ptr[CChunkedArray]& sp_array):
 *     if sp_array.get() == NULL:             # <<<<<<<<<<<<<<
 *         raise ValueError('ChunkedArray was NULL')
 * 
*/
                      }

                      /* "pyarrow/public-api.pxi":250
 *         raise ValueError('ChunkedArray was NULL')
 * 
 *     cdef CDataType* data_type = sp_array.get().type().get()             # <<<<<<<<<<<<<<
 * 
 *     if data_type == NULL:
*/
                      __pyx_v_data_type = __pyx_v_sp_array.get()->type().get();

                      /* "pyarrow/public-api.pxi":252
 *     cdef CDataType* data_type = sp_array.get().type().get()
 * 
 *     if data_type == NULL:             # <<<<<<<<<<<<<<
 *         raise ValueError('ChunkedArray data type was NULL')
 * 
*/
                      __pyx_t_1 = (__pyx_v_data_type == NULL);
                      if (unlikely(__pyx_t_1)) {

                        /* "pyarrow/public-api.pxi":253
 * 
 *     if data_type == NULL:
 *         raise ValueError('ChunkedArray data type was NULL')             # <<<<<<<<<<<<<<
 * 
 *     cdef ChunkedArray arr = ChunkedArray.__new__(ChunkedArray)
*/
                        __pyx_t_3 = NULL;
                        __pyx_t_4 = 1;
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_ChunkedArray_data_type_was_NULL};
                          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                          if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 253, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_2);
                        }
                        __Pyx_Raise(__pyx_t_2, 0, 0, 0);
                        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                        __PYX_ERR(21, 253, __pyx_L1_error)

                        /* "pyarrow/public-api.pxi":252
 *     cdef CDataType* data_type = sp_array.get().type().get()
 * 
 *     if data_type == NULL:             # <<<<<<<<<<<<<<
 *         raise ValueError('ChunkedArray data type was NULL')
 * 
*/
                      }

                      /* "pyarrow/public-api.pxi":255
 *         raise ValueError('ChunkedArray data type was NULL')
 * 
 *     cdef ChunkedArray arr = ChunkedArray.__new__(ChunkedArray)             # <<<<<<<<<<<<<<
 *     arr.init(sp_array)
 *     return arr
*/
                      __pyx_t_2 = ((PyObject *)__pyx_tp_new_7pyarrow_3lib_ChunkedArray(((PyTypeObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ChunkedArray), __pyx_mstate_global->__pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 255, __pyx_L1_error)
                      __Pyx_GOTREF((PyObject *)__pyx_t_2);
                      __pyx_v_arr = ((struct __pyx_obj_7pyarrow_3lib_ChunkedArray *)__pyx_t_2);
                      __pyx_t_2 = 0;

                      /* "pyarrow/public-api.pxi":256
 * 
 *     cdef ChunkedArray arr = ChunkedArray.__new__(ChunkedArray)
 *     arr.init(sp_array)             # <<<<<<<<<<<<<<
 *     return arr
 * 
*/
                      if (unlikely(((PyObject *)__pyx_v_arr) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "init");
                        __PYX_ERR(21, 256, __pyx_L1_error)
                      }
                      ((struct __pyx_vtabstruct_7pyarrow_3lib_ChunkedArray *)__pyx_v_arr->__pyx_vtab)->init(__pyx_v_arr, __pyx_v_sp_array); if (unlikely(PyErr_Occurred())) __PYX_ERR(21, 256, __pyx_L1_error)

                      /* "pyarrow/public-api.pxi":257
 *     cdef ChunkedArray arr = ChunkedArray.__new__(ChunkedArray)
 *     arr.init(sp_array)
 *     return arr             # <<<<<<<<<<<<<<
 * 
 * 
*/
                      __Pyx_XDECREF(__pyx_r);
                      __Pyx_INCREF((PyObject *)__pyx_v_arr);
                      __pyx_r = ((PyObject *)__pyx_v_arr);
                      goto __pyx_L0;

                      /* "pyarrow/public-api.pxi":245
 * 
 * 
 * cdef api object pyarrow_wrap_chunked_array(             # <<<<<<<<<<<<<<
 *         const shared_ptr[CChunkedArray]& sp_array):
 *     if sp_array.get() == NULL:
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_AddTraceback("pyarrow.lib.pyarrow_wrap_chunked_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = 0;
                      __pyx_L0:;
                      __Pyx_XDECREF((PyObject *)__pyx_v_arr);
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/public-api.pxi":260
 * 
 * 
 * cdef api bint pyarrow_is_scalar(object value):             # <<<<<<<<<<<<<<
 *     return isinstance(value, Scalar)
 * 
*/

                    static int __pyx_f_7pyarrow_3lib_pyarrow_is_scalar(PyObject *__pyx_v_value) {
                      int __pyx_r;
                      int __pyx_t_1;

                      /* "pyarrow/public-api.pxi":261
 * 
 * cdef api bint pyarrow_is_scalar(object value):
 *     return isinstance(value, Scalar)             # <<<<<<<<<<<<<<
 * 
 * 
*/
                      __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_value, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Scalar); 
                      __pyx_r = __pyx_t_1;
                      goto __pyx_L0;

                      /* "pyarrow/public-api.pxi":260
 * 
 * 
 * cdef api bint pyarrow_is_scalar(object value):             # <<<<<<<<<<<<<<
 *     return isinstance(value, Scalar)
 * 
*/

                      /* function exit code */
                      __pyx_L0:;
                      return __pyx_r;
                    }

                    /* "pyarrow/public-api.pxi":264
 * 
 * 
 * cdef api shared_ptr[CScalar] pyarrow_unwrap_scalar(object scalar):             # <<<<<<<<<<<<<<
 *     if pyarrow_is_scalar(scalar):
 *         return (<Scalar> scalar).unwrap()
*/

                    std::shared_ptr< arrow::Scalar>  pyarrow_unwrap_scalar(PyObject *__pyx_v_scalar) {
                      std::shared_ptr< arrow::Scalar>  __pyx_r;
                      int __pyx_t_1;
                      std::shared_ptr< arrow::Scalar>  __pyx_t_2;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;

                      /* "pyarrow/public-api.pxi":265
 * 
 * cdef api shared_ptr[CScalar] pyarrow_unwrap_scalar(object scalar):
 *     if pyarrow_is_scalar(scalar):             # <<<<<<<<<<<<<<
 *         return (<Scalar> scalar).unwrap()
 *     return shared_ptr[CScalar]()
*/
                      __pyx_t_1 = __pyx_f_7pyarrow_3lib_pyarrow_is_scalar(__pyx_v_scalar); if (unlikely(__pyx_t_1 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(21, 265, __pyx_L1_error)
                      if (__pyx_t_1) {

                        /* "pyarrow/public-api.pxi":266
 * cdef api shared_ptr[CScalar] pyarrow_unwrap_scalar(object scalar):
 *     if pyarrow_is_scalar(scalar):
 *         return (<Scalar> scalar).unwrap()             # <<<<<<<<<<<<<<
 *     return shared_ptr[CScalar]()
 * 
*/
                        if (unlikely(__pyx_v_scalar == Py_None)) {
                          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "unwrap");
                          __PYX_ERR(21, 266, __pyx_L1_error)
                        }
                        __pyx_t_2 = __pyx_f_7pyarrow_3lib_6Scalar_unwrap(((struct __pyx_obj_7pyarrow_3lib_Scalar *)__pyx_v_scalar)); if (unlikely(PyErr_Occurred())) __PYX_ERR(21, 266, __pyx_L1_error)
                        __pyx_r = __pyx_t_2;
                        goto __pyx_L0;

                        /* "pyarrow/public-api.pxi":265
 * 
 * cdef api shared_ptr[CScalar] pyarrow_unwrap_scalar(object scalar):
 *     if pyarrow_is_scalar(scalar):             # <<<<<<<<<<<<<<
 *         return (<Scalar> scalar).unwrap()
 *     return shared_ptr[CScalar]()
*/
                      }

                      /* "pyarrow/public-api.pxi":267
 *     if pyarrow_is_scalar(scalar):
 *         return (<Scalar> scalar).unwrap()
 *     return shared_ptr[CScalar]()             # <<<<<<<<<<<<<<
 * 
 * 
*/
                      __pyx_r = std::shared_ptr< arrow::Scalar> ();
                      goto __pyx_L0;

                      /* "pyarrow/public-api.pxi":264
 * 
 * 
 * cdef api shared_ptr[CScalar] pyarrow_unwrap_scalar(object scalar):             # <<<<<<<<<<<<<<
 *     if pyarrow_is_scalar(scalar):
 *         return (<Scalar> scalar).unwrap()
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib.pyarrow_unwrap_scalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_pretend_to_initialize(&__pyx_r);
                      __pyx_L0:;
                      return __pyx_r;
                    }

                    /* "pyarrow/public-api.pxi":270
 * 
 * 
 * cdef api object pyarrow_wrap_scalar(const shared_ptr[CScalar]& sp_scalar):             # <<<<<<<<<<<<<<
 *     if sp_scalar.get() == NULL:
 *         raise ValueError('Scalar was NULL')
*/

                    PyObject *pyarrow_wrap_scalar(std::shared_ptr< arrow::Scalar>  const &__pyx_v_sp_scalar) {
                       arrow::DataType *__pyx_v_data_type;
                      PyObject *__pyx_v_klass = NULL;
                      struct __pyx_obj_7pyarrow_3lib_Scalar *__pyx_v_scalar = 0;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_t_1;
                      PyObject *__pyx_t_2 = NULL;
                      PyObject *__pyx_t_3 = NULL;
                      size_t __pyx_t_4;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("pyarrow_wrap_scalar", 0);

                      /* "pyarrow/public-api.pxi":271
 * 
 * cdef api object pyarrow_wrap_scalar(const shared_ptr[CScalar]& sp_scalar):
 *     if sp_scalar.get() == NULL:             # <<<<<<<<<<<<<<
 *         raise ValueError('Scalar was NULL')
 * 
*/
                      __pyx_t_1 = (__pyx_v_sp_scalar.get() == NULL);
                      if (unlikely(__pyx_t_1)) {

                        /* "pyarrow/public-api.pxi":272
 * cdef api object pyarrow_wrap_scalar(const shared_ptr[CScalar]& sp_scalar):
 *     if sp_scalar.get() == NULL:
 *         raise ValueError('Scalar was NULL')             # <<<<<<<<<<<<<<
 * 
 *     cdef CDataType* data_type = sp_scalar.get().type.get()
*/
                        __pyx_t_3 = NULL;
                        __pyx_t_4 = 1;
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Scalar_was_NULL};
                          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                          if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 272, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_2);
                        }
                        __Pyx_Raise(__pyx_t_2, 0, 0, 0);
                        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                        __PYX_ERR(21, 272, __pyx_L1_error)

                        /* "pyarrow/public-api.pxi":271
 * 
 * cdef api object pyarrow_wrap_scalar(const shared_ptr[CScalar]& sp_scalar):
 *     if sp_scalar.get() == NULL:             # <<<<<<<<<<<<<<
 *         raise ValueError('Scalar was NULL')
 * 
*/
                      }

                      /* "pyarrow/public-api.pxi":274
 *         raise ValueError('Scalar was NULL')
 * 
 *     cdef CDataType* data_type = sp_scalar.get().type.get()             # <<<<<<<<<<<<<<
 * 
 *     if data_type == NULL:
*/
                      __pyx_v_data_type = __pyx_v_sp_scalar.get()->type.get();

                      /* "pyarrow/public-api.pxi":276
 *     cdef CDataType* data_type = sp_scalar.get().type.get()
 * 
 *     if data_type == NULL:             # <<<<<<<<<<<<<<
 *         raise ValueError('Scalar data type was NULL')
 * 
*/
                      __pyx_t_1 = (__pyx_v_data_type == NULL);
                      if (unlikely(__pyx_t_1)) {

                        /* "pyarrow/public-api.pxi":277
 * 
 *     if data_type == NULL:
 *         raise ValueError('Scalar data type was NULL')             # <<<<<<<<<<<<<<
 * 
 *     if data_type.id() == _Type_NA:
*/
                        __pyx_t_3 = NULL;
                        __pyx_t_4 = 1;
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Scalar_data_type_was_NULL};
                          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                          if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 277, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_2);
                        }
                        __Pyx_Raise(__pyx_t_2, 0, 0, 0);
                        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                        __PYX_ERR(21, 277, __pyx_L1_error)

                        /* "pyarrow/public-api.pxi":276
 *     cdef CDataType* data_type = sp_scalar.get().type.get()
 * 
 *     if data_type == NULL:             # <<<<<<<<<<<<<<
 *         raise ValueError('Scalar data type was NULL')
 * 
*/
                      }

                      /* "pyarrow/public-api.pxi":279
 *         raise ValueError('Scalar data type was NULL')
 * 
 *     if data_type.id() == _Type_NA:             # <<<<<<<<<<<<<<
 *         return _NULL
 * 
*/
                      __pyx_t_1 = (__pyx_v_data_type->id() ==  arrow::Type::NA);
                      if (__pyx_t_1) {

                        /* "pyarrow/public-api.pxi":280
 * 
 *     if data_type.id() == _Type_NA:
 *         return _NULL             # <<<<<<<<<<<<<<
 * 
 *     if data_type.id() not in _scalar_classes:
*/
                        __Pyx_XDECREF(__pyx_r);
                        __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 280, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_2);
                        __pyx_r = __pyx_t_2;
                        __pyx_t_2 = 0;
                        goto __pyx_L0;

                        /* "pyarrow/public-api.pxi":279
 *         raise ValueError('Scalar data type was NULL')
 * 
 *     if data_type.id() == _Type_NA:             # <<<<<<<<<<<<<<
 *         return _NULL
 * 
*/
                      }

                      /* "pyarrow/public-api.pxi":282
 *         return _NULL
 * 
 *     if data_type.id() not in _scalar_classes:             # <<<<<<<<<<<<<<
 *         raise ValueError('Scalar type not supported')
 * 
*/
                      __pyx_t_2 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type(__pyx_v_data_type->id()); if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 282, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_2);
                      if (unlikely(__pyx_v_7pyarrow_3lib__scalar_classes == Py_None)) {
                        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
                        __PYX_ERR(21, 282, __pyx_L1_error)
                      }
                      __pyx_t_1 = (__Pyx_PyDict_ContainsTF(__pyx_t_2, __pyx_v_7pyarrow_3lib__scalar_classes, Py_NE)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(21, 282, __pyx_L1_error)
                      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                      if (unlikely(__pyx_t_1)) {

                        /* "pyarrow/public-api.pxi":283
 * 
 *     if data_type.id() not in _scalar_classes:
 *         raise ValueError('Scalar type not supported')             # <<<<<<<<<<<<<<
 * 
 *     klass = get_scalar_class_from_type(sp_scalar.get().type)
*/
                        __pyx_t_3 = NULL;
                        __pyx_t_4 = 1;
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Scalar_type_not_supported};
                          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                          if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 283, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_2);
                        }
                        __Pyx_Raise(__pyx_t_2, 0, 0, 0);
                        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                        __PYX_ERR(21, 283, __pyx_L1_error)

                        /* "pyarrow/public-api.pxi":282
 *         return _NULL
 * 
 *     if data_type.id() not in _scalar_classes:             # <<<<<<<<<<<<<<
 *         raise ValueError('Scalar type not supported')
 * 
*/
                      }

                      /* "pyarrow/public-api.pxi":285
 *         raise ValueError('Scalar type not supported')
 * 
 *     klass = get_scalar_class_from_type(sp_scalar.get().type)             # <<<<<<<<<<<<<<
 * 
 *     cdef Scalar scalar = klass.__new__(klass)
*/
                      __pyx_t_2 = __pyx_f_7pyarrow_3lib_get_scalar_class_from_type(__pyx_v_sp_scalar.get()->type); if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 285, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_2);
                      __pyx_v_klass = __pyx_t_2;
                      __pyx_t_2 = 0;

                      /* "pyarrow/public-api.pxi":287
 *     klass = get_scalar_class_from_type(sp_scalar.get().type)
 * 
 *     cdef Scalar scalar = klass.__new__(klass)             # <<<<<<<<<<<<<<
 *     scalar.init(sp_scalar)
 *     return scalar
*/
                      __pyx_t_3 = __pyx_v_klass;
                      __Pyx_INCREF(__pyx_t_3);
                      __pyx_t_4 = 0;
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_klass};
                        __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                        if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 287, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_2);
                      }
                      if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Scalar))))) __PYX_ERR(21, 287, __pyx_L1_error)
                      __pyx_v_scalar = ((struct __pyx_obj_7pyarrow_3lib_Scalar *)__pyx_t_2);
                      __pyx_t_2 = 0;

                      /* "pyarrow/public-api.pxi":288
 * 
 *     cdef Scalar scalar = klass.__new__(klass)
 *     scalar.init(sp_scalar)             # <<<<<<<<<<<<<<
 *     return scalar
 * 
*/
                      if (unlikely(((PyObject *)__pyx_v_scalar) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "init");
                        __PYX_ERR(21, 288, __pyx_L1_error)
                      }
                      ((struct __pyx_vtabstruct_7pyarrow_3lib_Scalar *)__pyx_v_scalar->__pyx_vtab)->init(__pyx_v_scalar, __pyx_v_sp_scalar); if (unlikely(PyErr_Occurred())) __PYX_ERR(21, 288, __pyx_L1_error)

                      /* "pyarrow/public-api.pxi":289
 *     cdef Scalar scalar = klass.__new__(klass)
 *     scalar.init(sp_scalar)
 *     return scalar             # <<<<<<<<<<<<<<
 * 
 * 
*/
                      __Pyx_XDECREF(__pyx_r);
                      __Pyx_INCREF((PyObject *)__pyx_v_scalar);
                      __pyx_r = ((PyObject *)__pyx_v_scalar);
                      goto __pyx_L0;

                      /* "pyarrow/public-api.pxi":270
 * 
 * 
 * cdef api object pyarrow_wrap_scalar(const shared_ptr[CScalar]& sp_scalar):             # <<<<<<<<<<<<<<
 *     if sp_scalar.get() == NULL:
 *         raise ValueError('Scalar was NULL')
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_AddTraceback("pyarrow.lib.pyarrow_wrap_scalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = 0;
                      __pyx_L0:;
                      __Pyx_XDECREF(__pyx_v_klass);
                      __Pyx_XDECREF((PyObject *)__pyx_v_scalar);
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/public-api.pxi":292
 * 
 * 
 * cdef api bint pyarrow_is_tensor(object tensor):             # <<<<<<<<<<<<<<
 *     return isinstance(tensor, Tensor)
 * 
*/

                    static int __pyx_f_7pyarrow_3lib_pyarrow_is_tensor(PyObject *__pyx_v_tensor) {
                      int __pyx_r;
                      int __pyx_t_1;

                      /* "pyarrow/public-api.pxi":293
 * 
 * cdef api bint pyarrow_is_tensor(object tensor):
 *     return isinstance(tensor, Tensor)             # <<<<<<<<<<<<<<
 * 
 * 
*/
                      __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_tensor, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Tensor); 
                      __pyx_r = __pyx_t_1;
                      goto __pyx_L0;

                      /* "pyarrow/public-api.pxi":292
 * 
 * 
 * cdef api bint pyarrow_is_tensor(object tensor):             # <<<<<<<<<<<<<<
 *     return isinstance(tensor, Tensor)
 * 
*/

                      /* function exit code */
                      __pyx_L0:;
                      return __pyx_r;
                    }

                    /* "pyarrow/public-api.pxi":296
 * 
 * 
 * cdef api shared_ptr[CTensor] pyarrow_unwrap_tensor(object tensor):             # <<<<<<<<<<<<<<
 *     cdef Tensor ten
 *     if pyarrow_is_tensor(tensor):
*/

                    std::shared_ptr< arrow::Tensor>  pyarrow_unwrap_tensor(PyObject *__pyx_v_tensor) {
                      struct __pyx_obj_7pyarrow_3lib_Tensor *__pyx_v_ten = 0;
                      std::shared_ptr< arrow::Tensor>  __pyx_r;
                      __Pyx_RefNannyDeclarations
                      int __pyx_t_1;
                      PyObject *__pyx_t_2 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("pyarrow_unwrap_tensor", 0);

                      /* "pyarrow/public-api.pxi":298
 * cdef api shared_ptr[CTensor] pyarrow_unwrap_tensor(object tensor):
 *     cdef Tensor ten
 *     if pyarrow_is_tensor(tensor):             # <<<<<<<<<<<<<<
 *         ten = <Tensor>(tensor)
 *         return ten.sp_tensor
*/
                      __pyx_t_1 = __pyx_f_7pyarrow_3lib_pyarrow_is_tensor(__pyx_v_tensor); if (unlikely(__pyx_t_1 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(21, 298, __pyx_L1_error)
                      if (__pyx_t_1) {

                        /* "pyarrow/public-api.pxi":299
 *     cdef Tensor ten
 *     if pyarrow_is_tensor(tensor):
 *         ten = <Tensor>(tensor)             # <<<<<<<<<<<<<<
 *         return ten.sp_tensor
 * 
*/
                        __pyx_t_2 = __pyx_v_tensor;
                        __Pyx_INCREF(__pyx_t_2);
                        __pyx_v_ten = ((struct __pyx_obj_7pyarrow_3lib_Tensor *)__pyx_t_2);
                        __pyx_t_2 = 0;

                        /* "pyarrow/public-api.pxi":300
 *     if pyarrow_is_tensor(tensor):
 *         ten = <Tensor>(tensor)
 *         return ten.sp_tensor             # <<<<<<<<<<<<<<
 * 
 *     return shared_ptr[CTensor]()
*/
                        if (unlikely(((PyObject *)__pyx_v_ten) == Py_None)) {
                          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_tensor");
                          __PYX_ERR(21, 300, __pyx_L1_error)
                        }
                        __pyx_r = __pyx_v_ten->sp_tensor;
                        goto __pyx_L0;

                        /* "pyarrow/public-api.pxi":298
 * cdef api shared_ptr[CTensor] pyarrow_unwrap_tensor(object tensor):
 *     cdef Tensor ten
 *     if pyarrow_is_tensor(tensor):             # <<<<<<<<<<<<<<
 *         ten = <Tensor>(tensor)
 *         return ten.sp_tensor
*/
                      }

                      /* "pyarrow/public-api.pxi":302
 *         return ten.sp_tensor
 * 
 *     return shared_ptr[CTensor]()             # <<<<<<<<<<<<<<
 * 
 * 
*/
                      __pyx_r = std::shared_ptr< arrow::Tensor> ();
                      goto __pyx_L0;

                      /* "pyarrow/public-api.pxi":296
 * 
 * 
 * cdef api shared_ptr[CTensor] pyarrow_unwrap_tensor(object tensor):             # <<<<<<<<<<<<<<
 *     cdef Tensor ten
 *     if pyarrow_is_tensor(tensor):
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_AddTraceback("pyarrow.lib.pyarrow_unwrap_tensor", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_pretend_to_initialize(&__pyx_r);
                      __pyx_L0:;
                      __Pyx_XDECREF((PyObject *)__pyx_v_ten);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/public-api.pxi":305
 * 
 * 
 * cdef api object pyarrow_wrap_tensor(             # <<<<<<<<<<<<<<
 *         const shared_ptr[CTensor]& sp_tensor):
 *     if sp_tensor.get() == NULL:
*/

                    PyObject *pyarrow_wrap_tensor(std::shared_ptr< arrow::Tensor>  const &__pyx_v_sp_tensor) {
                      struct __pyx_obj_7pyarrow_3lib_Tensor *__pyx_v_tensor = 0;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_t_1;
                      PyObject *__pyx_t_2 = NULL;
                      PyObject *__pyx_t_3 = NULL;
                      size_t __pyx_t_4;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("pyarrow_wrap_tensor", 0);

                      /* "pyarrow/public-api.pxi":307
 * cdef api object pyarrow_wrap_tensor(
 *         const shared_ptr[CTensor]& sp_tensor):
 *     if sp_tensor.get() == NULL:             # <<<<<<<<<<<<<<
 *         raise ValueError('Tensor was NULL')
 * 
*/
                      __pyx_t_1 = (__pyx_v_sp_tensor.get() == NULL);
                      if (unlikely(__pyx_t_1)) {

                        /* "pyarrow/public-api.pxi":308
 *         const shared_ptr[CTensor]& sp_tensor):
 *     if sp_tensor.get() == NULL:
 *         raise ValueError('Tensor was NULL')             # <<<<<<<<<<<<<<
 * 
 *     cdef Tensor tensor = Tensor.__new__(Tensor)
*/
                        __pyx_t_3 = NULL;
                        __pyx_t_4 = 1;
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Tensor_was_NULL};
                          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                          if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 308, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_2);
                        }
                        __Pyx_Raise(__pyx_t_2, 0, 0, 0);
                        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                        __PYX_ERR(21, 308, __pyx_L1_error)

                        /* "pyarrow/public-api.pxi":307
 * cdef api object pyarrow_wrap_tensor(
 *         const shared_ptr[CTensor]& sp_tensor):
 *     if sp_tensor.get() == NULL:             # <<<<<<<<<<<<<<
 *         raise ValueError('Tensor was NULL')
 * 
*/
                      }

                      /* "pyarrow/public-api.pxi":310
 *         raise ValueError('Tensor was NULL')
 * 
 *     cdef Tensor tensor = Tensor.__new__(Tensor)             # <<<<<<<<<<<<<<
 *     tensor.init(sp_tensor)
 *     return tensor
*/
                      __pyx_t_2 = ((PyObject *)__pyx_tp_new_7pyarrow_3lib_Tensor(((PyTypeObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Tensor), __pyx_mstate_global->__pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 310, __pyx_L1_error)
                      __Pyx_GOTREF((PyObject *)__pyx_t_2);
                      __pyx_v_tensor = ((struct __pyx_obj_7pyarrow_3lib_Tensor *)__pyx_t_2);
                      __pyx_t_2 = 0;

                      /* "pyarrow/public-api.pxi":311
 * 
 *     cdef Tensor tensor = Tensor.__new__(Tensor)
 *     tensor.init(sp_tensor)             # <<<<<<<<<<<<<<
 *     return tensor
 * 
*/
                      if (unlikely(((PyObject *)__pyx_v_tensor) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "init");
                        __PYX_ERR(21, 311, __pyx_L1_error)
                      }
                      ((struct __pyx_vtabstruct_7pyarrow_3lib_Tensor *)__pyx_v_tensor->__pyx_vtab)->init(__pyx_v_tensor, __pyx_v_sp_tensor); if (unlikely(PyErr_Occurred())) __PYX_ERR(21, 311, __pyx_L1_error)

                      /* "pyarrow/public-api.pxi":312
 *     cdef Tensor tensor = Tensor.__new__(Tensor)
 *     tensor.init(sp_tensor)
 *     return tensor             # <<<<<<<<<<<<<<
 * 
 * 
*/
                      __Pyx_XDECREF(__pyx_r);
                      __Pyx_INCREF((PyObject *)__pyx_v_tensor);
                      __pyx_r = ((PyObject *)__pyx_v_tensor);
                      goto __pyx_L0;

                      /* "pyarrow/public-api.pxi":305
 * 
 * 
 * cdef api object pyarrow_wrap_tensor(             # <<<<<<<<<<<<<<
 *         const shared_ptr[CTensor]& sp_tensor):
 *     if sp_tensor.get() == NULL:
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_AddTraceback("pyarrow.lib.pyarrow_wrap_tensor", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = 0;
                      __pyx_L0:;
                      __Pyx_XDECREF((PyObject *)__pyx_v_tensor);
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/public-api.pxi":315
 * 
 * 
 * cdef api bint pyarrow_is_sparse_coo_tensor(object sparse_tensor):             # <<<<<<<<<<<<<<
 *     return isinstance(sparse_tensor, SparseCOOTensor)
 * 
*/

                    static int __pyx_f_7pyarrow_3lib_pyarrow_is_sparse_coo_tensor(PyObject *__pyx_v_sparse_tensor) {
                      int __pyx_r;
                      int __pyx_t_1;

                      /* "pyarrow/public-api.pxi":316
 * 
 * cdef api bint pyarrow_is_sparse_coo_tensor(object sparse_tensor):
 *     return isinstance(sparse_tensor, SparseCOOTensor)             # <<<<<<<<<<<<<<
 * 
 * cdef api shared_ptr[CSparseCOOTensor] pyarrow_unwrap_sparse_coo_tensor(
*/
                      __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_sparse_tensor, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_SparseCOOTensor); 
                      __pyx_r = __pyx_t_1;
                      goto __pyx_L0;

                      /* "pyarrow/public-api.pxi":315
 * 
 * 
 * cdef api bint pyarrow_is_sparse_coo_tensor(object sparse_tensor):             # <<<<<<<<<<<<<<
 *     return isinstance(sparse_tensor, SparseCOOTensor)
 * 
*/

                      /* function exit code */
                      __pyx_L0:;
                      return __pyx_r;
                    }

                    /* "pyarrow/public-api.pxi":318
 *     return isinstance(sparse_tensor, SparseCOOTensor)
 * 
 * cdef api shared_ptr[CSparseCOOTensor] pyarrow_unwrap_sparse_coo_tensor(             # <<<<<<<<<<<<<<
 *         object sparse_tensor):
 *     cdef SparseCOOTensor sten
*/

                    std::shared_ptr< arrow::SparseCOOTensor>  pyarrow_unwrap_sparse_coo_tensor(PyObject *__pyx_v_sparse_tensor) {
                      struct __pyx_obj_7pyarrow_3lib_SparseCOOTensor *__pyx_v_sten = 0;
                      std::shared_ptr< arrow::SparseCOOTensor>  __pyx_r;
                      __Pyx_RefNannyDeclarations
                      int __pyx_t_1;
                      PyObject *__pyx_t_2 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("pyarrow_unwrap_sparse_coo_tensor", 0);

                      /* "pyarrow/public-api.pxi":321
 *         object sparse_tensor):
 *     cdef SparseCOOTensor sten
 *     if pyarrow_is_sparse_coo_tensor(sparse_tensor):             # <<<<<<<<<<<<<<
 *         sten = <SparseCOOTensor>(sparse_tensor)
 *         return sten.sp_sparse_tensor
*/
                      __pyx_t_1 = __pyx_f_7pyarrow_3lib_pyarrow_is_sparse_coo_tensor(__pyx_v_sparse_tensor); if (unlikely(__pyx_t_1 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(21, 321, __pyx_L1_error)
                      if (__pyx_t_1) {

                        /* "pyarrow/public-api.pxi":322
 *     cdef SparseCOOTensor sten
 *     if pyarrow_is_sparse_coo_tensor(sparse_tensor):
 *         sten = <SparseCOOTensor>(sparse_tensor)             # <<<<<<<<<<<<<<
 *         return sten.sp_sparse_tensor
 * 
*/
                        __pyx_t_2 = __pyx_v_sparse_tensor;
                        __Pyx_INCREF(__pyx_t_2);
                        __pyx_v_sten = ((struct __pyx_obj_7pyarrow_3lib_SparseCOOTensor *)__pyx_t_2);
                        __pyx_t_2 = 0;

                        /* "pyarrow/public-api.pxi":323
 *     if pyarrow_is_sparse_coo_tensor(sparse_tensor):
 *         sten = <SparseCOOTensor>(sparse_tensor)
 *         return sten.sp_sparse_tensor             # <<<<<<<<<<<<<<
 * 
 *     return shared_ptr[CSparseCOOTensor]()
*/
                        if (unlikely(((PyObject *)__pyx_v_sten) == Py_None)) {
                          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_sparse_tensor");
                          __PYX_ERR(21, 323, __pyx_L1_error)
                        }
                        __pyx_r = __pyx_v_sten->sp_sparse_tensor;
                        goto __pyx_L0;

                        /* "pyarrow/public-api.pxi":321
 *         object sparse_tensor):
 *     cdef SparseCOOTensor sten
 *     if pyarrow_is_sparse_coo_tensor(sparse_tensor):             # <<<<<<<<<<<<<<
 *         sten = <SparseCOOTensor>(sparse_tensor)
 *         return sten.sp_sparse_tensor
*/
                      }

                      /* "pyarrow/public-api.pxi":325
 *         return sten.sp_sparse_tensor
 * 
 *     return shared_ptr[CSparseCOOTensor]()             # <<<<<<<<<<<<<<
 * 
 * cdef api object pyarrow_wrap_sparse_coo_tensor(
*/
                      __pyx_r = std::shared_ptr< arrow::SparseCOOTensor> ();
                      goto __pyx_L0;

                      /* "pyarrow/public-api.pxi":318
 *     return isinstance(sparse_tensor, SparseCOOTensor)
 * 
 * cdef api shared_ptr[CSparseCOOTensor] pyarrow_unwrap_sparse_coo_tensor(             # <<<<<<<<<<<<<<
 *         object sparse_tensor):
 *     cdef SparseCOOTensor sten
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_AddTraceback("pyarrow.lib.pyarrow_unwrap_sparse_coo_tensor", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_pretend_to_initialize(&__pyx_r);
                      __pyx_L0:;
                      __Pyx_XDECREF((PyObject *)__pyx_v_sten);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/public-api.pxi":327
 *     return shared_ptr[CSparseCOOTensor]()
 * 
 * cdef api object pyarrow_wrap_sparse_coo_tensor(             # <<<<<<<<<<<<<<
 *         const shared_ptr[CSparseCOOTensor]& sp_sparse_tensor):
 *     if sp_sparse_tensor.get() == NULL:
*/

                    PyObject *pyarrow_wrap_sparse_coo_tensor(std::shared_ptr< arrow::SparseCOOTensor>  const &__pyx_v_sp_sparse_tensor) {
                      struct __pyx_obj_7pyarrow_3lib_SparseCOOTensor *__pyx_v_sparse_tensor = 0;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_t_1;
                      PyObject *__pyx_t_2 = NULL;
                      PyObject *__pyx_t_3 = NULL;
                      size_t __pyx_t_4;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("pyarrow_wrap_sparse_coo_tensor", 0);

                      /* "pyarrow/public-api.pxi":329
 * cdef api object pyarrow_wrap_sparse_coo_tensor(
 *         const shared_ptr[CSparseCOOTensor]& sp_sparse_tensor):
 *     if sp_sparse_tensor.get() == NULL:             # <<<<<<<<<<<<<<
 *         raise ValueError('SparseCOOTensor was NULL')
 * 
*/
                      __pyx_t_1 = (__pyx_v_sp_sparse_tensor.get() == NULL);
                      if (unlikely(__pyx_t_1)) {

                        /* "pyarrow/public-api.pxi":330
 *         const shared_ptr[CSparseCOOTensor]& sp_sparse_tensor):
 *     if sp_sparse_tensor.get() == NULL:
 *         raise ValueError('SparseCOOTensor was NULL')             # <<<<<<<<<<<<<<
 * 
 *     cdef SparseCOOTensor sparse_tensor = SparseCOOTensor.__new__(
*/
                        __pyx_t_3 = NULL;
                        __pyx_t_4 = 1;
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_SparseCOOTensor_was_NULL};
                          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                          if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 330, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_2);
                        }
                        __Pyx_Raise(__pyx_t_2, 0, 0, 0);
                        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                        __PYX_ERR(21, 330, __pyx_L1_error)

                        /* "pyarrow/public-api.pxi":329
 * cdef api object pyarrow_wrap_sparse_coo_tensor(
 *         const shared_ptr[CSparseCOOTensor]& sp_sparse_tensor):
 *     if sp_sparse_tensor.get() == NULL:             # <<<<<<<<<<<<<<
 *         raise ValueError('SparseCOOTensor was NULL')
 * 
*/
                      }

                      /* "pyarrow/public-api.pxi":332
 *         raise ValueError('SparseCOOTensor was NULL')
 * 
 *     cdef SparseCOOTensor sparse_tensor = SparseCOOTensor.__new__(             # <<<<<<<<<<<<<<
 *         SparseCOOTensor)
 *     sparse_tensor.init(sp_sparse_tensor)
*/
                      __pyx_t_2 = ((PyObject *)__pyx_tp_new_7pyarrow_3lib_SparseCOOTensor(((PyTypeObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_SparseCOOTensor), __pyx_mstate_global->__pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 332, __pyx_L1_error)
                      __Pyx_GOTREF((PyObject *)__pyx_t_2);
                      __pyx_v_sparse_tensor = ((struct __pyx_obj_7pyarrow_3lib_SparseCOOTensor *)__pyx_t_2);
                      __pyx_t_2 = 0;

                      /* "pyarrow/public-api.pxi":334
 *     cdef SparseCOOTensor sparse_tensor = SparseCOOTensor.__new__(
 *         SparseCOOTensor)
 *     sparse_tensor.init(sp_sparse_tensor)             # <<<<<<<<<<<<<<
 *     return sparse_tensor
 * 
*/
                      if (unlikely(((PyObject *)__pyx_v_sparse_tensor) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "init");
                        __PYX_ERR(21, 334, __pyx_L1_error)
                      }
                      ((struct __pyx_vtabstruct_7pyarrow_3lib_SparseCOOTensor *)__pyx_v_sparse_tensor->__pyx_vtab)->init(__pyx_v_sparse_tensor, __pyx_v_sp_sparse_tensor); if (unlikely(PyErr_Occurred())) __PYX_ERR(21, 334, __pyx_L1_error)

                      /* "pyarrow/public-api.pxi":335
 *         SparseCOOTensor)
 *     sparse_tensor.init(sp_sparse_tensor)
 *     return sparse_tensor             # <<<<<<<<<<<<<<
 * 
 * 
*/
                      __Pyx_XDECREF(__pyx_r);
                      __Pyx_INCREF((PyObject *)__pyx_v_sparse_tensor);
                      __pyx_r = ((PyObject *)__pyx_v_sparse_tensor);
                      goto __pyx_L0;

                      /* "pyarrow/public-api.pxi":327
 *     return shared_ptr[CSparseCOOTensor]()
 * 
 * cdef api object pyarrow_wrap_sparse_coo_tensor(             # <<<<<<<<<<<<<<
 *         const shared_ptr[CSparseCOOTensor]& sp_sparse_tensor):
 *     if sp_sparse_tensor.get() == NULL:
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_AddTraceback("pyarrow.lib.pyarrow_wrap_sparse_coo_tensor", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = 0;
                      __pyx_L0:;
                      __Pyx_XDECREF((PyObject *)__pyx_v_sparse_tensor);
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/public-api.pxi":338
 * 
 * 
 * cdef api bint pyarrow_is_sparse_csr_matrix(object sparse_tensor):             # <<<<<<<<<<<<<<
 *     return isinstance(sparse_tensor, SparseCSRMatrix)
 * 
*/

                    static int __pyx_f_7pyarrow_3lib_pyarrow_is_sparse_csr_matrix(PyObject *__pyx_v_sparse_tensor) {
                      int __pyx_r;
                      int __pyx_t_1;

                      /* "pyarrow/public-api.pxi":339
 * 
 * cdef api bint pyarrow_is_sparse_csr_matrix(object sparse_tensor):
 *     return isinstance(sparse_tensor, SparseCSRMatrix)             # <<<<<<<<<<<<<<
 * 
 * cdef api shared_ptr[CSparseCSRMatrix] pyarrow_unwrap_sparse_csr_matrix(
*/
                      __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_sparse_tensor, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_SparseCSRMatrix); 
                      __pyx_r = __pyx_t_1;
                      goto __pyx_L0;

                      /* "pyarrow/public-api.pxi":338
 * 
 * 
 * cdef api bint pyarrow_is_sparse_csr_matrix(object sparse_tensor):             # <<<<<<<<<<<<<<
 *     return isinstance(sparse_tensor, SparseCSRMatrix)
 * 
*/

                      /* function exit code */
                      __pyx_L0:;
                      return __pyx_r;
                    }

                    /* "pyarrow/public-api.pxi":341
 *     return isinstance(sparse_tensor, SparseCSRMatrix)
 * 
 * cdef api shared_ptr[CSparseCSRMatrix] pyarrow_unwrap_sparse_csr_matrix(             # <<<<<<<<<<<<<<
 *         object sparse_tensor):
 *     cdef SparseCSRMatrix sten
*/

                    std::shared_ptr< arrow::SparseCSRMatrix>  pyarrow_unwrap_sparse_csr_matrix(PyObject *__pyx_v_sparse_tensor) {
                      struct __pyx_obj_7pyarrow_3lib_SparseCSRMatrix *__pyx_v_sten = 0;
                      std::shared_ptr< arrow::SparseCSRMatrix>  __pyx_r;
                      __Pyx_RefNannyDeclarations
                      int __pyx_t_1;
                      PyObject *__pyx_t_2 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("pyarrow_unwrap_sparse_csr_matrix", 0);

                      /* "pyarrow/public-api.pxi":344
 *         object sparse_tensor):
 *     cdef SparseCSRMatrix sten
 *     if pyarrow_is_sparse_csr_matrix(sparse_tensor):             # <<<<<<<<<<<<<<
 *         sten = <SparseCSRMatrix>(sparse_tensor)
 *         return sten.sp_sparse_tensor
*/
                      __pyx_t_1 = __pyx_f_7pyarrow_3lib_pyarrow_is_sparse_csr_matrix(__pyx_v_sparse_tensor); if (unlikely(__pyx_t_1 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(21, 344, __pyx_L1_error)
                      if (__pyx_t_1) {

                        /* "pyarrow/public-api.pxi":345
 *     cdef SparseCSRMatrix sten
 *     if pyarrow_is_sparse_csr_matrix(sparse_tensor):
 *         sten = <SparseCSRMatrix>(sparse_tensor)             # <<<<<<<<<<<<<<
 *         return sten.sp_sparse_tensor
 * 
*/
                        __pyx_t_2 = __pyx_v_sparse_tensor;
                        __Pyx_INCREF(__pyx_t_2);
                        __pyx_v_sten = ((struct __pyx_obj_7pyarrow_3lib_SparseCSRMatrix *)__pyx_t_2);
                        __pyx_t_2 = 0;

                        /* "pyarrow/public-api.pxi":346
 *     if pyarrow_is_sparse_csr_matrix(sparse_tensor):
 *         sten = <SparseCSRMatrix>(sparse_tensor)
 *         return sten.sp_sparse_tensor             # <<<<<<<<<<<<<<
 * 
 *     return shared_ptr[CSparseCSRMatrix]()
*/
                        if (unlikely(((PyObject *)__pyx_v_sten) == Py_None)) {
                          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_sparse_tensor");
                          __PYX_ERR(21, 346, __pyx_L1_error)
                        }
                        __pyx_r = __pyx_v_sten->sp_sparse_tensor;
                        goto __pyx_L0;

                        /* "pyarrow/public-api.pxi":344
 *         object sparse_tensor):
 *     cdef SparseCSRMatrix sten
 *     if pyarrow_is_sparse_csr_matrix(sparse_tensor):             # <<<<<<<<<<<<<<
 *         sten = <SparseCSRMatrix>(sparse_tensor)
 *         return sten.sp_sparse_tensor
*/
                      }

                      /* "pyarrow/public-api.pxi":348
 *         return sten.sp_sparse_tensor
 * 
 *     return shared_ptr[CSparseCSRMatrix]()             # <<<<<<<<<<<<<<
 * 
 * cdef api object pyarrow_wrap_sparse_csr_matrix(
*/
                      __pyx_r = std::shared_ptr< arrow::SparseCSRMatrix> ();
                      goto __pyx_L0;

                      /* "pyarrow/public-api.pxi":341
 *     return isinstance(sparse_tensor, SparseCSRMatrix)
 * 
 * cdef api shared_ptr[CSparseCSRMatrix] pyarrow_unwrap_sparse_csr_matrix(             # <<<<<<<<<<<<<<
 *         object sparse_tensor):
 *     cdef SparseCSRMatrix sten
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_AddTraceback("pyarrow.lib.pyarrow_unwrap_sparse_csr_matrix", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_pretend_to_initialize(&__pyx_r);
                      __pyx_L0:;
                      __Pyx_XDECREF((PyObject *)__pyx_v_sten);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/public-api.pxi":350
 *     return shared_ptr[CSparseCSRMatrix]()
 * 
 * cdef api object pyarrow_wrap_sparse_csr_matrix(             # <<<<<<<<<<<<<<
 *         const shared_ptr[CSparseCSRMatrix]& sp_sparse_tensor):
 *     if sp_sparse_tensor.get() == NULL:
*/

                    PyObject *pyarrow_wrap_sparse_csr_matrix(std::shared_ptr< arrow::SparseCSRMatrix>  const &__pyx_v_sp_sparse_tensor) {
                      struct __pyx_obj_7pyarrow_3lib_SparseCSRMatrix *__pyx_v_sparse_tensor = 0;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_t_1;
                      PyObject *__pyx_t_2 = NULL;
                      PyObject *__pyx_t_3 = NULL;
                      size_t __pyx_t_4;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("pyarrow_wrap_sparse_csr_matrix", 0);

                      /* "pyarrow/public-api.pxi":352
 * cdef api object pyarrow_wrap_sparse_csr_matrix(
 *         const shared_ptr[CSparseCSRMatrix]& sp_sparse_tensor):
 *     if sp_sparse_tensor.get() == NULL:             # <<<<<<<<<<<<<<
 *         raise ValueError('SparseCSRMatrix was NULL')
 * 
*/
                      __pyx_t_1 = (__pyx_v_sp_sparse_tensor.get() == NULL);
                      if (unlikely(__pyx_t_1)) {

                        /* "pyarrow/public-api.pxi":353
 *         const shared_ptr[CSparseCSRMatrix]& sp_sparse_tensor):
 *     if sp_sparse_tensor.get() == NULL:
 *         raise ValueError('SparseCSRMatrix was NULL')             # <<<<<<<<<<<<<<
 * 
 *     cdef SparseCSRMatrix sparse_tensor = SparseCSRMatrix.__new__(
*/
                        __pyx_t_3 = NULL;
                        __pyx_t_4 = 1;
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_SparseCSRMatrix_was_NULL};
                          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                          if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 353, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_2);
                        }
                        __Pyx_Raise(__pyx_t_2, 0, 0, 0);
                        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                        __PYX_ERR(21, 353, __pyx_L1_error)

                        /* "pyarrow/public-api.pxi":352
 * cdef api object pyarrow_wrap_sparse_csr_matrix(
 *         const shared_ptr[CSparseCSRMatrix]& sp_sparse_tensor):
 *     if sp_sparse_tensor.get() == NULL:             # <<<<<<<<<<<<<<
 *         raise ValueError('SparseCSRMatrix was NULL')
 * 
*/
                      }

                      /* "pyarrow/public-api.pxi":355
 *         raise ValueError('SparseCSRMatrix was NULL')
 * 
 *     cdef SparseCSRMatrix sparse_tensor = SparseCSRMatrix.__new__(             # <<<<<<<<<<<<<<
 *         SparseCSRMatrix)
 *     sparse_tensor.init(sp_sparse_tensor)
*/
                      __pyx_t_2 = ((PyObject *)__pyx_tp_new_7pyarrow_3lib_SparseCSRMatrix(((PyTypeObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_SparseCSRMatrix), __pyx_mstate_global->__pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 355, __pyx_L1_error)
                      __Pyx_GOTREF((PyObject *)__pyx_t_2);
                      __pyx_v_sparse_tensor = ((struct __pyx_obj_7pyarrow_3lib_SparseCSRMatrix *)__pyx_t_2);
                      __pyx_t_2 = 0;

                      /* "pyarrow/public-api.pxi":357
 *     cdef SparseCSRMatrix sparse_tensor = SparseCSRMatrix.__new__(
 *         SparseCSRMatrix)
 *     sparse_tensor.init(sp_sparse_tensor)             # <<<<<<<<<<<<<<
 *     return sparse_tensor
 * 
*/
                      if (unlikely(((PyObject *)__pyx_v_sparse_tensor) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "init");
                        __PYX_ERR(21, 357, __pyx_L1_error)
                      }
                      ((struct __pyx_vtabstruct_7pyarrow_3lib_SparseCSRMatrix *)__pyx_v_sparse_tensor->__pyx_vtab)->init(__pyx_v_sparse_tensor, __pyx_v_sp_sparse_tensor); if (unlikely(PyErr_Occurred())) __PYX_ERR(21, 357, __pyx_L1_error)

                      /* "pyarrow/public-api.pxi":358
 *         SparseCSRMatrix)
 *     sparse_tensor.init(sp_sparse_tensor)
 *     return sparse_tensor             # <<<<<<<<<<<<<<
 * 
 * 
*/
                      __Pyx_XDECREF(__pyx_r);
                      __Pyx_INCREF((PyObject *)__pyx_v_sparse_tensor);
                      __pyx_r = ((PyObject *)__pyx_v_sparse_tensor);
                      goto __pyx_L0;

                      /* "pyarrow/public-api.pxi":350
 *     return shared_ptr[CSparseCSRMatrix]()
 * 
 * cdef api object pyarrow_wrap_sparse_csr_matrix(             # <<<<<<<<<<<<<<
 *         const shared_ptr[CSparseCSRMatrix]& sp_sparse_tensor):
 *     if sp_sparse_tensor.get() == NULL:
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_AddTraceback("pyarrow.lib.pyarrow_wrap_sparse_csr_matrix", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = 0;
                      __pyx_L0:;
                      __Pyx_XDECREF((PyObject *)__pyx_v_sparse_tensor);
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/public-api.pxi":361
 * 
 * 
 * cdef api bint pyarrow_is_sparse_csc_matrix(object sparse_tensor):             # <<<<<<<<<<<<<<
 *     return isinstance(sparse_tensor, SparseCSCMatrix)
 * 
*/

                    static int __pyx_f_7pyarrow_3lib_pyarrow_is_sparse_csc_matrix(PyObject *__pyx_v_sparse_tensor) {
                      int __pyx_r;
                      int __pyx_t_1;

                      /* "pyarrow/public-api.pxi":362
 * 
 * cdef api bint pyarrow_is_sparse_csc_matrix(object sparse_tensor):
 *     return isinstance(sparse_tensor, SparseCSCMatrix)             # <<<<<<<<<<<<<<
 * 
 * cdef api shared_ptr[CSparseCSCMatrix] pyarrow_unwrap_sparse_csc_matrix(
*/
                      __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_sparse_tensor, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_SparseCSCMatrix); 
                      __pyx_r = __pyx_t_1;
                      goto __pyx_L0;

                      /* "pyarrow/public-api.pxi":361
 * 
 * 
 * cdef api bint pyarrow_is_sparse_csc_matrix(object sparse_tensor):             # <<<<<<<<<<<<<<
 *     return isinstance(sparse_tensor, SparseCSCMatrix)
 * 
*/

                      /* function exit code */
                      __pyx_L0:;
                      return __pyx_r;
                    }

                    /* "pyarrow/public-api.pxi":364
 *     return isinstance(sparse_tensor, SparseCSCMatrix)
 * 
 * cdef api shared_ptr[CSparseCSCMatrix] pyarrow_unwrap_sparse_csc_matrix(             # <<<<<<<<<<<<<<
 *         object sparse_tensor):
 *     cdef SparseCSCMatrix sten
*/

                    std::shared_ptr< arrow::SparseCSCMatrix>  pyarrow_unwrap_sparse_csc_matrix(PyObject *__pyx_v_sparse_tensor) {
                      struct __pyx_obj_7pyarrow_3lib_SparseCSCMatrix *__pyx_v_sten = 0;
                      std::shared_ptr< arrow::SparseCSCMatrix>  __pyx_r;
                      __Pyx_RefNannyDeclarations
                      int __pyx_t_1;
                      PyObject *__pyx_t_2 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("pyarrow_unwrap_sparse_csc_matrix", 0);

                      /* "pyarrow/public-api.pxi":367
 *         object sparse_tensor):
 *     cdef SparseCSCMatrix sten
 *     if pyarrow_is_sparse_csc_matrix(sparse_tensor):             # <<<<<<<<<<<<<<
 *         sten = <SparseCSCMatrix>(sparse_tensor)
 *         return sten.sp_sparse_tensor
*/
                      __pyx_t_1 = __pyx_f_7pyarrow_3lib_pyarrow_is_sparse_csc_matrix(__pyx_v_sparse_tensor); if (unlikely(__pyx_t_1 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(21, 367, __pyx_L1_error)
                      if (__pyx_t_1) {

                        /* "pyarrow/public-api.pxi":368
 *     cdef SparseCSCMatrix sten
 *     if pyarrow_is_sparse_csc_matrix(sparse_tensor):
 *         sten = <SparseCSCMatrix>(sparse_tensor)             # <<<<<<<<<<<<<<
 *         return sten.sp_sparse_tensor
 * 
*/
                        __pyx_t_2 = __pyx_v_sparse_tensor;
                        __Pyx_INCREF(__pyx_t_2);
                        __pyx_v_sten = ((struct __pyx_obj_7pyarrow_3lib_SparseCSCMatrix *)__pyx_t_2);
                        __pyx_t_2 = 0;

                        /* "pyarrow/public-api.pxi":369
 *     if pyarrow_is_sparse_csc_matrix(sparse_tensor):
 *         sten = <SparseCSCMatrix>(sparse_tensor)
 *         return sten.sp_sparse_tensor             # <<<<<<<<<<<<<<
 * 
 *     return shared_ptr[CSparseCSCMatrix]()
*/
                        if (unlikely(((PyObject *)__pyx_v_sten) == Py_None)) {
                          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_sparse_tensor");
                          __PYX_ERR(21, 369, __pyx_L1_error)
                        }
                        __pyx_r = __pyx_v_sten->sp_sparse_tensor;
                        goto __pyx_L0;

                        /* "pyarrow/public-api.pxi":367
 *         object sparse_tensor):
 *     cdef SparseCSCMatrix sten
 *     if pyarrow_is_sparse_csc_matrix(sparse_tensor):             # <<<<<<<<<<<<<<
 *         sten = <SparseCSCMatrix>(sparse_tensor)
 *         return sten.sp_sparse_tensor
*/
                      }

                      /* "pyarrow/public-api.pxi":371
 *         return sten.sp_sparse_tensor
 * 
 *     return shared_ptr[CSparseCSCMatrix]()             # <<<<<<<<<<<<<<
 * 
 * cdef api object pyarrow_wrap_sparse_csc_matrix(
*/
                      __pyx_r = std::shared_ptr< arrow::SparseCSCMatrix> ();
                      goto __pyx_L0;

                      /* "pyarrow/public-api.pxi":364
 *     return isinstance(sparse_tensor, SparseCSCMatrix)
 * 
 * cdef api shared_ptr[CSparseCSCMatrix] pyarrow_unwrap_sparse_csc_matrix(             # <<<<<<<<<<<<<<
 *         object sparse_tensor):
 *     cdef SparseCSCMatrix sten
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_AddTraceback("pyarrow.lib.pyarrow_unwrap_sparse_csc_matrix", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_pretend_to_initialize(&__pyx_r);
                      __pyx_L0:;
                      __Pyx_XDECREF((PyObject *)__pyx_v_sten);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/public-api.pxi":373
 *     return shared_ptr[CSparseCSCMatrix]()
 * 
 * cdef api object pyarrow_wrap_sparse_csc_matrix(             # <<<<<<<<<<<<<<
 *         const shared_ptr[CSparseCSCMatrix]& sp_sparse_tensor):
 *     if sp_sparse_tensor.get() == NULL:
*/

                    PyObject *pyarrow_wrap_sparse_csc_matrix(std::shared_ptr< arrow::SparseCSCMatrix>  const &__pyx_v_sp_sparse_tensor) {
                      struct __pyx_obj_7pyarrow_3lib_SparseCSCMatrix *__pyx_v_sparse_tensor = 0;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_t_1;
                      PyObject *__pyx_t_2 = NULL;
                      PyObject *__pyx_t_3 = NULL;
                      size_t __pyx_t_4;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("pyarrow_wrap_sparse_csc_matrix", 0);

                      /* "pyarrow/public-api.pxi":375
 * cdef api object pyarrow_wrap_sparse_csc_matrix(
 *         const shared_ptr[CSparseCSCMatrix]& sp_sparse_tensor):
 *     if sp_sparse_tensor.get() == NULL:             # <<<<<<<<<<<<<<
 *         raise ValueError('SparseCSCMatrix was NULL')
 * 
*/
                      __pyx_t_1 = (__pyx_v_sp_sparse_tensor.get() == NULL);
                      if (unlikely(__pyx_t_1)) {

                        /* "pyarrow/public-api.pxi":376
 *         const shared_ptr[CSparseCSCMatrix]& sp_sparse_tensor):
 *     if sp_sparse_tensor.get() == NULL:
 *         raise ValueError('SparseCSCMatrix was NULL')             # <<<<<<<<<<<<<<
 * 
 *     cdef SparseCSCMatrix sparse_tensor = SparseCSCMatrix.__new__(
*/
                        __pyx_t_3 = NULL;
                        __pyx_t_4 = 1;
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_SparseCSCMatrix_was_NULL};
                          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                          if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 376, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_2);
                        }
                        __Pyx_Raise(__pyx_t_2, 0, 0, 0);
                        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                        __PYX_ERR(21, 376, __pyx_L1_error)

                        /* "pyarrow/public-api.pxi":375
 * cdef api object pyarrow_wrap_sparse_csc_matrix(
 *         const shared_ptr[CSparseCSCMatrix]& sp_sparse_tensor):
 *     if sp_sparse_tensor.get() == NULL:             # <<<<<<<<<<<<<<
 *         raise ValueError('SparseCSCMatrix was NULL')
 * 
*/
                      }

                      /* "pyarrow/public-api.pxi":378
 *         raise ValueError('SparseCSCMatrix was NULL')
 * 
 *     cdef SparseCSCMatrix sparse_tensor = SparseCSCMatrix.__new__(             # <<<<<<<<<<<<<<
 *         SparseCSCMatrix)
 *     sparse_tensor.init(sp_sparse_tensor)
*/
                      __pyx_t_2 = ((PyObject *)__pyx_tp_new_7pyarrow_3lib_SparseCSCMatrix(((PyTypeObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_SparseCSCMatrix), __pyx_mstate_global->__pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 378, __pyx_L1_error)
                      __Pyx_GOTREF((PyObject *)__pyx_t_2);
                      __pyx_v_sparse_tensor = ((struct __pyx_obj_7pyarrow_3lib_SparseCSCMatrix *)__pyx_t_2);
                      __pyx_t_2 = 0;

                      /* "pyarrow/public-api.pxi":380
 *     cdef SparseCSCMatrix sparse_tensor = SparseCSCMatrix.__new__(
 *         SparseCSCMatrix)
 *     sparse_tensor.init(sp_sparse_tensor)             # <<<<<<<<<<<<<<
 *     return sparse_tensor
 * 
*/
                      if (unlikely(((PyObject *)__pyx_v_sparse_tensor) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "init");
                        __PYX_ERR(21, 380, __pyx_L1_error)
                      }
                      ((struct __pyx_vtabstruct_7pyarrow_3lib_SparseCSCMatrix *)__pyx_v_sparse_tensor->__pyx_vtab)->init(__pyx_v_sparse_tensor, __pyx_v_sp_sparse_tensor); if (unlikely(PyErr_Occurred())) __PYX_ERR(21, 380, __pyx_L1_error)

                      /* "pyarrow/public-api.pxi":381
 *         SparseCSCMatrix)
 *     sparse_tensor.init(sp_sparse_tensor)
 *     return sparse_tensor             # <<<<<<<<<<<<<<
 * 
 * 
*/
                      __Pyx_XDECREF(__pyx_r);
                      __Pyx_INCREF((PyObject *)__pyx_v_sparse_tensor);
                      __pyx_r = ((PyObject *)__pyx_v_sparse_tensor);
                      goto __pyx_L0;

                      /* "pyarrow/public-api.pxi":373
 *     return shared_ptr[CSparseCSCMatrix]()
 * 
 * cdef api object pyarrow_wrap_sparse_csc_matrix(             # <<<<<<<<<<<<<<
 *         const shared_ptr[CSparseCSCMatrix]& sp_sparse_tensor):
 *     if sp_sparse_tensor.get() == NULL:
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_AddTraceback("pyarrow.lib.pyarrow_wrap_sparse_csc_matrix", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = 0;
                      __pyx_L0:;
                      __Pyx_XDECREF((PyObject *)__pyx_v_sparse_tensor);
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/public-api.pxi":384
 * 
 * 
 * cdef api bint pyarrow_is_sparse_csf_tensor(object sparse_tensor):             # <<<<<<<<<<<<<<
 *     return isinstance(sparse_tensor, SparseCSFTensor)
 * 
*/

                    static int __pyx_f_7pyarrow_3lib_pyarrow_is_sparse_csf_tensor(PyObject *__pyx_v_sparse_tensor) {
                      int __pyx_r;
                      int __pyx_t_1;

                      /* "pyarrow/public-api.pxi":385
 * 
 * cdef api bint pyarrow_is_sparse_csf_tensor(object sparse_tensor):
 *     return isinstance(sparse_tensor, SparseCSFTensor)             # <<<<<<<<<<<<<<
 * 
 * cdef api shared_ptr[CSparseCSFTensor] pyarrow_unwrap_sparse_csf_tensor(
*/
                      __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_sparse_tensor, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_SparseCSFTensor); 
                      __pyx_r = __pyx_t_1;
                      goto __pyx_L0;

                      /* "pyarrow/public-api.pxi":384
 * 
 * 
 * cdef api bint pyarrow_is_sparse_csf_tensor(object sparse_tensor):             # <<<<<<<<<<<<<<
 *     return isinstance(sparse_tensor, SparseCSFTensor)
 * 
*/

                      /* function exit code */
                      __pyx_L0:;
                      return __pyx_r;
                    }

                    /* "pyarrow/public-api.pxi":387
 *     return isinstance(sparse_tensor, SparseCSFTensor)
 * 
 * cdef api shared_ptr[CSparseCSFTensor] pyarrow_unwrap_sparse_csf_tensor(             # <<<<<<<<<<<<<<
 *         object sparse_tensor):
 *     cdef SparseCSFTensor sten
*/

                    std::shared_ptr< arrow::SparseCSFTensor>  pyarrow_unwrap_sparse_csf_tensor(PyObject *__pyx_v_sparse_tensor) {
                      struct __pyx_obj_7pyarrow_3lib_SparseCSFTensor *__pyx_v_sten = 0;
                      std::shared_ptr< arrow::SparseCSFTensor>  __pyx_r;
                      __Pyx_RefNannyDeclarations
                      int __pyx_t_1;
                      PyObject *__pyx_t_2 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("pyarrow_unwrap_sparse_csf_tensor", 0);

                      /* "pyarrow/public-api.pxi":390
 *         object sparse_tensor):
 *     cdef SparseCSFTensor sten
 *     if pyarrow_is_sparse_csf_tensor(sparse_tensor):             # <<<<<<<<<<<<<<
 *         sten = <SparseCSFTensor>(sparse_tensor)
 *         return sten.sp_sparse_tensor
*/
                      __pyx_t_1 = __pyx_f_7pyarrow_3lib_pyarrow_is_sparse_csf_tensor(__pyx_v_sparse_tensor); if (unlikely(__pyx_t_1 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(21, 390, __pyx_L1_error)
                      if (__pyx_t_1) {

                        /* "pyarrow/public-api.pxi":391
 *     cdef SparseCSFTensor sten
 *     if pyarrow_is_sparse_csf_tensor(sparse_tensor):
 *         sten = <SparseCSFTensor>(sparse_tensor)             # <<<<<<<<<<<<<<
 *         return sten.sp_sparse_tensor
 * 
*/
                        __pyx_t_2 = __pyx_v_sparse_tensor;
                        __Pyx_INCREF(__pyx_t_2);
                        __pyx_v_sten = ((struct __pyx_obj_7pyarrow_3lib_SparseCSFTensor *)__pyx_t_2);
                        __pyx_t_2 = 0;

                        /* "pyarrow/public-api.pxi":392
 *     if pyarrow_is_sparse_csf_tensor(sparse_tensor):
 *         sten = <SparseCSFTensor>(sparse_tensor)
 *         return sten.sp_sparse_tensor             # <<<<<<<<<<<<<<
 * 
 *     return shared_ptr[CSparseCSFTensor]()
*/
                        if (unlikely(((PyObject *)__pyx_v_sten) == Py_None)) {
                          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_sparse_tensor");
                          __PYX_ERR(21, 392, __pyx_L1_error)
                        }
                        __pyx_r = __pyx_v_sten->sp_sparse_tensor;
                        goto __pyx_L0;

                        /* "pyarrow/public-api.pxi":390
 *         object sparse_tensor):
 *     cdef SparseCSFTensor sten
 *     if pyarrow_is_sparse_csf_tensor(sparse_tensor):             # <<<<<<<<<<<<<<
 *         sten = <SparseCSFTensor>(sparse_tensor)
 *         return sten.sp_sparse_tensor
*/
                      }

                      /* "pyarrow/public-api.pxi":394
 *         return sten.sp_sparse_tensor
 * 
 *     return shared_ptr[CSparseCSFTensor]()             # <<<<<<<<<<<<<<
 * 
 * cdef api object pyarrow_wrap_sparse_csf_tensor(
*/
                      __pyx_r = std::shared_ptr< arrow::SparseCSFTensor> ();
                      goto __pyx_L0;

                      /* "pyarrow/public-api.pxi":387
 *     return isinstance(sparse_tensor, SparseCSFTensor)
 * 
 * cdef api shared_ptr[CSparseCSFTensor] pyarrow_unwrap_sparse_csf_tensor(             # <<<<<<<<<<<<<<
 *         object sparse_tensor):
 *     cdef SparseCSFTensor sten
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_AddTraceback("pyarrow.lib.pyarrow_unwrap_sparse_csf_tensor", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_pretend_to_initialize(&__pyx_r);
                      __pyx_L0:;
                      __Pyx_XDECREF((PyObject *)__pyx_v_sten);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/public-api.pxi":396
 *     return shared_ptr[CSparseCSFTensor]()
 * 
 * cdef api object pyarrow_wrap_sparse_csf_tensor(             # <<<<<<<<<<<<<<
 *         const shared_ptr[CSparseCSFTensor]& sp_sparse_tensor):
 *     if sp_sparse_tensor.get() == NULL:
*/

                    PyObject *pyarrow_wrap_sparse_csf_tensor(std::shared_ptr< arrow::SparseCSFTensor>  const &__pyx_v_sp_sparse_tensor) {
                      struct __pyx_obj_7pyarrow_3lib_SparseCSFTensor *__pyx_v_sparse_tensor = 0;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_t_1;
                      PyObject *__pyx_t_2 = NULL;
                      PyObject *__pyx_t_3 = NULL;
                      size_t __pyx_t_4;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("pyarrow_wrap_sparse_csf_tensor", 0);

                      /* "pyarrow/public-api.pxi":398
 * cdef api object pyarrow_wrap_sparse_csf_tensor(
 *         const shared_ptr[CSparseCSFTensor]& sp_sparse_tensor):
 *     if sp_sparse_tensor.get() == NULL:             # <<<<<<<<<<<<<<
 *         raise ValueError('SparseCSFTensor was NULL')
 * 
*/
                      __pyx_t_1 = (__pyx_v_sp_sparse_tensor.get() == NULL);
                      if (unlikely(__pyx_t_1)) {

                        /* "pyarrow/public-api.pxi":399
 *         const shared_ptr[CSparseCSFTensor]& sp_sparse_tensor):
 *     if sp_sparse_tensor.get() == NULL:
 *         raise ValueError('SparseCSFTensor was NULL')             # <<<<<<<<<<<<<<
 * 
 *     cdef SparseCSFTensor sparse_tensor = SparseCSFTensor.__new__(
*/
                        __pyx_t_3 = NULL;
                        __pyx_t_4 = 1;
                        {
                          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_SparseCSFTensor_was_NULL};
                          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                          if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 399, __pyx_L1_error)
                          __Pyx_GOTREF(__pyx_t_2);
                        }
                        __Pyx_Raise(__pyx_t_2, 0, 0, 0);
                        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                        __PYX_ERR(21, 399, __pyx_L1_error)

                        /* "pyarrow/public-api.pxi":398
 * cdef api object pyarrow_wrap_sparse_csf_tensor(
 *         const shared_ptr[CSparseCSFTensor]& sp_sparse_tensor):
 *     if sp_sparse_tensor.get() == NULL:             # <<<<<<<<<<<<<<
 *         raise ValueError('SparseCSFTensor was NULL')
 * 
*/
                      }

                      /* "pyarrow/public-api.pxi":401
 *         raise ValueError('SparseCSFTensor was NULL')
 * 
 *     cdef SparseCSFTensor sparse_tensor = SparseCSFTensor.__new__(             # <<<<<<<<<<<<<<
 *         SparseCSFTensor)
 *     sparse_tensor.init(sp_sparse_tensor)
*/
                      __pyx_t_2 = ((PyObject *)__pyx_tp_new_7pyarrow_3lib_SparseCSFTensor(((PyTypeObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_SparseCSFTensor), __pyx_mstate_global->__pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 401, __pyx_L1_error)
                      __Pyx_GOTREF((PyObject *)__pyx_t_2);
                      __pyx_v_sparse_tensor = ((struct __pyx_obj_7pyarrow_3lib_SparseCSFTensor *)__pyx_t_2);
                      __pyx_t_2 = 0;

                      /* "pyarrow/public-api.pxi":403
 *     cdef SparseCSFTensor sparse_tensor = SparseCSFTensor.__new__(
 *         SparseCSFTensor)
 *     sparse_tensor.init(sp_sparse_tensor)             # <<<<<<<<<<<<<<
 *     return sparse_tensor
 * 
*/
                      if (unlikely(((PyObject *)__pyx_v_sparse_tensor) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "init");
                        __PYX_ERR(21, 403, __pyx_L1_error)
                      }
                      ((struct __pyx_vtabstruct_7pyarrow_3lib_SparseCSFTensor *)__pyx_v_sparse_tensor->__pyx_vtab)->init(__pyx_v_sparse_tensor, __pyx_v_sp_sparse_tensor); if (unlikely(PyErr_Occurred())) __PYX_ERR(21, 403, __pyx_L1_error)

                      /* "pyarrow/public-api.pxi":404
 *         SparseCSFTensor)
 *     sparse_tensor.init(sp_sparse_tensor)
 *     return sparse_tensor             # <<<<<<<<<<<<<<
 * 
 * 
*/
                      __Pyx_XDECREF(__pyx_r);
                      __Pyx_INCREF((PyObject *)__pyx_v_sparse_tensor);
                      __pyx_r = ((PyObject *)__pyx_v_sparse_tensor);
                      goto __pyx_L0;

                      /* "pyarrow/public-api.pxi":396
 *     return shared_ptr[CSparseCSFTensor]()
 * 
 * cdef api object pyarrow_wrap_sparse_csf_tensor(             # <<<<<<<<<<<<<<
 *         const shared_ptr[CSparseCSFTensor]& sp_sparse_tensor):
 *     if sp_sparse_tensor.get() == NULL:
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_AddTraceback("pyarrow.lib.pyarrow_wrap_sparse_csf_tensor", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = 0;
                      __pyx_L0:;
                      __Pyx_XDECREF((PyObject *)__pyx_v_sparse_tensor);
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/public-api.pxi":407
 * 
 * 
 * cdef api bint pyarrow_is_table(object table):             # <<<<<<<<<<<<<<
 *     return isinstance(table, Table)
 * 
*/

                    static int __pyx_f_7pyarrow_3lib_pyarrow_is_table(PyObject *__pyx_v_table) {
                      int __pyx_r;
                      int __pyx_t_1;

                      /* "pyarrow/public-api.pxi":408
 * 
 * cdef api bint pyarrow_is_table(object table):
 *     return isinstance(table, Table)             # <<<<<<<<<<<<<<
 * 
 * 
*/
                      __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_table, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Table); 
                      __pyx_r = __pyx_t_1;
                      goto __pyx_L0;

                      /* "pyarrow/public-api.pxi":407
 * 
 * 
 * cdef api bint pyarrow_is_table(object table):             # <<<<<<<<<<<<<<
 *     return isinstance(table, Table)
 * 
*/

                      /* function exit code */
                      __pyx_L0:;
                      return __pyx_r;
                    }

                    /* "pyarrow/public-api.pxi":411
 * 
 * 
 * cdef api shared_ptr[CTable] pyarrow_unwrap_table(object table):             # <<<<<<<<<<<<<<
 *     cdef Table tab
 *     if pyarrow_is_table(table):
*/

                    std::shared_ptr< arrow::Table>  pyarrow_unwrap_table(PyObject *__pyx_v_table) {
                      struct __pyx_obj_7pyarrow_3lib_Table *__pyx_v_tab = 0;
                      std::shared_ptr< arrow::Table>  __pyx_r;
                      __Pyx_RefNannyDeclarations
                      int __pyx_t_1;
                      PyObject *__pyx_t_2 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("pyarrow_unwrap_table", 0);

                      /* "pyarrow/public-api.pxi":413
 * cdef api shared_ptr[CTable] pyarrow_unwrap_table(object table):
 *     cdef Table tab
 *     if pyarrow_is_table(table):             # <<<<<<<<<<<<<<
 *         tab = <Table>(table)
 *         return tab.sp_table
*/
                      __pyx_t_1 = __pyx_f_7pyarrow_3lib_pyarrow_is_table(__pyx_v_table); if (unlikely(__pyx_t_1 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(21, 413, __pyx_L1_error)
                      if (__pyx_t_1) {

                        /* "pyarrow/public-api.pxi":414
 *     cdef Table tab
 *     if pyarrow_is_table(table):
 *         tab = <Table>(table)             # <<<<<<<<<<<<<<
 *         return tab.sp_table
 * 
*/
                        __pyx_t_2 = __pyx_v_table;
                        __Pyx_INCREF(__pyx_t_2);
                        __pyx_v_tab = ((struct __pyx_obj_7pyarrow_3lib_Table *)__pyx_t_2);
                        __pyx_t_2 = 0;

                        /* "pyarrow/public-api.pxi":415
 *     if pyarrow_is_table(table):
 *         tab = <Table>(table)
 *         return tab.sp_table             # <<<<<<<<<<<<<<
 * 
 *     return shared_ptr[CTable]()
*/
                        if (unlikely(((PyObject *)__pyx_v_tab) == Py_None)) {
                          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_table");
                          __PYX_ERR(21, 415, __pyx_L1_error)
                        }
                        __pyx_r = __pyx_v_tab->sp_table;
                        goto __pyx_L0;

                        /* "pyarrow/public-api.pxi":413
 * cdef api shared_ptr[CTable] pyarrow_unwrap_table(object table):
 *     cdef Table tab
 *     if pyarrow_is_table(table):             # <<<<<<<<<<<<<<
 *         tab = <Table>(table)
 *         return tab.sp_table
*/
                      }

                      /* "pyarrow/public-api.pxi":417
 *         return tab.sp_table
 * 
 *     return shared_ptr[CTable]()             # <<<<<<<<<<<<<<
 * 
 * 
*/
                      __pyx_r = std::shared_ptr< arrow::Table> ();
                      goto __pyx_L0;

                      /* "pyarrow/public-api.pxi":411
 * 
 * 
 * cdef api shared_ptr[CTable] pyarrow_unwrap_table(object table):             # <<<<<<<<<<<<<<
 *     cdef Table tab
 *     if pyarrow_is_table(table):
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_AddTraceback("pyarrow.lib.pyarrow_unwrap_table", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_pretend_to_initialize(&__pyx_r);
                      __pyx_L0:;
                      __Pyx_XDECREF((PyObject *)__pyx_v_tab);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/public-api.pxi":420
 * 
 * 
 * cdef api object pyarrow_wrap_table(const shared_ptr[CTable]& ctable):             # <<<<<<<<<<<<<<
 *     cdef Table table = Table.__new__(Table)
 *     table.init(ctable)
*/

                    PyObject *pyarrow_wrap_table(std::shared_ptr< arrow::Table>  const &__pyx_v_ctable) {
                      struct __pyx_obj_7pyarrow_3lib_Table *__pyx_v_table = 0;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("pyarrow_wrap_table", 0);

                      /* "pyarrow/public-api.pxi":421
 * 
 * cdef api object pyarrow_wrap_table(const shared_ptr[CTable]& ctable):
 *     cdef Table table = Table.__new__(Table)             # <<<<<<<<<<<<<<
 *     table.init(ctable)
 *     return table
*/
                      __pyx_t_1 = ((PyObject *)__pyx_tp_new_7pyarrow_3lib_Table(((PyTypeObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Table), __pyx_mstate_global->__pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 421, __pyx_L1_error)
                      __Pyx_GOTREF((PyObject *)__pyx_t_1);
                      __pyx_v_table = ((struct __pyx_obj_7pyarrow_3lib_Table *)__pyx_t_1);
                      __pyx_t_1 = 0;

                      /* "pyarrow/public-api.pxi":422
 * cdef api object pyarrow_wrap_table(const shared_ptr[CTable]& ctable):
 *     cdef Table table = Table.__new__(Table)
 *     table.init(ctable)             # <<<<<<<<<<<<<<
 *     return table
 * 
*/
                      if (unlikely(((PyObject *)__pyx_v_table) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "init");
                        __PYX_ERR(21, 422, __pyx_L1_error)
                      }
                      ((struct __pyx_vtabstruct_7pyarrow_3lib_Table *)__pyx_v_table->__pyx_base.__pyx_vtab)->init(__pyx_v_table, __pyx_v_ctable); if (unlikely(PyErr_Occurred())) __PYX_ERR(21, 422, __pyx_L1_error)

                      /* "pyarrow/public-api.pxi":423
 *     cdef Table table = Table.__new__(Table)
 *     table.init(ctable)
 *     return table             # <<<<<<<<<<<<<<
 * 
 * 
*/
                      __Pyx_XDECREF(__pyx_r);
                      __Pyx_INCREF((PyObject *)__pyx_v_table);
                      __pyx_r = ((PyObject *)__pyx_v_table);
                      goto __pyx_L0;

                      /* "pyarrow/public-api.pxi":420
 * 
 * 
 * cdef api object pyarrow_wrap_table(const shared_ptr[CTable]& ctable):             # <<<<<<<<<<<<<<
 *     cdef Table table = Table.__new__(Table)
 *     table.init(ctable)
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_AddTraceback("pyarrow.lib.pyarrow_wrap_table", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = 0;
                      __pyx_L0:;
                      __Pyx_XDECREF((PyObject *)__pyx_v_table);
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/public-api.pxi":426
 * 
 * 
 * cdef api bint pyarrow_is_batch(object batch):             # <<<<<<<<<<<<<<
 *     return isinstance(batch, RecordBatch)
 * 
*/

                    static int __pyx_f_7pyarrow_3lib_pyarrow_is_batch(PyObject *__pyx_v_batch) {
                      int __pyx_r;
                      int __pyx_t_1;

                      /* "pyarrow/public-api.pxi":427
 * 
 * cdef api bint pyarrow_is_batch(object batch):
 *     return isinstance(batch, RecordBatch)             # <<<<<<<<<<<<<<
 * 
 * 
*/
                      __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_batch, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RecordBatch); 
                      __pyx_r = __pyx_t_1;
                      goto __pyx_L0;

                      /* "pyarrow/public-api.pxi":426
 * 
 * 
 * cdef api bint pyarrow_is_batch(object batch):             # <<<<<<<<<<<<<<
 *     return isinstance(batch, RecordBatch)
 * 
*/

                      /* function exit code */
                      __pyx_L0:;
                      return __pyx_r;
                    }

                    /* "pyarrow/public-api.pxi":430
 * 
 * 
 * cdef api shared_ptr[CRecordBatch] pyarrow_unwrap_batch(object batch):             # <<<<<<<<<<<<<<
 *     cdef RecordBatch bat
 *     if pyarrow_is_batch(batch):
*/

                    std::shared_ptr< arrow::RecordBatch>  pyarrow_unwrap_batch(PyObject *__pyx_v_batch) {
                      struct __pyx_obj_7pyarrow_3lib_RecordBatch *__pyx_v_bat = 0;
                      std::shared_ptr< arrow::RecordBatch>  __pyx_r;
                      __Pyx_RefNannyDeclarations
                      int __pyx_t_1;
                      PyObject *__pyx_t_2 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("pyarrow_unwrap_batch", 0);

                      /* "pyarrow/public-api.pxi":432
 * cdef api shared_ptr[CRecordBatch] pyarrow_unwrap_batch(object batch):
 *     cdef RecordBatch bat
 *     if pyarrow_is_batch(batch):             # <<<<<<<<<<<<<<
 *         bat = <RecordBatch>(batch)
 *         return bat.sp_batch
*/
                      __pyx_t_1 = __pyx_f_7pyarrow_3lib_pyarrow_is_batch(__pyx_v_batch); if (unlikely(__pyx_t_1 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(21, 432, __pyx_L1_error)
                      if (__pyx_t_1) {

                        /* "pyarrow/public-api.pxi":433
 *     cdef RecordBatch bat
 *     if pyarrow_is_batch(batch):
 *         bat = <RecordBatch>(batch)             # <<<<<<<<<<<<<<
 *         return bat.sp_batch
 * 
*/
                        __pyx_t_2 = __pyx_v_batch;
                        __Pyx_INCREF(__pyx_t_2);
                        __pyx_v_bat = ((struct __pyx_obj_7pyarrow_3lib_RecordBatch *)__pyx_t_2);
                        __pyx_t_2 = 0;

                        /* "pyarrow/public-api.pxi":434
 *     if pyarrow_is_batch(batch):
 *         bat = <RecordBatch>(batch)
 *         return bat.sp_batch             # <<<<<<<<<<<<<<
 * 
 *     return shared_ptr[CRecordBatch]()
*/
                        if (unlikely(((PyObject *)__pyx_v_bat) == Py_None)) {
                          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sp_batch");
                          __PYX_ERR(21, 434, __pyx_L1_error)
                        }
                        __pyx_r = __pyx_v_bat->sp_batch;
                        goto __pyx_L0;

                        /* "pyarrow/public-api.pxi":432
 * cdef api shared_ptr[CRecordBatch] pyarrow_unwrap_batch(object batch):
 *     cdef RecordBatch bat
 *     if pyarrow_is_batch(batch):             # <<<<<<<<<<<<<<
 *         bat = <RecordBatch>(batch)
 *         return bat.sp_batch
*/
                      }

                      /* "pyarrow/public-api.pxi":436
 *         return bat.sp_batch
 * 
 *     return shared_ptr[CRecordBatch]()             # <<<<<<<<<<<<<<
 * 
 * 
*/
                      __pyx_r = std::shared_ptr< arrow::RecordBatch> ();
                      goto __pyx_L0;

                      /* "pyarrow/public-api.pxi":430
 * 
 * 
 * cdef api shared_ptr[CRecordBatch] pyarrow_unwrap_batch(object batch):             # <<<<<<<<<<<<<<
 *     cdef RecordBatch bat
 *     if pyarrow_is_batch(batch):
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_AddTraceback("pyarrow.lib.pyarrow_unwrap_batch", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_pretend_to_initialize(&__pyx_r);
                      __pyx_L0:;
                      __Pyx_XDECREF((PyObject *)__pyx_v_bat);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "pyarrow/public-api.pxi":439
 * 
 * 
 * cdef api object pyarrow_wrap_batch(             # <<<<<<<<<<<<<<
 *         const shared_ptr[CRecordBatch]& cbatch):
 *     cdef RecordBatch batch = RecordBatch.__new__(RecordBatch)
*/

                    PyObject *pyarrow_wrap_batch(std::shared_ptr< arrow::RecordBatch>  const &__pyx_v_cbatch) {
                      struct __pyx_obj_7pyarrow_3lib_RecordBatch *__pyx_v_batch = 0;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("pyarrow_wrap_batch", 0);

                      /* "pyarrow/public-api.pxi":441
 * cdef api object pyarrow_wrap_batch(
 *         const shared_ptr[CRecordBatch]& cbatch):
 *     cdef RecordBatch batch = RecordBatch.__new__(RecordBatch)             # <<<<<<<<<<<<<<
 *     batch.init(cbatch)
 *     return batch
*/
                      __pyx_t_1 = ((PyObject *)__pyx_tp_new_7pyarrow_3lib_RecordBatch(((PyTypeObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RecordBatch), __pyx_mstate_global->__pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 441, __pyx_L1_error)
                      __Pyx_GOTREF((PyObject *)__pyx_t_1);
                      __pyx_v_batch = ((struct __pyx_obj_7pyarrow_3lib_RecordBatch *)__pyx_t_1);
                      __pyx_t_1 = 0;

                      /* "pyarrow/public-api.pxi":442
 *         const shared_ptr[CRecordBatch]& cbatch):
 *     cdef RecordBatch batch = RecordBatch.__new__(RecordBatch)
 *     batch.init(cbatch)             # <<<<<<<<<<<<<<
 *     return batch
*/
                      if (unlikely(((PyObject *)__pyx_v_batch) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "init");
                        __PYX_ERR(21, 442, __pyx_L1_error)
                      }
                      ((struct __pyx_vtabstruct_7pyarrow_3lib_RecordBatch *)__pyx_v_batch->__pyx_base.__pyx_vtab)->init(__pyx_v_batch, __pyx_v_cbatch); if (unlikely(PyErr_Occurred())) __PYX_ERR(21, 442, __pyx_L1_error)

                      /* "pyarrow/public-api.pxi":443
 *     cdef RecordBatch batch = RecordBatch.__new__(RecordBatch)
 *     batch.init(cbatch)
 *     return batch             # <<<<<<<<<<<<<<
*/
                      __Pyx_XDECREF(__pyx_r);
                      __Pyx_INCREF((PyObject *)__pyx_v_batch);
                      __pyx_r = ((PyObject *)__pyx_v_batch);
                      goto __pyx_L0;

                      /* "pyarrow/public-api.pxi":439
 * 
 * 
 * cdef api object pyarrow_wrap_batch(             # <<<<<<<<<<<<<<
 *         const shared_ptr[CRecordBatch]& cbatch):
 *     cdef RecordBatch batch = RecordBatch.__new__(RecordBatch)
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_AddTraceback("pyarrow.lib.pyarrow_wrap_batch", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = 0;
                      __pyx_L0:;
                      __Pyx_XDECREF((PyObject *)__pyx_v_batch);
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "(tree fragment)":4
 *     int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1
 *     int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1
 * def __pyx_unpickle__PandasAPIShim(__pyx_type, long __pyx_checksum, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_result
 *     __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x3ec5c35, 0x39e7a8b, 0xda37436, b'_array_like_types, _categorical_type, _compat_module, _data_frame, _datetimetz_type, _extension_array, _extension_dtype, _have_pandas, _index, _is_extension_array_dtype, _is_ge_v21, _is_ge_v23, _is_ge_v3, _is_ge_v3_strict, _is_v1, _lock, _loose_version, _pd, _pd024, _series, _tried_importing_pandas, _types_api, _version, has_sparse')
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_281__pyx_unpickle__PandasAPIShim(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_280__pyx_unpickle__PandasAPIShim, "__pyx_unpickle__PandasAPIShim(__pyx_type, long __pyx_checksum, tuple __pyx_state)");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_281__pyx_unpickle__PandasAPIShim = {"__pyx_unpickle__PandasAPIShim", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_281__pyx_unpickle__PandasAPIShim, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_280__pyx_unpickle__PandasAPIShim};
                    static PyObject *__pyx_pw_7pyarrow_3lib_281__pyx_unpickle__PandasAPIShim(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      PyObject *__pyx_v___pyx_type = 0;
                      long __pyx_v___pyx_checksum;
                      PyObject *__pyx_v___pyx_state = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[3] = {0,0,0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__pyx_unpickle__PandasAPIShim (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_type,&__pyx_mstate_global->__pyx_n_u_pyx_checksum,&__pyx_mstate_global->__pyx_n_u_pyx_state,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(7, 4, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  3:
                            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(7, 4, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  2:
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(7, 4, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(7, 4, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__pyx_unpickle__PandasAPIShim", 0) < (0)) __PYX_ERR(7, 4, __pyx_L3_error)
                          for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle__PandasAPIShim", 1, 3, 3, i); __PYX_ERR(7, 4, __pyx_L3_error) }
                          }
                        } else if (unlikely(__pyx_nargs != 3)) {
                          goto __pyx_L5_argtuple_error;
                        } else {
                          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(7, 4, __pyx_L3_error)
                          values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(7, 4, __pyx_L3_error)
                          values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(7, 4, __pyx_L3_error)
                        }
                        __pyx_v___pyx_type = values[0];
                        __pyx_v___pyx_checksum = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(7, 4, __pyx_L3_error)
                        __pyx_v___pyx_state = ((PyObject*)values[2]);
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("__pyx_unpickle__PandasAPIShim", 1, 3, 3, __pyx_nargs); __PYX_ERR(7, 4, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.__pyx_unpickle__PandasAPIShim", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v___pyx_state), (&PyTuple_Type), 1, "__pyx_state", 1))) __PYX_ERR(7, 4, __pyx_L1_error)
                      __pyx_r = __pyx_pf_7pyarrow_3lib_280__pyx_unpickle__PandasAPIShim(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

                      /* function exit code */
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __pyx_r = NULL;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      goto __pyx_L7_cleaned_up;
                      __pyx_L0:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __pyx_L7_cleaned_up:;
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_280__pyx_unpickle__PandasAPIShim(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
                      PyObject *__pyx_v___pyx_result = 0;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_t_1;
                      PyObject *__pyx_t_2 = NULL;
                      PyObject *__pyx_t_3 = NULL;
                      size_t __pyx_t_4;
                      int __pyx_t_5;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__pyx_unpickle__PandasAPIShim", 0);

                      /* "(tree fragment)":6
 * def __pyx_unpickle__PandasAPIShim(__pyx_type, long __pyx_checksum, tuple __pyx_state):
 *     cdef object __pyx_result
 *     __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x3ec5c35, 0x39e7a8b, 0xda37436, b'_array_like_types, _categorical_type, _compat_module, _data_frame, _datetimetz_type, _extension_array, _extension_dtype, _have_pandas, _index, _is_extension_array_dtype, _is_ge_v21, _is_ge_v23, _is_ge_v3, _is_ge_v3_strict, _is_v1, _lock, _loose_version, _pd, _pd024, _series, _tried_importing_pandas, _types_api, _version, has_sparse')             # <<<<<<<<<<<<<<
 *     __pyx_result = _PandasAPIShim.__new__(__pyx_type)
 *     if __pyx_state is not None:
*/
                      __pyx_t_1 = __Pyx_CheckUnpickleChecksum(__pyx_v___pyx_checksum, 0x3ec5c35, 0x39e7a8b, 0xda37436, __pyx_k_array_like_types__categorical_t); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(7, 6, __pyx_L1_error)

                      /* "(tree fragment)":7
 *     cdef object __pyx_result
 *     __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x3ec5c35, 0x39e7a8b, 0xda37436, b'_array_like_types, _categorical_type, _compat_module, _data_frame, _datetimetz_type, _extension_array, _extension_dtype, _have_pandas, _index, _is_extension_array_dtype, _is_ge_v21, _is_ge_v23, _is_ge_v3, _is_ge_v3_strict, _is_v1, _lock, _loose_version, _pd, _pd024, _series, _tried_importing_pandas, _types_api, _version, has_sparse')
 *     __pyx_result = _PandasAPIShim.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle__PandasAPIShim__set_state(<_PandasAPIShim> __pyx_result, __pyx_state)
*/
                      __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__PandasAPIShim);
                      __Pyx_INCREF(__pyx_t_3);
                      __pyx_t_4 = 0;
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v___pyx_type};
                        __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                        if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 7, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_2);
                      }
                      __pyx_v___pyx_result = __pyx_t_2;
                      __pyx_t_2 = 0;

                      /* "(tree fragment)":8
 *     __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x3ec5c35, 0x39e7a8b, 0xda37436, b'_array_like_types, _categorical_type, _compat_module, _data_frame, _datetimetz_type, _extension_array, _extension_dtype, _have_pandas, _index, _is_extension_array_dtype, _is_ge_v21, _is_ge_v23, _is_ge_v3, _is_ge_v3_strict, _is_v1, _lock, _loose_version, _pd, _pd024, _series, _tried_importing_pandas, _types_api, _version, has_sparse')
 *     __pyx_result = _PandasAPIShim.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle__PandasAPIShim__set_state(<_PandasAPIShim> __pyx_result, __pyx_state)
 *     return __pyx_result
*/
                      __pyx_t_5 = (__pyx_v___pyx_state != ((PyObject*)Py_None));
                      if (__pyx_t_5) {

                        /* "(tree fragment)":9
 *     __pyx_result = _PandasAPIShim.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle__PandasAPIShim__set_state(<_PandasAPIShim> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle__PandasAPIShim__set_state(_PandasAPIShim __pyx_result, __pyx_state: tuple):
*/
                        if (unlikely(__pyx_v___pyx_state == Py_None)) {
                          PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'");
                          __PYX_ERR(7, 9, __pyx_L1_error)
                        }
                        __pyx_t_2 = __pyx_f_7pyarrow_3lib___pyx_unpickle__PandasAPIShim__set_state(((struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *)__pyx_v___pyx_result), __pyx_v___pyx_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 9, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_2);
                        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

                        /* "(tree fragment)":8
 *     __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x3ec5c35, 0x39e7a8b, 0xda37436, b'_array_like_types, _categorical_type, _compat_module, _data_frame, _datetimetz_type, _extension_array, _extension_dtype, _have_pandas, _index, _is_extension_array_dtype, _is_ge_v21, _is_ge_v23, _is_ge_v3, _is_ge_v3_strict, _is_v1, _lock, _loose_version, _pd, _pd024, _series, _tried_importing_pandas, _types_api, _version, has_sparse')
 *     __pyx_result = _PandasAPIShim.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle__PandasAPIShim__set_state(<_PandasAPIShim> __pyx_result, __pyx_state)
 *     return __pyx_result
*/
                      }

                      /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle__PandasAPIShim__set_state(<_PandasAPIShim> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle__PandasAPIShim__set_state(_PandasAPIShim __pyx_result, __pyx_state: tuple):
 *     __pyx_result._array_like_types = __pyx_state[0]; __pyx_result._categorical_type = __pyx_state[1]; __pyx_result._compat_module = __pyx_state[2]; __pyx_result._data_frame = __pyx_state[3]; __pyx_result._datetimetz_type = __pyx_state[4]; __pyx_result._extension_array = __pyx_state[5]; __pyx_result._extension_dtype = __pyx_state[6]; __pyx_result._have_pandas = __pyx_state[7]; __pyx_result._index = __pyx_state[8]; __pyx_result._is_extension_array_dtype = __pyx_state[9]; __pyx_result._is_ge_v21 = __pyx_state[10]; __pyx_result._is_ge_v23 = __pyx_state[11]; __pyx_result._is_ge_v3 = __pyx_state[12]; __pyx_result._is_ge_v3_strict = __pyx_state[13]; __pyx_result._is_v1 = __pyx_state[14]; __pyx_result._lock = __pyx_state[15]; __pyx_result._loose_version = __pyx_state[16]; __pyx_result._pd = __pyx_state[17]; __pyx_result._pd024 = __pyx_state[18]; __pyx_result._series = __pyx_state[19]; __pyx_result._tried_importing_pandas = __pyx_state[20]; __pyx_result._types_api = __pyx_state[21]; __pyx_result._version = __pyx_state[22]; __pyx_result.has_sparse = __pyx_state[23]
*/
                      __Pyx_XDECREF(__pyx_r);
                      __Pyx_INCREF(__pyx_v___pyx_result);
                      __pyx_r = __pyx_v___pyx_result;
                      goto __pyx_L0;

                      /* "(tree fragment)":4
 *     int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1
 *     int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1
 * def __pyx_unpickle__PandasAPIShim(__pyx_type, long __pyx_checksum, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_result
 *     __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x3ec5c35, 0x39e7a8b, 0xda37436, b'_array_like_types, _categorical_type, _compat_module, _data_frame, _datetimetz_type, _extension_array, _extension_dtype, _have_pandas, _index, _is_extension_array_dtype, _is_ge_v21, _is_ge_v23, _is_ge_v3, _is_ge_v3_strict, _is_v1, _lock, _loose_version, _pd, _pd024, _series, _tried_importing_pandas, _types_api, _version, has_sparse')
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_AddTraceback("pyarrow.lib.__pyx_unpickle__PandasAPIShim", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XDECREF(__pyx_v___pyx_result);
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "(tree fragment)":11
 *         __pyx_unpickle__PandasAPIShim__set_state(<_PandasAPIShim> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle__PandasAPIShim__set_state(_PandasAPIShim __pyx_result, __pyx_state: tuple):             # <<<<<<<<<<<<<<
 *     __pyx_result._array_like_types = __pyx_state[0]; __pyx_result._categorical_type = __pyx_state[1]; __pyx_result._compat_module = __pyx_state[2]; __pyx_result._data_frame = __pyx_state[3]; __pyx_result._datetimetz_type = __pyx_state[4]; __pyx_result._extension_array = __pyx_state[5]; __pyx_result._extension_dtype = __pyx_state[6]; __pyx_result._have_pandas = __pyx_state[7]; __pyx_result._index = __pyx_state[8]; __pyx_result._is_extension_array_dtype = __pyx_state[9]; __pyx_result._is_ge_v21 = __pyx_state[10]; __pyx_result._is_ge_v23 = __pyx_state[11]; __pyx_result._is_ge_v3 = __pyx_state[12]; __pyx_result._is_ge_v3_strict = __pyx_state[13]; __pyx_result._is_v1 = __pyx_state[14]; __pyx_result._lock = __pyx_state[15]; __pyx_result._loose_version = __pyx_state[16]; __pyx_result._pd = __pyx_state[17]; __pyx_result._pd024 = __pyx_state[18]; __pyx_result._series = __pyx_state[19]; __pyx_result._tried_importing_pandas = __pyx_state[20]; __pyx_result._types_api = __pyx_state[21]; __pyx_result._version = __pyx_state[22]; __pyx_result.has_sparse = __pyx_state[23]
 *     __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 24)
*/

                    static PyObject *__pyx_f_7pyarrow_3lib___pyx_unpickle__PandasAPIShim__set_state(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      PyObject *__pyx_t_1 = NULL;
                      int __pyx_t_2;
                      int __pyx_t_3;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__pyx_unpickle__PandasAPIShim__set_state", 0);

                      /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle__PandasAPIShim__set_state(_PandasAPIShim __pyx_result, __pyx_state: tuple):
 *     __pyx_result._array_like_types = __pyx_state[0]; __pyx_result._categorical_type = __pyx_state[1]; __pyx_result._compat_module = __pyx_state[2]; __pyx_result._data_frame = __pyx_state[3]; __pyx_result._datetimetz_type = __pyx_state[4]; __pyx_result._extension_array = __pyx_state[5]; __pyx_result._extension_dtype = __pyx_state[6]; __pyx_result._have_pandas = __pyx_state[7]; __pyx_result._index = __pyx_state[8]; __pyx_result._is_extension_array_dtype = __pyx_state[9]; __pyx_result._is_ge_v21 = __pyx_state[10]; __pyx_result._is_ge_v23 = __pyx_state[11]; __pyx_result._is_ge_v3 = __pyx_state[12]; __pyx_result._is_ge_v3_strict = __pyx_state[13]; __pyx_result._is_v1 = __pyx_state[14]; __pyx_result._lock = __pyx_state[15]; __pyx_result._loose_version = __pyx_state[16]; __pyx_result._pd = __pyx_state[17]; __pyx_result._pd024 = __pyx_state[18]; __pyx_result._series = __pyx_state[19]; __pyx_result._tried_importing_pandas = __pyx_state[20]; __pyx_result._types_api = __pyx_state[21]; __pyx_result._version = __pyx_state[22]; __pyx_result.has_sparse = __pyx_state[23]             # <<<<<<<<<<<<<<
 *     __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 24)
*/
                      __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 12, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      if (unlikely(((PyObject *)__pyx_v___pyx_result) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_array_like_types");
                        __PYX_ERR(7, 12, __pyx_L1_error)
                      }
                      __Pyx_GIVEREF(__pyx_t_1);
                      __Pyx_GOTREF(__pyx_v___pyx_result->_array_like_types);
                      __Pyx_DECREF(__pyx_v___pyx_result->_array_like_types);
                      __pyx_v___pyx_result->_array_like_types = __pyx_t_1;
                      __pyx_t_1 = 0;
                      __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 12, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      if (unlikely(((PyObject *)__pyx_v___pyx_result) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_categorical_type");
                        __PYX_ERR(7, 12, __pyx_L1_error)
                      }
                      __Pyx_GIVEREF(__pyx_t_1);
                      __Pyx_GOTREF(__pyx_v___pyx_result->_categorical_type);
                      __Pyx_DECREF(__pyx_v___pyx_result->_categorical_type);
                      __pyx_v___pyx_result->_categorical_type = __pyx_t_1;
                      __pyx_t_1 = 0;
                      __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 12, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      if (unlikely(((PyObject *)__pyx_v___pyx_result) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_compat_module");
                        __PYX_ERR(7, 12, __pyx_L1_error)
                      }
                      __Pyx_GIVEREF(__pyx_t_1);
                      __Pyx_GOTREF(__pyx_v___pyx_result->_compat_module);
                      __Pyx_DECREF(__pyx_v___pyx_result->_compat_module);
                      __pyx_v___pyx_result->_compat_module = __pyx_t_1;
                      __pyx_t_1 = 0;
                      __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 12, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      if (unlikely(((PyObject *)__pyx_v___pyx_result) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_data_frame");
                        __PYX_ERR(7, 12, __pyx_L1_error)
                      }
                      __Pyx_GIVEREF(__pyx_t_1);
                      __Pyx_GOTREF(__pyx_v___pyx_result->_data_frame);
                      __Pyx_DECREF(__pyx_v___pyx_result->_data_frame);
                      __pyx_v___pyx_result->_data_frame = __pyx_t_1;
                      __pyx_t_1 = 0;
                      __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 12, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      if (unlikely(((PyObject *)__pyx_v___pyx_result) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_datetimetz_type");
                        __PYX_ERR(7, 12, __pyx_L1_error)
                      }
                      __Pyx_GIVEREF(__pyx_t_1);
                      __Pyx_GOTREF(__pyx_v___pyx_result->_datetimetz_type);
                      __Pyx_DECREF(__pyx_v___pyx_result->_datetimetz_type);
                      __pyx_v___pyx_result->_datetimetz_type = __pyx_t_1;
                      __pyx_t_1 = 0;
                      __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 12, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      if (unlikely(((PyObject *)__pyx_v___pyx_result) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_extension_array");
                        __PYX_ERR(7, 12, __pyx_L1_error)
                      }
                      __Pyx_GIVEREF(__pyx_t_1);
                      __Pyx_GOTREF(__pyx_v___pyx_result->_extension_array);
                      __Pyx_DECREF(__pyx_v___pyx_result->_extension_array);
                      __pyx_v___pyx_result->_extension_array = __pyx_t_1;
                      __pyx_t_1 = 0;
                      __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 6, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 12, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      if (unlikely(((PyObject *)__pyx_v___pyx_result) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_extension_dtype");
                        __PYX_ERR(7, 12, __pyx_L1_error)
                      }
                      __Pyx_GIVEREF(__pyx_t_1);
                      __Pyx_GOTREF(__pyx_v___pyx_result->_extension_dtype);
                      __Pyx_DECREF(__pyx_v___pyx_result->_extension_dtype);
                      __pyx_v___pyx_result->_extension_dtype = __pyx_t_1;
                      __pyx_t_1 = 0;
                      __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 7, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 12, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 12, __pyx_L1_error)
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      if (unlikely(((PyObject *)__pyx_v___pyx_result) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_have_pandas");
                        __PYX_ERR(7, 12, __pyx_L1_error)
                      }
                      __pyx_v___pyx_result->_have_pandas = __pyx_t_2;
                      __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 8, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 12, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      if (unlikely(((PyObject *)__pyx_v___pyx_result) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_index");
                        __PYX_ERR(7, 12, __pyx_L1_error)
                      }
                      __Pyx_GIVEREF(__pyx_t_1);
                      __Pyx_GOTREF(__pyx_v___pyx_result->_index);
                      __Pyx_DECREF(__pyx_v___pyx_result->_index);
                      __pyx_v___pyx_result->_index = __pyx_t_1;
                      __pyx_t_1 = 0;
                      __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 9, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 12, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      if (unlikely(((PyObject *)__pyx_v___pyx_result) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_is_extension_array_dtype");
                        __PYX_ERR(7, 12, __pyx_L1_error)
                      }
                      __Pyx_GIVEREF(__pyx_t_1);
                      __Pyx_GOTREF(__pyx_v___pyx_result->_is_extension_array_dtype);
                      __Pyx_DECREF(__pyx_v___pyx_result->_is_extension_array_dtype);
                      __pyx_v___pyx_result->_is_extension_array_dtype = __pyx_t_1;
                      __pyx_t_1 = 0;
                      __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 10, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 12, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 12, __pyx_L1_error)
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      if (unlikely(((PyObject *)__pyx_v___pyx_result) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_is_ge_v21");
                        __PYX_ERR(7, 12, __pyx_L1_error)
                      }
                      __pyx_v___pyx_result->_is_ge_v21 = __pyx_t_2;
                      __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 11, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 12, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 12, __pyx_L1_error)
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      if (unlikely(((PyObject *)__pyx_v___pyx_result) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_is_ge_v23");
                        __PYX_ERR(7, 12, __pyx_L1_error)
                      }
                      __pyx_v___pyx_result->_is_ge_v23 = __pyx_t_2;
                      __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 12, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 12, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 12, __pyx_L1_error)
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      if (unlikely(((PyObject *)__pyx_v___pyx_result) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_is_ge_v3");
                        __PYX_ERR(7, 12, __pyx_L1_error)
                      }
                      __pyx_v___pyx_result->_is_ge_v3 = __pyx_t_2;
                      __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 13, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 12, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 12, __pyx_L1_error)
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      if (unlikely(((PyObject *)__pyx_v___pyx_result) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_is_ge_v3_strict");
                        __PYX_ERR(7, 12, __pyx_L1_error)
                      }
                      __pyx_v___pyx_result->_is_ge_v3_strict = __pyx_t_2;
                      __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 14, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 12, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 12, __pyx_L1_error)
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      if (unlikely(((PyObject *)__pyx_v___pyx_result) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_is_v1");
                        __PYX_ERR(7, 12, __pyx_L1_error)
                      }
                      __pyx_v___pyx_result->_is_v1 = __pyx_t_2;
                      __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 15, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 12, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      if (unlikely(((PyObject *)__pyx_v___pyx_result) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_lock");
                        __PYX_ERR(7, 12, __pyx_L1_error)
                      }
                      __Pyx_GIVEREF(__pyx_t_1);
                      __Pyx_GOTREF(__pyx_v___pyx_result->_lock);
                      __Pyx_DECREF(__pyx_v___pyx_result->_lock);
                      __pyx_v___pyx_result->_lock = __pyx_t_1;
                      __pyx_t_1 = 0;
                      __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 16, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 12, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      if (unlikely(((PyObject *)__pyx_v___pyx_result) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_loose_version");
                        __PYX_ERR(7, 12, __pyx_L1_error)
                      }
                      __Pyx_GIVEREF(__pyx_t_1);
                      __Pyx_GOTREF(__pyx_v___pyx_result->_loose_version);
                      __Pyx_DECREF(__pyx_v___pyx_result->_loose_version);
                      __pyx_v___pyx_result->_loose_version = __pyx_t_1;
                      __pyx_t_1 = 0;
                      __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 17, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 12, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      if (unlikely(((PyObject *)__pyx_v___pyx_result) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_pd");
                        __PYX_ERR(7, 12, __pyx_L1_error)
                      }
                      __Pyx_GIVEREF(__pyx_t_1);
                      __Pyx_GOTREF(__pyx_v___pyx_result->_pd);
                      __Pyx_DECREF(__pyx_v___pyx_result->_pd);
                      __pyx_v___pyx_result->_pd = __pyx_t_1;
                      __pyx_t_1 = 0;
                      __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 18, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 12, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 12, __pyx_L1_error)
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      if (unlikely(((PyObject *)__pyx_v___pyx_result) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_pd024");
                        __PYX_ERR(7, 12, __pyx_L1_error)
                      }
                      __pyx_v___pyx_result->_pd024 = __pyx_t_2;
                      __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 19, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 12, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      if (unlikely(((PyObject *)__pyx_v___pyx_result) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_series");
                        __PYX_ERR(7, 12, __pyx_L1_error)
                      }
                      __Pyx_GIVEREF(__pyx_t_1);
                      __Pyx_GOTREF(__pyx_v___pyx_result->_series);
                      __Pyx_DECREF(__pyx_v___pyx_result->_series);
                      __pyx_v___pyx_result->_series = __pyx_t_1;
                      __pyx_t_1 = 0;
                      __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 20, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 12, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 12, __pyx_L1_error)
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      if (unlikely(((PyObject *)__pyx_v___pyx_result) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_tried_importing_pandas");
                        __PYX_ERR(7, 12, __pyx_L1_error)
                      }
                      __pyx_v___pyx_result->_tried_importing_pandas = __pyx_t_2;
                      __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 21, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 12, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      if (unlikely(((PyObject *)__pyx_v___pyx_result) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_types_api");
                        __PYX_ERR(7, 12, __pyx_L1_error)
                      }
                      __Pyx_GIVEREF(__pyx_t_1);
                      __Pyx_GOTREF(__pyx_v___pyx_result->_types_api);
                      __Pyx_DECREF(__pyx_v___pyx_result->_types_api);
                      __pyx_v___pyx_result->_types_api = __pyx_t_1;
                      __pyx_t_1 = 0;
                      __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 22, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 12, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      if (unlikely(((PyObject *)__pyx_v___pyx_result) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_version");
                        __PYX_ERR(7, 12, __pyx_L1_error)
                      }
                      __Pyx_GIVEREF(__pyx_t_1);
                      __Pyx_GOTREF(__pyx_v___pyx_result->_version);
                      __Pyx_DECREF(__pyx_v___pyx_result->_version);
                      __pyx_v___pyx_result->_version = __pyx_t_1;
                      __pyx_t_1 = 0;
                      __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 23, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 12, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 12, __pyx_L1_error)
                      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                      if (unlikely(((PyObject *)__pyx_v___pyx_result) == Py_None)) {
                        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "has_sparse");
                        __PYX_ERR(7, 12, __pyx_L1_error)
                      }
                      __pyx_v___pyx_result->has_sparse = __pyx_t_2;

                      /* "(tree fragment)":13
 * cdef __pyx_unpickle__PandasAPIShim__set_state(_PandasAPIShim __pyx_result, __pyx_state: tuple):
 *     __pyx_result._array_like_types = __pyx_state[0]; __pyx_result._categorical_type = __pyx_state[1]; __pyx_result._compat_module = __pyx_state[2]; __pyx_result._data_frame = __pyx_state[3]; __pyx_result._datetimetz_type = __pyx_state[4]; __pyx_result._extension_array = __pyx_state[5]; __pyx_result._extension_dtype = __pyx_state[6]; __pyx_result._have_pandas = __pyx_state[7]; __pyx_result._index = __pyx_state[8]; __pyx_result._is_extension_array_dtype = __pyx_state[9]; __pyx_result._is_ge_v21 = __pyx_state[10]; __pyx_result._is_ge_v23 = __pyx_state[11]; __pyx_result._is_ge_v3 = __pyx_state[12]; __pyx_result._is_ge_v3_strict = __pyx_state[13]; __pyx_result._is_v1 = __pyx_state[14]; __pyx_result._lock = __pyx_state[15]; __pyx_result._loose_version = __pyx_state[16]; __pyx_result._pd = __pyx_state[17]; __pyx_result._pd024 = __pyx_state[18]; __pyx_result._series = __pyx_state[19]; __pyx_result._tried_importing_pandas = __pyx_state[20]; __pyx_result._types_api = __pyx_state[21]; __pyx_result._version = __pyx_state[22]; __pyx_result.has_sparse = __pyx_state[23]
 *     __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 24)             # <<<<<<<<<<<<<<
*/
                      __pyx_t_3 = __Pyx_UpdateUnpickledDict(((PyObject *)__pyx_v___pyx_result), __pyx_v___pyx_state, 24); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(7, 13, __pyx_L1_error)

                      /* "(tree fragment)":11
 *         __pyx_unpickle__PandasAPIShim__set_state(<_PandasAPIShim> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle__PandasAPIShim__set_state(_PandasAPIShim __pyx_result, __pyx_state: tuple):             # <<<<<<<<<<<<<<
 *     __pyx_result._array_like_types = __pyx_state[0]; __pyx_result._categorical_type = __pyx_state[1]; __pyx_result._compat_module = __pyx_state[2]; __pyx_result._data_frame = __pyx_state[3]; __pyx_result._datetimetz_type = __pyx_state[4]; __pyx_result._extension_array = __pyx_state[5]; __pyx_result._extension_dtype = __pyx_state[6]; __pyx_result._have_pandas = __pyx_state[7]; __pyx_result._index = __pyx_state[8]; __pyx_result._is_extension_array_dtype = __pyx_state[9]; __pyx_result._is_ge_v21 = __pyx_state[10]; __pyx_result._is_ge_v23 = __pyx_state[11]; __pyx_result._is_ge_v3 = __pyx_state[12]; __pyx_result._is_ge_v3_strict = __pyx_state[13]; __pyx_result._is_v1 = __pyx_state[14]; __pyx_result._lock = __pyx_state[15]; __pyx_result._loose_version = __pyx_state[16]; __pyx_result._pd = __pyx_state[17]; __pyx_result._pd024 = __pyx_state[18]; __pyx_result._series = __pyx_state[19]; __pyx_result._tried_importing_pandas = __pyx_state[20]; __pyx_result._types_api = __pyx_state[21]; __pyx_result._version = __pyx_state[22]; __pyx_result.has_sparse = __pyx_state[23]
 *     __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 24)
*/

                      /* function exit code */
                      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_1);
                      __Pyx_AddTraceback("pyarrow.lib.__pyx_unpickle__PandasAPIShim__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = 0;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "(tree fragment)":4
 *     int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1
 *     int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1
 * def __pyx_unpickle__PandasConvertible(__pyx_type, long __pyx_checksum, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_result
 *     __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'')
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_283__pyx_unpickle__PandasConvertible(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_282__pyx_unpickle__PandasConvertible, "__pyx_unpickle__PandasConvertible(__pyx_type, long __pyx_checksum, tuple __pyx_state)");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_283__pyx_unpickle__PandasConvertible = {"__pyx_unpickle__PandasConvertible", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_283__pyx_unpickle__PandasConvertible, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_282__pyx_unpickle__PandasConvertible};
                    static PyObject *__pyx_pw_7pyarrow_3lib_283__pyx_unpickle__PandasConvertible(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      PyObject *__pyx_v___pyx_type = 0;
                      long __pyx_v___pyx_checksum;
                      PyObject *__pyx_v___pyx_state = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[3] = {0,0,0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__pyx_unpickle__PandasConvertible (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_type,&__pyx_mstate_global->__pyx_n_u_pyx_checksum,&__pyx_mstate_global->__pyx_n_u_pyx_state,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(7, 4, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  3:
                            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(7, 4, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  2:
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(7, 4, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(7, 4, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__pyx_unpickle__PandasConvertible", 0) < (0)) __PYX_ERR(7, 4, __pyx_L3_error)
                          for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle__PandasConvertible", 1, 3, 3, i); __PYX_ERR(7, 4, __pyx_L3_error) }
                          }
                        } else if (unlikely(__pyx_nargs != 3)) {
                          goto __pyx_L5_argtuple_error;
                        } else {
                          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(7, 4, __pyx_L3_error)
                          values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(7, 4, __pyx_L3_error)
                          values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(7, 4, __pyx_L3_error)
                        }
                        __pyx_v___pyx_type = values[0];
                        __pyx_v___pyx_checksum = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(7, 4, __pyx_L3_error)
                        __pyx_v___pyx_state = ((PyObject*)values[2]);
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("__pyx_unpickle__PandasConvertible", 1, 3, 3, __pyx_nargs); __PYX_ERR(7, 4, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.__pyx_unpickle__PandasConvertible", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v___pyx_state), (&PyTuple_Type), 1, "__pyx_state", 1))) __PYX_ERR(7, 4, __pyx_L1_error)
                      __pyx_r = __pyx_pf_7pyarrow_3lib_282__pyx_unpickle__PandasConvertible(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

                      /* function exit code */
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __pyx_r = NULL;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      goto __pyx_L7_cleaned_up;
                      __pyx_L0:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __pyx_L7_cleaned_up:;
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_282__pyx_unpickle__PandasConvertible(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
                      PyObject *__pyx_v___pyx_result = 0;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_t_1;
                      PyObject *__pyx_t_2 = NULL;
                      PyObject *__pyx_t_3 = NULL;
                      size_t __pyx_t_4;
                      int __pyx_t_5;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__pyx_unpickle__PandasConvertible", 0);

                      /* "(tree fragment)":6
 * def __pyx_unpickle__PandasConvertible(__pyx_type, long __pyx_checksum, tuple __pyx_state):
 *     cdef object __pyx_result
 *     __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'')             # <<<<<<<<<<<<<<
 *     __pyx_result = _PandasConvertible.__new__(__pyx_type)
 *     if __pyx_state is not None:
*/
                      __pyx_t_1 = __Pyx_CheckUnpickleChecksum(__pyx_v___pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, __pyx_k__15); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(7, 6, __pyx_L1_error)

                      /* "(tree fragment)":7
 *     cdef object __pyx_result
 *     __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'')
 *     __pyx_result = _PandasConvertible.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle__PandasConvertible__set_state(<_PandasConvertible> __pyx_result, __pyx_state)
*/
                      __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__PandasConvertible);
                      __Pyx_INCREF(__pyx_t_3);
                      __pyx_t_4 = 0;
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v___pyx_type};
                        __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                        if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 7, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_2);
                      }
                      __pyx_v___pyx_result = __pyx_t_2;
                      __pyx_t_2 = 0;

                      /* "(tree fragment)":8
 *     __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'')
 *     __pyx_result = _PandasConvertible.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle__PandasConvertible__set_state(<_PandasConvertible> __pyx_result, __pyx_state)
 *     return __pyx_result
*/
                      __pyx_t_5 = (__pyx_v___pyx_state != ((PyObject*)Py_None));
                      if (__pyx_t_5) {

                        /* "(tree fragment)":9
 *     __pyx_result = _PandasConvertible.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle__PandasConvertible__set_state(<_PandasConvertible> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle__PandasConvertible__set_state(_PandasConvertible __pyx_result, __pyx_state: tuple):
*/
                        if (unlikely(__pyx_v___pyx_state == Py_None)) {
                          PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'");
                          __PYX_ERR(7, 9, __pyx_L1_error)
                        }
                        __pyx_t_2 = __pyx_f_7pyarrow_3lib___pyx_unpickle__PandasConvertible__set_state(((struct __pyx_obj_7pyarrow_3lib__PandasConvertible *)__pyx_v___pyx_result), __pyx_v___pyx_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 9, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_2);
                        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

                        /* "(tree fragment)":8
 *     __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'')
 *     __pyx_result = _PandasConvertible.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle__PandasConvertible__set_state(<_PandasConvertible> __pyx_result, __pyx_state)
 *     return __pyx_result
*/
                      }

                      /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle__PandasConvertible__set_state(<_PandasConvertible> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle__PandasConvertible__set_state(_PandasConvertible __pyx_result, __pyx_state: tuple):
 *     __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 0)
*/
                      __Pyx_XDECREF(__pyx_r);
                      __Pyx_INCREF(__pyx_v___pyx_result);
                      __pyx_r = __pyx_v___pyx_result;
                      goto __pyx_L0;

                      /* "(tree fragment)":4
 *     int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1
 *     int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1
 * def __pyx_unpickle__PandasConvertible(__pyx_type, long __pyx_checksum, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_result
 *     __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'')
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_AddTraceback("pyarrow.lib.__pyx_unpickle__PandasConvertible", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XDECREF(__pyx_v___pyx_result);
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "(tree fragment)":11
 *         __pyx_unpickle__PandasConvertible__set_state(<_PandasConvertible> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle__PandasConvertible__set_state(_PandasConvertible __pyx_result, __pyx_state: tuple):             # <<<<<<<<<<<<<<
 *     __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 0)
*/

                    static PyObject *__pyx_f_7pyarrow_3lib___pyx_unpickle__PandasConvertible__set_state(struct __pyx_obj_7pyarrow_3lib__PandasConvertible *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_t_1;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__pyx_unpickle__PandasConvertible__set_state", 0);

                      /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle__PandasConvertible__set_state(_PandasConvertible __pyx_result, __pyx_state: tuple):
 *     __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 0)             # <<<<<<<<<<<<<<
*/
                      __pyx_t_1 = __Pyx_UpdateUnpickledDict(((PyObject *)__pyx_v___pyx_result), __pyx_v___pyx_state, 0); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(7, 12, __pyx_L1_error)

                      /* "(tree fragment)":11
 *         __pyx_unpickle__PandasConvertible__set_state(<_PandasConvertible> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle__PandasConvertible__set_state(_PandasConvertible __pyx_result, __pyx_state: tuple):             # <<<<<<<<<<<<<<
 *     __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 0)
*/

                      /* function exit code */
                      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib.__pyx_unpickle__PandasConvertible__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = 0;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "(tree fragment)":4
 *     int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1
 *     int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1
 * def __pyx_unpickle__Tabular(__pyx_type, long __pyx_checksum, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_result
 *     __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'')
*/

                    /* Python wrapper */
                    static PyObject *__pyx_pw_7pyarrow_3lib_285__pyx_unpickle__Tabular(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
                    PyDoc_STRVAR(__pyx_doc_7pyarrow_3lib_284__pyx_unpickle__Tabular, "__pyx_unpickle__Tabular(__pyx_type, long __pyx_checksum, tuple __pyx_state)");
                    static PyMethodDef __pyx_mdef_7pyarrow_3lib_285__pyx_unpickle__Tabular = {"__pyx_unpickle__Tabular", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_285__pyx_unpickle__Tabular, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_284__pyx_unpickle__Tabular};
                    static PyObject *__pyx_pw_7pyarrow_3lib_285__pyx_unpickle__Tabular(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
                      PyObject *__pyx_v___pyx_type = 0;
                      long __pyx_v___pyx_checksum;
                      PyObject *__pyx_v___pyx_state = 0;
                      #if !CYTHON_METH_FASTCALL
                      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
                      #endif
                      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
                      PyObject* values[3] = {0,0,0};
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      PyObject *__pyx_r = 0;
                      __Pyx_RefNannyDeclarations
                      __Pyx_RefNannySetupContext("__pyx_unpickle__Tabular (wrapper)", 0);
                      #if !CYTHON_METH_FASTCALL
                      #if CYTHON_ASSUME_SAFE_SIZE
                      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
                      #else
                      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
                      #endif
                      #endif
                      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
                      {
                        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_type,&__pyx_mstate_global->__pyx_n_u_pyx_checksum,&__pyx_mstate_global->__pyx_n_u_pyx_state,0};
                        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
                        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(7, 4, __pyx_L3_error)
                        if (__pyx_kwds_len > 0) {
                          switch (__pyx_nargs) {
                            case  3:
                            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(7, 4, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  2:
                            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(7, 4, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  1:
                            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(7, 4, __pyx_L3_error)
                            CYTHON_FALLTHROUGH;
                            case  0: break;
                            default: goto __pyx_L5_argtuple_error;
                          }
                          const Py_ssize_t kwd_pos_args = __pyx_nargs;
                          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__pyx_unpickle__Tabular", 0) < (0)) __PYX_ERR(7, 4, __pyx_L3_error)
                          for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
                            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle__Tabular", 1, 3, 3, i); __PYX_ERR(7, 4, __pyx_L3_error) }
                          }
                        } else if (unlikely(__pyx_nargs != 3)) {
                          goto __pyx_L5_argtuple_error;
                        } else {
                          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(7, 4, __pyx_L3_error)
                          values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(7, 4, __pyx_L3_error)
                          values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
                          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(7, 4, __pyx_L3_error)
                        }
                        __pyx_v___pyx_type = values[0];
                        __pyx_v___pyx_checksum = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(7, 4, __pyx_L3_error)
                        __pyx_v___pyx_state = ((PyObject*)values[2]);
                      }
                      goto __pyx_L6_skip;
                      __pyx_L5_argtuple_error:;
                      __Pyx_RaiseArgtupleInvalid("__pyx_unpickle__Tabular", 1, 3, 3, __pyx_nargs); __PYX_ERR(7, 4, __pyx_L3_error)
                      __pyx_L6_skip:;
                      goto __pyx_L4_argument_unpacking_done;
                      __pyx_L3_error:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __Pyx_AddTraceback("pyarrow.lib.__pyx_unpickle__Tabular", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __Pyx_RefNannyFinishContext();
                      return NULL;
                      __pyx_L4_argument_unpacking_done:;
                      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v___pyx_state), (&PyTuple_Type), 1, "__pyx_state", 1))) __PYX_ERR(7, 4, __pyx_L1_error)
                      __pyx_r = __pyx_pf_7pyarrow_3lib_284__pyx_unpickle__Tabular(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

                      /* function exit code */
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __pyx_r = NULL;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      goto __pyx_L7_cleaned_up;
                      __pyx_L0:;
                      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
                        Py_XDECREF(values[__pyx_temp]);
                      }
                      __pyx_L7_cleaned_up:;
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    static PyObject *__pyx_pf_7pyarrow_3lib_284__pyx_unpickle__Tabular(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
                      PyObject *__pyx_v___pyx_result = 0;
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_t_1;
                      PyObject *__pyx_t_2 = NULL;
                      PyObject *__pyx_t_3 = NULL;
                      size_t __pyx_t_4;
                      int __pyx_t_5;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__pyx_unpickle__Tabular", 0);

                      /* "(tree fragment)":6
 * def __pyx_unpickle__Tabular(__pyx_type, long __pyx_checksum, tuple __pyx_state):
 *     cdef object __pyx_result
 *     __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'')             # <<<<<<<<<<<<<<
 *     __pyx_result = _Tabular.__new__(__pyx_type)
 *     if __pyx_state is not None:
*/
                      __pyx_t_1 = __Pyx_CheckUnpickleChecksum(__pyx_v___pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, __pyx_k__15); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(7, 6, __pyx_L1_error)

                      /* "(tree fragment)":7
 *     cdef object __pyx_result
 *     __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'')
 *     __pyx_result = _Tabular.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle__Tabular__set_state(<_Tabular> __pyx_result, __pyx_state)
*/
                      __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Tabular);
                      __Pyx_INCREF(__pyx_t_3);
                      __pyx_t_4 = 0;
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v___pyx_type};
                        __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                        if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 7, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_2);
                      }
                      __pyx_v___pyx_result = __pyx_t_2;
                      __pyx_t_2 = 0;

                      /* "(tree fragment)":8
 *     __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'')
 *     __pyx_result = _Tabular.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle__Tabular__set_state(<_Tabular> __pyx_result, __pyx_state)
 *     return __pyx_result
*/
                      __pyx_t_5 = (__pyx_v___pyx_state != ((PyObject*)Py_None));
                      if (__pyx_t_5) {

                        /* "(tree fragment)":9
 *     __pyx_result = _Tabular.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle__Tabular__set_state(<_Tabular> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle__Tabular__set_state(_Tabular __pyx_result, __pyx_state: tuple):
*/
                        if (unlikely(__pyx_v___pyx_state == Py_None)) {
                          PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'");
                          __PYX_ERR(7, 9, __pyx_L1_error)
                        }
                        __pyx_t_2 = __pyx_f_7pyarrow_3lib___pyx_unpickle__Tabular__set_state(((struct __pyx_obj_7pyarrow_3lib__Tabular *)__pyx_v___pyx_result), __pyx_v___pyx_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 9, __pyx_L1_error)
                        __Pyx_GOTREF(__pyx_t_2);
                        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

                        /* "(tree fragment)":8
 *     __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'')
 *     __pyx_result = _Tabular.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle__Tabular__set_state(<_Tabular> __pyx_result, __pyx_state)
 *     return __pyx_result
*/
                      }

                      /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle__Tabular__set_state(<_Tabular> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle__Tabular__set_state(_Tabular __pyx_result, __pyx_state: tuple):
 *     __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 0)
*/
                      __Pyx_XDECREF(__pyx_r);
                      __Pyx_INCREF(__pyx_v___pyx_result);
                      __pyx_r = __pyx_v___pyx_result;
                      goto __pyx_L0;

                      /* "(tree fragment)":4
 *     int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1
 *     int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1
 * def __pyx_unpickle__Tabular(__pyx_type, long __pyx_checksum, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_result
 *     __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'')
*/

                      /* function exit code */
                      __pyx_L1_error:;
                      __Pyx_XDECREF(__pyx_t_2);
                      __Pyx_XDECREF(__pyx_t_3);
                      __Pyx_AddTraceback("pyarrow.lib.__pyx_unpickle__Tabular", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = NULL;
                      __pyx_L0:;
                      __Pyx_XDECREF(__pyx_v___pyx_result);
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }

                    /* "(tree fragment)":11
 *         __pyx_unpickle__Tabular__set_state(<_Tabular> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle__Tabular__set_state(_Tabular __pyx_result, __pyx_state: tuple):             # <<<<<<<<<<<<<<
 *     __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 0)
*/

                    static PyObject *__pyx_f_7pyarrow_3lib___pyx_unpickle__Tabular__set_state(struct __pyx_obj_7pyarrow_3lib__Tabular *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
                      PyObject *__pyx_r = NULL;
                      __Pyx_RefNannyDeclarations
                      int __pyx_t_1;
                      int __pyx_lineno = 0;
                      const char *__pyx_filename = NULL;
                      int __pyx_clineno = 0;
                      __Pyx_RefNannySetupContext("__pyx_unpickle__Tabular__set_state", 0);

                      /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle__Tabular__set_state(_Tabular __pyx_result, __pyx_state: tuple):
 *     __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 0)             # <<<<<<<<<<<<<<
*/
                      __pyx_t_1 = __Pyx_UpdateUnpickledDict(((PyObject *)__pyx_v___pyx_result), __pyx_v___pyx_state, 0); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(7, 12, __pyx_L1_error)

                      /* "(tree fragment)":11
 *         __pyx_unpickle__Tabular__set_state(<_Tabular> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle__Tabular__set_state(_Tabular __pyx_result, __pyx_state: tuple):             # <<<<<<<<<<<<<<
 *     __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 0)
*/

                      /* function exit code */
                      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
                      goto __pyx_L0;
                      __pyx_L1_error:;
                      __Pyx_AddTraceback("pyarrow.lib.__pyx_unpickle__Tabular__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      __pyx_r = 0;
                      __pyx_L0:;
                      __Pyx_XGIVEREF(__pyx_r);
                      __Pyx_RefNannyFinishContext();
                      return __pyx_r;
                    }
/* #### Code section: module_exttypes ### */

static PyObject *__pyx_tp_new_7pyarrow_3lib__Weakrefable(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  o = __Pyx_AllocateExtensionType(t, 0);
  if (unlikely(!o)) return 0;
  return o;
}

static void __pyx_tp_dealloc_7pyarrow_3lib__Weakrefable(PyObject *o) {
  struct __pyx_obj_7pyarrow_3lib__Weakrefable *p = (struct __pyx_obj_7pyarrow_3lib__Weakrefable *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_7pyarrow_3lib__Weakrefable) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  if (p->__weakref__) PyObject_ClearWeakRefs(o);
  PyTypeObject *tp = Py_TYPE(o);
  #if CYTHON_USE_TYPE_SLOTS
  (*tp->tp_free)(o);
  #else
  {
    freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free);
    if (tp_free) tp_free(o);
  }
  #endif
  #if CYTHON_USE_TYPE_SPECS
  Py_DECREF(tp);
  #endif
}
#if CYTHON_USE_TYPE_SPECS
static PyMemberDef __pyx_type_7pyarrow_3lib__Weakrefable_members[] = {
  #if !CYTHON_USE_TYPE_SLOTS
  {"__weaklistoffset__", T_PYSSIZET, offsetof(struct __pyx_obj_7pyarrow_3lib__Weakrefable, __weakref__), READONLY, 0},
  #endif
  {0, 0, 0, 0, 0}
};
#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x03090000
#if defined(__GNUC__) || defined(__clang__)
#warning "pyarrow/lib.pxd:38:16: : __weakref__ is unsupported in the Limited API when running on Python <3.9."
#elif defined(_MSC_VER)
#pragma message("pyarrow/lib.pxd:38:16: : __weakref__ is unsupported in the Limited API when running on Python <3.9.")
#endif
#endif
static PyType_Slot __pyx_type_7pyarrow_3lib__Weakrefable_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib__Weakrefable},
  {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib__Weakrefable},
  {Py_tp_members, (void*)__pyx_type_7pyarrow_3lib__Weakrefable_members},
  {0, 0},
};
static PyType_Spec __pyx_type_7pyarrow_3lib__Weakrefable_spec = {
  "pyarrow.lib._Weakrefable",
  sizeof(struct __pyx_obj_7pyarrow_3lib__Weakrefable),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
  __pyx_type_7pyarrow_3lib__Weakrefable_slots,
};
#else

static PyTypeObject __pyx_type_7pyarrow_3lib__Weakrefable = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyarrow.lib.""_Weakrefable", /*tp_name*/
  sizeof(struct __pyx_obj_7pyarrow_3lib__Weakrefable), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7pyarrow_3lib__Weakrefable, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_7pyarrow_3lib__Weakrefable, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static PyObject *__pyx_tp_new_7pyarrow_3lib_IpcWriteOptions(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_7pyarrow_3lib_IpcWriteOptions *p;
  PyObject *o = __pyx_tp_new_7pyarrow_3lib__Weakrefable(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_7pyarrow_3lib_IpcWriteOptions *)o);
  __Pyx_default_placement_construct(&(p->c_options));
  return o;
}

static void __pyx_tp_dealloc_7pyarrow_3lib_IpcWriteOptions(PyObject *o) {
  struct __pyx_obj_7pyarrow_3lib_IpcWriteOptions *p = (struct __pyx_obj_7pyarrow_3lib_IpcWriteOptions *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_7pyarrow_3lib_IpcWriteOptions) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  __Pyx_call_destructor(p->c_options);
  __pyx_tp_dealloc_7pyarrow_3lib__Weakrefable(o);
}

static PyObject *__pyx_getprop_7pyarrow_3lib_15IpcWriteOptions_allow_64bit(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyarrow_3lib_15IpcWriteOptions_11allow_64bit_1__get__(o);
}

static int __pyx_setprop_7pyarrow_3lib_15IpcWriteOptions_allow_64bit(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7pyarrow_3lib_15IpcWriteOptions_11allow_64bit_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7pyarrow_3lib_15IpcWriteOptions_use_legacy_format(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyarrow_3lib_15IpcWriteOptions_17use_legacy_format_1__get__(o);
}

static int __pyx_setprop_7pyarrow_3lib_15IpcWriteOptions_use_legacy_format(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7pyarrow_3lib_15IpcWriteOptions_17use_legacy_format_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7pyarrow_3lib_15IpcWriteOptions_metadata_version(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyarrow_3lib_15IpcWriteOptions_16metadata_version_1__get__(o);
}

static int __pyx_setprop_7pyarrow_3lib_15IpcWriteOptions_metadata_version(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7pyarrow_3lib_15IpcWriteOptions_16metadata_version_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7pyarrow_3lib_15IpcWriteOptions_compression(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyarrow_3lib_15IpcWriteOptions_11compression_1__get__(o);
}

static int __pyx_setprop_7pyarrow_3lib_15IpcWriteOptions_compression(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7pyarrow_3lib_15IpcWriteOptions_11compression_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7pyarrow_3lib_15IpcWriteOptions_use_threads(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyarrow_3lib_15IpcWriteOptions_11use_threads_1__get__(o);
}

static int __pyx_setprop_7pyarrow_3lib_15IpcWriteOptions_use_threads(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7pyarrow_3lib_15IpcWriteOptions_11use_threads_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7pyarrow_3lib_15IpcWriteOptions_emit_dictionary_deltas(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyarrow_3lib_15IpcWriteOptions_22emit_dictionary_deltas_1__get__(o);
}

static int __pyx_setprop_7pyarrow_3lib_15IpcWriteOptions_emit_dictionary_deltas(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7pyarrow_3lib_15IpcWriteOptions_22emit_dictionary_deltas_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7pyarrow_3lib_15IpcWriteOptions_unify_dictionaries(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyarrow_3lib_15IpcWriteOptions_18unify_dictionaries_1__get__(o);
}

static int __pyx_setprop_7pyarrow_3lib_15IpcWriteOptions_unify_dictionaries(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7pyarrow_3lib_15IpcWriteOptions_18unify_dictionaries_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_7pyarrow_3lib_IpcWriteOptions[] = {
  {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15IpcWriteOptions_5__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15IpcWriteOptions_4__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15IpcWriteOptions_7__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15IpcWriteOptions_6__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_7pyarrow_3lib_IpcWriteOptions[] = {
  {"allow_64bit", __pyx_getprop_7pyarrow_3lib_15IpcWriteOptions_allow_64bit, __pyx_setprop_7pyarrow_3lib_15IpcWriteOptions_allow_64bit, 0, 0},
  {"use_legacy_format", __pyx_getprop_7pyarrow_3lib_15IpcWriteOptions_use_legacy_format, __pyx_setprop_7pyarrow_3lib_15IpcWriteOptions_use_legacy_format, 0, 0},
  {"metadata_version", __pyx_getprop_7pyarrow_3lib_15IpcWriteOptions_metadata_version, __pyx_setprop_7pyarrow_3lib_15IpcWriteOptions_metadata_version, 0, 0},
  {"compression", __pyx_getprop_7pyarrow_3lib_15IpcWriteOptions_compression, __pyx_setprop_7pyarrow_3lib_15IpcWriteOptions_compression, 0, 0},
  {"use_threads", __pyx_getprop_7pyarrow_3lib_15IpcWriteOptions_use_threads, __pyx_setprop_7pyarrow_3lib_15IpcWriteOptions_use_threads, 0, 0},
  {"emit_dictionary_deltas", __pyx_getprop_7pyarrow_3lib_15IpcWriteOptions_emit_dictionary_deltas, __pyx_setprop_7pyarrow_3lib_15IpcWriteOptions_emit_dictionary_deltas, 0, 0},
  {"unify_dictionaries", __pyx_getprop_7pyarrow_3lib_15IpcWriteOptions_unify_dictionaries, __pyx_setprop_7pyarrow_3lib_15IpcWriteOptions_unify_dictionaries, 0, 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_7pyarrow_3lib_IpcWriteOptions_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_IpcWriteOptions},
  {Py_tp_repr, (void *)__pyx_pw_7pyarrow_3lib_15IpcWriteOptions_3__repr__},
  {Py_tp_doc, (void *)PyDoc_STR("IpcWriteOptions(metadata_version=MetadataVersion.V5, *, bool allow_64bit=False, use_legacy_format=False, compression=None, bool use_threads=True, bool emit_dictionary_deltas=False, bool unify_dictionaries=False)\n\nSerialization options for the IPC format.\n\nParameters\n----------\nmetadata_version : MetadataVersion, default MetadataVersion.V5\n    The metadata version to write.  V5 is the current and latest,\n    V4 is the pre-1.0 metadata version (with incompatible Union layout).\nallow_64bit : bool, default False\n    If true, allow field lengths that don't fit in a signed 32-bit int.\nuse_legacy_format : bool, default False\n    Whether to use the pre-Arrow 0.15 IPC format.\ncompression : str, Codec, or None\n    compression codec to use for record batch buffers.\n    If None then batch buffers will be uncompressed.\n    Must be \"lz4\", \"zstd\" or None.\n    To specify a compression_level use `pyarrow.Codec`\nuse_threads : bool\n    Whether to use the global CPU thread pool to parallelize any\n    computational tasks like compression.\nemit_dictionary_deltas : bool\n    Whether to emit dictionary deltas.  Default is false for maximum\n    stream compatibility.\nunify_dictionaries : bool\n    If true then calls to write_table will attempt to unify dictionaries\n    across all batches in the table.  This can help avoid the need for\n    replacement dictionaries (which the file format does not support)\n    but requires computing the unified dictionary and then remapping\n    the indices arrays.\n\n    This parameter is ignored when writing to the IPC stream format as\n    the IPC stream format can support replacement dictionaries.")},
  {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_IpcWriteOptions},
  {Py_tp_getset, (void *)__pyx_getsets_7pyarrow_3lib_IpcWriteOptions},
  {Py_tp_init, (void *)__pyx_pw_7pyarrow_3lib_15IpcWriteOptions_1__init__},
  {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_IpcWriteOptions},
  {0, 0},
};
static PyType_Spec __pyx_type_7pyarrow_3lib_IpcWriteOptions_spec = {
  "pyarrow.lib.IpcWriteOptions",
  sizeof(struct __pyx_obj_7pyarrow_3lib_IpcWriteOptions),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
  __pyx_type_7pyarrow_3lib_IpcWriteOptions_slots,
};
#else

static PyTypeObject __pyx_type_7pyarrow_3lib_IpcWriteOptions = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyarrow.lib.""IpcWriteOptions", /*tp_name*/
  sizeof(struct __pyx_obj_7pyarrow_3lib_IpcWriteOptions), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7pyarrow_3lib_IpcWriteOptions, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  __pyx_pw_7pyarrow_3lib_15IpcWriteOptions_3__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  PyDoc_STR("IpcWriteOptions(metadata_version=MetadataVersion.V5, *, bool allow_64bit=False, use_legacy_format=False, compression=None, bool use_threads=True, bool emit_dictionary_deltas=False, bool unify_dictionaries=False)\n\nSerialization options for the IPC format.\n\nParameters\n----------\nmetadata_version : MetadataVersion, default MetadataVersion.V5\n    The metadata version to write.  V5 is the current and latest,\n    V4 is the pre-1.0 metadata version (with incompatible Union layout).\nallow_64bit : bool, default False\n    If true, allow field lengths that don't fit in a signed 32-bit int.\nuse_legacy_format : bool, default False\n    Whether to use the pre-Arrow 0.15 IPC format.\ncompression : str, Codec, or None\n    compression codec to use for record batch buffers.\n    If None then batch buffers will be uncompressed.\n    Must be \"lz4\", \"zstd\" or None.\n    To specify a compression_level use `pyarrow.Codec`\nuse_threads : bool\n    Whether to use the global CPU thread pool to parallelize any\n    computational tasks like compression.\nemit_dictionary_deltas : bool\n    Whether to emit dictionary deltas.  Default is false for maximum\n    stream compatibility.\nunify_dictionaries : bool\n    If true then calls to write_table will attempt to unify dictionaries\n    across all batches in the table.  This can help avoid the need for\n    replacement dictionaries (which the file format does not support)\n    but requires computing the unified dictionary and then remapping\n    the indices arrays.\n\n    This parameter is ignored when writing to the IPC stream format as\n    the IPC stream format can support replacement dictionaries."), /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_7pyarrow_3lib_IpcWriteOptions, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_7pyarrow_3lib_IpcWriteOptions, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  __pyx_pw_7pyarrow_3lib_15IpcWriteOptions_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_7pyarrow_3lib_IpcWriteOptions, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static PyObject *__pyx_tp_new_7pyarrow_3lib_IpcReadOptions(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_7pyarrow_3lib_IpcReadOptions *p;
  PyObject *o = __pyx_tp_new_7pyarrow_3lib__Weakrefable(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_7pyarrow_3lib_IpcReadOptions *)o);
  __Pyx_default_placement_construct(&(p->c_options));
  return o;
}

static void __pyx_tp_dealloc_7pyarrow_3lib_IpcReadOptions(PyObject *o) {
  struct __pyx_obj_7pyarrow_3lib_IpcReadOptions *p = (struct __pyx_obj_7pyarrow_3lib_IpcReadOptions *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_7pyarrow_3lib_IpcReadOptions) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  __Pyx_call_destructor(p->c_options);
  __pyx_tp_dealloc_7pyarrow_3lib__Weakrefable(o);
}

static PyObject *__pyx_getprop_7pyarrow_3lib_14IpcReadOptions_ensure_native_endian(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyarrow_3lib_14IpcReadOptions_20ensure_native_endian_1__get__(o);
}

static int __pyx_setprop_7pyarrow_3lib_14IpcReadOptions_ensure_native_endian(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7pyarrow_3lib_14IpcReadOptions_20ensure_native_endian_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7pyarrow_3lib_14IpcReadOptions_ensure_alignment(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyarrow_3lib_14IpcReadOptions_16ensure_alignment_1__get__(o);
}

static int __pyx_setprop_7pyarrow_3lib_14IpcReadOptions_ensure_alignment(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7pyarrow_3lib_14IpcReadOptions_16ensure_alignment_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7pyarrow_3lib_14IpcReadOptions_use_threads(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyarrow_3lib_14IpcReadOptions_11use_threads_1__get__(o);
}

static int __pyx_setprop_7pyarrow_3lib_14IpcReadOptions_use_threads(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7pyarrow_3lib_14IpcReadOptions_11use_threads_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7pyarrow_3lib_14IpcReadOptions_included_fields(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyarrow_3lib_14IpcReadOptions_15included_fields_1__get__(o);
}

static int __pyx_setprop_7pyarrow_3lib_14IpcReadOptions_included_fields(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7pyarrow_3lib_14IpcReadOptions_15included_fields_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_7pyarrow_3lib_IpcReadOptions[] = {
  {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_14IpcReadOptions_5__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_14IpcReadOptions_4__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_14IpcReadOptions_7__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_14IpcReadOptions_6__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_7pyarrow_3lib_IpcReadOptions[] = {
  {"ensure_native_endian", __pyx_getprop_7pyarrow_3lib_14IpcReadOptions_ensure_native_endian, __pyx_setprop_7pyarrow_3lib_14IpcReadOptions_ensure_native_endian, 0, 0},
  {"ensure_alignment", __pyx_getprop_7pyarrow_3lib_14IpcReadOptions_ensure_alignment, __pyx_setprop_7pyarrow_3lib_14IpcReadOptions_ensure_alignment, 0, 0},
  {"use_threads", __pyx_getprop_7pyarrow_3lib_14IpcReadOptions_use_threads, __pyx_setprop_7pyarrow_3lib_14IpcReadOptions_use_threads, 0, 0},
  {"included_fields", __pyx_getprop_7pyarrow_3lib_14IpcReadOptions_included_fields, __pyx_setprop_7pyarrow_3lib_14IpcReadOptions_included_fields, 0, 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_7pyarrow_3lib_IpcReadOptions_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_IpcReadOptions},
  {Py_tp_repr, (void *)__pyx_pw_7pyarrow_3lib_14IpcReadOptions_3__repr__},
  {Py_tp_doc, (void *)PyDoc_STR("IpcReadOptions(bool ensure_native_endian=True, *, Alignment ensure_alignment=Alignment.Any, bool use_threads=True, list included_fields=None)\n\nSerialization options for reading IPC format.\n\nParameters\n----------\nensure_native_endian : bool, default True\n    Whether to convert incoming data to platform-native endianness.\nensure_alignment : Alignment, default Alignment.Any\n    Data is copied to aligned memory locations if mis-aligned.\n    Some use cases might require data to have a specific alignment, for example,\n    for the data buffer of an int32 array to be aligned on a 4-byte boundary.\nuse_threads : bool\n    Whether to use the global CPU thread pool to parallelize any\n    computational tasks like decompression\nincluded_fields : list\n    If empty (the default), return all deserialized fields.\n    If non-empty, the values are the indices of fields to read on\n    the top-level schema")},
  {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_IpcReadOptions},
  {Py_tp_getset, (void *)__pyx_getsets_7pyarrow_3lib_IpcReadOptions},
  {Py_tp_init, (void *)__pyx_pw_7pyarrow_3lib_14IpcReadOptions_1__init__},
  {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_IpcReadOptions},
  {0, 0},
};
static PyType_Spec __pyx_type_7pyarrow_3lib_IpcReadOptions_spec = {
  "pyarrow.lib.IpcReadOptions",
  sizeof(struct __pyx_obj_7pyarrow_3lib_IpcReadOptions),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
  __pyx_type_7pyarrow_3lib_IpcReadOptions_slots,
};
#else

static PyTypeObject __pyx_type_7pyarrow_3lib_IpcReadOptions = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyarrow.lib.""IpcReadOptions", /*tp_name*/
  sizeof(struct __pyx_obj_7pyarrow_3lib_IpcReadOptions), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7pyarrow_3lib_IpcReadOptions, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  __pyx_pw_7pyarrow_3lib_14IpcReadOptions_3__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  PyDoc_STR("IpcReadOptions(bool ensure_native_endian=True, *, Alignment ensure_alignment=Alignment.Any, bool use_threads=True, list included_fields=None)\n\nSerialization options for reading IPC format.\n\nParameters\n----------\nensure_native_endian : bool, default True\n    Whether to convert incoming data to platform-native endianness.\nensure_alignment : Alignment, default Alignment.Any\n    Data is copied to aligned memory locations if mis-aligned.\n    Some use cases might require data to have a specific alignment, for example,\n    for the data buffer of an int32 array to be aligned on a 4-byte boundary.\nuse_threads : bool\n    Whether to use the global CPU thread pool to parallelize any\n    computational tasks like decompression\nincluded_fields : list\n    If empty (the default), return all deserialized fields.\n    If non-empty, the values are the indices of fields to read on\n    the top-level schema"), /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_7pyarrow_3lib_IpcReadOptions, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_7pyarrow_3lib_IpcReadOptions, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  __pyx_pw_7pyarrow_3lib_14IpcReadOptions_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_7pyarrow_3lib_IpcReadOptions, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static PyObject *__pyx_tp_new_7pyarrow_3lib_Message(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_7pyarrow_3lib_Message *p;
  PyObject *o = __pyx_tp_new_7pyarrow_3lib__Weakrefable(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_7pyarrow_3lib_Message *)o);
  __Pyx_default_placement_construct(&(p->message));
  if (unlikely(__pyx_pw_7pyarrow_3lib_7Message_1__cinit__(o, __pyx_mstate_global->__pyx_empty_tuple, NULL) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_7pyarrow_3lib_Message(PyObject *o) {
  struct __pyx_obj_7pyarrow_3lib_Message *p = (struct __pyx_obj_7pyarrow_3lib_Message *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_7pyarrow_3lib_Message) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  __Pyx_call_destructor(p->message);
  __pyx_tp_dealloc_7pyarrow_3lib__Weakrefable(o);
}

static PyObject *__pyx_getprop_7pyarrow_3lib_7Message_type(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyarrow_3lib_7Message_4type_1__get__(o);
}

static PyObject *__pyx_getprop_7pyarrow_3lib_7Message_metadata(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyarrow_3lib_7Message_8metadata_1__get__(o);
}

static PyObject *__pyx_getprop_7pyarrow_3lib_7Message_metadata_version(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyarrow_3lib_7Message_16metadata_version_1__get__(o);
}

static PyObject *__pyx_getprop_7pyarrow_3lib_7Message_body(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyarrow_3lib_7Message_4body_1__get__(o);
}

static PyMethodDef __pyx_methods_7pyarrow_3lib_Message[] = {
  {"equals", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_7Message_5equals, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_7Message_4equals},
  {"serialize_to", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_7Message_7serialize_to, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_7Message_6serialize_to},
  {"serialize", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_7Message_9serialize, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_7Message_8serialize},
  {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_7Message_13__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_7Message_12__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_7Message_15__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_7Message_14__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_7pyarrow_3lib_Message[] = {
  {"type", __pyx_getprop_7pyarrow_3lib_7Message_type, 0, 0, 0},
  {"metadata", __pyx_getprop_7pyarrow_3lib_7Message_metadata, 0, 0, 0},
  {"metadata_version", __pyx_getprop_7pyarrow_3lib_7Message_metadata_version, 0, 0, 0},
  {"body", __pyx_getprop_7pyarrow_3lib_7Message_body, 0, 0, 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_7pyarrow_3lib_Message_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_Message},
  {Py_tp_repr, (void *)__pyx_pw_7pyarrow_3lib_7Message_11__repr__},
  {Py_tp_doc, (void *)PyDoc_STR("Message()\n\nContainer for an Arrow IPC message with metadata and optional body")},
  {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_Message},
  {Py_tp_getset, (void *)__pyx_getsets_7pyarrow_3lib_Message},
  {Py_tp_init, (void *)__pyx_pw_7pyarrow_3lib_7Message_3__init__},
  {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_Message},
  {0, 0},
};
static PyType_Spec __pyx_type_7pyarrow_3lib_Message_spec = {
  "pyarrow.lib.Message",
  sizeof(struct __pyx_obj_7pyarrow_3lib_Message),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
  __pyx_type_7pyarrow_3lib_Message_slots,
};
#else

static PyTypeObject __pyx_type_7pyarrow_3lib_Message = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyarrow.lib.""Message", /*tp_name*/
  sizeof(struct __pyx_obj_7pyarrow_3lib_Message), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7pyarrow_3lib_Message, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  __pyx_pw_7pyarrow_3lib_7Message_11__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  PyDoc_STR("Message()\n\nContainer for an Arrow IPC message with metadata and optional body"), /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_7pyarrow_3lib_Message, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_7pyarrow_3lib_Message, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  __pyx_pw_7pyarrow_3lib_7Message_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_7pyarrow_3lib_Message, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_7pyarrow_3lib_MemoryPool __pyx_vtable_7pyarrow_3lib_MemoryPool;

static PyObject *__pyx_tp_new_7pyarrow_3lib_MemoryPool(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_7pyarrow_3lib_MemoryPool *p;
  PyObject *o = __pyx_tp_new_7pyarrow_3lib__Weakrefable(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)o);
  p->__pyx_vtab = __pyx_vtabptr_7pyarrow_3lib_MemoryPool;
  return o;
}

static PyObject *__pyx_getprop_7pyarrow_3lib_10MemoryPool_backend_name(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyarrow_3lib_10MemoryPool_12backend_name_1__get__(o);
}

static PyMethodDef __pyx_methods_7pyarrow_3lib_MemoryPool[] = {
  {"release_unused", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10MemoryPool_3release_unused, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10MemoryPool_2release_unused},
  {"bytes_allocated", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10MemoryPool_5bytes_allocated, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10MemoryPool_4bytes_allocated},
  {"total_bytes_allocated", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10MemoryPool_7total_bytes_allocated, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10MemoryPool_6total_bytes_allocated},
  {"max_memory", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10MemoryPool_9max_memory, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10MemoryPool_8max_memory},
  {"num_allocations", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10MemoryPool_11num_allocations, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10MemoryPool_10num_allocations},
  {"print_stats", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10MemoryPool_13print_stats, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10MemoryPool_12print_stats},
  {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10MemoryPool_17__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10MemoryPool_16__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10MemoryPool_19__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10MemoryPool_18__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_7pyarrow_3lib_MemoryPool[] = {
  {"backend_name", __pyx_getprop_7pyarrow_3lib_10MemoryPool_backend_name, 0, PyDoc_STR("\n        The name of the backend used by this MemoryPool (e.g. \"jemalloc\").\n        "), 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_7pyarrow_3lib_MemoryPool_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib__Weakrefable},
  {Py_tp_repr, (void *)__pyx_pw_7pyarrow_3lib_10MemoryPool_15__repr__},
  {Py_tp_doc, (void *)PyDoc_STR("MemoryPool()\n\nBase class for memory allocation.\n\nBesides tracking its number of allocated bytes, a memory pool also\ntakes care of the required 64-byte alignment for Arrow data.")},
  {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_MemoryPool},
  {Py_tp_getset, (void *)__pyx_getsets_7pyarrow_3lib_MemoryPool},
  {Py_tp_init, (void *)__pyx_pw_7pyarrow_3lib_10MemoryPool_1__init__},
  {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_MemoryPool},
  {0, 0},
};
static PyType_Spec __pyx_type_7pyarrow_3lib_MemoryPool_spec = {
  "pyarrow.lib.MemoryPool",
  sizeof(struct __pyx_obj_7pyarrow_3lib_MemoryPool),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
  __pyx_type_7pyarrow_3lib_MemoryPool_slots,
};
#else

static PyTypeObject __pyx_type_7pyarrow_3lib_MemoryPool = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyarrow.lib.""MemoryPool", /*tp_name*/
  sizeof(struct __pyx_obj_7pyarrow_3lib_MemoryPool), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7pyarrow_3lib__Weakrefable, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  __pyx_pw_7pyarrow_3lib_10MemoryPool_15__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  PyDoc_STR("MemoryPool()\n\nBase class for memory allocation.\n\nBesides tracking its number of allocated bytes, a memory pool also\ntakes care of the required 64-byte alignment for Arrow data."), /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_7pyarrow_3lib_MemoryPool, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_7pyarrow_3lib_MemoryPool, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  __pyx_pw_7pyarrow_3lib_10MemoryPool_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_7pyarrow_3lib_MemoryPool, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_7pyarrow_3lib_DataType __pyx_vtable_7pyarrow_3lib_DataType;

static PyObject *__pyx_tp_new_7pyarrow_3lib_DataType(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_7pyarrow_3lib_DataType *p;
  PyObject *o = __pyx_tp_new_7pyarrow_3lib__Weakrefable(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_7pyarrow_3lib_DataType *)o);
  p->__pyx_vtab = __pyx_vtabptr_7pyarrow_3lib_DataType;
  __Pyx_default_placement_construct(&(p->sp_type));
  p->pep3118_format = ((PyObject*)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_7pyarrow_3lib_8DataType_1__cinit__(o, __pyx_mstate_global->__pyx_empty_tuple, NULL) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_7pyarrow_3lib_DataType(PyObject *o) {
  struct __pyx_obj_7pyarrow_3lib_DataType *p = (struct __pyx_obj_7pyarrow_3lib_DataType *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_7pyarrow_3lib_DataType) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  __Pyx_call_destructor(p->sp_type);
  Py_CLEAR(p->pep3118_format);
  __pyx_tp_dealloc_7pyarrow_3lib__Weakrefable(o);
}

static PyObject *__pyx_tp_richcompare_7pyarrow_3lib_DataType(PyObject *o1, PyObject *o2, int op) {
  switch (op) {
    case Py_EQ: {
      return __pyx_pw_7pyarrow_3lib_8DataType_15__eq__(o1, o2);
    }
    case Py_NE: {
      PyObject *ret;
      ret = __pyx_pw_7pyarrow_3lib_8DataType_15__eq__(o1, o2);
      if (likely(ret && ret != Py_NotImplemented)) {
        int b = __Pyx_PyObject_IsTrue(ret);
        Py_DECREF(ret);
        if (unlikely(b < 0)) return NULL;
        ret = (b) ? Py_False : Py_True;
        Py_INCREF(ret);
      }
      return ret;
    }
    default: {
      return __Pyx_NewRef(Py_NotImplemented);
    }
  }
}

static PyObject *__pyx_getprop_7pyarrow_3lib_8DataType_id(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyarrow_3lib_8DataType_2id_1__get__(o);
}

static PyObject *__pyx_getprop_7pyarrow_3lib_8DataType_bit_width(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyarrow_3lib_8DataType_9bit_width_1__get__(o);
}

static PyObject *__pyx_getprop_7pyarrow_3lib_8DataType_byte_width(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyarrow_3lib_8DataType_10byte_width_1__get__(o);
}

static PyObject *__pyx_getprop_7pyarrow_3lib_8DataType_num_fields(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyarrow_3lib_8DataType_10num_fields_1__get__(o);
}

static PyObject *__pyx_getprop_7pyarrow_3lib_8DataType_num_buffers(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyarrow_3lib_8DataType_11num_buffers_1__get__(o);
}

static PyObject *__pyx_getprop_7pyarrow_3lib_8DataType_has_variadic_buffers(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyarrow_3lib_8DataType_20has_variadic_buffers_1__get__(o);
}

static PyMethodDef __pyx_methods_7pyarrow_3lib_DataType[] = {
  {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_8DataType_11__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_8DataType_10__reduce__},
  {"equals", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_8DataType_17equals, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_8DataType_16equals},
  {"to_pandas_dtype", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_8DataType_19to_pandas_dtype, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_8DataType_18to_pandas_dtype},
  {"_export_to_c", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_8DataType_21_export_to_c, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_8DataType_20_export_to_c},
  {"_import_from_c", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_8DataType_23_import_from_c, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_8DataType_22_import_from_c},
  {"__arrow_c_schema__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_8DataType_25__arrow_c_schema__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_8DataType_24__arrow_c_schema__},
  {"_import_from_c_capsule", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_8DataType_27_import_from_c_capsule, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_8DataType_26_import_from_c_capsule},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_7pyarrow_3lib_DataType[] = {
  {"id", __pyx_getprop_7pyarrow_3lib_8DataType_id, 0, 0, 0},
  {"bit_width", __pyx_getprop_7pyarrow_3lib_8DataType_bit_width, 0, PyDoc_STR("\n        Bit width for fixed width type.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> pa.int64()\n        DataType(int64)\n        >>> pa.int64().bit_width\n        64\n        "), 0},
  {"byte_width", __pyx_getprop_7pyarrow_3lib_8DataType_byte_width, 0, PyDoc_STR("\n        Byte width for fixed width type.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> pa.int64()\n        DataType(int64)\n        >>> pa.int64().byte_width\n        8\n        "), 0},
  {"num_fields", __pyx_getprop_7pyarrow_3lib_8DataType_num_fields, 0, PyDoc_STR("\n        The number of child fields.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> pa.int64()\n        DataType(int64)\n        >>> pa.int64().num_fields\n        0\n        >>> pa.list_(pa.string())\n        ListType(list<item: string>)\n        >>> pa.list_(pa.string()).num_fields\n        1\n        >>> struct = pa.struct({'x': pa.int32(), 'y': pa.string()})\n        >>> struct.num_fields\n        2\n        "), 0},
  {"num_buffers", __pyx_getprop_7pyarrow_3lib_8DataType_num_buffers, 0, PyDoc_STR("\n        Number of data buffers required to construct Array type\n        excluding children.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> pa.int64().num_buffers\n        2\n        >>> pa.string().num_buffers\n        3\n        "), 0},
  {"has_variadic_buffers", __pyx_getprop_7pyarrow_3lib_8DataType_has_variadic_buffers, 0, PyDoc_STR("\n        If True, the number of expected buffers is only\n        lower-bounded by num_buffers.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> pa.int64().has_variadic_buffers\n        False\n        >>> pa.string_view().has_variadic_buffers\n        True\n        "), 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_7pyarrow_3lib_DataType_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_DataType},
  {Py_tp_repr, (void *)__pyx_pw_7pyarrow_3lib_8DataType_13__repr__},
  {Py_tp_hash, (void *)__pyx_pw_7pyarrow_3lib_8DataType_9__hash__},
  {Py_tp_str, (void *)__pyx_pw_7pyarrow_3lib_8DataType_7__str__},
  {Py_tp_doc, (void *)PyDoc_STR("DataType()\n\nBase class of all Arrow data types.\n\nEach data type is an *instance* of this class.\n\nExamples\n--------\nInstance of int64 type:\n\n>>> import pyarrow as pa\n>>> pa.int64()\nDataType(int64)")},
  {Py_tp_richcompare, (void *)__pyx_tp_richcompare_7pyarrow_3lib_DataType},
  {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_DataType},
  {Py_tp_getset, (void *)__pyx_getsets_7pyarrow_3lib_DataType},
  {Py_tp_init, (void *)__pyx_pw_7pyarrow_3lib_8DataType_3__init__},
  {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_DataType},
  {0, 0},
};
static PyType_Spec __pyx_type_7pyarrow_3lib_DataType_spec = {
  "pyarrow.lib.DataType",
  sizeof(struct __pyx_obj_7pyarrow_3lib_DataType),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
  __pyx_type_7pyarrow_3lib_DataType_slots,
};
#else

static PyTypeObject __pyx_type_7pyarrow_3lib_DataType = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyarrow.lib.""DataType", /*tp_name*/
  sizeof(struct __pyx_obj_7pyarrow_3lib_DataType), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7pyarrow_3lib_DataType, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  __pyx_pw_7pyarrow_3lib_8DataType_13__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  __pyx_pw_7pyarrow_3lib_8DataType_9__hash__, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pw_7pyarrow_3lib_8DataType_7__str__, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  PyDoc_STR("DataType()\n\nBase class of all Arrow data types.\n\nEach data type is an *instance* of this class.\n\nExamples\n--------\nInstance of int64 type:\n\n>>> import pyarrow as pa\n>>> pa.int64()\nDataType(int64)"), /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  __pyx_tp_richcompare_7pyarrow_3lib_DataType, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_7pyarrow_3lib_DataType, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_7pyarrow_3lib_DataType, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  __pyx_pw_7pyarrow_3lib_8DataType_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_7pyarrow_3lib_DataType, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_7pyarrow_3lib_ListType __pyx_vtable_7pyarrow_3lib_ListType;

static PyObject *__pyx_tp_new_7pyarrow_3lib_ListType(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_7pyarrow_3lib_ListType *p;
  PyObject *o = __pyx_tp_new_7pyarrow_3lib_DataType(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_7pyarrow_3lib_ListType *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_DataType*)__pyx_vtabptr_7pyarrow_3lib_ListType;
  return o;
}

static PyObject *__pyx_getprop_7pyarrow_3lib_8ListType_value_field(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyarrow_3lib_8ListType_11value_field_1__get__(o);
}

static PyObject *__pyx_getprop_7pyarrow_3lib_8ListType_value_type(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyarrow_3lib_8ListType_10value_type_1__get__(o);
}

static PyMethodDef __pyx_methods_7pyarrow_3lib_ListType[] = {
  {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_8ListType_1__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_8ListType___reduce__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_7pyarrow_3lib_ListType[] = {
  {"value_field", __pyx_getprop_7pyarrow_3lib_8ListType_value_field, 0, PyDoc_STR("\n        The field for list values.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> pa.list_(pa.string()).value_field\n        pyarrow.Field<item: string>\n        "), 0},
  {"value_type", __pyx_getprop_7pyarrow_3lib_8ListType_value_type, 0, PyDoc_STR("\n        The data type of list values.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> pa.list_(pa.string()).value_type\n        DataType(string)\n        "), 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_7pyarrow_3lib_ListType_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_DataType},
  {Py_tp_doc, (void *)PyDoc_STR("\n    Concrete class for list data types.\n\n    Examples\n    --------\n    Create an instance of ListType:\n\n    >>> import pyarrow as pa\n    >>> pa.list_(pa.string())\n    ListType(list<item: string>)\n    ")},
  {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_ListType},
  {Py_tp_getset, (void *)__pyx_getsets_7pyarrow_3lib_ListType},
  {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_ListType},
  {0, 0},
};
static PyType_Spec __pyx_type_7pyarrow_3lib_ListType_spec = {
  "pyarrow.lib.ListType",
  sizeof(struct __pyx_obj_7pyarrow_3lib_ListType),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
  __pyx_type_7pyarrow_3lib_ListType_slots,
};
#else

static PyTypeObject __pyx_type_7pyarrow_3lib_ListType = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyarrow.lib.""ListType", /*tp_name*/
  sizeof(struct __pyx_obj_7pyarrow_3lib_ListType), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7pyarrow_3lib_DataType, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_7pyarrow_3lib_8DataType_13__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_7pyarrow_3lib_8DataType_7__str__, /*tp_str*/
  #else
  0, /*tp_str*/
  #endif
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  PyDoc_STR("\n    Concrete class for list data types.\n\n    Examples\n    --------\n    Create an instance of ListType:\n\n    >>> import pyarrow as pa\n    >>> pa.list_(pa.string())\n    ListType(list<item: string>)\n    "), /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_7pyarrow_3lib_ListType, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_7pyarrow_3lib_ListType, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_7pyarrow_3lib_8DataType_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_7pyarrow_3lib_ListType, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_7pyarrow_3lib_LargeListType __pyx_vtable_7pyarrow_3lib_LargeListType;

static PyObject *__pyx_tp_new_7pyarrow_3lib_LargeListType(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_7pyarrow_3lib_LargeListType *p;
  PyObject *o = __pyx_tp_new_7pyarrow_3lib_DataType(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_7pyarrow_3lib_LargeListType *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_DataType*)__pyx_vtabptr_7pyarrow_3lib_LargeListType;
  return o;
}

static PyObject *__pyx_getprop_7pyarrow_3lib_13LargeListType_value_field(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyarrow_3lib_13LargeListType_11value_field_1__get__(o);
}

static PyObject *__pyx_getprop_7pyarrow_3lib_13LargeListType_value_type(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyarrow_3lib_13LargeListType_10value_type_1__get__(o);
}

static PyMethodDef __pyx_methods_7pyarrow_3lib_LargeListType[] = {
  {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_13LargeListType_1__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_13LargeListType___reduce__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_7pyarrow_3lib_LargeListType[] = {
  {"value_field", __pyx_getprop_7pyarrow_3lib_13LargeListType_value_field, 0, 0, 0},
  {"value_type", __pyx_getprop_7pyarrow_3lib_13LargeListType_value_type, 0, PyDoc_STR("\n        The data type of large list values.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> pa.large_list(pa.string()).value_type\n        DataType(string)\n        "), 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_7pyarrow_3lib_LargeListType_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_DataType},
  {Py_tp_doc, (void *)PyDoc_STR("\n    Concrete class for large list data types\n    (like ListType, but with 64-bit offsets).\n\n    Examples\n    --------\n    Create an instance of LargeListType:\n\n    >>> import pyarrow as pa\n    >>> pa.large_list(pa.string())\n    LargeListType(large_list<item: string>)\n    ")},
  {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_LargeListType},
  {Py_tp_getset, (void *)__pyx_getsets_7pyarrow_3lib_LargeListType},
  {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_LargeListType},
  {0, 0},
};
static PyType_Spec __pyx_type_7pyarrow_3lib_LargeListType_spec = {
  "pyarrow.lib.LargeListType",
  sizeof(struct __pyx_obj_7pyarrow_3lib_LargeListType),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
  __pyx_type_7pyarrow_3lib_LargeListType_slots,
};
#else

static PyTypeObject __pyx_type_7pyarrow_3lib_LargeListType = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyarrow.lib.""LargeListType", /*tp_name*/
  sizeof(struct __pyx_obj_7pyarrow_3lib_LargeListType), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7pyarrow_3lib_DataType, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_7pyarrow_3lib_8DataType_13__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_7pyarrow_3lib_8DataType_7__str__, /*tp_str*/
  #else
  0, /*tp_str*/
  #endif
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  PyDoc_STR("\n    Concrete class for large list data types\n    (like ListType, but with 64-bit offsets).\n\n    Examples\n    --------\n    Create an instance of LargeListType:\n\n    >>> import pyarrow as pa\n    >>> pa.large_list(pa.string())\n    LargeListType(large_list<item: string>)\n    "), /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_7pyarrow_3lib_LargeListType, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_7pyarrow_3lib_LargeListType, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_7pyarrow_3lib_8DataType_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_7pyarrow_3lib_LargeListType, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_7pyarrow_3lib_ListViewType __pyx_vtable_7pyarrow_3lib_ListViewType;

static PyObject *__pyx_tp_new_7pyarrow_3lib_ListViewType(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_7pyarrow_3lib_ListViewType *p;
  PyObject *o = __pyx_tp_new_7pyarrow_3lib_DataType(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_7pyarrow_3lib_ListViewType *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_DataType*)__pyx_vtabptr_7pyarrow_3lib_ListViewType;
  return o;
}

static PyObject *__pyx_getprop_7pyarrow_3lib_12ListViewType_value_field(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyarrow_3lib_12ListViewType_11value_field_1__get__(o);
}

static PyObject *__pyx_getprop_7pyarrow_3lib_12ListViewType_value_type(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyarrow_3lib_12ListViewType_10value_type_1__get__(o);
}

static PyMethodDef __pyx_methods_7pyarrow_3lib_ListViewType[] = {
  {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12ListViewType_1__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12ListViewType___reduce__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_7pyarrow_3lib_ListViewType[] = {
  {"value_field", __pyx_getprop_7pyarrow_3lib_12ListViewType_value_field, 0, PyDoc_STR("\n        The field for list view values.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> pa.list_view(pa.string()).value_field\n        pyarrow.Field<item: string>\n        "), 0},
  {"value_type", __pyx_getprop_7pyarrow_3lib_12ListViewType_value_type, 0, PyDoc_STR("\n        The data type of list view values.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> pa.list_view(pa.string()).value_type\n        DataType(string)\n        "), 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_7pyarrow_3lib_ListViewType_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_DataType},
  {Py_tp_doc, (void *)PyDoc_STR("\n    Concrete class for list view data types.\n\n    Examples\n    --------\n    Create an instance of ListViewType:\n\n    >>> import pyarrow as pa\n    >>> pa.list_view(pa.string())\n    ListViewType(list_view<item: string>)\n    ")},
  {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_ListViewType},
  {Py_tp_getset, (void *)__pyx_getsets_7pyarrow_3lib_ListViewType},
  {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_ListViewType},
  {0, 0},
};
static PyType_Spec __pyx_type_7pyarrow_3lib_ListViewType_spec = {
  "pyarrow.lib.ListViewType",
  sizeof(struct __pyx_obj_7pyarrow_3lib_ListViewType),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
  __pyx_type_7pyarrow_3lib_ListViewType_slots,
};
#else

static PyTypeObject __pyx_type_7pyarrow_3lib_ListViewType = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyarrow.lib.""ListViewType", /*tp_name*/
  sizeof(struct __pyx_obj_7pyarrow_3lib_ListViewType), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7pyarrow_3lib_DataType, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_7pyarrow_3lib_8DataType_13__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_7pyarrow_3lib_8DataType_7__str__, /*tp_str*/
  #else
  0, /*tp_str*/
  #endif
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  PyDoc_STR("\n    Concrete class for list view data types.\n\n    Examples\n    --------\n    Create an instance of ListViewType:\n\n    >>> import pyarrow as pa\n    >>> pa.list_view(pa.string())\n    ListViewType(list_view<item: string>)\n    "), /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_7pyarrow_3lib_ListViewType, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_7pyarrow_3lib_ListViewType, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_7pyarrow_3lib_8DataType_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_7pyarrow_3lib_ListViewType, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_7pyarrow_3lib_LargeListViewType __pyx_vtable_7pyarrow_3lib_LargeListViewType;

static PyObject *__pyx_tp_new_7pyarrow_3lib_LargeListViewType(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_7pyarrow_3lib_LargeListViewType *p;
  PyObject *o = __pyx_tp_new_7pyarrow_3lib_DataType(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_7pyarrow_3lib_LargeListViewType *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_DataType*)__pyx_vtabptr_7pyarrow_3lib_LargeListViewType;
  return o;
}

static PyObject *__pyx_getprop_7pyarrow_3lib_17LargeListViewType_value_field(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyarrow_3lib_17LargeListViewType_11value_field_1__get__(o);
}

static PyObject *__pyx_getprop_7pyarrow_3lib_17LargeListViewType_value_type(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyarrow_3lib_17LargeListViewType_10value_type_1__get__(o);
}

static PyMethodDef __pyx_methods_7pyarrow_3lib_LargeListViewType[] = {
  {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_17LargeListViewType_1__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_17LargeListViewType___reduce__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_7pyarrow_3lib_LargeListViewType[] = {
  {"value_field", __pyx_getprop_7pyarrow_3lib_17LargeListViewType_value_field, 0, PyDoc_STR("\n        The field for large list view values.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> pa.large_list_view(pa.string()).value_field\n        pyarrow.Field<item: string>\n        "), 0},
  {"value_type", __pyx_getprop_7pyarrow_3lib_17LargeListViewType_value_type, 0, PyDoc_STR("\n        The data type of large list view values.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> pa.large_list_view(pa.string()).value_type\n        DataType(string)\n        "), 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_7pyarrow_3lib_LargeListViewType_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_DataType},
  {Py_tp_doc, (void *)PyDoc_STR("\n    Concrete class for large list view data types\n    (like ListViewType, but with 64-bit offsets).\n\n    Examples\n    --------\n    Create an instance of LargeListViewType:\n\n    >>> import pyarrow as pa\n    >>> pa.large_list_view(pa.string())\n    LargeListViewType(large_list_view<item: string>)\n    ")},
  {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_LargeListViewType},
  {Py_tp_getset, (void *)__pyx_getsets_7pyarrow_3lib_LargeListViewType},
  {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_LargeListViewType},
  {0, 0},
};
static PyType_Spec __pyx_type_7pyarrow_3lib_LargeListViewType_spec = {
  "pyarrow.lib.LargeListViewType",
  sizeof(struct __pyx_obj_7pyarrow_3lib_LargeListViewType),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
  __pyx_type_7pyarrow_3lib_LargeListViewType_slots,
};
#else

static PyTypeObject __pyx_type_7pyarrow_3lib_LargeListViewType = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyarrow.lib.""LargeListViewType", /*tp_name*/
  sizeof(struct __pyx_obj_7pyarrow_3lib_LargeListViewType), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7pyarrow_3lib_DataType, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_7pyarrow_3lib_8DataType_13__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_7pyarrow_3lib_8DataType_7__str__, /*tp_str*/
  #else
  0, /*tp_str*/
  #endif
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  PyDoc_STR("\n    Concrete class for large list view data types\n    (like ListViewType, but with 64-bit offsets).\n\n    Examples\n    --------\n    Create an instance of LargeListViewType:\n\n    >>> import pyarrow as pa\n    >>> pa.large_list_view(pa.string())\n    LargeListViewType(large_list_view<item: string>)\n    "), /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_7pyarrow_3lib_LargeListViewType, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_7pyarrow_3lib_LargeListViewType, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_7pyarrow_3lib_8DataType_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_7pyarrow_3lib_LargeListViewType, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_7pyarrow_3lib_MapType __pyx_vtable_7pyarrow_3lib_MapType;

static PyObject *__pyx_tp_new_7pyarrow_3lib_MapType(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_7pyarrow_3lib_MapType *p;
  PyObject *o = __pyx_tp_new_7pyarrow_3lib_DataType(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_7pyarrow_3lib_MapType *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_DataType*)__pyx_vtabptr_7pyarrow_3lib_MapType;
  return o;
}

static PyObject *__pyx_getprop_7pyarrow_3lib_7MapType_key_field(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyarrow_3lib_7MapType_9key_field_1__get__(o);
}

static PyObject *__pyx_getprop_7pyarrow_3lib_7MapType_key_type(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyarrow_3lib_7MapType_8key_type_1__get__(o);
}

static PyObject *__pyx_getprop_7pyarrow_3lib_7MapType_item_field(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyarrow_3lib_7MapType_10item_field_1__get__(o);
}

static PyObject *__pyx_getprop_7pyarrow_3lib_7MapType_item_type(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyarrow_3lib_7MapType_9item_type_1__get__(o);
}

static PyObject *__pyx_getprop_7pyarrow_3lib_7MapType_keys_sorted(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyarrow_3lib_7MapType_11keys_sorted_1__get__(o);
}

static PyMethodDef __pyx_methods_7pyarrow_3lib_MapType[] = {
  {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_7MapType_1__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_7MapType___reduce__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_7pyarrow_3lib_MapType[] = {
  {"key_field", __pyx_getprop_7pyarrow_3lib_7MapType_key_field, 0, PyDoc_STR("\n        The field for keys in the map entries.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> pa.map_(pa.string(), pa.int32()).key_field\n        pyarrow.Field<key: string not null>\n        "), 0},
  {"key_type", __pyx_getprop_7pyarrow_3lib_7MapType_key_type, 0, PyDoc_STR("\n        The data type of keys in the map entries.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> pa.map_(pa.string(), pa.int32()).key_type\n        DataType(string)\n        "), 0},
  {"item_field", __pyx_getprop_7pyarrow_3lib_7MapType_item_field, 0, PyDoc_STR("\n        The field for items in the map entries.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> pa.map_(pa.string(), pa.int32()).item_field\n        pyarrow.Field<value: int32>\n        "), 0},
  {"item_type", __pyx_getprop_7pyarrow_3lib_7MapType_item_type, 0, PyDoc_STR("\n        The data type of items in the map entries.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> pa.map_(pa.string(), pa.int32()).item_type\n        DataType(int32)\n        "), 0},
  {"keys_sorted", __pyx_getprop_7pyarrow_3lib_7MapType_keys_sorted, 0, PyDoc_STR("\n        Should the entries be sorted according to keys.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> pa.map_(pa.string(), pa.int32(), keys_sorted=True).keys_sorted\n        True\n        "), 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_7pyarrow_3lib_MapType_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_DataType},
  {Py_tp_doc, (void *)PyDoc_STR("\n    Concrete class for map data types.\n\n    Examples\n    --------\n    Create an instance of MapType:\n\n    >>> import pyarrow as pa\n    >>> pa.map_(pa.string(), pa.int32())\n    MapType(map<string, int32>)\n    >>> pa.map_(pa.string(), pa.int32(), keys_sorted=True)\n    MapType(map<string, int32, keys_sorted>)\n    ")},
  {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_MapType},
  {Py_tp_getset, (void *)__pyx_getsets_7pyarrow_3lib_MapType},
  {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_MapType},
  {0, 0},
};
static PyType_Spec __pyx_type_7pyarrow_3lib_MapType_spec = {
  "pyarrow.lib.MapType",
  sizeof(struct __pyx_obj_7pyarrow_3lib_MapType),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
  __pyx_type_7pyarrow_3lib_MapType_slots,
};
#else

static PyTypeObject __pyx_type_7pyarrow_3lib_MapType = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyarrow.lib.""MapType", /*tp_name*/
  sizeof(struct __pyx_obj_7pyarrow_3lib_MapType), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7pyarrow_3lib_DataType, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_7pyarrow_3lib_8DataType_13__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_7pyarrow_3lib_8DataType_7__str__, /*tp_str*/
  #else
  0, /*tp_str*/
  #endif
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  PyDoc_STR("\n    Concrete class for map data types.\n\n    Examples\n    --------\n    Create an instance of MapType:\n\n    >>> import pyarrow as pa\n    >>> pa.map_(pa.string(), pa.int32())\n    MapType(map<string, int32>)\n    >>> pa.map_(pa.string(), pa.int32(), keys_sorted=True)\n    MapType(map<string, int32, keys_sorted>)\n    "), /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_7pyarrow_3lib_MapType, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_7pyarrow_3lib_MapType, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_7pyarrow_3lib_8DataType_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_7pyarrow_3lib_MapType, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_7pyarrow_3lib_FixedSizeListType __pyx_vtable_7pyarrow_3lib_FixedSizeListType;

static PyObject *__pyx_tp_new_7pyarrow_3lib_FixedSizeListType(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_7pyarrow_3lib_FixedSizeListType *p;
  PyObject *o = __pyx_tp_new_7pyarrow_3lib_DataType(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_7pyarrow_3lib_FixedSizeListType *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_DataType*)__pyx_vtabptr_7pyarrow_3lib_FixedSizeListType;
  return o;
}

static PyObject *__pyx_getprop_7pyarrow_3lib_17FixedSizeListType_value_field(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyarrow_3lib_17FixedSizeListType_11value_field_1__get__(o);
}

static PyObject *__pyx_getprop_7pyarrow_3lib_17FixedSizeListType_value_type(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyarrow_3lib_17FixedSizeListType_10value_type_1__get__(o);
}

static PyObject *__pyx_getprop_7pyarrow_3lib_17FixedSizeListType_list_size(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyarrow_3lib_17FixedSizeListType_9list_size_1__get__(o);
}

static PyMethodDef __pyx_methods_7pyarrow_3lib_FixedSizeListType[] = {
  {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_17FixedSizeListType_1__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_17FixedSizeListType___reduce__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_7pyarrow_3lib_FixedSizeListType[] = {
  {"value_field", __pyx_getprop_7pyarrow_3lib_17FixedSizeListType_value_field, 0, PyDoc_STR("\n        The field for list values.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> pa.list_(pa.int32(), 2).value_field\n        pyarrow.Field<item: int32>\n        "), 0},
  {"value_type", __pyx_getprop_7pyarrow_3lib_17FixedSizeListType_value_type, 0, PyDoc_STR("\n        The data type of large list values.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> pa.list_(pa.int32(), 2).value_type\n        DataType(int32)\n        "), 0},
  {"list_size", __pyx_getprop_7pyarrow_3lib_17FixedSizeListType_list_size, 0, PyDoc_STR("\n        The size of the fixed size lists.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> pa.list_(pa.int32(), 2).list_size\n        2\n        "), 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_7pyarrow_3lib_FixedSizeListType_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_DataType},
  {Py_tp_doc, (void *)PyDoc_STR("\n    Concrete class for fixed size list data types.\n\n    Examples\n    --------\n    Create an instance of FixedSizeListType:\n\n    >>> import pyarrow as pa\n    >>> pa.list_(pa.int32(), 2)\n    FixedSizeListType(fixed_size_list<item: int32>[2])\n    ")},
  {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_FixedSizeListType},
  {Py_tp_getset, (void *)__pyx_getsets_7pyarrow_3lib_FixedSizeListType},
  {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_FixedSizeListType},
  {0, 0},
};
static PyType_Spec __pyx_type_7pyarrow_3lib_FixedSizeListType_spec = {
  "pyarrow.lib.FixedSizeListType",
  sizeof(struct __pyx_obj_7pyarrow_3lib_FixedSizeListType),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
  __pyx_type_7pyarrow_3lib_FixedSizeListType_slots,
};
#else

static PyTypeObject __pyx_type_7pyarrow_3lib_FixedSizeListType = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyarrow.lib.""FixedSizeListType", /*tp_name*/
  sizeof(struct __pyx_obj_7pyarrow_3lib_FixedSizeListType), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7pyarrow_3lib_DataType, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_7pyarrow_3lib_8DataType_13__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_7pyarrow_3lib_8DataType_7__str__, /*tp_str*/
  #else
  0, /*tp_str*/
  #endif
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  PyDoc_STR("\n    Concrete class for fixed size list data types.\n\n    Examples\n    --------\n    Create an instance of FixedSizeListType:\n\n    >>> import pyarrow as pa\n    >>> pa.list_(pa.int32(), 2)\n    FixedSizeListType(fixed_size_list<item: int32>[2])\n    "), /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_7pyarrow_3lib_FixedSizeListType, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_7pyarrow_3lib_FixedSizeListType, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_7pyarrow_3lib_8DataType_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_7pyarrow_3lib_FixedSizeListType, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_7pyarrow_3lib_StructType __pyx_vtable_7pyarrow_3lib_StructType;

static PyObject *__pyx_tp_new_7pyarrow_3lib_StructType(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_7pyarrow_3lib_StructType *p;
  PyObject *o = __pyx_tp_new_7pyarrow_3lib_DataType(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_7pyarrow_3lib_StructType *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_DataType*)__pyx_vtabptr_7pyarrow_3lib_StructType;
  return o;
}

static PyObject *__pyx_sq_item_7pyarrow_3lib_StructType(PyObject *o, Py_ssize_t i) {
  PyObject *r;
  PyObject *x = PyLong_FromSsize_t(i); if(!x) return 0;
  #if CYTHON_USE_TYPE_SLOTS || (!CYTHON_USE_TYPE_SPECS && __PYX_LIMITED_VERSION_HEX < 0x030A0000)
  r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
  #else
  r = ((binaryfunc)PyType_GetSlot(Py_TYPE(o), Py_mp_subscript))(o, x);
  #endif
  Py_DECREF(x);
  return r;
}

static PyObject *__pyx_getprop_7pyarrow_3lib_10StructType_names(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyarrow_3lib_10StructType_5names_1__get__(o);
}

static PyObject *__pyx_getprop_7pyarrow_3lib_10StructType_fields(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyarrow_3lib_10StructType_6fields_1__get__(o);
}

static PyMethodDef __pyx_methods_7pyarrow_3lib_StructType[] = {
  {"get_field_index", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10StructType_1get_field_index, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10StructType_get_field_index},
  {"get_all_field_indices", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10StructType_5get_all_field_indices, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10StructType_4get_all_field_indices},
  {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10StructType_14__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10StructType_13__reduce__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_7pyarrow_3lib_StructType[] = {
  {"names", __pyx_getprop_7pyarrow_3lib_10StructType_names, 0, PyDoc_STR("\n        Lists the field names.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> struct_type = pa.struct([('a', pa.int64()), ('b', pa.float64()), ('c', pa.string())])\n        >>> struct_type.names\n        ['a', 'b', 'c']\n        "), 0},
  {"fields", __pyx_getprop_7pyarrow_3lib_10StructType_fields, 0, PyDoc_STR("\n        Lists all fields within the StructType.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> struct_type = pa.struct([('a', pa.int64()), ('b', pa.float64()), ('c', pa.string())])\n        >>> struct_type.fields\n        [pyarrow.Field<a: int64>, pyarrow.Field<b: double>, pyarrow.Field<c: string>]\n        "), 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_7pyarrow_3lib_StructType_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_DataType},
  {Py_sq_length, (void *)__pyx_pw_7pyarrow_3lib_10StructType_7__len__},
  {Py_sq_item, (void *)__pyx_sq_item_7pyarrow_3lib_StructType},
  {Py_mp_length, (void *)__pyx_pw_7pyarrow_3lib_10StructType_7__len__},
  {Py_mp_subscript, (void *)__pyx_pw_7pyarrow_3lib_10StructType_12__getitem__},
  {Py_tp_doc, (void *)PyDoc_STR("\n    Concrete class for struct data types.\n\n    ``StructType`` supports direct indexing using ``[...]`` (implemented via\n    ``__getitem__``) to access its fields.\n    It will return the struct field with the given index or name.\n\n    Examples\n    --------\n    >>> import pyarrow as pa\n\n    Accessing fields using direct indexing:\n\n    >>> struct_type = pa.struct({'x': pa.int32(), 'y': pa.string()})\n    >>> struct_type[0]\n    pyarrow.Field<x: int32>\n    >>> struct_type['y']\n    pyarrow.Field<y: string>\n\n    Accessing fields using ``field()``:\n\n    >>> struct_type.field(1)\n    pyarrow.Field<y: string>\n    >>> struct_type.field('x')\n    pyarrow.Field<x: int32>\n\n    # Creating a schema from the struct type's fields:\n    >>> pa.schema(list(struct_type))\n    x: int32\n    y: string\n    ")},
  {Py_tp_iter, (void *)__pyx_pw_7pyarrow_3lib_10StructType_9__iter__},
  {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_StructType},
  {Py_tp_getset, (void *)__pyx_getsets_7pyarrow_3lib_StructType},
  {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_StructType},
  {0, 0},
};
static PyType_Spec __pyx_type_7pyarrow_3lib_StructType_spec = {
  "pyarrow.lib.StructType",
  sizeof(struct __pyx_obj_7pyarrow_3lib_StructType),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
  __pyx_type_7pyarrow_3lib_StructType_slots,
};
#else

static PySequenceMethods __pyx_tp_as_sequence_StructType = {
  __pyx_pw_7pyarrow_3lib_10StructType_7__len__, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  __pyx_sq_item_7pyarrow_3lib_StructType, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_StructType = {
  __pyx_pw_7pyarrow_3lib_10StructType_7__len__, /*mp_length*/
  __pyx_pw_7pyarrow_3lib_10StructType_12__getitem__, /*mp_subscript*/
  0, /*mp_ass_subscript*/
};

static PyTypeObject __pyx_type_7pyarrow_3lib_StructType = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyarrow.lib.""StructType", /*tp_name*/
  sizeof(struct __pyx_obj_7pyarrow_3lib_StructType), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7pyarrow_3lib_DataType, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_7pyarrow_3lib_8DataType_13__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  &__pyx_tp_as_sequence_StructType, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_StructType, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_7pyarrow_3lib_8DataType_7__str__, /*tp_str*/
  #else
  0, /*tp_str*/
  #endif
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  PyDoc_STR("\n    Concrete class for struct data types.\n\n    ``StructType`` supports direct indexing using ``[...]`` (implemented via\n    ``__getitem__``) to access its fields.\n    It will return the struct field with the given index or name.\n\n    Examples\n    --------\n    >>> import pyarrow as pa\n\n    Accessing fields using direct indexing:\n\n    >>> struct_type = pa.struct({'x': pa.int32(), 'y': pa.string()})\n    >>> struct_type[0]\n    pyarrow.Field<x: int32>\n    >>> struct_type['y']\n    pyarrow.Field<y: string>\n\n    Accessing fields using ``field()``:\n\n    >>> struct_type.field(1)\n    pyarrow.Field<y: string>\n    >>> struct_type.field('x')\n    pyarrow.Field<x: int32>\n\n    # Creating a schema from the struct type's fields:\n    >>> pa.schema(list(struct_type))\n    x: int32\n    y: string\n    "), /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  __pyx_pw_7pyarrow_3lib_10StructType_9__iter__, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_7pyarrow_3lib_StructType, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_7pyarrow_3lib_StructType, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_7pyarrow_3lib_8DataType_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_7pyarrow_3lib_StructType, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static PyObject *__pyx_tp_new_7pyarrow_3lib_DictionaryMemo(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_7pyarrow_3lib_DictionaryMemo *p;
  PyObject *o = __pyx_tp_new_7pyarrow_3lib__Weakrefable(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_7pyarrow_3lib_DictionaryMemo *)o);
  __Pyx_default_placement_construct(&(p->sp_memo));
  if (unlikely(__pyx_pw_7pyarrow_3lib_14DictionaryMemo_1__cinit__(o, __pyx_mstate_global->__pyx_empty_tuple, NULL) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_7pyarrow_3lib_DictionaryMemo(PyObject *o) {
  struct __pyx_obj_7pyarrow_3lib_DictionaryMemo *p = (struct __pyx_obj_7pyarrow_3lib_DictionaryMemo *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_7pyarrow_3lib_DictionaryMemo) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  __Pyx_call_destructor(p->sp_memo);
  __pyx_tp_dealloc_7pyarrow_3lib__Weakrefable(o);
}

static PyMethodDef __pyx_methods_7pyarrow_3lib_DictionaryMemo[] = {
  {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_14DictionaryMemo_3__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_14DictionaryMemo_2__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_14DictionaryMemo_5__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_14DictionaryMemo_4__setstate_cython__},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_7pyarrow_3lib_DictionaryMemo_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_DictionaryMemo},
  {Py_tp_doc, (void *)PyDoc_STR("\n    Tracking container for dictionary-encoded fields.\n    ")},
  {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_DictionaryMemo},
  {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_DictionaryMemo},
  {0, 0},
};
static PyType_Spec __pyx_type_7pyarrow_3lib_DictionaryMemo_spec = {
  "pyarrow.lib.DictionaryMemo",
  sizeof(struct __pyx_obj_7pyarrow_3lib_DictionaryMemo),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
  __pyx_type_7pyarrow_3lib_DictionaryMemo_slots,
};
#else

static PyTypeObject __pyx_type_7pyarrow_3lib_DictionaryMemo = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyarrow.lib.""DictionaryMemo", /*tp_name*/
  sizeof(struct __pyx_obj_7pyarrow_3lib_DictionaryMemo), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7pyarrow_3lib_DictionaryMemo, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  PyDoc_STR("\n    Tracking container for dictionary-encoded fields.\n    "), /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_7pyarrow_3lib_DictionaryMemo, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_7pyarrow_3lib_DictionaryMemo, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_7pyarrow_3lib_DictionaryType __pyx_vtable_7pyarrow_3lib_DictionaryType;

static PyObject *__pyx_tp_new_7pyarrow_3lib_DictionaryType(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_7pyarrow_3lib_DictionaryType *p;
  PyObject *o = __pyx_tp_new_7pyarrow_3lib_DataType(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_7pyarrow_3lib_DictionaryType *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_DataType*)__pyx_vtabptr_7pyarrow_3lib_DictionaryType;
  return o;
}

static PyObject *__pyx_getprop_7pyarrow_3lib_14DictionaryType_ordered(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyarrow_3lib_14DictionaryType_7ordered_1__get__(o);
}

static PyObject *__pyx_getprop_7pyarrow_3lib_14DictionaryType_index_type(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyarrow_3lib_14DictionaryType_10index_type_1__get__(o);
}

static PyObject *__pyx_getprop_7pyarrow_3lib_14DictionaryType_value_type(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyarrow_3lib_14DictionaryType_10value_type_1__get__(o);
}

static PyMethodDef __pyx_methods_7pyarrow_3lib_DictionaryType[] = {
  {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_14DictionaryType_1__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_14DictionaryType___reduce__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_7pyarrow_3lib_DictionaryType[] = {
  {"ordered", __pyx_getprop_7pyarrow_3lib_14DictionaryType_ordered, 0, PyDoc_STR("\n        Whether the dictionary is ordered, i.e. whether the ordering of values\n        in the dictionary is important.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> pa.dictionary(pa.int64(), pa.utf8()).ordered\n        False\n        "), 0},
  {"index_type", __pyx_getprop_7pyarrow_3lib_14DictionaryType_index_type, 0, PyDoc_STR("\n        The data type of dictionary indices (a signed integer type).\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> pa.dictionary(pa.int16(), pa.utf8()).index_type\n        DataType(int16)\n        "), 0},
  {"value_type", __pyx_getprop_7pyarrow_3lib_14DictionaryType_value_type, 0, PyDoc_STR("\n        The dictionary value type.\n\n        The dictionary values are found in an instance of DictionaryArray.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> pa.dictionary(pa.int16(), pa.utf8()).value_type\n        DataType(string)\n        "), 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_7pyarrow_3lib_DictionaryType_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_DataType},
  {Py_tp_doc, (void *)PyDoc_STR("\n    Concrete class for dictionary data types.\n\n    Examples\n    --------\n    Create an instance of dictionary type:\n\n    >>> import pyarrow as pa\n    >>> pa.dictionary(pa.int64(), pa.utf8())\n    DictionaryType(dictionary<values=string, indices=int64, ordered=0>)\n    ")},
  {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_DictionaryType},
  {Py_tp_getset, (void *)__pyx_getsets_7pyarrow_3lib_DictionaryType},
  {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_DictionaryType},
  {0, 0},
};
static PyType_Spec __pyx_type_7pyarrow_3lib_DictionaryType_spec = {
  "pyarrow.lib.DictionaryType",
  sizeof(struct __pyx_obj_7pyarrow_3lib_DictionaryType),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
  __pyx_type_7pyarrow_3lib_DictionaryType_slots,
};
#else

static PyTypeObject __pyx_type_7pyarrow_3lib_DictionaryType = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyarrow.lib.""DictionaryType", /*tp_name*/
  sizeof(struct __pyx_obj_7pyarrow_3lib_DictionaryType), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7pyarrow_3lib_DataType, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_7pyarrow_3lib_8DataType_13__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_7pyarrow_3lib_8DataType_7__str__, /*tp_str*/
  #else
  0, /*tp_str*/
  #endif
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  PyDoc_STR("\n    Concrete class for dictionary data types.\n\n    Examples\n    --------\n    Create an instance of dictionary type:\n\n    >>> import pyarrow as pa\n    >>> pa.dictionary(pa.int64(), pa.utf8())\n    DictionaryType(dictionary<values=string, indices=int64, ordered=0>)\n    "), /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_7pyarrow_3lib_DictionaryType, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_7pyarrow_3lib_DictionaryType, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_7pyarrow_3lib_8DataType_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_7pyarrow_3lib_DictionaryType, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_7pyarrow_3lib_TimestampType __pyx_vtable_7pyarrow_3lib_TimestampType;

static PyObject *__pyx_tp_new_7pyarrow_3lib_TimestampType(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_7pyarrow_3lib_TimestampType *p;
  PyObject *o = __pyx_tp_new_7pyarrow_3lib_DataType(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_7pyarrow_3lib_TimestampType *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_DataType*)__pyx_vtabptr_7pyarrow_3lib_TimestampType;
  return o;
}

static PyObject *__pyx_getprop_7pyarrow_3lib_13TimestampType_unit(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyarrow_3lib_13TimestampType_4unit_1__get__(o);
}

static PyObject *__pyx_getprop_7pyarrow_3lib_13TimestampType_tz(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyarrow_3lib_13TimestampType_2tz_1__get__(o);
}

static PyMethodDef __pyx_methods_7pyarrow_3lib_TimestampType[] = {
  {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_13TimestampType_1__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_13TimestampType___reduce__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_7pyarrow_3lib_TimestampType[] = {
  {"unit", __pyx_getprop_7pyarrow_3lib_13TimestampType_unit, 0, PyDoc_STR("\n        The timestamp unit ('s', 'ms', 'us' or 'ns').\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> t = pa.timestamp('us')\n        >>> t.unit\n        'us'\n        "), 0},
  {"tz", __pyx_getprop_7pyarrow_3lib_13TimestampType_tz, 0, PyDoc_STR("\n        The timestamp time zone, if any, or None.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> t = pa.timestamp('s', tz='UTC')\n        >>> t.tz\n        'UTC'\n        "), 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_7pyarrow_3lib_TimestampType_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_DataType},
  {Py_tp_doc, (void *)PyDoc_STR("\n    Concrete class for timestamp data types.\n\n    Examples\n    --------\n    >>> import pyarrow as pa\n\n    Create an instance of timestamp type:\n\n    >>> pa.timestamp('us')\n    TimestampType(timestamp[us])\n\n    Create an instance of timestamp type with timezone:\n\n    >>> pa.timestamp('s', tz='UTC')\n    TimestampType(timestamp[s, tz=UTC])\n    ")},
  {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_TimestampType},
  {Py_tp_getset, (void *)__pyx_getsets_7pyarrow_3lib_TimestampType},
  {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_TimestampType},
  {0, 0},
};
static PyType_Spec __pyx_type_7pyarrow_3lib_TimestampType_spec = {
  "pyarrow.lib.TimestampType",
  sizeof(struct __pyx_obj_7pyarrow_3lib_TimestampType),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
  __pyx_type_7pyarrow_3lib_TimestampType_slots,
};
#else

static PyTypeObject __pyx_type_7pyarrow_3lib_TimestampType = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyarrow.lib.""TimestampType", /*tp_name*/
  sizeof(struct __pyx_obj_7pyarrow_3lib_TimestampType), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7pyarrow_3lib_DataType, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_7pyarrow_3lib_8DataType_13__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_7pyarrow_3lib_8DataType_7__str__, /*tp_str*/
  #else
  0, /*tp_str*/
  #endif
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  PyDoc_STR("\n    Concrete class for timestamp data types.\n\n    Examples\n    --------\n    >>> import pyarrow as pa\n\n    Create an instance of timestamp type:\n\n    >>> pa.timestamp('us')\n    TimestampType(timestamp[us])\n\n    Create an instance of timestamp type with timezone:\n\n    >>> pa.timestamp('s', tz='UTC')\n    TimestampType(timestamp[s, tz=UTC])\n    "), /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_7pyarrow_3lib_TimestampType, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_7pyarrow_3lib_TimestampType, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_7pyarrow_3lib_8DataType_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_7pyarrow_3lib_TimestampType, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_7pyarrow_3lib_Time32Type __pyx_vtable_7pyarrow_3lib_Time32Type;

static PyObject *__pyx_tp_new_7pyarrow_3lib_Time32Type(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_7pyarrow_3lib_Time32Type *p;
  PyObject *o = __pyx_tp_new_7pyarrow_3lib_DataType(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_7pyarrow_3lib_Time32Type *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_DataType*)__pyx_vtabptr_7pyarrow_3lib_Time32Type;
  return o;
}

static PyObject *__pyx_getprop_7pyarrow_3lib_10Time32Type_unit(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyarrow_3lib_10Time32Type_4unit_1__get__(o);
}

static struct PyGetSetDef __pyx_getsets_7pyarrow_3lib_Time32Type[] = {
  {"unit", __pyx_getprop_7pyarrow_3lib_10Time32Type_unit, 0, PyDoc_STR("\n        The time unit ('s' or 'ms').\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> t = pa.time32('ms')\n        >>> t.unit\n        'ms'\n        "), 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_7pyarrow_3lib_Time32Type_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_DataType},
  {Py_tp_doc, (void *)PyDoc_STR("\n    Concrete class for time32 data types.\n\n    Supported time unit resolutions are 's' [second]\n    and 'ms' [millisecond].\n\n    Examples\n    --------\n    Create an instance of time32 type:\n\n    >>> import pyarrow as pa\n    >>> pa.time32('ms')\n    Time32Type(time32[ms])\n    ")},
  {Py_tp_getset, (void *)__pyx_getsets_7pyarrow_3lib_Time32Type},
  {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_Time32Type},
  {0, 0},
};
static PyType_Spec __pyx_type_7pyarrow_3lib_Time32Type_spec = {
  "pyarrow.lib.Time32Type",
  sizeof(struct __pyx_obj_7pyarrow_3lib_Time32Type),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
  __pyx_type_7pyarrow_3lib_Time32Type_slots,
};
#else

static PyTypeObject __pyx_type_7pyarrow_3lib_Time32Type = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyarrow.lib.""Time32Type", /*tp_name*/
  sizeof(struct __pyx_obj_7pyarrow_3lib_Time32Type), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7pyarrow_3lib_DataType, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_7pyarrow_3lib_8DataType_13__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_7pyarrow_3lib_8DataType_7__str__, /*tp_str*/
  #else
  0, /*tp_str*/
  #endif
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  PyDoc_STR("\n    Concrete class for time32 data types.\n\n    Supported time unit resolutions are 's' [second]\n    and 'ms' [millisecond].\n\n    Examples\n    --------\n    Create an instance of time32 type:\n\n    >>> import pyarrow as pa\n    >>> pa.time32('ms')\n    Time32Type(time32[ms])\n    "), /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_7pyarrow_3lib_Time32Type, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_7pyarrow_3lib_8DataType_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_7pyarrow_3lib_Time32Type, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_7pyarrow_3lib_Time64Type __pyx_vtable_7pyarrow_3lib_Time64Type;

static PyObject *__pyx_tp_new_7pyarrow_3lib_Time64Type(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_7pyarrow_3lib_Time64Type *p;
  PyObject *o = __pyx_tp_new_7pyarrow_3lib_DataType(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_7pyarrow_3lib_Time64Type *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_DataType*)__pyx_vtabptr_7pyarrow_3lib_Time64Type;
  return o;
}

static PyObject *__pyx_getprop_7pyarrow_3lib_10Time64Type_unit(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyarrow_3lib_10Time64Type_4unit_1__get__(o);
}

static struct PyGetSetDef __pyx_getsets_7pyarrow_3lib_Time64Type[] = {
  {"unit", __pyx_getprop_7pyarrow_3lib_10Time64Type_unit, 0, PyDoc_STR("\n        The time unit ('us' or 'ns').\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> t = pa.time64('us')\n        >>> t.unit\n        'us'\n        "), 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_7pyarrow_3lib_Time64Type_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_DataType},
  {Py_tp_doc, (void *)PyDoc_STR("\n    Concrete class for time64 data types.\n\n    Supported time unit resolutions are 'us' [microsecond]\n    and 'ns' [nanosecond].\n\n    Examples\n    --------\n    Create an instance of time64 type:\n\n    >>> import pyarrow as pa\n    >>> pa.time64('us')\n    Time64Type(time64[us])\n    ")},
  {Py_tp_getset, (void *)__pyx_getsets_7pyarrow_3lib_Time64Type},
  {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_Time64Type},
  {0, 0},
};
static PyType_Spec __pyx_type_7pyarrow_3lib_Time64Type_spec = {
  "pyarrow.lib.Time64Type",
  sizeof(struct __pyx_obj_7pyarrow_3lib_Time64Type),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
  __pyx_type_7pyarrow_3lib_Time64Type_slots,
};
#else

static PyTypeObject __pyx_type_7pyarrow_3lib_Time64Type = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyarrow.lib.""Time64Type", /*tp_name*/
  sizeof(struct __pyx_obj_7pyarrow_3lib_Time64Type), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7pyarrow_3lib_DataType, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_7pyarrow_3lib_8DataType_13__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_7pyarrow_3lib_8DataType_7__str__, /*tp_str*/
  #else
  0, /*tp_str*/
  #endif
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  PyDoc_STR("\n    Concrete class for time64 data types.\n\n    Supported time unit resolutions are 'us' [microsecond]\n    and 'ns' [nanosecond].\n\n    Examples\n    --------\n    Create an instance of time64 type:\n\n    >>> import pyarrow as pa\n    >>> pa.time64('us')\n    Time64Type(time64[us])\n    "), /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_7pyarrow_3lib_Time64Type, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_7pyarrow_3lib_8DataType_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_7pyarrow_3lib_Time64Type, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_7pyarrow_3lib_DurationType __pyx_vtable_7pyarrow_3lib_DurationType;

static PyObject *__pyx_tp_new_7pyarrow_3lib_DurationType(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_7pyarrow_3lib_DurationType *p;
  PyObject *o = __pyx_tp_new_7pyarrow_3lib_DataType(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_7pyarrow_3lib_DurationType *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_DataType*)__pyx_vtabptr_7pyarrow_3lib_DurationType;
  return o;
}

static PyObject *__pyx_getprop_7pyarrow_3lib_12DurationType_unit(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyarrow_3lib_12DurationType_4unit_1__get__(o);
}

static struct PyGetSetDef __pyx_getsets_7pyarrow_3lib_DurationType[] = {
  {"unit", __pyx_getprop_7pyarrow_3lib_12DurationType_unit, 0, PyDoc_STR("\n        The duration unit ('s', 'ms', 'us' or 'ns').\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> t = pa.duration('s')\n        >>> t.unit\n        's'\n        "), 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_7pyarrow_3lib_DurationType_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_DataType},
  {Py_tp_doc, (void *)PyDoc_STR("\n    Concrete class for duration data types.\n\n    Examples\n    --------\n    Create an instance of duration type:\n\n    >>> import pyarrow as pa\n    >>> pa.duration('s')\n    DurationType(duration[s])\n    ")},
  {Py_tp_getset, (void *)__pyx_getsets_7pyarrow_3lib_DurationType},
  {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_DurationType},
  {0, 0},
};
static PyType_Spec __pyx_type_7pyarrow_3lib_DurationType_spec = {
  "pyarrow.lib.DurationType",
  sizeof(struct __pyx_obj_7pyarrow_3lib_DurationType),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
  __pyx_type_7pyarrow_3lib_DurationType_slots,
};
#else

static PyTypeObject __pyx_type_7pyarrow_3lib_DurationType = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyarrow.lib.""DurationType", /*tp_name*/
  sizeof(struct __pyx_obj_7pyarrow_3lib_DurationType), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7pyarrow_3lib_DataType, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_7pyarrow_3lib_8DataType_13__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_7pyarrow_3lib_8DataType_7__str__, /*tp_str*/
  #else
  0, /*tp_str*/
  #endif
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  PyDoc_STR("\n    Concrete class for duration data types.\n\n    Examples\n    --------\n    Create an instance of duration type:\n\n    >>> import pyarrow as pa\n    >>> pa.duration('s')\n    DurationType(duration[s])\n    "), /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_7pyarrow_3lib_DurationType, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_7pyarrow_3lib_8DataType_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_7pyarrow_3lib_DurationType, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_7pyarrow_3lib_FixedSizeBinaryType __pyx_vtable_7pyarrow_3lib_FixedSizeBinaryType;

static PyObject *__pyx_tp_new_7pyarrow_3lib_FixedSizeBinaryType(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_7pyarrow_3lib_FixedSizeBinaryType *p;
  PyObject *o = __pyx_tp_new_7pyarrow_3lib_DataType(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_7pyarrow_3lib_FixedSizeBinaryType *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_DataType*)__pyx_vtabptr_7pyarrow_3lib_FixedSizeBinaryType;
  return o;
}

static PyMethodDef __pyx_methods_7pyarrow_3lib_FixedSizeBinaryType[] = {
  {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_19FixedSizeBinaryType_1__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_19FixedSizeBinaryType___reduce__},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_7pyarrow_3lib_FixedSizeBinaryType_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_DataType},
  {Py_tp_doc, (void *)PyDoc_STR("\n    Concrete class for fixed-size binary data types.\n\n    Examples\n    --------\n    Create an instance of fixed-size binary type:\n\n    >>> import pyarrow as pa\n    >>> pa.binary(3)\n    FixedSizeBinaryType(fixed_size_binary[3])\n    ")},
  {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_FixedSizeBinaryType},
  {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_FixedSizeBinaryType},
  {0, 0},
};
static PyType_Spec __pyx_type_7pyarrow_3lib_FixedSizeBinaryType_spec = {
  "pyarrow.lib.FixedSizeBinaryType",
  sizeof(struct __pyx_obj_7pyarrow_3lib_FixedSizeBinaryType),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
  __pyx_type_7pyarrow_3lib_FixedSizeBinaryType_slots,
};
#else

static PyTypeObject __pyx_type_7pyarrow_3lib_FixedSizeBinaryType = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyarrow.lib.""FixedSizeBinaryType", /*tp_name*/
  sizeof(struct __pyx_obj_7pyarrow_3lib_FixedSizeBinaryType), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7pyarrow_3lib_DataType, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_7pyarrow_3lib_8DataType_13__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_7pyarrow_3lib_8DataType_7__str__, /*tp_str*/
  #else
  0, /*tp_str*/
  #endif
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  PyDoc_STR("\n    Concrete class for fixed-size binary data types.\n\n    Examples\n    --------\n    Create an instance of fixed-size binary type:\n\n    >>> import pyarrow as pa\n    >>> pa.binary(3)\n    FixedSizeBinaryType(fixed_size_binary[3])\n    "), /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_7pyarrow_3lib_FixedSizeBinaryType, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_7pyarrow_3lib_8DataType_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_7pyarrow_3lib_FixedSizeBinaryType, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_7pyarrow_3lib_Decimal32Type __pyx_vtable_7pyarrow_3lib_Decimal32Type;

static PyObject *__pyx_tp_new_7pyarrow_3lib_Decimal32Type(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_7pyarrow_3lib_Decimal32Type *p;
  PyObject *o = __pyx_tp_new_7pyarrow_3lib_FixedSizeBinaryType(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_7pyarrow_3lib_Decimal32Type *)o);
  p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_DataType*)__pyx_vtabptr_7pyarrow_3lib_Decimal32Type;
  return o;
}

static PyObject *__pyx_getprop_7pyarrow_3lib_13Decimal32Type_precision(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyarrow_3lib_13Decimal32Type_9precision_1__get__(o);
}

static PyObject *__pyx_getprop_7pyarrow_3lib_13Decimal32Type_scale(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyarrow_3lib_13Decimal32Type_5scale_1__get__(o);
}

static PyMethodDef __pyx_methods_7pyarrow_3lib_Decimal32Type[] = {
  {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_13Decimal32Type_1__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_13Decimal32Type___reduce__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_7pyarrow_3lib_Decimal32Type[] = {
  {"precision", __pyx_getprop_7pyarrow_3lib_13Decimal32Type_precision, 0, PyDoc_STR("\n        The decimal precision, in number of decimal digits (an integer).\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> t = pa.decimal32(5, 2)\n        >>> t.precision\n        5\n        "), 0},
  {"scale", __pyx_getprop_7pyarrow_3lib_13Decimal32Type_scale, 0, PyDoc_STR("\n        The decimal scale (an integer).\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> t = pa.decimal32(5, 2)\n        >>> t.scale\n        2\n        "), 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_7pyarrow_3lib_Decimal32Type_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_DataType},
  {Py_tp_doc, (void *)PyDoc_STR("\n    Concrete class for decimal32 data types.\n\n    Examples\n    --------\n    Create an instance of decimal32 type:\n\n    >>> import pyarrow as pa\n    >>> pa.decimal32(5, 2)\n    Decimal32Type(decimal32(5, 2))\n    ")},
  {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_Decimal32Type},
  {Py_tp_getset, (void *)__pyx_getsets_7pyarrow_3lib_Decimal32Type},
  {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_Decimal32Type},
  {0, 0},
};
static PyType_Spec __pyx_type_7pyarrow_3lib_Decimal32Type_spec = {
  "pyarrow.lib.Decimal32Type",
  sizeof(struct __pyx_obj_7pyarrow_3lib_Decimal32Type),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
  __pyx_type_7pyarrow_3lib_Decimal32Type_slots,
};
#else

static PyTypeObject __pyx_type_7pyarrow_3lib_Decimal32Type = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyarrow.lib.""Decimal32Type", /*tp_name*/
  sizeof(struct __pyx_obj_7pyarrow_3lib_Decimal32Type), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7pyarrow_3lib_DataType, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_7pyarrow_3lib_8DataType_13__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_7pyarrow_3lib_8DataType_7__str__, /*tp_str*/
  #else
  0, /*tp_str*/
  #endif
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  PyDoc_STR("\n    Concrete class for decimal32 data types.\n\n    Examples\n    --------\n    Create an instance of decimal32 type:\n\n    >>> import pyarrow as pa\n    >>> pa.decimal32(5, 2)\n    Decimal32Type(decimal32(5, 2))\n    "), /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_7pyarrow_3lib_Decimal32Type, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_7pyarrow_3lib_Decimal32Type, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_7pyarrow_3lib_8DataType_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_7pyarrow_3lib_Decimal32Type, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_7pyarrow_3lib_Decimal64Type __pyx_vtable_7pyarrow_3lib_Decimal64Type;

static PyObject *__pyx_tp_new_7pyarrow_3lib_Decimal64Type(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_7pyarrow_3lib_Decimal64Type *p;
  PyObject *o = __pyx_tp_new_7pyarrow_3lib_FixedSizeBinaryType(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_7pyarrow_3lib_Decimal64Type *)o);
  p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_DataType*)__pyx_vtabptr_7pyarrow_3lib_Decimal64Type;
  return o;
}

static PyObject *__pyx_getprop_7pyarrow_3lib_13Decimal64Type_precision(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyarrow_3lib_13Decimal64Type_9precision_1__get__(o);
}

static PyObject *__pyx_getprop_7pyarrow_3lib_13Decimal64Type_scale(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyarrow_3lib_13Decimal64Type_5scale_1__get__(o);
}

static PyMethodDef __pyx_methods_7pyarrow_3lib_Decimal64Type[] = {
  {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_13Decimal64Type_1__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_13Decimal64Type___reduce__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_7pyarrow_3lib_Decimal64Type[] = {
  {"precision", __pyx_getprop_7pyarrow_3lib_13Decimal64Type_precision, 0, PyDoc_STR("\n        The decimal precision, in number of decimal digits (an integer).\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> t = pa.decimal64(5, 2)\n        >>> t.precision\n        5\n        "), 0},
  {"scale", __pyx_getprop_7pyarrow_3lib_13Decimal64Type_scale, 0, PyDoc_STR("\n        The decimal scale (an integer).\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> t = pa.decimal64(5, 2)\n        >>> t.scale\n        2\n        "), 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_7pyarrow_3lib_Decimal64Type_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_DataType},
  {Py_tp_doc, (void *)PyDoc_STR("\n    Concrete class for decimal64 data types.\n\n    Examples\n    --------\n    Create an instance of decimal64 type:\n\n    >>> import pyarrow as pa\n    >>> pa.decimal64(5, 2)\n    Decimal64Type(decimal64(5, 2))\n    ")},
  {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_Decimal64Type},
  {Py_tp_getset, (void *)__pyx_getsets_7pyarrow_3lib_Decimal64Type},
  {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_Decimal64Type},
  {0, 0},
};
static PyType_Spec __pyx_type_7pyarrow_3lib_Decimal64Type_spec = {
  "pyarrow.lib.Decimal64Type",
  sizeof(struct __pyx_obj_7pyarrow_3lib_Decimal64Type),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
  __pyx_type_7pyarrow_3lib_Decimal64Type_slots,
};
#else

static PyTypeObject __pyx_type_7pyarrow_3lib_Decimal64Type = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyarrow.lib.""Decimal64Type", /*tp_name*/
  sizeof(struct __pyx_obj_7pyarrow_3lib_Decimal64Type), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7pyarrow_3lib_DataType, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_7pyarrow_3lib_8DataType_13__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_7pyarrow_3lib_8DataType_7__str__, /*tp_str*/
  #else
  0, /*tp_str*/
  #endif
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  PyDoc_STR("\n    Concrete class for decimal64 data types.\n\n    Examples\n    --------\n    Create an instance of decimal64 type:\n\n    >>> import pyarrow as pa\n    >>> pa.decimal64(5, 2)\n    Decimal64Type(decimal64(5, 2))\n    "), /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_7pyarrow_3lib_Decimal64Type, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_7pyarrow_3lib_Decimal64Type, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_7pyarrow_3lib_8DataType_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_7pyarrow_3lib_Decimal64Type, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_7pyarrow_3lib_Decimal128Type __pyx_vtable_7pyarrow_3lib_Decimal128Type;

static PyObject *__pyx_tp_new_7pyarrow_3lib_Decimal128Type(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_7pyarrow_3lib_Decimal128Type *p;
  PyObject *o = __pyx_tp_new_7pyarrow_3lib_FixedSizeBinaryType(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_7pyarrow_3lib_Decimal128Type *)o);
  p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_DataType*)__pyx_vtabptr_7pyarrow_3lib_Decimal128Type;
  return o;
}

static PyObject *__pyx_getprop_7pyarrow_3lib_14Decimal128Type_precision(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyarrow_3lib_14Decimal128Type_9precision_1__get__(o);
}

static PyObject *__pyx_getprop_7pyarrow_3lib_14Decimal128Type_scale(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyarrow_3lib_14Decimal128Type_5scale_1__get__(o);
}

static PyMethodDef __pyx_methods_7pyarrow_3lib_Decimal128Type[] = {
  {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_14Decimal128Type_1__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_14Decimal128Type___reduce__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_7pyarrow_3lib_Decimal128Type[] = {
  {"precision", __pyx_getprop_7pyarrow_3lib_14Decimal128Type_precision, 0, PyDoc_STR("\n        The decimal precision, in number of decimal digits (an integer).\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> t = pa.decimal128(5, 2)\n        >>> t.precision\n        5\n        "), 0},
  {"scale", __pyx_getprop_7pyarrow_3lib_14Decimal128Type_scale, 0, PyDoc_STR("\n        The decimal scale (an integer).\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> t = pa.decimal128(5, 2)\n        >>> t.scale\n        2\n        "), 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_7pyarrow_3lib_Decimal128Type_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_DataType},
  {Py_tp_doc, (void *)PyDoc_STR("\n    Concrete class for decimal128 data types.\n\n    Examples\n    --------\n    Create an instance of decimal128 type:\n\n    >>> import pyarrow as pa\n    >>> pa.decimal128(5, 2)\n    Decimal128Type(decimal128(5, 2))\n    ")},
  {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_Decimal128Type},
  {Py_tp_getset, (void *)__pyx_getsets_7pyarrow_3lib_Decimal128Type},
  {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_Decimal128Type},
  {0, 0},
};
static PyType_Spec __pyx_type_7pyarrow_3lib_Decimal128Type_spec = {
  "pyarrow.lib.Decimal128Type",
  sizeof(struct __pyx_obj_7pyarrow_3lib_Decimal128Type),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
  __pyx_type_7pyarrow_3lib_Decimal128Type_slots,
};
#else

static PyTypeObject __pyx_type_7pyarrow_3lib_Decimal128Type = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyarrow.lib.""Decimal128Type", /*tp_name*/
  sizeof(struct __pyx_obj_7pyarrow_3lib_Decimal128Type), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7pyarrow_3lib_DataType, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_7pyarrow_3lib_8DataType_13__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_7pyarrow_3lib_8DataType_7__str__, /*tp_str*/
  #else
  0, /*tp_str*/
  #endif
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  PyDoc_STR("\n    Concrete class for decimal128 data types.\n\n    Examples\n    --------\n    Create an instance of decimal128 type:\n\n    >>> import pyarrow as pa\n    >>> pa.decimal128(5, 2)\n    Decimal128Type(decimal128(5, 2))\n    "), /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_7pyarrow_3lib_Decimal128Type, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_7pyarrow_3lib_Decimal128Type, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_7pyarrow_3lib_8DataType_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_7pyarrow_3lib_Decimal128Type, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_7pyarrow_3lib_Decimal256Type __pyx_vtable_7pyarrow_3lib_Decimal256Type;

static PyObject *__pyx_tp_new_7pyarrow_3lib_Decimal256Type(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_7pyarrow_3lib_Decimal256Type *p;
  PyObject *o = __pyx_tp_new_7pyarrow_3lib_FixedSizeBinaryType(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_7pyarrow_3lib_Decimal256Type *)o);
  p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_DataType*)__pyx_vtabptr_7pyarrow_3lib_Decimal256Type;
  return o;
}

static PyObject *__pyx_getprop_7pyarrow_3lib_14Decimal256Type_precision(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyarrow_3lib_14Decimal256Type_9precision_1__get__(o);
}

static PyObject *__pyx_getprop_7pyarrow_3lib_14Decimal256Type_scale(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyarrow_3lib_14Decimal256Type_5scale_1__get__(o);
}

static PyMethodDef __pyx_methods_7pyarrow_3lib_Decimal256Type[] = {
  {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_14Decimal256Type_1__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_14Decimal256Type___reduce__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_7pyarrow_3lib_Decimal256Type[] = {
  {"precision", __pyx_getprop_7pyarrow_3lib_14Decimal256Type_precision, 0, PyDoc_STR("\n        The decimal precision, in number of decimal digits (an integer).\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> t = pa.decimal256(76, 38)\n        >>> t.precision\n        76\n        "), 0},
  {"scale", __pyx_getprop_7pyarrow_3lib_14Decimal256Type_scale, 0, PyDoc_STR("\n        The decimal scale (an integer).\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> t = pa.decimal256(76, 38)\n        >>> t.scale\n        38\n        "), 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_7pyarrow_3lib_Decimal256Type_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_DataType},
  {Py_tp_doc, (void *)PyDoc_STR("\n    Concrete class for decimal256 data types.\n\n    Examples\n    --------\n    Create an instance of decimal256 type:\n\n    >>> import pyarrow as pa\n    >>> pa.decimal256(76, 38)\n    Decimal256Type(decimal256(76, 38))\n    ")},
  {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_Decimal256Type},
  {Py_tp_getset, (void *)__pyx_getsets_7pyarrow_3lib_Decimal256Type},
  {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_Decimal256Type},
  {0, 0},
};
static PyType_Spec __pyx_type_7pyarrow_3lib_Decimal256Type_spec = {
  "pyarrow.lib.Decimal256Type",
  sizeof(struct __pyx_obj_7pyarrow_3lib_Decimal256Type),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
  __pyx_type_7pyarrow_3lib_Decimal256Type_slots,
};
#else

static PyTypeObject __pyx_type_7pyarrow_3lib_Decimal256Type = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyarrow.lib.""Decimal256Type", /*tp_name*/
  sizeof(struct __pyx_obj_7pyarrow_3lib_Decimal256Type), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7pyarrow_3lib_DataType, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_7pyarrow_3lib_8DataType_13__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_7pyarrow_3lib_8DataType_7__str__, /*tp_str*/
  #else
  0, /*tp_str*/
  #endif
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  PyDoc_STR("\n    Concrete class for decimal256 data types.\n\n    Examples\n    --------\n    Create an instance of decimal256 type:\n\n    >>> import pyarrow as pa\n    >>> pa.decimal256(76, 38)\n    Decimal256Type(decimal256(76, 38))\n    "), /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_7pyarrow_3lib_Decimal256Type, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_7pyarrow_3lib_Decimal256Type, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_7pyarrow_3lib_8DataType_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_7pyarrow_3lib_Decimal256Type, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_7pyarrow_3lib_RunEndEncodedType __pyx_vtable_7pyarrow_3lib_RunEndEncodedType;

static PyObject *__pyx_tp_new_7pyarrow_3lib_RunEndEncodedType(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_7pyarrow_3lib_RunEndEncodedType *p;
  PyObject *o = __pyx_tp_new_7pyarrow_3lib_DataType(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_7pyarrow_3lib_RunEndEncodedType *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_DataType*)__pyx_vtabptr_7pyarrow_3lib_RunEndEncodedType;
  return o;
}

static PyObject *__pyx_getprop_7pyarrow_3lib_17RunEndEncodedType_run_end_type(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyarrow_3lib_17RunEndEncodedType_12run_end_type_1__get__(o);
}

static PyObject *__pyx_getprop_7pyarrow_3lib_17RunEndEncodedType_value_type(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyarrow_3lib_17RunEndEncodedType_10value_type_1__get__(o);
}

static PyMethodDef __pyx_methods_7pyarrow_3lib_RunEndEncodedType[] = {
  {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_17RunEndEncodedType_1__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_17RunEndEncodedType___reduce__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_7pyarrow_3lib_RunEndEncodedType[] = {
  {"run_end_type", __pyx_getprop_7pyarrow_3lib_17RunEndEncodedType_run_end_type, 0, 0, 0},
  {"value_type", __pyx_getprop_7pyarrow_3lib_17RunEndEncodedType_value_type, 0, 0, 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_7pyarrow_3lib_RunEndEncodedType_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_DataType},
  {Py_tp_doc, (void *)PyDoc_STR("\n    Concrete class for run-end encoded types.\n    ")},
  {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_RunEndEncodedType},
  {Py_tp_getset, (void *)__pyx_getsets_7pyarrow_3lib_RunEndEncodedType},
  {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_RunEndEncodedType},
  {0, 0},
};
static PyType_Spec __pyx_type_7pyarrow_3lib_RunEndEncodedType_spec = {
  "pyarrow.lib.RunEndEncodedType",
  sizeof(struct __pyx_obj_7pyarrow_3lib_RunEndEncodedType),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
  __pyx_type_7pyarrow_3lib_RunEndEncodedType_slots,
};
#else

static PyTypeObject __pyx_type_7pyarrow_3lib_RunEndEncodedType = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyarrow.lib.""RunEndEncodedType", /*tp_name*/
  sizeof(struct __pyx_obj_7pyarrow_3lib_RunEndEncodedType), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7pyarrow_3lib_DataType, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_7pyarrow_3lib_8DataType_13__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_7pyarrow_3lib_8DataType_7__str__, /*tp_str*/
  #else
  0, /*tp_str*/
  #endif
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  PyDoc_STR("\n    Concrete class for run-end encoded types.\n    "), /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_7pyarrow_3lib_RunEndEncodedType, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_7pyarrow_3lib_RunEndEncodedType, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_7pyarrow_3lib_8DataType_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_7pyarrow_3lib_RunEndEncodedType, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_7pyarrow_3lib_BaseExtensionType __pyx_vtable_7pyarrow_3lib_BaseExtensionType;

static PyObject *__pyx_tp_new_7pyarrow_3lib_BaseExtensionType(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_7pyarrow_3lib_BaseExtensionType *p;
  PyObject *o = __pyx_tp_new_7pyarrow_3lib_DataType(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_7pyarrow_3lib_BaseExtensionType *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_DataType*)__pyx_vtabptr_7pyarrow_3lib_BaseExtensionType;
  return o;
}

static PyObject *__pyx_getprop_7pyarrow_3lib_17BaseExtensionType_extension_name(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyarrow_3lib_17BaseExtensionType_14extension_name_1__get__(o);
}

static PyObject *__pyx_getprop_7pyarrow_3lib_17BaseExtensionType_storage_type(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyarrow_3lib_17BaseExtensionType_12storage_type_1__get__(o);
}

static PyObject *__pyx_getprop_7pyarrow_3lib_17BaseExtensionType_byte_width(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyarrow_3lib_17BaseExtensionType_10byte_width_1__get__(o);
}

static PyObject *__pyx_getprop_7pyarrow_3lib_17BaseExtensionType_bit_width(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyarrow_3lib_17BaseExtensionType_9bit_width_1__get__(o);
}

static PyMethodDef __pyx_methods_7pyarrow_3lib_BaseExtensionType[] = {
  {"__arrow_ext_class__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_17BaseExtensionType_1__arrow_ext_class__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_17BaseExtensionType___arrow_ext_class__},
  {"__arrow_ext_scalar_class__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_17BaseExtensionType_3__arrow_ext_scalar_class__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_17BaseExtensionType_2__arrow_ext_scalar_class__},
  {"wrap_array", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_17BaseExtensionType_5wrap_array, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_17BaseExtensionType_4wrap_array},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_7pyarrow_3lib_BaseExtensionType[] = {
  {"extension_name", __pyx_getprop_7pyarrow_3lib_17BaseExtensionType_extension_name, 0, PyDoc_STR("\n        The extension type name.\n        "), 0},
  {"storage_type", __pyx_getprop_7pyarrow_3lib_17BaseExtensionType_storage_type, 0, PyDoc_STR("\n        The underlying storage type.\n        "), 0},
  {"byte_width", __pyx_getprop_7pyarrow_3lib_17BaseExtensionType_byte_width, 0, PyDoc_STR("\n        The byte width of the extension type.\n        "), 0},
  {"bit_width", __pyx_getprop_7pyarrow_3lib_17BaseExtensionType_bit_width, 0, PyDoc_STR("\n        The bit width of the extension type.\n        "), 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_7pyarrow_3lib_BaseExtensionType_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_DataType},
  {Py_tp_doc, (void *)PyDoc_STR("\n    Concrete base class for extension types.\n    ")},
  {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_BaseExtensionType},
  {Py_tp_getset, (void *)__pyx_getsets_7pyarrow_3lib_BaseExtensionType},
  {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_BaseExtensionType},
  {0, 0},
};
static PyType_Spec __pyx_type_7pyarrow_3lib_BaseExtensionType_spec = {
  "pyarrow.lib.BaseExtensionType",
  sizeof(struct __pyx_obj_7pyarrow_3lib_BaseExtensionType),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
  __pyx_type_7pyarrow_3lib_BaseExtensionType_slots,
};
#else

static PyTypeObject __pyx_type_7pyarrow_3lib_BaseExtensionType = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyarrow.lib.""BaseExtensionType", /*tp_name*/
  sizeof(struct __pyx_obj_7pyarrow_3lib_BaseExtensionType), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7pyarrow_3lib_DataType, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_7pyarrow_3lib_8DataType_13__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_7pyarrow_3lib_8DataType_7__str__, /*tp_str*/
  #else
  0, /*tp_str*/
  #endif
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  PyDoc_STR("\n    Concrete base class for extension types.\n    "), /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_7pyarrow_3lib_BaseExtensionType, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_7pyarrow_3lib_BaseExtensionType, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_7pyarrow_3lib_8DataType_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_7pyarrow_3lib_BaseExtensionType, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_7pyarrow_3lib_ExtensionType __pyx_vtable_7pyarrow_3lib_ExtensionType;

static PyObject *__pyx_tp_new_7pyarrow_3lib_ExtensionType(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_7pyarrow_3lib_ExtensionType *p;
  PyObject *o = __pyx_tp_new_7pyarrow_3lib_BaseExtensionType(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_7pyarrow_3lib_ExtensionType *)o);
  p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_DataType*)__pyx_vtabptr_7pyarrow_3lib_ExtensionType;
  if (unlikely(__pyx_pw_7pyarrow_3lib_13ExtensionType_1__cinit__(o, __pyx_mstate_global->__pyx_empty_tuple, NULL) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static PyObject *__pyx_tp_richcompare_7pyarrow_3lib_ExtensionType(PyObject *o1, PyObject *o2, int op) {
  switch (op) {
    case Py_EQ: {
      return __pyx_pw_7pyarrow_3lib_13ExtensionType_5__eq__(o1, o2);
    }
    case Py_NE: {
      PyObject *ret;
      ret = __pyx_pw_7pyarrow_3lib_13ExtensionType_5__eq__(o1, o2);
      if (likely(ret && ret != Py_NotImplemented)) {
        int b = __Pyx_PyObject_IsTrue(ret);
        Py_DECREF(ret);
        if (unlikely(b < 0)) return NULL;
        ret = (b) ? Py_False : Py_True;
        Py_INCREF(ret);
      }
      return ret;
    }
    default: {
      return __Pyx_NewRef(Py_NotImplemented);
    }
  }
}

static PyMethodDef __pyx_methods_7pyarrow_3lib_ExtensionType[] = {
  {"__arrow_ext_serialize__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_13ExtensionType_9__arrow_ext_serialize__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_13ExtensionType_8__arrow_ext_serialize__},
  {"__arrow_ext_deserialize__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_13ExtensionType_11__arrow_ext_deserialize__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_13ExtensionType_10__arrow_ext_deserialize__},
  {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_13ExtensionType_13__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_13ExtensionType_12__reduce__},
  {"__arrow_ext_class__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_13ExtensionType_15__arrow_ext_class__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_13ExtensionType_14__arrow_ext_class__},
  {"__arrow_ext_scalar_class__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_13ExtensionType_17__arrow_ext_scalar_class__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_13ExtensionType_16__arrow_ext_scalar_class__},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_7pyarrow_3lib_ExtensionType_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_DataType},
  {Py_tp_repr, (void *)__pyx_pw_7pyarrow_3lib_13ExtensionType_7__repr__},
  {Py_tp_doc, (void *)PyDoc_STR("ExtensionType(DataType storage_type, extension_name)\n\nConcrete base class for Python-defined extension types.\n\nParameters\n----------\nstorage_type : DataType\n    The underlying storage type for the extension type.\nextension_name : str\n    A unique name distinguishing this extension type. The name will be\n    used when deserializing IPC data.\n\nExamples\n--------\nDefine a RationalType extension type subclassing ExtensionType:\n\n>>> import pyarrow as pa\n>>> class RationalType(pa.ExtensionType):\n...     def __init__(self, data_type: pa.DataType):\n...         if not pa.types.is_integer(data_type):\n...             raise TypeError(f\"data_type must be an integer type not {data_type}\")\n...         super().__init__(\n...             pa.struct(\n...                 [\n...                     (\"numer\", data_type),\n...                     (\"denom\", data_type),\n...                 ],\n...             ),\n...             # N.B. This name does _not_ reference `data_type` so deserialization\n...             # will work for _any_ integer `data_type` after registration\n...             \"my_package.rational\",\n...         )\n...     def __arrow_ext_serialize__(self) -> bytes:\n...         # No parameters are necessary\n...         return b\"\"\n...     @classmethod\n...     def __arrow_ext_deserialize__(cls, storage_type, serialized):\n...         # return an instance of this subclass\n...         return RationalType(storage_type[0].type)\n\nRegister the extension type:\n\n>>> pa.register_extension_type(RationalType(pa.int64()))\n\nCreate an instance of RationalType extension type:\n\n>>> rational_type = RationalType(pa.int32())\n\nInspect the extension type:\n\n>>> rational_type.extension_name\n'my_package.rational'\n>>> rational_type.storage_type\nStructType(struct<numer: int32, denom: int32>)\n\nWrap an array as an extension array:\n\n>>> storage_array = pa.array(\n...     [\n...         {\"numer\": 10, \"denom\": 17},\n...         {\"numer\": 20, \"denom""\": 13},\n...     ],\n...     type=rational_type.storage_type\n... )\n>>> rational_array = rational_type.wrap_array(storage_array)\n>>> rational_array\n<pyarrow.lib.ExtensionArray object at ...>\n-- is_valid: all not null\n-- child 0 type: int32\n  [\n    10,\n    20\n  ]\n-- child 1 type: int32\n  [\n    17,\n    13\n  ]\n\nOr do the same with creating an ExtensionArray:\n\n>>> rational_array = pa.ExtensionArray.from_storage(rational_type, storage_array)\n>>> rational_array\n<pyarrow.lib.ExtensionArray object at ...>\n-- is_valid: all not null\n-- child 0 type: int32\n  [\n    10,\n    20\n  ]\n-- child 1 type: int32\n  [\n    17,\n    13\n  ]\n\nUnregister the extension type:\n\n>>> pa.unregister_extension_type(\"my_package.rational\")\n\nNote that even though we registered the concrete type\n``RationalType(pa.int64())``, PyArrow will be able to deserialize\n``RationalType(integer_type)`` for any ``integer_type``, as the deserializer\nwill reference the name ``my_package.rational`` and the ``@classmethod``\n``__arrow_ext_deserialize__``.")},
  {Py_tp_richcompare, (void *)__pyx_tp_richcompare_7pyarrow_3lib_ExtensionType},
  {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_ExtensionType},
  {Py_tp_init, (void *)__pyx_pw_7pyarrow_3lib_13ExtensionType_3__init__},
  {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_ExtensionType},
  {0, 0},
};
static PyType_Spec __pyx_type_7pyarrow_3lib_ExtensionType_spec = {
  "pyarrow.lib.ExtensionType",
  sizeof(struct __pyx_obj_7pyarrow_3lib_ExtensionType),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
  __pyx_type_7pyarrow_3lib_ExtensionType_slots,
};
#else

static PyTypeObject __pyx_type_7pyarrow_3lib_ExtensionType = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyarrow.lib.""ExtensionType", /*tp_name*/
  sizeof(struct __pyx_obj_7pyarrow_3lib_ExtensionType), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7pyarrow_3lib_DataType, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  __pyx_pw_7pyarrow_3lib_13ExtensionType_7__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_7pyarrow_3lib_8DataType_7__str__, /*tp_str*/
  #else
  0, /*tp_str*/
  #endif
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  PyDoc_STR("ExtensionType(DataType storage_type, extension_name)\n\nConcrete base class for Python-defined extension types.\n\nParameters\n----------\nstorage_type : DataType\n    The underlying storage type for the extension type.\nextension_name : str\n    A unique name distinguishing this extension type. The name will be\n    used when deserializing IPC data.\n\nExamples\n--------\nDefine a RationalType extension type subclassing ExtensionType:\n\n>>> import pyarrow as pa\n>>> class RationalType(pa.ExtensionType):\n...     def __init__(self, data_type: pa.DataType):\n...         if not pa.types.is_integer(data_type):\n...             raise TypeError(f\"data_type must be an integer type not {data_type}\")\n...         super().__init__(\n...             pa.struct(\n...                 [\n...                     (\"numer\", data_type),\n...                     (\"denom\", data_type),\n...                 ],\n...             ),\n...             # N.B. This name does _not_ reference `data_type` so deserialization\n...             # will work for _any_ integer `data_type` after registration\n...             \"my_package.rational\",\n...         )\n...     def __arrow_ext_serialize__(self) -> bytes:\n...         # No parameters are necessary\n...         return b\"\"\n...     @classmethod\n...     def __arrow_ext_deserialize__(cls, storage_type, serialized):\n...         # return an instance of this subclass\n...         return RationalType(storage_type[0].type)\n\nRegister the extension type:\n\n>>> pa.register_extension_type(RationalType(pa.int64()))\n\nCreate an instance of RationalType extension type:\n\n>>> rational_type = RationalType(pa.int32())\n\nInspect the extension type:\n\n>>> rational_type.extension_name\n'my_package.rational'\n>>> rational_type.storage_type\nStructType(struct<numer: int32, denom: int32>)\n\nWrap an array as an extension array:\n\n>>> storage_array = pa.array(\n...     [\n...         {\"numer\": 10, \"denom\": 17},\n...         {\"numer\": 20, \"denom""\": 13},\n...     ],\n...     type=rational_type.storage_type\n... )\n>>> rational_array = rational_type.wrap_array(storage_array)\n>>> rational_array\n<pyarrow.lib.ExtensionArray object at ...>\n-- is_valid: all not null\n-- child 0 type: int32\n  [\n    10,\n    20\n  ]\n-- child 1 type: int32\n  [\n    17,\n    13\n  ]\n\nOr do the same with creating an ExtensionArray:\n\n>>> rational_array = pa.ExtensionArray.from_storage(rational_type, storage_array)\n>>> rational_array\n<pyarrow.lib.ExtensionArray object at ...>\n-- is_valid: all not null\n-- child 0 type: int32\n  [\n    10,\n    20\n  ]\n-- child 1 type: int32\n  [\n    17,\n    13\n  ]\n\nUnregister the extension type:\n\n>>> pa.unregister_extension_type(\"my_package.rational\")\n\nNote that even though we registered the concrete type\n``RationalType(pa.int64())``, PyArrow will be able to deserialize\n``RationalType(integer_type)`` for any ``integer_type``, as the deserializer\nwill reference the name ``my_package.rational`` and the ``@classmethod``\n``__arrow_ext_deserialize__``."), /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  __pyx_tp_richcompare_7pyarrow_3lib_ExtensionType, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_7pyarrow_3lib_ExtensionType, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  __pyx_pw_7pyarrow_3lib_13ExtensionType_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_7pyarrow_3lib_ExtensionType, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_7pyarrow_3lib_FixedShapeTensorType __pyx_vtable_7pyarrow_3lib_FixedShapeTensorType;

static PyObject *__pyx_tp_new_7pyarrow_3lib_FixedShapeTensorType(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_7pyarrow_3lib_FixedShapeTensorType *p;
  PyObject *o = __pyx_tp_new_7pyarrow_3lib_BaseExtensionType(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_7pyarrow_3lib_FixedShapeTensorType *)o);
  p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_DataType*)__pyx_vtabptr_7pyarrow_3lib_FixedShapeTensorType;
  return o;
}

static PyObject *__pyx_getprop_7pyarrow_3lib_20FixedShapeTensorType_value_type(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyarrow_3lib_20FixedShapeTensorType_10value_type_1__get__(o);
}

static PyObject *__pyx_getprop_7pyarrow_3lib_20FixedShapeTensorType_shape(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyarrow_3lib_20FixedShapeTensorType_5shape_1__get__(o);
}

static PyObject *__pyx_getprop_7pyarrow_3lib_20FixedShapeTensorType_dim_names(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyarrow_3lib_20FixedShapeTensorType_9dim_names_1__get__(o);
}

static PyObject *__pyx_getprop_7pyarrow_3lib_20FixedShapeTensorType_permutation(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyarrow_3lib_20FixedShapeTensorType_11permutation_1__get__(o);
}

static PyMethodDef __pyx_methods_7pyarrow_3lib_FixedShapeTensorType[] = {
  {"__arrow_ext_class__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_20FixedShapeTensorType_1__arrow_ext_class__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_20FixedShapeTensorType___arrow_ext_class__},
  {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_20FixedShapeTensorType_3__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_20FixedShapeTensorType_2__reduce__},
  {"__arrow_ext_scalar_class__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_20FixedShapeTensorType_5__arrow_ext_scalar_class__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_20FixedShapeTensorType_4__arrow_ext_scalar_class__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_7pyarrow_3lib_FixedShapeTensorType[] = {
  {"value_type", __pyx_getprop_7pyarrow_3lib_20FixedShapeTensorType_value_type, 0, PyDoc_STR("\n        Data type of an individual tensor.\n        "), 0},
  {"shape", __pyx_getprop_7pyarrow_3lib_20FixedShapeTensorType_shape, 0, PyDoc_STR("\n        Shape of the tensors.\n        "), 0},
  {"dim_names", __pyx_getprop_7pyarrow_3lib_20FixedShapeTensorType_dim_names, 0, PyDoc_STR("\n        Explicit names of the dimensions.\n        "), 0},
  {"permutation", __pyx_getprop_7pyarrow_3lib_20FixedShapeTensorType_permutation, 0, PyDoc_STR("\n        Indices of the dimensions ordering.\n        "), 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_7pyarrow_3lib_FixedShapeTensorType_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_DataType},
  {Py_tp_doc, (void *)PyDoc_STR("\n    Concrete class for fixed shape tensor extension type.\n\n    Examples\n    --------\n    Create an instance of fixed shape tensor extension type:\n\n    >>> import pyarrow as pa\n    >>> pa.fixed_shape_tensor(pa.int32(), [2, 2])\n    FixedShapeTensorType(extension<arrow.fixed_shape_tensor[value_type=int32, shape=[2,2]]>)\n\n    Create an instance of fixed shape tensor extension type with\n    permutation:\n\n    >>> tensor_type = pa.fixed_shape_tensor(pa.int8(), (2, 2, 3),\n    ...                                     permutation=[0, 2, 1])\n    >>> tensor_type.permutation\n    [0, 2, 1]\n    ")},
  {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_FixedShapeTensorType},
  {Py_tp_getset, (void *)__pyx_getsets_7pyarrow_3lib_FixedShapeTensorType},
  {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_FixedShapeTensorType},
  {0, 0},
};
static PyType_Spec __pyx_type_7pyarrow_3lib_FixedShapeTensorType_spec = {
  "pyarrow.lib.FixedShapeTensorType",
  sizeof(struct __pyx_obj_7pyarrow_3lib_FixedShapeTensorType),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
  __pyx_type_7pyarrow_3lib_FixedShapeTensorType_slots,
};
#else

static PyTypeObject __pyx_type_7pyarrow_3lib_FixedShapeTensorType = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyarrow.lib.""FixedShapeTensorType", /*tp_name*/
  sizeof(struct __pyx_obj_7pyarrow_3lib_FixedShapeTensorType), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7pyarrow_3lib_DataType, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_7pyarrow_3lib_8DataType_13__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_7pyarrow_3lib_8DataType_7__str__, /*tp_str*/
  #else
  0, /*tp_str*/
  #endif
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  PyDoc_STR("\n    Concrete class for fixed shape tensor extension type.\n\n    Examples\n    --------\n    Create an instance of fixed shape tensor extension type:\n\n    >>> import pyarrow as pa\n    >>> pa.fixed_shape_tensor(pa.int32(), [2, 2])\n    FixedShapeTensorType(extension<arrow.fixed_shape_tensor[value_type=int32, shape=[2,2]]>)\n\n    Create an instance of fixed shape tensor extension type with\n    permutation:\n\n    >>> tensor_type = pa.fixed_shape_tensor(pa.int8(), (2, 2, 3),\n    ...                                     permutation=[0, 2, 1])\n    >>> tensor_type.permutation\n    [0, 2, 1]\n    "), /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_7pyarrow_3lib_FixedShapeTensorType, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_7pyarrow_3lib_FixedShapeTensorType, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_7pyarrow_3lib_8DataType_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_7pyarrow_3lib_FixedShapeTensorType, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_7pyarrow_3lib_Bool8Type __pyx_vtable_7pyarrow_3lib_Bool8Type;

static PyObject *__pyx_tp_new_7pyarrow_3lib_Bool8Type(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_7pyarrow_3lib_Bool8Type *p;
  PyObject *o = __pyx_tp_new_7pyarrow_3lib_BaseExtensionType(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_7pyarrow_3lib_Bool8Type *)o);
  p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_DataType*)__pyx_vtabptr_7pyarrow_3lib_Bool8Type;
  return o;
}

static PyMethodDef __pyx_methods_7pyarrow_3lib_Bool8Type[] = {
  {"__arrow_ext_class__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_9Bool8Type_1__arrow_ext_class__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_9Bool8Type___arrow_ext_class__},
  {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_9Bool8Type_3__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_9Bool8Type_2__reduce__},
  {"__arrow_ext_scalar_class__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_9Bool8Type_5__arrow_ext_scalar_class__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_9Bool8Type_4__arrow_ext_scalar_class__},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_7pyarrow_3lib_Bool8Type_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_DataType},
  {Py_tp_doc, (void *)PyDoc_STR("\n    Concrete class for bool8 extension type.\n\n    Bool8 is an alternate representation for boolean\n    arrays using 8 bits instead of 1 bit per value. The underlying\n    storage type is int8.\n\n    Examples\n    --------\n    Create an instance of bool8 extension type:\n\n    >>> import pyarrow as pa\n    >>> pa.bool8()\n    Bool8Type(extension<arrow.bool8>)\n    ")},
  {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_Bool8Type},
  {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_Bool8Type},
  {0, 0},
};
static PyType_Spec __pyx_type_7pyarrow_3lib_Bool8Type_spec = {
  "pyarrow.lib.Bool8Type",
  sizeof(struct __pyx_obj_7pyarrow_3lib_Bool8Type),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
  __pyx_type_7pyarrow_3lib_Bool8Type_slots,
};
#else

static PyTypeObject __pyx_type_7pyarrow_3lib_Bool8Type = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyarrow.lib.""Bool8Type", /*tp_name*/
  sizeof(struct __pyx_obj_7pyarrow_3lib_Bool8Type), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7pyarrow_3lib_DataType, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_7pyarrow_3lib_8DataType_13__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_7pyarrow_3lib_8DataType_7__str__, /*tp_str*/
  #else
  0, /*tp_str*/
  #endif
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  PyDoc_STR("\n    Concrete class for bool8 extension type.\n\n    Bool8 is an alternate representation for boolean\n    arrays using 8 bits instead of 1 bit per value. The underlying\n    storage type is int8.\n\n    Examples\n    --------\n    Create an instance of bool8 extension type:\n\n    >>> import pyarrow as pa\n    >>> pa.bool8()\n    Bool8Type(extension<arrow.bool8>)\n    "), /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_7pyarrow_3lib_Bool8Type, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_7pyarrow_3lib_8DataType_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_7pyarrow_3lib_Bool8Type, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_7pyarrow_3lib_OpaqueType __pyx_vtable_7pyarrow_3lib_OpaqueType;

static PyObject *__pyx_tp_new_7pyarrow_3lib_OpaqueType(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_7pyarrow_3lib_OpaqueType *p;
  PyObject *o = __pyx_tp_new_7pyarrow_3lib_BaseExtensionType(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_7pyarrow_3lib_OpaqueType *)o);
  p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_DataType*)__pyx_vtabptr_7pyarrow_3lib_OpaqueType;
  return o;
}

static PyObject *__pyx_getprop_7pyarrow_3lib_10OpaqueType_type_name(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyarrow_3lib_10OpaqueType_9type_name_1__get__(o);
}

static PyObject *__pyx_getprop_7pyarrow_3lib_10OpaqueType_vendor_name(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyarrow_3lib_10OpaqueType_11vendor_name_1__get__(o);
}

static PyMethodDef __pyx_methods_7pyarrow_3lib_OpaqueType[] = {
  {"__arrow_ext_class__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10OpaqueType_1__arrow_ext_class__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10OpaqueType___arrow_ext_class__},
  {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10OpaqueType_3__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10OpaqueType_2__reduce__},
  {"__arrow_ext_scalar_class__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10OpaqueType_5__arrow_ext_scalar_class__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10OpaqueType_4__arrow_ext_scalar_class__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_7pyarrow_3lib_OpaqueType[] = {
  {"type_name", __pyx_getprop_7pyarrow_3lib_10OpaqueType_type_name, 0, PyDoc_STR("\n        The name of the type in the external system.\n        "), 0},
  {"vendor_name", __pyx_getprop_7pyarrow_3lib_10OpaqueType_vendor_name, 0, PyDoc_STR("\n        The name of the external system.\n        "), 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_7pyarrow_3lib_OpaqueType_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_DataType},
  {Py_tp_doc, (void *)PyDoc_STR("\n    Concrete class for opaque extension type.\n\n    Opaque is a placeholder for a type from an external (often non-Arrow)\n    system that could not be interpreted.\n\n    Examples\n    --------\n    Create an instance of opaque extension type:\n\n    >>> import pyarrow as pa\n    >>> pa.opaque(pa.int32(), \"geometry\", \"postgis\")\n    OpaqueType(extension<arrow.opaque[storage_type=int32, type_name=geometry, vendor_name=postgis]>)\n    ")},
  {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_OpaqueType},
  {Py_tp_getset, (void *)__pyx_getsets_7pyarrow_3lib_OpaqueType},
  {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_OpaqueType},
  {0, 0},
};
static PyType_Spec __pyx_type_7pyarrow_3lib_OpaqueType_spec = {
  "pyarrow.lib.OpaqueType",
  sizeof(struct __pyx_obj_7pyarrow_3lib_OpaqueType),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
  __pyx_type_7pyarrow_3lib_OpaqueType_slots,
};
#else

static PyTypeObject __pyx_type_7pyarrow_3lib_OpaqueType = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyarrow.lib.""OpaqueType", /*tp_name*/
  sizeof(struct __pyx_obj_7pyarrow_3lib_OpaqueType), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7pyarrow_3lib_DataType, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_7pyarrow_3lib_8DataType_13__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_7pyarrow_3lib_8DataType_7__str__, /*tp_str*/
  #else
  0, /*tp_str*/
  #endif
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  PyDoc_STR("\n    Concrete class for opaque extension type.\n\n    Opaque is a placeholder for a type from an external (often non-Arrow)\n    system that could not be interpreted.\n\n    Examples\n    --------\n    Create an instance of opaque extension type:\n\n    >>> import pyarrow as pa\n    >>> pa.opaque(pa.int32(), \"geometry\", \"postgis\")\n    OpaqueType(extension<arrow.opaque[storage_type=int32, type_name=geometry, vendor_name=postgis]>)\n    "), /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_7pyarrow_3lib_OpaqueType, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_7pyarrow_3lib_OpaqueType, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_7pyarrow_3lib_8DataType_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_7pyarrow_3lib_OpaqueType, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_7pyarrow_3lib_UuidType __pyx_vtable_7pyarrow_3lib_UuidType;

static PyObject *__pyx_tp_new_7pyarrow_3lib_UuidType(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_7pyarrow_3lib_UuidType *p;
  PyObject *o = __pyx_tp_new_7pyarrow_3lib_BaseExtensionType(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_7pyarrow_3lib_UuidType *)o);
  p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_DataType*)__pyx_vtabptr_7pyarrow_3lib_UuidType;
  return o;
}

static PyMethodDef __pyx_methods_7pyarrow_3lib_UuidType[] = {
  {"__arrow_ext_class__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_8UuidType_1__arrow_ext_class__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_8UuidType___arrow_ext_class__},
  {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_8UuidType_3__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_8UuidType_2__reduce__},
  {"__arrow_ext_scalar_class__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_8UuidType_5__arrow_ext_scalar_class__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_8UuidType_4__arrow_ext_scalar_class__},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_7pyarrow_3lib_UuidType_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_DataType},
  {Py_tp_doc, (void *)PyDoc_STR("\n    Concrete class for UUID extension type.\n    ")},
  {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_UuidType},
  {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_UuidType},
  {0, 0},
};
static PyType_Spec __pyx_type_7pyarrow_3lib_UuidType_spec = {
  "pyarrow.lib.UuidType",
  sizeof(struct __pyx_obj_7pyarrow_3lib_UuidType),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
  __pyx_type_7pyarrow_3lib_UuidType_slots,
};
#else

static PyTypeObject __pyx_type_7pyarrow_3lib_UuidType = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyarrow.lib.""UuidType", /*tp_name*/
  sizeof(struct __pyx_obj_7pyarrow_3lib_UuidType), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7pyarrow_3lib_DataType, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_7pyarrow_3lib_8DataType_13__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_7pyarrow_3lib_8DataType_7__str__, /*tp_str*/
  #else
  0, /*tp_str*/
  #endif
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  PyDoc_STR("\n    Concrete class for UUID extension type.\n    "), /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_7pyarrow_3lib_UuidType, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_7pyarrow_3lib_8DataType_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_7pyarrow_3lib_UuidType, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_7pyarrow_3lib_JsonType __pyx_vtable_7pyarrow_3lib_JsonType;

static PyObject *__pyx_tp_new_7pyarrow_3lib_JsonType(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_7pyarrow_3lib_JsonType *p;
  PyObject *o = __pyx_tp_new_7pyarrow_3lib_BaseExtensionType(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_7pyarrow_3lib_JsonType *)o);
  p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_DataType*)__pyx_vtabptr_7pyarrow_3lib_JsonType;
  return o;
}

static PyMethodDef __pyx_methods_7pyarrow_3lib_JsonType[] = {
  {"__arrow_ext_class__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_8JsonType_1__arrow_ext_class__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_8JsonType___arrow_ext_class__},
  {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_8JsonType_3__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_8JsonType_2__reduce__},
  {"__arrow_ext_scalar_class__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_8JsonType_5__arrow_ext_scalar_class__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_8JsonType_4__arrow_ext_scalar_class__},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_7pyarrow_3lib_JsonType_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_DataType},
  {Py_tp_doc, (void *)PyDoc_STR("\n    Concrete class for JSON extension type.\n\n    Examples\n    --------\n    Define the extension type for JSON array\n\n    >>> import pyarrow as pa\n    >>> json_type = pa.json_(pa.large_utf8())\n\n    Create an extension array\n\n    >>> arr = [None, '{ \"id\":30, \"values\":[\"a\", \"b\"] }']\n    >>> storage = pa.array(arr, pa.large_utf8())\n    >>> pa.ExtensionArray.from_storage(json_type, storage)\n    <pyarrow.lib.JsonArray object at ...>\n    [\n      null,\n      \"{ \"id\":30, \"values\":[\"a\", \"b\"] }\"\n    ]\n    ")},
  {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_JsonType},
  {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_JsonType},
  {0, 0},
};
static PyType_Spec __pyx_type_7pyarrow_3lib_JsonType_spec = {
  "pyarrow.lib.JsonType",
  sizeof(struct __pyx_obj_7pyarrow_3lib_JsonType),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
  __pyx_type_7pyarrow_3lib_JsonType_slots,
};
#else

static PyTypeObject __pyx_type_7pyarrow_3lib_JsonType = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyarrow.lib.""JsonType", /*tp_name*/
  sizeof(struct __pyx_obj_7pyarrow_3lib_JsonType), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7pyarrow_3lib_DataType, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_7pyarrow_3lib_8DataType_13__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_7pyarrow_3lib_8DataType_7__str__, /*tp_str*/
  #else
  0, /*tp_str*/
  #endif
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  PyDoc_STR("\n    Concrete class for JSON extension type.\n\n    Examples\n    --------\n    Define the extension type for JSON array\n\n    >>> import pyarrow as pa\n    >>> json_type = pa.json_(pa.large_utf8())\n\n    Create an extension array\n\n    >>> arr = [None, '{ \"id\":30, \"values\":[\"a\", \"b\"] }']\n    >>> storage = pa.array(arr, pa.large_utf8())\n    >>> pa.ExtensionArray.from_storage(json_type, storage)\n    <pyarrow.lib.JsonArray object at ...>\n    [\n      null,\n      \"{ \"id\":30, \"values\":[\"a\", \"b\"] }\"\n    ]\n    "), /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_7pyarrow_3lib_JsonType, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_7pyarrow_3lib_8DataType_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_7pyarrow_3lib_JsonType, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_7pyarrow_3lib__Metadata_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib__Weakrefable},
  {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib__Weakrefable},
  {0, 0},
};
static PyType_Spec __pyx_type_7pyarrow_3lib__Metadata_spec = {
  "pyarrow.lib._Metadata",
  sizeof(struct __pyx_obj_7pyarrow_3lib__Metadata),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
  __pyx_type_7pyarrow_3lib__Metadata_slots,
};
#else

static PyTypeObject __pyx_type_7pyarrow_3lib__Metadata = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyarrow.lib.""_Metadata", /*tp_name*/
  sizeof(struct __pyx_obj_7pyarrow_3lib__Metadata), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7pyarrow_3lib__Weakrefable, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_7pyarrow_3lib__Weakrefable, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_7pyarrow_3lib_KeyValueMetadata __pyx_vtable_7pyarrow_3lib_KeyValueMetadata;

static PyObject *__pyx_tp_new_7pyarrow_3lib_KeyValueMetadata(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_7pyarrow_3lib_KeyValueMetadata *p;
  PyObject *o = __pyx_tp_new_7pyarrow_3lib__Weakrefable(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_7pyarrow_3lib_KeyValueMetadata *)o);
  p->__pyx_vtab = __pyx_vtabptr_7pyarrow_3lib_KeyValueMetadata;
  __Pyx_default_placement_construct(&(p->wrapped));
  return o;
}

static void __pyx_tp_dealloc_7pyarrow_3lib_KeyValueMetadata(PyObject *o) {
  struct __pyx_obj_7pyarrow_3lib_KeyValueMetadata *p = (struct __pyx_obj_7pyarrow_3lib_KeyValueMetadata *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_7pyarrow_3lib_KeyValueMetadata) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  __Pyx_call_destructor(p->wrapped);
  __pyx_tp_dealloc_7pyarrow_3lib__Weakrefable(o);
}

static PyObject *__pyx_sq_item_7pyarrow_3lib_KeyValueMetadata(PyObject *o, Py_ssize_t i) {
  PyObject *r;
  PyObject *x = PyLong_FromSsize_t(i); if(!x) return 0;
  #if CYTHON_USE_TYPE_SLOTS || (!CYTHON_USE_TYPE_SPECS && __PYX_LIMITED_VERSION_HEX < 0x030A0000)
  r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
  #else
  r = ((binaryfunc)PyType_GetSlot(Py_TYPE(o), Py_mp_subscript))(o, x);
  #endif
  Py_DECREF(x);
  return r;
}

static PyObject *__pyx_tp_richcompare_7pyarrow_3lib_KeyValueMetadata(PyObject *o1, PyObject *o2, int op) {
  switch (op) {
    case Py_EQ: {
      return __pyx_pw_7pyarrow_3lib_16KeyValueMetadata_9__eq__(o1, o2);
    }
    case Py_NE: {
      PyObject *ret;
      ret = __pyx_pw_7pyarrow_3lib_16KeyValueMetadata_9__eq__(o1, o2);
      if (likely(ret && ret != Py_NotImplemented)) {
        int b = __Pyx_PyObject_IsTrue(ret);
        Py_DECREF(ret);
        if (unlikely(b < 0)) return NULL;
        ret = (b) ? Py_False : Py_True;
        Py_INCREF(ret);
      }
      return ret;
    }
    default: {
      return __Pyx_NewRef(Py_NotImplemented);
    }
  }
}

static PyMethodDef __pyx_methods_7pyarrow_3lib_KeyValueMetadata[] = {
  {"equals", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_16KeyValueMetadata_3equals, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_16KeyValueMetadata_2equals},
  {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_16KeyValueMetadata_19__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_16KeyValueMetadata_18__reduce__},
  {"key", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_16KeyValueMetadata_21key, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_16KeyValueMetadata_20key},
  {"value", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_16KeyValueMetadata_23value, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_16KeyValueMetadata_22value},
  {"keys", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_16KeyValueMetadata_25keys, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_16KeyValueMetadata_24keys},
  {"values", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_16KeyValueMetadata_28values, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_16KeyValueMetadata_27values},
  {"items", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_16KeyValueMetadata_31items, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_16KeyValueMetadata_30items},
  {"get_all", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_16KeyValueMetadata_34get_all, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_16KeyValueMetadata_33get_all},
  {"to_dict", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_16KeyValueMetadata_36to_dict, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_16KeyValueMetadata_35to_dict},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_7pyarrow_3lib_KeyValueMetadata_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_KeyValueMetadata},
  {Py_tp_repr, (void *)__pyx_pw_7pyarrow_3lib_16KeyValueMetadata_5__repr__},
  {Py_sq_length, (void *)__pyx_pw_7pyarrow_3lib_16KeyValueMetadata_11__len__},
  {Py_sq_item, (void *)__pyx_sq_item_7pyarrow_3lib_KeyValueMetadata},
  {Py_sq_contains, (void *)__pyx_pw_7pyarrow_3lib_16KeyValueMetadata_13__contains__},
  {Py_mp_length, (void *)__pyx_pw_7pyarrow_3lib_16KeyValueMetadata_11__len__},
  {Py_mp_subscript, (void *)__pyx_pw_7pyarrow_3lib_16KeyValueMetadata_15__getitem__},
  {Py_tp_str, (void *)__pyx_pw_7pyarrow_3lib_16KeyValueMetadata_7__str__},
  {Py_tp_doc, (void *)PyDoc_STR("KeyValueMetadata(__arg0__=None, **kwargs)\n\nKeyValueMetadata\n\nParameters\n----------\n__arg0__ : dict\n    A dict of the key-value metadata\n**kwargs : optional\n    additional key-value metadata")},
  {Py_tp_richcompare, (void *)__pyx_tp_richcompare_7pyarrow_3lib_KeyValueMetadata},
  {Py_tp_iter, (void *)__pyx_pw_7pyarrow_3lib_16KeyValueMetadata_17__iter__},
  {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_KeyValueMetadata},
  {Py_tp_init, (void *)__pyx_pw_7pyarrow_3lib_16KeyValueMetadata_1__init__},
  {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_KeyValueMetadata},
  {0, 0},
};
static PyType_Spec __pyx_type_7pyarrow_3lib_KeyValueMetadata_spec = {
  "pyarrow.lib.KeyValueMetadata",
  sizeof(struct __pyx_obj_7pyarrow_3lib_KeyValueMetadata),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
  __pyx_type_7pyarrow_3lib_KeyValueMetadata_slots,
};
#else

static PySequenceMethods __pyx_tp_as_sequence_KeyValueMetadata = {
  __pyx_pw_7pyarrow_3lib_16KeyValueMetadata_11__len__, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  __pyx_sq_item_7pyarrow_3lib_KeyValueMetadata, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  __pyx_pw_7pyarrow_3lib_16KeyValueMetadata_13__contains__, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_KeyValueMetadata = {
  __pyx_pw_7pyarrow_3lib_16KeyValueMetadata_11__len__, /*mp_length*/
  __pyx_pw_7pyarrow_3lib_16KeyValueMetadata_15__getitem__, /*mp_subscript*/
  0, /*mp_ass_subscript*/
};

static PyTypeObject __pyx_type_7pyarrow_3lib_KeyValueMetadata = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyarrow.lib.""KeyValueMetadata", /*tp_name*/
  sizeof(struct __pyx_obj_7pyarrow_3lib_KeyValueMetadata), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7pyarrow_3lib_KeyValueMetadata, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  __pyx_pw_7pyarrow_3lib_16KeyValueMetadata_5__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  &__pyx_tp_as_sequence_KeyValueMetadata, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_KeyValueMetadata, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pw_7pyarrow_3lib_16KeyValueMetadata_7__str__, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  PyDoc_STR("KeyValueMetadata(__arg0__=None, **kwargs)\n\nKeyValueMetadata\n\nParameters\n----------\n__arg0__ : dict\n    A dict of the key-value metadata\n**kwargs : optional\n    additional key-value metadata"), /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  __pyx_tp_richcompare_7pyarrow_3lib_KeyValueMetadata, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  __pyx_pw_7pyarrow_3lib_16KeyValueMetadata_17__iter__, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_7pyarrow_3lib_KeyValueMetadata, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  __pyx_pw_7pyarrow_3lib_16KeyValueMetadata_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_7pyarrow_3lib_KeyValueMetadata, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_7pyarrow_3lib_Field __pyx_vtable_7pyarrow_3lib_Field;

static PyObject *__pyx_tp_new_7pyarrow_3lib_Field(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_7pyarrow_3lib_Field *p;
  PyObject *o = __pyx_tp_new_7pyarrow_3lib__Weakrefable(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_7pyarrow_3lib_Field *)o);
  p->__pyx_vtab = __pyx_vtabptr_7pyarrow_3lib_Field;
  __Pyx_default_placement_construct(&(p->sp_field));
  p->type = ((struct __pyx_obj_7pyarrow_3lib_DataType *)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_7pyarrow_3lib_5Field_1__cinit__(o, __pyx_mstate_global->__pyx_empty_tuple, NULL) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_7pyarrow_3lib_Field(PyObject *o) {
  struct __pyx_obj_7pyarrow_3lib_Field *p = (struct __pyx_obj_7pyarrow_3lib_Field *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_7pyarrow_3lib_Field) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  __Pyx_call_destructor(p->sp_field);
  Py_CLEAR(p->type);
  __pyx_tp_dealloc_7pyarrow_3lib__Weakrefable(o);
}

static int __pyx_tp_traverse_7pyarrow_3lib_Field(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_7pyarrow_3lib_Field *p = (struct __pyx_obj_7pyarrow_3lib_Field *)o;
  #if !CYTHON_USE_MODULE_STATE
  e = 0;
  if (likely(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Weakrefable)) {
    traverseproc traverse = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Weakrefable, tp_traverse, traverseproc);
    if (traverse) { e = traverse(o, v, a); }
  } else
  #endif
  { e = __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_7pyarrow_3lib_Field); }
  if (e) return e;
  {
    e = __Pyx_call_type_traverse(o, 0, v, a);
    if (e) return e;
  }
  if (p->type) {
    e = (*v)(((PyObject *)p->type), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_7pyarrow_3lib_Field(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_7pyarrow_3lib_Field *p = (struct __pyx_obj_7pyarrow_3lib_Field *)o;
  #if !CYTHON_USE_MODULE_STATE
  if (likely(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Weakrefable)) {
    inquiry clear = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Weakrefable, tp_clear, inquiry);
    if (clear) clear(o);
  } else
  #endif
  { __Pyx_call_next_tp_clear(o, __pyx_tp_clear_7pyarrow_3lib_Field); }
  tmp = ((PyObject*)p->type);
  p->type = ((struct __pyx_obj_7pyarrow_3lib_DataType *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_tp_richcompare_7pyarrow_3lib_Field(PyObject *o1, PyObject *o2, int op) {
  switch (op) {
    case Py_EQ: {
      return __pyx_pw_7pyarrow_3lib_5Field_7__eq__(o1, o2);
    }
    case Py_NE: {
      PyObject *ret;
      ret = __pyx_pw_7pyarrow_3lib_5Field_7__eq__(o1, o2);
      if (likely(ret && ret != Py_NotImplemented)) {
        int b = __Pyx_PyObject_IsTrue(ret);
        Py_DECREF(ret);
        if (unlikely(b < 0)) return NULL;
        ret = (b) ? Py_False : Py_True;
        Py_INCREF(ret);
      }
      return ret;
    }
    default: {
      return __Pyx_NewRef(Py_NotImplemented);
    }
  }
}

static PyObject *__pyx_getprop_7pyarrow_3lib_5Field_nullable(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyarrow_3lib_5Field_8nullable_1__get__(o);
}

static PyObject *__pyx_getprop_7pyarrow_3lib_5Field_name(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyarrow_3lib_5Field_4name_1__get__(o);
}

static PyObject *__pyx_getprop_7pyarrow_3lib_5Field_metadata(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyarrow_3lib_5Field_8metadata_1__get__(o);
}

static PyObject *__pyx_getprop_7pyarrow_3lib_5Field_type(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyarrow_3lib_5Field_4type_1__get__(o);
}

static PyMethodDef __pyx_methods_7pyarrow_3lib_Field[] = {
  {"equals", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Field_5equals, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Field_4equals},
  {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Field_9__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Field_8__reduce__},
  {"with_metadata", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Field_17with_metadata, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Field_16with_metadata},
  {"remove_metadata", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Field_19remove_metadata, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Field_18remove_metadata},
  {"with_type", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Field_21with_type, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Field_20with_type},
  {"with_name", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Field_23with_name, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Field_22with_name},
  {"with_nullable", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Field_25with_nullable, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Field_24with_nullable},
  {"flatten", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Field_27flatten, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Field_26flatten},
  {"_export_to_c", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Field_29_export_to_c, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Field_28_export_to_c},
  {"_import_from_c", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Field_31_import_from_c, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Field_30_import_from_c},
  {"__arrow_c_schema__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Field_33__arrow_c_schema__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Field_32__arrow_c_schema__},
  {"_import_from_c_capsule", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Field_35_import_from_c_capsule, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Field_34_import_from_c_capsule},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_7pyarrow_3lib_Field[] = {
  {"nullable", __pyx_getprop_7pyarrow_3lib_5Field_nullable, 0, PyDoc_STR("\n        The field nullability.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> f1 = pa.field('key', pa.int32())\n        >>> f2 = pa.field('key', pa.int32(), nullable=False)\n        >>> f1.nullable\n        True\n        >>> f2.nullable\n        False\n        "), 0},
  {"name", __pyx_getprop_7pyarrow_3lib_5Field_name, 0, PyDoc_STR("\n        The field name.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> field = pa.field('key', pa.int32())\n        >>> field.name\n        'key'\n        "), 0},
  {"metadata", __pyx_getprop_7pyarrow_3lib_5Field_metadata, 0, PyDoc_STR("\n        The field metadata (if any is set).\n\n        Returns\n        -------\n        metadata : dict or None\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> field = pa.field('key', pa.int32(),\n        ...                  metadata={\"key\": \"Something important\"})\n        >>> field.metadata\n        {b'key': b'Something important'}\n        "), 0},
  {"type", __pyx_getprop_7pyarrow_3lib_5Field_type, 0, 0, 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_7pyarrow_3lib_Field_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_Field},
  {Py_tp_repr, (void *)__pyx_pw_7pyarrow_3lib_5Field_13__repr__},
  {Py_tp_hash, (void *)__pyx_pw_7pyarrow_3lib_5Field_15__hash__},
  {Py_tp_str, (void *)__pyx_pw_7pyarrow_3lib_5Field_11__str__},
  {Py_tp_doc, (void *)PyDoc_STR("Field()\n\nA named field, with a data type, nullability, and optional metadata.\n\nNotes\n-----\nDo not use this class's constructor directly; use pyarrow.field\n\nExamples\n--------\nCreate an instance of pyarrow.Field:\n\n>>> import pyarrow as pa\n>>> pa.field('key', pa.int32())\npyarrow.Field<key: int32>\n>>> pa.field('key', pa.int32(), nullable=False)\npyarrow.Field<key: int32 not null>\n>>> field = pa.field('key', pa.int32(),\n...                  metadata={\"key\": \"Something important\"})\n>>> field\npyarrow.Field<key: int32>\n>>> field.metadata\n{b'key': b'Something important'}\n\nUse the field to create a struct type:\n\n>>> pa.struct([field])\nStructType(struct<key: int32>)")},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyarrow_3lib_Field},
  {Py_tp_clear, (void *)__pyx_tp_clear_7pyarrow_3lib_Field},
  {Py_tp_richcompare, (void *)__pyx_tp_richcompare_7pyarrow_3lib_Field},
  {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_Field},
  {Py_tp_getset, (void *)__pyx_getsets_7pyarrow_3lib_Field},
  {Py_tp_init, (void *)__pyx_pw_7pyarrow_3lib_5Field_3__init__},
  {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_Field},
  {0, 0},
};
static PyType_Spec __pyx_type_7pyarrow_3lib_Field_spec = {
  "pyarrow.lib.Field",
  sizeof(struct __pyx_obj_7pyarrow_3lib_Field),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  __pyx_type_7pyarrow_3lib_Field_slots,
};
#else

static PyTypeObject __pyx_type_7pyarrow_3lib_Field = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyarrow.lib.""Field", /*tp_name*/
  sizeof(struct __pyx_obj_7pyarrow_3lib_Field), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7pyarrow_3lib_Field, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  __pyx_pw_7pyarrow_3lib_5Field_13__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  __pyx_pw_7pyarrow_3lib_5Field_15__hash__, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pw_7pyarrow_3lib_5Field_11__str__, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  PyDoc_STR("Field()\n\nA named field, with a data type, nullability, and optional metadata.\n\nNotes\n-----\nDo not use this class's constructor directly; use pyarrow.field\n\nExamples\n--------\nCreate an instance of pyarrow.Field:\n\n>>> import pyarrow as pa\n>>> pa.field('key', pa.int32())\npyarrow.Field<key: int32>\n>>> pa.field('key', pa.int32(), nullable=False)\npyarrow.Field<key: int32 not null>\n>>> field = pa.field('key', pa.int32(),\n...                  metadata={\"key\": \"Something important\"})\n>>> field\npyarrow.Field<key: int32>\n>>> field.metadata\n{b'key': b'Something important'}\n\nUse the field to create a struct type:\n\n>>> pa.struct([field])\nStructType(struct<key: int32>)"), /*tp_doc*/
  __pyx_tp_traverse_7pyarrow_3lib_Field, /*tp_traverse*/
  __pyx_tp_clear_7pyarrow_3lib_Field, /*tp_clear*/
  __pyx_tp_richcompare_7pyarrow_3lib_Field, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_7pyarrow_3lib_Field, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_7pyarrow_3lib_Field, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  __pyx_pw_7pyarrow_3lib_5Field_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_7pyarrow_3lib_Field, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_7pyarrow_3lib_Schema __pyx_vtable_7pyarrow_3lib_Schema;

static PyObject *__pyx_tp_new_7pyarrow_3lib_Schema(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_7pyarrow_3lib_Schema *p;
  PyObject *o = __pyx_tp_new_7pyarrow_3lib__Weakrefable(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_7pyarrow_3lib_Schema *)o);
  p->__pyx_vtab = __pyx_vtabptr_7pyarrow_3lib_Schema;
  __Pyx_default_placement_construct(&(p->sp_schema));
  if (unlikely(__pyx_pw_7pyarrow_3lib_6Schema_1__cinit__(o, __pyx_mstate_global->__pyx_empty_tuple, NULL) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_7pyarrow_3lib_Schema(PyObject *o) {
  struct __pyx_obj_7pyarrow_3lib_Schema *p = (struct __pyx_obj_7pyarrow_3lib_Schema *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_7pyarrow_3lib_Schema) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  __Pyx_call_destructor(p->sp_schema);
  __pyx_tp_dealloc_7pyarrow_3lib__Weakrefable(o);
}

static PyObject *__pyx_sq_item_7pyarrow_3lib_Schema(PyObject *o, Py_ssize_t i) {
  PyObject *r;
  PyObject *x = PyLong_FromSsize_t(i); if(!x) return 0;
  #if CYTHON_USE_TYPE_SLOTS || (!CYTHON_USE_TYPE_SPECS && __PYX_LIMITED_VERSION_HEX < 0x030A0000)
  r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
  #else
  r = ((binaryfunc)PyType_GetSlot(Py_TYPE(o), Py_mp_subscript))(o, x);
  #endif
  Py_DECREF(x);
  return r;
}

static PyObject *__pyx_tp_richcompare_7pyarrow_3lib_Schema(PyObject *o1, PyObject *o2, int op) {
  switch (op) {
    case Py_EQ: {
      return __pyx_pw_7pyarrow_3lib_6Schema_18__eq__(o1, o2);
    }
    case Py_NE: {
      PyObject *ret;
      ret = __pyx_pw_7pyarrow_3lib_6Schema_18__eq__(o1, o2);
      if (likely(ret && ret != Py_NotImplemented)) {
        int b = __Pyx_PyObject_IsTrue(ret);
        Py_DECREF(ret);
        if (unlikely(b < 0)) return NULL;
        ret = (b) ? Py_False : Py_True;
        Py_INCREF(ret);
      }
      return ret;
    }
    default: {
      return __Pyx_NewRef(Py_NotImplemented);
    }
  }
}

static PyObject *__pyx_getprop_7pyarrow_3lib_6Schema_pandas_metadata(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyarrow_3lib_6Schema_15pandas_metadata_1__get__(o);
}

static PyObject *__pyx_getprop_7pyarrow_3lib_6Schema_names(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyarrow_3lib_6Schema_5names_1__get__(o);
}

static PyObject *__pyx_getprop_7pyarrow_3lib_6Schema_types(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyarrow_3lib_6Schema_5types_1__get__(o);
}

static PyObject *__pyx_getprop_7pyarrow_3lib_6Schema_metadata(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7pyarrow_3lib_6Schema_8metadata_1__get__(o);
}

static PyMethodDef __pyx_methods_7pyarrow_3lib_Schema[] = {
  {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_6Schema_12__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_6Schema_11__reduce__},
  {"__sizeof__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_6Schema_16__sizeof__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_6Schema_15__sizeof__},
  {"empty_table", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_6Schema_20empty_table, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_6Schema_19empty_table},
  {"equals", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_6Schema_22equals, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_6Schema_21equals},
  {"from_pandas", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_6Schema_24from_pandas, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_6Schema_23from_pandas},
  {"field", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_6Schema_26field, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_6Schema_25field},
  {"_field", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_6Schema_28_field, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_6Schema_27_field},
  {"field_by_name", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_6Schema_30field_by_name, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_6Schema_29field_by_name},
  {"get_field_index", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_6Schema_32get_field_index, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_6Schema_31get_field_index},
  {"get_all_field_indices", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_6Schema_34get_all_field_indices, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_6Schema_33get_all_field_indices},
  {"append", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_6Schema_36append, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_6Schema_35append},
  {"insert", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_6Schema_38insert, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_6Schema_37insert},
  {"remove", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_6Schema_40remove, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_6Schema_39remove},
  {"set", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_6Schema_42set, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_6Schema_41set},
  {"add_metadata", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_6Schema_44add_metadata, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_6Schema_43add_metadata},
  {"with_metadata", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_6Schema_46with_metadata, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_6Schema_45with_metadata},
  {"serialize", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_6Schema_48serialize, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_6Schema_47serialize},
  {"remove_metadata", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_6Schema_50remove_metadata, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_6Schema_49remove_metadata},
  {"to_string", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_6Schema_52to_string, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_6Schema_51to_string},
  {"_export_to_c", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_6Schema_54_export_to_c, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_6Schema_53_export_to_c},
  {"_import_from_c", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_6Schema_56_import_from_c, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_6Schema_55_import_from_c},
  {"__arrow_c_schema__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_6Schema_62__arrow_c_schema__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_6Schema_61__arrow_c_schema__},
  {"_import_from_c_capsule", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_6Schema_64_import_from_c_capsule, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_6Schema_63_import_from_c_capsule},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_7pyarrow_3lib_Schema[] = {
  {"pandas_metadata", __pyx_getprop_7pyarrow_3lib_6Schema_pandas_metadata, 0, PyDoc_STR("\n        Return deserialized-from-JSON pandas metadata field (if it exists)\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> import pandas as pd\n        >>> df = pd.DataFrame({'n_legs': [2, 4, 5, 100],\n        ...                    'animals': [\"Flamingo\", \"Horse\", \"Brittle stars\", \"Centipede\"]})\n        >>> schema = pa.Table.from_pandas(df).schema\n\n        Select pandas metadata field from Arrow Schema:\n\n        >>> schema.pandas_metadata\n        {'index_columns': [{'kind': 'range', 'name': None, 'start': 0, 'stop': 4, 'step': 1}], ...\n        "), 0},
    {"names", __pyx_getprop_7pyarrow_3lib_6Schema_names, 0, PyDoc_STR("\n        The schema's field names.\n\n        Returns\n        -------\n        list of str\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> schema = pa.schema([\n        ...     pa.field('n_legs', pa.int64()),\n        ...     pa.field('animals', pa.string())])\n\n        Get the names of the schema's fields:\n\n        >>> schema.names\n        ['n_legs', 'animals']\n        "), 0},
    {"types", __pyx_getprop_7pyarrow_3lib_6Schema_types, 0, PyDoc_STR("\n        The schema's field types.\n\n        Returns\n        -------\n        list of DataType\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> schema = pa.schema([\n        ...     pa.field('n_legs', pa.int64()),\n        ...     pa.field('animals', pa.string())])\n\n        Get the types of the schema's fields:\n\n        >>> schema.types\n        [DataType(int64), DataType(string)]\n        "), 0},
    {"metadata", __pyx_getprop_7pyarrow_3lib_6Schema_metadata, 0, PyDoc_STR("\n        The schema's metadata (if any is set).\n\n        Returns\n        -------\n        metadata: dict or None\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> schema = pa.schema([\n        ...     pa.field('n_legs', pa.int64()),\n        ...     pa.field('animals', pa.string())],\n        ...     metadata={\"n_legs\": \"Number of legs per animal\"})\n\n        Get the metadata of the schema's fields:\n\n        >>> schema.metadata\n        {b'n_legs': b'Number of legs per animal'}\n        "), 0},
    {0, 0, 0, 0, 0}
  };
  #if CYTHON_USE_TYPE_SPECS
  static PyType_Slot __pyx_type_7pyarrow_3lib_Schema_slots[] = {
    {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_Schema},
    {Py_tp_repr, (void *)__pyx_pw_7pyarrow_3lib_6Schema_60__repr__},
    {Py_sq_length, (void *)__pyx_pw_7pyarrow_3lib_6Schema_5__len__},
    {Py_sq_item, (void *)__pyx_sq_item_7pyarrow_3lib_Schema},
    {Py_mp_length, (void *)__pyx_pw_7pyarrow_3lib_6Schema_5__len__},
    {Py_mp_subscript, (void *)__pyx_pw_7pyarrow_3lib_6Schema_7__getitem__},
    {Py_tp_hash, (void *)__pyx_pw_7pyarrow_3lib_6Schema_14__hash__},
    {Py_tp_str, (void *)__pyx_pw_7pyarrow_3lib_6Schema_58__str__},
    {Py_tp_doc, (void *)PyDoc_STR("Schema()\n\nA named collection of types a.k.a schema. A schema defines the\ncolumn names and types in a record batch or table data structure.\nThey also contain metadata about the columns. For example, schemas\nconverted from Pandas contain metadata about their original Pandas\ntypes so they can be converted back to the same types.\n\nWarnings\n--------\nDo not call this class's constructor directly. Instead use\n:func:`pyarrow.schema` factory function which makes a new Arrow\nSchema object.\n\nExamples\n--------\nCreate a new Arrow Schema object:\n\n>>> import pyarrow as pa\n>>> pa.schema([\n...     ('some_int', pa.int32()),\n...     ('some_string', pa.string())\n... ])\nsome_int: int32\nsome_string: string\n\nCreate Arrow Schema with metadata:\n\n>>> pa.schema([\n...     pa.field('n_legs', pa.int64()),\n...     pa.field('animals', pa.string())],\n...     metadata={\"n_legs\": \"Number of legs per animal\"})\nn_legs: int64\nanimals: string\n-- schema metadata --\nn_legs: 'Number of legs per animal'")},
    {Py_tp_richcompare, (void *)__pyx_tp_richcompare_7pyarrow_3lib_Schema},
    {Py_tp_iter, (void *)__pyx_pw_7pyarrow_3lib_6Schema_9__iter__},
    {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_Schema},
    {Py_tp_getset, (void *)__pyx_getsets_7pyarrow_3lib_Schema},
    {Py_tp_init, (void *)__pyx_pw_7pyarrow_3lib_6Schema_3__init__},
    {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_Schema},
    {0, 0},
  };
  static PyType_Spec __pyx_type_7pyarrow_3lib_Schema_spec = {
    "pyarrow.lib.Schema",
    sizeof(struct __pyx_obj_7pyarrow_3lib_Schema),
    0,
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
    __pyx_type_7pyarrow_3lib_Schema_slots,
  };
  #else

  static PySequenceMethods __pyx_tp_as_sequence_Schema = {
    __pyx_pw_7pyarrow_3lib_6Schema_5__len__, /*sq_length*/
    0, /*sq_concat*/
    0, /*sq_repeat*/
    __pyx_sq_item_7pyarrow_3lib_Schema, /*sq_item*/
    0, /*sq_slice*/
    0, /*sq_ass_item*/
    0, /*sq_ass_slice*/
    0, /*sq_contains*/
    0, /*sq_inplace_concat*/
    0, /*sq_inplace_repeat*/
  };

  static PyMappingMethods __pyx_tp_as_mapping_Schema = {
    __pyx_pw_7pyarrow_3lib_6Schema_5__len__, /*mp_length*/
    __pyx_pw_7pyarrow_3lib_6Schema_7__getitem__, /*mp_subscript*/
    0, /*mp_ass_subscript*/
  };

  static PyTypeObject __pyx_type_7pyarrow_3lib_Schema = {
    PyVarObject_HEAD_INIT(0, 0)
    "pyarrow.lib.""Schema", /*tp_name*/
    sizeof(struct __pyx_obj_7pyarrow_3lib_Schema), /*tp_basicsize*/
    0, /*tp_itemsize*/
    __pyx_tp_dealloc_7pyarrow_3lib_Schema, /*tp_dealloc*/
    0, /*tp_vectorcall_offset*/
    0, /*tp_getattr*/
    0, /*tp_setattr*/
    0, /*tp_as_async*/
    __pyx_pw_7pyarrow_3lib_6Schema_60__repr__, /*tp_repr*/
    0, /*tp_as_number*/
    &__pyx_tp_as_sequence_Schema, /*tp_as_sequence*/
    &__pyx_tp_as_mapping_Schema, /*tp_as_mapping*/
    __pyx_pw_7pyarrow_3lib_6Schema_14__hash__, /*tp_hash*/
    0, /*tp_call*/
    __pyx_pw_7pyarrow_3lib_6Schema_58__str__, /*tp_str*/
    0, /*tp_getattro*/
    0, /*tp_setattro*/
    0, /*tp_as_buffer*/
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
    PyDoc_STR("Schema()\n\nA named collection of types a.k.a schema. A schema defines the\ncolumn names and types in a record batch or table data structure.\nThey also contain metadata about the columns. For example, schemas\nconverted from Pandas contain metadata about their original Pandas\ntypes so they can be converted back to the same types.\n\nWarnings\n--------\nDo not call this class's constructor directly. Instead use\n:func:`pyarrow.schema` factory function which makes a new Arrow\nSchema object.\n\nExamples\n--------\nCreate a new Arrow Schema object:\n\n>>> import pyarrow as pa\n>>> pa.schema([\n...     ('some_int', pa.int32()),\n...     ('some_string', pa.string())\n... ])\nsome_int: int32\nsome_string: string\n\nCreate Arrow Schema with metadata:\n\n>>> pa.schema([\n...     pa.field('n_legs', pa.int64()),\n...     pa.field('animals', pa.string())],\n...     metadata={\"n_legs\": \"Number of legs per animal\"})\nn_legs: int64\nanimals: string\n-- schema metadata --\nn_legs: 'Number of legs per animal'"), /*tp_doc*/
    0, /*tp_traverse*/
    0, /*tp_clear*/
    __pyx_tp_richcompare_7pyarrow_3lib_Schema, /*tp_richcompare*/
    0, /*tp_weaklistoffset*/
    __pyx_pw_7pyarrow_3lib_6Schema_9__iter__, /*tp_iter*/
    0, /*tp_iternext*/
    __pyx_methods_7pyarrow_3lib_Schema, /*tp_methods*/
    0, /*tp_members*/
    __pyx_getsets_7pyarrow_3lib_Schema, /*tp_getset*/
    0, /*tp_base*/
    0, /*tp_dict*/
    0, /*tp_descr_get*/
    0, /*tp_descr_set*/
    #if !CYTHON_USE_TYPE_SPECS
    0, /*tp_dictoffset*/
    #endif
    __pyx_pw_7pyarrow_3lib_6Schema_3__init__, /*tp_init*/
    0, /*tp_alloc*/
    __pyx_tp_new_7pyarrow_3lib_Schema, /*tp_new*/
    0, /*tp_free*/
    0, /*tp_is_gc*/
    0, /*tp_bases*/
    0, /*tp_mro*/
    0, /*tp_cache*/
    0, /*tp_subclasses*/
    0, /*tp_weaklist*/
    0, /*tp_del*/
    0, /*tp_version_tag*/
    #if CYTHON_USE_TP_FINALIZE
    0, /*tp_finalize*/
    #else
    NULL, /*tp_finalize*/
    #endif
    #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
    0, /*tp_vectorcall*/
    #endif
    #if __PYX_NEED_TP_PRINT_SLOT == 1
    0, /*tp_print*/
    #endif
    #if PY_VERSION_HEX >= 0x030C0000
    0, /*tp_watched*/
    #endif
    #if PY_VERSION_HEX >= 0x030d00A4
    0, /*tp_versions_used*/
    #endif
    #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
    0, /*tp_pypy_flags*/
    #endif
  };
  #endif
  static struct __pyx_vtabstruct_7pyarrow_3lib_Scalar __pyx_vtable_7pyarrow_3lib_Scalar;

  static PyObject *__pyx_tp_new_7pyarrow_3lib_Scalar(PyTypeObject *t, PyObject *a, PyObject *k) {
    struct __pyx_obj_7pyarrow_3lib_Scalar *p;
    PyObject *o = __pyx_tp_new_7pyarrow_3lib__Weakrefable(t, a, k);
    if (unlikely(!o)) return 0;
    p = ((struct __pyx_obj_7pyarrow_3lib_Scalar *)o);
    p->__pyx_vtab = __pyx_vtabptr_7pyarrow_3lib_Scalar;
    __Pyx_default_placement_construct(&(p->wrapped));
    return o;
  }

  static void __pyx_tp_dealloc_7pyarrow_3lib_Scalar(PyObject *o) {
    struct __pyx_obj_7pyarrow_3lib_Scalar *p = (struct __pyx_obj_7pyarrow_3lib_Scalar *)o;
    #if CYTHON_USE_TP_FINALIZE
    if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) {
      if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_7pyarrow_3lib_Scalar) {
        if (PyObject_CallFinalizerFromDealloc(o)) return;
      }
    }
    #endif
    __Pyx_call_destructor(p->wrapped);
    __pyx_tp_dealloc_7pyarrow_3lib__Weakrefable(o);
  }

  static PyObject *__pyx_tp_richcompare_7pyarrow_3lib_Scalar(PyObject *o1, PyObject *o2, int op) {
    switch (op) {
      case Py_EQ: {
        return __pyx_pw_7pyarrow_3lib_6Scalar_13__eq__(o1, o2);
      }
      case Py_NE: {
        PyObject *ret;
        ret = __pyx_pw_7pyarrow_3lib_6Scalar_13__eq__(o1, o2);
        if (likely(ret && ret != Py_NotImplemented)) {
          int b = __Pyx_PyObject_IsTrue(ret);
          Py_DECREF(ret);
          if (unlikely(b < 0)) return NULL;
          ret = (b) ? Py_False : Py_True;
          Py_INCREF(ret);
        }
        return ret;
      }
      default: {
        return __Pyx_NewRef(Py_NotImplemented);
      }
    }
  }

  static PyObject *__pyx_getprop_7pyarrow_3lib_6Scalar_type(PyObject *o, CYTHON_UNUSED void *x) {
    return __pyx_pw_7pyarrow_3lib_6Scalar_4type_1__get__(o);
  }

  static PyObject *__pyx_getprop_7pyarrow_3lib_6Scalar_is_valid(PyObject *o, CYTHON_UNUSED void *x) {
    return __pyx_pw_7pyarrow_3lib_6Scalar_8is_valid_1__get__(o);
  }

  static PyMethodDef __pyx_methods_7pyarrow_3lib_Scalar[] = {
    {"cast", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_6Scalar_3cast, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_6Scalar_2cast},
    {"validate", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_6Scalar_5validate, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_6Scalar_4validate},
    {"equals", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_6Scalar_11equals, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_6Scalar_10equals},
    {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_6Scalar_17__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_6Scalar_16__reduce__},
    {"as_py", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_6Scalar_19as_py, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_6Scalar_18as_py},
    {0, 0, 0, 0}
  };

  static struct PyGetSetDef __pyx_getsets_7pyarrow_3lib_Scalar[] = {
    {"type", __pyx_getprop_7pyarrow_3lib_6Scalar_type, 0, PyDoc_STR("\n        Data type of the Scalar object.\n        "), 0},
    {"is_valid", __pyx_getprop_7pyarrow_3lib_6Scalar_is_valid, 0, PyDoc_STR("\n        Holds a valid (non-null) value.\n        "), 0},
    {0, 0, 0, 0, 0}
  };
  #if CYTHON_USE_TYPE_SPECS
  static PyType_Slot __pyx_type_7pyarrow_3lib_Scalar_slots[] = {
    {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_Scalar},
    {Py_tp_repr, (void *)__pyx_pw_7pyarrow_3lib_6Scalar_7__repr__},
    {Py_tp_hash, (void *)__pyx_pw_7pyarrow_3lib_6Scalar_15__hash__},
    {Py_tp_str, (void *)__pyx_pw_7pyarrow_3lib_6Scalar_9__str__},
    {Py_tp_doc, (void *)PyDoc_STR("Scalar()\n\nThe base class for scalars.")},
    {Py_tp_richcompare, (void *)__pyx_tp_richcompare_7pyarrow_3lib_Scalar},
    {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_Scalar},
    {Py_tp_getset, (void *)__pyx_getsets_7pyarrow_3lib_Scalar},
    {Py_tp_init, (void *)__pyx_pw_7pyarrow_3lib_6Scalar_1__init__},
    {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_Scalar},
    {0, 0},
  };
  static PyType_Spec __pyx_type_7pyarrow_3lib_Scalar_spec = {
    "pyarrow.lib.Scalar",
    sizeof(struct __pyx_obj_7pyarrow_3lib_Scalar),
    0,
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
    __pyx_type_7pyarrow_3lib_Scalar_slots,
  };
  #else

  static PyTypeObject __pyx_type_7pyarrow_3lib_Scalar = {
    PyVarObject_HEAD_INIT(0, 0)
    "pyarrow.lib.""Scalar", /*tp_name*/
    sizeof(struct __pyx_obj_7pyarrow_3lib_Scalar), /*tp_basicsize*/
    0, /*tp_itemsize*/
    __pyx_tp_dealloc_7pyarrow_3lib_Scalar, /*tp_dealloc*/
    0, /*tp_vectorcall_offset*/
    0, /*tp_getattr*/
    0, /*tp_setattr*/
    0, /*tp_as_async*/
    __pyx_pw_7pyarrow_3lib_6Scalar_7__repr__, /*tp_repr*/
    0, /*tp_as_number*/
    0, /*tp_as_sequence*/
    0, /*tp_as_mapping*/
    __pyx_pw_7pyarrow_3lib_6Scalar_15__hash__, /*tp_hash*/
    0, /*tp_call*/
    __pyx_pw_7pyarrow_3lib_6Scalar_9__str__, /*tp_str*/
    0, /*tp_getattro*/
    0, /*tp_setattro*/
    0, /*tp_as_buffer*/
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
    PyDoc_STR("Scalar()\n\nThe base class for scalars."), /*tp_doc*/
    0, /*tp_traverse*/
    0, /*tp_clear*/
    __pyx_tp_richcompare_7pyarrow_3lib_Scalar, /*tp_richcompare*/
    0, /*tp_weaklistoffset*/
    0, /*tp_iter*/
    0, /*tp_iternext*/
    __pyx_methods_7pyarrow_3lib_Scalar, /*tp_methods*/
    0, /*tp_members*/
    __pyx_getsets_7pyarrow_3lib_Scalar, /*tp_getset*/
    0, /*tp_base*/
    0, /*tp_dict*/
    0, /*tp_descr_get*/
    0, /*tp_descr_set*/
    #if !CYTHON_USE_TYPE_SPECS
    0, /*tp_dictoffset*/
    #endif
    __pyx_pw_7pyarrow_3lib_6Scalar_1__init__, /*tp_init*/
    0, /*tp_alloc*/
    __pyx_tp_new_7pyarrow_3lib_Scalar, /*tp_new*/
    0, /*tp_free*/
    0, /*tp_is_gc*/
    0, /*tp_bases*/
    0, /*tp_mro*/
    0, /*tp_cache*/
    0, /*tp_subclasses*/
    0, /*tp_weaklist*/
    0, /*tp_del*/
    0, /*tp_version_tag*/
    #if CYTHON_USE_TP_FINALIZE
    0, /*tp_finalize*/
    #else
    NULL, /*tp_finalize*/
    #endif
    #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
    0, /*tp_vectorcall*/
    #endif
    #if __PYX_NEED_TP_PRINT_SLOT == 1
    0, /*tp_print*/
    #endif
    #if PY_VERSION_HEX >= 0x030C0000
    0, /*tp_watched*/
    #endif
    #if PY_VERSION_HEX >= 0x030d00A4
    0, /*tp_versions_used*/
    #endif
    #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
    0, /*tp_pypy_flags*/
    #endif
  };
  #endif
  static struct __pyx_vtabstruct_7pyarrow_3lib_ArrayStatistics __pyx_vtable_7pyarrow_3lib_ArrayStatistics;

  static PyObject *__pyx_tp_new_7pyarrow_3lib_ArrayStatistics(PyTypeObject *t, PyObject *a, PyObject *k) {
    struct __pyx_obj_7pyarrow_3lib_ArrayStatistics *p;
    PyObject *o = __pyx_tp_new_7pyarrow_3lib__Weakrefable(t, a, k);
    if (unlikely(!o)) return 0;
    p = ((struct __pyx_obj_7pyarrow_3lib_ArrayStatistics *)o);
    p->__pyx_vtab = __pyx_vtabptr_7pyarrow_3lib_ArrayStatistics;
    __Pyx_default_placement_construct(&(p->sp_statistics));
    return o;
  }

  static void __pyx_tp_dealloc_7pyarrow_3lib_ArrayStatistics(PyObject *o) {
    struct __pyx_obj_7pyarrow_3lib_ArrayStatistics *p = (struct __pyx_obj_7pyarrow_3lib_ArrayStatistics *)o;
    #if CYTHON_USE_TP_FINALIZE
    if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) {
      if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_7pyarrow_3lib_ArrayStatistics) {
        if (PyObject_CallFinalizerFromDealloc(o)) return;
      }
    }
    #endif
    __Pyx_call_destructor(p->sp_statistics);
    __pyx_tp_dealloc_7pyarrow_3lib__Weakrefable(o);
  }

  static PyObject *__pyx_getprop_7pyarrow_3lib_15ArrayStatistics_null_count(PyObject *o, CYTHON_UNUSED void *x) {
    return __pyx_pw_7pyarrow_3lib_15ArrayStatistics_10null_count_1__get__(o);
  }

  static PyObject *__pyx_getprop_7pyarrow_3lib_15ArrayStatistics_is_null_count_exact(PyObject *o, CYTHON_UNUSED void *x) {
    return __pyx_pw_7pyarrow_3lib_15ArrayStatistics_19is_null_count_exact_1__get__(o);
  }

  static PyObject *__pyx_getprop_7pyarrow_3lib_15ArrayStatistics_distinct_count(PyObject *o, CYTHON_UNUSED void *x) {
    return __pyx_pw_7pyarrow_3lib_15ArrayStatistics_14distinct_count_1__get__(o);
  }

  static PyObject *__pyx_getprop_7pyarrow_3lib_15ArrayStatistics_is_distinct_count_exact(PyObject *o, CYTHON_UNUSED void *x) {
    return __pyx_pw_7pyarrow_3lib_15ArrayStatistics_23is_distinct_count_exact_1__get__(o);
  }

  static PyObject *__pyx_getprop_7pyarrow_3lib_15ArrayStatistics_min(PyObject *o, CYTHON_UNUSED void *x) {
    return __pyx_pw_7pyarrow_3lib_15ArrayStatistics_3min_1__get__(o);
  }

  static PyObject *__pyx_getprop_7pyarrow_3lib_15ArrayStatistics_is_min_exact(PyObject *o, CYTHON_UNUSED void *x) {
    return __pyx_pw_7pyarrow_3lib_15ArrayStatistics_12is_min_exact_1__get__(o);
  }

  static PyObject *__pyx_getprop_7pyarrow_3lib_15ArrayStatistics_max(PyObject *o, CYTHON_UNUSED void *x) {
    return __pyx_pw_7pyarrow_3lib_15ArrayStatistics_3max_1__get__(o);
  }

  static PyObject *__pyx_getprop_7pyarrow_3lib_15ArrayStatistics_is_max_exact(PyObject *o, CYTHON_UNUSED void *x) {
    return __pyx_pw_7pyarrow_3lib_15ArrayStatistics_12is_max_exact_1__get__(o);
  }

  static PyMethodDef __pyx_methods_7pyarrow_3lib_ArrayStatistics[] = {
    {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15ArrayStatistics_5__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15ArrayStatistics_4__reduce_cython__},
    {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15ArrayStatistics_7__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15ArrayStatistics_6__setstate_cython__},
    {0, 0, 0, 0}
  };

  static struct PyGetSetDef __pyx_getsets_7pyarrow_3lib_ArrayStatistics[] = {
    {"null_count", __pyx_getprop_7pyarrow_3lib_15ArrayStatistics_null_count, 0, PyDoc_STR("\n        The number of nulls.\n        "), 0},
    {"is_null_count_exact", __pyx_getprop_7pyarrow_3lib_15ArrayStatistics_is_null_count_exact, 0, PyDoc_STR("\n        Whether the number of null values is a valid exact value or not.\n        "), 0},
    {"distinct_count", __pyx_getprop_7pyarrow_3lib_15ArrayStatistics_distinct_count, 0, PyDoc_STR("\n        The number of distinct values.\n        "), 0},
    {"is_distinct_count_exact", __pyx_getprop_7pyarrow_3lib_15ArrayStatistics_is_distinct_count_exact, 0, PyDoc_STR("\n        Whether the number of distinct values is a valid exact value or not.\n        "), 0},
    {"min", __pyx_getprop_7pyarrow_3lib_15ArrayStatistics_min, 0, PyDoc_STR("\n        The minimum value.\n        "), 0},
    {"is_min_exact", __pyx_getprop_7pyarrow_3lib_15ArrayStatistics_is_min_exact, 0, PyDoc_STR("\n        Whether the minimum value is an exact value or not.\n        "), 0},
    {"max", __pyx_getprop_7pyarrow_3lib_15ArrayStatistics_max, 0, PyDoc_STR("\n        The maximum value.\n        "), 0},
    {"is_max_exact", __pyx_getprop_7pyarrow_3lib_15ArrayStatistics_is_max_exact, 0, PyDoc_STR("\n        Whether the maximum value is an exact value or not.\n        "), 0},
    {0, 0, 0, 0, 0}
  };
  #if CYTHON_USE_TYPE_SPECS
  static PyType_Slot __pyx_type_7pyarrow_3lib_ArrayStatistics_slots[] = {
    {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_ArrayStatistics},
    {Py_tp_repr, (void *)__pyx_pw_7pyarrow_3lib_15ArrayStatistics_3__repr__},
    {Py_tp_doc, (void *)PyDoc_STR("ArrayStatistics()\n\nThe class for statistics of an array.")},
    {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_ArrayStatistics},
    {Py_tp_getset, (void *)__pyx_getsets_7pyarrow_3lib_ArrayStatistics},
    {Py_tp_init, (void *)__pyx_pw_7pyarrow_3lib_15ArrayStatistics_1__init__},
    {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_ArrayStatistics},
    {0, 0},
  };
  static PyType_Spec __pyx_type_7pyarrow_3lib_ArrayStatistics_spec = {
    "pyarrow.lib.ArrayStatistics",
    sizeof(struct __pyx_obj_7pyarrow_3lib_ArrayStatistics),
    0,
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
    __pyx_type_7pyarrow_3lib_ArrayStatistics_slots,
  };
  #else

  static PyTypeObject __pyx_type_7pyarrow_3lib_ArrayStatistics = {
    PyVarObject_HEAD_INIT(0, 0)
    "pyarrow.lib.""ArrayStatistics", /*tp_name*/
    sizeof(struct __pyx_obj_7pyarrow_3lib_ArrayStatistics), /*tp_basicsize*/
    0, /*tp_itemsize*/
    __pyx_tp_dealloc_7pyarrow_3lib_ArrayStatistics, /*tp_dealloc*/
    0, /*tp_vectorcall_offset*/
    0, /*tp_getattr*/
    0, /*tp_setattr*/
    0, /*tp_as_async*/
    __pyx_pw_7pyarrow_3lib_15ArrayStatistics_3__repr__, /*tp_repr*/
    0, /*tp_as_number*/
    0, /*tp_as_sequence*/
    0, /*tp_as_mapping*/
    0, /*tp_hash*/
    0, /*tp_call*/
    0, /*tp_str*/
    0, /*tp_getattro*/
    0, /*tp_setattro*/
    0, /*tp_as_buffer*/
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
    PyDoc_STR("ArrayStatistics()\n\nThe class for statistics of an array."), /*tp_doc*/
    0, /*tp_traverse*/
    0, /*tp_clear*/
    0, /*tp_richcompare*/
    0, /*tp_weaklistoffset*/
    0, /*tp_iter*/
    0, /*tp_iternext*/
    __pyx_methods_7pyarrow_3lib_ArrayStatistics, /*tp_methods*/
    0, /*tp_members*/
    __pyx_getsets_7pyarrow_3lib_ArrayStatistics, /*tp_getset*/
    0, /*tp_base*/
    0, /*tp_dict*/
    0, /*tp_descr_get*/
    0, /*tp_descr_set*/
    #if !CYTHON_USE_TYPE_SPECS
    0, /*tp_dictoffset*/
    #endif
    __pyx_pw_7pyarrow_3lib_15ArrayStatistics_1__init__, /*tp_init*/
    0, /*tp_alloc*/
    __pyx_tp_new_7pyarrow_3lib_ArrayStatistics, /*tp_new*/
    0, /*tp_free*/
    0, /*tp_is_gc*/
    0, /*tp_bases*/
    0, /*tp_mro*/
    0, /*tp_cache*/
    0, /*tp_subclasses*/
    0, /*tp_weaklist*/
    0, /*tp_del*/
    0, /*tp_version_tag*/
    #if CYTHON_USE_TP_FINALIZE
    0, /*tp_finalize*/
    #else
    NULL, /*tp_finalize*/
    #endif
    #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
    0, /*tp_vectorcall*/
    #endif
    #if __PYX_NEED_TP_PRINT_SLOT == 1
    0, /*tp_print*/
    #endif
    #if PY_VERSION_HEX >= 0x030C0000
    0, /*tp_watched*/
    #endif
    #if PY_VERSION_HEX >= 0x030d00A4
    0, /*tp_versions_used*/
    #endif
    #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
    0, /*tp_pypy_flags*/
    #endif
  };
  #endif

  static PyMethodDef __pyx_methods_7pyarrow_3lib__PandasConvertible[] = {
    {"to_pandas", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_18_PandasConvertible_1to_pandas, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_18_PandasConvertible_to_pandas},
    {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_18_PandasConvertible_3__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_18_PandasConvertible_2__reduce_cython__},
    {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_18_PandasConvertible_5__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_18_PandasConvertible_4__setstate_cython__},
    {0, 0, 0, 0}
  };
  #if CYTHON_USE_TYPE_SPECS
  static PyType_Slot __pyx_type_7pyarrow_3lib__PandasConvertible_slots[] = {
    {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib__Weakrefable},
    {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib__PandasConvertible},
    {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib__Weakrefable},
    {0, 0},
  };
  static PyType_Spec __pyx_type_7pyarrow_3lib__PandasConvertible_spec = {
    "pyarrow.lib._PandasConvertible",
    sizeof(struct __pyx_obj_7pyarrow_3lib__PandasConvertible),
    0,
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
    __pyx_type_7pyarrow_3lib__PandasConvertible_slots,
  };
  #else

  static PyTypeObject __pyx_type_7pyarrow_3lib__PandasConvertible = {
    PyVarObject_HEAD_INIT(0, 0)
    "pyarrow.lib.""_PandasConvertible", /*tp_name*/
    sizeof(struct __pyx_obj_7pyarrow_3lib__PandasConvertible), /*tp_basicsize*/
    0, /*tp_itemsize*/
    __pyx_tp_dealloc_7pyarrow_3lib__Weakrefable, /*tp_dealloc*/
    0, /*tp_vectorcall_offset*/
    0, /*tp_getattr*/
    0, /*tp_setattr*/
    0, /*tp_as_async*/
    0, /*tp_repr*/
    0, /*tp_as_number*/
    0, /*tp_as_sequence*/
    0, /*tp_as_mapping*/
    0, /*tp_hash*/
    0, /*tp_call*/
    0, /*tp_str*/
    0, /*tp_getattro*/
    0, /*tp_setattro*/
    0, /*tp_as_buffer*/
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
    0, /*tp_doc*/
    0, /*tp_traverse*/
    0, /*tp_clear*/
    0, /*tp_richcompare*/
    0, /*tp_weaklistoffset*/
    0, /*tp_iter*/
    0, /*tp_iternext*/
    __pyx_methods_7pyarrow_3lib__PandasConvertible, /*tp_methods*/
    0, /*tp_members*/
    0, /*tp_getset*/
    0, /*tp_base*/
    0, /*tp_dict*/
    0, /*tp_descr_get*/
    0, /*tp_descr_set*/
    #if !CYTHON_USE_TYPE_SPECS
    0, /*tp_dictoffset*/
    #endif
    0, /*tp_init*/
    0, /*tp_alloc*/
    __pyx_tp_new_7pyarrow_3lib__Weakrefable, /*tp_new*/
    0, /*tp_free*/
    0, /*tp_is_gc*/
    0, /*tp_bases*/
    0, /*tp_mro*/
    0, /*tp_cache*/
    0, /*tp_subclasses*/
    0, /*tp_weaklist*/
    0, /*tp_del*/
    0, /*tp_version_tag*/
    #if CYTHON_USE_TP_FINALIZE
    0, /*tp_finalize*/
    #else
    NULL, /*tp_finalize*/
    #endif
    #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
    0, /*tp_vectorcall*/
    #endif
    #if __PYX_NEED_TP_PRINT_SLOT == 1
    0, /*tp_print*/
    #endif
    #if PY_VERSION_HEX >= 0x030C0000
    0, /*tp_watched*/
    #endif
    #if PY_VERSION_HEX >= 0x030d00A4
    0, /*tp_versions_used*/
    #endif
    #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
    0, /*tp_pypy_flags*/
    #endif
  };
  #endif
  static struct __pyx_vtabstruct_7pyarrow_3lib_Array __pyx_vtable_7pyarrow_3lib_Array;

  static PyObject *__pyx_tp_new_7pyarrow_3lib_Array(PyTypeObject *t, PyObject *a, PyObject *k) {
    struct __pyx_obj_7pyarrow_3lib_Array *p;
    PyObject *o = __pyx_tp_new_7pyarrow_3lib__Weakrefable(t, a, k);
    if (unlikely(!o)) return 0;
    p = ((struct __pyx_obj_7pyarrow_3lib_Array *)o);
    p->__pyx_vtab = __pyx_vtabptr_7pyarrow_3lib_Array;
    __Pyx_default_placement_construct(&(p->sp_array));
    p->type = ((struct __pyx_obj_7pyarrow_3lib_DataType *)Py_None); Py_INCREF(Py_None);
    p->_name = Py_None; Py_INCREF(Py_None);
    return o;
  }

  static void __pyx_tp_dealloc_7pyarrow_3lib_Array(PyObject *o) {
    struct __pyx_obj_7pyarrow_3lib_Array *p = (struct __pyx_obj_7pyarrow_3lib_Array *)o;
    #if CYTHON_USE_TP_FINALIZE
    if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
      if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_7pyarrow_3lib_Array) {
        if (PyObject_CallFinalizerFromDealloc(o)) return;
      }
    }
    #endif
    PyObject_GC_UnTrack(o);
    __Pyx_call_destructor(p->sp_array);
    Py_CLEAR(p->type);
    Py_CLEAR(p->_name);
    __pyx_tp_dealloc_7pyarrow_3lib__Weakrefable(o);
  }

  static int __pyx_tp_traverse_7pyarrow_3lib_Array(PyObject *o, visitproc v, void *a) {
    int e;
    struct __pyx_obj_7pyarrow_3lib_Array *p = (struct __pyx_obj_7pyarrow_3lib_Array *)o;
    #if !CYTHON_USE_MODULE_STATE
    e = 0;
    if (likely(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__PandasConvertible)) {
      traverseproc traverse = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__PandasConvertible, tp_traverse, traverseproc);
      if (traverse) { e = traverse(o, v, a); }
    } else
    #endif
    { e = __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_7pyarrow_3lib_Array); }
    if (e) return e;
    {
      e = __Pyx_call_type_traverse(o, 0, v, a);
      if (e) return e;
    }
    if (p->type) {
      e = (*v)(((PyObject *)p->type), a); if (e) return e;
    }
    if (p->_name) {
      e = (*v)(p->_name, a); if (e) return e;
    }
    return 0;
  }

  static int __pyx_tp_clear_7pyarrow_3lib_Array(PyObject *o) {
    PyObject* tmp;
    struct __pyx_obj_7pyarrow_3lib_Array *p = (struct __pyx_obj_7pyarrow_3lib_Array *)o;
    #if !CYTHON_USE_MODULE_STATE
    if (likely(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__PandasConvertible)) {
      inquiry clear = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__PandasConvertible, tp_clear, inquiry);
      if (clear) clear(o);
    } else
    #endif
    { __Pyx_call_next_tp_clear(o, __pyx_tp_clear_7pyarrow_3lib_Array); }
    tmp = ((PyObject*)p->type);
    p->type = ((struct __pyx_obj_7pyarrow_3lib_DataType *)Py_None); Py_INCREF(Py_None);
    Py_XDECREF(tmp);
    tmp = ((PyObject*)p->_name);
    p->_name = Py_None; Py_INCREF(Py_None);
    Py_XDECREF(tmp);
    return 0;
  }

  static PyObject *__pyx_sq_item_7pyarrow_3lib_Array(PyObject *o, Py_ssize_t i) {
    PyObject *r;
    PyObject *x = PyLong_FromSsize_t(i); if(!x) return 0;
    #if CYTHON_USE_TYPE_SLOTS || (!CYTHON_USE_TYPE_SPECS && __PYX_LIMITED_VERSION_HEX < 0x030A0000)
    r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
    #else
    r = ((binaryfunc)PyType_GetSlot(Py_TYPE(o), Py_mp_subscript))(o, x);
    #endif
    Py_DECREF(x);
    return r;
  }

  static PyObject *__pyx_tp_richcompare_7pyarrow_3lib_Array(PyObject *o1, PyObject *o2, int op) {
    switch (op) {
      case Py_EQ: {
        return __pyx_pw_7pyarrow_3lib_5Array_38__eq__(o1, o2);
      }
      case Py_NE: {
        PyObject *ret;
        ret = __pyx_pw_7pyarrow_3lib_5Array_38__eq__(o1, o2);
        if (likely(ret && ret != Py_NotImplemented)) {
          int b = __Pyx_PyObject_IsTrue(ret);
          Py_DECREF(ret);
          if (unlikely(b < 0)) return NULL;
          ret = (b) ? Py_False : Py_True;
          Py_INCREF(ret);
        }
        return ret;
      }
      default: {
        return __Pyx_NewRef(Py_NotImplemented);
      }
    }
  }

  static PyObject *__pyx_getprop_7pyarrow_3lib_5Array_null_count(PyObject *o, CYTHON_UNUSED void *x) {
    return __pyx_pw_7pyarrow_3lib_5Array_10null_count_1__get__(o);
  }

  static PyObject *__pyx_getprop_7pyarrow_3lib_5Array_nbytes(PyObject *o, CYTHON_UNUSED void *x) {
    return __pyx_pw_7pyarrow_3lib_5Array_6nbytes_1__get__(o);
  }

  static PyObject *__pyx_getprop_7pyarrow_3lib_5Array_offset(PyObject *o, CYTHON_UNUSED void *x) {
    return __pyx_pw_7pyarrow_3lib_5Array_6offset_1__get__(o);
  }

  static PyObject *__pyx_getprop_7pyarrow_3lib_5Array_device_type(PyObject *o, CYTHON_UNUSED void *x) {
    return __pyx_pw_7pyarrow_3lib_5Array_11device_type_1__get__(o);
  }

  static PyObject *__pyx_getprop_7pyarrow_3lib_5Array_is_cpu(PyObject *o, CYTHON_UNUSED void *x) {
    return __pyx_pw_7pyarrow_3lib_5Array_6is_cpu_1__get__(o);
  }

  static PyObject *__pyx_getprop_7pyarrow_3lib_5Array_statistics(PyObject *o, CYTHON_UNUSED void *x) {
    return __pyx_pw_7pyarrow_3lib_5Array_10statistics_1__get__(o);
  }

  static PyObject *__pyx_getprop_7pyarrow_3lib_5Array_type(PyObject *o, CYTHON_UNUSED void *x) {
    return __pyx_pw_7pyarrow_3lib_5Array_4type_1__get__(o);
  }

  static PyObject *__pyx_getprop_7pyarrow_3lib_5Array__name(PyObject *o, CYTHON_UNUSED void *x) {
    return __pyx_pw_7pyarrow_3lib_5Array_5_name_1__get__(o);
  }

  static PyMethodDef __pyx_methods_7pyarrow_3lib_Array[] = {
    {"_debug_print", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Array_3_debug_print, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Array_2_debug_print},
    {"diff", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Array_5diff, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Array_4diff},
    {"cast", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Array_7cast, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Array_6cast},
    {"view", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Array_9view, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Array_8view},
    {"sum", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Array_11sum, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Array_10sum},
    {"unique", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Array_13unique, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Array_12unique},
    {"dictionary_encode", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Array_15dictionary_encode, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Array_14dictionary_encode},
    {"value_counts", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Array_17value_counts, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Array_16value_counts},
    {"from_pandas", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Array_19from_pandas, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Array_18from_pandas},
    {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Array_21__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Array_20__reduce__},
    {"from_buffers", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Array_23from_buffers, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Array_22from_buffers},
    {"get_total_buffer_size", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Array_25get_total_buffer_size, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Array_24get_total_buffer_size},
    {"__sizeof__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Array_27__sizeof__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Array_26__sizeof__},
    {"to_string", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Array_34to_string, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Array_33to_string},
    {"equals", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Array_40equals, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Array_39equals},
    {"is_null", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Array_44is_null, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Array_43is_null},
    {"is_nan", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Array_46is_nan, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Array_45is_nan},
    {"is_valid", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Array_48is_valid, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Array_47is_valid},
    {"fill_null", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Array_50fill_null, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Array_49fill_null},
    {"slice", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Array_54slice, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Array_53slice},
    {"take", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Array_56take, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Array_55take},
    {"drop_null", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Array_58drop_null, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Array_57drop_null},
    {"filter", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Array_60filter, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Array_59filter},
    {"index", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Array_62index, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Array_61index},
    {"sort", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Array_64sort, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Array_63sort},
    {"_to_pandas", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Array_66_to_pandas, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Array_65_to_pandas},
    {"__array__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Array_68__array__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Array_67__array__},
    {"to_numpy", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Array_70to_numpy, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Array_69to_numpy},
    {"to_pylist", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Array_72to_pylist, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Array_71to_pylist},
    {"tolist", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Array_74tolist, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Array_73tolist},
    {"validate", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Array_76validate, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Array_75validate},
    {"buffers", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Array_78buffers, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Array_77buffers},
    {"copy_to", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Array_80copy_to, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Array_79copy_to},
    {"_export_to_c", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Array_82_export_to_c, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Array_81_export_to_c},
    {"_import_from_c", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Array_84_import_from_c, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Array_83_import_from_c},
    {"__arrow_c_array__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Array_86__arrow_c_array__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Array_85__arrow_c_array__},
    {"_import_from_c_capsule", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Array_88_import_from_c_capsule, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Array_87_import_from_c_capsule},
    {"_export_to_c_device", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Array_90_export_to_c_device, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Array_89_export_to_c_device},
    {"_import_from_c_device", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Array_92_import_from_c_device, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Array_91_import_from_c_device},
    {"__arrow_c_device_array__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Array_94__arrow_c_device_array__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Array_93__arrow_c_device_array__},
    {"_import_from_c_device_capsule", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Array_96_import_from_c_device_capsule, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Array_95_import_from_c_device_capsule},
    {"__dlpack__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Array_98__dlpack__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Array_97__dlpack__},
    {"__dlpack_device__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Array_100__dlpack_device__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Array_99__dlpack_device__},
    {0, 0, 0, 0}
  };

  static struct PyGetSetDef __pyx_getsets_7pyarrow_3lib_Array[] = {
    {"null_count", __pyx_getprop_7pyarrow_3lib_5Array_null_count, 0, 0, 0},
    {"nbytes", __pyx_getprop_7pyarrow_3lib_5Array_nbytes, 0, PyDoc_STR("\n        Total number of bytes consumed by the elements of the array.\n\n        In other words, the sum of bytes from all buffer\n        ranges referenced.\n\n        Unlike `get_total_buffer_size` this method will account for array\n        offsets.\n\n        If buffers are shared between arrays then the shared\n        portion will be counted multiple times.\n\n        The dictionary of dictionary arrays will always be counted in their\n        entirety even if the array only references a portion of the dictionary.\n        "), 0},
    {"offset", __pyx_getprop_7pyarrow_3lib_5Array_offset, 0, PyDoc_STR("\n        A relative position into another array's data.\n\n        The purpose is to enable zero-copy slicing. This value defaults to zero\n        but must be applied on all operations with the physical storage\n        buffers.\n        "), 0},
    {"device_type", __pyx_getprop_7pyarrow_3lib_5Array_device_type, 0, PyDoc_STR("\n        The device type where the array resides.\n\n        Returns\n        -------\n        DeviceAllocationType\n        "), 0},
    {"is_cpu", __pyx_getprop_7pyarrow_3lib_5Array_is_cpu, 0, PyDoc_STR("\n        Whether the array is CPU-accessible.\n        "), 0},
    {"statistics", __pyx_getprop_7pyarrow_3lib_5Array_statistics, 0, PyDoc_STR("\n        Statistics of the array.\n        "), 0},
    {"type", __pyx_getprop_7pyarrow_3lib_5Array_type, 0, 0, 0},
    {"_name", __pyx_getprop_7pyarrow_3lib_5Array__name, 0, 0, 0},
    {0, 0, 0, 0, 0}
  };
  #if CYTHON_USE_TYPE_SPECS
  static PyType_Slot __pyx_type_7pyarrow_3lib_Array_slots[] = {
    {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_Array},
    {Py_tp_repr, (void *)__pyx_pw_7pyarrow_3lib_5Array_32__repr__},
    {Py_sq_length, (void *)__pyx_pw_7pyarrow_3lib_5Array_42__len__},
    {Py_sq_item, (void *)__pyx_sq_item_7pyarrow_3lib_Array},
    {Py_mp_length, (void *)__pyx_pw_7pyarrow_3lib_5Array_42__len__},
    {Py_mp_subscript, (void *)__pyx_pw_7pyarrow_3lib_5Array_52__getitem__},
    {Py_tp_str, (void *)__pyx_pw_7pyarrow_3lib_5Array_36__str__},
    {Py_tp_doc, (void *)PyDoc_STR("Array()\n\nThe base class for all Arrow arrays.")},
    {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyarrow_3lib_Array},
    {Py_tp_clear, (void *)__pyx_tp_clear_7pyarrow_3lib_Array},
    {Py_tp_richcompare, (void *)__pyx_tp_richcompare_7pyarrow_3lib_Array},
    {Py_tp_iter, (void *)__pyx_pw_7pyarrow_3lib_5Array_29__iter__},
    {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_Array},
    {Py_tp_getset, (void *)__pyx_getsets_7pyarrow_3lib_Array},
    {Py_tp_init, (void *)__pyx_pw_7pyarrow_3lib_5Array_1__init__},
    {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_Array},
    {0, 0},
  };
  static PyType_Spec __pyx_type_7pyarrow_3lib_Array_spec = {
    "pyarrow.lib.Array",
    sizeof(struct __pyx_obj_7pyarrow_3lib_Array),
    0,
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
    __pyx_type_7pyarrow_3lib_Array_slots,
  };
  #else

  static PySequenceMethods __pyx_tp_as_sequence_Array = {
    __pyx_pw_7pyarrow_3lib_5Array_42__len__, /*sq_length*/
    0, /*sq_concat*/
    0, /*sq_repeat*/
    __pyx_sq_item_7pyarrow_3lib_Array, /*sq_item*/
    0, /*sq_slice*/
    0, /*sq_ass_item*/
    0, /*sq_ass_slice*/
    0, /*sq_contains*/
    0, /*sq_inplace_concat*/
    0, /*sq_inplace_repeat*/
  };

  static PyMappingMethods __pyx_tp_as_mapping_Array = {
    __pyx_pw_7pyarrow_3lib_5Array_42__len__, /*mp_length*/
    __pyx_pw_7pyarrow_3lib_5Array_52__getitem__, /*mp_subscript*/
    0, /*mp_ass_subscript*/
  };

  static PyTypeObject __pyx_type_7pyarrow_3lib_Array = {
    PyVarObject_HEAD_INIT(0, 0)
    "pyarrow.lib.""Array", /*tp_name*/
    sizeof(struct __pyx_obj_7pyarrow_3lib_Array), /*tp_basicsize*/
    0, /*tp_itemsize*/
    __pyx_tp_dealloc_7pyarrow_3lib_Array, /*tp_dealloc*/
    0, /*tp_vectorcall_offset*/
    0, /*tp_getattr*/
    0, /*tp_setattr*/
    0, /*tp_as_async*/
    __pyx_pw_7pyarrow_3lib_5Array_32__repr__, /*tp_repr*/
    0, /*tp_as_number*/
    &__pyx_tp_as_sequence_Array, /*tp_as_sequence*/
    &__pyx_tp_as_mapping_Array, /*tp_as_mapping*/
    0, /*tp_hash*/
    0, /*tp_call*/
    __pyx_pw_7pyarrow_3lib_5Array_36__str__, /*tp_str*/
    0, /*tp_getattro*/
    0, /*tp_setattro*/
    0, /*tp_as_buffer*/
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
    PyDoc_STR("Array()\n\nThe base class for all Arrow arrays."), /*tp_doc*/
    __pyx_tp_traverse_7pyarrow_3lib_Array, /*tp_traverse*/
    __pyx_tp_clear_7pyarrow_3lib_Array, /*tp_clear*/
    __pyx_tp_richcompare_7pyarrow_3lib_Array, /*tp_richcompare*/
    0, /*tp_weaklistoffset*/
    __pyx_pw_7pyarrow_3lib_5Array_29__iter__, /*tp_iter*/
    0, /*tp_iternext*/
    __pyx_methods_7pyarrow_3lib_Array, /*tp_methods*/
    0, /*tp_members*/
    __pyx_getsets_7pyarrow_3lib_Array, /*tp_getset*/
    0, /*tp_base*/
    0, /*tp_dict*/
    0, /*tp_descr_get*/
    0, /*tp_descr_set*/
    #if !CYTHON_USE_TYPE_SPECS
    0, /*tp_dictoffset*/
    #endif
    __pyx_pw_7pyarrow_3lib_5Array_1__init__, /*tp_init*/
    0, /*tp_alloc*/
    __pyx_tp_new_7pyarrow_3lib_Array, /*tp_new*/
    0, /*tp_free*/
    0, /*tp_is_gc*/
    0, /*tp_bases*/
    0, /*tp_mro*/
    0, /*tp_cache*/
    0, /*tp_subclasses*/
    0, /*tp_weaklist*/
    0, /*tp_del*/
    0, /*tp_version_tag*/
    #if CYTHON_USE_TP_FINALIZE
    0, /*tp_finalize*/
    #else
    NULL, /*tp_finalize*/
    #endif
    #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
    0, /*tp_vectorcall*/
    #endif
    #if __PYX_NEED_TP_PRINT_SLOT == 1
    0, /*tp_print*/
    #endif
    #if PY_VERSION_HEX >= 0x030C0000
    0, /*tp_watched*/
    #endif
    #if PY_VERSION_HEX >= 0x030d00A4
    0, /*tp_versions_used*/
    #endif
    #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
    0, /*tp_pypy_flags*/
    #endif
  };
  #endif
  static struct __pyx_vtabstruct_7pyarrow_3lib_Tensor __pyx_vtable_7pyarrow_3lib_Tensor;

  static PyObject *__pyx_tp_new_7pyarrow_3lib_Tensor(PyTypeObject *t, PyObject *a, PyObject *k) {
    struct __pyx_obj_7pyarrow_3lib_Tensor *p;
    PyObject *o = __pyx_tp_new_7pyarrow_3lib__Weakrefable(t, a, k);
    if (unlikely(!o)) return 0;
    p = ((struct __pyx_obj_7pyarrow_3lib_Tensor *)o);
    p->__pyx_vtab = __pyx_vtabptr_7pyarrow_3lib_Tensor;
    __Pyx_default_placement_construct(&(p->sp_tensor));
    p->type = ((struct __pyx_obj_7pyarrow_3lib_DataType *)Py_None); Py_INCREF(Py_None);
    p->_ssize_t_shape = ((PyObject*)Py_None); Py_INCREF(Py_None);
    p->_ssize_t_strides = ((PyObject*)Py_None); Py_INCREF(Py_None);
    return o;
  }

  static void __pyx_tp_dealloc_7pyarrow_3lib_Tensor(PyObject *o) {
    struct __pyx_obj_7pyarrow_3lib_Tensor *p = (struct __pyx_obj_7pyarrow_3lib_Tensor *)o;
    #if CYTHON_USE_TP_FINALIZE
    if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
      if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_7pyarrow_3lib_Tensor) {
        if (PyObject_CallFinalizerFromDealloc(o)) return;
      }
    }
    #endif
    PyObject_GC_UnTrack(o);
    __Pyx_call_destructor(p->sp_tensor);
    Py_CLEAR(p->type);
    Py_CLEAR(p->_ssize_t_shape);
    Py_CLEAR(p->_ssize_t_strides);
    __pyx_tp_dealloc_7pyarrow_3lib__Weakrefable(o);
  }

  static int __pyx_tp_traverse_7pyarrow_3lib_Tensor(PyObject *o, visitproc v, void *a) {
    int e;
    struct __pyx_obj_7pyarrow_3lib_Tensor *p = (struct __pyx_obj_7pyarrow_3lib_Tensor *)o;
    #if !CYTHON_USE_MODULE_STATE
    e = 0;
    if (likely(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Weakrefable)) {
      traverseproc traverse = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Weakrefable, tp_traverse, traverseproc);
      if (traverse) { e = traverse(o, v, a); }
    } else
    #endif
    { e = __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_7pyarrow_3lib_Tensor); }
    if (e) return e;
    {
      e = __Pyx_call_type_traverse(o, 0, v, a);
      if (e) return e;
    }
    if (p->type) {
      e = (*v)(((PyObject *)p->type), a); if (e) return e;
    }
    return 0;
  }

  static int __pyx_tp_clear_7pyarrow_3lib_Tensor(PyObject *o) {
    PyObject* tmp;
    struct __pyx_obj_7pyarrow_3lib_Tensor *p = (struct __pyx_obj_7pyarrow_3lib_Tensor *)o;
    #if !CYTHON_USE_MODULE_STATE
    if (likely(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Weakrefable)) {
      inquiry clear = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Weakrefable, tp_clear, inquiry);
      if (clear) clear(o);
    } else
    #endif
    { __Pyx_call_next_tp_clear(o, __pyx_tp_clear_7pyarrow_3lib_Tensor); }
    tmp = ((PyObject*)p->type);
    p->type = ((struct __pyx_obj_7pyarrow_3lib_DataType *)Py_None); Py_INCREF(Py_None);
    Py_XDECREF(tmp);
    return 0;
  }

  static PyObject *__pyx_tp_richcompare_7pyarrow_3lib_Tensor(PyObject *o1, PyObject *o2, int op) {
    switch (op) {
      case Py_EQ: {
        return __pyx_pw_7pyarrow_3lib_6Tensor_13__eq__(o1, o2);
      }
      case Py_NE: {
        PyObject *ret;
        ret = __pyx_pw_7pyarrow_3lib_6Tensor_13__eq__(o1, o2);
        if (likely(ret && ret != Py_NotImplemented)) {
          int b = __Pyx_PyObject_IsTrue(ret);
          Py_DECREF(ret);
          if (unlikely(b < 0)) return NULL;
          ret = (b) ? Py_False : Py_True;
          Py_INCREF(ret);
        }
        return ret;
      }
      default: {
        return __Pyx_NewRef(Py_NotImplemented);
      }
    }
  }

  static PyObject *__pyx_getprop_7pyarrow_3lib_6Tensor_dim_names(PyObject *o, CYTHON_UNUSED void *x) {
    return __pyx_pw_7pyarrow_3lib_6Tensor_9dim_names_1__get__(o);
  }

  static PyObject *__pyx_getprop_7pyarrow_3lib_6Tensor_is_mutable(PyObject *o, CYTHON_UNUSED void *x) {
    return __pyx_pw_7pyarrow_3lib_6Tensor_10is_mutable_1__get__(o);
  }

  static PyObject *__pyx_getprop_7pyarrow_3lib_6Tensor_is_contiguous(PyObject *o, CYTHON_UNUSED void *x) {
    return __pyx_pw_7pyarrow_3lib_6Tensor_13is_contiguous_1__get__(o);
  }

  static PyObject *__pyx_getprop_7pyarrow_3lib_6Tensor_ndim(PyObject *o, CYTHON_UNUSED void *x) {
    return __pyx_pw_7pyarrow_3lib_6Tensor_4ndim_1__get__(o);
  }

  static PyObject *__pyx_getprop_7pyarrow_3lib_6Tensor_size(PyObject *o, CYTHON_UNUSED void *x) {
    return __pyx_pw_7pyarrow_3lib_6Tensor_4size_1__get__(o);
  }

  static PyObject *__pyx_getprop_7pyarrow_3lib_6Tensor_shape(PyObject *o, CYTHON_UNUSED void *x) {
    return __pyx_pw_7pyarrow_3lib_6Tensor_5shape_1__get__(o);
  }

  static PyObject *__pyx_getprop_7pyarrow_3lib_6Tensor_strides(PyObject *o, CYTHON_UNUSED void *x) {
    return __pyx_pw_7pyarrow_3lib_6Tensor_7strides_1__get__(o);
  }

  static PyObject *__pyx_getprop_7pyarrow_3lib_6Tensor_type(PyObject *o, CYTHON_UNUSED void *x) {
    return __pyx_pw_7pyarrow_3lib_6Tensor_4type_1__get__(o);
  }

  static PyObject *__pyx_getprop_7pyarrow_3lib_6Tensor__ssize_t_shape(PyObject *o, CYTHON_UNUSED void *x) {
    return __pyx_pw_7pyarrow_3lib_6Tensor_14_ssize_t_shape_1__get__(o);
  }

  static PyObject *__pyx_getprop_7pyarrow_3lib_6Tensor__ssize_t_strides(PyObject *o, CYTHON_UNUSED void *x) {
    return __pyx_pw_7pyarrow_3lib_6Tensor_16_ssize_t_strides_1__get__(o);
  }

  static PyMethodDef __pyx_methods_7pyarrow_3lib_Tensor[] = {
    {"_make_shape_or_strides_buffer", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_6Tensor_3_make_shape_or_strides_buffer, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_6Tensor_2_make_shape_or_strides_buffer},
    {"from_numpy", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_6Tensor_7from_numpy, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_6Tensor_6from_numpy},
    {"to_numpy", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_6Tensor_9to_numpy, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_6Tensor_8to_numpy},
    {"equals", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_6Tensor_11equals, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_6Tensor_10equals},
    {"dim_name", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_6Tensor_15dim_name, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_6Tensor_14dim_name},
    {"__dlpack__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_6Tensor_19__dlpack__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_6Tensor_18__dlpack__},
    {"__dlpack_device__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_6Tensor_21__dlpack_device__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_6Tensor_20__dlpack_device__},
    {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_6Tensor_23__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_6Tensor_22__reduce_cython__},
    {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_6Tensor_25__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_6Tensor_24__setstate_cython__},
    {0, 0, 0, 0}
  };

  static struct PyGetSetDef __pyx_getsets_7pyarrow_3lib_Tensor[] = {
    {"dim_names", __pyx_getprop_7pyarrow_3lib_6Tensor_dim_names, 0, PyDoc_STR("\n        Names of this tensor dimensions.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> import numpy as np\n        >>> x = np.array([[2, 2, 4], [4, 5, 100]], np.int32)\n        >>> tensor = pa.Tensor.from_numpy(x, dim_names=[\"dim1\",\"dim2\"])\n        >>> tensor.dim_names\n        ['dim1', 'dim2']\n        "), 0},
    {"is_mutable", __pyx_getprop_7pyarrow_3lib_6Tensor_is_mutable, 0, PyDoc_STR("\n        Is this tensor mutable or immutable.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> import numpy as np\n        >>> x = np.array([[2, 2, 4], [4, 5, 100]], np.int32)\n        >>> tensor = pa.Tensor.from_numpy(x, dim_names=[\"dim1\",\"dim2\"])\n        >>> tensor.is_mutable\n        True\n        "), 0},
    {"is_contiguous", __pyx_getprop_7pyarrow_3lib_6Tensor_is_contiguous, 0, PyDoc_STR("\n        Is this tensor contiguous in memory.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> import numpy as np\n        >>> x = np.array([[2, 2, 4], [4, 5, 100]], np.int32)\n        >>> tensor = pa.Tensor.from_numpy(x, dim_names=[\"dim1\",\"dim2\"])\n        >>> tensor.is_contiguous\n        True\n        "), 0},
    {"ndim", __pyx_getprop_7pyarrow_3lib_6Tensor_ndim, 0, PyDoc_STR("\n        The dimension (n) of this tensor.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> import numpy as np\n        >>> x = np.array([[2, 2, 4], [4, 5, 100]], np.int32)\n        >>> tensor = pa.Tensor.from_numpy(x, dim_names=[\"dim1\",\"dim2\"])\n        >>> tensor.ndim\n        2\n        "), 0},
    {"size", __pyx_getprop_7pyarrow_3lib_6Tensor_size, 0, PyDoc_STR("\n        The size of this tensor.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> import numpy as np\n        >>> x = np.array([[2, 2, 4], [4, 5, 100]], np.int32)\n        >>> tensor = pa.Tensor.from_numpy(x, dim_names=[\"dim1\",\"dim2\"])\n        >>> tensor.size\n        6\n        "), 0},
    {"shape", __pyx_getprop_7pyarrow_3lib_6Tensor_shape, 0, PyDoc_STR("\n        The shape of this tensor.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> import numpy as np\n        >>> x = np.array([[2, 2, 4], [4, 5, 100]], np.int32)\n        >>> tensor = pa.Tensor.from_numpy(x, dim_names=[\"dim1\",\"dim2\"])\n        >>> tensor.shape\n        (2, 3)\n        "), 0},
    {"strides", __pyx_getprop_7pyarrow_3lib_6Tensor_strides, 0, PyDoc_STR("\n        Strides of this tensor.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> import numpy as np\n        >>> x = np.array([[2, 2, 4], [4, 5, 100]], np.int32)\n        >>> tensor = pa.Tensor.from_numpy(x, dim_names=[\"dim1\",\"dim2\"])\n        >>> tensor.strides\n        (12, 4)\n        "), 0},
    {"type", __pyx_getprop_7pyarrow_3lib_6Tensor_type, 0, 0, 0},
    {"_ssize_t_shape", __pyx_getprop_7pyarrow_3lib_6Tensor__ssize_t_shape, 0, 0, 0},
    {"_ssize_t_strides", __pyx_getprop_7pyarrow_3lib_6Tensor__ssize_t_strides, 0, 0, 0},
    {0, 0, 0, 0, 0}
  };
  #if CYTHON_USE_TYPE_SPECS
  #if !CYTHON_COMPILING_IN_LIMITED_API

  static PyBufferProcs __pyx_tp_as_buffer_Tensor = {
    __pyx_pw_7pyarrow_3lib_6Tensor_17__getbuffer__, /*bf_getbuffer*/
    0, /*bf_releasebuffer*/
  };
  #endif
  static PyType_Slot __pyx_type_7pyarrow_3lib_Tensor_slots[] = {
    {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_Tensor},
    {Py_tp_repr, (void *)__pyx_pw_7pyarrow_3lib_6Tensor_5__repr__},
    #if defined(Py_bf_getbuffer)
    {Py_bf_getbuffer, (void *)__pyx_pw_7pyarrow_3lib_6Tensor_17__getbuffer__},
    #endif
    {Py_tp_doc, (void *)PyDoc_STR("Tensor()\n\nA n-dimensional array a.k.a Tensor.\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> import numpy as np\n>>> x = np.array([[2, 2, 4], [4, 5, 100]], np.int32)\n>>> pa.Tensor.from_numpy(x, dim_names=[\"dim1\",\"dim2\"])\n<pyarrow.Tensor>\ntype: int32\nshape: (2, 3)\nstrides: (12, 4)")},
    {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyarrow_3lib_Tensor},
    {Py_tp_clear, (void *)__pyx_tp_clear_7pyarrow_3lib_Tensor},
    {Py_tp_richcompare, (void *)__pyx_tp_richcompare_7pyarrow_3lib_Tensor},
    {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_Tensor},
    {Py_tp_getset, (void *)__pyx_getsets_7pyarrow_3lib_Tensor},
    {Py_tp_init, (void *)__pyx_pw_7pyarrow_3lib_6Tensor_1__init__},
    {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_Tensor},
    {0, 0},
  };
  static PyType_Spec __pyx_type_7pyarrow_3lib_Tensor_spec = {
    "pyarrow.lib.Tensor",
    sizeof(struct __pyx_obj_7pyarrow_3lib_Tensor),
    0,
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
    __pyx_type_7pyarrow_3lib_Tensor_slots,
  };
  #else

  static PyBufferProcs __pyx_tp_as_buffer_Tensor = {
    __pyx_pw_7pyarrow_3lib_6Tensor_17__getbuffer__, /*bf_getbuffer*/
    0, /*bf_releasebuffer*/
  };

  static PyTypeObject __pyx_type_7pyarrow_3lib_Tensor = {
    PyVarObject_HEAD_INIT(0, 0)
    "pyarrow.lib.""Tensor", /*tp_name*/
    sizeof(struct __pyx_obj_7pyarrow_3lib_Tensor), /*tp_basicsize*/
    0, /*tp_itemsize*/
    __pyx_tp_dealloc_7pyarrow_3lib_Tensor, /*tp_dealloc*/
    0, /*tp_vectorcall_offset*/
    0, /*tp_getattr*/
    0, /*tp_setattr*/
    0, /*tp_as_async*/
    __pyx_pw_7pyarrow_3lib_6Tensor_5__repr__, /*tp_repr*/
    0, /*tp_as_number*/
    0, /*tp_as_sequence*/
    0, /*tp_as_mapping*/
    0, /*tp_hash*/
    0, /*tp_call*/
    0, /*tp_str*/
    0, /*tp_getattro*/
    0, /*tp_setattro*/
    &__pyx_tp_as_buffer_Tensor, /*tp_as_buffer*/
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
    PyDoc_STR("Tensor()\n\nA n-dimensional array a.k.a Tensor.\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> import numpy as np\n>>> x = np.array([[2, 2, 4], [4, 5, 100]], np.int32)\n>>> pa.Tensor.from_numpy(x, dim_names=[\"dim1\",\"dim2\"])\n<pyarrow.Tensor>\ntype: int32\nshape: (2, 3)\nstrides: (12, 4)"), /*tp_doc*/
    __pyx_tp_traverse_7pyarrow_3lib_Tensor, /*tp_traverse*/
    __pyx_tp_clear_7pyarrow_3lib_Tensor, /*tp_clear*/
    __pyx_tp_richcompare_7pyarrow_3lib_Tensor, /*tp_richcompare*/
    0, /*tp_weaklistoffset*/
    0, /*tp_iter*/
    0, /*tp_iternext*/
    __pyx_methods_7pyarrow_3lib_Tensor, /*tp_methods*/
    0, /*tp_members*/
    __pyx_getsets_7pyarrow_3lib_Tensor, /*tp_getset*/
    0, /*tp_base*/
    0, /*tp_dict*/
    0, /*tp_descr_get*/
    0, /*tp_descr_set*/
    #if !CYTHON_USE_TYPE_SPECS
    0, /*tp_dictoffset*/
    #endif
    __pyx_pw_7pyarrow_3lib_6Tensor_1__init__, /*tp_init*/
    0, /*tp_alloc*/
    __pyx_tp_new_7pyarrow_3lib_Tensor, /*tp_new*/
    0, /*tp_free*/
    0, /*tp_is_gc*/
    0, /*tp_bases*/
    0, /*tp_mro*/
    0, /*tp_cache*/
    0, /*tp_subclasses*/
    0, /*tp_weaklist*/
    0, /*tp_del*/
    0, /*tp_version_tag*/
    #if CYTHON_USE_TP_FINALIZE
    0, /*tp_finalize*/
    #else
    NULL, /*tp_finalize*/
    #endif
    #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
    0, /*tp_vectorcall*/
    #endif
    #if __PYX_NEED_TP_PRINT_SLOT == 1
    0, /*tp_print*/
    #endif
    #if PY_VERSION_HEX >= 0x030C0000
    0, /*tp_watched*/
    #endif
    #if PY_VERSION_HEX >= 0x030d00A4
    0, /*tp_versions_used*/
    #endif
    #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
    0, /*tp_pypy_flags*/
    #endif
  };
  #endif
  static struct __pyx_vtabstruct_7pyarrow_3lib_SparseCSRMatrix __pyx_vtable_7pyarrow_3lib_SparseCSRMatrix;

  static PyObject *__pyx_tp_new_7pyarrow_3lib_SparseCSRMatrix(PyTypeObject *t, PyObject *a, PyObject *k) {
    struct __pyx_obj_7pyarrow_3lib_SparseCSRMatrix *p;
    PyObject *o = __pyx_tp_new_7pyarrow_3lib__Weakrefable(t, a, k);
    if (unlikely(!o)) return 0;
    p = ((struct __pyx_obj_7pyarrow_3lib_SparseCSRMatrix *)o);
    p->__pyx_vtab = __pyx_vtabptr_7pyarrow_3lib_SparseCSRMatrix;
    __Pyx_default_placement_construct(&(p->sp_sparse_tensor));
    p->type = ((struct __pyx_obj_7pyarrow_3lib_DataType *)Py_None); Py_INCREF(Py_None);
    return o;
  }

  static void __pyx_tp_dealloc_7pyarrow_3lib_SparseCSRMatrix(PyObject *o) {
    struct __pyx_obj_7pyarrow_3lib_SparseCSRMatrix *p = (struct __pyx_obj_7pyarrow_3lib_SparseCSRMatrix *)o;
    #if CYTHON_USE_TP_FINALIZE
    if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
      if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_7pyarrow_3lib_SparseCSRMatrix) {
        if (PyObject_CallFinalizerFromDealloc(o)) return;
      }
    }
    #endif
    PyObject_GC_UnTrack(o);
    __Pyx_call_destructor(p->sp_sparse_tensor);
    Py_CLEAR(p->type);
    __pyx_tp_dealloc_7pyarrow_3lib__Weakrefable(o);
  }

  static int __pyx_tp_traverse_7pyarrow_3lib_SparseCSRMatrix(PyObject *o, visitproc v, void *a) {
    int e;
    struct __pyx_obj_7pyarrow_3lib_SparseCSRMatrix *p = (struct __pyx_obj_7pyarrow_3lib_SparseCSRMatrix *)o;
    #if !CYTHON_USE_MODULE_STATE
    e = 0;
    if (likely(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Weakrefable)) {
      traverseproc traverse = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Weakrefable, tp_traverse, traverseproc);
      if (traverse) { e = traverse(o, v, a); }
    } else
    #endif
    { e = __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_7pyarrow_3lib_SparseCSRMatrix); }
    if (e) return e;
    {
      e = __Pyx_call_type_traverse(o, 0, v, a);
      if (e) return e;
    }
    if (p->type) {
      e = (*v)(((PyObject *)p->type), a); if (e) return e;
    }
    return 0;
  }

  static int __pyx_tp_clear_7pyarrow_3lib_SparseCSRMatrix(PyObject *o) {
    PyObject* tmp;
    struct __pyx_obj_7pyarrow_3lib_SparseCSRMatrix *p = (struct __pyx_obj_7pyarrow_3lib_SparseCSRMatrix *)o;
    #if !CYTHON_USE_MODULE_STATE
    if (likely(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Weakrefable)) {
      inquiry clear = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Weakrefable, tp_clear, inquiry);
      if (clear) clear(o);
    } else
    #endif
    { __Pyx_call_next_tp_clear(o, __pyx_tp_clear_7pyarrow_3lib_SparseCSRMatrix); }
    tmp = ((PyObject*)p->type);
    p->type = ((struct __pyx_obj_7pyarrow_3lib_DataType *)Py_None); Py_INCREF(Py_None);
    Py_XDECREF(tmp);
    return 0;
  }

  static PyObject *__pyx_tp_richcompare_7pyarrow_3lib_SparseCSRMatrix(PyObject *o1, PyObject *o2, int op) {
    switch (op) {
      case Py_EQ: {
        return __pyx_pw_7pyarrow_3lib_15SparseCSRMatrix_21__eq__(o1, o2);
      }
      case Py_NE: {
        PyObject *ret;
        ret = __pyx_pw_7pyarrow_3lib_15SparseCSRMatrix_21__eq__(o1, o2);
        if (likely(ret && ret != Py_NotImplemented)) {
          int b = __Pyx_PyObject_IsTrue(ret);
          Py_DECREF(ret);
          if (unlikely(b < 0)) return NULL;
          ret = (b) ? Py_False : Py_True;
          Py_INCREF(ret);
        }
        return ret;
      }
      default: {
        return __Pyx_NewRef(Py_NotImplemented);
      }
    }
  }

  static PyObject *__pyx_getprop_7pyarrow_3lib_15SparseCSRMatrix_is_mutable(PyObject *o, CYTHON_UNUSED void *x) {
    return __pyx_pw_7pyarrow_3lib_15SparseCSRMatrix_10is_mutable_1__get__(o);
  }

  static PyObject *__pyx_getprop_7pyarrow_3lib_15SparseCSRMatrix_ndim(PyObject *o, CYTHON_UNUSED void *x) {
    return __pyx_pw_7pyarrow_3lib_15SparseCSRMatrix_4ndim_1__get__(o);
  }

  static PyObject *__pyx_getprop_7pyarrow_3lib_15SparseCSRMatrix_shape(PyObject *o, CYTHON_UNUSED void *x) {
    return __pyx_pw_7pyarrow_3lib_15SparseCSRMatrix_5shape_1__get__(o);
  }

  static PyObject *__pyx_getprop_7pyarrow_3lib_15SparseCSRMatrix_size(PyObject *o, CYTHON_UNUSED void *x) {
    return __pyx_pw_7pyarrow_3lib_15SparseCSRMatrix_4size_1__get__(o);
  }

  static PyObject *__pyx_getprop_7pyarrow_3lib_15SparseCSRMatrix_dim_names(PyObject *o, CYTHON_UNUSED void *x) {
    return __pyx_pw_7pyarrow_3lib_15SparseCSRMatrix_9dim_names_1__get__(o);
  }

  static PyObject *__pyx_getprop_7pyarrow_3lib_15SparseCSRMatrix_non_zero_length(PyObject *o, CYTHON_UNUSED void *x) {
    return __pyx_pw_7pyarrow_3lib_15SparseCSRMatrix_15non_zero_length_1__get__(o);
  }

  static PyObject *__pyx_getprop_7pyarrow_3lib_15SparseCSRMatrix_type(PyObject *o, CYTHON_UNUSED void *x) {
    return __pyx_pw_7pyarrow_3lib_15SparseCSRMatrix_4type_1__get__(o);
  }

  static PyMethodDef __pyx_methods_7pyarrow_3lib_SparseCSRMatrix[] = {
    {"from_dense_numpy", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15SparseCSRMatrix_5from_dense_numpy, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15SparseCSRMatrix_4from_dense_numpy},
    {"from_numpy", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15SparseCSRMatrix_7from_numpy, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15SparseCSRMatrix_6from_numpy},
    {"from_scipy", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15SparseCSRMatrix_9from_scipy, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15SparseCSRMatrix_8from_scipy},
    {"from_tensor", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15SparseCSRMatrix_11from_tensor, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15SparseCSRMatrix_10from_tensor},
    {"to_numpy", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15SparseCSRMatrix_13to_numpy, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15SparseCSRMatrix_12to_numpy},
    {"to_scipy", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15SparseCSRMatrix_15to_scipy, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15SparseCSRMatrix_14to_scipy},
    {"to_tensor", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15SparseCSRMatrix_17to_tensor, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15SparseCSRMatrix_16to_tensor},
    {"equals", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15SparseCSRMatrix_19equals, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15SparseCSRMatrix_18equals},
    {"dim_name", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15SparseCSRMatrix_23dim_name, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15SparseCSRMatrix_22dim_name},
    {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15SparseCSRMatrix_25__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15SparseCSRMatrix_24__reduce_cython__},
    {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15SparseCSRMatrix_27__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15SparseCSRMatrix_26__setstate_cython__},
    {0, 0, 0, 0}
  };

  static struct PyGetSetDef __pyx_getsets_7pyarrow_3lib_SparseCSRMatrix[] = {
    {"is_mutable", __pyx_getprop_7pyarrow_3lib_15SparseCSRMatrix_is_mutable, 0, 0, 0},
    {"ndim", __pyx_getprop_7pyarrow_3lib_15SparseCSRMatrix_ndim, 0, 0, 0},
    {"shape", __pyx_getprop_7pyarrow_3lib_15SparseCSRMatrix_shape, 0, 0, 0},
    {"size", __pyx_getprop_7pyarrow_3lib_15SparseCSRMatrix_size, 0, 0, 0},
    {"dim_names", __pyx_getprop_7pyarrow_3lib_15SparseCSRMatrix_dim_names, 0, 0, 0},
    {"non_zero_length", __pyx_getprop_7pyarrow_3lib_15SparseCSRMatrix_non_zero_length, 0, 0, 0},
    {"type", __pyx_getprop_7pyarrow_3lib_15SparseCSRMatrix_type, 0, 0, 0},
    {0, 0, 0, 0, 0}
  };
  #if CYTHON_USE_TYPE_SPECS
  static PyType_Slot __pyx_type_7pyarrow_3lib_SparseCSRMatrix_slots[] = {
    {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_SparseCSRMatrix},
    {Py_tp_repr, (void *)__pyx_pw_7pyarrow_3lib_15SparseCSRMatrix_3__repr__},
    {Py_tp_doc, (void *)PyDoc_STR("SparseCSRMatrix()\n\nA sparse CSR matrix.")},
    {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyarrow_3lib_SparseCSRMatrix},
    {Py_tp_clear, (void *)__pyx_tp_clear_7pyarrow_3lib_SparseCSRMatrix},
    {Py_tp_richcompare, (void *)__pyx_tp_richcompare_7pyarrow_3lib_SparseCSRMatrix},
    {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_SparseCSRMatrix},
    {Py_tp_getset, (void *)__pyx_getsets_7pyarrow_3lib_SparseCSRMatrix},
    {Py_tp_init, (void *)__pyx_pw_7pyarrow_3lib_15SparseCSRMatrix_1__init__},
    {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_SparseCSRMatrix},
    {0, 0},
  };
  static PyType_Spec __pyx_type_7pyarrow_3lib_SparseCSRMatrix_spec = {
    "pyarrow.lib.SparseCSRMatrix",
    sizeof(struct __pyx_obj_7pyarrow_3lib_SparseCSRMatrix),
    0,
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
    __pyx_type_7pyarrow_3lib_SparseCSRMatrix_slots,
  };
  #else

  static PyTypeObject __pyx_type_7pyarrow_3lib_SparseCSRMatrix = {
    PyVarObject_HEAD_INIT(0, 0)
    "pyarrow.lib.""SparseCSRMatrix", /*tp_name*/
    sizeof(struct __pyx_obj_7pyarrow_3lib_SparseCSRMatrix), /*tp_basicsize*/
    0, /*tp_itemsize*/
    __pyx_tp_dealloc_7pyarrow_3lib_SparseCSRMatrix, /*tp_dealloc*/
    0, /*tp_vectorcall_offset*/
    0, /*tp_getattr*/
    0, /*tp_setattr*/
    0, /*tp_as_async*/
    __pyx_pw_7pyarrow_3lib_15SparseCSRMatrix_3__repr__, /*tp_repr*/
    0, /*tp_as_number*/
    0, /*tp_as_sequence*/
    0, /*tp_as_mapping*/
    0, /*tp_hash*/
    0, /*tp_call*/
    0, /*tp_str*/
    0, /*tp_getattro*/
    0, /*tp_setattro*/
    0, /*tp_as_buffer*/
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
    PyDoc_STR("SparseCSRMatrix()\n\nA sparse CSR matrix."), /*tp_doc*/
    __pyx_tp_traverse_7pyarrow_3lib_SparseCSRMatrix, /*tp_traverse*/
    __pyx_tp_clear_7pyarrow_3lib_SparseCSRMatrix, /*tp_clear*/
    __pyx_tp_richcompare_7pyarrow_3lib_SparseCSRMatrix, /*tp_richcompare*/
    0, /*tp_weaklistoffset*/
    0, /*tp_iter*/
    0, /*tp_iternext*/
    __pyx_methods_7pyarrow_3lib_SparseCSRMatrix, /*tp_methods*/
    0, /*tp_members*/
    __pyx_getsets_7pyarrow_3lib_SparseCSRMatrix, /*tp_getset*/
    0, /*tp_base*/
    0, /*tp_dict*/
    0, /*tp_descr_get*/
    0, /*tp_descr_set*/
    #if !CYTHON_USE_TYPE_SPECS
    0, /*tp_dictoffset*/
    #endif
    __pyx_pw_7pyarrow_3lib_15SparseCSRMatrix_1__init__, /*tp_init*/
    0, /*tp_alloc*/
    __pyx_tp_new_7pyarrow_3lib_SparseCSRMatrix, /*tp_new*/
    0, /*tp_free*/
    0, /*tp_is_gc*/
    0, /*tp_bases*/
    0, /*tp_mro*/
    0, /*tp_cache*/
    0, /*tp_subclasses*/
    0, /*tp_weaklist*/
    0, /*tp_del*/
    0, /*tp_version_tag*/
    #if CYTHON_USE_TP_FINALIZE
    0, /*tp_finalize*/
    #else
    NULL, /*tp_finalize*/
    #endif
    #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
    0, /*tp_vectorcall*/
    #endif
    #if __PYX_NEED_TP_PRINT_SLOT == 1
    0, /*tp_print*/
    #endif
    #if PY_VERSION_HEX >= 0x030C0000
    0, /*tp_watched*/
    #endif
    #if PY_VERSION_HEX >= 0x030d00A4
    0, /*tp_versions_used*/
    #endif
    #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
    0, /*tp_pypy_flags*/
    #endif
  };
  #endif
  static struct __pyx_vtabstruct_7pyarrow_3lib_SparseCSCMatrix __pyx_vtable_7pyarrow_3lib_SparseCSCMatrix;

  static PyObject *__pyx_tp_new_7pyarrow_3lib_SparseCSCMatrix(PyTypeObject *t, PyObject *a, PyObject *k) {
    struct __pyx_obj_7pyarrow_3lib_SparseCSCMatrix *p;
    PyObject *o = __pyx_tp_new_7pyarrow_3lib__Weakrefable(t, a, k);
    if (unlikely(!o)) return 0;
    p = ((struct __pyx_obj_7pyarrow_3lib_SparseCSCMatrix *)o);
    p->__pyx_vtab = __pyx_vtabptr_7pyarrow_3lib_SparseCSCMatrix;
    __Pyx_default_placement_construct(&(p->sp_sparse_tensor));
    p->type = ((struct __pyx_obj_7pyarrow_3lib_DataType *)Py_None); Py_INCREF(Py_None);
    return o;
  }

  static void __pyx_tp_dealloc_7pyarrow_3lib_SparseCSCMatrix(PyObject *o) {
    struct __pyx_obj_7pyarrow_3lib_SparseCSCMatrix *p = (struct __pyx_obj_7pyarrow_3lib_SparseCSCMatrix *)o;
    #if CYTHON_USE_TP_FINALIZE
    if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
      if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_7pyarrow_3lib_SparseCSCMatrix) {
        if (PyObject_CallFinalizerFromDealloc(o)) return;
      }
    }
    #endif
    PyObject_GC_UnTrack(o);
    __Pyx_call_destructor(p->sp_sparse_tensor);
    Py_CLEAR(p->type);
    __pyx_tp_dealloc_7pyarrow_3lib__Weakrefable(o);
  }

  static int __pyx_tp_traverse_7pyarrow_3lib_SparseCSCMatrix(PyObject *o, visitproc v, void *a) {
    int e;
    struct __pyx_obj_7pyarrow_3lib_SparseCSCMatrix *p = (struct __pyx_obj_7pyarrow_3lib_SparseCSCMatrix *)o;
    #if !CYTHON_USE_MODULE_STATE
    e = 0;
    if (likely(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Weakrefable)) {
      traverseproc traverse = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Weakrefable, tp_traverse, traverseproc);
      if (traverse) { e = traverse(o, v, a); }
    } else
    #endif
    { e = __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_7pyarrow_3lib_SparseCSCMatrix); }
    if (e) return e;
    {
      e = __Pyx_call_type_traverse(o, 0, v, a);
      if (e) return e;
    }
    if (p->type) {
      e = (*v)(((PyObject *)p->type), a); if (e) return e;
    }
    return 0;
  }

  static int __pyx_tp_clear_7pyarrow_3lib_SparseCSCMatrix(PyObject *o) {
    PyObject* tmp;
    struct __pyx_obj_7pyarrow_3lib_SparseCSCMatrix *p = (struct __pyx_obj_7pyarrow_3lib_SparseCSCMatrix *)o;
    #if !CYTHON_USE_MODULE_STATE
    if (likely(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Weakrefable)) {
      inquiry clear = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Weakrefable, tp_clear, inquiry);
      if (clear) clear(o);
    } else
    #endif
    { __Pyx_call_next_tp_clear(o, __pyx_tp_clear_7pyarrow_3lib_SparseCSCMatrix); }
    tmp = ((PyObject*)p->type);
    p->type = ((struct __pyx_obj_7pyarrow_3lib_DataType *)Py_None); Py_INCREF(Py_None);
    Py_XDECREF(tmp);
    return 0;
  }

  static PyObject *__pyx_tp_richcompare_7pyarrow_3lib_SparseCSCMatrix(PyObject *o1, PyObject *o2, int op) {
    switch (op) {
      case Py_EQ: {
        return __pyx_pw_7pyarrow_3lib_15SparseCSCMatrix_21__eq__(o1, o2);
      }
      case Py_NE: {
        PyObject *ret;
        ret = __pyx_pw_7pyarrow_3lib_15SparseCSCMatrix_21__eq__(o1, o2);
        if (likely(ret && ret != Py_NotImplemented)) {
          int b = __Pyx_PyObject_IsTrue(ret);
          Py_DECREF(ret);
          if (unlikely(b < 0)) return NULL;
          ret = (b) ? Py_False : Py_True;
          Py_INCREF(ret);
        }
        return ret;
      }
      default: {
        return __Pyx_NewRef(Py_NotImplemented);
      }
    }
  }

  static PyObject *__pyx_getprop_7pyarrow_3lib_15SparseCSCMatrix_is_mutable(PyObject *o, CYTHON_UNUSED void *x) {
    return __pyx_pw_7pyarrow_3lib_15SparseCSCMatrix_10is_mutable_1__get__(o);
  }

  static PyObject *__pyx_getprop_7pyarrow_3lib_15SparseCSCMatrix_ndim(PyObject *o, CYTHON_UNUSED void *x) {
    return __pyx_pw_7pyarrow_3lib_15SparseCSCMatrix_4ndim_1__get__(o);
  }

  static PyObject *__pyx_getprop_7pyarrow_3lib_15SparseCSCMatrix_shape(PyObject *o, CYTHON_UNUSED void *x) {
    return __pyx_pw_7pyarrow_3lib_15SparseCSCMatrix_5shape_1__get__(o);
  }

  static PyObject *__pyx_getprop_7pyarrow_3lib_15SparseCSCMatrix_size(PyObject *o, CYTHON_UNUSED void *x) {
    return __pyx_pw_7pyarrow_3lib_15SparseCSCMatrix_4size_1__get__(o);
  }

  static PyObject *__pyx_getprop_7pyarrow_3lib_15SparseCSCMatrix_dim_names(PyObject *o, CYTHON_UNUSED void *x) {
    return __pyx_pw_7pyarrow_3lib_15SparseCSCMatrix_9dim_names_1__get__(o);
  }

  static PyObject *__pyx_getprop_7pyarrow_3lib_15SparseCSCMatrix_non_zero_length(PyObject *o, CYTHON_UNUSED void *x) {
    return __pyx_pw_7pyarrow_3lib_15SparseCSCMatrix_15non_zero_length_1__get__(o);
  }

  static PyObject *__pyx_getprop_7pyarrow_3lib_15SparseCSCMatrix_type(PyObject *o, CYTHON_UNUSED void *x) {
    return __pyx_pw_7pyarrow_3lib_15SparseCSCMatrix_4type_1__get__(o);
  }

  static PyMethodDef __pyx_methods_7pyarrow_3lib_SparseCSCMatrix[] = {
    {"from_dense_numpy", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15SparseCSCMatrix_5from_dense_numpy, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15SparseCSCMatrix_4from_dense_numpy},
    {"from_numpy", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15SparseCSCMatrix_7from_numpy, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15SparseCSCMatrix_6from_numpy},
    {"from_scipy", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15SparseCSCMatrix_9from_scipy, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15SparseCSCMatrix_8from_scipy},
    {"from_tensor", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15SparseCSCMatrix_11from_tensor, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15SparseCSCMatrix_10from_tensor},
    {"to_numpy", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15SparseCSCMatrix_13to_numpy, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15SparseCSCMatrix_12to_numpy},
    {"to_scipy", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15SparseCSCMatrix_15to_scipy, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15SparseCSCMatrix_14to_scipy},
    {"to_tensor", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15SparseCSCMatrix_17to_tensor, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15SparseCSCMatrix_16to_tensor},
    {"equals", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15SparseCSCMatrix_19equals, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15SparseCSCMatrix_18equals},
    {"dim_name", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15SparseCSCMatrix_23dim_name, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15SparseCSCMatrix_22dim_name},
    {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15SparseCSCMatrix_25__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15SparseCSCMatrix_24__reduce_cython__},
    {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15SparseCSCMatrix_27__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15SparseCSCMatrix_26__setstate_cython__},
    {0, 0, 0, 0}
  };

  static struct PyGetSetDef __pyx_getsets_7pyarrow_3lib_SparseCSCMatrix[] = {
    {"is_mutable", __pyx_getprop_7pyarrow_3lib_15SparseCSCMatrix_is_mutable, 0, 0, 0},
    {"ndim", __pyx_getprop_7pyarrow_3lib_15SparseCSCMatrix_ndim, 0, 0, 0},
    {"shape", __pyx_getprop_7pyarrow_3lib_15SparseCSCMatrix_shape, 0, 0, 0},
    {"size", __pyx_getprop_7pyarrow_3lib_15SparseCSCMatrix_size, 0, 0, 0},
    {"dim_names", __pyx_getprop_7pyarrow_3lib_15SparseCSCMatrix_dim_names, 0, 0, 0},
    {"non_zero_length", __pyx_getprop_7pyarrow_3lib_15SparseCSCMatrix_non_zero_length, 0, 0, 0},
    {"type", __pyx_getprop_7pyarrow_3lib_15SparseCSCMatrix_type, 0, 0, 0},
    {0, 0, 0, 0, 0}
  };
  #if CYTHON_USE_TYPE_SPECS
  static PyType_Slot __pyx_type_7pyarrow_3lib_SparseCSCMatrix_slots[] = {
    {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_SparseCSCMatrix},
    {Py_tp_repr, (void *)__pyx_pw_7pyarrow_3lib_15SparseCSCMatrix_3__repr__},
    {Py_tp_doc, (void *)PyDoc_STR("SparseCSCMatrix()\n\nA sparse CSC matrix.")},
    {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyarrow_3lib_SparseCSCMatrix},
    {Py_tp_clear, (void *)__pyx_tp_clear_7pyarrow_3lib_SparseCSCMatrix},
    {Py_tp_richcompare, (void *)__pyx_tp_richcompare_7pyarrow_3lib_SparseCSCMatrix},
    {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_SparseCSCMatrix},
    {Py_tp_getset, (void *)__pyx_getsets_7pyarrow_3lib_SparseCSCMatrix},
    {Py_tp_init, (void *)__pyx_pw_7pyarrow_3lib_15SparseCSCMatrix_1__init__},
    {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_SparseCSCMatrix},
    {0, 0},
  };
  static PyType_Spec __pyx_type_7pyarrow_3lib_SparseCSCMatrix_spec = {
    "pyarrow.lib.SparseCSCMatrix",
    sizeof(struct __pyx_obj_7pyarrow_3lib_SparseCSCMatrix),
    0,
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
    __pyx_type_7pyarrow_3lib_SparseCSCMatrix_slots,
  };
  #else

  static PyTypeObject __pyx_type_7pyarrow_3lib_SparseCSCMatrix = {
    PyVarObject_HEAD_INIT(0, 0)
    "pyarrow.lib.""SparseCSCMatrix", /*tp_name*/
    sizeof(struct __pyx_obj_7pyarrow_3lib_SparseCSCMatrix), /*tp_basicsize*/
    0, /*tp_itemsize*/
    __pyx_tp_dealloc_7pyarrow_3lib_SparseCSCMatrix, /*tp_dealloc*/
    0, /*tp_vectorcall_offset*/
    0, /*tp_getattr*/
    0, /*tp_setattr*/
    0, /*tp_as_async*/
    __pyx_pw_7pyarrow_3lib_15SparseCSCMatrix_3__repr__, /*tp_repr*/
    0, /*tp_as_number*/
    0, /*tp_as_sequence*/
    0, /*tp_as_mapping*/
    0, /*tp_hash*/
    0, /*tp_call*/
    0, /*tp_str*/
    0, /*tp_getattro*/
    0, /*tp_setattro*/
    0, /*tp_as_buffer*/
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
    PyDoc_STR("SparseCSCMatrix()\n\nA sparse CSC matrix."), /*tp_doc*/
    __pyx_tp_traverse_7pyarrow_3lib_SparseCSCMatrix, /*tp_traverse*/
    __pyx_tp_clear_7pyarrow_3lib_SparseCSCMatrix, /*tp_clear*/
    __pyx_tp_richcompare_7pyarrow_3lib_SparseCSCMatrix, /*tp_richcompare*/
    0, /*tp_weaklistoffset*/
    0, /*tp_iter*/
    0, /*tp_iternext*/
    __pyx_methods_7pyarrow_3lib_SparseCSCMatrix, /*tp_methods*/
    0, /*tp_members*/
    __pyx_getsets_7pyarrow_3lib_SparseCSCMatrix, /*tp_getset*/
    0, /*tp_base*/
    0, /*tp_dict*/
    0, /*tp_descr_get*/
    0, /*tp_descr_set*/
    #if !CYTHON_USE_TYPE_SPECS
    0, /*tp_dictoffset*/
    #endif
    __pyx_pw_7pyarrow_3lib_15SparseCSCMatrix_1__init__, /*tp_init*/
    0, /*tp_alloc*/
    __pyx_tp_new_7pyarrow_3lib_SparseCSCMatrix, /*tp_new*/
    0, /*tp_free*/
    0, /*tp_is_gc*/
    0, /*tp_bases*/
    0, /*tp_mro*/
    0, /*tp_cache*/
    0, /*tp_subclasses*/
    0, /*tp_weaklist*/
    0, /*tp_del*/
    0, /*tp_version_tag*/
    #if CYTHON_USE_TP_FINALIZE
    0, /*tp_finalize*/
    #else
    NULL, /*tp_finalize*/
    #endif
    #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
    0, /*tp_vectorcall*/
    #endif
    #if __PYX_NEED_TP_PRINT_SLOT == 1
    0, /*tp_print*/
    #endif
    #if PY_VERSION_HEX >= 0x030C0000
    0, /*tp_watched*/
    #endif
    #if PY_VERSION_HEX >= 0x030d00A4
    0, /*tp_versions_used*/
    #endif
    #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
    0, /*tp_pypy_flags*/
    #endif
  };
  #endif
  static struct __pyx_vtabstruct_7pyarrow_3lib_SparseCOOTensor __pyx_vtable_7pyarrow_3lib_SparseCOOTensor;

  static PyObject *__pyx_tp_new_7pyarrow_3lib_SparseCOOTensor(PyTypeObject *t, PyObject *a, PyObject *k) {
    struct __pyx_obj_7pyarrow_3lib_SparseCOOTensor *p;
    PyObject *o = __pyx_tp_new_7pyarrow_3lib__Weakrefable(t, a, k);
    if (unlikely(!o)) return 0;
    p = ((struct __pyx_obj_7pyarrow_3lib_SparseCOOTensor *)o);
    p->__pyx_vtab = __pyx_vtabptr_7pyarrow_3lib_SparseCOOTensor;
    __Pyx_default_placement_construct(&(p->sp_sparse_tensor));
    p->type = ((struct __pyx_obj_7pyarrow_3lib_DataType *)Py_None); Py_INCREF(Py_None);
    return o;
  }

  static void __pyx_tp_dealloc_7pyarrow_3lib_SparseCOOTensor(PyObject *o) {
    struct __pyx_obj_7pyarrow_3lib_SparseCOOTensor *p = (struct __pyx_obj_7pyarrow_3lib_SparseCOOTensor *)o;
    #if CYTHON_USE_TP_FINALIZE
    if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
      if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_7pyarrow_3lib_SparseCOOTensor) {
        if (PyObject_CallFinalizerFromDealloc(o)) return;
      }
    }
    #endif
    PyObject_GC_UnTrack(o);
    __Pyx_call_destructor(p->sp_sparse_tensor);
    Py_CLEAR(p->type);
    __pyx_tp_dealloc_7pyarrow_3lib__Weakrefable(o);
  }

  static int __pyx_tp_traverse_7pyarrow_3lib_SparseCOOTensor(PyObject *o, visitproc v, void *a) {
    int e;
    struct __pyx_obj_7pyarrow_3lib_SparseCOOTensor *p = (struct __pyx_obj_7pyarrow_3lib_SparseCOOTensor *)o;
    #if !CYTHON_USE_MODULE_STATE
    e = 0;
    if (likely(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Weakrefable)) {
      traverseproc traverse = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Weakrefable, tp_traverse, traverseproc);
      if (traverse) { e = traverse(o, v, a); }
    } else
    #endif
    { e = __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_7pyarrow_3lib_SparseCOOTensor); }
    if (e) return e;
    {
      e = __Pyx_call_type_traverse(o, 0, v, a);
      if (e) return e;
    }
    if (p->type) {
      e = (*v)(((PyObject *)p->type), a); if (e) return e;
    }
    return 0;
  }

  static int __pyx_tp_clear_7pyarrow_3lib_SparseCOOTensor(PyObject *o) {
    PyObject* tmp;
    struct __pyx_obj_7pyarrow_3lib_SparseCOOTensor *p = (struct __pyx_obj_7pyarrow_3lib_SparseCOOTensor *)o;
    #if !CYTHON_USE_MODULE_STATE
    if (likely(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Weakrefable)) {
      inquiry clear = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Weakrefable, tp_clear, inquiry);
      if (clear) clear(o);
    } else
    #endif
    { __Pyx_call_next_tp_clear(o, __pyx_tp_clear_7pyarrow_3lib_SparseCOOTensor); }
    tmp = ((PyObject*)p->type);
    p->type = ((struct __pyx_obj_7pyarrow_3lib_DataType *)Py_None); Py_INCREF(Py_None);
    Py_XDECREF(tmp);
    return 0;
  }

  static PyObject *__pyx_tp_richcompare_7pyarrow_3lib_SparseCOOTensor(PyObject *o1, PyObject *o2, int op) {
    switch (op) {
      case Py_EQ: {
        return __pyx_pw_7pyarrow_3lib_15SparseCOOTensor_25__eq__(o1, o2);
      }
      case Py_NE: {
        PyObject *ret;
        ret = __pyx_pw_7pyarrow_3lib_15SparseCOOTensor_25__eq__(o1, o2);
        if (likely(ret && ret != Py_NotImplemented)) {
          int b = __Pyx_PyObject_IsTrue(ret);
          Py_DECREF(ret);
          if (unlikely(b < 0)) return NULL;
          ret = (b) ? Py_False : Py_True;
          Py_INCREF(ret);
        }
        return ret;
      }
      default: {
        return __Pyx_NewRef(Py_NotImplemented);
      }
    }
  }

  static PyObject *__pyx_getprop_7pyarrow_3lib_15SparseCOOTensor_is_mutable(PyObject *o, CYTHON_UNUSED void *x) {
    return __pyx_pw_7pyarrow_3lib_15SparseCOOTensor_10is_mutable_1__get__(o);
  }

  static PyObject *__pyx_getprop_7pyarrow_3lib_15SparseCOOTensor_ndim(PyObject *o, CYTHON_UNUSED void *x) {
    return __pyx_pw_7pyarrow_3lib_15SparseCOOTensor_4ndim_1__get__(o);
  }

  static PyObject *__pyx_getprop_7pyarrow_3lib_15SparseCOOTensor_shape(PyObject *o, CYTHON_UNUSED void *x) {
    return __pyx_pw_7pyarrow_3lib_15SparseCOOTensor_5shape_1__get__(o);
  }

  static PyObject *__pyx_getprop_7pyarrow_3lib_15SparseCOOTensor_size(PyObject *o, CYTHON_UNUSED void *x) {
    return __pyx_pw_7pyarrow_3lib_15SparseCOOTensor_4size_1__get__(o);
  }

  static PyObject *__pyx_getprop_7pyarrow_3lib_15SparseCOOTensor_dim_names(PyObject *o, CYTHON_UNUSED void *x) {
    return __pyx_pw_7pyarrow_3lib_15SparseCOOTensor_9dim_names_1__get__(o);
  }

  static PyObject *__pyx_getprop_7pyarrow_3lib_15SparseCOOTensor_non_zero_length(PyObject *o, CYTHON_UNUSED void *x) {
    return __pyx_pw_7pyarrow_3lib_15SparseCOOTensor_15non_zero_length_1__get__(o);
  }

  static PyObject *__pyx_getprop_7pyarrow_3lib_15SparseCOOTensor_has_canonical_format(PyObject *o, CYTHON_UNUSED void *x) {
    return __pyx_pw_7pyarrow_3lib_15SparseCOOTensor_20has_canonical_format_1__get__(o);
  }

  static PyObject *__pyx_getprop_7pyarrow_3lib_15SparseCOOTensor_type(PyObject *o, CYTHON_UNUSED void *x) {
    return __pyx_pw_7pyarrow_3lib_15SparseCOOTensor_4type_1__get__(o);
  }

  static PyMethodDef __pyx_methods_7pyarrow_3lib_SparseCOOTensor[] = {
    {"from_dense_numpy", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15SparseCOOTensor_5from_dense_numpy, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15SparseCOOTensor_4from_dense_numpy},
    {"from_numpy", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15SparseCOOTensor_7from_numpy, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15SparseCOOTensor_6from_numpy},
    {"from_scipy", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15SparseCOOTensor_9from_scipy, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15SparseCOOTensor_8from_scipy},
    {"from_pydata_sparse", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15SparseCOOTensor_11from_pydata_sparse, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15SparseCOOTensor_10from_pydata_sparse},
    {"from_tensor", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15SparseCOOTensor_13from_tensor, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15SparseCOOTensor_12from_tensor},
    {"to_numpy", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15SparseCOOTensor_15to_numpy, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15SparseCOOTensor_14to_numpy},
    {"to_scipy", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15SparseCOOTensor_17to_scipy, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15SparseCOOTensor_16to_scipy},
    {"to_pydata_sparse", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15SparseCOOTensor_19to_pydata_sparse, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15SparseCOOTensor_18to_pydata_sparse},
    {"to_tensor", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15SparseCOOTensor_21to_tensor, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15SparseCOOTensor_20to_tensor},
    {"equals", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15SparseCOOTensor_23equals, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15SparseCOOTensor_22equals},
    {"dim_name", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15SparseCOOTensor_27dim_name, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15SparseCOOTensor_26dim_name},
    {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15SparseCOOTensor_29__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15SparseCOOTensor_28__reduce_cython__},
    {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15SparseCOOTensor_31__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15SparseCOOTensor_30__setstate_cython__},
    {0, 0, 0, 0}
  };

  static struct PyGetSetDef __pyx_getsets_7pyarrow_3lib_SparseCOOTensor[] = {
    {"is_mutable", __pyx_getprop_7pyarrow_3lib_15SparseCOOTensor_is_mutable, 0, 0, 0},
    {"ndim", __pyx_getprop_7pyarrow_3lib_15SparseCOOTensor_ndim, 0, 0, 0},
    {"shape", __pyx_getprop_7pyarrow_3lib_15SparseCOOTensor_shape, 0, 0, 0},
    {"size", __pyx_getprop_7pyarrow_3lib_15SparseCOOTensor_size, 0, 0, 0},
    {"dim_names", __pyx_getprop_7pyarrow_3lib_15SparseCOOTensor_dim_names, 0, 0, 0},
    {"non_zero_length", __pyx_getprop_7pyarrow_3lib_15SparseCOOTensor_non_zero_length, 0, 0, 0},
    {"has_canonical_format", __pyx_getprop_7pyarrow_3lib_15SparseCOOTensor_has_canonical_format, 0, 0, 0},
    {"type", __pyx_getprop_7pyarrow_3lib_15SparseCOOTensor_type, 0, 0, 0},
    {0, 0, 0, 0, 0}
  };
  #if CYTHON_USE_TYPE_SPECS
  static PyType_Slot __pyx_type_7pyarrow_3lib_SparseCOOTensor_slots[] = {
    {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_SparseCOOTensor},
    {Py_tp_repr, (void *)__pyx_pw_7pyarrow_3lib_15SparseCOOTensor_3__repr__},
    {Py_tp_doc, (void *)PyDoc_STR("SparseCOOTensor()\n\nA sparse COO tensor.")},
    {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyarrow_3lib_SparseCOOTensor},
    {Py_tp_clear, (void *)__pyx_tp_clear_7pyarrow_3lib_SparseCOOTensor},
    {Py_tp_richcompare, (void *)__pyx_tp_richcompare_7pyarrow_3lib_SparseCOOTensor},
    {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_SparseCOOTensor},
    {Py_tp_getset, (void *)__pyx_getsets_7pyarrow_3lib_SparseCOOTensor},
    {Py_tp_init, (void *)__pyx_pw_7pyarrow_3lib_15SparseCOOTensor_1__init__},
    {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_SparseCOOTensor},
    {0, 0},
  };
  static PyType_Spec __pyx_type_7pyarrow_3lib_SparseCOOTensor_spec = {
    "pyarrow.lib.SparseCOOTensor",
    sizeof(struct __pyx_obj_7pyarrow_3lib_SparseCOOTensor),
    0,
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
    __pyx_type_7pyarrow_3lib_SparseCOOTensor_slots,
  };
  #else

  static PyTypeObject __pyx_type_7pyarrow_3lib_SparseCOOTensor = {
    PyVarObject_HEAD_INIT(0, 0)
    "pyarrow.lib.""SparseCOOTensor", /*tp_name*/
    sizeof(struct __pyx_obj_7pyarrow_3lib_SparseCOOTensor), /*tp_basicsize*/
    0, /*tp_itemsize*/
    __pyx_tp_dealloc_7pyarrow_3lib_SparseCOOTensor, /*tp_dealloc*/
    0, /*tp_vectorcall_offset*/
    0, /*tp_getattr*/
    0, /*tp_setattr*/
    0, /*tp_as_async*/
    __pyx_pw_7pyarrow_3lib_15SparseCOOTensor_3__repr__, /*tp_repr*/
    0, /*tp_as_number*/
    0, /*tp_as_sequence*/
    0, /*tp_as_mapping*/
    0, /*tp_hash*/
    0, /*tp_call*/
    0, /*tp_str*/
    0, /*tp_getattro*/
    0, /*tp_setattro*/
    0, /*tp_as_buffer*/
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
    PyDoc_STR("SparseCOOTensor()\n\nA sparse COO tensor."), /*tp_doc*/
    __pyx_tp_traverse_7pyarrow_3lib_SparseCOOTensor, /*tp_traverse*/
    __pyx_tp_clear_7pyarrow_3lib_SparseCOOTensor, /*tp_clear*/
    __pyx_tp_richcompare_7pyarrow_3lib_SparseCOOTensor, /*tp_richcompare*/
    0, /*tp_weaklistoffset*/
    0, /*tp_iter*/
    0, /*tp_iternext*/
    __pyx_methods_7pyarrow_3lib_SparseCOOTensor, /*tp_methods*/
    0, /*tp_members*/
    __pyx_getsets_7pyarrow_3lib_SparseCOOTensor, /*tp_getset*/
    0, /*tp_base*/
    0, /*tp_dict*/
    0, /*tp_descr_get*/
    0, /*tp_descr_set*/
    #if !CYTHON_USE_TYPE_SPECS
    0, /*tp_dictoffset*/
    #endif
    __pyx_pw_7pyarrow_3lib_15SparseCOOTensor_1__init__, /*tp_init*/
    0, /*tp_alloc*/
    __pyx_tp_new_7pyarrow_3lib_SparseCOOTensor, /*tp_new*/
    0, /*tp_free*/
    0, /*tp_is_gc*/
    0, /*tp_bases*/
    0, /*tp_mro*/
    0, /*tp_cache*/
    0, /*tp_subclasses*/
    0, /*tp_weaklist*/
    0, /*tp_del*/
    0, /*tp_version_tag*/
    #if CYTHON_USE_TP_FINALIZE
    0, /*tp_finalize*/
    #else
    NULL, /*tp_finalize*/
    #endif
    #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
    0, /*tp_vectorcall*/
    #endif
    #if __PYX_NEED_TP_PRINT_SLOT == 1
    0, /*tp_print*/
    #endif
    #if PY_VERSION_HEX >= 0x030C0000
    0, /*tp_watched*/
    #endif
    #if PY_VERSION_HEX >= 0x030d00A4
    0, /*tp_versions_used*/
    #endif
    #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
    0, /*tp_pypy_flags*/
    #endif
  };
  #endif
  static struct __pyx_vtabstruct_7pyarrow_3lib_SparseCSFTensor __pyx_vtable_7pyarrow_3lib_SparseCSFTensor;

  static PyObject *__pyx_tp_new_7pyarrow_3lib_SparseCSFTensor(PyTypeObject *t, PyObject *a, PyObject *k) {
    struct __pyx_obj_7pyarrow_3lib_SparseCSFTensor *p;
    PyObject *o = __pyx_tp_new_7pyarrow_3lib__Weakrefable(t, a, k);
    if (unlikely(!o)) return 0;
    p = ((struct __pyx_obj_7pyarrow_3lib_SparseCSFTensor *)o);
    p->__pyx_vtab = __pyx_vtabptr_7pyarrow_3lib_SparseCSFTensor;
    __Pyx_default_placement_construct(&(p->sp_sparse_tensor));
    p->type = ((struct __pyx_obj_7pyarrow_3lib_DataType *)Py_None); Py_INCREF(Py_None);
    return o;
  }

  static void __pyx_tp_dealloc_7pyarrow_3lib_SparseCSFTensor(PyObject *o) {
    struct __pyx_obj_7pyarrow_3lib_SparseCSFTensor *p = (struct __pyx_obj_7pyarrow_3lib_SparseCSFTensor *)o;
    #if CYTHON_USE_TP_FINALIZE
    if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
      if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_7pyarrow_3lib_SparseCSFTensor) {
        if (PyObject_CallFinalizerFromDealloc(o)) return;
      }
    }
    #endif
    PyObject_GC_UnTrack(o);
    __Pyx_call_destructor(p->sp_sparse_tensor);
    Py_CLEAR(p->type);
    __pyx_tp_dealloc_7pyarrow_3lib__Weakrefable(o);
  }

  static int __pyx_tp_traverse_7pyarrow_3lib_SparseCSFTensor(PyObject *o, visitproc v, void *a) {
    int e;
    struct __pyx_obj_7pyarrow_3lib_SparseCSFTensor *p = (struct __pyx_obj_7pyarrow_3lib_SparseCSFTensor *)o;
    #if !CYTHON_USE_MODULE_STATE
    e = 0;
    if (likely(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Weakrefable)) {
      traverseproc traverse = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Weakrefable, tp_traverse, traverseproc);
      if (traverse) { e = traverse(o, v, a); }
    } else
    #endif
    { e = __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_7pyarrow_3lib_SparseCSFTensor); }
    if (e) return e;
    {
      e = __Pyx_call_type_traverse(o, 0, v, a);
      if (e) return e;
    }
    if (p->type) {
      e = (*v)(((PyObject *)p->type), a); if (e) return e;
    }
    return 0;
  }

  static int __pyx_tp_clear_7pyarrow_3lib_SparseCSFTensor(PyObject *o) {
    PyObject* tmp;
    struct __pyx_obj_7pyarrow_3lib_SparseCSFTensor *p = (struct __pyx_obj_7pyarrow_3lib_SparseCSFTensor *)o;
    #if !CYTHON_USE_MODULE_STATE
    if (likely(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Weakrefable)) {
      inquiry clear = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Weakrefable, tp_clear, inquiry);
      if (clear) clear(o);
    } else
    #endif
    { __Pyx_call_next_tp_clear(o, __pyx_tp_clear_7pyarrow_3lib_SparseCSFTensor); }
    tmp = ((PyObject*)p->type);
    p->type = ((struct __pyx_obj_7pyarrow_3lib_DataType *)Py_None); Py_INCREF(Py_None);
    Py_XDECREF(tmp);
    return 0;
  }

  static PyObject *__pyx_tp_richcompare_7pyarrow_3lib_SparseCSFTensor(PyObject *o1, PyObject *o2, int op) {
    switch (op) {
      case Py_EQ: {
        return __pyx_pw_7pyarrow_3lib_15SparseCSFTensor_17__eq__(o1, o2);
      }
      case Py_NE: {
        PyObject *ret;
        ret = __pyx_pw_7pyarrow_3lib_15SparseCSFTensor_17__eq__(o1, o2);
        if (likely(ret && ret != Py_NotImplemented)) {
          int b = __Pyx_PyObject_IsTrue(ret);
          Py_DECREF(ret);
          if (unlikely(b < 0)) return NULL;
          ret = (b) ? Py_False : Py_True;
          Py_INCREF(ret);
        }
        return ret;
      }
      default: {
        return __Pyx_NewRef(Py_NotImplemented);
      }
    }
  }

  static PyObject *__pyx_getprop_7pyarrow_3lib_15SparseCSFTensor_is_mutable(PyObject *o, CYTHON_UNUSED void *x) {
    return __pyx_pw_7pyarrow_3lib_15SparseCSFTensor_10is_mutable_1__get__(o);
  }

  static PyObject *__pyx_getprop_7pyarrow_3lib_15SparseCSFTensor_ndim(PyObject *o, CYTHON_UNUSED void *x) {
    return __pyx_pw_7pyarrow_3lib_15SparseCSFTensor_4ndim_1__get__(o);
  }

  static PyObject *__pyx_getprop_7pyarrow_3lib_15SparseCSFTensor_shape(PyObject *o, CYTHON_UNUSED void *x) {
    return __pyx_pw_7pyarrow_3lib_15SparseCSFTensor_5shape_1__get__(o);
  }

  static PyObject *__pyx_getprop_7pyarrow_3lib_15SparseCSFTensor_size(PyObject *o, CYTHON_UNUSED void *x) {
    return __pyx_pw_7pyarrow_3lib_15SparseCSFTensor_4size_1__get__(o);
  }

  static PyObject *__pyx_getprop_7pyarrow_3lib_15SparseCSFTensor_dim_names(PyObject *o, CYTHON_UNUSED void *x) {
    return __pyx_pw_7pyarrow_3lib_15SparseCSFTensor_9dim_names_1__get__(o);
  }

  static PyObject *__pyx_getprop_7pyarrow_3lib_15SparseCSFTensor_non_zero_length(PyObject *o, CYTHON_UNUSED void *x) {
    return __pyx_pw_7pyarrow_3lib_15SparseCSFTensor_15non_zero_length_1__get__(o);
  }

  static PyObject *__pyx_getprop_7pyarrow_3lib_15SparseCSFTensor_type(PyObject *o, CYTHON_UNUSED void *x) {
    return __pyx_pw_7pyarrow_3lib_15SparseCSFTensor_4type_1__get__(o);
  }

  static PyMethodDef __pyx_methods_7pyarrow_3lib_SparseCSFTensor[] = {
    {"from_dense_numpy", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15SparseCSFTensor_5from_dense_numpy, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15SparseCSFTensor_4from_dense_numpy},
    {"from_numpy", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15SparseCSFTensor_7from_numpy, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15SparseCSFTensor_6from_numpy},
    {"from_tensor", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15SparseCSFTensor_9from_tensor, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15SparseCSFTensor_8from_tensor},
    {"to_numpy", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15SparseCSFTensor_11to_numpy, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15SparseCSFTensor_10to_numpy},
    {"to_tensor", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15SparseCSFTensor_13to_tensor, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15SparseCSFTensor_12to_tensor},
    {"equals", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15SparseCSFTensor_15equals, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15SparseCSFTensor_14equals},
    {"dim_name", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15SparseCSFTensor_19dim_name, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15SparseCSFTensor_18dim_name},
    {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15SparseCSFTensor_21__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15SparseCSFTensor_20__reduce_cython__},
    {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15SparseCSFTensor_23__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15SparseCSFTensor_22__setstate_cython__},
    {0, 0, 0, 0}
  };

  static struct PyGetSetDef __pyx_getsets_7pyarrow_3lib_SparseCSFTensor[] = {
    {"is_mutable", __pyx_getprop_7pyarrow_3lib_15SparseCSFTensor_is_mutable, 0, 0, 0},
    {"ndim", __pyx_getprop_7pyarrow_3lib_15SparseCSFTensor_ndim, 0, 0, 0},
    {"shape", __pyx_getprop_7pyarrow_3lib_15SparseCSFTensor_shape, 0, 0, 0},
    {"size", __pyx_getprop_7pyarrow_3lib_15SparseCSFTensor_size, 0, 0, 0},
    {"dim_names", __pyx_getprop_7pyarrow_3lib_15SparseCSFTensor_dim_names, 0, 0, 0},
    {"non_zero_length", __pyx_getprop_7pyarrow_3lib_15SparseCSFTensor_non_zero_length, 0, 0, 0},
    {"type", __pyx_getprop_7pyarrow_3lib_15SparseCSFTensor_type, 0, 0, 0},
    {0, 0, 0, 0, 0}
  };
  #if CYTHON_USE_TYPE_SPECS
  static PyType_Slot __pyx_type_7pyarrow_3lib_SparseCSFTensor_slots[] = {
    {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_SparseCSFTensor},
    {Py_tp_repr, (void *)__pyx_pw_7pyarrow_3lib_15SparseCSFTensor_3__repr__},
    {Py_tp_doc, (void *)PyDoc_STR("SparseCSFTensor()\n\nA sparse CSF tensor.\n\nCSF is a generalization of compressed sparse row (CSR) index.\n\nCSF index recursively compresses each dimension of a tensor into a set\nof prefix trees. Each path from a root to leaf forms one tensor\nnon-zero index. CSF is implemented with two arrays of buffers and one\narrays of integers.")},
    {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyarrow_3lib_SparseCSFTensor},
    {Py_tp_clear, (void *)__pyx_tp_clear_7pyarrow_3lib_SparseCSFTensor},
    {Py_tp_richcompare, (void *)__pyx_tp_richcompare_7pyarrow_3lib_SparseCSFTensor},
    {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_SparseCSFTensor},
    {Py_tp_getset, (void *)__pyx_getsets_7pyarrow_3lib_SparseCSFTensor},
    {Py_tp_init, (void *)__pyx_pw_7pyarrow_3lib_15SparseCSFTensor_1__init__},
    {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_SparseCSFTensor},
    {0, 0},
  };
  static PyType_Spec __pyx_type_7pyarrow_3lib_SparseCSFTensor_spec = {
    "pyarrow.lib.SparseCSFTensor",
    sizeof(struct __pyx_obj_7pyarrow_3lib_SparseCSFTensor),
    0,
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
    __pyx_type_7pyarrow_3lib_SparseCSFTensor_slots,
  };
  #else

  static PyTypeObject __pyx_type_7pyarrow_3lib_SparseCSFTensor = {
    PyVarObject_HEAD_INIT(0, 0)
    "pyarrow.lib.""SparseCSFTensor", /*tp_name*/
    sizeof(struct __pyx_obj_7pyarrow_3lib_SparseCSFTensor), /*tp_basicsize*/
    0, /*tp_itemsize*/
    __pyx_tp_dealloc_7pyarrow_3lib_SparseCSFTensor, /*tp_dealloc*/
    0, /*tp_vectorcall_offset*/
    0, /*tp_getattr*/
    0, /*tp_setattr*/
    0, /*tp_as_async*/
    __pyx_pw_7pyarrow_3lib_15SparseCSFTensor_3__repr__, /*tp_repr*/
    0, /*tp_as_number*/
    0, /*tp_as_sequence*/
    0, /*tp_as_mapping*/
    0, /*tp_hash*/
    0, /*tp_call*/
    0, /*tp_str*/
    0, /*tp_getattro*/
    0, /*tp_setattro*/
    0, /*tp_as_buffer*/
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
    PyDoc_STR("SparseCSFTensor()\n\nA sparse CSF tensor.\n\nCSF is a generalization of compressed sparse row (CSR) index.\n\nCSF index recursively compresses each dimension of a tensor into a set\nof prefix trees. Each path from a root to leaf forms one tensor\nnon-zero index. CSF is implemented with two arrays of buffers and one\narrays of integers."), /*tp_doc*/
    __pyx_tp_traverse_7pyarrow_3lib_SparseCSFTensor, /*tp_traverse*/
    __pyx_tp_clear_7pyarrow_3lib_SparseCSFTensor, /*tp_clear*/
    __pyx_tp_richcompare_7pyarrow_3lib_SparseCSFTensor, /*tp_richcompare*/
    0, /*tp_weaklistoffset*/
    0, /*tp_iter*/
    0, /*tp_iternext*/
    __pyx_methods_7pyarrow_3lib_SparseCSFTensor, /*tp_methods*/
    0, /*tp_members*/
    __pyx_getsets_7pyarrow_3lib_SparseCSFTensor, /*tp_getset*/
    0, /*tp_base*/
    0, /*tp_dict*/
    0, /*tp_descr_get*/
    0, /*tp_descr_set*/
    #if !CYTHON_USE_TYPE_SPECS
    0, /*tp_dictoffset*/
    #endif
    __pyx_pw_7pyarrow_3lib_15SparseCSFTensor_1__init__, /*tp_init*/
    0, /*tp_alloc*/
    __pyx_tp_new_7pyarrow_3lib_SparseCSFTensor, /*tp_new*/
    0, /*tp_free*/
    0, /*tp_is_gc*/
    0, /*tp_bases*/
    0, /*tp_mro*/
    0, /*tp_cache*/
    0, /*tp_subclasses*/
    0, /*tp_weaklist*/
    0, /*tp_del*/
    0, /*tp_version_tag*/
    #if CYTHON_USE_TP_FINALIZE
    0, /*tp_finalize*/
    #else
    NULL, /*tp_finalize*/
    #endif
    #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
    0, /*tp_vectorcall*/
    #endif
    #if __PYX_NEED_TP_PRINT_SLOT == 1
    0, /*tp_print*/
    #endif
    #if PY_VERSION_HEX >= 0x030C0000
    0, /*tp_watched*/
    #endif
    #if PY_VERSION_HEX >= 0x030d00A4
    0, /*tp_versions_used*/
    #endif
    #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
    0, /*tp_pypy_flags*/
    #endif
  };
  #endif
  static struct __pyx_vtabstruct_7pyarrow_3lib_NullArray __pyx_vtable_7pyarrow_3lib_NullArray;

  static PyObject *__pyx_tp_new_7pyarrow_3lib_NullArray(PyTypeObject *t, PyObject *a, PyObject *k) {
    struct __pyx_obj_7pyarrow_3lib_NullArray *p;
    PyObject *o = __pyx_tp_new_7pyarrow_3lib_Array(t, a, k);
    if (unlikely(!o)) return 0;
    p = ((struct __pyx_obj_7pyarrow_3lib_NullArray *)o);
    p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_Array*)__pyx_vtabptr_7pyarrow_3lib_NullArray;
    return o;
  }
  #if CYTHON_USE_TYPE_SPECS
  static PyType_Slot __pyx_type_7pyarrow_3lib_NullArray_slots[] = {
    {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_Array},
    {Py_tp_doc, (void *)PyDoc_STR("\n    Concrete class for Arrow arrays of null data type.\n    ")},
    {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyarrow_3lib_Array},
    {Py_tp_clear, (void *)__pyx_tp_clear_7pyarrow_3lib_Array},
    {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_NullArray},
    {0, 0},
  };
  static PyType_Spec __pyx_type_7pyarrow_3lib_NullArray_spec = {
    "pyarrow.lib.NullArray",
    sizeof(struct __pyx_obj_7pyarrow_3lib_NullArray),
    0,
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
    __pyx_type_7pyarrow_3lib_NullArray_slots,
  };
  #else

  static PyTypeObject __pyx_type_7pyarrow_3lib_NullArray = {
    PyVarObject_HEAD_INIT(0, 0)
    "pyarrow.lib.""NullArray", /*tp_name*/
    sizeof(struct __pyx_obj_7pyarrow_3lib_NullArray), /*tp_basicsize*/
    0, /*tp_itemsize*/
    __pyx_tp_dealloc_7pyarrow_3lib_Array, /*tp_dealloc*/
    0, /*tp_vectorcall_offset*/
    0, /*tp_getattr*/
    0, /*tp_setattr*/
    0, /*tp_as_async*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_32__repr__, /*tp_repr*/
    #else
    0, /*tp_repr*/
    #endif
    0, /*tp_as_number*/
    0, /*tp_as_sequence*/
    0, /*tp_as_mapping*/
    0, /*tp_hash*/
    0, /*tp_call*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_36__str__, /*tp_str*/
    #else
    0, /*tp_str*/
    #endif
    0, /*tp_getattro*/
    0, /*tp_setattro*/
    0, /*tp_as_buffer*/
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
    PyDoc_STR("\n    Concrete class for Arrow arrays of null data type.\n    "), /*tp_doc*/
    __pyx_tp_traverse_7pyarrow_3lib_Array, /*tp_traverse*/
    __pyx_tp_clear_7pyarrow_3lib_Array, /*tp_clear*/
    0, /*tp_richcompare*/
    0, /*tp_weaklistoffset*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_29__iter__, /*tp_iter*/
    #else
    0, /*tp_iter*/
    #endif
    0, /*tp_iternext*/
    0, /*tp_methods*/
    0, /*tp_members*/
    0, /*tp_getset*/
    0, /*tp_base*/
    0, /*tp_dict*/
    0, /*tp_descr_get*/
    0, /*tp_descr_set*/
    #if !CYTHON_USE_TYPE_SPECS
    0, /*tp_dictoffset*/
    #endif
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_1__init__, /*tp_init*/
    #else
    0, /*tp_init*/
    #endif
    0, /*tp_alloc*/
    __pyx_tp_new_7pyarrow_3lib_NullArray, /*tp_new*/
    0, /*tp_free*/
    0, /*tp_is_gc*/
    0, /*tp_bases*/
    0, /*tp_mro*/
    0, /*tp_cache*/
    0, /*tp_subclasses*/
    0, /*tp_weaklist*/
    0, /*tp_del*/
    0, /*tp_version_tag*/
    #if CYTHON_USE_TP_FINALIZE
    0, /*tp_finalize*/
    #else
    NULL, /*tp_finalize*/
    #endif
    #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
    0, /*tp_vectorcall*/
    #endif
    #if __PYX_NEED_TP_PRINT_SLOT == 1
    0, /*tp_print*/
    #endif
    #if PY_VERSION_HEX >= 0x030C0000
    0, /*tp_watched*/
    #endif
    #if PY_VERSION_HEX >= 0x030d00A4
    0, /*tp_versions_used*/
    #endif
    #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
    0, /*tp_pypy_flags*/
    #endif
  };
  #endif
  static struct __pyx_vtabstruct_7pyarrow_3lib_BooleanArray __pyx_vtable_7pyarrow_3lib_BooleanArray;

  static PyObject *__pyx_tp_new_7pyarrow_3lib_BooleanArray(PyTypeObject *t, PyObject *a, PyObject *k) {
    struct __pyx_obj_7pyarrow_3lib_BooleanArray *p;
    PyObject *o = __pyx_tp_new_7pyarrow_3lib_Array(t, a, k);
    if (unlikely(!o)) return 0;
    p = ((struct __pyx_obj_7pyarrow_3lib_BooleanArray *)o);
    p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_Array*)__pyx_vtabptr_7pyarrow_3lib_BooleanArray;
    return o;
  }

  static PyObject *__pyx_getprop_7pyarrow_3lib_12BooleanArray_false_count(PyObject *o, CYTHON_UNUSED void *x) {
    return __pyx_pw_7pyarrow_3lib_12BooleanArray_11false_count_1__get__(o);
  }

  static PyObject *__pyx_getprop_7pyarrow_3lib_12BooleanArray_true_count(PyObject *o, CYTHON_UNUSED void *x) {
    return __pyx_pw_7pyarrow_3lib_12BooleanArray_10true_count_1__get__(o);
  }

  static struct PyGetSetDef __pyx_getsets_7pyarrow_3lib_BooleanArray[] = {
    {"false_count", __pyx_getprop_7pyarrow_3lib_12BooleanArray_false_count, 0, 0, 0},
    {"true_count", __pyx_getprop_7pyarrow_3lib_12BooleanArray_true_count, 0, 0, 0},
    {0, 0, 0, 0, 0}
  };
  #if CYTHON_USE_TYPE_SPECS
  static PyType_Slot __pyx_type_7pyarrow_3lib_BooleanArray_slots[] = {
    {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_Array},
    {Py_tp_doc, (void *)PyDoc_STR("\n    Concrete class for Arrow arrays of boolean data type.\n    ")},
    {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyarrow_3lib_Array},
    {Py_tp_clear, (void *)__pyx_tp_clear_7pyarrow_3lib_Array},
    {Py_tp_getset, (void *)__pyx_getsets_7pyarrow_3lib_BooleanArray},
    {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_BooleanArray},
    {0, 0},
  };
  static PyType_Spec __pyx_type_7pyarrow_3lib_BooleanArray_spec = {
    "pyarrow.lib.BooleanArray",
    sizeof(struct __pyx_obj_7pyarrow_3lib_BooleanArray),
    0,
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
    __pyx_type_7pyarrow_3lib_BooleanArray_slots,
  };
  #else

  static PyTypeObject __pyx_type_7pyarrow_3lib_BooleanArray = {
    PyVarObject_HEAD_INIT(0, 0)
    "pyarrow.lib.""BooleanArray", /*tp_name*/
    sizeof(struct __pyx_obj_7pyarrow_3lib_BooleanArray), /*tp_basicsize*/
    0, /*tp_itemsize*/
    __pyx_tp_dealloc_7pyarrow_3lib_Array, /*tp_dealloc*/
    0, /*tp_vectorcall_offset*/
    0, /*tp_getattr*/
    0, /*tp_setattr*/
    0, /*tp_as_async*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_32__repr__, /*tp_repr*/
    #else
    0, /*tp_repr*/
    #endif
    0, /*tp_as_number*/
    0, /*tp_as_sequence*/
    0, /*tp_as_mapping*/
    0, /*tp_hash*/
    0, /*tp_call*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_36__str__, /*tp_str*/
    #else
    0, /*tp_str*/
    #endif
    0, /*tp_getattro*/
    0, /*tp_setattro*/
    0, /*tp_as_buffer*/
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
    PyDoc_STR("\n    Concrete class for Arrow arrays of boolean data type.\n    "), /*tp_doc*/
    __pyx_tp_traverse_7pyarrow_3lib_Array, /*tp_traverse*/
    __pyx_tp_clear_7pyarrow_3lib_Array, /*tp_clear*/
    0, /*tp_richcompare*/
    0, /*tp_weaklistoffset*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_29__iter__, /*tp_iter*/
    #else
    0, /*tp_iter*/
    #endif
    0, /*tp_iternext*/
    0, /*tp_methods*/
    0, /*tp_members*/
    __pyx_getsets_7pyarrow_3lib_BooleanArray, /*tp_getset*/
    0, /*tp_base*/
    0, /*tp_dict*/
    0, /*tp_descr_get*/
    0, /*tp_descr_set*/
    #if !CYTHON_USE_TYPE_SPECS
    0, /*tp_dictoffset*/
    #endif
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_1__init__, /*tp_init*/
    #else
    0, /*tp_init*/
    #endif
    0, /*tp_alloc*/
    __pyx_tp_new_7pyarrow_3lib_BooleanArray, /*tp_new*/
    0, /*tp_free*/
    0, /*tp_is_gc*/
    0, /*tp_bases*/
    0, /*tp_mro*/
    0, /*tp_cache*/
    0, /*tp_subclasses*/
    0, /*tp_weaklist*/
    0, /*tp_del*/
    0, /*tp_version_tag*/
    #if CYTHON_USE_TP_FINALIZE
    0, /*tp_finalize*/
    #else
    NULL, /*tp_finalize*/
    #endif
    #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
    0, /*tp_vectorcall*/
    #endif
    #if __PYX_NEED_TP_PRINT_SLOT == 1
    0, /*tp_print*/
    #endif
    #if PY_VERSION_HEX >= 0x030C0000
    0, /*tp_watched*/
    #endif
    #if PY_VERSION_HEX >= 0x030d00A4
    0, /*tp_versions_used*/
    #endif
    #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
    0, /*tp_pypy_flags*/
    #endif
  };
  #endif
  static struct __pyx_vtabstruct_7pyarrow_3lib_NumericArray __pyx_vtable_7pyarrow_3lib_NumericArray;

  static PyObject *__pyx_tp_new_7pyarrow_3lib_NumericArray(PyTypeObject *t, PyObject *a, PyObject *k) {
    struct __pyx_obj_7pyarrow_3lib_NumericArray *p;
    PyObject *o = __pyx_tp_new_7pyarrow_3lib_Array(t, a, k);
    if (unlikely(!o)) return 0;
    p = ((struct __pyx_obj_7pyarrow_3lib_NumericArray *)o);
    p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_Array*)__pyx_vtabptr_7pyarrow_3lib_NumericArray;
    return o;
  }
  #if CYTHON_USE_TYPE_SPECS
  static PyType_Slot __pyx_type_7pyarrow_3lib_NumericArray_slots[] = {
    {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_Array},
    {Py_tp_doc, (void *)PyDoc_STR("\n    A base class for Arrow numeric arrays.\n    ")},
    {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyarrow_3lib_Array},
    {Py_tp_clear, (void *)__pyx_tp_clear_7pyarrow_3lib_Array},
    {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_NumericArray},
    {0, 0},
  };
  static PyType_Spec __pyx_type_7pyarrow_3lib_NumericArray_spec = {
    "pyarrow.lib.NumericArray",
    sizeof(struct __pyx_obj_7pyarrow_3lib_NumericArray),
    0,
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
    __pyx_type_7pyarrow_3lib_NumericArray_slots,
  };
  #else

  static PyTypeObject __pyx_type_7pyarrow_3lib_NumericArray = {
    PyVarObject_HEAD_INIT(0, 0)
    "pyarrow.lib.""NumericArray", /*tp_name*/
    sizeof(struct __pyx_obj_7pyarrow_3lib_NumericArray), /*tp_basicsize*/
    0, /*tp_itemsize*/
    __pyx_tp_dealloc_7pyarrow_3lib_Array, /*tp_dealloc*/
    0, /*tp_vectorcall_offset*/
    0, /*tp_getattr*/
    0, /*tp_setattr*/
    0, /*tp_as_async*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_32__repr__, /*tp_repr*/
    #else
    0, /*tp_repr*/
    #endif
    0, /*tp_as_number*/
    0, /*tp_as_sequence*/
    0, /*tp_as_mapping*/
    0, /*tp_hash*/
    0, /*tp_call*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_36__str__, /*tp_str*/
    #else
    0, /*tp_str*/
    #endif
    0, /*tp_getattro*/
    0, /*tp_setattro*/
    0, /*tp_as_buffer*/
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
    PyDoc_STR("\n    A base class for Arrow numeric arrays.\n    "), /*tp_doc*/
    __pyx_tp_traverse_7pyarrow_3lib_Array, /*tp_traverse*/
    __pyx_tp_clear_7pyarrow_3lib_Array, /*tp_clear*/
    0, /*tp_richcompare*/
    0, /*tp_weaklistoffset*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_29__iter__, /*tp_iter*/
    #else
    0, /*tp_iter*/
    #endif
    0, /*tp_iternext*/
    0, /*tp_methods*/
    0, /*tp_members*/
    0, /*tp_getset*/
    0, /*tp_base*/
    0, /*tp_dict*/
    0, /*tp_descr_get*/
    0, /*tp_descr_set*/
    #if !CYTHON_USE_TYPE_SPECS
    0, /*tp_dictoffset*/
    #endif
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_1__init__, /*tp_init*/
    #else
    0, /*tp_init*/
    #endif
    0, /*tp_alloc*/
    __pyx_tp_new_7pyarrow_3lib_NumericArray, /*tp_new*/
    0, /*tp_free*/
    0, /*tp_is_gc*/
    0, /*tp_bases*/
    0, /*tp_mro*/
    0, /*tp_cache*/
    0, /*tp_subclasses*/
    0, /*tp_weaklist*/
    0, /*tp_del*/
    0, /*tp_version_tag*/
    #if CYTHON_USE_TP_FINALIZE
    0, /*tp_finalize*/
    #else
    NULL, /*tp_finalize*/
    #endif
    #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
    0, /*tp_vectorcall*/
    #endif
    #if __PYX_NEED_TP_PRINT_SLOT == 1
    0, /*tp_print*/
    #endif
    #if PY_VERSION_HEX >= 0x030C0000
    0, /*tp_watched*/
    #endif
    #if PY_VERSION_HEX >= 0x030d00A4
    0, /*tp_versions_used*/
    #endif
    #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
    0, /*tp_pypy_flags*/
    #endif
  };
  #endif
  static struct __pyx_vtabstruct_7pyarrow_3lib_IntegerArray __pyx_vtable_7pyarrow_3lib_IntegerArray;

  static PyObject *__pyx_tp_new_7pyarrow_3lib_IntegerArray(PyTypeObject *t, PyObject *a, PyObject *k) {
    struct __pyx_obj_7pyarrow_3lib_IntegerArray *p;
    PyObject *o = __pyx_tp_new_7pyarrow_3lib_NumericArray(t, a, k);
    if (unlikely(!o)) return 0;
    p = ((struct __pyx_obj_7pyarrow_3lib_IntegerArray *)o);
    p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_Array*)__pyx_vtabptr_7pyarrow_3lib_IntegerArray;
    return o;
  }
  #if CYTHON_USE_TYPE_SPECS
  static PyType_Slot __pyx_type_7pyarrow_3lib_IntegerArray_slots[] = {
    {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_Array},
    {Py_tp_doc, (void *)PyDoc_STR("\n    A base class for Arrow integer arrays.\n    ")},
    {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyarrow_3lib_Array},
    {Py_tp_clear, (void *)__pyx_tp_clear_7pyarrow_3lib_Array},
    {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_IntegerArray},
    {0, 0},
  };
  static PyType_Spec __pyx_type_7pyarrow_3lib_IntegerArray_spec = {
    "pyarrow.lib.IntegerArray",
    sizeof(struct __pyx_obj_7pyarrow_3lib_IntegerArray),
    0,
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
    __pyx_type_7pyarrow_3lib_IntegerArray_slots,
  };
  #else

  static PyTypeObject __pyx_type_7pyarrow_3lib_IntegerArray = {
    PyVarObject_HEAD_INIT(0, 0)
    "pyarrow.lib.""IntegerArray", /*tp_name*/
    sizeof(struct __pyx_obj_7pyarrow_3lib_IntegerArray), /*tp_basicsize*/
    0, /*tp_itemsize*/
    __pyx_tp_dealloc_7pyarrow_3lib_Array, /*tp_dealloc*/
    0, /*tp_vectorcall_offset*/
    0, /*tp_getattr*/
    0, /*tp_setattr*/
    0, /*tp_as_async*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_32__repr__, /*tp_repr*/
    #else
    0, /*tp_repr*/
    #endif
    0, /*tp_as_number*/
    0, /*tp_as_sequence*/
    0, /*tp_as_mapping*/
    0, /*tp_hash*/
    0, /*tp_call*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_36__str__, /*tp_str*/
    #else
    0, /*tp_str*/
    #endif
    0, /*tp_getattro*/
    0, /*tp_setattro*/
    0, /*tp_as_buffer*/
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
    PyDoc_STR("\n    A base class for Arrow integer arrays.\n    "), /*tp_doc*/
    __pyx_tp_traverse_7pyarrow_3lib_Array, /*tp_traverse*/
    __pyx_tp_clear_7pyarrow_3lib_Array, /*tp_clear*/
    0, /*tp_richcompare*/
    0, /*tp_weaklistoffset*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_29__iter__, /*tp_iter*/
    #else
    0, /*tp_iter*/
    #endif
    0, /*tp_iternext*/
    0, /*tp_methods*/
    0, /*tp_members*/
    0, /*tp_getset*/
    0, /*tp_base*/
    0, /*tp_dict*/
    0, /*tp_descr_get*/
    0, /*tp_descr_set*/
    #if !CYTHON_USE_TYPE_SPECS
    0, /*tp_dictoffset*/
    #endif
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_1__init__, /*tp_init*/
    #else
    0, /*tp_init*/
    #endif
    0, /*tp_alloc*/
    __pyx_tp_new_7pyarrow_3lib_IntegerArray, /*tp_new*/
    0, /*tp_free*/
    0, /*tp_is_gc*/
    0, /*tp_bases*/
    0, /*tp_mro*/
    0, /*tp_cache*/
    0, /*tp_subclasses*/
    0, /*tp_weaklist*/
    0, /*tp_del*/
    0, /*tp_version_tag*/
    #if CYTHON_USE_TP_FINALIZE
    0, /*tp_finalize*/
    #else
    NULL, /*tp_finalize*/
    #endif
    #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
    0, /*tp_vectorcall*/
    #endif
    #if __PYX_NEED_TP_PRINT_SLOT == 1
    0, /*tp_print*/
    #endif
    #if PY_VERSION_HEX >= 0x030C0000
    0, /*tp_watched*/
    #endif
    #if PY_VERSION_HEX >= 0x030d00A4
    0, /*tp_versions_used*/
    #endif
    #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
    0, /*tp_pypy_flags*/
    #endif
  };
  #endif
  static struct __pyx_vtabstruct_7pyarrow_3lib_FloatingPointArray __pyx_vtable_7pyarrow_3lib_FloatingPointArray;

  static PyObject *__pyx_tp_new_7pyarrow_3lib_FloatingPointArray(PyTypeObject *t, PyObject *a, PyObject *k) {
    struct __pyx_obj_7pyarrow_3lib_FloatingPointArray *p;
    PyObject *o = __pyx_tp_new_7pyarrow_3lib_NumericArray(t, a, k);
    if (unlikely(!o)) return 0;
    p = ((struct __pyx_obj_7pyarrow_3lib_FloatingPointArray *)o);
    p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_Array*)__pyx_vtabptr_7pyarrow_3lib_FloatingPointArray;
    return o;
  }
  #if CYTHON_USE_TYPE_SPECS
  static PyType_Slot __pyx_type_7pyarrow_3lib_FloatingPointArray_slots[] = {
    {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_Array},
    {Py_tp_doc, (void *)PyDoc_STR("\n    A base class for Arrow floating-point arrays.\n    ")},
    {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyarrow_3lib_Array},
    {Py_tp_clear, (void *)__pyx_tp_clear_7pyarrow_3lib_Array},
    {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_FloatingPointArray},
    {0, 0},
  };
  static PyType_Spec __pyx_type_7pyarrow_3lib_FloatingPointArray_spec = {
    "pyarrow.lib.FloatingPointArray",
    sizeof(struct __pyx_obj_7pyarrow_3lib_FloatingPointArray),
    0,
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
    __pyx_type_7pyarrow_3lib_FloatingPointArray_slots,
  };
  #else

  static PyTypeObject __pyx_type_7pyarrow_3lib_FloatingPointArray = {
    PyVarObject_HEAD_INIT(0, 0)
    "pyarrow.lib.""FloatingPointArray", /*tp_name*/
    sizeof(struct __pyx_obj_7pyarrow_3lib_FloatingPointArray), /*tp_basicsize*/
    0, /*tp_itemsize*/
    __pyx_tp_dealloc_7pyarrow_3lib_Array, /*tp_dealloc*/
    0, /*tp_vectorcall_offset*/
    0, /*tp_getattr*/
    0, /*tp_setattr*/
    0, /*tp_as_async*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_32__repr__, /*tp_repr*/
    #else
    0, /*tp_repr*/
    #endif
    0, /*tp_as_number*/
    0, /*tp_as_sequence*/
    0, /*tp_as_mapping*/
    0, /*tp_hash*/
    0, /*tp_call*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_36__str__, /*tp_str*/
    #else
    0, /*tp_str*/
    #endif
    0, /*tp_getattro*/
    0, /*tp_setattro*/
    0, /*tp_as_buffer*/
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
    PyDoc_STR("\n    A base class for Arrow floating-point arrays.\n    "), /*tp_doc*/
    __pyx_tp_traverse_7pyarrow_3lib_Array, /*tp_traverse*/
    __pyx_tp_clear_7pyarrow_3lib_Array, /*tp_clear*/
    0, /*tp_richcompare*/
    0, /*tp_weaklistoffset*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_29__iter__, /*tp_iter*/
    #else
    0, /*tp_iter*/
    #endif
    0, /*tp_iternext*/
    0, /*tp_methods*/
    0, /*tp_members*/
    0, /*tp_getset*/
    0, /*tp_base*/
    0, /*tp_dict*/
    0, /*tp_descr_get*/
    0, /*tp_descr_set*/
    #if !CYTHON_USE_TYPE_SPECS
    0, /*tp_dictoffset*/
    #endif
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_1__init__, /*tp_init*/
    #else
    0, /*tp_init*/
    #endif
    0, /*tp_alloc*/
    __pyx_tp_new_7pyarrow_3lib_FloatingPointArray, /*tp_new*/
    0, /*tp_free*/
    0, /*tp_is_gc*/
    0, /*tp_bases*/
    0, /*tp_mro*/
    0, /*tp_cache*/
    0, /*tp_subclasses*/
    0, /*tp_weaklist*/
    0, /*tp_del*/
    0, /*tp_version_tag*/
    #if CYTHON_USE_TP_FINALIZE
    0, /*tp_finalize*/
    #else
    NULL, /*tp_finalize*/
    #endif
    #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
    0, /*tp_vectorcall*/
    #endif
    #if __PYX_NEED_TP_PRINT_SLOT == 1
    0, /*tp_print*/
    #endif
    #if PY_VERSION_HEX >= 0x030C0000
    0, /*tp_watched*/
    #endif
    #if PY_VERSION_HEX >= 0x030d00A4
    0, /*tp_versions_used*/
    #endif
    #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
    0, /*tp_pypy_flags*/
    #endif
  };
  #endif
  static struct __pyx_vtabstruct_7pyarrow_3lib_Int8Array __pyx_vtable_7pyarrow_3lib_Int8Array;

  static PyObject *__pyx_tp_new_7pyarrow_3lib_Int8Array(PyTypeObject *t, PyObject *a, PyObject *k) {
    struct __pyx_obj_7pyarrow_3lib_Int8Array *p;
    PyObject *o = __pyx_tp_new_7pyarrow_3lib_IntegerArray(t, a, k);
    if (unlikely(!o)) return 0;
    p = ((struct __pyx_obj_7pyarrow_3lib_Int8Array *)o);
    p->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_Array*)__pyx_vtabptr_7pyarrow_3lib_Int8Array;
    return o;
  }
  #if CYTHON_USE_TYPE_SPECS
  static PyType_Slot __pyx_type_7pyarrow_3lib_Int8Array_slots[] = {
    {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_Array},
    {Py_tp_doc, (void *)PyDoc_STR("\n    Concrete class for Arrow arrays of int8 data type.\n    ")},
    {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyarrow_3lib_Array},
    {Py_tp_clear, (void *)__pyx_tp_clear_7pyarrow_3lib_Array},
    {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_Int8Array},
    {0, 0},
  };
  static PyType_Spec __pyx_type_7pyarrow_3lib_Int8Array_spec = {
    "pyarrow.lib.Int8Array",
    sizeof(struct __pyx_obj_7pyarrow_3lib_Int8Array),
    0,
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
    __pyx_type_7pyarrow_3lib_Int8Array_slots,
  };
  #else

  static PyTypeObject __pyx_type_7pyarrow_3lib_Int8Array = {
    PyVarObject_HEAD_INIT(0, 0)
    "pyarrow.lib.""Int8Array", /*tp_name*/
    sizeof(struct __pyx_obj_7pyarrow_3lib_Int8Array), /*tp_basicsize*/
    0, /*tp_itemsize*/
    __pyx_tp_dealloc_7pyarrow_3lib_Array, /*tp_dealloc*/
    0, /*tp_vectorcall_offset*/
    0, /*tp_getattr*/
    0, /*tp_setattr*/
    0, /*tp_as_async*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_32__repr__, /*tp_repr*/
    #else
    0, /*tp_repr*/
    #endif
    0, /*tp_as_number*/
    0, /*tp_as_sequence*/
    0, /*tp_as_mapping*/
    0, /*tp_hash*/
    0, /*tp_call*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_36__str__, /*tp_str*/
    #else
    0, /*tp_str*/
    #endif
    0, /*tp_getattro*/
    0, /*tp_setattro*/
    0, /*tp_as_buffer*/
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
    PyDoc_STR("\n    Concrete class for Arrow arrays of int8 data type.\n    "), /*tp_doc*/
    __pyx_tp_traverse_7pyarrow_3lib_Array, /*tp_traverse*/
    __pyx_tp_clear_7pyarrow_3lib_Array, /*tp_clear*/
    0, /*tp_richcompare*/
    0, /*tp_weaklistoffset*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_29__iter__, /*tp_iter*/
    #else
    0, /*tp_iter*/
    #endif
    0, /*tp_iternext*/
    0, /*tp_methods*/
    0, /*tp_members*/
    0, /*tp_getset*/
    0, /*tp_base*/
    0, /*tp_dict*/
    0, /*tp_descr_get*/
    0, /*tp_descr_set*/
    #if !CYTHON_USE_TYPE_SPECS
    0, /*tp_dictoffset*/
    #endif
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_1__init__, /*tp_init*/
    #else
    0, /*tp_init*/
    #endif
    0, /*tp_alloc*/
    __pyx_tp_new_7pyarrow_3lib_Int8Array, /*tp_new*/
    0, /*tp_free*/
    0, /*tp_is_gc*/
    0, /*tp_bases*/
    0, /*tp_mro*/
    0, /*tp_cache*/
    0, /*tp_subclasses*/
    0, /*tp_weaklist*/
    0, /*tp_del*/
    0, /*tp_version_tag*/
    #if CYTHON_USE_TP_FINALIZE
    0, /*tp_finalize*/
    #else
    NULL, /*tp_finalize*/
    #endif
    #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
    0, /*tp_vectorcall*/
    #endif
    #if __PYX_NEED_TP_PRINT_SLOT == 1
    0, /*tp_print*/
    #endif
    #if PY_VERSION_HEX >= 0x030C0000
    0, /*tp_watched*/
    #endif
    #if PY_VERSION_HEX >= 0x030d00A4
    0, /*tp_versions_used*/
    #endif
    #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
    0, /*tp_pypy_flags*/
    #endif
  };
  #endif
  static struct __pyx_vtabstruct_7pyarrow_3lib_UInt8Array __pyx_vtable_7pyarrow_3lib_UInt8Array;

  static PyObject *__pyx_tp_new_7pyarrow_3lib_UInt8Array(PyTypeObject *t, PyObject *a, PyObject *k) {
    struct __pyx_obj_7pyarrow_3lib_UInt8Array *p;
    PyObject *o = __pyx_tp_new_7pyarrow_3lib_IntegerArray(t, a, k);
    if (unlikely(!o)) return 0;
    p = ((struct __pyx_obj_7pyarrow_3lib_UInt8Array *)o);
    p->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_Array*)__pyx_vtabptr_7pyarrow_3lib_UInt8Array;
    return o;
  }
  #if CYTHON_USE_TYPE_SPECS
  static PyType_Slot __pyx_type_7pyarrow_3lib_UInt8Array_slots[] = {
    {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_Array},
    {Py_tp_doc, (void *)PyDoc_STR("\n    Concrete class for Arrow arrays of uint8 data type.\n    ")},
    {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyarrow_3lib_Array},
    {Py_tp_clear, (void *)__pyx_tp_clear_7pyarrow_3lib_Array},
    {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_UInt8Array},
    {0, 0},
  };
  static PyType_Spec __pyx_type_7pyarrow_3lib_UInt8Array_spec = {
    "pyarrow.lib.UInt8Array",
    sizeof(struct __pyx_obj_7pyarrow_3lib_UInt8Array),
    0,
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
    __pyx_type_7pyarrow_3lib_UInt8Array_slots,
  };
  #else

  static PyTypeObject __pyx_type_7pyarrow_3lib_UInt8Array = {
    PyVarObject_HEAD_INIT(0, 0)
    "pyarrow.lib.""UInt8Array", /*tp_name*/
    sizeof(struct __pyx_obj_7pyarrow_3lib_UInt8Array), /*tp_basicsize*/
    0, /*tp_itemsize*/
    __pyx_tp_dealloc_7pyarrow_3lib_Array, /*tp_dealloc*/
    0, /*tp_vectorcall_offset*/
    0, /*tp_getattr*/
    0, /*tp_setattr*/
    0, /*tp_as_async*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_32__repr__, /*tp_repr*/
    #else
    0, /*tp_repr*/
    #endif
    0, /*tp_as_number*/
    0, /*tp_as_sequence*/
    0, /*tp_as_mapping*/
    0, /*tp_hash*/
    0, /*tp_call*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_36__str__, /*tp_str*/
    #else
    0, /*tp_str*/
    #endif
    0, /*tp_getattro*/
    0, /*tp_setattro*/
    0, /*tp_as_buffer*/
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
    PyDoc_STR("\n    Concrete class for Arrow arrays of uint8 data type.\n    "), /*tp_doc*/
    __pyx_tp_traverse_7pyarrow_3lib_Array, /*tp_traverse*/
    __pyx_tp_clear_7pyarrow_3lib_Array, /*tp_clear*/
    0, /*tp_richcompare*/
    0, /*tp_weaklistoffset*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_29__iter__, /*tp_iter*/
    #else
    0, /*tp_iter*/
    #endif
    0, /*tp_iternext*/
    0, /*tp_methods*/
    0, /*tp_members*/
    0, /*tp_getset*/
    0, /*tp_base*/
    0, /*tp_dict*/
    0, /*tp_descr_get*/
    0, /*tp_descr_set*/
    #if !CYTHON_USE_TYPE_SPECS
    0, /*tp_dictoffset*/
    #endif
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_1__init__, /*tp_init*/
    #else
    0, /*tp_init*/
    #endif
    0, /*tp_alloc*/
    __pyx_tp_new_7pyarrow_3lib_UInt8Array, /*tp_new*/
    0, /*tp_free*/
    0, /*tp_is_gc*/
    0, /*tp_bases*/
    0, /*tp_mro*/
    0, /*tp_cache*/
    0, /*tp_subclasses*/
    0, /*tp_weaklist*/
    0, /*tp_del*/
    0, /*tp_version_tag*/
    #if CYTHON_USE_TP_FINALIZE
    0, /*tp_finalize*/
    #else
    NULL, /*tp_finalize*/
    #endif
    #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
    0, /*tp_vectorcall*/
    #endif
    #if __PYX_NEED_TP_PRINT_SLOT == 1
    0, /*tp_print*/
    #endif
    #if PY_VERSION_HEX >= 0x030C0000
    0, /*tp_watched*/
    #endif
    #if PY_VERSION_HEX >= 0x030d00A4
    0, /*tp_versions_used*/
    #endif
    #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
    0, /*tp_pypy_flags*/
    #endif
  };
  #endif
  static struct __pyx_vtabstruct_7pyarrow_3lib_Int16Array __pyx_vtable_7pyarrow_3lib_Int16Array;

  static PyObject *__pyx_tp_new_7pyarrow_3lib_Int16Array(PyTypeObject *t, PyObject *a, PyObject *k) {
    struct __pyx_obj_7pyarrow_3lib_Int16Array *p;
    PyObject *o = __pyx_tp_new_7pyarrow_3lib_IntegerArray(t, a, k);
    if (unlikely(!o)) return 0;
    p = ((struct __pyx_obj_7pyarrow_3lib_Int16Array *)o);
    p->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_Array*)__pyx_vtabptr_7pyarrow_3lib_Int16Array;
    return o;
  }
  #if CYTHON_USE_TYPE_SPECS
  static PyType_Slot __pyx_type_7pyarrow_3lib_Int16Array_slots[] = {
    {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_Array},
    {Py_tp_doc, (void *)PyDoc_STR("\n    Concrete class for Arrow arrays of int16 data type.\n    ")},
    {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyarrow_3lib_Array},
    {Py_tp_clear, (void *)__pyx_tp_clear_7pyarrow_3lib_Array},
    {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_Int16Array},
    {0, 0},
  };
  static PyType_Spec __pyx_type_7pyarrow_3lib_Int16Array_spec = {
    "pyarrow.lib.Int16Array",
    sizeof(struct __pyx_obj_7pyarrow_3lib_Int16Array),
    0,
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
    __pyx_type_7pyarrow_3lib_Int16Array_slots,
  };
  #else

  static PyTypeObject __pyx_type_7pyarrow_3lib_Int16Array = {
    PyVarObject_HEAD_INIT(0, 0)
    "pyarrow.lib.""Int16Array", /*tp_name*/
    sizeof(struct __pyx_obj_7pyarrow_3lib_Int16Array), /*tp_basicsize*/
    0, /*tp_itemsize*/
    __pyx_tp_dealloc_7pyarrow_3lib_Array, /*tp_dealloc*/
    0, /*tp_vectorcall_offset*/
    0, /*tp_getattr*/
    0, /*tp_setattr*/
    0, /*tp_as_async*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_32__repr__, /*tp_repr*/
    #else
    0, /*tp_repr*/
    #endif
    0, /*tp_as_number*/
    0, /*tp_as_sequence*/
    0, /*tp_as_mapping*/
    0, /*tp_hash*/
    0, /*tp_call*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_36__str__, /*tp_str*/
    #else
    0, /*tp_str*/
    #endif
    0, /*tp_getattro*/
    0, /*tp_setattro*/
    0, /*tp_as_buffer*/
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
    PyDoc_STR("\n    Concrete class for Arrow arrays of int16 data type.\n    "), /*tp_doc*/
    __pyx_tp_traverse_7pyarrow_3lib_Array, /*tp_traverse*/
    __pyx_tp_clear_7pyarrow_3lib_Array, /*tp_clear*/
    0, /*tp_richcompare*/
    0, /*tp_weaklistoffset*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_29__iter__, /*tp_iter*/
    #else
    0, /*tp_iter*/
    #endif
    0, /*tp_iternext*/
    0, /*tp_methods*/
    0, /*tp_members*/
    0, /*tp_getset*/
    0, /*tp_base*/
    0, /*tp_dict*/
    0, /*tp_descr_get*/
    0, /*tp_descr_set*/
    #if !CYTHON_USE_TYPE_SPECS
    0, /*tp_dictoffset*/
    #endif
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_1__init__, /*tp_init*/
    #else
    0, /*tp_init*/
    #endif
    0, /*tp_alloc*/
    __pyx_tp_new_7pyarrow_3lib_Int16Array, /*tp_new*/
    0, /*tp_free*/
    0, /*tp_is_gc*/
    0, /*tp_bases*/
    0, /*tp_mro*/
    0, /*tp_cache*/
    0, /*tp_subclasses*/
    0, /*tp_weaklist*/
    0, /*tp_del*/
    0, /*tp_version_tag*/
    #if CYTHON_USE_TP_FINALIZE
    0, /*tp_finalize*/
    #else
    NULL, /*tp_finalize*/
    #endif
    #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
    0, /*tp_vectorcall*/
    #endif
    #if __PYX_NEED_TP_PRINT_SLOT == 1
    0, /*tp_print*/
    #endif
    #if PY_VERSION_HEX >= 0x030C0000
    0, /*tp_watched*/
    #endif
    #if PY_VERSION_HEX >= 0x030d00A4
    0, /*tp_versions_used*/
    #endif
    #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
    0, /*tp_pypy_flags*/
    #endif
  };
  #endif
  static struct __pyx_vtabstruct_7pyarrow_3lib_UInt16Array __pyx_vtable_7pyarrow_3lib_UInt16Array;

  static PyObject *__pyx_tp_new_7pyarrow_3lib_UInt16Array(PyTypeObject *t, PyObject *a, PyObject *k) {
    struct __pyx_obj_7pyarrow_3lib_UInt16Array *p;
    PyObject *o = __pyx_tp_new_7pyarrow_3lib_IntegerArray(t, a, k);
    if (unlikely(!o)) return 0;
    p = ((struct __pyx_obj_7pyarrow_3lib_UInt16Array *)o);
    p->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_Array*)__pyx_vtabptr_7pyarrow_3lib_UInt16Array;
    return o;
  }
  #if CYTHON_USE_TYPE_SPECS
  static PyType_Slot __pyx_type_7pyarrow_3lib_UInt16Array_slots[] = {
    {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_Array},
    {Py_tp_doc, (void *)PyDoc_STR("\n    Concrete class for Arrow arrays of uint16 data type.\n    ")},
    {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyarrow_3lib_Array},
    {Py_tp_clear, (void *)__pyx_tp_clear_7pyarrow_3lib_Array},
    {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_UInt16Array},
    {0, 0},
  };
  static PyType_Spec __pyx_type_7pyarrow_3lib_UInt16Array_spec = {
    "pyarrow.lib.UInt16Array",
    sizeof(struct __pyx_obj_7pyarrow_3lib_UInt16Array),
    0,
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
    __pyx_type_7pyarrow_3lib_UInt16Array_slots,
  };
  #else

  static PyTypeObject __pyx_type_7pyarrow_3lib_UInt16Array = {
    PyVarObject_HEAD_INIT(0, 0)
    "pyarrow.lib.""UInt16Array", /*tp_name*/
    sizeof(struct __pyx_obj_7pyarrow_3lib_UInt16Array), /*tp_basicsize*/
    0, /*tp_itemsize*/
    __pyx_tp_dealloc_7pyarrow_3lib_Array, /*tp_dealloc*/
    0, /*tp_vectorcall_offset*/
    0, /*tp_getattr*/
    0, /*tp_setattr*/
    0, /*tp_as_async*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_32__repr__, /*tp_repr*/
    #else
    0, /*tp_repr*/
    #endif
    0, /*tp_as_number*/
    0, /*tp_as_sequence*/
    0, /*tp_as_mapping*/
    0, /*tp_hash*/
    0, /*tp_call*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_36__str__, /*tp_str*/
    #else
    0, /*tp_str*/
    #endif
    0, /*tp_getattro*/
    0, /*tp_setattro*/
    0, /*tp_as_buffer*/
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
    PyDoc_STR("\n    Concrete class for Arrow arrays of uint16 data type.\n    "), /*tp_doc*/
    __pyx_tp_traverse_7pyarrow_3lib_Array, /*tp_traverse*/
    __pyx_tp_clear_7pyarrow_3lib_Array, /*tp_clear*/
    0, /*tp_richcompare*/
    0, /*tp_weaklistoffset*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_29__iter__, /*tp_iter*/
    #else
    0, /*tp_iter*/
    #endif
    0, /*tp_iternext*/
    0, /*tp_methods*/
    0, /*tp_members*/
    0, /*tp_getset*/
    0, /*tp_base*/
    0, /*tp_dict*/
    0, /*tp_descr_get*/
    0, /*tp_descr_set*/
    #if !CYTHON_USE_TYPE_SPECS
    0, /*tp_dictoffset*/
    #endif
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_1__init__, /*tp_init*/
    #else
    0, /*tp_init*/
    #endif
    0, /*tp_alloc*/
    __pyx_tp_new_7pyarrow_3lib_UInt16Array, /*tp_new*/
    0, /*tp_free*/
    0, /*tp_is_gc*/
    0, /*tp_bases*/
    0, /*tp_mro*/
    0, /*tp_cache*/
    0, /*tp_subclasses*/
    0, /*tp_weaklist*/
    0, /*tp_del*/
    0, /*tp_version_tag*/
    #if CYTHON_USE_TP_FINALIZE
    0, /*tp_finalize*/
    #else
    NULL, /*tp_finalize*/
    #endif
    #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
    0, /*tp_vectorcall*/
    #endif
    #if __PYX_NEED_TP_PRINT_SLOT == 1
    0, /*tp_print*/
    #endif
    #if PY_VERSION_HEX >= 0x030C0000
    0, /*tp_watched*/
    #endif
    #if PY_VERSION_HEX >= 0x030d00A4
    0, /*tp_versions_used*/
    #endif
    #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
    0, /*tp_pypy_flags*/
    #endif
  };
  #endif
  static struct __pyx_vtabstruct_7pyarrow_3lib_Int32Array __pyx_vtable_7pyarrow_3lib_Int32Array;

  static PyObject *__pyx_tp_new_7pyarrow_3lib_Int32Array(PyTypeObject *t, PyObject *a, PyObject *k) {
    struct __pyx_obj_7pyarrow_3lib_Int32Array *p;
    PyObject *o = __pyx_tp_new_7pyarrow_3lib_IntegerArray(t, a, k);
    if (unlikely(!o)) return 0;
    p = ((struct __pyx_obj_7pyarrow_3lib_Int32Array *)o);
    p->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_Array*)__pyx_vtabptr_7pyarrow_3lib_Int32Array;
    return o;
  }
  #if CYTHON_USE_TYPE_SPECS
  static PyType_Slot __pyx_type_7pyarrow_3lib_Int32Array_slots[] = {
    {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_Array},
    {Py_tp_doc, (void *)PyDoc_STR("\n    Concrete class for Arrow arrays of int32 data type.\n    ")},
    {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyarrow_3lib_Array},
    {Py_tp_clear, (void *)__pyx_tp_clear_7pyarrow_3lib_Array},
    {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_Int32Array},
    {0, 0},
  };
  static PyType_Spec __pyx_type_7pyarrow_3lib_Int32Array_spec = {
    "pyarrow.lib.Int32Array",
    sizeof(struct __pyx_obj_7pyarrow_3lib_Int32Array),
    0,
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
    __pyx_type_7pyarrow_3lib_Int32Array_slots,
  };
  #else

  static PyTypeObject __pyx_type_7pyarrow_3lib_Int32Array = {
    PyVarObject_HEAD_INIT(0, 0)
    "pyarrow.lib.""Int32Array", /*tp_name*/
    sizeof(struct __pyx_obj_7pyarrow_3lib_Int32Array), /*tp_basicsize*/
    0, /*tp_itemsize*/
    __pyx_tp_dealloc_7pyarrow_3lib_Array, /*tp_dealloc*/
    0, /*tp_vectorcall_offset*/
    0, /*tp_getattr*/
    0, /*tp_setattr*/
    0, /*tp_as_async*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_32__repr__, /*tp_repr*/
    #else
    0, /*tp_repr*/
    #endif
    0, /*tp_as_number*/
    0, /*tp_as_sequence*/
    0, /*tp_as_mapping*/
    0, /*tp_hash*/
    0, /*tp_call*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_36__str__, /*tp_str*/
    #else
    0, /*tp_str*/
    #endif
    0, /*tp_getattro*/
    0, /*tp_setattro*/
    0, /*tp_as_buffer*/
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
    PyDoc_STR("\n    Concrete class for Arrow arrays of int32 data type.\n    "), /*tp_doc*/
    __pyx_tp_traverse_7pyarrow_3lib_Array, /*tp_traverse*/
    __pyx_tp_clear_7pyarrow_3lib_Array, /*tp_clear*/
    0, /*tp_richcompare*/
    0, /*tp_weaklistoffset*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_29__iter__, /*tp_iter*/
    #else
    0, /*tp_iter*/
    #endif
    0, /*tp_iternext*/
    0, /*tp_methods*/
    0, /*tp_members*/
    0, /*tp_getset*/
    0, /*tp_base*/
    0, /*tp_dict*/
    0, /*tp_descr_get*/
    0, /*tp_descr_set*/
    #if !CYTHON_USE_TYPE_SPECS
    0, /*tp_dictoffset*/
    #endif
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_1__init__, /*tp_init*/
    #else
    0, /*tp_init*/
    #endif
    0, /*tp_alloc*/
    __pyx_tp_new_7pyarrow_3lib_Int32Array, /*tp_new*/
    0, /*tp_free*/
    0, /*tp_is_gc*/
    0, /*tp_bases*/
    0, /*tp_mro*/
    0, /*tp_cache*/
    0, /*tp_subclasses*/
    0, /*tp_weaklist*/
    0, /*tp_del*/
    0, /*tp_version_tag*/
    #if CYTHON_USE_TP_FINALIZE
    0, /*tp_finalize*/
    #else
    NULL, /*tp_finalize*/
    #endif
    #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
    0, /*tp_vectorcall*/
    #endif
    #if __PYX_NEED_TP_PRINT_SLOT == 1
    0, /*tp_print*/
    #endif
    #if PY_VERSION_HEX >= 0x030C0000
    0, /*tp_watched*/
    #endif
    #if PY_VERSION_HEX >= 0x030d00A4
    0, /*tp_versions_used*/
    #endif
    #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
    0, /*tp_pypy_flags*/
    #endif
  };
  #endif
  static struct __pyx_vtabstruct_7pyarrow_3lib_UInt32Array __pyx_vtable_7pyarrow_3lib_UInt32Array;

  static PyObject *__pyx_tp_new_7pyarrow_3lib_UInt32Array(PyTypeObject *t, PyObject *a, PyObject *k) {
    struct __pyx_obj_7pyarrow_3lib_UInt32Array *p;
    PyObject *o = __pyx_tp_new_7pyarrow_3lib_IntegerArray(t, a, k);
    if (unlikely(!o)) return 0;
    p = ((struct __pyx_obj_7pyarrow_3lib_UInt32Array *)o);
    p->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_Array*)__pyx_vtabptr_7pyarrow_3lib_UInt32Array;
    return o;
  }
  #if CYTHON_USE_TYPE_SPECS
  static PyType_Slot __pyx_type_7pyarrow_3lib_UInt32Array_slots[] = {
    {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_Array},
    {Py_tp_doc, (void *)PyDoc_STR("\n    Concrete class for Arrow arrays of uint32 data type.\n    ")},
    {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyarrow_3lib_Array},
    {Py_tp_clear, (void *)__pyx_tp_clear_7pyarrow_3lib_Array},
    {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_UInt32Array},
    {0, 0},
  };
  static PyType_Spec __pyx_type_7pyarrow_3lib_UInt32Array_spec = {
    "pyarrow.lib.UInt32Array",
    sizeof(struct __pyx_obj_7pyarrow_3lib_UInt32Array),
    0,
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
    __pyx_type_7pyarrow_3lib_UInt32Array_slots,
  };
  #else

  static PyTypeObject __pyx_type_7pyarrow_3lib_UInt32Array = {
    PyVarObject_HEAD_INIT(0, 0)
    "pyarrow.lib.""UInt32Array", /*tp_name*/
    sizeof(struct __pyx_obj_7pyarrow_3lib_UInt32Array), /*tp_basicsize*/
    0, /*tp_itemsize*/
    __pyx_tp_dealloc_7pyarrow_3lib_Array, /*tp_dealloc*/
    0, /*tp_vectorcall_offset*/
    0, /*tp_getattr*/
    0, /*tp_setattr*/
    0, /*tp_as_async*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_32__repr__, /*tp_repr*/
    #else
    0, /*tp_repr*/
    #endif
    0, /*tp_as_number*/
    0, /*tp_as_sequence*/
    0, /*tp_as_mapping*/
    0, /*tp_hash*/
    0, /*tp_call*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_36__str__, /*tp_str*/
    #else
    0, /*tp_str*/
    #endif
    0, /*tp_getattro*/
    0, /*tp_setattro*/
    0, /*tp_as_buffer*/
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
    PyDoc_STR("\n    Concrete class for Arrow arrays of uint32 data type.\n    "), /*tp_doc*/
    __pyx_tp_traverse_7pyarrow_3lib_Array, /*tp_traverse*/
    __pyx_tp_clear_7pyarrow_3lib_Array, /*tp_clear*/
    0, /*tp_richcompare*/
    0, /*tp_weaklistoffset*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_29__iter__, /*tp_iter*/
    #else
    0, /*tp_iter*/
    #endif
    0, /*tp_iternext*/
    0, /*tp_methods*/
    0, /*tp_members*/
    0, /*tp_getset*/
    0, /*tp_base*/
    0, /*tp_dict*/
    0, /*tp_descr_get*/
    0, /*tp_descr_set*/
    #if !CYTHON_USE_TYPE_SPECS
    0, /*tp_dictoffset*/
    #endif
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_1__init__, /*tp_init*/
    #else
    0, /*tp_init*/
    #endif
    0, /*tp_alloc*/
    __pyx_tp_new_7pyarrow_3lib_UInt32Array, /*tp_new*/
    0, /*tp_free*/
    0, /*tp_is_gc*/
    0, /*tp_bases*/
    0, /*tp_mro*/
    0, /*tp_cache*/
    0, /*tp_subclasses*/
    0, /*tp_weaklist*/
    0, /*tp_del*/
    0, /*tp_version_tag*/
    #if CYTHON_USE_TP_FINALIZE
    0, /*tp_finalize*/
    #else
    NULL, /*tp_finalize*/
    #endif
    #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
    0, /*tp_vectorcall*/
    #endif
    #if __PYX_NEED_TP_PRINT_SLOT == 1
    0, /*tp_print*/
    #endif
    #if PY_VERSION_HEX >= 0x030C0000
    0, /*tp_watched*/
    #endif
    #if PY_VERSION_HEX >= 0x030d00A4
    0, /*tp_versions_used*/
    #endif
    #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
    0, /*tp_pypy_flags*/
    #endif
  };
  #endif
  static struct __pyx_vtabstruct_7pyarrow_3lib_Int64Array __pyx_vtable_7pyarrow_3lib_Int64Array;

  static PyObject *__pyx_tp_new_7pyarrow_3lib_Int64Array(PyTypeObject *t, PyObject *a, PyObject *k) {
    struct __pyx_obj_7pyarrow_3lib_Int64Array *p;
    PyObject *o = __pyx_tp_new_7pyarrow_3lib_IntegerArray(t, a, k);
    if (unlikely(!o)) return 0;
    p = ((struct __pyx_obj_7pyarrow_3lib_Int64Array *)o);
    p->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_Array*)__pyx_vtabptr_7pyarrow_3lib_Int64Array;
    return o;
  }
  #if CYTHON_USE_TYPE_SPECS
  static PyType_Slot __pyx_type_7pyarrow_3lib_Int64Array_slots[] = {
    {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_Array},
    {Py_tp_doc, (void *)PyDoc_STR("\n    Concrete class for Arrow arrays of int64 data type.\n    ")},
    {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyarrow_3lib_Array},
    {Py_tp_clear, (void *)__pyx_tp_clear_7pyarrow_3lib_Array},
    {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_Int64Array},
    {0, 0},
  };
  static PyType_Spec __pyx_type_7pyarrow_3lib_Int64Array_spec = {
    "pyarrow.lib.Int64Array",
    sizeof(struct __pyx_obj_7pyarrow_3lib_Int64Array),
    0,
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
    __pyx_type_7pyarrow_3lib_Int64Array_slots,
  };
  #else

  static PyTypeObject __pyx_type_7pyarrow_3lib_Int64Array = {
    PyVarObject_HEAD_INIT(0, 0)
    "pyarrow.lib.""Int64Array", /*tp_name*/
    sizeof(struct __pyx_obj_7pyarrow_3lib_Int64Array), /*tp_basicsize*/
    0, /*tp_itemsize*/
    __pyx_tp_dealloc_7pyarrow_3lib_Array, /*tp_dealloc*/
    0, /*tp_vectorcall_offset*/
    0, /*tp_getattr*/
    0, /*tp_setattr*/
    0, /*tp_as_async*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_32__repr__, /*tp_repr*/
    #else
    0, /*tp_repr*/
    #endif
    0, /*tp_as_number*/
    0, /*tp_as_sequence*/
    0, /*tp_as_mapping*/
    0, /*tp_hash*/
    0, /*tp_call*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_36__str__, /*tp_str*/
    #else
    0, /*tp_str*/
    #endif
    0, /*tp_getattro*/
    0, /*tp_setattro*/
    0, /*tp_as_buffer*/
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
    PyDoc_STR("\n    Concrete class for Arrow arrays of int64 data type.\n    "), /*tp_doc*/
    __pyx_tp_traverse_7pyarrow_3lib_Array, /*tp_traverse*/
    __pyx_tp_clear_7pyarrow_3lib_Array, /*tp_clear*/
    0, /*tp_richcompare*/
    0, /*tp_weaklistoffset*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_29__iter__, /*tp_iter*/
    #else
    0, /*tp_iter*/
    #endif
    0, /*tp_iternext*/
    0, /*tp_methods*/
    0, /*tp_members*/
    0, /*tp_getset*/
    0, /*tp_base*/
    0, /*tp_dict*/
    0, /*tp_descr_get*/
    0, /*tp_descr_set*/
    #if !CYTHON_USE_TYPE_SPECS
    0, /*tp_dictoffset*/
    #endif
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_1__init__, /*tp_init*/
    #else
    0, /*tp_init*/
    #endif
    0, /*tp_alloc*/
    __pyx_tp_new_7pyarrow_3lib_Int64Array, /*tp_new*/
    0, /*tp_free*/
    0, /*tp_is_gc*/
    0, /*tp_bases*/
    0, /*tp_mro*/
    0, /*tp_cache*/
    0, /*tp_subclasses*/
    0, /*tp_weaklist*/
    0, /*tp_del*/
    0, /*tp_version_tag*/
    #if CYTHON_USE_TP_FINALIZE
    0, /*tp_finalize*/
    #else
    NULL, /*tp_finalize*/
    #endif
    #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
    0, /*tp_vectorcall*/
    #endif
    #if __PYX_NEED_TP_PRINT_SLOT == 1
    0, /*tp_print*/
    #endif
    #if PY_VERSION_HEX >= 0x030C0000
    0, /*tp_watched*/
    #endif
    #if PY_VERSION_HEX >= 0x030d00A4
    0, /*tp_versions_used*/
    #endif
    #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
    0, /*tp_pypy_flags*/
    #endif
  };
  #endif
  static struct __pyx_vtabstruct_7pyarrow_3lib_UInt64Array __pyx_vtable_7pyarrow_3lib_UInt64Array;

  static PyObject *__pyx_tp_new_7pyarrow_3lib_UInt64Array(PyTypeObject *t, PyObject *a, PyObject *k) {
    struct __pyx_obj_7pyarrow_3lib_UInt64Array *p;
    PyObject *o = __pyx_tp_new_7pyarrow_3lib_IntegerArray(t, a, k);
    if (unlikely(!o)) return 0;
    p = ((struct __pyx_obj_7pyarrow_3lib_UInt64Array *)o);
    p->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_Array*)__pyx_vtabptr_7pyarrow_3lib_UInt64Array;
    return o;
  }
  #if CYTHON_USE_TYPE_SPECS
  static PyType_Slot __pyx_type_7pyarrow_3lib_UInt64Array_slots[] = {
    {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_Array},
    {Py_tp_doc, (void *)PyDoc_STR("\n    Concrete class for Arrow arrays of uint64 data type.\n    ")},
    {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyarrow_3lib_Array},
    {Py_tp_clear, (void *)__pyx_tp_clear_7pyarrow_3lib_Array},
    {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_UInt64Array},
    {0, 0},
  };
  static PyType_Spec __pyx_type_7pyarrow_3lib_UInt64Array_spec = {
    "pyarrow.lib.UInt64Array",
    sizeof(struct __pyx_obj_7pyarrow_3lib_UInt64Array),
    0,
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
    __pyx_type_7pyarrow_3lib_UInt64Array_slots,
  };
  #else

  static PyTypeObject __pyx_type_7pyarrow_3lib_UInt64Array = {
    PyVarObject_HEAD_INIT(0, 0)
    "pyarrow.lib.""UInt64Array", /*tp_name*/
    sizeof(struct __pyx_obj_7pyarrow_3lib_UInt64Array), /*tp_basicsize*/
    0, /*tp_itemsize*/
    __pyx_tp_dealloc_7pyarrow_3lib_Array, /*tp_dealloc*/
    0, /*tp_vectorcall_offset*/
    0, /*tp_getattr*/
    0, /*tp_setattr*/
    0, /*tp_as_async*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_32__repr__, /*tp_repr*/
    #else
    0, /*tp_repr*/
    #endif
    0, /*tp_as_number*/
    0, /*tp_as_sequence*/
    0, /*tp_as_mapping*/
    0, /*tp_hash*/
    0, /*tp_call*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_36__str__, /*tp_str*/
    #else
    0, /*tp_str*/
    #endif
    0, /*tp_getattro*/
    0, /*tp_setattro*/
    0, /*tp_as_buffer*/
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
    PyDoc_STR("\n    Concrete class for Arrow arrays of uint64 data type.\n    "), /*tp_doc*/
    __pyx_tp_traverse_7pyarrow_3lib_Array, /*tp_traverse*/
    __pyx_tp_clear_7pyarrow_3lib_Array, /*tp_clear*/
    0, /*tp_richcompare*/
    0, /*tp_weaklistoffset*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_29__iter__, /*tp_iter*/
    #else
    0, /*tp_iter*/
    #endif
    0, /*tp_iternext*/
    0, /*tp_methods*/
    0, /*tp_members*/
    0, /*tp_getset*/
    0, /*tp_base*/
    0, /*tp_dict*/
    0, /*tp_descr_get*/
    0, /*tp_descr_set*/
    #if !CYTHON_USE_TYPE_SPECS
    0, /*tp_dictoffset*/
    #endif
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_1__init__, /*tp_init*/
    #else
    0, /*tp_init*/
    #endif
    0, /*tp_alloc*/
    __pyx_tp_new_7pyarrow_3lib_UInt64Array, /*tp_new*/
    0, /*tp_free*/
    0, /*tp_is_gc*/
    0, /*tp_bases*/
    0, /*tp_mro*/
    0, /*tp_cache*/
    0, /*tp_subclasses*/
    0, /*tp_weaklist*/
    0, /*tp_del*/
    0, /*tp_version_tag*/
    #if CYTHON_USE_TP_FINALIZE
    0, /*tp_finalize*/
    #else
    NULL, /*tp_finalize*/
    #endif
    #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
    0, /*tp_vectorcall*/
    #endif
    #if __PYX_NEED_TP_PRINT_SLOT == 1
    0, /*tp_print*/
    #endif
    #if PY_VERSION_HEX >= 0x030C0000
    0, /*tp_watched*/
    #endif
    #if PY_VERSION_HEX >= 0x030d00A4
    0, /*tp_versions_used*/
    #endif
    #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
    0, /*tp_pypy_flags*/
    #endif
  };
  #endif
  static struct __pyx_vtabstruct_7pyarrow_3lib_HalfFloatArray __pyx_vtable_7pyarrow_3lib_HalfFloatArray;

  static PyObject *__pyx_tp_new_7pyarrow_3lib_HalfFloatArray(PyTypeObject *t, PyObject *a, PyObject *k) {
    struct __pyx_obj_7pyarrow_3lib_HalfFloatArray *p;
    PyObject *o = __pyx_tp_new_7pyarrow_3lib_FloatingPointArray(t, a, k);
    if (unlikely(!o)) return 0;
    p = ((struct __pyx_obj_7pyarrow_3lib_HalfFloatArray *)o);
    p->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_Array*)__pyx_vtabptr_7pyarrow_3lib_HalfFloatArray;
    return o;
  }
  #if CYTHON_USE_TYPE_SPECS
  static PyType_Slot __pyx_type_7pyarrow_3lib_HalfFloatArray_slots[] = {
    {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_Array},
    {Py_tp_doc, (void *)PyDoc_STR("\n    Concrete class for Arrow arrays of float16 data type.\n    ")},
    {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyarrow_3lib_Array},
    {Py_tp_clear, (void *)__pyx_tp_clear_7pyarrow_3lib_Array},
    {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_HalfFloatArray},
    {0, 0},
  };
  static PyType_Spec __pyx_type_7pyarrow_3lib_HalfFloatArray_spec = {
    "pyarrow.lib.HalfFloatArray",
    sizeof(struct __pyx_obj_7pyarrow_3lib_HalfFloatArray),
    0,
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
    __pyx_type_7pyarrow_3lib_HalfFloatArray_slots,
  };
  #else

  static PyTypeObject __pyx_type_7pyarrow_3lib_HalfFloatArray = {
    PyVarObject_HEAD_INIT(0, 0)
    "pyarrow.lib.""HalfFloatArray", /*tp_name*/
    sizeof(struct __pyx_obj_7pyarrow_3lib_HalfFloatArray), /*tp_basicsize*/
    0, /*tp_itemsize*/
    __pyx_tp_dealloc_7pyarrow_3lib_Array, /*tp_dealloc*/
    0, /*tp_vectorcall_offset*/
    0, /*tp_getattr*/
    0, /*tp_setattr*/
    0, /*tp_as_async*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_32__repr__, /*tp_repr*/
    #else
    0, /*tp_repr*/
    #endif
    0, /*tp_as_number*/
    0, /*tp_as_sequence*/
    0, /*tp_as_mapping*/
    0, /*tp_hash*/
    0, /*tp_call*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_36__str__, /*tp_str*/
    #else
    0, /*tp_str*/
    #endif
    0, /*tp_getattro*/
    0, /*tp_setattro*/
    0, /*tp_as_buffer*/
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
    PyDoc_STR("\n    Concrete class for Arrow arrays of float16 data type.\n    "), /*tp_doc*/
    __pyx_tp_traverse_7pyarrow_3lib_Array, /*tp_traverse*/
    __pyx_tp_clear_7pyarrow_3lib_Array, /*tp_clear*/
    0, /*tp_richcompare*/
    0, /*tp_weaklistoffset*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_29__iter__, /*tp_iter*/
    #else
    0, /*tp_iter*/
    #endif
    0, /*tp_iternext*/
    0, /*tp_methods*/
    0, /*tp_members*/
    0, /*tp_getset*/
    0, /*tp_base*/
    0, /*tp_dict*/
    0, /*tp_descr_get*/
    0, /*tp_descr_set*/
    #if !CYTHON_USE_TYPE_SPECS
    0, /*tp_dictoffset*/
    #endif
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_1__init__, /*tp_init*/
    #else
    0, /*tp_init*/
    #endif
    0, /*tp_alloc*/
    __pyx_tp_new_7pyarrow_3lib_HalfFloatArray, /*tp_new*/
    0, /*tp_free*/
    0, /*tp_is_gc*/
    0, /*tp_bases*/
    0, /*tp_mro*/
    0, /*tp_cache*/
    0, /*tp_subclasses*/
    0, /*tp_weaklist*/
    0, /*tp_del*/
    0, /*tp_version_tag*/
    #if CYTHON_USE_TP_FINALIZE
    0, /*tp_finalize*/
    #else
    NULL, /*tp_finalize*/
    #endif
    #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
    0, /*tp_vectorcall*/
    #endif
    #if __PYX_NEED_TP_PRINT_SLOT == 1
    0, /*tp_print*/
    #endif
    #if PY_VERSION_HEX >= 0x030C0000
    0, /*tp_watched*/
    #endif
    #if PY_VERSION_HEX >= 0x030d00A4
    0, /*tp_versions_used*/
    #endif
    #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
    0, /*tp_pypy_flags*/
    #endif
  };
  #endif
  static struct __pyx_vtabstruct_7pyarrow_3lib_FloatArray __pyx_vtable_7pyarrow_3lib_FloatArray;

  static PyObject *__pyx_tp_new_7pyarrow_3lib_FloatArray(PyTypeObject *t, PyObject *a, PyObject *k) {
    struct __pyx_obj_7pyarrow_3lib_FloatArray *p;
    PyObject *o = __pyx_tp_new_7pyarrow_3lib_FloatingPointArray(t, a, k);
    if (unlikely(!o)) return 0;
    p = ((struct __pyx_obj_7pyarrow_3lib_FloatArray *)o);
    p->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_Array*)__pyx_vtabptr_7pyarrow_3lib_FloatArray;
    return o;
  }
  #if CYTHON_USE_TYPE_SPECS
  static PyType_Slot __pyx_type_7pyarrow_3lib_FloatArray_slots[] = {
    {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_Array},
    {Py_tp_doc, (void *)PyDoc_STR("\n    Concrete class for Arrow arrays of float32 data type.\n    ")},
    {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyarrow_3lib_Array},
    {Py_tp_clear, (void *)__pyx_tp_clear_7pyarrow_3lib_Array},
    {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_FloatArray},
    {0, 0},
  };
  static PyType_Spec __pyx_type_7pyarrow_3lib_FloatArray_spec = {
    "pyarrow.lib.FloatArray",
    sizeof(struct __pyx_obj_7pyarrow_3lib_FloatArray),
    0,
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
    __pyx_type_7pyarrow_3lib_FloatArray_slots,
  };
  #else

  static PyTypeObject __pyx_type_7pyarrow_3lib_FloatArray = {
    PyVarObject_HEAD_INIT(0, 0)
    "pyarrow.lib.""FloatArray", /*tp_name*/
    sizeof(struct __pyx_obj_7pyarrow_3lib_FloatArray), /*tp_basicsize*/
    0, /*tp_itemsize*/
    __pyx_tp_dealloc_7pyarrow_3lib_Array, /*tp_dealloc*/
    0, /*tp_vectorcall_offset*/
    0, /*tp_getattr*/
    0, /*tp_setattr*/
    0, /*tp_as_async*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_32__repr__, /*tp_repr*/
    #else
    0, /*tp_repr*/
    #endif
    0, /*tp_as_number*/
    0, /*tp_as_sequence*/
    0, /*tp_as_mapping*/
    0, /*tp_hash*/
    0, /*tp_call*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_36__str__, /*tp_str*/
    #else
    0, /*tp_str*/
    #endif
    0, /*tp_getattro*/
    0, /*tp_setattro*/
    0, /*tp_as_buffer*/
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
    PyDoc_STR("\n    Concrete class for Arrow arrays of float32 data type.\n    "), /*tp_doc*/
    __pyx_tp_traverse_7pyarrow_3lib_Array, /*tp_traverse*/
    __pyx_tp_clear_7pyarrow_3lib_Array, /*tp_clear*/
    0, /*tp_richcompare*/
    0, /*tp_weaklistoffset*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_29__iter__, /*tp_iter*/
    #else
    0, /*tp_iter*/
    #endif
    0, /*tp_iternext*/
    0, /*tp_methods*/
    0, /*tp_members*/
    0, /*tp_getset*/
    0, /*tp_base*/
    0, /*tp_dict*/
    0, /*tp_descr_get*/
    0, /*tp_descr_set*/
    #if !CYTHON_USE_TYPE_SPECS
    0, /*tp_dictoffset*/
    #endif
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_1__init__, /*tp_init*/
    #else
    0, /*tp_init*/
    #endif
    0, /*tp_alloc*/
    __pyx_tp_new_7pyarrow_3lib_FloatArray, /*tp_new*/
    0, /*tp_free*/
    0, /*tp_is_gc*/
    0, /*tp_bases*/
    0, /*tp_mro*/
    0, /*tp_cache*/
    0, /*tp_subclasses*/
    0, /*tp_weaklist*/
    0, /*tp_del*/
    0, /*tp_version_tag*/
    #if CYTHON_USE_TP_FINALIZE
    0, /*tp_finalize*/
    #else
    NULL, /*tp_finalize*/
    #endif
    #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
    0, /*tp_vectorcall*/
    #endif
    #if __PYX_NEED_TP_PRINT_SLOT == 1
    0, /*tp_print*/
    #endif
    #if PY_VERSION_HEX >= 0x030C0000
    0, /*tp_watched*/
    #endif
    #if PY_VERSION_HEX >= 0x030d00A4
    0, /*tp_versions_used*/
    #endif
    #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
    0, /*tp_pypy_flags*/
    #endif
  };
  #endif
  static struct __pyx_vtabstruct_7pyarrow_3lib_DoubleArray __pyx_vtable_7pyarrow_3lib_DoubleArray;

  static PyObject *__pyx_tp_new_7pyarrow_3lib_DoubleArray(PyTypeObject *t, PyObject *a, PyObject *k) {
    struct __pyx_obj_7pyarrow_3lib_DoubleArray *p;
    PyObject *o = __pyx_tp_new_7pyarrow_3lib_FloatingPointArray(t, a, k);
    if (unlikely(!o)) return 0;
    p = ((struct __pyx_obj_7pyarrow_3lib_DoubleArray *)o);
    p->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_Array*)__pyx_vtabptr_7pyarrow_3lib_DoubleArray;
    return o;
  }
  #if CYTHON_USE_TYPE_SPECS
  static PyType_Slot __pyx_type_7pyarrow_3lib_DoubleArray_slots[] = {
    {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_Array},
    {Py_tp_doc, (void *)PyDoc_STR("\n    Concrete class for Arrow arrays of float64 data type.\n    ")},
    {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyarrow_3lib_Array},
    {Py_tp_clear, (void *)__pyx_tp_clear_7pyarrow_3lib_Array},
    {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_DoubleArray},
    {0, 0},
  };
  static PyType_Spec __pyx_type_7pyarrow_3lib_DoubleArray_spec = {
    "pyarrow.lib.DoubleArray",
    sizeof(struct __pyx_obj_7pyarrow_3lib_DoubleArray),
    0,
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
    __pyx_type_7pyarrow_3lib_DoubleArray_slots,
  };
  #else

  static PyTypeObject __pyx_type_7pyarrow_3lib_DoubleArray = {
    PyVarObject_HEAD_INIT(0, 0)
    "pyarrow.lib.""DoubleArray", /*tp_name*/
    sizeof(struct __pyx_obj_7pyarrow_3lib_DoubleArray), /*tp_basicsize*/
    0, /*tp_itemsize*/
    __pyx_tp_dealloc_7pyarrow_3lib_Array, /*tp_dealloc*/
    0, /*tp_vectorcall_offset*/
    0, /*tp_getattr*/
    0, /*tp_setattr*/
    0, /*tp_as_async*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_32__repr__, /*tp_repr*/
    #else
    0, /*tp_repr*/
    #endif
    0, /*tp_as_number*/
    0, /*tp_as_sequence*/
    0, /*tp_as_mapping*/
    0, /*tp_hash*/
    0, /*tp_call*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_36__str__, /*tp_str*/
    #else
    0, /*tp_str*/
    #endif
    0, /*tp_getattro*/
    0, /*tp_setattro*/
    0, /*tp_as_buffer*/
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
    PyDoc_STR("\n    Concrete class for Arrow arrays of float64 data type.\n    "), /*tp_doc*/
    __pyx_tp_traverse_7pyarrow_3lib_Array, /*tp_traverse*/
    __pyx_tp_clear_7pyarrow_3lib_Array, /*tp_clear*/
    0, /*tp_richcompare*/
    0, /*tp_weaklistoffset*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_29__iter__, /*tp_iter*/
    #else
    0, /*tp_iter*/
    #endif
    0, /*tp_iternext*/
    0, /*tp_methods*/
    0, /*tp_members*/
    0, /*tp_getset*/
    0, /*tp_base*/
    0, /*tp_dict*/
    0, /*tp_descr_get*/
    0, /*tp_descr_set*/
    #if !CYTHON_USE_TYPE_SPECS
    0, /*tp_dictoffset*/
    #endif
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_1__init__, /*tp_init*/
    #else
    0, /*tp_init*/
    #endif
    0, /*tp_alloc*/
    __pyx_tp_new_7pyarrow_3lib_DoubleArray, /*tp_new*/
    0, /*tp_free*/
    0, /*tp_is_gc*/
    0, /*tp_bases*/
    0, /*tp_mro*/
    0, /*tp_cache*/
    0, /*tp_subclasses*/
    0, /*tp_weaklist*/
    0, /*tp_del*/
    0, /*tp_version_tag*/
    #if CYTHON_USE_TP_FINALIZE
    0, /*tp_finalize*/
    #else
    NULL, /*tp_finalize*/
    #endif
    #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
    0, /*tp_vectorcall*/
    #endif
    #if __PYX_NEED_TP_PRINT_SLOT == 1
    0, /*tp_print*/
    #endif
    #if PY_VERSION_HEX >= 0x030C0000
    0, /*tp_watched*/
    #endif
    #if PY_VERSION_HEX >= 0x030d00A4
    0, /*tp_versions_used*/
    #endif
    #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
    0, /*tp_pypy_flags*/
    #endif
  };
  #endif
  static struct __pyx_vtabstruct_7pyarrow_3lib_FixedSizeBinaryArray __pyx_vtable_7pyarrow_3lib_FixedSizeBinaryArray;

  static PyObject *__pyx_tp_new_7pyarrow_3lib_FixedSizeBinaryArray(PyTypeObject *t, PyObject *a, PyObject *k) {
    struct __pyx_obj_7pyarrow_3lib_FixedSizeBinaryArray *p;
    PyObject *o = __pyx_tp_new_7pyarrow_3lib_Array(t, a, k);
    if (unlikely(!o)) return 0;
    p = ((struct __pyx_obj_7pyarrow_3lib_FixedSizeBinaryArray *)o);
    p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_Array*)__pyx_vtabptr_7pyarrow_3lib_FixedSizeBinaryArray;
    return o;
  }
  #if CYTHON_USE_TYPE_SPECS
  static PyType_Slot __pyx_type_7pyarrow_3lib_FixedSizeBinaryArray_slots[] = {
    {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_Array},
    {Py_tp_doc, (void *)PyDoc_STR("\n    Concrete class for Arrow arrays of a fixed-size binary data type.\n    ")},
    {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyarrow_3lib_Array},
    {Py_tp_clear, (void *)__pyx_tp_clear_7pyarrow_3lib_Array},
    {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_FixedSizeBinaryArray},
    {0, 0},
  };
  static PyType_Spec __pyx_type_7pyarrow_3lib_FixedSizeBinaryArray_spec = {
    "pyarrow.lib.FixedSizeBinaryArray",
    sizeof(struct __pyx_obj_7pyarrow_3lib_FixedSizeBinaryArray),
    0,
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
    __pyx_type_7pyarrow_3lib_FixedSizeBinaryArray_slots,
  };
  #else

  static PyTypeObject __pyx_type_7pyarrow_3lib_FixedSizeBinaryArray = {
    PyVarObject_HEAD_INIT(0, 0)
    "pyarrow.lib.""FixedSizeBinaryArray", /*tp_name*/
    sizeof(struct __pyx_obj_7pyarrow_3lib_FixedSizeBinaryArray), /*tp_basicsize*/
    0, /*tp_itemsize*/
    __pyx_tp_dealloc_7pyarrow_3lib_Array, /*tp_dealloc*/
    0, /*tp_vectorcall_offset*/
    0, /*tp_getattr*/
    0, /*tp_setattr*/
    0, /*tp_as_async*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_32__repr__, /*tp_repr*/
    #else
    0, /*tp_repr*/
    #endif
    0, /*tp_as_number*/
    0, /*tp_as_sequence*/
    0, /*tp_as_mapping*/
    0, /*tp_hash*/
    0, /*tp_call*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_36__str__, /*tp_str*/
    #else
    0, /*tp_str*/
    #endif
    0, /*tp_getattro*/
    0, /*tp_setattro*/
    0, /*tp_as_buffer*/
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
    PyDoc_STR("\n    Concrete class for Arrow arrays of a fixed-size binary data type.\n    "), /*tp_doc*/
    __pyx_tp_traverse_7pyarrow_3lib_Array, /*tp_traverse*/
    __pyx_tp_clear_7pyarrow_3lib_Array, /*tp_clear*/
    0, /*tp_richcompare*/
    0, /*tp_weaklistoffset*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_29__iter__, /*tp_iter*/
    #else
    0, /*tp_iter*/
    #endif
    0, /*tp_iternext*/
    0, /*tp_methods*/
    0, /*tp_members*/
    0, /*tp_getset*/
    0, /*tp_base*/
    0, /*tp_dict*/
    0, /*tp_descr_get*/
    0, /*tp_descr_set*/
    #if !CYTHON_USE_TYPE_SPECS
    0, /*tp_dictoffset*/
    #endif
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_1__init__, /*tp_init*/
    #else
    0, /*tp_init*/
    #endif
    0, /*tp_alloc*/
    __pyx_tp_new_7pyarrow_3lib_FixedSizeBinaryArray, /*tp_new*/
    0, /*tp_free*/
    0, /*tp_is_gc*/
    0, /*tp_bases*/
    0, /*tp_mro*/
    0, /*tp_cache*/
    0, /*tp_subclasses*/
    0, /*tp_weaklist*/
    0, /*tp_del*/
    0, /*tp_version_tag*/
    #if CYTHON_USE_TP_FINALIZE
    0, /*tp_finalize*/
    #else
    NULL, /*tp_finalize*/
    #endif
    #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
    0, /*tp_vectorcall*/
    #endif
    #if __PYX_NEED_TP_PRINT_SLOT == 1
    0, /*tp_print*/
    #endif
    #if PY_VERSION_HEX >= 0x030C0000
    0, /*tp_watched*/
    #endif
    #if PY_VERSION_HEX >= 0x030d00A4
    0, /*tp_versions_used*/
    #endif
    #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
    0, /*tp_pypy_flags*/
    #endif
  };
  #endif
  static struct __pyx_vtabstruct_7pyarrow_3lib_Decimal32Array __pyx_vtable_7pyarrow_3lib_Decimal32Array;

  static PyObject *__pyx_tp_new_7pyarrow_3lib_Decimal32Array(PyTypeObject *t, PyObject *a, PyObject *k) {
    struct __pyx_obj_7pyarrow_3lib_Decimal32Array *p;
    PyObject *o = __pyx_tp_new_7pyarrow_3lib_FixedSizeBinaryArray(t, a, k);
    if (unlikely(!o)) return 0;
    p = ((struct __pyx_obj_7pyarrow_3lib_Decimal32Array *)o);
    p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_Array*)__pyx_vtabptr_7pyarrow_3lib_Decimal32Array;
    return o;
  }
  #if CYTHON_USE_TYPE_SPECS
  static PyType_Slot __pyx_type_7pyarrow_3lib_Decimal32Array_slots[] = {
    {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_Array},
    {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyarrow_3lib_Array},
    {Py_tp_clear, (void *)__pyx_tp_clear_7pyarrow_3lib_Array},
    {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_Decimal32Array},
    {0, 0},
  };
  static PyType_Spec __pyx_type_7pyarrow_3lib_Decimal32Array_spec = {
    "pyarrow.lib.Decimal32Array",
    sizeof(struct __pyx_obj_7pyarrow_3lib_Decimal32Array),
    0,
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
    __pyx_type_7pyarrow_3lib_Decimal32Array_slots,
  };
  #else

  static PyTypeObject __pyx_type_7pyarrow_3lib_Decimal32Array = {
    PyVarObject_HEAD_INIT(0, 0)
    "pyarrow.lib.""Decimal32Array", /*tp_name*/
    sizeof(struct __pyx_obj_7pyarrow_3lib_Decimal32Array), /*tp_basicsize*/
    0, /*tp_itemsize*/
    __pyx_tp_dealloc_7pyarrow_3lib_Array, /*tp_dealloc*/
    0, /*tp_vectorcall_offset*/
    0, /*tp_getattr*/
    0, /*tp_setattr*/
    0, /*tp_as_async*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_32__repr__, /*tp_repr*/
    #else
    0, /*tp_repr*/
    #endif
    0, /*tp_as_number*/
    0, /*tp_as_sequence*/
    0, /*tp_as_mapping*/
    0, /*tp_hash*/
    0, /*tp_call*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_36__str__, /*tp_str*/
    #else
    0, /*tp_str*/
    #endif
    0, /*tp_getattro*/
    0, /*tp_setattro*/
    0, /*tp_as_buffer*/
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
    0, /*tp_doc*/
    __pyx_tp_traverse_7pyarrow_3lib_Array, /*tp_traverse*/
    __pyx_tp_clear_7pyarrow_3lib_Array, /*tp_clear*/
    0, /*tp_richcompare*/
    0, /*tp_weaklistoffset*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_29__iter__, /*tp_iter*/
    #else
    0, /*tp_iter*/
    #endif
    0, /*tp_iternext*/
    0, /*tp_methods*/
    0, /*tp_members*/
    0, /*tp_getset*/
    0, /*tp_base*/
    0, /*tp_dict*/
    0, /*tp_descr_get*/
    0, /*tp_descr_set*/
    #if !CYTHON_USE_TYPE_SPECS
    0, /*tp_dictoffset*/
    #endif
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_1__init__, /*tp_init*/
    #else
    0, /*tp_init*/
    #endif
    0, /*tp_alloc*/
    __pyx_tp_new_7pyarrow_3lib_Decimal32Array, /*tp_new*/
    0, /*tp_free*/
    0, /*tp_is_gc*/
    0, /*tp_bases*/
    0, /*tp_mro*/
    0, /*tp_cache*/
    0, /*tp_subclasses*/
    0, /*tp_weaklist*/
    0, /*tp_del*/
    0, /*tp_version_tag*/
    #if CYTHON_USE_TP_FINALIZE
    0, /*tp_finalize*/
    #else
    NULL, /*tp_finalize*/
    #endif
    #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
    0, /*tp_vectorcall*/
    #endif
    #if __PYX_NEED_TP_PRINT_SLOT == 1
    0, /*tp_print*/
    #endif
    #if PY_VERSION_HEX >= 0x030C0000
    0, /*tp_watched*/
    #endif
    #if PY_VERSION_HEX >= 0x030d00A4
    0, /*tp_versions_used*/
    #endif
    #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
    0, /*tp_pypy_flags*/
    #endif
  };
  #endif
  static struct __pyx_vtabstruct_7pyarrow_3lib_Decimal64Array __pyx_vtable_7pyarrow_3lib_Decimal64Array;

  static PyObject *__pyx_tp_new_7pyarrow_3lib_Decimal64Array(PyTypeObject *t, PyObject *a, PyObject *k) {
    struct __pyx_obj_7pyarrow_3lib_Decimal64Array *p;
    PyObject *o = __pyx_tp_new_7pyarrow_3lib_FixedSizeBinaryArray(t, a, k);
    if (unlikely(!o)) return 0;
    p = ((struct __pyx_obj_7pyarrow_3lib_Decimal64Array *)o);
    p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_Array*)__pyx_vtabptr_7pyarrow_3lib_Decimal64Array;
    return o;
  }
  #if CYTHON_USE_TYPE_SPECS
  static PyType_Slot __pyx_type_7pyarrow_3lib_Decimal64Array_slots[] = {
    {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_Array},
    {Py_tp_doc, (void *)PyDoc_STR("\n    Concrete class for Arrow arrays of decimal64 data type.\n    ")},
    {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyarrow_3lib_Array},
    {Py_tp_clear, (void *)__pyx_tp_clear_7pyarrow_3lib_Array},
    {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_Decimal64Array},
    {0, 0},
  };
  static PyType_Spec __pyx_type_7pyarrow_3lib_Decimal64Array_spec = {
    "pyarrow.lib.Decimal64Array",
    sizeof(struct __pyx_obj_7pyarrow_3lib_Decimal64Array),
    0,
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
    __pyx_type_7pyarrow_3lib_Decimal64Array_slots,
  };
  #else

  static PyTypeObject __pyx_type_7pyarrow_3lib_Decimal64Array = {
    PyVarObject_HEAD_INIT(0, 0)
    "pyarrow.lib.""Decimal64Array", /*tp_name*/
    sizeof(struct __pyx_obj_7pyarrow_3lib_Decimal64Array), /*tp_basicsize*/
    0, /*tp_itemsize*/
    __pyx_tp_dealloc_7pyarrow_3lib_Array, /*tp_dealloc*/
    0, /*tp_vectorcall_offset*/
    0, /*tp_getattr*/
    0, /*tp_setattr*/
    0, /*tp_as_async*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_32__repr__, /*tp_repr*/
    #else
    0, /*tp_repr*/
    #endif
    0, /*tp_as_number*/
    0, /*tp_as_sequence*/
    0, /*tp_as_mapping*/
    0, /*tp_hash*/
    0, /*tp_call*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_36__str__, /*tp_str*/
    #else
    0, /*tp_str*/
    #endif
    0, /*tp_getattro*/
    0, /*tp_setattro*/
    0, /*tp_as_buffer*/
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
    PyDoc_STR("\n    Concrete class for Arrow arrays of decimal64 data type.\n    "), /*tp_doc*/
    __pyx_tp_traverse_7pyarrow_3lib_Array, /*tp_traverse*/
    __pyx_tp_clear_7pyarrow_3lib_Array, /*tp_clear*/
    0, /*tp_richcompare*/
    0, /*tp_weaklistoffset*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_29__iter__, /*tp_iter*/
    #else
    0, /*tp_iter*/
    #endif
    0, /*tp_iternext*/
    0, /*tp_methods*/
    0, /*tp_members*/
    0, /*tp_getset*/
    0, /*tp_base*/
    0, /*tp_dict*/
    0, /*tp_descr_get*/
    0, /*tp_descr_set*/
    #if !CYTHON_USE_TYPE_SPECS
    0, /*tp_dictoffset*/
    #endif
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_1__init__, /*tp_init*/
    #else
    0, /*tp_init*/
    #endif
    0, /*tp_alloc*/
    __pyx_tp_new_7pyarrow_3lib_Decimal64Array, /*tp_new*/
    0, /*tp_free*/
    0, /*tp_is_gc*/
    0, /*tp_bases*/
    0, /*tp_mro*/
    0, /*tp_cache*/
    0, /*tp_subclasses*/
    0, /*tp_weaklist*/
    0, /*tp_del*/
    0, /*tp_version_tag*/
    #if CYTHON_USE_TP_FINALIZE
    0, /*tp_finalize*/
    #else
    NULL, /*tp_finalize*/
    #endif
    #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
    0, /*tp_vectorcall*/
    #endif
    #if __PYX_NEED_TP_PRINT_SLOT == 1
    0, /*tp_print*/
    #endif
    #if PY_VERSION_HEX >= 0x030C0000
    0, /*tp_watched*/
    #endif
    #if PY_VERSION_HEX >= 0x030d00A4
    0, /*tp_versions_used*/
    #endif
    #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
    0, /*tp_pypy_flags*/
    #endif
  };
  #endif
  static struct __pyx_vtabstruct_7pyarrow_3lib_Decimal128Array __pyx_vtable_7pyarrow_3lib_Decimal128Array;

  static PyObject *__pyx_tp_new_7pyarrow_3lib_Decimal128Array(PyTypeObject *t, PyObject *a, PyObject *k) {
    struct __pyx_obj_7pyarrow_3lib_Decimal128Array *p;
    PyObject *o = __pyx_tp_new_7pyarrow_3lib_FixedSizeBinaryArray(t, a, k);
    if (unlikely(!o)) return 0;
    p = ((struct __pyx_obj_7pyarrow_3lib_Decimal128Array *)o);
    p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_Array*)__pyx_vtabptr_7pyarrow_3lib_Decimal128Array;
    return o;
  }
  #if CYTHON_USE_TYPE_SPECS
  static PyType_Slot __pyx_type_7pyarrow_3lib_Decimal128Array_slots[] = {
    {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_Array},
    {Py_tp_doc, (void *)PyDoc_STR("\n    Concrete class for Arrow arrays of decimal128 data type.\n    ")},
    {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyarrow_3lib_Array},
    {Py_tp_clear, (void *)__pyx_tp_clear_7pyarrow_3lib_Array},
    {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_Decimal128Array},
    {0, 0},
  };
  static PyType_Spec __pyx_type_7pyarrow_3lib_Decimal128Array_spec = {
    "pyarrow.lib.Decimal128Array",
    sizeof(struct __pyx_obj_7pyarrow_3lib_Decimal128Array),
    0,
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
    __pyx_type_7pyarrow_3lib_Decimal128Array_slots,
  };
  #else

  static PyTypeObject __pyx_type_7pyarrow_3lib_Decimal128Array = {
    PyVarObject_HEAD_INIT(0, 0)
    "pyarrow.lib.""Decimal128Array", /*tp_name*/
    sizeof(struct __pyx_obj_7pyarrow_3lib_Decimal128Array), /*tp_basicsize*/
    0, /*tp_itemsize*/
    __pyx_tp_dealloc_7pyarrow_3lib_Array, /*tp_dealloc*/
    0, /*tp_vectorcall_offset*/
    0, /*tp_getattr*/
    0, /*tp_setattr*/
    0, /*tp_as_async*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_32__repr__, /*tp_repr*/
    #else
    0, /*tp_repr*/
    #endif
    0, /*tp_as_number*/
    0, /*tp_as_sequence*/
    0, /*tp_as_mapping*/
    0, /*tp_hash*/
    0, /*tp_call*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_36__str__, /*tp_str*/
    #else
    0, /*tp_str*/
    #endif
    0, /*tp_getattro*/
    0, /*tp_setattro*/
    0, /*tp_as_buffer*/
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
    PyDoc_STR("\n    Concrete class for Arrow arrays of decimal128 data type.\n    "), /*tp_doc*/
    __pyx_tp_traverse_7pyarrow_3lib_Array, /*tp_traverse*/
    __pyx_tp_clear_7pyarrow_3lib_Array, /*tp_clear*/
    0, /*tp_richcompare*/
    0, /*tp_weaklistoffset*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_29__iter__, /*tp_iter*/
    #else
    0, /*tp_iter*/
    #endif
    0, /*tp_iternext*/
    0, /*tp_methods*/
    0, /*tp_members*/
    0, /*tp_getset*/
    0, /*tp_base*/
    0, /*tp_dict*/
    0, /*tp_descr_get*/
    0, /*tp_descr_set*/
    #if !CYTHON_USE_TYPE_SPECS
    0, /*tp_dictoffset*/
    #endif
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_1__init__, /*tp_init*/
    #else
    0, /*tp_init*/
    #endif
    0, /*tp_alloc*/
    __pyx_tp_new_7pyarrow_3lib_Decimal128Array, /*tp_new*/
    0, /*tp_free*/
    0, /*tp_is_gc*/
    0, /*tp_bases*/
    0, /*tp_mro*/
    0, /*tp_cache*/
    0, /*tp_subclasses*/
    0, /*tp_weaklist*/
    0, /*tp_del*/
    0, /*tp_version_tag*/
    #if CYTHON_USE_TP_FINALIZE
    0, /*tp_finalize*/
    #else
    NULL, /*tp_finalize*/
    #endif
    #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
    0, /*tp_vectorcall*/
    #endif
    #if __PYX_NEED_TP_PRINT_SLOT == 1
    0, /*tp_print*/
    #endif
    #if PY_VERSION_HEX >= 0x030C0000
    0, /*tp_watched*/
    #endif
    #if PY_VERSION_HEX >= 0x030d00A4
    0, /*tp_versions_used*/
    #endif
    #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
    0, /*tp_pypy_flags*/
    #endif
  };
  #endif
  static struct __pyx_vtabstruct_7pyarrow_3lib_Decimal256Array __pyx_vtable_7pyarrow_3lib_Decimal256Array;

  static PyObject *__pyx_tp_new_7pyarrow_3lib_Decimal256Array(PyTypeObject *t, PyObject *a, PyObject *k) {
    struct __pyx_obj_7pyarrow_3lib_Decimal256Array *p;
    PyObject *o = __pyx_tp_new_7pyarrow_3lib_FixedSizeBinaryArray(t, a, k);
    if (unlikely(!o)) return 0;
    p = ((struct __pyx_obj_7pyarrow_3lib_Decimal256Array *)o);
    p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_Array*)__pyx_vtabptr_7pyarrow_3lib_Decimal256Array;
    return o;
  }
  #if CYTHON_USE_TYPE_SPECS
  static PyType_Slot __pyx_type_7pyarrow_3lib_Decimal256Array_slots[] = {
    {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_Array},
    {Py_tp_doc, (void *)PyDoc_STR("\n    Concrete class for Arrow arrays of decimal256 data type.\n    ")},
    {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyarrow_3lib_Array},
    {Py_tp_clear, (void *)__pyx_tp_clear_7pyarrow_3lib_Array},
    {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_Decimal256Array},
    {0, 0},
  };
  static PyType_Spec __pyx_type_7pyarrow_3lib_Decimal256Array_spec = {
    "pyarrow.lib.Decimal256Array",
    sizeof(struct __pyx_obj_7pyarrow_3lib_Decimal256Array),
    0,
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
    __pyx_type_7pyarrow_3lib_Decimal256Array_slots,
  };
  #else

  static PyTypeObject __pyx_type_7pyarrow_3lib_Decimal256Array = {
    PyVarObject_HEAD_INIT(0, 0)
    "pyarrow.lib.""Decimal256Array", /*tp_name*/
    sizeof(struct __pyx_obj_7pyarrow_3lib_Decimal256Array), /*tp_basicsize*/
    0, /*tp_itemsize*/
    __pyx_tp_dealloc_7pyarrow_3lib_Array, /*tp_dealloc*/
    0, /*tp_vectorcall_offset*/
    0, /*tp_getattr*/
    0, /*tp_setattr*/
    0, /*tp_as_async*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_32__repr__, /*tp_repr*/
    #else
    0, /*tp_repr*/
    #endif
    0, /*tp_as_number*/
    0, /*tp_as_sequence*/
    0, /*tp_as_mapping*/
    0, /*tp_hash*/
    0, /*tp_call*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_36__str__, /*tp_str*/
    #else
    0, /*tp_str*/
    #endif
    0, /*tp_getattro*/
    0, /*tp_setattro*/
    0, /*tp_as_buffer*/
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
    PyDoc_STR("\n    Concrete class for Arrow arrays of decimal256 data type.\n    "), /*tp_doc*/
    __pyx_tp_traverse_7pyarrow_3lib_Array, /*tp_traverse*/
    __pyx_tp_clear_7pyarrow_3lib_Array, /*tp_clear*/
    0, /*tp_richcompare*/
    0, /*tp_weaklistoffset*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_29__iter__, /*tp_iter*/
    #else
    0, /*tp_iter*/
    #endif
    0, /*tp_iternext*/
    0, /*tp_methods*/
    0, /*tp_members*/
    0, /*tp_getset*/
    0, /*tp_base*/
    0, /*tp_dict*/
    0, /*tp_descr_get*/
    0, /*tp_descr_set*/
    #if !CYTHON_USE_TYPE_SPECS
    0, /*tp_dictoffset*/
    #endif
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_1__init__, /*tp_init*/
    #else
    0, /*tp_init*/
    #endif
    0, /*tp_alloc*/
    __pyx_tp_new_7pyarrow_3lib_Decimal256Array, /*tp_new*/
    0, /*tp_free*/
    0, /*tp_is_gc*/
    0, /*tp_bases*/
    0, /*tp_mro*/
    0, /*tp_cache*/
    0, /*tp_subclasses*/
    0, /*tp_weaklist*/
    0, /*tp_del*/
    0, /*tp_version_tag*/
    #if CYTHON_USE_TP_FINALIZE
    0, /*tp_finalize*/
    #else
    NULL, /*tp_finalize*/
    #endif
    #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
    0, /*tp_vectorcall*/
    #endif
    #if __PYX_NEED_TP_PRINT_SLOT == 1
    0, /*tp_print*/
    #endif
    #if PY_VERSION_HEX >= 0x030C0000
    0, /*tp_watched*/
    #endif
    #if PY_VERSION_HEX >= 0x030d00A4
    0, /*tp_versions_used*/
    #endif
    #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
    0, /*tp_pypy_flags*/
    #endif
  };
  #endif
  static struct __pyx_vtabstruct_7pyarrow_3lib_StructArray __pyx_vtable_7pyarrow_3lib_StructArray;

  static PyObject *__pyx_tp_new_7pyarrow_3lib_StructArray(PyTypeObject *t, PyObject *a, PyObject *k) {
    struct __pyx_obj_7pyarrow_3lib_StructArray *p;
    PyObject *o = __pyx_tp_new_7pyarrow_3lib_Array(t, a, k);
    if (unlikely(!o)) return 0;
    p = ((struct __pyx_obj_7pyarrow_3lib_StructArray *)o);
    p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_Array*)__pyx_vtabptr_7pyarrow_3lib_StructArray;
    return o;
  }

  static PyMethodDef __pyx_methods_7pyarrow_3lib_StructArray[] = {
    {"field", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_11StructArray_1field, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_11StructArray_field},
    {"_flattened_field", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_11StructArray_3_flattened_field, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_11StructArray_2_flattened_field},
    {"flatten", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_11StructArray_5flatten, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_11StructArray_4flatten},
    {"from_arrays", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_11StructArray_7from_arrays, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_11StructArray_6from_arrays},
    {"sort", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_11StructArray_9sort, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_11StructArray_8sort},
    {0, 0, 0, 0}
  };
  #if CYTHON_USE_TYPE_SPECS
  static PyType_Slot __pyx_type_7pyarrow_3lib_StructArray_slots[] = {
    {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_Array},
    {Py_tp_doc, (void *)PyDoc_STR("\n    Concrete class for Arrow arrays of a struct data type.\n    ")},
    {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyarrow_3lib_Array},
    {Py_tp_clear, (void *)__pyx_tp_clear_7pyarrow_3lib_Array},
    {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_StructArray},
    {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_StructArray},
    {0, 0},
  };
  static PyType_Spec __pyx_type_7pyarrow_3lib_StructArray_spec = {
    "pyarrow.lib.StructArray",
    sizeof(struct __pyx_obj_7pyarrow_3lib_StructArray),
    0,
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
    __pyx_type_7pyarrow_3lib_StructArray_slots,
  };
  #else

  static PyTypeObject __pyx_type_7pyarrow_3lib_StructArray = {
    PyVarObject_HEAD_INIT(0, 0)
    "pyarrow.lib.""StructArray", /*tp_name*/
    sizeof(struct __pyx_obj_7pyarrow_3lib_StructArray), /*tp_basicsize*/
    0, /*tp_itemsize*/
    __pyx_tp_dealloc_7pyarrow_3lib_Array, /*tp_dealloc*/
    0, /*tp_vectorcall_offset*/
    0, /*tp_getattr*/
    0, /*tp_setattr*/
    0, /*tp_as_async*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_32__repr__, /*tp_repr*/
    #else
    0, /*tp_repr*/
    #endif
    0, /*tp_as_number*/
    0, /*tp_as_sequence*/
    0, /*tp_as_mapping*/
    0, /*tp_hash*/
    0, /*tp_call*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_36__str__, /*tp_str*/
    #else
    0, /*tp_str*/
    #endif
    0, /*tp_getattro*/
    0, /*tp_setattro*/
    0, /*tp_as_buffer*/
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
    PyDoc_STR("\n    Concrete class for Arrow arrays of a struct data type.\n    "), /*tp_doc*/
    __pyx_tp_traverse_7pyarrow_3lib_Array, /*tp_traverse*/
    __pyx_tp_clear_7pyarrow_3lib_Array, /*tp_clear*/
    0, /*tp_richcompare*/
    0, /*tp_weaklistoffset*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_29__iter__, /*tp_iter*/
    #else
    0, /*tp_iter*/
    #endif
    0, /*tp_iternext*/
    __pyx_methods_7pyarrow_3lib_StructArray, /*tp_methods*/
    0, /*tp_members*/
    0, /*tp_getset*/
    0, /*tp_base*/
    0, /*tp_dict*/
    0, /*tp_descr_get*/
    0, /*tp_descr_set*/
    #if !CYTHON_USE_TYPE_SPECS
    0, /*tp_dictoffset*/
    #endif
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_1__init__, /*tp_init*/
    #else
    0, /*tp_init*/
    #endif
    0, /*tp_alloc*/
    __pyx_tp_new_7pyarrow_3lib_StructArray, /*tp_new*/
    0, /*tp_free*/
    0, /*tp_is_gc*/
    0, /*tp_bases*/
    0, /*tp_mro*/
    0, /*tp_cache*/
    0, /*tp_subclasses*/
    0, /*tp_weaklist*/
    0, /*tp_del*/
    0, /*tp_version_tag*/
    #if CYTHON_USE_TP_FINALIZE
    0, /*tp_finalize*/
    #else
    NULL, /*tp_finalize*/
    #endif
    #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
    0, /*tp_vectorcall*/
    #endif
    #if __PYX_NEED_TP_PRINT_SLOT == 1
    0, /*tp_print*/
    #endif
    #if PY_VERSION_HEX >= 0x030C0000
    0, /*tp_watched*/
    #endif
    #if PY_VERSION_HEX >= 0x030d00A4
    0, /*tp_versions_used*/
    #endif
    #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
    0, /*tp_pypy_flags*/
    #endif
  };
  #endif
  static struct __pyx_vtabstruct_7pyarrow_3lib_BaseListArray __pyx_vtable_7pyarrow_3lib_BaseListArray;

  static PyObject *__pyx_tp_new_7pyarrow_3lib_BaseListArray(PyTypeObject *t, PyObject *a, PyObject *k) {
    struct __pyx_obj_7pyarrow_3lib_BaseListArray *p;
    PyObject *o = __pyx_tp_new_7pyarrow_3lib_Array(t, a, k);
    if (unlikely(!o)) return 0;
    p = ((struct __pyx_obj_7pyarrow_3lib_BaseListArray *)o);
    p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_Array*)__pyx_vtabptr_7pyarrow_3lib_BaseListArray;
    return o;
  }

  static PyMethodDef __pyx_methods_7pyarrow_3lib_BaseListArray[] = {
    {"flatten", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_13BaseListArray_1flatten, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_13BaseListArray_flatten},
    {"value_parent_indices", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_13BaseListArray_3value_parent_indices, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_13BaseListArray_2value_parent_indices},
    {"value_lengths", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_13BaseListArray_5value_lengths, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_13BaseListArray_4value_lengths},
    {0, 0, 0, 0}
  };
  #if CYTHON_USE_TYPE_SPECS
  static PyType_Slot __pyx_type_7pyarrow_3lib_BaseListArray_slots[] = {
    {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_Array},
    {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyarrow_3lib_Array},
    {Py_tp_clear, (void *)__pyx_tp_clear_7pyarrow_3lib_Array},
    {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_BaseListArray},
    {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_BaseListArray},
    {0, 0},
  };
  static PyType_Spec __pyx_type_7pyarrow_3lib_BaseListArray_spec = {
    "pyarrow.lib.BaseListArray",
    sizeof(struct __pyx_obj_7pyarrow_3lib_BaseListArray),
    0,
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
    __pyx_type_7pyarrow_3lib_BaseListArray_slots,
  };
  #else

  static PyTypeObject __pyx_type_7pyarrow_3lib_BaseListArray = {
    PyVarObject_HEAD_INIT(0, 0)
    "pyarrow.lib.""BaseListArray", /*tp_name*/
    sizeof(struct __pyx_obj_7pyarrow_3lib_BaseListArray), /*tp_basicsize*/
    0, /*tp_itemsize*/
    __pyx_tp_dealloc_7pyarrow_3lib_Array, /*tp_dealloc*/
    0, /*tp_vectorcall_offset*/
    0, /*tp_getattr*/
    0, /*tp_setattr*/
    0, /*tp_as_async*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_32__repr__, /*tp_repr*/
    #else
    0, /*tp_repr*/
    #endif
    0, /*tp_as_number*/
    0, /*tp_as_sequence*/
    0, /*tp_as_mapping*/
    0, /*tp_hash*/
    0, /*tp_call*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_36__str__, /*tp_str*/
    #else
    0, /*tp_str*/
    #endif
    0, /*tp_getattro*/
    0, /*tp_setattro*/
    0, /*tp_as_buffer*/
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
    0, /*tp_doc*/
    __pyx_tp_traverse_7pyarrow_3lib_Array, /*tp_traverse*/
    __pyx_tp_clear_7pyarrow_3lib_Array, /*tp_clear*/
    0, /*tp_richcompare*/
    0, /*tp_weaklistoffset*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_29__iter__, /*tp_iter*/
    #else
    0, /*tp_iter*/
    #endif
    0, /*tp_iternext*/
    __pyx_methods_7pyarrow_3lib_BaseListArray, /*tp_methods*/
    0, /*tp_members*/
    0, /*tp_getset*/
    0, /*tp_base*/
    0, /*tp_dict*/
    0, /*tp_descr_get*/
    0, /*tp_descr_set*/
    #if !CYTHON_USE_TYPE_SPECS
    0, /*tp_dictoffset*/
    #endif
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_1__init__, /*tp_init*/
    #else
    0, /*tp_init*/
    #endif
    0, /*tp_alloc*/
    __pyx_tp_new_7pyarrow_3lib_BaseListArray, /*tp_new*/
    0, /*tp_free*/
    0, /*tp_is_gc*/
    0, /*tp_bases*/
    0, /*tp_mro*/
    0, /*tp_cache*/
    0, /*tp_subclasses*/
    0, /*tp_weaklist*/
    0, /*tp_del*/
    0, /*tp_version_tag*/
    #if CYTHON_USE_TP_FINALIZE
    0, /*tp_finalize*/
    #else
    NULL, /*tp_finalize*/
    #endif
    #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
    0, /*tp_vectorcall*/
    #endif
    #if __PYX_NEED_TP_PRINT_SLOT == 1
    0, /*tp_print*/
    #endif
    #if PY_VERSION_HEX >= 0x030C0000
    0, /*tp_watched*/
    #endif
    #if PY_VERSION_HEX >= 0x030d00A4
    0, /*tp_versions_used*/
    #endif
    #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
    0, /*tp_pypy_flags*/
    #endif
  };
  #endif
  static struct __pyx_vtabstruct_7pyarrow_3lib_ListArray __pyx_vtable_7pyarrow_3lib_ListArray;

  static PyObject *__pyx_tp_new_7pyarrow_3lib_ListArray(PyTypeObject *t, PyObject *a, PyObject *k) {
    struct __pyx_obj_7pyarrow_3lib_ListArray *p;
    PyObject *o = __pyx_tp_new_7pyarrow_3lib_BaseListArray(t, a, k);
    if (unlikely(!o)) return 0;
    p = ((struct __pyx_obj_7pyarrow_3lib_ListArray *)o);
    p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_Array*)__pyx_vtabptr_7pyarrow_3lib_ListArray;
    return o;
  }

  static PyObject *__pyx_getprop_7pyarrow_3lib_9ListArray_values(PyObject *o, CYTHON_UNUSED void *x) {
    return __pyx_pw_7pyarrow_3lib_9ListArray_6values_1__get__(o);
  }

  static PyObject *__pyx_getprop_7pyarrow_3lib_9ListArray_offsets(PyObject *o, CYTHON_UNUSED void *x) {
    return __pyx_pw_7pyarrow_3lib_9ListArray_7offsets_1__get__(o);
  }

  static PyMethodDef __pyx_methods_7pyarrow_3lib_ListArray[] = {
    {"from_arrays", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_9ListArray_1from_arrays, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_9ListArray_from_arrays},
    {0, 0, 0, 0}
  };

  static struct PyGetSetDef __pyx_getsets_7pyarrow_3lib_ListArray[] = {
    {"values", __pyx_getprop_7pyarrow_3lib_9ListArray_values, 0, PyDoc_STR("\n        Return the underlying array of values which backs the ListArray\n        ignoring the array's offset.\n\n        If any of the list elements are null, but are backed by a\n        non-empty sub-list, those elements will be included in the\n        output.\n\n        Compare with :meth:`flatten`, which returns only the non-null\n        values taking into consideration the array's offset.\n\n        Returns\n        -------\n        values : Array\n\n        See Also\n        --------\n        ListArray.flatten : ...\n\n        Examples\n        --------\n\n        The values include null elements from sub-lists:\n\n        >>> import pyarrow as pa\n        >>> array = pa.array([[1, 2], None, [3, 4, None, 6]])\n        >>> array.values\n        <pyarrow.lib.Int64Array object at ...>\n        [\n          1,\n          2,\n          3,\n          4,\n          null,\n          6\n        ]\n\n        If an array is sliced, the slice still uses the same\n        underlying data as the original array, just with an\n        offset. Since values ignores the offset, the values are the\n        same:\n\n        >>> sliced = array.slice(1, 2)\n        >>> sliced\n        <pyarrow.lib.ListArray object at ...>\n        [\n          null,\n          [\n            3,\n            4,\n            null,\n            6\n          ]\n        ]\n        >>> sliced.values\n        <pyarrow.lib.Int64Array object at ...>\n        [\n          1,\n          2,\n          3,\n          4,\n          null,\n          6\n        ]\n\n        "), 0},
    {"offsets", __pyx_getprop_7pyarrow_3lib_9ListArray_offsets, 0, PyDoc_STR("\n        Return the list offsets as an int32 array.\n\n        The returned array will not have a validity bitmap, so you cannot\n        expect to pass it to `ListArray.from_arrays` and get back the same\n        list array if the original one has nulls.\n\n        Returns\n        -------\n        offsets : Int32Array\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> array = pa.array([[1, 2], None, [3, 4, 5]])\n        >>> array.offsets\n        <pyarrow.lib.Int32Array object at ...>\n        [\n          0,\n          2,\n          2,\n          5\n        ]\n        "), 0},
    {0, 0, 0, 0, 0}
  };
  #if CYTHON_USE_TYPE_SPECS
  static PyType_Slot __pyx_type_7pyarrow_3lib_ListArray_slots[] = {
    {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_Array},
    {Py_tp_doc, (void *)PyDoc_STR("\n    Concrete class for Arrow arrays of a list data type.\n    ")},
    {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyarrow_3lib_Array},
    {Py_tp_clear, (void *)__pyx_tp_clear_7pyarrow_3lib_Array},
    {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_ListArray},
    {Py_tp_getset, (void *)__pyx_getsets_7pyarrow_3lib_ListArray},
    {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_ListArray},
    {0, 0},
  };
  static PyType_Spec __pyx_type_7pyarrow_3lib_ListArray_spec = {
    "pyarrow.lib.ListArray",
    sizeof(struct __pyx_obj_7pyarrow_3lib_ListArray),
    0,
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
    __pyx_type_7pyarrow_3lib_ListArray_slots,
  };
  #else

  static PyTypeObject __pyx_type_7pyarrow_3lib_ListArray = {
    PyVarObject_HEAD_INIT(0, 0)
    "pyarrow.lib.""ListArray", /*tp_name*/
    sizeof(struct __pyx_obj_7pyarrow_3lib_ListArray), /*tp_basicsize*/
    0, /*tp_itemsize*/
    __pyx_tp_dealloc_7pyarrow_3lib_Array, /*tp_dealloc*/
    0, /*tp_vectorcall_offset*/
    0, /*tp_getattr*/
    0, /*tp_setattr*/
    0, /*tp_as_async*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_32__repr__, /*tp_repr*/
    #else
    0, /*tp_repr*/
    #endif
    0, /*tp_as_number*/
    0, /*tp_as_sequence*/
    0, /*tp_as_mapping*/
    0, /*tp_hash*/
    0, /*tp_call*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_36__str__, /*tp_str*/
    #else
    0, /*tp_str*/
    #endif
    0, /*tp_getattro*/
    0, /*tp_setattro*/
    0, /*tp_as_buffer*/
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
    PyDoc_STR("\n    Concrete class for Arrow arrays of a list data type.\n    "), /*tp_doc*/
    __pyx_tp_traverse_7pyarrow_3lib_Array, /*tp_traverse*/
    __pyx_tp_clear_7pyarrow_3lib_Array, /*tp_clear*/
    0, /*tp_richcompare*/
    0, /*tp_weaklistoffset*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_29__iter__, /*tp_iter*/
    #else
    0, /*tp_iter*/
    #endif
    0, /*tp_iternext*/
    __pyx_methods_7pyarrow_3lib_ListArray, /*tp_methods*/
    0, /*tp_members*/
    __pyx_getsets_7pyarrow_3lib_ListArray, /*tp_getset*/
    0, /*tp_base*/
    0, /*tp_dict*/
    0, /*tp_descr_get*/
    0, /*tp_descr_set*/
    #if !CYTHON_USE_TYPE_SPECS
    0, /*tp_dictoffset*/
    #endif
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_1__init__, /*tp_init*/
    #else
    0, /*tp_init*/
    #endif
    0, /*tp_alloc*/
    __pyx_tp_new_7pyarrow_3lib_ListArray, /*tp_new*/
    0, /*tp_free*/
    0, /*tp_is_gc*/
    0, /*tp_bases*/
    0, /*tp_mro*/
    0, /*tp_cache*/
    0, /*tp_subclasses*/
    0, /*tp_weaklist*/
    0, /*tp_del*/
    0, /*tp_version_tag*/
    #if CYTHON_USE_TP_FINALIZE
    0, /*tp_finalize*/
    #else
    NULL, /*tp_finalize*/
    #endif
    #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
    0, /*tp_vectorcall*/
    #endif
    #if __PYX_NEED_TP_PRINT_SLOT == 1
    0, /*tp_print*/
    #endif
    #if PY_VERSION_HEX >= 0x030C0000
    0, /*tp_watched*/
    #endif
    #if PY_VERSION_HEX >= 0x030d00A4
    0, /*tp_versions_used*/
    #endif
    #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
    0, /*tp_pypy_flags*/
    #endif
  };
  #endif
  static struct __pyx_vtabstruct_7pyarrow_3lib_LargeListArray __pyx_vtable_7pyarrow_3lib_LargeListArray;

  static PyObject *__pyx_tp_new_7pyarrow_3lib_LargeListArray(PyTypeObject *t, PyObject *a, PyObject *k) {
    struct __pyx_obj_7pyarrow_3lib_LargeListArray *p;
    PyObject *o = __pyx_tp_new_7pyarrow_3lib_BaseListArray(t, a, k);
    if (unlikely(!o)) return 0;
    p = ((struct __pyx_obj_7pyarrow_3lib_LargeListArray *)o);
    p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_Array*)__pyx_vtabptr_7pyarrow_3lib_LargeListArray;
    return o;
  }

  static PyObject *__pyx_getprop_7pyarrow_3lib_14LargeListArray_values(PyObject *o, CYTHON_UNUSED void *x) {
    return __pyx_pw_7pyarrow_3lib_14LargeListArray_6values_1__get__(o);
  }

  static PyObject *__pyx_getprop_7pyarrow_3lib_14LargeListArray_offsets(PyObject *o, CYTHON_UNUSED void *x) {
    return __pyx_pw_7pyarrow_3lib_14LargeListArray_7offsets_1__get__(o);
  }

  static PyMethodDef __pyx_methods_7pyarrow_3lib_LargeListArray[] = {
    {"from_arrays", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_14LargeListArray_1from_arrays, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_14LargeListArray_from_arrays},
    {0, 0, 0, 0}
  };

  static struct PyGetSetDef __pyx_getsets_7pyarrow_3lib_LargeListArray[] = {
    {"values", __pyx_getprop_7pyarrow_3lib_14LargeListArray_values, 0, PyDoc_STR("\n        Return the underlying array of values which backs the LargeListArray\n        ignoring the array's offset.\n\n        If any of the list elements are null, but are backed by a\n        non-empty sub-list, those elements will be included in the\n        output.\n\n        Compare with :meth:`flatten`, which returns only the non-null\n        values taking into consideration the array's offset.\n\n        Returns\n        -------\n        values : Array\n\n        See Also\n        --------\n        LargeListArray.flatten : ...\n\n        Examples\n        --------\n\n        The values include null elements from the sub-lists:\n\n        >>> import pyarrow as pa\n        >>> array = pa.array(\n        ...     [[1, 2], None, [3, 4, None, 6]],\n        ...     type=pa.large_list(pa.int32()),\n        ... )\n        >>> array.values\n        <pyarrow.lib.Int32Array object at ...>\n        [\n          1,\n          2,\n          3,\n          4,\n          null,\n          6\n        ]\n\n        If an array is sliced, the slice still uses the same\n        underlying data as the original array, just with an\n        offset. Since values ignores the offset, the values are the\n        same:\n\n        >>> sliced = array.slice(1, 2)\n        >>> sliced\n        <pyarrow.lib.LargeListArray object at ...>\n        [\n          null,\n          [\n            3,\n            4,\n            null,\n            6\n          ]\n        ]\n        >>> sliced.values\n        <pyarrow.lib.Int32Array object at ...>\n        [\n          1,\n          2,\n          3,\n          4,\n          null,\n          6\n        ]\n        "), 0},
    {"offsets", __pyx_getprop_7pyarrow_3lib_14LargeListArray_offsets, 0, PyDoc_STR("\n        Return the list offsets as an int64 array.\n\n        The returned array will not have a validity bitmap, so you cannot\n        expect to pass it to `LargeListArray.from_arrays` and get back the\n        same list array if the original one has nulls.\n\n        Returns\n        -------\n        offsets : Int64Array\n        "), 0},
    {0, 0, 0, 0, 0}
  };
  #if CYTHON_USE_TYPE_SPECS
  static PyType_Slot __pyx_type_7pyarrow_3lib_LargeListArray_slots[] = {
    {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_Array},
    {Py_tp_doc, (void *)PyDoc_STR("\n    Concrete class for Arrow arrays of a large list data type.\n\n    Identical to ListArray, but 64-bit offsets.\n    ")},
    {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyarrow_3lib_Array},
    {Py_tp_clear, (void *)__pyx_tp_clear_7pyarrow_3lib_Array},
    {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_LargeListArray},
    {Py_tp_getset, (void *)__pyx_getsets_7pyarrow_3lib_LargeListArray},
    {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_LargeListArray},
    {0, 0},
  };
  static PyType_Spec __pyx_type_7pyarrow_3lib_LargeListArray_spec = {
    "pyarrow.lib.LargeListArray",
    sizeof(struct __pyx_obj_7pyarrow_3lib_LargeListArray),
    0,
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
    __pyx_type_7pyarrow_3lib_LargeListArray_slots,
  };
  #else

  static PyTypeObject __pyx_type_7pyarrow_3lib_LargeListArray = {
    PyVarObject_HEAD_INIT(0, 0)
    "pyarrow.lib.""LargeListArray", /*tp_name*/
    sizeof(struct __pyx_obj_7pyarrow_3lib_LargeListArray), /*tp_basicsize*/
    0, /*tp_itemsize*/
    __pyx_tp_dealloc_7pyarrow_3lib_Array, /*tp_dealloc*/
    0, /*tp_vectorcall_offset*/
    0, /*tp_getattr*/
    0, /*tp_setattr*/
    0, /*tp_as_async*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_32__repr__, /*tp_repr*/
    #else
    0, /*tp_repr*/
    #endif
    0, /*tp_as_number*/
    0, /*tp_as_sequence*/
    0, /*tp_as_mapping*/
    0, /*tp_hash*/
    0, /*tp_call*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_36__str__, /*tp_str*/
    #else
    0, /*tp_str*/
    #endif
    0, /*tp_getattro*/
    0, /*tp_setattro*/
    0, /*tp_as_buffer*/
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
    PyDoc_STR("\n    Concrete class for Arrow arrays of a large list data type.\n\n    Identical to ListArray, but 64-bit offsets.\n    "), /*tp_doc*/
    __pyx_tp_traverse_7pyarrow_3lib_Array, /*tp_traverse*/
    __pyx_tp_clear_7pyarrow_3lib_Array, /*tp_clear*/
    0, /*tp_richcompare*/
    0, /*tp_weaklistoffset*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_29__iter__, /*tp_iter*/
    #else
    0, /*tp_iter*/
    #endif
    0, /*tp_iternext*/
    __pyx_methods_7pyarrow_3lib_LargeListArray, /*tp_methods*/
    0, /*tp_members*/
    __pyx_getsets_7pyarrow_3lib_LargeListArray, /*tp_getset*/
    0, /*tp_base*/
    0, /*tp_dict*/
    0, /*tp_descr_get*/
    0, /*tp_descr_set*/
    #if !CYTHON_USE_TYPE_SPECS
    0, /*tp_dictoffset*/
    #endif
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_1__init__, /*tp_init*/
    #else
    0, /*tp_init*/
    #endif
    0, /*tp_alloc*/
    __pyx_tp_new_7pyarrow_3lib_LargeListArray, /*tp_new*/
    0, /*tp_free*/
    0, /*tp_is_gc*/
    0, /*tp_bases*/
    0, /*tp_mro*/
    0, /*tp_cache*/
    0, /*tp_subclasses*/
    0, /*tp_weaklist*/
    0, /*tp_del*/
    0, /*tp_version_tag*/
    #if CYTHON_USE_TP_FINALIZE
    0, /*tp_finalize*/
    #else
    NULL, /*tp_finalize*/
    #endif
    #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
    0, /*tp_vectorcall*/
    #endif
    #if __PYX_NEED_TP_PRINT_SLOT == 1
    0, /*tp_print*/
    #endif
    #if PY_VERSION_HEX >= 0x030C0000
    0, /*tp_watched*/
    #endif
    #if PY_VERSION_HEX >= 0x030d00A4
    0, /*tp_versions_used*/
    #endif
    #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
    0, /*tp_pypy_flags*/
    #endif
  };
  #endif
  static struct __pyx_vtabstruct_7pyarrow_3lib_ListViewArray __pyx_vtable_7pyarrow_3lib_ListViewArray;

  static PyObject *__pyx_tp_new_7pyarrow_3lib_ListViewArray(PyTypeObject *t, PyObject *a, PyObject *k) {
    struct __pyx_obj_7pyarrow_3lib_ListViewArray *p;
    PyObject *o = __pyx_tp_new_7pyarrow_3lib_BaseListArray(t, a, k);
    if (unlikely(!o)) return 0;
    p = ((struct __pyx_obj_7pyarrow_3lib_ListViewArray *)o);
    p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_Array*)__pyx_vtabptr_7pyarrow_3lib_ListViewArray;
    return o;
  }

  static PyObject *__pyx_getprop_7pyarrow_3lib_13ListViewArray_values(PyObject *o, CYTHON_UNUSED void *x) {
    return __pyx_pw_7pyarrow_3lib_13ListViewArray_6values_1__get__(o);
  }

  static PyObject *__pyx_getprop_7pyarrow_3lib_13ListViewArray_offsets(PyObject *o, CYTHON_UNUSED void *x) {
    return __pyx_pw_7pyarrow_3lib_13ListViewArray_7offsets_1__get__(o);
  }

  static PyObject *__pyx_getprop_7pyarrow_3lib_13ListViewArray_sizes(PyObject *o, CYTHON_UNUSED void *x) {
    return __pyx_pw_7pyarrow_3lib_13ListViewArray_5sizes_1__get__(o);
  }

  static PyMethodDef __pyx_methods_7pyarrow_3lib_ListViewArray[] = {
    {"from_arrays", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_13ListViewArray_1from_arrays, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_13ListViewArray_from_arrays},
    {0, 0, 0, 0}
  };

  static struct PyGetSetDef __pyx_getsets_7pyarrow_3lib_ListViewArray[] = {
    {"values", __pyx_getprop_7pyarrow_3lib_13ListViewArray_values, 0, PyDoc_STR("\n        Return the underlying array of values which backs the ListViewArray\n        ignoring the array's offset and sizes.\n\n        The values array may be out of order and/or contain additional values\n        that are not found in the logical representation of the array. The only\n        guarantee is that each non-null value in the ListView Array is contiguous.\n\n        Compare with :meth:`flatten`, which returns only the non-null\n        values taking into consideration the array's order and offset.\n\n        Returns\n        -------\n        values : Array\n\n        Examples\n        --------\n        The values include null elements from sub-lists:\n\n        >>> import pyarrow as pa\n        >>> values = [1, 2, None, 3, 4]\n        >>> offsets = [0, 0, 1]\n        >>> sizes = [2, 0, 4]\n        >>> array = pa.ListViewArray.from_arrays(offsets, sizes, values)\n        >>> array\n        <pyarrow.lib.ListViewArray object at ...>\n        [\n          [\n            1,\n            2\n          ],\n          [],\n          [\n            2,\n            null,\n            3,\n            4\n          ]\n        ]\n        >>> array.values\n        <pyarrow.lib.Int64Array object at ...>\n        [\n          1,\n          2,\n          null,\n          3,\n          4\n        ]\n        "), 0},
    {"offsets", __pyx_getprop_7pyarrow_3lib_13ListViewArray_offsets, 0, PyDoc_STR("\n        Return the list offsets as an int32 array.\n\n        The returned array will not have a validity bitmap, so you cannot\n        expect to pass it to `ListViewArray.from_arrays` and get back the same\n        list array if the original one has nulls.\n\n        Returns\n        -------\n        offsets : Int32Array\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> values = [1, 2, None, 3, 4]\n        >>> offsets = [0, 0, 1]\n        >>> sizes = [2, 0, 4]\n        >>> array = pa.ListViewArray.from_arrays(offsets, sizes, values)\n        >>> array.offsets\n        <pyarrow.lib.Int32Array object at ...>\n        [\n          0,\n          0,\n          1\n        ]\n        "), 0},
    {"sizes", __pyx_getprop_7pyarrow_3lib_13ListViewArray_sizes, 0, PyDoc_STR("\n        Return the list sizes as an int32 array.\n\n        The returned array will not have a validity bitmap, so you cannot\n        expect to pass it to `ListViewArray.from_arrays` and get back the same\n        list array if the original one has nulls.\n\n        Returns\n        -------\n        sizes : Int32Array\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> values = [1, 2, None, 3, 4]\n        >>> offsets = [0, 0, 1]\n        >>> sizes = [2, 0, 4]\n        >>> array = pa.ListViewArray.from_arrays(offsets, sizes, values)\n        >>> array.sizes\n        <pyarrow.lib.Int32Array object at ...>\n        [\n          2,\n          0,\n          4\n        ]\n        "), 0},
    {0, 0, 0, 0, 0}
  };
  #if CYTHON_USE_TYPE_SPECS
  static PyType_Slot __pyx_type_7pyarrow_3lib_ListViewArray_slots[] = {
    {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_Array},
    {Py_tp_doc, (void *)PyDoc_STR("\n    Concrete class for Arrow arrays of a list view data type.\n    ")},
    {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyarrow_3lib_Array},
    {Py_tp_clear, (void *)__pyx_tp_clear_7pyarrow_3lib_Array},
    {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_ListViewArray},
    {Py_tp_getset, (void *)__pyx_getsets_7pyarrow_3lib_ListViewArray},
    {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_ListViewArray},
    {0, 0},
  };
  static PyType_Spec __pyx_type_7pyarrow_3lib_ListViewArray_spec = {
    "pyarrow.lib.ListViewArray",
    sizeof(struct __pyx_obj_7pyarrow_3lib_ListViewArray),
    0,
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
    __pyx_type_7pyarrow_3lib_ListViewArray_slots,
  };
  #else

  static PyTypeObject __pyx_type_7pyarrow_3lib_ListViewArray = {
    PyVarObject_HEAD_INIT(0, 0)
    "pyarrow.lib.""ListViewArray", /*tp_name*/
    sizeof(struct __pyx_obj_7pyarrow_3lib_ListViewArray), /*tp_basicsize*/
    0, /*tp_itemsize*/
    __pyx_tp_dealloc_7pyarrow_3lib_Array, /*tp_dealloc*/
    0, /*tp_vectorcall_offset*/
    0, /*tp_getattr*/
    0, /*tp_setattr*/
    0, /*tp_as_async*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_32__repr__, /*tp_repr*/
    #else
    0, /*tp_repr*/
    #endif
    0, /*tp_as_number*/
    0, /*tp_as_sequence*/
    0, /*tp_as_mapping*/
    0, /*tp_hash*/
    0, /*tp_call*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_36__str__, /*tp_str*/
    #else
    0, /*tp_str*/
    #endif
    0, /*tp_getattro*/
    0, /*tp_setattro*/
    0, /*tp_as_buffer*/
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
    PyDoc_STR("\n    Concrete class for Arrow arrays of a list view data type.\n    "), /*tp_doc*/
    __pyx_tp_traverse_7pyarrow_3lib_Array, /*tp_traverse*/
    __pyx_tp_clear_7pyarrow_3lib_Array, /*tp_clear*/
    0, /*tp_richcompare*/
    0, /*tp_weaklistoffset*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_29__iter__, /*tp_iter*/
    #else
    0, /*tp_iter*/
    #endif
    0, /*tp_iternext*/
    __pyx_methods_7pyarrow_3lib_ListViewArray, /*tp_methods*/
    0, /*tp_members*/
    __pyx_getsets_7pyarrow_3lib_ListViewArray, /*tp_getset*/
    0, /*tp_base*/
    0, /*tp_dict*/
    0, /*tp_descr_get*/
    0, /*tp_descr_set*/
    #if !CYTHON_USE_TYPE_SPECS
    0, /*tp_dictoffset*/
    #endif
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_1__init__, /*tp_init*/
    #else
    0, /*tp_init*/
    #endif
    0, /*tp_alloc*/
    __pyx_tp_new_7pyarrow_3lib_ListViewArray, /*tp_new*/
    0, /*tp_free*/
    0, /*tp_is_gc*/
    0, /*tp_bases*/
    0, /*tp_mro*/
    0, /*tp_cache*/
    0, /*tp_subclasses*/
    0, /*tp_weaklist*/
    0, /*tp_del*/
    0, /*tp_version_tag*/
    #if CYTHON_USE_TP_FINALIZE
    0, /*tp_finalize*/
    #else
    NULL, /*tp_finalize*/
    #endif
    #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
    0, /*tp_vectorcall*/
    #endif
    #if __PYX_NEED_TP_PRINT_SLOT == 1
    0, /*tp_print*/
    #endif
    #if PY_VERSION_HEX >= 0x030C0000
    0, /*tp_watched*/
    #endif
    #if PY_VERSION_HEX >= 0x030d00A4
    0, /*tp_versions_used*/
    #endif
    #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
    0, /*tp_pypy_flags*/
    #endif
  };
  #endif
  static struct __pyx_vtabstruct_7pyarrow_3lib_LargeListViewArray __pyx_vtable_7pyarrow_3lib_LargeListViewArray;

  static PyObject *__pyx_tp_new_7pyarrow_3lib_LargeListViewArray(PyTypeObject *t, PyObject *a, PyObject *k) {
    struct __pyx_obj_7pyarrow_3lib_LargeListViewArray *p;
    PyObject *o = __pyx_tp_new_7pyarrow_3lib_BaseListArray(t, a, k);
    if (unlikely(!o)) return 0;
    p = ((struct __pyx_obj_7pyarrow_3lib_LargeListViewArray *)o);
    p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_Array*)__pyx_vtabptr_7pyarrow_3lib_LargeListViewArray;
    return o;
  }

  static PyObject *__pyx_getprop_7pyarrow_3lib_18LargeListViewArray_values(PyObject *o, CYTHON_UNUSED void *x) {
    return __pyx_pw_7pyarrow_3lib_18LargeListViewArray_6values_1__get__(o);
  }

  static PyObject *__pyx_getprop_7pyarrow_3lib_18LargeListViewArray_offsets(PyObject *o, CYTHON_UNUSED void *x) {
    return __pyx_pw_7pyarrow_3lib_18LargeListViewArray_7offsets_1__get__(o);
  }

  static PyObject *__pyx_getprop_7pyarrow_3lib_18LargeListViewArray_sizes(PyObject *o, CYTHON_UNUSED void *x) {
    return __pyx_pw_7pyarrow_3lib_18LargeListViewArray_5sizes_1__get__(o);
  }

  static PyMethodDef __pyx_methods_7pyarrow_3lib_LargeListViewArray[] = {
    {"from_arrays", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_18LargeListViewArray_1from_arrays, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_18LargeListViewArray_from_arrays},
    {0, 0, 0, 0}
  };

  static struct PyGetSetDef __pyx_getsets_7pyarrow_3lib_LargeListViewArray[] = {
    {"values", __pyx_getprop_7pyarrow_3lib_18LargeListViewArray_values, 0, PyDoc_STR("\n        Return the underlying array of values which backs the LargeListArray\n        ignoring the array's offset.\n\n        The values array may be out of order and/or contain additional values\n        that are not found in the logical representation of the array. The only\n        guarantee is that each non-null value in the ListView Array is contiguous.\n\n        Compare with :meth:`flatten`, which returns only the non-null\n        values taking into consideration the array's order and offset.\n\n        Returns\n        -------\n        values : Array\n\n        See Also\n        --------\n        LargeListArray.flatten : ...\n\n        Examples\n        --------\n\n        The values include null elements from sub-lists:\n\n        >>> import pyarrow as pa\n        >>> values = [1, 2, None, 3, 4]\n        >>> offsets = [0, 0, 1]\n        >>> sizes = [2, 0, 4]\n        >>> array = pa.LargeListViewArray.from_arrays(offsets, sizes, values)\n        >>> array\n        <pyarrow.lib.LargeListViewArray object at ...>\n        [\n          [\n            1,\n            2\n          ],\n          [],\n          [\n            2,\n            null,\n            3,\n            4\n          ]\n        ]\n        >>> array.values\n        <pyarrow.lib.Int64Array object at ...>\n        [\n          1,\n          2,\n          null,\n          3,\n          4\n        ]\n        "), 0},
    {"offsets", __pyx_getprop_7pyarrow_3lib_18LargeListViewArray_offsets, 0, PyDoc_STR("\n        Return the list view offsets as an int64 array.\n\n        The returned array will not have a validity bitmap, so you cannot\n        expect to pass it to `LargeListViewArray.from_arrays` and get back the\n        same list array if the original one has nulls.\n\n        Returns\n        -------\n        offsets : Int64Array\n\n        Examples\n        --------\n\n        >>> import pyarrow as pa\n        >>> values = [1, 2, None, 3, 4]\n        >>> offsets = [0, 0, 1]\n        >>> sizes = [2, 0, 4]\n        >>> array = pa.LargeListViewArray.from_arrays(offsets, sizes, values)\n        >>> array.offsets\n        <pyarrow.lib.Int64Array object at ...>\n        [\n          0,\n          0,\n          1\n        ]\n        "), 0},
    {"sizes", __pyx_getprop_7pyarrow_3lib_18LargeListViewArray_sizes, 0, PyDoc_STR("\n        Return the list view sizes as an int64 array.\n\n        The returned array will not have a validity bitmap, so you cannot\n        expect to pass it to `LargeListViewArray.from_arrays` and get back the\n        same list array if the original one has nulls.\n\n        Returns\n        -------\n        sizes : Int64Array\n\n        Examples\n        --------\n\n        >>> import pyarrow as pa\n        >>> values = [1, 2, None, 3, 4]\n        >>> offsets = [0, 0, 1]\n        >>> sizes = [2, 0, 4]\n        >>> array = pa.LargeListViewArray.from_arrays(offsets, sizes, values)\n        >>> array.sizes\n        <pyarrow.lib.Int64Array object at ...>\n        [\n          2,\n          0,\n          4\n        ]\n        "), 0},
    {0, 0, 0, 0, 0}
  };
  #if CYTHON_USE_TYPE_SPECS
  static PyType_Slot __pyx_type_7pyarrow_3lib_LargeListViewArray_slots[] = {
    {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_Array},
    {Py_tp_doc, (void *)PyDoc_STR("\n    Concrete class for Arrow arrays of a large list view data type.\n\n    Identical to ListViewArray, but with 64-bit offsets.\n    ")},
    {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyarrow_3lib_Array},
    {Py_tp_clear, (void *)__pyx_tp_clear_7pyarrow_3lib_Array},
    {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_LargeListViewArray},
    {Py_tp_getset, (void *)__pyx_getsets_7pyarrow_3lib_LargeListViewArray},
    {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_LargeListViewArray},
    {0, 0},
  };
  static PyType_Spec __pyx_type_7pyarrow_3lib_LargeListViewArray_spec = {
    "pyarrow.lib.LargeListViewArray",
    sizeof(struct __pyx_obj_7pyarrow_3lib_LargeListViewArray),
    0,
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
    __pyx_type_7pyarrow_3lib_LargeListViewArray_slots,
  };
  #else

  static PyTypeObject __pyx_type_7pyarrow_3lib_LargeListViewArray = {
    PyVarObject_HEAD_INIT(0, 0)
    "pyarrow.lib.""LargeListViewArray", /*tp_name*/
    sizeof(struct __pyx_obj_7pyarrow_3lib_LargeListViewArray), /*tp_basicsize*/
    0, /*tp_itemsize*/
    __pyx_tp_dealloc_7pyarrow_3lib_Array, /*tp_dealloc*/
    0, /*tp_vectorcall_offset*/
    0, /*tp_getattr*/
    0, /*tp_setattr*/
    0, /*tp_as_async*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_32__repr__, /*tp_repr*/
    #else
    0, /*tp_repr*/
    #endif
    0, /*tp_as_number*/
    0, /*tp_as_sequence*/
    0, /*tp_as_mapping*/
    0, /*tp_hash*/
    0, /*tp_call*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_36__str__, /*tp_str*/
    #else
    0, /*tp_str*/
    #endif
    0, /*tp_getattro*/
    0, /*tp_setattro*/
    0, /*tp_as_buffer*/
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
    PyDoc_STR("\n    Concrete class for Arrow arrays of a large list view data type.\n\n    Identical to ListViewArray, but with 64-bit offsets.\n    "), /*tp_doc*/
    __pyx_tp_traverse_7pyarrow_3lib_Array, /*tp_traverse*/
    __pyx_tp_clear_7pyarrow_3lib_Array, /*tp_clear*/
    0, /*tp_richcompare*/
    0, /*tp_weaklistoffset*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_29__iter__, /*tp_iter*/
    #else
    0, /*tp_iter*/
    #endif
    0, /*tp_iternext*/
    __pyx_methods_7pyarrow_3lib_LargeListViewArray, /*tp_methods*/
    0, /*tp_members*/
    __pyx_getsets_7pyarrow_3lib_LargeListViewArray, /*tp_getset*/
    0, /*tp_base*/
    0, /*tp_dict*/
    0, /*tp_descr_get*/
    0, /*tp_descr_set*/
    #if !CYTHON_USE_TYPE_SPECS
    0, /*tp_dictoffset*/
    #endif
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_1__init__, /*tp_init*/
    #else
    0, /*tp_init*/
    #endif
    0, /*tp_alloc*/
    __pyx_tp_new_7pyarrow_3lib_LargeListViewArray, /*tp_new*/
    0, /*tp_free*/
    0, /*tp_is_gc*/
    0, /*tp_bases*/
    0, /*tp_mro*/
    0, /*tp_cache*/
    0, /*tp_subclasses*/
    0, /*tp_weaklist*/
    0, /*tp_del*/
    0, /*tp_version_tag*/
    #if CYTHON_USE_TP_FINALIZE
    0, /*tp_finalize*/
    #else
    NULL, /*tp_finalize*/
    #endif
    #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
    0, /*tp_vectorcall*/
    #endif
    #if __PYX_NEED_TP_PRINT_SLOT == 1
    0, /*tp_print*/
    #endif
    #if PY_VERSION_HEX >= 0x030C0000
    0, /*tp_watched*/
    #endif
    #if PY_VERSION_HEX >= 0x030d00A4
    0, /*tp_versions_used*/
    #endif
    #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
    0, /*tp_pypy_flags*/
    #endif
  };
  #endif
  static struct __pyx_vtabstruct_7pyarrow_3lib_MapArray __pyx_vtable_7pyarrow_3lib_MapArray;

  static PyObject *__pyx_tp_new_7pyarrow_3lib_MapArray(PyTypeObject *t, PyObject *a, PyObject *k) {
    struct __pyx_obj_7pyarrow_3lib_MapArray *p;
    PyObject *o = __pyx_tp_new_7pyarrow_3lib_ListArray(t, a, k);
    if (unlikely(!o)) return 0;
    p = ((struct __pyx_obj_7pyarrow_3lib_MapArray *)o);
    p->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_Array*)__pyx_vtabptr_7pyarrow_3lib_MapArray;
    return o;
  }

  static PyObject *__pyx_getprop_7pyarrow_3lib_8MapArray_keys(PyObject *o, CYTHON_UNUSED void *x) {
    return __pyx_pw_7pyarrow_3lib_8MapArray_4keys_1__get__(o);
  }

  static PyObject *__pyx_getprop_7pyarrow_3lib_8MapArray_items(PyObject *o, CYTHON_UNUSED void *x) {
    return __pyx_pw_7pyarrow_3lib_8MapArray_5items_1__get__(o);
  }

  static PyMethodDef __pyx_methods_7pyarrow_3lib_MapArray[] = {
    {"from_arrays", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_8MapArray_1from_arrays, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_8MapArray_from_arrays},
    {0, 0, 0, 0}
  };

  static struct PyGetSetDef __pyx_getsets_7pyarrow_3lib_MapArray[] = {
    {"keys", __pyx_getprop_7pyarrow_3lib_8MapArray_keys, 0, PyDoc_STR("Flattened array of keys across all maps in array"), 0},
    {"items", __pyx_getprop_7pyarrow_3lib_8MapArray_items, 0, PyDoc_STR("Flattened array of items across all maps in array"), 0},
    {0, 0, 0, 0, 0}
  };
  #if CYTHON_USE_TYPE_SPECS
  static PyType_Slot __pyx_type_7pyarrow_3lib_MapArray_slots[] = {
    {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_Array},
    {Py_tp_doc, (void *)PyDoc_STR("\n    Concrete class for Arrow arrays of a map data type.\n    ")},
    {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyarrow_3lib_Array},
    {Py_tp_clear, (void *)__pyx_tp_clear_7pyarrow_3lib_Array},
    {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_MapArray},
    {Py_tp_getset, (void *)__pyx_getsets_7pyarrow_3lib_MapArray},
    {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_MapArray},
    {0, 0},
  };
  static PyType_Spec __pyx_type_7pyarrow_3lib_MapArray_spec = {
    "pyarrow.lib.MapArray",
    sizeof(struct __pyx_obj_7pyarrow_3lib_MapArray),
    0,
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
    __pyx_type_7pyarrow_3lib_MapArray_slots,
  };
  #else

  static PyTypeObject __pyx_type_7pyarrow_3lib_MapArray = {
    PyVarObject_HEAD_INIT(0, 0)
    "pyarrow.lib.""MapArray", /*tp_name*/
    sizeof(struct __pyx_obj_7pyarrow_3lib_MapArray), /*tp_basicsize*/
    0, /*tp_itemsize*/
    __pyx_tp_dealloc_7pyarrow_3lib_Array, /*tp_dealloc*/
    0, /*tp_vectorcall_offset*/
    0, /*tp_getattr*/
    0, /*tp_setattr*/
    0, /*tp_as_async*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_32__repr__, /*tp_repr*/
    #else
    0, /*tp_repr*/
    #endif
    0, /*tp_as_number*/
    0, /*tp_as_sequence*/
    0, /*tp_as_mapping*/
    0, /*tp_hash*/
    0, /*tp_call*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_36__str__, /*tp_str*/
    #else
    0, /*tp_str*/
    #endif
    0, /*tp_getattro*/
    0, /*tp_setattro*/
    0, /*tp_as_buffer*/
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
    PyDoc_STR("\n    Concrete class for Arrow arrays of a map data type.\n    "), /*tp_doc*/
    __pyx_tp_traverse_7pyarrow_3lib_Array, /*tp_traverse*/
    __pyx_tp_clear_7pyarrow_3lib_Array, /*tp_clear*/
    0, /*tp_richcompare*/
    0, /*tp_weaklistoffset*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_29__iter__, /*tp_iter*/
    #else
    0, /*tp_iter*/
    #endif
    0, /*tp_iternext*/
    __pyx_methods_7pyarrow_3lib_MapArray, /*tp_methods*/
    0, /*tp_members*/
    __pyx_getsets_7pyarrow_3lib_MapArray, /*tp_getset*/
    0, /*tp_base*/
    0, /*tp_dict*/
    0, /*tp_descr_get*/
    0, /*tp_descr_set*/
    #if !CYTHON_USE_TYPE_SPECS
    0, /*tp_dictoffset*/
    #endif
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_1__init__, /*tp_init*/
    #else
    0, /*tp_init*/
    #endif
    0, /*tp_alloc*/
    __pyx_tp_new_7pyarrow_3lib_MapArray, /*tp_new*/
    0, /*tp_free*/
    0, /*tp_is_gc*/
    0, /*tp_bases*/
    0, /*tp_mro*/
    0, /*tp_cache*/
    0, /*tp_subclasses*/
    0, /*tp_weaklist*/
    0, /*tp_del*/
    0, /*tp_version_tag*/
    #if CYTHON_USE_TP_FINALIZE
    0, /*tp_finalize*/
    #else
    NULL, /*tp_finalize*/
    #endif
    #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
    0, /*tp_vectorcall*/
    #endif
    #if __PYX_NEED_TP_PRINT_SLOT == 1
    0, /*tp_print*/
    #endif
    #if PY_VERSION_HEX >= 0x030C0000
    0, /*tp_watched*/
    #endif
    #if PY_VERSION_HEX >= 0x030d00A4
    0, /*tp_versions_used*/
    #endif
    #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
    0, /*tp_pypy_flags*/
    #endif
  };
  #endif
  static struct __pyx_vtabstruct_7pyarrow_3lib_FixedSizeListArray __pyx_vtable_7pyarrow_3lib_FixedSizeListArray;

  static PyObject *__pyx_tp_new_7pyarrow_3lib_FixedSizeListArray(PyTypeObject *t, PyObject *a, PyObject *k) {
    struct __pyx_obj_7pyarrow_3lib_FixedSizeListArray *p;
    PyObject *o = __pyx_tp_new_7pyarrow_3lib_BaseListArray(t, a, k);
    if (unlikely(!o)) return 0;
    p = ((struct __pyx_obj_7pyarrow_3lib_FixedSizeListArray *)o);
    p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_Array*)__pyx_vtabptr_7pyarrow_3lib_FixedSizeListArray;
    return o;
  }

  static PyObject *__pyx_getprop_7pyarrow_3lib_18FixedSizeListArray_values(PyObject *o, CYTHON_UNUSED void *x) {
    return __pyx_pw_7pyarrow_3lib_18FixedSizeListArray_6values_1__get__(o);
  }

  static PyMethodDef __pyx_methods_7pyarrow_3lib_FixedSizeListArray[] = {
    {"from_arrays", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_18FixedSizeListArray_1from_arrays, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_18FixedSizeListArray_from_arrays},
    {0, 0, 0, 0}
  };

  static struct PyGetSetDef __pyx_getsets_7pyarrow_3lib_FixedSizeListArray[] = {
    {"values", __pyx_getprop_7pyarrow_3lib_18FixedSizeListArray_values, 0, PyDoc_STR("\n        Return the underlying array of values which backs the\n        FixedSizeListArray ignoring the array's offset.\n\n        Note even null elements are included.\n\n        Compare with :meth:`flatten`, which returns only the non-null\n        sub-list values.\n\n        Returns\n        -------\n        values : Array\n\n        See Also\n        --------\n        FixedSizeListArray.flatten : ...\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> array = pa.array(\n        ...     [[1, 2], None, [3, None]],\n        ...     type=pa.list_(pa.int32(), 2)\n        ... )\n        >>> array.values\n        <pyarrow.lib.Int32Array object at ...>\n        [\n          1,\n          2,\n          null,\n          null,\n          3,\n          null\n        ]\n\n        "), 0},
    {0, 0, 0, 0, 0}
  };
  #if CYTHON_USE_TYPE_SPECS
  static PyType_Slot __pyx_type_7pyarrow_3lib_FixedSizeListArray_slots[] = {
    {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_Array},
    {Py_tp_doc, (void *)PyDoc_STR("\n    Concrete class for Arrow arrays of a fixed size list data type.\n    ")},
    {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyarrow_3lib_Array},
    {Py_tp_clear, (void *)__pyx_tp_clear_7pyarrow_3lib_Array},
    {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_FixedSizeListArray},
    {Py_tp_getset, (void *)__pyx_getsets_7pyarrow_3lib_FixedSizeListArray},
    {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_FixedSizeListArray},
    {0, 0},
  };
  static PyType_Spec __pyx_type_7pyarrow_3lib_FixedSizeListArray_spec = {
    "pyarrow.lib.FixedSizeListArray",
    sizeof(struct __pyx_obj_7pyarrow_3lib_FixedSizeListArray),
    0,
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
    __pyx_type_7pyarrow_3lib_FixedSizeListArray_slots,
  };
  #else

  static PyTypeObject __pyx_type_7pyarrow_3lib_FixedSizeListArray = {
    PyVarObject_HEAD_INIT(0, 0)
    "pyarrow.lib.""FixedSizeListArray", /*tp_name*/
    sizeof(struct __pyx_obj_7pyarrow_3lib_FixedSizeListArray), /*tp_basicsize*/
    0, /*tp_itemsize*/
    __pyx_tp_dealloc_7pyarrow_3lib_Array, /*tp_dealloc*/
    0, /*tp_vectorcall_offset*/
    0, /*tp_getattr*/
    0, /*tp_setattr*/
    0, /*tp_as_async*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_32__repr__, /*tp_repr*/
    #else
    0, /*tp_repr*/
    #endif
    0, /*tp_as_number*/
    0, /*tp_as_sequence*/
    0, /*tp_as_mapping*/
    0, /*tp_hash*/
    0, /*tp_call*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_36__str__, /*tp_str*/
    #else
    0, /*tp_str*/
    #endif
    0, /*tp_getattro*/
    0, /*tp_setattro*/
    0, /*tp_as_buffer*/
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
    PyDoc_STR("\n    Concrete class for Arrow arrays of a fixed size list data type.\n    "), /*tp_doc*/
    __pyx_tp_traverse_7pyarrow_3lib_Array, /*tp_traverse*/
    __pyx_tp_clear_7pyarrow_3lib_Array, /*tp_clear*/
    0, /*tp_richcompare*/
    0, /*tp_weaklistoffset*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_29__iter__, /*tp_iter*/
    #else
    0, /*tp_iter*/
    #endif
    0, /*tp_iternext*/
    __pyx_methods_7pyarrow_3lib_FixedSizeListArray, /*tp_methods*/
    0, /*tp_members*/
    __pyx_getsets_7pyarrow_3lib_FixedSizeListArray, /*tp_getset*/
    0, /*tp_base*/
    0, /*tp_dict*/
    0, /*tp_descr_get*/
    0, /*tp_descr_set*/
    #if !CYTHON_USE_TYPE_SPECS
    0, /*tp_dictoffset*/
    #endif
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_1__init__, /*tp_init*/
    #else
    0, /*tp_init*/
    #endif
    0, /*tp_alloc*/
    __pyx_tp_new_7pyarrow_3lib_FixedSizeListArray, /*tp_new*/
    0, /*tp_free*/
    0, /*tp_is_gc*/
    0, /*tp_bases*/
    0, /*tp_mro*/
    0, /*tp_cache*/
    0, /*tp_subclasses*/
    0, /*tp_weaklist*/
    0, /*tp_del*/
    0, /*tp_version_tag*/
    #if CYTHON_USE_TP_FINALIZE
    0, /*tp_finalize*/
    #else
    NULL, /*tp_finalize*/
    #endif
    #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
    0, /*tp_vectorcall*/
    #endif
    #if __PYX_NEED_TP_PRINT_SLOT == 1
    0, /*tp_print*/
    #endif
    #if PY_VERSION_HEX >= 0x030C0000
    0, /*tp_watched*/
    #endif
    #if PY_VERSION_HEX >= 0x030d00A4
    0, /*tp_versions_used*/
    #endif
    #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
    0, /*tp_pypy_flags*/
    #endif
  };
  #endif
  static struct __pyx_vtabstruct_7pyarrow_3lib_UnionArray __pyx_vtable_7pyarrow_3lib_UnionArray;

  static PyObject *__pyx_tp_new_7pyarrow_3lib_UnionArray(PyTypeObject *t, PyObject *a, PyObject *k) {
    struct __pyx_obj_7pyarrow_3lib_UnionArray *p;
    PyObject *o = __pyx_tp_new_7pyarrow_3lib_Array(t, a, k);
    if (unlikely(!o)) return 0;
    p = ((struct __pyx_obj_7pyarrow_3lib_UnionArray *)o);
    p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_Array*)__pyx_vtabptr_7pyarrow_3lib_UnionArray;
    return o;
  }

  static PyObject *__pyx_getprop_7pyarrow_3lib_10UnionArray_type_codes(PyObject *o, CYTHON_UNUSED void *x) {
    return __pyx_pw_7pyarrow_3lib_10UnionArray_10type_codes_1__get__(o);
  }

  static PyObject *__pyx_getprop_7pyarrow_3lib_10UnionArray_offsets(PyObject *o, CYTHON_UNUSED void *x) {
    return __pyx_pw_7pyarrow_3lib_10UnionArray_7offsets_1__get__(o);
  }

  static PyMethodDef __pyx_methods_7pyarrow_3lib_UnionArray[] = {
    {"child", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10UnionArray_1child, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10UnionArray_child},
    {"field", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10UnionArray_3field, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10UnionArray_2field},
    {"from_dense", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10UnionArray_5from_dense, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10UnionArray_4from_dense},
    {"from_sparse", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10UnionArray_7from_sparse, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10UnionArray_6from_sparse},
    {0, 0, 0, 0}
  };

  static struct PyGetSetDef __pyx_getsets_7pyarrow_3lib_UnionArray[] = {
    {"type_codes", __pyx_getprop_7pyarrow_3lib_10UnionArray_type_codes, 0, PyDoc_STR("Get the type codes array."), 0},
    {"offsets", __pyx_getprop_7pyarrow_3lib_10UnionArray_offsets, 0, PyDoc_STR("\n        Get the value offsets array (dense arrays only).\n\n        Does not account for any slice offset.\n        "), 0},
    {0, 0, 0, 0, 0}
  };
  #if CYTHON_USE_TYPE_SPECS
  static PyType_Slot __pyx_type_7pyarrow_3lib_UnionArray_slots[] = {
    {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_Array},
    {Py_tp_doc, (void *)PyDoc_STR("\n    Concrete class for Arrow arrays of a Union data type.\n    ")},
    {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyarrow_3lib_Array},
    {Py_tp_clear, (void *)__pyx_tp_clear_7pyarrow_3lib_Array},
    {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_UnionArray},
    {Py_tp_getset, (void *)__pyx_getsets_7pyarrow_3lib_UnionArray},
    {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_UnionArray},
    {0, 0},
  };
  static PyType_Spec __pyx_type_7pyarrow_3lib_UnionArray_spec = {
    "pyarrow.lib.UnionArray",
    sizeof(struct __pyx_obj_7pyarrow_3lib_UnionArray),
    0,
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
    __pyx_type_7pyarrow_3lib_UnionArray_slots,
  };
  #else

  static PyTypeObject __pyx_type_7pyarrow_3lib_UnionArray = {
    PyVarObject_HEAD_INIT(0, 0)
    "pyarrow.lib.""UnionArray", /*tp_name*/
    sizeof(struct __pyx_obj_7pyarrow_3lib_UnionArray), /*tp_basicsize*/
    0, /*tp_itemsize*/
    __pyx_tp_dealloc_7pyarrow_3lib_Array, /*tp_dealloc*/
    0, /*tp_vectorcall_offset*/
    0, /*tp_getattr*/
    0, /*tp_setattr*/
    0, /*tp_as_async*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_32__repr__, /*tp_repr*/
    #else
    0, /*tp_repr*/
    #endif
    0, /*tp_as_number*/
    0, /*tp_as_sequence*/
    0, /*tp_as_mapping*/
    0, /*tp_hash*/
    0, /*tp_call*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_36__str__, /*tp_str*/
    #else
    0, /*tp_str*/
    #endif
    0, /*tp_getattro*/
    0, /*tp_setattro*/
    0, /*tp_as_buffer*/
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
    PyDoc_STR("\n    Concrete class for Arrow arrays of a Union data type.\n    "), /*tp_doc*/
    __pyx_tp_traverse_7pyarrow_3lib_Array, /*tp_traverse*/
    __pyx_tp_clear_7pyarrow_3lib_Array, /*tp_clear*/
    0, /*tp_richcompare*/
    0, /*tp_weaklistoffset*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_29__iter__, /*tp_iter*/
    #else
    0, /*tp_iter*/
    #endif
    0, /*tp_iternext*/
    __pyx_methods_7pyarrow_3lib_UnionArray, /*tp_methods*/
    0, /*tp_members*/
    __pyx_getsets_7pyarrow_3lib_UnionArray, /*tp_getset*/
    0, /*tp_base*/
    0, /*tp_dict*/
    0, /*tp_descr_get*/
    0, /*tp_descr_set*/
    #if !CYTHON_USE_TYPE_SPECS
    0, /*tp_dictoffset*/
    #endif
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_1__init__, /*tp_init*/
    #else
    0, /*tp_init*/
    #endif
    0, /*tp_alloc*/
    __pyx_tp_new_7pyarrow_3lib_UnionArray, /*tp_new*/
    0, /*tp_free*/
    0, /*tp_is_gc*/
    0, /*tp_bases*/
    0, /*tp_mro*/
    0, /*tp_cache*/
    0, /*tp_subclasses*/
    0, /*tp_weaklist*/
    0, /*tp_del*/
    0, /*tp_version_tag*/
    #if CYTHON_USE_TP_FINALIZE
    0, /*tp_finalize*/
    #else
    NULL, /*tp_finalize*/
    #endif
    #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
    0, /*tp_vectorcall*/
    #endif
    #if __PYX_NEED_TP_PRINT_SLOT == 1
    0, /*tp_print*/
    #endif
    #if PY_VERSION_HEX >= 0x030C0000
    0, /*tp_watched*/
    #endif
    #if PY_VERSION_HEX >= 0x030d00A4
    0, /*tp_versions_used*/
    #endif
    #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
    0, /*tp_pypy_flags*/
    #endif
  };
  #endif
  static struct __pyx_vtabstruct_7pyarrow_3lib_StringArray __pyx_vtable_7pyarrow_3lib_StringArray;

  static PyObject *__pyx_tp_new_7pyarrow_3lib_StringArray(PyTypeObject *t, PyObject *a, PyObject *k) {
    struct __pyx_obj_7pyarrow_3lib_StringArray *p;
    PyObject *o = __pyx_tp_new_7pyarrow_3lib_Array(t, a, k);
    if (unlikely(!o)) return 0;
    p = ((struct __pyx_obj_7pyarrow_3lib_StringArray *)o);
    p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_Array*)__pyx_vtabptr_7pyarrow_3lib_StringArray;
    return o;
  }

  static PyMethodDef __pyx_methods_7pyarrow_3lib_StringArray[] = {
    {"from_buffers", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_11StringArray_1from_buffers, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_11StringArray_from_buffers},
    {0, 0, 0, 0}
  };
  #if CYTHON_USE_TYPE_SPECS
  static PyType_Slot __pyx_type_7pyarrow_3lib_StringArray_slots[] = {
    {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_Array},
    {Py_tp_doc, (void *)PyDoc_STR("\n    Concrete class for Arrow arrays of string (or utf8) data type.\n    ")},
    {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyarrow_3lib_Array},
    {Py_tp_clear, (void *)__pyx_tp_clear_7pyarrow_3lib_Array},
    {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_StringArray},
    {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_StringArray},
    {0, 0},
  };
  static PyType_Spec __pyx_type_7pyarrow_3lib_StringArray_spec = {
    "pyarrow.lib.StringArray",
    sizeof(struct __pyx_obj_7pyarrow_3lib_StringArray),
    0,
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
    __pyx_type_7pyarrow_3lib_StringArray_slots,
  };
  #else

  static PyTypeObject __pyx_type_7pyarrow_3lib_StringArray = {
    PyVarObject_HEAD_INIT(0, 0)
    "pyarrow.lib.""StringArray", /*tp_name*/
    sizeof(struct __pyx_obj_7pyarrow_3lib_StringArray), /*tp_basicsize*/
    0, /*tp_itemsize*/
    __pyx_tp_dealloc_7pyarrow_3lib_Array, /*tp_dealloc*/
    0, /*tp_vectorcall_offset*/
    0, /*tp_getattr*/
    0, /*tp_setattr*/
    0, /*tp_as_async*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_32__repr__, /*tp_repr*/
    #else
    0, /*tp_repr*/
    #endif
    0, /*tp_as_number*/
    0, /*tp_as_sequence*/
    0, /*tp_as_mapping*/
    0, /*tp_hash*/
    0, /*tp_call*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_36__str__, /*tp_str*/
    #else
    0, /*tp_str*/
    #endif
    0, /*tp_getattro*/
    0, /*tp_setattro*/
    0, /*tp_as_buffer*/
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
    PyDoc_STR("\n    Concrete class for Arrow arrays of string (or utf8) data type.\n    "), /*tp_doc*/
    __pyx_tp_traverse_7pyarrow_3lib_Array, /*tp_traverse*/
    __pyx_tp_clear_7pyarrow_3lib_Array, /*tp_clear*/
    0, /*tp_richcompare*/
    0, /*tp_weaklistoffset*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_29__iter__, /*tp_iter*/
    #else
    0, /*tp_iter*/
    #endif
    0, /*tp_iternext*/
    __pyx_methods_7pyarrow_3lib_StringArray, /*tp_methods*/
    0, /*tp_members*/
    0, /*tp_getset*/
    0, /*tp_base*/
    0, /*tp_dict*/
    0, /*tp_descr_get*/
    0, /*tp_descr_set*/
    #if !CYTHON_USE_TYPE_SPECS
    0, /*tp_dictoffset*/
    #endif
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_1__init__, /*tp_init*/
    #else
    0, /*tp_init*/
    #endif
    0, /*tp_alloc*/
    __pyx_tp_new_7pyarrow_3lib_StringArray, /*tp_new*/
    0, /*tp_free*/
    0, /*tp_is_gc*/
    0, /*tp_bases*/
    0, /*tp_mro*/
    0, /*tp_cache*/
    0, /*tp_subclasses*/
    0, /*tp_weaklist*/
    0, /*tp_del*/
    0, /*tp_version_tag*/
    #if CYTHON_USE_TP_FINALIZE
    0, /*tp_finalize*/
    #else
    NULL, /*tp_finalize*/
    #endif
    #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
    0, /*tp_vectorcall*/
    #endif
    #if __PYX_NEED_TP_PRINT_SLOT == 1
    0, /*tp_print*/
    #endif
    #if PY_VERSION_HEX >= 0x030C0000
    0, /*tp_watched*/
    #endif
    #if PY_VERSION_HEX >= 0x030d00A4
    0, /*tp_versions_used*/
    #endif
    #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
    0, /*tp_pypy_flags*/
    #endif
  };
  #endif
  static struct __pyx_vtabstruct_7pyarrow_3lib_BinaryArray __pyx_vtable_7pyarrow_3lib_BinaryArray;

  static PyObject *__pyx_tp_new_7pyarrow_3lib_BinaryArray(PyTypeObject *t, PyObject *a, PyObject *k) {
    struct __pyx_obj_7pyarrow_3lib_BinaryArray *p;
    PyObject *o = __pyx_tp_new_7pyarrow_3lib_Array(t, a, k);
    if (unlikely(!o)) return 0;
    p = ((struct __pyx_obj_7pyarrow_3lib_BinaryArray *)o);
    p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_Array*)__pyx_vtabptr_7pyarrow_3lib_BinaryArray;
    return o;
  }

  static PyObject *__pyx_getprop_7pyarrow_3lib_11BinaryArray_total_values_length(PyObject *o, CYTHON_UNUSED void *x) {
    return __pyx_pw_7pyarrow_3lib_11BinaryArray_19total_values_length_1__get__(o);
  }

  static struct PyGetSetDef __pyx_getsets_7pyarrow_3lib_BinaryArray[] = {
    {"total_values_length", __pyx_getprop_7pyarrow_3lib_11BinaryArray_total_values_length, 0, PyDoc_STR("\n        The number of bytes from beginning to end of the data buffer addressed\n        by the offsets of this BinaryArray.\n        "), 0},
    {0, 0, 0, 0, 0}
  };
  #if CYTHON_USE_TYPE_SPECS
  static PyType_Slot __pyx_type_7pyarrow_3lib_BinaryArray_slots[] = {
    {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_Array},
    {Py_tp_doc, (void *)PyDoc_STR("\n    Concrete class for Arrow arrays of variable-sized binary data type.\n    ")},
    {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyarrow_3lib_Array},
    {Py_tp_clear, (void *)__pyx_tp_clear_7pyarrow_3lib_Array},
    {Py_tp_getset, (void *)__pyx_getsets_7pyarrow_3lib_BinaryArray},
    {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_BinaryArray},
    {0, 0},
  };
  static PyType_Spec __pyx_type_7pyarrow_3lib_BinaryArray_spec = {
    "pyarrow.lib.BinaryArray",
    sizeof(struct __pyx_obj_7pyarrow_3lib_BinaryArray),
    0,
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
    __pyx_type_7pyarrow_3lib_BinaryArray_slots,
  };
  #else

  static PyTypeObject __pyx_type_7pyarrow_3lib_BinaryArray = {
    PyVarObject_HEAD_INIT(0, 0)
    "pyarrow.lib.""BinaryArray", /*tp_name*/
    sizeof(struct __pyx_obj_7pyarrow_3lib_BinaryArray), /*tp_basicsize*/
    0, /*tp_itemsize*/
    __pyx_tp_dealloc_7pyarrow_3lib_Array, /*tp_dealloc*/
    0, /*tp_vectorcall_offset*/
    0, /*tp_getattr*/
    0, /*tp_setattr*/
    0, /*tp_as_async*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_32__repr__, /*tp_repr*/
    #else
    0, /*tp_repr*/
    #endif
    0, /*tp_as_number*/
    0, /*tp_as_sequence*/
    0, /*tp_as_mapping*/
    0, /*tp_hash*/
    0, /*tp_call*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_36__str__, /*tp_str*/
    #else
    0, /*tp_str*/
    #endif
    0, /*tp_getattro*/
    0, /*tp_setattro*/
    0, /*tp_as_buffer*/
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
    PyDoc_STR("\n    Concrete class for Arrow arrays of variable-sized binary data type.\n    "), /*tp_doc*/
    __pyx_tp_traverse_7pyarrow_3lib_Array, /*tp_traverse*/
    __pyx_tp_clear_7pyarrow_3lib_Array, /*tp_clear*/
    0, /*tp_richcompare*/
    0, /*tp_weaklistoffset*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_29__iter__, /*tp_iter*/
    #else
    0, /*tp_iter*/
    #endif
    0, /*tp_iternext*/
    0, /*tp_methods*/
    0, /*tp_members*/
    __pyx_getsets_7pyarrow_3lib_BinaryArray, /*tp_getset*/
    0, /*tp_base*/
    0, /*tp_dict*/
    0, /*tp_descr_get*/
    0, /*tp_descr_set*/
    #if !CYTHON_USE_TYPE_SPECS
    0, /*tp_dictoffset*/
    #endif
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_1__init__, /*tp_init*/
    #else
    0, /*tp_init*/
    #endif
    0, /*tp_alloc*/
    __pyx_tp_new_7pyarrow_3lib_BinaryArray, /*tp_new*/
    0, /*tp_free*/
    0, /*tp_is_gc*/
    0, /*tp_bases*/
    0, /*tp_mro*/
    0, /*tp_cache*/
    0, /*tp_subclasses*/
    0, /*tp_weaklist*/
    0, /*tp_del*/
    0, /*tp_version_tag*/
    #if CYTHON_USE_TP_FINALIZE
    0, /*tp_finalize*/
    #else
    NULL, /*tp_finalize*/
    #endif
    #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
    0, /*tp_vectorcall*/
    #endif
    #if __PYX_NEED_TP_PRINT_SLOT == 1
    0, /*tp_print*/
    #endif
    #if PY_VERSION_HEX >= 0x030C0000
    0, /*tp_watched*/
    #endif
    #if PY_VERSION_HEX >= 0x030d00A4
    0, /*tp_versions_used*/
    #endif
    #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
    0, /*tp_pypy_flags*/
    #endif
  };
  #endif
  static struct __pyx_vtabstruct_7pyarrow_3lib_StringViewArray __pyx_vtable_7pyarrow_3lib_StringViewArray;

  static PyObject *__pyx_tp_new_7pyarrow_3lib_StringViewArray(PyTypeObject *t, PyObject *a, PyObject *k) {
    struct __pyx_obj_7pyarrow_3lib_StringViewArray *p;
    PyObject *o = __pyx_tp_new_7pyarrow_3lib_Array(t, a, k);
    if (unlikely(!o)) return 0;
    p = ((struct __pyx_obj_7pyarrow_3lib_StringViewArray *)o);
    p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_Array*)__pyx_vtabptr_7pyarrow_3lib_StringViewArray;
    return o;
  }
  #if CYTHON_USE_TYPE_SPECS
  static PyType_Slot __pyx_type_7pyarrow_3lib_StringViewArray_slots[] = {
    {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_Array},
    {Py_tp_doc, (void *)PyDoc_STR("\n    Concrete class for Arrow arrays of string (or utf8) view data type.\n    ")},
    {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyarrow_3lib_Array},
    {Py_tp_clear, (void *)__pyx_tp_clear_7pyarrow_3lib_Array},
    {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_StringViewArray},
    {0, 0},
  };
  static PyType_Spec __pyx_type_7pyarrow_3lib_StringViewArray_spec = {
    "pyarrow.lib.StringViewArray",
    sizeof(struct __pyx_obj_7pyarrow_3lib_StringViewArray),
    0,
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
    __pyx_type_7pyarrow_3lib_StringViewArray_slots,
  };
  #else

  static PyTypeObject __pyx_type_7pyarrow_3lib_StringViewArray = {
    PyVarObject_HEAD_INIT(0, 0)
    "pyarrow.lib.""StringViewArray", /*tp_name*/
    sizeof(struct __pyx_obj_7pyarrow_3lib_StringViewArray), /*tp_basicsize*/
    0, /*tp_itemsize*/
    __pyx_tp_dealloc_7pyarrow_3lib_Array, /*tp_dealloc*/
    0, /*tp_vectorcall_offset*/
    0, /*tp_getattr*/
    0, /*tp_setattr*/
    0, /*tp_as_async*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_32__repr__, /*tp_repr*/
    #else
    0, /*tp_repr*/
    #endif
    0, /*tp_as_number*/
    0, /*tp_as_sequence*/
    0, /*tp_as_mapping*/
    0, /*tp_hash*/
    0, /*tp_call*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_36__str__, /*tp_str*/
    #else
    0, /*tp_str*/
    #endif
    0, /*tp_getattro*/
    0, /*tp_setattro*/
    0, /*tp_as_buffer*/
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
    PyDoc_STR("\n    Concrete class for Arrow arrays of string (or utf8) view data type.\n    "), /*tp_doc*/
    __pyx_tp_traverse_7pyarrow_3lib_Array, /*tp_traverse*/
    __pyx_tp_clear_7pyarrow_3lib_Array, /*tp_clear*/
    0, /*tp_richcompare*/
    0, /*tp_weaklistoffset*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_29__iter__, /*tp_iter*/
    #else
    0, /*tp_iter*/
    #endif
    0, /*tp_iternext*/
    0, /*tp_methods*/
    0, /*tp_members*/
    0, /*tp_getset*/
    0, /*tp_base*/
    0, /*tp_dict*/
    0, /*tp_descr_get*/
    0, /*tp_descr_set*/
    #if !CYTHON_USE_TYPE_SPECS
    0, /*tp_dictoffset*/
    #endif
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_1__init__, /*tp_init*/
    #else
    0, /*tp_init*/
    #endif
    0, /*tp_alloc*/
    __pyx_tp_new_7pyarrow_3lib_StringViewArray, /*tp_new*/
    0, /*tp_free*/
    0, /*tp_is_gc*/
    0, /*tp_bases*/
    0, /*tp_mro*/
    0, /*tp_cache*/
    0, /*tp_subclasses*/
    0, /*tp_weaklist*/
    0, /*tp_del*/
    0, /*tp_version_tag*/
    #if CYTHON_USE_TP_FINALIZE
    0, /*tp_finalize*/
    #else
    NULL, /*tp_finalize*/
    #endif
    #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
    0, /*tp_vectorcall*/
    #endif
    #if __PYX_NEED_TP_PRINT_SLOT == 1
    0, /*tp_print*/
    #endif
    #if PY_VERSION_HEX >= 0x030C0000
    0, /*tp_watched*/
    #endif
    #if PY_VERSION_HEX >= 0x030d00A4
    0, /*tp_versions_used*/
    #endif
    #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
    0, /*tp_pypy_flags*/
    #endif
  };
  #endif
  static struct __pyx_vtabstruct_7pyarrow_3lib_BinaryViewArray __pyx_vtable_7pyarrow_3lib_BinaryViewArray;

  static PyObject *__pyx_tp_new_7pyarrow_3lib_BinaryViewArray(PyTypeObject *t, PyObject *a, PyObject *k) {
    struct __pyx_obj_7pyarrow_3lib_BinaryViewArray *p;
    PyObject *o = __pyx_tp_new_7pyarrow_3lib_Array(t, a, k);
    if (unlikely(!o)) return 0;
    p = ((struct __pyx_obj_7pyarrow_3lib_BinaryViewArray *)o);
    p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_Array*)__pyx_vtabptr_7pyarrow_3lib_BinaryViewArray;
    return o;
  }
  #if CYTHON_USE_TYPE_SPECS
  static PyType_Slot __pyx_type_7pyarrow_3lib_BinaryViewArray_slots[] = {
    {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_Array},
    {Py_tp_doc, (void *)PyDoc_STR("\n    Concrete class for Arrow arrays of variable-sized binary view data type.\n    ")},
    {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyarrow_3lib_Array},
    {Py_tp_clear, (void *)__pyx_tp_clear_7pyarrow_3lib_Array},
    {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_BinaryViewArray},
    {0, 0},
  };
  static PyType_Spec __pyx_type_7pyarrow_3lib_BinaryViewArray_spec = {
    "pyarrow.lib.BinaryViewArray",
    sizeof(struct __pyx_obj_7pyarrow_3lib_BinaryViewArray),
    0,
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
    __pyx_type_7pyarrow_3lib_BinaryViewArray_slots,
  };
  #else

  static PyTypeObject __pyx_type_7pyarrow_3lib_BinaryViewArray = {
    PyVarObject_HEAD_INIT(0, 0)
    "pyarrow.lib.""BinaryViewArray", /*tp_name*/
    sizeof(struct __pyx_obj_7pyarrow_3lib_BinaryViewArray), /*tp_basicsize*/
    0, /*tp_itemsize*/
    __pyx_tp_dealloc_7pyarrow_3lib_Array, /*tp_dealloc*/
    0, /*tp_vectorcall_offset*/
    0, /*tp_getattr*/
    0, /*tp_setattr*/
    0, /*tp_as_async*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_32__repr__, /*tp_repr*/
    #else
    0, /*tp_repr*/
    #endif
    0, /*tp_as_number*/
    0, /*tp_as_sequence*/
    0, /*tp_as_mapping*/
    0, /*tp_hash*/
    0, /*tp_call*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_36__str__, /*tp_str*/
    #else
    0, /*tp_str*/
    #endif
    0, /*tp_getattro*/
    0, /*tp_setattro*/
    0, /*tp_as_buffer*/
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
    PyDoc_STR("\n    Concrete class for Arrow arrays of variable-sized binary view data type.\n    "), /*tp_doc*/
    __pyx_tp_traverse_7pyarrow_3lib_Array, /*tp_traverse*/
    __pyx_tp_clear_7pyarrow_3lib_Array, /*tp_clear*/
    0, /*tp_richcompare*/
    0, /*tp_weaklistoffset*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_29__iter__, /*tp_iter*/
    #else
    0, /*tp_iter*/
    #endif
    0, /*tp_iternext*/
    0, /*tp_methods*/
    0, /*tp_members*/
    0, /*tp_getset*/
    0, /*tp_base*/
    0, /*tp_dict*/
    0, /*tp_descr_get*/
    0, /*tp_descr_set*/
    #if !CYTHON_USE_TYPE_SPECS
    0, /*tp_dictoffset*/
    #endif
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_1__init__, /*tp_init*/
    #else
    0, /*tp_init*/
    #endif
    0, /*tp_alloc*/
    __pyx_tp_new_7pyarrow_3lib_BinaryViewArray, /*tp_new*/
    0, /*tp_free*/
    0, /*tp_is_gc*/
    0, /*tp_bases*/
    0, /*tp_mro*/
    0, /*tp_cache*/
    0, /*tp_subclasses*/
    0, /*tp_weaklist*/
    0, /*tp_del*/
    0, /*tp_version_tag*/
    #if CYTHON_USE_TP_FINALIZE
    0, /*tp_finalize*/
    #else
    NULL, /*tp_finalize*/
    #endif
    #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
    0, /*tp_vectorcall*/
    #endif
    #if __PYX_NEED_TP_PRINT_SLOT == 1
    0, /*tp_print*/
    #endif
    #if PY_VERSION_HEX >= 0x030C0000
    0, /*tp_watched*/
    #endif
    #if PY_VERSION_HEX >= 0x030d00A4
    0, /*tp_versions_used*/
    #endif
    #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
    0, /*tp_pypy_flags*/
    #endif
  };
  #endif
  static struct __pyx_vtabstruct_7pyarrow_3lib_DictionaryArray __pyx_vtable_7pyarrow_3lib_DictionaryArray;

  static PyObject *__pyx_tp_new_7pyarrow_3lib_DictionaryArray(PyTypeObject *t, PyObject *a, PyObject *k) {
    struct __pyx_obj_7pyarrow_3lib_DictionaryArray *p;
    PyObject *o = __pyx_tp_new_7pyarrow_3lib_Array(t, a, k);
    if (unlikely(!o)) return 0;
    p = ((struct __pyx_obj_7pyarrow_3lib_DictionaryArray *)o);
    p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_Array*)__pyx_vtabptr_7pyarrow_3lib_DictionaryArray;
    p->_indices = Py_None; Py_INCREF(Py_None);
    p->_dictionary = Py_None; Py_INCREF(Py_None);
    return o;
  }

  static void __pyx_tp_dealloc_7pyarrow_3lib_DictionaryArray(PyObject *o) {
    struct __pyx_obj_7pyarrow_3lib_DictionaryArray *p = (struct __pyx_obj_7pyarrow_3lib_DictionaryArray *)o;
    #if CYTHON_USE_TP_FINALIZE
    if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
      if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_7pyarrow_3lib_DictionaryArray) {
        if (PyObject_CallFinalizerFromDealloc(o)) return;
      }
    }
    #endif
    PyObject_GC_UnTrack(o);
    Py_CLEAR(p->_indices);
    Py_CLEAR(p->_dictionary);
    PyObject_GC_Track(o);
    __pyx_tp_dealloc_7pyarrow_3lib_Array(o);
  }

  static int __pyx_tp_traverse_7pyarrow_3lib_DictionaryArray(PyObject *o, visitproc v, void *a) {
    int e;
    struct __pyx_obj_7pyarrow_3lib_DictionaryArray *p = (struct __pyx_obj_7pyarrow_3lib_DictionaryArray *)o;
    e = __pyx_tp_traverse_7pyarrow_3lib_Array(o, v, a); if (e) return e;
    if (p->_indices) {
      e = (*v)(p->_indices, a); if (e) return e;
    }
    if (p->_dictionary) {
      e = (*v)(p->_dictionary, a); if (e) return e;
    }
    return 0;
  }

  static int __pyx_tp_clear_7pyarrow_3lib_DictionaryArray(PyObject *o) {
    PyObject* tmp;
    struct __pyx_obj_7pyarrow_3lib_DictionaryArray *p = (struct __pyx_obj_7pyarrow_3lib_DictionaryArray *)o;
    __pyx_tp_clear_7pyarrow_3lib_Array(o);
    tmp = ((PyObject*)p->_indices);
    p->_indices = Py_None; Py_INCREF(Py_None);
    Py_XDECREF(tmp);
    tmp = ((PyObject*)p->_dictionary);
    p->_dictionary = Py_None; Py_INCREF(Py_None);
    Py_XDECREF(tmp);
    return 0;
  }

  static PyObject *__pyx_getprop_7pyarrow_3lib_15DictionaryArray_dictionary(PyObject *o, CYTHON_UNUSED void *x) {
    return __pyx_pw_7pyarrow_3lib_15DictionaryArray_10dictionary_1__get__(o);
  }

  static PyObject *__pyx_getprop_7pyarrow_3lib_15DictionaryArray_indices(PyObject *o, CYTHON_UNUSED void *x) {
    return __pyx_pw_7pyarrow_3lib_15DictionaryArray_7indices_1__get__(o);
  }

  static PyMethodDef __pyx_methods_7pyarrow_3lib_DictionaryArray[] = {
    {"dictionary_encode", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15DictionaryArray_1dictionary_encode, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15DictionaryArray_dictionary_encode},
    {"dictionary_decode", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15DictionaryArray_3dictionary_decode, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15DictionaryArray_2dictionary_decode},
    {"from_buffers", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15DictionaryArray_5from_buffers, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15DictionaryArray_4from_buffers},
    {"from_arrays", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15DictionaryArray_7from_arrays, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15DictionaryArray_6from_arrays},
    {0, 0, 0, 0}
  };

  static struct PyGetSetDef __pyx_getsets_7pyarrow_3lib_DictionaryArray[] = {
    {"dictionary", __pyx_getprop_7pyarrow_3lib_15DictionaryArray_dictionary, 0, 0, 0},
    {"indices", __pyx_getprop_7pyarrow_3lib_15DictionaryArray_indices, 0, 0, 0},
    {0, 0, 0, 0, 0}
  };
  #if CYTHON_USE_TYPE_SPECS
  static PyType_Slot __pyx_type_7pyarrow_3lib_DictionaryArray_slots[] = {
    {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_DictionaryArray},
    {Py_tp_doc, (void *)PyDoc_STR("\n    Concrete class for dictionary-encoded Arrow arrays.\n    ")},
    {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyarrow_3lib_DictionaryArray},
    {Py_tp_clear, (void *)__pyx_tp_clear_7pyarrow_3lib_DictionaryArray},
    {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_DictionaryArray},
    {Py_tp_getset, (void *)__pyx_getsets_7pyarrow_3lib_DictionaryArray},
    {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_DictionaryArray},
    {0, 0},
  };
  static PyType_Spec __pyx_type_7pyarrow_3lib_DictionaryArray_spec = {
    "pyarrow.lib.DictionaryArray",
    sizeof(struct __pyx_obj_7pyarrow_3lib_DictionaryArray),
    0,
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
    __pyx_type_7pyarrow_3lib_DictionaryArray_slots,
  };
  #else

  static PyTypeObject __pyx_type_7pyarrow_3lib_DictionaryArray = {
    PyVarObject_HEAD_INIT(0, 0)
    "pyarrow.lib.""DictionaryArray", /*tp_name*/
    sizeof(struct __pyx_obj_7pyarrow_3lib_DictionaryArray), /*tp_basicsize*/
    0, /*tp_itemsize*/
    __pyx_tp_dealloc_7pyarrow_3lib_DictionaryArray, /*tp_dealloc*/
    0, /*tp_vectorcall_offset*/
    0, /*tp_getattr*/
    0, /*tp_setattr*/
    0, /*tp_as_async*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_32__repr__, /*tp_repr*/
    #else
    0, /*tp_repr*/
    #endif
    0, /*tp_as_number*/
    0, /*tp_as_sequence*/
    0, /*tp_as_mapping*/
    0, /*tp_hash*/
    0, /*tp_call*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_36__str__, /*tp_str*/
    #else
    0, /*tp_str*/
    #endif
    0, /*tp_getattro*/
    0, /*tp_setattro*/
    0, /*tp_as_buffer*/
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
    PyDoc_STR("\n    Concrete class for dictionary-encoded Arrow arrays.\n    "), /*tp_doc*/
    __pyx_tp_traverse_7pyarrow_3lib_DictionaryArray, /*tp_traverse*/
    __pyx_tp_clear_7pyarrow_3lib_DictionaryArray, /*tp_clear*/
    0, /*tp_richcompare*/
    0, /*tp_weaklistoffset*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_29__iter__, /*tp_iter*/
    #else
    0, /*tp_iter*/
    #endif
    0, /*tp_iternext*/
    __pyx_methods_7pyarrow_3lib_DictionaryArray, /*tp_methods*/
    0, /*tp_members*/
    __pyx_getsets_7pyarrow_3lib_DictionaryArray, /*tp_getset*/
    0, /*tp_base*/
    0, /*tp_dict*/
    0, /*tp_descr_get*/
    0, /*tp_descr_set*/
    #if !CYTHON_USE_TYPE_SPECS
    0, /*tp_dictoffset*/
    #endif
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_1__init__, /*tp_init*/
    #else
    0, /*tp_init*/
    #endif
    0, /*tp_alloc*/
    __pyx_tp_new_7pyarrow_3lib_DictionaryArray, /*tp_new*/
    0, /*tp_free*/
    0, /*tp_is_gc*/
    0, /*tp_bases*/
    0, /*tp_mro*/
    0, /*tp_cache*/
    0, /*tp_subclasses*/
    0, /*tp_weaklist*/
    0, /*tp_del*/
    0, /*tp_version_tag*/
    #if CYTHON_USE_TP_FINALIZE
    0, /*tp_finalize*/
    #else
    NULL, /*tp_finalize*/
    #endif
    #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
    0, /*tp_vectorcall*/
    #endif
    #if __PYX_NEED_TP_PRINT_SLOT == 1
    0, /*tp_print*/
    #endif
    #if PY_VERSION_HEX >= 0x030C0000
    0, /*tp_watched*/
    #endif
    #if PY_VERSION_HEX >= 0x030d00A4
    0, /*tp_versions_used*/
    #endif
    #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
    0, /*tp_pypy_flags*/
    #endif
  };
  #endif
  static struct __pyx_vtabstruct_7pyarrow_3lib_ExtensionArray __pyx_vtable_7pyarrow_3lib_ExtensionArray;

  static PyObject *__pyx_tp_new_7pyarrow_3lib_ExtensionArray(PyTypeObject *t, PyObject *a, PyObject *k) {
    struct __pyx_obj_7pyarrow_3lib_ExtensionArray *p;
    PyObject *o = __pyx_tp_new_7pyarrow_3lib_Array(t, a, k);
    if (unlikely(!o)) return 0;
    p = ((struct __pyx_obj_7pyarrow_3lib_ExtensionArray *)o);
    p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_Array*)__pyx_vtabptr_7pyarrow_3lib_ExtensionArray;
    return o;
  }

  static PyObject *__pyx_getprop_7pyarrow_3lib_14ExtensionArray_storage(PyObject *o, CYTHON_UNUSED void *x) {
    return __pyx_pw_7pyarrow_3lib_14ExtensionArray_7storage_1__get__(o);
  }

  static PyMethodDef __pyx_methods_7pyarrow_3lib_ExtensionArray[] = {
    {"from_storage", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_14ExtensionArray_1from_storage, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_14ExtensionArray_from_storage},
    {0, 0, 0, 0}
  };

  static struct PyGetSetDef __pyx_getsets_7pyarrow_3lib_ExtensionArray[] = {
    {"storage", __pyx_getprop_7pyarrow_3lib_14ExtensionArray_storage, 0, 0, 0},
    {0, 0, 0, 0, 0}
  };
  #if CYTHON_USE_TYPE_SPECS
  static PyType_Slot __pyx_type_7pyarrow_3lib_ExtensionArray_slots[] = {
    {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_Array},
    {Py_tp_doc, (void *)PyDoc_STR("\n    Concrete class for Arrow extension arrays.\n    ")},
    {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyarrow_3lib_Array},
    {Py_tp_clear, (void *)__pyx_tp_clear_7pyarrow_3lib_Array},
    {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_ExtensionArray},
    {Py_tp_getset, (void *)__pyx_getsets_7pyarrow_3lib_ExtensionArray},
    {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_ExtensionArray},
    {0, 0},
  };
  static PyType_Spec __pyx_type_7pyarrow_3lib_ExtensionArray_spec = {
    "pyarrow.lib.ExtensionArray",
    sizeof(struct __pyx_obj_7pyarrow_3lib_ExtensionArray),
    0,
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
    __pyx_type_7pyarrow_3lib_ExtensionArray_slots,
  };
  #else

  static PyTypeObject __pyx_type_7pyarrow_3lib_ExtensionArray = {
    PyVarObject_HEAD_INIT(0, 0)
    "pyarrow.lib.""ExtensionArray", /*tp_name*/
    sizeof(struct __pyx_obj_7pyarrow_3lib_ExtensionArray), /*tp_basicsize*/
    0, /*tp_itemsize*/
    __pyx_tp_dealloc_7pyarrow_3lib_Array, /*tp_dealloc*/
    0, /*tp_vectorcall_offset*/
    0, /*tp_getattr*/
    0, /*tp_setattr*/
    0, /*tp_as_async*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_32__repr__, /*tp_repr*/
    #else
    0, /*tp_repr*/
    #endif
    0, /*tp_as_number*/
    0, /*tp_as_sequence*/
    0, /*tp_as_mapping*/
    0, /*tp_hash*/
    0, /*tp_call*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_36__str__, /*tp_str*/
    #else
    0, /*tp_str*/
    #endif
    0, /*tp_getattro*/
    0, /*tp_setattro*/
    0, /*tp_as_buffer*/
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
    PyDoc_STR("\n    Concrete class for Arrow extension arrays.\n    "), /*tp_doc*/
    __pyx_tp_traverse_7pyarrow_3lib_Array, /*tp_traverse*/
    __pyx_tp_clear_7pyarrow_3lib_Array, /*tp_clear*/
    0, /*tp_richcompare*/
    0, /*tp_weaklistoffset*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_29__iter__, /*tp_iter*/
    #else
    0, /*tp_iter*/
    #endif
    0, /*tp_iternext*/
    __pyx_methods_7pyarrow_3lib_ExtensionArray, /*tp_methods*/
    0, /*tp_members*/
    __pyx_getsets_7pyarrow_3lib_ExtensionArray, /*tp_getset*/
    0, /*tp_base*/
    0, /*tp_dict*/
    0, /*tp_descr_get*/
    0, /*tp_descr_set*/
    #if !CYTHON_USE_TYPE_SPECS
    0, /*tp_dictoffset*/
    #endif
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_1__init__, /*tp_init*/
    #else
    0, /*tp_init*/
    #endif
    0, /*tp_alloc*/
    __pyx_tp_new_7pyarrow_3lib_ExtensionArray, /*tp_new*/
    0, /*tp_free*/
    0, /*tp_is_gc*/
    0, /*tp_bases*/
    0, /*tp_mro*/
    0, /*tp_cache*/
    0, /*tp_subclasses*/
    0, /*tp_weaklist*/
    0, /*tp_del*/
    0, /*tp_version_tag*/
    #if CYTHON_USE_TP_FINALIZE
    0, /*tp_finalize*/
    #else
    NULL, /*tp_finalize*/
    #endif
    #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
    0, /*tp_vectorcall*/
    #endif
    #if __PYX_NEED_TP_PRINT_SLOT == 1
    0, /*tp_print*/
    #endif
    #if PY_VERSION_HEX >= 0x030C0000
    0, /*tp_watched*/
    #endif
    #if PY_VERSION_HEX >= 0x030d00A4
    0, /*tp_versions_used*/
    #endif
    #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
    0, /*tp_pypy_flags*/
    #endif
  };
  #endif
  static struct __pyx_vtabstruct_7pyarrow_3lib_MonthDayNanoIntervalArray __pyx_vtable_7pyarrow_3lib_MonthDayNanoIntervalArray;

  static PyObject *__pyx_tp_new_7pyarrow_3lib_MonthDayNanoIntervalArray(PyTypeObject *t, PyObject *a, PyObject *k) {
    struct __pyx_obj_7pyarrow_3lib_MonthDayNanoIntervalArray *p;
    PyObject *o = __pyx_tp_new_7pyarrow_3lib_Array(t, a, k);
    if (unlikely(!o)) return 0;
    p = ((struct __pyx_obj_7pyarrow_3lib_MonthDayNanoIntervalArray *)o);
    p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_Array*)__pyx_vtabptr_7pyarrow_3lib_MonthDayNanoIntervalArray;
    return o;
  }

  static PyMethodDef __pyx_methods_7pyarrow_3lib_MonthDayNanoIntervalArray[] = {
    {"to_pylist", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_25MonthDayNanoIntervalArray_1to_pylist, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_25MonthDayNanoIntervalArray_to_pylist},
    {0, 0, 0, 0}
  };
  #if CYTHON_USE_TYPE_SPECS
  static PyType_Slot __pyx_type_7pyarrow_3lib_MonthDayNanoIntervalArray_slots[] = {
    {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_Array},
    {Py_tp_doc, (void *)PyDoc_STR("\n    Concrete class for Arrow arrays of interval[MonthDayNano] type.\n    ")},
    {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyarrow_3lib_Array},
    {Py_tp_clear, (void *)__pyx_tp_clear_7pyarrow_3lib_Array},
    {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_MonthDayNanoIntervalArray},
    {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_MonthDayNanoIntervalArray},
    {0, 0},
  };
  static PyType_Spec __pyx_type_7pyarrow_3lib_MonthDayNanoIntervalArray_spec = {
    "pyarrow.lib.MonthDayNanoIntervalArray",
    sizeof(struct __pyx_obj_7pyarrow_3lib_MonthDayNanoIntervalArray),
    0,
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
    __pyx_type_7pyarrow_3lib_MonthDayNanoIntervalArray_slots,
  };
  #else

  static PyTypeObject __pyx_type_7pyarrow_3lib_MonthDayNanoIntervalArray = {
    PyVarObject_HEAD_INIT(0, 0)
    "pyarrow.lib.""MonthDayNanoIntervalArray", /*tp_name*/
    sizeof(struct __pyx_obj_7pyarrow_3lib_MonthDayNanoIntervalArray), /*tp_basicsize*/
    0, /*tp_itemsize*/
    __pyx_tp_dealloc_7pyarrow_3lib_Array, /*tp_dealloc*/
    0, /*tp_vectorcall_offset*/
    0, /*tp_getattr*/
    0, /*tp_setattr*/
    0, /*tp_as_async*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_32__repr__, /*tp_repr*/
    #else
    0, /*tp_repr*/
    #endif
    0, /*tp_as_number*/
    0, /*tp_as_sequence*/
    0, /*tp_as_mapping*/
    0, /*tp_hash*/
    0, /*tp_call*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_36__str__, /*tp_str*/
    #else
    0, /*tp_str*/
    #endif
    0, /*tp_getattro*/
    0, /*tp_setattro*/
    0, /*tp_as_buffer*/
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
    PyDoc_STR("\n    Concrete class for Arrow arrays of interval[MonthDayNano] type.\n    "), /*tp_doc*/
    __pyx_tp_traverse_7pyarrow_3lib_Array, /*tp_traverse*/
    __pyx_tp_clear_7pyarrow_3lib_Array, /*tp_clear*/
    0, /*tp_richcompare*/
    0, /*tp_weaklistoffset*/
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_29__iter__, /*tp_iter*/
    #else
    0, /*tp_iter*/
    #endif
    0, /*tp_iternext*/
    __pyx_methods_7pyarrow_3lib_MonthDayNanoIntervalArray, /*tp_methods*/
    0, /*tp_members*/
    0, /*tp_getset*/
    0, /*tp_base*/
    0, /*tp_dict*/
    0, /*tp_descr_get*/
    0, /*tp_descr_set*/
    #if !CYTHON_USE_TYPE_SPECS
    0, /*tp_dictoffset*/
    #endif
    #if CYTHON_COMPILING_IN_PYPY || 0
    __pyx_pw_7pyarrow_3lib_5Array_1__init__, /*tp_init*/
    #else
    0, /*tp_init*/
    #endif
    0, /*tp_alloc*/
    __pyx_tp_new_7pyarrow_3lib_MonthDayNanoIntervalArray, /*tp_new*/
    0, /*tp_free*/
    0, /*tp_is_gc*/
    0, /*tp_bases*/
    0, /*tp_mro*/
    0, /*tp_cache*/
    0, /*tp_subclasses*/
    0, /*tp_weaklist*/
    0, /*tp_del*/
    0, /*tp_version_tag*/
    #if CYTHON_USE_TP_FINALIZE
    0, /*tp_finalize*/
    #else
    NULL, /*tp_finalize*/
    #endif
    #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
    0, /*tp_vectorcall*/
    #endif
    #if __PYX_NEED_TP_PRINT_SLOT == 1
    0, /*tp_print*/
    #endif
    #if PY_VERSION_HEX >= 0x030C0000
    0, /*tp_watched*/
    #endif
    #if PY_VERSION_HEX >= 0x030d00A4
    0, /*tp_versions_used*/
    #endif
    #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
    0, /*tp_pypy_flags*/
    #endif
  };
  #endif
  static struct __pyx_vtabstruct_7pyarrow_3lib_ChunkedArray __pyx_vtable_7pyarrow_3lib_ChunkedArray;

  static PyObject *__pyx_tp_new_7pyarrow_3lib_ChunkedArray(PyTypeObject *t, PyObject *a, PyObject *k) {
    struct __pyx_obj_7pyarrow_3lib_ChunkedArray *p;
    PyObject *o = __pyx_tp_new_7pyarrow_3lib__Weakrefable(t, a, k);
    if (unlikely(!o)) return 0;
    p = ((struct __pyx_obj_7pyarrow_3lib_ChunkedArray *)o);
    p->__pyx_vtab = __pyx_vtabptr_7pyarrow_3lib_ChunkedArray;
    __Pyx_default_placement_construct(&(p->sp_chunked_array));
    p->_name = Py_None; Py_INCREF(Py_None);
    if (unlikely(__pyx_pw_7pyarrow_3lib_12ChunkedArray_1__cinit__(o, __pyx_mstate_global->__pyx_empty_tuple, NULL) < 0)) goto bad;
    return o;
    bad:
    Py_DECREF(o); o = 0;
    return NULL;
  }

  static void __pyx_tp_dealloc_7pyarrow_3lib_ChunkedArray(PyObject *o) {
    struct __pyx_obj_7pyarrow_3lib_ChunkedArray *p = (struct __pyx_obj_7pyarrow_3lib_ChunkedArray *)o;
    #if CYTHON_USE_TP_FINALIZE
    if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
      if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_7pyarrow_3lib_ChunkedArray) {
        if (PyObject_CallFinalizerFromDealloc(o)) return;
      }
    }
    #endif
    PyObject_GC_UnTrack(o);
    __Pyx_call_destructor(p->sp_chunked_array);
    Py_CLEAR(p->_name);
    __pyx_tp_dealloc_7pyarrow_3lib__Weakrefable(o);
  }

  static int __pyx_tp_traverse_7pyarrow_3lib_ChunkedArray(PyObject *o, visitproc v, void *a) {
    int e;
    struct __pyx_obj_7pyarrow_3lib_ChunkedArray *p = (struct __pyx_obj_7pyarrow_3lib_ChunkedArray *)o;
    #if !CYTHON_USE_MODULE_STATE
    e = 0;
    if (likely(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__PandasConvertible)) {
      traverseproc traverse = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__PandasConvertible, tp_traverse, traverseproc);
      if (traverse) { e = traverse(o, v, a); }
    } else
    #endif
    { e = __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_7pyarrow_3lib_ChunkedArray); }
    if (e) return e;
    {
      e = __Pyx_call_type_traverse(o, 0, v, a);
      if (e) return e;
    }
    if (p->_name) {
      e = (*v)(p->_name, a); if (e) return e;
    }
    return 0;
  }

  static int __pyx_tp_clear_7pyarrow_3lib_ChunkedArray(PyObject *o) {
    PyObject* tmp;
    struct __pyx_obj_7pyarrow_3lib_ChunkedArray *p = (struct __pyx_obj_7pyarrow_3lib_ChunkedArray *)o;
    #if !CYTHON_USE_MODULE_STATE
    if (likely(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__PandasConvertible)) {
      inquiry clear = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__PandasConvertible, tp_clear, inquiry);
      if (clear) clear(o);
    } else
    #endif
    { __Pyx_call_next_tp_clear(o, __pyx_tp_clear_7pyarrow_3lib_ChunkedArray); }
    tmp = ((PyObject*)p->_name);
    p->_name = Py_None; Py_INCREF(Py_None);
    Py_XDECREF(tmp);
    return 0;
  }

  static PyObject *__pyx_sq_item_7pyarrow_3lib_ChunkedArray(PyObject *o, Py_ssize_t i) {
    PyObject *r;
    PyObject *x = PyLong_FromSsize_t(i); if(!x) return 0;
    #if CYTHON_USE_TYPE_SLOTS || (!CYTHON_USE_TYPE_SPECS && __PYX_LIMITED_VERSION_HEX < 0x030A0000)
    r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
    #else
    r = ((binaryfunc)PyType_GetSlot(Py_TYPE(o), Py_mp_subscript))(o, x);
    #endif
    Py_DECREF(x);
    return r;
  }

  static PyObject *__pyx_tp_richcompare_7pyarrow_3lib_ChunkedArray(PyObject *o1, PyObject *o2, int op) {
    switch (op) {
      case Py_EQ: {
        return __pyx_pw_7pyarrow_3lib_12ChunkedArray_36__eq__(o1, o2);
      }
      case Py_NE: {
        PyObject *ret;
        ret = __pyx_pw_7pyarrow_3lib_12ChunkedArray_36__eq__(o1, o2);
        if (likely(ret && ret != Py_NotImplemented)) {
          int b = __Pyx_PyObject_IsTrue(ret);
          Py_DECREF(ret);
          if (unlikely(b < 0)) return NULL;
          ret = (b) ? Py_False : Py_True;
          Py_INCREF(ret);
        }
        return ret;
      }
      default: {
        return __Pyx_NewRef(Py_NotImplemented);
      }
    }
  }

  static PyObject *__pyx_getprop_7pyarrow_3lib_12ChunkedArray_data(PyObject *o, CYTHON_UNUSED void *x) {
    return __pyx_pw_7pyarrow_3lib_12ChunkedArray_4data_1__get__(o);
  }

  static PyObject *__pyx_getprop_7pyarrow_3lib_12ChunkedArray_type(PyObject *o, CYTHON_UNUSED void *x) {
    return __pyx_pw_7pyarrow_3lib_12ChunkedArray_4type_1__get__(o);
  }

  static PyObject *__pyx_getprop_7pyarrow_3lib_12ChunkedArray_null_count(PyObject *o, CYTHON_UNUSED void *x) {
    return __pyx_pw_7pyarrow_3lib_12ChunkedArray_10null_count_1__get__(o);
  }

  static PyObject *__pyx_getprop_7pyarrow_3lib_12ChunkedArray_nbytes(PyObject *o, CYTHON_UNUSED void *x) {
    return __pyx_pw_7pyarrow_3lib_12ChunkedArray_6nbytes_1__get__(o);
  }

  static PyObject *__pyx_getprop_7pyarrow_3lib_12ChunkedArray_num_chunks(PyObject *o, CYTHON_UNUSED void *x) {
    return __pyx_pw_7pyarrow_3lib_12ChunkedArray_10num_chunks_1__get__(o);
  }

  static PyObject *__pyx_getprop_7pyarrow_3lib_12ChunkedArray_chunks(PyObject *o, CYTHON_UNUSED void *x) {
    return __pyx_pw_7pyarrow_3lib_12ChunkedArray_6chunks_1__get__(o);
  }

  static PyObject *__pyx_getprop_7pyarrow_3lib_12ChunkedArray_is_cpu(PyObject *o, CYTHON_UNUSED void *x) {
    return __pyx_pw_7pyarrow_3lib_12ChunkedArray_6is_cpu_1__get__(o);
  }

  static PyObject *__pyx_getprop_7pyarrow_3lib_12ChunkedArray__name(PyObject *o, CYTHON_UNUSED void *x) {
    return __pyx_pw_7pyarrow_3lib_12ChunkedArray_5_name_1__get__(o);
  }

  static PyMethodDef __pyx_methods_7pyarrow_3lib_ChunkedArray[] = {
    {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12ChunkedArray_5__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12ChunkedArray_4__reduce__},
    {"length", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12ChunkedArray_7length, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12ChunkedArray_6length},
    {"to_string", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12ChunkedArray_13to_string, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12ChunkedArray_12to_string},
    {"format", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12ChunkedArray_15format, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12ChunkedArray_14format},
    {"validate", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12ChunkedArray_19validate, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12ChunkedArray_18validate},
    {"get_total_buffer_size", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12ChunkedArray_21get_total_buffer_size, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12ChunkedArray_20get_total_buffer_size},
    {"__sizeof__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12ChunkedArray_23__sizeof__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12ChunkedArray_22__sizeof__},
    {"is_null", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12ChunkedArray_30is_null, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12ChunkedArray_29is_null},
    {"is_nan", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12ChunkedArray_32is_nan, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12ChunkedArray_31is_nan},
    {"is_valid", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12ChunkedArray_34is_valid, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12ChunkedArray_33is_valid},
    {"fill_null", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12ChunkedArray_38fill_null, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12ChunkedArray_37fill_null},
    {"equals", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12ChunkedArray_40equals, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12ChunkedArray_39equals},
    {"_to_pandas", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12ChunkedArray_42_to_pandas, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12ChunkedArray_41_to_pandas},
    {"to_numpy", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12ChunkedArray_44to_numpy, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12ChunkedArray_43to_numpy},
    {"__array__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12ChunkedArray_46__array__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12ChunkedArray_45__array__},
    {"cast", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12ChunkedArray_48cast, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12ChunkedArray_47cast},
    {"dictionary_encode", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12ChunkedArray_50dictionary_encode, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12ChunkedArray_49dictionary_encode},
    {"flatten", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12ChunkedArray_52flatten, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12ChunkedArray_51flatten},
    {"combine_chunks", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12ChunkedArray_54combine_chunks, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12ChunkedArray_53combine_chunks},
    {"unique", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12ChunkedArray_56unique, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12ChunkedArray_55unique},
    {"value_counts", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12ChunkedArray_58value_counts, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12ChunkedArray_57value_counts},
    {"slice", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12ChunkedArray_60slice, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12ChunkedArray_59slice},
    {"filter", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12ChunkedArray_62filter, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12ChunkedArray_61filter},
    {"index", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12ChunkedArray_64index, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12ChunkedArray_63index},
    {"take", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12ChunkedArray_66take, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12ChunkedArray_65take},
    {"drop_null", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12ChunkedArray_68drop_null, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12ChunkedArray_67drop_null},
    {"sort", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12ChunkedArray_70sort, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12ChunkedArray_69sort},
    {"unify_dictionaries", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12ChunkedArray_72unify_dictionaries, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12ChunkedArray_71unify_dictionaries},
    {"chunk", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12ChunkedArray_74chunk, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12ChunkedArray_73chunk},
    {"iterchunks", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12ChunkedArray_76iterchunks, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12ChunkedArray_75iterchunks},
    {"to_pylist", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12ChunkedArray_79to_pylist, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12ChunkedArray_78to_pylist},
    {"__arrow_c_stream__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12ChunkedArray_81__arrow_c_stream__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12ChunkedArray_80__arrow_c_stream__},
    {"_import_from_c_capsule", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12ChunkedArray_83_import_from_c_capsule, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12ChunkedArray_82_import_from_c_capsule},
    {"_assert_cpu", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12ChunkedArray_85_assert_cpu, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12ChunkedArray_84_assert_cpu},
    {0, 0, 0, 0}
  };

  static struct PyGetSetDef __pyx_getsets_7pyarrow_3lib_ChunkedArray[] = {
    {"data", __pyx_getprop_7pyarrow_3lib_12ChunkedArray_data, 0, 0, 0},
    {"type", __pyx_getprop_7pyarrow_3lib_12ChunkedArray_type, 0, PyDoc_STR("\n        Return data type of a ChunkedArray.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> n_legs = pa.chunked_array([[2, 2, 4], [4, 5, 100]])\n        >>> n_legs.type\n        DataType(int64)\n        "), 0},
    {"null_count", __pyx_getprop_7pyarrow_3lib_12ChunkedArray_null_count, 0, PyDoc_STR("\n        Number of null entries\n\n        Returns\n        -------\n        int\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> n_legs = pa.chunked_array([[2, 2, 4], [4, None, 100]])\n        >>> n_legs.null_count\n        1\n        "), 0},
    {"nbytes", __pyx_getprop_7pyarrow_3lib_12ChunkedArray_nbytes, 0, PyDoc_STR("\n        Total number of bytes consumed by the elements of the chunked array.\n\n        In other words, the sum of bytes from all buffer ranges referenced.\n\n        Unlike `get_total_buffer_size` this method will account for array\n        offsets.\n\n        If buffers are shared between arrays then the shared\n        portion will only be counted multiple times.\n\n        The dictionary of dictionary arrays will always be counted in their\n        entirety even if the array only references a portion of the dictionary.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> n_legs = pa.chunked_array([[2, 2, 4], [4, None, 100]])\n        >>> n_legs.nbytes\n        49\n        "), 0},
    {"num_chunks", __pyx_getprop_7pyarrow_3lib_12ChunkedArray_num_chunks, 0, PyDoc_STR("\n        Number of underlying chunks.\n\n        Returns\n        -------\n        int\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> n_legs = pa.chunked_array([[2, 2, None], [4, 5, 100]])\n        >>> n_legs.num_chunks\n        2\n        "), 0},
    {"chunks", __pyx_getprop_7pyarrow_3lib_12ChunkedArray_chunks, 0, PyDoc_STR("\n        Convert to a list of single-chunked arrays.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> n_legs = pa.chunked_array([[2, 2, None], [4, 5, 100]])\n        >>> n_legs\n        <pyarrow.lib.ChunkedArray object at ...>\n        [\n          [\n            2,\n            2,\n            null\n          ],\n          [\n            4,\n            5,\n            100\n          ]\n        ]\n        >>> n_legs.chunks\n        [<pyarrow.lib.Int64Array object at ...>\n        [\n          2,\n          2,\n          null\n        ], <pyarrow.lib.Int64Array object at ...>\n        [\n          4,\n          5,\n          100\n        ]]\n        "), 0},
    {"is_cpu", __pyx_getprop_7pyarrow_3lib_12ChunkedArray_is_cpu, 0, PyDoc_STR("\n        Whether all chunks in the ChunkedArray are CPU-accessible.\n        "), 0},
    {"_name", __pyx_getprop_7pyarrow_3lib_12ChunkedArray__name, 0, 0, 0},
    {0, 0, 0, 0, 0}
  };
  #if CYTHON_USE_TYPE_SPECS
  static PyType_Slot __pyx_type_7pyarrow_3lib_ChunkedArray_slots[] = {
    {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_ChunkedArray},
    {Py_tp_repr, (void *)__pyx_pw_7pyarrow_3lib_12ChunkedArray_11__repr__},
    {Py_sq_length, (void *)__pyx_pw_7pyarrow_3lib_12ChunkedArray_9__len__},
    {Py_sq_item, (void *)__pyx_sq_item_7pyarrow_3lib_ChunkedArray},
    {Py_mp_length, (void *)__pyx_pw_7pyarrow_3lib_12ChunkedArray_9__len__},
    {Py_mp_subscript, (void *)__pyx_pw_7pyarrow_3lib_12ChunkedArray_28__getitem__},
    {Py_tp_str, (void *)__pyx_pw_7pyarrow_3lib_12ChunkedArray_17__str__},
    {Py_tp_doc, (void *)PyDoc_STR("ChunkedArray()\n\nAn array-like composed from a (possibly empty) collection of pyarrow.Arrays\n\nWarnings\n--------\nDo not call this class's constructor directly.\n\nExamples\n--------\nTo construct a ChunkedArray object use :func:`pyarrow.chunked_array`:\n\n>>> import pyarrow as pa\n>>> pa.chunked_array([], type=pa.int8())\n<pyarrow.lib.ChunkedArray object at ...>\n[\n...\n]\n\n>>> pa.chunked_array([[2, 2, 4], [4, 5, 100]])\n<pyarrow.lib.ChunkedArray object at ...>\n[\n  [\n    2,\n    2,\n    4\n  ],\n  [\n    4,\n    5,\n    100\n  ]\n]\n>>> isinstance(pa.chunked_array([[2, 2, 4], [4, 5, 100]]), pa.ChunkedArray)\nTrue")},
    {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyarrow_3lib_ChunkedArray},
    {Py_tp_clear, (void *)__pyx_tp_clear_7pyarrow_3lib_ChunkedArray},
    {Py_tp_richcompare, (void *)__pyx_tp_richcompare_7pyarrow_3lib_ChunkedArray},
    {Py_tp_iter, (void *)__pyx_pw_7pyarrow_3lib_12ChunkedArray_25__iter__},
    {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_ChunkedArray},
    {Py_tp_getset, (void *)__pyx_getsets_7pyarrow_3lib_ChunkedArray},
    {Py_tp_init, (void *)__pyx_pw_7pyarrow_3lib_12ChunkedArray_3__init__},
    {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_ChunkedArray},
    {0, 0},
  };
  static PyType_Spec __pyx_type_7pyarrow_3lib_ChunkedArray_spec = {
    "pyarrow.lib.ChunkedArray",
    sizeof(struct __pyx_obj_7pyarrow_3lib_ChunkedArray),
    0,
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
    __pyx_type_7pyarrow_3lib_ChunkedArray_slots,
  };
  #else

  static PySequenceMethods __pyx_tp_as_sequence_ChunkedArray = {
    __pyx_pw_7pyarrow_3lib_12ChunkedArray_9__len__, /*sq_length*/
    0, /*sq_concat*/
    0, /*sq_repeat*/
    __pyx_sq_item_7pyarrow_3lib_ChunkedArray, /*sq_item*/
    0, /*sq_slice*/
    0, /*sq_ass_item*/
    0, /*sq_ass_slice*/
    0, /*sq_contains*/
    0, /*sq_inplace_concat*/
    0, /*sq_inplace_repeat*/
  };

  static PyMappingMethods __pyx_tp_as_mapping_ChunkedArray = {
    __pyx_pw_7pyarrow_3lib_12ChunkedArray_9__len__, /*mp_length*/
    __pyx_pw_7pyarrow_3lib_12ChunkedArray_28__getitem__, /*mp_subscript*/
    0, /*mp_ass_subscript*/
  };

  static PyTypeObject __pyx_type_7pyarrow_3lib_ChunkedArray = {
    PyVarObject_HEAD_INIT(0, 0)
    "pyarrow.lib.""ChunkedArray", /*tp_name*/
    sizeof(struct __pyx_obj_7pyarrow_3lib_ChunkedArray), /*tp_basicsize*/
    0, /*tp_itemsize*/
    __pyx_tp_dealloc_7pyarrow_3lib_ChunkedArray, /*tp_dealloc*/
    0, /*tp_vectorcall_offset*/
    0, /*tp_getattr*/
    0, /*tp_setattr*/
    0, /*tp_as_async*/
    __pyx_pw_7pyarrow_3lib_12ChunkedArray_11__repr__, /*tp_repr*/
    0, /*tp_as_number*/
    &__pyx_tp_as_sequence_ChunkedArray, /*tp_as_sequence*/
    &__pyx_tp_as_mapping_ChunkedArray, /*tp_as_mapping*/
    0, /*tp_hash*/
    0, /*tp_call*/
    __pyx_pw_7pyarrow_3lib_12ChunkedArray_17__str__, /*tp_str*/
    0, /*tp_getattro*/
    0, /*tp_setattro*/
    0, /*tp_as_buffer*/
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
    PyDoc_STR("ChunkedArray()\n\nAn array-like composed from a (possibly empty) collection of pyarrow.Arrays\n\nWarnings\n--------\nDo not call this class's constructor directly.\n\nExamples\n--------\nTo construct a ChunkedArray object use :func:`pyarrow.chunked_array`:\n\n>>> import pyarrow as pa\n>>> pa.chunked_array([], type=pa.int8())\n<pyarrow.lib.ChunkedArray object at ...>\n[\n...\n]\n\n>>> pa.chunked_array([[2, 2, 4], [4, 5, 100]])\n<pyarrow.lib.ChunkedArray object at ...>\n[\n  [\n    2,\n    2,\n    4\n  ],\n  [\n    4,\n    5,\n    100\n  ]\n]\n>>> isinstance(pa.chunked_array([[2, 2, 4], [4, 5, 100]]), pa.ChunkedArray)\nTrue"), /*tp_doc*/
    __pyx_tp_traverse_7pyarrow_3lib_ChunkedArray, /*tp_traverse*/
    __pyx_tp_clear_7pyarrow_3lib_ChunkedArray, /*tp_clear*/
    __pyx_tp_richcompare_7pyarrow_3lib_ChunkedArray, /*tp_richcompare*/
    0, /*tp_weaklistoffset*/
    __pyx_pw_7pyarrow_3lib_12ChunkedArray_25__iter__, /*tp_iter*/
    0, /*tp_iternext*/
    __pyx_methods_7pyarrow_3lib_ChunkedArray, /*tp_methods*/
    0, /*tp_members*/
    __pyx_getsets_7pyarrow_3lib_ChunkedArray, /*tp_getset*/
    0, /*tp_base*/
    0, /*tp_dict*/
    0, /*tp_descr_get*/
    0, /*tp_descr_set*/
    #if !CYTHON_USE_TYPE_SPECS
    0, /*tp_dictoffset*/
    #endif
    __pyx_pw_7pyarrow_3lib_12ChunkedArray_3__init__, /*tp_init*/
    0, /*tp_alloc*/
    __pyx_tp_new_7pyarrow_3lib_ChunkedArray, /*tp_new*/
    0, /*tp_free*/
    0, /*tp_is_gc*/
    0, /*tp_bases*/
    0, /*tp_mro*/
    0, /*tp_cache*/
    0, /*tp_subclasses*/
    0, /*tp_weaklist*/
    0, /*tp_del*/
    0, /*tp_version_tag*/
    #if CYTHON_USE_TP_FINALIZE
    0, /*tp_finalize*/
    #else
    NULL, /*tp_finalize*/
    #endif
    #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
    0, /*tp_vectorcall*/
    #endif
    #if __PYX_NEED_TP_PRINT_SLOT == 1
    0, /*tp_print*/
    #endif
    #if PY_VERSION_HEX >= 0x030C0000
    0, /*tp_watched*/
    #endif
    #if PY_VERSION_HEX >= 0x030d00A4
    0, /*tp_versions_used*/
    #endif
    #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
    0, /*tp_pypy_flags*/
    #endif
  };
  #endif
  static struct __pyx_vtabstruct_7pyarrow_3lib__Tabular __pyx_vtable_7pyarrow_3lib__Tabular;

  static PyObject *__pyx_tp_new_7pyarrow_3lib__Tabular(PyTypeObject *t, PyObject *a, PyObject *k) {
    struct __pyx_obj_7pyarrow_3lib__Tabular *p;
    PyObject *o = __pyx_tp_new_7pyarrow_3lib__Weakrefable(t, a, k);
    if (unlikely(!o)) return 0;
    p = ((struct __pyx_obj_7pyarrow_3lib__Tabular *)o);
    p->__pyx_vtab = __pyx_vtabptr_7pyarrow_3lib__Tabular;
    return o;
  }

  static PyObject *__pyx_sq_item_7pyarrow_3lib__Tabular(PyObject *o, Py_ssize_t i) {
    PyObject *r;
    PyObject *x = PyLong_FromSsize_t(i); if(!x) return 0;
    #if CYTHON_USE_TYPE_SLOTS || (!CYTHON_USE_TYPE_SPECS && __PYX_LIMITED_VERSION_HEX < 0x030A0000)
    r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
    #else
    r = ((binaryfunc)PyType_GetSlot(Py_TYPE(o), Py_mp_subscript))(o, x);
    #endif
    Py_DECREF(x);
    return r;
  }

  static PyObject *__pyx_tp_richcompare_7pyarrow_3lib__Tabular(PyObject *o1, PyObject *o2, int op) {
    switch (op) {
      case Py_EQ: {
        return __pyx_pw_7pyarrow_3lib_8_Tabular_7__eq__(o1, o2);
      }
      case Py_NE: {
        PyObject *ret;
        ret = __pyx_pw_7pyarrow_3lib_8_Tabular_7__eq__(o1, o2);
        if (likely(ret && ret != Py_NotImplemented)) {
          int b = __Pyx_PyObject_IsTrue(ret);
          Py_DECREF(ret);
          if (unlikely(b < 0)) return NULL;
          ret = (b) ? Py_False : Py_True;
          Py_INCREF(ret);
        }
        return ret;
      }
      default: {
        return __Pyx_NewRef(Py_NotImplemented);
      }
    }
  }

  static PyObject *__pyx_getprop_7pyarrow_3lib_8_Tabular_column_names(PyObject *o, CYTHON_UNUSED void *x) {
    return __pyx_pw_7pyarrow_3lib_8_Tabular_12column_names_1__get__(o);
  }

  static PyObject *__pyx_getprop_7pyarrow_3lib_8_Tabular_columns(PyObject *o, CYTHON_UNUSED void *x) {
    return __pyx_pw_7pyarrow_3lib_8_Tabular_7columns_1__get__(o);
  }

  static PyObject *__pyx_getprop_7pyarrow_3lib_8_Tabular_num_columns(PyObject *o, CYTHON_UNUSED void *x) {
    return __pyx_pw_7pyarrow_3lib_8_Tabular_11num_columns_1__get__(o);
  }

  static PyObject *__pyx_getprop_7pyarrow_3lib_8_Tabular_num_rows(PyObject *o, CYTHON_UNUSED void *x) {
    return __pyx_pw_7pyarrow_3lib_8_Tabular_8num_rows_1__get__(o);
  }

  static PyObject *__pyx_getprop_7pyarrow_3lib_8_Tabular_shape(PyObject *o, CYTHON_UNUSED void *x) {
    return __pyx_pw_7pyarrow_3lib_8_Tabular_5shape_1__get__(o);
  }

  static PyObject *__pyx_getprop_7pyarrow_3lib_8_Tabular_schema(PyObject *o, CYTHON_UNUSED void *x) {
    return __pyx_pw_7pyarrow_3lib_8_Tabular_6schema_1__get__(o);
  }

  static PyMethodDef __pyx_methods_7pyarrow_3lib__Tabular[] = {
    {"__array__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_8_Tabular_3__array__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_8_Tabular_2__array__},
    {"__dataframe__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_8_Tabular_5__dataframe__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_8_Tabular_4__dataframe__},
    {"_column", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_8_Tabular_15_column, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_8_Tabular_14_column},
    {"_ensure_integer_index", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_8_Tabular_17_ensure_integer_index, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_8_Tabular_16_ensure_integer_index},
    {"_is_initialized", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_8_Tabular_19_is_initialized, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_8_Tabular_18_is_initialized},
    {"column", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_8_Tabular_21column, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_8_Tabular_20column},
    {"drop_null", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_8_Tabular_23drop_null, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_8_Tabular_22drop_null},
    {"field", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_8_Tabular_25field, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_8_Tabular_24field},
    {"from_pydict", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_8_Tabular_27from_pydict, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_8_Tabular_26from_pydict},
    {"from_pylist", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_8_Tabular_29from_pylist, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_8_Tabular_28from_pylist},
    {"itercolumns", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_8_Tabular_31itercolumns, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_8_Tabular_30itercolumns},
    {"sort_by", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_8_Tabular_34sort_by, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_8_Tabular_33sort_by},
    {"take", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_8_Tabular_36take, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_8_Tabular_35take},
    {"filter", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_8_Tabular_38filter, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_8_Tabular_37filter},
    {"to_pydict", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_8_Tabular_40to_pydict, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_8_Tabular_39to_pydict},
    {"to_pylist", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_8_Tabular_42to_pylist, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_8_Tabular_41to_pylist},
    {"to_string", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_8_Tabular_44to_string, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_8_Tabular_43to_string},
    {"remove_column", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_8_Tabular_46remove_column, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_8_Tabular_45remove_column},
    {"drop_columns", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_8_Tabular_48drop_columns, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_8_Tabular_47drop_columns},
    {"add_column", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_8_Tabular_50add_column, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_8_Tabular_49add_column},
    {"append_column", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_8_Tabular_52append_column, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_8_Tabular_51append_column},
    {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_8_Tabular_54__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_8_Tabular_53__reduce_cython__},
    {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_8_Tabular_56__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_8_Tabular_55__setstate_cython__},
    {0, 0, 0, 0}
  };

  static struct PyGetSetDef __pyx_getsets_7pyarrow_3lib__Tabular[] = {
    {"column_names", __pyx_getprop_7pyarrow_3lib_8_Tabular_column_names, 0, PyDoc_STR("\n        Names of the Table or RecordBatch columns.\n\n        Returns\n        -------\n        list of str\n\n        Examples\n        --------\n        Table (works similarly for RecordBatch)\n\n        >>> import pyarrow as pa\n        >>> table = pa.Table.from_arrays([[2, 4, 5, 100],\n        ...                               [\"Flamingo\", \"Horse\", \"Brittle stars\", \"Centipede\"]],\n        ...                               names=['n_legs', 'animals'])\n        >>> table.column_names\n        ['n_legs', 'animals']\n        "), 0},
    {"columns", __pyx_getprop_7pyarrow_3lib_8_Tabular_columns, 0, PyDoc_STR("\n        List of all columns in numerical order.\n\n        Returns\n        -------\n        columns : list of Array (for RecordBatch) or list of ChunkedArray (for Table)\n\n        Examples\n        --------\n        Table (works similarly for RecordBatch)\n\n        >>> import pyarrow as pa\n        >>> import pandas as pd\n        >>> df = pd.DataFrame({'n_legs': [None, 4, 5, None],\n        ...                    'animals': [\"Flamingo\", \"Horse\", None, \"Centipede\"]})\n        >>> table = pa.Table.from_pandas(df)\n        >>> table.columns\n        [<pyarrow.lib.ChunkedArray object at ...>\n        [\n          [\n            null,\n            4,\n            5,\n            null\n          ]\n        ], <pyarrow.lib.ChunkedArray object at ...>\n        [\n          [\n            \"Flamingo\",\n            \"Horse\",\n            null,\n            \"Centipede\"\n          ]\n        ]]\n        "), 0},
    {"num_columns", __pyx_getprop_7pyarrow_3lib_8_Tabular_num_columns, 0, 0, 0},
    {"num_rows", __pyx_getprop_7pyarrow_3lib_8_Tabular_num_rows, 0, 0, 0},
    {"shape", __pyx_getprop_7pyarrow_3lib_8_Tabular_shape, 0, PyDoc_STR("\n        Dimensions of the table or record batch: (#rows, #columns).\n\n        Returns\n        -------\n        (int, int)\n            Number of rows and number of columns.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> table = pa.table({'n_legs': [None, 4, 5, None],\n        ...                   'animals': [\"Flamingo\", \"Horse\", None, \"Centipede\"]})\n        >>> table.shape\n        (4, 2)\n        "), 0},
    {"schema", __pyx_getprop_7pyarrow_3lib_8_Tabular_schema, 0, 0, 0},
    {0, 0, 0, 0, 0}
  };
  #if CYTHON_USE_TYPE_SPECS
  static PyType_Slot __pyx_type_7pyarrow_3lib__Tabular_slots[] = {
    {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib__Weakrefable},
    {Py_tp_repr, (void *)__pyx_pw_7pyarrow_3lib_8_Tabular_13__repr__},
    {Py_sq_length, (void *)__pyx_pw_7pyarrow_3lib_8_Tabular_11__len__},
    {Py_sq_item, (void *)__pyx_sq_item_7pyarrow_3lib__Tabular},
    {Py_mp_length, (void *)__pyx_pw_7pyarrow_3lib_8_Tabular_11__len__},
    {Py_mp_subscript, (void *)__pyx_pw_7pyarrow_3lib_8_Tabular_9__getitem__},
    {Py_tp_doc, (void *)PyDoc_STR("_Tabular()\n\nInternal: An interface for common operations on tabular objects.")},
    {Py_tp_richcompare, (void *)__pyx_tp_richcompare_7pyarrow_3lib__Tabular},
    {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib__Tabular},
    {Py_tp_getset, (void *)__pyx_getsets_7pyarrow_3lib__Tabular},
    {Py_tp_init, (void *)__pyx_pw_7pyarrow_3lib_8_Tabular_1__init__},
    {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib__Tabular},
    {0, 0},
  };
  static PyType_Spec __pyx_type_7pyarrow_3lib__Tabular_spec = {
    "pyarrow.lib._Tabular",
    sizeof(struct __pyx_obj_7pyarrow_3lib__Tabular),
    0,
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
    __pyx_type_7pyarrow_3lib__Tabular_slots,
  };
  #else

  static PySequenceMethods __pyx_tp_as_sequence__Tabular = {
    __pyx_pw_7pyarrow_3lib_8_Tabular_11__len__, /*sq_length*/
    0, /*sq_concat*/
    0, /*sq_repeat*/
    __pyx_sq_item_7pyarrow_3lib__Tabular, /*sq_item*/
    0, /*sq_slice*/
    0, /*sq_ass_item*/
    0, /*sq_ass_slice*/
    0, /*sq_contains*/
    0, /*sq_inplace_concat*/
    0, /*sq_inplace_repeat*/
  };

  static PyMappingMethods __pyx_tp_as_mapping__Tabular = {
    __pyx_pw_7pyarrow_3lib_8_Tabular_11__len__, /*mp_length*/
    __pyx_pw_7pyarrow_3lib_8_Tabular_9__getitem__, /*mp_subscript*/
    0, /*mp_ass_subscript*/
  };

  static PyTypeObject __pyx_type_7pyarrow_3lib__Tabular = {
    PyVarObject_HEAD_INIT(0, 0)
    "pyarrow.lib.""_Tabular", /*tp_name*/
    sizeof(struct __pyx_obj_7pyarrow_3lib__Tabular), /*tp_basicsize*/
    0, /*tp_itemsize*/
    __pyx_tp_dealloc_7pyarrow_3lib__Weakrefable, /*tp_dealloc*/
    0, /*tp_vectorcall_offset*/
    0, /*tp_getattr*/
    0, /*tp_setattr*/
    0, /*tp_as_async*/
    __pyx_pw_7pyarrow_3lib_8_Tabular_13__repr__, /*tp_repr*/
    0, /*tp_as_number*/
    &__pyx_tp_as_sequence__Tabular, /*tp_as_sequence*/
    &__pyx_tp_as_mapping__Tabular, /*tp_as_mapping*/
    0, /*tp_hash*/
    0, /*tp_call*/
    0, /*tp_str*/
    0, /*tp_getattro*/
    0, /*tp_setattro*/
    0, /*tp_as_buffer*/
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
    PyDoc_STR("_Tabular()\n\nInternal: An interface for common operations on tabular objects."), /*tp_doc*/
    0, /*tp_traverse*/
    0, /*tp_clear*/
    __pyx_tp_richcompare_7pyarrow_3lib__Tabular, /*tp_richcompare*/
    0, /*tp_weaklistoffset*/
    0, /*tp_iter*/
    0, /*tp_iternext*/
    __pyx_methods_7pyarrow_3lib__Tabular, /*tp_methods*/
    0, /*tp_members*/
    __pyx_getsets_7pyarrow_3lib__Tabular, /*tp_getset*/
    0, /*tp_base*/
    0, /*tp_dict*/
    0, /*tp_descr_get*/
    0, /*tp_descr_set*/
    #if !CYTHON_USE_TYPE_SPECS
    0, /*tp_dictoffset*/
    #endif
    __pyx_pw_7pyarrow_3lib_8_Tabular_1__init__, /*tp_init*/
    0, /*tp_alloc*/
    __pyx_tp_new_7pyarrow_3lib__Tabular, /*tp_new*/
    0, /*tp_free*/
    0, /*tp_is_gc*/
    0, /*tp_bases*/
    0, /*tp_mro*/
    0, /*tp_cache*/
    0, /*tp_subclasses*/
    0, /*tp_weaklist*/
    0, /*tp_del*/
    0, /*tp_version_tag*/
    #if CYTHON_USE_TP_FINALIZE
    0, /*tp_finalize*/
    #else
    NULL, /*tp_finalize*/
    #endif
    #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
    0, /*tp_vectorcall*/
    #endif
    #if __PYX_NEED_TP_PRINT_SLOT == 1
    0, /*tp_print*/
    #endif
    #if PY_VERSION_HEX >= 0x030C0000
    0, /*tp_watched*/
    #endif
    #if PY_VERSION_HEX >= 0x030d00A4
    0, /*tp_versions_used*/
    #endif
    #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
    0, /*tp_pypy_flags*/
    #endif
  };
  #endif
  static struct __pyx_vtabstruct_7pyarrow_3lib_Table __pyx_vtable_7pyarrow_3lib_Table;

  static PyObject *__pyx_tp_new_7pyarrow_3lib_Table(PyTypeObject *t, PyObject *a, PyObject *k) {
    struct __pyx_obj_7pyarrow_3lib_Table *p;
    PyObject *o = __pyx_tp_new_7pyarrow_3lib__Tabular(t, a, k);
    if (unlikely(!o)) return 0;
    p = ((struct __pyx_obj_7pyarrow_3lib_Table *)o);
    p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib__Tabular*)__pyx_vtabptr_7pyarrow_3lib_Table;
    __Pyx_default_placement_construct(&(p->sp_table));
    if (unlikely(__pyx_pw_7pyarrow_3lib_5Table_1__cinit__(o, __pyx_mstate_global->__pyx_empty_tuple, NULL) < 0)) goto bad;
    return o;
    bad:
    Py_DECREF(o); o = 0;
    return NULL;
  }

  static void __pyx_tp_dealloc_7pyarrow_3lib_Table(PyObject *o) {
    struct __pyx_obj_7pyarrow_3lib_Table *p = (struct __pyx_obj_7pyarrow_3lib_Table *)o;
    #if CYTHON_USE_TP_FINALIZE
    if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) {
      if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_7pyarrow_3lib_Table) {
        if (PyObject_CallFinalizerFromDealloc(o)) return;
      }
    }
    #endif
    __Pyx_call_destructor(p->sp_table);
    __pyx_tp_dealloc_7pyarrow_3lib__Weakrefable(o);
  }

  static PyObject *__pyx_getprop_7pyarrow_3lib_5Table_schema(PyObject *o, CYTHON_UNUSED void *x) {
    return __pyx_pw_7pyarrow_3lib_5Table_6schema_1__get__(o);
  }

  static PyObject *__pyx_getprop_7pyarrow_3lib_5Table_num_columns(PyObject *o, CYTHON_UNUSED void *x) {
    return __pyx_pw_7pyarrow_3lib_5Table_11num_columns_1__get__(o);
  }

  static PyObject *__pyx_getprop_7pyarrow_3lib_5Table_num_rows(PyObject *o, CYTHON_UNUSED void *x) {
    return __pyx_pw_7pyarrow_3lib_5Table_8num_rows_1__get__(o);
  }

  static PyObject *__pyx_getprop_7pyarrow_3lib_5Table_nbytes(PyObject *o, CYTHON_UNUSED void *x) {
    return __pyx_pw_7pyarrow_3lib_5Table_6nbytes_1__get__(o);
  }

  static PyObject *__pyx_getprop_7pyarrow_3lib_5Table_is_cpu(PyObject *o, CYTHON_UNUSED void *x) {
    return __pyx_pw_7pyarrow_3lib_5Table_6is_cpu_1__get__(o);
  }

  static PyMethodDef __pyx_methods_7pyarrow_3lib_Table[] = {
    {"_is_initialized", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Table_3_is_initialized, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Table_2_is_initialized},
    {"validate", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Table_5validate, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Table_4validate},
    {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Table_7__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Table_6__reduce__},
    {"slice", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Table_9slice, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Table_8slice},
    {"select", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Table_11select, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Table_10select},
    {"replace_schema_metadata", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Table_13replace_schema_metadata, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Table_12replace_schema_metadata},
    {"flatten", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Table_15flatten, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Table_14flatten},
    {"combine_chunks", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Table_17combine_chunks, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Table_16combine_chunks},
    {"unify_dictionaries", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Table_19unify_dictionaries, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Table_18unify_dictionaries},
    {"equals", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Table_21equals, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Table_20equals},
    {"cast", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Table_23cast, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Table_22cast},
    {"from_pandas", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Table_25from_pandas, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Table_24from_pandas},
    {"from_arrays", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Table_27from_arrays, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Table_26from_arrays},
    {"from_struct_array", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Table_29from_struct_array, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Table_28from_struct_array},
    {"to_struct_array", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Table_31to_struct_array, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Table_30to_struct_array},
    {"from_batches", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Table_33from_batches, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Table_32from_batches},
    {"to_batches", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Table_35to_batches, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Table_34to_batches},
    {"to_reader", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Table_37to_reader, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Table_36to_reader},
    {"_to_pandas", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Table_39_to_pandas, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Table_38_to_pandas},
    {"_column", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Table_41_column, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Table_40_column},
    {"get_total_buffer_size", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Table_43get_total_buffer_size, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Table_42get_total_buffer_size},
    {"__sizeof__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Table_45__sizeof__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Table_44__sizeof__},
    {"add_column", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Table_47add_column, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Table_46add_column},
    {"remove_column", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Table_49remove_column, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Table_48remove_column},
    {"set_column", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Table_51set_column, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Table_50set_column},
    {"rename_columns", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Table_53rename_columns, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Table_52rename_columns},
    {"drop", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Table_55drop, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Table_54drop},
    {"group_by", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Table_57group_by, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Table_56group_by},
    {"join", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Table_59join, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Table_58join},
    {"join_asof", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Table_61join_asof, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Table_60join_asof},
    {"__arrow_c_stream__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Table_63__arrow_c_stream__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Table_62__arrow_c_stream__},
    {0, 0, 0, 0}
  };

  static struct PyGetSetDef __pyx_getsets_7pyarrow_3lib_Table[] = {
    {"schema", __pyx_getprop_7pyarrow_3lib_5Table_schema, 0, PyDoc_STR("\n        Schema of the table and its columns.\n\n        Returns\n        -------\n        Schema\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> import pandas as pd\n        >>> df = pd.DataFrame({'n_legs': [2, 4, 5, 100],\n        ...                    'animals': [\"Flamingo\", \"Horse\", \"Brittle stars\", \"Centipede\"]})\n        >>> table = pa.Table.from_pandas(df)\n        >>> table.schema\n        n_legs: int64\n        animals: string\n        -- schema metadata --\n        pandas: '{\"index_columns\": [{\"kind\": \"range\", \"name\": null, \"start\": 0, \"' ...\n        "), 0},
        {"num_columns", __pyx_getprop_7pyarrow_3lib_5Table_num_columns, 0, PyDoc_STR("\n        Number of columns in this table.\n\n        Returns\n        -------\n        int\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> import pandas as pd\n        >>> df = pd.DataFrame({'n_legs': [None, 4, 5, None],\n        ...                    'animals': [\"Flamingo\", \"Horse\", None, \"Centipede\"]})\n        >>> table = pa.Table.from_pandas(df)\n        >>> table.num_columns\n        2\n        "), 0},
        {"num_rows", __pyx_getprop_7pyarrow_3lib_5Table_num_rows, 0, PyDoc_STR("\n        Number of rows in this table.\n\n        Due to the definition of a table, all columns have the same number of\n        rows.\n\n        Returns\n        -------\n        int\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> import pandas as pd\n        >>> df = pd.DataFrame({'n_legs': [None, 4, 5, None],\n        ...                    'animals': [\"Flamingo\", \"Horse\", None, \"Centipede\"]})\n        >>> table = pa.Table.from_pandas(df)\n        >>> table.num_rows\n        4\n        "), 0},
        {"nbytes", __pyx_getprop_7pyarrow_3lib_5Table_nbytes, 0, PyDoc_STR("\n        Total number of bytes consumed by the elements of the table.\n\n        In other words, the sum of bytes from all buffer ranges referenced.\n\n        Unlike `get_total_buffer_size` this method will account for array\n        offsets.\n\n        If buffers are shared between arrays then the shared\n        portion will only be counted multiple times.\n\n        The dictionary of dictionary arrays will always be counted in their\n        entirety even if the array only references a portion of the dictionary.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> import pandas as pd\n        >>> df = pd.DataFrame({'n_legs': [None, 4, 5, None],\n        ...                    'animals': [\"Flamingo\", \"Horse\", None, \"Centipede\"]})\n        >>> table = pa.Table.from_pandas(df)\n        >>> table.nbytes\n        72\n        "), 0},
        {"is_cpu", __pyx_getprop_7pyarrow_3lib_5Table_is_cpu, 0, PyDoc_STR("\n        Whether all ChunkedArrays are CPU-accessible.\n        "), 0},
        {0, 0, 0, 0, 0}
      };
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib_Table_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_Table},
        {Py_tp_doc, (void *)PyDoc_STR("\n    A collection of top-level named, equal length Arrow arrays.\n\n    Warnings\n    --------\n    Do not call this class's constructor directly, use one of the ``from_*``\n    methods instead.\n\n    Examples\n    --------\n    >>> import pyarrow as pa\n    >>> n_legs = pa.array([2, 4, 5, 100])\n    >>> animals = pa.array([\"Flamingo\", \"Horse\", \"Brittle stars\", \"Centipede\"])\n    >>> names = [\"n_legs\", \"animals\"]\n\n    Construct a Table from arrays:\n\n    >>> pa.Table.from_arrays([n_legs, animals], names=names)\n    pyarrow.Table\n    n_legs: int64\n    animals: string\n    ----\n    n_legs: [[2,4,5,100]]\n    animals: [[\"Flamingo\",\"Horse\",\"Brittle stars\",\"Centipede\"]]\n\n    Construct a Table from a RecordBatch:\n\n    >>> batch = pa.record_batch([n_legs, animals], names=names)\n    >>> pa.Table.from_batches([batch])\n    pyarrow.Table\n    n_legs: int64\n    animals: string\n    ----\n    n_legs: [[2,4,5,100]]\n    animals: [[\"Flamingo\",\"Horse\",\"Brittle stars\",\"Centipede\"]]\n\n    Construct a Table from pandas DataFrame:\n\n    >>> import pandas as pd\n    >>> df = pd.DataFrame({'year': [2020, 2022, 2019, 2021],\n    ...                    'n_legs': [2, 4, 5, 100],\n    ...                    'animals': [\"Flamingo\", \"Horse\", \"Brittle stars\", \"Centipede\"]})\n    >>> pa.Table.from_pandas(df)\n    pyarrow.Table\n    year: int64\n    n_legs: int64\n    animals: string\n    ----\n    year: [[2020,2022,2019,2021]]\n    n_legs: [[2,4,5,100]]\n    animals: [[\"Flamingo\",\"Horse\",\"Brittle stars\",\"Centipede\"]]\n\n    Construct a Table from a dictionary of arrays:\n\n    >>> pydict = {'n_legs': n_legs, 'animals': animals}\n    >>> pa.Table.from_pydict(pydict)\n    pyarrow.Table\n    n_legs: int64\n    animals: string\n    ----\n    n_legs: [[2,4,5,100]]\n    animals: [[\"Flamingo\",\"Horse\",\"Brittle stars\",\"Centipede\"]]\n    >>> pa.Table.from_pydict(pydict).schema\n    n_legs: int64\n    animals: string\n\n    Construct a Ta""ble from a dictionary of arrays with metadata:\n\n    >>> my_metadata={\"n_legs\": \"Number of legs per animal\"}\n    >>> pa.Table.from_pydict(pydict, metadata=my_metadata).schema\n    n_legs: int64\n    animals: string\n    -- schema metadata --\n    n_legs: 'Number of legs per animal'\n\n    Construct a Table from a list of rows:\n\n    >>> pylist = [{'n_legs': 2, 'animals': 'Flamingo'}, {'year': 2021, 'animals': 'Centipede'}]\n    >>> pa.Table.from_pylist(pylist)\n    pyarrow.Table\n    n_legs: int64\n    animals: string\n    ----\n    n_legs: [[2,null]]\n    animals: [[\"Flamingo\",\"Centipede\"]]\n\n    Construct a Table from a list of rows with pyarrow schema:\n\n    >>> my_schema = pa.schema([\n    ...     pa.field('year', pa.int64()),\n    ...     pa.field('n_legs', pa.int64()),\n    ...     pa.field('animals', pa.string())],\n    ...     metadata={\"year\": \"Year of entry\"})\n    >>> pa.Table.from_pylist(pylist, schema=my_schema).schema\n    year: int64\n    n_legs: int64\n    animals: string\n    -- schema metadata --\n    year: 'Year of entry'\n\n    Construct a Table with :func:`pyarrow.table`:\n\n    >>> pa.table([n_legs, animals], names=names)\n    pyarrow.Table\n    n_legs: int64\n    animals: string\n    ----\n    n_legs: [[2,4,5,100]]\n    animals: [[\"Flamingo\",\"Horse\",\"Brittle stars\",\"Centipede\"]]\n    ")},
        {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_Table},
        {Py_tp_getset, (void *)__pyx_getsets_7pyarrow_3lib_Table},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_Table},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib_Table_spec = {
        "pyarrow.lib.Table",
        sizeof(struct __pyx_obj_7pyarrow_3lib_Table),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
        __pyx_type_7pyarrow_3lib_Table_slots,
      };
      #else

      static PyTypeObject __pyx_type_7pyarrow_3lib_Table = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""Table", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib_Table), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib_Table, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_8_Tabular_13__repr__, /*tp_repr*/
        #else
        0, /*tp_repr*/
        #endif
        0, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        0, /*tp_str*/
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
        PyDoc_STR("\n    A collection of top-level named, equal length Arrow arrays.\n\n    Warnings\n    --------\n    Do not call this class's constructor directly, use one of the ``from_*``\n    methods instead.\n\n    Examples\n    --------\n    >>> import pyarrow as pa\n    >>> n_legs = pa.array([2, 4, 5, 100])\n    >>> animals = pa.array([\"Flamingo\", \"Horse\", \"Brittle stars\", \"Centipede\"])\n    >>> names = [\"n_legs\", \"animals\"]\n\n    Construct a Table from arrays:\n\n    >>> pa.Table.from_arrays([n_legs, animals], names=names)\n    pyarrow.Table\n    n_legs: int64\n    animals: string\n    ----\n    n_legs: [[2,4,5,100]]\n    animals: [[\"Flamingo\",\"Horse\",\"Brittle stars\",\"Centipede\"]]\n\n    Construct a Table from a RecordBatch:\n\n    >>> batch = pa.record_batch([n_legs, animals], names=names)\n    >>> pa.Table.from_batches([batch])\n    pyarrow.Table\n    n_legs: int64\n    animals: string\n    ----\n    n_legs: [[2,4,5,100]]\n    animals: [[\"Flamingo\",\"Horse\",\"Brittle stars\",\"Centipede\"]]\n\n    Construct a Table from pandas DataFrame:\n\n    >>> import pandas as pd\n    >>> df = pd.DataFrame({'year': [2020, 2022, 2019, 2021],\n    ...                    'n_legs': [2, 4, 5, 100],\n    ...                    'animals': [\"Flamingo\", \"Horse\", \"Brittle stars\", \"Centipede\"]})\n    >>> pa.Table.from_pandas(df)\n    pyarrow.Table\n    year: int64\n    n_legs: int64\n    animals: string\n    ----\n    year: [[2020,2022,2019,2021]]\n    n_legs: [[2,4,5,100]]\n    animals: [[\"Flamingo\",\"Horse\",\"Brittle stars\",\"Centipede\"]]\n\n    Construct a Table from a dictionary of arrays:\n\n    >>> pydict = {'n_legs': n_legs, 'animals': animals}\n    >>> pa.Table.from_pydict(pydict)\n    pyarrow.Table\n    n_legs: int64\n    animals: string\n    ----\n    n_legs: [[2,4,5,100]]\n    animals: [[\"Flamingo\",\"Horse\",\"Brittle stars\",\"Centipede\"]]\n    >>> pa.Table.from_pydict(pydict).schema\n    n_legs: int64\n    animals: string\n\n    Construct a Ta""ble from a dictionary of arrays with metadata:\n\n    >>> my_metadata={\"n_legs\": \"Number of legs per animal\"}\n    >>> pa.Table.from_pydict(pydict, metadata=my_metadata).schema\n    n_legs: int64\n    animals: string\n    -- schema metadata --\n    n_legs: 'Number of legs per animal'\n\n    Construct a Table from a list of rows:\n\n    >>> pylist = [{'n_legs': 2, 'animals': 'Flamingo'}, {'year': 2021, 'animals': 'Centipede'}]\n    >>> pa.Table.from_pylist(pylist)\n    pyarrow.Table\n    n_legs: int64\n    animals: string\n    ----\n    n_legs: [[2,null]]\n    animals: [[\"Flamingo\",\"Centipede\"]]\n\n    Construct a Table from a list of rows with pyarrow schema:\n\n    >>> my_schema = pa.schema([\n    ...     pa.field('year', pa.int64()),\n    ...     pa.field('n_legs', pa.int64()),\n    ...     pa.field('animals', pa.string())],\n    ...     metadata={\"year\": \"Year of entry\"})\n    >>> pa.Table.from_pylist(pylist, schema=my_schema).schema\n    year: int64\n    n_legs: int64\n    animals: string\n    -- schema metadata --\n    year: 'Year of entry'\n\n    Construct a Table with :func:`pyarrow.table`:\n\n    >>> pa.table([n_legs, animals], names=names)\n    pyarrow.Table\n    n_legs: int64\n    animals: string\n    ----\n    n_legs: [[2,4,5,100]]\n    animals: [[\"Flamingo\",\"Horse\",\"Brittle stars\",\"Centipede\"]]\n    "), /*tp_doc*/
        0, /*tp_traverse*/
        0, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        0, /*tp_iter*/
        0, /*tp_iternext*/
        __pyx_methods_7pyarrow_3lib_Table, /*tp_methods*/
        0, /*tp_members*/
        __pyx_getsets_7pyarrow_3lib_Table, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_8_Tabular_1__init__, /*tp_init*/
        #else
        0, /*tp_init*/
        #endif
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib_Table, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif
      static struct __pyx_vtabstruct_7pyarrow_3lib_RecordBatch __pyx_vtable_7pyarrow_3lib_RecordBatch;

      static PyObject *__pyx_tp_new_7pyarrow_3lib_RecordBatch(PyTypeObject *t, PyObject *a, PyObject *k) {
        struct __pyx_obj_7pyarrow_3lib_RecordBatch *p;
        PyObject *o = __pyx_tp_new_7pyarrow_3lib__Tabular(t, a, k);
        if (unlikely(!o)) return 0;
        p = ((struct __pyx_obj_7pyarrow_3lib_RecordBatch *)o);
        p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib__Tabular*)__pyx_vtabptr_7pyarrow_3lib_RecordBatch;
        __Pyx_default_placement_construct(&(p->sp_batch));
        p->_schema = ((struct __pyx_obj_7pyarrow_3lib_Schema *)Py_None); Py_INCREF(Py_None);
        if (unlikely(__pyx_pw_7pyarrow_3lib_11RecordBatch_1__cinit__(o, __pyx_mstate_global->__pyx_empty_tuple, NULL) < 0)) goto bad;
        return o;
        bad:
        Py_DECREF(o); o = 0;
        return NULL;
      }

      static void __pyx_tp_dealloc_7pyarrow_3lib_RecordBatch(PyObject *o) {
        struct __pyx_obj_7pyarrow_3lib_RecordBatch *p = (struct __pyx_obj_7pyarrow_3lib_RecordBatch *)o;
        #if CYTHON_USE_TP_FINALIZE
        if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
          if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_7pyarrow_3lib_RecordBatch) {
            if (PyObject_CallFinalizerFromDealloc(o)) return;
          }
        }
        #endif
        PyObject_GC_UnTrack(o);
        __Pyx_call_destructor(p->sp_batch);
        Py_CLEAR(p->_schema);
        __pyx_tp_dealloc_7pyarrow_3lib__Weakrefable(o);
      }

      static int __pyx_tp_traverse_7pyarrow_3lib_RecordBatch(PyObject *o, visitproc v, void *a) {
        int e;
        struct __pyx_obj_7pyarrow_3lib_RecordBatch *p = (struct __pyx_obj_7pyarrow_3lib_RecordBatch *)o;
        #if !CYTHON_USE_MODULE_STATE
        e = 0;
        if (likely(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Tabular)) {
          traverseproc traverse = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Tabular, tp_traverse, traverseproc);
          if (traverse) { e = traverse(o, v, a); }
        } else
        #endif
        { e = __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_7pyarrow_3lib_RecordBatch); }
        if (e) return e;
        {
          e = __Pyx_call_type_traverse(o, 0, v, a);
          if (e) return e;
        }
        if (p->_schema) {
          e = (*v)(((PyObject *)p->_schema), a); if (e) return e;
        }
        return 0;
      }

      static int __pyx_tp_clear_7pyarrow_3lib_RecordBatch(PyObject *o) {
        PyObject* tmp;
        struct __pyx_obj_7pyarrow_3lib_RecordBatch *p = (struct __pyx_obj_7pyarrow_3lib_RecordBatch *)o;
        #if !CYTHON_USE_MODULE_STATE
        if (likely(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Tabular)) {
          inquiry clear = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Tabular, tp_clear, inquiry);
          if (clear) clear(o);
        } else
        #endif
        { __Pyx_call_next_tp_clear(o, __pyx_tp_clear_7pyarrow_3lib_RecordBatch); }
        tmp = ((PyObject*)p->_schema);
        p->_schema = ((struct __pyx_obj_7pyarrow_3lib_Schema *)Py_None); Py_INCREF(Py_None);
        Py_XDECREF(tmp);
        return 0;
      }

      static PyObject *__pyx_getprop_7pyarrow_3lib_11RecordBatch_num_columns(PyObject *o, CYTHON_UNUSED void *x) {
        return __pyx_pw_7pyarrow_3lib_11RecordBatch_11num_columns_1__get__(o);
      }

      static PyObject *__pyx_getprop_7pyarrow_3lib_11RecordBatch_num_rows(PyObject *o, CYTHON_UNUSED void *x) {
        return __pyx_pw_7pyarrow_3lib_11RecordBatch_8num_rows_1__get__(o);
      }

      static PyObject *__pyx_getprop_7pyarrow_3lib_11RecordBatch_schema(PyObject *o, CYTHON_UNUSED void *x) {
        return __pyx_pw_7pyarrow_3lib_11RecordBatch_6schema_1__get__(o);
      }

      static PyObject *__pyx_getprop_7pyarrow_3lib_11RecordBatch_nbytes(PyObject *o, CYTHON_UNUSED void *x) {
        return __pyx_pw_7pyarrow_3lib_11RecordBatch_6nbytes_1__get__(o);
      }

      static PyObject *__pyx_getprop_7pyarrow_3lib_11RecordBatch_device_type(PyObject *o, CYTHON_UNUSED void *x) {
        return __pyx_pw_7pyarrow_3lib_11RecordBatch_11device_type_1__get__(o);
      }

      static PyObject *__pyx_getprop_7pyarrow_3lib_11RecordBatch_is_cpu(PyObject *o, CYTHON_UNUSED void *x) {
        return __pyx_pw_7pyarrow_3lib_11RecordBatch_6is_cpu_1__get__(o);
      }

      static PyMethodDef __pyx_methods_7pyarrow_3lib_RecordBatch[] = {
        {"_is_initialized", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_11RecordBatch_3_is_initialized, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_11RecordBatch_2_is_initialized},
        {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_11RecordBatch_5__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_11RecordBatch_4__reduce__},
        {"validate", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_11RecordBatch_7validate, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_11RecordBatch_6validate},
        {"replace_schema_metadata", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_11RecordBatch_9replace_schema_metadata, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_11RecordBatch_8replace_schema_metadata},
        {"_column", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_11RecordBatch_11_column, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_11RecordBatch_10_column},
        {"get_total_buffer_size", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_11RecordBatch_13get_total_buffer_size, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_11RecordBatch_12get_total_buffer_size},
        {"__sizeof__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_11RecordBatch_15__sizeof__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_11RecordBatch_14__sizeof__},
        {"add_column", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_11RecordBatch_17add_column, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_11RecordBatch_16add_column},
        {"remove_column", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_11RecordBatch_19remove_column, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_11RecordBatch_18remove_column},
        {"set_column", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_11RecordBatch_21set_column, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_11RecordBatch_20set_column},
        {"rename_columns", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_11RecordBatch_23rename_columns, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_11RecordBatch_22rename_columns},
        {"serialize", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_11RecordBatch_25serialize, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_11RecordBatch_24serialize},
        {"slice", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_11RecordBatch_27slice, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_11RecordBatch_26slice},
        {"equals", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_11RecordBatch_29equals, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_11RecordBatch_28equals},
        {"select", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_11RecordBatch_31select, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_11RecordBatch_30select},
        {"cast", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_11RecordBatch_33cast, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_11RecordBatch_32cast},
        {"_to_pandas", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_11RecordBatch_35_to_pandas, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_11RecordBatch_34_to_pandas},
        {"from_pandas", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_11RecordBatch_37from_pandas, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_11RecordBatch_36from_pandas},
        {"from_arrays", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_11RecordBatch_39from_arrays, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_11RecordBatch_38from_arrays},
        {"from_struct_array", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_11RecordBatch_41from_struct_array, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_11RecordBatch_40from_struct_array},
        {"to_struct_array", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_11RecordBatch_43to_struct_array, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_11RecordBatch_42to_struct_array},
        {"to_tensor", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_11RecordBatch_45to_tensor, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_11RecordBatch_44to_tensor},
        {"copy_to", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_11RecordBatch_47copy_to, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_11RecordBatch_46copy_to},
        {"_export_to_c", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_11RecordBatch_49_export_to_c, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_11RecordBatch_48_export_to_c},
        {"_import_from_c", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_11RecordBatch_51_import_from_c, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_11RecordBatch_50_import_from_c},
        {"__arrow_c_array__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_11RecordBatch_53__arrow_c_array__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_11RecordBatch_52__arrow_c_array__},
        {"__arrow_c_stream__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_11RecordBatch_55__arrow_c_stream__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_11RecordBatch_54__arrow_c_stream__},
        {"_import_from_c_capsule", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_11RecordBatch_57_import_from_c_capsule, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_11RecordBatch_56_import_from_c_capsule},
        {"_export_to_c_device", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_11RecordBatch_59_export_to_c_device, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_11RecordBatch_58_export_to_c_device},
        {"_import_from_c_device", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_11RecordBatch_61_import_from_c_device, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_11RecordBatch_60_import_from_c_device},
        {"__arrow_c_device_array__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_11RecordBatch_63__arrow_c_device_array__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_11RecordBatch_62__arrow_c_device_array__},
        {"_import_from_c_device_capsule", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_11RecordBatch_65_import_from_c_device_capsule, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_11RecordBatch_64_import_from_c_device_capsule},
        {0, 0, 0, 0}
      };

      static struct PyGetSetDef __pyx_getsets_7pyarrow_3lib_RecordBatch[] = {
        {"num_columns", __pyx_getprop_7pyarrow_3lib_11RecordBatch_num_columns, 0, PyDoc_STR("\n        Number of columns\n\n        Returns\n        -------\n        int\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> n_legs = pa.array([2, 2, 4, 4, 5, 100])\n        >>> animals = pa.array([\"Flamingo\", \"Parrot\", \"Dog\", \"Horse\", \"Brittle stars\", \"Centipede\"])\n        >>> batch = pa.RecordBatch.from_arrays([n_legs, animals],\n        ...                                     names=[\"n_legs\", \"animals\"])\n        >>> batch.num_columns\n        2\n        "), 0},
        {"num_rows", __pyx_getprop_7pyarrow_3lib_11RecordBatch_num_rows, 0, PyDoc_STR("\n        Number of rows\n\n        Due to the definition of a RecordBatch, all columns have the same\n        number of rows.\n\n        Returns\n        -------\n        int\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> n_legs = pa.array([2, 2, 4, 4, 5, 100])\n        >>> animals = pa.array([\"Flamingo\", \"Parrot\", \"Dog\", \"Horse\", \"Brittle stars\", \"Centipede\"])\n        >>> batch = pa.RecordBatch.from_arrays([n_legs, animals],\n        ...                                     names=[\"n_legs\", \"animals\"])\n        >>> batch.num_rows\n        6\n        "), 0},
        {"schema", __pyx_getprop_7pyarrow_3lib_11RecordBatch_schema, 0, PyDoc_STR("\n        Schema of the RecordBatch and its columns\n\n        Returns\n        -------\n        pyarrow.Schema\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> n_legs = pa.array([2, 2, 4, 4, 5, 100])\n        >>> animals = pa.array([\"Flamingo\", \"Parrot\", \"Dog\", \"Horse\", \"Brittle stars\", \"Centipede\"])\n        >>> batch = pa.RecordBatch.from_arrays([n_legs, animals],\n        ...                                     names=[\"n_legs\", \"animals\"])\n        >>> batch.schema\n        n_legs: int64\n        animals: string\n        "), 0},
        {"nbytes", __pyx_getprop_7pyarrow_3lib_11RecordBatch_nbytes, 0, PyDoc_STR("\n        Total number of bytes consumed by the elements of the record batch.\n\n        In other words, the sum of bytes from all buffer ranges referenced.\n\n        Unlike `get_total_buffer_size` this method will account for array\n        offsets.\n\n        If buffers are shared between arrays then the shared\n        portion will only be counted multiple times.\n\n        The dictionary of dictionary arrays will always be counted in their\n        entirety even if the array only references a portion of the dictionary.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> n_legs = pa.array([2, 2, 4, 4, 5, 100])\n        >>> animals = pa.array([\"Flamingo\", \"Parrot\", \"Dog\", \"Horse\", \"Brittle stars\", \"Centipede\"])\n        >>> batch = pa.RecordBatch.from_arrays([n_legs, animals],\n        ...                                     names=[\"n_legs\", \"animals\"])\n        >>> batch.nbytes\n        116\n        "), 0},
        {"device_type", __pyx_getprop_7pyarrow_3lib_11RecordBatch_device_type, 0, PyDoc_STR("\n        The device type where the arrays in the RecordBatch reside.\n\n        Returns\n        -------\n        DeviceAllocationType\n        "), 0},
        {"is_cpu", __pyx_getprop_7pyarrow_3lib_11RecordBatch_is_cpu, 0, PyDoc_STR("\n        Whether the RecordBatch's arrays are CPU-accessible.\n        "), 0},
        {0, 0, 0, 0, 0}
      };
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib_RecordBatch_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_RecordBatch},
        {Py_tp_doc, (void *)PyDoc_STR("\n    Batch of rows of columns of equal length\n\n    Warnings\n    --------\n    Do not call this class's constructor directly, use one of the\n    ``RecordBatch.from_*`` functions instead.\n\n    Examples\n    --------\n    >>> import pyarrow as pa\n    >>> n_legs = pa.array([2, 2, 4, 4, 5, 100])\n    >>> animals = pa.array([\"Flamingo\", \"Parrot\", \"Dog\", \"Horse\", \"Brittle stars\", \"Centipede\"])\n    >>> names = [\"n_legs\", \"animals\"]\n\n    Constructing a RecordBatch from arrays:\n\n    >>> pa.RecordBatch.from_arrays([n_legs, animals], names=names)\n    pyarrow.RecordBatch\n    n_legs: int64\n    animals: string\n    ----\n    n_legs: [2,2,4,4,5,100]\n    animals: [\"Flamingo\",\"Parrot\",\"Dog\",\"Horse\",\"Brittle stars\",\"Centipede\"]\n    >>> pa.RecordBatch.from_arrays([n_legs, animals], names=names).to_pandas()\n       n_legs        animals\n    0       2       Flamingo\n    1       2         Parrot\n    2       4            Dog\n    3       4          Horse\n    4       5  Brittle stars\n    5     100      Centipede\n\n    Constructing a RecordBatch from pandas DataFrame:\n\n    >>> import pandas as pd\n    >>> df = pd.DataFrame({'year': [2020, 2022, 2021, 2022],\n    ...                    'month': [3, 5, 7, 9],\n    ...                    'day': [1, 5, 9, 13],\n    ...                    'n_legs': [2, 4, 5, 100],\n    ...                    'animals': [\"Flamingo\", \"Horse\", \"Brittle stars\", \"Centipede\"]})\n    >>> pa.RecordBatch.from_pandas(df)\n    pyarrow.RecordBatch\n    year: int64\n    month: int64\n    day: int64\n    n_legs: int64\n    animals: string\n    ----\n    year: [2020,2022,2021,2022]\n    month: [3,5,7,9]\n    day: [1,5,9,13]\n    n_legs: [2,4,5,100]\n    animals: [\"Flamingo\",\"Horse\",\"Brittle stars\",\"Centipede\"]\n    >>> pa.RecordBatch.from_pandas(df).to_pandas()\n       year  month  day  n_legs        animals\n    0  2020      3    1       2       Flamingo\n    1  2022      5    5       4          Horse\n    2""  2021      7    9       5  Brittle stars\n    3  2022      9   13     100      Centipede\n\n    Constructing a RecordBatch from pylist:\n\n    >>> pylist = [{'n_legs': 2, 'animals': 'Flamingo'},\n    ...           {'n_legs': 4, 'animals': 'Dog'}]\n    >>> pa.RecordBatch.from_pylist(pylist).to_pandas()\n       n_legs   animals\n    0       2  Flamingo\n    1       4       Dog\n\n    You can also construct a RecordBatch using :func:`pyarrow.record_batch`:\n\n    >>> pa.record_batch([n_legs, animals], names=names).to_pandas()\n       n_legs        animals\n    0       2       Flamingo\n    1       2         Parrot\n    2       4            Dog\n    3       4          Horse\n    4       5  Brittle stars\n    5     100      Centipede\n\n    >>> pa.record_batch(df)\n    pyarrow.RecordBatch\n    year: int64\n    month: int64\n    day: int64\n    n_legs: int64\n    animals: string\n    ----\n    year: [2020,2022,2021,2022]\n    month: [3,5,7,9]\n    day: [1,5,9,13]\n    n_legs: [2,4,5,100]\n    animals: [\"Flamingo\",\"Horse\",\"Brittle stars\",\"Centipede\"]\n    ")},
        {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyarrow_3lib_RecordBatch},
        {Py_tp_clear, (void *)__pyx_tp_clear_7pyarrow_3lib_RecordBatch},
        {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_RecordBatch},
        {Py_tp_getset, (void *)__pyx_getsets_7pyarrow_3lib_RecordBatch},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_RecordBatch},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib_RecordBatch_spec = {
        "pyarrow.lib.RecordBatch",
        sizeof(struct __pyx_obj_7pyarrow_3lib_RecordBatch),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
        __pyx_type_7pyarrow_3lib_RecordBatch_slots,
      };
      #else

      static PyTypeObject __pyx_type_7pyarrow_3lib_RecordBatch = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""RecordBatch", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib_RecordBatch), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib_RecordBatch, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_8_Tabular_13__repr__, /*tp_repr*/
        #else
        0, /*tp_repr*/
        #endif
        0, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        0, /*tp_str*/
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
        PyDoc_STR("\n    Batch of rows of columns of equal length\n\n    Warnings\n    --------\n    Do not call this class's constructor directly, use one of the\n    ``RecordBatch.from_*`` functions instead.\n\n    Examples\n    --------\n    >>> import pyarrow as pa\n    >>> n_legs = pa.array([2, 2, 4, 4, 5, 100])\n    >>> animals = pa.array([\"Flamingo\", \"Parrot\", \"Dog\", \"Horse\", \"Brittle stars\", \"Centipede\"])\n    >>> names = [\"n_legs\", \"animals\"]\n\n    Constructing a RecordBatch from arrays:\n\n    >>> pa.RecordBatch.from_arrays([n_legs, animals], names=names)\n    pyarrow.RecordBatch\n    n_legs: int64\n    animals: string\n    ----\n    n_legs: [2,2,4,4,5,100]\n    animals: [\"Flamingo\",\"Parrot\",\"Dog\",\"Horse\",\"Brittle stars\",\"Centipede\"]\n    >>> pa.RecordBatch.from_arrays([n_legs, animals], names=names).to_pandas()\n       n_legs        animals\n    0       2       Flamingo\n    1       2         Parrot\n    2       4            Dog\n    3       4          Horse\n    4       5  Brittle stars\n    5     100      Centipede\n\n    Constructing a RecordBatch from pandas DataFrame:\n\n    >>> import pandas as pd\n    >>> df = pd.DataFrame({'year': [2020, 2022, 2021, 2022],\n    ...                    'month': [3, 5, 7, 9],\n    ...                    'day': [1, 5, 9, 13],\n    ...                    'n_legs': [2, 4, 5, 100],\n    ...                    'animals': [\"Flamingo\", \"Horse\", \"Brittle stars\", \"Centipede\"]})\n    >>> pa.RecordBatch.from_pandas(df)\n    pyarrow.RecordBatch\n    year: int64\n    month: int64\n    day: int64\n    n_legs: int64\n    animals: string\n    ----\n    year: [2020,2022,2021,2022]\n    month: [3,5,7,9]\n    day: [1,5,9,13]\n    n_legs: [2,4,5,100]\n    animals: [\"Flamingo\",\"Horse\",\"Brittle stars\",\"Centipede\"]\n    >>> pa.RecordBatch.from_pandas(df).to_pandas()\n       year  month  day  n_legs        animals\n    0  2020      3    1       2       Flamingo\n    1  2022      5    5       4          Horse\n    2""  2021      7    9       5  Brittle stars\n    3  2022      9   13     100      Centipede\n\n    Constructing a RecordBatch from pylist:\n\n    >>> pylist = [{'n_legs': 2, 'animals': 'Flamingo'},\n    ...           {'n_legs': 4, 'animals': 'Dog'}]\n    >>> pa.RecordBatch.from_pylist(pylist).to_pandas()\n       n_legs   animals\n    0       2  Flamingo\n    1       4       Dog\n\n    You can also construct a RecordBatch using :func:`pyarrow.record_batch`:\n\n    >>> pa.record_batch([n_legs, animals], names=names).to_pandas()\n       n_legs        animals\n    0       2       Flamingo\n    1       2         Parrot\n    2       4            Dog\n    3       4          Horse\n    4       5  Brittle stars\n    5     100      Centipede\n\n    >>> pa.record_batch(df)\n    pyarrow.RecordBatch\n    year: int64\n    month: int64\n    day: int64\n    n_legs: int64\n    animals: string\n    ----\n    year: [2020,2022,2021,2022]\n    month: [3,5,7,9]\n    day: [1,5,9,13]\n    n_legs: [2,4,5,100]\n    animals: [\"Flamingo\",\"Horse\",\"Brittle stars\",\"Centipede\"]\n    "), /*tp_doc*/
        __pyx_tp_traverse_7pyarrow_3lib_RecordBatch, /*tp_traverse*/
        __pyx_tp_clear_7pyarrow_3lib_RecordBatch, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        0, /*tp_iter*/
        0, /*tp_iternext*/
        __pyx_methods_7pyarrow_3lib_RecordBatch, /*tp_methods*/
        0, /*tp_members*/
        __pyx_getsets_7pyarrow_3lib_RecordBatch, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_8_Tabular_1__init__, /*tp_init*/
        #else
        0, /*tp_init*/
        #endif
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib_RecordBatch, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif
      static struct __pyx_vtabstruct_7pyarrow_3lib_Device __pyx_vtable_7pyarrow_3lib_Device;

      static PyObject *__pyx_tp_new_7pyarrow_3lib_Device(PyTypeObject *t, PyObject *a, PyObject *k) {
        struct __pyx_obj_7pyarrow_3lib_Device *p;
        PyObject *o = __pyx_tp_new_7pyarrow_3lib__Weakrefable(t, a, k);
        if (unlikely(!o)) return 0;
        p = ((struct __pyx_obj_7pyarrow_3lib_Device *)o);
        p->__pyx_vtab = __pyx_vtabptr_7pyarrow_3lib_Device;
        __Pyx_default_placement_construct(&(p->device));
        return o;
      }

      static void __pyx_tp_dealloc_7pyarrow_3lib_Device(PyObject *o) {
        struct __pyx_obj_7pyarrow_3lib_Device *p = (struct __pyx_obj_7pyarrow_3lib_Device *)o;
        #if CYTHON_USE_TP_FINALIZE
        if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) {
          if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_7pyarrow_3lib_Device) {
            if (PyObject_CallFinalizerFromDealloc(o)) return;
          }
        }
        #endif
        __Pyx_call_destructor(p->device);
        __pyx_tp_dealloc_7pyarrow_3lib__Weakrefable(o);
      }

      static PyObject *__pyx_tp_richcompare_7pyarrow_3lib_Device(PyObject *o1, PyObject *o2, int op) {
        switch (op) {
          case Py_EQ: {
            return __pyx_pw_7pyarrow_3lib_6Device_3__eq__(o1, o2);
          }
          case Py_NE: {
            PyObject *ret;
            ret = __pyx_pw_7pyarrow_3lib_6Device_3__eq__(o1, o2);
            if (likely(ret && ret != Py_NotImplemented)) {
              int b = __Pyx_PyObject_IsTrue(ret);
              Py_DECREF(ret);
              if (unlikely(b < 0)) return NULL;
              ret = (b) ? Py_False : Py_True;
              Py_INCREF(ret);
            }
            return ret;
          }
          default: {
            return __Pyx_NewRef(Py_NotImplemented);
          }
        }
      }

      static PyObject *__pyx_getprop_7pyarrow_3lib_6Device_type_name(PyObject *o, CYTHON_UNUSED void *x) {
        return __pyx_pw_7pyarrow_3lib_6Device_9type_name_1__get__(o);
      }

      static PyObject *__pyx_getprop_7pyarrow_3lib_6Device_device_id(PyObject *o, CYTHON_UNUSED void *x) {
        return __pyx_pw_7pyarrow_3lib_6Device_9device_id_1__get__(o);
      }

      static PyObject *__pyx_getprop_7pyarrow_3lib_6Device_is_cpu(PyObject *o, CYTHON_UNUSED void *x) {
        return __pyx_pw_7pyarrow_3lib_6Device_6is_cpu_1__get__(o);
      }

      static PyObject *__pyx_getprop_7pyarrow_3lib_6Device_device_type(PyObject *o, CYTHON_UNUSED void *x) {
        return __pyx_pw_7pyarrow_3lib_6Device_11device_type_1__get__(o);
      }

      static PyMethodDef __pyx_methods_7pyarrow_3lib_Device[] = {
        {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_6Device_7__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_6Device_6__reduce_cython__},
        {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_6Device_9__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_6Device_8__setstate_cython__},
        {0, 0, 0, 0}
      };

      static struct PyGetSetDef __pyx_getsets_7pyarrow_3lib_Device[] = {
        {"type_name", __pyx_getprop_7pyarrow_3lib_6Device_type_name, 0, PyDoc_STR("\n        A shorthand for this device's type.\n        "), 0},
        {"device_id", __pyx_getprop_7pyarrow_3lib_6Device_device_id, 0, PyDoc_STR("\n        A device ID to identify this device if there are multiple of this type.\n\n        If there is no \"device_id\" equivalent (such as for the main CPU device on\n        non-numa systems) returns -1.\n        "), 0},
        {"is_cpu", __pyx_getprop_7pyarrow_3lib_6Device_is_cpu, 0, PyDoc_STR("\n        Whether this device is the main CPU device.\n\n        This shorthand method is very useful when deciding whether a memory address\n        is CPU-accessible.\n        "), 0},
        {"device_type", __pyx_getprop_7pyarrow_3lib_6Device_device_type, 0, PyDoc_STR("\n        Return the DeviceAllocationType of this device.\n        "), 0},
        {0, 0, 0, 0, 0}
      };
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib_Device_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_Device},
        {Py_tp_repr, (void *)__pyx_pw_7pyarrow_3lib_6Device_5__repr__},
        {Py_tp_doc, (void *)PyDoc_STR("Device()\n\nAbstract interface for hardware devices\n\nThis object represents a device with access to some memory spaces.\nWhen handling a Buffer or raw memory address, it allows deciding in which\ncontext the raw memory address should be interpreted\n(e.g. CPU-accessible memory, or embedded memory on some particular GPU).")},
        {Py_tp_richcompare, (void *)__pyx_tp_richcompare_7pyarrow_3lib_Device},
        {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_Device},
        {Py_tp_getset, (void *)__pyx_getsets_7pyarrow_3lib_Device},
        {Py_tp_init, (void *)__pyx_pw_7pyarrow_3lib_6Device_1__init__},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_Device},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib_Device_spec = {
        "pyarrow.lib.Device",
        sizeof(struct __pyx_obj_7pyarrow_3lib_Device),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
        __pyx_type_7pyarrow_3lib_Device_slots,
      };
      #else

      static PyTypeObject __pyx_type_7pyarrow_3lib_Device = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""Device", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib_Device), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib_Device, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        __pyx_pw_7pyarrow_3lib_6Device_5__repr__, /*tp_repr*/
        0, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        0, /*tp_str*/
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
        PyDoc_STR("Device()\n\nAbstract interface for hardware devices\n\nThis object represents a device with access to some memory spaces.\nWhen handling a Buffer or raw memory address, it allows deciding in which\ncontext the raw memory address should be interpreted\n(e.g. CPU-accessible memory, or embedded memory on some particular GPU)."), /*tp_doc*/
        0, /*tp_traverse*/
        0, /*tp_clear*/
        __pyx_tp_richcompare_7pyarrow_3lib_Device, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        0, /*tp_iter*/
        0, /*tp_iternext*/
        __pyx_methods_7pyarrow_3lib_Device, /*tp_methods*/
        0, /*tp_members*/
        __pyx_getsets_7pyarrow_3lib_Device, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        __pyx_pw_7pyarrow_3lib_6Device_1__init__, /*tp_init*/
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib_Device, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif
      static struct __pyx_vtabstruct_7pyarrow_3lib_MemoryManager __pyx_vtable_7pyarrow_3lib_MemoryManager;

      static PyObject *__pyx_tp_new_7pyarrow_3lib_MemoryManager(PyTypeObject *t, PyObject *a, PyObject *k) {
        struct __pyx_obj_7pyarrow_3lib_MemoryManager *p;
        PyObject *o = __pyx_tp_new_7pyarrow_3lib__Weakrefable(t, a, k);
        if (unlikely(!o)) return 0;
        p = ((struct __pyx_obj_7pyarrow_3lib_MemoryManager *)o);
        p->__pyx_vtab = __pyx_vtabptr_7pyarrow_3lib_MemoryManager;
        __Pyx_default_placement_construct(&(p->memory_manager));
        return o;
      }

      static void __pyx_tp_dealloc_7pyarrow_3lib_MemoryManager(PyObject *o) {
        struct __pyx_obj_7pyarrow_3lib_MemoryManager *p = (struct __pyx_obj_7pyarrow_3lib_MemoryManager *)o;
        #if CYTHON_USE_TP_FINALIZE
        if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) {
          if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_7pyarrow_3lib_MemoryManager) {
            if (PyObject_CallFinalizerFromDealloc(o)) return;
          }
        }
        #endif
        __Pyx_call_destructor(p->memory_manager);
        __pyx_tp_dealloc_7pyarrow_3lib__Weakrefable(o);
      }

      static PyObject *__pyx_getprop_7pyarrow_3lib_13MemoryManager_device(PyObject *o, CYTHON_UNUSED void *x) {
        return __pyx_pw_7pyarrow_3lib_13MemoryManager_6device_1__get__(o);
      }

      static PyObject *__pyx_getprop_7pyarrow_3lib_13MemoryManager_is_cpu(PyObject *o, CYTHON_UNUSED void *x) {
        return __pyx_pw_7pyarrow_3lib_13MemoryManager_6is_cpu_1__get__(o);
      }

      static PyMethodDef __pyx_methods_7pyarrow_3lib_MemoryManager[] = {
        {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_13MemoryManager_5__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_13MemoryManager_4__reduce_cython__},
        {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_13MemoryManager_7__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_13MemoryManager_6__setstate_cython__},
        {0, 0, 0, 0}
      };

      static struct PyGetSetDef __pyx_getsets_7pyarrow_3lib_MemoryManager[] = {
        {"device", __pyx_getprop_7pyarrow_3lib_13MemoryManager_device, 0, PyDoc_STR("\n        The device this MemoryManager is tied to.\n        "), 0},
        {"is_cpu", __pyx_getprop_7pyarrow_3lib_13MemoryManager_is_cpu, 0, PyDoc_STR("\n        Whether this MemoryManager is tied to the main CPU device.\n\n        This shorthand method is very useful when deciding whether a memory\n        address is CPU-accessible.\n        "), 0},
        {0, 0, 0, 0, 0}
      };
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib_MemoryManager_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_MemoryManager},
        {Py_tp_repr, (void *)__pyx_pw_7pyarrow_3lib_13MemoryManager_3__repr__},
        {Py_tp_doc, (void *)PyDoc_STR("MemoryManager()\n\nAn object that provides memory management primitives.\n\nA MemoryManager is always tied to a particular Device instance.\nIt can also have additional parameters (such as a MemoryPool to\nallocate CPU memory).")},
        {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_MemoryManager},
        {Py_tp_getset, (void *)__pyx_getsets_7pyarrow_3lib_MemoryManager},
        {Py_tp_init, (void *)__pyx_pw_7pyarrow_3lib_13MemoryManager_1__init__},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_MemoryManager},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib_MemoryManager_spec = {
        "pyarrow.lib.MemoryManager",
        sizeof(struct __pyx_obj_7pyarrow_3lib_MemoryManager),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
        __pyx_type_7pyarrow_3lib_MemoryManager_slots,
      };
      #else

      static PyTypeObject __pyx_type_7pyarrow_3lib_MemoryManager = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""MemoryManager", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib_MemoryManager), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib_MemoryManager, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        __pyx_pw_7pyarrow_3lib_13MemoryManager_3__repr__, /*tp_repr*/
        0, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        0, /*tp_str*/
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
        PyDoc_STR("MemoryManager()\n\nAn object that provides memory management primitives.\n\nA MemoryManager is always tied to a particular Device instance.\nIt can also have additional parameters (such as a MemoryPool to\nallocate CPU memory)."), /*tp_doc*/
        0, /*tp_traverse*/
        0, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        0, /*tp_iter*/
        0, /*tp_iternext*/
        __pyx_methods_7pyarrow_3lib_MemoryManager, /*tp_methods*/
        0, /*tp_members*/
        __pyx_getsets_7pyarrow_3lib_MemoryManager, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        __pyx_pw_7pyarrow_3lib_13MemoryManager_1__init__, /*tp_init*/
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib_MemoryManager, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif
      static struct __pyx_vtabstruct_7pyarrow_3lib_Buffer __pyx_vtable_7pyarrow_3lib_Buffer;

      static PyObject *__pyx_tp_new_7pyarrow_3lib_Buffer(PyTypeObject *t, PyObject *a, PyObject *k) {
        struct __pyx_obj_7pyarrow_3lib_Buffer *p;
        PyObject *o = __pyx_tp_new_7pyarrow_3lib__Weakrefable(t, a, k);
        if (unlikely(!o)) return 0;
        p = ((struct __pyx_obj_7pyarrow_3lib_Buffer *)o);
        p->__pyx_vtab = __pyx_vtabptr_7pyarrow_3lib_Buffer;
        __Pyx_default_placement_construct(&(p->buffer));
        if (unlikely(__pyx_pw_7pyarrow_3lib_6Buffer_1__cinit__(o, __pyx_mstate_global->__pyx_empty_tuple, NULL) < 0)) goto bad;
        return o;
        bad:
        Py_DECREF(o); o = 0;
        return NULL;
      }

      static void __pyx_tp_dealloc_7pyarrow_3lib_Buffer(PyObject *o) {
        struct __pyx_obj_7pyarrow_3lib_Buffer *p = (struct __pyx_obj_7pyarrow_3lib_Buffer *)o;
        #if CYTHON_USE_TP_FINALIZE
        if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) {
          if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_7pyarrow_3lib_Buffer) {
            if (PyObject_CallFinalizerFromDealloc(o)) return;
          }
        }
        #endif
        __Pyx_call_destructor(p->buffer);
        __pyx_tp_dealloc_7pyarrow_3lib__Weakrefable(o);
      }

      static PyObject *__pyx_sq_item_7pyarrow_3lib_Buffer(PyObject *o, Py_ssize_t i) {
        PyObject *r;
        PyObject *x = PyLong_FromSsize_t(i); if(!x) return 0;
        #if CYTHON_USE_TYPE_SLOTS || (!CYTHON_USE_TYPE_SPECS && __PYX_LIMITED_VERSION_HEX < 0x030A0000)
        r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
        #else
        r = ((binaryfunc)PyType_GetSlot(Py_TYPE(o), Py_mp_subscript))(o, x);
        #endif
        Py_DECREF(x);
        return r;
      }

      static PyObject *__pyx_tp_richcompare_7pyarrow_3lib_Buffer(PyObject *o1, PyObject *o2, int op) {
        switch (op) {
          case Py_EQ: {
            return __pyx_pw_7pyarrow_3lib_6Buffer_19__eq__(o1, o2);
          }
          case Py_NE: {
            PyObject *ret;
            ret = __pyx_pw_7pyarrow_3lib_6Buffer_19__eq__(o1, o2);
            if (likely(ret && ret != Py_NotImplemented)) {
              int b = __Pyx_PyObject_IsTrue(ret);
              Py_DECREF(ret);
              if (unlikely(b < 0)) return NULL;
              ret = (b) ? Py_False : Py_True;
              Py_INCREF(ret);
            }
            return ret;
          }
          default: {
            return __Pyx_NewRef(Py_NotImplemented);
          }
        }
      }

      static PyObject *__pyx_getprop_7pyarrow_3lib_6Buffer_size(PyObject *o, CYTHON_UNUSED void *x) {
        return __pyx_pw_7pyarrow_3lib_6Buffer_4size_1__get__(o);
      }

      static PyObject *__pyx_getprop_7pyarrow_3lib_6Buffer_address(PyObject *o, CYTHON_UNUSED void *x) {
        return __pyx_pw_7pyarrow_3lib_6Buffer_7address_1__get__(o);
      }

      static PyObject *__pyx_getprop_7pyarrow_3lib_6Buffer_is_mutable(PyObject *o, CYTHON_UNUSED void *x) {
        return __pyx_pw_7pyarrow_3lib_6Buffer_10is_mutable_1__get__(o);
      }

      static PyObject *__pyx_getprop_7pyarrow_3lib_6Buffer_is_cpu(PyObject *o, CYTHON_UNUSED void *x) {
        return __pyx_pw_7pyarrow_3lib_6Buffer_6is_cpu_1__get__(o);
      }

      static PyObject *__pyx_getprop_7pyarrow_3lib_6Buffer_device(PyObject *o, CYTHON_UNUSED void *x) {
        return __pyx_pw_7pyarrow_3lib_6Buffer_6device_1__get__(o);
      }

      static PyObject *__pyx_getprop_7pyarrow_3lib_6Buffer_memory_manager(PyObject *o, CYTHON_UNUSED void *x) {
        return __pyx_pw_7pyarrow_3lib_6Buffer_14memory_manager_1__get__(o);
      }

      static PyObject *__pyx_getprop_7pyarrow_3lib_6Buffer_device_type(PyObject *o, CYTHON_UNUSED void *x) {
        return __pyx_pw_7pyarrow_3lib_6Buffer_11device_type_1__get__(o);
      }

      static PyObject *__pyx_getprop_7pyarrow_3lib_6Buffer_parent(PyObject *o, CYTHON_UNUSED void *x) {
        return __pyx_pw_7pyarrow_3lib_6Buffer_6parent_1__get__(o);
      }

      static PyMethodDef __pyx_methods_7pyarrow_3lib_Buffer[] = {
        {"_assert_cpu", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_6Buffer_9_assert_cpu, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_6Buffer_8_assert_cpu},
        {"hex", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_6Buffer_11hex, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_6Buffer_10hex},
        {"slice", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_6Buffer_15slice, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_6Buffer_14slice},
        {"equals", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_6Buffer_17equals, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_6Buffer_16equals},
        {"__reduce_ex__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_6Buffer_21__reduce_ex__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_6Buffer_20__reduce_ex__},
        {"to_pybytes", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_6Buffer_23to_pybytes, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_6Buffer_22to_pybytes},
        {0, 0, 0, 0}
      };

      static struct PyGetSetDef __pyx_getsets_7pyarrow_3lib_Buffer[] = {
        {"size", __pyx_getprop_7pyarrow_3lib_6Buffer_size, 0, PyDoc_STR("\n        The buffer size in bytes.\n        "), 0},
        {"address", __pyx_getprop_7pyarrow_3lib_6Buffer_address, 0, PyDoc_STR("\n        The buffer's address, as an integer.\n\n        The returned address may point to CPU or device memory.\n        Use `is_cpu()` to disambiguate.\n        "), 0},
        {"is_mutable", __pyx_getprop_7pyarrow_3lib_6Buffer_is_mutable, 0, PyDoc_STR("\n        Whether the buffer is mutable.\n        "), 0},
        {"is_cpu", __pyx_getprop_7pyarrow_3lib_6Buffer_is_cpu, 0, PyDoc_STR("\n        Whether the buffer is CPU-accessible.\n        "), 0},
        {"device", __pyx_getprop_7pyarrow_3lib_6Buffer_device, 0, PyDoc_STR("\n        The device where the buffer resides.\n\n        Returns\n        -------\n        Device\n        "), 0},
        {"memory_manager", __pyx_getprop_7pyarrow_3lib_6Buffer_memory_manager, 0, PyDoc_STR("\n        The memory manager associated with the buffer.\n\n        Returns\n        -------\n        MemoryManager\n        "), 0},
        {"device_type", __pyx_getprop_7pyarrow_3lib_6Buffer_device_type, 0, PyDoc_STR("\n        The device type where the buffer resides.\n\n        Returns\n        -------\n        DeviceAllocationType\n        "), 0},
        {"parent", __pyx_getprop_7pyarrow_3lib_6Buffer_parent, 0, 0, 0},
        {0, 0, 0, 0, 0}
      };
      #if CYTHON_USE_TYPE_SPECS
      #if !CYTHON_COMPILING_IN_LIMITED_API

      static PyBufferProcs __pyx_tp_as_buffer_Buffer = {
        __pyx_pw_7pyarrow_3lib_6Buffer_25__getbuffer__, /*bf_getbuffer*/
        0, /*bf_releasebuffer*/
      };
      #endif
      static PyType_Slot __pyx_type_7pyarrow_3lib_Buffer_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_Buffer},
        {Py_tp_repr, (void *)__pyx_pw_7pyarrow_3lib_6Buffer_7__repr__},
        {Py_sq_length, (void *)__pyx_pw_7pyarrow_3lib_6Buffer_5__len__},
        {Py_sq_item, (void *)__pyx_sq_item_7pyarrow_3lib_Buffer},
        {Py_mp_length, (void *)__pyx_pw_7pyarrow_3lib_6Buffer_5__len__},
        {Py_mp_subscript, (void *)__pyx_pw_7pyarrow_3lib_6Buffer_13__getitem__},
        #if defined(Py_bf_getbuffer)
        {Py_bf_getbuffer, (void *)__pyx_pw_7pyarrow_3lib_6Buffer_25__getbuffer__},
        #endif
        {Py_tp_doc, (void *)PyDoc_STR("Buffer()\n\nThe base class for all Arrow buffers.\n\nA buffer represents a contiguous memory area.  Many buffers will own\ntheir memory, though not all of them do.")},
        {Py_tp_richcompare, (void *)__pyx_tp_richcompare_7pyarrow_3lib_Buffer},
        {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_Buffer},
        {Py_tp_getset, (void *)__pyx_getsets_7pyarrow_3lib_Buffer},
        {Py_tp_init, (void *)__pyx_pw_7pyarrow_3lib_6Buffer_3__init__},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_Buffer},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib_Buffer_spec = {
        "pyarrow.lib.Buffer",
        sizeof(struct __pyx_obj_7pyarrow_3lib_Buffer),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
        __pyx_type_7pyarrow_3lib_Buffer_slots,
      };
      #else

      static PySequenceMethods __pyx_tp_as_sequence_Buffer = {
        __pyx_pw_7pyarrow_3lib_6Buffer_5__len__, /*sq_length*/
        0, /*sq_concat*/
        0, /*sq_repeat*/
        __pyx_sq_item_7pyarrow_3lib_Buffer, /*sq_item*/
        0, /*sq_slice*/
        0, /*sq_ass_item*/
        0, /*sq_ass_slice*/
        0, /*sq_contains*/
        0, /*sq_inplace_concat*/
        0, /*sq_inplace_repeat*/
      };

      static PyMappingMethods __pyx_tp_as_mapping_Buffer = {
        __pyx_pw_7pyarrow_3lib_6Buffer_5__len__, /*mp_length*/
        __pyx_pw_7pyarrow_3lib_6Buffer_13__getitem__, /*mp_subscript*/
        0, /*mp_ass_subscript*/
      };

      static PyBufferProcs __pyx_tp_as_buffer_Buffer = {
        __pyx_pw_7pyarrow_3lib_6Buffer_25__getbuffer__, /*bf_getbuffer*/
        0, /*bf_releasebuffer*/
      };

      static PyTypeObject __pyx_type_7pyarrow_3lib_Buffer = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""Buffer", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib_Buffer), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib_Buffer, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        __pyx_pw_7pyarrow_3lib_6Buffer_7__repr__, /*tp_repr*/
        0, /*tp_as_number*/
        &__pyx_tp_as_sequence_Buffer, /*tp_as_sequence*/
        &__pyx_tp_as_mapping_Buffer, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        0, /*tp_str*/
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        &__pyx_tp_as_buffer_Buffer, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
        PyDoc_STR("Buffer()\n\nThe base class for all Arrow buffers.\n\nA buffer represents a contiguous memory area.  Many buffers will own\ntheir memory, though not all of them do."), /*tp_doc*/
        0, /*tp_traverse*/
        0, /*tp_clear*/
        __pyx_tp_richcompare_7pyarrow_3lib_Buffer, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        0, /*tp_iter*/
        0, /*tp_iternext*/
        __pyx_methods_7pyarrow_3lib_Buffer, /*tp_methods*/
        0, /*tp_members*/
        __pyx_getsets_7pyarrow_3lib_Buffer, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        __pyx_pw_7pyarrow_3lib_6Buffer_3__init__, /*tp_init*/
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib_Buffer, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif
      static struct __pyx_vtabstruct_7pyarrow_3lib_ResizableBuffer __pyx_vtable_7pyarrow_3lib_ResizableBuffer;

      static PyObject *__pyx_tp_new_7pyarrow_3lib_ResizableBuffer(PyTypeObject *t, PyObject *a, PyObject *k) {
        struct __pyx_obj_7pyarrow_3lib_ResizableBuffer *p;
        PyObject *o = __pyx_tp_new_7pyarrow_3lib_Buffer(t, a, k);
        if (unlikely(!o)) return 0;
        p = ((struct __pyx_obj_7pyarrow_3lib_ResizableBuffer *)o);
        p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_Buffer*)__pyx_vtabptr_7pyarrow_3lib_ResizableBuffer;
        return o;
      }

      static PyMethodDef __pyx_methods_7pyarrow_3lib_ResizableBuffer[] = {
        {"resize", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15ResizableBuffer_1resize, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15ResizableBuffer_resize},
        {0, 0, 0, 0}
      };
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib_ResizableBuffer_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_Buffer},
        {Py_tp_doc, (void *)PyDoc_STR("\n    A base class for buffers that can be resized.\n    ")},
        {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_ResizableBuffer},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_ResizableBuffer},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib_ResizableBuffer_spec = {
        "pyarrow.lib.ResizableBuffer",
        sizeof(struct __pyx_obj_7pyarrow_3lib_ResizableBuffer),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
        __pyx_type_7pyarrow_3lib_ResizableBuffer_slots,
      };
      #else

      static PyTypeObject __pyx_type_7pyarrow_3lib_ResizableBuffer = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""ResizableBuffer", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib_ResizableBuffer), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib_Buffer, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Buffer_7__repr__, /*tp_repr*/
        #else
        0, /*tp_repr*/
        #endif
        0, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        0, /*tp_str*/
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
        PyDoc_STR("\n    A base class for buffers that can be resized.\n    "), /*tp_doc*/
        0, /*tp_traverse*/
        0, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        0, /*tp_iter*/
        0, /*tp_iternext*/
        __pyx_methods_7pyarrow_3lib_ResizableBuffer, /*tp_methods*/
        0, /*tp_members*/
        0, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Buffer_3__init__, /*tp_init*/
        #else
        0, /*tp_init*/
        #endif
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib_ResizableBuffer, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif
      static struct __pyx_vtabstruct_7pyarrow_3lib_NativeFile __pyx_vtable_7pyarrow_3lib_NativeFile;

      static PyObject *__pyx_tp_new_7pyarrow_3lib_NativeFile(PyTypeObject *t, PyObject *a, PyObject *k) {
        struct __pyx_obj_7pyarrow_3lib_NativeFile *p;
        PyObject *o = __pyx_tp_new_7pyarrow_3lib__Weakrefable(t, a, k);
        if (unlikely(!o)) return 0;
        p = ((struct __pyx_obj_7pyarrow_3lib_NativeFile *)o);
        p->__pyx_vtab = __pyx_vtabptr_7pyarrow_3lib_NativeFile;
        __Pyx_default_placement_construct(&(p->input_stream));
        __Pyx_default_placement_construct(&(p->random_access));
        __Pyx_default_placement_construct(&(p->output_stream));
        if (unlikely(__pyx_pw_7pyarrow_3lib_10NativeFile_1__cinit__(o, __pyx_mstate_global->__pyx_empty_tuple, NULL) < 0)) goto bad;
        return o;
        bad:
        Py_DECREF(o); o = 0;
        return NULL;
      }

      static void __pyx_tp_dealloc_7pyarrow_3lib_NativeFile(PyObject *o) {
        struct __pyx_obj_7pyarrow_3lib_NativeFile *p = (struct __pyx_obj_7pyarrow_3lib_NativeFile *)o;
        #if CYTHON_USE_TP_FINALIZE
        if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) {
          if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_7pyarrow_3lib_NativeFile) {
            if (PyObject_CallFinalizerFromDealloc(o)) return;
          }
        }
        #endif
        {
          PyObject *etype, *eval, *etb;
          PyErr_Fetch(&etype, &eval, &etb);
          __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
          __pyx_pw_7pyarrow_3lib_10NativeFile_3__dealloc__(o);
          __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
          PyErr_Restore(etype, eval, etb);
        }
        __Pyx_call_destructor(p->input_stream);
        __Pyx_call_destructor(p->random_access);
        __Pyx_call_destructor(p->output_stream);
        __pyx_tp_dealloc_7pyarrow_3lib__Weakrefable(o);
      }

      static PyObject *__pyx_getprop_7pyarrow_3lib_10NativeFile_mode(PyObject *o, CYTHON_UNUSED void *x) {
        return __pyx_pw_7pyarrow_3lib_10NativeFile_4mode_1__get__(o);
      }

      static PyObject *__pyx_getprop_7pyarrow_3lib_10NativeFile_closed(PyObject *o, CYTHON_UNUSED void *x) {
        return __pyx_pw_7pyarrow_3lib_10NativeFile_6closed_1__get__(o);
      }

      static PyObject *__pyx_specialmethod___pyx_pw_7pyarrow_3lib_10NativeFile_61__next__(PyObject *self, CYTHON_UNUSED PyObject *arg) {
        PyObject *res = __pyx_pw_7pyarrow_3lib_10NativeFile_61__next__(self);
        if (!res && !PyErr_Occurred()) { PyErr_SetNone(PyExc_StopIteration); }
        return res;
      }

      static PyMethodDef __pyx_methods_7pyarrow_3lib_NativeFile[] = {
        {"__enter__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10NativeFile_5__enter__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10NativeFile_4__enter__},
        {"__exit__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10NativeFile_7__exit__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10NativeFile_6__exit__},
        {"readable", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10NativeFile_11readable, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10NativeFile_10readable},
        {"writable", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10NativeFile_13writable, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10NativeFile_12writable},
        {"seekable", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10NativeFile_15seekable, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10NativeFile_14seekable},
        {"isatty", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10NativeFile_17isatty, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10NativeFile_16isatty},
        {"fileno", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10NativeFile_19fileno, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10NativeFile_18fileno},
        {"close", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10NativeFile_21close, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10NativeFile_20close},
        {"_assert_open", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10NativeFile_23_assert_open, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10NativeFile_22_assert_open},
        {"_assert_readable", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10NativeFile_25_assert_readable, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10NativeFile_24_assert_readable},
        {"_assert_writable", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10NativeFile_27_assert_writable, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10NativeFile_26_assert_writable},
        {"_assert_seekable", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10NativeFile_29_assert_seekable, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10NativeFile_28_assert_seekable},
        {"size", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10NativeFile_31size, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10NativeFile_30size},
        {"metadata", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10NativeFile_33metadata, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10NativeFile_32metadata},
        {"tell", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10NativeFile_35tell, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10NativeFile_34tell},
        {"seek", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10NativeFile_37seek, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10NativeFile_36seek},
        {"flush", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10NativeFile_39flush, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10NativeFile_38flush},
        {"write", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10NativeFile_41write, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10NativeFile_40write},
        {"read", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10NativeFile_43read, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10NativeFile_42read},
        {"get_stream", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10NativeFile_45get_stream, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10NativeFile_44get_stream},
        {"read_at", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10NativeFile_47read_at, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10NativeFile_46read_at},
        {"read1", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10NativeFile_49read1, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10NativeFile_48read1},
        {"readall", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10NativeFile_51readall, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10NativeFile_50readall},
        {"readinto", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10NativeFile_53readinto, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10NativeFile_52readinto},
        {"readline", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10NativeFile_55readline, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10NativeFile_54readline},
        {"readlines", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10NativeFile_57readlines, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10NativeFile_56readlines},
        {"__next__", (PyCFunction)__pyx_specialmethod___pyx_pw_7pyarrow_3lib_10NativeFile_61__next__, METH_NOARGS|METH_COEXIST, 0},
        {"read_buffer", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10NativeFile_63read_buffer, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10NativeFile_62read_buffer},
        {"truncate", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10NativeFile_65truncate, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10NativeFile_64truncate},
        {"writelines", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10NativeFile_67writelines, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10NativeFile_66writelines},
        {"download", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10NativeFile_69download, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10NativeFile_68download},
        {"_download_nothreads", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10NativeFile_71_download_nothreads, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10NativeFile_70_download_nothreads},
        {"upload", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10NativeFile_73upload, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10NativeFile_72upload},
        {"_upload_nothreads", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10NativeFile_75_upload_nothreads, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10NativeFile_74_upload_nothreads},
        {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10NativeFile_77__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10NativeFile_76__reduce_cython__},
        {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10NativeFile_79__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10NativeFile_78__setstate_cython__},
        {0, 0, 0, 0}
      };

      static struct PyGetSetDef __pyx_getsets_7pyarrow_3lib_NativeFile[] = {
        {"mode", __pyx_getprop_7pyarrow_3lib_10NativeFile_mode, 0, PyDoc_STR("\n        The file mode. Currently instances of NativeFile may support:\n\n        * rb: binary read\n        * wb: binary write\n        * rb+: binary read and write\n        * ab: binary append\n        "), 0},
        {"closed", __pyx_getprop_7pyarrow_3lib_10NativeFile_closed, 0, 0, 0},
        {0, 0, 0, 0, 0}
      };
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib_NativeFile_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_NativeFile},
        {Py_tp_repr, (void *)__pyx_pw_7pyarrow_3lib_10NativeFile_9__repr__},
        {Py_tp_doc, (void *)PyDoc_STR("\n    The base class for all Arrow streams.\n\n    Streams are either readable, writable, or both.\n    They optionally support seeking.\n\n    While this class exposes methods to read or write data from Python, the\n    primary intent of using a Arrow stream is to pass it to other Arrow\n    facilities that will make use of it, such as Arrow IPC routines.\n\n    Be aware that there are subtle differences with regular Python files,\n    e.g. destroying a writable Arrow stream without closing it explicitly\n    will not flush any pending data.\n    ")},
        {Py_tp_iter, (void *)__pyx_pw_7pyarrow_3lib_10NativeFile_59__iter__},
        {Py_tp_iternext, (void *)__pyx_pw_7pyarrow_3lib_10NativeFile_61__next__},
        {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_NativeFile},
        {Py_tp_getset, (void *)__pyx_getsets_7pyarrow_3lib_NativeFile},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_NativeFile},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib_NativeFile_spec = {
        "pyarrow.lib.NativeFile",
        sizeof(struct __pyx_obj_7pyarrow_3lib_NativeFile),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
        __pyx_type_7pyarrow_3lib_NativeFile_slots,
      };
      #else

      static PyTypeObject __pyx_type_7pyarrow_3lib_NativeFile = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""NativeFile", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib_NativeFile), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib_NativeFile, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        __pyx_pw_7pyarrow_3lib_10NativeFile_9__repr__, /*tp_repr*/
        0, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        0, /*tp_str*/
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
        PyDoc_STR("\n    The base class for all Arrow streams.\n\n    Streams are either readable, writable, or both.\n    They optionally support seeking.\n\n    While this class exposes methods to read or write data from Python, the\n    primary intent of using a Arrow stream is to pass it to other Arrow\n    facilities that will make use of it, such as Arrow IPC routines.\n\n    Be aware that there are subtle differences with regular Python files,\n    e.g. destroying a writable Arrow stream without closing it explicitly\n    will not flush any pending data.\n    "), /*tp_doc*/
        0, /*tp_traverse*/
        0, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        __pyx_pw_7pyarrow_3lib_10NativeFile_59__iter__, /*tp_iter*/
        __pyx_pw_7pyarrow_3lib_10NativeFile_61__next__, /*tp_iternext*/
        __pyx_methods_7pyarrow_3lib_NativeFile, /*tp_methods*/
        0, /*tp_members*/
        __pyx_getsets_7pyarrow_3lib_NativeFile, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        0, /*tp_init*/
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib_NativeFile, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif
      static struct __pyx_vtabstruct_7pyarrow_3lib_BufferedInputStream __pyx_vtable_7pyarrow_3lib_BufferedInputStream;

      static PyObject *__pyx_tp_new_7pyarrow_3lib_BufferedInputStream(PyTypeObject *t, PyObject *a, PyObject *k) {
        struct __pyx_obj_7pyarrow_3lib_BufferedInputStream *p;
        PyObject *o = __pyx_tp_new_7pyarrow_3lib_NativeFile(t, a, k);
        if (unlikely(!o)) return 0;
        p = ((struct __pyx_obj_7pyarrow_3lib_BufferedInputStream *)o);
        p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_NativeFile*)__pyx_vtabptr_7pyarrow_3lib_BufferedInputStream;
        return o;
      }

      static PyMethodDef __pyx_methods_7pyarrow_3lib_BufferedInputStream[] = {
        {"detach", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_19BufferedInputStream_3detach, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_19BufferedInputStream_2detach},
        {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_19BufferedInputStream_5__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_19BufferedInputStream_4__reduce_cython__},
        {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_19BufferedInputStream_7__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_19BufferedInputStream_6__setstate_cython__},
        {0, 0, 0, 0}
      };
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib_BufferedInputStream_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_NativeFile},
        {Py_tp_doc, (void *)PyDoc_STR("BufferedInputStream(NativeFile stream, int buffer_size, MemoryPool memory_pool=None)\n\nAn input stream that performs buffered reads from\nan unbuffered input stream, which can mitigate the overhead\nof many small reads in some cases.\n\nParameters\n----------\nstream : NativeFile\n    The input stream to wrap with the buffer\nbuffer_size : int\n    Size of the temporary read buffer.\nmemory_pool : MemoryPool\n    The memory pool used to allocate the buffer.")},
        {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_BufferedInputStream},
        {Py_tp_init, (void *)__pyx_pw_7pyarrow_3lib_19BufferedInputStream_1__init__},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_BufferedInputStream},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib_BufferedInputStream_spec = {
        "pyarrow.lib.BufferedInputStream",
        sizeof(struct __pyx_obj_7pyarrow_3lib_BufferedInputStream),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
        __pyx_type_7pyarrow_3lib_BufferedInputStream_slots,
      };
      #else

      static PyTypeObject __pyx_type_7pyarrow_3lib_BufferedInputStream = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""BufferedInputStream", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib_BufferedInputStream), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib_NativeFile, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_10NativeFile_9__repr__, /*tp_repr*/
        #else
        0, /*tp_repr*/
        #endif
        0, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        0, /*tp_str*/
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
        PyDoc_STR("BufferedInputStream(NativeFile stream, int buffer_size, MemoryPool memory_pool=None)\n\nAn input stream that performs buffered reads from\nan unbuffered input stream, which can mitigate the overhead\nof many small reads in some cases.\n\nParameters\n----------\nstream : NativeFile\n    The input stream to wrap with the buffer\nbuffer_size : int\n    Size of the temporary read buffer.\nmemory_pool : MemoryPool\n    The memory pool used to allocate the buffer."), /*tp_doc*/
        0, /*tp_traverse*/
        0, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_10NativeFile_59__iter__, /*tp_iter*/
        #else
        0, /*tp_iter*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_10NativeFile_61__next__, /*tp_iternext*/
        #else
        0, /*tp_iternext*/
        #endif
        __pyx_methods_7pyarrow_3lib_BufferedInputStream, /*tp_methods*/
        0, /*tp_members*/
        0, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        __pyx_pw_7pyarrow_3lib_19BufferedInputStream_1__init__, /*tp_init*/
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib_BufferedInputStream, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif
      static struct __pyx_vtabstruct_7pyarrow_3lib_BufferedOutputStream __pyx_vtable_7pyarrow_3lib_BufferedOutputStream;

      static PyObject *__pyx_tp_new_7pyarrow_3lib_BufferedOutputStream(PyTypeObject *t, PyObject *a, PyObject *k) {
        struct __pyx_obj_7pyarrow_3lib_BufferedOutputStream *p;
        PyObject *o = __pyx_tp_new_7pyarrow_3lib_NativeFile(t, a, k);
        if (unlikely(!o)) return 0;
        p = ((struct __pyx_obj_7pyarrow_3lib_BufferedOutputStream *)o);
        p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_NativeFile*)__pyx_vtabptr_7pyarrow_3lib_BufferedOutputStream;
        return o;
      }

      static PyMethodDef __pyx_methods_7pyarrow_3lib_BufferedOutputStream[] = {
        {"detach", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_20BufferedOutputStream_3detach, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_20BufferedOutputStream_2detach},
        {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_20BufferedOutputStream_5__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_20BufferedOutputStream_4__reduce_cython__},
        {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_20BufferedOutputStream_7__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_20BufferedOutputStream_6__setstate_cython__},
        {0, 0, 0, 0}
      };
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib_BufferedOutputStream_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_NativeFile},
        {Py_tp_doc, (void *)PyDoc_STR("BufferedOutputStream(NativeFile stream, int buffer_size, MemoryPool memory_pool=None)\n\nAn output stream that performs buffered reads from\nan unbuffered output stream, which can mitigate the overhead\nof many small writes in some cases.\n\nParameters\n----------\nstream : NativeFile\n    The writable output stream to wrap with the buffer\nbuffer_size : int\n    Size of the buffer that should be added.\nmemory_pool : MemoryPool\n    The memory pool used to allocate the buffer.")},
        {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_BufferedOutputStream},
        {Py_tp_init, (void *)__pyx_pw_7pyarrow_3lib_20BufferedOutputStream_1__init__},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_BufferedOutputStream},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib_BufferedOutputStream_spec = {
        "pyarrow.lib.BufferedOutputStream",
        sizeof(struct __pyx_obj_7pyarrow_3lib_BufferedOutputStream),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
        __pyx_type_7pyarrow_3lib_BufferedOutputStream_slots,
      };
      #else

      static PyTypeObject __pyx_type_7pyarrow_3lib_BufferedOutputStream = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""BufferedOutputStream", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib_BufferedOutputStream), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib_NativeFile, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_10NativeFile_9__repr__, /*tp_repr*/
        #else
        0, /*tp_repr*/
        #endif
        0, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        0, /*tp_str*/
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
        PyDoc_STR("BufferedOutputStream(NativeFile stream, int buffer_size, MemoryPool memory_pool=None)\n\nAn output stream that performs buffered reads from\nan unbuffered output stream, which can mitigate the overhead\nof many small writes in some cases.\n\nParameters\n----------\nstream : NativeFile\n    The writable output stream to wrap with the buffer\nbuffer_size : int\n    Size of the buffer that should be added.\nmemory_pool : MemoryPool\n    The memory pool used to allocate the buffer."), /*tp_doc*/
        0, /*tp_traverse*/
        0, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_10NativeFile_59__iter__, /*tp_iter*/
        #else
        0, /*tp_iter*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_10NativeFile_61__next__, /*tp_iternext*/
        #else
        0, /*tp_iternext*/
        #endif
        __pyx_methods_7pyarrow_3lib_BufferedOutputStream, /*tp_methods*/
        0, /*tp_members*/
        0, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        __pyx_pw_7pyarrow_3lib_20BufferedOutputStream_1__init__, /*tp_init*/
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib_BufferedOutputStream, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif
      static struct __pyx_vtabstruct_7pyarrow_3lib_CompressedInputStream __pyx_vtable_7pyarrow_3lib_CompressedInputStream;

      static PyObject *__pyx_tp_new_7pyarrow_3lib_CompressedInputStream(PyTypeObject *t, PyObject *a, PyObject *k) {
        struct __pyx_obj_7pyarrow_3lib_CompressedInputStream *p;
        PyObject *o = __pyx_tp_new_7pyarrow_3lib_NativeFile(t, a, k);
        if (unlikely(!o)) return 0;
        p = ((struct __pyx_obj_7pyarrow_3lib_CompressedInputStream *)o);
        p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_NativeFile*)__pyx_vtabptr_7pyarrow_3lib_CompressedInputStream;
        return o;
      }

      static PyMethodDef __pyx_methods_7pyarrow_3lib_CompressedInputStream[] = {
        {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_21CompressedInputStream_3__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_21CompressedInputStream_2__reduce_cython__},
        {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_21CompressedInputStream_5__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_21CompressedInputStream_4__setstate_cython__},
        {0, 0, 0, 0}
      };
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib_CompressedInputStream_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_NativeFile},
        {Py_tp_doc, (void *)PyDoc_STR("CompressedInputStream(stream, str compression)\n\nAn input stream wrapper which decompresses data on the fly.\n\nParameters\n----------\nstream : string, path, pyarrow.NativeFile, or file-like object\n    Input stream object to wrap with the compression.\ncompression : str\n    The compression type (\"bz2\", \"brotli\", \"gzip\", \"lz4\" or \"zstd\").\n\nExamples\n--------\nCreate an output stream which compresses the data:\n\n>>> import pyarrow as pa\n>>> data = b\"Compressed stream\"\n>>> raw = pa.BufferOutputStream()\n>>> with pa.CompressedOutputStream(raw, \"gzip\") as compressed:\n...     compressed.write(data)\n...\n17\n\nCreate an input stream with decompression referencing the\nbuffer with compressed data:\n\n>>> cdata = raw.getvalue()\n>>> with pa.input_stream(cdata, compression=\"gzip\") as compressed:\n...     compressed.read()\n...\nb'Compressed stream'\n\nwhich actually translates to the use of ``BufferReader``and\n``CompressedInputStream``:\n\n>>> raw = pa.BufferReader(cdata)\n>>> with pa.CompressedInputStream(raw, \"gzip\") as compressed:\n...     compressed.read()\n...\nb'Compressed stream'")},
        {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_CompressedInputStream},
        {Py_tp_init, (void *)__pyx_pw_7pyarrow_3lib_21CompressedInputStream_1__init__},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_CompressedInputStream},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib_CompressedInputStream_spec = {
        "pyarrow.lib.CompressedInputStream",
        sizeof(struct __pyx_obj_7pyarrow_3lib_CompressedInputStream),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
        __pyx_type_7pyarrow_3lib_CompressedInputStream_slots,
      };
      #else

      static PyTypeObject __pyx_type_7pyarrow_3lib_CompressedInputStream = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""CompressedInputStream", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib_CompressedInputStream), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib_NativeFile, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_10NativeFile_9__repr__, /*tp_repr*/
        #else
        0, /*tp_repr*/
        #endif
        0, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        0, /*tp_str*/
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
        PyDoc_STR("CompressedInputStream(stream, str compression)\n\nAn input stream wrapper which decompresses data on the fly.\n\nParameters\n----------\nstream : string, path, pyarrow.NativeFile, or file-like object\n    Input stream object to wrap with the compression.\ncompression : str\n    The compression type (\"bz2\", \"brotli\", \"gzip\", \"lz4\" or \"zstd\").\n\nExamples\n--------\nCreate an output stream which compresses the data:\n\n>>> import pyarrow as pa\n>>> data = b\"Compressed stream\"\n>>> raw = pa.BufferOutputStream()\n>>> with pa.CompressedOutputStream(raw, \"gzip\") as compressed:\n...     compressed.write(data)\n...\n17\n\nCreate an input stream with decompression referencing the\nbuffer with compressed data:\n\n>>> cdata = raw.getvalue()\n>>> with pa.input_stream(cdata, compression=\"gzip\") as compressed:\n...     compressed.read()\n...\nb'Compressed stream'\n\nwhich actually translates to the use of ``BufferReader``and\n``CompressedInputStream``:\n\n>>> raw = pa.BufferReader(cdata)\n>>> with pa.CompressedInputStream(raw, \"gzip\") as compressed:\n...     compressed.read()\n...\nb'Compressed stream'"), /*tp_doc*/
        0, /*tp_traverse*/
        0, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_10NativeFile_59__iter__, /*tp_iter*/
        #else
        0, /*tp_iter*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_10NativeFile_61__next__, /*tp_iternext*/
        #else
        0, /*tp_iternext*/
        #endif
        __pyx_methods_7pyarrow_3lib_CompressedInputStream, /*tp_methods*/
        0, /*tp_members*/
        0, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        __pyx_pw_7pyarrow_3lib_21CompressedInputStream_1__init__, /*tp_init*/
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib_CompressedInputStream, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif
      static struct __pyx_vtabstruct_7pyarrow_3lib_CompressedOutputStream __pyx_vtable_7pyarrow_3lib_CompressedOutputStream;

      static PyObject *__pyx_tp_new_7pyarrow_3lib_CompressedOutputStream(PyTypeObject *t, PyObject *a, PyObject *k) {
        struct __pyx_obj_7pyarrow_3lib_CompressedOutputStream *p;
        PyObject *o = __pyx_tp_new_7pyarrow_3lib_NativeFile(t, a, k);
        if (unlikely(!o)) return 0;
        p = ((struct __pyx_obj_7pyarrow_3lib_CompressedOutputStream *)o);
        p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_NativeFile*)__pyx_vtabptr_7pyarrow_3lib_CompressedOutputStream;
        return o;
      }

      static PyMethodDef __pyx_methods_7pyarrow_3lib_CompressedOutputStream[] = {
        {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_22CompressedOutputStream_3__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_22CompressedOutputStream_2__reduce_cython__},
        {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_22CompressedOutputStream_5__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_22CompressedOutputStream_4__setstate_cython__},
        {0, 0, 0, 0}
      };
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib_CompressedOutputStream_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_NativeFile},
        {Py_tp_doc, (void *)PyDoc_STR("CompressedOutputStream(stream, str compression)\n\nAn output stream wrapper which compresses data on the fly.\n\nParameters\n----------\nstream : string, path, pyarrow.NativeFile, or file-like object\n    Input stream object to wrap with the compression.\ncompression : str\n    The compression type (\"bz2\", \"brotli\", \"gzip\", \"lz4\" or \"zstd\").\n\nExamples\n--------\nCreate an output stream which compresses the data:\n\n>>> import pyarrow as pa\n>>> data = b\"Compressed stream\"\n>>> raw = pa.BufferOutputStream()\n>>> with pa.CompressedOutputStream(raw, \"gzip\") as compressed:\n...     compressed.write(data)\n...\n17")},
        {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_CompressedOutputStream},
        {Py_tp_init, (void *)__pyx_pw_7pyarrow_3lib_22CompressedOutputStream_1__init__},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_CompressedOutputStream},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib_CompressedOutputStream_spec = {
        "pyarrow.lib.CompressedOutputStream",
        sizeof(struct __pyx_obj_7pyarrow_3lib_CompressedOutputStream),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
        __pyx_type_7pyarrow_3lib_CompressedOutputStream_slots,
      };
      #else

      static PyTypeObject __pyx_type_7pyarrow_3lib_CompressedOutputStream = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""CompressedOutputStream", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib_CompressedOutputStream), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib_NativeFile, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_10NativeFile_9__repr__, /*tp_repr*/
        #else
        0, /*tp_repr*/
        #endif
        0, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        0, /*tp_str*/
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
        PyDoc_STR("CompressedOutputStream(stream, str compression)\n\nAn output stream wrapper which compresses data on the fly.\n\nParameters\n----------\nstream : string, path, pyarrow.NativeFile, or file-like object\n    Input stream object to wrap with the compression.\ncompression : str\n    The compression type (\"bz2\", \"brotli\", \"gzip\", \"lz4\" or \"zstd\").\n\nExamples\n--------\nCreate an output stream which compresses the data:\n\n>>> import pyarrow as pa\n>>> data = b\"Compressed stream\"\n>>> raw = pa.BufferOutputStream()\n>>> with pa.CompressedOutputStream(raw, \"gzip\") as compressed:\n...     compressed.write(data)\n...\n17"), /*tp_doc*/
        0, /*tp_traverse*/
        0, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_10NativeFile_59__iter__, /*tp_iter*/
        #else
        0, /*tp_iter*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_10NativeFile_61__next__, /*tp_iternext*/
        #else
        0, /*tp_iternext*/
        #endif
        __pyx_methods_7pyarrow_3lib_CompressedOutputStream, /*tp_methods*/
        0, /*tp_members*/
        0, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        __pyx_pw_7pyarrow_3lib_22CompressedOutputStream_1__init__, /*tp_init*/
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib_CompressedOutputStream, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif

      static PyObject *__pyx_tp_new_7pyarrow_3lib__CRecordBatchWriter(PyTypeObject *t, PyObject *a, PyObject *k) {
        struct __pyx_obj_7pyarrow_3lib__CRecordBatchWriter *p;
        PyObject *o = __pyx_tp_new_7pyarrow_3lib__Weakrefable(t, a, k);
        if (unlikely(!o)) return 0;
        p = ((struct __pyx_obj_7pyarrow_3lib__CRecordBatchWriter *)o);
        __Pyx_default_placement_construct(&(p->writer));
        return o;
      }

      static void __pyx_tp_dealloc_7pyarrow_3lib__CRecordBatchWriter(PyObject *o) {
        struct __pyx_obj_7pyarrow_3lib__CRecordBatchWriter *p = (struct __pyx_obj_7pyarrow_3lib__CRecordBatchWriter *)o;
        #if CYTHON_USE_TP_FINALIZE
        if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) {
          if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_7pyarrow_3lib__CRecordBatchWriter) {
            if (PyObject_CallFinalizerFromDealloc(o)) return;
          }
        }
        #endif
        __Pyx_call_destructor(p->writer);
        __pyx_tp_dealloc_7pyarrow_3lib__Weakrefable(o);
      }

      static PyObject *__pyx_getprop_7pyarrow_3lib_19_CRecordBatchWriter_stats(PyObject *o, CYTHON_UNUSED void *x) {
        return __pyx_pw_7pyarrow_3lib_19_CRecordBatchWriter_5stats_1__get__(o);
      }

      static PyMethodDef __pyx_methods_7pyarrow_3lib__CRecordBatchWriter[] = {
        {"write", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_19_CRecordBatchWriter_1write, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_19_CRecordBatchWriter_write},
        {"write_batch", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_19_CRecordBatchWriter_3write_batch, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_19_CRecordBatchWriter_2write_batch},
        {"write_table", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_19_CRecordBatchWriter_5write_table, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_19_CRecordBatchWriter_4write_table},
        {"close", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_19_CRecordBatchWriter_7close, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_19_CRecordBatchWriter_6close},
        {"__enter__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_19_CRecordBatchWriter_9__enter__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_19_CRecordBatchWriter_8__enter__},
        {"__exit__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_19_CRecordBatchWriter_11__exit__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_19_CRecordBatchWriter_10__exit__},
        {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_19_CRecordBatchWriter_13__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_19_CRecordBatchWriter_12__reduce_cython__},
        {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_19_CRecordBatchWriter_15__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_19_CRecordBatchWriter_14__setstate_cython__},
        {0, 0, 0, 0}
      };

      static struct PyGetSetDef __pyx_getsets_7pyarrow_3lib__CRecordBatchWriter[] = {
        {"stats", __pyx_getprop_7pyarrow_3lib_19_CRecordBatchWriter_stats, 0, PyDoc_STR("\n        Current IPC write statistics.\n        "), 0},
        {0, 0, 0, 0, 0}
      };
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib__CRecordBatchWriter_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib__CRecordBatchWriter},
        {Py_tp_doc, (void *)PyDoc_STR("The base RecordBatchWriter wrapper.\n\n    Provides common implementations of convenience methods. Should not\n    be instantiated directly by user code.\n    ")},
        {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib__CRecordBatchWriter},
        {Py_tp_getset, (void *)__pyx_getsets_7pyarrow_3lib__CRecordBatchWriter},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib__CRecordBatchWriter},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib__CRecordBatchWriter_spec = {
        "pyarrow.lib._CRecordBatchWriter",
        sizeof(struct __pyx_obj_7pyarrow_3lib__CRecordBatchWriter),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
        __pyx_type_7pyarrow_3lib__CRecordBatchWriter_slots,
      };
      #else

      static PyTypeObject __pyx_type_7pyarrow_3lib__CRecordBatchWriter = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""_CRecordBatchWriter", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib__CRecordBatchWriter), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib__CRecordBatchWriter, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        0, /*tp_repr*/
        0, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        0, /*tp_str*/
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
        PyDoc_STR("The base RecordBatchWriter wrapper.\n\n    Provides common implementations of convenience methods. Should not\n    be instantiated directly by user code.\n    "), /*tp_doc*/
        0, /*tp_traverse*/
        0, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        0, /*tp_iter*/
        0, /*tp_iternext*/
        __pyx_methods_7pyarrow_3lib__CRecordBatchWriter, /*tp_methods*/
        0, /*tp_members*/
        __pyx_getsets_7pyarrow_3lib__CRecordBatchWriter, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        0, /*tp_init*/
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib__CRecordBatchWriter, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif

      static PyObject *__pyx_tp_new_7pyarrow_3lib_RecordBatchReader(PyTypeObject *t, PyObject *a, PyObject *k) {
        struct __pyx_obj_7pyarrow_3lib_RecordBatchReader *p;
        PyObject *o = __pyx_tp_new_7pyarrow_3lib__Weakrefable(t, a, k);
        if (unlikely(!o)) return 0;
        p = ((struct __pyx_obj_7pyarrow_3lib_RecordBatchReader *)o);
        __Pyx_default_placement_construct(&(p->reader));
        return o;
      }

      static void __pyx_tp_dealloc_7pyarrow_3lib_RecordBatchReader(PyObject *o) {
        struct __pyx_obj_7pyarrow_3lib_RecordBatchReader *p = (struct __pyx_obj_7pyarrow_3lib_RecordBatchReader *)o;
        #if CYTHON_USE_TP_FINALIZE
        if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) {
          if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_7pyarrow_3lib_RecordBatchReader) {
            if (PyObject_CallFinalizerFromDealloc(o)) return;
          }
        }
        #endif
        __Pyx_call_destructor(p->reader);
        __pyx_tp_dealloc_7pyarrow_3lib__Weakrefable(o);
      }

      static PyObject *__pyx_getprop_7pyarrow_3lib_17RecordBatchReader_schema(PyObject *o, CYTHON_UNUSED void *x) {
        return __pyx_pw_7pyarrow_3lib_17RecordBatchReader_6schema_1__get__(o);
      }

      static PyObject *__pyx_specialmethod___pyx_pw_7pyarrow_3lib_17RecordBatchReader_5__next__(PyObject *self, CYTHON_UNUSED PyObject *arg) {
        PyObject *res = __pyx_pw_7pyarrow_3lib_17RecordBatchReader_5__next__(self);
        if (!res && !PyErr_Occurred()) { PyErr_SetNone(PyExc_StopIteration); }
        return res;
      }

      static PyMethodDef __pyx_methods_7pyarrow_3lib_RecordBatchReader[] = {
        {"__next__", (PyCFunction)__pyx_specialmethod___pyx_pw_7pyarrow_3lib_17RecordBatchReader_5__next__, METH_NOARGS|METH_COEXIST, 0},
        {"read_next_batch", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_17RecordBatchReader_7read_next_batch, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_17RecordBatchReader_6read_next_batch},
        {"read_next_batch_with_custom_metadata", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_17RecordBatchReader_9read_next_batch_with_custom_metadata, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_17RecordBatchReader_8read_next_batch_with_custom_metadata},
        {"iter_batches_with_custom_metadata", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_17RecordBatchReader_11iter_batches_with_custom_metadata, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_17RecordBatchReader_10iter_batches_with_custom_metadata},
        {"read_all", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_17RecordBatchReader_14read_all, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_17RecordBatchReader_13read_all},
        {"close", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_17RecordBatchReader_16close, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_17RecordBatchReader_15close},
        {"__enter__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_17RecordBatchReader_18__enter__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_17RecordBatchReader_17__enter__},
        {"__exit__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_17RecordBatchReader_20__exit__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_17RecordBatchReader_19__exit__},
        {"cast", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_17RecordBatchReader_22cast, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_17RecordBatchReader_21cast},
        {"_export_to_c", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_17RecordBatchReader_24_export_to_c, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_17RecordBatchReader_23_export_to_c},
        {"_import_from_c", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_17RecordBatchReader_26_import_from_c, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_17RecordBatchReader_25_import_from_c},
        {"__arrow_c_stream__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_17RecordBatchReader_28__arrow_c_stream__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_17RecordBatchReader_27__arrow_c_stream__},
        {"_import_from_c_capsule", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_17RecordBatchReader_30_import_from_c_capsule, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_17RecordBatchReader_29_import_from_c_capsule},
        {"from_stream", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_17RecordBatchReader_32from_stream, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_17RecordBatchReader_31from_stream},
        {"from_batches", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_17RecordBatchReader_34from_batches, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_17RecordBatchReader_33from_batches},
        {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_17RecordBatchReader_36__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_17RecordBatchReader_35__reduce_cython__},
        {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_17RecordBatchReader_38__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_17RecordBatchReader_37__setstate_cython__},
        {0, 0, 0, 0}
      };

      static struct PyGetSetDef __pyx_getsets_7pyarrow_3lib_RecordBatchReader[] = {
        {"schema", __pyx_getprop_7pyarrow_3lib_17RecordBatchReader_schema, 0, PyDoc_STR("\n        Shared schema of the record batches in the stream.\n\n        Returns\n        -------\n        Schema\n        "), 0},
        {0, 0, 0, 0, 0}
      };
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib_RecordBatchReader_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_RecordBatchReader},
        {Py_tp_doc, (void *)PyDoc_STR("RecordBatchReader()\n\nBase class for reading stream of record batches.\n\nRecord batch readers function as iterators of record batches that also\nprovide the schema (without the need to get any batches).\n\nWarnings\n--------\nDo not call this class's constructor directly, use one of the\n``RecordBatchReader.from_*`` functions instead.\n\nNotes\n-----\nTo import and export using the Arrow C stream interface, use the\n``_import_from_c`` and ``_export_to_c`` methods. However, keep in mind this\ninterface is intended for expert users.\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> schema = pa.schema([('x', pa.int64())])\n>>> def iter_record_batches():\n...     for i in range(2):\n...         yield pa.RecordBatch.from_arrays([pa.array([1, 2, 3])], schema=schema)\n>>> reader = pa.RecordBatchReader.from_batches(schema, iter_record_batches())\n>>> print(reader.schema)\nx: int64\n>>> for batch in reader:\n...     print(batch)\npyarrow.RecordBatch\nx: int64\n----\nx: [1,2,3]\npyarrow.RecordBatch\nx: int64\n----\nx: [1,2,3]")},
        {Py_tp_iter, (void *)__pyx_pw_7pyarrow_3lib_17RecordBatchReader_3__iter__},
        {Py_tp_iternext, (void *)__pyx_pw_7pyarrow_3lib_17RecordBatchReader_5__next__},
        {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_RecordBatchReader},
        {Py_tp_getset, (void *)__pyx_getsets_7pyarrow_3lib_RecordBatchReader},
        {Py_tp_init, (void *)__pyx_pw_7pyarrow_3lib_17RecordBatchReader_1__init__},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_RecordBatchReader},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib_RecordBatchReader_spec = {
        "pyarrow.lib.RecordBatchReader",
        sizeof(struct __pyx_obj_7pyarrow_3lib_RecordBatchReader),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
        __pyx_type_7pyarrow_3lib_RecordBatchReader_slots,
      };
      #else

      static PyTypeObject __pyx_type_7pyarrow_3lib_RecordBatchReader = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""RecordBatchReader", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib_RecordBatchReader), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib_RecordBatchReader, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        0, /*tp_repr*/
        0, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        0, /*tp_str*/
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
        PyDoc_STR("RecordBatchReader()\n\nBase class for reading stream of record batches.\n\nRecord batch readers function as iterators of record batches that also\nprovide the schema (without the need to get any batches).\n\nWarnings\n--------\nDo not call this class's constructor directly, use one of the\n``RecordBatchReader.from_*`` functions instead.\n\nNotes\n-----\nTo import and export using the Arrow C stream interface, use the\n``_import_from_c`` and ``_export_to_c`` methods. However, keep in mind this\ninterface is intended for expert users.\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> schema = pa.schema([('x', pa.int64())])\n>>> def iter_record_batches():\n...     for i in range(2):\n...         yield pa.RecordBatch.from_arrays([pa.array([1, 2, 3])], schema=schema)\n>>> reader = pa.RecordBatchReader.from_batches(schema, iter_record_batches())\n>>> print(reader.schema)\nx: int64\n>>> for batch in reader:\n...     print(batch)\npyarrow.RecordBatch\nx: int64\n----\nx: [1,2,3]\npyarrow.RecordBatch\nx: int64\n----\nx: [1,2,3]"), /*tp_doc*/
        0, /*tp_traverse*/
        0, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        __pyx_pw_7pyarrow_3lib_17RecordBatchReader_3__iter__, /*tp_iter*/
        __pyx_pw_7pyarrow_3lib_17RecordBatchReader_5__next__, /*tp_iternext*/
        __pyx_methods_7pyarrow_3lib_RecordBatchReader, /*tp_methods*/
        0, /*tp_members*/
        __pyx_getsets_7pyarrow_3lib_RecordBatchReader, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        __pyx_pw_7pyarrow_3lib_17RecordBatchReader_1__init__, /*tp_init*/
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib_RecordBatchReader, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif
      static struct __pyx_vtabstruct_7pyarrow_3lib_CacheOptions __pyx_vtable_7pyarrow_3lib_CacheOptions;

      static PyObject *__pyx_tp_new_7pyarrow_3lib_CacheOptions(PyTypeObject *t, PyObject *a, PyObject *k) {
        struct __pyx_obj_7pyarrow_3lib_CacheOptions *p;
        PyObject *o = __pyx_tp_new_7pyarrow_3lib__Weakrefable(t, a, k);
        if (unlikely(!o)) return 0;
        p = ((struct __pyx_obj_7pyarrow_3lib_CacheOptions *)o);
        p->__pyx_vtab = __pyx_vtabptr_7pyarrow_3lib_CacheOptions;
        __Pyx_default_placement_construct(&(p->wrapped));
        return o;
      }

      static void __pyx_tp_dealloc_7pyarrow_3lib_CacheOptions(PyObject *o) {
        struct __pyx_obj_7pyarrow_3lib_CacheOptions *p = (struct __pyx_obj_7pyarrow_3lib_CacheOptions *)o;
        #if CYTHON_USE_TP_FINALIZE
        if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) {
          if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_7pyarrow_3lib_CacheOptions) {
            if (PyObject_CallFinalizerFromDealloc(o)) return;
          }
        }
        #endif
        __Pyx_call_destructor(p->wrapped);
        __pyx_tp_dealloc_7pyarrow_3lib__Weakrefable(o);
      }

      static PyObject *__pyx_tp_richcompare_7pyarrow_3lib_CacheOptions(PyObject *o1, PyObject *o2, int op) {
        switch (op) {
          case Py_EQ: {
            return __pyx_pw_7pyarrow_3lib_12CacheOptions_3__eq__(o1, o2);
          }
          case Py_NE: {
            PyObject *ret;
            ret = __pyx_pw_7pyarrow_3lib_12CacheOptions_3__eq__(o1, o2);
            if (likely(ret && ret != Py_NotImplemented)) {
              int b = __Pyx_PyObject_IsTrue(ret);
              Py_DECREF(ret);
              if (unlikely(b < 0)) return NULL;
              ret = (b) ? Py_False : Py_True;
              Py_INCREF(ret);
            }
            return ret;
          }
          default: {
            return __Pyx_NewRef(Py_NotImplemented);
          }
        }
      }

      static PyObject *__pyx_getprop_7pyarrow_3lib_12CacheOptions_hole_size_limit(PyObject *o, CYTHON_UNUSED void *x) {
        return __pyx_pw_7pyarrow_3lib_12CacheOptions_15hole_size_limit_1__get__(o);
      }

      static int __pyx_setprop_7pyarrow_3lib_12CacheOptions_hole_size_limit(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
        if (v) {
          return __pyx_pw_7pyarrow_3lib_12CacheOptions_15hole_size_limit_3__set__(o, v);
        }
        else {
          PyErr_SetString(PyExc_NotImplementedError, "__del__");
          return -1;
        }
      }

      static PyObject *__pyx_getprop_7pyarrow_3lib_12CacheOptions_range_size_limit(PyObject *o, CYTHON_UNUSED void *x) {
        return __pyx_pw_7pyarrow_3lib_12CacheOptions_16range_size_limit_1__get__(o);
      }

      static int __pyx_setprop_7pyarrow_3lib_12CacheOptions_range_size_limit(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
        if (v) {
          return __pyx_pw_7pyarrow_3lib_12CacheOptions_16range_size_limit_3__set__(o, v);
        }
        else {
          PyErr_SetString(PyExc_NotImplementedError, "__del__");
          return -1;
        }
      }

      static PyObject *__pyx_getprop_7pyarrow_3lib_12CacheOptions_lazy(PyObject *o, CYTHON_UNUSED void *x) {
        return __pyx_pw_7pyarrow_3lib_12CacheOptions_4lazy_1__get__(o);
      }

      static int __pyx_setprop_7pyarrow_3lib_12CacheOptions_lazy(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
        if (v) {
          return __pyx_pw_7pyarrow_3lib_12CacheOptions_4lazy_3__set__(o, v);
        }
        else {
          PyErr_SetString(PyExc_NotImplementedError, "__del__");
          return -1;
        }
      }

      static PyObject *__pyx_getprop_7pyarrow_3lib_12CacheOptions_prefetch_limit(PyObject *o, CYTHON_UNUSED void *x) {
        return __pyx_pw_7pyarrow_3lib_12CacheOptions_14prefetch_limit_1__get__(o);
      }

      static int __pyx_setprop_7pyarrow_3lib_12CacheOptions_prefetch_limit(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
        if (v) {
          return __pyx_pw_7pyarrow_3lib_12CacheOptions_14prefetch_limit_3__set__(o, v);
        }
        else {
          PyErr_SetString(PyExc_NotImplementedError, "__del__");
          return -1;
        }
      }

      static PyMethodDef __pyx_methods_7pyarrow_3lib_CacheOptions[] = {
        {"from_network_metrics", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12CacheOptions_5from_network_metrics, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12CacheOptions_4from_network_metrics},
        {"_reconstruct", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12CacheOptions_7_reconstruct, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12CacheOptions_6_reconstruct},
        {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12CacheOptions_9__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12CacheOptions_8__reduce__},
        {0, 0, 0, 0}
      };

      static struct PyGetSetDef __pyx_getsets_7pyarrow_3lib_CacheOptions[] = {
        {"hole_size_limit", __pyx_getprop_7pyarrow_3lib_12CacheOptions_hole_size_limit, __pyx_setprop_7pyarrow_3lib_12CacheOptions_hole_size_limit, 0, 0},
        {"range_size_limit", __pyx_getprop_7pyarrow_3lib_12CacheOptions_range_size_limit, __pyx_setprop_7pyarrow_3lib_12CacheOptions_range_size_limit, 0, 0},
        {"lazy", __pyx_getprop_7pyarrow_3lib_12CacheOptions_lazy, __pyx_setprop_7pyarrow_3lib_12CacheOptions_lazy, 0, 0},
        {"prefetch_limit", __pyx_getprop_7pyarrow_3lib_12CacheOptions_prefetch_limit, __pyx_setprop_7pyarrow_3lib_12CacheOptions_prefetch_limit, 0, 0},
        {0, 0, 0, 0, 0}
      };
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib_CacheOptions_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_CacheOptions},
        {Py_tp_doc, (void *)PyDoc_STR("CacheOptions(hole_size_limit=None, *, range_size_limit=None, lazy=None, prefetch_limit=None)\n\nCache options for a pre-buffered fragment scan.\n\nParameters\n----------\nhole_size_limit : int, default 8KiB\n    The maximum distance in bytes between two consecutive ranges; beyond\n    this value, ranges are not combined.\nrange_size_limit : int, default 32MiB\n    The maximum size in bytes of a combined range; if combining two\n    consecutive ranges would produce a range of a size greater than this,\n    they are not combined\nlazy : bool, default True\n    lazy = false: request all byte ranges when PreBuffer or WillNeed is called.\n    lazy = True, prefetch_limit = 0: request merged byte ranges only after the reader\n    needs them.\n    lazy = True, prefetch_limit = k: prefetch up to k merged byte ranges ahead of the\n    range that is currently being read.\nprefetch_limit : int, default 0\n    The maximum number of ranges to be prefetched. This is only used for\n    lazy cache to asynchronously read some ranges after reading the target\n    range.")},
        {Py_tp_richcompare, (void *)__pyx_tp_richcompare_7pyarrow_3lib_CacheOptions},
        {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_CacheOptions},
        {Py_tp_getset, (void *)__pyx_getsets_7pyarrow_3lib_CacheOptions},
        {Py_tp_init, (void *)__pyx_pw_7pyarrow_3lib_12CacheOptions_1__init__},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_CacheOptions},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib_CacheOptions_spec = {
        "pyarrow.lib.CacheOptions",
        sizeof(struct __pyx_obj_7pyarrow_3lib_CacheOptions),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
        __pyx_type_7pyarrow_3lib_CacheOptions_slots,
      };
      #else

      static PyTypeObject __pyx_type_7pyarrow_3lib_CacheOptions = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""CacheOptions", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib_CacheOptions), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib_CacheOptions, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        0, /*tp_repr*/
        0, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        0, /*tp_str*/
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
        PyDoc_STR("CacheOptions(hole_size_limit=None, *, range_size_limit=None, lazy=None, prefetch_limit=None)\n\nCache options for a pre-buffered fragment scan.\n\nParameters\n----------\nhole_size_limit : int, default 8KiB\n    The maximum distance in bytes between two consecutive ranges; beyond\n    this value, ranges are not combined.\nrange_size_limit : int, default 32MiB\n    The maximum size in bytes of a combined range; if combining two\n    consecutive ranges would produce a range of a size greater than this,\n    they are not combined\nlazy : bool, default True\n    lazy = false: request all byte ranges when PreBuffer or WillNeed is called.\n    lazy = True, prefetch_limit = 0: request merged byte ranges only after the reader\n    needs them.\n    lazy = True, prefetch_limit = k: prefetch up to k merged byte ranges ahead of the\n    range that is currently being read.\nprefetch_limit : int, default 0\n    The maximum number of ranges to be prefetched. This is only used for\n    lazy cache to asynchronously read some ranges after reading the target\n    range."), /*tp_doc*/
        0, /*tp_traverse*/
        0, /*tp_clear*/
        __pyx_tp_richcompare_7pyarrow_3lib_CacheOptions, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        0, /*tp_iter*/
        0, /*tp_iternext*/
        __pyx_methods_7pyarrow_3lib_CacheOptions, /*tp_methods*/
        0, /*tp_members*/
        __pyx_getsets_7pyarrow_3lib_CacheOptions, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        __pyx_pw_7pyarrow_3lib_12CacheOptions_1__init__, /*tp_init*/
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib_CacheOptions, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif
      static struct __pyx_vtabstruct_7pyarrow_3lib_Codec __pyx_vtable_7pyarrow_3lib_Codec;

      static PyObject *__pyx_tp_new_7pyarrow_3lib_Codec(PyTypeObject *t, PyObject *a, PyObject *k) {
        struct __pyx_obj_7pyarrow_3lib_Codec *p;
        PyObject *o = __pyx_tp_new_7pyarrow_3lib__Weakrefable(t, a, k);
        if (unlikely(!o)) return 0;
        p = ((struct __pyx_obj_7pyarrow_3lib_Codec *)o);
        p->__pyx_vtab = __pyx_vtabptr_7pyarrow_3lib_Codec;
        __Pyx_default_placement_construct(&(p->wrapped));
        return o;
      }

      static void __pyx_tp_dealloc_7pyarrow_3lib_Codec(PyObject *o) {
        struct __pyx_obj_7pyarrow_3lib_Codec *p = (struct __pyx_obj_7pyarrow_3lib_Codec *)o;
        #if CYTHON_USE_TP_FINALIZE
        if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) {
          if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_7pyarrow_3lib_Codec) {
            if (PyObject_CallFinalizerFromDealloc(o)) return;
          }
        }
        #endif
        __Pyx_call_destructor(p->wrapped);
        __pyx_tp_dealloc_7pyarrow_3lib__Weakrefable(o);
      }

      static PyObject *__pyx_getprop_7pyarrow_3lib_5Codec_name(PyObject *o, CYTHON_UNUSED void *x) {
        return __pyx_pw_7pyarrow_3lib_5Codec_4name_1__get__(o);
      }

      static PyObject *__pyx_getprop_7pyarrow_3lib_5Codec_compression_level(PyObject *o, CYTHON_UNUSED void *x) {
        return __pyx_pw_7pyarrow_3lib_5Codec_17compression_level_1__get__(o);
      }

      static PyMethodDef __pyx_methods_7pyarrow_3lib_Codec[] = {
        {"detect", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Codec_3detect, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Codec_2detect},
        {"is_available", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Codec_5is_available, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Codec_4is_available},
        {"supports_compression_level", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Codec_7supports_compression_level, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Codec_6supports_compression_level},
        {"default_compression_level", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Codec_9default_compression_level, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Codec_8default_compression_level},
        {"minimum_compression_level", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Codec_11minimum_compression_level, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Codec_10minimum_compression_level},
        {"maximum_compression_level", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Codec_13maximum_compression_level, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Codec_12maximum_compression_level},
        {"compress", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Codec_15compress, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Codec_14compress},
        {"decompress", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Codec_17decompress, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Codec_16decompress},
        {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Codec_21__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Codec_20__reduce_cython__},
        {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_5Codec_23__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_5Codec_22__setstate_cython__},
        {0, 0, 0, 0}
      };

      static struct PyGetSetDef __pyx_getsets_7pyarrow_3lib_Codec[] = {
        {"name", __pyx_getprop_7pyarrow_3lib_5Codec_name, 0, PyDoc_STR("Returns the name of the codec"), 0},
        {"compression_level", __pyx_getprop_7pyarrow_3lib_5Codec_compression_level, 0, PyDoc_STR("Returns the compression level parameter of the codec"), 0},
        {0, 0, 0, 0, 0}
      };
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib_Codec_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_Codec},
        {Py_tp_repr, (void *)__pyx_pw_7pyarrow_3lib_5Codec_19__repr__},
        {Py_tp_doc, (void *)PyDoc_STR("Codec(str compression, compression_level=None)\n\nCompression codec.\n\nParameters\n----------\ncompression : str\n    Type of compression codec to initialize, valid values are: 'gzip',\n    'bz2', 'brotli', 'lz4' (or 'lz4_frame'), 'lz4_raw', 'zstd' and\n    'snappy'.\ncompression_level : int, None\n    Optional parameter specifying how aggressively to compress.  The\n    possible ranges and effect of this parameter depend on the specific\n    codec chosen.  Higher values compress more but typically use more\n    resources (CPU/RAM).  Some codecs support negative values.\n\n    gzip\n        The compression_level maps to the memlevel parameter of\n        deflateInit2.  Higher levels use more RAM but are faster\n        and should have higher compression ratios.\n\n    bz2\n        The compression level maps to the blockSize100k parameter of\n        the BZ2_bzCompressInit function.  Higher levels use more RAM\n        but are faster and should have higher compression ratios.\n\n    brotli\n        The compression level maps to the BROTLI_PARAM_QUALITY\n        parameter.  Higher values are slower and should have higher\n        compression ratios.\n\n    lz4/lz4_frame/lz4_raw\n        The compression level parameter is not supported and must\n        be None\n\n    zstd\n        The compression level maps to the compressionLevel parameter\n        of ZSTD_initCStream.  Negative values are supported.  Higher\n        values are slower and should have higher compression ratios.\n\n    snappy\n        The compression level parameter is not supported and must\n        be None\n\n\nRaises\n------\nValueError\n    If invalid compression value is passed.\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> pa.Codec.is_available('gzip')\nTrue\n>>> codec = pa.Codec('gzip')\n>>> codec.name\n'gzip'\n>>> codec.compression_level\n9")},
        {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_Codec},
        {Py_tp_getset, (void *)__pyx_getsets_7pyarrow_3lib_Codec},
        {Py_tp_init, (void *)__pyx_pw_7pyarrow_3lib_5Codec_1__init__},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_Codec},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib_Codec_spec = {
        "pyarrow.lib.Codec",
        sizeof(struct __pyx_obj_7pyarrow_3lib_Codec),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
        __pyx_type_7pyarrow_3lib_Codec_slots,
      };
      #else

      static PyTypeObject __pyx_type_7pyarrow_3lib_Codec = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""Codec", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib_Codec), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib_Codec, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        __pyx_pw_7pyarrow_3lib_5Codec_19__repr__, /*tp_repr*/
        0, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        0, /*tp_str*/
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
        PyDoc_STR("Codec(str compression, compression_level=None)\n\nCompression codec.\n\nParameters\n----------\ncompression : str\n    Type of compression codec to initialize, valid values are: 'gzip',\n    'bz2', 'brotli', 'lz4' (or 'lz4_frame'), 'lz4_raw', 'zstd' and\n    'snappy'.\ncompression_level : int, None\n    Optional parameter specifying how aggressively to compress.  The\n    possible ranges and effect of this parameter depend on the specific\n    codec chosen.  Higher values compress more but typically use more\n    resources (CPU/RAM).  Some codecs support negative values.\n\n    gzip\n        The compression_level maps to the memlevel parameter of\n        deflateInit2.  Higher levels use more RAM but are faster\n        and should have higher compression ratios.\n\n    bz2\n        The compression level maps to the blockSize100k parameter of\n        the BZ2_bzCompressInit function.  Higher levels use more RAM\n        but are faster and should have higher compression ratios.\n\n    brotli\n        The compression level maps to the BROTLI_PARAM_QUALITY\n        parameter.  Higher values are slower and should have higher\n        compression ratios.\n\n    lz4/lz4_frame/lz4_raw\n        The compression level parameter is not supported and must\n        be None\n\n    zstd\n        The compression level maps to the compressionLevel parameter\n        of ZSTD_initCStream.  Negative values are supported.  Higher\n        values are slower and should have higher compression ratios.\n\n    snappy\n        The compression level parameter is not supported and must\n        be None\n\n\nRaises\n------\nValueError\n    If invalid compression value is passed.\n\nExamples\n--------\n>>> import pyarrow as pa\n>>> pa.Codec.is_available('gzip')\nTrue\n>>> codec = pa.Codec('gzip')\n>>> codec.name\n'gzip'\n>>> codec.compression_level\n9"), /*tp_doc*/
        0, /*tp_traverse*/
        0, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        0, /*tp_iter*/
        0, /*tp_iternext*/
        __pyx_methods_7pyarrow_3lib_Codec, /*tp_methods*/
        0, /*tp_members*/
        __pyx_getsets_7pyarrow_3lib_Codec, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        __pyx_pw_7pyarrow_3lib_5Codec_1__init__, /*tp_init*/
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib_Codec, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif
      static struct __pyx_vtabstruct_7pyarrow_3lib_StopToken __pyx_vtable_7pyarrow_3lib_StopToken;

      static PyObject *__pyx_tp_new_7pyarrow_3lib_StopToken(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
        struct __pyx_obj_7pyarrow_3lib_StopToken *p;
        PyObject *o;
        o = __Pyx_AllocateExtensionType(t, 0);
        if (unlikely(!o)) return 0;
        p = ((struct __pyx_obj_7pyarrow_3lib_StopToken *)o);
        p->__pyx_vtab = __pyx_vtabptr_7pyarrow_3lib_StopToken;
        __Pyx_default_placement_construct(&(p->stop_token));
        return o;
      }

      static void __pyx_tp_dealloc_7pyarrow_3lib_StopToken(PyObject *o) {
        struct __pyx_obj_7pyarrow_3lib_StopToken *p = (struct __pyx_obj_7pyarrow_3lib_StopToken *)o;
        #if CYTHON_USE_TP_FINALIZE
        if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) {
          if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_7pyarrow_3lib_StopToken) {
            if (PyObject_CallFinalizerFromDealloc(o)) return;
          }
        }
        #endif
        __Pyx_call_destructor(p->stop_token);
        PyTypeObject *tp = Py_TYPE(o);
        #if CYTHON_USE_TYPE_SLOTS
        (*tp->tp_free)(o);
        #else
        {
          freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free);
          if (tp_free) tp_free(o);
        }
        #endif
        #if CYTHON_USE_TYPE_SPECS
        Py_DECREF(tp);
        #endif
      }

      static PyMethodDef __pyx_methods_7pyarrow_3lib_StopToken[] = {
        {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_9StopToken_1__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_9StopToken___reduce_cython__},
        {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_9StopToken_3__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_9StopToken_2__setstate_cython__},
        {0, 0, 0, 0}
      };
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib_StopToken_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_StopToken},
        {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_StopToken},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_StopToken},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib_StopToken_spec = {
        "pyarrow.lib.StopToken",
        sizeof(struct __pyx_obj_7pyarrow_3lib_StopToken),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
        __pyx_type_7pyarrow_3lib_StopToken_slots,
      };
      #else

      static PyTypeObject __pyx_type_7pyarrow_3lib_StopToken = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""StopToken", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib_StopToken), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib_StopToken, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        0, /*tp_repr*/
        0, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        0, /*tp_str*/
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
        0, /*tp_doc*/
        0, /*tp_traverse*/
        0, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        0, /*tp_iter*/
        0, /*tp_iternext*/
        __pyx_methods_7pyarrow_3lib_StopToken, /*tp_methods*/
        0, /*tp_members*/
        0, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        0, /*tp_init*/
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib_StopToken, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif

      static PyObject *__pyx_tp_new_7pyarrow_3lib_SignalStopHandler(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
        struct __pyx_obj_7pyarrow_3lib_SignalStopHandler *p;
        PyObject *o;
        o = __Pyx_AllocateExtensionType(t, 0);
        if (unlikely(!o)) return 0;
        p = ((struct __pyx_obj_7pyarrow_3lib_SignalStopHandler *)o);
        __Pyx_default_placement_construct(&(p->_signals));
        p->_stop_token = ((struct __pyx_obj_7pyarrow_3lib_StopToken *)Py_None); Py_INCREF(Py_None);
        if (unlikely(__pyx_pw_7pyarrow_3lib_17SignalStopHandler_1__cinit__(o, __pyx_mstate_global->__pyx_empty_tuple, NULL) < 0)) goto bad;
        return o;
        bad:
        Py_DECREF(o); o = 0;
        return NULL;
      }

      static void __pyx_tp_dealloc_7pyarrow_3lib_SignalStopHandler(PyObject *o) {
        struct __pyx_obj_7pyarrow_3lib_SignalStopHandler *p = (struct __pyx_obj_7pyarrow_3lib_SignalStopHandler *)o;
        #if CYTHON_USE_TP_FINALIZE
        if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
          if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_7pyarrow_3lib_SignalStopHandler) {
            if (PyObject_CallFinalizerFromDealloc(o)) return;
          }
        }
        #endif
        PyObject_GC_UnTrack(o);
        {
          PyObject *etype, *eval, *etb;
          PyErr_Fetch(&etype, &eval, &etb);
          __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
          __pyx_pw_7pyarrow_3lib_17SignalStopHandler_9__dealloc__(o);
          __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
          PyErr_Restore(etype, eval, etb);
        }
        __Pyx_call_destructor(p->_signals);
        Py_CLEAR(p->_stop_token);
        PyTypeObject *tp = Py_TYPE(o);
        #if CYTHON_USE_TYPE_SLOTS
        (*tp->tp_free)(o);
        #else
        {
          freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free);
          if (tp_free) tp_free(o);
        }
        #endif
        #if CYTHON_USE_TYPE_SPECS
        Py_DECREF(tp);
        #endif
      }

      static int __pyx_tp_traverse_7pyarrow_3lib_SignalStopHandler(PyObject *o, visitproc v, void *a) {
        int e;
        struct __pyx_obj_7pyarrow_3lib_SignalStopHandler *p = (struct __pyx_obj_7pyarrow_3lib_SignalStopHandler *)o;
        {
          e = __Pyx_call_type_traverse(o, 1, v, a);
          if (e) return e;
        }
        if (p->_stop_token) {
          e = (*v)(((PyObject *)p->_stop_token), a); if (e) return e;
        }
        return 0;
      }

      static int __pyx_tp_clear_7pyarrow_3lib_SignalStopHandler(PyObject *o) {
        PyObject* tmp;
        struct __pyx_obj_7pyarrow_3lib_SignalStopHandler *p = (struct __pyx_obj_7pyarrow_3lib_SignalStopHandler *)o;
        tmp = ((PyObject*)p->_stop_token);
        p->_stop_token = ((struct __pyx_obj_7pyarrow_3lib_StopToken *)Py_None); Py_INCREF(Py_None);
        Py_XDECREF(tmp);
        return 0;
      }

      static PyObject *__pyx_getprop_7pyarrow_3lib_17SignalStopHandler_stop_token(PyObject *o, CYTHON_UNUSED void *x) {
        return __pyx_pw_7pyarrow_3lib_17SignalStopHandler_10stop_token_1__get__(o);
      }

      static PyMethodDef __pyx_methods_7pyarrow_3lib_SignalStopHandler[] = {
        {"_init_signals", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_17SignalStopHandler_3_init_signals, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_17SignalStopHandler_2_init_signals},
        {"__enter__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_17SignalStopHandler_5__enter__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_17SignalStopHandler_4__enter__},
        {"__exit__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_17SignalStopHandler_7__exit__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_17SignalStopHandler_6__exit__},
        {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_17SignalStopHandler_11__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_17SignalStopHandler_10__reduce_cython__},
        {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_17SignalStopHandler_13__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_17SignalStopHandler_12__setstate_cython__},
        {0, 0, 0, 0}
      };

      static struct PyGetSetDef __pyx_getsets_7pyarrow_3lib_SignalStopHandler[] = {
        {"stop_token", __pyx_getprop_7pyarrow_3lib_17SignalStopHandler_stop_token, 0, 0, 0},
        {0, 0, 0, 0, 0}
      };
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib_SignalStopHandler_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_SignalStopHandler},
        {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyarrow_3lib_SignalStopHandler},
        {Py_tp_clear, (void *)__pyx_tp_clear_7pyarrow_3lib_SignalStopHandler},
        {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_SignalStopHandler},
        {Py_tp_getset, (void *)__pyx_getsets_7pyarrow_3lib_SignalStopHandler},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_SignalStopHandler},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib_SignalStopHandler_spec = {
        "pyarrow.lib.SignalStopHandler",
        sizeof(struct __pyx_obj_7pyarrow_3lib_SignalStopHandler),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
        __pyx_type_7pyarrow_3lib_SignalStopHandler_slots,
      };
      #else

      static PyTypeObject __pyx_type_7pyarrow_3lib_SignalStopHandler = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""SignalStopHandler", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib_SignalStopHandler), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib_SignalStopHandler, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        0, /*tp_repr*/
        0, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        0, /*tp_str*/
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
        0, /*tp_doc*/
        __pyx_tp_traverse_7pyarrow_3lib_SignalStopHandler, /*tp_traverse*/
        __pyx_tp_clear_7pyarrow_3lib_SignalStopHandler, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        0, /*tp_iter*/
        0, /*tp_iternext*/
        __pyx_methods_7pyarrow_3lib_SignalStopHandler, /*tp_methods*/
        0, /*tp_members*/
        __pyx_getsets_7pyarrow_3lib_SignalStopHandler, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        0, /*tp_init*/
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib_SignalStopHandler, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif
      static struct __pyx_vtabstruct_7pyarrow_3lib__PandasAPIShim __pyx_vtable_7pyarrow_3lib__PandasAPIShim;

      static PyObject *__pyx_tp_new_7pyarrow_3lib__PandasAPIShim(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
        struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *p;
        PyObject *o;
        o = __Pyx_AllocateExtensionType(t, 0);
        if (unlikely(!o)) return 0;
        p = ((struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *)o);
        p->__pyx_vtab = __pyx_vtabptr_7pyarrow_3lib__PandasAPIShim;
        p->_loose_version = Py_None; Py_INCREF(Py_None);
        p->_version = Py_None; Py_INCREF(Py_None);
        p->_pd = Py_None; Py_INCREF(Py_None);
        p->_types_api = Py_None; Py_INCREF(Py_None);
        p->_compat_module = Py_None; Py_INCREF(Py_None);
        p->_data_frame = Py_None; Py_INCREF(Py_None);
        p->_index = Py_None; Py_INCREF(Py_None);
        p->_series = Py_None; Py_INCREF(Py_None);
        p->_categorical_type = Py_None; Py_INCREF(Py_None);
        p->_datetimetz_type = Py_None; Py_INCREF(Py_None);
        p->_extension_array = Py_None; Py_INCREF(Py_None);
        p->_extension_dtype = Py_None; Py_INCREF(Py_None);
        p->_array_like_types = Py_None; Py_INCREF(Py_None);
        p->_is_extension_array_dtype = Py_None; Py_INCREF(Py_None);
        p->_lock = Py_None; Py_INCREF(Py_None);
        return o;
      }

      static void __pyx_tp_dealloc_7pyarrow_3lib__PandasAPIShim(PyObject *o) {
        struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *p = (struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *)o;
        #if CYTHON_USE_TP_FINALIZE
        if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
          if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_7pyarrow_3lib__PandasAPIShim) {
            if (PyObject_CallFinalizerFromDealloc(o)) return;
          }
        }
        #endif
        PyObject_GC_UnTrack(o);
        Py_CLEAR(p->_loose_version);
        Py_CLEAR(p->_version);
        Py_CLEAR(p->_pd);
        Py_CLEAR(p->_types_api);
        Py_CLEAR(p->_compat_module);
        Py_CLEAR(p->_data_frame);
        Py_CLEAR(p->_index);
        Py_CLEAR(p->_series);
        Py_CLEAR(p->_categorical_type);
        Py_CLEAR(p->_datetimetz_type);
        Py_CLEAR(p->_extension_array);
        Py_CLEAR(p->_extension_dtype);
        Py_CLEAR(p->_array_like_types);
        Py_CLEAR(p->_is_extension_array_dtype);
        Py_CLEAR(p->_lock);
        PyTypeObject *tp = Py_TYPE(o);
        #if CYTHON_USE_TYPE_SLOTS
        (*tp->tp_free)(o);
        #else
        {
          freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free);
          if (tp_free) tp_free(o);
        }
        #endif
        #if CYTHON_USE_TYPE_SPECS
        Py_DECREF(tp);
        #endif
      }

      static int __pyx_tp_traverse_7pyarrow_3lib__PandasAPIShim(PyObject *o, visitproc v, void *a) {
        int e;
        struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *p = (struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *)o;
        {
          e = __Pyx_call_type_traverse(o, 1, v, a);
          if (e) return e;
        }
        if (p->_loose_version) {
          e = (*v)(p->_loose_version, a); if (e) return e;
        }
        if (p->_version) {
          e = (*v)(p->_version, a); if (e) return e;
        }
        if (p->_pd) {
          e = (*v)(p->_pd, a); if (e) return e;
        }
        if (p->_types_api) {
          e = (*v)(p->_types_api, a); if (e) return e;
        }
        if (p->_compat_module) {
          e = (*v)(p->_compat_module, a); if (e) return e;
        }
        if (p->_data_frame) {
          e = (*v)(p->_data_frame, a); if (e) return e;
        }
        if (p->_index) {
          e = (*v)(p->_index, a); if (e) return e;
        }
        if (p->_series) {
          e = (*v)(p->_series, a); if (e) return e;
        }
        if (p->_categorical_type) {
          e = (*v)(p->_categorical_type, a); if (e) return e;
        }
        if (p->_datetimetz_type) {
          e = (*v)(p->_datetimetz_type, a); if (e) return e;
        }
        if (p->_extension_array) {
          e = (*v)(p->_extension_array, a); if (e) return e;
        }
        if (p->_extension_dtype) {
          e = (*v)(p->_extension_dtype, a); if (e) return e;
        }
        if (p->_array_like_types) {
          e = (*v)(p->_array_like_types, a); if (e) return e;
        }
        if (p->_is_extension_array_dtype) {
          e = (*v)(p->_is_extension_array_dtype, a); if (e) return e;
        }
        if (p->_lock) {
          e = (*v)(p->_lock, a); if (e) return e;
        }
        return 0;
      }

      static int __pyx_tp_clear_7pyarrow_3lib__PandasAPIShim(PyObject *o) {
        PyObject* tmp;
        struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *p = (struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *)o;
        tmp = ((PyObject*)p->_loose_version);
        p->_loose_version = Py_None; Py_INCREF(Py_None);
        Py_XDECREF(tmp);
        tmp = ((PyObject*)p->_version);
        p->_version = Py_None; Py_INCREF(Py_None);
        Py_XDECREF(tmp);
        tmp = ((PyObject*)p->_pd);
        p->_pd = Py_None; Py_INCREF(Py_None);
        Py_XDECREF(tmp);
        tmp = ((PyObject*)p->_types_api);
        p->_types_api = Py_None; Py_INCREF(Py_None);
        Py_XDECREF(tmp);
        tmp = ((PyObject*)p->_compat_module);
        p->_compat_module = Py_None; Py_INCREF(Py_None);
        Py_XDECREF(tmp);
        tmp = ((PyObject*)p->_data_frame);
        p->_data_frame = Py_None; Py_INCREF(Py_None);
        Py_XDECREF(tmp);
        tmp = ((PyObject*)p->_index);
        p->_index = Py_None; Py_INCREF(Py_None);
        Py_XDECREF(tmp);
        tmp = ((PyObject*)p->_series);
        p->_series = Py_None; Py_INCREF(Py_None);
        Py_XDECREF(tmp);
        tmp = ((PyObject*)p->_categorical_type);
        p->_categorical_type = Py_None; Py_INCREF(Py_None);
        Py_XDECREF(tmp);
        tmp = ((PyObject*)p->_datetimetz_type);
        p->_datetimetz_type = Py_None; Py_INCREF(Py_None);
        Py_XDECREF(tmp);
        tmp = ((PyObject*)p->_extension_array);
        p->_extension_array = Py_None; Py_INCREF(Py_None);
        Py_XDECREF(tmp);
        tmp = ((PyObject*)p->_extension_dtype);
        p->_extension_dtype = Py_None; Py_INCREF(Py_None);
        Py_XDECREF(tmp);
        tmp = ((PyObject*)p->_array_like_types);
        p->_array_like_types = Py_None; Py_INCREF(Py_None);
        Py_XDECREF(tmp);
        tmp = ((PyObject*)p->_is_extension_array_dtype);
        p->_is_extension_array_dtype = Py_None; Py_INCREF(Py_None);
        Py_XDECREF(tmp);
        tmp = ((PyObject*)p->_lock);
        p->_lock = Py_None; Py_INCREF(Py_None);
        Py_XDECREF(tmp);
        return 0;
      }

      static PyObject *__pyx_getprop_7pyarrow_3lib_14_PandasAPIShim_have_pandas(PyObject *o, CYTHON_UNUSED void *x) {
        return __pyx_pw_7pyarrow_3lib_14_PandasAPIShim_11have_pandas_1__get__(o);
      }

      static PyObject *__pyx_getprop_7pyarrow_3lib_14_PandasAPIShim_compat(PyObject *o, CYTHON_UNUSED void *x) {
        return __pyx_pw_7pyarrow_3lib_14_PandasAPIShim_6compat_1__get__(o);
      }

      static PyObject *__pyx_getprop_7pyarrow_3lib_14_PandasAPIShim_pd(PyObject *o, CYTHON_UNUSED void *x) {
        return __pyx_pw_7pyarrow_3lib_14_PandasAPIShim_2pd_1__get__(o);
      }

      static PyObject *__pyx_getprop_7pyarrow_3lib_14_PandasAPIShim_loose_version(PyObject *o, CYTHON_UNUSED void *x) {
        return __pyx_pw_7pyarrow_3lib_14_PandasAPIShim_13loose_version_1__get__(o);
      }

      static PyObject *__pyx_getprop_7pyarrow_3lib_14_PandasAPIShim_version(PyObject *o, CYTHON_UNUSED void *x) {
        return __pyx_pw_7pyarrow_3lib_14_PandasAPIShim_7version_1__get__(o);
      }

      static PyObject *__pyx_getprop_7pyarrow_3lib_14_PandasAPIShim_categorical_type(PyObject *o, CYTHON_UNUSED void *x) {
        return __pyx_pw_7pyarrow_3lib_14_PandasAPIShim_16categorical_type_1__get__(o);
      }

      static PyObject *__pyx_getprop_7pyarrow_3lib_14_PandasAPIShim_datetimetz_type(PyObject *o, CYTHON_UNUSED void *x) {
        return __pyx_pw_7pyarrow_3lib_14_PandasAPIShim_15datetimetz_type_1__get__(o);
      }

      static PyObject *__pyx_getprop_7pyarrow_3lib_14_PandasAPIShim_extension_dtype(PyObject *o, CYTHON_UNUSED void *x) {
        return __pyx_pw_7pyarrow_3lib_14_PandasAPIShim_15extension_dtype_1__get__(o);
      }

      static PyObject *__pyx_getprop_7pyarrow_3lib_14_PandasAPIShim__loose_version(PyObject *o, CYTHON_UNUSED void *x) {
        return __pyx_pw_7pyarrow_3lib_14_PandasAPIShim_14_loose_version_1__get__(o);
      }

      static PyObject *__pyx_getprop_7pyarrow_3lib_14_PandasAPIShim__version(PyObject *o, CYTHON_UNUSED void *x) {
        return __pyx_pw_7pyarrow_3lib_14_PandasAPIShim_8_version_1__get__(o);
      }

      static PyObject *__pyx_getprop_7pyarrow_3lib_14_PandasAPIShim__pd(PyObject *o, CYTHON_UNUSED void *x) {
        return __pyx_pw_7pyarrow_3lib_14_PandasAPIShim_3_pd_1__get__(o);
      }

      static PyObject *__pyx_getprop_7pyarrow_3lib_14_PandasAPIShim__types_api(PyObject *o, CYTHON_UNUSED void *x) {
        return __pyx_pw_7pyarrow_3lib_14_PandasAPIShim_10_types_api_1__get__(o);
      }

      static PyObject *__pyx_getprop_7pyarrow_3lib_14_PandasAPIShim__compat_module(PyObject *o, CYTHON_UNUSED void *x) {
        return __pyx_pw_7pyarrow_3lib_14_PandasAPIShim_14_compat_module_1__get__(o);
      }

      static PyObject *__pyx_getprop_7pyarrow_3lib_14_PandasAPIShim__data_frame(PyObject *o, CYTHON_UNUSED void *x) {
        return __pyx_pw_7pyarrow_3lib_14_PandasAPIShim_11_data_frame_1__get__(o);
      }

      static PyObject *__pyx_getprop_7pyarrow_3lib_14_PandasAPIShim__index(PyObject *o, CYTHON_UNUSED void *x) {
        return __pyx_pw_7pyarrow_3lib_14_PandasAPIShim_6_index_1__get__(o);
      }

      static PyObject *__pyx_getprop_7pyarrow_3lib_14_PandasAPIShim__series(PyObject *o, CYTHON_UNUSED void *x) {
        return __pyx_pw_7pyarrow_3lib_14_PandasAPIShim_7_series_1__get__(o);
      }

      static PyObject *__pyx_getprop_7pyarrow_3lib_14_PandasAPIShim__categorical_type(PyObject *o, CYTHON_UNUSED void *x) {
        return __pyx_pw_7pyarrow_3lib_14_PandasAPIShim_17_categorical_type_1__get__(o);
      }

      static PyObject *__pyx_getprop_7pyarrow_3lib_14_PandasAPIShim__datetimetz_type(PyObject *o, CYTHON_UNUSED void *x) {
        return __pyx_pw_7pyarrow_3lib_14_PandasAPIShim_16_datetimetz_type_1__get__(o);
      }

      static PyObject *__pyx_getprop_7pyarrow_3lib_14_PandasAPIShim__extension_array(PyObject *o, CYTHON_UNUSED void *x) {
        return __pyx_pw_7pyarrow_3lib_14_PandasAPIShim_16_extension_array_1__get__(o);
      }

      static PyObject *__pyx_getprop_7pyarrow_3lib_14_PandasAPIShim__extension_dtype(PyObject *o, CYTHON_UNUSED void *x) {
        return __pyx_pw_7pyarrow_3lib_14_PandasAPIShim_16_extension_dtype_1__get__(o);
      }

      static PyObject *__pyx_getprop_7pyarrow_3lib_14_PandasAPIShim__array_like_types(PyObject *o, CYTHON_UNUSED void *x) {
        return __pyx_pw_7pyarrow_3lib_14_PandasAPIShim_17_array_like_types_1__get__(o);
      }

      static PyObject *__pyx_getprop_7pyarrow_3lib_14_PandasAPIShim__is_extension_array_dtype(PyObject *o, CYTHON_UNUSED void *x) {
        return __pyx_pw_7pyarrow_3lib_14_PandasAPIShim_25_is_extension_array_dtype_1__get__(o);
      }

      static PyObject *__pyx_getprop_7pyarrow_3lib_14_PandasAPIShim__lock(PyObject *o, CYTHON_UNUSED void *x) {
        return __pyx_pw_7pyarrow_3lib_14_PandasAPIShim_5_lock_1__get__(o);
      }

      static PyObject *__pyx_getprop_7pyarrow_3lib_14_PandasAPIShim_has_sparse(PyObject *o, CYTHON_UNUSED void *x) {
        return __pyx_pw_7pyarrow_3lib_14_PandasAPIShim_10has_sparse_1__get__(o);
      }

      static PyObject *__pyx_getprop_7pyarrow_3lib_14_PandasAPIShim__pd024(PyObject *o, CYTHON_UNUSED void *x) {
        return __pyx_pw_7pyarrow_3lib_14_PandasAPIShim_6_pd024_1__get__(o);
      }

      static PyObject *__pyx_getprop_7pyarrow_3lib_14_PandasAPIShim__is_v1(PyObject *o, CYTHON_UNUSED void *x) {
        return __pyx_pw_7pyarrow_3lib_14_PandasAPIShim_6_is_v1_1__get__(o);
      }

      static PyObject *__pyx_getprop_7pyarrow_3lib_14_PandasAPIShim__is_ge_v21(PyObject *o, CYTHON_UNUSED void *x) {
        return __pyx_pw_7pyarrow_3lib_14_PandasAPIShim_10_is_ge_v21_1__get__(o);
      }

      static PyObject *__pyx_getprop_7pyarrow_3lib_14_PandasAPIShim__is_ge_v23(PyObject *o, CYTHON_UNUSED void *x) {
        return __pyx_pw_7pyarrow_3lib_14_PandasAPIShim_10_is_ge_v23_1__get__(o);
      }

      static PyObject *__pyx_getprop_7pyarrow_3lib_14_PandasAPIShim__is_ge_v3(PyObject *o, CYTHON_UNUSED void *x) {
        return __pyx_pw_7pyarrow_3lib_14_PandasAPIShim_9_is_ge_v3_1__get__(o);
      }

      static PyObject *__pyx_getprop_7pyarrow_3lib_14_PandasAPIShim__is_ge_v3_strict(PyObject *o, CYTHON_UNUSED void *x) {
        return __pyx_pw_7pyarrow_3lib_14_PandasAPIShim_16_is_ge_v3_strict_1__get__(o);
      }

      static PyMethodDef __pyx_methods_7pyarrow_3lib__PandasAPIShim[] = {
        {"series", (PyCFunction)(void(*)(void))(PyCFunctionWithKeywords)__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_3series, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_14_PandasAPIShim_2series},
        {"data_frame", (PyCFunction)(void(*)(void))(PyCFunctionWithKeywords)__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_5data_frame, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_14_PandasAPIShim_4data_frame},
        {"is_v1", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_11is_v1, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_14_PandasAPIShim_10is_v1},
        {"is_ge_v21", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_13is_ge_v21, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_14_PandasAPIShim_12is_ge_v21},
        {"is_ge_v23", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_15is_ge_v23, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_14_PandasAPIShim_14is_ge_v23},
        {"is_ge_v3", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_17is_ge_v3, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_14_PandasAPIShim_16is_ge_v3},
        {"is_ge_v3_strict", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_19is_ge_v3_strict, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_14_PandasAPIShim_18is_ge_v3_strict},
        {"uses_string_dtype", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_21uses_string_dtype, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_14_PandasAPIShim_20uses_string_dtype},
        {"get_rangeindex_attribute", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_41get_rangeindex_attribute, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_14_PandasAPIShim_40get_rangeindex_attribute},
        {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_43__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_14_PandasAPIShim_42__reduce_cython__},
        {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_45__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_14_PandasAPIShim_44__setstate_cython__},
        {0, 0, 0, 0}
      };

      static struct PyGetSetDef __pyx_getsets_7pyarrow_3lib__PandasAPIShim[] = {
        {"have_pandas", __pyx_getprop_7pyarrow_3lib_14_PandasAPIShim_have_pandas, 0, 0, 0},
        {"compat", __pyx_getprop_7pyarrow_3lib_14_PandasAPIShim_compat, 0, 0, 0},
        {"pd", __pyx_getprop_7pyarrow_3lib_14_PandasAPIShim_pd, 0, 0, 0},
        {"loose_version", __pyx_getprop_7pyarrow_3lib_14_PandasAPIShim_loose_version, 0, 0, 0},
        {"version", __pyx_getprop_7pyarrow_3lib_14_PandasAPIShim_version, 0, 0, 0},
        {"categorical_type", __pyx_getprop_7pyarrow_3lib_14_PandasAPIShim_categorical_type, 0, 0, 0},
        {"datetimetz_type", __pyx_getprop_7pyarrow_3lib_14_PandasAPIShim_datetimetz_type, 0, 0, 0},
        {"extension_dtype", __pyx_getprop_7pyarrow_3lib_14_PandasAPIShim_extension_dtype, 0, 0, 0},
        {"_loose_version", __pyx_getprop_7pyarrow_3lib_14_PandasAPIShim__loose_version, 0, 0, 0},
        {"_version", __pyx_getprop_7pyarrow_3lib_14_PandasAPIShim__version, 0, 0, 0},
        {"_pd", __pyx_getprop_7pyarrow_3lib_14_PandasAPIShim__pd, 0, 0, 0},
        {"_types_api", __pyx_getprop_7pyarrow_3lib_14_PandasAPIShim__types_api, 0, 0, 0},
        {"_compat_module", __pyx_getprop_7pyarrow_3lib_14_PandasAPIShim__compat_module, 0, 0, 0},
        {"_data_frame", __pyx_getprop_7pyarrow_3lib_14_PandasAPIShim__data_frame, 0, 0, 0},
        {"_index", __pyx_getprop_7pyarrow_3lib_14_PandasAPIShim__index, 0, 0, 0},
        {"_series", __pyx_getprop_7pyarrow_3lib_14_PandasAPIShim__series, 0, 0, 0},
        {"_categorical_type", __pyx_getprop_7pyarrow_3lib_14_PandasAPIShim__categorical_type, 0, 0, 0},
        {"_datetimetz_type", __pyx_getprop_7pyarrow_3lib_14_PandasAPIShim__datetimetz_type, 0, 0, 0},
        {"_extension_array", __pyx_getprop_7pyarrow_3lib_14_PandasAPIShim__extension_array, 0, 0, 0},
        {"_extension_dtype", __pyx_getprop_7pyarrow_3lib_14_PandasAPIShim__extension_dtype, 0, 0, 0},
        {"_array_like_types", __pyx_getprop_7pyarrow_3lib_14_PandasAPIShim__array_like_types, 0, 0, 0},
        {"_is_extension_array_dtype", __pyx_getprop_7pyarrow_3lib_14_PandasAPIShim__is_extension_array_dtype, 0, 0, 0},
        {"_lock", __pyx_getprop_7pyarrow_3lib_14_PandasAPIShim__lock, 0, 0, 0},
        {"has_sparse", __pyx_getprop_7pyarrow_3lib_14_PandasAPIShim_has_sparse, 0, 0, 0},
        {"_pd024", __pyx_getprop_7pyarrow_3lib_14_PandasAPIShim__pd024, 0, 0, 0},
        {"_is_v1", __pyx_getprop_7pyarrow_3lib_14_PandasAPIShim__is_v1, 0, 0, 0},
        {"_is_ge_v21", __pyx_getprop_7pyarrow_3lib_14_PandasAPIShim__is_ge_v21, 0, 0, 0},
        {"_is_ge_v23", __pyx_getprop_7pyarrow_3lib_14_PandasAPIShim__is_ge_v23, 0, 0, 0},
        {"_is_ge_v3", __pyx_getprop_7pyarrow_3lib_14_PandasAPIShim__is_ge_v3, 0, 0, 0},
        {"_is_ge_v3_strict", __pyx_getprop_7pyarrow_3lib_14_PandasAPIShim__is_ge_v3_strict, 0, 0, 0},
        {0, 0, 0, 0, 0}
      };
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib__PandasAPIShim_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib__PandasAPIShim},
        {Py_tp_doc, (void *)PyDoc_STR("_PandasAPIShim()\n\nLazy pandas importer that isolates usages of pandas APIs and avoids\nimporting pandas until it's actually needed")},
        {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyarrow_3lib__PandasAPIShim},
        {Py_tp_clear, (void *)__pyx_tp_clear_7pyarrow_3lib__PandasAPIShim},
        {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib__PandasAPIShim},
        {Py_tp_getset, (void *)__pyx_getsets_7pyarrow_3lib__PandasAPIShim},
        {Py_tp_init, (void *)__pyx_pw_7pyarrow_3lib_14_PandasAPIShim_1__init__},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib__PandasAPIShim},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib__PandasAPIShim_spec = {
        "pyarrow.lib._PandasAPIShim",
        sizeof(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
        __pyx_type_7pyarrow_3lib__PandasAPIShim_slots,
      };
      #else

      static PyTypeObject __pyx_type_7pyarrow_3lib__PandasAPIShim = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""_PandasAPIShim", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib__PandasAPIShim, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        0, /*tp_repr*/
        0, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        0, /*tp_str*/
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
        PyDoc_STR("_PandasAPIShim()\n\nLazy pandas importer that isolates usages of pandas APIs and avoids\nimporting pandas until it's actually needed"), /*tp_doc*/
        __pyx_tp_traverse_7pyarrow_3lib__PandasAPIShim, /*tp_traverse*/
        __pyx_tp_clear_7pyarrow_3lib__PandasAPIShim, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        0, /*tp_iter*/
        0, /*tp_iternext*/
        __pyx_methods_7pyarrow_3lib__PandasAPIShim, /*tp_methods*/
        0, /*tp_members*/
        __pyx_getsets_7pyarrow_3lib__PandasAPIShim, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        __pyx_pw_7pyarrow_3lib_14_PandasAPIShim_1__init__, /*tp_init*/
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib__PandasAPIShim, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif
      static struct __pyx_vtabstruct_7pyarrow_3lib_LoggingMemoryPool __pyx_vtable_7pyarrow_3lib_LoggingMemoryPool;

      static PyObject *__pyx_tp_new_7pyarrow_3lib_LoggingMemoryPool(PyTypeObject *t, PyObject *a, PyObject *k) {
        struct __pyx_obj_7pyarrow_3lib_LoggingMemoryPool *p;
        PyObject *o = __pyx_tp_new_7pyarrow_3lib_MemoryPool(t, a, k);
        if (unlikely(!o)) return 0;
        p = ((struct __pyx_obj_7pyarrow_3lib_LoggingMemoryPool *)o);
        p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_MemoryPool*)__pyx_vtabptr_7pyarrow_3lib_LoggingMemoryPool;
        __Pyx_default_placement_construct(&(p->logging_pool));
        return o;
      }

      static void __pyx_tp_dealloc_7pyarrow_3lib_LoggingMemoryPool(PyObject *o) {
        struct __pyx_obj_7pyarrow_3lib_LoggingMemoryPool *p = (struct __pyx_obj_7pyarrow_3lib_LoggingMemoryPool *)o;
        #if CYTHON_USE_TP_FINALIZE
        if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) {
          if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_7pyarrow_3lib_LoggingMemoryPool) {
            if (PyObject_CallFinalizerFromDealloc(o)) return;
          }
        }
        #endif
        __Pyx_call_destructor(p->logging_pool);
        __pyx_tp_dealloc_7pyarrow_3lib__Weakrefable(o);
      }

      static PyMethodDef __pyx_methods_7pyarrow_3lib_LoggingMemoryPool[] = {
        {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_17LoggingMemoryPool_3__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_17LoggingMemoryPool_2__reduce_cython__},
        {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_17LoggingMemoryPool_5__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_17LoggingMemoryPool_4__setstate_cython__},
        {0, 0, 0, 0}
      };
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib_LoggingMemoryPool_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_LoggingMemoryPool},
        {Py_tp_doc, (void *)PyDoc_STR("LoggingMemoryPool()")},
        {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_LoggingMemoryPool},
        {Py_tp_init, (void *)__pyx_pw_7pyarrow_3lib_17LoggingMemoryPool_1__init__},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_LoggingMemoryPool},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib_LoggingMemoryPool_spec = {
        "pyarrow.lib.LoggingMemoryPool",
        sizeof(struct __pyx_obj_7pyarrow_3lib_LoggingMemoryPool),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
        __pyx_type_7pyarrow_3lib_LoggingMemoryPool_slots,
      };
      #else

      static PyTypeObject __pyx_type_7pyarrow_3lib_LoggingMemoryPool = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""LoggingMemoryPool", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib_LoggingMemoryPool), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib_LoggingMemoryPool, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_10MemoryPool_15__repr__, /*tp_repr*/
        #else
        0, /*tp_repr*/
        #endif
        0, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        0, /*tp_str*/
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
        PyDoc_STR("LoggingMemoryPool()"), /*tp_doc*/
        0, /*tp_traverse*/
        0, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        0, /*tp_iter*/
        0, /*tp_iternext*/
        __pyx_methods_7pyarrow_3lib_LoggingMemoryPool, /*tp_methods*/
        0, /*tp_members*/
        0, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        __pyx_pw_7pyarrow_3lib_17LoggingMemoryPool_1__init__, /*tp_init*/
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib_LoggingMemoryPool, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif
      static struct __pyx_vtabstruct_7pyarrow_3lib_ProxyMemoryPool __pyx_vtable_7pyarrow_3lib_ProxyMemoryPool;

      static PyObject *__pyx_tp_new_7pyarrow_3lib_ProxyMemoryPool(PyTypeObject *t, PyObject *a, PyObject *k) {
        struct __pyx_obj_7pyarrow_3lib_ProxyMemoryPool *p;
        PyObject *o = __pyx_tp_new_7pyarrow_3lib_MemoryPool(t, a, k);
        if (unlikely(!o)) return 0;
        p = ((struct __pyx_obj_7pyarrow_3lib_ProxyMemoryPool *)o);
        p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_MemoryPool*)__pyx_vtabptr_7pyarrow_3lib_ProxyMemoryPool;
        __Pyx_default_placement_construct(&(p->proxy_pool));
        return o;
      }

      static void __pyx_tp_dealloc_7pyarrow_3lib_ProxyMemoryPool(PyObject *o) {
        struct __pyx_obj_7pyarrow_3lib_ProxyMemoryPool *p = (struct __pyx_obj_7pyarrow_3lib_ProxyMemoryPool *)o;
        #if CYTHON_USE_TP_FINALIZE
        if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) {
          if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_7pyarrow_3lib_ProxyMemoryPool) {
            if (PyObject_CallFinalizerFromDealloc(o)) return;
          }
        }
        #endif
        __Pyx_call_destructor(p->proxy_pool);
        __pyx_tp_dealloc_7pyarrow_3lib__Weakrefable(o);
      }

      static PyMethodDef __pyx_methods_7pyarrow_3lib_ProxyMemoryPool[] = {
        {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15ProxyMemoryPool_3__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15ProxyMemoryPool_2__reduce_cython__},
        {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15ProxyMemoryPool_5__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15ProxyMemoryPool_4__setstate_cython__},
        {0, 0, 0, 0}
      };
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib_ProxyMemoryPool_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_ProxyMemoryPool},
        {Py_tp_doc, (void *)PyDoc_STR("ProxyMemoryPool()\n\nMemory pool implementation that tracks the number of bytes and\nmaximum memory allocated through its direct calls, while redirecting\nto another memory pool.")},
        {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_ProxyMemoryPool},
        {Py_tp_init, (void *)__pyx_pw_7pyarrow_3lib_15ProxyMemoryPool_1__init__},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_ProxyMemoryPool},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib_ProxyMemoryPool_spec = {
        "pyarrow.lib.ProxyMemoryPool",
        sizeof(struct __pyx_obj_7pyarrow_3lib_ProxyMemoryPool),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
        __pyx_type_7pyarrow_3lib_ProxyMemoryPool_slots,
      };
      #else

      static PyTypeObject __pyx_type_7pyarrow_3lib_ProxyMemoryPool = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""ProxyMemoryPool", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib_ProxyMemoryPool), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib_ProxyMemoryPool, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_10MemoryPool_15__repr__, /*tp_repr*/
        #else
        0, /*tp_repr*/
        #endif
        0, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        0, /*tp_str*/
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
        PyDoc_STR("ProxyMemoryPool()\n\nMemory pool implementation that tracks the number of bytes and\nmaximum memory allocated through its direct calls, while redirecting\nto another memory pool."), /*tp_doc*/
        0, /*tp_traverse*/
        0, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        0, /*tp_iter*/
        0, /*tp_iternext*/
        __pyx_methods_7pyarrow_3lib_ProxyMemoryPool, /*tp_methods*/
        0, /*tp_members*/
        0, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        __pyx_pw_7pyarrow_3lib_15ProxyMemoryPool_1__init__, /*tp_init*/
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib_ProxyMemoryPool, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif
      static struct __pyx_vtabstruct_7pyarrow_3lib_UnionType __pyx_vtable_7pyarrow_3lib_UnionType;

      static PyObject *__pyx_tp_new_7pyarrow_3lib_UnionType(PyTypeObject *t, PyObject *a, PyObject *k) {
        struct __pyx_obj_7pyarrow_3lib_UnionType *p;
        PyObject *o = __pyx_tp_new_7pyarrow_3lib_DataType(t, a, k);
        if (unlikely(!o)) return 0;
        p = ((struct __pyx_obj_7pyarrow_3lib_UnionType *)o);
        p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_DataType*)__pyx_vtabptr_7pyarrow_3lib_UnionType;
        return o;
      }

      static PyObject *__pyx_sq_item_7pyarrow_3lib_UnionType(PyObject *o, Py_ssize_t i) {
        PyObject *r;
        PyObject *x = PyLong_FromSsize_t(i); if(!x) return 0;
        #if CYTHON_USE_TYPE_SLOTS || (!CYTHON_USE_TYPE_SPECS && __PYX_LIMITED_VERSION_HEX < 0x030A0000)
        r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
        #else
        r = ((binaryfunc)PyType_GetSlot(Py_TYPE(o), Py_mp_subscript))(o, x);
        #endif
        Py_DECREF(x);
        return r;
      }

      static PyObject *__pyx_getprop_7pyarrow_3lib_9UnionType_mode(PyObject *o, CYTHON_UNUSED void *x) {
        return __pyx_pw_7pyarrow_3lib_9UnionType_4mode_1__get__(o);
      }

      static PyObject *__pyx_getprop_7pyarrow_3lib_9UnionType_type_codes(PyObject *o, CYTHON_UNUSED void *x) {
        return __pyx_pw_7pyarrow_3lib_9UnionType_10type_codes_1__get__(o);
      }

      static PyMethodDef __pyx_methods_7pyarrow_3lib_UnionType[] = {
        {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_9UnionType_10__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_9UnionType_9__reduce__},
        {0, 0, 0, 0}
      };

      static struct PyGetSetDef __pyx_getsets_7pyarrow_3lib_UnionType[] = {
        {"mode", __pyx_getprop_7pyarrow_3lib_9UnionType_mode, 0, PyDoc_STR("\n        The mode of the union (\"dense\" or \"sparse\").\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> union = pa.sparse_union([pa.field('a', pa.binary(10)), pa.field('b', pa.string())])\n        >>> union.mode\n        'sparse'\n        "), 0},
        {"type_codes", __pyx_getprop_7pyarrow_3lib_9UnionType_type_codes, 0, PyDoc_STR("\n        The type code to indicate each data type in this union.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> union = pa.sparse_union([pa.field('a', pa.binary(10)), pa.field('b', pa.string())])\n        >>> union.type_codes\n        [0, 1]\n        "), 0},
        {0, 0, 0, 0, 0}
      };
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib_UnionType_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_DataType},
        {Py_sq_length, (void *)__pyx_pw_7pyarrow_3lib_9UnionType_1__len__},
        {Py_sq_item, (void *)__pyx_sq_item_7pyarrow_3lib_UnionType},
        {Py_mp_length, (void *)__pyx_pw_7pyarrow_3lib_9UnionType_1__len__},
        {Py_mp_subscript, (void *)__pyx_pw_7pyarrow_3lib_9UnionType_8__getitem__},
        {Py_tp_doc, (void *)PyDoc_STR("\n    Base class for union data types.\n\n    Examples\n    --------\n    Create an instance of a dense UnionType using ``pa.union``:\n\n    >>> import pyarrow as pa\n    >>> pa.union([pa.field('a', pa.binary(10)), pa.field('b', pa.string())],\n    ...          mode=pa.lib.UnionMode_DENSE),\n    (DenseUnionType(dense_union<a: fixed_size_binary[10]=0, b: string=1>),)\n\n    Create an instance of a dense UnionType using ``pa.dense_union``:\n\n    >>> pa.dense_union([pa.field('a', pa.binary(10)), pa.field('b', pa.string())])\n    DenseUnionType(dense_union<a: fixed_size_binary[10]=0, b: string=1>)\n\n    Create an instance of a sparse UnionType using ``pa.union``:\n\n    >>> pa.union([pa.field('a', pa.binary(10)), pa.field('b', pa.string())],\n    ...          mode=pa.lib.UnionMode_SPARSE),\n    (SparseUnionType(sparse_union<a: fixed_size_binary[10]=0, b: string=1>),)\n\n    Create an instance of a sparse UnionType using ``pa.sparse_union``:\n\n    >>> pa.sparse_union([pa.field('a', pa.binary(10)), pa.field('b', pa.string())])\n    SparseUnionType(sparse_union<a: fixed_size_binary[10]=0, b: string=1>)\n    ")},
        {Py_tp_iter, (void *)__pyx_pw_7pyarrow_3lib_9UnionType_3__iter__},
        {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_UnionType},
        {Py_tp_getset, (void *)__pyx_getsets_7pyarrow_3lib_UnionType},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_UnionType},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib_UnionType_spec = {
        "pyarrow.lib.UnionType",
        sizeof(struct __pyx_obj_7pyarrow_3lib_UnionType),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
        __pyx_type_7pyarrow_3lib_UnionType_slots,
      };
      #else

      static PySequenceMethods __pyx_tp_as_sequence_UnionType = {
        __pyx_pw_7pyarrow_3lib_9UnionType_1__len__, /*sq_length*/
        0, /*sq_concat*/
        0, /*sq_repeat*/
        __pyx_sq_item_7pyarrow_3lib_UnionType, /*sq_item*/
        0, /*sq_slice*/
        0, /*sq_ass_item*/
        0, /*sq_ass_slice*/
        0, /*sq_contains*/
        0, /*sq_inplace_concat*/
        0, /*sq_inplace_repeat*/
      };

      static PyMappingMethods __pyx_tp_as_mapping_UnionType = {
        __pyx_pw_7pyarrow_3lib_9UnionType_1__len__, /*mp_length*/
        __pyx_pw_7pyarrow_3lib_9UnionType_8__getitem__, /*mp_subscript*/
        0, /*mp_ass_subscript*/
      };

      static PyTypeObject __pyx_type_7pyarrow_3lib_UnionType = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""UnionType", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib_UnionType), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib_DataType, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_8DataType_13__repr__, /*tp_repr*/
        #else
        0, /*tp_repr*/
        #endif
        0, /*tp_as_number*/
        &__pyx_tp_as_sequence_UnionType, /*tp_as_sequence*/
        &__pyx_tp_as_mapping_UnionType, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_8DataType_7__str__, /*tp_str*/
        #else
        0, /*tp_str*/
        #endif
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
        PyDoc_STR("\n    Base class for union data types.\n\n    Examples\n    --------\n    Create an instance of a dense UnionType using ``pa.union``:\n\n    >>> import pyarrow as pa\n    >>> pa.union([pa.field('a', pa.binary(10)), pa.field('b', pa.string())],\n    ...          mode=pa.lib.UnionMode_DENSE),\n    (DenseUnionType(dense_union<a: fixed_size_binary[10]=0, b: string=1>),)\n\n    Create an instance of a dense UnionType using ``pa.dense_union``:\n\n    >>> pa.dense_union([pa.field('a', pa.binary(10)), pa.field('b', pa.string())])\n    DenseUnionType(dense_union<a: fixed_size_binary[10]=0, b: string=1>)\n\n    Create an instance of a sparse UnionType using ``pa.union``:\n\n    >>> pa.union([pa.field('a', pa.binary(10)), pa.field('b', pa.string())],\n    ...          mode=pa.lib.UnionMode_SPARSE),\n    (SparseUnionType(sparse_union<a: fixed_size_binary[10]=0, b: string=1>),)\n\n    Create an instance of a sparse UnionType using ``pa.sparse_union``:\n\n    >>> pa.sparse_union([pa.field('a', pa.binary(10)), pa.field('b', pa.string())])\n    SparseUnionType(sparse_union<a: fixed_size_binary[10]=0, b: string=1>)\n    "), /*tp_doc*/
        0, /*tp_traverse*/
        0, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        __pyx_pw_7pyarrow_3lib_9UnionType_3__iter__, /*tp_iter*/
        0, /*tp_iternext*/
        __pyx_methods_7pyarrow_3lib_UnionType, /*tp_methods*/
        0, /*tp_members*/
        __pyx_getsets_7pyarrow_3lib_UnionType, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_8DataType_3__init__, /*tp_init*/
        #else
        0, /*tp_init*/
        #endif
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib_UnionType, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif
      static struct __pyx_vtabstruct_7pyarrow_3lib_SparseUnionType __pyx_vtable_7pyarrow_3lib_SparseUnionType;

      static PyObject *__pyx_tp_new_7pyarrow_3lib_SparseUnionType(PyTypeObject *t, PyObject *a, PyObject *k) {
        struct __pyx_obj_7pyarrow_3lib_SparseUnionType *p;
        PyObject *o = __pyx_tp_new_7pyarrow_3lib_UnionType(t, a, k);
        if (unlikely(!o)) return 0;
        p = ((struct __pyx_obj_7pyarrow_3lib_SparseUnionType *)o);
        p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_DataType*)__pyx_vtabptr_7pyarrow_3lib_SparseUnionType;
        return o;
      }
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib_SparseUnionType_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_DataType},
        {Py_tp_doc, (void *)PyDoc_STR("\n    Concrete class for sparse union types.\n\n    Examples\n    --------\n    Create an instance of a sparse UnionType using ``pa.union``:\n\n    >>> import pyarrow as pa\n    >>> pa.union([pa.field('a', pa.binary(10)), pa.field('b', pa.string())],\n    ...          mode=pa.lib.UnionMode_SPARSE),\n    (SparseUnionType(sparse_union<a: fixed_size_binary[10]=0, b: string=1>),)\n\n    Create an instance of a sparse UnionType using ``pa.sparse_union``:\n\n    >>> pa.sparse_union([pa.field('a', pa.binary(10)), pa.field('b', pa.string())])\n    SparseUnionType(sparse_union<a: fixed_size_binary[10]=0, b: string=1>)\n    ")},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_SparseUnionType},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib_SparseUnionType_spec = {
        "pyarrow.lib.SparseUnionType",
        sizeof(struct __pyx_obj_7pyarrow_3lib_SparseUnionType),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
        __pyx_type_7pyarrow_3lib_SparseUnionType_slots,
      };
      #else

      static PyTypeObject __pyx_type_7pyarrow_3lib_SparseUnionType = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""SparseUnionType", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib_SparseUnionType), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib_DataType, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_8DataType_13__repr__, /*tp_repr*/
        #else
        0, /*tp_repr*/
        #endif
        0, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_8DataType_7__str__, /*tp_str*/
        #else
        0, /*tp_str*/
        #endif
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
        PyDoc_STR("\n    Concrete class for sparse union types.\n\n    Examples\n    --------\n    Create an instance of a sparse UnionType using ``pa.union``:\n\n    >>> import pyarrow as pa\n    >>> pa.union([pa.field('a', pa.binary(10)), pa.field('b', pa.string())],\n    ...          mode=pa.lib.UnionMode_SPARSE),\n    (SparseUnionType(sparse_union<a: fixed_size_binary[10]=0, b: string=1>),)\n\n    Create an instance of a sparse UnionType using ``pa.sparse_union``:\n\n    >>> pa.sparse_union([pa.field('a', pa.binary(10)), pa.field('b', pa.string())])\n    SparseUnionType(sparse_union<a: fixed_size_binary[10]=0, b: string=1>)\n    "), /*tp_doc*/
        0, /*tp_traverse*/
        0, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_9UnionType_3__iter__, /*tp_iter*/
        #else
        0, /*tp_iter*/
        #endif
        0, /*tp_iternext*/
        0, /*tp_methods*/
        0, /*tp_members*/
        0, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_8DataType_3__init__, /*tp_init*/
        #else
        0, /*tp_init*/
        #endif
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib_SparseUnionType, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif
      static struct __pyx_vtabstruct_7pyarrow_3lib_DenseUnionType __pyx_vtable_7pyarrow_3lib_DenseUnionType;

      static PyObject *__pyx_tp_new_7pyarrow_3lib_DenseUnionType(PyTypeObject *t, PyObject *a, PyObject *k) {
        struct __pyx_obj_7pyarrow_3lib_DenseUnionType *p;
        PyObject *o = __pyx_tp_new_7pyarrow_3lib_UnionType(t, a, k);
        if (unlikely(!o)) return 0;
        p = ((struct __pyx_obj_7pyarrow_3lib_DenseUnionType *)o);
        p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_DataType*)__pyx_vtabptr_7pyarrow_3lib_DenseUnionType;
        return o;
      }
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib_DenseUnionType_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_DataType},
        {Py_tp_doc, (void *)PyDoc_STR("\n    Concrete class for dense union types.\n\n    Examples\n    --------\n    Create an instance of a dense UnionType using ``pa.union``:\n\n    >>> import pyarrow as pa\n    >>> pa.union([pa.field('a', pa.binary(10)), pa.field('b', pa.string())],\n    ...          mode=pa.lib.UnionMode_DENSE),\n    (DenseUnionType(dense_union<a: fixed_size_binary[10]=0, b: string=1>),)\n\n    Create an instance of a dense UnionType using ``pa.dense_union``:\n\n    >>> pa.dense_union([pa.field('a', pa.binary(10)), pa.field('b', pa.string())])\n    DenseUnionType(dense_union<a: fixed_size_binary[10]=0, b: string=1>)\n    ")},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_DenseUnionType},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib_DenseUnionType_spec = {
        "pyarrow.lib.DenseUnionType",
        sizeof(struct __pyx_obj_7pyarrow_3lib_DenseUnionType),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
        __pyx_type_7pyarrow_3lib_DenseUnionType_slots,
      };
      #else

      static PyTypeObject __pyx_type_7pyarrow_3lib_DenseUnionType = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""DenseUnionType", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib_DenseUnionType), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib_DataType, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_8DataType_13__repr__, /*tp_repr*/
        #else
        0, /*tp_repr*/
        #endif
        0, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_8DataType_7__str__, /*tp_str*/
        #else
        0, /*tp_str*/
        #endif
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
        PyDoc_STR("\n    Concrete class for dense union types.\n\n    Examples\n    --------\n    Create an instance of a dense UnionType using ``pa.union``:\n\n    >>> import pyarrow as pa\n    >>> pa.union([pa.field('a', pa.binary(10)), pa.field('b', pa.string())],\n    ...          mode=pa.lib.UnionMode_DENSE),\n    (DenseUnionType(dense_union<a: fixed_size_binary[10]=0, b: string=1>),)\n\n    Create an instance of a dense UnionType using ``pa.dense_union``:\n\n    >>> pa.dense_union([pa.field('a', pa.binary(10)), pa.field('b', pa.string())])\n    DenseUnionType(dense_union<a: fixed_size_binary[10]=0, b: string=1>)\n    "), /*tp_doc*/
        0, /*tp_traverse*/
        0, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_9UnionType_3__iter__, /*tp_iter*/
        #else
        0, /*tp_iter*/
        #endif
        0, /*tp_iternext*/
        0, /*tp_methods*/
        0, /*tp_members*/
        0, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_8DataType_3__init__, /*tp_init*/
        #else
        0, /*tp_init*/
        #endif
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib_DenseUnionType, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif
      static struct __pyx_vtabstruct_7pyarrow_3lib_UnknownExtensionType __pyx_vtable_7pyarrow_3lib_UnknownExtensionType;

      static PyObject *__pyx_tp_new_7pyarrow_3lib_UnknownExtensionType(PyTypeObject *t, PyObject *a, PyObject *k) {
        struct __pyx_obj_7pyarrow_3lib_UnknownExtensionType *p;
        PyObject *o = __pyx_tp_new_7pyarrow_3lib_ExtensionType(t, a, k);
        if (unlikely(!o)) return 0;
        p = ((struct __pyx_obj_7pyarrow_3lib_UnknownExtensionType *)o);
        p->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_DataType*)__pyx_vtabptr_7pyarrow_3lib_UnknownExtensionType;
        p->serialized = ((PyObject*)Py_None); Py_INCREF(Py_None);
        return o;
      }

      static void __pyx_tp_dealloc_7pyarrow_3lib_UnknownExtensionType(PyObject *o) {
        struct __pyx_obj_7pyarrow_3lib_UnknownExtensionType *p = (struct __pyx_obj_7pyarrow_3lib_UnknownExtensionType *)o;
        #if CYTHON_USE_TP_FINALIZE
        if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) {
          if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_7pyarrow_3lib_UnknownExtensionType) {
            if (PyObject_CallFinalizerFromDealloc(o)) return;
          }
        }
        #endif
        Py_CLEAR(p->serialized);
        __pyx_tp_dealloc_7pyarrow_3lib_DataType(o);
      }

      static PyMethodDef __pyx_methods_7pyarrow_3lib_UnknownExtensionType[] = {
        {"__arrow_ext_serialize__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_20UnknownExtensionType_3__arrow_ext_serialize__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_20UnknownExtensionType_2__arrow_ext_serialize__},
        {"__arrow_ext_deserialize__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_20UnknownExtensionType_5__arrow_ext_deserialize__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_20UnknownExtensionType_4__arrow_ext_deserialize__},
        {0, 0, 0, 0}
      };
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib_UnknownExtensionType_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_UnknownExtensionType},
        {Py_tp_doc, (void *)PyDoc_STR("UnknownExtensionType(DataType storage_type, serialized)\n\nA concrete class for Python-defined extension types that refer to\nan unknown Python implementation.\n\nParameters\n----------\nstorage_type : DataType\n    The storage type for which the extension is built.\nserialized : bytes\n    The serialised output.")},
        {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_UnknownExtensionType},
        {Py_tp_init, (void *)__pyx_pw_7pyarrow_3lib_20UnknownExtensionType_1__init__},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_UnknownExtensionType},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib_UnknownExtensionType_spec = {
        "pyarrow.lib.UnknownExtensionType",
        sizeof(struct __pyx_obj_7pyarrow_3lib_UnknownExtensionType),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
        __pyx_type_7pyarrow_3lib_UnknownExtensionType_slots,
      };
      #else

      static PyTypeObject __pyx_type_7pyarrow_3lib_UnknownExtensionType = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""UnknownExtensionType", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib_UnknownExtensionType), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib_UnknownExtensionType, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_13ExtensionType_7__repr__, /*tp_repr*/
        #else
        0, /*tp_repr*/
        #endif
        0, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_8DataType_7__str__, /*tp_str*/
        #else
        0, /*tp_str*/
        #endif
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
        PyDoc_STR("UnknownExtensionType(DataType storage_type, serialized)\n\nA concrete class for Python-defined extension types that refer to\nan unknown Python implementation.\n\nParameters\n----------\nstorage_type : DataType\n    The storage type for which the extension is built.\nserialized : bytes\n    The serialised output."), /*tp_doc*/
        0, /*tp_traverse*/
        0, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        0, /*tp_iter*/
        0, /*tp_iternext*/
        __pyx_methods_7pyarrow_3lib_UnknownExtensionType, /*tp_methods*/
        0, /*tp_members*/
        0, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        __pyx_pw_7pyarrow_3lib_20UnknownExtensionType_1__init__, /*tp_init*/
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib_UnknownExtensionType, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif

      static PyObject *__pyx_tp_new_7pyarrow_3lib__ExtensionRegistryNanny(PyTypeObject *t, PyObject *a, PyObject *k) {
        struct __pyx_obj_7pyarrow_3lib__ExtensionRegistryNanny *p;
        PyObject *o = __pyx_tp_new_7pyarrow_3lib__Weakrefable(t, a, k);
        if (unlikely(!o)) return 0;
        p = ((struct __pyx_obj_7pyarrow_3lib__ExtensionRegistryNanny *)o);
        __Pyx_default_placement_construct(&(p->registry));
        if (unlikely(__pyx_pw_7pyarrow_3lib_23_ExtensionRegistryNanny_1__cinit__(o, __pyx_mstate_global->__pyx_empty_tuple, NULL) < 0)) goto bad;
        return o;
        bad:
        Py_DECREF(o); o = 0;
        return NULL;
      }

      static void __pyx_tp_dealloc_7pyarrow_3lib__ExtensionRegistryNanny(PyObject *o) {
        struct __pyx_obj_7pyarrow_3lib__ExtensionRegistryNanny *p = (struct __pyx_obj_7pyarrow_3lib__ExtensionRegistryNanny *)o;
        #if CYTHON_USE_TP_FINALIZE
        if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) {
          if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_7pyarrow_3lib__ExtensionRegistryNanny) {
            if (PyObject_CallFinalizerFromDealloc(o)) return;
          }
        }
        #endif
        __Pyx_call_destructor(p->registry);
        __pyx_tp_dealloc_7pyarrow_3lib__Weakrefable(o);
      }

      static PyMethodDef __pyx_methods_7pyarrow_3lib__ExtensionRegistryNanny[] = {
        {"release_registry", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_23_ExtensionRegistryNanny_3release_registry, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_23_ExtensionRegistryNanny_2release_registry},
        {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_23_ExtensionRegistryNanny_5__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_23_ExtensionRegistryNanny_4__reduce_cython__},
        {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_23_ExtensionRegistryNanny_7__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_23_ExtensionRegistryNanny_6__setstate_cython__},
        {0, 0, 0, 0}
      };
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib__ExtensionRegistryNanny_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib__ExtensionRegistryNanny},
        {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib__ExtensionRegistryNanny},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib__ExtensionRegistryNanny},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib__ExtensionRegistryNanny_spec = {
        "pyarrow.lib._ExtensionRegistryNanny",
        sizeof(struct __pyx_obj_7pyarrow_3lib__ExtensionRegistryNanny),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
        __pyx_type_7pyarrow_3lib__ExtensionRegistryNanny_slots,
      };
      #else

      static PyTypeObject __pyx_type_7pyarrow_3lib__ExtensionRegistryNanny = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""_ExtensionRegistryNanny", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib__ExtensionRegistryNanny), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib__ExtensionRegistryNanny, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        0, /*tp_repr*/
        0, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        0, /*tp_str*/
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
        0, /*tp_doc*/
        0, /*tp_traverse*/
        0, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        0, /*tp_iter*/
        0, /*tp_iternext*/
        __pyx_methods_7pyarrow_3lib__ExtensionRegistryNanny, /*tp_methods*/
        0, /*tp_members*/
        0, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        0, /*tp_init*/
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib__ExtensionRegistryNanny, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif
      static struct __pyx_vtabstruct_7pyarrow_3lib_NullScalar __pyx_vtable_7pyarrow_3lib_NullScalar;

      static PyObject *__pyx_tp_new_7pyarrow_3lib_NullScalar(PyTypeObject *t, PyObject *a, PyObject *k) {
        struct __pyx_obj_7pyarrow_3lib_NullScalar *p;
        PyObject *o = __pyx_tp_new_7pyarrow_3lib_Scalar(t, a, k);
        if (unlikely(!o)) return 0;
        p = ((struct __pyx_obj_7pyarrow_3lib_NullScalar *)o);
        p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_Scalar*)__pyx_vtabptr_7pyarrow_3lib_NullScalar;
        if (unlikely(__pyx_pw_7pyarrow_3lib_10NullScalar_1__cinit__(o, __pyx_mstate_global->__pyx_empty_tuple, NULL) < 0)) goto bad;
        return o;
        bad:
        Py_DECREF(o); o = 0;
        return NULL;
      }

      static PyMethodDef __pyx_methods_7pyarrow_3lib_NullScalar[] = {
        {"as_py", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10NullScalar_5as_py, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10NullScalar_4as_py},
        {0, 0, 0, 0}
      };
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib_NullScalar_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_Scalar},
        {Py_tp_doc, (void *)PyDoc_STR("NullScalar()\n\nConcrete class for null scalars.")},
        {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_NullScalar},
        {Py_tp_init, (void *)__pyx_pw_7pyarrow_3lib_10NullScalar_3__init__},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_NullScalar},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib_NullScalar_spec = {
        "pyarrow.lib.NullScalar",
        sizeof(struct __pyx_obj_7pyarrow_3lib_NullScalar),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
        __pyx_type_7pyarrow_3lib_NullScalar_slots,
      };
      #else

      static PyTypeObject __pyx_type_7pyarrow_3lib_NullScalar = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""NullScalar", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib_NullScalar), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib_Scalar, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_7__repr__, /*tp_repr*/
        #else
        0, /*tp_repr*/
        #endif
        0, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_9__str__, /*tp_str*/
        #else
        0, /*tp_str*/
        #endif
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
        PyDoc_STR("NullScalar()\n\nConcrete class for null scalars."), /*tp_doc*/
        0, /*tp_traverse*/
        0, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        0, /*tp_iter*/
        0, /*tp_iternext*/
        __pyx_methods_7pyarrow_3lib_NullScalar, /*tp_methods*/
        0, /*tp_members*/
        0, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        __pyx_pw_7pyarrow_3lib_10NullScalar_3__init__, /*tp_init*/
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib_NullScalar, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif
      static struct __pyx_vtabstruct_7pyarrow_3lib_BooleanScalar __pyx_vtable_7pyarrow_3lib_BooleanScalar;

      static PyObject *__pyx_tp_new_7pyarrow_3lib_BooleanScalar(PyTypeObject *t, PyObject *a, PyObject *k) {
        struct __pyx_obj_7pyarrow_3lib_BooleanScalar *p;
        PyObject *o = __pyx_tp_new_7pyarrow_3lib_Scalar(t, a, k);
        if (unlikely(!o)) return 0;
        p = ((struct __pyx_obj_7pyarrow_3lib_BooleanScalar *)o);
        p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_Scalar*)__pyx_vtabptr_7pyarrow_3lib_BooleanScalar;
        return o;
      }

      static PyMethodDef __pyx_methods_7pyarrow_3lib_BooleanScalar[] = {
        {"as_py", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_13BooleanScalar_1as_py, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_13BooleanScalar_as_py},
        {0, 0, 0, 0}
      };
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib_BooleanScalar_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_Scalar},
        {Py_nb_bool, (void *)__pyx_pw_7pyarrow_3lib_13BooleanScalar_3__bool__},
        {Py_tp_doc, (void *)PyDoc_STR("\n    Concrete class for boolean scalars.\n    ")},
        {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_BooleanScalar},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_BooleanScalar},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib_BooleanScalar_spec = {
        "pyarrow.lib.BooleanScalar",
        sizeof(struct __pyx_obj_7pyarrow_3lib_BooleanScalar),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
        __pyx_type_7pyarrow_3lib_BooleanScalar_slots,
      };
      #else

      static PyNumberMethods __pyx_tp_as_number_BooleanScalar = {
        0, /*nb_add*/
        0, /*nb_subtract*/
        0, /*nb_multiply*/
        0, /*nb_remainder*/
        0, /*nb_divmod*/
        0, /*nb_power*/
        0, /*nb_negative*/
        0, /*nb_positive*/
        0, /*nb_absolute*/
        __pyx_pw_7pyarrow_3lib_13BooleanScalar_3__bool__, /*nb_bool*/
        0, /*nb_invert*/
        0, /*nb_lshift*/
        0, /*nb_rshift*/
        0, /*nb_and*/
        0, /*nb_xor*/
        0, /*nb_or*/
        0, /*nb_int*/
        0, /*nb_long (reserved)*/
        0, /*nb_float*/
        0, /*nb_inplace_add*/
        0, /*nb_inplace_subtract*/
        0, /*nb_inplace_multiply*/
        0, /*nb_inplace_remainder*/
        0, /*nb_inplace_power*/
        0, /*nb_inplace_lshift*/
        0, /*nb_inplace_rshift*/
        0, /*nb_inplace_and*/
        0, /*nb_inplace_xor*/
        0, /*nb_inplace_or*/
        0, /*nb_floor_divide*/
        0, /*nb_true_divide*/
        0, /*nb_inplace_floor_divide*/
        0, /*nb_inplace_true_divide*/
        0, /*nb_index*/
        0, /*nb_matrix_multiply*/
        0, /*nb_inplace_matrix_multiply*/
      };

      static PyTypeObject __pyx_type_7pyarrow_3lib_BooleanScalar = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""BooleanScalar", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib_BooleanScalar), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib_Scalar, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_7__repr__, /*tp_repr*/
        #else
        0, /*tp_repr*/
        #endif
        &__pyx_tp_as_number_BooleanScalar, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_9__str__, /*tp_str*/
        #else
        0, /*tp_str*/
        #endif
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
        PyDoc_STR("\n    Concrete class for boolean scalars.\n    "), /*tp_doc*/
        0, /*tp_traverse*/
        0, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        0, /*tp_iter*/
        0, /*tp_iternext*/
        __pyx_methods_7pyarrow_3lib_BooleanScalar, /*tp_methods*/
        0, /*tp_members*/
        0, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_1__init__, /*tp_init*/
        #else
        0, /*tp_init*/
        #endif
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib_BooleanScalar, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif
      static struct __pyx_vtabstruct_7pyarrow_3lib_UInt8Scalar __pyx_vtable_7pyarrow_3lib_UInt8Scalar;

      static PyObject *__pyx_tp_new_7pyarrow_3lib_UInt8Scalar(PyTypeObject *t, PyObject *a, PyObject *k) {
        struct __pyx_obj_7pyarrow_3lib_UInt8Scalar *p;
        PyObject *o = __pyx_tp_new_7pyarrow_3lib_Scalar(t, a, k);
        if (unlikely(!o)) return 0;
        p = ((struct __pyx_obj_7pyarrow_3lib_UInt8Scalar *)o);
        p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_Scalar*)__pyx_vtabptr_7pyarrow_3lib_UInt8Scalar;
        return o;
      }

      static PyMethodDef __pyx_methods_7pyarrow_3lib_UInt8Scalar[] = {
        {"as_py", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_11UInt8Scalar_1as_py, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_11UInt8Scalar_as_py},
        {0, 0, 0, 0}
      };
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib_UInt8Scalar_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_Scalar},
        {Py_nb_index, (void *)__pyx_pw_7pyarrow_3lib_11UInt8Scalar_3__index__},
        {Py_tp_doc, (void *)PyDoc_STR("\n    Concrete class for uint8 scalars.\n    ")},
        {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_UInt8Scalar},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_UInt8Scalar},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib_UInt8Scalar_spec = {
        "pyarrow.lib.UInt8Scalar",
        sizeof(struct __pyx_obj_7pyarrow_3lib_UInt8Scalar),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
        __pyx_type_7pyarrow_3lib_UInt8Scalar_slots,
      };
      #else

      static PyNumberMethods __pyx_tp_as_number_UInt8Scalar = {
        0, /*nb_add*/
        0, /*nb_subtract*/
        0, /*nb_multiply*/
        0, /*nb_remainder*/
        0, /*nb_divmod*/
        0, /*nb_power*/
        0, /*nb_negative*/
        0, /*nb_positive*/
        0, /*nb_absolute*/
        0, /*nb_bool*/
        0, /*nb_invert*/
        0, /*nb_lshift*/
        0, /*nb_rshift*/
        0, /*nb_and*/
        0, /*nb_xor*/
        0, /*nb_or*/
        0, /*nb_int*/
        0, /*nb_long (reserved)*/
        0, /*nb_float*/
        0, /*nb_inplace_add*/
        0, /*nb_inplace_subtract*/
        0, /*nb_inplace_multiply*/
        0, /*nb_inplace_remainder*/
        0, /*nb_inplace_power*/
        0, /*nb_inplace_lshift*/
        0, /*nb_inplace_rshift*/
        0, /*nb_inplace_and*/
        0, /*nb_inplace_xor*/
        0, /*nb_inplace_or*/
        0, /*nb_floor_divide*/
        0, /*nb_true_divide*/
        0, /*nb_inplace_floor_divide*/
        0, /*nb_inplace_true_divide*/
        __pyx_pw_7pyarrow_3lib_11UInt8Scalar_3__index__, /*nb_index*/
        0, /*nb_matrix_multiply*/
        0, /*nb_inplace_matrix_multiply*/
      };

      static PyTypeObject __pyx_type_7pyarrow_3lib_UInt8Scalar = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""UInt8Scalar", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib_UInt8Scalar), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib_Scalar, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_7__repr__, /*tp_repr*/
        #else
        0, /*tp_repr*/
        #endif
        &__pyx_tp_as_number_UInt8Scalar, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_9__str__, /*tp_str*/
        #else
        0, /*tp_str*/
        #endif
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
        PyDoc_STR("\n    Concrete class for uint8 scalars.\n    "), /*tp_doc*/
        0, /*tp_traverse*/
        0, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        0, /*tp_iter*/
        0, /*tp_iternext*/
        __pyx_methods_7pyarrow_3lib_UInt8Scalar, /*tp_methods*/
        0, /*tp_members*/
        0, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_1__init__, /*tp_init*/
        #else
        0, /*tp_init*/
        #endif
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib_UInt8Scalar, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif
      static struct __pyx_vtabstruct_7pyarrow_3lib_Int8Scalar __pyx_vtable_7pyarrow_3lib_Int8Scalar;

      static PyObject *__pyx_tp_new_7pyarrow_3lib_Int8Scalar(PyTypeObject *t, PyObject *a, PyObject *k) {
        struct __pyx_obj_7pyarrow_3lib_Int8Scalar *p;
        PyObject *o = __pyx_tp_new_7pyarrow_3lib_Scalar(t, a, k);
        if (unlikely(!o)) return 0;
        p = ((struct __pyx_obj_7pyarrow_3lib_Int8Scalar *)o);
        p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_Scalar*)__pyx_vtabptr_7pyarrow_3lib_Int8Scalar;
        return o;
      }

      static PyMethodDef __pyx_methods_7pyarrow_3lib_Int8Scalar[] = {
        {"as_py", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10Int8Scalar_1as_py, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10Int8Scalar_as_py},
        {0, 0, 0, 0}
      };
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib_Int8Scalar_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_Scalar},
        {Py_nb_index, (void *)__pyx_pw_7pyarrow_3lib_10Int8Scalar_3__index__},
        {Py_tp_doc, (void *)PyDoc_STR("\n    Concrete class for int8 scalars.\n    ")},
        {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_Int8Scalar},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_Int8Scalar},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib_Int8Scalar_spec = {
        "pyarrow.lib.Int8Scalar",
        sizeof(struct __pyx_obj_7pyarrow_3lib_Int8Scalar),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
        __pyx_type_7pyarrow_3lib_Int8Scalar_slots,
      };
      #else

      static PyNumberMethods __pyx_tp_as_number_Int8Scalar = {
        0, /*nb_add*/
        0, /*nb_subtract*/
        0, /*nb_multiply*/
        0, /*nb_remainder*/
        0, /*nb_divmod*/
        0, /*nb_power*/
        0, /*nb_negative*/
        0, /*nb_positive*/
        0, /*nb_absolute*/
        0, /*nb_bool*/
        0, /*nb_invert*/
        0, /*nb_lshift*/
        0, /*nb_rshift*/
        0, /*nb_and*/
        0, /*nb_xor*/
        0, /*nb_or*/
        0, /*nb_int*/
        0, /*nb_long (reserved)*/
        0, /*nb_float*/
        0, /*nb_inplace_add*/
        0, /*nb_inplace_subtract*/
        0, /*nb_inplace_multiply*/
        0, /*nb_inplace_remainder*/
        0, /*nb_inplace_power*/
        0, /*nb_inplace_lshift*/
        0, /*nb_inplace_rshift*/
        0, /*nb_inplace_and*/
        0, /*nb_inplace_xor*/
        0, /*nb_inplace_or*/
        0, /*nb_floor_divide*/
        0, /*nb_true_divide*/
        0, /*nb_inplace_floor_divide*/
        0, /*nb_inplace_true_divide*/
        __pyx_pw_7pyarrow_3lib_10Int8Scalar_3__index__, /*nb_index*/
        0, /*nb_matrix_multiply*/
        0, /*nb_inplace_matrix_multiply*/
      };

      static PyTypeObject __pyx_type_7pyarrow_3lib_Int8Scalar = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""Int8Scalar", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib_Int8Scalar), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib_Scalar, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_7__repr__, /*tp_repr*/
        #else
        0, /*tp_repr*/
        #endif
        &__pyx_tp_as_number_Int8Scalar, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_9__str__, /*tp_str*/
        #else
        0, /*tp_str*/
        #endif
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
        PyDoc_STR("\n    Concrete class for int8 scalars.\n    "), /*tp_doc*/
        0, /*tp_traverse*/
        0, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        0, /*tp_iter*/
        0, /*tp_iternext*/
        __pyx_methods_7pyarrow_3lib_Int8Scalar, /*tp_methods*/
        0, /*tp_members*/
        0, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_1__init__, /*tp_init*/
        #else
        0, /*tp_init*/
        #endif
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib_Int8Scalar, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif
      static struct __pyx_vtabstruct_7pyarrow_3lib_UInt16Scalar __pyx_vtable_7pyarrow_3lib_UInt16Scalar;

      static PyObject *__pyx_tp_new_7pyarrow_3lib_UInt16Scalar(PyTypeObject *t, PyObject *a, PyObject *k) {
        struct __pyx_obj_7pyarrow_3lib_UInt16Scalar *p;
        PyObject *o = __pyx_tp_new_7pyarrow_3lib_Scalar(t, a, k);
        if (unlikely(!o)) return 0;
        p = ((struct __pyx_obj_7pyarrow_3lib_UInt16Scalar *)o);
        p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_Scalar*)__pyx_vtabptr_7pyarrow_3lib_UInt16Scalar;
        return o;
      }

      static PyMethodDef __pyx_methods_7pyarrow_3lib_UInt16Scalar[] = {
        {"as_py", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12UInt16Scalar_1as_py, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12UInt16Scalar_as_py},
        {0, 0, 0, 0}
      };
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib_UInt16Scalar_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_Scalar},
        {Py_nb_index, (void *)__pyx_pw_7pyarrow_3lib_12UInt16Scalar_3__index__},
        {Py_tp_doc, (void *)PyDoc_STR("\n    Concrete class for uint16 scalars.\n    ")},
        {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_UInt16Scalar},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_UInt16Scalar},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib_UInt16Scalar_spec = {
        "pyarrow.lib.UInt16Scalar",
        sizeof(struct __pyx_obj_7pyarrow_3lib_UInt16Scalar),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
        __pyx_type_7pyarrow_3lib_UInt16Scalar_slots,
      };
      #else

      static PyNumberMethods __pyx_tp_as_number_UInt16Scalar = {
        0, /*nb_add*/
        0, /*nb_subtract*/
        0, /*nb_multiply*/
        0, /*nb_remainder*/
        0, /*nb_divmod*/
        0, /*nb_power*/
        0, /*nb_negative*/
        0, /*nb_positive*/
        0, /*nb_absolute*/
        0, /*nb_bool*/
        0, /*nb_invert*/
        0, /*nb_lshift*/
        0, /*nb_rshift*/
        0, /*nb_and*/
        0, /*nb_xor*/
        0, /*nb_or*/
        0, /*nb_int*/
        0, /*nb_long (reserved)*/
        0, /*nb_float*/
        0, /*nb_inplace_add*/
        0, /*nb_inplace_subtract*/
        0, /*nb_inplace_multiply*/
        0, /*nb_inplace_remainder*/
        0, /*nb_inplace_power*/
        0, /*nb_inplace_lshift*/
        0, /*nb_inplace_rshift*/
        0, /*nb_inplace_and*/
        0, /*nb_inplace_xor*/
        0, /*nb_inplace_or*/
        0, /*nb_floor_divide*/
        0, /*nb_true_divide*/
        0, /*nb_inplace_floor_divide*/
        0, /*nb_inplace_true_divide*/
        __pyx_pw_7pyarrow_3lib_12UInt16Scalar_3__index__, /*nb_index*/
        0, /*nb_matrix_multiply*/
        0, /*nb_inplace_matrix_multiply*/
      };

      static PyTypeObject __pyx_type_7pyarrow_3lib_UInt16Scalar = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""UInt16Scalar", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib_UInt16Scalar), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib_Scalar, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_7__repr__, /*tp_repr*/
        #else
        0, /*tp_repr*/
        #endif
        &__pyx_tp_as_number_UInt16Scalar, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_9__str__, /*tp_str*/
        #else
        0, /*tp_str*/
        #endif
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
        PyDoc_STR("\n    Concrete class for uint16 scalars.\n    "), /*tp_doc*/
        0, /*tp_traverse*/
        0, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        0, /*tp_iter*/
        0, /*tp_iternext*/
        __pyx_methods_7pyarrow_3lib_UInt16Scalar, /*tp_methods*/
        0, /*tp_members*/
        0, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_1__init__, /*tp_init*/
        #else
        0, /*tp_init*/
        #endif
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib_UInt16Scalar, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif
      static struct __pyx_vtabstruct_7pyarrow_3lib_Int16Scalar __pyx_vtable_7pyarrow_3lib_Int16Scalar;

      static PyObject *__pyx_tp_new_7pyarrow_3lib_Int16Scalar(PyTypeObject *t, PyObject *a, PyObject *k) {
        struct __pyx_obj_7pyarrow_3lib_Int16Scalar *p;
        PyObject *o = __pyx_tp_new_7pyarrow_3lib_Scalar(t, a, k);
        if (unlikely(!o)) return 0;
        p = ((struct __pyx_obj_7pyarrow_3lib_Int16Scalar *)o);
        p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_Scalar*)__pyx_vtabptr_7pyarrow_3lib_Int16Scalar;
        return o;
      }

      static PyMethodDef __pyx_methods_7pyarrow_3lib_Int16Scalar[] = {
        {"as_py", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_11Int16Scalar_1as_py, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_11Int16Scalar_as_py},
        {0, 0, 0, 0}
      };
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib_Int16Scalar_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_Scalar},
        {Py_nb_index, (void *)__pyx_pw_7pyarrow_3lib_11Int16Scalar_3__index__},
        {Py_tp_doc, (void *)PyDoc_STR("\n    Concrete class for int16 scalars.\n    ")},
        {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_Int16Scalar},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_Int16Scalar},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib_Int16Scalar_spec = {
        "pyarrow.lib.Int16Scalar",
        sizeof(struct __pyx_obj_7pyarrow_3lib_Int16Scalar),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
        __pyx_type_7pyarrow_3lib_Int16Scalar_slots,
      };
      #else

      static PyNumberMethods __pyx_tp_as_number_Int16Scalar = {
        0, /*nb_add*/
        0, /*nb_subtract*/
        0, /*nb_multiply*/
        0, /*nb_remainder*/
        0, /*nb_divmod*/
        0, /*nb_power*/
        0, /*nb_negative*/
        0, /*nb_positive*/
        0, /*nb_absolute*/
        0, /*nb_bool*/
        0, /*nb_invert*/
        0, /*nb_lshift*/
        0, /*nb_rshift*/
        0, /*nb_and*/
        0, /*nb_xor*/
        0, /*nb_or*/
        0, /*nb_int*/
        0, /*nb_long (reserved)*/
        0, /*nb_float*/
        0, /*nb_inplace_add*/
        0, /*nb_inplace_subtract*/
        0, /*nb_inplace_multiply*/
        0, /*nb_inplace_remainder*/
        0, /*nb_inplace_power*/
        0, /*nb_inplace_lshift*/
        0, /*nb_inplace_rshift*/
        0, /*nb_inplace_and*/
        0, /*nb_inplace_xor*/
        0, /*nb_inplace_or*/
        0, /*nb_floor_divide*/
        0, /*nb_true_divide*/
        0, /*nb_inplace_floor_divide*/
        0, /*nb_inplace_true_divide*/
        __pyx_pw_7pyarrow_3lib_11Int16Scalar_3__index__, /*nb_index*/
        0, /*nb_matrix_multiply*/
        0, /*nb_inplace_matrix_multiply*/
      };

      static PyTypeObject __pyx_type_7pyarrow_3lib_Int16Scalar = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""Int16Scalar", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib_Int16Scalar), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib_Scalar, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_7__repr__, /*tp_repr*/
        #else
        0, /*tp_repr*/
        #endif
        &__pyx_tp_as_number_Int16Scalar, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_9__str__, /*tp_str*/
        #else
        0, /*tp_str*/
        #endif
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
        PyDoc_STR("\n    Concrete class for int16 scalars.\n    "), /*tp_doc*/
        0, /*tp_traverse*/
        0, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        0, /*tp_iter*/
        0, /*tp_iternext*/
        __pyx_methods_7pyarrow_3lib_Int16Scalar, /*tp_methods*/
        0, /*tp_members*/
        0, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_1__init__, /*tp_init*/
        #else
        0, /*tp_init*/
        #endif
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib_Int16Scalar, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif
      static struct __pyx_vtabstruct_7pyarrow_3lib_UInt32Scalar __pyx_vtable_7pyarrow_3lib_UInt32Scalar;

      static PyObject *__pyx_tp_new_7pyarrow_3lib_UInt32Scalar(PyTypeObject *t, PyObject *a, PyObject *k) {
        struct __pyx_obj_7pyarrow_3lib_UInt32Scalar *p;
        PyObject *o = __pyx_tp_new_7pyarrow_3lib_Scalar(t, a, k);
        if (unlikely(!o)) return 0;
        p = ((struct __pyx_obj_7pyarrow_3lib_UInt32Scalar *)o);
        p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_Scalar*)__pyx_vtabptr_7pyarrow_3lib_UInt32Scalar;
        return o;
      }

      static PyMethodDef __pyx_methods_7pyarrow_3lib_UInt32Scalar[] = {
        {"as_py", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12UInt32Scalar_1as_py, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12UInt32Scalar_as_py},
        {0, 0, 0, 0}
      };
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib_UInt32Scalar_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_Scalar},
        {Py_nb_index, (void *)__pyx_pw_7pyarrow_3lib_12UInt32Scalar_3__index__},
        {Py_tp_doc, (void *)PyDoc_STR("\n    Concrete class for uint32 scalars.\n    ")},
        {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_UInt32Scalar},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_UInt32Scalar},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib_UInt32Scalar_spec = {
        "pyarrow.lib.UInt32Scalar",
        sizeof(struct __pyx_obj_7pyarrow_3lib_UInt32Scalar),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
        __pyx_type_7pyarrow_3lib_UInt32Scalar_slots,
      };
      #else

      static PyNumberMethods __pyx_tp_as_number_UInt32Scalar = {
        0, /*nb_add*/
        0, /*nb_subtract*/
        0, /*nb_multiply*/
        0, /*nb_remainder*/
        0, /*nb_divmod*/
        0, /*nb_power*/
        0, /*nb_negative*/
        0, /*nb_positive*/
        0, /*nb_absolute*/
        0, /*nb_bool*/
        0, /*nb_invert*/
        0, /*nb_lshift*/
        0, /*nb_rshift*/
        0, /*nb_and*/
        0, /*nb_xor*/
        0, /*nb_or*/
        0, /*nb_int*/
        0, /*nb_long (reserved)*/
        0, /*nb_float*/
        0, /*nb_inplace_add*/
        0, /*nb_inplace_subtract*/
        0, /*nb_inplace_multiply*/
        0, /*nb_inplace_remainder*/
        0, /*nb_inplace_power*/
        0, /*nb_inplace_lshift*/
        0, /*nb_inplace_rshift*/
        0, /*nb_inplace_and*/
        0, /*nb_inplace_xor*/
        0, /*nb_inplace_or*/
        0, /*nb_floor_divide*/
        0, /*nb_true_divide*/
        0, /*nb_inplace_floor_divide*/
        0, /*nb_inplace_true_divide*/
        __pyx_pw_7pyarrow_3lib_12UInt32Scalar_3__index__, /*nb_index*/
        0, /*nb_matrix_multiply*/
        0, /*nb_inplace_matrix_multiply*/
      };

      static PyTypeObject __pyx_type_7pyarrow_3lib_UInt32Scalar = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""UInt32Scalar", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib_UInt32Scalar), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib_Scalar, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_7__repr__, /*tp_repr*/
        #else
        0, /*tp_repr*/
        #endif
        &__pyx_tp_as_number_UInt32Scalar, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_9__str__, /*tp_str*/
        #else
        0, /*tp_str*/
        #endif
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
        PyDoc_STR("\n    Concrete class for uint32 scalars.\n    "), /*tp_doc*/
        0, /*tp_traverse*/
        0, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        0, /*tp_iter*/
        0, /*tp_iternext*/
        __pyx_methods_7pyarrow_3lib_UInt32Scalar, /*tp_methods*/
        0, /*tp_members*/
        0, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_1__init__, /*tp_init*/
        #else
        0, /*tp_init*/
        #endif
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib_UInt32Scalar, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif
      static struct __pyx_vtabstruct_7pyarrow_3lib_Int32Scalar __pyx_vtable_7pyarrow_3lib_Int32Scalar;

      static PyObject *__pyx_tp_new_7pyarrow_3lib_Int32Scalar(PyTypeObject *t, PyObject *a, PyObject *k) {
        struct __pyx_obj_7pyarrow_3lib_Int32Scalar *p;
        PyObject *o = __pyx_tp_new_7pyarrow_3lib_Scalar(t, a, k);
        if (unlikely(!o)) return 0;
        p = ((struct __pyx_obj_7pyarrow_3lib_Int32Scalar *)o);
        p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_Scalar*)__pyx_vtabptr_7pyarrow_3lib_Int32Scalar;
        return o;
      }

      static PyMethodDef __pyx_methods_7pyarrow_3lib_Int32Scalar[] = {
        {"as_py", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_11Int32Scalar_1as_py, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_11Int32Scalar_as_py},
        {0, 0, 0, 0}
      };
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib_Int32Scalar_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_Scalar},
        {Py_nb_index, (void *)__pyx_pw_7pyarrow_3lib_11Int32Scalar_3__index__},
        {Py_tp_doc, (void *)PyDoc_STR("\n    Concrete class for int32 scalars.\n    ")},
        {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_Int32Scalar},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_Int32Scalar},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib_Int32Scalar_spec = {
        "pyarrow.lib.Int32Scalar",
        sizeof(struct __pyx_obj_7pyarrow_3lib_Int32Scalar),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
        __pyx_type_7pyarrow_3lib_Int32Scalar_slots,
      };
      #else

      static PyNumberMethods __pyx_tp_as_number_Int32Scalar = {
        0, /*nb_add*/
        0, /*nb_subtract*/
        0, /*nb_multiply*/
        0, /*nb_remainder*/
        0, /*nb_divmod*/
        0, /*nb_power*/
        0, /*nb_negative*/
        0, /*nb_positive*/
        0, /*nb_absolute*/
        0, /*nb_bool*/
        0, /*nb_invert*/
        0, /*nb_lshift*/
        0, /*nb_rshift*/
        0, /*nb_and*/
        0, /*nb_xor*/
        0, /*nb_or*/
        0, /*nb_int*/
        0, /*nb_long (reserved)*/
        0, /*nb_float*/
        0, /*nb_inplace_add*/
        0, /*nb_inplace_subtract*/
        0, /*nb_inplace_multiply*/
        0, /*nb_inplace_remainder*/
        0, /*nb_inplace_power*/
        0, /*nb_inplace_lshift*/
        0, /*nb_inplace_rshift*/
        0, /*nb_inplace_and*/
        0, /*nb_inplace_xor*/
        0, /*nb_inplace_or*/
        0, /*nb_floor_divide*/
        0, /*nb_true_divide*/
        0, /*nb_inplace_floor_divide*/
        0, /*nb_inplace_true_divide*/
        __pyx_pw_7pyarrow_3lib_11Int32Scalar_3__index__, /*nb_index*/
        0, /*nb_matrix_multiply*/
        0, /*nb_inplace_matrix_multiply*/
      };

      static PyTypeObject __pyx_type_7pyarrow_3lib_Int32Scalar = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""Int32Scalar", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib_Int32Scalar), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib_Scalar, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_7__repr__, /*tp_repr*/
        #else
        0, /*tp_repr*/
        #endif
        &__pyx_tp_as_number_Int32Scalar, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_9__str__, /*tp_str*/
        #else
        0, /*tp_str*/
        #endif
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
        PyDoc_STR("\n    Concrete class for int32 scalars.\n    "), /*tp_doc*/
        0, /*tp_traverse*/
        0, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        0, /*tp_iter*/
        0, /*tp_iternext*/
        __pyx_methods_7pyarrow_3lib_Int32Scalar, /*tp_methods*/
        0, /*tp_members*/
        0, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_1__init__, /*tp_init*/
        #else
        0, /*tp_init*/
        #endif
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib_Int32Scalar, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif
      static struct __pyx_vtabstruct_7pyarrow_3lib_UInt64Scalar __pyx_vtable_7pyarrow_3lib_UInt64Scalar;

      static PyObject *__pyx_tp_new_7pyarrow_3lib_UInt64Scalar(PyTypeObject *t, PyObject *a, PyObject *k) {
        struct __pyx_obj_7pyarrow_3lib_UInt64Scalar *p;
        PyObject *o = __pyx_tp_new_7pyarrow_3lib_Scalar(t, a, k);
        if (unlikely(!o)) return 0;
        p = ((struct __pyx_obj_7pyarrow_3lib_UInt64Scalar *)o);
        p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_Scalar*)__pyx_vtabptr_7pyarrow_3lib_UInt64Scalar;
        return o;
      }

      static PyMethodDef __pyx_methods_7pyarrow_3lib_UInt64Scalar[] = {
        {"as_py", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12UInt64Scalar_1as_py, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12UInt64Scalar_as_py},
        {0, 0, 0, 0}
      };
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib_UInt64Scalar_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_Scalar},
        {Py_nb_index, (void *)__pyx_pw_7pyarrow_3lib_12UInt64Scalar_3__index__},
        {Py_tp_doc, (void *)PyDoc_STR("\n    Concrete class for uint64 scalars.\n    ")},
        {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_UInt64Scalar},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_UInt64Scalar},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib_UInt64Scalar_spec = {
        "pyarrow.lib.UInt64Scalar",
        sizeof(struct __pyx_obj_7pyarrow_3lib_UInt64Scalar),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
        __pyx_type_7pyarrow_3lib_UInt64Scalar_slots,
      };
      #else

      static PyNumberMethods __pyx_tp_as_number_UInt64Scalar = {
        0, /*nb_add*/
        0, /*nb_subtract*/
        0, /*nb_multiply*/
        0, /*nb_remainder*/
        0, /*nb_divmod*/
        0, /*nb_power*/
        0, /*nb_negative*/
        0, /*nb_positive*/
        0, /*nb_absolute*/
        0, /*nb_bool*/
        0, /*nb_invert*/
        0, /*nb_lshift*/
        0, /*nb_rshift*/
        0, /*nb_and*/
        0, /*nb_xor*/
        0, /*nb_or*/
        0, /*nb_int*/
        0, /*nb_long (reserved)*/
        0, /*nb_float*/
        0, /*nb_inplace_add*/
        0, /*nb_inplace_subtract*/
        0, /*nb_inplace_multiply*/
        0, /*nb_inplace_remainder*/
        0, /*nb_inplace_power*/
        0, /*nb_inplace_lshift*/
        0, /*nb_inplace_rshift*/
        0, /*nb_inplace_and*/
        0, /*nb_inplace_xor*/
        0, /*nb_inplace_or*/
        0, /*nb_floor_divide*/
        0, /*nb_true_divide*/
        0, /*nb_inplace_floor_divide*/
        0, /*nb_inplace_true_divide*/
        __pyx_pw_7pyarrow_3lib_12UInt64Scalar_3__index__, /*nb_index*/
        0, /*nb_matrix_multiply*/
        0, /*nb_inplace_matrix_multiply*/
      };

      static PyTypeObject __pyx_type_7pyarrow_3lib_UInt64Scalar = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""UInt64Scalar", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib_UInt64Scalar), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib_Scalar, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_7__repr__, /*tp_repr*/
        #else
        0, /*tp_repr*/
        #endif
        &__pyx_tp_as_number_UInt64Scalar, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_9__str__, /*tp_str*/
        #else
        0, /*tp_str*/
        #endif
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
        PyDoc_STR("\n    Concrete class for uint64 scalars.\n    "), /*tp_doc*/
        0, /*tp_traverse*/
        0, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        0, /*tp_iter*/
        0, /*tp_iternext*/
        __pyx_methods_7pyarrow_3lib_UInt64Scalar, /*tp_methods*/
        0, /*tp_members*/
        0, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_1__init__, /*tp_init*/
        #else
        0, /*tp_init*/
        #endif
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib_UInt64Scalar, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif
      static struct __pyx_vtabstruct_7pyarrow_3lib_Int64Scalar __pyx_vtable_7pyarrow_3lib_Int64Scalar;

      static PyObject *__pyx_tp_new_7pyarrow_3lib_Int64Scalar(PyTypeObject *t, PyObject *a, PyObject *k) {
        struct __pyx_obj_7pyarrow_3lib_Int64Scalar *p;
        PyObject *o = __pyx_tp_new_7pyarrow_3lib_Scalar(t, a, k);
        if (unlikely(!o)) return 0;
        p = ((struct __pyx_obj_7pyarrow_3lib_Int64Scalar *)o);
        p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_Scalar*)__pyx_vtabptr_7pyarrow_3lib_Int64Scalar;
        return o;
      }

      static PyMethodDef __pyx_methods_7pyarrow_3lib_Int64Scalar[] = {
        {"as_py", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_11Int64Scalar_1as_py, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_11Int64Scalar_as_py},
        {0, 0, 0, 0}
      };
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib_Int64Scalar_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_Scalar},
        {Py_nb_index, (void *)__pyx_pw_7pyarrow_3lib_11Int64Scalar_3__index__},
        {Py_tp_doc, (void *)PyDoc_STR("\n    Concrete class for int64 scalars.\n    ")},
        {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_Int64Scalar},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_Int64Scalar},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib_Int64Scalar_spec = {
        "pyarrow.lib.Int64Scalar",
        sizeof(struct __pyx_obj_7pyarrow_3lib_Int64Scalar),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
        __pyx_type_7pyarrow_3lib_Int64Scalar_slots,
      };
      #else

      static PyNumberMethods __pyx_tp_as_number_Int64Scalar = {
        0, /*nb_add*/
        0, /*nb_subtract*/
        0, /*nb_multiply*/
        0, /*nb_remainder*/
        0, /*nb_divmod*/
        0, /*nb_power*/
        0, /*nb_negative*/
        0, /*nb_positive*/
        0, /*nb_absolute*/
        0, /*nb_bool*/
        0, /*nb_invert*/
        0, /*nb_lshift*/
        0, /*nb_rshift*/
        0, /*nb_and*/
        0, /*nb_xor*/
        0, /*nb_or*/
        0, /*nb_int*/
        0, /*nb_long (reserved)*/
        0, /*nb_float*/
        0, /*nb_inplace_add*/
        0, /*nb_inplace_subtract*/
        0, /*nb_inplace_multiply*/
        0, /*nb_inplace_remainder*/
        0, /*nb_inplace_power*/
        0, /*nb_inplace_lshift*/
        0, /*nb_inplace_rshift*/
        0, /*nb_inplace_and*/
        0, /*nb_inplace_xor*/
        0, /*nb_inplace_or*/
        0, /*nb_floor_divide*/
        0, /*nb_true_divide*/
        0, /*nb_inplace_floor_divide*/
        0, /*nb_inplace_true_divide*/
        __pyx_pw_7pyarrow_3lib_11Int64Scalar_3__index__, /*nb_index*/
        0, /*nb_matrix_multiply*/
        0, /*nb_inplace_matrix_multiply*/
      };

      static PyTypeObject __pyx_type_7pyarrow_3lib_Int64Scalar = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""Int64Scalar", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib_Int64Scalar), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib_Scalar, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_7__repr__, /*tp_repr*/
        #else
        0, /*tp_repr*/
        #endif
        &__pyx_tp_as_number_Int64Scalar, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_9__str__, /*tp_str*/
        #else
        0, /*tp_str*/
        #endif
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
        PyDoc_STR("\n    Concrete class for int64 scalars.\n    "), /*tp_doc*/
        0, /*tp_traverse*/
        0, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        0, /*tp_iter*/
        0, /*tp_iternext*/
        __pyx_methods_7pyarrow_3lib_Int64Scalar, /*tp_methods*/
        0, /*tp_members*/
        0, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_1__init__, /*tp_init*/
        #else
        0, /*tp_init*/
        #endif
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib_Int64Scalar, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif
      static struct __pyx_vtabstruct_7pyarrow_3lib_HalfFloatScalar __pyx_vtable_7pyarrow_3lib_HalfFloatScalar;

      static PyObject *__pyx_tp_new_7pyarrow_3lib_HalfFloatScalar(PyTypeObject *t, PyObject *a, PyObject *k) {
        struct __pyx_obj_7pyarrow_3lib_HalfFloatScalar *p;
        PyObject *o = __pyx_tp_new_7pyarrow_3lib_Scalar(t, a, k);
        if (unlikely(!o)) return 0;
        p = ((struct __pyx_obj_7pyarrow_3lib_HalfFloatScalar *)o);
        p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_Scalar*)__pyx_vtabptr_7pyarrow_3lib_HalfFloatScalar;
        return o;
      }

      static PyMethodDef __pyx_methods_7pyarrow_3lib_HalfFloatScalar[] = {
        {"as_py", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15HalfFloatScalar_1as_py, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15HalfFloatScalar_as_py},
        {0, 0, 0, 0}
      };
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib_HalfFloatScalar_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_Scalar},
        {Py_nb_int, (void *)__pyx_pw_7pyarrow_3lib_15HalfFloatScalar_5__int__},
        {Py_nb_float, (void *)__pyx_pw_7pyarrow_3lib_15HalfFloatScalar_3__float__},
        {Py_tp_doc, (void *)PyDoc_STR("\n    Concrete class for float scalars.\n    ")},
        {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_HalfFloatScalar},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_HalfFloatScalar},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib_HalfFloatScalar_spec = {
        "pyarrow.lib.HalfFloatScalar",
        sizeof(struct __pyx_obj_7pyarrow_3lib_HalfFloatScalar),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
        __pyx_type_7pyarrow_3lib_HalfFloatScalar_slots,
      };
      #else

      static PyNumberMethods __pyx_tp_as_number_HalfFloatScalar = {
        0, /*nb_add*/
        0, /*nb_subtract*/
        0, /*nb_multiply*/
        0, /*nb_remainder*/
        0, /*nb_divmod*/
        0, /*nb_power*/
        0, /*nb_negative*/
        0, /*nb_positive*/
        0, /*nb_absolute*/
        0, /*nb_bool*/
        0, /*nb_invert*/
        0, /*nb_lshift*/
        0, /*nb_rshift*/
        0, /*nb_and*/
        0, /*nb_xor*/
        0, /*nb_or*/
        __pyx_pw_7pyarrow_3lib_15HalfFloatScalar_5__int__, /*nb_int*/
        0, /*nb_long (reserved)*/
        __pyx_pw_7pyarrow_3lib_15HalfFloatScalar_3__float__, /*nb_float*/
        0, /*nb_inplace_add*/
        0, /*nb_inplace_subtract*/
        0, /*nb_inplace_multiply*/
        0, /*nb_inplace_remainder*/
        0, /*nb_inplace_power*/
        0, /*nb_inplace_lshift*/
        0, /*nb_inplace_rshift*/
        0, /*nb_inplace_and*/
        0, /*nb_inplace_xor*/
        0, /*nb_inplace_or*/
        0, /*nb_floor_divide*/
        0, /*nb_true_divide*/
        0, /*nb_inplace_floor_divide*/
        0, /*nb_inplace_true_divide*/
        0, /*nb_index*/
        0, /*nb_matrix_multiply*/
        0, /*nb_inplace_matrix_multiply*/
      };

      static PyTypeObject __pyx_type_7pyarrow_3lib_HalfFloatScalar = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""HalfFloatScalar", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib_HalfFloatScalar), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib_Scalar, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_7__repr__, /*tp_repr*/
        #else
        0, /*tp_repr*/
        #endif
        &__pyx_tp_as_number_HalfFloatScalar, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_9__str__, /*tp_str*/
        #else
        0, /*tp_str*/
        #endif
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
        PyDoc_STR("\n    Concrete class for float scalars.\n    "), /*tp_doc*/
        0, /*tp_traverse*/
        0, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        0, /*tp_iter*/
        0, /*tp_iternext*/
        __pyx_methods_7pyarrow_3lib_HalfFloatScalar, /*tp_methods*/
        0, /*tp_members*/
        0, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_1__init__, /*tp_init*/
        #else
        0, /*tp_init*/
        #endif
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib_HalfFloatScalar, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif
      static struct __pyx_vtabstruct_7pyarrow_3lib_FloatScalar __pyx_vtable_7pyarrow_3lib_FloatScalar;

      static PyObject *__pyx_tp_new_7pyarrow_3lib_FloatScalar(PyTypeObject *t, PyObject *a, PyObject *k) {
        struct __pyx_obj_7pyarrow_3lib_FloatScalar *p;
        PyObject *o = __pyx_tp_new_7pyarrow_3lib_Scalar(t, a, k);
        if (unlikely(!o)) return 0;
        p = ((struct __pyx_obj_7pyarrow_3lib_FloatScalar *)o);
        p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_Scalar*)__pyx_vtabptr_7pyarrow_3lib_FloatScalar;
        return o;
      }

      static PyMethodDef __pyx_methods_7pyarrow_3lib_FloatScalar[] = {
        {"as_py", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_11FloatScalar_1as_py, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_11FloatScalar_as_py},
        {0, 0, 0, 0}
      };
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib_FloatScalar_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_Scalar},
        {Py_nb_int, (void *)__pyx_pw_7pyarrow_3lib_11FloatScalar_5__int__},
        {Py_nb_float, (void *)__pyx_pw_7pyarrow_3lib_11FloatScalar_3__float__},
        {Py_tp_doc, (void *)PyDoc_STR("\n    Concrete class for float scalars.\n    ")},
        {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_FloatScalar},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_FloatScalar},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib_FloatScalar_spec = {
        "pyarrow.lib.FloatScalar",
        sizeof(struct __pyx_obj_7pyarrow_3lib_FloatScalar),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
        __pyx_type_7pyarrow_3lib_FloatScalar_slots,
      };
      #else

      static PyNumberMethods __pyx_tp_as_number_FloatScalar = {
        0, /*nb_add*/
        0, /*nb_subtract*/
        0, /*nb_multiply*/
        0, /*nb_remainder*/
        0, /*nb_divmod*/
        0, /*nb_power*/
        0, /*nb_negative*/
        0, /*nb_positive*/
        0, /*nb_absolute*/
        0, /*nb_bool*/
        0, /*nb_invert*/
        0, /*nb_lshift*/
        0, /*nb_rshift*/
        0, /*nb_and*/
        0, /*nb_xor*/
        0, /*nb_or*/
        __pyx_pw_7pyarrow_3lib_11FloatScalar_5__int__, /*nb_int*/
        0, /*nb_long (reserved)*/
        __pyx_pw_7pyarrow_3lib_11FloatScalar_3__float__, /*nb_float*/
        0, /*nb_inplace_add*/
        0, /*nb_inplace_subtract*/
        0, /*nb_inplace_multiply*/
        0, /*nb_inplace_remainder*/
        0, /*nb_inplace_power*/
        0, /*nb_inplace_lshift*/
        0, /*nb_inplace_rshift*/
        0, /*nb_inplace_and*/
        0, /*nb_inplace_xor*/
        0, /*nb_inplace_or*/
        0, /*nb_floor_divide*/
        0, /*nb_true_divide*/
        0, /*nb_inplace_floor_divide*/
        0, /*nb_inplace_true_divide*/
        0, /*nb_index*/
        0, /*nb_matrix_multiply*/
        0, /*nb_inplace_matrix_multiply*/
      };

      static PyTypeObject __pyx_type_7pyarrow_3lib_FloatScalar = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""FloatScalar", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib_FloatScalar), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib_Scalar, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_7__repr__, /*tp_repr*/
        #else
        0, /*tp_repr*/
        #endif
        &__pyx_tp_as_number_FloatScalar, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_9__str__, /*tp_str*/
        #else
        0, /*tp_str*/
        #endif
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
        PyDoc_STR("\n    Concrete class for float scalars.\n    "), /*tp_doc*/
        0, /*tp_traverse*/
        0, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        0, /*tp_iter*/
        0, /*tp_iternext*/
        __pyx_methods_7pyarrow_3lib_FloatScalar, /*tp_methods*/
        0, /*tp_members*/
        0, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_1__init__, /*tp_init*/
        #else
        0, /*tp_init*/
        #endif
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib_FloatScalar, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif
      static struct __pyx_vtabstruct_7pyarrow_3lib_DoubleScalar __pyx_vtable_7pyarrow_3lib_DoubleScalar;

      static PyObject *__pyx_tp_new_7pyarrow_3lib_DoubleScalar(PyTypeObject *t, PyObject *a, PyObject *k) {
        struct __pyx_obj_7pyarrow_3lib_DoubleScalar *p;
        PyObject *o = __pyx_tp_new_7pyarrow_3lib_Scalar(t, a, k);
        if (unlikely(!o)) return 0;
        p = ((struct __pyx_obj_7pyarrow_3lib_DoubleScalar *)o);
        p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_Scalar*)__pyx_vtabptr_7pyarrow_3lib_DoubleScalar;
        return o;
      }

      static PyMethodDef __pyx_methods_7pyarrow_3lib_DoubleScalar[] = {
        {"as_py", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12DoubleScalar_1as_py, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12DoubleScalar_as_py},
        {0, 0, 0, 0}
      };
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib_DoubleScalar_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_Scalar},
        {Py_nb_int, (void *)__pyx_pw_7pyarrow_3lib_12DoubleScalar_5__int__},
        {Py_nb_float, (void *)__pyx_pw_7pyarrow_3lib_12DoubleScalar_3__float__},
        {Py_tp_doc, (void *)PyDoc_STR("\n    Concrete class for double scalars.\n    ")},
        {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_DoubleScalar},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_DoubleScalar},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib_DoubleScalar_spec = {
        "pyarrow.lib.DoubleScalar",
        sizeof(struct __pyx_obj_7pyarrow_3lib_DoubleScalar),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
        __pyx_type_7pyarrow_3lib_DoubleScalar_slots,
      };
      #else

      static PyNumberMethods __pyx_tp_as_number_DoubleScalar = {
        0, /*nb_add*/
        0, /*nb_subtract*/
        0, /*nb_multiply*/
        0, /*nb_remainder*/
        0, /*nb_divmod*/
        0, /*nb_power*/
        0, /*nb_negative*/
        0, /*nb_positive*/
        0, /*nb_absolute*/
        0, /*nb_bool*/
        0, /*nb_invert*/
        0, /*nb_lshift*/
        0, /*nb_rshift*/
        0, /*nb_and*/
        0, /*nb_xor*/
        0, /*nb_or*/
        __pyx_pw_7pyarrow_3lib_12DoubleScalar_5__int__, /*nb_int*/
        0, /*nb_long (reserved)*/
        __pyx_pw_7pyarrow_3lib_12DoubleScalar_3__float__, /*nb_float*/
        0, /*nb_inplace_add*/
        0, /*nb_inplace_subtract*/
        0, /*nb_inplace_multiply*/
        0, /*nb_inplace_remainder*/
        0, /*nb_inplace_power*/
        0, /*nb_inplace_lshift*/
        0, /*nb_inplace_rshift*/
        0, /*nb_inplace_and*/
        0, /*nb_inplace_xor*/
        0, /*nb_inplace_or*/
        0, /*nb_floor_divide*/
        0, /*nb_true_divide*/
        0, /*nb_inplace_floor_divide*/
        0, /*nb_inplace_true_divide*/
        0, /*nb_index*/
        0, /*nb_matrix_multiply*/
        0, /*nb_inplace_matrix_multiply*/
      };

      static PyTypeObject __pyx_type_7pyarrow_3lib_DoubleScalar = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""DoubleScalar", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib_DoubleScalar), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib_Scalar, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_7__repr__, /*tp_repr*/
        #else
        0, /*tp_repr*/
        #endif
        &__pyx_tp_as_number_DoubleScalar, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_9__str__, /*tp_str*/
        #else
        0, /*tp_str*/
        #endif
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
        PyDoc_STR("\n    Concrete class for double scalars.\n    "), /*tp_doc*/
        0, /*tp_traverse*/
        0, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        0, /*tp_iter*/
        0, /*tp_iternext*/
        __pyx_methods_7pyarrow_3lib_DoubleScalar, /*tp_methods*/
        0, /*tp_members*/
        0, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_1__init__, /*tp_init*/
        #else
        0, /*tp_init*/
        #endif
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib_DoubleScalar, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif
      static struct __pyx_vtabstruct_7pyarrow_3lib_Decimal32Scalar __pyx_vtable_7pyarrow_3lib_Decimal32Scalar;

      static PyObject *__pyx_tp_new_7pyarrow_3lib_Decimal32Scalar(PyTypeObject *t, PyObject *a, PyObject *k) {
        struct __pyx_obj_7pyarrow_3lib_Decimal32Scalar *p;
        PyObject *o = __pyx_tp_new_7pyarrow_3lib_Scalar(t, a, k);
        if (unlikely(!o)) return 0;
        p = ((struct __pyx_obj_7pyarrow_3lib_Decimal32Scalar *)o);
        p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_Scalar*)__pyx_vtabptr_7pyarrow_3lib_Decimal32Scalar;
        return o;
      }

      static PyMethodDef __pyx_methods_7pyarrow_3lib_Decimal32Scalar[] = {
        {"as_py", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15Decimal32Scalar_1as_py, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15Decimal32Scalar_as_py},
        {0, 0, 0, 0}
      };
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib_Decimal32Scalar_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_Scalar},
        {Py_tp_doc, (void *)PyDoc_STR("\n    Concrete class for decimal32 scalars.\n    ")},
        {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_Decimal32Scalar},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_Decimal32Scalar},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib_Decimal32Scalar_spec = {
        "pyarrow.lib.Decimal32Scalar",
        sizeof(struct __pyx_obj_7pyarrow_3lib_Decimal32Scalar),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
        __pyx_type_7pyarrow_3lib_Decimal32Scalar_slots,
      };
      #else

      static PyTypeObject __pyx_type_7pyarrow_3lib_Decimal32Scalar = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""Decimal32Scalar", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib_Decimal32Scalar), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib_Scalar, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_7__repr__, /*tp_repr*/
        #else
        0, /*tp_repr*/
        #endif
        0, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_9__str__, /*tp_str*/
        #else
        0, /*tp_str*/
        #endif
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
        PyDoc_STR("\n    Concrete class for decimal32 scalars.\n    "), /*tp_doc*/
        0, /*tp_traverse*/
        0, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        0, /*tp_iter*/
        0, /*tp_iternext*/
        __pyx_methods_7pyarrow_3lib_Decimal32Scalar, /*tp_methods*/
        0, /*tp_members*/
        0, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_1__init__, /*tp_init*/
        #else
        0, /*tp_init*/
        #endif
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib_Decimal32Scalar, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif
      static struct __pyx_vtabstruct_7pyarrow_3lib_Decimal64Scalar __pyx_vtable_7pyarrow_3lib_Decimal64Scalar;

      static PyObject *__pyx_tp_new_7pyarrow_3lib_Decimal64Scalar(PyTypeObject *t, PyObject *a, PyObject *k) {
        struct __pyx_obj_7pyarrow_3lib_Decimal64Scalar *p;
        PyObject *o = __pyx_tp_new_7pyarrow_3lib_Scalar(t, a, k);
        if (unlikely(!o)) return 0;
        p = ((struct __pyx_obj_7pyarrow_3lib_Decimal64Scalar *)o);
        p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_Scalar*)__pyx_vtabptr_7pyarrow_3lib_Decimal64Scalar;
        return o;
      }

      static PyMethodDef __pyx_methods_7pyarrow_3lib_Decimal64Scalar[] = {
        {"as_py", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15Decimal64Scalar_1as_py, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15Decimal64Scalar_as_py},
        {0, 0, 0, 0}
      };
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib_Decimal64Scalar_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_Scalar},
        {Py_tp_doc, (void *)PyDoc_STR("\n    Concrete class for decimal64 scalars.\n    ")},
        {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_Decimal64Scalar},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_Decimal64Scalar},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib_Decimal64Scalar_spec = {
        "pyarrow.lib.Decimal64Scalar",
        sizeof(struct __pyx_obj_7pyarrow_3lib_Decimal64Scalar),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
        __pyx_type_7pyarrow_3lib_Decimal64Scalar_slots,
      };
      #else

      static PyTypeObject __pyx_type_7pyarrow_3lib_Decimal64Scalar = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""Decimal64Scalar", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib_Decimal64Scalar), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib_Scalar, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_7__repr__, /*tp_repr*/
        #else
        0, /*tp_repr*/
        #endif
        0, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_9__str__, /*tp_str*/
        #else
        0, /*tp_str*/
        #endif
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
        PyDoc_STR("\n    Concrete class for decimal64 scalars.\n    "), /*tp_doc*/
        0, /*tp_traverse*/
        0, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        0, /*tp_iter*/
        0, /*tp_iternext*/
        __pyx_methods_7pyarrow_3lib_Decimal64Scalar, /*tp_methods*/
        0, /*tp_members*/
        0, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_1__init__, /*tp_init*/
        #else
        0, /*tp_init*/
        #endif
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib_Decimal64Scalar, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif
      static struct __pyx_vtabstruct_7pyarrow_3lib_Decimal128Scalar __pyx_vtable_7pyarrow_3lib_Decimal128Scalar;

      static PyObject *__pyx_tp_new_7pyarrow_3lib_Decimal128Scalar(PyTypeObject *t, PyObject *a, PyObject *k) {
        struct __pyx_obj_7pyarrow_3lib_Decimal128Scalar *p;
        PyObject *o = __pyx_tp_new_7pyarrow_3lib_Scalar(t, a, k);
        if (unlikely(!o)) return 0;
        p = ((struct __pyx_obj_7pyarrow_3lib_Decimal128Scalar *)o);
        p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_Scalar*)__pyx_vtabptr_7pyarrow_3lib_Decimal128Scalar;
        return o;
      }

      static PyMethodDef __pyx_methods_7pyarrow_3lib_Decimal128Scalar[] = {
        {"as_py", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_16Decimal128Scalar_1as_py, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_16Decimal128Scalar_as_py},
        {0, 0, 0, 0}
      };
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib_Decimal128Scalar_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_Scalar},
        {Py_tp_doc, (void *)PyDoc_STR("\n    Concrete class for decimal128 scalars.\n    ")},
        {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_Decimal128Scalar},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_Decimal128Scalar},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib_Decimal128Scalar_spec = {
        "pyarrow.lib.Decimal128Scalar",
        sizeof(struct __pyx_obj_7pyarrow_3lib_Decimal128Scalar),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
        __pyx_type_7pyarrow_3lib_Decimal128Scalar_slots,
      };
      #else

      static PyTypeObject __pyx_type_7pyarrow_3lib_Decimal128Scalar = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""Decimal128Scalar", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib_Decimal128Scalar), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib_Scalar, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_7__repr__, /*tp_repr*/
        #else
        0, /*tp_repr*/
        #endif
        0, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_9__str__, /*tp_str*/
        #else
        0, /*tp_str*/
        #endif
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
        PyDoc_STR("\n    Concrete class for decimal128 scalars.\n    "), /*tp_doc*/
        0, /*tp_traverse*/
        0, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        0, /*tp_iter*/
        0, /*tp_iternext*/
        __pyx_methods_7pyarrow_3lib_Decimal128Scalar, /*tp_methods*/
        0, /*tp_members*/
        0, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_1__init__, /*tp_init*/
        #else
        0, /*tp_init*/
        #endif
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib_Decimal128Scalar, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif
      static struct __pyx_vtabstruct_7pyarrow_3lib_Decimal256Scalar __pyx_vtable_7pyarrow_3lib_Decimal256Scalar;

      static PyObject *__pyx_tp_new_7pyarrow_3lib_Decimal256Scalar(PyTypeObject *t, PyObject *a, PyObject *k) {
        struct __pyx_obj_7pyarrow_3lib_Decimal256Scalar *p;
        PyObject *o = __pyx_tp_new_7pyarrow_3lib_Scalar(t, a, k);
        if (unlikely(!o)) return 0;
        p = ((struct __pyx_obj_7pyarrow_3lib_Decimal256Scalar *)o);
        p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_Scalar*)__pyx_vtabptr_7pyarrow_3lib_Decimal256Scalar;
        return o;
      }

      static PyMethodDef __pyx_methods_7pyarrow_3lib_Decimal256Scalar[] = {
        {"as_py", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_16Decimal256Scalar_1as_py, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_16Decimal256Scalar_as_py},
        {0, 0, 0, 0}
      };
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib_Decimal256Scalar_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_Scalar},
        {Py_tp_doc, (void *)PyDoc_STR("\n    Concrete class for decimal256 scalars.\n    ")},
        {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_Decimal256Scalar},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_Decimal256Scalar},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib_Decimal256Scalar_spec = {
        "pyarrow.lib.Decimal256Scalar",
        sizeof(struct __pyx_obj_7pyarrow_3lib_Decimal256Scalar),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
        __pyx_type_7pyarrow_3lib_Decimal256Scalar_slots,
      };
      #else

      static PyTypeObject __pyx_type_7pyarrow_3lib_Decimal256Scalar = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""Decimal256Scalar", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib_Decimal256Scalar), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib_Scalar, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_7__repr__, /*tp_repr*/
        #else
        0, /*tp_repr*/
        #endif
        0, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_9__str__, /*tp_str*/
        #else
        0, /*tp_str*/
        #endif
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
        PyDoc_STR("\n    Concrete class for decimal256 scalars.\n    "), /*tp_doc*/
        0, /*tp_traverse*/
        0, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        0, /*tp_iter*/
        0, /*tp_iternext*/
        __pyx_methods_7pyarrow_3lib_Decimal256Scalar, /*tp_methods*/
        0, /*tp_members*/
        0, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_1__init__, /*tp_init*/
        #else
        0, /*tp_init*/
        #endif
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib_Decimal256Scalar, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif
      static struct __pyx_vtabstruct_7pyarrow_3lib_Date32Scalar __pyx_vtable_7pyarrow_3lib_Date32Scalar;

      static PyObject *__pyx_tp_new_7pyarrow_3lib_Date32Scalar(PyTypeObject *t, PyObject *a, PyObject *k) {
        struct __pyx_obj_7pyarrow_3lib_Date32Scalar *p;
        PyObject *o = __pyx_tp_new_7pyarrow_3lib_Scalar(t, a, k);
        if (unlikely(!o)) return 0;
        p = ((struct __pyx_obj_7pyarrow_3lib_Date32Scalar *)o);
        p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_Scalar*)__pyx_vtabptr_7pyarrow_3lib_Date32Scalar;
        return o;
      }

      static PyObject *__pyx_getprop_7pyarrow_3lib_12Date32Scalar_value(PyObject *o, CYTHON_UNUSED void *x) {
        return __pyx_pw_7pyarrow_3lib_12Date32Scalar_5value_1__get__(o);
      }

      static PyMethodDef __pyx_methods_7pyarrow_3lib_Date32Scalar[] = {
        {"as_py", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12Date32Scalar_1as_py, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12Date32Scalar_as_py},
        {0, 0, 0, 0}
      };

      static struct PyGetSetDef __pyx_getsets_7pyarrow_3lib_Date32Scalar[] = {
        {"value", __pyx_getprop_7pyarrow_3lib_12Date32Scalar_value, 0, 0, 0},
        {0, 0, 0, 0, 0}
      };
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib_Date32Scalar_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_Scalar},
        {Py_tp_doc, (void *)PyDoc_STR("\n    Concrete class for date32 scalars.\n    ")},
        {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_Date32Scalar},
        {Py_tp_getset, (void *)__pyx_getsets_7pyarrow_3lib_Date32Scalar},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_Date32Scalar},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib_Date32Scalar_spec = {
        "pyarrow.lib.Date32Scalar",
        sizeof(struct __pyx_obj_7pyarrow_3lib_Date32Scalar),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
        __pyx_type_7pyarrow_3lib_Date32Scalar_slots,
      };
      #else

      static PyTypeObject __pyx_type_7pyarrow_3lib_Date32Scalar = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""Date32Scalar", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib_Date32Scalar), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib_Scalar, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_7__repr__, /*tp_repr*/
        #else
        0, /*tp_repr*/
        #endif
        0, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_9__str__, /*tp_str*/
        #else
        0, /*tp_str*/
        #endif
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
        PyDoc_STR("\n    Concrete class for date32 scalars.\n    "), /*tp_doc*/
        0, /*tp_traverse*/
        0, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        0, /*tp_iter*/
        0, /*tp_iternext*/
        __pyx_methods_7pyarrow_3lib_Date32Scalar, /*tp_methods*/
        0, /*tp_members*/
        __pyx_getsets_7pyarrow_3lib_Date32Scalar, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_1__init__, /*tp_init*/
        #else
        0, /*tp_init*/
        #endif
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib_Date32Scalar, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif
      static struct __pyx_vtabstruct_7pyarrow_3lib_Date64Scalar __pyx_vtable_7pyarrow_3lib_Date64Scalar;

      static PyObject *__pyx_tp_new_7pyarrow_3lib_Date64Scalar(PyTypeObject *t, PyObject *a, PyObject *k) {
        struct __pyx_obj_7pyarrow_3lib_Date64Scalar *p;
        PyObject *o = __pyx_tp_new_7pyarrow_3lib_Scalar(t, a, k);
        if (unlikely(!o)) return 0;
        p = ((struct __pyx_obj_7pyarrow_3lib_Date64Scalar *)o);
        p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_Scalar*)__pyx_vtabptr_7pyarrow_3lib_Date64Scalar;
        return o;
      }

      static PyObject *__pyx_getprop_7pyarrow_3lib_12Date64Scalar_value(PyObject *o, CYTHON_UNUSED void *x) {
        return __pyx_pw_7pyarrow_3lib_12Date64Scalar_5value_1__get__(o);
      }

      static PyMethodDef __pyx_methods_7pyarrow_3lib_Date64Scalar[] = {
        {"as_py", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12Date64Scalar_1as_py, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12Date64Scalar_as_py},
        {0, 0, 0, 0}
      };

      static struct PyGetSetDef __pyx_getsets_7pyarrow_3lib_Date64Scalar[] = {
        {"value", __pyx_getprop_7pyarrow_3lib_12Date64Scalar_value, 0, 0, 0},
        {0, 0, 0, 0, 0}
      };
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib_Date64Scalar_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_Scalar},
        {Py_tp_doc, (void *)PyDoc_STR("\n    Concrete class for date64 scalars.\n    ")},
        {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_Date64Scalar},
        {Py_tp_getset, (void *)__pyx_getsets_7pyarrow_3lib_Date64Scalar},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_Date64Scalar},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib_Date64Scalar_spec = {
        "pyarrow.lib.Date64Scalar",
        sizeof(struct __pyx_obj_7pyarrow_3lib_Date64Scalar),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
        __pyx_type_7pyarrow_3lib_Date64Scalar_slots,
      };
      #else

      static PyTypeObject __pyx_type_7pyarrow_3lib_Date64Scalar = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""Date64Scalar", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib_Date64Scalar), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib_Scalar, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_7__repr__, /*tp_repr*/
        #else
        0, /*tp_repr*/
        #endif
        0, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_9__str__, /*tp_str*/
        #else
        0, /*tp_str*/
        #endif
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
        PyDoc_STR("\n    Concrete class for date64 scalars.\n    "), /*tp_doc*/
        0, /*tp_traverse*/
        0, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        0, /*tp_iter*/
        0, /*tp_iternext*/
        __pyx_methods_7pyarrow_3lib_Date64Scalar, /*tp_methods*/
        0, /*tp_members*/
        __pyx_getsets_7pyarrow_3lib_Date64Scalar, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_1__init__, /*tp_init*/
        #else
        0, /*tp_init*/
        #endif
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib_Date64Scalar, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif
      static struct __pyx_vtabstruct_7pyarrow_3lib_Time32Scalar __pyx_vtable_7pyarrow_3lib_Time32Scalar;

      static PyObject *__pyx_tp_new_7pyarrow_3lib_Time32Scalar(PyTypeObject *t, PyObject *a, PyObject *k) {
        struct __pyx_obj_7pyarrow_3lib_Time32Scalar *p;
        PyObject *o = __pyx_tp_new_7pyarrow_3lib_Scalar(t, a, k);
        if (unlikely(!o)) return 0;
        p = ((struct __pyx_obj_7pyarrow_3lib_Time32Scalar *)o);
        p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_Scalar*)__pyx_vtabptr_7pyarrow_3lib_Time32Scalar;
        return o;
      }

      static PyObject *__pyx_getprop_7pyarrow_3lib_12Time32Scalar_value(PyObject *o, CYTHON_UNUSED void *x) {
        return __pyx_pw_7pyarrow_3lib_12Time32Scalar_5value_1__get__(o);
      }

      static PyMethodDef __pyx_methods_7pyarrow_3lib_Time32Scalar[] = {
        {"as_py", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12Time32Scalar_1as_py, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12Time32Scalar_as_py},
        {0, 0, 0, 0}
      };

      static struct PyGetSetDef __pyx_getsets_7pyarrow_3lib_Time32Scalar[] = {
        {"value", __pyx_getprop_7pyarrow_3lib_12Time32Scalar_value, 0, 0, 0},
        {0, 0, 0, 0, 0}
      };
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib_Time32Scalar_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_Scalar},
        {Py_tp_doc, (void *)PyDoc_STR("\n    Concrete class for time32 scalars.\n    ")},
        {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_Time32Scalar},
        {Py_tp_getset, (void *)__pyx_getsets_7pyarrow_3lib_Time32Scalar},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_Time32Scalar},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib_Time32Scalar_spec = {
        "pyarrow.lib.Time32Scalar",
        sizeof(struct __pyx_obj_7pyarrow_3lib_Time32Scalar),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
        __pyx_type_7pyarrow_3lib_Time32Scalar_slots,
      };
      #else

      static PyTypeObject __pyx_type_7pyarrow_3lib_Time32Scalar = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""Time32Scalar", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib_Time32Scalar), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib_Scalar, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_7__repr__, /*tp_repr*/
        #else
        0, /*tp_repr*/
        #endif
        0, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_9__str__, /*tp_str*/
        #else
        0, /*tp_str*/
        #endif
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
        PyDoc_STR("\n    Concrete class for time32 scalars.\n    "), /*tp_doc*/
        0, /*tp_traverse*/
        0, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        0, /*tp_iter*/
        0, /*tp_iternext*/
        __pyx_methods_7pyarrow_3lib_Time32Scalar, /*tp_methods*/
        0, /*tp_members*/
        __pyx_getsets_7pyarrow_3lib_Time32Scalar, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_1__init__, /*tp_init*/
        #else
        0, /*tp_init*/
        #endif
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib_Time32Scalar, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif
      static struct __pyx_vtabstruct_7pyarrow_3lib_Time64Scalar __pyx_vtable_7pyarrow_3lib_Time64Scalar;

      static PyObject *__pyx_tp_new_7pyarrow_3lib_Time64Scalar(PyTypeObject *t, PyObject *a, PyObject *k) {
        struct __pyx_obj_7pyarrow_3lib_Time64Scalar *p;
        PyObject *o = __pyx_tp_new_7pyarrow_3lib_Scalar(t, a, k);
        if (unlikely(!o)) return 0;
        p = ((struct __pyx_obj_7pyarrow_3lib_Time64Scalar *)o);
        p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_Scalar*)__pyx_vtabptr_7pyarrow_3lib_Time64Scalar;
        return o;
      }

      static PyObject *__pyx_getprop_7pyarrow_3lib_12Time64Scalar_value(PyObject *o, CYTHON_UNUSED void *x) {
        return __pyx_pw_7pyarrow_3lib_12Time64Scalar_5value_1__get__(o);
      }

      static PyMethodDef __pyx_methods_7pyarrow_3lib_Time64Scalar[] = {
        {"as_py", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12Time64Scalar_1as_py, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12Time64Scalar_as_py},
        {0, 0, 0, 0}
      };

      static struct PyGetSetDef __pyx_getsets_7pyarrow_3lib_Time64Scalar[] = {
        {"value", __pyx_getprop_7pyarrow_3lib_12Time64Scalar_value, 0, 0, 0},
        {0, 0, 0, 0, 0}
      };
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib_Time64Scalar_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_Scalar},
        {Py_tp_doc, (void *)PyDoc_STR("\n    Concrete class for time64 scalars.\n    ")},
        {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_Time64Scalar},
        {Py_tp_getset, (void *)__pyx_getsets_7pyarrow_3lib_Time64Scalar},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_Time64Scalar},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib_Time64Scalar_spec = {
        "pyarrow.lib.Time64Scalar",
        sizeof(struct __pyx_obj_7pyarrow_3lib_Time64Scalar),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
        __pyx_type_7pyarrow_3lib_Time64Scalar_slots,
      };
      #else

      static PyTypeObject __pyx_type_7pyarrow_3lib_Time64Scalar = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""Time64Scalar", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib_Time64Scalar), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib_Scalar, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_7__repr__, /*tp_repr*/
        #else
        0, /*tp_repr*/
        #endif
        0, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_9__str__, /*tp_str*/
        #else
        0, /*tp_str*/
        #endif
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
        PyDoc_STR("\n    Concrete class for time64 scalars.\n    "), /*tp_doc*/
        0, /*tp_traverse*/
        0, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        0, /*tp_iter*/
        0, /*tp_iternext*/
        __pyx_methods_7pyarrow_3lib_Time64Scalar, /*tp_methods*/
        0, /*tp_members*/
        __pyx_getsets_7pyarrow_3lib_Time64Scalar, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_1__init__, /*tp_init*/
        #else
        0, /*tp_init*/
        #endif
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib_Time64Scalar, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif
      static struct __pyx_vtabstruct_7pyarrow_3lib_TimestampScalar __pyx_vtable_7pyarrow_3lib_TimestampScalar;

      static PyObject *__pyx_tp_new_7pyarrow_3lib_TimestampScalar(PyTypeObject *t, PyObject *a, PyObject *k) {
        struct __pyx_obj_7pyarrow_3lib_TimestampScalar *p;
        PyObject *o = __pyx_tp_new_7pyarrow_3lib_Scalar(t, a, k);
        if (unlikely(!o)) return 0;
        p = ((struct __pyx_obj_7pyarrow_3lib_TimestampScalar *)o);
        p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_Scalar*)__pyx_vtabptr_7pyarrow_3lib_TimestampScalar;
        return o;
      }

      static PyObject *__pyx_getprop_7pyarrow_3lib_15TimestampScalar_value(PyObject *o, CYTHON_UNUSED void *x) {
        return __pyx_pw_7pyarrow_3lib_15TimestampScalar_5value_1__get__(o);
      }

      static PyMethodDef __pyx_methods_7pyarrow_3lib_TimestampScalar[] = {
        {"as_py", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15TimestampScalar_1as_py, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15TimestampScalar_as_py},
        {0, 0, 0, 0}
      };

      static struct PyGetSetDef __pyx_getsets_7pyarrow_3lib_TimestampScalar[] = {
        {"value", __pyx_getprop_7pyarrow_3lib_15TimestampScalar_value, 0, 0, 0},
        {0, 0, 0, 0, 0}
      };
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib_TimestampScalar_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_Scalar},
        {Py_tp_repr, (void *)__pyx_pw_7pyarrow_3lib_15TimestampScalar_3__repr__},
        {Py_tp_doc, (void *)PyDoc_STR("\n    Concrete class for timestamp scalars.\n    ")},
        {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_TimestampScalar},
        {Py_tp_getset, (void *)__pyx_getsets_7pyarrow_3lib_TimestampScalar},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_TimestampScalar},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib_TimestampScalar_spec = {
        "pyarrow.lib.TimestampScalar",
        sizeof(struct __pyx_obj_7pyarrow_3lib_TimestampScalar),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
        __pyx_type_7pyarrow_3lib_TimestampScalar_slots,
      };
      #else

      static PyTypeObject __pyx_type_7pyarrow_3lib_TimestampScalar = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""TimestampScalar", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib_TimestampScalar), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib_Scalar, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        __pyx_pw_7pyarrow_3lib_15TimestampScalar_3__repr__, /*tp_repr*/
        0, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_9__str__, /*tp_str*/
        #else
        0, /*tp_str*/
        #endif
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
        PyDoc_STR("\n    Concrete class for timestamp scalars.\n    "), /*tp_doc*/
        0, /*tp_traverse*/
        0, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        0, /*tp_iter*/
        0, /*tp_iternext*/
        __pyx_methods_7pyarrow_3lib_TimestampScalar, /*tp_methods*/
        0, /*tp_members*/
        __pyx_getsets_7pyarrow_3lib_TimestampScalar, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_1__init__, /*tp_init*/
        #else
        0, /*tp_init*/
        #endif
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib_TimestampScalar, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif
      static struct __pyx_vtabstruct_7pyarrow_3lib_DurationScalar __pyx_vtable_7pyarrow_3lib_DurationScalar;

      static PyObject *__pyx_tp_new_7pyarrow_3lib_DurationScalar(PyTypeObject *t, PyObject *a, PyObject *k) {
        struct __pyx_obj_7pyarrow_3lib_DurationScalar *p;
        PyObject *o = __pyx_tp_new_7pyarrow_3lib_Scalar(t, a, k);
        if (unlikely(!o)) return 0;
        p = ((struct __pyx_obj_7pyarrow_3lib_DurationScalar *)o);
        p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_Scalar*)__pyx_vtabptr_7pyarrow_3lib_DurationScalar;
        return o;
      }

      static PyObject *__pyx_getprop_7pyarrow_3lib_14DurationScalar_value(PyObject *o, CYTHON_UNUSED void *x) {
        return __pyx_pw_7pyarrow_3lib_14DurationScalar_5value_1__get__(o);
      }

      static PyMethodDef __pyx_methods_7pyarrow_3lib_DurationScalar[] = {
        {"as_py", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_14DurationScalar_1as_py, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_14DurationScalar_as_py},
        {0, 0, 0, 0}
      };

      static struct PyGetSetDef __pyx_getsets_7pyarrow_3lib_DurationScalar[] = {
        {"value", __pyx_getprop_7pyarrow_3lib_14DurationScalar_value, 0, 0, 0},
        {0, 0, 0, 0, 0}
      };
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib_DurationScalar_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_Scalar},
        {Py_tp_doc, (void *)PyDoc_STR("\n    Concrete class for duration scalars.\n    ")},
        {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_DurationScalar},
        {Py_tp_getset, (void *)__pyx_getsets_7pyarrow_3lib_DurationScalar},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_DurationScalar},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib_DurationScalar_spec = {
        "pyarrow.lib.DurationScalar",
        sizeof(struct __pyx_obj_7pyarrow_3lib_DurationScalar),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
        __pyx_type_7pyarrow_3lib_DurationScalar_slots,
      };
      #else

      static PyTypeObject __pyx_type_7pyarrow_3lib_DurationScalar = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""DurationScalar", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib_DurationScalar), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib_Scalar, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_7__repr__, /*tp_repr*/
        #else
        0, /*tp_repr*/
        #endif
        0, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_9__str__, /*tp_str*/
        #else
        0, /*tp_str*/
        #endif
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
        PyDoc_STR("\n    Concrete class for duration scalars.\n    "), /*tp_doc*/
        0, /*tp_traverse*/
        0, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        0, /*tp_iter*/
        0, /*tp_iternext*/
        __pyx_methods_7pyarrow_3lib_DurationScalar, /*tp_methods*/
        0, /*tp_members*/
        __pyx_getsets_7pyarrow_3lib_DurationScalar, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_1__init__, /*tp_init*/
        #else
        0, /*tp_init*/
        #endif
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib_DurationScalar, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif
      static struct __pyx_vtabstruct_7pyarrow_3lib_MonthDayNanoIntervalScalar __pyx_vtable_7pyarrow_3lib_MonthDayNanoIntervalScalar;

      static PyObject *__pyx_tp_new_7pyarrow_3lib_MonthDayNanoIntervalScalar(PyTypeObject *t, PyObject *a, PyObject *k) {
        struct __pyx_obj_7pyarrow_3lib_MonthDayNanoIntervalScalar *p;
        PyObject *o = __pyx_tp_new_7pyarrow_3lib_Scalar(t, a, k);
        if (unlikely(!o)) return 0;
        p = ((struct __pyx_obj_7pyarrow_3lib_MonthDayNanoIntervalScalar *)o);
        p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_Scalar*)__pyx_vtabptr_7pyarrow_3lib_MonthDayNanoIntervalScalar;
        return o;
      }

      static PyObject *__pyx_getprop_7pyarrow_3lib_26MonthDayNanoIntervalScalar_value(PyObject *o, CYTHON_UNUSED void *x) {
        return __pyx_pw_7pyarrow_3lib_26MonthDayNanoIntervalScalar_5value_1__get__(o);
      }

      static PyMethodDef __pyx_methods_7pyarrow_3lib_MonthDayNanoIntervalScalar[] = {
        {"as_py", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_26MonthDayNanoIntervalScalar_1as_py, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_26MonthDayNanoIntervalScalar_as_py},
        {0, 0, 0, 0}
      };

      static struct PyGetSetDef __pyx_getsets_7pyarrow_3lib_MonthDayNanoIntervalScalar[] = {
        {"value", __pyx_getprop_7pyarrow_3lib_26MonthDayNanoIntervalScalar_value, 0, PyDoc_STR("\n        Same as self.as_py()\n        "), 0},
        {0, 0, 0, 0, 0}
      };
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib_MonthDayNanoIntervalScalar_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_Scalar},
        {Py_tp_doc, (void *)PyDoc_STR("\n    Concrete class for month, day, nanosecond interval scalars.\n    ")},
        {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_MonthDayNanoIntervalScalar},
        {Py_tp_getset, (void *)__pyx_getsets_7pyarrow_3lib_MonthDayNanoIntervalScalar},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_MonthDayNanoIntervalScalar},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib_MonthDayNanoIntervalScalar_spec = {
        "pyarrow.lib.MonthDayNanoIntervalScalar",
        sizeof(struct __pyx_obj_7pyarrow_3lib_MonthDayNanoIntervalScalar),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
        __pyx_type_7pyarrow_3lib_MonthDayNanoIntervalScalar_slots,
      };
      #else

      static PyTypeObject __pyx_type_7pyarrow_3lib_MonthDayNanoIntervalScalar = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""MonthDayNanoIntervalScalar", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib_MonthDayNanoIntervalScalar), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib_Scalar, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_7__repr__, /*tp_repr*/
        #else
        0, /*tp_repr*/
        #endif
        0, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_9__str__, /*tp_str*/
        #else
        0, /*tp_str*/
        #endif
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
        PyDoc_STR("\n    Concrete class for month, day, nanosecond interval scalars.\n    "), /*tp_doc*/
        0, /*tp_traverse*/
        0, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        0, /*tp_iter*/
        0, /*tp_iternext*/
        __pyx_methods_7pyarrow_3lib_MonthDayNanoIntervalScalar, /*tp_methods*/
        0, /*tp_members*/
        __pyx_getsets_7pyarrow_3lib_MonthDayNanoIntervalScalar, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_1__init__, /*tp_init*/
        #else
        0, /*tp_init*/
        #endif
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib_MonthDayNanoIntervalScalar, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif
      static struct __pyx_vtabstruct_7pyarrow_3lib_BinaryScalar __pyx_vtable_7pyarrow_3lib_BinaryScalar;

      static PyObject *__pyx_tp_new_7pyarrow_3lib_BinaryScalar(PyTypeObject *t, PyObject *a, PyObject *k) {
        struct __pyx_obj_7pyarrow_3lib_BinaryScalar *p;
        PyObject *o = __pyx_tp_new_7pyarrow_3lib_Scalar(t, a, k);
        if (unlikely(!o)) return 0;
        p = ((struct __pyx_obj_7pyarrow_3lib_BinaryScalar *)o);
        p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_Scalar*)__pyx_vtabptr_7pyarrow_3lib_BinaryScalar;
        return o;
      }

      static PyMethodDef __pyx_methods_7pyarrow_3lib_BinaryScalar[] = {
        {"as_buffer", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12BinaryScalar_1as_buffer, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12BinaryScalar_as_buffer},
        {"as_py", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12BinaryScalar_3as_py, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12BinaryScalar_2as_py},
        {"__bytes__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12BinaryScalar_5__bytes__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12BinaryScalar_4__bytes__},
        {0, 0, 0, 0}
      };
      #if CYTHON_USE_TYPE_SPECS
      #if !CYTHON_COMPILING_IN_LIMITED_API

      static PyBufferProcs __pyx_tp_as_buffer_BinaryScalar = {
        __pyx_pw_7pyarrow_3lib_12BinaryScalar_7__getbuffer__, /*bf_getbuffer*/
        0, /*bf_releasebuffer*/
      };
      #endif
      static PyType_Slot __pyx_type_7pyarrow_3lib_BinaryScalar_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_Scalar},
        #if defined(Py_bf_getbuffer)
        {Py_bf_getbuffer, (void *)__pyx_pw_7pyarrow_3lib_12BinaryScalar_7__getbuffer__},
        #endif
        {Py_tp_doc, (void *)PyDoc_STR("\n    Concrete class for binary-like scalars.\n    ")},
        {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_BinaryScalar},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_BinaryScalar},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib_BinaryScalar_spec = {
        "pyarrow.lib.BinaryScalar",
        sizeof(struct __pyx_obj_7pyarrow_3lib_BinaryScalar),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
        __pyx_type_7pyarrow_3lib_BinaryScalar_slots,
      };
      #else

      static PyBufferProcs __pyx_tp_as_buffer_BinaryScalar = {
        __pyx_pw_7pyarrow_3lib_12BinaryScalar_7__getbuffer__, /*bf_getbuffer*/
        0, /*bf_releasebuffer*/
      };

      static PyTypeObject __pyx_type_7pyarrow_3lib_BinaryScalar = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""BinaryScalar", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib_BinaryScalar), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib_Scalar, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_7__repr__, /*tp_repr*/
        #else
        0, /*tp_repr*/
        #endif
        0, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_9__str__, /*tp_str*/
        #else
        0, /*tp_str*/
        #endif
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        &__pyx_tp_as_buffer_BinaryScalar, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
        PyDoc_STR("\n    Concrete class for binary-like scalars.\n    "), /*tp_doc*/
        0, /*tp_traverse*/
        0, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        0, /*tp_iter*/
        0, /*tp_iternext*/
        __pyx_methods_7pyarrow_3lib_BinaryScalar, /*tp_methods*/
        0, /*tp_members*/
        0, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_1__init__, /*tp_init*/
        #else
        0, /*tp_init*/
        #endif
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib_BinaryScalar, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif
      static struct __pyx_vtabstruct_7pyarrow_3lib_LargeBinaryScalar __pyx_vtable_7pyarrow_3lib_LargeBinaryScalar;

      static PyObject *__pyx_tp_new_7pyarrow_3lib_LargeBinaryScalar(PyTypeObject *t, PyObject *a, PyObject *k) {
        struct __pyx_obj_7pyarrow_3lib_LargeBinaryScalar *p;
        PyObject *o = __pyx_tp_new_7pyarrow_3lib_BinaryScalar(t, a, k);
        if (unlikely(!o)) return 0;
        p = ((struct __pyx_obj_7pyarrow_3lib_LargeBinaryScalar *)o);
        p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_Scalar*)__pyx_vtabptr_7pyarrow_3lib_LargeBinaryScalar;
        return o;
      }
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib_LargeBinaryScalar_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_Scalar},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_LargeBinaryScalar},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib_LargeBinaryScalar_spec = {
        "pyarrow.lib.LargeBinaryScalar",
        sizeof(struct __pyx_obj_7pyarrow_3lib_LargeBinaryScalar),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
        __pyx_type_7pyarrow_3lib_LargeBinaryScalar_slots,
      };
      #else

      static PyTypeObject __pyx_type_7pyarrow_3lib_LargeBinaryScalar = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""LargeBinaryScalar", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib_LargeBinaryScalar), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib_Scalar, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_7__repr__, /*tp_repr*/
        #else
        0, /*tp_repr*/
        #endif
        0, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_9__str__, /*tp_str*/
        #else
        0, /*tp_str*/
        #endif
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
        0, /*tp_doc*/
        0, /*tp_traverse*/
        0, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        0, /*tp_iter*/
        0, /*tp_iternext*/
        0, /*tp_methods*/
        0, /*tp_members*/
        0, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_1__init__, /*tp_init*/
        #else
        0, /*tp_init*/
        #endif
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib_LargeBinaryScalar, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif
      static struct __pyx_vtabstruct_7pyarrow_3lib_FixedSizeBinaryScalar __pyx_vtable_7pyarrow_3lib_FixedSizeBinaryScalar;

      static PyObject *__pyx_tp_new_7pyarrow_3lib_FixedSizeBinaryScalar(PyTypeObject *t, PyObject *a, PyObject *k) {
        struct __pyx_obj_7pyarrow_3lib_FixedSizeBinaryScalar *p;
        PyObject *o = __pyx_tp_new_7pyarrow_3lib_BinaryScalar(t, a, k);
        if (unlikely(!o)) return 0;
        p = ((struct __pyx_obj_7pyarrow_3lib_FixedSizeBinaryScalar *)o);
        p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_Scalar*)__pyx_vtabptr_7pyarrow_3lib_FixedSizeBinaryScalar;
        return o;
      }
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib_FixedSizeBinaryScalar_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_Scalar},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_FixedSizeBinaryScalar},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib_FixedSizeBinaryScalar_spec = {
        "pyarrow.lib.FixedSizeBinaryScalar",
        sizeof(struct __pyx_obj_7pyarrow_3lib_FixedSizeBinaryScalar),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
        __pyx_type_7pyarrow_3lib_FixedSizeBinaryScalar_slots,
      };
      #else

      static PyTypeObject __pyx_type_7pyarrow_3lib_FixedSizeBinaryScalar = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""FixedSizeBinaryScalar", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib_FixedSizeBinaryScalar), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib_Scalar, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_7__repr__, /*tp_repr*/
        #else
        0, /*tp_repr*/
        #endif
        0, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_9__str__, /*tp_str*/
        #else
        0, /*tp_str*/
        #endif
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
        0, /*tp_doc*/
        0, /*tp_traverse*/
        0, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        0, /*tp_iter*/
        0, /*tp_iternext*/
        0, /*tp_methods*/
        0, /*tp_members*/
        0, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_1__init__, /*tp_init*/
        #else
        0, /*tp_init*/
        #endif
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib_FixedSizeBinaryScalar, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif
      static struct __pyx_vtabstruct_7pyarrow_3lib_StringScalar __pyx_vtable_7pyarrow_3lib_StringScalar;

      static PyObject *__pyx_tp_new_7pyarrow_3lib_StringScalar(PyTypeObject *t, PyObject *a, PyObject *k) {
        struct __pyx_obj_7pyarrow_3lib_StringScalar *p;
        PyObject *o = __pyx_tp_new_7pyarrow_3lib_BinaryScalar(t, a, k);
        if (unlikely(!o)) return 0;
        p = ((struct __pyx_obj_7pyarrow_3lib_StringScalar *)o);
        p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_Scalar*)__pyx_vtabptr_7pyarrow_3lib_StringScalar;
        return o;
      }

      static PyMethodDef __pyx_methods_7pyarrow_3lib_StringScalar[] = {
        {"as_py", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12StringScalar_1as_py, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12StringScalar_as_py},
        {0, 0, 0, 0}
      };
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib_StringScalar_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_Scalar},
        {Py_tp_doc, (void *)PyDoc_STR("\n    Concrete class for string-like (utf8) scalars.\n    ")},
        {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_StringScalar},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_StringScalar},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib_StringScalar_spec = {
        "pyarrow.lib.StringScalar",
        sizeof(struct __pyx_obj_7pyarrow_3lib_StringScalar),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
        __pyx_type_7pyarrow_3lib_StringScalar_slots,
      };
      #else

      static PyTypeObject __pyx_type_7pyarrow_3lib_StringScalar = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""StringScalar", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib_StringScalar), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib_Scalar, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_7__repr__, /*tp_repr*/
        #else
        0, /*tp_repr*/
        #endif
        0, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_9__str__, /*tp_str*/
        #else
        0, /*tp_str*/
        #endif
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
        PyDoc_STR("\n    Concrete class for string-like (utf8) scalars.\n    "), /*tp_doc*/
        0, /*tp_traverse*/
        0, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        0, /*tp_iter*/
        0, /*tp_iternext*/
        __pyx_methods_7pyarrow_3lib_StringScalar, /*tp_methods*/
        0, /*tp_members*/
        0, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_1__init__, /*tp_init*/
        #else
        0, /*tp_init*/
        #endif
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib_StringScalar, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif
      static struct __pyx_vtabstruct_7pyarrow_3lib_LargeStringScalar __pyx_vtable_7pyarrow_3lib_LargeStringScalar;

      static PyObject *__pyx_tp_new_7pyarrow_3lib_LargeStringScalar(PyTypeObject *t, PyObject *a, PyObject *k) {
        struct __pyx_obj_7pyarrow_3lib_LargeStringScalar *p;
        PyObject *o = __pyx_tp_new_7pyarrow_3lib_StringScalar(t, a, k);
        if (unlikely(!o)) return 0;
        p = ((struct __pyx_obj_7pyarrow_3lib_LargeStringScalar *)o);
        p->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_Scalar*)__pyx_vtabptr_7pyarrow_3lib_LargeStringScalar;
        return o;
      }
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib_LargeStringScalar_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_Scalar},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_LargeStringScalar},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib_LargeStringScalar_spec = {
        "pyarrow.lib.LargeStringScalar",
        sizeof(struct __pyx_obj_7pyarrow_3lib_LargeStringScalar),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
        __pyx_type_7pyarrow_3lib_LargeStringScalar_slots,
      };
      #else

      static PyTypeObject __pyx_type_7pyarrow_3lib_LargeStringScalar = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""LargeStringScalar", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib_LargeStringScalar), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib_Scalar, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_7__repr__, /*tp_repr*/
        #else
        0, /*tp_repr*/
        #endif
        0, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_9__str__, /*tp_str*/
        #else
        0, /*tp_str*/
        #endif
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
        0, /*tp_doc*/
        0, /*tp_traverse*/
        0, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        0, /*tp_iter*/
        0, /*tp_iternext*/
        0, /*tp_methods*/
        0, /*tp_members*/
        0, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_1__init__, /*tp_init*/
        #else
        0, /*tp_init*/
        #endif
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib_LargeStringScalar, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif
      static struct __pyx_vtabstruct_7pyarrow_3lib_BinaryViewScalar __pyx_vtable_7pyarrow_3lib_BinaryViewScalar;

      static PyObject *__pyx_tp_new_7pyarrow_3lib_BinaryViewScalar(PyTypeObject *t, PyObject *a, PyObject *k) {
        struct __pyx_obj_7pyarrow_3lib_BinaryViewScalar *p;
        PyObject *o = __pyx_tp_new_7pyarrow_3lib_BinaryScalar(t, a, k);
        if (unlikely(!o)) return 0;
        p = ((struct __pyx_obj_7pyarrow_3lib_BinaryViewScalar *)o);
        p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_Scalar*)__pyx_vtabptr_7pyarrow_3lib_BinaryViewScalar;
        return o;
      }
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib_BinaryViewScalar_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_Scalar},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_BinaryViewScalar},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib_BinaryViewScalar_spec = {
        "pyarrow.lib.BinaryViewScalar",
        sizeof(struct __pyx_obj_7pyarrow_3lib_BinaryViewScalar),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
        __pyx_type_7pyarrow_3lib_BinaryViewScalar_slots,
      };
      #else

      static PyTypeObject __pyx_type_7pyarrow_3lib_BinaryViewScalar = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""BinaryViewScalar", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib_BinaryViewScalar), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib_Scalar, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_7__repr__, /*tp_repr*/
        #else
        0, /*tp_repr*/
        #endif
        0, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_9__str__, /*tp_str*/
        #else
        0, /*tp_str*/
        #endif
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
        0, /*tp_doc*/
        0, /*tp_traverse*/
        0, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        0, /*tp_iter*/
        0, /*tp_iternext*/
        0, /*tp_methods*/
        0, /*tp_members*/
        0, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_1__init__, /*tp_init*/
        #else
        0, /*tp_init*/
        #endif
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib_BinaryViewScalar, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif
      static struct __pyx_vtabstruct_7pyarrow_3lib_StringViewScalar __pyx_vtable_7pyarrow_3lib_StringViewScalar;

      static PyObject *__pyx_tp_new_7pyarrow_3lib_StringViewScalar(PyTypeObject *t, PyObject *a, PyObject *k) {
        struct __pyx_obj_7pyarrow_3lib_StringViewScalar *p;
        PyObject *o = __pyx_tp_new_7pyarrow_3lib_StringScalar(t, a, k);
        if (unlikely(!o)) return 0;
        p = ((struct __pyx_obj_7pyarrow_3lib_StringViewScalar *)o);
        p->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_Scalar*)__pyx_vtabptr_7pyarrow_3lib_StringViewScalar;
        return o;
      }
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib_StringViewScalar_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_Scalar},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_StringViewScalar},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib_StringViewScalar_spec = {
        "pyarrow.lib.StringViewScalar",
        sizeof(struct __pyx_obj_7pyarrow_3lib_StringViewScalar),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
        __pyx_type_7pyarrow_3lib_StringViewScalar_slots,
      };
      #else

      static PyTypeObject __pyx_type_7pyarrow_3lib_StringViewScalar = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""StringViewScalar", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib_StringViewScalar), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib_Scalar, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_7__repr__, /*tp_repr*/
        #else
        0, /*tp_repr*/
        #endif
        0, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_9__str__, /*tp_str*/
        #else
        0, /*tp_str*/
        #endif
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
        0, /*tp_doc*/
        0, /*tp_traverse*/
        0, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        0, /*tp_iter*/
        0, /*tp_iternext*/
        0, /*tp_methods*/
        0, /*tp_members*/
        0, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_1__init__, /*tp_init*/
        #else
        0, /*tp_init*/
        #endif
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib_StringViewScalar, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif
      static struct __pyx_vtabstruct_7pyarrow_3lib_ListScalar __pyx_vtable_7pyarrow_3lib_ListScalar;

      static PyObject *__pyx_tp_new_7pyarrow_3lib_ListScalar(PyTypeObject *t, PyObject *a, PyObject *k) {
        struct __pyx_obj_7pyarrow_3lib_ListScalar *p;
        PyObject *o = __pyx_tp_new_7pyarrow_3lib_Scalar(t, a, k);
        if (unlikely(!o)) return 0;
        p = ((struct __pyx_obj_7pyarrow_3lib_ListScalar *)o);
        p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_Scalar*)__pyx_vtabptr_7pyarrow_3lib_ListScalar;
        return o;
      }

      static PyObject *__pyx_sq_item_7pyarrow_3lib_ListScalar(PyObject *o, Py_ssize_t i) {
        PyObject *r;
        PyObject *x = PyLong_FromSsize_t(i); if(!x) return 0;
        #if CYTHON_USE_TYPE_SLOTS || (!CYTHON_USE_TYPE_SPECS && __PYX_LIMITED_VERSION_HEX < 0x030A0000)
        r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
        #else
        r = ((binaryfunc)PyType_GetSlot(Py_TYPE(o), Py_mp_subscript))(o, x);
        #endif
        Py_DECREF(x);
        return r;
      }

      static PyObject *__pyx_getprop_7pyarrow_3lib_10ListScalar_values(PyObject *o, CYTHON_UNUSED void *x) {
        return __pyx_pw_7pyarrow_3lib_10ListScalar_6values_1__get__(o);
      }

      static PyMethodDef __pyx_methods_7pyarrow_3lib_ListScalar[] = {
        {"as_py", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10ListScalar_7as_py, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10ListScalar_6as_py},
        {0, 0, 0, 0}
      };

      static struct PyGetSetDef __pyx_getsets_7pyarrow_3lib_ListScalar[] = {
        {"values", __pyx_getprop_7pyarrow_3lib_10ListScalar_values, 0, 0, 0},
        {0, 0, 0, 0, 0}
      };
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib_ListScalar_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_Scalar},
        {Py_sq_length, (void *)__pyx_pw_7pyarrow_3lib_10ListScalar_1__len__},
        {Py_sq_item, (void *)__pyx_sq_item_7pyarrow_3lib_ListScalar},
        {Py_mp_length, (void *)__pyx_pw_7pyarrow_3lib_10ListScalar_1__len__},
        {Py_mp_subscript, (void *)__pyx_pw_7pyarrow_3lib_10ListScalar_3__getitem__},
        {Py_tp_doc, (void *)PyDoc_STR("\n    Concrete class for list-like scalars.\n    ")},
        {Py_tp_iter, (void *)__pyx_pw_7pyarrow_3lib_10ListScalar_5__iter__},
        {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_ListScalar},
        {Py_tp_getset, (void *)__pyx_getsets_7pyarrow_3lib_ListScalar},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_ListScalar},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib_ListScalar_spec = {
        "pyarrow.lib.ListScalar",
        sizeof(struct __pyx_obj_7pyarrow_3lib_ListScalar),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
        __pyx_type_7pyarrow_3lib_ListScalar_slots,
      };
      #else

      static PySequenceMethods __pyx_tp_as_sequence_ListScalar = {
        __pyx_pw_7pyarrow_3lib_10ListScalar_1__len__, /*sq_length*/
        0, /*sq_concat*/
        0, /*sq_repeat*/
        __pyx_sq_item_7pyarrow_3lib_ListScalar, /*sq_item*/
        0, /*sq_slice*/
        0, /*sq_ass_item*/
        0, /*sq_ass_slice*/
        0, /*sq_contains*/
        0, /*sq_inplace_concat*/
        0, /*sq_inplace_repeat*/
      };

      static PyMappingMethods __pyx_tp_as_mapping_ListScalar = {
        __pyx_pw_7pyarrow_3lib_10ListScalar_1__len__, /*mp_length*/
        __pyx_pw_7pyarrow_3lib_10ListScalar_3__getitem__, /*mp_subscript*/
        0, /*mp_ass_subscript*/
      };

      static PyTypeObject __pyx_type_7pyarrow_3lib_ListScalar = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""ListScalar", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib_ListScalar), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib_Scalar, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_7__repr__, /*tp_repr*/
        #else
        0, /*tp_repr*/
        #endif
        0, /*tp_as_number*/
        &__pyx_tp_as_sequence_ListScalar, /*tp_as_sequence*/
        &__pyx_tp_as_mapping_ListScalar, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_9__str__, /*tp_str*/
        #else
        0, /*tp_str*/
        #endif
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
        PyDoc_STR("\n    Concrete class for list-like scalars.\n    "), /*tp_doc*/
        0, /*tp_traverse*/
        0, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        __pyx_pw_7pyarrow_3lib_10ListScalar_5__iter__, /*tp_iter*/
        0, /*tp_iternext*/
        __pyx_methods_7pyarrow_3lib_ListScalar, /*tp_methods*/
        0, /*tp_members*/
        __pyx_getsets_7pyarrow_3lib_ListScalar, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_1__init__, /*tp_init*/
        #else
        0, /*tp_init*/
        #endif
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib_ListScalar, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif
      static struct __pyx_vtabstruct_7pyarrow_3lib_FixedSizeListScalar __pyx_vtable_7pyarrow_3lib_FixedSizeListScalar;

      static PyObject *__pyx_tp_new_7pyarrow_3lib_FixedSizeListScalar(PyTypeObject *t, PyObject *a, PyObject *k) {
        struct __pyx_obj_7pyarrow_3lib_FixedSizeListScalar *p;
        PyObject *o = __pyx_tp_new_7pyarrow_3lib_ListScalar(t, a, k);
        if (unlikely(!o)) return 0;
        p = ((struct __pyx_obj_7pyarrow_3lib_FixedSizeListScalar *)o);
        p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_Scalar*)__pyx_vtabptr_7pyarrow_3lib_FixedSizeListScalar;
        return o;
      }
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib_FixedSizeListScalar_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_Scalar},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_FixedSizeListScalar},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib_FixedSizeListScalar_spec = {
        "pyarrow.lib.FixedSizeListScalar",
        sizeof(struct __pyx_obj_7pyarrow_3lib_FixedSizeListScalar),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
        __pyx_type_7pyarrow_3lib_FixedSizeListScalar_slots,
      };
      #else

      static PyTypeObject __pyx_type_7pyarrow_3lib_FixedSizeListScalar = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""FixedSizeListScalar", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib_FixedSizeListScalar), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib_Scalar, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_7__repr__, /*tp_repr*/
        #else
        0, /*tp_repr*/
        #endif
        0, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_9__str__, /*tp_str*/
        #else
        0, /*tp_str*/
        #endif
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
        0, /*tp_doc*/
        0, /*tp_traverse*/
        0, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_10ListScalar_5__iter__, /*tp_iter*/
        #else
        0, /*tp_iter*/
        #endif
        0, /*tp_iternext*/
        0, /*tp_methods*/
        0, /*tp_members*/
        0, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_1__init__, /*tp_init*/
        #else
        0, /*tp_init*/
        #endif
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib_FixedSizeListScalar, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif
      static struct __pyx_vtabstruct_7pyarrow_3lib_LargeListScalar __pyx_vtable_7pyarrow_3lib_LargeListScalar;

      static PyObject *__pyx_tp_new_7pyarrow_3lib_LargeListScalar(PyTypeObject *t, PyObject *a, PyObject *k) {
        struct __pyx_obj_7pyarrow_3lib_LargeListScalar *p;
        PyObject *o = __pyx_tp_new_7pyarrow_3lib_ListScalar(t, a, k);
        if (unlikely(!o)) return 0;
        p = ((struct __pyx_obj_7pyarrow_3lib_LargeListScalar *)o);
        p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_Scalar*)__pyx_vtabptr_7pyarrow_3lib_LargeListScalar;
        return o;
      }
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib_LargeListScalar_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_Scalar},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_LargeListScalar},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib_LargeListScalar_spec = {
        "pyarrow.lib.LargeListScalar",
        sizeof(struct __pyx_obj_7pyarrow_3lib_LargeListScalar),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
        __pyx_type_7pyarrow_3lib_LargeListScalar_slots,
      };
      #else

      static PyTypeObject __pyx_type_7pyarrow_3lib_LargeListScalar = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""LargeListScalar", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib_LargeListScalar), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib_Scalar, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_7__repr__, /*tp_repr*/
        #else
        0, /*tp_repr*/
        #endif
        0, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_9__str__, /*tp_str*/
        #else
        0, /*tp_str*/
        #endif
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
        0, /*tp_doc*/
        0, /*tp_traverse*/
        0, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_10ListScalar_5__iter__, /*tp_iter*/
        #else
        0, /*tp_iter*/
        #endif
        0, /*tp_iternext*/
        0, /*tp_methods*/
        0, /*tp_members*/
        0, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_1__init__, /*tp_init*/
        #else
        0, /*tp_init*/
        #endif
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib_LargeListScalar, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif
      static struct __pyx_vtabstruct_7pyarrow_3lib_ListViewScalar __pyx_vtable_7pyarrow_3lib_ListViewScalar;

      static PyObject *__pyx_tp_new_7pyarrow_3lib_ListViewScalar(PyTypeObject *t, PyObject *a, PyObject *k) {
        struct __pyx_obj_7pyarrow_3lib_ListViewScalar *p;
        PyObject *o = __pyx_tp_new_7pyarrow_3lib_ListScalar(t, a, k);
        if (unlikely(!o)) return 0;
        p = ((struct __pyx_obj_7pyarrow_3lib_ListViewScalar *)o);
        p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_Scalar*)__pyx_vtabptr_7pyarrow_3lib_ListViewScalar;
        return o;
      }
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib_ListViewScalar_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_Scalar},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_ListViewScalar},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib_ListViewScalar_spec = {
        "pyarrow.lib.ListViewScalar",
        sizeof(struct __pyx_obj_7pyarrow_3lib_ListViewScalar),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
        __pyx_type_7pyarrow_3lib_ListViewScalar_slots,
      };
      #else

      static PyTypeObject __pyx_type_7pyarrow_3lib_ListViewScalar = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""ListViewScalar", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib_ListViewScalar), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib_Scalar, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_7__repr__, /*tp_repr*/
        #else
        0, /*tp_repr*/
        #endif
        0, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_9__str__, /*tp_str*/
        #else
        0, /*tp_str*/
        #endif
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
        0, /*tp_doc*/
        0, /*tp_traverse*/
        0, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_10ListScalar_5__iter__, /*tp_iter*/
        #else
        0, /*tp_iter*/
        #endif
        0, /*tp_iternext*/
        0, /*tp_methods*/
        0, /*tp_members*/
        0, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_1__init__, /*tp_init*/
        #else
        0, /*tp_init*/
        #endif
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib_ListViewScalar, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif
      static struct __pyx_vtabstruct_7pyarrow_3lib_LargeListViewScalar __pyx_vtable_7pyarrow_3lib_LargeListViewScalar;

      static PyObject *__pyx_tp_new_7pyarrow_3lib_LargeListViewScalar(PyTypeObject *t, PyObject *a, PyObject *k) {
        struct __pyx_obj_7pyarrow_3lib_LargeListViewScalar *p;
        PyObject *o = __pyx_tp_new_7pyarrow_3lib_ListScalar(t, a, k);
        if (unlikely(!o)) return 0;
        p = ((struct __pyx_obj_7pyarrow_3lib_LargeListViewScalar *)o);
        p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_Scalar*)__pyx_vtabptr_7pyarrow_3lib_LargeListViewScalar;
        return o;
      }
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib_LargeListViewScalar_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_Scalar},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_LargeListViewScalar},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib_LargeListViewScalar_spec = {
        "pyarrow.lib.LargeListViewScalar",
        sizeof(struct __pyx_obj_7pyarrow_3lib_LargeListViewScalar),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
        __pyx_type_7pyarrow_3lib_LargeListViewScalar_slots,
      };
      #else

      static PyTypeObject __pyx_type_7pyarrow_3lib_LargeListViewScalar = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""LargeListViewScalar", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib_LargeListViewScalar), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib_Scalar, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_7__repr__, /*tp_repr*/
        #else
        0, /*tp_repr*/
        #endif
        0, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_9__str__, /*tp_str*/
        #else
        0, /*tp_str*/
        #endif
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
        0, /*tp_doc*/
        0, /*tp_traverse*/
        0, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_10ListScalar_5__iter__, /*tp_iter*/
        #else
        0, /*tp_iter*/
        #endif
        0, /*tp_iternext*/
        0, /*tp_methods*/
        0, /*tp_members*/
        0, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_1__init__, /*tp_init*/
        #else
        0, /*tp_init*/
        #endif
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib_LargeListViewScalar, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif
      static struct __pyx_vtabstruct_7pyarrow_3lib_StructScalar __pyx_vtable_7pyarrow_3lib_StructScalar;

      static PyObject *__pyx_tp_new_7pyarrow_3lib_StructScalar(PyTypeObject *t, PyObject *a, PyObject *k) {
        struct __pyx_obj_7pyarrow_3lib_StructScalar *p;
        PyObject *o = __pyx_tp_new_7pyarrow_3lib_Scalar(t, a, k);
        if (unlikely(!o)) return 0;
        p = ((struct __pyx_obj_7pyarrow_3lib_StructScalar *)o);
        p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_Scalar*)__pyx_vtabptr_7pyarrow_3lib_StructScalar;
        return o;
      }

      static PyObject *__pyx_sq_item_7pyarrow_3lib_StructScalar(PyObject *o, Py_ssize_t i) {
        PyObject *r;
        PyObject *x = PyLong_FromSsize_t(i); if(!x) return 0;
        #if CYTHON_USE_TYPE_SLOTS || (!CYTHON_USE_TYPE_SPECS && __PYX_LIMITED_VERSION_HEX < 0x030A0000)
        r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
        #else
        r = ((binaryfunc)PyType_GetSlot(Py_TYPE(o), Py_mp_subscript))(o, x);
        #endif
        Py_DECREF(x);
        return r;
      }

      static PyMethodDef __pyx_methods_7pyarrow_3lib_StructScalar[] = {
        {"items", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12StructScalar_6items, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12StructScalar_5items},
        {"as_py", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12StructScalar_12as_py, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12StructScalar_11as_py},
        {"_as_py_tuple", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12StructScalar_14_as_py_tuple, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12StructScalar_13_as_py_tuple},
        {0, 0, 0, 0}
      };
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib_StructScalar_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_Scalar},
        {Py_tp_repr, (void *)__pyx_pw_7pyarrow_3lib_12StructScalar_16__repr__},
        {Py_sq_length, (void *)__pyx_pw_7pyarrow_3lib_12StructScalar_1__len__},
        {Py_sq_item, (void *)__pyx_sq_item_7pyarrow_3lib_StructScalar},
        {Py_sq_contains, (void *)__pyx_pw_7pyarrow_3lib_12StructScalar_8__contains__},
        {Py_mp_length, (void *)__pyx_pw_7pyarrow_3lib_12StructScalar_1__len__},
        {Py_mp_subscript, (void *)__pyx_pw_7pyarrow_3lib_12StructScalar_10__getitem__},
        {Py_tp_str, (void *)__pyx_pw_7pyarrow_3lib_12StructScalar_18__str__},
        {Py_tp_doc, (void *)PyDoc_STR("\n    Concrete class for struct scalars.\n    ")},
        {Py_tp_iter, (void *)__pyx_pw_7pyarrow_3lib_12StructScalar_3__iter__},
        {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_StructScalar},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_StructScalar},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib_StructScalar_spec = {
        "pyarrow.lib.StructScalar",
        sizeof(struct __pyx_obj_7pyarrow_3lib_StructScalar),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
        __pyx_type_7pyarrow_3lib_StructScalar_slots,
      };
      #else

      static PySequenceMethods __pyx_tp_as_sequence_StructScalar = {
        __pyx_pw_7pyarrow_3lib_12StructScalar_1__len__, /*sq_length*/
        0, /*sq_concat*/
        0, /*sq_repeat*/
        __pyx_sq_item_7pyarrow_3lib_StructScalar, /*sq_item*/
        0, /*sq_slice*/
        0, /*sq_ass_item*/
        0, /*sq_ass_slice*/
        __pyx_pw_7pyarrow_3lib_12StructScalar_8__contains__, /*sq_contains*/
        0, /*sq_inplace_concat*/
        0, /*sq_inplace_repeat*/
      };

      static PyMappingMethods __pyx_tp_as_mapping_StructScalar = {
        __pyx_pw_7pyarrow_3lib_12StructScalar_1__len__, /*mp_length*/
        __pyx_pw_7pyarrow_3lib_12StructScalar_10__getitem__, /*mp_subscript*/
        0, /*mp_ass_subscript*/
      };

      static PyTypeObject __pyx_type_7pyarrow_3lib_StructScalar = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""StructScalar", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib_StructScalar), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib_Scalar, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        __pyx_pw_7pyarrow_3lib_12StructScalar_16__repr__, /*tp_repr*/
        0, /*tp_as_number*/
        &__pyx_tp_as_sequence_StructScalar, /*tp_as_sequence*/
        &__pyx_tp_as_mapping_StructScalar, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        __pyx_pw_7pyarrow_3lib_12StructScalar_18__str__, /*tp_str*/
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
        PyDoc_STR("\n    Concrete class for struct scalars.\n    "), /*tp_doc*/
        0, /*tp_traverse*/
        0, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        __pyx_pw_7pyarrow_3lib_12StructScalar_3__iter__, /*tp_iter*/
        0, /*tp_iternext*/
        __pyx_methods_7pyarrow_3lib_StructScalar, /*tp_methods*/
        0, /*tp_members*/
        0, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_1__init__, /*tp_init*/
        #else
        0, /*tp_init*/
        #endif
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib_StructScalar, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif
      static struct __pyx_vtabstruct_7pyarrow_3lib_MapScalar __pyx_vtable_7pyarrow_3lib_MapScalar;

      static PyObject *__pyx_tp_new_7pyarrow_3lib_MapScalar(PyTypeObject *t, PyObject *a, PyObject *k) {
        struct __pyx_obj_7pyarrow_3lib_MapScalar *p;
        PyObject *o = __pyx_tp_new_7pyarrow_3lib_ListScalar(t, a, k);
        if (unlikely(!o)) return 0;
        p = ((struct __pyx_obj_7pyarrow_3lib_MapScalar *)o);
        p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_Scalar*)__pyx_vtabptr_7pyarrow_3lib_MapScalar;
        return o;
      }

      static PyObject *__pyx_sq_item_7pyarrow_3lib_MapScalar(PyObject *o, Py_ssize_t i) {
        PyObject *r;
        PyObject *x = PyLong_FromSsize_t(i); if(!x) return 0;
        #if CYTHON_USE_TYPE_SLOTS || (!CYTHON_USE_TYPE_SPECS && __PYX_LIMITED_VERSION_HEX < 0x030A0000)
        r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
        #else
        r = ((binaryfunc)PyType_GetSlot(Py_TYPE(o), Py_mp_subscript))(o, x);
        #endif
        Py_DECREF(x);
        return r;
      }

      static PyMethodDef __pyx_methods_7pyarrow_3lib_MapScalar[] = {
        {"as_py", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_9MapScalar_6as_py, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_9MapScalar_5as_py},
        {"keys", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_9MapScalar_8keys, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_9MapScalar_7keys},
        {0, 0, 0, 0}
      };
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib_MapScalar_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_Scalar},
        {Py_sq_item, (void *)__pyx_sq_item_7pyarrow_3lib_MapScalar},
        {Py_mp_subscript, (void *)__pyx_pw_7pyarrow_3lib_9MapScalar_1__getitem__},
        {Py_tp_doc, (void *)PyDoc_STR("\n    Concrete class for map scalars.\n    ")},
        {Py_tp_iter, (void *)__pyx_pw_7pyarrow_3lib_9MapScalar_3__iter__},
        {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_MapScalar},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_MapScalar},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib_MapScalar_spec = {
        "pyarrow.lib.MapScalar",
        sizeof(struct __pyx_obj_7pyarrow_3lib_MapScalar),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
        __pyx_type_7pyarrow_3lib_MapScalar_slots,
      };
      #else

      static PySequenceMethods __pyx_tp_as_sequence_MapScalar = {
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_10ListScalar_1__len__, /*sq_length*/
        #else
        0, /*sq_length*/
        #endif
        0, /*sq_concat*/
        0, /*sq_repeat*/
        __pyx_sq_item_7pyarrow_3lib_MapScalar, /*sq_item*/
        0, /*sq_slice*/
        0, /*sq_ass_item*/
        0, /*sq_ass_slice*/
        0, /*sq_contains*/
        0, /*sq_inplace_concat*/
        0, /*sq_inplace_repeat*/
      };

      static PyMappingMethods __pyx_tp_as_mapping_MapScalar = {
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_10ListScalar_1__len__, /*mp_length*/
        #else
        0, /*mp_length*/
        #endif
        __pyx_pw_7pyarrow_3lib_9MapScalar_1__getitem__, /*mp_subscript*/
        0, /*mp_ass_subscript*/
      };

      static PyTypeObject __pyx_type_7pyarrow_3lib_MapScalar = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""MapScalar", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib_MapScalar), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib_Scalar, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_7__repr__, /*tp_repr*/
        #else
        0, /*tp_repr*/
        #endif
        0, /*tp_as_number*/
        &__pyx_tp_as_sequence_MapScalar, /*tp_as_sequence*/
        &__pyx_tp_as_mapping_MapScalar, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_9__str__, /*tp_str*/
        #else
        0, /*tp_str*/
        #endif
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
        PyDoc_STR("\n    Concrete class for map scalars.\n    "), /*tp_doc*/
        0, /*tp_traverse*/
        0, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        __pyx_pw_7pyarrow_3lib_9MapScalar_3__iter__, /*tp_iter*/
        0, /*tp_iternext*/
        __pyx_methods_7pyarrow_3lib_MapScalar, /*tp_methods*/
        0, /*tp_members*/
        0, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_1__init__, /*tp_init*/
        #else
        0, /*tp_init*/
        #endif
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib_MapScalar, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif
      static struct __pyx_vtabstruct_7pyarrow_3lib_DictionaryScalar __pyx_vtable_7pyarrow_3lib_DictionaryScalar;

      static PyObject *__pyx_tp_new_7pyarrow_3lib_DictionaryScalar(PyTypeObject *t, PyObject *a, PyObject *k) {
        struct __pyx_obj_7pyarrow_3lib_DictionaryScalar *p;
        PyObject *o = __pyx_tp_new_7pyarrow_3lib_Scalar(t, a, k);
        if (unlikely(!o)) return 0;
        p = ((struct __pyx_obj_7pyarrow_3lib_DictionaryScalar *)o);
        p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_Scalar*)__pyx_vtabptr_7pyarrow_3lib_DictionaryScalar;
        return o;
      }

      static PyObject *__pyx_getprop_7pyarrow_3lib_16DictionaryScalar_index(PyObject *o, CYTHON_UNUSED void *x) {
        return __pyx_pw_7pyarrow_3lib_16DictionaryScalar_5index_1__get__(o);
      }

      static PyObject *__pyx_getprop_7pyarrow_3lib_16DictionaryScalar_value(PyObject *o, CYTHON_UNUSED void *x) {
        return __pyx_pw_7pyarrow_3lib_16DictionaryScalar_5value_1__get__(o);
      }

      static PyObject *__pyx_getprop_7pyarrow_3lib_16DictionaryScalar_dictionary(PyObject *o, CYTHON_UNUSED void *x) {
        return __pyx_pw_7pyarrow_3lib_16DictionaryScalar_10dictionary_1__get__(o);
      }

      static PyMethodDef __pyx_methods_7pyarrow_3lib_DictionaryScalar[] = {
        {"_reconstruct", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_16DictionaryScalar_1_reconstruct, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_16DictionaryScalar__reconstruct},
        {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_16DictionaryScalar_3__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_16DictionaryScalar_2__reduce__},
        {"as_py", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_16DictionaryScalar_5as_py, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_16DictionaryScalar_4as_py},
        {0, 0, 0, 0}
      };

      static struct PyGetSetDef __pyx_getsets_7pyarrow_3lib_DictionaryScalar[] = {
        {"index", __pyx_getprop_7pyarrow_3lib_16DictionaryScalar_index, 0, PyDoc_STR("\n        Return this value's underlying index as a scalar.\n        "), 0},
        {"value", __pyx_getprop_7pyarrow_3lib_16DictionaryScalar_value, 0, PyDoc_STR("\n        Return the encoded value as a scalar.\n        "), 0},
        {"dictionary", __pyx_getprop_7pyarrow_3lib_16DictionaryScalar_dictionary, 0, 0, 0},
        {0, 0, 0, 0, 0}
      };
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib_DictionaryScalar_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_Scalar},
        {Py_tp_doc, (void *)PyDoc_STR("\n    Concrete class for dictionary-encoded scalars.\n    ")},
        {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_DictionaryScalar},
        {Py_tp_getset, (void *)__pyx_getsets_7pyarrow_3lib_DictionaryScalar},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_DictionaryScalar},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib_DictionaryScalar_spec = {
        "pyarrow.lib.DictionaryScalar",
        sizeof(struct __pyx_obj_7pyarrow_3lib_DictionaryScalar),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
        __pyx_type_7pyarrow_3lib_DictionaryScalar_slots,
      };
      #else

      static PyTypeObject __pyx_type_7pyarrow_3lib_DictionaryScalar = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""DictionaryScalar", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib_DictionaryScalar), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib_Scalar, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_7__repr__, /*tp_repr*/
        #else
        0, /*tp_repr*/
        #endif
        0, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_9__str__, /*tp_str*/
        #else
        0, /*tp_str*/
        #endif
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
        PyDoc_STR("\n    Concrete class for dictionary-encoded scalars.\n    "), /*tp_doc*/
        0, /*tp_traverse*/
        0, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        0, /*tp_iter*/
        0, /*tp_iternext*/
        __pyx_methods_7pyarrow_3lib_DictionaryScalar, /*tp_methods*/
        0, /*tp_members*/
        __pyx_getsets_7pyarrow_3lib_DictionaryScalar, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_1__init__, /*tp_init*/
        #else
        0, /*tp_init*/
        #endif
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib_DictionaryScalar, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif
      static struct __pyx_vtabstruct_7pyarrow_3lib_RunEndEncodedScalar __pyx_vtable_7pyarrow_3lib_RunEndEncodedScalar;

      static PyObject *__pyx_tp_new_7pyarrow_3lib_RunEndEncodedScalar(PyTypeObject *t, PyObject *a, PyObject *k) {
        struct __pyx_obj_7pyarrow_3lib_RunEndEncodedScalar *p;
        PyObject *o = __pyx_tp_new_7pyarrow_3lib_Scalar(t, a, k);
        if (unlikely(!o)) return 0;
        p = ((struct __pyx_obj_7pyarrow_3lib_RunEndEncodedScalar *)o);
        p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_Scalar*)__pyx_vtabptr_7pyarrow_3lib_RunEndEncodedScalar;
        return o;
      }

      static PyObject *__pyx_getprop_7pyarrow_3lib_19RunEndEncodedScalar_value(PyObject *o, CYTHON_UNUSED void *x) {
        return __pyx_pw_7pyarrow_3lib_19RunEndEncodedScalar_5value_1__get__(o);
      }

      static PyMethodDef __pyx_methods_7pyarrow_3lib_RunEndEncodedScalar[] = {
        {"as_py", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_19RunEndEncodedScalar_1as_py, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_19RunEndEncodedScalar_as_py},
        {0, 0, 0, 0}
      };

      static struct PyGetSetDef __pyx_getsets_7pyarrow_3lib_RunEndEncodedScalar[] = {
        {"value", __pyx_getprop_7pyarrow_3lib_19RunEndEncodedScalar_value, 0, PyDoc_STR("\n        Return underlying value as a scalar.\n        "), 0},
        {0, 0, 0, 0, 0}
      };
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib_RunEndEncodedScalar_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_Scalar},
        {Py_tp_doc, (void *)PyDoc_STR("\n    Concrete class for RunEndEncoded scalars.\n    ")},
        {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_RunEndEncodedScalar},
        {Py_tp_getset, (void *)__pyx_getsets_7pyarrow_3lib_RunEndEncodedScalar},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_RunEndEncodedScalar},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib_RunEndEncodedScalar_spec = {
        "pyarrow.lib.RunEndEncodedScalar",
        sizeof(struct __pyx_obj_7pyarrow_3lib_RunEndEncodedScalar),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
        __pyx_type_7pyarrow_3lib_RunEndEncodedScalar_slots,
      };
      #else

      static PyTypeObject __pyx_type_7pyarrow_3lib_RunEndEncodedScalar = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""RunEndEncodedScalar", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib_RunEndEncodedScalar), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib_Scalar, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_7__repr__, /*tp_repr*/
        #else
        0, /*tp_repr*/
        #endif
        0, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_9__str__, /*tp_str*/
        #else
        0, /*tp_str*/
        #endif
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
        PyDoc_STR("\n    Concrete class for RunEndEncoded scalars.\n    "), /*tp_doc*/
        0, /*tp_traverse*/
        0, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        0, /*tp_iter*/
        0, /*tp_iternext*/
        __pyx_methods_7pyarrow_3lib_RunEndEncodedScalar, /*tp_methods*/
        0, /*tp_members*/
        __pyx_getsets_7pyarrow_3lib_RunEndEncodedScalar, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_1__init__, /*tp_init*/
        #else
        0, /*tp_init*/
        #endif
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib_RunEndEncodedScalar, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif
      static struct __pyx_vtabstruct_7pyarrow_3lib_UnionScalar __pyx_vtable_7pyarrow_3lib_UnionScalar;

      static PyObject *__pyx_tp_new_7pyarrow_3lib_UnionScalar(PyTypeObject *t, PyObject *a, PyObject *k) {
        struct __pyx_obj_7pyarrow_3lib_UnionScalar *p;
        PyObject *o = __pyx_tp_new_7pyarrow_3lib_Scalar(t, a, k);
        if (unlikely(!o)) return 0;
        p = ((struct __pyx_obj_7pyarrow_3lib_UnionScalar *)o);
        p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_Scalar*)__pyx_vtabptr_7pyarrow_3lib_UnionScalar;
        return o;
      }

      static PyObject *__pyx_getprop_7pyarrow_3lib_11UnionScalar_value(PyObject *o, CYTHON_UNUSED void *x) {
        return __pyx_pw_7pyarrow_3lib_11UnionScalar_5value_1__get__(o);
      }

      static PyObject *__pyx_getprop_7pyarrow_3lib_11UnionScalar_type_code(PyObject *o, CYTHON_UNUSED void *x) {
        return __pyx_pw_7pyarrow_3lib_11UnionScalar_9type_code_1__get__(o);
      }

      static PyMethodDef __pyx_methods_7pyarrow_3lib_UnionScalar[] = {
        {"as_py", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_11UnionScalar_1as_py, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_11UnionScalar_as_py},
        {0, 0, 0, 0}
      };

      static struct PyGetSetDef __pyx_getsets_7pyarrow_3lib_UnionScalar[] = {
        {"value", __pyx_getprop_7pyarrow_3lib_11UnionScalar_value, 0, PyDoc_STR("\n        Return underlying value as a scalar.\n        "), 0},
        {"type_code", __pyx_getprop_7pyarrow_3lib_11UnionScalar_type_code, 0, PyDoc_STR("\n        Return the union type code for this scalar.\n        "), 0},
        {0, 0, 0, 0, 0}
      };
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib_UnionScalar_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_Scalar},
        {Py_tp_doc, (void *)PyDoc_STR("\n    Concrete class for Union scalars.\n    ")},
        {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_UnionScalar},
        {Py_tp_getset, (void *)__pyx_getsets_7pyarrow_3lib_UnionScalar},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_UnionScalar},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib_UnionScalar_spec = {
        "pyarrow.lib.UnionScalar",
        sizeof(struct __pyx_obj_7pyarrow_3lib_UnionScalar),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
        __pyx_type_7pyarrow_3lib_UnionScalar_slots,
      };
      #else

      static PyTypeObject __pyx_type_7pyarrow_3lib_UnionScalar = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""UnionScalar", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib_UnionScalar), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib_Scalar, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_7__repr__, /*tp_repr*/
        #else
        0, /*tp_repr*/
        #endif
        0, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_9__str__, /*tp_str*/
        #else
        0, /*tp_str*/
        #endif
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
        PyDoc_STR("\n    Concrete class for Union scalars.\n    "), /*tp_doc*/
        0, /*tp_traverse*/
        0, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        0, /*tp_iter*/
        0, /*tp_iternext*/
        __pyx_methods_7pyarrow_3lib_UnionScalar, /*tp_methods*/
        0, /*tp_members*/
        __pyx_getsets_7pyarrow_3lib_UnionScalar, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_1__init__, /*tp_init*/
        #else
        0, /*tp_init*/
        #endif
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib_UnionScalar, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif
      static struct __pyx_vtabstruct_7pyarrow_3lib_ExtensionScalar __pyx_vtable_7pyarrow_3lib_ExtensionScalar;

      static PyObject *__pyx_tp_new_7pyarrow_3lib_ExtensionScalar(PyTypeObject *t, PyObject *a, PyObject *k) {
        struct __pyx_obj_7pyarrow_3lib_ExtensionScalar *p;
        PyObject *o = __pyx_tp_new_7pyarrow_3lib_Scalar(t, a, k);
        if (unlikely(!o)) return 0;
        p = ((struct __pyx_obj_7pyarrow_3lib_ExtensionScalar *)o);
        p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_Scalar*)__pyx_vtabptr_7pyarrow_3lib_ExtensionScalar;
        return o;
      }

      static PyObject *__pyx_getprop_7pyarrow_3lib_15ExtensionScalar_value(PyObject *o, CYTHON_UNUSED void *x) {
        return __pyx_pw_7pyarrow_3lib_15ExtensionScalar_5value_1__get__(o);
      }

      static PyMethodDef __pyx_methods_7pyarrow_3lib_ExtensionScalar[] = {
        {"as_py", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15ExtensionScalar_1as_py, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15ExtensionScalar_as_py},
        {"from_storage", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_15ExtensionScalar_3from_storage, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_15ExtensionScalar_2from_storage},
        {0, 0, 0, 0}
      };

      static struct PyGetSetDef __pyx_getsets_7pyarrow_3lib_ExtensionScalar[] = {
        {"value", __pyx_getprop_7pyarrow_3lib_15ExtensionScalar_value, 0, PyDoc_STR("\n        Return storage value as a scalar.\n        "), 0},
        {0, 0, 0, 0, 0}
      };
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib_ExtensionScalar_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_Scalar},
        {Py_tp_doc, (void *)PyDoc_STR("\n    Concrete class for Extension scalars.\n    ")},
        {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_ExtensionScalar},
        {Py_tp_getset, (void *)__pyx_getsets_7pyarrow_3lib_ExtensionScalar},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_ExtensionScalar},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib_ExtensionScalar_spec = {
        "pyarrow.lib.ExtensionScalar",
        sizeof(struct __pyx_obj_7pyarrow_3lib_ExtensionScalar),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
        __pyx_type_7pyarrow_3lib_ExtensionScalar_slots,
      };
      #else

      static PyTypeObject __pyx_type_7pyarrow_3lib_ExtensionScalar = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""ExtensionScalar", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib_ExtensionScalar), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib_Scalar, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_7__repr__, /*tp_repr*/
        #else
        0, /*tp_repr*/
        #endif
        0, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_9__str__, /*tp_str*/
        #else
        0, /*tp_str*/
        #endif
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
        PyDoc_STR("\n    Concrete class for Extension scalars.\n    "), /*tp_doc*/
        0, /*tp_traverse*/
        0, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        0, /*tp_iter*/
        0, /*tp_iternext*/
        __pyx_methods_7pyarrow_3lib_ExtensionScalar, /*tp_methods*/
        0, /*tp_members*/
        __pyx_getsets_7pyarrow_3lib_ExtensionScalar, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_1__init__, /*tp_init*/
        #else
        0, /*tp_init*/
        #endif
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib_ExtensionScalar, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif
      static struct __pyx_vtabstruct_7pyarrow_3lib_FixedShapeTensorScalar __pyx_vtable_7pyarrow_3lib_FixedShapeTensorScalar;

      static PyObject *__pyx_tp_new_7pyarrow_3lib_FixedShapeTensorScalar(PyTypeObject *t, PyObject *a, PyObject *k) {
        struct __pyx_obj_7pyarrow_3lib_FixedShapeTensorScalar *p;
        PyObject *o = __pyx_tp_new_7pyarrow_3lib_ExtensionScalar(t, a, k);
        if (unlikely(!o)) return 0;
        p = ((struct __pyx_obj_7pyarrow_3lib_FixedShapeTensorScalar *)o);
        p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_Scalar*)__pyx_vtabptr_7pyarrow_3lib_FixedShapeTensorScalar;
        return o;
      }

      static PyMethodDef __pyx_methods_7pyarrow_3lib_FixedShapeTensorScalar[] = {
        {"to_numpy", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_22FixedShapeTensorScalar_1to_numpy, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_22FixedShapeTensorScalar_to_numpy},
        {"to_tensor", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_22FixedShapeTensorScalar_3to_tensor, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_22FixedShapeTensorScalar_2to_tensor},
        {0, 0, 0, 0}
      };
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib_FixedShapeTensorScalar_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_Scalar},
        {Py_tp_doc, (void *)PyDoc_STR("\n    Concrete class for fixed shape tensor extension scalar.\n    ")},
        {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_FixedShapeTensorScalar},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_FixedShapeTensorScalar},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib_FixedShapeTensorScalar_spec = {
        "pyarrow.lib.FixedShapeTensorScalar",
        sizeof(struct __pyx_obj_7pyarrow_3lib_FixedShapeTensorScalar),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
        __pyx_type_7pyarrow_3lib_FixedShapeTensorScalar_slots,
      };
      #else

      static PyTypeObject __pyx_type_7pyarrow_3lib_FixedShapeTensorScalar = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""FixedShapeTensorScalar", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib_FixedShapeTensorScalar), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib_Scalar, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_7__repr__, /*tp_repr*/
        #else
        0, /*tp_repr*/
        #endif
        0, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_9__str__, /*tp_str*/
        #else
        0, /*tp_str*/
        #endif
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
        PyDoc_STR("\n    Concrete class for fixed shape tensor extension scalar.\n    "), /*tp_doc*/
        0, /*tp_traverse*/
        0, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        0, /*tp_iter*/
        0, /*tp_iternext*/
        __pyx_methods_7pyarrow_3lib_FixedShapeTensorScalar, /*tp_methods*/
        0, /*tp_members*/
        0, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_1__init__, /*tp_init*/
        #else
        0, /*tp_init*/
        #endif
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib_FixedShapeTensorScalar, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif
      static struct __pyx_vtabstruct_7pyarrow_3lib_OpaqueScalar __pyx_vtable_7pyarrow_3lib_OpaqueScalar;

      static PyObject *__pyx_tp_new_7pyarrow_3lib_OpaqueScalar(PyTypeObject *t, PyObject *a, PyObject *k) {
        struct __pyx_obj_7pyarrow_3lib_OpaqueScalar *p;
        PyObject *o = __pyx_tp_new_7pyarrow_3lib_ExtensionScalar(t, a, k);
        if (unlikely(!o)) return 0;
        p = ((struct __pyx_obj_7pyarrow_3lib_OpaqueScalar *)o);
        p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_Scalar*)__pyx_vtabptr_7pyarrow_3lib_OpaqueScalar;
        return o;
      }
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib_OpaqueScalar_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_Scalar},
        {Py_tp_doc, (void *)PyDoc_STR("\n    Concrete class for opaque extension scalar.\n    ")},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_OpaqueScalar},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib_OpaqueScalar_spec = {
        "pyarrow.lib.OpaqueScalar",
        sizeof(struct __pyx_obj_7pyarrow_3lib_OpaqueScalar),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
        __pyx_type_7pyarrow_3lib_OpaqueScalar_slots,
      };
      #else

      static PyTypeObject __pyx_type_7pyarrow_3lib_OpaqueScalar = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""OpaqueScalar", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib_OpaqueScalar), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib_Scalar, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_7__repr__, /*tp_repr*/
        #else
        0, /*tp_repr*/
        #endif
        0, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_9__str__, /*tp_str*/
        #else
        0, /*tp_str*/
        #endif
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
        PyDoc_STR("\n    Concrete class for opaque extension scalar.\n    "), /*tp_doc*/
        0, /*tp_traverse*/
        0, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        0, /*tp_iter*/
        0, /*tp_iternext*/
        0, /*tp_methods*/
        0, /*tp_members*/
        0, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_1__init__, /*tp_init*/
        #else
        0, /*tp_init*/
        #endif
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib_OpaqueScalar, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif
      static struct __pyx_vtabstruct_7pyarrow_3lib_Bool8Scalar __pyx_vtable_7pyarrow_3lib_Bool8Scalar;

      static PyObject *__pyx_tp_new_7pyarrow_3lib_Bool8Scalar(PyTypeObject *t, PyObject *a, PyObject *k) {
        struct __pyx_obj_7pyarrow_3lib_Bool8Scalar *p;
        PyObject *o = __pyx_tp_new_7pyarrow_3lib_ExtensionScalar(t, a, k);
        if (unlikely(!o)) return 0;
        p = ((struct __pyx_obj_7pyarrow_3lib_Bool8Scalar *)o);
        p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_Scalar*)__pyx_vtabptr_7pyarrow_3lib_Bool8Scalar;
        return o;
      }

      static PyMethodDef __pyx_methods_7pyarrow_3lib_Bool8Scalar[] = {
        {"as_py", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_11Bool8Scalar_1as_py, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_11Bool8Scalar_as_py},
        {0, 0, 0, 0}
      };
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib_Bool8Scalar_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_Scalar},
        {Py_tp_doc, (void *)PyDoc_STR("\n    Concrete class for bool8 extension scalar.\n    ")},
        {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_Bool8Scalar},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_Bool8Scalar},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib_Bool8Scalar_spec = {
        "pyarrow.lib.Bool8Scalar",
        sizeof(struct __pyx_obj_7pyarrow_3lib_Bool8Scalar),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
        __pyx_type_7pyarrow_3lib_Bool8Scalar_slots,
      };
      #else

      static PyTypeObject __pyx_type_7pyarrow_3lib_Bool8Scalar = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""Bool8Scalar", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib_Bool8Scalar), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib_Scalar, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_7__repr__, /*tp_repr*/
        #else
        0, /*tp_repr*/
        #endif
        0, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_9__str__, /*tp_str*/
        #else
        0, /*tp_str*/
        #endif
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
        PyDoc_STR("\n    Concrete class for bool8 extension scalar.\n    "), /*tp_doc*/
        0, /*tp_traverse*/
        0, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        0, /*tp_iter*/
        0, /*tp_iternext*/
        __pyx_methods_7pyarrow_3lib_Bool8Scalar, /*tp_methods*/
        0, /*tp_members*/
        0, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_6Scalar_1__init__, /*tp_init*/
        #else
        0, /*tp_init*/
        #endif
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib_Bool8Scalar, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif
      static struct __pyx_vtabstruct_7pyarrow_3lib_Date32Array __pyx_vtable_7pyarrow_3lib_Date32Array;

      static PyObject *__pyx_tp_new_7pyarrow_3lib_Date32Array(PyTypeObject *t, PyObject *a, PyObject *k) {
        struct __pyx_obj_7pyarrow_3lib_Date32Array *p;
        PyObject *o = __pyx_tp_new_7pyarrow_3lib_NumericArray(t, a, k);
        if (unlikely(!o)) return 0;
        p = ((struct __pyx_obj_7pyarrow_3lib_Date32Array *)o);
        p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_Array*)__pyx_vtabptr_7pyarrow_3lib_Date32Array;
        return o;
      }
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib_Date32Array_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_Array},
        {Py_tp_doc, (void *)PyDoc_STR("\n    Concrete class for Arrow arrays of date32 data type.\n    ")},
        {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyarrow_3lib_Array},
        {Py_tp_clear, (void *)__pyx_tp_clear_7pyarrow_3lib_Array},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_Date32Array},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib_Date32Array_spec = {
        "pyarrow.lib.Date32Array",
        sizeof(struct __pyx_obj_7pyarrow_3lib_Date32Array),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
        __pyx_type_7pyarrow_3lib_Date32Array_slots,
      };
      #else

      static PyTypeObject __pyx_type_7pyarrow_3lib_Date32Array = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""Date32Array", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib_Date32Array), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib_Array, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_5Array_32__repr__, /*tp_repr*/
        #else
        0, /*tp_repr*/
        #endif
        0, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_5Array_36__str__, /*tp_str*/
        #else
        0, /*tp_str*/
        #endif
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
        PyDoc_STR("\n    Concrete class for Arrow arrays of date32 data type.\n    "), /*tp_doc*/
        __pyx_tp_traverse_7pyarrow_3lib_Array, /*tp_traverse*/
        __pyx_tp_clear_7pyarrow_3lib_Array, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_5Array_29__iter__, /*tp_iter*/
        #else
        0, /*tp_iter*/
        #endif
        0, /*tp_iternext*/
        0, /*tp_methods*/
        0, /*tp_members*/
        0, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_5Array_1__init__, /*tp_init*/
        #else
        0, /*tp_init*/
        #endif
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib_Date32Array, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif
      static struct __pyx_vtabstruct_7pyarrow_3lib_Date64Array __pyx_vtable_7pyarrow_3lib_Date64Array;

      static PyObject *__pyx_tp_new_7pyarrow_3lib_Date64Array(PyTypeObject *t, PyObject *a, PyObject *k) {
        struct __pyx_obj_7pyarrow_3lib_Date64Array *p;
        PyObject *o = __pyx_tp_new_7pyarrow_3lib_NumericArray(t, a, k);
        if (unlikely(!o)) return 0;
        p = ((struct __pyx_obj_7pyarrow_3lib_Date64Array *)o);
        p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_Array*)__pyx_vtabptr_7pyarrow_3lib_Date64Array;
        return o;
      }
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib_Date64Array_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_Array},
        {Py_tp_doc, (void *)PyDoc_STR("\n    Concrete class for Arrow arrays of date64 data type.\n    ")},
        {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyarrow_3lib_Array},
        {Py_tp_clear, (void *)__pyx_tp_clear_7pyarrow_3lib_Array},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_Date64Array},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib_Date64Array_spec = {
        "pyarrow.lib.Date64Array",
        sizeof(struct __pyx_obj_7pyarrow_3lib_Date64Array),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
        __pyx_type_7pyarrow_3lib_Date64Array_slots,
      };
      #else

      static PyTypeObject __pyx_type_7pyarrow_3lib_Date64Array = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""Date64Array", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib_Date64Array), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib_Array, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_5Array_32__repr__, /*tp_repr*/
        #else
        0, /*tp_repr*/
        #endif
        0, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_5Array_36__str__, /*tp_str*/
        #else
        0, /*tp_str*/
        #endif
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
        PyDoc_STR("\n    Concrete class for Arrow arrays of date64 data type.\n    "), /*tp_doc*/
        __pyx_tp_traverse_7pyarrow_3lib_Array, /*tp_traverse*/
        __pyx_tp_clear_7pyarrow_3lib_Array, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_5Array_29__iter__, /*tp_iter*/
        #else
        0, /*tp_iter*/
        #endif
        0, /*tp_iternext*/
        0, /*tp_methods*/
        0, /*tp_members*/
        0, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_5Array_1__init__, /*tp_init*/
        #else
        0, /*tp_init*/
        #endif
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib_Date64Array, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif
      static struct __pyx_vtabstruct_7pyarrow_3lib_TimestampArray __pyx_vtable_7pyarrow_3lib_TimestampArray;

      static PyObject *__pyx_tp_new_7pyarrow_3lib_TimestampArray(PyTypeObject *t, PyObject *a, PyObject *k) {
        struct __pyx_obj_7pyarrow_3lib_TimestampArray *p;
        PyObject *o = __pyx_tp_new_7pyarrow_3lib_NumericArray(t, a, k);
        if (unlikely(!o)) return 0;
        p = ((struct __pyx_obj_7pyarrow_3lib_TimestampArray *)o);
        p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_Array*)__pyx_vtabptr_7pyarrow_3lib_TimestampArray;
        return o;
      }
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib_TimestampArray_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_Array},
        {Py_tp_doc, (void *)PyDoc_STR("\n    Concrete class for Arrow arrays of timestamp data type.\n    ")},
        {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyarrow_3lib_Array},
        {Py_tp_clear, (void *)__pyx_tp_clear_7pyarrow_3lib_Array},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_TimestampArray},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib_TimestampArray_spec = {
        "pyarrow.lib.TimestampArray",
        sizeof(struct __pyx_obj_7pyarrow_3lib_TimestampArray),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
        __pyx_type_7pyarrow_3lib_TimestampArray_slots,
      };
      #else

      static PyTypeObject __pyx_type_7pyarrow_3lib_TimestampArray = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""TimestampArray", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib_TimestampArray), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib_Array, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_5Array_32__repr__, /*tp_repr*/
        #else
        0, /*tp_repr*/
        #endif
        0, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_5Array_36__str__, /*tp_str*/
        #else
        0, /*tp_str*/
        #endif
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
        PyDoc_STR("\n    Concrete class for Arrow arrays of timestamp data type.\n    "), /*tp_doc*/
        __pyx_tp_traverse_7pyarrow_3lib_Array, /*tp_traverse*/
        __pyx_tp_clear_7pyarrow_3lib_Array, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_5Array_29__iter__, /*tp_iter*/
        #else
        0, /*tp_iter*/
        #endif
        0, /*tp_iternext*/
        0, /*tp_methods*/
        0, /*tp_members*/
        0, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_5Array_1__init__, /*tp_init*/
        #else
        0, /*tp_init*/
        #endif
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib_TimestampArray, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif
      static struct __pyx_vtabstruct_7pyarrow_3lib_Time32Array __pyx_vtable_7pyarrow_3lib_Time32Array;

      static PyObject *__pyx_tp_new_7pyarrow_3lib_Time32Array(PyTypeObject *t, PyObject *a, PyObject *k) {
        struct __pyx_obj_7pyarrow_3lib_Time32Array *p;
        PyObject *o = __pyx_tp_new_7pyarrow_3lib_NumericArray(t, a, k);
        if (unlikely(!o)) return 0;
        p = ((struct __pyx_obj_7pyarrow_3lib_Time32Array *)o);
        p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_Array*)__pyx_vtabptr_7pyarrow_3lib_Time32Array;
        return o;
      }
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib_Time32Array_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_Array},
        {Py_tp_doc, (void *)PyDoc_STR("\n    Concrete class for Arrow arrays of time32 data type.\n    ")},
        {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyarrow_3lib_Array},
        {Py_tp_clear, (void *)__pyx_tp_clear_7pyarrow_3lib_Array},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_Time32Array},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib_Time32Array_spec = {
        "pyarrow.lib.Time32Array",
        sizeof(struct __pyx_obj_7pyarrow_3lib_Time32Array),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
        __pyx_type_7pyarrow_3lib_Time32Array_slots,
      };
      #else

      static PyTypeObject __pyx_type_7pyarrow_3lib_Time32Array = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""Time32Array", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib_Time32Array), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib_Array, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_5Array_32__repr__, /*tp_repr*/
        #else
        0, /*tp_repr*/
        #endif
        0, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_5Array_36__str__, /*tp_str*/
        #else
        0, /*tp_str*/
        #endif
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
        PyDoc_STR("\n    Concrete class for Arrow arrays of time32 data type.\n    "), /*tp_doc*/
        __pyx_tp_traverse_7pyarrow_3lib_Array, /*tp_traverse*/
        __pyx_tp_clear_7pyarrow_3lib_Array, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_5Array_29__iter__, /*tp_iter*/
        #else
        0, /*tp_iter*/
        #endif
        0, /*tp_iternext*/
        0, /*tp_methods*/
        0, /*tp_members*/
        0, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_5Array_1__init__, /*tp_init*/
        #else
        0, /*tp_init*/
        #endif
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib_Time32Array, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif
      static struct __pyx_vtabstruct_7pyarrow_3lib_Time64Array __pyx_vtable_7pyarrow_3lib_Time64Array;

      static PyObject *__pyx_tp_new_7pyarrow_3lib_Time64Array(PyTypeObject *t, PyObject *a, PyObject *k) {
        struct __pyx_obj_7pyarrow_3lib_Time64Array *p;
        PyObject *o = __pyx_tp_new_7pyarrow_3lib_NumericArray(t, a, k);
        if (unlikely(!o)) return 0;
        p = ((struct __pyx_obj_7pyarrow_3lib_Time64Array *)o);
        p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_Array*)__pyx_vtabptr_7pyarrow_3lib_Time64Array;
        return o;
      }
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib_Time64Array_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_Array},
        {Py_tp_doc, (void *)PyDoc_STR("\n    Concrete class for Arrow arrays of time64 data type.\n    ")},
        {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyarrow_3lib_Array},
        {Py_tp_clear, (void *)__pyx_tp_clear_7pyarrow_3lib_Array},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_Time64Array},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib_Time64Array_spec = {
        "pyarrow.lib.Time64Array",
        sizeof(struct __pyx_obj_7pyarrow_3lib_Time64Array),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
        __pyx_type_7pyarrow_3lib_Time64Array_slots,
      };
      #else

      static PyTypeObject __pyx_type_7pyarrow_3lib_Time64Array = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""Time64Array", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib_Time64Array), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib_Array, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_5Array_32__repr__, /*tp_repr*/
        #else
        0, /*tp_repr*/
        #endif
        0, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_5Array_36__str__, /*tp_str*/
        #else
        0, /*tp_str*/
        #endif
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
        PyDoc_STR("\n    Concrete class for Arrow arrays of time64 data type.\n    "), /*tp_doc*/
        __pyx_tp_traverse_7pyarrow_3lib_Array, /*tp_traverse*/
        __pyx_tp_clear_7pyarrow_3lib_Array, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_5Array_29__iter__, /*tp_iter*/
        #else
        0, /*tp_iter*/
        #endif
        0, /*tp_iternext*/
        0, /*tp_methods*/
        0, /*tp_members*/
        0, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_5Array_1__init__, /*tp_init*/
        #else
        0, /*tp_init*/
        #endif
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib_Time64Array, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif
      static struct __pyx_vtabstruct_7pyarrow_3lib_DurationArray __pyx_vtable_7pyarrow_3lib_DurationArray;

      static PyObject *__pyx_tp_new_7pyarrow_3lib_DurationArray(PyTypeObject *t, PyObject *a, PyObject *k) {
        struct __pyx_obj_7pyarrow_3lib_DurationArray *p;
        PyObject *o = __pyx_tp_new_7pyarrow_3lib_NumericArray(t, a, k);
        if (unlikely(!o)) return 0;
        p = ((struct __pyx_obj_7pyarrow_3lib_DurationArray *)o);
        p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_Array*)__pyx_vtabptr_7pyarrow_3lib_DurationArray;
        return o;
      }
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib_DurationArray_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_Array},
        {Py_tp_doc, (void *)PyDoc_STR("\n    Concrete class for Arrow arrays of duration data type.\n    ")},
        {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyarrow_3lib_Array},
        {Py_tp_clear, (void *)__pyx_tp_clear_7pyarrow_3lib_Array},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_DurationArray},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib_DurationArray_spec = {
        "pyarrow.lib.DurationArray",
        sizeof(struct __pyx_obj_7pyarrow_3lib_DurationArray),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
        __pyx_type_7pyarrow_3lib_DurationArray_slots,
      };
      #else

      static PyTypeObject __pyx_type_7pyarrow_3lib_DurationArray = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""DurationArray", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib_DurationArray), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib_Array, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_5Array_32__repr__, /*tp_repr*/
        #else
        0, /*tp_repr*/
        #endif
        0, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_5Array_36__str__, /*tp_str*/
        #else
        0, /*tp_str*/
        #endif
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
        PyDoc_STR("\n    Concrete class for Arrow arrays of duration data type.\n    "), /*tp_doc*/
        __pyx_tp_traverse_7pyarrow_3lib_Array, /*tp_traverse*/
        __pyx_tp_clear_7pyarrow_3lib_Array, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_5Array_29__iter__, /*tp_iter*/
        #else
        0, /*tp_iter*/
        #endif
        0, /*tp_iternext*/
        0, /*tp_methods*/
        0, /*tp_members*/
        0, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_5Array_1__init__, /*tp_init*/
        #else
        0, /*tp_init*/
        #endif
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib_DurationArray, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif
      static struct __pyx_vtabstruct_7pyarrow_3lib_Decima32Array __pyx_vtable_7pyarrow_3lib_Decima32Array;

      static PyObject *__pyx_tp_new_7pyarrow_3lib_Decima32Array(PyTypeObject *t, PyObject *a, PyObject *k) {
        struct __pyx_obj_7pyarrow_3lib_Decima32Array *p;
        PyObject *o = __pyx_tp_new_7pyarrow_3lib_FixedSizeBinaryArray(t, a, k);
        if (unlikely(!o)) return 0;
        p = ((struct __pyx_obj_7pyarrow_3lib_Decima32Array *)o);
        p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_Array*)__pyx_vtabptr_7pyarrow_3lib_Decima32Array;
        return o;
      }
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib_Decima32Array_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_Array},
        {Py_tp_doc, (void *)PyDoc_STR("\n    Concrete class for Arrow arrays of decimal32 data type.\n    ")},
        {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyarrow_3lib_Array},
        {Py_tp_clear, (void *)__pyx_tp_clear_7pyarrow_3lib_Array},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_Decima32Array},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib_Decima32Array_spec = {
        "pyarrow.lib.Decima32Array",
        sizeof(struct __pyx_obj_7pyarrow_3lib_Decima32Array),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
        __pyx_type_7pyarrow_3lib_Decima32Array_slots,
      };
      #else

      static PyTypeObject __pyx_type_7pyarrow_3lib_Decima32Array = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""Decima32Array", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib_Decima32Array), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib_Array, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_5Array_32__repr__, /*tp_repr*/
        #else
        0, /*tp_repr*/
        #endif
        0, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_5Array_36__str__, /*tp_str*/
        #else
        0, /*tp_str*/
        #endif
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
        PyDoc_STR("\n    Concrete class for Arrow arrays of decimal32 data type.\n    "), /*tp_doc*/
        __pyx_tp_traverse_7pyarrow_3lib_Array, /*tp_traverse*/
        __pyx_tp_clear_7pyarrow_3lib_Array, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_5Array_29__iter__, /*tp_iter*/
        #else
        0, /*tp_iter*/
        #endif
        0, /*tp_iternext*/
        0, /*tp_methods*/
        0, /*tp_members*/
        0, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_5Array_1__init__, /*tp_init*/
        #else
        0, /*tp_init*/
        #endif
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib_Decima32Array, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif
      static struct __pyx_vtabstruct_7pyarrow_3lib_LargeStringArray __pyx_vtable_7pyarrow_3lib_LargeStringArray;

      static PyObject *__pyx_tp_new_7pyarrow_3lib_LargeStringArray(PyTypeObject *t, PyObject *a, PyObject *k) {
        struct __pyx_obj_7pyarrow_3lib_LargeStringArray *p;
        PyObject *o = __pyx_tp_new_7pyarrow_3lib_Array(t, a, k);
        if (unlikely(!o)) return 0;
        p = ((struct __pyx_obj_7pyarrow_3lib_LargeStringArray *)o);
        p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_Array*)__pyx_vtabptr_7pyarrow_3lib_LargeStringArray;
        return o;
      }

      static PyMethodDef __pyx_methods_7pyarrow_3lib_LargeStringArray[] = {
        {"from_buffers", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_16LargeStringArray_1from_buffers, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_16LargeStringArray_from_buffers},
        {0, 0, 0, 0}
      };
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib_LargeStringArray_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_Array},
        {Py_tp_doc, (void *)PyDoc_STR("\n    Concrete class for Arrow arrays of large string (or utf8) data type.\n    ")},
        {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyarrow_3lib_Array},
        {Py_tp_clear, (void *)__pyx_tp_clear_7pyarrow_3lib_Array},
        {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_LargeStringArray},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_LargeStringArray},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib_LargeStringArray_spec = {
        "pyarrow.lib.LargeStringArray",
        sizeof(struct __pyx_obj_7pyarrow_3lib_LargeStringArray),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
        __pyx_type_7pyarrow_3lib_LargeStringArray_slots,
      };
      #else

      static PyTypeObject __pyx_type_7pyarrow_3lib_LargeStringArray = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""LargeStringArray", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib_LargeStringArray), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib_Array, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_5Array_32__repr__, /*tp_repr*/
        #else
        0, /*tp_repr*/
        #endif
        0, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_5Array_36__str__, /*tp_str*/
        #else
        0, /*tp_str*/
        #endif
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
        PyDoc_STR("\n    Concrete class for Arrow arrays of large string (or utf8) data type.\n    "), /*tp_doc*/
        __pyx_tp_traverse_7pyarrow_3lib_Array, /*tp_traverse*/
        __pyx_tp_clear_7pyarrow_3lib_Array, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_5Array_29__iter__, /*tp_iter*/
        #else
        0, /*tp_iter*/
        #endif
        0, /*tp_iternext*/
        __pyx_methods_7pyarrow_3lib_LargeStringArray, /*tp_methods*/
        0, /*tp_members*/
        0, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_5Array_1__init__, /*tp_init*/
        #else
        0, /*tp_init*/
        #endif
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib_LargeStringArray, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif
      static struct __pyx_vtabstruct_7pyarrow_3lib_LargeBinaryArray __pyx_vtable_7pyarrow_3lib_LargeBinaryArray;

      static PyObject *__pyx_tp_new_7pyarrow_3lib_LargeBinaryArray(PyTypeObject *t, PyObject *a, PyObject *k) {
        struct __pyx_obj_7pyarrow_3lib_LargeBinaryArray *p;
        PyObject *o = __pyx_tp_new_7pyarrow_3lib_Array(t, a, k);
        if (unlikely(!o)) return 0;
        p = ((struct __pyx_obj_7pyarrow_3lib_LargeBinaryArray *)o);
        p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_Array*)__pyx_vtabptr_7pyarrow_3lib_LargeBinaryArray;
        return o;
      }

      static PyObject *__pyx_getprop_7pyarrow_3lib_16LargeBinaryArray_total_values_length(PyObject *o, CYTHON_UNUSED void *x) {
        return __pyx_pw_7pyarrow_3lib_16LargeBinaryArray_19total_values_length_1__get__(o);
      }

      static struct PyGetSetDef __pyx_getsets_7pyarrow_3lib_LargeBinaryArray[] = {
        {"total_values_length", __pyx_getprop_7pyarrow_3lib_16LargeBinaryArray_total_values_length, 0, PyDoc_STR("\n        The number of bytes from beginning to end of the data buffer addressed\n        by the offsets of this LargeBinaryArray.\n        "), 0},
        {0, 0, 0, 0, 0}
      };
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib_LargeBinaryArray_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_Array},
        {Py_tp_doc, (void *)PyDoc_STR("\n    Concrete class for Arrow arrays of large variable-sized binary data type.\n    ")},
        {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyarrow_3lib_Array},
        {Py_tp_clear, (void *)__pyx_tp_clear_7pyarrow_3lib_Array},
        {Py_tp_getset, (void *)__pyx_getsets_7pyarrow_3lib_LargeBinaryArray},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_LargeBinaryArray},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib_LargeBinaryArray_spec = {
        "pyarrow.lib.LargeBinaryArray",
        sizeof(struct __pyx_obj_7pyarrow_3lib_LargeBinaryArray),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
        __pyx_type_7pyarrow_3lib_LargeBinaryArray_slots,
      };
      #else

      static PyTypeObject __pyx_type_7pyarrow_3lib_LargeBinaryArray = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""LargeBinaryArray", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib_LargeBinaryArray), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib_Array, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_5Array_32__repr__, /*tp_repr*/
        #else
        0, /*tp_repr*/
        #endif
        0, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_5Array_36__str__, /*tp_str*/
        #else
        0, /*tp_str*/
        #endif
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
        PyDoc_STR("\n    Concrete class for Arrow arrays of large variable-sized binary data type.\n    "), /*tp_doc*/
        __pyx_tp_traverse_7pyarrow_3lib_Array, /*tp_traverse*/
        __pyx_tp_clear_7pyarrow_3lib_Array, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_5Array_29__iter__, /*tp_iter*/
        #else
        0, /*tp_iter*/
        #endif
        0, /*tp_iternext*/
        0, /*tp_methods*/
        0, /*tp_members*/
        __pyx_getsets_7pyarrow_3lib_LargeBinaryArray, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_5Array_1__init__, /*tp_init*/
        #else
        0, /*tp_init*/
        #endif
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib_LargeBinaryArray, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif
      static struct __pyx_vtabstruct_7pyarrow_3lib_RunEndEncodedArray __pyx_vtable_7pyarrow_3lib_RunEndEncodedArray;

      static PyObject *__pyx_tp_new_7pyarrow_3lib_RunEndEncodedArray(PyTypeObject *t, PyObject *a, PyObject *k) {
        struct __pyx_obj_7pyarrow_3lib_RunEndEncodedArray *p;
        PyObject *o = __pyx_tp_new_7pyarrow_3lib_Array(t, a, k);
        if (unlikely(!o)) return 0;
        p = ((struct __pyx_obj_7pyarrow_3lib_RunEndEncodedArray *)o);
        p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_Array*)__pyx_vtabptr_7pyarrow_3lib_RunEndEncodedArray;
        return o;
      }

      static PyObject *__pyx_getprop_7pyarrow_3lib_18RunEndEncodedArray_run_ends(PyObject *o, CYTHON_UNUSED void *x) {
        return __pyx_pw_7pyarrow_3lib_18RunEndEncodedArray_8run_ends_1__get__(o);
      }

      static PyObject *__pyx_getprop_7pyarrow_3lib_18RunEndEncodedArray_values(PyObject *o, CYTHON_UNUSED void *x) {
        return __pyx_pw_7pyarrow_3lib_18RunEndEncodedArray_6values_1__get__(o);
      }

      static PyMethodDef __pyx_methods_7pyarrow_3lib_RunEndEncodedArray[] = {
        {"_from_arrays", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_18RunEndEncodedArray_1_from_arrays, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_18RunEndEncodedArray__from_arrays},
        {"from_arrays", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_18RunEndEncodedArray_3from_arrays, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_18RunEndEncodedArray_2from_arrays},
        {"from_buffers", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_18RunEndEncodedArray_5from_buffers, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_18RunEndEncodedArray_4from_buffers},
        {"find_physical_offset", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_18RunEndEncodedArray_7find_physical_offset, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_18RunEndEncodedArray_6find_physical_offset},
        {"find_physical_length", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_18RunEndEncodedArray_9find_physical_length, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_18RunEndEncodedArray_8find_physical_length},
        {0, 0, 0, 0}
      };

      static struct PyGetSetDef __pyx_getsets_7pyarrow_3lib_RunEndEncodedArray[] = {
        {"run_ends", __pyx_getprop_7pyarrow_3lib_18RunEndEncodedArray_run_ends, 0, PyDoc_STR("\n        An array holding the logical indexes of each run-end.\n\n        The physical offset to the array is applied.\n        "), 0},
        {"values", __pyx_getprop_7pyarrow_3lib_18RunEndEncodedArray_values, 0, PyDoc_STR("\n        An array holding the values of each run.\n\n        The physical offset to the array is applied.\n        "), 0},
        {0, 0, 0, 0, 0}
      };
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib_RunEndEncodedArray_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_Array},
        {Py_tp_doc, (void *)PyDoc_STR("\n    Concrete class for Arrow run-end encoded arrays.\n    ")},
        {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyarrow_3lib_Array},
        {Py_tp_clear, (void *)__pyx_tp_clear_7pyarrow_3lib_Array},
        {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_RunEndEncodedArray},
        {Py_tp_getset, (void *)__pyx_getsets_7pyarrow_3lib_RunEndEncodedArray},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_RunEndEncodedArray},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib_RunEndEncodedArray_spec = {
        "pyarrow.lib.RunEndEncodedArray",
        sizeof(struct __pyx_obj_7pyarrow_3lib_RunEndEncodedArray),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
        __pyx_type_7pyarrow_3lib_RunEndEncodedArray_slots,
      };
      #else

      static PyTypeObject __pyx_type_7pyarrow_3lib_RunEndEncodedArray = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""RunEndEncodedArray", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib_RunEndEncodedArray), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib_Array, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_5Array_32__repr__, /*tp_repr*/
        #else
        0, /*tp_repr*/
        #endif
        0, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_5Array_36__str__, /*tp_str*/
        #else
        0, /*tp_str*/
        #endif
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
        PyDoc_STR("\n    Concrete class for Arrow run-end encoded arrays.\n    "), /*tp_doc*/
        __pyx_tp_traverse_7pyarrow_3lib_Array, /*tp_traverse*/
        __pyx_tp_clear_7pyarrow_3lib_Array, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_5Array_29__iter__, /*tp_iter*/
        #else
        0, /*tp_iter*/
        #endif
        0, /*tp_iternext*/
        __pyx_methods_7pyarrow_3lib_RunEndEncodedArray, /*tp_methods*/
        0, /*tp_members*/
        __pyx_getsets_7pyarrow_3lib_RunEndEncodedArray, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_5Array_1__init__, /*tp_init*/
        #else
        0, /*tp_init*/
        #endif
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib_RunEndEncodedArray, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif
      static struct __pyx_vtabstruct_7pyarrow_3lib_FixedShapeTensorArray __pyx_vtable_7pyarrow_3lib_FixedShapeTensorArray;

      static PyObject *__pyx_tp_new_7pyarrow_3lib_FixedShapeTensorArray(PyTypeObject *t, PyObject *a, PyObject *k) {
        struct __pyx_obj_7pyarrow_3lib_FixedShapeTensorArray *p;
        PyObject *o = __pyx_tp_new_7pyarrow_3lib_ExtensionArray(t, a, k);
        if (unlikely(!o)) return 0;
        p = ((struct __pyx_obj_7pyarrow_3lib_FixedShapeTensorArray *)o);
        p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_Array*)__pyx_vtabptr_7pyarrow_3lib_FixedShapeTensorArray;
        return o;
      }

      static PyMethodDef __pyx_methods_7pyarrow_3lib_FixedShapeTensorArray[] = {
        {"to_numpy_ndarray", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_21FixedShapeTensorArray_1to_numpy_ndarray, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_21FixedShapeTensorArray_to_numpy_ndarray},
        {"to_tensor", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_21FixedShapeTensorArray_3to_tensor, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_21FixedShapeTensorArray_2to_tensor},
        {"from_numpy_ndarray", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_21FixedShapeTensorArray_5from_numpy_ndarray, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_21FixedShapeTensorArray_4from_numpy_ndarray},
        {0, 0, 0, 0}
      };
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib_FixedShapeTensorArray_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_Array},
        {Py_tp_doc, (void *)PyDoc_STR("\n    Concrete class for fixed shape tensor extension arrays.\n\n    Examples\n    --------\n    Define the extension type for tensor array\n\n    >>> import pyarrow as pa\n    >>> tensor_type = pa.fixed_shape_tensor(pa.int32(), [2, 2])\n\n    Create an extension array\n\n    >>> arr = [[1, 2, 3, 4], [10, 20, 30, 40], [100, 200, 300, 400]]\n    >>> storage = pa.array(arr, pa.list_(pa.int32(), 4))\n    >>> pa.ExtensionArray.from_storage(tensor_type, storage)\n    <pyarrow.lib.FixedShapeTensorArray object at ...>\n    [\n      [\n        1,\n        2,\n        3,\n        4\n      ],\n      [\n        10,\n        20,\n        30,\n        40\n      ],\n      [\n        100,\n        200,\n        300,\n        400\n      ]\n    ]\n    ")},
        {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyarrow_3lib_Array},
        {Py_tp_clear, (void *)__pyx_tp_clear_7pyarrow_3lib_Array},
        {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_FixedShapeTensorArray},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_FixedShapeTensorArray},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib_FixedShapeTensorArray_spec = {
        "pyarrow.lib.FixedShapeTensorArray",
        sizeof(struct __pyx_obj_7pyarrow_3lib_FixedShapeTensorArray),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
        __pyx_type_7pyarrow_3lib_FixedShapeTensorArray_slots,
      };
      #else

      static PyTypeObject __pyx_type_7pyarrow_3lib_FixedShapeTensorArray = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""FixedShapeTensorArray", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib_FixedShapeTensorArray), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib_Array, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_5Array_32__repr__, /*tp_repr*/
        #else
        0, /*tp_repr*/
        #endif
        0, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_5Array_36__str__, /*tp_str*/
        #else
        0, /*tp_str*/
        #endif
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
        PyDoc_STR("\n    Concrete class for fixed shape tensor extension arrays.\n\n    Examples\n    --------\n    Define the extension type for tensor array\n\n    >>> import pyarrow as pa\n    >>> tensor_type = pa.fixed_shape_tensor(pa.int32(), [2, 2])\n\n    Create an extension array\n\n    >>> arr = [[1, 2, 3, 4], [10, 20, 30, 40], [100, 200, 300, 400]]\n    >>> storage = pa.array(arr, pa.list_(pa.int32(), 4))\n    >>> pa.ExtensionArray.from_storage(tensor_type, storage)\n    <pyarrow.lib.FixedShapeTensorArray object at ...>\n    [\n      [\n        1,\n        2,\n        3,\n        4\n      ],\n      [\n        10,\n        20,\n        30,\n        40\n      ],\n      [\n        100,\n        200,\n        300,\n        400\n      ]\n    ]\n    "), /*tp_doc*/
        __pyx_tp_traverse_7pyarrow_3lib_Array, /*tp_traverse*/
        __pyx_tp_clear_7pyarrow_3lib_Array, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_5Array_29__iter__, /*tp_iter*/
        #else
        0, /*tp_iter*/
        #endif
        0, /*tp_iternext*/
        __pyx_methods_7pyarrow_3lib_FixedShapeTensorArray, /*tp_methods*/
        0, /*tp_members*/
        0, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_5Array_1__init__, /*tp_init*/
        #else
        0, /*tp_init*/
        #endif
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib_FixedShapeTensorArray, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif
      static struct __pyx_vtabstruct_7pyarrow_3lib_OpaqueArray __pyx_vtable_7pyarrow_3lib_OpaqueArray;

      static PyObject *__pyx_tp_new_7pyarrow_3lib_OpaqueArray(PyTypeObject *t, PyObject *a, PyObject *k) {
        struct __pyx_obj_7pyarrow_3lib_OpaqueArray *p;
        PyObject *o = __pyx_tp_new_7pyarrow_3lib_ExtensionArray(t, a, k);
        if (unlikely(!o)) return 0;
        p = ((struct __pyx_obj_7pyarrow_3lib_OpaqueArray *)o);
        p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_Array*)__pyx_vtabptr_7pyarrow_3lib_OpaqueArray;
        return o;
      }
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib_OpaqueArray_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_Array},
        {Py_tp_doc, (void *)PyDoc_STR("\n    Concrete class for opaque extension arrays.\n\n    Examples\n    --------\n    Define the extension type for an opaque array\n\n    >>> import pyarrow as pa\n    >>> opaque_type = pa.opaque(\n    ...     pa.binary(),\n    ...     type_name=\"geometry\",\n    ...     vendor_name=\"postgis\",\n    ... )\n\n    Create an extension array\n\n    >>> arr = [None, b\"data\"]\n    >>> storage = pa.array(arr, pa.binary())\n    >>> pa.ExtensionArray.from_storage(opaque_type, storage)\n    <pyarrow.lib.OpaqueArray object at ...>\n    [\n      null,\n      64617461\n    ]\n    ")},
        {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyarrow_3lib_Array},
        {Py_tp_clear, (void *)__pyx_tp_clear_7pyarrow_3lib_Array},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_OpaqueArray},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib_OpaqueArray_spec = {
        "pyarrow.lib.OpaqueArray",
        sizeof(struct __pyx_obj_7pyarrow_3lib_OpaqueArray),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
        __pyx_type_7pyarrow_3lib_OpaqueArray_slots,
      };
      #else

      static PyTypeObject __pyx_type_7pyarrow_3lib_OpaqueArray = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""OpaqueArray", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib_OpaqueArray), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib_Array, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_5Array_32__repr__, /*tp_repr*/
        #else
        0, /*tp_repr*/
        #endif
        0, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_5Array_36__str__, /*tp_str*/
        #else
        0, /*tp_str*/
        #endif
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
        PyDoc_STR("\n    Concrete class for opaque extension arrays.\n\n    Examples\n    --------\n    Define the extension type for an opaque array\n\n    >>> import pyarrow as pa\n    >>> opaque_type = pa.opaque(\n    ...     pa.binary(),\n    ...     type_name=\"geometry\",\n    ...     vendor_name=\"postgis\",\n    ... )\n\n    Create an extension array\n\n    >>> arr = [None, b\"data\"]\n    >>> storage = pa.array(arr, pa.binary())\n    >>> pa.ExtensionArray.from_storage(opaque_type, storage)\n    <pyarrow.lib.OpaqueArray object at ...>\n    [\n      null,\n      64617461\n    ]\n    "), /*tp_doc*/
        __pyx_tp_traverse_7pyarrow_3lib_Array, /*tp_traverse*/
        __pyx_tp_clear_7pyarrow_3lib_Array, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_5Array_29__iter__, /*tp_iter*/
        #else
        0, /*tp_iter*/
        #endif
        0, /*tp_iternext*/
        0, /*tp_methods*/
        0, /*tp_members*/
        0, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_5Array_1__init__, /*tp_init*/
        #else
        0, /*tp_init*/
        #endif
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib_OpaqueArray, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif
      static struct __pyx_vtabstruct_7pyarrow_3lib_Bool8Array __pyx_vtable_7pyarrow_3lib_Bool8Array;

      static PyObject *__pyx_tp_new_7pyarrow_3lib_Bool8Array(PyTypeObject *t, PyObject *a, PyObject *k) {
        struct __pyx_obj_7pyarrow_3lib_Bool8Array *p;
        PyObject *o = __pyx_tp_new_7pyarrow_3lib_ExtensionArray(t, a, k);
        if (unlikely(!o)) return 0;
        p = ((struct __pyx_obj_7pyarrow_3lib_Bool8Array *)o);
        p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_Array*)__pyx_vtabptr_7pyarrow_3lib_Bool8Array;
        return o;
      }

      static PyMethodDef __pyx_methods_7pyarrow_3lib_Bool8Array[] = {
        {"to_numpy", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10Bool8Array_1to_numpy, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10Bool8Array_to_numpy},
        {"from_storage", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10Bool8Array_3from_storage, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10Bool8Array_2from_storage},
        {"from_numpy", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10Bool8Array_5from_numpy, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10Bool8Array_4from_numpy},
        {0, 0, 0, 0}
      };
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib_Bool8Array_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_Array},
        {Py_tp_doc, (void *)PyDoc_STR("\n    Concrete class for bool8 extension arrays.\n\n    Examples\n    --------\n    Define the extension type for an bool8 array\n\n    >>> import pyarrow as pa\n    >>> bool8_type = pa.bool8()\n\n    Create an extension array\n\n    >>> arr = [-1, 0, 1, 2, None]\n    >>> storage = pa.array(arr, pa.int8())\n    >>> pa.ExtensionArray.from_storage(bool8_type, storage)\n    <pyarrow.lib.Bool8Array object at ...>\n    [\n      -1,\n      0,\n      1,\n      2,\n      null\n    ]\n    ")},
        {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyarrow_3lib_Array},
        {Py_tp_clear, (void *)__pyx_tp_clear_7pyarrow_3lib_Array},
        {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_Bool8Array},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_Bool8Array},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib_Bool8Array_spec = {
        "pyarrow.lib.Bool8Array",
        sizeof(struct __pyx_obj_7pyarrow_3lib_Bool8Array),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
        __pyx_type_7pyarrow_3lib_Bool8Array_slots,
      };
      #else

      static PyTypeObject __pyx_type_7pyarrow_3lib_Bool8Array = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""Bool8Array", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib_Bool8Array), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib_Array, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_5Array_32__repr__, /*tp_repr*/
        #else
        0, /*tp_repr*/
        #endif
        0, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_5Array_36__str__, /*tp_str*/
        #else
        0, /*tp_str*/
        #endif
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
        PyDoc_STR("\n    Concrete class for bool8 extension arrays.\n\n    Examples\n    --------\n    Define the extension type for an bool8 array\n\n    >>> import pyarrow as pa\n    >>> bool8_type = pa.bool8()\n\n    Create an extension array\n\n    >>> arr = [-1, 0, 1, 2, None]\n    >>> storage = pa.array(arr, pa.int8())\n    >>> pa.ExtensionArray.from_storage(bool8_type, storage)\n    <pyarrow.lib.Bool8Array object at ...>\n    [\n      -1,\n      0,\n      1,\n      2,\n      null\n    ]\n    "), /*tp_doc*/
        __pyx_tp_traverse_7pyarrow_3lib_Array, /*tp_traverse*/
        __pyx_tp_clear_7pyarrow_3lib_Array, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_5Array_29__iter__, /*tp_iter*/
        #else
        0, /*tp_iter*/
        #endif
        0, /*tp_iternext*/
        __pyx_methods_7pyarrow_3lib_Bool8Array, /*tp_methods*/
        0, /*tp_members*/
        0, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_5Array_1__init__, /*tp_init*/
        #else
        0, /*tp_init*/
        #endif
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib_Bool8Array, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif

      static PyObject *__pyx_tp_new_7pyarrow_3lib_StringBuilder(PyTypeObject *t, PyObject *a, PyObject *k) {
        struct __pyx_obj_7pyarrow_3lib_StringBuilder *p;
        PyObject *o = __pyx_tp_new_7pyarrow_3lib__Weakrefable(t, a, k);
        if (unlikely(!o)) return 0;
        p = ((struct __pyx_obj_7pyarrow_3lib_StringBuilder *)o);
        __Pyx_default_placement_construct(&(p->builder));
        if (unlikely(__pyx_pw_7pyarrow_3lib_13StringBuilder_1__cinit__(o, a, k) < 0)) goto bad;
        return o;
        bad:
        Py_DECREF(o); o = 0;
        return NULL;
      }

      static void __pyx_tp_dealloc_7pyarrow_3lib_StringBuilder(PyObject *o) {
        struct __pyx_obj_7pyarrow_3lib_StringBuilder *p = (struct __pyx_obj_7pyarrow_3lib_StringBuilder *)o;
        #if CYTHON_USE_TP_FINALIZE
        if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) {
          if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_7pyarrow_3lib_StringBuilder) {
            if (PyObject_CallFinalizerFromDealloc(o)) return;
          }
        }
        #endif
        __Pyx_call_destructor(p->builder);
        __pyx_tp_dealloc_7pyarrow_3lib__Weakrefable(o);
      }

      static PyObject *__pyx_getprop_7pyarrow_3lib_13StringBuilder_null_count(PyObject *o, CYTHON_UNUSED void *x) {
        return __pyx_pw_7pyarrow_3lib_13StringBuilder_10null_count_1__get__(o);
      }

      static PyMethodDef __pyx_methods_7pyarrow_3lib_StringBuilder[] = {
        {"append", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_13StringBuilder_3append, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_13StringBuilder_2append},
        {"append_values", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_13StringBuilder_5append_values, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_13StringBuilder_4append_values},
        {"finish", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_13StringBuilder_7finish, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_13StringBuilder_6finish},
        {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_13StringBuilder_11__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_13StringBuilder_10__reduce_cython__},
        {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_13StringBuilder_13__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_13StringBuilder_12__setstate_cython__},
        {0, 0, 0, 0}
      };

      static struct PyGetSetDef __pyx_getsets_7pyarrow_3lib_StringBuilder[] = {
        {"null_count", __pyx_getprop_7pyarrow_3lib_13StringBuilder_null_count, 0, 0, 0},
        {0, 0, 0, 0, 0}
      };
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib_StringBuilder_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_StringBuilder},
        {Py_sq_length, (void *)__pyx_pw_7pyarrow_3lib_13StringBuilder_9__len__},
        {Py_mp_length, (void *)__pyx_pw_7pyarrow_3lib_13StringBuilder_9__len__},
        {Py_tp_doc, (void *)PyDoc_STR("\n    Builder class for UTF8 strings.\n\n    This class exposes facilities for incrementally adding string values and\n    building the null bitmap for a pyarrow.Array (type='string').\n    ")},
        {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_StringBuilder},
        {Py_tp_getset, (void *)__pyx_getsets_7pyarrow_3lib_StringBuilder},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_StringBuilder},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib_StringBuilder_spec = {
        "pyarrow.lib.StringBuilder",
        sizeof(struct __pyx_obj_7pyarrow_3lib_StringBuilder),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
        __pyx_type_7pyarrow_3lib_StringBuilder_slots,
      };
      #else

      static PySequenceMethods __pyx_tp_as_sequence_StringBuilder = {
        __pyx_pw_7pyarrow_3lib_13StringBuilder_9__len__, /*sq_length*/
        0, /*sq_concat*/
        0, /*sq_repeat*/
        0, /*sq_item*/
        0, /*sq_slice*/
        0, /*sq_ass_item*/
        0, /*sq_ass_slice*/
        0, /*sq_contains*/
        0, /*sq_inplace_concat*/
        0, /*sq_inplace_repeat*/
      };

      static PyMappingMethods __pyx_tp_as_mapping_StringBuilder = {
        __pyx_pw_7pyarrow_3lib_13StringBuilder_9__len__, /*mp_length*/
        0, /*mp_subscript*/
        0, /*mp_ass_subscript*/
      };

      static PyTypeObject __pyx_type_7pyarrow_3lib_StringBuilder = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""StringBuilder", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib_StringBuilder), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib_StringBuilder, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        0, /*tp_repr*/
        0, /*tp_as_number*/
        &__pyx_tp_as_sequence_StringBuilder, /*tp_as_sequence*/
        &__pyx_tp_as_mapping_StringBuilder, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        0, /*tp_str*/
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
        PyDoc_STR("\n    Builder class for UTF8 strings.\n\n    This class exposes facilities for incrementally adding string values and\n    building the null bitmap for a pyarrow.Array (type='string').\n    "), /*tp_doc*/
        0, /*tp_traverse*/
        0, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        0, /*tp_iter*/
        0, /*tp_iternext*/
        __pyx_methods_7pyarrow_3lib_StringBuilder, /*tp_methods*/
        0, /*tp_members*/
        __pyx_getsets_7pyarrow_3lib_StringBuilder, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        0, /*tp_init*/
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib_StringBuilder, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif

      static PyObject *__pyx_tp_new_7pyarrow_3lib_StringViewBuilder(PyTypeObject *t, PyObject *a, PyObject *k) {
        struct __pyx_obj_7pyarrow_3lib_StringViewBuilder *p;
        PyObject *o = __pyx_tp_new_7pyarrow_3lib__Weakrefable(t, a, k);
        if (unlikely(!o)) return 0;
        p = ((struct __pyx_obj_7pyarrow_3lib_StringViewBuilder *)o);
        __Pyx_default_placement_construct(&(p->builder));
        if (unlikely(__pyx_pw_7pyarrow_3lib_17StringViewBuilder_1__cinit__(o, a, k) < 0)) goto bad;
        return o;
        bad:
        Py_DECREF(o); o = 0;
        return NULL;
      }

      static void __pyx_tp_dealloc_7pyarrow_3lib_StringViewBuilder(PyObject *o) {
        struct __pyx_obj_7pyarrow_3lib_StringViewBuilder *p = (struct __pyx_obj_7pyarrow_3lib_StringViewBuilder *)o;
        #if CYTHON_USE_TP_FINALIZE
        if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) {
          if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_7pyarrow_3lib_StringViewBuilder) {
            if (PyObject_CallFinalizerFromDealloc(o)) return;
          }
        }
        #endif
        __Pyx_call_destructor(p->builder);
        __pyx_tp_dealloc_7pyarrow_3lib__Weakrefable(o);
      }

      static PyObject *__pyx_getprop_7pyarrow_3lib_17StringViewBuilder_null_count(PyObject *o, CYTHON_UNUSED void *x) {
        return __pyx_pw_7pyarrow_3lib_17StringViewBuilder_10null_count_1__get__(o);
      }

      static PyMethodDef __pyx_methods_7pyarrow_3lib_StringViewBuilder[] = {
        {"append", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_17StringViewBuilder_3append, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_17StringViewBuilder_2append},
        {"append_values", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_17StringViewBuilder_5append_values, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_17StringViewBuilder_4append_values},
        {"finish", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_17StringViewBuilder_7finish, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_17StringViewBuilder_6finish},
        {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_17StringViewBuilder_11__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_17StringViewBuilder_10__reduce_cython__},
        {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_17StringViewBuilder_13__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_17StringViewBuilder_12__setstate_cython__},
        {0, 0, 0, 0}
      };

      static struct PyGetSetDef __pyx_getsets_7pyarrow_3lib_StringViewBuilder[] = {
        {"null_count", __pyx_getprop_7pyarrow_3lib_17StringViewBuilder_null_count, 0, 0, 0},
        {0, 0, 0, 0, 0}
      };
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib_StringViewBuilder_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_StringViewBuilder},
        {Py_sq_length, (void *)__pyx_pw_7pyarrow_3lib_17StringViewBuilder_9__len__},
        {Py_mp_length, (void *)__pyx_pw_7pyarrow_3lib_17StringViewBuilder_9__len__},
        {Py_tp_doc, (void *)PyDoc_STR("\n    Builder class for UTF8 string views.\n\n    This class exposes facilities for incrementally adding string values and\n    building the null bitmap for a pyarrow.Array (type='string_view').\n    ")},
        {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_StringViewBuilder},
        {Py_tp_getset, (void *)__pyx_getsets_7pyarrow_3lib_StringViewBuilder},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_StringViewBuilder},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib_StringViewBuilder_spec = {
        "pyarrow.lib.StringViewBuilder",
        sizeof(struct __pyx_obj_7pyarrow_3lib_StringViewBuilder),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
        __pyx_type_7pyarrow_3lib_StringViewBuilder_slots,
      };
      #else

      static PySequenceMethods __pyx_tp_as_sequence_StringViewBuilder = {
        __pyx_pw_7pyarrow_3lib_17StringViewBuilder_9__len__, /*sq_length*/
        0, /*sq_concat*/
        0, /*sq_repeat*/
        0, /*sq_item*/
        0, /*sq_slice*/
        0, /*sq_ass_item*/
        0, /*sq_ass_slice*/
        0, /*sq_contains*/
        0, /*sq_inplace_concat*/
        0, /*sq_inplace_repeat*/
      };

      static PyMappingMethods __pyx_tp_as_mapping_StringViewBuilder = {
        __pyx_pw_7pyarrow_3lib_17StringViewBuilder_9__len__, /*mp_length*/
        0, /*mp_subscript*/
        0, /*mp_ass_subscript*/
      };

      static PyTypeObject __pyx_type_7pyarrow_3lib_StringViewBuilder = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""StringViewBuilder", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib_StringViewBuilder), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib_StringViewBuilder, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        0, /*tp_repr*/
        0, /*tp_as_number*/
        &__pyx_tp_as_sequence_StringViewBuilder, /*tp_as_sequence*/
        &__pyx_tp_as_mapping_StringViewBuilder, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        0, /*tp_str*/
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
        PyDoc_STR("\n    Builder class for UTF8 string views.\n\n    This class exposes facilities for incrementally adding string values and\n    building the null bitmap for a pyarrow.Array (type='string_view').\n    "), /*tp_doc*/
        0, /*tp_traverse*/
        0, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        0, /*tp_iter*/
        0, /*tp_iternext*/
        __pyx_methods_7pyarrow_3lib_StringViewBuilder, /*tp_methods*/
        0, /*tp_members*/
        __pyx_getsets_7pyarrow_3lib_StringViewBuilder, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        0, /*tp_init*/
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib_StringViewBuilder, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif
      static struct __pyx_vtabstruct_7pyarrow_3lib_PythonFile __pyx_vtable_7pyarrow_3lib_PythonFile;

      static PyObject *__pyx_tp_new_7pyarrow_3lib_PythonFile(PyTypeObject *t, PyObject *a, PyObject *k) {
        struct __pyx_obj_7pyarrow_3lib_PythonFile *p;
        PyObject *o = __pyx_tp_new_7pyarrow_3lib_NativeFile(t, a, k);
        if (unlikely(!o)) return 0;
        p = ((struct __pyx_obj_7pyarrow_3lib_PythonFile *)o);
        p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_NativeFile*)__pyx_vtabptr_7pyarrow_3lib_PythonFile;
        p->handle = Py_None; Py_INCREF(Py_None);
        if (unlikely(__pyx_pw_7pyarrow_3lib_10PythonFile_1__cinit__(o, a, k) < 0)) goto bad;
        return o;
        bad:
        Py_DECREF(o); o = 0;
        return NULL;
      }

      static void __pyx_tp_dealloc_7pyarrow_3lib_PythonFile(PyObject *o) {
        struct __pyx_obj_7pyarrow_3lib_PythonFile *p = (struct __pyx_obj_7pyarrow_3lib_PythonFile *)o;
        #if CYTHON_USE_TP_FINALIZE
        if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
          if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_7pyarrow_3lib_PythonFile) {
            if (PyObject_CallFinalizerFromDealloc(o)) return;
          }
        }
        #endif
        PyObject_GC_UnTrack(o);
        Py_CLEAR(p->handle);
        __pyx_tp_dealloc_7pyarrow_3lib_NativeFile(o);
      }

      static int __pyx_tp_traverse_7pyarrow_3lib_PythonFile(PyObject *o, visitproc v, void *a) {
        int e;
        struct __pyx_obj_7pyarrow_3lib_PythonFile *p = (struct __pyx_obj_7pyarrow_3lib_PythonFile *)o;
        #if !CYTHON_USE_MODULE_STATE
        e = 0;
        if (likely(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NativeFile)) {
          traverseproc traverse = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NativeFile, tp_traverse, traverseproc);
          if (traverse) { e = traverse(o, v, a); }
        } else
        #endif
        { e = __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_7pyarrow_3lib_PythonFile); }
        if (e) return e;
        {
          e = __Pyx_call_type_traverse(o, 0, v, a);
          if (e) return e;
        }
        if (p->handle) {
          e = (*v)(p->handle, a); if (e) return e;
        }
        return 0;
      }

      static int __pyx_tp_clear_7pyarrow_3lib_PythonFile(PyObject *o) {
        PyObject* tmp;
        struct __pyx_obj_7pyarrow_3lib_PythonFile *p = (struct __pyx_obj_7pyarrow_3lib_PythonFile *)o;
        #if !CYTHON_USE_MODULE_STATE
        if (likely(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NativeFile)) {
          inquiry clear = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NativeFile, tp_clear, inquiry);
          if (clear) clear(o);
        } else
        #endif
        { __Pyx_call_next_tp_clear(o, __pyx_tp_clear_7pyarrow_3lib_PythonFile); }
        tmp = ((PyObject*)p->handle);
        p->handle = Py_None; Py_INCREF(Py_None);
        Py_XDECREF(tmp);
        return 0;
      }

      static PyMethodDef __pyx_methods_7pyarrow_3lib_PythonFile[] = {
        {"truncate", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10PythonFile_3truncate, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10PythonFile_2truncate},
        {"readline", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10PythonFile_5readline, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10PythonFile_4readline},
        {"readlines", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10PythonFile_7readlines, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10PythonFile_6readlines},
        {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10PythonFile_9__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10PythonFile_8__reduce_cython__},
        {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_10PythonFile_11__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_10PythonFile_10__setstate_cython__},
        {0, 0, 0, 0}
      };
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib_PythonFile_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_PythonFile},
        {Py_tp_doc, (void *)PyDoc_STR("\n    A stream backed by a Python file object.\n\n    This class allows using Python file objects with arbitrary Arrow\n    functions, including functions written in another language than Python.\n\n    As a downside, there is a non-zero redirection cost in translating\n    Arrow stream calls to Python method calls.  Furthermore, Python's\n    Global Interpreter Lock may limit parallelism in some situations.\n\n    Examples\n    --------\n    >>> import io\n    >>> import pyarrow as pa\n    >>> pa.PythonFile(io.BytesIO())\n    <pyarrow.PythonFile closed=False own_file=False is_seekable=False is_writable=True is_readable=False>\n\n    Create a stream for writing:\n\n    >>> buf = io.BytesIO()\n    >>> f =  pa.PythonFile(buf, mode = 'w')\n    >>> f.writable()\n    True\n    >>> f.write(b'PythonFile')\n    10\n    >>> buf.getvalue()\n    b'PythonFile'\n    >>> f.close()\n    >>> f\n    <pyarrow.PythonFile closed=True own_file=False is_seekable=False is_writable=True is_readable=False>\n\n    Create a stream for reading:\n\n    >>> buf = io.BytesIO(b'PythonFile')\n    >>> f =  pa.PythonFile(buf, mode = 'r')\n    >>> f.mode\n    'rb'\n    >>> f.read()\n    b'PythonFile'\n    >>> f\n    <pyarrow.PythonFile closed=False own_file=False is_seekable=True is_writable=False is_readable=True>\n    >>> f.close()\n    >>> f\n    <pyarrow.PythonFile closed=True own_file=False is_seekable=True is_writable=False is_readable=True>\n    ")},
        {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyarrow_3lib_PythonFile},
        {Py_tp_clear, (void *)__pyx_tp_clear_7pyarrow_3lib_PythonFile},
        {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_PythonFile},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_PythonFile},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib_PythonFile_spec = {
        "pyarrow.lib.PythonFile",
        sizeof(struct __pyx_obj_7pyarrow_3lib_PythonFile),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
        __pyx_type_7pyarrow_3lib_PythonFile_slots,
      };
      #else

      static PyTypeObject __pyx_type_7pyarrow_3lib_PythonFile = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""PythonFile", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib_PythonFile), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib_PythonFile, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_10NativeFile_9__repr__, /*tp_repr*/
        #else
        0, /*tp_repr*/
        #endif
        0, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        0, /*tp_str*/
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
        PyDoc_STR("\n    A stream backed by a Python file object.\n\n    This class allows using Python file objects with arbitrary Arrow\n    functions, including functions written in another language than Python.\n\n    As a downside, there is a non-zero redirection cost in translating\n    Arrow stream calls to Python method calls.  Furthermore, Python's\n    Global Interpreter Lock may limit parallelism in some situations.\n\n    Examples\n    --------\n    >>> import io\n    >>> import pyarrow as pa\n    >>> pa.PythonFile(io.BytesIO())\n    <pyarrow.PythonFile closed=False own_file=False is_seekable=False is_writable=True is_readable=False>\n\n    Create a stream for writing:\n\n    >>> buf = io.BytesIO()\n    >>> f =  pa.PythonFile(buf, mode = 'w')\n    >>> f.writable()\n    True\n    >>> f.write(b'PythonFile')\n    10\n    >>> buf.getvalue()\n    b'PythonFile'\n    >>> f.close()\n    >>> f\n    <pyarrow.PythonFile closed=True own_file=False is_seekable=False is_writable=True is_readable=False>\n\n    Create a stream for reading:\n\n    >>> buf = io.BytesIO(b'PythonFile')\n    >>> f =  pa.PythonFile(buf, mode = 'r')\n    >>> f.mode\n    'rb'\n    >>> f.read()\n    b'PythonFile'\n    >>> f\n    <pyarrow.PythonFile closed=False own_file=False is_seekable=True is_writable=False is_readable=True>\n    >>> f.close()\n    >>> f\n    <pyarrow.PythonFile closed=True own_file=False is_seekable=True is_writable=False is_readable=True>\n    "), /*tp_doc*/
        __pyx_tp_traverse_7pyarrow_3lib_PythonFile, /*tp_traverse*/
        __pyx_tp_clear_7pyarrow_3lib_PythonFile, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_10NativeFile_59__iter__, /*tp_iter*/
        #else
        0, /*tp_iter*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_10NativeFile_61__next__, /*tp_iternext*/
        #else
        0, /*tp_iternext*/
        #endif
        __pyx_methods_7pyarrow_3lib_PythonFile, /*tp_methods*/
        0, /*tp_members*/
        0, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        0, /*tp_init*/
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib_PythonFile, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif
      static struct __pyx_vtabstruct_7pyarrow_3lib_MemoryMappedFile __pyx_vtable_7pyarrow_3lib_MemoryMappedFile;

      static PyObject *__pyx_tp_new_7pyarrow_3lib_MemoryMappedFile(PyTypeObject *t, PyObject *a, PyObject *k) {
        struct __pyx_obj_7pyarrow_3lib_MemoryMappedFile *p;
        PyObject *o = __pyx_tp_new_7pyarrow_3lib_NativeFile(t, a, k);
        if (unlikely(!o)) return 0;
        p = ((struct __pyx_obj_7pyarrow_3lib_MemoryMappedFile *)o);
        p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_NativeFile*)__pyx_vtabptr_7pyarrow_3lib_MemoryMappedFile;
        __Pyx_default_placement_construct(&(p->handle));
        p->path = Py_None; Py_INCREF(Py_None);
        return o;
      }

      static void __pyx_tp_dealloc_7pyarrow_3lib_MemoryMappedFile(PyObject *o) {
        struct __pyx_obj_7pyarrow_3lib_MemoryMappedFile *p = (struct __pyx_obj_7pyarrow_3lib_MemoryMappedFile *)o;
        #if CYTHON_USE_TP_FINALIZE
        if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
          if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_7pyarrow_3lib_MemoryMappedFile) {
            if (PyObject_CallFinalizerFromDealloc(o)) return;
          }
        }
        #endif
        PyObject_GC_UnTrack(o);
        __Pyx_call_destructor(p->handle);
        Py_CLEAR(p->path);
        __pyx_tp_dealloc_7pyarrow_3lib_NativeFile(o);
      }

      static int __pyx_tp_traverse_7pyarrow_3lib_MemoryMappedFile(PyObject *o, visitproc v, void *a) {
        int e;
        struct __pyx_obj_7pyarrow_3lib_MemoryMappedFile *p = (struct __pyx_obj_7pyarrow_3lib_MemoryMappedFile *)o;
        #if !CYTHON_USE_MODULE_STATE
        e = 0;
        if (likely(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NativeFile)) {
          traverseproc traverse = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NativeFile, tp_traverse, traverseproc);
          if (traverse) { e = traverse(o, v, a); }
        } else
        #endif
        { e = __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_7pyarrow_3lib_MemoryMappedFile); }
        if (e) return e;
        {
          e = __Pyx_call_type_traverse(o, 0, v, a);
          if (e) return e;
        }
        if (p->path) {
          e = (*v)(p->path, a); if (e) return e;
        }
        return 0;
      }

      static int __pyx_tp_clear_7pyarrow_3lib_MemoryMappedFile(PyObject *o) {
        PyObject* tmp;
        struct __pyx_obj_7pyarrow_3lib_MemoryMappedFile *p = (struct __pyx_obj_7pyarrow_3lib_MemoryMappedFile *)o;
        #if !CYTHON_USE_MODULE_STATE
        if (likely(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NativeFile)) {
          inquiry clear = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NativeFile, tp_clear, inquiry);
          if (clear) clear(o);
        } else
        #endif
        { __Pyx_call_next_tp_clear(o, __pyx_tp_clear_7pyarrow_3lib_MemoryMappedFile); }
        tmp = ((PyObject*)p->path);
        p->path = Py_None; Py_INCREF(Py_None);
        Py_XDECREF(tmp);
        return 0;
      }

      static PyMethodDef __pyx_methods_7pyarrow_3lib_MemoryMappedFile[] = {
        {"create", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_16MemoryMappedFile_1create, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_16MemoryMappedFile_create},
        {"_open", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_16MemoryMappedFile_3_open, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_16MemoryMappedFile_2_open},
        {"resize", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_16MemoryMappedFile_5resize, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_16MemoryMappedFile_4resize},
        {"fileno", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_16MemoryMappedFile_7fileno, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_16MemoryMappedFile_6fileno},
        {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_16MemoryMappedFile_9__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_16MemoryMappedFile_8__reduce_cython__},
        {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_16MemoryMappedFile_11__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_16MemoryMappedFile_10__setstate_cython__},
        {0, 0, 0, 0}
      };
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib_MemoryMappedFile_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_MemoryMappedFile},
        {Py_tp_doc, (void *)PyDoc_STR("\n    A stream that represents a memory-mapped file.\n\n    Supports 'r', 'r+', 'w' modes.\n\n    Examples\n    --------\n    Create a new file with memory map:\n\n    >>> import pyarrow as pa\n    >>> mmap = pa.create_memory_map('example_mmap.dat', 10)\n    >>> mmap\n    <pyarrow.MemoryMappedFile closed=False own_file=False is_seekable=True is_writable=True is_readable=True>\n    >>> mmap.close()\n\n    Open an existing file with memory map:\n\n    >>> with pa.memory_map('example_mmap.dat') as mmap:\n    ...     mmap\n    ...\n    <pyarrow.MemoryMappedFile closed=False own_file=False is_seekable=True is_writable=False is_readable=True>\n    ")},
        {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyarrow_3lib_MemoryMappedFile},
        {Py_tp_clear, (void *)__pyx_tp_clear_7pyarrow_3lib_MemoryMappedFile},
        {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_MemoryMappedFile},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_MemoryMappedFile},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib_MemoryMappedFile_spec = {
        "pyarrow.lib.MemoryMappedFile",
        sizeof(struct __pyx_obj_7pyarrow_3lib_MemoryMappedFile),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
        __pyx_type_7pyarrow_3lib_MemoryMappedFile_slots,
      };
      #else

      static PyTypeObject __pyx_type_7pyarrow_3lib_MemoryMappedFile = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""MemoryMappedFile", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib_MemoryMappedFile), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib_MemoryMappedFile, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_10NativeFile_9__repr__, /*tp_repr*/
        #else
        0, /*tp_repr*/
        #endif
        0, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        0, /*tp_str*/
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
        PyDoc_STR("\n    A stream that represents a memory-mapped file.\n\n    Supports 'r', 'r+', 'w' modes.\n\n    Examples\n    --------\n    Create a new file with memory map:\n\n    >>> import pyarrow as pa\n    >>> mmap = pa.create_memory_map('example_mmap.dat', 10)\n    >>> mmap\n    <pyarrow.MemoryMappedFile closed=False own_file=False is_seekable=True is_writable=True is_readable=True>\n    >>> mmap.close()\n\n    Open an existing file with memory map:\n\n    >>> with pa.memory_map('example_mmap.dat') as mmap:\n    ...     mmap\n    ...\n    <pyarrow.MemoryMappedFile closed=False own_file=False is_seekable=True is_writable=False is_readable=True>\n    "), /*tp_doc*/
        __pyx_tp_traverse_7pyarrow_3lib_MemoryMappedFile, /*tp_traverse*/
        __pyx_tp_clear_7pyarrow_3lib_MemoryMappedFile, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_10NativeFile_59__iter__, /*tp_iter*/
        #else
        0, /*tp_iter*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_10NativeFile_61__next__, /*tp_iternext*/
        #else
        0, /*tp_iternext*/
        #endif
        __pyx_methods_7pyarrow_3lib_MemoryMappedFile, /*tp_methods*/
        0, /*tp_members*/
        0, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        0, /*tp_init*/
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib_MemoryMappedFile, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif
      static struct __pyx_vtabstruct_7pyarrow_3lib_OSFile __pyx_vtable_7pyarrow_3lib_OSFile;

      static PyObject *__pyx_tp_new_7pyarrow_3lib_OSFile(PyTypeObject *t, PyObject *a, PyObject *k) {
        struct __pyx_obj_7pyarrow_3lib_OSFile *p;
        PyObject *o = __pyx_tp_new_7pyarrow_3lib_NativeFile(t, a, k);
        if (unlikely(!o)) return 0;
        p = ((struct __pyx_obj_7pyarrow_3lib_OSFile *)o);
        p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_NativeFile*)__pyx_vtabptr_7pyarrow_3lib_OSFile;
        p->path = Py_None; Py_INCREF(Py_None);
        if (unlikely(__pyx_pw_7pyarrow_3lib_6OSFile_1__cinit__(o, a, k) < 0)) goto bad;
        return o;
        bad:
        Py_DECREF(o); o = 0;
        return NULL;
      }

      static void __pyx_tp_dealloc_7pyarrow_3lib_OSFile(PyObject *o) {
        struct __pyx_obj_7pyarrow_3lib_OSFile *p = (struct __pyx_obj_7pyarrow_3lib_OSFile *)o;
        #if CYTHON_USE_TP_FINALIZE
        if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
          if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_7pyarrow_3lib_OSFile) {
            if (PyObject_CallFinalizerFromDealloc(o)) return;
          }
        }
        #endif
        PyObject_GC_UnTrack(o);
        Py_CLEAR(p->path);
        __pyx_tp_dealloc_7pyarrow_3lib_NativeFile(o);
      }

      static int __pyx_tp_traverse_7pyarrow_3lib_OSFile(PyObject *o, visitproc v, void *a) {
        int e;
        struct __pyx_obj_7pyarrow_3lib_OSFile *p = (struct __pyx_obj_7pyarrow_3lib_OSFile *)o;
        #if !CYTHON_USE_MODULE_STATE
        e = 0;
        if (likely(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NativeFile)) {
          traverseproc traverse = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NativeFile, tp_traverse, traverseproc);
          if (traverse) { e = traverse(o, v, a); }
        } else
        #endif
        { e = __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_7pyarrow_3lib_OSFile); }
        if (e) return e;
        {
          e = __Pyx_call_type_traverse(o, 0, v, a);
          if (e) return e;
        }
        if (p->path) {
          e = (*v)(p->path, a); if (e) return e;
        }
        return 0;
      }

      static int __pyx_tp_clear_7pyarrow_3lib_OSFile(PyObject *o) {
        PyObject* tmp;
        struct __pyx_obj_7pyarrow_3lib_OSFile *p = (struct __pyx_obj_7pyarrow_3lib_OSFile *)o;
        #if !CYTHON_USE_MODULE_STATE
        if (likely(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NativeFile)) {
          inquiry clear = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NativeFile, tp_clear, inquiry);
          if (clear) clear(o);
        } else
        #endif
        { __Pyx_call_next_tp_clear(o, __pyx_tp_clear_7pyarrow_3lib_OSFile); }
        tmp = ((PyObject*)p->path);
        p->path = Py_None; Py_INCREF(Py_None);
        Py_XDECREF(tmp);
        return 0;
      }

      static PyMethodDef __pyx_methods_7pyarrow_3lib_OSFile[] = {
        {"fileno", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_6OSFile_3fileno, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_6OSFile_2fileno},
        {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_6OSFile_5__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_6OSFile_4__reduce_cython__},
        {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_6OSFile_7__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_6OSFile_6__setstate_cython__},
        {0, 0, 0, 0}
      };
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib_OSFile_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_OSFile},
        {Py_tp_doc, (void *)PyDoc_STR("\n    A stream backed by a regular file descriptor.\n\n    Examples\n    --------\n    Create a new file to write to:\n\n    >>> import pyarrow as pa\n    >>> with pa.OSFile('example_osfile.arrow', mode='w') as f:\n    ...     f.writable()\n    ...     f.write(b'OSFile')\n    ...     f.seekable()\n    ...\n    True\n    6\n    False\n\n    Open the file to read:\n\n    >>> with pa.OSFile('example_osfile.arrow', mode='r') as f:\n    ...     f.mode\n    ...     f.read()\n    ...\n    'rb'\n    b'OSFile'\n\n    Open the file to append:\n\n    >>> with pa.OSFile('example_osfile.arrow', mode='ab') as f:\n    ...     f.mode\n    ...     f.write(b' is super!')\n    ...\n    'ab'\n    10\n    >>> with pa.OSFile('example_osfile.arrow') as f:\n    ...     f.read()\n    ...\n    b'OSFile is super!'\n\n    Inspect created OSFile:\n\n    >>> pa.OSFile('example_osfile.arrow')\n    <pyarrow.OSFile closed=False own_file=False is_seekable=True is_writable=False is_readable=True>\n    ")},
        {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyarrow_3lib_OSFile},
        {Py_tp_clear, (void *)__pyx_tp_clear_7pyarrow_3lib_OSFile},
        {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_OSFile},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_OSFile},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib_OSFile_spec = {
        "pyarrow.lib.OSFile",
        sizeof(struct __pyx_obj_7pyarrow_3lib_OSFile),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
        __pyx_type_7pyarrow_3lib_OSFile_slots,
      };
      #else

      static PyTypeObject __pyx_type_7pyarrow_3lib_OSFile = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""OSFile", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib_OSFile), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib_OSFile, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_10NativeFile_9__repr__, /*tp_repr*/
        #else
        0, /*tp_repr*/
        #endif
        0, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        0, /*tp_str*/
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
        PyDoc_STR("\n    A stream backed by a regular file descriptor.\n\n    Examples\n    --------\n    Create a new file to write to:\n\n    >>> import pyarrow as pa\n    >>> with pa.OSFile('example_osfile.arrow', mode='w') as f:\n    ...     f.writable()\n    ...     f.write(b'OSFile')\n    ...     f.seekable()\n    ...\n    True\n    6\n    False\n\n    Open the file to read:\n\n    >>> with pa.OSFile('example_osfile.arrow', mode='r') as f:\n    ...     f.mode\n    ...     f.read()\n    ...\n    'rb'\n    b'OSFile'\n\n    Open the file to append:\n\n    >>> with pa.OSFile('example_osfile.arrow', mode='ab') as f:\n    ...     f.mode\n    ...     f.write(b' is super!')\n    ...\n    'ab'\n    10\n    >>> with pa.OSFile('example_osfile.arrow') as f:\n    ...     f.read()\n    ...\n    b'OSFile is super!'\n\n    Inspect created OSFile:\n\n    >>> pa.OSFile('example_osfile.arrow')\n    <pyarrow.OSFile closed=False own_file=False is_seekable=True is_writable=False is_readable=True>\n    "), /*tp_doc*/
        __pyx_tp_traverse_7pyarrow_3lib_OSFile, /*tp_traverse*/
        __pyx_tp_clear_7pyarrow_3lib_OSFile, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_10NativeFile_59__iter__, /*tp_iter*/
        #else
        0, /*tp_iter*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_10NativeFile_61__next__, /*tp_iternext*/
        #else
        0, /*tp_iternext*/
        #endif
        __pyx_methods_7pyarrow_3lib_OSFile, /*tp_methods*/
        0, /*tp_members*/
        0, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        0, /*tp_init*/
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib_OSFile, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif
      static struct __pyx_vtabstruct_7pyarrow_3lib_FixedSizeBufferWriter __pyx_vtable_7pyarrow_3lib_FixedSizeBufferWriter;

      static PyObject *__pyx_tp_new_7pyarrow_3lib_FixedSizeBufferWriter(PyTypeObject *t, PyObject *a, PyObject *k) {
        struct __pyx_obj_7pyarrow_3lib_FixedSizeBufferWriter *p;
        PyObject *o = __pyx_tp_new_7pyarrow_3lib_NativeFile(t, a, k);
        if (unlikely(!o)) return 0;
        p = ((struct __pyx_obj_7pyarrow_3lib_FixedSizeBufferWriter *)o);
        p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_NativeFile*)__pyx_vtabptr_7pyarrow_3lib_FixedSizeBufferWriter;
        if (unlikely(__pyx_pw_7pyarrow_3lib_21FixedSizeBufferWriter_1__cinit__(o, a, k) < 0)) goto bad;
        return o;
        bad:
        Py_DECREF(o); o = 0;
        return NULL;
      }

      static PyMethodDef __pyx_methods_7pyarrow_3lib_FixedSizeBufferWriter[] = {
        {"set_memcopy_threads", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_21FixedSizeBufferWriter_3set_memcopy_threads, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_21FixedSizeBufferWriter_2set_memcopy_threads},
        {"set_memcopy_blocksize", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_21FixedSizeBufferWriter_5set_memcopy_blocksize, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_21FixedSizeBufferWriter_4set_memcopy_blocksize},
        {"set_memcopy_threshold", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_21FixedSizeBufferWriter_7set_memcopy_threshold, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_21FixedSizeBufferWriter_6set_memcopy_threshold},
        {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_21FixedSizeBufferWriter_9__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_21FixedSizeBufferWriter_8__reduce_cython__},
        {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_21FixedSizeBufferWriter_11__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_21FixedSizeBufferWriter_10__setstate_cython__},
        {0, 0, 0, 0}
      };
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib_FixedSizeBufferWriter_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_NativeFile},
        {Py_tp_doc, (void *)PyDoc_STR("\n    A stream writing to a Arrow buffer.\n\n    Examples\n    --------\n    Create a stream to write to ``pyarrow.Buffer``:\n\n    >>> import pyarrow as pa\n    >>> buf = pa.allocate_buffer(5)\n    >>> with pa.output_stream(buf) as stream:\n    ...     stream.write(b'abcde')\n    ...     stream\n    ...\n    5\n    <pyarrow.FixedSizeBufferWriter closed=False own_file=False is_seekable=False is_writable=True is_readable=False>\n\n    Inspect the buffer:\n\n    >>> buf.to_pybytes()\n    b'abcde'\n    >>> buf\n    <pyarrow.Buffer address=... size=5 is_cpu=True is_mutable=True>\n    ")},
        {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_FixedSizeBufferWriter},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_FixedSizeBufferWriter},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib_FixedSizeBufferWriter_spec = {
        "pyarrow.lib.FixedSizeBufferWriter",
        sizeof(struct __pyx_obj_7pyarrow_3lib_FixedSizeBufferWriter),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
        __pyx_type_7pyarrow_3lib_FixedSizeBufferWriter_slots,
      };
      #else

      static PyTypeObject __pyx_type_7pyarrow_3lib_FixedSizeBufferWriter = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""FixedSizeBufferWriter", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib_FixedSizeBufferWriter), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib_NativeFile, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_10NativeFile_9__repr__, /*tp_repr*/
        #else
        0, /*tp_repr*/
        #endif
        0, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        0, /*tp_str*/
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
        PyDoc_STR("\n    A stream writing to a Arrow buffer.\n\n    Examples\n    --------\n    Create a stream to write to ``pyarrow.Buffer``:\n\n    >>> import pyarrow as pa\n    >>> buf = pa.allocate_buffer(5)\n    >>> with pa.output_stream(buf) as stream:\n    ...     stream.write(b'abcde')\n    ...     stream\n    ...\n    5\n    <pyarrow.FixedSizeBufferWriter closed=False own_file=False is_seekable=False is_writable=True is_readable=False>\n\n    Inspect the buffer:\n\n    >>> buf.to_pybytes()\n    b'abcde'\n    >>> buf\n    <pyarrow.Buffer address=... size=5 is_cpu=True is_mutable=True>\n    "), /*tp_doc*/
        0, /*tp_traverse*/
        0, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_10NativeFile_59__iter__, /*tp_iter*/
        #else
        0, /*tp_iter*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_10NativeFile_61__next__, /*tp_iternext*/
        #else
        0, /*tp_iternext*/
        #endif
        __pyx_methods_7pyarrow_3lib_FixedSizeBufferWriter, /*tp_methods*/
        0, /*tp_members*/
        0, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        0, /*tp_init*/
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib_FixedSizeBufferWriter, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif
      static struct __pyx_vtabstruct_7pyarrow_3lib_BufferOutputStream __pyx_vtable_7pyarrow_3lib_BufferOutputStream;

      static PyObject *__pyx_tp_new_7pyarrow_3lib_BufferOutputStream(PyTypeObject *t, PyObject *a, PyObject *k) {
        struct __pyx_obj_7pyarrow_3lib_BufferOutputStream *p;
        PyObject *o = __pyx_tp_new_7pyarrow_3lib_NativeFile(t, a, k);
        if (unlikely(!o)) return 0;
        p = ((struct __pyx_obj_7pyarrow_3lib_BufferOutputStream *)o);
        p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_NativeFile*)__pyx_vtabptr_7pyarrow_3lib_BufferOutputStream;
        __Pyx_default_placement_construct(&(p->buffer));
        if (unlikely(__pyx_pw_7pyarrow_3lib_18BufferOutputStream_1__cinit__(o, a, k) < 0)) goto bad;
        return o;
        bad:
        Py_DECREF(o); o = 0;
        return NULL;
      }

      static void __pyx_tp_dealloc_7pyarrow_3lib_BufferOutputStream(PyObject *o) {
        struct __pyx_obj_7pyarrow_3lib_BufferOutputStream *p = (struct __pyx_obj_7pyarrow_3lib_BufferOutputStream *)o;
        #if CYTHON_USE_TP_FINALIZE
        if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) {
          if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_7pyarrow_3lib_BufferOutputStream) {
            if (PyObject_CallFinalizerFromDealloc(o)) return;
          }
        }
        #endif
        __Pyx_call_destructor(p->buffer);
        __pyx_tp_dealloc_7pyarrow_3lib_NativeFile(o);
      }

      static PyMethodDef __pyx_methods_7pyarrow_3lib_BufferOutputStream[] = {
        {"getvalue", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_18BufferOutputStream_3getvalue, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_18BufferOutputStream_2getvalue},
        {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_18BufferOutputStream_5__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_18BufferOutputStream_4__reduce_cython__},
        {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_18BufferOutputStream_7__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_18BufferOutputStream_6__setstate_cython__},
        {0, 0, 0, 0}
      };
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib_BufferOutputStream_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_BufferOutputStream},
        {Py_tp_doc, (void *)PyDoc_STR("\n    An output stream that writes to a resizable buffer.\n\n    The buffer is produced as a result when ``getvalue()`` is called.\n\n    Examples\n    --------\n    Create an output stream, write data to it and finalize it with\n    ``getvalue()``:\n\n    >>> import pyarrow as pa\n    >>> f = pa.BufferOutputStream()\n    >>> f.write(b'pyarrow.Buffer')\n    14\n    >>> f.closed\n    False\n    >>> f.getvalue()\n    <pyarrow.Buffer address=... size=14 is_cpu=True is_mutable=True>\n    >>> f.closed\n    True\n    ")},
        {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_BufferOutputStream},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_BufferOutputStream},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib_BufferOutputStream_spec = {
        "pyarrow.lib.BufferOutputStream",
        sizeof(struct __pyx_obj_7pyarrow_3lib_BufferOutputStream),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
        __pyx_type_7pyarrow_3lib_BufferOutputStream_slots,
      };
      #else

      static PyTypeObject __pyx_type_7pyarrow_3lib_BufferOutputStream = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""BufferOutputStream", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib_BufferOutputStream), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib_BufferOutputStream, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_10NativeFile_9__repr__, /*tp_repr*/
        #else
        0, /*tp_repr*/
        #endif
        0, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        0, /*tp_str*/
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
        PyDoc_STR("\n    An output stream that writes to a resizable buffer.\n\n    The buffer is produced as a result when ``getvalue()`` is called.\n\n    Examples\n    --------\n    Create an output stream, write data to it and finalize it with\n    ``getvalue()``:\n\n    >>> import pyarrow as pa\n    >>> f = pa.BufferOutputStream()\n    >>> f.write(b'pyarrow.Buffer')\n    14\n    >>> f.closed\n    False\n    >>> f.getvalue()\n    <pyarrow.Buffer address=... size=14 is_cpu=True is_mutable=True>\n    >>> f.closed\n    True\n    "), /*tp_doc*/
        0, /*tp_traverse*/
        0, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_10NativeFile_59__iter__, /*tp_iter*/
        #else
        0, /*tp_iter*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_10NativeFile_61__next__, /*tp_iternext*/
        #else
        0, /*tp_iternext*/
        #endif
        __pyx_methods_7pyarrow_3lib_BufferOutputStream, /*tp_methods*/
        0, /*tp_members*/
        0, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        0, /*tp_init*/
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib_BufferOutputStream, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif
      static struct __pyx_vtabstruct_7pyarrow_3lib_MockOutputStream __pyx_vtable_7pyarrow_3lib_MockOutputStream;

      static PyObject *__pyx_tp_new_7pyarrow_3lib_MockOutputStream(PyTypeObject *t, PyObject *a, PyObject *k) {
        struct __pyx_obj_7pyarrow_3lib_MockOutputStream *p;
        PyObject *o = __pyx_tp_new_7pyarrow_3lib_NativeFile(t, a, k);
        if (unlikely(!o)) return 0;
        p = ((struct __pyx_obj_7pyarrow_3lib_MockOutputStream *)o);
        p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_NativeFile*)__pyx_vtabptr_7pyarrow_3lib_MockOutputStream;
        if (unlikely(__pyx_pw_7pyarrow_3lib_16MockOutputStream_1__cinit__(o, __pyx_mstate_global->__pyx_empty_tuple, NULL) < 0)) goto bad;
        return o;
        bad:
        Py_DECREF(o); o = 0;
        return NULL;
      }

      static PyMethodDef __pyx_methods_7pyarrow_3lib_MockOutputStream[] = {
        {"size", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_16MockOutputStream_3size, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_16MockOutputStream_2size},
        {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_16MockOutputStream_5__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_16MockOutputStream_4__reduce_cython__},
        {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_16MockOutputStream_7__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_16MockOutputStream_6__setstate_cython__},
        {0, 0, 0, 0}
      };
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib_MockOutputStream_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_NativeFile},
        {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_MockOutputStream},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_MockOutputStream},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib_MockOutputStream_spec = {
        "pyarrow.lib.MockOutputStream",
        sizeof(struct __pyx_obj_7pyarrow_3lib_MockOutputStream),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
        __pyx_type_7pyarrow_3lib_MockOutputStream_slots,
      };
      #else

      static PyTypeObject __pyx_type_7pyarrow_3lib_MockOutputStream = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""MockOutputStream", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib_MockOutputStream), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib_NativeFile, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_10NativeFile_9__repr__, /*tp_repr*/
        #else
        0, /*tp_repr*/
        #endif
        0, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        0, /*tp_str*/
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
        0, /*tp_doc*/
        0, /*tp_traverse*/
        0, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_10NativeFile_59__iter__, /*tp_iter*/
        #else
        0, /*tp_iter*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_10NativeFile_61__next__, /*tp_iternext*/
        #else
        0, /*tp_iternext*/
        #endif
        __pyx_methods_7pyarrow_3lib_MockOutputStream, /*tp_methods*/
        0, /*tp_members*/
        0, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        0, /*tp_init*/
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib_MockOutputStream, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif
      static struct __pyx_vtabstruct_7pyarrow_3lib_BufferReader __pyx_vtable_7pyarrow_3lib_BufferReader;

      static PyObject *__pyx_tp_new_7pyarrow_3lib_BufferReader(PyTypeObject *t, PyObject *a, PyObject *k) {
        struct __pyx_obj_7pyarrow_3lib_BufferReader *p;
        PyObject *o = __pyx_tp_new_7pyarrow_3lib_NativeFile(t, a, k);
        if (unlikely(!o)) return 0;
        p = ((struct __pyx_obj_7pyarrow_3lib_BufferReader *)o);
        p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_NativeFile*)__pyx_vtabptr_7pyarrow_3lib_BufferReader;
        p->buffer = ((struct __pyx_obj_7pyarrow_3lib_Buffer *)Py_None); Py_INCREF(Py_None);
        if (unlikely(__pyx_pw_7pyarrow_3lib_12BufferReader_3__cinit__(o, a, k) < 0)) goto bad;
        return o;
        bad:
        Py_DECREF(o); o = 0;
        return NULL;
      }

      static void __pyx_tp_dealloc_7pyarrow_3lib_BufferReader(PyObject *o) {
        struct __pyx_obj_7pyarrow_3lib_BufferReader *p = (struct __pyx_obj_7pyarrow_3lib_BufferReader *)o;
        #if CYTHON_USE_TP_FINALIZE
        if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
          if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_7pyarrow_3lib_BufferReader) {
            if (PyObject_CallFinalizerFromDealloc(o)) return;
          }
        }
        #endif
        PyObject_GC_UnTrack(o);
        Py_CLEAR(p->buffer);
        __pyx_tp_dealloc_7pyarrow_3lib_NativeFile(o);
      }

      static int __pyx_tp_traverse_7pyarrow_3lib_BufferReader(PyObject *o, visitproc v, void *a) {
        int e;
        struct __pyx_obj_7pyarrow_3lib_BufferReader *p = (struct __pyx_obj_7pyarrow_3lib_BufferReader *)o;
        #if !CYTHON_USE_MODULE_STATE
        e = 0;
        if (likely(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NativeFile)) {
          traverseproc traverse = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NativeFile, tp_traverse, traverseproc);
          if (traverse) { e = traverse(o, v, a); }
        } else
        #endif
        { e = __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_7pyarrow_3lib_BufferReader); }
        if (e) return e;
        {
          e = __Pyx_call_type_traverse(o, 0, v, a);
          if (e) return e;
        }
        if (p->buffer) {
          e = (*v)(((PyObject *)p->buffer), a); if (e) return e;
        }
        return 0;
      }

      static int __pyx_tp_clear_7pyarrow_3lib_BufferReader(PyObject *o) {
        PyObject* tmp;
        struct __pyx_obj_7pyarrow_3lib_BufferReader *p = (struct __pyx_obj_7pyarrow_3lib_BufferReader *)o;
        #if !CYTHON_USE_MODULE_STATE
        if (likely(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NativeFile)) {
          inquiry clear = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NativeFile, tp_clear, inquiry);
          if (clear) clear(o);
        } else
        #endif
        { __Pyx_call_next_tp_clear(o, __pyx_tp_clear_7pyarrow_3lib_BufferReader); }
        tmp = ((PyObject*)p->buffer);
        p->buffer = ((struct __pyx_obj_7pyarrow_3lib_Buffer *)Py_None); Py_INCREF(Py_None);
        Py_XDECREF(tmp);
        return 0;
      }

      static PyMethodDef __pyx_methods_7pyarrow_3lib_BufferReader[] = {
        {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12BufferReader_5__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12BufferReader_4__reduce_cython__},
        {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_12BufferReader_7__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_12BufferReader_6__setstate_cython__},
        {0, 0, 0, 0}
      };
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib_BufferReader_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_BufferReader},
        {Py_tp_doc, (void *)PyDoc_STR("BufferReader(obj)\n\nZero-copy reader from objects convertible to Arrow buffer.\n\nParameters\n----------\nobj : Python bytes or pyarrow.Buffer\n\nExamples\n--------\nCreate an Arrow input stream and inspect it:\n\n>>> import pyarrow as pa\n>>> data = b'reader data'\n>>> buf = memoryview(data)\n>>> with pa.input_stream(buf) as stream:\n...     stream.size()\n...     stream.read(6)\n...     stream.seek(7)\n...     stream.read(15)\n...\n11\nb'reader'\n7\nb'data'")},
        {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyarrow_3lib_BufferReader},
        {Py_tp_clear, (void *)__pyx_tp_clear_7pyarrow_3lib_BufferReader},
        {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_BufferReader},
        {Py_tp_init, (void *)__pyx_pw_7pyarrow_3lib_12BufferReader_1__init__},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_BufferReader},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib_BufferReader_spec = {
        "pyarrow.lib.BufferReader",
        sizeof(struct __pyx_obj_7pyarrow_3lib_BufferReader),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
        __pyx_type_7pyarrow_3lib_BufferReader_slots,
      };
      #else

      static PyTypeObject __pyx_type_7pyarrow_3lib_BufferReader = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""BufferReader", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib_BufferReader), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib_BufferReader, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_10NativeFile_9__repr__, /*tp_repr*/
        #else
        0, /*tp_repr*/
        #endif
        0, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        0, /*tp_str*/
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
        PyDoc_STR("BufferReader(obj)\n\nZero-copy reader from objects convertible to Arrow buffer.\n\nParameters\n----------\nobj : Python bytes or pyarrow.Buffer\n\nExamples\n--------\nCreate an Arrow input stream and inspect it:\n\n>>> import pyarrow as pa\n>>> data = b'reader data'\n>>> buf = memoryview(data)\n>>> with pa.input_stream(buf) as stream:\n...     stream.size()\n...     stream.read(6)\n...     stream.seek(7)\n...     stream.read(15)\n...\n11\nb'reader'\n7\nb'data'"), /*tp_doc*/
        __pyx_tp_traverse_7pyarrow_3lib_BufferReader, /*tp_traverse*/
        __pyx_tp_clear_7pyarrow_3lib_BufferReader, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_10NativeFile_59__iter__, /*tp_iter*/
        #else
        0, /*tp_iter*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_10NativeFile_61__next__, /*tp_iternext*/
        #else
        0, /*tp_iternext*/
        #endif
        __pyx_methods_7pyarrow_3lib_BufferReader, /*tp_methods*/
        0, /*tp_members*/
        0, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        __pyx_pw_7pyarrow_3lib_12BufferReader_1__init__, /*tp_init*/
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib_BufferReader, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif
      static struct __pyx_vtabstruct_7pyarrow_3lib_TransformInputStream __pyx_vtable_7pyarrow_3lib_TransformInputStream;

      static PyObject *__pyx_tp_new_7pyarrow_3lib_TransformInputStream(PyTypeObject *t, PyObject *a, PyObject *k) {
        struct __pyx_obj_7pyarrow_3lib_TransformInputStream *p;
        PyObject *o = __pyx_tp_new_7pyarrow_3lib_NativeFile(t, a, k);
        if (unlikely(!o)) return 0;
        p = ((struct __pyx_obj_7pyarrow_3lib_TransformInputStream *)o);
        p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7pyarrow_3lib_NativeFile*)__pyx_vtabptr_7pyarrow_3lib_TransformInputStream;
        return o;
      }

      static PyMethodDef __pyx_methods_7pyarrow_3lib_TransformInputStream[] = {
        {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_20TransformInputStream_3__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_20TransformInputStream_2__reduce_cython__},
        {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_20TransformInputStream_5__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_20TransformInputStream_4__setstate_cython__},
        {0, 0, 0, 0}
      };
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib_TransformInputStream_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_NativeFile},
        {Py_tp_doc, (void *)PyDoc_STR("TransformInputStream(NativeFile stream, transform_func)\n\nTransform an input stream.\n\nParameters\n----------\nstream : NativeFile\n    The stream to transform.\ntransform_func : callable\n    The transformation to apply.")},
        {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_TransformInputStream},
        {Py_tp_init, (void *)__pyx_pw_7pyarrow_3lib_20TransformInputStream_1__init__},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_TransformInputStream},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib_TransformInputStream_spec = {
        "pyarrow.lib.TransformInputStream",
        sizeof(struct __pyx_obj_7pyarrow_3lib_TransformInputStream),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
        __pyx_type_7pyarrow_3lib_TransformInputStream_slots,
      };
      #else

      static PyTypeObject __pyx_type_7pyarrow_3lib_TransformInputStream = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""TransformInputStream", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib_TransformInputStream), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib_NativeFile, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_10NativeFile_9__repr__, /*tp_repr*/
        #else
        0, /*tp_repr*/
        #endif
        0, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        0, /*tp_str*/
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
        PyDoc_STR("TransformInputStream(NativeFile stream, transform_func)\n\nTransform an input stream.\n\nParameters\n----------\nstream : NativeFile\n    The stream to transform.\ntransform_func : callable\n    The transformation to apply."), /*tp_doc*/
        0, /*tp_traverse*/
        0, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_10NativeFile_59__iter__, /*tp_iter*/
        #else
        0, /*tp_iter*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_10NativeFile_61__next__, /*tp_iternext*/
        #else
        0, /*tp_iternext*/
        #endif
        __pyx_methods_7pyarrow_3lib_TransformInputStream, /*tp_methods*/
        0, /*tp_members*/
        0, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        __pyx_pw_7pyarrow_3lib_20TransformInputStream_1__init__, /*tp_init*/
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib_TransformInputStream, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif

      static PyObject *__pyx_tp_new_7pyarrow_3lib_MessageReader(PyTypeObject *t, PyObject *a, PyObject *k) {
        struct __pyx_obj_7pyarrow_3lib_MessageReader *p;
        PyObject *o = __pyx_tp_new_7pyarrow_3lib__Weakrefable(t, a, k);
        if (unlikely(!o)) return 0;
        p = ((struct __pyx_obj_7pyarrow_3lib_MessageReader *)o);
        __Pyx_default_placement_construct(&(p->reader));
        if (unlikely(__pyx_pw_7pyarrow_3lib_13MessageReader_1__cinit__(o, __pyx_mstate_global->__pyx_empty_tuple, NULL) < 0)) goto bad;
        return o;
        bad:
        Py_DECREF(o); o = 0;
        return NULL;
      }

      static void __pyx_tp_dealloc_7pyarrow_3lib_MessageReader(PyObject *o) {
        struct __pyx_obj_7pyarrow_3lib_MessageReader *p = (struct __pyx_obj_7pyarrow_3lib_MessageReader *)o;
        #if CYTHON_USE_TP_FINALIZE
        if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) {
          if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_7pyarrow_3lib_MessageReader) {
            if (PyObject_CallFinalizerFromDealloc(o)) return;
          }
        }
        #endif
        __Pyx_call_destructor(p->reader);
        __pyx_tp_dealloc_7pyarrow_3lib__Weakrefable(o);
      }

      static PyObject *__pyx_specialmethod___pyx_pw_7pyarrow_3lib_13MessageReader_9__next__(PyObject *self, CYTHON_UNUSED PyObject *arg) {
        PyObject *res = __pyx_pw_7pyarrow_3lib_13MessageReader_9__next__(self);
        if (!res && !PyErr_Occurred()) { PyErr_SetNone(PyExc_StopIteration); }
        return res;
      }

      static PyMethodDef __pyx_methods_7pyarrow_3lib_MessageReader[] = {
        {"open_stream", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_13MessageReader_5open_stream, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_13MessageReader_4open_stream},
        {"__next__", (PyCFunction)__pyx_specialmethod___pyx_pw_7pyarrow_3lib_13MessageReader_9__next__, METH_NOARGS|METH_COEXIST, 0},
        {"read_next_message", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_13MessageReader_11read_next_message, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_13MessageReader_10read_next_message},
        {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_13MessageReader_13__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_13MessageReader_12__reduce_cython__},
        {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_13MessageReader_15__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_13MessageReader_14__setstate_cython__},
        {0, 0, 0, 0}
      };
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib_MessageReader_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib_MessageReader},
        {Py_tp_doc, (void *)PyDoc_STR("MessageReader()\n\nInterface for reading Message objects from some source (like an\nInputStream)")},
        {Py_tp_iter, (void *)__pyx_pw_7pyarrow_3lib_13MessageReader_7__iter__},
        {Py_tp_iternext, (void *)__pyx_pw_7pyarrow_3lib_13MessageReader_9__next__},
        {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib_MessageReader},
        {Py_tp_init, (void *)__pyx_pw_7pyarrow_3lib_13MessageReader_3__init__},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib_MessageReader},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib_MessageReader_spec = {
        "pyarrow.lib.MessageReader",
        sizeof(struct __pyx_obj_7pyarrow_3lib_MessageReader),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
        __pyx_type_7pyarrow_3lib_MessageReader_slots,
      };
      #else

      static PyTypeObject __pyx_type_7pyarrow_3lib_MessageReader = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""MessageReader", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib_MessageReader), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib_MessageReader, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        0, /*tp_repr*/
        0, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        0, /*tp_str*/
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
        PyDoc_STR("MessageReader()\n\nInterface for reading Message objects from some source (like an\nInputStream)"), /*tp_doc*/
        0, /*tp_traverse*/
        0, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        __pyx_pw_7pyarrow_3lib_13MessageReader_7__iter__, /*tp_iter*/
        __pyx_pw_7pyarrow_3lib_13MessageReader_9__next__, /*tp_iternext*/
        __pyx_methods_7pyarrow_3lib_MessageReader, /*tp_methods*/
        0, /*tp_members*/
        0, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        __pyx_pw_7pyarrow_3lib_13MessageReader_3__init__, /*tp_init*/
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib_MessageReader, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif

      static PyObject *__pyx_tp_new_7pyarrow_3lib__RecordBatchStreamWriter(PyTypeObject *t, PyObject *a, PyObject *k) {
        struct __pyx_obj_7pyarrow_3lib__RecordBatchStreamWriter *p;
        PyObject *o = __pyx_tp_new_7pyarrow_3lib__CRecordBatchWriter(t, a, k);
        if (unlikely(!o)) return 0;
        p = ((struct __pyx_obj_7pyarrow_3lib__RecordBatchStreamWriter *)o);
        __Pyx_default_placement_construct(&(p->options));
        if (unlikely(__pyx_pw_7pyarrow_3lib_24_RecordBatchStreamWriter_1__cinit__(o, __pyx_mstate_global->__pyx_empty_tuple, NULL) < 0)) goto bad;
        return o;
        bad:
        Py_DECREF(o); o = 0;
        return NULL;
      }

      static void __pyx_tp_dealloc_7pyarrow_3lib__RecordBatchStreamWriter(PyObject *o) {
        struct __pyx_obj_7pyarrow_3lib__RecordBatchStreamWriter *p = (struct __pyx_obj_7pyarrow_3lib__RecordBatchStreamWriter *)o;
        #if CYTHON_USE_TP_FINALIZE
        if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) {
          if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_7pyarrow_3lib__RecordBatchStreamWriter) {
            if (PyObject_CallFinalizerFromDealloc(o)) return;
          }
        }
        #endif
        {
          PyObject *etype, *eval, *etb;
          PyErr_Fetch(&etype, &eval, &etb);
          __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
          __pyx_pw_7pyarrow_3lib_24_RecordBatchStreamWriter_3__dealloc__(o);
          __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
          PyErr_Restore(etype, eval, etb);
        }
        __Pyx_call_destructor(p->options);
        __pyx_tp_dealloc_7pyarrow_3lib__CRecordBatchWriter(o);
      }

      static PyObject *__pyx_getprop_7pyarrow_3lib_24_RecordBatchStreamWriter__use_legacy_format(PyObject *o, CYTHON_UNUSED void *x) {
        return __pyx_pw_7pyarrow_3lib_24_RecordBatchStreamWriter_18_use_legacy_format_1__get__(o);
      }

      static PyObject *__pyx_getprop_7pyarrow_3lib_24_RecordBatchStreamWriter__metadata_version(PyObject *o, CYTHON_UNUSED void *x) {
        return __pyx_pw_7pyarrow_3lib_24_RecordBatchStreamWriter_17_metadata_version_1__get__(o);
      }

      static PyMethodDef __pyx_methods_7pyarrow_3lib__RecordBatchStreamWriter[] = {
        {"_open", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_24_RecordBatchStreamWriter_5_open, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_24_RecordBatchStreamWriter_4_open},
        {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_24_RecordBatchStreamWriter_7__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_24_RecordBatchStreamWriter_6__reduce_cython__},
        {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_24_RecordBatchStreamWriter_9__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_24_RecordBatchStreamWriter_8__setstate_cython__},
        {0, 0, 0, 0}
      };

      static struct PyGetSetDef __pyx_getsets_7pyarrow_3lib__RecordBatchStreamWriter[] = {
        {"_use_legacy_format", __pyx_getprop_7pyarrow_3lib_24_RecordBatchStreamWriter__use_legacy_format, 0, 0, 0},
        {"_metadata_version", __pyx_getprop_7pyarrow_3lib_24_RecordBatchStreamWriter__metadata_version, 0, 0, 0},
        {0, 0, 0, 0, 0}
      };
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib__RecordBatchStreamWriter_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib__RecordBatchStreamWriter},
        {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib__RecordBatchStreamWriter},
        {Py_tp_getset, (void *)__pyx_getsets_7pyarrow_3lib__RecordBatchStreamWriter},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib__RecordBatchStreamWriter},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib__RecordBatchStreamWriter_spec = {
        "pyarrow.lib._RecordBatchStreamWriter",
        sizeof(struct __pyx_obj_7pyarrow_3lib__RecordBatchStreamWriter),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
        __pyx_type_7pyarrow_3lib__RecordBatchStreamWriter_slots,
      };
      #else

      static PyTypeObject __pyx_type_7pyarrow_3lib__RecordBatchStreamWriter = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""_RecordBatchStreamWriter", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib__RecordBatchStreamWriter), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib__RecordBatchStreamWriter, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        0, /*tp_repr*/
        0, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        0, /*tp_str*/
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
        0, /*tp_doc*/
        0, /*tp_traverse*/
        0, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        0, /*tp_iter*/
        0, /*tp_iternext*/
        __pyx_methods_7pyarrow_3lib__RecordBatchStreamWriter, /*tp_methods*/
        0, /*tp_members*/
        __pyx_getsets_7pyarrow_3lib__RecordBatchStreamWriter, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        0, /*tp_init*/
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib__RecordBatchStreamWriter, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif

      static PyObject *__pyx_tp_new_7pyarrow_3lib__RecordBatchStreamReader(PyTypeObject *t, PyObject *a, PyObject *k) {
        struct __pyx_obj_7pyarrow_3lib__RecordBatchStreamReader *p;
        PyObject *o = __pyx_tp_new_7pyarrow_3lib_RecordBatchReader(t, a, k);
        if (unlikely(!o)) return 0;
        p = ((struct __pyx_obj_7pyarrow_3lib__RecordBatchStreamReader *)o);
        __Pyx_default_placement_construct(&(p->in_stream));
        __Pyx_default_placement_construct(&(p->options));
        if (unlikely(__pyx_pw_7pyarrow_3lib_24_RecordBatchStreamReader_1__cinit__(o, __pyx_mstate_global->__pyx_empty_tuple, NULL) < 0)) goto bad;
        return o;
        bad:
        Py_DECREF(o); o = 0;
        return NULL;
      }

      static void __pyx_tp_dealloc_7pyarrow_3lib__RecordBatchStreamReader(PyObject *o) {
        struct __pyx_obj_7pyarrow_3lib__RecordBatchStreamReader *p = (struct __pyx_obj_7pyarrow_3lib__RecordBatchStreamReader *)o;
        #if CYTHON_USE_TP_FINALIZE
        if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) {
          if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_7pyarrow_3lib__RecordBatchStreamReader) {
            if (PyObject_CallFinalizerFromDealloc(o)) return;
          }
        }
        #endif
        __Pyx_call_destructor(p->in_stream);
        __Pyx_call_destructor(p->options);
        __pyx_tp_dealloc_7pyarrow_3lib_RecordBatchReader(o);
      }

      static PyObject *__pyx_getprop_7pyarrow_3lib_24_RecordBatchStreamReader_stats(PyObject *o, CYTHON_UNUSED void *x) {
        return __pyx_pw_7pyarrow_3lib_24_RecordBatchStreamReader_5stats_1__get__(o);
      }

      static PyMethodDef __pyx_methods_7pyarrow_3lib__RecordBatchStreamReader[] = {
        {"_open", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_24_RecordBatchStreamReader_3_open, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_24_RecordBatchStreamReader_2_open},
        {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_24_RecordBatchStreamReader_5__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_24_RecordBatchStreamReader_4__reduce_cython__},
        {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_24_RecordBatchStreamReader_7__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_24_RecordBatchStreamReader_6__setstate_cython__},
        {0, 0, 0, 0}
      };

      static struct PyGetSetDef __pyx_getsets_7pyarrow_3lib__RecordBatchStreamReader[] = {
        {"stats", __pyx_getprop_7pyarrow_3lib_24_RecordBatchStreamReader_stats, 0, PyDoc_STR("\n        Current IPC read statistics.\n        "), 0},
        {0, 0, 0, 0, 0}
      };
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib__RecordBatchStreamReader_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib__RecordBatchStreamReader},
        {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib__RecordBatchStreamReader},
        {Py_tp_getset, (void *)__pyx_getsets_7pyarrow_3lib__RecordBatchStreamReader},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib__RecordBatchStreamReader},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib__RecordBatchStreamReader_spec = {
        "pyarrow.lib._RecordBatchStreamReader",
        sizeof(struct __pyx_obj_7pyarrow_3lib__RecordBatchStreamReader),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
        __pyx_type_7pyarrow_3lib__RecordBatchStreamReader_slots,
      };
      #else

      static PyTypeObject __pyx_type_7pyarrow_3lib__RecordBatchStreamReader = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""_RecordBatchStreamReader", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib__RecordBatchStreamReader), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib__RecordBatchStreamReader, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        0, /*tp_repr*/
        0, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        0, /*tp_str*/
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
        0, /*tp_doc*/
        0, /*tp_traverse*/
        0, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_17RecordBatchReader_3__iter__, /*tp_iter*/
        #else
        0, /*tp_iter*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_17RecordBatchReader_5__next__, /*tp_iternext*/
        #else
        0, /*tp_iternext*/
        #endif
        __pyx_methods_7pyarrow_3lib__RecordBatchStreamReader, /*tp_methods*/
        0, /*tp_members*/
        __pyx_getsets_7pyarrow_3lib__RecordBatchStreamReader, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY || 0
        __pyx_pw_7pyarrow_3lib_17RecordBatchReader_1__init__, /*tp_init*/
        #else
        0, /*tp_init*/
        #endif
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib__RecordBatchStreamReader, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif

      static PyMethodDef __pyx_methods_7pyarrow_3lib__RecordBatchFileWriter[] = {
        {"_open", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_22_RecordBatchFileWriter_1_open, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_22_RecordBatchFileWriter__open},
        {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_22_RecordBatchFileWriter_3__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_22_RecordBatchFileWriter_2__reduce_cython__},
        {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_22_RecordBatchFileWriter_5__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_22_RecordBatchFileWriter_4__setstate_cython__},
        {0, 0, 0, 0}
      };
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib__RecordBatchFileWriter_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib__RecordBatchStreamWriter},
        {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib__RecordBatchFileWriter},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib__RecordBatchStreamWriter},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib__RecordBatchFileWriter_spec = {
        "pyarrow.lib._RecordBatchFileWriter",
        sizeof(struct __pyx_obj_7pyarrow_3lib__RecordBatchFileWriter),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
        __pyx_type_7pyarrow_3lib__RecordBatchFileWriter_slots,
      };
      #else

      static PyTypeObject __pyx_type_7pyarrow_3lib__RecordBatchFileWriter = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""_RecordBatchFileWriter", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib__RecordBatchFileWriter), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib__RecordBatchStreamWriter, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        0, /*tp_repr*/
        0, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        0, /*tp_str*/
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
        0, /*tp_doc*/
        0, /*tp_traverse*/
        0, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        0, /*tp_iter*/
        0, /*tp_iternext*/
        __pyx_methods_7pyarrow_3lib__RecordBatchFileWriter, /*tp_methods*/
        0, /*tp_members*/
        0, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        0, /*tp_init*/
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib__RecordBatchStreamWriter, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif

      static PyObject *__pyx_tp_new_7pyarrow_3lib__RecordBatchFileReader(PyTypeObject *t, PyObject *a, PyObject *k) {
        struct __pyx_obj_7pyarrow_3lib__RecordBatchFileReader *p;
        PyObject *o = __pyx_tp_new_7pyarrow_3lib__Weakrefable(t, a, k);
        if (unlikely(!o)) return 0;
        p = ((struct __pyx_obj_7pyarrow_3lib__RecordBatchFileReader *)o);
        __Pyx_default_placement_construct(&(p->reader));
        __Pyx_default_placement_construct(&(p->file));
        __Pyx_default_placement_construct(&(p->options));
        p->schema = ((struct __pyx_obj_7pyarrow_3lib_Schema *)Py_None); Py_INCREF(Py_None);
        if (unlikely(__pyx_pw_7pyarrow_3lib_22_RecordBatchFileReader_1__cinit__(o, __pyx_mstate_global->__pyx_empty_tuple, NULL) < 0)) goto bad;
        return o;
        bad:
        Py_DECREF(o); o = 0;
        return NULL;
      }

      static void __pyx_tp_dealloc_7pyarrow_3lib__RecordBatchFileReader(PyObject *o) {
        struct __pyx_obj_7pyarrow_3lib__RecordBatchFileReader *p = (struct __pyx_obj_7pyarrow_3lib__RecordBatchFileReader *)o;
        #if CYTHON_USE_TP_FINALIZE
        if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
          if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_7pyarrow_3lib__RecordBatchFileReader) {
            if (PyObject_CallFinalizerFromDealloc(o)) return;
          }
        }
        #endif
        PyObject_GC_UnTrack(o);
        __Pyx_call_destructor(p->reader);
        __Pyx_call_destructor(p->file);
        __Pyx_call_destructor(p->options);
        Py_CLEAR(p->schema);
        __pyx_tp_dealloc_7pyarrow_3lib__Weakrefable(o);
      }

      static int __pyx_tp_traverse_7pyarrow_3lib__RecordBatchFileReader(PyObject *o, visitproc v, void *a) {
        int e;
        struct __pyx_obj_7pyarrow_3lib__RecordBatchFileReader *p = (struct __pyx_obj_7pyarrow_3lib__RecordBatchFileReader *)o;
        #if !CYTHON_USE_MODULE_STATE
        e = 0;
        if (likely(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Weakrefable)) {
          traverseproc traverse = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Weakrefable, tp_traverse, traverseproc);
          if (traverse) { e = traverse(o, v, a); }
        } else
        #endif
        { e = __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_7pyarrow_3lib__RecordBatchFileReader); }
        if (e) return e;
        {
          e = __Pyx_call_type_traverse(o, 0, v, a);
          if (e) return e;
        }
        if (p->schema) {
          e = (*v)(((PyObject *)p->schema), a); if (e) return e;
        }
        return 0;
      }

      static int __pyx_tp_clear_7pyarrow_3lib__RecordBatchFileReader(PyObject *o) {
        PyObject* tmp;
        struct __pyx_obj_7pyarrow_3lib__RecordBatchFileReader *p = (struct __pyx_obj_7pyarrow_3lib__RecordBatchFileReader *)o;
        #if !CYTHON_USE_MODULE_STATE
        if (likely(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Weakrefable)) {
          inquiry clear = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Weakrefable, tp_clear, inquiry);
          if (clear) clear(o);
        } else
        #endif
        { __Pyx_call_next_tp_clear(o, __pyx_tp_clear_7pyarrow_3lib__RecordBatchFileReader); }
        tmp = ((PyObject*)p->schema);
        p->schema = ((struct __pyx_obj_7pyarrow_3lib_Schema *)Py_None); Py_INCREF(Py_None);
        Py_XDECREF(tmp);
        return 0;
      }

      static PyObject *__pyx_getprop_7pyarrow_3lib_22_RecordBatchFileReader_num_record_batches(PyObject *o, CYTHON_UNUSED void *x) {
        return __pyx_pw_7pyarrow_3lib_22_RecordBatchFileReader_18num_record_batches_1__get__(o);
      }

      static PyObject *__pyx_getprop_7pyarrow_3lib_22_RecordBatchFileReader_stats(PyObject *o, CYTHON_UNUSED void *x) {
        return __pyx_pw_7pyarrow_3lib_22_RecordBatchFileReader_5stats_1__get__(o);
      }

      static PyObject *__pyx_getprop_7pyarrow_3lib_22_RecordBatchFileReader_metadata(PyObject *o, CYTHON_UNUSED void *x) {
        return __pyx_pw_7pyarrow_3lib_22_RecordBatchFileReader_8metadata_1__get__(o);
      }

      static PyObject *__pyx_getprop_7pyarrow_3lib_22_RecordBatchFileReader_schema(PyObject *o, CYTHON_UNUSED void *x) {
        return __pyx_pw_7pyarrow_3lib_22_RecordBatchFileReader_6schema_1__get__(o);
      }

      static PyMethodDef __pyx_methods_7pyarrow_3lib__RecordBatchFileReader[] = {
        {"_open", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_22_RecordBatchFileReader_3_open, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_22_RecordBatchFileReader_2_open},
        {"get_batch", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_22_RecordBatchFileReader_5get_batch, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_22_RecordBatchFileReader_4get_batch},
        {"get_batch_with_custom_metadata", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_22_RecordBatchFileReader_7get_batch_with_custom_metadata, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_22_RecordBatchFileReader_6get_batch_with_custom_metadata},
        {"read_all", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_22_RecordBatchFileReader_9read_all, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_22_RecordBatchFileReader_8read_all},
        {"__enter__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_22_RecordBatchFileReader_11__enter__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_22_RecordBatchFileReader_10__enter__},
        {"__exit__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_22_RecordBatchFileReader_13__exit__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_22_RecordBatchFileReader_12__exit__},
        {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_22_RecordBatchFileReader_15__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_22_RecordBatchFileReader_14__reduce_cython__},
        {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7pyarrow_3lib_22_RecordBatchFileReader_17__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7pyarrow_3lib_22_RecordBatchFileReader_16__setstate_cython__},
        {0, 0, 0, 0}
      };

      static struct PyGetSetDef __pyx_getsets_7pyarrow_3lib__RecordBatchFileReader[] = {
        {"num_record_batches", __pyx_getprop_7pyarrow_3lib_22_RecordBatchFileReader_num_record_batches, 0, PyDoc_STR("\n        The number of record batches in the IPC file.\n        "), 0},
        {"stats", __pyx_getprop_7pyarrow_3lib_22_RecordBatchFileReader_stats, 0, PyDoc_STR("\n        Current IPC read statistics.\n        "), 0},
        {"metadata", __pyx_getprop_7pyarrow_3lib_22_RecordBatchFileReader_metadata, 0, PyDoc_STR("\n        File-level custom metadata as dict, where both keys and values are byte-like.\n        This kind of metadata can be written via ``ipc.new_file(..., metadata=...)``.\n        "), 0},
        {"schema", __pyx_getprop_7pyarrow_3lib_22_RecordBatchFileReader_schema, 0, 0, 0},
        {0, 0, 0, 0, 0}
      };
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib__RecordBatchFileReader_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib__RecordBatchFileReader},
        {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyarrow_3lib__RecordBatchFileReader},
        {Py_tp_clear, (void *)__pyx_tp_clear_7pyarrow_3lib__RecordBatchFileReader},
        {Py_tp_methods, (void *)__pyx_methods_7pyarrow_3lib__RecordBatchFileReader},
        {Py_tp_getset, (void *)__pyx_getsets_7pyarrow_3lib__RecordBatchFileReader},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib__RecordBatchFileReader},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib__RecordBatchFileReader_spec = {
        "pyarrow.lib._RecordBatchFileReader",
        sizeof(struct __pyx_obj_7pyarrow_3lib__RecordBatchFileReader),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
        __pyx_type_7pyarrow_3lib__RecordBatchFileReader_slots,
      };
      #else

      static PyTypeObject __pyx_type_7pyarrow_3lib__RecordBatchFileReader = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""_RecordBatchFileReader", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib__RecordBatchFileReader), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib__RecordBatchFileReader, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        0, /*tp_repr*/
        0, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        0, /*tp_str*/
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
        0, /*tp_doc*/
        __pyx_tp_traverse_7pyarrow_3lib__RecordBatchFileReader, /*tp_traverse*/
        __pyx_tp_clear_7pyarrow_3lib__RecordBatchFileReader, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        0, /*tp_iter*/
        0, /*tp_iternext*/
        __pyx_methods_7pyarrow_3lib__RecordBatchFileReader, /*tp_methods*/
        0, /*tp_members*/
        __pyx_getsets_7pyarrow_3lib__RecordBatchFileReader, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        0, /*tp_init*/
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib__RecordBatchFileReader, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif

      static PyObject *__pyx_tp_new_7pyarrow_3lib___pyx_defaults(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
        PyObject *o;
        o = __Pyx_AllocateExtensionType(t, 1);
        if (unlikely(!o)) return 0;
        return o;
      }

      static void __pyx_tp_dealloc_7pyarrow_3lib___pyx_defaults(PyObject *o) {
        struct __pyx_defaults *p = (struct __pyx_defaults *)o;
        #if CYTHON_USE_TP_FINALIZE
        if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
          if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_7pyarrow_3lib___pyx_defaults) {
            if (PyObject_CallFinalizerFromDealloc(o)) return;
          }
        }
        #endif
        PyObject_GC_UnTrack(o);
        Py_CLEAR(p->arg0);
        PyTypeObject *tp = Py_TYPE(o);
        #if CYTHON_USE_TYPE_SLOTS
        (*tp->tp_free)(o);
        #else
        {
          freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free);
          if (tp_free) tp_free(o);
        }
        #endif
        #if CYTHON_USE_TYPE_SPECS
        Py_DECREF(tp);
        #endif
      }

      static int __pyx_tp_traverse_7pyarrow_3lib___pyx_defaults(PyObject *o, visitproc v, void *a) {
        int e;
        struct __pyx_defaults *p = (struct __pyx_defaults *)o;
        {
          e = __Pyx_call_type_traverse(o, 1, v, a);
          if (e) return e;
        }
        if (p->arg0) {
          e = (*v)(((PyObject *)p->arg0), a); if (e) return e;
        }
        return 0;
      }

      static int __pyx_tp_clear_7pyarrow_3lib___pyx_defaults(PyObject *o) {
        PyObject* tmp;
        struct __pyx_defaults *p = (struct __pyx_defaults *)o;
        tmp = ((PyObject*)p->arg0);
        p->arg0 = ((struct __pyx_obj_7pyarrow_3lib_DataType *)Py_None); Py_INCREF(Py_None);
        Py_XDECREF(tmp);
        return 0;
      }
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib___pyx_defaults_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib___pyx_defaults},
        {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyarrow_3lib___pyx_defaults},
        {Py_tp_clear, (void *)__pyx_tp_clear_7pyarrow_3lib___pyx_defaults},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib___pyx_defaults},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib___pyx_defaults_spec = {
        "pyarrow.lib.__pyx_defaults",
        sizeof(struct __pyx_defaults),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
        __pyx_type_7pyarrow_3lib___pyx_defaults_slots,
      };
      #else

      static PyTypeObject __pyx_type_7pyarrow_3lib___pyx_defaults = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""__pyx_defaults", /*tp_name*/
        sizeof(struct __pyx_defaults), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib___pyx_defaults, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        0, /*tp_repr*/
        0, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        0, /*tp_str*/
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
        0, /*tp_doc*/
        __pyx_tp_traverse_7pyarrow_3lib___pyx_defaults, /*tp_traverse*/
        __pyx_tp_clear_7pyarrow_3lib___pyx_defaults, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        0, /*tp_iter*/
        0, /*tp_iternext*/
        0, /*tp_methods*/
        0, /*tp_members*/
        0, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        0, /*tp_init*/
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib___pyx_defaults, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif

      static PyObject *__pyx_tp_new_7pyarrow_3lib___pyx_scope_struct____iter__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
        PyObject *o;
        #if CYTHON_USE_FREELISTS
        if (likely((int)(__pyx_mstate_global->__pyx_freecount_7pyarrow_3lib___pyx_scope_struct____iter__ > 0) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct____iter__, sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct____iter__))))
        {
          o = (PyObject*)__pyx_mstate_global->__pyx_freelist_7pyarrow_3lib___pyx_scope_struct____iter__[--__pyx_mstate_global->__pyx_freecount_7pyarrow_3lib___pyx_scope_struct____iter__];
          #if CYTHON_USE_TYPE_SPECS
          Py_DECREF(Py_TYPE(o));
          #endif
          memset(o, 0, sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct____iter__));
          #if CYTHON_COMPILING_IN_LIMITED_API
          (void) PyObject_Init(o, t);
          #else
          (void) PyObject_INIT(o, t);
          #endif
          PyObject_GC_Track(o);
        } else
        #endif
        {
          o = __Pyx_AllocateExtensionType(t, 1);
          if (unlikely(!o)) return 0;
        }
        return o;
      }

      static void __pyx_tp_dealloc_7pyarrow_3lib___pyx_scope_struct____iter__(PyObject *o) {
        struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct____iter__ *p = (struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct____iter__ *)o;
        #if CYTHON_USE_TP_FINALIZE
        if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
          if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_7pyarrow_3lib___pyx_scope_struct____iter__) {
            if (PyObject_CallFinalizerFromDealloc(o)) return;
          }
        }
        #endif
        PyObject_GC_UnTrack(o);
        Py_CLEAR(p->__pyx_v_self);
        #if CYTHON_USE_FREELISTS
        if (likely((int)(__pyx_mstate_global->__pyx_freecount_7pyarrow_3lib___pyx_scope_struct____iter__ < 8) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(Py_TYPE(o), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct____iter__, sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct____iter__))))
        {
          __pyx_mstate_global->__pyx_freelist_7pyarrow_3lib___pyx_scope_struct____iter__[__pyx_mstate_global->__pyx_freecount_7pyarrow_3lib___pyx_scope_struct____iter__++] = ((struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct____iter__ *)o);
        } else
        #endif
        {
          PyTypeObject *tp = Py_TYPE(o);
          #if CYTHON_USE_TYPE_SLOTS
          (*tp->tp_free)(o);
          #else
          {
            freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free);
            if (tp_free) tp_free(o);
          }
          #endif
          #if CYTHON_USE_TYPE_SPECS
          Py_DECREF(tp);
          #endif
        }
      }

      static int __pyx_tp_traverse_7pyarrow_3lib___pyx_scope_struct____iter__(PyObject *o, visitproc v, void *a) {
        int e;
        struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct____iter__ *p = (struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct____iter__ *)o;
        {
          e = __Pyx_call_type_traverse(o, 1, v, a);
          if (e) return e;
        }
        if (p->__pyx_v_self) {
          e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
        }
        return 0;
      }
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib___pyx_scope_struct____iter___slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib___pyx_scope_struct____iter__},
        {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyarrow_3lib___pyx_scope_struct____iter__},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib___pyx_scope_struct____iter__},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib___pyx_scope_struct____iter___spec = {
        "pyarrow.lib.__pyx_scope_struct____iter__",
        sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct____iter__),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
        __pyx_type_7pyarrow_3lib___pyx_scope_struct____iter___slots,
      };
      #else

      static PyTypeObject __pyx_type_7pyarrow_3lib___pyx_scope_struct____iter__ = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""__pyx_scope_struct____iter__", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct____iter__), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib___pyx_scope_struct____iter__, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        0, /*tp_repr*/
        0, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        0, /*tp_str*/
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
        0, /*tp_doc*/
        __pyx_tp_traverse_7pyarrow_3lib___pyx_scope_struct____iter__, /*tp_traverse*/
        0, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        0, /*tp_iter*/
        0, /*tp_iternext*/
        0, /*tp_methods*/
        0, /*tp_members*/
        0, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        0, /*tp_init*/
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib___pyx_scope_struct____iter__, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif

      static PyObject *__pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_1___iter__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
        PyObject *o;
        #if CYTHON_USE_FREELISTS
        if (likely((int)(__pyx_mstate_global->__pyx_freecount_7pyarrow_3lib___pyx_scope_struct_1___iter__ > 0) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_1___iter__, sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_1___iter__))))
        {
          o = (PyObject*)__pyx_mstate_global->__pyx_freelist_7pyarrow_3lib___pyx_scope_struct_1___iter__[--__pyx_mstate_global->__pyx_freecount_7pyarrow_3lib___pyx_scope_struct_1___iter__];
          #if CYTHON_USE_TYPE_SPECS
          Py_DECREF(Py_TYPE(o));
          #endif
          memset(o, 0, sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_1___iter__));
          #if CYTHON_COMPILING_IN_LIMITED_API
          (void) PyObject_Init(o, t);
          #else
          (void) PyObject_INIT(o, t);
          #endif
          PyObject_GC_Track(o);
        } else
        #endif
        {
          o = __Pyx_AllocateExtensionType(t, 1);
          if (unlikely(!o)) return 0;
        }
        return o;
      }

      static void __pyx_tp_dealloc_7pyarrow_3lib___pyx_scope_struct_1___iter__(PyObject *o) {
        struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_1___iter__ *p = (struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_1___iter__ *)o;
        #if CYTHON_USE_TP_FINALIZE
        if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
          if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_7pyarrow_3lib___pyx_scope_struct_1___iter__) {
            if (PyObject_CallFinalizerFromDealloc(o)) return;
          }
        }
        #endif
        PyObject_GC_UnTrack(o);
        Py_CLEAR(p->__pyx_v_self);
        #if CYTHON_USE_FREELISTS
        if (likely((int)(__pyx_mstate_global->__pyx_freecount_7pyarrow_3lib___pyx_scope_struct_1___iter__ < 8) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(Py_TYPE(o), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_1___iter__, sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_1___iter__))))
        {
          __pyx_mstate_global->__pyx_freelist_7pyarrow_3lib___pyx_scope_struct_1___iter__[__pyx_mstate_global->__pyx_freecount_7pyarrow_3lib___pyx_scope_struct_1___iter__++] = ((struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_1___iter__ *)o);
        } else
        #endif
        {
          PyTypeObject *tp = Py_TYPE(o);
          #if CYTHON_USE_TYPE_SLOTS
          (*tp->tp_free)(o);
          #else
          {
            freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free);
            if (tp_free) tp_free(o);
          }
          #endif
          #if CYTHON_USE_TYPE_SPECS
          Py_DECREF(tp);
          #endif
        }
      }

      static int __pyx_tp_traverse_7pyarrow_3lib___pyx_scope_struct_1___iter__(PyObject *o, visitproc v, void *a) {
        int e;
        struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_1___iter__ *p = (struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_1___iter__ *)o;
        {
          e = __Pyx_call_type_traverse(o, 1, v, a);
          if (e) return e;
        }
        if (p->__pyx_v_self) {
          e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
        }
        return 0;
      }
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib___pyx_scope_struct_1___iter___slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib___pyx_scope_struct_1___iter__},
        {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyarrow_3lib___pyx_scope_struct_1___iter__},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_1___iter__},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib___pyx_scope_struct_1___iter___spec = {
        "pyarrow.lib.__pyx_scope_struct_1___iter__",
        sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_1___iter__),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
        __pyx_type_7pyarrow_3lib___pyx_scope_struct_1___iter___slots,
      };
      #else

      static PyTypeObject __pyx_type_7pyarrow_3lib___pyx_scope_struct_1___iter__ = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""__pyx_scope_struct_1___iter__", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_1___iter__), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib___pyx_scope_struct_1___iter__, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        0, /*tp_repr*/
        0, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        0, /*tp_str*/
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
        0, /*tp_doc*/
        __pyx_tp_traverse_7pyarrow_3lib___pyx_scope_struct_1___iter__, /*tp_traverse*/
        0, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        0, /*tp_iter*/
        0, /*tp_iternext*/
        0, /*tp_methods*/
        0, /*tp_members*/
        0, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        0, /*tp_init*/
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_1___iter__, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif

      static PyObject *__pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_2_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
        PyObject *o;
        #if CYTHON_USE_FREELISTS
        if (likely((int)(__pyx_mstate_global->__pyx_freecount_7pyarrow_3lib___pyx_scope_struct_2_genexpr > 0) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_2_genexpr, sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_2_genexpr))))
        {
          o = (PyObject*)__pyx_mstate_global->__pyx_freelist_7pyarrow_3lib___pyx_scope_struct_2_genexpr[--__pyx_mstate_global->__pyx_freecount_7pyarrow_3lib___pyx_scope_struct_2_genexpr];
          #if CYTHON_USE_TYPE_SPECS
          Py_DECREF(Py_TYPE(o));
          #endif
          memset(o, 0, sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_2_genexpr));
          #if CYTHON_COMPILING_IN_LIMITED_API
          (void) PyObject_Init(o, t);
          #else
          (void) PyObject_INIT(o, t);
          #endif
          PyObject_GC_Track(o);
        } else
        #endif
        {
          o = __Pyx_AllocateExtensionType(t, 1);
          if (unlikely(!o)) return 0;
        }
        return o;
      }

      static void __pyx_tp_dealloc_7pyarrow_3lib___pyx_scope_struct_2_genexpr(PyObject *o) {
        struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_2_genexpr *p = (struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_2_genexpr *)o;
        #if CYTHON_USE_TP_FINALIZE
        if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
          if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_7pyarrow_3lib___pyx_scope_struct_2_genexpr) {
            if (PyObject_CallFinalizerFromDealloc(o)) return;
          }
        }
        #endif
        PyObject_GC_UnTrack(o);
        Py_CLEAR(p->__pyx_genexpr_arg_0);
        Py_CLEAR(p->__pyx_v_k);
        Py_CLEAR(p->__pyx_v_v);
        Py_CLEAR(p->__pyx_t_0);
        #if CYTHON_USE_FREELISTS
        if (likely((int)(__pyx_mstate_global->__pyx_freecount_7pyarrow_3lib___pyx_scope_struct_2_genexpr < 8) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(Py_TYPE(o), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_2_genexpr, sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_2_genexpr))))
        {
          __pyx_mstate_global->__pyx_freelist_7pyarrow_3lib___pyx_scope_struct_2_genexpr[__pyx_mstate_global->__pyx_freecount_7pyarrow_3lib___pyx_scope_struct_2_genexpr++] = ((struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_2_genexpr *)o);
        } else
        #endif
        {
          PyTypeObject *tp = Py_TYPE(o);
          #if CYTHON_USE_TYPE_SLOTS
          (*tp->tp_free)(o);
          #else
          {
            freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free);
            if (tp_free) tp_free(o);
          }
          #endif
          #if CYTHON_USE_TYPE_SPECS
          Py_DECREF(tp);
          #endif
        }
      }

      static int __pyx_tp_traverse_7pyarrow_3lib___pyx_scope_struct_2_genexpr(PyObject *o, visitproc v, void *a) {
        int e;
        struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_2_genexpr *p = (struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_2_genexpr *)o;
        {
          e = __Pyx_call_type_traverse(o, 1, v, a);
          if (e) return e;
        }
        if (p->__pyx_genexpr_arg_0) {
          e = (*v)(p->__pyx_genexpr_arg_0, a); if (e) return e;
        }
        if (p->__pyx_v_k) {
          e = (*v)(p->__pyx_v_k, a); if (e) return e;
        }
        if (p->__pyx_v_v) {
          e = (*v)(p->__pyx_v_v, a); if (e) return e;
        }
        if (p->__pyx_t_0) {
          e = (*v)(p->__pyx_t_0, a); if (e) return e;
        }
        return 0;
      }
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib___pyx_scope_struct_2_genexpr_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib___pyx_scope_struct_2_genexpr},
        {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyarrow_3lib___pyx_scope_struct_2_genexpr},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_2_genexpr},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib___pyx_scope_struct_2_genexpr_spec = {
        "pyarrow.lib.__pyx_scope_struct_2_genexpr",
        sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_2_genexpr),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
        __pyx_type_7pyarrow_3lib___pyx_scope_struct_2_genexpr_slots,
      };
      #else

      static PyTypeObject __pyx_type_7pyarrow_3lib___pyx_scope_struct_2_genexpr = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""__pyx_scope_struct_2_genexpr", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_2_genexpr), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib___pyx_scope_struct_2_genexpr, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        0, /*tp_repr*/
        0, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        0, /*tp_str*/
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
        0, /*tp_doc*/
        __pyx_tp_traverse_7pyarrow_3lib___pyx_scope_struct_2_genexpr, /*tp_traverse*/
        0, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        0, /*tp_iter*/
        0, /*tp_iternext*/
        0, /*tp_methods*/
        0, /*tp_members*/
        0, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        0, /*tp_init*/
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_2_genexpr, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif

      static PyObject *__pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_3_keys(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
        PyObject *o;
        #if CYTHON_USE_FREELISTS
        if (likely((int)(__pyx_mstate_global->__pyx_freecount_7pyarrow_3lib___pyx_scope_struct_3_keys > 0) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_3_keys, sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_3_keys))))
        {
          o = (PyObject*)__pyx_mstate_global->__pyx_freelist_7pyarrow_3lib___pyx_scope_struct_3_keys[--__pyx_mstate_global->__pyx_freecount_7pyarrow_3lib___pyx_scope_struct_3_keys];
          #if CYTHON_USE_TYPE_SPECS
          Py_DECREF(Py_TYPE(o));
          #endif
          memset(o, 0, sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_3_keys));
          #if CYTHON_COMPILING_IN_LIMITED_API
          (void) PyObject_Init(o, t);
          #else
          (void) PyObject_INIT(o, t);
          #endif
          PyObject_GC_Track(o);
        } else
        #endif
        {
          o = __Pyx_AllocateExtensionType(t, 1);
          if (unlikely(!o)) return 0;
        }
        return o;
      }

      static void __pyx_tp_dealloc_7pyarrow_3lib___pyx_scope_struct_3_keys(PyObject *o) {
        struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_3_keys *p = (struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_3_keys *)o;
        #if CYTHON_USE_TP_FINALIZE
        if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
          if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_7pyarrow_3lib___pyx_scope_struct_3_keys) {
            if (PyObject_CallFinalizerFromDealloc(o)) return;
          }
        }
        #endif
        PyObject_GC_UnTrack(o);
        Py_CLEAR(p->__pyx_v_self);
        #if CYTHON_USE_FREELISTS
        if (likely((int)(__pyx_mstate_global->__pyx_freecount_7pyarrow_3lib___pyx_scope_struct_3_keys < 8) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(Py_TYPE(o), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_3_keys, sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_3_keys))))
        {
          __pyx_mstate_global->__pyx_freelist_7pyarrow_3lib___pyx_scope_struct_3_keys[__pyx_mstate_global->__pyx_freecount_7pyarrow_3lib___pyx_scope_struct_3_keys++] = ((struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_3_keys *)o);
        } else
        #endif
        {
          PyTypeObject *tp = Py_TYPE(o);
          #if CYTHON_USE_TYPE_SLOTS
          (*tp->tp_free)(o);
          #else
          {
            freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free);
            if (tp_free) tp_free(o);
          }
          #endif
          #if CYTHON_USE_TYPE_SPECS
          Py_DECREF(tp);
          #endif
        }
      }

      static int __pyx_tp_traverse_7pyarrow_3lib___pyx_scope_struct_3_keys(PyObject *o, visitproc v, void *a) {
        int e;
        struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_3_keys *p = (struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_3_keys *)o;
        {
          e = __Pyx_call_type_traverse(o, 1, v, a);
          if (e) return e;
        }
        if (p->__pyx_v_self) {
          e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
        }
        return 0;
      }
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib___pyx_scope_struct_3_keys_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib___pyx_scope_struct_3_keys},
        {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyarrow_3lib___pyx_scope_struct_3_keys},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_3_keys},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib___pyx_scope_struct_3_keys_spec = {
        "pyarrow.lib.__pyx_scope_struct_3_keys",
        sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_3_keys),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
        __pyx_type_7pyarrow_3lib___pyx_scope_struct_3_keys_slots,
      };
      #else

      static PyTypeObject __pyx_type_7pyarrow_3lib___pyx_scope_struct_3_keys = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""__pyx_scope_struct_3_keys", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_3_keys), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib___pyx_scope_struct_3_keys, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        0, /*tp_repr*/
        0, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        0, /*tp_str*/
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
        0, /*tp_doc*/
        __pyx_tp_traverse_7pyarrow_3lib___pyx_scope_struct_3_keys, /*tp_traverse*/
        0, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        0, /*tp_iter*/
        0, /*tp_iternext*/
        0, /*tp_methods*/
        0, /*tp_members*/
        0, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        0, /*tp_init*/
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_3_keys, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif

      static PyObject *__pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_4_values(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
        PyObject *o;
        #if CYTHON_USE_FREELISTS
        if (likely((int)(__pyx_mstate_global->__pyx_freecount_7pyarrow_3lib___pyx_scope_struct_4_values > 0) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_4_values, sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_4_values))))
        {
          o = (PyObject*)__pyx_mstate_global->__pyx_freelist_7pyarrow_3lib___pyx_scope_struct_4_values[--__pyx_mstate_global->__pyx_freecount_7pyarrow_3lib___pyx_scope_struct_4_values];
          #if CYTHON_USE_TYPE_SPECS
          Py_DECREF(Py_TYPE(o));
          #endif
          memset(o, 0, sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_4_values));
          #if CYTHON_COMPILING_IN_LIMITED_API
          (void) PyObject_Init(o, t);
          #else
          (void) PyObject_INIT(o, t);
          #endif
          PyObject_GC_Track(o);
        } else
        #endif
        {
          o = __Pyx_AllocateExtensionType(t, 1);
          if (unlikely(!o)) return 0;
        }
        return o;
      }

      static void __pyx_tp_dealloc_7pyarrow_3lib___pyx_scope_struct_4_values(PyObject *o) {
        struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_4_values *p = (struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_4_values *)o;
        #if CYTHON_USE_TP_FINALIZE
        if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
          if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_7pyarrow_3lib___pyx_scope_struct_4_values) {
            if (PyObject_CallFinalizerFromDealloc(o)) return;
          }
        }
        #endif
        PyObject_GC_UnTrack(o);
        Py_CLEAR(p->__pyx_v_self);
        #if CYTHON_USE_FREELISTS
        if (likely((int)(__pyx_mstate_global->__pyx_freecount_7pyarrow_3lib___pyx_scope_struct_4_values < 8) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(Py_TYPE(o), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_4_values, sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_4_values))))
        {
          __pyx_mstate_global->__pyx_freelist_7pyarrow_3lib___pyx_scope_struct_4_values[__pyx_mstate_global->__pyx_freecount_7pyarrow_3lib___pyx_scope_struct_4_values++] = ((struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_4_values *)o);
        } else
        #endif
        {
          PyTypeObject *tp = Py_TYPE(o);
          #if CYTHON_USE_TYPE_SLOTS
          (*tp->tp_free)(o);
          #else
          {
            freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free);
            if (tp_free) tp_free(o);
          }
          #endif
          #if CYTHON_USE_TYPE_SPECS
          Py_DECREF(tp);
          #endif
        }
      }

      static int __pyx_tp_traverse_7pyarrow_3lib___pyx_scope_struct_4_values(PyObject *o, visitproc v, void *a) {
        int e;
        struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_4_values *p = (struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_4_values *)o;
        {
          e = __Pyx_call_type_traverse(o, 1, v, a);
          if (e) return e;
        }
        if (p->__pyx_v_self) {
          e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
        }
        return 0;
      }
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib___pyx_scope_struct_4_values_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib___pyx_scope_struct_4_values},
        {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyarrow_3lib___pyx_scope_struct_4_values},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_4_values},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib___pyx_scope_struct_4_values_spec = {
        "pyarrow.lib.__pyx_scope_struct_4_values",
        sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_4_values),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
        __pyx_type_7pyarrow_3lib___pyx_scope_struct_4_values_slots,
      };
      #else

      static PyTypeObject __pyx_type_7pyarrow_3lib___pyx_scope_struct_4_values = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""__pyx_scope_struct_4_values", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_4_values), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib___pyx_scope_struct_4_values, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        0, /*tp_repr*/
        0, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        0, /*tp_str*/
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
        0, /*tp_doc*/
        __pyx_tp_traverse_7pyarrow_3lib___pyx_scope_struct_4_values, /*tp_traverse*/
        0, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        0, /*tp_iter*/
        0, /*tp_iternext*/
        0, /*tp_methods*/
        0, /*tp_members*/
        0, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        0, /*tp_init*/
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_4_values, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif

      static PyObject *__pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_5_items(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
        PyObject *o;
        #if CYTHON_USE_FREELISTS
        if (likely((int)(__pyx_mstate_global->__pyx_freecount_7pyarrow_3lib___pyx_scope_struct_5_items > 0) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_5_items, sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_5_items))))
        {
          o = (PyObject*)__pyx_mstate_global->__pyx_freelist_7pyarrow_3lib___pyx_scope_struct_5_items[--__pyx_mstate_global->__pyx_freecount_7pyarrow_3lib___pyx_scope_struct_5_items];
          #if CYTHON_USE_TYPE_SPECS
          Py_DECREF(Py_TYPE(o));
          #endif
          memset(o, 0, sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_5_items));
          #if CYTHON_COMPILING_IN_LIMITED_API
          (void) PyObject_Init(o, t);
          #else
          (void) PyObject_INIT(o, t);
          #endif
          PyObject_GC_Track(o);
        } else
        #endif
        {
          o = __Pyx_AllocateExtensionType(t, 1);
          if (unlikely(!o)) return 0;
        }
        return o;
      }

      static void __pyx_tp_dealloc_7pyarrow_3lib___pyx_scope_struct_5_items(PyObject *o) {
        struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_5_items *p = (struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_5_items *)o;
        #if CYTHON_USE_TP_FINALIZE
        if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
          if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_7pyarrow_3lib___pyx_scope_struct_5_items) {
            if (PyObject_CallFinalizerFromDealloc(o)) return;
          }
        }
        #endif
        PyObject_GC_UnTrack(o);
        Py_CLEAR(p->__pyx_v_self);
        #if CYTHON_USE_FREELISTS
        if (likely((int)(__pyx_mstate_global->__pyx_freecount_7pyarrow_3lib___pyx_scope_struct_5_items < 8) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(Py_TYPE(o), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_5_items, sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_5_items))))
        {
          __pyx_mstate_global->__pyx_freelist_7pyarrow_3lib___pyx_scope_struct_5_items[__pyx_mstate_global->__pyx_freecount_7pyarrow_3lib___pyx_scope_struct_5_items++] = ((struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_5_items *)o);
        } else
        #endif
        {
          PyTypeObject *tp = Py_TYPE(o);
          #if CYTHON_USE_TYPE_SLOTS
          (*tp->tp_free)(o);
          #else
          {
            freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free);
            if (tp_free) tp_free(o);
          }
          #endif
          #if CYTHON_USE_TYPE_SPECS
          Py_DECREF(tp);
          #endif
        }
      }

      static int __pyx_tp_traverse_7pyarrow_3lib___pyx_scope_struct_5_items(PyObject *o, visitproc v, void *a) {
        int e;
        struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_5_items *p = (struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_5_items *)o;
        {
          e = __Pyx_call_type_traverse(o, 1, v, a);
          if (e) return e;
        }
        if (p->__pyx_v_self) {
          e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
        }
        return 0;
      }
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib___pyx_scope_struct_5_items_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib___pyx_scope_struct_5_items},
        {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyarrow_3lib___pyx_scope_struct_5_items},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_5_items},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib___pyx_scope_struct_5_items_spec = {
        "pyarrow.lib.__pyx_scope_struct_5_items",
        sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_5_items),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
        __pyx_type_7pyarrow_3lib___pyx_scope_struct_5_items_slots,
      };
      #else

      static PyTypeObject __pyx_type_7pyarrow_3lib___pyx_scope_struct_5_items = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""__pyx_scope_struct_5_items", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_5_items), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib___pyx_scope_struct_5_items, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        0, /*tp_repr*/
        0, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        0, /*tp_str*/
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
        0, /*tp_doc*/
        __pyx_tp_traverse_7pyarrow_3lib___pyx_scope_struct_5_items, /*tp_traverse*/
        0, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        0, /*tp_iter*/
        0, /*tp_iternext*/
        0, /*tp_methods*/
        0, /*tp_members*/
        0, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        0, /*tp_init*/
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_5_items, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif

      static PyObject *__pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_6___iter__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
        PyObject *o;
        #if CYTHON_USE_FREELISTS
        if (likely((int)(__pyx_mstate_global->__pyx_freecount_7pyarrow_3lib___pyx_scope_struct_6___iter__ > 0) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_6___iter__, sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_6___iter__))))
        {
          o = (PyObject*)__pyx_mstate_global->__pyx_freelist_7pyarrow_3lib___pyx_scope_struct_6___iter__[--__pyx_mstate_global->__pyx_freecount_7pyarrow_3lib___pyx_scope_struct_6___iter__];
          #if CYTHON_USE_TYPE_SPECS
          Py_DECREF(Py_TYPE(o));
          #endif
          memset(o, 0, sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_6___iter__));
          #if CYTHON_COMPILING_IN_LIMITED_API
          (void) PyObject_Init(o, t);
          #else
          (void) PyObject_INIT(o, t);
          #endif
          PyObject_GC_Track(o);
        } else
        #endif
        {
          o = __Pyx_AllocateExtensionType(t, 1);
          if (unlikely(!o)) return 0;
        }
        return o;
      }

      static void __pyx_tp_dealloc_7pyarrow_3lib___pyx_scope_struct_6___iter__(PyObject *o) {
        struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_6___iter__ *p = (struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_6___iter__ *)o;
        #if CYTHON_USE_TP_FINALIZE
        if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
          if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_7pyarrow_3lib___pyx_scope_struct_6___iter__) {
            if (PyObject_CallFinalizerFromDealloc(o)) return;
          }
        }
        #endif
        PyObject_GC_UnTrack(o);
        Py_CLEAR(p->__pyx_v_self);
        #if CYTHON_USE_FREELISTS
        if (likely((int)(__pyx_mstate_global->__pyx_freecount_7pyarrow_3lib___pyx_scope_struct_6___iter__ < 8) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(Py_TYPE(o), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_6___iter__, sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_6___iter__))))
        {
          __pyx_mstate_global->__pyx_freelist_7pyarrow_3lib___pyx_scope_struct_6___iter__[__pyx_mstate_global->__pyx_freecount_7pyarrow_3lib___pyx_scope_struct_6___iter__++] = ((struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_6___iter__ *)o);
        } else
        #endif
        {
          PyTypeObject *tp = Py_TYPE(o);
          #if CYTHON_USE_TYPE_SLOTS
          (*tp->tp_free)(o);
          #else
          {
            freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free);
            if (tp_free) tp_free(o);
          }
          #endif
          #if CYTHON_USE_TYPE_SPECS
          Py_DECREF(tp);
          #endif
        }
      }

      static int __pyx_tp_traverse_7pyarrow_3lib___pyx_scope_struct_6___iter__(PyObject *o, visitproc v, void *a) {
        int e;
        struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_6___iter__ *p = (struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_6___iter__ *)o;
        {
          e = __Pyx_call_type_traverse(o, 1, v, a);
          if (e) return e;
        }
        if (p->__pyx_v_self) {
          e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
        }
        return 0;
      }
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib___pyx_scope_struct_6___iter___slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib___pyx_scope_struct_6___iter__},
        {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyarrow_3lib___pyx_scope_struct_6___iter__},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_6___iter__},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib___pyx_scope_struct_6___iter___spec = {
        "pyarrow.lib.__pyx_scope_struct_6___iter__",
        sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_6___iter__),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
        __pyx_type_7pyarrow_3lib___pyx_scope_struct_6___iter___slots,
      };
      #else

      static PyTypeObject __pyx_type_7pyarrow_3lib___pyx_scope_struct_6___iter__ = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""__pyx_scope_struct_6___iter__", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_6___iter__), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib___pyx_scope_struct_6___iter__, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        0, /*tp_repr*/
        0, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        0, /*tp_str*/
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
        0, /*tp_doc*/
        __pyx_tp_traverse_7pyarrow_3lib___pyx_scope_struct_6___iter__, /*tp_traverse*/
        0, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        0, /*tp_iter*/
        0, /*tp_iternext*/
        0, /*tp_methods*/
        0, /*tp_members*/
        0, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        0, /*tp_init*/
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_6___iter__, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif

      static PyObject *__pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_7___iter__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
        struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_7___iter__ *p;
        PyObject *o;
        #if CYTHON_USE_FREELISTS
        if (likely((int)(__pyx_mstate_global->__pyx_freecount_7pyarrow_3lib___pyx_scope_struct_7___iter__ > 0) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_7___iter__, sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_7___iter__))))
        {
          o = (PyObject*)__pyx_mstate_global->__pyx_freelist_7pyarrow_3lib___pyx_scope_struct_7___iter__[--__pyx_mstate_global->__pyx_freecount_7pyarrow_3lib___pyx_scope_struct_7___iter__];
          #if CYTHON_USE_TYPE_SPECS
          Py_DECREF(Py_TYPE(o));
          #endif
          memset(o, 0, sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_7___iter__));
          #if CYTHON_COMPILING_IN_LIMITED_API
          (void) PyObject_Init(o, t);
          #else
          (void) PyObject_INIT(o, t);
          #endif
          PyObject_GC_Track(o);
        } else
        #endif
        {
          o = __Pyx_AllocateExtensionType(t, 1);
          if (unlikely(!o)) return 0;
        }
        p = ((struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_7___iter__ *)o);
        __Pyx_default_placement_construct(&(p->__pyx_v_fields));
        return o;
      }

      static void __pyx_tp_dealloc_7pyarrow_3lib___pyx_scope_struct_7___iter__(PyObject *o) {
        struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_7___iter__ *p = (struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_7___iter__ *)o;
        #if CYTHON_USE_TP_FINALIZE
        if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
          if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_7pyarrow_3lib___pyx_scope_struct_7___iter__) {
            if (PyObject_CallFinalizerFromDealloc(o)) return;
          }
        }
        #endif
        PyObject_GC_UnTrack(o);
        __Pyx_call_destructor(p->__pyx_v_fields);
        Py_CLEAR(p->__pyx_v_self);
        #if CYTHON_USE_FREELISTS
        if (likely((int)(__pyx_mstate_global->__pyx_freecount_7pyarrow_3lib___pyx_scope_struct_7___iter__ < 8) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(Py_TYPE(o), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_7___iter__, sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_7___iter__))))
        {
          __pyx_mstate_global->__pyx_freelist_7pyarrow_3lib___pyx_scope_struct_7___iter__[__pyx_mstate_global->__pyx_freecount_7pyarrow_3lib___pyx_scope_struct_7___iter__++] = ((struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_7___iter__ *)o);
        } else
        #endif
        {
          PyTypeObject *tp = Py_TYPE(o);
          #if CYTHON_USE_TYPE_SLOTS
          (*tp->tp_free)(o);
          #else
          {
            freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free);
            if (tp_free) tp_free(o);
          }
          #endif
          #if CYTHON_USE_TYPE_SPECS
          Py_DECREF(tp);
          #endif
        }
      }

      static int __pyx_tp_traverse_7pyarrow_3lib___pyx_scope_struct_7___iter__(PyObject *o, visitproc v, void *a) {
        int e;
        struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_7___iter__ *p = (struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_7___iter__ *)o;
        {
          e = __Pyx_call_type_traverse(o, 1, v, a);
          if (e) return e;
        }
        if (p->__pyx_v_self) {
          e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
        }
        return 0;
      }
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib___pyx_scope_struct_7___iter___slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib___pyx_scope_struct_7___iter__},
        {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyarrow_3lib___pyx_scope_struct_7___iter__},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_7___iter__},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib___pyx_scope_struct_7___iter___spec = {
        "pyarrow.lib.__pyx_scope_struct_7___iter__",
        sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_7___iter__),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
        __pyx_type_7pyarrow_3lib___pyx_scope_struct_7___iter___slots,
      };
      #else

      static PyTypeObject __pyx_type_7pyarrow_3lib___pyx_scope_struct_7___iter__ = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""__pyx_scope_struct_7___iter__", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_7___iter__), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib___pyx_scope_struct_7___iter__, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        0, /*tp_repr*/
        0, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        0, /*tp_str*/
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
        0, /*tp_doc*/
        __pyx_tp_traverse_7pyarrow_3lib___pyx_scope_struct_7___iter__, /*tp_traverse*/
        0, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        0, /*tp_iter*/
        0, /*tp_iternext*/
        0, /*tp_methods*/
        0, /*tp_members*/
        0, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        0, /*tp_init*/
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_7___iter__, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif

      static PyObject *__pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_8_items(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
        PyObject *o;
        #if CYTHON_USE_FREELISTS
        if (likely((int)(__pyx_mstate_global->__pyx_freecount_7pyarrow_3lib___pyx_scope_struct_8_items > 0) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_8_items, sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_8_items))))
        {
          o = (PyObject*)__pyx_mstate_global->__pyx_freelist_7pyarrow_3lib___pyx_scope_struct_8_items[--__pyx_mstate_global->__pyx_freecount_7pyarrow_3lib___pyx_scope_struct_8_items];
          #if CYTHON_USE_TYPE_SPECS
          Py_DECREF(Py_TYPE(o));
          #endif
          memset(o, 0, sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_8_items));
          #if CYTHON_COMPILING_IN_LIMITED_API
          (void) PyObject_Init(o, t);
          #else
          (void) PyObject_INIT(o, t);
          #endif
          PyObject_GC_Track(o);
        } else
        #endif
        {
          o = __Pyx_AllocateExtensionType(t, 1);
          if (unlikely(!o)) return 0;
        }
        return o;
      }

      static void __pyx_tp_dealloc_7pyarrow_3lib___pyx_scope_struct_8_items(PyObject *o) {
        struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_8_items *p = (struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_8_items *)o;
        #if CYTHON_USE_TP_FINALIZE
        if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
          if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_7pyarrow_3lib___pyx_scope_struct_8_items) {
            if (PyObject_CallFinalizerFromDealloc(o)) return;
          }
        }
        #endif
        PyObject_GC_UnTrack(o);
        Py_CLEAR(p->__pyx_v_self);
        #if CYTHON_USE_FREELISTS
        if (likely((int)(__pyx_mstate_global->__pyx_freecount_7pyarrow_3lib___pyx_scope_struct_8_items < 8) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(Py_TYPE(o), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_8_items, sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_8_items))))
        {
          __pyx_mstate_global->__pyx_freelist_7pyarrow_3lib___pyx_scope_struct_8_items[__pyx_mstate_global->__pyx_freecount_7pyarrow_3lib___pyx_scope_struct_8_items++] = ((struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_8_items *)o);
        } else
        #endif
        {
          PyTypeObject *tp = Py_TYPE(o);
          #if CYTHON_USE_TYPE_SLOTS
          (*tp->tp_free)(o);
          #else
          {
            freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free);
            if (tp_free) tp_free(o);
          }
          #endif
          #if CYTHON_USE_TYPE_SPECS
          Py_DECREF(tp);
          #endif
        }
      }

      static int __pyx_tp_traverse_7pyarrow_3lib___pyx_scope_struct_8_items(PyObject *o, visitproc v, void *a) {
        int e;
        struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_8_items *p = (struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_8_items *)o;
        {
          e = __Pyx_call_type_traverse(o, 1, v, a);
          if (e) return e;
        }
        if (p->__pyx_v_self) {
          e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
        }
        return 0;
      }

      static int __pyx_tp_clear_7pyarrow_3lib___pyx_scope_struct_8_items(PyObject *o) {
        PyObject* tmp;
        struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_8_items *p = (struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_8_items *)o;
        tmp = ((PyObject*)p->__pyx_v_self);
        p->__pyx_v_self = ((struct __pyx_obj_7pyarrow_3lib_StructScalar *)Py_None); Py_INCREF(Py_None);
        Py_XDECREF(tmp);
        return 0;
      }
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib___pyx_scope_struct_8_items_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib___pyx_scope_struct_8_items},
        {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyarrow_3lib___pyx_scope_struct_8_items},
        {Py_tp_clear, (void *)__pyx_tp_clear_7pyarrow_3lib___pyx_scope_struct_8_items},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_8_items},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib___pyx_scope_struct_8_items_spec = {
        "pyarrow.lib.__pyx_scope_struct_8_items",
        sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_8_items),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
        __pyx_type_7pyarrow_3lib___pyx_scope_struct_8_items_slots,
      };
      #else

      static PyTypeObject __pyx_type_7pyarrow_3lib___pyx_scope_struct_8_items = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""__pyx_scope_struct_8_items", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_8_items), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib___pyx_scope_struct_8_items, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        0, /*tp_repr*/
        0, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        0, /*tp_str*/
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
        0, /*tp_doc*/
        __pyx_tp_traverse_7pyarrow_3lib___pyx_scope_struct_8_items, /*tp_traverse*/
        __pyx_tp_clear_7pyarrow_3lib___pyx_scope_struct_8_items, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        0, /*tp_iter*/
        0, /*tp_iternext*/
        0, /*tp_methods*/
        0, /*tp_members*/
        0, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        0, /*tp_init*/
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_8_items, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif

      static PyObject *__pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_9_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
        PyObject *o;
        #if CYTHON_USE_FREELISTS
        if (likely((int)(__pyx_mstate_global->__pyx_freecount_7pyarrow_3lib___pyx_scope_struct_9_genexpr > 0) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_9_genexpr, sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_9_genexpr))))
        {
          o = (PyObject*)__pyx_mstate_global->__pyx_freelist_7pyarrow_3lib___pyx_scope_struct_9_genexpr[--__pyx_mstate_global->__pyx_freecount_7pyarrow_3lib___pyx_scope_struct_9_genexpr];
          #if CYTHON_USE_TYPE_SPECS
          Py_DECREF(Py_TYPE(o));
          #endif
          memset(o, 0, sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_9_genexpr));
          #if CYTHON_COMPILING_IN_LIMITED_API
          (void) PyObject_Init(o, t);
          #else
          (void) PyObject_INIT(o, t);
          #endif
          PyObject_GC_Track(o);
        } else
        #endif
        {
          o = __Pyx_AllocateExtensionType(t, 1);
          if (unlikely(!o)) return 0;
        }
        return o;
      }

      static void __pyx_tp_dealloc_7pyarrow_3lib___pyx_scope_struct_9_genexpr(PyObject *o) {
        struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_9_genexpr *p = (struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_9_genexpr *)o;
        #if CYTHON_USE_TP_FINALIZE
        if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
          if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_7pyarrow_3lib___pyx_scope_struct_9_genexpr) {
            if (PyObject_CallFinalizerFromDealloc(o)) return;
          }
        }
        #endif
        PyObject_GC_UnTrack(o);
        Py_CLEAR(p->__pyx_outer_scope);
        Py_CLEAR(p->__pyx_genexpr_arg_0);
        Py_CLEAR(p->__pyx_v_i);
        Py_CLEAR(p->__pyx_v_key);
        Py_CLEAR(p->__pyx_t_0);
        Py_CLEAR(p->__pyx_t_1);
        #if CYTHON_USE_FREELISTS
        if (likely((int)(__pyx_mstate_global->__pyx_freecount_7pyarrow_3lib___pyx_scope_struct_9_genexpr < 8) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(Py_TYPE(o), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_9_genexpr, sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_9_genexpr))))
        {
          __pyx_mstate_global->__pyx_freelist_7pyarrow_3lib___pyx_scope_struct_9_genexpr[__pyx_mstate_global->__pyx_freecount_7pyarrow_3lib___pyx_scope_struct_9_genexpr++] = ((struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_9_genexpr *)o);
        } else
        #endif
        {
          PyTypeObject *tp = Py_TYPE(o);
          #if CYTHON_USE_TYPE_SLOTS
          (*tp->tp_free)(o);
          #else
          {
            freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free);
            if (tp_free) tp_free(o);
          }
          #endif
          #if CYTHON_USE_TYPE_SPECS
          Py_DECREF(tp);
          #endif
        }
      }

      static int __pyx_tp_traverse_7pyarrow_3lib___pyx_scope_struct_9_genexpr(PyObject *o, visitproc v, void *a) {
        int e;
        struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_9_genexpr *p = (struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_9_genexpr *)o;
        {
          e = __Pyx_call_type_traverse(o, 1, v, a);
          if (e) return e;
        }
        if (p->__pyx_outer_scope) {
          e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
        }
        if (p->__pyx_genexpr_arg_0) {
          e = (*v)(((PyObject *)p->__pyx_genexpr_arg_0), a); if (e) return e;
        }
        if (p->__pyx_v_i) {
          e = (*v)(p->__pyx_v_i, a); if (e) return e;
        }
        if (p->__pyx_v_key) {
          e = (*v)(p->__pyx_v_key, a); if (e) return e;
        }
        if (p->__pyx_t_0) {
          e = (*v)(p->__pyx_t_0, a); if (e) return e;
        }
        if (p->__pyx_t_1) {
          e = (*v)(p->__pyx_t_1, a); if (e) return e;
        }
        return 0;
      }
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib___pyx_scope_struct_9_genexpr_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib___pyx_scope_struct_9_genexpr},
        {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyarrow_3lib___pyx_scope_struct_9_genexpr},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_9_genexpr},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib___pyx_scope_struct_9_genexpr_spec = {
        "pyarrow.lib.__pyx_scope_struct_9_genexpr",
        sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_9_genexpr),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
        __pyx_type_7pyarrow_3lib___pyx_scope_struct_9_genexpr_slots,
      };
      #else

      static PyTypeObject __pyx_type_7pyarrow_3lib___pyx_scope_struct_9_genexpr = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""__pyx_scope_struct_9_genexpr", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_9_genexpr), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib___pyx_scope_struct_9_genexpr, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        0, /*tp_repr*/
        0, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        0, /*tp_str*/
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
        0, /*tp_doc*/
        __pyx_tp_traverse_7pyarrow_3lib___pyx_scope_struct_9_genexpr, /*tp_traverse*/
        0, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        0, /*tp_iter*/
        0, /*tp_iternext*/
        0, /*tp_methods*/
        0, /*tp_members*/
        0, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        0, /*tp_init*/
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_9_genexpr, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif

      static PyObject *__pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_10___iter__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
        PyObject *o;
        #if CYTHON_USE_FREELISTS
        if (likely((int)(__pyx_mstate_global->__pyx_freecount_7pyarrow_3lib___pyx_scope_struct_10___iter__ > 0) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_10___iter__, sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_10___iter__))))
        {
          o = (PyObject*)__pyx_mstate_global->__pyx_freelist_7pyarrow_3lib___pyx_scope_struct_10___iter__[--__pyx_mstate_global->__pyx_freecount_7pyarrow_3lib___pyx_scope_struct_10___iter__];
          #if CYTHON_USE_TYPE_SPECS
          Py_DECREF(Py_TYPE(o));
          #endif
          memset(o, 0, sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_10___iter__));
          #if CYTHON_COMPILING_IN_LIMITED_API
          (void) PyObject_Init(o, t);
          #else
          (void) PyObject_INIT(o, t);
          #endif
          PyObject_GC_Track(o);
        } else
        #endif
        {
          o = __Pyx_AllocateExtensionType(t, 1);
          if (unlikely(!o)) return 0;
        }
        return o;
      }

      static void __pyx_tp_dealloc_7pyarrow_3lib___pyx_scope_struct_10___iter__(PyObject *o) {
        struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_10___iter__ *p = (struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_10___iter__ *)o;
        #if CYTHON_USE_TP_FINALIZE
        if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
          if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_7pyarrow_3lib___pyx_scope_struct_10___iter__) {
            if (PyObject_CallFinalizerFromDealloc(o)) return;
          }
        }
        #endif
        PyObject_GC_UnTrack(o);
        Py_CLEAR(p->__pyx_v_arr);
        Py_CLEAR(p->__pyx_v_k);
        Py_CLEAR(p->__pyx_v_self);
        Py_CLEAR(p->__pyx_v_v);
        Py_CLEAR(p->__pyx_t_0);
        #if CYTHON_USE_FREELISTS
        if (likely((int)(__pyx_mstate_global->__pyx_freecount_7pyarrow_3lib___pyx_scope_struct_10___iter__ < 8) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(Py_TYPE(o), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_10___iter__, sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_10___iter__))))
        {
          __pyx_mstate_global->__pyx_freelist_7pyarrow_3lib___pyx_scope_struct_10___iter__[__pyx_mstate_global->__pyx_freecount_7pyarrow_3lib___pyx_scope_struct_10___iter__++] = ((struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_10___iter__ *)o);
        } else
        #endif
        {
          PyTypeObject *tp = Py_TYPE(o);
          #if CYTHON_USE_TYPE_SLOTS
          (*tp->tp_free)(o);
          #else
          {
            freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free);
            if (tp_free) tp_free(o);
          }
          #endif
          #if CYTHON_USE_TYPE_SPECS
          Py_DECREF(tp);
          #endif
        }
      }

      static int __pyx_tp_traverse_7pyarrow_3lib___pyx_scope_struct_10___iter__(PyObject *o, visitproc v, void *a) {
        int e;
        struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_10___iter__ *p = (struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_10___iter__ *)o;
        {
          e = __Pyx_call_type_traverse(o, 1, v, a);
          if (e) return e;
        }
        if (p->__pyx_v_arr) {
          e = (*v)(p->__pyx_v_arr, a); if (e) return e;
        }
        if (p->__pyx_v_k) {
          e = (*v)(p->__pyx_v_k, a); if (e) return e;
        }
        if (p->__pyx_v_self) {
          e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
        }
        if (p->__pyx_v_v) {
          e = (*v)(p->__pyx_v_v, a); if (e) return e;
        }
        if (p->__pyx_t_0) {
          e = (*v)(p->__pyx_t_0, a); if (e) return e;
        }
        return 0;
      }
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib___pyx_scope_struct_10___iter___slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib___pyx_scope_struct_10___iter__},
        {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyarrow_3lib___pyx_scope_struct_10___iter__},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_10___iter__},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib___pyx_scope_struct_10___iter___spec = {
        "pyarrow.lib.__pyx_scope_struct_10___iter__",
        sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_10___iter__),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
        __pyx_type_7pyarrow_3lib___pyx_scope_struct_10___iter___slots,
      };
      #else

      static PyTypeObject __pyx_type_7pyarrow_3lib___pyx_scope_struct_10___iter__ = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""__pyx_scope_struct_10___iter__", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_10___iter__), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib___pyx_scope_struct_10___iter__, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        0, /*tp_repr*/
        0, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        0, /*tp_str*/
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
        0, /*tp_doc*/
        __pyx_tp_traverse_7pyarrow_3lib___pyx_scope_struct_10___iter__, /*tp_traverse*/
        0, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        0, /*tp_iter*/
        0, /*tp_iternext*/
        0, /*tp_methods*/
        0, /*tp_members*/
        0, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        0, /*tp_init*/
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_10___iter__, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif

      static PyObject *__pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_11___iter__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
        PyObject *o;
        #if CYTHON_USE_FREELISTS
        if (likely((int)(__pyx_mstate_global->__pyx_freecount_7pyarrow_3lib___pyx_scope_struct_11___iter__ > 0) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_11___iter__, sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_11___iter__))))
        {
          o = (PyObject*)__pyx_mstate_global->__pyx_freelist_7pyarrow_3lib___pyx_scope_struct_11___iter__[--__pyx_mstate_global->__pyx_freecount_7pyarrow_3lib___pyx_scope_struct_11___iter__];
          #if CYTHON_USE_TYPE_SPECS
          Py_DECREF(Py_TYPE(o));
          #endif
          memset(o, 0, sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_11___iter__));
          #if CYTHON_COMPILING_IN_LIMITED_API
          (void) PyObject_Init(o, t);
          #else
          (void) PyObject_INIT(o, t);
          #endif
          PyObject_GC_Track(o);
        } else
        #endif
        {
          o = __Pyx_AllocateExtensionType(t, 1);
          if (unlikely(!o)) return 0;
        }
        return o;
      }

      static void __pyx_tp_dealloc_7pyarrow_3lib___pyx_scope_struct_11___iter__(PyObject *o) {
        struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_11___iter__ *p = (struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_11___iter__ *)o;
        #if CYTHON_USE_TP_FINALIZE
        if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
          if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_7pyarrow_3lib___pyx_scope_struct_11___iter__) {
            if (PyObject_CallFinalizerFromDealloc(o)) return;
          }
        }
        #endif
        PyObject_GC_UnTrack(o);
        Py_CLEAR(p->__pyx_v_self);
        #if CYTHON_USE_FREELISTS
        if (likely((int)(__pyx_mstate_global->__pyx_freecount_7pyarrow_3lib___pyx_scope_struct_11___iter__ < 8) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(Py_TYPE(o), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_11___iter__, sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_11___iter__))))
        {
          __pyx_mstate_global->__pyx_freelist_7pyarrow_3lib___pyx_scope_struct_11___iter__[__pyx_mstate_global->__pyx_freecount_7pyarrow_3lib___pyx_scope_struct_11___iter__++] = ((struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_11___iter__ *)o);
        } else
        #endif
        {
          PyTypeObject *tp = Py_TYPE(o);
          #if CYTHON_USE_TYPE_SLOTS
          (*tp->tp_free)(o);
          #else
          {
            freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free);
            if (tp_free) tp_free(o);
          }
          #endif
          #if CYTHON_USE_TYPE_SPECS
          Py_DECREF(tp);
          #endif
        }
      }

      static int __pyx_tp_traverse_7pyarrow_3lib___pyx_scope_struct_11___iter__(PyObject *o, visitproc v, void *a) {
        int e;
        struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_11___iter__ *p = (struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_11___iter__ *)o;
        {
          e = __Pyx_call_type_traverse(o, 1, v, a);
          if (e) return e;
        }
        if (p->__pyx_v_self) {
          e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
        }
        return 0;
      }
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib___pyx_scope_struct_11___iter___slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib___pyx_scope_struct_11___iter__},
        {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyarrow_3lib___pyx_scope_struct_11___iter__},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_11___iter__},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib___pyx_scope_struct_11___iter___spec = {
        "pyarrow.lib.__pyx_scope_struct_11___iter__",
        sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_11___iter__),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
        __pyx_type_7pyarrow_3lib___pyx_scope_struct_11___iter___slots,
      };
      #else

      static PyTypeObject __pyx_type_7pyarrow_3lib___pyx_scope_struct_11___iter__ = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""__pyx_scope_struct_11___iter__", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_11___iter__), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib___pyx_scope_struct_11___iter__, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        0, /*tp_repr*/
        0, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        0, /*tp_str*/
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
        0, /*tp_doc*/
        __pyx_tp_traverse_7pyarrow_3lib___pyx_scope_struct_11___iter__, /*tp_traverse*/
        0, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        0, /*tp_iter*/
        0, /*tp_iternext*/
        0, /*tp_methods*/
        0, /*tp_members*/
        0, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        0, /*tp_init*/
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_11___iter__, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif

      static PyObject *__pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_12_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
        PyObject *o;
        #if CYTHON_USE_FREELISTS
        if (likely((int)(__pyx_mstate_global->__pyx_freecount_7pyarrow_3lib___pyx_scope_struct_12_genexpr > 0) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_12_genexpr, sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_12_genexpr))))
        {
          o = (PyObject*)__pyx_mstate_global->__pyx_freelist_7pyarrow_3lib___pyx_scope_struct_12_genexpr[--__pyx_mstate_global->__pyx_freecount_7pyarrow_3lib___pyx_scope_struct_12_genexpr];
          #if CYTHON_USE_TYPE_SPECS
          Py_DECREF(Py_TYPE(o));
          #endif
          memset(o, 0, sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_12_genexpr));
          #if CYTHON_COMPILING_IN_LIMITED_API
          (void) PyObject_Init(o, t);
          #else
          (void) PyObject_INIT(o, t);
          #endif
          PyObject_GC_Track(o);
        } else
        #endif
        {
          o = __Pyx_AllocateExtensionType(t, 1);
          if (unlikely(!o)) return 0;
        }
        return o;
      }

      static void __pyx_tp_dealloc_7pyarrow_3lib___pyx_scope_struct_12_genexpr(PyObject *o) {
        struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_12_genexpr *p = (struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_12_genexpr *)o;
        #if CYTHON_USE_TP_FINALIZE
        if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
          if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_7pyarrow_3lib___pyx_scope_struct_12_genexpr) {
            if (PyObject_CallFinalizerFromDealloc(o)) return;
          }
        }
        #endif
        PyObject_GC_UnTrack(o);
        Py_CLEAR(p->__pyx_genexpr_arg_0);
        Py_CLEAR(p->__pyx_v_name);
        #if CYTHON_USE_FREELISTS
        if (likely((int)(__pyx_mstate_global->__pyx_freecount_7pyarrow_3lib___pyx_scope_struct_12_genexpr < 8) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(Py_TYPE(o), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_12_genexpr, sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_12_genexpr))))
        {
          __pyx_mstate_global->__pyx_freelist_7pyarrow_3lib___pyx_scope_struct_12_genexpr[__pyx_mstate_global->__pyx_freecount_7pyarrow_3lib___pyx_scope_struct_12_genexpr++] = ((struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_12_genexpr *)o);
        } else
        #endif
        {
          PyTypeObject *tp = Py_TYPE(o);
          #if CYTHON_USE_TYPE_SLOTS
          (*tp->tp_free)(o);
          #else
          {
            freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free);
            if (tp_free) tp_free(o);
          }
          #endif
          #if CYTHON_USE_TYPE_SPECS
          Py_DECREF(tp);
          #endif
        }
      }

      static int __pyx_tp_traverse_7pyarrow_3lib___pyx_scope_struct_12_genexpr(PyObject *o, visitproc v, void *a) {
        int e;
        struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_12_genexpr *p = (struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_12_genexpr *)o;
        {
          e = __Pyx_call_type_traverse(o, 1, v, a);
          if (e) return e;
        }
        if (p->__pyx_genexpr_arg_0) {
          e = (*v)(p->__pyx_genexpr_arg_0, a); if (e) return e;
        }
        if (p->__pyx_v_name) {
          e = (*v)(p->__pyx_v_name, a); if (e) return e;
        }
        return 0;
      }
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib___pyx_scope_struct_12_genexpr_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib___pyx_scope_struct_12_genexpr},
        {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyarrow_3lib___pyx_scope_struct_12_genexpr},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_12_genexpr},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib___pyx_scope_struct_12_genexpr_spec = {
        "pyarrow.lib.__pyx_scope_struct_12_genexpr",
        sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_12_genexpr),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
        __pyx_type_7pyarrow_3lib___pyx_scope_struct_12_genexpr_slots,
      };
      #else

      static PyTypeObject __pyx_type_7pyarrow_3lib___pyx_scope_struct_12_genexpr = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""__pyx_scope_struct_12_genexpr", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_12_genexpr), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib___pyx_scope_struct_12_genexpr, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        0, /*tp_repr*/
        0, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        0, /*tp_str*/
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
        0, /*tp_doc*/
        __pyx_tp_traverse_7pyarrow_3lib___pyx_scope_struct_12_genexpr, /*tp_traverse*/
        0, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        0, /*tp_iter*/
        0, /*tp_iternext*/
        0, /*tp_methods*/
        0, /*tp_members*/
        0, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        0, /*tp_init*/
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_12_genexpr, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif

      static PyObject *__pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_13___iter__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
        PyObject *o;
        #if CYTHON_USE_FREELISTS
        if (likely((int)(__pyx_mstate_global->__pyx_freecount_7pyarrow_3lib___pyx_scope_struct_13___iter__ > 0) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_13___iter__, sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_13___iter__))))
        {
          o = (PyObject*)__pyx_mstate_global->__pyx_freelist_7pyarrow_3lib___pyx_scope_struct_13___iter__[--__pyx_mstate_global->__pyx_freecount_7pyarrow_3lib___pyx_scope_struct_13___iter__];
          #if CYTHON_USE_TYPE_SPECS
          Py_DECREF(Py_TYPE(o));
          #endif
          memset(o, 0, sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_13___iter__));
          #if CYTHON_COMPILING_IN_LIMITED_API
          (void) PyObject_Init(o, t);
          #else
          (void) PyObject_INIT(o, t);
          #endif
          PyObject_GC_Track(o);
        } else
        #endif
        {
          o = __Pyx_AllocateExtensionType(t, 1);
          if (unlikely(!o)) return 0;
        }
        return o;
      }

      static void __pyx_tp_dealloc_7pyarrow_3lib___pyx_scope_struct_13___iter__(PyObject *o) {
        struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_13___iter__ *p = (struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_13___iter__ *)o;
        #if CYTHON_USE_TP_FINALIZE
        if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
          if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_7pyarrow_3lib___pyx_scope_struct_13___iter__) {
            if (PyObject_CallFinalizerFromDealloc(o)) return;
          }
        }
        #endif
        PyObject_GC_UnTrack(o);
        Py_CLEAR(p->__pyx_v_chunk);
        Py_CLEAR(p->__pyx_v_item);
        Py_CLEAR(p->__pyx_v_self);
        Py_CLEAR(p->__pyx_t_0);
        Py_CLEAR(p->__pyx_t_1);
        #if CYTHON_USE_FREELISTS
        if (likely((int)(__pyx_mstate_global->__pyx_freecount_7pyarrow_3lib___pyx_scope_struct_13___iter__ < 8) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(Py_TYPE(o), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_13___iter__, sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_13___iter__))))
        {
          __pyx_mstate_global->__pyx_freelist_7pyarrow_3lib___pyx_scope_struct_13___iter__[__pyx_mstate_global->__pyx_freecount_7pyarrow_3lib___pyx_scope_struct_13___iter__++] = ((struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_13___iter__ *)o);
        } else
        #endif
        {
          PyTypeObject *tp = Py_TYPE(o);
          #if CYTHON_USE_TYPE_SLOTS
          (*tp->tp_free)(o);
          #else
          {
            freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free);
            if (tp_free) tp_free(o);
          }
          #endif
          #if CYTHON_USE_TYPE_SPECS
          Py_DECREF(tp);
          #endif
        }
      }

      static int __pyx_tp_traverse_7pyarrow_3lib___pyx_scope_struct_13___iter__(PyObject *o, visitproc v, void *a) {
        int e;
        struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_13___iter__ *p = (struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_13___iter__ *)o;
        {
          e = __Pyx_call_type_traverse(o, 1, v, a);
          if (e) return e;
        }
        if (p->__pyx_v_chunk) {
          e = (*v)(p->__pyx_v_chunk, a); if (e) return e;
        }
        if (p->__pyx_v_item) {
          e = (*v)(p->__pyx_v_item, a); if (e) return e;
        }
        if (p->__pyx_v_self) {
          e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
        }
        if (p->__pyx_t_0) {
          e = (*v)(p->__pyx_t_0, a); if (e) return e;
        }
        if (p->__pyx_t_1) {
          e = (*v)(p->__pyx_t_1, a); if (e) return e;
        }
        return 0;
      }
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib___pyx_scope_struct_13___iter___slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib___pyx_scope_struct_13___iter__},
        {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyarrow_3lib___pyx_scope_struct_13___iter__},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_13___iter__},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib___pyx_scope_struct_13___iter___spec = {
        "pyarrow.lib.__pyx_scope_struct_13___iter__",
        sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_13___iter__),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
        __pyx_type_7pyarrow_3lib___pyx_scope_struct_13___iter___slots,
      };
      #else

      static PyTypeObject __pyx_type_7pyarrow_3lib___pyx_scope_struct_13___iter__ = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""__pyx_scope_struct_13___iter__", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_13___iter__), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib___pyx_scope_struct_13___iter__, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        0, /*tp_repr*/
        0, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        0, /*tp_str*/
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
        0, /*tp_doc*/
        __pyx_tp_traverse_7pyarrow_3lib___pyx_scope_struct_13___iter__, /*tp_traverse*/
        0, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        0, /*tp_iter*/
        0, /*tp_iternext*/
        0, /*tp_methods*/
        0, /*tp_members*/
        0, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        0, /*tp_init*/
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_13___iter__, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif

      static PyObject *__pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_14_iterchunks(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
        PyObject *o;
        #if CYTHON_USE_FREELISTS
        if (likely((int)(__pyx_mstate_global->__pyx_freecount_7pyarrow_3lib___pyx_scope_struct_14_iterchunks > 0) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_14_iterchunks, sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_14_iterchunks))))
        {
          o = (PyObject*)__pyx_mstate_global->__pyx_freelist_7pyarrow_3lib___pyx_scope_struct_14_iterchunks[--__pyx_mstate_global->__pyx_freecount_7pyarrow_3lib___pyx_scope_struct_14_iterchunks];
          #if CYTHON_USE_TYPE_SPECS
          Py_DECREF(Py_TYPE(o));
          #endif
          memset(o, 0, sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_14_iterchunks));
          #if CYTHON_COMPILING_IN_LIMITED_API
          (void) PyObject_Init(o, t);
          #else
          (void) PyObject_INIT(o, t);
          #endif
          PyObject_GC_Track(o);
        } else
        #endif
        {
          o = __Pyx_AllocateExtensionType(t, 1);
          if (unlikely(!o)) return 0;
        }
        return o;
      }

      static void __pyx_tp_dealloc_7pyarrow_3lib___pyx_scope_struct_14_iterchunks(PyObject *o) {
        struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_14_iterchunks *p = (struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_14_iterchunks *)o;
        #if CYTHON_USE_TP_FINALIZE
        if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
          if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_7pyarrow_3lib___pyx_scope_struct_14_iterchunks) {
            if (PyObject_CallFinalizerFromDealloc(o)) return;
          }
        }
        #endif
        PyObject_GC_UnTrack(o);
        Py_CLEAR(p->__pyx_v_i);
        Py_CLEAR(p->__pyx_v_self);
        Py_CLEAR(p->__pyx_t_0);
        #if CYTHON_USE_FREELISTS
        if (likely((int)(__pyx_mstate_global->__pyx_freecount_7pyarrow_3lib___pyx_scope_struct_14_iterchunks < 8) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(Py_TYPE(o), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_14_iterchunks, sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_14_iterchunks))))
        {
          __pyx_mstate_global->__pyx_freelist_7pyarrow_3lib___pyx_scope_struct_14_iterchunks[__pyx_mstate_global->__pyx_freecount_7pyarrow_3lib___pyx_scope_struct_14_iterchunks++] = ((struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_14_iterchunks *)o);
        } else
        #endif
        {
          PyTypeObject *tp = Py_TYPE(o);
          #if CYTHON_USE_TYPE_SLOTS
          (*tp->tp_free)(o);
          #else
          {
            freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free);
            if (tp_free) tp_free(o);
          }
          #endif
          #if CYTHON_USE_TYPE_SPECS
          Py_DECREF(tp);
          #endif
        }
      }

      static int __pyx_tp_traverse_7pyarrow_3lib___pyx_scope_struct_14_iterchunks(PyObject *o, visitproc v, void *a) {
        int e;
        struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_14_iterchunks *p = (struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_14_iterchunks *)o;
        {
          e = __Pyx_call_type_traverse(o, 1, v, a);
          if (e) return e;
        }
        if (p->__pyx_v_i) {
          e = (*v)(p->__pyx_v_i, a); if (e) return e;
        }
        if (p->__pyx_v_self) {
          e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
        }
        if (p->__pyx_t_0) {
          e = (*v)(p->__pyx_t_0, a); if (e) return e;
        }
        return 0;
      }
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib___pyx_scope_struct_14_iterchunks_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib___pyx_scope_struct_14_iterchunks},
        {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyarrow_3lib___pyx_scope_struct_14_iterchunks},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_14_iterchunks},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib___pyx_scope_struct_14_iterchunks_spec = {
        "pyarrow.lib.__pyx_scope_struct_14_iterchunks",
        sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_14_iterchunks),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
        __pyx_type_7pyarrow_3lib___pyx_scope_struct_14_iterchunks_slots,
      };
      #else

      static PyTypeObject __pyx_type_7pyarrow_3lib___pyx_scope_struct_14_iterchunks = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""__pyx_scope_struct_14_iterchunks", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_14_iterchunks), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib___pyx_scope_struct_14_iterchunks, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        0, /*tp_repr*/
        0, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        0, /*tp_str*/
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
        0, /*tp_doc*/
        __pyx_tp_traverse_7pyarrow_3lib___pyx_scope_struct_14_iterchunks, /*tp_traverse*/
        0, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        0, /*tp_iter*/
        0, /*tp_iternext*/
        0, /*tp_methods*/
        0, /*tp_members*/
        0, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        0, /*tp_init*/
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_14_iterchunks, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif

      static PyObject *__pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_15_itercolumns(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
        PyObject *o;
        #if CYTHON_USE_FREELISTS
        if (likely((int)(__pyx_mstate_global->__pyx_freecount_7pyarrow_3lib___pyx_scope_struct_15_itercolumns > 0) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_15_itercolumns, sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_15_itercolumns))))
        {
          o = (PyObject*)__pyx_mstate_global->__pyx_freelist_7pyarrow_3lib___pyx_scope_struct_15_itercolumns[--__pyx_mstate_global->__pyx_freecount_7pyarrow_3lib___pyx_scope_struct_15_itercolumns];
          #if CYTHON_USE_TYPE_SPECS
          Py_DECREF(Py_TYPE(o));
          #endif
          memset(o, 0, sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_15_itercolumns));
          #if CYTHON_COMPILING_IN_LIMITED_API
          (void) PyObject_Init(o, t);
          #else
          (void) PyObject_INIT(o, t);
          #endif
          PyObject_GC_Track(o);
        } else
        #endif
        {
          o = __Pyx_AllocateExtensionType(t, 1);
          if (unlikely(!o)) return 0;
        }
        return o;
      }

      static void __pyx_tp_dealloc_7pyarrow_3lib___pyx_scope_struct_15_itercolumns(PyObject *o) {
        struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_15_itercolumns *p = (struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_15_itercolumns *)o;
        #if CYTHON_USE_TP_FINALIZE
        if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
          if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_7pyarrow_3lib___pyx_scope_struct_15_itercolumns) {
            if (PyObject_CallFinalizerFromDealloc(o)) return;
          }
        }
        #endif
        PyObject_GC_UnTrack(o);
        Py_CLEAR(p->__pyx_v_i);
        Py_CLEAR(p->__pyx_v_self);
        Py_CLEAR(p->__pyx_t_0);
        #if CYTHON_USE_FREELISTS
        if (likely((int)(__pyx_mstate_global->__pyx_freecount_7pyarrow_3lib___pyx_scope_struct_15_itercolumns < 8) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(Py_TYPE(o), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_15_itercolumns, sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_15_itercolumns))))
        {
          __pyx_mstate_global->__pyx_freelist_7pyarrow_3lib___pyx_scope_struct_15_itercolumns[__pyx_mstate_global->__pyx_freecount_7pyarrow_3lib___pyx_scope_struct_15_itercolumns++] = ((struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_15_itercolumns *)o);
        } else
        #endif
        {
          PyTypeObject *tp = Py_TYPE(o);
          #if CYTHON_USE_TYPE_SLOTS
          (*tp->tp_free)(o);
          #else
          {
            freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free);
            if (tp_free) tp_free(o);
          }
          #endif
          #if CYTHON_USE_TYPE_SPECS
          Py_DECREF(tp);
          #endif
        }
      }

      static int __pyx_tp_traverse_7pyarrow_3lib___pyx_scope_struct_15_itercolumns(PyObject *o, visitproc v, void *a) {
        int e;
        struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_15_itercolumns *p = (struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_15_itercolumns *)o;
        {
          e = __Pyx_call_type_traverse(o, 1, v, a);
          if (e) return e;
        }
        if (p->__pyx_v_i) {
          e = (*v)(p->__pyx_v_i, a); if (e) return e;
        }
        if (p->__pyx_v_self) {
          e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
        }
        if (p->__pyx_t_0) {
          e = (*v)(p->__pyx_t_0, a); if (e) return e;
        }
        return 0;
      }
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib___pyx_scope_struct_15_itercolumns_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib___pyx_scope_struct_15_itercolumns},
        {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyarrow_3lib___pyx_scope_struct_15_itercolumns},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_15_itercolumns},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib___pyx_scope_struct_15_itercolumns_spec = {
        "pyarrow.lib.__pyx_scope_struct_15_itercolumns",
        sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_15_itercolumns),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
        __pyx_type_7pyarrow_3lib___pyx_scope_struct_15_itercolumns_slots,
      };
      #else

      static PyTypeObject __pyx_type_7pyarrow_3lib___pyx_scope_struct_15_itercolumns = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""__pyx_scope_struct_15_itercolumns", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_15_itercolumns), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib___pyx_scope_struct_15_itercolumns, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        0, /*tp_repr*/
        0, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        0, /*tp_str*/
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
        0, /*tp_doc*/
        __pyx_tp_traverse_7pyarrow_3lib___pyx_scope_struct_15_itercolumns, /*tp_traverse*/
        0, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        0, /*tp_iter*/
        0, /*tp_iternext*/
        0, /*tp_methods*/
        0, /*tp_members*/
        0, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        0, /*tp_init*/
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_15_itercolumns, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif

      static PyObject *__pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_16_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
        PyObject *o;
        #if CYTHON_USE_FREELISTS
        if (likely((int)(__pyx_mstate_global->__pyx_freecount_7pyarrow_3lib___pyx_scope_struct_16_genexpr > 0) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_16_genexpr, sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_16_genexpr))))
        {
          o = (PyObject*)__pyx_mstate_global->__pyx_freelist_7pyarrow_3lib___pyx_scope_struct_16_genexpr[--__pyx_mstate_global->__pyx_freecount_7pyarrow_3lib___pyx_scope_struct_16_genexpr];
          #if CYTHON_USE_TYPE_SPECS
          Py_DECREF(Py_TYPE(o));
          #endif
          memset(o, 0, sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_16_genexpr));
          #if CYTHON_COMPILING_IN_LIMITED_API
          (void) PyObject_Init(o, t);
          #else
          (void) PyObject_INIT(o, t);
          #endif
          PyObject_GC_Track(o);
        } else
        #endif
        {
          o = __Pyx_AllocateExtensionType(t, 1);
          if (unlikely(!o)) return 0;
        }
        return o;
      }

      static void __pyx_tp_dealloc_7pyarrow_3lib___pyx_scope_struct_16_genexpr(PyObject *o) {
        struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_16_genexpr *p = (struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_16_genexpr *)o;
        #if CYTHON_USE_TP_FINALIZE
        if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
          if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_7pyarrow_3lib___pyx_scope_struct_16_genexpr) {
            if (PyObject_CallFinalizerFromDealloc(o)) return;
          }
        }
        #endif
        PyObject_GC_UnTrack(o);
        Py_CLEAR(p->__pyx_genexpr_arg_0);
        Py_CLEAR(p->__pyx_v_c);
        #if CYTHON_USE_FREELISTS
        if (likely((int)(__pyx_mstate_global->__pyx_freecount_7pyarrow_3lib___pyx_scope_struct_16_genexpr < 8) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(Py_TYPE(o), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_16_genexpr, sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_16_genexpr))))
        {
          __pyx_mstate_global->__pyx_freelist_7pyarrow_3lib___pyx_scope_struct_16_genexpr[__pyx_mstate_global->__pyx_freecount_7pyarrow_3lib___pyx_scope_struct_16_genexpr++] = ((struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_16_genexpr *)o);
        } else
        #endif
        {
          PyTypeObject *tp = Py_TYPE(o);
          #if CYTHON_USE_TYPE_SLOTS
          (*tp->tp_free)(o);
          #else
          {
            freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free);
            if (tp_free) tp_free(o);
          }
          #endif
          #if CYTHON_USE_TYPE_SPECS
          Py_DECREF(tp);
          #endif
        }
      }

      static int __pyx_tp_traverse_7pyarrow_3lib___pyx_scope_struct_16_genexpr(PyObject *o, visitproc v, void *a) {
        int e;
        struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_16_genexpr *p = (struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_16_genexpr *)o;
        {
          e = __Pyx_call_type_traverse(o, 1, v, a);
          if (e) return e;
        }
        if (p->__pyx_genexpr_arg_0) {
          e = (*v)(p->__pyx_genexpr_arg_0, a); if (e) return e;
        }
        if (p->__pyx_v_c) {
          e = (*v)(p->__pyx_v_c, a); if (e) return e;
        }
        return 0;
      }
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib___pyx_scope_struct_16_genexpr_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib___pyx_scope_struct_16_genexpr},
        {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyarrow_3lib___pyx_scope_struct_16_genexpr},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_16_genexpr},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib___pyx_scope_struct_16_genexpr_spec = {
        "pyarrow.lib.__pyx_scope_struct_16_genexpr",
        sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_16_genexpr),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
        __pyx_type_7pyarrow_3lib___pyx_scope_struct_16_genexpr_slots,
      };
      #else

      static PyTypeObject __pyx_type_7pyarrow_3lib___pyx_scope_struct_16_genexpr = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""__pyx_scope_struct_16_genexpr", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_16_genexpr), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib___pyx_scope_struct_16_genexpr, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        0, /*tp_repr*/
        0, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        0, /*tp_str*/
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
        0, /*tp_doc*/
        __pyx_tp_traverse_7pyarrow_3lib___pyx_scope_struct_16_genexpr, /*tp_traverse*/
        0, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        0, /*tp_iter*/
        0, /*tp_iternext*/
        0, /*tp_methods*/
        0, /*tp_members*/
        0, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        0, /*tp_init*/
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_16_genexpr, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif

      static PyObject *__pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_17_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
        PyObject *o;
        #if CYTHON_USE_FREELISTS
        if (likely((int)(__pyx_mstate_global->__pyx_freecount_7pyarrow_3lib___pyx_scope_struct_17_genexpr > 0) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_17_genexpr, sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_17_genexpr))))
        {
          o = (PyObject*)__pyx_mstate_global->__pyx_freelist_7pyarrow_3lib___pyx_scope_struct_17_genexpr[--__pyx_mstate_global->__pyx_freecount_7pyarrow_3lib___pyx_scope_struct_17_genexpr];
          #if CYTHON_USE_TYPE_SPECS
          Py_DECREF(Py_TYPE(o));
          #endif
          memset(o, 0, sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_17_genexpr));
          #if CYTHON_COMPILING_IN_LIMITED_API
          (void) PyObject_Init(o, t);
          #else
          (void) PyObject_INIT(o, t);
          #endif
          PyObject_GC_Track(o);
        } else
        #endif
        {
          o = __Pyx_AllocateExtensionType(t, 1);
          if (unlikely(!o)) return 0;
        }
        return o;
      }

      static void __pyx_tp_dealloc_7pyarrow_3lib___pyx_scope_struct_17_genexpr(PyObject *o) {
        struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_17_genexpr *p = (struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_17_genexpr *)o;
        #if CYTHON_USE_TP_FINALIZE
        if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
          if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_7pyarrow_3lib___pyx_scope_struct_17_genexpr) {
            if (PyObject_CallFinalizerFromDealloc(o)) return;
          }
        }
        #endif
        PyObject_GC_UnTrack(o);
        Py_CLEAR(p->__pyx_genexpr_arg_0);
        Py_CLEAR(p->__pyx_v_x);
        Py_CLEAR(p->__pyx_t_0);
        #if CYTHON_USE_FREELISTS
        if (likely((int)(__pyx_mstate_global->__pyx_freecount_7pyarrow_3lib___pyx_scope_struct_17_genexpr < 8) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(Py_TYPE(o), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_17_genexpr, sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_17_genexpr))))
        {
          __pyx_mstate_global->__pyx_freelist_7pyarrow_3lib___pyx_scope_struct_17_genexpr[__pyx_mstate_global->__pyx_freecount_7pyarrow_3lib___pyx_scope_struct_17_genexpr++] = ((struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_17_genexpr *)o);
        } else
        #endif
        {
          PyTypeObject *tp = Py_TYPE(o);
          #if CYTHON_USE_TYPE_SLOTS
          (*tp->tp_free)(o);
          #else
          {
            freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free);
            if (tp_free) tp_free(o);
          }
          #endif
          #if CYTHON_USE_TYPE_SPECS
          Py_DECREF(tp);
          #endif
        }
      }

      static int __pyx_tp_traverse_7pyarrow_3lib___pyx_scope_struct_17_genexpr(PyObject *o, visitproc v, void *a) {
        int e;
        struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_17_genexpr *p = (struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_17_genexpr *)o;
        {
          e = __Pyx_call_type_traverse(o, 1, v, a);
          if (e) return e;
        }
        if (p->__pyx_genexpr_arg_0) {
          e = (*v)(p->__pyx_genexpr_arg_0, a); if (e) return e;
        }
        if (p->__pyx_v_x) {
          e = (*v)(p->__pyx_v_x, a); if (e) return e;
        }
        if (p->__pyx_t_0) {
          e = (*v)(p->__pyx_t_0, a); if (e) return e;
        }
        return 0;
      }
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib___pyx_scope_struct_17_genexpr_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib___pyx_scope_struct_17_genexpr},
        {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyarrow_3lib___pyx_scope_struct_17_genexpr},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_17_genexpr},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib___pyx_scope_struct_17_genexpr_spec = {
        "pyarrow.lib.__pyx_scope_struct_17_genexpr",
        sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_17_genexpr),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
        __pyx_type_7pyarrow_3lib___pyx_scope_struct_17_genexpr_slots,
      };
      #else

      static PyTypeObject __pyx_type_7pyarrow_3lib___pyx_scope_struct_17_genexpr = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""__pyx_scope_struct_17_genexpr", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_17_genexpr), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib___pyx_scope_struct_17_genexpr, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        0, /*tp_repr*/
        0, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        0, /*tp_str*/
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
        0, /*tp_doc*/
        __pyx_tp_traverse_7pyarrow_3lib___pyx_scope_struct_17_genexpr, /*tp_traverse*/
        0, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        0, /*tp_iter*/
        0, /*tp_iternext*/
        0, /*tp_methods*/
        0, /*tp_members*/
        0, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        0, /*tp_init*/
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_17_genexpr, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif

      static PyObject *__pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_18_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
        PyObject *o;
        #if CYTHON_USE_FREELISTS
        if (likely((int)(__pyx_mstate_global->__pyx_freecount_7pyarrow_3lib___pyx_scope_struct_18_genexpr > 0) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_18_genexpr, sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_18_genexpr))))
        {
          o = (PyObject*)__pyx_mstate_global->__pyx_freelist_7pyarrow_3lib___pyx_scope_struct_18_genexpr[--__pyx_mstate_global->__pyx_freecount_7pyarrow_3lib___pyx_scope_struct_18_genexpr];
          #if CYTHON_USE_TYPE_SPECS
          Py_DECREF(Py_TYPE(o));
          #endif
          memset(o, 0, sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_18_genexpr));
          #if CYTHON_COMPILING_IN_LIMITED_API
          (void) PyObject_Init(o, t);
          #else
          (void) PyObject_INIT(o, t);
          #endif
          PyObject_GC_Track(o);
        } else
        #endif
        {
          o = __Pyx_AllocateExtensionType(t, 1);
          if (unlikely(!o)) return 0;
        }
        return o;
      }

      static void __pyx_tp_dealloc_7pyarrow_3lib___pyx_scope_struct_18_genexpr(PyObject *o) {
        struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_18_genexpr *p = (struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_18_genexpr *)o;
        #if CYTHON_USE_TP_FINALIZE
        if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
          if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_7pyarrow_3lib___pyx_scope_struct_18_genexpr) {
            if (PyObject_CallFinalizerFromDealloc(o)) return;
          }
        }
        #endif
        PyObject_GC_UnTrack(o);
        Py_CLEAR(p->__pyx_genexpr_arg_0);
        Py_CLEAR(p->__pyx_v_x);
        Py_CLEAR(p->__pyx_t_0);
        #if CYTHON_USE_FREELISTS
        if (likely((int)(__pyx_mstate_global->__pyx_freecount_7pyarrow_3lib___pyx_scope_struct_18_genexpr < 8) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(Py_TYPE(o), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_18_genexpr, sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_18_genexpr))))
        {
          __pyx_mstate_global->__pyx_freelist_7pyarrow_3lib___pyx_scope_struct_18_genexpr[__pyx_mstate_global->__pyx_freecount_7pyarrow_3lib___pyx_scope_struct_18_genexpr++] = ((struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_18_genexpr *)o);
        } else
        #endif
        {
          PyTypeObject *tp = Py_TYPE(o);
          #if CYTHON_USE_TYPE_SLOTS
          (*tp->tp_free)(o);
          #else
          {
            freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free);
            if (tp_free) tp_free(o);
          }
          #endif
          #if CYTHON_USE_TYPE_SPECS
          Py_DECREF(tp);
          #endif
        }
      }

      static int __pyx_tp_traverse_7pyarrow_3lib___pyx_scope_struct_18_genexpr(PyObject *o, visitproc v, void *a) {
        int e;
        struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_18_genexpr *p = (struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_18_genexpr *)o;
        {
          e = __Pyx_call_type_traverse(o, 1, v, a);
          if (e) return e;
        }
        if (p->__pyx_genexpr_arg_0) {
          e = (*v)(p->__pyx_genexpr_arg_0, a); if (e) return e;
        }
        if (p->__pyx_v_x) {
          e = (*v)(p->__pyx_v_x, a); if (e) return e;
        }
        if (p->__pyx_t_0) {
          e = (*v)(p->__pyx_t_0, a); if (e) return e;
        }
        return 0;
      }
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib___pyx_scope_struct_18_genexpr_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib___pyx_scope_struct_18_genexpr},
        {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyarrow_3lib___pyx_scope_struct_18_genexpr},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_18_genexpr},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib___pyx_scope_struct_18_genexpr_spec = {
        "pyarrow.lib.__pyx_scope_struct_18_genexpr",
        sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_18_genexpr),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
        __pyx_type_7pyarrow_3lib___pyx_scope_struct_18_genexpr_slots,
      };
      #else

      static PyTypeObject __pyx_type_7pyarrow_3lib___pyx_scope_struct_18_genexpr = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""__pyx_scope_struct_18_genexpr", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_18_genexpr), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib___pyx_scope_struct_18_genexpr, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        0, /*tp_repr*/
        0, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        0, /*tp_str*/
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
        0, /*tp_doc*/
        __pyx_tp_traverse_7pyarrow_3lib___pyx_scope_struct_18_genexpr, /*tp_traverse*/
        0, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        0, /*tp_iter*/
        0, /*tp_iternext*/
        0, /*tp_methods*/
        0, /*tp_members*/
        0, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        0, /*tp_init*/
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_18_genexpr, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif

      static PyObject *__pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_19_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
        PyObject *o;
        #if CYTHON_USE_FREELISTS
        if (likely((int)(__pyx_mstate_global->__pyx_freecount_7pyarrow_3lib___pyx_scope_struct_19_genexpr > 0) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_19_genexpr, sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_19_genexpr))))
        {
          o = (PyObject*)__pyx_mstate_global->__pyx_freelist_7pyarrow_3lib___pyx_scope_struct_19_genexpr[--__pyx_mstate_global->__pyx_freecount_7pyarrow_3lib___pyx_scope_struct_19_genexpr];
          #if CYTHON_USE_TYPE_SPECS
          Py_DECREF(Py_TYPE(o));
          #endif
          memset(o, 0, sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_19_genexpr));
          #if CYTHON_COMPILING_IN_LIMITED_API
          (void) PyObject_Init(o, t);
          #else
          (void) PyObject_INIT(o, t);
          #endif
          PyObject_GC_Track(o);
        } else
        #endif
        {
          o = __Pyx_AllocateExtensionType(t, 1);
          if (unlikely(!o)) return 0;
        }
        return o;
      }

      static void __pyx_tp_dealloc_7pyarrow_3lib___pyx_scope_struct_19_genexpr(PyObject *o) {
        struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_19_genexpr *p = (struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_19_genexpr *)o;
        #if CYTHON_USE_TP_FINALIZE
        if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
          if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_7pyarrow_3lib___pyx_scope_struct_19_genexpr) {
            if (PyObject_CallFinalizerFromDealloc(o)) return;
          }
        }
        #endif
        PyObject_GC_UnTrack(o);
        Py_CLEAR(p->__pyx_genexpr_arg_0);
        Py_CLEAR(p->__pyx_v_x);
        Py_CLEAR(p->__pyx_t_0);
        #if CYTHON_USE_FREELISTS
        if (likely((int)(__pyx_mstate_global->__pyx_freecount_7pyarrow_3lib___pyx_scope_struct_19_genexpr < 8) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(Py_TYPE(o), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_19_genexpr, sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_19_genexpr))))
        {
          __pyx_mstate_global->__pyx_freelist_7pyarrow_3lib___pyx_scope_struct_19_genexpr[__pyx_mstate_global->__pyx_freecount_7pyarrow_3lib___pyx_scope_struct_19_genexpr++] = ((struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_19_genexpr *)o);
        } else
        #endif
        {
          PyTypeObject *tp = Py_TYPE(o);
          #if CYTHON_USE_TYPE_SLOTS
          (*tp->tp_free)(o);
          #else
          {
            freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free);
            if (tp_free) tp_free(o);
          }
          #endif
          #if CYTHON_USE_TYPE_SPECS
          Py_DECREF(tp);
          #endif
        }
      }

      static int __pyx_tp_traverse_7pyarrow_3lib___pyx_scope_struct_19_genexpr(PyObject *o, visitproc v, void *a) {
        int e;
        struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_19_genexpr *p = (struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_19_genexpr *)o;
        {
          e = __Pyx_call_type_traverse(o, 1, v, a);
          if (e) return e;
        }
        if (p->__pyx_genexpr_arg_0) {
          e = (*v)(p->__pyx_genexpr_arg_0, a); if (e) return e;
        }
        if (p->__pyx_v_x) {
          e = (*v)(p->__pyx_v_x, a); if (e) return e;
        }
        if (p->__pyx_t_0) {
          e = (*v)(p->__pyx_t_0, a); if (e) return e;
        }
        return 0;
      }
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib___pyx_scope_struct_19_genexpr_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib___pyx_scope_struct_19_genexpr},
        {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyarrow_3lib___pyx_scope_struct_19_genexpr},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_19_genexpr},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib___pyx_scope_struct_19_genexpr_spec = {
        "pyarrow.lib.__pyx_scope_struct_19_genexpr",
        sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_19_genexpr),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
        __pyx_type_7pyarrow_3lib___pyx_scope_struct_19_genexpr_slots,
      };
      #else

      static PyTypeObject __pyx_type_7pyarrow_3lib___pyx_scope_struct_19_genexpr = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""__pyx_scope_struct_19_genexpr", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_19_genexpr), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib___pyx_scope_struct_19_genexpr, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        0, /*tp_repr*/
        0, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        0, /*tp_str*/
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
        0, /*tp_doc*/
        __pyx_tp_traverse_7pyarrow_3lib___pyx_scope_struct_19_genexpr, /*tp_traverse*/
        0, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        0, /*tp_iter*/
        0, /*tp_iternext*/
        0, /*tp_methods*/
        0, /*tp_members*/
        0, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        0, /*tp_init*/
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_19_genexpr, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif

      static PyObject *__pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_20_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
        PyObject *o;
        #if CYTHON_USE_FREELISTS
        if (likely((int)(__pyx_mstate_global->__pyx_freecount_7pyarrow_3lib___pyx_scope_struct_20_genexpr > 0) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_20_genexpr, sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_20_genexpr))))
        {
          o = (PyObject*)__pyx_mstate_global->__pyx_freelist_7pyarrow_3lib___pyx_scope_struct_20_genexpr[--__pyx_mstate_global->__pyx_freecount_7pyarrow_3lib___pyx_scope_struct_20_genexpr];
          #if CYTHON_USE_TYPE_SPECS
          Py_DECREF(Py_TYPE(o));
          #endif
          memset(o, 0, sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_20_genexpr));
          #if CYTHON_COMPILING_IN_LIMITED_API
          (void) PyObject_Init(o, t);
          #else
          (void) PyObject_INIT(o, t);
          #endif
          PyObject_GC_Track(o);
        } else
        #endif
        {
          o = __Pyx_AllocateExtensionType(t, 1);
          if (unlikely(!o)) return 0;
        }
        return o;
      }

      static void __pyx_tp_dealloc_7pyarrow_3lib___pyx_scope_struct_20_genexpr(PyObject *o) {
        struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_20_genexpr *p = (struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_20_genexpr *)o;
        #if CYTHON_USE_TP_FINALIZE
        if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
          if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_7pyarrow_3lib___pyx_scope_struct_20_genexpr) {
            if (PyObject_CallFinalizerFromDealloc(o)) return;
          }
        }
        #endif
        PyObject_GC_UnTrack(o);
        Py_CLEAR(p->__pyx_genexpr_arg_0);
        Py_CLEAR(p->__pyx_v_x);
        Py_CLEAR(p->__pyx_t_0);
        #if CYTHON_USE_FREELISTS
        if (likely((int)(__pyx_mstate_global->__pyx_freecount_7pyarrow_3lib___pyx_scope_struct_20_genexpr < 8) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(Py_TYPE(o), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_20_genexpr, sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_20_genexpr))))
        {
          __pyx_mstate_global->__pyx_freelist_7pyarrow_3lib___pyx_scope_struct_20_genexpr[__pyx_mstate_global->__pyx_freecount_7pyarrow_3lib___pyx_scope_struct_20_genexpr++] = ((struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_20_genexpr *)o);
        } else
        #endif
        {
          PyTypeObject *tp = Py_TYPE(o);
          #if CYTHON_USE_TYPE_SLOTS
          (*tp->tp_free)(o);
          #else
          {
            freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free);
            if (tp_free) tp_free(o);
          }
          #endif
          #if CYTHON_USE_TYPE_SPECS
          Py_DECREF(tp);
          #endif
        }
      }

      static int __pyx_tp_traverse_7pyarrow_3lib___pyx_scope_struct_20_genexpr(PyObject *o, visitproc v, void *a) {
        int e;
        struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_20_genexpr *p = (struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_20_genexpr *)o;
        {
          e = __Pyx_call_type_traverse(o, 1, v, a);
          if (e) return e;
        }
        if (p->__pyx_genexpr_arg_0) {
          e = (*v)(p->__pyx_genexpr_arg_0, a); if (e) return e;
        }
        if (p->__pyx_v_x) {
          e = (*v)(p->__pyx_v_x, a); if (e) return e;
        }
        if (p->__pyx_t_0) {
          e = (*v)(p->__pyx_t_0, a); if (e) return e;
        }
        return 0;
      }
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib___pyx_scope_struct_20_genexpr_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib___pyx_scope_struct_20_genexpr},
        {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyarrow_3lib___pyx_scope_struct_20_genexpr},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_20_genexpr},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib___pyx_scope_struct_20_genexpr_spec = {
        "pyarrow.lib.__pyx_scope_struct_20_genexpr",
        sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_20_genexpr),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
        __pyx_type_7pyarrow_3lib___pyx_scope_struct_20_genexpr_slots,
      };
      #else

      static PyTypeObject __pyx_type_7pyarrow_3lib___pyx_scope_struct_20_genexpr = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""__pyx_scope_struct_20_genexpr", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_20_genexpr), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib___pyx_scope_struct_20_genexpr, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        0, /*tp_repr*/
        0, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        0, /*tp_str*/
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
        0, /*tp_doc*/
        __pyx_tp_traverse_7pyarrow_3lib___pyx_scope_struct_20_genexpr, /*tp_traverse*/
        0, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        0, /*tp_iter*/
        0, /*tp_iternext*/
        0, /*tp_methods*/
        0, /*tp_members*/
        0, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        0, /*tp_init*/
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_20_genexpr, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif

      static PyObject *__pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_21_download(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
        PyObject *o;
        #if CYTHON_USE_FREELISTS
        if (likely((int)(__pyx_mstate_global->__pyx_freecount_7pyarrow_3lib___pyx_scope_struct_21_download > 0) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_21_download, sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_21_download))))
        {
          o = (PyObject*)__pyx_mstate_global->__pyx_freelist_7pyarrow_3lib___pyx_scope_struct_21_download[--__pyx_mstate_global->__pyx_freecount_7pyarrow_3lib___pyx_scope_struct_21_download];
          #if CYTHON_USE_TYPE_SPECS
          Py_DECREF(Py_TYPE(o));
          #endif
          memset(o, 0, sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_21_download));
          #if CYTHON_COMPILING_IN_LIMITED_API
          (void) PyObject_Init(o, t);
          #else
          (void) PyObject_INIT(o, t);
          #endif
          PyObject_GC_Track(o);
        } else
        #endif
        {
          o = __Pyx_AllocateExtensionType(t, 1);
          if (unlikely(!o)) return 0;
        }
        return o;
      }

      static void __pyx_tp_dealloc_7pyarrow_3lib___pyx_scope_struct_21_download(PyObject *o) {
        struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_21_download *p = (struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_21_download *)o;
        #if CYTHON_USE_TP_FINALIZE
        if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
          if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_7pyarrow_3lib___pyx_scope_struct_21_download) {
            if (PyObject_CallFinalizerFromDealloc(o)) return;
          }
        }
        #endif
        PyObject_GC_UnTrack(o);
        Py_CLEAR(p->__pyx_v_cleanup);
        Py_CLEAR(p->__pyx_v_stream);
        Py_CLEAR(p->__pyx_v_write_queue);
        #if CYTHON_USE_FREELISTS
        if (likely((int)(__pyx_mstate_global->__pyx_freecount_7pyarrow_3lib___pyx_scope_struct_21_download < 8) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(Py_TYPE(o), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_21_download, sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_21_download))))
        {
          __pyx_mstate_global->__pyx_freelist_7pyarrow_3lib___pyx_scope_struct_21_download[__pyx_mstate_global->__pyx_freecount_7pyarrow_3lib___pyx_scope_struct_21_download++] = ((struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_21_download *)o);
        } else
        #endif
        {
          PyTypeObject *tp = Py_TYPE(o);
          #if CYTHON_USE_TYPE_SLOTS
          (*tp->tp_free)(o);
          #else
          {
            freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free);
            if (tp_free) tp_free(o);
          }
          #endif
          #if CYTHON_USE_TYPE_SPECS
          Py_DECREF(tp);
          #endif
        }
      }

      static int __pyx_tp_traverse_7pyarrow_3lib___pyx_scope_struct_21_download(PyObject *o, visitproc v, void *a) {
        int e;
        struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_21_download *p = (struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_21_download *)o;
        {
          e = __Pyx_call_type_traverse(o, 1, v, a);
          if (e) return e;
        }
        if (p->__pyx_v_cleanup) {
          e = (*v)(p->__pyx_v_cleanup, a); if (e) return e;
        }
        if (p->__pyx_v_stream) {
          e = (*v)(p->__pyx_v_stream, a); if (e) return e;
        }
        if (p->__pyx_v_write_queue) {
          e = (*v)(p->__pyx_v_write_queue, a); if (e) return e;
        }
        return 0;
      }

      static int __pyx_tp_clear_7pyarrow_3lib___pyx_scope_struct_21_download(PyObject *o) {
        PyObject* tmp;
        struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_21_download *p = (struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_21_download *)o;
        tmp = ((PyObject*)p->__pyx_v_cleanup);
        p->__pyx_v_cleanup = Py_None; Py_INCREF(Py_None);
        Py_XDECREF(tmp);
        tmp = ((PyObject*)p->__pyx_v_stream);
        p->__pyx_v_stream = Py_None; Py_INCREF(Py_None);
        Py_XDECREF(tmp);
        tmp = ((PyObject*)p->__pyx_v_write_queue);
        p->__pyx_v_write_queue = Py_None; Py_INCREF(Py_None);
        Py_XDECREF(tmp);
        return 0;
      }
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib___pyx_scope_struct_21_download_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib___pyx_scope_struct_21_download},
        {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyarrow_3lib___pyx_scope_struct_21_download},
        {Py_tp_clear, (void *)__pyx_tp_clear_7pyarrow_3lib___pyx_scope_struct_21_download},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_21_download},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib___pyx_scope_struct_21_download_spec = {
        "pyarrow.lib.__pyx_scope_struct_21_download",
        sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_21_download),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
        __pyx_type_7pyarrow_3lib___pyx_scope_struct_21_download_slots,
      };
      #else

      static PyTypeObject __pyx_type_7pyarrow_3lib___pyx_scope_struct_21_download = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""__pyx_scope_struct_21_download", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_21_download), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib___pyx_scope_struct_21_download, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        0, /*tp_repr*/
        0, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        0, /*tp_str*/
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
        0, /*tp_doc*/
        __pyx_tp_traverse_7pyarrow_3lib___pyx_scope_struct_21_download, /*tp_traverse*/
        __pyx_tp_clear_7pyarrow_3lib___pyx_scope_struct_21_download, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        0, /*tp_iter*/
        0, /*tp_iternext*/
        0, /*tp_methods*/
        0, /*tp_members*/
        0, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        0, /*tp_init*/
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_21_download, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif

      static PyObject *__pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_22__download_nothreads(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
        PyObject *o;
        #if CYTHON_USE_FREELISTS
        if (likely((int)(__pyx_mstate_global->__pyx_freecount_7pyarrow_3lib___pyx_scope_struct_22__download_nothreads > 0) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_22__download_nothreads, sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_22__download_nothreads))))
        {
          o = (PyObject*)__pyx_mstate_global->__pyx_freelist_7pyarrow_3lib___pyx_scope_struct_22__download_nothreads[--__pyx_mstate_global->__pyx_freecount_7pyarrow_3lib___pyx_scope_struct_22__download_nothreads];
          #if CYTHON_USE_TYPE_SPECS
          Py_DECREF(Py_TYPE(o));
          #endif
          memset(o, 0, sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_22__download_nothreads));
          #if CYTHON_COMPILING_IN_LIMITED_API
          (void) PyObject_Init(o, t);
          #else
          (void) PyObject_INIT(o, t);
          #endif
          PyObject_GC_Track(o);
        } else
        #endif
        {
          o = __Pyx_AllocateExtensionType(t, 1);
          if (unlikely(!o)) return 0;
        }
        return o;
      }

      static void __pyx_tp_dealloc_7pyarrow_3lib___pyx_scope_struct_22__download_nothreads(PyObject *o) {
        struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_22__download_nothreads *p = (struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_22__download_nothreads *)o;
        #if CYTHON_USE_TP_FINALIZE
        if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
          if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_7pyarrow_3lib___pyx_scope_struct_22__download_nothreads) {
            if (PyObject_CallFinalizerFromDealloc(o)) return;
          }
        }
        #endif
        PyObject_GC_UnTrack(o);
        Py_CLEAR(p->__pyx_v_stream);
        #if CYTHON_USE_FREELISTS
        if (likely((int)(__pyx_mstate_global->__pyx_freecount_7pyarrow_3lib___pyx_scope_struct_22__download_nothreads < 8) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(Py_TYPE(o), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_22__download_nothreads, sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_22__download_nothreads))))
        {
          __pyx_mstate_global->__pyx_freelist_7pyarrow_3lib___pyx_scope_struct_22__download_nothreads[__pyx_mstate_global->__pyx_freecount_7pyarrow_3lib___pyx_scope_struct_22__download_nothreads++] = ((struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_22__download_nothreads *)o);
        } else
        #endif
        {
          PyTypeObject *tp = Py_TYPE(o);
          #if CYTHON_USE_TYPE_SLOTS
          (*tp->tp_free)(o);
          #else
          {
            freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free);
            if (tp_free) tp_free(o);
          }
          #endif
          #if CYTHON_USE_TYPE_SPECS
          Py_DECREF(tp);
          #endif
        }
      }

      static int __pyx_tp_traverse_7pyarrow_3lib___pyx_scope_struct_22__download_nothreads(PyObject *o, visitproc v, void *a) {
        int e;
        struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_22__download_nothreads *p = (struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_22__download_nothreads *)o;
        {
          e = __Pyx_call_type_traverse(o, 1, v, a);
          if (e) return e;
        }
        if (p->__pyx_v_stream) {
          e = (*v)(p->__pyx_v_stream, a); if (e) return e;
        }
        return 0;
      }

      static int __pyx_tp_clear_7pyarrow_3lib___pyx_scope_struct_22__download_nothreads(PyObject *o) {
        PyObject* tmp;
        struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_22__download_nothreads *p = (struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_22__download_nothreads *)o;
        tmp = ((PyObject*)p->__pyx_v_stream);
        p->__pyx_v_stream = Py_None; Py_INCREF(Py_None);
        Py_XDECREF(tmp);
        return 0;
      }
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib___pyx_scope_struct_22__download_nothreads_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib___pyx_scope_struct_22__download_nothreads},
        {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyarrow_3lib___pyx_scope_struct_22__download_nothreads},
        {Py_tp_clear, (void *)__pyx_tp_clear_7pyarrow_3lib___pyx_scope_struct_22__download_nothreads},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_22__download_nothreads},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib___pyx_scope_struct_22__download_nothreads_spec = {
        "pyarrow.lib.__pyx_scope_struct_22__download_nothreads",
        sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_22__download_nothreads),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
        __pyx_type_7pyarrow_3lib___pyx_scope_struct_22__download_nothreads_slots,
      };
      #else

      static PyTypeObject __pyx_type_7pyarrow_3lib___pyx_scope_struct_22__download_nothreads = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""__pyx_scope_struct_22__download_nothreads", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_22__download_nothreads), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib___pyx_scope_struct_22__download_nothreads, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        0, /*tp_repr*/
        0, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        0, /*tp_str*/
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
        0, /*tp_doc*/
        __pyx_tp_traverse_7pyarrow_3lib___pyx_scope_struct_22__download_nothreads, /*tp_traverse*/
        __pyx_tp_clear_7pyarrow_3lib___pyx_scope_struct_22__download_nothreads, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        0, /*tp_iter*/
        0, /*tp_iternext*/
        0, /*tp_methods*/
        0, /*tp_members*/
        0, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        0, /*tp_init*/
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_22__download_nothreads, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif

      static PyObject *__pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_23_upload(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
        PyObject *o;
        #if CYTHON_USE_FREELISTS
        if (likely((int)(__pyx_mstate_global->__pyx_freecount_7pyarrow_3lib___pyx_scope_struct_23_upload > 0) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_23_upload, sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_23_upload))))
        {
          o = (PyObject*)__pyx_mstate_global->__pyx_freelist_7pyarrow_3lib___pyx_scope_struct_23_upload[--__pyx_mstate_global->__pyx_freecount_7pyarrow_3lib___pyx_scope_struct_23_upload];
          #if CYTHON_USE_TYPE_SPECS
          Py_DECREF(Py_TYPE(o));
          #endif
          memset(o, 0, sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_23_upload));
          #if CYTHON_COMPILING_IN_LIMITED_API
          (void) PyObject_Init(o, t);
          #else
          (void) PyObject_INIT(o, t);
          #endif
          PyObject_GC_Track(o);
        } else
        #endif
        {
          o = __Pyx_AllocateExtensionType(t, 1);
          if (unlikely(!o)) return 0;
        }
        return o;
      }

      static void __pyx_tp_dealloc_7pyarrow_3lib___pyx_scope_struct_23_upload(PyObject *o) {
        struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_23_upload *p = (struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_23_upload *)o;
        #if CYTHON_USE_TP_FINALIZE
        if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
          if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_7pyarrow_3lib___pyx_scope_struct_23_upload) {
            if (PyObject_CallFinalizerFromDealloc(o)) return;
          }
        }
        #endif
        PyObject_GC_UnTrack(o);
        Py_CLEAR(p->__pyx_v_self);
        Py_CLEAR(p->__pyx_v_write_queue);
        #if CYTHON_USE_FREELISTS
        if (likely((int)(__pyx_mstate_global->__pyx_freecount_7pyarrow_3lib___pyx_scope_struct_23_upload < 8) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(Py_TYPE(o), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_23_upload, sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_23_upload))))
        {
          __pyx_mstate_global->__pyx_freelist_7pyarrow_3lib___pyx_scope_struct_23_upload[__pyx_mstate_global->__pyx_freecount_7pyarrow_3lib___pyx_scope_struct_23_upload++] = ((struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_23_upload *)o);
        } else
        #endif
        {
          PyTypeObject *tp = Py_TYPE(o);
          #if CYTHON_USE_TYPE_SLOTS
          (*tp->tp_free)(o);
          #else
          {
            freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free);
            if (tp_free) tp_free(o);
          }
          #endif
          #if CYTHON_USE_TYPE_SPECS
          Py_DECREF(tp);
          #endif
        }
      }

      static int __pyx_tp_traverse_7pyarrow_3lib___pyx_scope_struct_23_upload(PyObject *o, visitproc v, void *a) {
        int e;
        struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_23_upload *p = (struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_23_upload *)o;
        {
          e = __Pyx_call_type_traverse(o, 1, v, a);
          if (e) return e;
        }
        if (p->__pyx_v_self) {
          e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
        }
        if (p->__pyx_v_write_queue) {
          e = (*v)(p->__pyx_v_write_queue, a); if (e) return e;
        }
        return 0;
      }

      static int __pyx_tp_clear_7pyarrow_3lib___pyx_scope_struct_23_upload(PyObject *o) {
        PyObject* tmp;
        struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_23_upload *p = (struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_23_upload *)o;
        tmp = ((PyObject*)p->__pyx_v_self);
        p->__pyx_v_self = ((struct __pyx_obj_7pyarrow_3lib_NativeFile *)Py_None); Py_INCREF(Py_None);
        Py_XDECREF(tmp);
        tmp = ((PyObject*)p->__pyx_v_write_queue);
        p->__pyx_v_write_queue = Py_None; Py_INCREF(Py_None);
        Py_XDECREF(tmp);
        return 0;
      }
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib___pyx_scope_struct_23_upload_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib___pyx_scope_struct_23_upload},
        {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyarrow_3lib___pyx_scope_struct_23_upload},
        {Py_tp_clear, (void *)__pyx_tp_clear_7pyarrow_3lib___pyx_scope_struct_23_upload},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_23_upload},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib___pyx_scope_struct_23_upload_spec = {
        "pyarrow.lib.__pyx_scope_struct_23_upload",
        sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_23_upload),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
        __pyx_type_7pyarrow_3lib___pyx_scope_struct_23_upload_slots,
      };
      #else

      static PyTypeObject __pyx_type_7pyarrow_3lib___pyx_scope_struct_23_upload = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""__pyx_scope_struct_23_upload", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_23_upload), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib___pyx_scope_struct_23_upload, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        0, /*tp_repr*/
        0, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        0, /*tp_str*/
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
        0, /*tp_doc*/
        __pyx_tp_traverse_7pyarrow_3lib___pyx_scope_struct_23_upload, /*tp_traverse*/
        __pyx_tp_clear_7pyarrow_3lib___pyx_scope_struct_23_upload, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        0, /*tp_iter*/
        0, /*tp_iternext*/
        0, /*tp_methods*/
        0, /*tp_members*/
        0, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        0, /*tp_init*/
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_23_upload, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif

      static PyObject *__pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_24_iter_batches_with_custom_metadata(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
        PyObject *o;
        #if CYTHON_USE_FREELISTS
        if (likely((int)(__pyx_mstate_global->__pyx_freecount_7pyarrow_3lib___pyx_scope_struct_24_iter_batches_with_custom_metadata > 0) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_24_iter_batches_with_custom_metadata, sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_24_iter_batches_with_custom_metadata))))
        {
          o = (PyObject*)__pyx_mstate_global->__pyx_freelist_7pyarrow_3lib___pyx_scope_struct_24_iter_batches_with_custom_metadata[--__pyx_mstate_global->__pyx_freecount_7pyarrow_3lib___pyx_scope_struct_24_iter_batches_with_custom_metadata];
          #if CYTHON_USE_TYPE_SPECS
          Py_DECREF(Py_TYPE(o));
          #endif
          memset(o, 0, sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_24_iter_batches_with_custom_metadata));
          #if CYTHON_COMPILING_IN_LIMITED_API
          (void) PyObject_Init(o, t);
          #else
          (void) PyObject_INIT(o, t);
          #endif
          PyObject_GC_Track(o);
        } else
        #endif
        {
          o = __Pyx_AllocateExtensionType(t, 1);
          if (unlikely(!o)) return 0;
        }
        return o;
      }

      static void __pyx_tp_dealloc_7pyarrow_3lib___pyx_scope_struct_24_iter_batches_with_custom_metadata(PyObject *o) {
        struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_24_iter_batches_with_custom_metadata *p = (struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_24_iter_batches_with_custom_metadata *)o;
        #if CYTHON_USE_TP_FINALIZE
        if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
          if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_7pyarrow_3lib___pyx_scope_struct_24_iter_batches_with_custom_metadata) {
            if (PyObject_CallFinalizerFromDealloc(o)) return;
          }
        }
        #endif
        PyObject_GC_UnTrack(o);
        Py_CLEAR(p->__pyx_v_self);
        Py_CLEAR(p->__pyx_t_0);
        Py_CLEAR(p->__pyx_t_1);
        Py_CLEAR(p->__pyx_t_2);
        #if CYTHON_USE_FREELISTS
        if (likely((int)(__pyx_mstate_global->__pyx_freecount_7pyarrow_3lib___pyx_scope_struct_24_iter_batches_with_custom_metadata < 8) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(Py_TYPE(o), __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_24_iter_batches_with_custom_metadata, sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_24_iter_batches_with_custom_metadata))))
        {
          __pyx_mstate_global->__pyx_freelist_7pyarrow_3lib___pyx_scope_struct_24_iter_batches_with_custom_metadata[__pyx_mstate_global->__pyx_freecount_7pyarrow_3lib___pyx_scope_struct_24_iter_batches_with_custom_metadata++] = ((struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_24_iter_batches_with_custom_metadata *)o);
        } else
        #endif
        {
          PyTypeObject *tp = Py_TYPE(o);
          #if CYTHON_USE_TYPE_SLOTS
          (*tp->tp_free)(o);
          #else
          {
            freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free);
            if (tp_free) tp_free(o);
          }
          #endif
          #if CYTHON_USE_TYPE_SPECS
          Py_DECREF(tp);
          #endif
        }
      }

      static int __pyx_tp_traverse_7pyarrow_3lib___pyx_scope_struct_24_iter_batches_with_custom_metadata(PyObject *o, visitproc v, void *a) {
        int e;
        struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_24_iter_batches_with_custom_metadata *p = (struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_24_iter_batches_with_custom_metadata *)o;
        {
          e = __Pyx_call_type_traverse(o, 1, v, a);
          if (e) return e;
        }
        if (p->__pyx_v_self) {
          e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
        }
        if (p->__pyx_t_0) {
          e = (*v)(p->__pyx_t_0, a); if (e) return e;
        }
        if (p->__pyx_t_1) {
          e = (*v)(p->__pyx_t_1, a); if (e) return e;
        }
        if (p->__pyx_t_2) {
          e = (*v)(p->__pyx_t_2, a); if (e) return e;
        }
        return 0;
      }
      #if CYTHON_USE_TYPE_SPECS
      static PyType_Slot __pyx_type_7pyarrow_3lib___pyx_scope_struct_24_iter_batches_with_custom_metadata_slots[] = {
        {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7pyarrow_3lib___pyx_scope_struct_24_iter_batches_with_custom_metadata},
        {Py_tp_traverse, (void *)__pyx_tp_traverse_7pyarrow_3lib___pyx_scope_struct_24_iter_batches_with_custom_metadata},
        {Py_tp_new, (void *)__pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_24_iter_batches_with_custom_metadata},
        {0, 0},
      };
      static PyType_Spec __pyx_type_7pyarrow_3lib___pyx_scope_struct_24_iter_batches_with_custom_metadata_spec = {
        "pyarrow.lib.__pyx_scope_struct_24_iter_batches_with_custom_metadata",
        sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_24_iter_batches_with_custom_metadata),
        0,
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
        __pyx_type_7pyarrow_3lib___pyx_scope_struct_24_iter_batches_with_custom_metadata_slots,
      };
      #else

      static PyTypeObject __pyx_type_7pyarrow_3lib___pyx_scope_struct_24_iter_batches_with_custom_metadata = {
        PyVarObject_HEAD_INIT(0, 0)
        "pyarrow.lib.""__pyx_scope_struct_24_iter_batches_with_custom_metadata", /*tp_name*/
        sizeof(struct __pyx_obj_7pyarrow_3lib___pyx_scope_struct_24_iter_batches_with_custom_metadata), /*tp_basicsize*/
        0, /*tp_itemsize*/
        __pyx_tp_dealloc_7pyarrow_3lib___pyx_scope_struct_24_iter_batches_with_custom_metadata, /*tp_dealloc*/
        0, /*tp_vectorcall_offset*/
        0, /*tp_getattr*/
        0, /*tp_setattr*/
        0, /*tp_as_async*/
        0, /*tp_repr*/
        0, /*tp_as_number*/
        0, /*tp_as_sequence*/
        0, /*tp_as_mapping*/
        0, /*tp_hash*/
        0, /*tp_call*/
        0, /*tp_str*/
        0, /*tp_getattro*/
        0, /*tp_setattro*/
        0, /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
        0, /*tp_doc*/
        __pyx_tp_traverse_7pyarrow_3lib___pyx_scope_struct_24_iter_batches_with_custom_metadata, /*tp_traverse*/
        0, /*tp_clear*/
        0, /*tp_richcompare*/
        0, /*tp_weaklistoffset*/
        0, /*tp_iter*/
        0, /*tp_iternext*/
        0, /*tp_methods*/
        0, /*tp_members*/
        0, /*tp_getset*/
        0, /*tp_base*/
        0, /*tp_dict*/
        0, /*tp_descr_get*/
        0, /*tp_descr_set*/
        #if !CYTHON_USE_TYPE_SPECS
        0, /*tp_dictoffset*/
        #endif
        0, /*tp_init*/
        0, /*tp_alloc*/
        __pyx_tp_new_7pyarrow_3lib___pyx_scope_struct_24_iter_batches_with_custom_metadata, /*tp_new*/
        0, /*tp_free*/
        0, /*tp_is_gc*/
        0, /*tp_bases*/
        0, /*tp_mro*/
        0, /*tp_cache*/
        0, /*tp_subclasses*/
        0, /*tp_weaklist*/
        0, /*tp_del*/
        0, /*tp_version_tag*/
        #if CYTHON_USE_TP_FINALIZE
        0, /*tp_finalize*/
        #else
        NULL, /*tp_finalize*/
        #endif
        #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
        0, /*tp_vectorcall*/
        #endif
        #if __PYX_NEED_TP_PRINT_SLOT == 1
        0, /*tp_print*/
        #endif
        #if PY_VERSION_HEX >= 0x030C0000
        0, /*tp_watched*/
        #endif
        #if PY_VERSION_HEX >= 0x030d00A4
        0, /*tp_versions_used*/
        #endif
        #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
        0, /*tp_pypy_flags*/
        #endif
      };
      #endif

      static PyMethodDef __pyx_methods[] = {
        {0, 0, 0, 0}
      };
/* #### Code section: initfunc_declarations ### */
static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate); /*proto*/
/* #### Code section: init_module ### */

static int __Pyx_modinit_global_init_code(__pyx_mstatetype *__pyx_mstate) {
  __Pyx_RefNannyDeclarations
  CYTHON_UNUSED_VAR(__pyx_mstate);
  __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);
  /*--- Global init code ---*/
  __pyx_v_7pyarrow_3lib_pandas_api = ((struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *)Py_None); Py_INCREF(Py_None);
  __pyx_v_7pyarrow_3lib__default_memory_pool = ((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)Py_None); Py_INCREF(Py_None);
  __pyx_v_7pyarrow_3lib__logging_memory_pool = ((struct __pyx_obj_7pyarrow_3lib_LoggingMemoryPool *)Py_None); Py_INCREF(Py_None);
  __pyx_v_7pyarrow_3lib__pandas_type_map = ((PyObject*)Py_None); Py_INCREF(Py_None);
  __pyx_v_7pyarrow_3lib__pep3118_type_map = ((PyObject*)Py_None); Py_INCREF(Py_None);
  __pyx_v_7pyarrow_3lib__type_cache = ((PyObject*)Py_None); Py_INCREF(Py_None);
  __pyx_v_7pyarrow_3lib_PRIMITIVE_TYPES = ((PyObject*)Py_None); Py_INCREF(Py_None);
  __pyx_v_7pyarrow_3lib__timestamp_type_cache = ((PyObject*)Py_None); Py_INCREF(Py_None);
  __pyx_v_7pyarrow_3lib__time_type_cache = ((PyObject*)Py_None); Py_INCREF(Py_None);
  __pyx_v_7pyarrow_3lib__duration_type_cache = ((PyObject*)Py_None); Py_INCREF(Py_None);
  __pyx_v_7pyarrow_3lib__type_aliases = ((PyObject*)Py_None); Py_INCREF(Py_None);
  __pyx_v_7pyarrow_3lib__scalar_classes = ((PyObject*)Py_None); Py_INCREF(Py_None);
  __pyx_v_7pyarrow_3lib__array_classes = ((PyObject*)Py_None); Py_INCREF(Py_None);
  __Pyx_EnumBase = Py_None; Py_INCREF(Py_None);
  __Pyx_FlagBase = Py_None; Py_INCREF(Py_None);
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_variable_export_code(__pyx_mstatetype *__pyx_mstate) {
  __Pyx_RefNannyDeclarations
  CYTHON_UNUSED_VAR(__pyx_mstate);
  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0);
  /*--- Variable export code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_function_export_code(__pyx_mstatetype *__pyx_mstate) {
  __Pyx_RefNannyDeclarations
  CYTHON_UNUSED_VAR(__pyx_mstate);
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);
  /*--- Function export code ---*/
  {
    __pyx_t_1 = __Pyx_ApiExport_GetApiDict(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    const char * __pyx_export_signature = __Pyx_PyBytes_AsString(__pyx_mstate_global->__pyx_kp_b_arrow_Field_MergeOptions_PyObje);
    #if !CYTHON_ASSUME_SAFE_MACROS
    if (unlikely(!__pyx_export_signature)) __PYX_ERR(0, 1, __pyx_L1_error)
    #endif
    const char * __pyx_export_name = __pyx_export_signature + 2958;
    void (*const __pyx_export_pointers[])(void) = {(void (*)(void))&__pyx_f_7pyarrow_3lib__parse_field_merge_options, (void (*)(void))&__pyx_f_7pyarrow_3lib_maybe_unbox_memory_pool, (void (*)(void))&__pyx_f_7pyarrow_3lib_wrap_datum, (void (*)(void))&__pyx_f_7pyarrow_3lib_box_memory_pool, (void (*)(void))&__pyx_f_7pyarrow_3lib__wrap_read_stats, (void (*)(void))&__pyx_f_7pyarrow_3lib_wrap_array_output, (void (*)(void))&__pyx_f_7pyarrow_3lib_get_input_stream, (void (*)(void))&__pyx_f_7pyarrow_3lib_get_reader, (void (*)(void))&__pyx_f_7pyarrow_3lib_get_writer, (void (*)(void))&__pyx_f_7pyarrow_3lib_convert_status, (void (*)(void))&__pyx_f_7pyarrow_3lib_pyarrow_internal_convert_status, (void (*)(void))&__pyx_f_7pyarrow_3lib_timeunit_to_string, (void (*)(void))&pyarrow_wrap_array, (void (*)(void))&pyarrow_wrap_buffer, (void (*)(void))&pyarrow_wrap_chunked_array, (void (*)(void))&pyarrow_wrap_data_type, (void (*)(void))&pyarrow_wrap_field, (void (*)(void))&__pyx_f_7pyarrow_3lib_pyarrow_wrap_metadata, (void (*)(void))&pyarrow_wrap_batch, (void (*)(void))&pyarrow_wrap_resizable_buffer, (void (*)(void))&pyarrow_wrap_scalar, (void (*)(void))&pyarrow_wrap_schema, (void (*)(void))&pyarrow_wrap_sparse_coo_tensor, (void (*)(void))&pyarrow_wrap_sparse_csc_matrix, (void (*)(void))&pyarrow_wrap_sparse_csf_tensor, (void (*)(void))&pyarrow_wrap_sparse_csr_matrix, (void (*)(void))&pyarrow_wrap_table, (void (*)(void))&pyarrow_wrap_tensor, (void (*)(void))&__pyx_f_7pyarrow_3lib_string_to_timeunit, (void (*)(void))&__pyx_f_7pyarrow_3lib_pyarrow_is_array, (void (*)(void))&__pyx_f_7pyarrow_3lib_pyarrow_is_batch, (void (*)(void))&__pyx_f_7pyarrow_3lib_pyarrow_is_buffer, (void (*)(void))&__pyx_f_7pyarrow_3lib_pyarrow_is_chunked_array, (void (*)(void))&__pyx_f_7pyarrow_3lib_pyarrow_is_data_type, (void (*)(void))&__pyx_f_7pyarrow_3lib_pyarrow_is_field, (void (*)(void))&__pyx_f_7pyarrow_3lib_pyarrow_is_metadata, (void (*)(void))&__pyx_f_7pyarrow_3lib_pyarrow_is_scalar, (void (*)(void))&__pyx_f_7pyarrow_3lib_pyarrow_is_schema, (void (*)(void))&__pyx_f_7pyarrow_3lib_pyarrow_is_sparse_coo_tensor, (void (*)(void))&__pyx_f_7pyarrow_3lib_pyarrow_is_sparse_csc_matrix, (void (*)(void))&__pyx_f_7pyarrow_3lib_pyarrow_is_sparse_csf_tensor, (void (*)(void))&__pyx_f_7pyarrow_3lib_pyarrow_is_sparse_csr_matrix, (void (*)(void))&__pyx_f_7pyarrow_3lib_pyarrow_is_table, (void (*)(void))&__pyx_f_7pyarrow_3lib_pyarrow_is_tensor, (void (*)(void))&__pyx_f_7pyarrow_3lib_check_status, (void (*)(void))&__pyx_f_7pyarrow_3lib_pyarrow_internal_check_status, (void (*)(void))&pyarrow_unwrap_array, (void (*)(void))&pyarrow_unwrap_buffer, (void (*)(void))&pyarrow_unwrap_chunked_array, (void (*)(void))&pyarrow_unwrap_data_type, (void (*)(void))&pyarrow_unwrap_field, (void (*)(void))&__pyx_f_7pyarrow_3lib_pyarrow_unwrap_metadata, (void (*)(void))&pyarrow_unwrap_batch, (void (*)(void))&pyarrow_unwrap_scalar, (void (*)(void))&pyarrow_unwrap_schema, (void (*)(void))&pyarrow_unwrap_sparse_coo_tensor, (void (*)(void))&pyarrow_unwrap_sparse_csc_matrix, (void (*)(void))&pyarrow_unwrap_sparse_csf_tensor, (void (*)(void))&pyarrow_unwrap_sparse_csr_matrix, (void (*)(void))&pyarrow_unwrap_table, (void (*)(void))&pyarrow_unwrap_tensor, (void (*)(void))&__pyx_f_7pyarrow_3lib_native_transcoding_input_stream, (void (*)(void))&__pyx_f_7pyarrow_3lib_make_streamwrap_func, (void (*)(void))&__pyx_f_7pyarrow_3lib_ensure_type, (void (*)(void))&__pyx_f_7pyarrow_3lib_primitive_type, (void (*)(void))&__pyx_f_7pyarrow_3lib_wrap_ipc_read_options, (void (*)(void))&__pyx_f_7pyarrow_3lib_wrap_ipc_write_options, (void (*)(void))&__pyx_f_7pyarrow_3lib_get_native_file, (void (*)(void)) NULL};
    void (*const *__pyx_export_pointer)(void) = __pyx_export_pointers;
    const char *__pyx_export_current_signature = __pyx_export_signature;
    while (*__pyx_export_pointer) {
      if (__Pyx_ExportFunction(__pyx_t_1, __pyx_export_name, *__pyx_export_pointer, __pyx_export_current_signature) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
      ++__pyx_export_pointer;
      __pyx_export_name = strchr(__pyx_export_name, '\0') + 1;
      __pyx_export_signature = strchr(__pyx_export_signature, '\0') + 1;
      if (*__pyx_export_signature != '\0') __pyx_export_current_signature = __pyx_export_signature;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate) {
  __Pyx_RefNannyDeclarations
  CYTHON_UNUSED_VAR(__pyx_mstate);
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
  /*--- Type init code ---*/
  #if CYTHON_USE_TYPE_SPECS
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib__Weakrefable = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib__Weakrefable_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib__Weakrefable)) __PYX_ERR(15, 37, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib__Weakrefable_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib__Weakrefable) < (0)) __PYX_ERR(15, 37, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib__Weakrefable = &__pyx_type_7pyarrow_3lib__Weakrefable;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib__Weakrefable) < (0)) __PYX_ERR(15, 37, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib__Weakrefable);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib__Weakrefable->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib__Weakrefable->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib__Weakrefable->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_Weakrefable, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib__Weakrefable) < (0)) __PYX_ERR(15, 37, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib__Weakrefable->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib__Weakrefable->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib__Weakrefable, __weakref__);
  #endif
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Weakrefable); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 229, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_IpcWriteOptions = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_IpcWriteOptions_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_IpcWriteOptions)) __PYX_ERR(19, 229, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_IpcWriteOptions_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_IpcWriteOptions) < (0)) __PYX_ERR(19, 229, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_IpcWriteOptions = &__pyx_type_7pyarrow_3lib_IpcWriteOptions;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_IpcWriteOptions->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Weakrefable;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_IpcWriteOptions) < (0)) __PYX_ERR(19, 229, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_IpcWriteOptions);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_IpcWriteOptions->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_IpcWriteOptions->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_IpcWriteOptions->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_IpcWriteOptions, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_IpcWriteOptions) < (0)) __PYX_ERR(19, 229, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_IpcWriteOptions->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_IpcWriteOptions->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_IpcWriteOptions, __pyx_base.__weakref__);
  #endif
  if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_IpcWriteOptions) < (0)) __PYX_ERR(19, 229, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Weakrefable); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 134, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_IpcReadOptions = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_IpcReadOptions_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_IpcReadOptions)) __PYX_ERR(19, 134, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_IpcReadOptions_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_IpcReadOptions) < (0)) __PYX_ERR(19, 134, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_IpcReadOptions = &__pyx_type_7pyarrow_3lib_IpcReadOptions;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_IpcReadOptions->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Weakrefable;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_IpcReadOptions) < (0)) __PYX_ERR(19, 134, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_IpcReadOptions);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_IpcReadOptions->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_IpcReadOptions->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_IpcReadOptions->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_IpcReadOptions, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_IpcReadOptions) < (0)) __PYX_ERR(19, 134, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_IpcReadOptions->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_IpcReadOptions->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_IpcReadOptions, __pyx_base.__weakref__);
  #endif
  if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_IpcReadOptions) < (0)) __PYX_ERR(19, 134, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Weakrefable); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 383, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Message = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_Message_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Message)) __PYX_ERR(19, 383, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_Message_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Message) < (0)) __PYX_ERR(19, 383, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Message = &__pyx_type_7pyarrow_3lib_Message;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Message->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Weakrefable;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Message) < (0)) __PYX_ERR(19, 383, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Message);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Message->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Message->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Message->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_Message, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Message) < (0)) __PYX_ERR(19, 383, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Message->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Message->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_Message, __pyx_base.__weakref__);
  #endif
  if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Message) < (0)) __PYX_ERR(19, 383, __pyx_L1_error)
  __pyx_vtabptr_7pyarrow_3lib_MemoryPool = &__pyx_vtable_7pyarrow_3lib_MemoryPool;
  __pyx_vtable_7pyarrow_3lib_MemoryPool.init = (void (*)(struct __pyx_obj_7pyarrow_3lib_MemoryPool *,  arrow::MemoryPool *))__pyx_f_7pyarrow_3lib_10MemoryPool_init;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Weakrefable); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 23, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_MemoryPool = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_MemoryPool_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_MemoryPool)) __PYX_ERR(13, 23, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_MemoryPool_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_MemoryPool) < (0)) __PYX_ERR(13, 23, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_MemoryPool = &__pyx_type_7pyarrow_3lib_MemoryPool;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_MemoryPool->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Weakrefable;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_MemoryPool) < (0)) __PYX_ERR(13, 23, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_MemoryPool);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_MemoryPool->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_MemoryPool->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_MemoryPool->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_MemoryPool, __pyx_vtabptr_7pyarrow_3lib_MemoryPool) < (0)) __PYX_ERR(13, 23, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_MemoryPool) < (0)) __PYX_ERR(13, 23, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_MemoryPool, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_MemoryPool) < (0)) __PYX_ERR(13, 23, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_MemoryPool->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_MemoryPool->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_MemoryPool, __pyx_base.__weakref__);
  #endif
  if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_MemoryPool) < (0)) __PYX_ERR(13, 23, __pyx_L1_error)
  __pyx_vtabptr_7pyarrow_3lib_DataType = &__pyx_vtable_7pyarrow_3lib_DataType;
  __pyx_vtable_7pyarrow_3lib_DataType.init = (void (*)(struct __pyx_obj_7pyarrow_3lib_DataType *, std::shared_ptr< arrow::DataType>  const &))__pyx_f_7pyarrow_3lib_8DataType_init;
  __pyx_vtable_7pyarrow_3lib_DataType.field = (struct __pyx_obj_7pyarrow_3lib_Field *(*)(struct __pyx_obj_7pyarrow_3lib_DataType *, PyObject *, int __pyx_skip_dispatch))__pyx_f_7pyarrow_3lib_8DataType_field;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Weakrefable); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 209, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_DataType = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_DataType_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_DataType)) __PYX_ERR(1, 209, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_DataType_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_DataType) < (0)) __PYX_ERR(1, 209, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_DataType = &__pyx_type_7pyarrow_3lib_DataType;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Weakrefable;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_DataType) < (0)) __PYX_ERR(1, 209, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_DataType);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_DataType->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_DataType->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_DataType->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_DataType, __pyx_vtabptr_7pyarrow_3lib_DataType) < (0)) __PYX_ERR(1, 209, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_DataType) < (0)) __PYX_ERR(1, 209, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_DataType, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_DataType) < (0)) __PYX_ERR(1, 209, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_DataType->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_DataType->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_DataType, __pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_ListType = &__pyx_vtable_7pyarrow_3lib_ListType;
  __pyx_vtable_7pyarrow_3lib_ListType.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_DataType;
  __pyx_vtable_7pyarrow_3lib_ListType.__pyx_base.init = (void (*)(struct __pyx_obj_7pyarrow_3lib_DataType *, std::shared_ptr< arrow::DataType>  const &))__pyx_f_7pyarrow_3lib_8ListType_init;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 548, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_ListType = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_ListType_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_ListType)) __PYX_ERR(1, 548, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_ListType_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_ListType) < (0)) __PYX_ERR(1, 548, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_ListType = &__pyx_type_7pyarrow_3lib_ListType;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ListType->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_ListType) < (0)) __PYX_ERR(1, 548, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_ListType);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_ListType->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_ListType->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_ListType->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_ListType, __pyx_vtabptr_7pyarrow_3lib_ListType) < (0)) __PYX_ERR(1, 548, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_ListType) < (0)) __PYX_ERR(1, 548, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_ListType, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_ListType) < (0)) __PYX_ERR(1, 548, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_ListType->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_ListType->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_ListType, __pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_LargeListType = &__pyx_vtable_7pyarrow_3lib_LargeListType;
  __pyx_vtable_7pyarrow_3lib_LargeListType.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_DataType;
  __pyx_vtable_7pyarrow_3lib_LargeListType.__pyx_base.init = (void (*)(struct __pyx_obj_7pyarrow_3lib_DataType *, std::shared_ptr< arrow::DataType>  const &))__pyx_f_7pyarrow_3lib_13LargeListType_init;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 595, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeListType = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_LargeListType_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeListType)) __PYX_ERR(1, 595, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_LargeListType_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeListType) < (0)) __PYX_ERR(1, 595, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeListType = &__pyx_type_7pyarrow_3lib_LargeListType;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_LargeListType->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeListType) < (0)) __PYX_ERR(1, 595, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeListType);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeListType->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeListType->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeListType->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeListType, __pyx_vtabptr_7pyarrow_3lib_LargeListType) < (0)) __PYX_ERR(1, 595, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeListType) < (0)) __PYX_ERR(1, 595, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_LargeListType, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeListType) < (0)) __PYX_ERR(1, 595, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeListType->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeListType->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_LargeListType, __pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_ListViewType = &__pyx_vtable_7pyarrow_3lib_ListViewType;
  __pyx_vtable_7pyarrow_3lib_ListViewType.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_DataType;
  __pyx_vtable_7pyarrow_3lib_ListViewType.__pyx_base.init = (void (*)(struct __pyx_obj_7pyarrow_3lib_DataType *, std::shared_ptr< arrow::DataType>  const &))__pyx_f_7pyarrow_3lib_12ListViewType_init;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 634, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_ListViewType = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_ListViewType_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_ListViewType)) __PYX_ERR(1, 634, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_ListViewType_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_ListViewType) < (0)) __PYX_ERR(1, 634, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_ListViewType = &__pyx_type_7pyarrow_3lib_ListViewType;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ListViewType->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_ListViewType) < (0)) __PYX_ERR(1, 634, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_ListViewType);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_ListViewType->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_ListViewType->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_ListViewType->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_ListViewType, __pyx_vtabptr_7pyarrow_3lib_ListViewType) < (0)) __PYX_ERR(1, 634, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_ListViewType) < (0)) __PYX_ERR(1, 634, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_ListViewType, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_ListViewType) < (0)) __PYX_ERR(1, 634, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_ListViewType->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_ListViewType->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_ListViewType, __pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_LargeListViewType = &__pyx_vtable_7pyarrow_3lib_LargeListViewType;
  __pyx_vtable_7pyarrow_3lib_LargeListViewType.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_DataType;
  __pyx_vtable_7pyarrow_3lib_LargeListViewType.__pyx_base.init = (void (*)(struct __pyx_obj_7pyarrow_3lib_DataType *, std::shared_ptr< arrow::DataType>  const &))__pyx_f_7pyarrow_3lib_17LargeListViewType_init;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 681, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeListViewType = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_LargeListViewType_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeListViewType)) __PYX_ERR(1, 681, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_LargeListViewType_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeListViewType) < (0)) __PYX_ERR(1, 681, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeListViewType = &__pyx_type_7pyarrow_3lib_LargeListViewType;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_LargeListViewType->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeListViewType) < (0)) __PYX_ERR(1, 681, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeListViewType);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeListViewType->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeListViewType->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeListViewType->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeListViewType, __pyx_vtabptr_7pyarrow_3lib_LargeListViewType) < (0)) __PYX_ERR(1, 681, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeListViewType) < (0)) __PYX_ERR(1, 681, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_LargeListViewType, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeListViewType) < (0)) __PYX_ERR(1, 681, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeListViewType->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeListViewType->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_LargeListViewType, __pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_MapType = &__pyx_vtable_7pyarrow_3lib_MapType;
  __pyx_vtable_7pyarrow_3lib_MapType.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_DataType;
  __pyx_vtable_7pyarrow_3lib_MapType.__pyx_base.init = (void (*)(struct __pyx_obj_7pyarrow_3lib_DataType *, std::shared_ptr< arrow::DataType>  const &))__pyx_f_7pyarrow_3lib_7MapType_init;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 729, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_MapType = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_MapType_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_MapType)) __PYX_ERR(1, 729, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_MapType_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_MapType) < (0)) __PYX_ERR(1, 729, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_MapType = &__pyx_type_7pyarrow_3lib_MapType;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_MapType->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_MapType) < (0)) __PYX_ERR(1, 729, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_MapType);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_MapType->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_MapType->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_MapType->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_MapType, __pyx_vtabptr_7pyarrow_3lib_MapType) < (0)) __PYX_ERR(1, 729, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_MapType) < (0)) __PYX_ERR(1, 729, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_MapType, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_MapType) < (0)) __PYX_ERR(1, 729, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_MapType->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_MapType->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_MapType, __pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_FixedSizeListType = &__pyx_vtable_7pyarrow_3lib_FixedSizeListType;
  __pyx_vtable_7pyarrow_3lib_FixedSizeListType.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_DataType;
  __pyx_vtable_7pyarrow_3lib_FixedSizeListType.__pyx_base.init = (void (*)(struct __pyx_obj_7pyarrow_3lib_DataType *, std::shared_ptr< arrow::DataType>  const &))__pyx_f_7pyarrow_3lib_17FixedSizeListType_init;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 817, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedSizeListType = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_FixedSizeListType_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedSizeListType)) __PYX_ERR(1, 817, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_FixedSizeListType_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedSizeListType) < (0)) __PYX_ERR(1, 817, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedSizeListType = &__pyx_type_7pyarrow_3lib_FixedSizeListType;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_FixedSizeListType->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedSizeListType) < (0)) __PYX_ERR(1, 817, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedSizeListType);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedSizeListType->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedSizeListType->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedSizeListType->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedSizeListType, __pyx_vtabptr_7pyarrow_3lib_FixedSizeListType) < (0)) __PYX_ERR(1, 817, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedSizeListType) < (0)) __PYX_ERR(1, 817, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_FixedSizeListType, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedSizeListType) < (0)) __PYX_ERR(1, 817, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedSizeListType->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedSizeListType->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_FixedSizeListType, __pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_StructType = &__pyx_vtable_7pyarrow_3lib_StructType;
  __pyx_vtable_7pyarrow_3lib_StructType.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_DataType;
  __pyx_vtable_7pyarrow_3lib_StructType.__pyx_base.init = (void (*)(struct __pyx_obj_7pyarrow_3lib_DataType *, std::shared_ptr< arrow::DataType>  const &))__pyx_f_7pyarrow_3lib_10StructType_init;
  __pyx_vtable_7pyarrow_3lib_StructType.__pyx_base.field = (struct __pyx_obj_7pyarrow_3lib_Field *(*)(struct __pyx_obj_7pyarrow_3lib_DataType *, PyObject *, int __pyx_skip_dispatch))__pyx_f_7pyarrow_3lib_10StructType_field;
  __pyx_vtable_7pyarrow_3lib_StructType.field_by_name = (struct __pyx_obj_7pyarrow_3lib_Field *(*)(struct __pyx_obj_7pyarrow_3lib_StructType *, PyObject *))__pyx_f_7pyarrow_3lib_10StructType_field_by_name;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 877, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_StructType = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_StructType_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_StructType)) __PYX_ERR(1, 877, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_StructType_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_StructType) < (0)) __PYX_ERR(1, 877, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_StructType = &__pyx_type_7pyarrow_3lib_StructType;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_StructType->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_StructType) < (0)) __PYX_ERR(1, 877, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_StructType);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_StructType->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_StructType->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_StructType->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  #if CYTHON_UPDATE_DESCRIPTOR_DOC
  {
    PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_StructType, "__len__"); if (unlikely(!wrapper)) __PYX_ERR(1, 877, __pyx_L1_error)
    if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
      __pyx_wrapperbase_7pyarrow_3lib_10StructType_6__len__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_7pyarrow_3lib_10StructType_6__len__.doc = __pyx_doc_7pyarrow_3lib_10StructType_6__len__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_7pyarrow_3lib_10StructType_6__len__;
    }
  }
  #endif
  #if CYTHON_UPDATE_DESCRIPTOR_DOC
  {
    PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_StructType, "__iter__"); if (unlikely(!wrapper)) __PYX_ERR(1, 877, __pyx_L1_error)
    if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
      __pyx_wrapperbase_7pyarrow_3lib_10StructType_8__iter__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_7pyarrow_3lib_10StructType_8__iter__.doc = __pyx_doc_7pyarrow_3lib_10StructType_8__iter__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_7pyarrow_3lib_10StructType_8__iter__;
    }
  }
  #endif
  #if CYTHON_UPDATE_DESCRIPTOR_DOC
  {
    PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_StructType, "__getitem__"); if (unlikely(!wrapper)) __PYX_ERR(1, 877, __pyx_L1_error)
    if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
      __pyx_wrapperbase_7pyarrow_3lib_10StructType_11__getitem__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_7pyarrow_3lib_10StructType_11__getitem__.doc = __pyx_doc_7pyarrow_3lib_10StructType_11__getitem__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_7pyarrow_3lib_10StructType_11__getitem__;
    }
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_StructType, __pyx_vtabptr_7pyarrow_3lib_StructType) < (0)) __PYX_ERR(1, 877, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_StructType) < (0)) __PYX_ERR(1, 877, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_StructType, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_StructType) < (0)) __PYX_ERR(1, 877, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_StructType->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_StructType->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_StructType, __pyx_base.__pyx_base.__weakref__);
  #endif
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Weakrefable); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 475, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_DictionaryMemo = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_DictionaryMemo_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_DictionaryMemo)) __PYX_ERR(1, 475, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_DictionaryMemo_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_DictionaryMemo) < (0)) __PYX_ERR(1, 475, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_DictionaryMemo = &__pyx_type_7pyarrow_3lib_DictionaryMemo;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DictionaryMemo->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Weakrefable;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_DictionaryMemo) < (0)) __PYX_ERR(1, 475, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_DictionaryMemo);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_DictionaryMemo->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_DictionaryMemo->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_DictionaryMemo->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_DictionaryMemo, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_DictionaryMemo) < (0)) __PYX_ERR(1, 475, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_DictionaryMemo->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_DictionaryMemo->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_DictionaryMemo, __pyx_base.__weakref__);
  #endif
  if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_DictionaryMemo) < (0)) __PYX_ERR(1, 475, __pyx_L1_error)
  __pyx_vtabptr_7pyarrow_3lib_DictionaryType = &__pyx_vtable_7pyarrow_3lib_DictionaryType;
  __pyx_vtable_7pyarrow_3lib_DictionaryType.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_DataType;
  __pyx_vtable_7pyarrow_3lib_DictionaryType.__pyx_base.init = (void (*)(struct __pyx_obj_7pyarrow_3lib_DataType *, std::shared_ptr< arrow::DataType>  const &))__pyx_f_7pyarrow_3lib_14DictionaryType_init;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 485, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_DictionaryType = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_DictionaryType_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_DictionaryType)) __PYX_ERR(1, 485, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_DictionaryType_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_DictionaryType) < (0)) __PYX_ERR(1, 485, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_DictionaryType = &__pyx_type_7pyarrow_3lib_DictionaryType;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DictionaryType->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_DictionaryType) < (0)) __PYX_ERR(1, 485, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_DictionaryType);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_DictionaryType->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_DictionaryType->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_DictionaryType->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_DictionaryType, __pyx_vtabptr_7pyarrow_3lib_DictionaryType) < (0)) __PYX_ERR(1, 485, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_DictionaryType) < (0)) __PYX_ERR(1, 485, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_DictionaryType, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_DictionaryType) < (0)) __PYX_ERR(1, 485, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_DictionaryType->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_DictionaryType->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_DictionaryType, __pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_TimestampType = &__pyx_vtable_7pyarrow_3lib_TimestampType;
  __pyx_vtable_7pyarrow_3lib_TimestampType.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_DataType;
  __pyx_vtable_7pyarrow_3lib_TimestampType.__pyx_base.init = (void (*)(struct __pyx_obj_7pyarrow_3lib_DataType *, std::shared_ptr< arrow::DataType>  const &))__pyx_f_7pyarrow_3lib_13TimestampType_init;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1245, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_TimestampType = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_TimestampType_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_TimestampType)) __PYX_ERR(1, 1245, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_TimestampType_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_TimestampType) < (0)) __PYX_ERR(1, 1245, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_TimestampType = &__pyx_type_7pyarrow_3lib_TimestampType;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_TimestampType->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_TimestampType) < (0)) __PYX_ERR(1, 1245, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_TimestampType);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_TimestampType->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_TimestampType->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_TimestampType->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_TimestampType, __pyx_vtabptr_7pyarrow_3lib_TimestampType) < (0)) __PYX_ERR(1, 1245, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_TimestampType) < (0)) __PYX_ERR(1, 1245, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_TimestampType, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_TimestampType) < (0)) __PYX_ERR(1, 1245, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_TimestampType->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_TimestampType->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_TimestampType, __pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_Time32Type = &__pyx_vtable_7pyarrow_3lib_Time32Type;
  __pyx_vtable_7pyarrow_3lib_Time32Type.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_DataType;
  __pyx_vtable_7pyarrow_3lib_Time32Type.__pyx_base.init = (void (*)(struct __pyx_obj_7pyarrow_3lib_DataType *, std::shared_ptr< arrow::DataType>  const &))__pyx_f_7pyarrow_3lib_10Time32Type_init;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1303, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Time32Type = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_Time32Type_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Time32Type)) __PYX_ERR(1, 1303, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_Time32Type_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Time32Type) < (0)) __PYX_ERR(1, 1303, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Time32Type = &__pyx_type_7pyarrow_3lib_Time32Type;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Time32Type->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Time32Type) < (0)) __PYX_ERR(1, 1303, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Time32Type);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Time32Type->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Time32Type->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Time32Type->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Time32Type, __pyx_vtabptr_7pyarrow_3lib_Time32Type) < (0)) __PYX_ERR(1, 1303, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Time32Type) < (0)) __PYX_ERR(1, 1303, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_Time32Type, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Time32Type) < (0)) __PYX_ERR(1, 1303, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Time32Type->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Time32Type->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_Time32Type, __pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_Time64Type = &__pyx_vtable_7pyarrow_3lib_Time64Type;
  __pyx_vtable_7pyarrow_3lib_Time64Type.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_DataType;
  __pyx_vtable_7pyarrow_3lib_Time64Type.__pyx_base.init = (void (*)(struct __pyx_obj_7pyarrow_3lib_DataType *, std::shared_ptr< arrow::DataType>  const &))__pyx_f_7pyarrow_3lib_10Time64Type_init;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1338, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Time64Type = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_Time64Type_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Time64Type)) __PYX_ERR(1, 1338, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_Time64Type_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Time64Type) < (0)) __PYX_ERR(1, 1338, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Time64Type = &__pyx_type_7pyarrow_3lib_Time64Type;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Time64Type->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Time64Type) < (0)) __PYX_ERR(1, 1338, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Time64Type);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Time64Type->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Time64Type->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Time64Type->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Time64Type, __pyx_vtabptr_7pyarrow_3lib_Time64Type) < (0)) __PYX_ERR(1, 1338, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Time64Type) < (0)) __PYX_ERR(1, 1338, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_Time64Type, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Time64Type) < (0)) __PYX_ERR(1, 1338, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Time64Type->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Time64Type->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_Time64Type, __pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_DurationType = &__pyx_vtable_7pyarrow_3lib_DurationType;
  __pyx_vtable_7pyarrow_3lib_DurationType.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_DataType;
  __pyx_vtable_7pyarrow_3lib_DurationType.__pyx_base.init = (void (*)(struct __pyx_obj_7pyarrow_3lib_DataType *, std::shared_ptr< arrow::DataType>  const &))__pyx_f_7pyarrow_3lib_12DurationType_init;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1373, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_DurationType = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_DurationType_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_DurationType)) __PYX_ERR(1, 1373, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_DurationType_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_DurationType) < (0)) __PYX_ERR(1, 1373, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_DurationType = &__pyx_type_7pyarrow_3lib_DurationType;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DurationType->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_DurationType) < (0)) __PYX_ERR(1, 1373, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_DurationType);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_DurationType->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_DurationType->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_DurationType->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_DurationType, __pyx_vtabptr_7pyarrow_3lib_DurationType) < (0)) __PYX_ERR(1, 1373, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_DurationType) < (0)) __PYX_ERR(1, 1373, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_DurationType, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_DurationType) < (0)) __PYX_ERR(1, 1373, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_DurationType->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_DurationType->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_DurationType, __pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_FixedSizeBinaryType = &__pyx_vtable_7pyarrow_3lib_FixedSizeBinaryType;
  __pyx_vtable_7pyarrow_3lib_FixedSizeBinaryType.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_DataType;
  __pyx_vtable_7pyarrow_3lib_FixedSizeBinaryType.__pyx_base.init = (void (*)(struct __pyx_obj_7pyarrow_3lib_DataType *, std::shared_ptr< arrow::DataType>  const &))__pyx_f_7pyarrow_3lib_19FixedSizeBinaryType_init;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1405, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedSizeBinaryType = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_FixedSizeBinaryType_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedSizeBinaryType)) __PYX_ERR(1, 1405, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_FixedSizeBinaryType_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedSizeBinaryType) < (0)) __PYX_ERR(1, 1405, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedSizeBinaryType = &__pyx_type_7pyarrow_3lib_FixedSizeBinaryType;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_FixedSizeBinaryType->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedSizeBinaryType) < (0)) __PYX_ERR(1, 1405, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedSizeBinaryType);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedSizeBinaryType->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedSizeBinaryType->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedSizeBinaryType->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedSizeBinaryType, __pyx_vtabptr_7pyarrow_3lib_FixedSizeBinaryType) < (0)) __PYX_ERR(1, 1405, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedSizeBinaryType) < (0)) __PYX_ERR(1, 1405, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_FixedSizeBinaryType, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedSizeBinaryType) < (0)) __PYX_ERR(1, 1405, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedSizeBinaryType->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedSizeBinaryType->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_FixedSizeBinaryType, __pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_Decimal32Type = &__pyx_vtable_7pyarrow_3lib_Decimal32Type;
  __pyx_vtable_7pyarrow_3lib_Decimal32Type.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_FixedSizeBinaryType;
  __pyx_vtable_7pyarrow_3lib_Decimal32Type.__pyx_base.__pyx_base.init = (void (*)(struct __pyx_obj_7pyarrow_3lib_DataType *, std::shared_ptr< arrow::DataType>  const &))__pyx_f_7pyarrow_3lib_13Decimal32Type_init;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_FixedSizeBinaryType); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1427, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal32Type = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_Decimal32Type_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal32Type)) __PYX_ERR(1, 1427, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_Decimal32Type_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal32Type) < (0)) __PYX_ERR(1, 1427, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal32Type = &__pyx_type_7pyarrow_3lib_Decimal32Type;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Decimal32Type->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_FixedSizeBinaryType;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal32Type) < (0)) __PYX_ERR(1, 1427, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal32Type);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal32Type->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal32Type->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal32Type->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal32Type, __pyx_vtabptr_7pyarrow_3lib_Decimal32Type) < (0)) __PYX_ERR(1, 1427, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal32Type) < (0)) __PYX_ERR(1, 1427, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_Decimal32Type, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal32Type) < (0)) __PYX_ERR(1, 1427, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal32Type->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal32Type->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_Decimal32Type, __pyx_base.__pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_Decimal64Type = &__pyx_vtable_7pyarrow_3lib_Decimal64Type;
  __pyx_vtable_7pyarrow_3lib_Decimal64Type.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_FixedSizeBinaryType;
  __pyx_vtable_7pyarrow_3lib_Decimal64Type.__pyx_base.__pyx_base.init = (void (*)(struct __pyx_obj_7pyarrow_3lib_DataType *, std::shared_ptr< arrow::DataType>  const &))__pyx_f_7pyarrow_3lib_13Decimal64Type_init;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_FixedSizeBinaryType); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1476, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal64Type = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_Decimal64Type_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal64Type)) __PYX_ERR(1, 1476, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_Decimal64Type_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal64Type) < (0)) __PYX_ERR(1, 1476, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal64Type = &__pyx_type_7pyarrow_3lib_Decimal64Type;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Decimal64Type->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_FixedSizeBinaryType;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal64Type) < (0)) __PYX_ERR(1, 1476, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal64Type);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal64Type->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal64Type->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal64Type->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal64Type, __pyx_vtabptr_7pyarrow_3lib_Decimal64Type) < (0)) __PYX_ERR(1, 1476, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal64Type) < (0)) __PYX_ERR(1, 1476, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_Decimal64Type, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal64Type) < (0)) __PYX_ERR(1, 1476, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal64Type->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal64Type->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_Decimal64Type, __pyx_base.__pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_Decimal128Type = &__pyx_vtable_7pyarrow_3lib_Decimal128Type;
  __pyx_vtable_7pyarrow_3lib_Decimal128Type.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_FixedSizeBinaryType;
  __pyx_vtable_7pyarrow_3lib_Decimal128Type.__pyx_base.__pyx_base.init = (void (*)(struct __pyx_obj_7pyarrow_3lib_DataType *, std::shared_ptr< arrow::DataType>  const &))__pyx_f_7pyarrow_3lib_14Decimal128Type_init;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_FixedSizeBinaryType); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1525, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal128Type = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_Decimal128Type_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal128Type)) __PYX_ERR(1, 1525, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_Decimal128Type_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal128Type) < (0)) __PYX_ERR(1, 1525, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal128Type = &__pyx_type_7pyarrow_3lib_Decimal128Type;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Decimal128Type->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_FixedSizeBinaryType;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal128Type) < (0)) __PYX_ERR(1, 1525, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal128Type);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal128Type->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal128Type->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal128Type->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal128Type, __pyx_vtabptr_7pyarrow_3lib_Decimal128Type) < (0)) __PYX_ERR(1, 1525, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal128Type) < (0)) __PYX_ERR(1, 1525, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_Decimal128Type, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal128Type) < (0)) __PYX_ERR(1, 1525, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal128Type->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal128Type->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_Decimal128Type, __pyx_base.__pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_Decimal256Type = &__pyx_vtable_7pyarrow_3lib_Decimal256Type;
  __pyx_vtable_7pyarrow_3lib_Decimal256Type.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_FixedSizeBinaryType;
  __pyx_vtable_7pyarrow_3lib_Decimal256Type.__pyx_base.__pyx_base.init = (void (*)(struct __pyx_obj_7pyarrow_3lib_DataType *, std::shared_ptr< arrow::DataType>  const &))__pyx_f_7pyarrow_3lib_14Decimal256Type_init;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_FixedSizeBinaryType); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1574, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal256Type = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_Decimal256Type_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal256Type)) __PYX_ERR(1, 1574, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_Decimal256Type_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal256Type) < (0)) __PYX_ERR(1, 1574, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal256Type = &__pyx_type_7pyarrow_3lib_Decimal256Type;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Decimal256Type->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_FixedSizeBinaryType;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal256Type) < (0)) __PYX_ERR(1, 1574, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal256Type);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal256Type->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal256Type->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal256Type->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal256Type, __pyx_vtabptr_7pyarrow_3lib_Decimal256Type) < (0)) __PYX_ERR(1, 1574, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal256Type) < (0)) __PYX_ERR(1, 1574, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_Decimal256Type, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal256Type) < (0)) __PYX_ERR(1, 1574, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal256Type->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal256Type->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_Decimal256Type, __pyx_base.__pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_RunEndEncodedType = &__pyx_vtable_7pyarrow_3lib_RunEndEncodedType;
  __pyx_vtable_7pyarrow_3lib_RunEndEncodedType.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_DataType;
  __pyx_vtable_7pyarrow_3lib_RunEndEncodedType.__pyx_base.init = (void (*)(struct __pyx_obj_7pyarrow_3lib_DataType *, std::shared_ptr< arrow::DataType>  const &))__pyx_f_7pyarrow_3lib_17RunEndEncodedType_init;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1623, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_RunEndEncodedType = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_RunEndEncodedType_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_RunEndEncodedType)) __PYX_ERR(1, 1623, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_RunEndEncodedType_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_RunEndEncodedType) < (0)) __PYX_ERR(1, 1623, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_RunEndEncodedType = &__pyx_type_7pyarrow_3lib_RunEndEncodedType;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RunEndEncodedType->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_RunEndEncodedType) < (0)) __PYX_ERR(1, 1623, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_RunEndEncodedType);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_RunEndEncodedType->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_RunEndEncodedType->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_RunEndEncodedType->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_RunEndEncodedType, __pyx_vtabptr_7pyarrow_3lib_RunEndEncodedType) < (0)) __PYX_ERR(1, 1623, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_RunEndEncodedType) < (0)) __PYX_ERR(1, 1623, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_RunEndEncodedType, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_RunEndEncodedType) < (0)) __PYX_ERR(1, 1623, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_RunEndEncodedType->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_RunEndEncodedType->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_RunEndEncodedType, __pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_BaseExtensionType = &__pyx_vtable_7pyarrow_3lib_BaseExtensionType;
  __pyx_vtable_7pyarrow_3lib_BaseExtensionType.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_DataType;
  __pyx_vtable_7pyarrow_3lib_BaseExtensionType.__pyx_base.init = (void (*)(struct __pyx_obj_7pyarrow_3lib_DataType *, std::shared_ptr< arrow::DataType>  const &))__pyx_f_7pyarrow_3lib_17BaseExtensionType_init;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1644, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_BaseExtensionType = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_BaseExtensionType_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_BaseExtensionType)) __PYX_ERR(1, 1644, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_BaseExtensionType_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_BaseExtensionType) < (0)) __PYX_ERR(1, 1644, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_BaseExtensionType = &__pyx_type_7pyarrow_3lib_BaseExtensionType;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_BaseExtensionType->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_BaseExtensionType) < (0)) __PYX_ERR(1, 1644, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_BaseExtensionType);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_BaseExtensionType->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_BaseExtensionType->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_BaseExtensionType->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_BaseExtensionType, __pyx_vtabptr_7pyarrow_3lib_BaseExtensionType) < (0)) __PYX_ERR(1, 1644, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_BaseExtensionType) < (0)) __PYX_ERR(1, 1644, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_BaseExtensionType, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_BaseExtensionType) < (0)) __PYX_ERR(1, 1644, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_BaseExtensionType->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_BaseExtensionType->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_BaseExtensionType, __pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_ExtensionType = &__pyx_vtable_7pyarrow_3lib_ExtensionType;
  __pyx_vtable_7pyarrow_3lib_ExtensionType.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_BaseExtensionType;
  __pyx_vtable_7pyarrow_3lib_ExtensionType.__pyx_base.__pyx_base.init = (void (*)(struct __pyx_obj_7pyarrow_3lib_DataType *, std::shared_ptr< arrow::DataType>  const &))__pyx_f_7pyarrow_3lib_13ExtensionType_init;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_BaseExtensionType); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1737, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_ExtensionType = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_ExtensionType_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_ExtensionType)) __PYX_ERR(1, 1737, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_ExtensionType_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_ExtensionType) < (0)) __PYX_ERR(1, 1737, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_ExtensionType = &__pyx_type_7pyarrow_3lib_ExtensionType;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ExtensionType->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_BaseExtensionType;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_ExtensionType) < (0)) __PYX_ERR(1, 1737, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_ExtensionType);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_ExtensionType->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_ExtensionType->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_ExtensionType->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  #if CYTHON_UPDATE_DESCRIPTOR_DOC
  {
    PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_ExtensionType, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(1, 1737, __pyx_L1_error)
    if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
      __pyx_wrapperbase_7pyarrow_3lib_13ExtensionType_2__init__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_7pyarrow_3lib_13ExtensionType_2__init__.doc = __pyx_doc_7pyarrow_3lib_13ExtensionType_2__init__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_7pyarrow_3lib_13ExtensionType_2__init__;
    }
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_ExtensionType, __pyx_vtabptr_7pyarrow_3lib_ExtensionType) < (0)) __PYX_ERR(1, 1737, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_ExtensionType) < (0)) __PYX_ERR(1, 1737, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_ExtensionType, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_ExtensionType) < (0)) __PYX_ERR(1, 1737, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_ExtensionType->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_ExtensionType->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_ExtensionType, __pyx_base.__pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_FixedShapeTensorType = &__pyx_vtable_7pyarrow_3lib_FixedShapeTensorType;
  __pyx_vtable_7pyarrow_3lib_FixedShapeTensorType.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_BaseExtensionType;
  __pyx_vtable_7pyarrow_3lib_FixedShapeTensorType.__pyx_base.__pyx_base.init = (void (*)(struct __pyx_obj_7pyarrow_3lib_DataType *, std::shared_ptr< arrow::DataType>  const &))__pyx_f_7pyarrow_3lib_20FixedShapeTensorType_init;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_BaseExtensionType); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1991, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedShapeTensorType = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_FixedShapeTensorType_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedShapeTensorType)) __PYX_ERR(1, 1991, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_FixedShapeTensorType_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedShapeTensorType) < (0)) __PYX_ERR(1, 1991, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedShapeTensorType = &__pyx_type_7pyarrow_3lib_FixedShapeTensorType;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_FixedShapeTensorType->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_BaseExtensionType;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedShapeTensorType) < (0)) __PYX_ERR(1, 1991, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedShapeTensorType);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedShapeTensorType->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedShapeTensorType->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedShapeTensorType->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedShapeTensorType, __pyx_vtabptr_7pyarrow_3lib_FixedShapeTensorType) < (0)) __PYX_ERR(1, 1991, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedShapeTensorType) < (0)) __PYX_ERR(1, 1991, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_FixedShapeTensorType, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedShapeTensorType) < (0)) __PYX_ERR(1, 1991, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedShapeTensorType->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedShapeTensorType->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_FixedShapeTensorType, __pyx_base.__pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_Bool8Type = &__pyx_vtable_7pyarrow_3lib_Bool8Type;
  __pyx_vtable_7pyarrow_3lib_Bool8Type.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_BaseExtensionType;
  __pyx_vtable_7pyarrow_3lib_Bool8Type.__pyx_base.__pyx_base.init = (void (*)(struct __pyx_obj_7pyarrow_3lib_DataType *, std::shared_ptr< arrow::DataType>  const &))__pyx_f_7pyarrow_3lib_9Bool8Type_init;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_BaseExtensionType); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2063, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Bool8Type = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_Bool8Type_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Bool8Type)) __PYX_ERR(1, 2063, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_Bool8Type_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Bool8Type) < (0)) __PYX_ERR(1, 2063, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Bool8Type = &__pyx_type_7pyarrow_3lib_Bool8Type;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Bool8Type->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_BaseExtensionType;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Bool8Type) < (0)) __PYX_ERR(1, 2063, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Bool8Type);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Bool8Type->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Bool8Type->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Bool8Type->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Bool8Type, __pyx_vtabptr_7pyarrow_3lib_Bool8Type) < (0)) __PYX_ERR(1, 2063, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Bool8Type) < (0)) __PYX_ERR(1, 2063, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_Bool8Type, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Bool8Type) < (0)) __PYX_ERR(1, 2063, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Bool8Type->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Bool8Type->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_Bool8Type, __pyx_base.__pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_OpaqueType = &__pyx_vtable_7pyarrow_3lib_OpaqueType;
  __pyx_vtable_7pyarrow_3lib_OpaqueType.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_BaseExtensionType;
  __pyx_vtable_7pyarrow_3lib_OpaqueType.__pyx_base.__pyx_base.init = (void (*)(struct __pyx_obj_7pyarrow_3lib_DataType *, std::shared_ptr< arrow::DataType>  const &))__pyx_f_7pyarrow_3lib_10OpaqueType_init;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_BaseExtensionType); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2094, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_OpaqueType = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_OpaqueType_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_OpaqueType)) __PYX_ERR(1, 2094, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_OpaqueType_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_OpaqueType) < (0)) __PYX_ERR(1, 2094, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_OpaqueType = &__pyx_type_7pyarrow_3lib_OpaqueType;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_OpaqueType->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_BaseExtensionType;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_OpaqueType) < (0)) __PYX_ERR(1, 2094, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_OpaqueType);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_OpaqueType->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_OpaqueType->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_OpaqueType->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_OpaqueType, __pyx_vtabptr_7pyarrow_3lib_OpaqueType) < (0)) __PYX_ERR(1, 2094, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_OpaqueType) < (0)) __PYX_ERR(1, 2094, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_OpaqueType, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_OpaqueType) < (0)) __PYX_ERR(1, 2094, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_OpaqueType->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_OpaqueType->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_OpaqueType, __pyx_base.__pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_UuidType = &__pyx_vtable_7pyarrow_3lib_UuidType;
  __pyx_vtable_7pyarrow_3lib_UuidType.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_BaseExtensionType;
  __pyx_vtable_7pyarrow_3lib_UuidType.__pyx_base.__pyx_base.init = (void (*)(struct __pyx_obj_7pyarrow_3lib_DataType *, std::shared_ptr< arrow::DataType>  const &))__pyx_f_7pyarrow_3lib_8UuidType_init;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_BaseExtensionType); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1972, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_UuidType = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_UuidType_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_UuidType)) __PYX_ERR(1, 1972, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_UuidType_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_UuidType) < (0)) __PYX_ERR(1, 1972, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_UuidType = &__pyx_type_7pyarrow_3lib_UuidType;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_UuidType->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_BaseExtensionType;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_UuidType) < (0)) __PYX_ERR(1, 1972, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_UuidType);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_UuidType->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_UuidType->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_UuidType->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_UuidType, __pyx_vtabptr_7pyarrow_3lib_UuidType) < (0)) __PYX_ERR(1, 1972, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_UuidType) < (0)) __PYX_ERR(1, 1972, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_UuidType, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_UuidType) < (0)) __PYX_ERR(1, 1972, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_UuidType->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_UuidType->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_UuidType, __pyx_base.__pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_JsonType = &__pyx_vtable_7pyarrow_3lib_JsonType;
  __pyx_vtable_7pyarrow_3lib_JsonType.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_BaseExtensionType;
  __pyx_vtable_7pyarrow_3lib_JsonType.__pyx_base.__pyx_base.init = (void (*)(struct __pyx_obj_7pyarrow_3lib_DataType *, std::shared_ptr< arrow::DataType>  const &))__pyx_f_7pyarrow_3lib_8JsonType_init;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_BaseExtensionType); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1935, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_JsonType = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_JsonType_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_JsonType)) __PYX_ERR(1, 1935, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_JsonType_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_JsonType) < (0)) __PYX_ERR(1, 1935, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_JsonType = &__pyx_type_7pyarrow_3lib_JsonType;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_JsonType->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_BaseExtensionType;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_JsonType) < (0)) __PYX_ERR(1, 1935, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_JsonType);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_JsonType->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_JsonType->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_JsonType->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_JsonType, __pyx_vtabptr_7pyarrow_3lib_JsonType) < (0)) __PYX_ERR(1, 1935, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_JsonType) < (0)) __PYX_ERR(1, 1935, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_JsonType, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_JsonType) < (0)) __PYX_ERR(1, 1935, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_JsonType->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_JsonType->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_JsonType, __pyx_base.__pyx_base.__pyx_base.__weakref__);
  #endif
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Weakrefable); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 219, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib__Metadata = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib__Metadata_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib__Metadata)) __PYX_ERR(15, 219, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib__Metadata_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib__Metadata) < (0)) __PYX_ERR(15, 219, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib__Metadata = &__pyx_type_7pyarrow_3lib__Metadata;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Metadata->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Weakrefable;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib__Metadata) < (0)) __PYX_ERR(15, 219, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib__Metadata);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib__Metadata->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib__Metadata->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib__Metadata->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_Metadata, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib__Metadata) < (0)) __PYX_ERR(15, 219, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib__Metadata->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib__Metadata->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib__Metadata, __pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_KeyValueMetadata = &__pyx_vtable_7pyarrow_3lib_KeyValueMetadata;
  __pyx_vtable_7pyarrow_3lib_KeyValueMetadata.init = (void (*)(struct __pyx_obj_7pyarrow_3lib_KeyValueMetadata *, std::shared_ptr< arrow::KeyValueMetadata const >  const &))__pyx_f_7pyarrow_3lib_16KeyValueMetadata_init;
  __pyx_vtable_7pyarrow_3lib_KeyValueMetadata.wrap = (PyObject *(*)(std::shared_ptr< arrow::KeyValueMetadata const >  const &))__pyx_f_7pyarrow_3lib_16KeyValueMetadata_wrap;
  __pyx_vtable_7pyarrow_3lib_KeyValueMetadata.unwrap = (std::shared_ptr< arrow::KeyValueMetadata const >  (*)(struct __pyx_obj_7pyarrow_3lib_KeyValueMetadata *))__pyx_f_7pyarrow_3lib_16KeyValueMetadata_unwrap;
  __pyx_vtabptr_7pyarrow_3lib_Field = &__pyx_vtable_7pyarrow_3lib_Field;
  __pyx_vtable_7pyarrow_3lib_Field.init = (void (*)(struct __pyx_obj_7pyarrow_3lib_Field *, std::shared_ptr< arrow::Field>  const &))__pyx_f_7pyarrow_3lib_5Field_init;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Weakrefable); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2455, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Field = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_Field_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Field)) __PYX_ERR(1, 2455, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_Field_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Field) < (0)) __PYX_ERR(1, 2455, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Field = &__pyx_type_7pyarrow_3lib_Field;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Field->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Weakrefable;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Field) < (0)) __PYX_ERR(1, 2455, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Field);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Field->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Field->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Field->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Field, __pyx_vtabptr_7pyarrow_3lib_Field) < (0)) __PYX_ERR(1, 2455, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Field) < (0)) __PYX_ERR(1, 2455, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_Field_2, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Field) < (0)) __PYX_ERR(1, 2455, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Field->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Field->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_Field, __pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_Schema = &__pyx_vtable_7pyarrow_3lib_Schema;
  __pyx_vtable_7pyarrow_3lib_Schema.init = (void (*)(struct __pyx_obj_7pyarrow_3lib_Schema *, std::vector<std::shared_ptr< arrow::Field> >  const &))__pyx_f_7pyarrow_3lib_6Schema_init;
  __pyx_vtable_7pyarrow_3lib_Schema.init_schema = (void (*)(struct __pyx_obj_7pyarrow_3lib_Schema *, std::shared_ptr< arrow::Schema>  const &))__pyx_f_7pyarrow_3lib_6Schema_init_schema;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Weakrefable); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2853, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Schema = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_Schema_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Schema)) __PYX_ERR(1, 2853, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_Schema_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Schema) < (0)) __PYX_ERR(1, 2853, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Schema = &__pyx_type_7pyarrow_3lib_Schema;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Schema->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Weakrefable;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Schema) < (0)) __PYX_ERR(1, 2853, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Schema);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Schema->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Schema->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Schema->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Schema, __pyx_vtabptr_7pyarrow_3lib_Schema) < (0)) __PYX_ERR(1, 2853, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Schema) < (0)) __PYX_ERR(1, 2853, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_Schema, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Schema) < (0)) __PYX_ERR(1, 2853, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Schema->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Schema->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_Schema, __pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_Scalar = &__pyx_vtable_7pyarrow_3lib_Scalar;
  __pyx_vtable_7pyarrow_3lib_Scalar.init = (void (*)(struct __pyx_obj_7pyarrow_3lib_Scalar *, std::shared_ptr< arrow::Scalar>  const &))__pyx_f_7pyarrow_3lib_6Scalar_init;
  __pyx_vtable_7pyarrow_3lib_Scalar.wrap = (PyObject *(*)(std::shared_ptr< arrow::Scalar>  const &))__pyx_f_7pyarrow_3lib_6Scalar_wrap;
  __pyx_vtable_7pyarrow_3lib_Scalar.unwrap = (std::shared_ptr< arrow::Scalar>  (*)(struct __pyx_obj_7pyarrow_3lib_Scalar *))__pyx_f_7pyarrow_3lib_6Scalar_unwrap;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Weakrefable); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 24, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Scalar = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_Scalar_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Scalar)) __PYX_ERR(3, 24, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_Scalar_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Scalar) < (0)) __PYX_ERR(3, 24, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Scalar = &__pyx_type_7pyarrow_3lib_Scalar;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Scalar->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Weakrefable;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Scalar) < (0)) __PYX_ERR(3, 24, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Scalar);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Scalar->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Scalar->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Scalar->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Scalar, __pyx_vtabptr_7pyarrow_3lib_Scalar) < (0)) __PYX_ERR(3, 24, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Scalar) < (0)) __PYX_ERR(3, 24, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_Scalar, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Scalar) < (0)) __PYX_ERR(3, 24, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Scalar->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Scalar->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_Scalar, __pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_ArrayStatistics = &__pyx_vtable_7pyarrow_3lib_ArrayStatistics;
  __pyx_vtable_7pyarrow_3lib_ArrayStatistics.init = (void (*)(struct __pyx_obj_7pyarrow_3lib_ArrayStatistics *, std::shared_ptr< arrow::ArrayStatistics>  const &))__pyx_f_7pyarrow_3lib_15ArrayStatistics_init;
  __pyx_vtable_7pyarrow_3lib_ArrayStatistics._get_value = (PyObject *(*)(struct __pyx_obj_7pyarrow_3lib_ArrayStatistics *, std::optional< std::variant<bool, int64_t, uint64_t, double, std::string>>  const &))__pyx_f_7pyarrow_3lib_15ArrayStatistics__get_value;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Weakrefable); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 743, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_ArrayStatistics = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_ArrayStatistics_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_ArrayStatistics)) __PYX_ERR(4, 743, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_ArrayStatistics_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_ArrayStatistics) < (0)) __PYX_ERR(4, 743, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_ArrayStatistics = &__pyx_type_7pyarrow_3lib_ArrayStatistics;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ArrayStatistics->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Weakrefable;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_ArrayStatistics) < (0)) __PYX_ERR(4, 743, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_ArrayStatistics);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_ArrayStatistics->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_ArrayStatistics->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_ArrayStatistics->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_ArrayStatistics, __pyx_vtabptr_7pyarrow_3lib_ArrayStatistics) < (0)) __PYX_ERR(4, 743, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_ArrayStatistics) < (0)) __PYX_ERR(4, 743, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_ArrayStatistics, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_ArrayStatistics) < (0)) __PYX_ERR(4, 743, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_ArrayStatistics->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_ArrayStatistics->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_ArrayStatistics, __pyx_base.__weakref__);
  #endif
  if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_ArrayStatistics) < (0)) __PYX_ERR(4, 743, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Weakrefable); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 864, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib__PandasConvertible = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib__PandasConvertible_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib__PandasConvertible)) __PYX_ERR(4, 864, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib__PandasConvertible_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib__PandasConvertible) < (0)) __PYX_ERR(4, 864, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib__PandasConvertible = &__pyx_type_7pyarrow_3lib__PandasConvertible;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__PandasConvertible->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Weakrefable;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib__PandasConvertible) < (0)) __PYX_ERR(4, 864, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib__PandasConvertible);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib__PandasConvertible->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib__PandasConvertible->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib__PandasConvertible->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_PandasConvertible, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib__PandasConvertible) < (0)) __PYX_ERR(4, 864, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib__PandasConvertible->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib__PandasConvertible->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib__PandasConvertible, __pyx_base.__weakref__);
  #endif
  if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib__PandasConvertible) < (0)) __PYX_ERR(4, 864, __pyx_L1_error)
  __pyx_vtabptr_7pyarrow_3lib_Array = &__pyx_vtable_7pyarrow_3lib_Array;
  __pyx_vtable_7pyarrow_3lib_Array.init = (void (*)(struct __pyx_obj_7pyarrow_3lib_Array *, std::shared_ptr< arrow::Array>  const &))__pyx_f_7pyarrow_3lib_5Array_init;
  __pyx_vtable_7pyarrow_3lib_Array.getitem = (PyObject *(*)(struct __pyx_obj_7pyarrow_3lib_Array *, int64_t))__pyx_f_7pyarrow_3lib_5Array_getitem;
  __pyx_vtable_7pyarrow_3lib_Array.length = (int64_t (*)(struct __pyx_obj_7pyarrow_3lib_Array *))__pyx_f_7pyarrow_3lib_5Array_length;
  __pyx_vtable_7pyarrow_3lib_Array._assert_cpu = (void (*)(struct __pyx_obj_7pyarrow_3lib_Array *))__pyx_f_7pyarrow_3lib_5Array__assert_cpu;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__PandasConvertible); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 1083, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Array = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_Array_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Array)) __PYX_ERR(4, 1083, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_Array_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Array) < (0)) __PYX_ERR(4, 1083, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Array = &__pyx_type_7pyarrow_3lib_Array;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__PandasConvertible;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Array) < (0)) __PYX_ERR(4, 1083, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Array);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Array->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Array->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Array->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  #if CYTHON_UPDATE_DESCRIPTOR_DOC
  {
    PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Array, "__getitem__"); if (unlikely(!wrapper)) __PYX_ERR(4, 1083, __pyx_L1_error)
    if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
      __pyx_wrapperbase_7pyarrow_3lib_5Array_51__getitem__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_7pyarrow_3lib_5Array_51__getitem__.doc = __pyx_doc_7pyarrow_3lib_5Array_51__getitem__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_7pyarrow_3lib_5Array_51__getitem__;
    }
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Array, __pyx_vtabptr_7pyarrow_3lib_Array) < (0)) __PYX_ERR(4, 1083, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Array) < (0)) __PYX_ERR(4, 1083, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_Array, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Array) < (0)) __PYX_ERR(4, 1083, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Array->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Array->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_Array, __pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_Tensor = &__pyx_vtable_7pyarrow_3lib_Tensor;
  __pyx_vtable_7pyarrow_3lib_Tensor.init = (void (*)(struct __pyx_obj_7pyarrow_3lib_Tensor *, std::shared_ptr< arrow::Tensor>  const &))__pyx_f_7pyarrow_3lib_6Tensor_init;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Weakrefable); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 22, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Tensor = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_Tensor_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Tensor)) __PYX_ERR(5, 22, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Tensor->tp_as_buffer = &__pyx_tp_as_buffer_Tensor;
  if (!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Tensor->tp_as_buffer->bf_releasebuffer && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Tensor->tp_base->tp_as_buffer && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Tensor->tp_base->tp_as_buffer->bf_releasebuffer) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Tensor->tp_as_buffer->bf_releasebuffer = __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Tensor->tp_base->tp_as_buffer->bf_releasebuffer;
  }
  #elif defined(Py_bf_getbuffer) && defined(Py_bf_releasebuffer)
  /* PY_VERSION_HEX >= 0x03090000 || Py_LIMITED_API >= 0x030B0000 */
  #elif defined(_MSC_VER)
  #pragma message ("The buffer protocol is not supported in the Limited C-API < 3.11.")
  #else
  #warning "The buffer protocol is not supported in the Limited C-API < 3.11."
  #endif
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_Tensor_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Tensor) < (0)) __PYX_ERR(5, 22, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Tensor = &__pyx_type_7pyarrow_3lib_Tensor;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Tensor->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Weakrefable;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Tensor) < (0)) __PYX_ERR(5, 22, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Tensor);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Tensor->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Tensor->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Tensor->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Tensor, __pyx_vtabptr_7pyarrow_3lib_Tensor) < (0)) __PYX_ERR(5, 22, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Tensor) < (0)) __PYX_ERR(5, 22, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_Tensor, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Tensor) < (0)) __PYX_ERR(5, 22, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Tensor->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Tensor->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_Tensor, __pyx_base.__weakref__);
  #endif
  if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Tensor) < (0)) __PYX_ERR(5, 22, __pyx_L1_error)
  __pyx_vtabptr_7pyarrow_3lib_SparseCSRMatrix = &__pyx_vtable_7pyarrow_3lib_SparseCSRMatrix;
  __pyx_vtable_7pyarrow_3lib_SparseCSRMatrix.init = (void (*)(struct __pyx_obj_7pyarrow_3lib_SparseCSRMatrix *, std::shared_ptr< arrow::SparseCSRMatrix>  const &))__pyx_f_7pyarrow_3lib_15SparseCSRMatrix_init;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Weakrefable); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 651, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_SparseCSRMatrix = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_SparseCSRMatrix_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_SparseCSRMatrix)) __PYX_ERR(5, 651, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_SparseCSRMatrix_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_SparseCSRMatrix) < (0)) __PYX_ERR(5, 651, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_SparseCSRMatrix = &__pyx_type_7pyarrow_3lib_SparseCSRMatrix;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_SparseCSRMatrix->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Weakrefable;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_SparseCSRMatrix) < (0)) __PYX_ERR(5, 651, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_SparseCSRMatrix);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_SparseCSRMatrix->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_SparseCSRMatrix->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_SparseCSRMatrix->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_SparseCSRMatrix, __pyx_vtabptr_7pyarrow_3lib_SparseCSRMatrix) < (0)) __PYX_ERR(5, 651, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_SparseCSRMatrix) < (0)) __PYX_ERR(5, 651, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_SparseCSRMatrix, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_SparseCSRMatrix) < (0)) __PYX_ERR(5, 651, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_SparseCSRMatrix->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_SparseCSRMatrix->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_SparseCSRMatrix, __pyx_base.__weakref__);
  #endif
  if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_SparseCSRMatrix) < (0)) __PYX_ERR(5, 651, __pyx_L1_error)
  __pyx_vtabptr_7pyarrow_3lib_SparseCSCMatrix = &__pyx_vtable_7pyarrow_3lib_SparseCSCMatrix;
  __pyx_vtable_7pyarrow_3lib_SparseCSCMatrix.init = (void (*)(struct __pyx_obj_7pyarrow_3lib_SparseCSCMatrix *, std::shared_ptr< arrow::SparseCSCMatrix>  const &))__pyx_f_7pyarrow_3lib_15SparseCSCMatrix_init;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Weakrefable); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 892, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_SparseCSCMatrix = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_SparseCSCMatrix_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_SparseCSCMatrix)) __PYX_ERR(5, 892, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_SparseCSCMatrix_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_SparseCSCMatrix) < (0)) __PYX_ERR(5, 892, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_SparseCSCMatrix = &__pyx_type_7pyarrow_3lib_SparseCSCMatrix;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_SparseCSCMatrix->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Weakrefable;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_SparseCSCMatrix) < (0)) __PYX_ERR(5, 892, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_SparseCSCMatrix);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_SparseCSCMatrix->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_SparseCSCMatrix->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_SparseCSCMatrix->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_SparseCSCMatrix, __pyx_vtabptr_7pyarrow_3lib_SparseCSCMatrix) < (0)) __PYX_ERR(5, 892, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_SparseCSCMatrix) < (0)) __PYX_ERR(5, 892, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_SparseCSCMatrix, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_SparseCSCMatrix) < (0)) __PYX_ERR(5, 892, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_SparseCSCMatrix->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_SparseCSCMatrix->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_SparseCSCMatrix, __pyx_base.__weakref__);
  #endif
  if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_SparseCSCMatrix) < (0)) __PYX_ERR(5, 892, __pyx_L1_error)
  __pyx_vtabptr_7pyarrow_3lib_SparseCOOTensor = &__pyx_vtable_7pyarrow_3lib_SparseCOOTensor;
  __pyx_vtable_7pyarrow_3lib_SparseCOOTensor.init = (void (*)(struct __pyx_obj_7pyarrow_3lib_SparseCOOTensor *, std::shared_ptr< arrow::SparseCOOTensor>  const &))__pyx_f_7pyarrow_3lib_15SparseCOOTensor_init;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Weakrefable); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 346, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_SparseCOOTensor = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_SparseCOOTensor_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_SparseCOOTensor)) __PYX_ERR(5, 346, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_SparseCOOTensor_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_SparseCOOTensor) < (0)) __PYX_ERR(5, 346, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_SparseCOOTensor = &__pyx_type_7pyarrow_3lib_SparseCOOTensor;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_SparseCOOTensor->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Weakrefable;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_SparseCOOTensor) < (0)) __PYX_ERR(5, 346, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_SparseCOOTensor);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_SparseCOOTensor->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_SparseCOOTensor->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_SparseCOOTensor->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_SparseCOOTensor, __pyx_vtabptr_7pyarrow_3lib_SparseCOOTensor) < (0)) __PYX_ERR(5, 346, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_SparseCOOTensor) < (0)) __PYX_ERR(5, 346, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_SparseCOOTensor, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_SparseCOOTensor) < (0)) __PYX_ERR(5, 346, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_SparseCOOTensor->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_SparseCOOTensor->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_SparseCOOTensor, __pyx_base.__weakref__);
  #endif
  if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_SparseCOOTensor) < (0)) __PYX_ERR(5, 346, __pyx_L1_error)
  __pyx_vtabptr_7pyarrow_3lib_SparseCSFTensor = &__pyx_vtable_7pyarrow_3lib_SparseCSFTensor;
  __pyx_vtable_7pyarrow_3lib_SparseCSFTensor.init = (void (*)(struct __pyx_obj_7pyarrow_3lib_SparseCSFTensor *, std::shared_ptr< arrow::SparseCSFTensor>  const &))__pyx_f_7pyarrow_3lib_15SparseCSFTensor_init;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Weakrefable); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 1135, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_SparseCSFTensor = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_SparseCSFTensor_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_SparseCSFTensor)) __PYX_ERR(5, 1135, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_SparseCSFTensor_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_SparseCSFTensor) < (0)) __PYX_ERR(5, 1135, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_SparseCSFTensor = &__pyx_type_7pyarrow_3lib_SparseCSFTensor;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_SparseCSFTensor->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Weakrefable;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_SparseCSFTensor) < (0)) __PYX_ERR(5, 1135, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_SparseCSFTensor);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_SparseCSFTensor->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_SparseCSFTensor->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_SparseCSFTensor->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_SparseCSFTensor, __pyx_vtabptr_7pyarrow_3lib_SparseCSFTensor) < (0)) __PYX_ERR(5, 1135, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_SparseCSFTensor) < (0)) __PYX_ERR(5, 1135, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_SparseCSFTensor, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_SparseCSFTensor) < (0)) __PYX_ERR(5, 1135, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_SparseCSFTensor->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_SparseCSFTensor->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_SparseCSFTensor, __pyx_base.__weakref__);
  #endif
  if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_SparseCSFTensor) < (0)) __PYX_ERR(5, 1135, __pyx_L1_error)
  __pyx_vtabptr_7pyarrow_3lib_NullArray = &__pyx_vtable_7pyarrow_3lib_NullArray;
  __pyx_vtable_7pyarrow_3lib_NullArray.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_Array;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 2337, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_NullArray = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_NullArray_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_NullArray)) __PYX_ERR(4, 2337, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_NullArray_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_NullArray) < (0)) __PYX_ERR(4, 2337, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_NullArray = &__pyx_type_7pyarrow_3lib_NullArray;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NullArray->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_NullArray) < (0)) __PYX_ERR(4, 2337, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_NullArray);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_NullArray->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_NullArray->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_NullArray->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_NullArray, __pyx_vtabptr_7pyarrow_3lib_NullArray) < (0)) __PYX_ERR(4, 2337, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_NullArray) < (0)) __PYX_ERR(4, 2337, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_NullArray, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_NullArray) < (0)) __PYX_ERR(4, 2337, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_NullArray->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_NullArray->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_NullArray, __pyx_base.__pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_BooleanArray = &__pyx_vtable_7pyarrow_3lib_BooleanArray;
  __pyx_vtable_7pyarrow_3lib_BooleanArray.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_Array;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 2343, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_BooleanArray = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_BooleanArray_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_BooleanArray)) __PYX_ERR(4, 2343, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_BooleanArray_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_BooleanArray) < (0)) __PYX_ERR(4, 2343, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_BooleanArray = &__pyx_type_7pyarrow_3lib_BooleanArray;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_BooleanArray->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_BooleanArray) < (0)) __PYX_ERR(4, 2343, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_BooleanArray);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_BooleanArray->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_BooleanArray->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_BooleanArray->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_BooleanArray, __pyx_vtabptr_7pyarrow_3lib_BooleanArray) < (0)) __PYX_ERR(4, 2343, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_BooleanArray) < (0)) __PYX_ERR(4, 2343, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_BooleanArray, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_BooleanArray) < (0)) __PYX_ERR(4, 2343, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_BooleanArray->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_BooleanArray->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_BooleanArray, __pyx_base.__pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_NumericArray = &__pyx_vtable_7pyarrow_3lib_NumericArray;
  __pyx_vtable_7pyarrow_3lib_NumericArray.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_Array;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 2356, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_NumericArray = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_NumericArray_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_NumericArray)) __PYX_ERR(4, 2356, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_NumericArray_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_NumericArray) < (0)) __PYX_ERR(4, 2356, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_NumericArray = &__pyx_type_7pyarrow_3lib_NumericArray;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NumericArray->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_NumericArray) < (0)) __PYX_ERR(4, 2356, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_NumericArray);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_NumericArray->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_NumericArray->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_NumericArray->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_NumericArray, __pyx_vtabptr_7pyarrow_3lib_NumericArray) < (0)) __PYX_ERR(4, 2356, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_NumericArray) < (0)) __PYX_ERR(4, 2356, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_NumericArray, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_NumericArray) < (0)) __PYX_ERR(4, 2356, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_NumericArray->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_NumericArray->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_NumericArray, __pyx_base.__pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_IntegerArray = &__pyx_vtable_7pyarrow_3lib_IntegerArray;
  __pyx_vtable_7pyarrow_3lib_IntegerArray.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_NumericArray;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NumericArray); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 2362, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_IntegerArray = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_IntegerArray_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_IntegerArray)) __PYX_ERR(4, 2362, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_IntegerArray_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_IntegerArray) < (0)) __PYX_ERR(4, 2362, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_IntegerArray = &__pyx_type_7pyarrow_3lib_IntegerArray;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_IntegerArray->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NumericArray;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_IntegerArray) < (0)) __PYX_ERR(4, 2362, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_IntegerArray);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_IntegerArray->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_IntegerArray->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_IntegerArray->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_IntegerArray, __pyx_vtabptr_7pyarrow_3lib_IntegerArray) < (0)) __PYX_ERR(4, 2362, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_IntegerArray) < (0)) __PYX_ERR(4, 2362, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_IntegerArray, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_IntegerArray) < (0)) __PYX_ERR(4, 2362, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_IntegerArray->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_IntegerArray->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_IntegerArray, __pyx_base.__pyx_base.__pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_FloatingPointArray = &__pyx_vtable_7pyarrow_3lib_FloatingPointArray;
  __pyx_vtable_7pyarrow_3lib_FloatingPointArray.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_NumericArray;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NumericArray); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 2368, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_FloatingPointArray = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_FloatingPointArray_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_FloatingPointArray)) __PYX_ERR(4, 2368, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_FloatingPointArray_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_FloatingPointArray) < (0)) __PYX_ERR(4, 2368, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_FloatingPointArray = &__pyx_type_7pyarrow_3lib_FloatingPointArray;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_FloatingPointArray->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NumericArray;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_FloatingPointArray) < (0)) __PYX_ERR(4, 2368, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_FloatingPointArray);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_FloatingPointArray->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_FloatingPointArray->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_FloatingPointArray->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_FloatingPointArray, __pyx_vtabptr_7pyarrow_3lib_FloatingPointArray) < (0)) __PYX_ERR(4, 2368, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_FloatingPointArray) < (0)) __PYX_ERR(4, 2368, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_FloatingPointArray, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_FloatingPointArray) < (0)) __PYX_ERR(4, 2368, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_FloatingPointArray->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_FloatingPointArray->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_FloatingPointArray, __pyx_base.__pyx_base.__pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_Int8Array = &__pyx_vtable_7pyarrow_3lib_Int8Array;
  __pyx_vtable_7pyarrow_3lib_Int8Array.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_IntegerArray;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_IntegerArray); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 2374, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int8Array = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_Int8Array_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int8Array)) __PYX_ERR(4, 2374, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_Int8Array_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int8Array) < (0)) __PYX_ERR(4, 2374, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int8Array = &__pyx_type_7pyarrow_3lib_Int8Array;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Int8Array->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_IntegerArray;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int8Array) < (0)) __PYX_ERR(4, 2374, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int8Array);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int8Array->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int8Array->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int8Array->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int8Array, __pyx_vtabptr_7pyarrow_3lib_Int8Array) < (0)) __PYX_ERR(4, 2374, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int8Array) < (0)) __PYX_ERR(4, 2374, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_Int8Array, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int8Array) < (0)) __PYX_ERR(4, 2374, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int8Array->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int8Array->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_Int8Array, __pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_UInt8Array = &__pyx_vtable_7pyarrow_3lib_UInt8Array;
  __pyx_vtable_7pyarrow_3lib_UInt8Array.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_IntegerArray;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_IntegerArray); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 2380, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt8Array = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_UInt8Array_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt8Array)) __PYX_ERR(4, 2380, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_UInt8Array_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt8Array) < (0)) __PYX_ERR(4, 2380, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt8Array = &__pyx_type_7pyarrow_3lib_UInt8Array;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_UInt8Array->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_IntegerArray;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt8Array) < (0)) __PYX_ERR(4, 2380, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt8Array);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt8Array->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt8Array->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt8Array->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt8Array, __pyx_vtabptr_7pyarrow_3lib_UInt8Array) < (0)) __PYX_ERR(4, 2380, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt8Array) < (0)) __PYX_ERR(4, 2380, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_UInt8Array, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt8Array) < (0)) __PYX_ERR(4, 2380, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt8Array->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt8Array->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_UInt8Array, __pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_Int16Array = &__pyx_vtable_7pyarrow_3lib_Int16Array;
  __pyx_vtable_7pyarrow_3lib_Int16Array.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_IntegerArray;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_IntegerArray); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 2386, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int16Array = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_Int16Array_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int16Array)) __PYX_ERR(4, 2386, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_Int16Array_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int16Array) < (0)) __PYX_ERR(4, 2386, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int16Array = &__pyx_type_7pyarrow_3lib_Int16Array;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Int16Array->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_IntegerArray;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int16Array) < (0)) __PYX_ERR(4, 2386, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int16Array);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int16Array->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int16Array->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int16Array->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int16Array, __pyx_vtabptr_7pyarrow_3lib_Int16Array) < (0)) __PYX_ERR(4, 2386, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int16Array) < (0)) __PYX_ERR(4, 2386, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_Int16Array, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int16Array) < (0)) __PYX_ERR(4, 2386, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int16Array->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int16Array->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_Int16Array, __pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_UInt16Array = &__pyx_vtable_7pyarrow_3lib_UInt16Array;
  __pyx_vtable_7pyarrow_3lib_UInt16Array.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_IntegerArray;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_IntegerArray); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 2392, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt16Array = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_UInt16Array_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt16Array)) __PYX_ERR(4, 2392, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_UInt16Array_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt16Array) < (0)) __PYX_ERR(4, 2392, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt16Array = &__pyx_type_7pyarrow_3lib_UInt16Array;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_UInt16Array->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_IntegerArray;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt16Array) < (0)) __PYX_ERR(4, 2392, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt16Array);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt16Array->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt16Array->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt16Array->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt16Array, __pyx_vtabptr_7pyarrow_3lib_UInt16Array) < (0)) __PYX_ERR(4, 2392, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt16Array) < (0)) __PYX_ERR(4, 2392, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_UInt16Array, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt16Array) < (0)) __PYX_ERR(4, 2392, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt16Array->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt16Array->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_UInt16Array, __pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_Int32Array = &__pyx_vtable_7pyarrow_3lib_Int32Array;
  __pyx_vtable_7pyarrow_3lib_Int32Array.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_IntegerArray;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_IntegerArray); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 2398, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int32Array = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_Int32Array_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int32Array)) __PYX_ERR(4, 2398, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_Int32Array_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int32Array) < (0)) __PYX_ERR(4, 2398, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int32Array = &__pyx_type_7pyarrow_3lib_Int32Array;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Int32Array->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_IntegerArray;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int32Array) < (0)) __PYX_ERR(4, 2398, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int32Array);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int32Array->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int32Array->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int32Array->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int32Array, __pyx_vtabptr_7pyarrow_3lib_Int32Array) < (0)) __PYX_ERR(4, 2398, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int32Array) < (0)) __PYX_ERR(4, 2398, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_Int32Array, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int32Array) < (0)) __PYX_ERR(4, 2398, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int32Array->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int32Array->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_Int32Array, __pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_UInt32Array = &__pyx_vtable_7pyarrow_3lib_UInt32Array;
  __pyx_vtable_7pyarrow_3lib_UInt32Array.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_IntegerArray;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_IntegerArray); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 2404, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt32Array = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_UInt32Array_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt32Array)) __PYX_ERR(4, 2404, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_UInt32Array_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt32Array) < (0)) __PYX_ERR(4, 2404, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt32Array = &__pyx_type_7pyarrow_3lib_UInt32Array;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_UInt32Array->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_IntegerArray;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt32Array) < (0)) __PYX_ERR(4, 2404, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt32Array);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt32Array->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt32Array->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt32Array->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt32Array, __pyx_vtabptr_7pyarrow_3lib_UInt32Array) < (0)) __PYX_ERR(4, 2404, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt32Array) < (0)) __PYX_ERR(4, 2404, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_UInt32Array, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt32Array) < (0)) __PYX_ERR(4, 2404, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt32Array->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt32Array->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_UInt32Array, __pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_Int64Array = &__pyx_vtable_7pyarrow_3lib_Int64Array;
  __pyx_vtable_7pyarrow_3lib_Int64Array.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_IntegerArray;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_IntegerArray); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 2410, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int64Array = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_Int64Array_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int64Array)) __PYX_ERR(4, 2410, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_Int64Array_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int64Array) < (0)) __PYX_ERR(4, 2410, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int64Array = &__pyx_type_7pyarrow_3lib_Int64Array;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Int64Array->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_IntegerArray;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int64Array) < (0)) __PYX_ERR(4, 2410, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int64Array);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int64Array->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int64Array->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int64Array->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int64Array, __pyx_vtabptr_7pyarrow_3lib_Int64Array) < (0)) __PYX_ERR(4, 2410, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int64Array) < (0)) __PYX_ERR(4, 2410, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_Int64Array, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int64Array) < (0)) __PYX_ERR(4, 2410, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int64Array->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int64Array->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_Int64Array, __pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_UInt64Array = &__pyx_vtable_7pyarrow_3lib_UInt64Array;
  __pyx_vtable_7pyarrow_3lib_UInt64Array.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_IntegerArray;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_IntegerArray); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 2416, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt64Array = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_UInt64Array_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt64Array)) __PYX_ERR(4, 2416, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_UInt64Array_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt64Array) < (0)) __PYX_ERR(4, 2416, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt64Array = &__pyx_type_7pyarrow_3lib_UInt64Array;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_UInt64Array->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_IntegerArray;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt64Array) < (0)) __PYX_ERR(4, 2416, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt64Array);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt64Array->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt64Array->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt64Array->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt64Array, __pyx_vtabptr_7pyarrow_3lib_UInt64Array) < (0)) __PYX_ERR(4, 2416, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt64Array) < (0)) __PYX_ERR(4, 2416, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_UInt64Array, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt64Array) < (0)) __PYX_ERR(4, 2416, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt64Array->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt64Array->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_UInt64Array, __pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_HalfFloatArray = &__pyx_vtable_7pyarrow_3lib_HalfFloatArray;
  __pyx_vtable_7pyarrow_3lib_HalfFloatArray.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_FloatingPointArray;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_FloatingPointArray); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 2489, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_HalfFloatArray = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_HalfFloatArray_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_HalfFloatArray)) __PYX_ERR(4, 2489, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_HalfFloatArray_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_HalfFloatArray) < (0)) __PYX_ERR(4, 2489, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_HalfFloatArray = &__pyx_type_7pyarrow_3lib_HalfFloatArray;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_HalfFloatArray->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_FloatingPointArray;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_HalfFloatArray) < (0)) __PYX_ERR(4, 2489, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_HalfFloatArray);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_HalfFloatArray->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_HalfFloatArray->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_HalfFloatArray->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_HalfFloatArray, __pyx_vtabptr_7pyarrow_3lib_HalfFloatArray) < (0)) __PYX_ERR(4, 2489, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_HalfFloatArray) < (0)) __PYX_ERR(4, 2489, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_HalfFloatArray, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_HalfFloatArray) < (0)) __PYX_ERR(4, 2489, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_HalfFloatArray->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_HalfFloatArray->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_HalfFloatArray, __pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_FloatArray = &__pyx_vtable_7pyarrow_3lib_FloatArray;
  __pyx_vtable_7pyarrow_3lib_FloatArray.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_FloatingPointArray;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_FloatingPointArray); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 2495, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_FloatArray = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_FloatArray_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_FloatArray)) __PYX_ERR(4, 2495, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_FloatArray_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_FloatArray) < (0)) __PYX_ERR(4, 2495, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_FloatArray = &__pyx_type_7pyarrow_3lib_FloatArray;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_FloatArray->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_FloatingPointArray;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_FloatArray) < (0)) __PYX_ERR(4, 2495, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_FloatArray);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_FloatArray->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_FloatArray->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_FloatArray->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_FloatArray, __pyx_vtabptr_7pyarrow_3lib_FloatArray) < (0)) __PYX_ERR(4, 2495, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_FloatArray) < (0)) __PYX_ERR(4, 2495, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_FloatArray, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_FloatArray) < (0)) __PYX_ERR(4, 2495, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_FloatArray->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_FloatArray->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_FloatArray, __pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_DoubleArray = &__pyx_vtable_7pyarrow_3lib_DoubleArray;
  __pyx_vtable_7pyarrow_3lib_DoubleArray.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_FloatingPointArray;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_FloatingPointArray); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 2501, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_DoubleArray = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_DoubleArray_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_DoubleArray)) __PYX_ERR(4, 2501, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_DoubleArray_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_DoubleArray) < (0)) __PYX_ERR(4, 2501, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_DoubleArray = &__pyx_type_7pyarrow_3lib_DoubleArray;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DoubleArray->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_FloatingPointArray;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_DoubleArray) < (0)) __PYX_ERR(4, 2501, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_DoubleArray);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_DoubleArray->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_DoubleArray->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_DoubleArray->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_DoubleArray, __pyx_vtabptr_7pyarrow_3lib_DoubleArray) < (0)) __PYX_ERR(4, 2501, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_DoubleArray) < (0)) __PYX_ERR(4, 2501, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_DoubleArray, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_DoubleArray) < (0)) __PYX_ERR(4, 2501, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_DoubleArray->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_DoubleArray->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_DoubleArray, __pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_FixedSizeBinaryArray = &__pyx_vtable_7pyarrow_3lib_FixedSizeBinaryArray;
  __pyx_vtable_7pyarrow_3lib_FixedSizeBinaryArray.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_Array;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 2507, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedSizeBinaryArray = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_FixedSizeBinaryArray_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedSizeBinaryArray)) __PYX_ERR(4, 2507, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_FixedSizeBinaryArray_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedSizeBinaryArray) < (0)) __PYX_ERR(4, 2507, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedSizeBinaryArray = &__pyx_type_7pyarrow_3lib_FixedSizeBinaryArray;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_FixedSizeBinaryArray->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedSizeBinaryArray) < (0)) __PYX_ERR(4, 2507, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedSizeBinaryArray);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedSizeBinaryArray->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedSizeBinaryArray->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedSizeBinaryArray->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedSizeBinaryArray, __pyx_vtabptr_7pyarrow_3lib_FixedSizeBinaryArray) < (0)) __PYX_ERR(4, 2507, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedSizeBinaryArray) < (0)) __PYX_ERR(4, 2507, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_FixedSizeBinaryArray, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedSizeBinaryArray) < (0)) __PYX_ERR(4, 2507, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedSizeBinaryArray->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedSizeBinaryArray->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_FixedSizeBinaryArray, __pyx_base.__pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_Decimal32Array = &__pyx_vtable_7pyarrow_3lib_Decimal32Array;
  __pyx_vtable_7pyarrow_3lib_Decimal32Array.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_FixedSizeBinaryArray;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_FixedSizeBinaryArray); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 422, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal32Array = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_Decimal32Array_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal32Array)) __PYX_ERR(15, 422, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_Decimal32Array_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal32Array) < (0)) __PYX_ERR(15, 422, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal32Array = &__pyx_type_7pyarrow_3lib_Decimal32Array;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Decimal32Array->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_FixedSizeBinaryArray;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal32Array) < (0)) __PYX_ERR(15, 422, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal32Array);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal32Array->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal32Array->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal32Array->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal32Array, __pyx_vtabptr_7pyarrow_3lib_Decimal32Array) < (0)) __PYX_ERR(15, 422, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal32Array) < (0)) __PYX_ERR(15, 422, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_Decimal32Array, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal32Array) < (0)) __PYX_ERR(15, 422, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal32Array->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal32Array->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_Decimal32Array, __pyx_base.__pyx_base.__pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_Decimal64Array = &__pyx_vtable_7pyarrow_3lib_Decimal64Array;
  __pyx_vtable_7pyarrow_3lib_Decimal64Array.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_FixedSizeBinaryArray;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_FixedSizeBinaryArray); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 2517, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal64Array = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_Decimal64Array_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal64Array)) __PYX_ERR(4, 2517, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_Decimal64Array_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal64Array) < (0)) __PYX_ERR(4, 2517, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal64Array = &__pyx_type_7pyarrow_3lib_Decimal64Array;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Decimal64Array->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_FixedSizeBinaryArray;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal64Array) < (0)) __PYX_ERR(4, 2517, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal64Array);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal64Array->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal64Array->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal64Array->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal64Array, __pyx_vtabptr_7pyarrow_3lib_Decimal64Array) < (0)) __PYX_ERR(4, 2517, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal64Array) < (0)) __PYX_ERR(4, 2517, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_Decimal64Array, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal64Array) < (0)) __PYX_ERR(4, 2517, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal64Array->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal64Array->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_Decimal64Array, __pyx_base.__pyx_base.__pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_Decimal128Array = &__pyx_vtable_7pyarrow_3lib_Decimal128Array;
  __pyx_vtable_7pyarrow_3lib_Decimal128Array.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_FixedSizeBinaryArray;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_FixedSizeBinaryArray); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 2522, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal128Array = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_Decimal128Array_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal128Array)) __PYX_ERR(4, 2522, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_Decimal128Array_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal128Array) < (0)) __PYX_ERR(4, 2522, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal128Array = &__pyx_type_7pyarrow_3lib_Decimal128Array;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Decimal128Array->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_FixedSizeBinaryArray;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal128Array) < (0)) __PYX_ERR(4, 2522, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal128Array);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal128Array->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal128Array->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal128Array->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal128Array, __pyx_vtabptr_7pyarrow_3lib_Decimal128Array) < (0)) __PYX_ERR(4, 2522, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal128Array) < (0)) __PYX_ERR(4, 2522, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_Decimal128Array, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal128Array) < (0)) __PYX_ERR(4, 2522, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal128Array->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal128Array->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_Decimal128Array, __pyx_base.__pyx_base.__pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_Decimal256Array = &__pyx_vtable_7pyarrow_3lib_Decimal256Array;
  __pyx_vtable_7pyarrow_3lib_Decimal256Array.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_FixedSizeBinaryArray;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_FixedSizeBinaryArray); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 2528, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal256Array = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_Decimal256Array_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal256Array)) __PYX_ERR(4, 2528, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_Decimal256Array_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal256Array) < (0)) __PYX_ERR(4, 2528, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal256Array = &__pyx_type_7pyarrow_3lib_Decimal256Array;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Decimal256Array->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_FixedSizeBinaryArray;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal256Array) < (0)) __PYX_ERR(4, 2528, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal256Array);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal256Array->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal256Array->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal256Array->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal256Array, __pyx_vtabptr_7pyarrow_3lib_Decimal256Array) < (0)) __PYX_ERR(4, 2528, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal256Array) < (0)) __PYX_ERR(4, 2528, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_Decimal256Array, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal256Array) < (0)) __PYX_ERR(4, 2528, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal256Array->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal256Array->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_Decimal256Array, __pyx_base.__pyx_base.__pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_StructArray = &__pyx_vtable_7pyarrow_3lib_StructArray;
  __pyx_vtable_7pyarrow_3lib_StructArray.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_Array;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 4126, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_StructArray = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_StructArray_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_StructArray)) __PYX_ERR(4, 4126, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_StructArray_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_StructArray) < (0)) __PYX_ERR(4, 4126, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_StructArray = &__pyx_type_7pyarrow_3lib_StructArray;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_StructArray->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_StructArray) < (0)) __PYX_ERR(4, 4126, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_StructArray);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_StructArray->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_StructArray->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_StructArray->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_StructArray, __pyx_vtabptr_7pyarrow_3lib_StructArray) < (0)) __PYX_ERR(4, 4126, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_StructArray) < (0)) __PYX_ERR(4, 4126, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_StructArray, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_StructArray) < (0)) __PYX_ERR(4, 4126, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_StructArray->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_StructArray->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_StructArray, __pyx_base.__pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_BaseListArray = &__pyx_vtable_7pyarrow_3lib_BaseListArray;
  __pyx_vtable_7pyarrow_3lib_BaseListArray.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_Array;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 2533, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_BaseListArray = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_BaseListArray_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_BaseListArray)) __PYX_ERR(4, 2533, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_BaseListArray_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_BaseListArray) < (0)) __PYX_ERR(4, 2533, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_BaseListArray = &__pyx_type_7pyarrow_3lib_BaseListArray;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_BaseListArray->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_BaseListArray) < (0)) __PYX_ERR(4, 2533, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_BaseListArray);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_BaseListArray->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_BaseListArray->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_BaseListArray->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_BaseListArray, __pyx_vtabptr_7pyarrow_3lib_BaseListArray) < (0)) __PYX_ERR(4, 2533, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_BaseListArray) < (0)) __PYX_ERR(4, 2533, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_BaseListArray, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_BaseListArray) < (0)) __PYX_ERR(4, 2533, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_BaseListArray->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_BaseListArray->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_BaseListArray, __pyx_base.__pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_ListArray = &__pyx_vtable_7pyarrow_3lib_ListArray;
  __pyx_vtable_7pyarrow_3lib_ListArray.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_BaseListArray;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_BaseListArray); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 2673, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_ListArray = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_ListArray_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_ListArray)) __PYX_ERR(4, 2673, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_ListArray_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_ListArray) < (0)) __PYX_ERR(4, 2673, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_ListArray = &__pyx_type_7pyarrow_3lib_ListArray;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ListArray->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_BaseListArray;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_ListArray) < (0)) __PYX_ERR(4, 2673, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_ListArray);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_ListArray->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_ListArray->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_ListArray->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_ListArray, __pyx_vtabptr_7pyarrow_3lib_ListArray) < (0)) __PYX_ERR(4, 2673, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_ListArray) < (0)) __PYX_ERR(4, 2673, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_ListArray, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_ListArray) < (0)) __PYX_ERR(4, 2673, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_ListArray->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_ListArray->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_ListArray, __pyx_base.__pyx_base.__pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_LargeListArray = &__pyx_vtable_7pyarrow_3lib_LargeListArray;
  __pyx_vtable_7pyarrow_3lib_LargeListArray.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_BaseListArray;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_BaseListArray); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 2856, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeListArray = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_LargeListArray_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeListArray)) __PYX_ERR(4, 2856, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_LargeListArray_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeListArray) < (0)) __PYX_ERR(4, 2856, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeListArray = &__pyx_type_7pyarrow_3lib_LargeListArray;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_LargeListArray->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_BaseListArray;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeListArray) < (0)) __PYX_ERR(4, 2856, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeListArray);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeListArray->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeListArray->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeListArray->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeListArray, __pyx_vtabptr_7pyarrow_3lib_LargeListArray) < (0)) __PYX_ERR(4, 2856, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeListArray) < (0)) __PYX_ERR(4, 2856, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_LargeListArray, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeListArray) < (0)) __PYX_ERR(4, 2856, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeListArray->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeListArray->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_LargeListArray, __pyx_base.__pyx_base.__pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_ListViewArray = &__pyx_vtable_7pyarrow_3lib_ListViewArray;
  __pyx_vtable_7pyarrow_3lib_ListViewArray.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_BaseListArray;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_BaseListArray); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 2998, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_ListViewArray = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_ListViewArray_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_ListViewArray)) __PYX_ERR(4, 2998, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_ListViewArray_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_ListViewArray) < (0)) __PYX_ERR(4, 2998, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_ListViewArray = &__pyx_type_7pyarrow_3lib_ListViewArray;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ListViewArray->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_BaseListArray;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_ListViewArray) < (0)) __PYX_ERR(4, 2998, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_ListViewArray);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_ListViewArray->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_ListViewArray->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_ListViewArray->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_ListViewArray, __pyx_vtabptr_7pyarrow_3lib_ListViewArray) < (0)) __PYX_ERR(4, 2998, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_ListViewArray) < (0)) __PYX_ERR(4, 2998, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_ListViewArray, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_ListViewArray) < (0)) __PYX_ERR(4, 2998, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_ListViewArray->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_ListViewArray->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_ListViewArray, __pyx_base.__pyx_base.__pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_LargeListViewArray = &__pyx_vtable_7pyarrow_3lib_LargeListViewArray;
  __pyx_vtable_7pyarrow_3lib_LargeListViewArray.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_BaseListArray;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_BaseListArray); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 3219, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeListViewArray = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_LargeListViewArray_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeListViewArray)) __PYX_ERR(4, 3219, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_LargeListViewArray_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeListViewArray) < (0)) __PYX_ERR(4, 3219, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeListViewArray = &__pyx_type_7pyarrow_3lib_LargeListViewArray;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_LargeListViewArray->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_BaseListArray;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeListViewArray) < (0)) __PYX_ERR(4, 3219, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeListViewArray);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeListViewArray->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeListViewArray->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeListViewArray->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeListViewArray, __pyx_vtabptr_7pyarrow_3lib_LargeListViewArray) < (0)) __PYX_ERR(4, 3219, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeListViewArray) < (0)) __PYX_ERR(4, 3219, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_LargeListViewArray, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeListViewArray) < (0)) __PYX_ERR(4, 3219, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeListViewArray->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeListViewArray->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_LargeListViewArray, __pyx_base.__pyx_base.__pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_MapArray = &__pyx_vtable_7pyarrow_3lib_MapArray;
  __pyx_vtable_7pyarrow_3lib_MapArray.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_ListArray;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ListArray); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 3448, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_MapArray = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_MapArray_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_MapArray)) __PYX_ERR(4, 3448, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_MapArray_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_MapArray) < (0)) __PYX_ERR(4, 3448, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_MapArray = &__pyx_type_7pyarrow_3lib_MapArray;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_MapArray->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ListArray;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_MapArray) < (0)) __PYX_ERR(4, 3448, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_MapArray);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_MapArray->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_MapArray->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_MapArray->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_MapArray, __pyx_vtabptr_7pyarrow_3lib_MapArray) < (0)) __PYX_ERR(4, 3448, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_MapArray) < (0)) __PYX_ERR(4, 3448, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_MapArray, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_MapArray) < (0)) __PYX_ERR(4, 3448, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_MapArray->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_MapArray->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_MapArray, __pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_FixedSizeListArray = &__pyx_vtable_7pyarrow_3lib_FixedSizeListArray;
  __pyx_vtable_7pyarrow_3lib_FixedSizeListArray.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_BaseListArray;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_BaseListArray); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 3585, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedSizeListArray = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_FixedSizeListArray_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedSizeListArray)) __PYX_ERR(4, 3585, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_FixedSizeListArray_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedSizeListArray) < (0)) __PYX_ERR(4, 3585, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedSizeListArray = &__pyx_type_7pyarrow_3lib_FixedSizeListArray;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_FixedSizeListArray->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_BaseListArray;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedSizeListArray) < (0)) __PYX_ERR(4, 3585, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedSizeListArray);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedSizeListArray->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedSizeListArray->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedSizeListArray->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedSizeListArray, __pyx_vtabptr_7pyarrow_3lib_FixedSizeListArray) < (0)) __PYX_ERR(4, 3585, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedSizeListArray) < (0)) __PYX_ERR(4, 3585, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_FixedSizeListArray, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedSizeListArray) < (0)) __PYX_ERR(4, 3585, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedSizeListArray->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedSizeListArray->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_FixedSizeListArray, __pyx_base.__pyx_base.__pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_UnionArray = &__pyx_vtable_7pyarrow_3lib_UnionArray;
  __pyx_vtable_7pyarrow_3lib_UnionArray.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_Array;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 3717, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_UnionArray = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_UnionArray_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_UnionArray)) __PYX_ERR(4, 3717, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_UnionArray_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_UnionArray) < (0)) __PYX_ERR(4, 3717, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_UnionArray = &__pyx_type_7pyarrow_3lib_UnionArray;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_UnionArray->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_UnionArray) < (0)) __PYX_ERR(4, 3717, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_UnionArray);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_UnionArray->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_UnionArray->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_UnionArray->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_UnionArray, __pyx_vtabptr_7pyarrow_3lib_UnionArray) < (0)) __PYX_ERR(4, 3717, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_UnionArray) < (0)) __PYX_ERR(4, 3717, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_UnionArray, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_UnionArray) < (0)) __PYX_ERR(4, 3717, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_UnionArray->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_UnionArray->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_UnionArray, __pyx_base.__pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_StringArray = &__pyx_vtable_7pyarrow_3lib_StringArray;
  __pyx_vtable_7pyarrow_3lib_StringArray.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_Array;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 3871, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_StringArray = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_StringArray_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_StringArray)) __PYX_ERR(4, 3871, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_StringArray_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_StringArray) < (0)) __PYX_ERR(4, 3871, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_StringArray = &__pyx_type_7pyarrow_3lib_StringArray;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_StringArray->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_StringArray) < (0)) __PYX_ERR(4, 3871, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_StringArray);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_StringArray->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_StringArray->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_StringArray->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_StringArray, __pyx_vtabptr_7pyarrow_3lib_StringArray) < (0)) __PYX_ERR(4, 3871, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_StringArray) < (0)) __PYX_ERR(4, 3871, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_StringArray, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_StringArray) < (0)) __PYX_ERR(4, 3871, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_StringArray->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_StringArray->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_StringArray, __pyx_base.__pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_BinaryArray = &__pyx_vtable_7pyarrow_3lib_BinaryArray;
  __pyx_vtable_7pyarrow_3lib_BinaryArray.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_Array;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 3941, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_BinaryArray = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_BinaryArray_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_BinaryArray)) __PYX_ERR(4, 3941, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_BinaryArray_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_BinaryArray) < (0)) __PYX_ERR(4, 3941, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_BinaryArray = &__pyx_type_7pyarrow_3lib_BinaryArray;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_BinaryArray->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_BinaryArray) < (0)) __PYX_ERR(4, 3941, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_BinaryArray);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_BinaryArray->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_BinaryArray->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_BinaryArray->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_BinaryArray, __pyx_vtabptr_7pyarrow_3lib_BinaryArray) < (0)) __PYX_ERR(4, 3941, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_BinaryArray) < (0)) __PYX_ERR(4, 3941, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_BinaryArray, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_BinaryArray) < (0)) __PYX_ERR(4, 3941, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_BinaryArray->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_BinaryArray->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_BinaryArray, __pyx_base.__pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_StringViewArray = &__pyx_vtable_7pyarrow_3lib_StringViewArray;
  __pyx_vtable_7pyarrow_3lib_StringViewArray.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_Array;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 3935, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_StringViewArray = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_StringViewArray_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_StringViewArray)) __PYX_ERR(4, 3935, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_StringViewArray_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_StringViewArray) < (0)) __PYX_ERR(4, 3935, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_StringViewArray = &__pyx_type_7pyarrow_3lib_StringViewArray;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_StringViewArray->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_StringViewArray) < (0)) __PYX_ERR(4, 3935, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_StringViewArray);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_StringViewArray->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_StringViewArray->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_StringViewArray->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_StringViewArray, __pyx_vtabptr_7pyarrow_3lib_StringViewArray) < (0)) __PYX_ERR(4, 3935, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_StringViewArray) < (0)) __PYX_ERR(4, 3935, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_StringViewArray, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_StringViewArray) < (0)) __PYX_ERR(4, 3935, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_StringViewArray->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_StringViewArray->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_StringViewArray, __pyx_base.__pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_BinaryViewArray = &__pyx_vtable_7pyarrow_3lib_BinaryViewArray;
  __pyx_vtable_7pyarrow_3lib_BinaryViewArray.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_Array;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 3967, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_BinaryViewArray = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_BinaryViewArray_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_BinaryViewArray)) __PYX_ERR(4, 3967, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_BinaryViewArray_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_BinaryViewArray) < (0)) __PYX_ERR(4, 3967, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_BinaryViewArray = &__pyx_type_7pyarrow_3lib_BinaryViewArray;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_BinaryViewArray->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_BinaryViewArray) < (0)) __PYX_ERR(4, 3967, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_BinaryViewArray);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_BinaryViewArray->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_BinaryViewArray->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_BinaryViewArray->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_BinaryViewArray, __pyx_vtabptr_7pyarrow_3lib_BinaryViewArray) < (0)) __PYX_ERR(4, 3967, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_BinaryViewArray) < (0)) __PYX_ERR(4, 3967, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_BinaryViewArray, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_BinaryViewArray) < (0)) __PYX_ERR(4, 3967, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_BinaryViewArray->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_BinaryViewArray->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_BinaryViewArray, __pyx_base.__pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_DictionaryArray = &__pyx_vtable_7pyarrow_3lib_DictionaryArray;
  __pyx_vtable_7pyarrow_3lib_DictionaryArray.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_Array;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 3973, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_DictionaryArray = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_DictionaryArray_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_DictionaryArray)) __PYX_ERR(4, 3973, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_DictionaryArray_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_DictionaryArray) < (0)) __PYX_ERR(4, 3973, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_DictionaryArray = &__pyx_type_7pyarrow_3lib_DictionaryArray;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DictionaryArray->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_DictionaryArray) < (0)) __PYX_ERR(4, 3973, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_DictionaryArray);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_DictionaryArray->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_DictionaryArray->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_DictionaryArray->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_DictionaryArray, __pyx_vtabptr_7pyarrow_3lib_DictionaryArray) < (0)) __PYX_ERR(4, 3973, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_DictionaryArray) < (0)) __PYX_ERR(4, 3973, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_DictionaryArray, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_DictionaryArray) < (0)) __PYX_ERR(4, 3973, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_DictionaryArray->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_DictionaryArray->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_DictionaryArray, __pyx_base.__pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_ExtensionArray = &__pyx_vtable_7pyarrow_3lib_ExtensionArray;
  __pyx_vtable_7pyarrow_3lib_ExtensionArray.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_Array;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 4502, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_ExtensionArray = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_ExtensionArray_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_ExtensionArray)) __PYX_ERR(4, 4502, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_ExtensionArray_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_ExtensionArray) < (0)) __PYX_ERR(4, 4502, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_ExtensionArray = &__pyx_type_7pyarrow_3lib_ExtensionArray;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ExtensionArray->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_ExtensionArray) < (0)) __PYX_ERR(4, 4502, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_ExtensionArray);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_ExtensionArray->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_ExtensionArray->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_ExtensionArray->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_ExtensionArray, __pyx_vtabptr_7pyarrow_3lib_ExtensionArray) < (0)) __PYX_ERR(4, 4502, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_ExtensionArray) < (0)) __PYX_ERR(4, 4502, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_ExtensionArray, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_ExtensionArray) < (0)) __PYX_ERR(4, 4502, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_ExtensionArray->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_ExtensionArray->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_ExtensionArray, __pyx_base.__pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_MonthDayNanoIntervalArray = &__pyx_vtable_7pyarrow_3lib_MonthDayNanoIntervalArray;
  __pyx_vtable_7pyarrow_3lib_MonthDayNanoIntervalArray.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_Array;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 2458, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_MonthDayNanoIntervalArray = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_MonthDayNanoIntervalArray_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_MonthDayNanoIntervalArray)) __PYX_ERR(4, 2458, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_MonthDayNanoIntervalArray_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_MonthDayNanoIntervalArray) < (0)) __PYX_ERR(4, 2458, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_MonthDayNanoIntervalArray = &__pyx_type_7pyarrow_3lib_MonthDayNanoIntervalArray;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_MonthDayNanoIntervalArray->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_MonthDayNanoIntervalArray) < (0)) __PYX_ERR(4, 2458, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_MonthDayNanoIntervalArray);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_MonthDayNanoIntervalArray->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_MonthDayNanoIntervalArray->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_MonthDayNanoIntervalArray->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_MonthDayNanoIntervalArray, __pyx_vtabptr_7pyarrow_3lib_MonthDayNanoIntervalArray) < (0)) __PYX_ERR(4, 2458, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_MonthDayNanoIntervalArray) < (0)) __PYX_ERR(4, 2458, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_MonthDayNanoIntervalArray, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_MonthDayNanoIntervalArray) < (0)) __PYX_ERR(4, 2458, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_MonthDayNanoIntervalArray->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_MonthDayNanoIntervalArray->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_MonthDayNanoIntervalArray, __pyx_base.__pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_ChunkedArray = &__pyx_vtable_7pyarrow_3lib_ChunkedArray;
  __pyx_vtable_7pyarrow_3lib_ChunkedArray.init = (void (*)(struct __pyx_obj_7pyarrow_3lib_ChunkedArray *, std::shared_ptr< arrow::ChunkedArray>  const &))__pyx_f_7pyarrow_3lib_12ChunkedArray_init;
  __pyx_vtable_7pyarrow_3lib_ChunkedArray.getitem = (PyObject *(*)(struct __pyx_obj_7pyarrow_3lib_ChunkedArray *, int64_t))__pyx_f_7pyarrow_3lib_12ChunkedArray_getitem;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__PandasConvertible); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 24, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_ChunkedArray = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_ChunkedArray_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_ChunkedArray)) __PYX_ERR(17, 24, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_ChunkedArray_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_ChunkedArray) < (0)) __PYX_ERR(17, 24, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_ChunkedArray = &__pyx_type_7pyarrow_3lib_ChunkedArray;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ChunkedArray->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__PandasConvertible;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_ChunkedArray) < (0)) __PYX_ERR(17, 24, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_ChunkedArray);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_ChunkedArray->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_ChunkedArray->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_ChunkedArray->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  #if CYTHON_UPDATE_DESCRIPTOR_DOC
  {
    PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_ChunkedArray, "__getitem__"); if (unlikely(!wrapper)) __PYX_ERR(17, 24, __pyx_L1_error)
    if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
      __pyx_wrapperbase_7pyarrow_3lib_12ChunkedArray_27__getitem__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_7pyarrow_3lib_12ChunkedArray_27__getitem__.doc = __pyx_doc_7pyarrow_3lib_12ChunkedArray_27__getitem__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_7pyarrow_3lib_12ChunkedArray_27__getitem__;
    }
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_ChunkedArray, __pyx_vtabptr_7pyarrow_3lib_ChunkedArray) < (0)) __PYX_ERR(17, 24, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_ChunkedArray) < (0)) __PYX_ERR(17, 24, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_ChunkedArray, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_ChunkedArray) < (0)) __PYX_ERR(17, 24, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_ChunkedArray->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_ChunkedArray->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_ChunkedArray, __pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib__Tabular = &__pyx_vtable_7pyarrow_3lib__Tabular;
  __pyx_vtable_7pyarrow_3lib__Tabular._assert_cpu = (void (*)(struct __pyx_obj_7pyarrow_3lib__Tabular *))__pyx_f_7pyarrow_3lib_8_Tabular__assert_cpu;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__PandasConvertible); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 1630, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib__Tabular = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib__Tabular_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib__Tabular)) __PYX_ERR(17, 1630, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib__Tabular_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib__Tabular) < (0)) __PYX_ERR(17, 1630, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib__Tabular = &__pyx_type_7pyarrow_3lib__Tabular;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Tabular->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__PandasConvertible;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib__Tabular) < (0)) __PYX_ERR(17, 1630, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib__Tabular);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib__Tabular->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib__Tabular->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib__Tabular->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  #if CYTHON_UPDATE_DESCRIPTOR_DOC
  {
    PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_mstate->__pyx_ptype_7pyarrow_3lib__Tabular, "__getitem__"); if (unlikely(!wrapper)) __PYX_ERR(17, 1630, __pyx_L1_error)
    if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
      __pyx_wrapperbase_7pyarrow_3lib_8_Tabular_8__getitem__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_7pyarrow_3lib_8_Tabular_8__getitem__.doc = __pyx_doc_7pyarrow_3lib_8_Tabular_8__getitem__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_7pyarrow_3lib_8_Tabular_8__getitem__;
    }
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib__Tabular, __pyx_vtabptr_7pyarrow_3lib__Tabular) < (0)) __PYX_ERR(17, 1630, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib__Tabular) < (0)) __PYX_ERR(17, 1630, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_Tabular, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib__Tabular) < (0)) __PYX_ERR(17, 1630, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib__Tabular->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib__Tabular->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib__Tabular, __pyx_base.__pyx_base.__weakref__);
  #endif
  if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib__Tabular) < (0)) __PYX_ERR(17, 1630, __pyx_L1_error)
  __pyx_vtabptr_7pyarrow_3lib_Table = &__pyx_vtable_7pyarrow_3lib_Table;
  __pyx_vtable_7pyarrow_3lib_Table.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib__Tabular;
  __pyx_vtable_7pyarrow_3lib_Table.__pyx_base._assert_cpu = (void (*)(struct __pyx_obj_7pyarrow_3lib__Tabular *))__pyx_f_7pyarrow_3lib_5Table__assert_cpu;
  __pyx_vtable_7pyarrow_3lib_Table.init = (void (*)(struct __pyx_obj_7pyarrow_3lib_Table *, std::shared_ptr< arrow::Table>  const &))__pyx_f_7pyarrow_3lib_5Table_init;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Tabular); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 4112, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Table = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_Table_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Table)) __PYX_ERR(17, 4112, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_Table_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Table) < (0)) __PYX_ERR(17, 4112, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Table = &__pyx_type_7pyarrow_3lib_Table;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Table->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Tabular;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Table) < (0)) __PYX_ERR(17, 4112, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Table);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Table->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Table->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Table->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Table, __pyx_vtabptr_7pyarrow_3lib_Table) < (0)) __PYX_ERR(17, 4112, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Table) < (0)) __PYX_ERR(17, 4112, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_Table, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Table) < (0)) __PYX_ERR(17, 4112, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Table->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Table->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_Table, __pyx_base.__pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_RecordBatch = &__pyx_vtable_7pyarrow_3lib_RecordBatch;
  __pyx_vtable_7pyarrow_3lib_RecordBatch.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib__Tabular;
  __pyx_vtable_7pyarrow_3lib_RecordBatch.__pyx_base._assert_cpu = (void (*)(struct __pyx_obj_7pyarrow_3lib__Tabular *))__pyx_f_7pyarrow_3lib_11RecordBatch__assert_cpu;
  __pyx_vtable_7pyarrow_3lib_RecordBatch.init = (void (*)(struct __pyx_obj_7pyarrow_3lib_RecordBatch *, std::shared_ptr< arrow::RecordBatch>  const &))__pyx_f_7pyarrow_3lib_11RecordBatch_init;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Tabular); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 2500, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_RecordBatch = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_RecordBatch_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_RecordBatch)) __PYX_ERR(17, 2500, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_RecordBatch_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_RecordBatch) < (0)) __PYX_ERR(17, 2500, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_RecordBatch = &__pyx_type_7pyarrow_3lib_RecordBatch;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RecordBatch->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Tabular;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_RecordBatch) < (0)) __PYX_ERR(17, 2500, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_RecordBatch);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_RecordBatch->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_RecordBatch->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_RecordBatch->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_RecordBatch, __pyx_vtabptr_7pyarrow_3lib_RecordBatch) < (0)) __PYX_ERR(17, 2500, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_RecordBatch) < (0)) __PYX_ERR(17, 2500, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_RecordBatch, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_RecordBatch) < (0)) __PYX_ERR(17, 2500, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_RecordBatch->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_RecordBatch->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_RecordBatch, __pyx_base.__pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_Device = &__pyx_vtable_7pyarrow_3lib_Device;
  __pyx_vtable_7pyarrow_3lib_Device.init = (void (*)(struct __pyx_obj_7pyarrow_3lib_Device *, std::shared_ptr< arrow::Device>  const &))__pyx_f_7pyarrow_3lib_6Device_init;
  __pyx_vtable_7pyarrow_3lib_Device.wrap = (PyObject *(*)(std::shared_ptr< arrow::Device>  const &))__pyx_f_7pyarrow_3lib_6Device_wrap;
  __pyx_vtable_7pyarrow_3lib_Device.unwrap = (std::shared_ptr< arrow::Device>  (*)(struct __pyx_obj_7pyarrow_3lib_Device *))__pyx_f_7pyarrow_3lib_6Device_unwrap;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Weakrefable); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 44, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Device = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_Device_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Device)) __PYX_ERR(14, 44, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_Device_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Device) < (0)) __PYX_ERR(14, 44, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Device = &__pyx_type_7pyarrow_3lib_Device;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Device->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Weakrefable;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Device) < (0)) __PYX_ERR(14, 44, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Device);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Device->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Device->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Device->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Device, __pyx_vtabptr_7pyarrow_3lib_Device) < (0)) __PYX_ERR(14, 44, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Device) < (0)) __PYX_ERR(14, 44, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_Device, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Device) < (0)) __PYX_ERR(14, 44, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Device->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Device->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_Device, __pyx_base.__weakref__);
  #endif
  if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Device) < (0)) __PYX_ERR(14, 44, __pyx_L1_error)
  __pyx_vtabptr_7pyarrow_3lib_MemoryManager = &__pyx_vtable_7pyarrow_3lib_MemoryManager;
  __pyx_vtable_7pyarrow_3lib_MemoryManager.init = (void (*)(struct __pyx_obj_7pyarrow_3lib_MemoryManager *, std::shared_ptr< arrow::MemoryManager>  const &))__pyx_f_7pyarrow_3lib_13MemoryManager_init;
  __pyx_vtable_7pyarrow_3lib_MemoryManager.wrap = (PyObject *(*)(std::shared_ptr< arrow::MemoryManager>  const &))__pyx_f_7pyarrow_3lib_13MemoryManager_wrap;
  __pyx_vtable_7pyarrow_3lib_MemoryManager.unwrap = (std::shared_ptr< arrow::MemoryManager>  (*)(struct __pyx_obj_7pyarrow_3lib_MemoryManager *))__pyx_f_7pyarrow_3lib_13MemoryManager_unwrap;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Weakrefable); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 113, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_MemoryManager = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_MemoryManager_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_MemoryManager)) __PYX_ERR(14, 113, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_MemoryManager_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_MemoryManager) < (0)) __PYX_ERR(14, 113, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_MemoryManager = &__pyx_type_7pyarrow_3lib_MemoryManager;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_MemoryManager->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Weakrefable;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_MemoryManager) < (0)) __PYX_ERR(14, 113, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_MemoryManager);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_MemoryManager->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_MemoryManager->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_MemoryManager->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_MemoryManager, __pyx_vtabptr_7pyarrow_3lib_MemoryManager) < (0)) __PYX_ERR(14, 113, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_MemoryManager) < (0)) __PYX_ERR(14, 113, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_MemoryManager, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_MemoryManager) < (0)) __PYX_ERR(14, 113, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_MemoryManager->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_MemoryManager->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_MemoryManager, __pyx_base.__weakref__);
  #endif
  if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_MemoryManager) < (0)) __PYX_ERR(14, 113, __pyx_L1_error)
  __pyx_vtabptr_7pyarrow_3lib_Buffer = &__pyx_vtable_7pyarrow_3lib_Buffer;
  __pyx_vtable_7pyarrow_3lib_Buffer.init = (void (*)(struct __pyx_obj_7pyarrow_3lib_Buffer *, std::shared_ptr< arrow::Buffer>  const &))__pyx_f_7pyarrow_3lib_6Buffer_init;
  __pyx_vtable_7pyarrow_3lib_Buffer.getitem = (PyObject *(*)(struct __pyx_obj_7pyarrow_3lib_Buffer *, int64_t))__pyx_f_7pyarrow_3lib_6Buffer_getitem;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Weakrefable); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 1334, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Buffer = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_Buffer_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Buffer)) __PYX_ERR(6, 1334, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Buffer->tp_as_buffer = &__pyx_tp_as_buffer_Buffer;
  if (!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Buffer->tp_as_buffer->bf_releasebuffer && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Buffer->tp_base->tp_as_buffer && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Buffer->tp_base->tp_as_buffer->bf_releasebuffer) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Buffer->tp_as_buffer->bf_releasebuffer = __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Buffer->tp_base->tp_as_buffer->bf_releasebuffer;
  }
  #elif defined(Py_bf_getbuffer) && defined(Py_bf_releasebuffer)
  /* PY_VERSION_HEX >= 0x03090000 || Py_LIMITED_API >= 0x030B0000 */
  #elif defined(_MSC_VER)
  #pragma message ("The buffer protocol is not supported in the Limited C-API < 3.11.")
  #else
  #warning "The buffer protocol is not supported in the Limited C-API < 3.11."
  #endif
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_Buffer_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Buffer) < (0)) __PYX_ERR(6, 1334, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Buffer = &__pyx_type_7pyarrow_3lib_Buffer;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Buffer->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Weakrefable;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Buffer) < (0)) __PYX_ERR(6, 1334, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Buffer);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Buffer->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Buffer->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Buffer->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Buffer, __pyx_vtabptr_7pyarrow_3lib_Buffer) < (0)) __PYX_ERR(6, 1334, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Buffer) < (0)) __PYX_ERR(6, 1334, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_Buffer, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Buffer) < (0)) __PYX_ERR(6, 1334, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Buffer->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Buffer->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_Buffer, __pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_ResizableBuffer = &__pyx_vtable_7pyarrow_3lib_ResizableBuffer;
  __pyx_vtable_7pyarrow_3lib_ResizableBuffer.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_Buffer;
  __pyx_vtable_7pyarrow_3lib_ResizableBuffer.init_rz = (void (*)(struct __pyx_obj_7pyarrow_3lib_ResizableBuffer *, std::shared_ptr< arrow::ResizableBuffer>  const &))__pyx_f_7pyarrow_3lib_15ResizableBuffer_init_rz;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Buffer); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 1583, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_ResizableBuffer = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_ResizableBuffer_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_ResizableBuffer)) __PYX_ERR(6, 1583, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_ResizableBuffer_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_ResizableBuffer) < (0)) __PYX_ERR(6, 1583, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_ResizableBuffer = &__pyx_type_7pyarrow_3lib_ResizableBuffer;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ResizableBuffer->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Buffer;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_ResizableBuffer) < (0)) __PYX_ERR(6, 1583, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_ResizableBuffer);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_ResizableBuffer->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_ResizableBuffer->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_ResizableBuffer->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_ResizableBuffer, __pyx_vtabptr_7pyarrow_3lib_ResizableBuffer) < (0)) __PYX_ERR(6, 1583, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_ResizableBuffer) < (0)) __PYX_ERR(6, 1583, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_ResizableBuffer, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_ResizableBuffer) < (0)) __PYX_ERR(6, 1583, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_ResizableBuffer->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_ResizableBuffer->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_ResizableBuffer, __pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_NativeFile = &__pyx_vtable_7pyarrow_3lib_NativeFile;
  __pyx_vtable_7pyarrow_3lib_NativeFile.set_random_access_file = (PyObject *(*)(struct __pyx_obj_7pyarrow_3lib_NativeFile *, std::shared_ptr< arrow::io::RandomAccessFile> ))__pyx_f_7pyarrow_3lib_10NativeFile_set_random_access_file;
  __pyx_vtable_7pyarrow_3lib_NativeFile.set_input_stream = (PyObject *(*)(struct __pyx_obj_7pyarrow_3lib_NativeFile *, std::shared_ptr< arrow::io::InputStream> ))__pyx_f_7pyarrow_3lib_10NativeFile_set_input_stream;
  __pyx_vtable_7pyarrow_3lib_NativeFile.set_output_stream = (PyObject *(*)(struct __pyx_obj_7pyarrow_3lib_NativeFile *, std::shared_ptr< arrow::io::OutputStream> ))__pyx_f_7pyarrow_3lib_10NativeFile_set_output_stream;
  __pyx_vtable_7pyarrow_3lib_NativeFile.get_random_access_file = (std::shared_ptr< arrow::io::RandomAccessFile>  (*)(struct __pyx_obj_7pyarrow_3lib_NativeFile *))__pyx_f_7pyarrow_3lib_10NativeFile_get_random_access_file;
  __pyx_vtable_7pyarrow_3lib_NativeFile.get_input_stream = (std::shared_ptr< arrow::io::InputStream>  (*)(struct __pyx_obj_7pyarrow_3lib_NativeFile *))__pyx_f_7pyarrow_3lib_10NativeFile_get_input_stream;
  __pyx_vtable_7pyarrow_3lib_NativeFile.get_output_stream = (std::shared_ptr< arrow::io::OutputStream>  (*)(struct __pyx_obj_7pyarrow_3lib_NativeFile *))__pyx_f_7pyarrow_3lib_10NativeFile_get_output_stream;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Weakrefable); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 101, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_NativeFile = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_NativeFile_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_NativeFile)) __PYX_ERR(6, 101, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_NativeFile_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_NativeFile) < (0)) __PYX_ERR(6, 101, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_NativeFile = &__pyx_type_7pyarrow_3lib_NativeFile;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NativeFile->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Weakrefable;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_NativeFile) < (0)) __PYX_ERR(6, 101, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_NativeFile);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_NativeFile->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_NativeFile->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_NativeFile->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_NativeFile, __pyx_vtabptr_7pyarrow_3lib_NativeFile) < (0)) __PYX_ERR(6, 101, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_NativeFile) < (0)) __PYX_ERR(6, 101, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_NativeFile, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_NativeFile) < (0)) __PYX_ERR(6, 101, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_NativeFile->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_NativeFile->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_NativeFile, __pyx_base.__weakref__);
  #endif
  if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_NativeFile) < (0)) __PYX_ERR(6, 101, __pyx_L1_error)
  __pyx_vtabptr_7pyarrow_3lib_BufferedInputStream = &__pyx_vtable_7pyarrow_3lib_BufferedInputStream;
  __pyx_vtable_7pyarrow_3lib_BufferedInputStream.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_NativeFile;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NativeFile); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 1845, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_BufferedInputStream = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_BufferedInputStream_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_BufferedInputStream)) __PYX_ERR(6, 1845, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_BufferedInputStream_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_BufferedInputStream) < (0)) __PYX_ERR(6, 1845, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_BufferedInputStream = &__pyx_type_7pyarrow_3lib_BufferedInputStream;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_BufferedInputStream->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NativeFile;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_BufferedInputStream) < (0)) __PYX_ERR(6, 1845, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_BufferedInputStream);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_BufferedInputStream->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_BufferedInputStream->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_BufferedInputStream->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_BufferedInputStream, __pyx_vtabptr_7pyarrow_3lib_BufferedInputStream) < (0)) __PYX_ERR(6, 1845, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_BufferedInputStream) < (0)) __PYX_ERR(6, 1845, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_BufferedInputStream, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_BufferedInputStream) < (0)) __PYX_ERR(6, 1845, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_BufferedInputStream->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_BufferedInputStream->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_BufferedInputStream, __pyx_base.__pyx_base.__weakref__);
  #endif
  if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_BufferedInputStream) < (0)) __PYX_ERR(6, 1845, __pyx_L1_error)
  __pyx_vtabptr_7pyarrow_3lib_BufferedOutputStream = &__pyx_vtable_7pyarrow_3lib_BufferedOutputStream;
  __pyx_vtable_7pyarrow_3lib_BufferedOutputStream.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_NativeFile;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NativeFile); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 1909, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_BufferedOutputStream = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_BufferedOutputStream_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_BufferedOutputStream)) __PYX_ERR(6, 1909, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_BufferedOutputStream_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_BufferedOutputStream) < (0)) __PYX_ERR(6, 1909, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_BufferedOutputStream = &__pyx_type_7pyarrow_3lib_BufferedOutputStream;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_BufferedOutputStream->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NativeFile;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_BufferedOutputStream) < (0)) __PYX_ERR(6, 1909, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_BufferedOutputStream);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_BufferedOutputStream->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_BufferedOutputStream->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_BufferedOutputStream->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_BufferedOutputStream, __pyx_vtabptr_7pyarrow_3lib_BufferedOutputStream) < (0)) __PYX_ERR(6, 1909, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_BufferedOutputStream) < (0)) __PYX_ERR(6, 1909, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_BufferedOutputStream, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_BufferedOutputStream) < (0)) __PYX_ERR(6, 1909, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_BufferedOutputStream->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_BufferedOutputStream->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_BufferedOutputStream, __pyx_base.__pyx_base.__weakref__);
  #endif
  if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_BufferedOutputStream) < (0)) __PYX_ERR(6, 1909, __pyx_L1_error)
  __pyx_vtabptr_7pyarrow_3lib_CompressedInputStream = &__pyx_vtable_7pyarrow_3lib_CompressedInputStream;
  __pyx_vtable_7pyarrow_3lib_CompressedInputStream.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_NativeFile;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NativeFile); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 1746, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_CompressedInputStream = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_CompressedInputStream_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_CompressedInputStream)) __PYX_ERR(6, 1746, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_CompressedInputStream_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_CompressedInputStream) < (0)) __PYX_ERR(6, 1746, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_CompressedInputStream = &__pyx_type_7pyarrow_3lib_CompressedInputStream;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_CompressedInputStream->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NativeFile;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_CompressedInputStream) < (0)) __PYX_ERR(6, 1746, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_CompressedInputStream);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_CompressedInputStream->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_CompressedInputStream->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_CompressedInputStream->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_CompressedInputStream, __pyx_vtabptr_7pyarrow_3lib_CompressedInputStream) < (0)) __PYX_ERR(6, 1746, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_CompressedInputStream) < (0)) __PYX_ERR(6, 1746, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_CompressedInputStream, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_CompressedInputStream) < (0)) __PYX_ERR(6, 1746, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_CompressedInputStream->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_CompressedInputStream->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_CompressedInputStream, __pyx_base.__pyx_base.__weakref__);
  #endif
  if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_CompressedInputStream) < (0)) __PYX_ERR(6, 1746, __pyx_L1_error)
  __pyx_vtabptr_7pyarrow_3lib_CompressedOutputStream = &__pyx_vtable_7pyarrow_3lib_CompressedOutputStream;
  __pyx_vtable_7pyarrow_3lib_CompressedOutputStream.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_NativeFile;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NativeFile); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 1803, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_CompressedOutputStream = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_CompressedOutputStream_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_CompressedOutputStream)) __PYX_ERR(6, 1803, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_CompressedOutputStream_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_CompressedOutputStream) < (0)) __PYX_ERR(6, 1803, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_CompressedOutputStream = &__pyx_type_7pyarrow_3lib_CompressedOutputStream;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_CompressedOutputStream->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NativeFile;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_CompressedOutputStream) < (0)) __PYX_ERR(6, 1803, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_CompressedOutputStream);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_CompressedOutputStream->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_CompressedOutputStream->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_CompressedOutputStream->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_CompressedOutputStream, __pyx_vtabptr_7pyarrow_3lib_CompressedOutputStream) < (0)) __PYX_ERR(6, 1803, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_CompressedOutputStream) < (0)) __PYX_ERR(6, 1803, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_CompressedOutputStream, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_CompressedOutputStream) < (0)) __PYX_ERR(6, 1803, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_CompressedOutputStream->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_CompressedOutputStream->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_CompressedOutputStream, __pyx_base.__pyx_base.__weakref__);
  #endif
  if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_CompressedOutputStream) < (0)) __PYX_ERR(6, 1803, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Weakrefable); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 556, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib__CRecordBatchWriter = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib__CRecordBatchWriter_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib__CRecordBatchWriter)) __PYX_ERR(19, 556, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib__CRecordBatchWriter_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib__CRecordBatchWriter) < (0)) __PYX_ERR(19, 556, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib__CRecordBatchWriter = &__pyx_type_7pyarrow_3lib__CRecordBatchWriter;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__CRecordBatchWriter->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Weakrefable;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib__CRecordBatchWriter) < (0)) __PYX_ERR(19, 556, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib__CRecordBatchWriter);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib__CRecordBatchWriter->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib__CRecordBatchWriter->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib__CRecordBatchWriter->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_CRecordBatchWriter, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib__CRecordBatchWriter) < (0)) __PYX_ERR(19, 556, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib__CRecordBatchWriter->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib__CRecordBatchWriter->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib__CRecordBatchWriter, __pyx_base.__weakref__);
  #endif
  if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib__CRecordBatchWriter) < (0)) __PYX_ERR(19, 556, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Weakrefable); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 708, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_RecordBatchReader = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_RecordBatchReader_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_RecordBatchReader)) __PYX_ERR(19, 708, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_RecordBatchReader_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_RecordBatchReader) < (0)) __PYX_ERR(19, 708, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_RecordBatchReader = &__pyx_type_7pyarrow_3lib_RecordBatchReader;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RecordBatchReader->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Weakrefable;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_RecordBatchReader) < (0)) __PYX_ERR(19, 708, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_RecordBatchReader);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_RecordBatchReader->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_RecordBatchReader->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_RecordBatchReader->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_RecordBatchReader, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_RecordBatchReader) < (0)) __PYX_ERR(19, 708, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_RecordBatchReader->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_RecordBatchReader->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_RecordBatchReader, __pyx_base.__weakref__);
  #endif
  if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_RecordBatchReader) < (0)) __PYX_ERR(19, 708, __pyx_L1_error)
  __pyx_vtabptr_7pyarrow_3lib_CacheOptions = &__pyx_vtable_7pyarrow_3lib_CacheOptions;
  __pyx_vtable_7pyarrow_3lib_CacheOptions.init = (void (*)(struct __pyx_obj_7pyarrow_3lib_CacheOptions *, arrow::io::CacheOptions))__pyx_f_7pyarrow_3lib_12CacheOptions_init;
  __pyx_vtable_7pyarrow_3lib_CacheOptions.unwrap = (arrow::io::CacheOptions (*)(struct __pyx_obj_7pyarrow_3lib_CacheOptions *))__pyx_f_7pyarrow_3lib_12CacheOptions_unwrap;
  __pyx_vtable_7pyarrow_3lib_CacheOptions.wrap = (PyObject *(*)(arrow::io::CacheOptions const ))__pyx_f_7pyarrow_3lib_12CacheOptions_wrap;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Weakrefable); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 2249, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_CacheOptions = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_CacheOptions_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_CacheOptions)) __PYX_ERR(6, 2249, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_CacheOptions_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_CacheOptions) < (0)) __PYX_ERR(6, 2249, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_CacheOptions = &__pyx_type_7pyarrow_3lib_CacheOptions;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_CacheOptions->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Weakrefable;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_CacheOptions) < (0)) __PYX_ERR(6, 2249, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_CacheOptions);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_CacheOptions->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_CacheOptions->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_CacheOptions->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_CacheOptions, __pyx_vtabptr_7pyarrow_3lib_CacheOptions) < (0)) __PYX_ERR(6, 2249, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_CacheOptions) < (0)) __PYX_ERR(6, 2249, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_CacheOptions, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_CacheOptions) < (0)) __PYX_ERR(6, 2249, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_CacheOptions->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_CacheOptions->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_CacheOptions, __pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_Codec = &__pyx_vtable_7pyarrow_3lib_Codec;
  __pyx_vtable_7pyarrow_3lib_Codec.unwrap = ( arrow::util::Codec *(*)(struct __pyx_obj_7pyarrow_3lib_Codec *))__pyx_f_7pyarrow_3lib_5Codec_unwrap;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Weakrefable); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 2382, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Codec = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_Codec_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Codec)) __PYX_ERR(6, 2382, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_Codec_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Codec) < (0)) __PYX_ERR(6, 2382, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Codec = &__pyx_type_7pyarrow_3lib_Codec;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Codec->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Weakrefable;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Codec) < (0)) __PYX_ERR(6, 2382, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Codec);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Codec->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Codec->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Codec->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Codec, __pyx_vtabptr_7pyarrow_3lib_Codec) < (0)) __PYX_ERR(6, 2382, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Codec) < (0)) __PYX_ERR(6, 2382, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_Codec, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Codec) < (0)) __PYX_ERR(6, 2382, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Codec->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Codec->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_Codec, __pyx_base.__weakref__);
  #endif
  if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Codec) < (0)) __PYX_ERR(6, 2382, __pyx_L1_error)
  __pyx_vtabptr_7pyarrow_3lib_StopToken = &__pyx_vtable_7pyarrow_3lib_StopToken;
  __pyx_vtable_7pyarrow_3lib_StopToken.init = (void (*)(struct __pyx_obj_7pyarrow_3lib_StopToken *, arrow::StopToken))__pyx_f_7pyarrow_3lib_9StopToken_init;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_StopToken = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_StopToken_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_StopToken)) __PYX_ERR(2, 161, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_StopToken_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_StopToken) < (0)) __PYX_ERR(2, 161, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_StopToken = &__pyx_type_7pyarrow_3lib_StopToken;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_StopToken) < (0)) __PYX_ERR(2, 161, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_StopToken);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_StopToken->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_StopToken->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_StopToken->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_StopToken, __pyx_vtabptr_7pyarrow_3lib_StopToken) < (0)) __PYX_ERR(2, 161, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_StopToken) < (0)) __PYX_ERR(2, 161, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_StopToken, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_StopToken) < (0)) __PYX_ERR(2, 161, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_StopToken) < (0)) __PYX_ERR(2, 161, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SPECS
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_SignalStopHandler = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_SignalStopHandler_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_SignalStopHandler)) __PYX_ERR(2, 196, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_SignalStopHandler_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_SignalStopHandler) < (0)) __PYX_ERR(2, 196, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_SignalStopHandler = &__pyx_type_7pyarrow_3lib_SignalStopHandler;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_SignalStopHandler) < (0)) __PYX_ERR(2, 196, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_SignalStopHandler);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_SignalStopHandler->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_SignalStopHandler->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_SignalStopHandler->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_SignalStopHandler, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_SignalStopHandler) < (0)) __PYX_ERR(2, 196, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_SignalStopHandler) < (0)) __PYX_ERR(2, 196, __pyx_L1_error)
  __pyx_vtabptr_7pyarrow_3lib__PandasAPIShim = &__pyx_vtable_7pyarrow_3lib__PandasAPIShim;
  __pyx_vtable_7pyarrow_3lib__PandasAPIShim._import_pandas = (PyObject *(*)(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *, int))__pyx_f_7pyarrow_3lib_14_PandasAPIShim__import_pandas;
  __pyx_vtable_7pyarrow_3lib__PandasAPIShim._check_import = (PyObject *(*)(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *, struct __pyx_opt_args_7pyarrow_3lib_14_PandasAPIShim__check_import *__pyx_optional_args))__pyx_f_7pyarrow_3lib_14_PandasAPIShim__check_import;
  __pyx_vtable_7pyarrow_3lib__PandasAPIShim._have_pandas_internal = (int (*)(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *))__pyx_f_7pyarrow_3lib_14_PandasAPIShim__have_pandas_internal;
  __pyx_vtable_7pyarrow_3lib__PandasAPIShim.infer_dtype = (PyObject *(*)(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *, PyObject *, int __pyx_skip_dispatch))__pyx_f_7pyarrow_3lib_14_PandasAPIShim_infer_dtype;
  __pyx_vtable_7pyarrow_3lib__PandasAPIShim.pandas_dtype = (PyObject *(*)(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *, PyObject *, int __pyx_skip_dispatch))__pyx_f_7pyarrow_3lib_14_PandasAPIShim_pandas_dtype;
  __pyx_vtable_7pyarrow_3lib__PandasAPIShim.is_array_like = (PyObject *(*)(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *, PyObject *, int __pyx_skip_dispatch))__pyx_f_7pyarrow_3lib_14_PandasAPIShim_is_array_like;
  __pyx_vtable_7pyarrow_3lib__PandasAPIShim.is_categorical = (PyObject *(*)(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *, PyObject *, int __pyx_skip_dispatch))__pyx_f_7pyarrow_3lib_14_PandasAPIShim_is_categorical;
  __pyx_vtable_7pyarrow_3lib__PandasAPIShim.is_datetimetz = (PyObject *(*)(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *, PyObject *, int __pyx_skip_dispatch))__pyx_f_7pyarrow_3lib_14_PandasAPIShim_is_datetimetz;
  __pyx_vtable_7pyarrow_3lib__PandasAPIShim.is_extension_array_dtype = (PyObject *(*)(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *, PyObject *, int __pyx_skip_dispatch))__pyx_f_7pyarrow_3lib_14_PandasAPIShim_is_extension_array_dtype;
  __pyx_vtable_7pyarrow_3lib__PandasAPIShim.is_sparse = (PyObject *(*)(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *, PyObject *, int __pyx_skip_dispatch))__pyx_f_7pyarrow_3lib_14_PandasAPIShim_is_sparse;
  __pyx_vtable_7pyarrow_3lib__PandasAPIShim.is_data_frame = (PyObject *(*)(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *, PyObject *, int __pyx_skip_dispatch))__pyx_f_7pyarrow_3lib_14_PandasAPIShim_is_data_frame;
  __pyx_vtable_7pyarrow_3lib__PandasAPIShim.is_series = (PyObject *(*)(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *, PyObject *, int __pyx_skip_dispatch))__pyx_f_7pyarrow_3lib_14_PandasAPIShim_is_series;
  __pyx_vtable_7pyarrow_3lib__PandasAPIShim.is_index = (PyObject *(*)(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *, PyObject *, int __pyx_skip_dispatch))__pyx_f_7pyarrow_3lib_14_PandasAPIShim_is_index;
  __pyx_vtable_7pyarrow_3lib__PandasAPIShim.get_values = (PyObject *(*)(struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *, PyObject *, int __pyx_skip_dispatch))__pyx_f_7pyarrow_3lib_14_PandasAPIShim_get_values;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib__PandasAPIShim = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib__PandasAPIShim_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib__PandasAPIShim)) __PYX_ERR(12, 24, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib__PandasAPIShim_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib__PandasAPIShim) < (0)) __PYX_ERR(12, 24, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib__PandasAPIShim = &__pyx_type_7pyarrow_3lib__PandasAPIShim;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib__PandasAPIShim) < (0)) __PYX_ERR(12, 24, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib__PandasAPIShim);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib__PandasAPIShim->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib__PandasAPIShim->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib__PandasAPIShim->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib__PandasAPIShim, __pyx_vtabptr_7pyarrow_3lib__PandasAPIShim) < (0)) __PYX_ERR(12, 24, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib__PandasAPIShim) < (0)) __PYX_ERR(12, 24, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_PandasAPIShim, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib__PandasAPIShim) < (0)) __PYX_ERR(12, 24, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib__PandasAPIShim) < (0)) __PYX_ERR(12, 24, __pyx_L1_error)
  __pyx_vtabptr_7pyarrow_3lib_LoggingMemoryPool = &__pyx_vtable_7pyarrow_3lib_LoggingMemoryPool;
  __pyx_vtable_7pyarrow_3lib_LoggingMemoryPool.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_MemoryPool;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_MemoryPool); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 123, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_LoggingMemoryPool = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_LoggingMemoryPool_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_LoggingMemoryPool)) __PYX_ERR(13, 123, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_LoggingMemoryPool_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_LoggingMemoryPool) < (0)) __PYX_ERR(13, 123, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_LoggingMemoryPool = &__pyx_type_7pyarrow_3lib_LoggingMemoryPool;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_LoggingMemoryPool->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_MemoryPool;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_LoggingMemoryPool) < (0)) __PYX_ERR(13, 123, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_LoggingMemoryPool);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_LoggingMemoryPool->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_LoggingMemoryPool->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_LoggingMemoryPool->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_LoggingMemoryPool, __pyx_vtabptr_7pyarrow_3lib_LoggingMemoryPool) < (0)) __PYX_ERR(13, 123, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_LoggingMemoryPool) < (0)) __PYX_ERR(13, 123, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_LoggingMemoryPool, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_LoggingMemoryPool) < (0)) __PYX_ERR(13, 123, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_LoggingMemoryPool->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_LoggingMemoryPool->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_LoggingMemoryPool, __pyx_base.__pyx_base.__weakref__);
  #endif
  if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_LoggingMemoryPool) < (0)) __PYX_ERR(13, 123, __pyx_L1_error)
  __pyx_vtabptr_7pyarrow_3lib_ProxyMemoryPool = &__pyx_vtable_7pyarrow_3lib_ProxyMemoryPool;
  __pyx_vtable_7pyarrow_3lib_ProxyMemoryPool.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_MemoryPool;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_MemoryPool); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 132, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_ProxyMemoryPool = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_ProxyMemoryPool_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_ProxyMemoryPool)) __PYX_ERR(13, 132, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_ProxyMemoryPool_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_ProxyMemoryPool) < (0)) __PYX_ERR(13, 132, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_ProxyMemoryPool = &__pyx_type_7pyarrow_3lib_ProxyMemoryPool;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ProxyMemoryPool->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_MemoryPool;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_ProxyMemoryPool) < (0)) __PYX_ERR(13, 132, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_ProxyMemoryPool);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_ProxyMemoryPool->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_ProxyMemoryPool->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_ProxyMemoryPool->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_ProxyMemoryPool, __pyx_vtabptr_7pyarrow_3lib_ProxyMemoryPool) < (0)) __PYX_ERR(13, 132, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_ProxyMemoryPool) < (0)) __PYX_ERR(13, 132, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_ProxyMemoryPool, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_ProxyMemoryPool) < (0)) __PYX_ERR(13, 132, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_ProxyMemoryPool->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_ProxyMemoryPool->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_ProxyMemoryPool, __pyx_base.__pyx_base.__weakref__);
  #endif
  if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_ProxyMemoryPool) < (0)) __PYX_ERR(13, 132, __pyx_L1_error)
  __pyx_vtabptr_7pyarrow_3lib_UnionType = &__pyx_vtable_7pyarrow_3lib_UnionType;
  __pyx_vtable_7pyarrow_3lib_UnionType.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_DataType;
  __pyx_vtable_7pyarrow_3lib_UnionType.__pyx_base.init = (void (*)(struct __pyx_obj_7pyarrow_3lib_DataType *, std::shared_ptr< arrow::DataType>  const &))__pyx_f_7pyarrow_3lib_9UnionType_init;
  __pyx_vtable_7pyarrow_3lib_UnionType.__pyx_base.field = (struct __pyx_obj_7pyarrow_3lib_Field *(*)(struct __pyx_obj_7pyarrow_3lib_DataType *, PyObject *, int __pyx_skip_dispatch))__pyx_f_7pyarrow_3lib_9UnionType_field;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1088, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_UnionType = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_UnionType_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_UnionType)) __PYX_ERR(1, 1088, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_UnionType_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_UnionType) < (0)) __PYX_ERR(1, 1088, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_UnionType = &__pyx_type_7pyarrow_3lib_UnionType;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_UnionType->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_UnionType) < (0)) __PYX_ERR(1, 1088, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_UnionType);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_UnionType->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_UnionType->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_UnionType->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  #if CYTHON_UPDATE_DESCRIPTOR_DOC
  {
    PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_UnionType, "__len__"); if (unlikely(!wrapper)) __PYX_ERR(1, 1088, __pyx_L1_error)
    if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
      __pyx_wrapperbase_7pyarrow_3lib_9UnionType___len__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_7pyarrow_3lib_9UnionType___len__.doc = __pyx_doc_7pyarrow_3lib_9UnionType___len__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_7pyarrow_3lib_9UnionType___len__;
    }
  }
  #endif
  #if CYTHON_UPDATE_DESCRIPTOR_DOC
  {
    PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_UnionType, "__iter__"); if (unlikely(!wrapper)) __PYX_ERR(1, 1088, __pyx_L1_error)
    if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
      __pyx_wrapperbase_7pyarrow_3lib_9UnionType_2__iter__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_7pyarrow_3lib_9UnionType_2__iter__.doc = __pyx_doc_7pyarrow_3lib_9UnionType_2__iter__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_7pyarrow_3lib_9UnionType_2__iter__;
    }
  }
  #endif
  #if CYTHON_UPDATE_DESCRIPTOR_DOC
  {
    PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_UnionType, "__getitem__"); if (unlikely(!wrapper)) __PYX_ERR(1, 1088, __pyx_L1_error)
    if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
      __pyx_wrapperbase_7pyarrow_3lib_9UnionType_7__getitem__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_7pyarrow_3lib_9UnionType_7__getitem__.doc = __pyx_doc_7pyarrow_3lib_9UnionType_7__getitem__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_7pyarrow_3lib_9UnionType_7__getitem__;
    }
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_UnionType, __pyx_vtabptr_7pyarrow_3lib_UnionType) < (0)) __PYX_ERR(1, 1088, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_UnionType) < (0)) __PYX_ERR(1, 1088, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_UnionType, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_UnionType) < (0)) __PYX_ERR(1, 1088, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_UnionType->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_UnionType->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_UnionType, __pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_SparseUnionType = &__pyx_vtable_7pyarrow_3lib_SparseUnionType;
  __pyx_vtable_7pyarrow_3lib_SparseUnionType.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_UnionType;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_UnionType); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1205, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_SparseUnionType = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_SparseUnionType_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_SparseUnionType)) __PYX_ERR(1, 1205, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_SparseUnionType_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_SparseUnionType) < (0)) __PYX_ERR(1, 1205, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_SparseUnionType = &__pyx_type_7pyarrow_3lib_SparseUnionType;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_SparseUnionType->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_UnionType;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_SparseUnionType) < (0)) __PYX_ERR(1, 1205, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_SparseUnionType);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_SparseUnionType->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_SparseUnionType->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_SparseUnionType->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_SparseUnionType, __pyx_vtabptr_7pyarrow_3lib_SparseUnionType) < (0)) __PYX_ERR(1, 1205, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_SparseUnionType) < (0)) __PYX_ERR(1, 1205, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_SparseUnionType, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_SparseUnionType) < (0)) __PYX_ERR(1, 1205, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_SparseUnionType->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_SparseUnionType->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_SparseUnionType, __pyx_base.__pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_DenseUnionType = &__pyx_vtable_7pyarrow_3lib_DenseUnionType;
  __pyx_vtable_7pyarrow_3lib_DenseUnionType.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_UnionType;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_UnionType); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1225, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_DenseUnionType = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_DenseUnionType_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_DenseUnionType)) __PYX_ERR(1, 1225, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_DenseUnionType_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_DenseUnionType) < (0)) __PYX_ERR(1, 1225, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_DenseUnionType = &__pyx_type_7pyarrow_3lib_DenseUnionType;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DenseUnionType->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_UnionType;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_DenseUnionType) < (0)) __PYX_ERR(1, 1225, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_DenseUnionType);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_DenseUnionType->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_DenseUnionType->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_DenseUnionType->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_DenseUnionType, __pyx_vtabptr_7pyarrow_3lib_DenseUnionType) < (0)) __PYX_ERR(1, 1225, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_DenseUnionType) < (0)) __PYX_ERR(1, 1225, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_DenseUnionType, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_DenseUnionType) < (0)) __PYX_ERR(1, 1225, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_DenseUnionType->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_DenseUnionType->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_DenseUnionType, __pyx_base.__pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_UnknownExtensionType = &__pyx_vtable_7pyarrow_3lib_UnknownExtensionType;
  __pyx_vtable_7pyarrow_3lib_UnknownExtensionType.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_ExtensionType;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ExtensionType); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2138, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_UnknownExtensionType = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_UnknownExtensionType_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_UnknownExtensionType)) __PYX_ERR(1, 2138, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_UnknownExtensionType_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_UnknownExtensionType) < (0)) __PYX_ERR(1, 2138, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_UnknownExtensionType = &__pyx_type_7pyarrow_3lib_UnknownExtensionType;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_UnknownExtensionType->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ExtensionType;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_UnknownExtensionType) < (0)) __PYX_ERR(1, 2138, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_UnknownExtensionType);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_UnknownExtensionType->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_UnknownExtensionType->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_UnknownExtensionType->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_UnknownExtensionType, __pyx_vtabptr_7pyarrow_3lib_UnknownExtensionType) < (0)) __PYX_ERR(1, 2138, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_UnknownExtensionType) < (0)) __PYX_ERR(1, 2138, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_UnknownExtensionType, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_UnknownExtensionType) < (0)) __PYX_ERR(1, 2138, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_UnknownExtensionType->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_UnknownExtensionType->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_UnknownExtensionType, __pyx_base.__pyx_base.__pyx_base.__pyx_base.__weakref__);
  #endif
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Weakrefable); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6012, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib__ExtensionRegistryNanny = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib__ExtensionRegistryNanny_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib__ExtensionRegistryNanny)) __PYX_ERR(1, 6012, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib__ExtensionRegistryNanny_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib__ExtensionRegistryNanny) < (0)) __PYX_ERR(1, 6012, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib__ExtensionRegistryNanny = &__pyx_type_7pyarrow_3lib__ExtensionRegistryNanny;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__ExtensionRegistryNanny->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Weakrefable;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib__ExtensionRegistryNanny) < (0)) __PYX_ERR(1, 6012, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib__ExtensionRegistryNanny);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib__ExtensionRegistryNanny->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib__ExtensionRegistryNanny->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib__ExtensionRegistryNanny->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_ExtensionRegistryNanny, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib__ExtensionRegistryNanny) < (0)) __PYX_ERR(1, 6012, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib__ExtensionRegistryNanny->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib__ExtensionRegistryNanny->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib__ExtensionRegistryNanny, __pyx_base.__weakref__);
  #endif
  if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib__ExtensionRegistryNanny) < (0)) __PYX_ERR(1, 6012, __pyx_L1_error)
  __pyx_vtabptr_7pyarrow_3lib_NullScalar = &__pyx_vtable_7pyarrow_3lib_NullScalar;
  __pyx_vtable_7pyarrow_3lib_NullScalar.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_Scalar;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Scalar); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 175, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_NullScalar = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_NullScalar_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_NullScalar)) __PYX_ERR(3, 175, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_NullScalar_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_NullScalar) < (0)) __PYX_ERR(3, 175, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_NullScalar = &__pyx_type_7pyarrow_3lib_NullScalar;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NullScalar->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Scalar;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_NullScalar) < (0)) __PYX_ERR(3, 175, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_NullScalar);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_NullScalar->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_NullScalar->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_NullScalar->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_NullScalar, __pyx_vtabptr_7pyarrow_3lib_NullScalar) < (0)) __PYX_ERR(3, 175, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_NullScalar) < (0)) __PYX_ERR(3, 175, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_NullScalar, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_NullScalar) < (0)) __PYX_ERR(3, 175, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_NullScalar->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_NullScalar->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_NullScalar, __pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_BooleanScalar = &__pyx_vtable_7pyarrow_3lib_BooleanScalar;
  __pyx_vtable_7pyarrow_3lib_BooleanScalar.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_Scalar;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Scalar); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 205, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_BooleanScalar = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_BooleanScalar_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_BooleanScalar)) __PYX_ERR(3, 205, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_BooleanScalar_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_BooleanScalar) < (0)) __PYX_ERR(3, 205, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_BooleanScalar = &__pyx_type_7pyarrow_3lib_BooleanScalar;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_BooleanScalar->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Scalar;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_BooleanScalar) < (0)) __PYX_ERR(3, 205, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_BooleanScalar);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_BooleanScalar->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_BooleanScalar->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_BooleanScalar->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_BooleanScalar, __pyx_vtabptr_7pyarrow_3lib_BooleanScalar) < (0)) __PYX_ERR(3, 205, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_BooleanScalar) < (0)) __PYX_ERR(3, 205, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_BooleanScalar, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_BooleanScalar) < (0)) __PYX_ERR(3, 205, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_BooleanScalar->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_BooleanScalar->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_BooleanScalar, __pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_UInt8Scalar = &__pyx_vtable_7pyarrow_3lib_UInt8Scalar;
  __pyx_vtable_7pyarrow_3lib_UInt8Scalar.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_Scalar;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Scalar); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 226, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt8Scalar = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_UInt8Scalar_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt8Scalar)) __PYX_ERR(3, 226, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_UInt8Scalar_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt8Scalar) < (0)) __PYX_ERR(3, 226, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt8Scalar = &__pyx_type_7pyarrow_3lib_UInt8Scalar;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_UInt8Scalar->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Scalar;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt8Scalar) < (0)) __PYX_ERR(3, 226, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt8Scalar);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt8Scalar->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt8Scalar->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt8Scalar->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt8Scalar, __pyx_vtabptr_7pyarrow_3lib_UInt8Scalar) < (0)) __PYX_ERR(3, 226, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt8Scalar) < (0)) __PYX_ERR(3, 226, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_UInt8Scalar, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt8Scalar) < (0)) __PYX_ERR(3, 226, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt8Scalar->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt8Scalar->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_UInt8Scalar, __pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_Int8Scalar = &__pyx_vtable_7pyarrow_3lib_Int8Scalar;
  __pyx_vtable_7pyarrow_3lib_Int8Scalar.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_Scalar;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Scalar); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 248, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int8Scalar = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_Int8Scalar_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int8Scalar)) __PYX_ERR(3, 248, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_Int8Scalar_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int8Scalar) < (0)) __PYX_ERR(3, 248, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int8Scalar = &__pyx_type_7pyarrow_3lib_Int8Scalar;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Int8Scalar->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Scalar;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int8Scalar) < (0)) __PYX_ERR(3, 248, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int8Scalar);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int8Scalar->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int8Scalar->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int8Scalar->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int8Scalar, __pyx_vtabptr_7pyarrow_3lib_Int8Scalar) < (0)) __PYX_ERR(3, 248, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int8Scalar) < (0)) __PYX_ERR(3, 248, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_Int8Scalar, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int8Scalar) < (0)) __PYX_ERR(3, 248, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int8Scalar->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int8Scalar->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_Int8Scalar, __pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_UInt16Scalar = &__pyx_vtable_7pyarrow_3lib_UInt16Scalar;
  __pyx_vtable_7pyarrow_3lib_UInt16Scalar.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_Scalar;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Scalar); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 270, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt16Scalar = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_UInt16Scalar_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt16Scalar)) __PYX_ERR(3, 270, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_UInt16Scalar_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt16Scalar) < (0)) __PYX_ERR(3, 270, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt16Scalar = &__pyx_type_7pyarrow_3lib_UInt16Scalar;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_UInt16Scalar->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Scalar;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt16Scalar) < (0)) __PYX_ERR(3, 270, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt16Scalar);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt16Scalar->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt16Scalar->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt16Scalar->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt16Scalar, __pyx_vtabptr_7pyarrow_3lib_UInt16Scalar) < (0)) __PYX_ERR(3, 270, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt16Scalar) < (0)) __PYX_ERR(3, 270, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_UInt16Scalar, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt16Scalar) < (0)) __PYX_ERR(3, 270, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt16Scalar->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt16Scalar->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_UInt16Scalar, __pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_Int16Scalar = &__pyx_vtable_7pyarrow_3lib_Int16Scalar;
  __pyx_vtable_7pyarrow_3lib_Int16Scalar.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_Scalar;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Scalar); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 292, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int16Scalar = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_Int16Scalar_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int16Scalar)) __PYX_ERR(3, 292, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_Int16Scalar_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int16Scalar) < (0)) __PYX_ERR(3, 292, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int16Scalar = &__pyx_type_7pyarrow_3lib_Int16Scalar;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Int16Scalar->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Scalar;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int16Scalar) < (0)) __PYX_ERR(3, 292, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int16Scalar);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int16Scalar->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int16Scalar->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int16Scalar->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int16Scalar, __pyx_vtabptr_7pyarrow_3lib_Int16Scalar) < (0)) __PYX_ERR(3, 292, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int16Scalar) < (0)) __PYX_ERR(3, 292, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_Int16Scalar, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int16Scalar) < (0)) __PYX_ERR(3, 292, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int16Scalar->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int16Scalar->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_Int16Scalar, __pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_UInt32Scalar = &__pyx_vtable_7pyarrow_3lib_UInt32Scalar;
  __pyx_vtable_7pyarrow_3lib_UInt32Scalar.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_Scalar;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Scalar); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 314, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt32Scalar = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_UInt32Scalar_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt32Scalar)) __PYX_ERR(3, 314, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_UInt32Scalar_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt32Scalar) < (0)) __PYX_ERR(3, 314, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt32Scalar = &__pyx_type_7pyarrow_3lib_UInt32Scalar;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_UInt32Scalar->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Scalar;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt32Scalar) < (0)) __PYX_ERR(3, 314, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt32Scalar);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt32Scalar->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt32Scalar->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt32Scalar->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt32Scalar, __pyx_vtabptr_7pyarrow_3lib_UInt32Scalar) < (0)) __PYX_ERR(3, 314, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt32Scalar) < (0)) __PYX_ERR(3, 314, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_UInt32Scalar, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt32Scalar) < (0)) __PYX_ERR(3, 314, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt32Scalar->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt32Scalar->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_UInt32Scalar, __pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_Int32Scalar = &__pyx_vtable_7pyarrow_3lib_Int32Scalar;
  __pyx_vtable_7pyarrow_3lib_Int32Scalar.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_Scalar;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Scalar); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 336, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int32Scalar = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_Int32Scalar_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int32Scalar)) __PYX_ERR(3, 336, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_Int32Scalar_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int32Scalar) < (0)) __PYX_ERR(3, 336, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int32Scalar = &__pyx_type_7pyarrow_3lib_Int32Scalar;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Int32Scalar->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Scalar;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int32Scalar) < (0)) __PYX_ERR(3, 336, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int32Scalar);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int32Scalar->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int32Scalar->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int32Scalar->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int32Scalar, __pyx_vtabptr_7pyarrow_3lib_Int32Scalar) < (0)) __PYX_ERR(3, 336, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int32Scalar) < (0)) __PYX_ERR(3, 336, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_Int32Scalar, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int32Scalar) < (0)) __PYX_ERR(3, 336, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int32Scalar->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int32Scalar->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_Int32Scalar, __pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_UInt64Scalar = &__pyx_vtable_7pyarrow_3lib_UInt64Scalar;
  __pyx_vtable_7pyarrow_3lib_UInt64Scalar.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_Scalar;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Scalar); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 358, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt64Scalar = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_UInt64Scalar_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt64Scalar)) __PYX_ERR(3, 358, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_UInt64Scalar_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt64Scalar) < (0)) __PYX_ERR(3, 358, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt64Scalar = &__pyx_type_7pyarrow_3lib_UInt64Scalar;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_UInt64Scalar->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Scalar;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt64Scalar) < (0)) __PYX_ERR(3, 358, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt64Scalar);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt64Scalar->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt64Scalar->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt64Scalar->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt64Scalar, __pyx_vtabptr_7pyarrow_3lib_UInt64Scalar) < (0)) __PYX_ERR(3, 358, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt64Scalar) < (0)) __PYX_ERR(3, 358, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_UInt64Scalar, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt64Scalar) < (0)) __PYX_ERR(3, 358, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt64Scalar->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_UInt64Scalar->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_UInt64Scalar, __pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_Int64Scalar = &__pyx_vtable_7pyarrow_3lib_Int64Scalar;
  __pyx_vtable_7pyarrow_3lib_Int64Scalar.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_Scalar;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Scalar); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 380, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int64Scalar = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_Int64Scalar_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int64Scalar)) __PYX_ERR(3, 380, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_Int64Scalar_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int64Scalar) < (0)) __PYX_ERR(3, 380, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int64Scalar = &__pyx_type_7pyarrow_3lib_Int64Scalar;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Int64Scalar->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Scalar;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int64Scalar) < (0)) __PYX_ERR(3, 380, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int64Scalar);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int64Scalar->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int64Scalar->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int64Scalar->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int64Scalar, __pyx_vtabptr_7pyarrow_3lib_Int64Scalar) < (0)) __PYX_ERR(3, 380, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int64Scalar) < (0)) __PYX_ERR(3, 380, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_Int64Scalar, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int64Scalar) < (0)) __PYX_ERR(3, 380, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int64Scalar->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Int64Scalar->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_Int64Scalar, __pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_HalfFloatScalar = &__pyx_vtable_7pyarrow_3lib_HalfFloatScalar;
  __pyx_vtable_7pyarrow_3lib_HalfFloatScalar.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_Scalar;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Scalar); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 402, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_HalfFloatScalar = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_HalfFloatScalar_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_HalfFloatScalar)) __PYX_ERR(3, 402, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_HalfFloatScalar_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_HalfFloatScalar) < (0)) __PYX_ERR(3, 402, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_HalfFloatScalar = &__pyx_type_7pyarrow_3lib_HalfFloatScalar;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_HalfFloatScalar->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Scalar;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_HalfFloatScalar) < (0)) __PYX_ERR(3, 402, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_HalfFloatScalar);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_HalfFloatScalar->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_HalfFloatScalar->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_HalfFloatScalar->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_HalfFloatScalar, __pyx_vtabptr_7pyarrow_3lib_HalfFloatScalar) < (0)) __PYX_ERR(3, 402, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_HalfFloatScalar) < (0)) __PYX_ERR(3, 402, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_HalfFloatScalar, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_HalfFloatScalar) < (0)) __PYX_ERR(3, 402, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_HalfFloatScalar->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_HalfFloatScalar->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_HalfFloatScalar, __pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_FloatScalar = &__pyx_vtable_7pyarrow_3lib_FloatScalar;
  __pyx_vtable_7pyarrow_3lib_FloatScalar.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_Scalar;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Scalar); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 427, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_FloatScalar = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_FloatScalar_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_FloatScalar)) __PYX_ERR(3, 427, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_FloatScalar_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_FloatScalar) < (0)) __PYX_ERR(3, 427, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_FloatScalar = &__pyx_type_7pyarrow_3lib_FloatScalar;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_FloatScalar->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Scalar;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_FloatScalar) < (0)) __PYX_ERR(3, 427, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_FloatScalar);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_FloatScalar->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_FloatScalar->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_FloatScalar->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_FloatScalar, __pyx_vtabptr_7pyarrow_3lib_FloatScalar) < (0)) __PYX_ERR(3, 427, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_FloatScalar) < (0)) __PYX_ERR(3, 427, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_FloatScalar, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_FloatScalar) < (0)) __PYX_ERR(3, 427, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_FloatScalar->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_FloatScalar->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_FloatScalar, __pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_DoubleScalar = &__pyx_vtable_7pyarrow_3lib_DoubleScalar;
  __pyx_vtable_7pyarrow_3lib_DoubleScalar.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_Scalar;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Scalar); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 452, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_DoubleScalar = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_DoubleScalar_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_DoubleScalar)) __PYX_ERR(3, 452, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_DoubleScalar_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_DoubleScalar) < (0)) __PYX_ERR(3, 452, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_DoubleScalar = &__pyx_type_7pyarrow_3lib_DoubleScalar;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DoubleScalar->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Scalar;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_DoubleScalar) < (0)) __PYX_ERR(3, 452, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_DoubleScalar);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_DoubleScalar->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_DoubleScalar->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_DoubleScalar->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_DoubleScalar, __pyx_vtabptr_7pyarrow_3lib_DoubleScalar) < (0)) __PYX_ERR(3, 452, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_DoubleScalar) < (0)) __PYX_ERR(3, 452, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_DoubleScalar, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_DoubleScalar) < (0)) __PYX_ERR(3, 452, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_DoubleScalar->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_DoubleScalar->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_DoubleScalar, __pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_Decimal32Scalar = &__pyx_vtable_7pyarrow_3lib_Decimal32Scalar;
  __pyx_vtable_7pyarrow_3lib_Decimal32Scalar.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_Scalar;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Scalar); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 477, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal32Scalar = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_Decimal32Scalar_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal32Scalar)) __PYX_ERR(3, 477, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_Decimal32Scalar_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal32Scalar) < (0)) __PYX_ERR(3, 477, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal32Scalar = &__pyx_type_7pyarrow_3lib_Decimal32Scalar;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Decimal32Scalar->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Scalar;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal32Scalar) < (0)) __PYX_ERR(3, 477, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal32Scalar);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal32Scalar->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal32Scalar->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal32Scalar->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal32Scalar, __pyx_vtabptr_7pyarrow_3lib_Decimal32Scalar) < (0)) __PYX_ERR(3, 477, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal32Scalar) < (0)) __PYX_ERR(3, 477, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_Decimal32Scalar, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal32Scalar) < (0)) __PYX_ERR(3, 477, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal32Scalar->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal32Scalar->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_Decimal32Scalar, __pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_Decimal64Scalar = &__pyx_vtable_7pyarrow_3lib_Decimal64Scalar;
  __pyx_vtable_7pyarrow_3lib_Decimal64Scalar.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_Scalar;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Scalar); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 503, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal64Scalar = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_Decimal64Scalar_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal64Scalar)) __PYX_ERR(3, 503, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_Decimal64Scalar_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal64Scalar) < (0)) __PYX_ERR(3, 503, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal64Scalar = &__pyx_type_7pyarrow_3lib_Decimal64Scalar;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Decimal64Scalar->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Scalar;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal64Scalar) < (0)) __PYX_ERR(3, 503, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal64Scalar);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal64Scalar->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal64Scalar->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal64Scalar->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal64Scalar, __pyx_vtabptr_7pyarrow_3lib_Decimal64Scalar) < (0)) __PYX_ERR(3, 503, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal64Scalar) < (0)) __PYX_ERR(3, 503, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_Decimal64Scalar, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal64Scalar) < (0)) __PYX_ERR(3, 503, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal64Scalar->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal64Scalar->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_Decimal64Scalar, __pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_Decimal128Scalar = &__pyx_vtable_7pyarrow_3lib_Decimal128Scalar;
  __pyx_vtable_7pyarrow_3lib_Decimal128Scalar.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_Scalar;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Scalar); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 529, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal128Scalar = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_Decimal128Scalar_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal128Scalar)) __PYX_ERR(3, 529, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_Decimal128Scalar_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal128Scalar) < (0)) __PYX_ERR(3, 529, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal128Scalar = &__pyx_type_7pyarrow_3lib_Decimal128Scalar;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Decimal128Scalar->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Scalar;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal128Scalar) < (0)) __PYX_ERR(3, 529, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal128Scalar);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal128Scalar->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal128Scalar->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal128Scalar->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal128Scalar, __pyx_vtabptr_7pyarrow_3lib_Decimal128Scalar) < (0)) __PYX_ERR(3, 529, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal128Scalar) < (0)) __PYX_ERR(3, 529, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_Decimal128Scalar, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal128Scalar) < (0)) __PYX_ERR(3, 529, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal128Scalar->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal128Scalar->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_Decimal128Scalar, __pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_Decimal256Scalar = &__pyx_vtable_7pyarrow_3lib_Decimal256Scalar;
  __pyx_vtable_7pyarrow_3lib_Decimal256Scalar.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_Scalar;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Scalar); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 555, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal256Scalar = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_Decimal256Scalar_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal256Scalar)) __PYX_ERR(3, 555, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_Decimal256Scalar_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal256Scalar) < (0)) __PYX_ERR(3, 555, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal256Scalar = &__pyx_type_7pyarrow_3lib_Decimal256Scalar;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Decimal256Scalar->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Scalar;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal256Scalar) < (0)) __PYX_ERR(3, 555, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal256Scalar);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal256Scalar->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal256Scalar->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal256Scalar->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal256Scalar, __pyx_vtabptr_7pyarrow_3lib_Decimal256Scalar) < (0)) __PYX_ERR(3, 555, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal256Scalar) < (0)) __PYX_ERR(3, 555, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_Decimal256Scalar, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal256Scalar) < (0)) __PYX_ERR(3, 555, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal256Scalar->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decimal256Scalar->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_Decimal256Scalar, __pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_Date32Scalar = &__pyx_vtable_7pyarrow_3lib_Date32Scalar;
  __pyx_vtable_7pyarrow_3lib_Date32Scalar.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_Scalar;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Scalar); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 581, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Date32Scalar = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_Date32Scalar_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Date32Scalar)) __PYX_ERR(3, 581, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_Date32Scalar_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Date32Scalar) < (0)) __PYX_ERR(3, 581, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Date32Scalar = &__pyx_type_7pyarrow_3lib_Date32Scalar;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Date32Scalar->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Scalar;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Date32Scalar) < (0)) __PYX_ERR(3, 581, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Date32Scalar);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Date32Scalar->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Date32Scalar->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Date32Scalar->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Date32Scalar, __pyx_vtabptr_7pyarrow_3lib_Date32Scalar) < (0)) __PYX_ERR(3, 581, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Date32Scalar) < (0)) __PYX_ERR(3, 581, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_Date32Scalar, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Date32Scalar) < (0)) __PYX_ERR(3, 581, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Date32Scalar->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Date32Scalar->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_Date32Scalar, __pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_Date64Scalar = &__pyx_vtable_7pyarrow_3lib_Date64Scalar;
  __pyx_vtable_7pyarrow_3lib_Date64Scalar.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_Scalar;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Scalar); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 612, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Date64Scalar = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_Date64Scalar_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Date64Scalar)) __PYX_ERR(3, 612, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_Date64Scalar_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Date64Scalar) < (0)) __PYX_ERR(3, 612, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Date64Scalar = &__pyx_type_7pyarrow_3lib_Date64Scalar;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Date64Scalar->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Scalar;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Date64Scalar) < (0)) __PYX_ERR(3, 612, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Date64Scalar);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Date64Scalar->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Date64Scalar->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Date64Scalar->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Date64Scalar, __pyx_vtabptr_7pyarrow_3lib_Date64Scalar) < (0)) __PYX_ERR(3, 612, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Date64Scalar) < (0)) __PYX_ERR(3, 612, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_Date64Scalar, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Date64Scalar) < (0)) __PYX_ERR(3, 612, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Date64Scalar->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Date64Scalar->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_Date64Scalar, __pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_Time32Scalar = &__pyx_vtable_7pyarrow_3lib_Time32Scalar;
  __pyx_vtable_7pyarrow_3lib_Time32Scalar.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_Scalar;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Scalar); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 672, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Time32Scalar = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_Time32Scalar_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Time32Scalar)) __PYX_ERR(3, 672, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_Time32Scalar_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Time32Scalar) < (0)) __PYX_ERR(3, 672, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Time32Scalar = &__pyx_type_7pyarrow_3lib_Time32Scalar;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Time32Scalar->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Scalar;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Time32Scalar) < (0)) __PYX_ERR(3, 672, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Time32Scalar);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Time32Scalar->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Time32Scalar->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Time32Scalar->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Time32Scalar, __pyx_vtabptr_7pyarrow_3lib_Time32Scalar) < (0)) __PYX_ERR(3, 672, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Time32Scalar) < (0)) __PYX_ERR(3, 672, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_Time32Scalar, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Time32Scalar) < (0)) __PYX_ERR(3, 672, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Time32Scalar->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Time32Scalar->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_Time32Scalar, __pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_Time64Scalar = &__pyx_vtable_7pyarrow_3lib_Time64Scalar;
  __pyx_vtable_7pyarrow_3lib_Time64Scalar.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_Scalar;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Scalar); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 702, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Time64Scalar = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_Time64Scalar_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Time64Scalar)) __PYX_ERR(3, 702, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_Time64Scalar_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Time64Scalar) < (0)) __PYX_ERR(3, 702, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Time64Scalar = &__pyx_type_7pyarrow_3lib_Time64Scalar;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Time64Scalar->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Scalar;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Time64Scalar) < (0)) __PYX_ERR(3, 702, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Time64Scalar);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Time64Scalar->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Time64Scalar->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Time64Scalar->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Time64Scalar, __pyx_vtabptr_7pyarrow_3lib_Time64Scalar) < (0)) __PYX_ERR(3, 702, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Time64Scalar) < (0)) __PYX_ERR(3, 702, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_Time64Scalar, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Time64Scalar) < (0)) __PYX_ERR(3, 702, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Time64Scalar->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Time64Scalar->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_Time64Scalar, __pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_TimestampScalar = &__pyx_vtable_7pyarrow_3lib_TimestampScalar;
  __pyx_vtable_7pyarrow_3lib_TimestampScalar.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_Scalar;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Scalar); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 732, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_TimestampScalar = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_TimestampScalar_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_TimestampScalar)) __PYX_ERR(3, 732, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_TimestampScalar_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_TimestampScalar) < (0)) __PYX_ERR(3, 732, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_TimestampScalar = &__pyx_type_7pyarrow_3lib_TimestampScalar;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_TimestampScalar->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Scalar;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_TimestampScalar) < (0)) __PYX_ERR(3, 732, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_TimestampScalar);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_TimestampScalar->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_TimestampScalar->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_TimestampScalar->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  #if CYTHON_UPDATE_DESCRIPTOR_DOC
  {
    PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_TimestampScalar, "__repr__"); if (unlikely(!wrapper)) __PYX_ERR(3, 732, __pyx_L1_error)
    if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
      __pyx_wrapperbase_7pyarrow_3lib_15TimestampScalar_2__repr__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_7pyarrow_3lib_15TimestampScalar_2__repr__.doc = __pyx_doc_7pyarrow_3lib_15TimestampScalar_2__repr__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_7pyarrow_3lib_15TimestampScalar_2__repr__;
    }
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_TimestampScalar, __pyx_vtabptr_7pyarrow_3lib_TimestampScalar) < (0)) __PYX_ERR(3, 732, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_TimestampScalar) < (0)) __PYX_ERR(3, 732, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_TimestampScalar, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_TimestampScalar) < (0)) __PYX_ERR(3, 732, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_TimestampScalar->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_TimestampScalar->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_TimestampScalar, __pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_DurationScalar = &__pyx_vtable_7pyarrow_3lib_DurationScalar;
  __pyx_vtable_7pyarrow_3lib_DurationScalar.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_Scalar;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Scalar); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 784, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_DurationScalar = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_DurationScalar_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_DurationScalar)) __PYX_ERR(3, 784, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_DurationScalar_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_DurationScalar) < (0)) __PYX_ERR(3, 784, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_DurationScalar = &__pyx_type_7pyarrow_3lib_DurationScalar;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DurationScalar->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Scalar;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_DurationScalar) < (0)) __PYX_ERR(3, 784, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_DurationScalar);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_DurationScalar->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_DurationScalar->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_DurationScalar->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_DurationScalar, __pyx_vtabptr_7pyarrow_3lib_DurationScalar) < (0)) __PYX_ERR(3, 784, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_DurationScalar) < (0)) __PYX_ERR(3, 784, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_DurationScalar, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_DurationScalar) < (0)) __PYX_ERR(3, 784, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_DurationScalar->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_DurationScalar->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_DurationScalar, __pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_MonthDayNanoIntervalScalar = &__pyx_vtable_7pyarrow_3lib_MonthDayNanoIntervalScalar;
  __pyx_vtable_7pyarrow_3lib_MonthDayNanoIntervalScalar.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_Scalar;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Scalar); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 835, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_MonthDayNanoIntervalScalar = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_MonthDayNanoIntervalScalar_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_MonthDayNanoIntervalScalar)) __PYX_ERR(3, 835, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_MonthDayNanoIntervalScalar_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_MonthDayNanoIntervalScalar) < (0)) __PYX_ERR(3, 835, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_MonthDayNanoIntervalScalar = &__pyx_type_7pyarrow_3lib_MonthDayNanoIntervalScalar;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_MonthDayNanoIntervalScalar->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Scalar;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_MonthDayNanoIntervalScalar) < (0)) __PYX_ERR(3, 835, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_MonthDayNanoIntervalScalar);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_MonthDayNanoIntervalScalar->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_MonthDayNanoIntervalScalar->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_MonthDayNanoIntervalScalar->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_MonthDayNanoIntervalScalar, __pyx_vtabptr_7pyarrow_3lib_MonthDayNanoIntervalScalar) < (0)) __PYX_ERR(3, 835, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_MonthDayNanoIntervalScalar) < (0)) __PYX_ERR(3, 835, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_MonthDayNanoIntervalScalar, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_MonthDayNanoIntervalScalar) < (0)) __PYX_ERR(3, 835, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_MonthDayNanoIntervalScalar->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_MonthDayNanoIntervalScalar->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_MonthDayNanoIntervalScalar, __pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_BinaryScalar = &__pyx_vtable_7pyarrow_3lib_BinaryScalar;
  __pyx_vtable_7pyarrow_3lib_BinaryScalar.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_Scalar;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Scalar); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 866, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_BinaryScalar = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_BinaryScalar_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_BinaryScalar)) __PYX_ERR(3, 866, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_BinaryScalar->tp_as_buffer = &__pyx_tp_as_buffer_BinaryScalar;
  if (!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_BinaryScalar->tp_as_buffer->bf_releasebuffer && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_BinaryScalar->tp_base->tp_as_buffer && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_BinaryScalar->tp_base->tp_as_buffer->bf_releasebuffer) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_BinaryScalar->tp_as_buffer->bf_releasebuffer = __pyx_mstate->__pyx_ptype_7pyarrow_3lib_BinaryScalar->tp_base->tp_as_buffer->bf_releasebuffer;
  }
  #elif defined(Py_bf_getbuffer) && defined(Py_bf_releasebuffer)
  /* PY_VERSION_HEX >= 0x03090000 || Py_LIMITED_API >= 0x030B0000 */
  #elif defined(_MSC_VER)
  #pragma message ("The buffer protocol is not supported in the Limited C-API < 3.11.")
  #else
  #warning "The buffer protocol is not supported in the Limited C-API < 3.11."
  #endif
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_BinaryScalar_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_BinaryScalar) < (0)) __PYX_ERR(3, 866, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_BinaryScalar = &__pyx_type_7pyarrow_3lib_BinaryScalar;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_BinaryScalar->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Scalar;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_BinaryScalar) < (0)) __PYX_ERR(3, 866, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_BinaryScalar);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_BinaryScalar->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_BinaryScalar->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_BinaryScalar->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_BinaryScalar, __pyx_vtabptr_7pyarrow_3lib_BinaryScalar) < (0)) __PYX_ERR(3, 866, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_BinaryScalar) < (0)) __PYX_ERR(3, 866, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_BinaryScalar, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_BinaryScalar) < (0)) __PYX_ERR(3, 866, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_BinaryScalar->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_BinaryScalar->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_BinaryScalar, __pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_LargeBinaryScalar = &__pyx_vtable_7pyarrow_3lib_LargeBinaryScalar;
  __pyx_vtable_7pyarrow_3lib_LargeBinaryScalar.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_BinaryScalar;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_BinaryScalar); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 901, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeBinaryScalar = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_LargeBinaryScalar_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeBinaryScalar)) __PYX_ERR(3, 901, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_LargeBinaryScalar_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeBinaryScalar) < (0)) __PYX_ERR(3, 901, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeBinaryScalar = &__pyx_type_7pyarrow_3lib_LargeBinaryScalar;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_LargeBinaryScalar->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_BinaryScalar;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeBinaryScalar) < (0)) __PYX_ERR(3, 901, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeBinaryScalar);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeBinaryScalar->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeBinaryScalar->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeBinaryScalar->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeBinaryScalar, __pyx_vtabptr_7pyarrow_3lib_LargeBinaryScalar) < (0)) __PYX_ERR(3, 901, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeBinaryScalar) < (0)) __PYX_ERR(3, 901, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_LargeBinaryScalar, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeBinaryScalar) < (0)) __PYX_ERR(3, 901, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeBinaryScalar->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeBinaryScalar->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_LargeBinaryScalar, __pyx_base.__pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_FixedSizeBinaryScalar = &__pyx_vtable_7pyarrow_3lib_FixedSizeBinaryScalar;
  __pyx_vtable_7pyarrow_3lib_FixedSizeBinaryScalar.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_BinaryScalar;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_BinaryScalar); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 905, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedSizeBinaryScalar = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_FixedSizeBinaryScalar_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedSizeBinaryScalar)) __PYX_ERR(3, 905, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_FixedSizeBinaryScalar_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedSizeBinaryScalar) < (0)) __PYX_ERR(3, 905, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedSizeBinaryScalar = &__pyx_type_7pyarrow_3lib_FixedSizeBinaryScalar;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_FixedSizeBinaryScalar->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_BinaryScalar;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedSizeBinaryScalar) < (0)) __PYX_ERR(3, 905, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedSizeBinaryScalar);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedSizeBinaryScalar->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedSizeBinaryScalar->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedSizeBinaryScalar->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedSizeBinaryScalar, __pyx_vtabptr_7pyarrow_3lib_FixedSizeBinaryScalar) < (0)) __PYX_ERR(3, 905, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedSizeBinaryScalar) < (0)) __PYX_ERR(3, 905, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_FixedSizeBinaryScalar, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedSizeBinaryScalar) < (0)) __PYX_ERR(3, 905, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedSizeBinaryScalar->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedSizeBinaryScalar->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_FixedSizeBinaryScalar, __pyx_base.__pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_StringScalar = &__pyx_vtable_7pyarrow_3lib_StringScalar;
  __pyx_vtable_7pyarrow_3lib_StringScalar.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_BinaryScalar;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_BinaryScalar); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 909, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_StringScalar = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_StringScalar_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_StringScalar)) __PYX_ERR(3, 909, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_StringScalar_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_StringScalar) < (0)) __PYX_ERR(3, 909, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_StringScalar = &__pyx_type_7pyarrow_3lib_StringScalar;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_StringScalar->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_BinaryScalar;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_StringScalar) < (0)) __PYX_ERR(3, 909, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_StringScalar);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_StringScalar->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_StringScalar->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_StringScalar->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_StringScalar, __pyx_vtabptr_7pyarrow_3lib_StringScalar) < (0)) __PYX_ERR(3, 909, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_StringScalar) < (0)) __PYX_ERR(3, 909, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_StringScalar, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_StringScalar) < (0)) __PYX_ERR(3, 909, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_StringScalar->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_StringScalar->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_StringScalar, __pyx_base.__pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_LargeStringScalar = &__pyx_vtable_7pyarrow_3lib_LargeStringScalar;
  __pyx_vtable_7pyarrow_3lib_LargeStringScalar.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_StringScalar;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_StringScalar); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 928, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeStringScalar = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_LargeStringScalar_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeStringScalar)) __PYX_ERR(3, 928, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_LargeStringScalar_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeStringScalar) < (0)) __PYX_ERR(3, 928, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeStringScalar = &__pyx_type_7pyarrow_3lib_LargeStringScalar;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_LargeStringScalar->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_StringScalar;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeStringScalar) < (0)) __PYX_ERR(3, 928, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeStringScalar);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeStringScalar->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeStringScalar->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeStringScalar->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeStringScalar, __pyx_vtabptr_7pyarrow_3lib_LargeStringScalar) < (0)) __PYX_ERR(3, 928, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeStringScalar) < (0)) __PYX_ERR(3, 928, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_LargeStringScalar, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeStringScalar) < (0)) __PYX_ERR(3, 928, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeStringScalar->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeStringScalar->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_LargeStringScalar, __pyx_base.__pyx_base.__pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_BinaryViewScalar = &__pyx_vtable_7pyarrow_3lib_BinaryViewScalar;
  __pyx_vtable_7pyarrow_3lib_BinaryViewScalar.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_BinaryScalar;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_BinaryScalar); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 932, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_BinaryViewScalar = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_BinaryViewScalar_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_BinaryViewScalar)) __PYX_ERR(3, 932, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_BinaryViewScalar_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_BinaryViewScalar) < (0)) __PYX_ERR(3, 932, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_BinaryViewScalar = &__pyx_type_7pyarrow_3lib_BinaryViewScalar;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_BinaryViewScalar->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_BinaryScalar;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_BinaryViewScalar) < (0)) __PYX_ERR(3, 932, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_BinaryViewScalar);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_BinaryViewScalar->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_BinaryViewScalar->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_BinaryViewScalar->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_BinaryViewScalar, __pyx_vtabptr_7pyarrow_3lib_BinaryViewScalar) < (0)) __PYX_ERR(3, 932, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_BinaryViewScalar) < (0)) __PYX_ERR(3, 932, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_BinaryViewScalar, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_BinaryViewScalar) < (0)) __PYX_ERR(3, 932, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_BinaryViewScalar->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_BinaryViewScalar->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_BinaryViewScalar, __pyx_base.__pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_StringViewScalar = &__pyx_vtable_7pyarrow_3lib_StringViewScalar;
  __pyx_vtable_7pyarrow_3lib_StringViewScalar.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_StringScalar;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_StringScalar); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 936, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_StringViewScalar = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_StringViewScalar_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_StringViewScalar)) __PYX_ERR(3, 936, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_StringViewScalar_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_StringViewScalar) < (0)) __PYX_ERR(3, 936, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_StringViewScalar = &__pyx_type_7pyarrow_3lib_StringViewScalar;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_StringViewScalar->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_StringScalar;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_StringViewScalar) < (0)) __PYX_ERR(3, 936, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_StringViewScalar);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_StringViewScalar->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_StringViewScalar->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_StringViewScalar->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_StringViewScalar, __pyx_vtabptr_7pyarrow_3lib_StringViewScalar) < (0)) __PYX_ERR(3, 936, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_StringViewScalar) < (0)) __PYX_ERR(3, 936, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_StringViewScalar, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_StringViewScalar) < (0)) __PYX_ERR(3, 936, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_StringViewScalar->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_StringViewScalar->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_StringViewScalar, __pyx_base.__pyx_base.__pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_ListScalar = &__pyx_vtable_7pyarrow_3lib_ListScalar;
  __pyx_vtable_7pyarrow_3lib_ListScalar.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_Scalar;
  __pyx_vtabptr_7pyarrow_3lib_FixedSizeListScalar = &__pyx_vtable_7pyarrow_3lib_FixedSizeListScalar;
  __pyx_vtable_7pyarrow_3lib_FixedSizeListScalar.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_ListScalar;
  __pyx_vtabptr_7pyarrow_3lib_LargeListScalar = &__pyx_vtable_7pyarrow_3lib_LargeListScalar;
  __pyx_vtable_7pyarrow_3lib_LargeListScalar.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_ListScalar;
  __pyx_vtabptr_7pyarrow_3lib_ListViewScalar = &__pyx_vtable_7pyarrow_3lib_ListViewScalar;
  __pyx_vtable_7pyarrow_3lib_ListViewScalar.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_ListScalar;
  __pyx_vtabptr_7pyarrow_3lib_LargeListViewScalar = &__pyx_vtable_7pyarrow_3lib_LargeListViewScalar;
  __pyx_vtable_7pyarrow_3lib_LargeListViewScalar.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_ListScalar;
  __pyx_vtabptr_7pyarrow_3lib_StructScalar = &__pyx_vtable_7pyarrow_3lib_StructScalar;
  __pyx_vtable_7pyarrow_3lib_StructScalar.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_Scalar;
  __pyx_vtabptr_7pyarrow_3lib_MapScalar = &__pyx_vtable_7pyarrow_3lib_MapScalar;
  __pyx_vtable_7pyarrow_3lib_MapScalar.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_ListScalar;
  __pyx_vtabptr_7pyarrow_3lib_DictionaryScalar = &__pyx_vtable_7pyarrow_3lib_DictionaryScalar;
  __pyx_vtable_7pyarrow_3lib_DictionaryScalar.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_Scalar;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Scalar); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1203, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_DictionaryScalar = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_DictionaryScalar_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_DictionaryScalar)) __PYX_ERR(3, 1203, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_DictionaryScalar_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_DictionaryScalar) < (0)) __PYX_ERR(3, 1203, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_DictionaryScalar = &__pyx_type_7pyarrow_3lib_DictionaryScalar;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DictionaryScalar->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Scalar;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_DictionaryScalar) < (0)) __PYX_ERR(3, 1203, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_DictionaryScalar);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_DictionaryScalar->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_DictionaryScalar->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_DictionaryScalar->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_DictionaryScalar, __pyx_vtabptr_7pyarrow_3lib_DictionaryScalar) < (0)) __PYX_ERR(3, 1203, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_DictionaryScalar) < (0)) __PYX_ERR(3, 1203, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_DictionaryScalar, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_DictionaryScalar) < (0)) __PYX_ERR(3, 1203, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_DictionaryScalar->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_DictionaryScalar->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_DictionaryScalar, __pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_RunEndEncodedScalar = &__pyx_vtable_7pyarrow_3lib_RunEndEncodedScalar;
  __pyx_vtable_7pyarrow_3lib_RunEndEncodedScalar.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_Scalar;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Scalar); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1294, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_RunEndEncodedScalar = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_RunEndEncodedScalar_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_RunEndEncodedScalar)) __PYX_ERR(3, 1294, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_RunEndEncodedScalar_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_RunEndEncodedScalar) < (0)) __PYX_ERR(3, 1294, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_RunEndEncodedScalar = &__pyx_type_7pyarrow_3lib_RunEndEncodedScalar;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RunEndEncodedScalar->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Scalar;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_RunEndEncodedScalar) < (0)) __PYX_ERR(3, 1294, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_RunEndEncodedScalar);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_RunEndEncodedScalar->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_RunEndEncodedScalar->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_RunEndEncodedScalar->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_RunEndEncodedScalar, __pyx_vtabptr_7pyarrow_3lib_RunEndEncodedScalar) < (0)) __PYX_ERR(3, 1294, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_RunEndEncodedScalar) < (0)) __PYX_ERR(3, 1294, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_RunEndEncodedScalar, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_RunEndEncodedScalar) < (0)) __PYX_ERR(3, 1294, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_RunEndEncodedScalar->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_RunEndEncodedScalar->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_RunEndEncodedScalar, __pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_UnionScalar = &__pyx_vtable_7pyarrow_3lib_UnionScalar;
  __pyx_vtable_7pyarrow_3lib_UnionScalar.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_Scalar;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Scalar); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1327, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_UnionScalar = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_UnionScalar_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_UnionScalar)) __PYX_ERR(3, 1327, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_UnionScalar_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_UnionScalar) < (0)) __PYX_ERR(3, 1327, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_UnionScalar = &__pyx_type_7pyarrow_3lib_UnionScalar;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_UnionScalar->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Scalar;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_UnionScalar) < (0)) __PYX_ERR(3, 1327, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_UnionScalar);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_UnionScalar->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_UnionScalar->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_UnionScalar->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_UnionScalar, __pyx_vtabptr_7pyarrow_3lib_UnionScalar) < (0)) __PYX_ERR(3, 1327, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_UnionScalar) < (0)) __PYX_ERR(3, 1327, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_UnionScalar, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_UnionScalar) < (0)) __PYX_ERR(3, 1327, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_UnionScalar->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_UnionScalar->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_UnionScalar, __pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_ExtensionScalar = &__pyx_vtable_7pyarrow_3lib_ExtensionScalar;
  __pyx_vtable_7pyarrow_3lib_ExtensionScalar.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_Scalar;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Scalar); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1376, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_ExtensionScalar = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_ExtensionScalar_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_ExtensionScalar)) __PYX_ERR(3, 1376, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_ExtensionScalar_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_ExtensionScalar) < (0)) __PYX_ERR(3, 1376, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_ExtensionScalar = &__pyx_type_7pyarrow_3lib_ExtensionScalar;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ExtensionScalar->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Scalar;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_ExtensionScalar) < (0)) __PYX_ERR(3, 1376, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_ExtensionScalar);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_ExtensionScalar->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_ExtensionScalar->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_ExtensionScalar->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_ExtensionScalar, __pyx_vtabptr_7pyarrow_3lib_ExtensionScalar) < (0)) __PYX_ERR(3, 1376, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_ExtensionScalar) < (0)) __PYX_ERR(3, 1376, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_ExtensionScalar, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_ExtensionScalar) < (0)) __PYX_ERR(3, 1376, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_ExtensionScalar->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_ExtensionScalar->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_ExtensionScalar, __pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_FixedShapeTensorScalar = &__pyx_vtable_7pyarrow_3lib_FixedShapeTensorScalar;
  __pyx_vtable_7pyarrow_3lib_FixedShapeTensorScalar.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_ExtensionScalar;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ExtensionScalar); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1476, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedShapeTensorScalar = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_FixedShapeTensorScalar_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedShapeTensorScalar)) __PYX_ERR(3, 1476, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_FixedShapeTensorScalar_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedShapeTensorScalar) < (0)) __PYX_ERR(3, 1476, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedShapeTensorScalar = &__pyx_type_7pyarrow_3lib_FixedShapeTensorScalar;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_FixedShapeTensorScalar->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ExtensionScalar;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedShapeTensorScalar) < (0)) __PYX_ERR(3, 1476, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedShapeTensorScalar);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedShapeTensorScalar->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedShapeTensorScalar->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedShapeTensorScalar->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedShapeTensorScalar, __pyx_vtabptr_7pyarrow_3lib_FixedShapeTensorScalar) < (0)) __PYX_ERR(3, 1476, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedShapeTensorScalar) < (0)) __PYX_ERR(3, 1476, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_FixedShapeTensorScalar, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedShapeTensorScalar) < (0)) __PYX_ERR(3, 1476, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedShapeTensorScalar->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedShapeTensorScalar->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_FixedShapeTensorScalar, __pyx_base.__pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_OpaqueScalar = &__pyx_vtable_7pyarrow_3lib_OpaqueScalar;
  __pyx_vtable_7pyarrow_3lib_OpaqueScalar.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_ExtensionScalar;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ExtensionScalar); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1518, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_OpaqueScalar = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_OpaqueScalar_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_OpaqueScalar)) __PYX_ERR(3, 1518, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_OpaqueScalar_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_OpaqueScalar) < (0)) __PYX_ERR(3, 1518, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_OpaqueScalar = &__pyx_type_7pyarrow_3lib_OpaqueScalar;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_OpaqueScalar->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ExtensionScalar;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_OpaqueScalar) < (0)) __PYX_ERR(3, 1518, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_OpaqueScalar);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_OpaqueScalar->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_OpaqueScalar->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_OpaqueScalar->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_OpaqueScalar, __pyx_vtabptr_7pyarrow_3lib_OpaqueScalar) < (0)) __PYX_ERR(3, 1518, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_OpaqueScalar) < (0)) __PYX_ERR(3, 1518, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_OpaqueScalar, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_OpaqueScalar) < (0)) __PYX_ERR(3, 1518, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_OpaqueScalar->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_OpaqueScalar->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_OpaqueScalar, __pyx_base.__pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_Bool8Scalar = &__pyx_vtable_7pyarrow_3lib_Bool8Scalar;
  __pyx_vtable_7pyarrow_3lib_Bool8Scalar.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_ExtensionScalar;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ExtensionScalar); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1524, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Bool8Scalar = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_Bool8Scalar_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Bool8Scalar)) __PYX_ERR(3, 1524, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_Bool8Scalar_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Bool8Scalar) < (0)) __PYX_ERR(3, 1524, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Bool8Scalar = &__pyx_type_7pyarrow_3lib_Bool8Scalar;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Bool8Scalar->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ExtensionScalar;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Bool8Scalar) < (0)) __PYX_ERR(3, 1524, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Bool8Scalar);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Bool8Scalar->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Bool8Scalar->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Bool8Scalar->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Bool8Scalar, __pyx_vtabptr_7pyarrow_3lib_Bool8Scalar) < (0)) __PYX_ERR(3, 1524, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Bool8Scalar) < (0)) __PYX_ERR(3, 1524, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_Bool8Scalar, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Bool8Scalar) < (0)) __PYX_ERR(3, 1524, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Bool8Scalar->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Bool8Scalar->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_Bool8Scalar, __pyx_base.__pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_Date32Array = &__pyx_vtable_7pyarrow_3lib_Date32Array;
  __pyx_vtable_7pyarrow_3lib_Date32Array.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_NumericArray;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NumericArray); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 2422, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Date32Array = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_Date32Array_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Date32Array)) __PYX_ERR(4, 2422, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_Date32Array_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Date32Array) < (0)) __PYX_ERR(4, 2422, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Date32Array = &__pyx_type_7pyarrow_3lib_Date32Array;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Date32Array->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NumericArray;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Date32Array) < (0)) __PYX_ERR(4, 2422, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Date32Array);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Date32Array->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Date32Array->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Date32Array->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Date32Array, __pyx_vtabptr_7pyarrow_3lib_Date32Array) < (0)) __PYX_ERR(4, 2422, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Date32Array) < (0)) __PYX_ERR(4, 2422, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_Date32Array, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Date32Array) < (0)) __PYX_ERR(4, 2422, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Date32Array->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Date32Array->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_Date32Array, __pyx_base.__pyx_base.__pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_Date64Array = &__pyx_vtable_7pyarrow_3lib_Date64Array;
  __pyx_vtable_7pyarrow_3lib_Date64Array.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_NumericArray;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NumericArray); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 2428, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Date64Array = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_Date64Array_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Date64Array)) __PYX_ERR(4, 2428, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_Date64Array_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Date64Array) < (0)) __PYX_ERR(4, 2428, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Date64Array = &__pyx_type_7pyarrow_3lib_Date64Array;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Date64Array->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NumericArray;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Date64Array) < (0)) __PYX_ERR(4, 2428, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Date64Array);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Date64Array->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Date64Array->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Date64Array->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Date64Array, __pyx_vtabptr_7pyarrow_3lib_Date64Array) < (0)) __PYX_ERR(4, 2428, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Date64Array) < (0)) __PYX_ERR(4, 2428, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_Date64Array, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Date64Array) < (0)) __PYX_ERR(4, 2428, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Date64Array->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Date64Array->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_Date64Array, __pyx_base.__pyx_base.__pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_TimestampArray = &__pyx_vtable_7pyarrow_3lib_TimestampArray;
  __pyx_vtable_7pyarrow_3lib_TimestampArray.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_NumericArray;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NumericArray); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 2434, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_TimestampArray = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_TimestampArray_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_TimestampArray)) __PYX_ERR(4, 2434, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_TimestampArray_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_TimestampArray) < (0)) __PYX_ERR(4, 2434, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_TimestampArray = &__pyx_type_7pyarrow_3lib_TimestampArray;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_TimestampArray->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NumericArray;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_TimestampArray) < (0)) __PYX_ERR(4, 2434, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_TimestampArray);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_TimestampArray->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_TimestampArray->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_TimestampArray->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_TimestampArray, __pyx_vtabptr_7pyarrow_3lib_TimestampArray) < (0)) __PYX_ERR(4, 2434, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_TimestampArray) < (0)) __PYX_ERR(4, 2434, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_TimestampArray, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_TimestampArray) < (0)) __PYX_ERR(4, 2434, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_TimestampArray->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_TimestampArray->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_TimestampArray, __pyx_base.__pyx_base.__pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_Time32Array = &__pyx_vtable_7pyarrow_3lib_Time32Array;
  __pyx_vtable_7pyarrow_3lib_Time32Array.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_NumericArray;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NumericArray); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 2440, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Time32Array = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_Time32Array_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Time32Array)) __PYX_ERR(4, 2440, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_Time32Array_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Time32Array) < (0)) __PYX_ERR(4, 2440, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Time32Array = &__pyx_type_7pyarrow_3lib_Time32Array;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Time32Array->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NumericArray;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Time32Array) < (0)) __PYX_ERR(4, 2440, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Time32Array);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Time32Array->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Time32Array->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Time32Array->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Time32Array, __pyx_vtabptr_7pyarrow_3lib_Time32Array) < (0)) __PYX_ERR(4, 2440, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Time32Array) < (0)) __PYX_ERR(4, 2440, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_Time32Array, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Time32Array) < (0)) __PYX_ERR(4, 2440, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Time32Array->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Time32Array->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_Time32Array, __pyx_base.__pyx_base.__pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_Time64Array = &__pyx_vtable_7pyarrow_3lib_Time64Array;
  __pyx_vtable_7pyarrow_3lib_Time64Array.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_NumericArray;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NumericArray); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 2446, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Time64Array = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_Time64Array_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Time64Array)) __PYX_ERR(4, 2446, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_Time64Array_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Time64Array) < (0)) __PYX_ERR(4, 2446, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Time64Array = &__pyx_type_7pyarrow_3lib_Time64Array;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Time64Array->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NumericArray;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Time64Array) < (0)) __PYX_ERR(4, 2446, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Time64Array);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Time64Array->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Time64Array->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Time64Array->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Time64Array, __pyx_vtabptr_7pyarrow_3lib_Time64Array) < (0)) __PYX_ERR(4, 2446, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Time64Array) < (0)) __PYX_ERR(4, 2446, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_Time64Array, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Time64Array) < (0)) __PYX_ERR(4, 2446, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Time64Array->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Time64Array->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_Time64Array, __pyx_base.__pyx_base.__pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_DurationArray = &__pyx_vtable_7pyarrow_3lib_DurationArray;
  __pyx_vtable_7pyarrow_3lib_DurationArray.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_NumericArray;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NumericArray); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 2452, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_DurationArray = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_DurationArray_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_DurationArray)) __PYX_ERR(4, 2452, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_DurationArray_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_DurationArray) < (0)) __PYX_ERR(4, 2452, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_DurationArray = &__pyx_type_7pyarrow_3lib_DurationArray;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DurationArray->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NumericArray;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_DurationArray) < (0)) __PYX_ERR(4, 2452, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_DurationArray);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_DurationArray->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_DurationArray->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_DurationArray->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_DurationArray, __pyx_vtabptr_7pyarrow_3lib_DurationArray) < (0)) __PYX_ERR(4, 2452, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_DurationArray) < (0)) __PYX_ERR(4, 2452, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_DurationArray, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_DurationArray) < (0)) __PYX_ERR(4, 2452, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_DurationArray->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_DurationArray->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_DurationArray, __pyx_base.__pyx_base.__pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_Decima32Array = &__pyx_vtable_7pyarrow_3lib_Decima32Array;
  __pyx_vtable_7pyarrow_3lib_Decima32Array.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_FixedSizeBinaryArray;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_FixedSizeBinaryArray); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 2512, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decima32Array = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_Decima32Array_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decima32Array)) __PYX_ERR(4, 2512, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_Decima32Array_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decima32Array) < (0)) __PYX_ERR(4, 2512, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decima32Array = &__pyx_type_7pyarrow_3lib_Decima32Array;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Decima32Array->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_FixedSizeBinaryArray;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decima32Array) < (0)) __PYX_ERR(4, 2512, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decima32Array);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decima32Array->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decima32Array->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decima32Array->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decima32Array, __pyx_vtabptr_7pyarrow_3lib_Decima32Array) < (0)) __PYX_ERR(4, 2512, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decima32Array) < (0)) __PYX_ERR(4, 2512, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_Decima32Array, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decima32Array) < (0)) __PYX_ERR(4, 2512, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decima32Array->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Decima32Array->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_Decima32Array, __pyx_base.__pyx_base.__pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_LargeStringArray = &__pyx_vtable_7pyarrow_3lib_LargeStringArray;
  __pyx_vtable_7pyarrow_3lib_LargeStringArray.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_Array;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 3903, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeStringArray = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_LargeStringArray_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeStringArray)) __PYX_ERR(4, 3903, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_LargeStringArray_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeStringArray) < (0)) __PYX_ERR(4, 3903, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeStringArray = &__pyx_type_7pyarrow_3lib_LargeStringArray;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_LargeStringArray->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeStringArray) < (0)) __PYX_ERR(4, 3903, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeStringArray);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeStringArray->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeStringArray->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeStringArray->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeStringArray, __pyx_vtabptr_7pyarrow_3lib_LargeStringArray) < (0)) __PYX_ERR(4, 3903, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeStringArray) < (0)) __PYX_ERR(4, 3903, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_LargeStringArray, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeStringArray) < (0)) __PYX_ERR(4, 3903, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeStringArray->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeStringArray->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_LargeStringArray, __pyx_base.__pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_LargeBinaryArray = &__pyx_vtable_7pyarrow_3lib_LargeBinaryArray;
  __pyx_vtable_7pyarrow_3lib_LargeBinaryArray.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_Array;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 3954, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeBinaryArray = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_LargeBinaryArray_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeBinaryArray)) __PYX_ERR(4, 3954, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_LargeBinaryArray_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeBinaryArray) < (0)) __PYX_ERR(4, 3954, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeBinaryArray = &__pyx_type_7pyarrow_3lib_LargeBinaryArray;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_LargeBinaryArray->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeBinaryArray) < (0)) __PYX_ERR(4, 3954, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeBinaryArray);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeBinaryArray->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeBinaryArray->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeBinaryArray->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeBinaryArray, __pyx_vtabptr_7pyarrow_3lib_LargeBinaryArray) < (0)) __PYX_ERR(4, 3954, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeBinaryArray) < (0)) __PYX_ERR(4, 3954, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_LargeBinaryArray, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeBinaryArray) < (0)) __PYX_ERR(4, 3954, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeBinaryArray->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeBinaryArray->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_LargeBinaryArray, __pyx_base.__pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_RunEndEncodedArray = &__pyx_vtable_7pyarrow_3lib_RunEndEncodedArray;
  __pyx_vtable_7pyarrow_3lib_RunEndEncodedArray.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_Array;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 4338, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_RunEndEncodedArray = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_RunEndEncodedArray_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_RunEndEncodedArray)) __PYX_ERR(4, 4338, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_RunEndEncodedArray_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_RunEndEncodedArray) < (0)) __PYX_ERR(4, 4338, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_RunEndEncodedArray = &__pyx_type_7pyarrow_3lib_RunEndEncodedArray;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RunEndEncodedArray->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_RunEndEncodedArray) < (0)) __PYX_ERR(4, 4338, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_RunEndEncodedArray);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_RunEndEncodedArray->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_RunEndEncodedArray->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_RunEndEncodedArray->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_RunEndEncodedArray, __pyx_vtabptr_7pyarrow_3lib_RunEndEncodedArray) < (0)) __PYX_ERR(4, 4338, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_RunEndEncodedArray) < (0)) __PYX_ERR(4, 4338, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_RunEndEncodedArray, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_RunEndEncodedArray) < (0)) __PYX_ERR(4, 4338, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_RunEndEncodedArray->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_RunEndEncodedArray->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_RunEndEncodedArray, __pyx_base.__pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_FixedShapeTensorArray = &__pyx_vtable_7pyarrow_3lib_FixedShapeTensorArray;
  __pyx_vtable_7pyarrow_3lib_FixedShapeTensorArray.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_ExtensionArray;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ExtensionArray); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 4576, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedShapeTensorArray = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_FixedShapeTensorArray_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedShapeTensorArray)) __PYX_ERR(4, 4576, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_FixedShapeTensorArray_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedShapeTensorArray) < (0)) __PYX_ERR(4, 4576, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedShapeTensorArray = &__pyx_type_7pyarrow_3lib_FixedShapeTensorArray;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_FixedShapeTensorArray->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ExtensionArray;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedShapeTensorArray) < (0)) __PYX_ERR(4, 4576, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedShapeTensorArray);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedShapeTensorArray->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedShapeTensorArray->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedShapeTensorArray->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedShapeTensorArray, __pyx_vtabptr_7pyarrow_3lib_FixedShapeTensorArray) < (0)) __PYX_ERR(4, 4576, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedShapeTensorArray) < (0)) __PYX_ERR(4, 4576, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_FixedShapeTensorArray, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedShapeTensorArray) < (0)) __PYX_ERR(4, 4576, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedShapeTensorArray->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedShapeTensorArray->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_FixedShapeTensorArray, __pyx_base.__pyx_base.__pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_OpaqueArray = &__pyx_vtable_7pyarrow_3lib_OpaqueArray;
  __pyx_vtable_7pyarrow_3lib_OpaqueArray.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_ExtensionArray;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ExtensionArray); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 4737, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_OpaqueArray = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_OpaqueArray_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_OpaqueArray)) __PYX_ERR(4, 4737, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_OpaqueArray_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_OpaqueArray) < (0)) __PYX_ERR(4, 4737, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_OpaqueArray = &__pyx_type_7pyarrow_3lib_OpaqueArray;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_OpaqueArray->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ExtensionArray;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_OpaqueArray) < (0)) __PYX_ERR(4, 4737, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_OpaqueArray);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_OpaqueArray->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_OpaqueArray->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_OpaqueArray->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_OpaqueArray, __pyx_vtabptr_7pyarrow_3lib_OpaqueArray) < (0)) __PYX_ERR(4, 4737, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_OpaqueArray) < (0)) __PYX_ERR(4, 4737, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_OpaqueArray, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_OpaqueArray) < (0)) __PYX_ERR(4, 4737, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_OpaqueArray->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_OpaqueArray->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_OpaqueArray, __pyx_base.__pyx_base.__pyx_base.__pyx_base.__weakref__);
  #endif
  __pyx_vtabptr_7pyarrow_3lib_Bool8Array = &__pyx_vtable_7pyarrow_3lib_Bool8Array;
  __pyx_vtable_7pyarrow_3lib_Bool8Array.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_ExtensionArray;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ExtensionArray); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 4765, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Bool8Array = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_Bool8Array_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Bool8Array)) __PYX_ERR(4, 4765, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_Bool8Array_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Bool8Array) < (0)) __PYX_ERR(4, 4765, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Bool8Array = &__pyx_type_7pyarrow_3lib_Bool8Array;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Bool8Array->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ExtensionArray;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Bool8Array) < (0)) __PYX_ERR(4, 4765, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Bool8Array);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Bool8Array->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Bool8Array->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Bool8Array->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Bool8Array, __pyx_vtabptr_7pyarrow_3lib_Bool8Array) < (0)) __PYX_ERR(4, 4765, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Bool8Array) < (0)) __PYX_ERR(4, 4765, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_Bool8Array, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Bool8Array) < (0)) __PYX_ERR(4, 4765, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_Bool8Array->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_Bool8Array->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_Bool8Array, __pyx_base.__pyx_base.__pyx_base.__pyx_base.__weakref__);
  #endif
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Weakrefable); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 21, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_StringBuilder = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_StringBuilder_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_StringBuilder)) __PYX_ERR(16, 21, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_StringBuilder_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_StringBuilder) < (0)) __PYX_ERR(16, 21, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_StringBuilder = &__pyx_type_7pyarrow_3lib_StringBuilder;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_StringBuilder->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Weakrefable;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_StringBuilder) < (0)) __PYX_ERR(16, 21, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_StringBuilder);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_StringBuilder->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_StringBuilder->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_StringBuilder->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_StringBuilder, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_StringBuilder) < (0)) __PYX_ERR(16, 21, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_StringBuilder->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_StringBuilder->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_StringBuilder, __pyx_base.__weakref__);
  #endif
  if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_StringBuilder) < (0)) __PYX_ERR(16, 21, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Weakrefable); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 87, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_StringViewBuilder = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_StringViewBuilder_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_StringViewBuilder)) __PYX_ERR(16, 87, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_StringViewBuilder_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_StringViewBuilder) < (0)) __PYX_ERR(16, 87, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_StringViewBuilder = &__pyx_type_7pyarrow_3lib_StringViewBuilder;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_StringViewBuilder->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Weakrefable;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_StringViewBuilder) < (0)) __PYX_ERR(16, 87, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_StringViewBuilder);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_StringViewBuilder->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_StringViewBuilder->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_StringViewBuilder->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_StringViewBuilder, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_StringViewBuilder) < (0)) __PYX_ERR(16, 87, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_StringViewBuilder->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_StringViewBuilder->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_StringViewBuilder, __pyx_base.__weakref__);
  #endif
  if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_StringViewBuilder) < (0)) __PYX_ERR(16, 87, __pyx_L1_error)
  __pyx_vtabptr_7pyarrow_3lib_PythonFile = &__pyx_vtable_7pyarrow_3lib_PythonFile;
  __pyx_vtable_7pyarrow_3lib_PythonFile.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_NativeFile;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NativeFile); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 879, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_PythonFile = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_PythonFile_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_PythonFile)) __PYX_ERR(6, 879, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_PythonFile_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_PythonFile) < (0)) __PYX_ERR(6, 879, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_PythonFile = &__pyx_type_7pyarrow_3lib_PythonFile;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_PythonFile->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NativeFile;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_PythonFile) < (0)) __PYX_ERR(6, 879, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_PythonFile);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_PythonFile->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_PythonFile->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_PythonFile->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_PythonFile, __pyx_vtabptr_7pyarrow_3lib_PythonFile) < (0)) __PYX_ERR(6, 879, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_PythonFile) < (0)) __PYX_ERR(6, 879, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_PythonFile, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_PythonFile) < (0)) __PYX_ERR(6, 879, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_PythonFile->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_PythonFile->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_PythonFile, __pyx_base.__pyx_base.__weakref__);
  #endif
  if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_PythonFile) < (0)) __PYX_ERR(6, 879, __pyx_L1_error)
  __pyx_vtabptr_7pyarrow_3lib_MemoryMappedFile = &__pyx_vtable_7pyarrow_3lib_MemoryMappedFile;
  __pyx_vtable_7pyarrow_3lib_MemoryMappedFile.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_NativeFile;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NativeFile); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 1011, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_MemoryMappedFile = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_MemoryMappedFile_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_MemoryMappedFile)) __PYX_ERR(6, 1011, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_MemoryMappedFile_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_MemoryMappedFile) < (0)) __PYX_ERR(6, 1011, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_MemoryMappedFile = &__pyx_type_7pyarrow_3lib_MemoryMappedFile;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_MemoryMappedFile->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NativeFile;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_MemoryMappedFile) < (0)) __PYX_ERR(6, 1011, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_MemoryMappedFile);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_MemoryMappedFile->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_MemoryMappedFile->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_MemoryMappedFile->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_MemoryMappedFile, __pyx_vtabptr_7pyarrow_3lib_MemoryMappedFile) < (0)) __PYX_ERR(6, 1011, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_MemoryMappedFile) < (0)) __PYX_ERR(6, 1011, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_MemoryMappedFile, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_MemoryMappedFile) < (0)) __PYX_ERR(6, 1011, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_MemoryMappedFile->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_MemoryMappedFile->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_MemoryMappedFile, __pyx_base.__pyx_base.__weakref__);
  #endif
  if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_MemoryMappedFile) < (0)) __PYX_ERR(6, 1011, __pyx_L1_error)
  __pyx_vtabptr_7pyarrow_3lib_OSFile = &__pyx_vtable_7pyarrow_3lib_OSFile;
  __pyx_vtable_7pyarrow_3lib_OSFile.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_NativeFile;
  __pyx_vtable_7pyarrow_3lib_OSFile._open_readable = (PyObject *(*)(struct __pyx_obj_7pyarrow_3lib_OSFile *, std::string,  arrow::MemoryPool *))__pyx_f_7pyarrow_3lib_6OSFile__open_readable;
  __pyx_vtable_7pyarrow_3lib_OSFile._open_writable = (PyObject *(*)(struct __pyx_obj_7pyarrow_3lib_OSFile *, std::string, struct __pyx_opt_args_7pyarrow_3lib_6OSFile__open_writable *__pyx_optional_args))__pyx_f_7pyarrow_3lib_6OSFile__open_writable;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NativeFile); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 1182, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_OSFile = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_OSFile_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_OSFile)) __PYX_ERR(6, 1182, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_OSFile_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_OSFile) < (0)) __PYX_ERR(6, 1182, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_OSFile = &__pyx_type_7pyarrow_3lib_OSFile;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_OSFile->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NativeFile;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_OSFile) < (0)) __PYX_ERR(6, 1182, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_OSFile);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_OSFile->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_OSFile->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_OSFile->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_OSFile, __pyx_vtabptr_7pyarrow_3lib_OSFile) < (0)) __PYX_ERR(6, 1182, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_OSFile) < (0)) __PYX_ERR(6, 1182, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_OSFile, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_OSFile) < (0)) __PYX_ERR(6, 1182, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_OSFile->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_OSFile->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_OSFile, __pyx_base.__pyx_base.__weakref__);
  #endif
  if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_OSFile) < (0)) __PYX_ERR(6, 1182, __pyx_L1_error)
  __pyx_vtabptr_7pyarrow_3lib_FixedSizeBufferWriter = &__pyx_vtable_7pyarrow_3lib_FixedSizeBufferWriter;
  __pyx_vtable_7pyarrow_3lib_FixedSizeBufferWriter.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_NativeFile;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NativeFile); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 1270, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedSizeBufferWriter = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_FixedSizeBufferWriter_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedSizeBufferWriter)) __PYX_ERR(6, 1270, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_FixedSizeBufferWriter_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedSizeBufferWriter) < (0)) __PYX_ERR(6, 1270, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedSizeBufferWriter = &__pyx_type_7pyarrow_3lib_FixedSizeBufferWriter;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_FixedSizeBufferWriter->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NativeFile;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedSizeBufferWriter) < (0)) __PYX_ERR(6, 1270, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedSizeBufferWriter);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedSizeBufferWriter->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedSizeBufferWriter->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedSizeBufferWriter->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedSizeBufferWriter, __pyx_vtabptr_7pyarrow_3lib_FixedSizeBufferWriter) < (0)) __PYX_ERR(6, 1270, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedSizeBufferWriter) < (0)) __PYX_ERR(6, 1270, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_FixedSizeBufferWriter, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedSizeBufferWriter) < (0)) __PYX_ERR(6, 1270, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedSizeBufferWriter->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedSizeBufferWriter->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_FixedSizeBufferWriter, __pyx_base.__pyx_base.__weakref__);
  #endif
  if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedSizeBufferWriter) < (0)) __PYX_ERR(6, 1270, __pyx_L1_error)
  __pyx_vtabptr_7pyarrow_3lib_BufferOutputStream = &__pyx_vtable_7pyarrow_3lib_BufferOutputStream;
  __pyx_vtable_7pyarrow_3lib_BufferOutputStream.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_NativeFile;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NativeFile); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 1650, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_BufferOutputStream = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_BufferOutputStream_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_BufferOutputStream)) __PYX_ERR(6, 1650, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_BufferOutputStream_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_BufferOutputStream) < (0)) __PYX_ERR(6, 1650, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_BufferOutputStream = &__pyx_type_7pyarrow_3lib_BufferOutputStream;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_BufferOutputStream->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NativeFile;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_BufferOutputStream) < (0)) __PYX_ERR(6, 1650, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_BufferOutputStream);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_BufferOutputStream->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_BufferOutputStream->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_BufferOutputStream->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_BufferOutputStream, __pyx_vtabptr_7pyarrow_3lib_BufferOutputStream) < (0)) __PYX_ERR(6, 1650, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_BufferOutputStream) < (0)) __PYX_ERR(6, 1650, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_BufferOutputStream, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_BufferOutputStream) < (0)) __PYX_ERR(6, 1650, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_BufferOutputStream->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_BufferOutputStream->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_BufferOutputStream, __pyx_base.__pyx_base.__weakref__);
  #endif
  if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_BufferOutputStream) < (0)) __PYX_ERR(6, 1650, __pyx_L1_error)
  __pyx_vtabptr_7pyarrow_3lib_MockOutputStream = &__pyx_vtable_7pyarrow_3lib_MockOutputStream;
  __pyx_vtable_7pyarrow_3lib_MockOutputStream.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_NativeFile;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NativeFile); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 1695, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_MockOutputStream = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_MockOutputStream_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_MockOutputStream)) __PYX_ERR(6, 1695, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_MockOutputStream_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_MockOutputStream) < (0)) __PYX_ERR(6, 1695, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_MockOutputStream = &__pyx_type_7pyarrow_3lib_MockOutputStream;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_MockOutputStream->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NativeFile;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_MockOutputStream) < (0)) __PYX_ERR(6, 1695, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_MockOutputStream);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_MockOutputStream->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_MockOutputStream->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_MockOutputStream->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_MockOutputStream, __pyx_vtabptr_7pyarrow_3lib_MockOutputStream) < (0)) __PYX_ERR(6, 1695, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_MockOutputStream) < (0)) __PYX_ERR(6, 1695, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_MockOutputStream, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_MockOutputStream) < (0)) __PYX_ERR(6, 1695, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_MockOutputStream->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_MockOutputStream->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_MockOutputStream, __pyx_base.__pyx_base.__weakref__);
  #endif
  if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_MockOutputStream) < (0)) __PYX_ERR(6, 1695, __pyx_L1_error)
  __pyx_vtabptr_7pyarrow_3lib_BufferReader = &__pyx_vtable_7pyarrow_3lib_BufferReader;
  __pyx_vtable_7pyarrow_3lib_BufferReader.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_NativeFile;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NativeFile); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 1706, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_BufferReader = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_BufferReader_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_BufferReader)) __PYX_ERR(6, 1706, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_BufferReader_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_BufferReader) < (0)) __PYX_ERR(6, 1706, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_BufferReader = &__pyx_type_7pyarrow_3lib_BufferReader;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_BufferReader->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NativeFile;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_BufferReader) < (0)) __PYX_ERR(6, 1706, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_BufferReader);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_BufferReader->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_BufferReader->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_BufferReader->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_BufferReader, __pyx_vtabptr_7pyarrow_3lib_BufferReader) < (0)) __PYX_ERR(6, 1706, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_BufferReader) < (0)) __PYX_ERR(6, 1706, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_BufferReader, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_BufferReader) < (0)) __PYX_ERR(6, 1706, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_BufferReader->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_BufferReader->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_BufferReader, __pyx_base.__pyx_base.__weakref__);
  #endif
  if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_BufferReader) < (0)) __PYX_ERR(6, 1706, __pyx_L1_error)
  __pyx_vtabptr_7pyarrow_3lib_TransformInputStream = &__pyx_vtable_7pyarrow_3lib_TransformInputStream;
  __pyx_vtable_7pyarrow_3lib_TransformInputStream.__pyx_base = *__pyx_vtabptr_7pyarrow_3lib_NativeFile;
  __pyx_vtable_7pyarrow_3lib_TransformInputStream.make_native = (std::shared_ptr< arrow::io::InputStream>  (*)(std::shared_ptr< arrow::io::InputStream> , PyObject *))__pyx_f_7pyarrow_3lib_20TransformInputStream_make_native;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NativeFile); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 1972, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_TransformInputStream = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_TransformInputStream_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_TransformInputStream)) __PYX_ERR(6, 1972, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_TransformInputStream_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_TransformInputStream) < (0)) __PYX_ERR(6, 1972, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_TransformInputStream = &__pyx_type_7pyarrow_3lib_TransformInputStream;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_TransformInputStream->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NativeFile;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_TransformInputStream) < (0)) __PYX_ERR(6, 1972, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_TransformInputStream);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_TransformInputStream->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_TransformInputStream->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_TransformInputStream->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_TransformInputStream, __pyx_vtabptr_7pyarrow_3lib_TransformInputStream) < (0)) __PYX_ERR(6, 1972, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_TransformInputStream) < (0)) __PYX_ERR(6, 1972, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_TransformInputStream, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_TransformInputStream) < (0)) __PYX_ERR(6, 1972, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_TransformInputStream->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_TransformInputStream->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_TransformInputStream, __pyx_base.__pyx_base.__weakref__);
  #endif
  if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_TransformInputStream) < (0)) __PYX_ERR(6, 1972, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Weakrefable); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 488, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_MessageReader = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_MessageReader_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_MessageReader)) __PYX_ERR(19, 488, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_MessageReader_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_MessageReader) < (0)) __PYX_ERR(19, 488, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_MessageReader = &__pyx_type_7pyarrow_3lib_MessageReader;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_MessageReader->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Weakrefable;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_MessageReader) < (0)) __PYX_ERR(19, 488, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_MessageReader);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_MessageReader->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_MessageReader->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_MessageReader->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_MessageReader, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_MessageReader) < (0)) __PYX_ERR(19, 488, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_MessageReader->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_MessageReader->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_MessageReader, __pyx_base.__weakref__);
  #endif
  if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_MessageReader) < (0)) __PYX_ERR(19, 488, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__CRecordBatchWriter); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 642, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib__RecordBatchStreamWriter = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib__RecordBatchStreamWriter_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib__RecordBatchStreamWriter)) __PYX_ERR(19, 642, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib__RecordBatchStreamWriter_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib__RecordBatchStreamWriter) < (0)) __PYX_ERR(19, 642, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib__RecordBatchStreamWriter = &__pyx_type_7pyarrow_3lib__RecordBatchStreamWriter;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__RecordBatchStreamWriter->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__CRecordBatchWriter;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib__RecordBatchStreamWriter) < (0)) __PYX_ERR(19, 642, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib__RecordBatchStreamWriter);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib__RecordBatchStreamWriter->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib__RecordBatchStreamWriter->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib__RecordBatchStreamWriter->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_RecordBatchStreamWriter, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib__RecordBatchStreamWriter) < (0)) __PYX_ERR(19, 642, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib__RecordBatchStreamWriter->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib__RecordBatchStreamWriter->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib__RecordBatchStreamWriter, __pyx_base.__pyx_base.__weakref__);
  #endif
  if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib__RecordBatchStreamWriter) < (0)) __PYX_ERR(19, 642, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RecordBatchReader); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 1077, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib__RecordBatchStreamReader = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib__RecordBatchStreamReader_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib__RecordBatchStreamReader)) __PYX_ERR(19, 1077, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib__RecordBatchStreamReader_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib__RecordBatchStreamReader) < (0)) __PYX_ERR(19, 1077, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib__RecordBatchStreamReader = &__pyx_type_7pyarrow_3lib__RecordBatchStreamReader;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__RecordBatchStreamReader->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RecordBatchReader;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib__RecordBatchStreamReader) < (0)) __PYX_ERR(19, 1077, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib__RecordBatchStreamReader);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib__RecordBatchStreamReader->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib__RecordBatchStreamReader->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib__RecordBatchStreamReader->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_RecordBatchStreamReader, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib__RecordBatchStreamReader) < (0)) __PYX_ERR(19, 1077, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib__RecordBatchStreamReader->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib__RecordBatchStreamReader->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib__RecordBatchStreamReader, __pyx_base.__pyx_base.__weakref__);
  #endif
  if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib__RecordBatchStreamReader) < (0)) __PYX_ERR(19, 1077, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__RecordBatchStreamWriter); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 1106, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib__RecordBatchFileWriter = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib__RecordBatchFileWriter_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib__RecordBatchFileWriter)) __PYX_ERR(19, 1106, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib__RecordBatchFileWriter_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib__RecordBatchFileWriter) < (0)) __PYX_ERR(19, 1106, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib__RecordBatchFileWriter = &__pyx_type_7pyarrow_3lib__RecordBatchFileWriter;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__RecordBatchFileWriter->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__RecordBatchStreamWriter;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib__RecordBatchFileWriter) < (0)) __PYX_ERR(19, 1106, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib__RecordBatchFileWriter);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib__RecordBatchFileWriter->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib__RecordBatchFileWriter->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib__RecordBatchFileWriter->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_RecordBatchFileWriter, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib__RecordBatchFileWriter) < (0)) __PYX_ERR(19, 1106, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib__RecordBatchFileWriter->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib__RecordBatchFileWriter->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib__RecordBatchFileWriter, __pyx_base.__pyx_base.__pyx_base.__weakref__);
  #endif
  if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib__RecordBatchFileWriter) < (0)) __PYX_ERR(19, 1106, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Weakrefable); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 1147, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib__RecordBatchFileReader = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib__RecordBatchFileReader_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib__RecordBatchFileReader)) __PYX_ERR(19, 1147, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib__RecordBatchFileReader_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib__RecordBatchFileReader) < (0)) __PYX_ERR(19, 1147, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib__RecordBatchFileReader = &__pyx_type_7pyarrow_3lib__RecordBatchFileReader;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__RecordBatchFileReader->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Weakrefable;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib__RecordBatchFileReader) < (0)) __PYX_ERR(19, 1147, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib__RecordBatchFileReader);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib__RecordBatchFileReader->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib__RecordBatchFileReader->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib__RecordBatchFileReader->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_RecordBatchFileReader, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib__RecordBatchFileReader) < (0)) __PYX_ERR(19, 1147, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib__RecordBatchFileReader->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib__RecordBatchFileReader->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib__RecordBatchFileReader, __pyx_base.__weakref__);
  #endif
  if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib__RecordBatchFileReader) < (0)) __PYX_ERR(19, 1147, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SPECS
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_defaults = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib___pyx_defaults_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_defaults)) __PYX_ERR(1, 5506, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib___pyx_defaults_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_defaults) < (0)) __PYX_ERR(1, 5506, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_defaults = &__pyx_type_7pyarrow_3lib___pyx_defaults;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_defaults) < (0)) __PYX_ERR(1, 5506, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_defaults);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_defaults->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_defaults->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_defaults->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  #if CYTHON_USE_TYPE_SPECS
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct____iter__ = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib___pyx_scope_struct____iter___spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct____iter__)) __PYX_ERR(1, 1042, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib___pyx_scope_struct____iter___spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct____iter__) < (0)) __PYX_ERR(1, 1042, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct____iter__ = &__pyx_type_7pyarrow_3lib___pyx_scope_struct____iter__;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct____iter__) < (0)) __PYX_ERR(1, 1042, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct____iter__);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct____iter__->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct____iter__->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct____iter__->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  #if CYTHON_USE_TYPE_SPECS
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_1___iter__ = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib___pyx_scope_struct_1___iter___spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_1___iter__)) __PYX_ERR(1, 1162, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib___pyx_scope_struct_1___iter___spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_1___iter__) < (0)) __PYX_ERR(1, 1162, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_1___iter__ = &__pyx_type_7pyarrow_3lib___pyx_scope_struct_1___iter__;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_1___iter__) < (0)) __PYX_ERR(1, 1162, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_1___iter__);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_1___iter__->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_1___iter__->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_1___iter__->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  #if CYTHON_USE_TYPE_SPECS
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_2_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib___pyx_scope_struct_2_genexpr_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_2_genexpr)) __PYX_ERR(1, 2304, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib___pyx_scope_struct_2_genexpr_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_2_genexpr) < (0)) __PYX_ERR(1, 2304, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_2_genexpr = &__pyx_type_7pyarrow_3lib___pyx_scope_struct_2_genexpr;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_2_genexpr) < (0)) __PYX_ERR(1, 2304, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_2_genexpr);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_2_genexpr->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_2_genexpr->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_2_genexpr->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  #if CYTHON_USE_TYPE_SPECS
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_3_keys = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib___pyx_scope_struct_3_keys_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_3_keys)) __PYX_ERR(1, 2407, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib___pyx_scope_struct_3_keys_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_3_keys) < (0)) __PYX_ERR(1, 2407, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_3_keys = &__pyx_type_7pyarrow_3lib___pyx_scope_struct_3_keys;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_3_keys) < (0)) __PYX_ERR(1, 2407, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_3_keys);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_3_keys->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_3_keys->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_3_keys->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  #if CYTHON_USE_TYPE_SPECS
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_4_values = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib___pyx_scope_struct_4_values_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_4_values)) __PYX_ERR(1, 2411, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib___pyx_scope_struct_4_values_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_4_values) < (0)) __PYX_ERR(1, 2411, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_4_values = &__pyx_type_7pyarrow_3lib___pyx_scope_struct_4_values;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_4_values) < (0)) __PYX_ERR(1, 2411, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_4_values);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_4_values->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_4_values->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_4_values->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  #if CYTHON_USE_TYPE_SPECS
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_5_items = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib___pyx_scope_struct_5_items_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_5_items)) __PYX_ERR(1, 2415, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib___pyx_scope_struct_5_items_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_5_items) < (0)) __PYX_ERR(1, 2415, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_5_items = &__pyx_type_7pyarrow_3lib___pyx_scope_struct_5_items;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_5_items) < (0)) __PYX_ERR(1, 2415, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_5_items);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_5_items->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_5_items->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_5_items->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  #if CYTHON_USE_TYPE_SPECS
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_6___iter__ = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib___pyx_scope_struct_6___iter___spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_6___iter__)) __PYX_ERR(1, 2905, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib___pyx_scope_struct_6___iter___spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_6___iter__) < (0)) __PYX_ERR(1, 2905, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_6___iter__ = &__pyx_type_7pyarrow_3lib___pyx_scope_struct_6___iter__;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_6___iter__) < (0)) __PYX_ERR(1, 2905, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_6___iter__);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_6___iter__->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_6___iter__->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_6___iter__->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  #if CYTHON_USE_TYPE_SPECS
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_7___iter__ = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib___pyx_scope_struct_7___iter___spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_7___iter__)) __PYX_ERR(3, 1018, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib___pyx_scope_struct_7___iter___spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_7___iter__) < (0)) __PYX_ERR(3, 1018, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_7___iter__ = &__pyx_type_7pyarrow_3lib___pyx_scope_struct_7___iter__;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_7___iter__) < (0)) __PYX_ERR(3, 1018, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_7___iter__);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_7___iter__->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_7___iter__->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_7___iter__->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  #if CYTHON_USE_TYPE_SPECS
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_8_items = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib___pyx_scope_struct_8_items_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_8_items)) __PYX_ERR(3, 1027, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib___pyx_scope_struct_8_items_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_8_items) < (0)) __PYX_ERR(3, 1027, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_8_items = &__pyx_type_7pyarrow_3lib___pyx_scope_struct_8_items;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_8_items) < (0)) __PYX_ERR(3, 1027, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_8_items);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_8_items->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_8_items->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_8_items->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  #if CYTHON_USE_TYPE_SPECS
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_9_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib___pyx_scope_struct_9_genexpr_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_9_genexpr)) __PYX_ERR(3, 1028, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib___pyx_scope_struct_9_genexpr_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_9_genexpr) < (0)) __PYX_ERR(3, 1028, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_9_genexpr = &__pyx_type_7pyarrow_3lib___pyx_scope_struct_9_genexpr;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_9_genexpr) < (0)) __PYX_ERR(3, 1028, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_9_genexpr);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_9_genexpr->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_9_genexpr->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_9_genexpr->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  #if CYTHON_USE_TYPE_SPECS
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_10___iter__ = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib___pyx_scope_struct_10___iter___spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_10___iter__)) __PYX_ERR(3, 1137, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib___pyx_scope_struct_10___iter___spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_10___iter__) < (0)) __PYX_ERR(3, 1137, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_10___iter__ = &__pyx_type_7pyarrow_3lib___pyx_scope_struct_10___iter__;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_10___iter__) < (0)) __PYX_ERR(3, 1137, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_10___iter__);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_10___iter__->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_10___iter__->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_10___iter__->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  #if CYTHON_USE_TYPE_SPECS
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_11___iter__ = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib___pyx_scope_struct_11___iter___spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_11___iter__)) __PYX_ERR(4, 1409, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib___pyx_scope_struct_11___iter___spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_11___iter__) < (0)) __PYX_ERR(4, 1409, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_11___iter__ = &__pyx_type_7pyarrow_3lib___pyx_scope_struct_11___iter__;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_11___iter__) < (0)) __PYX_ERR(4, 1409, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_11___iter__);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_11___iter__->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_11___iter__->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_11___iter__->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  #if CYTHON_USE_TYPE_SPECS
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_12_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib___pyx_scope_struct_12_genexpr_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_12_genexpr)) __PYX_ERR(4, 4717, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib___pyx_scope_struct_12_genexpr_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_12_genexpr) < (0)) __PYX_ERR(4, 4717, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_12_genexpr = &__pyx_type_7pyarrow_3lib___pyx_scope_struct_12_genexpr;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_12_genexpr) < (0)) __PYX_ERR(4, 4717, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_12_genexpr);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_12_genexpr->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_12_genexpr->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_12_genexpr->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  #if CYTHON_USE_TYPE_SPECS
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_13___iter__ = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib___pyx_scope_struct_13___iter___spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_13___iter__)) __PYX_ERR(17, 293, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib___pyx_scope_struct_13___iter___spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_13___iter__) < (0)) __PYX_ERR(17, 293, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_13___iter__ = &__pyx_type_7pyarrow_3lib___pyx_scope_struct_13___iter__;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_13___iter__) < (0)) __PYX_ERR(17, 293, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_13___iter__);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_13___iter__->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_13___iter__->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_13___iter__->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  #if CYTHON_USE_TYPE_SPECS
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_14_iterchunks = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib___pyx_scope_struct_14_iterchunks_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_14_iterchunks)) __PYX_ERR(17, 1338, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib___pyx_scope_struct_14_iterchunks_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_14_iterchunks) < (0)) __PYX_ERR(17, 1338, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_14_iterchunks = &__pyx_type_7pyarrow_3lib___pyx_scope_struct_14_iterchunks;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_14_iterchunks) < (0)) __PYX_ERR(17, 1338, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_14_iterchunks);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_14_iterchunks->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_14_iterchunks->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_14_iterchunks->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  #if CYTHON_USE_TYPE_SPECS
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_15_itercolumns = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib___pyx_scope_struct_15_itercolumns_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_15_itercolumns)) __PYX_ERR(17, 2054, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib___pyx_scope_struct_15_itercolumns_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_15_itercolumns) < (0)) __PYX_ERR(17, 2054, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_15_itercolumns = &__pyx_type_7pyarrow_3lib___pyx_scope_struct_15_itercolumns;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_15_itercolumns) < (0)) __PYX_ERR(17, 2054, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_15_itercolumns);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_15_itercolumns->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_15_itercolumns->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_15_itercolumns->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  #if CYTHON_USE_TYPE_SPECS
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_16_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib___pyx_scope_struct_16_genexpr_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_16_genexpr)) __PYX_ERR(17, 5892, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib___pyx_scope_struct_16_genexpr_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_16_genexpr) < (0)) __PYX_ERR(17, 5892, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_16_genexpr = &__pyx_type_7pyarrow_3lib___pyx_scope_struct_16_genexpr;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_16_genexpr) < (0)) __PYX_ERR(17, 5892, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_16_genexpr);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_16_genexpr->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_16_genexpr->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_16_genexpr->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  #if CYTHON_USE_TYPE_SPECS
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_17_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib___pyx_scope_struct_17_genexpr_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_17_genexpr)) __PYX_ERR(5, 635, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib___pyx_scope_struct_17_genexpr_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_17_genexpr) < (0)) __PYX_ERR(5, 635, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_17_genexpr = &__pyx_type_7pyarrow_3lib___pyx_scope_struct_17_genexpr;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_17_genexpr) < (0)) __PYX_ERR(5, 635, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_17_genexpr);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_17_genexpr->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_17_genexpr->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_17_genexpr->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  #if CYTHON_USE_TYPE_SPECS
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_18_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib___pyx_scope_struct_18_genexpr_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_18_genexpr)) __PYX_ERR(5, 886, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib___pyx_scope_struct_18_genexpr_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_18_genexpr) < (0)) __PYX_ERR(5, 886, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_18_genexpr = &__pyx_type_7pyarrow_3lib___pyx_scope_struct_18_genexpr;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_18_genexpr) < (0)) __PYX_ERR(5, 886, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_18_genexpr);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_18_genexpr->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_18_genexpr->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_18_genexpr->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  #if CYTHON_USE_TYPE_SPECS
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_19_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib___pyx_scope_struct_19_genexpr_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_19_genexpr)) __PYX_ERR(5, 1128, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib___pyx_scope_struct_19_genexpr_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_19_genexpr) < (0)) __PYX_ERR(5, 1128, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_19_genexpr = &__pyx_type_7pyarrow_3lib___pyx_scope_struct_19_genexpr;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_19_genexpr) < (0)) __PYX_ERR(5, 1128, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_19_genexpr);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_19_genexpr->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_19_genexpr->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_19_genexpr->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  #if CYTHON_USE_TYPE_SPECS
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_20_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib___pyx_scope_struct_20_genexpr_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_20_genexpr)) __PYX_ERR(5, 1347, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib___pyx_scope_struct_20_genexpr_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_20_genexpr) < (0)) __PYX_ERR(5, 1347, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_20_genexpr = &__pyx_type_7pyarrow_3lib___pyx_scope_struct_20_genexpr;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_20_genexpr) < (0)) __PYX_ERR(5, 1347, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_20_genexpr);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_20_genexpr->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_20_genexpr->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_20_genexpr->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  #if CYTHON_USE_TYPE_SPECS
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_21_download = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib___pyx_scope_struct_21_download_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_21_download)) __PYX_ERR(6, 642, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib___pyx_scope_struct_21_download_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_21_download) < (0)) __PYX_ERR(6, 642, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_21_download = &__pyx_type_7pyarrow_3lib___pyx_scope_struct_21_download;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_21_download) < (0)) __PYX_ERR(6, 642, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_21_download);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_21_download->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_21_download->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_21_download->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  #if CYTHON_USE_TYPE_SPECS
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_22__download_nothreads = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib___pyx_scope_struct_22__download_nothreads_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_22__download_nothreads)) __PYX_ERR(6, 741, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib___pyx_scope_struct_22__download_nothreads_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_22__download_nothreads) < (0)) __PYX_ERR(6, 741, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_22__download_nothreads = &__pyx_type_7pyarrow_3lib___pyx_scope_struct_22__download_nothreads;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_22__download_nothreads) < (0)) __PYX_ERR(6, 741, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_22__download_nothreads);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_22__download_nothreads->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_22__download_nothreads->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_22__download_nothreads->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  #if CYTHON_USE_TYPE_SPECS
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_23_upload = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib___pyx_scope_struct_23_upload_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_23_upload)) __PYX_ERR(6, 797, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib___pyx_scope_struct_23_upload_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_23_upload) < (0)) __PYX_ERR(6, 797, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_23_upload = &__pyx_type_7pyarrow_3lib___pyx_scope_struct_23_upload;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_23_upload) < (0)) __PYX_ERR(6, 797, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_23_upload);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_23_upload->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_23_upload->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_23_upload->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  #if CYTHON_USE_TYPE_SPECS
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_24_iter_batches_with_custom_metadata = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib___pyx_scope_struct_24_iter_batches_with_custom_metadata_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_24_iter_batches_with_custom_metadata)) __PYX_ERR(19, 823, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib___pyx_scope_struct_24_iter_batches_with_custom_metadata_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_24_iter_batches_with_custom_metadata) < (0)) __PYX_ERR(19, 823, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_24_iter_batches_with_custom_metadata = &__pyx_type_7pyarrow_3lib___pyx_scope_struct_24_iter_batches_with_custom_metadata;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_24_iter_batches_with_custom_metadata) < (0)) __PYX_ERR(19, 823, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_24_iter_batches_with_custom_metadata);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_24_iter_batches_with_custom_metadata->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_24_iter_batches_with_custom_metadata->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib___pyx_scope_struct_24_iter_batches_with_custom_metadata->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_modinit_type_import_code(__pyx_mstatetype *__pyx_mstate) {
  __Pyx_RefNannyDeclarations
  CYTHON_UNUSED_VAR(__pyx_mstate);
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
  /*--- Type import code ---*/
  __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 9, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7cpython_4type_type = __Pyx_ImportType_3_2_4(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "type",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(PyTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyTypeObject),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  0, 0,
  #else
  sizeof(PyHeapTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyHeapTypeObject),
  #endif
  __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_7cpython_4type_type) __PYX_ERR(22, 9, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(23, 8, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7cpython_4bool_bool = __Pyx_ImportType_3_2_4(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "bool",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(PyLongObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyLongObject),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  0, 0,
  #else
  sizeof(PyLongObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyLongObject),
  #endif
  __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_7cpython_4bool_bool) __PYX_ERR(23, 8, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(24, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7cpython_7complex_complex = __Pyx_ImportType_3_2_4(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "complex",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(PyComplexObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyComplexObject),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  0, 0,
  #else
  sizeof(PyComplexObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyComplexObject),
  #endif
  __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_7cpython_7complex_complex) __PYX_ERR(24, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyImport_ImportModule("datetime"); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 43, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7cpython_8datetime_date = __Pyx_ImportType_3_2_4(__pyx_t_1, "datetime", "date",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(PyDateTime_Date), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyDateTime_Date),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  sizeof(PyDateTime_Date), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyDateTime_Date),
  #else
  sizeof(PyDateTime_Date), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyDateTime_Date),
  #endif
  __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_7cpython_8datetime_date) __PYX_ERR(9, 43, __pyx_L1_error)
  __pyx_mstate->__pyx_ptype_7cpython_8datetime_time = __Pyx_ImportType_3_2_4(__pyx_t_1, "datetime", "time",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(PyDateTime_Time), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyDateTime_Time),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  sizeof(PyDateTime_Time), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyDateTime_Time),
  #else
  sizeof(PyDateTime_Time), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyDateTime_Time),
  #endif
  __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_7cpython_8datetime_time) __PYX_ERR(9, 56, __pyx_L1_error)
  __pyx_mstate->__pyx_ptype_7cpython_8datetime_datetime = __Pyx_ImportType_3_2_4(__pyx_t_1, "datetime", "datetime",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(PyDateTime_DateTime), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyDateTime_DateTime),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  sizeof(PyDateTime_DateTime), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyDateTime_DateTime),
  #else
  sizeof(PyDateTime_DateTime), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyDateTime_DateTime),
  #endif
  __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_7cpython_8datetime_datetime) __PYX_ERR(9, 82, __pyx_L1_error)
  __pyx_mstate->__pyx_ptype_7cpython_8datetime_timedelta = __Pyx_ImportType_3_2_4(__pyx_t_1, "datetime", "timedelta",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(PyDateTime_Delta), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyDateTime_Delta),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  sizeof(PyDateTime_Delta), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyDateTime_Delta),
  #else
  sizeof(PyDateTime_Delta), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyDateTime_Delta),
  #endif
  __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_7cpython_8datetime_timedelta) __PYX_ERR(9, 120, __pyx_L1_error)
  __pyx_mstate->__pyx_ptype_7cpython_8datetime_tzinfo = __Pyx_ImportType_3_2_4(__pyx_t_1, "datetime", "tzinfo",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(PyDateTime_TZInfo), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyDateTime_TZInfo),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  sizeof(PyDateTime_TZInfo), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyDateTime_TZInfo),
  #else
  sizeof(PyDateTime_TZInfo), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyDateTime_TZInfo),
  #endif
  __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_7cpython_8datetime_tzinfo) __PYX_ERR(9, 133, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_modinit_variable_import_code(__pyx_mstatetype *__pyx_mstate) {
  __Pyx_RefNannyDeclarations
  CYTHON_UNUSED_VAR(__pyx_mstate);
  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);
  /*--- Variable import code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_function_import_code(__pyx_mstatetype *__pyx_mstate) {
  __Pyx_RefNannyDeclarations
  CYTHON_UNUSED_VAR(__pyx_mstate);
  __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
  /*--- Function import code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

#if CYTHON_PEP489_MULTI_PHASE_INIT
static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
static int __pyx_pymod_exec_lib(PyObject* module); /*proto*/
static PyModuleDef_Slot __pyx_moduledef_slots[] = {
  {Py_mod_create, (void*)__pyx_pymod_create},
  {Py_mod_exec, (void*)__pyx_pymod_exec_lib},
  #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
  {Py_mod_gil, __Pyx_FREETHREADING_COMPATIBLE},
  #endif
  #if PY_VERSION_HEX >= 0x030C0000 && CYTHON_USE_MODULE_STATE
  {Py_mod_multiple_interpreters, Py_MOD_MULTIPLE_INTERPRETERS_NOT_SUPPORTED},
  #endif
  {0, NULL}
};
#endif

#ifdef __cplusplus
namespace {
  struct PyModuleDef __pyx_moduledef =
  #else
  static struct PyModuleDef __pyx_moduledef =
  #endif
  {
      PyModuleDef_HEAD_INIT,
      "lib",
      0, /* m_doc */
    #if CYTHON_USE_MODULE_STATE
      sizeof(__pyx_mstatetype), /* m_size */
    #else
      (CYTHON_PEP489_MULTI_PHASE_INIT) ? 0 : -1, /* m_size */
    #endif
      __pyx_methods /* m_methods */,
    #if CYTHON_PEP489_MULTI_PHASE_INIT
      __pyx_moduledef_slots, /* m_slots */
    #else
      NULL, /* m_reload */
    #endif
    #if CYTHON_USE_MODULE_STATE
      __pyx_m_traverse, /* m_traverse */
      __pyx_m_clear, /* m_clear */
      NULL /* m_free */
    #else
      NULL, /* m_traverse */
      NULL, /* m_clear */
      NULL /* m_free */
    #endif
  };
  #ifdef __cplusplus
} /* anonymous namespace */
#endif

/* PyModInitFuncType */
#ifndef CYTHON_NO_PYINIT_EXPORT
  #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
#else
  #ifdef __cplusplus
  #define __Pyx_PyMODINIT_FUNC extern "C" PyObject *
  #else
  #define __Pyx_PyMODINIT_FUNC PyObject *
  #endif
#endif

__Pyx_PyMODINIT_FUNC PyInit_lib(void) CYTHON_SMALL_CODE; /*proto*/
__Pyx_PyMODINIT_FUNC PyInit_lib(void)
#if CYTHON_PEP489_MULTI_PHASE_INIT
{
  return PyModuleDef_Init(&__pyx_moduledef);
}
/* ModuleCreationPEP489 */
#if CYTHON_COMPILING_IN_LIMITED_API && (__PYX_LIMITED_VERSION_HEX < 0x03090000\
      || ((defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)) && __PYX_LIMITED_VERSION_HEX < 0x030A0000))
static PY_INT64_T __Pyx_GetCurrentInterpreterId(void) {
    {
        PyObject *module = PyImport_ImportModule("_interpreters"); // 3.13+ I think
        if (!module) {
            PyErr_Clear(); // just try the 3.8-3.12 version
            module = PyImport_ImportModule("_xxsubinterpreters");
            if (!module) goto bad;
        }
        PyObject *current = PyObject_CallMethod(module, "get_current", NULL);
        Py_DECREF(module);
        if (!current) goto bad;
        if (PyTuple_Check(current)) {
            PyObject *new_current = PySequence_GetItem(current, 0);
            Py_DECREF(current);
            current = new_current;
            if (!new_current) goto bad;
        }
        long long as_c_int = PyLong_AsLongLong(current);
        Py_DECREF(current);
        return as_c_int;
    }
  bad:
    PySys_WriteStderr("__Pyx_GetCurrentInterpreterId failed. Try setting the C define CYTHON_PEP489_MULTI_PHASE_INIT=0\n");
    return -1;
}
#endif
#if !CYTHON_USE_MODULE_STATE
static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) {
    static PY_INT64_T main_interpreter_id = -1;
#if CYTHON_COMPILING_IN_GRAAL && defined(GRAALPY_VERSION_NUM) && GRAALPY_VERSION_NUM > 0x19000000
    PY_INT64_T current_id = GraalPyInterpreterState_GetIDFromThreadState(PyThreadState_Get());
#elif CYTHON_COMPILING_IN_GRAAL
    PY_INT64_T current_id = PyInterpreterState_GetIDFromThreadState(PyThreadState_Get());
#elif CYTHON_COMPILING_IN_LIMITED_API && (__PYX_LIMITED_VERSION_HEX < 0x03090000\
      || ((defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)) && __PYX_LIMITED_VERSION_HEX < 0x030A0000))
    PY_INT64_T current_id = __Pyx_GetCurrentInterpreterId();
#elif CYTHON_COMPILING_IN_LIMITED_API
    PY_INT64_T current_id = PyInterpreterState_GetID(PyInterpreterState_Get());
#else
    PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);
#endif
    if (unlikely(current_id == -1)) {
        return -1;
    }
    if (main_interpreter_id == -1) {
        main_interpreter_id = current_id;
        return 0;
    } else if (unlikely(main_interpreter_id != current_id)) {
        PyErr_SetString(
            PyExc_ImportError,
            "Interpreter change detected - this module can only be loaded into one interpreter per process.");
        return -1;
    }
    return 0;
}
#endif
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, PyModuleDef *def) {
    PyObject *module = NULL, *moddict, *modname;
    CYTHON_UNUSED_VAR(def);
    #if !CYTHON_USE_MODULE_STATE
    if (__Pyx_check_single_interpreter())
        return NULL;
    #endif
    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_lib(PyObject *__pyx_pyinit_module)
#endif
{
  int stringtab_initialized = 0;
  #if CYTHON_USE_MODULE_STATE
  int pystate_addmodule_run = 0;
  #endif
  __pyx_mstatetype *__pyx_mstate = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __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;
  size_t __pyx_t_10;
  int __pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  PyObject *__pyx_t_19 = NULL;
  PyObject *__pyx_t_20 = NULL;
  PyObject *__pyx_t_21 = NULL;
  PyObject *__pyx_t_22 = NULL;
  PyObject *__pyx_t_23 = NULL;
  PyObject *__pyx_t_24 = NULL;
  PyObject *__pyx_t_25 = NULL;
  int __pyx_t_26;
  PyTypeObject *__pyx_t_27 = NULL;
  PyObject *__pyx_t_28 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  if (__pyx_m) {
    if (__pyx_m == __pyx_pyinit_module) return 0;
    PyErr_SetString(PyExc_RuntimeError, "Module 'lib' has already been imported. Re-initialisation is not supported.");
    return -1;
  }
  #else
  if (__pyx_m) return __Pyx_NewRef(__pyx_m);
  #endif
  /*--- Module creation code ---*/
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  __pyx_t_1 = __pyx_pyinit_module;
  Py_INCREF(__pyx_t_1);
  #else
  __pyx_t_1 = PyModule_Create(&__pyx_moduledef); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #if CYTHON_USE_MODULE_STATE
  {
    int add_module_result = __Pyx_State_AddModule(__pyx_t_1, &__pyx_moduledef);
    __pyx_t_1 = 0; /* transfer ownership from __pyx_t_1 to "lib" pseudovariable */
    if (unlikely((add_module_result < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
    pystate_addmodule_run = 1;
  }
  #else
  __pyx_m = __pyx_t_1;
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
  PyUnstable_Module_SetGIL(__pyx_m, Py_MOD_GIL_NOT_USED);
  #endif
  __pyx_mstate = __pyx_mstate_global;
  CYTHON_UNUSED_VAR(__pyx_t_1);
  __pyx_mstate->__pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_mstate->__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
  Py_INCREF(__pyx_mstate->__pyx_d);
  __pyx_mstate->__pyx_b = __Pyx_PyImport_AddModuleRef(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_mstate->__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_mstate->__pyx_cython_runtime = __Pyx_PyImport_AddModuleRef("cython_runtime"); if (unlikely(!__pyx_mstate->__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_mstate->__pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  /* ImportRefnannyAPI */
  #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("PyInit_lib", 0);
  __Pyx_init_runtime_version();
  if (__Pyx_check_binary_version(__PYX_LIMITED_VERSION_HEX, __Pyx_get_runtime_version(), CYTHON_COMPILING_IN_LIMITED_API) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_mstate->__pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_mstate->__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_mstate->__pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_mstate->__pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
  /*--- Library function declarations ---*/
  /*--- Initialize various global constants etc. ---*/
  if (__Pyx_InitConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  stringtab_initialized = 1;
  if (__Pyx_InitGlobals() < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__pyx_module_is_main_pyarrow__lib) {
    if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_name_2, __pyx_mstate_global->__pyx_n_u_main) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  }
  {
    PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
    if (!PyDict_GetItemString(modules, "pyarrow.lib")) {
      if (unlikely((PyDict_SetItemString(modules, "pyarrow.lib", __pyx_m) < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
    }
  }
  /*--- Builtin init code ---*/
  if (__Pyx_InitCachedBuiltins(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  /*--- Constants init code ---*/
  if (__Pyx_InitCachedConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_CreateCodeObjects(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  /*--- Global type/function init code ---*/
  (void)__Pyx_modinit_global_init_code(__pyx_mstate);
  (void)__Pyx_modinit_variable_export_code(__pyx_mstate);
  if (unlikely((__Pyx_modinit_function_export_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
  if (unlikely((__Pyx_modinit_type_init_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
  if (unlikely((__Pyx_modinit_type_import_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
  (void)__Pyx_modinit_variable_import_code(__pyx_mstate);
  (void)__Pyx_modinit_function_import_code(__pyx_mstate);
  /*--- Execution code ---*/

  /* "EnumBase":10
 * 
 * cdef object __Pyx_EnumBase
 * from enum import IntEnum as __Pyx_EnumBase             # <<<<<<<<<<<<<<
 * 
 * cdef object __Pyx_FlagBase
*/
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_IntEnum};
    __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_enum, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 10, __pyx_L1_error)
  }
  __pyx_t_2 = __pyx_t_1;
  __Pyx_GOTREF(__pyx_t_2);
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_IntEnum};
    __pyx_t_3 = 0; {
      __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(7, 10, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      switch (__pyx_t_3) {
        case 0:
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_XGOTREF(__Pyx_EnumBase);
        __Pyx_DECREF_SET(__Pyx_EnumBase, __pyx_t_4);
        __Pyx_GIVEREF(__pyx_t_4);
        break;
        default:;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "EnumBase":13
 * 
 * cdef object __Pyx_FlagBase
 * from enum import IntFlag as __Pyx_FlagBase             # <<<<<<<<<<<<<<
*/
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_IntFlag};
    __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_enum, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 13, __pyx_L1_error)
  }
  __pyx_t_2 = __pyx_t_1;
  __Pyx_GOTREF(__pyx_t_2);
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_IntFlag};
    __pyx_t_3 = 0; {
      __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(7, 13, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      switch (__pyx_t_3) {
        case 0:
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_XGOTREF(__Pyx_FlagBase);
        __Pyx_DECREF_SET(__Pyx_FlagBase, __pyx_t_4);
        __Pyx_GIVEREF(__pyx_t_4);
        break;
        default:;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "EnumType":23
 * 
 * 
 * Alignment = __Pyx_FlagBase('Alignment', [             # <<<<<<<<<<<<<<
 *     ('Any', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_Alignment(Any)),
 *     ('DataTypeSpecific', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_Alignment(DataTypeSpecific)),
*/
  __pyx_t_4 = NULL;
  __Pyx_INCREF(__Pyx_FlagBase);
  __pyx_t_5 = __Pyx_FlagBase; 

  /* "EnumType":24
 * 
 * Alignment = __Pyx_FlagBase('Alignment', [
 *     ('Any', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_Alignment(Any)),             # <<<<<<<<<<<<<<
 *     ('DataTypeSpecific', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_Alignment(DataTypeSpecific)),
 *     ('At64Byte', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_Alignment(At64Byte)),
*/
  __pyx_t_6 = __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_Alignment(__pyx_e_7pyarrow_3lib_Any); if (unlikely(!__pyx_t_6)) __PYX_ERR(7, 24, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = PyTuple_Pack(2, __pyx_mstate_global->__pyx_n_u_Any, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(7, 24, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "EnumType":25
 * Alignment = __Pyx_FlagBase('Alignment', [
 *     ('Any', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_Alignment(Any)),
 *     ('DataTypeSpecific', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_Alignment(DataTypeSpecific)),             # <<<<<<<<<<<<<<
 *     ('At64Byte', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_Alignment(At64Byte)),
 * 
*/
  __pyx_t_6 = __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_Alignment(__pyx_e_7pyarrow_3lib_DataTypeSpecific); if (unlikely(!__pyx_t_6)) __PYX_ERR(7, 25, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = PyTuple_Pack(2, __pyx_mstate_global->__pyx_n_u_DataTypeSpecific, __pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(7, 25, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "EnumType":26
 *     ('Any', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_Alignment(Any)),
 *     ('DataTypeSpecific', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_Alignment(DataTypeSpecific)),
 *     ('At64Byte', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_Alignment(At64Byte)),             # <<<<<<<<<<<<<<
 * 
 * ], module=globals().get("__module__", 'pyarrow.lib'))
*/
  __pyx_t_6 = __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_Alignment(__pyx_e_7pyarrow_3lib_At64Byte); if (unlikely(!__pyx_t_6)) __PYX_ERR(7, 26, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_9 = PyTuple_Pack(2, __pyx_mstate_global->__pyx_n_u_At64Byte, __pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(7, 26, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "EnumType":23
 * 
 * 
 * Alignment = __Pyx_FlagBase('Alignment', [             # <<<<<<<<<<<<<<
 *     ('Any', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_Alignment(Any)),
 *     ('DataTypeSpecific', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_Alignment(DataTypeSpecific)),
*/
  __pyx_t_6 = __Pyx_PyList_Pack(3, __pyx_t_7, __pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(7, 23, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "EnumType":28
 *     ('At64Byte', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_Alignment(At64Byte)),
 * 
 * ], module=globals().get("__module__", 'pyarrow.lib'))             # <<<<<<<<<<<<<<
 * 
 * if PY_VERSION_HEX >= 0x030B0000:
*/
  __pyx_t_9 = __Pyx_Globals(); if (unlikely(!__pyx_t_9)) __PYX_ERR(7, 28, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_get); if (unlikely(!__pyx_t_8)) __PYX_ERR(7, 28, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_mstate_global->__pyx_tuple[6], NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(7, 28, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_10 = 1;
  {
    PyObject *__pyx_callargs[3 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Alignment, __pyx_t_6};
    __pyx_t_8 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(7, 23, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_module, __pyx_t_9, __pyx_t_8, __pyx_callargs+3, 0) < (0)) __PYX_ERR(7, 23, __pyx_L1_error)
    __pyx_t_2 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_10, (3-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_8);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 23, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Alignment, __pyx_t_2) < (0)) __PYX_ERR(7, 23, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "EnumType":30
 * ], module=globals().get("__module__", 'pyarrow.lib'))
 * 
 * if PY_VERSION_HEX >= 0x030B0000:             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_t_11 = (PY_VERSION_HEX >= 0x030B0000);
  if (__pyx_t_11) {

    /* "EnumType":35
 * 
 * 
 *     Alignment._member_names_ = list(Alignment.__members__)             # <<<<<<<<<<<<<<
*/
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Alignment); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 35, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_members); if (unlikely(!__pyx_t_5)) __PYX_ERR(7, 35, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PySequence_ListKeepNew(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 35, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_Alignment); if (unlikely(!__pyx_t_5)) __PYX_ERR(7, 35, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__Pyx_PyObject_SetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_member_names, __pyx_t_2) < (0)) __PYX_ERR(7, 35, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "EnumType":30
 * ], module=globals().get("__module__", 'pyarrow.lib'))
 * 
 * if PY_VERSION_HEX >= 0x030B0000:             # <<<<<<<<<<<<<<
 * 
 * 
*/
  }

  /* "EnumType":23
 * 
 * 
 * DeviceAllocationType = __Pyx_FlagBase('DeviceAllocationType', [             # <<<<<<<<<<<<<<
 *     ('CPU', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_DeviceAllocationType(CPU)),
 *     ('CUDA', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_DeviceAllocationType(CUDA)),
*/
  __pyx_t_2 = NULL;
  __Pyx_INCREF(__Pyx_FlagBase);
  __pyx_t_8 = __Pyx_FlagBase; 

  /* "EnumType":24
 * 
 * DeviceAllocationType = __Pyx_FlagBase('DeviceAllocationType', [
 *     ('CPU', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_DeviceAllocationType(CPU)),             # <<<<<<<<<<<<<<
 *     ('CUDA', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_DeviceAllocationType(CUDA)),
 *     ('CUDA_HOST', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_DeviceAllocationType(CUDA_HOST)),
*/
  __pyx_t_9 = __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_DeviceAllocationType(__pyx_e_7pyarrow_3lib_CPU); if (unlikely(!__pyx_t_9)) __PYX_ERR(7, 24, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_6 = PyTuple_Pack(2, __pyx_mstate_global->__pyx_n_u_CPU, __pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(7, 24, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "EnumType":25
 * DeviceAllocationType = __Pyx_FlagBase('DeviceAllocationType', [
 *     ('CPU', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_DeviceAllocationType(CPU)),
 *     ('CUDA', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_DeviceAllocationType(CUDA)),             # <<<<<<<<<<<<<<
 *     ('CUDA_HOST', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_DeviceAllocationType(CUDA_HOST)),
 *     ('OPENCL', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_DeviceAllocationType(OPENCL)),
*/
  __pyx_t_9 = __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_DeviceAllocationType(__pyx_e_7pyarrow_3lib_CUDA); if (unlikely(!__pyx_t_9)) __PYX_ERR(7, 25, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_4 = PyTuple_Pack(2, __pyx_mstate_global->__pyx_n_u_CUDA, __pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(7, 25, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "EnumType":26
 *     ('CPU', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_DeviceAllocationType(CPU)),
 *     ('CUDA', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_DeviceAllocationType(CUDA)),
 *     ('CUDA_HOST', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_DeviceAllocationType(CUDA_HOST)),             # <<<<<<<<<<<<<<
 *     ('OPENCL', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_DeviceAllocationType(OPENCL)),
 *     ('VULKAN', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_DeviceAllocationType(VULKAN)),
*/
  __pyx_t_9 = __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_DeviceAllocationType(__pyx_e_7pyarrow_3lib_CUDA_HOST); if (unlikely(!__pyx_t_9)) __PYX_ERR(7, 26, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_7 = PyTuple_Pack(2, __pyx_mstate_global->__pyx_n_u_CUDA_HOST, __pyx_t_9); if (unlikely(!__pyx_t_7)) __PYX_ERR(7, 26, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "EnumType":27
 *     ('CUDA', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_DeviceAllocationType(CUDA)),
 *     ('CUDA_HOST', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_DeviceAllocationType(CUDA_HOST)),
 *     ('OPENCL', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_DeviceAllocationType(OPENCL)),             # <<<<<<<<<<<<<<
 *     ('VULKAN', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_DeviceAllocationType(VULKAN)),
 *     ('METAL', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_DeviceAllocationType(METAL)),
*/
  __pyx_t_9 = __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_DeviceAllocationType(__pyx_e_7pyarrow_3lib_OPENCL); if (unlikely(!__pyx_t_9)) __PYX_ERR(7, 27, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_12 = PyTuple_Pack(2, __pyx_mstate_global->__pyx_n_u_OPENCL, __pyx_t_9); if (unlikely(!__pyx_t_12)) __PYX_ERR(7, 27, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "EnumType":28
 *     ('CUDA_HOST', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_DeviceAllocationType(CUDA_HOST)),
 *     ('OPENCL', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_DeviceAllocationType(OPENCL)),
 *     ('VULKAN', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_DeviceAllocationType(VULKAN)),             # <<<<<<<<<<<<<<
 *     ('METAL', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_DeviceAllocationType(METAL)),
 *     ('VPI', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_DeviceAllocationType(VPI)),
*/
  __pyx_t_9 = __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_DeviceAllocationType(__pyx_e_7pyarrow_3lib_VULKAN); if (unlikely(!__pyx_t_9)) __PYX_ERR(7, 28, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_13 = PyTuple_Pack(2, __pyx_mstate_global->__pyx_n_u_VULKAN, __pyx_t_9); if (unlikely(!__pyx_t_13)) __PYX_ERR(7, 28, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "EnumType":29
 *     ('OPENCL', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_DeviceAllocationType(OPENCL)),
 *     ('VULKAN', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_DeviceAllocationType(VULKAN)),
 *     ('METAL', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_DeviceAllocationType(METAL)),             # <<<<<<<<<<<<<<
 *     ('VPI', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_DeviceAllocationType(VPI)),
 *     ('ROCM', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_DeviceAllocationType(ROCM)),
*/
  __pyx_t_9 = __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_DeviceAllocationType(__pyx_e_7pyarrow_3lib_METAL); if (unlikely(!__pyx_t_9)) __PYX_ERR(7, 29, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_14 = PyTuple_Pack(2, __pyx_mstate_global->__pyx_n_u_METAL, __pyx_t_9); if (unlikely(!__pyx_t_14)) __PYX_ERR(7, 29, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "EnumType":30
 *     ('VULKAN', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_DeviceAllocationType(VULKAN)),
 *     ('METAL', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_DeviceAllocationType(METAL)),
 *     ('VPI', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_DeviceAllocationType(VPI)),             # <<<<<<<<<<<<<<
 *     ('ROCM', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_DeviceAllocationType(ROCM)),
 *     ('ROCM_HOST', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_DeviceAllocationType(ROCM_HOST)),
*/
  __pyx_t_9 = __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_DeviceAllocationType(__pyx_e_7pyarrow_3lib_VPI); if (unlikely(!__pyx_t_9)) __PYX_ERR(7, 30, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_15 = PyTuple_Pack(2, __pyx_mstate_global->__pyx_n_u_VPI, __pyx_t_9); if (unlikely(!__pyx_t_15)) __PYX_ERR(7, 30, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "EnumType":31
 *     ('METAL', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_DeviceAllocationType(METAL)),
 *     ('VPI', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_DeviceAllocationType(VPI)),
 *     ('ROCM', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_DeviceAllocationType(ROCM)),             # <<<<<<<<<<<<<<
 *     ('ROCM_HOST', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_DeviceAllocationType(ROCM_HOST)),
 *     ('EXT_DEV', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_DeviceAllocationType(EXT_DEV)),
*/
  __pyx_t_9 = __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_DeviceAllocationType(__pyx_e_7pyarrow_3lib_ROCM); if (unlikely(!__pyx_t_9)) __PYX_ERR(7, 31, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_16 = PyTuple_Pack(2, __pyx_mstate_global->__pyx_n_u_ROCM, __pyx_t_9); if (unlikely(!__pyx_t_16)) __PYX_ERR(7, 31, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_16);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "EnumType":32
 *     ('VPI', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_DeviceAllocationType(VPI)),
 *     ('ROCM', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_DeviceAllocationType(ROCM)),
 *     ('ROCM_HOST', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_DeviceAllocationType(ROCM_HOST)),             # <<<<<<<<<<<<<<
 *     ('EXT_DEV', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_DeviceAllocationType(EXT_DEV)),
 *     ('CUDA_MANAGED', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_DeviceAllocationType(CUDA_MANAGED)),
*/
  __pyx_t_9 = __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_DeviceAllocationType(__pyx_e_7pyarrow_3lib_ROCM_HOST); if (unlikely(!__pyx_t_9)) __PYX_ERR(7, 32, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_17 = PyTuple_Pack(2, __pyx_mstate_global->__pyx_n_u_ROCM_HOST, __pyx_t_9); if (unlikely(!__pyx_t_17)) __PYX_ERR(7, 32, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_17);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "EnumType":33
 *     ('ROCM', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_DeviceAllocationType(ROCM)),
 *     ('ROCM_HOST', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_DeviceAllocationType(ROCM_HOST)),
 *     ('EXT_DEV', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_DeviceAllocationType(EXT_DEV)),             # <<<<<<<<<<<<<<
 *     ('CUDA_MANAGED', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_DeviceAllocationType(CUDA_MANAGED)),
 *     ('ONEAPI', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_DeviceAllocationType(ONEAPI)),
*/
  __pyx_t_9 = __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_DeviceAllocationType(__pyx_e_7pyarrow_3lib_EXT_DEV); if (unlikely(!__pyx_t_9)) __PYX_ERR(7, 33, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_18 = PyTuple_Pack(2, __pyx_mstate_global->__pyx_n_u_EXT_DEV, __pyx_t_9); if (unlikely(!__pyx_t_18)) __PYX_ERR(7, 33, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "EnumType":34
 *     ('ROCM_HOST', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_DeviceAllocationType(ROCM_HOST)),
 *     ('EXT_DEV', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_DeviceAllocationType(EXT_DEV)),
 *     ('CUDA_MANAGED', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_DeviceAllocationType(CUDA_MANAGED)),             # <<<<<<<<<<<<<<
 *     ('ONEAPI', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_DeviceAllocationType(ONEAPI)),
 *     ('WEBGPU', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_DeviceAllocationType(WEBGPU)),
*/
  __pyx_t_9 = __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_DeviceAllocationType(__pyx_e_7pyarrow_3lib_CUDA_MANAGED); if (unlikely(!__pyx_t_9)) __PYX_ERR(7, 34, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_19 = PyTuple_Pack(2, __pyx_mstate_global->__pyx_n_u_CUDA_MANAGED, __pyx_t_9); if (unlikely(!__pyx_t_19)) __PYX_ERR(7, 34, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "EnumType":35
 *     ('EXT_DEV', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_DeviceAllocationType(EXT_DEV)),
 *     ('CUDA_MANAGED', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_DeviceAllocationType(CUDA_MANAGED)),
 *     ('ONEAPI', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_DeviceAllocationType(ONEAPI)),             # <<<<<<<<<<<<<<
 *     ('WEBGPU', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_DeviceAllocationType(WEBGPU)),
 *     ('HEXAGON', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_DeviceAllocationType(HEXAGON)),
*/
  __pyx_t_9 = __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_DeviceAllocationType(__pyx_e_7pyarrow_3lib_ONEAPI); if (unlikely(!__pyx_t_9)) __PYX_ERR(7, 35, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_20 = PyTuple_Pack(2, __pyx_mstate_global->__pyx_n_u_ONEAPI, __pyx_t_9); if (unlikely(!__pyx_t_20)) __PYX_ERR(7, 35, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_20);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "EnumType":36
 *     ('CUDA_MANAGED', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_DeviceAllocationType(CUDA_MANAGED)),
 *     ('ONEAPI', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_DeviceAllocationType(ONEAPI)),
 *     ('WEBGPU', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_DeviceAllocationType(WEBGPU)),             # <<<<<<<<<<<<<<
 *     ('HEXAGON', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_DeviceAllocationType(HEXAGON)),
 * 
*/
  __pyx_t_9 = __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_DeviceAllocationType(__pyx_e_7pyarrow_3lib_WEBGPU); if (unlikely(!__pyx_t_9)) __PYX_ERR(7, 36, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_21 = PyTuple_Pack(2, __pyx_mstate_global->__pyx_n_u_WEBGPU, __pyx_t_9); if (unlikely(!__pyx_t_21)) __PYX_ERR(7, 36, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "EnumType":37
 *     ('ONEAPI', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_DeviceAllocationType(ONEAPI)),
 *     ('WEBGPU', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_DeviceAllocationType(WEBGPU)),
 *     ('HEXAGON', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_DeviceAllocationType(HEXAGON)),             # <<<<<<<<<<<<<<
 * 
 * ], module=globals().get("__module__", 'pyarrow.lib'))
*/
  __pyx_t_9 = __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_DeviceAllocationType(__pyx_e_7pyarrow_3lib_HEXAGON); if (unlikely(!__pyx_t_9)) __PYX_ERR(7, 37, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_22 = PyTuple_Pack(2, __pyx_mstate_global->__pyx_n_u_HEXAGON, __pyx_t_9); if (unlikely(!__pyx_t_22)) __PYX_ERR(7, 37, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "EnumType":23
 * 
 * 
 * DeviceAllocationType = __Pyx_FlagBase('DeviceAllocationType', [             # <<<<<<<<<<<<<<
 *     ('CPU', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_DeviceAllocationType(CPU)),
 *     ('CUDA', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_DeviceAllocationType(CUDA)),
*/
  __pyx_t_9 = __Pyx_PyList_Pack(14, __pyx_t_6, __pyx_t_4, __pyx_t_7, __pyx_t_12, __pyx_t_13, __pyx_t_14, __pyx_t_15, __pyx_t_16, __pyx_t_17, __pyx_t_18, __pyx_t_19, __pyx_t_20, __pyx_t_21, __pyx_t_22); if (unlikely(!__pyx_t_9)) __PYX_ERR(7, 23, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;

  /* "EnumType":39
 *     ('HEXAGON', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_DeviceAllocationType(HEXAGON)),
 * 
 * ], module=globals().get("__module__", 'pyarrow.lib'))             # <<<<<<<<<<<<<<
 * 
 * if PY_VERSION_HEX >= 0x030B0000:
*/
  __pyx_t_22 = __Pyx_Globals(); if (unlikely(!__pyx_t_22)) __PYX_ERR(7, 39, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);
  __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_t_22, __pyx_mstate_global->__pyx_n_u_get); if (unlikely(!__pyx_t_21)) __PYX_ERR(7, 39, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
  __pyx_t_22 = __Pyx_PyObject_Call(__pyx_t_21, __pyx_mstate_global->__pyx_tuple[6], NULL); if (unlikely(!__pyx_t_22)) __PYX_ERR(7, 39, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
  __pyx_t_10 = 1;
  {
    PyObject *__pyx_callargs[3 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, __pyx_mstate_global->__pyx_n_u_DeviceAllocationType, __pyx_t_9};
    __pyx_t_21 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_21)) __PYX_ERR(7, 23, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_21);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_module, __pyx_t_22, __pyx_t_21, __pyx_callargs+3, 0) < (0)) __PYX_ERR(7, 23, __pyx_L1_error)
    __pyx_t_5 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_10, (3-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_21);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
    __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(7, 23, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
  }
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_DeviceAllocationType, __pyx_t_5) < (0)) __PYX_ERR(7, 23, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "EnumType":41
 * ], module=globals().get("__module__", 'pyarrow.lib'))
 * 
 * if PY_VERSION_HEX >= 0x030B0000:             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_t_11 = (PY_VERSION_HEX >= 0x030B0000);
  if (__pyx_t_11) {

    /* "EnumType":46
 * 
 * 
 *     DeviceAllocationType._member_names_ = list(DeviceAllocationType.__members__)             # <<<<<<<<<<<<<<
*/
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_DeviceAllocationType); if (unlikely(!__pyx_t_5)) __PYX_ERR(7, 46, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_members); if (unlikely(!__pyx_t_8)) __PYX_ERR(7, 46, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PySequence_ListKeepNew(__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(7, 46, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_DeviceAllocationType); if (unlikely(!__pyx_t_8)) __PYX_ERR(7, 46, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    if (__Pyx_PyObject_SetAttrStr(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_member_names, __pyx_t_5) < (0)) __PYX_ERR(7, 46, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

    /* "EnumType":41
 * ], module=globals().get("__module__", 'pyarrow.lib'))
 * 
 * if PY_VERSION_HEX >= 0x030B0000:             # <<<<<<<<<<<<<<
 * 
 * 
*/
  }

  /* "EnumType":23
 * 
 * 
 * MetadataVersion = __Pyx_FlagBase('MetadataVersion', [             # <<<<<<<<<<<<<<
 *     ('V1', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_MetadataVersion(V1)),
 *     ('V2', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_MetadataVersion(V2)),
*/
  __pyx_t_5 = NULL;
  __Pyx_INCREF(__Pyx_FlagBase);
  __pyx_t_21 = __Pyx_FlagBase; 

  /* "EnumType":24
 * 
 * MetadataVersion = __Pyx_FlagBase('MetadataVersion', [
 *     ('V1', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_MetadataVersion(V1)),             # <<<<<<<<<<<<<<
 *     ('V2', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_MetadataVersion(V2)),
 *     ('V3', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_MetadataVersion(V3)),
*/
  __pyx_t_22 = __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_MetadataVersion(__pyx_e_7pyarrow_3lib_V1); if (unlikely(!__pyx_t_22)) __PYX_ERR(7, 24, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);
  __pyx_t_9 = PyTuple_Pack(2, __pyx_mstate_global->__pyx_n_u_V1, __pyx_t_22); if (unlikely(!__pyx_t_9)) __PYX_ERR(7, 24, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;

  /* "EnumType":25
 * MetadataVersion = __Pyx_FlagBase('MetadataVersion', [
 *     ('V1', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_MetadataVersion(V1)),
 *     ('V2', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_MetadataVersion(V2)),             # <<<<<<<<<<<<<<
 *     ('V3', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_MetadataVersion(V3)),
 *     ('V4', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_MetadataVersion(V4)),
*/
  __pyx_t_22 = __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_MetadataVersion(__pyx_e_7pyarrow_3lib_V2); if (unlikely(!__pyx_t_22)) __PYX_ERR(7, 25, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);
  __pyx_t_2 = PyTuple_Pack(2, __pyx_mstate_global->__pyx_n_u_V2, __pyx_t_22); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 25, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;

  /* "EnumType":26
 *     ('V1', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_MetadataVersion(V1)),
 *     ('V2', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_MetadataVersion(V2)),
 *     ('V3', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_MetadataVersion(V3)),             # <<<<<<<<<<<<<<
 *     ('V4', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_MetadataVersion(V4)),
 *     ('V5', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_MetadataVersion(V5)),
*/
  __pyx_t_22 = __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_MetadataVersion(__pyx_e_7pyarrow_3lib_V3); if (unlikely(!__pyx_t_22)) __PYX_ERR(7, 26, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);
  __pyx_t_20 = PyTuple_Pack(2, __pyx_mstate_global->__pyx_n_u_V3, __pyx_t_22); if (unlikely(!__pyx_t_20)) __PYX_ERR(7, 26, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_20);
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;

  /* "EnumType":27
 *     ('V2', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_MetadataVersion(V2)),
 *     ('V3', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_MetadataVersion(V3)),
 *     ('V4', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_MetadataVersion(V4)),             # <<<<<<<<<<<<<<
 *     ('V5', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_MetadataVersion(V5)),
 * 
*/
  __pyx_t_22 = __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_MetadataVersion(__pyx_e_7pyarrow_3lib_V4); if (unlikely(!__pyx_t_22)) __PYX_ERR(7, 27, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);
  __pyx_t_19 = PyTuple_Pack(2, __pyx_mstate_global->__pyx_n_u_V4, __pyx_t_22); if (unlikely(!__pyx_t_19)) __PYX_ERR(7, 27, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;

  /* "EnumType":28
 *     ('V3', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_MetadataVersion(V3)),
 *     ('V4', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_MetadataVersion(V4)),
 *     ('V5', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_MetadataVersion(V5)),             # <<<<<<<<<<<<<<
 * 
 * ], module=globals().get("__module__", 'pyarrow.lib'))
*/
  __pyx_t_22 = __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_MetadataVersion(__pyx_e_7pyarrow_3lib_V5); if (unlikely(!__pyx_t_22)) __PYX_ERR(7, 28, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);
  __pyx_t_18 = PyTuple_Pack(2, __pyx_mstate_global->__pyx_n_u_V5, __pyx_t_22); if (unlikely(!__pyx_t_18)) __PYX_ERR(7, 28, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;

  /* "EnumType":23
 * 
 * 
 * MetadataVersion = __Pyx_FlagBase('MetadataVersion', [             # <<<<<<<<<<<<<<
 *     ('V1', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_MetadataVersion(V1)),
 *     ('V2', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_MetadataVersion(V2)),
*/
  __pyx_t_22 = __Pyx_PyList_Pack(5, __pyx_t_9, __pyx_t_2, __pyx_t_20, __pyx_t_19, __pyx_t_18); if (unlikely(!__pyx_t_22)) __PYX_ERR(7, 23, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;

  /* "EnumType":30
 *     ('V5', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_MetadataVersion(V5)),
 * 
 * ], module=globals().get("__module__", 'pyarrow.lib'))             # <<<<<<<<<<<<<<
 * 
 * if PY_VERSION_HEX >= 0x030B0000:
*/
  __pyx_t_18 = __Pyx_Globals(); if (unlikely(!__pyx_t_18)) __PYX_ERR(7, 30, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  __pyx_t_19 = __Pyx_PyObject_GetAttrStr(__pyx_t_18, __pyx_mstate_global->__pyx_n_u_get); if (unlikely(!__pyx_t_19)) __PYX_ERR(7, 30, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  __pyx_t_18 = __Pyx_PyObject_Call(__pyx_t_19, __pyx_mstate_global->__pyx_tuple[6], NULL); if (unlikely(!__pyx_t_18)) __PYX_ERR(7, 30, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  __pyx_t_10 = 1;
  {
    PyObject *__pyx_callargs[3 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_5, __pyx_mstate_global->__pyx_n_u_MetadataVersion, __pyx_t_22};
    __pyx_t_19 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_19)) __PYX_ERR(7, 23, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_19);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_module, __pyx_t_18, __pyx_t_19, __pyx_callargs+3, 0) < (0)) __PYX_ERR(7, 23, __pyx_L1_error)
    __pyx_t_8 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_21, __pyx_callargs+__pyx_t_10, (3-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_19);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
    __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
    __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
    __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
    if (unlikely(!__pyx_t_8)) __PYX_ERR(7, 23, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
  }
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_MetadataVersion, __pyx_t_8) < (0)) __PYX_ERR(7, 23, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "EnumType":32
 * ], module=globals().get("__module__", 'pyarrow.lib'))
 * 
 * if PY_VERSION_HEX >= 0x030B0000:             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_t_11 = (PY_VERSION_HEX >= 0x030B0000);
  if (__pyx_t_11) {

    /* "EnumType":37
 * 
 * 
 *     MetadataVersion._member_names_ = list(MetadataVersion.__members__)             # <<<<<<<<<<<<<<
*/
    __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_MetadataVersion); if (unlikely(!__pyx_t_8)) __PYX_ERR(7, 37, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_members); if (unlikely(!__pyx_t_21)) __PYX_ERR(7, 37, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_21);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = __Pyx_PySequence_ListKeepNew(__pyx_t_21); if (unlikely(!__pyx_t_8)) __PYX_ERR(7, 37, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_21, __pyx_mstate_global->__pyx_n_u_MetadataVersion); if (unlikely(!__pyx_t_21)) __PYX_ERR(7, 37, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_21);
    if (__Pyx_PyObject_SetAttrStr(__pyx_t_21, __pyx_mstate_global->__pyx_n_u_member_names, __pyx_t_8) < (0)) __PYX_ERR(7, 37, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

    /* "EnumType":32
 * ], module=globals().get("__module__", 'pyarrow.lib'))
 * 
 * if PY_VERSION_HEX >= 0x030B0000:             # <<<<<<<<<<<<<<
 * 
 * 
*/
  }

  /* "pyarrow/lib.pyx":22
 * # distutils: language = c++
 * 
 * import datetime             # <<<<<<<<<<<<<<
 * import decimal as _pydecimal
 * try:
*/
  __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_datetime, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 22, __pyx_L1_error)
  __pyx_t_21 = __pyx_t_1;
  __Pyx_GOTREF(__pyx_t_21);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_datetime, __pyx_t_21) < (0)) __PYX_ERR(0, 22, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "pyarrow/lib.pyx":23
 * 
 * import datetime
 * import decimal as _pydecimal             # <<<<<<<<<<<<<<
 * try:
 *     import numpy as np
*/
  __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_decimal, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 23, __pyx_L1_error)
  __pyx_t_21 = __pyx_t_1;
  __Pyx_GOTREF(__pyx_t_21);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pydecimal, __pyx_t_21) < (0)) __PYX_ERR(0, 23, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "pyarrow/lib.pyx":24
 * import datetime
 * import decimal as _pydecimal
 * try:             # <<<<<<<<<<<<<<
 *     import numpy as np
 * except ImportError:
*/
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_23, &__pyx_t_24);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_23);
    __Pyx_XGOTREF(__pyx_t_24);
    /*try:*/ {

      /* "pyarrow/lib.pyx":25
 * import decimal as _pydecimal
 * try:
 *     import numpy as np             # <<<<<<<<<<<<<<
 * except ImportError:
 *     np = None
*/
      __pyx_t_25 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_numpy, 0, 0, NULL, 0); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 25, __pyx_L5_error)
      __pyx_t_21 = __pyx_t_25;
      __Pyx_GOTREF(__pyx_t_21);
      if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_np, __pyx_t_21) < (0)) __PYX_ERR(0, 25, __pyx_L5_error)
      __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

      /* "pyarrow/lib.pyx":24
 * import datetime
 * import decimal as _pydecimal
 * try:             # <<<<<<<<<<<<<<
 *     import numpy as np
 * except ImportError:
*/
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_23); __pyx_t_23 = 0;
    __Pyx_XDECREF(__pyx_t_24); __pyx_t_24 = 0;
    goto __pyx_L10_try_end;
    __pyx_L5_error:;
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
    __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
    __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
    __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
    __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0;
    __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0;
    __Pyx_XDECREF(__pyx_t_22); __pyx_t_22 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __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;

    /* "pyarrow/lib.pyx":26
 * try:
 *     import numpy as np
 * except ImportError:             # <<<<<<<<<<<<<<
 *     np = None
 * import os
*/
    __pyx_t_26 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_ImportError))));
    if (__pyx_t_26) {
      __Pyx_AddTraceback("pyarrow.lib", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_21, &__pyx_t_8, &__pyx_t_19) < 0) __PYX_ERR(0, 26, __pyx_L7_except_error)
      __Pyx_XGOTREF(__pyx_t_21);
      __Pyx_XGOTREF(__pyx_t_8);
      __Pyx_XGOTREF(__pyx_t_19);

      /* "pyarrow/lib.pyx":27
 *     import numpy as np
 * except ImportError:
 *     np = None             # <<<<<<<<<<<<<<
 * import os
 * import sys
*/
      if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_np, Py_None) < (0)) __PYX_ERR(0, 27, __pyx_L7_except_error)
      __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
      goto __pyx_L6_exception_handled;
    }
    goto __pyx_L7_except_error;

    /* "pyarrow/lib.pyx":24
 * import datetime
 * import decimal as _pydecimal
 * try:             # <<<<<<<<<<<<<<
 *     import numpy as np
 * except ImportError:
*/
    __pyx_L7_except_error:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_23);
    __Pyx_XGIVEREF(__pyx_t_24);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_23, __pyx_t_24);
    goto __pyx_L1_error;
    __pyx_L6_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_23);
    __Pyx_XGIVEREF(__pyx_t_24);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_23, __pyx_t_24);
    __pyx_L10_try_end:;
  }

  /* "pyarrow/lib.pyx":28
 * except ImportError:
 *     np = None
 * import os             # <<<<<<<<<<<<<<
 * import sys
 * 
*/
  __pyx_t_24 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_os, 0, 0, NULL, 0); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 28, __pyx_L1_error)
  __pyx_t_19 = __pyx_t_24;
  __Pyx_GOTREF(__pyx_t_19);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_os, __pyx_t_19) < (0)) __PYX_ERR(0, 28, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;

  /* "pyarrow/lib.pyx":29
 *     np = None
 * import os
 * import sys             # <<<<<<<<<<<<<<
 * 
 * from cython.operator cimport dereference as deref
*/
  __pyx_t_24 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sys, 0, 0, NULL, 0); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 29, __pyx_L1_error)
  __pyx_t_19 = __pyx_t_24;
  __Pyx_GOTREF(__pyx_t_19);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_sys, __pyx_t_19) < (0)) __PYX_ERR(0, 29, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;

  /* "pyarrow/lib.pyx":40
 * 
 * # Initialize NumPy C API only if numpy was able to be imported
 * if np is not None:             # <<<<<<<<<<<<<<
 *     arrow_init_numpy()
 * 
*/
  __Pyx_GetModuleGlobalName(__pyx_t_19, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 40, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __pyx_t_11 = (__pyx_t_19 != Py_None);
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  if (__pyx_t_11) {

    /* "pyarrow/lib.pyx":41
 * # Initialize NumPy C API only if numpy was able to be imported
 * if np is not None:
 *     arrow_init_numpy()             # <<<<<<<<<<<<<<
 * 
 * # Initialize PyArrow C++ API
*/
    __pyx_t_26 = arrow::py::arrow_init_numpy(); if (unlikely(__pyx_t_26 == ((int)-1))) __PYX_ERR(0, 41, __pyx_L1_error)

    /* "pyarrow/lib.pyx":40
 * 
 * # Initialize NumPy C API only if numpy was able to be imported
 * if np is not None:             # <<<<<<<<<<<<<<
 *     arrow_init_numpy()
 * 
*/
  }

  /* "pyarrow/lib.pyx":45
 * # Initialize PyArrow C++ API
 * # (used from some of our C++ code, see e.g. ARROW-5260)
 * import_pyarrow()             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_t_26 = arrow::py::import_pyarrow(); if (unlikely(__pyx_t_26 == ((int)-1))) __PYX_ERR(0, 45, __pyx_L1_error)

  /* "pyarrow/lib.pyx":48
 * 
 * 
 * MonthDayNano = NewMonthDayNanoTupleType()             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_t_19 = arrow::py::internal::NewMonthDayNanoTupleType(); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 48, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_MonthDayNano, __pyx_t_19) < (0)) __PYX_ERR(0, 48, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;

  /* "pyarrow/lib.pyx":51
 * 
 * 
 * def cpu_count():             # <<<<<<<<<<<<<<
 *     """
 *     Return the number of threads to use in parallel operations.
*/
  __pyx_t_19 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_1cpu_count, 0, __pyx_mstate_global->__pyx_n_u_cpu_count, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[27])); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 51, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_19);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_cpu_count, __pyx_t_19) < (0)) __PYX_ERR(0, 51, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;

  /* "pyarrow/lib.pyx":69
 * 
 * 
 * def set_cpu_count(int count):             # <<<<<<<<<<<<<<
 *     """
 *     Set the number of threads to use in parallel operations.
*/
  __pyx_t_19 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_3set_cpu_count, 0, __pyx_mstate_global->__pyx_n_u_set_cpu_count, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[28])); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 69, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_19);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_set_cpu_count, __pyx_t_19) < (0)) __PYX_ERR(0, 69, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;

  /* "pyarrow/lib.pyx":88
 * 
 * 
 * def is_threading_enabled() -> bool:             # <<<<<<<<<<<<<<
 *     """
 *     Returns True if threading is enabled in libarrow.
*/
  __pyx_t_19 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 88, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  if (PyDict_SetItem(__pyx_t_19, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_bool_2) < (0)) __PYX_ERR(0, 88, __pyx_L1_error)
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_5is_threading_enabled, 0, __pyx_mstate_global->__pyx_n_u_is_threading_enabled, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[29])); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 88, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_8, __pyx_t_19);
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_is_threading_enabled, __pyx_t_8) < (0)) __PYX_ERR(0, 88, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/lib.pyx":99
 * 
 * 
 * Type_NA = _Type_NA             # <<<<<<<<<<<<<<
 * Type_BOOL = _Type_BOOL
 * Type_UINT8 = _Type_UINT8
*/
  __pyx_t_8 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::NA); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 99, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Type_NA, __pyx_t_8) < (0)) __PYX_ERR(0, 99, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/lib.pyx":100
 * 
 * Type_NA = _Type_NA
 * Type_BOOL = _Type_BOOL             # <<<<<<<<<<<<<<
 * Type_UINT8 = _Type_UINT8
 * Type_INT8 = _Type_INT8
*/
  __pyx_t_8 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::BOOL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 100, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Type_BOOL, __pyx_t_8) < (0)) __PYX_ERR(0, 100, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/lib.pyx":101
 * Type_NA = _Type_NA
 * Type_BOOL = _Type_BOOL
 * Type_UINT8 = _Type_UINT8             # <<<<<<<<<<<<<<
 * Type_INT8 = _Type_INT8
 * Type_UINT16 = _Type_UINT16
*/
  __pyx_t_8 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::UINT8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 101, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Type_UINT8, __pyx_t_8) < (0)) __PYX_ERR(0, 101, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/lib.pyx":102
 * Type_BOOL = _Type_BOOL
 * Type_UINT8 = _Type_UINT8
 * Type_INT8 = _Type_INT8             # <<<<<<<<<<<<<<
 * Type_UINT16 = _Type_UINT16
 * Type_INT16 = _Type_INT16
*/
  __pyx_t_8 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::INT8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 102, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Type_INT8, __pyx_t_8) < (0)) __PYX_ERR(0, 102, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/lib.pyx":103
 * Type_UINT8 = _Type_UINT8
 * Type_INT8 = _Type_INT8
 * Type_UINT16 = _Type_UINT16             # <<<<<<<<<<<<<<
 * Type_INT16 = _Type_INT16
 * Type_UINT32 = _Type_UINT32
*/
  __pyx_t_8 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::UINT16); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 103, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Type_UINT16, __pyx_t_8) < (0)) __PYX_ERR(0, 103, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/lib.pyx":104
 * Type_INT8 = _Type_INT8
 * Type_UINT16 = _Type_UINT16
 * Type_INT16 = _Type_INT16             # <<<<<<<<<<<<<<
 * Type_UINT32 = _Type_UINT32
 * Type_INT32 = _Type_INT32
*/
  __pyx_t_8 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::INT16); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 104, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Type_INT16, __pyx_t_8) < (0)) __PYX_ERR(0, 104, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/lib.pyx":105
 * Type_UINT16 = _Type_UINT16
 * Type_INT16 = _Type_INT16
 * Type_UINT32 = _Type_UINT32             # <<<<<<<<<<<<<<
 * Type_INT32 = _Type_INT32
 * Type_UINT64 = _Type_UINT64
*/
  __pyx_t_8 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::UINT32); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 105, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Type_UINT32, __pyx_t_8) < (0)) __PYX_ERR(0, 105, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/lib.pyx":106
 * Type_INT16 = _Type_INT16
 * Type_UINT32 = _Type_UINT32
 * Type_INT32 = _Type_INT32             # <<<<<<<<<<<<<<
 * Type_UINT64 = _Type_UINT64
 * Type_INT64 = _Type_INT64
*/
  __pyx_t_8 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::INT32); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 106, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Type_INT32, __pyx_t_8) < (0)) __PYX_ERR(0, 106, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/lib.pyx":107
 * Type_UINT32 = _Type_UINT32
 * Type_INT32 = _Type_INT32
 * Type_UINT64 = _Type_UINT64             # <<<<<<<<<<<<<<
 * Type_INT64 = _Type_INT64
 * Type_HALF_FLOAT = _Type_HALF_FLOAT
*/
  __pyx_t_8 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::UINT64); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 107, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Type_UINT64, __pyx_t_8) < (0)) __PYX_ERR(0, 107, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/lib.pyx":108
 * Type_INT32 = _Type_INT32
 * Type_UINT64 = _Type_UINT64
 * Type_INT64 = _Type_INT64             # <<<<<<<<<<<<<<
 * Type_HALF_FLOAT = _Type_HALF_FLOAT
 * Type_FLOAT = _Type_FLOAT
*/
  __pyx_t_8 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::INT64); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 108, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Type_INT64, __pyx_t_8) < (0)) __PYX_ERR(0, 108, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/lib.pyx":109
 * Type_UINT64 = _Type_UINT64
 * Type_INT64 = _Type_INT64
 * Type_HALF_FLOAT = _Type_HALF_FLOAT             # <<<<<<<<<<<<<<
 * Type_FLOAT = _Type_FLOAT
 * Type_DOUBLE = _Type_DOUBLE
*/
  __pyx_t_8 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::HALF_FLOAT); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 109, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Type_HALF_FLOAT, __pyx_t_8) < (0)) __PYX_ERR(0, 109, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/lib.pyx":110
 * Type_INT64 = _Type_INT64
 * Type_HALF_FLOAT = _Type_HALF_FLOAT
 * Type_FLOAT = _Type_FLOAT             # <<<<<<<<<<<<<<
 * Type_DOUBLE = _Type_DOUBLE
 * Type_DECIMAL32 = _Type_DECIMAL32
*/
  __pyx_t_8 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::FLOAT); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 110, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Type_FLOAT, __pyx_t_8) < (0)) __PYX_ERR(0, 110, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/lib.pyx":111
 * Type_HALF_FLOAT = _Type_HALF_FLOAT
 * Type_FLOAT = _Type_FLOAT
 * Type_DOUBLE = _Type_DOUBLE             # <<<<<<<<<<<<<<
 * Type_DECIMAL32 = _Type_DECIMAL32
 * Type_DECIMAL64 = _Type_DECIMAL64
*/
  __pyx_t_8 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::DOUBLE); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 111, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Type_DOUBLE, __pyx_t_8) < (0)) __PYX_ERR(0, 111, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/lib.pyx":112
 * Type_FLOAT = _Type_FLOAT
 * Type_DOUBLE = _Type_DOUBLE
 * Type_DECIMAL32 = _Type_DECIMAL32             # <<<<<<<<<<<<<<
 * Type_DECIMAL64 = _Type_DECIMAL64
 * Type_DECIMAL128 = _Type_DECIMAL128
*/
  __pyx_t_8 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::DECIMAL32); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 112, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Type_DECIMAL32, __pyx_t_8) < (0)) __PYX_ERR(0, 112, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/lib.pyx":113
 * Type_DOUBLE = _Type_DOUBLE
 * Type_DECIMAL32 = _Type_DECIMAL32
 * Type_DECIMAL64 = _Type_DECIMAL64             # <<<<<<<<<<<<<<
 * Type_DECIMAL128 = _Type_DECIMAL128
 * Type_DECIMAL256 = _Type_DECIMAL256
*/
  __pyx_t_8 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::DECIMAL64); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 113, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Type_DECIMAL64, __pyx_t_8) < (0)) __PYX_ERR(0, 113, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/lib.pyx":114
 * Type_DECIMAL32 = _Type_DECIMAL32
 * Type_DECIMAL64 = _Type_DECIMAL64
 * Type_DECIMAL128 = _Type_DECIMAL128             # <<<<<<<<<<<<<<
 * Type_DECIMAL256 = _Type_DECIMAL256
 * Type_DATE32 = _Type_DATE32
*/
  __pyx_t_8 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::DECIMAL128); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 114, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Type_DECIMAL128, __pyx_t_8) < (0)) __PYX_ERR(0, 114, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/lib.pyx":115
 * Type_DECIMAL64 = _Type_DECIMAL64
 * Type_DECIMAL128 = _Type_DECIMAL128
 * Type_DECIMAL256 = _Type_DECIMAL256             # <<<<<<<<<<<<<<
 * Type_DATE32 = _Type_DATE32
 * Type_DATE64 = _Type_DATE64
*/
  __pyx_t_8 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::DECIMAL256); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 115, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Type_DECIMAL256, __pyx_t_8) < (0)) __PYX_ERR(0, 115, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/lib.pyx":116
 * Type_DECIMAL128 = _Type_DECIMAL128
 * Type_DECIMAL256 = _Type_DECIMAL256
 * Type_DATE32 = _Type_DATE32             # <<<<<<<<<<<<<<
 * Type_DATE64 = _Type_DATE64
 * Type_TIMESTAMP = _Type_TIMESTAMP
*/
  __pyx_t_8 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::DATE32); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 116, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Type_DATE32, __pyx_t_8) < (0)) __PYX_ERR(0, 116, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/lib.pyx":117
 * Type_DECIMAL256 = _Type_DECIMAL256
 * Type_DATE32 = _Type_DATE32
 * Type_DATE64 = _Type_DATE64             # <<<<<<<<<<<<<<
 * Type_TIMESTAMP = _Type_TIMESTAMP
 * Type_TIME32 = _Type_TIME32
*/
  __pyx_t_8 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::DATE64); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 117, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Type_DATE64, __pyx_t_8) < (0)) __PYX_ERR(0, 117, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/lib.pyx":118
 * Type_DATE32 = _Type_DATE32
 * Type_DATE64 = _Type_DATE64
 * Type_TIMESTAMP = _Type_TIMESTAMP             # <<<<<<<<<<<<<<
 * Type_TIME32 = _Type_TIME32
 * Type_TIME64 = _Type_TIME64
*/
  __pyx_t_8 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::TIMESTAMP); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 118, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Type_TIMESTAMP, __pyx_t_8) < (0)) __PYX_ERR(0, 118, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/lib.pyx":119
 * Type_DATE64 = _Type_DATE64
 * Type_TIMESTAMP = _Type_TIMESTAMP
 * Type_TIME32 = _Type_TIME32             # <<<<<<<<<<<<<<
 * Type_TIME64 = _Type_TIME64
 * Type_DURATION = _Type_DURATION
*/
  __pyx_t_8 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::TIME32); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 119, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Type_TIME32, __pyx_t_8) < (0)) __PYX_ERR(0, 119, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/lib.pyx":120
 * Type_TIMESTAMP = _Type_TIMESTAMP
 * Type_TIME32 = _Type_TIME32
 * Type_TIME64 = _Type_TIME64             # <<<<<<<<<<<<<<
 * Type_DURATION = _Type_DURATION
 * Type_INTERVAL_MONTH_DAY_NANO = _Type_INTERVAL_MONTH_DAY_NANO
*/
  __pyx_t_8 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::TIME64); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 120, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Type_TIME64, __pyx_t_8) < (0)) __PYX_ERR(0, 120, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/lib.pyx":121
 * Type_TIME32 = _Type_TIME32
 * Type_TIME64 = _Type_TIME64
 * Type_DURATION = _Type_DURATION             # <<<<<<<<<<<<<<
 * Type_INTERVAL_MONTH_DAY_NANO = _Type_INTERVAL_MONTH_DAY_NANO
 * Type_BINARY = _Type_BINARY
*/
  __pyx_t_8 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::DURATION); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 121, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Type_DURATION, __pyx_t_8) < (0)) __PYX_ERR(0, 121, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/lib.pyx":122
 * Type_TIME64 = _Type_TIME64
 * Type_DURATION = _Type_DURATION
 * Type_INTERVAL_MONTH_DAY_NANO = _Type_INTERVAL_MONTH_DAY_NANO             # <<<<<<<<<<<<<<
 * Type_BINARY = _Type_BINARY
 * Type_STRING = _Type_STRING
*/
  __pyx_t_8 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::INTERVAL_MONTH_DAY_NANO); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 122, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Type_INTERVAL_MONTH_DAY_NANO, __pyx_t_8) < (0)) __PYX_ERR(0, 122, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/lib.pyx":123
 * Type_DURATION = _Type_DURATION
 * Type_INTERVAL_MONTH_DAY_NANO = _Type_INTERVAL_MONTH_DAY_NANO
 * Type_BINARY = _Type_BINARY             # <<<<<<<<<<<<<<
 * Type_STRING = _Type_STRING
 * Type_LARGE_BINARY = _Type_LARGE_BINARY
*/
  __pyx_t_8 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::BINARY); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 123, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Type_BINARY, __pyx_t_8) < (0)) __PYX_ERR(0, 123, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/lib.pyx":124
 * Type_INTERVAL_MONTH_DAY_NANO = _Type_INTERVAL_MONTH_DAY_NANO
 * Type_BINARY = _Type_BINARY
 * Type_STRING = _Type_STRING             # <<<<<<<<<<<<<<
 * Type_LARGE_BINARY = _Type_LARGE_BINARY
 * Type_LARGE_STRING = _Type_LARGE_STRING
*/
  __pyx_t_8 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::STRING); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 124, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Type_STRING, __pyx_t_8) < (0)) __PYX_ERR(0, 124, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/lib.pyx":125
 * Type_BINARY = _Type_BINARY
 * Type_STRING = _Type_STRING
 * Type_LARGE_BINARY = _Type_LARGE_BINARY             # <<<<<<<<<<<<<<
 * Type_LARGE_STRING = _Type_LARGE_STRING
 * Type_FIXED_SIZE_BINARY = _Type_FIXED_SIZE_BINARY
*/
  __pyx_t_8 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::LARGE_BINARY); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 125, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Type_LARGE_BINARY, __pyx_t_8) < (0)) __PYX_ERR(0, 125, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/lib.pyx":126
 * Type_STRING = _Type_STRING
 * Type_LARGE_BINARY = _Type_LARGE_BINARY
 * Type_LARGE_STRING = _Type_LARGE_STRING             # <<<<<<<<<<<<<<
 * Type_FIXED_SIZE_BINARY = _Type_FIXED_SIZE_BINARY
 * Type_BINARY_VIEW = _Type_BINARY_VIEW
*/
  __pyx_t_8 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::LARGE_STRING); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 126, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Type_LARGE_STRING, __pyx_t_8) < (0)) __PYX_ERR(0, 126, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/lib.pyx":127
 * Type_LARGE_BINARY = _Type_LARGE_BINARY
 * Type_LARGE_STRING = _Type_LARGE_STRING
 * Type_FIXED_SIZE_BINARY = _Type_FIXED_SIZE_BINARY             # <<<<<<<<<<<<<<
 * Type_BINARY_VIEW = _Type_BINARY_VIEW
 * Type_STRING_VIEW = _Type_STRING_VIEW
*/
  __pyx_t_8 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::FIXED_SIZE_BINARY); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 127, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Type_FIXED_SIZE_BINARY, __pyx_t_8) < (0)) __PYX_ERR(0, 127, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/lib.pyx":128
 * Type_LARGE_STRING = _Type_LARGE_STRING
 * Type_FIXED_SIZE_BINARY = _Type_FIXED_SIZE_BINARY
 * Type_BINARY_VIEW = _Type_BINARY_VIEW             # <<<<<<<<<<<<<<
 * Type_STRING_VIEW = _Type_STRING_VIEW
 * Type_LIST = _Type_LIST
*/
  __pyx_t_8 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::BINARY_VIEW); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 128, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Type_BINARY_VIEW, __pyx_t_8) < (0)) __PYX_ERR(0, 128, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/lib.pyx":129
 * Type_FIXED_SIZE_BINARY = _Type_FIXED_SIZE_BINARY
 * Type_BINARY_VIEW = _Type_BINARY_VIEW
 * Type_STRING_VIEW = _Type_STRING_VIEW             # <<<<<<<<<<<<<<
 * Type_LIST = _Type_LIST
 * Type_LARGE_LIST = _Type_LARGE_LIST
*/
  __pyx_t_8 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::STRING_VIEW); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 129, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Type_STRING_VIEW, __pyx_t_8) < (0)) __PYX_ERR(0, 129, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/lib.pyx":130
 * Type_BINARY_VIEW = _Type_BINARY_VIEW
 * Type_STRING_VIEW = _Type_STRING_VIEW
 * Type_LIST = _Type_LIST             # <<<<<<<<<<<<<<
 * Type_LARGE_LIST = _Type_LARGE_LIST
 * Type_LIST_VIEW = _Type_LIST_VIEW
*/
  __pyx_t_8 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::LIST); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 130, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Type_LIST, __pyx_t_8) < (0)) __PYX_ERR(0, 130, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/lib.pyx":131
 * Type_STRING_VIEW = _Type_STRING_VIEW
 * Type_LIST = _Type_LIST
 * Type_LARGE_LIST = _Type_LARGE_LIST             # <<<<<<<<<<<<<<
 * Type_LIST_VIEW = _Type_LIST_VIEW
 * Type_LARGE_LIST_VIEW = _Type_LARGE_LIST_VIEW
*/
  __pyx_t_8 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::LARGE_LIST); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 131, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Type_LARGE_LIST, __pyx_t_8) < (0)) __PYX_ERR(0, 131, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/lib.pyx":132
 * Type_LIST = _Type_LIST
 * Type_LARGE_LIST = _Type_LARGE_LIST
 * Type_LIST_VIEW = _Type_LIST_VIEW             # <<<<<<<<<<<<<<
 * Type_LARGE_LIST_VIEW = _Type_LARGE_LIST_VIEW
 * Type_MAP = _Type_MAP
*/
  __pyx_t_8 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::LIST_VIEW); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 132, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Type_LIST_VIEW, __pyx_t_8) < (0)) __PYX_ERR(0, 132, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/lib.pyx":133
 * Type_LARGE_LIST = _Type_LARGE_LIST
 * Type_LIST_VIEW = _Type_LIST_VIEW
 * Type_LARGE_LIST_VIEW = _Type_LARGE_LIST_VIEW             # <<<<<<<<<<<<<<
 * Type_MAP = _Type_MAP
 * Type_FIXED_SIZE_LIST = _Type_FIXED_SIZE_LIST
*/
  __pyx_t_8 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::LARGE_LIST_VIEW); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 133, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Type_LARGE_LIST_VIEW, __pyx_t_8) < (0)) __PYX_ERR(0, 133, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/lib.pyx":134
 * Type_LIST_VIEW = _Type_LIST_VIEW
 * Type_LARGE_LIST_VIEW = _Type_LARGE_LIST_VIEW
 * Type_MAP = _Type_MAP             # <<<<<<<<<<<<<<
 * Type_FIXED_SIZE_LIST = _Type_FIXED_SIZE_LIST
 * Type_STRUCT = _Type_STRUCT
*/
  __pyx_t_8 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::MAP); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 134, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Type_MAP, __pyx_t_8) < (0)) __PYX_ERR(0, 134, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/lib.pyx":135
 * Type_LARGE_LIST_VIEW = _Type_LARGE_LIST_VIEW
 * Type_MAP = _Type_MAP
 * Type_FIXED_SIZE_LIST = _Type_FIXED_SIZE_LIST             # <<<<<<<<<<<<<<
 * Type_STRUCT = _Type_STRUCT
 * Type_SPARSE_UNION = _Type_SPARSE_UNION
*/
  __pyx_t_8 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::FIXED_SIZE_LIST); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 135, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Type_FIXED_SIZE_LIST, __pyx_t_8) < (0)) __PYX_ERR(0, 135, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/lib.pyx":136
 * Type_MAP = _Type_MAP
 * Type_FIXED_SIZE_LIST = _Type_FIXED_SIZE_LIST
 * Type_STRUCT = _Type_STRUCT             # <<<<<<<<<<<<<<
 * Type_SPARSE_UNION = _Type_SPARSE_UNION
 * Type_DENSE_UNION = _Type_DENSE_UNION
*/
  __pyx_t_8 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::STRUCT); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 136, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Type_STRUCT, __pyx_t_8) < (0)) __PYX_ERR(0, 136, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/lib.pyx":137
 * Type_FIXED_SIZE_LIST = _Type_FIXED_SIZE_LIST
 * Type_STRUCT = _Type_STRUCT
 * Type_SPARSE_UNION = _Type_SPARSE_UNION             # <<<<<<<<<<<<<<
 * Type_DENSE_UNION = _Type_DENSE_UNION
 * Type_DICTIONARY = _Type_DICTIONARY
*/
  __pyx_t_8 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::SPARSE_UNION); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 137, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Type_SPARSE_UNION, __pyx_t_8) < (0)) __PYX_ERR(0, 137, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/lib.pyx":138
 * Type_STRUCT = _Type_STRUCT
 * Type_SPARSE_UNION = _Type_SPARSE_UNION
 * Type_DENSE_UNION = _Type_DENSE_UNION             # <<<<<<<<<<<<<<
 * Type_DICTIONARY = _Type_DICTIONARY
 * Type_RUN_END_ENCODED = _Type_RUN_END_ENCODED
*/
  __pyx_t_8 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::DENSE_UNION); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 138, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Type_DENSE_UNION, __pyx_t_8) < (0)) __PYX_ERR(0, 138, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/lib.pyx":139
 * Type_SPARSE_UNION = _Type_SPARSE_UNION
 * Type_DENSE_UNION = _Type_DENSE_UNION
 * Type_DICTIONARY = _Type_DICTIONARY             # <<<<<<<<<<<<<<
 * Type_RUN_END_ENCODED = _Type_RUN_END_ENCODED
 * Type_INTERVAL_MONTHS = _Type_INTERVAL_MONTHS
*/
  __pyx_t_8 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::DICTIONARY); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 139, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Type_DICTIONARY, __pyx_t_8) < (0)) __PYX_ERR(0, 139, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/lib.pyx":140
 * Type_DENSE_UNION = _Type_DENSE_UNION
 * Type_DICTIONARY = _Type_DICTIONARY
 * Type_RUN_END_ENCODED = _Type_RUN_END_ENCODED             # <<<<<<<<<<<<<<
 * Type_INTERVAL_MONTHS = _Type_INTERVAL_MONTHS
 * Type_INTERVAL_DAY_TIME = _Type_INTERVAL_DAY_TIME
*/
  __pyx_t_8 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::RUN_END_ENCODED); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 140, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Type_RUN_END_ENCODED, __pyx_t_8) < (0)) __PYX_ERR(0, 140, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/lib.pyx":141
 * Type_DICTIONARY = _Type_DICTIONARY
 * Type_RUN_END_ENCODED = _Type_RUN_END_ENCODED
 * Type_INTERVAL_MONTHS = _Type_INTERVAL_MONTHS             # <<<<<<<<<<<<<<
 * Type_INTERVAL_DAY_TIME = _Type_INTERVAL_DAY_TIME
 * 
*/
  __pyx_t_8 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::INTERVAL_MONTHS); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 141, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Type_INTERVAL_MONTHS, __pyx_t_8) < (0)) __PYX_ERR(0, 141, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/lib.pyx":142
 * Type_RUN_END_ENCODED = _Type_RUN_END_ENCODED
 * Type_INTERVAL_MONTHS = _Type_INTERVAL_MONTHS
 * Type_INTERVAL_DAY_TIME = _Type_INTERVAL_DAY_TIME             # <<<<<<<<<<<<<<
 * 
 * UnionMode_SPARSE = _UnionMode_SPARSE
*/
  __pyx_t_8 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::INTERVAL_DAY_TIME); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 142, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Type_INTERVAL_DAY_TIME, __pyx_t_8) < (0)) __PYX_ERR(0, 142, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/lib.pyx":144
 * Type_INTERVAL_DAY_TIME = _Type_INTERVAL_DAY_TIME
 * 
 * UnionMode_SPARSE = _UnionMode_SPARSE             # <<<<<<<<<<<<<<
 * UnionMode_DENSE = _UnionMode_DENSE
 * 
*/
  __pyx_t_8 = __Pyx_PyLong_From_enum____arrow_3a__3a_UnionMode_3a__3a_type( arrow::UnionMode::SPARSE); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 144, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_UnionMode_SPARSE, __pyx_t_8) < (0)) __PYX_ERR(0, 144, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/lib.pyx":145
 * 
 * UnionMode_SPARSE = _UnionMode_SPARSE
 * UnionMode_DENSE = _UnionMode_DENSE             # <<<<<<<<<<<<<<
 * 
 * __pc = None
*/
  __pyx_t_8 = __Pyx_PyLong_From_enum____arrow_3a__3a_UnionMode_3a__3a_type( arrow::UnionMode::DENSE); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 145, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_UnionMode_DENSE, __pyx_t_8) < (0)) __PYX_ERR(0, 145, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/lib.pyx":147
 * UnionMode_DENSE = _UnionMode_DENSE
 * 
 * __pc = None             # <<<<<<<<<<<<<<
 * __pac = None
 * __cuda_loaded = None
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pc, Py_None) < (0)) __PYX_ERR(0, 147, __pyx_L1_error)

  /* "pyarrow/lib.pyx":148
 * 
 * __pc = None
 * __pac = None             # <<<<<<<<<<<<<<
 * __cuda_loaded = None
 * 
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pac, Py_None) < (0)) __PYX_ERR(0, 148, __pyx_L1_error)

  /* "pyarrow/lib.pyx":149
 * __pc = None
 * __pac = None
 * __cuda_loaded = None             # <<<<<<<<<<<<<<
 * 
 * 
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_cuda_loaded, Py_None) < (0)) __PYX_ERR(0, 149, __pyx_L1_error)

  /* "pyarrow/lib.pyx":152
 * 
 * 
 * def _pc():             # <<<<<<<<<<<<<<
 *     global __pc
 *     if __pc is None:
*/
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_7_pc, 0, __pyx_mstate_global->__pyx_n_u_pc_2, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[30])); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 152, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pc_2, __pyx_t_8) < (0)) __PYX_ERR(0, 152, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/lib.pyx":160
 * 
 * 
 * def _pac():             # <<<<<<<<<<<<<<
 *     global __pac
 *     if __pac is None:
*/
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_9_pac, 0, __pyx_mstate_global->__pyx_n_u_pac_2, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[31])); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 160, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pac_2, __pyx_t_8) < (0)) __PYX_ERR(0, 160, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/lib.pyx":168
 * 
 * 
 * def _ensure_cuda_loaded():             # <<<<<<<<<<<<<<
 *     # Try importing the cuda module to ensure libarrow_cuda gets loaded
 *     # to register the CUDA device for the C Data Interface import
*/
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_11_ensure_cuda_loaded, 0, __pyx_mstate_global->__pyx_n_u_ensure_cuda_loaded, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[32])); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 168, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_ensure_cuda_loaded, __pyx_t_8) < (0)) __PYX_ERR(0, 168, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/lib.pyx":186
 * 
 * 
 * def _gdb_test_session():             # <<<<<<<<<<<<<<
 *     GdbTestSession()
 * 
*/
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_13_gdb_test_session, 0, __pyx_mstate_global->__pyx_n_u_gdb_test_session, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[33])); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 186, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_gdb_test_session, __pyx_t_8) < (0)) __PYX_ERR(0, 186, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/compat.pxi":19
 * 
 * 
 * def encode_file_path(path):             # <<<<<<<<<<<<<<
 *     if isinstance(path, str):
 *         # POSIX systems can handle utf-8. UTF8 is converted to utf16-le in
*/
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_15encode_file_path, 0, __pyx_mstate_global->__pyx_n_u_encode_file_path, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[34])); if (unlikely(!__pyx_t_8)) __PYX_ERR(10, 19, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_encode_file_path, __pyx_t_8) < (0)) __PYX_ERR(10, 19, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/compat.pxi":33
 * 
 * # Starting with Python 3.7, dicts are guaranteed to be insertion-ordered.
 * ordered_dict = dict             # <<<<<<<<<<<<<<
 * 
 * 
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_ordered_dict, ((PyObject *)(&PyDict_Type))) < (0)) __PYX_ERR(10, 33, __pyx_L1_error)

  /* "pyarrow/compat.pxi":36
 * 
 * 
 * try:             # <<<<<<<<<<<<<<
 *     import cloudpickle as pickle
 * except ImportError:
*/
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_24, &__pyx_t_23, &__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_24);
    __Pyx_XGOTREF(__pyx_t_23);
    __Pyx_XGOTREF(__pyx_t_1);
    /*try:*/ {

      /* "pyarrow/compat.pxi":37
 * 
 * try:
 *     import cloudpickle as pickle             # <<<<<<<<<<<<<<
 * except ImportError:
 *     import pickle
*/
      __pyx_t_25 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_cloudpickle, 0, 0, NULL, 0); if (unlikely(!__pyx_t_25)) __PYX_ERR(10, 37, __pyx_L14_error)
      __pyx_t_8 = __pyx_t_25;
      __Pyx_GOTREF(__pyx_t_8);
      if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pickle, __pyx_t_8) < (0)) __PYX_ERR(10, 37, __pyx_L14_error)
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

      /* "pyarrow/compat.pxi":36
 * 
 * 
 * try:             # <<<<<<<<<<<<<<
 *     import cloudpickle as pickle
 * except ImportError:
*/
    }
    __Pyx_XDECREF(__pyx_t_24); __pyx_t_24 = 0;
    __Pyx_XDECREF(__pyx_t_23); __pyx_t_23 = 0;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    goto __pyx_L19_try_end;
    __pyx_L14_error:;
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
    __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
    __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
    __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
    __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0;
    __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0;
    __Pyx_XDECREF(__pyx_t_22); __pyx_t_22 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __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;

    /* "pyarrow/compat.pxi":38
 * try:
 *     import cloudpickle as pickle
 * except ImportError:             # <<<<<<<<<<<<<<
 *     import pickle
 * 
*/
    __pyx_t_26 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_ImportError))));
    if (__pyx_t_26) {
      __Pyx_AddTraceback("pyarrow.lib", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_19, &__pyx_t_21) < 0) __PYX_ERR(10, 38, __pyx_L16_except_error)
      __Pyx_XGOTREF(__pyx_t_8);
      __Pyx_XGOTREF(__pyx_t_19);
      __Pyx_XGOTREF(__pyx_t_21);

      /* "pyarrow/compat.pxi":39
 *     import cloudpickle as pickle
 * except ImportError:
 *     import pickle             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __pyx_t_25 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_pickle, 0, 0, NULL, 0); if (unlikely(!__pyx_t_25)) __PYX_ERR(10, 39, __pyx_L16_except_error)
      __pyx_t_18 = __pyx_t_25;
      __Pyx_GOTREF(__pyx_t_18);
      if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pickle, __pyx_t_18) < (0)) __PYX_ERR(10, 39, __pyx_L16_except_error)
      __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
      __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0;
      goto __pyx_L15_exception_handled;
    }
    goto __pyx_L16_except_error;

    /* "pyarrow/compat.pxi":36
 * 
 * 
 * try:             # <<<<<<<<<<<<<<
 *     import cloudpickle as pickle
 * except ImportError:
*/
    __pyx_L16_except_error:;
    __Pyx_XGIVEREF(__pyx_t_24);
    __Pyx_XGIVEREF(__pyx_t_23);
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_ExceptionReset(__pyx_t_24, __pyx_t_23, __pyx_t_1);
    goto __pyx_L1_error;
    __pyx_L15_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_24);
    __Pyx_XGIVEREF(__pyx_t_23);
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_ExceptionReset(__pyx_t_24, __pyx_t_23, __pyx_t_1);
    __pyx_L19_try_end:;
  }

  /* "pyarrow/compat.pxi":42
 * 
 * 
 * def tobytes(o):             # <<<<<<<<<<<<<<
 *     """
 *     Encode a unicode or bytes string to bytes.
*/
  __pyx_t_21 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_17tobytes, 0, __pyx_mstate_global->__pyx_n_u_tobytes, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[35])); if (unlikely(!__pyx_t_21)) __PYX_ERR(10, 42, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_21);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_tobytes, __pyx_t_21) < (0)) __PYX_ERR(10, 42, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "pyarrow/compat.pxi":57
 * 
 * 
 * def frombytes(o, *, safe=False):             # <<<<<<<<<<<<<<
 *     """
 *     Decode the given bytestring to unicode.
*/
  __pyx_t_21 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_21)) __PYX_ERR(10, 57, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  if (PyDict_SetItem(__pyx_t_21, __pyx_mstate_global->__pyx_n_u_safe, ((PyObject*)Py_False)) < (0)) __PYX_ERR(10, 57, __pyx_L1_error)
  __pyx_t_19 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_19frombytes, 0, __pyx_mstate_global->__pyx_n_u_frombytes, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[36])); if (unlikely(!__pyx_t_19)) __PYX_ERR(10, 57, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_19);
  #endif
  __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_19, __pyx_t_21);
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_frombytes, __pyx_t_19) < (0)) __PYX_ERR(10, 57, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;

  /* "pyarrow/error.pxi":24
 * from pyarrow.includes.common cimport c_string
 * 
 * from contextlib import contextmanager             # <<<<<<<<<<<<<<
 * import os
 * import signal
*/
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_contextmanager};
    __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_contextlib, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 24, __pyx_L1_error)
  }
  __pyx_t_19 = __pyx_t_1;
  __Pyx_GOTREF(__pyx_t_19);
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_contextmanager};
    __pyx_t_3 = 0; {
      __pyx_t_21 = __Pyx_ImportFrom(__pyx_t_19, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_21)) __PYX_ERR(2, 24, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_21);
      if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_21) < (0)) __PYX_ERR(2, 24, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;

  /* "pyarrow/error.pxi":25
 * 
 * from contextlib import contextmanager
 * import os             # <<<<<<<<<<<<<<
 * import signal
 * import threading
*/
  __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_os, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 25, __pyx_L1_error)
  __pyx_t_19 = __pyx_t_1;
  __Pyx_GOTREF(__pyx_t_19);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_os, __pyx_t_19) < (0)) __PYX_ERR(2, 25, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;

  /* "pyarrow/error.pxi":26
 * from contextlib import contextmanager
 * import os
 * import signal             # <<<<<<<<<<<<<<
 * import threading
 * 
*/
  __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_signal, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 26, __pyx_L1_error)
  __pyx_t_19 = __pyx_t_1;
  __Pyx_GOTREF(__pyx_t_19);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_signal, __pyx_t_19) < (0)) __PYX_ERR(2, 26, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;

  /* "pyarrow/error.pxi":27
 * import os
 * import signal
 * import threading             # <<<<<<<<<<<<<<
 * 
 * from pyarrow.lib import is_threading_enabled
*/
  __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_threading, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 27, __pyx_L1_error)
  __pyx_t_19 = __pyx_t_1;
  __Pyx_GOTREF(__pyx_t_19);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_threading, __pyx_t_19) < (0)) __PYX_ERR(2, 27, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;

  /* "pyarrow/error.pxi":29
 * import threading
 * 
 * from pyarrow.lib import is_threading_enabled             # <<<<<<<<<<<<<<
 * from pyarrow.util import _break_traceback_cycle_from_frame
 * 
*/
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_is_threading_enabled};
    __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 29, __pyx_L1_error)
  }
  __pyx_t_19 = __pyx_t_1;
  __Pyx_GOTREF(__pyx_t_19);
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_is_threading_enabled};
    __pyx_t_3 = 0; {
      __pyx_t_21 = __Pyx_ImportFrom(__pyx_t_19, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_21)) __PYX_ERR(2, 29, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_21);
      if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_21) < (0)) __PYX_ERR(2, 29, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;

  /* "pyarrow/error.pxi":30
 * 
 * from pyarrow.lib import is_threading_enabled
 * from pyarrow.util import _break_traceback_cycle_from_frame             # <<<<<<<<<<<<<<
 * 
 * 
*/
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_break_traceback_cycle_from_fram};
    __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_pyarrow_util, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 30, __pyx_L1_error)
  }
  __pyx_t_19 = __pyx_t_1;
  __Pyx_GOTREF(__pyx_t_19);
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_break_traceback_cycle_from_fram};
    __pyx_t_3 = 0; {
      __pyx_t_21 = __Pyx_ImportFrom(__pyx_t_19, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_21)) __PYX_ERR(2, 30, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_21);
      if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_21) < (0)) __PYX_ERR(2, 30, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;

  /* "pyarrow/error.pxi":33
 * 
 * 
 * class ArrowException(Exception):             # <<<<<<<<<<<<<<
 *     pass
 * 
*/
  __pyx_t_19 = PyTuple_Pack(1, ((PyObject *)(((PyTypeObject*)PyExc_Exception)))); if (unlikely(!__pyx_t_19)) __PYX_ERR(2, 33, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __pyx_t_21 = __Pyx_PEP560_update_bases(__pyx_t_19); if (unlikely(!__pyx_t_21)) __PYX_ERR(2, 33, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  __pyx_t_8 = __Pyx_CalculateMetaclass(NULL, __pyx_t_21); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 33, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_18 = __Pyx_Py3MetaclassPrepare(__pyx_t_8, __pyx_t_21, __pyx_mstate_global->__pyx_n_u_ArrowException, __pyx_mstate_global->__pyx_n_u_ArrowException, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, (PyObject *) NULL); if (unlikely(!__pyx_t_18)) __PYX_ERR(2, 33, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  if (__pyx_t_21 != __pyx_t_19) {
    if (unlikely((PyDict_SetItemString(__pyx_t_18, "__orig_bases__", __pyx_t_19) < 0))) __PYX_ERR(2, 33, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  __pyx_t_19 = __Pyx_Py3ClassCreate(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_ArrowException, __pyx_t_21, __pyx_t_18, NULL, 0, 0); if (unlikely(!__pyx_t_19)) __PYX_ERR(2, 33, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_19);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_ArrowException, __pyx_t_19) < (0)) __PYX_ERR(2, 33, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "pyarrow/error.pxi":37
 * 
 * 
 * class ArrowInvalid(ValueError, ArrowException):             # <<<<<<<<<<<<<<
 *     pass
 * 
*/
  __Pyx_GetModuleGlobalName(__pyx_t_21, __pyx_mstate_global->__pyx_n_u_ArrowException); if (unlikely(!__pyx_t_21)) __PYX_ERR(2, 37, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  __pyx_t_8 = PyTuple_Pack(2, ((PyObject *)(((PyTypeObject*)PyExc_ValueError))), __pyx_t_21); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 37, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
  __pyx_t_21 = __Pyx_PEP560_update_bases(__pyx_t_8); if (unlikely(!__pyx_t_21)) __PYX_ERR(2, 37, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  __pyx_t_18 = __Pyx_CalculateMetaclass(NULL, __pyx_t_21); if (unlikely(!__pyx_t_18)) __PYX_ERR(2, 37, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  __pyx_t_19 = __Pyx_Py3MetaclassPrepare(__pyx_t_18, __pyx_t_21, __pyx_mstate_global->__pyx_n_u_ArrowInvalid, __pyx_mstate_global->__pyx_n_u_ArrowInvalid, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, (PyObject *) NULL); if (unlikely(!__pyx_t_19)) __PYX_ERR(2, 37, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  if (__pyx_t_21 != __pyx_t_8) {
    if (unlikely((PyDict_SetItemString(__pyx_t_19, "__orig_bases__", __pyx_t_8) < 0))) __PYX_ERR(2, 37, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = __Pyx_Py3ClassCreate(__pyx_t_18, __pyx_mstate_global->__pyx_n_u_ArrowInvalid, __pyx_t_21, __pyx_t_19, NULL, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 37, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_ArrowInvalid, __pyx_t_8) < (0)) __PYX_ERR(2, 37, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "pyarrow/error.pxi":41
 * 
 * 
 * class ArrowMemoryError(MemoryError, ArrowException):             # <<<<<<<<<<<<<<
 *     pass
 * 
*/
  __Pyx_GetModuleGlobalName(__pyx_t_21, __pyx_mstate_global->__pyx_n_u_ArrowException); if (unlikely(!__pyx_t_21)) __PYX_ERR(2, 41, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  __pyx_t_18 = PyTuple_Pack(2, ((PyObject *)(((PyTypeObject*)PyExc_MemoryError))), __pyx_t_21); if (unlikely(!__pyx_t_18)) __PYX_ERR(2, 41, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
  __pyx_t_21 = __Pyx_PEP560_update_bases(__pyx_t_18); if (unlikely(!__pyx_t_21)) __PYX_ERR(2, 41, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  __pyx_t_19 = __Pyx_CalculateMetaclass(NULL, __pyx_t_21); if (unlikely(!__pyx_t_19)) __PYX_ERR(2, 41, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __pyx_t_8 = __Pyx_Py3MetaclassPrepare(__pyx_t_19, __pyx_t_21, __pyx_mstate_global->__pyx_n_u_ArrowMemoryError, __pyx_mstate_global->__pyx_n_u_ArrowMemoryError, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, (PyObject *) NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 41, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (__pyx_t_21 != __pyx_t_18) {
    if (unlikely((PyDict_SetItemString(__pyx_t_8, "__orig_bases__", __pyx_t_18) < 0))) __PYX_ERR(2, 41, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  __pyx_t_18 = __Pyx_Py3ClassCreate(__pyx_t_19, __pyx_mstate_global->__pyx_n_u_ArrowMemoryError, __pyx_t_21, __pyx_t_8, NULL, 0, 0); if (unlikely(!__pyx_t_18)) __PYX_ERR(2, 41, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_18);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_ArrowMemoryError, __pyx_t_18) < (0)) __PYX_ERR(2, 41, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "pyarrow/error.pxi":45
 * 
 * 
 * class ArrowKeyError(KeyError, ArrowException):             # <<<<<<<<<<<<<<
 *     def __str__(self):
 *         # Override KeyError.__str__, as it uses the repr() of the key
*/
  __Pyx_GetModuleGlobalName(__pyx_t_21, __pyx_mstate_global->__pyx_n_u_ArrowException); if (unlikely(!__pyx_t_21)) __PYX_ERR(2, 45, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  __pyx_t_19 = PyTuple_Pack(2, ((PyObject *)(((PyTypeObject*)PyExc_KeyError))), __pyx_t_21); if (unlikely(!__pyx_t_19)) __PYX_ERR(2, 45, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
  __pyx_t_21 = __Pyx_PEP560_update_bases(__pyx_t_19); if (unlikely(!__pyx_t_21)) __PYX_ERR(2, 45, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  __pyx_t_8 = __Pyx_CalculateMetaclass(NULL, __pyx_t_21); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 45, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_18 = __Pyx_Py3MetaclassPrepare(__pyx_t_8, __pyx_t_21, __pyx_mstate_global->__pyx_n_u_ArrowKeyError, __pyx_mstate_global->__pyx_n_u_ArrowKeyError, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, (PyObject *) NULL); if (unlikely(!__pyx_t_18)) __PYX_ERR(2, 45, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  if (__pyx_t_21 != __pyx_t_19) {
    if (unlikely((PyDict_SetItemString(__pyx_t_18, "__orig_bases__", __pyx_t_19) < 0))) __PYX_ERR(2, 45, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;

  /* "pyarrow/error.pxi":46
 * 
 * class ArrowKeyError(KeyError, ArrowException):
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         # Override KeyError.__str__, as it uses the repr() of the key
 *         return ArrowException.__str__(self)
*/
  __pyx_t_19 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_13ArrowKeyError_1__str__, 0, __pyx_mstate_global->__pyx_n_u_ArrowKeyError___str, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[37])); if (unlikely(!__pyx_t_19)) __PYX_ERR(2, 46, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_19);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_18, __pyx_mstate_global->__pyx_n_u_str, __pyx_t_19) < (0)) __PYX_ERR(2, 46, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;

  /* "pyarrow/error.pxi":45
 * 
 * 
 * class ArrowKeyError(KeyError, ArrowException):             # <<<<<<<<<<<<<<
 *     def __str__(self):
 *         # Override KeyError.__str__, as it uses the repr() of the key
*/
  __pyx_t_19 = __Pyx_Py3ClassCreate(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_ArrowKeyError, __pyx_t_21, __pyx_t_18, NULL, 0, 0); if (unlikely(!__pyx_t_19)) __PYX_ERR(2, 45, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_19);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_ArrowKeyError, __pyx_t_19) < (0)) __PYX_ERR(2, 45, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "pyarrow/error.pxi":51
 * 
 * 
 * class ArrowTypeError(TypeError, ArrowException):             # <<<<<<<<<<<<<<
 *     pass
 * 
*/
  __Pyx_GetModuleGlobalName(__pyx_t_21, __pyx_mstate_global->__pyx_n_u_ArrowException); if (unlikely(!__pyx_t_21)) __PYX_ERR(2, 51, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  __pyx_t_8 = PyTuple_Pack(2, ((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_t_21); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 51, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
  __pyx_t_21 = __Pyx_PEP560_update_bases(__pyx_t_8); if (unlikely(!__pyx_t_21)) __PYX_ERR(2, 51, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  __pyx_t_18 = __Pyx_CalculateMetaclass(NULL, __pyx_t_21); if (unlikely(!__pyx_t_18)) __PYX_ERR(2, 51, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  __pyx_t_19 = __Pyx_Py3MetaclassPrepare(__pyx_t_18, __pyx_t_21, __pyx_mstate_global->__pyx_n_u_ArrowTypeError, __pyx_mstate_global->__pyx_n_u_ArrowTypeError, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, (PyObject *) NULL); if (unlikely(!__pyx_t_19)) __PYX_ERR(2, 51, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  if (__pyx_t_21 != __pyx_t_8) {
    if (unlikely((PyDict_SetItemString(__pyx_t_19, "__orig_bases__", __pyx_t_8) < 0))) __PYX_ERR(2, 51, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = __Pyx_Py3ClassCreate(__pyx_t_18, __pyx_mstate_global->__pyx_n_u_ArrowTypeError, __pyx_t_21, __pyx_t_19, NULL, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 51, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_ArrowTypeError, __pyx_t_8) < (0)) __PYX_ERR(2, 51, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "pyarrow/error.pxi":55
 * 
 * 
 * class ArrowNotImplementedError(NotImplementedError, ArrowException):             # <<<<<<<<<<<<<<
 *     pass
 * 
*/
  __Pyx_GetModuleGlobalName(__pyx_t_21, __pyx_mstate_global->__pyx_n_u_ArrowException); if (unlikely(!__pyx_t_21)) __PYX_ERR(2, 55, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  __pyx_t_18 = PyTuple_Pack(2, ((PyObject *)(((PyTypeObject*)PyExc_NotImplementedError))), __pyx_t_21); if (unlikely(!__pyx_t_18)) __PYX_ERR(2, 55, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
  __pyx_t_21 = __Pyx_PEP560_update_bases(__pyx_t_18); if (unlikely(!__pyx_t_21)) __PYX_ERR(2, 55, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  __pyx_t_19 = __Pyx_CalculateMetaclass(NULL, __pyx_t_21); if (unlikely(!__pyx_t_19)) __PYX_ERR(2, 55, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __pyx_t_8 = __Pyx_Py3MetaclassPrepare(__pyx_t_19, __pyx_t_21, __pyx_mstate_global->__pyx_n_u_ArrowNotImplementedError, __pyx_mstate_global->__pyx_n_u_ArrowNotImplementedError, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, (PyObject *) NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 55, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (__pyx_t_21 != __pyx_t_18) {
    if (unlikely((PyDict_SetItemString(__pyx_t_8, "__orig_bases__", __pyx_t_18) < 0))) __PYX_ERR(2, 55, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  __pyx_t_18 = __Pyx_Py3ClassCreate(__pyx_t_19, __pyx_mstate_global->__pyx_n_u_ArrowNotImplementedError, __pyx_t_21, __pyx_t_8, NULL, 0, 0); if (unlikely(!__pyx_t_18)) __PYX_ERR(2, 55, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_18);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_ArrowNotImplementedError, __pyx_t_18) < (0)) __PYX_ERR(2, 55, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "pyarrow/error.pxi":59
 * 
 * 
 * class ArrowCapacityError(ArrowException):             # <<<<<<<<<<<<<<
 *     pass
 * 
*/
  __Pyx_GetModuleGlobalName(__pyx_t_21, __pyx_mstate_global->__pyx_n_u_ArrowException); if (unlikely(!__pyx_t_21)) __PYX_ERR(2, 59, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  __pyx_t_19 = PyTuple_Pack(1, __pyx_t_21); if (unlikely(!__pyx_t_19)) __PYX_ERR(2, 59, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
  __pyx_t_21 = __Pyx_PEP560_update_bases(__pyx_t_19); if (unlikely(!__pyx_t_21)) __PYX_ERR(2, 59, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  __pyx_t_8 = __Pyx_CalculateMetaclass(NULL, __pyx_t_21); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 59, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_18 = __Pyx_Py3MetaclassPrepare(__pyx_t_8, __pyx_t_21, __pyx_mstate_global->__pyx_n_u_ArrowCapacityError, __pyx_mstate_global->__pyx_n_u_ArrowCapacityError, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, (PyObject *) NULL); if (unlikely(!__pyx_t_18)) __PYX_ERR(2, 59, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  if (__pyx_t_21 != __pyx_t_19) {
    if (unlikely((PyDict_SetItemString(__pyx_t_18, "__orig_bases__", __pyx_t_19) < 0))) __PYX_ERR(2, 59, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  __pyx_t_19 = __Pyx_Py3ClassCreate(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_ArrowCapacityError, __pyx_t_21, __pyx_t_18, NULL, 0, 0); if (unlikely(!__pyx_t_19)) __PYX_ERR(2, 59, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_19);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_ArrowCapacityError, __pyx_t_19) < (0)) __PYX_ERR(2, 59, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "pyarrow/error.pxi":63
 * 
 * 
 * class ArrowIndexError(IndexError, ArrowException):             # <<<<<<<<<<<<<<
 *     pass
 * 
*/
  __Pyx_GetModuleGlobalName(__pyx_t_21, __pyx_mstate_global->__pyx_n_u_ArrowException); if (unlikely(!__pyx_t_21)) __PYX_ERR(2, 63, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  __pyx_t_8 = PyTuple_Pack(2, ((PyObject *)(((PyTypeObject*)PyExc_IndexError))), __pyx_t_21); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 63, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
  __pyx_t_21 = __Pyx_PEP560_update_bases(__pyx_t_8); if (unlikely(!__pyx_t_21)) __PYX_ERR(2, 63, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  __pyx_t_18 = __Pyx_CalculateMetaclass(NULL, __pyx_t_21); if (unlikely(!__pyx_t_18)) __PYX_ERR(2, 63, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  __pyx_t_19 = __Pyx_Py3MetaclassPrepare(__pyx_t_18, __pyx_t_21, __pyx_mstate_global->__pyx_n_u_ArrowIndexError, __pyx_mstate_global->__pyx_n_u_ArrowIndexError, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, (PyObject *) NULL); if (unlikely(!__pyx_t_19)) __PYX_ERR(2, 63, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  if (__pyx_t_21 != __pyx_t_8) {
    if (unlikely((PyDict_SetItemString(__pyx_t_19, "__orig_bases__", __pyx_t_8) < 0))) __PYX_ERR(2, 63, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = __Pyx_Py3ClassCreate(__pyx_t_18, __pyx_mstate_global->__pyx_n_u_ArrowIndexError, __pyx_t_21, __pyx_t_19, NULL, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 63, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_ArrowIndexError, __pyx_t_8) < (0)) __PYX_ERR(2, 63, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "pyarrow/error.pxi":67
 * 
 * 
 * class ArrowSerializationError(ArrowException):             # <<<<<<<<<<<<<<
 *     pass
 * 
*/
  __Pyx_GetModuleGlobalName(__pyx_t_21, __pyx_mstate_global->__pyx_n_u_ArrowException); if (unlikely(!__pyx_t_21)) __PYX_ERR(2, 67, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  __pyx_t_18 = PyTuple_Pack(1, __pyx_t_21); if (unlikely(!__pyx_t_18)) __PYX_ERR(2, 67, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
  __pyx_t_21 = __Pyx_PEP560_update_bases(__pyx_t_18); if (unlikely(!__pyx_t_21)) __PYX_ERR(2, 67, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  __pyx_t_19 = __Pyx_CalculateMetaclass(NULL, __pyx_t_21); if (unlikely(!__pyx_t_19)) __PYX_ERR(2, 67, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __pyx_t_8 = __Pyx_Py3MetaclassPrepare(__pyx_t_19, __pyx_t_21, __pyx_mstate_global->__pyx_n_u_ArrowSerializationError, __pyx_mstate_global->__pyx_n_u_ArrowSerializationError, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, (PyObject *) NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 67, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (__pyx_t_21 != __pyx_t_18) {
    if (unlikely((PyDict_SetItemString(__pyx_t_8, "__orig_bases__", __pyx_t_18) < 0))) __PYX_ERR(2, 67, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  __pyx_t_18 = __Pyx_Py3ClassCreate(__pyx_t_19, __pyx_mstate_global->__pyx_n_u_ArrowSerializationError, __pyx_t_21, __pyx_t_8, NULL, 0, 0); if (unlikely(!__pyx_t_18)) __PYX_ERR(2, 67, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_18);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_ArrowSerializationError, __pyx_t_18) < (0)) __PYX_ERR(2, 67, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "pyarrow/error.pxi":71
 * 
 * 
 * class ArrowCancelled(ArrowException):             # <<<<<<<<<<<<<<
 *     def __init__(self, message, signum=None):
 *         super().__init__(message)
*/
  __Pyx_GetModuleGlobalName(__pyx_t_21, __pyx_mstate_global->__pyx_n_u_ArrowException); if (unlikely(!__pyx_t_21)) __PYX_ERR(2, 71, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  __pyx_t_19 = PyTuple_Pack(1, __pyx_t_21); if (unlikely(!__pyx_t_19)) __PYX_ERR(2, 71, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
  __pyx_t_21 = __Pyx_PEP560_update_bases(__pyx_t_19); if (unlikely(!__pyx_t_21)) __PYX_ERR(2, 71, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  __pyx_t_8 = __Pyx_CalculateMetaclass(NULL, __pyx_t_21); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 71, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_18 = __Pyx_Py3MetaclassPrepare(__pyx_t_8, __pyx_t_21, __pyx_mstate_global->__pyx_n_u_ArrowCancelled, __pyx_mstate_global->__pyx_n_u_ArrowCancelled, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, (PyObject *) NULL); if (unlikely(!__pyx_t_18)) __PYX_ERR(2, 71, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  if (__pyx_t_21 != __pyx_t_19) {
    if (unlikely((PyDict_SetItemString(__pyx_t_18, "__orig_bases__", __pyx_t_19) < 0))) __PYX_ERR(2, 71, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  __pyx_t_19 = PyList_New(0); if (unlikely(!__pyx_t_19)) __PYX_ERR(2, 71, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);

  /* "pyarrow/error.pxi":72
 * 
 * class ArrowCancelled(ArrowException):
 *     def __init__(self, message, signum=None):             # <<<<<<<<<<<<<<
 *         super().__init__(message)
 *         self.signum = signum
*/
  __pyx_t_22 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_14ArrowCancelled_1__init__, 0, __pyx_mstate_global->__pyx_n_u_ArrowCancelled___init, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[38])); if (unlikely(!__pyx_t_22)) __PYX_ERR(2, 72, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_22);
  #endif
  PyList_Append(__pyx_t_19, __pyx_t_22);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_22, __pyx_mstate_global->__pyx_tuple[7]);
  if (__Pyx_SetNameInClass(__pyx_t_18, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_22) < (0)) __PYX_ERR(2, 72, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;

  /* "pyarrow/error.pxi":71
 * 
 * 
 * class ArrowCancelled(ArrowException):             # <<<<<<<<<<<<<<
 *     def __init__(self, message, signum=None):
 *         super().__init__(message)
*/
  __pyx_t_22 = __Pyx_Py3ClassCreate(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_ArrowCancelled, __pyx_t_21, __pyx_t_18, NULL, 0, 0); if (unlikely(!__pyx_t_22)) __PYX_ERR(2, 71, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_22);
  #endif
  if (__Pyx_CyFunction_InitClassCell(__pyx_t_19, __pyx_t_22) < (0)) __PYX_ERR(2, 71, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_ArrowCancelled, __pyx_t_22) < (0)) __PYX_ERR(2, 71, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "pyarrow/error.pxi":78
 * 
 * # Compatibility alias
 * ArrowIOError = IOError             # <<<<<<<<<<<<<<
 * 
 * 
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_ArrowIOError, ((PyObject *)(((PyTypeObject*)PyExc_IOError)))) < (0)) __PYX_ERR(2, 78, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.stop_token cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
*/
  __pyx_t_21 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_9StopToken_1__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_StopToken___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[39])); if (unlikely(!__pyx_t_21)) __PYX_ERR(7, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_21);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_21) < (0)) __PYX_ERR(7, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "self.stop_token cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.stop_token cannot be converted to a Python object for pickling"
*/
  __pyx_t_21 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_9StopToken_3__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_StopToken___setstate_cython, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[40])); if (unlikely(!__pyx_t_21)) __PYX_ERR(7, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_21);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_21) < (0)) __PYX_ERR(7, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "pyarrow/error.pxi":166
 * 
 * 
 * cdef c_bool signal_handlers_enabled = True             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_v_7pyarrow_3lib_signal_handlers_enabled = 1;

  /* "pyarrow/error.pxi":169
 * 
 * 
 * def enable_signal_handlers(c_bool enable):             # <<<<<<<<<<<<<<
 *     """
 *     Enable or disable interruption of long-running operations.
*/
  __pyx_t_21 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_21enable_signal_handlers, 0, __pyx_mstate_global->__pyx_n_u_enable_signal_handlers, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[41])); if (unlikely(!__pyx_t_21)) __PYX_ERR(2, 169, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_21);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_enable_signal_handlers, __pyx_t_21) < (0)) __PYX_ERR(2, 169, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "pyarrow/error.pxi":192
 * 
 * # Whether we need a workaround for https://bugs.python.org/issue42248
 * have_signal_refcycle = (sys.version_info < (3, 8, 10) or             # <<<<<<<<<<<<<<
 *                         (3, 9) <= sys.version_info < (3, 9, 5) or
 *                         sys.version_info[:2] == (3, 10))
*/
  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_sys); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 192, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_version_info); if (unlikely(!__pyx_t_18)) __PYX_ERR(2, 192, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = PyObject_RichCompare(__pyx_t_18, __pyx_mstate_global->__pyx_tuple[8], Py_LT); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 192, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(2, 192, __pyx_L1_error)
  if (!__pyx_t_11) {
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  } else {
    __Pyx_INCREF(__pyx_t_8);
    __pyx_t_21 = __pyx_t_8;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    goto __pyx_L22_bool_binop_done;
  }

  /* "pyarrow/error.pxi":193
 * # Whether we need a workaround for https://bugs.python.org/issue42248
 * have_signal_refcycle = (sys.version_info < (3, 8, 10) or
 *                         (3, 9) <= sys.version_info < (3, 9, 5) or             # <<<<<<<<<<<<<<
 *                         sys.version_info[:2] == (3, 10))
 * 
*/
  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_sys); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 193, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_version_info); if (unlikely(!__pyx_t_18)) __PYX_ERR(2, 193, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = PyObject_RichCompare(__pyx_mstate_global->__pyx_tuple[9], __pyx_t_18, Py_LE); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 193, __pyx_L1_error)
  if (__Pyx_PyObject_IsTrue(__pyx_t_8)) {
    __Pyx_DECREF(__pyx_t_8);
    __pyx_t_8 = PyObject_RichCompare(__pyx_t_18, __pyx_mstate_global->__pyx_tuple[10], Py_LT); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 193, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(2, 193, __pyx_L1_error)
  if (!__pyx_t_11) {
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  } else {
    __Pyx_INCREF(__pyx_t_8);
    __pyx_t_21 = __pyx_t_8;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    goto __pyx_L22_bool_binop_done;
  }

  /* "pyarrow/error.pxi":194
 * have_signal_refcycle = (sys.version_info < (3, 8, 10) or
 *                         (3, 9) <= sys.version_info < (3, 9, 5) or
 *                         sys.version_info[:2] == (3, 10))             # <<<<<<<<<<<<<<
 * 
 * cdef class SignalStopHandler:
*/
  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_sys); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 194, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_version_info); if (unlikely(!__pyx_t_18)) __PYX_ERR(2, 194, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = __Pyx_PyObject_GetSlice(__pyx_t_18, 0, 2, NULL, NULL, &__pyx_mstate_global->__pyx_slice[3], 0, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 194, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  __pyx_t_18 = PyObject_RichCompare(__pyx_t_8, __pyx_mstate_global->__pyx_tuple[11], Py_EQ); __Pyx_XGOTREF(__pyx_t_18); if (unlikely(!__pyx_t_18)) __PYX_ERR(2, 194, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_INCREF(__pyx_t_18);
  __pyx_t_21 = __pyx_t_18;
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  __pyx_L22_bool_binop_done:;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_have_signal_refcycle, __pyx_t_21) < (0)) __PYX_ERR(2, 192, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "pyarrow/error.pxi":225
 *                 self._enabled = is_threading_enabled()
 * 
 *     def _init_signals(self):             # <<<<<<<<<<<<<<
 *         if (signal_handlers_enabled and
 *                 threading.current_thread() is threading.main_thread()):
*/
  __pyx_t_21 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_17SignalStopHandler_3_init_signals, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SignalStopHandler__init_signals, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[42])); if (unlikely(!__pyx_t_21)) __PYX_ERR(2, 225, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_21);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_SignalStopHandler, __pyx_mstate_global->__pyx_n_u_init_signals, __pyx_t_21) < (0)) __PYX_ERR(2, 225, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "pyarrow/error.pxi":233
 *                                                  signal.SIG_IGN, None)]
 * 
 *     def __enter__(self):             # <<<<<<<<<<<<<<
 *         if self._enabled:
 *             check_status(RegisterCancellingSignalHandler(self._signals))
*/
  __pyx_t_21 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_17SignalStopHandler_5__enter__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SignalStopHandler___enter, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[43])); if (unlikely(!__pyx_t_21)) __PYX_ERR(2, 233, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_21);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_SignalStopHandler, __pyx_mstate_global->__pyx_n_u_enter, __pyx_t_21) < (0)) __PYX_ERR(2, 233, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "pyarrow/error.pxi":238
 *         return self
 * 
 *     def __exit__(self, exc_type, exc_value, exc_tb):             # <<<<<<<<<<<<<<
 *         if self._enabled:
 *             UnregisterCancellingSignalHandler()
*/
  __pyx_t_21 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_17SignalStopHandler_7__exit__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SignalStopHandler___exit, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[44])); if (unlikely(!__pyx_t_21)) __PYX_ERR(2, 238, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_21);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_SignalStopHandler, __pyx_mstate_global->__pyx_n_u_exit, __pyx_t_21) < (0)) __PYX_ERR(2, 238, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
*/
  __pyx_t_21 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_17SignalStopHandler_11__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SignalStopHandler___reduce_cytho, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[45])); if (unlikely(!__pyx_t_21)) __PYX_ERR(7, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_21);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_21) < (0)) __PYX_ERR(7, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/
  __pyx_t_21 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_17SignalStopHandler_13__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SignalStopHandler___setstate_cyt, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[46])); if (unlikely(!__pyx_t_21)) __PYX_ERR(7, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_21);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_21) < (0)) __PYX_ERR(7, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "pyarrow/config.pxi":21
 * cimport pyarrow.includes.libarrow_python as libarrow_python
 * 
 * from collections import namedtuple             # <<<<<<<<<<<<<<
 * import os
 * 
*/
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_namedtuple};
    __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_collections, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 21, __pyx_L1_error)
  }
  __pyx_t_21 = __pyx_t_1;
  __Pyx_GOTREF(__pyx_t_21);
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_namedtuple};
    __pyx_t_3 = 0; {
      __pyx_t_18 = __Pyx_ImportFrom(__pyx_t_21, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_18)) __PYX_ERR(11, 21, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_18);
      if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_18) < (0)) __PYX_ERR(11, 21, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "pyarrow/config.pxi":22
 * 
 * from collections import namedtuple
 * import os             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_os, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 22, __pyx_L1_error)
  __pyx_t_21 = __pyx_t_1;
  __Pyx_GOTREF(__pyx_t_21);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_os, __pyx_t_21) < (0)) __PYX_ERR(11, 22, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "pyarrow/config.pxi":25
 * 
 * 
 * VersionInfo = namedtuple('VersionInfo', ('major', 'minor', 'patch'))             # <<<<<<<<<<<<<<
 * 
 * RuntimeInfo = namedtuple('RuntimeInfo',
*/
  __Pyx_GetModuleGlobalName(__pyx_t_21, __pyx_mstate_global->__pyx_n_u_namedtuple); if (unlikely(!__pyx_t_21)) __PYX_ERR(11, 25, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  __pyx_t_18 = __Pyx_PyObject_Call(__pyx_t_21, __pyx_mstate_global->__pyx_tuple[13], NULL); if (unlikely(!__pyx_t_18)) __PYX_ERR(11, 25, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_VersionInfo, __pyx_t_18) < (0)) __PYX_ERR(11, 25, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;

  /* "pyarrow/config.pxi":27
 * VersionInfo = namedtuple('VersionInfo', ('major', 'minor', 'patch'))
 * 
 * RuntimeInfo = namedtuple('RuntimeInfo',             # <<<<<<<<<<<<<<
 *                          ('simd_level', 'detected_simd_level'))
 * 
*/
  __Pyx_GetModuleGlobalName(__pyx_t_18, __pyx_mstate_global->__pyx_n_u_namedtuple); if (unlikely(!__pyx_t_18)) __PYX_ERR(11, 27, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);

  /* "pyarrow/config.pxi":28
 * 
 * RuntimeInfo = namedtuple('RuntimeInfo',
 *                          ('simd_level', 'detected_simd_level'))             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_t_21 = __Pyx_PyObject_Call(__pyx_t_18, __pyx_mstate_global->__pyx_tuple[15], NULL); if (unlikely(!__pyx_t_21)) __PYX_ERR(11, 27, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_RuntimeInfo, __pyx_t_21) < (0)) __PYX_ERR(11, 27, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "pyarrow/config.pxi":31
 * 
 * 
 * def runtime_info():             # <<<<<<<<<<<<<<
 *     """
 *     Get runtime information.
*/
  __pyx_t_21 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_23runtime_info, 0, __pyx_mstate_global->__pyx_n_u_runtime_info, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[47])); if (unlikely(!__pyx_t_21)) __PYX_ERR(11, 31, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_21);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_runtime_info, __pyx_t_21) < (0)) __PYX_ERR(11, 31, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "pyarrow/config.pxi":49
 * 
 * 
 * BuildInfo = namedtuple(             # <<<<<<<<<<<<<<
 *     'BuildInfo',
 *     ('build_type', 'cpp_build_info'))
*/
  __Pyx_GetModuleGlobalName(__pyx_t_21, __pyx_mstate_global->__pyx_n_u_namedtuple); if (unlikely(!__pyx_t_21)) __PYX_ERR(11, 49, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);

  /* "pyarrow/config.pxi":51
 * BuildInfo = namedtuple(
 *     'BuildInfo',
 *     ('build_type', 'cpp_build_info'))             # <<<<<<<<<<<<<<
 * 
 * CppBuildInfo = namedtuple(
*/
  __pyx_t_18 = __Pyx_PyObject_Call(__pyx_t_21, __pyx_mstate_global->__pyx_tuple[17], NULL); if (unlikely(!__pyx_t_18)) __PYX_ERR(11, 49, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_BuildInfo, __pyx_t_18) < (0)) __PYX_ERR(11, 49, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;

  /* "pyarrow/config.pxi":53
 *     ('build_type', 'cpp_build_info'))
 * 
 * CppBuildInfo = namedtuple(             # <<<<<<<<<<<<<<
 *     'CppBuildInfo',
 *     ('version', 'version_info', 'so_version', 'full_so_version',
*/
  __Pyx_GetModuleGlobalName(__pyx_t_18, __pyx_mstate_global->__pyx_n_u_namedtuple); if (unlikely(!__pyx_t_18)) __PYX_ERR(11, 53, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);

  /* "pyarrow/config.pxi":55
 * CppBuildInfo = namedtuple(
 *     'CppBuildInfo',
 *     ('version', 'version_info', 'so_version', 'full_so_version',             # <<<<<<<<<<<<<<
 *      'compiler_id', 'compiler_version', 'compiler_flags',
 *      'git_id', 'git_description', 'package_kind', 'build_type'))
*/
  __pyx_t_21 = __Pyx_PyObject_Call(__pyx_t_18, __pyx_mstate_global->__pyx_tuple[19], NULL); if (unlikely(!__pyx_t_21)) __PYX_ERR(11, 53, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_CppBuildInfo, __pyx_t_21) < (0)) __PYX_ERR(11, 53, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "pyarrow/config.pxi":60
 * 
 * 
 * def _build_info():             # <<<<<<<<<<<<<<
 *     """
 *     Get PyArrow build information.
*/
  __pyx_t_21 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_25_build_info, 0, __pyx_mstate_global->__pyx_n_u_build_info, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[48])); if (unlikely(!__pyx_t_21)) __PYX_ERR(11, 60, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_21);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_build_info, __pyx_t_21) < (0)) __PYX_ERR(11, 60, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "pyarrow/config.pxi":95
 * 
 * 
 * build_info = _build_info()             # <<<<<<<<<<<<<<
 * cpp_build_info = build_info.cpp_build_info
 * cpp_version = build_info.cpp_build_info.version
*/
  __pyx_t_18 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_build_info); if (unlikely(!__pyx_t_8)) __PYX_ERR(11, 95, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_10 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_18, NULL};
    __pyx_t_21 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_10, (1-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_21)) __PYX_ERR(11, 95, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_21);
  }
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_build_info_2, __pyx_t_21) < (0)) __PYX_ERR(11, 95, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "pyarrow/config.pxi":96
 * 
 * build_info = _build_info()
 * cpp_build_info = build_info.cpp_build_info             # <<<<<<<<<<<<<<
 * cpp_version = build_info.cpp_build_info.version
 * cpp_version_info = build_info.cpp_build_info.version_info
*/
  __Pyx_GetModuleGlobalName(__pyx_t_21, __pyx_mstate_global->__pyx_n_u_build_info_2); if (unlikely(!__pyx_t_21)) __PYX_ERR(11, 96, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_21, __pyx_mstate_global->__pyx_n_u_cpp_build_info); if (unlikely(!__pyx_t_8)) __PYX_ERR(11, 96, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_cpp_build_info, __pyx_t_8) < (0)) __PYX_ERR(11, 96, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/config.pxi":97
 * build_info = _build_info()
 * cpp_build_info = build_info.cpp_build_info
 * cpp_version = build_info.cpp_build_info.version             # <<<<<<<<<<<<<<
 * cpp_version_info = build_info.cpp_build_info.version_info
 * 
*/
  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_build_info_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(11, 97, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_cpp_build_info); if (unlikely(!__pyx_t_21)) __PYX_ERR(11, 97, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_21, __pyx_mstate_global->__pyx_n_u_version); if (unlikely(!__pyx_t_8)) __PYX_ERR(11, 97, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_cpp_version, __pyx_t_8) < (0)) __PYX_ERR(11, 97, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/config.pxi":98
 * cpp_build_info = build_info.cpp_build_info
 * cpp_version = build_info.cpp_build_info.version
 * cpp_version_info = build_info.cpp_build_info.version_info             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_build_info_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(11, 98, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_cpp_build_info); if (unlikely(!__pyx_t_21)) __PYX_ERR(11, 98, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_21, __pyx_mstate_global->__pyx_n_u_version_info); if (unlikely(!__pyx_t_8)) __PYX_ERR(11, 98, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_cpp_version_info, __pyx_t_8) < (0)) __PYX_ERR(11, 98, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/config.pxi":101
 * 
 * 
 * def set_timezone_db_path(path):             # <<<<<<<<<<<<<<
 *     """
 *     Configure the path to text timezone database on Windows.
*/
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_27set_timezone_db_path, 0, __pyx_mstate_global->__pyx_n_u_set_timezone_db_path, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[49])); if (unlikely(!__pyx_t_8)) __PYX_ERR(11, 101, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_set_timezone_db_path, __pyx_t_8) < (0)) __PYX_ERR(11, 101, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/pandas-shim.pxi":20
 * # pandas lazy-loading API shim that reduces API call and import overhead
 * 
 * import warnings             # <<<<<<<<<<<<<<
 * from threading import Lock
 * 
*/
  __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_warnings, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 20, __pyx_L1_error)
  __pyx_t_8 = __pyx_t_1;
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_warnings, __pyx_t_8) < (0)) __PYX_ERR(12, 20, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/pandas-shim.pxi":21
 * 
 * import warnings
 * from threading import Lock             # <<<<<<<<<<<<<<
 * 
 * 
*/
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Lock};
    __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_threading, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 21, __pyx_L1_error)
  }
  __pyx_t_8 = __pyx_t_1;
  __Pyx_GOTREF(__pyx_t_8);
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Lock};
    __pyx_t_3 = 0; {
      __pyx_t_21 = __Pyx_ImportFrom(__pyx_t_8, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_21)) __PYX_ERR(12, 21, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_21);
      if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_21) < (0)) __PYX_ERR(12, 21, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/pandas-shim.pxi":118
 *             self._import_pandas(raise_)
 * 
 *     def series(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         self._check_import()
 *         return self._series(*args, **kwargs)
*/
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_14_PandasAPIShim_3series, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PandasAPIShim_series, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[50])); if (unlikely(!__pyx_t_8)) __PYX_ERR(12, 118, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__PandasAPIShim, __pyx_mstate_global->__pyx_n_u_series, __pyx_t_8) < (0)) __PYX_ERR(12, 118, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/pandas-shim.pxi":122
 *         return self._series(*args, **kwargs)
 * 
 *     def data_frame(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         self._check_import()
 *         return self._data_frame(*args, **kwargs)
*/
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_14_PandasAPIShim_5data_frame, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PandasAPIShim_data_frame, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[51])); if (unlikely(!__pyx_t_8)) __PYX_ERR(12, 122, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__PandasAPIShim, __pyx_mstate_global->__pyx_n_u_data_frame, __pyx_t_8) < (0)) __PYX_ERR(12, 122, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/pandas-shim.pxi":145
 *         return self._pd
 * 
 *     cpdef infer_dtype(self, obj):             # <<<<<<<<<<<<<<
 *         self._check_import()
 *         try:
*/
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_14_PandasAPIShim_7infer_dtype, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PandasAPIShim_infer_dtype, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[52])); if (unlikely(!__pyx_t_8)) __PYX_ERR(12, 145, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__PandasAPIShim, __pyx_mstate_global->__pyx_n_u_infer_dtype, __pyx_t_8) < (0)) __PYX_ERR(12, 145, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/pandas-shim.pxi":152
 *             return self._pd.lib.infer_dtype(obj)
 * 
 *     cpdef pandas_dtype(self, dtype):             # <<<<<<<<<<<<<<
 *         self._check_import()
 *         try:
*/
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_14_PandasAPIShim_9pandas_dtype, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PandasAPIShim_pandas_dtype, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[53])); if (unlikely(!__pyx_t_8)) __PYX_ERR(12, 152, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__PandasAPIShim, __pyx_mstate_global->__pyx_n_u_pandas_dtype, __pyx_t_8) < (0)) __PYX_ERR(12, 152, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/pandas-shim.pxi":169
 *         return self._version
 * 
 *     def is_v1(self):             # <<<<<<<<<<<<<<
 *         self._check_import()
 *         return self._is_v1
*/
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_14_PandasAPIShim_11is_v1, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PandasAPIShim_is_v1, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[54])); if (unlikely(!__pyx_t_8)) __PYX_ERR(12, 169, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__PandasAPIShim, __pyx_mstate_global->__pyx_n_u_is_v1, __pyx_t_8) < (0)) __PYX_ERR(12, 169, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/pandas-shim.pxi":173
 *         return self._is_v1
 * 
 *     def is_ge_v21(self):             # <<<<<<<<<<<<<<
 *         self._check_import()
 *         return self._is_ge_v21
*/
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_14_PandasAPIShim_13is_ge_v21, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PandasAPIShim_is_ge_v21, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[55])); if (unlikely(!__pyx_t_8)) __PYX_ERR(12, 173, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__PandasAPIShim, __pyx_mstate_global->__pyx_n_u_is_ge_v21, __pyx_t_8) < (0)) __PYX_ERR(12, 173, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/pandas-shim.pxi":177
 *         return self._is_ge_v21
 * 
 *     def is_ge_v23(self):             # <<<<<<<<<<<<<<
 *         self._check_import()
 *         return self._is_ge_v23
*/
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_14_PandasAPIShim_15is_ge_v23, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PandasAPIShim_is_ge_v23, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[56])); if (unlikely(!__pyx_t_8)) __PYX_ERR(12, 177, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__PandasAPIShim, __pyx_mstate_global->__pyx_n_u_is_ge_v23, __pyx_t_8) < (0)) __PYX_ERR(12, 177, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/pandas-shim.pxi":181
 *         return self._is_ge_v23
 * 
 *     def is_ge_v3(self):             # <<<<<<<<<<<<<<
 *         self._check_import()
 *         return self._is_ge_v3
*/
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_14_PandasAPIShim_17is_ge_v3, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PandasAPIShim_is_ge_v3, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[57])); if (unlikely(!__pyx_t_8)) __PYX_ERR(12, 181, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__PandasAPIShim, __pyx_mstate_global->__pyx_n_u_is_ge_v3, __pyx_t_8) < (0)) __PYX_ERR(12, 181, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/pandas-shim.pxi":185
 *         return self._is_ge_v3
 * 
 *     def is_ge_v3_strict(self):             # <<<<<<<<<<<<<<
 *         self._check_import()
 *         return self._is_ge_v3_strict
*/
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_14_PandasAPIShim_19is_ge_v3_strict, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PandasAPIShim_is_ge_v3_strict, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[58])); if (unlikely(!__pyx_t_8)) __PYX_ERR(12, 185, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__PandasAPIShim, __pyx_mstate_global->__pyx_n_u_is_ge_v3_strict, __pyx_t_8) < (0)) __PYX_ERR(12, 185, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/pandas-shim.pxi":189
 *         return self._is_ge_v3_strict
 * 
 *     def uses_string_dtype(self):             # <<<<<<<<<<<<<<
 *         if self.is_ge_v3_strict():
 *             return True
*/
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_14_PandasAPIShim_21uses_string_dtype, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PandasAPIShim_uses_string_dtype, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[59])); if (unlikely(!__pyx_t_8)) __PYX_ERR(12, 189, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__PandasAPIShim, __pyx_mstate_global->__pyx_n_u_uses_string_dtype, __pyx_t_8) < (0)) __PYX_ERR(12, 189, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/pandas-shim.pxi":214
 *         return self._extension_dtype
 * 
 *     cpdef is_array_like(self, obj):             # <<<<<<<<<<<<<<
 *         self._check_import()
 *         return isinstance(obj, self._array_like_types)
*/
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_14_PandasAPIShim_23is_array_like, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PandasAPIShim_is_array_like, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[60])); if (unlikely(!__pyx_t_8)) __PYX_ERR(12, 214, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__PandasAPIShim, __pyx_mstate_global->__pyx_n_u_is_array_like, __pyx_t_8) < (0)) __PYX_ERR(12, 214, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/pandas-shim.pxi":218
 *         return isinstance(obj, self._array_like_types)
 * 
 *     cpdef is_categorical(self, obj):             # <<<<<<<<<<<<<<
 *         if self._have_pandas_internal():
 *             return isinstance(obj, self._categorical_type)
*/
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_14_PandasAPIShim_25is_categorical, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PandasAPIShim_is_categorical, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[61])); if (unlikely(!__pyx_t_8)) __PYX_ERR(12, 218, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__PandasAPIShim, __pyx_mstate_global->__pyx_n_u_is_categorical, __pyx_t_8) < (0)) __PYX_ERR(12, 218, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/pandas-shim.pxi":224
 *             return False
 * 
 *     cpdef is_datetimetz(self, obj):             # <<<<<<<<<<<<<<
 *         if self._have_pandas_internal():
 *             return isinstance(obj, self._datetimetz_type)
*/
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_14_PandasAPIShim_27is_datetimetz, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PandasAPIShim_is_datetimetz, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[62])); if (unlikely(!__pyx_t_8)) __PYX_ERR(12, 224, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__PandasAPIShim, __pyx_mstate_global->__pyx_n_u_is_datetimetz, __pyx_t_8) < (0)) __PYX_ERR(12, 224, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/pandas-shim.pxi":230
 *             return False
 * 
 *     cpdef is_extension_array_dtype(self, obj):             # <<<<<<<<<<<<<<
 *         self._check_import()
 *         if self._is_extension_array_dtype:
*/
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_14_PandasAPIShim_29is_extension_array_dtype, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PandasAPIShim_is_extension_arra, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[63])); if (unlikely(!__pyx_t_8)) __PYX_ERR(12, 230, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__PandasAPIShim, __pyx_mstate_global->__pyx_n_u_is_extension_array_dtype, __pyx_t_8) < (0)) __PYX_ERR(12, 230, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/pandas-shim.pxi":237
 *             return False
 * 
 *     cpdef is_sparse(self, obj):             # <<<<<<<<<<<<<<
 *         if self._have_pandas_internal():
 *             return isinstance(obj.dtype, self.pd.SparseDtype)
*/
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_14_PandasAPIShim_31is_sparse, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PandasAPIShim_is_sparse, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[64])); if (unlikely(!__pyx_t_8)) __PYX_ERR(12, 237, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__PandasAPIShim, __pyx_mstate_global->__pyx_n_u_is_sparse, __pyx_t_8) < (0)) __PYX_ERR(12, 237, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/pandas-shim.pxi":243
 *             return False
 * 
 *     cpdef is_data_frame(self, obj):             # <<<<<<<<<<<<<<
 *         if self._have_pandas_internal():
 *             return isinstance(obj, self._data_frame)
*/
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_14_PandasAPIShim_33is_data_frame, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PandasAPIShim_is_data_frame, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[65])); if (unlikely(!__pyx_t_8)) __PYX_ERR(12, 243, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__PandasAPIShim, __pyx_mstate_global->__pyx_n_u_is_data_frame, __pyx_t_8) < (0)) __PYX_ERR(12, 243, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/pandas-shim.pxi":249
 *             return False
 * 
 *     cpdef is_series(self, obj):             # <<<<<<<<<<<<<<
 *         if self._have_pandas_internal():
 *             return isinstance(obj, self._series)
*/
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_14_PandasAPIShim_35is_series, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PandasAPIShim_is_series, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[66])); if (unlikely(!__pyx_t_8)) __PYX_ERR(12, 249, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__PandasAPIShim, __pyx_mstate_global->__pyx_n_u_is_series, __pyx_t_8) < (0)) __PYX_ERR(12, 249, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/pandas-shim.pxi":255
 *             return False
 * 
 *     cpdef is_index(self, obj):             # <<<<<<<<<<<<<<
 *         if self._have_pandas_internal():
 *             return isinstance(obj, self._index)
*/
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_14_PandasAPIShim_37is_index, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PandasAPIShim_is_index, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[67])); if (unlikely(!__pyx_t_8)) __PYX_ERR(12, 255, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__PandasAPIShim, __pyx_mstate_global->__pyx_n_u_is_index, __pyx_t_8) < (0)) __PYX_ERR(12, 255, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/pandas-shim.pxi":261
 *             return False
 * 
 *     cpdef get_values(self, obj):             # <<<<<<<<<<<<<<
 *         """
 *         Get the underlying array values of a pandas Series or Index in the
*/
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_14_PandasAPIShim_39get_values, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PandasAPIShim_get_values, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[68])); if (unlikely(!__pyx_t_8)) __PYX_ERR(12, 261, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__PandasAPIShim, __pyx_mstate_global->__pyx_n_u_get_values, __pyx_t_8) < (0)) __PYX_ERR(12, 261, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/pandas-shim.pxi":274
 *         return obj.values
 * 
 *     def get_rangeindex_attribute(self, level, name):             # <<<<<<<<<<<<<<
 *         # public start/stop/step attributes added in pandas 0.25.0
 *         self._check_import()
*/
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_14_PandasAPIShim_41get_rangeindex_attribute, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PandasAPIShim_get_rangeindex_at, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[69])); if (unlikely(!__pyx_t_8)) __PYX_ERR(12, 274, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__PandasAPIShim, __pyx_mstate_global->__pyx_n_u_get_rangeindex_attribute, __pyx_t_8) < (0)) __PYX_ERR(12, 274, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
*/
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_14_PandasAPIShim_43__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PandasAPIShim___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[70])); if (unlikely(!__pyx_t_8)) __PYX_ERR(7, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__PandasAPIShim, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_8) < (0)) __PYX_ERR(7, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle__PandasAPIShim, (type(self), 0x3ec5c35, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle__PandasAPIShim__set_state(self, __pyx_state)
*/
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_14_PandasAPIShim_45__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PandasAPIShim___setstate_cython, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[71])); if (unlikely(!__pyx_t_8)) __PYX_ERR(7, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__PandasAPIShim, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_8) < (0)) __PYX_ERR(7, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/pandas-shim.pxi":282
 * 
 * 
 * cdef _PandasAPIShim pandas_api = _PandasAPIShim()             # <<<<<<<<<<<<<<
 * _pandas_api = pandas_api
*/
  __pyx_t_21 = NULL;
  __pyx_t_10 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_21, NULL};
    __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__PandasAPIShim, __pyx_callargs+__pyx_t_10, (1-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0;
    if (unlikely(!__pyx_t_8)) __PYX_ERR(12, 282, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_8);
  }
  __Pyx_XGOTREF((PyObject *)__pyx_v_7pyarrow_3lib_pandas_api);
  __Pyx_DECREF_SET(__pyx_v_7pyarrow_3lib_pandas_api, ((struct __pyx_obj_7pyarrow_3lib__PandasAPIShim *)__pyx_t_8));
  __Pyx_GIVEREF((PyObject *)__pyx_t_8);
  __pyx_t_8 = 0;

  /* "pyarrow/pandas-shim.pxi":283
 * 
 * cdef _PandasAPIShim pandas_api = _PandasAPIShim()
 * _pandas_api = pandas_api             # <<<<<<<<<<<<<<
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pandas_api, ((PyObject *)__pyx_v_7pyarrow_3lib_pandas_api)) < (0)) __PYX_ERR(12, 283, __pyx_L1_error)

  /* "pyarrow/memory.pxi":38
 *         self.pool = pool
 * 
 *     def release_unused(self):             # <<<<<<<<<<<<<<
 *         """
 *         Attempt to return to the OS any memory being held onto by the pool.
*/
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_10MemoryPool_3release_unused, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_MemoryPool_release_unused, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[72])); if (unlikely(!__pyx_t_8)) __PYX_ERR(13, 38, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_MemoryPool, __pyx_mstate_global->__pyx_n_u_release_unused, __pyx_t_8) < (0)) __PYX_ERR(13, 38, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/memory.pxi":53
 *             pool.ReleaseUnused()
 * 
 *     def bytes_allocated(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the number of bytes that are currently allocated from this
*/
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_10MemoryPool_5bytes_allocated, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_MemoryPool_bytes_allocated, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[73])); if (unlikely(!__pyx_t_8)) __PYX_ERR(13, 53, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_MemoryPool, __pyx_mstate_global->__pyx_n_u_bytes_allocated_2, __pyx_t_8) < (0)) __PYX_ERR(13, 53, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/memory.pxi":60
 *         return self.pool.bytes_allocated()
 * 
 *     def total_bytes_allocated(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the total number of bytes that have been allocated from this
*/
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_10MemoryPool_7total_bytes_allocated, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_MemoryPool_total_bytes_allocated, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[74])); if (unlikely(!__pyx_t_8)) __PYX_ERR(13, 60, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_MemoryPool, __pyx_mstate_global->__pyx_n_u_total_bytes_allocated, __pyx_t_8) < (0)) __PYX_ERR(13, 60, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/memory.pxi":67
 *         return self.pool.total_bytes_allocated()
 * 
 *     def max_memory(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the peak memory allocation in this memory pool.
*/
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_10MemoryPool_9max_memory, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_MemoryPool_max_memory, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[75])); if (unlikely(!__pyx_t_8)) __PYX_ERR(13, 67, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_MemoryPool, __pyx_mstate_global->__pyx_n_u_max_memory_2, __pyx_t_8) < (0)) __PYX_ERR(13, 67, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/memory.pxi":78
 *         return ret if ret >= 0 else None
 * 
 *     def num_allocations(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the number of allocations or reallocations that were made
*/
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_10MemoryPool_11num_allocations, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_MemoryPool_num_allocations, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[76])); if (unlikely(!__pyx_t_8)) __PYX_ERR(13, 78, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_MemoryPool, __pyx_mstate_global->__pyx_n_u_num_allocations, __pyx_t_8) < (0)) __PYX_ERR(13, 78, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/memory.pxi":85
 *         return self.pool.num_allocations()
 * 
 *     def print_stats(self):             # <<<<<<<<<<<<<<
 *         """
 *         Print statistics about this memory pool.
*/
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_10MemoryPool_13print_stats, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_MemoryPool_print_stats, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[77])); if (unlikely(!__pyx_t_8)) __PYX_ERR(13, 85, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_MemoryPool, __pyx_mstate_global->__pyx_n_u_print_stats, __pyx_t_8) < (0)) __PYX_ERR(13, 85, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.pool cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
*/
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_10MemoryPool_17__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_MemoryPool___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[78])); if (unlikely(!__pyx_t_8)) __PYX_ERR(7, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_8) < (0)) __PYX_ERR(7, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "self.pool cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.pool cannot be converted to a Python object for pickling"
*/
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_10MemoryPool_19__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_MemoryPool___setstate_cython, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[79])); if (unlikely(!__pyx_t_8)) __PYX_ERR(7, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_8) < (0)) __PYX_ERR(7, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.logging_pool,self.pool cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
*/
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_17LoggingMemoryPool_3__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_LoggingMemoryPool___reduce_cytho, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[80])); if (unlikely(!__pyx_t_8)) __PYX_ERR(7, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_8) < (0)) __PYX_ERR(7, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "self.logging_pool,self.pool cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.logging_pool,self.pool cannot be converted to a Python object for pickling"
*/
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_17LoggingMemoryPool_5__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_LoggingMemoryPool___setstate_cyt, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[81])); if (unlikely(!__pyx_t_8)) __PYX_ERR(7, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_8) < (0)) __PYX_ERR(7, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.pool,self.proxy_pool cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
*/
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_15ProxyMemoryPool_3__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ProxyMemoryPool___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[82])); if (unlikely(!__pyx_t_8)) __PYX_ERR(7, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_8) < (0)) __PYX_ERR(7, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "self.pool,self.proxy_pool cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.pool,self.proxy_pool cannot be converted to a Python object for pickling"
*/
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_15ProxyMemoryPool_5__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ProxyMemoryPool___setstate_cytho, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[83])); if (unlikely(!__pyx_t_8)) __PYX_ERR(7, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_8) < (0)) __PYX_ERR(7, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/memory.pxi":146
 * 
 * 
 * def default_memory_pool():             # <<<<<<<<<<<<<<
 *     """
 *     Return the process-global memory pool.
*/
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_29default_memory_pool, 0, __pyx_mstate_global->__pyx_n_u_default_memory_pool, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[84])); if (unlikely(!__pyx_t_8)) __PYX_ERR(13, 146, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_default_memory_pool, __pyx_t_8) < (0)) __PYX_ERR(13, 146, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/memory.pxi":161
 * 
 * 
 * def proxy_memory_pool(MemoryPool parent):             # <<<<<<<<<<<<<<
 *     """
 *     Create and return a MemoryPool instance that redirects to the
*/
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_31proxy_memory_pool, 0, __pyx_mstate_global->__pyx_n_u_proxy_memory_pool, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[85])); if (unlikely(!__pyx_t_8)) __PYX_ERR(13, 161, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_proxy_memory_pool, __pyx_t_8) < (0)) __PYX_ERR(13, 161, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/memory.pxi":177
 * 
 * 
 * def logging_memory_pool(MemoryPool parent):             # <<<<<<<<<<<<<<
 *     """
 *     Create and return a MemoryPool instance that redirects to the
*/
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_33logging_memory_pool, 0, __pyx_mstate_global->__pyx_n_u_logging_memory_pool, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[86])); if (unlikely(!__pyx_t_8)) __PYX_ERR(13, 177, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_logging_memory_pool, __pyx_t_8) < (0)) __PYX_ERR(13, 177, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/memory.pxi":194
 * 
 * 
 * def system_memory_pool():             # <<<<<<<<<<<<<<
 *     """
 *     Return a memory pool based on the C malloc heap.
*/
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_35system_memory_pool, 0, __pyx_mstate_global->__pyx_n_u_system_memory_pool, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[87])); if (unlikely(!__pyx_t_8)) __PYX_ERR(13, 194, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_system_memory_pool, __pyx_t_8) < (0)) __PYX_ERR(13, 194, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/memory.pxi":204
 * 
 * 
 * def jemalloc_memory_pool():             # <<<<<<<<<<<<<<
 *     """
 *     Return a memory pool based on the jemalloc heap.
*/
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_37jemalloc_memory_pool, 0, __pyx_mstate_global->__pyx_n_u_jemalloc_memory_pool, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[88])); if (unlikely(!__pyx_t_8)) __PYX_ERR(13, 204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_jemalloc_memory_pool, __pyx_t_8) < (0)) __PYX_ERR(13, 204, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/memory.pxi":218
 * 
 * 
 * def mimalloc_memory_pool():             # <<<<<<<<<<<<<<
 *     """
 *     Return a memory pool based on the mimalloc heap.
*/
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_39mimalloc_memory_pool, 0, __pyx_mstate_global->__pyx_n_u_mimalloc_memory_pool, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[89])); if (unlikely(!__pyx_t_8)) __PYX_ERR(13, 218, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_mimalloc_memory_pool, __pyx_t_8) < (0)) __PYX_ERR(13, 218, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/memory.pxi":232
 * 
 * 
 * def set_memory_pool(MemoryPool pool):             # <<<<<<<<<<<<<<
 *     """
 *     Set the default memory pool.
*/
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_41set_memory_pool, 0, __pyx_mstate_global->__pyx_n_u_set_memory_pool, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[90])); if (unlikely(!__pyx_t_8)) __PYX_ERR(13, 232, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_set_memory_pool, __pyx_t_8) < (0)) __PYX_ERR(13, 232, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/memory.pxi":244
 * 
 * 
 * cdef MemoryPool _default_memory_pool = default_memory_pool()             # <<<<<<<<<<<<<<
 * cdef LoggingMemoryPool _logging_memory_pool = logging_memory_pool(
 *     _default_memory_pool)
*/
  __pyx_t_21 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_18, __pyx_mstate_global->__pyx_n_u_default_memory_pool); if (unlikely(!__pyx_t_18)) __PYX_ERR(13, 244, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  __pyx_t_10 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_21, NULL};
    __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_18, __pyx_callargs+__pyx_t_10, (1-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0;
    __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
    if (unlikely(!__pyx_t_8)) __PYX_ERR(13, 244, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
  }
  if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_MemoryPool))))) __PYX_ERR(13, 244, __pyx_L1_error)
  __Pyx_XGOTREF((PyObject *)__pyx_v_7pyarrow_3lib__default_memory_pool);
  __Pyx_DECREF_SET(__pyx_v_7pyarrow_3lib__default_memory_pool, ((struct __pyx_obj_7pyarrow_3lib_MemoryPool *)__pyx_t_8));
  __Pyx_GIVEREF(__pyx_t_8);
  __pyx_t_8 = 0;

  /* "pyarrow/memory.pxi":245
 * 
 * cdef MemoryPool _default_memory_pool = default_memory_pool()
 * cdef LoggingMemoryPool _logging_memory_pool = logging_memory_pool(             # <<<<<<<<<<<<<<
 *     _default_memory_pool)
 * 
*/
  __pyx_t_18 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_21, __pyx_mstate_global->__pyx_n_u_logging_memory_pool); if (unlikely(!__pyx_t_21)) __PYX_ERR(13, 245, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);

  /* "pyarrow/memory.pxi":246
 * cdef MemoryPool _default_memory_pool = default_memory_pool()
 * cdef LoggingMemoryPool _logging_memory_pool = logging_memory_pool(
 *     _default_memory_pool)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_t_10 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_18, ((PyObject *)__pyx_v_7pyarrow_3lib__default_memory_pool)};
    __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_21, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
    __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
    if (unlikely(!__pyx_t_8)) __PYX_ERR(13, 245, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
  }

  /* "pyarrow/memory.pxi":245
 * 
 * cdef MemoryPool _default_memory_pool = default_memory_pool()
 * cdef LoggingMemoryPool _logging_memory_pool = logging_memory_pool(             # <<<<<<<<<<<<<<
 *     _default_memory_pool)
 * 
*/
  if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_LoggingMemoryPool))))) __PYX_ERR(13, 245, __pyx_L1_error)
  __Pyx_XGOTREF((PyObject *)__pyx_v_7pyarrow_3lib__logging_memory_pool);
  __Pyx_DECREF_SET(__pyx_v_7pyarrow_3lib__logging_memory_pool, ((struct __pyx_obj_7pyarrow_3lib_LoggingMemoryPool *)__pyx_t_8));
  __Pyx_GIVEREF(__pyx_t_8);
  __pyx_t_8 = 0;

  /* "pyarrow/memory.pxi":249
 * 
 * 
 * def log_memory_allocations(enable=True):             # <<<<<<<<<<<<<<
 *     """
 *     Enable or disable memory allocator logging for debugging purposes
*/
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_43log_memory_allocations, 0, __pyx_mstate_global->__pyx_n_u_log_memory_allocations, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[91])); if (unlikely(!__pyx_t_8)) __PYX_ERR(13, 249, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_8, __pyx_mstate_global->__pyx_tuple[20]);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_log_memory_allocations, __pyx_t_8) < (0)) __PYX_ERR(13, 249, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/memory.pxi":264
 * 
 * 
 * def total_allocated_bytes():             # <<<<<<<<<<<<<<
 *     """
 *     Return the currently allocated bytes from the default memory pool.
*/
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_45total_allocated_bytes, 0, __pyx_mstate_global->__pyx_n_u_total_allocated_bytes, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[92])); if (unlikely(!__pyx_t_8)) __PYX_ERR(13, 264, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_total_allocated_bytes, __pyx_t_8) < (0)) __PYX_ERR(13, 264, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/memory.pxi":273
 * 
 * 
 * def jemalloc_set_decay_ms(decay_ms):             # <<<<<<<<<<<<<<
 *     """
 *     Set arenas.dirty_decay_ms and arenas.muzzy_decay_ms to indicated number of
*/
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_47jemalloc_set_decay_ms, 0, __pyx_mstate_global->__pyx_n_u_jemalloc_set_decay_ms, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[93])); if (unlikely(!__pyx_t_8)) __PYX_ERR(13, 273, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_jemalloc_set_decay_ms, __pyx_t_8) < (0)) __PYX_ERR(13, 273, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/memory.pxi":291
 * 
 * 
 * def supported_memory_backends():             # <<<<<<<<<<<<<<
 *     """
 *     Return a list of available memory pool backends
*/
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_49supported_memory_backends, 0, __pyx_mstate_global->__pyx_n_u_supported_memory_backends, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[94])); if (unlikely(!__pyx_t_8)) __PYX_ERR(13, 291, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_supported_memory_backends, __pyx_t_8) < (0)) __PYX_ERR(13, 291, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.device cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
*/
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_6Device_7__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Device___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[95])); if (unlikely(!__pyx_t_8)) __PYX_ERR(7, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_8) < (0)) __PYX_ERR(7, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "self.device cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.device cannot be converted to a Python object for pickling"
*/
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_6Device_9__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Device___setstate_cython, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[96])); if (unlikely(!__pyx_t_8)) __PYX_ERR(7, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_8) < (0)) __PYX_ERR(7, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.memory_manager cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
*/
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_13MemoryManager_5__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_MemoryManager___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[97])); if (unlikely(!__pyx_t_8)) __PYX_ERR(7, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_8) < (0)) __PYX_ERR(7, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "self.memory_manager cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.memory_manager cannot be converted to a Python object for pickling"
*/
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_13MemoryManager_7__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_MemoryManager___setstate_cython, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[98])); if (unlikely(!__pyx_t_8)) __PYX_ERR(7, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_8) < (0)) __PYX_ERR(7, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/device.pxi":161
 * 
 * 
 * def default_cpu_memory_manager():             # <<<<<<<<<<<<<<
 *     """
 *     Return the default CPU MemoryManager instance.
*/
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_51default_cpu_memory_manager, 0, __pyx_mstate_global->__pyx_n_u_default_cpu_memory_manager, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[99])); if (unlikely(!__pyx_t_8)) __PYX_ERR(14, 161, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_default_cpu_memory_manager, __pyx_t_8) < (0)) __PYX_ERR(14, 161, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/types.pxi":26
 * )
 * 
 * import atexit             # <<<<<<<<<<<<<<
 * from collections.abc import Mapping
 * import pickle
*/
  __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_atexit, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 26, __pyx_L1_error)
  __pyx_t_8 = __pyx_t_1;
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_atexit, __pyx_t_8) < (0)) __PYX_ERR(1, 26, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/types.pxi":27
 * 
 * import atexit
 * from collections.abc import Mapping             # <<<<<<<<<<<<<<
 * import pickle
 * import re
*/
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Mapping};
    __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_collections_abc, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 27, __pyx_L1_error)
  }
  __pyx_t_8 = __pyx_t_1;
  __Pyx_GOTREF(__pyx_t_8);
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Mapping};
    __pyx_t_3 = 0; {
      __pyx_t_21 = __Pyx_ImportFrom(__pyx_t_8, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 27, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_21);
      if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_21) < (0)) __PYX_ERR(1, 27, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/types.pxi":28
 * import atexit
 * from collections.abc import Mapping
 * import pickle             # <<<<<<<<<<<<<<
 * import re
 * import sys
*/
  __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_pickle, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 28, __pyx_L1_error)
  __pyx_t_8 = __pyx_t_1;
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pickle, __pyx_t_8) < (0)) __PYX_ERR(1, 28, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/types.pxi":29
 * from collections.abc import Mapping
 * import pickle
 * import re             # <<<<<<<<<<<<<<
 * import sys
 * import warnings
*/
  __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_re, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 29, __pyx_L1_error)
  __pyx_t_8 = __pyx_t_1;
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_re, __pyx_t_8) < (0)) __PYX_ERR(1, 29, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/types.pxi":30
 * import pickle
 * import re
 * import sys             # <<<<<<<<<<<<<<
 * import warnings
 * from cython import sizeof
*/
  __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sys, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 30, __pyx_L1_error)
  __pyx_t_8 = __pyx_t_1;
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_sys, __pyx_t_8) < (0)) __PYX_ERR(1, 30, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/types.pxi":31
 * import re
 * import sys
 * import warnings             # <<<<<<<<<<<<<<
 * from cython import sizeof
 * 
*/
  __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_warnings, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 31, __pyx_L1_error)
  __pyx_t_8 = __pyx_t_1;
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_warnings, __pyx_t_8) < (0)) __PYX_ERR(1, 31, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/types.pxi":36
 * # These are imprecise because the type (in pandas 0.x) depends on the presence
 * # of nulls
 * cdef dict _pandas_type_map = {}             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_t_8 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 36, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_XGOTREF(__pyx_v_7pyarrow_3lib__pandas_type_map);
  __Pyx_DECREF_SET(__pyx_v_7pyarrow_3lib__pandas_type_map, ((PyObject*)__pyx_t_8));
  __Pyx_GIVEREF(__pyx_t_8);
  __pyx_t_8 = 0;

  /* "pyarrow/types.pxi":39
 * 
 * 
 * def _get_pandas_type_map():             # <<<<<<<<<<<<<<
 *     global _pandas_type_map
 *     if not _pandas_type_map:
*/
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_53_get_pandas_type_map, 0, __pyx_mstate_global->__pyx_n_u_get_pandas_type_map, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[100])); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 39, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_pandas_type_map, __pyx_t_8) < (0)) __PYX_ERR(1, 39, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/types.pxi":89
 * 
 * cdef dict _pep3118_type_map = {
 *     _Type_INT8: b'b',             # <<<<<<<<<<<<<<
 *     _Type_INT16: b'h',
 *     _Type_INT32: b'i',
*/
  __pyx_t_8 = __Pyx_PyDict_NewPresized(11); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 89, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_21 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::INT8); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 89, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  if (PyDict_SetItem(__pyx_t_8, __pyx_t_21, __pyx_mstate_global->__pyx_n_b_b) < (0)) __PYX_ERR(1, 89, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "pyarrow/types.pxi":90
 * cdef dict _pep3118_type_map = {
 *     _Type_INT8: b'b',
 *     _Type_INT16: b'h',             # <<<<<<<<<<<<<<
 *     _Type_INT32: b'i',
 *     _Type_INT64: b'q',
*/
  __pyx_t_21 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::INT16); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 90, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  if (PyDict_SetItem(__pyx_t_8, __pyx_t_21, __pyx_mstate_global->__pyx_n_b_h) < (0)) __PYX_ERR(1, 89, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "pyarrow/types.pxi":91
 *     _Type_INT8: b'b',
 *     _Type_INT16: b'h',
 *     _Type_INT32: b'i',             # <<<<<<<<<<<<<<
 *     _Type_INT64: b'q',
 *     _Type_UINT8: b'B',
*/
  __pyx_t_21 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::INT32); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 91, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  if (PyDict_SetItem(__pyx_t_8, __pyx_t_21, __pyx_mstate_global->__pyx_n_b_i) < (0)) __PYX_ERR(1, 89, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "pyarrow/types.pxi":92
 *     _Type_INT16: b'h',
 *     _Type_INT32: b'i',
 *     _Type_INT64: b'q',             # <<<<<<<<<<<<<<
 *     _Type_UINT8: b'B',
 *     _Type_UINT16: b'H',
*/
  __pyx_t_21 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::INT64); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 92, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  if (PyDict_SetItem(__pyx_t_8, __pyx_t_21, __pyx_mstate_global->__pyx_n_b_q) < (0)) __PYX_ERR(1, 89, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "pyarrow/types.pxi":93
 *     _Type_INT32: b'i',
 *     _Type_INT64: b'q',
 *     _Type_UINT8: b'B',             # <<<<<<<<<<<<<<
 *     _Type_UINT16: b'H',
 *     _Type_UINT32: b'I',
*/
  __pyx_t_21 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::UINT8); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 93, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  if (PyDict_SetItem(__pyx_t_8, __pyx_t_21, __pyx_mstate_global->__pyx_n_b_B) < (0)) __PYX_ERR(1, 89, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "pyarrow/types.pxi":94
 *     _Type_INT64: b'q',
 *     _Type_UINT8: b'B',
 *     _Type_UINT16: b'H',             # <<<<<<<<<<<<<<
 *     _Type_UINT32: b'I',
 *     _Type_UINT64: b'Q',
*/
  __pyx_t_21 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::UINT16); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 94, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  if (PyDict_SetItem(__pyx_t_8, __pyx_t_21, __pyx_mstate_global->__pyx_n_b_H) < (0)) __PYX_ERR(1, 89, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "pyarrow/types.pxi":95
 *     _Type_UINT8: b'B',
 *     _Type_UINT16: b'H',
 *     _Type_UINT32: b'I',             # <<<<<<<<<<<<<<
 *     _Type_UINT64: b'Q',
 *     _Type_HALF_FLOAT: b'e',
*/
  __pyx_t_21 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::UINT32); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 95, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  if (PyDict_SetItem(__pyx_t_8, __pyx_t_21, __pyx_mstate_global->__pyx_n_b_I) < (0)) __PYX_ERR(1, 89, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "pyarrow/types.pxi":96
 *     _Type_UINT16: b'H',
 *     _Type_UINT32: b'I',
 *     _Type_UINT64: b'Q',             # <<<<<<<<<<<<<<
 *     _Type_HALF_FLOAT: b'e',
 *     _Type_FLOAT: b'f',
*/
  __pyx_t_21 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::UINT64); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 96, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  if (PyDict_SetItem(__pyx_t_8, __pyx_t_21, __pyx_mstate_global->__pyx_n_b_Q) < (0)) __PYX_ERR(1, 89, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "pyarrow/types.pxi":97
 *     _Type_UINT32: b'I',
 *     _Type_UINT64: b'Q',
 *     _Type_HALF_FLOAT: b'e',             # <<<<<<<<<<<<<<
 *     _Type_FLOAT: b'f',
 *     _Type_DOUBLE: b'd',
*/
  __pyx_t_21 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::HALF_FLOAT); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 97, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  if (PyDict_SetItem(__pyx_t_8, __pyx_t_21, __pyx_mstate_global->__pyx_n_b_e) < (0)) __PYX_ERR(1, 89, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "pyarrow/types.pxi":98
 *     _Type_UINT64: b'Q',
 *     _Type_HALF_FLOAT: b'e',
 *     _Type_FLOAT: b'f',             # <<<<<<<<<<<<<<
 *     _Type_DOUBLE: b'd',
 * }
*/
  __pyx_t_21 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::FLOAT); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 98, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  if (PyDict_SetItem(__pyx_t_8, __pyx_t_21, __pyx_mstate_global->__pyx_n_b_f) < (0)) __PYX_ERR(1, 89, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "pyarrow/types.pxi":99
 *     _Type_HALF_FLOAT: b'e',
 *     _Type_FLOAT: b'f',
 *     _Type_DOUBLE: b'd',             # <<<<<<<<<<<<<<
 * }
 * 
*/
  __pyx_t_21 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::DOUBLE); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 99, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  if (PyDict_SetItem(__pyx_t_8, __pyx_t_21, __pyx_mstate_global->__pyx_n_b_d) < (0)) __PYX_ERR(1, 89, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
  __Pyx_XGOTREF(__pyx_v_7pyarrow_3lib__pep3118_type_map);
  __Pyx_DECREF_SET(__pyx_v_7pyarrow_3lib__pep3118_type_map, ((PyObject*)__pyx_t_8));
  __Pyx_GIVEREF(__pyx_t_8);
  __pyx_t_8 = 0;

  /* "pyarrow/types.pxi":160
 * 
 * 
 * def _is_primitive(Type type):             # <<<<<<<<<<<<<<
 *     # This is simply a redirect, the official API is in pyarrow.types.
 *     return is_primitive(type)
*/
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_55_is_primitive, 0, __pyx_mstate_global->__pyx_n_u_is_primitive, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[101])); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 160, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_is_primitive, __pyx_t_8) < (0)) __PYX_ERR(1, 160, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/types.pxi":165
 * 
 * 
 * def _get_pandas_type(arrow_type, coerce_to_ns=False):             # <<<<<<<<<<<<<<
 *     cdef Type type_id = arrow_type.id
 *     cdef dict pandas_type_map = _get_pandas_type_map()
*/
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_57_get_pandas_type, 0, __pyx_mstate_global->__pyx_n_u_get_pandas_type, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[102])); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 165, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_8, __pyx_mstate_global->__pyx_tuple[21]);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_pandas_type, __pyx_t_8) < (0)) __PYX_ERR(1, 165, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/types.pxi":182
 * 
 * 
 * def _get_pandas_tz_type(arrow_type, coerce_to_ns=False):             # <<<<<<<<<<<<<<
 *     from pyarrow.pandas_compat import make_datetimetz
 *     unit = 'ns' if coerce_to_ns else arrow_type.unit
*/
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_59_get_pandas_tz_type, 0, __pyx_mstate_global->__pyx_n_u_get_pandas_tz_type, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[103])); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 182, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_8, __pyx_mstate_global->__pyx_tuple[21]);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_pandas_tz_type, __pyx_t_8) < (0)) __PYX_ERR(1, 182, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/types.pxi":188
 * 
 * 
 * def _to_pandas_dtype(arrow_type, options=None):             # <<<<<<<<<<<<<<
 *     coerce_to_ns = (options and options.get('coerce_temporal_nanoseconds', False)) or (
 *         _pandas_api.is_v1() and arrow_type.id in
*/
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_61_to_pandas_dtype, 0, __pyx_mstate_global->__pyx_n_u_to_pandas_dtype, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[104])); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 188, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_8, __pyx_mstate_global->__pyx_tuple[7]);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_to_pandas_dtype, __pyx_t_8) < (0)) __PYX_ERR(1, 188, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/types.pxi":238
 *         self.pep3118_format = _datatype_to_pep3118(self.type)
 * 
 *     cpdef Field field(self, i):             # <<<<<<<<<<<<<<
 *         """
 *         Parameters
*/
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_8DataType_5field, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DataType_field, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[105])); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 238, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType, __pyx_mstate_global->__pyx_n_u_field, __pyx_t_8) < (0)) __PYX_ERR(1, 238, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/types.pxi":358
 *         return hash(str(self))
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         return type_for_alias, (str(self),)
 * 
*/
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_8DataType_11__reduce__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DataType___reduce, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[106])); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 358, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType, __pyx_mstate_global->__pyx_n_u_reduce, __pyx_t_8) < (0)) __PYX_ERR(1, 358, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/types.pxi":370
 *             return NotImplemented
 * 
 *     def equals(self, other, *, check_metadata=False):             # <<<<<<<<<<<<<<
 *         """
 *         Return true if type is equivalent to passed value.
*/
  __pyx_t_8 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 370, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_check_metadata, Py_False) < (0)) __PYX_ERR(1, 370, __pyx_L1_error)
  __pyx_t_21 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_8DataType_17equals, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DataType_equals, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[107])); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 370, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_21);
  #endif
  __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_21, __pyx_t_8);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType, __pyx_mstate_global->__pyx_n_u_equals, __pyx_t_21) < (0)) __PYX_ERR(1, 370, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "pyarrow/types.pxi":400
 *         return self.type.Equals(deref(other_type.type), c_check_metadata)
 * 
 *     def to_pandas_dtype(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the equivalent NumPy / Pandas dtype.
*/
  __pyx_t_21 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_8DataType_19to_pandas_dtype, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DataType_to_pandas_dtype, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[108])); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 400, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_21);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType, __pyx_mstate_global->__pyx_n_u_to_pandas_dtype_2, __pyx_t_21) < (0)) __PYX_ERR(1, 400, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "pyarrow/types.pxi":412
 *         return _to_pandas_dtype(self)
 * 
 *     def _export_to_c(self, out_ptr):             # <<<<<<<<<<<<<<
 *         """
 *         Export to a C ArrowSchema struct, given its pointer.
*/
  __pyx_t_21 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_8DataType_21_export_to_c, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DataType__export_to_c, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[109])); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 412, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_21);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType, __pyx_mstate_global->__pyx_n_u_export_to_c, __pyx_t_21) < (0)) __PYX_ERR(1, 412, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "pyarrow/types.pxi":423
 *                                 <ArrowSchema*> _as_c_pointer(out_ptr)))
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def _import_from_c(in_ptr):
 *         """
*/
  __pyx_t_21 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_8DataType_23_import_from_c, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DataType__import_from_c, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[110])); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 423, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_21);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType, __pyx_mstate_global->__pyx_n_u_import_from_c, __pyx_t_21) < (0)) __PYX_ERR(1, 423, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
  __pyx_t_8 = NULL;
  __Pyx_GetNameInClass(__pyx_t_18, (PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType, __pyx_mstate_global->__pyx_n_u_import_from_c); if (unlikely(!__pyx_t_18)) __PYX_ERR(1, 423, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  __pyx_t_10 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_18};
    __pyx_t_21 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_staticmethod, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
    if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 423, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_21);
  }
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType, __pyx_mstate_global->__pyx_n_u_import_from_c, __pyx_t_21) < (0)) __PYX_ERR(1, 423, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "pyarrow/types.pxi":434
 *         return pyarrow_wrap_data_type(result)
 * 
 *     def __arrow_c_schema__(self):             # <<<<<<<<<<<<<<
 *         """
 *         Export to a ArrowSchema PyCapsule
*/
  __pyx_t_21 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_8DataType_25__arrow_c_schema__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DataType___arrow_c_schema, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[111])); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 434, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_21);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType, __pyx_mstate_global->__pyx_n_u_arrow_c_schema, __pyx_t_21) < (0)) __PYX_ERR(1, 434, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "pyarrow/types.pxi":448
 *         return capsule
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def _import_from_c_capsule(schema):
 *         """
*/
  __pyx_t_21 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_8DataType_27_import_from_c_capsule, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DataType__import_from_c_capsule, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[112])); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 448, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_21);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType, __pyx_mstate_global->__pyx_n_u_import_from_c_capsule, __pyx_t_21) < (0)) __PYX_ERR(1, 448, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
  __pyx_t_18 = NULL;
  __Pyx_GetNameInClass(__pyx_t_8, (PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType, __pyx_mstate_global->__pyx_n_u_import_from_c_capsule); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 448, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_10 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_18, __pyx_t_8};
    __pyx_t_21 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_staticmethod, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 448, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_21);
  }
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType, __pyx_mstate_global->__pyx_n_u_import_from_c_capsule, __pyx_t_21) < (0)) __PYX_ERR(1, 448, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
*/
  __pyx_t_21 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_14DictionaryMemo_3__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DictionaryMemo___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[113])); if (unlikely(!__pyx_t_21)) __PYX_ERR(7, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_21);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_21) < (0)) __PYX_ERR(7, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/
  __pyx_t_21 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_14DictionaryMemo_5__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DictionaryMemo___setstate_cython, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[114])); if (unlikely(!__pyx_t_21)) __PYX_ERR(7, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_21);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_21) < (0)) __PYX_ERR(7, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "pyarrow/types.pxi":502
 *         self.dict_type = <const CDictionaryType*> type.get()
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         return dictionary, (self.index_type, self.value_type, self.ordered)
 * 
*/
  __pyx_t_21 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_14DictionaryType_1__reduce__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DictionaryType___reduce, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[115])); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 502, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_21);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DictionaryType, __pyx_mstate_global->__pyx_n_u_reduce, __pyx_t_21) < (0)) __PYX_ERR(1, 502, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "pyarrow/types.pxi":565
 *         self.list_type = <const CListType*> type.get()
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         return list_, (self.value_field,)
 * 
*/
  __pyx_t_21 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_8ListType_1__reduce__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ListType___reduce, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[116])); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 565, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_21);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ListType, __pyx_mstate_global->__pyx_n_u_reduce, __pyx_t_21) < (0)) __PYX_ERR(1, 565, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "pyarrow/types.pxi":613
 *         self.list_type = <const CLargeListType*> type.get()
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         return large_list, (self.value_field,)
 * 
*/
  __pyx_t_21 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_13LargeListType_1__reduce__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_LargeListType___reduce, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[117])); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 613, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_21);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_LargeListType, __pyx_mstate_global->__pyx_n_u_reduce, __pyx_t_21) < (0)) __PYX_ERR(1, 613, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "pyarrow/types.pxi":651
 *         self.list_view_type = <const CListViewType*> type.get()
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         return list_view, (self.value_field,)
 * 
*/
  __pyx_t_21 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_12ListViewType_1__reduce__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ListViewType___reduce, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[118])); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 651, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_21);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ListViewType, __pyx_mstate_global->__pyx_n_u_reduce, __pyx_t_21) < (0)) __PYX_ERR(1, 651, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "pyarrow/types.pxi":699
 *         self.list_view_type = <const CLargeListViewType*> type.get()
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         return large_list_view, (self.value_field,)
 * 
*/
  __pyx_t_21 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_17LargeListViewType_1__reduce__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_LargeListViewType___reduce, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[119])); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 699, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_21);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_LargeListViewType, __pyx_mstate_global->__pyx_n_u_reduce, __pyx_t_21) < (0)) __PYX_ERR(1, 699, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "pyarrow/types.pxi":748
 *         self.map_type = <const CMapType*> type.get()
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         return map_, (self.key_field, self.item_field)
 * 
*/
  __pyx_t_21 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_7MapType_1__reduce__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_MapType___reduce, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[120])); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 748, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_21);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_MapType, __pyx_mstate_global->__pyx_n_u_reduce, __pyx_t_21) < (0)) __PYX_ERR(1, 748, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "pyarrow/types.pxi":834
 *         self.list_type = <const CFixedSizeListType*> type.get()
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         return list_, (self.value_type, self.list_size)
 * 
*/
  __pyx_t_21 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_17FixedSizeListType_1__reduce__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_FixedSizeListType___reduce, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[121])); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 834, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_21);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_FixedSizeListType, __pyx_mstate_global->__pyx_n_u_reduce, __pyx_t_21) < (0)) __PYX_ERR(1, 834, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "pyarrow/types.pxi":946
 *             return pyarrow_wrap_field(fields[0])
 * 
 *     def get_field_index(self, name):             # <<<<<<<<<<<<<<
 *         """
 *         Return index of the unique field with the given name.
*/
  __pyx_t_21 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_10StructType_1get_field_index, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_StructType_get_field_index, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[122])); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 946, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_21);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_StructType, __pyx_mstate_global->__pyx_n_u_get_field_index, __pyx_t_21) < (0)) __PYX_ERR(1, 946, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "pyarrow/types.pxi":979
 *         return self.struct_type.GetFieldIndex(tobytes(name))
 * 
 *     cpdef Field field(self, i):             # <<<<<<<<<<<<<<
 *         """
 *         Select a field by its column name or numeric index.
*/
  __pyx_t_21 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_10StructType_3field, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_StructType_field, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[123])); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 979, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_21);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_StructType, __pyx_mstate_global->__pyx_n_u_field, __pyx_t_21) < (0)) __PYX_ERR(1, 979, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "pyarrow/types.pxi":1014
 *             raise TypeError('Expected integer or string index')
 * 
 *     def get_all_field_indices(self, name):             # <<<<<<<<<<<<<<
 *         """
 *         Return sorted list of indices for the fields with the given name.
*/
  __pyx_t_21 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_10StructType_5get_all_field_indices, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_StructType_get_all_field_indices, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[124])); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 1014, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_21);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_StructType, __pyx_mstate_global->__pyx_n_u_get_all_field_indices, __pyx_t_21) < (0)) __PYX_ERR(1, 1014, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "pyarrow/types.pxi":1057
 *         return self.field(i)
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         return struct, (list(self),)
 * 
*/
  __pyx_t_21 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_10StructType_14__reduce__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_StructType___reduce, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[125])); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 1057, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_21);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_StructType, __pyx_mstate_global->__pyx_n_u_reduce, __pyx_t_21) < (0)) __PYX_ERR(1, 1057, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "pyarrow/types.pxi":1169
 *             yield self[i]
 * 
 *     cpdef Field field(self, i):             # <<<<<<<<<<<<<<
 *         """
 *         Return a child field by its numeric index.
*/
  __pyx_t_21 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_9UnionType_6field, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_UnionType_field, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[126])); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 1169, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_21);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_UnionType, __pyx_mstate_global->__pyx_n_u_field, __pyx_t_21) < (0)) __PYX_ERR(1, 1169, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "pyarrow/types.pxi":1201
 *         return self.field(i)
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         return union, (list(self), self.mode, self.type_codes)
 * 
*/
  __pyx_t_21 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_9UnionType_10__reduce__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_UnionType___reduce, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[127])); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 1201, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_21);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_UnionType, __pyx_mstate_global->__pyx_n_u_reduce, __pyx_t_21) < (0)) __PYX_ERR(1, 1201, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "pyarrow/types.pxi":1299
 *             return None
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         return timestamp, (self.unit, self.tz)
 * 
*/
  __pyx_t_21 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_13TimestampType_1__reduce__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_TimestampType___reduce, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[128])); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 1299, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_21);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_TimestampType, __pyx_mstate_global->__pyx_n_u_reduce, __pyx_t_21) < (0)) __PYX_ERR(1, 1299, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "pyarrow/types.pxi":1423
 *             <const CFixedSizeBinaryType*> type.get())
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         return binary, (self.byte_width,)
 * 
*/
  __pyx_t_21 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_19FixedSizeBinaryType_1__reduce__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_FixedSizeBinaryType___reduce, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[129])); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 1423, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_21);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_FixedSizeBinaryType, __pyx_mstate_global->__pyx_n_u_reduce, __pyx_t_21) < (0)) __PYX_ERR(1, 1423, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "pyarrow/types.pxi":1444
 *         self.decimal32_type = <const CDecimal32Type*> type.get()
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         return decimal32, (self.precision, self.scale)
 * 
*/
  __pyx_t_21 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_13Decimal32Type_1__reduce__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Decimal32Type___reduce, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[130])); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 1444, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_21);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Decimal32Type, __pyx_mstate_global->__pyx_n_u_reduce, __pyx_t_21) < (0)) __PYX_ERR(1, 1444, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "pyarrow/types.pxi":1493
 *         self.decimal64_type = <const CDecimal64Type*> type.get()
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         return decimal64, (self.precision, self.scale)
 * 
*/
  __pyx_t_21 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_13Decimal64Type_1__reduce__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Decimal64Type___reduce, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[131])); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 1493, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_21);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Decimal64Type, __pyx_mstate_global->__pyx_n_u_reduce, __pyx_t_21) < (0)) __PYX_ERR(1, 1493, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "pyarrow/types.pxi":1542
 *         self.decimal128_type = <const CDecimal128Type*> type.get()
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         return decimal128, (self.precision, self.scale)
 * 
*/
  __pyx_t_21 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_14Decimal128Type_1__reduce__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Decimal128Type___reduce, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[132])); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 1542, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_21);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Decimal128Type, __pyx_mstate_global->__pyx_n_u_reduce, __pyx_t_21) < (0)) __PYX_ERR(1, 1542, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "pyarrow/types.pxi":1591
 *         self.decimal256_type = <const CDecimal256Type*> type.get()
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         return decimal256, (self.precision, self.scale)
 * 
*/
  __pyx_t_21 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_14Decimal256Type_1__reduce__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Decimal256Type___reduce, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[133])); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 1591, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_21);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Decimal256Type, __pyx_mstate_global->__pyx_n_u_reduce, __pyx_t_21) < (0)) __PYX_ERR(1, 1591, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "pyarrow/types.pxi":1632
 *         self.run_end_encoded_type = <const CRunEndEncodedType*> type.get()
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         return run_end_encoded, (self.run_end_type, self.value_type)
 * 
*/
  __pyx_t_21 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_17RunEndEncodedType_1__reduce__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_RunEndEncodedType___reduce, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[134])); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 1632, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_21);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RunEndEncodedType, __pyx_mstate_global->__pyx_n_u_reduce, __pyx_t_21) < (0)) __PYX_ERR(1, 1632, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "pyarrow/types.pxi":1653
 *         self.ext_type = <const CExtensionType*> type.get()
 * 
 *     def __arrow_ext_class__(self):             # <<<<<<<<<<<<<<
 *         """
 *         The associated array extension class
*/
  __pyx_t_21 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_17BaseExtensionType_1__arrow_ext_class__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_BaseExtensionType___arrow_ext_cl, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[135])); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 1653, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_21);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_BaseExtensionType, __pyx_mstate_global->__pyx_n_u_arrow_ext_class, __pyx_t_21) < (0)) __PYX_ERR(1, 1653, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "pyarrow/types.pxi":1659
 *         return ExtensionArray
 * 
 *     def __arrow_ext_scalar_class__(self):             # <<<<<<<<<<<<<<
 *         """
 *         The associated scalar class
*/
  __pyx_t_21 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_17BaseExtensionType_3__arrow_ext_scalar_class__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_BaseExtensionType___arrow_ext_sc, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[136])); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 1659, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_21);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_BaseExtensionType, __pyx_mstate_global->__pyx_n_u_arrow_ext_scalar_class, __pyx_t_21) < (0)) __PYX_ERR(1, 1659, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "pyarrow/types.pxi":1697
 *         return self.ext_type.bit_width()
 * 
 *     def wrap_array(self, storage):             # <<<<<<<<<<<<<<
 *         """
 *         Wrap the given storage array as an extension array.
*/
  __pyx_t_21 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_17BaseExtensionType_5wrap_array, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_BaseExtensionType_wrap_array, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[137])); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 1697, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_21);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_BaseExtensionType, __pyx_mstate_global->__pyx_n_u_wrap_array, __pyx_t_21) < (0)) __PYX_ERR(1, 1697, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "pyarrow/types.pxi":1887
 *         return f'{self.__class__.__name__}({repr(self.storage_type)})'
 * 
 *     def __arrow_ext_serialize__(self):             # <<<<<<<<<<<<<<
 *         """
 *         Serialized representation of metadata to reconstruct the type object.
*/
  __pyx_t_21 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_13ExtensionType_9__arrow_ext_serialize__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ExtensionType___arrow_ext_serial, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[138])); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 1887, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_21);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ExtensionType, __pyx_mstate_global->__pyx_n_u_arrow_ext_serialize, __pyx_t_21) < (0)) __PYX_ERR(1, 1887, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "pyarrow/types.pxi":1899
 *         return NotImplementedError
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def __arrow_ext_deserialize__(cls, storage_type, serialized):
 *         """
*/
  __pyx_t_21 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_13ExtensionType_11__arrow_ext_deserialize__, __Pyx_CYFUNCTION_CLASSMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ExtensionType___arrow_ext_deseri, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[139])); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 1899, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_21);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ExtensionType, __pyx_mstate_global->__pyx_n_u_arrow_ext_deserialize, __pyx_t_21) < (0)) __PYX_ERR(1, 1899, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
  __Pyx_GetNameInClass(__pyx_t_21, (PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ExtensionType, __pyx_mstate_global->__pyx_n_u_arrow_ext_deserialize); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 1899, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  __pyx_t_8 = __Pyx_Method_ClassMethod(__pyx_t_21); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1899, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ExtensionType, __pyx_mstate_global->__pyx_n_u_arrow_ext_deserialize, __pyx_t_8) < (0)) __PYX_ERR(1, 1899, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/types.pxi":1911
 *         return NotImplementedError
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         return self.__arrow_ext_deserialize__, (self.storage_type, self.__arrow_ext_serialize__())
 * 
*/
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_13ExtensionType_13__reduce__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ExtensionType___reduce, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[140])); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1911, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ExtensionType, __pyx_mstate_global->__pyx_n_u_reduce, __pyx_t_8) < (0)) __PYX_ERR(1, 1911, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/types.pxi":1914
 *         return self.__arrow_ext_deserialize__, (self.storage_type, self.__arrow_ext_serialize__())
 * 
 *     def __arrow_ext_class__(self):             # <<<<<<<<<<<<<<
 *         """Return an extension array class to be used for building or
 *         deserializing arrays with this extension type.
*/
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_13ExtensionType_15__arrow_ext_class__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ExtensionType___arrow_ext_class, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[141])); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1914, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ExtensionType, __pyx_mstate_global->__pyx_n_u_arrow_ext_class, __pyx_t_8) < (0)) __PYX_ERR(1, 1914, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/types.pxi":1924
 *         return ExtensionArray
 * 
 *     def __arrow_ext_scalar_class__(self):             # <<<<<<<<<<<<<<
 *         """Return an extension scalar class for building scalars with this
 *         extension type.
*/
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_13ExtensionType_17__arrow_ext_scalar_class__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ExtensionType___arrow_ext_scalar, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[142])); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1924, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ExtensionType, __pyx_mstate_global->__pyx_n_u_arrow_ext_scalar_class, __pyx_t_8) < (0)) __PYX_ERR(1, 1924, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/types.pxi":1962
 *         self.json_ext_type = <const CJsonType*> type.get()
 * 
 *     def __arrow_ext_class__(self):             # <<<<<<<<<<<<<<
 *         return JsonArray
 * 
*/
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_8JsonType_1__arrow_ext_class__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_JsonType___arrow_ext_class, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[143])); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1962, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_JsonType, __pyx_mstate_global->__pyx_n_u_arrow_ext_class, __pyx_t_8) < (0)) __PYX_ERR(1, 1962, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/types.pxi":1965
 *         return JsonArray
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         return json_, (self.storage_type,)
 * 
*/
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_8JsonType_3__reduce__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_JsonType___reduce, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[144])); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1965, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_JsonType, __pyx_mstate_global->__pyx_n_u_reduce, __pyx_t_8) < (0)) __PYX_ERR(1, 1965, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/types.pxi":1968
 *         return json_, (self.storage_type,)
 * 
 *     def __arrow_ext_scalar_class__(self):             # <<<<<<<<<<<<<<
 *         return JsonScalar
 * 
*/
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_8JsonType_5__arrow_ext_scalar_class__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_JsonType___arrow_ext_scalar_clas, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[145])); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1968, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_JsonType, __pyx_mstate_global->__pyx_n_u_arrow_ext_scalar_class, __pyx_t_8) < (0)) __PYX_ERR(1, 1968, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/types.pxi":1981
 *         self.uuid_ext_type = <const CUuidType*> type.get()
 * 
 *     def __arrow_ext_class__(self):             # <<<<<<<<<<<<<<
 *         return UuidArray
 * 
*/
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_8UuidType_1__arrow_ext_class__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_UuidType___arrow_ext_class, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[146])); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1981, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_UuidType, __pyx_mstate_global->__pyx_n_u_arrow_ext_class, __pyx_t_8) < (0)) __PYX_ERR(1, 1981, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/types.pxi":1984
 *         return UuidArray
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         return uuid, ()
 * 
*/
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_8UuidType_3__reduce__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_UuidType___reduce, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[147])); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1984, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_UuidType, __pyx_mstate_global->__pyx_n_u_reduce, __pyx_t_8) < (0)) __PYX_ERR(1, 1984, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/types.pxi":1987
 *         return uuid, ()
 * 
 *     def __arrow_ext_scalar_class__(self):             # <<<<<<<<<<<<<<
 *         return UuidScalar
 * 
*/
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_8UuidType_5__arrow_ext_scalar_class__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_UuidType___arrow_ext_scalar_clas, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[148])); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1987, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_UuidType, __pyx_mstate_global->__pyx_n_u_arrow_ext_scalar_class, __pyx_t_8) < (0)) __PYX_ERR(1, 1987, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/types.pxi":2052
 *             return None
 * 
 *     def __arrow_ext_class__(self):             # <<<<<<<<<<<<<<
 *         return FixedShapeTensorArray
 * 
*/
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_20FixedShapeTensorType_1__arrow_ext_class__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_FixedShapeTensorType___arrow_ext, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[149])); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2052, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_FixedShapeTensorType, __pyx_mstate_global->__pyx_n_u_arrow_ext_class, __pyx_t_8) < (0)) __PYX_ERR(1, 2052, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/types.pxi":2055
 *         return FixedShapeTensorArray
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         return fixed_shape_tensor, (self.value_type, self.shape,
 *                                     self.dim_names, self.permutation)
*/
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_20FixedShapeTensorType_3__reduce__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_FixedShapeTensorType___reduce, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[150])); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2055, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_FixedShapeTensorType, __pyx_mstate_global->__pyx_n_u_reduce, __pyx_t_8) < (0)) __PYX_ERR(1, 2055, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/types.pxi":2059
 *                                     self.dim_names, self.permutation)
 * 
 *     def __arrow_ext_scalar_class__(self):             # <<<<<<<<<<<<<<
 *         return FixedShapeTensorScalar
 * 
*/
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_20FixedShapeTensorType_5__arrow_ext_scalar_class__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_FixedShapeTensorType___arrow_ext_2, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[151])); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2059, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_FixedShapeTensorType, __pyx_mstate_global->__pyx_n_u_arrow_ext_scalar_class, __pyx_t_8) < (0)) __PYX_ERR(1, 2059, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/types.pxi":2084
 *         self.bool8_ext_type = <const CBool8Type*> type.get()
 * 
 *     def __arrow_ext_class__(self):             # <<<<<<<<<<<<<<
 *         return Bool8Array
 * 
*/
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_9Bool8Type_1__arrow_ext_class__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Bool8Type___arrow_ext_class, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[152])); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2084, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Bool8Type, __pyx_mstate_global->__pyx_n_u_arrow_ext_class, __pyx_t_8) < (0)) __PYX_ERR(1, 2084, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/types.pxi":2087
 *         return Bool8Array
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         return bool8, ()
 * 
*/
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_9Bool8Type_3__reduce__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Bool8Type___reduce, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[153])); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2087, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Bool8Type, __pyx_mstate_global->__pyx_n_u_reduce, __pyx_t_8) < (0)) __PYX_ERR(1, 2087, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/types.pxi":2090
 *         return bool8, ()
 * 
 *     def __arrow_ext_scalar_class__(self):             # <<<<<<<<<<<<<<
 *         return Bool8Scalar
 * 
*/
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_9Bool8Type_5__arrow_ext_scalar_class__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Bool8Type___arrow_ext_scalar_cla, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[154])); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2090, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Bool8Type, __pyx_mstate_global->__pyx_n_u_arrow_ext_scalar_class, __pyx_t_8) < (0)) __PYX_ERR(1, 2090, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/types.pxi":2128
 *         return frombytes(c_string(self.opaque_ext_type.vendor_name()))
 * 
 *     def __arrow_ext_class__(self):             # <<<<<<<<<<<<<<
 *         return OpaqueArray
 * 
*/
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_10OpaqueType_1__arrow_ext_class__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_OpaqueType___arrow_ext_class, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[155])); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2128, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_OpaqueType, __pyx_mstate_global->__pyx_n_u_arrow_ext_class, __pyx_t_8) < (0)) __PYX_ERR(1, 2128, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/types.pxi":2131
 *         return OpaqueArray
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         return opaque, (self.storage_type, self.type_name, self.vendor_name)
 * 
*/
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_10OpaqueType_3__reduce__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_OpaqueType___reduce, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[156])); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2131, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_OpaqueType, __pyx_mstate_global->__pyx_n_u_reduce, __pyx_t_8) < (0)) __PYX_ERR(1, 2131, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/types.pxi":2134
 *         return opaque, (self.storage_type, self.type_name, self.vendor_name)
 * 
 *     def __arrow_ext_scalar_class__(self):             # <<<<<<<<<<<<<<
 *         return OpaqueScalar
 * 
*/
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_10OpaqueType_5__arrow_ext_scalar_class__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_OpaqueType___arrow_ext_scalar_cl, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[157])); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2134, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_OpaqueType, __pyx_mstate_global->__pyx_n_u_arrow_ext_scalar_class, __pyx_t_8) < (0)) __PYX_ERR(1, 2134, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/types.pxi":2158
 *         super().__init__(storage_type, "pyarrow.unknown")
 * 
 *     def __arrow_ext_serialize__(self):             # <<<<<<<<<<<<<<
 *         return self.serialized
 * 
*/
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_20UnknownExtensionType_3__arrow_ext_serialize__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_UnknownExtensionType___arrow_ext, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[158])); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2158, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_UnknownExtensionType, __pyx_mstate_global->__pyx_n_u_arrow_ext_serialize, __pyx_t_8) < (0)) __PYX_ERR(1, 2158, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyarrow/types.pxi":2161
 *         return self.serialized
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def __arrow_ext_deserialize__(cls, storage_type, serialized):
 *         return UnknownExtensionType()
*/
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_20UnknownExtensionType_5__arrow_ext_deserialize__, __Pyx_CYFUNCTION_CLASSMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_UnknownExtensionType___arrow_ext_2, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[159])); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2161, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_UnknownExtensionType, __pyx_mstate_global->__pyx_n_u_arrow_ext_deserialize, __pyx_t_8) < (0)) __PYX_ERR(1, 2161, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_GetNameInClass(__pyx_t_8, (PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_UnknownExtensionType, __pyx_mstate_global->__pyx_n_u_arrow_ext_deserialize); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2161, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_21 = __Pyx_Method_ClassMethod(__pyx_t_8); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 2161, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_UnknownExtensionType, __pyx_mstate_global->__pyx_n_u_arrow_ext_deserialize, __pyx_t_21) < (0)) __PYX_ERR(1, 2161, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "pyarrow/types.pxi":2166
 * 
 * 
 * _python_extension_types_registry = []             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_t_21 = PyList_New(0); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 2166, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_python_extension_types_registry, __pyx_t_21) < (0)) __PYX_ERR(1, 2166, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "pyarrow/types.pxi":2169
 * 
 * 
 * def register_extension_type(ext_type):             # <<<<<<<<<<<<<<
 *     """
 *     Register a Python extension type.
*/
  __pyx_t_21 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_63register_extension_type, 0, __pyx_mstate_global->__pyx_n_u_register_extension_type, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[160])); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 2169, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_21);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_register_extension_type, __pyx_t_21) < (0)) __PYX_ERR(1, 2169, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "pyarrow/types.pxi":2233
 * 
 * 
 * def unregister_extension_type(type_name):             # <<<<<<<<<<<<<<
 *     """
 *     Unregister a Python extension type.
*/
  __pyx_t_21 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_65unregister_extension_type, 0, __pyx_mstate_global->__pyx_n_u_unregister_extension_type, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[161])); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 2233, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_21);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_unregister_extension_type, __pyx_t_21) < (0)) __PYX_ERR(1, 2233, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "pyarrow/types.pxi":2283
 * 
 * 
 * cdef class KeyValueMetadata(_Metadata, Mapping):             # <<<<<<<<<<<<<<
 *     """
 *     KeyValueMetadata
*/
  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_Mapping); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2283, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_18 = PyTuple_Pack(2, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Metadata), __pyx_t_8); if (unlikely(!__pyx_t_18)) __PYX_ERR(1, 2283, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2283, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_22 = PyTuple_Pack(3, __pyx_mstate_global->__pyx_n_u_KeyValueMetadata, __pyx_t_18, __pyx_t_8); if (unlikely(!__pyx_t_22)) __PYX_ERR(1, 2283, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_21 = __Pyx_PyTuple_GET_ITEM(__pyx_t_22, 1);
  if (unlikely(!CYTHON_ASSUME_SAFE_MACROS && !__pyx_t_21)) __PYX_ERR(1, 2283, __pyx_L1_error)
  __Pyx_INCREF(__pyx_t_21);
  __pyx_t_27 = ((PyTypeObject*)__Pyx_PyTuple_GET_ITEM(__pyx_t_21, 0));
  if (unlikely(!CYTHON_ASSUME_SAFE_MACROS && !__pyx_t_27)) __PYX_ERR(1, 2283, __pyx_L1_error)
  #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
  if (__Pyx_get_runtime_version() < 0x030A0000) {
    __pyx_t_18 = PyObject_GetAttrString((PyObject*)&PyType_Type, "__new__");
    if (unlikely(!__pyx_t_18)) __PYX_ERR(1, 2283, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_18);
    __pyx_t_19 = PyTuple_Pack(1, (PyObject*)&PyType_Type);
    if (unlikely(!__pyx_t_19)) __PYX_ERR(1, 2283, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_19);
    __pyx_t_5 = PyNumber_Add(__pyx_t_19, __pyx_t_22);
    if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2283, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_8 = PyObject_Call(__pyx_t_18, __pyx_t_5, NULL);
    __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
    __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else
  #endif
  __pyx_t_8 = __Pyx_PyType_GetSlot(&PyType_Type, tp_new, newfunc)(&PyType_Type, __pyx_t_22, NULL);
  if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2283, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (__Pyx_PyType_GetSlot((PyTypeObject*) __pyx_t_8, tp_base, PyTypeObject*) != __pyx_t_27) {
    __Pyx_TypeName base_name = __Pyx_PyType_GetFullyQualifiedName(__Pyx_PyType_GetSlot((PyTypeObject*) __pyx_t_8, tp_base, PyTypeObject*));
    __Pyx_TypeName type_name = __Pyx_PyType_GetFullyQualifiedName(__pyx_t_27);
    PyErr_Format(PyExc_TypeError, "best base '" __Pyx_FMT_TYPENAME "' must be equal to first base '" __Pyx_FMT_TYPENAME "'",
                 base_name, type_name);
    __Pyx_DECREF_TypeName(base_name);
    __Pyx_DECREF_TypeName(type_name);
    __PYX_ERR(1, 2283, __pyx_L1_error)
  }
  __pyx_t_27 = NULL;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
  #if CYTHON_USE_TYPE_SPECS
  if (__Pyx_validate_bases_tuple(__pyx_type_7pyarrow_3lib_KeyValueMetadata_spec.name, 0, __pyx_t_21) < (0)) __PYX_ERR(1, 2283, __pyx_L1_error)
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_KeyValueMetadata = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_KeyValueMetadata_spec, __pyx_t_21);
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_KeyValueMetadata)) __PYX_ERR(1, 2283, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_KeyValueMetadata_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_KeyValueMetadata) < (0)) __PYX_ERR(1, 2283, __pyx_L1_error)
  #else
  __Pyx_INCREF(__pyx_t_21);
  __Pyx_GIVEREF(__pyx_t_21);
  __pyx_type_7pyarrow_3lib_KeyValueMetadata.tp_bases = __pyx_t_21;
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_KeyValueMetadata = &__pyx_type_7pyarrow_3lib_KeyValueMetadata;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_KeyValueMetadata->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Metadata;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_KeyValueMetadata) < (0)) __PYX_ERR(1, 2283, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_KeyValueMetadata);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_KeyValueMetadata->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_KeyValueMetadata->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_KeyValueMetadata->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_KeyValueMetadata, __pyx_vtabptr_7pyarrow_3lib_KeyValueMetadata) < (0)) __PYX_ERR(1, 2283, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_KeyValueMetadata) < (0)) __PYX_ERR(1, 2283, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_KeyValueMetadata, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_KeyValueMetadata) < (0)) __PYX_ERR(1, 2283, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_KeyValueMetadata->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_KeyValueMetadata->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_KeyValueMetadata, __pyx_base.__pyx_base.__weakref__);
  #endif
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "pyarrow/types.pxi":2335
 *         return self.wrapped
 * 
 *     def equals(self, KeyValueMetadata other):             # <<<<<<<<<<<<<<
 *         """
 *         Parameters
*/
  __pyx_t_21 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_16KeyValueMetadata_3equals, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_KeyValueMetadata_equals, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[162])); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 2335, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_21);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_KeyValueMetadata, __pyx_mstate_global->__pyx_n_u_equals, __pyx_t_21) < (0)) __PYX_ERR(1, 2335, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "pyarrow/types.pxi":2380
 *         return self.keys()
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         return KeyValueMetadata, (list(self.items()),)
 * 
*/
  __pyx_t_21 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_16KeyValueMetadata_19__reduce__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_KeyValueMetadata___reduce, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[163])); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 2380, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_21);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_KeyValueMetadata, __pyx_mstate_global->__pyx_n_u_reduce, __pyx_t_21) < (0)) __PYX_ERR(1, 2380, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "pyarrow/types.pxi":2383
 *         return KeyValueMetadata, (list(self.items()),)
 * 
 *     def key(self, i):             # <<<<<<<<<<<<<<
 *         """
 *         Parameters
*/
  __pyx_t_21 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_16KeyValueMetadata_21key, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_KeyValueMetadata_key, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[164])); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 2383, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_21);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_KeyValueMetadata, __pyx_mstate_global->__pyx_n_u_key, __pyx_t_21) < (0)) __PYX_ERR(1, 2383, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "pyarrow/types.pxi":2395
 *         return self.metadata.key(i)
 * 
 *     def value(self, i):             # <<<<<<<<<<<<<<
 *         """
 *         Parameters
*/
  __pyx_t_21 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_16KeyValueMetadata_23value, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_KeyValueMetadata_value, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[165])); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 2395, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_21);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_KeyValueMetadata, __pyx_mstate_global->__pyx_n_u_value, __pyx_t_21) < (0)) __PYX_ERR(1, 2395, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "pyarrow/types.pxi":2407
 *         return self.metadata.value(i)
 * 
 *     def keys(self):             # <<<<<<<<<<<<<<
 *         for i in range(self.metadata.size()):
 *             yield self.metadata.key(i)
*/
  __pyx_t_21 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_16KeyValueMetadata_25keys, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_KeyValueMetadata_keys, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[3])); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 2407, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_21);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_KeyValueMetadata, __pyx_mstate_global->__pyx_n_u_keys, __pyx_t_21) < (0)) __PYX_ERR(1, 2407, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "pyarrow/types.pxi":2411
 *             yield self.metadata.key(i)
 * 
 *     def values(self):             # <<<<<<<<<<<<<<
 *         for i in range(self.metadata.size()):
 *             yield self.metadata.value(i)
*/
  __pyx_t_21 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_16KeyValueMetadata_28values, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_KeyValueMetadata_values, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[4])); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 2411, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_21);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_KeyValueMetadata, __pyx_mstate_global->__pyx_n_u_values, __pyx_t_21) < (0)) __PYX_ERR(1, 2411, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "pyarrow/types.pxi":2415
 *             yield self.metadata.value(i)
 * 
 *     def items(self):             # <<<<<<<<<<<<<<
 *         for i in range(self.metadata.size()):
 *             yield (self.metadata.key(i), self.metadata.value(i))
*/
  __pyx_t_21 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_16KeyValueMetadata_31items, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_KeyValueMetadata_items, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[5])); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 2415, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_21);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_KeyValueMetadata, __pyx_mstate_global->__pyx_n_u_items, __pyx_t_21) < (0)) __PYX_ERR(1, 2415, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "pyarrow/types.pxi":2419
 *             yield (self.metadata.key(i), self.metadata.value(i))
 * 
 *     def get_all(self, key):             # <<<<<<<<<<<<<<
 *         """
 *         Parameters
*/
  __pyx_t_21 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_16KeyValueMetadata_34get_all, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_KeyValueMetadata_get_all, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[166])); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 2419, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_21);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_KeyValueMetadata, __pyx_mstate_global->__pyx_n_u_get_all, __pyx_t_21) < (0)) __PYX_ERR(1, 2419, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "pyarrow/types.pxi":2432
 *         return [v for k, v in self.items() if k == key]
 * 
 *     def to_dict(self):             # <<<<<<<<<<<<<<
 *         """
 *         Convert KeyValueMetadata to dict. If a key occurs twice, the value for
*/
  __pyx_t_21 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_16KeyValueMetadata_36to_dict, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_KeyValueMetadata_to_dict, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[167])); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 2432, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_21);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_KeyValueMetadata, __pyx_mstate_global->__pyx_n_u_to_dict, __pyx_t_21) < (0)) __PYX_ERR(1, 2432, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "pyarrow/types.pxi":2446
 * 
 * 
 * cpdef KeyValueMetadata ensure_metadata(object meta, c_bool allow_none=False):             # <<<<<<<<<<<<<<
 *     if allow_none and meta is None:
 *         return None
*/
  __pyx_t_21 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_67ensure_metadata, 0, __pyx_mstate_global->__pyx_n_u_ensure_metadata, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[168])); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 2446, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_21);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_21, __pyx_mstate_global->__pyx_tuple[21]);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_ensure_metadata, __pyx_t_21) < (0)) __PYX_ERR(1, 2446, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "pyarrow/types.pxi":2497
 *         self.type = pyarrow_wrap_data_type(field.get().type())
 * 
 *     def equals(self, Field other, bint check_metadata=False):             # <<<<<<<<<<<<<<
 *         """
 *         Test if this field is equal to the other
*/
  __pyx_t_21 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_5Field_5equals, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Field_equals, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[169])); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 2497, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_21);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_21, __pyx_mstate_global->__pyx_tuple[21]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Field, __pyx_mstate_global->__pyx_n_u_equals, __pyx_t_21) < (0)) __PYX_ERR(1, 2497, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "pyarrow/types.pxi":2529
 *             return NotImplemented
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         return field, (self.name, self.type, self.nullable, self.metadata)
 * 
*/
  __pyx_t_21 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_5Field_9__reduce__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Field___reduce, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[170])); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 2529, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_21);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Field, __pyx_mstate_global->__pyx_n_u_reduce, __pyx_t_21) < (0)) __PYX_ERR(1, 2529, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "pyarrow/types.pxi":2595
 *             return wrapped
 * 
 *     def with_metadata(self, metadata):             # <<<<<<<<<<<<<<
 *         """
 *         Add metadata as dict of string keys and values to Field
*/
  __pyx_t_21 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_5Field_17with_metadata, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Field_with_metadata, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[171])); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 2595, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_21);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Field, __pyx_mstate_global->__pyx_n_u_with_metadata, __pyx_t_21) < (0)) __PYX_ERR(1, 2595, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "pyarrow/types.pxi":2629
 *         return pyarrow_wrap_field(c_field)
 * 
 *     def remove_metadata(self):             # <<<<<<<<<<<<<<
 *         """
 *         Create new field without metadata, if any
*/
  __pyx_t_21 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_5Field_19remove_metadata, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Field_remove_metadata, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[172])); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 2629, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_21);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Field, __pyx_mstate_global->__pyx_n_u_remove_metadata, __pyx_t_21) < (0)) __PYX_ERR(1, 2629, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "pyarrow/types.pxi":2655
 *         return pyarrow_wrap_field(new_field)
 * 
 *     def with_type(self, DataType new_type):             # <<<<<<<<<<<<<<
 *         """
 *         A copy of this field with the replaced type
*/
  __pyx_t_21 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_5Field_21with_type, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Field_with_type, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[173])); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 2655, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_21);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Field, __pyx_mstate_global->__pyx_n_u_with_type, __pyx_t_21) < (0)) __PYX_ERR(1, 2655, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "pyarrow/types.pxi":2690
 *         return pyarrow_wrap_field(c_field)
 * 
 *     def with_name(self, name):             # <<<<<<<<<<<<<<
 *         """
 *         A copy of this field with the replaced name
*/
  __pyx_t_21 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_5Field_23with_name, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Field_with_name, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[174])); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 2690, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_21);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Field, __pyx_mstate_global->__pyx_n_u_with_name, __pyx_t_21) < (0)) __PYX_ERR(1, 2690, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "pyarrow/types.pxi":2722
 *         return pyarrow_wrap_field(c_field)
 * 
 *     def with_nullable(self, nullable):             # <<<<<<<<<<<<<<
 *         """
 *         A copy of this field with the replaced nullability
*/
  __pyx_t_21 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_5Field_25with_nullable, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Field_with_nullable, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[175])); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 2722, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_21);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Field, __pyx_mstate_global->__pyx_n_u_with_nullable, __pyx_t_21) < (0)) __PYX_ERR(1, 2722, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "pyarrow/types.pxi":2761
 *         return pyarrow_wrap_field(c_field)
 * 
 *     def flatten(self):             # <<<<<<<<<<<<<<
 *         """
 *         Flatten this field.  If a struct field, individual child fields
*/
  __pyx_t_21 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_5Field_27flatten, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Field_flatten, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[176])); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 2761, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_21);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Field, __pyx_mstate_global->__pyx_n_u_flatten, __pyx_t_21) < (0)) __PYX_ERR(1, 2761, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "pyarrow/types.pxi":2789
 *         return [pyarrow_wrap_field(f) for f in flattened]
 * 
 *     def _export_to_c(self, out_ptr):             # <<<<<<<<<<<<<<
 *         """
 *         Export to a C ArrowSchema struct, given its pointer.
*/
  __pyx_t_21 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_5Field_29_export_to_c, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Field__export_to_c, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[177])); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 2789, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_21);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Field, __pyx_mstate_global->__pyx_n_u_export_to_c, __pyx_t_21) < (0)) __PYX_ERR(1, 2789, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "pyarrow/types.pxi":2800
 *                                  <ArrowSchema*> _as_c_pointer(out_ptr)))
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def _import_from_c(in_ptr):
 *         """
*/
  __pyx_t_21 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_5Field_31_import_from_c, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Field__import_from_c, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[178])); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 2800, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_21);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Field, __pyx_mstate_global->__pyx_n_u_import_from_c, __pyx_t_21) < (0)) __PYX_ERR(1, 2800, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
  __pyx_t_22 = NULL;
  __Pyx_GetNameInClass(__pyx_t_8, (PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Field, __pyx_mstate_global->__pyx_n_u_import_from_c); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2800, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_10 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_22, __pyx_t_8};
    __pyx_t_21 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_staticmethod, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_22); __pyx_t_22 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 2800, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_21);
  }
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Field, __pyx_mstate_global->__pyx_n_u_import_from_c, __pyx_t_21) < (0)) __PYX_ERR(1, 2800, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "pyarrow/types.pxi":2812
 *         return pyarrow_wrap_field(result)
 * 
 *     def __arrow_c_schema__(self):             # <<<<<<<<<<<<<<
 *         """
 *         Export to a ArrowSchema PyCapsule
*/
  __pyx_t_21 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_5Field_33__arrow_c_schema__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Field___arrow_c_schema, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[179])); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 2812, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_21);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Field, __pyx_mstate_global->__pyx_n_u_arrow_c_schema, __pyx_t_21) < (0)) __PYX_ERR(1, 2812, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "pyarrow/types.pxi":2826
 *         return capsule
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def _import_from_c_capsule(schema):
 *         """
*/
  __pyx_t_21 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_5Field_35_import_from_c_capsule, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Field__import_from_c_capsule, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[180])); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 2826, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_21);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Field, __pyx_mstate_global->__pyx_n_u_import_from_c_capsule, __pyx_t_21) < (0)) __PYX_ERR(1, 2826, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
  __pyx_t_8 = NULL;
  __Pyx_GetNameInClass(__pyx_t_22, (PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Field, __pyx_mstate_global->__pyx_n_u_import_from_c_capsule); if (unlikely(!__pyx_t_22)) __PYX_ERR(1, 2826, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);
  __pyx_t_10 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_22};
    __pyx_t_21 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_staticmethod, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
    if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 2826, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_21);
  }
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Field, __pyx_mstate_global->__pyx_n_u_import_from_c_capsule, __pyx_t_21) < (0)) __PYX_ERR(1, 2826, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "pyarrow/types.pxi":2917
 *         self.sp_schema = schema
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         return schema, (list(self), self.metadata)
 * 
*/
  __pyx_t_21 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_6Schema_12__reduce__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Schema___reduce, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[181])); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 2917, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_21);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Schema, __pyx_mstate_global->__pyx_n_u_reduce, __pyx_t_21) < (0)) __PYX_ERR(1, 2917, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "pyarrow/types.pxi":2924
 *         return hash((tuple(self), metadata))
 * 
 *     def __sizeof__(self):             # <<<<<<<<<<<<<<
 *         size = 0
 *         if self.metadata:
*/
  __pyx_t_21 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_6Schema_16__sizeof__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Schema___sizeof, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[182])); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 2924, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_21);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Schema, __pyx_mstate_global->__pyx_n_u_sizeof, __pyx_t_21) < (0)) __PYX_ERR(1, 2924, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "pyarrow/types.pxi":3044
 *             return NotImplemented
 * 
 *     def empty_table(self):             # <<<<<<<<<<<<<<
 *         """
 *         Provide an empty table according to the schema.
*/
  __pyx_t_21 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_6Schema_20empty_table, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Schema_empty_table, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[183])); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 3044, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_21);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Schema, __pyx_mstate_global->__pyx_n_u_empty_table, __pyx_t_21) < (0)) __PYX_ERR(1, 3044, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "pyarrow/types.pxi":3072
 *         return Table.from_arrays(arrays, schema=self)
 * 
 *     def equals(self, Schema other not None, bint check_metadata=False):             # <<<<<<<<<<<<<<
 *         """
 *         Test if this schema is equal to the other
*/
  __pyx_t_21 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_6Schema_22equals, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Schema_equals, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[184])); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 3072, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_21);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_21, __pyx_mstate_global->__pyx_tuple[21]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Schema, __pyx_mstate_global->__pyx_n_u_equals, __pyx_t_21) < (0)) __PYX_ERR(1, 3072, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "pyarrow/types.pxi":3111
 *                                            check_metadata)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def from_pandas(cls, df, preserve_index=None):
 *         """
*/
  __pyx_t_21 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_6Schema_24from_pandas, __Pyx_CYFUNCTION_CLASSMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Schema_from_pandas, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[185])); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 3111, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_21);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_21, __pyx_mstate_global->__pyx_tuple[7]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Schema, __pyx_mstate_global->__pyx_n_u_from_pandas, __pyx_t_21) < (0)) __PYX_ERR(1, 3111, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
  __Pyx_GetNameInClass(__pyx_t_21, (PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Schema, __pyx_mstate_global->__pyx_n_u_from_pandas); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 3111, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  __pyx_t_22 = __Pyx_Method_ClassMethod(__pyx_t_21); if (unlikely(!__pyx_t_22)) __PYX_ERR(1, 3111, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Schema, __pyx_mstate_global->__pyx_n_u_from_pandas, __pyx_t_22) < (0)) __PYX_ERR(1, 3111, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;

  /* "pyarrow/types.pxi":3157
 *         return schema(fields, metadata)
 * 
 *     def field(self, i):             # <<<<<<<<<<<<<<
 *         """
 *         Select a field by its column name or numeric index.
*/
  __pyx_t_22 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_6Schema_26field, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Schema_field, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[186])); if (unlikely(!__pyx_t_22)) __PYX_ERR(1, 3157, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_22);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Schema, __pyx_mstate_global->__pyx_n_u_field, __pyx_t_22) < (0)) __PYX_ERR(1, 3157, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;

  /* "pyarrow/types.pxi":3197
 *             raise TypeError("Index must either be string or integer")
 * 
 *     def _field(self, int i):             # <<<<<<<<<<<<<<
 *         """
 *         Select a field by its numeric index.
*/
  __pyx_t_22 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_6Schema_28_field, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Schema__field, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[187])); if (unlikely(!__pyx_t_22)) __PYX_ERR(1, 3197, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_22);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Schema, __pyx_mstate_global->__pyx_n_u_field_2, __pyx_t_22) < (0)) __PYX_ERR(1, 3197, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;

  /* "pyarrow/types.pxi":3212
 *         return pyarrow_wrap_field(self.schema.field(index))
 * 
 *     def field_by_name(self, name):             # <<<<<<<<<<<<<<
 *         """
 *         DEPRECATED
*/
  __pyx_t_22 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_6Schema_30field_by_name, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Schema_field_by_name, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[188])); if (unlikely(!__pyx_t_22)) __PYX_ERR(1, 3212, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_22);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Schema, __pyx_mstate_global->__pyx_n_u_field_by_name, __pyx_t_22) < (0)) __PYX_ERR(1, 3212, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;

  /* "pyarrow/types.pxi":3241
 *             return pyarrow_wrap_field(results[0])
 * 
 *     def get_field_index(self, name):             # <<<<<<<<<<<<<<
 *         """
 *         Return index of the unique field with the given name.
*/
  __pyx_t_22 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_6Schema_32get_field_index, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Schema_get_field_index, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[189])); if (unlikely(!__pyx_t_22)) __PYX_ERR(1, 3241, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_22);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Schema, __pyx_mstate_global->__pyx_n_u_get_field_index, __pyx_t_22) < (0)) __PYX_ERR(1, 3241, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;

  /* "pyarrow/types.pxi":3281
 *         return self.schema.GetFieldIndex(tobytes(name))
 * 
 *     def get_all_field_indices(self, name):             # <<<<<<<<<<<<<<
 *         """
 *         Return sorted list of indices for the fields with the given name.
*/
  __pyx_t_22 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_6Schema_34get_all_field_indices, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Schema_get_all_field_indices, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[190])); if (unlikely(!__pyx_t_22)) __PYX_ERR(1, 3281, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_22);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Schema, __pyx_mstate_global->__pyx_n_u_get_all_field_indices, __pyx_t_22) < (0)) __PYX_ERR(1, 3281, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;

  /* "pyarrow/types.pxi":3309
 *         return self.schema.GetAllFieldIndices(tobytes(name))
 * 
 *     def append(self, Field field):             # <<<<<<<<<<<<<<
 *         """
 *         Append a field at the end of the schema.
*/
  __pyx_t_22 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_6Schema_36append, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Schema_append, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[191])); if (unlikely(!__pyx_t_22)) __PYX_ERR(1, 3309, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_22);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Schema, __pyx_mstate_global->__pyx_n_u_append, __pyx_t_22) < (0)) __PYX_ERR(1, 3309, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;

  /* "pyarrow/types.pxi":3348
 *         return self.insert(self.schema.num_fields(), field)
 * 
 *     def insert(self, int i, Field field):             # <<<<<<<<<<<<<<
 *         """
 *         Add a field at position i to the schema.
*/
  __pyx_t_22 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_6Schema_38insert, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Schema_insert, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[192])); if (unlikely(!__pyx_t_22)) __PYX_ERR(1, 3348, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_22);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Schema, __pyx_mstate_global->__pyx_n_u_insert, __pyx_t_22) < (0)) __PYX_ERR(1, 3348, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;

  /* "pyarrow/types.pxi":3386
 *         return pyarrow_wrap_schema(new_schema)
 * 
 *     def remove(self, int i):             # <<<<<<<<<<<<<<
 *         """
 *         Remove the field at index i from the schema.
*/
  __pyx_t_22 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_6Schema_40remove, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Schema_remove, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[193])); if (unlikely(!__pyx_t_22)) __PYX_ERR(1, 3386, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_22);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Schema, __pyx_mstate_global->__pyx_n_u_remove, __pyx_t_22) < (0)) __PYX_ERR(1, 3386, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;

  /* "pyarrow/types.pxi":3417
 *         return pyarrow_wrap_schema(new_schema)
 * 
 *     def set(self, int i, Field field):             # <<<<<<<<<<<<<<
 *         """
 *         Replace a field at position i in the schema.
*/
  __pyx_t_22 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_6Schema_42set, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Schema_set, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[194])); if (unlikely(!__pyx_t_22)) __PYX_ERR(1, 3417, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_22);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Schema, __pyx_mstate_global->__pyx_n_u_set, __pyx_t_22) < (0)) __PYX_ERR(1, 3417, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;

  /* "pyarrow/types.pxi":3454
 *         return pyarrow_wrap_schema(new_schema)
 * 
 *     def add_metadata(self, metadata):             # <<<<<<<<<<<<<<
 *         """
 *         DEPRECATED
*/
  __pyx_t_22 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_6Schema_44add_metadata, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Schema_add_metadata, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[195])); if (unlikely(!__pyx_t_22)) __PYX_ERR(1, 3454, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_22);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Schema, __pyx_mstate_global->__pyx_n_u_add_metadata, __pyx_t_22) < (0)) __PYX_ERR(1, 3454, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;

  /* "pyarrow/types.pxi":3467
 *         return self.with_metadata(metadata)
 * 
 *     def with_metadata(self, metadata):             # <<<<<<<<<<<<<<
 *         """
 *         Add metadata as dict of string keys and values to Schema
*/
  __pyx_t_22 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_6Schema_46with_metadata, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Schema_with_metadata, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[196])); if (unlikely(!__pyx_t_22)) __PYX_ERR(1, 3467, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_22);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Schema, __pyx_mstate_global->__pyx_n_u_with_metadata, __pyx_t_22) < (0)) __PYX_ERR(1, 3467, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;

  /* "pyarrow/types.pxi":3503
 *         return pyarrow_wrap_schema(c_schema)
 * 
 *     def serialize(self, memory_pool=None):             # <<<<<<<<<<<<<<
 *         """
 *         Write Schema to Buffer as encapsulated IPC message
*/
  __pyx_t_22 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_6Schema_48serialize, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Schema_serialize, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[197])); if (unlikely(!__pyx_t_22)) __PYX_ERR(1, 3503, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_22);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_22, __pyx_mstate_global->__pyx_tuple[7]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Schema, __pyx_mstate_global->__pyx_n_u_serialize, __pyx_t_22) < (0)) __PYX_ERR(1, 3503, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;

  /* "pyarrow/types.pxi":3537
 *         return pyarrow_wrap_buffer(buffer)
 * 
 *     def remove_metadata(self):             # <<<<<<<<<<<<<<
 *         """
 *         Create new schema without metadata, if any
*/
  __pyx_t_22 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_6Schema_50remove_metadata, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Schema_remove_metadata, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[198])); if (unlikely(!__pyx_t_22)) __PYX_ERR(1, 3537, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_22);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Schema, __pyx_mstate_global->__pyx_n_u_remove_metadata, __pyx_t_22) < (0)) __PYX_ERR(1, 3537, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;

  /* "pyarrow/types.pxi":3569
 *         return pyarrow_wrap_schema(new_schema)
 * 
 *     def to_string(self, truncate_metadata=True, show_field_metadata=True,             # <<<<<<<<<<<<<<
 *                   show_schema_metadata=True, element_size_limit=100):
 *         """
*/
  __pyx_t_22 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_6Schema_52to_string, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Schema_to_string, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[199])); if (unlikely(!__pyx_t_22)) __PYX_ERR(1, 3569, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_22);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_22, __pyx_mstate_global->__pyx_tuple[22]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Schema, __pyx_mstate_global->__pyx_n_u_to_string, __pyx_t_22) < (0)) __PYX_ERR(1, 3569, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;

  /* "pyarrow/types.pxi":3611
 *         return frombytes(result, safe=True)
 * 
 *     def _export_to_c(self, out_ptr):             # <<<<<<<<<<<<<<
 *         """
 *         Export to a C ArrowSchema struct, given its pointer.
*/
  __pyx_t_22 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_6Schema_54_export_to_c, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Schema__export_to_c, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[200])); if (unlikely(!__pyx_t_22)) __PYX_ERR(1, 3611, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_22);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Schema, __pyx_mstate_global->__pyx_n_u_export_to_c, __pyx_t_22) < (0)) __PYX_ERR(1, 3611, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;

  /* "pyarrow/types.pxi":3622
 *                                   <ArrowSchema*> _as_c_pointer(out_ptr)))
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def _import_from_c(in_ptr):
 *         """
*/
  __pyx_t_22 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_6Schema_56_import_from_c, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Schema__import_from_c, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[201])); if (unlikely(!__pyx_t_22)) __PYX_ERR(1, 3622, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_22);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Schema, __pyx_mstate_global->__pyx_n_u_import_from_c, __pyx_t_22) < (0)) __PYX_ERR(1, 3622, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
  __pyx_t_21 = NULL;
  __Pyx_GetNameInClass(__pyx_t_8, (PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Schema, __pyx_mstate_global->__pyx_n_u_import_from_c); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 3622, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_10 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_21, __pyx_t_8};
    __pyx_t_22 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_staticmethod, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_22)) __PYX_ERR(1, 3622, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_22);
  }
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Schema, __pyx_mstate_global->__pyx_n_u_import_from_c, __pyx_t_22) < (0)) __PYX_ERR(1, 3622, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;

  /* "pyarrow/types.pxi":3640
 *         return self.__str__()
 * 
 *     def __arrow_c_schema__(self):             # <<<<<<<<<<<<<<
 *         """
 *         Export to a ArrowSchema PyCapsule
*/
  __pyx_t_22 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_6Schema_62__arrow_c_schema__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Schema___arrow_c_schema, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[202])); if (unlikely(!__pyx_t_22)) __PYX_ERR(1, 3640, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_22);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Schema, __pyx_mstate_global->__pyx_n_u_arrow_c_schema, __pyx_t_22) < (0)) __PYX_ERR(1, 3640, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;

  /* "pyarrow/types.pxi":3654
 *         return capsule
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def _import_from_c_capsule(schema):
 *         """
*/
  __pyx_t_22 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_6Schema_64_import_from_c_capsule, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Schema__import_from_c_capsule, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[203])); if (unlikely(!__pyx_t_22)) __PYX_ERR(1, 3654, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_22);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Schema, __pyx_mstate_global->__pyx_n_u_import_from_c_capsule, __pyx_t_22) < (0)) __PYX_ERR(1, 3654, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
  __pyx_t_8 = NULL;
  __Pyx_GetNameInClass(__pyx_t_21, (PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Schema, __pyx_mstate_global->__pyx_n_u_import_from_c_capsule); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 3654, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  __pyx_t_10 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_21};
    __pyx_t_22 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_staticmethod, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
    if (unlikely(!__pyx_t_22)) __PYX_ERR(1, 3654, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_22);
  }
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Schema, __pyx_mstate_global->__pyx_n_u_import_from_c_capsule, __pyx_t_22) < (0)) __PYX_ERR(1, 3654, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;

  /* "pyarrow/types.pxi":3693
 * 
 * 
 * def unify_schemas(schemas, *, promote_options="default"):             # <<<<<<<<<<<<<<
 *     """
 *     Unify schemas by merging fields by name.
*/
  __pyx_t_22 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_22)) __PYX_ERR(1, 3693, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);
  if (PyDict_SetItem(__pyx_t_22, __pyx_mstate_global->__pyx_n_u_promote_options, ((PyObject*)__pyx_mstate_global->__pyx_n_u_default)) < (0)) __PYX_ERR(1, 3693, __pyx_L1_error)
  __pyx_t_21 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_69unify_schemas, 0, __pyx_mstate_global->__pyx_n_u_unify_schemas, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[204])); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 3693, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_21);
  #endif
  __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_21, __pyx_t_22);
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_unify_schemas, __pyx_t_21) < (0)) __PYX_ERR(1, 3693, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "pyarrow/types.pxi":3743
 * 
 * 
 * cdef dict _type_cache = {}             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_t_21 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 3743, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  __Pyx_XGOTREF(__pyx_v_7pyarrow_3lib__type_cache);
  __Pyx_DECREF_SET(__pyx_v_7pyarrow_3lib__type_cache, ((PyObject*)__pyx_t_21));
  __Pyx_GIVEREF(__pyx_t_21);
  __pyx_t_21 = 0;

  /* "pyarrow/types.pxi":3761
 * 
 * 
 * def field(name, type=None, nullable=None, metadata=None):             # <<<<<<<<<<<<<<
 *     """
 *     Create a pyarrow.Field instance.
*/
  __pyx_t_21 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_71field, 0, __pyx_mstate_global->__pyx_n_u_field, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[205])); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 3761, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_21);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_21, __pyx_mstate_global->__pyx_tuple[0]);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_field, __pyx_t_21) < (0)) __PYX_ERR(1, 3761, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "pyarrow/types.pxi":3845
 * 
 * cdef set PRIMITIVE_TYPES = set([
 *     _Type_NA, _Type_BOOL,             # <<<<<<<<<<<<<<
 *     _Type_UINT8, _Type_INT8,
 *     _Type_UINT16, _Type_INT16,
*/
  __pyx_t_21 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::NA); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 3845, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  __pyx_t_22 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::BOOL); if (unlikely(!__pyx_t_22)) __PYX_ERR(1, 3845, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);

  /* "pyarrow/types.pxi":3846
 * cdef set PRIMITIVE_TYPES = set([
 *     _Type_NA, _Type_BOOL,
 *     _Type_UINT8, _Type_INT8,             # <<<<<<<<<<<<<<
 *     _Type_UINT16, _Type_INT16,
 *     _Type_UINT32, _Type_INT32,
*/
  __pyx_t_8 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::UINT8); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 3846, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_5 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::INT8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 3846, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "pyarrow/types.pxi":3847
 *     _Type_NA, _Type_BOOL,
 *     _Type_UINT8, _Type_INT8,
 *     _Type_UINT16, _Type_INT16,             # <<<<<<<<<<<<<<
 *     _Type_UINT32, _Type_INT32,
 *     _Type_UINT64, _Type_INT64,
*/
  __pyx_t_19 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::UINT16); if (unlikely(!__pyx_t_19)) __PYX_ERR(1, 3847, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __pyx_t_18 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::INT16); if (unlikely(!__pyx_t_18)) __PYX_ERR(1, 3847, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);

  /* "pyarrow/types.pxi":3848
 *     _Type_UINT8, _Type_INT8,
 *     _Type_UINT16, _Type_INT16,
 *     _Type_UINT32, _Type_INT32,             # <<<<<<<<<<<<<<
 *     _Type_UINT64, _Type_INT64,
 *     _Type_TIMESTAMP, _Type_DATE32,
*/
  __pyx_t_20 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::UINT32); if (unlikely(!__pyx_t_20)) __PYX_ERR(1, 3848, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_20);
  __pyx_t_2 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::INT32); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3848, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "pyarrow/types.pxi":3849
 *     _Type_UINT16, _Type_INT16,
 *     _Type_UINT32, _Type_INT32,
 *     _Type_UINT64, _Type_INT64,             # <<<<<<<<<<<<<<
 *     _Type_TIMESTAMP, _Type_DATE32,
 *     _Type_TIME32, _Type_TIME64,
*/
  __pyx_t_9 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::UINT64); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 3849, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_17 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::INT64); if (unlikely(!__pyx_t_17)) __PYX_ERR(1, 3849, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_17);

  /* "pyarrow/types.pxi":3850
 *     _Type_UINT32, _Type_INT32,
 *     _Type_UINT64, _Type_INT64,
 *     _Type_TIMESTAMP, _Type_DATE32,             # <<<<<<<<<<<<<<
 *     _Type_TIME32, _Type_TIME64,
 *     _Type_DATE64,
*/
  __pyx_t_16 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::TIMESTAMP); if (unlikely(!__pyx_t_16)) __PYX_ERR(1, 3850, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_16);
  __pyx_t_15 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::DATE32); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 3850, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);

  /* "pyarrow/types.pxi":3851
 *     _Type_UINT64, _Type_INT64,
 *     _Type_TIMESTAMP, _Type_DATE32,
 *     _Type_TIME32, _Type_TIME64,             # <<<<<<<<<<<<<<
 *     _Type_DATE64,
 *     _Type_HALF_FLOAT,
*/
  __pyx_t_14 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::TIME32); if (unlikely(!__pyx_t_14)) __PYX_ERR(1, 3851, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __pyx_t_13 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::TIME64); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 3851, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);

  /* "pyarrow/types.pxi":3852
 *     _Type_TIMESTAMP, _Type_DATE32,
 *     _Type_TIME32, _Type_TIME64,
 *     _Type_DATE64,             # <<<<<<<<<<<<<<
 *     _Type_HALF_FLOAT,
 *     _Type_FLOAT,
*/
  __pyx_t_12 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::DATE64); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 3852, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);

  /* "pyarrow/types.pxi":3853
 *     _Type_TIME32, _Type_TIME64,
 *     _Type_DATE64,
 *     _Type_HALF_FLOAT,             # <<<<<<<<<<<<<<
 *     _Type_FLOAT,
 *     _Type_DOUBLE])
*/
  __pyx_t_7 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::HALF_FLOAT); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 3853, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);

  /* "pyarrow/types.pxi":3854
 *     _Type_DATE64,
 *     _Type_HALF_FLOAT,
 *     _Type_FLOAT,             # <<<<<<<<<<<<<<
 *     _Type_DOUBLE])
 * 
*/
  __pyx_t_4 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::FLOAT); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3854, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "pyarrow/types.pxi":3855
 *     _Type_HALF_FLOAT,
 *     _Type_FLOAT,
 *     _Type_DOUBLE])             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_t_6 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::DOUBLE); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 3855, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_28 = PySet_New(0); if (unlikely(!__pyx_t_28)) __PYX_ERR(1, 3844, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  if (PySet_Add(__pyx_t_28, __pyx_t_21) < (0)) __PYX_ERR(1, 3844, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
  if (PySet_Add(__pyx_t_28, __pyx_t_22) < (0)) __PYX_ERR(1, 3844, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
  if (PySet_Add(__pyx_t_28, __pyx_t_8) < (0)) __PYX_ERR(1, 3844, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (PySet_Add(__pyx_t_28, __pyx_t_5) < (0)) __PYX_ERR(1, 3844, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PySet_Add(__pyx_t_28, __pyx_t_19) < (0)) __PYX_ERR(1, 3844, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  if (PySet_Add(__pyx_t_28, __pyx_t_18) < (0)) __PYX_ERR(1, 3844, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  if (PySet_Add(__pyx_t_28, __pyx_t_20) < (0)) __PYX_ERR(1, 3844, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
  if (PySet_Add(__pyx_t_28, __pyx_t_2) < (0)) __PYX_ERR(1, 3844, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PySet_Add(__pyx_t_28, __pyx_t_9) < (0)) __PYX_ERR(1, 3844, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (PySet_Add(__pyx_t_28, __pyx_t_17) < (0)) __PYX_ERR(1, 3844, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
  if (PySet_Add(__pyx_t_28, __pyx_t_16) < (0)) __PYX_ERR(1, 3844, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
  if (PySet_Add(__pyx_t_28, __pyx_t_15) < (0)) __PYX_ERR(1, 3844, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
  if (PySet_Add(__pyx_t_28, __pyx_t_14) < (0)) __PYX_ERR(1, 3844, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  if (PySet_Add(__pyx_t_28, __pyx_t_13) < (0)) __PYX_ERR(1, 3844, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  if (PySet_Add(__pyx_t_28, __pyx_t_12) < (0)) __PYX_ERR(1, 3844, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  if (PySet_Add(__pyx_t_28, __pyx_t_7) < (0)) __PYX_ERR(1, 3844, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (PySet_Add(__pyx_t_28, __pyx_t_4) < (0)) __PYX_ERR(1, 3844, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PySet_Add(__pyx_t_28, __pyx_t_6) < (0)) __PYX_ERR(1, 3844, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_XGOTREF(__pyx_v_7pyarrow_3lib_PRIMITIVE_TYPES);
  __Pyx_DECREF_SET(__pyx_v_7pyarrow_3lib_PRIMITIVE_TYPES, ((PyObject*)__pyx_t_28));
  __Pyx_GIVEREF(__pyx_t_28);
  __pyx_t_28 = 0;

  /* "pyarrow/types.pxi":3858
 * 
 * 
 * def null():             # <<<<<<<<<<<<<<
 *     """
 *     Create instance of null type.
*/
  __pyx_t_28 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_73null, 0, __pyx_mstate_global->__pyx_n_u_null, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[206])); if (unlikely(!__pyx_t_28)) __PYX_ERR(1, 3858, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_28);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_null, __pyx_t_28) < (0)) __PYX_ERR(1, 3858, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;

  /* "pyarrow/types.pxi":3880
 * 
 * 
 * def bool_():             # <<<<<<<<<<<<<<
 *     """
 *     Create instance of boolean type.
*/
  __pyx_t_28 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_75bool_, 0, __pyx_mstate_global->__pyx_n_u_bool, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[207])); if (unlikely(!__pyx_t_28)) __PYX_ERR(1, 3880, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_28);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_bool, __pyx_t_28) < (0)) __PYX_ERR(1, 3880, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;

  /* "pyarrow/types.pxi":3903
 * 
 * 
 * def uint8():             # <<<<<<<<<<<<<<
 *     """
 *     Create instance of unsigned int8 type.
*/
  __pyx_t_28 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_77uint8, 0, __pyx_mstate_global->__pyx_n_u_uint8, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[208])); if (unlikely(!__pyx_t_28)) __PYX_ERR(1, 3903, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_28);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_uint8, __pyx_t_28) < (0)) __PYX_ERR(1, 3903, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;

  /* "pyarrow/types.pxi":3930
 * 
 * 
 * def int8():             # <<<<<<<<<<<<<<
 *     """
 *     Create instance of signed int8 type.
*/
  __pyx_t_28 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_79int8, 0, __pyx_mstate_global->__pyx_n_u_int8, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[209])); if (unlikely(!__pyx_t_28)) __PYX_ERR(1, 3930, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_28);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_int8, __pyx_t_28) < (0)) __PYX_ERR(1, 3930, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;

  /* "pyarrow/types.pxi":3957
 * 
 * 
 * def uint16():             # <<<<<<<<<<<<<<
 *     """
 *     Create instance of unsigned uint16 type.
*/
  __pyx_t_28 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_81uint16, 0, __pyx_mstate_global->__pyx_n_u_uint16, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[210])); if (unlikely(!__pyx_t_28)) __PYX_ERR(1, 3957, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_28);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_uint16, __pyx_t_28) < (0)) __PYX_ERR(1, 3957, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;

  /* "pyarrow/types.pxi":3984
 * 
 * 
 * def int16():             # <<<<<<<<<<<<<<
 *     """
 *     Create instance of signed int16 type.
*/
  __pyx_t_28 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_83int16, 0, __pyx_mstate_global->__pyx_n_u_int16, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[211])); if (unlikely(!__pyx_t_28)) __PYX_ERR(1, 3984, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_28);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_int16, __pyx_t_28) < (0)) __PYX_ERR(1, 3984, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;

  /* "pyarrow/types.pxi":4011
 * 
 * 
 * def uint32():             # <<<<<<<<<<<<<<
 *     """
 *     Create instance of unsigned uint32 type.
*/
  __pyx_t_28 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_85uint32, 0, __pyx_mstate_global->__pyx_n_u_uint32, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[212])); if (unlikely(!__pyx_t_28)) __PYX_ERR(1, 4011, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_28);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_uint32, __pyx_t_28) < (0)) __PYX_ERR(1, 4011, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;

  /* "pyarrow/types.pxi":4038
 * 
 * 
 * def int32():             # <<<<<<<<<<<<<<
 *     """
 *     Create instance of signed int32 type.
*/
  __pyx_t_28 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_87int32, 0, __pyx_mstate_global->__pyx_n_u_int32, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[213])); if (unlikely(!__pyx_t_28)) __PYX_ERR(1, 4038, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_28);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_int32, __pyx_t_28) < (0)) __PYX_ERR(1, 4038, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;

  /* "pyarrow/types.pxi":4065
 * 
 * 
 * def uint64():             # <<<<<<<<<<<<<<
 *     """
 *     Create instance of unsigned uint64 type.
*/
  __pyx_t_28 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_89uint64, 0, __pyx_mstate_global->__pyx_n_u_uint64, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[214])); if (unlikely(!__pyx_t_28)) __PYX_ERR(1, 4065, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_28);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_uint64, __pyx_t_28) < (0)) __PYX_ERR(1, 4065, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;

  /* "pyarrow/types.pxi":4092
 * 
 * 
 * def int64():             # <<<<<<<<<<<<<<
 *     """
 *     Create instance of signed int64 type.
*/
  __pyx_t_28 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_91int64, 0, __pyx_mstate_global->__pyx_n_u_int64, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[215])); if (unlikely(!__pyx_t_28)) __PYX_ERR(1, 4092, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_28);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_int64, __pyx_t_28) < (0)) __PYX_ERR(1, 4092, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;

  /* "pyarrow/types.pxi":4119
 * 
 * 
 * cdef dict _timestamp_type_cache = {}             # <<<<<<<<<<<<<<
 * cdef dict _time_type_cache = {}
 * cdef dict _duration_type_cache = {}
*/
  __pyx_t_28 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_28)) __PYX_ERR(1, 4119, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  __Pyx_XGOTREF(__pyx_v_7pyarrow_3lib__timestamp_type_cache);
  __Pyx_DECREF_SET(__pyx_v_7pyarrow_3lib__timestamp_type_cache, ((PyObject*)__pyx_t_28));
  __Pyx_GIVEREF(__pyx_t_28);
  __pyx_t_28 = 0;

  /* "pyarrow/types.pxi":4120
 * 
 * cdef dict _timestamp_type_cache = {}
 * cdef dict _time_type_cache = {}             # <<<<<<<<<<<<<<
 * cdef dict _duration_type_cache = {}
 * 
*/
  __pyx_t_28 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_28)) __PYX_ERR(1, 4120, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  __Pyx_XGOTREF(__pyx_v_7pyarrow_3lib__time_type_cache);
  __Pyx_DECREF_SET(__pyx_v_7pyarrow_3lib__time_type_cache, ((PyObject*)__pyx_t_28));
  __Pyx_GIVEREF(__pyx_t_28);
  __pyx_t_28 = 0;

  /* "pyarrow/types.pxi":4121
 * cdef dict _timestamp_type_cache = {}
 * cdef dict _time_type_cache = {}
 * cdef dict _duration_type_cache = {}             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_t_28 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_28)) __PYX_ERR(1, 4121, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  __Pyx_XGOTREF(__pyx_v_7pyarrow_3lib__duration_type_cache);
  __Pyx_DECREF_SET(__pyx_v_7pyarrow_3lib__duration_type_cache, ((PyObject*)__pyx_t_28));
  __Pyx_GIVEREF(__pyx_t_28);
  __pyx_t_28 = 0;

  /* "pyarrow/types.pxi":4148
 * 
 * 
 * def tzinfo_to_string(tz):             # <<<<<<<<<<<<<<
 *     """
 *     Converts a time zone object into a string indicating the name of a time
*/
  __pyx_t_28 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_93tzinfo_to_string, 0, __pyx_mstate_global->__pyx_n_u_tzinfo_to_string, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[216])); if (unlikely(!__pyx_t_28)) __PYX_ERR(1, 4148, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_28);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_tzinfo_to_string, __pyx_t_28) < (0)) __PYX_ERR(1, 4148, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;

  /* "pyarrow/types.pxi":4169
 * 
 * 
 * def string_to_tzinfo(name):             # <<<<<<<<<<<<<<
 *     """
 *     Convert a time zone name into a time zone object.
*/
  __pyx_t_28 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_95string_to_tzinfo, 0, __pyx_mstate_global->__pyx_n_u_string_to_tzinfo, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[217])); if (unlikely(!__pyx_t_28)) __PYX_ERR(1, 4169, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_28);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_string_to_tzinfo, __pyx_t_28) < (0)) __PYX_ERR(1, 4169, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;

  /* "pyarrow/types.pxi":4192
 * 
 * 
 * def timestamp(unit, tz=None):             # <<<<<<<<<<<<<<
 *     """
 *     Create instance of timestamp type with resolution and optional time zone.
*/
  __pyx_t_28 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_97timestamp, 0, __pyx_mstate_global->__pyx_n_u_timestamp, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[218])); if (unlikely(!__pyx_t_28)) __PYX_ERR(1, 4192, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_28);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_28, __pyx_mstate_global->__pyx_tuple[7]);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_timestamp, __pyx_t_28) < (0)) __PYX_ERR(1, 4192, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;

  /* "pyarrow/types.pxi":4251
 * 
 * 
 * def time32(unit):             # <<<<<<<<<<<<<<
 *     """
 *     Create instance of 32-bit time (time of day) type with unit resolution.
*/
  __pyx_t_28 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_99time32, 0, __pyx_mstate_global->__pyx_n_u_time32, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[219])); if (unlikely(!__pyx_t_28)) __PYX_ERR(1, 4251, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_28);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_time32, __pyx_t_28) < (0)) __PYX_ERR(1, 4251, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;

  /* "pyarrow/types.pxi":4294
 * 
 * 
 * def time64(unit):             # <<<<<<<<<<<<<<
 *     """
 *     Create instance of 64-bit time (time of day) type with unit resolution.
*/
  __pyx_t_28 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_101time64, 0, __pyx_mstate_global->__pyx_n_u_time64, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[220])); if (unlikely(!__pyx_t_28)) __PYX_ERR(1, 4294, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_28);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_time64, __pyx_t_28) < (0)) __PYX_ERR(1, 4294, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;

  /* "pyarrow/types.pxi":4337
 * 
 * 
 * def duration(unit):             # <<<<<<<<<<<<<<
 *     """
 *     Create instance of a duration type with unit resolution.
*/
  __pyx_t_28 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_103duration, 0, __pyx_mstate_global->__pyx_n_u_duration, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[221])); if (unlikely(!__pyx_t_28)) __PYX_ERR(1, 4337, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_28);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_duration, __pyx_t_28) < (0)) __PYX_ERR(1, 4337, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;

  /* "pyarrow/types.pxi":4387
 * 
 * 
 * def month_day_nano_interval():             # <<<<<<<<<<<<<<
 *     """
 *     Create instance of an interval type representing months, days and
*/
  __pyx_t_28 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_105month_day_nano_interval, 0, __pyx_mstate_global->__pyx_n_u_month_day_nano_interval, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[222])); if (unlikely(!__pyx_t_28)) __PYX_ERR(1, 4387, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_28);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_month_day_nano_interval, __pyx_t_28) < (0)) __PYX_ERR(1, 4387, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;

  /* "pyarrow/types.pxi":4408
 * 
 * 
 * def date32():             # <<<<<<<<<<<<<<
 *     """
 *     Create instance of 32-bit date (days since UNIX epoch 1970-01-01).
*/
  __pyx_t_28 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_107date32, 0, __pyx_mstate_global->__pyx_n_u_date32, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[223])); if (unlikely(!__pyx_t_28)) __PYX_ERR(1, 4408, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_28);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_date32, __pyx_t_28) < (0)) __PYX_ERR(1, 4408, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;

  /* "pyarrow/types.pxi":4429
 * 
 * 
 * def date64():             # <<<<<<<<<<<<<<
 *     """
 *     Create instance of 64-bit date (milliseconds since UNIX epoch 1970-01-01).
*/
  __pyx_t_28 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_109date64, 0, __pyx_mstate_global->__pyx_n_u_date64, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[224])); if (unlikely(!__pyx_t_28)) __PYX_ERR(1, 4429, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_28);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_date64, __pyx_t_28) < (0)) __PYX_ERR(1, 4429, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;

  /* "pyarrow/types.pxi":4450
 * 
 * 
 * def float16():             # <<<<<<<<<<<<<<
 *     """
 *     Create half-precision floating point type.
*/
  __pyx_t_28 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_111float16, 0, __pyx_mstate_global->__pyx_n_u_float16, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[225])); if (unlikely(!__pyx_t_28)) __PYX_ERR(1, 4450, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_28);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_float16, __pyx_t_28) < (0)) __PYX_ERR(1, 4450, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;

  /* "pyarrow/types.pxi":4484
 * 
 * 
 * def float32():             # <<<<<<<<<<<<<<
 *     """
 *     Create single-precision floating point type.
*/
  __pyx_t_28 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_113float32, 0, __pyx_mstate_global->__pyx_n_u_float32, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[226])); if (unlikely(!__pyx_t_28)) __PYX_ERR(1, 4484, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_28);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_float32, __pyx_t_28) < (0)) __PYX_ERR(1, 4484, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;

  /* "pyarrow/types.pxi":4511
 * 
 * 
 * def float64():             # <<<<<<<<<<<<<<
 *     """
 *     Create double-precision floating point type.
*/
  __pyx_t_28 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_115float64, 0, __pyx_mstate_global->__pyx_n_u_float64, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[227])); if (unlikely(!__pyx_t_28)) __PYX_ERR(1, 4511, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_28);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_float64, __pyx_t_28) < (0)) __PYX_ERR(1, 4511, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;

  /* "pyarrow/types.pxi":4538
 * 
 * 
 * cpdef DataType decimal32(int precision, int scale=0):             # <<<<<<<<<<<<<<
 *     """
 *     Create decimal type with precision and scale and 32-bit width.
*/
  __pyx_t_28 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_117decimal32, 0, __pyx_mstate_global->__pyx_n_u_decimal32, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[228])); if (unlikely(!__pyx_t_28)) __PYX_ERR(1, 4538, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_28);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_28, __pyx_mstate_global->__pyx_tuple[23]);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_decimal32, __pyx_t_28) < (0)) __PYX_ERR(1, 4538, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;

  /* "pyarrow/types.pxi":4593
 * 
 * 
 * cpdef DataType decimal64(int precision, int scale=0):             # <<<<<<<<<<<<<<
 *     """
 *     Create decimal type with precision and scale and 64-bit width.
*/
  __pyx_t_28 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_119decimal64, 0, __pyx_mstate_global->__pyx_n_u_decimal64, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[229])); if (unlikely(!__pyx_t_28)) __PYX_ERR(1, 4593, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_28);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_28, __pyx_mstate_global->__pyx_tuple[23]);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_decimal64, __pyx_t_28) < (0)) __PYX_ERR(1, 4593, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;

  /* "pyarrow/types.pxi":4648
 * 
 * 
 * cpdef DataType decimal128(int precision, int scale=0):             # <<<<<<<<<<<<<<
 *     """
 *     Create decimal type with precision and scale and 128-bit width.
*/
  __pyx_t_28 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_121decimal128, 0, __pyx_mstate_global->__pyx_n_u_decimal128, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[230])); if (unlikely(!__pyx_t_28)) __PYX_ERR(1, 4648, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_28);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_28, __pyx_mstate_global->__pyx_tuple[23]);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_decimal128, __pyx_t_28) < (0)) __PYX_ERR(1, 4648, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;

  /* "pyarrow/types.pxi":4703
 * 
 * 
 * cpdef DataType decimal256(int precision, int scale=0):             # <<<<<<<<<<<<<<
 *     """
 *     Create decimal type with precision and scale and 256-bit width.
*/
  __pyx_t_28 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_123decimal256, 0, __pyx_mstate_global->__pyx_n_u_decimal256, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[231])); if (unlikely(!__pyx_t_28)) __PYX_ERR(1, 4703, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_28);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_28, __pyx_mstate_global->__pyx_tuple[23]);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_decimal256, __pyx_t_28) < (0)) __PYX_ERR(1, 4703, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;

  /* "pyarrow/types.pxi":4734
 * 
 * 
 * def string():             # <<<<<<<<<<<<<<
 *     """
 *     Create UTF8 variable-length string type.
*/
  __pyx_t_28 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_125string, 0, __pyx_mstate_global->__pyx_n_u_string, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[232])); if (unlikely(!__pyx_t_28)) __PYX_ERR(1, 4734, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_28);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_string, __pyx_t_28) < (0)) __PYX_ERR(1, 4734, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;

  /* "pyarrow/types.pxi":4759
 * 
 * 
 * def utf8():             # <<<<<<<<<<<<<<
 *     """
 *     Alias for string().
*/
  __pyx_t_28 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_127utf8, 0, __pyx_mstate_global->__pyx_n_u_utf8, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[233])); if (unlikely(!__pyx_t_28)) __PYX_ERR(1, 4759, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_28);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_utf8, __pyx_t_28) < (0)) __PYX_ERR(1, 4759, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;

  /* "pyarrow/types.pxi":4784
 * 
 * 
 * def binary(int length=-1):             # <<<<<<<<<<<<<<
 *     """
 *     Create variable-length or fixed size binary type.
*/
  __pyx_t_28 = __Pyx_PyLong_From_int(((int)-1)); if (unlikely(!__pyx_t_28)) __PYX_ERR(1, 4784, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  __pyx_t_6 = PyTuple_Pack(1, __pyx_t_28); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 4784, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;
  __pyx_t_28 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_129binary, 0, __pyx_mstate_global->__pyx_n_u_binary, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[234])); if (unlikely(!__pyx_t_28)) __PYX_ERR(1, 4784, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_28);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_28, __pyx_t_6);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_binary, __pyx_t_28) < (0)) __PYX_ERR(1, 4784, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;

  /* "pyarrow/types.pxi":4836
 * 
 * 
 * def large_binary():             # <<<<<<<<<<<<<<
 *     """
 *     Create large variable-length binary type.
*/
  __pyx_t_28 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_131large_binary, 0, __pyx_mstate_global->__pyx_n_u_large_binary, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[235])); if (unlikely(!__pyx_t_28)) __PYX_ERR(1, 4836, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_28);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_large_binary, __pyx_t_28) < (0)) __PYX_ERR(1, 4836, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;

  /* "pyarrow/types.pxi":4864
 * 
 * 
 * def large_string():             # <<<<<<<<<<<<<<
 *     """
 *     Create large UTF8 variable-length string type.
*/
  __pyx_t_28 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_133large_string, 0, __pyx_mstate_global->__pyx_n_u_large_string, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[236])); if (unlikely(!__pyx_t_28)) __PYX_ERR(1, 4864, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_28);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_large_string, __pyx_t_28) < (0)) __PYX_ERR(1, 4864, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;

  /* "pyarrow/types.pxi":4894
 * 
 * 
 * def large_utf8():             # <<<<<<<<<<<<<<
 *     """
 *     Alias for large_string().
*/
  __pyx_t_28 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_135large_utf8, 0, __pyx_mstate_global->__pyx_n_u_large_utf8, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[237])); if (unlikely(!__pyx_t_28)) __PYX_ERR(1, 4894, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_28);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_large_utf8, __pyx_t_28) < (0)) __PYX_ERR(1, 4894, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;

  /* "pyarrow/types.pxi":4921
 * 
 * 
 * def binary_view():             # <<<<<<<<<<<<<<
 *     """
 *     Create a variable-length binary view type.
*/
  __pyx_t_28 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_137binary_view, 0, __pyx_mstate_global->__pyx_n_u_binary_view, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[238])); if (unlikely(!__pyx_t_28)) __PYX_ERR(1, 4921, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_28);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_binary_view, __pyx_t_28) < (0)) __PYX_ERR(1, 4921, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;

  /* "pyarrow/types.pxi":4936
 * 
 * 
 * def string_view():             # <<<<<<<<<<<<<<
 *     """
 *     Create UTF8 variable-length string view type.
*/
  __pyx_t_28 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_139string_view, 0, __pyx_mstate_global->__pyx_n_u_string_view, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[239])); if (unlikely(!__pyx_t_28)) __PYX_ERR(1, 4936, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_28);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_string_view, __pyx_t_28) < (0)) __PYX_ERR(1, 4936, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;

  /* "pyarrow/types.pxi":4951
 * 
 * 
 * def list_(value_type, int list_size=-1):             # <<<<<<<<<<<<<<
 *     """
 *     Create ListType instance from child data type or field.
*/
  __pyx_t_28 = __Pyx_PyLong_From_int(((int)-1)); if (unlikely(!__pyx_t_28)) __PYX_ERR(1, 4951, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  __pyx_t_6 = PyTuple_Pack(1, __pyx_t_28); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 4951, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;
  __pyx_t_28 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_141list_, 0, __pyx_mstate_global->__pyx_n_u_list, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[240])); if (unlikely(!__pyx_t_28)) __PYX_ERR(1, 4951, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_28);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_28, __pyx_t_6);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_list, __pyx_t_28) < (0)) __PYX_ERR(1, 4951, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;

  /* "pyarrow/types.pxi":5017
 * 
 * 
 * cpdef LargeListType large_list(value_type):             # <<<<<<<<<<<<<<
 *     """
 *     Create LargeListType instance from child data type or field.
*/
  __pyx_t_28 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_143large_list, 0, __pyx_mstate_global->__pyx_n_u_large_list, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[241])); if (unlikely(!__pyx_t_28)) __PYX_ERR(1, 5017, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_28);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_large_list, __pyx_t_28) < (0)) __PYX_ERR(1, 5017, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;

  /* "pyarrow/types.pxi":5074
 * 
 * 
 * cpdef ListViewType list_view(value_type):             # <<<<<<<<<<<<<<
 *     """
 *     Create ListViewType instance from child data type or field.
*/
  __pyx_t_28 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_145list_view, 0, __pyx_mstate_global->__pyx_n_u_list_view, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[242])); if (unlikely(!__pyx_t_28)) __PYX_ERR(1, 5074, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_28);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_list_view, __pyx_t_28) < (0)) __PYX_ERR(1, 5074, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;

  /* "pyarrow/types.pxi":5112
 * 
 * 
 * cpdef LargeListViewType large_list_view(value_type):             # <<<<<<<<<<<<<<
 *     """
 *     Create LargeListViewType instance from child data type or field.
*/
  __pyx_t_28 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_147large_list_view, 0, __pyx_mstate_global->__pyx_n_u_large_list_view, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[243])); if (unlikely(!__pyx_t_28)) __PYX_ERR(1, 5112, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_28);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_large_list_view, __pyx_t_28) < (0)) __PYX_ERR(1, 5112, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;

  /* "pyarrow/types.pxi":5150
 * 
 * 
 * cpdef MapType map_(key_type, item_type, keys_sorted=False):             # <<<<<<<<<<<<<<
 *     """
 *     Create MapType instance from key and item data types or fields.
*/
  __pyx_t_28 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_149map_, 0, __pyx_mstate_global->__pyx_n_u_map, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[244])); if (unlikely(!__pyx_t_28)) __PYX_ERR(1, 5150, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_28);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_28, __pyx_mstate_global->__pyx_tuple[21]);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_map, __pyx_t_28) < (0)) __PYX_ERR(1, 5150, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;

  /* "pyarrow/types.pxi":5225
 * 
 * 
 * cpdef DictionaryType dictionary(index_type, value_type, bint ordered=False):             # <<<<<<<<<<<<<<
 *     """
 *     Dictionary (categorical, or simply encoded) type.
*/
  __pyx_t_28 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_151dictionary, 0, __pyx_mstate_global->__pyx_n_u_dictionary, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[245])); if (unlikely(!__pyx_t_28)) __PYX_ERR(1, 5225, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_28);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_28, __pyx_mstate_global->__pyx_tuple[21]);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_dictionary, __pyx_t_28) < (0)) __PYX_ERR(1, 5225, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;

  /* "pyarrow/types.pxi":5284
 * 
 * 
 * def struct(fields):             # <<<<<<<<<<<<<<
 *     """
 *     Create StructType instance from fields.
*/
  __pyx_t_28 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_153struct, 0, __pyx_mstate_global->__pyx_n_u_struct, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[246])); if (unlikely(!__pyx_t_28)) __PYX_ERR(1, 5284, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_28);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_struct, __pyx_t_28) < (0)) __PYX_ERR(1, 5284, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;

  /* "pyarrow/types.pxi":5368
 * 
 * 
 * def sparse_union(child_fields, type_codes=None):             # <<<<<<<<<<<<<<
 *     """
 *     Create SparseUnionType from child fields.
*/
  __pyx_t_28 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_155sparse_union, 0, __pyx_mstate_global->__pyx_n_u_sparse_union, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[247])); if (unlikely(!__pyx_t_28)) __PYX_ERR(1, 5368, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_28);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_28, __pyx_mstate_global->__pyx_tuple[7]);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_sparse_union, __pyx_t_28) < (0)) __PYX_ERR(1, 5368, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;

  /* "pyarrow/types.pxi":5402
 * 
 * 
 * def dense_union(child_fields, type_codes=None):             # <<<<<<<<<<<<<<
 *     """
 *     Create DenseUnionType from child fields.
*/
  __pyx_t_28 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_157dense_union, 0, __pyx_mstate_global->__pyx_n_u_dense_union, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[248])); if (unlikely(!__pyx_t_28)) __PYX_ERR(1, 5402, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_28);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_28, __pyx_mstate_global->__pyx_tuple[7]);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_dense_union, __pyx_t_28) < (0)) __PYX_ERR(1, 5402, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;

  /* "pyarrow/types.pxi":5439
 * 
 * 
 * def union(child_fields, mode, type_codes=None):             # <<<<<<<<<<<<<<
 *     """
 *     Create UnionType from child fields.
*/
  __pyx_t_28 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_159union, 0, __pyx_mstate_global->__pyx_n_u_union, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[249])); if (unlikely(!__pyx_t_28)) __PYX_ERR(1, 5439, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_28);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_28, __pyx_mstate_global->__pyx_tuple[7]);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_union, __pyx_t_28) < (0)) __PYX_ERR(1, 5439, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;

  /* "pyarrow/types.pxi":5480
 * 
 * 
 * def run_end_encoded(run_end_type, value_type):             # <<<<<<<<<<<<<<
 *     """
 *     Create RunEndEncodedType from run-end and value types.
*/
  __pyx_t_28 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_161run_end_encoded, 0, __pyx_mstate_global->__pyx_n_u_run_end_encoded, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[250])); if (unlikely(!__pyx_t_28)) __PYX_ERR(1, 5480, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_28);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_run_end_encoded, __pyx_t_28) < (0)) __PYX_ERR(1, 5480, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;

  /* "pyarrow/types.pxi":5506
 * 
 * 
 * def json_(DataType storage_type=utf8()):             # <<<<<<<<<<<<<<
 *     """
 *     Create instance of JSON extension type.
*/
  __pyx_t_28 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_163json_, 0, __pyx_mstate_global->__pyx_n_u_json, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[251])); if (unlikely(!__pyx_t_28)) __PYX_ERR(1, 5506, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_28);
  #endif
  if (!__Pyx_CyFunction_InitDefaults(__pyx_t_28, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib___pyx_defaults)) __PYX_ERR(1, 5506, __pyx_L1_error)
  __pyx_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_utf8); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 5506, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_10 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_10, (1-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 5506, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
  }
  if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DataType))))) __PYX_ERR(1, 5506, __pyx_L1_error)
  __Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_t_28)->arg0 = ((struct __pyx_obj_7pyarrow_3lib_DataType *)__pyx_t_6);
  __Pyx_GIVEREF((PyObject *)__pyx_t_6);
  __pyx_t_6 = 0;
  __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_28, __pyx_pf_7pyarrow_3lib_286__defaults__);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_json, __pyx_t_28) < (0)) __PYX_ERR(1, 5506, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;

  /* "pyarrow/types.pxi":5544
 * 
 * 
 * def uuid():             # <<<<<<<<<<<<<<
 *     """
 *     Create UuidType instance.
*/
  __pyx_t_28 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_165uuid, 0, __pyx_mstate_global->__pyx_n_u_uuid, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[252])); if (unlikely(!__pyx_t_28)) __PYX_ERR(1, 5544, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_28);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_uuid, __pyx_t_28) < (0)) __PYX_ERR(1, 5544, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;

  /* "pyarrow/types.pxi":5559
 * 
 * 
 * def fixed_shape_tensor(DataType value_type, shape, dim_names=None, permutation=None):             # <<<<<<<<<<<<<<
 *     """
 *     Create instance of fixed shape tensor extension type with shape and optional
*/
  __pyx_t_28 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_167fixed_shape_tensor, 0, __pyx_mstate_global->__pyx_n_u_fixed_shape_tensor, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[253])); if (unlikely(!__pyx_t_28)) __PYX_ERR(1, 5559, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_28);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_28, __pyx_mstate_global->__pyx_tuple[24]);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_fixed_shape_tensor, __pyx_t_28) < (0)) __PYX_ERR(1, 5559, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;

  /* "pyarrow/types.pxi":5660
 * 
 * 
 * def bool8():             # <<<<<<<<<<<<<<
 *     """
 *     Create instance of bool8 extension type.
*/
  __pyx_t_28 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_169bool8, 0, __pyx_mstate_global->__pyx_n_u_bool8, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[254])); if (unlikely(!__pyx_t_28)) __PYX_ERR(1, 5660, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_28);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_bool8, __pyx_t_28) < (0)) __PYX_ERR(1, 5660, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;

  /* "pyarrow/types.pxi":5703
 * 
 * 
 * def opaque(DataType storage_type, str type_name not None, str vendor_name not None):             # <<<<<<<<<<<<<<
 *     """
 *     Create instance of opaque extension type.
*/
  __pyx_t_28 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_171opaque, 0, __pyx_mstate_global->__pyx_n_u_opaque, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[255])); if (unlikely(!__pyx_t_28)) __PYX_ERR(1, 5703, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_28);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_opaque, __pyx_t_28) < (0)) __PYX_ERR(1, 5703, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;

  /* "pyarrow/types.pxi":5762
 * 
 * cdef dict _type_aliases = {
 *     'null': null,             # <<<<<<<<<<<<<<
 *     'bool': bool_,
 *     'boolean': bool_,
*/
  __pyx_t_28 = __Pyx_PyDict_NewPresized(55); if (unlikely(!__pyx_t_28)) __PYX_ERR(1, 5762, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_null); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 5762, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_28, __pyx_mstate_global->__pyx_n_u_null, __pyx_t_6) < (0)) __PYX_ERR(1, 5762, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyarrow/types.pxi":5763
 * cdef dict _type_aliases = {
 *     'null': null,
 *     'bool': bool_,             # <<<<<<<<<<<<<<
 *     'boolean': bool_,
 *     'i1': int8,
*/
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_bool); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 5763, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_28, __pyx_mstate_global->__pyx_n_u_bool_2, __pyx_t_6) < (0)) __PYX_ERR(1, 5762, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyarrow/types.pxi":5764
 *     'null': null,
 *     'bool': bool_,
 *     'boolean': bool_,             # <<<<<<<<<<<<<<
 *     'i1': int8,
 *     'int8': int8,
*/
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_bool); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 5764, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_28, __pyx_mstate_global->__pyx_n_u_boolean, __pyx_t_6) < (0)) __PYX_ERR(1, 5762, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyarrow/types.pxi":5765
 *     'bool': bool_,
 *     'boolean': bool_,
 *     'i1': int8,             # <<<<<<<<<<<<<<
 *     'int8': int8,
 *     'i2': int16,
*/
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_int8); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 5765, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_28, __pyx_mstate_global->__pyx_n_u_i1, __pyx_t_6) < (0)) __PYX_ERR(1, 5762, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyarrow/types.pxi":5766
 *     'boolean': bool_,
 *     'i1': int8,
 *     'int8': int8,             # <<<<<<<<<<<<<<
 *     'i2': int16,
 *     'int16': int16,
*/
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_int8); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 5766, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_28, __pyx_mstate_global->__pyx_n_u_int8, __pyx_t_6) < (0)) __PYX_ERR(1, 5762, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyarrow/types.pxi":5767
 *     'i1': int8,
 *     'int8': int8,
 *     'i2': int16,             # <<<<<<<<<<<<<<
 *     'int16': int16,
 *     'i4': int32,
*/
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_int16); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 5767, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_28, __pyx_mstate_global->__pyx_n_u_i2, __pyx_t_6) < (0)) __PYX_ERR(1, 5762, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyarrow/types.pxi":5768
 *     'int8': int8,
 *     'i2': int16,
 *     'int16': int16,             # <<<<<<<<<<<<<<
 *     'i4': int32,
 *     'int32': int32,
*/
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_int16); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 5768, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_28, __pyx_mstate_global->__pyx_n_u_int16, __pyx_t_6) < (0)) __PYX_ERR(1, 5762, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyarrow/types.pxi":5769
 *     'i2': int16,
 *     'int16': int16,
 *     'i4': int32,             # <<<<<<<<<<<<<<
 *     'int32': int32,
 *     'i8': int64,
*/
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_int32); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 5769, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_28, __pyx_mstate_global->__pyx_n_u_i4, __pyx_t_6) < (0)) __PYX_ERR(1, 5762, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyarrow/types.pxi":5770
 *     'int16': int16,
 *     'i4': int32,
 *     'int32': int32,             # <<<<<<<<<<<<<<
 *     'i8': int64,
 *     'int64': int64,
*/
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_int32); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 5770, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_28, __pyx_mstate_global->__pyx_n_u_int32, __pyx_t_6) < (0)) __PYX_ERR(1, 5762, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyarrow/types.pxi":5771
 *     'i4': int32,
 *     'int32': int32,
 *     'i8': int64,             # <<<<<<<<<<<<<<
 *     'int64': int64,
 *     'u1': uint8,
*/
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_int64); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 5771, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_28, __pyx_mstate_global->__pyx_n_u_i8, __pyx_t_6) < (0)) __PYX_ERR(1, 5762, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyarrow/types.pxi":5772
 *     'int32': int32,
 *     'i8': int64,
 *     'int64': int64,             # <<<<<<<<<<<<<<
 *     'u1': uint8,
 *     'uint8': uint8,
*/
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_int64); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 5772, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_28, __pyx_mstate_global->__pyx_n_u_int64, __pyx_t_6) < (0)) __PYX_ERR(1, 5762, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyarrow/types.pxi":5773
 *     'i8': int64,
 *     'int64': int64,
 *     'u1': uint8,             # <<<<<<<<<<<<<<
 *     'uint8': uint8,
 *     'u2': uint16,
*/
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_uint8); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 5773, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_28, __pyx_mstate_global->__pyx_n_u_u1, __pyx_t_6) < (0)) __PYX_ERR(1, 5762, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyarrow/types.pxi":5774
 *     'int64': int64,
 *     'u1': uint8,
 *     'uint8': uint8,             # <<<<<<<<<<<<<<
 *     'u2': uint16,
 *     'uint16': uint16,
*/
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_uint8); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 5774, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_28, __pyx_mstate_global->__pyx_n_u_uint8, __pyx_t_6) < (0)) __PYX_ERR(1, 5762, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyarrow/types.pxi":5775
 *     'u1': uint8,
 *     'uint8': uint8,
 *     'u2': uint16,             # <<<<<<<<<<<<<<
 *     'uint16': uint16,
 *     'u4': uint32,
*/
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_uint16); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 5775, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_28, __pyx_mstate_global->__pyx_n_u_u2, __pyx_t_6) < (0)) __PYX_ERR(1, 5762, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyarrow/types.pxi":5776
 *     'uint8': uint8,
 *     'u2': uint16,
 *     'uint16': uint16,             # <<<<<<<<<<<<<<
 *     'u4': uint32,
 *     'uint32': uint32,
*/
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_uint16); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 5776, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_28, __pyx_mstate_global->__pyx_n_u_uint16, __pyx_t_6) < (0)) __PYX_ERR(1, 5762, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyarrow/types.pxi":5777
 *     'u2': uint16,
 *     'uint16': uint16,
 *     'u4': uint32,             # <<<<<<<<<<<<<<
 *     'uint32': uint32,
 *     'u8': uint64,
*/
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_uint32); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 5777, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_28, __pyx_mstate_global->__pyx_n_u_u4, __pyx_t_6) < (0)) __PYX_ERR(1, 5762, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyarrow/types.pxi":5778
 *     'uint16': uint16,
 *     'u4': uint32,
 *     'uint32': uint32,             # <<<<<<<<<<<<<<
 *     'u8': uint64,
 *     'uint64': uint64,
*/
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_uint32); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 5778, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_28, __pyx_mstate_global->__pyx_n_u_uint32, __pyx_t_6) < (0)) __PYX_ERR(1, 5762, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyarrow/types.pxi":5779
 *     'u4': uint32,
 *     'uint32': uint32,
 *     'u8': uint64,             # <<<<<<<<<<<<<<
 *     'uint64': uint64,
 *     'f2': float16,
*/
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_uint64); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 5779, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_28, __pyx_mstate_global->__pyx_n_u_u8, __pyx_t_6) < (0)) __PYX_ERR(1, 5762, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyarrow/types.pxi":5780
 *     'uint32': uint32,
 *     'u8': uint64,
 *     'uint64': uint64,             # <<<<<<<<<<<<<<
 *     'f2': float16,
 *     'halffloat': float16,
*/
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_uint64); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 5780, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_28, __pyx_mstate_global->__pyx_n_u_uint64, __pyx_t_6) < (0)) __PYX_ERR(1, 5762, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyarrow/types.pxi":5781
 *     'u8': uint64,
 *     'uint64': uint64,
 *     'f2': float16,             # <<<<<<<<<<<<<<
 *     'halffloat': float16,
 *     'float16': float16,
*/
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_float16); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 5781, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_28, __pyx_mstate_global->__pyx_n_u_f2, __pyx_t_6) < (0)) __PYX_ERR(1, 5762, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyarrow/types.pxi":5782
 *     'uint64': uint64,
 *     'f2': float16,
 *     'halffloat': float16,             # <<<<<<<<<<<<<<
 *     'float16': float16,
 *     'f4': float32,
*/
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_float16); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 5782, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_28, __pyx_mstate_global->__pyx_n_u_halffloat, __pyx_t_6) < (0)) __PYX_ERR(1, 5762, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyarrow/types.pxi":5783
 *     'f2': float16,
 *     'halffloat': float16,
 *     'float16': float16,             # <<<<<<<<<<<<<<
 *     'f4': float32,
 *     'float': float32,
*/
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_float16); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 5783, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_28, __pyx_mstate_global->__pyx_n_u_float16, __pyx_t_6) < (0)) __PYX_ERR(1, 5762, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyarrow/types.pxi":5784
 *     'halffloat': float16,
 *     'float16': float16,
 *     'f4': float32,             # <<<<<<<<<<<<<<
 *     'float': float32,
 *     'float32': float32,
*/
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_float32); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 5784, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_28, __pyx_mstate_global->__pyx_n_u_f4, __pyx_t_6) < (0)) __PYX_ERR(1, 5762, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyarrow/types.pxi":5785
 *     'float16': float16,
 *     'f4': float32,
 *     'float': float32,             # <<<<<<<<<<<<<<
 *     'float32': float32,
 *     'f8': float64,
*/
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_float32); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 5785, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_28, __pyx_mstate_global->__pyx_n_u_float, __pyx_t_6) < (0)) __PYX_ERR(1, 5762, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyarrow/types.pxi":5786
 *     'f4': float32,
 *     'float': float32,
 *     'float32': float32,             # <<<<<<<<<<<<<<
 *     'f8': float64,
 *     'double': float64,
*/
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_float32); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 5786, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_28, __pyx_mstate_global->__pyx_n_u_float32, __pyx_t_6) < (0)) __PYX_ERR(1, 5762, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyarrow/types.pxi":5787
 *     'float': float32,
 *     'float32': float32,
 *     'f8': float64,             # <<<<<<<<<<<<<<
 *     'double': float64,
 *     'float64': float64,
*/
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_float64); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 5787, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_28, __pyx_mstate_global->__pyx_n_u_f8, __pyx_t_6) < (0)) __PYX_ERR(1, 5762, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyarrow/types.pxi":5788
 *     'float32': float32,
 *     'f8': float64,
 *     'double': float64,             # <<<<<<<<<<<<<<
 *     'float64': float64,
 *     'string': string,
*/
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_float64); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 5788, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_28, __pyx_mstate_global->__pyx_n_u_double, __pyx_t_6) < (0)) __PYX_ERR(1, 5762, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyarrow/types.pxi":5789
 *     'f8': float64,
 *     'double': float64,
 *     'float64': float64,             # <<<<<<<<<<<<<<
 *     'string': string,
 *     'str': string,
*/
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_float64); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 5789, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_28, __pyx_mstate_global->__pyx_n_u_float64, __pyx_t_6) < (0)) __PYX_ERR(1, 5762, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyarrow/types.pxi":5790
 *     'double': float64,
 *     'float64': float64,
 *     'string': string,             # <<<<<<<<<<<<<<
 *     'str': string,
 *     'utf8': string,
*/
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_string); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 5790, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_28, __pyx_mstate_global->__pyx_n_u_string, __pyx_t_6) < (0)) __PYX_ERR(1, 5762, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyarrow/types.pxi":5791
 *     'float64': float64,
 *     'string': string,
 *     'str': string,             # <<<<<<<<<<<<<<
 *     'utf8': string,
 *     'binary': binary,
*/
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_string); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 5791, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_28, __pyx_mstate_global->__pyx_n_u_str_2, __pyx_t_6) < (0)) __PYX_ERR(1, 5762, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyarrow/types.pxi":5792
 *     'string': string,
 *     'str': string,
 *     'utf8': string,             # <<<<<<<<<<<<<<
 *     'binary': binary,
 *     'large_string': large_string,
*/
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_string); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 5792, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_28, __pyx_mstate_global->__pyx_n_u_utf8, __pyx_t_6) < (0)) __PYX_ERR(1, 5762, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyarrow/types.pxi":5793
 *     'str': string,
 *     'utf8': string,
 *     'binary': binary,             # <<<<<<<<<<<<<<
 *     'large_string': large_string,
 *     'large_str': large_string,
*/
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_binary); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 5793, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_28, __pyx_mstate_global->__pyx_n_u_binary, __pyx_t_6) < (0)) __PYX_ERR(1, 5762, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyarrow/types.pxi":5794
 *     'utf8': string,
 *     'binary': binary,
 *     'large_string': large_string,             # <<<<<<<<<<<<<<
 *     'large_str': large_string,
 *     'large_utf8': large_string,
*/
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_large_string); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 5794, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_28, __pyx_mstate_global->__pyx_n_u_large_string, __pyx_t_6) < (0)) __PYX_ERR(1, 5762, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyarrow/types.pxi":5795
 *     'binary': binary,
 *     'large_string': large_string,
 *     'large_str': large_string,             # <<<<<<<<<<<<<<
 *     'large_utf8': large_string,
 *     'large_binary': large_binary,
*/
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_large_string); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 5795, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_28, __pyx_mstate_global->__pyx_n_u_large_str, __pyx_t_6) < (0)) __PYX_ERR(1, 5762, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyarrow/types.pxi":5796
 *     'large_string': large_string,
 *     'large_str': large_string,
 *     'large_utf8': large_string,             # <<<<<<<<<<<<<<
 *     'large_binary': large_binary,
 *     'binary_view': binary_view,
*/
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_large_string); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 5796, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_28, __pyx_mstate_global->__pyx_n_u_large_utf8, __pyx_t_6) < (0)) __PYX_ERR(1, 5762, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyarrow/types.pxi":5797
 *     'large_str': large_string,
 *     'large_utf8': large_string,
 *     'large_binary': large_binary,             # <<<<<<<<<<<<<<
 *     'binary_view': binary_view,
 *     'string_view': string_view,
*/
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_large_binary); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 5797, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_28, __pyx_mstate_global->__pyx_n_u_large_binary, __pyx_t_6) < (0)) __PYX_ERR(1, 5762, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyarrow/types.pxi":5798
 *     'large_utf8': large_string,
 *     'large_binary': large_binary,
 *     'binary_view': binary_view,             # <<<<<<<<<<<<<<
 *     'string_view': string_view,
 *     'date32': date32,
*/
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_binary_view); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 5798, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_28, __pyx_mstate_global->__pyx_n_u_binary_view, __pyx_t_6) < (0)) __PYX_ERR(1, 5762, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyarrow/types.pxi":5799
 *     'large_binary': large_binary,
 *     'binary_view': binary_view,
 *     'string_view': string_view,             # <<<<<<<<<<<<<<
 *     'date32': date32,
 *     'date64': date64,
*/
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_string_view); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 5799, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_28, __pyx_mstate_global->__pyx_n_u_string_view, __pyx_t_6) < (0)) __PYX_ERR(1, 5762, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyarrow/types.pxi":5800
 *     'binary_view': binary_view,
 *     'string_view': string_view,
 *     'date32': date32,             # <<<<<<<<<<<<<<
 *     'date64': date64,
 *     'date32[day]': date32,
*/
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_date32); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 5800, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_28, __pyx_mstate_global->__pyx_n_u_date32, __pyx_t_6) < (0)) __PYX_ERR(1, 5762, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyarrow/types.pxi":5801
 *     'string_view': string_view,
 *     'date32': date32,
 *     'date64': date64,             # <<<<<<<<<<<<<<
 *     'date32[day]': date32,
 *     'date64[ms]': date64,
*/
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_date64); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 5801, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_28, __pyx_mstate_global->__pyx_n_u_date64, __pyx_t_6) < (0)) __PYX_ERR(1, 5762, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyarrow/types.pxi":5802
 *     'date32': date32,
 *     'date64': date64,
 *     'date32[day]': date32,             # <<<<<<<<<<<<<<
 *     'date64[ms]': date64,
 *     'time32[s]': time32('s'),
*/
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_date32); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 5802, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_28, __pyx_mstate_global->__pyx_kp_u_date32_day, __pyx_t_6) < (0)) __PYX_ERR(1, 5762, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyarrow/types.pxi":5803
 *     'date64': date64,
 *     'date32[day]': date32,
 *     'date64[ms]': date64,             # <<<<<<<<<<<<<<
 *     'time32[s]': time32('s'),
 *     'time32[ms]': time32('ms'),
*/
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_date64); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 5803, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_28, __pyx_mstate_global->__pyx_kp_u_date64_ms, __pyx_t_6) < (0)) __PYX_ERR(1, 5762, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyarrow/types.pxi":5804
 *     'date32[day]': date32,
 *     'date64[ms]': date64,
 *     'time32[s]': time32('s'),             # <<<<<<<<<<<<<<
 *     'time32[ms]': time32('ms'),
 *     'time64[us]': time64('us'),
*/
  __pyx_t_7 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_time32); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5804, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_10 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_mstate_global->__pyx_n_u_s};
    __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 5804, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
  }
  if (PyDict_SetItem(__pyx_t_28, __pyx_mstate_global->__pyx_kp_u_time32_s, __pyx_t_6) < (0)) __PYX_ERR(1, 5762, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyarrow/types.pxi":5805
 *     'date64[ms]': date64,
 *     'time32[s]': time32('s'),
 *     'time32[ms]': time32('ms'),             # <<<<<<<<<<<<<<
 *     'time64[us]': time64('us'),
 *     'time64[ns]': time64('ns'),
*/
  __pyx_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_time32); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 5805, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_10 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ms};
    __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 5805, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
  }
  if (PyDict_SetItem(__pyx_t_28, __pyx_mstate_global->__pyx_kp_u_time32_ms, __pyx_t_6) < (0)) __PYX_ERR(1, 5762, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyarrow/types.pxi":5806
 *     'time32[s]': time32('s'),
 *     'time32[ms]': time32('ms'),
 *     'time64[us]': time64('us'),             # <<<<<<<<<<<<<<
 *     'time64[ns]': time64('ns'),
 *     'timestamp[s]': timestamp('s'),
*/
  __pyx_t_7 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_time64); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5806, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_10 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_mstate_global->__pyx_n_u_us};
    __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 5806, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
  }
  if (PyDict_SetItem(__pyx_t_28, __pyx_mstate_global->__pyx_kp_u_time64_us, __pyx_t_6) < (0)) __PYX_ERR(1, 5762, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyarrow/types.pxi":5807
 *     'time32[ms]': time32('ms'),
 *     'time64[us]': time64('us'),
 *     'time64[ns]': time64('ns'),             # <<<<<<<<<<<<<<
 *     'timestamp[s]': timestamp('s'),
 *     'timestamp[ms]': timestamp('ms'),
*/
  __pyx_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_time64); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 5807, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_10 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ns};
    __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 5807, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
  }
  if (PyDict_SetItem(__pyx_t_28, __pyx_mstate_global->__pyx_kp_u_time64_ns, __pyx_t_6) < (0)) __PYX_ERR(1, 5762, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyarrow/types.pxi":5808
 *     'time64[us]': time64('us'),
 *     'time64[ns]': time64('ns'),
 *     'timestamp[s]': timestamp('s'),             # <<<<<<<<<<<<<<
 *     'timestamp[ms]': timestamp('ms'),
 *     'timestamp[us]': timestamp('us'),
*/
  __pyx_t_7 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_timestamp); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5808, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_10 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_mstate_global->__pyx_n_u_s};
    __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 5808, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
  }
  if (PyDict_SetItem(__pyx_t_28, __pyx_mstate_global->__pyx_kp_u_timestamp_s, __pyx_t_6) < (0)) __PYX_ERR(1, 5762, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyarrow/types.pxi":5809
 *     'time64[ns]': time64('ns'),
 *     'timestamp[s]': timestamp('s'),
 *     'timestamp[ms]': timestamp('ms'),             # <<<<<<<<<<<<<<
 *     'timestamp[us]': timestamp('us'),
 *     'timestamp[ns]': timestamp('ns'),
*/
  __pyx_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_timestamp); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 5809, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_10 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ms};
    __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 5809, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
  }
  if (PyDict_SetItem(__pyx_t_28, __pyx_mstate_global->__pyx_kp_u_timestamp_ms, __pyx_t_6) < (0)) __PYX_ERR(1, 5762, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyarrow/types.pxi":5810
 *     'timestamp[s]': timestamp('s'),
 *     'timestamp[ms]': timestamp('ms'),
 *     'timestamp[us]': timestamp('us'),             # <<<<<<<<<<<<<<
 *     'timestamp[ns]': timestamp('ns'),
 *     'duration[s]': duration('s'),
*/
  __pyx_t_7 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_timestamp); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5810, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_10 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_mstate_global->__pyx_n_u_us};
    __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 5810, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
  }
  if (PyDict_SetItem(__pyx_t_28, __pyx_mstate_global->__pyx_kp_u_timestamp_us, __pyx_t_6) < (0)) __PYX_ERR(1, 5762, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyarrow/types.pxi":5811
 *     'timestamp[ms]': timestamp('ms'),
 *     'timestamp[us]': timestamp('us'),
 *     'timestamp[ns]': timestamp('ns'),             # <<<<<<<<<<<<<<
 *     'duration[s]': duration('s'),
 *     'duration[ms]': duration('ms'),
*/
  __pyx_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_timestamp); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 5811, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_10 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ns};
    __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 5811, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
  }
  if (PyDict_SetItem(__pyx_t_28, __pyx_mstate_global->__pyx_kp_u_timestamp_ns, __pyx_t_6) < (0)) __PYX_ERR(1, 5762, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyarrow/types.pxi":5812
 *     'timestamp[us]': timestamp('us'),
 *     'timestamp[ns]': timestamp('ns'),
 *     'duration[s]': duration('s'),             # <<<<<<<<<<<<<<
 *     'duration[ms]': duration('ms'),
 *     'duration[us]': duration('us'),
*/
  __pyx_t_7 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_duration); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5812, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_10 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_mstate_global->__pyx_n_u_s};
    __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 5812, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
  }
  if (PyDict_SetItem(__pyx_t_28, __pyx_mstate_global->__pyx_kp_u_duration_s, __pyx_t_6) < (0)) __PYX_ERR(1, 5762, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyarrow/types.pxi":5813
 *     'timestamp[ns]': timestamp('ns'),
 *     'duration[s]': duration('s'),
 *     'duration[ms]': duration('ms'),             # <<<<<<<<<<<<<<
 *     'duration[us]': duration('us'),
 *     'duration[ns]': duration('ns'),
*/
  __pyx_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_duration); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 5813, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_10 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ms};
    __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 5813, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
  }
  if (PyDict_SetItem(__pyx_t_28, __pyx_mstate_global->__pyx_kp_u_duration_ms, __pyx_t_6) < (0)) __PYX_ERR(1, 5762, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyarrow/types.pxi":5814
 *     'duration[s]': duration('s'),
 *     'duration[ms]': duration('ms'),
 *     'duration[us]': duration('us'),             # <<<<<<<<<<<<<<
 *     'duration[ns]': duration('ns'),
 *     'month_day_nano_interval': month_day_nano_interval(),
*/
  __pyx_t_7 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_duration); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5814, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_10 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_mstate_global->__pyx_n_u_us};
    __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 5814, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
  }
  if (PyDict_SetItem(__pyx_t_28, __pyx_mstate_global->__pyx_kp_u_duration_us, __pyx_t_6) < (0)) __PYX_ERR(1, 5762, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyarrow/types.pxi":5815
 *     'duration[ms]': duration('ms'),
 *     'duration[us]': duration('us'),
 *     'duration[ns]': duration('ns'),             # <<<<<<<<<<<<<<
 *     'month_day_nano_interval': month_day_nano_interval(),
 * }
*/
  __pyx_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_duration); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 5815, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_10 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ns};
    __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 5815, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
  }
  if (PyDict_SetItem(__pyx_t_28, __pyx_mstate_global->__pyx_kp_u_duration_ns, __pyx_t_6) < (0)) __PYX_ERR(1, 5762, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyarrow/types.pxi":5816
 *     'duration[us]': duration('us'),
 *     'duration[ns]': duration('ns'),
 *     'month_day_nano_interval': month_day_nano_interval(),             # <<<<<<<<<<<<<<
 * }
 * 
*/
  __pyx_t_7 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_month_day_nano_interval); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5816, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_10 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL};
    __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_10, (1-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 5816, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
  }
  if (PyDict_SetItem(__pyx_t_28, __pyx_mstate_global->__pyx_n_u_month_day_nano_interval, __pyx_t_6) < (0)) __PYX_ERR(1, 5762, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_XGOTREF(__pyx_v_7pyarrow_3lib__type_aliases);
  __Pyx_DECREF_SET(__pyx_v_7pyarrow_3lib__type_aliases, ((PyObject*)__pyx_t_28));
  __Pyx_GIVEREF(__pyx_t_28);
  __pyx_t_28 = 0;

  /* "pyarrow/types.pxi":5820
 * 
 * 
 * def type_for_alias(name):             # <<<<<<<<<<<<<<
 *     """
 *     Return DataType given a string alias if one exists.
*/
  __pyx_t_28 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_173type_for_alias, 0, __pyx_mstate_global->__pyx_n_u_type_for_alias, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[256])); if (unlikely(!__pyx_t_28)) __PYX_ERR(1, 5820, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_28);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_type_for_alias, __pyx_t_28) < (0)) __PYX_ERR(1, 5820, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;

  /* "pyarrow/types.pxi":5844
 * 
 * 
 * cpdef DataType ensure_type(object ty, bint allow_none=False):             # <<<<<<<<<<<<<<
 *     if allow_none and ty is None:
 *         return None
*/
  __pyx_t_28 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_175ensure_type, 0, __pyx_mstate_global->__pyx_n_u_ensure_type, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[257])); if (unlikely(!__pyx_t_28)) __PYX_ERR(1, 5844, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_28);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_28, __pyx_mstate_global->__pyx_tuple[21]);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_ensure_type, __pyx_t_28) < (0)) __PYX_ERR(1, 5844, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;

  /* "pyarrow/types.pxi":5855
 * 
 * 
 * def schema(fields, metadata=None):             # <<<<<<<<<<<<<<
 *     """
 *     Construct pyarrow.Schema from collection of fields.
*/
  __pyx_t_28 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_177schema, 0, __pyx_mstate_global->__pyx_n_u_schema, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[258])); if (unlikely(!__pyx_t_28)) __PYX_ERR(1, 5855, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_28);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_28, __pyx_mstate_global->__pyx_tuple[7]);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_schema, __pyx_t_28) < (0)) __PYX_ERR(1, 5855, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;

  /* "pyarrow/types.pxi":5948
 * 
 * 
 * def from_numpy_dtype(object dtype):             # <<<<<<<<<<<<<<
 *     """
 *     Convert NumPy dtype to pyarrow.DataType.
*/
  __pyx_t_28 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_179from_numpy_dtype, 0, __pyx_mstate_global->__pyx_n_u_from_numpy_dtype, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[259])); if (unlikely(!__pyx_t_28)) __PYX_ERR(1, 5948, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_28);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_from_numpy_dtype, __pyx_t_28) < (0)) __PYX_ERR(1, 5948, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;

  /* "pyarrow/types.pxi":5976
 * 
 * 
 * def is_boolean_value(object obj):             # <<<<<<<<<<<<<<
 *     """
 *     Check if the object is a boolean.
*/
  __pyx_t_28 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_181is_boolean_value, 0, __pyx_mstate_global->__pyx_n_u_is_boolean_value, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[260])); if (unlikely(!__pyx_t_28)) __PYX_ERR(1, 5976, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_28);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_is_boolean_value, __pyx_t_28) < (0)) __PYX_ERR(1, 5976, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;

  /* "pyarrow/types.pxi":5988
 * 
 * 
 * def is_integer_value(object obj):             # <<<<<<<<<<<<<<
 *     """
 *     Check if the object is an integer.
*/
  __pyx_t_28 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_183is_integer_value, 0, __pyx_mstate_global->__pyx_n_u_is_integer_value, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[261])); if (unlikely(!__pyx_t_28)) __PYX_ERR(1, 5988, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_28);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_is_integer_value, __pyx_t_28) < (0)) __PYX_ERR(1, 5988, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;

  /* "pyarrow/types.pxi":6000
 * 
 * 
 * def is_float_value(object obj):             # <<<<<<<<<<<<<<
 *     """
 *     Check if the object is a float.
*/
  __pyx_t_28 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_185is_float_value, 0, __pyx_mstate_global->__pyx_n_u_is_float_value, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[262])); if (unlikely(!__pyx_t_28)) __PYX_ERR(1, 6000, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_28);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_is_float_value, __pyx_t_28) < (0)) __PYX_ERR(1, 6000, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;

  /* "pyarrow/types.pxi":6020
 *         self.registry = CExtensionTypeRegistry.GetGlobalRegistry()
 * 
 *     def release_registry(self):             # <<<<<<<<<<<<<<
 *         self.registry.reset()
 * 
*/
  __pyx_t_28 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_23_ExtensionRegistryNanny_3release_registry, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ExtensionRegistryNanny_release, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[263])); if (unlikely(!__pyx_t_28)) __PYX_ERR(1, 6020, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_28);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__ExtensionRegistryNanny, __pyx_mstate_global->__pyx_n_u_release_registry, __pyx_t_28) < (0)) __PYX_ERR(1, 6020, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
*/
  __pyx_t_28 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_23_ExtensionRegistryNanny_5__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ExtensionRegistryNanny___reduce, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[264])); if (unlikely(!__pyx_t_28)) __PYX_ERR(7, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_28);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_28) < (0)) __PYX_ERR(7, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/
  __pyx_t_28 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_23_ExtensionRegistryNanny_7__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ExtensionRegistryNanny___setsta, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[265])); if (unlikely(!__pyx_t_28)) __PYX_ERR(7, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_28);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_28) < (0)) __PYX_ERR(7, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;

  /* "pyarrow/types.pxi":6024
 * 
 * 
 * _registry_nanny = _ExtensionRegistryNanny()             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_t_6 = NULL;
  __pyx_t_10 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
    __pyx_t_28 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__ExtensionRegistryNanny, __pyx_callargs+__pyx_t_10, (1-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_28)) __PYX_ERR(1, 6024, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_28);
  }
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_registry_nanny, ((PyObject *)__pyx_t_28)) < (0)) __PYX_ERR(1, 6024, __pyx_L1_error)
  __Pyx_DECREF((PyObject *)__pyx_t_28); __pyx_t_28 = 0;

  /* "pyarrow/scalar.pxi":18
 * # under the License.
 * 
 * import collections             # <<<<<<<<<<<<<<
 * import warnings
 * from uuid import UUID
*/
  __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_collections, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 18, __pyx_L1_error)
  __pyx_t_28 = __pyx_t_1;
  __Pyx_GOTREF(__pyx_t_28);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_collections, __pyx_t_28) < (0)) __PYX_ERR(3, 18, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;

  /* "pyarrow/scalar.pxi":19
 * 
 * import collections
 * import warnings             # <<<<<<<<<<<<<<
 * from uuid import UUID
 * from collections.abc import Sequence, Mapping
*/
  __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_warnings, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 19, __pyx_L1_error)
  __pyx_t_28 = __pyx_t_1;
  __Pyx_GOTREF(__pyx_t_28);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_warnings, __pyx_t_28) < (0)) __PYX_ERR(3, 19, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;

  /* "pyarrow/scalar.pxi":20
 * import collections
 * import warnings
 * from uuid import UUID             # <<<<<<<<<<<<<<
 * from collections.abc import Sequence, Mapping
 * 
*/
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_UUID};
    __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_uuid, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 20, __pyx_L1_error)
  }
  __pyx_t_28 = __pyx_t_1;
  __Pyx_GOTREF(__pyx_t_28);
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_UUID};
    __pyx_t_3 = 0; {
      __pyx_t_6 = __Pyx_ImportFrom(__pyx_t_28, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 20, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_6) < (0)) __PYX_ERR(3, 20, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;

  /* "pyarrow/scalar.pxi":21
 * import warnings
 * from uuid import UUID
 * from collections.abc import Sequence, Mapping             # <<<<<<<<<<<<<<
 * 
 * 
*/
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Sequence,__pyx_mstate_global->__pyx_n_u_Mapping};
    __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_collections_abc, __pyx_imported_names, 2, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 21, __pyx_L1_error)
  }
  __pyx_t_28 = __pyx_t_1;
  __Pyx_GOTREF(__pyx_t_28);
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Sequence,__pyx_mstate_global->__pyx_n_u_Mapping};
    for (__pyx_t_3=0; __pyx_t_3 < 2; __pyx_t_3++) {
      __pyx_t_6 = __Pyx_ImportFrom(__pyx_t_28, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 21, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_6) < (0)) __PYX_ERR(3, 21, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;

  /* "pyarrow/scalar.pxi":73
 *         return self.wrapped.get().is_valid
 * 
 *     def cast(self, object target_type=None, safe=None, options=None, memory_pool=None):             # <<<<<<<<<<<<<<
 *         """
 *         Cast scalar value to another data type.
*/
  __pyx_t_28 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_6Scalar_3cast, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Scalar_cast, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[266])); if (unlikely(!__pyx_t_28)) __PYX_ERR(3, 73, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_28);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_28, __pyx_mstate_global->__pyx_tuple[25]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Scalar, __pyx_mstate_global->__pyx_n_u_cast, __pyx_t_28) < (0)) __PYX_ERR(3, 73, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;

  /* "pyarrow/scalar.pxi":97
 *                           options=options, memory_pool=memory_pool)
 * 
 *     def validate(self, *, full=False):             # <<<<<<<<<<<<<<
 *         """
 *         Perform validation checks.  An exception is raised if validation fails.
*/
  __pyx_t_28 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_28)) __PYX_ERR(3, 97, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  if (PyDict_SetItem(__pyx_t_28, __pyx_mstate_global->__pyx_n_u_full, Py_False) < (0)) __PYX_ERR(3, 97, __pyx_L1_error)
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_6Scalar_5validate, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Scalar_validate, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[267])); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 97, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_6);
  #endif
  __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_6, __pyx_t_28);
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Scalar, __pyx_mstate_global->__pyx_n_u_validate, __pyx_t_6) < (0)) __PYX_ERR(3, 97, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyarrow/scalar.pxi":126
 *         return str(self.as_py())
 * 
 *     def equals(self, Scalar other not None):             # <<<<<<<<<<<<<<
 *         """
 *         Parameters
*/
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_6Scalar_11equals, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Scalar_equals, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[268])); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 126, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_6);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Scalar, __pyx_mstate_global->__pyx_n_u_equals, __pyx_t_6) < (0)) __PYX_ERR(3, 126, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyarrow/scalar.pxi":148
 *         return hasher(self.wrapped)
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         return scalar, (self.as_py(), self.type)
 * 
*/
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_6Scalar_17__reduce__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Scalar___reduce, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[269])); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 148, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_6);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Scalar, __pyx_mstate_global->__pyx_n_u_reduce, __pyx_t_6) < (0)) __PYX_ERR(3, 148, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyarrow/scalar.pxi":151
 *         return scalar, (self.as_py(), self.type)
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return this value as a Python representation.
*/
  __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 151, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_maps_as_pydicts, Py_None) < (0)) __PYX_ERR(3, 151, __pyx_L1_error)
  __pyx_t_28 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_6Scalar_19as_py, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Scalar_as_py, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[270])); if (unlikely(!__pyx_t_28)) __PYX_ERR(3, 151, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_28);
  #endif
  __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_28, __pyx_t_6);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Scalar, __pyx_mstate_global->__pyx_n_u_as_py, __pyx_t_28) < (0)) __PYX_ERR(3, 151, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;

  /* "pyarrow/scalar.pxi":172
 * 
 * 
 * _NULL = NA = None             # <<<<<<<<<<<<<<
 * 
 * 
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_NULL, Py_None) < (0)) __PYX_ERR(3, 172, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_NA, Py_None) < (0)) __PYX_ERR(3, 172, __pyx_L1_error)

  /* "pyarrow/scalar.pxi":189
 *         pass
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return this value as a Python None.
*/
  __pyx_t_28 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_28)) __PYX_ERR(3, 189, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  if (PyDict_SetItem(__pyx_t_28, __pyx_mstate_global->__pyx_n_u_maps_as_pydicts, Py_None) < (0)) __PYX_ERR(3, 189, __pyx_L1_error)
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_10NullScalar_5as_py, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_NullScalar_as_py, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[271])); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 189, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_6);
  #endif
  __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_6, __pyx_t_28);
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NullScalar, __pyx_mstate_global->__pyx_n_u_as_py, __pyx_t_6) < (0)) __PYX_ERR(3, 189, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyarrow/scalar.pxi":202
 * 
 * 
 * _NULL = NA = NullScalar()             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_t_28 = NULL;
  __pyx_t_10 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_28, NULL};
    __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NullScalar, __pyx_callargs+__pyx_t_10, (1-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_28); __pyx_t_28 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 202, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_6);
  }
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_NULL, __pyx_t_6) < (0)) __PYX_ERR(3, 202, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_NA, __pyx_t_6) < (0)) __PYX_ERR(3, 202, __pyx_L1_error)
  __Pyx_DECREF((PyObject *)__pyx_t_6); __pyx_t_6 = 0;

  /* "pyarrow/scalar.pxi":210
 *     """
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return this value as a Python bool.
*/
  __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 210, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_maps_as_pydicts, Py_None) < (0)) __PYX_ERR(3, 210, __pyx_L1_error)
  __pyx_t_28 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_13BooleanScalar_1as_py, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_BooleanScalar_as_py, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[272])); if (unlikely(!__pyx_t_28)) __PYX_ERR(3, 210, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_28);
  #endif
  __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_28, __pyx_t_6);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_BooleanScalar, __pyx_mstate_global->__pyx_n_u_as_py, __pyx_t_28) < (0)) __PYX_ERR(3, 210, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;

  /* "pyarrow/scalar.pxi":231
 *     """
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return this value as a Python int.
*/
  __pyx_t_28 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_28)) __PYX_ERR(3, 231, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  if (PyDict_SetItem(__pyx_t_28, __pyx_mstate_global->__pyx_n_u_maps_as_pydicts, Py_None) < (0)) __PYX_ERR(3, 231, __pyx_L1_error)
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_11UInt8Scalar_1as_py, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_UInt8Scalar_as_py, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[273])); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 231, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_6);
  #endif
  __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_6, __pyx_t_28);
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_UInt8Scalar, __pyx_mstate_global->__pyx_n_u_as_py, __pyx_t_6) < (0)) __PYX_ERR(3, 231, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyarrow/scalar.pxi":253
 *     """
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return this value as a Python int.
*/
  __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 253, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_maps_as_pydicts, Py_None) < (0)) __PYX_ERR(3, 253, __pyx_L1_error)
  __pyx_t_28 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_10Int8Scalar_1as_py, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Int8Scalar_as_py, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[274])); if (unlikely(!__pyx_t_28)) __PYX_ERR(3, 253, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_28);
  #endif
  __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_28, __pyx_t_6);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Int8Scalar, __pyx_mstate_global->__pyx_n_u_as_py, __pyx_t_28) < (0)) __PYX_ERR(3, 253, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;

  /* "pyarrow/scalar.pxi":275
 *     """
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return this value as a Python int.
*/
  __pyx_t_28 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_28)) __PYX_ERR(3, 275, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  if (PyDict_SetItem(__pyx_t_28, __pyx_mstate_global->__pyx_n_u_maps_as_pydicts, Py_None) < (0)) __PYX_ERR(3, 275, __pyx_L1_error)
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_12UInt16Scalar_1as_py, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_UInt16Scalar_as_py, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[275])); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 275, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_6);
  #endif
  __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_6, __pyx_t_28);
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_UInt16Scalar, __pyx_mstate_global->__pyx_n_u_as_py, __pyx_t_6) < (0)) __PYX_ERR(3, 275, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyarrow/scalar.pxi":297
 *     """
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return this value as a Python int.
*/
  __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 297, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_maps_as_pydicts, Py_None) < (0)) __PYX_ERR(3, 297, __pyx_L1_error)
  __pyx_t_28 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_11Int16Scalar_1as_py, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Int16Scalar_as_py, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[276])); if (unlikely(!__pyx_t_28)) __PYX_ERR(3, 297, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_28);
  #endif
  __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_28, __pyx_t_6);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Int16Scalar, __pyx_mstate_global->__pyx_n_u_as_py, __pyx_t_28) < (0)) __PYX_ERR(3, 297, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;

  /* "pyarrow/scalar.pxi":319
 *     """
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return this value as a Python int.
*/
  __pyx_t_28 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_28)) __PYX_ERR(3, 319, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  if (PyDict_SetItem(__pyx_t_28, __pyx_mstate_global->__pyx_n_u_maps_as_pydicts, Py_None) < (0)) __PYX_ERR(3, 319, __pyx_L1_error)
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_12UInt32Scalar_1as_py, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_UInt32Scalar_as_py, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[277])); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 319, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_6);
  #endif
  __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_6, __pyx_t_28);
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_UInt32Scalar, __pyx_mstate_global->__pyx_n_u_as_py, __pyx_t_6) < (0)) __PYX_ERR(3, 319, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyarrow/scalar.pxi":341
 *     """
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return this value as a Python int.
*/
  __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 341, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_maps_as_pydicts, Py_None) < (0)) __PYX_ERR(3, 341, __pyx_L1_error)
  __pyx_t_28 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_11Int32Scalar_1as_py, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Int32Scalar_as_py, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[278])); if (unlikely(!__pyx_t_28)) __PYX_ERR(3, 341, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_28);
  #endif
  __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_28, __pyx_t_6);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Int32Scalar, __pyx_mstate_global->__pyx_n_u_as_py, __pyx_t_28) < (0)) __PYX_ERR(3, 341, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;

  /* "pyarrow/scalar.pxi":363
 *     """
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return this value as a Python int.
*/
  __pyx_t_28 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_28)) __PYX_ERR(3, 363, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  if (PyDict_SetItem(__pyx_t_28, __pyx_mstate_global->__pyx_n_u_maps_as_pydicts, Py_None) < (0)) __PYX_ERR(3, 363, __pyx_L1_error)
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_12UInt64Scalar_1as_py, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_UInt64Scalar_as_py, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[279])); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 363, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_6);
  #endif
  __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_6, __pyx_t_28);
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_UInt64Scalar, __pyx_mstate_global->__pyx_n_u_as_py, __pyx_t_6) < (0)) __PYX_ERR(3, 363, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyarrow/scalar.pxi":385
 *     """
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return this value as a Python int.
*/
  __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 385, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_maps_as_pydicts, Py_None) < (0)) __PYX_ERR(3, 385, __pyx_L1_error)
  __pyx_t_28 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_11Int64Scalar_1as_py, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Int64Scalar_as_py, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[280])); if (unlikely(!__pyx_t_28)) __PYX_ERR(3, 385, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_28);
  #endif
  __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_28, __pyx_t_6);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Int64Scalar, __pyx_mstate_global->__pyx_n_u_as_py, __pyx_t_28) < (0)) __PYX_ERR(3, 385, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;

  /* "pyarrow/scalar.pxi":407
 *     """
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return this value as a Python float.
*/
  __pyx_t_28 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_28)) __PYX_ERR(3, 407, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  if (PyDict_SetItem(__pyx_t_28, __pyx_mstate_global->__pyx_n_u_maps_as_pydicts, Py_None) < (0)) __PYX_ERR(3, 407, __pyx_L1_error)
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_15HalfFloatScalar_1as_py, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_HalfFloatScalar_as_py, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[281])); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 407, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_6);
  #endif
  __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_6, __pyx_t_28);
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_HalfFloatScalar, __pyx_mstate_global->__pyx_n_u_as_py, __pyx_t_6) < (0)) __PYX_ERR(3, 407, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyarrow/scalar.pxi":432
 *     """
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return this value as a Python float.
*/
  __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 432, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_maps_as_pydicts, Py_None) < (0)) __PYX_ERR(3, 432, __pyx_L1_error)
  __pyx_t_28 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_11FloatScalar_1as_py, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_FloatScalar_as_py, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[282])); if (unlikely(!__pyx_t_28)) __PYX_ERR(3, 432, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_28);
  #endif
  __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_28, __pyx_t_6);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_FloatScalar, __pyx_mstate_global->__pyx_n_u_as_py, __pyx_t_28) < (0)) __PYX_ERR(3, 432, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;

  /* "pyarrow/scalar.pxi":457
 *     """
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return this value as a Python float.
*/
  __pyx_t_28 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_28)) __PYX_ERR(3, 457, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  if (PyDict_SetItem(__pyx_t_28, __pyx_mstate_global->__pyx_n_u_maps_as_pydicts, Py_None) < (0)) __PYX_ERR(3, 457, __pyx_L1_error)
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_12DoubleScalar_1as_py, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DoubleScalar_as_py, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[283])); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 457, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_6);
  #endif
  __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_6, __pyx_t_28);
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DoubleScalar, __pyx_mstate_global->__pyx_n_u_as_py, __pyx_t_6) < (0)) __PYX_ERR(3, 457, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyarrow/scalar.pxi":482
 *     """
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return this value as a Python Decimal.
*/
  __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 482, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_maps_as_pydicts, Py_None) < (0)) __PYX_ERR(3, 482, __pyx_L1_error)
  __pyx_t_28 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_15Decimal32Scalar_1as_py, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Decimal32Scalar_as_py, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[284])); if (unlikely(!__pyx_t_28)) __PYX_ERR(3, 482, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_28);
  #endif
  __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_28, __pyx_t_6);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Decimal32Scalar, __pyx_mstate_global->__pyx_n_u_as_py, __pyx_t_28) < (0)) __PYX_ERR(3, 482, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;

  /* "pyarrow/scalar.pxi":508
 *     """
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return this value as a Python Decimal.
*/
  __pyx_t_28 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_28)) __PYX_ERR(3, 508, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  if (PyDict_SetItem(__pyx_t_28, __pyx_mstate_global->__pyx_n_u_maps_as_pydicts, Py_None) < (0)) __PYX_ERR(3, 508, __pyx_L1_error)
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_15Decimal64Scalar_1as_py, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Decimal64Scalar_as_py, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[285])); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 508, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_6);
  #endif
  __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_6, __pyx_t_28);
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Decimal64Scalar, __pyx_mstate_global->__pyx_n_u_as_py, __pyx_t_6) < (0)) __PYX_ERR(3, 508, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyarrow/scalar.pxi":534
 *     """
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return this value as a Python Decimal.
*/
  __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 534, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_maps_as_pydicts, Py_None) < (0)) __PYX_ERR(3, 534, __pyx_L1_error)
  __pyx_t_28 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_16Decimal128Scalar_1as_py, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Decimal128Scalar_as_py, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[286])); if (unlikely(!__pyx_t_28)) __PYX_ERR(3, 534, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_28);
  #endif
  __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_28, __pyx_t_6);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Decimal128Scalar, __pyx_mstate_global->__pyx_n_u_as_py, __pyx_t_28) < (0)) __PYX_ERR(3, 534, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;

  /* "pyarrow/scalar.pxi":560
 *     """
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return this value as a Python Decimal.
*/
  __pyx_t_28 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_28)) __PYX_ERR(3, 560, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  if (PyDict_SetItem(__pyx_t_28, __pyx_mstate_global->__pyx_n_u_maps_as_pydicts, Py_None) < (0)) __PYX_ERR(3, 560, __pyx_L1_error)
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_16Decimal256Scalar_1as_py, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Decimal256Scalar_as_py, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[287])); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 560, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_6);
  #endif
  __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_6, __pyx_t_28);
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Decimal256Scalar, __pyx_mstate_global->__pyx_n_u_as_py, __pyx_t_6) < (0)) __PYX_ERR(3, 560, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyarrow/scalar.pxi":591
 *         return sp.value if sp.is_valid else None
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return this value as a Python datetime.datetime instance.
*/
  __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 591, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_maps_as_pydicts, Py_None) < (0)) __PYX_ERR(3, 591, __pyx_L1_error)
  __pyx_t_28 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_12Date32Scalar_1as_py, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Date32Scalar_as_py, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[288])); if (unlikely(!__pyx_t_28)) __PYX_ERR(3, 591, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_28);
  #endif
  __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_28, __pyx_t_6);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Date32Scalar, __pyx_mstate_global->__pyx_n_u_as_py, __pyx_t_28) < (0)) __PYX_ERR(3, 591, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;

  /* "pyarrow/scalar.pxi":622
 *         return sp.value if sp.is_valid else None
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return this value as a Python datetime.datetime instance.
*/
  __pyx_t_28 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_28)) __PYX_ERR(3, 622, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  if (PyDict_SetItem(__pyx_t_28, __pyx_mstate_global->__pyx_n_u_maps_as_pydicts, Py_None) < (0)) __PYX_ERR(3, 622, __pyx_L1_error)
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_12Date64Scalar_1as_py, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Date64Scalar_as_py, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[289])); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 622, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_6);
  #endif
  __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_6, __pyx_t_28);
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Date64Scalar, __pyx_mstate_global->__pyx_n_u_as_py, __pyx_t_6) < (0)) __PYX_ERR(3, 622, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyarrow/scalar.pxi":643
 * 
 * 
 * def _datetime_from_int(int64_t value, TimeUnit unit, tzinfo=None):             # <<<<<<<<<<<<<<
 *     if unit == TimeUnit_SECOND:
 *         delta = datetime.timedelta(seconds=value)
*/
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_187_datetime_from_int, 0, __pyx_mstate_global->__pyx_n_u_datetime_from_int, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[290])); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 643, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_6);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_6, __pyx_mstate_global->__pyx_tuple[7]);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_datetime_from_int, __pyx_t_6) < (0)) __PYX_ERR(3, 643, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyarrow/scalar.pxi":682
 *         return sp.value if sp.is_valid else None
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return this value as a Python datetime.timedelta instance.
*/
  __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 682, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_maps_as_pydicts, Py_None) < (0)) __PYX_ERR(3, 682, __pyx_L1_error)
  __pyx_t_28 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_12Time32Scalar_1as_py, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Time32Scalar_as_py, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[291])); if (unlikely(!__pyx_t_28)) __PYX_ERR(3, 682, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_28);
  #endif
  __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_28, __pyx_t_6);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Time32Scalar, __pyx_mstate_global->__pyx_n_u_as_py, __pyx_t_28) < (0)) __PYX_ERR(3, 682, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;

  /* "pyarrow/scalar.pxi":712
 *         return sp.value if sp.is_valid else None
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return this value as a Python datetime.timedelta instance.
*/
  __pyx_t_28 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_28)) __PYX_ERR(3, 712, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  if (PyDict_SetItem(__pyx_t_28, __pyx_mstate_global->__pyx_n_u_maps_as_pydicts, Py_None) < (0)) __PYX_ERR(3, 712, __pyx_L1_error)
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_12Time64Scalar_1as_py, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Time64Scalar_as_py, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[292])); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 712, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_6);
  #endif
  __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_6, __pyx_t_28);
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Time64Scalar, __pyx_mstate_global->__pyx_n_u_as_py, __pyx_t_6) < (0)) __PYX_ERR(3, 712, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyarrow/scalar.pxi":742
 *         return sp.value if sp.is_valid else None
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return this value as a Pandas Timestamp instance (if units are
*/
  __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 742, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_maps_as_pydicts, Py_None) < (0)) __PYX_ERR(3, 742, __pyx_L1_error)
  __pyx_t_28 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_15TimestampScalar_1as_py, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_TimestampScalar_as_py, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[293])); if (unlikely(!__pyx_t_28)) __PYX_ERR(3, 742, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_28);
  #endif
  __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_28, __pyx_t_6);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_TimestampScalar, __pyx_mstate_global->__pyx_n_u_as_py, __pyx_t_28) < (0)) __PYX_ERR(3, 742, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;

  /* "pyarrow/scalar.pxi":794
 *         return sp.value if sp.is_valid else None
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return this value as a Pandas Timedelta instance (if units are
*/
  __pyx_t_28 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_28)) __PYX_ERR(3, 794, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  if (PyDict_SetItem(__pyx_t_28, __pyx_mstate_global->__pyx_n_u_maps_as_pydicts, Py_None) < (0)) __PYX_ERR(3, 794, __pyx_L1_error)
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_14DurationScalar_1as_py, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DurationScalar_as_py, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[294])); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 794, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_6);
  #endif
  __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_6, __pyx_t_28);
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DurationScalar, __pyx_mstate_global->__pyx_n_u_as_py, __pyx_t_6) < (0)) __PYX_ERR(3, 794, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyarrow/scalar.pxi":847
 *         return self.as_py()
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return this value as a pyarrow.MonthDayNano.
*/
  __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 847, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_maps_as_pydicts, Py_None) < (0)) __PYX_ERR(3, 847, __pyx_L1_error)
  __pyx_t_28 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_26MonthDayNanoIntervalScalar_1as_py, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_MonthDayNanoIntervalScalar_as_py, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[295])); if (unlikely(!__pyx_t_28)) __PYX_ERR(3, 847, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_28);
  #endif
  __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_28, __pyx_t_6);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_MonthDayNanoIntervalScalar, __pyx_mstate_global->__pyx_n_u_as_py, __pyx_t_28) < (0)) __PYX_ERR(3, 847, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;

  /* "pyarrow/scalar.pxi":871
 *     """
 * 
 *     def as_buffer(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return a view over this value as a Buffer object.
*/
  __pyx_t_28 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_12BinaryScalar_1as_buffer, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_BinaryScalar_as_buffer, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[296])); if (unlikely(!__pyx_t_28)) __PYX_ERR(3, 871, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_28);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_BinaryScalar, __pyx_mstate_global->__pyx_n_u_as_buffer, __pyx_t_28) < (0)) __PYX_ERR(3, 871, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;

  /* "pyarrow/scalar.pxi":878
 *         return pyarrow_wrap_buffer(sp.value) if sp.is_valid else None
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return this value as a Python bytes.
*/
  __pyx_t_28 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_28)) __PYX_ERR(3, 878, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  if (PyDict_SetItem(__pyx_t_28, __pyx_mstate_global->__pyx_n_u_maps_as_pydicts, Py_None) < (0)) __PYX_ERR(3, 878, __pyx_L1_error)
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_12BinaryScalar_3as_py, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_BinaryScalar_as_py, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[297])); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 878, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_6);
  #endif
  __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_6, __pyx_t_28);
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_BinaryScalar, __pyx_mstate_global->__pyx_n_u_as_py, __pyx_t_6) < (0)) __PYX_ERR(3, 878, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyarrow/scalar.pxi":891
 *         return None if buffer is None else buffer.to_pybytes()
 * 
 *     def __bytes__(self):             # <<<<<<<<<<<<<<
 *         return self.as_py()
 * 
*/
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_12BinaryScalar_5__bytes__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_BinaryScalar___bytes, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[298])); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 891, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_6);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_BinaryScalar, __pyx_mstate_global->__pyx_n_u_bytes_3, __pyx_t_6) < (0)) __PYX_ERR(3, 891, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyarrow/scalar.pxi":914
 *     """
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return this value as a Python string.
*/
  __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 914, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_maps_as_pydicts, Py_None) < (0)) __PYX_ERR(3, 914, __pyx_L1_error)
  __pyx_t_28 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_12StringScalar_1as_py, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_StringScalar_as_py, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[299])); if (unlikely(!__pyx_t_28)) __PYX_ERR(3, 914, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_28);
  #endif
  __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_28, __pyx_t_6);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_StringScalar, __pyx_mstate_global->__pyx_n_u_as_py, __pyx_t_28) < (0)) __PYX_ERR(3, 914, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;

  /* "pyarrow/scalar.pxi":940
 * 
 * 
 * cdef class ListScalar(Scalar, Sequence):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for list-like scalars.
*/
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_Sequence); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 940, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_4 = PyTuple_Pack(2, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Scalar), __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 940, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 940, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = PyTuple_Pack(3, __pyx_mstate_global->__pyx_n_u_ListScalar, __pyx_t_4, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 940, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_28 = __Pyx_PyTuple_GET_ITEM(__pyx_t_7, 1);
  if (unlikely(!CYTHON_ASSUME_SAFE_MACROS && !__pyx_t_28)) __PYX_ERR(3, 940, __pyx_L1_error)
  __Pyx_INCREF(__pyx_t_28);
  __pyx_t_27 = ((PyTypeObject*)__Pyx_PyTuple_GET_ITEM(__pyx_t_28, 0));
  if (unlikely(!CYTHON_ASSUME_SAFE_MACROS && !__pyx_t_27)) __PYX_ERR(3, 940, __pyx_L1_error)
  #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
  if (__Pyx_get_runtime_version() < 0x030A0000) {
    __pyx_t_4 = PyObject_GetAttrString((PyObject*)&PyType_Type, "__new__");
    if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 940, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_12 = PyTuple_Pack(1, (PyObject*)&PyType_Type);
    if (unlikely(!__pyx_t_12)) __PYX_ERR(3, 940, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __pyx_t_13 = PyNumber_Add(__pyx_t_12, __pyx_t_7);
    if (unlikely(!__pyx_t_13)) __PYX_ERR(3, 940, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __pyx_t_6 = PyObject_Call(__pyx_t_4, __pyx_t_13, NULL);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  } else
  #endif
  __pyx_t_6 = __Pyx_PyType_GetSlot(&PyType_Type, tp_new, newfunc)(&PyType_Type, __pyx_t_7, NULL);
  if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 940, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (__Pyx_PyType_GetSlot((PyTypeObject*) __pyx_t_6, tp_base, PyTypeObject*) != __pyx_t_27) {
    __Pyx_TypeName base_name = __Pyx_PyType_GetFullyQualifiedName(__Pyx_PyType_GetSlot((PyTypeObject*) __pyx_t_6, tp_base, PyTypeObject*));
    __Pyx_TypeName type_name = __Pyx_PyType_GetFullyQualifiedName(__pyx_t_27);
    PyErr_Format(PyExc_TypeError, "best base '" __Pyx_FMT_TYPENAME "' must be equal to first base '" __Pyx_FMT_TYPENAME "'",
                 base_name, type_name);
    __Pyx_DECREF_TypeName(base_name);
    __Pyx_DECREF_TypeName(type_name);
    __PYX_ERR(3, 940, __pyx_L1_error)
  }
  __pyx_t_27 = NULL;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  #if CYTHON_USE_TYPE_SPECS
  if (__Pyx_validate_bases_tuple(__pyx_type_7pyarrow_3lib_ListScalar_spec.name, 0, __pyx_t_28) < (0)) __PYX_ERR(3, 940, __pyx_L1_error)
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_ListScalar = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_ListScalar_spec, __pyx_t_28);
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_ListScalar)) __PYX_ERR(3, 940, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_ListScalar_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_ListScalar) < (0)) __PYX_ERR(3, 940, __pyx_L1_error)
  #else
  __Pyx_INCREF(__pyx_t_28);
  __Pyx_GIVEREF(__pyx_t_28);
  __pyx_type_7pyarrow_3lib_ListScalar.tp_bases = __pyx_t_28;
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_ListScalar = &__pyx_type_7pyarrow_3lib_ListScalar;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ListScalar->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Scalar;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_ListScalar) < (0)) __PYX_ERR(3, 940, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_ListScalar);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_ListScalar->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_ListScalar->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_ListScalar->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  #if CYTHON_UPDATE_DESCRIPTOR_DOC
  {
    PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_ListScalar, "__len__"); if (unlikely(!wrapper)) __PYX_ERR(3, 940, __pyx_L1_error)
    if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
      __pyx_wrapperbase_7pyarrow_3lib_10ListScalar___len__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_7pyarrow_3lib_10ListScalar___len__.doc = __pyx_doc_7pyarrow_3lib_10ListScalar___len__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_7pyarrow_3lib_10ListScalar___len__;
    }
  }
  #endif
  #if CYTHON_UPDATE_DESCRIPTOR_DOC
  {
    PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_ListScalar, "__getitem__"); if (unlikely(!wrapper)) __PYX_ERR(3, 940, __pyx_L1_error)
    if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
      __pyx_wrapperbase_7pyarrow_3lib_10ListScalar_2__getitem__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_7pyarrow_3lib_10ListScalar_2__getitem__.doc = __pyx_doc_7pyarrow_3lib_10ListScalar_2__getitem__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_7pyarrow_3lib_10ListScalar_2__getitem__;
    }
  }
  #endif
  #if CYTHON_UPDATE_DESCRIPTOR_DOC
  {
    PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_ListScalar, "__iter__"); if (unlikely(!wrapper)) __PYX_ERR(3, 940, __pyx_L1_error)
    if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
      __pyx_wrapperbase_7pyarrow_3lib_10ListScalar_4__iter__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_7pyarrow_3lib_10ListScalar_4__iter__.doc = __pyx_doc_7pyarrow_3lib_10ListScalar_4__iter__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_7pyarrow_3lib_10ListScalar_4__iter__;
    }
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_ListScalar, __pyx_vtabptr_7pyarrow_3lib_ListScalar) < (0)) __PYX_ERR(3, 940, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_ListScalar) < (0)) __PYX_ERR(3, 940, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_ListScalar, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_ListScalar) < (0)) __PYX_ERR(3, 940, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_ListScalar->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_ListScalar->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_ListScalar, __pyx_base.__pyx_base.__weakref__);
  #endif
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;

  /* "pyarrow/scalar.pxi":971
 *         return iter(self.values)
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return this value as a Python list.
*/
  __pyx_t_28 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_28)) __PYX_ERR(3, 971, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  if (PyDict_SetItem(__pyx_t_28, __pyx_mstate_global->__pyx_n_u_maps_as_pydicts, Py_None) < (0)) __PYX_ERR(3, 971, __pyx_L1_error)
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_10ListScalar_7as_py, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ListScalar_as_py, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[300])); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 971, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_7, __pyx_t_28);
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ListScalar, __pyx_mstate_global->__pyx_n_u_as_py, __pyx_t_7) < (0)) __PYX_ERR(3, 971, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/scalar.pxi":993
 * 
 * 
 * cdef class FixedSizeListScalar(ListScalar):             # <<<<<<<<<<<<<<
 *     pass
 * 
*/
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_7 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ListScalar); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 993, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (__Pyx_validate_bases_tuple(__pyx_type_7pyarrow_3lib_FixedSizeListScalar_spec.name, 0, __pyx_t_7) < (0)) __PYX_ERR(3, 993, __pyx_L1_error)
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedSizeListScalar = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_FixedSizeListScalar_spec, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedSizeListScalar)) __PYX_ERR(3, 993, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_FixedSizeListScalar_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedSizeListScalar) < (0)) __PYX_ERR(3, 993, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedSizeListScalar = &__pyx_type_7pyarrow_3lib_FixedSizeListScalar;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_FixedSizeListScalar->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ListScalar;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedSizeListScalar) < (0)) __PYX_ERR(3, 993, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedSizeListScalar);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedSizeListScalar->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedSizeListScalar->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedSizeListScalar->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedSizeListScalar, __pyx_vtabptr_7pyarrow_3lib_FixedSizeListScalar) < (0)) __PYX_ERR(3, 993, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedSizeListScalar) < (0)) __PYX_ERR(3, 993, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_FixedSizeListScalar, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedSizeListScalar) < (0)) __PYX_ERR(3, 993, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedSizeListScalar->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_FixedSizeListScalar->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_FixedSizeListScalar, __pyx_base.__pyx_base.__pyx_base.__weakref__);
  #endif

  /* "pyarrow/scalar.pxi":997
 * 
 * 
 * cdef class LargeListScalar(ListScalar):             # <<<<<<<<<<<<<<
 *     pass
 * 
*/
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_7 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ListScalar); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 997, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (__Pyx_validate_bases_tuple(__pyx_type_7pyarrow_3lib_LargeListScalar_spec.name, 0, __pyx_t_7) < (0)) __PYX_ERR(3, 997, __pyx_L1_error)
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeListScalar = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_LargeListScalar_spec, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeListScalar)) __PYX_ERR(3, 997, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_LargeListScalar_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeListScalar) < (0)) __PYX_ERR(3, 997, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeListScalar = &__pyx_type_7pyarrow_3lib_LargeListScalar;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_LargeListScalar->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ListScalar;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeListScalar) < (0)) __PYX_ERR(3, 997, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeListScalar);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeListScalar->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeListScalar->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeListScalar->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeListScalar, __pyx_vtabptr_7pyarrow_3lib_LargeListScalar) < (0)) __PYX_ERR(3, 997, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeListScalar) < (0)) __PYX_ERR(3, 997, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_LargeListScalar, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeListScalar) < (0)) __PYX_ERR(3, 997, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeListScalar->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeListScalar->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_LargeListScalar, __pyx_base.__pyx_base.__pyx_base.__weakref__);
  #endif

  /* "pyarrow/scalar.pxi":1001
 * 
 * 
 * cdef class ListViewScalar(ListScalar):             # <<<<<<<<<<<<<<
 *     pass
 * 
*/
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_7 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ListScalar); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1001, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (__Pyx_validate_bases_tuple(__pyx_type_7pyarrow_3lib_ListViewScalar_spec.name, 0, __pyx_t_7) < (0)) __PYX_ERR(3, 1001, __pyx_L1_error)
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_ListViewScalar = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_ListViewScalar_spec, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_ListViewScalar)) __PYX_ERR(3, 1001, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_ListViewScalar_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_ListViewScalar) < (0)) __PYX_ERR(3, 1001, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_ListViewScalar = &__pyx_type_7pyarrow_3lib_ListViewScalar;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ListViewScalar->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ListScalar;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_ListViewScalar) < (0)) __PYX_ERR(3, 1001, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_ListViewScalar);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_ListViewScalar->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_ListViewScalar->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_ListViewScalar->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_ListViewScalar, __pyx_vtabptr_7pyarrow_3lib_ListViewScalar) < (0)) __PYX_ERR(3, 1001, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_ListViewScalar) < (0)) __PYX_ERR(3, 1001, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_ListViewScalar, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_ListViewScalar) < (0)) __PYX_ERR(3, 1001, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_ListViewScalar->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_ListViewScalar->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_ListViewScalar, __pyx_base.__pyx_base.__pyx_base.__weakref__);
  #endif

  /* "pyarrow/scalar.pxi":1005
 * 
 * 
 * cdef class LargeListViewScalar(ListScalar):             # <<<<<<<<<<<<<<
 *     pass
 * 
*/
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_7 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ListScalar); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1005, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (__Pyx_validate_bases_tuple(__pyx_type_7pyarrow_3lib_LargeListViewScalar_spec.name, 0, __pyx_t_7) < (0)) __PYX_ERR(3, 1005, __pyx_L1_error)
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeListViewScalar = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_LargeListViewScalar_spec, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeListViewScalar)) __PYX_ERR(3, 1005, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_LargeListViewScalar_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeListViewScalar) < (0)) __PYX_ERR(3, 1005, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeListViewScalar = &__pyx_type_7pyarrow_3lib_LargeListViewScalar;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_LargeListViewScalar->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ListScalar;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeListViewScalar) < (0)) __PYX_ERR(3, 1005, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeListViewScalar);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeListViewScalar->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeListViewScalar->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeListViewScalar->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeListViewScalar, __pyx_vtabptr_7pyarrow_3lib_LargeListViewScalar) < (0)) __PYX_ERR(3, 1005, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeListViewScalar) < (0)) __PYX_ERR(3, 1005, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_LargeListViewScalar, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeListViewScalar) < (0)) __PYX_ERR(3, 1005, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeListViewScalar->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_LargeListViewScalar->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_LargeListViewScalar, __pyx_base.__pyx_base.__pyx_base.__weakref__);
  #endif

  /* "pyarrow/scalar.pxi":1009
 * 
 * 
 * cdef class StructScalar(Scalar, Mapping):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for struct scalars.
*/
  __Pyx_GetModuleGlobalName(__pyx_t_28, __pyx_mstate_global->__pyx_n_u_Mapping); if (unlikely(!__pyx_t_28)) __PYX_ERR(3, 1009, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  __pyx_t_6 = PyTuple_Pack(2, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Scalar), __pyx_t_28); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1009, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;
  __pyx_t_28 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_28)) __PYX_ERR(3, 1009, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  __pyx_t_13 = PyTuple_Pack(3, __pyx_mstate_global->__pyx_n_u_StructScalar, __pyx_t_6, __pyx_t_28); if (unlikely(!__pyx_t_13)) __PYX_ERR(3, 1009, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;
  __pyx_t_7 = __Pyx_PyTuple_GET_ITEM(__pyx_t_13, 1);
  if (unlikely(!CYTHON_ASSUME_SAFE_MACROS && !__pyx_t_7)) __PYX_ERR(3, 1009, __pyx_L1_error)
  __Pyx_INCREF(__pyx_t_7);
  __pyx_t_27 = ((PyTypeObject*)__Pyx_PyTuple_GET_ITEM(__pyx_t_7, 0));
  if (unlikely(!CYTHON_ASSUME_SAFE_MACROS && !__pyx_t_27)) __PYX_ERR(3, 1009, __pyx_L1_error)
  #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
  if (__Pyx_get_runtime_version() < 0x030A0000) {
    __pyx_t_6 = PyObject_GetAttrString((PyObject*)&PyType_Type, "__new__");
    if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1009, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_12 = PyTuple_Pack(1, (PyObject*)&PyType_Type);
    if (unlikely(!__pyx_t_12)) __PYX_ERR(3, 1009, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __pyx_t_4 = PyNumber_Add(__pyx_t_12, __pyx_t_13);
    if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1009, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_28 = PyObject_Call(__pyx_t_6, __pyx_t_4, NULL);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  __pyx_t_28 = __Pyx_PyType_GetSlot(&PyType_Type, tp_new, newfunc)(&PyType_Type, __pyx_t_13, NULL);
  if (unlikely(!__pyx_t_28)) __PYX_ERR(3, 1009, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  if (__Pyx_PyType_GetSlot((PyTypeObject*) __pyx_t_28, tp_base, PyTypeObject*) != __pyx_t_27) {
    __Pyx_TypeName base_name = __Pyx_PyType_GetFullyQualifiedName(__Pyx_PyType_GetSlot((PyTypeObject*) __pyx_t_28, tp_base, PyTypeObject*));
    __Pyx_TypeName type_name = __Pyx_PyType_GetFullyQualifiedName(__pyx_t_27);
    PyErr_Format(PyExc_TypeError, "best base '" __Pyx_FMT_TYPENAME "' must be equal to first base '" __Pyx_FMT_TYPENAME "'",
                 base_name, type_name);
    __Pyx_DECREF_TypeName(base_name);
    __Pyx_DECREF_TypeName(type_name);
    __PYX_ERR(3, 1009, __pyx_L1_error)
  }
  __pyx_t_27 = NULL;
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  #if CYTHON_USE_TYPE_SPECS
  if (__Pyx_validate_bases_tuple(__pyx_type_7pyarrow_3lib_StructScalar_spec.name, 0, __pyx_t_7) < (0)) __PYX_ERR(3, 1009, __pyx_L1_error)
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_StructScalar = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_StructScalar_spec, __pyx_t_7);
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_StructScalar)) __PYX_ERR(3, 1009, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_StructScalar_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_StructScalar) < (0)) __PYX_ERR(3, 1009, __pyx_L1_error)
  #else
  __Pyx_INCREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_7);
  __pyx_type_7pyarrow_3lib_StructScalar.tp_bases = __pyx_t_7;
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_StructScalar = &__pyx_type_7pyarrow_3lib_StructScalar;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_StructScalar->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Scalar;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_StructScalar) < (0)) __PYX_ERR(3, 1009, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_StructScalar);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_StructScalar->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_StructScalar->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_StructScalar->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  #if CYTHON_UPDATE_DESCRIPTOR_DOC
  {
    PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_StructScalar, "__getitem__"); if (unlikely(!wrapper)) __PYX_ERR(3, 1009, __pyx_L1_error)
    if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
      __pyx_wrapperbase_7pyarrow_3lib_12StructScalar_9__getitem__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_7pyarrow_3lib_12StructScalar_9__getitem__.doc = __pyx_doc_7pyarrow_3lib_12StructScalar_9__getitem__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_7pyarrow_3lib_12StructScalar_9__getitem__;
    }
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_StructScalar, __pyx_vtabptr_7pyarrow_3lib_StructScalar) < (0)) __PYX_ERR(3, 1009, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_StructScalar) < (0)) __PYX_ERR(3, 1009, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_StructScalar, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_StructScalar) < (0)) __PYX_ERR(3, 1009, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_StructScalar->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_StructScalar->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_StructScalar, __pyx_base.__pyx_base.__weakref__);
  #endif
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/scalar.pxi":1027
 *             yield frombytes(fields[i].get().name())
 * 
 *     def items(self):             # <<<<<<<<<<<<<<
 *         return ((key, self[i]) for i, key in enumerate(self))
 * 
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_12StructScalar_6items, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_StructScalar_items, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[301])); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1027, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_StructScalar, __pyx_mstate_global->__pyx_n_u_items, __pyx_t_7) < (0)) __PYX_ERR(3, 1027, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/scalar.pxi":1065
 *                 raise KeyError(key) from exc
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return this value as a Python dict.
*/
  __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1065, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_maps_as_pydicts, Py_None) < (0)) __PYX_ERR(3, 1065, __pyx_L1_error)
  __pyx_t_13 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_12StructScalar_12as_py, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_StructScalar_as_py, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[302])); if (unlikely(!__pyx_t_13)) __PYX_ERR(3, 1065, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_13);
  #endif
  __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_13, __pyx_t_7);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_StructScalar, __pyx_mstate_global->__pyx_n_u_as_py, __pyx_t_13) < (0)) __PYX_ERR(3, 1065, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

  /* "pyarrow/scalar.pxi":1093
 *             return None
 * 
 *     def _as_py_tuple(self):             # <<<<<<<<<<<<<<
 *         # a version that returns a tuple instead of dict to support repr/str
 *         # with the presence of duplicate field names
*/
  __pyx_t_13 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_12StructScalar_14_as_py_tuple, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_StructScalar__as_py_tuple, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[303])); if (unlikely(!__pyx_t_13)) __PYX_ERR(3, 1093, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_13);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_StructScalar, __pyx_mstate_global->__pyx_n_u_as_py_tuple, __pyx_t_13) < (0)) __PYX_ERR(3, 1093, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

  /* "pyarrow/scalar.pxi":1108
 * 
 * 
 * cdef class MapScalar(ListScalar, Mapping):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for map scalars.
*/
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_Mapping); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1108, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_28 = PyTuple_Pack(2, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ListScalar), __pyx_t_7); if (unlikely(!__pyx_t_28)) __PYX_ERR(3, 1108, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1108, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_4 = PyTuple_Pack(3, __pyx_mstate_global->__pyx_n_u_MapScalar, __pyx_t_28, __pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1108, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_13 = __Pyx_PyTuple_GET_ITEM(__pyx_t_4, 1);
  if (unlikely(!CYTHON_ASSUME_SAFE_MACROS && !__pyx_t_13)) __PYX_ERR(3, 1108, __pyx_L1_error)
  __Pyx_INCREF(__pyx_t_13);
  __pyx_t_27 = ((PyTypeObject*)__Pyx_PyTuple_GET_ITEM(__pyx_t_13, 0));
  if (unlikely(!CYTHON_ASSUME_SAFE_MACROS && !__pyx_t_27)) __PYX_ERR(3, 1108, __pyx_L1_error)
  #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
  if (__Pyx_get_runtime_version() < 0x030A0000) {
    __pyx_t_28 = PyObject_GetAttrString((PyObject*)&PyType_Type, "__new__");
    if (unlikely(!__pyx_t_28)) __PYX_ERR(3, 1108, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_28);
    __pyx_t_12 = PyTuple_Pack(1, (PyObject*)&PyType_Type);
    if (unlikely(!__pyx_t_12)) __PYX_ERR(3, 1108, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __pyx_t_6 = PyNumber_Add(__pyx_t_12, __pyx_t_4);
    if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1108, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = PyObject_Call(__pyx_t_28, __pyx_t_6, NULL);
    __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  } else
  #endif
  __pyx_t_7 = __Pyx_PyType_GetSlot(&PyType_Type, tp_new, newfunc)(&PyType_Type, __pyx_t_4, NULL);
  if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1108, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (__Pyx_PyType_GetSlot((PyTypeObject*) __pyx_t_7, tp_base, PyTypeObject*) != __pyx_t_27) {
    __Pyx_TypeName base_name = __Pyx_PyType_GetFullyQualifiedName(__Pyx_PyType_GetSlot((PyTypeObject*) __pyx_t_7, tp_base, PyTypeObject*));
    __Pyx_TypeName type_name = __Pyx_PyType_GetFullyQualifiedName(__pyx_t_27);
    PyErr_Format(PyExc_TypeError, "best base '" __Pyx_FMT_TYPENAME "' must be equal to first base '" __Pyx_FMT_TYPENAME "'",
                 base_name, type_name);
    __Pyx_DECREF_TypeName(base_name);
    __Pyx_DECREF_TypeName(type_name);
    __PYX_ERR(3, 1108, __pyx_L1_error)
  }
  __pyx_t_27 = NULL;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  #if CYTHON_USE_TYPE_SPECS
  if (__Pyx_validate_bases_tuple(__pyx_type_7pyarrow_3lib_MapScalar_spec.name, 0, __pyx_t_13) < (0)) __PYX_ERR(3, 1108, __pyx_L1_error)
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_MapScalar = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7pyarrow_3lib_MapScalar_spec, __pyx_t_13);
  if (unlikely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_MapScalar)) __PYX_ERR(3, 1108, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7pyarrow_3lib_MapScalar_spec, __pyx_mstate->__pyx_ptype_7pyarrow_3lib_MapScalar) < (0)) __PYX_ERR(3, 1108, __pyx_L1_error)
  #else
  __Pyx_INCREF(__pyx_t_13);
  __Pyx_GIVEREF(__pyx_t_13);
  __pyx_type_7pyarrow_3lib_MapScalar.tp_bases = __pyx_t_13;
  __pyx_mstate->__pyx_ptype_7pyarrow_3lib_MapScalar = &__pyx_type_7pyarrow_3lib_MapScalar;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_MapScalar->tp_base = __pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ListScalar;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_MapScalar) < (0)) __PYX_ERR(3, 1108, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_MapScalar);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7pyarrow_3lib_MapScalar->tp_dictoffset && __pyx_mstate->__pyx_ptype_7pyarrow_3lib_MapScalar->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7pyarrow_3lib_MapScalar->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  #if CYTHON_UPDATE_DESCRIPTOR_DOC
  {
    PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_MapScalar, "__getitem__"); if (unlikely(!wrapper)) __PYX_ERR(3, 1108, __pyx_L1_error)
    if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
      __pyx_wrapperbase_7pyarrow_3lib_9MapScalar___getitem__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_7pyarrow_3lib_9MapScalar___getitem__.doc = __pyx_doc_7pyarrow_3lib_9MapScalar___getitem__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_7pyarrow_3lib_9MapScalar___getitem__;
    }
  }
  #endif
  #if CYTHON_UPDATE_DESCRIPTOR_DOC
  {
    PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_mstate->__pyx_ptype_7pyarrow_3lib_MapScalar, "__iter__"); if (unlikely(!wrapper)) __PYX_ERR(3, 1108, __pyx_L1_error)
    if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
      __pyx_wrapperbase_7pyarrow_3lib_9MapScalar_2__iter__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_7pyarrow_3lib_9MapScalar_2__iter__.doc = __pyx_doc_7pyarrow_3lib_9MapScalar_2__iter__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_7pyarrow_3lib_9MapScalar_2__iter__;
    }
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_MapScalar, __pyx_vtabptr_7pyarrow_3lib_MapScalar) < (0)) __PYX_ERR(3, 1108, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7pyarrow_3lib_MapScalar) < (0)) __PYX_ERR(3, 1108, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_MapScalar, (PyObject *) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_MapScalar) < (0)) __PYX_ERR(3, 1108, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SLOTS
  if (__pyx_mstate->__pyx_ptype_7pyarrow_3lib_MapScalar->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_7pyarrow_3lib_MapScalar->tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_3lib_MapScalar, __pyx_base.__pyx_base.__pyx_base.__weakref__);
  #endif
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

  /* "pyarrow/scalar.pxi":1147
 *             yield (k.as_py(), v.as_py())
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return this value as a Python list or dict, depending on 'maps_as_pydicts'.
*/
  __pyx_t_13 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_13)) __PYX_ERR(3, 1147, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  if (PyDict_SetItem(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_maps_as_pydicts, Py_None) < (0)) __PYX_ERR(3, 1147, __pyx_L1_error)
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_9MapScalar_6as_py, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_MapScalar_as_py, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[304])); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1147, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_4, __pyx_t_13);
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_MapScalar, __pyx_mstate_global->__pyx_n_u_as_py, __pyx_t_4) < (0)) __PYX_ERR(3, 1147, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyarrow/scalar.pxi":1192
 *         return result_dict
 * 
 *     def keys(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the keys of the map as a list.
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_9MapScalar_8keys, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_MapScalar_keys, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[305])); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1192, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_MapScalar, __pyx_mstate_global->__pyx_n_u_keys, __pyx_t_4) < (0)) __PYX_ERR(3, 1192, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyarrow/scalar.pxi":1208
 *     """
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def _reconstruct(type, is_valid, index, dictionary):
 *         cdef:
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_16DictionaryScalar_1_reconstruct, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DictionaryScalar__reconstruct, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[306])); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DictionaryScalar, __pyx_mstate_global->__pyx_n_u_reconstruct, __pyx_t_4) < (0)) __PYX_ERR(3, 1208, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_13 = NULL;
  __Pyx_GetNameInClass(__pyx_t_7, (PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DictionaryScalar, __pyx_mstate_global->__pyx_n_u_reconstruct); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_10 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_13, __pyx_t_7};
    __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_staticmethod, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1208, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DictionaryScalar, __pyx_mstate_global->__pyx_n_u_reconstruct, __pyx_t_4) < (0)) __PYX_ERR(3, 1208, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyarrow/scalar.pxi":1247
 *         return Scalar.wrap(<shared_ptr[CScalar]> wrapped)
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         return DictionaryScalar._reconstruct, (
 *             self.type, self.is_valid, self.index, self.dictionary
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_16DictionaryScalar_3__reduce__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DictionaryScalar___reduce, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[307])); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1247, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DictionaryScalar, __pyx_mstate_global->__pyx_n_u_reduce, __pyx_t_4) < (0)) __PYX_ERR(3, 1247, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyarrow/scalar.pxi":1273
 *         return pyarrow_wrap_array(sp.value.dictionary)
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return this encoded value as a Python object.
*/
  __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1273, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_maps_as_pydicts, Py_None) < (0)) __PYX_ERR(3, 1273, __pyx_L1_error)
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_16DictionaryScalar_5as_py, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DictionaryScalar_as_py, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[308])); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1273, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_7, __pyx_t_4);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DictionaryScalar, __pyx_mstate_global->__pyx_n_u_as_py, __pyx_t_7) < (0)) __PYX_ERR(3, 1273, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/scalar.pxi":1306
 *         return Scalar.wrap(sp.value)
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return underlying value as a Python object.
*/
  __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1306, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_maps_as_pydicts, Py_None) < (0)) __PYX_ERR(3, 1306, __pyx_L1_error)
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_19RunEndEncodedScalar_1as_py, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_RunEndEncodedScalar_as_py, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[309])); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1306, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_4, __pyx_t_7);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RunEndEncodedScalar, __pyx_mstate_global->__pyx_n_u_as_py, __pyx_t_4) < (0)) __PYX_ERR(3, 1306, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyarrow/scalar.pxi":1346
 *             return Scalar.wrap(dp.value) if dp.is_valid else None
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return underlying value as a Python object.
*/
  __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1346, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_maps_as_pydicts, Py_None) < (0)) __PYX_ERR(3, 1346, __pyx_L1_error)
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_11UnionScalar_1as_py, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_UnionScalar_as_py, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[310])); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1346, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_7, __pyx_t_4);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_UnionScalar, __pyx_mstate_global->__pyx_n_u_as_py, __pyx_t_7) < (0)) __PYX_ERR(3, 1346, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/scalar.pxi":1389
 *         return Scalar.wrap(sp.value) if sp.is_valid else None
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return this scalar as a Python object.
*/
  __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1389, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_maps_as_pydicts, Py_None) < (0)) __PYX_ERR(3, 1389, __pyx_L1_error)
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_15ExtensionScalar_1as_py, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ExtensionScalar_as_py, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[311])); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1389, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_4, __pyx_t_7);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ExtensionScalar, __pyx_mstate_global->__pyx_n_u_as_py, __pyx_t_4) < (0)) __PYX_ERR(3, 1389, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyarrow/scalar.pxi":1409
 *         return None if self.value is None else self.value.as_py(maps_as_pydicts=maps_as_pydicts)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_storage(BaseExtensionType typ, value):
 *         """
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_15ExtensionScalar_3from_storage, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ExtensionScalar_from_storage, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[312])); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1409, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ExtensionScalar, __pyx_mstate_global->__pyx_n_u_from_storage, __pyx_t_4) < (0)) __PYX_ERR(3, 1409, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_7 = NULL;
  __Pyx_GetNameInClass(__pyx_t_13, (PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ExtensionScalar, __pyx_mstate_global->__pyx_n_u_from_storage); if (unlikely(!__pyx_t_13)) __PYX_ERR(3, 1409, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __pyx_t_10 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_13};
    __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_staticmethod, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1409, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ExtensionScalar, __pyx_mstate_global->__pyx_n_u_from_storage, __pyx_t_4) < (0)) __PYX_ERR(3, 1409, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyarrow/scalar.pxi":1452
 * 
 * 
 * class JsonScalar(ExtensionScalar):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for JSON extension scalar.
*/
  __pyx_t_4 = PyTuple_Pack(1, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ExtensionScalar)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1452, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_13 = __Pyx_PEP560_update_bases(__pyx_t_4); if (unlikely(!__pyx_t_13)) __PYX_ERR(3, 1452, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __pyx_t_7 = __Pyx_CalculateMetaclass(NULL, __pyx_t_13); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1452, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_6 = __Pyx_Py3MetaclassPrepare(__pyx_t_7, __pyx_t_13, __pyx_mstate_global->__pyx_n_u_JsonScalar, __pyx_mstate_global->__pyx_n_u_JsonScalar, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_kp_u_Concrete_class_for_JSON_extensi); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1452, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (__pyx_t_13 != __pyx_t_4) {
    if (unlikely((PyDict_SetItemString(__pyx_t_6, "__orig_bases__", __pyx_t_4) < 0))) __PYX_ERR(3, 1452, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_JsonScalar, __pyx_t_13, __pyx_t_6, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1452, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_JsonScalar, __pyx_t_4) < (0)) __PYX_ERR(3, 1452, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

  /* "pyarrow/scalar.pxi":1458
 * 
 * 
 * class UuidScalar(ExtensionScalar):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for Uuid extension scalar.
*/
  __pyx_t_13 = PyTuple_Pack(1, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ExtensionScalar)); if (unlikely(!__pyx_t_13)) __PYX_ERR(3, 1458, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __pyx_t_7 = __Pyx_PEP560_update_bases(__pyx_t_13); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1458, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_6 = __Pyx_CalculateMetaclass(NULL, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1458, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_6, __pyx_t_7, __pyx_mstate_global->__pyx_n_u_UuidScalar, __pyx_mstate_global->__pyx_n_u_UuidScalar, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_kp_u_Concrete_class_for_Uuid_extensi); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1458, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__pyx_t_7 != __pyx_t_13) {
    if (unlikely((PyDict_SetItemString(__pyx_t_4, "__orig_bases__", __pyx_t_13) < 0))) __PYX_ERR(3, 1458, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

  /* "pyarrow/scalar.pxi":1463
 *     """
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return this scalar as a Python UUID.
*/
  __pyx_t_13 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_13)) __PYX_ERR(3, 1463, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  if (PyDict_SetItem(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_maps_as_pydicts, Py_None) < (0)) __PYX_ERR(3, 1463, __pyx_L1_error)
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_10UuidScalar_1as_py, 0, __pyx_mstate_global->__pyx_n_u_UuidScalar_as_py, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[313])); if (unlikely(!__pyx_t_12)) __PYX_ERR(3, 1463, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_12, __pyx_t_13);
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_as_py, __pyx_t_12) < (0)) __PYX_ERR(3, 1463, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/scalar.pxi":1458
 * 
 * 
 * class UuidScalar(ExtensionScalar):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for Uuid extension scalar.
*/
  __pyx_t_12 = __Pyx_Py3ClassCreate(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_UuidScalar, __pyx_t_7, __pyx_t_4, NULL, 0, 0); if (unlikely(!__pyx_t_12)) __PYX_ERR(3, 1458, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_UuidScalar, __pyx_t_12) < (0)) __PYX_ERR(3, 1458, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/scalar.pxi":1481
 *     """
 * 
 *     def to_numpy(self):             # <<<<<<<<<<<<<<
 *         """
 *         Convert fixed shape tensor scalar to a numpy.ndarray.
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_22FixedShapeTensorScalar_1to_numpy, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_FixedShapeTensorScalar_to_numpy, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[314])); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1481, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_FixedShapeTensorScalar, __pyx_mstate_global->__pyx_n_u_to_numpy, __pyx_t_7) < (0)) __PYX_ERR(3, 1481, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/scalar.pxi":1495
 *         return self.to_tensor().to_numpy()
 * 
 *     def to_tensor(self):             # <<<<<<<<<<<<<<
 *         """
 *         Convert fixed shape tensor extension scalar to a pyarrow.Tensor, using shape
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_22FixedShapeTensorScalar_3to_tensor, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_FixedShapeTensorScalar_to_tensor, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[315])); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1495, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_FixedShapeTensorScalar, __pyx_mstate_global->__pyx_n_u_to_tensor, __pyx_t_7) < (0)) __PYX_ERR(3, 1495, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/scalar.pxi":1529
 *     """
 * 
 *     def as_py(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return this scalar as a Python object.
*/
  __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1529, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_maps_as_pydicts, Py_None) < (0)) __PYX_ERR(3, 1529, __pyx_L1_error)
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_11Bool8Scalar_1as_py, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Bool8Scalar_as_py, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[316])); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1529, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_6);
  #endif
  __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_6, __pyx_t_7);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Bool8Scalar, __pyx_mstate_global->__pyx_n_u_as_py, __pyx_t_6) < (0)) __PYX_ERR(3, 1529, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyarrow/scalar.pxi":1543
 * 
 * cdef dict _scalar_classes = {
 *     _Type_BOOL: BooleanScalar,             # <<<<<<<<<<<<<<
 *     _Type_UINT8: UInt8Scalar,
 *     _Type_UINT16: UInt16Scalar,
*/
  __pyx_t_6 = __Pyx_PyDict_NewPresized(42); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1543, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::BOOL); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1543, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_6, __pyx_t_7, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_BooleanScalar)) < (0)) __PYX_ERR(3, 1543, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/scalar.pxi":1544
 * cdef dict _scalar_classes = {
 *     _Type_BOOL: BooleanScalar,
 *     _Type_UINT8: UInt8Scalar,             # <<<<<<<<<<<<<<
 *     _Type_UINT16: UInt16Scalar,
 *     _Type_UINT32: UInt32Scalar,
*/
  __pyx_t_7 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::UINT8); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1544, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_6, __pyx_t_7, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_UInt8Scalar)) < (0)) __PYX_ERR(3, 1543, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/scalar.pxi":1545
 *     _Type_BOOL: BooleanScalar,
 *     _Type_UINT8: UInt8Scalar,
 *     _Type_UINT16: UInt16Scalar,             # <<<<<<<<<<<<<<
 *     _Type_UINT32: UInt32Scalar,
 *     _Type_UINT64: UInt64Scalar,
*/
  __pyx_t_7 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::UINT16); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1545, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_6, __pyx_t_7, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_UInt16Scalar)) < (0)) __PYX_ERR(3, 1543, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/scalar.pxi":1546
 *     _Type_UINT8: UInt8Scalar,
 *     _Type_UINT16: UInt16Scalar,
 *     _Type_UINT32: UInt32Scalar,             # <<<<<<<<<<<<<<
 *     _Type_UINT64: UInt64Scalar,
 *     _Type_INT8: Int8Scalar,
*/
  __pyx_t_7 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::UINT32); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1546, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_6, __pyx_t_7, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_UInt32Scalar)) < (0)) __PYX_ERR(3, 1543, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/scalar.pxi":1547
 *     _Type_UINT16: UInt16Scalar,
 *     _Type_UINT32: UInt32Scalar,
 *     _Type_UINT64: UInt64Scalar,             # <<<<<<<<<<<<<<
 *     _Type_INT8: Int8Scalar,
 *     _Type_INT16: Int16Scalar,
*/
  __pyx_t_7 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::UINT64); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1547, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_6, __pyx_t_7, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_UInt64Scalar)) < (0)) __PYX_ERR(3, 1543, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/scalar.pxi":1548
 *     _Type_UINT32: UInt32Scalar,
 *     _Type_UINT64: UInt64Scalar,
 *     _Type_INT8: Int8Scalar,             # <<<<<<<<<<<<<<
 *     _Type_INT16: Int16Scalar,
 *     _Type_INT32: Int32Scalar,
*/
  __pyx_t_7 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::INT8); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1548, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_6, __pyx_t_7, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Int8Scalar)) < (0)) __PYX_ERR(3, 1543, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/scalar.pxi":1549
 *     _Type_UINT64: UInt64Scalar,
 *     _Type_INT8: Int8Scalar,
 *     _Type_INT16: Int16Scalar,             # <<<<<<<<<<<<<<
 *     _Type_INT32: Int32Scalar,
 *     _Type_INT64: Int64Scalar,
*/
  __pyx_t_7 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::INT16); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1549, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_6, __pyx_t_7, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Int16Scalar)) < (0)) __PYX_ERR(3, 1543, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/scalar.pxi":1550
 *     _Type_INT8: Int8Scalar,
 *     _Type_INT16: Int16Scalar,
 *     _Type_INT32: Int32Scalar,             # <<<<<<<<<<<<<<
 *     _Type_INT64: Int64Scalar,
 *     _Type_HALF_FLOAT: HalfFloatScalar,
*/
  __pyx_t_7 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::INT32); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1550, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_6, __pyx_t_7, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Int32Scalar)) < (0)) __PYX_ERR(3, 1543, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/scalar.pxi":1551
 *     _Type_INT16: Int16Scalar,
 *     _Type_INT32: Int32Scalar,
 *     _Type_INT64: Int64Scalar,             # <<<<<<<<<<<<<<
 *     _Type_HALF_FLOAT: HalfFloatScalar,
 *     _Type_FLOAT: FloatScalar,
*/
  __pyx_t_7 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::INT64); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1551, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_6, __pyx_t_7, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Int64Scalar)) < (0)) __PYX_ERR(3, 1543, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/scalar.pxi":1552
 *     _Type_INT32: Int32Scalar,
 *     _Type_INT64: Int64Scalar,
 *     _Type_HALF_FLOAT: HalfFloatScalar,             # <<<<<<<<<<<<<<
 *     _Type_FLOAT: FloatScalar,
 *     _Type_DOUBLE: DoubleScalar,
*/
  __pyx_t_7 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::HALF_FLOAT); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1552, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_6, __pyx_t_7, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_HalfFloatScalar)) < (0)) __PYX_ERR(3, 1543, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/scalar.pxi":1553
 *     _Type_INT64: Int64Scalar,
 *     _Type_HALF_FLOAT: HalfFloatScalar,
 *     _Type_FLOAT: FloatScalar,             # <<<<<<<<<<<<<<
 *     _Type_DOUBLE: DoubleScalar,
 *     _Type_DECIMAL32: Decimal32Scalar,
*/
  __pyx_t_7 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::FLOAT); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1553, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_6, __pyx_t_7, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_FloatScalar)) < (0)) __PYX_ERR(3, 1543, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/scalar.pxi":1554
 *     _Type_HALF_FLOAT: HalfFloatScalar,
 *     _Type_FLOAT: FloatScalar,
 *     _Type_DOUBLE: DoubleScalar,             # <<<<<<<<<<<<<<
 *     _Type_DECIMAL32: Decimal32Scalar,
 *     _Type_DECIMAL64: Decimal64Scalar,
*/
  __pyx_t_7 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::DOUBLE); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1554, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_6, __pyx_t_7, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DoubleScalar)) < (0)) __PYX_ERR(3, 1543, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/scalar.pxi":1555
 *     _Type_FLOAT: FloatScalar,
 *     _Type_DOUBLE: DoubleScalar,
 *     _Type_DECIMAL32: Decimal32Scalar,             # <<<<<<<<<<<<<<
 *     _Type_DECIMAL64: Decimal64Scalar,
 *     _Type_DECIMAL128: Decimal128Scalar,
*/
  __pyx_t_7 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::DECIMAL32); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1555, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_6, __pyx_t_7, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Decimal32Scalar)) < (0)) __PYX_ERR(3, 1543, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/scalar.pxi":1556
 *     _Type_DOUBLE: DoubleScalar,
 *     _Type_DECIMAL32: Decimal32Scalar,
 *     _Type_DECIMAL64: Decimal64Scalar,             # <<<<<<<<<<<<<<
 *     _Type_DECIMAL128: Decimal128Scalar,
 *     _Type_DECIMAL256: Decimal256Scalar,
*/
  __pyx_t_7 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::DECIMAL64); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1556, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_6, __pyx_t_7, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Decimal64Scalar)) < (0)) __PYX_ERR(3, 1543, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/scalar.pxi":1557
 *     _Type_DECIMAL32: Decimal32Scalar,
 *     _Type_DECIMAL64: Decimal64Scalar,
 *     _Type_DECIMAL128: Decimal128Scalar,             # <<<<<<<<<<<<<<
 *     _Type_DECIMAL256: Decimal256Scalar,
 *     _Type_DATE32: Date32Scalar,
*/
  __pyx_t_7 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::DECIMAL128); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1557, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_6, __pyx_t_7, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Decimal128Scalar)) < (0)) __PYX_ERR(3, 1543, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/scalar.pxi":1558
 *     _Type_DECIMAL64: Decimal64Scalar,
 *     _Type_DECIMAL128: Decimal128Scalar,
 *     _Type_DECIMAL256: Decimal256Scalar,             # <<<<<<<<<<<<<<
 *     _Type_DATE32: Date32Scalar,
 *     _Type_DATE64: Date64Scalar,
*/
  __pyx_t_7 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::DECIMAL256); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1558, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_6, __pyx_t_7, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Decimal256Scalar)) < (0)) __PYX_ERR(3, 1543, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/scalar.pxi":1559
 *     _Type_DECIMAL128: Decimal128Scalar,
 *     _Type_DECIMAL256: Decimal256Scalar,
 *     _Type_DATE32: Date32Scalar,             # <<<<<<<<<<<<<<
 *     _Type_DATE64: Date64Scalar,
 *     _Type_TIME32: Time32Scalar,
*/
  __pyx_t_7 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::DATE32); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1559, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_6, __pyx_t_7, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Date32Scalar)) < (0)) __PYX_ERR(3, 1543, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/scalar.pxi":1560
 *     _Type_DECIMAL256: Decimal256Scalar,
 *     _Type_DATE32: Date32Scalar,
 *     _Type_DATE64: Date64Scalar,             # <<<<<<<<<<<<<<
 *     _Type_TIME32: Time32Scalar,
 *     _Type_TIME64: Time64Scalar,
*/
  __pyx_t_7 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::DATE64); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1560, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_6, __pyx_t_7, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Date64Scalar)) < (0)) __PYX_ERR(3, 1543, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/scalar.pxi":1561
 *     _Type_DATE32: Date32Scalar,
 *     _Type_DATE64: Date64Scalar,
 *     _Type_TIME32: Time32Scalar,             # <<<<<<<<<<<<<<
 *     _Type_TIME64: Time64Scalar,
 *     _Type_TIMESTAMP: TimestampScalar,
*/
  __pyx_t_7 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::TIME32); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1561, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_6, __pyx_t_7, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Time32Scalar)) < (0)) __PYX_ERR(3, 1543, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/scalar.pxi":1562
 *     _Type_DATE64: Date64Scalar,
 *     _Type_TIME32: Time32Scalar,
 *     _Type_TIME64: Time64Scalar,             # <<<<<<<<<<<<<<
 *     _Type_TIMESTAMP: TimestampScalar,
 *     _Type_DURATION: DurationScalar,
*/
  __pyx_t_7 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::TIME64); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1562, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_6, __pyx_t_7, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Time64Scalar)) < (0)) __PYX_ERR(3, 1543, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/scalar.pxi":1563
 *     _Type_TIME32: Time32Scalar,
 *     _Type_TIME64: Time64Scalar,
 *     _Type_TIMESTAMP: TimestampScalar,             # <<<<<<<<<<<<<<
 *     _Type_DURATION: DurationScalar,
 *     _Type_BINARY: BinaryScalar,
*/
  __pyx_t_7 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::TIMESTAMP); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1563, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_6, __pyx_t_7, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_TimestampScalar)) < (0)) __PYX_ERR(3, 1543, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/scalar.pxi":1564
 *     _Type_TIME64: Time64Scalar,
 *     _Type_TIMESTAMP: TimestampScalar,
 *     _Type_DURATION: DurationScalar,             # <<<<<<<<<<<<<<
 *     _Type_BINARY: BinaryScalar,
 *     _Type_LARGE_BINARY: LargeBinaryScalar,
*/
  __pyx_t_7 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::DURATION); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1564, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_6, __pyx_t_7, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DurationScalar)) < (0)) __PYX_ERR(3, 1543, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/scalar.pxi":1565
 *     _Type_TIMESTAMP: TimestampScalar,
 *     _Type_DURATION: DurationScalar,
 *     _Type_BINARY: BinaryScalar,             # <<<<<<<<<<<<<<
 *     _Type_LARGE_BINARY: LargeBinaryScalar,
 *     _Type_FIXED_SIZE_BINARY: FixedSizeBinaryScalar,
*/
  __pyx_t_7 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::BINARY); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1565, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_6, __pyx_t_7, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_BinaryScalar)) < (0)) __PYX_ERR(3, 1543, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/scalar.pxi":1566
 *     _Type_DURATION: DurationScalar,
 *     _Type_BINARY: BinaryScalar,
 *     _Type_LARGE_BINARY: LargeBinaryScalar,             # <<<<<<<<<<<<<<
 *     _Type_FIXED_SIZE_BINARY: FixedSizeBinaryScalar,
 *     _Type_BINARY_VIEW: BinaryViewScalar,
*/
  __pyx_t_7 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::LARGE_BINARY); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1566, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_6, __pyx_t_7, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_LargeBinaryScalar)) < (0)) __PYX_ERR(3, 1543, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/scalar.pxi":1567
 *     _Type_BINARY: BinaryScalar,
 *     _Type_LARGE_BINARY: LargeBinaryScalar,
 *     _Type_FIXED_SIZE_BINARY: FixedSizeBinaryScalar,             # <<<<<<<<<<<<<<
 *     _Type_BINARY_VIEW: BinaryViewScalar,
 *     _Type_STRING: StringScalar,
*/
  __pyx_t_7 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::FIXED_SIZE_BINARY); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1567, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_6, __pyx_t_7, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_FixedSizeBinaryScalar)) < (0)) __PYX_ERR(3, 1543, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/scalar.pxi":1568
 *     _Type_LARGE_BINARY: LargeBinaryScalar,
 *     _Type_FIXED_SIZE_BINARY: FixedSizeBinaryScalar,
 *     _Type_BINARY_VIEW: BinaryViewScalar,             # <<<<<<<<<<<<<<
 *     _Type_STRING: StringScalar,
 *     _Type_LARGE_STRING: LargeStringScalar,
*/
  __pyx_t_7 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::BINARY_VIEW); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1568, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_6, __pyx_t_7, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_BinaryViewScalar)) < (0)) __PYX_ERR(3, 1543, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/scalar.pxi":1569
 *     _Type_FIXED_SIZE_BINARY: FixedSizeBinaryScalar,
 *     _Type_BINARY_VIEW: BinaryViewScalar,
 *     _Type_STRING: StringScalar,             # <<<<<<<<<<<<<<
 *     _Type_LARGE_STRING: LargeStringScalar,
 *     _Type_STRING_VIEW: StringViewScalar,
*/
  __pyx_t_7 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::STRING); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1569, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_6, __pyx_t_7, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_StringScalar)) < (0)) __PYX_ERR(3, 1543, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/scalar.pxi":1570
 *     _Type_BINARY_VIEW: BinaryViewScalar,
 *     _Type_STRING: StringScalar,
 *     _Type_LARGE_STRING: LargeStringScalar,             # <<<<<<<<<<<<<<
 *     _Type_STRING_VIEW: StringViewScalar,
 *     _Type_LIST: ListScalar,
*/
  __pyx_t_7 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::LARGE_STRING); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1570, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_6, __pyx_t_7, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_LargeStringScalar)) < (0)) __PYX_ERR(3, 1543, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/scalar.pxi":1571
 *     _Type_STRING: StringScalar,
 *     _Type_LARGE_STRING: LargeStringScalar,
 *     _Type_STRING_VIEW: StringViewScalar,             # <<<<<<<<<<<<<<
 *     _Type_LIST: ListScalar,
 *     _Type_LARGE_LIST: LargeListScalar,
*/
  __pyx_t_7 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::STRING_VIEW); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1571, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_6, __pyx_t_7, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_StringViewScalar)) < (0)) __PYX_ERR(3, 1543, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/scalar.pxi":1572
 *     _Type_LARGE_STRING: LargeStringScalar,
 *     _Type_STRING_VIEW: StringViewScalar,
 *     _Type_LIST: ListScalar,             # <<<<<<<<<<<<<<
 *     _Type_LARGE_LIST: LargeListScalar,
 *     _Type_FIXED_SIZE_LIST: FixedSizeListScalar,
*/
  __pyx_t_7 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::LIST); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1572, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_6, __pyx_t_7, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ListScalar)) < (0)) __PYX_ERR(3, 1543, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/scalar.pxi":1573
 *     _Type_STRING_VIEW: StringViewScalar,
 *     _Type_LIST: ListScalar,
 *     _Type_LARGE_LIST: LargeListScalar,             # <<<<<<<<<<<<<<
 *     _Type_FIXED_SIZE_LIST: FixedSizeListScalar,
 *     _Type_LIST_VIEW: ListViewScalar,
*/
  __pyx_t_7 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::LARGE_LIST); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1573, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_6, __pyx_t_7, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_LargeListScalar)) < (0)) __PYX_ERR(3, 1543, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/scalar.pxi":1574
 *     _Type_LIST: ListScalar,
 *     _Type_LARGE_LIST: LargeListScalar,
 *     _Type_FIXED_SIZE_LIST: FixedSizeListScalar,             # <<<<<<<<<<<<<<
 *     _Type_LIST_VIEW: ListViewScalar,
 *     _Type_LARGE_LIST_VIEW: LargeListViewScalar,
*/
  __pyx_t_7 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::FIXED_SIZE_LIST); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1574, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_6, __pyx_t_7, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_FixedSizeListScalar)) < (0)) __PYX_ERR(3, 1543, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/scalar.pxi":1575
 *     _Type_LARGE_LIST: LargeListScalar,
 *     _Type_FIXED_SIZE_LIST: FixedSizeListScalar,
 *     _Type_LIST_VIEW: ListViewScalar,             # <<<<<<<<<<<<<<
 *     _Type_LARGE_LIST_VIEW: LargeListViewScalar,
 *     _Type_STRUCT: StructScalar,
*/
  __pyx_t_7 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::LIST_VIEW); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1575, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_6, __pyx_t_7, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ListViewScalar)) < (0)) __PYX_ERR(3, 1543, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/scalar.pxi":1576
 *     _Type_FIXED_SIZE_LIST: FixedSizeListScalar,
 *     _Type_LIST_VIEW: ListViewScalar,
 *     _Type_LARGE_LIST_VIEW: LargeListViewScalar,             # <<<<<<<<<<<<<<
 *     _Type_STRUCT: StructScalar,
 *     _Type_MAP: MapScalar,
*/
  __pyx_t_7 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::LARGE_LIST_VIEW); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1576, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_6, __pyx_t_7, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_LargeListViewScalar)) < (0)) __PYX_ERR(3, 1543, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/scalar.pxi":1577
 *     _Type_LIST_VIEW: ListViewScalar,
 *     _Type_LARGE_LIST_VIEW: LargeListViewScalar,
 *     _Type_STRUCT: StructScalar,             # <<<<<<<<<<<<<<
 *     _Type_MAP: MapScalar,
 *     _Type_DICTIONARY: DictionaryScalar,
*/
  __pyx_t_7 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::STRUCT); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1577, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_6, __pyx_t_7, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_StructScalar)) < (0)) __PYX_ERR(3, 1543, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/scalar.pxi":1578
 *     _Type_LARGE_LIST_VIEW: LargeListViewScalar,
 *     _Type_STRUCT: StructScalar,
 *     _Type_MAP: MapScalar,             # <<<<<<<<<<<<<<
 *     _Type_DICTIONARY: DictionaryScalar,
 *     _Type_RUN_END_ENCODED: RunEndEncodedScalar,
*/
  __pyx_t_7 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::MAP); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1578, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_6, __pyx_t_7, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_MapScalar)) < (0)) __PYX_ERR(3, 1543, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/scalar.pxi":1579
 *     _Type_STRUCT: StructScalar,
 *     _Type_MAP: MapScalar,
 *     _Type_DICTIONARY: DictionaryScalar,             # <<<<<<<<<<<<<<
 *     _Type_RUN_END_ENCODED: RunEndEncodedScalar,
 *     _Type_SPARSE_UNION: UnionScalar,
*/
  __pyx_t_7 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::DICTIONARY); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1579, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_6, __pyx_t_7, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DictionaryScalar)) < (0)) __PYX_ERR(3, 1543, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/scalar.pxi":1580
 *     _Type_MAP: MapScalar,
 *     _Type_DICTIONARY: DictionaryScalar,
 *     _Type_RUN_END_ENCODED: RunEndEncodedScalar,             # <<<<<<<<<<<<<<
 *     _Type_SPARSE_UNION: UnionScalar,
 *     _Type_DENSE_UNION: UnionScalar,
*/
  __pyx_t_7 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::RUN_END_ENCODED); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1580, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_6, __pyx_t_7, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RunEndEncodedScalar)) < (0)) __PYX_ERR(3, 1543, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/scalar.pxi":1581
 *     _Type_DICTIONARY: DictionaryScalar,
 *     _Type_RUN_END_ENCODED: RunEndEncodedScalar,
 *     _Type_SPARSE_UNION: UnionScalar,             # <<<<<<<<<<<<<<
 *     _Type_DENSE_UNION: UnionScalar,
 *     _Type_INTERVAL_MONTH_DAY_NANO: MonthDayNanoIntervalScalar,
*/
  __pyx_t_7 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::SPARSE_UNION); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1581, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_6, __pyx_t_7, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_UnionScalar)) < (0)) __PYX_ERR(3, 1543, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/scalar.pxi":1582
 *     _Type_RUN_END_ENCODED: RunEndEncodedScalar,
 *     _Type_SPARSE_UNION: UnionScalar,
 *     _Type_DENSE_UNION: UnionScalar,             # <<<<<<<<<<<<<<
 *     _Type_INTERVAL_MONTH_DAY_NANO: MonthDayNanoIntervalScalar,
 *     _Type_EXTENSION: ExtensionScalar,
*/
  __pyx_t_7 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::DENSE_UNION); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1582, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_6, __pyx_t_7, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_UnionScalar)) < (0)) __PYX_ERR(3, 1543, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/scalar.pxi":1583
 *     _Type_SPARSE_UNION: UnionScalar,
 *     _Type_DENSE_UNION: UnionScalar,
 *     _Type_INTERVAL_MONTH_DAY_NANO: MonthDayNanoIntervalScalar,             # <<<<<<<<<<<<<<
 *     _Type_EXTENSION: ExtensionScalar,
 * }
*/
  __pyx_t_7 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::INTERVAL_MONTH_DAY_NANO); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1583, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_6, __pyx_t_7, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_MonthDayNanoIntervalScalar)) < (0)) __PYX_ERR(3, 1543, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/scalar.pxi":1584
 *     _Type_DENSE_UNION: UnionScalar,
 *     _Type_INTERVAL_MONTH_DAY_NANO: MonthDayNanoIntervalScalar,
 *     _Type_EXTENSION: ExtensionScalar,             # <<<<<<<<<<<<<<
 * }
 * 
*/
  __pyx_t_7 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::EXTENSION); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1584, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_6, __pyx_t_7, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ExtensionScalar)) < (0)) __PYX_ERR(3, 1543, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_XGOTREF(__pyx_v_7pyarrow_3lib__scalar_classes);
  __Pyx_DECREF_SET(__pyx_v_7pyarrow_3lib__scalar_classes, ((PyObject*)__pyx_t_6));
  __Pyx_GIVEREF(__pyx_t_6);
  __pyx_t_6 = 0;

  /* "pyarrow/scalar.pxi":1601
 * 
 * 
 * def scalar(value, type=None, *, from_pandas=None, MemoryPool memory_pool=None):             # <<<<<<<<<<<<<<
 *     """
 *     Create a pyarrow.Scalar instance from a Python object.
*/
  __pyx_t_6 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1601, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_from_pandas, Py_None) < (0)) __PYX_ERR(3, 1601, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_memory_pool, Py_None) < (0)) __PYX_ERR(3, 1601, __pyx_L1_error)
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_189scalar, 0, __pyx_mstate_global->__pyx_n_u_scalar, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[317])); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1601, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_mstate_global->__pyx_tuple[7]);
  __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_7, __pyx_t_6);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_scalar, __pyx_t_7) < (0)) __PYX_ERR(3, 1601, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/array.pxi":20
 * from cpython.pycapsule cimport PyCapsule_CheckExact, PyCapsule_GetPointer, PyCapsule_New
 * 
 * from collections.abc import Sequence             # <<<<<<<<<<<<<<
 * import os
 * import warnings
*/
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Sequence};
    __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_collections_abc, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 20, __pyx_L1_error)
  }
  __pyx_t_7 = __pyx_t_1;
  __Pyx_GOTREF(__pyx_t_7);
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Sequence};
    __pyx_t_3 = 0; {
      __pyx_t_6 = __Pyx_ImportFrom(__pyx_t_7, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 20, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_6) < (0)) __PYX_ERR(4, 20, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/array.pxi":21
 * 
 * from collections.abc import Sequence
 * import os             # <<<<<<<<<<<<<<
 * import warnings
 * from cython import sizeof
*/
  __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_os, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 21, __pyx_L1_error)
  __pyx_t_7 = __pyx_t_1;
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_os, __pyx_t_7) < (0)) __PYX_ERR(4, 21, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/array.pxi":22
 * from collections.abc import Sequence
 * import os
 * import warnings             # <<<<<<<<<<<<<<
 * from cython import sizeof
 * 
*/
  __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_warnings, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 22, __pyx_L1_error)
  __pyx_t_7 = __pyx_t_1;
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_warnings, __pyx_t_7) < (0)) __PYX_ERR(4, 22, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/array.pxi":64
 * 
 * 
 * def _ndarray_to_arrow_type(object values, DataType type):             # <<<<<<<<<<<<<<
 *     return pyarrow_wrap_data_type(_ndarray_to_type(values, type))
 * 
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_191_ndarray_to_arrow_type, 0, __pyx_mstate_global->__pyx_n_u_ndarray_to_arrow_type, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[318])); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 64, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_ndarray_to_arrow_type, __pyx_t_7) < (0)) __PYX_ERR(4, 64, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/array.pxi":113
 * 
 * 
 * def _handle_arrow_array_protocol(obj, type, mask, size):             # <<<<<<<<<<<<<<
 *     if mask is not None or size is not None:
 *         raise ValueError(
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_193_handle_arrow_array_protocol, 0, __pyx_mstate_global->__pyx_n_u_handle_arrow_array_protocol, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[319])); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 113, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_handle_arrow_array_protocol, __pyx_t_7) < (0)) __PYX_ERR(4, 113, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/array.pxi":130
 * 
 * def array(object obj, type=None, mask=None, size=None, from_pandas=None,
 *           bint safe=True, MemoryPool memory_pool=None):             # <<<<<<<<<<<<<<
 *     """
 *     Create pyarrow.Array instance from a Python object.
*/
  __pyx_t_7 = __Pyx_PyBool_FromLong(((int)1)); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 130, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);

  /* "pyarrow/array.pxi":129
 * 
 * 
 * def array(object obj, type=None, mask=None, size=None, from_pandas=None,             # <<<<<<<<<<<<<<
 *           bint safe=True, MemoryPool memory_pool=None):
 *     """
*/
  __pyx_t_6 = PyTuple_Pack(6, Py_None, Py_None, Py_None, Py_None, __pyx_t_7, Py_None); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 129, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_195array, 0, __pyx_mstate_global->__pyx_n_u_array, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[320])); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 129, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_t_6);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_array, __pyx_t_7) < (0)) __PYX_ERR(4, 129, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/array.pxi":382
 * 
 * 
 * def asarray(values, type=None):             # <<<<<<<<<<<<<<
 *     """
 *     Convert to pyarrow.Array, inferring type if not provided.
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_197asarray, 0, __pyx_mstate_global->__pyx_n_u_asarray, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[321])); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 382, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_mstate_global->__pyx_tuple[7]);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_asarray, __pyx_t_7) < (0)) __PYX_ERR(4, 382, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/array.pxi":408
 * 
 * 
 * def nulls(size, type=None, MemoryPool memory_pool=None):             # <<<<<<<<<<<<<<
 *     """
 *     Create a strongly-typed Array instance with all elements null.
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_199nulls, 0, __pyx_mstate_global->__pyx_n_u_nulls, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[322])); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 408, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_mstate_global->__pyx_tuple[24]);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_nulls, __pyx_t_7) < (0)) __PYX_ERR(4, 408, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/array.pxi":458
 * 
 * 
 * def repeat(value, size, MemoryPool memory_pool=None):             # <<<<<<<<<<<<<<
 *     """
 *     Create an Array instance whose slots are the given scalar.
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_201repeat, 0, __pyx_mstate_global->__pyx_n_u_repeat, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[323])); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 458, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_mstate_global->__pyx_tuple[7]);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_repeat, __pyx_t_7) < (0)) __PYX_ERR(4, 458, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/array.pxi":546
 * 
 * 
 * def infer_type(values, mask=None, from_pandas=False):             # <<<<<<<<<<<<<<
 *     """
 *     Attempt to infer Arrow data type that can hold the passed Python
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_203infer_type, 0, __pyx_mstate_global->__pyx_n_u_infer_type, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[324])); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 546, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_mstate_global->__pyx_tuple[26]);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_infer_type, __pyx_t_7) < (0)) __PYX_ERR(4, 546, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/array.pxi":575
 * 
 * 
 * def arange(int64_t start, int64_t stop, int64_t step=1, *, memory_pool=None):             # <<<<<<<<<<<<<<
 *     """
 *     Create an array of evenly spaced values within a given interval.
*/
  __pyx_t_7 = __Pyx_PyLong_From_int64_t(((int64_t)1)); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 575, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_6 = PyTuple_Pack(1, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 575, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 575, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_memory_pool, Py_None) < (0)) __PYX_ERR(4, 575, __pyx_L1_error)
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_205arange, 0, __pyx_mstate_global->__pyx_n_u_arange, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[325])); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 575, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_t_6);
  __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_4, __pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_arange, __pyx_t_4) < (0)) __PYX_ERR(4, 575, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyarrow/array.pxi":609
 * 
 * 
 * def _normalize_slice(object arrow_obj, slice key):             # <<<<<<<<<<<<<<
 *     """
 *     Slices with step not equal to 1 (or None) will produce a copy
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_207_normalize_slice, 0, __pyx_mstate_global->__pyx_n_u_normalize_slice, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[326])); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 609, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_normalize_slice, __pyx_t_4) < (0)) __PYX_ERR(4, 609, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyarrow/array.pxi":735
 * 
 * 
 * def _restore_array(data):             # <<<<<<<<<<<<<<
 *     """
 *     Reconstruct an Array from pickled ArrayData.
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_209_restore_array, 0, __pyx_mstate_global->__pyx_n_u_restore_array, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[327])); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 735, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_restore_array, __pyx_t_4) < (0)) __PYX_ERR(4, 735, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.sp_statistics cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_15ArrayStatistics_5__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ArrayStatistics___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[328])); if (unlikely(!__pyx_t_4)) __PYX_ERR(7, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_4) < (0)) __PYX_ERR(7, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "self.sp_statistics cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.sp_statistics cannot be converted to a Python object for pickling"
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_15ArrayStatistics_7__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ArrayStatistics___setstate_cytho, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[329])); if (unlikely(!__pyx_t_4)) __PYX_ERR(7, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_4) < (0)) __PYX_ERR(7, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyarrow/array.pxi":866
 * cdef class _PandasConvertible(_Weakrefable):
 * 
 *     def to_pandas(             # <<<<<<<<<<<<<<
 *             self,
 *             memory_pool=None,
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_18_PandasConvertible_1to_pandas, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PandasConvertible_to_pandas, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[330])); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 866, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[27]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__PandasConvertible, __pyx_mstate_global->__pyx_n_u_to_pandas_2, __pyx_t_4) < (0)) __PYX_ERR(4, 866, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_18_PandasConvertible_3__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PandasConvertible___reduce_cyth, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[331])); if (unlikely(!__pyx_t_4)) __PYX_ERR(7, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__PandasConvertible, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_4) < (0)) __PYX_ERR(7, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle__PandasConvertible, (type(self), 0xe3b0c44, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle__PandasConvertible__set_state(self, __pyx_state)
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_18_PandasConvertible_5__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PandasConvertible___setstate_cy, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[332])); if (unlikely(!__pyx_t_4)) __PYX_ERR(7, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__PandasConvertible, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_4) < (0)) __PYX_ERR(7, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyarrow/array.pxi":1098
 *         self.type = pyarrow_wrap_data_type(self.sp_array.get().type())
 * 
 *     def _debug_print(self):             # <<<<<<<<<<<<<<
 *         with nogil:
 *             check_status(DebugPrint(deref(self.ap), 0))
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_5Array_3_debug_print, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Array__debug_print, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[333])); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 1098, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array, __pyx_mstate_global->__pyx_n_u_debug_print, __pyx_t_4) < (0)) __PYX_ERR(4, 1098, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyarrow/array.pxi":1102
 *             check_status(DebugPrint(deref(self.ap), 0))
 * 
 *     def diff(self, Array other):             # <<<<<<<<<<<<<<
 *         """
 *         Compare contents of this array against another one.
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_5Array_5diff, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Array_diff, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[334])); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 1102, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array, __pyx_mstate_global->__pyx_n_u_diff, __pyx_t_4) < (0)) __PYX_ERR(4, 1102, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyarrow/array.pxi":1139
 *         return frombytes(result, safe=True)
 * 
 *     def cast(self, object target_type=None, safe=None, options=None, memory_pool=None):             # <<<<<<<<<<<<<<
 *         """
 *         Cast array values to another data type
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_5Array_7cast, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Array_cast, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[335])); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 1139, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[25]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array, __pyx_mstate_global->__pyx_n_u_cast, __pyx_t_4) < (0)) __PYX_ERR(4, 1139, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyarrow/array.pxi":1164
 *                           options=options, memory_pool=memory_pool)
 * 
 *     def view(self, object target_type):             # <<<<<<<<<<<<<<
 *         """
 *         Return zero-copy "view" of array as another data type.
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_5Array_9view, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Array_view, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[336])); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 1164, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array, __pyx_mstate_global->__pyx_n_u_view, __pyx_t_4) < (0)) __PYX_ERR(4, 1164, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyarrow/array.pxi":1186
 *         return pyarrow_wrap_array(result)
 * 
 *     def sum(self, **kwargs):             # <<<<<<<<<<<<<<
 *         """
 *         Sum the values in a numerical array.
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_5Array_11sum, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Array_sum, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[337])); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 1186, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array, __pyx_mstate_global->__pyx_n_u_sum, __pyx_t_4) < (0)) __PYX_ERR(4, 1186, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyarrow/array.pxi":1206
 *         return _pc().call_function('sum', [self], options)
 * 
 *     def unique(self):             # <<<<<<<<<<<<<<
 *         """
 *         Compute distinct elements in array.
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_5Array_13unique, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Array_unique, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[338])); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 1206, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array, __pyx_mstate_global->__pyx_n_u_unique, __pyx_t_4) < (0)) __PYX_ERR(4, 1206, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyarrow/array.pxi":1218
 *         return _pc().call_function('unique', [self])
 * 
 *     def dictionary_encode(self, null_encoding='mask'):             # <<<<<<<<<<<<<<
 *         """
 *         Compute dictionary-encoded representation of array.
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_5Array_15dictionary_encode, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Array_dictionary_encode, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[339])); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 1218, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[28]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array, __pyx_mstate_global->__pyx_n_u_dictionary_encode, __pyx_t_4) < (0)) __PYX_ERR(4, 1218, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyarrow/array.pxi":1238
 *         return _pc().call_function('dictionary_encode', [self], options)
 * 
 *     def value_counts(self):             # <<<<<<<<<<<<<<
 *         """
 *         Compute counts of unique elements in array.
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_5Array_17value_counts, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Array_value_counts, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[340])); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 1238, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array, __pyx_mstate_global->__pyx_n_u_value_counts, __pyx_t_4) < (0)) __PYX_ERR(4, 1238, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyarrow/array.pxi":1250
 *         return _pc().call_function('value_counts', [self])
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_pandas(obj, mask=None, type=None, bint safe=True,
 *                     MemoryPool memory_pool=None):
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_5Array_19from_pandas, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Array_from_pandas, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[341])); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 1250, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[29]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array, __pyx_mstate_global->__pyx_n_u_from_pandas, __pyx_t_4) < (0)) __PYX_ERR(4, 1250, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_7 = NULL;
  __Pyx_GetNameInClass(__pyx_t_6, (PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array, __pyx_mstate_global->__pyx_n_u_from_pandas); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 1250, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_10 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_6};
    __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_staticmethod, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 1250, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array, __pyx_mstate_global->__pyx_n_u_from_pandas, __pyx_t_4) < (0)) __PYX_ERR(4, 1250, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyarrow/array.pxi":1288
 *                      memory_pool=memory_pool)
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         self._assert_cpu()
 *         return _restore_array, \
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_5Array_21__reduce__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Array___reduce, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[342])); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 1288, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array, __pyx_mstate_global->__pyx_n_u_reduce, __pyx_t_4) < (0)) __PYX_ERR(4, 1288, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyarrow/array.pxi":1293
 *             (_reduce_array_data(self.sp_array.get().data().get()),)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_buffers(DataType type, length, buffers, null_count=-1, offset=0,
 *                      children=None):
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_5Array_23from_buffers, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Array_from_buffers, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[343])); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 1293, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[30]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array, __pyx_mstate_global->__pyx_n_u_from_buffers, __pyx_t_4) < (0)) __PYX_ERR(4, 1293, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_6 = NULL;
  __Pyx_GetNameInClass(__pyx_t_7, (PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array, __pyx_mstate_global->__pyx_n_u_from_buffers); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 1293, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_10 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_7};
    __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_staticmethod, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 1293, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array, __pyx_mstate_global->__pyx_n_u_from_buffers, __pyx_t_4) < (0)) __PYX_ERR(4, 1293, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyarrow/array.pxi":1389
 *         return size
 * 
 *     def get_total_buffer_size(self):             # <<<<<<<<<<<<<<
 *         """
 *         The sum of bytes in each buffer referenced by the array.
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_5Array_25get_total_buffer_size, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Array_get_total_buffer_size, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[344])); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 1389, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array, __pyx_mstate_global->__pyx_n_u_get_total_buffer_size, __pyx_t_4) < (0)) __PYX_ERR(4, 1389, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyarrow/array.pxi":1405
 *         return total_buffer_size
 * 
 *     def __sizeof__(self):             # <<<<<<<<<<<<<<
 *         self._assert_cpu()
 *         return super(Array, self).__sizeof__() + self.nbytes
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_5Array_27__sizeof__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Array___sizeof, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[345])); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 1405, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array, __pyx_mstate_global->__pyx_n_u_sizeof, __pyx_t_4) < (0)) __PYX_ERR(4, 1405, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyarrow/array.pxi":1418
 *         return f'{type_format}\n{self}'
 * 
 *     def to_string(self, *, int indent=2, int top_level_indent=0, int window=10,             # <<<<<<<<<<<<<<
 *                   int container_window=2, c_bool skip_new_lines=False,
 *                   int element_size_limit=100):
*/
  __pyx_t_4 = __Pyx_PyDict_NewPresized(6); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 1418, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_indent, __pyx_mstate_global->__pyx_int_2) < (0)) __PYX_ERR(4, 1418, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_top_level_indent, __pyx_mstate_global->__pyx_int_0) < (0)) __PYX_ERR(4, 1418, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_window, __pyx_mstate_global->__pyx_int_10) < (0)) __PYX_ERR(4, 1418, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_container_window, __pyx_mstate_global->__pyx_int_2) < (0)) __PYX_ERR(4, 1418, __pyx_L1_error)

  /* "pyarrow/array.pxi":1419
 * 
 *     def to_string(self, *, int indent=2, int top_level_indent=0, int window=10,
 *                   int container_window=2, c_bool skip_new_lines=False,             # <<<<<<<<<<<<<<
 *                   int element_size_limit=100):
 *         """
*/
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_skip_new_lines, Py_False) < (0)) __PYX_ERR(4, 1418, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_element_size_limit, __pyx_mstate_global->__pyx_int_100) < (0)) __PYX_ERR(4, 1418, __pyx_L1_error)

  /* "pyarrow/array.pxi":1418
 *         return f'{type_format}\n{self}'
 * 
 *     def to_string(self, *, int indent=2, int top_level_indent=0, int window=10,             # <<<<<<<<<<<<<<
 *                   int container_window=2, c_bool skip_new_lines=False,
 *                   int element_size_limit=100):
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_5Array_34to_string, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Array_to_string, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[346])); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 1418, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_7, __pyx_t_4);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array, __pyx_mstate_global->__pyx_n_u_to_string, __pyx_t_7) < (0)) __PYX_ERR(4, 1418, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/array.pxi":1479
 *             return NotImplemented
 * 
 *     def equals(Array self, Array other not None):             # <<<<<<<<<<<<<<
 *         """
 *         Parameters
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_5Array_40equals, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Array_equals, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[347])); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 1479, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array, __pyx_mstate_global->__pyx_n_u_equals, __pyx_t_7) < (0)) __PYX_ERR(4, 1479, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/array.pxi":1502
 *             return 0
 * 
 *     def is_null(self, *, nan_is_null=False):             # <<<<<<<<<<<<<<
 *         """
 *         Return BooleanArray indicating the null values.
*/
  __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 1502, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_nan_is_null, Py_False) < (0)) __PYX_ERR(4, 1502, __pyx_L1_error)
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_5Array_44is_null, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Array_is_null, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[348])); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 1502, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_4, __pyx_t_7);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array, __pyx_mstate_global->__pyx_n_u_is_null, __pyx_t_4) < (0)) __PYX_ERR(4, 1502, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyarrow/array.pxi":1519
 *         return _pc().call_function('is_null', [self], options)
 * 
 *     def is_nan(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return BooleanArray indicating the NaN values.
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_5Array_46is_nan, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Array_is_nan, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[349])); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 1519, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array, __pyx_mstate_global->__pyx_n_u_is_nan, __pyx_t_4) < (0)) __PYX_ERR(4, 1519, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyarrow/array.pxi":1530
 *         return _pc().call_function('is_nan', [self])
 * 
 *     def is_valid(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return BooleanArray indicating the non-null values.
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_5Array_48is_valid, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Array_is_valid, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[350])); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 1530, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array, __pyx_mstate_global->__pyx_n_u_is_valid, __pyx_t_4) < (0)) __PYX_ERR(4, 1530, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyarrow/array.pxi":1537
 *         return _pc().is_valid(self)
 * 
 *     def fill_null(self, fill_value):             # <<<<<<<<<<<<<<
 *         """
 *         See :func:`pyarrow.compute.fill_null` for usage.
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_5Array_50fill_null, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Array_fill_null, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[351])); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 1537, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array, __pyx_mstate_global->__pyx_n_u_fill_null, __pyx_t_4) < (0)) __PYX_ERR(4, 1537, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyarrow/array.pxi":1578
 *         return Scalar.wrap(GetResultValue(self.ap.GetScalar(i)))
 * 
 *     def slice(self, offset=0, length=None):             # <<<<<<<<<<<<<<
 *         """
 *         Compute zero-copy slice of this array.
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_5Array_54slice, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Array_slice, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[352])); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 1578, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[31]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array, __pyx_mstate_global->__pyx_n_u_slice, __pyx_t_4) < (0)) __PYX_ERR(4, 1578, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyarrow/array.pxi":1610
 *         return pyarrow_wrap_array(result)
 * 
 *     def take(self, object indices):             # <<<<<<<<<<<<<<
 *         """
 *         Select values from an array.
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_5Array_56take, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Array_take, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[353])); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 1610, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array, __pyx_mstate_global->__pyx_n_u_take, __pyx_t_4) < (0)) __PYX_ERR(4, 1610, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyarrow/array.pxi":1629
 *         return _pc().take(self, indices)
 * 
 *     def drop_null(self):             # <<<<<<<<<<<<<<
 *         """
 *         Remove missing values from an array.
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_5Array_58drop_null, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Array_drop_null, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[354])); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 1629, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array, __pyx_mstate_global->__pyx_n_u_drop_null, __pyx_t_4) < (0)) __PYX_ERR(4, 1629, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyarrow/array.pxi":1636
 *         return _pc().drop_null(self)
 * 
 *     def filter(self, object mask, *, null_selection_behavior='drop'):             # <<<<<<<<<<<<<<
 *         """
 *         Select values from an array.
*/
  __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 1636, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_null_selection_behavior, __pyx_mstate_global->__pyx_n_u_drop) < (0)) __PYX_ERR(4, 1636, __pyx_L1_error)
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_5Array_60filter, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Array_filter, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[355])); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 1636, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_7, __pyx_t_4);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array, __pyx_mstate_global->__pyx_n_u_filter, __pyx_t_7) < (0)) __PYX_ERR(4, 1636, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/array.pxi":1659
 *                             null_selection_behavior=null_selection_behavior)
 * 
 *     def index(self, value, start=None, end=None, *, memory_pool=None):             # <<<<<<<<<<<<<<
 *         """
 *         Find the first index of a value.
*/
  __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 1659, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_memory_pool, Py_None) < (0)) __PYX_ERR(4, 1659, __pyx_L1_error)
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_5Array_62index, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Array_index, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[356])); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 1659, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[24]);
  __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_4, __pyx_t_7);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array, __pyx_mstate_global->__pyx_n_u_index, __pyx_t_4) < (0)) __PYX_ERR(4, 1659, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyarrow/array.pxi":1684
 *         return _pc().index(self, value, start, end, memory_pool=memory_pool)
 * 
 *     def sort(self, order="ascending", **kwargs):             # <<<<<<<<<<<<<<
 *         """
 *         Sort the Array
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_5Array_64sort, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Array_sort, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[357])); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 1684, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[32]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array, __pyx_mstate_global->__pyx_n_u_sort, __pyx_t_4) < (0)) __PYX_ERR(4, 1684, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyarrow/array.pxi":1708
 *         return self.take(indices)
 * 
 *     def _to_pandas(self, options, types_mapper=None, **kwargs):             # <<<<<<<<<<<<<<
 *         self._assert_cpu()
 *         return _array_like_to_pandas(self, options, types_mapper=types_mapper)
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_5Array_66_to_pandas, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Array__to_pandas, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[358])); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 1708, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[7]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array, __pyx_mstate_global->__pyx_n_u_to_pandas, __pyx_t_4) < (0)) __PYX_ERR(4, 1708, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyarrow/array.pxi":1712
 *         return _array_like_to_pandas(self, options, types_mapper=types_mapper)
 * 
 *     def __array__(self, dtype=None, copy=None):             # <<<<<<<<<<<<<<
 *         self._assert_cpu()
 * 
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_5Array_68__array__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Array___array, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[359])); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 1712, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[24]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array, __pyx_mstate_global->__pyx_n_u_array_2, __pyx_t_4) < (0)) __PYX_ERR(4, 1712, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyarrow/array.pxi":1737
 *         return np.asarray(values, dtype=dtype)
 * 
 *     def to_numpy(self, zero_copy_only=True, writable=False):             # <<<<<<<<<<<<<<
 *         """
 *         Return a NumPy view or copy of this array.
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_5Array_70to_numpy, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Array_to_numpy, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[360])); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 1737, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[33]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array, __pyx_mstate_global->__pyx_n_u_to_numpy, __pyx_t_4) < (0)) __PYX_ERR(4, 1737, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyarrow/array.pxi":1799
 *         return array
 * 
 *     def to_pylist(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Convert to a list of native Python objects.
*/
  __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 1799, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_maps_as_pydicts, Py_None) < (0)) __PYX_ERR(4, 1799, __pyx_L1_error)
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_5Array_72to_pylist, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Array_to_pylist, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[361])); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 1799, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_7, __pyx_t_4);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array, __pyx_mstate_global->__pyx_n_u_to_pylist, __pyx_t_7) < (0)) __PYX_ERR(4, 1799, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/array.pxi":1824
 *         return [x.as_py(maps_as_pydicts=maps_as_pydicts) for x in self]
 * 
 *     def tolist(self):             # <<<<<<<<<<<<<<
 *         """
 *         Alias of to_pylist for compatibility with NumPy.
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_5Array_74tolist, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Array_tolist, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[362])); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 1824, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array, __pyx_mstate_global->__pyx_n_u_tolist, __pyx_t_7) < (0)) __PYX_ERR(4, 1824, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/array.pxi":1830
 *         return self.to_pylist()
 * 
 *     def validate(self, *, full=False):             # <<<<<<<<<<<<<<
 *         """
 *         Perform validation checks.  An exception is raised if validation fails.
*/
  __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 1830, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_full, Py_False) < (0)) __PYX_ERR(4, 1830, __pyx_L1_error)
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_5Array_76validate, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Array_validate, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[363])); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 1830, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_4, __pyx_t_7);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array, __pyx_mstate_global->__pyx_n_u_validate, __pyx_t_4) < (0)) __PYX_ERR(4, 1830, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyarrow/array.pxi":1865
 *         return self.sp_array.get().offset()
 * 
 *     def buffers(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return a list of Buffer objects pointing to this array's physical
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_5Array_78buffers, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Array_buffers, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[364])); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 1865, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array, __pyx_mstate_global->__pyx_n_u_buffers, __pyx_t_4) < (0)) __PYX_ERR(4, 1865, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyarrow/array.pxi":1877
 *         return res
 * 
 *     def copy_to(self, destination):             # <<<<<<<<<<<<<<
 *         """
 *         Construct a copy of the array with all buffers on destination
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_5Array_80copy_to, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Array_copy_to, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[365])); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 1877, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array, __pyx_mstate_global->__pyx_n_u_copy_to, __pyx_t_4) < (0)) __PYX_ERR(4, 1877, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyarrow/array.pxi":1913
 *         return pyarrow_wrap_array(c_array)
 * 
 *     def _export_to_c(self, out_ptr, out_schema_ptr=0):             # <<<<<<<<<<<<<<
 *         """
 *         Export to a C ArrowArray struct, given its pointer.
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_5Array_82_export_to_c, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Array__export_to_c, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[366])); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 1913, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[23]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array, __pyx_mstate_global->__pyx_n_u_export_to_c, __pyx_t_4) < (0)) __PYX_ERR(4, 1913, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyarrow/array.pxi":1940
 *                                      <ArrowSchema*> c_schema_ptr))
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def _import_from_c(in_ptr, type):
 *         """
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_5Array_84_import_from_c, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Array__import_from_c, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[367])); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 1940, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array, __pyx_mstate_global->__pyx_n_u_import_from_c, __pyx_t_4) < (0)) __PYX_ERR(4, 1940, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_7 = NULL;
  __Pyx_GetNameInClass(__pyx_t_6, (PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array, __pyx_mstate_global->__pyx_n_u_import_from_c); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 1940, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_10 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_6};
    __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_staticmethod, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 1940, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array, __pyx_mstate_global->__pyx_n_u_import_from_c, __pyx_t_4) < (0)) __PYX_ERR(4, 1940, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyarrow/array.pxi":1974
 *         return pyarrow_wrap_array(c_array)
 * 
 *     def __arrow_c_array__(self, requested_schema=None):             # <<<<<<<<<<<<<<
 *         """
 *         Get a pair of PyCapsules containing a C ArrowArray representation of the object.
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_5Array_86__arrow_c_array__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Array___arrow_c_array, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[368])); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 1974, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[7]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array, __pyx_mstate_global->__pyx_n_u_arrow_c_array, __pyx_t_4) < (0)) __PYX_ERR(4, 1974, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyarrow/array.pxi":2023
 *         return schema_capsule, array_capsule
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def _import_from_c_capsule(schema_capsule, array_capsule):
 *         cdef:
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_5Array_88_import_from_c_capsule, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Array__import_from_c_capsule, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[369])); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 2023, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array, __pyx_mstate_global->__pyx_n_u_import_from_c_capsule, __pyx_t_4) < (0)) __PYX_ERR(4, 2023, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_6 = NULL;
  __Pyx_GetNameInClass(__pyx_t_7, (PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array, __pyx_mstate_global->__pyx_n_u_import_from_c_capsule); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 2023, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_10 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_7};
    __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_staticmethod, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 2023, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array, __pyx_mstate_global->__pyx_n_u_import_from_c_capsule, __pyx_t_4) < (0)) __PYX_ERR(4, 2023, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyarrow/array.pxi":2038
 *         return pyarrow_wrap_array(array)
 * 
 *     def _export_to_c_device(self, out_ptr, out_schema_ptr=0):             # <<<<<<<<<<<<<<
 *         """
 *         Export to a C ArrowDeviceArray struct, given its pointer.
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_5Array_90_export_to_c_device, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Array__export_to_c_device, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[370])); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 2038, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[23]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array, __pyx_mstate_global->__pyx_n_u_export_to_c_device, __pyx_t_4) < (0)) __PYX_ERR(4, 2038, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyarrow/array.pxi":2065
 *                 <ArrowDeviceArray*> c_ptr, <ArrowSchema*> c_schema_ptr))
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def _import_from_c_device(in_ptr, type):
 *         """
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_5Array_92_import_from_c_device, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Array__import_from_c_device, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[371])); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 2065, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array, __pyx_mstate_global->__pyx_n_u_import_from_c_device, __pyx_t_4) < (0)) __PYX_ERR(4, 2065, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_7 = NULL;
  __Pyx_GetNameInClass(__pyx_t_6, (PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array, __pyx_mstate_global->__pyx_n_u_import_from_c_device); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 2065, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_10 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_6};
    __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_staticmethod, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 2065, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array, __pyx_mstate_global->__pyx_n_u_import_from_c_device, __pyx_t_4) < (0)) __PYX_ERR(4, 2065, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyarrow/array.pxi":2104
 *         return pyarrow_wrap_array(c_array)
 * 
 *     def __arrow_c_device_array__(self, requested_schema=None, **kwargs):             # <<<<<<<<<<<<<<
 *         """
 *         Get a pair of PyCapsules containing a C ArrowDeviceArray representation
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_5Array_94__arrow_c_device_array__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Array___arrow_c_device_array, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[372])); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 2104, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[7]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array, __pyx_mstate_global->__pyx_n_u_arrow_c_device_array, __pyx_t_4) < (0)) __PYX_ERR(4, 2104, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyarrow/array.pxi":2170
 *         return schema_capsule, array_capsule
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def _import_from_c_device_capsule(schema_capsule, array_capsule):
 *         cdef:
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_5Array_96_import_from_c_device_capsule, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Array__import_from_c_device_caps, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[373])); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 2170, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array, __pyx_mstate_global->__pyx_n_u_import_from_c_device_capsule, __pyx_t_4) < (0)) __PYX_ERR(4, 2170, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_6 = NULL;
  __Pyx_GetNameInClass(__pyx_t_7, (PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array, __pyx_mstate_global->__pyx_n_u_import_from_c_device_capsule); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 2170, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_10 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_7};
    __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_staticmethod, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 2170, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array, __pyx_mstate_global->__pyx_n_u_import_from_c_device_capsule, __pyx_t_4) < (0)) __PYX_ERR(4, 2170, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyarrow/array.pxi":2187
 *         return pyarrow_wrap_array(array)
 * 
 *     def __dlpack__(self, stream=None):             # <<<<<<<<<<<<<<
 *         """
 *         Export a primitive array as a DLPack capsule.
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_5Array_98__dlpack__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Array___dlpack, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[374])); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 2187, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[7]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array, __pyx_mstate_global->__pyx_n_u_dlpack, __pyx_t_4) < (0)) __PYX_ERR(4, 2187, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyarrow/array.pxi":2212
 *             )
 * 
 *     def __dlpack_device__(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the DLPack device tuple this arrays resides on.
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_5Array_100__dlpack_device__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Array___dlpack_device, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[375])); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 2212, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Array, __pyx_mstate_global->__pyx_n_u_dlpack_device, __pyx_t_4) < (0)) __PYX_ERR(4, 2212, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyarrow/array.pxi":2463
 *     """
 * 
 *     def to_pylist(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Convert to a list of native Python objects.
*/
  __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 2463, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_maps_as_pydicts, Py_None) < (0)) __PYX_ERR(4, 2463, __pyx_L1_error)
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_25MonthDayNanoIntervalArray_1to_pylist, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_MonthDayNanoIntervalArray_to_pyl, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[376])); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 2463, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_7, __pyx_t_4);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_MonthDayNanoIntervalArray, __pyx_mstate_global->__pyx_n_u_to_pylist, __pyx_t_7) < (0)) __PYX_ERR(4, 2463, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/array.pxi":2535
 * cdef class BaseListArray(Array):
 * 
 *     def flatten(self, recursive=False):             # <<<<<<<<<<<<<<
 *         """
 *         Unnest this [Large]ListArray/[Large]ListViewArray/FixedSizeListArray
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_13BaseListArray_1flatten, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_BaseListArray_flatten, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[377])); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 2535, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_mstate_global->__pyx_tuple[21]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_BaseListArray, __pyx_mstate_global->__pyx_n_u_flatten, __pyx_t_7) < (0)) __PYX_ERR(4, 2535, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/array.pxi":2629
 *         return _pc().list_flatten(self, options=options)
 * 
 *     def value_parent_indices(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return array of same length as list child values array where each
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_13BaseListArray_3value_parent_indices, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_BaseListArray_value_parent_indic, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[378])); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 2629, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_BaseListArray, __pyx_mstate_global->__pyx_n_u_value_parent_indices, __pyx_t_7) < (0)) __PYX_ERR(4, 2629, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/array.pxi":2651
 *         return _pc().list_parent_indices(self)
 * 
 *     def value_lengths(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return integers array with values equal to the respective length of
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_13BaseListArray_5value_lengths, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_BaseListArray_value_lengths, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[379])); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 2651, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_BaseListArray, __pyx_mstate_global->__pyx_n_u_value_lengths, __pyx_t_7) < (0)) __PYX_ERR(4, 2651, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/array.pxi":2678
 *     """
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_arrays(offsets, values, DataType type=None, MemoryPool pool=None, mask=None):
 *         """
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_9ListArray_1from_arrays, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ListArray_from_arrays, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[380])); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 2678, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_mstate_global->__pyx_tuple[0]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ListArray, __pyx_mstate_global->__pyx_n_u_from_arrays, __pyx_t_7) < (0)) __PYX_ERR(4, 2678, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_4 = NULL;
  __Pyx_GetNameInClass(__pyx_t_6, (PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ListArray, __pyx_mstate_global->__pyx_n_u_from_arrays); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 2678, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_10 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_6};
    __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_staticmethod, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 2678, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
  }
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ListArray, __pyx_mstate_global->__pyx_n_u_from_arrays, __pyx_t_7) < (0)) __PYX_ERR(4, 2678, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/array.pxi":2863
 *     """
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_arrays(offsets, values, DataType type=None, MemoryPool pool=None, mask=None):
 *         """
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_14LargeListArray_1from_arrays, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_LargeListArray_from_arrays, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[381])); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 2863, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_mstate_global->__pyx_tuple[0]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_LargeListArray, __pyx_mstate_global->__pyx_n_u_from_arrays, __pyx_t_7) < (0)) __PYX_ERR(4, 2863, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_6 = NULL;
  __Pyx_GetNameInClass(__pyx_t_4, (PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_LargeListArray, __pyx_mstate_global->__pyx_n_u_from_arrays); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 2863, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_10 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_4};
    __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_staticmethod, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 2863, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
  }
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_LargeListArray, __pyx_mstate_global->__pyx_n_u_from_arrays, __pyx_t_7) < (0)) __PYX_ERR(4, 2863, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/array.pxi":3003
 *     """
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_arrays(offsets, sizes, values, DataType type=None, MemoryPool pool=None, mask=None):
 *         """
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_13ListViewArray_1from_arrays, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ListViewArray_from_arrays, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[382])); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 3003, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_mstate_global->__pyx_tuple[0]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ListViewArray, __pyx_mstate_global->__pyx_n_u_from_arrays, __pyx_t_7) < (0)) __PYX_ERR(4, 3003, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_4 = NULL;
  __Pyx_GetNameInClass(__pyx_t_6, (PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ListViewArray, __pyx_mstate_global->__pyx_n_u_from_arrays); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 3003, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_10 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_6};
    __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_staticmethod, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 3003, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
  }
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ListViewArray, __pyx_mstate_global->__pyx_n_u_from_arrays, __pyx_t_7) < (0)) __PYX_ERR(4, 3003, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/array.pxi":3225
 *     Identical to ListViewArray, but with 64-bit offsets.
 *     """
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_arrays(offsets, sizes, values, DataType type=None, MemoryPool pool=None, mask=None):
 *         """
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_18LargeListViewArray_1from_arrays, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_LargeListViewArray_from_arrays, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[383])); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 3225, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_mstate_global->__pyx_tuple[0]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_LargeListViewArray, __pyx_mstate_global->__pyx_n_u_from_arrays, __pyx_t_7) < (0)) __PYX_ERR(4, 3225, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_6 = NULL;
  __Pyx_GetNameInClass(__pyx_t_4, (PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_LargeListViewArray, __pyx_mstate_global->__pyx_n_u_from_arrays); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 3225, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_10 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_4};
    __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_staticmethod, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 3225, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
  }
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_LargeListViewArray, __pyx_mstate_global->__pyx_n_u_from_arrays, __pyx_t_7) < (0)) __PYX_ERR(4, 3225, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/array.pxi":3453
 *     """
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_arrays(offsets, keys, items, DataType type=None, MemoryPool pool=None, mask=None):
 *         """
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_8MapArray_1from_arrays, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_MapArray_from_arrays, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[384])); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 3453, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_mstate_global->__pyx_tuple[0]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_MapArray, __pyx_mstate_global->__pyx_n_u_from_arrays, __pyx_t_7) < (0)) __PYX_ERR(4, 3453, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_4 = NULL;
  __Pyx_GetNameInClass(__pyx_t_6, (PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_MapArray, __pyx_mstate_global->__pyx_n_u_from_arrays); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 3453, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_10 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_6};
    __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_staticmethod, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 3453, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
  }
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_MapArray, __pyx_mstate_global->__pyx_n_u_from_arrays, __pyx_t_7) < (0)) __PYX_ERR(4, 3453, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/array.pxi":3590
 *     """
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_arrays(values, list_size=None, DataType type=None, mask=None):
 *         """
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_18FixedSizeListArray_1from_arrays, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_FixedSizeListArray_from_arrays, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[385])); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 3590, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_mstate_global->__pyx_tuple[0]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_FixedSizeListArray, __pyx_mstate_global->__pyx_n_u_from_arrays, __pyx_t_7) < (0)) __PYX_ERR(4, 3590, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_6 = NULL;
  __Pyx_GetNameInClass(__pyx_t_4, (PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_FixedSizeListArray, __pyx_mstate_global->__pyx_n_u_from_arrays); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 3590, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_10 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_4};
    __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_staticmethod, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 3590, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
  }
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_FixedSizeListArray, __pyx_mstate_global->__pyx_n_u_from_arrays, __pyx_t_7) < (0)) __PYX_ERR(4, 3590, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/array.pxi":3722
 *     """
 * 
 *     def child(self, int pos):             # <<<<<<<<<<<<<<
 *         """
 *         DEPRECATED, use field() instead.
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_10UnionArray_1child, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_UnionArray_child, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[386])); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 3722, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_UnionArray, __pyx_mstate_global->__pyx_n_u_child, __pyx_t_7) < (0)) __PYX_ERR(4, 3722, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/array.pxi":3740
 *         return self.field(pos)
 * 
 *     def field(self, int pos):             # <<<<<<<<<<<<<<
 *         """
 *         Return the given child field as an individual array.
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_10UnionArray_3field, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_UnionArray_field, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[387])); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 3740, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_UnionArray, __pyx_mstate_global->__pyx_n_u_field, __pyx_t_7) < (0)) __PYX_ERR(4, 3740, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/array.pxi":3784
 *         return Array.from_buffers(int32(), len(self), [None, buf])
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_dense(Array types, Array value_offsets, list children,
 *                    list field_names=None, list type_codes=None):
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_10UnionArray_5from_dense, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_UnionArray_from_dense, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[388])); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 3784, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_mstate_global->__pyx_tuple[24]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_UnionArray, __pyx_mstate_global->__pyx_n_u_from_dense, __pyx_t_7) < (0)) __PYX_ERR(4, 3784, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_4 = NULL;
  __Pyx_GetNameInClass(__pyx_t_6, (PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_UnionArray, __pyx_mstate_global->__pyx_n_u_from_dense); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 3784, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_10 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_6};
    __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_staticmethod, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 3784, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
  }
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_UnionArray, __pyx_mstate_global->__pyx_n_u_from_dense, __pyx_t_7) < (0)) __PYX_ERR(4, 3784, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/array.pxi":3828
 *         return result
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_sparse(Array types, list children, list field_names=None,
 *                     list type_codes=None):
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_10UnionArray_7from_sparse, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_UnionArray_from_sparse, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[389])); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 3828, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_mstate_global->__pyx_tuple[24]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_UnionArray, __pyx_mstate_global->__pyx_n_u_from_sparse, __pyx_t_7) < (0)) __PYX_ERR(4, 3828, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_6 = NULL;
  __Pyx_GetNameInClass(__pyx_t_4, (PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_UnionArray, __pyx_mstate_global->__pyx_n_u_from_sparse); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 3828, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_10 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_4};
    __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_staticmethod, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 3828, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
  }
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_UnionArray, __pyx_mstate_global->__pyx_n_u_from_sparse, __pyx_t_7) < (0)) __PYX_ERR(4, 3828, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/array.pxi":3876
 *     """
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_buffers(int length, Buffer value_offsets, Buffer data,
 *                      Buffer null_bitmap=None, int null_count=-1,
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_11StringArray_1from_buffers, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_StringArray_from_buffers, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[390])); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 3876, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_mstate_global->__pyx_tuple[34]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_StringArray, __pyx_mstate_global->__pyx_n_u_from_buffers, __pyx_t_7) < (0)) __PYX_ERR(4, 3876, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_4 = NULL;
  __Pyx_GetNameInClass(__pyx_t_6, (PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_StringArray, __pyx_mstate_global->__pyx_n_u_from_buffers); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 3876, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_10 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_6};
    __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_staticmethod, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 3876, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
  }
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_StringArray, __pyx_mstate_global->__pyx_n_u_from_buffers, __pyx_t_7) < (0)) __PYX_ERR(4, 3876, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/array.pxi":3908
 *     """
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_buffers(int length, Buffer value_offsets, Buffer data,
 *                      Buffer null_bitmap=None, int null_count=-1,
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_16LargeStringArray_1from_buffers, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_LargeStringArray_from_buffers, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[391])); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 3908, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_mstate_global->__pyx_tuple[34]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_LargeStringArray, __pyx_mstate_global->__pyx_n_u_from_buffers, __pyx_t_7) < (0)) __PYX_ERR(4, 3908, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_6 = NULL;
  __Pyx_GetNameInClass(__pyx_t_4, (PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_LargeStringArray, __pyx_mstate_global->__pyx_n_u_from_buffers); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 3908, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_10 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_4};
    __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_staticmethod, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 3908, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
  }
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_LargeStringArray, __pyx_mstate_global->__pyx_n_u_from_buffers, __pyx_t_7) < (0)) __PYX_ERR(4, 3908, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/array.pxi":3978
 *     """
 * 
 *     def dictionary_encode(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_15DictionaryArray_1dictionary_encode, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DictionaryArray_dictionary_encod, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[392])); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 3978, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DictionaryArray, __pyx_mstate_global->__pyx_n_u_dictionary_encode, __pyx_t_7) < (0)) __PYX_ERR(4, 3978, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/array.pxi":3981
 *         return self
 * 
 *     def dictionary_decode(self):             # <<<<<<<<<<<<<<
 *         """
 *         Decodes the DictionaryArray to an Array.
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_15DictionaryArray_3dictionary_decode, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DictionaryArray_dictionary_decod, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[393])); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 3981, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DictionaryArray, __pyx_mstate_global->__pyx_n_u_dictionary_decode, __pyx_t_7) < (0)) __PYX_ERR(4, 3981, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/array.pxi":4005
 *         return self._indices
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_buffers(DataType type, int64_t length, buffers, Array dictionary,
 *                      int64_t null_count=-1, int64_t offset=0):
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_15DictionaryArray_5from_buffers, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DictionaryArray_from_buffers, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[394])); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 4005, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_mstate_global->__pyx_tuple[35]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DictionaryArray, __pyx_mstate_global->__pyx_n_u_from_buffers, __pyx_t_7) < (0)) __PYX_ERR(4, 4005, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_4 = NULL;
  __Pyx_GetNameInClass(__pyx_t_6, (PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DictionaryArray, __pyx_mstate_global->__pyx_n_u_from_buffers); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 4005, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_10 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_6};
    __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_staticmethod, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 4005, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
  }
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DictionaryArray, __pyx_mstate_global->__pyx_n_u_from_buffers, __pyx_t_7) < (0)) __PYX_ERR(4, 4005, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/array.pxi":4052
 *         return result
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_arrays(indices, dictionary, mask=None, bint ordered=False,
 *                     bint from_pandas=False, bint safe=True,
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_15DictionaryArray_7from_arrays, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DictionaryArray_from_arrays, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[395])); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 4052, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_mstate_global->__pyx_tuple[36]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DictionaryArray, __pyx_mstate_global->__pyx_n_u_from_arrays, __pyx_t_7) < (0)) __PYX_ERR(4, 4052, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_6 = NULL;
  __Pyx_GetNameInClass(__pyx_t_4, (PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DictionaryArray, __pyx_mstate_global->__pyx_n_u_from_arrays); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 4052, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_10 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_4};
    __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_staticmethod, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 4052, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
  }
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DictionaryArray, __pyx_mstate_global->__pyx_n_u_from_arrays, __pyx_t_7) < (0)) __PYX_ERR(4, 4052, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/array.pxi":4131
 *     """
 * 
 *     def field(self, index):             # <<<<<<<<<<<<<<
 *         """
 *         Retrieves the child array belonging to field.
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_11StructArray_1field, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_StructArray_field, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[396])); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 4131, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_StructArray, __pyx_mstate_global->__pyx_n_u_field, __pyx_t_7) < (0)) __PYX_ERR(4, 4131, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/array.pxi":4160
 *         return pyarrow_wrap_array(child)
 * 
 *     def _flattened_field(self, index, MemoryPool memory_pool=None):             # <<<<<<<<<<<<<<
 *         """
 *         Retrieves the child array belonging to field,
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_11StructArray_3_flattened_field, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_StructArray__flattened_field, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[397])); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 4160, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_mstate_global->__pyx_tuple[7]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_StructArray, __pyx_mstate_global->__pyx_n_u_flattened_field, __pyx_t_7) < (0)) __PYX_ERR(4, 4160, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/array.pxi":4193
 *         return pyarrow_wrap_array(child)
 * 
 *     def flatten(self, MemoryPool memory_pool=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return one individual array for each field in the struct.
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_11StructArray_5flatten, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_StructArray_flatten, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[398])); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 4193, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_mstate_global->__pyx_tuple[7]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_StructArray, __pyx_mstate_global->__pyx_n_u_flatten, __pyx_t_7) < (0)) __PYX_ERR(4, 4193, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/array.pxi":4216
 *         return [pyarrow_wrap_array(arr) for arr in arrays]
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_arrays(arrays, names=None, fields=None, mask=None,
 *                     memory_pool=None, type=None):
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_11StructArray_7from_arrays, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_StructArray_from_arrays, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[399])); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 4216, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_mstate_global->__pyx_tuple[37]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_StructArray, __pyx_mstate_global->__pyx_n_u_from_arrays, __pyx_t_7) < (0)) __PYX_ERR(4, 4216, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_4 = NULL;
  __Pyx_GetNameInClass(__pyx_t_6, (PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_StructArray, __pyx_mstate_global->__pyx_n_u_from_arrays); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 4216, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_10 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_6};
    __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_staticmethod, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 4216, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
  }
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_StructArray, __pyx_mstate_global->__pyx_n_u_from_arrays, __pyx_t_7) < (0)) __PYX_ERR(4, 4216, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/array.pxi":4308
 *         return result
 * 
 *     def sort(self, order="ascending", by=None, **kwargs):             # <<<<<<<<<<<<<<
 *         """
 *         Sort the StructArray
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_11StructArray_9sort, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_StructArray_sort, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[400])); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 4308, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_mstate_global->__pyx_tuple[38]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_StructArray, __pyx_mstate_global->__pyx_n_u_sort, __pyx_t_7) < (0)) __PYX_ERR(4, 4308, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/array.pxi":4343
 *     """
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def _from_arrays(type, allow_none_for_type, logical_length, run_ends, values, logical_offset):
 *         cdef:
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_18RunEndEncodedArray_1_from_arrays, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_RunEndEncodedArray__from_arrays, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[401])); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 4343, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RunEndEncodedArray, __pyx_mstate_global->__pyx_n_u_from_arrays_2, __pyx_t_7) < (0)) __PYX_ERR(4, 4343, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_6 = NULL;
  __Pyx_GetNameInClass(__pyx_t_4, (PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RunEndEncodedArray, __pyx_mstate_global->__pyx_n_u_from_arrays_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 4343, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_10 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_4};
    __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_staticmethod, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 4343, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
  }
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RunEndEncodedArray, __pyx_mstate_global->__pyx_n_u_from_arrays_2, __pyx_t_7) < (0)) __PYX_ERR(4, 4343, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/array.pxi":4374
 *         return result
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_arrays(run_ends, values, type=None):
 *         """
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_18RunEndEncodedArray_3from_arrays, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_RunEndEncodedArray_from_arrays, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[402])); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 4374, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_mstate_global->__pyx_tuple[7]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RunEndEncodedArray, __pyx_mstate_global->__pyx_n_u_from_arrays, __pyx_t_7) < (0)) __PYX_ERR(4, 4374, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_4 = NULL;
  __Pyx_GetNameInClass(__pyx_t_6, (PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RunEndEncodedArray, __pyx_mstate_global->__pyx_n_u_from_arrays); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 4374, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_10 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_6};
    __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_staticmethod, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 4374, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
  }
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RunEndEncodedArray, __pyx_mstate_global->__pyx_n_u_from_arrays, __pyx_t_7) < (0)) __PYX_ERR(4, 4374, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/array.pxi":4396
 *                                                run_ends, values, 0)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_buffers(DataType type, length, buffers, null_count=-1, offset=0,
 *                      children=None):
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_18RunEndEncodedArray_5from_buffers, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_RunEndEncodedArray_from_buffers, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[403])); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 4396, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_mstate_global->__pyx_tuple[30]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RunEndEncodedArray, __pyx_mstate_global->__pyx_n_u_from_buffers, __pyx_t_7) < (0)) __PYX_ERR(4, 4396, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_6 = NULL;
  __Pyx_GetNameInClass(__pyx_t_4, (PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RunEndEncodedArray, __pyx_mstate_global->__pyx_n_u_from_buffers); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 4396, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_10 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_4};
    __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_staticmethod, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 4396, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
  }
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RunEndEncodedArray, __pyx_mstate_global->__pyx_n_u_from_buffers, __pyx_t_7) < (0)) __PYX_ERR(4, 4396, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/array.pxi":4476
 *         return pyarrow_wrap_array(ree_array.values())
 * 
 *     def find_physical_offset(self):             # <<<<<<<<<<<<<<
 *         """
 *         Find the physical offset of this REE array.
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_18RunEndEncodedArray_7find_physical_offset, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_RunEndEncodedArray_find_physical, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[404])); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 4476, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RunEndEncodedArray, __pyx_mstate_global->__pyx_n_u_find_physical_offset, __pyx_t_7) < (0)) __PYX_ERR(4, 4476, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/array.pxi":4488
 *         return ree_array.FindPhysicalOffset()
 * 
 *     def find_physical_length(self):             # <<<<<<<<<<<<<<
 *         """
 *         Find the physical length of this REE array.
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_18RunEndEncodedArray_9find_physical_length, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_RunEndEncodedArray_find_physical_2, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[405])); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 4488, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RunEndEncodedArray, __pyx_mstate_global->__pyx_n_u_find_physical_length, __pyx_t_7) < (0)) __PYX_ERR(4, 4488, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/array.pxi":4514
 *         return pyarrow_wrap_array(ext_array.storage())
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_storage(BaseExtensionType typ, Array storage):
 *         """
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_14ExtensionArray_1from_storage, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ExtensionArray_from_storage, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[406])); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 4514, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ExtensionArray, __pyx_mstate_global->__pyx_n_u_from_storage, __pyx_t_7) < (0)) __PYX_ERR(4, 4514, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_4 = NULL;
  __Pyx_GetNameInClass(__pyx_t_6, (PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ExtensionArray, __pyx_mstate_global->__pyx_n_u_from_storage); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 4514, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_10 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_6};
    __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_staticmethod, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 4514, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
  }
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ExtensionArray, __pyx_mstate_global->__pyx_n_u_from_storage, __pyx_t_7) < (0)) __PYX_ERR(4, 4514, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/array.pxi":4543
 * 
 * 
 * class JsonArray(ExtensionArray):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for Arrow arrays of JSON data type.
*/
  __pyx_t_7 = PyTuple_Pack(1, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ExtensionArray)); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 4543, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_6 = __Pyx_PEP560_update_bases(__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 4543, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_4 = __Pyx_CalculateMetaclass(NULL, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 4543, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_12 = __Pyx_Py3MetaclassPrepare(__pyx_t_4, __pyx_t_6, __pyx_mstate_global->__pyx_n_u_JsonArray, __pyx_mstate_global->__pyx_n_u_JsonArray, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_kp_u_Concrete_class_for_Arrow_arrays); if (unlikely(!__pyx_t_12)) __PYX_ERR(4, 4543, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  if (__pyx_t_6 != __pyx_t_7) {
    if (unlikely((PyDict_SetItemString(__pyx_t_12, "__orig_bases__", __pyx_t_7) < 0))) __PYX_ERR(4, 4543, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_Py3ClassCreate(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_JsonArray, __pyx_t_6, __pyx_t_12, NULL, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 4543, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_JsonArray, __pyx_t_7) < (0)) __PYX_ERR(4, 4543, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyarrow/array.pxi":4570
 * 
 * 
 * class UuidArray(ExtensionArray):             # <<<<<<<<<<<<<<
 *     """
 *     Concrete class for Arrow arrays of UUID data type.
*/
  __pyx_t_6 = PyTuple_Pack(1, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ExtensionArray)); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 4570, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 4570, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_12 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_12)) __PYX_ERR(4, 4570, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_7 = __Pyx_Py3MetaclassPrepare(__pyx_t_12, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_UuidArray, __pyx_mstate_global->__pyx_n_u_UuidArray, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_kp_u_Concrete_class_for_Arrow_arrays_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 4570, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (__pyx_t_4 != __pyx_t_6) {
    if (unlikely((PyDict_SetItemString(__pyx_t_7, "__orig_bases__", __pyx_t_6) < 0))) __PYX_ERR(4, 4570, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_Py3ClassCreate(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_UuidArray, __pyx_t_4, __pyx_t_7, NULL, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 4570, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_6);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_UuidArray, __pyx_t_6) < (0)) __PYX_ERR(4, 4570, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyarrow/array.pxi":4615
 *     """
 * 
 *     def to_numpy_ndarray(self):             # <<<<<<<<<<<<<<
 *         """
 *         Convert fixed shape tensor extension array to a multi-dimensional numpy.ndarray.
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_21FixedShapeTensorArray_1to_numpy_ndarray, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_FixedShapeTensorArray_to_numpy_n, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[407])); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 4615, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_FixedShapeTensorArray, __pyx_mstate_global->__pyx_n_u_to_numpy_ndarray, __pyx_t_4) < (0)) __PYX_ERR(4, 4615, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyarrow/array.pxi":4635
 *         return self.to_tensor().to_numpy()
 * 
 *     def to_tensor(self):             # <<<<<<<<<<<<<<
 *         """
 *         Convert fixed shape tensor extension array to a pyarrow.Tensor.
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_21FixedShapeTensorArray_3to_tensor, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_FixedShapeTensorArray_to_tensor, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[408])); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 4635, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_FixedShapeTensorArray, __pyx_mstate_global->__pyx_n_u_to_tensor, __pyx_t_4) < (0)) __PYX_ERR(4, 4635, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyarrow/array.pxi":4660
 *         return pyarrow_wrap_tensor(GetResultValue(ctensor))
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_numpy_ndarray(obj, dim_names=None):
 *         """
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_21FixedShapeTensorArray_5from_numpy_ndarray, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_FixedShapeTensorArray_from_numpy, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[409])); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 4660, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[7]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_FixedShapeTensorArray, __pyx_mstate_global->__pyx_n_u_from_numpy_ndarray, __pyx_t_4) < (0)) __PYX_ERR(4, 4660, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_12 = NULL;
  __Pyx_GetNameInClass(__pyx_t_7, (PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_FixedShapeTensorArray, __pyx_mstate_global->__pyx_n_u_from_numpy_ndarray); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 4660, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_10 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_t_7};
    __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_staticmethod, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 4660, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_FixedShapeTensorArray, __pyx_mstate_global->__pyx_n_u_from_numpy_ndarray, __pyx_t_4) < (0)) __PYX_ERR(4, 4660, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyarrow/array.pxi":4791
 *     """
 * 
 *     def to_numpy(self, zero_copy_only=True, writable=False):             # <<<<<<<<<<<<<<
 *         """
 *         Return a NumPy bool view or copy of this array.
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_10Bool8Array_1to_numpy, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Bool8Array_to_numpy, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[410])); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 4791, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[33]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Bool8Array, __pyx_mstate_global->__pyx_n_u_to_numpy, __pyx_t_4) < (0)) __PYX_ERR(4, 4791, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyarrow/array.pxi":4823
 *         return _pc().not_equal(self.storage, 0).to_numpy(zero_copy_only=zero_copy_only, writable=writable)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_storage(Int8Array storage):
 *         """
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_10Bool8Array_3from_storage, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Bool8Array_from_storage, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[411])); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 4823, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Bool8Array, __pyx_mstate_global->__pyx_n_u_from_storage, __pyx_t_4) < (0)) __PYX_ERR(4, 4823, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_7 = NULL;
  __Pyx_GetNameInClass(__pyx_t_12, (PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Bool8Array, __pyx_mstate_global->__pyx_n_u_from_storage); if (unlikely(!__pyx_t_12)) __PYX_ERR(4, 4823, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_10 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_12};
    __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_staticmethod, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 4823, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Bool8Array, __pyx_mstate_global->__pyx_n_u_from_storage, __pyx_t_4) < (0)) __PYX_ERR(4, 4823, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyarrow/array.pxi":4839
 *         return ExtensionArray.from_storage(bool8(), storage)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_numpy(obj):
 *         """
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_10Bool8Array_5from_numpy, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Bool8Array_from_numpy, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[412])); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 4839, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Bool8Array, __pyx_mstate_global->__pyx_n_u_from_numpy, __pyx_t_4) < (0)) __PYX_ERR(4, 4839, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_12 = NULL;
  __Pyx_GetNameInClass(__pyx_t_7, (PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Bool8Array, __pyx_mstate_global->__pyx_n_u_from_numpy); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 4839, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_10 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_t_7};
    __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_staticmethod, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 4839, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Bool8Array, __pyx_mstate_global->__pyx_n_u_from_numpy, __pyx_t_4) < (0)) __PYX_ERR(4, 4839, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyarrow/array.pxi":4878
 * 
 * cdef dict _array_classes = {
 *     _Type_NA: NullArray,             # <<<<<<<<<<<<<<
 *     _Type_BOOL: BooleanArray,
 *     _Type_UINT8: UInt8Array,
*/
  __pyx_t_4 = __Pyx_PyDict_NewPresized(43); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 4878, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_7 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::NA); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 4878, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_4, __pyx_t_7, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NullArray)) < (0)) __PYX_ERR(4, 4878, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/array.pxi":4879
 * cdef dict _array_classes = {
 *     _Type_NA: NullArray,
 *     _Type_BOOL: BooleanArray,             # <<<<<<<<<<<<<<
 *     _Type_UINT8: UInt8Array,
 *     _Type_UINT16: UInt16Array,
*/
  __pyx_t_7 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::BOOL); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 4879, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_4, __pyx_t_7, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_BooleanArray)) < (0)) __PYX_ERR(4, 4878, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/array.pxi":4880
 *     _Type_NA: NullArray,
 *     _Type_BOOL: BooleanArray,
 *     _Type_UINT8: UInt8Array,             # <<<<<<<<<<<<<<
 *     _Type_UINT16: UInt16Array,
 *     _Type_UINT32: UInt32Array,
*/
  __pyx_t_7 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::UINT8); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 4880, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_4, __pyx_t_7, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_UInt8Array)) < (0)) __PYX_ERR(4, 4878, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/array.pxi":4881
 *     _Type_BOOL: BooleanArray,
 *     _Type_UINT8: UInt8Array,
 *     _Type_UINT16: UInt16Array,             # <<<<<<<<<<<<<<
 *     _Type_UINT32: UInt32Array,
 *     _Type_UINT64: UInt64Array,
*/
  __pyx_t_7 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::UINT16); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 4881, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_4, __pyx_t_7, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_UInt16Array)) < (0)) __PYX_ERR(4, 4878, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/array.pxi":4882
 *     _Type_UINT8: UInt8Array,
 *     _Type_UINT16: UInt16Array,
 *     _Type_UINT32: UInt32Array,             # <<<<<<<<<<<<<<
 *     _Type_UINT64: UInt64Array,
 *     _Type_INT8: Int8Array,
*/
  __pyx_t_7 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::UINT32); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 4882, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_4, __pyx_t_7, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_UInt32Array)) < (0)) __PYX_ERR(4, 4878, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/array.pxi":4883
 *     _Type_UINT16: UInt16Array,
 *     _Type_UINT32: UInt32Array,
 *     _Type_UINT64: UInt64Array,             # <<<<<<<<<<<<<<
 *     _Type_INT8: Int8Array,
 *     _Type_INT16: Int16Array,
*/
  __pyx_t_7 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::UINT64); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 4883, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_4, __pyx_t_7, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_UInt64Array)) < (0)) __PYX_ERR(4, 4878, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/array.pxi":4884
 *     _Type_UINT32: UInt32Array,
 *     _Type_UINT64: UInt64Array,
 *     _Type_INT8: Int8Array,             # <<<<<<<<<<<<<<
 *     _Type_INT16: Int16Array,
 *     _Type_INT32: Int32Array,
*/
  __pyx_t_7 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::INT8); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 4884, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_4, __pyx_t_7, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Int8Array)) < (0)) __PYX_ERR(4, 4878, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/array.pxi":4885
 *     _Type_UINT64: UInt64Array,
 *     _Type_INT8: Int8Array,
 *     _Type_INT16: Int16Array,             # <<<<<<<<<<<<<<
 *     _Type_INT32: Int32Array,
 *     _Type_INT64: Int64Array,
*/
  __pyx_t_7 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::INT16); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 4885, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_4, __pyx_t_7, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Int16Array)) < (0)) __PYX_ERR(4, 4878, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/array.pxi":4886
 *     _Type_INT8: Int8Array,
 *     _Type_INT16: Int16Array,
 *     _Type_INT32: Int32Array,             # <<<<<<<<<<<<<<
 *     _Type_INT64: Int64Array,
 *     _Type_DATE32: Date32Array,
*/
  __pyx_t_7 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::INT32); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 4886, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_4, __pyx_t_7, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Int32Array)) < (0)) __PYX_ERR(4, 4878, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/array.pxi":4887
 *     _Type_INT16: Int16Array,
 *     _Type_INT32: Int32Array,
 *     _Type_INT64: Int64Array,             # <<<<<<<<<<<<<<
 *     _Type_DATE32: Date32Array,
 *     _Type_DATE64: Date64Array,
*/
  __pyx_t_7 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::INT64); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 4887, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_4, __pyx_t_7, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Int64Array)) < (0)) __PYX_ERR(4, 4878, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/array.pxi":4888
 *     _Type_INT32: Int32Array,
 *     _Type_INT64: Int64Array,
 *     _Type_DATE32: Date32Array,             # <<<<<<<<<<<<<<
 *     _Type_DATE64: Date64Array,
 *     _Type_TIMESTAMP: TimestampArray,
*/
  __pyx_t_7 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::DATE32); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 4888, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_4, __pyx_t_7, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Date32Array)) < (0)) __PYX_ERR(4, 4878, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/array.pxi":4889
 *     _Type_INT64: Int64Array,
 *     _Type_DATE32: Date32Array,
 *     _Type_DATE64: Date64Array,             # <<<<<<<<<<<<<<
 *     _Type_TIMESTAMP: TimestampArray,
 *     _Type_TIME32: Time32Array,
*/
  __pyx_t_7 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::DATE64); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 4889, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_4, __pyx_t_7, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Date64Array)) < (0)) __PYX_ERR(4, 4878, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/array.pxi":4890
 *     _Type_DATE32: Date32Array,
 *     _Type_DATE64: Date64Array,
 *     _Type_TIMESTAMP: TimestampArray,             # <<<<<<<<<<<<<<
 *     _Type_TIME32: Time32Array,
 *     _Type_TIME64: Time64Array,
*/
  __pyx_t_7 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::TIMESTAMP); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 4890, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_4, __pyx_t_7, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_TimestampArray)) < (0)) __PYX_ERR(4, 4878, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/array.pxi":4891
 *     _Type_DATE64: Date64Array,
 *     _Type_TIMESTAMP: TimestampArray,
 *     _Type_TIME32: Time32Array,             # <<<<<<<<<<<<<<
 *     _Type_TIME64: Time64Array,
 *     _Type_DURATION: DurationArray,
*/
  __pyx_t_7 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::TIME32); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 4891, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_4, __pyx_t_7, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Time32Array)) < (0)) __PYX_ERR(4, 4878, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/array.pxi":4892
 *     _Type_TIMESTAMP: TimestampArray,
 *     _Type_TIME32: Time32Array,
 *     _Type_TIME64: Time64Array,             # <<<<<<<<<<<<<<
 *     _Type_DURATION: DurationArray,
 *     _Type_INTERVAL_MONTH_DAY_NANO: MonthDayNanoIntervalArray,
*/
  __pyx_t_7 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::TIME64); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 4892, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_4, __pyx_t_7, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Time64Array)) < (0)) __PYX_ERR(4, 4878, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/array.pxi":4893
 *     _Type_TIME32: Time32Array,
 *     _Type_TIME64: Time64Array,
 *     _Type_DURATION: DurationArray,             # <<<<<<<<<<<<<<
 *     _Type_INTERVAL_MONTH_DAY_NANO: MonthDayNanoIntervalArray,
 *     _Type_HALF_FLOAT: HalfFloatArray,
*/
  __pyx_t_7 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::DURATION); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 4893, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_4, __pyx_t_7, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DurationArray)) < (0)) __PYX_ERR(4, 4878, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/array.pxi":4894
 *     _Type_TIME64: Time64Array,
 *     _Type_DURATION: DurationArray,
 *     _Type_INTERVAL_MONTH_DAY_NANO: MonthDayNanoIntervalArray,             # <<<<<<<<<<<<<<
 *     _Type_HALF_FLOAT: HalfFloatArray,
 *     _Type_FLOAT: FloatArray,
*/
  __pyx_t_7 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::INTERVAL_MONTH_DAY_NANO); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 4894, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_4, __pyx_t_7, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_MonthDayNanoIntervalArray)) < (0)) __PYX_ERR(4, 4878, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/array.pxi":4895
 *     _Type_DURATION: DurationArray,
 *     _Type_INTERVAL_MONTH_DAY_NANO: MonthDayNanoIntervalArray,
 *     _Type_HALF_FLOAT: HalfFloatArray,             # <<<<<<<<<<<<<<
 *     _Type_FLOAT: FloatArray,
 *     _Type_DOUBLE: DoubleArray,
*/
  __pyx_t_7 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::HALF_FLOAT); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 4895, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_4, __pyx_t_7, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_HalfFloatArray)) < (0)) __PYX_ERR(4, 4878, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/array.pxi":4896
 *     _Type_INTERVAL_MONTH_DAY_NANO: MonthDayNanoIntervalArray,
 *     _Type_HALF_FLOAT: HalfFloatArray,
 *     _Type_FLOAT: FloatArray,             # <<<<<<<<<<<<<<
 *     _Type_DOUBLE: DoubleArray,
 *     _Type_LIST: ListArray,
*/
  __pyx_t_7 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::FLOAT); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 4896, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_4, __pyx_t_7, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_FloatArray)) < (0)) __PYX_ERR(4, 4878, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/array.pxi":4897
 *     _Type_HALF_FLOAT: HalfFloatArray,
 *     _Type_FLOAT: FloatArray,
 *     _Type_DOUBLE: DoubleArray,             # <<<<<<<<<<<<<<
 *     _Type_LIST: ListArray,
 *     _Type_LARGE_LIST: LargeListArray,
*/
  __pyx_t_7 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::DOUBLE); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 4897, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_4, __pyx_t_7, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DoubleArray)) < (0)) __PYX_ERR(4, 4878, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/array.pxi":4898
 *     _Type_FLOAT: FloatArray,
 *     _Type_DOUBLE: DoubleArray,
 *     _Type_LIST: ListArray,             # <<<<<<<<<<<<<<
 *     _Type_LARGE_LIST: LargeListArray,
 *     _Type_LIST_VIEW: ListViewArray,
*/
  __pyx_t_7 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::LIST); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 4898, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_4, __pyx_t_7, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ListArray)) < (0)) __PYX_ERR(4, 4878, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/array.pxi":4899
 *     _Type_DOUBLE: DoubleArray,
 *     _Type_LIST: ListArray,
 *     _Type_LARGE_LIST: LargeListArray,             # <<<<<<<<<<<<<<
 *     _Type_LIST_VIEW: ListViewArray,
 *     _Type_LARGE_LIST_VIEW: LargeListViewArray,
*/
  __pyx_t_7 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::LARGE_LIST); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 4899, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_4, __pyx_t_7, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_LargeListArray)) < (0)) __PYX_ERR(4, 4878, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/array.pxi":4900
 *     _Type_LIST: ListArray,
 *     _Type_LARGE_LIST: LargeListArray,
 *     _Type_LIST_VIEW: ListViewArray,             # <<<<<<<<<<<<<<
 *     _Type_LARGE_LIST_VIEW: LargeListViewArray,
 *     _Type_MAP: MapArray,
*/
  __pyx_t_7 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::LIST_VIEW); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 4900, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_4, __pyx_t_7, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ListViewArray)) < (0)) __PYX_ERR(4, 4878, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/array.pxi":4901
 *     _Type_LARGE_LIST: LargeListArray,
 *     _Type_LIST_VIEW: ListViewArray,
 *     _Type_LARGE_LIST_VIEW: LargeListViewArray,             # <<<<<<<<<<<<<<
 *     _Type_MAP: MapArray,
 *     _Type_FIXED_SIZE_LIST: FixedSizeListArray,
*/
  __pyx_t_7 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::LARGE_LIST_VIEW); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 4901, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_4, __pyx_t_7, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_LargeListViewArray)) < (0)) __PYX_ERR(4, 4878, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/array.pxi":4902
 *     _Type_LIST_VIEW: ListViewArray,
 *     _Type_LARGE_LIST_VIEW: LargeListViewArray,
 *     _Type_MAP: MapArray,             # <<<<<<<<<<<<<<
 *     _Type_FIXED_SIZE_LIST: FixedSizeListArray,
 *     _Type_SPARSE_UNION: UnionArray,
*/
  __pyx_t_7 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::MAP); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 4902, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_4, __pyx_t_7, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_MapArray)) < (0)) __PYX_ERR(4, 4878, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/array.pxi":4903
 *     _Type_LARGE_LIST_VIEW: LargeListViewArray,
 *     _Type_MAP: MapArray,
 *     _Type_FIXED_SIZE_LIST: FixedSizeListArray,             # <<<<<<<<<<<<<<
 *     _Type_SPARSE_UNION: UnionArray,
 *     _Type_DENSE_UNION: UnionArray,
*/
  __pyx_t_7 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::FIXED_SIZE_LIST); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 4903, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_4, __pyx_t_7, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_FixedSizeListArray)) < (0)) __PYX_ERR(4, 4878, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/array.pxi":4904
 *     _Type_MAP: MapArray,
 *     _Type_FIXED_SIZE_LIST: FixedSizeListArray,
 *     _Type_SPARSE_UNION: UnionArray,             # <<<<<<<<<<<<<<
 *     _Type_DENSE_UNION: UnionArray,
 *     _Type_BINARY: BinaryArray,
*/
  __pyx_t_7 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::SPARSE_UNION); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 4904, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_4, __pyx_t_7, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_UnionArray)) < (0)) __PYX_ERR(4, 4878, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/array.pxi":4905
 *     _Type_FIXED_SIZE_LIST: FixedSizeListArray,
 *     _Type_SPARSE_UNION: UnionArray,
 *     _Type_DENSE_UNION: UnionArray,             # <<<<<<<<<<<<<<
 *     _Type_BINARY: BinaryArray,
 *     _Type_STRING: StringArray,
*/
  __pyx_t_7 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::DENSE_UNION); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 4905, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_4, __pyx_t_7, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_UnionArray)) < (0)) __PYX_ERR(4, 4878, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/array.pxi":4906
 *     _Type_SPARSE_UNION: UnionArray,
 *     _Type_DENSE_UNION: UnionArray,
 *     _Type_BINARY: BinaryArray,             # <<<<<<<<<<<<<<
 *     _Type_STRING: StringArray,
 *     _Type_LARGE_BINARY: LargeBinaryArray,
*/
  __pyx_t_7 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::BINARY); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 4906, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_4, __pyx_t_7, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_BinaryArray)) < (0)) __PYX_ERR(4, 4878, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/array.pxi":4907
 *     _Type_DENSE_UNION: UnionArray,
 *     _Type_BINARY: BinaryArray,
 *     _Type_STRING: StringArray,             # <<<<<<<<<<<<<<
 *     _Type_LARGE_BINARY: LargeBinaryArray,
 *     _Type_LARGE_STRING: LargeStringArray,
*/
  __pyx_t_7 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::STRING); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 4907, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_4, __pyx_t_7, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_StringArray)) < (0)) __PYX_ERR(4, 4878, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/array.pxi":4908
 *     _Type_BINARY: BinaryArray,
 *     _Type_STRING: StringArray,
 *     _Type_LARGE_BINARY: LargeBinaryArray,             # <<<<<<<<<<<<<<
 *     _Type_LARGE_STRING: LargeStringArray,
 *     _Type_BINARY_VIEW: BinaryViewArray,
*/
  __pyx_t_7 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::LARGE_BINARY); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 4908, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_4, __pyx_t_7, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_LargeBinaryArray)) < (0)) __PYX_ERR(4, 4878, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/array.pxi":4909
 *     _Type_STRING: StringArray,
 *     _Type_LARGE_BINARY: LargeBinaryArray,
 *     _Type_LARGE_STRING: LargeStringArray,             # <<<<<<<<<<<<<<
 *     _Type_BINARY_VIEW: BinaryViewArray,
 *     _Type_STRING_VIEW: StringViewArray,
*/
  __pyx_t_7 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::LARGE_STRING); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 4909, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_4, __pyx_t_7, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_LargeStringArray)) < (0)) __PYX_ERR(4, 4878, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/array.pxi":4910
 *     _Type_LARGE_BINARY: LargeBinaryArray,
 *     _Type_LARGE_STRING: LargeStringArray,
 *     _Type_BINARY_VIEW: BinaryViewArray,             # <<<<<<<<<<<<<<
 *     _Type_STRING_VIEW: StringViewArray,
 *     _Type_DICTIONARY: DictionaryArray,
*/
  __pyx_t_7 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::BINARY_VIEW); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 4910, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_4, __pyx_t_7, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_BinaryViewArray)) < (0)) __PYX_ERR(4, 4878, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/array.pxi":4911
 *     _Type_LARGE_STRING: LargeStringArray,
 *     _Type_BINARY_VIEW: BinaryViewArray,
 *     _Type_STRING_VIEW: StringViewArray,             # <<<<<<<<<<<<<<
 *     _Type_DICTIONARY: DictionaryArray,
 *     _Type_FIXED_SIZE_BINARY: FixedSizeBinaryArray,
*/
  __pyx_t_7 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::STRING_VIEW); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 4911, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_4, __pyx_t_7, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_StringViewArray)) < (0)) __PYX_ERR(4, 4878, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/array.pxi":4912
 *     _Type_BINARY_VIEW: BinaryViewArray,
 *     _Type_STRING_VIEW: StringViewArray,
 *     _Type_DICTIONARY: DictionaryArray,             # <<<<<<<<<<<<<<
 *     _Type_FIXED_SIZE_BINARY: FixedSizeBinaryArray,
 *     _Type_DECIMAL32: Decimal32Array,
*/
  __pyx_t_7 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::DICTIONARY); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 4912, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_4, __pyx_t_7, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_DictionaryArray)) < (0)) __PYX_ERR(4, 4878, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/array.pxi":4913
 *     _Type_STRING_VIEW: StringViewArray,
 *     _Type_DICTIONARY: DictionaryArray,
 *     _Type_FIXED_SIZE_BINARY: FixedSizeBinaryArray,             # <<<<<<<<<<<<<<
 *     _Type_DECIMAL32: Decimal32Array,
 *     _Type_DECIMAL64: Decimal64Array,
*/
  __pyx_t_7 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::FIXED_SIZE_BINARY); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 4913, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_4, __pyx_t_7, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_FixedSizeBinaryArray)) < (0)) __PYX_ERR(4, 4878, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/array.pxi":4914
 *     _Type_DICTIONARY: DictionaryArray,
 *     _Type_FIXED_SIZE_BINARY: FixedSizeBinaryArray,
 *     _Type_DECIMAL32: Decimal32Array,             # <<<<<<<<<<<<<<
 *     _Type_DECIMAL64: Decimal64Array,
 *     _Type_DECIMAL128: Decimal128Array,
*/
  __pyx_t_7 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::DECIMAL32); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 4914, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_4, __pyx_t_7, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Decimal32Array)) < (0)) __PYX_ERR(4, 4878, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/array.pxi":4915
 *     _Type_FIXED_SIZE_BINARY: FixedSizeBinaryArray,
 *     _Type_DECIMAL32: Decimal32Array,
 *     _Type_DECIMAL64: Decimal64Array,             # <<<<<<<<<<<<<<
 *     _Type_DECIMAL128: Decimal128Array,
 *     _Type_DECIMAL256: Decimal256Array,
*/
  __pyx_t_7 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::DECIMAL64); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 4915, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_4, __pyx_t_7, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Decimal64Array)) < (0)) __PYX_ERR(4, 4878, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/array.pxi":4916
 *     _Type_DECIMAL32: Decimal32Array,
 *     _Type_DECIMAL64: Decimal64Array,
 *     _Type_DECIMAL128: Decimal128Array,             # <<<<<<<<<<<<<<
 *     _Type_DECIMAL256: Decimal256Array,
 *     _Type_STRUCT: StructArray,
*/
  __pyx_t_7 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::DECIMAL128); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 4916, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_4, __pyx_t_7, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Decimal128Array)) < (0)) __PYX_ERR(4, 4878, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/array.pxi":4917
 *     _Type_DECIMAL64: Decimal64Array,
 *     _Type_DECIMAL128: Decimal128Array,
 *     _Type_DECIMAL256: Decimal256Array,             # <<<<<<<<<<<<<<
 *     _Type_STRUCT: StructArray,
 *     _Type_RUN_END_ENCODED: RunEndEncodedArray,
*/
  __pyx_t_7 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::DECIMAL256); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 4917, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_4, __pyx_t_7, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Decimal256Array)) < (0)) __PYX_ERR(4, 4878, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/array.pxi":4918
 *     _Type_DECIMAL128: Decimal128Array,
 *     _Type_DECIMAL256: Decimal256Array,
 *     _Type_STRUCT: StructArray,             # <<<<<<<<<<<<<<
 *     _Type_RUN_END_ENCODED: RunEndEncodedArray,
 *     _Type_EXTENSION: ExtensionArray,
*/
  __pyx_t_7 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::STRUCT); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 4918, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_4, __pyx_t_7, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_StructArray)) < (0)) __PYX_ERR(4, 4878, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/array.pxi":4919
 *     _Type_DECIMAL256: Decimal256Array,
 *     _Type_STRUCT: StructArray,
 *     _Type_RUN_END_ENCODED: RunEndEncodedArray,             # <<<<<<<<<<<<<<
 *     _Type_EXTENSION: ExtensionArray,
 * }
*/
  __pyx_t_7 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::RUN_END_ENCODED); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 4919, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_4, __pyx_t_7, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RunEndEncodedArray)) < (0)) __PYX_ERR(4, 4878, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/array.pxi":4920
 *     _Type_STRUCT: StructArray,
 *     _Type_RUN_END_ENCODED: RunEndEncodedArray,
 *     _Type_EXTENSION: ExtensionArray,             # <<<<<<<<<<<<<<
 * }
 * 
*/
  __pyx_t_7 = __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type( arrow::Type::EXTENSION); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 4920, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_4, __pyx_t_7, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ExtensionArray)) < (0)) __PYX_ERR(4, 4878, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_XGOTREF(__pyx_v_7pyarrow_3lib__array_classes);
  __Pyx_DECREF_SET(__pyx_v_7pyarrow_3lib__array_classes, ((PyObject*)__pyx_t_4));
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_4 = 0;

  /* "pyarrow/array.pxi":4970
 * 
 * 
 * def concat_arrays(arrays, MemoryPool memory_pool=None):             # <<<<<<<<<<<<<<
 *     """
 *     Concatenate the given arrays.
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_211concat_arrays, 0, __pyx_mstate_global->__pyx_n_u_concat_arrays, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[413])); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 4970, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[7]);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_concat_arrays, __pyx_t_4) < (0)) __PYX_ERR(4, 4970, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyarrow/array.pxi":5022
 * 
 * 
 * def _empty_array(DataType type):             # <<<<<<<<<<<<<<
 *     """
 *     Create empty array of the given type.
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_213_empty_array, 0, __pyx_mstate_global->__pyx_n_u_empty_array, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[414])); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 5022, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_empty_array, __pyx_t_4) < (0)) __PYX_ERR(4, 5022, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyarrow/builder.pxi":18
 * # under the License.
 * 
 * import math             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_math, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 18, __pyx_L1_error)
  __pyx_t_4 = __pyx_t_1;
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_math, __pyx_t_4) < (0)) __PYX_ERR(16, 18, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyarrow/builder.pxi":35
 *         self.builder.reset(new CStringBuilder(pool))
 * 
 *     def append(self, value):             # <<<<<<<<<<<<<<
 *         """
 *         Append a single value to the builder.
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_13StringBuilder_3append, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_StringBuilder_append, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[415])); if (unlikely(!__pyx_t_4)) __PYX_ERR(16, 35, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_StringBuilder, __pyx_mstate_global->__pyx_n_u_append, __pyx_t_4) < (0)) __PYX_ERR(16, 35, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyarrow/builder.pxi":54
 *             raise TypeError('StringBuilder only accepts string objects')
 * 
 *     def append_values(self, values):             # <<<<<<<<<<<<<<
 *         """
 *         Append all the values from an iterable.
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_13StringBuilder_5append_values, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_StringBuilder_append_values, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[416])); if (unlikely(!__pyx_t_4)) __PYX_ERR(16, 54, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_StringBuilder, __pyx_mstate_global->__pyx_n_u_append_values, __pyx_t_4) < (0)) __PYX_ERR(16, 54, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyarrow/builder.pxi":66
 *             self.append(value)
 * 
 *     def finish(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return result of builder as an Array object; also resets the builder.
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_13StringBuilder_7finish, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_StringBuilder_finish, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[417])); if (unlikely(!__pyx_t_4)) __PYX_ERR(16, 66, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_StringBuilder, __pyx_mstate_global->__pyx_n_u_finish, __pyx_t_4) < (0)) __PYX_ERR(16, 66, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_13StringBuilder_11__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_StringBuilder___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[418])); if (unlikely(!__pyx_t_4)) __PYX_ERR(7, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_4) < (0)) __PYX_ERR(7, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_13StringBuilder_13__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_StringBuilder___setstate_cython, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[419])); if (unlikely(!__pyx_t_4)) __PYX_ERR(7, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_4) < (0)) __PYX_ERR(7, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyarrow/builder.pxi":101
 *         self.builder.reset(new CStringViewBuilder(pool))
 * 
 *     def append(self, value):             # <<<<<<<<<<<<<<
 *         """
 *         Append a single value to the builder.
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_17StringViewBuilder_3append, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_StringViewBuilder_append, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[420])); if (unlikely(!__pyx_t_4)) __PYX_ERR(16, 101, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_StringViewBuilder, __pyx_mstate_global->__pyx_n_u_append, __pyx_t_4) < (0)) __PYX_ERR(16, 101, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyarrow/builder.pxi":120
 *             raise TypeError('StringViewBuilder only accepts string objects')
 * 
 *     def append_values(self, values):             # <<<<<<<<<<<<<<
 *         """
 *         Append all the values from an iterable.
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_17StringViewBuilder_5append_values, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_StringViewBuilder_append_values, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[421])); if (unlikely(!__pyx_t_4)) __PYX_ERR(16, 120, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_StringViewBuilder, __pyx_mstate_global->__pyx_n_u_append_values, __pyx_t_4) < (0)) __PYX_ERR(16, 120, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyarrow/builder.pxi":132
 *             self.append(value)
 * 
 *     def finish(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return result of builder as an Array object; also resets the builder.
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_17StringViewBuilder_7finish, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_StringViewBuilder_finish, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[422])); if (unlikely(!__pyx_t_4)) __PYX_ERR(16, 132, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_StringViewBuilder, __pyx_mstate_global->__pyx_n_u_finish, __pyx_t_4) < (0)) __PYX_ERR(16, 132, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_17StringViewBuilder_11__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_StringViewBuilder___reduce_cytho, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[423])); if (unlikely(!__pyx_t_4)) __PYX_ERR(7, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_4) < (0)) __PYX_ERR(7, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_17StringViewBuilder_13__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_StringViewBuilder___setstate_cyt, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[424])); if (unlikely(!__pyx_t_4)) __PYX_ERR(7, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_4) < (0)) __PYX_ERR(7, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyarrow/table.pxi":21
 * from cpython.pycapsule cimport PyCapsule_CheckExact, PyCapsule_GetPointer, PyCapsule_New
 * 
 * import warnings             # <<<<<<<<<<<<<<
 * from cython import sizeof
 * 
*/
  __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_warnings, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 21, __pyx_L1_error)
  __pyx_t_4 = __pyx_t_1;
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_warnings, __pyx_t_4) < (0)) __PYX_ERR(17, 21, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyarrow/table.pxi":73
 *         self.chunked_array = chunked_array.get()
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         self._assert_cpu()
 *         return chunked_array, (self.chunks, self.type)
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_12ChunkedArray_5__reduce__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ChunkedArray___reduce, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[425])); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 73, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ChunkedArray, __pyx_mstate_global->__pyx_n_u_reduce, __pyx_t_4) < (0)) __PYX_ERR(17, 73, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyarrow/table.pxi":99
 *         return pyarrow_wrap_data_type(self.sp_chunked_array.get().type())
 * 
 *     def length(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return length of a ChunkedArray.
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_12ChunkedArray_7length, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ChunkedArray_length, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[426])); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 99, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ChunkedArray, __pyx_mstate_global->__pyx_n_u_length, __pyx_t_4) < (0)) __PYX_ERR(17, 99, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyarrow/table.pxi":119
 *         return f"{type_format}\n{self}"
 * 
 *     def to_string(self, *, int indent=0, int window=5, int container_window=2,             # <<<<<<<<<<<<<<
 *                   c_bool skip_new_lines=False, int element_size_limit=100):
 *         """
*/
  __pyx_t_4 = __Pyx_PyDict_NewPresized(5); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 119, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_indent, __pyx_mstate_global->__pyx_int_0) < (0)) __PYX_ERR(17, 119, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_window, __pyx_mstate_global->__pyx_int_5) < (0)) __PYX_ERR(17, 119, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_container_window, __pyx_mstate_global->__pyx_int_2) < (0)) __PYX_ERR(17, 119, __pyx_L1_error)

  /* "pyarrow/table.pxi":120
 * 
 *     def to_string(self, *, int indent=0, int window=5, int container_window=2,
 *                   c_bool skip_new_lines=False, int element_size_limit=100):             # <<<<<<<<<<<<<<
 *         """
 *         Render a "pretty-printed" string representation of the ChunkedArray
*/
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_skip_new_lines, Py_False) < (0)) __PYX_ERR(17, 119, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_element_size_limit, __pyx_mstate_global->__pyx_int_100) < (0)) __PYX_ERR(17, 119, __pyx_L1_error)

  /* "pyarrow/table.pxi":119
 *         return f"{type_format}\n{self}"
 * 
 *     def to_string(self, *, int indent=0, int window=5, int container_window=2,             # <<<<<<<<<<<<<<
 *                   c_bool skip_new_lines=False, int element_size_limit=100):
 *         """
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_12ChunkedArray_13to_string, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ChunkedArray_to_string, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[427])); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 119, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_7, __pyx_t_4);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ChunkedArray, __pyx_mstate_global->__pyx_n_u_to_string, __pyx_t_7) < (0)) __PYX_ERR(17, 119, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/table.pxi":170
 *         return frombytes(result, safe=True)
 * 
 *     def format(self, **kwargs):             # <<<<<<<<<<<<<<
 *         """
 *         DEPRECATED, use pyarrow.ChunkedArray.to_string
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_12ChunkedArray_15format, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ChunkedArray_format, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[428])); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 170, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ChunkedArray, __pyx_mstate_global->__pyx_n_u_format, __pyx_t_7) < (0)) __PYX_ERR(17, 170, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/table.pxi":190
 *         return self.to_string()
 * 
 *     def validate(self, *, full=False):             # <<<<<<<<<<<<<<
 *         """
 *         Perform validation checks.  An exception is raised if validation fails.
*/
  __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 190, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_full, Py_False) < (0)) __PYX_ERR(17, 190, __pyx_L1_error)
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_12ChunkedArray_19validate, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ChunkedArray_validate, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[429])); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 190, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_4, __pyx_t_7);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ChunkedArray, __pyx_mstate_global->__pyx_n_u_validate, __pyx_t_4) < (0)) __PYX_ERR(17, 190, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyarrow/table.pxi":265
 *         return size
 * 
 *     def get_total_buffer_size(self):             # <<<<<<<<<<<<<<
 *         """
 *         The sum of bytes in each buffer referenced by the chunked array.
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_12ChunkedArray_21get_total_buffer_size, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ChunkedArray_get_total_buffer_si, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[430])); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 265, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ChunkedArray, __pyx_mstate_global->__pyx_n_u_get_total_buffer_size, __pyx_t_4) < (0)) __PYX_ERR(17, 265, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyarrow/table.pxi":290
 *         return total_buffer_size
 * 
 *     def __sizeof__(self):             # <<<<<<<<<<<<<<
 *         return super(ChunkedArray, self).__sizeof__() + self.nbytes
 * 
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_12ChunkedArray_23__sizeof__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ChunkedArray___sizeof, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[431])); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 290, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ChunkedArray, __pyx_mstate_global->__pyx_n_u_sizeof, __pyx_t_4) < (0)) __PYX_ERR(17, 290, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyarrow/table.pxi":322
 *         return Scalar.wrap(GetResultValue(self.chunked_array.GetScalar(i)))
 * 
 *     def is_null(self, *, nan_is_null=False):             # <<<<<<<<<<<<<<
 *         """
 *         Return boolean array indicating the null values.
*/
  __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 322, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_nan_is_null, Py_False) < (0)) __PYX_ERR(17, 322, __pyx_L1_error)
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_12ChunkedArray_30is_null, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ChunkedArray_is_null, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[432])); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 322, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_7, __pyx_t_4);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ChunkedArray, __pyx_mstate_global->__pyx_n_u_is_null, __pyx_t_7) < (0)) __PYX_ERR(17, 322, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/table.pxi":356
 *         return _pc().call_function('is_null', [self], options)
 * 
 *     def is_nan(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return boolean array indicating the NaN values.
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_12ChunkedArray_32is_nan, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ChunkedArray_is_nan, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[433])); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 356, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ChunkedArray, __pyx_mstate_global->__pyx_n_u_is_nan, __pyx_t_7) < (0)) __PYX_ERR(17, 356, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/table.pxi":381
 *         return _pc().is_nan(self)
 * 
 *     def is_valid(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return boolean array indicating the non-null values.
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_12ChunkedArray_34is_valid, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ChunkedArray_is_valid, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[434])); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 381, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ChunkedArray, __pyx_mstate_global->__pyx_n_u_is_valid, __pyx_t_7) < (0)) __PYX_ERR(17, 381, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/table.pxi":413
 *             return NotImplemented
 * 
 *     def fill_null(self, fill_value):             # <<<<<<<<<<<<<<
 *         """
 *         Replace each null element in values with fill_value.
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_12ChunkedArray_38fill_null, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ChunkedArray_fill_null, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[435])); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 413, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ChunkedArray, __pyx_mstate_global->__pyx_n_u_fill_null, __pyx_t_7) < (0)) __PYX_ERR(17, 413, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/table.pxi":450
 *         return _pc().fill_null(self, fill_value)
 * 
 *     def equals(self, ChunkedArray other):             # <<<<<<<<<<<<<<
 *         """
 *         Return whether the contents of two chunked arrays are equal.
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_12ChunkedArray_40equals, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ChunkedArray_equals, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[436])); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 450, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ChunkedArray, __pyx_mstate_global->__pyx_n_u_equals, __pyx_t_7) < (0)) __PYX_ERR(17, 450, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/table.pxi":490
 *         return result
 * 
 *     def _to_pandas(self, options, types_mapper=None, **kwargs):             # <<<<<<<<<<<<<<
 *         self._assert_cpu()
 *         return _array_like_to_pandas(self, options, types_mapper=types_mapper)
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_12ChunkedArray_42_to_pandas, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ChunkedArray__to_pandas, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[437])); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 490, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_mstate_global->__pyx_tuple[7]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ChunkedArray, __pyx_mstate_global->__pyx_n_u_to_pandas, __pyx_t_7) < (0)) __PYX_ERR(17, 490, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/table.pxi":494
 *         return _array_like_to_pandas(self, options, types_mapper=types_mapper)
 * 
 *     def to_numpy(self, zero_copy_only=False):             # <<<<<<<<<<<<<<
 *         """
 *         Return a NumPy copy of this array (experimental).
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_12ChunkedArray_44to_numpy, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ChunkedArray_to_numpy, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[438])); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 494, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_mstate_global->__pyx_tuple[21]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ChunkedArray, __pyx_mstate_global->__pyx_n_u_to_numpy, __pyx_t_7) < (0)) __PYX_ERR(17, 494, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/table.pxi":549
 *         return values
 * 
 *     def __array__(self, dtype=None, copy=None):             # <<<<<<<<<<<<<<
 *         self._assert_cpu()
 *         if copy is False:
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_12ChunkedArray_46__array__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ChunkedArray___array, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[439])); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 549, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_mstate_global->__pyx_tuple[24]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ChunkedArray, __pyx_mstate_global->__pyx_n_u_array_2, __pyx_t_7) < (0)) __PYX_ERR(17, 549, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/table.pxi":564
 *         return values.astype(dtype, copy=False)
 * 
 *     def cast(self, object target_type=None, safe=None, options=None):             # <<<<<<<<<<<<<<
 *         """
 *         Cast array values to another data type
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_12ChunkedArray_48cast, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ChunkedArray_cast, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[440])); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 564, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_mstate_global->__pyx_tuple[0]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ChunkedArray, __pyx_mstate_global->__pyx_n_u_cast, __pyx_t_7) < (0)) __PYX_ERR(17, 564, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/table.pxi":599
 *         return _pc().cast(self, target_type, safe=safe, options=options)
 * 
 *     def dictionary_encode(self, null_encoding='mask'):             # <<<<<<<<<<<<<<
 *         """
 *         Compute dictionary-encoded representation of array.
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_12ChunkedArray_50dictionary_encode, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ChunkedArray_dictionary_encode, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[441])); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 599, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_mstate_global->__pyx_tuple[28]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ChunkedArray, __pyx_mstate_global->__pyx_n_u_dictionary_encode, __pyx_t_7) < (0)) __PYX_ERR(17, 599, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/table.pxi":663
 *         return _pc().call_function('dictionary_encode', [self], options)
 * 
 *     def flatten(self, MemoryPool memory_pool=None):             # <<<<<<<<<<<<<<
 *         """
 *         Flatten this ChunkedArray.  If it has a struct type, the column is
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_12ChunkedArray_52flatten, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ChunkedArray_flatten, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[442])); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 663, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_mstate_global->__pyx_tuple[7]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ChunkedArray, __pyx_mstate_global->__pyx_n_u_flatten, __pyx_t_7) < (0)) __PYX_ERR(17, 663, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/table.pxi":734
 *         return [pyarrow_wrap_chunked_array(col) for col in flattened]
 * 
 *     def combine_chunks(self, MemoryPool memory_pool=None):             # <<<<<<<<<<<<<<
 *         """
 *         Flatten this ChunkedArray into a single non-chunked array.
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_12ChunkedArray_54combine_chunks, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ChunkedArray_combine_chunks, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[443])); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 734, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_mstate_global->__pyx_tuple[7]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ChunkedArray, __pyx_mstate_global->__pyx_n_u_combine_chunks, __pyx_t_7) < (0)) __PYX_ERR(17, 734, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/table.pxi":782
 *             return concat_arrays(self.chunks)
 * 
 *     def unique(self):             # <<<<<<<<<<<<<<
 *         """
 *         Compute distinct elements in array
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_12ChunkedArray_56unique, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ChunkedArray_unique, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[444])); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 782, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ChunkedArray, __pyx_mstate_global->__pyx_n_u_unique, __pyx_t_7) < (0)) __PYX_ERR(17, 782, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/table.pxi":820
 *         return _pc().call_function('unique', [self])
 * 
 *     def value_counts(self):             # <<<<<<<<<<<<<<
 *         """
 *         Compute counts of unique elements in array.
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_12ChunkedArray_58value_counts, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ChunkedArray_value_counts, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[445])); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 820, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ChunkedArray, __pyx_mstate_global->__pyx_n_u_value_counts, __pyx_t_7) < (0)) __PYX_ERR(17, 820, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/table.pxi":867
 *         return _pc().call_function('value_counts', [self])
 * 
 *     def slice(self, offset=0, length=None):             # <<<<<<<<<<<<<<
 *         """
 *         Compute zero-copy slice of this ChunkedArray
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_12ChunkedArray_60slice, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ChunkedArray_slice, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[446])); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 867, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_mstate_global->__pyx_tuple[31]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ChunkedArray, __pyx_mstate_global->__pyx_n_u_slice, __pyx_t_7) < (0)) __PYX_ERR(17, 867, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/table.pxi":925
 *         return pyarrow_wrap_chunked_array(result)
 * 
 *     def filter(self, mask, object null_selection_behavior="drop"):             # <<<<<<<<<<<<<<
 *         """
 *         Select values from the chunked array.
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_12ChunkedArray_62filter, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ChunkedArray_filter, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[447])); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 925, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_mstate_global->__pyx_tuple[39]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ChunkedArray, __pyx_mstate_global->__pyx_n_u_filter, __pyx_t_7) < (0)) __PYX_ERR(17, 925, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/table.pxi":990
 *         return _pc().filter(self, mask, null_selection_behavior)
 * 
 *     def index(self, value, start=None, end=None, *, memory_pool=None):             # <<<<<<<<<<<<<<
 *         """
 *         Find the first index of a value.
*/
  __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 990, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_memory_pool, Py_None) < (0)) __PYX_ERR(17, 990, __pyx_L1_error)
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_12ChunkedArray_64index, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ChunkedArray_index, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[448])); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 990, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[24]);
  __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_4, __pyx_t_7);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ChunkedArray, __pyx_mstate_global->__pyx_n_u_index, __pyx_t_4) < (0)) __PYX_ERR(17, 990, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyarrow/table.pxi":1038
 *         return _pc().index(self, value, start, end, memory_pool=memory_pool)
 * 
 *     def take(self, object indices):             # <<<<<<<<<<<<<<
 *         """
 *         Select values from the chunked array.
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_12ChunkedArray_66take, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ChunkedArray_take, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[449])); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 1038, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ChunkedArray, __pyx_mstate_global->__pyx_n_u_take, __pyx_t_4) < (0)) __PYX_ERR(17, 1038, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyarrow/table.pxi":1085
 *         return _pc().take(self, indices)
 * 
 *     def drop_null(self):             # <<<<<<<<<<<<<<
 *         """
 *         Remove missing values from a chunked array.
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_12ChunkedArray_68drop_null, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ChunkedArray_drop_null, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[450])); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 1085, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ChunkedArray, __pyx_mstate_global->__pyx_n_u_drop_null, __pyx_t_4) < (0)) __PYX_ERR(17, 1085, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyarrow/table.pxi":1125
 *         return _pc().drop_null(self)
 * 
 *     def sort(self, order="ascending", **kwargs):             # <<<<<<<<<<<<<<
 *         """
 *         Sort the ChunkedArray
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_12ChunkedArray_70sort, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ChunkedArray_sort, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[451])); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 1125, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[32]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ChunkedArray, __pyx_mstate_global->__pyx_n_u_sort, __pyx_t_4) < (0)) __PYX_ERR(17, 1125, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyarrow/table.pxi":1149
 *         return self.take(indices)
 * 
 *     def unify_dictionaries(self, MemoryPool memory_pool=None):             # <<<<<<<<<<<<<<
 *         """
 *         Unify dictionaries across all chunks.
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_12ChunkedArray_72unify_dictionaries, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ChunkedArray_unify_dictionaries, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[452])); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 1149, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[7]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ChunkedArray, __pyx_mstate_global->__pyx_n_u_unify_dictionaries, __pyx_t_4) < (0)) __PYX_ERR(17, 1149, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyarrow/table.pxi":1271
 *         return self.chunked_array.num_chunks()
 * 
 *     def chunk(self, i):             # <<<<<<<<<<<<<<
 *         """
 *         Select a chunk by its index.
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_12ChunkedArray_74chunk, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ChunkedArray_chunk, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[453])); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 1271, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ChunkedArray, __pyx_mstate_global->__pyx_n_u_chunk, __pyx_t_4) < (0)) __PYX_ERR(17, 1271, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyarrow/table.pxi":1338
 *         return list(self.iterchunks())
 * 
 *     def iterchunks(self):             # <<<<<<<<<<<<<<
 *         """
 *         Convert to an iterator of ChunkArrays.
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_12ChunkedArray_76iterchunks, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ChunkedArray_iterchunks, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[13])); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 1338, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ChunkedArray, __pyx_mstate_global->__pyx_n_u_iterchunks, __pyx_t_4) < (0)) __PYX_ERR(17, 1338, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyarrow/table.pxi":1356
 *             yield self.chunk(i)
 * 
 *     def to_pylist(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Convert to a list of native Python objects.
*/
  __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 1356, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_maps_as_pydicts, Py_None) < (0)) __PYX_ERR(17, 1356, __pyx_L1_error)
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_12ChunkedArray_79to_pylist, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ChunkedArray_to_pylist, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[454])); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 1356, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_7, __pyx_t_4);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ChunkedArray, __pyx_mstate_global->__pyx_n_u_to_pylist, __pyx_t_7) < (0)) __PYX_ERR(17, 1356, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/table.pxi":1387
 *         return result
 * 
 *     def __arrow_c_stream__(self, requested_schema=None):             # <<<<<<<<<<<<<<
 *         """
 *         Export to a C ArrowArrayStream PyCapsule.
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_12ChunkedArray_81__arrow_c_stream__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ChunkedArray___arrow_c_stream, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[455])); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 1387, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_mstate_global->__pyx_tuple[7]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ChunkedArray, __pyx_mstate_global->__pyx_n_u_arrow_c_stream, __pyx_t_7) < (0)) __PYX_ERR(17, 1387, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/table.pxi":1430
 *         return stream_capsule
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def _import_from_c_capsule(stream):
 *         """
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_12ChunkedArray_83_import_from_c_capsule, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ChunkedArray__import_from_c_caps, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[456])); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 1430, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ChunkedArray, __pyx_mstate_global->__pyx_n_u_import_from_c_capsule, __pyx_t_7) < (0)) __PYX_ERR(17, 1430, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_4 = NULL;
  __Pyx_GetNameInClass(__pyx_t_12, (PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ChunkedArray, __pyx_mstate_global->__pyx_n_u_import_from_c_capsule); if (unlikely(!__pyx_t_12)) __PYX_ERR(17, 1430, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_10 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_12};
    __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_staticmethod, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 1430, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
  }
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ChunkedArray, __pyx_mstate_global->__pyx_n_u_import_from_c_capsule, __pyx_t_7) < (0)) __PYX_ERR(17, 1430, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/table.pxi":1470
 *         return self._is_cpu
 * 
 *     def _assert_cpu(self):             # <<<<<<<<<<<<<<
 *         if not self.is_cpu:
 *             raise NotImplementedError("Implemented only for data on CPU device")
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_12ChunkedArray_85_assert_cpu, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ChunkedArray__assert_cpu, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[457])); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 1470, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ChunkedArray, __pyx_mstate_global->__pyx_n_u_assert_cpu, __pyx_t_7) < (0)) __PYX_ERR(17, 1470, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/table.pxi":1475
 * 
 * 
 * def chunked_array(arrays, type=None):             # <<<<<<<<<<<<<<
 *     """
 *     Construct chunked array from list of array-like objects
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_215chunked_array, 0, __pyx_mstate_global->__pyx_n_u_chunked_array, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[458])); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 1475, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_mstate_global->__pyx_tuple[7]);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_chunked_array, __pyx_t_7) < (0)) __PYX_ERR(17, 1475, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/table.pxi":1637
 *                         f"one of the `{self.__class__.__name__}.from_*` functions instead.")
 * 
 *     def __array__(self, dtype=None, copy=None):             # <<<<<<<<<<<<<<
 *         self._assert_cpu()
 *         if copy is False:
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_8_Tabular_3__array__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Tabular___array, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[459])); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 1637, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_mstate_global->__pyx_tuple[24]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Tabular, __pyx_mstate_global->__pyx_n_u_array_2, __pyx_t_7) < (0)) __PYX_ERR(17, 1637, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/table.pxi":1657
 *         return arr
 * 
 *     def __dataframe__(self, nan_as_null: bool = False, allow_copy: bool = True):             # <<<<<<<<<<<<<<
 *         """
 *         Return the dataframe interchange object implementing the interchange protocol.
*/
  __pyx_t_7 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 1657, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_nan_as_null, __pyx_mstate_global->__pyx_n_u_bool_2) < (0)) __PYX_ERR(17, 1657, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_allow_copy, __pyx_mstate_global->__pyx_n_u_bool_2) < (0)) __PYX_ERR(17, 1657, __pyx_L1_error)
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_8_Tabular_5__dataframe__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Tabular___dataframe, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[460])); if (unlikely(!__pyx_t_12)) __PYX_ERR(17, 1657, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_12, __pyx_mstate_global->__pyx_tuple[40]);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_12, __pyx_t_7);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Tabular, __pyx_mstate_global->__pyx_n_u_dataframe, __pyx_t_12) < (0)) __PYX_ERR(17, 1657, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/table.pxi":1722
 *         return self.to_string(preview_cols=10)
 * 
 *     def _column(self, int i):             # <<<<<<<<<<<<<<
 *         raise NotImplementedError
 * 
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_8_Tabular_15_column, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Tabular__column, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[461])); if (unlikely(!__pyx_t_12)) __PYX_ERR(17, 1722, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Tabular, __pyx_mstate_global->__pyx_n_u_column_2, __pyx_t_12) < (0)) __PYX_ERR(17, 1722, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/table.pxi":1725
 *         raise NotImplementedError
 * 
 *     def _ensure_integer_index(self, i):             # <<<<<<<<<<<<<<
 *         """
 *         Ensure integer index (convert string column name to integer if needed).
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_8_Tabular_17_ensure_integer_index, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Tabular__ensure_integer_index, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[462])); if (unlikely(!__pyx_t_12)) __PYX_ERR(17, 1725, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Tabular, __pyx_mstate_global->__pyx_n_u_ensure_integer_index, __pyx_t_12) < (0)) __PYX_ERR(17, 1725, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/table.pxi":1744
 *             raise TypeError("Index must either be string or integer")
 * 
 *     def _is_initialized(self):             # <<<<<<<<<<<<<<
 *         raise NotImplementedError
 * 
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_8_Tabular_19_is_initialized, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Tabular__is_initialized, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[463])); if (unlikely(!__pyx_t_12)) __PYX_ERR(17, 1744, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Tabular, __pyx_mstate_global->__pyx_n_u_is_initialized, __pyx_t_12) < (0)) __PYX_ERR(17, 1744, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/table.pxi":1747
 *         raise NotImplementedError
 * 
 *     def column(self, i):             # <<<<<<<<<<<<<<
 *         """
 *         Select single column from Table or RecordBatch.
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_8_Tabular_21column, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Tabular_column, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[464])); if (unlikely(!__pyx_t_12)) __PYX_ERR(17, 1747, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Tabular, __pyx_mstate_global->__pyx_n_u_column, __pyx_t_12) < (0)) __PYX_ERR(17, 1747, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/table.pxi":1859
 *         return [self._column(i) for i in range(self.num_columns)]
 * 
 *     def drop_null(self):             # <<<<<<<<<<<<<<
 *         """
 *         Remove rows that contain missing values from a Table or RecordBatch.
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_8_Tabular_23drop_null, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Tabular_drop_null, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[465])); if (unlikely(!__pyx_t_12)) __PYX_ERR(17, 1859, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Tabular, __pyx_mstate_global->__pyx_n_u_drop_null, __pyx_t_12) < (0)) __PYX_ERR(17, 1859, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/table.pxi":1894
 *         return _pc().drop_null(self)
 * 
 *     def field(self, i):             # <<<<<<<<<<<<<<
 *         """
 *         Select a schema field by its column name or numeric index.
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_8_Tabular_25field, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Tabular_field, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[466])); if (unlikely(!__pyx_t_12)) __PYX_ERR(17, 1894, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Tabular, __pyx_mstate_global->__pyx_n_u_field, __pyx_t_12) < (0)) __PYX_ERR(17, 1894, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/table.pxi":1923
 *         return self.schema.field(i)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def from_pydict(cls, mapping, schema=None, metadata=None):
 *         """
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_8_Tabular_27from_pydict, __Pyx_CYFUNCTION_CLASSMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Tabular_from_pydict, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[467])); if (unlikely(!__pyx_t_12)) __PYX_ERR(17, 1923, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_12, __pyx_mstate_global->__pyx_tuple[24]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Tabular, __pyx_mstate_global->__pyx_n_u_from_pydict_2, __pyx_t_12) < (0)) __PYX_ERR(17, 1923, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_GetNameInClass(__pyx_t_12, (PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Tabular, __pyx_mstate_global->__pyx_n_u_from_pydict_2); if (unlikely(!__pyx_t_12)) __PYX_ERR(17, 1923, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_7 = __Pyx_Method_ClassMethod(__pyx_t_12); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 1923, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Tabular, __pyx_mstate_global->__pyx_n_u_from_pydict_2, __pyx_t_7) < (0)) __PYX_ERR(17, 1923, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/table.pxi":1990
 *                             metadata=metadata)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def from_pylist(cls, mapping, schema=None, metadata=None):
 *         """
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_8_Tabular_29from_pylist, __Pyx_CYFUNCTION_CLASSMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Tabular_from_pylist, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[468])); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 1990, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_mstate_global->__pyx_tuple[24]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Tabular, __pyx_mstate_global->__pyx_n_u_from_pylist_2, __pyx_t_7) < (0)) __PYX_ERR(17, 1990, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_GetNameInClass(__pyx_t_7, (PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Tabular, __pyx_mstate_global->__pyx_n_u_from_pylist_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 1990, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_12 = __Pyx_Method_ClassMethod(__pyx_t_7); if (unlikely(!__pyx_t_12)) __PYX_ERR(17, 1990, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Tabular, __pyx_mstate_global->__pyx_n_u_from_pylist_2, __pyx_t_12) < (0)) __PYX_ERR(17, 1990, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/table.pxi":2054
 *                             metadata=metadata)
 * 
 *     def itercolumns(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over all columns in their numerical order.
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_8_Tabular_31itercolumns, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Tabular_itercolumns, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[14])); if (unlikely(!__pyx_t_12)) __PYX_ERR(17, 2054, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Tabular, __pyx_mstate_global->__pyx_n_u_itercolumns, __pyx_t_12) < (0)) __PYX_ERR(17, 2054, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/table.pxi":2112
 *         raise NotImplementedError
 * 
 *     def sort_by(self, sorting, **kwargs):             # <<<<<<<<<<<<<<
 *         """
 *         Sort the Table or RecordBatch by one or multiple columns.
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_8_Tabular_34sort_by, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Tabular_sort_by, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[469])); if (unlikely(!__pyx_t_12)) __PYX_ERR(17, 2112, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Tabular, __pyx_mstate_global->__pyx_n_u_sort_by, __pyx_t_12) < (0)) __PYX_ERR(17, 2112, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/table.pxi":2163
 *         return self.take(indices)
 * 
 *     def take(self, object indices):             # <<<<<<<<<<<<<<
 *         """
 *         Select rows from a Table or RecordBatch.
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_8_Tabular_36take, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Tabular_take, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[470])); if (unlikely(!__pyx_t_12)) __PYX_ERR(17, 2163, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Tabular, __pyx_mstate_global->__pyx_n_u_take, __pyx_t_12) < (0)) __PYX_ERR(17, 2163, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/table.pxi":2202
 *         return _pc().take(self, indices)
 * 
 *     def filter(self, mask, object null_selection_behavior="drop"):             # <<<<<<<<<<<<<<
 *         """
 *         Select rows from the table or record batch based on a boolean mask.
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_8_Tabular_38filter, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Tabular_filter, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[471])); if (unlikely(!__pyx_t_12)) __PYX_ERR(17, 2202, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_12, __pyx_mstate_global->__pyx_tuple[39]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Tabular, __pyx_mstate_global->__pyx_n_u_filter, __pyx_t_12) < (0)) __PYX_ERR(17, 2202, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/table.pxi":2275
 *             return _pc().filter(self, mask, null_selection_behavior)
 * 
 *     def to_pydict(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Convert the Table or RecordBatch to a dict or OrderedDict.
*/
  __pyx_t_12 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(17, 2275, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  if (PyDict_SetItem(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_maps_as_pydicts, Py_None) < (0)) __PYX_ERR(17, 2275, __pyx_L1_error)
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_8_Tabular_40to_pydict, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Tabular_to_pydict, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[472])); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 2275, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_7, __pyx_t_12);
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Tabular, __pyx_mstate_global->__pyx_n_u_to_pydict, __pyx_t_7) < (0)) __PYX_ERR(17, 2275, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/table.pxi":2315
 *         return ordered_dict(entries)
 * 
 *     def to_pylist(self, *, maps_as_pydicts=None):             # <<<<<<<<<<<<<<
 *         """
 *         Convert the Table or RecordBatch to a list of rows / dictionaries.
*/
  __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 2315, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_maps_as_pydicts, Py_None) < (0)) __PYX_ERR(17, 2315, __pyx_L1_error)
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_8_Tabular_42to_pylist, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Tabular_to_pylist, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[473])); if (unlikely(!__pyx_t_12)) __PYX_ERR(17, 2315, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_12, __pyx_t_7);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Tabular, __pyx_mstate_global->__pyx_n_u_to_pylist, __pyx_t_12) < (0)) __PYX_ERR(17, 2315, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/table.pxi":2354
 *         return pylist
 * 
 *     def to_string(self, *, show_metadata=False, preview_cols=0):             # <<<<<<<<<<<<<<
 *         """
 *         Return human-readable string representation of Table or RecordBatch.
*/
  __pyx_t_12 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_12)) __PYX_ERR(17, 2354, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  if (PyDict_SetItem(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_show_metadata, Py_False) < (0)) __PYX_ERR(17, 2354, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_preview_cols, __pyx_mstate_global->__pyx_int_0) < (0)) __PYX_ERR(17, 2354, __pyx_L1_error)
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_8_Tabular_44to_string, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Tabular_to_string, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[474])); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 2354, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_7, __pyx_t_12);
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Tabular, __pyx_mstate_global->__pyx_n_u_to_string, __pyx_t_7) < (0)) __PYX_ERR(17, 2354, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/table.pxi":2385
 *         return '\n'.join(pieces)
 * 
 *     def remove_column(self, int i):             # <<<<<<<<<<<<<<
 *         # implemented in RecordBatch/Table subclasses
 *         raise NotImplementedError
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_8_Tabular_46remove_column, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Tabular_remove_column, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[475])); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 2385, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Tabular, __pyx_mstate_global->__pyx_n_u_remove_column, __pyx_t_7) < (0)) __PYX_ERR(17, 2385, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/table.pxi":2389
 *         raise NotImplementedError
 * 
 *     def drop_columns(self, columns):             # <<<<<<<<<<<<<<
 *         """
 *         Drop one or more columns and return a new Table or RecordBatch.
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_8_Tabular_48drop_columns, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Tabular_drop_columns, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[476])); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 2389, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Tabular, __pyx_mstate_global->__pyx_n_u_drop_columns, __pyx_t_7) < (0)) __PYX_ERR(17, 2389, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/table.pxi":2452
 *         return res
 * 
 *     def add_column(self, int i, field_, column):             # <<<<<<<<<<<<<<
 *         # implemented in RecordBatch/Table subclasses
 *         raise NotImplementedError
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_8_Tabular_50add_column, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Tabular_add_column, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[477])); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 2452, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Tabular, __pyx_mstate_global->__pyx_n_u_add_column, __pyx_t_7) < (0)) __PYX_ERR(17, 2452, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/table.pxi":2456
 *         raise NotImplementedError
 * 
 *     def append_column(self, field_, column):             # <<<<<<<<<<<<<<
 *         """
 *         Append column at end of columns.
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_8_Tabular_52append_column, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Tabular_append_column, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[478])); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 2456, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Tabular, __pyx_mstate_global->__pyx_n_u_append_column, __pyx_t_7) < (0)) __PYX_ERR(17, 2456, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_8_Tabular_54__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Tabular___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[479])); if (unlikely(!__pyx_t_7)) __PYX_ERR(7, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Tabular, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_7) < (0)) __PYX_ERR(7, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle__Tabular, (type(self), 0xe3b0c44, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle__Tabular__set_state(self, __pyx_state)
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_8_Tabular_56__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Tabular___setstate_cython, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[480])); if (unlikely(!__pyx_t_7)) __PYX_ERR(7, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__Tabular, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_7) < (0)) __PYX_ERR(7, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/table.pxi":2605
 *         self.batch = batch.get()
 * 
 *     def _is_initialized(self):             # <<<<<<<<<<<<<<
 *         return self.batch != NULL
 * 
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_11RecordBatch_3_is_initialized, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_RecordBatch__is_initialized, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[481])); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 2605, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RecordBatch, __pyx_mstate_global->__pyx_n_u_is_initialized, __pyx_t_7) < (0)) __PYX_ERR(17, 2605, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/table.pxi":2608
 *         return self.batch != NULL
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         self._assert_cpu()
 *         return _reconstruct_record_batch, (self.columns, self.schema)
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_11RecordBatch_5__reduce__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_RecordBatch___reduce, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[482])); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 2608, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RecordBatch, __pyx_mstate_global->__pyx_n_u_reduce, __pyx_t_7) < (0)) __PYX_ERR(17, 2608, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/table.pxi":2612
 *         return _reconstruct_record_batch, (self.columns, self.schema)
 * 
 *     def validate(self, *, full=False):             # <<<<<<<<<<<<<<
 *         """
 *         Perform validation checks.  An exception is raised if validation fails.
*/
  __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 2612, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_full, Py_False) < (0)) __PYX_ERR(17, 2612, __pyx_L1_error)
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_11RecordBatch_7validate, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_RecordBatch_validate, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[483])); if (unlikely(!__pyx_t_12)) __PYX_ERR(17, 2612, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_12, __pyx_t_7);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RecordBatch, __pyx_mstate_global->__pyx_n_u_validate, __pyx_t_12) < (0)) __PYX_ERR(17, 2612, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/table.pxi":2636
 *                 check_status(self.batch.Validate())
 * 
 *     def replace_schema_metadata(self, metadata=None):             # <<<<<<<<<<<<<<
 *         """
 *         Create shallow copy of record batch by replacing schema
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_11RecordBatch_9replace_schema_metadata, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_RecordBatch_replace_schema_metad, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[484])); if (unlikely(!__pyx_t_12)) __PYX_ERR(17, 2636, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_12, __pyx_mstate_global->__pyx_tuple[7]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RecordBatch, __pyx_mstate_global->__pyx_n_u_replace_schema_metadata, __pyx_t_12) < (0)) __PYX_ERR(17, 2636, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/table.pxi":2752
 *         return self._schema
 * 
 *     def _column(self, int i):             # <<<<<<<<<<<<<<
 *         """
 *         Select single column from record batch by its numeric index.
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_11RecordBatch_11_column, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_RecordBatch__column, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[485])); if (unlikely(!__pyx_t_12)) __PYX_ERR(17, 2752, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RecordBatch, __pyx_mstate_global->__pyx_n_u_column_2, __pyx_t_12) < (0)) __PYX_ERR(17, 2752, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/table.pxi":2805
 *         return size
 * 
 *     def get_total_buffer_size(self):             # <<<<<<<<<<<<<<
 *         """
 *         The sum of bytes in each buffer referenced by the record batch
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_11RecordBatch_13get_total_buffer_size, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_RecordBatch_get_total_buffer_siz, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[486])); if (unlikely(!__pyx_t_12)) __PYX_ERR(17, 2805, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RecordBatch, __pyx_mstate_global->__pyx_n_u_get_total_buffer_size, __pyx_t_12) < (0)) __PYX_ERR(17, 2805, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/table.pxi":2833
 *         return total_buffer_size
 * 
 *     def __sizeof__(self):             # <<<<<<<<<<<<<<
 *         return super(RecordBatch, self).__sizeof__() + self.nbytes
 * 
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_11RecordBatch_15__sizeof__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_RecordBatch___sizeof, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[487])); if (unlikely(!__pyx_t_12)) __PYX_ERR(17, 2833, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RecordBatch, __pyx_mstate_global->__pyx_n_u_sizeof, __pyx_t_12) < (0)) __PYX_ERR(17, 2833, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/table.pxi":2836
 *         return super(RecordBatch, self).__sizeof__() + self.nbytes
 * 
 *     def add_column(self, int i, field_, column):             # <<<<<<<<<<<<<<
 *         """
 *         Add column to RecordBatch at position i.
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_11RecordBatch_17add_column, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_RecordBatch_add_column, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[488])); if (unlikely(!__pyx_t_12)) __PYX_ERR(17, 2836, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RecordBatch, __pyx_mstate_global->__pyx_n_u_add_column, __pyx_t_12) < (0)) __PYX_ERR(17, 2836, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/table.pxi":2917
 *         return pyarrow_wrap_batch(c_batch)
 * 
 *     def remove_column(self, int i):             # <<<<<<<<<<<<<<
 *         """
 *         Create new RecordBatch with the indicated column removed.
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_11RecordBatch_19remove_column, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_RecordBatch_remove_column, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[489])); if (unlikely(!__pyx_t_12)) __PYX_ERR(17, 2917, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RecordBatch, __pyx_mstate_global->__pyx_n_u_remove_column, __pyx_t_12) < (0)) __PYX_ERR(17, 2917, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/table.pxi":2951
 *         return pyarrow_wrap_batch(c_batch)
 * 
 *     def set_column(self, int i, field_, column):             # <<<<<<<<<<<<<<
 *         """
 *         Replace column in RecordBatch at position.
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_11RecordBatch_21set_column, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_RecordBatch_set_column, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[490])); if (unlikely(!__pyx_t_12)) __PYX_ERR(17, 2951, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RecordBatch, __pyx_mstate_global->__pyx_n_u_set_column, __pyx_t_12) < (0)) __PYX_ERR(17, 2951, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/table.pxi":3017
 *         return pyarrow_wrap_batch(c_batch)
 * 
 *     def rename_columns(self, names):             # <<<<<<<<<<<<<<
 *         """
 *         Create new record batch with columns renamed to provided names.
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_11RecordBatch_23rename_columns, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_RecordBatch_rename_columns, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[491])); if (unlikely(!__pyx_t_12)) __PYX_ERR(17, 3017, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RecordBatch, __pyx_mstate_global->__pyx_n_u_rename_columns, __pyx_t_12) < (0)) __PYX_ERR(17, 3017, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/table.pxi":3092
 *         return pyarrow_wrap_batch(c_batch)
 * 
 *     def serialize(self, memory_pool=None):             # <<<<<<<<<<<<<<
 *         """
 *         Write RecordBatch to Buffer as encapsulated IPC message, which does not
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_11RecordBatch_25serialize, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_RecordBatch_serialize, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[492])); if (unlikely(!__pyx_t_12)) __PYX_ERR(17, 3092, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_12, __pyx_mstate_global->__pyx_tuple[7]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RecordBatch, __pyx_mstate_global->__pyx_n_u_serialize, __pyx_t_12) < (0)) __PYX_ERR(17, 3092, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/table.pxi":3141
 *         return pyarrow_wrap_buffer(buffer)
 * 
 *     def slice(self, offset=0, length=None):             # <<<<<<<<<<<<<<
 *         """
 *         Compute zero-copy slice of this RecordBatch
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_11RecordBatch_27slice, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_RecordBatch_slice, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[493])); if (unlikely(!__pyx_t_12)) __PYX_ERR(17, 3141, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_12, __pyx_mstate_global->__pyx_tuple[31]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RecordBatch, __pyx_mstate_global->__pyx_n_u_slice, __pyx_t_12) < (0)) __PYX_ERR(17, 3141, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/table.pxi":3198
 *         return pyarrow_wrap_batch(result)
 * 
 *     def equals(self, object other, bint check_metadata=False):             # <<<<<<<<<<<<<<
 *         """
 *         Check if contents of two record batches are equal.
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_11RecordBatch_29equals, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_RecordBatch_equals, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[494])); if (unlikely(!__pyx_t_12)) __PYX_ERR(17, 3198, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_12, __pyx_mstate_global->__pyx_tuple[21]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RecordBatch, __pyx_mstate_global->__pyx_n_u_equals, __pyx_t_12) < (0)) __PYX_ERR(17, 3198, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/table.pxi":3247
 *         return result
 * 
 *     def select(self, object columns):             # <<<<<<<<<<<<<<
 *         """
 *         Select columns of the RecordBatch.
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_11RecordBatch_31select, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_RecordBatch_select, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[495])); if (unlikely(!__pyx_t_12)) __PYX_ERR(17, 3247, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RecordBatch, __pyx_mstate_global->__pyx_n_u_select, __pyx_t_12) < (0)) __PYX_ERR(17, 3247, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/table.pxi":3301
 *         return pyarrow_wrap_batch(c_batch)
 * 
 *     def cast(self, Schema target_schema, safe=None, options=None):             # <<<<<<<<<<<<<<
 *         """
 *         Cast record batch values to another schema.
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_11RecordBatch_33cast, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_RecordBatch_cast, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[496])); if (unlikely(!__pyx_t_12)) __PYX_ERR(17, 3301, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_12, __pyx_mstate_global->__pyx_tuple[24]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RecordBatch, __pyx_mstate_global->__pyx_n_u_cast, __pyx_t_12) < (0)) __PYX_ERR(17, 3301, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/table.pxi":3363
 *         return RecordBatch.from_arrays(newcols, schema=target_schema)
 * 
 *     def _to_pandas(self, options, **kwargs):             # <<<<<<<<<<<<<<
 *         self._assert_cpu()
 *         return Table.from_batches([self])._to_pandas(options, **kwargs)
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_11RecordBatch_35_to_pandas, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_RecordBatch__to_pandas, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[497])); if (unlikely(!__pyx_t_12)) __PYX_ERR(17, 3363, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RecordBatch, __pyx_mstate_global->__pyx_n_u_to_pandas, __pyx_t_12) < (0)) __PYX_ERR(17, 3363, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/table.pxi":3367
 *         return Table.from_batches([self])._to_pandas(options, **kwargs)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def from_pandas(cls, df, Schema schema=None, preserve_index=None,
 *                     nthreads=None, columns=None):
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_11RecordBatch_37from_pandas, __Pyx_CYFUNCTION_CLASSMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_RecordBatch_from_pandas, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[498])); if (unlikely(!__pyx_t_12)) __PYX_ERR(17, 3367, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_12, __pyx_mstate_global->__pyx_tuple[25]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RecordBatch, __pyx_mstate_global->__pyx_n_u_from_pandas, __pyx_t_12) < (0)) __PYX_ERR(17, 3367, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_GetNameInClass(__pyx_t_12, (PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RecordBatch, __pyx_mstate_global->__pyx_n_u_from_pandas); if (unlikely(!__pyx_t_12)) __PYX_ERR(17, 3367, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_7 = __Pyx_Method_ClassMethod(__pyx_t_12); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 3367, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RecordBatch, __pyx_mstate_global->__pyx_n_u_from_pandas, __pyx_t_7) < (0)) __PYX_ERR(17, 3367, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/table.pxi":3462
 *             return cls.from_arrays(arrays, schema=schema)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_arrays(list arrays, names=None, schema=None, metadata=None):
 *         """
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_11RecordBatch_39from_arrays, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_RecordBatch_from_arrays, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[499])); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 3462, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_mstate_global->__pyx_tuple[0]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RecordBatch, __pyx_mstate_global->__pyx_n_u_from_arrays, __pyx_t_7) < (0)) __PYX_ERR(17, 3462, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_12 = NULL;
  __Pyx_GetNameInClass(__pyx_t_4, (PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RecordBatch, __pyx_mstate_global->__pyx_n_u_from_arrays); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 3462, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_10 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_t_4};
    __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_staticmethod, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 3462, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
  }
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RecordBatch, __pyx_mstate_global->__pyx_n_u_from_arrays, __pyx_t_7) < (0)) __PYX_ERR(17, 3462, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/table.pxi":3561
 *         return result
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_struct_array(StructArray struct_array):
 *         """
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_11RecordBatch_41from_struct_array, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_RecordBatch_from_struct_array, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[500])); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 3561, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RecordBatch, __pyx_mstate_global->__pyx_n_u_from_struct_array, __pyx_t_7) < (0)) __PYX_ERR(17, 3561, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_4 = NULL;
  __Pyx_GetNameInClass(__pyx_t_12, (PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RecordBatch, __pyx_mstate_global->__pyx_n_u_from_struct_array); if (unlikely(!__pyx_t_12)) __PYX_ERR(17, 3561, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_10 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_12};
    __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_staticmethod, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 3561, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
  }
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RecordBatch, __pyx_mstate_global->__pyx_n_u_from_struct_array, __pyx_t_7) < (0)) __PYX_ERR(17, 3561, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/table.pxi":3597
 *         return pyarrow_wrap_batch(c_record_batch)
 * 
 *     def to_struct_array(self):             # <<<<<<<<<<<<<<
 *         """
 *         Convert to a struct array.
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_11RecordBatch_43to_struct_array, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_RecordBatch_to_struct_array, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[501])); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 3597, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RecordBatch, __pyx_mstate_global->__pyx_n_u_to_struct_array, __pyx_t_7) < (0)) __PYX_ERR(17, 3597, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/table.pxi":3612
 *         return pyarrow_wrap_array(c_array)
 * 
 *     def to_tensor(self, c_bool null_to_nan=False, c_bool row_major=True, MemoryPool memory_pool=None):             # <<<<<<<<<<<<<<
 *         """
 *         Convert to a :class:`~pyarrow.Tensor`.
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_11RecordBatch_45to_tensor, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_RecordBatch_to_tensor, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[502])); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 3612, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_mstate_global->__pyx_tuple[41]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RecordBatch, __pyx_mstate_global->__pyx_n_u_to_tensor, __pyx_t_7) < (0)) __PYX_ERR(17, 3612, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/table.pxi":3693
 *         return pyarrow_wrap_tensor(c_tensor)
 * 
 *     def copy_to(self, destination):             # <<<<<<<<<<<<<<
 *         """
 *         Copy the entire RecordBatch to destination device.
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_11RecordBatch_47copy_to, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_RecordBatch_copy_to, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[503])); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 3693, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RecordBatch, __pyx_mstate_global->__pyx_n_u_copy_to, __pyx_t_7) < (0)) __PYX_ERR(17, 3693, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/table.pxi":3728
 *         return pyarrow_wrap_batch(c_batch)
 * 
 *     def _export_to_c(self, out_ptr, out_schema_ptr=0):             # <<<<<<<<<<<<<<
 *         """
 *         Export to a C ArrowArray struct, given its pointer.
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_11RecordBatch_49_export_to_c, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_RecordBatch__export_to_c, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[504])); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 3728, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_mstate_global->__pyx_tuple[23]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RecordBatch, __pyx_mstate_global->__pyx_n_u_export_to_c, __pyx_t_7) < (0)) __PYX_ERR(17, 3728, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/table.pxi":3755
 *                                            <ArrowSchema*> c_schema_ptr))
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def _import_from_c(in_ptr, schema):
 *         """
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_11RecordBatch_51_import_from_c, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_RecordBatch__import_from_c, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[505])); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 3755, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RecordBatch, __pyx_mstate_global->__pyx_n_u_import_from_c, __pyx_t_7) < (0)) __PYX_ERR(17, 3755, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_12 = NULL;
  __Pyx_GetNameInClass(__pyx_t_4, (PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RecordBatch, __pyx_mstate_global->__pyx_n_u_import_from_c); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 3755, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_10 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_t_4};
    __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_staticmethod, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 3755, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
  }
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RecordBatch, __pyx_mstate_global->__pyx_n_u_import_from_c, __pyx_t_7) < (0)) __PYX_ERR(17, 3755, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/table.pxi":3789
 *         return pyarrow_wrap_batch(c_batch)
 * 
 *     def __arrow_c_array__(self, requested_schema=None):             # <<<<<<<<<<<<<<
 *         """
 *         Get a pair of PyCapsules containing a C ArrowArray representation of the object.
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_11RecordBatch_53__arrow_c_array__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_RecordBatch___arrow_c_array, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[506])); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 3789, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_mstate_global->__pyx_tuple[7]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RecordBatch, __pyx_mstate_global->__pyx_n_u_arrow_c_array, __pyx_t_7) < (0)) __PYX_ERR(17, 3789, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/table.pxi":3836
 *         return schema_capsule, array_capsule
 * 
 *     def __arrow_c_stream__(self, requested_schema=None):             # <<<<<<<<<<<<<<
 *         """
 *         Export the batch as an Arrow C stream PyCapsule.
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_11RecordBatch_55__arrow_c_stream__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_RecordBatch___arrow_c_stream, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[507])); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 3836, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_mstate_global->__pyx_tuple[7]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RecordBatch, __pyx_mstate_global->__pyx_n_u_arrow_c_stream, __pyx_t_7) < (0)) __PYX_ERR(17, 3836, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/table.pxi":3856
 *         return Table.from_batches([self]).__arrow_c_stream__(requested_schema)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def _import_from_c_capsule(schema_capsule, array_capsule):
 *         """
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_11RecordBatch_57_import_from_c_capsule, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_RecordBatch__import_from_c_capsu, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[508])); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 3856, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RecordBatch, __pyx_mstate_global->__pyx_n_u_import_from_c_capsule, __pyx_t_7) < (0)) __PYX_ERR(17, 3856, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_4 = NULL;
  __Pyx_GetNameInClass(__pyx_t_12, (PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RecordBatch, __pyx_mstate_global->__pyx_n_u_import_from_c_capsule); if (unlikely(!__pyx_t_12)) __PYX_ERR(17, 3856, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_10 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_12};
    __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_staticmethod, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 3856, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
  }
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RecordBatch, __pyx_mstate_global->__pyx_n_u_import_from_c_capsule, __pyx_t_7) < (0)) __PYX_ERR(17, 3856, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/table.pxi":3886
 *         return pyarrow_wrap_batch(c_batch)
 * 
 *     def _export_to_c_device(self, out_ptr, out_schema_ptr=0):             # <<<<<<<<<<<<<<
 *         """
 *         Export to a C ArrowDeviceArray struct, given its pointer.
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_11RecordBatch_59_export_to_c_device, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_RecordBatch__export_to_c_device, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[509])); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 3886, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_mstate_global->__pyx_tuple[23]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RecordBatch, __pyx_mstate_global->__pyx_n_u_export_to_c_device, __pyx_t_7) < (0)) __PYX_ERR(17, 3886, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/table.pxi":3914
 *             )
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def _import_from_c_device(in_ptr, schema):
 *         """
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_11RecordBatch_61_import_from_c_device, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_RecordBatch__import_from_c_devic, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[510])); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 3914, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RecordBatch, __pyx_mstate_global->__pyx_n_u_import_from_c_device, __pyx_t_7) < (0)) __PYX_ERR(17, 3914, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_12 = NULL;
  __Pyx_GetNameInClass(__pyx_t_4, (PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RecordBatch, __pyx_mstate_global->__pyx_n_u_import_from_c_device); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 3914, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_10 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_t_4};
    __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_staticmethod, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 3914, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
  }
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RecordBatch, __pyx_mstate_global->__pyx_n_u_import_from_c_device, __pyx_t_7) < (0)) __PYX_ERR(17, 3914, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/table.pxi":3951
 *         return pyarrow_wrap_batch(c_batch)
 * 
 *     def __arrow_c_device_array__(self, requested_schema=None, **kwargs):             # <<<<<<<<<<<<<<
 *         """
 *         Get a pair of PyCapsules containing a C ArrowDeviceArray representation
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_11RecordBatch_63__arrow_c_device_array__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_RecordBatch___arrow_c_device_arr, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[511])); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 3951, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_mstate_global->__pyx_tuple[7]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RecordBatch, __pyx_mstate_global->__pyx_n_u_arrow_c_device_array, __pyx_t_7) < (0)) __PYX_ERR(17, 3951, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/table.pxi":4016
 *         return schema_capsule, array_capsule
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def _import_from_c_device_capsule(schema_capsule, array_capsule):
 *         """
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_11RecordBatch_65_import_from_c_device_capsule, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_RecordBatch__import_from_c_devic_2, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[512])); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 4016, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RecordBatch, __pyx_mstate_global->__pyx_n_u_import_from_c_device_capsule, __pyx_t_7) < (0)) __PYX_ERR(17, 4016, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_4 = NULL;
  __Pyx_GetNameInClass(__pyx_t_12, (PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RecordBatch, __pyx_mstate_global->__pyx_n_u_import_from_c_device_capsule); if (unlikely(!__pyx_t_12)) __PYX_ERR(17, 4016, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_10 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_12};
    __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_staticmethod, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 4016, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
  }
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RecordBatch, __pyx_mstate_global->__pyx_n_u_import_from_c_device_capsule, __pyx_t_7) < (0)) __PYX_ERR(17, 4016, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/table.pxi":4071
 * 
 * 
 * def _reconstruct_record_batch(columns, schema):             # <<<<<<<<<<<<<<
 *     """
 *     Internal: reconstruct RecordBatch from pickled components.
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_217_reconstruct_record_batch, 0, __pyx_mstate_global->__pyx_n_u_reconstruct_record_batch, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[513])); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 4071, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reconstruct_record_batch, __pyx_t_7) < (0)) __PYX_ERR(17, 4071, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/table.pxi":4078
 * 
 * 
 * def table_to_blocks(options, Table table, categories, extension_columns):             # <<<<<<<<<<<<<<
 *     cdef:
 *         PyObject* result_obj
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_219table_to_blocks, 0, __pyx_mstate_global->__pyx_n_u_table_to_blocks, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[514])); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 4078, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_table_to_blocks, __pyx_t_7) < (0)) __PYX_ERR(17, 4078, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/table.pxi":4232
 *         self.table = table.get()
 * 
 *     def _is_initialized(self):             # <<<<<<<<<<<<<<
 *         return self.table != NULL
 * 
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_5Table_3_is_initialized, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Table__is_initialized, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[515])); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 4232, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Table, __pyx_mstate_global->__pyx_n_u_is_initialized, __pyx_t_7) < (0)) __PYX_ERR(17, 4232, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/table.pxi":4235
 *         return self.table != NULL
 * 
 *     def validate(self, *, full=False):             # <<<<<<<<<<<<<<
 *         """
 *         Perform validation checks.  An exception is raised if validation fails.
*/
  __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 4235, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_full, Py_False) < (0)) __PYX_ERR(17, 4235, __pyx_L1_error)
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_5Table_5validate, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Table_validate, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[516])); if (unlikely(!__pyx_t_12)) __PYX_ERR(17, 4235, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_12, __pyx_t_7);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Table, __pyx_mstate_global->__pyx_n_u_validate, __pyx_t_12) < (0)) __PYX_ERR(17, 4235, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/table.pxi":4259
 *                 check_status(self.table.Validate())
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         # Reduce the columns as ChunkedArrays to avoid serializing schema
 *         # data twice
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_5Table_7__reduce__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Table___reduce, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[517])); if (unlikely(!__pyx_t_12)) __PYX_ERR(17, 4259, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Table, __pyx_mstate_global->__pyx_n_u_reduce, __pyx_t_12) < (0)) __PYX_ERR(17, 4259, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/table.pxi":4266
 *         return _reconstruct_table, (columns, self.schema)
 * 
 *     def slice(self, offset=0, length=None):             # <<<<<<<<<<<<<<
 *         """
 *         Compute zero-copy slice of this Table.
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_5Table_9slice, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Table_slice, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[518])); if (unlikely(!__pyx_t_12)) __PYX_ERR(17, 4266, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_12, __pyx_mstate_global->__pyx_tuple[31]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Table, __pyx_mstate_global->__pyx_n_u_slice, __pyx_t_12) < (0)) __PYX_ERR(17, 4266, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/table.pxi":4331
 *         return pyarrow_wrap_table(result)
 * 
 *     def select(self, object columns):             # <<<<<<<<<<<<<<
 *         """
 *         Select columns of the Table.
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_5Table_11select, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Table_select, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[519])); if (unlikely(!__pyx_t_12)) __PYX_ERR(17, 4331, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Table, __pyx_mstate_global->__pyx_n_u_select, __pyx_t_12) < (0)) __PYX_ERR(17, 4331, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/table.pxi":4382
 *         return pyarrow_wrap_table(c_table)
 * 
 *     def replace_schema_metadata(self, metadata=None):             # <<<<<<<<<<<<<<
 *         """
 *         Create shallow copy of table by replacing schema
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_5Table_13replace_schema_metadata, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Table_replace_schema_metadata, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[520])); if (unlikely(!__pyx_t_12)) __PYX_ERR(17, 4382, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_12, __pyx_mstate_global->__pyx_tuple[7]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Table, __pyx_mstate_global->__pyx_n_u_replace_schema_metadata, __pyx_t_12) < (0)) __PYX_ERR(17, 4382, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/table.pxi":4445
 *         return pyarrow_wrap_table(c_table)
 * 
 *     def flatten(self, MemoryPool memory_pool=None):             # <<<<<<<<<<<<<<
 *         """
 *         Flatten this Table.
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_5Table_15flatten, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Table_flatten, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[521])); if (unlikely(!__pyx_t_12)) __PYX_ERR(17, 4445, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_12, __pyx_mstate_global->__pyx_tuple[7]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Table, __pyx_mstate_global->__pyx_n_u_flatten, __pyx_t_12) < (0)) __PYX_ERR(17, 4445, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/table.pxi":4511
 *         return pyarrow_wrap_table(flattened)
 * 
 *     def combine_chunks(self, MemoryPool memory_pool=None):             # <<<<<<<<<<<<<<
 *         """
 *         Make a new table by combining the chunks this table has.
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_5Table_17combine_chunks, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Table_combine_chunks, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[522])); if (unlikely(!__pyx_t_12)) __PYX_ERR(17, 4511, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_12, __pyx_mstate_global->__pyx_tuple[7]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Table, __pyx_mstate_global->__pyx_n_u_combine_chunks, __pyx_t_12) < (0)) __PYX_ERR(17, 4511, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/table.pxi":4562
 *         return pyarrow_wrap_table(combined)
 * 
 *     def unify_dictionaries(self, MemoryPool memory_pool=None):             # <<<<<<<<<<<<<<
 *         """
 *         Unify dictionaries across all chunks.
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_5Table_19unify_dictionaries, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Table_unify_dictionaries, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[523])); if (unlikely(!__pyx_t_12)) __PYX_ERR(17, 4562, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_12, __pyx_mstate_global->__pyx_tuple[7]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Table, __pyx_mstate_global->__pyx_n_u_unify_dictionaries, __pyx_t_12) < (0)) __PYX_ERR(17, 4562, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/table.pxi":4621
 *         return pyarrow_wrap_table(c_result)
 * 
 *     def equals(self, Table other, bint check_metadata=False):             # <<<<<<<<<<<<<<
 *         """
 *         Check if contents of two tables are equal.
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_5Table_21equals, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Table_equals, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[524])); if (unlikely(!__pyx_t_12)) __PYX_ERR(17, 4621, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_12, __pyx_mstate_global->__pyx_tuple[21]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Table, __pyx_mstate_global->__pyx_n_u_equals, __pyx_t_12) < (0)) __PYX_ERR(17, 4621, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/table.pxi":4670
 *         return result
 * 
 *     def cast(self, Schema target_schema, safe=None, options=None):             # <<<<<<<<<<<<<<
 *         """
 *         Cast table values to another schema.
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_5Table_23cast, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Table_cast, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[525])); if (unlikely(!__pyx_t_12)) __PYX_ERR(17, 4670, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_12, __pyx_mstate_global->__pyx_tuple[24]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Table, __pyx_mstate_global->__pyx_n_u_cast, __pyx_t_12) < (0)) __PYX_ERR(17, 4670, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/table.pxi":4733
 *         return Table.from_arrays(newcols, schema=target_schema)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def from_pandas(cls, df, Schema schema=None, preserve_index=None,
 *                     nthreads=None, columns=None, bint safe=True):
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_5Table_25from_pandas, __Pyx_CYFUNCTION_CLASSMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Table_from_pandas, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[526])); if (unlikely(!__pyx_t_12)) __PYX_ERR(17, 4733, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_12, __pyx_mstate_global->__pyx_tuple[42]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Table, __pyx_mstate_global->__pyx_n_u_from_pandas, __pyx_t_12) < (0)) __PYX_ERR(17, 4733, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_GetNameInClass(__pyx_t_12, (PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Table, __pyx_mstate_global->__pyx_n_u_from_pandas); if (unlikely(!__pyx_t_12)) __PYX_ERR(17, 4733, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_7 = __Pyx_Method_ClassMethod(__pyx_t_12); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 4733, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Table, __pyx_mstate_global->__pyx_n_u_from_pandas, __pyx_t_7) < (0)) __PYX_ERR(17, 4733, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/table.pxi":4813
 *             return cls.from_arrays(arrays, schema=schema)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_arrays(arrays, names=None, schema=None, metadata=None):
 *         """
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_5Table_27from_arrays, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Table_from_arrays, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[527])); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 4813, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_mstate_global->__pyx_tuple[0]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Table, __pyx_mstate_global->__pyx_n_u_from_arrays, __pyx_t_7) < (0)) __PYX_ERR(17, 4813, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_12 = NULL;
  __Pyx_GetNameInClass(__pyx_t_4, (PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Table, __pyx_mstate_global->__pyx_n_u_from_arrays); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 4813, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_10 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_t_4};
    __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_staticmethod, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 4813, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
  }
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Table, __pyx_mstate_global->__pyx_n_u_from_arrays, __pyx_t_7) < (0)) __PYX_ERR(17, 4813, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/table.pxi":4916
 *         return result
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_struct_array(struct_array):
 *         """
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_5Table_29from_struct_array, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Table_from_struct_array, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[528])); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 4916, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Table, __pyx_mstate_global->__pyx_n_u_from_struct_array, __pyx_t_7) < (0)) __PYX_ERR(17, 4916, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_4 = NULL;
  __Pyx_GetNameInClass(__pyx_t_12, (PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Table, __pyx_mstate_global->__pyx_n_u_from_struct_array); if (unlikely(!__pyx_t_12)) __PYX_ERR(17, 4916, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_10 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_12};
    __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_staticmethod, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 4916, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
  }
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Table, __pyx_mstate_global->__pyx_n_u_from_struct_array, __pyx_t_7) < (0)) __PYX_ERR(17, 4916, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/table.pxi":4951
 *             ])
 * 
 *     def to_struct_array(self, max_chunksize=None):             # <<<<<<<<<<<<<<
 *         """
 *         Convert to a chunked array of struct type.
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_5Table_31to_struct_array, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Table_to_struct_array, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[529])); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 4951, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_mstate_global->__pyx_tuple[7]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Table, __pyx_mstate_global->__pyx_n_u_to_struct_array, __pyx_t_7) < (0)) __PYX_ERR(17, 4951, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/table.pxi":4972
 *         return chunked_array(chunks, type=struct(self.schema))
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_batches(batches, Schema schema=None):
 *         """
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_5Table_33from_batches, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Table_from_batches, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[530])); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 4972, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_mstate_global->__pyx_tuple[7]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Table, __pyx_mstate_global->__pyx_n_u_from_batches, __pyx_t_7) < (0)) __PYX_ERR(17, 4972, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_12 = NULL;
  __Pyx_GetNameInClass(__pyx_t_4, (PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Table, __pyx_mstate_global->__pyx_n_u_from_batches); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 4972, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_10 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_t_4};
    __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_staticmethod, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 4972, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
  }
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Table, __pyx_mstate_global->__pyx_n_u_from_batches, __pyx_t_7) < (0)) __PYX_ERR(17, 4972, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/table.pxi":5045
 *         return pyarrow_wrap_table(c_table)
 * 
 *     def to_batches(self, max_chunksize=None):             # <<<<<<<<<<<<<<
 *         """
 *         Convert Table to a list of RecordBatch objects.
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_5Table_35to_batches, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Table_to_batches, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[531])); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 5045, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_mstate_global->__pyx_tuple[7]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Table, __pyx_mstate_global->__pyx_n_u_to_batches, __pyx_t_7) < (0)) __PYX_ERR(17, 5045, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/table.pxi":5115
 *         return result
 * 
 *     def to_reader(self, max_chunksize=None):             # <<<<<<<<<<<<<<
 *         """
 *         Convert the Table to a RecordBatchReader.
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_5Table_37to_reader, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Table_to_reader, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[532])); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 5115, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_mstate_global->__pyx_tuple[7]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Table, __pyx_mstate_global->__pyx_n_u_to_reader, __pyx_t_7) < (0)) __PYX_ERR(17, 5115, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/table.pxi":5174
 *         return reader
 * 
 *     def _to_pandas(self, options, categories=None, ignore_metadata=False,             # <<<<<<<<<<<<<<
 *                    types_mapper=None):
 *         self._assert_cpu()
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_5Table_39_to_pandas, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Table__to_pandas, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[533])); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 5174, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_mstate_global->__pyx_tuple[43]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Table, __pyx_mstate_global->__pyx_n_u_to_pandas, __pyx_t_7) < (0)) __PYX_ERR(17, 5174, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/table.pxi":5208
 *         return pyarrow_wrap_schema(self.table.schema())
 * 
 *     def _column(self, int i):             # <<<<<<<<<<<<<<
 *         """
 *         Select a column by its numeric index.
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_5Table_41_column, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Table__column, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[534])); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 5208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Table, __pyx_mstate_global->__pyx_n_u_column_2, __pyx_t_7) < (0)) __PYX_ERR(17, 5208, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/table.pxi":5307
 *         return size
 * 
 *     def get_total_buffer_size(self):             # <<<<<<<<<<<<<<
 *         """
 *         The sum of bytes in each buffer referenced by the table.
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_5Table_43get_total_buffer_size, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Table_get_total_buffer_size, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[535])); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 5307, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Table, __pyx_mstate_global->__pyx_n_u_get_total_buffer_size, __pyx_t_7) < (0)) __PYX_ERR(17, 5307, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/table.pxi":5335
 *         return total_buffer_size
 * 
 *     def __sizeof__(self):             # <<<<<<<<<<<<<<
 *         return super(Table, self).__sizeof__() + self.nbytes
 * 
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_5Table_45__sizeof__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Table___sizeof, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[536])); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 5335, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Table, __pyx_mstate_global->__pyx_n_u_sizeof, __pyx_t_7) < (0)) __PYX_ERR(17, 5335, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/table.pxi":5338
 *         return super(Table, self).__sizeof__() + self.nbytes
 * 
 *     def add_column(self, int i, field_, column):             # <<<<<<<<<<<<<<
 *         """
 *         Add column to Table at position.
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_5Table_47add_column, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Table_add_column, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[537])); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 5338, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Table, __pyx_mstate_global->__pyx_n_u_add_column, __pyx_t_7) < (0)) __PYX_ERR(17, 5338, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/table.pxi":5412
 *         return pyarrow_wrap_table(c_table)
 * 
 *     def remove_column(self, int i):             # <<<<<<<<<<<<<<
 *         """
 *         Create new Table with the indicated column removed.
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_5Table_49remove_column, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Table_remove_column, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[538])); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 5412, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Table, __pyx_mstate_global->__pyx_n_u_remove_column, __pyx_t_7) < (0)) __PYX_ERR(17, 5412, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/table.pxi":5446
 *         return pyarrow_wrap_table(c_table)
 * 
 *     def set_column(self, int i, field_, column):             # <<<<<<<<<<<<<<
 *         """
 *         Replace column in Table at position.
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_5Table_51set_column, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Table_set_column, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[539])); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 5446, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Table, __pyx_mstate_global->__pyx_n_u_set_column, __pyx_t_7) < (0)) __PYX_ERR(17, 5446, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/table.pxi":5505
 *         return pyarrow_wrap_table(c_table)
 * 
 *     def rename_columns(self, names):             # <<<<<<<<<<<<<<
 *         """
 *         Create new table with columns renamed to provided names.
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_5Table_53rename_columns, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Table_rename_columns, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[540])); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 5505, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Table, __pyx_mstate_global->__pyx_n_u_rename_columns, __pyx_t_7) < (0)) __PYX_ERR(17, 5505, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/table.pxi":5579
 *         return pyarrow_wrap_table(c_table)
 * 
 *     def drop(self, columns):             # <<<<<<<<<<<<<<
 *         """
 *         Drop one or more columns and return a new table.
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_5Table_55drop, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Table_drop, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[541])); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 5579, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Table, __pyx_mstate_global->__pyx_n_u_drop, __pyx_t_7) < (0)) __PYX_ERR(17, 5579, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/table.pxi":5597
 *         return self.drop_columns(columns)
 * 
 *     def group_by(self, keys, use_threads=True):             # <<<<<<<<<<<<<<
 *         """
 *         Declare a grouping over the columns of the table.
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_5Table_57group_by, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Table_group_by, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[542])); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 5597, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_mstate_global->__pyx_tuple[20]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Table, __pyx_mstate_global->__pyx_n_u_group_by_2, __pyx_t_7) < (0)) __PYX_ERR(17, 5597, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/table.pxi":5640
 *         return TableGroupBy(self, keys, use_threads=use_threads)
 * 
 *     def join(self, right_table, keys, right_keys=None, join_type="left outer",             # <<<<<<<<<<<<<<
 *              left_suffix=None, right_suffix=None, coalesce_keys=True,
 *              use_threads=True, filter_expression=None):
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_5Table_59join, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Table_join, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[543])); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 5640, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_mstate_global->__pyx_tuple[44]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Table, __pyx_mstate_global->__pyx_n_u_join, __pyx_t_7) < (0)) __PYX_ERR(17, 5640, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/table.pxi":5775
 *         )
 * 
 *     def join_asof(self, right_table, on, by, tolerance, right_on=None, right_by=None):             # <<<<<<<<<<<<<<
 *         """
 *         Perform an asof join between this table and another one.
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_5Table_61join_asof, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Table_join_asof, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[544])); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 5775, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_mstate_global->__pyx_tuple[24]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Table, __pyx_mstate_global->__pyx_n_u_join_asof, __pyx_t_7) < (0)) __PYX_ERR(17, 5775, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/table.pxi":5866
 *                                          tolerance, output_type=Table)
 * 
 *     def __arrow_c_stream__(self, requested_schema=None):             # <<<<<<<<<<<<<<
 *         """
 *         Export the table as an Arrow C stream PyCapsule.
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_5Table_63__arrow_c_stream__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Table___arrow_c_stream, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[545])); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 5866, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_mstate_global->__pyx_tuple[7]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Table, __pyx_mstate_global->__pyx_n_u_arrow_c_stream, __pyx_t_7) < (0)) __PYX_ERR(17, 5866, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/table.pxi":5901
 * 
 * 
 * def _reconstruct_table(arrays, schema):             # <<<<<<<<<<<<<<
 *     """
 *     Internal: reconstruct pa.Table from pickled components.
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_221_reconstruct_table, 0, __pyx_mstate_global->__pyx_n_u_reconstruct_table, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[546])); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 5901, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reconstruct_table, __pyx_t_7) < (0)) __PYX_ERR(17, 5901, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/table.pxi":5908
 * 
 * 
 * def record_batch(data, names=None, schema=None, metadata=None):             # <<<<<<<<<<<<<<
 *     """
 *     Create a pyarrow.RecordBatch from another Python data structure or sequence
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_223record_batch, 0, __pyx_mstate_global->__pyx_n_u_record_batch, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[547])); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 5908, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_mstate_global->__pyx_tuple[0]);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_record_batch, __pyx_t_7) < (0)) __PYX_ERR(17, 5908, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/table.pxi":6085
 * 
 * 
 * def table(data, names=None, schema=None, metadata=None, nthreads=None):             # <<<<<<<<<<<<<<
 *     """
 *     Create a pyarrow.Table from a Python data structure or sequence of arrays.
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_225table, 0, __pyx_mstate_global->__pyx_n_u_table, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[548])); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 6085, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_mstate_global->__pyx_tuple[25]);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_table, __pyx_t_7) < (0)) __PYX_ERR(17, 6085, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/table.pxi":6247
 * 
 * 
 * def concat_tables(tables, MemoryPool memory_pool=None, str promote_options="none", **kwargs):             # <<<<<<<<<<<<<<
 *     """
 *     Concatenate pyarrow.Table objects.
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_227concat_tables, 0, __pyx_mstate_global->__pyx_n_u_concat_tables, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[549])); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 6247, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_mstate_global->__pyx_tuple[45]);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_concat_tables, __pyx_t_7) < (0)) __PYX_ERR(17, 6247, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/table.pxi":6327
 * 
 * 
 * def concat_batches(recordbatches, MemoryPool memory_pool=None):             # <<<<<<<<<<<<<<
 *     """
 *     Concatenate pyarrow.RecordBatch objects.
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_229concat_batches, 0, __pyx_mstate_global->__pyx_n_u_concat_batches, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[550])); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 6327, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_mstate_global->__pyx_tuple[7]);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_concat_batches, __pyx_t_7) < (0)) __PYX_ERR(17, 6327, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/table.pxi":6378
 * 
 * 
 * def _from_pydict(cls, mapping, schema, metadata):             # <<<<<<<<<<<<<<
 *     """
 *     Construct a Table/RecordBatch from Arrow arrays or columns.
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_231_from_pydict, 0, __pyx_mstate_global->__pyx_n_u_from_pydict, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[551])); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 6378, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_from_pydict, __pyx_t_7) < (0)) __PYX_ERR(17, 6378, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/table.pxi":6426
 * 
 * 
 * def _from_pylist(cls, mapping, schema, metadata):             # <<<<<<<<<<<<<<
 *     """
 *     Construct a Table/RecordBatch from list of rows / dictionaries.
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_233_from_pylist, 0, __pyx_mstate_global->__pyx_n_u_from_pylist, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[552])); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 6426, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_from_pylist, __pyx_t_7) < (0)) __PYX_ERR(17, 6426, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/table.pxi":6466
 * 
 * 
 * class TableGroupBy:             # <<<<<<<<<<<<<<
 *     """
 *     A grouping of columns in a table on which to perform aggregations.
*/
  __pyx_t_7 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_mstate_global->__pyx_empty_tuple, __pyx_mstate_global->__pyx_n_u_TableGroupBy, __pyx_mstate_global->__pyx_n_u_TableGroupBy, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_kp_u_A_grouping_of_columns_in_a_tabl); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 6466, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);

  /* "pyarrow/table.pxi":6504
 *     """
 * 
 *     def __init__(self, table, keys, use_threads=True):             # <<<<<<<<<<<<<<
 *         if isinstance(keys, str):
 *             keys = [keys]
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_12TableGroupBy_1__init__, 0, __pyx_mstate_global->__pyx_n_u_TableGroupBy___init, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[553])); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 6504, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[20]);
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_4) < (0)) __PYX_ERR(17, 6504, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyarrow/table.pxi":6512
 *         self._use_threads = use_threads
 * 
 *     def aggregate(self, aggregations):             # <<<<<<<<<<<<<<
 *         """
 *         Perform an aggregation over the grouped columns of the table.
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_12TableGroupBy_3aggregate, 0, __pyx_mstate_global->__pyx_n_u_TableGroupBy_aggregate, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[554])); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 6512, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_aggregate, __pyx_t_4) < (0)) __PYX_ERR(17, 6512, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyarrow/table.pxi":6466
 * 
 * 
 * class TableGroupBy:             # <<<<<<<<<<<<<<
 *     """
 *     A grouping of columns in a table on which to perform aggregations.
*/
  __pyx_t_4 = __Pyx_Py3ClassCreate(((PyObject*)&PyType_Type), __pyx_mstate_global->__pyx_n_u_TableGroupBy, __pyx_mstate_global->__pyx_empty_tuple, __pyx_t_7, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 6466, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_TableGroupBy, __pyx_t_4) < (0)) __PYX_ERR(17, 6466, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/tensor.pxi":19
 * 
 * # Avoid name clash with `pa.struct` function
 * import struct as _struct             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_struct, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 19, __pyx_L1_error)
  __pyx_t_7 = __pyx_t_1;
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_struct_2, __pyx_t_7) < (0)) __PYX_ERR(5, 19, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/tensor.pxi":49
 *         self._ssize_t_strides = self._make_shape_or_strides_buffer(self.strides)
 * 
 *     def _make_shape_or_strides_buffer(self, values):             # <<<<<<<<<<<<<<
 *         """
 *         Make a bytes object holding an array of `values` cast to `Py_ssize_t`.
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_6Tensor_3_make_shape_or_strides_buffer, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Tensor__make_shape_or_strides_bu, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[555])); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 49, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Tensor, __pyx_mstate_global->__pyx_n_u_make_shape_or_strides_buffer, __pyx_t_7) < (0)) __PYX_ERR(5, 49, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/tensor.pxi":61
 * strides: {self.strides}"""
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_numpy(obj, dim_names=None):
 *         """
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_6Tensor_7from_numpy, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Tensor_from_numpy, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[556])); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 61, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_mstate_global->__pyx_tuple[7]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Tensor, __pyx_mstate_global->__pyx_n_u_from_numpy, __pyx_t_7) < (0)) __PYX_ERR(5, 61, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_4 = NULL;
  __Pyx_GetNameInClass(__pyx_t_12, (PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Tensor, __pyx_mstate_global->__pyx_n_u_from_numpy); if (unlikely(!__pyx_t_12)) __PYX_ERR(5, 61, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_10 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_12};
    __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_staticmethod, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 61, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
  }
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Tensor, __pyx_mstate_global->__pyx_n_u_from_numpy, __pyx_t_7) < (0)) __PYX_ERR(5, 61, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/tensor.pxi":96
 *         return pyarrow_wrap_tensor(ctensor)
 * 
 *     def to_numpy(self):             # <<<<<<<<<<<<<<
 *         """
 *         Convert arrow::Tensor to numpy.ndarray with zero copy
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_6Tensor_9to_numpy, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Tensor_to_numpy, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[557])); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 96, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Tensor, __pyx_mstate_global->__pyx_n_u_to_numpy, __pyx_t_7) < (0)) __PYX_ERR(5, 96, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/tensor.pxi":118
 *         return PyObject_to_object(out)
 * 
 *     def equals(self, Tensor other):             # <<<<<<<<<<<<<<
 *         """
 *         Return true if the tensors contains exactly equal data.
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_6Tensor_11equals, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Tensor_equals, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[558])); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 118, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Tensor, __pyx_mstate_global->__pyx_n_u_equals, __pyx_t_7) < (0)) __PYX_ERR(5, 118, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/tensor.pxi":148
 *             return NotImplemented
 * 
 *     def dim_name(self, i):             # <<<<<<<<<<<<<<
 *         """
 *         Returns the name of the i-th tensor dimension.
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_6Tensor_15dim_name, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Tensor_dim_name, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[559])); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 148, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Tensor, __pyx_mstate_global->__pyx_n_u_dim_name, __pyx_t_7) < (0)) __PYX_ERR(5, 148, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/tensor.pxi":303
 *         buffer.suboffsets = NULL
 * 
 *     def __dlpack__(self, stream=None):             # <<<<<<<<<<<<<<
 *         """
 *         Export a Tensor as a DLPack capsule.
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_6Tensor_19__dlpack__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Tensor___dlpack, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[560])); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 303, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_mstate_global->__pyx_tuple[7]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Tensor, __pyx_mstate_global->__pyx_n_u_dlpack, __pyx_t_7) < (0)) __PYX_ERR(5, 303, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/tensor.pxi":328
 *             )
 * 
 *     def __dlpack_device__(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the DLPack device tuple this tensor resides on.
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_6Tensor_21__dlpack_device__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Tensor___dlpack_device, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[561])); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 328, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Tensor, __pyx_mstate_global->__pyx_n_u_dlpack_device, __pyx_t_7) < (0)) __PYX_ERR(5, 328, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.sp_tensor,self.tp cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_6Tensor_23__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Tensor___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[562])); if (unlikely(!__pyx_t_7)) __PYX_ERR(7, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_7) < (0)) __PYX_ERR(7, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "self.sp_tensor,self.tp cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.sp_tensor,self.tp cannot be converted to a Python object for pickling"
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_6Tensor_25__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Tensor___setstate_cython, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[563])); if (unlikely(!__pyx_t_7)) __PYX_ERR(7, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_7) < (0)) __PYX_ERR(7, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/tensor.pxi":366
 * shape: {self.shape}"""
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def from_dense_numpy(cls, obj, dim_names=None):
 *         """
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_15SparseCOOTensor_5from_dense_numpy, __Pyx_CYFUNCTION_CLASSMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SparseCOOTensor_from_dense_numpy, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[564])); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 366, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_mstate_global->__pyx_tuple[7]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_SparseCOOTensor, __pyx_mstate_global->__pyx_n_u_from_dense_numpy, __pyx_t_7) < (0)) __PYX_ERR(5, 366, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_GetNameInClass(__pyx_t_7, (PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_SparseCOOTensor, __pyx_mstate_global->__pyx_n_u_from_dense_numpy); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 366, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_12 = __Pyx_Method_ClassMethod(__pyx_t_7); if (unlikely(!__pyx_t_12)) __PYX_ERR(5, 366, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_SparseCOOTensor, __pyx_mstate_global->__pyx_n_u_from_dense_numpy, __pyx_t_12) < (0)) __PYX_ERR(5, 366, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/tensor.pxi":384
 *         return cls.from_tensor(Tensor.from_numpy(obj, dim_names=dim_names))
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_numpy(data, coords, shape, dim_names=None):
 *         """
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_15SparseCOOTensor_7from_numpy, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SparseCOOTensor_from_numpy, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[565])); if (unlikely(!__pyx_t_12)) __PYX_ERR(5, 384, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_12, __pyx_mstate_global->__pyx_tuple[7]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_SparseCOOTensor, __pyx_mstate_global->__pyx_n_u_from_numpy, __pyx_t_12) < (0)) __PYX_ERR(5, 384, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __pyx_t_7 = NULL;
  __Pyx_GetNameInClass(__pyx_t_4, (PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_SparseCOOTensor, __pyx_mstate_global->__pyx_n_u_from_numpy); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 384, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_10 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_4};
    __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_staticmethod, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_12)) __PYX_ERR(5, 384, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
  }
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_SparseCOOTensor, __pyx_mstate_global->__pyx_n_u_from_numpy, __pyx_t_12) < (0)) __PYX_ERR(5, 384, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/tensor.pxi":421
 *         return pyarrow_wrap_sparse_coo_tensor(csparse_tensor)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_scipy(obj, dim_names=None):
 *         """
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_15SparseCOOTensor_9from_scipy, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SparseCOOTensor_from_scipy, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[566])); if (unlikely(!__pyx_t_12)) __PYX_ERR(5, 421, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_12, __pyx_mstate_global->__pyx_tuple[7]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_SparseCOOTensor, __pyx_mstate_global->__pyx_n_u_from_scipy, __pyx_t_12) < (0)) __PYX_ERR(5, 421, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __pyx_t_4 = NULL;
  __Pyx_GetNameInClass(__pyx_t_7, (PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_SparseCOOTensor, __pyx_mstate_global->__pyx_n_u_from_scipy); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 421, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_10 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_7};
    __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_staticmethod, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_12)) __PYX_ERR(5, 421, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
  }
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_SparseCOOTensor, __pyx_mstate_global->__pyx_n_u_from_scipy, __pyx_t_12) < (0)) __PYX_ERR(5, 421, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/tensor.pxi":468
 *         return pyarrow_wrap_sparse_coo_tensor(csparse_tensor)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_pydata_sparse(obj, dim_names=None):
 *         """
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_15SparseCOOTensor_11from_pydata_sparse, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SparseCOOTensor_from_pydata_spar, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[567])); if (unlikely(!__pyx_t_12)) __PYX_ERR(5, 468, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_12, __pyx_mstate_global->__pyx_tuple[7]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_SparseCOOTensor, __pyx_mstate_global->__pyx_n_u_from_pydata_sparse, __pyx_t_12) < (0)) __PYX_ERR(5, 468, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __pyx_t_7 = NULL;
  __Pyx_GetNameInClass(__pyx_t_4, (PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_SparseCOOTensor, __pyx_mstate_global->__pyx_n_u_from_pydata_sparse); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 468, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_10 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_4};
    __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_staticmethod, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_12)) __PYX_ERR(5, 468, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
  }
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_SparseCOOTensor, __pyx_mstate_global->__pyx_n_u_from_pydata_sparse, __pyx_t_12) < (0)) __PYX_ERR(5, 468, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/tensor.pxi":502
 *         return pyarrow_wrap_sparse_coo_tensor(csparse_tensor)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_tensor(obj):
 *         """
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_15SparseCOOTensor_13from_tensor, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SparseCOOTensor_from_tensor, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[568])); if (unlikely(!__pyx_t_12)) __PYX_ERR(5, 502, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_SparseCOOTensor, __pyx_mstate_global->__pyx_n_u_from_tensor, __pyx_t_12) < (0)) __PYX_ERR(5, 502, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __pyx_t_4 = NULL;
  __Pyx_GetNameInClass(__pyx_t_7, (PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_SparseCOOTensor, __pyx_mstate_global->__pyx_n_u_from_tensor); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 502, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_10 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_7};
    __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_staticmethod, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_12)) __PYX_ERR(5, 502, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
  }
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_SparseCOOTensor, __pyx_mstate_global->__pyx_n_u_from_tensor, __pyx_t_12) < (0)) __PYX_ERR(5, 502, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/tensor.pxi":520
 *         return pyarrow_wrap_sparse_coo_tensor(csparse_tensor)
 * 
 *     def to_numpy(self):             # <<<<<<<<<<<<<<
 *         """
 *         Convert arrow::SparseCOOTensor to numpy.ndarrays with zero copy.
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_15SparseCOOTensor_15to_numpy, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SparseCOOTensor_to_numpy, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[569])); if (unlikely(!__pyx_t_12)) __PYX_ERR(5, 520, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_SparseCOOTensor, __pyx_mstate_global->__pyx_n_u_to_numpy, __pyx_t_12) < (0)) __PYX_ERR(5, 520, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/tensor.pxi":534
 *         return PyObject_to_object(out_data), PyObject_to_object(out_coords)
 * 
 *     def to_scipy(self):             # <<<<<<<<<<<<<<
 *         """
 *         Convert arrow::SparseCOOTensor to scipy.sparse.coo_array.
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_15SparseCOOTensor_17to_scipy, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SparseCOOTensor_to_scipy, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[570])); if (unlikely(!__pyx_t_12)) __PYX_ERR(5, 534, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_SparseCOOTensor, __pyx_mstate_global->__pyx_n_u_to_scipy, __pyx_t_12) < (0)) __PYX_ERR(5, 534, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/tensor.pxi":557
 *         return result
 * 
 *     def to_pydata_sparse(self):             # <<<<<<<<<<<<<<
 *         """
 *         Convert arrow::SparseCOOTensor to pydata/sparse.COO.
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_15SparseCOOTensor_19to_pydata_sparse, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SparseCOOTensor_to_pydata_sparse, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[571])); if (unlikely(!__pyx_t_12)) __PYX_ERR(5, 557, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_SparseCOOTensor, __pyx_mstate_global->__pyx_n_u_to_pydata_sparse, __pyx_t_12) < (0)) __PYX_ERR(5, 557, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/tensor.pxi":572
 *         return result
 * 
 *     def to_tensor(self):             # <<<<<<<<<<<<<<
 *         """
 *         Convert arrow::SparseCOOTensor to arrow::Tensor.
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_15SparseCOOTensor_21to_tensor, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SparseCOOTensor_to_tensor, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[572])); if (unlikely(!__pyx_t_12)) __PYX_ERR(5, 572, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_SparseCOOTensor, __pyx_mstate_global->__pyx_n_u_to_tensor, __pyx_t_12) < (0)) __PYX_ERR(5, 572, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/tensor.pxi":583
 *         return pyarrow_wrap_tensor(ctensor)
 * 
 *     def equals(self, SparseCOOTensor other):             # <<<<<<<<<<<<<<
 *         """
 *         Return true if sparse tensors contains exactly equal data.
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_15SparseCOOTensor_23equals, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SparseCOOTensor_equals, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[573])); if (unlikely(!__pyx_t_12)) __PYX_ERR(5, 583, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_SparseCOOTensor, __pyx_mstate_global->__pyx_n_u_equals, __pyx_t_12) < (0)) __PYX_ERR(5, 583, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/tensor.pxi":617
 *         return self.stp.size()
 * 
 *     def dim_name(self, i):             # <<<<<<<<<<<<<<
 *         """
 *         Returns the name of the i-th tensor dimension.
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_15SparseCOOTensor_27dim_name, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SparseCOOTensor_dim_name, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[574])); if (unlikely(!__pyx_t_12)) __PYX_ERR(5, 617, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_SparseCOOTensor, __pyx_mstate_global->__pyx_n_u_dim_name, __pyx_t_12) < (0)) __PYX_ERR(5, 617, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.sp_sparse_tensor,self.stp cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_15SparseCOOTensor_29__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SparseCOOTensor___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[575])); if (unlikely(!__pyx_t_12)) __PYX_ERR(7, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_12) < (0)) __PYX_ERR(7, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "self.sp_sparse_tensor,self.stp cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.sp_sparse_tensor,self.stp cannot be converted to a Python object for pickling"
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_15SparseCOOTensor_31__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SparseCOOTensor___setstate_cytho, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[576])); if (unlikely(!__pyx_t_12)) __PYX_ERR(7, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_12) < (0)) __PYX_ERR(7, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/tensor.pxi":671
 * shape: {self.shape}"""
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def from_dense_numpy(cls, obj, dim_names=None):
 *         """
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_15SparseCSRMatrix_5from_dense_numpy, __Pyx_CYFUNCTION_CLASSMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SparseCSRMatrix_from_dense_numpy, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[577])); if (unlikely(!__pyx_t_12)) __PYX_ERR(5, 671, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_12, __pyx_mstate_global->__pyx_tuple[7]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_SparseCSRMatrix, __pyx_mstate_global->__pyx_n_u_from_dense_numpy, __pyx_t_12) < (0)) __PYX_ERR(5, 671, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_GetNameInClass(__pyx_t_12, (PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_SparseCSRMatrix, __pyx_mstate_global->__pyx_n_u_from_dense_numpy); if (unlikely(!__pyx_t_12)) __PYX_ERR(5, 671, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_7 = __Pyx_Method_ClassMethod(__pyx_t_12); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 671, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_SparseCSRMatrix, __pyx_mstate_global->__pyx_n_u_from_dense_numpy, __pyx_t_7) < (0)) __PYX_ERR(5, 671, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/tensor.pxi":689
 *         return cls.from_tensor(Tensor.from_numpy(obj, dim_names=dim_names))
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_numpy(data, indptr, indices, shape, dim_names=None):
 *         """
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_15SparseCSRMatrix_7from_numpy, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SparseCSRMatrix_from_numpy, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[578])); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 689, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_mstate_global->__pyx_tuple[7]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_SparseCSRMatrix, __pyx_mstate_global->__pyx_n_u_from_numpy, __pyx_t_7) < (0)) __PYX_ERR(5, 689, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_12 = NULL;
  __Pyx_GetNameInClass(__pyx_t_4, (PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_SparseCSRMatrix, __pyx_mstate_global->__pyx_n_u_from_numpy); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 689, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_10 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_t_4};
    __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_staticmethod, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 689, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
  }
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_SparseCSRMatrix, __pyx_mstate_global->__pyx_n_u_from_numpy, __pyx_t_7) < (0)) __PYX_ERR(5, 689, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/tensor.pxi":733
 *         return pyarrow_wrap_sparse_csr_matrix(csparse_tensor)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_scipy(obj, dim_names=None):
 *         """
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_15SparseCSRMatrix_9from_scipy, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SparseCSRMatrix_from_scipy, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[579])); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 733, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_mstate_global->__pyx_tuple[7]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_SparseCSRMatrix, __pyx_mstate_global->__pyx_n_u_from_scipy, __pyx_t_7) < (0)) __PYX_ERR(5, 733, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_4 = NULL;
  __Pyx_GetNameInClass(__pyx_t_12, (PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_SparseCSRMatrix, __pyx_mstate_global->__pyx_n_u_from_scipy); if (unlikely(!__pyx_t_12)) __PYX_ERR(5, 733, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_10 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_12};
    __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_staticmethod, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 733, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
  }
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_SparseCSRMatrix, __pyx_mstate_global->__pyx_n_u_from_scipy, __pyx_t_7) < (0)) __PYX_ERR(5, 733, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/tensor.pxi":770
 *         return pyarrow_wrap_sparse_csr_matrix(csparse_tensor)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_tensor(obj):
 *         """
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_15SparseCSRMatrix_11from_tensor, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SparseCSRMatrix_from_tensor, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[580])); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 770, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_SparseCSRMatrix, __pyx_mstate_global->__pyx_n_u_from_tensor, __pyx_t_7) < (0)) __PYX_ERR(5, 770, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_12 = NULL;
  __Pyx_GetNameInClass(__pyx_t_4, (PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_SparseCSRMatrix, __pyx_mstate_global->__pyx_n_u_from_tensor); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 770, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_10 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_t_4};
    __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_staticmethod, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 770, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
  }
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_SparseCSRMatrix, __pyx_mstate_global->__pyx_n_u_from_tensor, __pyx_t_7) < (0)) __PYX_ERR(5, 770, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/tensor.pxi":788
 *         return pyarrow_wrap_sparse_csr_matrix(csparse_tensor)
 * 
 *     def to_numpy(self):             # <<<<<<<<<<<<<<
 *         """
 *         Convert arrow::SparseCSRMatrix to numpy.ndarrays with zero copy.
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_15SparseCSRMatrix_13to_numpy, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SparseCSRMatrix_to_numpy, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[581])); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 788, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_SparseCSRMatrix, __pyx_mstate_global->__pyx_n_u_to_numpy, __pyx_t_7) < (0)) __PYX_ERR(5, 788, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/tensor.pxi":805
 *                 PyObject_to_object(out_indices))
 * 
 *     def to_scipy(self):             # <<<<<<<<<<<<<<
 *         """
 *         Convert arrow::SparseCSRMatrix to scipy.sparse.csr_array.
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_15SparseCSRMatrix_15to_scipy, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SparseCSRMatrix_to_scipy, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[582])); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 805, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_SparseCSRMatrix, __pyx_mstate_global->__pyx_n_u_to_scipy, __pyx_t_7) < (0)) __PYX_ERR(5, 805, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/tensor.pxi":824
 *         return result
 * 
 *     def to_tensor(self):             # <<<<<<<<<<<<<<
 *         """
 *         Convert arrow::SparseCSRMatrix to arrow::Tensor.
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_15SparseCSRMatrix_17to_tensor, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SparseCSRMatrix_to_tensor, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[583])); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 824, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_SparseCSRMatrix, __pyx_mstate_global->__pyx_n_u_to_tensor, __pyx_t_7) < (0)) __PYX_ERR(5, 824, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/tensor.pxi":834
 *         return pyarrow_wrap_tensor(ctensor)
 * 
 *     def equals(self, SparseCSRMatrix other):             # <<<<<<<<<<<<<<
 *         """
 *         Return true if sparse tensors contains exactly equal data.
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_15SparseCSRMatrix_19equals, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SparseCSRMatrix_equals, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[584])); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 834, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_SparseCSRMatrix, __pyx_mstate_global->__pyx_n_u_equals, __pyx_t_7) < (0)) __PYX_ERR(5, 834, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/tensor.pxi":868
 *         return self.stp.size()
 * 
 *     def dim_name(self, i):             # <<<<<<<<<<<<<<
 *         """
 *         Returns the name of the i-th tensor dimension.
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_15SparseCSRMatrix_23dim_name, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SparseCSRMatrix_dim_name, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[585])); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 868, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_SparseCSRMatrix, __pyx_mstate_global->__pyx_n_u_dim_name, __pyx_t_7) < (0)) __PYX_ERR(5, 868, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.sp_sparse_tensor,self.stp cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_15SparseCSRMatrix_25__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SparseCSRMatrix___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[586])); if (unlikely(!__pyx_t_7)) __PYX_ERR(7, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_7) < (0)) __PYX_ERR(7, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "self.sp_sparse_tensor,self.stp cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.sp_sparse_tensor,self.stp cannot be converted to a Python object for pickling"
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_15SparseCSRMatrix_27__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SparseCSRMatrix___setstate_cytho, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[587])); if (unlikely(!__pyx_t_7)) __PYX_ERR(7, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_7) < (0)) __PYX_ERR(7, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/tensor.pxi":912
 * shape: {self.shape}"""
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def from_dense_numpy(cls, obj, dim_names=None):
 *         """
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_15SparseCSCMatrix_5from_dense_numpy, __Pyx_CYFUNCTION_CLASSMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SparseCSCMatrix_from_dense_numpy, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[588])); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 912, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_mstate_global->__pyx_tuple[7]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_SparseCSCMatrix, __pyx_mstate_global->__pyx_n_u_from_dense_numpy, __pyx_t_7) < (0)) __PYX_ERR(5, 912, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_GetNameInClass(__pyx_t_7, (PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_SparseCSCMatrix, __pyx_mstate_global->__pyx_n_u_from_dense_numpy); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 912, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_4 = __Pyx_Method_ClassMethod(__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 912, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_SparseCSCMatrix, __pyx_mstate_global->__pyx_n_u_from_dense_numpy, __pyx_t_4) < (0)) __PYX_ERR(5, 912, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyarrow/tensor.pxi":930
 *         return cls.from_tensor(Tensor.from_numpy(obj, dim_names=dim_names))
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_numpy(data, indptr, indices, shape, dim_names=None):
 *         """
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_15SparseCSCMatrix_7from_numpy, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SparseCSCMatrix_from_numpy, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[589])); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 930, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[7]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_SparseCSCMatrix, __pyx_mstate_global->__pyx_n_u_from_numpy, __pyx_t_4) < (0)) __PYX_ERR(5, 930, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_7 = NULL;
  __Pyx_GetNameInClass(__pyx_t_12, (PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_SparseCSCMatrix, __pyx_mstate_global->__pyx_n_u_from_numpy); if (unlikely(!__pyx_t_12)) __PYX_ERR(5, 930, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_10 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_12};
    __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_staticmethod, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 930, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_SparseCSCMatrix, __pyx_mstate_global->__pyx_n_u_from_numpy, __pyx_t_4) < (0)) __PYX_ERR(5, 930, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyarrow/tensor.pxi":974
 *         return pyarrow_wrap_sparse_csc_matrix(csparse_tensor)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_scipy(obj, dim_names=None):
 *         """
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_15SparseCSCMatrix_9from_scipy, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SparseCSCMatrix_from_scipy, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[590])); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 974, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[7]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_SparseCSCMatrix, __pyx_mstate_global->__pyx_n_u_from_scipy, __pyx_t_4) < (0)) __PYX_ERR(5, 974, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_12 = NULL;
  __Pyx_GetNameInClass(__pyx_t_7, (PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_SparseCSCMatrix, __pyx_mstate_global->__pyx_n_u_from_scipy); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 974, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_10 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_t_7};
    __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_staticmethod, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 974, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_SparseCSCMatrix, __pyx_mstate_global->__pyx_n_u_from_scipy, __pyx_t_4) < (0)) __PYX_ERR(5, 974, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyarrow/tensor.pxi":1011
 *         return pyarrow_wrap_sparse_csc_matrix(csparse_tensor)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_tensor(obj):
 *         """
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_15SparseCSCMatrix_11from_tensor, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SparseCSCMatrix_from_tensor, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[591])); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1011, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_SparseCSCMatrix, __pyx_mstate_global->__pyx_n_u_from_tensor, __pyx_t_4) < (0)) __PYX_ERR(5, 1011, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_7 = NULL;
  __Pyx_GetNameInClass(__pyx_t_12, (PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_SparseCSCMatrix, __pyx_mstate_global->__pyx_n_u_from_tensor); if (unlikely(!__pyx_t_12)) __PYX_ERR(5, 1011, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_10 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_12};
    __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_staticmethod, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1011, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_SparseCSCMatrix, __pyx_mstate_global->__pyx_n_u_from_tensor, __pyx_t_4) < (0)) __PYX_ERR(5, 1011, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyarrow/tensor.pxi":1029
 *         return pyarrow_wrap_sparse_csc_matrix(csparse_tensor)
 * 
 *     def to_numpy(self):             # <<<<<<<<<<<<<<
 *         """
 *         Convert arrow::SparseCSCMatrix to numpy.ndarrays with zero copy
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_15SparseCSCMatrix_13to_numpy, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SparseCSCMatrix_to_numpy, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[592])); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1029, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_SparseCSCMatrix, __pyx_mstate_global->__pyx_n_u_to_numpy, __pyx_t_4) < (0)) __PYX_ERR(5, 1029, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyarrow/tensor.pxi":1046
 *                 PyObject_to_object(out_indices))
 * 
 *     def to_scipy(self):             # <<<<<<<<<<<<<<
 *         """
 *         Convert arrow::SparseCSCMatrix to scipy.sparse.csc_array
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_15SparseCSCMatrix_15to_scipy, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SparseCSCMatrix_to_scipy, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[593])); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1046, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_SparseCSCMatrix, __pyx_mstate_global->__pyx_n_u_to_scipy, __pyx_t_4) < (0)) __PYX_ERR(5, 1046, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyarrow/tensor.pxi":1065
 *         return result
 * 
 *     def to_tensor(self):             # <<<<<<<<<<<<<<
 *         """
 *         Convert arrow::SparseCSCMatrix to arrow::Tensor
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_15SparseCSCMatrix_17to_tensor, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SparseCSCMatrix_to_tensor, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[594])); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1065, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_SparseCSCMatrix, __pyx_mstate_global->__pyx_n_u_to_tensor, __pyx_t_4) < (0)) __PYX_ERR(5, 1065, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyarrow/tensor.pxi":1076
 *         return pyarrow_wrap_tensor(ctensor)
 * 
 *     def equals(self, SparseCSCMatrix other):             # <<<<<<<<<<<<<<
 *         """
 *         Return true if sparse tensors contains exactly equal data
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_15SparseCSCMatrix_19equals, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SparseCSCMatrix_equals, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[595])); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1076, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_SparseCSCMatrix, __pyx_mstate_global->__pyx_n_u_equals, __pyx_t_4) < (0)) __PYX_ERR(5, 1076, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyarrow/tensor.pxi":1110
 *         return self.stp.size()
 * 
 *     def dim_name(self, i):             # <<<<<<<<<<<<<<
 *         """
 *         Returns the name of the i-th tensor dimension.
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_15SparseCSCMatrix_23dim_name, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SparseCSCMatrix_dim_name, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[596])); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1110, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_SparseCSCMatrix, __pyx_mstate_global->__pyx_n_u_dim_name, __pyx_t_4) < (0)) __PYX_ERR(5, 1110, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.sp_sparse_tensor,self.stp cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_15SparseCSCMatrix_25__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SparseCSCMatrix___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[597])); if (unlikely(!__pyx_t_4)) __PYX_ERR(7, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_4) < (0)) __PYX_ERR(7, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "self.sp_sparse_tensor,self.stp cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.sp_sparse_tensor,self.stp cannot be converted to a Python object for pickling"
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_15SparseCSCMatrix_27__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SparseCSCMatrix___setstate_cytho, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[598])); if (unlikely(!__pyx_t_4)) __PYX_ERR(7, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_4) < (0)) __PYX_ERR(7, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyarrow/tensor.pxi":1162
 * shape: {self.shape}"""
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def from_dense_numpy(cls, obj, dim_names=None):
 *         """
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_15SparseCSFTensor_5from_dense_numpy, __Pyx_CYFUNCTION_CLASSMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SparseCSFTensor_from_dense_numpy, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[599])); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1162, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[7]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_SparseCSFTensor, __pyx_mstate_global->__pyx_n_u_from_dense_numpy, __pyx_t_4) < (0)) __PYX_ERR(5, 1162, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_GetNameInClass(__pyx_t_4, (PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_SparseCSFTensor, __pyx_mstate_global->__pyx_n_u_from_dense_numpy); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1162, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_12 = __Pyx_Method_ClassMethod(__pyx_t_4); if (unlikely(!__pyx_t_12)) __PYX_ERR(5, 1162, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_SparseCSFTensor, __pyx_mstate_global->__pyx_n_u_from_dense_numpy, __pyx_t_12) < (0)) __PYX_ERR(5, 1162, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/tensor.pxi":1180
 *         return cls.from_tensor(Tensor.from_numpy(obj, dim_names=dim_names))
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_numpy(data, indptr, indices, shape, axis_order=None,
 *                    dim_names=None):
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_15SparseCSFTensor_7from_numpy, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SparseCSFTensor_from_numpy, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[600])); if (unlikely(!__pyx_t_12)) __PYX_ERR(5, 1180, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_12, __pyx_mstate_global->__pyx_tuple[24]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_SparseCSFTensor, __pyx_mstate_global->__pyx_n_u_from_numpy, __pyx_t_12) < (0)) __PYX_ERR(5, 1180, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __pyx_t_4 = NULL;
  __Pyx_GetNameInClass(__pyx_t_7, (PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_SparseCSFTensor, __pyx_mstate_global->__pyx_n_u_from_numpy); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 1180, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_10 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_7};
    __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_staticmethod, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_12)) __PYX_ERR(5, 1180, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
  }
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_SparseCSFTensor, __pyx_mstate_global->__pyx_n_u_from_numpy, __pyx_t_12) < (0)) __PYX_ERR(5, 1180, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/tensor.pxi":1249
 *         return pyarrow_wrap_sparse_csf_tensor(csparse_tensor)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_tensor(obj):
 *         """
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_15SparseCSFTensor_9from_tensor, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SparseCSFTensor_from_tensor, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[601])); if (unlikely(!__pyx_t_12)) __PYX_ERR(5, 1249, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_SparseCSFTensor, __pyx_mstate_global->__pyx_n_u_from_tensor, __pyx_t_12) < (0)) __PYX_ERR(5, 1249, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __pyx_t_7 = NULL;
  __Pyx_GetNameInClass(__pyx_t_4, (PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_SparseCSFTensor, __pyx_mstate_global->__pyx_n_u_from_tensor); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1249, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_10 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_4};
    __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_staticmethod, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_12)) __PYX_ERR(5, 1249, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
  }
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_SparseCSFTensor, __pyx_mstate_global->__pyx_n_u_from_tensor, __pyx_t_12) < (0)) __PYX_ERR(5, 1249, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/tensor.pxi":1267
 *         return pyarrow_wrap_sparse_csf_tensor(csparse_tensor)
 * 
 *     def to_numpy(self):             # <<<<<<<<<<<<<<
 *         """
 *         Convert arrow::SparseCSFTensor to numpy.ndarrays with zero copy
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_15SparseCSFTensor_11to_numpy, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SparseCSFTensor_to_numpy, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[602])); if (unlikely(!__pyx_t_12)) __PYX_ERR(5, 1267, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_SparseCSFTensor, __pyx_mstate_global->__pyx_n_u_to_numpy, __pyx_t_12) < (0)) __PYX_ERR(5, 1267, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/tensor.pxi":1284
 *                 PyObject_to_object(out_indices))
 * 
 *     def to_tensor(self):             # <<<<<<<<<<<<<<
 *         """
 *         Convert arrow::SparseCSFTensor to arrow::Tensor
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_15SparseCSFTensor_13to_tensor, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SparseCSFTensor_to_tensor, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[603])); if (unlikely(!__pyx_t_12)) __PYX_ERR(5, 1284, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_SparseCSFTensor, __pyx_mstate_global->__pyx_n_u_to_tensor, __pyx_t_12) < (0)) __PYX_ERR(5, 1284, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/tensor.pxi":1295
 *         return pyarrow_wrap_tensor(ctensor)
 * 
 *     def equals(self, SparseCSFTensor other):             # <<<<<<<<<<<<<<
 *         """
 *         Return true if sparse tensors contains exactly equal data
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_15SparseCSFTensor_15equals, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SparseCSFTensor_equals, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[604])); if (unlikely(!__pyx_t_12)) __PYX_ERR(5, 1295, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_SparseCSFTensor, __pyx_mstate_global->__pyx_n_u_equals, __pyx_t_12) < (0)) __PYX_ERR(5, 1295, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/tensor.pxi":1329
 *         return self.stp.size()
 * 
 *     def dim_name(self, i):             # <<<<<<<<<<<<<<
 *         """
 *         Returns the name of the i-th tensor dimension.
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_15SparseCSFTensor_19dim_name, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SparseCSFTensor_dim_name, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[605])); if (unlikely(!__pyx_t_12)) __PYX_ERR(5, 1329, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_SparseCSFTensor, __pyx_mstate_global->__pyx_n_u_dim_name, __pyx_t_12) < (0)) __PYX_ERR(5, 1329, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.sp_sparse_tensor,self.stp cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_15SparseCSFTensor_21__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SparseCSFTensor___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[606])); if (unlikely(!__pyx_t_12)) __PYX_ERR(7, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_12) < (0)) __PYX_ERR(7, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "self.sp_sparse_tensor,self.stp cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.sp_sparse_tensor,self.stp cannot be converted to a Python object for pickling"
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_15SparseCSFTensor_23__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SparseCSFTensor___setstate_cytho, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[607])); if (unlikely(!__pyx_t_12)) __PYX_ERR(7, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_12) < (0)) __PYX_ERR(7, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/io.pxi":25
 * from cpython.bytearray cimport PyByteArray_FromStringAndSize
 * 
 * import codecs             # <<<<<<<<<<<<<<
 * import pickle
 * import re
*/
  __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_codecs, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 25, __pyx_L1_error)
  __pyx_t_12 = __pyx_t_1;
  __Pyx_GOTREF(__pyx_t_12);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_codecs, __pyx_t_12) < (0)) __PYX_ERR(6, 25, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/io.pxi":26
 * 
 * import codecs
 * import pickle             # <<<<<<<<<<<<<<
 * import re
 * import sys
*/
  __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_pickle, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 26, __pyx_L1_error)
  __pyx_t_12 = __pyx_t_1;
  __Pyx_GOTREF(__pyx_t_12);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pickle, __pyx_t_12) < (0)) __PYX_ERR(6, 26, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/io.pxi":27
 * import codecs
 * import pickle
 * import re             # <<<<<<<<<<<<<<
 * import sys
 * import threading
*/
  __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_re, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 27, __pyx_L1_error)
  __pyx_t_12 = __pyx_t_1;
  __Pyx_GOTREF(__pyx_t_12);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_re, __pyx_t_12) < (0)) __PYX_ERR(6, 27, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/io.pxi":28
 * import pickle
 * import re
 * import sys             # <<<<<<<<<<<<<<
 * import threading
 * import time
*/
  __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sys, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 28, __pyx_L1_error)
  __pyx_t_12 = __pyx_t_1;
  __Pyx_GOTREF(__pyx_t_12);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_sys, __pyx_t_12) < (0)) __PYX_ERR(6, 28, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/io.pxi":29
 * import re
 * import sys
 * import threading             # <<<<<<<<<<<<<<
 * import time
 * import warnings
*/
  __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_threading, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 29, __pyx_L1_error)
  __pyx_t_12 = __pyx_t_1;
  __Pyx_GOTREF(__pyx_t_12);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_threading, __pyx_t_12) < (0)) __PYX_ERR(6, 29, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/io.pxi":30
 * import sys
 * import threading
 * import time             # <<<<<<<<<<<<<<
 * import warnings
 * from io import BufferedIOBase, IOBase, TextIOBase, UnsupportedOperation
*/
  __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_time, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 30, __pyx_L1_error)
  __pyx_t_12 = __pyx_t_1;
  __Pyx_GOTREF(__pyx_t_12);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_time, __pyx_t_12) < (0)) __PYX_ERR(6, 30, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/io.pxi":31
 * import threading
 * import time
 * import warnings             # <<<<<<<<<<<<<<
 * from io import BufferedIOBase, IOBase, TextIOBase, UnsupportedOperation
 * from queue import Queue, Empty as QueueEmpty
*/
  __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_warnings, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 31, __pyx_L1_error)
  __pyx_t_12 = __pyx_t_1;
  __Pyx_GOTREF(__pyx_t_12);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_warnings, __pyx_t_12) < (0)) __PYX_ERR(6, 31, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/io.pxi":32
 * import time
 * import warnings
 * from io import BufferedIOBase, IOBase, TextIOBase, UnsupportedOperation             # <<<<<<<<<<<<<<
 * from queue import Queue, Empty as QueueEmpty
 * 
*/
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_BufferedIOBase,__pyx_mstate_global->__pyx_n_u_IOBase,__pyx_mstate_global->__pyx_n_u_TextIOBase,__pyx_mstate_global->__pyx_n_u_UnsupportedOperation};
    __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_io, __pyx_imported_names, 4, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 32, __pyx_L1_error)
  }
  __pyx_t_12 = __pyx_t_1;
  __Pyx_GOTREF(__pyx_t_12);
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_BufferedIOBase,__pyx_mstate_global->__pyx_n_u_IOBase,__pyx_mstate_global->__pyx_n_u_TextIOBase,__pyx_mstate_global->__pyx_n_u_UnsupportedOperation};
    for (__pyx_t_3=0; __pyx_t_3 < 4; __pyx_t_3++) {
      __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_12, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 32, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(6, 32, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/io.pxi":33
 * import warnings
 * from io import BufferedIOBase, IOBase, TextIOBase, UnsupportedOperation
 * from queue import Queue, Empty as QueueEmpty             # <<<<<<<<<<<<<<
 * 
 * from pyarrow.lib cimport check_status, HaveLibHdfs
*/
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Queue,__pyx_mstate_global->__pyx_n_u_Empty};
    __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_queue, __pyx_imported_names, 2, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 33, __pyx_L1_error)
  }
  __pyx_t_12 = __pyx_t_1;
  __Pyx_GOTREF(__pyx_t_12);
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Queue,__pyx_mstate_global->__pyx_n_u_Empty};
    for (__pyx_t_3=0; __pyx_t_3 < 2; __pyx_t_3++) {
      __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_12, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 33, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      switch (__pyx_t_3) {
        case 1:
        if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_QueueEmpty, __pyx_t_4) < (0)) __PYX_ERR(6, 33, __pyx_L1_error)
        break;
        default:;
        if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(6, 33, __pyx_L1_error)
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/io.pxi":36
 * 
 * from pyarrow.lib cimport check_status, HaveLibHdfs
 * from pyarrow.util import _is_path_like, _stringify_path             # <<<<<<<<<<<<<<
 * 
 * 
*/
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_is_path_like,__pyx_mstate_global->__pyx_n_u_stringify_path};
    __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_pyarrow_util, __pyx_imported_names, 2, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 36, __pyx_L1_error)
  }
  __pyx_t_12 = __pyx_t_1;
  __Pyx_GOTREF(__pyx_t_12);
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_is_path_like,__pyx_mstate_global->__pyx_n_u_stringify_path};
    for (__pyx_t_3=0; __pyx_t_3 < 2; __pyx_t_3++) {
      __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_12, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 36, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(6, 36, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/io.pxi":40
 * 
 * # 64K
 * DEFAULT_BUFFER_SIZE = 2 ** 16             # <<<<<<<<<<<<<<
 * 
 * 
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_DEFAULT_BUFFER_SIZE, __pyx_mstate_global->__pyx_int_65536) < (0)) __PYX_ERR(6, 40, __pyx_L1_error)

  /* "pyarrow/io.pxi":49
 * 
 * 
 * def have_libhdfs():             # <<<<<<<<<<<<<<
 *     """
 *     Return true if HDFS (HadoopFileSystem) library is set up correctly.
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_235have_libhdfs, 0, __pyx_mstate_global->__pyx_n_u_have_libhdfs, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[608])); if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 49, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_have_libhdfs, __pyx_t_12) < (0)) __PYX_ERR(6, 49, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/io.pxi":61
 * 
 * 
 * def io_thread_count():             # <<<<<<<<<<<<<<
 *     """
 *     Return the number of threads to use for I/O operations.
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_237io_thread_count, 0, __pyx_mstate_global->__pyx_n_u_io_thread_count, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[609])); if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 61, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_io_thread_count, __pyx_t_12) < (0)) __PYX_ERR(6, 61, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/io.pxi":78
 * 
 * 
 * def set_io_thread_count(int count):             # <<<<<<<<<<<<<<
 *     """
 *     Set the number of threads to use for I/O operations.
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_239set_io_thread_count, 0, __pyx_mstate_global->__pyx_n_u_set_io_thread_count, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[610])); if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 78, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_set_io_thread_count, __pyx_t_12) < (0)) __PYX_ERR(6, 78, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/io.pxi":119
 *     # Default chunk size for chunked reads.
 *     # Use a large enough value for networked filesystems.
 *     _default_chunk_size = 256 * 1024             # <<<<<<<<<<<<<<
 * 
 *     def __cinit__(self):
*/
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NativeFile, __pyx_mstate_global->__pyx_n_u_default_chunk_size, __pyx_mstate_global->__pyx_int_262144) < (0)) __PYX_ERR(6, 119, __pyx_L1_error)

  /* "pyarrow/io.pxi":132
 *             self.close()
 * 
 *     def __enter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_10NativeFile_5__enter__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_NativeFile___enter, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[611])); if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 132, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NativeFile, __pyx_mstate_global->__pyx_n_u_enter, __pyx_t_12) < (0)) __PYX_ERR(6, 132, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/io.pxi":135
 *         return self
 * 
 *     def __exit__(self, exc_type, exc_value, tb):             # <<<<<<<<<<<<<<
 *         self.close()
 * 
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_10NativeFile_7__exit__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_NativeFile___exit, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[612])); if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 135, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NativeFile, __pyx_mstate_global->__pyx_n_u_exit, __pyx_t_12) < (0)) __PYX_ERR(6, 135, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/io.pxi":169
 *             raise ValueError('File object is malformed, has no mode')
 * 
 *     def readable(self):             # <<<<<<<<<<<<<<
 *         self._assert_open()
 *         return self.is_readable
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_10NativeFile_11readable, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_NativeFile_readable, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[613])); if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 169, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NativeFile, __pyx_mstate_global->__pyx_n_u_readable, __pyx_t_12) < (0)) __PYX_ERR(6, 169, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/io.pxi":173
 *         return self.is_readable
 * 
 *     def writable(self):             # <<<<<<<<<<<<<<
 *         self._assert_open()
 *         return self.is_writable
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_10NativeFile_13writable, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_NativeFile_writable, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[614])); if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 173, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NativeFile, __pyx_mstate_global->__pyx_n_u_writable, __pyx_t_12) < (0)) __PYX_ERR(6, 173, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/io.pxi":177
 *         return self.is_writable
 * 
 *     def seekable(self):             # <<<<<<<<<<<<<<
 *         self._assert_open()
 *         return self.is_seekable
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_10NativeFile_15seekable, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_NativeFile_seekable, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[615])); if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 177, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NativeFile, __pyx_mstate_global->__pyx_n_u_seekable, __pyx_t_12) < (0)) __PYX_ERR(6, 177, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/io.pxi":181
 *         return self.is_seekable
 * 
 *     def isatty(self):             # <<<<<<<<<<<<<<
 *         self._assert_open()
 *         return False
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_10NativeFile_17isatty, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_NativeFile_isatty, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[616])); if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 181, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NativeFile, __pyx_mstate_global->__pyx_n_u_isatty, __pyx_t_12) < (0)) __PYX_ERR(6, 181, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/io.pxi":185
 *         return False
 * 
 *     def fileno(self):             # <<<<<<<<<<<<<<
 *         """
 *         NOT IMPLEMENTED
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_10NativeFile_19fileno, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_NativeFile_fileno, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[617])); if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 185, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NativeFile, __pyx_mstate_global->__pyx_n_u_fileno, __pyx_t_12) < (0)) __PYX_ERR(6, 185, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/io.pxi":200
 *             return True
 * 
 *     def close(self):             # <<<<<<<<<<<<<<
 *         if not self.closed:
 *             with nogil:
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_10NativeFile_21close, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_NativeFile_close, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[618])); if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 200, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NativeFile, __pyx_mstate_global->__pyx_n_u_close, __pyx_t_12) < (0)) __PYX_ERR(6, 200, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/io.pxi":234
 *         return self.output_stream
 * 
 *     def _assert_open(self):             # <<<<<<<<<<<<<<
 *         if self.closed:
 *             raise ValueError("I/O operation on closed file")
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_10NativeFile_23_assert_open, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_NativeFile__assert_open, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[619])); if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 234, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NativeFile, __pyx_mstate_global->__pyx_n_u_assert_open, __pyx_t_12) < (0)) __PYX_ERR(6, 234, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/io.pxi":238
 *             raise ValueError("I/O operation on closed file")
 * 
 *     def _assert_readable(self):             # <<<<<<<<<<<<<<
 *         self._assert_open()
 *         if not self.is_readable:
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_10NativeFile_25_assert_readable, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_NativeFile__assert_readable, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[620])); if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 238, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NativeFile, __pyx_mstate_global->__pyx_n_u_assert_readable, __pyx_t_12) < (0)) __PYX_ERR(6, 238, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/io.pxi":244
 *             raise IOError("only valid on readable files")
 * 
 *     def _assert_writable(self):             # <<<<<<<<<<<<<<
 *         self._assert_open()
 *         if not self.is_writable:
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_10NativeFile_27_assert_writable, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_NativeFile__assert_writable, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[621])); if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 244, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NativeFile, __pyx_mstate_global->__pyx_n_u_assert_writable, __pyx_t_12) < (0)) __PYX_ERR(6, 244, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/io.pxi":249
 *             raise IOError("only valid on writable files")
 * 
 *     def _assert_seekable(self):             # <<<<<<<<<<<<<<
 *         self._assert_open()
 *         if not self.is_seekable:
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_10NativeFile_29_assert_seekable, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_NativeFile__assert_seekable, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[622])); if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 249, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NativeFile, __pyx_mstate_global->__pyx_n_u_assert_seekable, __pyx_t_12) < (0)) __PYX_ERR(6, 249, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/io.pxi":254
 *             raise IOError("only valid on seekable files")
 * 
 *     def size(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return file size
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_10NativeFile_31size, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_NativeFile_size, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[623])); if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 254, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NativeFile, __pyx_mstate_global->__pyx_n_u_size, __pyx_t_12) < (0)) __PYX_ERR(6, 254, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/io.pxi":266
 *         return size
 * 
 *     def metadata(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return file metadata
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_10NativeFile_33metadata, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_NativeFile_metadata, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[624])); if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 266, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NativeFile, __pyx_mstate_global->__pyx_n_u_metadata, __pyx_t_12) < (0)) __PYX_ERR(6, 266, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/io.pxi":284
 *         return metadata
 * 
 *     def tell(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return current stream position
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_10NativeFile_35tell, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_NativeFile_tell, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[625])); if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 284, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NativeFile, __pyx_mstate_global->__pyx_n_u_tell, __pyx_t_12) < (0)) __PYX_ERR(6, 284, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/io.pxi":301
 *         return position
 * 
 *     def seek(self, int64_t position, int whence=0):             # <<<<<<<<<<<<<<
 *         """
 *         Change current file stream position
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_10NativeFile_37seek, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_NativeFile_seek, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[626])); if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 301, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_12, __pyx_mstate_global->__pyx_tuple[23]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NativeFile, __pyx_mstate_global->__pyx_n_u_seek, __pyx_t_12) < (0)) __PYX_ERR(6, 301, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/io.pxi":343
 *         return self.tell()
 * 
 *     def flush(self):             # <<<<<<<<<<<<<<
 *         """
 *         Flush the stream, if applicable.
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_10NativeFile_39flush, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_NativeFile_flush, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[627])); if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 343, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NativeFile, __pyx_mstate_global->__pyx_n_u_flush, __pyx_t_12) < (0)) __PYX_ERR(6, 343, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/io.pxi":356
 *                 check_status(handle.get().Flush())
 * 
 *     def write(self, data):             # <<<<<<<<<<<<<<
 *         """
 *         Write data to the file.
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_10NativeFile_41write, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_NativeFile_write, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[628])); if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 356, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NativeFile, __pyx_mstate_global->__pyx_n_u_write, __pyx_t_12) < (0)) __PYX_ERR(6, 356, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/io.pxi":378
 *         return buf.get().size()
 * 
 *     def read(self, nbytes=None):             # <<<<<<<<<<<<<<
 *         """
 *         Read and return up to n bytes.
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_10NativeFile_43read, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_NativeFile_read, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[629])); if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 378, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_12, __pyx_mstate_global->__pyx_tuple[7]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NativeFile, __pyx_mstate_global->__pyx_n_u_read, __pyx_t_12) < (0)) __PYX_ERR(6, 378, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/io.pxi":427
 *         return PyObject_to_object(obj)
 * 
 *     def get_stream(self, file_offset, nbytes):             # <<<<<<<<<<<<<<
 *         """
 *         Return an input stream that reads a file segment independent of the
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_10NativeFile_45get_stream, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_NativeFile_get_stream, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[630])); if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 427, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NativeFile, __pyx_mstate_global->__pyx_n_u_get_stream, __pyx_t_12) < (0)) __PYX_ERR(6, 427, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/io.pxi":463
 *         return stream
 * 
 *     def read_at(self, nbytes, offset):             # <<<<<<<<<<<<<<
 *         """
 *         Read indicated number of bytes at offset from the file
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_10NativeFile_47read_at, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_NativeFile_read_at, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[631])); if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 463, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NativeFile, __pyx_mstate_global->__pyx_n_u_read_at, __pyx_t_12) < (0)) __PYX_ERR(6, 463, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/io.pxi":501
 *         return PyObject_to_object(obj)
 * 
 *     def read1(self, nbytes=None):             # <<<<<<<<<<<<<<
 *         """Read and return up to n bytes.
 * 
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_10NativeFile_49read1, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_NativeFile_read1, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[632])); if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 501, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_12, __pyx_mstate_global->__pyx_tuple[7]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NativeFile, __pyx_mstate_global->__pyx_n_u_read1, __pyx_t_12) < (0)) __PYX_ERR(6, 501, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/io.pxi":524
 *         return self.read(nbytes)
 * 
 *     def readall(self):             # <<<<<<<<<<<<<<
 *         return self.read()
 * 
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_10NativeFile_51readall, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_NativeFile_readall, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[633])); if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 524, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NativeFile, __pyx_mstate_global->__pyx_n_u_readall, __pyx_t_12) < (0)) __PYX_ERR(6, 524, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/io.pxi":527
 *         return self.read()
 * 
 *     def readinto(self, b):             # <<<<<<<<<<<<<<
 *         """
 *         Read into the supplied buffer
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_10NativeFile_53readinto, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_NativeFile_readinto, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[634])); if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 527, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NativeFile, __pyx_mstate_global->__pyx_n_u_readinto, __pyx_t_12) < (0)) __PYX_ERR(6, 527, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/io.pxi":559
 *         return bytes_read
 * 
 *     def readline(self, size=None):             # <<<<<<<<<<<<<<
 *         """NOT IMPLEMENTED. Read and return a line of bytes from the file.
 * 
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_10NativeFile_55readline, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_NativeFile_readline, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[635])); if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 559, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_12, __pyx_mstate_global->__pyx_tuple[7]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NativeFile, __pyx_mstate_global->__pyx_n_u_readline, __pyx_t_12) < (0)) __PYX_ERR(6, 559, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/io.pxi":573
 *         raise UnsupportedOperation()
 * 
 *     def readlines(self, hint=None):             # <<<<<<<<<<<<<<
 *         """NOT IMPLEMENTED. Read lines of the file
 * 
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_10NativeFile_57readlines, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_NativeFile_readlines, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[636])); if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 573, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_12, __pyx_mstate_global->__pyx_tuple[7]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NativeFile, __pyx_mstate_global->__pyx_n_u_readlines, __pyx_t_12) < (0)) __PYX_ERR(6, 573, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/io.pxi":593
 *         return line
 * 
 *     def read_buffer(self, nbytes=None):             # <<<<<<<<<<<<<<
 *         """
 *         Read from buffer.
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_10NativeFile_63read_buffer, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_NativeFile_read_buffer, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[637])); if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 593, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_12, __pyx_mstate_global->__pyx_tuple[7]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NativeFile, __pyx_mstate_global->__pyx_n_u_read_buffer, __pyx_t_12) < (0)) __PYX_ERR(6, 593, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/io.pxi":622
 *         return pyarrow_wrap_buffer(output)
 * 
 *     def truncate(self):             # <<<<<<<<<<<<<<
 *         """
 *         NOT IMPLEMENTED
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_10NativeFile_65truncate, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_NativeFile_truncate, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[638])); if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 622, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NativeFile, __pyx_mstate_global->__pyx_n_u_truncate, __pyx_t_12) < (0)) __PYX_ERR(6, 622, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/io.pxi":628
 *         raise UnsupportedOperation()
 * 
 *     def writelines(self, lines):             # <<<<<<<<<<<<<<
 *         """
 *         Write lines to the file.
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_10NativeFile_67writelines, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_NativeFile_writelines, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[639])); if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 628, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NativeFile, __pyx_mstate_global->__pyx_n_u_writelines, __pyx_t_12) < (0)) __PYX_ERR(6, 628, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/io.pxi":642
 *             self.write(line)
 * 
 *     def download(self, stream_or_path, buffer_size=None):             # <<<<<<<<<<<<<<
 *         """
 *         Read this file completely to a local path or destination stream.
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_10NativeFile_69download, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_NativeFile_download, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[640])); if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 642, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_12, __pyx_mstate_global->__pyx_tuple[7]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NativeFile, __pyx_mstate_global->__pyx_n_u_download, __pyx_t_12) < (0)) __PYX_ERR(6, 642, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/io.pxi":741
 *             raise exc_info[0], exc_info[1], exc_info[2]
 * 
 *     def _download_nothreads(self, stream_or_path, buffer_size=None):             # <<<<<<<<<<<<<<
 *         """
 *         Internal method to do a download without separate threads, queues etc.
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_10NativeFile_71_download_nothreads, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_NativeFile__download_nothreads, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[641])); if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 741, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_12, __pyx_mstate_global->__pyx_tuple[7]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NativeFile, __pyx_mstate_global->__pyx_n_u_download_nothreads, __pyx_t_12) < (0)) __PYX_ERR(6, 741, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/io.pxi":797
 *             cleanup()
 * 
 *     def upload(self, stream, buffer_size=None):             # <<<<<<<<<<<<<<
 *         """
 *         Write from a source stream to this file.
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_10NativeFile_73upload, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_NativeFile_upload, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[642])); if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 797, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_12, __pyx_mstate_global->__pyx_tuple[7]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NativeFile, __pyx_mstate_global->__pyx_n_u_upload, __pyx_t_12) < (0)) __PYX_ERR(6, 797, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/io.pxi":855
 *             raise exc_info[0], exc_info[1], exc_info[2]
 * 
 *     def _upload_nothreads(self, stream, buffer_size=None):             # <<<<<<<<<<<<<<
 *         """
 *         Internal method to do an upload without separate threads, queues etc.
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_10NativeFile_75_upload_nothreads, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_NativeFile__upload_nothreads, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[643])); if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 855, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_12, __pyx_mstate_global->__pyx_tuple[7]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NativeFile, __pyx_mstate_global->__pyx_n_u_upload_nothreads, __pyx_t_12) < (0)) __PYX_ERR(6, 855, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_10NativeFile_77__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_NativeFile___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[644])); if (unlikely(!__pyx_t_12)) __PYX_ERR(7, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_12) < (0)) __PYX_ERR(7, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_10NativeFile_79__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_NativeFile___setstate_cython, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[645])); if (unlikely(!__pyx_t_12)) __PYX_ERR(7, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_12) < (0)) __PYX_ERR(7, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/io.pxi":873
 * 
 * 
 * BufferedIOBase.register(NativeFile)             # <<<<<<<<<<<<<<
 * 
 * # ----------------------------------------------------------------------
*/
  __pyx_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_BufferedIOBase); if (unlikely(!__pyx_t_7)) __PYX_ERR(6, 873, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_register); if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 873, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_10 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_NativeFile)};
    __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 873, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
  }
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/io.pxi":978
 *             self.is_writable = True
 * 
 *     def truncate(self, pos=None):             # <<<<<<<<<<<<<<
 *         """
 *         Parameters
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_10PythonFile_3truncate, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PythonFile_truncate, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[646])); if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 978, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_12, __pyx_mstate_global->__pyx_tuple[7]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_PythonFile, __pyx_mstate_global->__pyx_n_u_truncate, __pyx_t_12) < (0)) __PYX_ERR(6, 978, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/io.pxi":986
 *         self.handle.truncate(pos)
 * 
 *     def readline(self, size=None):             # <<<<<<<<<<<<<<
 *         """
 *         Read and return a line of bytes from the file.
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_10PythonFile_5readline, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PythonFile_readline, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[647])); if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 986, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_12, __pyx_mstate_global->__pyx_tuple[7]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_PythonFile, __pyx_mstate_global->__pyx_n_u_readline, __pyx_t_12) < (0)) __PYX_ERR(6, 986, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/io.pxi":999
 *         return self.handle.readline(size)
 * 
 *     def readlines(self, hint=None):             # <<<<<<<<<<<<<<
 *         """
 *         Read lines of the file.
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_10PythonFile_7readlines, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PythonFile_readlines, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[648])); if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 999, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_12, __pyx_mstate_global->__pyx_tuple[7]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_PythonFile, __pyx_mstate_global->__pyx_n_u_readlines, __pyx_t_12) < (0)) __PYX_ERR(6, 999, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_10PythonFile_9__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PythonFile___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[649])); if (unlikely(!__pyx_t_12)) __PYX_ERR(7, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_12) < (0)) __PYX_ERR(7, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_10PythonFile_11__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PythonFile___setstate_cython, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[650])); if (unlikely(!__pyx_t_12)) __PYX_ERR(7, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_12) < (0)) __PYX_ERR(7, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/io.pxi":1038
 *         object path
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def create(path, size):
 *         """
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_16MemoryMappedFile_1create, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_MemoryMappedFile_create, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[651])); if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 1038, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_MemoryMappedFile, __pyx_mstate_global->__pyx_n_u_create, __pyx_t_12) < (0)) __PYX_ERR(6, 1038, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __pyx_t_6 = NULL;
  __Pyx_GetNameInClass(__pyx_t_4, (PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_MemoryMappedFile, __pyx_mstate_global->__pyx_n_u_create); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 1038, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_10 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_4};
    __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_staticmethod, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 1038, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
  }
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_MemoryMappedFile, __pyx_mstate_global->__pyx_n_u_create, __pyx_t_12) < (0)) __PYX_ERR(6, 1038, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/io.pxi":1068
 *         return result
 * 
 *     def _open(self, path, mode='r'):             # <<<<<<<<<<<<<<
 *         self.path = path
 * 
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_16MemoryMappedFile_3_open, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_MemoryMappedFile__open, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[652])); if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 1068, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_12, __pyx_mstate_global->__pyx_tuple[46]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_MemoryMappedFile, __pyx_mstate_global->__pyx_n_u_open_2, __pyx_t_12) < (0)) __PYX_ERR(6, 1068, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/io.pxi":1096
 *         self.handle = handle
 * 
 *     def resize(self, new_size):             # <<<<<<<<<<<<<<
 *         """
 *         Resize the map and underlying file.
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_16MemoryMappedFile_5resize, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_MemoryMappedFile_resize, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[653])); if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 1096, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_MemoryMappedFile, __pyx_mstate_global->__pyx_n_u_resize, __pyx_t_12) < (0)) __PYX_ERR(6, 1096, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/io.pxi":1106
 *         check_status(self.handle.get().Resize(new_size))
 * 
 *     def fileno(self):             # <<<<<<<<<<<<<<
 *         self._assert_open()
 *         return self.handle.get().file_descriptor()
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_16MemoryMappedFile_7fileno, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_MemoryMappedFile_fileno, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[654])); if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 1106, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_MemoryMappedFile, __pyx_mstate_global->__pyx_n_u_fileno, __pyx_t_12) < (0)) __PYX_ERR(6, 1106, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_16MemoryMappedFile_9__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_MemoryMappedFile___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[655])); if (unlikely(!__pyx_t_12)) __PYX_ERR(7, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_12) < (0)) __PYX_ERR(7, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_16MemoryMappedFile_11__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_MemoryMappedFile___setstate_cyth, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[656])); if (unlikely(!__pyx_t_12)) __PYX_ERR(7, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_12) < (0)) __PYX_ERR(7, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/io.pxi":1111
 * 
 * 
 * def memory_map(path, mode='r'):             # <<<<<<<<<<<<<<
 *     """
 *     Open memory map at file path. Size of the memory map cannot change.
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_241memory_map, 0, __pyx_mstate_global->__pyx_n_u_memory_map, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[657])); if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 1111, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_12, __pyx_mstate_global->__pyx_tuple[46]);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_memory_map, __pyx_t_12) < (0)) __PYX_ERR(6, 1111, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/io.pxi":1152
 * 
 * 
 * def create_memory_map(path, size):             # <<<<<<<<<<<<<<
 *     """
 *     Create a file of the given size and memory-map it.
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_243create_memory_map, 0, __pyx_mstate_global->__pyx_n_u_create_memory_map, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[658])); if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 1152, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_create_memory_map, __pyx_t_12) < (0)) __PYX_ERR(6, 1152, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/io.pxi":1265
 *         self._is_appending = append
 * 
 *     def fileno(self):             # <<<<<<<<<<<<<<
 *         self._assert_open()
 *         return self.handle.file_descriptor()
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_6OSFile_3fileno, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_OSFile_fileno, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[659])); if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 1265, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_OSFile, __pyx_mstate_global->__pyx_n_u_fileno, __pyx_t_12) < (0)) __PYX_ERR(6, 1265, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_6OSFile_5__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_OSFile___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[660])); if (unlikely(!__pyx_t_12)) __PYX_ERR(7, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_12) < (0)) __PYX_ERR(7, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_6OSFile_7__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_OSFile___setstate_cython, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[661])); if (unlikely(!__pyx_t_12)) __PYX_ERR(7, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_12) < (0)) __PYX_ERR(7, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/io.pxi":1299
 *         self.is_writable = True
 * 
 *     def set_memcopy_threads(self, int num_threads):             # <<<<<<<<<<<<<<
 *         """
 *         Parameters
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_21FixedSizeBufferWriter_3set_memcopy_threads, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_FixedSizeBufferWriter_set_memcop, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[662])); if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 1299, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_FixedSizeBufferWriter, __pyx_mstate_global->__pyx_n_u_set_memcopy_threads, __pyx_t_12) < (0)) __PYX_ERR(6, 1299, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/io.pxi":1309
 *         writer.set_memcopy_threads(num_threads)
 * 
 *     def set_memcopy_blocksize(self, int64_t blocksize):             # <<<<<<<<<<<<<<
 *         """
 *         Parameters
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_21FixedSizeBufferWriter_5set_memcopy_blocksize, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_FixedSizeBufferWriter_set_memcop_2, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[663])); if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 1309, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_FixedSizeBufferWriter, __pyx_mstate_global->__pyx_n_u_set_memcopy_blocksize, __pyx_t_12) < (0)) __PYX_ERR(6, 1309, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/io.pxi":1319
 *         writer.set_memcopy_blocksize(blocksize)
 * 
 *     def set_memcopy_threshold(self, int64_t threshold):             # <<<<<<<<<<<<<<
 *         """
 *         Parameters
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_21FixedSizeBufferWriter_7set_memcopy_threshold, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_FixedSizeBufferWriter_set_memcop_3, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[664])); if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 1319, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_FixedSizeBufferWriter, __pyx_mstate_global->__pyx_n_u_set_memcopy_threshold, __pyx_t_12) < (0)) __PYX_ERR(6, 1319, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_21FixedSizeBufferWriter_9__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_FixedSizeBufferWriter___reduce_c, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[665])); if (unlikely(!__pyx_t_12)) __PYX_ERR(7, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_12) < (0)) __PYX_ERR(7, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_21FixedSizeBufferWriter_11__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_FixedSizeBufferWriter___setstate, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[666])); if (unlikely(!__pyx_t_12)) __PYX_ERR(7, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_12) < (0)) __PYX_ERR(7, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/io.pxi":1365
 *                 f"is_mutable={self.is_mutable}>")
 * 
 *     def _assert_cpu(self):             # <<<<<<<<<<<<<<
 *         if not self.is_cpu:
 *             raise NotImplementedError("Implemented only for data on CPU device")
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_6Buffer_9_assert_cpu, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Buffer__assert_cpu, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[667])); if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 1365, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Buffer, __pyx_mstate_global->__pyx_n_u_assert_cpu, __pyx_t_12) < (0)) __PYX_ERR(6, 1365, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/io.pxi":1386
 *         return self.buffer.get().address()
 * 
 *     def hex(self):             # <<<<<<<<<<<<<<
 *         """
 *         Compute hexadecimal representation of the buffer.
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_6Buffer_11hex, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Buffer_hex, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[668])); if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 1386, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Buffer, __pyx_mstate_global->__pyx_n_u_hex, __pyx_t_12) < (0)) __PYX_ERR(6, 1386, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/io.pxi":1465
 *         return self.buffer.get().data()[i]
 * 
 *     def slice(self, offset=0, length=None):             # <<<<<<<<<<<<<<
 *         """
 *         Slice this buffer.  Memory is not copied.
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_6Buffer_15slice, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Buffer_slice, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[669])); if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 1465, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_12, __pyx_mstate_global->__pyx_tuple[31]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Buffer, __pyx_mstate_global->__pyx_n_u_slice, __pyx_t_12) < (0)) __PYX_ERR(6, 1465, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/io.pxi":1496
 *         return pyarrow_wrap_buffer(result)
 * 
 *     def equals(self, Buffer other):             # <<<<<<<<<<<<<<
 *         """
 *         Determine if two buffers contain exactly the same data.
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_6Buffer_17equals, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Buffer_equals, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[670])); if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 1496, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Buffer, __pyx_mstate_global->__pyx_n_u_equals, __pyx_t_12) < (0)) __PYX_ERR(6, 1496, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/io.pxi":1532
 *             return self.equals(py_buffer(other))
 * 
 *     def __reduce_ex__(self, protocol):             # <<<<<<<<<<<<<<
 *         self._assert_cpu()
 * 
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_6Buffer_21__reduce_ex__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Buffer___reduce_ex, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[671])); if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 1532, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Buffer, __pyx_mstate_global->__pyx_n_u_reduce_ex, __pyx_t_12) < (0)) __PYX_ERR(6, 1532, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/io.pxi":1547
 *         return py_buffer, (bufobj,)
 * 
 *     def to_pybytes(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return this buffer as a Python bytes object. Memory is copied.
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_6Buffer_23to_pybytes, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Buffer_to_pybytes, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[672])); if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 1547, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Buffer, __pyx_mstate_global->__pyx_n_u_to_pybytes, __pyx_t_12) < (0)) __PYX_ERR(6, 1547, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/io.pxi":1591
 *         self.init(<shared_ptr[CBuffer]> buffer)
 * 
 *     def resize(self, int64_t new_size, shrink_to_fit=False):             # <<<<<<<<<<<<<<
 *         """
 *         Resize buffer to indicated size.
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_15ResizableBuffer_1resize, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ResizableBuffer_resize, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[673])); if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 1591, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_12, __pyx_mstate_global->__pyx_tuple[21]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_ResizableBuffer, __pyx_mstate_global->__pyx_n_u_resize, __pyx_t_12) < (0)) __PYX_ERR(6, 1591, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/io.pxi":1615
 * 
 * 
 * def allocate_buffer(int64_t size, MemoryPool memory_pool=None,             # <<<<<<<<<<<<<<
 *                     resizable=False):
 *     """
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_245allocate_buffer, 0, __pyx_mstate_global->__pyx_n_u_allocate_buffer, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[674])); if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 1615, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_12, __pyx_mstate_global->__pyx_tuple[26]);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_allocate_buffer, __pyx_t_12) < (0)) __PYX_ERR(6, 1615, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/io.pxi":1682
 *         self.is_writable = True
 * 
 *     def getvalue(self):             # <<<<<<<<<<<<<<
 *         """
 *         Finalize output stream and return result as pyarrow.Buffer.
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_18BufferOutputStream_3getvalue, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_BufferOutputStream_getvalue, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[675])); if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 1682, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_BufferOutputStream, __pyx_mstate_global->__pyx_n_u_getvalue, __pyx_t_12) < (0)) __PYX_ERR(6, 1682, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_18BufferOutputStream_5__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_BufferOutputStream___reduce_cyth, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[676])); if (unlikely(!__pyx_t_12)) __PYX_ERR(7, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_12) < (0)) __PYX_ERR(7, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_18BufferOutputStream_7__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_BufferOutputStream___setstate_cy, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[677])); if (unlikely(!__pyx_t_12)) __PYX_ERR(7, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_12) < (0)) __PYX_ERR(7, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/io.pxi":1701
 *         self.is_writable = True
 * 
 *     def size(self):             # <<<<<<<<<<<<<<
 *         handle = <CMockOutputStream*> self.output_stream.get()
 *         return handle.GetExtentBytesWritten()
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_16MockOutputStream_3size, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_MockOutputStream_size, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[678])); if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 1701, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_MockOutputStream, __pyx_mstate_global->__pyx_n_u_size, __pyx_t_12) < (0)) __PYX_ERR(6, 1701, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_16MockOutputStream_5__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_MockOutputStream___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[679])); if (unlikely(!__pyx_t_12)) __PYX_ERR(7, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_12) < (0)) __PYX_ERR(7, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_16MockOutputStream_7__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_MockOutputStream___setstate_cyth, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[680])); if (unlikely(!__pyx_t_12)) __PYX_ERR(7, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_12) < (0)) __PYX_ERR(7, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_12BufferReader_5__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_BufferReader___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[681])); if (unlikely(!__pyx_t_12)) __PYX_ERR(7, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_12) < (0)) __PYX_ERR(7, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_12BufferReader_7__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_BufferReader___setstate_cython, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[682])); if (unlikely(!__pyx_t_12)) __PYX_ERR(7, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_12) < (0)) __PYX_ERR(7, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_21CompressedInputStream_3__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_CompressedInputStream___reduce_c, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[683])); if (unlikely(!__pyx_t_12)) __PYX_ERR(7, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_12) < (0)) __PYX_ERR(7, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_21CompressedInputStream_5__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_CompressedInputStream___setstate, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[684])); if (unlikely(!__pyx_t_12)) __PYX_ERR(7, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_12) < (0)) __PYX_ERR(7, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_22CompressedOutputStream_3__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_CompressedOutputStream___reduce, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[685])); if (unlikely(!__pyx_t_12)) __PYX_ERR(7, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_12) < (0)) __PYX_ERR(7, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_22CompressedOutputStream_5__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_CompressedOutputStream___setstat, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[686])); if (unlikely(!__pyx_t_12)) __PYX_ERR(7, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_12) < (0)) __PYX_ERR(7, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/io.pxi":1874
 *         self.is_readable = True
 * 
 *     def detach(self):             # <<<<<<<<<<<<<<
 *         """
 *         Release the raw InputStream.
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_19BufferedInputStream_3detach, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_BufferedInputStream_detach, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[687])); if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 1874, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_BufferedInputStream, __pyx_mstate_global->__pyx_n_u_detach, __pyx_t_12) < (0)) __PYX_ERR(6, 1874, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_19BufferedInputStream_5__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_BufferedInputStream___reduce_cyt, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[688])); if (unlikely(!__pyx_t_12)) __PYX_ERR(7, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_12) < (0)) __PYX_ERR(7, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_19BufferedInputStream_7__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_BufferedInputStream___setstate_c, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[689])); if (unlikely(!__pyx_t_12)) __PYX_ERR(7, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_12) < (0)) __PYX_ERR(7, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/io.pxi":1938
 *         self.is_writable = True
 * 
 *     def detach(self):             # <<<<<<<<<<<<<<
 *         """
 *         Flush any buffered writes and release the raw OutputStream.
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_20BufferedOutputStream_3detach, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_BufferedOutputStream_detach, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[690])); if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 1938, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_BufferedOutputStream, __pyx_mstate_global->__pyx_n_u_detach, __pyx_t_12) < (0)) __PYX_ERR(6, 1938, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_20BufferedOutputStream_5__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_BufferedOutputStream___reduce_cy, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[691])); if (unlikely(!__pyx_t_12)) __PYX_ERR(7, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_12) < (0)) __PYX_ERR(7, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_20BufferedOutputStream_7__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_BufferedOutputStream___setstate, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[692])); if (unlikely(!__pyx_t_12)) __PYX_ERR(7, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_12) < (0)) __PYX_ERR(7, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_20TransformInputStream_3__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_TransformInputStream___reduce_cy, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[693])); if (unlikely(!__pyx_t_12)) __PYX_ERR(7, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_12) < (0)) __PYX_ERR(7, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_20TransformInputStream_5__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_TransformInputStream___setstate, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[694])); if (unlikely(!__pyx_t_12)) __PYX_ERR(7, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_12) < (0)) __PYX_ERR(7, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/io.pxi":2001
 * 
 * 
 * class Transcoder:             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, decoder, encoder):
*/
  __pyx_t_12 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_mstate_global->__pyx_empty_tuple, __pyx_mstate_global->__pyx_n_u_Transcoder, __pyx_mstate_global->__pyx_n_u_Transcoder, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, (PyObject *) NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 2001, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);

  /* "pyarrow/io.pxi":2003
 * class Transcoder:
 * 
 *     def __init__(self, decoder, encoder):             # <<<<<<<<<<<<<<
 *         self._decoder = decoder
 *         self._encoder = encoder
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_10Transcoder_1__init__, 0, __pyx_mstate_global->__pyx_n_u_Transcoder___init, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[695])); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 2003, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_4) < (0)) __PYX_ERR(6, 2003, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyarrow/io.pxi":2007
 *         self._encoder = encoder
 * 
 *     def __call__(self, buf):             # <<<<<<<<<<<<<<
 *         final = len(buf) == 0
 *         return self._encoder.encode(self._decoder.decode(buf, final), final)
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_10Transcoder_3__call__, 0, __pyx_mstate_global->__pyx_n_u_Transcoder___call, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[696])); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 2007, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_call, __pyx_t_4) < (0)) __PYX_ERR(6, 2007, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyarrow/io.pxi":2001
 * 
 * 
 * class Transcoder:             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, decoder, encoder):
*/
  __pyx_t_4 = __Pyx_Py3ClassCreate(((PyObject*)&PyType_Type), __pyx_mstate_global->__pyx_n_u_Transcoder, __pyx_mstate_global->__pyx_empty_tuple, __pyx_t_12, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 2001, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Transcoder, __pyx_t_4) < (0)) __PYX_ERR(6, 2001, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/io.pxi":2039
 * 
 * 
 * def transcoding_input_stream(stream, src_encoding, dest_encoding):             # <<<<<<<<<<<<<<
 *     """
 *     Add a transcoding transformation to the stream.
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_247transcoding_input_stream, 0, __pyx_mstate_global->__pyx_n_u_transcoding_input_stream, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[697])); if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 2039, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_transcoding_input_stream, __pyx_t_12) < (0)) __PYX_ERR(6, 2039, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/io.pxi":2079
 * 
 * 
 * def py_buffer(object obj):             # <<<<<<<<<<<<<<
 *     """
 *     Construct an Arrow buffer from a Python bytes-like or buffer-like object
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_249py_buffer, 0, __pyx_mstate_global->__pyx_n_u_py_buffer, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[698])); if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 2079, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_py_buffer, __pyx_t_12) < (0)) __PYX_ERR(6, 2079, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/io.pxi":2093
 * 
 * 
 * def foreign_buffer(address, size, base=None):             # <<<<<<<<<<<<<<
 *     """
 *     Construct an Arrow buffer with the given *address* and *size*.
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_251foreign_buffer, 0, __pyx_mstate_global->__pyx_n_u_foreign_buffer, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[699])); if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 2093, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_12, __pyx_mstate_global->__pyx_tuple[7]);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_foreign_buffer, __pyx_t_12) < (0)) __PYX_ERR(6, 2093, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/io.pxi":2124
 * 
 * 
 * def as_buffer(object o):             # <<<<<<<<<<<<<<
 *     if isinstance(o, Buffer):
 *         return o
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_253as_buffer, 0, __pyx_mstate_global->__pyx_n_u_as_buffer, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[700])); if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 2124, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_as_buffer, __pyx_t_12) < (0)) __PYX_ERR(6, 2124, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/io.pxi":2217
 * 
 * 
 * def _detect_compression(path):             # <<<<<<<<<<<<<<
 *     if isinstance(path, str):
 *         if path.endswith('.bz2'):
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_255_detect_compression, 0, __pyx_mstate_global->__pyx_n_u_detect_compression, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[701])); if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 2217, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_detect_compression, __pyx_t_12) < (0)) __PYX_ERR(6, 2217, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/io.pxi":2335
 *             return False
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_network_metrics(time_to_first_byte_millis, transfer_bandwidth_mib_per_sec,
 *                              ideal_bandwidth_utilization_frac=0.9, max_ideal_request_size_mib=64):
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_12CacheOptions_5from_network_metrics, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_CacheOptions_from_network_metric, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[702])); if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 2335, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_12, __pyx_mstate_global->__pyx_tuple[47]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_CacheOptions, __pyx_mstate_global->__pyx_n_u_from_network_metrics, __pyx_t_12) < (0)) __PYX_ERR(6, 2335, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __pyx_t_4 = NULL;
  __Pyx_GetNameInClass(__pyx_t_6, (PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_CacheOptions, __pyx_mstate_global->__pyx_n_u_from_network_metrics); if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 2335, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_10 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_6};
    __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_staticmethod, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 2335, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
  }
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_CacheOptions, __pyx_mstate_global->__pyx_n_u_from_network_metrics, __pyx_t_12) < (0)) __PYX_ERR(6, 2335, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/io.pxi":2366
 *             ideal_bandwidth_utilization_frac, max_ideal_request_size_mib))
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def _reconstruct(kwargs):
 *         # __reduce__ doesn't allow passing named arguments directly to the
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_12CacheOptions_7_reconstruct, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_CacheOptions__reconstruct, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[703])); if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 2366, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_CacheOptions, __pyx_mstate_global->__pyx_n_u_reconstruct, __pyx_t_12) < (0)) __PYX_ERR(6, 2366, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __pyx_t_6 = NULL;
  __Pyx_GetNameInClass(__pyx_t_4, (PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_CacheOptions, __pyx_mstate_global->__pyx_n_u_reconstruct); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 2366, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_10 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_4};
    __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_staticmethod, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 2366, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
  }
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_CacheOptions, __pyx_mstate_global->__pyx_n_u_reconstruct, __pyx_t_12) < (0)) __PYX_ERR(6, 2366, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/io.pxi":2372
 *         return CacheOptions(**kwargs)
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         kwargs = dict(
 *             hole_size_limit=self.hole_size_limit,
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_12CacheOptions_9__reduce__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_CacheOptions___reduce, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[704])); if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 2372, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_CacheOptions, __pyx_mstate_global->__pyx_n_u_reduce, __pyx_t_12) < (0)) __PYX_ERR(6, 2372, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/io.pxi":2456
 *         return self.wrapped.get()
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def detect(path):
 *         """
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_5Codec_3detect, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Codec_detect, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[705])); if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 2456, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Codec, __pyx_mstate_global->__pyx_n_u_detect, __pyx_t_12) < (0)) __PYX_ERR(6, 2456, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __pyx_t_4 = NULL;
  __Pyx_GetNameInClass(__pyx_t_6, (PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Codec, __pyx_mstate_global->__pyx_n_u_detect); if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 2456, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_10 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_6};
    __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_staticmethod, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 2456, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
  }
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Codec, __pyx_mstate_global->__pyx_n_u_detect, __pyx_t_12) < (0)) __PYX_ERR(6, 2456, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/io.pxi":2479
 *         return Codec(_detect_compression(_stringify_path(path)))
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def is_available(str compression not None):
 *         """
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_5Codec_5is_available, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Codec_is_available, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[706])); if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 2479, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Codec, __pyx_mstate_global->__pyx_n_u_is_available, __pyx_t_12) < (0)) __PYX_ERR(6, 2479, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __pyx_t_6 = NULL;
  __Pyx_GetNameInClass(__pyx_t_4, (PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Codec, __pyx_mstate_global->__pyx_n_u_is_available); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 2479, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_10 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_4};
    __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_staticmethod, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 2479, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
  }
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Codec, __pyx_mstate_global->__pyx_n_u_is_available, __pyx_t_12) < (0)) __PYX_ERR(6, 2479, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/io.pxi":2497
 *         return CCodec.IsAvailable(typ)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def supports_compression_level(str compression not None):
 *         """
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_5Codec_7supports_compression_level, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Codec_supports_compression_level, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[707])); if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 2497, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Codec, __pyx_mstate_global->__pyx_n_u_supports_compression_level, __pyx_t_12) < (0)) __PYX_ERR(6, 2497, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __pyx_t_4 = NULL;
  __Pyx_GetNameInClass(__pyx_t_6, (PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Codec, __pyx_mstate_global->__pyx_n_u_supports_compression_level); if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 2497, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_10 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_6};
    __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_staticmethod, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 2497, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
  }
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Codec, __pyx_mstate_global->__pyx_n_u_supports_compression_level, __pyx_t_12) < (0)) __PYX_ERR(6, 2497, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/io.pxi":2512
 *         return CCodec.SupportsCompressionLevel(typ)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def default_compression_level(str compression not None):
 *         """
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_5Codec_9default_compression_level, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Codec_default_compression_level, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[708])); if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 2512, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Codec, __pyx_mstate_global->__pyx_n_u_default_compression_level, __pyx_t_12) < (0)) __PYX_ERR(6, 2512, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __pyx_t_6 = NULL;
  __Pyx_GetNameInClass(__pyx_t_4, (PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Codec, __pyx_mstate_global->__pyx_n_u_default_compression_level); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 2512, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_10 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_4};
    __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_staticmethod, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 2512, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
  }
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Codec, __pyx_mstate_global->__pyx_n_u_default_compression_level, __pyx_t_12) < (0)) __PYX_ERR(6, 2512, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/io.pxi":2527
 *         return GetResultValue(CCodec.DefaultCompressionLevel(typ))
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def minimum_compression_level(str compression not None):
 *         """
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_5Codec_11minimum_compression_level, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Codec_minimum_compression_level, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[709])); if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 2527, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Codec, __pyx_mstate_global->__pyx_n_u_minimum_compression_level, __pyx_t_12) < (0)) __PYX_ERR(6, 2527, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __pyx_t_4 = NULL;
  __Pyx_GetNameInClass(__pyx_t_6, (PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Codec, __pyx_mstate_global->__pyx_n_u_minimum_compression_level); if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 2527, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_10 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_6};
    __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_staticmethod, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 2527, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
  }
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Codec, __pyx_mstate_global->__pyx_n_u_minimum_compression_level, __pyx_t_12) < (0)) __PYX_ERR(6, 2527, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/io.pxi":2541
 *         return GetResultValue(CCodec.MinimumCompressionLevel(typ))
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def maximum_compression_level(str compression not None):
 *         """
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_5Codec_13maximum_compression_level, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Codec_maximum_compression_level, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[710])); if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 2541, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Codec, __pyx_mstate_global->__pyx_n_u_maximum_compression_level, __pyx_t_12) < (0)) __PYX_ERR(6, 2541, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __pyx_t_6 = NULL;
  __Pyx_GetNameInClass(__pyx_t_4, (PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Codec, __pyx_mstate_global->__pyx_n_u_maximum_compression_level); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 2541, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_10 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_4};
    __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_staticmethod, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 2541, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
  }
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Codec, __pyx_mstate_global->__pyx_n_u_maximum_compression_level, __pyx_t_12) < (0)) __PYX_ERR(6, 2541, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/io.pxi":2567
 *         return self.unwrap().compression_level()
 * 
 *     def compress(self, object buf, asbytes=False, memory_pool=None):             # <<<<<<<<<<<<<<
 *         """
 *         Compress data from buffer-like object.
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_5Codec_15compress, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Codec_compress, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[711])); if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 2567, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_12, __pyx_mstate_global->__pyx_tuple[48]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Codec, __pyx_mstate_global->__pyx_n_u_compress, __pyx_t_12) < (0)) __PYX_ERR(6, 2567, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/io.pxi":2625
 *             return out_buf
 * 
 *     def decompress(self, object buf, decompressed_size=None, asbytes=False,             # <<<<<<<<<<<<<<
 *                    memory_pool=None):
 *         """
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_5Codec_17decompress, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Codec_decompress, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[712])); if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 2625, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_12, __pyx_mstate_global->__pyx_tuple[43]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Codec, __pyx_mstate_global->__pyx_n_u_decompress, __pyx_t_12) < (0)) __PYX_ERR(6, 2625, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.wrapped cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_5Codec_21__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Codec___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[713])); if (unlikely(!__pyx_t_12)) __PYX_ERR(7, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_12) < (0)) __PYX_ERR(7, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "self.wrapped cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.wrapped cannot be converted to a Python object for pickling"
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_5Codec_23__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Codec___setstate_cython, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[714])); if (unlikely(!__pyx_t_12)) __PYX_ERR(7, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_12) < (0)) __PYX_ERR(7, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/io.pxi":2687
 * 
 * 
 * def compress(object buf, codec='lz4', asbytes=False, memory_pool=None):             # <<<<<<<<<<<<<<
 *     """
 *     Compress data from buffer-like object.
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_257compress, 0, __pyx_mstate_global->__pyx_n_u_compress, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[715])); if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 2687, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_12, __pyx_mstate_global->__pyx_tuple[49]);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_compress, __pyx_t_12) < (0)) __PYX_ERR(6, 2687, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/io.pxi":2710
 * 
 * 
 * def decompress(object buf, decompressed_size=None, codec='lz4',             # <<<<<<<<<<<<<<
 *                asbytes=False, memory_pool=None):
 *     """
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_259decompress, 0, __pyx_mstate_global->__pyx_n_u_decompress, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[716])); if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 2710, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_12, __pyx_mstate_global->__pyx_tuple[50]);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_decompress, __pyx_t_12) < (0)) __PYX_ERR(6, 2710, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/io.pxi":2738
 * 
 * 
 * def input_stream(source, compression='detect', buffer_size=None):             # <<<<<<<<<<<<<<
 *     """
 *     Create an Arrow input stream.
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_261input_stream, 0, __pyx_mstate_global->__pyx_n_u_input_stream, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[717])); if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 2738, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_12, __pyx_mstate_global->__pyx_tuple[51]);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_input_stream, __pyx_t_12) < (0)) __PYX_ERR(6, 2738, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/io.pxi":2824
 * 
 * 
 * def output_stream(source, compression='detect', buffer_size=None):             # <<<<<<<<<<<<<<
 *     """
 *     Create an Arrow output stream.
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_263output_stream, 0, __pyx_mstate_global->__pyx_n_u_output_stream, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[718])); if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 2824, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_12, __pyx_mstate_global->__pyx_tuple[51]);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_output_stream, __pyx_t_12) < (0)) __PYX_ERR(6, 2824, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/ipc.pxi":20
 * from cpython.pycapsule cimport PyCapsule_CheckExact, PyCapsule_GetPointer, PyCapsule_New
 * 
 * from collections import namedtuple             # <<<<<<<<<<<<<<
 * import warnings
 * from cython import sizeof
*/
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_namedtuple};
    __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_collections, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 20, __pyx_L1_error)
  }
  __pyx_t_12 = __pyx_t_1;
  __Pyx_GOTREF(__pyx_t_12);
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_namedtuple};
    __pyx_t_3 = 0; {
      __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_12, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(19, 20, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(19, 20, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/ipc.pxi":21
 * 
 * from collections import namedtuple
 * import warnings             # <<<<<<<<<<<<<<
 * from cython import sizeof
 * 
*/
  __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_warnings, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 21, __pyx_L1_error)
  __pyx_t_12 = __pyx_t_1;
  __Pyx_GOTREF(__pyx_t_12);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_warnings, __pyx_t_12) < (0)) __PYX_ERR(19, 21, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/ipc.pxi":71
 * 
 * 
 * _WriteStats = namedtuple(             # <<<<<<<<<<<<<<
 *     'WriteStats',
 *     ('num_messages', 'num_record_batches', 'num_dictionary_batches',
*/
  __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_namedtuple); if (unlikely(!__pyx_t_12)) __PYX_ERR(19, 71, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);

  /* "pyarrow/ipc.pxi":73
 * _WriteStats = namedtuple(
 *     'WriteStats',
 *     ('num_messages', 'num_record_batches', 'num_dictionary_batches',             # <<<<<<<<<<<<<<
 *      'num_dictionary_deltas', 'num_replaced_dictionaries'))
 * 
*/
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_mstate_global->__pyx_tuple[53], NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(19, 71, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_WriteStats_2, __pyx_t_4) < (0)) __PYX_ERR(19, 71, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyarrow/ipc.pxi":77
 * 
 * 
 * class WriteStats(_WriteStats):             # <<<<<<<<<<<<<<
 *     """IPC write statistics
 * 
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_WriteStats_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(19, 77, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_12 = PyTuple_Pack(1, __pyx_t_4); if (unlikely(!__pyx_t_12)) __PYX_ERR(19, 77, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_12); if (unlikely(!__pyx_t_4)) __PYX_ERR(19, 77, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(19, 77, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_Py3MetaclassPrepare(__pyx_t_6, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_WriteStats, __pyx_mstate_global->__pyx_n_u_WriteStats, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_kp_u_IPC_write_statistics_Parameters); if (unlikely(!__pyx_t_7)) __PYX_ERR(19, 77, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (__pyx_t_4 != __pyx_t_12) {
    if (unlikely((PyDict_SetItemString(__pyx_t_7, "__orig_bases__", __pyx_t_12) < 0))) __PYX_ERR(19, 77, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/ipc.pxi":93
 *         Number of replaced dictionaries.
 *     """
 *     __slots__ = ()             # <<<<<<<<<<<<<<
 * 
 * 
*/
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_slots, __pyx_mstate_global->__pyx_empty_tuple) < (0)) __PYX_ERR(19, 93, __pyx_L1_error)

  /* "pyarrow/ipc.pxi":77
 * 
 * 
 * class WriteStats(_WriteStats):             # <<<<<<<<<<<<<<
 *     """IPC write statistics
 * 
*/
  __pyx_t_12 = __Pyx_Py3ClassCreate(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_WriteStats, __pyx_t_4, __pyx_t_7, NULL, 0, 0); if (unlikely(!__pyx_t_12)) __PYX_ERR(19, 77, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_WriteStats, __pyx_t_12) < (0)) __PYX_ERR(19, 77, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyarrow/ipc.pxi":103
 * 
 * 
 * _ReadStats = namedtuple(             # <<<<<<<<<<<<<<
 *     'ReadStats',
 *     ('num_messages', 'num_record_batches', 'num_dictionary_batches',
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_namedtuple); if (unlikely(!__pyx_t_4)) __PYX_ERR(19, 103, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "pyarrow/ipc.pxi":105
 * _ReadStats = namedtuple(
 *     'ReadStats',
 *     ('num_messages', 'num_record_batches', 'num_dictionary_batches',             # <<<<<<<<<<<<<<
 *      'num_dictionary_deltas', 'num_replaced_dictionaries'))
 * 
*/
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[54], NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(19, 103, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_ReadStats_2, __pyx_t_6) < (0)) __PYX_ERR(19, 103, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyarrow/ipc.pxi":109
 * 
 * 
 * class ReadStats(_ReadStats):             # <<<<<<<<<<<<<<
 *     """IPC read statistics
 * 
*/
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_ReadStats_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(19, 109, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_4 = PyTuple_Pack(1, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(19, 109, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PEP560_update_bases(__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(19, 109, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_CalculateMetaclass(NULL, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(19, 109, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_12 = __Pyx_Py3MetaclassPrepare(__pyx_t_7, __pyx_t_6, __pyx_mstate_global->__pyx_n_u_ReadStats, __pyx_mstate_global->__pyx_n_u_ReadStats, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_kp_u_IPC_read_statistics_Parameters_n); if (unlikely(!__pyx_t_12)) __PYX_ERR(19, 109, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  if (__pyx_t_6 != __pyx_t_4) {
    if (unlikely((PyDict_SetItemString(__pyx_t_12, "__orig_bases__", __pyx_t_4) < 0))) __PYX_ERR(19, 109, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyarrow/ipc.pxi":125
 *         Number of replaced dictionaries.
 *     """
 *     __slots__ = ()             # <<<<<<<<<<<<<<
 * 
 * 
*/
  if (__Pyx_SetNameInClass(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_slots, __pyx_mstate_global->__pyx_empty_tuple) < (0)) __PYX_ERR(19, 125, __pyx_L1_error)

  /* "pyarrow/ipc.pxi":109
 * 
 * 
 * class ReadStats(_ReadStats):             # <<<<<<<<<<<<<<
 *     """IPC read statistics
 * 
*/
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_ReadStats, __pyx_t_6, __pyx_t_12, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(19, 109, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_ReadStats, __pyx_t_4) < (0)) __PYX_ERR(19, 109, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyarrow/ipc.pxi":154
 *         the top-level schema
 *     """
 *     __slots__ = ()             # <<<<<<<<<<<<<<
 * 
 *     # cdef block is in lib.pxd
*/
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_IpcReadOptions, __pyx_mstate_global->__pyx_n_u_slots, __pyx_mstate_global->__pyx_empty_tuple) < (0)) __PYX_ERR(19, 154, __pyx_L1_error)

  /* "pyarrow/ipc.pxi":159
 * 
 *     def __init__(self, *, bint ensure_native_endian=True,
 *                  Alignment ensure_alignment=Alignment.Any,             # <<<<<<<<<<<<<<
 *                  bint use_threads=True, list included_fields=None):
 *         self.c_options = CIpcReadOptions.Defaults()
*/
  __pyx_mstate_global->__pyx_k__19 = __pyx_e_7pyarrow_3lib_Any;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.c_options cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
*/
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_14IpcReadOptions_5__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_IpcReadOptions___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[719])); if (unlikely(!__pyx_t_6)) __PYX_ERR(7, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_6);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_6) < (0)) __PYX_ERR(7, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "self.c_options cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.c_options cannot be converted to a Python object for pickling"
*/
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_14IpcReadOptions_7__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_IpcReadOptions___setstate_cython, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[720])); if (unlikely(!__pyx_t_6)) __PYX_ERR(7, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_6);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_6) < (0)) __PYX_ERR(7, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyarrow/ipc.pxi":263
 *         the IPC stream format can support replacement dictionaries.
 *     """
 *     __slots__ = ()             # <<<<<<<<<<<<<<
 * 
 *     # cdef block is in lib.pxd
*/
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_IpcWriteOptions, __pyx_mstate_global->__pyx_n_u_slots, __pyx_mstate_global->__pyx_empty_tuple) < (0)) __PYX_ERR(19, 263, __pyx_L1_error)

  /* "pyarrow/ipc.pxi":267
 *     # cdef block is in lib.pxd
 * 
 *     def __init__(self, *, metadata_version=MetadataVersion.V5,             # <<<<<<<<<<<<<<
 *                  bint allow_64bit=False, use_legacy_format=False,
 *                  compression=None, bint use_threads=True,
*/
  __pyx_t_6 = __Pyx_Enum_7pyarrow_3lib_enum__dunderpyx_t_7pyarrow_3lib_MetadataVersion_to_py(__pyx_e_7pyarrow_3lib_V5); if (unlikely(!__pyx_t_6)) __PYX_ERR(19, 267, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_mstate_global->__pyx_k__20 = __pyx_t_6;
  __Pyx_GIVEREF(__pyx_t_6);
  __pyx_t_6 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.c_options cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
*/
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_15IpcWriteOptions_5__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_IpcWriteOptions___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[721])); if (unlikely(!__pyx_t_6)) __PYX_ERR(7, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_6);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_6) < (0)) __PYX_ERR(7, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "self.c_options cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.c_options cannot be converted to a Python object for pickling"
*/
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_15IpcWriteOptions_7__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_IpcWriteOptions___setstate_cytho, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[722])); if (unlikely(!__pyx_t_6)) __PYX_ERR(7, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_6);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_6) < (0)) __PYX_ERR(7, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyarrow/ipc.pxi":415
 *             return pyarrow_wrap_buffer(body)
 * 
 *     def equals(self, Message other):             # <<<<<<<<<<<<<<
 *         """
 *         Returns True if the message contents (metadata and body) are identical
*/
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_7Message_5equals, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Message_equals, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[723])); if (unlikely(!__pyx_t_6)) __PYX_ERR(19, 415, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_6);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Message, __pyx_mstate_global->__pyx_n_u_equals, __pyx_t_6) < (0)) __PYX_ERR(19, 415, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyarrow/ipc.pxi":432
 *         return result
 * 
 *     def serialize_to(self, NativeFile sink, alignment=8, memory_pool=None):             # <<<<<<<<<<<<<<
 *         """
 *         Write message to generic OutputStream
*/
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_7Message_7serialize_to, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Message_serialize_to, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[724])); if (unlikely(!__pyx_t_6)) __PYX_ERR(19, 432, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_6);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_6, __pyx_mstate_global->__pyx_tuple[55]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Message, __pyx_mstate_global->__pyx_n_u_serialize_to, __pyx_t_6) < (0)) __PYX_ERR(19, 432, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyarrow/ipc.pxi":455
 *                          .SerializeTo(out, options, &output_length))
 * 
 *     def serialize(self, alignment=8, memory_pool=None):             # <<<<<<<<<<<<<<
 *         """
 *         Write message as encapsulated IPC message
*/
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_7Message_9serialize, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Message_serialize, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[725])); if (unlikely(!__pyx_t_6)) __PYX_ERR(19, 455, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_6);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_6, __pyx_mstate_global->__pyx_tuple[55]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_Message, __pyx_mstate_global->__pyx_n_u_serialize, __pyx_t_6) < (0)) __PYX_ERR(19, 455, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
*/
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_7Message_13__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Message___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[726])); if (unlikely(!__pyx_t_6)) __PYX_ERR(7, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_6);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_6) < (0)) __PYX_ERR(7, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_7Message_15__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Message___setstate_cython, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[727])); if (unlikely(!__pyx_t_6)) __PYX_ERR(7, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_6);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_6) < (0)) __PYX_ERR(7, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyarrow/ipc.pxi":504
 *                         "instead.")
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def open_stream(source):
 *         """
*/
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_13MessageReader_5open_stream, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_MessageReader_open_stream, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[728])); if (unlikely(!__pyx_t_6)) __PYX_ERR(19, 504, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_6);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_MessageReader, __pyx_mstate_global->__pyx_n_u_open_stream, __pyx_t_6) < (0)) __PYX_ERR(19, 504, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_7 = NULL;
  __Pyx_GetNameInClass(__pyx_t_12, (PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_MessageReader, __pyx_mstate_global->__pyx_n_u_open_stream); if (unlikely(!__pyx_t_12)) __PYX_ERR(19, 504, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_10 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_12};
    __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_staticmethod, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(19, 504, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
  }
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_MessageReader, __pyx_mstate_global->__pyx_n_u_open_stream, __pyx_t_6) < (0)) __PYX_ERR(19, 504, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyarrow/ipc.pxi":533
 *         return self.read_next_message()
 * 
 *     def read_next_message(self):             # <<<<<<<<<<<<<<
 *         """
 *         Read next Message from the stream.
*/
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_13MessageReader_11read_next_message, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_MessageReader_read_next_message, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[729])); if (unlikely(!__pyx_t_6)) __PYX_ERR(19, 533, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_6);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_MessageReader, __pyx_mstate_global->__pyx_n_u_read_next_message, __pyx_t_6) < (0)) __PYX_ERR(19, 533, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
*/
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_13MessageReader_13__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_MessageReader___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[730])); if (unlikely(!__pyx_t_6)) __PYX_ERR(7, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_6);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_6) < (0)) __PYX_ERR(7, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_13MessageReader_15__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_MessageReader___setstate_cython, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[731])); if (unlikely(!__pyx_t_6)) __PYX_ERR(7, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_6);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_6) < (0)) __PYX_ERR(7, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyarrow/ipc.pxi":565
 *     # cdef block is in lib.pxd
 * 
 *     def write(self, table_or_batch):             # <<<<<<<<<<<<<<
 *         """
 *         Write RecordBatch or Table to stream.
*/
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_19_CRecordBatchWriter_1write, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_CRecordBatchWriter_write, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[732])); if (unlikely(!__pyx_t_6)) __PYX_ERR(19, 565, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_6);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__CRecordBatchWriter, __pyx_mstate_global->__pyx_n_u_write, __pyx_t_6) < (0)) __PYX_ERR(19, 565, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyarrow/ipc.pxi":580
 *             raise ValueError(type(table_or_batch))
 * 
 *     def write_batch(self, RecordBatch batch, custom_metadata=None):             # <<<<<<<<<<<<<<
 *         """
 *         Write RecordBatch to stream.
*/
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_19_CRecordBatchWriter_3write_batch, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_CRecordBatchWriter_write_batch, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[733])); if (unlikely(!__pyx_t_6)) __PYX_ERR(19, 580, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_6);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_6, __pyx_mstate_global->__pyx_tuple[7]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__CRecordBatchWriter, __pyx_mstate_global->__pyx_n_u_write_batch, __pyx_t_6) < (0)) __PYX_ERR(19, 580, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyarrow/ipc.pxi":597
 *                          .WriteRecordBatch(deref(batch.batch), c_meta))
 * 
 *     def write_table(self, Table table, max_chunksize=None):             # <<<<<<<<<<<<<<
 *         """
 *         Write Table to stream in (contiguous) RecordBatch objects.
*/
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_19_CRecordBatchWriter_5write_table, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_CRecordBatchWriter_write_table, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[734])); if (unlikely(!__pyx_t_6)) __PYX_ERR(19, 597, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_6);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_6, __pyx_mstate_global->__pyx_tuple[7]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__CRecordBatchWriter, __pyx_mstate_global->__pyx_n_u_write_table, __pyx_t_6) < (0)) __PYX_ERR(19, 597, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyarrow/ipc.pxi":619
 *                                                       c_max_chunksize))
 * 
 *     def close(self):             # <<<<<<<<<<<<<<
 *         """
 *         Close stream and write end-of-stream 0 marker.
*/
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_19_CRecordBatchWriter_7close, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_CRecordBatchWriter_close, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[735])); if (unlikely(!__pyx_t_6)) __PYX_ERR(19, 619, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_6);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__CRecordBatchWriter, __pyx_mstate_global->__pyx_n_u_close, __pyx_t_6) < (0)) __PYX_ERR(19, 619, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyarrow/ipc.pxi":626
 *             check_status(self.writer.get().Close())
 * 
 *     def __enter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
*/
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_19_CRecordBatchWriter_9__enter__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_CRecordBatchWriter___enter, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[736])); if (unlikely(!__pyx_t_6)) __PYX_ERR(19, 626, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_6);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__CRecordBatchWriter, __pyx_mstate_global->__pyx_n_u_enter, __pyx_t_6) < (0)) __PYX_ERR(19, 626, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyarrow/ipc.pxi":629
 *         return self
 * 
 *     def __exit__(self, exc_type, exc_val, exc_tb):             # <<<<<<<<<<<<<<
 *         self.close()
 * 
*/
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_19_CRecordBatchWriter_11__exit__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_CRecordBatchWriter___exit, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[737])); if (unlikely(!__pyx_t_6)) __PYX_ERR(19, 629, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_6);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__CRecordBatchWriter, __pyx_mstate_global->__pyx_n_u_exit, __pyx_t_6) < (0)) __PYX_ERR(19, 629, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.writer cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
*/
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_19_CRecordBatchWriter_13__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_CRecordBatchWriter___reduce_cyt, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[738])); if (unlikely(!__pyx_t_6)) __PYX_ERR(7, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_6);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_6) < (0)) __PYX_ERR(7, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "self.writer cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.writer cannot be converted to a Python object for pickling"
*/
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_19_CRecordBatchWriter_15__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_CRecordBatchWriter___setstate_c, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[739])); if (unlikely(!__pyx_t_6)) __PYX_ERR(7, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_6);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_6) < (0)) __PYX_ERR(7, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyarrow/ipc.pxi":664
 * 
 *     def _open(self, sink, Schema schema not None,
 *               IpcWriteOptions options=IpcWriteOptions()):             # <<<<<<<<<<<<<<
 *         cdef:
 *             shared_ptr[COutputStream] c_sink
*/
  __pyx_t_12 = NULL;
  __pyx_t_10 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_12, NULL};
    __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_IpcWriteOptions, __pyx_callargs+__pyx_t_10, (1-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(19, 664, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_6);
  }
  __pyx_mstate_global->__pyx_k__23 = ((struct __pyx_obj_7pyarrow_3lib_IpcWriteOptions *)__pyx_t_6);
  __Pyx_GIVEREF((PyObject *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "pyarrow/ipc.pxi":663
 *         return _wrap_metadata_version(self.options.metadata_version)
 * 
 *     def _open(self, sink, Schema schema not None,             # <<<<<<<<<<<<<<
 *               IpcWriteOptions options=IpcWriteOptions()):
 *         cdef:
*/
  __pyx_t_12 = NULL;

  /* "pyarrow/ipc.pxi":664
 * 
 *     def _open(self, sink, Schema schema not None,
 *               IpcWriteOptions options=IpcWriteOptions()):             # <<<<<<<<<<<<<<
 *         cdef:
 *             shared_ptr[COutputStream] c_sink
*/
  __pyx_t_10 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_12, NULL};
    __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_IpcWriteOptions, __pyx_callargs+__pyx_t_10, (1-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(19, 664, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_6);
  }

  /* "pyarrow/ipc.pxi":663
 *         return _wrap_metadata_version(self.options.metadata_version)
 * 
 *     def _open(self, sink, Schema schema not None,             # <<<<<<<<<<<<<<
 *               IpcWriteOptions options=IpcWriteOptions()):
 *         cdef:
*/
  __pyx_t_12 = PyTuple_Pack(1, ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_12)) __PYX_ERR(19, 663, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_DECREF((PyObject *)__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_24_RecordBatchStreamWriter_5_open, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_RecordBatchStreamWriter__open, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[740])); if (unlikely(!__pyx_t_6)) __PYX_ERR(19, 663, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_6);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_6, __pyx_t_12);
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__RecordBatchStreamWriter, __pyx_mstate_global->__pyx_n_u_open_2, __pyx_t_6) < (0)) __PYX_ERR(19, 663, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
*/
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_24_RecordBatchStreamWriter_7__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_RecordBatchStreamWriter___reduc, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[741])); if (unlikely(!__pyx_t_6)) __PYX_ERR(7, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_6);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_6) < (0)) __PYX_ERR(7, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_24_RecordBatchStreamWriter_9__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_RecordBatchStreamWriter___setst, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[742])); if (unlikely(!__pyx_t_6)) __PYX_ERR(7, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_6);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_6) < (0)) __PYX_ERR(7, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyarrow/ipc.pxi":686
 * 
 * 
 * class _ReadPandasMixin:             # <<<<<<<<<<<<<<
 * 
 *     def read_pandas(self, **options):
*/
  __pyx_t_6 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_mstate_global->__pyx_empty_tuple, __pyx_mstate_global->__pyx_n_u_ReadPandasMixin, __pyx_mstate_global->__pyx_n_u_ReadPandasMixin, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, (PyObject *) NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(19, 686, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "pyarrow/ipc.pxi":688
 * class _ReadPandasMixin:
 * 
 *     def read_pandas(self, **options):             # <<<<<<<<<<<<<<
 *         """
 *         Read contents of stream to a pandas.DataFrame.
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_16_ReadPandasMixin_1read_pandas, 0, __pyx_mstate_global->__pyx_n_u_ReadPandasMixin_read_pandas, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[743])); if (unlikely(!__pyx_t_12)) __PYX_ERR(19, 688, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_read_pandas, __pyx_t_12) < (0)) __PYX_ERR(19, 688, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/ipc.pxi":686
 * 
 * 
 * class _ReadPandasMixin:             # <<<<<<<<<<<<<<
 * 
 *     def read_pandas(self, **options):
*/
  __pyx_t_12 = __Pyx_Py3ClassCreate(((PyObject*)&PyType_Type), __pyx_mstate_global->__pyx_n_u_ReadPandasMixin, __pyx_mstate_global->__pyx_empty_tuple, __pyx_t_6, NULL, 0, 0); if (unlikely(!__pyx_t_12)) __PYX_ERR(19, 686, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_ReadPandasMixin, __pyx_t_12) < (0)) __PYX_ERR(19, 686, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyarrow/ipc.pxi":775
 *         return pyarrow_wrap_schema(c_schema)
 * 
 *     def read_next_batch(self):             # <<<<<<<<<<<<<<
 *         """
 *         Read next RecordBatch from the stream.
*/
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_17RecordBatchReader_7read_next_batch, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_RecordBatchReader_read_next_batc, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[744])); if (unlikely(!__pyx_t_6)) __PYX_ERR(19, 775, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_6);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RecordBatchReader, __pyx_mstate_global->__pyx_n_u_read_next_batch, __pyx_t_6) < (0)) __PYX_ERR(19, 775, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyarrow/ipc.pxi":798
 *         return pyarrow_wrap_batch(batch)
 * 
 *     def read_next_batch_with_custom_metadata(self):             # <<<<<<<<<<<<<<
 *         """
 *         Read next RecordBatch from the stream along with its custom metadata.
*/
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_17RecordBatchReader_9read_next_batch_with_custom_metadata, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_RecordBatchReader_read_next_batc_2, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[745])); if (unlikely(!__pyx_t_6)) __PYX_ERR(19, 798, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_6);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RecordBatchReader, __pyx_mstate_global->__pyx_n_u_read_next_batch_with_custom_meta, __pyx_t_6) < (0)) __PYX_ERR(19, 798, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyarrow/ipc.pxi":823
 *         return _wrap_record_batch_with_metadata(batch_with_metadata)
 * 
 *     def iter_batches_with_custom_metadata(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterate over record batches from the stream along with their custom
*/
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_17RecordBatchReader_11iter_batches_with_custom_metadata, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_RecordBatchReader_iter_batches_w, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[26])); if (unlikely(!__pyx_t_6)) __PYX_ERR(19, 823, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_6);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RecordBatchReader, __pyx_mstate_global->__pyx_n_u_iter_batches_with_custom_metadat, __pyx_t_6) < (0)) __PYX_ERR(19, 823, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyarrow/ipc.pxi":838
 *                 return
 * 
 *     def read_all(self):             # <<<<<<<<<<<<<<
 *         """
 *         Read all record batches as a pyarrow.Table.
*/
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_17RecordBatchReader_14read_all, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_RecordBatchReader_read_all, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[746])); if (unlikely(!__pyx_t_6)) __PYX_ERR(19, 838, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_6);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RecordBatchReader, __pyx_mstate_global->__pyx_n_u_read_all, __pyx_t_6) < (0)) __PYX_ERR(19, 838, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyarrow/ipc.pxi":851
 *         return pyarrow_wrap_table(table)
 * 
 *     read_pandas = _ReadPandasMixin.read_pandas             # <<<<<<<<<<<<<<
 * 
 *     def close(self):
*/
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_ReadPandasMixin); if (unlikely(!__pyx_t_6)) __PYX_ERR(19, 851, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_read_pandas); if (unlikely(!__pyx_t_12)) __PYX_ERR(19, 851, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RecordBatchReader, __pyx_mstate_global->__pyx_n_u_read_pandas, __pyx_t_12) < (0)) __PYX_ERR(19, 851, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/ipc.pxi":853
 *     read_pandas = _ReadPandasMixin.read_pandas
 * 
 *     def close(self):             # <<<<<<<<<<<<<<
 *         """
 *         Release any resources associated with the reader.
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_17RecordBatchReader_16close, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_RecordBatchReader_close, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[747])); if (unlikely(!__pyx_t_12)) __PYX_ERR(19, 853, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RecordBatchReader, __pyx_mstate_global->__pyx_n_u_close, __pyx_t_12) < (0)) __PYX_ERR(19, 853, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/ipc.pxi":860
 *             check_status(self.reader.get().Close())
 * 
 *     def __enter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_17RecordBatchReader_18__enter__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_RecordBatchReader___enter, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[748])); if (unlikely(!__pyx_t_12)) __PYX_ERR(19, 860, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RecordBatchReader, __pyx_mstate_global->__pyx_n_u_enter, __pyx_t_12) < (0)) __PYX_ERR(19, 860, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/ipc.pxi":863
 *         return self
 * 
 *     def __exit__(self, exc_type, exc_val, exc_tb):             # <<<<<<<<<<<<<<
 *         self.close()
 * 
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_17RecordBatchReader_20__exit__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_RecordBatchReader___exit, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[749])); if (unlikely(!__pyx_t_12)) __PYX_ERR(19, 863, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RecordBatchReader, __pyx_mstate_global->__pyx_n_u_exit, __pyx_t_12) < (0)) __PYX_ERR(19, 863, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/ipc.pxi":866
 *         self.close()
 * 
 *     def cast(self, target_schema):             # <<<<<<<<<<<<<<
 *         """
 *         Wrap this reader with one that casts each batch lazily as it is pulled.
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_17RecordBatchReader_22cast, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_RecordBatchReader_cast, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[750])); if (unlikely(!__pyx_t_12)) __PYX_ERR(19, 866, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RecordBatchReader, __pyx_mstate_global->__pyx_n_u_cast, __pyx_t_12) < (0)) __PYX_ERR(19, 866, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/ipc.pxi":898
 *         return out
 * 
 *     def _export_to_c(self, out_ptr):             # <<<<<<<<<<<<<<
 *         """
 *         Export to a C ArrowArrayStream struct, given its pointer.
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_17RecordBatchReader_24_export_to_c, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_RecordBatchReader__export_to_c, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[751])); if (unlikely(!__pyx_t_12)) __PYX_ERR(19, 898, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RecordBatchReader, __pyx_mstate_global->__pyx_n_u_export_to_c, __pyx_t_12) < (0)) __PYX_ERR(19, 898, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/ipc.pxi":917
 *                 self.reader, <ArrowArrayStream*> c_ptr))
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def _import_from_c(in_ptr):
 *         """
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_17RecordBatchReader_26_import_from_c, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_RecordBatchReader__import_from_c, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[752])); if (unlikely(!__pyx_t_12)) __PYX_ERR(19, 917, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RecordBatchReader, __pyx_mstate_global->__pyx_n_u_import_from_c, __pyx_t_12) < (0)) __PYX_ERR(19, 917, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __pyx_t_6 = NULL;
  __Pyx_GetNameInClass(__pyx_t_7, (PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RecordBatchReader, __pyx_mstate_global->__pyx_n_u_import_from_c); if (unlikely(!__pyx_t_7)) __PYX_ERR(19, 917, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_10 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_7};
    __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_staticmethod, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_12)) __PYX_ERR(19, 917, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
  }
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RecordBatchReader, __pyx_mstate_global->__pyx_n_u_import_from_c, __pyx_t_12) < (0)) __PYX_ERR(19, 917, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/ipc.pxi":943
 *         return self
 * 
 *     def __arrow_c_stream__(self, requested_schema=None):             # <<<<<<<<<<<<<<
 *         """
 *         Export to a C ArrowArrayStream PyCapsule.
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_17RecordBatchReader_28__arrow_c_stream__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_RecordBatchReader___arrow_c_stre, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[753])); if (unlikely(!__pyx_t_12)) __PYX_ERR(19, 943, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_12, __pyx_mstate_global->__pyx_tuple[7]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RecordBatchReader, __pyx_mstate_global->__pyx_n_u_arrow_c_stream, __pyx_t_12) < (0)) __PYX_ERR(19, 943, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/ipc.pxi":974
 *         return stream_capsule
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def _import_from_c_capsule(stream):
 *         """
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_17RecordBatchReader_30_import_from_c_capsule, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_RecordBatchReader__import_from_c_2, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[754])); if (unlikely(!__pyx_t_12)) __PYX_ERR(19, 974, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RecordBatchReader, __pyx_mstate_global->__pyx_n_u_import_from_c_capsule, __pyx_t_12) < (0)) __PYX_ERR(19, 974, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __pyx_t_7 = NULL;
  __Pyx_GetNameInClass(__pyx_t_6, (PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RecordBatchReader, __pyx_mstate_global->__pyx_n_u_import_from_c_capsule); if (unlikely(!__pyx_t_6)) __PYX_ERR(19, 974, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_10 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_6};
    __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_staticmethod, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_12)) __PYX_ERR(19, 974, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
  }
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RecordBatchReader, __pyx_mstate_global->__pyx_n_u_import_from_c_capsule, __pyx_t_12) < (0)) __PYX_ERR(19, 974, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/ipc.pxi":1004
 *         return self
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_stream(data, schema=None):
 *         """
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_17RecordBatchReader_32from_stream, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_RecordBatchReader_from_stream, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[755])); if (unlikely(!__pyx_t_12)) __PYX_ERR(19, 1004, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_12, __pyx_mstate_global->__pyx_tuple[7]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RecordBatchReader, __pyx_mstate_global->__pyx_n_u_from_stream, __pyx_t_12) < (0)) __PYX_ERR(19, 1004, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __pyx_t_6 = NULL;
  __Pyx_GetNameInClass(__pyx_t_7, (PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RecordBatchReader, __pyx_mstate_global->__pyx_n_u_from_stream); if (unlikely(!__pyx_t_7)) __PYX_ERR(19, 1004, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_10 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_7};
    __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_staticmethod, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_12)) __PYX_ERR(19, 1004, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
  }
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RecordBatchReader, __pyx_mstate_global->__pyx_n_u_from_stream, __pyx_t_12) < (0)) __PYX_ERR(19, 1004, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/ipc.pxi":1047
 *         return RecordBatchReader._import_from_c_capsule(capsule)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_batches(Schema schema not None, batches):
 *         """
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_17RecordBatchReader_34from_batches, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_RecordBatchReader_from_batches, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[756])); if (unlikely(!__pyx_t_12)) __PYX_ERR(19, 1047, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RecordBatchReader, __pyx_mstate_global->__pyx_n_u_from_batches, __pyx_t_12) < (0)) __PYX_ERR(19, 1047, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __pyx_t_7 = NULL;
  __Pyx_GetNameInClass(__pyx_t_6, (PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RecordBatchReader, __pyx_mstate_global->__pyx_n_u_from_batches); if (unlikely(!__pyx_t_6)) __PYX_ERR(19, 1047, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_10 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_6};
    __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_staticmethod, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_12)) __PYX_ERR(19, 1047, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
  }
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_RecordBatchReader, __pyx_mstate_global->__pyx_n_u_from_batches, __pyx_t_12) < (0)) __PYX_ERR(19, 1047, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.reader cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_17RecordBatchReader_36__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_RecordBatchReader___reduce_cytho, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[757])); if (unlikely(!__pyx_t_12)) __PYX_ERR(7, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_12) < (0)) __PYX_ERR(7, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "self.reader cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.reader cannot be converted to a Python object for pickling"
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_17RecordBatchReader_38__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_RecordBatchReader___setstate_cyt, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[758])); if (unlikely(!__pyx_t_12)) __PYX_ERR(7, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_12) < (0)) __PYX_ERR(7, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/ipc.pxi":1086
 *         pass
 * 
 *     def _open(self, source, IpcReadOptions options=IpcReadOptions(),             # <<<<<<<<<<<<<<
 *               MemoryPool memory_pool=None):
 *         self.options = options.c_options
*/
  __pyx_t_6 = NULL;
  __pyx_t_10 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
    __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_IpcReadOptions, __pyx_callargs+__pyx_t_10, (1-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_12)) __PYX_ERR(19, 1086, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_12);
  }
  __pyx_mstate_global->__pyx_k__24 = ((struct __pyx_obj_7pyarrow_3lib_IpcReadOptions *)__pyx_t_12);
  __Pyx_GIVEREF((PyObject *)__pyx_t_12);
  __pyx_t_12 = 0;
  __pyx_t_6 = NULL;
  __pyx_t_10 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
    __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_IpcReadOptions, __pyx_callargs+__pyx_t_10, (1-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_12)) __PYX_ERR(19, 1086, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_12);
  }

  /* "pyarrow/ipc.pxi":1087
 * 
 *     def _open(self, source, IpcReadOptions options=IpcReadOptions(),
 *               MemoryPool memory_pool=None):             # <<<<<<<<<<<<<<
 *         self.options = options.c_options
 *         self.options.memory_pool = maybe_unbox_memory_pool(memory_pool)
*/
  __pyx_t_6 = PyTuple_Pack(2, ((PyObject *)__pyx_t_12), Py_None); if (unlikely(!__pyx_t_6)) __PYX_ERR(19, 1086, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF((PyObject *)__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/ipc.pxi":1086
 *         pass
 * 
 *     def _open(self, source, IpcReadOptions options=IpcReadOptions(),             # <<<<<<<<<<<<<<
 *               MemoryPool memory_pool=None):
 *         self.options = options.c_options
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_24_RecordBatchStreamReader_3_open, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_RecordBatchStreamReader__open, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[759])); if (unlikely(!__pyx_t_12)) __PYX_ERR(19, 1086, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_12, __pyx_t_6);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__RecordBatchStreamReader, __pyx_mstate_global->__pyx_n_u_open_2, __pyx_t_12) < (0)) __PYX_ERR(19, 1086, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_24_RecordBatchStreamReader_5__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_RecordBatchStreamReader___reduc, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[760])); if (unlikely(!__pyx_t_12)) __PYX_ERR(7, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_12) < (0)) __PYX_ERR(7, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_24_RecordBatchStreamReader_7__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_RecordBatchStreamReader___setst, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[761])); if (unlikely(!__pyx_t_12)) __PYX_ERR(7, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_12) < (0)) __PYX_ERR(7, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/ipc.pxi":1109
 * 
 *     def _open(self, sink, Schema schema not None,
 *               IpcWriteOptions options=IpcWriteOptions(),             # <<<<<<<<<<<<<<
 *               metadata=None):
 *         cdef:
*/
  __pyx_t_6 = NULL;
  __pyx_t_10 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
    __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_IpcWriteOptions, __pyx_callargs+__pyx_t_10, (1-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_12)) __PYX_ERR(19, 1109, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_12);
  }
  __pyx_mstate_global->__pyx_k__25 = ((struct __pyx_obj_7pyarrow_3lib_IpcWriteOptions *)__pyx_t_12);
  __Pyx_GIVEREF((PyObject *)__pyx_t_12);
  __pyx_t_12 = 0;

  /* "pyarrow/ipc.pxi":1108
 * cdef class _RecordBatchFileWriter(_RecordBatchStreamWriter):
 * 
 *     def _open(self, sink, Schema schema not None,             # <<<<<<<<<<<<<<
 *               IpcWriteOptions options=IpcWriteOptions(),
 *               metadata=None):
*/
  __pyx_t_6 = NULL;

  /* "pyarrow/ipc.pxi":1109
 * 
 *     def _open(self, sink, Schema schema not None,
 *               IpcWriteOptions options=IpcWriteOptions(),             # <<<<<<<<<<<<<<
 *               metadata=None):
 *         cdef:
*/
  __pyx_t_10 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
    __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_IpcWriteOptions, __pyx_callargs+__pyx_t_10, (1-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_12)) __PYX_ERR(19, 1109, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_12);
  }

  /* "pyarrow/ipc.pxi":1108
 * cdef class _RecordBatchFileWriter(_RecordBatchStreamWriter):
 * 
 *     def _open(self, sink, Schema schema not None,             # <<<<<<<<<<<<<<
 *               IpcWriteOptions options=IpcWriteOptions(),
 *               metadata=None):
*/
  __pyx_t_6 = PyTuple_Pack(2, ((PyObject *)__pyx_t_12), Py_None); if (unlikely(!__pyx_t_6)) __PYX_ERR(19, 1108, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF((PyObject *)__pyx_t_12); __pyx_t_12 = 0;
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_22_RecordBatchFileWriter_1_open, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_RecordBatchFileWriter__open, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[762])); if (unlikely(!__pyx_t_12)) __PYX_ERR(19, 1108, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_12, __pyx_t_6);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__RecordBatchFileWriter, __pyx_mstate_global->__pyx_n_u_open_2, __pyx_t_12) < (0)) __PYX_ERR(19, 1108, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_22_RecordBatchFileWriter_3__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_RecordBatchFileWriter___reduce, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[763])); if (unlikely(!__pyx_t_12)) __PYX_ERR(7, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_12) < (0)) __PYX_ERR(7, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_22_RecordBatchFileWriter_5__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_RecordBatchFileWriter___setstat, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[764])); if (unlikely(!__pyx_t_12)) __PYX_ERR(7, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_12) < (0)) __PYX_ERR(7, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/ipc.pxi":1125
 *                 MakeFileWriter(c_sink, schema.sp_schema, self.options, c_meta))
 * 
 * _RecordBatchWithMetadata = namedtuple(             # <<<<<<<<<<<<<<
 *     'RecordBatchWithMetadata',
 *     ('batch', 'custom_metadata'))
*/
  __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_namedtuple); if (unlikely(!__pyx_t_12)) __PYX_ERR(19, 1125, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);

  /* "pyarrow/ipc.pxi":1127
 * _RecordBatchWithMetadata = namedtuple(
 *     'RecordBatchWithMetadata',
 *     ('batch', 'custom_metadata'))             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_mstate_global->__pyx_tuple[57], NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(19, 1125, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_RecordBatchWithMetadata_2, __pyx_t_6) < (0)) __PYX_ERR(19, 1125, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyarrow/ipc.pxi":1130
 * 
 * 
 * class RecordBatchWithMetadata(_RecordBatchWithMetadata):             # <<<<<<<<<<<<<<
 *     """RecordBatch with its custom metadata
 * 
*/
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_RecordBatchWithMetadata_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(19, 1130, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_12 = PyTuple_Pack(1, __pyx_t_6); if (unlikely(!__pyx_t_12)) __PYX_ERR(19, 1130, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PEP560_update_bases(__pyx_t_12); if (unlikely(!__pyx_t_6)) __PYX_ERR(19, 1130, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_CalculateMetaclass(NULL, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(19, 1130, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_7, __pyx_t_6, __pyx_mstate_global->__pyx_n_u_RecordBatchWithMetadata, __pyx_mstate_global->__pyx_n_u_RecordBatchWithMetadata, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_kp_u_RecordBatch_with_its_custom_meta); if (unlikely(!__pyx_t_4)) __PYX_ERR(19, 1130, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__pyx_t_6 != __pyx_t_12) {
    if (unlikely((PyDict_SetItemString(__pyx_t_4, "__orig_bases__", __pyx_t_12) < 0))) __PYX_ERR(19, 1130, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "pyarrow/ipc.pxi":1138
 *     custom_metadata : KeyValueMetadata
 *     """
 *     __slots__ = ()             # <<<<<<<<<<<<<<
 * 
 * 
*/
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_slots, __pyx_mstate_global->__pyx_empty_tuple) < (0)) __PYX_ERR(19, 1138, __pyx_L1_error)

  /* "pyarrow/ipc.pxi":1130
 * 
 * 
 * class RecordBatchWithMetadata(_RecordBatchWithMetadata):             # <<<<<<<<<<<<<<
 *     """RecordBatch with its custom metadata
 * 
*/
  __pyx_t_12 = __Pyx_Py3ClassCreate(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_RecordBatchWithMetadata, __pyx_t_6, __pyx_t_4, NULL, 0, 0); if (unlikely(!__pyx_t_12)) __PYX_ERR(19, 1130, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_RecordBatchWithMetadata, __pyx_t_12) < (0)) __PYX_ERR(19, 1130, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyarrow/ipc.pxi":1160
 * 
 *     def _open(self, source, footer_offset=None,
 *               IpcReadOptions options=IpcReadOptions(),             # <<<<<<<<<<<<<<
 *               MemoryPool memory_pool=None):
 *         self.options = options.c_options
*/
  __pyx_t_7 = NULL;
  __pyx_t_10 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL};
    __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_IpcReadOptions, __pyx_callargs+__pyx_t_10, (1-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(19, 1160, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_6);
  }
  __pyx_mstate_global->__pyx_k__26 = ((struct __pyx_obj_7pyarrow_3lib_IpcReadOptions *)__pyx_t_6);
  __Pyx_GIVEREF((PyObject *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "pyarrow/ipc.pxi":1159
 *         pass
 * 
 *     def _open(self, source, footer_offset=None,             # <<<<<<<<<<<<<<
 *               IpcReadOptions options=IpcReadOptions(),
 *               MemoryPool memory_pool=None):
*/
  __pyx_t_7 = NULL;

  /* "pyarrow/ipc.pxi":1160
 * 
 *     def _open(self, source, footer_offset=None,
 *               IpcReadOptions options=IpcReadOptions(),             # <<<<<<<<<<<<<<
 *               MemoryPool memory_pool=None):
 *         self.options = options.c_options
*/
  __pyx_t_10 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL};
    __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib_IpcReadOptions, __pyx_callargs+__pyx_t_10, (1-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(19, 1160, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_6);
  }

  /* "pyarrow/ipc.pxi":1159
 *         pass
 * 
 *     def _open(self, source, footer_offset=None,             # <<<<<<<<<<<<<<
 *               IpcReadOptions options=IpcReadOptions(),
 *               MemoryPool memory_pool=None):
*/
  __pyx_t_7 = PyTuple_Pack(3, Py_None, ((PyObject *)__pyx_t_6), Py_None); if (unlikely(!__pyx_t_7)) __PYX_ERR(19, 1159, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF((PyObject *)__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_22_RecordBatchFileReader_3_open, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_RecordBatchFileReader__open, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[765])); if (unlikely(!__pyx_t_6)) __PYX_ERR(19, 1159, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_6);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_6, __pyx_t_7);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__RecordBatchFileReader, __pyx_mstate_global->__pyx_n_u_open_2, __pyx_t_6) < (0)) __PYX_ERR(19, 1159, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyarrow/ipc.pxi":1195
 *         return self.reader.get().num_record_batches()
 * 
 *     def get_batch(self, int i):             # <<<<<<<<<<<<<<
 *         """
 *         Read the record batch with the given index.
*/
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_22_RecordBatchFileReader_5get_batch, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_RecordBatchFileReader_get_batch, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[766])); if (unlikely(!__pyx_t_6)) __PYX_ERR(19, 1195, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_6);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__RecordBatchFileReader, __pyx_mstate_global->__pyx_n_u_get_batch, __pyx_t_6) < (0)) __PYX_ERR(19, 1195, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyarrow/ipc.pxi":1220
 *     # TODO(wesm): ARROW-503: Function was renamed. Remove after a period of
 *     # time has passed
 *     get_record_batch = get_batch             # <<<<<<<<<<<<<<
 * 
 *     def get_batch_with_custom_metadata(self, int i):
*/
  __Pyx_GetNameInClass(__pyx_t_6, (PyObject*)__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__RecordBatchFileReader, __pyx_mstate_global->__pyx_n_u_get_batch); if (unlikely(!__pyx_t_6)) __PYX_ERR(19, 1220, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__RecordBatchFileReader, __pyx_mstate_global->__pyx_n_u_get_record_batch, __pyx_t_6) < (0)) __PYX_ERR(19, 1220, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyarrow/ipc.pxi":1222
 *     get_record_batch = get_batch
 * 
 *     def get_batch_with_custom_metadata(self, int i):             # <<<<<<<<<<<<<<
 *         """
 *         Read the record batch with the given index along with
*/
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_22_RecordBatchFileReader_7get_batch_with_custom_metadata, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_RecordBatchFileReader_get_batch_2, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[767])); if (unlikely(!__pyx_t_6)) __PYX_ERR(19, 1222, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_6);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__RecordBatchFileReader, __pyx_mstate_global->__pyx_n_u_get_batch_with_custom_metadata, __pyx_t_6) < (0)) __PYX_ERR(19, 1222, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyarrow/ipc.pxi":1249
 *         return _wrap_record_batch_with_metadata(batch_with_metadata)
 * 
 *     def read_all(self):             # <<<<<<<<<<<<<<
 *         """
 *         Read all record batches as a pyarrow.Table
*/
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_22_RecordBatchFileReader_9read_all, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_RecordBatchFileReader_read_all, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[768])); if (unlikely(!__pyx_t_6)) __PYX_ERR(19, 1249, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_6);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__RecordBatchFileReader, __pyx_mstate_global->__pyx_n_u_read_all, __pyx_t_6) < (0)) __PYX_ERR(19, 1249, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyarrow/ipc.pxi":1270
 *         return pyarrow_wrap_table(table)
 * 
 *     read_pandas = _ReadPandasMixin.read_pandas             # <<<<<<<<<<<<<<
 * 
 *     def __enter__(self):
*/
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_ReadPandasMixin); if (unlikely(!__pyx_t_6)) __PYX_ERR(19, 1270, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_read_pandas); if (unlikely(!__pyx_t_7)) __PYX_ERR(19, 1270, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__RecordBatchFileReader, __pyx_mstate_global->__pyx_n_u_read_pandas, __pyx_t_7) < (0)) __PYX_ERR(19, 1270, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/ipc.pxi":1272
 *     read_pandas = _ReadPandasMixin.read_pandas
 * 
 *     def __enter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_22_RecordBatchFileReader_11__enter__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_RecordBatchFileReader___enter, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[769])); if (unlikely(!__pyx_t_7)) __PYX_ERR(19, 1272, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__RecordBatchFileReader, __pyx_mstate_global->__pyx_n_u_enter, __pyx_t_7) < (0)) __PYX_ERR(19, 1272, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/ipc.pxi":1275
 *         return self
 * 
 *     def __exit__(self, exc_type, exc_value, traceback):             # <<<<<<<<<<<<<<
 *         pass
 * 
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_22_RecordBatchFileReader_13__exit__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_RecordBatchFileReader___exit, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[770])); if (unlikely(!__pyx_t_7)) __PYX_ERR(19, 1275, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7pyarrow_3lib__RecordBatchFileReader, __pyx_mstate_global->__pyx_n_u_exit, __pyx_t_7) < (0)) __PYX_ERR(19, 1275, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_22_RecordBatchFileReader_15__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_RecordBatchFileReader___reduce, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[771])); if (unlikely(!__pyx_t_7)) __PYX_ERR(7, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_7) < (0)) __PYX_ERR(7, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_22_RecordBatchFileReader_17__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_RecordBatchFileReader___setstat, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[772])); if (unlikely(!__pyx_t_7)) __PYX_ERR(7, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_7) < (0)) __PYX_ERR(7, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/ipc.pxi":1297
 * 
 * 
 * def get_tensor_size(Tensor tensor):             # <<<<<<<<<<<<<<
 *     """
 *     Return total size of serialized Tensor including metadata and padding.
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_265get_tensor_size, 0, __pyx_mstate_global->__pyx_n_u_get_tensor_size, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[773])); if (unlikely(!__pyx_t_7)) __PYX_ERR(19, 1297, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_tensor_size, __pyx_t_7) < (0)) __PYX_ERR(19, 1297, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/ipc.pxi":1312
 * 
 * 
 * def get_record_batch_size(RecordBatch batch):             # <<<<<<<<<<<<<<
 *     """
 *     Return total size of serialized RecordBatch including metadata and padding.
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_267get_record_batch_size, 0, __pyx_mstate_global->__pyx_n_u_get_record_batch_size, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[774])); if (unlikely(!__pyx_t_7)) __PYX_ERR(19, 1312, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_record_batch_size, __pyx_t_7) < (0)) __PYX_ERR(19, 1312, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/ipc.pxi":1327
 * 
 * 
 * def write_tensor(Tensor tensor, NativeFile dest):             # <<<<<<<<<<<<<<
 *     """
 *     Write pyarrow.Tensor to pyarrow.NativeFile object its current position.
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_269write_tensor, 0, __pyx_mstate_global->__pyx_n_u_write_tensor, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[775])); if (unlikely(!__pyx_t_7)) __PYX_ERR(19, 1327, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_write_tensor, __pyx_t_7) < (0)) __PYX_ERR(19, 1327, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/ipc.pxi":1368
 * 
 * 
 * def read_tensor(source):             # <<<<<<<<<<<<<<
 *     """Read pyarrow.Tensor from pyarrow.NativeFile object from current
 *     position. If the file source supports zero copy (e.g. a memory map), then
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_271read_tensor, 0, __pyx_mstate_global->__pyx_n_u_read_tensor, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[776])); if (unlikely(!__pyx_t_7)) __PYX_ERR(19, 1368, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_read_tensor, __pyx_t_7) < (0)) __PYX_ERR(19, 1368, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/ipc.pxi":1394
 * 
 * 
 * def read_message(source):             # <<<<<<<<<<<<<<
 *     """
 *     Read length-prefixed message from file or buffer-like object
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_273read_message, 0, __pyx_mstate_global->__pyx_n_u_read_message, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[777])); if (unlikely(!__pyx_t_7)) __PYX_ERR(19, 1394, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_read_message, __pyx_t_7) < (0)) __PYX_ERR(19, 1394, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/ipc.pxi":1423
 * 
 * 
 * def read_schema(obj, DictionaryMemo dictionary_memo=None):             # <<<<<<<<<<<<<<
 *     """
 *     Read Schema from message or buffer
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_275read_schema, 0, __pyx_mstate_global->__pyx_n_u_read_schema, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[778])); if (unlikely(!__pyx_t_7)) __PYX_ERR(19, 1423, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_mstate_global->__pyx_tuple[7]);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_read_schema, __pyx_t_7) < (0)) __PYX_ERR(19, 1423, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/ipc.pxi":1463
 * 
 * 
 * def read_record_batch(obj, Schema schema,             # <<<<<<<<<<<<<<
 *                       DictionaryMemo dictionary_memo=None):
 *     """
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_277read_record_batch, 0, __pyx_mstate_global->__pyx_n_u_read_record_batch, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[779])); if (unlikely(!__pyx_t_7)) __PYX_ERR(19, 1463, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_mstate_global->__pyx_tuple[7]);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_read_record_batch, __pyx_t_7) < (0)) __PYX_ERR(19, 1463, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/benchmark.pxi":19
 * 
 * 
 * def benchmark_PandasObjectIsNull(list obj):             # <<<<<<<<<<<<<<
 *     Benchmark_PandasObjectIsNull(obj)
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_279benchmark_PandasObjectIsNull, 0, __pyx_mstate_global->__pyx_n_u_benchmark_PandasObjectIsNull, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[780])); if (unlikely(!__pyx_t_7)) __PYX_ERR(20, 19, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_benchmark_PandasObjectIsNull, __pyx_t_7) < (0)) __PYX_ERR(20, 19, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "(tree fragment)":4
 *     int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1
 *     int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1
 * def __pyx_unpickle__PandasAPIShim(__pyx_type, long __pyx_checksum, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_result
 *     __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x3ec5c35, 0x39e7a8b, 0xda37436, b'_array_like_types, _categorical_type, _compat_module, _data_frame, _datetimetz_type, _extension_array, _extension_dtype, _have_pandas, _index, _is_extension_array_dtype, _is_ge_v21, _is_ge_v23, _is_ge_v3, _is_ge_v3_strict, _is_v1, _lock, _loose_version, _pd, _pd024, _series, _tried_importing_pandas, _types_api, _version, has_sparse')
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_281__pyx_unpickle__PandasAPIShim, 0, __pyx_mstate_global->__pyx_n_u_pyx_unpickle__PandasAPIShim, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[781])); if (unlikely(!__pyx_t_7)) __PYX_ERR(7, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_unpickle__PandasAPIShim, __pyx_t_7) < (0)) __PYX_ERR(7, 4, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "(tree fragment)":1
 * cdef extern from *:             # <<<<<<<<<<<<<<
 *     int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1
 *     int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_283__pyx_unpickle__PandasConvertible, 0, __pyx_mstate_global->__pyx_n_u_pyx_unpickle__PandasConvertibl, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[782])); if (unlikely(!__pyx_t_7)) __PYX_ERR(7, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_unpickle__PandasConvertibl, __pyx_t_7) < (0)) __PYX_ERR(7, 4, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "(tree fragment)":4
 *     int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1
 *     int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1
 * def __pyx_unpickle__Tabular(__pyx_type, long __pyx_checksum, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_result
 *     __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'')
*/
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7pyarrow_3lib_285__pyx_unpickle__Tabular, 0, __pyx_mstate_global->__pyx_n_u_pyx_unpickle__Tabular, NULL, __pyx_mstate_global->__pyx_n_u_pyarrow_lib, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[783])); if (unlikely(!__pyx_t_7)) __PYX_ERR(7, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_unpickle__Tabular, __pyx_t_7) < (0)) __PYX_ERR(7, 4, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyarrow/lib.pyx":1
 * # Licensed to the Apache Software Foundation (ASF) under one             # <<<<<<<<<<<<<<
 * # or more contributor license agreements.  See the NOTICE file
 * # distributed with this work for additional information
*/
  __pyx_t_7 = __Pyx_PyDict_NewPresized(259); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_default_memory_pool_line_146, __pyx_mstate_global->__pyx_kp_u_Return_the_process_global_memor) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_DataType_bit_width___get___line, __pyx_mstate_global->__pyx_kp_u_Bit_width_for_fixed_width_type) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_DataType_byte_width___get___line, __pyx_mstate_global->__pyx_kp_u_Byte_width_for_fixed_width_type) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_DataType_num_fields___get___line, __pyx_mstate_global->__pyx_kp_u_The_number_of_child_fields_Exam) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_DataType_num_buffers___get___lin, __pyx_mstate_global->__pyx_kp_u_Number_of_data_buffers_required) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_DataType_has_variadic_buffers, __pyx_mstate_global->__pyx_kp_u_If_True_the_number_of_expected) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_DataType_equals_line_370, __pyx_mstate_global->__pyx_kp_u_Return_true_if_type_is_equivale) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_DataType_to_pandas_dtype_line_40, __pyx_mstate_global->__pyx_kp_u_Return_the_equivalent_NumPy_Pan) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_DictionaryType_ordered___get___l, __pyx_mstate_global->__pyx_kp_u_Whether_the_dictionary_is_order) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_DictionaryType_index_type___get, __pyx_mstate_global->__pyx_kp_u_The_data_type_of_dictionary_ind) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_DictionaryType_value_type___get, __pyx_mstate_global->__pyx_kp_u_The_dictionary_value_type_The_d) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_ListType_value_field___get___lin, __pyx_mstate_global->__pyx_kp_u_The_field_for_list_values_Examp) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_ListType_value_type___get___line, __pyx_mstate_global->__pyx_kp_u_The_data_type_of_list_values_Ex) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_LargeListType_value_type___get, __pyx_mstate_global->__pyx_kp_u_The_data_type_of_large_list_val) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_ListViewType_value_field___get, __pyx_mstate_global->__pyx_kp_u_The_field_for_list_view_values) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_ListViewType_value_type___get, __pyx_mstate_global->__pyx_kp_u_The_data_type_of_list_view_valu) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_LargeListViewType_value_field, __pyx_mstate_global->__pyx_kp_u_The_field_for_large_list_view_v) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_LargeListViewType_value_type___g, __pyx_mstate_global->__pyx_kp_u_The_data_type_of_large_list_vie) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_MapType_key_field___get___line_7, __pyx_mstate_global->__pyx_kp_u_The_field_for_keys_in_the_map_e) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_MapType_key_type___get___line_76, __pyx_mstate_global->__pyx_kp_u_The_data_type_of_keys_in_the_ma) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_MapType_item_field___get___line, __pyx_mstate_global->__pyx_kp_u_The_field_for_items_in_the_map) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_MapType_item_type___get___line_7, __pyx_mstate_global->__pyx_kp_u_The_data_type_of_items_in_the_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_MapType_keys_sorted___get___line, __pyx_mstate_global->__pyx_kp_u_Should_the_entries_be_sorted_ac) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_FixedSizeListType_value_field, __pyx_mstate_global->__pyx_kp_u_The_field_for_list_values_Examp_2) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_FixedSizeListType_value_type___g, __pyx_mstate_global->__pyx_kp_u_The_data_type_of_large_list_val_2) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_FixedSizeListType_list_size___ge, __pyx_mstate_global->__pyx_kp_u_The_size_of_the_fixed_size_list) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_StructType_get_field_index_line, __pyx_mstate_global->__pyx_kp_u_Return_index_of_the_unique_fiel) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_StructType_field_line_979, __pyx_mstate_global->__pyx_kp_u_Select_a_field_by_its_column_na) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_StructType_get_all_field_indices_2, __pyx_mstate_global->__pyx_kp_u_Return_sorted_list_of_indices_f) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_StructType_names___get___line_10, __pyx_mstate_global->__pyx_kp_u_Lists_the_field_names_Examples) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_StructType_fields___get___line_1, __pyx_mstate_global->__pyx_kp_u_Lists_all_fields_within_the_Str) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_UnionType_mode___get___line_1121, __pyx_mstate_global->__pyx_kp_u_The_mode_of_the_union_dense_or) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_UnionType_type_codes___get___lin, __pyx_mstate_global->__pyx_kp_u_The_type_code_to_indicate_each) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_UnionType_field_line_1169, __pyx_mstate_global->__pyx_kp_u_Return_a_child_field_by_its_num) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_TimestampType_unit___get___line, __pyx_mstate_global->__pyx_kp_u_The_timestamp_unit_s_ms_us_or_n) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_TimestampType_tz___get___line_12, __pyx_mstate_global->__pyx_kp_u_The_timestamp_time_zone_if_any) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_Time32Type_unit___get___line_132, __pyx_mstate_global->__pyx_kp_u_The_time_unit_s_or_ms_Examples) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_Time64Type_unit___get___line_135, __pyx_mstate_global->__pyx_kp_u_The_time_unit_us_or_ns_Examples) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_DurationType_unit___get___line_1, __pyx_mstate_global->__pyx_kp_u_The_duration_unit_s_ms_us_or_ns) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_Decimal32Type_precision___get, __pyx_mstate_global->__pyx_kp_u_The_decimal_precision_in_number) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_Decimal32Type_scale___get___line, __pyx_mstate_global->__pyx_kp_u_The_decimal_scale_an_integer_Ex) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_Decimal64Type_precision___get, __pyx_mstate_global->__pyx_kp_u_The_decimal_precision_in_number_2) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_Decimal64Type_scale___get___line, __pyx_mstate_global->__pyx_kp_u_The_decimal_scale_an_integer_Ex_2) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_Decimal128Type_precision___get, __pyx_mstate_global->__pyx_kp_u_The_decimal_precision_in_number_3) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_Decimal128Type_scale___get___lin, __pyx_mstate_global->__pyx_kp_u_The_decimal_scale_an_integer_Ex_3) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_Decimal256Type_precision___get, __pyx_mstate_global->__pyx_kp_u_The_decimal_precision_in_number_4) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_Decimal256Type_scale___get___lin, __pyx_mstate_global->__pyx_kp_u_The_decimal_scale_an_integer_Ex_4) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_register_extension_type_line_216, __pyx_mstate_global->__pyx_kp_u_Register_a_Python_extension_typ) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_unregister_extension_type_line_2, __pyx_mstate_global->__pyx_kp_u_Unregister_a_Python_extension_t) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_Field_equals_line_2497, __pyx_mstate_global->__pyx_kp_u_Test_if_this_field_is_equal_to) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_Field_nullable___get___line_2541, __pyx_mstate_global->__pyx_kp_u_The_field_nullability_Examples) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_Field_name___get___line_2558, __pyx_mstate_global->__pyx_kp_u_The_field_name_Examples_import) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_Field_metadata___get___line_2572, __pyx_mstate_global->__pyx_kp_u_The_field_metadata_if_any_is_se) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_Field_with_metadata_line_2595, __pyx_mstate_global->__pyx_kp_u_Add_metadata_as_dict_of_string) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_Field_remove_metadata_line_2629, __pyx_mstate_global->__pyx_kp_u_Create_new_field_without_metada) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_Field_with_type_line_2655, __pyx_mstate_global->__pyx_kp_u_A_copy_of_this_field_with_the_r) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_Field_with_name_line_2690, __pyx_mstate_global->__pyx_kp_u_A_copy_of_this_field_with_the_r_2) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_Field_with_nullable_line_2722, __pyx_mstate_global->__pyx_kp_u_A_copy_of_this_field_with_the_r_3) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_Field_flatten_line_2761, __pyx_mstate_global->__pyx_kp_u_Flatten_this_field_If_a_struct) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_Schema_pandas_metadata___get___l, __pyx_mstate_global->__pyx_kp_u_Return_deserialized_from_JSON_p) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_Schema_names___get___line_2959, __pyx_mstate_global->__pyx_kp_u_The_schema_s_field_names_Return) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_Schema_types___get___line_2987, __pyx_mstate_global->__pyx_kp_u_The_schema_s_field_types_Return) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_Schema_metadata___get___line_301, __pyx_mstate_global->__pyx_kp_u_The_schema_s_metadata_if_any_is) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_Schema_empty_table_line_3044, __pyx_mstate_global->__pyx_kp_u_Provide_an_empty_table_accordin) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_Schema_equals_line_3072, __pyx_mstate_global->__pyx_kp_u_Test_if_this_schema_is_equal_to) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_Schema_from_pandas_line_3111, __pyx_mstate_global->__pyx_kp_u_Returns_implied_schema_from_dat) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_Schema_field_line_3157, __pyx_mstate_global->__pyx_kp_u_Select_a_field_by_its_column_na_2) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_Schema_get_field_index_line_3241, __pyx_mstate_global->__pyx_kp_u_Return_index_of_the_unique_fiel_2) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_Schema_get_all_field_indices_lin, __pyx_mstate_global->__pyx_kp_u_Return_sorted_list_of_indices_f_2) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_Schema_append_line_3309, __pyx_mstate_global->__pyx_kp_u_Append_a_field_at_the_end_of_th) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_Schema_insert_line_3348, __pyx_mstate_global->__pyx_kp_u_Add_a_field_at_position_i_to_th) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_Schema_remove_line_3386, __pyx_mstate_global->__pyx_kp_u_Remove_the_field_at_index_i_fro) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_Schema_set_line_3417, __pyx_mstate_global->__pyx_kp_u_Replace_a_field_at_position_i_i) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_Schema_with_metadata_line_3467, __pyx_mstate_global->__pyx_kp_u_Add_metadata_as_dict_of_string_2) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_Schema_serialize_line_3503, __pyx_mstate_global->__pyx_kp_u_Write_Schema_to_Buffer_as_encap) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_Schema_remove_metadata_line_3537, __pyx_mstate_global->__pyx_kp_u_Create_new_schema_without_metad) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_field_line_3761, __pyx_mstate_global->__pyx_kp_u_Create_a_pyarrow_Field_instance) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_null_line_3858, __pyx_mstate_global->__pyx_kp_u_Create_instance_of_null_type_Ex) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_bool__line_3880, __pyx_mstate_global->__pyx_kp_u_Create_instance_of_boolean_type) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_uint8_line_3903, __pyx_mstate_global->__pyx_kp_u_Create_instance_of_unsigned_int) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_int8_line_3930, __pyx_mstate_global->__pyx_kp_u_Create_instance_of_signed_int8) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_uint16_line_3957, __pyx_mstate_global->__pyx_kp_u_Create_instance_of_unsigned_uin) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_int16_line_3984, __pyx_mstate_global->__pyx_kp_u_Create_instance_of_signed_int16) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_uint32_line_4011, __pyx_mstate_global->__pyx_kp_u_Create_instance_of_unsigned_uin_2) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_int32_line_4038, __pyx_mstate_global->__pyx_kp_u_Create_instance_of_signed_int32) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_uint64_line_4065, __pyx_mstate_global->__pyx_kp_u_Create_instance_of_unsigned_uin_3) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_int64_line_4092, __pyx_mstate_global->__pyx_kp_u_Create_instance_of_signed_int64) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_timestamp_line_4192, __pyx_mstate_global->__pyx_kp_u_Create_instance_of_timestamp_ty) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_time32_line_4251, __pyx_mstate_global->__pyx_kp_u_Create_instance_of_32_bit_time) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_time64_line_4294, __pyx_mstate_global->__pyx_kp_u_Create_instance_of_64_bit_time) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_duration_line_4337, __pyx_mstate_global->__pyx_kp_u_Create_instance_of_a_duration_t) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_month_day_nano_interval_line_438, __pyx_mstate_global->__pyx_kp_u_Create_instance_of_an_interval) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_date32_line_4408, __pyx_mstate_global->__pyx_kp_u_Create_instance_of_32_bit_date) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_date64_line_4429, __pyx_mstate_global->__pyx_kp_u_Create_instance_of_64_bit_date) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_float16_line_4450, __pyx_mstate_global->__pyx_kp_u_Create_half_precision_floating) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_float32_line_4484, __pyx_mstate_global->__pyx_kp_u_Create_single_precision_floatin) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_float64_line_4511, __pyx_mstate_global->__pyx_kp_u_Create_double_precision_floatin) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_decimal32_line_4538, __pyx_mstate_global->__pyx_kp_u_Create_decimal_type_with_precis) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_decimal64_line_4593, __pyx_mstate_global->__pyx_kp_u_Create_decimal_type_with_precis_2) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_decimal128_line_4648, __pyx_mstate_global->__pyx_kp_u_Create_decimal_type_with_precis_3) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_string_line_4734, __pyx_mstate_global->__pyx_kp_u_Create_UTF8_variable_length_str) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_utf8_line_4759, __pyx_mstate_global->__pyx_kp_u_Alias_for_string_Examples_Creat) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_binary_line_4784, __pyx_mstate_global->__pyx_kp_u_Create_variable_length_or_fixed) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_large_binary_line_4836, __pyx_mstate_global->__pyx_kp_u_Create_large_variable_length_bi) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_large_string_line_4864, __pyx_mstate_global->__pyx_kp_u_Create_large_UTF8_variable_leng) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_large_utf8_line_4894, __pyx_mstate_global->__pyx_kp_u_Alias_for_large_string_Examples) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_binary_view_line_4921, __pyx_mstate_global->__pyx_kp_u_Create_a_variable_length_binary) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_string_view_line_4936, __pyx_mstate_global->__pyx_kp_u_Create_UTF8_variable_length_str_2) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_list__line_4951, __pyx_mstate_global->__pyx_kp_u_Create_ListType_instance_from_c) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_large_list_line_5017, __pyx_mstate_global->__pyx_kp_u_Create_LargeListType_instance_f) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_list_view_line_5074, __pyx_mstate_global->__pyx_kp_u_Create_ListViewType_instance_fr) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_large_list_view_line_5112, __pyx_mstate_global->__pyx_kp_u_Create_LargeListViewType_instan) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_map__line_5150, __pyx_mstate_global->__pyx_kp_u_Create_MapType_instance_from_ke) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_dictionary_line_5225, __pyx_mstate_global->__pyx_kp_u_Dictionary_categorical_or_simpl) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_struct_line_5284, __pyx_mstate_global->__pyx_kp_u_Create_StructType_instance_from) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_json__line_5506, __pyx_mstate_global->__pyx_kp_u_Create_instance_of_JSON_extensi) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_fixed_shape_tensor_line_5559, __pyx_mstate_global->__pyx_kp_u_Create_instance_of_fixed_shape) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_bool8_line_5660, __pyx_mstate_global->__pyx_kp_u_Create_instance_of_bool8_extens) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_opaque_line_5703, __pyx_mstate_global->__pyx_kp_u_Create_instance_of_opaque_exten) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_schema_line_5855, __pyx_mstate_global->__pyx_kp_u_Construct_pyarrow_Schema_from_c) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_from_numpy_dtype_line_5948, __pyx_mstate_global->__pyx_kp_u_Convert_NumPy_dtype_to_pyarrow) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_scalar_line_1601, __pyx_mstate_global->__pyx_kp_u_Create_a_pyarrow_Scalar_instanc) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_array_line_129, __pyx_mstate_global->__pyx_kp_u_Create_pyarrow_Array_instance_f) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_nulls_line_408, __pyx_mstate_global->__pyx_kp_u_Create_a_strongly_typed_Array_i) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_repeat_line_458, __pyx_mstate_global->__pyx_kp_u_Create_an_Array_instance_whose) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_PandasConvertible_to_pandas_lin, __pyx_mstate_global->__pyx_kp_u_Convert_to_a_pandas_compatible) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_Array_diff_line_1102, __pyx_mstate_global->__pyx_kp_u_Compare_contents_of_this_array) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_BaseListArray_flatten_line_2535, __pyx_mstate_global->__pyx_kp_u_Unnest_this_Large_ListArray_Lar) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_BaseListArray_value_parent_indic_2, __pyx_mstate_global->__pyx_kp_u_Return_array_of_same_length_as) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_BaseListArray_value_lengths_line, __pyx_mstate_global->__pyx_kp_u_Return_integers_array_with_valu) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_ListArray_from_arrays_line_2678, __pyx_mstate_global->__pyx_kp_u_Construct_ListArray_from_arrays) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_ListArray_values___get___line_27, __pyx_mstate_global->__pyx_kp_u_Return_the_underlying_array_of) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_ListArray_offsets___get___line_2, __pyx_mstate_global->__pyx_kp_u_Return_the_list_offsets_as_an_i) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_LargeListArray_values___get___li, __pyx_mstate_global->__pyx_kp_u_Return_the_underlying_array_of_2) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_ListViewArray_from_arrays_line_3, __pyx_mstate_global->__pyx_kp_u_Construct_ListViewArray_from_ar) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_ListViewArray_values___get___lin, __pyx_mstate_global->__pyx_kp_u_Return_the_underlying_array_of_3) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_ListViewArray_offsets___get___li, __pyx_mstate_global->__pyx_kp_u_Return_the_list_offsets_as_an_i_2) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_ListViewArray_sizes___get___line, __pyx_mstate_global->__pyx_kp_u_Return_the_list_sizes_as_an_int) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_LargeListViewArray_from_arrays_l, __pyx_mstate_global->__pyx_kp_u_Construct_LargeListViewArray_fr) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_LargeListViewArray_values___get, __pyx_mstate_global->__pyx_kp_u_Return_the_underlying_array_of_4) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_LargeListViewArray_offsets___get, __pyx_mstate_global->__pyx_kp_u_Return_the_list_view_offsets_as) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_LargeListViewArray_sizes___get, __pyx_mstate_global->__pyx_kp_u_Return_the_list_view_sizes_as_a) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_MapArray_from_arrays_line_3453, __pyx_mstate_global->__pyx_kp_u_Construct_MapArray_from_arrays) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_FixedSizeListArray_from_arrays_l, __pyx_mstate_global->__pyx_kp_u_Construct_FixedSizeListArray_fr) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_FixedSizeListArray_values___get, __pyx_mstate_global->__pyx_kp_u_Return_the_underlying_array_of_5) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_FixedShapeTensorArray_from_numpy_2, __pyx_mstate_global->__pyx_kp_u_Convert_numpy_tensors_ndarrays) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_Bool8Array_from_numpy_line_4839, __pyx_mstate_global->__pyx_kp_u_Convert_numpy_array_to_a_bool8) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_concat_arrays_line_4970, __pyx_mstate_global->__pyx_kp_u_Concatenate_the_given_arrays_Th) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_ChunkedArray_type___get___line_8, __pyx_mstate_global->__pyx_kp_u_Return_data_type_of_a_ChunkedAr) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_ChunkedArray_length_line_99, __pyx_mstate_global->__pyx_kp_u_Return_length_of_a_ChunkedArray) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_ChunkedArray_to_string_line_119, __pyx_mstate_global->__pyx_kp_u_Render_a_pretty_printed_string) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_ChunkedArray_null_count___get, __pyx_mstate_global->__pyx_kp_u_Number_of_null_entries_Returns) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_ChunkedArray_nbytes___get___line, __pyx_mstate_global->__pyx_kp_u_Total_number_of_bytes_consumed) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_ChunkedArray_get_total_buffer_si_2, __pyx_mstate_global->__pyx_kp_u_The_sum_of_bytes_in_each_buffer) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_ChunkedArray_is_null_line_322, __pyx_mstate_global->__pyx_kp_u_Return_boolean_array_indicating) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_ChunkedArray_is_nan_line_356, __pyx_mstate_global->__pyx_kp_u_Return_boolean_array_indicating_2) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_ChunkedArray_is_valid_line_381, __pyx_mstate_global->__pyx_kp_u_Return_boolean_array_indicating_3) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_ChunkedArray_fill_null_line_413, __pyx_mstate_global->__pyx_kp_u_Replace_each_null_element_in_va) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_ChunkedArray_equals_line_450, __pyx_mstate_global->__pyx_kp_u_Return_whether_the_contents_of) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_ChunkedArray_to_numpy_line_494, __pyx_mstate_global->__pyx_kp_u_Return_a_NumPy_copy_of_this_arr) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_ChunkedArray_cast_line_564, __pyx_mstate_global->__pyx_kp_u_Cast_array_values_to_another_da) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_ChunkedArray_dictionary_encode_l, __pyx_mstate_global->__pyx_kp_u_Compute_dictionary_encoded_repr) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_ChunkedArray_flatten_line_663, __pyx_mstate_global->__pyx_kp_u_Flatten_this_ChunkedArray_If_it) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_ChunkedArray_combine_chunks_line, __pyx_mstate_global->__pyx_kp_u_Flatten_this_ChunkedArray_into) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_ChunkedArray_unique_line_782, __pyx_mstate_global->__pyx_kp_u_Compute_distinct_elements_in_ar) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_ChunkedArray_value_counts_line_8, __pyx_mstate_global->__pyx_kp_u_Compute_counts_of_unique_elemen) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_ChunkedArray_slice_line_867, __pyx_mstate_global->__pyx_kp_u_Compute_zero_copy_slice_of_this) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_ChunkedArray_filter_line_925, __pyx_mstate_global->__pyx_kp_u_Select_values_from_the_chunked) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_ChunkedArray_index_line_990, __pyx_mstate_global->__pyx_kp_u_Find_the_first_index_of_a_value) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_ChunkedArray_take_line_1038, __pyx_mstate_global->__pyx_kp_u_Select_values_from_the_chunked_2) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_ChunkedArray_drop_null_line_1085, __pyx_mstate_global->__pyx_kp_u_Remove_missing_values_from_a_ch) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_ChunkedArray_unify_dictionaries_2, __pyx_mstate_global->__pyx_kp_u_Unify_dictionaries_across_all_c) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_ChunkedArray_num_chunks___get, __pyx_mstate_global->__pyx_kp_u_Number_of_underlying_chunks_Ret) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_ChunkedArray_chunk_line_1271, __pyx_mstate_global->__pyx_kp_u_Select_a_chunk_by_its_index_Par) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_ChunkedArray_chunks___get___line, __pyx_mstate_global->__pyx_kp_u_Convert_to_a_list_of_single_chu) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_ChunkedArray_iterchunks_line_133, __pyx_mstate_global->__pyx_kp_u_Convert_to_an_iterator_of_Chunk) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_ChunkedArray_to_pylist_line_1356, __pyx_mstate_global->__pyx_kp_u_Convert_to_a_list_of_native_Pyt) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_chunked_array_line_1475, __pyx_mstate_global->__pyx_kp_u_Construct_chunked_array_from_li) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_Tabular_column_line_1747, __pyx_mstate_global->__pyx_kp_u_Select_single_column_from_Table) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_Tabular_column_names___get___li, __pyx_mstate_global->__pyx_kp_u_Names_of_the_Table_or_RecordBat) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_Tabular_columns___get___line_18, __pyx_mstate_global->__pyx_kp_u_List_of_all_columns_in_numerica) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_Tabular_drop_null_line_1859, __pyx_mstate_global->__pyx_kp_u_Remove_rows_that_contain_missin) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_Tabular_field_line_1894, __pyx_mstate_global->__pyx_kp_u_Select_a_schema_field_by_its_co) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_Tabular_from_pydict_line_1923, __pyx_mstate_global->__pyx_kp_u_Construct_a_Table_or_RecordBatc) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_Tabular_from_pylist_line_1990, __pyx_mstate_global->__pyx_kp_u_Construct_a_Table_or_RecordBatc_2) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_Tabular_itercolumns_line_2054, __pyx_mstate_global->__pyx_kp_u_Iterator_over_all_columns_in_th) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_Tabular_shape___get___line_2088, __pyx_mstate_global->__pyx_kp_u_Dimensions_of_the_table_or_reco) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_Tabular_sort_by_line_2112, __pyx_mstate_global->__pyx_kp_u_Sort_the_Table_or_RecordBatch_b) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_Tabular_take_line_2163, __pyx_mstate_global->__pyx_kp_u_Select_rows_from_a_Table_or_Rec) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_Tabular_filter_line_2202, __pyx_mstate_global->__pyx_kp_u_Select_rows_from_the_table_or_r) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_Tabular_to_pydict_line_2275, __pyx_mstate_global->__pyx_kp_u_Convert_the_Table_or_RecordBatc) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_Tabular_to_pylist_line_2315, __pyx_mstate_global->__pyx_kp_u_Convert_the_Table_or_RecordBatc_2) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_Tabular_drop_columns_line_2389, __pyx_mstate_global->__pyx_kp_u_Drop_one_or_more_columns_and_re) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_Tabular_append_column_line_2456, __pyx_mstate_global->__pyx_kp_u_Append_column_at_end_of_columns) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_RecordBatch_replace_schema_metad_2, __pyx_mstate_global->__pyx_kp_u_Create_shallow_copy_of_record_b) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_RecordBatch_num_columns___get, __pyx_mstate_global->__pyx_kp_u_Number_of_columns_Returns_int_E) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_RecordBatch_num_rows___get___lin, __pyx_mstate_global->__pyx_kp_u_Number_of_rows_Due_to_the_defin) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_RecordBatch_schema___get___line, __pyx_mstate_global->__pyx_kp_u_Schema_of_the_RecordBatch_and_i) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_RecordBatch_nbytes___get___line, __pyx_mstate_global->__pyx_kp_u_Total_number_of_bytes_consumed_2) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_RecordBatch_get_total_buffer_siz_2, __pyx_mstate_global->__pyx_kp_u_The_sum_of_bytes_in_each_buffer_2) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_RecordBatch_add_column_line_2836, __pyx_mstate_global->__pyx_kp_u_Add_column_to_RecordBatch_at_po) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_RecordBatch_remove_column_line_2, __pyx_mstate_global->__pyx_kp_u_Create_new_RecordBatch_with_the) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_RecordBatch_set_column_line_2951, __pyx_mstate_global->__pyx_kp_u_Replace_column_in_RecordBatch_a) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_RecordBatch_rename_columns_line, __pyx_mstate_global->__pyx_kp_u_Create_new_record_batch_with_co) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_RecordBatch_serialize_line_3092, __pyx_mstate_global->__pyx_kp_u_Write_RecordBatch_to_Buffer_as) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_RecordBatch_slice_line_3141, __pyx_mstate_global->__pyx_kp_u_Compute_zero_copy_slice_of_this_2) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_RecordBatch_equals_line_3198, __pyx_mstate_global->__pyx_kp_u_Check_if_contents_of_two_record) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_RecordBatch_select_line_3247, __pyx_mstate_global->__pyx_kp_u_Select_columns_of_the_RecordBat) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_RecordBatch_cast_line_3301, __pyx_mstate_global->__pyx_kp_u_Cast_record_batch_values_to_ano) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_RecordBatch_from_pandas_line_336, __pyx_mstate_global->__pyx_kp_u_Convert_pandas_DataFrame_to_an) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_RecordBatch_from_arrays_line_346, __pyx_mstate_global->__pyx_kp_u_Construct_a_RecordBatch_from_mu) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_RecordBatch_from_struct_array_li, __pyx_mstate_global->__pyx_kp_u_Construct_a_RecordBatch_from_a) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_RecordBatch_to_tensor_line_3612, __pyx_mstate_global->__pyx_kp_u_Convert_to_a_class_pyarrow_Tens) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_Table_slice_line_4266, __pyx_mstate_global->__pyx_kp_u_Compute_zero_copy_slice_of_this_3) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_Table_select_line_4331, __pyx_mstate_global->__pyx_kp_u_Select_columns_of_the_Table_Ret) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_Table_replace_schema_metadata_li, __pyx_mstate_global->__pyx_kp_u_Create_shallow_copy_of_table_by) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_Table_flatten_line_4445, __pyx_mstate_global->__pyx_kp_u_Flatten_this_Table_Each_column) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_Table_combine_chunks_line_4511, __pyx_mstate_global->__pyx_kp_u_Make_a_new_table_by_combining_t) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_Table_unify_dictionaries_line_45, __pyx_mstate_global->__pyx_kp_u_Unify_dictionaries_across_all_c_2) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_Table_equals_line_4621, __pyx_mstate_global->__pyx_kp_u_Check_if_contents_of_two_tables) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_Table_cast_line_4670, __pyx_mstate_global->__pyx_kp_u_Cast_table_values_to_another_sc) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_Table_from_pandas_line_4733, __pyx_mstate_global->__pyx_kp_u_Convert_pandas_DataFrame_to_an_2) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_Table_from_arrays_line_4813, __pyx_mstate_global->__pyx_kp_u_Construct_a_Table_from_Arrow_ar) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_Table_from_struct_array_line_491, __pyx_mstate_global->__pyx_kp_u_Construct_a_Table_from_a_Struct) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_Table_from_batches_line_4972, __pyx_mstate_global->__pyx_kp_u_Construct_a_Table_from_a_sequen) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_Table_to_batches_line_5045, __pyx_mstate_global->__pyx_kp_u_Convert_Table_to_a_list_of_Reco) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_Table_to_reader_line_5115, __pyx_mstate_global->__pyx_kp_u_Convert_the_Table_to_a_RecordBa) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_Table_schema___get___line_5184, __pyx_mstate_global->__pyx_kp_u_Schema_of_the_table_and_its_col) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_Table_num_columns___get___line_5, __pyx_mstate_global->__pyx_kp_u_Number_of_columns_in_this_table) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_Table_num_rows___get___line_5248, __pyx_mstate_global->__pyx_kp_u_Number_of_rows_in_this_table_Du) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_Table_nbytes___get___line_5272, __pyx_mstate_global->__pyx_kp_u_Total_number_of_bytes_consumed_3) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_Table_get_total_buffer_size_line, __pyx_mstate_global->__pyx_kp_u_The_sum_of_bytes_in_each_buffer_3) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_Table_add_column_line_5338, __pyx_mstate_global->__pyx_kp_u_Add_column_to_Table_at_position) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_Table_remove_column_line_5412, __pyx_mstate_global->__pyx_kp_u_Create_new_Table_with_the_indic) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_Table_set_column_line_5446, __pyx_mstate_global->__pyx_kp_u_Replace_column_in_Table_at_posi) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_Table_rename_columns_line_5505, __pyx_mstate_global->__pyx_kp_u_Create_new_table_with_columns_r) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_Table_group_by_line_5597, __pyx_mstate_global->__pyx_kp_u_Declare_a_grouping_over_the_col) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_Table_join_line_5640, __pyx_mstate_global->__pyx_kp_u_Perform_a_join_between_this_tab) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_Table_join_asof_line_5775, __pyx_mstate_global->__pyx_kp_u_Perform_an_asof_join_between_th) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_record_batch_line_5908, __pyx_mstate_global->__pyx_kp_u_Create_a_pyarrow_RecordBatch_fr) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_table_line_6085, __pyx_mstate_global->__pyx_kp_u_Create_a_pyarrow_Table_from_a_P) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_concat_tables_line_6247, __pyx_mstate_global->__pyx_kp_u_Concatenate_pyarrow_Table_objec) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_concat_batches_line_6327, __pyx_mstate_global->__pyx_kp_u_Concatenate_pyarrow_RecordBatch) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_TableGroupBy_aggregate_line_6512, __pyx_mstate_global->__pyx_kp_u_Perform_an_aggregation_over_the) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_Tensor_from_numpy_line_61, __pyx_mstate_global->__pyx_kp_u_Create_a_Tensor_from_a_numpy_ar) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_Tensor_to_numpy_line_96, __pyx_mstate_global->__pyx_kp_u_Convert_arrow_Tensor_to_numpy_n) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_Tensor_equals_line_118, __pyx_mstate_global->__pyx_kp_u_Return_true_if_the_tensors_cont) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_Tensor_dim_name_line_148, __pyx_mstate_global->__pyx_kp_u_Returns_the_name_of_the_i_th_te) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_Tensor_dim_names___get___line_17, __pyx_mstate_global->__pyx_kp_u_Names_of_this_tensor_dimensions) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_Tensor_is_mutable___get___line_1, __pyx_mstate_global->__pyx_kp_u_Is_this_tensor_mutable_or_immut) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_Tensor_is_contiguous___get___lin, __pyx_mstate_global->__pyx_kp_u_Is_this_tensor_contiguous_in_me) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_Tensor_ndim___get___line_218, __pyx_mstate_global->__pyx_kp_u_The_dimension_n_of_this_tensor) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_Tensor_size___get___line_234, __pyx_mstate_global->__pyx_kp_u_The_size_of_this_tensor_Example) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_Tensor_shape___get___line_250, __pyx_mstate_global->__pyx_kp_u_The_shape_of_this_tensor_Exampl) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_Tensor_strides___get___line_267, __pyx_mstate_global->__pyx_kp_u_Strides_of_this_tensor_Examples) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_memory_map_line_1111, __pyx_mstate_global->__pyx_kp_u_Open_memory_map_at_file_path_Si) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_create_memory_map_line_1152, __pyx_mstate_global->__pyx_kp_u_Create_a_file_of_the_given_size) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_input_stream_line_2738, __pyx_mstate_global->__pyx_kp_u_Create_an_Arrow_input_stream_Pa) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_output_stream_line_2824, __pyx_mstate_global->__pyx_kp_u_Create_an_Arrow_output_stream_P) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test, __pyx_t_7) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /*--- Wrapped vars code ---*/

  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_XDECREF(__pyx_t_17);
  __Pyx_XDECREF(__pyx_t_18);
  __Pyx_XDECREF(__pyx_t_19);
  __Pyx_XDECREF(__pyx_t_20);
  __Pyx_XDECREF(__pyx_t_21);
  __Pyx_XDECREF(__pyx_t_22);
  __Pyx_XDECREF(__pyx_t_28);
  if (__pyx_m) {
    if (__pyx_mstate->__pyx_d && stringtab_initialized) {
      __Pyx_AddTraceback("init pyarrow.lib", __pyx_clineno, __pyx_lineno, __pyx_filename);
    }
    #if !CYTHON_USE_MODULE_STATE
    Py_CLEAR(__pyx_m);
    #else
    Py_DECREF(__pyx_m);
    if (pystate_addmodule_run) {
      PyObject *tp, *value, *tb;
      PyErr_Fetch(&tp, &value, &tb);
      PyState_RemoveModule(&__pyx_moduledef);
      PyErr_Restore(tp, value, tb);
    }
    #endif
  } else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_ImportError, "init pyarrow.lib");
  }
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  return (__pyx_m != NULL) ? 0 : -1;
  #else
  return __pyx_m;
  #endif
}
/* #### Code section: pystring_table ### */
/* #### Code section: cached_builtins ### */

static int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate) {
  CYTHON_UNUSED_VAR(__pyx_mstate);
  __pyx_builtin_staticmethod = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_staticmethod); if (!__pyx_builtin_staticmethod) __PYX_ERR(1, 423, __pyx_L1_error)
  __pyx_builtin_super = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_super); if (!__pyx_builtin_super) __PYX_ERR(2, 73, __pyx_L1_error)
  __pyx_builtin_NotImplemented = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_NotImplemented); if (!__pyx_builtin_NotImplemented) __PYX_ERR(1, 368, __pyx_L1_error)
  __pyx_builtin_zip = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_zip); if (!__pyx_builtin_zip) __PYX_ERR(1, 3153, __pyx_L1_error)
  __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(3, 1028, __pyx_L1_error)
  __pyx_builtin_object = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_object); if (!__pyx_builtin_object) __PYX_ERR(4, 74, __pyx_L1_error)
  __pyx_builtin_any = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_any); if (!__pyx_builtin_any) __PYX_ERR(5, 1234, __pyx_L1_error)
  __pyx_builtin_open = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_open); if (!__pyx_builtin_open) __PYX_ERR(6, 670, __pyx_L1_error)

  /* Cached unbound methods */
  __pyx_mstate->__pyx_umethod_PyDict_Type_get.type = (PyObject*)&PyDict_Type;
  __pyx_mstate->__pyx_umethod_PyDict_Type_get.method_name = &__pyx_mstate->__pyx_n_u_get;
  __pyx_mstate->__pyx_umethod_PyDict_Type_items.type = (PyObject*)&PyDict_Type;
  __pyx_mstate->__pyx_umethod_PyDict_Type_items.method_name = &__pyx_mstate->__pyx_n_u_items;
  __pyx_mstate->__pyx_umethod_PyDict_Type_pop.type = (PyObject*)&PyDict_Type;
  __pyx_mstate->__pyx_umethod_PyDict_Type_pop.method_name = &__pyx_mstate->__pyx_n_u_pop;
  __pyx_mstate->__pyx_umethod_PyDict_Type_values.type = (PyObject*)&PyDict_Type;
  __pyx_mstate->__pyx_umethod_PyDict_Type_values.method_name = &__pyx_mstate->__pyx_n_u_values;
  __pyx_mstate->__pyx_umethod_PyDict_Type__update.type = (PyObject*)(&PyDict_Type);
  __pyx_mstate->__pyx_umethod_PyDict_Type__update.method_name = &__pyx_mstate->__pyx_n_u_update;
  __pyx_mstate->__pyx_umethod_PySlice_Type__indices.type = (PyObject*)(&PySlice_Type);
  __pyx_mstate->__pyx_umethod_PySlice_Type__indices.method_name = &__pyx_mstate->__pyx_n_u_indices;
  __pyx_mstate->__pyx_umethod_PyUnicode_Type__upper.type = (PyObject*)(&PyUnicode_Type);
  __pyx_mstate->__pyx_umethod_PyUnicode_Type__upper.method_name = &__pyx_mstate->__pyx_n_u_upper;
  return 0;
  __pyx_L1_error:;
  return -1;
}
/* #### Code section: cached_constants ### */

static int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate) {
  __Pyx_RefNannyDeclarations
  CYTHON_UNUSED_VAR(__pyx_mstate);
  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);

  /* "pyarrow/pandas-shim.pxi":107
 *     cdef inline _check_import(self, bint raise_=True):
 *         if not self._tried_importing_pandas:
 *             with self._lock:             # <<<<<<<<<<<<<<
 *                 if not self._tried_importing_pandas:
 *                     try:
*/
  __pyx_mstate_global->__pyx_tuple[0] = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_tuple[0])) __PYX_ERR(12, 107, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[0]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[0]);

  /* "pyarrow/types.pxi":189
 * 
 * def _to_pandas_dtype(arrow_type, options=None):
 *     coerce_to_ns = (options and options.get('coerce_temporal_nanoseconds', False)) or (             # <<<<<<<<<<<<<<
 *         _pandas_api.is_v1() and arrow_type.id in
 *         [_Type_DATE32, _Type_DATE64, _Type_TIMESTAMP, _Type_DURATION])
*/
  __pyx_mstate_global->__pyx_tuple[1] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_n_u_coerce_temporal_nanoseconds, Py_False); if (unlikely(!__pyx_mstate_global->__pyx_tuple[1])) __PYX_ERR(1, 189, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[1]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[1]);

  /* "pyarrow/scalar.pxi":606
 *             # shift to seconds since epoch
 *             return (
 *                 datetime.date(1970, 1, 1) + datetime.timedelta(days=sp.value)             # <<<<<<<<<<<<<<
 *             )
 *         else:
*/
  __pyx_mstate_global->__pyx_tuple[2] = PyTuple_Pack(3, __pyx_mstate_global->__pyx_int_1970, __pyx_mstate_global->__pyx_int_1, __pyx_mstate_global->__pyx_int_1); if (unlikely(!__pyx_mstate_global->__pyx_tuple[2])) __PYX_ERR(3, 606, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[2]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[2]);

  /* "pyarrow/array.pxi":43
 * 
 *     options.from_pandas = from_pandas
 *     options.ignore_timezone = os.environ.get('PYARROW_IGNORE_TIMEZONE', False)             # <<<<<<<<<<<<<<
 * 
 *     with nogil:
*/
  __pyx_mstate_global->__pyx_tuple[3] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_n_u_PYARROW_IGNORE_TIMEZONE, Py_False); if (unlikely(!__pyx_mstate_global->__pyx_tuple[3])) __PYX_ERR(4, 43, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[3]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[3]);

  /* "pyarrow/array.pxi":4711
 *             if not isinstance(dim_names, Sequence):
 *                 raise TypeError("dim_names must be a tuple or list")
 *             if len(dim_names) != len(obj.shape[1:]):             # <<<<<<<<<<<<<<
 *                 raise ValueError(
 *                     (f"The length of dim_names ({len(dim_names)}) does not match"
*/
  __pyx_mstate_global->__pyx_slice[0] = PySlice_New(__pyx_mstate_global->__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_slice[0])) __PYX_ERR(4, 4711, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_slice[0]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_slice[0]);

  /* "pyarrow/table.pxi":6616
 *                 func = "hash_" + func
 *             if len(self.keys) == 0 and func.startswith("hash_"):
 *                 func = func[5:]             # <<<<<<<<<<<<<<
 *             # Determine output field name
 *             func_nohash = func if not func.startswith("hash_") else func[5:]
*/
  __pyx_mstate_global->__pyx_slice[1] = PySlice_New(__pyx_mstate_global->__pyx_int_5, Py_None, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_slice[1])) __PYX_ERR(17, 6616, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_slice[1]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_slice[1]);

  /* "pyarrow/tensor.pxi":546
 *         data = PyObject_to_object(out_data)
 *         coords = PyObject_to_object(out_coords)
 *         row, col = coords[:, 0], coords[:, 1]             # <<<<<<<<<<<<<<
 *         result = coo_array((data[:, 0], (row, col)), shape=self.shape)
 * 
*/
  __pyx_mstate_global->__pyx_slice[2] = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_slice[2])) __PYX_ERR(5, 546, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_slice[2]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_slice[2]);
  __pyx_mstate_global->__pyx_tuple[4] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_slice[2], __pyx_mstate_global->__pyx_int_0); if (unlikely(!__pyx_mstate_global->__pyx_tuple[4])) __PYX_ERR(5, 546, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[4]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[4]);
  __pyx_mstate_global->__pyx_tuple[5] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_slice[2], __pyx_mstate_global->__pyx_int_1); if (unlikely(!__pyx_mstate_global->__pyx_tuple[5])) __PYX_ERR(5, 546, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[5]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[5]);

  /* "EnumType":28
 *     ('At64Byte', __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_Alignment(At64Byte)),
 * 
 * ], module=globals().get("__module__", 'pyarrow.lib'))             # <<<<<<<<<<<<<<
 * 
 * if PY_VERSION_HEX >= 0x030B0000:
*/
  __pyx_mstate_global->__pyx_tuple[6] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_n_u_module_2, __pyx_mstate_global->__pyx_kp_u_pyarrow_lib); if (unlikely(!__pyx_mstate_global->__pyx_tuple[6])) __PYX_ERR(7, 28, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[6]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[6]);

  /* "pyarrow/error.pxi":72
 * 
 * class ArrowCancelled(ArrowException):
 *     def __init__(self, message, signum=None):             # <<<<<<<<<<<<<<
 *         super().__init__(message)
 *         self.signum = signum
*/
  __pyx_mstate_global->__pyx_tuple[7] = PyTuple_Pack(1, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_tuple[7])) __PYX_ERR(2, 72, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[7]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[7]);

  /* "pyarrow/error.pxi":192
 * 
 * # Whether we need a workaround for https://bugs.python.org/issue42248
 * have_signal_refcycle = (sys.version_info < (3, 8, 10) or             # <<<<<<<<<<<<<<
 *                         (3, 9) <= sys.version_info < (3, 9, 5) or
 *                         sys.version_info[:2] == (3, 10))
*/
  __pyx_mstate_global->__pyx_tuple[8] = PyTuple_Pack(3, __pyx_mstate_global->__pyx_int_3, __pyx_mstate_global->__pyx_int_8, __pyx_mstate_global->__pyx_int_10); if (unlikely(!__pyx_mstate_global->__pyx_tuple[8])) __PYX_ERR(2, 192, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[8]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[8]);

  /* "pyarrow/error.pxi":193
 * # Whether we need a workaround for https://bugs.python.org/issue42248
 * have_signal_refcycle = (sys.version_info < (3, 8, 10) or
 *                         (3, 9) <= sys.version_info < (3, 9, 5) or             # <<<<<<<<<<<<<<
 *                         sys.version_info[:2] == (3, 10))
 * 
*/
  __pyx_mstate_global->__pyx_tuple[9] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_int_3, __pyx_mstate_global->__pyx_int_9); if (unlikely(!__pyx_mstate_global->__pyx_tuple[9])) __PYX_ERR(2, 193, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[9]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[9]);
  __pyx_mstate_global->__pyx_tuple[10] = PyTuple_Pack(3, __pyx_mstate_global->__pyx_int_3, __pyx_mstate_global->__pyx_int_9, __pyx_mstate_global->__pyx_int_5); if (unlikely(!__pyx_mstate_global->__pyx_tuple[10])) __PYX_ERR(2, 193, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[10]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[10]);

  /* "pyarrow/error.pxi":194
 * have_signal_refcycle = (sys.version_info < (3, 8, 10) or
 *                         (3, 9) <= sys.version_info < (3, 9, 5) or
 *                         sys.version_info[:2] == (3, 10))             # <<<<<<<<<<<<<<
 * 
 * cdef class SignalStopHandler:
*/
  __pyx_mstate_global->__pyx_slice[3] = PySlice_New(Py_None, __pyx_mstate_global->__pyx_int_2, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_slice[3])) __PYX_ERR(2, 194, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_slice[3]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_slice[3]);
  __pyx_mstate_global->__pyx_tuple[11] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_int_3, __pyx_mstate_global->__pyx_int_10); if (unlikely(!__pyx_mstate_global->__pyx_tuple[11])) __PYX_ERR(2, 194, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[11]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[11]);

  /* "pyarrow/config.pxi":25
 * 
 * 
 * VersionInfo = namedtuple('VersionInfo', ('major', 'minor', 'patch'))             # <<<<<<<<<<<<<<
 * 
 * RuntimeInfo = namedtuple('RuntimeInfo',
*/
  __pyx_mstate_global->__pyx_tuple[12] = PyTuple_Pack(3, __pyx_mstate_global->__pyx_n_u_major, __pyx_mstate_global->__pyx_n_u_minor, __pyx_mstate_global->__pyx_n_u_patch); if (unlikely(!__pyx_mstate_global->__pyx_tuple[12])) __PYX_ERR(11, 25, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[12]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[12]);
  __pyx_mstate_global->__pyx_tuple[13] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_n_u_VersionInfo, __pyx_mstate_global->__pyx_tuple[12]); if (unlikely(!__pyx_mstate_global->__pyx_tuple[13])) __PYX_ERR(11, 25, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[13]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[13]);

  /* "pyarrow/config.pxi":28
 * 
 * RuntimeInfo = namedtuple('RuntimeInfo',
 *                          ('simd_level', 'detected_simd_level'))             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_mstate_global->__pyx_tuple[14] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_n_u_simd_level, __pyx_mstate_global->__pyx_n_u_detected_simd_level); if (unlikely(!__pyx_mstate_global->__pyx_tuple[14])) __PYX_ERR(11, 28, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[14]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[14]);

  /* "pyarrow/config.pxi":27
 * VersionInfo = namedtuple('VersionInfo', ('major', 'minor', 'patch'))
 * 
 * RuntimeInfo = namedtuple('RuntimeInfo',             # <<<<<<<<<<<<<<
 *                          ('simd_level', 'detected_simd_level'))
 * 
*/
  __pyx_mstate_global->__pyx_tuple[15] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_n_u_RuntimeInfo, __pyx_mstate_global->__pyx_tuple[14]); if (unlikely(!__pyx_mstate_global->__pyx_tuple[15])) __PYX_ERR(11, 27, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[15]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[15]);

  /* "pyarrow/config.pxi":51
 * BuildInfo = namedtuple(
 *     'BuildInfo',
 *     ('build_type', 'cpp_build_info'))             # <<<<<<<<<<<<<<
 * 
 * CppBuildInfo = namedtuple(
*/
  __pyx_mstate_global->__pyx_tuple[16] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_n_u_build_type, __pyx_mstate_global->__pyx_n_u_cpp_build_info); if (unlikely(!__pyx_mstate_global->__pyx_tuple[16])) __PYX_ERR(11, 51, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[16]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[16]);

  /* "pyarrow/config.pxi":49
 * 
 * 
 * BuildInfo = namedtuple(             # <<<<<<<<<<<<<<
 *     'BuildInfo',
 *     ('build_type', 'cpp_build_info'))
*/
  __pyx_mstate_global->__pyx_tuple[17] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_n_u_BuildInfo, __pyx_mstate_global->__pyx_tuple[16]); if (unlikely(!__pyx_mstate_global->__pyx_tuple[17])) __PYX_ERR(11, 49, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[17]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[17]);

  /* "pyarrow/config.pxi":55
 * CppBuildInfo = namedtuple(
 *     'CppBuildInfo',
 *     ('version', 'version_info', 'so_version', 'full_so_version',             # <<<<<<<<<<<<<<
 *      'compiler_id', 'compiler_version', 'compiler_flags',
 *      'git_id', 'git_description', 'package_kind', 'build_type'))
*/
  __pyx_mstate_global->__pyx_tuple[18] = PyTuple_Pack(11, __pyx_mstate_global->__pyx_n_u_version, __pyx_mstate_global->__pyx_n_u_version_info, __pyx_mstate_global->__pyx_n_u_so_version, __pyx_mstate_global->__pyx_n_u_full_so_version, __pyx_mstate_global->__pyx_n_u_compiler_id, __pyx_mstate_global->__pyx_n_u_compiler_version, __pyx_mstate_global->__pyx_n_u_compiler_flags, __pyx_mstate_global->__pyx_n_u_git_id, __pyx_mstate_global->__pyx_n_u_git_description, __pyx_mstate_global->__pyx_n_u_package_kind, __pyx_mstate_global->__pyx_n_u_build_type); if (unlikely(!__pyx_mstate_global->__pyx_tuple[18])) __PYX_ERR(11, 55, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[18]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[18]);

  /* "pyarrow/config.pxi":53
 *     ('build_type', 'cpp_build_info'))
 * 
 * CppBuildInfo = namedtuple(             # <<<<<<<<<<<<<<
 *     'CppBuildInfo',
 *     ('version', 'version_info', 'so_version', 'full_so_version',
*/
  __pyx_mstate_global->__pyx_tuple[19] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_n_u_CppBuildInfo, __pyx_mstate_global->__pyx_tuple[18]); if (unlikely(!__pyx_mstate_global->__pyx_tuple[19])) __PYX_ERR(11, 53, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[19]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[19]);

  /* "pyarrow/memory.pxi":249
 * 
 * 
 * def log_memory_allocations(enable=True):             # <<<<<<<<<<<<<<
 *     """
 *     Enable or disable memory allocator logging for debugging purposes
*/
  __pyx_mstate_global->__pyx_tuple[20] = PyTuple_Pack(1, ((PyObject*)Py_True)); if (unlikely(!__pyx_mstate_global->__pyx_tuple[20])) __PYX_ERR(13, 249, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[20]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[20]);

  /* "pyarrow/types.pxi":165
 * 
 * 
 * def _get_pandas_type(arrow_type, coerce_to_ns=False):             # <<<<<<<<<<<<<<
 *     cdef Type type_id = arrow_type.id
 *     cdef dict pandas_type_map = _get_pandas_type_map()
*/
  __pyx_mstate_global->__pyx_tuple[21] = PyTuple_Pack(1, ((PyObject*)Py_False)); if (unlikely(!__pyx_mstate_global->__pyx_tuple[21])) __PYX_ERR(1, 165, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[21]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[21]);

  /* "pyarrow/types.pxi":3569
 *         return pyarrow_wrap_schema(new_schema)
 * 
 *     def to_string(self, truncate_metadata=True, show_field_metadata=True,             # <<<<<<<<<<<<<<
 *                   show_schema_metadata=True, element_size_limit=100):
 *         """
*/
  __pyx_mstate_global->__pyx_tuple[22] = PyTuple_Pack(4, Py_True, Py_True, Py_True, __pyx_mstate_global->__pyx_int_100); if (unlikely(!__pyx_mstate_global->__pyx_tuple[22])) __PYX_ERR(1, 3569, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[22]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[22]);

  /* "pyarrow/types.pxi":4538
 * 
 * 
 * cpdef DataType decimal32(int precision, int scale=0):             # <<<<<<<<<<<<<<
 *     """
 *     Create decimal type with precision and scale and 32-bit width.
*/
  __pyx_mstate_global->__pyx_tuple[23] = PyTuple_Pack(1, __pyx_mstate_global->__pyx_int_0); if (unlikely(!__pyx_mstate_global->__pyx_tuple[23])) __PYX_ERR(1, 4538, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[23]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[23]);

  /* "pyarrow/types.pxi":5559
 * 
 * 
 * def fixed_shape_tensor(DataType value_type, shape, dim_names=None, permutation=None):             # <<<<<<<<<<<<<<
 *     """
 *     Create instance of fixed shape tensor extension type with shape and optional
*/
  __pyx_mstate_global->__pyx_tuple[24] = PyTuple_Pack(2, Py_None, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_tuple[24])) __PYX_ERR(1, 5559, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[24]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[24]);

  /* "pyarrow/scalar.pxi":73
 *         return self.wrapped.get().is_valid
 * 
 *     def cast(self, object target_type=None, safe=None, options=None, memory_pool=None):             # <<<<<<<<<<<<<<
 *         """
 *         Cast scalar value to another data type.
*/
  __pyx_mstate_global->__pyx_tuple[25] = PyTuple_Pack(4, Py_None, Py_None, Py_None, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_tuple[25])) __PYX_ERR(3, 73, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[25]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[25]);

  /* "pyarrow/array.pxi":546
 * 
 * 
 * def infer_type(values, mask=None, from_pandas=False):             # <<<<<<<<<<<<<<
 *     """
 *     Attempt to infer Arrow data type that can hold the passed Python
*/
  __pyx_mstate_global->__pyx_tuple[26] = PyTuple_Pack(2, Py_None, ((PyObject*)Py_False)); if (unlikely(!__pyx_mstate_global->__pyx_tuple[26])) __PYX_ERR(4, 546, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[26]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[26]);

  /* "pyarrow/array.pxi":866
 * cdef class _PandasConvertible(_Weakrefable):
 * 
 *     def to_pandas(             # <<<<<<<<<<<<<<
 *             self,
 *             memory_pool=None,
*/
  __pyx_mstate_global->__pyx_tuple[27] = PyTuple_Pack(16, Py_None, Py_None, Py_False, Py_False, Py_False, Py_True, Py_False, Py_True, Py_True, Py_False, Py_True, Py_False, Py_False, Py_None, Py_None, Py_False); if (unlikely(!__pyx_mstate_global->__pyx_tuple[27])) __PYX_ERR(4, 866, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[27]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[27]);

  /* "pyarrow/array.pxi":1218
 *         return _pc().call_function('unique', [self])
 * 
 *     def dictionary_encode(self, null_encoding='mask'):             # <<<<<<<<<<<<<<
 *         """
 *         Compute dictionary-encoded representation of array.
*/
  __pyx_mstate_global->__pyx_tuple[28] = PyTuple_Pack(1, __pyx_mstate_global->__pyx_n_u_mask); if (unlikely(!__pyx_mstate_global->__pyx_tuple[28])) __PYX_ERR(4, 1218, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[28]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[28]);

  /* "pyarrow/array.pxi":1250
 *         return _pc().call_function('value_counts', [self])
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_pandas(obj, mask=None, type=None, bint safe=True,
 *                     MemoryPool memory_pool=None):
*/
  __pyx_mstate_global->__pyx_tuple[29] = PyTuple_Pack(4, Py_None, Py_None, Py_True, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_tuple[29])) __PYX_ERR(4, 1250, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[29]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[29]);

  /* "pyarrow/array.pxi":1293
 *             (_reduce_array_data(self.sp_array.get().data().get()),)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_buffers(DataType type, length, buffers, null_count=-1, offset=0,
 *                      children=None):
*/
  __pyx_mstate_global->__pyx_tuple[30] = PyTuple_Pack(3, __pyx_mstate_global->__pyx_int_neg_1, __pyx_mstate_global->__pyx_int_0, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_tuple[30])) __PYX_ERR(4, 1293, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[30]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[30]);

  /* "pyarrow/array.pxi":1578
 *         return Scalar.wrap(GetResultValue(self.ap.GetScalar(i)))
 * 
 *     def slice(self, offset=0, length=None):             # <<<<<<<<<<<<<<
 *         """
 *         Compute zero-copy slice of this array.
*/
  __pyx_mstate_global->__pyx_tuple[31] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_int_0, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_tuple[31])) __PYX_ERR(4, 1578, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[31]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[31]);

  /* "pyarrow/array.pxi":1684
 *         return _pc().index(self, value, start, end, memory_pool=memory_pool)
 * 
 *     def sort(self, order="ascending", **kwargs):             # <<<<<<<<<<<<<<
 *         """
 *         Sort the Array
*/
  __pyx_mstate_global->__pyx_tuple[32] = PyTuple_Pack(1, __pyx_mstate_global->__pyx_n_u_ascending); if (unlikely(!__pyx_mstate_global->__pyx_tuple[32])) __PYX_ERR(4, 1684, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[32]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[32]);

  /* "pyarrow/array.pxi":1737
 *         return np.asarray(values, dtype=dtype)
 * 
 *     def to_numpy(self, zero_copy_only=True, writable=False):             # <<<<<<<<<<<<<<
 *         """
 *         Return a NumPy view or copy of this array.
*/
  __pyx_mstate_global->__pyx_tuple[33] = PyTuple_Pack(2, Py_True, Py_False); if (unlikely(!__pyx_mstate_global->__pyx_tuple[33])) __PYX_ERR(4, 1737, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[33]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[33]);

  /* "pyarrow/array.pxi":3876
 *     """
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_buffers(int length, Buffer value_offsets, Buffer data,
 *                      Buffer null_bitmap=None, int null_count=-1,
*/
  __pyx_mstate_global->__pyx_tuple[34] = PyTuple_Pack(3, Py_None, __pyx_mstate_global->__pyx_int_neg_1, __pyx_mstate_global->__pyx_int_0); if (unlikely(!__pyx_mstate_global->__pyx_tuple[34])) __PYX_ERR(4, 3876, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[34]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[34]);

  /* "pyarrow/array.pxi":4005
 *         return self._indices
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_buffers(DataType type, int64_t length, buffers, Array dictionary,
 *                      int64_t null_count=-1, int64_t offset=0):
*/
  __pyx_mstate_global->__pyx_tuple[35] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_int_neg_1, __pyx_mstate_global->__pyx_int_0); if (unlikely(!__pyx_mstate_global->__pyx_tuple[35])) __PYX_ERR(4, 4005, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[35]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[35]);

  /* "pyarrow/array.pxi":4052
 *         return result
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_arrays(indices, dictionary, mask=None, bint ordered=False,
 *                     bint from_pandas=False, bint safe=True,
*/
  __pyx_mstate_global->__pyx_tuple[36] = PyTuple_Pack(5, Py_None, Py_False, Py_False, Py_True, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_tuple[36])) __PYX_ERR(4, 4052, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[36]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[36]);

  /* "pyarrow/array.pxi":4216
 *         return [pyarrow_wrap_array(arr) for arr in arrays]
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_arrays(arrays, names=None, fields=None, mask=None,
 *                     memory_pool=None, type=None):
*/
  __pyx_mstate_global->__pyx_tuple[37] = PyTuple_Pack(5, Py_None, Py_None, Py_None, Py_None, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_tuple[37])) __PYX_ERR(4, 4216, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[37]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[37]);

  /* "pyarrow/array.pxi":4308
 *         return result
 * 
 *     def sort(self, order="ascending", by=None, **kwargs):             # <<<<<<<<<<<<<<
 *         """
 *         Sort the StructArray
*/
  __pyx_mstate_global->__pyx_tuple[38] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_n_u_ascending, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_tuple[38])) __PYX_ERR(4, 4308, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[38]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[38]);

  /* "pyarrow/table.pxi":925
 *         return pyarrow_wrap_chunked_array(result)
 * 
 *     def filter(self, mask, object null_selection_behavior="drop"):             # <<<<<<<<<<<<<<
 *         """
 *         Select values from the chunked array.
*/
  __pyx_mstate_global->__pyx_tuple[39] = PyTuple_Pack(1, __pyx_mstate_global->__pyx_n_u_drop); if (unlikely(!__pyx_mstate_global->__pyx_tuple[39])) __PYX_ERR(17, 925, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[39]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[39]);

  /* "pyarrow/table.pxi":1657
 *         return arr
 * 
 *     def __dataframe__(self, nan_as_null: bool = False, allow_copy: bool = True):             # <<<<<<<<<<<<<<
 *         """
 *         Return the dataframe interchange object implementing the interchange protocol.
*/
  __pyx_mstate_global->__pyx_tuple[40] = PyTuple_Pack(2, Py_False, Py_True); if (unlikely(!__pyx_mstate_global->__pyx_tuple[40])) __PYX_ERR(17, 1657, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[40]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[40]);

  /* "pyarrow/table.pxi":3612
 *         return pyarrow_wrap_array(c_array)
 * 
 *     def to_tensor(self, c_bool null_to_nan=False, c_bool row_major=True, MemoryPool memory_pool=None):             # <<<<<<<<<<<<<<
 *         """
 *         Convert to a :class:`~pyarrow.Tensor`.
*/
  __pyx_mstate_global->__pyx_tuple[41] = PyTuple_Pack(3, Py_False, Py_True, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_tuple[41])) __PYX_ERR(17, 3612, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[41]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[41]);

  /* "pyarrow/table.pxi":4733
 *         return Table.from_arrays(newcols, schema=target_schema)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def from_pandas(cls, df, Schema schema=None, preserve_index=None,
 *                     nthreads=None, columns=None, bint safe=True):
*/
  __pyx_mstate_global->__pyx_tuple[42] = PyTuple_Pack(5, Py_None, Py_None, Py_None, Py_None, Py_True); if (unlikely(!__pyx_mstate_global->__pyx_tuple[42])) __PYX_ERR(17, 4733, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[42]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[42]);

  /* "pyarrow/table.pxi":5174
 *         return reader
 * 
 *     def _to_pandas(self, options, categories=None, ignore_metadata=False,             # <<<<<<<<<<<<<<
 *                    types_mapper=None):
 *         self._assert_cpu()
*/
  __pyx_mstate_global->__pyx_tuple[43] = PyTuple_Pack(3, Py_None, Py_False, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_tuple[43])) __PYX_ERR(17, 5174, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[43]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[43]);

  /* "pyarrow/table.pxi":5640
 *         return TableGroupBy(self, keys, use_threads=use_threads)
 * 
 *     def join(self, right_table, keys, right_keys=None, join_type="left outer",             # <<<<<<<<<<<<<<
 *              left_suffix=None, right_suffix=None, coalesce_keys=True,
 *              use_threads=True, filter_expression=None):
*/
  __pyx_mstate_global->__pyx_tuple[44] = PyTuple_Pack(7, Py_None, __pyx_mstate_global->__pyx_kp_u_left_outer, Py_None, Py_None, Py_True, Py_True, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_tuple[44])) __PYX_ERR(17, 5640, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[44]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[44]);

  /* "pyarrow/table.pxi":6247
 * 
 * 
 * def concat_tables(tables, MemoryPool memory_pool=None, str promote_options="none", **kwargs):             # <<<<<<<<<<<<<<
 *     """
 *     Concatenate pyarrow.Table objects.
*/
  __pyx_mstate_global->__pyx_tuple[45] = PyTuple_Pack(2, Py_None, ((PyObject*)__pyx_mstate_global->__pyx_n_u_none)); if (unlikely(!__pyx_mstate_global->__pyx_tuple[45])) __PYX_ERR(17, 6247, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[45]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[45]);

  /* "pyarrow/io.pxi":1068
 *         return result
 * 
 *     def _open(self, path, mode='r'):             # <<<<<<<<<<<<<<
 *         self.path = path
 * 
*/
  __pyx_mstate_global->__pyx_tuple[46] = PyTuple_Pack(1, __pyx_mstate_global->__pyx_n_u_r); if (unlikely(!__pyx_mstate_global->__pyx_tuple[46])) __PYX_ERR(6, 1068, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[46]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[46]);

  /* "pyarrow/io.pxi":2335
 *             return False
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def from_network_metrics(time_to_first_byte_millis, transfer_bandwidth_mib_per_sec,
 *                              ideal_bandwidth_utilization_frac=0.9, max_ideal_request_size_mib=64):
*/
  __pyx_mstate_global->__pyx_tuple[47] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_float_0_9, __pyx_mstate_global->__pyx_int_64); if (unlikely(!__pyx_mstate_global->__pyx_tuple[47])) __PYX_ERR(6, 2335, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[47]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[47]);

  /* "pyarrow/io.pxi":2567
 *         return self.unwrap().compression_level()
 * 
 *     def compress(self, object buf, asbytes=False, memory_pool=None):             # <<<<<<<<<<<<<<
 *         """
 *         Compress data from buffer-like object.
*/
  __pyx_mstate_global->__pyx_tuple[48] = PyTuple_Pack(2, Py_False, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_tuple[48])) __PYX_ERR(6, 2567, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[48]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[48]);

  /* "pyarrow/io.pxi":2687
 * 
 * 
 * def compress(object buf, codec='lz4', asbytes=False, memory_pool=None):             # <<<<<<<<<<<<<<
 *     """
 *     Compress data from buffer-like object.
*/
  __pyx_mstate_global->__pyx_tuple[49] = PyTuple_Pack(3, ((PyObject*)__pyx_mstate_global->__pyx_n_u_lz4_2), ((PyObject*)Py_False), Py_None); if (unlikely(!__pyx_mstate_global->__pyx_tuple[49])) __PYX_ERR(6, 2687, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[49]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[49]);

  /* "pyarrow/io.pxi":2710
 * 
 * 
 * def decompress(object buf, decompressed_size=None, codec='lz4',             # <<<<<<<<<<<<<<
 *                asbytes=False, memory_pool=None):
 *     """
*/
  __pyx_mstate_global->__pyx_tuple[50] = PyTuple_Pack(4, Py_None, ((PyObject*)__pyx_mstate_global->__pyx_n_u_lz4_2), ((PyObject*)Py_False), Py_None); if (unlikely(!__pyx_mstate_global->__pyx_tuple[50])) __PYX_ERR(6, 2710, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[50]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[50]);

  /* "pyarrow/io.pxi":2738
 * 
 * 
 * def input_stream(source, compression='detect', buffer_size=None):             # <<<<<<<<<<<<<<
 *     """
 *     Create an Arrow input stream.
*/
  __pyx_mstate_global->__pyx_tuple[51] = PyTuple_Pack(2, ((PyObject*)__pyx_mstate_global->__pyx_n_u_detect), Py_None); if (unlikely(!__pyx_mstate_global->__pyx_tuple[51])) __PYX_ERR(6, 2738, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[51]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[51]);

  /* "pyarrow/ipc.pxi":73
 * _WriteStats = namedtuple(
 *     'WriteStats',
 *     ('num_messages', 'num_record_batches', 'num_dictionary_batches',             # <<<<<<<<<<<<<<
 *      'num_dictionary_deltas', 'num_replaced_dictionaries'))
 * 
*/
  __pyx_mstate_global->__pyx_tuple[52] = PyTuple_Pack(5, __pyx_mstate_global->__pyx_n_u_num_messages, __pyx_mstate_global->__pyx_n_u_num_record_batches, __pyx_mstate_global->__pyx_n_u_num_dictionary_batches, __pyx_mstate_global->__pyx_n_u_num_dictionary_deltas, __pyx_mstate_global->__pyx_n_u_num_replaced_dictionaries); if (unlikely(!__pyx_mstate_global->__pyx_tuple[52])) __PYX_ERR(19, 73, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[52]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[52]);

  /* "pyarrow/ipc.pxi":71
 * 
 * 
 * _WriteStats = namedtuple(             # <<<<<<<<<<<<<<
 *     'WriteStats',
 *     ('num_messages', 'num_record_batches', 'num_dictionary_batches',
*/
  __pyx_mstate_global->__pyx_tuple[53] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_n_u_WriteStats, __pyx_mstate_global->__pyx_tuple[52]); if (unlikely(!__pyx_mstate_global->__pyx_tuple[53])) __PYX_ERR(19, 71, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[53]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[53]);

  /* "pyarrow/ipc.pxi":103
 * 
 * 
 * _ReadStats = namedtuple(             # <<<<<<<<<<<<<<
 *     'ReadStats',
 *     ('num_messages', 'num_record_batches', 'num_dictionary_batches',
*/
  __pyx_mstate_global->__pyx_tuple[54] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_n_u_ReadStats, __pyx_mstate_global->__pyx_tuple[52]); if (unlikely(!__pyx_mstate_global->__pyx_tuple[54])) __PYX_ERR(19, 103, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[54]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[54]);

  /* "pyarrow/ipc.pxi":432
 *         return result
 * 
 *     def serialize_to(self, NativeFile sink, alignment=8, memory_pool=None):             # <<<<<<<<<<<<<<
 *         """
 *         Write message to generic OutputStream
*/
  __pyx_mstate_global->__pyx_tuple[55] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_int_8, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_tuple[55])) __PYX_ERR(19, 432, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[55]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[55]);

  /* "pyarrow/ipc.pxi":1127
 * _RecordBatchWithMetadata = namedtuple(
 *     'RecordBatchWithMetadata',
 *     ('batch', 'custom_metadata'))             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_mstate_global->__pyx_tuple[56] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_n_u_batch, __pyx_mstate_global->__pyx_n_u_custom_metadata); if (unlikely(!__pyx_mstate_global->__pyx_tuple[56])) __PYX_ERR(19, 1127, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[56]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[56]);

  /* "pyarrow/ipc.pxi":1125
 *                 MakeFileWriter(c_sink, schema.sp_schema, self.options, c_meta))
 * 
 * _RecordBatchWithMetadata = namedtuple(             # <<<<<<<<<<<<<<
 *     'RecordBatchWithMetadata',
 *     ('batch', 'custom_metadata'))
*/
  __pyx_mstate_global->__pyx_tuple[57] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_n_u_RecordBatchWithMetadata, __pyx_mstate_global->__pyx_tuple[56]); if (unlikely(!__pyx_mstate_global->__pyx_tuple[57])) __PYX_ERR(19, 1125, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[57]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[57]);
  #if CYTHON_IMMORTAL_CONSTANTS
  {
    PyObject **table = __pyx_mstate->__pyx_tuple;
    for (Py_ssize_t i=0; i<58; ++i) {
      #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
      #if PY_VERSION_HEX < 0x030E0000
      if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1)
      #else
      if (PyUnstable_Object_IsUniquelyReferenced(table[i]))
      #endif
      {
        Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL);
      }
      #else
      Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT);
      #endif
    }
  }
  #endif
  #if CYTHON_IMMORTAL_CONSTANTS
  {
    PyObject **table = __pyx_mstate->__pyx_slice;
    for (Py_ssize_t i=0; i<4; ++i) {
      #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
      #if PY_VERSION_HEX < 0x030E0000
      if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1)
      #else
      if (PyUnstable_Object_IsUniquelyReferenced(table[i]))
      #endif
      {
        Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL);
      }
      #else
      Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT);
      #endif
    }
  }
  #endif
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}
/* #### Code section: init_constants ### */

static int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate) {
  CYTHON_UNUSED_VAR(__pyx_mstate);
  {
    const struct { const unsigned int length: 13; } index[] = {{1},{5},{5},{5},{10},{5},{10},{540},{524},{638},{945},{41},{570},{1491},{1461},{651},{714},{434},{366},{871},{1081},{91},{24},{22},{12},{14},{37},{33},{39},{46},{13},{208},{33},{36},{209},{35},{112},{43},{48},{35},{15},{61},{43},{43},{68},{36},{33},{53},{54},{107},{38},{839},{1379},{1358},{14},{60},{1224},{1133},{25},{28},{30},{39},{38},{31},{41},{34},{30},{33},{30},{31},{61},{45},{29},{30},{31},{32},{35},{29},{38},{42},{43},{29},{29},{32},{34},{33},{35},{43},{30},{36},{21},{7},{781},{42},{868},{1380},{614},{907},{1418},{1430},{1082},{1967},{722},{588},{60},{51},{51},{1379},{1942},{1262},{1910},{3697},{715},{2301},{2646},{700},{1542},{1958},{1756},{875},{1474},{491},{1386},{411},{610},{1037},{3003},{2729},{1334},{1265},{1335},{2220},{988},{662},{6870},{302},{87},{116},{15},{777},{506},{988},{483},{966},{1188},{391},{204},{556},{553},{1329},{4393},{1042},{3977},{686},{201},{1271},{1512},{1631},{1390},{1377},{1369},{408},{691},{410},{389},{425},{397},{660},{655},{516},{683},{359},{2447},{343},{1141},{382},{382},{382},{373},{1063},{399},{409},{409},{410},{614},{586},{695},{672},{530},{1528},{689},{1505},{3887},{1014},{1618},{405},{1033},{23},{37},{38},{26},{23},{48},{39},{38},{35},{44},{40},{44},{40},{43},{39},{43},{39},{1280},{10},{58},{44},{41},{44},{760},{430},{12},{84},{86},{97},{70},{99},{72},{118},{118},{118},{118},{100},{1075},{91},{37},{42},{17},{19},{55},{56},{55},{56},{56},{20},{21},{66},{67},{28},{30},{122},{121},{37},{24},{30},{16},{32},{17},{28},{43},{62},{64},{64},{64},{25},{19},{7},{24},{25},{34},{30},{34},{33},{31},{27},{31},{27},{37},{1116},{95},{52},{42},{45},{46},{48},{47},{1398},{835},{1519},{745},{94},{41},{380},{381},{28},{292},{39},{68},{26},{30},{38},{28},{19},{25},{19},{30},{30},{19},{31},{102},{103},{25},{332},{329},{43},{610},{41},{43},{42},{46},{44},{45},{48},{47},{40},{27},{17},{18},{33},{37},{36},{39},{38},{37},{41},{39},{40},{43},{42},{35},{875},{31},{340},{260},{1346},{32},{37},{36},{36},{35},{38},{36},{56},{21},{55},{44},{26},{27},{35},{27},{41},{32},{42},{65},{45},{516},{336},{20},{36},{18},{20},{4},{24},{25},{18},{179},{34},{484},{426},{260},{260},{577},{513},{266},{27},{38},{30},{704},{26},{26},{39},{124},{3970},{2622},{3453},{58},{538},{42},{34},{28},{30},{35},{35},{41},{45},{38},{43},{40},{37},{38},{47},{38},{30},{33},{34},{29},{33},{135},{1806},{718},{940},{473},{1214},{575},{1034},{1027},{799},{583},{403},{518},{684},{462},{460},{233},{582},{732},{1061},{483},{220},{452},{621},{200},{590},{700},{694},{716},{710},{180},{1489},{1586},{1274},{1348},{781},{644},{511},{673},{985},{499},{73},{73},{49},{48},{25},{25},{15},{35},{25},{30},{25},{24},{52},{30},{40},{34},{25},{35},{44},{32},{550},{588},{42},{94},{25},{34},{28},{22},{32},{32},{426},{534},{620},{721},{1048},{976},{1046},{2108},{1128},{1409},{934},{40},{221},{1421},{24},{24},{24},{24},{316},{41},{45},{27},{37},{44},{37},{36},{52},{34},{28},{22},{32},{24},{25},{29},{30},{29},{35},{39},{26},{27},{22},{32},{37},{34},{31},{32},{41},{32},{24},{28},{23},{28},{27},{36},{34},{27},{41},{36},{33},{30},{26},{27},{32},{32},{32},{34},{28},{25},{30},{30},{77},{70},{26},{35},{24},{27},{39},{36},{30},{31},{30},{33},{25},{15},{553},{853},{91},{93},{68},{89},{230},{207},{206},{196},{192},{206},{185},{194},{219},{219},{220},{223},{182},{182},{183},{186},{44},{273},{317},{64},{194},{61},{217},{223},{215},{194},{195},{203},{372},{186},{289},{25},{266},{82},{87},{59},{438},{84},{104},{75},{55},{399},{418},{515},{315},{175},{308},{530},{757},{677},{178},{179},{202},{198},{281},{91},{35},{35},{36},{38},{699},{927},{846},{123},{46},{35},{36},{164},{225},{87},{46},{39},{35},{2151},{1620},{31},{27},{34},{40},{2083},{1535},{267},{24},{58},{1314},{610},{19},{2},{3},{2},{2},{1},{0},{4},{3},{2},{3},{2},{1},{1},{1},{1},{1},{1},{1},{8},{9},{126},{5},{16},{33},{14},{35},{18},{23},{14},{17},{17},{15},{27},{6},{17},{4},{63},{30},{25},{8},{13},{19},{25},{26},{25},{47},{29},{11},{18},{18},{10},{14},{14},{13},{14},{22},{21},{21},{30},{22},{35},{33},{7},{17},{25},{26},{35},{37},{49},{20},{12},{12},{11},{12},{24},{6},{18},{9},{11},{17},{33},{30},{19},{19},{19},{20},{27},{28},{2},{6},{15},{3},{17},{32},{19},{24},{8},{17},{17},{17},{16},{15},{8},{13},{66},{15},{15},{12},{169},{170},{13},{13},{13},{9},{17},{24},{22},{27},{24},{22},{10},{17},{38},{21},{4},{16},{48},{6},{43},{12},{22},{18},{18},{6},{35},{6},{33},{50},{10},{34},{37},{38},{16},{16},{33},{28},{28},{28},{18},{13},{25},{10},{43},{44},{27},{35},{36},{36},{36},{57},{8},{9},{17},{14},{31},{22},{30},{63},{32},{32},{32},{23},{17},{21},{19},{18},{18},{18},{17},{14},{49},{41},{15},{11},{15},{18},{23},{47},{18},{17},{18},{17},{15},{2},{3},{3},{22},{24},{35},{17},{23},{81},{41},{83},{49},{94},{59},{65},{63},{73},{86},{18},{18},{66},{63},{79},{71},{61},{77},{63},{82},{70},{74},{67},{64},{63},{8},{6},{10},{18},{23},{18},{17},{18},{10},{9},{18},{10},{10},{15},{15},{14},{15},{16},{21},{13},{13},{12},{13},{20},{21},{19},{15},{5},{48},{18},{18},{18},{17},{20},{37},{19},{13},{12},{16},{5},{4},{32},{33},{22},{62},{4},{9},{3},{5},{15},{33},{35},{15},{23},{30},{16},{23},{14},{16},{16},{18},{18},{25},{20},{28},{27},{35},{16},{13},{10},{13},{23},{10},{15},{12},{15},{12},{18},{17},{27},{11},{12},{13},{14},{11},{10},{9},{10},{14},{15},{15},{12},{12},{14},{18},{10},{14},{23},{18},{14},{12},{15},{12},{13},{21},{16},{24},{23},{14},{8},{6},{3},{17},{37},{44},{28},{13},{21},{27},{34},{11},{12},{22},{22},{18},{15},{16},{10},{21},{23},{19},{11},{17},{9},{29},{36},{20},{12},{13},{19},{6},{18},{36},{38},{27},{12},{30},{32},{20},{18},{13},{10},{12},{17},{14},{19},{37},{39},{26},{20},{38},{40},{27},{9},{1},{3},{3},{19},{29},{28},{37},{39},{25},{25},{31},{31},{4},{9},{12},{12},{23},{25},{33},{11},{12},{22},{31},{21},{23},{23},{24},{35},{23},{17},{18},{27},{30},{22},{19},{22},{19},{20},{19},{34},{18},{19},{20},{21},{23},{19},{18},{17},{17},{21},{22},{22},{31},{19},{21},{25},{5},{23},{25},{14},{16},{31},{12},{18},{31},{31},{32},{21},{39},{41},{22},{40},{42},{12},{19},{9},{8},{16},{27},{19},{21},{23},{31},{15},{14},{24},{11},{12},{18},{11},{12},{18},{15},{13},{7},{15},{16},{22},{14},{25},{15},{16},{22},{14},{25},{14},{15},{21},{13},{24},{14},{15},{21},{13},{24},{14},{6},{20},{24},{26},{15},{33},{33},{27},{28},{23},{14},{32},{34},{16},{27},{29},{22},{14},{25},{11},{12},{18},{13},{14},{20},{12},{7},{5},{10},{14},{27},{14},{23},{41},{43},{40},{15},{21},{28},{13},{33},{39},{40},{37},{24},{5},{5},{24},{16},{18},{20},{28},{12},{13},{21},{19},{15},{19},{15},{21},{40},{38},{31},{22},{31},{32},{20},{40},{47},{31},{20},{21},{19},{30},{21},{39},{41},{41},{43},{43},{18},{30},{19},{17},{28},{10},{11},{17},{18},{4},{7},{14},{15},{21},{6},{5},{10},{11},{17},{10},{11},{17},{10},{11},{17},{9},{10},{16},{7},{7},{12},{13},{14},{32},{34},{15},{33},{35},{9},{10},{8},{28},{35},{19},{1},{16},{27},{23},{24},{22},{20},{21},{24},{22},{23},{3},{9},{7},{16},{17},{14},{26},{15},{13},{24},{18},{30},{19},{17},{28},{16},{29},{17},{9},{21},{18},{10},{16},{8},{19},{13},{25},{14},{12},{23},{4},{17},{35},{37},{1},{5},{8},{20},{9},{18},{15},{14},{7},{18},{7},{11},{13},{31},{33},{16},{34},{36},{22},{23},{23},{23},{10},{28},{30},{26},{21},{26},{22},{25},{32},{7},{13},{31},{33},{25},{31},{25},{27},{14},{17},{20},{9},{15},{16},{34},{36},{21},{12},{25},{35},{26},{32},{2},{5},{10},{20},{19},{28},{30},{23},{27},{27},{27},{30},{28},{16},{19},{17},{16},{21},{17},{19},{15},{16},{18},{22},{19},{18},{19},{19},{20},{15},{19},{15},{15},{19},{17},{19},{16},{21},{14},{9},{11},{10},{16},{12},{6},{6},{6},{24},{26},{13},{11},{12},{10},{30},{37},{21},{23},{14},{32},{34},{25},{39},{25},{26},{28},{29},{28},{28},{39},{24},{24},{23},{30},{23},{24},{24},{20},{27},{21},{32},{18},{36},{38},{28},{11},{12},{15},{33},{35},{17},{10},{28},{30},{19},{20},{19},{20},{5},{10},{4},{9},{16},{28},{9},{10},{11},{22},{32},{31},{40},{42},{28},{32},{53},{31},{22},{40},{42},{28},{17},{36},{27},{26},{35},{37},{30},{32},{40},{22},{23},{30},{29},{51},{26},{33},{54},{24},{42},{44},{30},{24},{42},{44},{30},{23},{24},{29},{36},{30},{22},{22},{19},{24},{31},{26},{34},{33},{41},{27},{22},{22},{16},{19},{18},{23},{23},{29},{33},{25},{26},{35},{18},{21},{22},{17},{27},{21},{20},{15},{22},{18},{31},{39},{39},{30},{31},{19},{25},{17},{28},{11},{6},{7},{7},{7},{6},{6},{22},{17},{12},{11},{13},{15},{6},{25},{15},{17},{17},{19},{13},{21},{29},{19},{13},{18},{13},{12},{20},{18},{28},{22},{13},{13},{22},{16},{10},{16},{20},{8},{6},{17},{27},{26},{35},{37},{31},{11},{15},{40},{33},{35},{24},{22},{32},{26},{34},{26},{27},{24},{32},{24},{25},{15},{40},{33},{35},{24},{22},{32},{26},{26},{27},{24},{24},{25},{15},{40},{33},{35},{24},{22},{32},{26},{27},{24},{25},{15},{40},{33},{35},{24},{22},{32},{26},{26},{27},{24},{24},{25},{11},{15},{9},{27},{29},{11},{24},{13},{31},{33},{20},{27},{20},{12},{18},{15},{17},{35},{37},{24},{31},{24},{16},{11},{28},{17},{19},{23},{16},{12},{21},{25},{18},{18},{10},{19},{21},{16},{32},{26},{1},{5},{12},{21},{22},{24},{30},{16},{16},{13},{21},{16},{16},{10},{20},{10},{12},{13},{17},{18},{17},{23},{27},{14},{10},{15},{19},{20},{29},{12},{16},{11},{16},{15},{21},{24},{14},{8},{18},{22},{26},{28},{16},{30},{24},{19},{22},{15},{21},{18},{14},{15},{20},{20},{20},{22},{16},{13},{18},{18},{18},{6},{17},{24},{24},{26},{36},{15},{13},{17},{15},{10},{6},{11},{12},{18},{10},{11},{12},{18},{10},{9},{9},{14},{15},{21},{13},{24},{10},{19},{19},{20},{38},{40},{4},{11},{16},{9},{11},{11},{15},{15},{14},{14},{16},{15},{11},{13},{22},{20},{10},{15},{10},{10},{10},{9},{22},{20},{28},{17},{15},{20},{17},{9},{14},{8},{7},{20},{17},{11},{16},{11},{11},{11},{14},{11},{11},{11},{10},{11},{12},{18},{11},{12},{18},{11},{12},{18},{10},{11},{17},{4},{10},{16},{16},{21},{22},{15},{16},{11},{17},{9},{18},{20},{15},{20},{44},{46},{20},{9},{10},{16},{8},{28},{35},{19},{2},{2},{2},{2},{2},{3},{6},{7},{11},{6},{12},{10},{11},{4},{1},{1},{2},{5},{2},{10},{12},{7},{4},{9},{9},{12},{5},{9},{15},{11},{10},{10},{19},{3},{3},{6},{13},{13},{6},{8},{13},{4},{7},{3},{5},{9},{13},{10},{6},{15},{17},{24},{18},{18},{19},{25},{26},{23},{9},{10},{9},{5},{12},{7},{7},{9},{11},{12},{16},{16},{16},{10},{6},{18},{6},{4},{10},{1},{7},{12},{8},{4},{5},{19},{7},{28},{8},{6},{11},{9},{9},{4},{11},{5},{5},{4},{7},{33},{2},{3},{7},{6},{11},{8},{7},{6},{11},{10},{10},{2},{10},{5},{9},{15},{10},{3},{1},{6},{5},{7},{8},{12},{7},{9},{5},{8},{13},{9},{16},{12},{15},{14},{10},{6},{10},{14},{11},{7},{13},{8},{13},{13},{9},{6},{15},{6},{15},{16},{6},{10},{6},{7},{8},{10},{8},{13},{9},{9},{6},{13},{6},{5},{5},{8},{14},{15},{8},{20},{14},{11},{8},{8},{12},{9},{7},{15},{6},{6},{14},{8},{7},{8},{8},{17},{10},{6},{12},{11},{10},{15},{13},{8},{13},{7},{4},{6},{12},{12},{3},{16},{10},{14},{5},{12},{8},{5},{7},{13},{6},{9},{17},{7},{18},{5},{6},{11},{3},{13},{5},{6},{5},{5},{27},{12},{3},{11},{15},{6},{7},{13},{12},{7},{14},{8},{6},{14},{11},{16},{8},{11},{17},{7},{13},{14},{13},{16},{10},{14},{16},{9},{10},{6},{4},{7},{5},{5},{14},{8},{11},{16},{9},{6},{17},{9},{10},{14},{9},{10},{7},{13},{14},{15},{4},{10},{13},{19},{18},{4},{6},{6},{14},{8},{18},{4},{12},{8},{7},{10},{10},{9},{9},{6},{7},{8},{10},{17},{19},{7},{19},{25},{26},{19},{5},{5},{11},{4},{10},{13},{11},{6},{6},{19},{19},{6},{11},{2},{8},{5},{10},{11},{11},{17},{17},{15},{4},{8},{9},{14},{10},{10},{17},{7},{4},{6},{8},{26},{25},{19},{36},{4},{12},{9},{2},{5},{8},{1},{18},{22},{5},{12},{11},{6},{22},{6},{16},{12},{7},{8},{3},{8},{16},{19},{21},{15},{20},{11},{9},{7},{4},{9},{7},{6},{6},{3},{8},{6},{8},{7},{9},{8},{12},{19},{9},{10},{8},{17},{14},{14},{10},{1},{2},{2},{2},{5},{6},{6},{13},{11},{13},{11},{6},{15},{11},{6},{9},{10},{6},{17},{13},{5},{20},{20},{6},{18},{22},{5},{7},{9},{16},{5},{7},{7},{7},{5},{13},{14},{6},{11},{12},{14},{12},{12},{10},{10},{16},{20},{10},{16},{18},{35},{11},{18},{12},{11},{12},{11},{10},{11},{12},{11},{17},{11},{9},{4},{15},{8},{4},{11},{6},{17},{7},{3},{7},{21},{9},{30},{19},{15},{16},{20},{19},{24},{16},{21},{10},{15},{21},{10},{9},{9},{9},{12},{8},{15},{6},{9},{8},{14},{4},{9},{6},{28},{20},{20},{5},{12},{11},{20},{3},{4},{15},{1},{2},{2},{2},{2},{2},{32},{5},{3},{15},{15},{14},{22},{21},{29},{6},{9},{15},{18},{18},{6},{5},{6},{10},{7},{8},{6},{11},{12},{10},{8},{25},{13},{11},{11},{12},{6},{5},{5},{5},{4},{9},{20},{6},{2},{15},{8},{13},{12},{16},{14},{13},{6},{13},{13},{24},{14},{9},{9},{8},{15},{8},{15},{16},{12},{12},{10},{6},{7},{16},{13},{13},{9},{9},{20},{5},{8},{6},{5},{5},{4},{10},{9},{5},{6},{22},{8},{33},{10},{11},{20},{21},{4},{9},{9},{5},{4},{1},{3},{9},{8},{4},{5},{11},{4},{6},{12},{10},{15},{9},{12},{10},{4},{11},{6},{5},{7},{3},{4},{5},{5},{12},{19},{9},{10},{9},{17},{9},{5},{22},{19},{14},{15},{14},{15},{6},{5},{5},{3},{2},{8},{11},{5},{15},{29},{13},{4},{7},{15},{4},{4},{3},{13},{26},{10},{15},{25},{13},{14},{11},{10},{11},{7},{4},{13},{8},{15},{16},{12},{12},{20},{3},{25},{5},{7},{4},{4},{6},{10},{23},{15},{2},{1},{6},{4},{8},{5},{10},{5},{11},{11},{8},{6},{7},{22},{4},{7},{9},{8},{10},{8},{8},{7},{4},{2},{6},{18},{4},{16},{9},{2},{2},{2},{8},{4},{11},{10},{13},{23},{11},{8},{5},{15},{10},{11},{10},{11},{22},{21},{10},{12},{18},{25},{8},{11},{5},{1},{3},{6},{7},{6},{7},{8},{2},{6},{4},{5},{11},{3},{7},{5},{7},{12},{2},{5},{9},{11},{11},{10},{3},{9},{7},{10},{8},{11},{10},{7},{10},{14},{6},{13},{13},{11},{13},{11},{9},{5},{4},{3},{4},{12},{6},{11},{13},{12},{11},{15},{6},{5},{4},{4},{3},{2},{2},{13},{18},{10},{11},{6},{6},{4},{3},{3},{8},{9},{14},{11},{7},{14},{12},{11},{4},{7},{15},{8},{17},{10},{6},{9},{8},{7},{6},{7},{13},{15},{12},{29},{11},{21},{12},{24},{5},{10},{6},{6},{5},{32},{12},{14},{12},{11},{10},{29},{33},{23},{14},{5},{12},{5},{1},{16},{5},{3},{2},{9},{2},{4},{5},{8},{7},{11},{12},{15},{36},{17},{11},{17},{11},{11},{8},{7},{6},{8},{8},{9},{12},{25},{18},{12},{11},{13},{9},{10},{17},{13},{9},{8},{8},{23},{15},{16},{14},{6},{13},{15},{14},{6},{7},{23},{8},{9},{16},{14},{7},{12},{3},{9},{6},{14},{6},{11},{10},{7},{3},{6},{8},{10},{8},{12},{11},{3},{9},{14},{15},{12},{13},{8},{9},{12},{1},{4},{4},{6},{5},{6},{16},{14},{7},{5},{12},{7},{4},{8},{6},{4},{13},{4},{9},{12},{10},{6},{3},{10},{13},{19},{21},{19},{21},{15},{12},{20},{10},{12},{19},{5},{19},{13},{20},{13},{3},{6},{6},{10},{4},{4},{10},{5},{6},{14},{6},{5},{5},{9},{6},{10},{4},{7},{12},{9},{7},{6},{11},{2},{9},{10},{9},{6},{12},{12},{9},{12},{6},{5},{10},{5},{10},{5},{12},{4},{4},{7},{11},{12},{7},{3},{6},{14},{14},{8},{6},{7},{6},{16},{11},{15},{22},{6},{7},{12},{11},{3},{14},{5},{25},{26},{3},{18},{8},{5},{6},{14},{15},{18},{6},{4},{6},{13},{11},{2},{4},{9},{6},{8},{8},{10},{10},{9},{9},{5},{4},{6},{6},{25},{9},{7},{9},{19},{8},{5},{10},{7},{8},{16},{10},{9},{16},{15},{10},{16},{9},{9},{9},{8},{9},{15},{9},{7},{9},{6},{16},{6},{21},{17},{11},{21},{9},{24},{30},{14},{8},{17},{2},{3},{4},{5},{5},{10},{14},{7},{9},{5},{12},{2},{6},{16},{2},{2},{2},{2},{6},{6},{6},{5},{18},{13},{5},{6},{4},{9},{25},{6},{6},{24},{17},{5},{2},{17},{20},{12},{11},{12},{17},{3},{4},{4},{1},{3},{8},{5},{12},{11},{13},{13},{20},{10},{11},{6},{7},{11},{7},{11},{12},{4},{6},{1},{4},{8},{2},{6},{6},{13},{9},{13},{9},{9},{10},{7},{8},{5},{11},{11},{11},{12},{9},{10},{6},{13},{1},{14},{3},{4},{0},{1},{4464},{13},{36},{143},{34},{11},{11},{222},{12},{95},{57},{52},{45},{77},{74},{204},{95},{29},{197},{51},{36},{18},{182},{180},{37},{52},{52},{40},{26},{13},{57},{19},{91},{155},{30},{34},{279},{60},{101},{59},{351},{179},{48},{57},{56},{60},{151},{89},{103},{92},{57},{52},{59},{121},{144},{200},{65},{40},{57},{199},{19},{11},{13},{18},{71},{71},{26},{70},{73},{66},{13},{169},{56},{56},{204},{69},{160},{13},{252},{248},{61},{61},{13},{23},{184},{2},{50},{36},{134},{38},{163},{164},{64},{34},{22},{50},{65},{17},{167},{97},{57},{28},{46},{31},{132},{219},{252},{40},{27},{29},{27},{25},{24},{22},{22},{67},{133},{28},{83},{74},{159},{11},{98},{83},{27},{30},{122},{43},{117},{117},{118},{138},{10},{40},{14},{40},{22},{40},{41},{41},{440},{186},{118},{96},{60},{71},{91},{118},{216},{111},{2},{72},{71},{22},{16},{13},{54},{68},{80},{7},{199},{68},{15},{68},{68},{34},{30},{69},{53},{11},{45},{76},{28},{18},{126},{94},{39},{55},{21},{126},{15},{99},{120},{73},{235},{184},{156},{12},{83},{57},{19},{15},{174},{31},{66},{66},{61},{62},{55},{81},{23},{28},{28},{24},{36},{36},{46},{117},{23},{40},{28},{73},{258},{28},{39},{63},{121},{103},{64},{28},{34},{11},{15},{25},{19},{24},{24},{373},{167},{28},{9},{82},{84},{90},{89},{20},{24},{11},{52},{47},{38},{23},{96},{16},{29},{31},{31},{55},{44},{44},{61},{35},{26},{24},{24},{24},{24},{25},{26},{29},{28},{28},{35},{26},{23},{30},{30},{46},{27},{27},{14},{16},{21},{25},{47},{33},{33},{46},{57},{16},{22},{22},{22},{196},{196},{78},{12},{152},{30},{45},{72},{28},{57},{99},{64},{31},{40},{27},{35},{122},{91},{45},{40},{75},{191},{109},{109},{315},{37},{52},{24},{56},{57},{42},{13},{32},{16},{7},{74},{7},{46},{38},{37},{110},{41},{41},{157},{79},{105},{18},{59},{28},{28},{26},{28},{77},{9},{40},{69},{148},{36},{34},{32},{32},{50},{114},{14},{36},{34},{9},{9},{9},{59},{70},{58},{42},{7},{97},{102},{30},{59},{60},{32},{32},{43},{43},{38},{27},{18},{18},{28},{15},{9},{21},{21},{16},{11},{16},{11},{20},{13},{33},{17},{17},{21},{22},{15},{22},{13},{21},{17},{17},{19},{22},{23},{23},{23},{9},{9},{15},{25},{11},{21},{23},{15},{11},{13},{17},{62},{17},{19},{21},{21},{72},{23},{212},{209},{159},{245},{98},{56},{83},{104},{41},{122},{62},{47},{32},{32},{43},{114},{32},{72},{360},{100},{60},{42},{32},{394},{66},{97},{30},{136},{38},{9},{16},{15},{163},{83},{105},{88},{88},{63},{48},{48},{34},{58},{20},{119},{185},{232},{13},{88},{57},{65},{23},{69},{59},{835},{91},{43},{2},{2},{2},{2},{7},{16},{13},{13},{13},{13},{13},{13},{12},{9},{115},{40},{91},{82},{2},{12},{22},{109},{135},{48},{15},{213},{50},{33},{217},{79},{258},{123},{27},{53},{11},{49},{249},{76},{71},{69},{91},{76},{53},{1141},{73},{126},{165},{50},{43},{42},{19},{97},{166},{158},{100},{40},{148},{88},{39},{50},{57},{34},{57},{55},{58},{52},{61},{51},{51},{70},{11},{70},{65},{34},{15},{34},{73},{206},{77},{111},{198},{39},{77},{36},{164},{27},{35},{33},{62},{62},{35},{33},{36},{140},{12},{93},{23},{31},{48},{34},{34},{221},{57},{82},{322},{66},{27},{38},{134},{34},{34},{27},{39},{81},{26},{71},{27},{31},{104},{38},{1},{1},{1},{4},{1},{1},{8},{1},{1},{1},{1},{1},{6},{1},{8}};
    #if (CYTHON_COMPRESS_STRINGS) == 3 && __PYX_LIMITED_VERSION_HEX >= 0x030e0000 /* compression: zstd (60969 bytes) */
const char* const cstring = "(\265/\375\240\345\r\005\000L`\002\032\016\271/1\240\214\212l\003\007\200\322h\031\031J\260\374jtD\020(x\334L\260\006\354i;\307\255\371\2227\213c\204\342\317v\330q\033\307\313\361r\350\361\024p\337\002\351\002\340\002\026ZaG\230\\%b'\205\244\344\210\266t\362\261\237\034\305\366\342AC\177GkK\330\311\265%D\337\332Y\3069\032\036\335\326P}\274 \330\0301\253<\214\013\346\34305\026\341\214\325\317\256\274I\013\020\257\236\005\307\3024\373\237e\366\036\027h\347\005KI\311]\373\262\376L\221$m\317(\235\315\262\010\241\005\026\270\250\270<\245\354\253M\341\311\r\272J\265n\200EKK\360\302\3360\332y\254k\245\330\214\353\\\331\246a\263\032G\251\020M\363\020<\302\216Y\204T\233\334Z\270\345\276\246p?\256e=\016C\226\265\336LZ\371\356\301;\327\237\024\333I\221\321\331\333\306L\032\t\217a,\026\210\274ha\003\330IS\371j\3665\224f\r\3468\r\331s]\345\031\257\255<e\266l\304\312\226m\230\200p\261\215M~\237q'WM\251,\267\322l\235\243l\232\332\227\306Ud4\3155!\203\371\311\025j\301,\305Lp {\177w\r\260\035!\312\206s\232\002\024},B\376\326$\356\317\301[x\217\207y\221SA\223}\016\322\264O\232\242\310V\356N\341\311\240SA\031\023\246ao\361gG\324\226\377\261.h\257\024\001\252\261\234`&Q$\355\233&8\0230\203\320\031N\206*\"\"V\033\202\237\241Fk\306\301v\217\313\233U\320c4\204M\231\\\301&\267\237\265\224<#%\326\007\033B\356zm\255`\317\013`e\240\342\372\030\375$'\302I\261\236\224\367k\273d-N~NiYM\213\2456B\254u\005\363\030\235n\274\020B4&\235\333W\307\032\304\302cx\216\211\244\232<\214\306\271\003=<\357c\035\301E\367\212R\301{\247[p\2007'\331\302H\"\376&\013\373\036\373\034\373\246}\322{&\014v\355c\230\2218\035C\020$q\036v\377\344\312\034e=>Gk\303\352K\337\343\354\267\357\204j\324\226\376\326\2568\360\222\343\254\341>\207\334\265\362U;\007\273b\"y\217r+]\207\3729\2541\372\271mR@\200|\322\370L\351J\241\360j\225f\265\267\245\277\025,V.\373\313;\343\372\3248I\261\215\243\225\362\360tn\273\344\t\247\271\n\001\222\224^\262\373(\343\305RrM\004\214\312\306\351J}\327x>< \016\024\251\024\250\236\364=b\364N\246\314""\330]\375\3345\342a)\005\317\343L\216\237\3615]Gh\034(\302\333:\357W\272iq\037\036\036Zn\032c0\230\230\225\373f\000\002?K@\027Z+w\333R[]z6\274\366\267\306\225\037(\364\326\375\302\306Xn]\267+\037/\013e\307l=V~3\272\335F\261\205X\205\310\322\320!M\021\024A\022\024\037\257\326jSZj,S\000\306.G\273\205\021j{\361I\267\205\206T[\226\034\205\271\3125l\336k\234\330\232\306\346\333\270\201F\261\276\246\311A\035PAQ\301\000\204\003\261\373\332\311X\344\355\333G\237\001pL\357Qk\361x\351\330\300\303v\212(P\n\320\263e5\034';,!ZL,\214\334\205\004\305\305E\002\317\331\327\024\256\364}\322d\354DBE\016\212\201\221\331\t\215SM\352\0214\367\030{\254p`\221\300\366\233\034b0\276I\341\221\031\350\270\355\223\274\257\362%B\000\001\254;\0061\375cV\351\363\214\032\235\223j\316\311\214n\245\321\302\225\276,\226eY;\333\022)\274m\221\3242\343\363\323\nX\301\230\301r\355\331\224\347X\267\215\037K\016\3336j\320\214\214u\263\306\314#\327\311\317o\215e\024\302B\260\373Z)\343\205'\023\251\372)\305{\323?\351{z\236\324\036/\017v\215Yd\214V:\361\200ZI\351Vi-\373\233R[[\312\2627\332\225+.!\372y\316)rD\020$\355\233\"\217#\262\273\340x\354J\3213\275\311yd\374\005\034,\305c\013\017\307\213&\324\343P?{[\302\311\225\013E\200a\262\254\353\302\206$E\013e\254`\324.<\336\344\261\376\030\367\300D0\373U\003\314\214\n\026\"\266\326\262+]\370.a\337C\202\202\000\322\024\t\260/j\254\001\006<\240P\300B\200\245\336\3731\n\027\200}\036\307\311$W\032\334\200\223\033]+\223v\355\237\261n\220\2736&k\\e+\224X\237\206\321\235\227\234\367\244\22378<\274c\325eqr\335\366p\350\010\374\014\220\006,J_\230*\355!U\216i68\244\006\030\247\t\262\340\340Yy\344PI~J\377\301~\306\272n\r!\220\311\301!=\244\214\331\302BC\344\340\320\220b\263\253\256:\030\252K\243Q\344\250\252\nr\211aZ\200V\232D\236$=\216G$\211SE\325\2238\024*\361\017*)\233\243\025g\nS\222\267+\275|\0267\316a\2777'A\327}\"U\247\315\230\365\213\276J\"3\301'\347\021\332\243\277.y\236\306\033\247r\260\202$\373&\025\326\271\344\350`\243\027*3Z\3018_\257\264\326\336\010\330\344\316""\030\242?i\305\276\377\246\260s\326;c\220Ea\223\313\250\355\266\240\223+HR\214~UUU5yv\345\322\210\365\362\263\275\353\003-c8\241\312\323\253\265\370Y\304zsgmy!.\214v\013)\271\212\255\322\355\215+N\177+K\306\234WB\242\263\341|\343\210\356\301~m\3137\223\306w\211]\234o?\307o\237\r\277=\313\3507\345\271\353y\243\025\272\205j]k\177\306\361y\323`\303\030\226\330XW\277x\306\306\313\310IT\276\257F\336\366\301 \330}1\366&C\026Z\233\302\355\\)\265\342\\\261(\273\237\251\005  T0h@\301\000\203\007\0174\2542\331\014\214\2222\224X-\2631\016v\335N\306\312\375\221ajO\272T^\325K\372\270\303\330\362\214\374\265\261\256M\003k_\250t\013\373\203\276T\242aW\256\200\236\t2M\r\006\021\333\300 ?f\030\317:\235\274i\374\356q\342S\362\"hZ\005\317? M\277\252\344^\260ePU\017\003\214\276\224\323\301B\021~\305J)\361\3029\2117\032\3363\231\314\307\303\341\200&\010\222 \2227\\p8\n\035\237\375\023\307\233(~\242\250\322\010Xs\336\205.\237\\5\230\223\330\243\013{R\242\323\311\330\004\026E9Rr\025\331Z\033r3\340dL\232\367f\267\357;\313\031\037\353o\010\267_[\342\363\3347\231&\351I]Gp$\357id\264\341l|\216\030ug\217\373\036\247i^\323\271S\331\354\203Qr\003\316\225K\300\256\r\253\203\206\r#\2650\317\001\274\322\215b;\307\020\005\352e\311e\220[^\344\214\024\216\316\336\216\302\312\027\336^\340\361)\225\356\315Qz>\313\222>\271\376zl\347\216\265-&\016\3519L\034\036\303[\210\326!\355s\220:\206\016\373\030\034\225\237T\223\254\365{\267q\333\261\346\254\305m\257[\260\020\224\2257\372O\242|\334\306,\253\375b!\217\217r\325\226Z\351\244\270lKK\210\253c\223\243\031s\005b\215>\307Og_6\213\024\244\202H$\220\323\337\217X\224\033\265\3209\312Q\342\357\343\316\372\344E\324VOrCb\255!\362\330\t3=F\252\264\010\367a8\017c\351C\240(\3511E\274'\221\344\241\017\361D\022;\226\333\265\245d\315\273\225\314\301h\2014N\213\030\334\000\203\342\001\004\257\267W\315E\363<\rDz\2462k\240m:\3256\025(\330\311\366\210Q\215a\030\246\267-\364bz\241R\322\254/l#\357\375\214Uk\324\033g\271\t\254\345\302\343\201\264\242qW\272\226\205\261\363@kt""\023\202z\346\\\203u2\232\207\346;\300s2\024\236l;YYF-\372z\204J/\016\204\366\336>o\337gQ\351W\332xC\020\003H\201\342\366\201]\243\343\240\322}\025==\202*\270\302\311xd4\rdY\226\305\334x\234\332\231s\345'_*\226\325\227\327Q_\n\351\026\367U\326\350\257\303\356\271\336\375\2465|H\326\341\354{\032\244\307\221l\364\244(\035\314d\316\242\273\001\303L\0056Be\t\006\316^x@\034\217I\222\026\200\370\034\r/\222$\020k\32067R9\024\r\375\275a\250\263-\235\305\332p^\0147n\271\027\277l(\273B2>\327\016\366QD\236\277tv\203\275\201\272\221\305\205\2400n\300\366\177j\377\367\025\251;\361#\203\301\032\363+#_\036-&\022\372\264\353{\357e8\025\304\200\273\t\261\306P\322}\330j<\273>N\027%\010b\301\202\0038\216\343&\007=4\002PQ\004!\002\302E\344\240\030\"\001<B\245\020T\227\256\030\240\266\006\321D^\343\226\370\022zR\t\333\320\320\360\200L\216\211A\202L\023\020\010\344j\232\346\231D^\344E$\016\030\354\202\0210N\245p\266\2459\tx\243R\244q\000\201\210fr\032\336d\251\307>h2\211<\211\304\252*\213\312\272R\355K!\257\250\2265\221\032\025\274\234V\033\266w\225\r\213\024*kt\266,\313b\356\351I/Z\212\231\034O\212HD\2128EE\307\022\r\"\247\252\252I/\357\373\3342%\036\2231]\373\032F\201\363\25099\211\003M&\255\030\347@\323\234(e\324\264\211d\033o&\345$\365\256\217\363\000I<R49\023\311#E\215\210\301A\332\nF\267\336\007(*.\242Cg\337C\243`\362H,\313\262\374'7\201\000O\236o\001\222\034\2104I\321\003\322p\034\216\006\351\001y\023n\034\310\221vv_\276\201eA\026\246J\033&\311\262\036\020\030\335\241B\211\025\216\242\306\276\005\210Nh\356?N\203\001\262\000=\034\223[\026\203e=\224\236M\300GJd,f\021R\200\3763\322\255q5&G\303Y\027$\007$\311y$\251\277c\256\346!\177i\"\257y\214wh\262\254\271.\022(\020d\341\240\271\036\216S=\014u\346r\"\373T8\013:\250\022U\017\263E\t\024\206\273\320\031\241!e;\200t\266\363\345t22kt\345\033\223j\225\227\3344\330\244\377*/e<n&L\216\336\336i\205\342\202s(l$9\267Rn\3357:I\231T\362z\362&\236\202B\344\352\354{\014\221\232\346azL\017\312\277\2751\273Vn\306J_\275\266\223\022X\374\311Z\273BC""\355\223\034\016\014\223\224\301\246\211l\006S\000\205\333\243.!\266\333\342i\266i,\3219\3115\330,\302\356\275\246y&\022\205\347MO\332\311J\227\233\306\301\371\247i.\007\322\036\206\211aUu\343T\225\214\023\260!\371*\317\333\307\335XkHPF\033\253\034\365\351A\322\261N\031%e\n\234\307\2312)\203|.{\277g2\346\300\236\020\016\214\271\250\311$\303\201eL\327\276\014\211\233\t\357y\n\034\257\3741U\272\026\223I\362\020U:#\021\n'N\034\n\317\303RZ\177T\340<\222#\200\000&\367\226\363\342\252\021\215\263\221\232q\343|L\323s\234\252Ts\034b|5Y\374\266X\350= ort\030CD\036\260JV\375\274\003\232\234\250\004\330\207\265t\212D\002\000\240\000\223P\000\020\022\223\317\345\202\301H\223T\345\003T\341\310GZD\205\311E\201(\025\024\203Ia\014\311 \014\006P\000\003\340\000\001F\001F0S\252\352\006.'\317\201S*\002\355\241\350\301\021\220J\325\000-.G\304S\317\344E\321\237!>/\305a'J\321$\246\214me\225\343\300\305\376b\253v\3210\335\244Ga'\235\253\234wL\334c\266\313(^\277o\016\372poE|\371\227\273\327\240\215RVu\272\031\357b\037R\366oJ\207y\340\305\000\023\201\312\31177\247\241\372,\216Bg\003>\353Yf\334\007\310\204\027\036\t\347\234\207K)\217\177\263\217\307\360\275\314L\220\212\250S\237\267l3\232\316\251$\203\372\343\211}m\304\321\003\316\275|\223\375\002\233Ra\225\213\332\006\273v\311\322\332ZQ($-\204\317\211\373)Z\267;\303\332/\034m\347\262\032\343\222\360a\357?D\"LqR\346N\360}k/\304\240\336Dju\375\233\252ss\026\241\022\375\354\000*\222\220N\233\257p\225\023\021\232\327\2668\t\224*w\227{\335\366\215?\344!s\263b\232\301\005\364\255\201\206q \327\322WB\"U\2563)Ns\023\257*\010\304\204\234[d\007\301p\004\000ZH\010a\301\206\337\r\263\357\242p\227!c\354\002F\331\276\341`\275\324\006\351\316V\341>yk\003J\357[6$\330!\266T\346\344\262H`\266\257`\333\026\370\303\263,\017\326\"\014?\036_;\003\002M2q\302\020\321\025H\216\301\353\324\317,%x'Eg\237!0\315<2,\353\022\220\261\027\274^\370\367\324\004\371\323VO\013\241t\327f\324\241\316\231-\201\300\314/\237\276\263.6\234\336&:\035'o\311\306\006\317UF#\335k\371""\211DPs\006\207\030\333\303~aF\313\261\340\272\014\021\2156\324t~\324\272<\245\351\321\256\366\265&\245Q\244\257v\254\300\021\206E\300q\2339^\000s\253\237\244\037\030f\207\344`\233\376.\032\371\272\326p\320&\215mi\240\233\000\017\306B\013\320\223\274\023\035\005\245\273\266:4\242\327\302\260\356\t\261\017tJ\355\360\262cD\263 \037\274\203\r\361\3268\377~\035\027|b\\\r\302\361\275\320\221\246\030\335\265\217\021pr\354\217\214\206\204(\331\253\305\032#\276f\314#\320J&vt\362\n\220\356\027\313\255u@j:>fiM\316\031Ij:t\264\243\224M$k\227\030\002/6\177\270\361\267\250\235S\204\224\272\036\342YG+\375\2458\223Dr\014z\275\202\305\367\027\021k\245S\312\241Xx\322\221Wd\301#\033\0374'\266{\216\030\234\035.4\226\r9B.\272\031x\016\206m\214\217\001/\030x\360\3509\027K0@M\037\335\301\001$y\010\245\0246\201\036v\332T\226\033\021.\342\315\273\ni9\365\260\000\243\023\037u\336\250\235\247\036\030\261x\216\350\t\2049Fm\270[.Q\336\275w\325\257S=\257zx\335\327p\263\305 \023G\227Xa-\365\"S\nN\244\225\246\305{\266k;qp\334c\212\354\361\031+\232x\300\017e\030\2660\350\341\253\277\233'D\037\273Y\321\016\330\003\336U\373!\034V\301\007h\n\272AP\317\315\035\326#w\325\263\013nT,\344\273g\213\037\010\264ZUWQ\205\377#\232U\232jE0\203W\266=\211ys\332\027\226B\267\037\331\246\256\253%<p3\277\033F\224\346j\362@\211mc4\r\231\344\025\352\336\210\355\020\371\254\r\217\316_\232%\333\021$\3157\215\005\322\372?a\311\316y\017\361|a\314\206\355gVE\376\346\222M\271\317|@\273t\315rl\\P<\204\007\313O\313\345~\016{C\351\247\314\325X\245\0253\342\345\250\233e\034D\312Q\004H\215pZ\\\005]\220'\020S\334\321\3064\276\226\233\013\313\026\353m\270\013\313\304b\034\022\324b\256\220\350n\"GK|\231D\303zG\326\202\313\321N\350bj\035\3008\331\271\351=\366q:w\204I^\340\370\306\347+\0139f\353\356_\224\021\356\276\227s\307\224]IU\327J\335\375\024\003zq3\255\276UG\246\375\364h)\t\334u\211\031\014wM\304j[\255\025\257\031H#\225\332B\323\027\370\276}\342\315$Y\020\226\305\303\301\260\210\323z\344{\014\330\026,\254\254\237\342\306e\373""\350\251q\314!\374G\223\377\361\017\252\017\037\377\234*\3068<p\035\206\004Q\320\3658\246W\365\377\306\372\223\323/\356`c\250\303\t\031G\263=\247q\363\376\220\356Wy\207\016\322m\231X8\371\321\365+\343\241\322\331x\366,\310\303GS\364x&i \217\356\241,\226|\024 U\177\354X\257\201v\356W;\302$\340\257\034\300BS\307\365\205]\272!\317\003\021\013\316\237\326\310JRX\006v*\304\327\"cZ \225\206^\360\3134\204\035\334x\221\360\234&~ss\216\255K\360\002$\323 \336\262f\331KB\311m\355vW\031j\336q0^]D\031#\230\233e+\246;\315\320mU\032Uv\255\240\003\220\257\263F?\256\366l)\267\231\275\205B\363\0032\264\000aoX\353\001\203AB\000\273\317\234O\361\037\013xh\327\021\2036\366\213l\010\"fo\004\363-\200\326\035?v\203\250\255\370\363\004qs\004\203\211\350XE.\335\356\016\221\203\360\351\213\272\024\r\321\253Y\207\234J\254\337\246\024\025\240\372r?\034\257\254$\241\362^\207\002%\027\030!\357Q\267\024\033\216\343\304\252\303\021\017\314'\300\356\004G\317\300\333\227\271u=0\n\231n\004;\0168\013\\9T\216\036\344O\201\223\275\323\375\005q\320\323<\010\257g\336\241\247\253\336ZT\345\336\335\323f\270\242}\000K\273X\347\016\334\237_A@\205s\000-:^h>\000\0264\200l\026\206t\226D\336\30616\255\t\210\010\260\275\263m\353\232B\010b\236\257wef3\214\357'\314\001\307\224V$\\k\220\021h\024!o \r3\264\260\013\351h\337\204\207i\374\255`\260\357O\250\217]|l\300r\000p\322\2543\210\357\341:r\353Yq\300\\\225\347@@\345|N\014(\r\365K\347\370C`\360\270\307g\007\035\302\000H\355BP9\337\325\260olU\\6F\330\271\030qe\001\302\214\212n\023 f\na\360_\324@H\"\017}\372\022\017\264|E\352Nz\312)\316\315y\367\210\023S\242rA\325\263\324\031\001\000n!\025}uJ\267\362\361CW)\317\345\217o,\305\251\001Y \3468\361\330\262%\213lPc\337\301X\207NI\365\275\217a4\035\025\234y\005\363=\nI\014(\234\310\312\242\305>]\316x\306\017\0330u\005\277\320Y\274*]\201\247\256\004\362\">{:g\370\"f^_1\n\331\313\2404(\345\353\225\177\"\222\273z$\356\021\273\323\0038X\r\2027\347?YL\302\270o\245\344C\330[\034CV\346\347s\207=\014j\325\tBR\275q\314y\362h\361K\r!""\312,\023wip\t\310\204\262v\317\263\215\250\215\301h\014\007\031\344!ZGTb\251\322b\255ZQ4\324\265\334\237\277B\006\022\236\370\303\377\213R\216\223\0378\013{\037\256\030x\213\035\210\220}\216\267\206\007\362\014t6 \202\320^N\023X\222\246xe\031\013^\372\204\010\236\032$\332\013\344jc\024\355J\226\247\223MM@\351\225\346\010\212\236\000\270\254\177\342`r\366\266\243\304\257y\356\202}\342{W\203\\\371pn\345Z\216\217:v\307|O\017Q\334\014z8\346\331\013\236\003\343U\214m\0041n\312\272\374\312\005\352\031\017m\261r\n\030\263\325\343|0$A\240vy\267\03440\207YJ?r)T\254\250\017\232\360\241\272\217q\"\024\004\031$-\236h\337\274\251\226s\177gn[\"q\251\272A\r\311\324\036#\253\205\222\241\301$J\300\272\313\2758\373\371\2300#512\225\227$Fp\221:MU\203\233\023@\341z\324\020\314\217*<\247j\232\327\032\236\034\2464:\020\323\351o\276Q\255\373\240\256\211\375\304\357\323\0306\364o\233W'\256^p\370\303k\326\250\300`y\343\232\n\002\036\233\223* &\345B\375\344ML\233\n\177c\365\215\221\243`RP\363o\033\352\342U\000\\4\311\034\334\337}\213\301'\351q\375\224\326\266\017\n\277/\034\325\316\0342\217\2002q\370:\222\362\003\177\r\366D\316\242N\235\256_\237I\233t\0014\002\221\221)\005\346\352\303\373v\303\326\236$G\304\213:\337\351:\205h\3336QP\357\221N\350LW\313\253!\0224fV\262P\036\367\nv7\017\225\342<Y\311\201\377\334}E\272\305\0358\217\"\372\034^\375\0061?\206\0076\376|i\316>\377\014\225\301\014j7\320\007\241\350\177\311N\024i9\007\034V\260+$\177\332\032\217\254\031I\311\001~\207\265\246\004U\013U\026\340\371;e\300\200\304I)\236\277E2\201\016\323\305\365\327T5\235\307\377j\240\210udr&\034W:\000\366Djt n\245(\364\031<$\002\241H\325:\212Z\243\244\331\022\256ZY\203\001\337g\312\223\322\266\231\337\364\364E~\270\214d\224\374\260\267\201cs\033\247J9\350\356\202u\302\264]\020(\214\222h%W\222\360\241\213\335PT\273$\353\3075\031nV\304[\335fE\222\2407=\032\347\215\2036`\371\251h\203\367\226\361\036\300\004-\010t1\371\250\376\020[\322\3717\364\010\264\252\241\211\260\n\324H\001\321\031\317\005U\302\3012+""\276\n$\313\320]\260\321\332\305m'\241\301O_\375K\223P\262\023\371\332*IX\r\250I0\357\343XR\035Z\014\345\023\267\306\216 \033\375\253\000\005>\3442\2502\261i\236\335\\\355\2577\020\360\033\365H\345.\017\245\316\375\261\255\226\236\035\356\004\273\271\365F*(w\377\263\221bh\367\240\300S\232\026\232>o~\243\363Sf\236\220\363Kc}\233V\203\206>O\264\303\303]P\335Y\307R\020\212O\t\360\346\0019\230\334\034\006y\201Xfp\221^8\020\025\016@\355z\314\245ko\211p~\316\257\263\237\322L\267'\342\216G\352O\330\325Ce \006\222\"\265\2537\023\221\215\305\235\256\371O#k\355(\367\027\341\030\027\207\342(f \006\rRM`0q\210I\214=\2028\t\275\372\375B\243\372\355\032\275\361&\010#\276%\271\271\211\n\027\\\200C\320\207\006}\rP}\026m<\232G\264\367\235!\3232\245}\355hYW\0316V\213\273\204B[\362\3176\255?5&\216~\0304\221\007(\234g\032\275;\260\300*\023\203\003\2155\343\226\027\316\000\322\360\214%\215\206n\203\316\000\327?~d\237w\377\361\010\023 \375\350\221F\317\326U\005\331\250\231J\342\306\362\311\035\000\031#\256*\327(U\244\231\264AO^\352=\246\311z&\222\177q\302\373P\2034\t\347\305/2D7\262\230SX\240\325\354hb)\004F#\002\274\035\"QK7\023b\327\223\222\t\n\230\211\357\247\202K\270ajL\033\302fCP\312'\320=\t{,\307\216\001\032?\350\036\024\274\244\023\350\203{A\206>\r\335\255\324\246r.\232\266\362^\033\177\316\370e\336f\224u\346Mm\303\373| F\034\025\362\277\222>l:v}\010\316+\025\3105)\020@|\206&R\212\237\025\367\315\271\nUHq\036+\354\275\010\223\332'\252\0267\2438\215\220\250\000aI\337}\364\220P\256h\300\321\270\032\033\251\255\342\024\307\nZ\305{\\\230\370b\025\374\\\227W\025I6\320\007\307\255*Py\356\323\202 :\007h\205R{\377Y1)\220\335\254Cja\321\224u=\033\215)\357\205\0160\331]\242R\322]\004\313\272w\260\2302\352K\3112\037\352\374\215e\334@.\305\377R\210\274\036A\267\251WDU\256!\333\310\333g\252+\256^\274\233\212\251\301\361\204@LIU\260\242\326I,\261\026Fi\031\217\331\217\334\220\005\223j\207\000\360\341nG\315\3661\217VU4\221X\331\301^\205X1W\\\305\247\207!g\260\277\276\020-\300\247}\032cjs\\w\"""\027jA^\0376@\255\370ax\371\032\2012\257\247\t\325\021\3066w\305\201x\202\003f\027\246\330\200\216\210\322\205\002\325\225\264<\326\220j'\271\t\205\322\250\024\356\214\2024\032\311\2050^\335W\301\321\021mA3_\007\200\263\201\210\225DK\312G&l\005\350\025@dQ\204\367Q*\r`\004\211\367\324\210JR\366U\311Io+\315\310\034\343\323\3347\232\204V\nPQQ\242\310\346.\233\3606\302'\355\023B\365\252\273B\254\220\002O\266y\250l*t\314\341\214\253s\376\374\205\271\234\254V\315Y\225\226\356\220\317\375e\214M\332@\267\373\336\321\006\004\361\301\314b\202\322\374\277\340\215\005\2031'RW\206\371\347\372\230J\233\323~\036\335\317d|MV\202\341-J\206\030\247T\002\315\376\347g\027\267T\351\006\305\322\\\253\211\3076\201l\026\365}\232\00115+\256\010c\335\243\361>^\213v@\201\006\212}1\300\353)b\363<O\032\300wc\233\370#4\362\253w\225\024\001\242\206\317\252\\\177\0134\023\224\366\370\227\205\351\256e^]u\005\003\203\007M*xO+\247\004?\214\213\341C\001\016\250\275\301T0J\303\345j\204\261\253A\017'\264/\034\030\r\"C\310\344\225\203\205GV\355\320\027\371\316\367\231W\210\336\326b\245\363;O\365V\325\210\224\351\005\242\330\263\252\007\215]O?l\344\265\206\325\215\204\014\314\236i0\031\215\016\3637\"\250\242\235+\266\340\306r\341\315\230[\332\017\270\354\024\374>Cc\246\244\252\206c8B\213Q\323\341\016\025W\301\375\326\005\261\242)F\r\223\273\311\361\217\365\331E\001\304\264\006r%\301\022\205p\275F\351<\367\016\274\221tI\377\014b\225\350\216\333\371\\v&\032Zv}\177O\203K\307\232<;\255\300\001\324\232\002)\212P\256 :\245\360\377c\316\254\231\276\310\027\025\310\345\232\305\375[\212c5\3374_\247t\307yWh\374\013\333\370\353\263C\204C}\273v\271\336\275'\370)\001s\033\337zn!V\371=y\352K\253>\271\355\000\022rZQ\0261\262\332V,d\003\360\273[)^\373\010gB\247\356\310\244\222\241\213\323\362\260\334\274\320\2501\320\337\324\364H\270I\270\013\023GZ\3302y\303\364\\U\252\252H_\366\216\nj\017\322\177y\027\261\303<\361LgD\333\315\347D\036\260\234:O\215\213\253\003\"\255\022\001\034\333\007\354$\367=S\202He?\301\365\332\264<X""\027\323\316\346\214\262\235\260\376\274}\240\313\003-\360\207\002Ke\340\000p\232a\254\017kE)#\nj\r\253S\360\220\374\234y\024|\244\021\270\222\235\271m\360\244z0\237\211n\365\031W\351>C\377\365\201a\266\205\036\337%\205~W\036\\\212\244(\377|\220\251S\261Q\213\361\364\266\233\250\255\024\346\003\014\354`M\273.\221\213y\223\242o\325\t\310v\036bhr\037\222\311\274\367\2455\004\341\321a\235\377qU\244S\377\227\007\336,\005\222\264\030\341\307\242\326\214\216N\320\236\320iy\306\334g\231Q.?\307\234\340d\322f\334\2468\334`\337\211\334\367\317+\335\026[,\3621\316!v\004\233R\211\243'\246\026v\210X\277\306\366\223\035Q\rn\310\0058\277\226\322\376z\022W\220F\362)\363\026\003\211N\307E\006\026\314\376\202l\314\234[{$\363P2\225\033\300\"\224\327\324\010)\001+B\345\214\031G\250pdm\022\224I\203\026\03391\274\373\366\301\231\376^\007v\236|\265\031\340EyH\026\320\320\336XT\244Cj\014\352\210\261 0\036\027\233\226\306\262\303\212\272V\031\247\016\013\374\217\265\316'8\352&\234e\302\344\363\330\242\0365\343\215\000A\3173_O\305+_Oi\372\355\232\031\361\321vM_w\223\234\300\272\230\250\250\371j\367\200\273\226\030\3410P\206I\274\177\270,q\355,Y\013*(\377\3210\277\234\002\330e\036p\357|j\241\345\020\317r\267\t?\366\023\nT\245\312\014\265G\364\r\275\346#\343+\251\274\002$z\342E\257+\273\240\343\343\250\030\231@H-\026\340\366\036-\200\032&g\000\346w-\327s,\341\374\314\305Nt\0315J\267y\177\005\356s\3353K\242\263#\031J\207\273C\037\352\374\253H\212\346\334\367<\372\315\221a\022\370\355|\262\337j\007\202&\277\347\360\271\2427\310\250\177@3\3137\n\232\216\031G\274\301\232fV\022\r\332,;\306\345\264]\006\366-\340\"2HlvU\220W\223F\344s\264\020Z\246\005\206H10n\005\364?G^\352\237\026\222'\322\212UG\333=\374\330\247>c\177(`\314\001\225\261TR\302\207\033%\334*\227\302\033d*\302\013\324\242\n\200R\003\373\n-77\212\341\331\027$z\333\227\352\201\307\\\232\\\360B|\276-\363\345<\014\212\312\364\2658\323\334\212-!\236\316\276'Z\272\250\323\023@2d\345\205z\331\013\252\001\227\310\314aj\210Z\036+\004H\215\232""\323t\230XG5Dm;o\375\267\226'\305.\207\022E\331\343\255\341\317\240\340\374\222ZsQ\"\325\237\026\266\337\206\372\347j\376H\336V\001\220p|\203\363\033\205\237.[v\001\253\226)zgo\337mCD\244\267\230ZC\302\351\333\030\314\371?\267\001h\370\251\257T\233\241\220w\332\014\033\266\362L\325\240\206\240\337\221\247P\377\354\225L\304\340\024\355\312\300\310\202X\002\255\246V\251\177\206%\253\rZ\235\321\315\316O>x\342\226%\032E#\254\347\036\030I\326\237\204\206\251\331\367\350\3079\271\232\001\235\230\265)\024T#\010\352\240v\331\2446^E\265#\263\332\364\260v\361\202\t\317\\\307|\214J[?4\360{\276\332\300U\255I61N\005\nb3\026\342J\273\336`_h\217@tE\323\017m\333\211\016\362\300\267\001\324}\342\260\nE!\321\032\221\246u\360\2525w|\021\352\326\303|k\"\341\032\363\210iV@\277\303\354\231\332c\354F\257\261\261\237cG\024=6\203TY1\241\260w\002\230\310\030\306\367\360\373\275\025\257H$\003\327\215~\rJ.c\212y\255Or\325\311J~ \212\3260\037\014\227>\235\245+\202\303\020\016Wc\225\263\020\245\350\230R\026^\337@\251\304_\005I\032\227\242q\222e\214\321\030\366\250K\202hG0\026\253\367\250\315f-S\240\266l]o\3312\304ek\321&`q\323\213\007\312\241\363\330\317\240\232wQ\315qJ>\356\226\240\3618.H\212dX\335F'\374\376\373\333:\242)\341\216\244\365X\313\377[\255V\273\032Fm\264H\2222I\223\245\335\333B\337'\357\005\230\264\254A\277\202\225\324\013U\372\330\225#\313\341\034!\332\202(\300A\375.\236#\336\023\327\343H5\376\344\272F#8\203\n\336x#\315l\261_i\366\271#\222\2141\306\355\365\325\037\200\226b\303\207\335\372:1n\223\324K\025vm\247/\264\312\016\243M<\213C\247\230\220\0200\203\310\243\260$\345}\003\207\343\327!\354^s%\030\376\t\250\245z\366\221\225-\375\365\273\346\177\201\000F\220\263K$\010-\243Hr\271\236\277\037\267\250\271H\250\211\261\034q\317M#b\375_\231\006\352\325\3324\222&\243[\210\317\246\315\265\210\257\227\377\001b\312D\226\201\326\230}\274\324\204\366t\003l\001LWU\022\337\333\214t-&\310\275\2467\264\341qQ\207\207\352\345\311'\021\277\316\211\307\037/HT\331:\340\275\344\241\202g\237B]\013""\\X\220\233i\247W\342w\364\332\314\360\375g\363\356{\207\254\317#\272o\023C\260\005\202b\002\3050>\305\370ZD\363) \213\370\211\324\253$\003\010\r\231|\006\003\253$\237\255\265TC\310y;\233\241?\177PM?\343\267\205\3625\2457\315e\243\000:h46\001\343\001\274\374\343\006(.%\372K\244\311r\211`\036\177\346\005\036:i\320\220\243\333\250\300\004I\362\\\263\267@\251\271\350\0104\220\250\024PeF\025D\333\235\025\337(\251\037\\J\242\275\200V\206\351m[\267\250t\223\313\221\247s0\322\021\177W\200%L\327J\301\232\327\311\311W\327b>\301v\370\345\256\2713\022\3503\030\302P\236\252\301)\347\317Q\354o\313\300<\026?\251\200\026-Z\313\262#uB\000\021\203B\353\005\247-\274\203VE\344A\"X\014\212\"\360\247\251\352v\356\036\232\207e\300}\354A\335\266\202\212\331\377\010zG\341!D\357\264\277\376vA\212\376EH\335m\\\270\253&w'l3\t1\t\347\001\250\332\037\2556&\314ne\237\372\207o;1\256%\301M\r\206\264\264)\237\215\022\332\226\347\367\221\232F\242V\304\366\341\232\205\242\240\313\255f\371\363\332a\323,\256\334\223\256E\\\350\235RD\357\270\361\333\250\352'\334fXh\363\265\337\017\217\031t[\352Jxu\t\251a{\024\243\274~1\360Gt\352\230\002\367\325=a\004\314a2\313\374\026\221m\202Kf\021u\277\324\351\272Z\3114\250\252\211\233\2563\357\351\350\363j\223\273h\376m\3223G\330\323\354\346\\\215_\005_-}\225L\266\376\372H\372\301\372D\270\255\010[\306hd\024g+\243\003\t;bN\217)\203\347\203\363\327\214e:\206\250`\347,\245\302\232\036\304\337YA\020\251\006\371\273.)\010\372\364\006\210\373\304\271\206\246q\r\007\260\321\016\226\312\202\204p\327\341rF\014O%\313\305\301X\"\232\025t\317\242\014\324S\245\330\311\230\277\261\036r\311Z7\355ozVY\2019\353BHT\005J:\300\306S\017\206\244+\214\234Oo\216\315@\312\265\016\020\256=\356\207Z\232\350\025\223\036\030\177\242\211\241]79\354\227nV\227\306\331\225\025\327\317\237\203U_\255\312V\223\250\t\357\n$t\266\025\261\263\314\264\354\t&y\254A]\271\345\375\t\007c\346\313\3073\330\360Z\031\025,<d\251\346U\003pFm\034\271\324\211\336\215\034\223\354k\330\230\014zI\345\243\313\327\360""\277X\024\236|\347$s#dSXM\343\230N\375$Q$\237\013\326X\32414\352\"\370\025\341\2541(\276\323\274\274\333q8A\273\035I\222(\022h\314$\224!6@Xfwe\274\225\225S\263\351\353Z\240U\227\304Q\214\365<~@\2018.?\301\2128\2721+aa\257Lw\231V\243a\371\216\327\344L\224\250\325-@\355\356G\320OXK\351\202V\027\372D\243\242\375Y\372D\2614\030\271\\{\212\250\362\266\030G\227\261M~\000\202\237@\237En\342\022f\340>\202G\363\026\244\177\343\361p\360\262l\003T\211\340\003\033\203\323\203]\207\214H\360\371fo@\352\375!\367\222=\305\3632tG\246\324n:\312\261k\264\034=\363\345\376\000N?*\216r\243d\205\346\236\236\246\207\330\035\242J\035\345\256\372A\314\223\262U\030\026\371\257\332JL\237:\r\253\202^C\361OY\233\346q\252\263\233\246bB\202\034\r\227#~ _C\323\272\354s\346\206R\335\265\346\362\254\356\300N\025\356\002^V\343\320S\304\\\272\326 \326\2075*\026\212\013\235\254\315\3444y\237^,q\207\222\033\336j\267\341(\033Y\230t\221h\342\362\026\023\035w\320\030EO\211\302\nm\222P\326 \3016\274=\232S\342\357\000\222\026\000'\026\331\345\016{\353\204X\260\004\374<\010\221A_}CEL\362)Z\223f\364\032\t\362\376Ij\025\315]h\214\0331\375A\364\021\tZ\332\340_\204\354l\036^)-BI\245\272\001\332+\345|\027O2\366\264\303|\250&\315?\237\214.\242\324\246\251i\037\260\365R\270\356\303T\215\022\335\340'\220\307w{n\236\272\027\002\226\2649\201\216\035\335\2501\024\177?\331jT\035V\303\021\336GE\271\273\354e\241\254\002\361-1E\332\006\342X\016\252\021\000\325H\352p]R\307\242\376F\257]\t\311\307\213'I\352f\036#Y\003\215=j\022\243HpJ\25332\301\351cP\301\315\313\3438h\313\243\303\002\323!\360\351\313\315\200b39\007\2419\032C\342'\360\262;\372\242\242\344\217\221\331\346\363@uM\207\013\315\020\217\367\251\326\376]\013\023\032Q\254\2036GZ\246,\324\214(\030\377z\314\347k\250$\037%\302p{\343[\"\273\344\r\247\254\341\032\212\234+\240W\016n@\263\027|y\r9\317r\247/&\237\322\241\251q\017\034\262#\350;X\210\220Z,\275\025\334\3042\241\034\262\356.\305\216\004\224\355s\251Cn\240\347l\212\016\025D\212\026\032\022\361\357\316[ \232E\310""\027\374\356\270\207\277B\235\361\030\252\025\366\350\374\227&jT\211\002\2522\212 0h\202K\311\372I\255\310\274\343=7\321z\346\262\300[\031\356V\267\362\332@\2768\216\201p\322$\207\352\274\030u\3023\007%\222{\204\201\253\025E<#\261\357\261\020\234RDl /Bo\320\303\006\272\267\034\371\215\375\217\0252\326\321\2019<\307\346\025 \374W\344\236\377Rg\364\241\356B\"\234d\254\304\227\274v\246\362\264\206A[\314h\320\231?9\364\302O\024\336\217\257\304SI\307\226\t\357\215I\005\276\326\022\357\263\364o\243\363x~&\264\016Y\010\312E\252}\376L\370\334o?\327X\235\267\321\273\254x!\3116\025\037c\t\200\221\267\213\256^\366R\tw2\2709\033\255\222$\372^3\331?\207A\343\3353\340\030\347`U\377\241\002\002\035\310\365\354\373Qo\225z\010/\260\241\036|\310\001\246\370~\2519\345\024\313tL\244\207&\001%\r\255)\212d?5R\342\305\201I\362\313\364{)\2219\345\222LZ\221H\014\010\327@#\365\0078\347r\235S/9\274\322\327`z\362m \035\007]C\363\tG\2067\030\311\310\222d:\013\310\rx\361\022\243F\207A\022\301<&E\214l\366\371\241/\344\340\014\220\320\305w\205\306\025B$#\010k\001\003\344\374\262\226<\351\017p6\261\271\n\034f:`\177%\200\265HK3\021\3750?\035c\257\345\370s$\013\302\246W(g\346\330\362\325\021\227\330n\006\021\231\350\236\213S\363\201;\212\007\352\373\307\2436\276\257\337\344\361\014\312\216\301J\263\362\026+v\235\353\354\364I\035\347\211\246O2\351\275D;$LE\242\0379\367L\223D\266\361v\250\301r\233\221\312\312\317\205m\014\350%\230\373\"\020?;E\221\275.\374\266\327\244\005\353,\335;pE\365\267\373\370\r\326\357Q\346\272\202\241\321\326\227\334\251G\201\036\367\177g\257\273\367\220\004\3257\310\234\033\306\345,\323)\020\253\256\301\200\345\021\314{\021\230\222r\236\354TE\373\257\225\350\233\005\251\262\210\233\202\331O\240\225>\321\006\315\267\247\r9\"\177\264\241KQ\301\270\005{\332\212\242,G\253^%A\300\355\242\021\270#\264\203\035R\311\014b\216\213b\222\211^\024(\355\352\267\016\256\323\214\317\223\302\372\234I\321\206\031\236t|,\027\t-\210\325N\010N\341\024\324!\272p\347_\032g\241\214\004\240\324<6\212J""\252g\210;r\316\350\0229Z\226\200j3\001\0259Ev\370\370c\232\372\375\374\\K\220\n\r[|\312\362A2\335\030wl\301\271\322\235\324\325\227\232\314\243\3571J\237\366k\313_(\256\010E1\215E\214\2178\016@\343\340z\335y\021\026\337\331\352~<\204\277\371\266zr!\376O\360\344\276C\305U\035\010*\255&\010h\010\017\273Y\210\325\313\213\367\275\263\252\274\243}8X7\201*\340\342\210\235\305\262\241\310\363\3123@pP[\200!\t\315\021\r3>\357\031?\261\374_e0\235\340\035/\241\203(\346\203\374\022Ox\002\306\014c\204\306\341\305\203{\276\034\016\3244\024\275\351M\342nM\350f\022&\301(#b\226H\312X\256\021\222\374\255\3411U\235\234\246y\242\366\037\222\205\031\006s\344\304/\020\000\355\300\273\247\r\000\n\016\252Z\357\326\325@\327\245m\232~p\245r\372OUs\205h/V\006\351\240c\232\330\3622\2534C\232\352\031\235\220\032j\216JNK\321h})\004$g\023\364\314Ro\2440\021\274\324\373D\210\213J\332\232\242\366\361,\224\201c'\316\216\311\231\351i\340\032\234\375W7\230Z\332\222\2541\322\327\350:Y\023\327\222\240\214{\323j(\306\236\0143\027d\223I\330\345\205\214B\247\377E\273\234\341\213(M!7z\344\001\216\345\327\352\016UI\312\017\356yL\317`\205\357\nr\235\324B\177\347$v\346\246q\374\330\227\211\017<\323R\361\210\257\270a\003\226\214R\201v\207L}e\325+D\222\240\002\365\021C@\272\357\352r\027\376\214\026L\247\331\220j\366\251\340w4X0\030\036\212\233m\236\215a\215\272\001:\270$\336\n~\351\364c\031\307\200\t\361\354@\233]\276\241\266\327U\277\266\252\330O\301\320\333\310[5\345x\251/[o^\253\317\251\223&\234\271\016p\204gSz\036:uQ{\311\021\263\340\322\010\302\023\223\242\375\344n:\313\325p\027\261\037\310S\363B\336Y.3Ea\375\007\222\224\177>\310\014/\231\351\236\342tVV\357?W\022\364\306\324'TLj\r3\\ \310\024\355'a\020<\025\342\311H\320\335\336q\200-\036\213d \370Z\010\246\302\253H\013J\033\007/6\246\362\003-\002\233CA\032M\307\007(\336T@\204\303\376+\245F\006k\331&\334(w\307\007\365\376)\002\332\324\024\213+\244\360\320\001\355I\231\026\256\303\244>\333\0255\320\355 \322\016\341;E\2545\333\242\271\204\234ql\271\361\315_""\n\2708,H\014\233U\"\207S\242]F\033\247$\261\216FR\010B\251\3751\t\346\351C\023\310\366\243\200W#\013\322\321\013Z\375\340\371\321\257\2546\r\363\302{\021\2776\342\215\313\360?l\341\211A\204\222]FWK\327j\214\241^\030d\370\020S\302\270I\201\017aU\306\267\317\303?,\266\013,\356\023\337\362G\201\317w\300\354\372\233`\020oH\"P\300\243^56U\204\301y\267\325k\366N\\\036\017\277\224ag'\375\356\321X\202\210\016Uq\2150?QX|&\224KEx\311d\001\r\010\225\317\236]\t9\nZg\377\333\014\371\333\367\010+\022=\020:\035\006\020M\256@\347\365\030\335\266\201\240\023\306O\250\001\333L\031\333B\021\345ITG\231\232X<\347\246~\360?~O\357/\250\312\013\366\006*s\222\302z\022m\263x\352K6\312\340Y;\224\000\004\204\215\332\317x\002\376\362\3505X\004\373\344\336\201\020w\265t\007\307\005\223`\237\245\260\246\017\231~;\211hU=\345\334\311\244y\240\231\231>\324\234\243\243\3260\210\305o\022''\217\236\265\346K\351\307\004\250\355\201\347=n\264L\036\007\376\336+\010;`\236c\363\302\312\353\203\361L\223p\307\334\202\035\362(\235G\345UF\2314E!\375\020_)\177\337\2041\267\224\351\2133/\001\353d\365\274T\024\333\264\313\026\237BPV/a\303\343\\\316\314\360!\274[\033\311\261\370\016:\344\223\337\243\305\351\344\276\352\264\357\346W!J\312h\322\014\353\241L\215 \206\021\231\372C^\351u\r\210<\370\207\034S\216\361w\025H\316\016[\005\032\215\226V\345\255\261r\\k\251\257\033&\305n\303\207\317U8\002\r\253\326\226\023\312w'\001\360U\023)T\364z\007\274\220\213B\007\005u#\365\265\260F\304C\372\206\341<\272\366\022[\313S\343d!\355\242!\211\001\312<\366\357\301\363\364\271dO\\\227;r\313\353\3109r\334lu}\014`\325\216A\035e\231\355\264\205A2!M\371\202G\216\253\251\250\322\352\345*\352{\227\242j\274\322I\223mOLd\206A\334\274\004\321\374\237\246A\214\330\177y\031\007\230(\370\264\336\237Ml\236]>\233\023R\314\014\236\205\355-\"\t\005\227>A^\260\322'N\2064\"\341r\324\214_\315\264\254\330\233\226\213\377&/M\233\222\206\304\323\312S\370\231\2725\276`\253\355}\247kV\033\312\221\017\332M\2502k\313\246^t\201\236\375f+\r\365;\033J\331""\225\364B\263\260\037B\324b\372\331\027\341*\346\343UC0I\004\010*\221w\036\355\262;22\265\355r\215\243\341\371B\\\323wJ)9(\350Y\231\303\344\300&g\347\244 ]c2\016\243\350\356_\335\330\3327V4\303u\037\025v\016\343i\221\337\221\260\232w[\205:\340mq\324H\270\244\250\323\314\0174J%9^\315\373@5Fz\032\353\010o\244\3029\251Y\2245\366\316z\376h15\235\314^\202\373l\366\215,S\026}\374l,R\226\241\005F\351\034DB\016\336\357\230e\306\357\264\251\355w;n\372\226\026U\031\220j\353i\322R\"\344\215h\342\270\021\347J\"\243\001\013\370\201\352\312]\207\2707\345l4[a=\327j\247Q\3344\350\222(\031l\000v\026[\261`n\223A\262j)\006\r$\256\002d\374\215\004N\212.\3063F\031\241e\3328\206\237\356\3274\377-\t?\001\257O\\\370\037\354\222\312\345\350\310\367\324\276\026\231\336\245k)\331\245\230i\232\\5>\244\225$\200O\337\236y\352\360\220%\222\251)j\014\342\254lR\240CVb\311\245oG\363\346m\350\362\032\032\343\254\320m\263\200\3579\031\254l\216#\232\304a\025\351\032\310$\226\337\313\220\230\347\016\246\254\312\274yC\242t\\\021\276(\203\345nri\014\343\303\t\312e\221\201\232Su\023#\326\240\"\027\306\374Sq\273\001\221\\bPY\212\306\220q\227V*\271\nOW\332y\254\r\223#\310mG`h\355w\333\334w\212\324\233\327}\214v\267\347\331\240\334.\354\332\253\343B\340\224X\000\077\077\307\223\273\3778M\361\214\"\313\213\004\346_\251~{5<rg\306\027}\351\234`\353\271p\3234L\005\r\323}\261Z4O\022\276\036\002\221]\235\237\r\245\262W]\341\242su!\372\023\216a$\244+%\311\014P\231\333\021\201\344\374\331\205\233\022*\333fr\031[\246\342mQ\032Ka\021\371\331%\211I\036\\\274\335\225O\210\300\325\312\361\370\225\351\367\330\267\036A\004t\3335\205L\036\204\355\032dX_\216c|\242\014Z\210\317\rl\211\005\375\031md\007T>\355t\014\326\177\227\202\006\202\254\372\002+`7\212,\227K\265\230\246\230?\322\223\263\321HN\233\271\212\211\034\317\224\331w\340{\3138!\000Q\205\364SN\255\220\211\247\232\222\004nW*}\346\010\235\236\317X\220\233\243\370\013i\322\"q\203\200\253n;a\023\300\006\311\224\301?P\030\323cL`\017c-\003+\205m[7\035\020\237\330\033\203~""\301\013\263\365}i\177\031X\004^>\244\206\t\212\310\321\246\262\340'}\272\315D\274P$\343e\236\303o]\tNhJ\037b\004\216\207\034\n\006?5\3507\036C\274\013h\0354\027T\230\216\000C\032g@oOa\374\327o\321Z\253\257\215CH7\276\333\243\273jF\226\304\020\360\224G{\205\262G\321\254\344\301\027\026\253aR\262\001\335\036\345\240\032a\350UM\253\232\025i(\320g\2708\000\363\313\337\350\364]\372b`\036\000]\200+\350\316\001\370\025\365\366\341\264]x\377\003\362\376\333\232\302\014\327\332\303\204\236\001\016\032\273~\037I\306\327\035\203\315\250_\031\030\tD\344f\222\nG\254\037\010\366X\031)2lg\324\200\276\027\373\256\272\365\0030b\374j\357\036!\210\377'\222.\001(\261Zw\307r;A\3640c\225\327\207@\313\254\345\2139fr\362\325\345\026\227?\336\366\\E$\031V\316|\373\177\014\262\234\004k\227\305\312\203\t\326+\273|F\336\234\r>Z\331M\370X~Z\\\312\215\200\314\241o\222Zl\372\"\221[\254\347\243\031o\221k\220\223<\367\341\211\233 \t\227\220\244\034Yo\222\266\t\232\211Z\2129uh\342\037\251:\375\333\301G\351\306m\355Z{\317\267e\346)\356s~\025wV\363\035p`\336\027`\220\031\256NY\200\367za\270\252\031\016\013\006|\225R\307\3035xAU\342!?e\362M\305\377z\331\267\302\035:y\263\030\260\374\262V\253\350\354\356\372\233\272?_so5@Z\024KD\230$\021\347\023\244\020'\013\277W\202\244\004\227d\263\314@:\025\032\337\013\034\035OO\350\243\312\215\024\341\237-\371'\363^\344w\264W3xK\236.\354\256j\242\224*\265\303Lw\330&\233\332\227\035\241]\233,\256\2623\323\311>h\312k\277m\267\177[\306\205:\211\250c\3004\224\373\0179(\010\004\036\025\304\3255\237\270H\362\242Ng\017\006\307\230\t\355\023\241\313\325\027/\370\210\372\310[L\035&\227\211\374\323-\200 M\355\255\332F\266\336\270\255;\355g#\2240\313#\031Z\263\241|\362E\363IQ\2402\342\343\036!f\2472p\2576\364\330c\r\235\306\316K\236\222\204Q\365|MpY6\334'\264\317!\\\\\005\354gLpV2\003Cl\"+\256\206Q\203\311P\306]z\340\247^ut\263\340\302\032r2B\205Zv\n\021\000\005ik\214\252\211%FB\r1\031Q.\032m\262\244\035D%\224\205\027Jb\323Qb\371|Q\375\202\023\030\024E'\214\232\004r\326%\236""\"k)\013\223T\014z\3225\002f\341\355+\351\272D5\323\302\260\036\317\304\036\225V488\317\342\031g\343xV\342\373\267;\220\024\257\245\3538s\316\265\017v\315\3725bm\030XxT\272\316\\\334un\307\025\335o\216\266\337\366\014\375\343\001Q\340\217\022nBa\034\307\r\260\230\306!\336\232,\272\241\201\313v\277F\342\231\300\024\355\354!\210\240t\232y\344\255\023\253\304}\215>IAh^\251\253\367\024\254p\2575q\215\340\376p\035\220x\340\3534*\320&zQ\243\\v\347L\264M_\340\231\341U\002z\r\330o_\232?i\260\333\327\201@\372Sj\007\"\300[\n\350\322\232\201\016|\232D\026\241v\237V}\016\024\203]\331\003%\232L\201p\252\202\010\325\251\335`\260E\232?\254\014\202\022\n\332\345\022\322\262\2026P\3549\256\367\306\253\364\201S$\021\2472\030)\326p$\210\332\216\375\272,\263J\222&\340&|H\221]@\025'Tk\032G\235\272Rv\230\2654\226\262s\262\014\rM\312d@\274\010\363\220u\365\3130\367\204$\302\327\216w:\260\210\2363WeF\037-\013}hi\372EWR23;\007\371&,\342\366?E5\270\216c\320\177\235tV\231\264\213\245\307\224\236\031\217\204\371\247\335\035\241\276\264\025\226i\264`\2503#\277\0369I\230\341\202(\024\303\326\215=Q\017\313\252\022H\211\245Ny\360\260V\330.\335%\262a\364\221\245\375\215\004\362y\347u\245\340v\0004:O\034\006%\336\372\022\331\356\356\024Pi\253\020\267\276\317Nu\251\021}n&.E\276\351\373,QG\217!\007-\262\344\020\236\246=\007\371\264\361\207\020\274I\2017\257\2443\033\3351H\2521\220\214\3217\261\270\264\261\361\222\223\364`O\217\231tA\232%\026\322|\260\360\223\214\314[S\240\\1\214X#.\002\372\216ge\243\265\310\235\372<\243\327\304&H\273J\237\377\233\326\367|tK2+b\330\322G\226\341\213\357\302\003\177\210\222\254$?\317!\262\013\002\260\307Y{_\205\264\201?Y\254\363\266\275\0221\345aY\333M7\321\007\024\347\335\214\004?\344Q\356\360\260dh$\321\312\027\325U\234\236\303\226X\246P\003\377\r,k\345\033\033\241#\024'_\270\214\231r\365<\257\352Zv\306\313\004\351:g\224\025\264\340\013\275G\303\305\034\032!4\332 \317\025\304\022pirt\266\240]/S\014\337\300\346#^T\023 \203\2407\204\234bL`\031\326\026\205H\252\274\0047""\341\320\322f\177^\nq@\246\302\\\355\300\366l\225\026K4\001\212_\373:\311\333\023\337\342\000\223qZ\343|\035\352c\277\006\302\361p\277CV\034\266\304\307h\271\377G\234\251q\232\021'\251\335I\337\252\2667\334\351\355\210^\312wa\240\022\314*w\311\300a\035\340\300\210\246\247\031k\250\256\345\267\320|S\245r}\265\275W\031\241\257\245\356U\245\325\001\327\026d \301\311\353-\345;=*\007\2230z1/k]\345Sf\320\377\263\017\202U\002[\032\351\315\030\323\255\246\200\275.\365\201\376C<\220\007\022o\355\362\345\356W)\013E\022&\310C^\307=\2443D@*\230\t\200l\010%\375k\314\362]|et_+\311\226O)=\026\342\2271c\225 \022[\033\030\366\351\337\322\251\327\250\0265\001\312\315\200g\t\274\232\302\272\206N\277\330b{\035\327\272\207i\375\305\036U\017\031,@\210b\356Y\270;\257\246I\321\272z-a\334\025ys#\367\230*W5\022\254s\217P\300972\300d&a\215g\263\244\000#10t\253\024*\265y\027-\276\236\232WS\353\n\3245\217x\234b\313\225\2301\312\034.0q;\017\006j\233\344\310\356\216\310\3214N\033\202\032\2176c\203<\326C\203IV\032\257J\002=#\303\227uT*\317L\361!\374\231\316\210\224p\230\276\2032O\024y\3146\222ym\201\353@\256\013x\300\353e\027\006\366\250\360zw\226RK\2505\363\235\237I\207\302V\035\271\226^\357\007\001\360m^B.\262\234\3620}\227w\257\336\343=\003)\301\t\220n\036\351\256\233\337,>2\257\325_\323\357\004^\323\177\321\366\003\273W\026\225\373\274\202A\"%\036\267v\231\273\235\003\021Cv\210\021{\214\022F\230\027\3126\031\224\017\001\305\215\210\330\010\220\235\216\324\255U\351\234\245A*}\004\030\352~\245LdY<\321\237\2004\305z|\361\310\"P\367?\006t\200\031\027mo\n3@\017\311\312x\357\027J\306\261]\231\340\302q\311\213\250\234\332\335\373\211\tW\211&\364|\316\033\342\371f\277\347\257\340\272\030\022\264}\231\341\364\263\2433K\355\353\272\002\235qD \230\217\366Al\245\033)\230\211P\177\260\r\223\352\304\372\336\330\363\016\275\337\216\375\302\227\035\370A\301d\345c\223\232\3510k\242f\241|%\204a\337\024>\033\000\215[\203\321\004\304\241\204\034\023(\323\340\0005`\313\344\234\325(xh\n\374\3759\225j6\367(I\200""\010\270#wH\003\372\273\032\347\360\232!y\313(\237\301\274q\321\225\256\263'Z\357\\\272 \362I\310{\351\337\326\202\251\367s\307\310z\372\3514\331%\320\372\352~N\337\214`\341\355\316J\307\261\271\225\001^?\331\214W\361\362\016\364\253\245\222_\034Q\377\355\250\304G{\224^*\3106\334BN\254\235\"[7X\rL\367c\320\240\220z\256\270\351\001\306s1\025u\250\203,1\037E\004\262\366\354Gx\216\247\240E,M\312|Y\277\356\354a\323\035\330\323\362[\276\366(0\241\315]\265\266\337\356v_$\023\344\203\022\2342s\035;H\243\337Ta\333G\3631\3651\314|\003`@\276\253|\211r\212X\316\360&~\230Vp\370\270q:\347\236\330\233\022ra\350Z\256v\260n\"%?\225u\360\311\227\r\362\334W\201\253]!\241\236&OMVswU\244\202n\254\226Ez\346\341PR_\003\224\201\010m\035\307\216\003~\317\362Z\030\035\315&,\340\373\211. \235\205\306\243\005\020\326HKz\336\n'j@xB4#\2467\252jE\261k\022\241\231\370/\006\323\271\032P\333_^ \003\342oVLU\307\327|&\260\305\357\265\337\246\000\302\236Z\242K\030Z\265!1\207QG\374\321R \226\276\302@\243\315\273\360\376\367%\263\310\347\254(\331;4\235v\3318#\322\304\372\260I\362\003@KKk\215;\371\265\377\346\000s\367\035*\346L\305&\"\333\035E\310\313\207A\301\211\251\201\223H\360\000\347\311sA\000\227\206\304\007\342\205}I\276\342\224\332\017\242\237qi\267\3332\271\330\231\023<0\204\rBoG\2420bE\303\004\307H\263\036\256*\206\260\366\257m\341\177\236)\3525\313U\232\275\037\252\271\254,s\346\n\302!\212\342\317\244\nH\346\037\310\320\"l\017>F\214\253\251\027\237:\322\203k8\341\205\374\277\351<\212\362Myx!\223\236\"PN\357y\331\270\010\231\355\020\n\350\212\234j\003\366n>\217\025\000S\315\307J\306Z\363=\251E,0\366\211\350N\237\3151\274\004;qW\210R,c\372\300\317?\237\326\336\3336\n\tH\324\247\014\323_\r\350U\327M\377\326\352\213\021\005\016\210\237\355\243\265s\353\223b\010\230@\256\202\255_\367ISWJn!\001\247\300\334\223\224\366liJ\266\361\337.\362~\254\341\006\377FaK\2140\232\213 \311kfV\260\233\020\"\203B\327\322\260{\340\275>`1\000\214\261&9\253S\027P\361\371z\003\262\311\260\302'\032\000W\241&\316\027""\\%\264v\234\364\265\010\371\233\006\016\330\311R\244Ab.\241\373\300G\245e\325\251N2\307\373\320\351\261Q\346o\232x\302\2102\032\250$\253\351%G\"\373jb\245\332m\352\001Y\017\357o \327\345\025p6\320\205\rn\320)\226\235\314W\235\250?\031\320\343\231!1\321r\007I6!\002\333yW\311\344\003\033%\371\257-\364w\234\342eK%L\304\"\256\206\0162b\257\226\rX\265\311R\347\271\363\242\355\234\202\213\355\261\263\000\373\024\205\222\\~\010<\245 \016\254\275\210\253\300\372%\374lA\273]\272\307I'\276\262@\250\374\213\024\267\014\245/\201\274\364\221\322\312~\223\330\233\311J\276m\303\236;\345\223g[\247\204\352\214\271C\301NX\235O\210\235\273\351x\205{=\033O\316~o\002\236\372\225\201\"5O\007C\343EX\021y4\030\016/.\323\367 \010\220\036\265qG\325\261u\003\315\236\241\n\252\241\367x\230\226\366\274\300N\324/,G\321\332{\367\213\360Q}\3213{{4y\350\300\363f\206m8\305MW\246|y\002x\230\362\034\272\002\312\323%\036\305\372`\031\302\370\203n\335\343\235\254\210\303M\222\206\310vsD>\373/\361\004ri\317EcM\316.#\263?\225\227\304\370\207\r\372\323-;\232\031v\r\313j\333\030<U\r\276pvH\264\366\247-R\023$\"Y\261\355\023\346\312\354HLC\244d\"\3620\025I\300~\013\224%OC\302\230BI\210\227Q\230\027\001$\306[>2\367\337\277aq\257\023\341\264c\340\207\275\265\213_\013\317\263M\t\341\327\370\307p\023\267\321\3473v\036\017)\376\226\254\203|\341\314\256\211\n\201#\026:\315\352\035\313I\315\014B\213\021\344\037\221\250\2030\334\260K\253\260\316\022y\037\302\222\260\000\323i\3020\310\322\200\037\027\344\234\302\241\026$Z\0167\204)\310\246\207H\013\363\331\022\364\230\002\347\003Rz\036\037\215\254\225ha8\206\307dnLa\276G\204\215\307o\201\235\364H\nJ\206\010b+\253\024|\330+Op~\303C\004\027\266\3220\237Z\216\243tM9^4W\000+\254}\353\223\264\000\025b\246{\361\310\244\241'|\233\007v\262\363\023\031Bm\244\325du\320\230\261\005\232\t+\001y\036\002\354\226\362\204\224\257\330F\303\035\320\2143H\205\351~\026\257\343\240&j\306\367\356Ku\225\262bv\0035\370<d\370\263\35243 |\315\024\0176\353\277\266\352\024 \221\335\267\221\014""\357\0270~\034\021_\234@%\200\245\236\235d\360\3565\245\254\336\247\225\022x\032\330P)\213\316\337Z\231\311\3569\323\345&\263\207\002\357[D\362/\356C\207\n \214\n\327\315\207\212\243J\245aa\377\333D\353Nb\231M\035\371S\353\335U\207\305\033!6Tu+\365qH\354\234u\227\276\253\374\"\203\235)\350\246]!K\023\214H(.\334T(\210\301\251M\235\215\0213\324S\347QZ\363\003\363\033\200]\211\300\207\2458\211!G\037\275\252\353\263\246\256\032\200\217\030\016i\013'a \300h\262\366\222\002f\237\3733\234\305\363\005\354\340\304vH\224\327`\2646c\210\313\210\372;\301\023Z\213\345\332\217\253@*\004\316\340A\032\266\340\306*\340\304e\232\365J\377\375C\027\216\262\256\010\240\3427\306\t\"\035,\216\271\252\376\247\006-\026O=\211\267=\271\254\365_\263\202\247\226rX1\311\003\016\004H^HDAf\272\266=\326\352\346Y\021\036\213\254\025\216WB\236X\361\2209\227\307Nz\031\324\332'\315\250\247\306\347n\245\004\005\336\001\211!#jI\371\033\207\330:\206\036\377\275 \276*t\232\260\221\\jyJ\2416\326N~\370!\257\274\301xl\354&\261-\302\276\342\025\333\371}\030\036\371D>\013\226\306\007\223\221\240%\206\000\244\336\371\300\003\225\203\217\300\337\313\244\376o\205\270g\334\036\226\t\232\320\3523\230\2620X\302\224\307Zk\270(\246V\005\244\017>\266]p\345z\023\331\361\263F\220\323\344\341\225\312\342(\325\200k\203f\331\236g5\200n\323s^\374;\361fDPm\213\360\243)\304\276\277\261`\356\317\301j\332-Rz\017\257\236\030\274O\001\026\207\000(bV\300\227\225z\3309\370m\371\270\350\352';\365p\212\n=\2735\235\302\301PM\001)\200\365v!\210r\323\271\033u\017G\211\320\263\264\353\215\017\\\021\001\007\272\355Y_sE\212`s\"\032b/j\345\211\361>\247E\260\327\252\004-O\005$\373\020\034\023\254`\200\315$\253vC\3054u6\343\263Q\2020k\0017J<\375\2168!\305\316+\203\335\255\023+\260\343\313F\253(\330\335h/r\004?\326\037\270\314H\224\023\322\242\014\244\030\2627\0010V6\311C\251\315nz\347\222\342UT\215\226m\225{m}2tl!=e\372\025y\007\323T\351HH\311c\035\251\352eN\316\226\313w\340\367j\325\033OK-\231\213<]x\260\307\222W\342\377q\330FR$\213xVd9\006""\242\233\326\272\264\363\200\226\310\347\3466\247\013\1778\364\320;m\016\036\3725N\254\200\021\247MtyT\370#\236\220\341i}M\007n\027\305\3436\260%}\306gL\227c\327[:\202\355\350>\264\210\342\207\365t\203\361?\017\305\0169\333G\002\177*\320\327\030\312\352\246\021\361\31125\236\003,@\215/\034\252\265\024\3271\273\001\312\302K\217\010Z\277\257f\005\221\314\371\235\304v\252> \317\361F\376),\311\343\340\025Je\275\034Uo)\213'H\254m\344;\002\363\373K^d1\324\216U0\243\363\311\033j\241U-\031\313(\234\007[\325\262\261\357A\256\362\021\177\225\266\022d\313K\344\326\246<kIy\330\200pl\210\002|7\216\265\026\326w\037\"\212Lx>h\350:e\037\005\n\201p\013\265\032\312\237\rbR\261\3761\332Xb\207\242e\016\264\327\330,\346\231\363i3\261\250\027Y\336\0170-\355E\036\022\001&\005:\226\005\262!Fu\361\014\262\234\035\3346\266\000\232\315V\311\341\324&\204\024\301\346dc\264\0007\331\226\216\314\354]\361\310\024\2778\022]\006\006-\031\305=a*\243\252\236\013\213\242>\300\26460\200\256\217\243F\351\323\275\253\207\222\221\276e\255o-\201\304\302\263lq\272J\213k\010J<M|\342Q\002&i\203\000\347\203]\304\341\250=||j\037\216\221vC\220\222\254\343\335\010\035\226\360;\2647g%`\246\0042\r\361\255\354U\270\372\272E_\224\0219zl\303\00494\331e\022r\013\230\317\251\345wk\213+\223\3656\262T\274F\002\337\007\267!c\370\275\352\323\247\341\266{\024(\226T\244\261\300\304z}\236M\213\236;2,\357\241$\302SP\266&D\327\036\252\302\223\326i\236\362B\340\3122v\255(\363\253\232\216n\337\304|\222\334\340:w\306\030o\362\022yc\275\r\224\0267mJ\323y#:\263\367\3307)\2573\340}\034\252\210\004\255H\224\356B\355\020\213\241\217\256\314\315$\302\001\364\236\266LA\277\n7.\334t\315\n\350<\ns\262%A7\272\251u)s\370\222\257Kl\244.\330\337\322E\204\235\271\234j\202z]\320I\302\340\033s\2400\255M$)L\361\032\361\225\014\367y\374\360D\036\341\245)\271_\375\311\360H\002+R!BN\025\016\004\025\024\257\201\306N\272\026\277\002\275ec\026\201\021p\262\0309\262\361j\023(u0\023b\315\361\325\350\246\346\277.'\205\007\200\361#\307R-l\261ca\226J\200:\275/""\277\346\2021h\261G\304\367}\342\221\006?(<\007\000\3661B&\021]\274\227\241\332\357\037\"\0341d\r\020r\330\273Y\"\177bq\n)\353\013-\301\004\032\223y\271\360\262\226Q\265A\344\362G?x\022\213\304R\325\233\\\352\\w%\036\353X\"\017\326S'\r\354\323\255\372\3023\264\230kIw\n\352\240\241jD\0069-\252\230E\232\225\376\007\270\365C\225)\233\256)*F\316kA\233r\364\214e%\031\001Na\355\212\367\007\211\026\214\244\250\207\016\330\211\337g@\246o\026X/\334\177\0108\316\3447\255\206\263\212\313\362\022\341\200\311\022jd\231\004\277N\23447\306\224C\007.^\312\232cPV(*\323=\207\224r\272\362\356t\227BU\352\205\343\357\235\371l\255L]k\252j\nu\263\267\024\371q\366\260\023\000\261\032\371\017\321@X\375\034t\245~\226\366\3350D\0004\033\016\201T\354\335\002X\004x\004W\343g\177\277\017e\263P\225\316\265%8\021\243\226\3108\271\331s\375D\323\225B4\235\374\013\340\030\253S\332\337\327\235\342~\004\262\014\365\325\2645\302\350r\023\216wm\266\373\235\320\221\253\243\245Vb\366\272F\264\331n\216j?\211v\321\357A9wf\307\314wNS\324\030K.\342-a$v\005q0st\251\362\275\251\277\234\375\310\037\201\306\367\267e3\2749r\316\250\346\251\305\355\325\277\342\267\206\274]\2534\22722\321\325\016\211c\316\340\241\026\316U\222\216N\243\002\001v;\177\r?\200\016b\237\217\262\221S\006:\234\214h\354Ql\200\214.\374q\t\2338n1\240\371(\355\013\367{y\305\331\314qniX\232\027\\\371]-\374k\361\230P\267\233P\200\224\265\234\033\313\311\344\370<3\321\3143\247\361\255P}4Qz\251\023\\Ez\005\253%\217\325h\t\230\344\320\320h\310N\216\246\327F\353\277\004\216\370\310\232\217K\373V\200\327\221\303K\215d\027K^)C\316\212\2262j\375\345\360G8o\251\027\004\001\0225\217\353y\027\234\235\355*\231YcR\025\3548W\306\035\224uW\nQ\207\030\037\312[\360\272\000_\r(D&C\275\253\274\212[\2058\007s\276\314\330\321~<\025\002\020\333\004}\212d\313:\272\364@\277\261\360\313\320\245\010\233d\234\216h\016\236XC\003`L\255/<.\225\010.&\273\245[\230\257\310k\211\332\344Cv\3408\300k?H\327Y6\302\222Y\21341\371\343\337D\362N\026\372\2048B\354]\210\214#\351\021\002N""\001\320ci\355I\037\260\347'W\264\325\263F\321\221\332\240\263\252\035E\034\257\215m\204\242\337B\226\332\027\026\300{\311\265\272\331v\346\332\214\254*\016\333Vb9i\305\334\010|\3101d\030y<d\340\231 \237\264\031\036\302k\346\370\256\324\277\330`U5p\r\250z\213\246jq@\200\344\217\261\320.7#Iq\310\030\377\250\235\376\260\254\370\024h\331=%\377\363\246\366u\014\311\242]\222\335c\256\352\322q&\321F\333\210\33172\337\223\267\"\235F^9jE\313\016\231\224%_\364\021r\257\010\265\354\016\2271\201\207\344\212\036\207=+\250^\275\220\331\3701\376J\240\254\004 z\027\221\331+t#\254\247\034\036M\\&\276\230I\343\264\362\313\266T5\350\264\277!\177\031dg\000\263{\357\327\334\231\354+\350h[O\211rR!I\374\313\344\"kh8\265\002\303s\265\206\360\307\177Koy\262'\347X\230\230{]\351\372\362\257\266&\321%\215q\225I\3130~\226\006\035\230!\217\023\340\037\325H\301\231\201\364#\251\240\020\032\022\346\357\323Z=\342\333G\036\rGj\214\000\263a]\"\360\316\261\316z\017\224\323\260\030\224\033\327 H\361\327[s\360\036\210\376\177\200l\254\027\020\337\217\027d \244\t\261?\013\375c\214`pM\353|\220\347\036\207<\312\014\363ybQ6\316=&\372E\372\037\242\024Y\030#\262<E\301\377\271p#\036\320\265\254\361\213\313\234\276\322\315\246\364\250\3015eL\\\027c61!\355\315Z\336b\307\273\331\032\022\027A*\377\216\260_\246`\177s\213\202\2630\032l\244\270I[\"s:\363|}\351\302Ot\266\320\005\305\306/6\277\262o$\200{\345\n9\256|\025\236s\322\206\316\320\027H[\247\033\356\177\322\220fk\204T\220|\210e\361\221@cYI\376\336Oz\"\374\322<\212\200c\017\332M\361\232{\364V(dH(\365\363MDe\030\214%\356\355\025\346C\302\226\240\210\246\253\303\006e'\244\034\303\010\276\215\225p\201\234\2060\363\354\200\2020dxc\242R\007P\310\213\034\244\204!l\362\034)\347\220\347<\177,\315\003\004D\004a\351>fg\000\360Z\353t%U\2776jx\320\331i\260\366\201\033\375\374-\262a\0034\001\273\275\334~}a'BC\024\267\374\250\257z?&\357\236)\315\207\360j\266\325\327|\341\215\0218\000\031~\365\361!\303\270ov\374e\330(s\202\330I\357a\273#\217N\222r\214H\311\247\347%S7\303""\235\001,\342\270#\346e\341\307\362+\355\233t\343\032<\353w\374\246\253\002\030]\240\202\331\334E\303=\0037jh\337m\332\250\322NMz\270|\262d.2}\027{\364\231\036\342\033_\013\362\363:\341:\033\026!\2649`\321o\310\240\327Y^J\327^\361q\021\205\310\231y\353\0307S\342\271\307ee\312Vn\024\354\004\325\241\277o\204f\2723V>\246)O}v2\336v\220B\221\247&\334\342\000\236eL\251\375\001\324\370r\017\361\035\020f#\326eV\224\241}\022\276z\210\234N L\370\241\373\320\037\320\004\302\241X\323\300w|I:\r\032\332\341,\335\332\301\022H\331\371\\\014\314\000\310\344\rn\212z\264\201K\367?\346e#\244\301\230\211'd\207\2433-w\327!\254|Wb\200K8\364\225\207\020o\223\313Xf&\245\007\244)\305\271\331\247\304\231Oe\026\351\3348\266T\377\211e\2124\326\352\276ub\006rp\336\215\340\034=\350\231Z\331\240\250\n\301\014W,\260\365d%\324-I_pM\335V\303\\\271jm\303\313\251\271\372\242\320[\212\303dy\341\303\314@\376\216\010\020^\260\215\204l\330I\0028\275\022yb\370\270D\3609t\220\007^\222\034\277\277\n\007\247\202w\332\310F\260\355\271\027\207\244R\372\200\255IL29\213\205\254\022\211\345\327e\3056C\375\370D\230\302e\237]\240@Y\255oP\237\330\305\022\272\370Z\365\0259 .:\t<\207X\267(\344\326\315hA\327\255HM\320\201\r\0335|\036G\354Y\230\351\007\231c\227\245W3;X\201E*\301r \327\020\032\034X7\350\257FG\210\372\200\275\202\351i\205E\354\276,+\226\213\231\201\253a:O\303\336\025\267\236xlC$\014#\361\300\016\337\300\314\"\217+\206\315i\325\303\237`\212\251\235\246\313m\354\244\325^\027\251\033\2118K\035v\204{\350\340*\020i\204\027\226\262G\002\372\202D\317\371\351\333=\306\021\2370\331\264\027\\\260\376\246\321b~2E;\330;\254\257\256\364y\324:\242\027\\\357\001j\220\\\032+\240\022MyH4\306\306`\204\217^6\302\026\262t\366\217\233\235\266\253j\221-\020\337e\001~p=\234x\n\257\303K\217\247\200\003\231\001\227\001\221\001\032\363\014\334\037\034q\375kS\035\023$&\\T^\360\320\027\354\301\372\335\022$|\206\030\344\3779\202\254v.\322a\230\311S\026\370\021n\311\305\320p#`t)r\243\024i\216]\010\273\330f.\363)R\276\331\330\305.\314chC""_\303X\212\365?\206\340&C%C\355\254\315\362$\265\317\221\016\245\317a\240,\235\373O\2625\201>\277\324\260{\264\366\320\273Z\366\300z\342\361?\346\323t\331D\304\001\361\233\242\030\000M\231A|\251\337\376l\301\204\t\212\t\326u~\014F\006%\027\002\247DB'\304\342\333\025\301\234gh\001\261\210\226B:\031d\020\262\307\205V\242B\340\344\270\322\033\366\310(\212m\026\306:OZk\275\306\375\025\345\201\361M\207c\324\355Q\264\373\326p\241T:\213\263\324f\241\3631N\245\r*\337\006\\\372\t\264\267\024?^U\226\0366+\022q\314\216\275\346\370\376\245\013x\257$&-\321\264\304\223N\374\373\301\303\224@\343\367\256A\2659\205\006\031\231\367\033aA\305\007\320\233\202b\001~~\253\3509\253\222\240(F\337(\352V\000\014>\000\307\036\323$\237\347)\340\030|\216-\3629s\251\360x\322\017*\337.'\264\315]\021(\302\367\034\216\"\326#\326K\224u\252\235\2662\265R\245\221\266:\316\262\324e\306\3278\222*\312C\1771$\243X\006\367\3531\013\003\207\002Q,\224\033\361\335.\304\207\247\n\350q\307\3309.\306\277Wi\245\257\313\2433~\235[s\332\342]\272\374bHy\2429@U\326\260\237\202x\225)\n\307\213\234/p\3442|\351\313a\367\206\343\352\2157]\276\225\356\3472\227\264\305\035\364&\006\341S\022\236\0204\032\221\213\337\177,\341m\300\301\336kPW\203t+\350\23248\004a\026E\014C}kHA\224\300\000@`|\215\017\036\032\022\347\342\205\022\n\277\313:C\020{\273w\310\274\232\370\225\334\370~\177\204\307d\317\272t\352P7\363J%L\341\247S\221\215\225\014\263\310\206\332\306\231S>\253\274w\023\337\034\264\325\036\022\236v\024\261\253\363\tpQ\0248\251\343y\340\2437D\025\345\212\350\255\367\355\230W\034\367\347\221|\023xQ$\331S\300\222\244\277\216\376\367\341M\300\342\343)\353\013#\004rL\355\316\240t:O,\0341\212$\227A\275?'h\350\375\215+\322\240x\266/\357\217\371\305\016\311~\007\257\321p\021B^cO6\261\242w8\256\n\343g\317\257\303\342[\337\216\343E]\221\007~\r\236\323\3579\251z\264\236\250S\246P\341\003-\246\305\224\343c\220v\027'\004J\347\244S\236\222D\006\246z\236\354\tKwK\231\232,I\347\325\356\022\353!\216\265\316]\337<\301\357`\326\320\340Xk(""\306\313v\337\375\001qK\0023\260\313)p<Q\373\363\204g!\276Th\347B\3419\276\341s\270\332\037\232\000\336<\260G\354\227i\\Q<\237/0\2576\302\251\004lbY\330 m\361\367M\367\213\026\247\224\256\244\305\370\032\370\365\216W\244\265o\256\265\247\035\265L\2430h\031W\355\022\237\203\354\274z\367\355\200\375f\255\265i\272\355\233\266\350\334\003$\223NI\316\254\277\303,\332\3229%{\360e+v\316f\221\216B\235\352,N\243H\3324\016\0031\225\231\025\240G\355\254\322\322jk\237Jm\032\245.\262.M\245tY\030\306Y\030i\247\3020\316Sf\363\226Z+\235s\221\215\242,\217Nim\235\225\221\317a\234\313\361DeK\301O\024\032\320\210\002O\215F\303]\377\244\277\216\355\307#\273\"V4z\317\r\352y\202\333\003!\217{\332\302C\002\247\210G\023vzByE\246\205\273&\017/\223\234O\031\027\337]\221\312\263\027\330\203\377b\252bPQ*Z\343\237\263\310\246\326fN\2062\262VY\361\034m9\346&\366\355\357KLZB[\024\350\224\016\243;rg\237?H\356s\370L/z=\277\312g\276\007\304\207\317I\272\277\365\367\2552mg0\212\036\017\374\333\361\0174i\354\"\233\272pl^U[\351\224\020\tY\240\324;\347\375\014VW\317\025\014\264\211\r\370\307\027b\247\022u\356\035\036\317;q\265G\313\270\317w\323\237\247\203\021\250,\010\3710q\265eo\2605\017\025\361\275\303\201#\224|\226p%8\034\203\264\002%\244\033\200\310i\001\337\223\263Y8\350{n\014\337\211Ge\016\237\013\325V\373\346B-D\317\234\203\306\032\366\356U\207P\365\220\322 e\351-\313\233W\306\205\316\027\027\233\n\020\245\216\031\2242\025\261\336k\236# \302#\002\270\000\276aG&\031#\343\3519R\355\243o\226\252\211\235\361E\226h\014I\343H\316\250\006P\370\000\341\301\200\266\334\364(\020[\303\037\261\214\322\314\236\333{\330\253L\357\311*,Q7o\230\030\004A\320f\217y \326\332\323\361\305j\007*^\247\332g\247\317\0320~(J\322O\260(\271\257\363\003\035\374I\245\241\216\324\331Qt\376\247\303\305\205t\341\324F.\017\366\215\007\302\017\323\217y\215\317\223{\313{\212\243,\325\322\3256\362\321\205I*}\014U\354\223\017\304\032\317\363\026\246A\223h\207Hd\237\231l\232'm3\355\010}\nT<\007\273\366\014\0248\300X#>\210\370b\213\257""\261G\207\210\212\210G\204\210\307\203\210\nS\204c\022\341\300\020\361P\252\262\001\3669C>.\307[\341gP\272W\001\276\034\370\005\235\265\3250\3665\0142\366\201\220\337\244\374WA\254v\327\027%\321=\353(jxC~nI\230\267\001\020\2137\353\244\3639\n\204\220*\017\201\026\364A&\324\363\326\324\357\212\001c\221o.\335\236'Vu9\207w\035\3238z\237Y\004%\023\177\261\266\340\032\355NVs\020\361\232\220\200\201\205\005\354^\234\261s\376\325'\351F\221\005\212\322\023\222=\261^c)m\350k\226\247\320\274{\207\016-I\247S-\314'\271?\346\001\225K\250\364x\347\265#\240\010z\000\203@\000\014\022\021\212$\022y4\"\220\245\301\037\364\240\205E\227\210\214\032\215\005\302D\200\0242\205\303\240\020\003q\014\005@\000\0160\000\002!\014\242\2061\310\264\000\001e\370\021\3264\3109M\177t=\021\257\230\256\221u[\0337\361\030\372\220\273\203YJT\243@)\242a@,\017(S\372\302\007\r\253\332\3270\213\013\215%\322\353\250\246|\"VR9\272S\241\374!\204c\232`v6&\356C$e)\205iH\266\321\252WR\365cR\356b\3075*|\200\271'\304\235\004mC\2228\277\373\001@\243$j?\2578Z\232\261A\250\022\205yN\215\270\202\305\037\341\342C\227+4e\305\"U\003\305\277\313j\266\241\351\246\317\316\263\002\3770\030(\257\312\214\274a\376\225\331\263c\255\206`q~\0103\364f\210' \224Z\314f\343\371\000\",\274\223l\236\322\2358\n}\001\020\\\306\305\312Yhk'\306\005U\256\331:\002\312\361\005\352\324<~\024\233_\261\201]\005\210w\031-\317\305l\203\022\362\327\372\212\360\275\201[,\027\273\355\335\311$\374L\245\177\366G\036\377\254CH\361S\001JBA\347~\313\206\030\364\255#0\275+,.\005\303[\032\222&\210{s\241A([\210\267\310\030\206\203\326_\237\352\365\342\311`H\254\304\371\206\334&#3l$\000+\271y\207\332\251\r\277\350\217\226\275\213U\354R\275^\263\213\002\321m4\027\300\262\354\017\262\261\022\370\310\204\026\240\213\325\321\305'*\355\202H\021/$\014\037Z_8\337TA\214q\345\326e\007\373Pi\031%N\373\227\222\244\365\372\365\257\246\307\016o\224\300\242v\364\232@3\001\036aC\310c)\024\003\202\355\005\360\202\211n\007\201M\t\014+\023\013\225O\204\006\322X\372\215\020\274""\204\002\301\376\324\332\002E\021\224\363\236j[a\234\261\010\301\001\031\353_\274lM\364\030\345\240\213\236\342\317\320\354E\242\342\217Y\362\230N\3637\306}\376P\300b\333\243\257\366\256\326)\370j\341\336\240\311\257&\233V\371\221\356\007#k\003d\210\257h\352>\033\370\251\001y\204\276\210-\033\273idX(\201\324:(\315uI\227\002\037\265\341\207r\202\220\027\210\241\3125\030\271\313FtYI\206\336\352K\013P\316bfG\000\246i\232\037sG\222\256\200q\032\262\242S@\325\020\365\342\"\312\336\374\301v\311\225\235\346\215?\017<\277\351B\310SI\316\344\255\273\027\023#4\253v\027\263<\365,\222{\264)\311\335\266u\247;Z\377>\022\351~\000\366\246\342:\365~\275\365N5+\224\025\304\315 {\010\344L.\330?\030\323*\243\016\034\225V\225\214\377K\330\321\007\000f\270p\021\2278\202\371C\301\326\r\211\013A:\244o\352\251{'8\342\027?4\277\242$\3359\315\223\220l\340\312\277\323eBO\203,\307Q\316\003\230L9Fk\345ej\360\2777\237\301[qKm\234\361\335e{\324\244\224\375\202\2521\315\245\257\352u\324\351\357\315%\342J\350)=\030{]8\200\0303\361\227+\t@+U-\233\025\265E=\013\256\006n/zE\003\271\315`\177\263G\025)?\004\214\033W\345\354/K\256\250\235\251\311\336\226`\206\230\373\352\326\332\271\225\007H\275\034\304v\320\231B\253QzVe\210\362\307#\272\017x\203mU\334\216\324F\016\255\324\343\200\245K\037\201\025r'\333\202\021f\370c\002\340\274\032bG94K\236\023p\275'g\005\237\034\260\275\336\233\001\242\030w\036n\375& ^\202#\314\200\016O\014%\213\376\025\325\343\323C\034\260\020(\373\260*#\200-i\n_\216\374\340b\010\336\374\321J\2001\346\020\220X\366\231\315\261R$v\362\320\230\207\236\rLWyzPx\223\211L\310\207OX\003\010=K\263e\251\312(\374\304_\256K\264\270\3474\032xu\003\024\310\227&*!?d\320\374\000m\256\211\017!\000\336\031f\317^\263\254V\227i@\341\\\032\r.\341\262\335\275\323q\0272i;\223\321k[\374\206\002<\245P\335\371(\020e;\254\311m\026D\004\361\031\rM\206\030\3177I\271\360+q\342\351: EZ<\357\213j\350\356\222\300\031\375\222*\257\313ay\235\221;\326\3657\276\322\022.\nm\244\026\315\006\201\016#H\240#3\302\232\355\331""\354\263\016\252\242\306\033\227f(U<\033\253\007a\027\226\004\255T\014F\3715A{\014\266\217\030\n\250:\304\341!\351\342D\366\205\237{\325j\333iZm\277\202\333\000\251\336\344\351\352:\232\371p\214\024\251\265q\201j(\362\334IV\254\252\201\305\270\353\237\352\335\177m\006=\005\027\360\273*\354r\302\266X\322\351\372tD\277{\261\240\246&\320j\036\305\302\016\205\014\347\224\025CAN\242$\247@>\272cy\271N\311\354\261\331Zp\264\201\357\222\352\277B\031\333\371\305.\222\007>2\247\360\3545q/\224W\2425\347\226\372\247\342\377j\027\360zm'dX\220\234\201\024c\200\362@\240)\237?\"H\332\325\307 \372\331\367i\302\211Y\250\215\340\206o\264\257l\211\023\316\316<\034\374\265\260cDhlA\347\014\026\213J\330\212 m\"\230\225\244\365\347 \307\027xPn\214\263\233\014\355p\235\014\031\276P\002\026]:\200\256NK\370Z\030\266@\263\250p:h.\275\263_\204\234H\021K\2678\312\315\230\207M7\217\264\333\262\320\271\327)\335T\244\321\177\005\r\264\267cF~\312%\204\333nD\327\336p\352\331RYN\022T\250u\377\241&`2\200\354\001v\347V-\206VN&\211\343\377sG\242\030\366E \"9\n\210\331i\275\263\351\315\035\217q\270~\262l\314!\017\327]r*\036\202\323\365\025\t\307\236\260\313[%\326\340@\264\231\302\222\214\350\016|\311\215\336\214J\215qn]\377\370\016\334\r\324\3315\375\362\243\251D\334|!\344R\"\372\243\006\037Oe\340NME\014M\000\000\227\036y\001D\3654\016\320\206\225\241\032p\233\272\357\373\313\362Y\371\274\376\025R\206.\235,\021\262\326\365BA}\013\005\233\237\3303\264\314\236vz\355*\035f\357\322I\315k\002\340dq9&\215\202\330M\371JL\211\215\315\004\227M\3136\340\234\356\311J\346ug)PH8\\Y\374zD,\033\372\030\014j\354Na4 \230\265-i\317\016\345\250\220\023]\306\223\212}\004\263\324\002\031\203\347c\256P\241\306\271\026\324-\254\271S\366\366\232\027\236>\2502+\216\007J\270\330\351\300(U\211\377)\214\353[\234?$N\342A\254\206\004\336\225\313ET\260\013ub,Y\202o\371\244\2259\213\020\377\177\007\260\215\227~\271|O\231K\206= \275\326#\024\213gJ\036\340\222\325\245\315\365\026\004\352\241N@\303\332\236q\254c\271$\363\223\322\013\315""\313\340G\014G\024q\221\\\311(\222\0048>\257a\352\300\365K?kQ\366O\035\341\240J\363^f.\225\367\317\245\035AJ\000\350\332DS\221/\355^E1Wd`\261\322\306\215\337\030\247>\256\0007:Z\024&c\\5h\001Of\016E\370~\000\023\325\360\325\301\354H\225\017\\\254A\\r@\275\241\333V\215\030i\314\374\004\330d\225\237R\010\346\242H\005\244\360\222\244\243\371\345\"\232\257\310n\323\210s\212\221\365LA\367\212HM\254\023\236`\261\350\"\370\237\rvB\225R\257\307\362\266b\246\274T\2048\343\272\256\363v\221\304\332\250\363*$\372\272\333\215_P\314\003\234h\025\030\332\"\301S\245\016\342?\301\223*\033\221_\224\201\324w[\224JN\252`\330!rc\357Ic\255\310!\005\221\337I\241\377A\030\247_r\233f\001o!\247\342\265l\362p\353\361\242l\2539\013\213CA\206\030?:\013\027\0041PQ\250\257S\303\341.\22605\367\306Oa\366\267\374xaQgEZ\203\272\034\214\027\252\224\306\325\370b8\256\202\363F\353n\263\224\2040g'\261\365\006Tj\256/D\267UU\277#\265E\315=\355/[4U\222'\32596l\352c\326vh\225\3220\014\254l\303\203\032&r\005\202n\344*\253\3776\001\246\2735\347|\267j\3453i\014U\312\210\345\024*i\200\320\206\035\215\371\207\372\327/\037$\261W0\244t\201\265@\t\230i\2702SBp\272\256R\223W\272^\350q(]4f\024{\312n\267f\342\256\275Y\322\344\211\261\306aqdh\232\352Tg\245\332\224\371\010\t\225\235>\224\352\251\306.\334s{wU\362\240`\363Q~\262'\371\014\205{\226Q\221\202E\265\341\374+x\264\356\377!\360\327\307J\254&|\317s\223\237M\020s\303.\231\245C'\332\023X\217N7\340\343(\216\276\323\260\265\3103\203&\021 \223\202Q\357\313ul\254\326\201Z/\304\272\201.\"BnP\360!\236\030\002\n}\036\014\227\304\207\257\250@2,H\000\031\001\340OD*\230\377Z\203\333\372f\272\361V\302I4\262\241\321\327\307\340\350\331\366\372^U\367\344k]Q\225\201\005\323\311\210U>\227\332\010In\036\3112\315\231J\021\346\307!\326\347\331rt\316\205\220\271Y\254\364ze\371dM{C\002\377w\336\233\\@\035:\002\237\270\366\266\216\220E\203F\201\020\261M\355\312\336\024\220`\347\323\251\224\3161\300v>\007\032\311Fu\2107Nw/\001^\0344/0\237\361l\350\001\000\031\002\t\342\377L\256S\235I\367""\246\034\027M9+G\236h`\225\317t\374\021\323]\360\247\236%\003\352\256\332f\326d\324\203\247*\327\321\032&;\003`\365sR\307\264\r\375\352C\323\232\223\244\213\237\216.\215\341\304\204@\327/\016\234\236\021\261\032\260\003\221\246O;Ut\030\251\247I$\231\204\266\224t\026}6~Z\226\313^\311v`\241G\023\346I\343\244\373J\\\365cf\322\217P\233\232\005\nj\332\030\202\2032\234\031\231\301\2168\341\335\336w\352\360t\2671L\264\357\315\022\"mA\322\344Q\004\314\376VjA\342%\206\207D\3161\316\014\017\202\347h\227x,\2249\340\241\353T\305\377\331\035ZB#\2172\225\210\224\201od\334\233\304\236\037lt\200\t\337l\3412\226\025LCf\023\346\350\t\031\273\\\374\216\233\364Ch\3529\265J\256^\266\210\221\351\372|[\017\367\211_\003_\246\007\034\337n\005\007\017\211\253\317?\302U\310k\310\014#?\217\252\305,\013\024\322K\256\247\307\0232\251\217s\034\206O\020\211\322',\352\375_!r\371\257\007\016\300\3304w\267\204\332\337S\327[$\202\332\010\n\205\335\\\016\002\373\005r\332\213\016\271\373\270(\n\352D7b\326\266\004\221\217\027Z\r\257\0064\356'P\023\235\205j\243\r\274\264\240\336\001)\302=\0108\027\352\177\r\003}\320\354[\231\317\025\313\0318\224K\253\004[\022\327e\215\234\332\023\262:\222\262^\342I\241\270\341c\003\252\222_rp\364\327S\330\225\021C\255\250\307I\231\000\344 -\3000\222\277\242\344\265\217m\361<Q\210\233\357\261\024\376\265\377\371\355\374\202c\245\356&sK]x\215\364eGk e\223\023\262W5c,'?\007,\230\314`8o\022\247\376\314\256N_\t\005\026\036\003\014\222u\221\354#%v?UD:Ri89\366i\223\225pZK]\274\302\304\233\207\315g\323\354\014TT\0108\331\343\214jl\n0\350\004\2656Wb6j\345\234\216\3622\246\3405\341\363\212\215\306C\255\0269\251I\335\300*uR\03437\307\266*\231C\031\376\326\324\013E2Y\004\002p\233,\023\245\255\235\253\221\321jd|V\002\021\243\304\353\370\231\266\214\250\223!\300\263\325\200\233v\2075\3122\007\204\222\202j8\255\227\216\306t'\t\t\227\306J\244\213Hv6\355\3457\027\317z\300+_\024\203\342\\\310\241\210\300\021\223\262wW\364\353\225e\325\224~=\343\330\365\237XC\311[\335(\316\r\024\376S*0\262""\324D\237Uu\324\333\002\235\201\305\345\032\021v\253\215`\211\221+\223\265@\260\212\342\246\301@\341\341\312m\241\026{w\316\215n\360\361\272\331\200\001\266\345\277\021\367\312YV\332\245\311\354,\354Z\344\262\013\373\201\312\3566_\362:<\006,e\251\361\027\023-x\262\"\034O@:O\220\022\021BJ\364\027\305\275X`\220i\337$\336\375\325\231\000\234\312\347~\212E\027:x\336<\273\231\2403\326\343\003 g\225j\347i\216\347\030\336\363\366\355\224\336\210\352\307`\207l\005\347c}\243\224\314\234;8\366\036\335\353+\2044\334\342E\002\321\306\2177\274r\344Ng\351\332\tS\350\372\271\004\213\211\234\301KaT%0\025\022`\2361\213\233m_\330\204\215e\312\364\213@a\341v\247)\326\345\005\333a\266r\231\342\3074|*\214\257\010\013B_2\313\240\0036\372\201P\202Z\215\221qCU\244\270\337\312O\270\201\304\343c,\266\002\221\215t\327v0Z4\\\376P\312Uj\210Z\221\341\354\037\035]\324F}&\032\213\325\334Xv\2118\225\370\211-\243\350\263&\24114\364$D\371\327\353\237<\177\352\"\r\346\320\237r\304\014P\024\021\\\276\324E\204\327\326\245Q\263\202\016\263\2209\254<\000\321\326Q\235\177L\206Yv\027\243g\313\371J\373o\215\032C\002\205\271L\266\344\017\267Uc\010\005C\265\307H\002\2650\256\3142\256\2473\202?\323\364\006\254>f\314TZ\026\310\036Y3\330\026!\350\237Vu%\013\252\005\221\026O\301\230\216\372\370\213\230j!4}1\361u\222\017\014Z\343~\214e\361\3749\243q#\t\375\205\014b\354Xp\010\254\225f?B\334\004F\025U\355Au\210\342\024\231?4\334q\270\3107\007\027\025i%\355\017E\351\032N\217\373\220!\031{\335 \032\373\305\202\277\353D\376\213f\037\203\365\264\005\020<\334\262\000\355\321\305z\027\306\302\201r\325\271\314\302f\240k\340q:\250\253;\323]8\347\332#c\335\264\\\031G\030\364+\210\037\335\337\301hn\225\343\032\205\210i$&9SD\325!\206\333rb*\3006\204\261\326\301\375\211\332\276q\003\260?\254\263X\205\245B?b\2710\342\013#\251\211\2373\016\032\034\026\226\254\177\221\322!\355\323\341\345W\003\336\0273m\361y\003\331\362\255\024\354\t+g\264\212 r\234B7n]r\014m\034\327\320\247s\323\217\000\022\303(In\303n\250\244\344\002\212\213\024J""\346\351\272=\202!\223\237*,\360\333QX\036\344;\273N\005\3746\033\244\366\000\211n\362\345boh\037\032~\373My/\350\005G`\321\030\302\232?j\340\227;\r?\201\010\371\364:\215`\244\277cT\225\330\247c\217\3311\342K\370M\347j\027\205\031I\337v$\351\305\236\244llag\316\360\322x\276P\340v\311\255\376\316L\274\360\334\277\032\207\240\275`0\001E=\333\331\207\036\250\007.\346\3559\210\375\212\021N\2421Q\240u\366D\203\201\374FU4:\347.\264\014\311\242y\377\210&\214\246\274\252\3133\332]A\224+\017\351\330\216rrEN\322z\250Q\314\342\341\013\031\260%BS\256\341\260\217B\373\036\377\014r \344\302 3\340\233\256+5\003A\017r8\315\032\212e_\342\256V\272?\023TC\277V\277\245<\234H\347M\237\211\211\327\363\367\031\354_\000\342?\353H\371\230\366f\r\316\206\303\235\376\004\311b\271\037\007\r\"\341'\240\n\2726G\212\003\024\272$\334\341h4\275\257\276\274\240\341F\363`\221>\004\rt\207+\000\215\274g\232\027\217H\200\006N\234\205\216z\331\375\317[\266\272\025\230%\246>\000S\317\315\223K\251N\306\324ER\004\253\215\252\236\000B\035zR\224\266f!\353?*\033\200\262f!i\3759\032\256\201C\335\024\317>z\335\270\256\311'& \216\245\207\376e#\301\027\n\260A\215GS6\021\232w\205\374^\374\244\363\234\363\230)\277W\360bl2-\262\026\024*\313\217\0249E~\333\230c\227\032\363\314\031\264\303*\022\365_\240u\221z\220\3670\"0\365\231~\r\371\336\353\210\343;+\311\307\245}A \251h\010{r\304\363\200\014\303\002\267r@\"\013t\254C\240\341\374\346\335.\306\206\327\311$\026\253\027\372\204D\002\025\221-\377\217@\207\221,g\347H\320\257\230\273a\225u\210\002n\347\177 \n]\213\315\322/\321\2261\020\016\304\327\322~\001\034\241\377\234\272\340\254\212\366\336\235_\354\000\323\255\2641\204\002\023:\036.FV*d763\243\227\325\230\204\236\243\257\273\024\021\032\313\245\2562&\264t\223vL2\t\373<\364\031\274\000y=\307\302\317\304\037\310\245'3\302\223\341N\271q\223\010\277*\305`\026\021\275\036\244\030T\213\\\271\336\t\245\014\242\272F\342\304\347\264\002\274\255\227\342\326j;\273a\322\371u\003 *jrHY\320k;L\007y\202 \037\310\236\337\362\361""\002\273\020C\242\013\303F)p*w\325\267\320k`\203\225.[\177\004\266)\035%\242\227\252`<F\275\337)\227sT#T\014\355\332'\326\272\377\"-\347\267\177\333\272S05&k\347r\237v\213\025\370\033\033\301e\213Uw\340$\300\305Z\027U\2464\030\321\017\266P4\221\270\001y\303\013s\335\001]\021\250L\302\357\372[\2378\346\017s\35658u\250\335\222\3000\267\004\375\034\221Q\206\225\251\256\223\242\252\014\252\264\266a\236\340\0267L\333\222\314\251\311\003\235\232\312u;5\200\3626?\200\343S\234\2710=t\336K\231NZ^\346Z\231\263*\255\2246\001\274o\215\352\244\351\221PB0\252\021\013^\371\233uYp\033!\376IRw\303+\021\326g\263M\251\010T\353r\031a\336\312\240\273\"\347C\344]\"\253*0\363ddX\021(b\002\357\010\333\234h\200(\221\363\253\303\200\347hr5Q\322\032\331\"\317\252#.\271\005\3260%W\017\222\001A\033\213\261r\246\022\343\211\253V\235\337I_\310\222\356\205\n\240\001\317\032L\244\2601\331\205\030\006N\246\301\032\2421\263v\200\234\306\034E\361F\032B\2020\007\023,(:\324\300\365\276\207\373\264\345\2546\032\031\314!dj5\367\310q(\221\306\356\032kN\253\274\352\314\237\320\300^\237V%#&\243\322\221\250y;\361+\313\025\001\245\2131(\003\213&\356\001e\310\216\024\274%\242\267\347Xh\230>\320\003\332\201 1Re\316\3058L\037\250\005\337V\301\223\3649y\334 @\363\275(\264r\364k\244\227\271\033\302eXi\327\225`\030\003\260\032\354\233M<\275\213\2078\367F\373g\344.\255\034V2R@\374BK\000\346\027Z\223\177U\355T\326=\333\003o\2000\025X\364m\330\033\250\247\226'\244\017:\374XM\nq-\326\316\026a6\026]{\023Z\223\203\320<\373\335D\350\361\356\375R?dg\371\271\357\317\371\"0\263\330 \023\366\257\321\363\335\221p\201\357+x\345\020\300\240\2262 u\037v.\311\263\216}\300\220q\325\023\212\014\252\2614\r\236\261Mm\255he\250\215\\\325\361\220\301!\251K\246>\010w\254\233\201\315\324\221K\307\323\002\271\031\201w\214\321\016:\367Rv\320\214\035ob\303\037K\014\226G\203\337\333\341\330\235\321n\322\246+\377\306\253D\311\037C\255V\256\"W\027-\201\303t\216\311\236a\333\324^\221m+\235f\270b\237E\234M\362\320\343\354Lj\3274\276\376\364\303""\343\373\313\0076\035\033\n/\2761\246\240\224\366\370&Q\024\263\244\255\340f\302y4\256\326\311c\342\023\026\360c;P \274\305\256N\370\241\360\231\"6S\022{\036\325sH1\345\375\375s\370\266\305E\r\321\217\033\n\203N\251I\2056O\234\354\037\326\347\331\303\245\325\230\357D\352!\034\224\327\374)\262\270\260\272xPA&\000\200\036\t\000\355\2106-\302\026\215\"^\264\322\364\355M\031\n\211\322u\370}\":\327\312\376_\312Vtw\216{Q!\352\345\024\217\200M\003I\001R\240\301\3274_.\313\351\206\352J*#\177\264\356\267\373\267\236Z\032^\351H}\244 $N\342\340\224\330Gq\266X\223\215\277s\372\265\303\035\357\001+Y\303\225\305K\2536\017\227E\000\271\331\375u\363Lz\365\202J\250\213\341\225\021\245\315\235\273z!\313\370#\301\222?\212r\250\346\377\014\027\206\253{\340 sI\312\373\221p\000\275z>F\013\036\235R\230+b:\031be%aL\377\2768B\246\326W4E/\315\350\351L\204*\201\254\233\214\3415\231\277ga\221X\265\302\337\346;\315\235\022\352\025-U\327Vy\312a \235\213\304w\002\341\033\306\206\205\304\364R7k\036\357\027\214\365\010\376\0058\340\361)\242\360\207\375dq\307\337\017\333L\316\203\306E2]\357\205\343\345w|\2045.\t\025M\033\002S\240\253\004\343\301\233\215kA\211.\311\010\342\022M\004\005\274>\026?\027\020\\c\223.\000r(\2519\337\264\350o.R\314\357!O\327\336q \351a\274\363\014\335\373i\373l\353\024\253\356\232E\211\206\330\314\220\001\242&g\206\255\330\207\272\231\001J\036o\356\234\031\214hJ7\270\263\017J#\264\315\177\300\331,U\3554\212\357=[Hds\034\343\376\035\307O\302\342W/^\375\223\242B\344\242Ii\246\231\252\306g\313\007cLN\222f}5\022+\034\315\234\031\333xX\200\3653\014\312 \207{\271:\262\274:\246Y\306\2564\361>\313/%,\203\357<\244\301\030\334\027\301\234J,+6\351\321\233\261\266$\351\0211\026\244\251\2110\330lA\336F\272\302\034\016m\314\324\230\212\322\003\334\325\240A\225\321\230z\033Mh\022\237\224\001\027\253_n\302#\244\247\243\373\"\225\220\271\272=\201\226_\241\374S\314V_F\251\364\275\362K0\364\242\031\257\274\003\233\376\302\341H\317\311\221pe\t\215\0028\201\360\026\3036~=\371\250\247\225\230|""\360\253\327\265\241y\354\203\260\027\317\227\354\342Z\264\237\r\334-\220Fd\315L\340\304\307i5F\202\n\234\303\245`}\302h\246R\217j\367B\242+\217\027yO\360\252\225+\261v\364\250\376\275,\032hc\200\254b3\263\247\354\352&E~\246$\220c\242m\037\307-^\033\243\0176\004\220K\262\nR\365\223N\334\232\002\272\033\263}n\035\n\304|hv\221.\016\016\020\304\356P>e\rK\211\246~\316\035\026\207\347\320~4\003EMk\240hd\244/\010\225o\261Q\010\222~\302\211\310K\207\371@\\\377\025tE#9\264\035X\325\010\357O\346'\235\215\316\342wdr>\021\336\030\275@\243\253\006\3237\301\364\230\371z\r\360KP<f:\327\337;>-\026\234f\247z8\322\247\356.\317\027\313\360\255\245x\320\202\334\310w\2511\"\240\277\032\035\251l\300\253\014!\0135\357\352\022\203o\317\261vM-\317\016\314H\331\312k\233\026sY\177\200A\202\314\004\360\227\r\366o\242e\254\225\265\n2\241\277{\n\2206F\330G\361\000\271\177\305;z'\370\253\004\004\240&L\352\344\353\300\307Sp\272\213\000\"\"3\177\342\021p\206o\270\007\201zW\032\311\013\255X\264$\013(\\\261\245\313<\300\253\351\256M'K\217\tu\261]\315\324\353\357\367\035\215\275\277\254l\022\337\226\020\352Ep-\030\323I\013\2236\025I\r\237\371\263vs\213^\232\244\330!S\253\235\232\323\230\302\220O\313t\035y\247\361(\267O&\323\205\027R_G\212/\025\353s\336\371G\320\344\232\357\355\332\300^\243\3019\333y\275\357`B\247\036\311\0025r\343\310]\241\337\301%S\031z'\242c\321\253/ u\033\310I\217\326\304Xk\276\221\257U!7\251\227d\252\230\341'`\021\237)\274\252cSJ^\243\250\303\341\r\321u\210\202\263\333z\364\0243\303\232\320\350\256\214Q&\226)-\220B\241\231\276K=[,\225\262\311N\027\246]\273\227\203\014\255\274\242x\221\377J7\273\273\022\305*\3522$\335\034\264^X-,\215kl\236\370%\227\222\364\032\304.V\204\322\013z\355m!!~\325B\003?3:$Y%\301]\3542\345-J}\037\013\0374\031\275\004\021\311\374/.\341\376\302\227\220\005\221r\225p,\022aQ\024_\231\300\213\2122%\330H\001\330\377\020)-s3\251\261\376B'3\214\333\314s\350Ksc\262>\364\213\300\376g0\017'\t\001N\251T\347\250\256\330\330\224BZ8\273\323\217j\t\276\220\251\241\352""\032.\276um\213-\260w\311>\220Ew\237\211C\276\330\2275\301\214\345A\354I#@\251\334\n\257\235\370x\324\240\263\232\240\377\245y\212\370&\362L\317Dt\222\317\206v\003\035y+\303\020\317\250aL\377\243\360\036p\300\237\017\022\337\375<\323=y\005RZ\203=\025\024\207\311{\2456\307\225\314%\262?W\354\261\252a_\307\204\222\002\263)v\322\245\216\322\025G\013\264\2164/\312\210\013;\004\346\3674\274<)N\366\320\257\312N{\032\223\250\t\272<1lXp\037\351\0333\214\236\250\360\"Y\022\300`\312\010&\252X-X\244\363p&\265\213\227iB\026\203\313\233t\317;\377\376\234\264T\013H\036\334d\264o\300F\310l\020Y\006\005\020q\374.\013\316`\023\254\263.\271i\002T0~;\250\350z9\326\217d\014\252Oh\035p\274\323\241=\330\207|4\366}b\302\317\005\272q\371\333u`\3136\363\330u+\235]H\327Bs\350X\260\307\307LR\272\313`\224\306\032}\035\r\201\374\303\000Z@I\231\022t\206\321]0E\006\025`\021[34\026\374\266%j\323\342\251\227e\275\267\355\020\304\246\340\315g3i\224\347\016uOl\225o\3531\237\310\334Zjv\230rt}h\204KgD\203\330\2279g\363\t/\030hh\177\320\373d\361M\362j\230\032#\003\331\363\014\313\262\355^_\356F\023Cp6\331\272\037\013\203\256+\304X\242\255\323\330\225\225\253,\001\223\321I\023Oc<\227\240\020\335\204\314\324\342{\242\335\270\250\254\354\022W\034\217\365D\367\337\212e\017\257\0248\202R]nk\336;\027\207\271!A\301-\240]\034A\207\r\201\014\025T\224\356;\032\035\376T\201\347>\204\035\365M\236\307B)\333\323\265Bw\267,\260[\rbD\314`\3228:~g\264\333\260\231\030\2734\356\021CX\"P\254\347\001\025\235F\323/\007\322\245G4\206\257z\036A}\235\313\252\275\221\305H\340\251\331a\014\370\032f\361\343\317\217.\004\274~\231,~{\200\301\276\237P\342\203M\216\253GO\200W\352\316\311\016\002}\322\360\255\276SH\325\202\236S\352^\247F\317\177\276r\262\026\373<i\244\221\033o>\036\240\325,< m\006\325\017\346\275\244\r&\377ta+[\036;\002E>p\217<\360*\271\2603\243\310\337&\224:\254\266\221\004I\306\026{\335\360}i\246\020\214\024\007R\231MN\033\301b\251I\025[[)\"\215\375\tB\274\223s\000\313\022\252q\034\320^+;\257\"\214\351\341\235$\325X!""M\357\005\206{\260\273J\221[q\344\017R\237\375%2\247\357JFr\031\301<)OD\230NO!\262\022\0078\2267\330e\315\305C\310j\255\222\373\212\317;\354\301\330a[\357q\263Q\312\022\221\254\356\010\177ys\270\334\0005\341\333y\372\324\017\216nX\264[d\013u\244\264\216^\262\007\027\375\342\215H\007\034\0273q\320\214\213\234j~\201\373\032\2335-\224\023\200\037\311\r\014y\216j\254\256;R\261w\007`w\"\325\033V\352\227\010\341\"\311\357\256\0236\347!\003i\366m\3739d}\241\376\267kI\212\037\220V\022H\342\316\315\336\n\222\326'\201\262\"\234^\314\215\346.\322c\010\256pH\036\362\253\350'iJ\312\267\263\036\346CR\006\361\324c5\224b\361\241\315\026\237|\215\316W\354\204$\0033\205\327\305\231\220&\2723\331\371\360F~\003\202\004\003\335\177\006`\225\362[\325\020\323\252\0257@\003\240\254\202\354\344+\037\332\237\211/\260\212i\030\024\340\r\006\251\344\016NV\225\346\311\252\227`/\271\024\203\367\210\311\252\350*Z\225M\202U~Ubp#?p\223V3\263b\333=\322\252d\225uefi\021;\361}I=V\230!q\230\327\320C\264\322i\026\350\nf\346\252\307\006SI\321g\274\034\305\332l\256\250\033\366\333E\265\257\213\303aO\304z\332\0265\001\367\200\365B\343\326\036\234A\341\360\224-\032v\001\016\030\2642\211}n\306\340\223\345;\244\247\363^\353t\362\205\022:\222\375K\344\365\313\304\247\364\013\300a\336{ \376f;s\262\037\262p\241F\"\354|\272\332\304\273\277\227_&\254\205\034\376\213\320\353 \343BLe\3136\244\271\344xBAr\314\224\275g&\371.\235>\036\014\352\255h`L*m\370I7\241\t\311\255bF\014\363\326\327\356\261X\233\363\271\213I\360\201\216e\334\334\006\261\251~\320\307v\007\033\032\246>\363I\250H\230\016i\267\371\262D/\335\345'\270\320\217A\333\037;\246A\214@\246\216\035t\005\326p(;\200v\036-\010\2141\224a\310_O\371\007A\024\206,UXU\205\363\316k\203\371\232\204\343}5\336\361\255\300a\300p~_0f\312\365\3173U\363h\233K\005tF\273\252~\375\001E+\033\215\023\206\310\212\0229r\311\022E\272U7a\223]M\245\373\327cs#*\205\2521\346\352d\271\301\362\354X\021\242\003\256\311&\335j\314\241\2758S!\027\271\356\010qJEY\001P\213u\202\024-b=\316\353]""\262uL\344O\n\321\016S\214\333\252P/ }\353\267\025\351\177\301\206\213IDK\277q:&\rK\351\3539\216_\206\331\022\373\023\n\251\341\326\236\004\014\000R\001\344\235\314\236Kl[8\331\252\324\276\354}I0\364\3656\007\032\311\223\2540\216I\010{\205\025u9\246\361q\375\013}\353\344 g\333\347l{\034\014W\2756\"pQN3\265\376\221iG\355\3407\021V\300\313\261\244\032nv\210\217yh\203?o\203\036\375h\343\224\325)\212gy!\364\356\335\304\364M~R\240\322XK\t\340\027\352\004\274\216<\014\370\200\363T)Yb\201`\266\030\354\036\302\324\232\023\355\350\035\254N\305\277A\361\022hU\311\212\023%\203\376\216&\232\244c\243{\003G\326\342\r$Si\324\211(\210\037\367R\323\220\231t\264\006\004\025\366\264\314\227?\177\252\323\222\003\034C\235\270n\002*\364\222B\216t\031\334\271j5!\361&<\257VC\371\020\212\024\013\326+\214qD\252H\316\341\213\275\000\205\307yr<\022S\325\231\261\357\177\350\333\004<D\026\304;I\202\n2\023<\210\276\002\304\334;\256i\353.\204L!\222b\215C1\337o\232\210\013\334\363\244\361d\231\022\337\260\014R\313\014\317\215u\217\313\266\032;U\342h\3618\273j\t\346\322N{\225S\342\364\230\231\364Zd\033\245\004\305\344\010\255\006\260mZE}a\302\204\006E8\334T9\311\222,\2142\230\261-a\332r=\005.$\03210\305\013\305i\373\243j\222.\272:\260\242\022D\t\037\033c\372\346B\227\240WZ\215\207\003\016\252\220\276\005X\033\222;\231\256\321\300\326\031U\"\207?\374\245\343v\275\024\337x\2324\371*F\016\021\314\215p\304up\265\321\302\336\261!U\026\351\313\004\010\316\205x\266\354M!(\207\336\004\307HG\256\242\224\031[JJ\251\216H\332e\034\346\3270\265\336\317\211\020?\037(z\006Z\376/\022NM@\216Y\377\302\n\211\332\231\260\240bH\010\032dA\207@\364\304\022\322\300~\317K\214\361\344\261\255X\303d5\030P\236\002\353\350<\220\303\303\253\034\30526\355.\353.M\243\337G4\001\360\354P\005\2302\255\305\247<\265\276\241\002IEBa5\004\201q0\3722\253\273g\000c]Q\376pX\004},\205o\230_|H\334\362j\231B\315'\223Yz\352&\233`r\001\303`a\351\"\243\206\237\244\2539\212\273\200\031\004b\251W\272\242\301\340\006\033Q\377\270\262\252\313w\206u""\344\317\272=\202GGu\360\260\233\2212\217\361mK>\\/\002\177\320\266S\362\366\335\230\271\333\355\342/\226\300\023\036\005\353\300w\026\241\324V\364\324\346Q\036\200\261GZ!\271D\356\361.\223\366O\270\342\350\341Bz0E\214\330\350\241\301\024\343]W\350\325j\235Zb\223Br]\267\335e\273\000\230\013\320\025\2031\256\000@s\333+\203)\241\2446=\"\367\204n\337I9\351\026I\301z?t{\376\023\245y\373\303\030g\236\221\3005\361\221\203\372}\341\225J\215$F\370\221\2623\031nr\332\2027\275G;\032\217o)]\243\324z\266F\264\246\365\266w\037[\275&Og\274A\210\371\210.\231{>\222\355\014YX2\346\301\323\243\254\372\007\335\353J\353\202j\031\342\223&%+l\310#\230\204\252\241W~\2003:o>\223\315\260[\251U\262\374\306\000Eh\020\030\332P\324\270\331rq\004\273W\372g:eg\341xi\361\250\332\211\213\333\342\341E\246{\315\354\303O)\367,z6\260p4\342\"`G\332\370)3\261\t\000\341\256'Q\371\301\0076\275\263\253\tl\001\334_\3403\233-5}\014M\021\273\260\203\375v\007>\246\246v,\247\234\341}\014\267nH\016\277\206A\255\231\311\356\316g\017\2310)\023H\"5\272\360\031\030\003\220lN\303\010\210M\227~x\327\211\300\237\316\214\014\177\301B;\243\316I\322\234\333\257\252\226XY\317\301?\312\215\2065\371 \222nM\216\2549\241~\366\234m3J\216\363Fo\264\240\351XJ+U\355\226o\274\355\031\325\231\017\010\306\252?E\2622\003\232\301\3612 \334\202v\013\225Y\322*:l\215\254L\254\223\227f\315\244F\260\200`\317\036{\010\002l\300\001\034O\274\335\235\253\005^\336*\005\356\3747\243\227\337%\313\350|\352\014\324)\254\262\332h\226\004\304\016\211\223\323\333A\232\301bc\372\235\000\030d\350\331\320+\037\376\325o\252c\227\225}\033\203G\016\230\010\2139\002;\010@\300`\237X\256\335\020\320\266 r\320\317>\344<\340SO\310\360\225\315\\\343\371\272?'-\304\337\200mx\252\351\322\024\265?\261\350\200T\372\325\326 v\342v\302=\231\262\355\206\201\003\340]\333x\253\202Y^C\272\353\232\037z\326;X\247\0172\210g(\002\331\366Od\334\"\021m\255\010W_{\215\202\036~B)\037\002\371\321\205@\375s\3148r\031X\234\343\225B\363\036\020\312\306\334\036\343L~be\013c\343\304b{""\027\"-\211O\240$\253\023\010\346\331\004B\321\223e8\230\262\275\367o.\372\027\212^\222x\252\240\001\276L\255N\t\302I\316*=y\357\314\030l\274Pz\211\236\007 \236I,f-\"#J\035#Cg\376ot\350\352+\214\252\010M\206\260\263\016yU?\244\027\252\n\374\210\024Q\355\217d\266CM\354:\310\227\327*\014\212a\342)\341\333\235y\316I\323\026Q\303|\3524\250ax\007\2255\002\0047\251#\022m\231\225\254\201\264\306\310\251\363\355L\313\354N1H\343\305Kr{\242E:U\021<\200\356\210y\236A\260^\364\371/V\003M\036IS\225\273\t\224\346\222\354\202\2408\006\030\315#\035\0321\337[\207D#R\t+.\237\375*/r\372I\232\272\300\201HnN\341\273g\223\305al\207\257\004:T\260\001\346\rzA_\271\201\001d\217q\023d\304\034a\261^\361\216\204@\000]\363]q\373\213\250\252\035&\316\026\360B\250\000\003BL\255\304ho\253\256\224U\344\236\3456;\317&\206\316H!\256\310\337+(\255=+\212+\215;\373~\027\362\023\305\257U\371\210\327{ \277\307\341d\267G\001\024Y\335\315R&/\344&A\301\r\303\330m\250\\ab\0355\231\020@8\232\271\254B_>\340'p\rF\210g\310\355\240\245wgX\335@8\326\275\311\307G\033\005\2411\270s\252\240\201+ ]\003\375f\342\231\273'\250p2\276u&\2264\361!Y\233\212\2630\357Q\023 p\002\342\361\006\241\"\332\347\377\271\337g\305\257\200\272\273\234\305\340\355\231\037+\347\324\267\231\367\343w\374\234\212\251r8\272\212z5B\272Z\317\270\n\204\010W]\344Y\023b\201\354\244\332\347\270\037\357\003\275\235\007\365\207\036\257\027\366\321\322\276\200\243\350<V\326K\274\262\361\022r\321\366\312\340s\036*\034\205\t\324\270\343\001,m\365o\205Z\233\353\241\014\304\022_EG\366\206\331r\232\347\026R\033)\220\227\245<A\240\361aT\314ym\277\262\245\016\212\t\344\241\000\347\246b\202\241\024`\374ibR\304\346\024\t\235b\276i\332\303\220\033\376p\331+\220\237\2608\024)\275\322\253\216\323q+\331\363R\013\341\311\0373\367\030Vb\242\220\246mg\342\312\020k\343\207\224+\nu-x\217\032\2337\346\000\234\277/GO\rXp\253\0036,%\312\306\236A\032\303\321\317\327\tIw\374\243\n).\357\342\365S\215\010\272\352\242\235\322\302\336\3420ek\214\346Bl\004\331iE+\2641\314J\321d""\254S\235\035\022i\324\321\242\265F\347\020\246f\327\355\321\261)\026Vti\201\027rBp\035s\264+\372\304\243\231Vg6\276D\207\021\246NI\371\023'\344\373\021\240\002\002\247\354\243\002\316\253X\025\247\342\202\200\266{M\215\277\342eh\211\230Mt\254\217\004Q^JY\367\345wx(1\206\256?\325+\322{\\\302\r\003\357\233\211h\374\263\261\340j\272Q&?\240\310\314\202u4\217\342\320\031\237~#\257\223\224\303|\240\200*|\256\021\225\236\0020A\321`\313}>\3652<\271\207\366\245y\032\373u\243\357z\322\340\324\264\356\300Z\327\327\231\200~\313+\362\017\202\021\330\316HP\207\275\321\010I\340\305\"\257'\236\333\200C@\337I\342\226\243/W\313t\322\220\245C\250\331\206\234mH\013\030\256\352\371 \336\300\357\240\350\031\013E\317$1\312\n2$=\215\"N\005\237\233\203\377\332\231G\021\224\324a\320\337x\377\211\2757\007\225\257\360\254\341\r\372\240\003\347\241\3255N\216\032e\327\030\277\342P\351 '\262<\265\305ov \242l\220\317UO#\000-\231\020\356M\245\250S\351`\t\331ti[\275\230\307\215\026+^\376j\"d\277?\316y\337\305@!UR\014~\251\301\n\016\323\345TS=\016$\260\2641(\271\001\216,\212h~\023\325\3651\205W\363\361\002\021\311\306\3513\2465?}\371q\2215:\371{\007#3\203t\220\226\217\346\342\246D\336Iz\034>Ai\026s@\366\r\033F\336\302>e%\247\270/4(|\007\321D\272\267\217\213Y\261v\006\262\231N\013[\\\362S\000\257\331v\311\344\237_*f\025\367\275\004\261\250\313\002\234[)\377WQrm_\333\220\317T\247\210s\326w\250U\267\262\013\262y|\345\t\222\036\036\006x\277\322D\233y\033\026Zg+D\242n6\322g\312F\207\036`\226-!\243\026\236\273\276G\276\373XpVU~\366!@\255$\013\252\237$\324\244\321'%\273?uh\315\277NXlu\354Yjl\264\211\034I\331\000\271!\3027\310ju\227C \340\276\267\354\250\244w\301\321<\035\223\325\266\271V\316\023\220n\353{i\007t/\n\342\026.\377\343T\022\352\016\353A\021]\033G\\\376E\324\301\377\305Q\270\227\361\355\032\216\2655\325bB\235\352\327x\253\336\031\037\253m\304o;\362\364Q\t0E\017<y\217\000\221\010\022E*\344\312f\256\330\010\231}`\212\267\254\375n\344\n\rz\363\226mR\345\375t\026s\"`\334\342\t\266V\277m\370\361\257""\022 2\263\325\204G\257\200Bz\355o\351d\211k\215\314\215\3012\272\325TY\177\317\022\177\246\3329IK+\324\231\000\3645\221\207\006IB\363\026\251\221r\017\261}\216Z\332\026q\010\225;\326\221a\342\375?v\223\373\302_\016\340\005P\252\236-T\270\031\321C\320\032|0h\231\306V\202\036&\332\201\264\370\377\214\333\272\246\374\242k\264\235sw\033\352PtuS\254\255\367O_EY9(\221\372\354\357o\206\323\034hksA\243q\366\241\247\370\222\342t1\220\3157y\270 \\\251B\272\321\346\242\002\275E\2614\036\013<\200\037\340\361\213p3\207rc\324\300\243\357\016\254/\256\222$\326V$v\227\2524\302\351\026\361\226\373\204\026\317\376\303\000\031\326\305f\352\311\231\203\252\036\331\312\261}\305(\221\251!<\211\013\267u\2000\312Vx\212i%\265\273?\261s\206\005r3\374`K\344jc\277-AO\313`&B\013\256\240I=\311\366{V\352A1\315\274\354\371\266\241\344\032 ;\356XTg\213K\302\263\343\313kL\nM\363\270k\343\032\205;_\367\216\236\025\313\255z\301v\340\0311\204\3751U\213:F\222\3243\362\271\035\242\321\325\247v\336\272\036*\356\024xS\233]\342\351\002dEeb\376>\354\022\022B62E\332$w=73\364\222\t\222\320;\024\335\361K\275\323\234A\033\326\243P\000\260>J}\215\351\262\365\315\177\\\203s8\352\326\326u\010X#\354\376\270y\237\373\025\334h\240d?\326\333\271\200;i\267\240\222\021\312\200\330\225\200\002a\270'}\177\017\341\372\216\335\006\205\261A2\263\223E\242I\247\031wX\304\265\357\303\034D\220Z'D|\356\343\262L\254t\274b\331\237\376\300\374t\n\213p`\000\327\201\365\235U\343\221\307N\002\231\324\022\025\275\257\024\243\"\344:\277\2032\325\266\304\263\346\013\372\354\273\220i\016\333\224\026n\333]W\2300\305\220z6\006\025\316\305Wn(\362\372G\036\344Ds\252\000\347\000Ya\\\303\314HP\230\374\007\263\372\204|F\300\222D\352B\243\365c\252\354F\001\311\200\346\025\037\031a.\006\311\200\014&\277x\344\362\222q\351\367\364>WM?\310\"\231\342\262X\200YL\235\226\340]\033\235A\031\022\256\241\211\223\000bo\224\310tC\020B[\\\276\236\030\213\220\001\r,\234\202\016\321\265\241\003\322\002\221\233\n\373\332\267\227\000q^\342\217=\241|\\\227\\`\234""\327f{w\204\0322\3248\r+\021B\357\203\207,O\375.\351j\344H\252\t\007\244 \326\323\336O\326\031\263\365\300#5\003\371\340\202T\312\212\364\037\320\227[\344\352\010\233\357|\222\340\340\265L\326p\377<\206\021\003\025p\345!R\032\271\265^\023G2\256\"\233\235\016\255kG\207\030\270=\326\312\365\346\240\337h\335\220\326\326\217\231\370\\\364@\032\311\237\304\261\206U\341\333\315\266;\252\204\226\235\312\266<(\234\026\372\247N\203\200\202\355U\376\226kB\"(r\236\205nJ\257\007\356\217gK\321\014\t {\"\016\034`\262\350\345evw`\257p\005\267$6:\232/\226`\266\335\254\0134\346\037\360\307u\005_6\2764\362R\3138\260t\344\005\244\200?!\016p\322\224\013\374\363\001\331\306\036>\305\232p\320w\200\"\245\220\320\242\021\222)\224\212b\225\264\034\360\030\302\367\272a\201\2244U+\027\341\255\373\255\375$\231m\224H\332|\300\375d\314\316\267\315\244\335#1)\014\351\265h\373\314\340.\237R\217\034\"\337\016\271\264\271\031\020\276Hc\327/4\006\007s\035\336\255.x\344\336I\002\017\024$\241\242{;\317\254\317\nv\325\321\021~}\030r\212\226\241\276C\276.\373\376e\334\210plK\013\237#\303I\373\242s\006cdjm\226\227\227<\325:8\265\373c\266Q\236\013\304\034d\307w\025\215\367\321,\245\020\245\333\026.L.\261H\030\331i\237\374AB.\226\016O\204{\356-Bg*\302p\222\332*\036\014\230\014N\022>\324\3115\353y*\003\322\332DP\341D\366\302\3762\303\335\016dn\035\001\215\246\242\271\247&3*\337\3365\"|\364\203\220]\"\270\246\303\265\334.\332\255\367f\010\354\335y\235\3549B\n\367\3049\257\363\273\370R\322b\320\177\226\n\267\323\221\242\010p\021\365}\333\006\304\026?\000I\t\250\2620\313\211\346\251~\314Tq\364\341\204\336\264-2,V\250T\344\006V\023&~\014d\240\225\030\250\237\177\320\331\246.3i\004MF\253\272t\031_\252\274A7 \276\264\350-\254\357\230nfc\243\263\215\247\240\0012\004\325\351\342f\2510!\374c\350\216f)\206\325\227\373d_\001\231\013o\027\300\205\360\325\300\002=F\035\2101\330A\255%[\350\367G\232\030\365\275\021.N\004\316\200c\361mA\372\325\371\240\276\2477\365\311\035\332t\000P\177\210|\352\345\025\262\225\252t`\376<""\333O\224^\035\346\344h\304>8\245u\373zL\316\335m\336\316Ue\360\037\346\203\370\322\312o;B\346\225d\200\307w\300+\341Y\202{\2414\261\274\004)\013\224\016\220]\324\357P\254\332-\241\2301\212\346\2257r\017\351\365\027\316*o!\341$\333\210\336\220hO8\261\221\210A\nlH\352\266~d,\360\245\205-w\260\375\354\205\236\277_'t\252)@\227O\311\304\215b\006\375!>\t^\241\035v\270/\303\3664\025\351`\341\014N\352\214pu\027 c\021Y\231E\227\221\340\016\004\376~\003\031\327\021\226\346T\250\347cr\2216\375\017\310\2033&#\034\237\232\241\r\247\000DP\3032'\346\335z>{4\200\362\020:JSWa\254\037'{\226\216%\333\212\2142\360#\361\364\245xBE\3113\2475wS\325\247\rB+=J\033?\244\343\232\375\371\316mb\032\376]\270A\360\003\316\273-t\2075Y\316b\270r\270\316\202\001\036=\233m!(\325<DXo8\260e\354Y0Z7\372\243U>\322\2516\222{\021b\313\345Gn6F\332\264\313\257\251>\007h\201\t+T$\2638\211\327\002\322\000\334\nr\200\031\270\t\037\332\261\3169.\223,\016t\035ze\257=\214\312\262\361\010\264Qf\3154\241\2210U'>f\001R\033\"\247\345/\243\002%\333\240\243\020\224\177-\013\314K\234H\0211\003\224\241&\305\224\314-\353\323z\241\345\014g\233uD)\330\264\377X\363KyF\301\036\013\311\361\303\245\000\322\372r\3129\226\332\311i\036z\260\302\252\200\017\215U\020\364\0252BLt\263\2203<\315\232s^C\333\300\257\331\247\367N\353\004\233\242\337v\241;\366\272[\035hP\263\005bK\234\224\340\370-G\360\207\024i5\330\000\343\033\355C\346\335\335f\3353|\225\257\256\245\366\277#\t\332\230\274\216O\242P\223\222^\341Q\023\227Y\375\254;\256\324\r\204\203{ek($\210\312\037\t\353`\355\000\352\027\241\222\333N\257\354\032_U\215\364\211\230\301\\\013A?V-\026\254\327\245\271\263\275L7\2013/F\234y\305\310\201\223m-}\256n\207\371\t\344 \376\224VV6f\273\223:\271\316Z\205\334\020\316f\230D\003\362\027\365@\332-\211W\274\245`6\364\257\311\030\266f:\232\220iq9HU\365\316\321\250*\037G\036\217W\343\000^\037e\326S(6\254|\333\270c\023%\312~\006U\265$l\304t[X\365\356+\251\320\265\nkrv \034\211m\305\302\243\362\311\231\210\226\237\211L\376E\025\177i$\215\221\330 ""W\034\017E\260\303\314\300\005\366\242\233p\266\377\251\352\314\301v\334\303@6\204\227\231jM\347\203\277\311o\nx\237z\227\245\256\223\2366\023A\r\225M\263\364i\323\221G\270\001}\326k&7\303\027+\311+\354>f\016\001<\r\006\327\326S\3564\233\301\036\024A\242k&\232]J\200w\265\3148\003hO\275\313\310\371\320\276\237\205\203\316\375S9\\\214\235\201\345\007\342\246IR\341\311\016\037\004\275T}\351\n[\210\362\36591\177Ak\3125iU\222\270,`4\271\322f\342/7\330j\010\\\325-F~*\366\220\\\032\232\312GV\245\0349\343\3647\221\324,'1\242\201\0358\226\202\361\257\334\205\242\233>\200\372\373HtW.\277\010\356\373DT\214PYA\251P\200\000Y\037\240d\177eQ\377\321\374\354\010)y\222Ze\016\222)IQ\013\336K\364\031D\373\301)J\013\005\365\305e\277*\311\360y\367\332\353r\323\r\020M\020\t\247\377\334\254\347\316\026mV?\020:\340g\254}m|\363\244.\\`\250\200\035\323\307\\\264\261\"\306 hy\303\341\2602\016\357\303)%\3160\034V\244cu\203W\357\234\275,\361M\301p\232\354\216\227j\223\276\306\024\354\324i\2567\314\202\372\177\230\272C&\276\351x\326\306Q+\212h\203\032\237U\317\353\234l!\306u\213}j\353\241H!+\277\204\332Q\223\206\320|\266G\214\212\350\010\3610\214*g\"\231\214A\345\210R\266<\013\244\213/\336w\036@\003\235\231v\207\361\3155g\n\002\243+b^\033Vz\201N\245\337\315\376\001\220W\254l!lcB\207\251\262\267\262\001'\225E\251\336\000v3\206u(\300\016B\232-\350\273\201\250;R\347oC-m\237L\277Eu{\022\265\205\217\374\276\333\237\367\033\207\230\025\016\375\241dJ\3120\316\356\333\203Z\354-\272s\202\330\013z\361\354E\342\020\r\302\001\232\265\340\014\r\252\301*\367\375\205\322\213\272\316\214<\221\334\025o\317\250\340q\340\014\206\332fj\023\033\360l\2304>\016\265\030\322\340@P\360\014\226\347\347]x^\341\027\267\002\037\251\215\023HmB\263o\252\010\225h\250a\006B]\277\357\317\345\257cJ\003\367\372\\;{\352<\340\312W\352\014\204Y\302\323\361\220\314\217\324\353\241\230\217\014&\013\246RN)\345\355\211\300\203voJ2f\307S0s\007q\332H\246\002\213\241\261\251\"K%\035\nU\311u<\006\223\224\004s3\010\347t\310`h&z\374\242\353~CK]""\017\367\223\235V\200\031I\024B\346\323\217\333R\315\331\244\221\207\213\333\344\003\006\335\261P\003\367GO\344\330\352\202\r\004\263P\330\204\303O\344\312\213\301\317;\257\312\271,e\007\306\254\2020\261\264\353\2642\263\323!\225;\313\342\314Ot\372\016u\026x\344:k\262\002S\260\023\000\031\327r\324\2238d\323jh\347\313X\000\316N\n\004w\303*\242\232\231\201\370f\364\224d7\331J\274\371\371\320\2636:\340\264\215%\"A+\031\362\210QPs\252\216\006\353M7\213\024N\275A?Nz\211\027\233\262\204\200J\272\033\342P\256\035\355\024}!\372X\373\252Juj\";\226h\251\235\205\215\314\306\343\255h%\035[\037\352Q\234\203\022\302B`\326\321U\027r\325A\2731\035\037\205\343\335<5\270\007\035\375\321S\3220x\251*\212=*}6\301\371;{\371\313\004\275\225\177\007r\003\323H\334#\253\024\367\205\254\221\266\310\336\200\227\006\350\235l\305\372\317H\032\343\235g\307]\3219,)\251\037\034k\206\262\304\374V\325t\356\206\023\241A\026r;\341\207\224D\331%\034\234\211\nk-)\323X\216\303\017\263\007\"\275\t-<\002\037H\317\352\323\027l\265\255\036\027\366Q9\254H\364.\334(i\327\3500\316\331Xk?\013\271\367a\337\362#j\245M\224\001\"\263\235\355\005\031\006e\333V&\245\322\3204\023\266E\271|\\\257\257\027ge\325\036\244\004\344\353\330\254JX<o\363#Y\302T\177\253\3261\273#\0010(\204\256\000\306\366\243&\360\256\352\001\017\260,\307(\267\030\233\355\344D\344\035\357\376\363\256\034\342'\2006\335B)E3;\206\305aq\370\013\236\000\232\000\235\000\325\315\2163\266\337\365\234\256$\2547\316\337j\316\244j\2507\201TO\017\002\261\034]=\226\203<\347ry[-UVH\247\357\226\316\376p^\304E\007UT\364\320\271b\254\343G?n\246\325\312\224\331\251\215 u\214W0\306\251\310//\273\273iL\034\360\251\242\311A\345\033\273\211`\256\017\317\322\262\335\334\226\332\224\rs\232]\215v\323=\033\353\\\376\213\254q\200\214\014\000\370\n\000\205\001\201\205\203\204\206\206.h\330\255a\0238@`06\201\204\203M\200\"\035\347\000+\320X`\330o\035\346\325\030\232\177\374p\271\231\322(7!I.R\017\304ihzU\025a\004R\335\324\326\254\033LN\375\220\244\373m\305T\250\241G4\371\346[""D\346S\354\227$z\245\212\002F\243\242\235r\221\337R+\324\344A\260\3527E1\002[\022M\223\233\220\236G|R\004%\367b\344Y\323\262lF&g\371\265\362\233v\331\344\325\254\305\245\355\"tY\354ov\273\366\345\345q\325\203\240G\342\246\007\271\t\322\006\223\347o\206\200\224\027\243\210\223x\017\022\234D\256D\265[y\377\362\345\313'\240\310z\221\031+\263v{-\225\027\373\224\230\224\355T\324\004\223\231c\n\351\222\266\244\210\343I\242\203x\254\013J\327\301ep\025\\\215\213qm\226Sz\241o\024,\310U\324\303\232\234D9\317\211\036N|\035\255IrP$\302\251\242\"\223{\242\350\"\365\000M<\356\232\236\002\002\003\362\270\007\027=\025\005\037\347I@H\345&\353=\016+r\252\007\214\021\214V?*>\016\202\217\327(x\225s\236(\222<x\365\304\344\"t4\306U\3064\276\226\252\273\251|5M\271\316\237\033\243\224\256\274\254\\{\263\266\270\355\370\336\233e\215\357+d\006Y#\313\3367,c\336^\\+,\233\365n\374\225\266\356\231\272\235W\243\235Qj\351n\374\222f[\375f\352\335\363)\276X\325h\375\306\364'&\233\327\372\316\247\233\255\332\274lVz\323\272ms\316|m\305\363/p\236\323B\342<\347\234s\2726\347\345\222\315\367\371=3X\245\376\230ksJ\234\033c\255@\301`\364Xc<\313w[\363v\361\235\315\255\323f>\210\243\250$\033\244\320Q\t\010\240\000\223@\020P\300`\030\216Fc\211\236\351a\314\001D\241E\310\027\214\n\025\017\311\342u\220\034\243F1\254\014\222d\000 \001\000+R-\"56\335a\314\375F{~9\013\022'\024\031P\362F\036\342^j\276\025V\252k(\326\254\357\333*|\202l\260R4\030\337\275\241UO'_\t\221\250y\216\2014\361NcS*\327\272;)4\224\324\313b\322!\006ZT\347\215\327J\262\023\376\270\243\317\251Z\025PA)\271\206\360\017\036\360\376\216\374\235\036\204\244\351\261\255\265I\027=r\323>\366\241\006\001T\340\362\340\202m\301\343\326\330\343\t\374XLs\034\360\232\347\2339\253A\215\2149\232\006]\223\035l\210\3439\230\377\200\376\244 \367\010]U\027\342\000P=0s\003\204'8Lo\010\014\231\211\352Q\241)b\201\223\315\004\367j\354G\371\310\265\327^\345\350'\217A\"\037\232\245;d\307\340\247\201\300\250\254J\226\351&pH\321\223\361{\321\275\243I\3612)F\330P\212\024""\344d \033\014\256\217\276\022\376EV\301<H\366\314h\342CM\306[,I\233\355\341%\224\231\221\201\317r\374P\372/\305c 7q\244\361e\004\270\024h\013\360\214a\346\033\273L\360\313\\\303?\023\374F\201`\215\314\\\311V\025\201\340\370=t~B\256\033\233\240\234Q\311\306h\377|\251&\203a\200\310\267`\371\277\n\233\312\363\247BL\352Qs2\266\224\272\355Q\372\373\336p\376\230\017q\033Hi\325Q-\322F\024\224\223:s`'C\323\333\270\266\276bP\367\014z\204\343\342\024\035\244\213\246Q\010%K\320\322\225H3\006m\365\205\205\024\225G\315\031\265u\244\273\\\254 \231&\351\260\262\273?YzG\202?9\321\363\252\014\266\325\356\310\r\305^\303S\033H\205*z\027Y\215\362R\213o\r\364\331R\014h\366+k\310\203\224\300\027/\"\202\200=;\242\030\203\031\023<\025\260\244\256\r\326\345e\332RJ\326\265B@\227W\311\247\361\225\030\224\345\244\022=5s\3669\n\350\\M94zM\335\224\211]tU\226\334\r\204\256\320\262DaPX\277\371\310\2053\330\334\253a\337Q\022\027\204\352\334\247\271:\226FH\210\336\242ANh\343\\\220\242\234\232\006\2552.\216\\\261\324\030\323\030\023\013\354\302Mc\022T\214\316v\t\215\246\274\335\000\216\254\372\0312\320-\014|,g\260I\217Y[,\331X\364\372{\201'\222\232\213\302\0065\307m\233L\267\203\337\255lC\270\301\260\203\250\325!\337\351\010\237VZ\2765\213\227\312\307\211(\332(D\326\202\315\221)w\361\035\376\352\357\363\034\004\rD\024\245|\010f\367[O\366\312%k\371\323\265\022\236C\240\260\0227\334f\236Q\276.@-\365\365b\027\352\235\255\372X*\231b\313\205\005h\344\2228\330\250bPqvC\342\262\332/\203\275\256!\363\267]:\376a\2068\271\211\315\235|\024\325\2418\327\342\r\007K\351\244\224\010Q\341D\316A\031%\277\243\222\250!\314-\215N#\337\010#\031\320\316\317af\370c\331S\221\215\253\"h\014\3106\036Me\222r\022Y\366\200\234\272\030\336\351\260\340\005\264(\022\"\215U\262n\270\324(\250\343\n\377\332 R\271\364\204\246D3\223\203?\230\341\344\204\201v#\365pXz\020\336I\n\374\202\357\226\204M\244\227`\001:\031c\355\023lS\000\3207\376\303\261\235m\247\202\305J\221\214\304\235h\263\334\217\302\226\375t\037\215+UF\354\357E\320]\224""\310\310\204\2408\r\327\277\331*\033\267q\273\003\262#\030\205<\002\001\335<\303\267\034%\222Y\010\360R\320\220u\244\272\275h\375}\341e\201?c\324*lE\035N\234\346_\361\252\006\350\230U\031F\006J}\337\000\260\340K\344 \2256\201\r\301'\313S\020\375\304v~\345\266\304\033\251\351*\353\025\343\303\233/\347\266\245\031\006\rQZ\364\272\013\330\214\311\201\317*\026\327\320\256n\3325\023+Q8\211\264\"\003\322^\252\024\271\244er\313\303\002w\211\216\013\226\367\264\373%\204\321I(m\002\262\020u *\335\306l%6B\020aJ\355\261Rn\373\223\2604)!\337\245\204\253\002\002j\013\340\303\221S\r\340\217\330\204\3473\310\277\270\221-\251u\233\244|\203A\246\360\003\226%\207;<5\274X\216\2666\232(\254@hV\212\300V*\306\225&<\004\021\007\031H:5\333x\264\275\024+#V\345\013u\222\032\n+\217&\010\221\267\006\275a>\177\316Y\260\247*{h`c\275f\366q^\234\037\323\361\255\354m\001w\317\375H\336\237O\375<\000N\303\335\005\230,\371;\241\315\023T\321\0277\026\273\341\022\nBs\377\203\274\006ysmD\266\264W\013g(X\266\236\335x.\002G\221(\0379\220\334\242\264\221s\311\357\275\016\"\334\203\264\263\003$3\222\341\207\312\026\362\301vaV>\232\314=JMX\37642B5iH\024\377_KQFs\347\362Ydf\332\343NI\245\323%\005\204\270S\2405\213\210\016\360\355\316a\215\307\217\327\221\313\212zj\035\220.T\221\356\323E\356\230\246t\021\255\304\3109\273\334\262\256\356\316\360\354\211\005\331\037\353\3653V3\37778v\351\231>o\033\202\266\023\372\023\250\276q\363\227\326<m6\032\342<\371\3437\230\303\231p\256\020\0355\236\370N\302\313B\305\262`\310\212Y&\211\353Kf5\177i\332t\036\036\006\371$\327{\360J\177\234d\025\217j\374\347\306\364\312\203*\004\343 \247/SDO\332\234\317\335\224U\212Se\325\365\361+\235\250\374\244\211RI\n\264U\310\224#Gt\302\3767\250\n\037n\023\021\254\314\220\025\234\353*\317\221\364\271\037xX~D\253\314\352\036\213A\334\311\304\331\352\3430\265i\265\304\275\022=}\335>\246\200\030g\364\275\351\215\311\215\336A7\201T\250\217\366\207\306\270\0379<\036W\356\2665\204\207,8\212\251@\010H\226-9\362\223\373\224\252\320a\240\210\374-""\"\025Q`\016a!\340a\276\314\226\214q\013\245$\0337\306\331[\233yM\321\200\247t\003N\357h\2429\346?\337\372\230\322\275\325\240a\013\306\227\271l:X\247\373?m\021\324a4\231\014\"q\375k\023cJ\033\330\036eg\037\345\321\211Et\317\211?\230\350p/o\313%\224x\250\316\367\264N}\201\235\035/\220\207\016\330\316\341\311\235\346\007\357\224\002\277\263N\204'\030(\236\263A\236\206\364\351\307\302\347p\025p\273\025#\016\221\177\034\275\000\241;=\343\020\336\352\013\362q\334\253\205\3309\222\030\341S8\220\371\320\024\3143Ao+\376Vcm&\031 l\354:\245z\354\2548\355\004\345\267s\020\353N\343\345\342)\375#\317\022^\236@\305}\316O>\215B\367)\223\214\237U\377nB0\212\211\372Sb\373gE\000\n`\007\350\254\272\265\203\013\020Pf\016\350\335Q\240\343y\027\021\333\337\0254\024l\314\223\344f\376A\307\241P\337\224H\240\r\354\372\216\254\317'\016\337\354(->M\223:M\241\240?\301G\377\234\273n4\210\334\333\316\241!a\317\217X\244_\007vl\333\252\253Ap@ SF\030*\220\346\212\373\364J\237\266o\343\303\244\275\367\255#\325\341\261\263\236\003\217\247\342\241\240\212\005\210\030j}\317\241\023b\232\3116\235 \255dw\351LS\n\240\352\307\002yW{ `t\306\032\345\314\234M\370\372-\210\"\256\347\245\350\346]\241j\300\371\360x\240\275\r<#j\362RJ\370\304\004\005!\252\272\362_Lz\246\346\300\007\001\234,X\266l\014\361\016\251\215\243\271m\250\331\016\243\001\267\275\330\263\224?\t\313sO\244A\3675f\031Y\300\241\355\031\006\354\371j\266\212\035F\\\t\322\322\271\204\032\220d\217\207M\262\351\234\322\362\301\034l\325\022\302\276^:F\027\223\366\333H\031L2<1Xiad\332\022\366\235\014\372\371\241\345^\307\210\360\217\375\211&\216l\027j\014\237\361\202\344\374?\307\t;\033\353\036c\377\016\346\250A\334\025\355\343\211\020\274/\270O\263\271C\375%x*\304\312\231\257\354\207\035\246\034\376\244L\025Ifu\242\004(\322\324j\375\210Z\031d\345\320\250X\366N\326\241\360\207\n5\346\013]e\337\027\225I\240\201P\314W\344X\321\013%\253\343\200|vs\303ex@\220\224\276\000\376\007\334\354\377\221\211\3777?\001\300\\\314\2514@$\000\361\000lA\002\360F\0050?""\235\267\036\350v!u\241\260\005\302s\377*cH\304\tL.\201Zu%Fi\215\031\332\rx\226\343\257\237\014\200\324\341\310jM\252\207\243\362\364).l\264\\\261\207$\253t\364la\246\271\"b\205\377D\0204c\271L|&\363\221\324\257\367\007\220Z\254\265/l\013\022\204[\376\373\024\226>$\024J\367\003c\2219\022\001#\005\332m\031Z\354W\nd\370\303>GJ\362\247\337x\034p\232:N\t\223GY0\214\223\300\315A\340\233[\005\342\234g(\347\346\005:g\233H\317\205\374\336s\364U\237;\007\336\350\346Z\001\253\346\233j\220M\322\312\237tX\377\360t\371\355\016R\220\322Y\242@\372\323\006\360\221\331\010\213\224\006%\205\263\263\226\336\226Q\360\033\013\315\217jo\363\331\364'n}\203\262\n\274\240\230\203\237\330+$\013\334L\205*\253[\253&\243\031t\260\355\237m_`3\377\321n\0059S\303{\265\234\027\375\270\3262u\372u\217\000L3\333\025e\231\223\207\252f\353\276>R\331\260\331fY\362\014\237\223\001=\024\017\003G6^\256\350\030-\222\360<\346\227CA\3640\242\023\303D\350\251\341P\221M\364\301 \255\264\006\236\266\371I\354\375\241\231o\254\324qh\25306\240\237\226B\366_)\n .\305\207\317@\232b\364\3655]%#\346\303\026j\244(\371\372\3531\354\272\261\366\232\274(\245\010\013\0069\2145\262\315\2600\207\351a\261\024\272_\007\023\347V\031\344\032\2347\254\3670\311c\2161\r\0342\327\367A\342\241#k\036\304\003\226\374S\034\026\330]\003\247\337\020\225\344\233\331\265~\211!\017\263\377\240\235C\003p\006\211a\257xy\227\240D\220\344\217!\223U\026\031~\365\303\342\025\005\200m\310Q\361u+\344\354`Kjz\000\036;\354\244\251\2432K\035g(\322\230\253\010\354\177\270\337F=\305\246Vy\317+\247\265\004yz\256\"\250\312\207\322j\016\340;\323{\037\354\342nB\276\020vbb\202g\304\375\210e\273\200\277)\214\364\307\036\303+\023\343M\232z\207\230H@\236\313V\203B\271\321gE\355\351\312\315\236\245\230\345q\243\365\242\001\326(\225\340%\307\r\003u\021\211\246I\177r\016<a\0161/\242l\346v\0066\3436\323\233Y!\231\036\307R\237\313)\004\315\t\260\221\303\343}\205^\035\236\373\025@VTy)9\224\010T\313BG\342\240\213\202\014\212\332*\005\370\261\214g\321\327e\252S\342\316""\312lT\357\364\255\037\266\235\352\261V\344;\366d\242\325\2174#\241\\\030\004v\241x\373P\032r\263\353\002P}{\332\022\004)b\322\255n\374\t\0109\373\224?\201h\246\013\251\333\240\265\0010\312\221\357\226J\374\017\202\2419v\310\007?t\343\206U\327\247\301Z\235\362\277\266kJ\017\244gi\n\3312\370?#1l\t\257\263k\317\327\317\n\210\326\351\007\"\311\010\035`\353\220\331TJ}\247\331\340f\025&`\033\224@G\025\242\0165\211\244\224\270)i\004\351\236\366T\356\031Y\351dHxs\242\310\217f\322\244G{F\324\002o\224u\353 V\302\307\300+=3Qw4\354\035*\230\314\376@\036\212b5\221z\000Q\2668\2150\270\226\253|/]p\261\000\324\371\213\260\222\361\n\032\372\301\213\265\356\177\241\227\204*\224\373\215h\375Hq3\r.A<\370\001\322\344\031\266%\367\354\014\217\217\331z\351\221\265f\31259B\257*\027T\263tX'2]\225S\354g\343\312\320\247\010A\227\n\205\311\267\223\023\036[\233\0135A\203\213\351\352\264\r\205_\344\032\272o\246\257\314\r\322\021z:\356Q1\224\232\227[\262_&.\371\301\365\030x\376\000,\214l(\005q\324\223\302F[A\225\027A\342\007\320zj\356\t\000\327\033\310\260$\234\310p\206t\374EvR\023\212\302y\025\236\343yM\345| \307\316\325G\353\243\334\022\205\374\365\005\034\202!&\362\035\321E\244\006\244\r3\241F\217l\353{~Hf\342>_,\306Q\230R@\334:\236\262\276\326\036(r\216\347cp\224\362Z\353OnsD\002\267\272\260\n\252S\017\005\n\327\354\310\307\334\023\315Y\200\311z\205\345\206\2201\346\247pp\354\256[47b6\014V\363[\2357\276\277\213)\017n/\304\312\013\323\030U\014%\320J\365\304\315\347v[;\023\2152E']*u-O\240Q\363\222\321J8\243h\215\265\212U\350\223`9\037h\034\353\244\345\025g=\035\355Z\264}`z$\276\213\025m\317\366\336\350\352N\006\233\221\025!\330u\247\243\222\243_7+e\223\327q\201\023\263\306\036L\213l\202\036\367\226\331_*\246Az\361o\307-|\341\016o?\357n\327\r\031&Y\3257@\333c\3319=\034\006\206\222R4M-v#\262\004\271s\306\250Q\334\372\250L\tIN\305\317j?,%\276/\200.\335\030\343\324\306\264\200\227\017\314\274<I\354e\013\311\227C\203_&\365b>\240\032\363\324I\373{\371\223^\0013U\303\255\262\230\370\251(\016C\205""\306~Y\0049)\364ek\370\317\020\300\227\322\372\244\\\247\003'\014Kd.\0022a\345\224`\246H\332\354\334\250\247x\356rI\245\2141|\363\301\247{\345\364-\377\244b*\253d&\243\236\3170\2208\030\006\247\303\2573\035'As~W\311\022\2068\000\303\236H\311i\363\355#X\325\366R\270\321\366\220\204O\302\236\345\000\273W\004\235\355E\326\010\207\030,'\031\365V\267\n\261}\247\025\257\013\2515\367\360)\272n\234%k\200^EBb$\337B\362\036\251\020\253T\250g\322\\\306m\242\306\264\265\262\345\356\352N\207t\370E\203b\031\217\326\231\016\350a)Lm\215\016\322\334\0176g\212\204M\027CE\277#\232\310\"`@sy\377NW\teT@\320t\004W\330\242\331Y<\"\344\243\242$ m\222\230\2767^\244X'XH\336\306\"\314\204\322GQ\267\346\342\234\315+q!\026\214\256\344z6\300\203`B \271X\301\217H\243\242\307\273\304\330\264d\275=E3\337\\\237\307\307\223\220\232Bk\013\302]\322WO(q\231N\337\262\272-\224Uw\216L\014\301,\001\365H\225\022\321\026K{<\264\362\216Q\343\214\226\t\321\377\001\365%J\265\312\233(~r\314\035\300\036#,\340\377\213\350$\342\347\340x\310.'\323n\210\244=\243@\307\345\213QV\334\223&P\320\214\221\324N\272\355\001\327&\033\247u~\246\264\277\270\274\255Tz\305:\264\306<\242\322\014I.\255\325\253K\373z\346\200\3016\006\333\227f\022`Z\003e0\355:\033\323\013\036d\372x&\323\324\2722\215j1\323\334\342fZ\327\3113\355\375\243\246'\020\236\242\303M\007\020\005\3008u/\332\242\005\227\364wk\276\376\327\026\270\"\033\021\357\247\014\247sU\035\317\253\372\243p\316\304\031\177f\323\362\311\002q|\310<\201u\005\324\004P\263\\\341\254\024\216\000\016\330?\217rPe\263\313\006\211Dgk&=\362Rj\256\362\206\305VUc\255\321\361\370I\341\347\003\314r\370\013\"\017`\2261\007\343\355\205q\013\241\036\307}\212\331.Q\000\317\002y\365\306\375\342mO\333\272=G\215\241\024 J\270\260MWK!\n\220Y\211.\270\314\003\305\234\243\314\226/\016rS\n*\200\177(\257\031x\241\036g\033\r\025\013<re\316\325\2410\336\344o\002\341\22424S\354\223c\314x\325\233[5U;2\2437\005\2541\300\322\302\322Q\312n|\215\247\220\316\315P$\370&\025\266\323\307\310h\037\034\274\200\215E:""\246\277\242\223\301\246\336\024$\331O\020\201\004y\242\315\323\252\t\377w\307-\201$Nqt\332\331#a\006\003\2739k\335eb{/\375\336\336'N\356M\245\353\215\010\200\266\rv~?\242\231\227\"\352\355\350\311YJ-\245\200V\031D\trw\216-F\0134\256\374F\232\317i3Ap\234\267\310\203\021\034\263j\216J\000\360r\341-\224\322\021\220\203\370\322\031\356X0\365r\214\272\214\n\033\230rR\206w\237K\341`\0231D\022\217\311\323\342\304\262\267x\272\346\205z\354\252\377\206\311\215D\201\240\315\031Sm\366\034\\\350\232\267\371\270\023S4X>\274\315\335V\n\317\361\301aO\343,\302\036g\217\177\222l\310\244\030\203X\203\253\001\233\263\256\352\234=\347\347\274\360C\347#a\273\251@_tF[\201Q1\246\235\273h\nt\312\035\001\352\tr\337\341(\233\354M\371\364*p\256B[+\207\253v\240\260\025c1\367\306\366FU\200\272`\024\323\360\037\000\230\331\366\2101\031\362\332\204\363\230Q\027\231/\270\352\353\350\330\225\336\225\340\r-\3163\312\330x:\373\237$\214\335y\301~ZB\200\236\220\306\314\202Ab\345P\306a\002pI\017b\204\203N\230\0347\242\211_q\240D\340X\250\372\375\365\214\307\336\254\353\204Us%\206|\252X\215~p\220\203\031\270\315\315Pf*X\023\004\327,$\277\323\216\363\270,CbTy\303T\232\003S\350\227\222\315\213\253\305R|\230\225\302@\227\205\274/\326\316\341\\\223\207\243\021d\323\r\211\340]8\335\237\272E\026\006\370\034\035\255\217Gf\271\031J0\003\331\302\326\017\303\n\335\317+\242\340\267\322}\263\340A\226\373\001\315'\326\203\246\221@\275\354\002\214Y\000\366\031J\0360\221\033\375qSR\222\364Z\350\313vz\250\252\006\006m\254\024V\315\210\362RP\200\322\002?\000<\000?\000]\301Nm\332.V\265\255x\363\305\314\246\234\227\2726\214\272TjI\367\205\353|\023V~{{Y\025\362j\234\264\037S\335\272\2056\261\2075\354*\325\225\347\255\370\344*-\303\315\254\222I\311\352`\203\014B\215Z1\307\260\317\304*zf\372\365\nN\013\357\227\271v\317\324\311\373\275~\256\222\356K\351\355c\227t\312\226\367\277\366\346g\347\307\337\314\315\315\023;/Kfo\230.\037\223R\217\361\305\207\240\230\210\207h\210\271y\267\327\277|~\375\375J\375>\264\272\375\245\373""\375r\257\3425m&\330\322J\320\237\277\353\251R\316\270\212\331\\\276\263T\207\351\316\352~x\271\372\007\3518G\323\215\243C\201\351\010\362\337\363u\274\215\266\024\224\016-\036\302\343y%\217h\362xtTL\3624\242\250\027\357\204(\222\336\002\236@\266\245\020\251\010\014\034\301\340\271\"\001\nTH\304p\357\033\r\204V\263\254LF\n\204R\2503]\265\333\244\335S@0(\2214\032\t\206DB\301\262.\341\003#\321\202\211E\"IA\016e\234a\304\020\022\021\021\021\221\n\nJR\035X\360\274\371\254\270\342\007\362\317\212\036\237\245\321\310D\252N\263X\243\375\215)N\327\242\307\372\030\016[H\367d\301)\224\250\010\254\216\276}\326\2412\361\022Rq\221B\"#j5\316L\021\334\261z\260m\030\352\322$\217\255\323\266\032\224\273\272\355\212\373,\373\2514Y\353\323O\230G\343\267\362\365\201$i\366C\323\234\334\3035\211z\203\363\261O\313h\210p\350\2048\020\216rW\014\307\211\213\304\261\330\342\207\236y\306\342\3065\255\377\315U\2719P\026\256~f\342X\311=\346s\331\215+\344\364.x\317\\;\377\212\03577|\271E\355r\"\n\257)]\243p@v\200'\210\340[\376\266v^Eq*\367\300\265\305W\277sQ\300\024\206\006\302\017\365\2235\342\307\275\233J\364\273\375\252\356\355UC\367\365{\027\003\352\272\211\277f\237\002\030k \204R\252\210\031\273\271p\004\247\022\313\004\366D\373\212I\223\030\001\013$\210\356\206[W\030;za\352\336\357g_E<\0178\270&F~\371\357j\343\337yc98P\342\\\037\305?8\025\"H\013\354\224\202N`2\273V\257tD\317z\014\261\tI\003,\006ZH\356\336\003\361\344\035\352\022\003\001\274\232\354\273\244B\347\247\354\212S\202!a\367\273\023w\326J\251\202\3255\nO\"t}\014/\272(\016#\357\250GF\220\322\221_\020\333}H\244e\001\210\347\263\262r\256\2373O\333\314\201=P\001\026\264\230i\330\353!\354\337\216\365[\251\331\3606\362^\317\330l\276\202J\256\216\303o(s\225\352a\252\014|\033!\206\274I\376\202\303\365\303{v\357J1\007\213\204\364\"\033\310H1\245\325\275(\222\215\021\341`\213\321\343\256#\363\370Ddo\325\3565e:~%\3447\251\004\217Zl\371\357\3600j\253\215\237\237\004|\267\332\205\306\362u\371l\325\205h\333l$\007\212>\232{A\322\300\014\020G\317""\216T\357\311\324\353P\315\245*\3674;\271D\222z-\021!\376S\034\202\000M\320\247\351\215\325b\2011=\237\220\263\214\315\222\210\255sC\201q\245na\221\025H\"\226N\310t\361\030N\227\257W\231Y\260M\200\363\313\360\246\324\373\254\374\261\227.\267\3262Z\364l+'6\302\213\354\317\227\213\306\343\2124\0237i\206\207\362{\225s|QQ\366\272\314\310h'q\227\250\320|\016\242\260z\234\330i\201~D@\274\240Q\355\330k\235\254\201\344\235\305\351\024\265,\014\\w\201\007\262\327d\217\2777\017\233\241\251\030Y\2726'Qh\353:\024\034\032\244ov\234\376\325\220(\3037gF\232=S\201B\001E\350P\312L+\021\307\316\217\353ai\034g\371\032O\3266\317yH>\341\333$\311\270\265J\312$\323p\362\356*\237Y\313.\377a\007\352\311|\262\327\274\243\355P\247}qnzK\241fr\360f\203\303\256\240\367R\030\240I;\301\303N\322\272D\005\250\206\251\\y\326\007&\320\232\0053\371\005\034t\205#Xv\3524M\351\335\271\2474\221\251\311e3\233\344TYP|7\247t~\356~\375\271\340b\252\255\r3\3259\327\023y\271LS\017\016\305V\3772>C\343H\271\346\2703\3403@Y\200\273\005\341\253\\\227\256.3\026\230x\2459\324`[}5\360W\361[\310\301K\253a\010oq\254\3210\361\364\302\341\324\275\320 \262\240\221\006i\332\030\305\320e\270\365\2731\351\356:TN\240\000\342 \365zLM\264\330~\021\231\036)\213(C\2029\227\377\371\371\220\212U\273\275\232C\222V\2417s/\251{5\267]\250\332\212\025\223\360z\262@\206\277\237G\027-I\215\020/V\307c\024\230\241 i\t\342\360\245\005|f\333\211\230\241\202\312?\312\260\273\350\n\263\\\035\030\242z\032_s\323\362\317M\216\312f[~$\312\240\302\327\354[\370\014\254l\326\233\374\301p\231\305W\363\037\365`\336\032&H\227\215\177V\250GE\035+\215r)y\353>6\340gF\3622\332\302D_W\024\025\360\t{\210\"h\007)D\020\2234\3130I\243\231,2R\014F\340\304Z\212p\374\312Ixf s\027\276x\024\006\314\027\221J\rs\342}\352\216\3213\333/~\377\033\264g[l{\356\217\312\r\374\tFG\262&_\001\315G|\031\326\3003\226s\341\231\253g\216\207\212\364s\310\026\r\334;\245\361s}\353r\007)\217U\274\266\205\006h\273\302\237\245\013\224\331\364c\311_d\213\357\265\216\006x\362I\321\315~\254""\317:\217\010\024?pb\216\204Mb\270~8\323\034\235\241\210Z\337\033\022\207\210\323B\222\367\024\300.\375\310\024\354\372\337\007\025\027\234\211\014\021\274\223F\215\300$\277v0\220*\217\336\305\022\3504-\246\006\241\261\376\343\351Hy\327_\264\323\2778\261Q\353.\251\3460\366\303\205\211\000kloa4\315\210\033\255S\205\333v\336\202\340\243\212B%\233\364\237\322L\247mW\n\031\201@\212\230\001\320\2002\256\3578^\032\322Y\367\3579\321jo9\250s\326\3400V@\301\033G\004~\032\331\240fW\244P\2421\353PZT\316\364\354l\261)c]\027\2669\267\303FP\377\323\036\343\341A\260\270\211/\370\272\227qa\343N8\310\365\226[\304\2247\203\220\373%\220\224\336\247\335\037y$,\262%O\3752Vb\364\312\222\030m\221 \030\346\370E\177\217\"\357\353\034\202\320y\245\r+\265t\2455\257\320\374\361\360\216\315%4g\027b0H\305\351\213:\220\005\347\345l\227BZ\350\304`\3147\016{B\315\324\375\350g283\345\356\334\302\001?\275\204\275,\362c\201\210CAu\324\350\221u\010yiC\230\201\032w4,\345\330\223A+\233\310\246\244\177i\234dz\264\211\277\365)\301\336`~\212\020`\264\021m\323\251\207\024\001\267\220\345\021\225\321\336\357H\246\246\277j\216\206\225\226\032Q\247\302G%\"HZn]\362s~\002`\307\234\267\265\211v=\"L\007\327\320\321!j\r\016+k8\220\332\260\366&\222\340w\271i\027z\033L/1\013\303\000\237\035Pw\351\023\377#\021\010}{M\355\260\247\036\201x\336R &T\005\242\0009\2178\037\001T\321J\000\371Tv?\001\315\266\321\374\273x\243).\237!\205\361\362\372n\270\177\233\013\010iA\016\262\3715T\031@'\241\361p\205\204\023u\\|\370\375i\007\304\013vR\271\025\300\341]\327{)Bq\213\"\206\033\226\017\226\210\314\226\203Y\201\343\016\005Vo\027vV\371\036\253\350~\242\275\250Bs$\367\214\226\230\254\215\322\000J\320\221\002\233\023\027|\210\307\276\332\2148{\022Z\"5\311\216^:|\370\255\246.\362Fw\360\227\226r\354N!o\216\022\002}\337,y\016Hh@>\344\313I\344\357U\3639R\321\365f}Kr\2537.H\2615\216\351\013\244\267u+Xrq\307\021\277\006\351\266\214\227\324\003\370\363\204\272\267\364\031\277es\020\345\324F\213\346\374\242\240\221QF\177\r\036\001\002IY@\272""\273,|\024\223\222\375\002\267(\001m\033\2669\211r\252\376\014\214\201\317\272>[\260\201~&\332\235\036\322\327k(A7\260\006\000\315\031\350\377\257\006\315\002+\177\336L*\213\221\377\263\331\261\355\262\267\177\254\t\244\227n\033\250A\227Z;\t\315%H\343{\250l\207\322\341\270\006\377\323?\303\201\006\273\376\321/U\007\210>,),\240\233\202\224\301\374k\246)\265s\307\332]\250\3668Z[\253\252\255\310l\333\233\364P\033R\354\242\276o!\030\276o\2421&:s:\022\037D(\377\231\323F\302\364\014BF\020a\216u:\203\217\333\223J{5\241\351[\037 \r\023JV\255B\311\356k\204\235\273\370\010aeLlv\272\365\2108\177\023\230\277Z\200\351\023u\031\236\353Gn\223-U&\324\300\215\026\266\261C\"\014\250$\207\226\276\014By\314\024\355\275V\312\227\236\275\035\204o\267\333\267\207&\322\214?\345\017\375\221\212\266!Ggc\364\355J\0230\3231\251\267\367\177\265{\246\207\330\351\250B\335\365\332\214\314\303\223\215\201zc\330\301.\367\023\246Tct\272\357\3743e\304\006\2159\251@\320X8\r\0230\351\204\335b\210x\234D\217:\357\321\\\037\371p\326q*\214\366\205Y\324>\214\350\257\007}\372\240\025\232\255\327UI\374o*G\027\215\234Q\242Xaa\316\300\200I\206\3511B^\226B\244+`\265\276(\275/\311^\370\014\354\301s%$?\261\300\334<\232E^p\315\252\352\257Jq\024HW]R\034\270\215\336\213i\223\270\205\244\333\322H\247\032\002\237\3045$\245I\227\271\001\202\031\334\027\236#\264,\350\313\277\225\302~\347W\035X\334\371J=\230\237.kQ\360{\314\200W\210\277rEaI0\204\322L=u\016\255\325\203\312\334I\356\027\327\211\270\214I\216\004/\245R\210\375\364\372u\330\372\005\307%\336\263\245\331\312\017\331\324|/F(\235\300hDx\211\2215\036_\002g\356\223\026\353\204\336\215M\224\276\320\203P\2014\242z\032y\020\025\360s\035\2479\213\0358\366\"\002\264\177\000*z\024\032:\360\0327\314\300\010)$e\220\010sS\203|\302Y\370 \237p\026>\254\025\001\200)\002@\010\000\000B\"\000\010\002\000\320\\\030@T\226~\253$[3\214\356\327\346D\020\261w\210\001\216\001\226\00129\267\177\2442F>@KS\344&K\245/V_\341\020\233\330\242\356\363+Tl\340\252\023RO\323\245\370\000E\276\305`""\202\256v\214\204\257\000+\221\311\324s\020?\221\365\037\024\177\345\033\3736\324AY\247\2412\233s\271\304\245\305\212\311\224G\274>\253\025\322\316\263cv\217M\243\245\362\216\306\223\2134\016w\026\203M\315\342\326de\000T\362\354i\017\226\370\022=5\375\351\353\247\273a\366\025\334\331+6{\314\201\345EB\264?\361\016\241>\242\374\344\017\272\317\346\213\214u\276F\217\372\r\032\334f#\267 \026\253\033E\247\332\227\356\207\223\000>\2536\273\207\347_\267\215N\311i>\220\301\353\256\3516\353T]\223s2\370\314g\014F51\237\331\212k\340\025\263\264\031\314\356u3e]\014\026\200\225&\225\357\373\312\337v]\207M\2566w\244/\372\212\244\337\354\024\373\334\350\354\317^\360\232\325<\344\212\2705Sgd(7\345(\237\331\305\r\245u\332\324<\032|\276\346\033\"\374\352\206\320>\034\254\313\305\252GA7\300\336\371\222\016\354A\\\200\267[!\325\001\232w\366l\360\251\201\362\224k@\203\013j\261\312%r\037\227o\262n\361\372j\317\332\272mn\006\203o\020\213\321^\254\375\002Y\211\221D\273\216\357\210\305\337\361\207\327G\365\251?\\\032\254\264H\232\\MFeY.E9\r1\001\365\224PBDe\266\177\246\032\001\335\300\362\243\357\214\307y\r\3367\263\204\331U\345\025\272\221\367>\317\316\337\321\371:,?\355Z)\361=Q\352~\355\030\023\215@\320\352\205\267\347?8\315\257\335\334\214\005\343\205\323\246\346\327\320\374\202\256\366=\241\370A\036\274\373;\033\333\215\300\017\304\345\336\226>\304W\016\343?\373b7\340\340\323\026\244/h1\360\023\265\357D#\314~A2\370\372\253\006\355\324\260\256V\022$\327\334\220\217.-\325?\324\237^\003\375?\255\034d\332$\271rp\373\352^\336\256#m\201\235\243!\220\224\211\3714]\010\351\353\363\246\257B{\217?\000{=\005\0165\372\005\020F_\002\337v#N\361\252\370\324?\364\"\320\252\263\375\206O\000K8\340\365\335\270\342\025@\225\007N\324\3119\010\337\357\345\363\265\243\023`%O\345\277-\243\033N\\x\030\237\236\327e\270\312{\264\252\227P\331\227\265\356\210\033\005\233\234\270\373l,\331\323~\201\360\023H\222\251\236e[\371[\t\227\340E\343\236\334J\263\232\303\304\245mu\007k\277\366\202\027\266\\\203W\234n\244F5""\301C\276\215\2641\253Et\224\252\207\362\2327r\314\215\275b\335\207\246\321\350B\311\370R\234\345\024\273\337f*\227u\247\270b\260\022 \037\264\033c\243{F\023e\335\r^\375F\207\342B\007\243FfT\237\344W\266u\013\206\337j\234\254b\241\333\344\330\366\243\303g\267\212\006\006\027\304d\357\367\272^]\273W\306{\240\037\265}\026\225\370)\210\372|?V\323/\034\255/\354\r\201\370.\004\2628\346\221\301\037\264\312;\237\325\352\302L\275\313F\200w\344\342cDhD\340`\216\r\226'ltB\377j\n,]\203#\267\220>\346\264\017f\360\373\277\243\277y\231N\304\203*\030\026\270WoyEn\355\031i\320\014\004\254\362%\255\222q\353N\177\034\017l\006\360\215\254\341\277d\024VO\345\225\241\020\026B\240\360\027\225\306 \242z&=m4\016\375\343\301\021'\227m\217|`\213\215\031;\2668\267\201p\266\212\222\r\344\301-W\330(\\\243\3011\205\0104?\301H\256\201\254\357v[\026\227\370\222\262\326\265\311\326\032\215\305p\205\326\335\260\223\342\323wH\374\335\337\r\006\037c\003kl\347\330\3115(\373 >3\220[ \203\325\214\213\255=B \333^G\352\006n\002\035s\373\251\355\205\274u`\265a6n\227\350V\3530h@3\375\223\203]\262c\254\2352\225\251s\334\032\362\310j\245#$\372u\262\246\300\322\304a\370\345_\275\352;\036\276q\267\344\250t\341\303\350\r\340kr\361O\270\376\315\364\232Pa\026\203\2501\304\254\277\351\270\326\203H\374_\006\213\314P\013_7Lzd\021\370et-\307\270\252\037\366\237I\316\362\304^D?\020V\342\212\372V~\225\017\245h\204\003\315\343\352\206\274\317\013\312\360\tYI\224\030\302H\260\315\020\266O|\231\364%\030\226\030\267h\221T\271\324\364\367\023\262\371&*\263\267\\\245K?Ro\340{\242\031\336c\271\3703Nl\360\034\235'\210\373]*\310\017`\025\224\2763\217\024~\006\237\264\353\3415\t\376%\226\363~\214;\361C\001&[C#\223\246G\"\273\214\037\265|\204K |\265\323x\314\026\372\2163\313bhk\206\t\217Z\016\265\035\n~^\010\2372T\360\rx\256\270\003hB\375\344\320\343\355H4\202-\276\375\233\3271_\022\342\257\351\252\\\017\227\243\213h\274\372Z\3779\372\216\256D{\370-\272\317\306\310V2nX+)\222\014\013Z\375\230\321\233\006\027\3422A[d\007o?Hg\251[""\3702\005I\0164\320U\234z\236)\215cP\000\244\301@\243\311\332Sx\224\321\266r\251n\222\373\271\315\322j\252S\"\306\215?\343)Q\243jZ\316\200\365\252\001\r3\305\235\016\266\261\227y\256\014\250\013\234\266\200\333+\344\213\372E\367q\304\312\1774Fp\000N\262k\210\265\224\373z\016\024\276\017\300n\207\234\3410Q\203a\370Z[\211\316\006\367\320N\324\301\014\260\371\346\020t\344\374\340\010\010\233]\022R\212\225\365DE\2769\321\344\"\025\303g\340\241\371Laz(\243}\202\325\334A\034+3\344AZ\014\0375a\222R\236\365\005\335\334U\254Cw\331\276\267\346\217\020\266\223\036\321(\352\316\3120\271\241\312c\370\223^# \343\213^\250\007\177&r\003\204R\250\203\207\223\266s\312\231\021\221\024$I\032\003\2030\020\024\032 \223\314\347$c\367\302\001\323D\244\204\016$\2251\220P@\"\301\004\"\223\221\202\202\024$i\014\033\234\203*\372\2303\320\202\234kM\211\317\241rC$8\342\002a&vP/\367\265Q\252\021\034\255_\276\001l\"\004\316!U\002\327\330\006l\252}\231\252\372\363\016\257v\206P;Nj\247,Y\373\204i\230\342o\033\207\276)\235\326\026\270\242\300B\276\266\264\216\300\250\222\356\014P\323\327\203\327\240\033\260\036\337\224\242\376\201\206h\030\212\2256]m?m&\263\325\340e\345\337rS\006\036\270\316$\272[y7\3209\3211#g\234\220\222\316V\332\236\311\014\330\221n\276\373\307\257q]\255\345\322L\024\376Os\023\235\250<G\214\032\322\236\311~\352B\203w\306\254\327\215*m\202||\273\353Y-\230R\275[\372\226\364\351\227\3610\223\032\336@\034\352|\025\037\277\261\341\010\305\326(P\233\276\255A<\006\322\253\\\200p\022\371\241\000\030\362\327\037\372\321\240\243\214\271\337\243\037?R`fb#\306G\331S\301\231\307\274\371\337cr\250)hi)9\332\031T\355I,\231\037'H\261L\27212H\246\350\211\024\327\211U\342\355\232\0060\306\274\274e\242\232\245Y\373\205U\027P\356\360\221\1775\221\360\320\375sb\251\307\247\372\366\224D!x\341\250\216W\221\343\265\223\307\353.8\010\21052\214\0365\305\244\350\3543Q\365\254\023\033\3726G\231Y\274\230\213\354W\310\214M\314\024\031\356\201\242=\236\216\316\006Z\007\355)\032\017\351\202\374 \367\357\260V\t:Pr""\250\203kx{\220\207\025\247\252{&\323\263HM\202(\357$\030\222`\346f\361\2415k<Z\250\036?\341'\236\213\360a\236\250\202\317\363Ss\343\242\n\305b\242\312J\372\"\242`\210\030\247\3218a|\356\345\326\313\330\371\335\260\235H2\010\025O\2371\323\266 \022&J\264\321\273\006=(\373<^IU\270'\265\242\030=g\322\237/\017,m\311\311\357\207g\273\016\365d\002I\343\001(\363T\373\361\261SB&\366\250\304>I\363=!\215\244\177\267\342\233\230\227y\022\006b\312\201d4\251\3006'0O\371E\370\035\3163NOh\023s\202;bP\244q\304\030\235N\342\007)sQ)\344\034{c\340\315\t\211\363\001Hh\021\203_\234\330\247\372\352\341!\222\224\370\2708#\226\004L=\307<\260\322J\241\010\305\\R\371z\216.+J\177\244\365T.Pfa&\217\022_)\255\364\201L%\251t?\350\304j\213\314\2770\r\333*\316\201\024#h\003\0073/\343Y\245\2439\267{\255^\355\311\005s\270\336\202\010\333.&\367E|X;+e\344Qc/\247\331\210\216h\\\242&\243>9,\242I\336/\226\243#\240W\006\tV\377:\n\270\357y\360\233\\6\216\265:\\\334\275\250\3645Z\037{\022\3553R\303.#\302\374\210\006\200\275\nX\177\215\273?Y\320Ax\007-W/H\273%\264\036\277\305:A\261\036\306\345\240\346I\261\302\205\036\033\355\216\2069\305\223]^9\345\0272DJE\2330w\372kV\031\230\264U\332b=\270\r\211\352v\205\340\n,\002t{m\217\024n\212\005Y\375\2019\314\346\376\3774p\213\332\317\301p\377\300c\204\035XL\263\252\353\222\033nJK\363\243q\022\r\277\202\277\201E\304\3656\"0\016m\035O\013\360\264\247\260\212\rxK\206;\000\275\3144\374\024c\347\206\277\222\307Ot\021\021NT\024F\361%\005\246\206\255~#\271\232z\373\320\215H\310\314.\014>,\344\"\261w\036j\237\215\207\2404\307\023\346\333\360M\245\332\025vI\005s\337r\215\352\266Y\237:d\334BZ\360\222\246\215\367\314\233\255\242\006\210%\303\353`\275\022%B\037D\217\200\352\335\231|}v1A\345R\364\006\364\346I\260*\035ds\n/\345o\377\304\331A\214\370\315\243\017\322<L\226\005\0133\325\313\314,\007\236#\211\255\352`-\241A:d>\343kc\320 \245\025=\030\371\256\235\033\353+\271\001\232F\"\277_\222\007\222\034\217\267\350\206H\324\321\301\335KK~\357\337\023\364\362\210\265\317.\202X\221`""\314\347n\021\212|\326J\277p\001\2219\214\272G$i\246\223\240\331$\310\323\007^\n\337J\265\030\032\203)\232\n\312\340{Y\305\267\177ge\262kt\202*\251UX\232^\202\223;\316\342\003l\305R\014\r'\026\347\3729!\306\003*R\346\242\234\352x5\010F\365 \3350m2*`\210(\210\"\271B\177\326\2056\264\212\007B)07D.\"\2075\224\330t!\215\007x\210P\013P:\376\300$Ar{a\367\032\223C+<\313J\036^`\353A\002^6[\303\220\211\307\300\267E\230/x\253\000j\270q\236QV6\272&\030\255\202HU.T\314\377z\020K\3033\035\370\357\315\235S\322\271XyQ\342\312\355\304\342N&\242\223\221\366\2538\352\315|\277O\237\266\202\234\216\254\353\005\262\2054\347\30410t\024\336O\022>\257w\020\020]\210\305G2\326\301#dp\314r\204\317\235k\247Ti9\321Q\225?\016\037\345\364OZ\230\327b<#\227\230b\025-F\317\021\024\350\271D\241\016\3405lV?\205L\005\373J\016\347\304\nAn\\J\316\005\272\205ksbPl\355\003fq\362\310>\353\310u\031\205\224\206j\205\237fsE\316G\016\314\026\322\375]\205\203\033\375RVY\237A\224DR\316\200\306c}!a\032S\323\344\026],A\352I\005\"\316\t\227\371\254\320\361\214\274\355\253,\251\301S\335z\243\243\341@\254\"\311\236\323'\357\206J\372TS\257!\250z%\315\360\312+\335\234\314\376\200E;eK\326\026\271\r\322\305s4\032\240^\023\241\373\336\272\232\326\233\312\013UB\254\243\264\372!\032\306\177\275j\000\302\363\375\303N\014\226\030&M\202W\021\262\036\323\030\007CM]\364;\032\303d\226\367\334\335W\340Q\317\236\005^m\037e\034\214\273\203\271D\365\351\233<H\220t\252\264\022\203\245\2313\326zT\333z|\025V\200\211\314\023FSSA\364\364\034\311\021\232\273\201\014\321\202\021\355\006z\316mDl{\364\265\206\360&J\362\226\001\026\200\023\010\014\034\3260'R;]}\016\361\246\207\214\351\202L\240x\201\351\333GBmN\177Z\377X5\013\327\254\245\335\301n\224\231(\033\256SJ\336\301\222\206\261>7!5\325\255\371\003`]\r\201Yg\207D\027\335\221b\346\013*j\360\216\033{\235L-\366+\023\235\374\203=\026A7e+rP\336\250\341\227\306mMw\337\013\363\326\361\024n\365\250\272\004(:d\341\230\243\026]\313B\343<$\020\177&\330\004\027\3220\345\351\200 \316\340\231\004\001{A""\312n\271\345\305\204\016\372\311\324\001|\026bT\222[\266p\020\004Kn\003b\377\006\371\032\001'\365\274\007_#\362K\032\227-\374 \301\276\214\3538\240\0026c \216\217\341\361U\335\256\022\251\303&^@\275\203\032\210\272\265\0061\005.-\3467P\305\355\257\276\212\000y\342*\202\337\025y\336\367}h\307\372\016)\207\353\021t\022\307$\033Vn\355\342\330j)\035\325\000\312\300\022\200\313\200\313\202\364\005W`A\207]H/\004\307\310\305b\n\207\201\024\347Bf\226v\301\270\260\213\324\312Y*H\034\250\354\332'Hf\355|K\375W\312/\272\250\033wTd\314\356\205S$6N\360\346r\233\367\005\277O\232S\014/K\034UI\234\334\267\200\303\373\033\211di\221T\272'\320\315:\007\265\345(\003\256!\257\320EiM\223I\246\211@\373\177\3003\010\351\352j\272R\236\020xRlW\344&\r\244y\322\252\357\230\276\n\305J\311\326\213\310\326\354P\271\207N\360\307\325t\271AA\344\262 \343\357i-\204\241\026\235\376~I'\003*\020\340\237SI\"\020\314\220\271)A\237c\346\331\024\345\361:\3363\r)\301\372\2715\3460o\021@\233\0077\317\327\331\351Q\354\007fB0\264\305\314\333\274:lIlZ\241S\315\205\370\203xa2\020\014\374\301\tb\336?&\023X@\314<\216\373\314l\302a\323\t\211\356\314;#\363\351\376bWd\213Q\210\262\320\227>l.T\311<\375\340D\343\211.\033\253\303\350\273@\027\234\377\3233MI\210\302!\221\211hq\206b7V\245\233\361\243\277~p\333x#\324&^\265N\366\346\354n\032\210\247\020UO\t\205\373S\336+\202{\343\031X\002\204l\031\030\024\261\376\346\267\034\352\030;\214\305\341XSZ5`\3654\276\021^\305\343\365\265\211':\214\002ZQ\307l\272z\002\217+2\006\035\231\001\232\306(,<\340\22270\314\307\354\230\035\327\302\354\230\035\263cv\314\216\3311\313S\216af\246\273kf\266{\276\231\231\332\232\231\251\355\255\331\335\355\371v\247\273\353\353\336\356hva\021\032\257:\007\255\002\256\002\271\002oL\327\263\223L\347\306\334\204;\344\370\270\017\3258\260\035\363\346(7\254\247\253;\004\227\365Z\255i\037Ux\274\ro\377\027T\243Ac\027\024x\247\376i\334T\264~!\035\346\305'\254\270\314\300\3431&\210||`\245E\372\007\376\313\365\276\304@\005\303_\310a,[\024\272.\240\375\276\326""\376\3052]\376\325\372Gcq\331\032\253@\"6\240y\177\351)\270\324g\327V\247\320\315\302\317\300\035b\177e\365{\344mz\321\271!\360\205\005\032tl.\"P@\305\211\001\305,\211\315\006\373\376\263\246\340\327\257\036\336=]\001\347W@\013\207\220\331>X\010yx\317U\361\333m\236ua\376\222\277\200\250%\306\347\334\r=\276\010\307\363N`\022\262\327\204z\202\230\230\247\370M\007\354\026O\007A\000 \246\227\267\262\302\256E\004k\337\006\274`b\261\313V\025\277@\306\031-\343,\216\006\204b\353\213\255\202Y6\223\205\224\302\265\200VU\347\022\370\220>\343\240\346\006\0330|Z\020M\352\323\\%\200qE\216~(^v\333\256\341\360\347Z^\313\2234\256\302g[o\213C\367DO\037\244p\277W\277z\027\n\220O\335\031tc\303w8\001\320\250\371\006~\2003\353l\211\232\325\372\204\330R\007\330\302\347\025k4\326\024\373\322\255\251\366KJB$8IN\206i\226\301\370\031\326\313\271\314m\304ANw\242\236R\316\247\2379'\300a`\027''\265~\021y\346!y\317\275ri\253o\303\370y\2617\352\333|\317\350\016\376\301\262X\003\262\352B A\000\337\206\342e\037\326\005ra\200\007\205}\205\361\036G\214\255\245j 3\206\036\311\020;[\323\264\255\025\236\230\347\223\331\237\001\357\321\r\264i\225\251\237]\352\330E\250&\327&\212\271\273\027\367\014=#o\342Y\002\232\225\347\001\007\210>H\210\361.\021\333X\000\200\0304\223\361\305\376\206SO\352\030\221\272=\001R\366\202n6\336X\344\225u\364\000\026\366\241\033\207\360\214\3259G\034{\337\024/\356\007\217\233Z$\366\243BX\317\355v-\035+\217A\251c1\026jd\021tb\362cv\017!\017\337)\265\022\341\373\276N\220\007\376\222\037\252`\220\364\206\300h\326%9S\356\027\024\262\321\342?\2744'\264\370\276\2707\365x\t\343.\032\265\024\\\312E\324#\314\217\260+\037Z\366\357\306\260\261\265\257\241\004\0076\360E\375\330\360U*y%LI\207\246\341\203\217/\376P\237\366C\313\326\211\316}l4\032\257\200J\320%Q\300;5,pU4\220A\005\365>q\211\273>\n\247X\n`,+\177\205\202\206\353RrT\324\244]\000q\323\006\235n\323u\371\210\266\005\224o\231\220+\276p\357f\300\340m+rY\321E\r\021\212\252\323:\251\230\037\250x\025\277\224\230\216\000\371\212:-\306}""\340\302;\267\301\305\367\231f*\204\255\223b\336\204\205\020v\252\007\242_\301K\356\232i-K\300A\245r>\020\275\356\014yj7\\\221\373\245\0008\324\022\030RX\314\326\024\035;\307\277\342\323\215%\205\231}hw\255_Bj\030\002\034\\}\230\214\313\300\262\302\375\354\375\236\251g!\346\010\356V\317\231^t\177.G\352QN\376\311\362_wz\177\3301\250\371E\036\245\261\204\362\027\245\004\245\240|\024\220\0172\274Vk\242\257\026\3124\216\306\307\267\213\313I\333\3173\303\225g\353\010x@\360r_-V\021\232\021\366\265\350\254m\321:%F\245`=%\006O\224\003\361\224{\342\301e\361o!\353\003\n\371\206\000\371=\275\202\001\305\363/\205\030n\373\350g\034\032\363\251>|\307\3649\013J\010_}=*5\224[7!\244\227t\224\370\336\365\"!?\267\353\344\245\037\376\200\314\332\274\271\010t\n\355(3\035\277\211\205/\337:I\004\233\366\223\275\355f\371\307$\203\030x<Z7\231Md^\020Q\002b?^K\266>\322\210\265\306\351m\021\3535\277\016us\252vQ\004\311b\374\004\221o\375\235\251#{\277!v2\335\272\223\315\304#us\007Y(\303\345\256\236\232\377\244\267\312u1\203\001\0238#\037\303I8\360\0016^a\007\374\355\242\034/8\353\222\243T\336\242\0071\267nd\360\345\370r?\314x\356\206\004\272\366k\270\374!\277\262>Q\256+f\237H|G\260\306 \336\356\357d90\030\037\232C\327\235\312\366\233\266\177\323\245\007#\210\200\240\202\216s\373\022,E=\202\207\3738\014\210\037\257\010\006`\247\353\301\347\222\363f\377\002G\270\253=\350\255\305Gju\322\355\221W<U?I\271A\005[,\034m\326gp\027\307\333\202B\003?P\244\341\3009\334\207\254SN#\322\244\344/\377R\344\213\2749\307k\343\2027t#\307\216\364\034V\324\310\252\231\027\0308V\366\2657\257^B\376\024E\275y\237\244Z\331'\275b\210+J!\210&S\363\325\n)w\252l\257\325\025\224\333\\\361\371\025/\341\307\2259//\256\323\351\236\234\270$$\356r\351zx\270\030\030#,vD\245\276\274\214\234\316\021\010\310\210\203c\244T\216\216\307\230\030\221T*z>E,,\242\222\022\321\306\206\010\003C$:\206z\264_+\375R\227\357\302\374\314\232\364\356!\374kIY\312\310(\225\216$\034\034\022\026K\232NI\317'IC\203\224$%\337\235\235\367\346\346\255\251ycb^""(\364\245\351\027\004\344\345\340x\217\307\367\265p\265Z\327ju[Z\334\224\024\027\004\304\345p9F>>#\035\235\021\r\315\010\006f\344\3411\322\320\030\025GE\021\017\217\210\206F\004\003#j6EK\321Rd\001\000\020\344\243\363u\246\177\372\374O\222OR\374L\246}C\230\2311\315\213\037 EN\253\300FF\326\327\2002\276\202\202V\222\316\301\013\234NY%\301_T\276\224\355\242\353\257\370\315]\002\033\324-V\351\363\024R\n\361\017\206#\356\000\263\365*E\026Z\251\235K\\\177\2040\326< \177\271K\365\024\223v\353\023v\3775-\320@$\371\005\370\326Z\326u\334\271N\311\037i\332\001Y\311\\E\036A\000\374\314\300\3434\207\344Y\326'\321\370\027\255\274\032E\203:\222\241\035l\362e\3131\242\376\307\001\360g\201\236\002\271U\335\014?\302\347}\267\225E\td\344 x|3\347\356lY\0017G\257\241\002\272&\3645Z`@\270o\\\355\022\r\204\212y\004\250\223\256&C\373r\210?\350\346\016b@\002\200D\355\352^\307\220\255\215x\312)|\205\216\210\250+@\224\021t\361/\026\376IN`\370\014\356\277\006oa\316'\002\333i\256.\325\372\306\346t\275\364\244\240\250J\335Ev\227\274a\306zW(\343\210\327\355K\2632\317`I\017\304\356l\256\235\217\344J(_\312\340l\211M\234\t\371\306\250\345\325n\266J\361\0018\203\212\364\324\272\211\026\226\317\202\361\177\372\307\301O\036\353\010:\027\201\000\016\244x(\025O\206\213?JWZ\021\227\007\244\010\034\032\321\300\332\253\301Z\000m%\236sv\212\266\307\344ZV\036\304\257Fzdr\255\375\332\013%\213}\324+\233\352\337\020\215\206\033P\273\336\204\201\3304l\300E>y\177\352S\334\315\233\361\004\022\3564\250\307\300\277\\3\031\317Z\3614\031w\313\341v:\336\325\212\353V\311lv\252D\322\270\010\364\254\325O\235g\017g\342\007\242P\353{\265\013~\256$\007\326\376\214$\n\375\320\226\337\202\374H\337\367\231D\031N\372\323\025\237\001\302\275\245d\227O\325\253\315\365\006\312R\245N\243\320g\010U\371\22215:\235!\312\014\343\274\300\307`|\353\316!\364\202X\253_\212p\370\207\014\241}\202e\313\t\035\242l(\033\242fa\241\354F\017\364\364k\300\346=l\241\014zb\214u\233%\364Y\276\227\275f\021\377\222hI\234\221\265\300\346\276\351e,>U\336""\223\327\"\215\320`e2\377\234\376\305\n\215RC\230\372A\207?C \234r^qc\320\305 \365A\253\027\027\276m\366\243\263A\360\333n\271\350f*\021\021e`M1\325N\357\036-\332~@\251\242\270\326\225\n\332BZ\327\276/\"\265\362G\335\r\267o\320\366\205\020\315\370\366\211j\226\2566\023\232\n\253?c\255\005\204F\374\210\200\374X\263\321\272Q\307f\334\264>w\213\254\247)M\277\351\326\374\366:\201|W\021>+\351\350E\230\275]\003X\324i\204\306\226\313\307\020\270=\313+#v?3\230\233\004Z\000?\343\317D\2564n\304#l\341\251\247B\n\364b*\2025;MN\201\373%\034\007*Q\001\273\244\271h E\271Q\303r\032=\251\373}\032\031\0345G\355l\332\213?\205T|\031\036\323\332V\213\373\301\236\302\004j\3009\032\367\261\343S\377\253\320\177\372\373sQ\361\223&\314S\313Hr\n<\r\313\340\356\223\257\204\250\336DMh\307\315\034o\342\034xXb\303*T<\334\245s\265xXl\022\213\256\276\253v\300\312\346\006\007\005\321\234\024\024\231 \261\263-\330\331s\250FV\267\200\360\273>r\341\217V8\022\233s\250F\260\t#\220\201\215\030\002\034\325\247N\000.\374~D\202\013\216\213a\337\204\t\303W\224\324S\037p0\004>\276cH\254!\235k\316\261o\273y7\272\001B!d\264\346\317\274_m\350\206&@\220\275\001~Q\366\020\347P\031\006\205\025\357\036\256[$Yo\306S\003\271\020\226)\227?{\\\010\362\013&\366%\3326\201\251\310\311\370\337\352'\357\323\246\250 Ve*P H\306\004\374\336\001\213\034d\337\3753j>\312\333\001 \201\027\006^\271\177\307\027\340\000\360a-\036\205M\027\332\302!x+\327-\022\211\206\000d@\300\261\304\303S\262ZK55%\031\231\222TZji)1\231%\020\220RGG\261H\272\271!]\257$*\225$#C\202BI--\244\224\024\222\211\t\211\311$ut\274<</\016\316\233\315\276T\352\013\003\363\272\270\274,,oJ\312\333l\272X\254K\245\27244n\221H\250\344\222\226b\217\006\000\002\022\2430\010@@$\024\213H\005\023\202\251|\000\244\205\022\214\227\004\202y\220\342\031E\024!`\000\300\200\000\300\000\002\000H\000\000\257\277.\371=\240\037\275\230\212I\200\207L\026\271\"fK\035O#\343\217\000\215\326X\3214\257V\3236,\241\037\353\320M\r+\224\335\320\212(\372=\252k*N\335m\307<\262\003\033\224.\255""\350\374\234@?\177X_\216)\027k0%kxy\007\177\271I\332>L\365X\376\2540\354O%\265\314 \257\245\305\342K\216&/\367H\035wJ0\022\272\320w\006\376\224Vq\017\025\022\301\225K`~\332\251jb,\033b>z\233\212\026\233\357\023\276\240\255\032|5\021\360\201r\270\373\267q(o]\370\213|\r]\277!o/\232\021\274,\276\242\026R\300\007\352\231l!MT\233\3328\177\201\2176Db\334\265\3259\022\352\016\rd}\333p\201\230\214\261\027Hr\024\215\215O\004BV\023\010\353\306\334]\364\245\364\026\025D\340dFz\241\004I\004Rt\302{\207|\006S\246\203P\255\276\340\016\361\337\341\301L9\250\360\202\201\220\300W\307a(\270lE\303,\361t\"\320\2154zz\335\323xUyWE\033\311,\321\260\304cr\234\202,\365r\206nj\202\307\377\014\000-K\320\266L\356\243\033x7\202\361v\351Uh&\006\227\007\\(\227h\n\004\274\231\375\377S:^\214\306\207}f\000;\250T\202\341VI\240\334*\0009!\311\377a\203\343\032?\004I\267\233,j\021\323<\234\036\004C\265\247N\272\373\237\"\242\035\301\243\311\031J\310\004\230w\000\030.\322=\027\354\245\267e\0334/\332\357\263\2050F\210$\366\322\021G\025~\016ST\265Z\246\252\313[P\005Z\r\210\035d\036\217\315|\326\030\251\207\376:D9\r\200\326w\037\262\n\267{O\t\270\372%wq\214\301\336\256\262\r\362yF\355\005lJ\027o\030t9\226S\360\244\217\372%\275q\253\376W\336s\350bSA\307\270k\374G\"\304\373[\327\230\017\0051%p\",\304M7\345pb\266\203\266\203$DL\031BCeC\307\317\305\254$%\223\300\247\323\225g\003\355@\262\004\274\272\2474|hV+\016\220\245C\264[\201\264j}\234NX\367\343mu5\217\370\205\240c\247nh(%\262\214G4\020 3#\313y\nE\036^\030D \026T\2753@[g\352\203\031\347\032\236\200\310s(\354\256\310\033\204\320\031\222\270\321\234\"4*#\302\243\220\004\372\321\312\237+\351y+X\273\027\223\n\267\214\177\213\200\236\tR4\262'}\350\207\321\317\266Iwq\013\304@!\2433\030\037\273=\003T\000\224\244\237%\204\261\257\327\251\254\361\355jH\225\346S\371\207V\0338\352\343^\355\236Ir\247h\002\274\2640T~\3462E\216\"s\332B\254m\254\"\236\325\321px\264\254y\"U,k\276\216K\224\023~\264\204\252\266i\334@\274\323\252\371\202P\211\245!\263\246\274>%\004\370\370""\257\205!\rc\233\022\036\t{\370\365\226\274\331\351\001\236\003\247W\366}\322\345\365\313\036\000\006k K\024\032;\3167\243g\231!\204R\347@\341V\244\351$\\\264\253QG~f0\262>\243\031pG\220\027\024\255\257_nG\325U\024\226S\326JQ\230\251\37581\254\250\017\240\216\341\001\225g]B\201\310X&\3012_f\004\370\024\322\231i\026B\275\210\025\r\n\331D\247\310\316T`\336\347.D\246\321\"\375@A\227E?\235o\241\231Ss\336\321\342\246\241\245\377\267\235mo\340\261\033x\344\272O1\n8\346\337\302\320}\277\267k\203b\371\256:\226ae\340\315\\!&X\221\017;8\003\256:\306\355\266e\215>\324\233w\177o<\260\230\215\027tw3\233\344\234\243\251?\017\313\235Mc\340@(\340\301\t\364\211\365\253\013\337\213W~\354\276\t1\215\013\207\250\n\241KX\033\310\326\201I\240h\000\343\306\226\305\231(\3038\3459\207\365q\335}R{_\r\345q\026\240V<B\250\307PDy\013\231Vm~\372/\377\301\360\014\014\257\330\232\362O<\201\376Mko}\244Y\201\270\316a9\303|\010\236;<\273\304)\210N\0348:>\257b\206n\200\3169\223\356\275\312z\265\013 \323E\005\245\3613\357P\025\0027p\246\370\265\365\307\375k\362\014\345\363q\231\310\273'\250\265FR\262hG\236\0044Q\021\310<\t95\267M\310Add\224\224\002z\261\204M^L\021\202\225\241Z!\253\222\347\312\272\300`\206\203B\340\350\363\331\374\365\033\326\324\324\217\212\345\035\312\307;3\224\304\t8\207nUX\376\377\013\3262K}\376\024\300\207\025\025\310M=\262\314F\327\335aO\034\241\227v\242A\301/\266\306\273\231\225>\353(ujs\211T\014% j\243\276{\036\241\202\034\327\340\360;\n\203\231\031^\306\275\222\303\013e\030D\331\217\020\341\274\272\215VS\370\217\314\330\256$\276'A\351\245\341`8\373r\235(\360\340e\022\203w\037\234\251]\034\317J+\032\177\001\2634W1\324~:\252U\264B\341\303\312\235wx\253\315\331az3\3524\236\\t\371^\r\202\245\n\331#\013Nh\236e\335k[P\251\207|\247b\016\013H\217\\5\331\246\202v\302\324\017i\255\213\340|\246\3408U#\340\216\202\344@\316\037jN\017\333y\374s\215\003\\FB\314\2456\271+{\013\002\211%\263\336\020\247C\303y\346\315\300\\\303(\022\361\225\3405\302\270\315\261\2409{\002\002,\010\034\356\0039""\006\264$\334\242n\\\211\224\273\017e\274\200$\207\356\025\315mok\005y\265\034\200\270\235\317\037\023&l7\013|\320\276F\023\230)@\3408\204\236\302\243\205\371\037\2218\260\222\245u@j\2043\274\306\023]\370\315\224\317\264\031\001\361\261\214\355\364>\201\331\342\231\006J\242\022{y\223\001\224KjS\351F\365\365\320\226\357F\367\364\364\016},V\2029\235\220\177\342\271]\347\360t\225\327\267\315\244\001a=\215bs\nGg\265k\374\022\033\321\257a\375\177=.\007\244\302\242l\014i1\327C\250\250~\t\223_\343#!\246l\020\312\211\377\344\232\n\273\240\353K\266;\305\245\001:\253\222P\005S4v\234\243\233E;v\nc\n\350\313\325\246\241}\037\264\201\350\335\r<(\224\340\212\t\265l\351\001QV\354\243|O\301ay\277\240G7\372\021\363\360iFD\225\2138\323\271\004\241q~N\263\026Y\350+X\n\326GH_.\330/f\260\332\276\\\273m\216~\255\323\253\232\321\360\335GD\3460\323D\224\301\360F\031\364\005F\255?\242\377\203\014\036\005\027\341\331\301\320b#\202BL\210\032\200\343l=|0\237\262TF\345(\366\222\004\342K\366S\263\021\024\342m\023\250g]\266\3072m\027\007'}\030_\250\3453a\327h\377T\026(lp\024\353\226\222O\226\342\204oh\2768\351B\006LH\210\363\262y\003A!\217\201\371\243\304\360\351\032#p\232\311,D\261\261\243v\337\267\377*\0369G.~e\224\312n\006\361D\266\021\321\211\367k\323h\201T\r\346\3401[\222\210\3128\205\251<\342\346i\007t>q\0138sk\277\3037\260D\352\225\204\367ZW\247\036\247\331\202\210r\265\366\364$\030C\0033$Q\237q(9\374\252\333\023\006<\365\211\261\210\007\374\345j\034\245\272+\202\326\2363\335L\002\236\220\225\314d\344\355\250\344\3032359\314\360M9\272\030\373}\025j/}\264\366\241\373_\310\304\224I\317\017noo\373\340hu\222\367\027\357\262\353\017ek\367\232\377\344A \242\227\200\036\316\207S\010\316\210U\332\240'\361\365\2428\323F\374\211\266\262Uw\320r\002\232Y\266\013N\300\006\032\004\343I\014\320\255s:@\327\274\206H+\016d\231U:\314\351q\364\206x<\007D\001\313t\220\210f\177(\351\315\000\324\010\234\354q\313d_\302Ot\251;\202\006\024+\226d\375{\201\234\026\366\324,$\267\255\362f\006\201\017G\237'9\317\303""\003\323?\371\"\001\273\374\033b\236\337E\225\324\271\346\365\235>\210\261\0169\252.\351\341\313\241a\320\3105O\344t\373H\2668P\017-\342\236\364\260\352\034\223Ns\302H\225\tO\t\316\210\201\276\303\334\210\376\006\271J\337z\203\354\325s\206\376k#\030\025\357[\271\021\017\276s\3305J\3248U\270\003Y\004\260K\375\332;\006\377i,\255\2474u\300\0019D\375O\263W\220\3159\375\2476\231C\360\330\204\323\006D,\310!\350\346\254\215\376\236\001k\304Jm\005\350\222\344\300\204\362\244\327\202\227\001\272\220\233\337R I\360`\325tf\300\306<.9\232\242\257\237$\327&4\317i\366H\025\264\260\271\352l}\204\362\231(\236n#\363\372j\346E\277\247\017Ay\310=\3478_\367\326\030\320\351I\347\263*|\251\272\267\222\246\312)\232\201\352\016h\177\212R\346<\375\367\201\363c!\225\007\005\242\315#z\350\247\006\3318\344\336\210#\233=\375Ek\266Z\336\rvK\036Il\006i\353\307Z\\\226\206r;\306\034\023\212\250\006\342\370hf\276\2673\213F\232O\027Wse`\363t^\n(\213v\343\th\321)AKY\020\030hb\023X\227\215\276b\306\374\375&\235\244w\270q\254w\356\367\324)[Z\260H\034@\337\221 \232\345&#\004_\005\312!v\300\023(e[S\274?_\021\255\003J\3265\244\337\3027Y\250\026\231\3225C\345\036\340\333\257\006C\317\351\240E{\010\250Q \010\016\263e\371\302\245\360\362\370\3649\200\240\377\234s\"\356\252\n\013O\331\230[|w\243{\337NY\031\313\211K\236\365\016\200\022\204\201O\036\001\320\377\251\017\341\024\366\234+R4\215\264\244\361~J\315\225\3561\361\337\275`3\213DY`g\211x\361\377\013\204\001r\271\314\0203\034|\206eUr(\035!\273\013\346v\373\212\336\010\263\013\006b\230s\\Ts\212\321v\037\247\311I\374\226\322\214 \214\3421\301\353^\220\271\2449\247\315\204\370\325\267\014\357\355\275\315FdUv\203\252bP\310cN,\355\272\302\320\006\362\360\220@\275\230]3\216X~`\351\216\347\310\334\364\350\211\252.\004\347\234\2461\243\317\3437\315Zk{\017\222\307\226\270M\221\350~\313\242\314Px\245\302K\333:\324\242L\313Z\254\277\272\027=\210\371\255\347>\211D\n\023\213\331\206\314x\217\266\243\213K\023\301\201\260\"|\210\000\002\000\242\325\244\222\304\034\325I""\206\034\222\322\036U\337\303\n\\\316\355\302\207\213\342\366I.\202\311\226Z\372B\231\\\313\240bM\350\200,\2327\\\010|\346\005\0172N\026'y\323|\345dxV\2710\324+x\010\270\322b\333D$\323~\361\261\210\251Fm \236\251\035T\335/\310\233\370\246+\233+\3702y\027\257\324\003\254\346c\340\037\260T\366\3544\276\375\205\235\304qV\367U\320\0228\230\247\277\007\303,\231\211\346\260\273\306e\222\007W\361\231\360JU\305\r\273\231\367\226#\200\316X\317L\232\326]\320\267\217\037m\013;\211\275\341+\341J\211Q\343\033\367\244\207X\235g\340\226\235\021\306'o@\220\"_\026\031E>9=x\r/\001WR\254\315p\270'=`m^\315\242\307\332\336\201\256E~\355v\200\254b\242\321\206G\tJ\223`\363w\307tPZ\221;\370\332,\241\232&\266\311\r\2513\026?\305\213\017\206\360p\366\346\326v?\277X\355\332\266EX\301\022^\371$\313\334\3558\347\352\323=\372.mb\001\365\023\242\372\307\241Jy\317s2n\034\352\300>.\036\337t\"\2133\023H\332\022K)\217\305u\036\000\362T\231\366}H\372\346|Zy\350g\264u\360\207\222\016\277\320\253\037\302K\364\000\177\333\026\263M\256(f1%\t\343\007@\233\273\332\365\320\216\217Y>\205i\215\266kAL\001kc\324\254\271U\2278p6\301\210m\213\013jYv\2359\r\354@\275\214\202\250f\023\276\375+\257t\027\227\266\023Z\373p\327\031 \323\330_\365\205\020\376\201\374\250\362>\334nr\332e1hyj\231f\247c\036\320\2344i\2154^h\227\215\177\312f\366\272\276\311\226\322`\327^\251\333n<\316+h\351\372m\003H,<m\220\311\265\2426\312i\031\203\272Z\034\363,\363\034\000J5\236v\366\266Q\233\374\234\315IDLI\306\373\355\341\226\230\273d\311\221\304+\234\014\252\264Xx\241\367\300\375\355\244\016Kn\251pROG\205\233\370\032\207\353\367\000\231\"\013S\301\302\364\"\323\033\236\303\017y\\\233$\361V^UXM\262\202\346\275\317\256R\004\361cL\202\373\204\032\354\243\007\247\250fd\005A:\350\313\354sN\310\336\356\232[\267LO\001%\023\346\267]%\361\026hl\366\260\374\271\240\241\270!\376\305\310\206\034\024>\021\035M\246\276+\001\344\021\351)\303\360[=PI\226\222\004\214g\230\034\222\276\276Ra=\\\014?\246jF\2330\256\254A\274\013rI\333N@<\322\217\250+\01418""\301m\026~V~\016\274\355J\013\325C\346N?\326\245,+\336\3545G\004\370?\210\220m\346\327\313k\036J\247\254\2052s=[\301m~\007\020uy\263\356-\026#\222\363\307\003\203\272\007\252\000\201=5\345\367\333\002L\324k\277\336\n\203\213]>\347#\347\201\203K\210W\3041\214E}\326\340<\204!\364\353\274\204\337w\302\227\036;\247\373\253\037\264N\225%\353\337\243\025L\212\230\3471\243\326\251\001\226D\223c\362\302P\022\350\272\242\177M3\361)\240\207\332\305i\236\304\274\023gf<G`\236}\217\272DY~\327\326\251\311*\244\342P\253\030\2768B\337L\243\213)\370\242\216;\314\340\271N\335YC\235@\013j\2310\010\235\326\354\2565H\211\270\267\"\344\275\372;\265\202\210\026\027\335\266o\247Vh\023i\230\334\246E\246_[*\014\2106\363C\2339\301\025IpR\020\3501i8-\034[^\305\277\2227\035\324A4\202\236\353 \003\312W \036k\324\232\325\256\034\024zz\366!=\217\302\006\252u\220@\256\253\306\203\274/\205\277\035\347\244\0377R\350\r~\016\306)\3434\035\334&\250U&\265\030\317\014(\034F\375K\241\342\036m\265\303\216\273F<\037D\240\332\202\207Z\200\252\036\214\322\350\236 =;89Pe0\211\353\344&\265\242e\264\324\301\3474H\342\372]88\211\350\022u\0140\347\370\014  \370\235\322:\305\206\354Y\215\302*\330\333\250A\305\271jP\326\342V\224\346\221\330\032\220c\331{\256\202\250\227\247\212\263\230\376M\256.&\317\215Z<\354\255C&mD\257Oo\n\013&t\204j\313n\235t\326,\254T\272\\\212\221\004\010/\376N\n\344\010=\202\372\035)\324\200\342\255\256n\336;R|\360sz\027c\016p\314\257\036\207\357Q\t\361l\010\241\264\322\332\370\362\361\262\274\202}\3478>yn:\353Mb\353J\301{S\256A\361\026\262t8M\177F\264\224\216\240|\363Y\216\222\232\316\305\313\233j\342#\311\270r[\031\231g\2612(\233\244\233\217\307\002\000=B\243\277\212\272\321w7\330\232A\363F\342\302\3444\231\356F\216\244\345C\037%,\241\332\377\363pa\237\237\372\207q]\326\301\314\216\250d\335\334u\n\327\302\352_\274d\350\022\340\343w\036\373\342\276\301p\317\2754T\0303\264\227.]\277\t\302\250r:'\203\372o\355\241}\366?\240Q\227f4@\211\334\221|Yf\336\2575\237\304\"\337O\2617\234\3418\350\343~""\373I\233O:\375\221I\232\t\254\335$SG\265\327\032\256\254\001&\027\304\037VH\352\303\367u\211\216W-f\211h\220l\372%[\235]\314\205\305\320J'\333<N\017\342g\353\221d@\366\303\342\272\027\030P\357qy\251hB\300vp\271\026\342\023.\354h\300\322\323N\352=\007\316x{\216\250\276^\252Y^\306\322\317\261\244\216\013\316\245\337\035s\"\371\004\002D\204\314K\017\307\024\330\226\267\254\332$\025\301\223\223\372\267\353\346\020\r\203\361\220\274%3\243^8\004\273m3\344\010}zP\022\335\"\323i\317n>\005t\000\034\002M\211\302\203\260\211\001\321e\222\351\275j\251\247\366\212S\260>\021\274d\351\377\313^$\265\021|'2\270\304\324\273\351_o\277\271\337&]0)\306F\247\362;\316\322\010+%\242\235J\207e\010\310\266Os\337\361\214\n\345a\323o\342\245iKc\251\307\267\026\022\216\263:1\030\261\356\r\312\356\371\360\030g\324Au\370z\302\245\272\36615\317U\204\320\031\3631+L3\303\001\361*<!a\014\374\276\312d\376\035\304Lm\241\357\212\200Gv\271\031\352\004$0\260\377.Y\026\246\022T\255f\255\335\377\341\337\202 \245\215\321\370(}GG\022C\300\262C\243\336L\310\266\231/5\031m\321\375'\304I\306\217\003\353C\036\210c\365n\010G%%Px\324\336n\374\226z\237{\2030s\306[%\224\307\211\373\362-\353\302\363\336}F\352\311H>\310\326\215B\004R$\255\244s\276/5\344J\302\005\322R\n\r\257Xcy\250m\325\352\276\2757\037\007\370\360\274#\364m#\325o#\212=\206\220\320\201rs\200\264D\365\037r\213\241\311dM8c\035#\225\036\332\236\254\013\257\366E\330;\035\256\276\272x\351\232\031k\250\302\030\005\352\266EPw\316$\345\253\306W#\337\003*\231_\031\224\326t\345$N\003_\021a\244IhY\"\242\325O\237KC|\244g\000\314wE\033\322\250+\002YL\342\201\231`\335\333(\314:h\203\355\364\030\000\270\333w\220q\375\327^}@B\230e\202\261\005\340\324(\007\020`\275\032\365\316\004g\253\223\371\257\245^0\315\214\035\227Lt9\357H\254\3448?\363G.\343S\035w@\304\031\335=P\267t2A\3131\033L@\000\001\253\301\\\001\313\340\014\371%\217\331\"\nT-U\251\027\002x.o\031\034A\360\023\251\324\334\262\211f\037\316\204#XZ\331\021\201\024\344\352\003\377JC?\023\234\370\366\262V\225\304C""\037t5~<\336\3024\263'?\3518\337t\332\230\214\367\333\331\242\2777\232\324\314\n\346\310g\036H\307\213|\360\306\256\356*=\017\037\304\365\344\006j\255\232\212%C\321I\363\rqa\336\277\263\343\204{\223\333\265\351@Z\227\256\244r\363H\302\3730\tC\256\325`_\006\263\027dI\035\013\002\276\024\273czPEN\211\230\204$7\223o\005\035k\375\032\277\351\0371C\361\327\351#cf\311(\306\331\265+'\242@\013\027\321\\jAAbX\331\337\262\371\233\261\242\004\231Z\347e\233\014\312\010\337\305x\316\203;\256M\263\025\025\243\273#\236\210\275\342x\335\031C\246\233(l\033y\270\360\326\276[\035\254\344\n]\271\344\304+\230b\327K\203R\243\370\326R\026\244\224I\274\317\373\230`\306\313\027\232\213Z{]\240\205\267\264\310\244R<\237hR\341\247\331\222&\372\323!\223\032E\301\006]Q/\326\261E\345\220\235\023R\223%\274[\365Yv\267\004\313\375h\343\336\252\006\233:t+:\321l\304*\010\211\243\020\255\356\025{\034\230g\301\343:\2110\t@4\3204\312\261i\246\366\216\244u\317A\226\356;1M\310\027[\033\001\025\002\376\357\340\315Q;\242\210S\002z\302VUQn\315?\216\252\356\317\236\366A\036\025\001\300\252\017\345\014\362*<\247\201t\2250\003\362:y*\342\232\374\336%dn\010\307\202Ri7=\342\345\331\226\017\267\265{nUu\273\314='\027\0347\352\227\213\216]_\317\263{b\022\035\321\006I\361\034\000\2415\247\006\265\247\360'E\250\264\344\023\276\037S\302<\326>\321Y8\n\212\373\344\234PN\234x(\253+\326\307\036\013Od\264?du\230\210\263\317\236\270\267\211\241\372<A\376\326[.\203\326V\206\n\214\260B<-8\333\321\005\342\320\014B\235N')l\215.\311\005A\264\034\356\371\215\3776+b\254\030F\371\"\332\271\2370\366\267\277 \272,\2074\323'\257\353'\320\234 }\210\241V\343\226\271\213\035\227\014\247}jFk\246+\214\343Y\311\250\366L[\203\350P\344\217\235(\253\202p\217L\245yq<\217\031cZ\3134\022k\032\262\256-l\373\336\3133X\026)\203\003\244S\367\300\231\034\0256\002\312\303\340\004\205\254M\331\361o\275]\223\007\376H@\333+\036\225&\321\205\315\301-'\344\362\000hY\322\220\274E^\3510\252\222\256<|\275\314\033r\252\337>YfS\267\000J\017y\235\036\372\231\222n""\244\034\354A\264\373\302D\313\244,p9W\344\366\365\002\2574\177\302\233\003\010\236\230N\2454N\242\316\336i.6\231\221\300\260\237`b\252\243\227\360\345\241_\014:\374\241\222L@\353\244\377\3759\225\271\355'\321);\257L\371\331no\246<3AS:\324\207\230\016\"\347Z\2034\3217O\230\345b)\323)\224\300\034\237Y;\005\013L\350\001\010v\023\\{\340\275\265\274Y\325\3242\341\233V\372c\362\300\332\210\034\310\246\2079\225\305X\374\032\337\212\327X\034\010c$W\215\177\232C\371|b7p\304\266\007\216\374\270\340\347\330\261*v\031\221\np@#\331Z\371\223\001\004d\025\366\347\364\257L\200\320\335\321T\2554\374\257\004L\372\t\332@\377\\\254\323\213*V\330X\2747<1&\311av\360\022\302\377\316\367\267g\317\273\311\035K\230\224<\332\001\231\277\253kS\235\363\250\250\003\343\215\316\303q\335\342\300\2717\r\363\254\347I\225\231\3028NZlY7d\276\345\002\013\315$z\257$\3603\343c$\321_(\211n\305\007\341hBA\206E^\236\327g\356\316{\351DW$ \215q\360)K\313\355\376x\367\021l\363R;\315\210t\356\200\317\031a\0070\023?\357`hA\007N\342Iu\354\303\211\215\214(\355\226\353\316\004\225;l\214K4\365\253\rz\234\230Z\017U\276\354\230\235\332\000\177qE\n\\\213\340.\031\277\222\314\022\203\217\331\267\364\n\377\014\206\207@\355\273\362\233$\016\244\333\272\353\3712\250$j>l\022\367 [\032\374\346\274\325\013\243\310\236\353\312M\303\201\364\235G8\003\"\366\362\222\251\210Y3\273Cg8\325.z\r\204\305\005hi\366M\327\243#A\347\276\027\330\374\177S\027J#\201p\355No\240\023 \343\336:w\254v\351\3426{W\315\270\371\270\263j\251.V\037-\370\033\240\0338\246\353\261\220r\211R\241\345\363\250\345\007@\025p\005\326\003\325O?\360\350\016\035Q\264\014kC\204#\203\375a\273\220bB\372!`\272\030\220\254\362P\001\313\213\304\270\206\366\n\333{W\002KJ\232\203\321\211u\371\360\260\321\251\336\266@\240\203\375\0056@3\027\303\330o%\273\337\321\212\373\003\261\200\252\347T%3=8P\334\316E(\007\244\373\225\201\034\3036\323j,+Ej7!'\264\272Ue\363\356\356\341\3766b\362\327\021\320hek{\242m;\241f\017\372\204\314\321\005\007?\2443\314\204\374\n)\202sk\033T\270""\337,\233u\205\337\342\236\336\2740\311\034\006\361\373\005\225\013\355[Fh\244\210\240`\202\360\331\370\206{k\355\2432\254\024\256\211a\234#\\d\316\tR\232\216\314\351\220)\306\303]J\212/\244\203\334\366\253\243\3568_W\302\361\374\301;P\033Q\002\251|~\3028\242\001\362\2530wt]<`\032\232s\332\301\347I\340\251\367s`\237'\367\033\330\213\245\227\036\347ZecWF\226\027\363%\362\303\345o{R\\\212\273\200o\301\230&\256jH\367\375F\251:\203\274\303\212\324\216\236v@MK\374\354M\337\215\237\233\021\001Z\215\374\317\321\254\212\346I\216o=\027\224\177\352\222?\266\356\010\002\026\233\214\363q[\0049\270\340:K<\372\220f8U1CgO\2060\231\367\376\017k\267\"\346\373\373\350n\237\251Dq\013\230\270\t\320\202\300\331\237T\025\346\217\374#\364M\340\232\373\370?\200\025\315\317\214{\211\017p0\027j\000\370\224\276\370=\321\330\362\016\273\351J\350\352:\364,4\334\0160OC\0160\254\237\330&S\026\314%Pq\267c\014p\303m>VZ\213`'\322\0201\215\235\327\266O\"\035\224f\275!\346 \212;(\016\246\336\231\203\240\016\233\340\206\216\004\202\035T\264K\353\2520\315\"\240dQ/\200\010\364\031Ce\245mB\254\201\350\027\277\034\226cl\335O\310\002|\004u\330Sxf\223/N\245\356\304X,\326r\374C\233\342\316\333\322\212\244\251\364\252\232L\253\352\210x\277\374\212\270`%T@|\252%'MX\234\226\337\342\177\270P\214z{O\302\271\004\327\3703\254\007,6\342\263\002\030\027\343A\272\330wE\"\002\010\305\231\257\334\373\2458\244Rg\2060\322@\017\332\235\337\027V$&\253\3445-rO\017\236\217\371\347\311{\337\241\264\300n\325S\361\034\350w6\220S\220\340\256\204\251\210u\241\027\217vMs\004(i\234\212\314o\212 \001.\024\t\336!p\276\373h7\233{\034\0279\215wz\264\3719\013\322\274\263Z\217Z\244n\300\3077\244=\020\205\206\367Y\361r\324=\035Q\235\024\241:\027\231pF\257\252\262=\216\2031\320+&\0011\236hC\272\000\014\265\367\027\311iJ7;2\010\023b~Z\333(\257\253\204\353.\003O\3205G\347,\317\344\004\274\261\316\347v\323\343\241\361\301\0007{\017\356\234*\222\332\232\367\030\353\260\tdB\2432\351=\365?$\010\177\357\244|\024\010\364dk\212!/\244\321*@\204\017N""\377\253M\211J4\216\311$\230\321\021J\257l\002\235\0044 \301\226\032 M\rU\022[d\305\307_\307/\202)\341\207\034\377\2627\036\260L$e\235\2333\211\227\217\034\254+\237\335(1\301\217]%Ed\323\307\352\002\262\322\312&q`\327o\3540mv\345\217<\020D\232m\020@/\216c\027#\225\313\244Yb\326\350Y\031\373\002c\262\203\016O*\360v\350ta\213P\230\000\224t\354\251\031\032|G,\331aI|1Bl\255\326\227{\237-{\364\343\355\231\246\212Hj\205R\262t7\016\021)\375&,\274p_|\237-\3636@H\322))\362\327|\330\336\373\023\375j\356\036i\375L\001\227\352<\261\343\237\263`X0\345\256\204@\335mOOW\342E@\311_\262\263\351P\177Ci\254\020:\303Gq\216f\244\212\203\343\351\345\311\313\000\035B\215\317\346\230A\244\324\242\023u.\004>\357\031\213\240[\334\3319U\363\230&\025\"\231\200\\%\247\004\221V\204\330\242B, f\266\235\000M\\n\363\212z)m\253\201u\343\252\2002!\013o\n\227\213\t\t3\314'\363\000!\256@\334\352`\234\001\241\353\334j\037;\245\315\213f\316\220\217Q\347\241\2572\006}\003\243\305'\372\000\303>S\277)\305\355\370\214VL}\304R\236p\224\351\210\360-v\023K`C\032\360Y2\257U&\027\220\226\304Z\204\025\330\246q\310aW4p-\374\262\360\360\305s\034Z}.\255|XJ\236\335\030=\001\330\026\373\205-~{\205w\235\217\217\016G\331]\207\305\234Y\210\231DN)\200\313\024w\244\231\332\306\337\330G_\346T\314\224\004\356Q\273\0062\3026s\010$\211\321}\374\021\266'U\004\247\200\tw\266\014\222I\230l\234\"\371\353\372T\216\034\003\224\032\016T>\346\026]\037\256d\350\235\302\327i+MK\237\204\343v\216\344H\363\177)2\037\007\360\244\360\024\367\257\364\373;\316\275p\263}\\j\022R\347\335]\033\331\300\021;\212\230J}\374\201\231\214\376=[\307\017\245%\234\014C\260\0057\210\222\034\023$\000I\243\000\312\230CF\207\350~aA1\003\221\203L0\237\251\r'(X{\3613\234a\372(C5\032\204{\270<T\350\302\272\214\242{\316\302@\341\205\270\212\227\300\017_O`\205\303\340\203\321\363JS\013Cd\343\263\200~\206\201Z\205B\206\224.w\022w\311\376x\310\016\232\014\353\237\303@o}\213\007\357av\007\245\370v,\224\262\270\033\352\263\264\277+d@\2617\2013\336\200\202\364\314T\241|L""ti\2167*b\203\r\274\321\331\240R\330y\346\215\340\005\262\307\315k\375S2\351'\023\267\254{n\216\213\330N-]\223\202\313\tF\243\354\035\346s\036\230\3004\035\334\023\222\341[\205\330\247\316R\277\350\312r\372\235\3428\332+\250?#\371\246\365\251Rt\315\326\221\276\340\021\314\020=\353;\223\307.\001\344\\5\371\0378\263;\323$\342\256Ol-h\243\311\035w\204\242C\346\357\206[-.\242;\t\261\370o\206\223\033\303!\024\317\366\323\"B\353Mx\232\273*\023\216\324\240\337B\024\231\271\317mn\220:RVD\364\321S\030\354\2339\264\262ih|\213\340\tB6\3611\376\034\372Y?\306\317\027\246\323\005\221\301\3111\313\344\333E\350\371\364\371\353PZ\024\330Xp\320:w\251\336k\021G^\376\266\005t\324~\244m:\006,\361\246\257\300\216,i-Jj)\254\361\037\377\3541P\234\234) \347\245 \376\356\023Xln$\342\233!\3624\361\355\003\021\216H\2733\270\325N\321\234\351F\324\202nC,\240Fw\\\260i`S\375\361b\225 m\032\354\346\304mK\016\264360b\355|\231\3418\376\322/$z\200\233\350r-\305\255_\360[\375\334l\373\375\233\235\237#\322\"\360l\255:\341r\233\236\226\002Wb\202\363\353XC\202\342\200\r\210\367\355~\0140s\007N\\\200\276\235\000\301z\014\017\360\334\006%\342a0B\010\017\037sT\177\207\333\020\255\246\254\262{1\036a\211Vdv\322,\326$\016\276\356ck\362v\257a{^\005\327\357oT\227\342\367\311\264\033\312BB\177\"\331|\001\215\003L\265\244\036d\300\320\272B\236\241,KB0\034\353\225b1g\020A}\034\021w#}\004V\363(\325\252\343\377%\2649\315\000Q\026\350\205\202\252\030~}\210\231\371(^\341\\\360N\324\004\251[\020\240H8`Z\341[\036:1\027\324\261P\265\223D\217Rsg\224s.\342\236\212]\371\\\307|\020\037\340\314\235\360(\264(\274\255\350\202\371*\307\\\356\335]E\305\002\tM\240\237\345\277.L9\357\3424\034\0362T8G\2445\226\223SNI~\350\2551\025\236\260mcD\205\216I\255utO\005S\202\003\001\337\241\303\256%\360\330;D\204\216/ty\254\271\3433\t\322\227\212^\022^a\n\246\325K\237\330\366\346\t\253\024\264R\275\354(\017+\373\034 \005|\3108\334\245\376\346\325$\324\365\262\"\256\367\313\016N_\233\344\351#\313\260B\257<\235\234B\260D\242-\347t\352\300\026""\344\250\370\320\331\235Po\273b\272q\205\235eTc;z\2750\214'\310\330\307I\026\315\327\022R\321s\251\361\254\030R\377.\317\345\353\272\334\333b\236\262\006\337\246\373,c\222~\007s\325\013\311\250\236M\206hm\275\355\0073\357\306\022\006\362=\2762\004\236\324\213|=\177y\274L\200\257q\214M\302\241|\372)\300\251\266\240\223\033\024\254\370\331[\252D-f\002u\261\377\027\374k\204\224'\355J\240\324O\007\n]\273\376\tp\210i\226\204r\226-\217\346\335\237+\324\225|\302\rS\3447\007{\010\334\244\376\320\217\273ug\250G\227\262R\361\321\232}\374r\037!\000\375/.Yg\177H\032\274fG]\007\265\035\317\212\336B\006\236\355Gl\375\030D\210qD)\317,\220\233^\271\231\300\"\201H\263\362\207\260\243\313J\323e\016\016\370\376~G\341\236\317\000c\222xpB\265\225z\254m^\306)g<\340\023\010\247\256\367C\331\220\242\010\030\217\205\005Qa\364\303C\034\324\301\372\202\335\237\216\037\005i\353\204\026\323p:\005W\320\243\001\177\t\322\315\315(\027L\253`\263\237F\211\255\256}L>je\216\307!\203\247\0356y\232\203!\370\354\243bGl\320\231U\345mI\327\020\356\261\240\316\336btTe\375^\272\023\240!\270\261\216\265\333\001+\2226J\236a\241 \033xg\002\211&\036mv4\222e\244\256\215N:\340|Pl\340\256W\253&!\227\023\275\242\ti8\310.\246\364\356cv\275\342\365\235\271%\356>\006\336\323\035\217\265\371+@\256q_\314u\351\301<\206]\037\232'B\366\350$\301\330\335U\303\203UK\022e\364\264\3547\226\314hx\261TF\310_Wj\343\326,\002A\320~\361\340g\233\362\3068\023{_\317\253(\326\001\013\221<\305S\324K\362\034&\266\203\251M\375BH\256~\344\227#\0103m\234\246\"\331\334\3460!\233\312\324a\3020@L\370\315\230~o\365\214}\347\004\010\204\367\230/l0\316\206\224\026,3\250\216\271!w\272\310&\365\200\316\310c\3164\236\014\222V;O\273\323\264h\212Z!\242n\375\331\261w,[\367,\215\312\346\r\276\311\032A\034N:\336\253\253\363\207\223\330qj\376\273\017/\250\016\225t\031\225,\245e\377\373\320\241K\332\002\201\014\300o\207.=\312\305\316\014\031\377\370\202\177\217hu\016\362\304\226'\327\001\206\007\327\261\022\315\336\331\027\227 \002\004\321<\336\037\2448\357""\005\031D`\376$z['$\211\2572\n\231p\315\335vx\004\305D\311\3421\025\271\264\335|w/\265\332\263\261\354\036'\244\324\202xx\325\232\370\020\272L-\260!X>c\332\317\265\213{\n\275\017\335\360\240\346\362\371i\2016\361\203\374\024$\370\322\372\235\235\333\347F\302JR\002~\002_\016\336{\271U\360C\022c\272\334N:\202\034d*A\032\000;0J\3712\003\3102\335=\375;\005\215\373!\312\303<\254\034lE\376\312\365f\374\"\336\027\243\305\202\027\334E\301x\3276\352\243\372\257\354\310<\204\206J\1779\025\342\366#\351\007\023p&\\\3414\250\020\264\234c\256\335_\362\266\032\216J\371 \222*\307\240\306\253\366?) j#\230\212\t:\212Q\304\2402D\210\212\t?q\307-.\026\240\267\213\303\300E>\266\311\263>\031o\335\225=k~Vne8\240fDy\242I``\327J0n\275\203\304F\222\247\242\226+]\366\341\\]\253s\360\242aU`;\343\346X ^A\243il\224\244%2\204\000\374\002e\253\335X\250+\000i\325\207\355\322S\260.Sz\312\225\253;\236v\261,sI\224\\\215-rDSK\006WC\270SU\177\333\372\010v\275\221\302\244\354\310\312*;\264\266\307)\003\236\264r\032\373\272\034\355\235\3514\002\317\213M\n\212u\201|\274@\t\2351\014\"\221px)K\305N\315B\025\010c\301\tr\013\360\251Q\262N\210\\\000\273\014\312hL\224W\336\014,\301\302\370\243\264*\025\363\234g#0\325\376\332o\254[T\027\004\213\202w\202R\354\013\024Y5\230\314\023@\262Z\332\317\221\3136eY\247\n0E\337\025\376\314\rj\335w\356B\356\334\201\r X\264\246_V\020)\370^\341`\323\312\247\363\243\002Cy\246j\022[6\033^\300v\n\273\376o8kF\3024\026s!\347\221\336ji\224%'\342b\200!\206\267Y\000\351\367?l\301`\342\r\342=\346J\311\351<\255$Z]\211\351H!\236\350\020\010\020*z.\353|\315\210\363\020^\271\357O@_\203\202R%\304`1\344Y\335G\310\353\340\205\316\363\305\021\313P\010\315\233--\203&e\347\217\271o\206\001\342\246B'G\002\014\323\3079\377\017\342\030<\030\253v!\210e\016,\254Z\240<\017\211N\200\334\333\032\207RelLz\325\034\332\343\024\007\230M\001\3545Y,\035N(=z\024]jZ\004\356\317\320\373\257p\235\240\345^\030c4\024\211\354\236Q\2674aj2\357\217Om\231%\016dY\300.\272\352\031\000#\007!\010\034\255i!-\375\206\324n-""\033\200?\263\032$\312\256\311\311\301\202\252\275\324\324( NQ\305\236\013\263q\"\324\362T\250\337\374G\340z\020\206\317\236\205\250\336|0M\007;\374\246?}\005[\t\032\372\027*vB5_\204\313\201s\014\206\321\016\231\032\254\242\300\251\314t\013\243|q\030\025&\316t\3063*\233\211\323\364m!\006O\371\305\241H\317}\nV\277Z\317\261l\332\263\313\355\371@\013\275\315Q\223U:\364FW\320\257IO\373-Wo\033G\341\214\363/'vV\373\257\355B\035\277\306`\267\3346\300X\313+\001!\265\340\022Gw\221\305\230\024\235\033y9\364\227p\021!\340\217BO\r\336\204\365\025\200\340\367\001\210(\232\312w\331\351\033 \022\232\343\340}\262\263X\201\372\006\365\373{]6.t\177\260\0172\360-\213t\211\224\026\374\312\240\263\014\355@\";\222\272\332\214\205\354\3147\275|\036\007\346\032 _\322\037+\363\201\236M@n{\337\017\204\270\206\255\017\201\272S\372\272k\024\3710\236\014H\000\303\002l\351\031\353L\306\340$\254\206l\331\226l\004\246\336\010\322g\205\004\244\316\004\303Zb\026\203\312\300G\366\tZ\214\036\223*\244'e\201\001";
    PyObject *data = __Pyx_DecompressString(cstring, 60969, 3);
    if (unlikely(!data)) __PYX_ERR(0, 1, __pyx_L1_error)
    const char* const bytes = __Pyx_PyBytes_AsString(data);
    #if !CYTHON_ASSUME_SAFE_MACROS
    if (likely(bytes)); else { Py_DECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) }
    #endif
    #elif (CYTHON_COMPRESS_STRINGS) == 2 /* compression: bz2 (57267 bytes) */
const char* const cstring = "BZh91AY&SY\345JK\013\000\273\363\177\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\300@@@@@@@@@@@@\000@\000a3\000\007\253\303\217y4%\207\006\207\270\243\000\003_v\263}\364\356\267[}\346\251\335\367\313\273\357w\276\327\336o\242\016\373\276\367\331\353\354;\237n\3459\352\372\372\371^\320\000\276\263@\372\333\344\257z\275V\314\272\355V\237vw7\236M\323\336|\003\271 \346\355\2759\356l\362\301>m\000*\272<\373\332\361\3466\364;l7\236\253\274K\256\256\266\317\253\3369HI\351W]n\245U\263\353[|\r\334\257}\316\336\316[\336\335\352\240\007\241Jz\222\343\025\322\334\337|\367\336W\316\373\323C\353o\273}AC\353N\367\336\273\305\361\366\331\365\324\235\336\035\326\217\271wf\313\212\201\367\275\356\253\232\211\367\332\036\335\332\337}rv\223\276z\003\333{\303\332\373\251\367\313o{y\345\266\317\273\207\034-\355_x\2276\336k\312/}\345\367m\334\213s\336w\236\371x\347c\336y\317M\276\346\233>\372\235\335s\301\366\317{\356>\276\004\035\356\306sz8\275\356\207\257\274\322\362\025\347\333\356\301\367\230>v^\356\035\331\353N\361\341s\255zg\331\211\317\207\327\335\355\361\200\351;\335|\255\364\365\275\367\272zX\217T\367\275\352\373w\267\257\247\327_5\202Cv\326\316\272\201\276\372\373v\000\000\037ov\232\343s\250+\247+\264\266\230\013b\333 \334\357\267\270\214\351W\317z}\216O\267Noc\335\334\r\335\336\356\274z\346\353]\355\351H%\022-\356\336w\275\305\307\335\336\367\336\340\371\343\354\325d3\263\222\335v\333i\271\3266\016\270\033\267.\227\272\355\327\257\271\347\255=\333\207\302\344\317>\266\274\003\357\216\276\346\207\220\327\274\345W\3277\003\267p\276\371\356\373\345\230o\243\275\340:\000\221\273\035d\nh\325\336\357{\276=\337}\271\365\240tw\335\313\311c\355}\336\353h\016\207\275\207T[\225\326\327\260-\223\336\346\213\3069z\367y\307\257(RI{\n^\317^\244-\3564\356\3055C{f\317\\\355\327l\000\326\203f\361;\231\253\325\334\267\270\007\253\326g\255WiQH\275\360\242`\240*\253\217g{=[\306\357l(\0004\017\271\357\217\272\323\255\254\264\333X\373\260\253v9\326\356=\354\217|\367\327\333""\346\255\357N=:\360\263y\357\271Pd\010\276\032a\261\367\233\321\343\236\272\367\216um\337wU\007\265\253\036\357\274\036\357\236x\333\010v\312t\335h\t\236\367<N=}\275\312Ag\253\200/\253M|}+\3004(mL\200[T$\211!E\330\000\000\000\000\000\000\000\000\000\000\000\000\000(\000\215\2348\000\303\240\000\000\000\rh\240\002H)\t\"\020\010\000L\020\0011244\321\243A0\230\206\232\233#Bd\301\023e0\t\224y\023&ji\246\320A)\240\"\020\204\232\020\232\236\232\031\010\321\224\3653)\247\252~\2012zi\24056\251\223j{*~3L\032\001\244\245\031\017S\3246S\320\202A\"!\000\232 \025O\311\211\232\022\217\014\243I\351\352O15\033\3250\324\364\247\212{4\250~\251\352\r\017$\365\r44i\243\3246S=P\020\244D@ \023ML&\020\023$\362\236\246S\330\232iO\312\237\220S\310\321\351M\211\35156\247\352i6\240\315L!\246@\000b\010\222 A0@j'\223B0\221\230\224\307\252i\247\351Sjz\247\263@\250z\010\3654=\023z\210\032\r\03126\221\220\365<\243\324\004I\010\004\320\232\t\251\211S\360\247\221\t\350\231=6\245?R\017\322C\322h=O)\352m\252\032=M?T\000\003@z@\032\000i\276\307\375\211'a\002f\020Q\263\"\274\270\335u\364olOi\247\352\365\256\336\225\r\3141]\316Hk\334\333h\332\231\206\246/;[\205\250UE\336\247\037~\345\224\275+\007\005\204\251\246\210\317\212\267\241\231\256\035\3325\341~\035\353\227\245A\271>\307wP\225\322\303B\230\214ar\376\0335(\334\311Ik%:m\333\033\261\217E\373\3266j\t\311\357(`&\214\"\366\362\335\210f\231\3125*\313\227\236r\252\225\3746\361\315\221\2616\213sP\256\232\037>]\022\267f\010\027\264\017\255\242\336H\223\261\002\343\331[\263hkY\035\331\372\303\353K\026<S[\235\264\347\263VF\026\312\312|\031\341'\235\263g\267\2034\312\202\214\330\243S\340\312\321\"\332e\022L\321\204\013yu\261g\271p\260\323w&I\241y\256\205\332/D\206Ky*\225\353\304\365UF(\204\343\031\265\263\321E\227qazl\321\221g\267Y\2367\332Z\222\204$a\265\002\274\023U\237\006<1\255]\236\364d\326\014[\23736B\335\374\341\\\026!\312s>\266\273\306\267+\305\2135x\365bij\255\337\032\355z4\\'\260\261\365\331g#\217,U\246j\2648[\246ZoM\231\362\327\307\313\215\366Cb""\243\370\205\364R\324`\000zy\201\317_\013\014\217Lo`\r\214\303O\026y\342\3670Kf\225\013r\261\343a\203\014&\200\333D \315al\271\2376<\214\243\267\215xM\t\306\023.\0377=\236_6{\370\274\273?\255\301\333\t\007|,\222-#\364;\334[\332\206}\354D\020\370!\035L\324\304 \251\360\004\210$\222\210\346c\230d\300\305\004\021\021!$\nr\006@\030\250a$@\260\312\244\312\204g\3711\323@'\374\300a\200\377\2262\377F\360\313B\006\201\016/\207\035\206\203\355\373u\251\244#K\020\3040\230B\032\221h\002\0010\005\241\231\304\003|\251\231\2115\377\227\321\217\1777\262R\377\311)\324\335)\274\232X\225}3\224\2472JX\225w\350:q\307\001\320\004\360\000\206\342-H\356`\210\230\003i\016yq(`\r\264\243G\355\374?s\257\263\366\375_\227\333\370\376\377\331d\377\227\364g\312Ss\360o\343_\335\037\315)\277g\371=\373\324M\177\036\037\356\225\237\313\374h\214\365a\324\272\377\236\214N\177\235\333v\256K.|\263\3277\362\321V\\\266CDvq\334\341F\270\204\177\243\010\000\376\277\366?\354\374\354\377b\374\377\234\233\273z\270=k)\222Z\\\255\266\337\347\020T\tj\200\006\t\013HKbF$p\363s4\363)\306\223\020\314\330\324\005\007\374\332\365\252\234AZ\270\241R\005+Bb\223j\204\336h\245z\031lZds\2106\3379h#c\031\221663\211\205\3254\266Z@rb\240i\352\222>7G\371\311\207\t\361\253LS\215\031\230cW\234\245`\344\330jB\230s#O\033\221I\272\251\242G\262+\305\244)\016\234f6a\001\310l\226\267q\2360\321oX\352\2651%!\345\237\025\215o\n\220\367:\207I\254\255'\026*P,ws#\013ue\202\013\247\037T\325\307\026\261\243c\322\014\331A\3304\330\205\241\241p5\246-\214A\241'\203E\223\022\223\226\266\362\360^\330\331\311\376\370\364\303A\250,\200\216\333!\001\377,\t\265\377\237O\377\177\372\230\020`\345\301\376\234\3627\230\016\277\373m\033\tk \331K\\5\303fXp\337\301w\006\014\0300^\277\210\341\343\353\352fI\0102\202K\372\340\377\327\376\370{\035*\273\033\177\376\301`\257\377W\177\371\333\003X\021\266\222\333Kl\006/\340\301~\375\333\367\357\337\272_\303\177\r~\017\372\003\376\306\032\030\210\242\"\n\t\212\242b\022\206`&*\202\010\245\275\242\236\320\251\024\211*""\221D\221H\202e\026\026\024)\255j\"\206`\246\252\212\244\250\250*\210\241\222\250\241\"\251\202*\"\232\226!$\217\313\023\222\0249\024M\031`6\256\001\002HV\202!1\t\200\302\210\227,D\000 \204U\200\20531\000\231\026\010\002\010\031\200\210&b\202 \205\002eQ\026\377~\031\n\024\200\013\365$\023\323\337\200\202\036\231\000_\247\t\367\240A\365\300\201\366 \024>\364\250=\221T\016\310\242\211\327\020>\250\200\235\221\027\370\240\000x\253`\021\260\001\256\222\330B\343H\343H\346&&\230\311\223\036\034x\361c\301\217\036<x\362e\360\211\002\312\014\230\335\360\356\360a\220`c\253z\035H\370\330\367|}X\0356\026\017\373\355x\375\337\0027\300[\202F\342\026\342[\342\337K~o\314\0323\346\3243f\315\2336l\271\2652\345\313\227F\217\300D~\261\020;\300\027\034iO\354\177O\346\262\210\177\\A\016\230?\203\351\350\303\024\203\315\177\233\273\303\277\264\013|\026\370-\364\226\372\3377\311\037\245\0310d\311\223&L\2310\343\307\217\036\\\274\3136\235\376\217\034F\301\301\206\377\202`Ww\037\223\250\220\221\262!i@l\243e\006\312\331[3\222\357\340\303\204\303\207\016\0348p\340\305\272\204\227B\350fL\314\0140\314\314DQT\301LM\024I4\225\004\224M$PI,M%\005\023%1\rPP\2221\025)\023\021\0255\022\0244Q3M4\203CCC0QARE+0\223\003ITPU4\325\014BST\264\025E\023\021%*\024-\001MDP\221%\021\024P\224\224\203Q4\263%\021QD\021SEA\020E\024D\322\221!\021\024\024TDQR\320\320L\005\023P4\322\304\265\022\305JQ4B\322P1\003)\024\320\224\023P\304\2055$\2205A,\311\005\020\020PET\314S\024\t\014D\021\021Q\004\215S\021\355\003\014b\312b\001B\2052@|`\005O\240G\222\236\243\230\274\303\255\016`sNk\236'\365k\331\266@\204\250\376\302\210\230\300\t\001\"\2200\266`\006\022\302\002\2379\324\211\002\tQ\240\214\003N\275M\227\252uS\250\256\\\r4\023\316|HW\301\033;\177w\375\255\037^\333(1\372\330\007` \302\007%J~\013&w\237\251a\000\177s\250\034\005\177\347\237#\206\302\334\341a\323\373\377O\344\372\241\007\204\326R\023\224\357Xz\2326^N@\266\317\370\334\034L\220\311\024\376\255R\316(c\275m<O\020J \2173\"L\3518f\262\033\323\256{i\212\304\222zkK\205""\375yL\\\373fzc\024\035;\320\332\020\033\262\213\350Xa\"\371\2731@\334!\36694\307\205\207L\3047\363s\334\362\357\342]2XRN\343\371\301\037\354r\267\2528[\357\302\324\340\356\274\350k\267\264*\366\372h\253$\236\274\273\3007\250i\210o\332\327\241\235\251\317\255\345p\356`\354\370\210&8\267\036\304\267\211$\272wI2F\223;\270\324\206\r\355\361m\341\271\210\213~\025\266&\00363\355s(r0\333.\331h\304\315\242&q<\213\336\026J7\225\322'\023x\241\264C\335\033\226\360\361\325\254Z8\233\234O\030)\003\315w\204\276n\354\003\244+ZKE\342\t\266)&\271_,\t\211#\371\"\267\355\237z\270Z1!\357\305 \335\235\t\203\310\207f\266\"R\362\3609\356#1\205\352\232/\0219\014\367\242\003\345>\302[\365O\007\332s[\345\365\355]1\342H\"\022q\345$\234\022\032\325\320\351*T\177\334\336W\347\216#=\003\343\000\246\031*\247\241\020L\177s\006\353\376\010\262\320\207\310\260z\220\365\014$ h\030\333\006\240\211 1\234\236\343G\356\032\030\317\362\030\220\245r `\023'c\257qg\233\035V\347\322U\370KK:\200}r\217\275z\3300mVf\031{\275'\253\216<y\304(\345\2269\307!\030\230\206d\324\021p\222\014\372\365\371\355\305mbn\017\211\0251\301\r\246\325\372\033\230\337iZ\323\003\275s+\"\335\323\242e\272\2110\261\035\205q\275\273\033\014h\303\t\360\364\271\375g\372\277C\206f\251\337\326\223\350@\377#^\037\323\255\013\022\220\237j%+\033\201bd\331\230\300\030\005\024,H\030\013\026\007^d(\252W'l\030\000\032\303<\344\205\213\206\265\326\310\2464\231\330**\347\234\305\356\266_\3704\275\320\356\010z\373\353\317\327\360\365\352\277\243\237\344\322\213\263.\307;D$\230\233]d\\\204\326.\316\017\356<7\007\3732\204\21402\261\277\"\252\254U\255\351\351\237o\010\363[r\2054\343B1\200l*F\253\373\2672\264\305\003#]u\374\001\260\204\013\300x\016B\316x=\356\274\343\302b\204\n1\036\241\363\365>\371Vg9\r\304\361\330D )3Uy\376\307\351( \321e \334\316\021\026\nLK\350\313Tu-\300\261\201\201\225/r\320@+(1\273r\3212\351\214\216\331w=\271\003#\361\205\022H\300b\220\204\221\210\310\204}\241UGu\254ZJ<|v\365}\036%_O\376\256B\345\246\255\001\267\311\352\274~*""\354\214\356=\220\372\363Wl\033\017\223\303\221\331\232\241\307\234\204J=\026\373\324\024\233\271\343\317\366r\201u\370!\267\344\340\371\331A\245I\217\321D\341\313\245\360\301\271\242\375\304\234\232\313d=\272hU\361\227\327\345Y\205\2533\315\364Y\252\372\352V\261\351l\344\034\316\3463W^\3251\365\352j<%oPY\230D\316Z\211\024\240\020Q\020S\022\021!\025'\202\010\207\204'\331\010\214\212\003\301\340\333\026,\370\010\307\366\24611l|\247\321\374\367\264\310\243\304\270\301\3468w\024\366\020\241\210?!\206M\021j\310\350X\245D\251\244\360\364\222\326\205\352\023\217E\3400\3564;\354c\263\036\217\357\032\210\217F\017L\341\204V\335\207$:s\340F\271j\n5\211\026\307\257\326\335\025\226]\300Us_\325o\323v\322\234\376\244\\\307\212\217\326L\336\244$\330\314\220\200\303\007\t*\017]\361A\226E\032<\023\000>\224\237l\214$Ph\251C\350\262|\270\0040\211,e\031\3314}k\252\2316{6kyBc\311\334\213\021\371\267i\351\244\271\317\222v\263\220i,5\204\n\177Z\215\303E]\034D2\252bX\314\310\030\212\006\205\244\032D\240\n\247\323\201\203k!\307\274\357_\021\350\3512\202\250 \200lC\253QF\372\301A\244\315@!\006\224[LD+\325\336A\367\352\272\243\226\331\026\t\232\212<b\371,A\361j\227_\025#,hL#H\214\203\345(\020\205_\241\221\030A\216\t@\362\242V\212!\311\246!W\n2Q\222\020\341>\356\2725\202\355l\252\266\306B\3064\321\005\366B\320\013f\323\024\351R\254>\336\276&\274\314\010@q\206.2\336q\362E\355u\265*\245e\3179\326\313\016<\323\330YD0\305\324)a<\023\306\035\025KLF@c0\223\220\331\211\006V_\014\031p\344\305Zv\215\261N\331R 6\034\206\361\257\227\225|6\266p=\262\256\257\022\204\030\342^\215_\204\351\365\313\206\332VF\3749\257\353g\203U\2579\346\034\213\360\313\304~\n}\0070`$\010K\357\373\306\332\330\352D\001\355\221\257\317\364\3641\246nS\300\317MJ\220\201\002\022\"T\n\005XC\347\177+\361\202E-\0130\204\214\010u\2555\364\305\277L\362\232\221\004\310L\003I\240THq\313\361Ie\212\261\241\203~\203\034@\305\333G\031]\362\323\306\311\323d\330\213\264\333\265\262\013\300\247\276,\343\004-\r&\330\332\005\253V\354r\3169b^\334""\255\2627\271\334\207\243\347\244\027\332\036\256\204\246\265\256\357\005\\^\007\036f.\027\211\265!\262\310\326g`\341ho\264\314\305\023HB\241\212`\345\263=\374\r\217\034\3235q6%\243\253\267:S\245\310P@L\302\024\344Kl \245\202,\t\231%\034{!\220+#5\370pLk\353\316\267\251yI\356\315\002\324LW\"N\310f+R{X.=\330\314\2470\030\346\244\341'\231\254Q6\221enW\214`\350ww:\354\274\010\356X\007\255\273\243\256Ps\316\006\243\\\262\021\332\017\227\032O;\271\343\036\n\322\335\023\204\347\234\254c\246\326b^\034\315S#\250PpN\360\013\302=r\2618x|\371\016\347'\250\226\034\210\022%\024\204P\224o~\1775\247GP4\356Z\003i\264e\201/\306\364K\335r\303\203\204\366\226\365\013\337\340\367h\216\365\0028M\247\353dS\270\352\342l*{\346\024\303\252\356\314\005u\233\366\253\300\215y\030\362X\027\014\211\317\217\241\262{v=s\017X\302K\025\014=\350HF\230t\222\000H\310\251\345\355\323\t\351\310`\233\307\264\324#\274\314\261\002\241\371\245\376X8\"L\3054@\262Kf\0222\316:\240\265\204\320\374Pl\366\252\235\231\254\r\264\367r\022<\356\364\345&\217P\366\355\010q\333\223\323\271\274>\235$\"H0\214\347\317iG\264\240\225\020\347N\375`u5n0~\344\344$\002H$Y\251hi\241b\020\212\006\236\331Ls\003\001\246\201\232\217\227\344\335'\313\207{\362f\323\350F\t\301w]9\371\370\347\242X\254\254UI\023;/A\335\317\226;@:\t\236\206`\331\271\036\277\017\3514\033VT\241 \010I\"&\022(\212\201\221a\031\"\020\027\264\364\374\332\274\235\235\030\355\307\232d\332\306\310Y2\211\026\307\224#\367\330\027\343^\362\200p\030C\325\024\356X\216\250\243\234\r%\024GM\036\353\024`\363\332^G=}9\272`\230zB\262\341N\205\250\205\332\334\350L\341\323vj\363(\357\345\215A\331\307\3105\204b\260\206\374!|.\337}\251#\023\304N\322\0379\337\345\352\3344\357sN\271\302\274\2357\345]\003K+e'\324\225\014\211\334)\240\235\214\314&\215\266'bY3\026\307\367\311Y1V\334JJ\"\225l\243\033\205\332\r\265(@{\034\205\307\007\323_\035ac4\301]\206\014\025\300b\0304\024\014\010\257\264W\313\031\004c\017)\253\353\376\255\245}\216\232^>\372G}%\343K\304x\277\220\007\200=\324\002\272""\203\223\335\260H<\210\177\212DrJ\025\240j\204j\242U)(\004\206\320\332\355\177@t\017G\3503\314\213$\211 \206f?\363{\317\270\023\316\217\356\303T\020S\024\320\264\221\r\rQ14H\304\r(\224\245$L0D0IB\264\225H\004LS R\025\004\214J\020M\005)B\021SA0\264\244EU)@\3204\214\220\244\303D\324PU\n\0244\264D\251\022\024\205\022QP\004z1L\2031\234\022\221\302\000\231L\214\214\207\320\026\2440\363\372DhH\251\n`\204 \211\210I\356\357R)\222\204\036\364<\303\340\236c\247A\223\224\377Pw\035\324\315%$\324\022JU\024TTURD\320TUE\352e (H\034\305|\013Y\207\340\303\024\"\n\030!\257\020\352\366\"'a\320I\017\362\220\251\271\352\007z\233\315\351\324g\243\236\214\260/\025v\242\366N\252\365^\243\256\201\030&\220Q\352\365\036\206Y\016\027\257\233\375\341T\330;\001WbDL\220\311E6@$M\304\240 B\206\246Z\210\232\202(\210\212\240%\224\314\300&\032\022\200\244\250% \206\232a\002\210\037\016C\227\203\224\320rCH\240:B\242'O\372Q|\342\370\207\235\210\200\365\324\003\020\221!\022\024P\001E\010\0245E!JP%#\020\322\304\241@\305\344W\230\314Y1T\214\"\205\307\270T\364C\350\227\275\200\360O\0054\241V9\223E,\223\026X\263\332a\205\006f\024\233\343Z\216?\326\235\235\325UUU%UR\365\nb\036\341\240\016\346 \224\217o\267\340\236\217\333\353n\262\353S\036\213\2226\345\366\372\036\201\351!\346\227\300&\237I\005$\302P\372l\236i\215K\223\340\nu\005x\250 \274\002\233\242t\001\350\027\313\373\261\312\366\266-\214e\313\311\320\335It\\t\347\233\014\024\203\353\325\340\327ix\331\206\020R\321\3412lx\034\307\003\035\343\336&\342\263.2t\025\241;`\344\322N\022\202[NA\225ZN\246\237\021\0313OB\022(hM\004;>K\253\233ff7\034\203m\224\206fq\244k\234\344)\316\261\314\304\346s\2657\271\030\353[\205\321\002\\\2177)r\302<\204\027\0278%Rw\230\203\025h&\246\242-F\224\275Q-\222\365S\n\210j\263\020]CF^o\032\341\032R\226\344\346\307\303+\336f\331G\356\004r\351\235](\357\004\345\274\331\023\204\010\310B\034\232\002\211\n%H\210\250 \227P*`\335l8\317%<W\311\017/ \336qv\246f\250\260\261\374\352\007\001\336\213\326=Y\251\230\020\030\035d<\370c\020\036y=""\020l(\220\364O\03211/n\202\366o\000\264j%\022\326\n#\341\003\300\276\001\360x\037\017\256\233Hv\307k\017\372}\341_R\276\364\304%-(\024\320\017\241Q\251\335<OYR\024\3017\330w\227\203\274b\371\260\n\305\007I\321\032J\346\034-\005\201\235\014r\017J\036\221\037H\247!y\010r\027\260t\rZh\247\372\307\217\023|8\200\222N\335\001\342\370\360n>$\237\320\033\025\311\002Dn\020\204j\025\241HVT\257 \371\213\346\217\230\036`\371\276a\276\233mRW@\037D\017'\303*\027\323\351|\361u;z\335\206\242\241\317F`\321\014\351\300\261\310\242\275\220\206@\026\267\006\010hN\3624h\364\202zD<\013\340C\302\370\017\034\365\223]\341\271E\033\233\247\376/\207\302\016\247\243\347\244gUN\261\r\205 \232e\236T\247\261\301\267\214\201\376\222T\221\221\264<I,\032CNP9P\360\207\204<\007\205\360l\227;\277\322v\251\324\367@\036\264 \306@\221\236\034\017\232p\355\352:D\350\200{\355 \367\362?z\006\315\221\ri\305\036\252r7\271\206\020>J;C\265{D\352\036\324\355\\\362_\375\236C\273\244*\014\210\310\3619r\031\007\350\271\350\306E\027\245\025c\364\007\227\341\244)!\332\212\n\222\241%q\003\212\361x\207\020\342\354\377\317=Z\265\353\300N\321\016A\310^\376^\t\"I<q\273S\247\037T\260\027``\346\233\022\004J\265\227*\246\001\320\017!\344<\271\034\217\233v\206\335D\314\377g'\222\222'#\237i\325\254(\016Z\372h\2151\351\333=7/!G\363\226[\244.o!A\324\267\205\211\030\225\273\t\213&\3272\202\302\221\2546 I\2306p\341\030.\331`(\017\320\223\3227\353'\306HQ3z4\215\346\014\302\037\020{C\315.\256z\265\344\256_\3558\013\301\221H\023\231\350\340\350'-9[\206\313\322\360\234Ha,\3067\345\2268_w%\344\207q\264\177\237\261\003\220z\241\322\220\203\322|s~}|?k=8=+\303\343\024\237?\305\032}\214\214Kl\335\247\324=T}CFB\371}\317\350c\0260fB\313\214&\276c\276\344\256:/,3<H\222\301\003\021 \305\003\374\247y\230\242\220\206,X\261#\r\262}\255kK@\006t\0000\300\002\252?\223\362|\177E\275\376\373b\010\240\"\373T\003\3600\024C\367\340\375\310R\237\345\205\020O\3358\300\007\367$Q\300\264NJ\004\020*\221 \257\340%\304NzS\307:\321m\007\356\341\022I-\210\003""\346\342\021\347\023v\010\324\320*$\213\340R4\2301\234\361hE\260\275\344\374\2753x\0251\035\016\240\304\201\001\"P\001(\250\202\204G\270\031EQ\301\320H\340\002\355H\025L\225\005\300\200\025(B(\266\"\024*\230\220\0350\223h\006\237j\333B\340\273\240\217\004\231\275!\377\321\004\221\021\212\355[\262\262D\314\274^\233\340\256\224\222u\250\211G\334\357\336\001\372;9\334\373\254~\254\304\373\027\254Uy\305O\272\002\270\367\325\002DH\220\257-\254(~\335\264\355\211:\215\013p?\274S\250%\344\346\266\"\303\267\030\201\276:g\232Y\342#\251\004=\343\344\177\231\022z\035\311\007\177O&xo/\263!\203<\030\224i\214\264\250\010\353\022np\246\024\331Q\031\337\310R\204\nhtl\2141x\222\305\301k\370\265\233\377E\2641\240pA1\312%3k\224\343P\334\031\345\022\034\365\320>k\231\302pp\367\006\2108\302\345\373\200sSa\203?\025A\006$\222Ip\013c\215\321\001\376\222\352\350_\246\326c7\004\236\342CZ2\355\217.\301\223\364\233\257\364AO\303\370\223\350\\\"yv\332\236\035\216\350\362E.0}--\013OD\025\244\356\203\274\"\235C\247I}\344R\210xI$\322\224\244\356\373\202\027\017\374{uT\352\025\250\203r\265\314\363\217\243\210\377\300\376C\217\321?SK=&\247\277n\371u;\215\312u\220\374w\230\364\231\204D?\372\305\336\213O'\223\265&\256\357\323c\335\335j\263\334\177\037v[S\301\017\244\320\232\020\360%j\345\217,\355\210v\271il\262\332\332\334\266dwD\331b\205\363>\267CB\027\204\214\200\032B\023F \333\354\370\237:\376\227=C\242&\242?\317\261\374\306\377\220\341\324c\224\017\264\320\243\244\"@\377Nl\2120<|\267}!\340\320\343\233\333\3517\006\324\330\215l+\177\346\023\274\352Xy\362\014G8\t\203d\3577\375&\007\014J]\320\004pI\020\332\254L\341\302\r\3102!l\250*v&s\002n\034\234\206wU\323P\311,\242\2278:\377~g\201M\255\241`Hh\322%\021\272\001\"\205\260X@\247cb\320\200\272\2212G\257ID\342\201f\270,\332\006\266\002hRl\331\241\024\324\201\211\022D\264\004)\006\361\004\263\260dk\013\246 \210H\203\375\3671\002\203\"\223.\316\017\254\r\013@\310\212\325\021T\001\313\332\254\023/\216\006C\304\362Da\365\221\250\2147s\007\024f\375\257F-\302""\2408i\024\313\247\215yrn\316\243\274\023\013e\272\306H\\\242\372Q\233\262\346i{\344?#\304i\335\335\272\271\020\225\241\322\332n\233'\017\270\230jk\226\366\262\247D\300\205=N\260W\251#\n\032\243<\024;\362\323\005{D\273?\314\362knC\242V\342\033\222\365\r\332im\233\tM\032\361\260C\322\2258X4mD\250g\373\256\223\"33\214\343Oi\320F\304<\265\237\216\030\362\346N\367q\324\001\276\"@6\026\352+\227M=\211b\203,\236*q\241\213\304\017|\036<m@\271\327\267!&N\202\027,t\026Q\264\013i\315\303\014m\206\345\364\300\016\022\301\276\270\361\002fs\003\357*\352\353\2645rJ\031\212G\255\245\216\024\324BA\020\344\007;\252v`<\247\261|\033\257\272Q\353\267O\305\202\035\027\331\023\244K\351\337\222\213\310\324\\\257\212\25397\331S\020\233<\200g\025\021\322\3759<\213\267\311\024_\241\025\224\177\245/^\211\233Pb*\340^\302\t\312\n\214\224\337\204g\014\2347\225\373\n\260N`\272\255\254W\347\203\265%\2540\200\323\371g\253\364\3219=:n\244\226L!\022'Lp\307\237.\303\372\0165\330W\235.\2301\364]\331\231\361\350m~\222\371l\270\201\251\301\354^\352\330\340\256\203s\255\257p\352\326\355\t\237\025\337\245l\031k\311\313\274\255\0179a\312\364\332\003\267H\030*\321\2471\364\214\231\235\207\361\013\003W\265\266V0eeu\332\274\301;\2033\230\304\373\346\226\323\004xy\371\367\243\313\355\227\007\215\374\241rn\334d\020r\201\226}\023#\002o\021lZ6^P\300\254\300\302\021\341?\246\342\257~\220u\377+\032NG\003\217 \0246\272\362-\231\332\031\000w\211D\264\222prtQ\305F]\r\33273\357\010\353\221\235\006+\311&ZQ\301,\003\242\355\304\013}e\265.\263[#V\256\275!\264\232IUB\226ork9\343;\222\023\264!\014\266Q\243\221\307\201o\236\365 \3058\342+\316\017R\225\331\t5\034\262:\030\251\013u-\255\246Z[\2461\312=\330\256\305\267W\227Cu\352u\205&6:B\321*\372v\340\340v\360Pi\370\206\263\021v,%<\005\001\220\302j\260\014r\025q#\030\242\211T\217\035`\024\242Z\303%P\244\303\353\251\361\343\241\255\364\020\347]\203\315\036L\035\212+\315\211\t>\354\207\241\225\220c\231\341\242\007\010D1\323\304\265J+\0065\365\331\365\234\337\246\305&Z\261\254\242""\227;\344m\351/\315\007=w\340\316\273\225{<p\303A=\2164\t\211M\304(\260\243j\032\254f\034AdK!\023\337\026\225\205\246\324\353\266\234\331\323#\036\317u\261\242\r\355\210\3468n\304\233\rp\216G\221!k\202\346Muz\3329\201P\342es\241\374\034U\356\237|\316\316t\222\302i\312Dq\323F\363]()\371\306Pd\276\341\264\312a\266>\252\256\335\323r\236\215Cc\365\345\274\260v\355\242\033\016\251\350\2368\266\037\007\te=j^f\031\324\333\261\005\224<?f7\004B\265\347\330\201\373\332gn\033\t\362\331\2667.wM\304#{k\357\375\201\377S\003\327\003\233^L\234\024;\273\t\363\232i\331\307s\313\266\313<\360\3509\326\246#\307\006\227n\316\354\307MM\246\257>\314i\013Mo\353\333\363\334\270\355\216\223W\216\230\023\270Qt0\335\242\373\311gw\007n\301m2Lo\025\010D\244\215\3626\256L\031\361~\232b~\367\261\373\243o\264\220\221\253\206\343\334\367J\360_\272\304\313\344\361\332)\036c\343Z\037\320\361g\nI\377\241\310oC\001\364\332\336F\333\332\\\314j\023SB\345\007\021\006@\371\231|\2250\000\373\241\357\373\376\276\223\231\001\346Z \341\311\353p\304\262\353\271\226\033w<!\241\201\320\364\200\032m\216\221\214\036\021\001F\233G\263\2768\336\030c\262\004o\340TKg]\332\2734\337\025\200\320F3\365\367X\223!\215\267\337\207,M\272p\364\373\314[q\277\212\014D\304\353\325e_\n\330\216\031\216S\024K\315\014CtV\303k\334ju(\315\\\036\371\372\215\337S|\207\2236\250\310\333\204D\246\205\353v\303\001n\375\215x\256\371\200\036h1\222\332\332\002\030\224\323\220L\320\251\311\236\211;\021\231\211\253\352\001\371p\270z \350\013\214iL\210-{-\230\317m\244$\333\002\236I\363Y\360'q\347:\365\342\030\005\262\244\300\234@=\261\352(\001~\034\325\014\234\304\276\301/q\305\213\025[\237\"\335n,wQ\004$&\324\214\250\252\005\250\263Skf[\025B\353\206R\375*\313-\222\010\223\036\371\374S$\323#\\\272\246\327\361ns\334\243\351D\206Q\360Cx\005\320;\331\331\244[\010\035N\343\245\3400x\330\353.D\231\211\314lm\330\020\317\t\251\020\244]\226\n\231\265 \334\331\"\023\217n\314Ub\232)\225\3153Q\0062W\021\243xmj\035\354F\310\003\003?\024\216\265\333?M\307\010Nc|""\356\315\266\251\023v\211\362\022\031;\365\307#/1\233\020\300!{\336\027\241\251\324\277\0352\010-LW\\\343\231\362N\351Z\276}u\352\364q\307\247c;\005\334\273\034\016/\316|`\254Ez\307[\035X%Ox\372\353W\337+_\2321T.\246\267\365\320\355\363\350\205\274\034{P\035\201\347\177\240\332\375t\267\2669\271|\251\260D\362\034\254\373\367\262g\226=-\t\360\343\357\365\267jv\327z\241\225\343\363\343\335e$:o~\315\371\234\007r\3764\023\350\2073\232G\237z\306\034z\205\323\261\034\357f\225y\304\021\277pp\356\336\343\355\226[)\340W\260\265\266R\361t\335f\316\310Pn C\240\242\363\034\334Ne\374\210\202\004!\307:!(\014G\230C@\273\363\327\211 X\351g2\335\263\2672\304\226\3168\375\245\267Tt9-\003\311f\242w\216Z\3123\247\365.\027]\230\347\242N\304\227?~\032+xm\250\034\223\263\236_p\003\242\333\256-\201\261twn!\372\350\311\240\356^KN\310?v\245\216]\006\301\310\374,U\256!\244\r\315\315\255!\237\204\345\307\354\264&\316]7\371\330\257\360\034!a1\352\330\216y\024L\r\244d:Xo\322\216\347\331\\N\2523\327\307Z\375\220\345P\271S\357\303\023,\036A\242\343\237\307\324$\3365p$$\035Bt\266P\334\207q\322\334\353\217Igh\031\332W\2244~\302\337T{w\372:\232\230\325\260Ga|6~\267\227\266\361&f\250\277\004\212!\264\013\233\005G\"\2505\202U\352>\264t\207\001\235y\370j\301\343s\027H0\366\367\316\266\024<\313ju\262\022\001c\243\333\177\231\324\356i{Y:I\3111\2564\3327\211\321\033'\200;L,\036\007\034s&\225\256\262\342\021\350\030`\005E\021r\360I\224\316\373,$U<Z\214\305NW\323\221\022\275M\213q\307u\330\305\\\254\251\357\340D\032\223i\240\307\005{\357\n\202\216\263aX\223\322[\216,\021\242\330\327aI\3208\226\021y\024|\370\255\231\357a\250\306\207c\rl\207\351H\276\256\371\334G4\302\014\027\216\351x\215e\014\341,\317;(\267H\034\267\377\261\247\262\213e*\224z\205\232O\017\245Q\352x|=W\032\341\212&\236\342&\007_\021{i\231\244\317\236c\036J\205!\023\330B\032'*1\317u\263\2719\275T\243\024\312O(\215\030\3353\206\3544\023\263\301K\343\304\342\300ygw\021\305\005\226\307\230z\351#\304\371HP\204\310\303\037\244\315)\204\320\373\314""\356\032x\254\213\345\2176#1>\024\014\241\317B\033o\330\201\021\370\347\230\254\357!*;\323\017\352\352!\316\260\230\230\362UM\327nOY\031F\223\030\"\267\235\201\370T\342\007\362\372\272\356L_\025\221\246\204\223\226\327L\335)\243\212(\341\352\201A\t\370\302\355]\305B\305\360]\366\277\241>\023\203\352\003\314\326\372\0332\0056\r\321\275\310\237\n\004\255\345\374\304wq\236k\007\257\034\366\343\336\365\266pu\3030\210)?\032\337\032\346\243\036\2701\325\203\\z\024\255\2555\245\270gr \216\365\302\177&\227\021Vn4\210n[M\"\023\026N@\245\227\366\234'*\200#l6\351\305j\211\261\260\360\234\354\262?\010E[|0\303m\026b\210\224\200/\261\335\274\311c\326\274\372\317#\247\313\204pK\375\316]\213\247\375\213f\321\252n\362<\302%\003\204\236\352\265\305\214\201\026\264:{\257|\316\345\331\224s\224jSp\232\215\306\270\211E'\303\005\234\266L\374\027\226\265\314\372\327\237\237W&\345\263\355\326&\310c}t~ \200E\364\022\203\025\023\016\032\264\016jO4\013\3668A\207\271\265\005\022\247\017\277\350\017>\275\356'\315\273\017\032\365\271\336\\M\344\303\211\364\210\312\247\365\325\010\021\010\314\266\247\243yU\364\204\035\355Lua5\345\271p\273\370_\353\277\257\004\302\242,\341e\203\254\272\2174\305\216<\037Y\031\036\025\260A\251\240O\2541M\204x\001\\YH\274\345\246\211\032b\024\240\220Dx\301\321\222\227\2643\314\342\320]\"\252B\226\212\245\245\" \336\031\005N\026<\241\256\323\242k\356c\326\201\022|\322i\221\032#\234H/X\340\354 {\215n\320\364cn\253v\216%iA\016\0167\\lN;vqqh\362_)\344ph}\tb\007,\322\347P\367~\207]\370t\023\342S\323\334\025zW\337\321\315i\267\330\365g\334\365Y\256\310\343|\345{\246\334\3151}\020\212S\335l\243:>\356]$t\356\205\372\335s\275{\356v\303GX\365=\230\242<\232_\253\225\005\"Z4\211A\370\340=\360\215.\0343\325\346\365>g=\315\236,\207\373\300\266TK\241z\315K\355\"\365o\007\"\210)\244\016\243\260\326\357UM\310\347)\331t\357ETE\257\266\265*\223\ro\"*x\342jD5\003\223-\206\25401\271Mv\360_\221R\362L=\257R\213H\307\221\007=\363Rw\177Tv\n\177\277\203\243I\323\327\233XI\024h!\032\224\327""\257\026\245L\023)\306b\032\201\251\267\214\270\010'V9\226\005Z\216`i\247\256\017qd\321s\025%\371\212,b\271O~\324\214V\3035I\336\024@\324k\342$\254\262$\222\335\207 \342\317:\315\274\312\343\336}%\313\203\277\003h\357d50\204\t\031o46$p\271\374\016wf\351\333\305z\004\222\010Z\223\\\036\017[8\254\305\277F\266\334\262\354C\223\346\331\330\320\372p\304?\334\250:\267\306\376\326\035\375\033\037\017z)\217v[\253~\031y\260y,<\226\013\317\013\324\305D\3561\250L]\377\2253c50\305U\214\251\010\305\021\306\"Z\025\300u<v\246\220\255\333%\t\237\024\303'\036\243$:\233u\226+L\203Q\006L%T\310\267\211\212\206\024\021\344\257\276\273w\317\036^\360o\223\247\316E\352\"\275y\007\2567\3444\267\177\352.\275\024\010\361\347e\325\034\323\370VyzE\t;\241\022/\305\322\342\016\025\360\376\363\340\003\200\326\220\363`\003\363\014P\275b\271\020\351\256\230\353\326\216e\316\207\365\0324\230H\206)\220R \301\341\037\211\352\026\375\316\272\0326]\2417C\261\005\213\222\003hty\010\300G\270#{\211=|7(\022\320\310\343|\257\002\305i\257\007\311\220+8\332\243\365t\036t\354b\022?7::\0210\302]\312v\356\211J\035x\r\007\023\3249~9.Y\266Z\235\352_\367\237\312\343l\265\252\267\313a\334\306\300\363\275\255\010\314\327\351\326\332\244\3724\215\267\261\234\373v\036\202\327\366\263\322K\325x\214Jt\017\032Q\243\266\027\300\242\203`\312\325\000=\325\256;\003hr\246c\357\212\267\237\266\267\016\223h[Vc\224))\233\2525\250>q1*\3573\305\221\t\206\2233\201\263e\030\rr\273\033\247l\255\261\263$\016\357\225\254\344\024\266 Y\215\334\374\2353\254vz\263\276\000[<\202z\372SK\216\215\244!t(\320\250\316\265\336\0367\223\244wV]\025*x\252\217\013PmL\247\221\373\020\327\033\263\266\234l\244^\rDk\305\305_0\033J*\340\331_/\236\214\221q\005\332\334'\360>\255\314A\005i\333t\342\244\345\220\317-\244\335\306A\006\307\243\2471\337$pL\2716\316A\241\333\207\310&\262\032\271\246ga\030\233dq\364ii\000X\241\234\331\266pk\0339\007\203\006 D\251c\034pBQ,CF2\032\306Ei\3531\273\256\016\034\312\331!dbl{\247}\347\241\260t\322\334\304w6\320\323\235=&\212,""\251\034\351\253?\014N\250Z\311\3376;~\n7T\034N\266\360\322.\232\261R\363\t\340\020\340eWS3,\003\266\205)a\027b>\352\373\237\324\301\251\336\266!\215\017@\357~\301s~\241\214\022]\350G\037\007\036\346\211\340\233\206\353=uo\370\240\365\261\275\3728\036\355\221\301\266\350k9\203l\373\350\345m\320\323\035\235\205=\331x^\016*\371\240\377\3311\001\307\350G] \002hP\325\272-\351\317\313oQ\017$\"\300\332\354\036d\351\226\003jK*Gk~\032A\217)\331\0354\027\257\301\276\322M7 \271\210O\343\213\376\261\004\005\336\306\234\351\214?\\2\312\357i\274sCj\314\310\247\3513\0358\205\335=4O\324\344\342\331\3453\261\020\032\204\310\317?2\325[>4\232\342\217x\3400\363\313\270\254l\341\204dW\037\002\207hd\342\0168\357\304\233\3725\302\020.\367\300\333\247\303\236\2328\267\306\203\305\267\202\200\035\276\242|Y\010F$\010\304 \206H\202j$\032e B\"\002$ \211V\202\010\t\257@FX8\031\n\323>\331\303Q\221\231\206cFa\223\231\230eHQf8\343\006\2060Sa\016\004\213!\350\314\342C32i^##Z\t0\212\205\362\262B\"E\266(\\\204h\326e)PU\020T\321W\234\303RI\246\233\036X\275\366\265V\3222\352\205}5F9\357/\3009g\270\266y]\317s\307\005\262\315/M\266\367C\222\346\253\010\241\313d\021\0148\356\210=\347f/,\317\021\244\231\326X\035\002\305!i\203G\266v\\\235\274R\241\005\ni\000\337=5x\321\3264\215\203C\035^\254\274\314\270\352\311\020\207\031\r\325\304\351\034\371\314\307\206\206\351\270\r\225\342NQ\007G\250f\355)\246\232=.\374\272|w\334\350e:\2219\024\000\352\235\361\3011\342\330\276\367\230dGF\005\334\364M\026\356\321\257\255\326\032k&\251qJm\226\367`%2\273=\364`\007\025E\245\"\327J\205v\265\206r\027'*\262U\302\031a3\222b\207\270\242\370\326\3723\334\035\266\336C;{\361\025\333\264\232\376\265\027\301\277\\\032j\367\232<\022\026\3050\206X\333\365y\026h\353<\224b\341\203o\347\341\030w\311e\307\233\373\224t&\337]\017&\\\030\3209(\265\266\274\271>\362\305\334M\004\251\006NX\214p\336jS\022)\320AC\307\361l\376\246M\350\375P\203&br\223\033].\345\300w'(bNz%\034e\311mV(\022\321]R\372u\323\223;C\223\220\331\3273\324\306\231\0177\000""\372\036]t\323)\267dM\213i;\035N,\021\3040Hs\311c\244\013M\342\344J'\257PL\2649!\207.\007\"4wn:\204\222\221\226uI\250\362%\210\"\203\364\274\336\037\360\235\034\034m\010G\251\340\364\301\317>\357\3036\314\226\355\304X\337\262\356@r\037\252F\353\n_~.yV4(\013u\3449\265?\274\177\016\212\365\317+\031\272A\322\375o\2772\030!\236+\204\313\331oW\244\354C \277o@\272\273M\217K\264\266\201\274\205\357 g\3249\025+:\263\310~}\224N\027\014\030\301\211\344\037\275v4\000\034\247P\362or3\274\265U\252H*\240\241Y\022\3501\020\272\306kwS)<Y\310\357\353\222\013\352\210\032\020K\220)\330d&\276\314\372\355\251\3074\304AHZ\253\343\010\233\022\316\245\030\374\220\356X&eer)\\f\200Q\2770\250\320\267\335\332\266&\003\210n\231\375M\310\340\204K\350\201\346\036\r\2514\351*\216t+\341\344\370\312r\255@\003\274\242\324\031\020\0307\242\275\\9\031\342\224\272\255\003\216\355$\254r\222\211\341F\223;\252\207M\2259\212?d\014\360v\333s\265mNTe\270}{\233)\202\375k\237\006\351=P\323\356 \214a\216\325\343:\203C\032q\300\345\303\311\244\304\324\257B\265\223\000\220\201$\024\211\345\323\267M\013\364\256p=\3177<\215\035\314\014\251\211\007\177T\277k\276r\200\354\203\242\204\264\324\231\362(Iv(\215v\315s\261\261\245\2613\264:e\346\264\200\332\341\016\254L-\202\022\035r\354\264q,L\277Q\321\210n\016\003T\330\215\263\233\207\341\346m\022h\273\315>N\232\316\202sF\021\233\222F\344\024\353m\r\342f\337Z\013\210\3424\351\310@R\021\332\307\321\265E\323\355\372\024\2732\236t\017\312\221\271\205a&2d22\272\252\206\3135,:Hn\3102j\250\3342\216\"u\206\214\261\370b\336\334\246p\326D2o_\351\220^a\034sPH\333;_G;\262\331\334\351\035\231&\247\236\350\251\346\255\265r\222\235\234\207e\307<\371.\355\214c\327^h\274\270\2242\267\247\231b\375\265\34274\026\t?P\241\254\302B \360=m\273\305\0367\215<q1\031\342\032y\222\tP\306>\316t\355\023\273c\264\204):\013\266\035@\221\335&\375\243\337\034<1\275\234\232\231\216*\204\205'w%~\335\004@?#\370\361\014N\233\364[\235O\212u\255\241\020vBt\201\375fp~\336\210\266\342\017\022=]<=6o\365\232\345""\256\0311\312}=\312y\354\2753\257\245\014'\005G\303\350\360\200J\354\317:jx\022b\220\230i\017M~\3172\\\253\207\333\3762}m\304\227\313;1\251 \226\346\203\243\233\243-]F6\334\230\031Bf)\355W\331\336\207\303\333\253Z\343\343|\364\351YgZ\242]aJ\320\306\247G\016\356N?K\215\346\241\214K9\356\037\257\205\033:\203\300\245\274\017\372\261*\033\217}\317\021\263\270{\315X\217\024\321\261\302\343\311\036\246_\271\003\346\251\276\371\215\255\323\302S\026S\002\3226j\201C\024\247\246\336\200\276C3\014\023Zq\266.\314\344\210\023\\\262\022\2329\353\177u{\261\331Bj\\\276\273\363\035\266\316\306\245\342X{\306\355'\235\016\251aM\007\006\267My,\234\242EJ\212\206:\364\225\252\261\264\263\275y\206\235L\346r\265\276\315\274\340\356\321E\373\366\236\355\271Wn\353BK\311U}(B\020\256\242\335\272B\227\256\375\322r\344\362FQ\333\313\337\017\033<\233:\346Ii\212\362\362w\177)\246\263G}kZ\255\005UTDC\276\250\327g;\266\375\337/\324\375NS\244\227\337\006\017]y\301\333X,$Y\206l\260\271<\367*\024\002\311\016\312U\n\266T\347l\220\310\250\213\251\241\025>J\016\314v\323\231\274\3416\316H\310\315\216\270u~\260\267\242i\016\317\020\177t\205f\205p\225\032W\362^\267\370\260pl\236>\255@\346\004\rL\034\007\216\355V$\357\332\262~\243F\336\023l\203\227\036\273\230-\226\356V\317\033w\2662\231t\007\033; \367Y\212\214\032x\3567Z\376\316\216Q\247\321}\207\322\356I\207\351\0210\022h#\360\376\344\035\267\227\335\207\363A\346\303b77\307\336\020#\250\306\230'\223\236<\010K\364Gwl\350\364\033\213\363\243|\270v\337\030\027\372Z\230RQi\305\253\333N\346\334\316M\310\270\255\354}\273g\325+\r\025_;i\256\331\277\035\244\324\267\202s\361\271\310\230\206_\241s\345\215\373\022\306\0247\210\3409\227\362\346g\3038\260\201\263K\221\260\334O\205\014*j\372k=V\373\314\305I\265\325\330\355*\245\212m\263\351\373\030s\2117\340\020\321\303\234\211\214\345&sj4\374\252\022E.Y\335\372\276&[\36468oV\034`\347\350\356'\322\264\227'd-\243\023\341\347H\260\304vPcL\314\303\213X\361^\3431\027\312\366p\262|/\304\266Zg\246\234>\3473\3176\332\333\3476""\347N\252m\006\301\322\316L\214\210\236\333\204\322On\306\236\253U*\0108Q\2540\332\325\214\\n\221\207\332\037?/\311\363\201\361\216\037/\334\337,\3372\233\330A@\237\350\017\r\020Q?\335\211\240\352\007\250\017\205\002\376\340\217\306\177\312\317\310\376v\317\313-Pc\031/\345\312\3468\261\213\006\037\236\r\332\206\237\345\203P\027<\240\310\247\267\371\374\277\232\251\221\010I\006I\022\337\315]\260/S\250\205\371a?a\325c\273\237;\235\331\006&%pDNH\274@9)\322\267!\033\302\304\352\351\244\306^\004\260\362x\213\323n\231\203\260k\353kN/\275\352\373\236\262\025M\316\224\332\0274\254\203 \255F@\"i\341<+m(.\331\236\332\010\"\333.\234\245\275n\032\315\266U\013\245\013\2134cq\346\021\345\035\315J\260\034\341\313\036\307dn\313\260\300\222\225R\363\270a\255\034\356>0\226\025\242(\321\217H\261\340\241\312\262\246\336\235*E(\213\266\036\224\310\361\346\215oh\261\263Y\2641\254\326\256MF\207\274\265\256\r\221\032\206\224\032MC\307\352\021\323\3468;\034\037\243\326\316\377\343\326ogS\252\3071\321D\025Lt\372\253\253\311q\250\345\025\024Wn6\316\230\263\366\214\005*\213\366\241\013\214L\327\274\356\366\275\323\307\033\270\213pFf5\235h\375\361\271\320\355GW\277\016\331\235l6N\311\250a.\002\334\025\332\246\315\224@Q\025H\206H\232:\035=\006\221\210h\020!\314\331\265P\305\223*\233\356j\340\263|H\034^\342\227sOS{\324\202qm@\211\013b\353\244S3D\302\024.\246\356^\243\373Jtzq\231\344\367o\375\332C\356MJ\234\240\373\244OT\32077.\216\243\202\214\347\344\375I\352\213\375\310\244\202}i+?]F\224\240\210\256\016\023\005\331\014\251.\345rID\376\023i\212\350\030\010.\r'\002\003\270]\2336\2324\211\024@\206\3202B\220\240\211\307\210\023i+\262\035\243\215\202z\273\273\n!\365\303\341\254\010B\360\261f\305\203\1772\274\270P\220\010\277*\250X\312\001N}\346v\034\221\221\350\364\357EM\033\223\214\304\311\014\237V\203\024O\323{=H\017\352+\371\322\212\024\264\013]\241\362\034\024\327\351\002\273LB\343\022\247\201=9\264\350\246*Q|\307;Z\006\203\333k6Ls\22090\036\"*\323>\321\014+B1\002e\010\305\274\"_\233\215\352\226""\250\354\223\2669\302\307\211\277\335\230F\222\013\264\327\017\307\357\357\214\207\030\020!\312\001\360\001=\300\237\200x\376?\310~\377\242\025\005\253A\333\362\376a\310I\206\357I\216\361\036\357B\207\336@\327\356\244w{\251wp\027\203\307\200\260,\345\246\237\326x\010hhP\302\024|>\001 \205\237\037\362t\000\034\324\333\325\371G\007k\025\3235\354r\337'!\372\363\222\375p\244%\031\233\302C0-CQf0jf`\236\345\352\227\270\220fY\204~\226FT\226P\n\374\273\03301\226c\307wgbiQ,\347\351\246rS@i\363\0103\010\314$f\003\335\367L!\206\372\272[\245\031\020cf\000\376?\001.\271\377\312\304V\204W\322\310nb\310\333\233s\305\315Y\315\330CU\250\316k9\"\201\206\033h\205\363R\212f\245\215)\031Ai\r+N\332/\327\377;bF\266\372A\003\3142\017\224\017*\006f\376S\227\"\266\364\372\360*&'\253y\235\231\036\245,HF$b\014Wn\226\365L\206R\277\372\016\237S\271\316\335n\211#\317\330\224|2\027+z\241\003\342ow\304\366\252?%Q\253U\300,\031\223x\274~f\214jw\203\005\260\254\214\256I\017\277\363Jv\236_\225~\212\005\365\376'\301\353\2528\344\037?\314\357\215c#\350\270T\312\212\017\261\225\036\363\206\030c\365\374\024\231\212\217_\367\225\001\224\202U\"\346\266+\263\231\246\211\005D\3737\360|\227KEL\341\352\005\367:\016ZP\272\016\214\240<i#p5\200\332\026\275\033\210I[+N\221\030\374X\353\n\251\234\035Z\275 \366\267p\364\252G;\243R\256\351\256\t\216\3150\327\352\3056\266(\264k\274\245\002\022\371e\306\2640U\301\033\036\302\004\030DA\253\007\007-\030?\027\247\202\302\361\257\361\030K\254\314\235\222\251\204\240\300\301\213\216b*$?\371\253\253\246\3616\234D\002v5\212\031f\270Ym\037\033\277GG\250\320.\320\317\331\224h,GI--\344f\021\3728=Z}{9v\2021\263\032\200\342\007\021{#\371h|<m%\245\324\035`\003;\224jeN\010\315@\200\265\232\307\005CrR\022\t\035\273l\272LWI\234du\300\253\312g\016\343\354\370xy\376\203\273\350\376\375\260\277\246IfC\335r~\352\244\310\255\355,\204\340\375\272\306\376]\236\302\321\341\251\024\315>\350\003\320\266\2107C7\273\034/Pf$\237\307\273o\264aj2%6vJ\330t\270]]\275\r\376\362\022\357 \357\036\355\277&""\313?\323\346\334\360\377\003\037\235\320\322\2430\205#\337\364\002\364\007\240\017B\364H\263\344\377\257\201\007\3514\235>\025\264l\237\251\035S\177\210\216\201\247\016\275\335\323\216c\222\334\307\001\"\236\005D\024J\234\022\220\310c\311j\277g(\331\366\252:\300\027\3363\262Q\3747a]\234I\207`t\353\314\222\022D\326ZDy\337\247A\216\347\224\267\177\313?\265\357\370\354/\360\211\356\377i\364;\3533'\260\336g\335@\373<v\206\230\357\020\307\356F\333\267\275\202\360\027\0328\332\270\031\275\323\324ytx<\273.\374w\250\234O\022\254UED*LQ^\226\366'\327\032\311\251\255o\266\0133\010\265*\270p\244\030\361\2662\t\020i\274\rd\266`\356\000\334\231\032z\301\301\032\220\247\214B\007-,ik\315\226\307\242\245\344c:n\376~V\037\337\362\217J\207=\301\023\376\007\245O\222\235\nu\362T\311\323\345`\335J\232\355\323\267\017\313\331\353\345$$\222v$\262L\340\356\326\265\352q\367\203\362\217\343\017,\027\203\243K\350\264\003F\024\274b\035g\222\362PG\246UD\032\244\003\247}\022/\031r\304 \004h.\026a\205bB1\356g\\\n\306]\032(D\246\262\254\nc\261\3078{\023\372$7\016\227\273\017\177\220\342i\212\243\343GI\361\014\305\317z\203V&\216\004n\300\024p\204sTL\365\343\343\325Wi:\340#\223\300\370v\3601{\2116B\177\203[t\020D\245\347\01018\214T\000\223\250r\3651z9\257\356[|]\240\305\027\001\202\201\210\016\272*\350y|P'\004\203is5\3133K<\231\262\230Q\346\342\205q\264\020\031\341\242\031\266\377\301\307\036\262\3706\037\243\263\320\001`\003\3608#Lq\251M\261\025\220E\220\tG*\000\310\033\360zjo\241\\\302)\374\337\215^t\216\337\267\356\337;=D8sw;SC\271\007f\347&\223\234\356\210{{\201\334Gq\035\313\312|\372\335\263\306\343\266\263\006X$\267\032\002\010\305\217\313\353&\345\241A\232*a\210\014\020[\246\323\r\267\264\205\347\335&\033\225\335\230\200\364\274-V\022\"\3037e\2446\350\356E\202\321\323r\333\366}\207\t\330\375,\271\311|n\367\352\017\230\232\223\003\027\335_\231\351i0\255%\375\022\033a\267\374\214\325\335\027n\024\177\303\354\205]\224\017o\263\342\366\234\035\331\026\023d\361\327\237\336\271\231\237\177B]\223W""\247\227\336_Y\007)\214@\337\271\350\354r\031O[Q\342\373\273\266\225\021\222\031\360zo\342fX\253\r\007U\347z\263\263_\206!\230-Z\311\223\005\326\306WM\2426\223L\342\265]e\034\262'\360\274\255M*\344\270f\332\357\364:0t\344A\337\317\336\261\323\r\205k\350\220G\250\231\367\344\017o\272G\277\213\316\235\031\326\023\237\025\204i\216I\353\255tb1\266%\361\270\321F\276\017\030\007#`\347\271qN^\203\230l\261\270\273\232}R\376&\016aH3\264\350Z/h\324l\326+Q \222\006\357h\362U\017\331\346\036?\007\307\347\257-\0368\323\376\222\211\177yz{\373\003\367\2750\225u\351\311\251\027\222\177N\217S\220\360\273t\253\203\257V\316i\215\233\2765Eq\026}\341\350Kjm\246\377\033\374r{\027\314\245\321]k_\277\257C\256<\372>\263\022\021\206\307\237\333\347\267\211+Z\366,A\022\325\026\243\334\324S\213\016W\220\373E\331\025\351\262\356E\027\030\035\337\010\305T\227yC\337\363\233m\235\354\010\327w0\005\356\377\016\212\202e\251\236=\375\255p\\\021G\014\000\177\256_I\300@\251Z\233\231C\222c\031J\005\223\004\255\361t\270C\251\320\334\366\016\301\267\3173H9\314\373>m\373XOPN\256\335$\360\024\021\267\236\322\210\202\361n\333\230\350\007$\2135$\362\326\002\207\263Y\345\017\036\026\004\034\362\331J\r\350\377\327\361{\017\273\256\206\316{w\236\265VQ\307B\207\242;\275\357f,>\217\264/g\000k\203\337\272\3566;\360\325\216\227\2513\013B^SZ\233E\361\202\202\0222\014\217vgEfw,\323\035\303\r\250x\227\362t\237\372\271\177\243\231\245\372\223\031[Z\336P\370\256\362oyW\225Z\307\273\272w\026\362\242Q\242\365p\357\255A\261\311\325M\342\214\213\215d\352\214DX\365[\335\333oZ\304kZ+YZ7\272W\271WO\217+Z\302Y\245;Fh\3023ODf\246\213\220\033c\tQA{`\210,\354\2064:\026\"\253\267<s\340\362\276\323\0253\347\266\376\263@\336f\365\263\203|R3\232\364\254\326%\2541\344\236i\224\360\262T3\301\347\315Le=a\342<@\007\\G\301\316\314t\0037e\016\227{\274xI\037\263\373x<\215P\357\253\340K\300\036\003\300|%S\341\364\244t.\206@\226\236\344\335R)1\341n \2075\tH\320\222\026\201/7\341\247F|\276mo;\300-\314|5\007\345\221\202\305\244\323\240\217Tn\261""\250\213\\}od\",\350a\200y\247o\217\1772Fd\265?\016\007\316\306n\224rLph\237VT\\E\337M|9\305\2343\337\232\202[\006\350\007\203U0\311\0351\207\030\355\014\3402]\342\"<L\266P\271:\300\237\210\345\376\211\325H\232n\247P\333\333\367\361\312\200\245!\030\243'?\026\001\204\233$\022\314z\021\t\024\274&g\006\272\3306\207\365\253\246\237\243m\263\374_\237\255\372a\256\247i\334\311\336\032W\277T6\232\311F\207\r\252j\"D`_\357~\367\206\ta2\020\006f\266\345l-\210\363%5\020p\026\201K\241\324\261\022<\021\325\030N,5\032GPq\262\374\177\301\375\377\024\206\212\306\341\032(h\001\270\236\202\340#\221ct\300\354\351\016s\372\335DG\262\212\246Z\000_K\000\034E\254?\256Jz&\356\0208\323\241\304\272\343\322\220\273\335UE\234\365\266/\260\223v\251`\326+t\207\240`\242\3148\317k8\"\362\030\252\000\276Z\025\036\2019\261\353\255\255\246\201\225\207A\245\252X/\007\241~L\270\341U\222BAD\320\007\354\034vv-w\364\345\216\333\223C\343&\246\014\214\323\313!hB\333P\241e\201`\334\224\201!\270\324\003i\207\030b\026\342\360\262\243u\211J\033<\373\017I\354x\320r0\362v\027\250\273\266\234\307\177\221\202\037\207\315\224\2200\021 \335\253\320\335\251\316\275\244j\031y\202\t\205{\3403\224T\206\305\003\333R\007\036G;\\\243\373\036\037n\332\235\340\236\375\353\300\234\211\303\327\270\330\306\343j\345h2\307\231\345\271\363>\376\256\300\374x\016\326jDR\021\320\335V\362C\362\235\272t\244cs(~ii\216\005cG\010\253\227K\207\351\006<\265{\367\323\222\223\266\261y\331,\017\201\253\301+\013--\231\346\t'\362\255JB\203\333\337m,\034\237d?\244\020\002\020\2067\263f\320\36693\301\355\223R,\304\223\"`s2\2118\311\023\262SB\213\376\304\207\377\006\317H_\207\2125\336/W\202r\335\347h\321n\3569\232\017u~\311\276\226\203I\247&#JE\260\201\354\303\211Q\246\020.\333\r\257\r\265&\253@92\305*_i\356\023\003\216L\235\330\246\210\024\350\014\225\346\2720aa\006\003n\203hb\333W0+\323S\360\223\245z\211\245M\354\345Z]@f\3066\307\350\020x\024\3239!\227\352vA\324\376#Dn}<\307\346\354^\016\334uC\3504\350\207!\014>e\005@`@\214d\021\367\2301)\274""\004;i5\234M\271\335\307\257\350z3\365<h\336twm\251.q0\304Yn\242\234:Z\200\230\300;\030\367c\205\260\314\355\251kP\203\245\020\266\234\240\204\014H\205\376\200\267\221\354\303\230\207\312\023\005<b\241\023\2230\330\325\260\360U \333d\263\2060\231%h\321eJ5(\243Mib\214\345\2720\327\222\336;_\360F\361\222\t\260\212\262\010/Q\322r?\262\223\302\301;\005r\212\350@\373\037\244o\311.98\251cT\212 p\321d\264\2001\322\266\352\n\324a\324\315V\236,)\323\234\346\204\333\0241*6\263#x\270\205i7\241$CF\313\364\006i\311i\245\3204U\342\003:E\253t\223\2733Z\252\025\311\323J6\344D\316[/\375~.Q\036 ;}\343\331\343<\275\357'w\311\367\264\002\020\362w\317Qh\365\371o\207\350B\001#\276\037\002t\222\255|\377\374\324\010\004i\010g\342\327\372\023q\263\002\n\020 \245\2051\245\201\210\n\220\200E\242U\000\037\226Pt$BP@\010 \020@\032\244\022\220\006\217Y>c\347<J0\"{\031\016}#\246\006A\373\374/\363\260?\371xz\221\031[l\020;\213\276uO\027C\220\343\356\222C\365\324\224J\225\365\343\207\327\372\323E\313\261q\r?!Y\2334\277\332m8\277c\226PLL\010\177\tj7SI\250\376\340\020\336Y\244r\201\261\240\242\225]$\363\261<\233\367\305L\022\n9w\300\352\245\370\272\274'#\273#\252\377\254\353\273u\376\317\226\007G\3458W\312@\237\264\277!\364M:\371E\350\316|\t\327\342\315\267\254\232m\262cse\017\351\227\331\336\245\333\007'\334\316x\375W\273f\310\212\217\232\270u\335\332ph\276\221W\304\363Gn\036\0107RL~\267\360\025mm\3766}~\277Wr\352\272 \364j(vS\021\016I\333\036fA\363-\307z\233w\377?y\214OI\341\356\247,\243R$\267\010\366\20228\362Fr\266E\307\263\217[\257\340\343\216\274B\034p\361?\306p\322\324\221\005\252&\333j?\336I\3122\267`\354\202\223\207O>\246\234\027\254\222\215e\212\247\360\"6\374\2326G\255\344\263\216o\005\305\034\306T\\-*\361[\251\201\377\214!\332\311p\330\311\222^\364)\226\342x\204\333\327gwI\375QL\245\207\250rs\033\251\243=\340\271c\236\375\267\255\372\327\233\214i\2518\026~\311\031\036\276c\267\223\357/\313E&R\301\347TGo\031c\276\365s\331\210Cq\3127\310G2TR\322\347\274\266\363Fo\263\035\212\233\361\214k'K""\013XD\235\305\007\252\206\243\264\342\303\373/\335f?ZyB\231\235_\201\347\236\rdQ\273oWhlw\031i\235\354\355\320\264\326\250\t\211lg\006\307\251\244\351t\327#\364'\214\377j\347\263\263\275\260dU\322M\330\316\350z{\305G.\017\351\2765\324\220B\317\271\007^:e\333\256\272\330\363\r\326\246M\377\250\352\r\003(\222\205\344\202\310Y\t\240{\032\003L\344\241d)\034\0148br\235\223\324v\210\364\204\020~\352\037|J\003\372L}\317\300a\202;\n\251X\225\201\210\220\224\220\"B\"%I\"\022*\200\206b!\241\210\202\010e\210\204\211\026\251\211H$h\n\030\206\t\243\366\036eZ\355\342\250\344 \277\224\r\217\203\320S:%U\244m,xB\350%\"\340\277\022\205\325\251\355C6\246\022\320\222\027\200\034\024\374\007|\331\211\237f\262\001\200\255\350\357\323\0006\200\220\270f@\315\315\250`$+>\257\0071\325\300\003\2277\240\205\252\354E\246nB\304[\214\030\\\304\305\243\007w\313\331\306\201xT\314\007.\363\271\260\r\264H\001q\006\241P\030\232\300\262O`;\005\317i\264\233m\255\357\216\024'Ud\024\035\246G\311\376<\307\347\335Ui\253_WZ\016\275\232k'&\220\355\315\351\265\025UQ=\237\035g\314o\277\210\272=\025\361\"+4\303L\\\274\261\033\351\214\363f}l\321\356\231\034\324!Ct\227wj]=@\330\241\266\211\334\321\271\207w\247gm\245\267i[z\271bNy\251ip\225\020\356\357\324\315T;\265T\325QUUU\tW\2506\035^\031\206zZ1\353{<\022qx\263\026\232\207\322hCH\322\001C\003\0033\030\210O\354\377\021\261:\363\235\242\002\367U\333\364\267\324\337h\210\037\242\010%p\314\300\357\3214\310I$\255z\324\332\271mW6\305\364\345\203| Q9\361\246\3417\320\272\030\340Wa\327\013\271\323\240S\264\362\235C\322IxBBZek\026\243\246\213\371\002=W\256=3Kp\037\204~\303\222\032-'\326\237U\013\244\245\322\207\341\322\004\221\006\323\3427\227\316\243;2jJ\333\205\204!\245\242\364\324\026\274mX\346\327\200\301\261Ma\261\276\255\372P\356{\002 cl,P\314\305\310\311'\213\0078\256\355j\201\255U\333\330\033n\235(h\212\20030\211\265k\\T\0211\311\302\303X\333s\033\201\352\006\343\033xH\3067\354|q\037IK3\321;\202K\021\346'\274\021\022\211\013\320\000w\006\267f\006\360\206d\267""\346\271 ;\0149\247#M\221\327\262\256\234\233\342\315\327\235!\276\233\016+sV\324\226\370{I!T\201\353U_<\355\210=\335\332\217<I:Z\257y\340$wKG\227S\324;\215\330\266\257p\236\177O\217%\207\217#\2367\324%'\243\220)\032\0063\223\277sYLW\243\221\350\332\007\016\256rO\202\335\256\013U\357\331\t3\265\2537\365d\026\t\211\225\341\313PY\036\005\326EI\005\356\373\037N\352\272\372\267U\275\304V\006e\024o{G\314\033\017P\266\306\300\204{\320\001K\344\310\333\030\335\034rxEh\307\244\333gfj\366\rH\275\226\246]9b\263\242\234,\027)\315\017\307F\272\264\222\r\370A\"g\035ij\3011\244\320\355\307\320\250\207\300\333\233\305\246\216\315\376\223\313[v\343+\332oo/8\262\203\344\264\232\247-10\352\322\217.\326v\362ww\3405\321\247\363\243\240\337\234C\roi\322\322( <\254\1777`\212<j\376\361u\261\036a@\366\204\236\006C?t\220\027\324\361T\252\335\322L\025is\341:#l\243\3370\247\326{\211{\202_\027w\220\360s\240\373\027\177\305\336\214h=\310\"qL\377\303'\354\355)\375\312\374\226\336G\210>\265\201\030%\343>\377\204\332G8\007hF}\007\270\3627\02267\007Dm\253~s\031\211|\241\364z!\367\352w\265\347xm\265G\335\246Bc_\013\352\232\253\346\371\217|G\200\016\235\247\254\357@o\376\305$X\232R\224\001z\010\t3\036Ot\371\374\265\325S\013\336\207\310{\357A\376Y+\2651\377t\036&\377\333\376\251\230?\225B\235K\362\262K\273\2523\375L\306\017\350\177\342\013\362\007\227y\377I\305\373R/\235&\322=H(\210S\257\222\024\031'2d6\311\357g?\001\324\207\351\3105\320\233\000Ci6\356Y\331\314\225\034\3140\302J\002\206`\231\373 \271q\323\362\323l8\336\376\252\217i\214\002k\020Bu1\351AV\334\014[k\000\030/\322\306\314T\002#\335\355\357F\263\3643\224s_\272\264\271UvDy\035\350\3551\221\205v\016\017\274\337\272\026\016Q\223\256\tReJ.[\311E\303e(\204\237\311\227~\242\277\203\301\304q{\235n\2446\276\271\243\326\252\210}\177\314\217\307<\224\337ob\277\025\013\264\312\272\277\017\250\216\245\t\215\2477\210\216\343q\205'\034\005\266\334\203\0032\033\220\370\230\364\372T<\254?N\322]+`\351\206\017\205\nJ\367`zZ\263~\"\334\273?\224*\r\362Nc\353rr""\025\274g\213\306\234*\265p\306\2469L?\022=\203\310\234\301\346\201\315?\021\277\024\222,\344\375`\226\350\022\212\"\021$\010\027\217\223\254.\365vVg\346\010g\231\361*H`ti0\205\000\272\306\tVh'\023\314KZ\314\214\242T\304\213\365&\305\345\212=}C_T\013\372\350\rk\247i\006\321\030\242\305*\"P)\355\275{\336\234Lle\315\2478\266\225\343\024\311\326>\366\37234\035Hem\257\235\321\354v\264\014\032h\251\375\300 A?\307\032\374$\331\341C\310b\365\273W\342\207j\365\341\030\352\340x\261\021\254\316E\222J\3276)\213O3\314\007l`\313\235&\236\301\010\355F\272\327\020\342\027\266j:]\304\262|\303G\367\311\374\220\320\303\346\331\375\231\335\3602\t\246\337\311\357\\\032\014\314U\006?\271\377\014\235?\247\220\356\375\337\333\204i\037\205\377~\376\363_\317-x\367uIq\237\271\221\233z\334\rl\210\"@\222\212@\246\004v\016\367G7\257\323\354\227\212^\003\252xa\200\367\313\350K\000/U\353\351\350\347\253r6\r\232f\353\230\r\272\335\313u\2523\3254\311\356v\3762w{\322\341\351\335\341\3366W\017y\221Z\324\351\313\"\242\323\304\032\324\321\244RlX\3125\246\205,,\036\246\036\t\207q\307BV\215\027\235\030\330\362,x\365u\253\213w)\003N\014ly*\034\335\330U<c\300\222I\204\206\231\263\010\226\264*w\222\305\242\247S\020\201\334\201D,\264\325\220\251\234&\021e\017\005\\M[,\233\211OBXJ\272\n\232*\332\2219U\r4\205\217v\366(kg\np\347\021b\301\275\214\326Mr\346\367\373\302\372\207\333\004\303\271#\304t\201\365\374\\\017\212\277\020\377n0\236'\357S XXU\030\217\277\345\362'\324\333\365\343>\347 y\210\032?d\030\331\230\240\031\375}\232f\246\3730\343\000\311\rL\251\342\355HG\200\031\330\353_\347\310\360\346\273.\324\321a\241&\240\232\021\355N\355Nr\225\250g\020gB\014\352d\032\210\270\257r\245`\244:\347\030\022\360\211j\215\022\006\310C@$D\200\373\301\350\327]\007\350\014{\272d\216\250\020\262\220P\2220$%\032\231\256M\210\034\241\016\334(\353\307\256\254\216$\0272\231\250~E\205\326\334\010B\260\356\215\nj\2531$\307\022\014J\022B\021\200\321\022\210B\014r\365\327{\"] \217\340C\217ZE.jG\003\302(#M\010#c\016\220\232E'p\273""\n$\326U\njg\323[\256\204\037(\024\351\242\345a\312\031C\321U\263~9\337\r\224\336\005\224\227\252oB\350M.\310\030u\026\244m\020\177\247\344\266,\243\362\203Z\241:\353\3213\233\216&b\271\234l\243\210.\271\0042\207\334TL\335\366;\315%\324A\310\221\310\221\326K\223\267\362w\323\366\373}\327\367\367\373\232\307 ]\333\235\017\350OQ\316\034\350\301\362\322\024\034\274\253\263jE\246L\310i\221\327nQ\271\r\021\201\031\372r\342y\307h4_nq\246\354+?\r\233\224\334\201\370L\003\3572E! tn\243\326HA\271\270\376>\204?\223\247%\031\032\020\357*w\217\224\251\217\342\265\235`~\320\237\234\237\232\000\320AJ\016,\365\2005.\304\355\216\236\314\343\205N\220\031\237\177Z\255fQ\231\225\204M_\343\373\277\267\226\227|\031w\236\177\271\332}\330/\037*f\333\024\032I\2613\307\"\323n\376\307\223\351\230\356\355_#]/\274\365#\\]\235\353j+tv\303\2707<L\371^a\231\024A\334\356\203s\245\016\310\006\362\003\262\204vE\331\003\346<\302\362\215\372\372\334\320\3474.\241\3559x\243\312\227/\272O\331\310\177\010\376'\360\212\032\222E\n ~\001\024\007\360\024\217\360\343X\322\260\215\207\347\211\363\021\0217B\241Q\255uL\257o\256\336\217\244\366\3757\372r\307^y\345g+^\325\303\243\202\234\005>.\347\365\221\341\024C\332\010E$\210Ozj\374{?H@\245i\257La\033^O!\262\324\t7\2513\372z/q\347\005\3121\r\302gU\217\375\261\267\246\253\310k\207`q-\247\033\031\317\331=\313\340\272d\243=\325\005\"\242;e7\366\364\347\254\267at\303\242!\366\217\311b\257\333\225\363\360-\0020\036\230\214\344\330\370\333\306\330\306\361\264\313\254\010]`\027Y \353 :\310^5\232~\277O\341 u:\273\220\362\035q\211\375;qZ\253\212\311\275\247\227\260\001\330K\336Z\2105\023\355\356+\027W\253\325!\013\216\233\254\013\022'\016.\007\\]hm<u8\372\264]\242y\247\223\274\210M*-\354\\\274\215Q\007\035\376\367e(\375\350\013\"!d\n\244m\235\355\367\360\2120\212\220\233\235\263\204\317\022\220\234\241\274\235\\8\364\232i\241\221\214m\022\367\246\264\266\036\344\321s\3144\3171\006\2166\352[\300\316\300\364\r\377@-u0\253u\256(\236Pj\245)\347z&~\252\352\335\202`\274\311""\363\202\014\340.\024\216\021\034)H\355\374\272\236\275\353\317\254oD\363\033\246\351\272]82\234\310,+43>\350n\203\210Z\006\334\030\034\226\266\304u\345\267#f\324\315\031\3434w',\346\n\312\266-YCD\323T\365\301\367\344\014c\025?\033\377$pk\327l\257\372\024O\020D\177\200\237\327\205\021\030\020\320\243\213\001\227\177\217f\267\007U\343\303{\027\244\256fd\331\231\004fea\023W\374_\223\362e\247\362\301Q<\363\371\rf\214\274zf\302m\2336\337\213\327\\\202\350{\234s\277^\230\216\026\352\277\270\230K\022\025\016\300\310=\305\356HD\206\263a\002\254\020\354\237P\247\210\007\324\257\324'\032\025\035\236\020s\344g]\266\016\245\2568\256\243y\267\016C\267\333\232=au\213\325\254\373\031\301;6\273\307_\217biim$&\236h\321\265L\364P\355<\364q\361.\\\345+e\014\250\266\364\330\246\343\241\375Q\336\252\331\013\276(\242c[\253S\261\373\013\232.9\215\013\\\277\034\214\266\203\200\r\260A\266\222\r\264\0061m\245N\220d\035\215\265\352\3472ww\t\256\307]\032\353\233%\341\273 q\232i\245\366\"i\360\234\232\354E\225\023\274\005\306\217\024!9\t\010B1!#\0035\217fF\334\353\317r\217\037\033\355\312\276\214=\031C\301SZ\253J\240\375\337\325\374~\033\276\373\306\366\374w\357S}\335\256\021\026\375\353\275\343\276\343\226\357\014\274f\3515\346y\037\253!\326$\341\365\214\314\302H8\3304\330\345+\204\006l>\346\374\360z\354\360\312\\\001\244\021\300#\201\013\201\037\027w\220\364\364\374G\t\342\371\035qs\034\013\2623\327\327\320\336\010\362\034\202\307\01779F\340\375\250\033\373Z\373\346\315\022yo\234\034?\261t(\\\0303\177\324&\033\216n\3673\032\345rj\027\025wDrE@\363'x\264Za\241\030S4&\221.+\010\020C^\000\334A\270#p[\206\256\337sm\220z\374\376\367\177\273\271\267W.\346\366\340n\035\313\324\367\021\361/s\254\377L\0102\374\214;\036\310\272G\3621\004i\037\361|\3770b\350\203I\014g\016\330\254\225\271\024\377\216.\234\177\327\316\360{a\304\253\263\220\277AX!3p\364\212E\243!\375\370G0h\376\347j\233Ea2\273WM\266*\317\347\212\235s\034,\266\264\375\035\317#\377\021\214\313\217j\221(\240\244\203\007#o\276\271\004?\227""\241\3343V2\014\301\351\034\267\236\352\027^\223D'L3 \247\227\204\023\244\024<\246p?\317\203\215\177&?\251\345\222\256\373\333;\207Xy\204\027I&\326\321\321P\227U\016\035b \337\230\375\032U\340\003\264\261\036B\017\"\023\310\334T'd\320&z\363\303V\nu%\364\366\0026\242\247B\301vg;\220s=\022\355\355\241*\361DCK\305\344\2140q\016`\206%\001\242;\210\361\004\363\322\312\232\307\006f\360\025\031\237\323bO\366\276\027\357\203\375\271U6\027\2578\231]\271\317\031\313\271B2\3314\2435\251\224\315\341\013N1\352\n\322(4:\027\205\2559\245\342J\0069\237C\350\207\263A\260\330\030\256\243Q\022\322R\003\356z\200P'e\342\227\001\ne@d\206\373\275\355dw:\237\350\360\307_\373\214\026\306\254\227\360\377^\330v\260\r\375\200\265\025\241\303\024\010A\002\203\000\310A\214\257\337\017\255\001\333a8\310v\022*1\006\014\350j\320\241}#\306\301\343(@\350\2038\010\347I\013\234H\347\0229\320t\372\3473|\335\236o\2208\217/\313t\355\261\002]\244v\226\355\006\223Uj\254I,H1 \304\261\n\213G;\253\370\037l\213\303\275z\362,\257\335\314\034\342\323\310\01075\221\373\361\377.\304\214\254:L\354{'\357\271t\264\247\333L\242\220\220\361\006?<\254O\322T\242?\354\207w\376\032\213p\346\037\303\375\031\270\223qJxIZZ\"\td\220\306P\202\035\014\230\006\031\201\230W\375\302\313}\264\346\342Y\3039\266\037\331\300_\335\362\007\237\342\372O^\376.\315U\036:a\276o\371\314\030\027\370\362Y\252l~\261\240\200[lfm\014\206\375\024\227\377K\\C\\*b  Z*\232\020\230\247\361\326>\274\212\221\037\345\007\217\303\376:\313\307\214M}\230\203\373\202-\350q\321|6\251\270@\266\337\203\300\355\333\247\211I\313\031\336\264\002->f\032\371\265X\306\326\035w\310\224d\222\223\211\"6\342\240\312@,X\220s\213xGk\273\335\372{\233=\375\251\270:\273\254N\373\206\346\301\316\214\336{\237\255\371\241\007\201\227\336\0365\251\311\210{\031\324\212\031\301\007\244x\305\341C\316\343\2653\373\204\2443M\354\220\2007\2247\035\230\333f\247s\177\202[M;65\207\260\264\316\362\331\341\236\006s91\257\274\272~zQ\003\304\210\242\006\350\010\004r2H\022|F<Xn\342\340\221\"|/""\233R\027\252\337\005\214\266!\n\207\306\277y`\241h \251(\242!D\230\010\246\021\241\240\241h\n(\002&BVe\002UdPhH\230\224(\032\nQb\001\212\201\010\245\022*@\224\251\250\231\240\242\202\241\002\250\006\221\221X$\242\204\211\n\001\210\010\251@\241\026\225 \031\200d\003\t2\003\301eV?\207\246\222\351\213\246\216\232\356\034\033'\001\331-\361\375\221n\032\315\275C\037\241]\t%u]WM\223\266w90\333)I\363\361\206\206l_\320/\016^\372\316\366l\256\374\205\2215\267\035\351|\374\266\376v\373=Jp\377OA& 00\317}\210\3007\237\367\177\244\017`}\337#~u\375\0363\377\305\207\341\310\002\214\276\220\377\023\371\3772H\330\274Z\376\3621\3751\220G\037\205\200\306\256\215\356j\036\206\227bd\237c\322\341B\213\223\262<0;\303\313\367>\254\307\365\330\360\376S\177\307\275\214\036\363MPm\\H\350\352h{\376\364G\370?\257\253[\026\360\301\tn\177\204\342\277\300\307>\213\341\357\345\344DG\010Hy~\035\275\236]zoa\316\253\246eE\024\323\243\310\341\232}z@\311\024\361\236Q\025\242\014=\006\263\016\322\245HwY\344\377\241\261\264\333lz\371\235\363\262'\365\033~m\032\351?\231\317\251\305\376fv|s:3\032\306\320\333<g\221\343\031\020\240vdn\352\321\263\317^\355>\276\325\245\332\242\275B;#\374(\224v@s\310;Z\201}\364wS\303\362\273-\255\"{8B\304$\343p.\316\377\313)n\024\361\332\275\377~~\344B\316p\355\034\006^j\363'\252\323\275\373.\030\355\302\356K\365\327Uwn\332\275\010^\273j\275E\231\215F\365\260\214\341\021\234\035\204\r\254\234\007k\314\221E\333\361\216K\032\206'\231\3441L\223\371<c1\344c\356\317\305r\330[\225\267'\370?\325\014\376\\B\374\010K\020\001\264$p\220\342)\230\217\333\362\374\363\266~\256\315\253\375\367V\232\252\325\262\314\255\270QJ\331v\216\2266B\361\236\006\213\342\006\032\273\2070\325x\322\255\013\234\226n\315b\233.7q\332\021\243\031\266\r\243LYa\230\370\253\036H\365,8\2752g\034\032\037\017kU\244\341\\\232\344\250\315\020#UU:(V\300\2135r\305\246a%\267\036\035\364!\334M\021i$\230\336\352\030\322\267\007F\335\265\014\351e(\n\020\332\227L[\263\026\322$\226\016\246\356\264\260\302\024\324\304fLDf&V""\346\240'F\364\034\303\014\331\253\316\r\024\346[\037\007%@i\230\312\320\206\270\206\2008\204u\002\034B\322\026a\301\017$\273/t_\224\270s\335\310\037\346\333\315\375\375\254\361\211\267\030\353rk\267\004%\233`\020\022d\0003\376o.\215#\364{.!\204gX\352\t\241\353\360\316\022\251\351\206\376F\030fe8\301cL~:\351\3534\216A\352\353PY\031\236\020\002\211@\203\271\362\235NN\026fffffg\244\030\013\375N\226\320n\210\334\026\3527\r\335\236\025\370\307\340\377^\372<l\313\270s\3408C\273\322?\325\010}\317\351\254$O\225\221>\252\010\244\222\342\343\221\013\267=\305\265Gs\301=\224\2173l\220\303\275-\351\276\210U,\024\270\212\273i\212\304\315\"\177H.\242B\273q\376\211\231\034\312\367\322\351\022\021\236\372hVTM|S\337\303\036\214\267\261\335\350\214&o\013A\235\26177%0\235\271ZM;s5,\035\211\336\206\265\007\272\327\244\345\215\246U?1\276z\377\007\203C\033iE\273\372'\251\263\027\360\327:\242\313\354\260d\006\212*b#\337\347ZA\354\036\354\327\030x{\272\360&\340\3431H\200\244\n\020h\006R\210{\273?Q\177P_\324\000\345H\345A\312\271W\325\365vo|\360\374\235\276\370^\366\267\003\177F\370\333\247\321[r\362\255\000\307;\2077s\007W\037{G\353|\247\344\017\227\344=\254G\313`\304\020\tD\275?W\000\324\021\035\305\366a5>\224z\304\322\177\213\024\301\326&\314\230M\3058\307V\203\217\206x.\267T\221\022\247\345\256\221\335\344\323?\\D\322\016I\347\232\213\340\236\326\363#\352\25233\t\314\310\314\314$\357E\016\t\031\001o\247:\314\262\205\024v\305\357\273\362\377\264\260\336?F\372#\221\320\036\343\036\3503\035XUe\023\256\301\374\257\337\267\031*g\241\236\344Z\364y\001r!.A#\221.@9\000\342\360\375>M\377\315\330\353\374\356'\362\005\263W\304p\373\031\270\275\236 \3647\314m<\336}\302\004 R\036\310\036\343z\t\273!\362\335\351Me\266b\353|u\036\366\367U\216\253\037-vt\270\304\274\334\235Q.\274\323\"q\216\357\235\312g\221_ \0002\020\013\270v:\355\347r\364\031\352tB\345\220(M\337a\375\243I\231v\243\267\351\0074D\2269V\356:y\022Q\374#\007d\005\322B\354\210;\"\354\243\262\277W\321k\373;(l\260++\227\240R\363{@\352%\371""\275\337\307\330\036\351\354D\367\363\371\221\202\037\312\277\236\252\206\007\347\260F.P?\365\376C\256\314\003:B\242\310z'\263#\356?\217\323\356\365\300\372&\311%\344\327\367E\001\223\265\360 w\034\3736\271h\307r\333b+\033n\260U\273\020\354\025A\343\037:\025\325R\337Sp;W\253\033\344fy\245)\021\261\240\324xizSsF\325\315\265\337l;\376\347\364;\306@\363\001_\333z\0167\376\337i\254\353&\337\t\0079\032\225\330\"\025\375\333\373\203\330/\261C\334\201\356Op\373\217i\333\373\277o\335\375\256\227\273a?\304\332|\007`\366\370\003\310\237\374\336F\207\037\334\316,\333\250,\316\204gH.\244\263\206p3\202\316\262l\257\260=Y\363*;\212\331\354:G\333\322\367\263\271\321\225\256f\340\323\274.O\221j\260\036\336\240\t+\274C\2738k\210\327\003]\013\\YE\256\265\317\341\365\266\256\235\375]$:;\335\363\336\016\346\300\313\342\r\203\215\226\330l\220SP\314\314\314\313\340\365m\367w9\375\373+f\301\366\356\207&?VDL\201N{\2465G`\335\001\330\031\301\201\307\006\\0\300\212\010\262\"\202#\000\263\016\306\313Y\377\203\233L\355\236#\n\037u\307\301\006\032^N\"\373\036\217a\257\277\205?\013\033\376\372d\275\313\203\365\276/\302\373?\201\351j\r+1\307\206F \262\344\305\2223\264\031\331\250\374SQ\370\302L\027.\335\230\016HkZ\275\202\023\264c\030\037\256\371\211\216D\271\020\271\027\"\\\234\201\310\035\004\334\353'U\337\263\214^&0\227\363Blq5o\212\304\213\350/\212\362/\0319{\276\337\374v\253\271\343\342\340\275\263\245b6\006\270y\246\331\372[3l\347\344\256\302\261^\014\346|\346\322\321\243T\362\036\316\212M\264h\334fo^\225B2\203\207<9\242\216\240\224%\330;\214\350\217\311\247\313\354\362\224\254?6\316\222\006\261\006\343\252F\035\237T$\356P\016\302\243\342 \336\346\357{\2427\263z\327\372\316\177{\217\304\337\350\237\340 \036zBBG)\220\222\2043\2109\361\336\001#\345M\343\272|\021\033t\220#\313\210 4\222g\216\3345\243\030\351UF\261\302\232\212\334v\233\312\256\333\315v\265\rS\02331\006\255\325d\374-\365\360\t \332B\340\340\027\000\270\020v\365n\356\266\247\247\324\026\3065\230\371\330\202\206\367\243\363\276-)d""\0033%\252\321r=,\365\303L\345\343MI\255\360\206\001\317\037.\370\374\233\374~o\"\"\252\252\252\252\252\251$\222I$\364?\264\371\303G\343\307\241\341\273\013\033,m\257\315k\376\375L\354!\010\036?\036\336\335z?\240\363\304\357da\217\235I_\342\241\232?\323\373\313EI\341\273\267^+\257\271+3;*\3405\204\322\r\3607\320o\233\375 \362\300;H\327\3555\274g`N\303\226;\033\231:7\244\312\032\234\252$P\333gd>\nf\036`\035\224\3032\251*Y\023OZ\365\0219V\366\036\221xd\305\321&\232\266:KV\001\262\353Xm\275\255\215\272\343{\307\267\271OJ\247\257\225\310\265,q`\003\332^\300\020`\303\356\272HfB\r\221\217\344\2077\212}\002\373\322\224\204\262\024\007w\321\305\017\205B\324\351\372\371ir3V\332\251\367\316=\326\354\316\244\0034\360P\360\026\200\325\034\276\372\034@\216\025\304\177\037<\026|}-#\256\022\035h?\022\007\265\352\343\354\221S\236\343\t\017\360\344\326\334-\376\"\345\301\"\177\\.!\013Fe\232\267r\307\206\257\004\362\330\225\303^\003OM \327\323\\c\034s\364\352\225\266\206\357\330\230k\236\2614\316\234\237fB9?]\340CT6\022\346[G2\257\231\253a\272\037\243W\267\2708\265o\3750\347H^\306\362$\333\333\240z\374?\267\210j\335q^\342R\t\305\000n<B\324{\221Opl\367\342O3\033\273=\375\320H\214\3006\345\255\256\350\022\203%&\036\244\013\274\220A0\242Z\010 \035\200\031\202\271\206\261\237\360\3360\245\037\366o\243\245\272o\014\376\230\027\326\263{\330~\335\207\006e\307\335\345\001\330\213\261W\225\027\200y\006\3773)\374\ni\"\3424h\226\226)\250\372\312\210r\315I\223\251\241 \221\352\325\244\252\242h\212LM;I\016\251=T\331\274\0131lB@\211\035\236b\362\"K>$\324\214\301\334\307\264\020D8\215\247\033Px\251\261\311\253F\343\024\345\305\256!\254Z\341\355\233\312\307\246\026\352\345\226\014\332Q\225\223\032t\214\347wq\215\352P\322\016\026a\021\r\262\023f\362f\316Mg\021<p\221\306[+,\324\233\247:\274\356\355\306\031MICz\347e\314\034\256Ey\211\024+XD\241<\242Z\234R\266,ey\006\0315\212\344yv\232\003<\230\235\246!\306\260\372|\330\272{\341\307\360\246\352!\0206\272}\316h\255\n\212\251P\212\037ckek\336Khc\352\025D[""o\321\274\301\266\314\354\355\275\007\203A\323\273\241\306\212\212\326e\256\356\303\270\374Z\303E\243\022J\026\2110\262\000fC\014\005\246\016\026\000=\026#\236\345l\313\222k\224M\316\375\306\260J\334\320\2002\"\035\376\362\016\026\324\243\262\341R\247{\364\333z\217\0147\237SR\307\221\272\344\366\257\333\352a\232\355H\033\225\007\226\237)vtZ\302\017@D\026K\330/EFwBH\004E\200\000t\351\257t\313J\306\335\244\313\177\337\037j\037}}\243\355N\231\305\3070M\203\367\033_\366\226/\215\257\374:P\217\027\0033\241\034h\336\341\342\362j/\317O\365A\002\224#\216\2574C\334Pc\315\326A\325\370\266\337\215\272w[\256\306\357\325\323~\007u\357\365>\313P\373\241\025\375\2130\273\274\235\367:\367?\354\255k7\021\2767\326\241k\366\216\356s\266\355m\314~\261\256?\323\333\257=j|Dg\236\033\216[35\227|vw\357\334\353\313\346\313\316\272\337h\216\335\270\361\356~(S$#\351\371\377x\275\333Nr-l\021L\023\367\376\001\371\366\236~\230\327\022\363\336\3051\214Y\233\354i\254\226(\273E\236\016c\265\230\225]\273\322\251\007Ld\n\375\222\224\3542$\345\014\367\0005\300Ni\302\027\346\"\323\010\0172<\301\031\\\232\rA\243\216s\360\020\251:\2372\260\367\327\273\255\233\326m\251\021\2627\2674j\365\242\302\336tD\232[\215\233\315\355\251\021\262\n$;\216\224\236\360\337ss\357\2037\357\002\207\017\034\224%\302\251\345\316z#/Z\252\303\"k\356x\330\230\233:\236\222\232\246\262\205\250\255<\246\241\254+h4\236m\203\020\307p;(]\220\027qw\016\347q/\027w\231x\203\017\326\336\234>\323\231\007/\217\310\014xO\202J)1\241\034\362\355\316\022\351<Ha\361<g\267\375\334\036\036`}r\002\261'\240\244`\324P\2055\002)\357\211 &\233\275p\366u\372\275R\323\327j\370\312\233\024\333\215\254^\251\025\332\270\225v}\207\334\343\333\017\335q\351\237i\366x\370z\360\234\337\323<\373,\236>]?k\365O,@\216\320>7\332\337\233$\207\206\363\033\222C-\315\026\364\357\265\274\240\255\360\212#\022\223\302)\244\334'Y'\002-\376\335\026\274C\213\006XG\333\334\274\232\255\014\366\260\010\030\242\t$m\202pi\221Y\006\004\026D`E\230\345\211\376\231\311\324S\014\030""\320\330\240C\005+\032,#Q\356\357\307\247NO[\306\246\260u\267Sl\347\266\232\031z\343W=L[\207V:\370?\263\013\000k\010\241\372S\354\204\030\376\222\304\204b\323!\205%=\270\374\276^^\t\362\275\367\341\200a\321~\354R1\363\247\310P\335\003\023U R\033,\244\310\240\275\316\370\247J\335\333\266F\305.\325\333\034d\211:\321ErX\3540\033\206\346\346\033\206\244S\016U\034\256W=\235\245J\231s\025Z\376\357<\366\276\037P\273%\333\256\246*:fyt\351\207\312b%I<q\327Q\021\024f\213\270\327\"\332\034P\311\322\267\373\332+\204\357\307\034Q\302\3639O\336y\205Iu\337\277k\276y\311/?\275\377\317\365u\257/(\217\330\316\243\276\352\232i\247\237\245\273E\025\365\035\376\016?\216\334\322\232\325\252-\302\030\227x\021\336\001w\222Gy#\274\035\341.\362\357\223\316\211\347\230\277\210-\245\341\307\337\355\243\323\335:\201\330\325\336\336\200\316\316\316\316\316\336\275T+\223\233\345\232\357q2:lSx\335#j[\375@\236c\245So^g\267Kr\220(b\rD\216Z\201\224\240\234\200\310\344 \240\335:\351\246\201\3666\004\266\020l\000l \332\026\310t\217\tz\355\235\375\377\307\301\254\262\314\037W\227\302\031\203\032\02743q\356\354\t\"f:\000w\035\204\264\006\200F\201h\003@-\010\177&\034\337\013|{\346\321\360\360\347\014ir6\214\310\330\240q:d\231\263\324\344O9\341\232\014\244z\007?^G\262Vv\265\255%Y\214\226\2670\346\2571{P\346\0071\366\007\341D\216\311\326L\334)h\323\272ga\214\310\266\024\244[E\273j\332\355|,{\354\255{\376\256cp-\355\017\255\244\312\257\242\372\276\257\212\372\2777\274\031\013\325\367<\013\227*\357\346\364b\013\013\340\361N!\307\211\304\373O\003\370\271z\376C\"\177\234\262\201\347\036\306\341\204\214\220F\341pox\000\036\010!\364\213c\037\273\372\241\006\305-\200\375\317\350\272!e\177\3660\026\022\t\372\242\224;\025!s\005\313\340\301\204\266\206\177\204t_\276\222\312\224l\024m\266\330\374%\333\177\247\240!\002\"\200\277\274\230\373\310L\037`\315H\342\365E\"\226\236\227\010&U?\207c\314a\245\321\207X\301\213\212\243\250pU\322\220}\234<[\317\332\316t\006\000ON\004N\375m\010\324#c\006\014\035\346#\200u\2009\314SH""\313\021,\237\351\307p\350\313\t\354\300A\303AM\246\240j\t\365\351\002lz\377\221\210\373\267\016\320\213\022\211@\243\255\201\242\326\214\021(\207\360B\001\357@}B\245\231\211*\353\316F,5$\356\005\266\363\014[&\026#\335\223\030\335\375S\200\037|\355\242\233\021}Rla\316$\266\332\304\357\032ox\260m\002h\313\267wc\276E\005L\252\241p\360\207\010p\207\017\010\034<\307W\345\016\300g\264\332[F\205r\342\270\\\013\201p\271\3279\360\236\347\346\266u\030\203& \265a\265\010\301\375\366\3701\022\207\306\303\377j\024\230\376\037\264\263\231&)\252\252\324jq\003\372pZ\tl\037T\373\271\275\333\212p\333\373\302(\373\360~(S+\320\271H\343\226\235\265\340\224\030\231\306fh\301\356\320{\261+\335N6t\340<3\227\341\367\276/\375~X[s\352\342C\267,`vC\256ym\316\257\321\266\202\335%\205\253B\360\331\206`\375\216\272\305\362\367C\031y\270\370\304d\002\021\002\200\333\250\n\001\373\016\352\354\302\215\360\354\325@\027\232\020\221\221+=\273\301\345\362#\3303\354rm\203+de_\267\010\357\235\360|p)/P\370@e+\035A\327%\267\344N^?\227\334\216\026\256\341\246\233\334\376Z\000\261\304n!\3454\261\363\212{Dn\311\223\202\364QX.\330\334\247\364\333\251cX&\031\3266\2672}'\231\214\253\306Z\3659'\273\007x\216\2153\035\323\0019\226z\254\241\032\213E\346\232SZ|Ai#\031\212zm_\261Zm\337\005\315\260P\215\017]ng\003\031\333\260\370\276\266Ci\347\277\313\344\234\220G\177\346\003\222\346\377@}\027\321\201\203\203L\357@\354\311\020:\214\202\333\224\345W\2437[\263+\305\367P\rH\010\234\026\265\360\370\325\350\311j\220\275~\3338\353\324\250]\346 \025\207\253\0317'\254#\3216iu\376\231w\223a\036.\033?A\337_z\342B\327\273y\331\302\351\233\337\215\301\"\336\\3Z)B\2577\270\327\032!%$\2703\304@]\315Yz>\365K\300\362\363\023\367\026\3156JQ\213\276V \356\251\261\304(\275\313\224\221\214\220\241H\360\343V\264\233:\202\014\225\010\272\312\353\010U\361. \342\027\027\021\327\376\253\254\257r\005\"\nQIII)\034Y\027\234\003s\205\272\360@\226\267U\371\230[\014\001\274\206\31613L0\340<\030-4\266\004(}\235~ 7\202\372\177\356\r\275\222BH\037\215""\007\377\205\261<\036pSy\2069\340\222\241\202\005?<\001@\374\\\356)\375\347_\304\230\027\317\363\373i\246\r~_\324\242/\361\177'\335\355\211v\333i@\364\033q\034I\3401I\205\363\261\352\224\322\210ddebFF37\3707c\220\243\352\236Rg\271L\033C;x\330\235\226(\353\347\246H\241\202:\276\006\214K\254\207b.\344\240\377.\251Qm\224D\0360\n{/`\322\006\233\275?\033I\0317N\211y\224\351\223\n1\236i\262`V\302@\334\245\343\310\371\375\273\3662\000\324\0015\336\244( \034Y\365\277u\374\325s\266*}\0236\3027\367\2627c{\260\303\262K\r\272D\247\024\214a\010(n@S\254\0143cc\261\223\241\322t\320\257<\360HY\272|{\260\007'\025V\004r\260\367\035\351j\033\221`\004U \222\001\333P\213\267nt\316\263\217\362N]57\30729\030\257\334\373\312\237|\351\373\373 \211\231\202e\321!\021\315\262\317-\357\263\307\236O7\233\211)\037\341L\\;\017Z\365ye\260\303\033\3079\023:f\331\3438\342\025\235*\257\323\215\376}\362\353\312\377wJ\307\375\331\027\235c\216\310\005DS\327\266;c\\\201N\021-\3218Z\2621\304\340/\343<:x\345\231\253O\010\302\001A\266\0342\230y\223\321y\303\004\337\354\244\211?\213\336u.~\276w0\006$r\234,\342\373\311%\2654\344\247\231\330\343]6\370g[\327\307\261\036\317\024\243\033\000\n\3465\252\203\213\324\364\033L\314\306?\\j\005\351\3253{\226\304\237\320\277:\205\244\327\003!A\277v\273\270el\240A~\246q\202\207/\336\215DHD\213\2165E\314\335\334\275\216\343\357]\330@sz\026\242\357\\G&\367\024\261\206\264ML\365\250\342\365\321\202\022a$\246\177o\230I\002\004\311[!\333\324t\255\336\035j\252\253\324\260\031V\014\030X\257\017w\233\277\312\nn\317\356kx+\343O\325v#6\314\223[3\363\236i$\222I$\223\217{\r;\344/\017\0232I\024!\351m\266\333J\315M\235\241\331(@\201\016eL\364L\016\356;\360\347ji\347\270*\246\020)\365\002\3523K\332\264\311\310f\367\023\237\220\375V\021L8<k\256\217M\255\246\222\325\246\313~\367\306\307\225w\262w[g\023\342M\303\253\001\351\317\264\324\354D\223d\320y\227|yh^\0366t\033O\306N\322\272\257k\032Gm?N\347\333\311\036D/\306_\263\310\365\234\350C:4\364&\007P6\256\037A\034W\033\024\266\213\371\234""\007\217?\"\032!\340\353gv\010f\236{\024f\2458D\241\353\251~\024xn\335k\256\330s\331o\335n\313y\340\333\014l\356\237\274\234\356\260\ta\206<\242\344\223\264\254\357\353\341\367}0\335 s\262\326\307d\t\221\316\235\365\035\347\213wL\204p\214\206\034\355/oo\330\016\267\260\337\250\306\017\0228\275\017Fk\354@xG\r\341\373\027\270\003}\2309;\345\342\267\035\"\031\200\031\364\334\361/<\262\260d\234\303\312\022[?\022\252<\261s\275\00141~L\203\267\30304\204\344\343\251\347$\236*\252\252\\\337x\272x|\373\373i8t\310\326\277\251\270m:\237v\373\363\210R\327\276\254^\235z\235\337=\370AU\304\226\320\3353U\216\305MfL\314\212&o\205t\216\023\337\271\250\326\t\316\004\333\333p)\033\316\271\307\205q'%\024MS\031]\226ez\363\266\224\222\201\301\010\023\246\033\026s1\032\2569\365$\010B\\\201\356\226v\346@\340\361\313\003k\300\362]h\270\361:\374F\013\266\370;\373\336\026:\334\222B?\005\325\313\217\007\207JI\031\247\26733333*\022,\263\305\364\017\207G\310X-l\216\223\322\232\227\320+\367\235\002\364\340\263\302\264\302Gdl\216\233\363\201v\274\030\300L\0046\316\\\033\342!\363:\254.\262,_\331\274\213\373\257\343\216n\273d \241\206\367Q\t\232\315\311\024\303\005z\370\327Q\244Cq\340x\325\356\303\t(\322\341\220L\324_C\301\023\236N\247\267\2327\300d\236\303/\273\302\033\354\245w]P\010\366\366\254\341f:v~\336\026\303\311\3478\366t\002\271Y\0174\t\230\226\200\367J\344\356-\213i\326I$\314\324\364\2309J\244\204\323\225S'`-ib\346Y\302l`\323ecP\302EQ\227\337\362\303G\177\"\217\246yu\303\232\003\334;\271\344$$$B\210\214\236\334\035\222X\315\335W\004\200y\274\320\025\313[gw\351\036\007\231E\331\250\322\221\036\007\226\265p\235\272\242\244\226\330\240?\255\341\373\236\252am?\207\344\200\2056\241\017{\367RI\336P wnD\222D\017o\216\344w\273\236\336\372\203\\y\330\335\227\016\375\234\314\352\n\022\201\215\016z\036\340\036Q\356\205fo\337\265>QC7\035\342\205\356\2629G|\217\023i\214=\347\263\335K\230\322c4\366\274\232\363|2\261\271=\310\016\240m\221}C\035t\363\266d\330`HkObk\207\364^l\346s;\014\352wB\305\336\"5""\333\357\235w\231\256\016_\267\035\031\351D\302\361\340\210\313q\272a\262\276+\020t\353b\300Ut\200N\301n1m\355\317%\023D\317\236zx\314\352\367\331\323\250\252(j\212\t\n\207\t\321$\231\232\3672\034\027\234B\023\026\352O\332]\ttt\035\007\017\203\376\274\002\267\347o}\2777\036\233\357\214W\223\020D\035\200\267yc\262v\332\366\277w\233\330\271\236n\372vL\343\346\"Z'\340n\221\265\235P~\277\001\201\004\367\360\237F\320\363\346\316I\177\221\223\252L\277\230 t\240\302N\3031\357Q\340\256\213\004\325IB\026\204\354\207W\006^9r\302\\}c'G\306Z\363\255\257<\361\334\037\227\361\222Q\0104D\371A\222E\2534\353\037W\352\030Pb>\301\300\316,\031\211\326\014\214\230\261\236\177\277\375\377\355k\337\370j\274?/\332\336\304\242\355\320\253\232\010\305@l\001\321\210c\205\026\020\303\020\014\204\211&c0fB2 \346\024\222b4\254H\235\362\230\025&\2632)\010\301\202,0r\214\300\212\023P\264:T\247U8\256a\212F\022T\006y@\352T5\000|2\2562\350\310 \302A\2453\021\310r\223\n[\0032\375\345I\302>8\370c\373#\242+bh \002Xh\231\202J\022f'\374\246`DI\020\021-\334\210\266Q\024\275\244\350\005\0305\030\"\320\2010$\344\270\263\000\256LH\246Q\0320\305\"P\326\016 0\302\213\235\232t#\243\035\237l\305\320\304\222D\320h\352k\360j\266ha \030\220\023\336X2\244\025\3643\200DC\336b8\203\036\214=\373\365>7\003\366Q)#\034\2140@\222\024\214\214\0260\221\016\221\020j\211\257\233Y~\266m\022O\302a\344\206\261B\0363Z\\N[\033\315\255D\352j*(:\302\230\317\324\347GU6\0314\317\030\033\264\026\261r\252\202\242h)*Uh\252\n\252\252\"\"\230\210\252\232)\240\242h\216\275\231\265\235\237u\315\025\003\326\262Hg\367`\2637z\265\261\360\312\231\033{zii\206\330`\237l\371\3734\006H'\330R|<\360\236\320\rU\346\001\325\210\377\007N\325<a#\002.\267\3045\326y\246\315\0222\001\004\275RTF\035\317\331\036p\300c\356\275\242?}\205\252@$\224$3\000\026\027:/\247\325^\337f\021\323\347A\363\235\356o\272\213\361\010\202jJ5\357|\n\340\035\027\324I\243\320\020CA!O\320\010\306\002\310\034\213\304\031p\346\317#\351\300v\365C\3359\362\360\317a\333\257\372\017\272\200""\344A;S\236o\346\212@\227\371r2C\242\347\335\006\311-\006\267\246\371\344\003\277\361&\264{\265b8\301\025\302c\332\265\230n\326\267\343\300\272.\023\210\321T`\310@\233+\224a\013 \271\305\316\210\202\032(\302\244\"\232f\361\006\236\"\032\004\202\261-\005\2203\005\030\0315zA\0041\264p0\227\311\262\210\223\nQ\230\201\314\265}O\351\010\031\345:\323\237^B\037\270\"\r\313\027\345+\260&\220\\\016\340\305\036\204J\302}p\242,\274g`\314\277\333\2139\275\363\254\226\010G\312\236\3115\254e\370c=\372y\326\013\276\214<\336\035$\r,\212\004!\n\256\301\3011\006\312\276\350\375\344\024 \021\022\3272\003,\202\214\304_J2\210\224 \230\007x\207\224\242\027J}!\204c@\323\204bd\343\201\030\004D~\221D1\032'HbLa\020\004\242Wq\231)DDZ3\004*\206\010\210\030\212F\250\241\023d\245U(\256y\240\0041\345\370\025\000\235\200\237L\021\002\001A\343\033\034\306\254\204\277\355\\\250\005\342\230OZ\013\204\0004\206\240\241\326\235\313\241\225\003\351\201&\302\036\234<\232 \366\020m3@[\346f\267G\266O~\"\266\23066_\240\320Ow\213\001B\241\031\030Tt3;U>\274\276\020\t\362\312\344\361&\326\037\030>R>D\000\375xB\205R\000\306!\024\016\t\3401\363\371\216[\3678\021d\2304R\301\332j\024=\2117\200\302I\370\312\024\367\010\027\020M\366\3008\020\324K\004\255?RL\026Pr5\366\231@\366\373O|\023\264#\022CU\274\241 \221oE\013\212\342nF\260\037V\361.\227\n\360\344\331\250\261\217\020\016\243>\343\031d\231\374\200\245\220 \200!2\000\3040\244(h\240K\306\343\324\210\361\367\353\200\316\032!Y\036H}\360\355\360\347CH\001\245S\006I`>\230\345e\341\344H\256\337$\017\251;\022B$\021\371\025\002\024\222M\010F#\204\n0\214XJ8\010\306\t\272\353\336\"\004|~t\2541\365\367nR\3704i\032\201r\tS\347\025zDo\034\016>\2100\367\357u\023+`\016G\034o\360\"\037\244\005\200'\326f\006\206\007\266\216=\010z\320;\0059\327\361\217@l\0271\324ft\221\032|\026T\222?\010T(\201\321a\243\231\001KN\031d\276\303\246\224w\n|\020\2747\325\225\334\003N\265\202}\027G\2633\256\"\014\341\203\010@\302\314O0\347\245\301\303\225\334\021'\323\200rO\344\220v\306\233\002\201=Q""\331\006\342.\260\231'\013\001\336v\232k\264\215@\206\321N#)J!\244\373r\007\270\005\276uD\r\310\375\371T\037\252B\221\r ,@:U\365\020\006\001\363r\007l44\264%\005-\005\244\n\374\362\200\016\212<\375h\000wx\242\254\245j\014\203\201\323\336\235\270\320\215\240\244\210\253\362\347\345G\242\352D\013\335J\240\017\262\320pM*\031\206M\032\237\250\311\270vK\315\2561\003\023n\000\200j\02131\310\007P\2269\014\260\240v\261\251\003\202\003\244\n{}\334h\0373E\260C\277Hj\206\341\276\034\273\343_\330\365\357o\nfO\324\255\007\260\365u\353\315K9h/\353\214\021\223\214/\3238\336\006gR\365\253\344\240\245\221\2029\322\253\202\232Lw\030r\036>C_Z\212\314\315\266yI\314ha8\303o[o>\347\271[\242\215\013\0102\027\275\220\2622A\275T\013I\023*.t!A\200\332\221s\2011A\262\0235P?Z\020B\"\021\010H\021dW\211M\372_IH\004\0200&\314r\246\314\0270\"0\"\2541\3002\214,\t\245\t\032K\255\213\242\310B\212`\220\n\252\242\210\212\202\"(\242h\"\t)\020\240I\nX\225\313*\030\202$\n\030Z%B\275{r*e\260\005azrb'\"\342P\3066\221\344\351\270\267t\246\006QqSKYX\303\2604\2304M]`\335\366(H\204\215(\262z&S\206\224\275%\021\304\304\274\017&-\021\014$\304\223J\024\326\r\245\241\351\333\247/\231\000\210v\341\334\001\030.\271\030\266\341\221\207\356\031'\211\204\340\235\r\344\016\006\234]5\266\352\214+\016\235\356%\246\2663\206\225i\022\300\373 g\032\307\256Q\310\231i\203\n\214]\256\203\354\010\221\201\344\314\202C\223\323\257A\370\001\030 G`=\235PH\031\023\301\333\314\3431\322'\356\252\211\331\320\324\367\332(\365\2070\034'\322L\261\254\331C\253\035q\213a\004\221\000\346\010\264$Pb\304\025\230D\230\004\302\005\006%\021\010\210\204\037\021$\034 ^\363\027\027d\217\223\006\241\370\344r\014a\210X\314QJ\020\245}\313\277\311\371\177j?\216\324\177F9\363k&H\207\2228\336\243\371\245v\377\r\307\033\005\302B\250\022\332\020`\204i\002\330\270\377\032\326\312\364j\225a\306\254\020\321x\002C\362\374\277\334\246\235\\G<L\245-\271\\R*\031\255\342\007\241\362LI<\267$rM9\016&\335\301e5`\310\270\336\315\352\016j\"\355\344\265\321\326\370\201""\3031\205qi7\254\313s\2145t\335\036Y\211XI\022\230\224!\024L\"J$DA\312\234\253\211\272%\316!\233\2055&9\r\027T\263w{\336\256\365b\212\311\247%\202qP*\230\222\023D\261#\222\253,\251\013\271WU)\262b\212\224\036\r\030\273\312\230M4\363\373\310\343\375\215\327\3424\214\2201\305\223\272\003\220D\317\007?\2500\315\0065:\000\351\211!U\330l\360KC7f\304o\014\210J\033QC\261\373r\307q\267`7\374\273\375\372&\214I\332\224\n@\357\371\354+Q-j\325\032\003\353\370a\345\001y\371\313C\004\236{Q\366#%\240\356vO\370\3750\031\372\t\337a\024\336'\365\210\240?\201\344R\275\010\306\005\377?\237\354\002\246\261p\257\344\366\375\231\213\234\321$\364\336\377\252\013\225\244\205D\256\322\345?\301{\357\313\r\210\373\3204\375\231\2365a\306x\n\377\326\210\304\001)\000\361}\350P)c\315\210\211KQ \221\206 \230\020\314\321\014\314\021\003@&J\024\213\204(\205\024\013\214)\020\030H\031\000\014\372'5YC\363]\273\226\300\314\311\030\026'HE\365\032\241\257\215\344\202\326\266\307\303 U\241\2035N\203+b.l\341_\253f\2143\3526\255H\264)\271\2655\340\214\370g\000\265\212C\346!<!\363G\215\301\001\0017\263\023>l\016\330\340\276\032\371y|\350\014\211\352_\223\016O\206\301~h\252CR\247\236\010\214]Xb\263\274\364\253\3050Z\212\027_\033\246\342\362\362\343\351\276|\366O?\002\003\210\016$t\305\325A\212-^\247\277\333Xu\000\307\323`\033@s\353\316\031\014c\031\364S\254^\223V\022\202\343\006\016\207V?\036`{<\231\257\215gwm.\3736\225\266\234\tc&\243E\270\314\"\206D\246y\247W\340\347\273M\020G\241\340QQ\t^g\247Y\341*\360\335\243~\250\355\274\253jj\215\304\253r\324\245=\267\234\006\331k\275zh\243Z\214\357\364'l+\313\377A\025\021\024\300\024\302\r4\000\020\t\354G\265\203o\000\330|P\007\317+\364\244\200?\315\226#:\230\244\215\304\306\007cT\005\t\266\273;zsC\327\235\301\204\220\013\025(J\320-K\276\247\343\243I\307\325\246\210j\310\366U\002i<}\247\347\213_\036\204\341\327C\243\023M\355!\341\235\025\206\255!\2058\375|\320\000j\333#1\030\232\r&\202\212\th`\242\200\246\265\274\205i\251F\222C\367\032\300\032\272*\202\221\214\320\242""\201H\231\003p\201b\330\205\373\221\3637x\335\014X\001\"\004\210\3513\304\325(\261\203I\374^B;Ad\000\320\212\024G!\342\212If\024\031\204\025\206\254\210\r F`Q1\230\316\001\2111P\032\2625`\304H\212a\002\207q\335\325sI\264\317:G\243\307\337\315-\247\334%IB\223 \265SL\213T\323DEL\245 \265\t)M\022\024PD4DUU\024QE\024T\215\010A*U\000t\0256\037\267\005P\035z\327<\371\341w<\323d6\032\024\206\230\214\214\323\013\001\365@\306\252\356\254U\017\330\267\350\314\321\326\220\345\221\026\004\311+\371\034`v\366\005\005\341\356@\241\317\213\025\034\353\035\200+ \003$r\245\211\230\021iH\260@hi\033Zq1,\233\332}'\274q\376\004\356@\347\034Q\373K\227fg\331u\202\240\263\016\270\367\201hE\374xbP\311L\301\013ZZ\010K\006\261I$l\241\356j`\326\327\024\210^\341\032\033\013,\373\250\267\335\213)\332\2271\260\003\372\321R\367\220i\264R\224\264\327\217\257\207m\006\306XwU\320TH \025\243\374\364\003T\200\326n\232\205\320\265\344\350H\276\376T\370\006\322\0233\277<t\323\030\371\r\006\241\370&\201\204\0176\225\230\275S)\237\340\254j\253G\206tb# \273\250^0R\314\"E\003\014i\036\256\374\3542\n\356\252A\345\036dvg|<\277B\341\275\230\014\310D\027\3274\020rs\256\234\236**\035\313|z\360NW\251\203A\304\262\023\211O\222\027C\"\232\204\211\346<\017\217\276x\317\245\017F\364\032\250KT\276v_\234\314z\277H\360\3054\343f\273\357g\036x\365\273Ye\224\220a4\242\217\272\n2@\250\"P\"\320\035\3308!A\275\206\022\226\244\324\031%\024\223Y\001`\223T\220\203\030@`\353\203\n\3052\226-`C\242W+Q\211\020%\213\210\346\313U:D\211Q\005\326\261\326\260\2262\003($K\210\201@\321\2320\013\031\014\001\330\245\242\267\232\203A\024D0E\252%Qr\301\236\204\276\324\357\207K\230\327vN\021\277\035M\276\230\"\217\000\227a#\220\003\260.\300\035\216\361\273\241w\225\337\251\270\342\032Y\n\371\230\202u\247\335\031\204i@\275\273=Z2\002B\t8\306,\314p\204\024\010\361\322\212\010\201\024$I\242&\022\"\014\t\244\325\221\216\275\221\242a78|6\002\272\013@\024\230\013\201\2569\322\356X\"\010\035\220\021\206D\034\203\013q\204usT[yH\310J\322\202i64\304Q\262""\313,\2260\223\014 p\314\027 m\232\255a\240\302\203\356K\226\354\3465\320\212\300\332\346f4\004Na\207\005\252\265\032\033Nj\"\r\265C\006\213\"*=\374\203\260m\246C)]\206\201\207)\213\0011\240\311\001\203s!JH\332\030\364\240A\0063\031_\024)H0\033\025e\030\253F\232\251@\266\nQ\024U56\2241\241\244\333\317\245&\220\313q\324H\3460\202\001p\245\241T\2338\213PcPj@\242\224\r\020\231\023-\001\251\310JZ\334\211\204\024\030\005=\300$$\353M\r\266\005i\017ET\024)+m7v\"\330&\272\n\022\201i\014!\005\324\203Wr \005\255u\344\\\324\205D\264\035\031\206X\236+[\215\010;ti\377&\363f\007\005Ti\342\250I2\330b\003\007DL\204\341T\316\303hm\341\230\024{tcd\335B?D\311\263\2058LJ\212\2603\266\202!\005L\001\261\303V\004_A`\272\311T\003\343\320\037\024D\002\372\014p\"&\000\371\254\002\252\215\330\303\025(\0251\022A\020\037P\220\310\312\214\003i.*\006\376<\243\346\014}G\001\320\217|?d\341m\214h\302/\321\35116`\323R\020\0160\237\307\t~_6\211\030\303\263\221\033\375\373'JuC\244\325;-\026\221\2225\020}#\030\254f\355\222K<o5\277\347\370|\307\370\203\314\364\237(B=\245\2778\021\0220\204$\023\027\344\222\017\213\214\2600\310\320*\311\206\341\304c\303\274\322+N\344\020\213\351\201a\317\215_gV\334u\336\316\360Rg\366\305\340\242\316h\251g\360\330\364|\323\224\350\325\331\216s\203\224yv\332Uu\227\033\313\205S\342^4.\007e\313T\014\223\307\277\033_\374cB+\201\306\272\230\251\347<k\013\224\371zyk\236~/\357\237\247\370\364\235\242j\246\231\245^\365\351\324\26107\361X=B9-\312\272\305\212\001+\207B\311H\330\3720mQ\241\215&\014\210\n\006,\210\330l\326\214\325q`:a\3226\362-y\030D\352\205j\231\350B$\250_w\277N^9\231\3610\324b[\017\267X\030\345\201fC\361LI\0008p\254\220G\355\346\342\010v(\222I\226F\274r9\004\025\017\233M\n`\261`\310O\rv,T\204\201\211\020\311{a_\025\200|8\341\336b`\236\007\253F\3502\204\tR\237L\266\207{\241\030\217\007\205<\021HV\000\374\260\306\177)\\\336\201\376\367N\266_\300\010\207\216~\202\276\256\347V\317\311\250F\244\311\261\n\014\300~\235\217M8\300c\350\335\035\362\030\272^P\273\315\207m\223""\312\331\310\320\231\202\323V\240d\246X\363D\313\034\277\2363\311\343\303\215\306sd\004\260\351\324jO\\C\205c\222\351\242\320U\246\371d\327\032\227(h\016\033\206\034\n\215Kc\223\225\205\253zsqe\275\031k)g\232\001\275\236\007\227zS\271\204\017T\303\356\330\303\217d\r5@\321A8\211\225\023\304\002\314\305t\275\323e\236\377\212\213\224L\271\333\251\007)+P\346\016a\0070\205\314 \346B\346\346A\345\236(\373~\\\345\326ff\347\316|o\340L\t\024\376\335T\261\342I]\360\354\202aT|o\367\253\014$\230\332\270a\017\244\270\205A\366[\023\350\217\366\345\247Y\n\370\\\364#l\346\350\321\327q~(\021\253~\036q\360I\006\341\033of\333:s\232\305D\270\2046q\306\n\361$\237{\352\305\256\016\235\370K9L\344\312\207\233\007\373'<a\233\021\311\336\242\020\336\033\342\205\014!\007\224\202\\\235\027@\3309FW\013\032Ph\220\210\300\220\034\206N\252\246A\332i\010\023\235\307o-h7\244!\302s9s\252cN\355\265\327\003\215\025\\\t\006\217$\323/\332\024\036J.\022\256\317P\375\343\305\356m\365\2229\236J\306\323sc\247(\026\"-A\000\242 \254 \2160\200C\"\252\270\375\232\211\035\203\2109\r\241\272\027)\351\267q/\222/p\310w\203e\302\345h&\013\321\332\001\311\333,m\200\274\225\r\\\343\263\216\\\335\333\306C\001>)\231\345u\265&xc\220\020\2140\344\244\270\243\3149\314<\332\231\241\216M\035\224vs\261\246\210'\2165..(\205\214\362\223\014\2010\261\207n\334\304m\236\r\327T\3334\265\271\276\241 \217IA\245m\000M\"G=5d$\354w\267]\227\223\261\032\0073AO\t\007)\304\001\346\215j9o\034\353\235\223d\177\257\203\2161\034\262[\266\250\361\246\372\005Zm\275\005\235\177\201\320\317\235\223\255\303h\266\371\016/\263,,\032\327\"`\322\031ts\000R\027\205\032\226wN\326]\341\206\244h\243y\\\232C\277\223\206\r\220z%2y\301\263D\353\267\024\345\224\354\032n\244\\a\321\314]\301\2058\312\240\355\023\32224\374v\240\340\\2f\224\017L\234\315\005\300\333\300C\3518\343\204\010b\020M\2705\010;\022\371N\330&\023hv\r\204\363\342[\236Dp\316\374\353\317\265[]zu\332V\035;\r\330\221\330\220H\337\252\033\261\300\266\201\2158\2731]W\202\366\322#Pt\334Ifq\273,e""\250\271\304\3367K\306R_\013\222$\261\203l\360a\340\213:\3647\332\234g\311\213\267\251\014\034\2355\032\350\r\335\322\230\017\231\031\336D\270\321\243\277\t[ \273\374\0102Dg\004I\265\350\370]\230\340~\221\331\002\024\252F\272|n\315g+\261\342\330\035\335\214:\362\356\334\024&k\034r\370\346\312\031\nF M\302\020\206\215\004\307\031\256vT\356W\306\363\205\322,\216\316\356\010%\320Jvo<\230\014\353b\306\030\344\205\004\304\321\317\233\235\356\273s\255V\3609\360^\272\220\035\210\220wC>8\366V\247\264\261\226\346\t\203\236\300\221\334J'\236\200\246\357\330\341\2031\230:\210A\016(A,\354\355\332\333\227a\323\202\004\342\355%\354nH\307Gth\n`\345b%\312\201l\273\331\333l\234\263\216\0231\204\006\017q\001\033\3424\271\220\3553\200\216q\r\244\"b\006q-\275\214\027\nu\357|d\315Q\246c\\\365XX\262#Mys\210\000+{\360)\303bo\n\304#\256M\"\006\226k\212\302\230\010\022\031D\2678\351X\367\262\365\273\201\266\341\307~\230\353\332\214\364^/N\332b\375q!\233f\356\365`\243\016\375G\315\360:\301M>\n\236(/\036iEF&\332\027w\356\216\0177\026tA\210\347\203xQ\325\230t\034v\357\t37]\307\342\003k\013p:\003\266\200\334M\210\026\275\005MM;\352\235y\334\323!u{]O-\216\356.\305\362\033<Q\252\337H\224m>-\266@i\207\333\226\316\003^\027u\000\256RP\023\246v\0050B\262\033\013# \247\224\220\026\360T\263S\033\357\256\235\334\264\351\230\347\r`c\256\032\026i\016\214\2537\263\2052\310\255\211\234B\017A8\010*G\rbL\253\314\233!\265\216\004v\317H\331\000o\214X\202\267\272 JZC\003\036\343a\234\352(\2024]\002\316\265h\014\014\357\344\250\275\224\342\2439\234\017B\302.\026J)\242\300S\203ZX\3423x\341M\203\325\303\014\316\t\233-[\332\036\236\035\242\226\213\342*\214\224\306h\205\257\017\205\215\211:4s7$\371\t\200\226\001!\271\267jA\302jmm>4\264\245r`@):\234\222\341r\350\205\220P\262\361\311RK\342x\3227\335\256GS.\031H8\331\222\237*\354=\364\263Zb\006m\242yY\327\004\326\260R\236\314\353\006Y)\246\002'\254\007R\2037\321\3168L3\022\336c\020\316\246$\000\372G\324\266\272Bw\230I\0051E\020\365\316BT\320Ba9\001\026\313\241!\242Rf""\010\221\236\377\0007\304\315U\020\304\024REUQ\014HW\003\020\243\010\342.\022\333\301\267\246\264\007Ip\206\223X\216\t\254\300@\216\272\r\035\"\343\216\003\205\362\216M\303\230\343\022\231\n\364'\022$\267I,\310\364\315\333\276\272\301$\231=b-P\336\006a\207\343Y\314\363\233\347\215Y\232\002\326\205\302\304\034\300\351\2371G#\014Sr\245\2027\215ym\244^\213\020\223+C\277\016\021\000\235\323\2412IS\216\222C\014\350\026\322\251\224\261\206}\252\014]\224c\255LF\347p\336hM\323\223y\322\352\r$\201\t\013\244\227#\277[\234\335\032F\375;f\270\256\004\333$\\\261\267\231\314\251\246\001C\342n\031\234tH\346\022\005\315\311\202BR\310\022\006\244\302a\306\264<@\035-^\026i\355\233ikp:\366\006\t\215\013fAF\250\371\220\313\326]\257\232|'\264\314\227]\223\356\260voS\347\033\034C\2062\210\266\3561\325;@\355C\305\357\031\016\356\275j\212\252\"\252\242*\"\252\252\252*\252\252\252\252\252\252\252\022I$\222J\273o\215\230a\2606\273\327:\327\031\272\225\267\274f\301\2136\310\343St\317\240]$\221w:75\201\tX\2348\\\034j\224Q\267\332f\214+v\023\305yfB\354u\026\006\025\330~\0279/\246\020\310\021\272Z6\033L\2248\032\313\025\250\337e\276\222\032\020\350\023\006\021\205M\254V}o~:p\2754\027*y\032&G\\t\301\034\001\241\235k\263Mn\264\325\305\017l\017\336\215@\266\366$\302\r\"G\371\024\314E0\232%ZJj\211(rT=9^\033\335\226T\034\204qc\272{\300\007v:_\010\245\251rUQG\203K#<\251pb\006w\023\324%\t\321;x\330?\251\260#\263^\377C\225_\340\345\000\231HI%\201\204\220\204\211\000\300\001\360\021\267M\260;\006T\2350\002opX\210\001 \034\357\203\360\001\242Ta\200\026\010F\030;\\\t\021\252Qh\032\200\323\030FA\220b\243\270\200l\007l\303\030\004n\017\207\0258\272\342nW\213c\370\374M\264^$\371\\\272T\351\250\204c-V\321\200\034\254\231\3056\022\273\255\010\263\227&\212)\230\336\203\344\307\222\032\347\211iI\002A(\311\273\014,nLY,\020\266#\322\231rRo\233[\364esF\3357#\003\004+\222`\252\241i\336\255\311Tu\230;J!\204<\256\\\270\021gx\323\t\240T\014\222\241\234\230\360i\316zv#W\326\372kd\354\345\250\266p0\202\202\353\254\246e""\2741\031\256\211\024\335\3046\252K\255\236/\215\020\271\035\245\242\007\342\234E\351\214\351k\224\031\313#\221cK\350\343&\002_\227\247\t`\326\007L\363*\220\243\244\324\216\3042H\272\355\302i~\310\343a\243\267'd~\203\016a:\276\362\363\335\270\216\365\241\020\206\350N\302A\217z\250U\032#\215(\242Y5\257&`\016\311\230\020\201\010a.\274o\271\0149\250\264Q\225\225\027\226\271<\204\035`\027Q$cg{\352\271\336\014y*\020N\000|\300t\243c|[\275\200\300.\362\233\203\277\201\t\r\325,\302o\261\311\327/\013k9l\2154PL!\251|\377\262$\2131f\006\310J)l\004\356\247\244l\360k\225\177 \355\314\342d;\236\262\221D\366)\006\261\364\353\205\272c\2359m\322\323\323D\376h#c\374*r\005\320{\000:\023\303\316\346]X\201\t\002=rWQA\\\003/\225tu0\237\024\365\366\313n\232\347b\370\356\276#\336\275!\266\375\253&n}0pg0T\030E\026\203Q\334\214\"\300\rI\341\245*f\027Q\234\266\316\255\273y\241}\306\355E\251>xi5<\310\255w\234\014\2543\242\"\365\200\000\367\222\314\302\013\274\353\003xn\216\004\0014\225\335\231\277_\340\370\327\203\254\337\024J@\220\024\212\rM~a\020p&\217\341\010\303\360\336\276\363\361?v`\275}\016\245\017\215&\037\241\244j\303\025\275L\315A\007\310lP!\022\211\356\001\226'\250\030\300h\212\r\\\246\215#\210aT$*\212X\237\330\317\246\265\232=\275sBu~\300\302@\3168\361]&\021\257\264\247t7\237^\317\201\363kL\034Ut\211t\355\244\n\003\232*-\316\014h*_~\336\251\211\200s\016\225\266{j\271j\312'3s\263\311\205\320\303z\017\317\002\004@*\006n\033w\331\360\200j2\030\300\030DV\020\204\376\351\000\023\020\020\224\22014D\000UTUE,J\023\004\322K\"3$H\262\332\336\2076\334v\360T\325\342.\266\211BJ0 \344\010Z\202\232\016\245$\247Z\227-S\021i\"\203\002\002\216\243\317)\275\323\375\320\0206=\316a\205\200\314\231d=\244\003H@\211\214L\206$\252\265\234\232Z2\245r|\231c4,\030\242\300,V\251\316(\246a\n\340\322\006\024\317l\356\000\232\370&A\323\007\315\002\242Z\310%\266\247\252\014\232\200\r\201\317o\252\r\237\010\252\252\025\375\037\\!\250\312\261ba\354b\326\241\242\321\227u\236\314#6\2005\266\360\300\261\354\314\246""\036\3038Xm\255b\337:\305\246w\325\n\265\240I\214\004\242!M\217L\006<D\207B\324\3612-TNp\200\310\0163\032\333\r\t\206\031\222\246\207\314\362&c\336\307\310\313\302 \031\3371\311\263\353Cc[[\213\"\253\273P\222'aY[oRd1\225\266\362+H\003\261&1\r\305\006\233q\251\220\266\266J\332\006\362(\330\266h\255\260\016\227)n`\361#F\316\346G\026\014>'y\275\025I\206\351\236A\224\235ol\307\000\206\320\317rkU\373\343t\210\332\202\3657\007\210\321\276\375k#20\206tS\"j\225\002\2444\333\203\246\0011\007\306\331ld\353iK\374\326#\0038k\367\316\347\210#BU@`_\203X9\225\244;]\036\270\311\\\000;U\334c\277\035\330\327t\302#m\364u\007\312n\301\004\353w4\20095\032#R\314-,E-\016w\243U\177u\212\326\370\266\261\022\225%\"5\343\245\023V\266Q\332\201\261<P0\373\024\251\340\000=\311^\356\251\250\030\006\266\363oD\t\032#A\221\325\004)#\204\220\2716\251\203e\010G\275'\230\214\026h!4!\320\306\213\242\300\205\035\033\374\014V\317Zn_ \344\231Yu\332\256\020\t\233\201\300\320Fw\241/\306\210m\327\221\345\253eBr\331\034\020K\300KNR\223q\314\rL\310\2072\005=\003pV#Y\243\364\352\222\347\234\211I\003\257\t\274\233\2364\203\256\233\010p\306\\C\025\333\213&\271\216\3059LU9\226\340vA\2060\234$t\251\t\264\212ja\223J\032A\225\241\336<rS\013\242\351\ngC\207\253\313H\201\304\3257\206\005\346\313\027,\246\303\300\205\320\337s8\253\275\235\246Grtm\345\\\024s\273#\223\n$A\210m\265\222\357\346\231\230%\2233Kj1L8w\253m\315H\360F\245\315i\016\206\222Z\366N\2569\340\306n\004zkRrp\246:\351\013\247\036\246!\272\2319\256\300\315\230\315\331@\303\361\255W\023m\302\376\244Q\270i\033\252\363\343\216%\374\226\364\307f\242\273\3131\026\364\337\216N\367\275\251&\337(\311\022E\210Z\304Sh\210k\337\234v\347\3563\307X$\241v\354t\000\3212bI\222\r4\017\342\215\323\232\3267\245\014q \004\210I[\266\353\331\246\340\377\227m\021 \020\207\210\331<,\027\234C\365\344M\010\014\005BBH\024\t\345\270\362a\365B\001\022\213!\002\221P\321B\237W\335\346\370\273\017t\360\032\200M\215U@\205\335\313'\252$\024/\352-Eo\345\2267(\363\370m\251\355Em\222\000lBER}5""\207\",\211A)2\262$\202\204R[6/q\267\267\252{\301\t\315\266$\242\326\267\301\344C\272\350j\364v\330<\022HI$$\004\341\340z\2041\001B\037\305\216\030\341\213FSb$`\210QT\300\010\302I\337=\254qG\035)\276\312\201\345\000\333\031 \250\336\273\020d.N vE\275|:\266\246\234n\223#\177%\220E\260\353\n\020\344|\260\226\322\003\254\032\326\200\310H\333\262\332\3044\261\257G\307\257\243\000\311\030@<\"k\217n\264\003d\204\2262\337KQ\2275\232_\2447\235\342\217\371\340$Y\021\200\221\202\25749\205\376e\320\222\350\027@\271\320t%\320|\235\215\036\225\265\267\264~\336\007Qfh\014\3000A\032\204\345\316\032\300CB\354\201\211\223\214\\\013\350\017;#@m\220\210\321bA\026I\204\270\341\022X\201I\2230.\020\201H\330b`f!\231`\251\201\206%)d\022\222I\200\344`d\342\270\204\214BR\005!Q(\316`\264\005 \322\2312J\264\005\23091\"U#\214\264IQ\211\334\371\2301\232\201sD\242J\"|n\332\006(\203 <\243iSgMO\277\025\353\006Q\220\322\200Q\350\255%\350b\344\213S]\032\320U\207T\335.Q\347p\364z\304\245Q.L\372\201\302\024\276\230\227\203\206f@\341*\2354b\204@\032@\242G\025\221w\256\356\362\237=\350\325\326\321\332\200\262\300\024\241C\336\036\t\375\320\205\032\001;8E\372Od\023\023\367\332\372o\324\203J\217\242O\333\204<\272\031\320\020g\244\246\206V:o-f\031\035\327J\306a\325\373)\r\220~09j\007+TB\253Me+\344 \027\324\006\331\266G\357D\221+\367\335z_\005\013Q\354\353\235\037\267D\006\004\276\262I$\354\205\026\277\261\003\037v\016`\260\356\333t\225\203\312\031\277\272\230|c\370\267=\273-\035\347\215\276\300B\030\333\017\335Q\345\344\373\357A\356\020u\014lF\264^\214H#\340\204\010\013Z\254\225H/\2456\266\"\350\264\262S\001\342\026\341++vXG\203\004\214\007\313\021\003\252\n\356#\330\035;\226\336\241N\371J\256\204\323\336\371\223\r)\261:\333\336\264\277\324Q$g\022\213*\217i\013\350\216\364V\200\342nq2JO\014D\261<sF\276\324#Eox\373\210\024\343\3137/M\342Y\215t\2279 \376\324\013g\337\330\004~\031\200\035W\037\232\307>\304]9\347\375\024g\346\230!\331\006\366\245$;\010\367z\005=\311\356S\334/\271Op\236\341\367\034u\371\177\222""\1775\221<\360@#\021\024\356\200#Qb\204\2000\024\000\277\t1\345\356\322!\304\211\222q?)\001\372\317s\312B\007\325\366q\276\270b\343\020c\206\030\270%!E.3\216\n\230P\313\231\211B\344\206\003\016\200\315,E\354;\200\321\360\365^\010\243\242h\260tJPDdH\220\010]\201i\220\3213DL\327\345\366Q\357\363\322\300m\350r\255\273\235Q\223\351A\037a\\,\334\343\036v\227'\177\261{\005\334\013\3611\0172\340\r\304\306\305\220+\310l\000U\221\362V\221\373\242i.\242\311\025\000\300\275\003%\014\315/g\357.\243G@>\363\233'\0200f\203\267RP\"A\212 T\242(\021\202\200\324\n*m\200\315\266l\"\032\314\202\213\tp>\355\214\267\006\307\262\033\"\026\312\r\221\006\312\r\224\266}$\304\306\350r\351\370 \220l\263\004\036\330W\026\210\212R\026\202\010\207!\302\031\240\231\010H\032\246\"Ibhj\031\032\nI\tb\"dfH bi\032RIfH\206\202\224(\n\030h`e\240\017\034\014(\020\232I\212\202b\232H\204F&\245\010%$\177\177\003ZT\310\014!r\002\027,\201\"I(\367\036~\277`\373\277\213\252uT\347\342\314)\377/a0\003\220\004G\005\250A\255\006)\366{\272\343\354\244\007\204\036\335\230|\200\366p\324\037[\021O\303\022JP\205\010\024\024\010\314#QD\224\311\014E\013\001)\0033\001D\304I\025-\024\204\020\220\023H\221\024\323T+\024\303\005AJ\301\005\002\024CP\024\215\000P\021(A\010Q4\312U!$\r\n14\205%\014A2P\023$@\303D\003\020QA\014\206\223\300e\014H\001\007\367?}4\344@\321\0049\211\030\030\004\321\023\002>\246U\300\202\006\260\316\302\031\n\020\203\221x\0222!\323ln\344`\311V\020M\033*\320[\260& d\016\000\374?\253a\r\322$2\263\024\304\314AS\022P\264.\311W\226DC\253\247J\007Chc\254\3420\224\010\223D/z)\247\266| (*\205\224\000\224Z\005\300\226\316\300h\020\264-\204\215\201\033\001\260u\364\374\255\322@\\\013\314\307\0333\255rC\325\373\276?\037\233\376>\277\274\201\372\266\024#$\010o/\352K\027\234\302\310\213\345\006\337\206\010\203e\t!\255\317\013I\362s\231\3240\337\305\234c\204a\320\322\376\235\255\325Vm\272\017N\200\300DR\323\230\367C31HT\004\301\023@\302E\244I\001\017\312\212P\277\305\320CN\006\t\251\232\310,\026 ~\324\026`\320\016HU\"0""\014\203\201+E\262~\220\375\352\271\021$\370\037\220J\362\014\0103\010E\372\251f\355G\0204\276\254\023\312\365b\373H\271\302!\362\324\205\3044\3151\206\276\355\366\345\326v\021I\226\022\020A\375\360Jd!\225JJb\n\001(\021h`&\252(\242\212(\200\205\n$)T\210\017\360\312\341\002D\217\202\363\317:R<L]\220\245!\007\366\210\"\001\205JA\224\363\001\351\237\220\206H\1771 aP\217\254\230\036\247\3022\206\022c@|6\032\360\356\373\207\304\347\357M#\320\240\201\014Q\373>\003\332#\306\014M\367\350\032d\227:\320\300@\217\343\202~E|\025=\304\301J\301\355<\363\201\211\204P\231\030\314\200\320\204<A\355d\364\017_\201\000)JS\362\300(\205\324\330m\261e\031\345\344p\251\004d\221\000\364\003\324B\304\014\002J\241\013'[\025\t\221\020:\276b\020\376\304\001\001#\001#\022RW(\0374\275\232@\334\260\262\215/\n\372\003e\351@\321\000\202x\"A9\317\004\327'\215\231\327H\3100\211\345!b6\217\010\324\232\2510\031\017\325\314\032\000\334\276\350\342\177\023#H\206\006\352\nzH\224k\240\264\254i,O/\013\356\270\355\000\354\346\240v\220\014\202\026\025`Z\245\333\200Gm\324\255\316\217F\273\n\320S<\327\034c\267\2212\244\036\215\005\014 \021B@\247\312/\226\373^\317\323|X\344xF{\304\221.=\241\201\314\232`\ny\303\266L\235'O\260e\354N\330\371\250\000v\031#\352$\242\275\352\271\274\271KQ\314s\343\263\262\352\376\315k[\352\304\305\0054#\"|\360\247\240\357\371m\277\236b\027\202\343\341\264\306&&\376\270\375\226&\331\250\270\3377M\304E\275\324\227N\237\302\206)\270\374W\353\343\210n\027\341\030\\U\005\303\034O\020\327\244K\212\030\204\322$0\203t\333\241\245\241\236\255\303\216B\362\364^\t\212c'\241H\270\215U\273\236\357&\203\035\323w\336\200\327k\344:+\226E\335\223N\340T\313\n\0318\203#\223|pv\360\010s\351zY\\\241\0334\005gN@\330\306\253\275P\013\357\203\010;A\246P\241\334\230\306deu]\300\032\214,\2258H\330\250\270W\244|\020\245/5$\263\257\255\260u.\347IaD\311\346\201\017\210\305\002\277\342\344-\030\221\321<7\000]_\236\006^\263\256\325\003\036\213BI\034J\235\225\224\304g\343\3008\013Pz\216\247]\304M \234e\371\243@\362""\350!\017\333\343\262\322\002\027f=\013Su\352d\025H\246\314\207g\\\210>\336\271g8\226\253M\203b\340\224\373s\304=<\274\376c\353\323L\\\240\346]\020\235\354a\257\253\232S\252w\341\242Z\207\337\3049\217Y\247f\253\367\377k\364\246\315y\367\016\201 F3\315(IM\025\t\000\203\004\314\214\020\231\230P\025IE\013,\204\205%\005%u\203\n\007L\030\022VN$\220a\2064\205fA\211\226f4\341\230\025\226Y\230\314&Rf%\226ae\230\206$\221J\224\222\201,\200R\242\023\231\225Q\0204\005\013T\t5\022A@\322\2056e\365\001\343\353\007\322\017\247\347\364>0\345\350n\002\006\220\003O\274\331\345\0371c\227(~\272h\374=\000}\006\002i\327\243\345\372a\372S^\360z\350\206i%\375(0j\242B\031%($\246&X(!\250X\367c\200\304\223P\021\005$\023C\021\003\010\030\322>\027\006>\276\337{\307$\266K$\036\225\276\031/*y\346V\377\352G\344\027\024\016y\361\222\365C\263\270J\224\336\247\365\236\363\230\205V\240=k\254\275\366\206A\016*\326\232\376\307\243\371\"@\016\022\227\341\367Puf\315\300\017\256a\364;\264\217Q\016\342\000\376\030\010\250bV\222\221\034jLP\"\006\251@i\220C\321\372j\030y\254\3152\022\233\203\022\262\312U\201\341>;\322m\002\203\366\2064M\266\032\002\2133\272\345\320\263\356\263`$\301j.\214!&Z\026\331bB\234\035\312Lu\331P\314\372\324\337\324i>i\306\332\367\346\234q;{\270\021\200ZV\000,\372G+\236\302\202~R\"\350?\354E\242\341\000\352\316\007\245\315\033\0209F\022%\314\275\207\314\016\227\364\016\261\351\325al\324m}b\000_\255\3300\r^\000j\333\265\n\215\006\270\342P\251I\344\317KD\233\0277\333\330\260\367\220D\nB\237 \203\003\374$r\235\207\021\201\020/\334\202\234\200\211\014\006!K \252\204\221\231\010\324\270C\t\t\231y\022K\310 \362#\310y\003\310\036}oKy[\303\240H\356\3677\310\000+\331\005\337\302\274=\020\371\004\000\244\201\003\315\363\237E\303\236\236d4\317\275\225\026Q\317\0073\211g@g3\243>u\251\231\262\341\276\221\240L\354\314\3471\266\314,\306\232DCT,\270\355@\325\264)<\330`\300\031\254#\327\261\322q\263?(\360IB\323\005\0249\255\324\001\221a\245\000-\006D\023\030\316\021\300\321\335\003\346\2375C\230\263""\016\016\007\000-E\306\327\2337,\350\243<\316<\022+\022db%$\221-\241G\235^\\<h\024h\234\357~\275\363\240\362i<x\004\243o\210\330\233\347\027=xc\316h]&\"yC\225\025'e\372\016\373!\2444\255\"4\245\245\032O4\243\357\207\256\321\272\263|\r\352\335\223dp\007t\303\030\341\201\031X\330.!\2224\343@\341Pf\000\311\226\030?\247\016\210i/\241\206\023\206!\231\274TgC\214I\021\0234\220\032g\022\215\006\364\006\215%\255f\234\254(\230\014\301+\026\222b\002i!\212\"Jf\t\226\n\223\030\302hijC\336`\302\246\220\210\215\022\201\220\031bSe\031e\231\002\020`\264\000A\230\206E\210\341\031\204dN\"\310JF\354LF\231\020 `\223\215\022\314\2431w\232\207U1\005\240\214\3214e\024\001\006JJf\005\223\231\200\230\206T\006V\245\301\206\026\010\rH\233\232\177a\004\372\277f%@9\016\263\020@A\314\203\225\004SL(@P\021\021\014\211\024\002\021\016\271\336\207\345\363\236\2775\254\026\252k\335\353\275\314p'\237\341\214\007\356az\013\271\337\242)w\227\237\017t;\310\221\t\025\303\3724\365<\322\247YG\270\031\002\314\010\026CA\232\rL949\"a\0015Rh\215\020\n9\206\001H\321B\023\000PWqkE#\213\004\000\344\034f~\232l\204}w!&\241@\361\2144\030\201\220D\304\203\226i\220\007\241\334PI\251Yu\032\266\324D\2254\016fm\326;\267\230|\3721\nT\332I\213f\314-\367 \000\251\026\245\020\0064VV\270h+\004T\304c\2161;\201\323\230#\207@\300\300\240\210*\252ZX\201\230i\025\241\331\230\224\262\222\224\021\001K@\021\2069Nb\271S\301?b2\211E\030\232DPo\031A\213\026\020\345\254\363\271\265\206\234'f\234\320\216me\207\200\263\224\316\234kl\010\035\"Bn\321hnG$\3414}\262\0355Q\036\310\237Ouz\201B(\021\005S\206\375\ra\271x\013\025\201\000\230\357\355\323[\345\243\333\010\310\221H\027\246\3619-\231\374p\374 \036\201\260\034\236\275OQ\303\354\016\013Bv\004\000\244\220 \223'\215\030\270}\346\305\357\272\334\202s\266\324?\202\037\"n\271\356\203\277\313\273\016\340\240H\"\rFa\211\345\177\001\036\224Q\374\277j\371\270i\266\2618m\351\020\360\021\":\300M\275\005-\201\217D9\201\352\300f\241\303\030\236\352\000\024x>]+\004\355\tS\323\241\001\200\372\037\013""\305\207e\002P\214H\035\344\224:v\020S\"Ib\006\341\362\305\245\214w\206xG\365\247\230%\313\347\347;\342\377Nf\274g\262\211\213\245p&ffkU\023\020\323]\242\354G\200\027X`{\271\r\001\220\"J<\241]\374Hf\334Re\014\020\260\r\310j\020(-M\003\230\006M\200e\230\0308\0258\316\031\203\357\306\241\234\264\016\210X\314\240\240\027eRF\022\261\231\220\205D\014\006\207\005\222@8t\233!\264f\210\321\255\214\351C\210C\211Z\2264)\306 {\331\262\327y]}\215\025^\007\317\257\231\004\371\300\226\371\3727\273\000\235 4\365\340\342\321\231\232aMfF\200\032\361\327A\n\204\255\322\243 9\"\310|o\357a\270z\217\253\357\352{dT\202\222\022 \300\242M\350\021p\224;LL\000B\220L\220\r\312\rkw\276\272\003[\310\203\337\004\023\244%+\270\330$eu\034\031U\320L\321\270 &`\200\0356.\026\033\302\001\247\273\264J\357T0h\316\256J\320\276\003\006>b\305\264\273\275\n$\3151\021e\252\221X$F{\343d\243\305\222m\n\327+u\375\360}\347\324{\316;\316\216\tf\305;X\t\252(F\004\"\231\001\271\3112\003\334X\320\315\010P\356\022\321\206\230\270\007\371u\316\214,zb\322\304E\000CT\020\211\210\320Q\203A\021\226\013\205\"`4\212\006\240\032\233\243h!K\0044\211\274rBYv\311\234Q\255:\003\204\002P8\221\003JJ>k8\r\302\"\036\020\2572!\371%\017/\200\371)\217~\357\217\2278\352\344\n$\237\031\3166\000\010\241\335\302\367;\240\340\035>\341E\331\272lX\210\261\266Z\266\006\264g\246\333\220\245\352\251\311\307\022\341e\010\006\301\242\243!0\340I*\340\212\267\234\016+\275\261\224\022\263Y\357c\313h\304\232Do\322\240\004\031#\"\230\340\240\242\005`\232\324\352\361\206\262n6(\230\267\275\275\010G\034\000\2742E+W&\205\024\351\r\347\027\342\301\365\030\221\000D&\211I$1\20020\201k\030\014\032\206\010L\223\030U\242@`Z(h\211Bp\0232:\262\360\362\240\211t)w\t\202\272\342\234H\327\032$~\254\023|{eA\350L\324\205'\336\217\321\0030\232\374&\324\035\334\t\031\337\022\274\241\r\306J\350\201mq\217W\256\017\326#b\247\020\014\305\000\021\212\241\204\301\351\002\211t\007<Y.u!T\024P\312\222\371\036D\261\354\377\364\341\003\217\347\301}f\201\310\246N\271`\216i\377\345""\037\362NV\"\207\346i\177\245\353\016X\216\373\362T\005I ?Jw\241\3511\021\367t\344dP\302!\016\222\307\352q;\261V\317V\230\310\023@\252\220\020\026\251\310Bd\215\200\254\261\014\2125\013\305cN>y)\263\002\000(\013S\322\300\355u\251m3\\ \361\322@\334\320U\2413/\333\2611h\265\333\254\365b\367\202\241y\304\312\215`.\2221P\255\n\312\371\323\373\305\020\030\210\001\006\306\001\024\330\241it\322\237\264HlS\322\212\235\234m<\202\222}\240[\3430\343S`\353\0006\002 8\207\225'\260\031\\\355\010\304\360\021J\240\210+\356\037s\356\017\354\237\203\333\370\343\362\027\233\326\036\024\301\351\317C\243\010'}\021 \324y\005)\0065\226\325\222\241\245\212\014l ch\225\003\030\014\306\202,s\314\305\214\032\242y\231$\010\311\312*\326aQ\302p\341}\363\223\016Iv\234\221\264\246\345\242\373\000\365\"Ca\230\310\205\260\320\345\r\213\0140\020\361h\305.\2110\325Q\320\370$\0237\233E\270\210\204\366\315\n\"\2646\"4\210*h\213\030\250\231F\303D\343b\005\001\200W\224\r\003\251\233\032\3271\006\006\241\244\345\336[%\330D\331+IcZ\034Wi%c c\023eF3\020U\010\371V\201qj\341i\201\231\200\323\031\023\213\024D\316\013\254s!\213qcIi\300t\264\244`\336\262\"\343\014f\322X\201\220\230J[rM&\315\005h\251\343\016\010\323\311\242)\302\343\223\214\341Ha\232Fj\334m\025\230]b\200\306\005\231t\322\365\010D\337\322\222\033\321R\231Blb\230\241Q\361K\244\323\220 \375\314\nH\032\200\302\346\036HtN\210\"\324\305\032L<\000\224\341-\312\341'\006c\355\026<\035\340\033\314j\350\021\201X6\020\243\334*HX\230\\1\024BEh\231Q{\245\274\330\21672\\\212/\013\303\022h\247\002|\224\200\014\350@~\001\024\361\330|\n\260\016Kz\2172D\2231)EL\001\361@\030,\206B\256\317\276s\206\216\345<\037G\230\3710\3126P\301\024\371\240\322XN\177H\301\316\301\352p {:\0301\t@I\223\230a\210\027\254q\r\030j\265\206Jo\346:)\242l\246\006\353\001\356 \207!0\345\033\034\246\004C\254\035@\216\002\224\366\375<\363\241;\014\014\241\316p\254\344\3565\204k\377\2540bP\371\260\303\211^\364\330\354\242\3245\t\225\211CR)\037\376\177\243\367\001c\353\216\020?\362\202{\317\201""\360\261\202\357\213u\216V\265\2568\236c\026\034RPd\021]\322u\014QO\2556\220\026\250\3001 E\021\005$\0222\317\323\214Q\231* \242*\211\252\t%Hb\373^`2\216\251\364N\307j\277\325\316\332v\0358\272\007\030`\224\021\t_\\a\253CB0\205\240\032R\200\2140\310\n\255\271\205\022\021\003\036\000\321\372\371\240W\365\030\r\2001&\013\313\354\031\241\353V\220I\321W\256\312&\200&\022#q\004\272\003X \214\325Zj\245\203\r6\322\255\"\031\002+\205\004`\251i\203.\204\232\240\232\r\003K\260v~NORFw\265\364\373DU\351\335\007c\333f\212\027N\204;\310\212% \206dJ\241]\223\203\002\325\n\035\306\203pZ\331'*\355q\035\243\205s\206Q\263\025\003j\000\024\324\007\370!0\262+%hA(j\201!!\264#\263\031\347\277D&\364T'c\220(6O\263\212o`z\305\242\007\261z\030m\271\217\306\2274 \225\223W\354a\227\202EB!\366\320p\013\351\312\214\310\206C\312\312\232_\345\310.-\310\240\010uE\3101\311\030\201D\341U\240\215\032\364\017\327|\220\376q\340QS\220\365A9l\036\024$u\267\000t`\231\026\260\014iY\221\001\351\267\001MN\r\327\324\270} H\004\212\310!}\222\263\261\323\213\006\273\010\235\307\366'xi\017\n%\274\361\370\355\234\020'\341\276\311\317}\327\307\257#\344-\307\207 \036\362ldb\221(\231i\002eY\224=\231\033\004\327t\005Xl\347R\342\332R\243S\272\260Q\001\366X\227\360\260\215dJ\226V\334\235\276hm^\231\021\202\327_S\212xv\340\264b.\020\212\343\204Q\020I%\\\350\310\264\220k\020\324:\022(\210\26102\363V\261\324'\331X2\010\250\220!\211\232f\n\t\200\242\251(\262\023\320\260\254\222\030\247\n\271\304\0356F\3068@\202d\216(\213\206\367\2375\253`(\320\025\321\316\013r'D\331(\256(\207N\376\200\364\340\035\302\032\314\0273\014\231\242\206TUR\260\264\202\240\304F\233cQ8TQX\020\0034fJ\026\245\326\220y\002\000\002P\225E`\003\004\014\006Z@c\212\014\203)h\325\215&X\362\201\210\341\242\2441\312c\204\300\003\210C\201\223cpo\004\240$-\240\027\321\366\037\026\316\241\326\231\260\016\240b\"\024\373\371\325]\033\204\354\314\334\003H\314\004\225z\273o\244\177N~\331\363&\037D }/\204b\246\310i\254>y\204\347}\036: h\271\241\327\370\330\311\002\234""\"\3506\026y5\336?\014\263\344\315\030\023\033\017t5\2156)\225\373\002\023\342yE\222y6\303<\035\030\237\334\203\240\344\207=\241\365w\311\034Y\024\027aE\201aE\026\004Y\000\325\021\307\322J\\\302(\301\016\0244\240c7\371|\037\230\357\006\300\203\341\252\034\260W\023\360\310A^\226\250\251?Y\371\025\177#\371?\214\350=\371\021\324\364\267E\354F\024\310d\033\005\366\020\n\014\221\363\270\350a\202\351\230\277fCD\201\304\256\244\326\31325#\220\246\210\374\3602?\330LC\231\017\320rb\320\275n\260\231+\315\324\200\274q\024m\225\354\255\322l; \205\310\000\320\220\313\\\007\006.}\243\337:\022k\356\033\350\246\253E\301\"r\023N\327E(\214b8\223\010h{D\312'\3464\241\027?C\307\314\373\006\016\277\305^\200\366F\217\256\224\000\314\202\022!gw\322W\370\256\025\021\206\306\250\233#\226\322\0052\275\306`\010\257o\306\016*D\250)\363\244,\230\314\214\014RA'R?\302\016\260P\211B\010|9-\037\274\355CA\rz\213\314\021\017x\t\">\260E-\025\002\321\020\366B\231*\356\nA&M@\003\277ys>\302\355\2610hJ9\207Z\036\346\313p[\222+M\236\234\017.\207\212\003\355\360b>x\376\332|\225O\210\237\252'\313\346\275>\326\205=\311#\010\000L\204LJ\201@$\022\245zG\340\314\307\004x\007~l5\244\275\360'/\0342O\206\020$\200b\000(\005\210\001\244\007\221\3618\004N\220\211\344O\320\221W@@\200k\016Q\324r\224R'\361\241\307~\336\021\236\310\222T\206\032\001\206G\304\007\330\022\373\321\357Z&\216\2152\236`\234\2460\370\265\200\332\306D\245\302r\t\274\336\354M\333D\225\311\032ZZ\010t\373\262\203KJs\013\204%\367\007+\237A\212\036I\364\246\225\344\264\246H\264\372*\245)yY\\\251h(()ZV\014AL\2417\255h2F\202\204\357b\200\273\224\336\300\311\226l\024#\331fP\021\213\240\351\021^\330\350\322\225\177)\236\202\023D\351\307\303\232\305Ge\270c($H\211V)BQ\226\267\361}[\2262\351\243\340\211\273\003\321\006\241\375XN\376L|8\355\334\031\"\217p1A\ny%%\000\310L\240\372\021\371\204\204\3017&\345j\022a)!\002\030&\367\275\361\014[\351|Hz\317\235\245\212c\342\214\261\301JFl\004\304\210HXd\3000\034\023\363\200N0:\232\230\023TF-\3622\317\254b\310\304\220I""\273\203\334\360\354\306\355\345\327\321c\013\336\003\332e\261\305;e\222)\362\201R9\260\242\r\347\236\200\016q\340N\231\277\\\300^\277\265\034\021_P\271O#\235\313\251\207\0101\200H\004\302\310\020\300\333.\3758\004K?N\306d\340\211\216o\231X\327\355\233\205\220\215\250\007\200\221E) \330A\021\261\363h\217\223\016\356\231ME\0028\316\233*\2514\322TC\033\313\001Y\003\225\272^\3142\204\324B\215\215\261\246\333d\005-\r\253!\324\206\032\307#\223\023(\223\036\245\255X\350\200\"\022\204\032\020\350t1C@E(\336;\241\345\032\250D-3P8\215Y\236\316\n*\032\325\310\363\353o\337%\243\2768\266P5\321u~\323\177@\204yZ\236\204\t\022\034Z\213h~\310\273\013u\240\324\375D@\314_,\024\254\361\320\326\016(\362\356\317\320(\006\260\365!B\000\237R\303\010\014D\210\022I\"\030\202I\242I\010\211\363\010s\010\201\352O\2306\001\233\022\021\231\026K\230\330\002\022\355\366\331\245r\266\323\240\036l$r\372\230D(\177E\322D\334\200R\243\020\014\020\030\230\021\366\272\201(\266\221jF\252)\252u\333\304|\354\262-p\030\241\206d\310`7\265|g\200\270a\334\307B\025\"\2712\026\023\036\362\217\202\037PK\345\216\264\003\331\337G\232\032\205\351.\006\004F@\026`&@\025\332\266\203\272\033\014\025I\202N0g\202hW?q\251v\234D<}\326\017x\302k\213\355\227\336\223\327\025]\342H\211m\rch\245\207\023\2761\023\326@'\255\201@$\200\365\310\374\300@\346bj\002\331\212\010\270@\204B=\362%\206d\200b\367\022\215\"\023{\255\260\230# \020\"\205\267({\201\314\216\341\332\\\347?\304\25330\225\354\203\\s+\010\324\031\031\230\334D\320L+NI\305\206%\304\021\264\271BG\024\214A\257\253\244\027\2013(\254\246\300\232\222\"\002V \336\324\303i\007:\303qF\356#\207B`|\020\223\004fo\203\330\212\001\366\311T\1771\177ZD\303\363\030\213\037\203\002\2054o0\204~\245\314\0319\0109R\204E\230\337Q\330.\223V\022\004\243\022A\275fe\226`\231\007\031\240\321\226K\022f`0\020\231\211\224\0130\230X\344\230\345\025%fa5&f%!Md?VD2D5\206D\220\022-\020\022\377\332H&\242\233Y\226Y\231\225MJ\222?>\3370\320}\336\242\260\201!\000\003\350\210V\252)\025\242\375X\003w~\r\265=""\177W\033\350a\234\331\364\240\370\0109\217j~\350\0202\023\016\345%\030'w4>\301D\214\210\332\003\321\202\001 \222\004\212\20714\2775r\353\370\363\002\342\330:>\336\326\260\377d\034h\357\256\276\354UC\"[\013\361\2570!h\020\202\t\"%\"\205R,\004\250\201\020\"\220J\2241\002\244\001\010$L\004'\245`\311<\317\242\025\375*\014\031o<\322\025R\220\350\002\005\025\005\324\364\215\210\244P\266\315\252@\267\n\006g8\034\310\2229\030\013\221\327 \352\234Yq\3147\305E\252\n\355X\314\t^d&\271R\240 m\254\355\024*\2515\035\203x\306\t#\274S\\\220\351\240R\216|\016\204\211\020\201\215\r%\263\0042\004\000\200\243\244\201\347G\035D\220\360\\qsS>+S\017\360\004\003D\352P\317\224V1\362-h\373\370i\243x8\373d\346>O\001\363@>b\000P\244J\022\tJ\0231\331\261\231\202\353Pm\003\3675NP?\311\010\001\306\000\020\200@\036\252\r\000\341 g\270:Zx\260\177\313\371\317{A\310{3\245\227\256;\001\246!\313\322\376G\346\343G\260\037\026\n,\204`\220\222\037g~\001w\213\263_\260\300Z\350\356\253r\211o'\370m\234N\020\357\236V:g\276\311\257\346\226^\345\3575e7\334\026\223\006\322\202\2415\305\220\201\362,\r\254p`\252\226\226I\010+g^\304B\230\020\206.B\235\335\350\364L\216a\010H\300%EU\0211UQG\224cED\021U\310\245\207\222\275\373\n\001\242V\226@\203\335`\036\013cw\304f`\224\014j\242\251*\303\010M\034\037'^\007\236;\254\271)c\n\332*\001\244]?O\224\260\354\205\210\014ai\"\013\354F{\324k4\232\231\226\235l\r\205\247i\000ib\003\215\325Q\232\332\026@\014\033\330\177\277F\027\335\202\342j\217\336\353\275\247nE\210\2127\333\201\361\230\022\333\272\355e\372q\361\265\343\376\2608\0009wu\033\340\031D\372B\006\020\016\303LK8\301\305\213\266Lq\360\3050\275\353T@\355\265\276\023\266|'\355\372\375\032v ~\310%E\023\236\271\0215P\230-)\343\263zE\373\277{\357\230}\374>\367\357\341G\363\344\311\000\323\r3l\0032 \306-:\337\367\267P4\222\035L\314H0\326\300\324\003X\030\027\013\021+.\210I)\221\304\210q\302\201\331\214&\277\235\250\273\244\360\356\226\n\362\241R\004\205V\230$\253\261\231\377\340\237\032\235\301\322\214\275\271\030\325\227""\246wF\004\265F\2144\226\213\322\032(\"!Z\023\275\320\256\222\211\207j\231\247U5\\\3100\324\307\220\313\231\252\241\203\223S6o.m0\344\343R\313T\022!\262\2522f\034\021P\305\n\034q\014\260\2664'\310\200\3033\t\254\221Q\022\372\275l\324c\346\347Y\010\272/y8\342M$&|\227\231\271\215>P\352\236\307\201\355\234v\323\271\254\222\353\rq\256^\253\000\3200\036f\362C\343\3547\343\t!\t\027\354\222S\343m\214am\242\224\373!\211S\3118h!\032za\027\353\346=\002L\026YQ\0143\007$\344\032\260\326\222\0334h\301%\370\265\240iZ\020\245@\210\222(\246\010!BY\222\210ff\3471\202\204\373W1\254\314:f2\0010\304\024\245\tTP\006\243\0100\314jJe\202T\244\r\306A\035lSl+\272@\342i\003h\000\215D\305\211;-\210,\251CJ\320L\220\023\024IKB\302\222LC\022E-\t\231\231`\220FNT\023Nf\025\221\204cc8aD\020S1\365\261\241\2407\000km\204S$A\030A.v\031\207f\320\343\223\363|\373\333@D1u\010,:\227X,L\034s\000\215\353Uh\300\"\300\207\010\244\311p\212L\313\"\01300\210\211\020\250\203\000\202s1\203\r\332M\244\024\033\220`\300\266\265H\234pQ\242F\244!\021NX\024F\234\2151\252\260\324@\201\261Cb-\212\022&\343\023`H\323\033h*\220\243\215I\001\212\210L\214\302\262\353SE9\2525\232\264\33080P\304\0255\253\205\240Ac+H\301\351\344\314>\026\236\222\316\000\305\310\013\375\231\366'\247)\302~\326\362hB\210\202B\220\t\230\3201\367\351u\003\013~S\274\037^n.AYe\372\205\002@\200\334\001\013\203\223\370\323\216\226\303\177\211`\375\017C\030\030'\017\361D\022n\317\335F\337\305\235\006z\254s/\\h*\t`a\004\221\017\276\022\220\267?\267\302\000\210q\216e\277\n=\211\244:WY\271xY\215\022kr\246\225\024;!\302Q\370d\r\222k\032\006\250\202>\026\320s\211\2516HD\354\223 \035\321%h\255D\353#biJAZFG\006\240\305\345\367\331\344\315\322\204\337\002o%\332G\360\207\345\371\363x^U5\313~\005\373\362b\333\3564\213\2271\216\350\315\264o\230\362\216\233\240^\236\217\005A\374@\276\311\244\031H\021\240\030\200 2}\211h$\370\323\276\000#\265\"'-\202Z\014\003d\367a[M\325n\273EO\207\315~\270i\211\354q=M%\216\265\016\272\324\323\201`\2320\245v\210X\247\r\025C\\\234v\026""\374\236o\360\037\236\374\235\001!\252\272\324~\206\247\373\361\365\236\217%\243A\350\366\221\331*==\343\325E\210\nCn\033\336Bh\003;\006\004/\032\211m\312\215\014\010\274\364\306a\351M.t>\276\335\233z\304\250\211j\245\343{X\030fRNG\271\364\362({9g\315rkB\177\004\356\030\350\032\222\t\"!\3237^SA\256\244hN\230\277\267\2504\327r\276%\013\010\216\221\r\"\362pM\233\016R@Mg;7\010\264\203J\273\220\374\260\216\221t\355p\016\030\304D\013\311\244]\0060\264\215XAP\203\030F9\n\264\253IA\237\254\220\222!\353\207\332\354\3478\315\362\320\301\371lS\324J;\374<\217\034%\240\001\334\257\221\032\03042\030@\243J\t\357\234\010\353\237S\351\372\257\326\226\"a  \t\022\211\354\t\375\344\000;@^\275G\206\250\211]h\320\260\272V\210 \tO\205A\200 M$\240%\252\312\374\246\263\031=*\0004\216\273\037\255\357\004\377{\007.\002\222\033\320\200\\\266\006\323\317\363\237\332B\004\256\323\310\353\234\364\223\257\262\204$\025\t\220\211\244hf\020\020=\354=ZP:k\344!\017\346\271\264Lxv=\217C\324\200\322\037DZ\006 \222* \202Y\230\220\245$Z\244\250!\222\002\202J\010\245\201F\240\244%\240\242\010!&* \211B\224\244Ph&\230\002)\201\244\246\245\000\210Q&fbA$\200\204!\240\252\022\210\204)\"\002$ F\221\t\224\244\230E\245\244\023<(\205\366!\201\201\370Z\010\251\010\332\013\301\001\"\020\240\004\241-DI\010\250\302\020*\356\322\2512\000\325K<1\251ikH\213\353\315T\247\236<\270\3324\002\265\n.\242\234\315\302\006\304\3636\"\357\316\032\021\250F$F\230\021\306\000\340C\031P\210D\002\007\022\314\203 &T\200\204\202V\204\244\200(\252\242J)\344\343Hof\0269\206bdBPaa\300\200?m\022$\010\220$\220\014\343\313\327\346\335\312|ZE:\335\201\214\2200\025\326\302\016 \304\212Xa\t\222\242Q\202\030\220\"V\310\003\033\002\0050G0\304HFw\020\016\005,\360`\237\274\013\272\227u\013\270.p\356\013\2751-\302\370W_\017$\376\357\341\303\304\366\370\333\333\243\331$\201\021`\000v \235\246\215!l0+\263\032!;\243q\025\200\200\342\2006\310\031V\271_e\350v\3055_47($M\310U\024bX\256\362\311\256\265\254\313\346\025\004v\230\271\345\270&T\350\220\226\024""\206\333\220\007\350\177\344\347\273pk\360\277\034\017\334*c\017\326s\236\324<~\246\0238\242\241\332\032\345\346H)\025\252A\276,\360V0X\222mSA\t7\224\3653\3177\241V;x\"L\003\021\250t\204D\033\030\334\215=\005:\350\224\342\010\202hN[A\013\r\206\352\026\010\213E\267\272+g\354\244\264B\372a\274\321\2461\357\tIq\3225}4\250\306\366kAq\016.\026\t*\375;\030\262\311%\271\2460\355z\304\375\223D\215'JN4\340/(\370\341\024\360Rq\236c\241F\223\036jG\244\366\315\034\204\215e\215\205\033~}\022Ai\204|+\227}\360\357\027m\214\355\026\005\366\330\260Bl\231\302\216\307qL\007m\360\031^\223\207\212K\021,\310y\022\\Zp\332\356\331\266N\202\322\260L8\201]\016\025\360\t\351\254\344\356a!\241J\016\013g\035\236<\024\326\213,\341\331\304\312\034\270f^-\2329'[o\251N\263\261E\235\213\271\315w\265\203s\2342\306\240\035\317\026$9\340e\214\216\020d\016Q\003\316S\0203&\3234\210\322\357\036\360\327Ms\306\272\316jh$\214N 7b#!\337\235N\323\227A\353\211\330m\306\331\2167`\343\034\032\352\316Y\236f\304\235\205\302l\nT\024 \344\021\240\246\321\225\252C0\001\2275\216\035\214\026\033\302\010\235\220\rr\306\034F\236-\301\315=\357\203\035\233\020\263\267nM\330W:\332\230\031\243\2741c\032d\343\361\3143h\0234?>rs\265\306\331\371\344-\034\010j\t\007\216\031\345R\013\265,160\2148\\}\342\361\201\342\240\316LGQ\232\344)a{\205\236\260\327\276\374^Q\265\222\332\354bv\3577\2600\227\261\007\264Y\276\335\373\243\221\267mI\004iw\242\2414\241\374\334\210\315\261\302}\366\331f\233\2474\233\210\006e\221-\200\204.\000\320[\021BB\034\213QU\r\324\243l\025\036\236\326\036>'\217H\252\205Xp\323\357\227j\006\355\223t\266\035\034\014\306`\024t\350D\204\304*\022 b\030 `#$:\220\016W:pO\325\371nL\027S\201\306\3713\016\346%H\322p(F\033\3106\200\343\010\275H\376-!\202\325!\217\3312\234\307'V9T\354\\\267\233\350c\036\034J]\227\307i%\245\335.\224\326\252\014\242\247XqD\273\03534\265\353\363\032(\3017\277cF\363\007\301U\353\034\272\236\206F\314o]\252\341\210\307\242x\\\0130u\201e\0162h\362\245;\323\220h\247\217\n\207\267}]\001\343'fA\273#q""\270C\266-Q0\236\272\362\231\211!\242\275T\314\325\013\004_w\037\273\232E\241\327)HkRy\261\260\354\036,Q\254\032M\210\345\247\016\374%\266\234\211\032\034\367\024\323\251\260\354Q]\221bfm\360\230ecC#\254\203`\034 H\274\216\n\0311\035\322\242ns@\033\201$\000$\214/\036\351\322o}\002\254w\317\002\270\202o\005,\320407.\237\2167\226\265\267+:\265<\233\241\2538\333\340\"s\230\232+\312e\030\251\002\335\354Zl+\327D\"\261\352rMM\227c\220\231\346\336\335\367\234\345\324\351\311\315z\212\364n!DB\025\260\315\344\212*um\216[,\223\\\2078?\002\264\223\354\316\351\3333^\220]\360=\2111J\333\211\230E\306\016 ~ZJ\245X\031\304#K\277)^\031B\244\351\206L*Z\016\230w\226\343|\201\203\206\267\020\335\010Qj\244e\006N\355\243\266g\303\361#\177U\203;\305\346\306\002fb8\221\230\241\014\310\327R\017b6Z\352?\267\326z\316\365(\274V\022\034KC\356\1777n\026\221\217\361\313\211\264\270X0\304(#\276N\224\\\274'\014\0244\004\007\353Z:\036u\243Z\t\032\202\211E\370I\016@\r4\344\004\256\020\207\3034\207\001;\257\34501{}X\206\210\351&\r\334Fy\241\363\331zg\222\334^P\317:/j\347\257L0&4\324\356\277wm\364\353v\022\020\010\215\207\223\000\374\213\341M\3601<\203dD\t\276\"\r}\223y\202\350\020\335\003\020\344\260\223\2231\323PrK\220b\033\216\235TW\242\272\225\"\016\rd=!D\223 94M\306\3602$\264b\036\207F\003U\323^\223dC\027\241\314\371\010H\321YZ\215N\327\274\301\207d\3300RD\034\221\253R\243c6\026$\025\224\220\371$`\345\271\2124N\335\331\331{W\003\257sR\327\230,$@\204#\030\353\337\017\275\356\267\377$%\363 q\377\024\r\035\215L\026#\026\022\033\027\246\270\201]`\240\024\257\220/\244\304\206a\206w\260\230z\264Bi\232\031q\0064\206\240E\260\314DeaY\001\313\205U\336G|\217D\343(7\333\013\267!\010$\211K\307vu{\324\3356p\304\304\364\300\351\020\003\022\350\247\331+p\306\377S\r\315\275l\026\304\3074Z\273\371\225\250p\336\364Y\264[\037\341\263,n\006\364\217\332\210j\337\246\255u\323\265\315@\264v\336\206\371W\200<\342\\\234\236\273\323o\212(\252b\010}\270\277\331pO]:<0}\350:\302\322$\\\201\232li\223P7\357\220\371,X\261A\221:""\026\211\265\021\031\002EZA :\024\243 B\324\244q\003\204\004\2305 \304D\210$3(\265h\240\210\211\273\\;\276\217\270^:\207S\022\341\035\275\255w\373\352.\203\224\203\017V\n3l\325[t)\007\231k/\311\274\023PdR\322\372#\203\337\016\202\270k\210\362\362\366\000>\262\372}}K\276\332V\351\273\022!\"}\224hA\326\034\236\332X\274nc,&'\201\322w\235\315K\327+\215\022\205\354x!5\371\335X\364\002\270\260\016\234V\253\334\032\016\257\ri\374>\255\010\207pI\022\007\333\376\241\"\030\235s@\001S\231PF\325\254W\t\204\302\324u\036\375&\2535\262H\262\234O\236\331\225\241\203\005\021\025\301\006\323\251\240<\357\242cU\221\341\030\300\310\013\312\221A\334L^\315\216\033\231\356/\275g^.Oo\257\203l\007i4\211A\201TI\014\241\230\000dJ\254\006\260\\\313N\223\312*\003B\204\306\r\307\305\207<\253\276y:\250c\2056\036\215|\232\330\350\255\"D&Z\232\344\205\310\354\302\270\204(\306\342RdV\253\242x\343V\360\303\016\222\274\223\271b\016`rC\2269\223\363\302\033\225i\200\250i\020\r\\a\201@P\245\270\032\373\246\036\351\240@\006(\246s\025\0209@\356\016\352N\257C\355\221Oe\333\301\260<|\337\301\360|\225UUEUUUI2\250U\363\361\325\026\227H\302\022z\201|\371\366\260-\203\reE\r@$\251*\036\250e\362\371\346=B$r\271\320\271\371\016\247\256e\346\224\272A\371\3125\350XP\336(jl{B\304\003-\214\302\000\\\376Q 4\247\335\265\001n\224{[\201mR8\232\233\277\261\203\3410 5B\276\345\301\353tiE\331\230\227\221\022\032\376\333\356;m\204\"E# t\367\375z\032c\346\311\2413\337o<nL\370X>e\330\032\245\254\213\006\004u\203s\262\315\005\314\315d^2\307\204\304\003\276\224k|P{\212\333\346Mn\241\202\020\372~`\270\001.?\007\3410\027v4ZT\026y\n\261\332t\224\314\014\332Z\251D\026\276\t\360\345k\014\363\3121\241%j\212\302,F\001\351\355$\013\240A\333\027A\320\013\240\370#\177O\300\266~\035K\347\0264\330\275!\027\325\267\240kb7\260kL\023l\210\207Y\257a1\270L\024&\026\037\263\273o\301\240\271f\014\206\300v\341<\322I)\367\243\211*d\322#\231tQ\201\2241\013\270\311\317,Pd~o\226\217\272\022\014\271\251\305\271\330\t8\272\332&\340\030`Be\001[\025\225*""\311\311\300\t\246j\201\224\300\311\220\314 Lc\277B\2711\033\230\323\033\267\331\315%\322FMr\317TQ\340\244\300\016\302\303\353\203:a \023\013\254b\r&\0338\3103zG]T\006\332\365:G\010w\343\2515\313m\345\350m\273\024\335\024\343O\026\231\3037\033\032\261=\r>9\177\323n\032\230l0\013\024\362\316u]@\310\332\037A\001\321&u\272\235nga#Q\261\3111\241\246\352\021[g\273\275[<)Y\246$M\2464Y[0\272(g\314Y\000\326&m\214\022\rL\224`m\253\250\024hc\031\220F\306L\315\032\315\021\255\021\"Q\224\037\177\203c94!\033\342\033\304\304\304\025#\260\246\014\300\005&\230\255.\032\0325\272\320Q|\217-V\371\300\304J\023-RB\260l\345\246\030\263M2\316\261\224\233\2757n\001\370t7@\347-\252hdSZ\345\233\214\250,v\247\225Zv\231\263\201E\242\030V\303\266\207e&\206\262\2403\212\225\267\036\332\345(\\\260\272\306\244\327\256gL\200\3042\"I\330\016\032v\262X\275\025\006\240\031\272& \003\240N\307\213\017\003A:\220\231g\0032(\226~:p\323I\\\221\361\274X\206\321\260\323Cm\267d\n\021F@\303\026\027'n\230\366\231\026L\010\024\321\024\032Sr\326m\306\306\3505$\246\310}SPn\370C\253\016\332o\301rtj\351\266\310\212\020\3400\337T\326\322l#8\337v\027`\201&\200\3450\337\252!\260!\021\005RD4\244F\007\210\375\343Bn\026\202\202\232\n\000\241\002\200ZTB\226\202\212J(@\210\240\027\366$2E;\003\264\356\320\221:\r$ao3\300\361\216y\342\036&\344\307!\223VP\322\r\217p\026c\206\026\\\231\215\223\317\304\302\356E\246\266:\367\31597\225\006\021\234o\316\213\233\330E\t\004D\300T\264\304\010\021#\320\272\222'\253nW@\004\355I!\210G\2418\324\301\352\262P\035.zg\"\304\2243\276\312:\365&\022\3276\003\3363I\275#\032d\227\036\261\213r3\236\330\301\033a\214\313cr\357epV\353V\220\327#\256\007+e\024\264h\266\3269\002\273\034}08P\250\206/Bf\330\202\307(p\013\023k\325\302b\353gr\337/\221\035`\226\373v-IP\275\256^a\0006\270/W\236-r=\260\210R\255\004@-\"\264\2150B\000P\n\344\240x\276\200\355%\317\257\036\366\201\016\362\010\230\207\211\355#\202)\002\371\305=z\036!)G\360DKD\366\336\241\236P\226\302C\341\267\207-\231\346\032@\333\251)\303:q\270\035[""\310\3144\"\rD$\007\265\t^A\274F\335\214\342\365\247H\036\201\224P\205\202m\235\201@\360j%Y\320\356}\325n2\344\025\017\000\332w\346\224\033\314\367\204\370F&\337\342\n\240\221\0307\177.Cqt\300\000\322\206f\0145 1\342\n\210Q\372\266\017B\020;\244P\352\353\250f\230\215\331\006B\216\365\211\223\366\\sho\014b\326\003\275\272\322\220\301\201HB\233\267\254\310\335\014\305k\027\010A\324f\326M7T\\\267W`\033\360\353\327\241\005\\\332\202\243N\022\272\2255J\274\237s9\345ipg6\017\026\020L\"!\206\210\006h\001\307\316\226m\215\3519\026\204\325N\254\225`\303\034$1\273&:\2356\275\257XJ\200\016\324-`\362\374.f\334\201\025\220w\357\330\236GW\nA\00343\330\260\036\340\251\242\232\000\021|\341H\366\304\265\221\357\337\\~\256\322\316A\224\nH\307^16\0259n\362\274Lk\002\252\367\266\036\330=|\236\260\317P\232\023A\211cU\014\354RH\340\224\314\343\260;sQ!\370d\243\210\r9q\225\217=4zH\205\331\214\002\201\265\2203\370\033@\301\004\327v\244D\231\362T\002\030\014^\033f\014\032%\013\\\021\215\367\005\2109\375\201\304\032\035\031H\264\320\020\023\323\000\245\2004\335\210\214\024\202 6\201A\204N\177n F\356\212\332\r\255\351\030\241\215\216\321\220\300l8DD\021\243e\272\301D\245\2426\3019\331Ol\247\004\270@&\367oJ\007\252\021\342U(A\365\301\372\222+\251\323&\341]\300\241\251@~)\034\205P\304@o\022\240\235\010\213\231\267\004g\314\265\233\t\314\250G\356\343\226\214(\307\031\205\2209\010\331\003\030x\360o\204.+\254\005<\365\351\243\240mZ\"\366\363\020CS 1Z\266Om\033]t.\330\232x\310\317\204g:\364\206\343\235\216\254\224+h\264\247\203C\216>\227\0305\210n\037Y\260\247\300\354'\324b\336\244\320\301\370\177\003EB\371\251\"\231R%Ru_\035q,\2776\213\016;\343\0030\242\225R\250a\260\356f\235-}~\213\201\222bd\366\332}h%{\0134\007e\217\334\375\227\3508\210\230Q\363q\234\351\265Hqb\031\264\345R\246X\263\245\246_+s\331\247\256\262ys+A9.6\271l\324\324\322\203\033F\230i\266\207\212\010\306\356-K\007\205\222\310\352\311BH\301\003BKQ\201\210@N\204@\215\221\330(\026\n1\214\210>,\314\215(#\031\030\230\345\204%\005f\030u""\001\003\260\002]\273_\035\266&\271\253\023*\021(i\261\313\267\271\000\r\375\036\376\234\354\204\244\354\221#\036 ,<ZE\017+\031\021\202U\364J\216\022\210j\027$JO6A\354N\314\027;\361\034\020\370|3\244\251\262\211\271\3475\253S\222\034AO\207\030\2753\017\214\006\326y\307\2226\322t\376\016\026N6\312\220\363.W\336\2074zt\024\363\025HG\233\003.w\356s(\226\373>\335;\027:a\354\322\004z\357]\240\247\021\004\222\000\221\\\207c\351\237\207\341\237S\313\246\241\306\357\026\020\356\201\r+!\025\005\014)\323\350o\337\355\364s\351\\0\007\254\006\342Y\327b\352\000\030Y\020\214\010D\"/\353l(\363\256\204r\302\0172\201\013\022\014\010\037!\324\223\326q{s\260:SJ\305\340\032\241\211da\022Y\032\256\206\013\336\210\265\241\215H\036\t3x\021\313PoA\253\334\267U\r=\227*=\315A\2357\001\232Y\310\003fC*\204j\302F\331Z\002\345\254\2416\375\363%\225\013J\024\335n$\001\250\227\205v\303(\253ZeW@\002\215L\363\315r\206\014\302\234\367\003\357g\251\355^A\023\034\334\302h\"-\226\000\\}\001G\001\327\302m\213v\315D\022^\251\314\204\272}\337\024\306J\231\352\303e'\3746\237#2\2769(J=\364\234\010\226\336\360(s\004\361\203%\n]\020\246k\376=\001\271w!G\317\t\222\237\326\215\232bo_i\334p\016\302\030\273#\037\200\260@\351R]\270\272\003\230\nq\245\334\202\376\273x6\245\215\2335`\350\206\250#\373\314?\250\220\027\353gM\344\262\024N\204\016\230\341\361\266\311\334\271lG\327\322\2279\326/\304\316\263\201#\010\204\215\032\306\321\n]G\273D\305LN0\314N\313v\250X\324\212y\230mv\357\303G@\272\020\204t\t.\330\227B\027@.\204\035\004\323{\013\277\033cn\365\344\205\327\365\366\373z\250^AhD\221\372h\241\nH\nd\235\342\032\013\215b\202\223\367\216\321\000~\260\370#\225\224\r\010Xj,\030\224\220a\004\313\322Pl\333\222\024\203A+\030e\360`\266.\242M 98\022b\272\301\000{\264\016\177Q\216o\360\202\177l\thJ)I\244*\204\241\220d C\300d\254\363\001\312H\2100&a\2269\266\367\027\037\317.\274\244\022\371\345)\022R\315)EG\237\004N\350\007\332\367u\233\220\035\317 \022(w\020\177|D\312)\374\323\374z5\244\305\205\023&\231 \003%C#!\037\323W""\204\220\022\205(\010\201\230\006%\240\225\370\224$0\276=\261\267C~\014G}\000\314\000\330C\220'\343\2246T\021\014\240R\305\001\020\351\360\022\220\264;\301\000 \252_\376\321|W\237\277\240]\320\272K\207\321\n@\274G\212\267.\004 T;\202C\277W;\246\246\004-\205\202;<\364\026O\230\"PN\253\3219\002#\3621\014l\002`\0323\370nee\r\240\244:#\307\215\321\315\003\250\n\301ga\001:\232\312\036\305\302\024\235\220}\323\357\200\363\271\257\350\321GC!s\022\023\020\352\033\231\240%\021~\021\3769Oi\240\340\211\367~\021h>\3208*\036\004D\221CVS\273\261\277o\0166@\376&u\222\240ui\270\263\251\210o,\037\340\361\002E\214@\"\317\332t\241\344\371\376z}\221\216V\030\030\340\300X\343\216\0214\000e$#\0051@\341C\246\031Y\242)\t&\"W\253\227#\204$\2132\322\255\221\242u\225\252\003\372\000\"4M\301\2743\364\3761\037\300+\312\205\316\007:9\305\316s\236\376\217\203\021hF\003>\226\027\033\010\362\201-\226\223\262\210D\245\251\3159\325\306M~\211b\330\032P\277\330\376\"\200\365\270\322H'\355\365\347x\233\340\036\253S\364\332\231\027`\301\366\232_\037\270\232G\025\301|\220\224\002\010_\270\244!\346\212T\332G\350<C]\036\204\234I\016or\277\213Dl\023\323\330\373\250k(\236\266\224\267\215\232i+\001\311-\305\232!ST\004\373WZX\320j\326\021Ito\022\226\320(b\310\351\2573N7\304\307*bF\003\317\266H\246\350n\036u\260\324\242\234\234\n\034\216,\233\r~C\2203N\211N\221\2507\034v\221#\326H\337\357q\357|\353\363\211\363\251\363\213\363\200|\340\374\357\316\363\301\277W\267\315\347(( H\010\000\211$\226\204@*\002\022\002D\211&\251(\242\222\n\226\246\"\n\372&X\216\001J\n\223(\204\002\302\30104JE2\001H\264\2012BA\014P\001\346\373\236\220\202\203\227*@\356\003<\373s\2555d4\026\360\026\310X\230\325a\024\367\301!\003\353\210>h\334\210Q\000{\213P\024w\020\364\331\021\274dT-TV\372\277J\005\321q\000@\300\374\216\261+\275=\243\254g\\\304\224l)\330O\236\022\211\324Y|W\215\365\364\305\357$\215\331?R\226\246\333m\266\333m\275u\356\345r\364i\372P\2423?^\300\205\366!\007yF\344\240_\266\201\020\310\377\267\\\r\002\rt\203H-t\215Q\363\007""\233\017\305\347\037\245\347\364\317\315\301L\016JR\365\313\004P\347E\001\010\276+E\005\210x)f\227\017\363\026\021\267\257\032l9\322\321\017\010\221\265\305\212\211\366\226\200\240\370\366\231A(\177\034,\210\001\013E\017-\002$\237\327\343\221\331\263b\351\304\035f\017\nS\020\303\020A!\024\300\261\005Lq\275\007\244`\002]\020\200\271\216~O \247X\371\001\362'\220\362=\003\331\333;l\017\030\001\276\036\211 ~_9\353\267\266\001l%6 F\240\343H\3331\337S[\313\372\320F1,d:G,9\317\306\321Y\310\326\227\303\001u*\351\314 \366;\253\321\342 +\031\326\314\316\201\325\232\033R 4\264'\203\010&.\005\314\246tO\233\304\213L\2325\271\270j\343\023,\341o]kv\006\344w\275\013\242F-\033\332\330\233\2555\365\341\266c1\247\321\250`\3116&^\235\014\3228\327\0306\213y\233M8\251\232l\203\251a\230m5\330\320\320\225\211\020\225A\027\214\362\260\376h\216qH;8\323k\343\013\201\203\234\201\256\307Y\306\033b:\034pr\234D\221U8'#\300\310V\335L\302\250V\270\213i\226)T\213\030\203\206\221\255m\242\331\362\204\372V\211\2110\221`\302\004\341\211m\0036r\014\014\210@\324\210\006\241t\262w\232\007N\216\035\031\227\313\034\274$\026\273@\335\032\021\216\032\304\210\273`hx\r\253\215\220n\260M\243Z\217\026\031\206XH\020\306\007,8\032J0\002\363\013\014\206\367\200\351eR\216P\225\3376@\301\241\">\216\236\333\226\340!3\246\006\274\304\356&\253\004\314\212\252\252\254\262\253]\007\266\315\352\336\261\311\242\252\252\215\311\226\226\314C&\376\003,\326\203\004\342\325\312#l\024\336;\320\320B\030\224W[\273FU[S2\246\333m\362\205B\256\213pH\244|n\003\026\021/ *+\227\272\231\267\354w\310\261\2058<\201\271\263z\\$\206\254\n\300m\204L\3427\272\r\362\014\206\344vr\235m`\275q\005@9\203\"\212\215\233\354\266\310]6\222\241\0050\"\035G\335\324\237\000\352A\242\377\262\244\212}\360\242%Z\220'\345v\251\251$\340\256\300x\211\r\266\303\227+\376\254\0059\332Q\250\023\240\201\360\232\006\213\374\252\311\"BEH\304U\003\020\200R\022C1\001\"\222\022L\2614THR\244\020C!%*\2214\253(\301\024DI(\320\304\005%)(BB\264\0214Q\021@PP\0234\205\rC\020$D""\312\264\213B\2141#LC\025S\020\301#J\020@\310!\025\002\035\366\275\356\334\361\200\360\010\244\"`\241\246(H\204(R\226VPhb(!f\232J\002\"B\036\354\300\373k\231\253\330\332\205\354\371\010\000\367\001\214a\027\345T\310\013\334\"\224\343eaT&\220\"\326\361\274$o#y#x[\300o\035Bc\215\\:\226\315\207)-\322t?\366X\016Q\372\225\024\362\251\347>\217]\324L\035i\365\326Gs\030f\r\327\313\033\231A\006\001\006Q\031L\246T\214\251\366\272\\;\371\331\272\007t\263Q}t\305\014\363\223\251=\374\324\277\311\232\330\216\020\177\342\312v\354\".\305\364_J\372/\253\252\372\277\262C\245\265k\222\260U\244\025\242\260\255VFs\234j\032\376.\006\3107\306\303\213W\017\241\317\204\204&\035\245\342\031\331\232\201\235\014\314\224\214\205\212Q\251\tl\307\371s\255-_\255\276\257\373\272\270/Puv\247Xv~\\\224\340\247\024\344\363\213P\212\360d6i)JE!M&\211_\332\275\377\037;\220c\344\376\317\304\221\005*MT\177$I*&\\\210R\351N\016\352\357&R0R\236n\324\304=\375\335BV#?\357WY\245.m*\304\264\361\213%\352\322Wv\360\252\325U\271\221\024\365j\2561\350\2502n\035\222xz\273\273u\035\034\336q&ex\365k\341\31355x\262\261\344\033\206\364e\300\270.\351]DN!\361\346\342\337\024\325<\272\251!\211\273\311\267|\314|\227\307\270\314\312| \271-D!\341\362\014\227*\347*\245A\225\231\251\275{\263E\rKd\3348\342\323C\326Rj\031\206\362X\336\340\365E\275]F\261\235\346\346.)\357 \224Z#\367\377I\220\201! \ni\"\030\232\nh\240\210\"*)\206\2059\343B~\212\370\377\274\277\346\374\360\241\366\214q\"\242\250fb\252\232(\231\202\203!0\212j\225\222\004&\032\026\230`\"\"\"h)&\006\246\014d\302\030*\252`\200\244\202\246\"$\201\202&\356\376A\310\177\330v\330:0\246g1H\234g\023\273Z\022(\224\212\"\032\252\001\210\231H\204%\240\240\372\357\371\017!\375\0323\351\204_\333#\241\231\243\222`\\NF\214Lg\326_\243\373\254\200\375\374\377^L\032\210j\225\300\374\266o3z4\232\221H\206\375X(\002\226\222\201>\002\021\313\373\307\355\006\265\222\037\246\255\222\341\263\0240'p\214\\f\016\202\246\223&\224\211\202\030(\212\212\"&\252\246j\222\265\001\306\361\r\223\2331r\031""\373Q\031T7\250\335rE\203\023\313\002\267\214l\010\325l\241\200\310blpu:\265!NLA'\262f\017\3661\362A\361\226~|?g\2349^'3\213\032D\240\34308\210\340\\$\221\325\204\215\006\\C\250r\003\371\266\377r\"\376\312\024$3\257\366\342}\037\245\301\373\354FXt\261>\257\356\026\322R\032q\267\r\266E\313H[,\035\342\202\300L\222YL\341\206L\340\213\033[\340\212\246\321j1\326\023\tC\372\231\313\303\230DX(I\010L\277_\371\276O\315/\375/BI\222\201\313\253\204\243\374\377\330\254\252\242\204\252O\334\201\016Q\200Q\247\\B\031\n\242i\r\033b\373z\312_\301#\323J\355Jk\234\3334\360\202\323\n\301\346\001\255\004\313\322\014\025\355\314D)\003q\222Sl$\345\322\220}\272\233\371\261\375_\330\307\372[P\037\355Ow\372\215<Es\235`\272\322\014\246\n\217\"\335K\206V\264\326\337D\326\215\355_\377W7W\nh\201\030d9\241\214\261AD\231\305\304s\252\326\206\241\251\363;\235j\230\364\302\275H\216\202\266\263\226L\"\200\327\033#[\203\0330:q!\202\211vd@\306k\007m,\254\243\210lm\214 \333\254 \177\332|\377\366T\177\344\365\367\033T\333\302\327i\367\037\030\361\0251\377\337\237\303\311\036`\377\n(\020\345\230\304\332\246\247N\215VS\235E\300\315c\326`\271\026\255\347\252\347\252\304p\231\375\\+\326)\214\351\325\032X\2739\245\272\2347L\354h\241\244\306\263\245DF\006\352\323\027\026\006D\321E\021\311\376o\300~\017\344\377?\342?\021\375B\361(\323\277q`\262\254\343\3514(e\240pE\270BH\251\246a\037\375ZH\r\256\032\210:#\256uz\374\013\210\233\255-\261r\271\221\253\267_[(R\211\214\200\340M\276\034\340\0143\227\2231n\032a\304[\223\272+mv\210#Zs\210E\376_\275\370\014\3777L\375\357\311\177\255\354v\177f\314\347\002]\243\002\233*\313\204\337\344\317\341\034\326\340\377\332^v\360\344\273\307N\351\202\214\310\033\212xk\274\302\177\210Q\325V\033CS(@\223\030\260\333\267\n\301)6@P\267G\376\342r^v\313KD\273\010a-\333\220\2310m\330zC\003\243)\265$\205\2168\002@\t\007\313\374<~U\374d\315\031\373\372\375\355\212dh\377\243\372\313xiq\271S:8j\024\343#)\211&oG\360g\013\374_\342pi\205:v\314D\nt\351g\\\213\253\340p\241\332\322y\027\375\263\030P""\205\231\025=\213x\267F\210\334\3044\255\277\005\024\250\233\210-sNS\023%\326\2702\364\361g\376a\007$\024\332gA\2345\232\202;\231\263}GH\254\014a\327\360\376\026?\364H\217\374\305\374?\343\342xkY\177\213F\250\037\304\317\363\300\331\240\301\037\317\324\210\351\376\270\224\247\035\332j\310,9\312\261\347H\204\233F4\270\377\372\335^\027?\323\300\316\373\"\242\344\244\032m\276\342\2419\244\021\303\266.\2235\204V\262s\265\032O$4\335V=\226\3344\335\244\312\251\020\356s\250\203\253\333L\3736\026o3lb\345\332\332\325\324\246\r\246\306\366I\253|;\0216\323\356\\\023l!\307F\024\347P\222/\342\376\300?\234\376Y\t\376_\307\371\031\210\316\225\232\326\206i\376[gd\3229\377\014~?\363y9m\256\r8\326e\303\377,\356\335\333\376Z\2038\276?\373<\235\177\364\216yQ\004G}\363\023\254G90&\014O{\346\223\326\336\035\235\250\347Gm\342-i\002J\234\357!!\3307\263\264^\307/M\310qd\2456\201\374\007g0\222\337D18?73$\303\262\227\265\301:E\350D\267\334E\266-4p?\370\022/\343\243g\346\374\225~n\257\013\371\213\255\353\375\247\376\225\204\247\023\030\361\243\371\263\227zT\277\336\310N-\356rCl\322\304r\017\375\r\314\212'\231\tL\337\377\007w\342\003Hn\306\037\323\324\234l\354\2372\021\027\017\227\2753I\031\000\255\307\353\t\266\270\201\321Bi\272\276i\241\222c\306\242\220gi\023\032\333\326)\256&\236\330\266\230P}\301\331N\244\0053L+c\024\017\037\257\350\372\346\373\017\255\202_t~\311\244\235\224\3543\222,\234O\232\377\227\364\177\353\006f\371\321\303\0344\017\034\347\307\020\306\235o\236\\\370\010\005\322\352Nq\346\276\006\037\265\034\203\314\331\267\036\206\266\306\256\372\344\206\250\320\345&\354\273\326\273rw\n\337]\336\025\232\352HM\\\034Eb\345\025\316\221}\251\265\034\006D\243w\021&\263U\306\335\323bV\261\034\313\202\024\353\277%6[\260\26692$\315\200\230\201\t\024\273\256\214r]\312]\223\3779\374\350\317\350v\377\214\377O\344_\232O\314\276D\303\032wo\201p\330\231\241\347R^\367\360\336\266\177\367\350q\235\337o+\234\327R\255\340H\017\213\246\227al\003\234gv\306\224Rt\310U\263}\004R~\307\021\325\353/\"\024""\313\302*\233[\0258\363\016N\250\235\030\333\255E\177\305\307\327as\301\252\023\331R\354\360((\334\250\032\204r\340\317\016\345\323\261\013}8BI\241*\376\217\347?'\344\374\326\037\020\230\370`d\353\331\177\t\361\315'J,\377\236\354\217\371\3737\0359\301\213<[\211^\030=\246r\336?\340Ox\312s\346h\322!\2729\355\017bS\230\305\371N\033,< \2611\256:\206g!\331\311\354C@u\257\036\003 \256\367\277\r\321\250\361-\276{\2627\344r\334qG+\224W\016D\273Ks\333\234'/I\216\267z\272\020\311pp\270\354pTX\366\374\233\301\352\236<n\022\265i^2o\350<\327\360\373\034\372?\367\370b\333\347d\037\037\315\t\253G\317\362\007\320\261\032\371\276~;H\377>\234\323\353\233\206\345\237\005\317`w\177\240!\310L>\307;\355\370\340(\264H\216!\257\272\200\356\230\3460I*n\002\247-\355\236\301\360\247L$\332\302\216\332h\354W\270\372P\316x\266\343\310+\226\345g`\304\365\345\304b\016\205\344&\332\0369\023\\\3278\321\034\270\222C\262\301\303\210~\344\277\302\337\2316\317\224_)\363\0371\037\032\217\223Y\014\362\353\350\215\227\r\254E\252\216#\346|.\320^;;\233\205/\267\"\035\253\377K\036O\2409\316\246\376\235\363Ux\356\351u\364\270\243F\232POlW::\232$\322\035\233\253r\346-\327xqGI\tm\313#\010vT\321\013\231j\t\345\\\277\017\202\377\362w5s\316\221\210}\314\246\342\344\206\345AnU\360\265\322\256\3610\250\3777\341\371~\247\371>\200\237\243\347m\0370\372\372\261\r\244|\377L\350\026\334&\3076oz\372\232\230T\237\230}\233\327\023\321\260wm\2048\243\227>\231\227\346\2525WU\256\n\354\315\263\r\364\364\233\374\216\340\230\331\253\234T\304pJ\353c\366\311\2036V4\246\273{\263PWB\032\321\t\273\243\217\252a9\266\334\271\306\372\037\004\335\356\005\002s]D\010\303\316\333u-\314\037'\300y\257S\2147\324\276\0241\362&o\251\220\007\374}\237D\007\004(\242~\216Y92\355\364I\317\033\272b\225C\363\211m\016\216a\241f\252\027\320\377T]\364v\307\301\323\332\177\252r\224\357\016\\\202\261\317\364\261\016\217\017\213G\017\271p\\\3272\361\256\247\204\037_n\361\271\023\266\226\2447\220\255\356\312T\357H\035)\355u\334\242\210\253i:q\321P\351\260\236v""WKk-\314\341\r\342\346\016W\036`\3111\364&\001\320\303\246v=\210f\372\376U\037B\372~{I\261\345\241\265Rf\212hj?\337\242\354\327\377\262\005\2618{Sq\3163\350o\255:`\246=\255\003\274Ev\201{s\251\016\272Nn=\245\222\205\322\316\325\327\216\374\221~4m\034\002m\377\341\337Ey3\216\326Z\361\340<F\274\215K\3719\336\367\341\3721\372\267}\256D\025\341\352\365\270%\335\271T\230tn\023r\360\213i#6\372^\005\333\272\256\363\244\270^m\362\246<\320}_D\037C \247\366\301\364\243\354O`\275\264\350y =\250C\276\323}\234\263J[s%?\025\224\343\264\360(/J\023B?\376\220F\276\3342J(M\330[\024\333\267gj\231wo\266; ]\271[\310\302\373-\305T\261]:A\265\322(Tg]\345\2511\333Nk\256a\213\352#\204\016#\262\342_\370\334z\0379\257\220\363\372c\354__\327\366@\347\320\217\255g\265\206\377\215\221\371\335J~\217\265\365C\321\235d\210;5\020A\320\266u\233\250/\201M\253\032\007\030\307R\216\302\210\277\365F\227R\360\327i\316\307y\"g\272wv&%\014\256\n+\363\215\310^=m\340&\214\221\320\271\275\235\203g<\021<L\267a\334nS\246:{\217\253\344\353\345_ZH\225\365}\214\377R\020\276\257\273\366W\327\251\226\275\210\304\337g;\373g\255Z\032\r\016\364s\r\035v\337\022r)\354h{:\216e\313\t\225F\256\233\266\207\343\2074\2600s\035p\357\303\377\021\025\002\350I\275\273\215\322\323\302\316\265\034\2426j\031\214\324\301;\373F\343Y\\d!\245\022\313\243\215\301\343\216k\224\212\343\312\215\360y8\372P\217\227\352=\201\351\366L/l\036\323\352>\222\305\367d\323}\255\263p\321\255_\332\374\234[q\252\325\277\333U<\323C\237\310\360/\261\331\327>\334\271\360\232-\327(~\021<\234T#d\325\303\350\251:\353\2367_j\342\370\350\236\032\010\271\213X\273']\250\342\006\022x\021\336)3\206\2369w\360\361\016\272\016\270\2266O\204|\377\030\274\276P>\265\363O\265\217\247\353v\246\263\352\321\014\313\3543=\263J]\377\250\347Z\327Qx?\t\375\244\262\323\332\243\007\033\355\203\370\370\236\214\342.\027d\036;\320\303w\314n\316q\033\264\3536\320\2217XSo\0072\237i\273\325\023Bj\226\247\225)D\306\372\210\276Q\250>\233\373\017\220\371\241\227\3208\231\016\n\275~\314\372""\212\023\373f~\305\243/rmi\307a\314{h\037c\216i\267\364\277\nywCY\264J\024\262\331V\233\2316\202\276\247\205\366h\352K;.\010\341\213>\302\242Tw{\\\010k]\321\271\020\344\373f\r&]A\314\355s\032\345\373\231\177\t\364}?H\361\366\177\336|\352\321\354G\337\020\245\017\365;\214\276\267`\241pJ\215\375\177c\263i\2722\261\212`K\352\351\237\267%\220\306\376\307\221\373\216\353\266\377\325f#\220C=\2662\034\345\270\"\250I\270\354F\270\255YVH\304\301-Ng\177\262\017\013\213\276:\252\207+\2278\321\277\204\357\363\237L<}>\377\311\007\312\210\307>\317\255\353\347t\205\366;\034\357\351g\304O\016\351\n\237\206\256\2129\243\353\266\242(\341\336\351\323@\355\365\346G\331=\343\236\342un\303\274^\3631x\324]\2735K<i@\352\355\316\312\342\227x\"\023\351\331\333\344\376C\351G\325\363}0\037_\350\216\177\311\261\303N\377I\014\265\242>\252)\037a\304T&\366\346C\254f[\366\375\233\230\305\317\021\333\254\322\357G=\367\307\265th\353\242\003\272\236\357\t3\256\352\014\310\210\353:\226\315\235\352\373\237_\267\331\362\377\271}?\315\364#\332$\204\264\227\264\311\211\320\233\332a-\366\373z\352\2619\320\224*&\033K\252\016\010\352od\304\306\377]^Wi\010M\355\347\236%\331!7\333<\337<\362\216\017\237\375\201\365}\202v\177\2618Bd|\310\372\252\317\256B\254o\2654}G\333\037Xq\366\307\332\243}\277\024vd\250\342\332\016&\232\235\267]\367QF\267\301,}\264\332\327Fc\247\311\216\320c\3569q\351<\216\264h\177\035v\353\236\241\245h\361C\234;\366\204RC\237\354>D\204\230\027\306\230>t|\360\017\365#\346G\351\253\241\333\350=\271\020\2066\227\333\301\304a\264\354jx\324\375\217\265\n\037\227q\013\332\267\313\300\232\223\026\327f\331\314\021+\230\031-em\330\373:\027\333\032\323\360\203b6\207\210x/{\202\366\373m#\230\251~7\204\237'\263\344_/\362\223\354\034\373\211\275\251\207\372]\263\352\366\227\305&\005\366\032Pf\371\231/b\346\244>\305\252wXC\"\215\037\356+\033C\327:#u\355\251\212\256uG\005\252\337z\224\022\251\372\202\323o\222\032!\213\010p_h\361Yd\004O\311\362\177\313\355\177o\314}\021\037U\375Z>\337\267(5n}\341\026\230""\275;J\236\032\204Cq\366u\025,\361\355\373{\353\213n\227u\331_q\272ZK\027n\335\226\235v\374\367\343\307\004\003\361\006\033\251Q\376!q=\262\373\305L/\021\332\331(\3466\030\214$Va\250\366|\335}\n>\330\237\261\3779\177W\332\355\371\306G\330\237_z\371\316x\202\024\246\321\366>C_\033)\276\324\353\355?;\367:\321\033L\221\335\346x\341\337q\030B\251g\343\2679\335\345W\021~\026ES\334\242~?\214\372\333\351\3779\363\246\374\377_\264\206\257\267Q\3668Q\371\336\327\333|~w\337/\311\207\035\023\263\247\342\336\330Cv\tM\233\3559\246\336\2108d\016\337\237\227\355sOm\320[f<gPw\334\374\377\031\376#\331\362;$\307\317\364}1\355\022\372\003>\232\321\247\373\0375\306\376\270\304\267P=cg.>\355\212\373[F\263\261\326\275\273$\356w\357\034>\310\357\276\367\335K\333\273\302|\350\346&\243\274S\337\025\027\372_\022\366/\247\352?\200\371\375\210\250\017\243\035\222o\253\354\177\245r\233\001\n\\\273\177\256\207P\357b>\270i\311\324sA+\231\343\333\227\326\265\007M\256\275\261=\"\265\244\373#\271FT\317\020T#\261:#\223\306\216x\2238\177\204\371\003\351>O\3627\265?\327\364/\257^\332\372\362\352xt\177\\\210\242Y\301\023\020\222>\266\337K\332\375Q\021\251\337\330\211\213\337\030\\\272SI\325\303\327*R\206\366\243\345\366\177}}_?\266]\334\005\021\001\363\227\0040\377E\230\337E}b\372\370 \206ZP(\340\210\222C\372\355\016i\270\250\247\335\271\316\033\261\306\025m\226\262\255o\231\243\363\177po\321I\014}\t\317g\305'\263\346\314I\025\206}S\253{\366;\017\177D\023#\3756k\351\341\262\372\372\024<Om\021\013\207a\332\022F\267\323\317\307\360/g\375\237/\310\362\217\206_\365\223:eD\257\207\347\250\315\217\014\347\317o\362\212y\324bJD\022!\331\323I\313\3357\320\320\360\377Bs\234\037\253nm\020]K\224\377D\376\377\363\213\362\262\376\227\034\374?\013\214|#\275\374K\345G\311+AY\272\370\266\347\312\372\331\301\354&1\035-uq\2569\371r\205\317\035\211\\\203\266\264\263\331\303j\3365\035/\217\360|g\370\217\312\276$\377+\374I|?\235\006\347\330#\345G\037!\326uG0:8LRb\006\326\263\\uuI\346+\013\327\313\313\335b\366o\363~f\376\237g""\367Y\276S\342\375Z\272\022\370\250\325{\036'\330q\032\323\026\\\217\371\370\230\341\352\334\317\233E\021\316\217$&bEj\246\372\217\262u\270\302vP ~h\037c}\320\374\377\333\371\350_\234\235\306\373\330\251n\2357?\021\307E\362q\306N\227_\031\256~77{\323\035\377\244\376V\370?/\306}-N\025\371\024\253\374\261r\017\010\374\321\257\213U\370\364\223\376g\2348\371\021\304\006\005\330@O:x\347l\207\321\315ny\202\010\207\322\210\177\305\374\307\363\375\277\277\376\357\316/\222><\037\035A\361\310d\213\342\370\261$\377\356\370\376]\034\316vA\362\362\213Z\216x~\326|\037\227\340\377\031\372\310\374\202\374\257\177%\376}f\023\252.>Z\312\317\227\343\371\033^\311\305\354s\266\356\327$\376O\311\360~_\314|\021\354\377\324\272\310\371\202\213\"\334W\354\371=\2331\2516;\361\257\232\316\"w\233\353K\243\215m\301\371(\235\363\373r\331\250\346\347>O\350\374\337'\301\371\276+\371?vW\303\371\342r\252V\310\343\365\236\366\327\354\3371\306{=\235\252\214wc{\200\325\225K5\325\374\037\272\203\363~_\201~YT|\221?\001P,\237\207G\307\277\213\344\377\247_%\333O\364\376_\263\367\235\037\t\371>\017\212O\213\343>J*g\345\3449w\217\267nD{8\250\203\372\177\264\223#\344\376\210ho\310\177O\345\252\225I\217o\260\247\370\215o\341\303\215\264q\375\223\371\277/\365~\037\315\371\277/\344\324\025\250fZ\370v|\010\304L\373L\3731\306\251\037g\337\366\375\275?\251\227\3273\375\222c\355?\262'#SU\014\247\373x\303\354`\374g\335\370\340C\350\373>\2726w=\277$\010{}\277D>\207\371\376h3\250\372\217W\255\375\277'\257\367\361\036\235}\257\304\307\302\304[X\363\014y\017w\\\203e\360v\371\306>\236\206\375P>^ns\274\315\374\177\363\372\017\321\332!\374\313\375c\357\352/>\341\315\277\004\377\301\252\237\3769\275l\363\227\347\346d5\232\375\274\306k'\323\311\231\326p\\\221;5e\353R\244\334=;\326(\207RZt\221+1M*\252W\376\n5\010|\323\312Nda6\246\036\201\3652\352n\356\341\304I\217*!\336'5\306\215\031\2560\344\327\037\321\367O\260}/\364\025I4\322\r\025y0\177W\365j \223\306\177\352k0\307\375q\370d\246eW \\ \"\001\317E>\0066?l\217\3155\372\220Pz""\250\203Vf!\226P}\270\017\250\017\361_\272ER\376\177\363\373M\345\371?(e#\350\177\356u\352\227\256A4$\206a>F\r\361\216\333/\202\003\307d\367\020\301\235\272L<\267\332*\021\361\376},\033\317\344<\260\211)\017\366o\266\270\314\266;\360\202a\217\211\2231\324\206\332\177\3431\366\260}\220\\\215\267\365A\034\221n}\346\000\360\277\367\t\235\203\243o\3670\3777\275\005D\207\334\375\307\317\355\371\315\363\304\335 \360\316\333\374\033\341'\037\303\272eL\r\374\227\261\217\360\211\016\230\360\2232\030sz\006\3676\370\301\361\360\220_\266$\235\246\357t\377\017\0318~\t3\207\366\257i\n\024zf\302\202_\234h\263pD\372\220\315\361\036\303\213\245\3671\342&\201\003GPgm\341\201\217\374\016\377N\333z\233\036\3036\337\343\325^\320o\334\3046\\\371\027\341\237\233\373\332\377x\376rQ\226m\235n\217\232\250K5\r&\312v\261?\311\374\r\264\177\201\252\007\276=\231\031\215O\340\375o\273\345G\307\227\362}\315\346\317\366\361\372\272\231\265\014A\322\371\350\355~\2179\333\233P\372\017\331\340\366\371\365O\353\270l\324J#\377n\270vq\036\200\305-\035W?\177\254\3441t\327\024\377o\201,?\230/~\220\375+\364/\340\274\337\274\377\025\274\277\363\3261{\277\273\347\354\363-m\217\271\217\303{\222i\241\332\204X\214\234q\356'#<\224\322!\030B\177\242~\263\r5i\344\224\353ZC\227p\345O\301N\023N'F\362f]TD\270\223\220N\037\345\330\344\275\"\223^P\277]\256\232\3277i\270q;\313\351\345nq\346\336\325\021p)\227\rTS@\345'\212\223.\256\225\010\271\273\026@\361L# uV\364\250\242dwpI]\254\0354KIa\241\343\0347\253&\261\232\316)\262\266\277|\324.\330m\326\200\322\325\271\016\366\357N\235T>\263)8\321\213\372u&)q\310k\366(\251\374\344F\370\343!`\346\313\300\250\201b\312K\024c\202\213\022 \332|w\247\205\020\265\223\251\366M\357XLE\247FJ\250\235\016\367J\030\t\267`\226uNZI\325\335\310\244\270\207\230\204\331\2274\212\310&\014\264\351B\0354\025\223T\305\\\025YUWUP3\302\037)\341%0\324Cc\303\377\242n\332\355\344\275]\376\374C\372VN\263F\246c\207\250\207y\214q4\234\333\027N=j\021nP\262.^=OU\274#(\201\330\234/N\t\305E\336\023\224DE\367""\203\346\260\304\321Q\t\265\241\366=\264\221T\326\203w\211(\333h\264\021\373\033+\017\332.\010\335ly\331\261*^e\337\270V\372d\363\300\345\222A\023\002\331}g%j\220\361\254R\372\316u\250\314\252J5\255\032\025\030\215\030j\255\362)\tZe.@\230\301f\025oUI\026:\306\247)>\037\354\262fdEB\037=\325lD\353F>\2676\212M\375\201\363Z\313?\n\342\351\232\3105Y\017\373\027r) \342\247R\363\025\246\311\340*w\215\232\315>S(F\262\035MDc\3329N\245\307%9\202S\220\211\306\262U\325;\226\231\\T\250b*ZY\347DC\216\260\267\234D\022\306\332\364*\304\336\346\362)A\257T\024\264\344\250\217\341\314\0274\367\270:!\311\253\236N*\370*\331\016\030\375D)UW\020-j^d\300\241t\\\326\262\375\222I\242\370\016\343\326\327(\372\271\345\024k1\017\247\226\330\267=\253\222r\223\004\240\\e+xb\007\2468w\274\007\004\201 D\030Y\363q\312\312-\345`\220\223!8\340\306N\346RO\221\2742\322\213.\312\325\223\246\272}*0\204\032%Ld\350\307*\335\256^W|.fN\357W\326dP\212\323\222\271M\023\020K\234C\254\346\245\026c\221\245\241\314\0241*2\345A\242\017Q\033\335\013nt\245)\256#G/PC\250\377\266?\351\367\221\212\364-\256xMiU\0250\234\203\201\377\256T\337\010\310q\335KK\016yod\261(\255\304Bwgj\231\257\356\252\253A\274\312\357\204W\363\350\310\323\336\032\270\346\204\024nu5\227Z\322\254\326\250\227\244\207\273\275:wR\211\344M\234\214=\321\234<\227\251x\213k\227\226p}\325\217i]\360\322N^L\276\207\326\022\373\033\347Y\266-\232\033\203\034n\020L!\305|n\344\320\253.\034\271\232\341\357C\305\017\"m\215\"\324\020$\275po\031a1\3735\307\272\023\r\010\323\267\022'\242\037{\312\253!\257\003\345$\230\374\267,#rdt\270\272\326,\277f\23736*Z,\330\203c:\360lx\376'|\323\364\237\342\353\213(\232\203oZ\276h\356<c\3361\217\301Ww\025i3\222qP\343\332$AG\177L\310&\230g\017w\307A\022Lx\346\254\2674\315\371\274\177\216\341+\205\313!QUE\3154r\351\350\323IK/!\276\2714\247\370\276\356\343\213\270Z\005\303\261\367)\340\316\t\230)H\363\3729\337q\233)\322\021\374\364\322+gI\020\346\366\315\314\244\321z2\352\241\241\353\023TU\202l\027\272\231\361c\344eL-\032UbN\231""\020\257\013\212\312\254.\242\255\311\231\254\251\2231^}\327x\270\323\351\361\365\002\214jY\204\2275\002W0L\303\312XT;\266DN\274Z\325#7\371w^\327\022roM\336b\337&9U\371\360\312\3216>}\330\246\213\253\324\002}\244\362\256\336\225\nn\236\204/\357~\376\361\245\337\037c\350\204*\246\3317J\247s70V\"\346LxU4MFUD\274Vd\231D\225\2217\230\371c\335<e,S\022\362=,\224\311d\020:\207\306\232\266z\302\310Q\223\237\263\247\307'R\262\211\324\020\365\247\207\304\023\225J\242\022U\026\356&AV\304]\305\313\211\016d\021BI\024Yi\236\245\210\212\314h\310OB\250\251\211*\246\"`P\214 W\213\022\207LQHw\234\026:x$H\212\231\241J\251{\312\227\304d\3376a\017P[\0313\251b\250r\021\242\231\337\366\250\321\2302q\005\t\016\2463(\235\025osM7R\364\010r\255\313\252\2741(\233C\271d\221\005#\310\321\373\234\311\233\020\266\3737bF\254\267\375d\234\346d\333\352Nu\006oL\311|\237\332\377o\375\1773\304\177\360\375\252\376Y,\231\231\274\326cx]]Yq\345,\262\334\272\311\255G55\254\232\2175p\326\262\333\251\223,\310\343vhz\376l\355\327\313\333N\374y|\034'\246\261\314\247\"[\357E\242\375~\345Ch\327\356\271\266Q\220\242\263\334\223\206\331\250\274\242C\022H\342\366}\221BRO\277\376O}~\202S\325\361\251]K\272\033\277-\332\331\300\313\021VBa\256\031\rk.\331~\326\353\327\027\351mt\331\213F\035l4\365\376\363|\332\316&\273s\254\346\021\2125Z6\321_\020Q\025\245\023\\46\325\226\245 \336\342V3\363\177\316ih\006\376\257\020\335\206f\014\245\030\206\232\345\376\373\350\326\262k`\310\272\370\303yk8\372\224\323Zm>\007\242\004eX\354f\377b\3323\303\251K\263\230\261\347\333|\\\376'I\243D\307\313\251\2064\357\373y\360G\355\354\266\214\210\374\362\373I\377\315\353|X\266\036\223\2639a\203\2545\226\237\332\327\352\320\366\363?\r\344\277\2518\274\336\267\237\277{\263\212\340\367\014\231w\232\276\353\027\304\374\031\256b\034\326O\302[\254\350\372qv\323\323]\267\336\302'\227\217T\265\364\2167\220p\377\377\305\334\221N\024$9R\222\302\300";
    PyObject *data = __Pyx_DecompressString(cstring, 57267, 2);
    if (unlikely(!data)) __PYX_ERR(0, 1, __pyx_L1_error)
    const char* const bytes = __Pyx_PyBytes_AsString(data);
    #if !CYTHON_ASSUME_SAFE_MACROS
    if (likely(bytes)); else { Py_DECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) }
    #endif
    #elif (CYTHON_COMPRESS_STRINGS) != 0 /* compression: zlib (70617 bytes) */
const char* const cstring = "x\332\354\275iw\333H\222(\372]\277\002\207\363\201d7\305\021\251\305\262n\311\367\272\354\362\214g\252l\237\262=}\357\321\321\241@\022\224\320&\0016\001Zf\325\251\367\333_\306\222+\022 @I^\252\\3-\023@\256\221\221\221\221\261\366\007\375\203\376\301\220\376\014\340\317\241\370=\215>\036\300\277\364\007\037\367\002\376\357i0I\227\233 \235\005\371M\234\005\2638\232O\203\3338\277\021\317Q\260\212\226\363p\022M\203|\263\214\366T\2457\341*\\Dy\264\312\324\253}\365\237z\225D\267#\250\027\234\005\313M\270Z\245\267\375\347a\036\276\263\232\3725\312\327\253\244\320\216z\246\001\351\026^\300\263\256\376\323\247p\261\234G\305q\250\027O\236<\t\342\3052]\345\262\215 \314\202eh\025\240^\316\305\353>\376\354\264?D\233v\017\236\343$?\034v\272\335by\365\306\032\333\017\242\346Y\200\265\236\350q>[Ea\036\001H\270\257\361\206\201\033'\327\010]X\2020\t\242Oq\226\303\2734\211\316\366\212\235\216\240\211s\372\335\207uB\020wh\240'G\336\201B\235-\203=9z\242J4\305\215D\340Bc\334\020e\304\252f\371\352;*\330\250  \213\300\331\025\035\240r\247=O'\037\332\315P\001\252\250\321\356\214\013\353\371<\034\307\3638\3374F\t\254:\007\264\030\247\351\274!^|\253hQ\250\323\227pP\237\336\255\326Q#\364\321k\260;\026\361 :/\302y\026\355FS\016\207A\222\3468\234'\376\006\212s\305\356l\354{\032\\\257\322\365\022\207?\023X8_/\222L\264\037\204A\216\370\222&\301\355M<\021\230\230\006\313h5KW\213 \274\276^E\327a\036\247I\326\247\031;X\350``\316\250'\247\362\316\032\326\313d\271\316\271\214\350%\372\024M\326b\021\000\332FOb$}\254\" \220\021u\013\322U0\027\300\277\020\277/Us\257x\203C}\234\234\3309<1j`\235E\243\374F\254\3644\343\355\320\013\246\321,\\\317sB\007\331\322?n\"\321\310\n\006%\352\004\013Q \246\212\010\257\025\254@\037J%A\026\345P\014\252\007\035\350\231\033\354\366\364\026L\305\230\t\246\253i\264b\220C\331t\235\003\004\304\316\277^\0138&y\024M\031\256\326\006\263`Z\271\261\340cN\033\n\273\354\\\340\353~\277/\221*\354\213:\341\246s\321\n[\275\200\376\214\325\237I\353\222G\356\2532\350\005\303^p\330\013\216z""\301\261Y\360\262\207\3445;\277h\301*AK\037\303\371:\312Ds4\237\377(b\033\357\031\030\262\350\002Q\003K\375\270\351\344=j\207\266\310\017\022}\346\361\330*\027\244\343\177F\223<\010s\030\005\237\006o<\310Z\247\253\276\254 \200\326\221\303\027\023\311\326\213V\367\222FR\304c\250\2138)\346\206/\250\342H\324b\026@\255\240Q\376\002\241\017 \007\210_\026*^\\\034\366\036\365\216\371\313S\334\355\304\317\020uZ\204\033\244\002cA\227\322d\277\260\341\237N\247b#SY\001\234e\232\305\270\225b\300U\300\274lr\023-\302~\323\323$\016pR\005\346\3019\035\266\235-\324\373Y\360\026\377\275\367S\205\232\247]@\277y\033\230x\255\217\234d4\217\2563u\352 \273\327\253(\037&\361B\020T\252@+/jHD'\302\226Eb\204\241q\236\010\340#\334\243I\232L\325\2028\307\006\257J\214\325;\203\236\321i\364)_\205\324%\020\256\221\350Q\237\0374\003\023\337\340?\254\302\307\276|\307c\2670\326\346H\246\222h\002\252\374*\206\273\232\376\030\346\342\034\260\360\310\300\234\2478\313\025\226\014\306XT\020\264\025\242@dp3\334j8\235F\323\036\221\277U|\035'\341\334\252\254\332\345\275-\332\232G\263<X'\223\2330\271V\004rw\244\245\025\232F\237\360h\003\016\313\032_\336\267\321{\244\317\234\027\026\373\201\355\010N\200a\t#]\206Y\006\367:8\031\240M\334\262\342\275\230\362\032\030\271\331*]\030\235YMM\305-Nw\315\2439\013\236\002\351\205\316\221>\210\367\321j\022\363\211\211d\331j\344\031U\243\266j\357Gc\231\255\326^\271\013\253\026\223'j\256i\377\336\367\261,\020&S\361\021\276O\255\357\323\031\354\361)\336\177_\000&t~\227\233Y\220\320!\035S\275`pppY\334\317\316\177jW\213\232\255\027\363p!V4\005\362\377\237\351*\213\340\307\217\2538\317\005\334\305Y\276\302\203\341Y\224\344\261`2\242\326\345\0376/G\300B\372c\200\266\017\253?\242\331t\2463\203^\350M\347\020\204M\024\256D;\027\303\203!\234\275\007\303!\374\035<\306\337\203\313b\247}\261\024#j\252s\320kA}1T\370\247[\340+}\253\016%]:\342\247.e\224\304Zfj\216\206\217\243\307\301\333c\227\315\213\005;\352\035\367`\265\212\235\230k\"\227\304]\021sA4\030_\373\210L\221\2528\200\267IQ""\025\304\356\000\235\207\231\371\026\222\216\254\213I\314\013\244\234x\325\2464<\267\030\220\357\304[\023\357\036\336U\200\361\345GI\3143\0175\317\356\201\234\333\267,I\310iY\277S\360Z\024\234\200u\256n\013\017L\273\261;?\355\276\200\177/\213\324\333^\344\207\241\333^\302\355\241\334\006\001\363Q\260\246$\314G\275\025Q\252$\3336\021\362\203\352>\010\366\275O\330K\264\005u\014a\353\303\306\231\306\023$!L\256P\026\"\260Q\022\022A>\234;X=\362\252\2728\303\036,\242\361\337N\037\213u\2067N\032\302\376<\376\020\005\377n\223\260\361&\0274\343\033\224=W\n\002\305\276\004\230+X\241\254\252\251\354O\326\356\374\016\362\206\326Y\320z\233\212w7x\370\340\024\302$o\375\261\253P\260L\026(\273U\237\177\037\343\364\305\275\260\355\031@\373\217\373@E\367^\377-\340\"\013\r42\376Y\205\023\326r\232\250\314##\301\277W0\341\"2\r\016p\371\325z1\216V\200\025\360\006\004\306L\016M\214nJy\345\210\324h=\244\270]\332s\333\021x\317c\261\0303\220\034\207\253\353h$a\263U\336\312\024!L\304\270\005\355N&(d\306F\202\367\357^\234\n\224\\\305p\302\354\317\243\344ZpWcq`\2556\310>\032r\307J\221\255X+\032\325:\237\235v\010bR\253\3331\307\313\353\010;\001$\323\212M\025\3538Q\343DF\322\026y\262\000\267=KS\201\032\355q\270j_\006\177\013\216\017zX\377\334\031\200G\356\3723|~\213\203`\221\204-{\205\n\022\221[\242\233\226\304\322\326\030\370\230=\205\260\245e\3607\035\205\316\212\335q\255\024\223\337pI|\213Q\272\014F\027\273\254\006\376\363[\373R\257G\351J\334y\021\304\303o\005h#\304\227\313(\261$\30703x\305\n\213\202\330\370e\"\210n\222\257\302\014\325 o6\371M\232\264\263\340\352\n\356<\375\020\033\354t\257\256\2028\017\246i$/\225$\033u\256\213\342\242\024\205\037\245\302M\335,\211\020\013\236o\221Nc1\262\346\227\310\373\021S\273\027*\206=\336\250h\242pI\304\023\377Oxj\330\250\301\362\350R\024\361\236\037\314\0241\0221n\324\024q\333\255\354x\244\230\022\361\342\025\203a,\356\030\032\325\274\363\330\261w\027\226Jf!\301\247\224\225\273\240\367_@L\375\216\225\250\225\362j\251i\375.\270~X\261\207\213\303L\006\356.""\004\301\206\245\034\244\r\r\264\353JA\232\355G\237\314\3443_\367\353\311Y\236\256\256\327\013Q=hO#`\325Q\247\335\016nB0\330\020H\276\202c\010\367p'\372\264\024\017\021\020j\211\236\317\243\217\361\004w\304/\321\"]m~\t\223\360:Z\365\202\3534\347mKW\001h\340V\264\371\352\375\317?\343\373\276\240\201\263\2403\217\223(\030\014\016\206].\215%\351\267U>\013n\243U\204\212\351\020\364\325p\032\200M\006\361\305g\301\217a\026\375,\330\002j|6\017\363\\\020 j\177x|x\334\265\013 %\031Q\345L\026;9\036x\213-\303\225\200\320(N\304\3251\322\245\207\217\273\244\275L\350\232\240`\372c\014'\367TP\005`0g\361'\024s\3033\314\356\376I\202>\210\325k\305S\342\207nI\361\3768\316G82U\300\300\327\037\305Qv\312\360\204\255*\246\271\334\360\354\217N\017\305\354\327\263\231\230w\026\377\026\251K3r\372+\261>\202;\375-Z\245\2725qe\376V\240\"\206\352\200\345T\013q\336\274\027\224i-v\214)'\230\344\363\rk=>F\317\004\206\302i\330G\334O\223\340\331\315:\371\020M\t\255\341\214\\\245\037c\344\350\004$&\351b)v\035\233\177\2053q\"\3133\014v\300Jl\254\217\240\021\311\304\214E'\323U\272$\213>\201\342\253x\274\316E\177`\310$\276]G9\237\221\351l\226E9\335p\246Q\"\356\021\244\001PE\351\016\223\307p\221\310\326\343\311\034\316\256\0148\205\237>\211\235\223\t*\000\220\022\345\3339\260\341\037\301\350\340\315\346Y\270\314\326R\324\217V\217mQ\004v\245,\343<\016\236S\317@#\262I(\320\003NmZ\375\354&\204\013\215\350M|\304R\2622]p\3206J`B\360j=\237\277\245\312\362\356\225qQA\224\000\r\306\204\212\310\\\240A\313S\304\n\252\304E\341x\206\273\001\242\361\"\314>\000)\303\261\301]+\023\304-\236\211\337\370I\236:Hc\362x\021\231m\214S1y\346\350\240\252\224!T\225A\023&.\240\257)0\224\2768\000\t1fb\242\2137\210!\330\316*\312\004\335q+\335\n\342Oz6YK\214\027\320\r\326\032\266\334>\330}r-gV\000g\332\257\267\300\237\301H\241& \005]8\304\276E\315\032/\237\251\237\033\215p\247\215\260\333\321\010\2208O\305Q\332w\272\302\231\303\rm\204\035\301\344\321\026]m \270\317\321\330\265T/\024-\200U\234:-49x\033E\301\331l\235L\316\256\344\311""\014[F\340}\177\"\232\272\302y\2573q\3564fns V\2714y\227\324\241\027\274J\023[\307\365N\336\274\365\330\363Ts\252Y8\223F\260Q\230\224\030\3769\306\177\0025&\037\230\000\000\254a\307\005\221\230\336*\023\033\022lb\304n\024\357gs1a}\231]\242\315\231\350\014\300\370\232\236t\207\205\201?\235NQ\021+\256 \330a\306\330\2711\353\327\347\222q\376\006Cn\022\266{'\340\304\"\021\3078\241\216F,\335\000>\026X\331K\301\275i~\366\262\353\251\337\267\220\317=\0014V\242\316\007\021]s,d\213k\nY\354\266Gdr\005c\344\316\000@p\355\234\256W\310Iu\332Y\273\333\255\250\352\014\217\253\341\020e\033\027\23111{\033Y\367\220\342n\332\321\022\217\267\205\222Z{d\024,7\221[\"O{\312\016\236d\351h\216\n\000\304\013$\013\325\027hF\342\3336\025{\346\231\332(r;d\200z4\303u\202\215\350-\224}5{\305\274H~\277\0046\263^*\332\036\335I:R-\356\247~\317\202\366\357\255\030\254?\370~\010\272\207\213\337[\342h\235\202\026b\005\364\001&\0078.^\000\227\001\026\274b\316\271x<\350\241\374Y\357\344h\006|2H\245\014.\0007\213\271[\035\262\262\330\214\356 \215\263\211\316\0162\271B\r\337J \211\263H\304\271\032v\267\221Y\223A\340\276J\343&$\261\304k}\247\255_\025m%\321\314w\252ZW\264V\024\205\375\211\350\251\271C\277)zJ+\321\214\236\372\205\222w\247\244\017&\206\204\375\215\267S\324\355\310' \244\202{\375\227X2\270dj\365\010\n'\262\365\022v\"\013H@\342b\231\231\020\325\212g\250\036\024}\242\330\"\277M-v\030h\345*\nD\027\341\2741\225&\002xVy\2129<\036\322k\020\345\254\300\303,\0049\205\241\312\200\021\217\014#\024\233.\333>t\346E\321\335f8\035\220\023e7\351\032,\210\"j\033D\031 \"\235\317\033\350<\304PG\330`\301\201\363\001np|s\343\213\233I+\355M\3018gU\262\010\344\033\350-\207_\317\323\353\332\024\263>\033J\202\262\316\005\r\276'\007\264\235\244\027\376\223nkl\312\002\036q\324\226w8\243\003\032\020!\361\010\337u.\274%\007\017>\364\312\301\357\322\234\304\340\363\306\226=\232\363D\\\315:\370\320\265\235m\253\013\217\016\272%\376\252%\345\007\315\232\037\364\234\035~\016\265\272U>\262\225t\014\017\206\373\244_E\253\355w""\3223\366\033\243Y\177-:U\261\tk0\200\245\344\200\333\305\277\036\226DR\"OS\227\276\342\203\372=7\242\034\306(\233U\274\033\261!\266\21478>TP\203b\341jb\343)?h\326|3b\203\022\332\000\371pp\t\207\351#\347\3357E\267\310\203\262f\357\370\344\250k\177\303\026XS;|4\360|\315\372\243\021\260\257#Y\354\360\340\300)\226.\306\342\313\210\212s\261G\207vW\036]\261\325\010X\356\302\035r\265\031E\311$\235Fr\310\217\037\333\275\201\216\014\003\"\310\361\034\234\036\333%\010\242R\231y\354\214v\026\317\347f\375\243\301a\241\000\250\351\350\353\343\241\323\270\255}>9q+\247\253\005iY\246\321R\234\366a\016\352=\260\365\263\212\345)\333eZoQ_\221\346\341|D*/R\262(\005\266\335\023-;\217\362\2613\3118\033%\241\034\344\341\361I\361\253\006\300\341pX\370,.\\\361T~?u\320\"\026\340\261\326zpxxj\027a\213V9:\373c\202\026\326\016Z\r\017\035H\302\010G\250\214uK\016\216\334\222\213\221\037U\207\307N\243\331\034L\032\350\353\351\311#\373c\036~\210\024R\2713\022+f\351\310\037\037\025\276/7\350\257%a\342B]\255\271\262\214p\340\202\252r{\006.j\257\223x\266\031\251\275\022+\213\205\301\340\350q\241\350\277\326r>\217N\2355&\343\007\004\257l\342th#\221\336\247\244\260\326d\207\271\n\213\263A\2455)\\\211\331P\302\2644\211\n<\200\266*\203FDyi\274\271\2122`@D\213`CBoe\313\252\215\016;\305\243KO\026O\243\256\352\024\r@\261[\032\214,\272\212\257o\270\354\316\014\327\323\2029\332;\2477\203\3452\000\002Z\326\006\\\020\032\317P0&K\312\026\334\254\027a\262\017\321D\220#X\n\370\345L\366Q\265\025\003\315\210@\177~\377\006\027\010j\213\035\022\313\n<\213`i\361\237\233UT\340p\010\350V-*\016\"D\252\273\037&\323\375p\377&\234\317J\233\301\211v`\004hX\324\301f\273\335\340\337\202i:\021\224$?\013\376\376\366\277_\276\321\223\376?\377'\330?\350\005\177?\020\277\364\304q\310V\031\301\005\376}`\226\371;P\035\375\344\216p\317\332\003\002WQ\261\213\207\232\262\221\371M0\225\277e9HrmQ\3513Rl\007\274\351\304\252\361\026\215\346\321\002\367Q\314\372\310\006\310\3624\221&\030\263 \370!\246\30080\236\326\377\310@$(\366\033\345\202""\023\305\216[O\000\265\326\223<\373J\225\272\352\225e\274nQ&\217\365\272i\301\356\376\016D\327U\217G\306\323e\257\264\221#\273\326\261\375(\346c6\263W\374e\350\255M\362k\3300\271\346\372b\225*'\274\277\037\310\303\372\014M\347d\204'\263\304\344&\026\027\263\003rbp\204\300[\340\264\333\214U\237\203]\372t\036\007\316\243\267\307\302\036\323\334\344>q\223S\210\312E67\034\034jV\330k\025\306(\005\356\224,Sf\300E\355f\236\202\354\r\266\005\207\034\222{}\377n\201AO\313\232\370\177\212\035'\216\227\033A\215\346\024T,\020s\001\016\240\001\265\220\2608\263\215;\354c\306\003;i\302b\035\364\367\177\310X\327n\233\200tJ\357\210U\027\363\212;\351E\275+{i\375\256WbPD\224\262\335\335\214\236i\367'\336`\272\2373k\371\354\255\025\004\006p\334/\022T\356{\224h\270/\031X\356k\007t\356g\rH\353\313\245=\027\266\275\255\236\310\201\333\370\300}1\264\373\350}\007\236\372\357\320m\374\310}q\\\322G%\215\005u\217@\333\002\377R\237 \311\035\3615\033\231\375\025\370\021\342D\313h\325K8\277k\317\324\232\2145Fk\204\346\370*\260L\031\275\006tw\227G\220\337:\261\346\205\016\r\250)@\214>t\017,\360\275\2462ht\214zk\3051\3001\214cQ\345Y\332\341\264W\260\223\370\231\212\201\007<\211!dI\364\034\313\343\271\364\347\"\r\026\366\212\332U1\006\253!\032\177\267\201C\"\364W8\366\277o\267/\265\335p=:\303\336\260\373\020\263\255;\237\275\206\004\277l+z\215!\037x'Z\306\261\337\360\206|HC\322\357\032\372\006\032z\024\340\222QU\327\\[\006\242m4\243\n\034H\212\"\3653\014)U`\340\024\300\215!\000\250\n\310\017G\346\320\005hU\201\303b\001\004\271* ?\034\007\201\265\004\252\300\261$P\274\235\345\262\370,q\2210\021:\237\037v\357\006\224\322\021\017\266\215x\330t\304\264\341\317\207\333G\\\261\202\325\213\347\254[\031\314zL|\316\007\333\306R\0056\033^\265)1ii?\033\021V\021\270q\024\375\007#\277\324\317V\362\333\377\026mL\321O\231B]\036x\034\235\267\333\232~\263F\252\346\306=\374rq\352\016\264\377ty\210\272]\355&//Kg\316\004c\370\305f^\025\227\257\312X\264\226eh\331l\r\362\370\345\346\355\237r\255\351\272!\367\236\245\t""\350\370\023pi\365\030\2242\363.e\264O\3472\234\2544cE\265QvC\032CvI%\037\001\332\300\250\317\\Fd\001\014\004f\016:\337\320H\377!}\332\322`\021\255\256#U\213\030)W9\230\233\034gT/\031\203=b\001}Q\220\202e\314\252\346\254O!&\230\216\005/*K5\364@\231\211\016\254\311\265h\332\344\013\367\310\354\007b\020\214\226i\n\026\255\024\221\340\215e\264f\235//\322\025W\001\275H:\t\331\211!\236\241er\274\002\263\014T\335\336\306Y\204\006\032\262\035\350\342\036\222)\014|\026\237{\216\211\271f\313\r\206\274WR\2529\225\356Z-\351d\013\332\022^\235\002\\\026\207>l8\364\212!;\362\370\335\006\004\362\004\304\224\021\343N\347\"\037\364\362\241\223\\\3015\344.R\013\037\245PKZt<\352\211_\227{wq<\352)\000\320\374\367\366*)\007\007\252\261h\306\313\031xc/\322<\032\261c\316y+!\345{h0\202z+\001\241\270\215\005\245\031G2\001K4\355\243\255\002Yo\022:\2038\213\203m\274#\223T\251\302V\204\250\023}\232DK2\252\220\006i]s\333\204\024\342\207\212\231\375\256B\361\231;e\223\216w\034FX\024\320\364N\331\221JO\364=\212K\264\222\256\037\025@\340\375\npH6F\246\013&|r(`\376\0061\213R\035\261HL\035\347@KK\305\343\304\214\007-cR\001\024\000E\373\024\tI\005\223]\304\354\\/pS0\245\223\365<\\\355\251\220J=\032\r\373\225q[\341R\314`\271\302\240\014d\006\307\003\274\216\022\240\357<F\260A\222p\2400\325\\_vI\201\302\020\262\206\303Lc\270\006?\205\202T\223\343\006\317\375\016\315q\312\037\210,\003\345\251\331)\272\365\210\261\276J1;O\310\246\t\264\222\350b\266`\355c\234|L\347\037#\214\230\312\256d\006\331\226I0\256\343\217Q\022\\]\031g\301\325U\005\206\010\354G\250}\204\315\002\r\214\243\233\360c\234\242\241\250\"\367\363u\206\343\322(\303\r\021\363\316\2103I\027\0131\214i\224\244\013\210\244\223\256hF\2638\317\324F\"\237\275\372\031\216\312NS\213\016\024\316Q\256Zy~\362M\360K\234\234\210\271\366R\270\372\355\304\354\360\351\004\250G\30649\013$uS\033\034\275\301\314\305\244>\376\366\267\017\267\341\352:\343\260\257=\366[\014\347\367vv\3732!}\355\207\366\3661\177\276\323\232\020\325\177Xkf\177\327c\332\360j\353\301""\357K\367\250n\352\327\326\273pN\353\262\343Z\323\":<x\303\277\273qm\"aW\202E\026\2371d4\271\214\243)\355V2x\344\\\t\246M\305\257p|\232\230K\267\007\000\334\313\004\315}\366\214\010}2n\226<h\2503A\351\214\243\334\010\303TM\227\270\266\237.\331\346\"\034\273\313\246C=\305F\304S\000\355D\214\214b\332N\357\221\034\341yLV\204F\3564$@(=\312\356#\037\232x7p\245\347\256\334\234\313\r\013\345\274\033B\n\267\241\345\036\326\273\364\304i\255V\267J%\216Rb)\275\224\322H\001\353Z(\305q[m\214\026\330'P\022\342C\241=\023\005V\3227\307\377z\373\372\2256\334Wh\016\326\355\020\222\025\020O%\240\343\003^\254\206\256\025N\3625\254?\235\361Y@f\345\360}\353\352\260O0F\007\224A\2538\223\231\030(va\330\032l]\313\177fiB\261\200p\241\360\261S\010^\354\304\002\326\035;]\211G\010NH\010\330\376=h\305\323\326\331\341\201\316^wv!\023\344]\006\177\264/U\305L\360\r\341udb\213\370\333\013\274a\224\031wT\314.#\\\033\267\323Q\323\352\311\246=\370\364_\031\327\255B't\321\226q~\267\315\250\020\004\270\006.\275\177\377\362\271\211KUuqy5\364)\266Xu\225\367k\201Y\025U\270\032\231\276\006/ F\331\333\3707\035\016\220D\333\312\226\226y\367\020C\327\242Y?\311\255\032\013\327\271!\031W\251\003w\025\000\200\026\177\351pZ\305\2145\357\220\251\204xjs%,G\313wQ\307\210\330P\010r\245X!\2631>*(\226W\014l\\\250('\300\341\035\335J8$\030\r\274\315w\252\304\216\013{\245\006}%G\246\310\256r\324\202\240dj\336\034?\213\346^6@\260e\202\275G\267\t\271\006+\266w\354\240/\024\247\321\344W\224\020U\254Jm\321\177q\351\353\350\001\334<\017\204-z\2102\322\034#\013@\306\tW\260U{\300m\235{\363f\272jZ$@\242`q6\226\032\225\332\024\255\024\252\373\r\017<\373\242\261\371\201c\2307\254g\215p\330\253e\234`D_\226\221\004=K\321\323\253@A\374@&\344\004rW\214\363fI\240D\224\326a\245u&O3\026\266\007\222M\026\002c\264\213?\177\226\345\360h(%\211\305\270\3770\356\377\211\243[\227\304\342\211\200@U\321,u\222\216\035\025\230\006\221\245\226m2\013\310\260\245\310vZ\375\340\2046\266\363x\331\024\325\3033\027\372\377\274T\267.\321\305\275\365Q \002""\355\0071\300\"z\334\273:\266\tA\225(d\026\026\334\017\224wJ\022\036\025\215j\334r\342{q\216\026M\340>{\324d\217\307[b\022\346\331N\237\211\0248\326r\207\017B@\000b\377\206\302\244\220p\014\3618O\265\333\206)S\265\343\000AIs=\020;{\350o\335#\217\351{Z\232\036\366u\016\177\276\202U29\366{\202\277)\266\236\010\2621\216\244\020\027d\304QL\376\234\274U\322\025\357\005'\377 5\365\217\247\277\276z\371\352?\316\3100\005%\253\254\010\300\\\361\246\376\262N\203%\373\223n`\177\242\255w\257\213\352;\225=\367\035y\030\037\016\037\3520\026-\177?i?\343I\253\016\331&W\234\317}\266\016\213%a\343z\331g\265_\2537\352W\316%k\"\253\364\215j\303\341\260\307\321$]06\340\025\277\001\r\374\026\241\3719\250]\325\365CS<u\022<4\345+^C\276\023\307/y\r\371\223\337@\356\211\003\372~\357\270\257{\307\375_9\276\3376\276\374m\343\233\332f\017}\352\376\022.k^1>D\233\036(\232\027\266\"}\227#\027\033\240|\276\260\262\020}\026\262xz\017X\314<\\^\245x\336\302\020\233\325\270\373\t\255\240\250Nh\030v\033\341\206\343QG\365\266\343\371+?\224\027\341R\035\307r\322MN\342\027`\206\006v\345y\033\374F\246\002erLLC\311U\005F\256Wd\363\267\246\0344\340\310\202)r\200\023 b\003\361\212'\242\3265\030\362\221\226r\221N\243\271\206*h\34206\033\264t\014\324e\231&S4\365\010\223\014\362\227Q\217\030\365\0304\220-\210\330\261\200d/\323x\032l\322u\200x\203\346t\251\3509\370\364\277[v\363\224\335i\177 \357\006\002u\243k\025[j!\326*\323Jv*\254M\021\311\"P\256\251\035/K\235ed\235\207\3534\216sD\007L\003\207s\341\320\315\246\255!\257\267o<\375\206\332-\234s62\301|\036$\313\376\"\354S\272&\351*\\\360[\271\030\010\322\273?\200\377y\274Z.N\311(\303\367\t*A\345\303\262\217\345\255\032_\255\217NY\317h-.\000\376\372\232\347B\346?\276b\006+\261\265Tu\207[\312\230\031[\337\231\314\2172 \262\314?5q\202\215f\234w=\355\220`\\!\310\004Y\342\177\354\006r\327\247m\021\234b\365\376\r\343\\\000V\r\310\007\254Ph`\026\032\226\024:2\013\035\226\024:1\013\035\325)t\\\257Pd(\320\021\340\236\315\341\005@\353y\270\372\020\374w\0021\317Z\334\346\266""\377\010X\333\232j\375\022E\264\300o0\007\"\332!\276]\203\235e\230\264,\220\026\233\252S\3277\252\303\n(\010\374@\003P\037\030\006\007V\243%3<\225\006ZT\264d\360H\022tk[\307%\030<\211\357~\336\216\226\257''\340w\374<\330\356\261|\3211V\010H\227\221e`\340)p*\216\355\216\273\022\002\004\360Z,\206\031\367f\350\366T\254&\272\243z\270\210\002DF\357\207A\363\377..\013.\312;V\237R\0301b\210\367L\323GMm\350\210\212\026\313|\003\013\232\005I\024M\3218Q\\+\026\002j\024\221\232O6\340:\005\267\260L\305\223\351t&\212O\323 K!y\t\246r\336\250\254\342JPG9U{P\nO\343\333H\245\307\273\202\033\302U\020j\322GL\010;\256R\016I4h\247\241\343@o!\".\244\234t\007IG:\370\300\212r\256\267\256`2\304)\216\006\367@\257g\224x\216\314\345b\312\303@,\0022\341\310\361v\264l\253\273\003\t\336\257I\205\367k\022\342\375-\264\230n[\333\311\261[n\033E\336\257I\224\277o\373\035\266\275e\273{t\267\352\366\266\257\270p\206V\256\016\266\0072\302'\232\221\352\n^/f\230Ev\000A!|(}\201\270\034\311\023L\377\322\253+\243[\345\210R\377\362J\243Ww\037c vD>\035ZVN\230\306cD@\2019\367\233\207\335z\310\350#<TS\204bdT\032\366L\007\3646\331\335\267\377\330\352\265\256\034\346\311S^7x\364GQ,S\010.bB\274C\017eQ\032d \024#\326\005\364l\356k\032\264\265\323^\205\257\354\255\013\010\255w\003\014\272\177\320\020\225U\246\\\313\n?k\212m\312\260\037M\343J\215\372\321\266.!+\353\310\332,\336lo\230\267L\267\211^>^I\302+,9C\267\251Hb-\271KI1\010d\r\303d\310\234c\202\375\010\350\265\3365vv\265\212\370\022\234kM\366I\346\202\274c\n\235\322LJ\3724\022e\200\253\021\346D\017\227Kd$J\273\177\315`\320\265\345Hx\n\235\030db\342\344^E\323\356W\266{\277\356\254\031\300\247x\363f\324\333Qr\332\354\300\262FY\0076\354\260E\215\002\024\371\023o\324\311\225\270C8\003\303Y\031\334\240jfJ\264\334\233\232%N\274\0338\376\212\321\225\356\200\213D \3565\337\235\262`n\236\351\256X\345n9X\232\241Q!m\336_=R\327]\301\367\200\331!e[\355R\\hW3?\344\370\214\033\303\364\037\352\337/\263\003\347\267|Q\032\010\373'\310\"\263\317\316-\334\036\336\3679\323\025\0105)""\244\200v\265\276\013KD~\364\234N\263\036O\324\277?\246\210\203\002\324`\212\372_)W\3640!\275\374|\320\316\034\320\347ax\214]D\210[dkv\317$V\235\254\364.\254\314\275\247)\255\007\034\322jHt,\036\272M\017\273]@]#\270e\303\204ij\324\306\014\276\311E\374z\241\371\245O\322&\350-)\3347\304YJ\"\007\273\r4\2202\274\001\276&\221{\224yx\313{\302\220]\3235\377\0056\317g\345)U\255v9\026\324\347*?\217\\\030;\274W\21100W\3459[\374\022\342\\M{\007\341\322\303\260S_\201P\330\330\003\337\2028\330\302]eq&\260\001\343\263\344\024\313\212\356J\276\310\216\365qO\307w,\353\245,Q\372[U~\346&M\037cD\234\217\321\n\323`B\220\032\016A\247.\025\234\003\271\371E\306\271\252\310\330]\362\352@ \243\240\\\020\246\314\n(\371\375RQy\2510K\032\261\332\355x\220\r\022\017\177\216\000\353\245B\227\3416\241\313a#\001\236\265\037\r\244\252\274b\251\260\225\370\343\362\317y\2312\350\306\314\246E\r`\323\013\276\010\210z\367\014\256\336\356\254Z\005\234\005\031.\310\217\3550;+%@jJ\376\027$\271)\312r\234\354p\262\034I\266\320^K\320\371\247\252\3777\233\374&M\334\0005\017@\326yx\312Y\353+\226J9\013\327\344<\241\372\235\333t\365!\013\262x\021\317\303\325|\203\2433Z\354\356}k\007\320r\203\213s\036\030\354\237<Q\014\036\220\177\375Q\203\372\350\244n*SS5\341\241!t\350\237?\331\355\316\236\333n\327\263\335@\376\031\245i\326${\337\250\214\246\002\210\337\240\314f7m`\371\232~\213\332+\337)-\225Ah\360\371\357\201\231\300\375\016'\265l\025\232\313d\363\265\316k@+\367\340|\260\253\027tFb\033\253\225\305\367\003|\347\003|\271\301\265\027\027\270r\361\211<M\312\005(F\335#\273\356\363\364\272\375G\035\236\337D\354-\247-\024\355\320?\237\353\264\335~\316\232q~kO\364\263\236q\006\330\276\3313\256\010\274\277\346\331f\255\345\327}\266\351\265\344T\236\354\206h\035g\246?,\007\253o\022b\372\251\021\253\221\244\230\360\230\256\214v\325\240~\001yaH\007\215\355\224\206\341d\203g\344@N\016 i\"H\254 \370\024\273t\236\245\005\333\205\247\311\206\256\316\373\220\342=\314\301\013D\246w\005#\017\310\264\303Y\215\2417\272e\277\331<\013""\227\331Z\224|\263J\363tb\270\326v\300\023#\204\344\004\243\021b\366hBr\345\321\350\352\n\246d~\020\200\215\302\005~\021P\272I\247]\366\177\327d\021\207\013\204\3776\232\263x\324q)F\017dD\001q\347\217V\223\230s\261\311\357\034I\3348\336\3145(&\202\275C\240\354b\276\327\313\036\016\367\234\266\243\212h\334(\311\251\212aoF\256\366wW\231^v\207NM\237x#\014\205\361S\356GE2t\005#O\254\221#V\347\207\275\364\004O\346\255&G*\215t`\257\t,\233G\310.\302\036i\220a\202\212:\221\334_\320K\340\215\326\260\332\270\335\374<\242D$\315\334\300\036S\273\t\260\235\001\270\323\216\001\016H*\003|\273\207\276\231\233D\306\217\267\330\303\022\236\360\277\301\341I\373;)u\203\265U\306\233\\\361\337\345\350/\343\201\007\346\252\2300%H\236\355\325\336,\326\201&O\232N;K\027\321Hl\027u\214\035\016\3251\346\224\242er\216\257BZ\007>\354\260\206\314\335\341\255J\tk`>\347\344\276\277g8\006\343\335\200\207vFA\034\364;j\301:\214|\335\311\002*N\300^=\320\022\272\236\355m\205\2363\333-PtJ{\241\271+\010(z\275\334;H\330q\317(\003:\300\007\336f\344\3417\023;<\275\005\350\304\031\350\303b\201\263\350{\235\252;S8N?\202g\037\342\350\256\340h\341\300[5a\321\242_\255\273\001\342\265\240.)\246\275H&q\026\31575\006_c\320\0173\330\262\303R\335\214m\372lQp\320q\006\202\271z\263!\2775X=Y\\bC-\262=\345s\236\"5,\226F{\254J\335\253M\261$\005R<\003n0c\224u\211\026\177\244\361\210O\311\322\\E\344n\361\333\010[\355$\313>\375h\317\346i\230\017N\332\274\237\344@\004\301\237\317\360[\267\262\241\366\373\266S\221\326\253\272\026D\301p\252\351W\025c\026m\217*\2723\3579\270\334\357d\376[}\303)\317\375H\352\177\225\010\013\342\024\321\271\006\273^\345q\003\307dH\344(v\212\330\356\3134\2132\233\335Uma\244\023\224\037\312\314\216O\337\274\334A\230\364i\204\314\224N@P!e\371%\374\024/\326\013\300\003\276D\340\215N\371\212\231\263\307V\373\030A\346c<]\207sz\22392 \010z\030d\342\3761\027\rN\243eD\201H8\343\027V\t\346\341&]\347\024BH\267VPt\325\211\376va\014\361\362\253H\000\374m\344\357-\340~hb\177\271\036\234\354\312\363T\251y\273""\027\007\227\337\266)@q\372\236\315_Pz\027\000a\355\274\363a-\270\354\222\274\374\310\003\210z\003\032\334q\241J\301<\330\346\346R\0047l\270\263\263wQ\222\245\030\350\000)w_\214L\207\310\002\032\212\221\336\036j[\273\247\237\374\374\211\"\031U\337E{P\004y\020g\347\321\224h\353\341o\343h\352|\022\3048\026\017\224w\255%~\017Z=\370g\350*T\251\035X0\252\331\265}a\304\270\340\376\032\360\237\243K;\312\033\\`12C`\014\030\317\305sg\314\205\245a\250H\023\304\020cP\235\272\271\223p\211\200\210/\302\017\2248\023V\312\216\177e\344JS\367\265\301\276\230,5\024\316{\264\320\034\031\020\372\031\241\215Z\222\237\322`\233\307\217\033\377S\034z\0262\325?Op\242\312X\363Gxz\2300\242[\360\217r\220h\014\264\242FQ\260'^KQ\006\241V\220R\352\301\233\330'\332+\211T\250\313\327\tSh\005&<0\037\006[\"\n\032\030F\010\236\005\035^\247\254K\350F\351\221\262\233\020xd\332L\016\356\331XF:)\205U@\2675\031\321f\276\230e\311\312\271\204\035im\231\331\241\323\315\313\231\205\313\034\016\013\357\276\220\0370\276^\247k\225\304[j\317\026\341\364~\360W\205\317\220\204\003.\023 \242\200\275bx\245\301\005\264\202\327\373\351\323r\036O\0047Jm\300e\224&\253@g\362^_\004\323\275,\322\305\205\214\261\253)\360\t\2203\377\373\022FK\355\027\274\244\270D[\345\373\001$ \252\355n\236\021/G\305&\3626q\367\260\237\275\312p\236\366\343\261\375xR/\306\356C\365X\207\030\020;\2429h$\002I\321\002\272\351N\022\254\371Y\241\361\242n\334\226\000\2248vb\330\246OK\261\214@\231\250*\023\021\323\014\2312)r\344[\210\341)\346b\265\023\313\350\233f\346j\276\367\200z\343\026\262['@VP\263\rW\307p\235\247\213\220\323n\366]\255\275\324\330c@\253u\016$\352\226\302H\221ti\222C\256N\030\025\215\272/\300\216\275Y\r\251p\245\322\005\202\247\210\027[\214\r*F4K\327\211*\240Wk\342i\017\315\314!\312\3444\372\304\261{C\312.\036D\002\330\253~\360T\247\205\226\323\307s_T\260Z\232G\037#\035[_\367J\321K\345\320\312\306\017][\315\201M\303u\222\256\254\350\252\020\030q\365\021\204J0\3343\344\002J\360\340\0377\021r*\002E!;c\304Q4\241\036\311\273Cw^\345N%""\276\200C\210h\222\200\247\224\020\225Sw{\272\263\232\242\356z\234\272\235\314\021\302\344:zI\213\200\360\0024\200v(&\231\024\273\203n\255\037\274\317\"gh6`\316\201\357\270\272\202\251\213\266'\021\340&\371\003\350&\245'\215\341;\235\337\254\242\220\224\026\225\202\010\201\313\327(\344\302,\334\t\304\036c\341\230B\020\262J\025DA\200t)H\300|\036\315)\274\202w\217M\r\241\006\217\242\037\374\270\221C\350\321\266 Q\255\215\276g\263u29\273\222\224a\262\\\217&\002\371\363\253\240\003\342\r\210-\276^\"\016l2\010u\374\354\315\373\000\013\310~\272\032\000r\360d\333\343G\253\237\371\010g\214q\274,\214\314\270\030\325|\276\213\244\304\033af\307\263\276\211,\204\335x.\206\007CH\020\202\336<\342\357\200~\327\220\211,\004{u\003-\034\342\371\376\250\027<\256Qk\032n\240\316\000\353<\026\367\237\303\032\225\276\230\334\246\344H\014\254#\261\\\"\263\335\266\310\023_\302\220\004\325\tl\003\353\350\332-\340\322\270/\005\344\335Ww\260\375\241n\t{\020y\020w\020u\334a\010\0049\356=\352=\276\264\207\"p\340\270\367\270'\020\300\027i\247f\224\235:au\232.\342_60\214\302\274^\r\217\334\207\013\262\364%\227\236\243\213\222\245\007\222\362\032a\252\014\270q\245s\345\354uy\027\310\325\206P3\326\235\304\316{\326U]\236p\250Hu9#\263\036\262v\005\363S;\220\244\n\272\312\303x\033\201\365m\201W\004\215\005\251\036\302\014\371\355$M\366\235\020\224T\225\330hS\345'\030\204|\025&\331\234B\252\244\310\326\3220\265ZWv\240\317|\356\350\212z\271\352\001_\017\321k\241\205\353u\224e*\314-\3662\336\004\3634%)Zn\265\304\2767\254w\242\251\2111\321p\r\330\376(\000v\033\256X\025\305\200`\350\310Q\360\224\246i\322\026<\225@\222M\020%\351\372Z\243\207\200w\272\202\273F\212LH8\277\005\253\256\271\340hH0\003\001\353\305 g\3539\303\200\014\265L\360B\377\252=\3676C\226]\202E\355_\367A*\023\256\263\310\341\353\343\214\250\n\212i\016\304\235\300\212\273+'\006\306` w\tc\301Y\001k\364\357\211\262]\341U\224\313\007\221u\215K\030X*\3605m\034\211KR\014\016Vt_\013?\246\361\024\242\tn\264\3275.\t\244\215g\311\211c\317\007\346(p""\003CM?\253\367\201\247\024\354#\000\261\377\225^Y\315\375\371\375\312\372\375\312\332\360\312*c!4\273\254\312\013\252\325\330\367\313\352_\350\262\252\266n8\213\024\316J\030\303\202\231\335<\273\211&\037\0201R\321\362\014\246\r\333-E\\^'\330\006\365\352\n\256\277L\004\200o\326P\240\324@\340\033v\237,0\252@\212\274\276\\\310\327H\247\244\327\253)d\375y.\036w\361\341\312Fa\306\356n\030t\303\014\023\250\021\2352\nX[\370\177\302y<5S1Q\231^\320\236\247Y\266i\243Io\033@:\311\333\375\302)/[V\014M\207\352w{\310\277*+3&H\277\204K\025\375\320>\352\231\333\024\347s:\211\211\rD\257\357\240\003\377\354\247\263}2\214\355\2523\013\343\367\254\320l)+\270\203\251\356z\360UT\271\350|\2106\003N\2316\200 \365\342y\310\317C\361,\360\375\322\200<\223Z\206\202\t\204^\325\234\202D\214]\360\022<\035\\\217\322V{\2308J\034\331\253`\272\006.\017X\035L\256\000\0131\025\353>\241H'\201\340\257\201\373U\352\275\345\n\322'M\213\3531\017\005\205\314\"HG\205\371\032\300\255\302n\334p\260\243\320\375z\244\3448Z`\232\364\304\361 \020|o\016l9\035\321\010\\dS\3414\205e\033G0R\344`\246\224\031K\316\244\001\241\204\341|\255\236\355_A\334j\277\205\325\266\330\213\336\370,]\277\035\017\273\316\352\257\316\221\341\002\301\362\370\273\320\356\202=\025y\t\267\230xT\223j_\376\261+\325\274g\017\330\357\324\363;\365\3743QOX\364/O=\361\316t\216\254\326V\016s\007^\362\262\214\"\342\317\016\364\276\033\341C\277J\375\265\236St\205\3733\316\006\212\230\271t*\010\236k\004\373\253\300\227h\365\335\360\373+1\374.\254\314\367\373\334\375\033~\023d\313\254\236W\370\265Sb\tUh\306\265\202\262\032\245\266\304\240\313[\327\305\036\322\251\232\300$\350\305\357-\224#\215\0305[be~o}\020\357@\375\265\002Q\025\254\002P\266\326\031\245_\006\217\245p\225\213\307\003\233\312\030#\207\177Fb\177t\376d\267k@\234\263\2118\271\263\263\253\377O\315\010M\340\256\254]mX\323\023\361d\301\263\222\037\221\024\230\035]S\366\367\316\342kH!\236\242\340\007\177\033*\013\312`+\276\241]\237 \272\311d\276F\302\023RR\334\375\333x\232\337\230\324\345""\352\nVl\004\226\325aru\005T\373\352\n\255k\305\303X\t\335\002\3129\254\251\273G,\014\274\003(>\014\000o\020\037\210\003\342\244\253}g\352h\364L\245\n\000\300o\316\010\265\350\014\265\031 \203E\371&\353^P\200\237EV\372\365pe6\212u^\205\257\304\3740\3334C\r\240\353fX\240a\247\213\224\353al\336\245x#86`\300\020\314\301N\266\331\306\234\n\362?\004\177\231\340\372V\240\245==KD\r\344\231\247\247\267\035\370\034/\302\177\212%\332&jT=iM$\273%\010\300B@\001jF\205\342\243g#\272\r\244\345\036\025\222tW\034\276/\300E\033\013\002\222\246\023\274-\210\313b,Nav\263\355\221\250\363\026\220\r$\251\262-\350\346\336\017\273\262\220\240\356\301u\341=\311\364\035\233\315q\361\360\203I\333A\003\014\267\335\212&\320LH4\"\376wtPh\206\215w\275\r\311;6FA\r\201>\217[v\256g\207{\036[\312\361*\305yhz\233\242V\346\2146\202\237\006\207hw2\354\035\n\n\014X{i\326\203)\212\031\212\t\212\371\321W\317\221\354\\\2675\0322j*\022\302;B+]\201\204G\211\261'\262=\177\354V\262\376\356\030\273\022\325&\236\023\235\372\324\246\313\224\306q\232\256\3153\013\355\347\317\202\216\340z\014\343j8\252\246\2218p:\203\023Ht\331l(\225\336/\203>\360W}\237\343\313\260\017X\344\375t\330\007\344\362~:\352\003\316\371>%\220GS\374\271\274\354\326X,\223L\360z5[\202\236\246^\246\373\376\375\257\t\244W>\350\336ql_\343\"U\363*Rte\213:\212\336\275\337\205W\337\205W\177J\341\325\003\204=\257\016\340C*a#\206\217\335\204_\350c\212\270u\0035\3676\250\332\347\321\276\025\353*\373\022 `\016\246\030\306\310n\302\177\217\336\026\335\250\332\221hX\351\326\203Q[j\271\007U{\374\350@He>?\306B;\222\243\013k\266/\341\272[{\256\326t\254\007kf\002\366w\350\304\232\2725qs\332[o\307$X0C\223\221\231a(S\201(9\022RL\343\302\325\3704j~\035aB\252\212\302\220\341\316\001\302@\343~\202f7l\272\310MQgVc\330ql\306\0235\354K\304|\256S\264\341\223&&\262%\014\363f5$\rMX\030`f\352\033\303\315\017$\204d\311\303\026s\317\270\365I8\357\007\257\223\271\335\234\000\351<f\267G\220\265P\220;\024\000\221\255\337ze\305N%wJ\340|&\272\335\032\327\326\237\222I:\215dt\244""\316\373w/N\273x\351\036\307\030\022\230,W!\226Lq\324\252!\020\"\217@\210<B[\307\355\275\376*\245\022\270\226?\251\323\000B\346\231&\211\001\330\344\005\267\010E\276j\242\323\252k\227\004\213\214b\3519Z)\003\230\372\256\320eD\333gD\202\214\355c|\006\207#\327\265d \002\0302\330\240\266\335\317#\340\251x\207n\275\302c\333P\311l\r\215\221\330kz\242w#\024\313\343Etr\304&\2610\224\302\354\315\260M\242\260\200F\234c\314\331l\275\2043\001\202\316\242\026\340\214L\274PN\314\346HVc?\010FW\\dq!u\327\027Ivi\0300\241\265\233lXC\032\312f\2718\250*`Q\002h\260r\026\314p\232\211\273\t\310\261dK\340o\275\354\353\201t-\200\2415hlK\366\005)\000\223\337\302,\005o\377\t\020l\223\256Ilg\364\201\273\225L\215gq\356\230\274Q$$05\236#D\002\024\250\022C\356\035\360\340\344\321i\360\354\247\375\341\360d(\376\355\332<\322\253\322\231\002\037\247\240\352\231\200X\230\002\273\305\370\002\333\304i\311\022\247\271H\244\333\021\340\032iC\302\232\242'\244\007d%\010\332\033T\230h\344 W\021\2256^\032\010\352\335\022)\036s$m\305\267v\375<%\377u\n-\245\032\027\324\000\310\244cy\216\214$\247\026\355\2415\241Xp\333\2006\221\"-\001\200>\237~8z\311\361f\363\364\026th\n\021\320\254ud\204\377\333\206\330by\350\n:\245\261K\373\3616\255k[\313\364Ad\022Y\311\263\354\271k\203s\020\363\243\344\215e\265\315\314\024Q\2247\021X\021\n\354R\301K\301\356\003D\2629\006\t\210\242)a\037]\227LC\\\253)\212*\220(n\301\030\245\350\204m\337;h<\357`&Y\352\333\366\321\312\316Uo\215Lo\201.ou\272\244\2421\375*\235\343:#>\272{\026\314e\311\346\022f%\206#\300o\034\226\002\371\362\321Xp\n\037\262&\313x-\256_+\300>\260\034\206\223a\005V\310-l\250\245u\221lj\n8h\273\274\002>R\354\221\202'J1\237\017\214\232m\336\377q\023\3436r\010\035\310\342\363\0108\376p\025\013j-\000\270\236D\022\255\023\245\361\375(>C\274\007^\246t\t\223\000\016\251\330\332*\276\006A{\013P1\025W},\327b\013gT\231\002\203e\357\035C\332?\237\215\246\021\343p\r\326\343\377\276\371\351\327\227\277\374\364\352\335\323\237\3174\224\303\034&EG_\304\374\034\355\033\301v\\\307I""\250\235ol\215.\r\351\026\201\305\304\017Jj\027\002\031-T13\320)\034\007\2741m\002\301\314\366\014\314\246\201\r\301\266d8\"\342\007r\003'c\366\013\230\254\302\354\006Z]\331|\346*\275\026+\355\334\356\265Z\036\206\001\000Fc\373H\356\021\r\347P\2348\342v\267J?R\214\323>le\3078\035o\210H\034\014\362H&\322\331\rn\274\304\344\2224\257\334\363\001R D\033C\340\314V\340\013\264N\362xnZH\333\207L\377\273|\351[\221/\331Pcw\232\311\r25\264\315\30448\034/\214\213\207\325\025\273&^\241\215\340\264\350\367a\234\351\032\373@:\3253\364TtZ\2109\340\225\022&\203\331#\220[/\225z\341&\003Q\224\356\002\326\303\024()\211\027K\272\254\266l\241Rs\021\225\343\336R.\2562E\333\331\010b\032G\240\315\223w\231\252\033\255\276\360\310P\310\236\330\231\306\315<\370IF\030znss\326\232j\027)\364J\000)\272u\035\346\266\360R1C}a\342\273\021\210%\032\257\343y\276\017\3071\017\212\035\032Q\241\034\2163\231u\215Z\324<R\234\024\366\002\031oH_)\014\210$\347.X\240H\240k\346\233<\352\2013\207\340\261\273\030rOp\277.\203\017\305?GRpEwL\207\225a\200\030<\254\276\272#\010)\231\207\324$\313s\343\306\345*\255l:\013\2314\004\212\302z`\324\352\253+(\322\277\216r\320n\233\336w\332\255%ZM\004SNG\373|drD\333OU\220$\220\364`\"\315d\234k\304\223\363\342M\342)\270F\207\223\215<\315\220V\3020\360\346p(H\023\374{r$\376]\023\367@t@qv\366\205T\336@\231\010\351\361\023cn\034\316\372,\346\273\\\351\342(\242\356\275\331\365\005\307\231[\007\262h\032\030\n\261\336Vsb1\332\323\000\245),7\"\213\004\214\313\235\022\333\3067\030/\334\254\306\000-\306\341\344\203\240?Sh\203\304e\261`/7\342\336*\216r\340\352\027\342\300\006\226Zi\310\233\244\177\261\235\205Ew\005\326\3216]c\217Gv\030\376\034ffU\006Z\356\315\300g\235eZ`\0264\366e\371\341z\345\005\357\222\031\216\033\323\346\357:R\201\262z+\265\002\375\246\002\212Z\253\232\301\021\030\n\032\336)\314\246gY\r\352\311\341\315r\273ny\013\002|\003\211\002\353\347\237\255\221\270<\250o]\\\337\332\343\253\0130\341\325\317\377)\266Ga6M\267\007+\310t\306t\336 D\337\357\262;\232d$\361h3\335\325a""\210\014]`\017]\340\0369\3004^\360\272\034\353t$\256\"\212b\300;\230\353\300\2748H\004:A\314\201x\245V+\261\222\211\343J<\375bj\326\255\232f`-b\340ux\3760v\322Fv\272g\305P9p\361\351\304}4\177A\177i\353P\323\313\252\327\263\200\236\314\217\025T\3742t\250\026M\323\305G\335\367P\345\305\306l\206\031i\343f\305d\351f\026,@'\345\364\242L\035\270\371\240\343X*\210eh?C\256\035\005\305 \3713\263\021\374\034\256\256#\320\322\341}B\242\027\347\270\271\211E5%\020E\373\\\230\024c\006\262\246\372\253\224\323\214Mq\375\030\215#\245\027\275\314E\303\252Hl\345}2\207X*p\033\220\321UV\221\234\014\266>\207!\262\223\376\360o\177;\034\004\021\247\264\241K\004]J\3668\246\002\204\257\000q\304\250\323\255\225\330\001o\361#O\026'LrR\235\201\002\373q\252\326\315\002\221h`\213}g-C\203\2345\010\233\021%0\263\223:Y-vt\271\037\304\226Y q9}\302vp\357Y\002o\343\002\\v\324Xq\233\332IB\344\316\335\037@\360\326\313\340o@N\245\211\247w\\\236\304O\252\313\006\251\237\366\215@\247\207\345\t\237*\212\311\275\357\335\010\377\023G\267\237\1773\354\221\034\205\302\351\304\250s\300\0245(NGq\025\233q\313\365\371<\310\375Q\000\343\2361\\\302w',\307\001\225\242\272l\272\343T\260q\276\260\362;Q\277;\001^\301\327t\363*\312\202\367\007f\360j\016\250t~.\336\003*$Z\276\003\312\014\2745r\031\264\237RB\031~i\010\212\254\300'\240\241\371\027\270p\t\014;p\032\3460\3360J\335\346g#\212;\320C\244\374\205\204Q\232\016j\nH%\236t\275\325\331\322]Y\334RPh\001\006\325\022B\006\327\317!\253\207\303'\027\303K\227\264z\250j\220MB\201\250n\352%x\327\271h\317R\360\371v,\347\013\323\203\001:d\325\032\352[\352\"\260\332c\307-0\014\252\244\354\340\t\000\014\031\370\002@\250\356\022\000y\310\2725\206\006\244\335 \331\303r\312~\350I\370W\310\336\247\367\366w\202\3760\004}GZnR\361\342.\325$\334!\336\326v5\207\365K\270\364\254.\360\276(\035\207pIZ\247\257V\271^\262F\321J5\021\207\346\253K\000\203>\312\010_HN]\275J\213py?\353\303pi\2604\320\265M\\\014\237\237=r8\3066;\242\344\017T\252\307$\257[\267\241\236\t\021\303W\245\264i\253\202\311""\262\312\205\257dT\225\357\374\357m\321\014x\221\207 \266\304}$\236\006\350p\316_\306\346\227\341\037@\372\324\267\211\371\355\360\017\266\025\265\010&9\312KR\335\020\006\036\"*\346\267\225tB;g\005\002\t\216S\372a\334\332\263myI\223|\326\210\372\226t4\251\333\366\341\026B\375\026\355#<\033\331\332\255O\331\314\223lY\222(CE\027TZ\312},\016\035\"\314l\252\003\354\213`o\244..W\251S;d\277A\231 \321\266i*HN\234Lr\261>`\332\000w\357<\373\262\271]\177\002\323\031\222$`\356\0354\321\013\0030H\335\217\320H\225D\014\254w\272\211\262\202\340\301P\232\254r\031=\222\3164VH\366w#0\306\222\221\241Nr\207\374\253\014\272\363\300M:9\033T'^\235\rK\363\255\352=JXCt\365\234K\213\027\035\352\265\353+\207\357\364\024;\364\351\207\331\340L\222\245\331\3208\225$M_\305\021\256\020-\002\0330\351f\014p\030}]\260\200Y\263p\242\262\356\352\211\267\016@fK\265\335\027\257\220\341\265d}t0\352\352u2\312\r\267$\271\365\255\237\177\305j\256\216\312nk,\223\367\350u\217]\227F\301\256SW\255}\276Uq\037\306\305\250\351>\n\3156\232\344+f\010\372Sc\356\311\330\266\322\276\322\350\244\256l\207/\r\355q\270\242\177~k\033\227\021\233y\263\216\256\267\370i\353\351\325\022\355\253\223\252%z1\037~k\225\034\025U\313\000\014\343\227[\013\342k\275\013\202\237\334\204\245\362\"\310\356\300L-\214\324m\367\232yJ\332\203e\351\032L\030\214n\274\311\251\312\243\207\006\257\260\210\000\027ZvZI\2730\372\016%\275\373\246\022\376\335!\317\337\026o^\333\347\\:\363\202\213\275\327\301\032\306\354\270\276*<\231\305|\264\n _\213+dB\222\031\330\345d\236\270/\370\nA\307k1+\313Pl\033\244\221N\"\266yD\337\024\221\350\311\360?`\0319\307\022\024\207\226\244\250Z\206Ul\010\277\251\206\266H\216\0260z\351\356\364\013X\212M_\304\363\332\327\037\352\021MPCi\256)Z\254\273\213\261\"h\246\260\271\021\273`\211\006:m6\"\035\301\000G<\025\3018\t\2328|\324\305\310\306\330\217\225rA\274\351c\310\213\316\270\255F\250Wi\t\346Sb\274\355n\261\032E\230\311;\020F\341q\327\222X\017\037\221\\\241\255[j\357\025\021\305\342\010\024\201\253\205\026\200\354\204""\026\300\247\2167\271\261m_\241=\247\314\273\207\262\022e*\245\005\033\363\2156\356\302\034\353h\341\245b\273\223\305\230\222\226d\332\024\331\210\230\377,\\fk\261\232oVi\236N\3229*\376\310<.\013:7\024\364\372\352j4\302y\216&\234{b4\272\272\342@/\354_\302g\272\233\363\033\346fb>\211pT0\177s\216('\223\307\302\002T\335dU\304\366\205\222{\251\3662P.\"\262\325vf\032\364\312F\250I\303\231\002\024\203%&\222\257\2312\313\353\001W\242\230\354\244\026L\224\325\260L\334I\006]d\207\244\343Y\300\"o\331\233\324\311\231\215Y\273\235\261V\023\r\316Xf \341B^\224L\330<\260(S\340\235\313[(\260\240\225-jv\322\341\216\351fQ\326\307^\251\r\214\221\235E\324\202\330ToS\300a\264\rF\230\204I.\223\262\250\336j\316\232\266\251\354\002_\377>f\241\306\270\355\351\250\375\207-\271\246\251Ybkv\307\2619$\315\242_`\225\3132\036\335\030e\327\270\325kr\001\276\371\350s\312\366\245\221s\303\267;\265\340\335\306v\333uP\302O0MC-\276\027Q\264r\251\250\267\\M\221\212\260pa\217\215\202-\037\365jRk\355qb\267\\;\306\036Q&\323\3478\267\202\214=-\021%\220\r\007\014\220G\216\226\372=\303\267\236Jh\221\217\355\261\204}\243\206`\003=\256\347\241\212\376\246H7\373\2218D\324C\274}\004\033\341\204\364\332\360\3300\013L\243\217\361$2\312Yt\335\346R\275\004\2222Np\311x\246&\316\216\000\214c!I\371\373\301/\353|\r\271.\300\306}\276\316@Bo\371\224\266\351\210i\213\372\327k\230>s?2\241\207L\344\341\035K\335\334\223/M\237\353\236\021g\202\222\350\250\366d2\235\352\261\007m\234\274;d\347|\201e\376EZeW\0375\252\246\334\231<\025t\251\245\237z\370\335-GJ!-\350\333H0\002\202\002\024\017\222B\036%Z\303^P\222`\251\307\273d\313\371\264\365\324i\022\267\372\301cV\343\200Tl,\217\251$\313{\224\303\244mw\312\267\313\245kqd\223S\313\232\323H\027&\355:Uogr\262\177\330\324\326\265\305,\332a\372l05\373\251m/\301\372\322\262\277\364\333^J\220\022Dk\233b\336a\276>\323\300r\243\315J\203\315\201\363\021\217\0141\235=\363\345\221\355\361K\020;\2542\363<\2522\361<.3\357\324G\"\371\332x\260\307\241\241\344\377\0178Y\201E\245a\324\361\357\267""\207=w\001\023\337\325\211\212\0320[lF\336$}\377)H\322\002\316`\304\256i\032\221\026\031\247\202\312\200\377\335\372\243\001\340\313\231PcEj\260\252\202\002\031#\376\363\020\200\317\00613\376m]\000\225\305\274\225\365\333\333\221\245]\007yK\274\023\252\002*\337)sl\363\254\261\2153\306\356\224-\366!\003=\373\220O\346\353)\333Hn\372\326B\352V'mk\303\215\267-M\2537E\253/=k\231\373\304\035ss\226\200\314w\030\303Tx\3008\304-\3073L\3310\326\037l9\260\001$\206\345\376q\325A<\304\342\334\342#\370\363\270\352h>4[\207\222\203\303;\034\326\205\010\024x\016Y\311j\267%\252m\222\244\266a\202\332\273%\247\365cCOO\346aHl\351\270\332{f\350q)\256\2551\312\373\347%\313\020\261\022\355\312\035~\374\202\0222,tl5B;\342L}\2136q\023}\232l\374\031S-\231e\200\275\267\331=\333\324B\224\010z\r\035\024\247\377\224\nP#\242\006;\365\346\251\031\260\331\275{\343\024\255L\2468t\352\335\270{\026\004\301\326U\032\304j\034\350\006\362\232\212\343:\217'\224\262\201:B\2055F\324B\220\252P\331\332;\215\324z:\364Y?xN=\241\340\007%\230v\3546\225\372t\276\001\313\230u\026\255\264\330\007\002\252\220C\260\246\030R\320\243\204$q\"%\007f\\:\tk3>]A_\350\223h\250\370%\254\245Q\322\214\311z\005\2513\346\233}\010\222\316\000t\242\342ap\272-\242\005\262\242\265\262\254\302\213\235\345\001\036\013\335\243\241\243\367\306\220\204\322\336\366h\370\304W\251E\324\246\345T%u\271\254\333\246Bmo\013d\224\353\324\267,}\261@E]\2175\261 \213\203\223\242\203\206\257\331r\212@\356\3156\035(\027\227~S\242\322P\226\320\321\010\254\210\244\275\335\204\247\0261\331Mx\332\253':\305H\017\206\262,\027\213\267\3703\013U\255\354\310\237E\250\312\264\256ib\344\240\003aSd\212j\310F\261g\205h1\303\n\025\262!\343\256@+g\210\302\206\215\350<\300\3701I\215Xh\376l\305=v)\304\310$\231\221IS;\360~n\2611\342b\235<\276/|\241\037\342D@\035\230\275:\t~\035\345E!\321o\355\344\276\306f\326I~wO\354k4'\023\374V\236xFB\334r1z!\305a/(\244\027\262_mt\376\310{\027\243\357$@\177Xy\271u\206m\221\224Sl\216]D\344:M\320\256\262\261BZ\240\273\244\004\252\204\002""\242\211o\342M\244\272\337\334\204\211\3207\220\323V\334W\233\202\256\367Ye\206\025\027\332*0=\270\214p\360\230$\205_\271\000\217S$\316\312\360\335\225\331\355&\223\263\204r\0022\010\230\313/\264C\374R%I\370\377T\322%\271\272_\213X\311\227\321N\020\217\026=\216\360[\304y\356\254\264v \217\252ZS\373:c\254\336\256\261T\ng\271[\271B+\016\r\326\314\\\252;+\006\315\252q>\251\212\367\177Z\211\335x\331\273\250\265#-\375\225\250T?\221\237}\021\027CJ\223\353\371f\037\356\3672\230\216\022\320\221]\254\270\211\310\340\031\210\032\265.\337\036\003_j\234l\357+\345o%\214\273-\215\223\327\002\262y7\270jd\220_\211q\276S\361\034\033\246F\270\267\264\010\276\224\010\225\034\271\230\014\2105\321\276\376\256\014\264\300j\224\tv\006\007\036o\013\000P\251\257\305\340\200\304\211{\305\306\016\221r\256-;J\253\341\367/\341\323V7\016\2441%\277K|8\302\202\003\007gV\370R\016\034\324\275\327\201\303\370T\364>\246l\r\326F\273I3\214\223\236\323\255\3350\326GYZ#\2518\211\337H\326\313\321\013\325\026\212\3210\261 \222g\271\323\262B\206\316\315\226\232\357\353\343\010#YrL\236(\314\371\362\316\242\177S\310\361\224\334U\376\312;\224@\204V\373\207\236\315T\235\262F\356%Q\333\363\213w\221\2477)\323\035\372\202\353<D\360\005_\251\362\341I\201\267\037$u\335\304d#[\236\313\207\241e\340\277\267Cp\373\006o\266\266\224j\377\321\365\303\217l\227K\207'\370\2728\033}\204\340\334gx\262J\303p\371\225\"L\034\004\305pn^p\016,p\252\372\003\256oG\03199zRh\313Ly4\260\362*\355y\362C\325)m\215\250H\366P`\006\273\237\004\312\365\230\t\362>\343\370\347o\302\374\246\027\214\327\2203\275G\301\031dV\037\207\334\031\236k\020\271y)\350)P\010\020\216\211\265'\312\003\242\377U\224\241/\032\273\260\024b\352\264)4u\333j\330\254\030\316!\223O~\2630\tQ\232\354\013\312\263?\203\364/\221Q\332\222\375\266\250\351\026\212dy\254(QU>U=\n\257cv\307\322hC\263 \216\217$\030\207 Gg\277+\254\037\311\340\315V\237\024)/I}mr\272$\303K\347\265\324nbB\274h>\337\377\220\244\267\346\234\321\375Gz\213@\244\023h\200\023V\264\256\177\213\227-\226\317""\322\232\215\266\346\251\3471\302\332\036\340@\251\242\312\304w\003\276PI_\017\215\316\030h6\265cR\313\254\016\033\\tn\2476\233\200\225\360\222\360#V\344\214\346\235W\350\263\004~f])\370\243\002\344\367Cg\014r%\204\220uy\n1<\220\337\250\352\235q+K\027$\263ou\013^g\270\217X1\323\021u\321\255\214\036m\3072\336j0\233\316\221\355\0346nC\017\355\275\222y\277~\013\263\364\316\230y&\336\177\210\252\305y\302\352\333\343\2067}\330\212\312E\256\177\375\033\270a\334\216\3338\201\231=\366\231\362\210S\240h\333Sx\\\r\030\263\233Z\020\362\001\210\372-\203\022\351\000K!\245T\233\344\213\351\242\004\216\332\206H\376\t\034\005!v\343y\373\266\022,4\272\\l\364\035\241\002]\325\002\313\211\027.y\273\234\3163\233wO\204\276)\225\007\370|^*\377\235\306\177a\032O\351\342\233\022y\250\205\333Xo]\255\316!2M\324\275.\031g9\374\270E#!\362\255\276b\302C\310\326\005E6yD\322\255\301\240\353\034\003b\307.7#j\242\243*\025O\001\332e\r\216\001\"\034\332\010[\356\350\301\340~N\230\002\241\2409\264U\0049\006n\3251Y8\t\277%\000\370\347\357=B*p\257\372|\365O^y\235S\226\210Z\304]\036\257\377\300\315Sv\310\016\216\353\235'Mz\366\002\313\035F\341x\021\2744\032\247\253\014\216\020\301w\022\023\205\006\002+.m\024\337\340p\270?\306dRS\0208\356\031>\333\324\004\311Z0(\343\3762\215!v0\267Mj\373,\220\341\222\302\214C/\262\345\007'\263\354\323\031\241\373\247\244\033\206\326?\213\257\223x\026OBh<\276\306<\0367\241\316KgM\006\274YU\034\343\377\245\344&Q\261Yn\nSj\355Ik \331\026M\245\303i\313d\033\234\306&\211\256\021\323\244m\300\323\214R\364p\306\253\253+n\345p\330y\004\027\360\253+\254)\255Pt\230e= \242\255\203\341\341Q\377\370\344\021B~_=u$\010e\226\267\371\206\363:\311\345\221\211AU+V#\342\001\363\036\201\305\016\306\t\350\002G \356\314\021\211\262\260L_\324HR|\350C\r\236\2339\231\343^\260_k6\324\342\001\207V\257=|\252f\017N\317H4w G\010O<@N~\2031\254C\003\215n\342\353\033i\201\362\330\203Ch\224\222\305S\356\202\214N\324lO\216\256\256\214\225\034\014O\341\031\315\271\370\325\360\370\344\352\252^\300\0175&[\332""\367\013s\002\343(\277\205\254\347\003\\\261\307\312\220RJ\007+ei<\032\025\272P.\326\356\361\013\315\355\324@\220k\241\tKu\254\321t\234\022]7L\026\245sFjT=\006\376\252\025^\342\230\343w}\356\262\323&<nw=\341\225B\212\251Z\030OA\020\245\306\277]|\210\275\225\010\335\353S\333\223\243\357\324vWj{r\364\340\324\226\227\3473P[1\231\373\247\266\366\360\037\214\332\016N\033\223\333\317H_\007\247\367A`O\216\276\024\201%\314\260\t,\215\246\343\224\370Z\010\254\036O\031\201\255\243\237\271\037\002+\020\355;\205\335\225\302\n\340=8\211\225\013\364\031h,L\347\376\211\2543\201\007\243\262\207\315\251\354C\221\324\303{!\251\002p_\212\2462&\330D\225\307\323q\313|-d\325\030P\031]\025E\356HX\3235\230\212ht\230\315Sr|%\202r\007\203\021l\351\344\250\351\212q5\327V\204\006j\000\r3P\231\345\351\033\225\253X\301\222a\351E8\350\037\364\202\001\374\031\366\017\014\247.\247#{9\260\327\255K\241\r\017\344\217a\311\272\334\204\363\331\303\255\312\340d\247U\001W6{U`\230\370\251la\320\373\r\277\251\242\333\326\246880'1#\220\016\372\307\030m4\t\023\261>\230\324\355\\<r\355\256\265\375\324\272\212\277\316Z\352\261a\341\342\252\376\247\030\362\013(\271}\217\211\021I\333\25401\315%t\312\365uBz\031<\277p\000\0243\0353\250cXG\231<\016\374\\t\370X\312\303\254\035\350z*r\033F\212\005\226@Y\036J\335\305\325\225\206\307\325\225\206\344\005T\353|\014\347]T\313\210\037\230Q\031}\2457\230T\252K\270x\361\303d\016\301%\333\330H\373I/p^\024Q\326\3042\026\373@\022\337\2403\005\273\177qP\211O\357_\275\374\277A\264L'7\301\340\361\243\203\375\203\201\370\377\356\216\250lv\322\364X\300,\303\005\032\203o/\304x/\2353@\232f!\226V\364\213Ri\370\200)\211\345\251 \236=N\243\360\2723<\200\270\264\003\361\377]\215\235rt\016\241y\216\257\245\337\250\354\245\357\266\363\244\316\312\340\370:\370\027S\242o\272\006o\r\251\224\201\371J\347kJ\025]\203\241\300:v\320[T\\A\372\363vpA\002\357K\274\001\266\027\360f!P5\346\327\265\242\207++b1\350z\342\257:\230\220ck\0351H\202\266n\275C\237.\262\313\256\257\302\242\274\306BV)[\004\276""\247\323\3660\000\361 \333\304\354l\207m\3429\212\361-\315\262|\227Tt[\272K\340\271d\247\300\247\362\335\3429\226\237\343\353;\356\026\236\304\347\330-\257y\267\254isLV\251\265g\022x\255S\233_\366\033\357\231z\022\215\272{F@\034\206\252\267\000\213(\350\333\305\332\263k\240JR^%\331\266k\376\353\355\353WZ\221o2A[\354%\362t\025^\027\222;i\225\273\204\222\025\367_\3326\254\023q\331\232o\200\371R\331\216\372\3013\272X\353\320\354\344\227*\355\243\2633+\00298\362R\346<\371d\304\256\257\267\222\377\225\245\311\356\267'\017\350\032\220\201\177\212\2761\234\301:\237\251\334\200r@\035\325\354\017\004E(\355&\300\304\376\033%H\370\275\025\266 \213\020\030=\375\336\032\267 o\220\231#\301\035\223\207)\207\021n7\201\225\035i\243W\331]Y\232\004\333*~\272^\241\035\365\303Q\004\353\374,\036\236\275\022\232\241C\001\334\215v<\347\t\336\341\356n\202\250\311\361\303\365\014Jc\016\246#\277\027\250\215\256X]\257p\202\331w\375\222a\033WE<D\314\310\037V\317\276\213\"\177\277\307\253\242\205\216\t\t\254>J\351\242\222ta\214u\210\333%\356\033\310\220\207\311\224CSH\274\310\224\324'\277M\361\304\314v\365\025I\250\257\221\350i\004\035\214\254Q5\311\234\346o\306eIJ\212U\361'5\007\250\271\220\016\360\013(N<0\270\217\322\001:\213\377\013\224{\036n^\211R/\271\220dN\314o4\225\354|@\313t\016=\032Kt\016\275W\363,\020#\351\324\177N6]G_Su\027O\247\204\302V:]\353\013>\374\010\037\274g\010V\221\207\310\313\004\305\300:0\2073\014\234\240y\310\333\270\001\311i]D s\"\316hA\263t\317\"\022:`\022f\336\346\234\344\323\310\031\205]\026\204\014N\022](J\227~,\370\223\234*9\366`4\010n\251\223#[\302O\036\207\331\013lG9\\^\264\326\t\232 \202\333\252\014\316Pt\2664\n\235\005~H\333\356\226V\005\314C}\320\033\364\206=p\301\270\254wYSK\273\025U\2430\271\233[\232\331H\023\2774QmT\360H\023/=\242,.K_t\246I\205NWW\030\n\377\352\312`\002\354\201\251\244Q!\256\2357\322>\366B9,z\201\333\253\035s_\027\245\230h\325\024\201s\rC\202\234 \247\214H\366\236\346\370\205X\000\006i\305\032KdN\"\256\252\262\022Q\314]\014\343\302\005P\037""\225\305\020\323m\236^\307\023n\001\323\005rx(]{\367\264\254\212\263y\256s\314\316p \037\343)\346[\346I\262X\214\335\361pzg\224>\017\356T2\302\222\245\211\222l\377\362f\223\301\004\270\032\317N\320\340<\214\023\310\215\210]p\323fv\247B\363\034\020k\233\277.\325\207\324\265.\230\251\217e\264Z\254)\005n\241\0279\2032+b\377\022\231\313\202\016\207\253\370:\306\000GN\327\022&r\251\031\n \2264\006\305\255p\\\275\253+\346\216\372}A7\367\007\227bs\334\n\342\245G\365\312\247\341T\035\323\"\030\315\313pAY@\351%UY-o\232q.%\304<q\341\332\244kp\320\\\201\036\021\371\033\001]\247\262\254\244\226;\347\024[f \244E\272\302\240V\351j\301SMHH\2532g\004Y\244'v\266\212fgW\234\306\032\260gD\215\216\324\246\273\332Ux\277m#\327>\234i@\372\214.\216\326\312E\215!\t\314\240\000\272\276\221\305\033jS\252.\357\241^\354\343Bo\357s\316.\210\237\317\301\317\377\362\2626\003\240G\323\327-\026\270\000\231\231\314\255\202]\022\363\215\323,\347\025*\341_\302@\\\020\353p\310\001\035\006\030\212E<\213\377\035\035\320\033|\205\357\360\345\301e-\036\243\2301\374\250\353N\260\006\313\241\001Q\311yP9\203\365\340\2128\246r\336\303,Ud>\232c\204\315\250\330\255_\000\254\207\275C\014\0201\200\260.=\001e\0002\302\030@\014\020F\000_\356\335e\233\031q\347ev\232\002\325\366\343\347\226\335v\n\313\330\241\370\037\207\335\312`;\205\377\214\204z\355g 6\371O\370\363\217\266\177\333\366Uq\302|\273\312\335\241\343\236Y\237\035\034F\337\347p\024\201\300\267\004\024FQ\002\206,^\213\325\365\321\276Jv\014\330\350\273\261\274\252\205\006\374.\324q\331]x\347aw\251hWea\253\305\355\2521mcs\241\240\311\346\232\275\331\\\256.y\306y\301\252\300\232.\303\177\255\243{\024\020o\027\003+4\030\351\344~V\255\304\310\353\227S\nn\374\r\203\004\253\"+\320\362\307(\231\n\224\254\321T\241\372\256R\032/\314\232\337\360\251\231\216\212\366\001\333\266\205wU\210+\364\317\351x\322\362\\\377_c-/\253@\r^\230\013sNM\3674\274\317\261\207\236\t\267s\350\353\362\236\004\007\324\241=\360\276\352\035_\267q\010m\273\2101\036*\004\203jWH \324:\224\260""\020\344\2468\206\244\276\220\312\267\026w \027\342[\220A\334q\265+\205\027\0306\347\344\344\344\205\370\277\341\311\340\321\260\246\000C#g%\321\001\013=\262\022d\263\225\035\367\242n\240\001I\347\350\322\005F\327\264\201QD]\206\242\226\246\254\203\223\n\321\267w8Uro\253u7:\313\340\344\201\304\335\032\372\207\303;B\237\033h\006\375\242\t\211s\3150\241\257-:(qq%\364\213\303\331\002\375\222@S\365\342L\335\025\372lN\267;\364\233\233\tr\014\303\002\364O\216\374\320\327\026\002\024.\246\022\372\225\346\201>\350\227\230\005\326\213LtW\350\237\336\021\370\247;\300\376\324\003\372S?\344O\r\300\237V\303\375\264!\330O\313\240~\372@@\307\250]\271\200\260\301\372jE\257%;%\243\221\3370\235\361=\332O\325\327\377\242\336W\007%2\364\277t\316\375&#H\370C\300\313\321\3439\337\2470\004Z\006\227\033\237\343\217;\352\205mh6@@U\321\261A\301w\312\246\004\237\274\226(\\\027\"\234\346\277\235\267\237.\242\225\230\327\277\277\212nG\377/]}\330\322b\206\265\334J[{\371\373\301\243\263\303\203ZmS\321K\323\210\302A<\014\204\241s\024\261b\263\020!\340~-\255<\223z\377\356YA\317\255\346\246\362n@kd\304\366\356\340\340\014\377\377\357\340\031\321~r\2271\254\263\335\272\356\037\034p\347\325\214\240lK\336\013\2555\253$\023\353\344\236\250s\261\241\006\273d\355\243\323\353\022B\2756\311\351z\013\251\256\034V\025\315^\227\022\355\367\017H\265\325p\327w\346\323\315\2317g\330\327^\216}]\306\262\257-\256z\275\215i\257\036\333\266e)a\337\337?$\377n-\314\335Xxs\362\315y\371\265\227\231_\227q\363vd\327\3656~\276zl\333\026\346n!d\357aa\356\306\335\233\223o\316\346\257\275|\376\272\214\321_[\274\370z\033\253\357\233f\203\225)\341\372\337\3377\333\217\246\243\301\373w/N\013\301}\215\230\274\274>\357@1\251\244]\001$C\201\360\231\034\220J\000[Lw\274\301\260\232\034hR&N\222\341`\203\367\211X_Z`\345\245H\221j\331k\022\233\307Q\261\257\342\360?~\354a\331\354&]\317\247\340^\010\301|\244A\355\216\250S1o\016j\334\020\233L\033\\\027\247\314o\314x\001;\277f\013\326F\306\253\2634\005E\3128\\\265/\203\277\005\307\007Fj0k""\010\276\330\262P\240n\374V\321\221\266[\005\331\240|\220\241\202|e*\261\254\002\320_!\202I)\347\235\020\354>qK\016\310\207[R\236|o\270\205\377\374fZE\333\203(\303\256\037\361\373V\354\"\251\251D\035\222\236ZOO]L2 \235D\267V\346T\244\267\371Md\244}\242\344\nb\325\027\351G\025R\332sS\366\334\226Q\234\340\270.\263\245K\364\tV\226\333F\244\202\346\215\326M~\337\345\371u\302'\263Uq\305\013(\323h0V\223\001\333\0222\t\202\236\214\366-$, \342Vt\332\226\355\245*\343Ke\322\226\207N\334\242\242\322!\210P\317` \200\231\tK\245u\261\252\364i\2458\005Gg\240\213\224\345m\366g\222\260\264\001Ui\223\313\320\366\235V\315|\303\010\253\025L\3371\265\004S\215\324&\205lm\005\034\305\302\333q\324^\214&\330Y\3103T\206\237\250\021W++S\337\240\033q\230l\352\343\r\265sf+\335\357\035;\250\227s\303\000\340C\264Qy\210\320p\251z\321\215DC\242&d\031z\233BrM\314!\210\275\207I\336r\226\026\273\352\313\252\352\323\357c\354\375,\030\267=\215\264\377\330+\207\367xC;\023\331\355\233\310H\275(\223[F\237\342\014\345qi\"\031\007k8#h\354\234\207\306\210$[\351t\375\345\213S\360\215\260p8\251<\214\253\010\304\267\310]-Wb\360\020\322\004\025\267\215\251\227\231\302\364B\360\257\227\001\232;M\360\001\035\332.-\032\3643\233\277\302\370&fnS0\250\324\351b\323\371\324\376,F\352V1\306\312\301SB\267\tO-\235e\231\003\007\003G*\341Bf\240\341\312\246\233\224\003T\264\265@H\206\032f\3160\225\243\275\001_4e\265\307\320/\214;\331\330c\364f\037]\310\344\237a\360\337\321\346'\310]\252;\014\343\314:{~\205\027\356\312\251GY\3377\020e\323l\214G\245\245\246\351\340;\t\352i\212CE4op<\231\247\366\367\243gw&I\340\326\310\310\272\t\355c*\262K/+\005\237d6\263\216\252Z\223\247r\017,\264\34523s\025O1?{E\025\233\246\311+\235\266\231j.iY\tA\t\026\177\374ya\341\243\373\234\375\356\356\254\200J\013\255S\036a.\276\373\336\257\245\t\013\233&-\334!q\341\335\223\027\332\263\330\302\344\371\022\332U'-l\224>\3242&spa\033\243\"\035=\034&\205Z\250\340L\232M\324\207\260\206\325\333w\016\345;\207\362\225p(F\212\357\357\274I\303kq=\256D^\236\353\236""\304\316-z\2673\330{\241\346S\270y\346\336{\342I\376D\2200\005\353r\270N\312F\316\322\360\306L\231X\313\034\n2\177\210yE\377ZG\242\035\301\320\210\202\000\211^ \260\020\372\350\361\306\352\277\215V1\004QC]\303>$r\ts\314\307\250#\2501E\031\247 \321\223\036\n\230$\005\210\033\330\210\3073H\324\002\252\2141\306\t\020\340\020-\200|^v\334\027-h\320\245\271\223\024\226\373\227faD\t\343d\026\255\300\323\222\362\251e\3539\231\353\350\214\216\030\214U\020:\377\340)n\234R\237\220\267$\365\363f\363,\\\212\006\243\340\315*\315S\201H\252\275\316M\210\341]\257\256F#\\\224\321\204<\244F\243\253+\212\300\254?L\243\217\361$2\276\203P$\235j<\344\010\262LuE\313\220\370\24621mI*Z\010c\227C\026\232\034U\035\2206\023^\366\310.\035s\327\024\341&\320Gg\260a+~\316\205\031f\037D\3478\360\013p\201\006\2337\323mY9\276\002z\322a\312\256\251x\242\201\267J\347\335j\035u\001$2\301`\320y!\266n\324u\023x\236\034yZ\177\253\323\354hWc@4\222\032CV'q\300\233Z,lp\034\306\363 \2440\177\252-N\370\213\356\246\210ry\272\242\310\200X\307i\307\350\200\313\332\255I@\346\27099\222qk\021~\302\326Z\024\253\026\013\305\311\307t\376\221\025cq\036\207s#5\250\351Y\213\303\240 G\254\337\003\214\206\227\314X\204\223\034\\\257\361U'KePC0\306\267\022\021a\014^*F;\017}jbv\324\305\360\27482\310\354\212-\214\243\034<l\005\007\214\016\270\202\034\360\362\030\307R@n\360%\266\214`@G\345\332\231\240)\242\215<\236d\270+\t\325`\004\230\271\227\010\026\343I\254\001\300D\2072k!\022\302:\033\274\033\341c.\376d\030[W\220J\244[\002\320Z\376?\303\354\274\220\177V\254\347:\201*\220\036J \337>zb\321\272d9L\037\2611\234\300\205\024\031\371T\237\0144c5\017\346\035c\3046L=\035<'( \253\212\010\315\331[\2156p;G\274C\005\314\305\212\nrG\251\"a[\320h\271/V\022\032\030\246\2700\336)\341,*\254\0014\243/\0017\321\344\003\345\002\373(VR\240\021\362\331\344\224\262N\260\001\n\200i8\236\333\toU(\025#\361mq\313\233ij{\204J\214\321\021\267\247/B\223\265@\271DL\177?\213r9\356=-x\306\322\320\373\366|\267\202Z\2379\247\240\230\236|\361\214\222\264?\265""\216\244\247\201\371\032\017MH\277H\236Y\374\016\356G\320'\300zf\334\327\366\351\"G\353\202\267;\tV\330\235\244\300f\177\232\276\267R;3\316\001M\376\227|\232\3609\240{\017e*{\203O\347\203L\30595\000\243\214\\\321FX\322#T\357\257>j\366]7\217\323\305t\345\\i?\274\005B\215\362\014l-\002<NRU\300\270\341p#P\035\315\221\265\355&#\322K\025\305\273\027\274\177\367\314<\t\000J\\\327\323\265R\003*\223P\354\032\320\205\247`x\0032_\303\204\006\002\020\276\236\315DQ\n\224\001v\255k\261\267\005\3637\307h\354\323h\236\207\366\023\216h\274\341 \332\264\2158,,\221q_\030!r\342\n\354\206\346Q\270\204\000B\214\237b?_'8\321\220\246\rW\315p\214\226\353\021\251\0332\010k\200<\022a\2108\313T\324D\370\203\355\356I\236@P\225\024\200\257G'hM\351\350\220\260a\310\204\225`\351\342\025\243\n\354R\240n\276z\300J\030\004\212\241\373\214\272#\222\210\227{\330\376\002\331\245U\227\230\226\300\341\005F\335\205\300\271\267\020+]\305jGNd\306\227M\031\316\"\236\025\302P\200\036Gl,F\0231_\266pQ\026*@[\"H=\036\317T(\376\030u\271\304\001\n(\033\304U\340@\237\354f\026Q\230p6\000\352vEL(\206\230\200\263\235C\307?\222}[\273\304\235o;\263:\225\211\013sX\375,g\020K\337,9^\355\301\201\303dJ\316\247\370l\235`\027}#p1\017J\316\247\320%\303f\032\001\324\247\252\033:\220\010\376\310\265\360\322O\373MbP\272\267\347:\2468d*#\256\326t7\340T\336\273;\350\024\014\364<v9\255\020\356~c\274\000\266\314\200pj\311L\237vS<\351\213\022\247*\225\216M\032x\355\357\033XqV\310\\\r\303\322\017\343\226\233\t\233\367@\261\342A\317\227I\373@\325w\027C\354\236%\246HH\2265\226\242\207\374\322\271\016\351\r\006\226*\2267Fa\272\373j\251\214\341\227\256G\255\032\330*L\256\243\316\340`x\324\255\261dR\004\3355\233C\217\340>\356\t\177\330\021i\332\355\312C\263\033\340K@\032\267DI\227\245\304Em\363r\036N\200\3229\362\346\017\321f\237\330H%\332\365\030\253\200\240O}\357\320\005\210/\270\350O\254/\013\024\021G\334`\300\261\007\304nJ\221\255\224\317\r%\261\252\3373DN\207-\257\257\225 \010\215\020Bg\017\252H$\031\216\211\032\027\024v\342\310\224""\303u\r\331\273`R1\213=9\340\024L\335X\034\017\007\277\204\206#n_lF\367\240\016\271w\345F\225f\022!#615+\366+\r\372\\M\305g\326UK[r\217Z\221\267\316\276\362,\016!\373\324\355\322Y \251>\204m\030\361\004\r\265H\275\211m\333\365$l}\360\355\336m\264\337\373_h\303\177=\202\370M\024\256P\014\1770\304\350LC\240\006\007\203\307\370{PC \377mH\362\313\310\231a\002)\341\372\271\010\332W\240\337E\260\235\353\220\027\323Y/(!q$\316\377\302\na[2t\206\274aQI\234\025\350\242\261\312\365(\242T^\334\211\"\272ph8RC\327]\206\207z\361\r]\314?H\237\312\013\336`ZjU\316U\313\335\207\\qU\253m\016\271\355U\273\220\242\342\341\022\0055\367\244\343j\256\007De\222 \355\341V+AP\245\013]U\362\246\022O\272z)~\352\273k\271\376$\230\234\034c\246\241\370\277\340PS\255\t\343F\020\267\264\274S\237\260\373\003S\366\311\245\317\317\305{\222\013\223\360\000%\3174\254\300\343\331cT5\204\274\3278\037\276\275C\230\267\177ap\32548p\232\366OO`\221\241\221\230\212\266\257\250\217\253\235\003\237\335\217\253\216\337I\247\324=\247\242\323\373\361\332\251\360\327\271oW\235J\350RRLw\031\355\t\361X\017\273F\334OQ\201\306I[\235\242\371\211\227\354\210tqx\351\201*u\366\300 =\364\356w{\320\367\353\007\265\377\\\352nS3\260\270\30421\260|D\271IG\243\353(\037\215\202\316<N\242`x\374\250\253\013m\362\310_\352\321\211.\205\3331\343/\207\217\016\324\027\020\325\211\311\200\214\362:\315\025\206\367o\302l\204\310,x\364\321x=\233\t\222\343tpxht\220\254\027e\305\206\007v1\222 \273\243}|\252KA\2121\344OF(\344\341\"G\007\242!+\035c_\035fNk\203\343\243c\267,f\244,\224;~,\313\r\217O\266\264\371\370\310-\353m\363\344\340\264k%;/o\362\350\350\221S\324\333\342\321\311\240ke\367\255h\361\361\211S\324?\357\301\201fNE\3719\312\371\005\025O\327d\210\366\021iy\244L\314d`Bd\177\314[\232\264TPU'\244tFS\2005\213\213Y!\033\204\327\342\234\270&\337N\203\336cP\310l=&\033\216<\270\272\222\005\243NW\031\0324\276i\212\333pF\201kd\364\353\213\202a\337+#T\242\234+J\262\331yTN\202\023\272\252Y\212\266\265\262L\224\030\3457\202\020M\263j\315&\374\367""\217\233\010\025\231\002,@\337\026\000?\252\214\200G\003\203>\224JPu$\212\241\216\265c*\306\r\235O\267\007\212\256\214\256o\2050\335\353\234M\013\256\327\002dI\036\331\326vu\356\330\377\001S\376\3210\020~\033E\301\323y\226\226_\265\315z}\265\224\273^\326\313\356\342[/\363\365/\353\303\301\335/\356\256\000\260\356\365\275p{\177\003\363\311\341\327\363\364\332\270\316ok\357\201\335\331\020\365G\343M\207`\330\325\013\333\2710\256\347\355l\275hw/\267Y\247A\033\005\0035lc$\032\250\364\202\243\252\027\264\204\270j\270\200\260r\246\311\232\321\030\030\265\235\364\006\007G\275c\243\004\330>\344a<\207\244\303`\331\004:M\022x)]-\230\255L\243,\230\306x\262\251\2447|\322\211\232J\376\377\316\026\355;\004\367x \316\031\273,\356U\261\035\235\202\007\307nA\035\346\332-+\003\216\350\nA\007D|\327)\204\233\232\243\201F\0066a\033\231\250\274[\3772\241\347\342\306\271-O\264\300sb\"X+x\246=\331\035\223F\351\3717M\033\345\352o@\256\204\"#3\177\231=\306\216\256\364\003i^\317e\2526V\221\235K30\002\307\371\201\231\343\314\031l]\036V+\r)\304kk\332\342\014\320\333\246\360Y\225\206\306\303\364\256\032D\214\307\252\236\206Vk\232y\321)FL\036%@3J\255%;\013:\377&f\237\365\202\177\343c\276\333\340 \354\340\205Z\374\351\332\314\203\222\263A\323xe\321\226\001\334\315\375\373P\033\264\233d\216\246-8!\007\235B\230\202h\333\261\261U\210\314\350\266\345,12# \300\216T\006u\\$2\266\237\200%\211\371\373G\244\243mL\023B2et\303 \333\276\036\362GW\022o\227\033\276`\\)\313\003i\007\3257\3334\r\245\252[f+%RUmi\225\216\210\312\366(_\n\236$a.\010\302\030\314e\030'\311\016\355\2270\t\257\321\304\244\330\001zT\327\203\004^\240\256\274\255X\375T\266&\033c6r4Y\256GlC\267\240\352\235\256\267\013r\367\2527R\022]\372\207\372v)\270\224\350\331\353\327\024\n\277\262A\016o\t\220Tm;\365\211\203\371\233^\306\254\252\327\267\317~\t\305\022}\332\265WY\277a\257/\3566WY\277a\257\277\336q\256\2776\232\353\216S\334:3MLV\351\222\232\340t;\362\336\006\364W\311\031ut\016Q\314\324N7\275E\312\326\267\\$q\377\242\243D'\353\006\030rH\360""\\p\027S*S\216\004a\237<wuxb\233,\313\357\351.\276M\016\270\254\236\237\002\255_\353\350\241\236\220!\366\354\266\237x\324g\3476]}\200\214\326\213X\264>'\353Nc\024\335\275\357\376T\216\026V\355\002\202\273W\3736\025e\224\343\220Rp=X \222\255;t\373 /\244\016\326p\216\332z\227\324\001\314\234a>_\203\031\"\260\326\037\242M\360\373\037|\362\211\035\2036\255q\036-\020;d\3725\314\224\226Iw\0040\004%\007\312\233\360\2438\332\315\30623Il\037\0022\273\022\266\303\307\007\335\237Bq\231dw\017\316Y\306\276`\213u\226\263\377\020^\035~\022\327\2635X\263\212\255\014cm\377\224\240u7y\360d\340\234\261\370\211%\265\301`_\245\016\002\037\014e\016\355\320k`\267\227\371j\227j\300\245\327\256\367l\267\356\236\225t7\254\256'\317\373B\275\247\344\352\005Rl\365\216x\025\347e\250\326\3333\304\314\032\243<o\235\251\355\326\2025Zq@\245\311>\2708m\244\307\210\361\r5\262\202Q\304\353\245;\374D\371XHo/\351\276]\346\357\205#\"$\312\304]\246\037\365\001\245\311|\303p\360\242\022\243\221\362\354\272\257\236I\201]\3211\251\321\313;\226>\022\314\261\007\241g\255g\361\034\366v~C\2561\352=\350\266Q\226A\345\361\316\3356\277\202\265\267\373\034\2442\"%\325U\337\345\302;/VD;\234!\361\371\243N\0313\325#\341JiQq\201'GHC\\P^;\233\304\313M?C\234\353O\322t\244 V\370\262\300]\347\014\324.\225M\312\352\213/u\352\257J\353\257J\352\323w\261\271\351\303\213P,&\222^\345\217C\374U\013\377\261\325Y\303\243\307\217\272\364~6\007\277\301Dk\300\006\374AY\253\0254iC.\201\036\356\356\327\343S\371u=\237\343i\345\2268\222=8\241\020d\201\223\341c.\000\274R\341\363\361\343c\3633z\343\313\232\342\0001?\361\010\324\334\206C\363\263\241'\033\236\034C\243\363H\373b\005\342 \005\005\014\250\371\300\3453I\305\271<\325'\350\213\030\016:\324\264\2562i\265\237*\037\264\276-\374?\003\346\374Lq\356\340\212*\256\272$\374\274\302\035?\003\217\264u\206\036E\r\331m2_<\013\336r\230z\311kZ\214\350;\231<\024Pd\236\246\037\330A\217\274\013m\237Y\340\272r\327&\242\320\032\225\242\211c\356Q\253\345+\354\354J7\n\214\301\266&#\312x[\257A\333}\255""\322m\2158q\303\343\014[\\\2469\320\343p.\277h\337\314\254\301\035\200\006|\026\240\375<\255Aab\n=T\016W\013\364Ag\177\300N\204\024\t\242\333\177P\033lK\214\323\271\220\272\030\310\227\251\331\370\313\256\247\276ze\tG-O;\217d\324\026]\332\277\203`\330\253z<2\236.{\245\215\034\331\265\216\355G1\037\263\231\275\342/=E\332\225\235\243nq\256\306\022\237\005\303'\025\225{\264=\316\017\267\265r\370\304 )@I\340\014\235F\030\265\027=L\307\034;8C\305\246`\215\326+\366\034*\246dF:\031S\n\341\370z\235\256A\026\300\330\335w3)\032\331\311\320\275d\304L\225\264\03589\001j\312\306\034\020\315\305\250\300l\033\233+\034?\366\226$I\277k\333p\362\350\330.\214\367\001L\267\nV-N\361\323\223COiR\247P\250?\247\374\341\243\322\362\036}\320\351\261\241\324\177\301G!z\322\231(\335G\tB\234\343A\200\367\217\365\204\330\242\236\031A\305\260\355\342S\225\270\243\024/v\004\333%\305\355\206\3724\374\346\266\340eT\317\353\234\255\222,\027(\034\272\277K\24713N\000\\\370d[K\245\223\252C\t)\010\003\307\010\002jg9\346~m\004\rY6_u\336\311\2044x\311\314\244Z\313\252{?\264\020\224<`84\217\247gx\307\226\321\022\3542\223\233X0s\007\244\255s\004\rEjX\240\242\005\002Y \221.\2214\211\2431\202\301\356#(\274\030\024^\224\364\177Y\004\276d\\\215\000Z\027\017w&\355x\272\364>\3371\351\300r\340\037\220\017\220\271\031U\344-\322&\324\331\022\231b}\255\212\323A\373\201\037\237\370X\004\273A_\3668K\033YJu\211t\252p1p\371\267.\263\177N\322\371u\322\312\277\016\363'\256fc\301\031\214\020JY\247\353\237s\265\257\254;@kR\326\303Q\351\2035\007s\006\227[\266\320;\307\336\020%\252\314\241H\273A\315\300\000\267\250\230\025\343J\303L\013\327+p-A\360\032-\362\224\036i\005\206\357\263<\020\327\334\033\360\372\375s16\017\3439\307\0205\275b\r\235\212\330\223\206\236\244M&n\355?\266*W\224\301\036Y\347\351\006\217\376p6\365\002\342BX\335\213\375\177rYG\275\"]Ui\n=li\273\336G\377\247c\332\241\215\016\326o\371z\336\242\307\010\317\030\212?8\336@=['\3233\255\347\236\030H\304lU\257\324\233H\026\031\364J\264<\262\300\260\347\265\320\303""\251Uj\206\304\034\356\314\017:\203\276P\026\221P\261\001\037\007\312)o\361\241\2778\332\033\001\242\031\234\005\317\370B`\323\211\251\342\322TJ\353\237\311\231\333\240,^}W\221\325+\301\206~\331*\206\375\022\037\262\376\216k\246{\272p\200}\351\351\024\225~\326\027i\221Y\003\200\325\344^\322c\014\212jB\262g\312\007h\021\311\215\240\020\307L\005@\221\216\317\361JF\003]E\344|4\336\260\346\034\002:\2653\016n\332,\027\002\330\003\300\215\374\302\312\210py\377)\021\006V>\004\362`\221Njd\351'%\303\347\024\217\316\256>\264\252\223\037\214\221\005\332\226Jw\032\245M\230\331M\317\224\253\255X\265\316\305L\320\230\031\206\357p\307WX\372\260j\323\314f\205}\202\240\376a6S\344r\014\3507M\327\343y\244\010\214\350=M\317(\215\336\023\365\366\211\323\266\357\342\345v\323\3675\377\244W\030N\337\350P#z\227\002\365Ah;\014\253$5f:\224$\211^@g\305R\324\331:'\261\030\010\356\343l\301\301\010\004~c\274\\\360q\025U\3200\344\345\353\200|\007\350*\243\364\312@10>\3362\315b\210\364\364\362\315\263\000\313e\220Z+\203`pu\214\200\301_G\354\035\220\344gNJ\032m\374(\013\364U\025\262\274\034\241\345eEE\323@\323\254\256u^[\2330\324cU\315`@*\267\225\347\030\375\312l$\266'\201N\276\323\221\371\271b.T\332\323\030\300\376v\025\347\321w\340\177\001\340\377\373\353 ]Fd\255\001&\376\223y\232\261\272\330\364\206\005'\233\236\023\334K\372\306I{\177\270_\244\311\\\207\345\203\030z\253\3751(9\350\\1\335\340\356\375,\320\346\335^\367<MW\201\316\2725\211\207\030}\214\243\333m\365-\227\245\227R\325\017q\303\0236\315\242(\202I\360\354\315{6y\255Y,\220o\361t&'\341p:]\t$\216\262\227\211\021\325\226#\022\322\275\256\374\013tC\211\261\220\364E1\336\344\230\002\222?\025\253\364_r\0107I\"\3158o/\023dQ\311\206\0004\243\240\000\243W\034!nDj\270L\177\3004\331`\371\343y\245B\004\036\016\253\276\236\034\351\257\342\203\200\024\364\255^\221j\r\n\303\354\001F\242\310\231\347s{\021.\263\221X\322\345\0066\000\334\217\214\"t\241m\013\264\3176\350\240\203gC\033\303\373\302-\364*\350H_\262>\030\335E\020\030\3603\365\322\266\273\021{""\016\322\225O\004\3745\002ft\022\262V\310\253\rz\25080n\2442\371\371\223`}t@\262\022\241S\017\212\030i\201\3255\200&B\267P\303\352\025;\353|\352i3\261\363\213\226\370=h\365\340\237a\341J\311\226E\331H\303\304\277\207\313`\271X+_\211x\301\017\177uX2\030J\210!G\370\226\336\241\000\3700\226\021X9\026&\231\260\330ur\016fk\245m v\017\356'\353E\204\036[\3441d,\301\377\263/9\016\370\251\333\216k,\013\353i\3111\261\004\336.\273\337\272mnc\377\226\373rp\251\353,\211\206(\270\264X\024\202nK\343\326\356Y1^\021\0067\211\321\276\210\264s]\257Y\353p\257\250\013\301\374\254[\024\324\303\307\007\217\273\252`\265\372\370dx\240\213\376\217\340\023JU\344\303\341\261\257dJ\021l\013a\002N\275\245A?^({48\361\225\365+\337\017\207N\341-\352\364G\007\303\322\362\036x<\0328\343V\001i\225\036\010v\032^\377~\246\330\024\222\267\000\365N\202\216\356\037#\376\004\311cP\014\321\371Y\034\344\034'%\201pny\245=\302\360\344\321iW\027\360\303xx:|\324\335\206\n\217\216O\2725\214\016\216ON\273\333\221\345\370t\320\335\212'\007\007\207\335Z(28>\355\326\300\216\301\251[\314\217\030\203\203\243nM\23489\366\026\365m\217\223G\335\032\230\260\347\246\014r(~9\255\337&w\322\216(\322\"\241\202\376\373\214\026\276\237\003\237\361\034 \362\317k\366 Z}\333=v\273\346\320\021\273?\224f\337\200\255\375\336\rc\340\237\203\001\377mZ\177\334a5w\"y|\260\350\026.\237,k\323&\002\375\007R\211\221i\356\271)\033\355\264C'\220a\320i\217\035\301.\276\234\270\361\013\273e=\364\035y\270#\306\014\245\272\310\225[\216\245h\263\360e\"\025\017O<b{\202)\231\014K\307\267\354[\007!NBC\020\273\300FE#\036\030\374\022~\220\031\365ThV\322\270K!/\351\335\371\316\205EnB\023JO\005NB9\220\037\t\222\212N\202T\205\321\323\336\212\263 2\364\337f\2767q\021\001+\371$\314\245\225\336o\321*E\353\351\204\207at\373.\r\302\217i,\345Z*\037DO\006\327\222G\rG\205e3\002jYkv r\215Xc\036r\237\006\233\221\244\032]\246(\331\311\247x\261^\200 :\213uH\271o@\243\376\305\263\302\335\325\316\205\017<\177\003\025!g\240\321z\336\213\256a\215N\356V\364\342\253\216a\300q""\242\225\352\032n\374xmwr\235\325\325\2457\215\262Y\342\334\010\232\316\336E1!\232\25105r\242I82\030/\232\247\213\223lC\211\335\316CO\266\267\333T\033f\203\373%\\\226\336\031\216\216\017\273\342;\205\323\311\243\205\377&\367\350\221]\310w}{|\240\312|\2106\376v\216\007V\031_3'Gf\221l\224\245\220\302\3045\275>\300Q\243\357&\035\210:~\030^\006Y\007\372\013\244~\212\301\356\232B\n\201c(\3075\304LC2\213\235\250G\036\343\2341\005\353\311\333\345\200\343\006Z/C)`\243\010\250\020>l\242\023\240\030\3372\247\232\223\210hFru\210\337\023\205\211U\226\337Q\346\005\375\005=\377Y\020\206\231\261~\201\267\344e\353\204\316QQ{t\221i$\205\333\034\tR\177ba\276\3148\263bM)\346\020\021d\273PPed\245\032\333\276\373ZREd\212\\\206\243\016x\355\215)\240\033\310\330\343T\024\220\271U\360\010\366\271\324\277\242\316\310\217\306\327\256'\206\314\266\223H\336\373\304\200\277\374\025\257\332\334\252\241\237\275i\234\335\334\317\276Q\373,06\202\232\311\273\343e\371%o\344r\217\236\332E\036\322\300\001-\227W>\305\331_Z\032\257J\033@\205Z\000R\250f\300\023\262Ae\002Q!w\026{\346\233\357\004y\201\354U\360\026\322J\246+\3602\002z\364*\345,\237\3638$\307m\301E\356\223\231\020\305!\206\317\300Y\276\022\264\302\010\302\315\311\347\316\002|\237\220\0034\271\233\363\225\231?\210\226\257\023P\214\236\031i\222\236\221oo\014\344O\334\270AA\020A\356'\324\231\311(\312o~z\263\177tz\304aMP\265\000A2's\210\370\20183^\307\020|\023\307H\351$!n\0018[a\320M\244G\272B\256BJ\nr\323\306<U\010(8\365\304^js\220\026\314\211\306\271\000\373\257\300\221Sz\243wHI7\216f\030\323\001H\333y\340\321\306K\241G\003\247\303\374\213ei)e\230e\334\265:\241\031\253i\317\256IS\014f\270\001\361\262HXu8\r\235\271\004\354\026\\Y\325\320C\255\3345\246{\252\274\335\366\277\354\222\377%$\212\215W\n\311\2254`\221\367^\312\253\313l\r\313\221-O\227\350\323d\276\236\222@\"\236O\005\243\372\240\366,\206\335\214gV\226\tKI\351\303*\030`\206T\261\n`\026\364\365\220\245\352;=!O\251\373\212\2412\364\350\006\367\374!\n\215\020=k\225\215w\032\3150\237/\230G9)""\220z\226\366B\311t2\261w\214(\215f\017\375\357T\377\333\242\372\210\026\362\323\3116\004*\245\367\025\370\224S2\366RL\322\030\244\035\310\276<&\375e\016\023\013\001\216\252\020\240 \245\356\177\355\264\224@\277\325\025\220\016U\234\222\347\364\241\304\274^\335\376k\260t\214>\345t[#>\034\003\340\243#\302\265\270\213CD/,E\301\225\316aD\300\367g\353\345\222\004I\330\317\353e$\215\331\202E\270\004\331\201\212g\324\267\262\307\033\2058\327,\371\250\325\212\351\014\315Q C\312\231\r\326\206g\301\357mL\213\261\372;\374\275m\377\241E\352\342\303^!n=\352|\3468\213t\031\311d\3122\200}G\324\351\366\320\336\231\036o\333\032\344\242\034f\r\356@g\335-\231\262\0270\3073\025\322t)\220\036\242\332l\013\021\375+\017\004\345i\241\t/\031\255\020\242'\026\364\002\030^*]\002v\327\215\037M9\317\302>E\331\347\360Y\235vDC\033\301\370\373\371\247\274\335\205z\364\365l\317$\001\364\256\217\266\341\235q\333I\254\306\312\0313\224$)T\000\022<\001\206\2554\025:\036\024\006\247b\272.\313F\006O\366\270\360;,\350(\314;'\275\243c\273\227q\233;\227\250[0\256\206\272\321\312\367\005\347\272\032Q\346k\231\241\031H\221\312\371\241be\234t\337p\316g' \032\346\245\246\374N\200\204\234\021\036\256\311hy\254\266\2262\235\005\303\341x\036\347\234\031*\235C\236a\231>^n\254_9\210\231\270\217\257\302\225\266\361~#sW\004\377\024\203P!\340\r\235\036\364\034&\224\236^l\357Bz\014\331\003\326W\231\227u\204\322\036\007\010\232\255W\320\206\336-\022~\212\246\210\245\237\307;\270\243\256\342\353\233|D\243=\013l\345\201\214\352C_\305\031\216\303\344\263\234\263\336\007x\366\204\214\231\234i\032\332tt1D\351\365d\325\014\372\215\222r\2743\234\352p\033\313a\360\030\375\3719\240e\253\031\023\354\332\005\000={!\254\177\337\001O\311\310*\024\214\205q*\270\214\032\216\324\0073\206\260=T\246\304IpEV\325W*\3644\262R\240\177 \0316\257\022\316\226\2315Y\037\272\221\341\373\305\014\365\004[XZ\220\263h\325*L\364CL!)\t=\354\211q~\027\324\247&V2/\014\006N\355f\321\"\006\206\206\247\305O\370)\024<\215\376DO\266UH\234$bP=k\210\252\202z""\304\270c\364\244\017\035\2501\312\0041\215?\271\023.\254(\245\321\343\302\020\260a\212We\354\324\014\261\313)\332\227+\310`\236c\214\242\331\032\310\211\325\032j\017L\017\321\230\321\017Ezz\3770C,J\315c<\273\330\232\302\306\317\273MAo\331/7\217I\032\212B\223Hn\265-\231r^\322\376U\201W\247D<4\332\245\013q\375\002:\017{\317\010*\215I;J\211\022E\247x\310\354=\206\253\350\034N\273\350\223\364\336\020\035\270a\363~R\037\255\216~\205\324#\340\036Cmpf\022P\035\322\031\000#@\317@\350\027\332\373L\326\n;g\343\261\013\310\351c\301\211s\263\032\024\257V\361\024.F\003\344\352\017k\334\214K\263\362\272\267\246)\271\310\372z;Da\314\366\256\364\265\257\266.\313\314\375\323$<\364\240\374~7p\212\016\313\213\016\rE\336\317\212\236\342\356p]\326\007}x\333\311!\370\202\200J\267`\232\320\007}\270\221\026h\213\251\002\304\001\260\315\024\3123\001\371\r\032\252\355\031\240\375\013\261r\203\236\351\204\256S\006\r\036\367T\336\240B\266 (r\214\216\357\005\357w\356\372\242\260\\fi\355\201\247\316\241:@\355\351\023\371\334:\302\276!`[\021\001\374\340va\352\205\271\327\370\244\022\356\216\215\211\246\202\2325h\274\010&[q\347U\360\301\274\2702\273\257\202\005m\007\306r\205\216J\340^\027\332\2250\006~mG\020#\253\327\034\215\357\212\262~p\224\002\303?\371\227\300\222\312K\035d\303\305x\361p5\227>\373|t\353\343\277\t\200$\307[\340!\316\227\023\n\200\334\021?(\372\202\024\370v\361\374\351~\025t\241@\016< \367@\333c#\241n\340\211\231@R\347\250\304\314t*\007Fi\256\312zWe3E%\273Z\\`l\357\016\262\335\342O\367R\335\017\355\017=A\367)k\311kr\026\356\332\327\332\237\2554\003\362\326\217&\275\370\212\334\313#k\222\034&\202dTVk\300{\203\n\017\r\261\323\331\231U\315\340\361\203Y\n\031\322\215\200X(\303\331\350|GX\n\305'\034jx\276\261\032S\005\351\273}\031}\203\006V\030\307\036m\217\004[z\035\345:\322\0350\203 \207\301i\342J\365K\356\3204\016)\351P\241\217\304\263\321<\330UI#'\253\035\363V\323\303\036\327`u\306\341G@\324\007\331\271\366\361\227gn\366uA\354\264%\231B\314M\347biT\214\027k^L\013\2122\007\215""\254mve\265\342\200T\\j \256\366*\232AX\355}F\350}\250\235]5\346\354\235k\204\270\242\250=\341\235\372\003\244(\263L{=\334\260\233\327N%\267\243?\223\326e\267WY\215o\002\244cq\013+\343\341\013\210g\203<59\212\265.\r\316\367\355za\006\274\225E\312\350J@m\271$\\\347\305\244\357v^L\331\250\030A\266^\264\266\347\305\2046\n\304\225\032\331\232\030\223\352^ H\001\216\000\306Ko#\300\022<\302d\230\352\3633\214\037\203R\002\320\363\335'\020..aI\241\375\221\240-\273\002A5p\007\030\030m\220\301\363\300J[\223j\237\006\363\030h4[\027k\013(\320+\226\220H\212\303kum\\\276g\214A\033f\354\350\336q\311\327\205\007\314\032\323\264\351\200\264\221\226\261$Hro\355K-\026o\202\232\265\245\016\306\2522\325\270\254\275\256\264n=\321d\037'\307\307\177\007\364k\347-PJP\010\274V\367\036\327\366\236\326\260|\235\376\243\372\030\007\231\332\356Da\267\2517\230\236\227{\314\244\374\272\221\026\007E\244\261\262\213F\241*\312?\367\261\255\350\323$Z\346$\022\277\215H(\007\022\375D\260\275\020\350\036d\362\253\320\322\354\240}'E\277\201Y\364\203\037A+\3122T\025\303\213\224X\034\255\016\022\216\323HPr\317\023\321,\267\250\227\212z\353,\232\255\347*\302\214\340+0p\022\032\201\341\010!J\013h\215Ad\217)\371\310B\325R*\275\326|\240\232\r\030\216\t\224\001-\014Ja\361\312\323\032oZ\322\0364\023\323%i$}J\223\326wMX\225&\014\245\301R\025\357a\207\353k\276\240\027\2007\254L3\r\230\235T\004R\237F\237\304\344x\331A\271\232a@'\253\213^\200\231\234B$\n\224\240\001Z\003\263\302\320j\220[\231i\335\254\370}u\205\360\352\213F\367q(\342\327\325\025\264\303\360Z\2019\203\325\316\325\325\305B\\\223\017zb1\346b\026\311$\0227\335E\370\311~uyu\345\314\210\262\225\010\212\217\033\300\264\342\2607\227\234Y?\370E'fC\302gs\355\350\331\203FM\342 Y\260\305\207\323\3473Z1\310ui6\255=n\022\031z\252\007\243\212\320W\004\366j\226\013\336\233[4\256i\017\242+e\212\322L_\212}9_c\266+\237\272j(\025\004\214l\026(\220\034\255p\026i\307\026E\021\345*:1\336\324\236T\337)\323\017\241\251\006.kB\372\301S\336\216\005\334\264/\317\201\214\252""\2101\244q\216X\343\241\361S\224U/D\253\344`{fc\320~ \355\213 \354)k~&!F~\\\206Y\276\037f\373\351\214\016\237t\"\326;s2\017t\344\306\233\231\335\005?\234\007\305\251\301\333\203\253\253\356\377r\206\200)\205(vdq\024\024\241\262\3318\016\312\3737 \342\033\007\2702\027\306\000\347\256@\201fcP\335\237\237\353\245\355z\210\206\006\032\256\2738U\226\253\210|\253\265\262\035b\271e.\375u\265\266\222\312?\264M\001\024\023}\025N\200\373\266,\2502,\240azi\326\237\307\212\342\216j\326\273JV\006v\346w\245\027=\224\002\221-\332\321\242bt\240\325\243\374\367\260\240w\034\372z\335\256\037\365t\266\245B3]j\0035\252O\360>\202\013\001J\337\323\344\234\306\332\023G\3569\311\342\025\r8\337\037~\035\232\266A\357P\\\322\016{\207^]\033\251\331\006\244k\223\177\016\275\232\016\324\233\261\326\355\270\\\327I\3525\237\342\315\367\322h\342\315\n\366_\276\t\256\214\310\225W\212\005\"Sf\224\230\3031\303\020}&n\313\023\263\211\217\220:L\211\177\371\2266\001\343y\264\205$\276\234\034n\033lKl\347\314Y\307{\217[B\236\200\024\262\004\177{\304\240:x\266r\0255\003\232T\224\227\266\342\205\310&Z\310\262\212 k\246\003=\212P\217\343is\264uW\272\305\360\304ZD\177?O\370\001\177\304\001\343\255\212\031\272N\264\205\247\240\324\267\020\3058\\]\257\301\311\262\223u\317,\317\354p:ew)\025*\355\360\244k\226@?F\031Q\356``}\263\362\214\036\016\036\237vK\2347T\364\202\223a\261\210e\327zxx\362\250X\344\377g\357K\036\233:\222\306a\206d\200@\202\023\002!\253pBle\214c\311+N\234\337\0300\304\t\253\027\262\3601\017Yz6\n\262$\364$\260\311\227\371r\344\250\243\216:\372\350\243\217\034s\324\321G\376\204\374\t\277\332\272_\367[d\031\314\226a&\310\275\275^\253\253\253\252\253\253\304\n\215\351\262npx\304\356\014\332\033\250\226\252\231\202\274}\242\327\362zT\003\303V\341\"\332\225\013\233\200\033\035\260K\371\217\311\202EG\306\322\241\242\364,#X\345\300\240UN\374\240\332s~*5\032(\204\307\253jZ\233\213\013\225\"\253\316\312=p\310\265j`!\005r\203\375K\333\225zn\001\355Y)K\206C\301\334J>S\360\347up\340T:P\240\032\034\333\260""\275L^\001\355\034+\220\031\2623\253%G\036I+\007\202)\253~\271IFM<\300\225@\013\251Aw\242\335\317o\214\306C\266\006\270*\177\376\306\023\337\273\253\327P\374wQ\325\256%f3\362j\001\210\374+\374H\331~\336\240u\366\261\230\317\003.d\0149\201\377\005\373\263\365J\206\265\013\377Y\004?\227`\213\337.\355\353\374\235Z\360k\217\254\005\033\215\261+\311L\260_\373Y\340\302\326%\330\232>\361\245l\321\000yF\324\372W\005\264\242 \366O=\221\306\256e*9@\376\334)(S\346\371\256\344\357g\324{&\272Y\366'\242\375\212@\037\225\242\355i\230\241)\325e\313\026\306~\223\020\266\213\350\256\301a\247&\256\177\253\007\020g\361\375\025ri3\031\026\343QU\366t\351\232\361$\265\332\354\364\361\003\367\313l\242\027\316\"\253\252\244\375\252\000\030\200\204\343\340\3230\307\351\205m\270H\362\217\214\303\276X\340ce\301-\360\035\255,\273\223E\022\224\336\272\347=G\204(\275\272\216\210\317\210)!\237\t\332cB\357b\267\376\"B&\303\263\203m\375\252\213\375\326\235\014\325\014G\020\264\235\354\327\003\212l\3337X\266?N\033\360\372\376vz\202\275\335d/\262\333\230*!\014\342\277\310\271\305\322r\207_\334\210\316\212\371\342\323\304\245\376\323\"\205\246\255\235+\001\217\344\300l9\372\231\212\233\270\251\033\276\231\300\255\357*\244\352_\203\207+&a0nV\332\253\016lVG/\211Yaf\261Job|\214\020Ya\367\362*\034\273\331\333\350\201\272\"0\332\035\036T2\002@\331)=\356\\}\030\010\274&\023'\277!{\255^\030\322>ES\022e\215\014X\314\016\024\213\347\251\267$fivR\223X\350\356\266\262\376E\233\n=\257\224rm{\346\317)\366-[\360\372\224U|\207m\344\350\354\\2\252\257\322>\201\275\211\021\363\276\301\210\270>[;\336l\364\372\300\r\332\234\311\375\366Ab\237\010U\033\305\300\006Qx\315\321\205\250\272\336 jQt\261\324?_\254t\332B\255\030\327F$\230$\367[\367G3D\320\240R\027!KuA\311\257\313\002>\034\265jA\274\227\364\034\260F\344\314\335\360\224\016\313\231\255\344E\271\346\205}%\371\354\035&\006-\226>\023\237\211z\201\342\334%\356\354\210\237\315\370\202\320L:\036$WS\226\273\242\341;\322\332\325\376\307\205\363\032z\252\331\256\004-\320""\272}c\205|m\r\357de\035\224\323/\241\354\304\030\027\245\322\220e\264\266O<\000\264R`\374\375/\247}d%nc\001\213\377\350\241\023\321\233-}\333\226m\256\347\362v=j\237\266S\300f+\267;!\2640Dn$cKE\312\330\206\332\330QT\326\022#\255#\006\367\252od\027\337\273\222\257\233\274/(\017\311\277:\273\007\317\313=[\307{\221\333\031O\260\215\253\277\236\300\314\230l1\032\246o{\375i\216\226\225\261\310\243\327x\200\023\r\\F[hI\001\320k7\336*UWO\222\033\0107\327\255\274\026U\\\024\232\002pXlg\264\003\372\016\327\033Z,V#.W\277\205\345X\256\241\nrI\025\022}\006\272\226A\235v\255\266AdC_P\217X]\354\334\2749\200\027\360\372\321 \324\006u\307\264H\334x\325]&\326\026\237\037\242U}\261\313\315F\216q\260\010\361\330\360\002\320oE\322\"\200\231\213\272\263\346\322\376;E\212\242\\\"\277\264\244\354\251a\006w*\254\201\314j?.\273\260\362\264j\212[(\344\313\2362\322 \206\226\361\000\001Rr\353\361)\353\317\376\000;\035\216a\304\323\217>\215\341h\365&\017\340\220TZ\n\300\262\261r\r\365\234\324\234C\267\365\336\355<\340^\367\236\203B,\365j2\352\355&\367\334\277\273\253\020\344\363\375\235\326-#I\030\216\034\250s{6*\310\370\0238\310X\314\307\237E\222\223\225\356\025\251\002\277sR\224\304\243\320\301\345\274\200\275\177\005i\323Kh\217\226mT\373\372\210\331[\260\253\262\304\311\221\272\207\364T\365BT\236\362d\177\000\030|2\276\235\353\177A=\235\243\324Qp\236\275p\023\370\274\325\377\242'\302\342qO\024\366\"\261,\252\001\250S\2115\005pE\364\005\371\223\035K\266\306\315\270\030\364\177uX\005\226\240\375i\245\264[P\275\216\263{`\207U2=\321\307\030\240\200\336T\237\321\017\345U\221;\202[\334!\376\273\375)\247\276\n \205P\337E\212\016\360b\312\277\r`zb\340\341GZH/!\n\326\023\246\314\347[\357\264a\300\216\257\266`\373\217\020|\246\236\244\340\236G\333\232(\301V\030Zy\237\317\271\271ZV\275H\367\033\263\252BiV\177\300\253\0134-\374\244\262q\222-\271\225l^\024\021i\317\333Zf\374\031\327\325\361\276\210\343\243.\221K\033\337\037\250\317G\311@\245\227\000\"\375/\230\245\255\355\031\021\336\222S\331\316k\354v6""\335\014\326%\002q\362t\006\266!\262\025h<\337V\311\320\314[\204\3756\3772\n6\256\322_\300?a\216(j\345\243\367o\224\342B\364\235mZ[\213\017\262F\246\036\002?\001N\335\350\004\0230'\375_\216\003\372l\377N}\032'x\021H\301\333\001\254\020\326\202\276\244]\232\274B\004\235\230e\330Jz\3614P\000KA\"Q\300u\374{\343\361\3246:\337\376\306\376\217TG\na\2006(\200h|\266\322*$6`\003\001z\002\301E`a\034J\350L\374H\345\267\020?v\206Q\374\226a\203\002[\027b\266\204\340\241^\373\336rM\223\263\333\330\213l\234\306$\007,\256\337\026~\"a'\254\"\316\0219_\360}a\213n\373R\376\256+s\271\363[\326\230\034\241\2063\205L\245\027v!=bg\202w\2547\231|JFp\3652\367\372=I>\373\213\212\241\276\247%\255\347{:4\302ye\225\354\023\352\213:\321\025B\037\345\025\364\027P\315\024\222\333\006nT\255v\260Z\207\364\365\203\346\217lO\342|\226V+%9\337\320MF~\251\230A]p\365\024\235n\200\331\366\240\351W\004YP\362\002\020!zP\227\360\324X\202\336\377\000\273\r\325\360\240\371\230\353Q\346\020Ui\337\347\3616v\027\317\3318{?\350\007\364l\213\322^8\256\235\035'$\355\376\367^G\370K\310\317\220\376\t\0317\016\203\021\331\362\026^pa\225\344'\342\217\222\005\313O_\214l\271\230\333\361\231g'\352\214\211\312pl\273\016\245\364^7\230k\341f\311\321Yoj\000\235\304\371\271\013\355\235\305Qm\327\rz7\344d\217\\G\260\350\211\233\270\236\032\270\361M\374\222(\247;t_%\236\200`\\,v\243\325\322\336\325E$(&#\374gdd}TN\036~\216#\267\004\"\014\200\211 7CX\245\310\343\n\276\313\036$f\255\372\214Vw\376\274\200t\313\316\266o\321+\201\257\304\031\335\243y\226\266\004\234:[pH\216\350\006\014\246-\331\2044&\356\\y\n\034\230\226|\326\365\342.v\247\221\350\351\370|\030\350\353(2\330\001~W\216\225D\316\213\275\314T\225\275W\343Y\364\266\267g1St\362\036\035\220\202\333\023\275\312\310G\000\313'#\315\334\221\221U\350\311I2\300\232\270\224\271\244\340Q\004\261$/^p\3157\200\330\332c\340d5\t\321\204\317\213k\207_\346\367\351h\013,\342\322\364\355LR\265R\213*\264MZ\244-\254\372\360\361\314\035\027i\314\022\261\232\305r?\354\204\016\226\0241\006\256g""\246\370\314\2263fU\266L\n{\316\335\361\325\014\030e\350\177\2617!YXx:\313\026^\243\350\224\316ty:Z\361`u\035\254%\277\361\027\343\000\031\013}\276\2707S\246\317\031\245\377\333K\322\207x:\326\320~\314\235DQ\313\311\357f/_Rr#\255\346\316dno~\021\357\351\334\025\264\223\225|%\263\212\272\303\212\024Z\311\315\226)m\241\227\023\321\323L\302N6\240>\333FU\202?\326O\021t\221_{\210dU/Bp\204\277\366\240\305i\010\365\320\203k\364M\200:\307=\343\202\014zp\220U\210\016P\270T\206\340\020\005]\014\246~\003\370S\026\353\243\240\310\242\221\345\355\001\217E\313<Yt\202\255>\006\345\265\354\306\230w\240,i\227\033\304{\366R\351v\002m\243m\303\243\006\366?\372\265\2745\266\330A}\2258\231\302\013vH\265\217\026\354`\336+\366T\201\307\257\241\351\006\322\261\255\270\244\325\354\271w\335J\306\362\245\356\327\033\252\347\331\271\004\377\265g\245g<\3413\003\000\n\253\234\240\2709\363\025\350t\314\014ex\364\370\351\376X?\341\370\300\210\257\013h\242{{V\r#\240\251\266\215\220\316%\251\315\343\033\003\302J\333i\350\276\321\320\311\324+\330\376\253\301\366\363V,8/\356!#&\031G\2343\316\240H\374\036\004X\355\177\252\315\376@;Rh\322\001\245 \355\346\237z\020\331\3543\236\260\216\277P*\023\021G\273:\001'~U\266[\307\023\335\276\253%\"\256\312\250#H\365uG\036\336\235\314v[$A\317k<\363\nA\230{6M\245\274\006\370\346,E@e\230\336\244\213\033\022-\311\305M\177\202|\206R\222\026]\211\024Ct\203Xb\365\227\021.\361\244\264\223*\r\246;f<\006c\005IA\206/\325\001K\240\327\353e\341\007\270\303\306T\216\304\216M,8\251\273r\221\355i\223C\361(\344\305<\357\250\363\343d#\370:@\334\215\027\213njG\240d\n\005\037\013\221|\025j\364?1\305\345\257\326\360%\244\017\266\177\334\305\021\024\276\267{Y\331\216i\2120\214E\234u\204\357\343\201\215\236\t\372V\014\371v\361\313\004\273\"K\344\002\246\334v\336\307\255\366p\346P[\346y\301\217\251{\370Z\222\312\367|\323v\034\262c\3201!I\035\370\001\363`Z=D\334o+(\340w\352\225\"k\203#\367A\316z2\t\022\234\241s\264\205|u9S\356\303G\273\350G\234\335\013\032\036\201\221\n\320\216\305\363""\024\274\211\260\316G\212a\r\343&\351\266\243\031\360\205L\366v\330e\254q\025\305$:P\341\371\245|\021h\016\264\177~\013\245\273\250\313\260\215\335\247\346b<\341\237\267O\203\300\200.\207H\014\237\266P\366\250\303be\230 \351\342NP\t\026a\220\216\215\014w@\"\274p\320t-\357\336\373\257\201(\241\220'\224k#\206#2\254e\225S\235\201\202\003}(\361\n(\203\341\2053\345\246)7\360\265\001\267\2613\334+M\364q]}\322\265g\t\310\003\333%o5\354\362\360_A\256\274~\240\331x\005\267A\270\245\002;\001\265\351X\250\035\332\016\324\322\223\260\020\332\035\031z\366\300\233\251,\271\333\200`\037\322Hk\345)\343^\321\311\350\004\206_t n;\317;\210\201wD\215%\265mX\016\240\341W\220l\341\342Wp\274M\214\274\r(~\014\214l@p\271RBK='\227\n\245\005Xk\361\r^\006vvKc[t\307\313zT\216\270\332\306\357\204\271\323#b'\346WP\001\013A\317-\346\034\344}'\220\243&\213B\216x\"ws\023\003h9Z*\233\320#\216\332y5|L[X\245w\273J\221P)\315\223\251dl\2135\0025\237\346\313+\226\212\245\212R\365\240\317{<\001\021\003\276\361\315KqU\261\355\246\240\327\227\353\262\2715\214\321\330H\265\324\207P\324\"a\033\224^m\341$\326\200\206\321K\236\033~\237\234/f\013\265\234\266\262\034Pq\3547]\210,\243J\037K\206\306\321`\322\370\315\305B\246Zu\2137\373d\354\214f<6Dn\252\263\004<`$\252\231\333\364\242\247\010\010D\251\261\361\273\373\2663\263\325\316\227\332E\223\337~\2640Y\360J\361\024\230\301S\363\230\240\022\274\311\336\016\342@D+=\220Y\265\236W\210\201\027\265\"\336\370\376\247\302\tsd$\232\037\346\356\355\304\356O\305r\300\2268}\250\2358}\304\300\0236\364\373\317\357\311\264c\216\355\372\263\231G\257\232\247\207%\256\027\246\354\215\335I\212\022\312H\267:R\330\232B\342\027Th\347\273\347b\200\000\352O\314\222\"\274ZH\334\261\322\022\027\340\256\030\327,\301#-(Q\243\001\300\272\t\372\305(\276\371M'#\212E\257\214\006\316N\026&8\311\266\"\324`\333W\023a\005\267\221\016\2148q\327_\006\330zR\204\256\316\340WX\375%\301\352\326\202=u\324N\350h\307\320{\350\n`\013|\037\2763\320\327\2528\r\016\366\312\274[\265\313?\306i\261\r\356\375\325i""\361\014O\013\013\350_\346#\3439\002\330N\235\030&\303\326\311\201A\3342\261h\375\221\330\207\033d\0276\210\315\261\355R\205,[\025s_\222\007?\266-\230\311\345\362\374\350$\021\230e\313%\031+d\211\222H\241\264\224\317\302\007\321\246\260\030\"\331\326\021\234\004\272\276\245Z\246\222)V]y\t\005\225\363\313bK\223]5\241&D\236\234\260\267\240\360\243\302\347q,\251Y\334\271\003\252\0033\206O\227ex\031E\306\361$\260\256x\373\257\tR\235Z\000m\363\206 \275\025\342\013\"\312\016\360\340\263\343\312\202\335\035|\034\021\372\263\242\225_!\274\227\023\341\275p\024\371K\2049wH\276\273\005M\370\n\207\276<8T\177}\016\037\270\317\302\302\373T}gx\364R\251\352&\\R\340\263\366\006b\032%\"\330q$\244\366\\\370\t\343\323C+\341\031\332>jy\372\334:\031}o\307\247\007\324\237-\266\357y2\351A\300o\273\021,`h'|\253\340))\336]\310A\217\266\025\356\261\243I\2000\326\212\017\030\327\352L\375\224\r\262\216'\346\250\356\030{\255\342\031\210\016J\006~\362\270\215\255\346\253\253\317\374E\365\n\200T\261\334\337^\213\233\036W\023\210\004Lb\361X\370y!\205\371\010a\213&+}\211\\~\231\256\300\274\211\353\335\020Nu\367\341\237tw\340\252`u\313Nl\325\207t\\'V\355N\260\027\361\033QU\210\037\260^\216\371%\346\314G\272q\305\215N\331\346tbaP\354\310\031\272\252r\313\355\206\355rl\017\374\324\013[|\365$\206\354\000\312\357\272\225\2522*\247J\030\346@\334\354m\323wT\310\324\257\262\025Qt=T\346&S(\376\363P\005\276\206\345^\252\222m\000\337s\267e+\"\3579\274\t\245\033OQ[W\326\320T\204\216Y\307\330\017\225\312u4\274\004\227\377\236L\243aw\233\325\245\357\225l7#|dR3\217\r\010\332\347b\234q\2613f\213&J\312,!N\254n\313\300\207\373tW\355I\337\236\210&yT\005\275\261/\205\354\027\330W\260oU\014\235--u\267y`t\275\263\307\332\261\337GZRS0\307\2616\370\311..\343\356\020?y\270\020\205<\300\204\274B \246\006\367\370\"B\336v!1\267\210`H\372\360\376\343x\277\022\342\201+w]G=\005e\303d\312xM$\002\002(E\207D\256\361\202\221u\221\014v\234\037x(O\336dl/\350\014\344\346M~\301\216\336\272\361pVfr`/\"\321\304\367ZQ\rq\3456\323\340\256d""\335r\225}\201\3403v~\362\310\344+\336\021`5\204\t5\302Db\266?1\357\005]\214\3333B\246\273o\336\3041C\335YW\024\240\320\263\275\256R:\324\277}\353\\Of7;\316\026\302\226\0339\302XBh#\364\000V\025\227\307\351\210}\326\003\330\032\263\311\316W\317B\217\275\223~\213\364\220j\232-\010:\326\340\267s2$\r\354\001\016\036\320\006\177\035\353\266\004:\0354\252\t\035\215p3\242\232\325\340`\256\016\325;\236\350\371\265\333\262\226\320\215\326\022\272\321Z\002>\"%k\t\210N\220\260\351\036\227\273\3346\226\020XFf\276\202\312\237\304\007WL\301\345\320\266\240\267S\246xq?\225o\255z$\351\262\036\031\267i\356\277\210\334\025\002R\225\356\0350\254\363\343g=mK\247\354\322i\277\364L\2558U\314M\025\263%\340\262\305\037$\352Oz\214\322`6Bj\227lo\321\273>p\003\021\025\212+\261h\250\242\036O\252\022\313_\000\2245\240X\241\3470\346\034}\267Lv\262\205\200\025\037\013\275[T\344;b\310\027r\025`\235;\375@\272\235\350\235%S\244\206U\234{0\312K\363\027.H\206v\364\250\275\tK\206_\216v\"\n%\375\352\205\002\253\025\351\014\225]\237)\227](\245\235\010\237J\316\206\274(k\207\262CC:\327\362.<0\232V\031b\271F\\\310\016\217&\025n\322\017\361\201\034\253\340\273\354R1Gn:\226\3714\002d\206\313I\345\302\030I\327\230J\251\226\"\337\326i\347\270cV9\343\245\271\357>W\227\000\242\020\330\010=\007Cc*Ca\262\200c\336\301\201\324\200\032\227\345\206\323\367Gh\237FR\035m\242\240\223\337S\303\247|\320\237\325\210\033\361\212\345\\\000\245\355\350[\227\361\346\263>\027;\"`\005\377\010\3721\355\003\265!Z\345\2436$i\247V\202:\267p/\302\340\353\334\371>\325\241\255\315\030\205\376\247\360\242\030B\200\016\251\267\235Q\335Qv\211\364\327\333r\344\025\003%\342\\\336\206\217m\020NO\t0\376\272\026\321C\205\237lY\237\036\341\324Mf\246\272\311\314Tw\217EG\315F\332\264\n\341\246\301A\205\347\224\307\200\222\200\274\2603}\t\000\025\264\200B/\031x\034\023x\266\025\362\331|\025\271\201\037\220\345`G\306\314P\220\257\235bb\261\206\266\227gM7d\032\003\217\215$\255\214\240\377\364\301\341Au\260\204\335\236\017\017\014\372y\032\253\017""\245\364\027\354\20698\3241\235\217b\373P\213C#\243\311\24091\361\241\252\314\021?c3\304\317\313\270h\207.W\371k\223\256{\202\273$K\337\310\262InZ$\217\2700\322+e\031\216\026O\020\3147Tv\306\216\264\310%\237\2429\351\347akL\346/\350\254\251\215\335/\266\256\220J\306\330\231^U\370\357\233\310F,{M+=[\266c\231\353\260[Z\031\347\367\264\337\274\000P\201\370\376\005\2613\376\334\355tu\010R\006;\021\017M\2013\265\035L)o\213\376\"\347|\247\261m\332Ve\342\272`\035\366\355`\3153\031\241g\003rA\361\205H-*\321vc*.z\374\270\273\035/\307\333\006\321\027\307\337\360\313Jk2T\016l\023\034\203\337w\276\243\342\000Z\350\320\010^5\014?\342\310\317\344g}o\327e7\233_\314k\377L\304\216\371\227p!\251zn\333\373B\365t\234^\213\234,\344o\273\241\235alD\217|w\262\2019m\031\t\345\3634\356\307\364X\367\337\310v\263W>\207R\036\233\327n\313`\307\301\344\362\252Z\270\000fW\276\347\260t\357\365\324\215\316\234\315u\344Y\333\367\221m\314\251\236R\236Q\355<;0\237\326\365Y\334\240\340\310\240\311h;$5O7\236\304\215^\234\313<t\232\025r\233\267\005^`\264\026\207\021\346lGm\177]\\\300\356\313^\004\031\013\371Yc?\207\003\021~\332\266>\377^Z!\215l\221\201\276\324\226\376\345\242<\311u\260W\014\017r\003\361\036\344\332{\241\013w\270\033\253\355~\254>?F\357\202\373\031\032\022%\340\214lW\233V\353\314\247]5s\333}bwv\276\231B\355h\205\216\261\350m\254J\313\2059\314i\r\257HD\332p\217\036|\322\340\324cOe\334c\273\333:0!\001Gw\301v5\256C\022\234y\202>\323\241\021\367\365\266[\244\316\365\277\234\304\365\177-\222\301\225\003\302\242op\007QLG\344\207\261\271\323\361\010g(\200l|\242E+\367\230\363\321\tV\360\257 \000\314,G\314\013\031\224\030\227\320y\233\362\325\262\234\361n\007\336\2470\320f!s\001y\321B\225\0341\031\337\3427JkZmU-\215\326U\305\373\322\204\nI\327\244\354V`',\013\317\213\3110\231\344\2416_\305\366uUf?\252\267*\245\332\322-c\010\343d\360r\374f\377\324\n\222!x\337\177s\273\210\014\207\024\215\3050f\324\034Bj\346D\212\375\367\310\036\221r\r\r\302X \304=\376\025\000\335x\363\031\003_8\013\356\255\314\335|""\251\302\226f}\017[\335\271J\251\334mu\344[\300\023\354\260Sp+\365\306W\222\274\005;\244\200\317\207\225\263\200[\364\214f\321\252$f*\361\302\276\346m\013\t\353\305\032\177\014|\254\274\316\233\330\230p\264V\314'P\347yrm\247\312hU\240\314ze\032\240\266\203\257\347=z\275\320)\336\336\356\333\033\003}Q\360\311\361\362\343\242\345'\306\312\276\237\035w\021\257c\000x\\\r3\374\326\327\307Km\347Ia\006\232\257\254U\020k\304\351\312\212\214\204\351\256d\342\353\t\234\235\201HY\n\256:\3721\255<?t?@d\\\014}9\034\203\354\r\026\325\236\372\0337\302\223\315\373\273\375,c\221\211\353\250\331\327\227\340_\322\310\224\353\242\370\271\303\357\236\357\334\245\323q\264\371\326s\307\360{c\213\361\365\305\341\332\211\036w9_%\037|=\317{\022\372\260\027\261\\J \263\355t\004\013\007i\007\304z\005\315f\023\021\261\005c\361T\345\337\322\217\307\023\200\313\307\352,\357\r\342\354\2403H.A\303M\276\222\233?\003\257\365\376U=\257\024J\321\314[\226\000\032\343\275+^\351\007\236\205;\356\307u\270\335n\204\344\0349\254\353k\r.\302\010\375\016\016\322Xa;]V\333N\014\254\274\235\351CA\247N\005eF\344\031\244\346R\254\227(\235\211-\024\373\360\204\202\213xz\277=\201o\023\361V\377\23751\377x\364x\264C\\\213 7\034IkB\034/\370\203d\270~t\253Hq\000t\333\355d`\366^TG1\317\000\247\244\333\274\376\216\177T\376\270\230(H\006Z\027L!Z0@\036b$Z\177(\222@\334\3119{\254Y\351l\032\302C\210\247\001\2735\r\330\375,\316\033\353Y\361\316\216\374) \340\347/7V\316\353Q\\\254\354\013<\276\300\230%\273\333B\214\266\304\030\357\301\030=F\312\214\237\277\273\343\377Z\324\247\334\002\213\004x\010x\357g\261\237\267\335\327Y>\332\371\256u\225\036]\240\327>\264\231\200FQ\210\317\267|\033\313\007t\010\027\221C\362\350\255\036\373\277\312d\221\373  ,%n\273\253\336S\361C\264\234);\346{\346>K\201\021\233u\270?\364\2660\331o\244l\361\202y\026\333\326\027\325\001\026\024ii\232\237Jb\031_[\2265\333\352m\033\taop\232\210\"\303\032q\306\257WkPg/\322\352}lH(y\303Z\316K\221\214j\315\243\007\357Xe\2427\343e\335\"\256@\022\253\260e\254\332=""\231\356\276\352\006*\336\321\303R4\227\002\324\232\375\362\023\3550\341Z\223\241\245L\202z\311\210\310\270\034\017\210ss\272n\266\210\004\034\206\352Y7\216\267;\347\352\270\2771\276\370\342\366\275Le\t\2213\240\335j\3143\331I\377\025\254n\204\312y\375v9\350m\241P\272\307&_\225|\031\327\3702\027\277\271\243w{\250\302\020\220'Gm\013B\336\270V\333\336\037O\304\366\357\344[\326\030\311q:\365\344\267{A\245\245N%\t!AB\234\372\322V\365=m\275\003\230lgaU\251\306\356\270\240\257S9\237\\\365\353\037\255\003\020#\000%\305\0048\306P\374\227\016\311\376H\364\027\257\306\244\024\236\302\302A\265LF\215\263e\370\334=s\3712\077\077\365_1r\372\354\231\213\031\030\341J(\375\\L\371\231@y\277!H\316)O~ht\216\037\241\3767?\327\365xJtVo\n\373\222\264\246\254\270t\272\226/ N'n\034p\233[FF\234\255\2600\342\363\270 \332E\353\254p-[\235\323z\374\362\312\346\324\350\251d0+\370R'50:d\026j\367\01445\220\n\225\r?\005=54b\026\212z\245\231\032\030\031\2202\333{\311J[\373|\245T+\237^\355\317,-U\334%|\271\317\265\216\014\247\322IF#\231\\N^vI\336\360\340\340\230\344e3\236z\306442:\240RK\313\013\220\344\0205\256\006<4\234JI\276\365Bwh$\255\322\225=/\311\030\032\032N\032\230L\336\010K\346Xj\320\314\244k}=\271C\247F\323\311\020\022T\231\243\203\326\247\362r\2039\032\365}jD\212\340TWK\325L\301\341'\320L\210\252\211\030\030U\305p\036\001\225\252\234\341S*\347\227R\276\350d<\330\327\2225::ld\251\324\221!5{E\362\\\022X\345\341\264\036\021\354&\365\322.T(=j\024\"%\235`\211!\265t\362|\315^\331!\275\352\025\027\301H5\244\20750\254\363\313\205L\326u\370b:\370&mhpLU$/\026\002\375H\215\r\251|f\310\325w\203)\235^\rvnH-\n\333\375\226O\322#*\271Z\n\300\301\360\200\006!\310\253\270\031\"\376\244\007)\225U+\002\263\341 \211\207d\0341\021\ndG\322Ig\216\251(y\216n\367)\rE\374\022VVjth4\230\345Dn\340\321Sc\301\202\2412c\351\001\277\014JJ\003+\223\036\034;\025(@\366\000\325\347\303F\256\211\326Rc\247\206\314\034\222\350J\225p\374\032Y\264\217Vq\226\324\247\247\322\203\241|\"\352U\376)\243\317y\2508\320\345\201a\243i\357V""\006\020\\\340\345\343\300\23013B\254\250\274T\312\350\035r\266:c\304\350\026z\2075;\r;d8\220kt9=H@QA_V\014\267=\236\201T=mb\226l/(\361\206\251Yd\227G\255\217mVF\204Y\250\026\333\"\205\232`\334\313vN\030\266\006T\021\013\351\246R\372S\377\204V\250?\245\262\362\236cX\262\r\256M\332(\266\\c\2022\010\265#\252\014\234}\313\301\032\374>D.\376\260\356:\242\334`\356\340\220\316e2!X`dT\025\200U6\307wJu*L\204\315\271\000\ny\241\300\304\246\221'\006\n\205Y\"S_Oj\037\214\337&\265\265\005\347_\214\330\346\243L\313L/\263M\270\305\024\323\211\362\222\r\330\317\036Srb\023\204\213\351\266\205Y\200\215\0008A\223\025\3708\245,s-\246\333\031\2333\312\245\2662.g\001\212\274\236\333QH\t\332\306xlX\371\336]\375\222\255U\353\217\224]\020\325\333\322\213\003\025<\225\251g\375\0044\374\211\232\254\211_\325\263\225\361D\367%m\257\206$\316e\262\255\215\025v\007Xq\356yz\213a\364\366x\245e4<V\265A\277/\256$w8\320y\253\260\371\360\210`\024\315\034\362\212q7\274\310\367\244\032\362%\032\000\377p\225b\250g;\225\306\356=\274\330`y\263\250\316\242I0E\214\2552\264\222\023K\300\362p\030\241\211+z9.\333\314(Ze\363E\004\356\364\022\033\253\026\363C\274\007\374\026\230\313\332~\345l\351BU\336\203\314\221\202\225\036\204\232[%:3rhn\236\034\017\366\221H\264\307\262\334\320C\006y\200\0345\336\364hk=\312caB\214\271\363\335\212{\027I^q_c\252\"%\316\227\324\313&\374B\nZ\263\353\033k\002\3205\206\2449\322L\302\313/\025\311\227\024\277'\302\302\311\247\".\367\233\027[\236\251\021\221\231\327\252\213c\000\317\375\376\014\373\332~b>\265\227\312'#\360qp\224@n.\033j\003eu=\360\314\257\000\222H\371.\307\017\307\224\241\304\017\007\245\263/\306h\240'1\203\341\362\235\214\206\234U%\242\r\210\357\3348l\227X\032_\366\373\350\341%\030C\204\271\360\266\003\350\030\242\314\376\243\357\212g\262\020\0166\365TV\343Y\255\303\323\351\370\323^\200\235\236z7\213T\017\276u\315\346=2\265\224/\032\326\374T~.\277\204\352~\275\354\267\032\017\226\247p\246T\231\312\2226a\223\014\207\\\251U\373uOu\372\360K74 n\377\252CK\245\307\376\262cK""\017\217\364\216\216\364%\006\307\266\036\335\350H\373\341y@\237\272/\302~\242\216\354\017\253\253\275 \275\216\331*/x\257\343v\301\013\336\355x\000\267;>8fw\330\342C\200\027\243#\321\027]I\367\373\343>b\206\216\354m\355o[\206\005\255\332)X\300\032\352Y]z2\240\372\367,y\236\307?\212\225a\347Do1\371\352\362\330\277<F\201s\304\236\2419S\304\027rS=\310k/\225\220\233\352Qi\"%P9Y\355o.\321kWT\023\237k\265b\276\212B\0324\216\276L\2775\254\255\222\350)z=Oq\003J\373\330rp\357a\227|\263\325^\217\325\361\036\276i^X\245\tm+\267\240\222Z^a\325\302\002\362Ez\245\374bq\333\213\226|\335\266\"E+\031o\177\317\036\330\213\305w\267\033\026\344+m\033\272TB\211\370\226\303{\261\230\300v\303\303emc\370+0\254\347\305\r\276|#\010\313\025\266\036Cg[\347\371s\266;\262\032\276bC\036\375\220\263\013r\267\232\334\306U\232q[C7\32109\370\332d\347\257\324\250\303m/\312\332\353\033\032\227\036\360%\336x\314\226\360h \023\t\324z\246X\r\336u\2603\224\220\035\254_\027\250\365\361\304BOD%=\277\265\233s<\224\372\237\303\364D\r\314\322&\246/\332\366\234\356!\363O\307\261\3343\2752U\331\361^\217\026\323\341B\341\233\235\202[\\\302\267r\213>\375\026\240\242\226K9M\215\001\325\202\244lw\016\2108\227U\263=\322\234\354~\nT\0247\306wt\324\210C)\275\327\215\373B\236\264\205<\021\357\251\201$\237\312\222\273\0206%\033\252\277\037\207g\020b\324P\200\032\243Y\351!=\365\036\377\212\010\016\314\232\357\313\023\317tr&\202:\361E\"Q\331B\207\350\266i\205\350\307\255\261F\365\261\323\236+\253g2e\257\006\214\3444pa\225\305L\326\256V\352Q\036L\"\373\3453=\326`\003>H\022\242H\371\024}\316E\n\311G\206\222q\236\346Pu\216{\245K\014lM\001\370\356\217!\213Z\3012\3669\223\354\200\220\210h=\025ahz\373v\263\303uD\265esJ\254\022\333\343%\034\207\346\231\225$\035G1\014\312\210\216<7Ch\224\005\211|D\326O@DO0\\\340)\026\013\231\245\255Y.\335\006\373\273\251ZU\250\227\271\3328#\311\003\330\037\022\327\010Tu\031\001\022\253)\366T\265/q2\265T\302\007\031\230\313\033\332K\352\n\351\312z<\361\353oXU\245VtP\365/ \241\350!N\036\271=\232\367""\0362\330\324C`do\360(\355\257m\320\017\352\241\214e\302\375\257br\373\274[\325\216\262<{\372\325\204E\253\027\2602\264\377(\315\357\233n\365F\364Q\035X\016\366\271\260\375\345\320>=\377\262kB3\263\2555\241/\3745\t`\334\276\220Pk\253\025\332A\352\373)\023\337\317g\321vBq)\264\354\276\317\304m\254|\024\003\240\337R-\364\304\366 \216\023 \225\320W\002M\3435\014N\210\377\026\006:2\030#\023\246\027\n\332\202\376\n\272\026\305\024\304[\317P\232\240_\355nus\341w\367\325B+mg\235\036s!\350\325\226\311+\037\276\024A\371$\275\212\345\007*@\213\301\257[\314\362C\323v\306\r\364;\376e\244\325\360I\224\376\026I9|\315\n\014\022\271\352\344\272\315\313\230\274\247\250@\2629P\272\013\037zU\330\322U\227%\246P \213\356\227\220\t\021\372\020:\343\233\262\204\276[\240\212\372w\300\226\250\226t\301i\277}D\377\306\360\364\313ah\326%\315\270\"\032\314\304\376\370\n\2658,\324\204F\377\211\244T\227u\237\247\r\002\2663\022\357\232(\362\275\221\301\304\014\235\332\t\2100\237,\274\202\207\376W\256\007\237\253\353\301\255`>eX\270|\002\240\257\006\354\375\277\002\367\027\303\241\"\243D\336\026\354\301\355\211\r\366q\225;\373X~+(\215S\336\301\325\361o\210IF\260\3744o\205\261=\240\302\250\221\266\227\302\313^\317\326=~&\027\331\330 \260@\330X\373.\327\332u\031\260\337r\231;\177\237\326\237y\306>\305\363=\325\356S\343\254\002P\275?\3213?w&4\224\352}\177 \230\277\325H\236\223V\2011\232'X\017\024\225\241Oi|IA\357\014\0201\022~\366\365_\025\236dA\371K*\337\307\22188RC\3561\000\347\373\r\373\260\320\242T\324k\252\240\265\230r\211\202\210\324\361\021\"\232$'9g\215\016\215U9^\310\315K\246\n]X\250\341)W\2229\343\372\346h\257\223m\000\\\230\340\373\313\301\364`r\216\366V|\221\3411*B+N\245\252\367\203e\322\370\230\333*\023USz\304P\000\233CDi\372\017\247#:[*\302\221\355\237\310\332p\2422#\024\303\250L\027\345a\334=\240X\2002\251\006\317~v\002\202\246\317\344\360G\247\263\346aiT6_$k\3667#\361\371M\236]\363hG{9\350{}Q\331f\363\017\327\305E\317\265x\352i\337S:^\261\000\317N\036\003\334\352=\327-*/\347tPWo\251l""\377\206Z(\016&(\002\007\267}\330\307\253\274\331/|\244E\036G\341\036\206\215:Y\014\236\367\r31\rR]M\270w\221\226X4\254\314\331\364\221g\023H\366S\251\027\231\275b\343\n\355\271\251\307\002]\223\243z\005\271\257 \367\025#\370\030\214``w\246R#;\265=\203\274\337\253}\371\337\275/\377+8\326\300v\0325.\367+\253b\000P&\202\357{\360\006\377\314\374\331IyE\334\007\240WM\\Ye\245\020Q\366X\250\345\013\342+\214\212z\2652\326\320\277\277\227\253\302z{\264\255\334Z.\323\003\213\354\001\2541xt\317\361;jw\245\314\246\262\215\235,p\216v\035\253\211\202\213\266\245\266.\335\033_\2044L*hPj\276H\263\007\343\315\334-\345sd\221\276\214\246s\363h6\263\342f\252\254\264\"\367\003\004\237\031\334\355wj@\365\342f\207}\310\03227\365=\001\220\340}T\217\250P\335L\210Q$\226\302\300\004QYO\227N\222\357#\262\002\351\367\000\272Wta\301sO\332\307D/ \301\273nE\212\251%\260,\272\312\216\345\005!\221\031\267\222|\211\007\350W\213\006\236\000\321zh\211\231\021\270\345\331\016\340d<\341\227\276W\311\224\361B\032\260>\315\303\225U\300\320E\371\304,\226\257R\300\360\312D5\031\350\037\215\325Z\366\2432\331J\311#\203\237\314\323\330\350\325?\016*\312\345h\021\2554\344\357f\n\250Ve\261A\274\t\311\020*\326gX\002!\343j\204\361\r;\001\301\307/\200\215\316\206_\374g\014\253\252U8\332\274r\3113M\203\026V\355#\250\312\315\223\326\230=RQ\245\tt9_eY%\033\241\3265\325\212\331[x\216n\3379\352\262\273\\\252\254:\345R\tm\217\\\244\330\025\313\364\t\335\352\233(\367\034\232\306\245\202\312\246\002ZY%\251\020\202\024\034K\271>&\002\356\345\201\345F\266[\325U\266l\233l\245a\300\273\t\272e\031\314\336\351\023\013\322\235T\2474\341\215\244\361\350\310\201\363\265\2243E\225\252\276\264]_gd\344\2265g\221\200\214d\326h\014}\334\364\215\210\217v\302&5$\033`p\362\244\261%\306-\370\260MW\307\373\005I\370\223\033L\307\251\266\322n\330MkO\317\355\332\035\010V\233\n&\244\3556\372v`\254Q\276N\266\360v\022\347\357\344\031\215:\306\2649\301M\204\t\277\336\344\313\010L}/\377:\365\275\232<\375\277\301`\345C\301\204\341-\201\374\351\221""\031\304$\004\310\013EV\224|\217\230$\264\027\003C\217Em\370\346\231\361\333\255\250\2153b$\022i\266\022t\315\036p\305wm\361\027\245&\236\216;\366\2778\365\020\362'z\235\252A\225-\221@\305\310\235\252\326\363\225h\253\347\332\243\240\337u~E\352M\360\325P\237\202\364\t\322\016\023w\tnnb\340\233h\313\347\276\217\302X\274h9/T\313\303\253\023\215\177\320y|_\032F\034_\2432s\036o\033\275}\3357\366w\200\214\026J\350\212\201\260H\244\217\267\266G\365K\261\000}O<\221}\317\270\325Ar\371r\303\\\275R\221I \375\274\202\254\340\361\233\034\312\016Y@O\245FN%\375,|\327\024\274\002L\245SF\t\377f4Tn\310018_,\222YA<\257\256_\300g\3027\360\r\ru\357K#\001\355\267s\3429Tj\235\315\337wu9\177aM\347\026=\0257[\253x\371\273n\217qD\\*U\311\024z\325\022\314\342\333\367\374\"\t#\253,;\270y\323s\013\213\374\226\324\273y\2239\335\214\177\371\235\257\222c#T\363\251h-\036\264LM\306\344I\220\253\354\256\222\306)\232c\326b\351\205\014\332e5\264\201`\r\212'\335\3452\232o\255-\234\014*\353vv\256\351\361F\033\006\215\361`\362\003\212h\330\363\231\262\300N3S(-\321C\034\354\313I\026\307\350\006\n\253p\374V\36302\333\021\270v\230\207\3031^1\343\374\242\213s\353\260\326\215K\357T\353\332\261^\265TN\024\\h\255\3771\270\361\216\331p\235r:\343\345\263\021\303F\325w\356\332\366\016]\031\372D\342z\212\356|\006\361\236\322*!\362~,\002\371Pj\300\316\307\013\004\225\213\377\335\010\036\3020\331t\352Y\033\304\272\305\221&\372\270\256>\351T2\\Q4\277dU\274}\217P\203\217\345\363*\340Gj\260\263\257\002\234I\272\003\307X\254h \213\033\3072N\343\373\214\216\307o\215\330\242\367\255QY\305\254\236\247\243<\251\3226\321\273o\202wk\221\305\242\264\315\344^\206L\335\360p\334\234\271]\r\031\034o\333\355m\325\000\270\tE\026\274\365\240K\214`\342\365\250\273\021\334\021|\345\221\216\276<\211\254J\0163s\027IN\270\222\3537:\354It\373\327\207\373\022#\361]\353\240\375\310ZG\373\022c\341\316\3336|\373H\300<a>\2540_X\320[\241d\262\r\034\223\243\261\235\200e\013.\361\000\353\014\234-\250\267\234\300\215\230\221Q32\026\307\372\316\027+""\356\022\014\037_\014)\031\275\273R\025\253G\206\375\247\300\021\0318\036\211\030!\343\371\364\034\327~\223lx2\233RU\317\321c\317\332\0029\352\"\317f\272#\322\240u\242X\215i\357\3643\031>o\2512\273\327\272n$\027\254V\205ln{\304\020\247D=3\233@\010\261\252J2\021\250 \020\250\201\204\343\344\213y\240\305z\221\272\351\243\213?\207/4\340c\365>/\360\035\221;\213D&\226\345\221\037Z\375\027\023]\275\272\216\210\317\350H\316 K\214\365N\3010*\275\213\335\372\013\337\354q\3212>Lm\375\252\213\375&n\331\314\232\275Z\031\332N\366\353\001E\266\355\277\222\336\037w={}\177;\225\206\336nr\312\335mL\225\274\324\213\377\"\347\026K\313\035~q#:+\346\213O\023\227\372O\367\263p\207\300\226\350w\007f\3131\264\327o\352\206o&\274\022,\273\347V\362\231B\376>\301JL\305t\245\217\356\334H/\301\311\024W\035\275$f\205\231\305*\251\327\343^\250\304W\330\275\274\352\224\201\312E\257\250\025\201\321\356\360\240\222\021\000\312o\315a\2738\252\337\256\300k2q\362\033V\320\010C\032LM\t\226[!\001\276\255r\263x\035(6\010\314\322\242\222\277\320\335me\375\2136\025\363\004m{\346\317)\366-[@\002\253Z\252\300h\035\366\201\252\263s\311\250\276\252\027\363\2665:\366' \210!\256\317\326\2167\033\275>p\2036\247\274\351\234Qx\223\024b,\344c\240\030\330 \n\2579\272\020U\327\033D-\372\360\331\037\304\314[\265\340\343\316`\033\221`\302@a\022?\244\253\023\260\310\216Z\260\314\347\003\377\337\357\366\243\024S\227\243\034\346\304\204\2561|\356F\324\244M\323<\033\013\2008\217\226\005@\031I\214%\225\037*b\306\300ck\366r\t\r\351y\026}\351G/\352\256\034\245\272\254\267!Y\350\354\204\314(\324l\231\327\017t\277mz\026\205\263\3564\177\003\237\000>!S d\221~\372\312\031u\277\336\207\367\366\250\315-\362\003cv\263\205Z\016\017?v]a\212\244K\244&Y\024\023\026\031\253U\355\2129\256E\351\324~{7(\225/$ZkE\232\345>\335\266>]\304\030\204\347\"~\250\0029\334\217\236\235C\013\375,\004\311\363\036\032\265\220\\\221(\323\367r\300j[\026\235\263\274>\252\201N\310,\275Rd|N\212\2145\324\034cuF\275.\275\2412a\352\\m\271\\\256\002\360>1\260\202]C""\236}\002\003\350\212\251\\#\276/\341\373[\242\3707&\240\370\273+\264\267\302[\211\336\246\225*\371\245<\276G\020O3!\2638\345l?*\3268\254\341\314\036\326za\010}j\224\364]X\206\033\345\233\266\235\263P\257\275\267P\355\3753Mn?\207\372\310\t\350\215\010\221\356\223\211P\303\027o\214!\005\243t\204\034_\241\221\027\326\266\t/\246\027X\314h\233\026Q\373w'\366\253\252\353\304O'O,\237<\221\233;\361\355\370\211\213\343'fO\334\037O\364$\373{\372\223\375\373qn\241&\3004\311\376\356D\342\377}\375M\262\247\027\335\315\024Q~\255\232}\276\032}\204@L\307\231\251\364\251$O\017\311\030f\253@\321y\325|\326\373\032\245\007\016\251\tO\260\360\273\230#v|\202\337^%\026Q\tP\351p\366%\226\000\204\253@*R\272\024Q\356;\307\206\222\234B\226\037\265\313\316t*\271\177\241\224[\025\223s,\001\037\323\3765G\006\222\230\240\356 \006\307\306\006\222|\371\2555G9j\230\243\022UR\240-D+\234~\035\355\242g\242\177\341~:\233)\372\033n5\321C\216\202x\226\014\245F\366\325\306Z\345E\246\314\030\243\360\225K\204\351]\002i\353\nT\373\375\033\035N\002\367\217\227\350\023\331\322r\031!\001\350\236\211\356\204\021sHp\016\371\200\243\252\001\347\251\247F\007\222\222a;\314\034\031L\217\252\034\202X\235\221\036\302\014\264|\205\203\315\027\021\366Ke\030#\231\357C\216\021W\352$)\302\213d\211F\357:\202\334\320|\256\272\376\031N'\201\241t\007\323\327s\231\325\033\034\324^_\007\306(sdH\247\000Pq\312\365e\217J\363{\321@\254h\305\254H\rb\332\306\272\366;;\004\r)+\367\332\343\347\240N\364;0|j0)\250\3261Q\265Z\216\221\244\301KhW\254\303\311$\360\030\271\200\3552\033\262z}\243\210Z\020\".\355\305\204j.\357\261\232F\0167\022\020\270j\023\351\213;w\005e\267\260\361\031ku\307\346$\203\266\324|\333\214\n<\222Q\346\326l\353j\341BU\313\254\237XC\321\206\311\241Vm'[;y\035M\2524ZD\025.\032a#\010\313\227p\227\363U\307\320\035\310\271\205j\306\233pYO\027\232\252U\\\330\230\371\245\"^\260\301V\240\301{p\222\351\355m^f\016\216\216\244\222\234\000\235\345\031\267\261\017\236\270d=\307!\313;\216\214K9\302\035>\225\\,\2242\325\324\210\006""\323\341\001N2`\031P\025%\031\260\224J%i\273\004\244\201L\260~qSs1\236\262\271m\030\223q\330t\271\364\341\024\000\360R\226{\273$&\237\225\375\200\245\373\212\021\313\211\211\277\tL\000\364\000S\2123F\310\2361\244\210\020\330\n?\252\334\240v=\232\313\207\303\243\\\253\242\33397\263\254\374j\216\302\016Q]#\003xjFO\301`\351\372]\ru\000J\322\241\255\023N\2451aL\17718\220$m\177\200\026@}\325\022\261\342tp\022K\216\202\221B\301\315Y\021\262\356Wqa\n\335>y\277qR 4\313\362*\0016y\257\000\2504\007\247(\036\302\231\025\307]\311d\253\023\034\315\027%j\236\320\3523/\263\210\227\234J\343\\\224\301\227\363\250\344\200T6\273\325\226l\014*t\323\257\003\211i\356\263zeB\032\352,\365\361\022\372=-\257D1S\224z\325\203\nz\367\233E\361\025mB\276\207\366_\002\367?yG\361\207\266\321\326=\245bO\320S\362\275\254\346\327\361\\\367\266\216\334\023\021\306D\336\343\315\234\373\305\203\323\313\3678=\222d\333\3416\02506\250\322\r\377\275\303\003\251\321d\300\322\270\357\3579-Yb%]U42$\351(\212\321\251\247 \325]\254\342~p+T\231><\207SIm\334\3120\007\211\357\227\274|\025o\337El\032\352\003\372\207\357/\334\037BS\357\272_\2006\2263\336m>W\221\306F\004\346\346x\266Y\204\303\247?\355F/\261\352V\373\000\361\256L\364 @\263\246\r\364\244\307\350\n\2160[-\254\372=\302\242|tMD\234\307\200\223\366k\253o\212|\322v\340\034\200\034\242/\240\331|qb\271T\254\336r\340\340v\020\024\350\022\240\002K\356{\376\036M\022\273<\021<\327\330pb\205\355\360\221\215\372\222\346`\034\200\220\\-\353:N\"W#\010\306[I\030\306]\240\300!7\3132~\372\214]y\020\3543\000\272lq\\\004]e`\370JY8\236\025\325K\327\231\211Y2\001pf\366\234\362Z\\\314\225\253\225\255\013\241*\215\341J{plx,\211qML\001\275B\n\013\344\224\234\365\026a\001\334r\"\345\367\217\n\260\231\334R1\2416\003\221L\236\235\247\366FT\236\332*\222W\316\334\251\351\303`t`0\251\2207\275U\204p\030y\217\245\207\240\324\275\242\2035L\020S\345\027\202\203=\313\370\226\306`\312\245{\240\250Ua\273\262\200\226\361\361\026\323:\310X\300\301\212j1\000\220\332\345\221\001\254\352-c\212""\270\211S[\027I\215m]f\260\2032\243#\000*\313\310M\335\312\340+F\310\240;%\217X\233\205\325\204d;\2545\343M\364\010\264\366\364+&\360\353P\340,\275\234\013\270z\376Zg3o\1771S\314\340\265J.P\370\242\210\017\344>\316N\355\255\025q\023\250K\005]\245\300\354\345\313\014\263\337\310\327\277\222\366\022]\236\355'\nF%Q\344\267\340\347\263g.f`\273\255\250\317C\371\347\354\352C\37131\337\333\237I\352\227|a]^\311\253\204\005\267\230\275\265\234\251\334\266\022k\300\033\0015c$1\tc\247\024\027\363Kf\nO\253\231\342\342\275\243\231\220/aLw\022\205\\\323\345\354\014l\314\313\274\330\212\244,f\020\177\242\371\337|\2468\021\374\200\244\t\352\013\342\222\235\221\241\205|uB\267\003\345\374f\361\n^\345\340m|yuEE\031+\233]T\264\315\255\374\262\221\254\264\215=uV\247\372\007\372\007\350\010^(\335\325$\221\236h\27600\353e5L3\201q\235\231B7\274F\277\341\214)\002\332\250\374\263\362\317\205\312\302?-\004\246\351fS@\250iT\300\2161W?\332\r\374\310)(R\006^Q\323\310c\311\036~\322M\242L:2\220>,\254\306$3\303\014\004\273\272\305\277\251:n\350CE\322\326\035W\330iAC\352\211\320\344\212-\310/\266\3336\311\307p\351z\223\035~P[\000$k4C\254\270\206W\244\303\373\022>\034\002e\322\227p\253\331\376\016k\227\017\277\260\030\340m}Z(--\001\335\365\370\025\000:^Y\335\376\3477\315=K\222l\221\322\372\360\360\030\025\tR\2265FI\210\234\214\021\265\312\245\235P[#\003\251\244\310\037e\223\214\r\017'\t5g\325Q\223\020\241\022=\255'\312\035\271\357R\360\225*\321,\345|\3666\324\263D5\210\373\347\307\375\\\255\021\316n\037\245\320<?nu\232\324\344\343\356q\253y\242>\030C!\370y\242\312*\264\334\217\375\271Wv\304\022\025\343\\\356\227W-?Q\215Z\310\372$\265\230\035z\222\376TKPW\3516\n?\037\263\n|\227]&_\000\217\373}\276\372xk\244\350$\026\343\357G.*\347\352k)-\177\036\034Jr\212-\177\006\206T\256\336\224\010pl(\311\364\272\310P\007\306\206\223l\235O}\224\006^\222SP\016&!\016\370b\2234\360\242\276\214\323\027ij\376\235E\241f\264hG\355\030\212\323\330d\244\026\r\372F\347\244\315\324\251tR'\252\3329R4#f\030\352\355\301)V\206""\315\344\216\202\245\tJ/A0\237\235\310\344\000\240O|\266\237YB\0068Ii\376\023\002E\305\3233\005\375\000M$\230\031e\233\274fK\244\206G\2235[$\005\234n\315\226I\215\014S\212/\224BF*\374He\"V\205E\3211\351A\374\020\366v\301]\312dW\035\324\241\315T'(\251z\0131\007Tb\206\rq\303\350\360\251$\304O\216%\356z\211\036Q\255@\215\215L\001\013\257\342M#\231X\251\240\000\214\3450\310\223\212\306\256\260\313\312\035\217\305'j\362\354\276[)9x\203\343\020W\251\370r\272\010\342m\020a1\242\277Zb\321c\377}\257:\251\304\253\223E\366\226\031\270\344\tD\3735S\237\245-\3478\341\002\250\232^\305[\002\253H\277\243<\215\030Q\240\255\263q\311|\354\005ss\005\324,\n\305\245\260NFt\341\307\224\034B\305\021\027\224\026u<\347.\324\340|\204\355_\225\024\230_\340\361\001\3519\331p\2124&\031|=\352\020E\230\215Js\370>9\262|\233\252\324\220\354\257\241}f\0068.\006S8\222\315\310\313\231~\202\210j\211#\241\307y*yqQB\025\300\357\010g\034\205\035\014\340#Dv\276P0\262 \n\363j\320\337V\373\206\361\032N\210\264\235\304Y$\230\226\240\207B'?\254[\203\010\211I8F\242\030\t\302,I\250\266, \235\271\355\332\300\255c\345\325\202zR\204QF\363*\352g\001z\000\324\305aj\026 X\307j._\321\310\300\356\362\343\211\322\2753( A\221\211\035\323\372\253\222\014 \232\257\256\222\242,\245L\255d]\"\n)6}\331\317\231\306y1\243j\006J\367\276w\215\032T\004\201\271Z\221\206X\020\341\027\272T\252N\373\302G?}\326\324\034\365\223\2652\357$\340\322\323\253U\367\364\314\345\271\013\323\247\177N\237\316x\256\245\203\034J\3507\365(I\323\321q\332\027b\002:\276,\222\014\274\3711O\277\n\263\"J;\336N\344\365\342c\304\213\312\002r\rf\304\021A\340\351\274\366\024\314\301Y\352\231\031\206\216\363-\261c\245f<\001\354`jYj\322\217l\374\250T\216\2274\234\243C\306\235P0Qns\214d\005\345\224d\324i\365\001\023h\265T r\225\"3\003\253c\224Q\270\024\323\\\331\267\022\366\373\241#\322\023\236%\372\275L\"\307Y\342\253\302)\341\363%\262L\350\210\211(\005\330\207\226\233\263\230\2513\303qM\351\334\230F\374\357\334\025?\r\257\200\001wg\3135Ia4*\221[\356\212\204\010""\215I\230\220\023\001\026'\270\271\351\313\010\257:V\014\314\224\225\024\327\377`\241\230a\330\305rn5\223\275\245r\302kd\247\3057\335\331:\005\312\251\306\363\005\350\323b\351\314\231\313\227\317\\\231w\316\030r\027\022\312U\"\222\240\021\304n\200\002c2W\020\017G\347\005\306\020](4\204\250b\244\270\021\225A\214K|\006\311\325\342\263\211\342C\213l\370\317\371\366\362\354\034\005.N^\232<?u\366\014L\232\022T\232ac\223\332\311\206\242\256\225\301\210\307\255\342C\001g\331\305\213&\250P{m3iG\213\216\324\024]8\225(8\026\236\204\262\2316\013$\352\036\333\311\212R\263\223\375\315f\247G\322]v\021M@Y\311H:\331\t\030\261SJ\313\013@\327\313\345\234\225\025\242\260\354\\E^Y\251\214\036\254$Ml\005Sa\276\354$>\365\3544\342L\254\244H\362\313*AT\230\235B\304X()\330)E\232\331\211\320\317\210\331\341\203\330J\"$h\247\300\272\331<\n\020t\221LK0\221\311\273`*SyVj\230\377\013f\003\375g%)20\230\250\251\3013\260\326Y\372\tc\023\225\034\302\037\234\241\264\2728\006\377\002q\326L\n\351~\251\354*\260\177\034\206\245\310\334\315\344\211I\344\224\345\314J~\271\266\034\367\3612\220\246m\262\345~\323\213\312\347\004\353\344\210L\214\232\215\350b\021\263\243\n\232GDtj\273f\266:\210\316\224\313\372\3009;unr\376\302\234sz\376\334\271\251\031gv\372\347)m#T\275\236S\177gE-E\305MtGb\020\3071\262\024V\363\223\014>\322O\264\360VL\262Bg:\2331\210\216\222\260D\3074\232c\365\242\263\244\216G\000\314A\246\316\3140SjgI'O\027\034\031\362\013\252\260_\020\305Ds?\237\245\006H\277N5\301\312vg\265z\236\231\nQ\2513\020\227zu\352\234\256V\305\314\t\345\214\364\360\210Y7D\255\272u\334\252\033R\215\272%\026\256\333\036\214\2362;jU\314V\373\255H\270Z5\273*fU\033\230c\225hT+f\377\315j\213\236\253\rt\360U5\377Nj\233F~Nx\313\350\364\320\026\361\255>q\217\355h\277\245\270\207\247^\233\002|,\006\013\030\3579\"\263D\272\340\347MQ5B\266\370\311\310\367\332\261\210a\006\363\333\014W\226$\0207\347<\224e\220V\241L^K\235J\213a\305\314\232K\265\005\021\366pP\372b\204\245>Q\244\344\242\022\221\302V\314.N<\376\217s\316\331\251kSh""\230djE\341x\315}S\215v\314\342Bu\026m|GG\371ibe\365R\246X\\\215I\216 \272c\013\206\t\357\230\242\025\227TS\034y\276\352\367\235' \020\345\371\010&F\016\220&k+)G|\001\3539i\247\202\2206\345\342+S\320Cr_\322N\241\237\210\263I\245\353/8n\234J\222b\235=Qi\352<\342<>\2148,\344)G*\260\333\356\242\3028\353\235q\"\n\273\243\222P\273\314\214\212\354\333HB\220cSAx\255\303z(\004\242\221\211\246\232-\034\206\361\345\024q\271e)\276R\013f3\020E\247\352\272\343\263\243+\235\213\030j\034\020nY\316\006\262\230\342>P\210-&C4\026H3G\254\023\375\036[I\2215\023jgf721\214)\342\212\205\360DtA(\206z\006,\032\347\353\232\255\013.\300\tJ\232\230\235\325\351\335*\341\326\013Z\262\n\247\230G\237\225\033\230W\345x>\224`\316)*\243s;\030\222\032\374 #<J\000\226\350JI\335r\234\377y\372\312\267S?N\236\277|\351\333La\321\257F\307\370\373@\224\253cA\025I\253\247\361z\216>\244\020\2272\202\362\001^\331\251R\212z2\202\272\224\320G\024\322\245l\272\010\022\306T\2411]f,Pd\nv\035\3749W\310,M\263\356\256\372\206t[\351\364\262\365\303\354X\030\002C\371!\320\013\250\217\005\242\2215\006\n\204\252\374\316\223C\030\003<D\014!\020\250\277Q\030!2\317\306\002F\021\005K\337\177\357\256^C\006\367\242 \347`\334,\033\314\3423 \224\214b\210L\241\020J\207a/\207K\337vW\243\322\302\005\001o\"\201\031J'\376<:\325\273\360\363\020\374\347\234\233\231\2748\205\201\231\311\037\310\026\235\201\347\2148O6%\350\215k\307\314m\254s\002\237\341\014[\021c\nu\272\276(\010\247D\266\341\337$XIV[*!\330\336\254\177\001\026\214[d\267\221)M\351I\210\034?$\236\343\223_\240\331\230\014\035\342\335\251\347%bJ\254\331\210\235\010{\016\314\341\307\214\034\360\370\005V\204\362\237\342\206\022\302\0334\252Hh\213^\274857y\341b\246L\375T\177\315\376B\032wU\007\264\034\324O\241\251\361\243\010\365\020\303\201\310\037c<\027\331v\304\305\214\247\004S\226\026\262\025\t\217*\230\035\036\221\024@\245\235s\371\202\033\214\307Wi\224\330\262\326~\007u\354B\251\374\3060\224\214\212\017\305R(\031N]8\027\375\005j\267\232[,\243\237\033x\023j\344\370\217.\214D8""i\034\303\202\260\221CJ\005\244\316e\246*\216\245V\304\227LF\206\210k\203\255\223Z\242\245\235h\253*F\014\324\316\216\030k\214\252\243\235A\252\225E<:\226\255N\304\266\330\246-9\037TL\2633\241\004dC\024\342V\177\257\361s\225\213\260\215M\311^0\036\321\257p\211p\007\203e\010\242\360I\314\331\014\362\230%3\254\350\007\336tq\031\276d:\252\210\340\202\330\034F\005\227&\035t\"y\211\264\325\021\326\375\220\177\353e\247\321e\227\225\024\230\016+/4\021f\256\334\261 hD$+m\361\210,\365\332%\"K)1\231Y\271\322\275\"P\227\364\006\236\311r3\267V\216\315\243;7#\256*2\222\030e\230\t\205\232w\313\210#m\302po$\346=8\305V\215\004\305\251\032I\330\231@4\025\210;\231j0\205O\326@j`B(\251P\010\244\000\026)\005\222P\313,\"\311\234\"\\\212@4\320\032B\272\021\255\272V\313\325J\r\237\215\233%xA\214\204\2105\245\313\313`\234\373fi\244\\R\252>\030\020\242\001\203\274\t\374\220l\0074\331\226g\025\253\313\227\246&\257L_\2762u\351\314\205\313\263\330\010\377\206\001^\247\207\200]r\030F.\323\303+\256\233\202\3342\207\361\354\365CQ\324vL\256Mo[\205\324A~\345\247\311\231\231\313?8\323\347/]\236\231r\346\246/N\375\014\243s\256\260\036\325\225\351\331[\371e;\026!D\013\346\207egv\tz\002\270\210\367\033\201\014\334\020\364\324\214\256\006\035\375\3403\242\030\223\324\201\0142\"\300w\016\301\034On\213\361\rC8/\353\3377\2073c\273\313yt\021Q\275\037\316\363\225:\271\351\230~-\271\316\335t*&}0:=6\231\337i\206syBC\311x\352\205g\321S:\345\241\364\273\301~\232\327<\201\254\310\272\201\342\360\344z\324\372\350\214\377\3308\234\022\013rv\2318\2603K\351\233\251+\320\273R\216\330\360+\250\254-\242\225+\250\321\357\223D\201h\270#\341\002\021\275`ww\372R\217\325\305q\373\373\241\210\232\315\274P\245F\256B\275\021I\236\221\246\260)~\013\220@W\002\316%\200\321\031w\361j\315\255\271\364Cb\371\231\313g.\342?\322\371p\220\030\343\211\274\230_\311\027\203q>[xR1\013\225q=G\207\014\345\022\307\010c\227\230\312\213N5\024kb\363Y\267&.;\0101q\345\302\353\025S\222\310\324\350<DH\013\361C4\362I\214\234\255yU`\316\364k\350\350""\217\370\024/\024\202\331\242\214\024\231\272\365\270\333h\026\305\224\304q\207\336\240\205\037\245\205\025o\242\312\310\242Ff\321zF\345\004\206\024U$4\232\210B\3065CD\256u\275\260U\276\272~\010\227C]\236\210T\244\026c\036\362\211\275\234\230\\\236\314p&\301\200|\032\tU\341O\024@\305\344\020\243\265\300\251[\024\330\022\214g\245\327\301\rn\246\267\207\325@\311\266\320j\227\r\356S\316\r\357\0323\275\223\276t\266s\354\262\201\275\363\003L\333\305\210\3512\323M\223\203\241W\n\321\231\366[\205\3502\021\233\322\240\003\355T\245\366f\245\262\277&+)zCE\275V\260\262\343v\332\326{,\372\221\302\226\005\242k\362\034\343\361\273\225\245\211\0043\025\r\245\205\347 \260\335\325\333\0073\211\005\0171\226$C\311\341\206\025\032\250e\305\350\226\231\031\251eg\026\220\033\320p\317+.\336wJ\206g\347\220\0017uk\033\201P\200\266+\270\331\252\235\"\362\023;\261\032\3212\351\337\231\t\2541\0279>}?i&*\315\270\031\024\276!\367\247T\247\255\250\310\346fj\305\251b\216u7XV\031N\351w\314%\tg/\002\371\354\224o\255z\304 \260\377\213-\213\261\346aT\261\366m\031Bp+\233y\302\210$fP\255\014d\363B\t\346~G\237\r\313.\252\237\315N\237\237\2764\007\277sS3\027\341\217s\366\334\005\374\003,\341\354\245\311+W~\342F\370wri\251\342.e\364\225QH7\305\354\221\204q\213H\220\267\202D\324*\262\321:1\355\033\326\031\320\031,\260\326Q\277EIPXK%\030XH%\221\226\232\212X\230\"2Q\341\r\311D\014\2406\203J*\003\202W5\222\257\035\326\232V)2^\212\230\215S\330YX%\235\003\225\346o\177I\221\273+\356\266z0b\344\351twER\363E\224tI\204\267\276\025\t\366_\357Z\035W\037k-V\211[J\023\263\370\316\262\230ug\211\305\233\315/\0253\205\331j\251\374-\364\276\340VB\t>\341\027\231E\204_TN\340L\216*\022:\214#\n\321k(\217\322\275YX^\005\274\266\231\223@Ty\230\352\377\032\005\341\005\357\033\230r\240\200\312\021\345\202\335\014\025\010w2PD\031\355\013\246\013\000\005R\tRr\250y\307\272\035\221\371\3619\345U\242?\230\307\217,\341e\3631\337V#\247J)\231D\244\267m\014\201,\252)\215\365\003\246d\002\321\255\226\310(\027\275DF\201\270%\322E\002K\244""\323\255%\322\2511Kd\347\307\347\230\263b\347D\316Kp\001\314\364\310\252B\023|n.*\272\345\004\237\333b\017\030\005b'\370\\\364\036\320\351\366\004\237k\277\007\354\374\370\234\310\321\207\246\361\\\034<\316\330\3608\323!<\316l\005\2173[\303\343L\014<\316D\302\343\314\026\3608\023\013\2173\261\3608\023\017\21731\3608\023\003\2173\321\360Hb9\016j\335b\304\350sh\006B\007\"\246\321\310\nO\240\257i\020\247t\300\351\247\331F\224\025\211j\313\316\216iO\025\020J!\"MD\331v\026\220\222y\357\226\251\377`\206\205\276\242\024\255\241\340G\255\001\030\tq\203\260\213\304\014\304,d\016&\234n\r\310\3146\007\345\353O\314\022\351\257\206\240\202@\254)\247cB\266\031y\341\004.k%\371T\266\231\214O}8n\266\036\320\212\260\023i\262\035\262\350je\250E\360SH\251\210S\030dU(Ps\200\0327\022\215\221Q<\232\004\264\363\r2p\216\334\234\322\317\371J\251V>\275j\206\365\303p+1\243hzJ\215\020\031\250\364h\334\246r\325`T\\\221\343\022g6P\"6\357-\211\232\353\346\270\317os\034\331\010\tYo\3418\r\237\271q\210\361\037\207\005,$\342\003\204\221 \"4#\305\354D\210\367\346\344H\256[\262pV\201\262\347\330/\245|\321\017\001$\225\0269j\261\345*\311d\310UZ$+\316\231\314\204\253p\325\252\214xl\016\302\274Z\203\2048\033\035\322\321\360\000\303\257\3258]\361l\270\2525\274\\\224\277\376cL#\005{\312\327ffjP\316\346\347\204\345j:\217\207\346\307\305\224\236XE\225\333-\235k\203\227N\367!\312Ob\204\025H\rD\351\t\245,\213\235H&\350U\noC?\206\017'\375\250\020\336x\351\022H#\313i*\215^1\006\232\262`E\247\"\"C\016R\305\361\311\242\037)\005\033\323\032!f\nsx\242\205\255\0105e\343$\230\240\214\234\304\221|\361\224\236\312Y\306.\262\355\353R\305\021cH\262\205\002D\240E\373\205H\272\000\2716\347\256TY%x\216\3644\346\310\352\021\341{\0162z6\303\214\2749\005\021\351\034\331@\322\237(\215_3\354\177\302\257\240\264\025cmxY\007t=\024\363\2532\242~m\374\251T\250#&FE\007\367(\305\251\370!\310Fk\251f\246\217\3351\t_\344\032\217\035\243\322\"\2260\272TxA+\254I\340\234\236\27649\363\223\021t\256MO\375\300\361\313\227/P\340\354\344\334\024O2""\005y\362\234\263Sg\246/N^\220\267u**\317\341TT}\3061\375\345\245\331)g\376\322\364\345K\034\237>3\007a\325\217\263\227\347O_\230\342\340\374\314\344\234*vn\372\307\251\263\364\272\322\354\265\221zazv\216\323.\\\236\344\320\267\223\027\316\031\321\351Ks\251\021\025\222\276AH\372\005\2411\025\230\232\2716y\001\206\373\023\251T\330\251\027\241C\337\316F\244Q\371K\223\227.S\336\205\311\231\363VW9A\367\322\217\372s\316i\263s3\323\227\316s\202.m\225\2738y\205\376^\232\244?3\363\227\234\251Kg\341\337\231\313g\247\316R\332\354\225\311\031k\232\215Z9\350W\007\361\3713\334\016\016Wf\006\20325\030\234\235\233\274\310\255\316\373\3638\357O\344\274?\223\030\034\233\3675\373\347\r}\376\371\220n\377\274\257\334?o\250\364\317\207\324\373\347}\375\376yC\253\177>\244\341?\257U\374\347}\315\376\371\240\222\377\374\374\364Y\337\355\271\037\352'\377\033F\234\016\0063\256y\261`\242\347\263<\027aK3\250\373Q^\023\212K\237\212\201\207e\232[\362}\246+\312\323LQ\230%\340\226}\236m\262Z\357\273\242\322\342\036\206mY\326z\2236_\324\306\254/\227]~ 8_\023\203K\030\2201\352\220\014\021\342\3241\371\033\245\020\025\231g\253C\031E\324l\\K]K_\033\2746tm\370\332\225\351k\363\027\276\237\274$\212\237\362\007\305\345?L\235>\177e\336\371\301\315\334\256\270\213H\024\321]\037k=\370\301\237g\347\316:\231\314\002\020o\225\022\320l\232\3640\205\310b\316\016\tp\374G\007\237\246\306U\000%\2250c\031O\273\242P\252\271rr\032F\2029\210wP\034*\226\212\256\037B\373q\364\204-S\\\315\224\363L\373X\024\220\305\277eH\023\013gpi\200~\211\036$\365c\210x\370\017\375\033\302j1\345g\375\021\311\271(>\341X\211\360V\353\241\210\305\340\375f\334\235f\370Z \314\246D\300A,\354\305\303E\014hsbi\341\027\016\320,*\322\205\371C\203K\024oG\031\217T\2513^\026m=\027\227\014\303!\246~kP\2515\250\311\032T_\005>\010\010\205\373\270\264\036\367c\265\230\315\227\200j\005\326\243\212Z?\000\033+Pv%\357\341?\207\034A.\210\213$\323S\222\204\275\005\240\234\210E0.\367\025\214\n\353\240\215i\213N\325e\262u9M\n\223\013K\3247q\252d8R\002\210\204""\312r\325[\372!\033zS\302\177r9F\356\223\310e\010\376,\260\351&g\001f\342\266S\255\300\336\301\036\002\325\221\205Y \004I\354\304\202\007\363\016\377a%\274\002\006\027\266 &~D\242\003\177`\321\0342\373\r\344\021D\002!\234\301\0052\203$]eK[\326\037\255\013\317Q\\(\364\322\004P\013\033\230`W\000X\376x\360WO|\226\271\257\254b\302\262\0105Y\001\235\254\311@\252\010\024\201\202\331\333z\r0\216}Ua\303\201\023D\311\267\022\360\216\320?\210\225\3134\270\254\024\306_\034\242\275\241 \246\274\004eY| \177\2544\372\0133\317\367\235Y\307\340\216\263J\024\221\225\326\310\303\006\356\031n\014\335Od\035\313\233D\326\261m\367fixYc\220\350\367)\253zP\244\271\316\352W\270Y\335\r\366R \r\211u\343\254#\336N\263\320\301*L6\034(\350\177\0053\263d\240\027~\253\320f%s/+\354o\326\362?\250bz\225\330\377\231\372k\346\352\264*w\254r_\257&\343\022\205\2454\266\242\2469\0145\023\007\204\177\200\371\272\215b\217\305<\264\343A$+p`\272\340U\010.\253\232c/ZY\021\230\252\277\306\344+\364\220Uqm\362T\3028\305\022\244\236\325\340,4\276\277\0138\241\304\247\221\3422\350WY\241\026\334\216\002\031\374\007\223N\277\002Z\034\346\211\202\037C\261\226j\227\270\353\005@\034\001\234\241\\`\017\303\350{\032\341G@\336\206|\002,\307\307\333\034Xr\253(\205\303(\340\222Z9\213z\220\000\244>>!],\366u\006\277\265\034\331\352\205\004\340\24228\261\256\203o\237p\276\262\364\303\334\025\317_\t\002hj\031o\211aD\276\347\032\235\005,)\204\013\360\037\ng\0106\375`\177f!+l<\377\221\210`\r\216\360\006`\031\200-\352\222X\216=\026\340/l\317\n\nJ\227<\035\313\347tP\274\254(S:\206I\235\220u\035L\250U]\313\267\233\355\317\315\362\341\006\221j\006\272R\001\244\t\300r\017\343\000@\205\374\202\204\324&W\206\222u\225%Y=\010,\223\354\037B\025\234\276\362\252\350\316\220q\243,\355Y@f>\276\306\030\342#\374\253F\346\007\245H\215m#\361#\256\220\273\270\254\247\020\265\227U\315[\346\263\263^E\025\250\250\002\262\277\234l-\227q\360\371\001,@\255B6\034\371YH@\017N\375\023\225qS\014\346\007\2532\017\236\225D^\022P\276\306\016\354\330E\035\311""\333\200\272`\363\322J\341\\k\2363Z\316\027!\007\350+\303\230,\200.\220N\313\2368\237\363\335\325\345\264\351\031\355\254N;\250c[*\374[\021\313*\025\337>\224\037B/f(]\003\332\031]\261`\037\271\203\236\262\036\245\255H!\354J\341\030\273R:\003\326\317>%\"\234\344\221\314\205\330'\276\317\252!\023\003\233\263\212\377\010\317e)DV_\200\354\302H\276HG\001\233\372c\373U\216\3741:\303)4\262\345\234\352\031\236\232rv\342\362\344\026\035\246\203\371\217oe\306\2607\343D\246\312\324\006\315\322\030\t8H4\214\253\016g}H\333\236\372r\005u\355\346\013\353BR:H\200c\031~\000_\220\371\026\365@I\375\365\005\371\212~\013\347\010\016\215x%\025\221\024\372\014E\244\246\354T\213LsUR\375W\336\370\\\227\237\344\020\2148\205\3742\"\360(\337|\254`\303\277\264{\014\215\033\366\364\305\277\242\353\341\334b\005\020\217'\232\177\231\244A\"A\246\337\010WdI`o\347\220.FB8\350\007P\211\236\rl\020)\215\2264\205\024\242|\277H\032\235\303J?\006\376\340\341\350\026k\313\364\017}\213\273\305\273\371\nL\023\311B\311\357\214\347\256d\341?\302y\370\267\272@\277P\021\376\005\366M\376\324\\\255&o\352d\206\3653\361\360\347\031\325\014\221\242\007\374W,\262\214~\002\302\246m\271\\\307\274\305\305\364\342\320\342\030S\225\364k\004\225\346\223qse]p\031\264(S\003\264hx\000W\362e\240\215\014\262\224\037Pi\343\205\024\240\221\263\000^\304\360\25664\344H\n\001\315\"\272\251\216\322\332\213R\370\343\333\313\260\003GIA\330\025\336\007g\202\016e\271\1772n2\355;M\362\344(N\037\305\321\2438w\244\247\202\213\245\022vU\232/U\\\200A!5\331\340\242q\245ej0::\002\254\252c^s\231\227\335\254\343\206d\215/\220\n\252\tD\331\346\364\305\360A7\222a{7\341\224\320\375\241\301U\204\265\223\034\343\336\304\274B1\256N\202A\322/0\244i\246m%C\243>t\263gh3`\220\330\217E\204(\274\343\361J\232\316 2\230\177)T,\335\312\300R\325\252\270\227\227r\013P\007z\362ch\2231\002Q*\027\271\221\367\271\372yH\373w\"\230k\2747\303\031\017\\\377\322\025\255<\311\"\264\022\214\243\233@3\315\257%\352\331\035\245\033<R0N@\357?b\245[Q>\227TF\350\222\324x\272\007A""\"|\340/\343k\n\360\245\361\222\272qp\224\035\345\245|U#\000\234X\210\002\323\242n[\203\177\035\224\236yK\367\363\345[\260\301iO\361a g\202%\206R\356\375`\035\201\321)\226\212\264\351y\207a\332\335L%\237\201\205R\033\007\327\333A\257\021pV-\334\312-z\024\346)\245\240\034?\025w\221D\027\267\334\225[p6\334*\321\311\244\216\270|>\225O\347\207\362c\371\\>\347\342,A\005$\202pj\325\274\262\217\216Dd\026\362\213\325|n\005\376#\006\303\275G\270\021Z)\031GL@w5R\2235Z=\276\235\316<pNe\274%\2245\016\270\200\205h\305e\231\244\320\212F\212\034\246\010T\320}\004-\206/\376E\300\023\370W\373\200\035(\032\21789\310\267\224\034\346\303\222\357\271\324\337\020J\261\024>\363EdSh\2459H\240kz)d\245Y\362\363A\256=\310\233\007:\360\310\263\231v\3547\237\354L\341\322A\003\365\322\243\302R\276$l\000\023g\370\320\264\000g\274\365\340\324\264\222\na%\350\"\300\016\274>\305\250\022\344\261\347Z\353\005\252\365\3444\356\215)\244\023\310\353\006\370\211\251~S\252^\213\006^\215\352g\242\366\3759\305x\374\252>\355\367\326tz\353\273\274e3\276b\271\027\376\010\266\221\331\243\004\200rz\211\213\221\nm\007\2322~3\252\037\240B\200\347\026\245\247\342\313\225^\241*\013\300\374X>\017\004r%\357a\233D9\002\373O\340I!\232\020\324\313q\350\227~\302\020#\227$[\276\252\362\255\014\0337\365\277\270\313$\"4\271\024\235\206\232\031\212\025C%\020\255\010B\001\354\035\311\316\360\347\366mw\025\376\343\316c\000sQ\030A\022\t\nxt_r\033\326\351\366=\224\300\233\216l}7\265\001\207\265\332I\255\351\255\326\367P[\310\334_E\317\264\216\007\370-\277\302\024\020q?@Gb\203\200\346P\212B/J\251R\372\021Z\206\302\266O\003\355\313\326\321!\n\340p\270S\206\217\004\277\227@L{\205\222v\347f\2304\211p\364\006I\006\275\346\330Q\025c\312\311\261\243\205R\3516\332\021\360\274\325B\351\236[!\357\271\016\3004,\007\3772\314-g~\301#\340\266k\036\272\355T\030(\017\312d`e\\<i\227\331L\016\374\361\370z\000i\027\017e\243x\262\300&\262\004\244\030\341\223@\334\030\361\024.\347\027|\253/\030R^S\371\223hc\312\313\231\325\005\027\357#hv\341\333\005""\227\005z()\343\250\347\030\202\021cb\305\324\n\002\274\303\"Z\026\260\251\035\240\217\033\236\352\240K_\323M\364r\036\267\277\n\207\367\010\240\216Xs\320\220\001\263\237\207\024\230@\354!\034%\360\017\3170\307\377\033\3517\0302*%\305IA\304+\026\0358\355=\026h\362/\375!\036\233nlhj\240\022\\&DZ\030\024\374U\024t\300\002i\241b\0255+r\034\271\021*\"\303N\3073\375\3206V\2075\376e\t0\205`\361\360/}\345\336\003<\342\341\353\312\342b\261\204\340\0014\210\026\237\360>\247\373;\234\021\276\217\"\365.\340\274\035b\n\213\345\242W\254\026\205\017\247N#\321\272\220\257\302\304Q\220\216&\n)\251\010EX\203\014\347|\301\005\312%_\252P2\322\030\231\242\222\274\323i\027\2601DQ\34250$t\021\006\031\232)\304\270\021\203\006#\257&\323Ne\366\036\023\231\254\300\220\300!\205M\242S\245\220b\\\316\322Q\243\014\\h\370\253'\003x\217\022\234<|\370\310\021\304\210\200\177=\211\001\376\345\233\005\272\223\303\037\303.Q\t\270N\276i\240{\006\271l\220?\324\207\222W\252\336\202\034\374!\220\240\000\365\230\203t2J\020V\035v1\374\307\223\210\001\274\250\252\241\200\007\245\241\030\302M\205\177\005\247J\020\350#\014\311\037\006(?$\351e\252\273\314\265\302\312H\2047\254\201>,\377\313\022\241\276\335C\016\025o\330\000\261\343\215J\226\377\273\215\377\360^\002\317\0379\324\345O\246\234\227\020\013\247M\273\020\006\003\022\340E\370\330@Y\366-\"\t\2342\264\226\205\377\347\360\002\007)p\207NI+\202g'^\357 n\270\353\032\027=,\310/\347]\230.D/\345R\271\\\362\330a9\344*\357\315\020Xt\221{!2\034\332\004X\202~P\300\303\356\340\237\312]\227\211!\210\341\341\204\340\354\031\346\264\200g\310\2113\347\200Og\305M\204|\213\342\354\026K\367\200\204@\323\236\265E\376\205\345)\313\211/\350\032\376\000\022\023\327i\312\203\032\351\021\250\210\010\353u\264\226\313\030^Y\221@Af\256_\213\226\303\276\202\373\355\305R>y\201\357Pa\276\004rs\375\202\327\313\253\010\017p\204\261\244\230\3172f\273a\203-\374\002Y\244\033f\313\203<m\026\031\246wu\005\231\212<\022\356\024\306\013 \017\266*\305\344J\215\302\302\372a\220\351}\014\325d}""\003\306d\2423Ms\"\201\002Js\225\222\357\322\256t\234;t\324:\204L\351|\270\203\3060*\254\001\341\363l\025\340\356\n\225\314\275\312\002`#\221.\272\210g\310\002\223z_/\346\227\014\233K\246\217\330\300S\372N^\326\207\354\240\031&7(h\342GJ`t@A\346\310\225r\201\330w\342\033Pe\332I\231\013\321fCL\203\342\241\260\346\376\315\214*WnvC\337\227Z\027\253\020\251Up\343\372z7a\235`\323\305Q\305\225Kk\014 8(\247\2111\316\023}\210\3033l5h\236\3336~\307\252\265\226\202m\340\241\244\255\225\315^\245\345\360\211Q\316\306.#G\241\235Q\352\200^\026\025\347\341\220\367m\371\203\2343\264\342U\324[f~\304\214\333\003\327I\315\004\356\025\3311\270\017%\010\333\220C\3609\244Uk\225b%\277t\013\325\204\371/\262\020\034*I\016\223\374\034\3465,\335Cr\206\210\337J\255\210\242j%\025\267b9\025\34597\"\022\366T\242W\341\307\306$\255\006\360]D\325\242\n\013\231\361\327U\027\3434\213\031e\036H\342\"\206\2202$\334\243\237~\346\020\205\272D]\031\245/\303D\r:n\305\177(4\"\020\365\260+J\241\307\264\366\247\3039\346>\221\026\320\332\364\024R\267\212\030\t\260\373\221\346\232#\214=G\332j\226Du@\220\242\255\320\247\030R\367\370Nn\2018fHSD\241\257\222\353D\250\347\022\177\002-\010\t\252!\223\222\254H\000t-\225\004/\277\244D(@-.\373wb\250\251\300\370R\211\353h\320\374\353\335\316\227\211\372%D\202\261b\306+\270n\231HV(Z(\001\311\345x\250k\266\352\213U\221\315\024\215v\372#T\017\205\021j1\200@Q\252U\210\030\302\273v\232\2232\372+fX*+1\257v>,0\302\242d\272'\364\312\0058\363y\245\274J\226\257\0131\240\350b\217/\270\201\355\271M?<b\300\003U\376A\374L\263MN\222\2630s\267J9\330\314e\364S\254\332\027\365\r\004sC\223C\234%\302\017S\\\242\270\246 \234c\300U\322\270\252\225E\366\203\213\222\031\3413ec\260\365,\274.\276O[\312\367\034\254De\213\253\252\022,O\027=\276\210I0\266\354\nC\002\256P9\236\333\260\336H\242\253\273]\317\253\301\306\326\372\232\nj\225\002Y\274\327\036\017\226\016*v\227M@\257\212\006\016\037\276\364\313\301\222P\314\222Q\222\205\322QM\321\250E\272\r!\224\256\363\257\200\263Dp\034\325\005\264)\210\372""\032\324\276\2725%\021=\354C\026\322\321_n\027C\334\037%v\322\233\025\002\245{$\005\240G\003\3544\231\360\032m\027XS\322\026s\230\351\325\336\2211\000\244\265\366i\254\003\376\225\276\332\347\325|\025\032\326\257u\304\304\264z\344\020t\022\340\277\227\362\275\355\004\374\356DD\331\341_\360]\266~.\242_\211\350GB\352\305\246~-\022x/\244_n\002o\305U\303\031\202\236H\331\273):\357&@pX\014\214|R\245\312\327\002Z\255\316\221/\003w\005\2069\332H\313\264Z\243\247*o p\033\230\202]J_$6L\211\326\227\363\013\310M\000\316\314V\325c\007Vl\022\363h\332L\232\302\211\325U\230;\332\2764\207*\3007g\024B\265Z\322\320\245X>\247u\254h'1\031\214\314\016L\346}\336\262\374\353\3509\255\245j\351\332Pm\214\235M\263\203iv*M\216\244\303\257\2618E\016EBl\354@\014~\253\370\217z\027\353_\272VF\211\026\333\322\344\337\2602@\310\366i\r\007P\363B\356\2501A\240\314#9?lzLS\247\222\341\240\3321\302!C\200\265j\026\205\221\250\213v\027\370\037\365\322\214D\205\246\3273\016\323\301f\271Z\345\210\360\362Q\236V9\215\026\307\017\312]\024\3771\024\337\364m_(\200+\207\270\366.\035\017\367\356e*E\374\207\210\366\336\302=\324$pY'\312R\243\325\016F,\327\"\332\251\310\275\212\260\023\276\337YqZ\257\264~iQ\014\267\215\034$6\305\360\326(A\332\220\024\326\211t\034\263#{\376\225\205X\261\235x\337\317\227\357{\325\334D\202\270\300\361qr~2>~\321\005\224*f3\022\275WVY\3757\361Er\227*\350\333@L|\321+^\353\231\307B\346pT\330Jg\020xP\307,\233\334\345\327\326\253*;\013`\265\234 \356\"\361yd\211-\253\310\227\263\343\343\332\n\241U\304\354~dr_\002oh\372\0220\021\343\343@L\241\214\247\\\255|\255\353.\215\217\033/\244\276I<QM3\260\360\245\345\311,\222;hw\257mu\355*2\215H\207*\221r8\0335\317\237Z\263\010*\234$T\205\370\030m\0360\311\3708\302\247UU\\\037\350\341\0064\034\265nq\337\260\251\246m~dzD\334\346\247\312E\3356?\243m\260\315o\202^ \344\343m\326b\330\275\332\366\227\2269\254m~\315On\266\375\021\036H\333\375\3106\376\362x_+\313&\217\371\365\271'j{\346\261\332\246\027\325\333\375&\324\3156\233\326F\324@H\330\t\366\377(;\016Il""\265\343\255z\267\334\352\035\225\016\354\361\216\27616wG\345\325\256\356\250p\374v\356\350s{\037w\364\211\336\202\035\226\226\275\327Y\351\320\246\333\316g\306n\333\326g\347\036\257\265\231\355\265\2466Vg\205\267\325\243\360\311\337\333q\321\276\204y\220\267k\215\342\352\265\305\327\"\010\367i\2501Q\302\361\2341\240\2468M\231\035\315\224\317\301w\337\004\3002\330\\[\352L\355\242\000\345\201\010B\304\363(\342\311\345=\272\267A\222\304\254\256\214|\341\222\027\250\323PuM|\241K\"7S\240\342\333\351\224\215\361 M\221([Ta\373\317\n\222\212vn'\225\231\256\263\"j3\263\267\254\316wW\020A>&w9\242\014)\322<T\334\220\333\246]|\323_+.\224VL\021\313.b$rHG\357\nf9\224\307\367\004H\034\357\362\231\016Q.\330\205\362\023\223\223\336\305\252\177(\020\240 \263\020\273\344y\007US\363v\251!\321%\024.m \037\005\035\304\235j\306W\177\342w\301Nbq\200\235f=\003\262\263H\246\201\320`'\323\304\331I\2121\0134\207 m'iI|d_X\364\030LCL\034H\343\025\304g/\314\235Eg\353g)1\331\213\355\277\256D~M\234a \211k1D\211\2624\376\032z\201\371U22+\301\236\021\324W\213\\\033\245\302f\255\014j\251Y\353\202\nd\301UAU0{\212)\305\232`\337_A\304\364\032\231\341\31153\027\333}Y\211\370\322\236VL\340\357\371a[\354\226\210\312\255\025#\340_\022\003s,\251\321\363,\231\341\271\226\014{\276%14\347\252ak\265%1\260\030:\325Z\020\225\032\273(\201\002\341\205\t\026X\334\252\206JL\r\366\"\251D\256K\036c\304I\017w\261\256\027\205y\366\340d\335e\234d\273\264\346\"G\251\020\240\177F\255\nA\353T\226\315\250\344%\272\352\241\217\361\t\303\357\273\377\034\330\365\332\201\007\3374\272\032\307[{\222kG[\003g\036\216\376q\374\317\241]\373\336l\035L\257\037\177\264\367\255\326[\211\346\356\346\221\346o\353\223\255=\003\353\370\315\276\267\353\207[\357\366\255M>:\370\346\346\201\267\036\334\253g\033]\233\207\216\301O\327{\215\2777R\030\376\270yg\355\365\265\334z\367\372\324\006e\036m\376\255y<\262\300\267\033\223\272\300\243w\217l\036~\277\361Es\262u\342_\017w?\354\332<\360^cw\343H\243\332L7\347\327\216\257\245\240O\017\252\365\341\306n""\356\377\301\007\247\037,\326'\353W7\367\274\321z\343x\263\253\331\277\276\273\225:\375\360\370\303\224\032\341\327\365;\277\357\336\304\336\257\037Y\277\323\332\365~\353}\034\311\312\356]\257\275\276\271\367H\275\324\274\332\314l\276q\000\303\231G{\376\361\373\375zW\275\267q|soW\275ks\337\273\365\037\032\223\030>R\277\3238\330\274\272\271\357\235z\252>\335\370\021\202{\273Z]\23773\315U\250\273ks\177\027}\230l\246\"\202T\335\373\215T\343\333\346\344\243\275o>\310\327\357l\036\030\3378\2761\362\260\013\033\375\337\372`=\003]h\035I\256u\255\035\347\244\321\306\t\030\372\327k\336\372qj\353\004t\365\326ZFerb\017L\345\336\365\335\217\366\274\361\000\307\3741\214\271\365\306\247\315TkO\252\225\232\2049<\326\327\352\203\331\334<\226Z\357\372\263\372\367]\373\016>\270\320\330\275\271\367\215\007_\321\332\035\300\265\243yM\327\377\r=>p\264~\267q\2559\261\276\033\247\377`\363\006\264N\201\177\257\247hA6\017|\334\310\264\366\374s-\365gZ\327\206\223\265\367\300\203\251\372\273\365L\275\n\253|\340H=\327\370\034\300\347\355\346\370\332\325V\3777\033\031l\005V\240\267\325\373\325F\352\317\261]\257}\334\372hh}r\035&u\377\346\336\267\353\375\004lw\326\376\261vw\375\332F\212\026\365\243\306Ul\254\273\371%\364\376c\000\277V\027\014\2569\211\215]\004\340\355m~\261\366\375\372\377>La\345w\353?\251\236\235\336\275\013V\352x\240O\357\324\207`pW\033\013M\030\305\273\3659\250\240\273\361]3\323\352\031]\277\203\331\243\020?\007\240\n\225\375/\254\326\244_\031\300}\375\347\306\235V\002\240gs\357\241\372\236\372y\250\021\307]?^\037k\214\000\360\365\300\322\235X\253\256\217o\\\335|\373H}\2511\337<\336\034j\336\221q\003\340\374y\372o\273^\333\373\373\275\007\231\007+\000\001\010V\255\243\375k\231\265\273\255\341o\377\240E9E\365B\347\2565\276AP\240\217\003py\004\007\361h\317\336\007{\353\364\315x\375j}\021\300\024\226\256\3268\335\310<\202\300\035\256\354\014\002\332\333\365$\016\006\273\275\277q\2741\326L=\332\363\326\203\377\203\271\372\004\346\177s\317\301\326\301\317\232\223M\250\362\300\203s""0\234\257\032\231\306\375\265.\310xp\r\306\206\237\356\331\377\240\017f\361\016\301Yk\327\241\372\033\215\324\237ga^>j}8\270\236\202Z\366\002\034\375\271\027\267\334W\365L\353h\357\032\354\272\177\374^{p\346\301\035\006/ht_k\037\356\322\343\264\340o>(6&\033\316\332\344\332\334\372{\033\260\r\324r\003\030C=\237\023\022\330\304\366\036\234\207\205\371\2641\327\374`m\0222\337\333\365\032\240\250\217\0327`v\366t\325\217\265\336\377\002\267\314\273\365\377\201\272{\327\222\320\235\357\000\332\272\277\\\373\025v\330\370\303\253\233_M\251\237\356\223k?\255g\326\357\303\306\350N\257'7R\033\337=\204\242\375k\371\365;\033\373\037\036\337\354\036\\?\0058\351s\\\346\356\324\3721\251\241;\271vl\3758-\255\371\335\227k\253\033\2737\336\007\360\323\025\177\370\307\265\326\354\334\237\257\343L\234\002\344t\275\371z\363\366\372Q(\366\336\303#\017\357l\276\013S\375;\014\352\317\037w3,\344\352\264\310\377\301\241\343g\037\340\266i\035?\265\321\265q\\#6@\322\037\300\214\303\0168\360`\264\376i\375\352\237\373w\035<\202\020\274\251pb\243\213\313\034\300My\276~\n&\367*`\001\3307\237\3116\375\363M\370\274\365\306\207\215\363\270\317\337o\364\266\272\251\225G\007\020\334\007\0339X\231C]\233\207?m\0166\027\326^[\273\272\266\270~\361\341\2730\320\303\335\255\356\021\030\336\235\315CG[G\001\347\010\242\336|\017\361\325g\255\376\363\017\357\374\361f\353\332\017\255\037~\2041t}\202u=\202&>\003h\334\313\010\1777@\324^D$\200p\233w\350\374@\364\376\001@\336\265\265o6\216=\344#\347\023\330dv\257\367\233\275\376\260q\316\350\365\177\032\263\315=\320\r\356\365P\263\006\320\344lL\301\352n\331\343\357\377H\265.\374O\353\177n\264n\374{{]n\035\003x[\033Y\377xc\365\217\335~\237\021S\364i\204\010\273\266\276\033O\215\326{\200\360Nm\034\336\230\177x\274\265\253\273y\034\013}\210\270\0037\014\254wW\353P\242\371\0324q\033\267\301\346\347p\270\256\361\211\006xVU\334\273k\037\224;\t[\345\330\306g\210J\337k\275\207\263\3609l\021A\235\010\t\255\267\010X`\223\034\201M\362\340\337\215\024n\330\257\360ly\207 \342\032""\314\341\336\017\033\323\320\334\342\332dk\027\002\314\333\010\207\260I\001i4`<\364\007jHk\002\001\"\207w\275\326\335:\236^\357\005\230\334\013\037\341\336\376\255~\016\210\207\017`\255\326?\337\220\335>\371`\266~\020vj\327&\037H\n\200[\260k\216\257\217m\300\271\004\201\077\0777\227\364X\343H\353\023^\253\003\010\313c\000\212\031X6\300\331\3030\256\017Z}\377o\343\216\261$\376:\340\251~x\375\247\215\314#B\261TuB\201\315\353\273\016~\001\205\367\276\321\001\304\177\014\241\023P\373\301\365y\030`g0\376A\003\252A\242!\252g\260fk\347[\203\347\036\232]\3536\240\243Z\037o\314\264>\301YI\205sk\365\213\270\216\315\221V\362\353\215\311\215\253\255]\260\306\255\004\026\373\031\220\356\361\346nF0>\252\205Q\002l!f\177\027\351!\\\213\363\200\025\3664\316\302\0069\203\207\220>\347Sx\234\374\007\316\214\214:\021F\371\3137\036\214q&~\013pr\360\301uD+\370\325J\275\3220)\025:>\036\311\03786&\037\030\2478\002\312\361\365Q\000\316}\177tqGG\353\237\325\027\032o\000b\311\342\301r\000\032\030\202*\2174\356\360P\010V\033S\315\303\315\231\346}\000(\300|\3570R\303F\377\017\016S\244\267\352\2374\017*b\202\017\"\234\221\005B\244\367\353o\003\0053\333\330\337\354F\362\340\315\007\277P\337\367\034\252\277\216\223\204k\370\317u\237R<\316\020\276W\235P\207\353\223\233\373\336|\220E:\006\302\217\270\202\3261\006\027:\177\337\201\"\262\333\233@p!p|\213{\365\221@\376\017L\212\302\327\365\033\200J\270\203p8r;[\364\017Q\312W\353\031\023\341\343\247\037\357:\330\335\3049\004\274?\324z\353\323&S1\255\243\000`\255>\200\215G0+@\221\003\035\372\010(\330B\363S8\306!\340\342\251\r\260\377`\010H\364\014\2033S<|Z\0368\210\373\343H\375*\207\366\035\3029\000\n\345\321\336}\177\276\217\2008\205\204\315#@~\373\232G\001\264\217\256\343\241\274\357\255\007\267y\3156\251j\017\216.\240.\376\t\007\315\307D\005<\332\213\204\013\324\202\035\335{\002\373\262o\363\300\301M\244\354\2177?^\273\263\371\036n\265\356\346\024,\307\227p\350\037\202\311\304\315t\030\210\216,`\215\303\357>:\004$:\222\2057\3404\036\036yt\350\235\372Ds""\037\000\r\354\306\177\"\033\260\371\336\207H\243\001\300b\341\017\032_\021n>p\010\320m\027NN\n;1\217\224\222\246\246\336F\312\2511\324X\201m\272g\355[\2449[{`\0326O@\2577O|\216d\342\367\365{\200u \360m\375r\353S\244\315a\004\373p\322~B4\274\371\326!\234\247w\210\332\033e\302\356\321\336\217\361\2237\000K\036e\212\362\252\315\026\035\256\177\327(\256Mn~\301\210j\036Pw\016F\225\032^\277\212\203~We\177\271vg}\0170K\207\201\274\030\030\302i<\360\340;\346\005>[[Z\237\333x{c\024O\217\017Z\037`\207\337\202f\341\024y\355\375\306\273\3245\200\264Q\\\204\206\333\034[;\265~\001\316\204\217\241E\206\240\317w\035\374\240q\022\361\323\346\201\343\315\217\200\330\274\2639\376\325f\340,;\014[\343\237\000\353\233\377\204\221w\362\241\234\333C\220\310\223\010\335fh\357h;\206\301}\327`k\360\314C \213\376\306\210\rw<\014l\244~\024\016%\240u_\003\014\003\370\346>\036H\006\013\204\364=11\357#[\300\033\365(\"Q\3118Z\277/\2449|\365Y\353\263\261\215\275\310Z>Bd\365a\343R\353\213\177=|\r\350;@\344\277\000\224}\262\261[\355\346\253\274\201a*\276\001r\242\r\214\034#6\204)}\234\034D\251\375\255\336I\"\234\000\004.\020\205r\340P\353\320\361\326\361\211\215\271\207G\377\330\363\007p\026\307Z\307`\201\361d?\360`\360\301\022\240\216\003T\270\365\031\200\307\272\273\221\206\242]\217(\355u\"\307~X?\2771\0044\007|\215\210\366\323\372L\3757\254\371p\375\333\306\231F\245\371!\020l\277l\034|x\365\221A\022\"\305\001\273\nO\\\305n!u\215\007>v\366}\344R\233\227\000\337\036\352!\246<C(\216h\020\202\345\243\365U8\203a\347\256\277\271\221\331\270\373\360*\345\323Q\323\332\003\325\3759\263\3338p\217\267\022\300I\301$\362\247\377\0012#\267\3669}z\347\221&O\370\303\271\335\006/:D\307q\006\367/\366\3730\360N\237\001J;\200\233\1777\234\nW\371\033 \005\017\266\016\000\227` \273}\270\277?o\274\206\3643\023\020)8\323\2617]\010k@\201\355:\216\364\310{\000\213p\254$Z\tbz\376\361\373\n\242F\242\3240v\007\261\345\030\235n\320j\032\321\030\262Lo=\250\020\357\017G\354\333\365/\211y\021f\354d\203\030\033\250\243\376\277""\260\357R(A\270\215]E\312J\216'\354s\001\306y\024\300\371G\244\"\025'\367\005\326M\347\255\301\236!\376`\334\005\030\346\237x\320\301\206\330\374\3403\005\327]\270\311YP!(~\272y\035%\036@\231(\336\355k\300\316\373\341\244\273\016H q\\\021eW\271?{\020\340\216\204\316\022\3043\275(\361\221s\003 <8\311o\331\347\3031\377X\330T(\237\020\375\241#\300\211N\3214\035Bn\373\016a\364\016Qx\247\270\033\216\356\367\021I\014\001\307\017#{\r\311\230\203\264\374(\307\221\203\373$\354\006=\335=L\305\020\252\034\256\003fD\014\014\343\350if\004\241\375\255\365~\377Zn\275\207p\3601\224{\275\017'\254\224;\330\333$\360\020<\017\350W\263/\207\033?4\317\256\375\ri\013\330\263#\017\273\000\277\217\214\266v\r\257_5\370\337C\365\275\010}\004&\212\312Pi(i\211H\3433\377+\006G<\034\337G\222r}p\375\326\206\3730\205\275\031\001\024;L\"5\230$\004\250CDD\343&\351\322\365\274\276\236E\336z\337\203\367\352\307`\036G\232\357\0005XY#\262\352\036a\035 \363fP\034\321\370\007\314\361\352\372k\010:(\225b\201\022q\364\303\365\003\300;\374\330\374\201\370\357>L\032\251wAp\304\344\021FH\366\364\001\235\216#k\222\275\227\346\277\017\321f\027\tbV`\333\220\020\355B\223\345F\"\017C,\377n\353]$\234\317\255\037\267\350\264\307\250\006\345rw\327\256\232\344\024L\016\n0\017\001\202\030\301ul\036\001vq\032)\001\3149gb\243\021\242\365\020\036\021\215t\343\246\336<\320\215\034\002\304\337|\013O\372\237\033\367\250\211\177o\244\230\302\3375\202\307\331?~\377\025(\335l\343\035\306\035\322\307\263\302\021Z1b\370\245\327\255\367\220\213\372\014\227\017\273SzHPw\2429\211D\327\241\007\2775\350\010\315\265\336\376\254y\0320\352\361M\037\374~l\316\301\316:\206\302A\027\016\177\336\036o3\315}\274\016 <\272\376\037\300\332\237$\376\354\337u\360s\334\313\207\353\3373\tw\250\276\017*\270J,\322G\300I\357\326\200D\024\347Q\3043\000\005p8\266\216\210\000\025\031\360\213\255\344W\033) =\017\260\370ty\375\353\r\3128\337\034\005zea\375\340\006\237\035\357\303F\206\003\360|#\335\270\016T\304\341cH\257\350?\357\342\261D\303[E\016\273\265""\0076\035ro\"\340\3003\035\330*\022\026n\234}\270[\235\005\037\256\375\017\000\364\201\267[o\303\220\241\247\261\337!\343D'h\334w\320=\370\316\247\257\345s<A\000q=:D\3442\313\266\221G\374\020X\251\327HZ|\370(\211\023\337;\206\010\255\207\221\335\321\272\3278A\214\301\001f\\\377\336L\303\312\274\273\306\3228\237L\307\266\336j\275y\222\244+@\351\351\371\234\206U\302Y\013\310\3177\276xH\204\374W\300?\355\336|\223d\002\320\217\033\"\241\027\340\206S\327\007\341G\007z\232U\3004\007\200\244B\246Up\311\320\203;L\037c+Q\020\014\2047\326\363\213!\326C\264~\242_!R\342\200\016\325_\303i:\270y\200\0207\357\027<\232f\025n\004jm\037c3d.\207\221YB\366\264\325\rK\002\307E\353\335\023\315\331\265\003p4\276N\030\343\303\326\207}kg\200\220D\232\214F\277\211\247O\343\227\265}\353\266X\220\300\032\316\314:\220Oc\033\273\377\034\003\242\006N\304\0030\267p\006\235j\236\003Z\343\357\200\"\0277\3163\212D\324(\013N|4M\304V\362\000<\267p}\017\303|\3002\301:?z\332R\261\326{Dq\255e,\031\023\236\246\305\326g_\363\035I\227/j\332\201\261\307\310\321b\307\376\224dk\021\003G\311\253\032\370\271\207\311?R\366\270o\372P\236\020jS\2202\320\233\255\023c\033o\000\315t\010o\037\200\2625\267\010~|\377o\355?n\215}\367\007\342\254\326\341\236&\023\254t\037\243@\017\345\271\210^?S\221\1773\361\274\376\325\006\202'\034\274\237\252I\245\223\200\310\216\256VW\357\332\033\255\301\013@\266\037\243\313\013<G\327\346\001\335/m \221\320\372\3071\242+\370>\351v+\205}\010\227\344-x\204pI\253k`\2358\225\325\372\356G\300\013|\006'b\r\017\211\203\017~B\254\375v\375\004\224\303\375\204r\215\017\020y\177\200H\024\026/\205\"\023\336x\274\255&\177\237\304s\361\300\203\364\203\331\372\0368O\021s\3154\357\310a\200\347\203L\342g\315\342\3729dz\350\013\234\265\367\032{\200\220\353\225k\212\326!\344\013\006\341\200:\261v\347\367\311\315\364 \262\035\007\231\021{\247>N$\032\335W\340\245\332\001F$@\376\215\003V]B @\020}\033\250\2321\272)C\210\206\243\204\021\314\021\300\257\307u\227\260\340\273\200\005\336\005\324\324\372\362\354""\303\311\315/\207\327\177\204\262_\022\250\023\217B\004 \3644\215u\022\355\320\2505\317\003\307\272\272!26 \035\232\357!\r\013}\035\234\376\343\203\326\334<\316\204^\303\275x!t\034\366\326\024\302\352\333\270\234\300{\342\354#T|\016+\260\027\311\311\177\000\225\333\3656\301,\354\201O\221\362\003\372\366\273\346\255\265,\035\352K\033\2630\363\207\037\376\360\307\344#\243\034t}\363\275\004\314v\n\010\310\177\340-\337\372\320\372=\224\355\002B\354'v[n\nqn\215.\226w?i\037Q:\320I\037?\206:\266\325G\274>\216\241\242z\210n\201\223\t\360\210\246\242~\004\352\031\305\010|\002\321\367\230\301\030b\017\220\273@Y<d\031;\261\234\334\002\222p\243\204\237\326\226\200\354\316\264\366\000\213\004T\242\315~\276K\273\3632\234b\347Hd>4\274i\3263\202 \2177g8Pb;Y\314\377k+\r\360\004L\264\237\0060\332\372\200\300\t\311\231\351\306\377\000qK\025PG\350\226\023\0226\307.\375q\273\365\323\317\177\376\353\357\261\353s\010\027\202\357K\217\222ps\213\205\372\350K\024\231\361B\001\264|\004t\324\353k\2677\216\302\234\030\205z\001\231\276\267\336\265\231D\220J\342\265W\017l\364\270%\032c\201\303\242\272\033\204\r\325\372\010\013zHR\274A\262\210\037\0333\300\014\000\233\240\270\323Kk\307\327\006\3274\337y\006\266\322$ \211\225\265\332\372Y\336N\367\033\037!\027\247\032\300\231\315!q\304\267\256\377\241y<\210w\013\304\260|@7\246\237\257\001\"\026\366\227>\344\305G\236\n\326\315Z\2561\234m}e\211\353\313\027\314\007aY\220m\353\362Q=\227~\007\220\342\"]t\020j1\2637'Oo~v\002\350a\200\325i\242e\036\374\014\035{\255A\270\346k\022\362(\354\364Q\343g\272\222\276\263.w\346(\227R\231\2700\352bH\004\364'\360T\304IBN\013\006\361(n7O\302!\271\371\361'\177~\275k\337\341\372)\230\321;\217\264\034$K4\245Bv\233\037%X\006\302\201w\360\252\226.\305`\2512@<\377\235\257\3333|\347\213T\377 \367R\343o\254\3677h\302\303\311l_\257p\235\271F7\220\273o\340\232\033\345\t\271\312L\242@\360\356\372\017\033\337>\374\366\217\311?\000\363\342\316\333\2631i\014\r\357\207\037cl\\V.\203&\232\177C\t\004nB\024\321\3415\327\361O\t\035""\355\346\300\031\222P\036\354\252\177\004U\323\367[T\216w\017\251GD\000\337i%P\326\226\301D\002\004\222\0215\207\327\376\2766\214\033\362\223\326',\271\375\031\030\234\024\322a\251\t<]dI\361\356\267+\260\273PW\200\356e\033\307\003Pj\201 \315\215\276\356\361\352\335\365\357\340|\272\333\274\nY\347\202Y\227\240O\343r\232}\033\314\234\202\246\000\003A\326wQU\336\221\014FU(H\271\327\274\215\342^H\277\240\323\373Y\226\263\336e\244\242\026@\265\371\r^J2\202\275\244)\257\275c\033\373\036\222D\345\377Z\037\363\014j\214\273y\3503\221\014\3639\253\204\205\273\200\022\371\363\312n\272\357\224\233*\274\302\357\305\0130\244d\274\007\237>\240\3757\\\337M\2522\223L*\314\242\306\311;\255wz\231bD\232ey-\3050\202\302\340\023\310\306\000\031\334\352\242\251E\001\322\017\264\370FU\3377\357\030\362\214\317['\230JP\254E\036A\350w%\312<\3172\271\317ZG\370&\026\251\350n\202\212=k\223\3148\335i\276\336\344!\023\006\006>\357\310\332\1776\256\242p\377a\312Z\346\031S\254\20081\337\270\203_-4\3665\273\036\231R\334\203(\310=S\2574>\004h\377e\375\215\215\224!\306\375\235\304\245\007S\353{\326\247\201\251}\373\341\327\177\320\226\302\032o!\266\302++\370\231\342\323\037\221\030\262\243\253\320\345\323k\205\215\343Z\310\370\350C\026\024\2446?\374\230\3267eU\203\242\305\003\214\342\277\305\023+0\306\373\250\316\205\007\032I\361\214\201\356\336\334\203\223um\035Q\365\265\335\352\0000\273v\221Wg\007\032\233D\325\211\235^\250\037\343\367\325\217\021\373\261\365)\261\307\222{\300\\Z\324\222\201\205\245\273\t\325\305\372R\353\3777\367%\rMe[\333\004B\247\240\t\206V\032C\253\202ZQPl)\024\333\322\272\"\330{U\020lJ\313\272(\212\226ZUC\206\031f\230a\206g\230a\206\014\3170\303\374\004\177\302\273\236g\355}\232\320\224\336\357\255\357\373&lrrr\232\335\254\275\232g=\253K\025\010\353^\2008\223^\220!\302\264nP-\201C\376\216aFx\344\340\034\232\013\\\246\217\032\315\244\325\225Z*\352G\334a\"\345\302!q\200V\364\355\254\016\334I\335\350\007\231>\223*\341u\020\236e\247u\326\375)\333\330\n7\251\006\300\250\260\346\314""\363-\351\246]\213w\303\231\357ee\305h\302cc\235uv9?\345\227\274M<\324\245\275\025\215?\270\207\316\026\016\254-\271\327\021u\250\207\257\260\213\021\340\206\236\314\222\247\374$u\337\352C4\262]\325\010\352@\035\220K\305\204\334\312\035T\247XME\323\256\362\343s\337yS_\226\030\200TI\264\221\323\271\010C\355\376}\335}\200\037%\372\271\211\257?:\031@[L\226\372O\344\2230\035\376\267\365\211\224\323\354\314Y}\002@\314\013\371\276<\274W\233\251\025\354\213>jL\203\"/\334\037\256\254\365\257\331\025\360\002\263\315\023\311g\020f\377K\337CU|\354\335\242\242V\245S2\373\215\007sY\366\357\213\334o\353\tbj\316?/\310\214\362\034\220\010\273]\310\365\303\227%\367\334\001\275\213`\024Y\353\345\247<w\346\354\324\335\001\010\314i\216\202\257\252\377$\235\2623\277\024\354\330\215O\274*s\274\247\020\t\352\207\006\355U\334\003\260\314\325\210\272\363\2062\315\304u\254\004\224\030_\313F\270\026=_\017\377\036\340zt\307\252\331r\236:\350\271\200\021\254\006M\253\014\352l\266\025\343\027\270bP\207\217k\264\201p\265\346\254\277z[\334\026\304<SX`\037h\313\3060 \242\201\300\223\362\026\":\241\033\266\275S\004\017W\207\225\030\214a\332cjN?\225y\230\350\021e\374\254\2109\371G\304J\233\r4\224\030\247\304@\"8\230\310\336\316\235\227\325z\316y\003\271\332&/2\203A\207\367\347\035M\201\030\320\203\223\362\330\300`FJ\346#\356q\316\2002\021\341\030+DJ\366\001a\326\365\273}p|\307\020H<\016/^\251\241/;\201x\"\\B\227s3\230\347f\256B\362\316\225\351K\211\212\372\335D\312\326u\030\207\315\352'\240\212D\244\027\375\241j\203\000\312n#\274\222\312.F\353\271\354c\210?7\2108R\341\212e\312\240\356\031\304H\212\t\271/`y/\013\255k\333\335\231\331\222\271N\304^!\364\213\337D\211\025\231r\227\366\325\366\265\224}l\367\020\242p&\272\3005\255O\356\273\216\023\210[1x\0257\350\350\357r\362N\026\017\036\222\335\256C\335v[\371ye\236C\336\027\2730\313\037W\022\252\r?!\343F\365n\022\246\021&\210\333\266W\226kG~\274\220RC!E\025j@\2566 \343\337^\030Z\213\027\307\177T\247\372\221\364+N\230c\220\006_\333dH\263\247\235:\250\266""\220\236\035&\272\235\342c\367\311\346\032Q\253p\210@\220\032\"\222M\217\214 0\030)\206\273\242\244\241\216b\227\"\225w\346\351\013\357\000\000n\207\273\243G#\021;V\177\313L\333\313\310]\t\007\302?t\362\240\033\027\334\303\300o\262\247\000\214\364\372\204n3\203\t\216\303\343\220\276\231\351\227e\337/\333\323-g\324y\217 \200\225\216\030\003X\\Fy\010\333\000v7\242\340\302\242\232\304:\251\023+\350\224\263\244\333\370|f\207\350f\365\371D\376F\376]\201\261wb\340\000\340\210l&\223\2776! \267=\223\302l\234.z\232+\215co\343T\305\210\273\201\252}\325\364\215 \270\243\222\202@)\205\3540\342*by\014\356h\373\323W0\253\024Xv\223\302\242?7\027\372)\001k\035\214R4\210,h\306;7\256\336u[\020s\243\357\360\241\367&M\351a\267\013^\"\314\033|\177I\024O\033\235&\346\317\237\213\3560z\365Cd\343\351\330H\017\020,\376\224\021\271pI6\210\234\014O\315\351bK_\366\260,\277g\316\203B\307Z\252lj\256b{\351W7\345\215\32572\320g\323O\020\275\262r\370\221\007Y\350E\032\200\006\236F3o\334\244,\337\202n\214|9\271N\3677]'A\303kT\266\017Y\245\356\250z\205\202\233\223(`\004E&\r\356c\007\274\251\262e\301\213\201\035\375>\325G\206\270\210n\240\"F\263\035\301^\005N\231X\233\314\363\364#\016w'\260\357\371\220z\241ZL\371\257\276eu\014\273\007&\340A\333\354\032\333\266\270\306A\370\236\352bj\255\235t\017jJF\314n\270\330\351\244\031\032u\376%R\346j\245\365G\020)\010\177\372[\206\233\241\010h\000\314\237\340\273\022E\317V9u\332\237\025\245\272\335\356n\235l\027!\273\212#\0070\275\271\343A\037\201\3545\333)\024\361\244\211~\207\035\003\330\254\352\211 4\033\352\333\254\372C\373D\254U\313J\377E&\355\321ceK\264\333\200\"\366\320%l\327%\025\255]\351\t\rw|\310/\005\034\213W\260\3209\035\240\n\317Q\221\222a\036\315|\306\246d\207:|I\215\255nzI\3505\361\220\263\263\373;\256\241\026\316}\357\032v\307\200\274\341CZ\037\374\023\271T\002\0333\021\027\033\235\261Ht\233\371\266\267\017>\327\206\315\275\366\210(s\366\272\003'\350i\035 \2525\244\236\351-\240\240P\032\000,\242\242\nq\247\251\\Un\3349F\344mz\311\300\021\375\016Eg""\006\003\230\207)\341\347D\251i\311.Kg\277u\206\200\036/\244\314\023\003\001oNn\313D\031\310\344>\277\233\031\025\373dOx#j\354\\I\277=h\364\206\362o\215\233\316\372\242h\\\215\313\256\230\310[\r\300\373\316(\202\201#F\316\323{Q\002,\246\223\232Ug\356~\276:?\355I<\034\266\216\201\227\330\rv\256~\244Z\025O\020\201\004DT\242[\255\304R\302\344\032\025\207~p\032\362g\363s\262zeR'ee7\366P\2704A\025A\350\332\300\222,\036\255\232\220\242\024{W\266\225\207\262\302\246\234Zg9/+L=!*\353\212-0\214\022\271\333\316\325Bt\235\264\213\231\210\017@\007\017\245\333\337\020\017`\006\331\355\003\304\335\353\002`\260\320\251\006\002\244n\270\177;\375\316|\276F\372\326\034x\310\316n\311/\005\177f\202\226\\Q\311\336\257\373u,\361:\357UH\233u\031k\321\254\236\314\244\215\336#\332\306YuL\223\\\314\346\007\004R\242\203\256/\206\347\33325n\267l`\370O\203g&\353J-!\023B\360\247\337\n\002\027\264\247\314\223<\223I\333\230\013\272\031u^\334\026\205\240g\017\276\n\032\231\273\322g\334\344I\350\315\306\330(\251\336\363\201~K\035|+\205:\364\026\037\024K\340\257\366b\254I\244\335hz\305\355\206~\361N\304\243\361\200-\2530\\\246\227\225\032\213\346\220\031l\005\"\304*_f3\255\262\322\316r\305>u\316\213\212+#\034P\302\033\214R\322\347u\262\333i\020\024\205$\302\362-n\017\266\317*\031\263w\371\237\n\276\231\326/j\370QcK\212\254h\251\210\305}\035gPT\330\333\271\2532\353\321;v\364n\2707f\334\031\204\305\335;w5a\345\274\r\026\375}\224\020n\021\242\245\3300\251\005;\017&\361\331\364\363\314<P\032\352.\001\304\335\373G6\254&\365\262d\316\253i\026/\0175R\222\005\203\212\207E\264\264\311\256\267>\254\370\177\347U\203\001\321s\"\005\210\317lJ\367\246/\311\304\233\021\203\2106\347f\017-\323\262x\210\371j\201\347\336?\\\366\334\003p;{\317;L\341 {\310\1771,q\357IW\010\373\254q~\205M\363\315}J\204\271\273\243\227\333\326 \342\250\255m\204|Z\340-V\301Quq\312\366\007\251\203W\324\010\273M\277 \374VVV\014r\363C\366}\356\201,\315{\205%sI\334c\375\365\212\241_\352n\333\"\352Or\200\036\371N\354H\177 \341,7\006\037\232\033""\025\301-\246\222\367\264*\246L\300S\004S\300i\006\363\372\202,+\240c\254\311\2177\277Ix\273\343\373A\237\312\220\322\347P\252\203tX\311-\332X+\261\034\355n;m\213\022m\3077\271\335b\312\003\330\0058\227\333\003\370\330H\376\211t\353\341#\236o\246]\326\346<\224\241\240\224\2163\233g\333vB\003\220\250\220=*\257\n\343^s*\324\351\2220\332\205{\354\"\226\272\310\344Aw\360\004\274\024\310\030\322\360mB\035\241\300\024k\n\216\277W\214|\327\025\000\244>^\010;\0177x\0068\304p\263G\205\311\200~~R\0031\177w\373\362\037S[r\007\240@},\204\177-c\231\010\213\357\243\316b^cl&+\272N\277lX\275b\020\304v\1778\226\036\024\235\224Hf#D\2617\264\212\360O1\247\232\203\005\037\355.\347J\376Ya\332w2`m\254\323I\007\334~\356F\000\331>0\217\327\026<\014\333\3726!B\330|a\221l\372]\350w\315\\\221Di\354\0030f9\242VJ*3%\363\264\023\376\315N\000\204;\271\000\364\234\337\267>\247{\237\273\217\031\004#\014\202\305\340\310\026\305\003\342\345\246\010\203j\261kN!\3771\211`9^.\221>\345\366\340\027\r1\2233V\267S\303\231\201\341\245\361g\262q\260\022&2I5eN\271\255\020\033X$\313\371#yx\326\335\235\203\210\023\366\271}&\202o2\330\255\371/*\014\r\255\340^8\267\231\327r\267\037\305*\205\177\256a\005\240\031\366\034\312}\321\336%d\032=\022k\317\364\210:{$\367\202Y\311\362j\r\330\302\023\351)\272\236j\262/\260\326\240\031\035\245c\364|\256\215zT\352\030\222R\345B\007\221\264\215y\211\216\3741\034\\\200,\271H\213\307n\362E\332V\r\300\226\002\244\200@\310]\347i\376B!\t\\5\322\347\332s\003r\307\007\205x\310O\320\021\364\005\\\315G\374x\032p\\\276kS\272\017\235\377\024\"\\a\006pH\357\0335a\250\261\265Hq\337~E\233yJt\261\037\212B\035\022-\212?\234\024M%\350%\t\034\336\314]b\272\371\001\001\002\010\345\364\246\234.d\020\250jo\031\010(\346dy\232\323\316\006\375\313\203\\\302V\340 \362\350\241\274\02048\rG\344\026K\271\216\256\014\231\250\337\357\202B\312\364Q\321\220gi\2340C\274\235\261\364\250\014us\356\231\254\202\321\374R\300DaV\301\372\033\377\235e^\332\360\356M@\010O\222\233\300\273-<\367\355\371\301\240\276\267Y""\367t#\035\311\270\014JT\177\307m\262=\363\301\312F\350>A\324x\313\344\017P\237\362j\204\250\373\243.\023\315\234E\204\211\341\234\220A\272s\365\013D\210\377o\003T\016\023\212\350\227\007ntfE,\364\357\3155\000]\342\237\327\230\233\225\231\260PH\252\261s\310=x\2760\273\246r\303m\023\325Eu\331\215\216\027O\235.vu\177=\263\021\036\215\343\320\236i\n\275\255\005\003\244\376VA\003>~\0331>\027\020\316\206\347;)g\334\312\245<\255\n\323|Y\363\322\363\313pG\025\t\264\231\243\252/*\267\364\223\217\270\243\343M6\210Ig\272dN\373\250\233Jf\213S4\335\370-\007\275:\033F\177l\375=B\026\252Q\336\224\225T\243p\032U\216\016\247\357\320\035\000\025a\031\026zX\233\233\222\345\177\350\0306\320\342!\000#\326)\233'OiJ\364\177\215\000L\372\352\356]\346\325l\000\006,1z8\030\310\204\330\024 x\2670\267\221\3369\022\0003\036r\342\341\331\312\274\032\371g\344\000\221\031\326\307\t\023\373\245\233\204sA\261\320\364y\307\365\374}\034-\002\023\024\2227\240\241he\251`\374\373/\202\326{\301i\340\036\270 \317%Z\337\247\\\322\035>[P|\346\352i\023\243\031\315~q\256\025\342\201$:\343t\372\3259\221\277\277\026\t\345J\324\201\026eR3lS\"vG\262\314Jx\277z\233A\255\351\242\206\246\351\221\003K\0042\237\370\276Gd#]\312\327\346?\255\r\271\3237J\341C\377GW\336\227K\020\251w\277P[\260\240Z{$\242+\331\304M\r<\216\301\225\372x:\232\276\254\341\226w\351+\300\r\351h\\\206\363[5\010\023\225\007,\316\252\377\352I\233R\004\017\323\032\313\034\251\006\301\"2s8\227\262h3d\360\014 \224\204'X\316\034\006u\207z\235\314-\324\376^\316\034CZ\232\221S\227E\032\231gRp\200\273sX\024\206\337\255#\244A\357\344\321p\300koB\231\200\377A<\276\3141Q\255\305m\206\0279\326\305\340\"\366\262E\231V\326\203\rc\265D\023~w\326x%R\201\333\262Q\335\317\274[g\346_\314\242\351w\274\035\315#S\220\036\350Z\377\365\376\255\277\256\013P1t\230\324\252\242\247E\027c\007r\267\234\211\302A\367z\270\267\367\004\272\257/}\003T'O\270\272<T\3231\261\2504\356t\306>\275uW\354b\032\331 \"\034\252\027F2m\350\t\027H\023Xd\001\346\031\203\376Q\007K\202\263\241\333""\241\033\354\013\363\226\240\177F\024\364\344\217\226\010\375F\204\237\242\034\310&g,_\t\357e\350\271\313\241 #e\337\\4\310\305\272\262\343\227\025Y\255\020\303\r\216\327m\202\324\372q3\010W\347\246h\261\246\255\300)M[ \311b[|\227\360\276k\\}`y\003\210*\314<\005T\247\354\347p\271\365g\346e\037\237\014\257\207\236\314r\366\270\335\334\033|v\203I\221\377\347E\364\235\313\275Y7,\036\367\201\230\270\223FD\320\027q-\023\367\240\2012CH\262`\002\270 \266\030\025\243\270\205\026\215r\003y.\305\222\221\301\311\365_\0257\370\312\370v\275O\313\351T\331\347c\314\241/?\210\036 =\220~\3613\262\030\353\025\375\372);b\335v\305\2351=\266\314PA\312\366X\370\364\003\304\207\350\251\251\300\t\333\255\017|\324m\205\311\2374.\357\222\177\002\360\237\310\2146\220\242c\331\244\315R]a\346\275\201i4\332\363a\022<\241\253\340\211H\345[\"wz\007\275\177\031\203\233\323\031\222\014<G\240W\274\317\343\"6\357d\247\313\216\236\022\371\325\226\213\207\216\252\327i\231\201\201\023\327\335\353\367\335\373\017\276>\250\254h\354u\2230\227\343e\250i\005K\267Rm\371V\210{/\202\217!\210\373\323\3749\321k\243\205\213kG\326\346\326\226\335\231{\356\275\373\001\030u/\363],\330\275f=0~S`\376?\365\016C0\216\277\353\035\206\260\215|\377;\270\321\311B\017\340R\013\225\001\270\242\331\266\302\\R\255iC\347tX\r\302\026\"2\366\035eXM\354\302\253\005\253\310'\201\274\205\327\355D~\2700\375\365\0172rm\361\336\r\230\030\255\352%\323x\036\336\353 \003\217\305\004r\315\026r\373\235\311\022\317\003:\311;O6\361v\360\313\341\364\334K\3513\236\375\n\264i[ O:\351\005\245\n\352\266\214\347\215 ;j\245\001\203\222\235tu4t\321;\301T\253i\250z\243\031n.\237\031\255\264Vi\247\206'-\335\230\216;Q\003/0\327aV\233\340D\221\261\013,\307}\3529\017\000\005lz;\260;\324\220\231\302\256\362\226\236\000\267\005N\016\365+\300\273\337J\212\241\\\304;T2:\360\254\331\205\273\241J\205R\3664c\350\231\032\021\255\nb\206\340\030PcDCt\215\tb\207\316*\204\223\301ZQ\2015\201\320\304\257<\007J\207}\356\242\302>\230<5\224\375Dl\257u\250(\217\337\003\373""\276o\t\247\250\316L[\200D5\275\364\251\037\025{\203\256:c\336\340DE}\213\205\370\370\230\352zb5\202\372F\233?\242\364\324\231\000c\304:\347T\324\3057\311>\250+K[\300\330\327\272C\352+0\001\347\t`\321\303\320\315\270\006?\317*B\035\300\326\0040\305\242\331\345\372\350\026\217\265\002\340\233\235\016d?\354\322M\311\336\371D\331\235;2\375\032\350\341\242\370,r5|\317\022\271\221\216)*'p\321Qx\2653>\032\223\260\355\020A\034\322\217\225]$mx,\324s\325\231\331\024\275\327IB\203)g\033\214?\235\246me\010\322\240\261\377LG\t\373\306\"\023*\007\0250d\317\221~\t\276\372\236\220\177\253;\363\234\242\016>&\276X=\272\243;\363[\356\216\363\020\316\246\2225\250\217\32101i\005\177\310\\o\242.i\210L\306\221\210\340\031\337?\220\237Q\254\314TfJ\235\300\267\363\036\340\206\367\265\341X$\367\334C:c[f{v<7\356\350T\307\306\020\376n\002DX\252\017\352\343\377\212\274\n8\223\032d\223\007sG\223{\016\262Y_\003\304\221\362\355\316\334g\360\270x/\021\327\367\210\232\354L\330\240\026\246\274+wQY\365\302~\351\177\346f-\271\025fs\006\315\336\375\303$\350PL\307\333\364\336Lof2\020\220\224\336;\274z\223\251&\317I\334\023\304I\032\353^\327\037\227\202\207C\262\310\215\223&Yc\006!\255\334\222\221\345\305f\317\255Ql\306.\272K\236v\246PS\230+\000\026\320\030\343\363y\027S\256\262J&`\355\312^\201\003\320y\227\237T\\\355\234\025f\001\217@\213\342\226\237h*V%\222$e\355 T\314\330\325Q\033\rS\314\032\370\005\221\317,j\332\030\247P\017|\256=\303 \256q\226\245\343\247\361\365+\231v\343b<\340a\317\303\203+\322P\223\333f\305`\001\237\325\n3en\346\367\026\372\013\236I\265\027k\355\220|\217\3567``\223\200n\204+\367\253\347 \313\241>A\t\345G\340\325f\0354p\246\362\343\340@4\276\24111\243\317Y\177I\262\014+\215\337\021.%\353\346v~\252P\251\371\266\344\236{J+\332$\000%C\370\251\246u7\334\353\364jjh\030\271\244\035yG\303\371\2453\017\335\207\217\220\217\331\231\031\313\356\200\223n\032\t\201\262\000\017\346\346\002Z\303#\353\365\333\261:\247\363\276\311\343\270\212\223\306\"\005\035j0C\344\340Sc%w\231$\342\362\374\371}""\005\233]X2\027<\265.\227L\345\351\001\3220]4\330y\223\266\002\021\n\342J\354\272`H\303\340\334\313\221Id\202\010\247\016\252\0001\220c\315i~\n\366u\340#\232\235yYoS\205H\321\207=\3337Y\207\002\275V\240\312h\334\215\263\204\355.\371\350\215\0232Q\2320\017\201IDh\017\306\032\314\326Q\006t\022J\253u\201\020c\363\266{A\223\266\207d{1cU\355\207-V\354\005\024\nH\353^\366\373F'\3663\276Qv\"@\326\177\346\347\200<mlK\277\307\326\212$\226\rA[L`P\367\004\025\231\235&Fn\341\314\200-\377)s\253=\t\243\036\300\376N\221\317\027\224J\341w\021\347\023H\245+\231\245\036\325\324-:\272\217\301S\203\355\250L\237\353\250h<\340\216L\270\023s\356\334<\344\365%\331\300+M\010\241\341\260{\370\274{\376\261\373X\276]t\027\237\206D\340-.\351\245P\302agEc\217\267\013C%3\336%\267o\014\373G\376\016\3401C\312\034\253\013\325\300X\375\306\335\261\007dxL\031\223\017\314W\240\247\217\216<\017a\304\233\366g\347\262\313\320\006M\030\\iA=\2225N\014\004\221\252\271\ty\364\222o\305\352\\\314\036\201k47\255\232\350\266b\303\240\214\336A\356\201\270\257}\243\215\276c\264\200h>\344\236{\337\354\\}O*\026;\261\027DT~\262\226\344\202\310\325\333\264#m\020\217a\004\340\037\027\364\234o\010\342\025\353,\257\003_fuR\251\203&\325\371\260\023\3144&\036#r\032\214*\315\324% \220\346\235*\346\031\211\326\330#:\307\035\217>\000\260\306Ye\2016\362,R\004\007\262\002\326\333DX\021\362n\345\031\027I[{\261\265\255\270w\037\310\222\006\207\360w`\260\330\325\215\277\311\336bKk\261\273\247\330\263\007\307\333;\212\007\016~}\036%1\n\001\254\300C[d+\335O\374oO6bx\222\371_<m8\226I\207\002M\253\330 \352\272\252\247'\251\322m\027\013\n\340\232b\317H\316h\242\203\212\245{^XXKz\323\362p\366\276S\351\034\342&s\242l\007\377\022H\315T\351\336\020:#\001z\332\020\266p\333V\337\273\025{\260\350\340\220\252n\317\324\231(Y\024g_\201s\222$s!r)\365\220\277\216x\316\\\315\277\252\316\032\377\274\341V\371h\023\017<\363\255d8\306\232\350\301iu\310\240\362\336,85k\211K\353PQ\027zG\231*1C\310\250K\3262\326\205\331$Dws\273\210YV\021\334\315d\002\210""\312\341q5\177|\030\247\342u\r**f\303]1\213\317\352\010\002\241d!\366\271}X\3374\3244\245\200Ri\331\262 y\376$2h\031\377\r\204\372]k\376A\240W1\0022\027\370W3\301\316z\331q\273\351\317\333\340\001\214\205\273\354\034\005\314\240\020\337\370\376\320\331C\277\\\311\277\\\213\0070\\\000\313\323gh\177\320\353u&z\244\351\0332\265\360\214\305Dov\2104z\241\303\242\275\247\212cG\213e\231Z\201\033$\2765+\013\262f\375M\002\307C\341\033x\305u\274\033H4\035\327\010\314C\022T\005g\214Q\256\374\0001\363X7\217\021#:\337\313>\225k\327\211\006\324'\035x\224\n\353\275\302\233\265V\337\027\256\211\322 4?t\034\300\247 \376\206\246\262(\000\213 \235\316\233\205\304PKM\220hQg\017\310\315tl\316@y\004\303\207\257D\200,\3418\265\3450]\302\251o<U\363s[\014\0250\304.B1u\331Z\362\240\230\217\326\265\323\223\361B%\360\312\354E\254@u\332\030\\\311n\202C\251f\26792\250\344\000\020\241\335zp\204.l\340\225\233\341<\322\261\212\321\354o\315\231\240/\275\214\260\262b\353\374\317MzPm^@L\222\224i<8F\217\210\275\304\030\303#\376WV\331To\217b\271Zl&\364>\233\007\247\276\232>\372'\022\372\3558\365L\360\336!\220\177Cm\200\374\234\177\302q\270\213\010o\361\016\\0\343\340\035\270\310l8%H\301M\334]H\313\374Wa\324\275\370\310}\364Xm\342\0303\337\365R{\365\343)%\013>f\370W\352\364\350\t>\337\031sJ\346\017K\211\241+^\317\270\001\257\201\306\200\302\007\352l\242\367\242&\324\253\256M\340\216:\367z\324\360\330\324g\257\207\037f\307d\013;Bew\322?\374\357\354@\366\223\323\307~J\351\341\367i\363\263\225\364\234\375g!3b\000\266|\234\025J\274\263\212\333\007\017\336_&\033v9\223\n\374+\335\250\211\031I\377\3401\212\261Ye\272\361\017\237\206\002\250\037?f\242\231\340\277\231\351\340\207\333\246\017\350\2169%{\0220B\257\344\rf\362\021\037\226\314u\331\005\020u\261\023p\233\007\371x9\272\341#\003\311\375\372Z\366\300\277\304$\370\014\354\207\035\322\2174\237f\324\217\245\262\335\036\234\315\266cw\3225\331o\331\357\366\2513_\375\245\357\210\355\300DR\333\235\321\3051\017\354d\022\211\323wL$s>b\2470\235 do\222\303\013\201T""\355\247\331\311\2152\016\003P\306n\315c\255I\277\222\241\005\273^\014\214N\317\334\001\245\203\263h\357\016&\214\035g\036\r\335&\323 \220Je/\313g\317\236\031E\256\342\356\314\004\262\224roE\200\374JXD8\327\321@\350&\350\363\006\242\353[2\271\377\037\277\223\177\233C\010\004\347\237\250\343}\355\306\332\322\177\371Bo\376\177\316\374\227\307\253d\226\240\261\364\254\247\364\250\272\350\231pI\177wI\376\257\301\200\224<\307\320\013\355\360v>\272\371\035\344\371\274\230mX=\375p\346kV\310\007\021\274\361b\340\234'\324\027\227\215\341F\207(^\022\234n\374-\3708_\003\240\262\346\375\314\360\312\213\270/\311\037\245\260\271\223\273!\252\323ag\032\352\371\220\\s\\T\262f\307x\217\017C\205eT\031\\\275^b\204\274\364\362?\313q\340F\017\270\007\220v\272'\351EF\033\r\360DZ\356\277L\0024\006\205\341vG\261\000w\370\234{\016v\356\327K\225~T\337\247F\252k\017\006\360\251\357 l\362T\266\240\343$r\271\006\244z\220\345w\277\273\037\000\232\241\037\013\340\376l<e\260\2720\350\r\022B\265\202A\203\214\0302x/\320\177\033%\206\336W\254\242~\313\374\230\236\266\334\217&\256/j\317T\004\234\326\355\340\023\313\245J\321\306\325\207\242^,\346Re\224\314\025\347\013\323tN\356\361\0003A\360\014|0\017\341\273U\202\301:2r\262\000\302)\004\\\241w]\243\263\310'\014\005h/E\3167\332b{\2178'\304\276\237Y\213\224\363\347\"\315\377Be\031\245\307S&X\033\242\2437\306\2453\247\371\213\363\006\365\311b\013\260\375\rC\350\"\347\242\317\tz!\223\264r\333\3323D[\354\266$\363E\245\300\2465o\325\304\304F\337\367(!8\276\217\205\276\217\245#Z.\210\226\034\317^\2654\372$HV\217I-\000}\356\310Ok\343\356\314,z\r+yJ\314%\244\223\326\223&\017\234\013\244\217\235[\375\214H\n\263\004\3734\201\255\204\377\367\220o\223\214u\313\253\232\350\213i\335\247\014\310\354IL\246K\021\253\221\370\376\373f\002_\345\341\257\204\250b\202\374\373}\312\364\335\231\271\212\312GN\334N\217\273Ly\212Bg\356\262\367\251hM\177&\233\356\225\250\335F\207\350\226\275M\306IElI\317\370D\301-J\353\374\t\370&\221O\267D\343\002\233\326\020\014I\177\250\274\024}""\337#\356\377\346\266s\211\211\336\3651-\001\242F\023\323\223z2\357\301Q(6.\306\t\374\207{sQwDft\201\325\030\266\273\273\217\347\343\356\tP\000\232_)\207\301\007\320s\301\007\336,\242^i\337u\366|\363=\316\000Bk\356!\232$\331\326\277\351\036\245z\365\342\244\302\357\250I\356\272\204\334\n\220\251^\r\022\207Z\022\320\215\262\235\213\235\275J\230\236\213\030\226P\233x\354Q\200b!\002.Y\nT\201B\301\224\3360\246hC\356\234JQ'^\302\355\023\250\214\223\314v\220+e\035\204\347\002\235\270\240tx\007\247\206\256\361\317\221\r\200>\027\020\313B\355\243\206\3145\250\306_\237V}\337\234R\306\301\026\366\036\240 I\310\363\277\231S\3667+\271\347\316\013\031?\177,,\037\0054H\360p\007rC7\370Y`\232l\3723o\006\205R\344\212\241\024\271\270\033\3575\334vx\311\032\006\320\276c\246\272\255\340z\205\316\372>?\275\345\323h8\373\226N;\013\nJy\325\323\032\265\230\316\317esng\232\225l\240\203\r\213\004\302|\352\201YT\004:\337\210.oFU\310\353}\375\271r\203*Vu\"\270l\272r\235\006\341W\020\352)E\0011k!\264\323\253wBb\031\226yj\313\307\203\334\232J\270~=8\231>\233\211\324\200,\242\323\371i\270A,5\217OJ\352\353\020\014\260\002\231z\336M\2464\255\031;o\223\346=\2273\364p\255\203\312+\352\234s>y\321?\360\0130==\363\326\0050\206\354\360\276\262Q\201\335\370DE5\212[\210\254M\362N\330\"jD\302\223b\335\324\362\331\266:L\376\323\0068\005\253Q\365\203\325\"\344]\351&\346\346$\357\354\356\303\213\355A\234\007\351\223\2778\326\027\232\314r\\\267\231d\314j\213\006\210+\270\\9k\025#b#\037\003\344 \263\014-\305\204f}\"|\337\313\215m\226\000\206&\024\351*<[\233q\257\303\210F\037}\021#\222t\276\226\352#\\'\353DvZ\003\252\307duO\226a\211\373\324\177i\371#\247\300vV*?\020\"\224\264\227\034\334\350\222@\010\314\020\375\023\014\363)\310Qi\360Y2d>\023\300\276\004\276&\227\213\257\031\352\215\036F\276\357N\335\320\265s\006G\252\037\236\033\207/W\266\275\356\203\357\274n\013\342\245\026\237\252\037\236\007\251\356D\223\315M\243\214\215U@e\026`~%\234\351\020^\267\316\344\255[\026\3311\272\251\244_E\213\324\2124\001\241\377Yu""\215 r\021i`+\240\002\305\371\247\276\343|L\325\301\r\245}\262\3309jWi\202\031e\200VN`\023\re\034\372q\320H\321\224Si\206\320\325\205\321d=K\373\021j\321\2656\"\002\306\255m\325$\304\266\314N\370\330\332l\261#l\031\003\351%\205S\207\370\006t.\3371\264\342\304$\217\031B\2330/\301\007g\031\236\206\222WDL\326\354^\024YbM\202\025[k b\226\034\342J\034[\321\302\306r~\355\024\010l\020\252\334\312\034\246\200n6\251\001\336\032ew\2150\317r\005\025\364B\246\017\326/,\224\230\235<-\242%\357\022\213\3312\037{\244K!\246\217\275\014\330z\020\221\210\014\316F\017\336\260z\216\311PG\025\230E6U\373`J\311^\376p\272\323^\312\030\0209\361P\204X#\0378\016R\n0]+CP\255( \000\036\267\266!\262\372\2145+\230\210\017\"%\240\211k\235\267\371^0m\033\327\000\310\340\317L\024\273\001x%EN)\360,}\362\223\001\246\354\004\236\210\373\262g\203(\303t7\203\307\336Z|\365\217\254\305\377lZ\260\245-\263\303D!\333\224\2736\374\303\337\377\366\207g\340\337.$\3152\336o\322e/\242\352\033\344?+M|\324\222b\364\245\377\305\332_5E\326#\003\351\\]=\311A:\225{\354OL#X\352\254\267\205snk!\204\227\030kQ\372\2506+\037\367\216\325YfAy\244\327@*\322\341\200\334\356(\300\240\355Z\354(\305e\261\033\250*u\265\363\247\003\331Yl[\263\356\344\r\367\306-\367\326\202\273\360\334}\376\311\375\364\347\327\212\212\037+g*\245\231\251\274\215\346v\345/h~\251|\215\346u\345\0274_*'\253\244\231\254\272\202\346J\325\317h~\256\372\005\315/U\257\321\274\256\372\204\346S\325\237h\376\254\272\032\225\346j\364:\232\353\321\007h\036D\037\243y\034}\213\346mt\005\315J\364\307j<D\365\024\232\251\352\253h\256V_Gs\275z\016\315\\\365\"\232\305\352\227h^V\377\206\346\267\352\017h>T\177F\363\271\372B\2154\027j\256\240\271R\263\200f\241\3469\232\3475\357\320\274\253\371\210\346c\315T-nT{\t\315\245\332\313\265\337\232\364\261\354\356>\230{\346\334\314\367\241#g\335\331\373\356\375\307\356\343'\356\223g\356\263\025w\345\017\274wd\n\3755Uy\021\315\305\312\237\320\374Ty\007\315\235\312Gh\036U.\240Y\250|\206\346Y\345K4/m?O\241\367\246\252.\243\271\\u\025""\315\325\252\353h\256W\315\243\231\257z\201\346\205\355\365%4KU\357\320\274\253\272\210.\275\030\375\031\315\317\321\03143\321[hnE\357\241\271\027\235G3\037}\201\346E\3645\232\327\321%4K\321wh\336EM\347\337Fs\273\372\001\232\007\325\217\320<\252~\202\346I\365/h~\251^B\263T\375\036\315\373\352\217h>V\177A\363\245\372\032\272\373Z\315,\232\331\232\273h\356\326<@\363\240\3461\232\3075\213h\026k^\241yU\263\204f\251f\031\315r\315\0074\037j&1L\223v\264\256\241\271V{\035\315\365\332Y4\263\265\217\321<\256}\206\346Y\355+4\257j\177C\363[\355[4ok\277\240\371R;U\207\336\255;_\347\347\357\034b\352\332\305\374IQ\260\246K\341#X}\340\373\354\022\223\250\215\200t\263\203}c\251\026\343y\361\312\265\204\335-\236\321v/\262\265\325\226I\246\343\"\250\"\177\261LSR\013!\307\341\360\320H\024w\021\277R\315\336\340\207\376\340\2073\301\017#\301\017m\301\017\235\324\361{\225\371\224)\306n\005\212\262\375`\r\302Au\017\215\201\213m8\227\362\322\366\310\214\243\260\254\252t\312 m\233\014\356KQ\241\201\363\202\005t?+\013\267!\310C\236\255\033=\230\233\0037O\01331\343Z\230\323\250\271\352v\372\005Dn\372hb(U\327\257n\263\250\222\337\225\327\315KS?B\265\226\261p\262\263\271\235\232_\020\215\251 OYe\202\365\247\250Q\375\224\023\025\007\025M\036\223\347\371\244\333\255d\311\323\201RIP-*\031\005\216\223\024e\310\035\272\266\306\255\227\226\244\272\372\212\026\031\"\333\206I\214\303\246\320\235\321\242\n\250\023\r\226\236\250\345\020\302\304@\035+\313\277\347\243\303\266\257+\342\242\330\202\004w\360\215+\263\370\252\323\005V\257\331N\307\177@\263\307+\356\017\370\374\312H\264<\273\305T\316\331a\300\340\276\357\023\023\000NO|\260\316\317\006\277\226uHkj\026u\365\235\332\275bj\0345\3730<\273\030\354u\031U\207\024;\030H\3751|\003:\350\261\212\352\335$\312\247c\370L~n\213\"@p\316>\317.\344z\335\021\"\032\260x\027\304\376z\2275\014;\320\024\335\304\021\022\352'\003\205\200.#\325\236\245\200\212\261d\2663\367o\226\254\331\240\036P'&\260\255\010t7;\267YE \334\312\020 \326\242\370\274\017\211,Y\242\\\256\026}""\307Sp\032\307\311\334\321\261\333\200'LF$W\004c\262\273\225\324D\005A;\325\225?\234ig\001\276\275B2Xj\034\235\324\260\301\324\362J\241}sMMSD\363\333\352f\376\257\025\314\304\227\255$\023\231\016\026\305\204'\364S6\211\320\343\220\226\241\363\013\304n\243\315\322D\312.S\356N#5b\360\037\024u\255\233\314\2155\341r\215p\370\211\021\032(B[V\245\034&=}>m\232pe\262<\2722\263d\006,i\276@Sz\220\0222GF\271N[\021>\020\345\204\363\374\\nI\3736\030\343\014\\}\307\352\"u{(\362zk\257d$\276R\326\263N\261<\222\316\021pyx\022\030\241\221\004r\234\254_\342\010\352\0275\272\215\032\353\2052\t\212\201n\331f&\311\002\217\036\340wn\205\310A\257\330\3457ox\350\"d\221\260\214;\301\332\210\r\250\010\270\221\016\362\315\306\265z4\313\303\303aS\n\246\371&*\252\267\313\330\324\233\272\234AC\257\037,\234;\310#\034\225\341\204\224\355\245m\252\232\261\227\346\027\374Q1jv`\0253\037\"\337!gP\013~\"g\313\360\256\030\227\221?\340A\217^5\231\033r\263njJs\340M\221?\304/\273-!\326\372c2\330XPm2\037.)\275A;`1t\347\301\202\210\255~\0201_\205\367\332\254\262=\346;\310\214\000\205\336\307\310a\312K\250\306<\337\007,\210\346\371j\332\334@\366w\247Cf\212\371\256\235\211\277\362aoZK\373\256FL\275C\310\310\267\331\341\334-B (\341e\315\276d\212\363sY3\273;M\245\260Au\354\260\034\031\002bG@<\217\035j\351\373\256UJ \222\312D\217\360\265d\360\237F\020\214\335\255\\|I\r\300x~L3\tYt\03464\266\322=\343`\244\303\241\201\354E\246#\362\"fR\233\245\334B<\236\254\250\272t$\224O\002\216\340\263\031\335Hm\275\257q\304k4\315\3757.\242\340\274\245Zf\221rQ\\yEK\330\242\224QM\372\t8Ql=b\374N\371a\367@\0039\356\216\202\312gx\314\035\273\264\026\3215\260'\363'Q\377K\032W\033\264\205\037\237j\205O\255G\276\235\201y\r\007\241D\347\356\334O\362\203m\020`\327\253\202\276\337=\345e\265\277\265\230\266)\212M>\271\266L$\344\305\t\3025\316e\337\231\274\016\262\222\335\244\022\333,\002\340\252\246\237-\331\260\332;\023\352\202`<\357\264\320WNi\327\234\236\333\\\226\322\373[\345\016\223\375\006k\375\274\333.F\272;.\375\025|\220\372\\\213""\365\321\303\215{\223H\301f\351\264\253\205H@\262~\323\275Nkf\035\357\205\232\303\300\333~\347\275Z\025(\036\310\003diD\013\245\030\324\224'\237\310V6\345\016u\332d\025F\334I\n\021\304^\3409\360\325\251yE\373\372\2549\352[\025\231\037o\023!\375>{\313\240\211O#\305\004@\204\026\255T\342=\210B\300n(\204\301K`Y\266\350\006\317Y\353\003\014\264\274\211Ig\221\315\331d\344\216g\224\347V)pj\362OE\374\355\240\347\017\236\317\342\016\2505puC01\345BkX\202\370o\257\241\026\031tv\242\376n\251\261\225t\375A: \315O\264\315.\212\253>R\007\333\302l\355P\013\300\006\030\003\224\035l\344\320^\030AxJ\327(\344O\027\206G\213\264\336%\003\001x\032\213\273\022\3500\350\033\210E$:\271\311\212D\363w\246b\033-\004\271E\373^$\375Au\001\301\036EW\2733\002\306\307f\010\253\t\344A\243\237;\263wD\306\235\000\t\232\346s\306\025*\362{\256\325\375\001[C\002n\237\017\366%\247\270\364\0244\254O\236\350$\302\352Wg\2420(\223[.\211T\305\337H\010u\232T7\007!\377b\306\3473.\232tK\376\3175\304\226mR\014.\312\024\013%\315)\306\000\2508J\236\312\301<\253y\317\210\351rH\364\256\201\334\027b\311\367\353v\003\272\206!:\010o\361\262\030\224`\221\372\356\314\027pz\234\316[3\266\233)P\026\307\341\331~\236\305\240\244F\2503\036.\233\245\220\271\333\204\246\235\207\275\3677\027*\306\224\277\363\236C\202!pq703\301\300\201G\031y\234\022\201/\375^\030-,\3312\201\306\240\236\240\227\322|\324\372?\243d\253R\003$x\367\200\t\333\210\336O@\237\317\376)[\024\374\250v\366C\221N\230Z\312`s\031RhM\\_\226\371\037\346:\020\256W\350C\034s\252\235\331|\"\377`m\327\332d\311+\305\034\370yy\027\275\201\016(\306,\242\263\242\307\274t\272\335\211iw\372F\300h\013\36284B\r,v\364f\367\201\327{\335/b\177wj~i=M\203\177\372 \370\255l\335\334\223\364j\037\327@\306`\366\265;\212\"\200{/\024Xo\226\360{\267\305V\357\262Y\210hiZH\213\204\263o\304\317@s{\235\017T+\201j\333\231IY\203es\326\322\237P*\003\245\0325\353\3702\363z\022\331\007\314\2454d\344\333d\261a\233\252\314\373\302\r\232\025\315j\013=l\316>\263=PV\321\344*\211\310\206\234\270}J\261""\034\266~\270\t\223\347~\222\3453\027\334\205\305\177\352\351\024\321\360\321\251\345\010\273\203g\362\257\327\024\355T\334\267\037Tv\3768\321\336\r\014\024\"B\337;N\352\351\337(\247\242\334\3735\230\375\315\231F\231\271F\273\342\312\351\273\311\"6\301\233\205\245\t\375^\226\030\214\206\225\357\217P\r\351%\211\214\017\332\202\360\365\036\324\206\n8d\343y\024\202Pha\263\301*\331g:\350\261\2275*\364n\\&9Ik\234\263`\264\224\036\301}cX\240\240\336-\005XK\226EK\277\301\322Y=\356\245;\356\035dk\271\025H&\300\225\305:o\323\272\023Z\252\273\236)\231\250K\335\220\237t+`\374\036\335\312\336\3574\211\357\303\300\372;I7*\033.1\002\211\r\370B\375dr\203\210\rF<d\t\"\352gb\363\227l\032\337\033\321=\016\203$\376/Q\363\250@\377\340l\317\237,\274\024\361Q\214\302Vl#P\202Z!r\375\353\250\025\235Uv\034\r\244o\370\303q\303>\346\377\020\033\327I\347uar\213\237a&\336Qk\316\373\035\202\226cW\326\016\002\306\2473\t\335\266G\375*\226/e\226$\3407\2207T*?&\203\023\372\215!1\364N\003\347=\250\234\033e\343[w\260\276\020\337\362\307,c\023\274g\013H\255\267\376\311\256\3545'^\n~\276\014S\025C\324\302P\024\342\311wX\350\241!\231\355q*\235\001\200\316K\314R\3663j\347E\327\252vn\346\007\362o\013\003\005Cp\016\273z\365\024ALv\314{\365]\236\003\213\353]\243Q\213\246h=\224\267\360c\331bq\225\"\330\232\034\026\271L\240\340\366\346W)\225_\2457w\211\234p\357\ng\013s[] 4\365\364\214~\".d\266z?\350\003\270cJ\004\234\241\372[\377\203\340\252E\3523P\030\225\3348\367\035w\217\243V\320\"\311\212Q\2737\274\223\007\237\255\243\242Qn5&\333t[!\201\034\336>\260\300\236u\026\021t\206\016N~e\225\355o\214\377)\344\363\036\347\262}.\272w$\340\375\326\243\277\022\215\273\341Q\246\200\303\373\215\307\377$\032\356=\321\246+\235\2752\240\344\300|\223n\025\215\r\026\264\277\r`\021\035\316\241^\242<\277\177\255\333 R\361fP\277\333wL&\3148t\242bC\277\333\177T&r\265\026\016\261S(}\002y\314\212V\356\025\345s\2371\315\226\312\273f\363\213\255\357\221Q\331\033/\213}A\006fSU\353\205\274T5\031uQ\030\301\023I\200\273\240h\007:y\2450""\347\017)b\231\343bT\265;\311\200\263\245\251\313\32632DG&\265\330\362\007\251\315\325\2226\004\210Z\222H\037\013\321\377v\262\022\002\316\005\206\375\025\347)\251\300\233U\3544(\033\224h\362\024\364G\340\311\365\242\340m?\257\315\255\241S\232\273\324RP\347^\203b\224\336!E\231\005C\314\206b\246\356\200\333\017\322\206K\244\024\264\030\330J\021\3437\220q\354\r\224\234\006\236\371;dwl\030\000\314\261RF\177Y\221\214\3373P\375J0g\262D\336\223L\033D\251\323\356\321\013\350]B'\211h\307\324\261\231\300\326v8\237\211{\365\243v\002\201\325DLoj\375\301\247Zn;pX\233\262HO \271\370f>\211<\352\022x9\272\341\311bg\311\007\331R\335~\372\315\030<\347\336\026$\333b\335Ewx\262\340K\004\230\025\367\024\200\367\201\240\371\016X\227\271\017\316\322V\247\034uv\313fK \344\240\237R\331\2204\316\306\023'\213\345\305\272\0272#P\234\346\2204w17\001P\330\267\374\332\3248\337\340\327\336\3035\247\347\341\354\n>\3361\247\317\231\366N\201\013hAd\000\nOl,$5\225Z\223\201\216d~\311U\345Nx\303\214s\036GX\033G\341\254d\272Un\" \362\374H\226\022\3224\005\022WM\362\210\255\013\004\207k]}\031!Y;FWI\213`\306*5t\314\242C\334\016V.,\205\226\002RM#\232\351\331\252:\"\234R\035\306\027\032r\351\022\354\0008\004\353\327\200v\364\244<\306\357nJ\336\255\3040\375]\022\336h~zz\311`\257M\307\304\350\310hQ\235\"\262\341a\030\343Sk;\301^o\304\033tK\204\177\307)\353\345\302\2571\211\341\364i \022\300W\240P\312\203\257\243\271Y\220\326\313\246\030\363\323\302\205\265d\340\206\3013`Q/\271?^\027uI\324B\267\035\n\334\253\010\002\202u-\306\241\210DH$V\224\305\033\212\365\315\n\020\361\\\353\352\205\277Ly\240J\260\326\372,n\213\363w\020Y\346_\224 3\377&M\010\024\276f\017n\n\304\353`!\342y\373Ju-\006\023[2\232\027\3347\247\340\353\242\202\331\317\344\222\351\222\257\2261\303~.\373!g\207\001o\366\237\357WMer\354\200/\374-\r\230\250\"h\253T{\014E\214?\032E\003U\344/(\3718\010\271{)\221\370}\215\222\224\302\377_]\264`}M\331a\215R&\262Wbc0M;\201\247\0337\035J\021\023n\2723\363X<\301SJl.h)\342\300\277\215\360\300\334\200\2479C""\244\333\274:\2717\376\267\364\275\247\233\347\331#\233J\022x]&l\014(\353\356\206\337\2317n\325rF]t\002\332\306\274\025\233@aY\200\2065\270G\n\210\007\306(d\275\224S\312\275c\300v%\023\261\232bA9\013\257\255.z\303\2673\246\316Qs\3616\\\374\035K\037i\006\304\t\000\360\235i\300\221M\265\334\277\"\276\243\272J\014\336\332\354\222\215\25374\"\212\321\3476v\221\3147U\364\302\002\272;\205\243S\360[\377A\n\242\237X+\220e6Z\250/\004<\341\347Dg\231\311E\364\333f\315\274\320g\355\304\263\276_\275\261\272\024`\254e\362\t\227\213\".69\303\2405LW\274_\235I\223\005\221\220?]4\360\321\277\257DR3\343R\373-\341\t\314\313k\364\026\3279\360\277<f~\320\212\222O'\231\264\033\207-\266=\177z-\242\334\316\007\260}\016\271C'\334\023Z\245c\026~\375\016\340ms\223e\344\006\021\002c\355\005\365ayo\355\366\000\344c\324 \334\024\332a\351j\376\356\223\177\231>S\016\006\367=.\013vZ\035\006u\241/5\033[9,\"\305\226V\261\310\315\031\0269\nx\350\010\247~\264vc\250)\366\0168+\227\310[!\253p(\327F\247\n\2223\212\235]\305ax\373\275\310x\350E5\032g8\310H\303\244\016\257\324\331K\227\177\376\355\365\342\364\374\374\331\347\227^\\^\232^X|\372\374\305\177\346^/\314\275]z\363h\361\303\362\177\226\337\374\017\223~H\025";
    PyObject *data = __Pyx_DecompressString(cstring, 70617, 1);
    if (unlikely(!data)) __PYX_ERR(0, 1, __pyx_L1_error)
    const char* const bytes = __Pyx_PyBytes_AsString(data);
    #if !CYTHON_ASSUME_SAFE_MACROS
    if (likely(bytes)); else { Py_DECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) }
    #endif
    #else /* compression: none (331237 bytes) */
const char* const bytes = ".1.0.02.0.02.1.02.3.0.dev03.0.03.0.0.dev0\n        A copy of this field with the replaced type\n\n        Parameters\n        ----------\n        new_type : pyarrow.DataType\n\n        Returns\n        -------\n        field : pyarrow.Field\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> field = pa.field('key', pa.int32())\n        >>> field\n        pyarrow.Field<key: int32>\n\n        Create new field by replacing type of an existing one:\n\n        >>> field_new = field.with_type(pa.int64())\n        >>> field_new\n        pyarrow.Field<key: int64>\n        \n        A copy of this field with the replaced name\n\n        Parameters\n        ----------\n        name : str\n\n        Returns\n        -------\n        field : pyarrow.Field\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> field = pa.field('key', pa.int32())\n        >>> field\n        pyarrow.Field<key: int32>\n\n        Create new field by replacing the name of an existing one:\n\n        >>> field_new = field.with_name('lock')\n        >>> field_new\n        pyarrow.Field<lock: int32>\n        \n        A copy of this field with the replaced nullability\n\n        Parameters\n        ----------\n        nullable : bool\n\n        Returns\n        -------\n        field: pyarrow.Field\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> field = pa.field('key', pa.int32())\n        >>> field\n        pyarrow.Field<key: int32>\n        >>> field.nullable\n        True\n\n        Create new field by replacing the nullability of an existing one:\n\n        >>> field_new = field.with_nullable(False)\n        >>> field_new\n        pyarrow.Field<key: int32 not null>\n        >>> field_new.nullable\n        False\n        \n    A grouping of columns in a table on which to perform aggregations.\n\n    Parameters\n    ----------\n    table : pyarrow.Table\n        Input table to execute the aggregation on"".\n    keys : str or list[str]\n        Name of the grouped columns.\n    use_threads : bool, default True\n        Whether to use multithreading or not. When set to True (the default),\n        no stable ordering of the output is guaranteed.\n\n    Examples\n    --------\n    >>> import pyarrow as pa\n    >>> t = pa.table([\n    ...       pa.array([\"a\", \"a\", \"b\", \"b\", \"c\"]),\n    ...       pa.array([1, 2, 3, 4, 5]),\n    ... ], names=[\"keys\", \"values\"])\n\n    Grouping of columns:\n\n    >>> pa.TableGroupBy(t,\"keys\")\n    <pyarrow.lib.TableGroupBy object at ...>\n\n    Perform aggregations:\n\n    >>> pa.TableGroupBy(t,\"keys\").aggregate([(\"values\", \"sum\")])\n    pyarrow.Table\n    keys: string\n    values_sum: int64\n    ----\n    keys: [[\"a\",\"b\",\"c\"]]\n    values_sum: [[3,7,5]]\n    A null type field may not be non-nullable\n        Add a field at position i to the schema.\n\n        Parameters\n        ----------\n        i : int\n        field : Field\n\n        Returns\n        -------\n        schema: Schema\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> schema = pa.schema([\n        ...     pa.field('n_legs', pa.int64()),\n        ...     pa.field('animals', pa.string())])\n\n        Insert a new field on the second position:\n\n        >>> schema.insert(1, pa.field('extra', pa.bool_()))\n        n_legs: int64\n        extra: bool\n        animals: string\n        \n        Add column to RecordBatch at position i.\n\n        A new record batch is returned with the column added, the original record batch\n        object is left unchanged.\n\n        Parameters\n        ----------\n        i : int\n            Index to place the column at.\n        field_ : str or Field\n            If a string is passed then the type is deduced from the column\n            data.\n        column : Array or value coercible to array\n            Column data.\n\n        Returns\n        -------\n        RecordBatch""\n            New record batch with the passed column added.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> import pandas as pd\n        >>> df = pd.DataFrame({'n_legs': [2, 4, 5, 100],\n        ...                    'animals': [\"Flamingo\", \"Horse\", \"Brittle stars\", \"Centipede\"]})\n        >>> batch = pa.RecordBatch.from_pandas(df)\n\n        Add column:\n\n        >>> year = [2021, 2022, 2019, 2021]\n        >>> batch.add_column(0,\"year\", year)\n        pyarrow.RecordBatch\n        year: int64\n        n_legs: int64\n        animals: string\n        ----\n        year: [2021,2022,2019,2021]\n        n_legs: [2,4,5,100]\n        animals: [\"Flamingo\",\"Horse\",\"Brittle stars\",\"Centipede\"]\n\n        Original record batch is left unchanged:\n\n        >>> batch\n        pyarrow.RecordBatch\n        n_legs: int64\n        animals: string\n        ----\n        n_legs: [2,4,5,100]\n        animals: [\"Flamingo\",\"Horse\",\"Brittle stars\",\"Centipede\"]\n        \n        Add column to Table at position.\n\n        A new table is returned with the column added, the original table\n        object is left unchanged.\n\n        Parameters\n        ----------\n        i : int\n            Index to place the column at.\n        field_ : str or Field\n            If a string is passed then the type is deduced from the column\n            data.\n        column : Array, list of Array, or values coercible to arrays\n            Column data.\n\n        Returns\n        -------\n        Table\n            New table with the passed column added.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> import pandas as pd\n        >>> df = pd.DataFrame({'n_legs': [2, 4, 5, 100],\n        ...                    'animals': [\"Flamingo\", \"Horse\", \"Brittle stars\", \"Centipede\"]})\n        >>> table = pa.Table.from_pandas(df)\n\n        Add column:\n\n        >>> year = [2021, 2022, 2019, 2021]\n   ""     >>> table.add_column(0,\"year\", [year])\n        pyarrow.Table\n        year: int64\n        n_legs: int64\n        animals: string\n        ----\n        year: [[2021,2022,2019,2021]]\n        n_legs: [[2,4,5,100]]\n        animals: [[\"Flamingo\",\"Horse\",\"Brittle stars\",\"Centipede\"]]\n\n        Original table is left unchanged:\n\n        >>> table\n        pyarrow.Table\n        n_legs: int64\n        animals: string\n        ----\n        n_legs: [[2,4,5,100]]\n        animals: [[\"Flamingo\",\"Horse\",\"Brittle stars\",\"Centipede\"]]\n        \n        Add metadata as dict of string keys and values to Field\n\n        Parameters\n        ----------\n        metadata : dict\n            Keys and values must be string-like / coercible to bytes\n\n        Returns\n        -------\n        field : pyarrow.Field\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> field = pa.field('key', pa.int32())\n\n        Create new field by adding metadata to existing one:\n\n        >>> field_new = field.with_metadata({\"key\": \"Something important\"})\n        >>> field_new\n        pyarrow.Field<key: int32>\n        >>> field_new.metadata\n        {b'key': b'Something important'}\n        \n        Add metadata as dict of string keys and values to Schema\n\n        Parameters\n        ----------\n        metadata : dict\n            Keys and values must be string-like / coercible to bytes\n\n        Returns\n        -------\n        schema : pyarrow.Schema\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> schema = pa.schema([\n        ...     pa.field('n_legs', pa.int64()),\n        ...     pa.field('animals', pa.string())])\n\n        Add metadata to existing schema field:\n\n        >>> schema.with_metadata({\"n_legs\": \"Number of legs per animal\"})\n        n_legs: int64\n        animals: string\n        -- schema metadata --\n        n_legs: 'Number of legs per animal'\n        \n    Alia""s for large_string().\n\n    Examples\n    --------\n    Create an instance of large UTF8 variable-length binary type:\n\n    >>> import pyarrow as pa\n    >>> pa.large_utf8()\n    DataType(large_string)\n\n    and use the type to create an array:\n\n    >>> pa.array(['foo', 'bar'] * 50, type=pa.large_utf8())\n    <pyarrow.lib.LargeStringArray object at ...>\n    [\n      \"foo\",\n      \"bar\",\n      ...\n      \"foo\",\n      \"bar\"\n    ]\n    \n    Alias for string().\n\n    Examples\n    --------\n    Create an instance of a string type:\n\n    >>> import pyarrow as pa\n    >>> pa.utf8()\n    DataType(string)\n\n    and use the string type to create an array:\n\n    >>> pa.array(['foo', 'bar', 'baz'], type=pa.utf8())\n    <pyarrow.lib.StringArray object at ...>\n    [\n      \"foo\",\n      \"bar\",\n      \"baz\"\n    ]\n    \n        Append a field at the end of the schema.\n\n        In contrast to Python's ``list.append()`` it does return a new\n        object, leaving the original Schema unmodified.\n\n        Parameters\n        ----------\n        field : Field\n\n        Returns\n        -------\n        schema: Schema\n            New object with appended field.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> schema = pa.schema([\n        ...     pa.field('n_legs', pa.int64()),\n        ...     pa.field('animals', pa.string())])\n\n        Append a field 'extra' at the end of the schema:\n\n        >>> schema_new = schema.append(pa.field('extra', pa.bool_()))\n        >>> schema_new\n        n_legs: int64\n        animals: string\n        extra: bool\n\n        Original schema is unmodified:\n\n        >>> schema\n        n_legs: int64\n        animals: string\n        \n        Append column at end of columns.\n\n        Parameters\n        ----------\n        field_ : str or Field\n            If a string is passed then the type is deduced from the column\n            data.\n        column : Array or value coer""cible to array\n            Column data.\n\n        Returns\n        -------\n        Table or RecordBatch\n            New table or record batch with the passed column added.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> import pandas as pd\n        >>> df = pd.DataFrame({'n_legs': [2, 4, 5, 100],\n        ...                    'animals': [\"Flamingo\", \"Horse\", \"Brittle stars\", \"Centipede\"]})\n        >>> table = pa.Table.from_pandas(df)\n\n        Append column at the end:\n\n        >>> year = [2021, 2022, 2019, 2021]\n        >>> table.append_column('year', [year])\n        pyarrow.Table\n        n_legs: int64\n        animals: string\n        year: int64\n        ----\n        n_legs: [[2,4,5,100]]\n        animals: [[\"Flamingo\",\"Horse\",\"Brittle stars\",\"Centipede\"]]\n        year: [[2021,2022,2019,2021]]\n        Argument 'destination' has incorrect type (expected a pyarrow Device or MemoryManager, got Array data type was NULLArray.diff (line 1102)Array dtype Array was NULLArrays were not all the same length: BaseListArray.flatten (line 2535)BaseListArray.value_lengths (line 2651)BaseListArray.value_parent_indices (line 2629)Batch number \n        Bit width for fixed width type.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> pa.int64()\n        DataType(int64)\n        >>> pa.int64().bit_width\n        64\n        Bool8Array.from_numpy (line 4839)Buffer size must be larger than zero\n        Byte width for fixed width type.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> pa.int64()\n        DataType(int64)\n        >>> pa.int64().byte_width\n        8\n        CPU count must be strictly positiveCalling .data on ChunkedArray is provided for compatibility after Column was removed, simply drop this attributeCan only get value offsets for dense arraysCan only instantiate subclasses of ExtensionTypeCan't convert PyCapsule with name 'Canno""t convert Cannot convert 1D array or scalar to fixed shape tensor arrayCannot create multiple NullScalar instancesCannot export buffer from null Arrow ScalarCannot pass a numpy masked array and specify a mask at the same timeCannot pass both schema and metadataCannot pass both schema and namesCannot return a numpy.ndarray if NumPy is not presentCannot return a writable array if asking for zero-copyCannot specify a mask or a size when passing an object that is converted with the __arrow_array__ protocol.Cannot specify both list_size and type\n        Cast array values to another data type\n\n        See :func:`pyarrow.compute.cast` for usage.\n\n        Parameters\n        ----------\n        target_type : DataType, None\n            Type to cast array to.\n        safe : boolean, default True\n            Whether to check for conversion errors such as overflow.\n        options : CastOptions, default None\n            Additional checks pass by CastOptions\n\n        Returns\n        -------\n        cast : Array or ChunkedArray\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> n_legs = pa.chunked_array([[2, 2, 4], [4, 5, 100]])\n        >>> n_legs.type\n        DataType(int64)\n\n        Change the data type of an array:\n\n        >>> n_legs_seconds = n_legs.cast(pa.duration('s'))\n        >>> n_legs_seconds.type\n        DurationType(duration[s])\n        \n        Cast record batch values to another schema.\n\n        Parameters\n        ----------\n        target_schema : Schema\n            Schema to cast to, the names and order of fields must match.\n        safe : bool, default True\n            Check for overflows or other unsafe conversions.\n        options : CastOptions, default None\n            Additional checks pass by CastOptions\n\n        Returns\n        -------\n        RecordBatch\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> import pandas as pd\n        >>> df = pd.DataFra""me({'n_legs': [2, 4, 5, 100],\n        ...                    'animals': [\"Flamingo\", \"Horse\", \"Brittle stars\", \"Centipede\"]})\n        >>> batch = pa.RecordBatch.from_pandas(df)\n        >>> batch.schema\n        n_legs: int64\n        animals: string\n        -- schema metadata --\n        pandas: '{\"index_columns\": [{\"kind\": \"range\", \"name\": null, \"start\": 0, ...\n\n        Define new schema and cast batch values:\n\n        >>> my_schema = pa.schema([\n        ...     pa.field('n_legs', pa.duration('s')),\n        ...     pa.field('animals', pa.string())]\n        ...     )\n        >>> batch.cast(target_schema=my_schema)\n        pyarrow.RecordBatch\n        n_legs: duration[s]\n        animals: string\n        ----\n        n_legs: [2,4,5,100]\n        animals: [\"Flamingo\",\"Horse\",\"Brittle stars\",\"Centipede\"]\n        \n        Cast table values to another schema.\n\n        Parameters\n        ----------\n        target_schema : Schema\n            Schema to cast to, the names and order of fields must match.\n        safe : bool, default True\n            Check for overflows or other unsafe conversions.\n        options : CastOptions, default None\n            Additional checks pass by CastOptions\n\n        Returns\n        -------\n        Table\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> import pandas as pd\n        >>> df = pd.DataFrame({'n_legs': [2, 4, 5, 100],\n        ...                    'animals': [\"Flamingo\", \"Horse\", \"Brittle stars\", \"Centipede\"]})\n        >>> table = pa.Table.from_pandas(df)\n        >>> table.schema\n        n_legs: int64\n        animals: string\n        -- schema metadata --\n        pandas: '{\"index_columns\": [{\"kind\": \"range\", \"name\": null, \"start\": 0, ...\n\n        Define new schema and cast table values:\n\n        >>> my_schema = pa.schema([\n        ...     pa.field('n_legs', pa.duration('s')),\n        ...     pa.field('animals', pa"".string())]\n        ...     )\n        >>> table.cast(target_schema=my_schema)\n        pyarrow.Table\n        n_legs: duration[s]\n        animals: string\n        ----\n        n_legs: [[2,4,5,100]]\n        animals: [[\"Flamingo\",\"Horse\",\"Brittle stars\",\"Centipede\"]]\n        Casting field Casting to a requested schema is only supported for CPU data\n        Check if contents of two record batches are equal.\n\n        Parameters\n        ----------\n        other : pyarrow.RecordBatch\n            RecordBatch to compare against.\n        check_metadata : bool, default False\n            Whether schema metadata equality should be checked as well.\n\n        Returns\n        -------\n        are_equal : bool\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> n_legs = pa.array([2, 2, 4, 4, 5, 100])\n        >>> animals = pa.array([\"Flamingo\", \"Parrot\", \"Dog\", \"Horse\", \"Brittle stars\", \"Centipede\"])\n        >>> batch = pa.RecordBatch.from_arrays([n_legs, animals],\n        ...                                     names=[\"n_legs\", \"animals\"])\n        >>> batch_0 = pa.record_batch([])\n        >>> batch_1 = pa.RecordBatch.from_arrays([n_legs, animals],\n        ...                                       names=[\"n_legs\", \"animals\"],\n        ...                                       metadata={\"n_legs\": \"Number of legs per animal\"})\n        >>> batch.equals(batch)\n        True\n        >>> batch.equals(batch_0)\n        False\n        >>> batch.equals(batch_1)\n        True\n        >>> batch.equals(batch_1, check_metadata=True)\n        False\n        \n        Check if contents of two tables are equal.\n\n        Parameters\n        ----------\n        other : pyarrow.Table\n            Table to compare against.\n        check_metadata : bool, default False\n            Whether schema metadata equality should be checked as well.\n\n        Returns\n        -------\n        bool\n\n        Examples""\n        --------\n        >>> import pyarrow as pa\n        >>> n_legs = pa.array([2, 2, 4, 4, 5, 100])\n        >>> animals = pa.array([\"Flamingo\", \"Parrot\", \"Dog\", \"Horse\", \"Brittle stars\", \"Centipede\"])\n        >>> names=[\"n_legs\", \"animals\"]\n        >>> table = pa.Table.from_arrays([n_legs, animals], names=names)\n        >>> table_0 = pa.Table.from_arrays([])\n        >>> table_1 = pa.Table.from_arrays([n_legs, animals],\n        ...                                 names=names,\n        ...                                 metadata={\"n_legs\": \"Number of legs per animal\"})\n        >>> table.equals(table)\n        True\n        >>> table.equals(table_0)\n        False\n        >>> table.equals(table_1)\n        True\n        >>> table.equals(table_1, check_metadata=True)\n        False\n        Chunk index out of range.ChunkedArray.cast (line 564)ChunkedArray.chunk (line 1271)ChunkedArray.chunks.__get__ (line 1300)ChunkedArray.combine_chunks (line 734)ChunkedArray data type was NULLChunkedArray.dictionary_encode (line 599)ChunkedArray.drop_null (line 1085)ChunkedArray.equals (line 450)ChunkedArray.fill_null (line 413)ChunkedArray.filter (line 925)ChunkedArray.flatten (line 663)ChunkedArray.format is deprecated, use ChunkedArray.to_stringChunkedArray.get_total_buffer_size (line 265)ChunkedArray.index (line 990)ChunkedArray.is_nan (line 356)ChunkedArray.is_null (line 322)ChunkedArray.is_valid (line 381)ChunkedArray.iterchunks (line 1338)ChunkedArray.length (line 99)ChunkedArray.nbytes.__get__ (line 233)ChunkedArray.null_count.__get__ (line 214)ChunkedArray.num_chunks.__get__ (line 1253)ChunkedArray.slice (line 867)ChunkedArray.take (line 1038)ChunkedArray.to_numpy (line 494)ChunkedArray.to_pylist (line 1356)ChunkedArray.to_string (line 119)ChunkedArray.type.__get__ (line 85)ChunkedArray.unify_dictionaries (line 1149)ChunkedArray.unique (line 782)ChunkedArray.value_counts (line 820)ChunkedArray was NULLColumn \n        Compare contents of thi""s array against another one.\n\n        Return a string containing the result of diffing this array\n        (on the left side) against the other array (on the right side).\n\n        Parameters\n        ----------\n        other : Array\n            The other array to compare this array with.\n\n        Returns\n        -------\n        diff : str\n            A human-readable printout of the differences.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> left = pa.array([\"one\", \"two\", \"three\"])\n        >>> right = pa.array([\"two\", None, \"two-and-a-half\", \"three\"])\n        >>> print(left.diff(right)) # doctest: +SKIP\n\n        @@ -0, +0 @@\n        -\"one\"\n        @@ -2, +1 @@\n        +null\n        +\"two-and-a-half\"\n\n        Compression type must be lz4, zstd or None\n        Compute counts of unique elements in array.\n\n        Returns\n        -------\n        An array of  <input type \"Values\", int64_t \"Counts\"> structs\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> n_legs = pa.chunked_array([[2, 2, 4], [4, 5, 100]])\n        >>> n_legs\n        <pyarrow.lib.ChunkedArray object at ...>\n        [\n          [\n            2,\n            2,\n            4\n          ],\n          [\n            4,\n            5,\n            100\n          ]\n        ]\n        >>> n_legs.value_counts()\n        <pyarrow.lib.StructArray object at ...>\n        -- is_valid: all not null\n        -- child 0 type: int64\n          [\n            2,\n            4,\n            5,\n            100\n          ]\n        -- child 1 type: int64\n          [\n            2,\n            2,\n            1,\n            1\n          ]\n        \n        Compute dictionary-encoded representation of array.\n\n        See :func:`pyarrow.compute.dictionary_encode` for full usage.\n\n        Parameters\n        ----------\n        null_encoding : str, default \"mask\"\n            How to handle ""null entries.\n\n        Returns\n        -------\n        encoded : ChunkedArray\n            A dictionary-encoded version of this array.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> animals = pa.chunked_array((\n        ...             [\"Flamingo\", \"Parrot\", \"Dog\"],\n        ...             [\"Horse\", \"Brittle stars\", \"Centipede\"]\n        ...             ))\n        >>> animals.dictionary_encode()\n        <pyarrow.lib.ChunkedArray object at ...>\n        [\n        ...\n          -- dictionary:\n            [\n              \"Flamingo\",\n              \"Parrot\",\n              \"Dog\",\n              \"Horse\",\n              \"Brittle stars\",\n              \"Centipede\"\n            ]\n          -- indices:\n            [\n              0,\n              1,\n              2\n            ],\n        ...\n          -- dictionary:\n            [\n              \"Flamingo\",\n              \"Parrot\",\n              \"Dog\",\n              \"Horse\",\n              \"Brittle stars\",\n              \"Centipede\"\n            ]\n          -- indices:\n            [\n              3,\n              4,\n              5\n            ]\n        ]\n        \n        Compute distinct elements in array\n\n        Returns\n        -------\n        pyarrow.Array\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> n_legs = pa.chunked_array([[2, 2, 4], [4, 5, 100]])\n        >>> n_legs\n        <pyarrow.lib.ChunkedArray object at ...>\n        [\n          [\n            2,\n            2,\n            4\n          ],\n          [\n            4,\n            5,\n            100\n          ]\n        ]\n        >>> n_legs.unique()\n        <pyarrow.lib.Int64Array object at ...>\n        [\n          2,\n          4,\n          5,\n          100\n        ]\n        \n        Compute zero-copy slice of this ChunkedArray\n\n        Parameters\n        ----------\n        offset : int, default ""0\n            Offset from start of array to slice\n        length : int, default None\n            Length of slice (default is until end of batch starting from\n            offset)\n\n        Returns\n        -------\n        sliced : ChunkedArray\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> n_legs = pa.chunked_array([[2, 2, 4], [4, 5, 100]])\n        >>> n_legs\n        <pyarrow.lib.ChunkedArray object at ...>\n        [\n          [\n            2,\n            2,\n            4\n          ],\n          [\n            4,\n            5,\n            100\n          ]\n        ]\n        >>> n_legs.slice(2,2)\n        <pyarrow.lib.ChunkedArray object at ...>\n        [\n          [\n            4\n          ],\n          [\n            4\n          ]\n        ]\n        \n        Compute zero-copy slice of this RecordBatch\n\n        Parameters\n        ----------\n        offset : int, default 0\n            Offset from start of record batch to slice\n        length : int, default None\n            Length of slice (default is until end of batch starting from\n            offset)\n\n        Returns\n        -------\n        sliced : RecordBatch\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> n_legs = pa.array([2, 2, 4, 4, 5, 100])\n        >>> animals = pa.array([\"Flamingo\", \"Parrot\", \"Dog\", \"Horse\", \"Brittle stars\", \"Centipede\"])\n        >>> batch = pa.RecordBatch.from_arrays([n_legs, animals],\n        ...                                     names=[\"n_legs\", \"animals\"])\n        >>> batch.to_pandas()\n           n_legs        animals\n        0       2       Flamingo\n        1       2         Parrot\n        2       4            Dog\n        3       4          Horse\n        4       5  Brittle stars\n        5     100      Centipede\n        >>> batch.slice(offset=3).to_pandas()\n           n_legs        animals\n        0       4          Horse\n        1       5  Brit""tle stars\n        2     100      Centipede\n        >>> batch.slice(length=2).to_pandas()\n           n_legs   animals\n        0       2  Flamingo\n        1       2    Parrot\n        >>> batch.slice(offset=3, length=1).to_pandas()\n           n_legs animals\n        0       4   Horse\n        \n        Compute zero-copy slice of this Table.\n\n        Parameters\n        ----------\n        offset : int, default 0\n            Offset from start of table to slice.\n        length : int, default None\n            Length of slice (default is until end of table starting from\n            offset).\n\n        Returns\n        -------\n        Table\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> import pandas as pd\n        >>> df = pd.DataFrame({'year': [2020, 2022, 2019, 2021],\n        ...                    'n_legs': [2, 4, 5, 100],\n        ...                    'animals': [\"Flamingo\", \"Horse\", \"Brittle stars\", \"Centipede\"]})\n        >>> table = pa.Table.from_pandas(df)\n        >>> table.slice(length=3)\n        pyarrow.Table\n        year: int64\n        n_legs: int64\n        animals: string\n        ----\n        year: [[2020,2022,2019]]\n        n_legs: [[2,4,5]]\n        animals: [[\"Flamingo\",\"Horse\",\"Brittle stars\"]]\n        >>> table.slice(offset=2)\n        pyarrow.Table\n        year: int64\n        n_legs: int64\n        animals: string\n        ----\n        year: [[2019,2021]]\n        n_legs: [[5,100]]\n        animals: [[\"Brittle stars\",\"Centipede\"]]\n        >>> table.slice(offset=2, length=1)\n        pyarrow.Table\n        year: int64\n        n_legs: int64\n        animals: string\n        ----\n        year: [[2019]]\n        n_legs: [[5]]\n        animals: [[\"Brittle stars\"]]\n        \n    Concatenate pyarrow.RecordBatch objects.\n\n    All recordbatches must share the same Schema,\n    the operation implies a copy of the data to merge\n    the arrays of the different RecordBatches.""\n\n    Parameters\n    ----------\n    recordbatches : iterable of pyarrow.RecordBatch objects\n        Pyarrow record batches to concatenate into a single RecordBatch.\n    memory_pool : MemoryPool, default None\n        For memory allocations, if required, otherwise use default pool.\n\n    Examples\n    --------\n    >>> import pyarrow as pa\n    >>> t1 = pa.record_batch([\n    ...     pa.array([2, 4, 5, 100]),\n    ...     pa.array([\"Flamingo\", \"Horse\", \"Brittle stars\", \"Centipede\"])\n    ...     ], names=['n_legs', 'animals'])\n    >>> t2 = pa.record_batch([\n    ...     pa.array([2, 4]),\n    ...     pa.array([\"Parrot\", \"Dog\"])\n    ...     ], names=['n_legs', 'animals'])\n    >>> pa.concat_batches([t1,t2])\n    pyarrow.RecordBatch\n    n_legs: int64\n    animals: string\n    ----\n    n_legs: [2,4,5,100,2,4]\n    animals: [\"Flamingo\",\"Horse\",\"Brittle stars\",\"Centipede\",\"Parrot\",\"Dog\"]\n\n    \n    Concatenate pyarrow.Table objects.\n\n    If promote_options=\"none\", a zero-copy concatenation will be performed. The schemas\n    of all the Tables must be the same (except the metadata), otherwise an\n    exception will be raised. The result Table will share the metadata with the\n    first table.\n\n    If promote_options=\"default\", any null type arrays will be casted to the type of other\n    arrays in the column of the same name. If a table is missing a particular\n    field, null values of the appropriate type will be generated to take the\n    place of the missing field. The new schema will share the metadata with the\n    first table. Each field in the new schema will share the metadata with the\n    first table which has the field defined. Note that type promotions may\n    involve additional allocations on the given ``memory_pool``.\n\n    If promote_options=\"permissive\", the behavior of default plus types will be promoted\n    to the common denominator that fits all the fields.\n\n    Parameters\n    ----------\n    tables :"" iterable of pyarrow.Table objects\n        Pyarrow tables to concatenate into a single Table.\n    memory_pool : MemoryPool, default None\n        For memory allocations, if required, otherwise use default pool.\n    promote_options : str, default none\n        Accepts strings \"none\", \"default\" and \"permissive\".\n    **kwargs : dict, optional\n\n    Examples\n    --------\n    >>> import pyarrow as pa\n    >>> t1 = pa.table([\n    ...     pa.array([2, 4, 5, 100]),\n    ...     pa.array([\"Flamingo\", \"Horse\", \"Brittle stars\", \"Centipede\"])\n    ...     ], names=['n_legs', 'animals'])\n    >>> t2 = pa.table([\n    ...     pa.array([2, 4]),\n    ...     pa.array([\"Parrot\", \"Dog\"])\n    ...     ], names=['n_legs', 'animals'])\n    >>> pa.concat_tables([t1,t2])\n    pyarrow.Table\n    n_legs: int64\n    animals: string\n    ----\n    n_legs: [[2,4,5,100],[2,4]]\n    animals: [[\"Flamingo\",\"Horse\",\"Brittle stars\",\"Centipede\"],[\"Parrot\",\"Dog\"]]\n\n    \n    Concatenate the given arrays.\n\n    The contents of the input arrays are copied into the returned array.\n\n    Raises\n    ------\n    ArrowInvalid\n        If not all of the arrays have the same type.\n\n    Parameters\n    ----------\n    arrays : iterable of pyarrow.Array\n        Arrays to concatenate, must be identically typed.\n    memory_pool : MemoryPool, default None\n        For memory allocations. If None, the default pool is used.\n\n    Examples\n    --------\n    >>> import pyarrow as pa\n    >>> arr1 = pa.array([2, 4, 5, 100])\n    >>> arr2 = pa.array([2, 4])\n    >>> pa.concat_arrays([arr1, arr2])\n    <pyarrow.lib.Int64Array object at ...>\n    [\n      2,\n      4,\n      5,\n      100,\n      2,\n      4\n    ]\n\n    \n    Concrete class for Arrow arrays of JSON data type.\n\n    This does not guarantee that the JSON data actually\n    is valid JSON.\n\n    Examples\n    --------\n    Define the extension type for JSON array\n\n    >>> import pyarrow as pa\n    >>> json""_type = pa.json_(pa.large_utf8())\n\n    Create an extension array\n\n    >>> arr = [None, '{ \"id\":30, \"values\":[\"a\", \"b\"] }']\n    >>> storage = pa.array(arr, pa.large_utf8())\n    >>> pa.ExtensionArray.from_storage(json_type, storage)\n    <pyarrow.lib.JsonArray object at ...>\n    [\n      null,\n      \"{ \"id\":30, \"values\":[\"a\", \"b\"] }\"\n    ]\n    \n    Concrete class for Arrow arrays of UUID data type.\n    \n    Concrete class for JSON extension scalar.\n    \n    Concrete class for Uuid extension scalar.\n    \n        Construct FixedSizeListArray from array of values and a list length.\n\n        Parameters\n        ----------\n        values : Array (any type)\n        list_size : int\n            The fixed length of the lists.\n        type : DataType, optional\n            If not specified, a default ListType with the values' type and\n            `list_size` length is used.\n        mask : Array (boolean type), optional\n            Indicate which values are null (True) or not null (False).\n\n\n        Returns\n        -------\n        FixedSizeListArray\n\n        Examples\n        --------\n\n        Create from a values array and a list size:\n\n        >>> import pyarrow as pa\n        >>> values = pa.array([1, 2, 3, 4])\n        >>> arr = pa.FixedSizeListArray.from_arrays(values, 2)\n        >>> arr\n        <pyarrow.lib.FixedSizeListArray object at ...>\n        [\n          [\n            1,\n            2\n          ],\n          [\n            3,\n            4\n          ]\n        ]\n\n        Or create from a values array, list size and matching type:\n\n        >>> typ = pa.list_(pa.field(\"values\", pa.int64()), 2)\n        >>> arr = pa.FixedSizeListArray.from_arrays(values,type=typ)\n        >>> arr\n        <pyarrow.lib.FixedSizeListArray object at ...>\n        [\n          [\n            1,\n            2\n          ],\n          [\n            3,\n            4\n          ]\n        ]\n        \n        Construct Lar""geListViewArray from arrays of int64 offsets and values.\n\n        Parameters\n        ----------\n        offsets : Array (int64 type)\n        sizes : Array (int64 type)\n        values : Array (any type)\n        type : DataType, optional\n            If not specified, a default ListType with the values' type is\n            used.\n        pool : MemoryPool, optional\n        mask : Array (boolean type), optional\n            Indicate which values are null (True) or not null (False).\n\n        Returns\n        -------\n        list_view_array : LargeListViewArray\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> values = pa.array([1, 2, 3, 4])\n        >>> offsets = pa.array([0, 1, 2])\n        >>> sizes = pa.array([2, 2, 2])\n        >>> pa.LargeListViewArray.from_arrays(offsets, sizes, values)\n        <pyarrow.lib.LargeListViewArray object at ...>\n        [\n          [\n            1,\n            2\n          ],\n          [\n            2,\n            3\n          ],\n          [\n            3,\n            4\n          ]\n        ]\n        >>> # use a null mask to represent null values\n        >>> mask = pa.array([False, True, False])\n        >>> pa.LargeListViewArray.from_arrays(offsets, sizes, values, mask=mask)\n        <pyarrow.lib.LargeListViewArray object at ...>\n        [\n          [\n            1,\n            2\n          ],\n          null,\n          [\n            3,\n            4\n          ]\n        ]\n        >>> # null values can be defined in either offsets or sizes arrays\n        >>> # WARNING: this will result in a copy of the offsets or sizes arrays\n        >>> offsets = pa.array([0, None, 2])\n        >>> pa.LargeListViewArray.from_arrays(offsets, sizes, values)\n        <pyarrow.lib.LargeListViewArray object at ...>\n        [\n          [\n            1,\n            2\n          ],\n          null,\n          [\n            3,\n            4\n          ]\n        ]\n        \n       "" Construct ListArray from arrays of int32 offsets and values.\n\n        Parameters\n        ----------\n        offsets : Array (int32 type)\n        values : Array (any type)\n        type : DataType, optional\n            If not specified, a default ListType with the values' type is\n            used.\n        pool : MemoryPool, optional\n        mask : Array (boolean type), optional\n            Indicate which values are null (True) or not null (False).\n\n        Returns\n        -------\n        list_array : ListArray\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> values = pa.array([1, 2, 3, 4])\n        >>> offsets = pa.array([0, 2, 4])\n        >>> pa.ListArray.from_arrays(offsets, values)\n        <pyarrow.lib.ListArray object at ...>\n        [\n          [\n            1,\n            2\n          ],\n          [\n            3,\n            4\n          ]\n        ]\n        >>> # nulls in the offsets array become null lists\n        >>> offsets = pa.array([0, None, 2, 4])\n        >>> pa.ListArray.from_arrays(offsets, values)\n        <pyarrow.lib.ListArray object at ...>\n        [\n          [\n            1,\n            2\n          ],\n          null,\n          [\n            3,\n            4\n          ]\n        ]\n        \n        Construct ListViewArray from arrays of int32 offsets, sizes, and values.\n\n        Parameters\n        ----------\n        offsets : Array (int32 type)\n        sizes : Array (int32 type)\n        values : Array (any type)\n        type : DataType, optional\n            If not specified, a default ListType with the values' type is\n            used.\n        pool : MemoryPool, optional\n        mask : Array (boolean type), optional\n            Indicate which values are null (True) or not null (False).\n\n        Returns\n        -------\n        list_view_array : ListViewArray\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> values = pa.arra""y([1, 2, 3, 4])\n        >>> offsets = pa.array([0, 1, 2])\n        >>> sizes = pa.array([2, 2, 2])\n        >>> pa.ListViewArray.from_arrays(offsets, sizes, values)\n        <pyarrow.lib.ListViewArray object at ...>\n        [\n          [\n            1,\n            2\n          ],\n          [\n            2,\n            3\n          ],\n          [\n            3,\n            4\n          ]\n        ]\n        >>> # use a null mask to represent null values\n        >>> mask = pa.array([False, True, False])\n        >>> pa.ListViewArray.from_arrays(offsets, sizes, values, mask=mask)\n        <pyarrow.lib.ListViewArray object at ...>\n        [\n          [\n            1,\n            2\n          ],\n          null,\n          [\n            3,\n            4\n          ]\n        ]\n        >>> # null values can be defined in either offsets or sizes arrays\n        >>> # WARNING: this will result in a copy of the offsets or sizes arrays\n        >>> offsets = pa.array([0, None, 2])\n        >>> pa.ListViewArray.from_arrays(offsets, sizes, values)\n        <pyarrow.lib.ListViewArray object at ...>\n        [\n          [\n            1,\n            2\n          ],\n          null,\n          [\n            3,\n            4\n          ]\n        ]\n        \n        Construct MapArray from arrays of int32 offsets and key, item arrays.\n\n        Parameters\n        ----------\n        offsets : array-like or sequence (int32 type)\n        keys : array-like or sequence (any type)\n        items : array-like or sequence (any type)\n        type : DataType, optional\n            If not specified, a default MapArray with the keys' and items' type is used.\n        pool : MemoryPool\n        mask : Array (boolean type), optional\n            Indicate which values are null (True) or not null (False).\n\n        Returns\n        -------\n        map_array : MapArray\n\n        Examples\n        --------\n        First, let's understand the structure of our dataset ""when viewed in a rectangular data model.\n        The total of 5 respondents answered the question \"How much did you like the movie x?\".\n        The value -1 in the integer array means that the value is missing. The boolean array\n        represents the null bitmask corresponding to the missing values in the integer array.\n\n        >>> import pyarrow as pa\n        >>> movies_rectangular = np.ma.masked_array([\n        ...     [10, -1, -1],\n        ...     [8, 4, 5],\n        ...     [-1, 10, 3],\n        ...     [-1, -1, -1],\n        ...     [-1, -1, -1]\n        ... ],\n        ... [\n        ...     [False, True, True],\n        ...     [False, False, False],\n        ...     [True, False, False],\n        ...     [True, True, True],\n        ...     [True, True, True],\n        ... ])\n\n        To represent the same data with the MapArray and from_arrays, the data is\n        formed like this:\n\n        >>> offsets = [\n        ...     0, #  -- row 1 start\n        ...     1, #  -- row 2 start\n        ...     4, #  -- row 3 start\n        ...     6, #  -- row 4 start\n        ...     6, #  -- row 5 start\n        ...     6, #  -- row 5 end\n        ... ]\n        >>> movies = [\n        ...     \"Dark Knight\", #  ---------------------------------- row 1\n        ...     \"Dark Knight\", \"Meet the Parents\", \"Superman\", #  -- row 2\n        ...     \"Meet the Parents\", \"Superman\", #  ----------------- row 3\n        ... ]\n        >>> likings = [\n        ...     10, #  -------- row 1\n        ...     8, 4, 5, #  --- row 2\n        ...     10, 3 #  ------ row 3\n        ... ]\n        >>> pa.MapArray.from_arrays(offsets, movies, likings).to_pandas()\n        0                                  [(Dark Knight, 10)]\n        1    [(Dark Knight, 8), (Meet the Parents, 4), (Sup...\n        2              [(Meet the Parents, 10), (Superman, 3)]\n        3                                                   []\n        4                                    ""               []\n        dtype: object\n\n        If the data in the empty rows needs to be marked as missing, it's possible\n        to do so by modifying the offsets argument, so that we specify `None` as\n        the starting positions of the rows we want marked as missing. The end row\n        offset still has to refer to the existing value from keys (and values):\n\n        >>> offsets = [\n        ...     0, #  ----- row 1 start\n        ...     1, #  ----- row 2 start\n        ...     4, #  ----- row 3 start\n        ...     None, #  -- row 4 start\n        ...     None, #  -- row 5 start\n        ...     6, #  ----- row 5 end\n        ... ]\n        >>> pa.MapArray.from_arrays(offsets, movies, likings).to_pandas()\n        0                                  [(Dark Knight, 10)]\n        1    [(Dark Knight, 8), (Meet the Parents, 4), (Sup...\n        2              [(Meet the Parents, 10), (Superman, 3)]\n        3                                                 None\n        4                                                 None\n        dtype: object\n        \n        Construct a RecordBatch from a StructArray.\n\n        Each field in the StructArray will become a column in the resulting\n        ``RecordBatch``.\n\n        Parameters\n        ----------\n        struct_array : StructArray\n            Array to construct the record batch from.\n\n        Returns\n        -------\n        pyarrow.RecordBatch\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> struct = pa.array([{'n_legs': 2, 'animals': 'Parrot'},\n        ...                    {'year': 2022, 'n_legs': 4}])\n        >>> pa.RecordBatch.from_struct_array(struct).to_pandas()\n          animals  n_legs    year\n        0  Parrot       2     NaN\n        1    None       4  2022.0\n        \n        Construct a RecordBatch from multiple pyarrow.Arrays\n\n        Parameters\n        ----------\n        arrays : list of pyarrow.Array\n            One for each fiel""d in RecordBatch\n        names : list of str, optional\n            Names for the batch fields. If not passed, schema must be passed\n        schema : Schema, default None\n            Schema for the created batch. If not passed, names must be passed\n        metadata : dict or Mapping, default None\n            Optional metadata for the schema (if inferred).\n\n        Returns\n        -------\n        pyarrow.RecordBatch\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> n_legs = pa.array([2, 2, 4, 4, 5, 100])\n        >>> animals = pa.array([\"Flamingo\", \"Parrot\", \"Dog\", \"Horse\", \"Brittle stars\", \"Centipede\"])\n        >>> names = [\"n_legs\", \"animals\"]\n\n        Construct a RecordBatch from pyarrow Arrays using names:\n\n        >>> pa.RecordBatch.from_arrays([n_legs, animals], names=names)\n        pyarrow.RecordBatch\n        n_legs: int64\n        animals: string\n        ----\n        n_legs: [2,2,4,4,5,100]\n        animals: [\"Flamingo\",\"Parrot\",\"Dog\",\"Horse\",\"Brittle stars\",\"Centipede\"]\n        >>> pa.RecordBatch.from_arrays([n_legs, animals], names=names).to_pandas()\n           n_legs        animals\n        0       2       Flamingo\n        1       2         Parrot\n        2       4            Dog\n        3       4          Horse\n        4       5  Brittle stars\n        5     100      Centipede\n\n        Construct a RecordBatch from pyarrow Arrays using schema:\n\n        >>> my_schema = pa.schema([\n        ...     pa.field('n_legs', pa.int64()),\n        ...     pa.field('animals', pa.string())],\n        ...     metadata={\"n_legs\": \"Number of legs per animal\"})\n        >>> pa.RecordBatch.from_arrays([n_legs, animals], schema=my_schema).to_pandas()\n           n_legs        animals\n        0       2       Flamingo\n        1       2         Parrot\n        2       4            Dog\n        3       4          Horse\n        4       5  Brittle stars\n        5     100      Centipe""de\n        >>> pa.RecordBatch.from_arrays([n_legs, animals], schema=my_schema).schema\n        n_legs: int64\n        animals: string\n        -- schema metadata --\n        n_legs: 'Number of legs per animal'\n        \n        Construct a Table from Arrow arrays.\n\n        Parameters\n        ----------\n        arrays : list of pyarrow.Array or pyarrow.ChunkedArray\n            Equal-length arrays that should form the table.\n        names : list of str, optional\n            Names for the table columns. If not passed, schema must be passed.\n        schema : Schema, default None\n            Schema for the created table. If not passed, names must be passed.\n        metadata : dict or Mapping, default None\n            Optional metadata for the schema (if inferred).\n\n        Returns\n        -------\n        Table\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> n_legs = pa.array([2, 4, 5, 100])\n        >>> animals = pa.array([\"Flamingo\", \"Horse\", \"Brittle stars\", \"Centipede\"])\n        >>> names = [\"n_legs\", \"animals\"]\n\n        Construct a Table from arrays:\n\n        >>> pa.Table.from_arrays([n_legs, animals], names=names)\n        pyarrow.Table\n        n_legs: int64\n        animals: string\n        ----\n        n_legs: [[2,4,5,100]]\n        animals: [[\"Flamingo\",\"Horse\",\"Brittle stars\",\"Centipede\"]]\n\n        Construct a Table from arrays with metadata:\n\n        >>> my_metadata={\"n_legs\": \"Number of legs per animal\"}\n        >>> pa.Table.from_arrays([n_legs, animals],\n        ...                       names=names,\n        ...                       metadata=my_metadata)\n        pyarrow.Table\n        n_legs: int64\n        animals: string\n        ----\n        n_legs: [[2,4,5,100]]\n        animals: [[\"Flamingo\",\"Horse\",\"Brittle stars\",\"Centipede\"]]\n        >>> pa.Table.from_arrays([n_legs, animals],\n        ...                       names=names,\n        ...             ""          metadata=my_metadata).schema\n        n_legs: int64\n        animals: string\n        -- schema metadata --\n        n_legs: 'Number of legs per animal'\n\n        Construct a Table from arrays with pyarrow schema:\n\n        >>> my_schema = pa.schema([\n        ...     pa.field('n_legs', pa.int64()),\n        ...     pa.field('animals', pa.string())],\n        ...     metadata={\"animals\": \"Name of the animal species\"})\n        >>> pa.Table.from_arrays([n_legs, animals],\n        ...                       schema=my_schema)\n        pyarrow.Table\n        n_legs: int64\n        animals: string\n        ----\n        n_legs: [[2,4,5,100]]\n        animals: [[\"Flamingo\",\"Horse\",\"Brittle stars\",\"Centipede\"]]\n        >>> pa.Table.from_arrays([n_legs, animals],\n        ...                       schema=my_schema).schema\n        n_legs: int64\n        animals: string\n        -- schema metadata --\n        animals: 'Name of the animal species'\n        \n        Construct a Table from a StructArray.\n\n        Each field in the StructArray will become a column in the resulting\n        ``Table``.\n\n        Parameters\n        ----------\n        struct_array : StructArray or ChunkedArray\n            Array to construct the table from.\n\n        Returns\n        -------\n        pyarrow.Table\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> struct = pa.array([{'n_legs': 2, 'animals': 'Parrot'},\n        ...                    {'year': 2022, 'n_legs': 4}])\n        >>> pa.Table.from_struct_array(struct).to_pandas()\n          animals  n_legs    year\n        0  Parrot       2     NaN\n        1    None       4  2022.0\n        \n        Construct a Table from a sequence or iterator of Arrow RecordBatches.\n\n        Parameters\n        ----------\n        batches : sequence or iterator of RecordBatch\n            Sequence of RecordBatch to be converted, all schemas must be equal.\n        schema : Schema, default"" None\n            If not passed, will be inferred from the first RecordBatch.\n\n        Returns\n        -------\n        Table\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> n_legs = pa.array([2, 4, 5, 100])\n        >>> animals = pa.array([\"Flamingo\", \"Horse\", \"Brittle stars\", \"Centipede\"])\n        >>> names = [\"n_legs\", \"animals\"]\n        >>> batch = pa.record_batch([n_legs, animals], names=names)\n        >>> batch.to_pandas()\n           n_legs        animals\n        0       2       Flamingo\n        1       4          Horse\n        2       5  Brittle stars\n        3     100      Centipede\n\n        Construct a Table from a RecordBatch:\n\n        >>> pa.Table.from_batches([batch])\n        pyarrow.Table\n        n_legs: int64\n        animals: string\n        ----\n        n_legs: [[2,4,5,100]]\n        animals: [[\"Flamingo\",\"Horse\",\"Brittle stars\",\"Centipede\"]]\n\n        Construct a Table from a sequence of RecordBatches:\n\n        >>> pa.Table.from_batches([batch, batch])\n        pyarrow.Table\n        n_legs: int64\n        animals: string\n        ----\n        n_legs: [[2,4,5,100],[2,4,5,100]]\n        animals: [[\"Flamingo\",\"Horse\",\"Brittle stars\",\"Centipede\"],[\"Flamingo\",\"Horse\",\"Brittle stars\",\"Centipede\"]]\n        \n        Construct a Table or RecordBatch from Arrow arrays or columns.\n\n        Parameters\n        ----------\n        mapping : dict or Mapping\n            A mapping of strings to Arrays or Python lists.\n        schema : Schema, default None\n            If not passed, will be inferred from the Mapping values.\n        metadata : dict or Mapping, default None\n            Optional metadata for the schema (if inferred).\n\n        Returns\n        -------\n        Table or RecordBatch\n\n        Examples\n        --------\n        Table (works similarly for RecordBatch)\n\n        >>> import pyarrow as pa\n        >>> n_legs = pa.array([2, 4, 5, 100])""\n        >>> animals = pa.array([\"Flamingo\", \"Horse\", \"Brittle stars\", \"Centipede\"])\n        >>> pydict = {'n_legs': n_legs, 'animals': animals}\n\n        Construct a Table from a dictionary of arrays:\n\n        >>> pa.Table.from_pydict(pydict)\n        pyarrow.Table\n        n_legs: int64\n        animals: string\n        ----\n        n_legs: [[2,4,5,100]]\n        animals: [[\"Flamingo\",\"Horse\",\"Brittle stars\",\"Centipede\"]]\n        >>> pa.Table.from_pydict(pydict).schema\n        n_legs: int64\n        animals: string\n\n        Construct a Table from a dictionary of arrays with metadata:\n\n        >>> my_metadata={\"n_legs\": \"Number of legs per animal\"}\n        >>> pa.Table.from_pydict(pydict, metadata=my_metadata).schema\n        n_legs: int64\n        animals: string\n        -- schema metadata --\n        n_legs: 'Number of legs per animal'\n\n        Construct a Table from a dictionary of arrays with pyarrow schema:\n\n        >>> my_schema = pa.schema([\n        ...     pa.field('n_legs', pa.int64()),\n        ...     pa.field('animals', pa.string())],\n        ...     metadata={\"n_legs\": \"Number of legs per animal\"})\n        >>> pa.Table.from_pydict(pydict, schema=my_schema).schema\n        n_legs: int64\n        animals: string\n        -- schema metadata --\n        n_legs: 'Number of legs per animal'\n        \n        Construct a Table or RecordBatch from list of rows / dictionaries.\n\n        Parameters\n        ----------\n        mapping : list of dicts of rows\n            A mapping of strings to row values.\n        schema : Schema, default None\n            If not passed, will be inferred from the first row of the\n            mapping values.\n        metadata : dict or Mapping, default None\n            Optional metadata for the schema (if inferred).\n\n        Returns\n        -------\n        Table or RecordBatch\n\n        Examples\n        --------\n        Table (works similarly for RecordBatch)\n\n        >>>"" import pyarrow as pa\n        >>> pylist = [{'n_legs': 2, 'animals': 'Flamingo'},\n        ...           {'n_legs': 4, 'animals': 'Dog'}]\n\n        Construct a Table from a list of rows:\n\n        >>> pa.Table.from_pylist(pylist)\n        pyarrow.Table\n        n_legs: int64\n        animals: string\n        ----\n        n_legs: [[2,4]]\n        animals: [[\"Flamingo\",\"Dog\"]]\n\n        Construct a Table from a list of rows with metadata:\n\n        >>> my_metadata={\"n_legs\": \"Number of legs per animal\"}\n        >>> pa.Table.from_pylist(pylist, metadata=my_metadata).schema\n        n_legs: int64\n        animals: string\n        -- schema metadata --\n        n_legs: 'Number of legs per animal'\n\n        Construct a Table from a list of rows with pyarrow schema:\n\n        >>> my_schema = pa.schema([\n        ...     pa.field('n_legs', pa.int64()),\n        ...     pa.field('animals', pa.string())],\n        ...     metadata={\"n_legs\": \"Number of legs per animal\"})\n        >>> pa.Table.from_pylist(pylist, schema=my_schema).schema\n        n_legs: int64\n        animals: string\n        -- schema metadata --\n        n_legs: 'Number of legs per animal'\n        \n    Construct chunked array from list of array-like objects\n\n    Parameters\n    ----------\n    arrays : Array, list of Array, or array-like\n        Must all be the same data type. Can be empty only if type also passed.\n        Any Arrow-compatible array that implements the Arrow PyCapsule Protocol\n        (has an ``__arrow_c_array__`` or ``__arrow_c_stream__`` method) can be\n        passed as well.\n    type : DataType or string coercible to DataType\n\n    Returns\n    -------\n    ChunkedArray\n\n    Examples\n    --------\n    >>> import pyarrow as pa\n    >>> pa.chunked_array([], type=pa.int8())\n    <pyarrow.lib.ChunkedArray object at ...>\n    [\n    ...\n    ]\n\n    >>> pa.chunked_array([[2, 2, 4], [4, 5, 100]])\n    <pyarrow.lib.ChunkedArray object at ...>\n    [\n      [""\n        2,\n        2,\n        4\n      ],\n      [\n        4,\n        5,\n        100\n      ]\n    ]\n    \n    Construct pyarrow.Schema from collection of fields.\n\n    Parameters\n    ----------\n    fields : iterable of Fields or tuples, or mapping of strings to DataTypes\n        Can also pass an object that implements the Arrow PyCapsule Protocol\n        for schemas (has an ``__arrow_c_schema__`` method).\n    metadata : dict, default None\n        Keys and values must be coercible to bytes.\n\n    Examples\n    --------\n    Create a Schema from iterable of tuples:\n\n    >>> import pyarrow as pa\n    >>> pa.schema([\n    ...     ('some_int', pa.int32()),\n    ...     ('some_string', pa.string()),\n    ...     pa.field('some_required_string', pa.string(), nullable=False)\n    ... ])\n    some_int: int32\n    some_string: string\n    some_required_string: string not null\n\n    Create a Schema from iterable of Fields:\n\n    >>> pa.schema([\n    ...     pa.field('some_int', pa.int32()),\n    ...     pa.field('some_string', pa.string())\n    ... ])\n    some_int: int32\n    some_string: string\n\n    DataTypes can also be passed as strings. The following is equivalent to the\n    above example:\n\n    >>> pa.schema([\n    ...     pa.field('some_int', \"int32\"),\n    ...     pa.field('some_string', \"string\")\n    ... ])\n    some_int: int32\n    some_string: string\n\n    Or more concisely:\n\n    >>> pa.schema([\n    ...     ('some_int', \"int32\"),\n    ...     ('some_string', \"string\")\n    ... ])\n    some_int: int32\n    some_string: string\n\n    Returns\n    -------\n    schema : pyarrow.Schema\n    \n    Convert NumPy dtype to pyarrow.DataType.\n\n    Parameters\n    ----------\n    dtype : the numpy dtype to convert\n\n\n    Examples\n    --------\n    Create a pyarrow DataType from NumPy dtype:\n\n    >>> import pyarrow as pa\n    >>> import numpy as np\n    >>> pa.from_numpy_dtype(np.dtype('float16'))\n    DataType(halffloat)\n    >>> pa.""from_numpy_dtype('U')\n    DataType(string)\n    >>> pa.from_numpy_dtype(bool)\n    DataType(bool)\n    >>> pa.from_numpy_dtype(np.str_)\n    DataType(string)\n    \n        Convert Table to a list of RecordBatch objects.\n\n        Note that this method is zero-copy, it merely exposes the same data\n        under a different API.\n\n        Parameters\n        ----------\n        max_chunksize : int, default None\n            Maximum number of rows for each RecordBatch chunk. Individual chunks\n            may be smaller depending on the chunk layout of individual columns.\n\n        Returns\n        -------\n        list[RecordBatch]\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> import pandas as pd\n        >>> df = pd.DataFrame({'n_legs': [2, 4, 5, 100],\n        ...                    'animals': [\"Flamingo\", \"Horse\", \"Brittle stars\", \"Centipede\"]})\n        >>> table = pa.Table.from_pandas(df)\n\n        Convert a Table to a RecordBatch:\n\n        >>> table.to_batches()[0].to_pandas()\n           n_legs        animals\n        0       2       Flamingo\n        1       4          Horse\n        2       5  Brittle stars\n        3     100      Centipede\n\n        Convert a Table to a list of RecordBatches:\n\n        >>> table.to_batches(max_chunksize=2)[0].to_pandas()\n           n_legs   animals\n        0       2  Flamingo\n        1       4     Horse\n        >>> table.to_batches(max_chunksize=2)[1].to_pandas()\n           n_legs        animals\n        0       5  Brittle stars\n        1     100      Centipede\n        \n        Convert arrow::Tensor to numpy.ndarray with zero copy\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> import numpy as np\n        >>> x = np.array([[2, 2, 4], [4, 5, 100]], np.int32)\n        >>> tensor = pa.Tensor.from_numpy(x, dim_names=[\"dim1\",\"dim2\"])\n        >>> tensor.to_numpy()\n        array([[  2,   2,   4],\n               [  4,   5, 1""00]], dtype=int32)\n        \n        Convert numpy array to a bool8 extension array without making a copy.\n        The input array must be 1-dimensional, with either bool_ or int8 dtype.\n\n        Parameters\n        ----------\n        obj : numpy.ndarray\n\n        Returns\n        -------\n        bool8_array : Bool8Array\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> import numpy as np\n        >>> arr = np.array([True, False, True], dtype=np.bool_)\n        >>> pa.Bool8Array.from_numpy(arr)\n        <pyarrow.lib.Bool8Array object at ...>\n        [\n          1,\n          0,\n          1\n        ]\n        \n        Convert numpy tensors (ndarrays) to a fixed shape tensor extension array.\n        The first dimension of ndarray will become the length of the fixed\n        shape tensor array.\n        If input array data is not contiguous a copy will be made.\n\n        Parameters\n        ----------\n        obj : numpy.ndarray\n        dim_names : tuple or list of strings, default None\n            Explicit names to tensor dimensions.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> import numpy as np\n        >>> arr = np.array(\n        ...         [[[1, 2, 3], [4, 5, 6]], [[1, 2, 3], [4, 5, 6]]],\n        ...         dtype=np.float32)\n        >>> pa.FixedShapeTensorArray.from_numpy_ndarray(arr)\n        <pyarrow.lib.FixedShapeTensorArray object at ...>\n        [\n          [\n            1,\n            2,\n            3,\n            4,\n            5,\n            6\n          ],\n          [\n            1,\n            2,\n            3,\n            4,\n            5,\n            6\n          ]\n        ]\n        \n        Convert pandas.DataFrame to an Arrow RecordBatch\n\n        Parameters\n        ----------\n        df : pandas.DataFrame\n        schema : pyarrow.Schema, optional\n            The expected schema of the RecordBatch. This can be used to\n            i""ndicate the type of columns if we cannot infer it automatically.\n            If passed, the output will have exactly this schema. Columns\n            specified in the schema that are not found in the DataFrame columns\n            or its index will raise an error. Additional columns or index\n            levels in the DataFrame which are not specified in the schema will\n            be ignored.\n        preserve_index : bool, optional\n            Whether to store the index as an additional column in the resulting\n            ``RecordBatch``. The default of None will store the index as a\n            column, except for RangeIndex which is stored as metadata only. Use\n            ``preserve_index=True`` to force it to be stored as a column.\n        nthreads : int, default None\n            If greater than 1, convert columns to Arrow in parallel using\n            indicated number of threads. By default, this follows\n            :func:`pyarrow.cpu_count` (may use up to system CPU count threads).\n        columns : list, optional\n           List of column to be converted. If None, use all columns.\n\n        Returns\n        -------\n        pyarrow.RecordBatch\n\n\n        Examples\n        --------\n        >>> import pandas as pd\n        >>> df = pd.DataFrame({'year': [2020, 2022, 2021, 2022],\n        ...                    'month': [3, 5, 7, 9],\n        ...                    'day': [1, 5, 9, 13],\n        ...                    'n_legs': [2, 4, 5, 100],\n        ...                    'animals': [\"Flamingo\", \"Horse\", \"Brittle stars\", \"Centipede\"]})\n\n        Convert pandas DataFrame to RecordBatch:\n\n        >>> import pyarrow as pa\n        >>> pa.RecordBatch.from_pandas(df)\n        pyarrow.RecordBatch\n        year: int64\n        month: int64\n        day: int64\n        n_legs: int64\n        animals: string\n        ----\n        year: [2020,2022,2021,2022]\n        month: [3,5,7,9]\n        day: [1,5,9,13]\n        n_legs: [2,4,5,100]""\n        animals: [\"Flamingo\",\"Horse\",\"Brittle stars\",\"Centipede\"]\n\n        Convert pandas DataFrame to RecordBatch using schema:\n\n        >>> my_schema = pa.schema([\n        ...     pa.field('n_legs', pa.int64()),\n        ...     pa.field('animals', pa.string())],\n        ...     metadata={\"n_legs\": \"Number of legs per animal\"})\n        >>> pa.RecordBatch.from_pandas(df, schema=my_schema)\n        pyarrow.RecordBatch\n        n_legs: int64\n        animals: string\n        ----\n        n_legs: [2,4,5,100]\n        animals: [\"Flamingo\",\"Horse\",\"Brittle stars\",\"Centipede\"]\n\n        Convert pandas DataFrame to RecordBatch specifying columns:\n\n        >>> pa.RecordBatch.from_pandas(df, columns=[\"n_legs\"])\n        pyarrow.RecordBatch\n        n_legs: int64\n        ----\n        n_legs: [2,4,5,100]\n        \n        Convert pandas.DataFrame to an Arrow Table.\n\n        The column types in the resulting Arrow Table are inferred from the\n        dtypes of the pandas.Series in the DataFrame. In the case of non-object\n        Series, the NumPy dtype is translated to its Arrow equivalent. In the\n        case of `object`, we need to guess the datatype by looking at the\n        Python objects in this Series.\n\n        Be aware that Series of the `object` dtype don't carry enough\n        information to always lead to a meaningful Arrow type. In the case that\n        we cannot infer a type, e.g. because the DataFrame is of length 0 or\n        the Series only contains None/nan objects, the type is set to\n        null. This behavior can be avoided by constructing an explicit schema\n        and passing it to this function.\n\n        Parameters\n        ----------\n        df : pandas.DataFrame\n        schema : pyarrow.Schema, optional\n            The expected schema of the Arrow Table. This can be used to\n            indicate the type of columns if we cannot infer it automatically.\n            If passed, the output will have exa""ctly this schema. Columns\n            specified in the schema that are not found in the DataFrame columns\n            or its index will raise an error. Additional columns or index\n            levels in the DataFrame which are not specified in the schema will\n            be ignored.\n        preserve_index : bool, optional\n            Whether to store the index as an additional column in the resulting\n            ``Table``. The default of None will store the index as a column,\n            except for RangeIndex which is stored as metadata only. Use\n            ``preserve_index=True`` to force it to be stored as a column.\n        nthreads : int, default None\n            If greater than 1, convert columns to Arrow in parallel using\n            indicated number of threads. By default, this follows\n            :func:`pyarrow.cpu_count` (may use up to system CPU count threads).\n        columns : list, optional\n           List of column to be converted. If None, use all columns.\n        safe : bool, default True\n           Check for overflows or other unsafe conversions.\n\n        Returns\n        -------\n        Table\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> import pandas as pd\n        >>> df = pd.DataFrame({'n_legs': [2, 4, 5, 100],\n        ...                    'animals': [\"Flamingo\", \"Horse\", \"Brittle stars\", \"Centipede\"]})\n        >>> pa.Table.from_pandas(df)\n        pyarrow.Table\n        n_legs: int64\n        animals: string\n        ----\n        n_legs: [[2,4,5,100]]\n        animals: [[\"Flamingo\",\"Horse\",\"Brittle stars\",\"Centipede\"]]\n        \n        Convert the Table or RecordBatch to a dict or OrderedDict.\n\n        Parameters\n        ----------\n        maps_as_pydicts : str, optional, default `None`\n            Valid values are `None`, 'lossy', or 'strict'.\n            The default behavior (`None`), is to convert Arrow Map arrays to\n            Python association lists (""list-of-tuples) in the same order as the\n            Arrow Map, as in [(key1, value1), (key2, value2), ...].\n\n            If 'lossy' or 'strict', convert Arrow Map arrays to native Python dicts.\n\n            If 'lossy', whenever duplicate keys are detected, a warning will be printed.\n            The last seen value of a duplicate key will be in the Python dictionary.\n            If 'strict', this instead results in an exception being raised when detected.\n\n        Returns\n        -------\n        dict\n\n        Examples\n        --------\n        Table (works similarly for RecordBatch)\n\n        >>> import pyarrow as pa\n        >>> n_legs = pa.array([2, 2, 4, 4, 5, 100])\n        >>> animals = pa.array([\"Flamingo\", \"Parrot\", \"Dog\", \"Horse\", \"Brittle stars\", \"Centipede\"])\n        >>> table = pa.Table.from_arrays([n_legs, animals], names=[\"n_legs\", \"animals\"])\n        >>> table.to_pydict()\n        {'n_legs': [2, 2, 4, 4, 5, 100], 'animals': ['Flamingo', 'Parrot', ..., 'Centipede']}\n        \n        Convert the Table or RecordBatch to a list of rows / dictionaries.\n\n        Parameters\n        ----------\n        maps_as_pydicts : str, optional, default `None`\n            Valid values are `None`, 'lossy', or 'strict'.\n            The default behavior (`None`), is to convert Arrow Map arrays to\n            Python association lists (list-of-tuples) in the same order as the\n            Arrow Map, as in [(key1, value1), (key2, value2), ...].\n\n            If 'lossy' or 'strict', convert Arrow Map arrays to native Python dicts.\n\n            If 'lossy', whenever duplicate keys are detected, a warning will be printed.\n            The last seen value of a duplicate key will be in the Python dictionary.\n            If 'strict', this instead results in an exception being raised when detected.\n\n        Returns\n        -------\n        list\n\n        Examples\n        --------\n        Table (works similarly for RecordBatch)\n\n    ""    >>> import pyarrow as pa\n        >>> data = [[2, 4, 5, 100],\n        ...         [\"Flamingo\", \"Horse\", \"Brittle stars\", \"Centipede\"]]\n        >>> table = pa.table(data, names=[\"n_legs\", \"animals\"])\n        >>> table.to_pylist()\n        [{'n_legs': 2, 'animals': 'Flamingo'}, {'n_legs': 4, 'animals': 'Horse'}, ...\n        \n        Convert the Table to a RecordBatchReader.\n\n        Note that this method is zero-copy, it merely exposes the same data\n        under a different API.\n\n        Parameters\n        ----------\n        max_chunksize : int, default None\n            Maximum number of rows for each RecordBatch chunk. Individual chunks\n            may be smaller depending on the chunk layout of individual columns.\n\n        Returns\n        -------\n        RecordBatchReader\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> import pandas as pd\n        >>> df = pd.DataFrame({'n_legs': [2, 4, 5, 100],\n        ...                    'animals': [\"Flamingo\", \"Horse\", \"Brittle stars\", \"Centipede\"]})\n        >>> table = pa.Table.from_pandas(df)\n\n        Convert a Table to a RecordBatchReader:\n\n        >>> table.to_reader()\n        <pyarrow.lib.RecordBatchReader object at ...>\n\n        >>> reader = table.to_reader()\n        >>> reader.schema\n        n_legs: int64\n        animals: string\n        -- schema metadata --\n        pandas: '{\"index_columns\": [{\"kind\": \"range\", \"name\": null, \"start\": 0, ...\n        >>> reader.read_all()\n        pyarrow.Table\n        n_legs: int64\n        animals: string\n        ----\n        n_legs: [[2,4,5,100]]\n        animals: [[\"Flamingo\",\"Horse\",\"Brittle stars\",\"Centipede\"]]\n        \n        Convert to a :class:`~pyarrow.Tensor`.\n\n        RecordBatches that can be converted have fields of type signed or unsigned\n        integer or float, including all bit-widths.\n\n        ``null_to_nan`` is ``False`` by default and this metho""d will raise an error in case\n        any nulls are present. RecordBatches with nulls can be converted with ``null_to_nan``\n        set to ``True``. In this case null values are converted to ``NaN`` and integer type\n        arrays are promoted to the appropriate float type.\n\n        Parameters\n        ----------\n        null_to_nan : bool, default False\n            Whether to write null values in the result as ``NaN``.\n        row_major : bool, default True\n            Whether resulting Tensor is row-major or column-major\n        memory_pool : MemoryPool, default None\n            For memory allocations, if required, otherwise use default pool\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> batch = pa.record_batch(\n        ...    [\n        ...         pa.array([1, 2, 3, 4, None], type=pa.int32()),\n        ...         pa.array([10, 20, 30, 40, None], type=pa.float32()),\n        ...     ], names = [\"a\", \"b\"]\n        ... )\n\n        >>> batch\n        pyarrow.RecordBatch\n        a: int32\n        b: float\n        ----\n        a: [1,2,3,4,null]\n        b: [10,20,30,40,null]\n\n        Convert a RecordBatch to row-major Tensor with null values\n        written as ``NaN``s\n\n        >>> batch.to_tensor(null_to_nan=True)\n        <pyarrow.Tensor>\n        type: double\n        shape: (5, 2)\n        strides: (16, 8)\n        >>> batch.to_tensor(null_to_nan=True).to_numpy()\n        array([[ 1., 10.],\n               [ 2., 20.],\n               [ 3., 30.],\n               [ 4., 40.],\n               [nan, nan]])\n\n        Convert a RecordBatch to column-major Tensor\n\n        >>> batch.to_tensor(null_to_nan=True, row_major=False)\n        <pyarrow.Tensor>\n        type: double\n        shape: (5, 2)\n        strides: (8, 40)\n        >>> batch.to_tensor(null_to_nan=True, row_major=False).to_numpy()\n        array([[ 1., 10.],\n               [ 2., 20.],\n               [ 3., 30.],\n               [ 4., 40.],""\n               [nan, nan]])\n        \n        Convert to a list of native Python objects.\n\n        Parameters\n        ----------\n        maps_as_pydicts : str, optional, default `None`\n            Valid values are `None`, 'lossy', or 'strict'.\n            The default behavior (`None`), is to convert Arrow Map arrays to\n            Python association lists (list-of-tuples) in the same order as the\n            Arrow Map, as in [(key1, value1), (key2, value2), ...].\n\n            If 'lossy' or 'strict', convert Arrow Map arrays to native Python dicts.\n\n            If 'lossy', whenever duplicate keys are detected, a warning will be printed.\n            The last seen value of a duplicate key will be in the Python dictionary.\n            If 'strict', this instead results in an exception being raised when detected.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> n_legs = pa.chunked_array([[2, 2, 4], [4, None, 100]])\n        >>> n_legs.to_pylist()\n        [2, 2, 4, 4, None, 100]\n        \n        Convert to a list of single-chunked arrays.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> n_legs = pa.chunked_array([[2, 2, None], [4, 5, 100]])\n        >>> n_legs\n        <pyarrow.lib.ChunkedArray object at ...>\n        [\n          [\n            2,\n            2,\n            null\n          ],\n          [\n            4,\n            5,\n            100\n          ]\n        ]\n        >>> n_legs.chunks\n        [<pyarrow.lib.Int64Array object at ...>\n        [\n          2,\n          2,\n          null\n        ], <pyarrow.lib.Int64Array object at ...>\n        [\n          4,\n          5,\n          100\n        ]]\n        \n        Convert to a pandas-compatible NumPy array or DataFrame, as appropriate\n\n        Parameters\n        ----------\n        memory_pool : MemoryPool, default None\n            Arrow MemoryPool to use for allocations. Uses the default memory\n    ""        pool if not passed.\n        categories : list, default empty\n            List of fields that should be returned as pandas.Categorical. Only\n            applies to table-like data structures.\n        strings_to_categorical : bool, default False\n            Encode string (UTF8) and binary types to pandas.Categorical.\n        zero_copy_only : bool, default False\n            Raise an ArrowException if this function call would require copying\n            the underlying data.\n        integer_object_nulls : bool, default False\n            Cast integers with nulls to objects\n        date_as_object : bool, default True\n            Cast dates to objects. If False, convert to datetime64 dtype with\n            the equivalent time unit (if supported). Note: in pandas version\n            < 2.0, only datetime64[ns] conversion is supported.\n        timestamp_as_object : bool, default False\n            Cast non-nanosecond timestamps (np.datetime64) to objects. This is\n            useful in pandas version 1.x if you have timestamps that don't fit\n            in the normal date range of nanosecond timestamps (1678 CE-2262 CE).\n            Non-nanosecond timestamps are supported in pandas version 2.0.\n            If False, all timestamps are converted to datetime64 dtype.\n        use_threads : bool, default True\n            Whether to parallelize the conversion using multiple threads.\n        deduplicate_objects : bool, default True\n            Do not create multiple copies Python objects when created, to save\n            on memory use. Conversion will be slower.\n        ignore_metadata : bool, default False\n            If True, do not use the 'pandas' metadata to reconstruct the\n            DataFrame index, if present\n        safe : bool, default True\n            For certain data types, a cast is needed in order to store the\n            data in a pandas DataFrame or Series (e.g. timestamps are always\n            stored as nanoseconds in pandas)."" This option controls whether it\n            is a safe cast or not.\n        split_blocks : bool, default False\n            If True, generate one internal \"block\" for each column when\n            creating a pandas.DataFrame from a RecordBatch or Table. While this\n            can temporarily reduce memory note that various pandas operations\n            can trigger \"consolidation\" which may balloon memory use.\n        self_destruct : bool, default False\n            EXPERIMENTAL: If True, attempt to deallocate the originating Arrow\n            memory while converting the Arrow object to pandas. If you use the\n            object after calling to_pandas with this option it will crash your\n            program.\n\n            Note that you may not see always memory usage improvements. For\n            example, if multiple columns share an underlying allocation,\n            memory can't be freed until all columns are converted.\n        maps_as_pydicts : str, optional, default `None`\n            Valid values are `None`, 'lossy', or 'strict'.\n            The default behavior (`None`), is to convert Arrow Map arrays to\n            Python association lists (list-of-tuples) in the same order as the\n            Arrow Map, as in [(key1, value1), (key2, value2), ...].\n\n            If 'lossy' or 'strict', convert Arrow Map arrays to native Python dicts.\n            This can change the ordering of (key, value) pairs, and will\n            deduplicate multiple keys, resulting in a possible loss of data.\n\n            If 'lossy', this key deduplication results in a warning printed\n            when detected. If 'strict', this instead results in an exception\n            being raised when detected.\n        types_mapper : function, default None\n            A function mapping a pyarrow DataType to a pandas ExtensionDtype.\n            This can be used to override the default pandas type for conversion\n            of built-in pyarrow types or in absence of pandas""_metadata in the\n            Table schema. The function receives a pyarrow DataType and is\n            expected to return a pandas ExtensionDtype or ``None`` if the\n            default conversion should be used for that type. If you have\n            a dictionary mapping, you can pass ``dict.get`` as function.\n        coerce_temporal_nanoseconds : bool, default False\n            Only applicable to pandas version >= 2.0.\n            A legacy option to coerce date32, date64, duration, and timestamp\n            time units to nanoseconds when converting to pandas. This is the\n            default behavior in pandas version 1.x. Set this option to True if\n            you'd like to use this coercion when using pandas version >= 2.0\n            for backwards compatibility (not recommended otherwise).\n\n        Returns\n        -------\n        pandas.Series or pandas.DataFrame depending on type of object\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> import pandas as pd\n\n        Convert a Table to pandas DataFrame:\n\n        >>> table = pa.table([\n        ...    pa.array([2, 4, 5, 100]),\n        ...    pa.array([\"Flamingo\", \"Horse\", \"Brittle stars\", \"Centipede\"])\n        ...    ], names=['n_legs', 'animals'])\n        >>> table.to_pandas()\n           n_legs        animals\n        0       2       Flamingo\n        1       4          Horse\n        2       5  Brittle stars\n        3     100      Centipede\n        >>> isinstance(table.to_pandas(), pd.DataFrame)\n        True\n\n        Convert a RecordBatch to pandas DataFrame:\n\n        >>> import pyarrow as pa\n        >>> n_legs = pa.array([2, 4, 5, 100])\n        >>> animals = pa.array([\"Flamingo\", \"Horse\", \"Brittle stars\", \"Centipede\"])\n        >>> batch = pa.record_batch([n_legs, animals],\n        ...                         names=[\"n_legs\", \"animals\"])\n        >>> batch\n        pyarrow.RecordBatch\n        n_legs: int64\n        animals:"" string\n        ----\n        n_legs: [2,4,5,100]\n        animals: [\"Flamingo\",\"Horse\",\"Brittle stars\",\"Centipede\"]\n        >>> batch.to_pandas()\n           n_legs        animals\n        0       2       Flamingo\n        1       4          Horse\n        2       5  Brittle stars\n        3     100      Centipede\n        >>> isinstance(batch.to_pandas(), pd.DataFrame)\n        True\n\n        Convert a Chunked Array to pandas Series:\n\n        >>> import pyarrow as pa\n        >>> n_legs = pa.chunked_array([[2, 2, 4], [4, 5, 100]])\n        >>> n_legs.to_pandas()\n        0      2\n        1      2\n        2      4\n        3      4\n        4      5\n        5    100\n        dtype: int64\n        >>> isinstance(n_legs.to_pandas(), pd.Series)\n        True\n        \n        Convert to an iterator of ChunkArrays.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> n_legs = pa.chunked_array([[2, 2, 4], [4, None, 100]])\n        >>> for i in n_legs.iterchunks():\n        ...     print(i.null_count)\n        ...\n        0\n        1\n\n        Converting to Python dictionary is not supported when duplicate field names are presentConverting to Python dictionary is not supported in strict mode when duplicate keys are present (duplicate key was 'Could not cast \n    Create LargeListType instance from child data type or field.\n\n    This data type may not be supported by all Arrow implementations.\n    Unless you need to represent data larger than 2**31 elements, you should\n    prefer list_().\n\n    Parameters\n    ----------\n    value_type : DataType or Field\n\n    Returns\n    -------\n    list_type : DataType\n\n    Examples\n    --------\n    Create an instance of LargeListType:\n\n    >>> import pyarrow as pa\n    >>> pa.large_list(pa.int8())\n    LargeListType(large_list<item: int8>)\n\n    Use the LargeListType to create an array:\n\n    >>> pa.array([[-1, 3]] * 5, type=pa.large_list(pa.int8()))\n    <pyarrow.li""b.LargeListArray object at ...>\n    [\n      [\n        -1,\n        3\n      ],\n      [\n        -1,\n        3\n      ],\n    ...\n    \n    Create LargeListViewType instance from child data type or field.\n\n    This data type may not be supported by all Arrow implementations\n    because it is an alternative to the ListType.\n\n    Parameters\n    ----------\n    value_type : DataType or Field\n\n    Returns\n    -------\n    list_view_type : DataType\n\n    Examples\n    --------\n    Create an instance of LargeListViewType:\n\n    >>> import pyarrow as pa\n    >>> pa.large_list_view(pa.int8())\n    LargeListViewType(large_list_view<item: int8>)\n    \n    Create ListType instance from child data type or field.\n\n    Parameters\n    ----------\n    value_type : DataType or Field\n    list_size : int, optional, default -1\n        If length == -1 then return a variable length list type. If length is\n        greater than or equal to 0 then return a fixed size list type.\n\n    Returns\n    -------\n    list_type : DataType\n\n    Examples\n    --------\n    Create an instance of ListType:\n\n    >>> import pyarrow as pa\n    >>> pa.list_(pa.string())\n    ListType(list<item: string>)\n    >>> pa.list_(pa.int32(), 2)\n    FixedSizeListType(fixed_size_list<item: int32>[2])\n\n    Use the ListType to create a scalar:\n\n    >>> pa.scalar(['foo', None], type=pa.list_(pa.string(), 2))\n    <pyarrow.FixedSizeListScalar: ['foo', None]>\n\n    or an array:\n\n    >>> pa.array([[1, 2], [3, 4]], pa.list_(pa.int32(), 2))\n    <pyarrow.lib.FixedSizeListArray object at ...>\n    [\n      [\n        1,\n        2\n      ],\n      [\n        3,\n        4\n      ]\n    ]\n    \n    Create ListViewType instance from child data type or field.\n\n    This data type may not be supported by all Arrow implementations\n    because it is an alternative to the ListType.\n\n    Parameters\n    ----------\n    value_type : DataType or Field\n\n    Returns\n    -------\n    list_view_t""ype : DataType\n\n    Examples\n    --------\n    Create an instance of ListViewType:\n\n    >>> import pyarrow as pa\n    >>> pa.list_view(pa.string())\n    ListViewType(list_view<item: string>)\n    \n    Create MapType instance from key and item data types or fields.\n\n    Parameters\n    ----------\n    key_type : DataType or Field\n    item_type : DataType or Field\n    keys_sorted : bool\n\n    Returns\n    -------\n    map_type : DataType\n\n    Examples\n    --------\n    Create an instance of MapType:\n\n    >>> import pyarrow as pa\n    >>> pa.map_(pa.string(), pa.int32())\n    MapType(map<string, int32>)\n    >>> pa.map_(pa.string(), pa.int32(), keys_sorted=True)\n    MapType(map<string, int32, keys_sorted>)\n\n    Use MapType to create an array:\n\n    >>> data = [[{'key': 'a', 'value': 1}, {'key': 'b', 'value': 2}], [{'key': 'c', 'value': 3}]]\n    >>> pa.array(data, type=pa.map_(pa.string(), pa.int32(), keys_sorted=True))\n    <pyarrow.lib.MapArray object at ...>\n    [\n      keys:\n      [\n        \"a\",\n        \"b\"\n      ]\n      values:\n      [\n        1,\n        2\n      ],\n      keys:\n      [\n        \"c\"\n      ]\n      values:\n      [\n        3\n      ]\n    ]\n    \n    Create StructType instance from fields.\n\n    A struct is a nested type parameterized by an ordered sequence of types\n    (which can all be distinct), called its fields.\n\n    Parameters\n    ----------\n    fields : iterable of Fields or tuples, or mapping of strings to DataTypes\n        Each field must have a UTF8-encoded name, and these field names are\n        part of the type metadata.\n\n    Examples\n    --------\n    Create an instance of StructType from an iterable of tuples:\n\n    >>> import pyarrow as pa\n    >>> fields = [\n    ...     ('f1', pa.int32()),\n    ...     ('f2', pa.string()),\n    ... ]\n    >>> struct_type = pa.struct(fields)\n    >>> struct_type\n    StructType(struct<f1: int32, f2: string>)\n\n    Retrieve a field from a StructTyp""e:\n\n    >>> struct_type[0]\n    pyarrow.Field<f1: int32>\n    >>> struct_type['f1']\n    pyarrow.Field<f1: int32>\n\n    Create an instance of StructType from an iterable of Fields:\n\n    >>> fields = [\n    ...     pa.field('f1', pa.int32()),\n    ...     pa.field('f2', pa.string(), nullable=False),\n    ... ]\n    >>> pa.struct(fields)\n    StructType(struct<f1: int32, f2: string not null>)\n\n    Returns\n    -------\n    type : DataType\n    \n    Create UTF8 variable-length string type.\n\n    Examples\n    --------\n    Create an instance of a string type:\n\n    >>> import pyarrow as pa\n    >>> pa.string()\n    DataType(string)\n\n    and use the string type to create an array:\n\n    >>> pa.array(['foo', 'bar', 'baz'], type=pa.string())\n    <pyarrow.lib.StringArray object at ...>\n    [\n      \"foo\",\n      \"bar\",\n      \"baz\"\n    ]\n    \n    Create UTF8 variable-length string view type.\n\n    Examples\n    --------\n    Create an instance of a string type:\n\n    >>> import pyarrow as pa\n    >>> pa.string_view()\n    DataType(string_view)\n    \n        Create a Tensor from a numpy array.\n\n        Parameters\n        ----------\n        obj : numpy.ndarray\n            The source numpy array\n        dim_names : list, optional\n            Names of each dimension of the Tensor.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> import numpy as np\n        >>> x = np.array([[2, 2, 4], [4, 5, 100]], np.int32)\n        >>> pa.Tensor.from_numpy(x, dim_names=[\"dim1\",\"dim2\"])\n        <pyarrow.Tensor>\n        type: int32\n        shape: (2, 3)\n        strides: (12, 4)\n        \n    Create a file of the given size and memory-map it.\n\n    Parameters\n    ----------\n    path : str\n        The file path to create, on the local filesystem.\n    size : int\n        The file size to create.\n\n    Returns\n    -------\n    mmap : MemoryMappedFile\n\n    Examples\n    --------\n    Create a file with a memory ""map:\n\n    >>> import pyarrow as pa\n    >>> with pa.create_memory_map('example_mmap_create.dat', 27) as mmap:\n    ...     mmap.write(b'Create a memory-mapped file')\n    ...     mmap.read_at(10, 9)\n    ...\n    27\n    b'memory-map'\n    \n    Create a pyarrow.Field instance.\n\n    Parameters\n    ----------\n    name : str or bytes\n        Name of the field.\n        Alternatively, you can also pass an object that implements the Arrow\n        PyCapsule Protocol for schemas (has an ``__arrow_c_schema__`` method).\n    type : pyarrow.DataType or str\n        Arrow datatype of the field or a string matching one.\n    nullable : bool, default True\n        Whether the field's values are nullable.\n    metadata : dict, default None\n        Optional field metadata, the keys and values must be coercible to\n        bytes.\n\n    Returns\n    -------\n    field : pyarrow.Field\n\n    Examples\n    --------\n    Create an instance of pyarrow.Field:\n\n    >>> import pyarrow as pa\n    >>> pa.field('key', pa.int32())\n    pyarrow.Field<key: int32>\n    >>> pa.field('key', pa.int32(), nullable=False)\n    pyarrow.Field<key: int32 not null>\n\n    >>> field = pa.field('key', pa.int32(),\n    ...                  metadata={\"key\": \"Something important\"})\n    >>> field\n    pyarrow.Field<key: int32>\n    >>> field.metadata\n    {b'key': b'Something important'}\n\n    Use the field to create a struct type:\n\n    >>> pa.struct([field])\n    StructType(struct<key: int32>)\n\n    A str can also be passed for the type parameter:\n\n    >>> pa.field('key', 'int32')\n    pyarrow.Field<key: int32>\n    \n    Create a pyarrow.RecordBatch from another Python data structure or sequence\n    of arrays.\n\n    Parameters\n    ----------\n    data : dict, list, pandas.DataFrame, Arrow-compatible table\n        A mapping of strings to Arrays or Python lists, a list of Arrays,\n        a pandas DataFame, or any tabular object implementing the\n        Arrow PyCapsule Protocol (has ""an ``__arrow_c_array__`` or\n        ``__arrow_c_device_array__`` method).\n    names : list, default None\n        Column names if list of arrays passed as data. Mutually exclusive with\n        'schema' argument.\n    schema : Schema, default None\n        The expected schema of the RecordBatch. If not passed, will be inferred\n        from the data. Mutually exclusive with 'names' argument.\n    metadata : dict or Mapping, default None\n        Optional metadata for the schema (if schema not passed).\n\n    Returns\n    -------\n    RecordBatch\n\n    See Also\n    --------\n    RecordBatch.from_arrays, RecordBatch.from_pandas, table\n\n    Examples\n    --------\n    >>> import pyarrow as pa\n    >>> n_legs = pa.array([2, 2, 4, 4, 5, 100])\n    >>> animals = pa.array([\"Flamingo\", \"Parrot\", \"Dog\", \"Horse\", \"Brittle stars\", \"Centipede\"])\n    >>> names = [\"n_legs\", \"animals\"]\n\n    Construct a RecordBatch from a python dictionary:\n\n    >>> pa.record_batch({\"n_legs\": n_legs, \"animals\": animals})\n    pyarrow.RecordBatch\n    n_legs: int64\n    animals: string\n    ----\n    n_legs: [2,2,4,4,5,100]\n    animals: [\"Flamingo\",\"Parrot\",\"Dog\",\"Horse\",\"Brittle stars\",\"Centipede\"]\n    >>> pa.record_batch({\"n_legs\": n_legs, \"animals\": animals}).to_pandas()\n       n_legs        animals\n    0       2       Flamingo\n    1       2         Parrot\n    2       4            Dog\n    3       4          Horse\n    4       5  Brittle stars\n    5     100      Centipede\n\n    Creating a RecordBatch from a list of arrays with names:\n\n    >>> pa.record_batch([n_legs, animals], names=names)\n    pyarrow.RecordBatch\n    n_legs: int64\n    animals: string\n    ----\n    n_legs: [2,2,4,4,5,100]\n    animals: [\"Flamingo\",\"Parrot\",\"Dog\",\"Horse\",\"Brittle stars\",\"Centipede\"]\n\n    Creating a RecordBatch from a list of arrays with names and metadata:\n\n    >>> my_metadata={\"n_legs\": \"How many legs does an animal have?\"}\n    >>> p""a.record_batch([n_legs, animals],\n    ...                  names=names,\n    ...                  metadata = my_metadata)\n    pyarrow.RecordBatch\n    n_legs: int64\n    animals: string\n    ----\n    n_legs: [2,2,4,4,5,100]\n    animals: [\"Flamingo\",\"Parrot\",\"Dog\",\"Horse\",\"Brittle stars\",\"Centipede\"]\n    >>> pa.record_batch([n_legs, animals],\n    ...                  names=names,\n    ...                  metadata = my_metadata).schema\n    n_legs: int64\n    animals: string\n    -- schema metadata --\n    n_legs: 'How many legs does an animal have?'\n\n    Creating a RecordBatch from a pandas DataFrame:\n\n    >>> import pandas as pd\n    >>> df = pd.DataFrame({'year': [2020, 2022, 2021, 2022],\n    ...                    'month': [3, 5, 7, 9],\n    ...                    'day': [1, 5, 9, 13],\n    ...                    'n_legs': [2, 4, 5, 100],\n    ...                    'animals': [\"Flamingo\", \"Horse\", \"Brittle stars\", \"Centipede\"]})\n    >>> pa.record_batch(df)\n    pyarrow.RecordBatch\n    year: int64\n    month: int64\n    day: int64\n    n_legs: int64\n    animals: string\n    ----\n    year: [2020,2022,2021,2022]\n    month: [3,5,7,9]\n    day: [1,5,9,13]\n    n_legs: [2,4,5,100]\n    animals: [\"Flamingo\",\"Horse\",\"Brittle stars\",\"Centipede\"]\n\n    >>> pa.record_batch(df).to_pandas()\n       year  month  day  n_legs        animals\n    0  2020      3    1       2       Flamingo\n    1  2022      5    5       4          Horse\n    2  2021      7    9       5  Brittle stars\n    3  2022      9   13     100      Centipede\n\n    Creating a RecordBatch from a pandas DataFrame with schema:\n\n    >>> my_schema = pa.schema([\n    ...     pa.field('n_legs', pa.int64()),\n    ...     pa.field('animals', pa.string())],\n    ...     metadata={\"n_legs\": \"Number of legs per animal\"})\n    >>> pa.record_batch(df, my_schema).schema\n    n_legs: int64\n    animals: string\n    -- schema metadata --\n    n_legs: 'Number of legs per ani""mal'\n    pandas: ...\n    >>> pa.record_batch(df, my_schema).to_pandas()\n       n_legs        animals\n    0       2       Flamingo\n    1       4          Horse\n    2       5  Brittle stars\n    3     100      Centipede\n    \n    Create a pyarrow.Scalar instance from a Python object.\n\n    Parameters\n    ----------\n    value : Any\n        Python object coercible to arrow's type system.\n    type : pyarrow.DataType\n        Explicit type to attempt to coerce to, otherwise will be inferred from\n        the value.\n    from_pandas : bool, default None\n        Use pandas's semantics for inferring nulls from values in\n        ndarray-like data. Defaults to False if not passed explicitly by user,\n        or True if a pandas object is passed in.\n    memory_pool : pyarrow.MemoryPool, optional\n        If not passed, will allocate memory from the currently-set default\n        memory pool.\n\n    Returns\n    -------\n    scalar : pyarrow.Scalar\n\n    Examples\n    --------\n    >>> import pyarrow as pa\n\n    >>> pa.scalar(42)\n    <pyarrow.Int64Scalar: 42>\n\n    >>> pa.scalar(\"string\")\n    <pyarrow.StringScalar: 'string'>\n\n    >>> pa.scalar([1, 2])\n    <pyarrow.ListScalar: [1, 2]>\n\n    >>> pa.scalar([1, 2], type=pa.list_(pa.int16()))\n    <pyarrow.ListScalar: [1, 2]>\n    \n    Create a pyarrow.Table from a Python data structure or sequence of arrays.\n\n    Parameters\n    ----------\n    data : dict, list, pandas.DataFrame, Arrow-compatible table\n        A mapping of strings to Arrays or Python lists, a list of arrays or\n        chunked arrays, a pandas DataFame, or any tabular object implementing\n        the Arrow PyCapsule Protocol (has an ``__arrow_c_array__``,\n        ``__arrow_c_device_array__`` or ``__arrow_c_stream__`` method).\n    names : list, default None\n        Column names if list of arrays passed as data. Mutually exclusive with\n        'schema' argument.\n    schema : Schema, default None\n        The expected schema of the A""rrow Table. If not passed, will be inferred\n        from the data. Mutually exclusive with 'names' argument.\n        If passed, the output will have exactly this schema (raising an error\n        when columns are not found in the data and ignoring additional data not\n        specified in the schema, when data is a dict or DataFrame).\n    metadata : dict or Mapping, default None\n        Optional metadata for the schema (if schema not passed).\n    nthreads : int, default None\n        For pandas.DataFrame inputs: if greater than 1, convert columns to\n        Arrow in parallel using indicated number of threads. By default,\n        this follows :func:`pyarrow.cpu_count` (may use up to system CPU count\n        threads).\n\n    Returns\n    -------\n    Table\n\n    See Also\n    --------\n    Table.from_arrays, Table.from_pandas, Table.from_pydict\n\n    Examples\n    --------\n    >>> import pyarrow as pa\n    >>> n_legs = pa.array([2, 4, 5, 100])\n    >>> animals = pa.array([\"Flamingo\", \"Horse\", \"Brittle stars\", \"Centipede\"])\n    >>> names = [\"n_legs\", \"animals\"]\n\n    Construct a Table from a python dictionary:\n\n    >>> pa.table({\"n_legs\": n_legs, \"animals\": animals})\n    pyarrow.Table\n    n_legs: int64\n    animals: string\n    ----\n    n_legs: [[2,4,5,100]]\n    animals: [[\"Flamingo\",\"Horse\",\"Brittle stars\",\"Centipede\"]]\n\n    Construct a Table from arrays:\n\n    >>> pa.table([n_legs, animals], names=names)\n    pyarrow.Table\n    n_legs: int64\n    animals: string\n    ----\n    n_legs: [[2,4,5,100]]\n    animals: [[\"Flamingo\",\"Horse\",\"Brittle stars\",\"Centipede\"]]\n\n    Construct a Table from arrays with metadata:\n\n    >>> my_metadata={\"n_legs\": \"Number of legs per animal\"}\n    >>> pa.table([n_legs, animals], names=names, metadata = my_metadata).schema\n    n_legs: int64\n    animals: string\n    -- schema metadata --\n    n_legs: 'Number of legs per animal'\n\n    Construct a Table from pandas DataFrame:""\n\n    >>> import pandas as pd\n    >>> df = pd.DataFrame({'year': [2020, 2022, 2019, 2021],\n    ...                    'n_legs': [2, 4, 5, 100],\n    ...                    'animals': [\"Flamingo\", \"Horse\", \"Brittle stars\", \"Centipede\"]})\n    >>> pa.table(df)\n    pyarrow.Table\n    year: int64\n    n_legs: int64\n    animals: string\n    ----\n    year: [[2020,2022,2019,2021]]\n    n_legs: [[2,4,5,100]]\n    animals: [[\"Flamingo\",\"Horse\",\"Brittle stars\",\"Centipede\"]]\n\n    Construct a Table from pandas DataFrame with pyarrow schema:\n\n    >>> my_schema = pa.schema([\n    ...     pa.field('n_legs', pa.int64()),\n    ...     pa.field('animals', pa.string())],\n    ...     metadata={\"n_legs\": \"Number of legs per animal\"})\n    >>> pa.table(df, my_schema).schema\n    n_legs: int64\n    animals: string\n    -- schema metadata --\n    n_legs: 'Number of legs per animal'\n    pandas: '{\"index_columns\": [], \"column_indexes\": [{\"name\": null, ...\n\n    Construct a Table from chunked arrays:\n\n    >>> n_legs = pa.chunked_array([[2, 2, 4], [4, 5, 100]])\n    >>> animals = pa.chunked_array([[\"Flamingo\", \"Parrot\", \"Dog\"], [\"Horse\", \"Brittle stars\", \"Centipede\"]])\n    >>> table = pa.table([n_legs, animals], names=names)\n    >>> table\n    pyarrow.Table\n    n_legs: int64\n    animals: string\n    ----\n    n_legs: [[2,2,4],[4,5,100]]\n    animals: [[\"Flamingo\",\"Parrot\",\"Dog\"],[\"Horse\",\"Brittle stars\",\"Centipede\"]]\n    \n    Create a strongly-typed Array instance with all elements null.\n\n    Parameters\n    ----------\n    size : int\n        Array length.\n    type : pyarrow.DataType, default None\n        Explicit type for the array. By default use NullType.\n    memory_pool : MemoryPool, default None\n        Arrow MemoryPool to use for allocations. Uses the default memory\n        pool if not passed.\n\n    Returns\n    -------\n    arr : Array\n\n    Examples\n    --------\n    >>> import pyarrow as pa\n    >>> pa.""nulls(10)\n    <pyarrow.lib.NullArray object at ...>\n    10 nulls\n\n    >>> pa.nulls(3, pa.uint32())\n    <pyarrow.lib.UInt32Array object at ...>\n    [\n      null,\n      null,\n      null\n    ]\n    \n    Create a variable-length binary view type.\n\n    Examples\n    --------\n    Create an instance of a string type:\n\n    >>> import pyarrow as pa\n    >>> pa.binary_view()\n    DataType(binary_view)\n    \n    Create an Array instance whose slots are the given scalar.\n\n    Parameters\n    ----------\n    value : Scalar-like object\n        Either a pyarrow.Scalar or any python object coercible to a Scalar.\n    size : int\n        Number of times to repeat the scalar in the output Array.\n    memory_pool : MemoryPool, default None\n        Arrow MemoryPool to use for allocations. Uses the default memory\n        pool if not passed.\n\n    Returns\n    -------\n    arr : Array\n\n    Examples\n    --------\n    >>> import pyarrow as pa\n    >>> pa.repeat(10, 3)\n    <pyarrow.lib.Int64Array object at ...>\n    [\n      10,\n      10,\n      10\n    ]\n\n    >>> pa.repeat([1, 2], 2)\n    <pyarrow.lib.ListArray object at ...>\n    [\n      [\n        1,\n        2\n      ],\n      [\n        1,\n        2\n      ]\n    ]\n\n    >>> pa.repeat(\"string\", 3)\n    <pyarrow.lib.StringArray object at ...>\n    [\n      \"string\",\n      \"string\",\n      \"string\"\n    ]\n\n    >>> pa.repeat(pa.scalar({'a': 1, 'b': [1, 2]}), 2)\n    <pyarrow.lib.StructArray object at ...>\n    -- is_valid: all not null\n    -- child 0 type: int64\n      [\n        1,\n        1\n      ]\n    -- child 1 type: list<item: int64>\n      [\n        [\n          1,\n          2\n        ],\n        [\n          1,\n          2\n        ]\n      ]\n    \n    Create an Arrow input stream.\n\n    Parameters\n    ----------\n    source : str, Path, buffer, or file-like object\n        The source to open for reading.\n    compression : str optional, default 'detect'\n        The compressio""n algorithm to use for on-the-fly decompression.\n        If \"detect\" and source is a file path, then compression will be\n        chosen based on the file extension.\n        If None, no compression will be applied.\n        Otherwise, a well-known algorithm name must be supplied (e.g. \"gzip\").\n    buffer_size : int, default None\n        If None or 0, no buffering will happen. Otherwise the size of the\n        temporary read buffer.\n\n    Examples\n    --------\n    Create a readable BufferReader (NativeFile) from a Buffer or a memoryview object:\n\n    >>> import pyarrow as pa\n    >>> buf = memoryview(b\"some data\")\n    >>> with pa.input_stream(buf) as stream:\n    ...     stream.read(4)\n    ...\n    b'some'\n\n    Create a readable OSFile (NativeFile) from a string or file path:\n\n    >>> import gzip\n    >>> with gzip.open('example.gz', 'wb') as f:\n    ...     f.write(b'some data')\n    ...\n    9\n    >>> with pa.input_stream('example.gz') as stream:\n    ...     stream.read()\n    ...\n    b'some data'\n\n    Create a readable PythonFile (NativeFile) from a a Python file object:\n\n    >>> with open('example.txt', mode='w') as f:\n    ...     f.write('some text')\n    ...\n    9\n    >>> with pa.input_stream('example.txt') as stream:\n    ...     stream.read(6)\n    ...\n    b'some t'\n    \n    Create an Arrow output stream.\n\n    Parameters\n    ----------\n    source : str, Path, buffer, file-like object\n        The source to open for writing.\n    compression : str optional, default 'detect'\n        The compression algorithm to use for on-the-fly compression.\n        If \"detect\" and source is a file path, then compression will be\n        chosen based on the file extension.\n        If None, no compression will be applied.\n        Otherwise, a well-known algorithm name must be supplied (e.g. \"gzip\").\n    buffer_size : int, default None\n        If None or 0, no buffering will happen. Otherwise the size of the\n        temporary writ""e buffer.\n\n    Examples\n    --------\n    Create a writable NativeFile from a pyarrow Buffer:\n\n    >>> import pyarrow as pa\n    >>> data = b\"buffer data\"\n    >>> empty_obj = bytearray(11)\n    >>> buf = pa.py_buffer(empty_obj)\n    >>> with pa.output_stream(buf) as stream:\n    ...     stream.write(data)\n    ...\n    11\n    >>> with pa.input_stream(buf) as stream:\n    ...     stream.read(6)\n    ...\n    b'buffer'\n\n    or from a memoryview object:\n\n    >>> buf = memoryview(empty_obj)\n    >>> with pa.output_stream(buf) as stream:\n    ...     stream.write(data)\n    ...\n    11\n    >>> with pa.input_stream(buf) as stream:\n    ...     stream.read()\n    ...\n    b'buffer data'\n\n    Create a writable NativeFile from a string or file path:\n\n    >>> with pa.output_stream('example_second.txt') as stream:\n    ...     stream.write(b'Write some data')\n    ...\n    15\n    >>> with pa.input_stream('example_second.txt') as stream:\n    ...     stream.read()\n    ...\n    b'Write some data'\n    \n    Create decimal type with precision and scale and 32-bit width.\n\n    Arrow decimals are fixed-point decimal numbers encoded as a scaled\n    integer.  The precision is the number of significant digits that the\n    decimal type can represent; the scale is the number of digits after\n    the decimal point (note the scale can be negative).\n\n    As an example, ``decimal32(7, 3)`` can exactly represent the numbers\n    1234.567 and -1234.567 (encoded internally as the 32-bit integers\n    1234567 and -1234567, respectively), but neither 12345.67 nor 123.4567.\n\n    ``decimal32(5, -3)`` can exactly represent the number 12345000\n    (encoded internally as the 32-bit integer 12345), but neither\n    123450000 nor 1234500.\n\n    If you need a precision higher than 9 significant digits, consider\n    using ``decimal64``, ``decimal128``, or ``decimal256``.\n\n    Parameters\n    ----------\n    precision : int\n        Must be between 1 and 9\n    scale : int""\n\n    Returns\n    -------\n    decimal_type : Decimal32Type\n\n    Examples\n    --------\n    Create an instance of decimal type:\n\n    >>> import pyarrow as pa\n    >>> pa.decimal32(5, 2)\n    Decimal32Type(decimal32(5, 2))\n\n    Create an array with decimal type:\n\n    >>> import decimal\n    >>> a = decimal.Decimal('123.45')\n    >>> pa.array([a], pa.decimal32(5, 2))\n    <pyarrow.lib.Decimal32Array object at ...>\n    [\n      123.45\n    ]\n    \n    Create decimal type with precision and scale and 64-bit width.\n\n    Arrow decimals are fixed-point decimal numbers encoded as a scaled\n    integer.  The precision is the number of significant digits that the\n    decimal type can represent; the scale is the number of digits after\n    the decimal point (note the scale can be negative).\n\n    As an example, ``decimal64(7, 3)`` can exactly represent the numbers\n    1234.567 and -1234.567 (encoded internally as the 64-bit integers\n    1234567 and -1234567, respectively), but neither 12345.67 nor 123.4567.\n\n    ``decimal64(5, -3)`` can exactly represent the number 12345000\n    (encoded internally as the 64-bit integer 12345), but neither\n    123450000 nor 1234500.\n\n    If you need a precision higher than 18 significant digits, consider\n    using ``decimal128``, or ``decimal256``.\n\n    Parameters\n    ----------\n    precision : int\n        Must be between 1 and 18\n    scale : int\n\n    Returns\n    -------\n    decimal_type : Decimal64Type\n\n    Examples\n    --------\n    Create an instance of decimal type:\n\n    >>> import pyarrow as pa\n    >>> pa.decimal64(5, 2)\n    Decimal64Type(decimal64(5, 2))\n\n    Create an array with decimal type:\n\n    >>> import decimal\n    >>> a = decimal.Decimal('123.45')\n    >>> pa.array([a], pa.decimal64(5, 2))\n    <pyarrow.lib.Decimal64Array object at ...>\n    [\n      123.45\n    ]\n    \n    Create decimal type with precision and scale and 128-bit width.\n\n    Arrow decimals are fixed-point decimal ""numbers encoded as a scaled\n    integer.  The precision is the number of significant digits that the\n    decimal type can represent; the scale is the number of digits after\n    the decimal point (note the scale can be negative).\n\n    As an example, ``decimal128(7, 3)`` can exactly represent the numbers\n    1234.567 and -1234.567 (encoded internally as the 128-bit integers\n    1234567 and -1234567, respectively), but neither 12345.67 nor 123.4567.\n\n    ``decimal128(5, -3)`` can exactly represent the number 12345000\n    (encoded internally as the 128-bit integer 12345), but neither\n    123450000 nor 1234500.\n\n    If you need a precision higher than 38 significant digits, consider\n    using ``decimal256``.\n\n    Parameters\n    ----------\n    precision : int\n        Must be between 1 and 38\n    scale : int\n\n    Returns\n    -------\n    decimal_type : Decimal128Type\n\n    Examples\n    --------\n    Create an instance of decimal type:\n\n    >>> import pyarrow as pa\n    >>> pa.decimal128(5, 2)\n    Decimal128Type(decimal128(5, 2))\n\n    Create an array with decimal type:\n\n    >>> import decimal\n    >>> a = decimal.Decimal('123.45')\n    >>> pa.array([a], pa.decimal128(5, 2))\n    <pyarrow.lib.Decimal128Array object at ...>\n    [\n      123.45\n    ]\n    \n    Create double-precision floating point type.\n\n    Examples\n    --------\n    Create an instance of float64 type:\n\n    >>> import pyarrow as pa\n    >>> pa.float64()\n    DataType(double)\n    >>> print(pa.float64())\n    double\n\n    Create an array with float64 type:\n\n    >>> pa.array([0.0, 1.0, 2.0], type=pa.float64())\n    <pyarrow.lib.DoubleArray object at ...>\n    [\n      0,\n      1,\n      2\n    ]\n    \n    Create half-precision floating point type.\n\n    Examples\n    --------\n    Create an instance of float16 type:\n\n    >>> import pyarrow as pa\n    >>> pa.float16()\n    DataType(halffloat)\n    >>> print(pa.float16())\n    halffloat\n\n    Create an array with ""float16 type:\n\n    >>> arr = np.array([1.5, np.nan], dtype=np.float16)\n    >>> a = pa.array(arr, type=pa.float16())\n    >>> a\n    <pyarrow.lib.HalfFloatArray object at ...>\n    [\n      1.5,\n      nan\n    ]\n\n    Note that unlike other float types, if you convert this array\n    to a python list, the types of its elements will be ``np.float16``\n\n    >>> [type(val) for val in a.to_pylist()]\n    [<class 'float'>, <class 'float'>]\n    \n    Create instance of 32-bit date (days since UNIX epoch 1970-01-01).\n\n    Examples\n    --------\n    Create an instance of 32-bit date type:\n\n    >>> import pyarrow as pa\n    >>> pa.date32()\n    DataType(date32[day])\n\n    Create a scalar with 32-bit date type:\n\n    >>> from datetime import date\n    >>> pa.scalar(date(2012, 1, 1), type=pa.date32())\n    <pyarrow.Date32Scalar: datetime.date(2012, 1, 1)>\n    \n    Create instance of 32-bit time (time of day) type with unit resolution.\n\n    Parameters\n    ----------\n    unit : str\n        one of 's' [second], or 'ms' [millisecond]\n\n    Returns\n    -------\n    type : pyarrow.Time32Type\n\n    Examples\n    --------\n    >>> import pyarrow as pa\n    >>> pa.time32('s')\n    Time32Type(time32[s])\n    >>> pa.time32('ms')\n    Time32Type(time32[ms])\n    \n    Create instance of 64-bit date (milliseconds since UNIX epoch 1970-01-01).\n\n    Examples\n    --------\n    Create an instance of 64-bit date type:\n\n    >>> import pyarrow as pa\n    >>> pa.date64()\n    DataType(date64[ms])\n\n    Create a scalar with 64-bit date type:\n\n    >>> from datetime import datetime\n    >>> pa.scalar(datetime(2012, 1, 1), type=pa.date64())\n    <pyarrow.Date64Scalar: datetime.date(2012, 1, 1)>\n    \n    Create instance of 64-bit time (time of day) type with unit resolution.\n\n    Parameters\n    ----------\n    unit : str\n        One of 'us' [microsecond], or 'ns' [nanosecond].\n\n    Returns\n    -------\n    type : pyarrow.Time64Type\n\n    Examples\n    --------""\n    >>> import pyarrow as pa\n    >>> pa.time64('us')\n    Time64Type(time64[us])\n    >>> pa.time64('ns')\n    Time64Type(time64[ns])\n    \n    Create instance of JSON extension type.\n\n    Parameters\n    ----------\n    storage_type : DataType, default pyarrow.string()\n        The underlying data type. Can be on of the following types:\n        string, large_string, string_view.\n\n    Returns\n    -------\n    type : JsonType\n\n    Examples\n    --------\n    Create an instance of JSON extension type:\n\n    >>> import pyarrow as pa\n    >>> pa.json_(pa.utf8())\n    JsonType(extension<arrow.json>)\n\n    Use the JSON type to create an array:\n\n    >>> pa.array(['{\"a\": 1}', '{\"b\": 2}'], type=pa.json_(pa.utf8()))\n    <pyarrow.lib.JsonArray object at ...>\n    [\n      \"{\"a\": 1}\",\n      \"{\"b\": 2}\"\n    ]\n    \n    Create instance of a duration type with unit resolution.\n\n    Parameters\n    ----------\n    unit : str\n        One of 's' [second], 'ms' [millisecond], 'us' [microsecond], or\n        'ns' [nanosecond].\n\n    Returns\n    -------\n    type : pyarrow.DurationType\n\n    Examples\n    --------\n    Create an instance of duration type:\n\n    >>> import pyarrow as pa\n    >>> pa.duration('us')\n    DurationType(duration[us])\n    >>> pa.duration('s')\n    DurationType(duration[s])\n\n    Create an array with duration type:\n\n    >>> pa.array([0, 1, 2], type=pa.duration('s'))\n    <pyarrow.lib.DurationArray object at ...>\n    [\n      0,\n      1,\n      2\n    ]\n    \n    Create instance of an interval type representing months, days and\n    nanoseconds between two dates.\n\n    Examples\n    --------\n    Create an instance of an month_day_nano_interval type:\n\n    >>> import pyarrow as pa\n    >>> pa.month_day_nano_interval()\n    DataType(month_day_nano_interval)\n\n    Create a scalar with month_day_nano_interval type:\n\n    >>> pa.scalar((1, 15, -30), type=pa.month_day_nano_interval())\n    <pyarrow.MonthDayNanoIntervalS""calar: MonthDayNano(months=1, days=15, nanoseconds=-30)>\n    \n    Create instance of bool8 extension type.\n\n    Examples\n    --------\n    Create an instance of bool8 extension type:\n\n    >>> import pyarrow as pa\n    >>> type = pa.bool8()\n    >>> type\n    Bool8Type(extension<arrow.bool8>)\n\n    Inspect the data type:\n\n    >>> type.storage_type\n    DataType(int8)\n\n    Create a table with a bool8 array:\n\n    >>> arr = [-1, 0, 1, 2, None]\n    >>> storage = pa.array(arr, pa.int8())\n    >>> other = pa.ExtensionArray.from_storage(type, storage)\n    >>> pa.table([other], names=[\"unknown_col\"])\n    pyarrow.Table\n    unknown_col: extension<arrow.bool8>\n    ----\n    unknown_col: [[-1,0,1,2,null]]\n\n    Returns\n    -------\n    type : Bool8Type\n    \n    Create instance of boolean type.\n\n    Examples\n    --------\n    Create an instance of a boolean type:\n\n    >>> import pyarrow as pa\n    >>> pa.bool_()\n    DataType(bool)\n    >>> print(pa.bool_())\n    bool\n\n    Create a ``Field`` type with a boolean type\n    and a name:\n\n    >>> pa.field('bool_field', pa.bool_())\n    pyarrow.Field<bool_field: bool>\n    \n    Create instance of fixed shape tensor extension type with shape and optional\n    names of tensor dimensions and indices of the desired logical\n    ordering of dimensions.\n\n    Parameters\n    ----------\n    value_type : DataType\n        Data type of individual tensor elements.\n    shape : tuple or list of integers\n        The physical shape of the contained tensors.\n    dim_names : tuple or list of strings, default None\n        Explicit names to tensor dimensions.\n    permutation : tuple or list integers, default None\n        Indices of the desired ordering of the original dimensions.\n        The indices contain a permutation of the values ``[0, 1, .., N-1]`` where\n        N is the number of dimensions. The permutation indicates which dimension\n        of the logical layout corresponds to which dimension of the p""hysical tensor.\n        For more information on this parameter see\n        :ref:`fixed_shape_tensor_extension`.\n\n    Examples\n    --------\n    Create an instance of fixed shape tensor extension type:\n\n    >>> import pyarrow as pa\n    >>> tensor_type = pa.fixed_shape_tensor(pa.int32(), [2, 2])\n    >>> tensor_type\n    FixedShapeTensorType(extension<arrow.fixed_shape_tensor[value_type=int32, shape=[2,2]]>)\n\n    Inspect the data type:\n\n    >>> tensor_type.value_type\n    DataType(int32)\n    >>> tensor_type.shape\n    [2, 2]\n\n    Create a table with fixed shape tensor extension array:\n\n    >>> arr = [[1, 2, 3, 4], [10, 20, 30, 40], [100, 200, 300, 400]]\n    >>> storage = pa.array(arr, pa.list_(pa.int32(), 4))\n    >>> tensor = pa.ExtensionArray.from_storage(tensor_type, storage)\n    >>> pa.table([tensor], names=[\"tensor_array\"])\n    pyarrow.Table\n    tensor_array: extension<arrow.fixed_shape_tensor[value_type=int32, shape=[2,2]]>\n    ----\n    tensor_array: [[[1,2,3,4],[10,20,30,40],[100,200,300,400]]]\n\n    Create an instance of fixed shape tensor extension type with names\n    of tensor dimensions:\n\n    >>> tensor_type = pa.fixed_shape_tensor(pa.int8(), (2, 2, 3),\n    ...                                     dim_names=['C', 'H', 'W'])\n    >>> tensor_type.dim_names\n    ['C', 'H', 'W']\n\n    Create an instance of fixed shape tensor extension type with\n    permutation:\n\n    >>> tensor_type = pa.fixed_shape_tensor(pa.int8(), (2, 2, 3),\n    ...                                     permutation=[0, 2, 1])\n    >>> tensor_type.permutation\n    [0, 2, 1]\n\n    Returns\n    -------\n    type : FixedShapeTensorType\n    \n    Create instance of null type.\n\n    Examples\n    --------\n    Create an instance of a null type:\n\n    >>> import pyarrow as pa\n    >>> pa.null()\n    DataType(null)\n    >>> print(pa.null())\n    null\n\n    Create a ``Field`` type with a null type and a name:\n\n    >>> pa.field('null_field', pa.null())\n    pyarro""w.Field<null_field: null>\n    \n    Create instance of opaque extension type.\n\n    Parameters\n    ----------\n    storage_type : DataType\n        The underlying data type.\n    type_name : str\n        The name of the type in the external system.\n    vendor_name : str\n        The name of the external system.\n\n    Examples\n    --------\n    Create an instance of an opaque extension type:\n\n    >>> import pyarrow as pa\n    >>> type = pa.opaque(pa.binary(), \"other\", \"jdbc\")\n    >>> type\n    OpaqueType(extension<arrow.opaque[storage_type=binary, type_name=other, vendor_name=jdbc]>)\n\n    Inspect the data type:\n\n    >>> type.storage_type\n    DataType(binary)\n    >>> type.type_name\n    'other'\n    >>> type.vendor_name\n    'jdbc'\n\n    Create a table with an opaque array:\n\n    >>> arr = [None, b\"foobar\"]\n    >>> storage = pa.array(arr, pa.binary())\n    >>> other = pa.ExtensionArray.from_storage(type, storage)\n    >>> pa.table([other], names=[\"unknown_col\"])\n    pyarrow.Table\n    unknown_col: extension<arrow.opaque[storage_type=binary, type_name=other, vendor_name=jdbc]>\n    ----\n    unknown_col: [[null,666F6F626172]]\n\n    Returns\n    -------\n    type : OpaqueType\n    \n    Create instance of signed int16 type.\n\n    Examples\n    --------\n    Create an instance of int16 type:\n\n    >>> import pyarrow as pa\n    >>> pa.int16()\n    DataType(int16)\n    >>> print(pa.int16())\n    int16\n\n    Create an array with int16 type:\n\n    >>> pa.array([0, 1, 2], type=pa.int16())\n    <pyarrow.lib.Int16Array object at ...>\n    [\n      0,\n      1,\n      2\n    ]\n    \n    Create instance of signed int32 type.\n\n    Examples\n    --------\n    Create an instance of int32 type:\n\n    >>> import pyarrow as pa\n    >>> pa.int32()\n    DataType(int32)\n    >>> print(pa.int32())\n    int32\n\n    Create an array with int32 type:\n\n    >>> pa.array([0, 1, 2], type=pa.int32())\n    <pyarrow.lib.Int32Array object at ...>\n    [\n      0,""\n      1,\n      2\n    ]\n    \n    Create instance of signed int64 type.\n\n    Examples\n    --------\n    Create an instance of int64 type:\n\n    >>> import pyarrow as pa\n    >>> pa.int64()\n    DataType(int64)\n    >>> print(pa.int64())\n    int64\n\n    Create an array with int64 type:\n\n    >>> pa.array([0, 1, 2], type=pa.int64())\n    <pyarrow.lib.Int64Array object at ...>\n    [\n      0,\n      1,\n      2\n    ]\n    \n    Create instance of signed int8 type.\n\n    Examples\n    --------\n    Create an instance of int8 type:\n\n    >>> import pyarrow as pa\n    >>> pa.int8()\n    DataType(int8)\n    >>> print(pa.int8())\n    int8\n\n    Create an array with int8 type:\n\n    >>> pa.array([0, 1, 2], type=pa.int8())\n    <pyarrow.lib.Int8Array object at ...>\n    [\n      0,\n      1,\n      2\n    ]\n    \n    Create instance of timestamp type with resolution and optional time zone.\n\n    Parameters\n    ----------\n    unit : str\n        one of 's' [second], 'ms' [millisecond], 'us' [microsecond], or 'ns'\n        [nanosecond]\n    tz : str, default None\n        Time zone name. None indicates time zone naive\n\n    Examples\n    --------\n    Create an instance of timestamp type:\n\n    >>> import pyarrow as pa\n    >>> pa.timestamp('us')\n    TimestampType(timestamp[us])\n    >>> pa.timestamp('s', tz='America/New_York')\n    TimestampType(timestamp[s, tz=America/New_York])\n    >>> pa.timestamp('s', tz='+07:30')\n    TimestampType(timestamp[s, tz=+07:30])\n\n    Use timestamp type when creating a scalar object:\n\n    >>> from datetime import datetime\n    >>> pa.scalar(datetime(2012, 1, 1), type=pa.timestamp('s', tz='UTC'))\n    <pyarrow.TimestampScalar: '2012-01-01T00:00:00+0000'>\n    >>> pa.scalar(datetime(2012, 1, 1), type=pa.timestamp('us'))\n    <pyarrow.TimestampScalar: '2012-01-01T00:00:00.000000'>\n\n    Returns\n    -------\n    timestamp_type : TimestampType\n    \n    Create instance of unsigned int8 type.\n\n    Examples\n    ------""--\n    Create an instance of unsigned int8 type:\n\n    >>> import pyarrow as pa\n    >>> pa.uint8()\n    DataType(uint8)\n    >>> print(pa.uint8())\n    uint8\n\n    Create an array with unsigned int8 type:\n\n    >>> pa.array([0, 1, 2], type=pa.uint8())\n    <pyarrow.lib.UInt8Array object at ...>\n    [\n      0,\n      1,\n      2\n    ]\n    \n    Create instance of unsigned uint16 type.\n\n    Examples\n    --------\n    Create an instance of unsigned int16 type:\n\n    >>> import pyarrow as pa\n    >>> pa.uint16()\n    DataType(uint16)\n    >>> print(pa.uint16())\n    uint16\n\n    Create an array with unsigned int16 type:\n\n    >>> pa.array([0, 1, 2], type=pa.uint16())\n    <pyarrow.lib.UInt16Array object at ...>\n    [\n      0,\n      1,\n      2\n    ]\n    \n    Create instance of unsigned uint32 type.\n\n    Examples\n    --------\n    Create an instance of unsigned int32 type:\n\n    >>> import pyarrow as pa\n    >>> pa.uint32()\n    DataType(uint32)\n    >>> print(pa.uint32())\n    uint32\n\n    Create an array with unsigned int32 type:\n\n    >>> pa.array([0, 1, 2], type=pa.uint32())\n    <pyarrow.lib.UInt32Array object at ...>\n    [\n      0,\n      1,\n      2\n    ]\n    \n    Create instance of unsigned uint64 type.\n\n    Examples\n    --------\n    Create an instance of unsigned int64 type:\n\n    >>> import pyarrow as pa\n    >>> pa.uint64()\n    DataType(uint64)\n    >>> print(pa.uint64())\n    uint64\n\n    Create an array with unsigned uint64 type:\n\n    >>> pa.array([0, 1, 2], type=pa.uint64())\n    <pyarrow.lib.UInt64Array object at ...>\n    [\n      0,\n      1,\n      2\n    ]\n    \n    Create large UTF8 variable-length string type.\n\n    This data type may not be supported by all Arrow implementations.  Unless\n    you need to represent data larger than 2GB, you should prefer string().\n\n    Examples\n    --------\n    Create an instance of large UTF8 variable-length binary type:\n\n    >>> import pyarrow as pa\n    >>> pa.large""_string()\n    DataType(large_string)\n\n    and use the type to create an array:\n\n    >>> pa.array(['foo', 'bar'] * 50, type=pa.large_string())\n    <pyarrow.lib.LargeStringArray object at ...>\n    [\n      \"foo\",\n      \"bar\",\n      ...\n      \"foo\",\n      \"bar\"\n    ]\n    \n    Create large variable-length binary type.\n\n    This data type may not be supported by all Arrow implementations.  Unless\n    you need to represent data larger than 2GB, you should prefer binary().\n\n    Examples\n    --------\n    Create an instance of large variable-length binary type:\n\n    >>> import pyarrow as pa\n    >>> pa.large_binary()\n    DataType(large_binary)\n\n    and use the type to create an array:\n\n    >>> pa.array(['foo', 'bar', 'baz'], type=pa.large_binary())\n    <pyarrow.lib.LargeBinaryArray object at ...>\n    [\n      666F6F,\n      626172,\n      62617A\n    ]\n    \n        Create new RecordBatch with the indicated column removed.\n\n        Parameters\n        ----------\n        i : int\n            Index of column to remove.\n\n        Returns\n        -------\n        Table\n            New record batch without the column.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> import pandas as pd\n        >>> df = pd.DataFrame({'n_legs': [2, 4, 5, 100],\n        ...                    'animals': [\"Flamingo\", \"Horse\", \"Brittle stars\", \"Centipede\"]})\n        >>> batch = pa.RecordBatch.from_pandas(df)\n        >>> batch.remove_column(1)\n        pyarrow.RecordBatch\n        n_legs: int64\n        ----\n        n_legs: [2,4,5,100]\n        \n        Create new Table with the indicated column removed.\n\n        Parameters\n        ----------\n        i : int\n            Index of column to remove.\n\n        Returns\n        -------\n        Table\n            New table without the column.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> import pandas as pd\n        >>> ""df = pd.DataFrame({'n_legs': [2, 4, 5, 100],\n        ...                    'animals': [\"Flamingo\", \"Horse\", \"Brittle stars\", \"Centipede\"]})\n        >>> table = pa.Table.from_pandas(df)\n        >>> table.remove_column(1)\n        pyarrow.Table\n        n_legs: int64\n        ----\n        n_legs: [[2,4,5,100]]\n        \n        Create new field without metadata, if any\n\n        Returns\n        -------\n        field : pyarrow.Field\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> field = pa.field('key', pa.int32(),\n        ...                  metadata={\"key\": \"Something important\"})\n        >>> field.metadata\n        {b'key': b'Something important'}\n\n        Create new field by removing the metadata from the existing one:\n\n        >>> field_new = field.remove_metadata()\n        >>> field_new.metadata\n        \n        Create new record batch with columns renamed to provided names.\n\n        Parameters\n        ----------\n        names : list[str] or dict[str, str]\n            List of new column names or mapping of old column names to new column names.\n\n            If a mapping of old to new column names is passed, then all columns which are\n            found to match a provided old column name will be renamed to the new column name.\n            If any column names are not found in the mapping, a KeyError will be raised.\n\n        Raises\n        ------\n        KeyError\n            If any of the column names passed in the names mapping do not exist.\n\n        Returns\n        -------\n        RecordBatch\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> import pandas as pd\n        >>> df = pd.DataFrame({'n_legs': [2, 4, 5, 100],\n        ...                    'animals': [\"Flamingo\", \"Horse\", \"Brittle stars\", \"Centipede\"]})\n        >>> batch = pa.RecordBatch.from_pandas(df)\n        >>> new_names = [\"n\", \"name\"]\n        >>> batch.rename_column""s(new_names)\n        pyarrow.RecordBatch\n        n: int64\n        name: string\n        ----\n        n: [2,4,5,100]\n        name: [\"Flamingo\",\"Horse\",\"Brittle stars\",\"Centipede\"]\n        >>> new_names = {\"n_legs\": \"n\", \"animals\": \"name\"}\n        >>> batch.rename_columns(new_names)\n        pyarrow.RecordBatch\n        n: int64\n        name: string\n        ----\n        n: [2,4,5,100]\n        name: [\"Flamingo\",\"Horse\",\"Brittle stars\",\"Centipede\"]\n        \n        Create new schema without metadata, if any\n\n        Returns\n        -------\n        schema : pyarrow.Schema\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> schema = pa.schema([\n        ...     pa.field('n_legs', pa.int64()),\n        ...     pa.field('animals', pa.string())],\n        ...     metadata={\"n_legs\": \"Number of legs per animal\"})\n        >>> schema\n        n_legs: int64\n        animals: string\n        -- schema metadata --\n        n_legs: 'Number of legs per animal'\n\n        Create a new schema with removing the metadata from the original:\n\n        >>> schema.remove_metadata()\n        n_legs: int64\n        animals: string\n        \n        Create new table with columns renamed to provided names.\n\n        Parameters\n        ----------\n        names : list[str] or dict[str, str]\n            List of new column names or mapping of old column names to new column names.\n\n            If a mapping of old to new column names is passed, then all columns which are\n            found to match a provided old column name will be renamed to the new column name.\n            If any column names are not found in the mapping, a KeyError will be raised.\n\n        Raises\n        ------\n        KeyError\n            If any of the column names passed in the names mapping do not exist.\n\n        Returns\n        -------\n        Table\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >"">> import pandas as pd\n        >>> df = pd.DataFrame({'n_legs': [2, 4, 5, 100],\n        ...                    'animals': [\"Flamingo\", \"Horse\", \"Brittle stars\", \"Centipede\"]})\n        >>> table = pa.Table.from_pandas(df)\n        >>> new_names = [\"n\", \"name\"]\n        >>> table.rename_columns(new_names)\n        pyarrow.Table\n        n: int64\n        name: string\n        ----\n        n: [[2,4,5,100]]\n        name: [[\"Flamingo\",\"Horse\",\"Brittle stars\",\"Centipede\"]]\n        >>> new_names = {\"n_legs\": \"n\", \"animals\": \"name\"}\n        >>> table.rename_columns(new_names)\n        pyarrow.Table\n        n: int64\n        name: string\n        ----\n        n: [[2,4,5,100]]\n        name: [[\"Flamingo\",\"Horse\",\"Brittle stars\",\"Centipede\"]]\n        \n    Create pyarrow.Array instance from a Python object.\n\n    Parameters\n    ----------\n    obj : sequence, iterable, ndarray, pandas.Series, Arrow-compatible array\n        If both type and size are specified may be a single use iterable. If\n        not strongly-typed, Arrow type will be inferred for resulting array.\n        Any Arrow-compatible array that implements the Arrow PyCapsule Protocol\n        (has an ``__arrow_c_array__`` or ``__arrow_c_device_array__`` method)\n        can be passed as well.\n    type : pyarrow.DataType\n        Explicit type to attempt to coerce to, otherwise will be inferred from\n        the data.\n    mask : array[bool], optional\n        Indicate which values are null (True) or not null (False).\n    size : int64, optional\n        Size of the elements. If the input is larger than size bail at this\n        length. For iterators, if size is larger than the input iterator this\n        will be treated as a \"max size\", but will involve an initial allocation\n        of size followed by a resize to the actual size (so if you know the\n        exact size specifying it correctly will give you better performance).\n    from_pandas : bool, default ""None\n        Use pandas's semantics for inferring nulls from values in\n        ndarray-like data. If passed, the mask tasks precedence, but\n        if a value is unmasked (not-null), but still null according to\n        pandas semantics, then it is null. Defaults to False if not\n        passed explicitly by user, or True if a pandas object is\n        passed in.\n    safe : bool, default True\n        Check for overflows or other unsafe conversions.\n    memory_pool : pyarrow.MemoryPool, optional\n        If not passed, will allocate memory from the currently-set default\n        memory pool.\n\n    Returns\n    -------\n    array : pyarrow.Array or pyarrow.ChunkedArray\n        A ChunkedArray instead of an Array is returned if:\n\n        - the object data overflowed binary storage.\n        - the object's ``__arrow_array__`` protocol method returned a chunked\n          array.\n\n    Notes\n    -----\n    Timezone will be preserved in the returned array for timezone-aware data,\n    else no timezone will be returned for naive timestamps.\n    Internally, UTC values are stored for timezone-aware data with the\n    timezone set in the data type.\n\n    Pandas's DateOffsets and dateutil.relativedelta.relativedelta are by\n    default converted as MonthDayNanoIntervalArray. relativedelta leapdays\n    are ignored as are all absolute fields on both objects. datetime.timedelta\n    can also be converted to MonthDayNanoIntervalArray but this requires\n    passing MonthDayNanoIntervalType explicitly.\n\n    Converting to dictionary array will promote to a wider integer type for\n    indices if the number of distinct values cannot be represented, even if\n    the index type was explicitly set. This means that if there are more than\n    127 values the returned dictionary array's index type will be at least\n    pa.int16() even if pa.int8() was passed to the function. Note that an\n    explicit index type will not be demoted even if it is wider than required.\n\n    Exa""mples\n    --------\n    >>> import pandas as pd\n    >>> import pyarrow as pa\n    >>> pa.array(pd.Series([1, 2]))\n    <pyarrow.lib.Int64Array object at ...>\n    [\n      1,\n      2\n    ]\n\n    >>> pa.array([\"a\", \"b\", \"a\"], type=pa.dictionary(pa.int8(), pa.string()))\n    <pyarrow.lib.DictionaryArray object at ...>\n    ...\n    -- dictionary:\n      [\n        \"a\",\n        \"b\"\n      ]\n    -- indices:\n      [\n        0,\n        1,\n        0\n      ]\n\n    >>> import numpy as np\n    >>> pa.array(pd.Series([1, 2]), mask=np.array([0, 1], dtype=bool))\n    <pyarrow.lib.Int64Array object at ...>\n    [\n      1,\n      null\n    ]\n\n    >>> arr = pa.array(range(1024), type=pa.dictionary(pa.int8(), pa.int64()))\n    >>> arr.type.index_type\n    DataType(int16)\n    \n        Create shallow copy of record batch by replacing schema\n        key-value metadata with the indicated new metadata (which may be None,\n        which deletes any existing metadata\n\n        Parameters\n        ----------\n        metadata : dict, default None\n\n        Returns\n        -------\n        shallow_copy : RecordBatch\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> n_legs = pa.array([2, 2, 4, 4, 5, 100])\n\n        Constructing a RecordBatch with schema and metadata:\n\n        >>> my_schema = pa.schema([\n        ...     pa.field('n_legs', pa.int64())],\n        ...     metadata={\"n_legs\": \"Number of legs per animal\"})\n        >>> batch = pa.RecordBatch.from_arrays([n_legs], schema=my_schema)\n        >>> batch.schema\n        n_legs: int64\n        -- schema metadata --\n        n_legs: 'Number of legs per animal'\n\n        Shallow copy of a RecordBatch with deleted schema metadata:\n\n        >>> batch.replace_schema_metadata().schema\n        n_legs: int64\n        \n        Create shallow copy of table by replacing schema\n        key-value metadata with the indicated new metadata (which may be None),\n        whic""h deletes any existing metadata.\n\n        Parameters\n        ----------\n        metadata : dict, default None\n\n        Returns\n        -------\n        Table\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> import pandas as pd\n        >>> df = pd.DataFrame({'year': [2020, 2022, 2019, 2021],\n        ...                    'n_legs': [2, 4, 5, 100],\n        ...                    'animals': [\"Flamingo\", \"Horse\", \"Brittle stars\", \"Centipede\"]})\n        >>> table = pa.Table.from_pandas(df)\n\n        Constructing a Table with pyarrow schema and metadata:\n\n        >>> my_schema = pa.schema([\n        ...     pa.field('n_legs', pa.int64()),\n        ...     pa.field('animals', pa.string())],\n        ...     metadata={\"n_legs\": \"Number of legs per animal\"})\n        >>> table= pa.table(df, my_schema)\n        >>> table.schema\n        n_legs: int64\n        animals: string\n        -- schema metadata --\n        n_legs: 'Number of legs per animal'\n        pandas: ...\n\n        Create a shallow copy of a Table with deleted schema metadata:\n\n        >>> table.replace_schema_metadata().schema\n        n_legs: int64\n        animals: string\n\n        Create a shallow copy of a Table with new schema metadata:\n\n        >>> metadata={\"animals\": \"Which animal\"}\n        >>> table.replace_schema_metadata(metadata = metadata).schema\n        n_legs: int64\n        animals: string\n        -- schema metadata --\n        animals: 'Which animal'\n        \n    Create single-precision floating point type.\n\n    Examples\n    --------\n    Create an instance of float32 type:\n\n    >>> import pyarrow as pa\n    >>> pa.float32()\n    DataType(float)\n    >>> print(pa.float32())\n    float\n\n    Create an array with float32 type:\n\n    >>> pa.array([0.0, 1.0, 2.0], type=pa.float32())\n    <pyarrow.lib.FloatArray object at ...>\n    [\n      0,\n      1,\n      2\n    ]\n    \n    Create variable-length or fixed size"" binary type.\n\n    Parameters\n    ----------\n    length : int, optional, default -1\n        If length == -1 then return a variable length binary type. If length is\n        greater than or equal to 0 then return a fixed size binary type of\n        width `length`.\n\n    Examples\n    --------\n    Create an instance of a variable-length binary type:\n\n    >>> import pyarrow as pa\n    >>> pa.binary()\n    DataType(binary)\n\n    and use the variable-length binary type to create an array:\n\n    >>> pa.array(['foo', 'bar', 'baz'], type=pa.binary())\n    <pyarrow.lib.BinaryArray object at ...>\n    [\n      666F6F,\n      626172,\n      62617A\n    ]\n\n    Create an instance of a fixed-size binary type:\n\n    >>> pa.binary(3)\n    FixedSizeBinaryType(fixed_size_binary[3])\n\n    and use the fixed-length binary type to create an array:\n\n    >>> pa.array(['foo', 'bar', 'baz'], type=pa.binary(3))\n    <pyarrow.lib.FixedSizeBinaryArray object at ...>\n    [\n      666F6F,\n      626172,\n      62617A\n    ]\n    -D array to bool8 arrayDataType.bit_width.__get__ (line 257)DataType.byte_width.__get__ (line 276)DataType.equals (line 370)DataType expected, got DataType.has_variadic_buffers.__get__ (line 336)DataType.num_buffers.__get__ (line 320)DataType.num_fields.__get__ (line 298)DataType.to_pandas_dtype (line 400)Decimal128Type.precision.__get__ (line 1545)Decimal128Type.scale.__get__ (line 1559)Decimal256Type.precision.__get__ (line 1594)Decimal256Type.scale.__get__ (line 1608)Decimal32Type.precision.__get__ (line 1447)Decimal32Type.scale.__get__ (line 1461)Decimal64Type.precision.__get__ (line 1496)Decimal64Type.scale.__get__ (line 1510)\n        Declare a grouping over the columns of the table.\n\n        Resulting grouping can then be used to perform aggregations\n        with a subsequent ``aggregate()`` method.\n\n        Parameters\n        ----------\n        keys : str or list[str]\n            Name of the columns that should be used as the grouping ke""y.\n        use_threads : bool, default True\n            Whether to use multithreading or not. When set to True (the\n            default), no stable ordering of the output is guaranteed.\n\n        Returns\n        -------\n        TableGroupBy\n\n        See Also\n        --------\n        TableGroupBy.aggregate\n\n        Examples\n        --------\n        >>> import pandas as pd\n        >>> import pyarrow as pa\n        >>> df = pd.DataFrame({'year': [2020, 2022, 2021, 2022, 2019, 2021],\n        ...                    'n_legs': [2, 2, 4, 4, 5, 100],\n        ...                    'animal': [\"Flamingo\", \"Parrot\", \"Dog\", \"Horse\",\n        ...                    \"Brittle stars\", \"Centipede\"]})\n        >>> table = pa.Table.from_pandas(df)\n        >>> table.group_by('year').aggregate([('n_legs', 'sum')])\n        pyarrow.Table\n        year: int64\n        n_legs_sum: int64\n        ----\n        year: [[2020,2022,2021,2019]]\n        n_legs_sum: [[2,6,104,5]]\n        . Detail: Device on which the data resides differs between buffers: DictionaryType.index_type.__get__ (line 519)DictionaryType.ordered.__get__ (line 505)DictionaryType.value_type.__get__ (line 532)\n    Dictionary (categorical, or simply encoded) type.\n\n    Parameters\n    ----------\n    index_type : DataType\n    value_type : DataType\n    ordered : bool\n\n    Returns\n    -------\n    type : DictionaryType\n\n    Examples\n    --------\n    Create an instance of dictionary type:\n\n    >>> import pyarrow as pa\n    >>> pa.dictionary(pa.int64(), pa.utf8())\n    DictionaryType(dictionary<values=string, indices=int64, ordered=0>)\n\n    Use dictionary type to create an array:\n\n    >>> pa.array([\"a\", \"b\", None, \"d\"], pa.dictionary(pa.int64(), pa.utf8()))\n    <pyarrow.lib.DictionaryArray object at ...>\n    ...\n    -- dictionary:\n      [\n        \"a\",\n        \"b\",\n        \"d\"\n      ]\n    -- indices:\n      [\n        0,\n        1,\n        null,\n        2\n   ""   ]\n    \n        Dimensions of the table or record batch: (#rows, #columns).\n\n        Returns\n        -------\n        (int, int)\n            Number of rows and number of columns.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> table = pa.table({'n_legs': [None, 4, 5, None],\n        ...                   'animals': [\"Flamingo\", \"Horse\", None, \"Centipede\"]})\n        >>> table.shape\n        (4, 2)\n        Do not call Do not call Buffer's constructor directly, use `pyarrow.py_buffer` function instead.Do not call ChunkedArray's constructor directly, use `chunked_array` function instead.Do not call Device's constructor directly, use the device attribute of the MemoryManager instead.Do not call Field's constructor directly, use `pyarrow.field` instead.Do not call MemoryManager's constructor directly, use pyarrow.default_cpu_memory_manager() instead.Do not call Schema's constructor directly, use `pyarrow.schema` instead.Do not call SparseCOOTensor's constructor directly, use one of the `pyarrow.SparseCOOTensor.from_*` functions instead.Do not call SparseCSCMatrix's constructor directly, use one of the `pyarrow.SparseCSCMatrix.from_*` functions instead.Do not call SparseCSFTensor's constructor directly, use one of the `pyarrow.SparseCSFTensor.from_*` functions instead.Do not call SparseCSRMatrix's constructor directly, use one of the `pyarrow.SparseCSRMatrix.from_*` functions instead.Do not call Tensor's constructor directly, use one of the `pyarrow.Tensor.from_*` functions instead.\n        Drop one or more columns and return a new Table or RecordBatch.\n\n        Parameters\n        ----------\n        columns : str or list[str]\n            Field name(s) referencing existing column(s).\n\n        Raises\n        ------\n        KeyError\n            If any of the passed column names do not exist.\n\n        Returns\n        -------\n        Table or RecordBatch\n            A tabular object without the column(s).\n""\n        Examples\n        --------\n        Table (works similarly for RecordBatch)\n\n        >>> import pyarrow as pa\n        >>> import pandas as pd\n        >>> df = pd.DataFrame({'n_legs': [2, 4, 5, 100],\n        ...                    'animals': [\"Flamingo\", \"Horse\", \"Brittle stars\", \"Centipede\"]})\n        >>> table = pa.Table.from_pandas(df)\n\n        Drop one column:\n\n        >>> table.drop_columns(\"animals\")\n        pyarrow.Table\n        n_legs: int64\n        ----\n        n_legs: [[2,4,5,100]]\n\n        Drop one or more columns:\n\n        >>> table.drop_columns([\"n_legs\", \"animals\"])\n        pyarrow.Table\n        ...\n        ----\n        Duplicate key {}, use pass all items as list of tuples if you intend to have duplicate keysDurationType.unit.__get__ (line 1390)Each element of dim_names must be a stringEncountered key 'End of Arrow streamExpected 1-dimensional array for SparseCSRMatrix indptrExpected 1-dimensional array for SparseCSRMatrix indicesExpected 1-dimensional array for SparseCSCMatrix indptrExpected 1-dimensional array for SparseCSCMatrix indicesExpected 2-dimensional array for SparseCOOTensor indicesExpected Array, got Expected Schema, got Expected a list of 1-dimensional arrays for SparseCSFTensor.indptrExpected a list of 1-dimensional arrays for SparseCSFTensor.indicesExpected a non-empty ndarrayExpected a pointer value, got Expected an object implementing the Arrow PyCapsule Protocol for streams (i.e. having a `__arrow_c_stream__` method), got Expected an object implementing the Arrow PyCapsule Protocol for schema (i.e. having a `__arrow_c_schema__` method), got Expected array or chunked array, got Expected file path, but Expected int index, got type 'Expected integerExpected integer or string indexExpected list of Expected list or tuple, got Expected pandas DataFrame or list of arraysExpected pandas DataFrame, python dictionary or list of arraysExpected scipy.sparse.coo_array or scipy.sparse.coo_matrix, got E""xpected scipy.sparse.csc_array or scipy.sparse.csc_matrix, got Expected scipy.sparse.csr_array or scipy.sparse.csr_matrix, got Expected sparse.COO, got Failed to allocate Field \"Field.equals (line 2497)Field.flatten (line 2761)Field.metadata.__get__ (line 2572)Field.name.__get__ (line 2558)Field.nullable.__get__ (line 2541)Field.remove_metadata (line 2629)Field.with_metadata (line 2595)Field.with_name (line 2690)Field.with_nullable (line 2722)Field.with_type (line 2655)File object is malformed, has no mode\n        Find the first index of a value.\n\n        See :func:`pyarrow.compute.index` for full usage.\n\n        Parameters\n        ----------\n        value : Scalar or object\n            The value to look for in the array.\n        start : int, optional\n            The start index where to look for `value`.\n        end : int, optional\n            The end index where to look for `value`.\n        memory_pool : MemoryPool, optional\n            A memory pool for potential memory allocations.\n\n        Returns\n        -------\n        index : Int64Scalar\n            The index of the value in the array (-1 if not found).\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> n_legs = pa.chunked_array([[2, 2, 4], [4, 5, 100]])\n        >>> n_legs\n        <pyarrow.lib.ChunkedArray object at ...>\n        [\n          [\n            2,\n            2,\n            4\n          ],\n          [\n            4,\n            5,\n            100\n          ]\n        ]\n        >>> n_legs.index(4)\n        <pyarrow.Int64Scalar: 2>\n        >>> n_legs.index(4, start=3)\n        <pyarrow.Int64Scalar: 3>\n        First stride needs to be largest to ensure that individual tensor data is contiguous in memory.FixedShapeTensorArray.from_numpy_ndarray (line 4660)FixedSizeListArray.from_arrays (line 3590)FixedSizeListArray.values.__get__ (line 3675)FixedSizeListType.list_size.__get__ (line 863)FixedSizeListType.value_field.__get__ (line 837)F""ixedSizeListType.value_type.__get__ (line 850)\n        Flatten this ChunkedArray.  If it has a struct type, the column is\n        flattened into one array per struct field.\n\n        Parameters\n        ----------\n        memory_pool : MemoryPool, default None\n            For memory allocations, if required, otherwise use default pool\n\n        Returns\n        -------\n        result : list of ChunkedArray\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> n_legs = pa.chunked_array([[2, 2, 4], [4, 5, 100]])\n        >>> c_arr = pa.chunked_array(n_legs.value_counts())\n        >>> c_arr\n        <pyarrow.lib.ChunkedArray object at ...>\n        [\n          -- is_valid: all not null\n          -- child 0 type: int64\n            [\n              2,\n              4,\n              5,\n              100\n            ]\n          -- child 1 type: int64\n            [\n              2,\n              2,\n              1,\n              1\n            ]\n        ]\n        >>> c_arr.flatten()\n        [<pyarrow.lib.ChunkedArray object at ...>\n        [\n          [\n            2,\n            4,\n            5,\n            100\n          ]\n        ], <pyarrow.lib.ChunkedArray object at ...>\n        [\n          [\n            2,\n            2,\n            1,\n            1\n          ]\n        ]]\n        >>> c_arr.type\n        StructType(struct<values: int64, counts: int64>)\n        >>> n_legs.type\n        DataType(int64)\n        \n        Flatten this ChunkedArray into a single non-chunked array.\n\n        Parameters\n        ----------\n        memory_pool : MemoryPool, default None\n            For memory allocations, if required, otherwise use default pool\n\n        Returns\n        -------\n        result : Array\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> n_legs = pa.chunked_array([[2, 2, 4], [4, 5, 100]])\n        >>> n_legs\n        <pyarrow.lib.ChunkedArray object at"" ...>\n        [\n          [\n            2,\n            2,\n            4\n          ],\n          [\n            4,\n            5,\n            100\n          ]\n        ]\n        >>> n_legs.combine_chunks()\n        <pyarrow.lib.Int64Array object at ...>\n        [\n          2,\n          2,\n          4,\n          4,\n          5,\n          100\n        ]\n        \n        Flatten this Table.\n\n        Each column with a struct type is flattened\n        into one column per struct field.  Other columns are left unchanged.\n\n        Parameters\n        ----------\n        memory_pool : MemoryPool, default None\n            For memory allocations, if required, otherwise use default pool\n\n        Returns\n        -------\n        Table\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> struct = pa.array([{'n_legs': 2, 'animals': 'Parrot'},\n        ...                    {'year': 2022, 'n_legs': 4}])\n        >>> month = pa.array([4, 6])\n        >>> table = pa.Table.from_arrays([struct,month],\n        ...                              names = [\"a\", \"month\"])\n        >>> table\n        pyarrow.Table\n        a: struct<animals: string, n_legs: int64, year: int64>\n          child 0, animals: string\n          child 1, n_legs: int64\n          child 2, year: int64\n        month: int64\n        ----\n        a: [\n          -- is_valid: all not null\n          -- child 0 type: string\n        [\"Parrot\",null]\n          -- child 1 type: int64\n        [2,4]\n          -- child 2 type: int64\n        [null,2022]]\n        month: [[4,6]]\n\n        Flatten the columns with struct field:\n\n        >>> table.flatten()\n        pyarrow.Table\n        a.animals: string\n        a.n_legs: int64\n        a.year: int64\n        month: int64\n        ----\n        a.animals: [[\"Parrot\",null]]\n        a.n_legs: [[2,4]]\n        a.year: [[null,2022]]\n        month: [[4,6]]\n        \n        Flatten this field.  If a struc""t field, individual child fields\n        will be returned with their names prefixed by the parent's name.\n\n        Returns\n        -------\n        fields : List[pyarrow.Field]\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> f1 = pa.field('bar', pa.float64(), nullable=False)\n        >>> f2 = pa.field('foo', pa.int32()).with_metadata({\"key\": \"Something important\"})\n        >>> ff = pa.field('ff', pa.struct([f1, f2]), nullable=False)\n\n        Flatten a struct field:\n\n        >>> ff\n        pyarrow.Field<ff: struct<bar: double not null, foo: int32> not null>\n        >>> ff.flatten()\n        [pyarrow.Field<ff.bar: double not null>, pyarrow.Field<ff.foo: int32>]\n        ). For now ignoring the specified type, but in the future this mismatch will raise a TypeErrorIO thread count must be strictly positiveIPC read statistics\n\n    Parameters\n    ----------\n    num_messages : int\n        Number of messages.\n    num_record_batches : int\n        Number of record batches.\n    num_dictionary_batches : int\n        Number of dictionary batches.\n    num_dictionary_deltas : int\n        Delta of dictionaries.\n    num_replaced_dictionaries : int\n        Number of replaced dictionaries.\n    IPC write statistics\n\n    Parameters\n    ----------\n    num_messages : int\n        Number of messages.\n    num_record_batches : int\n        Number of record batches.\n    num_dictionary_batches : int\n        Number of dictionary batches.\n    num_dictionary_deltas : int\n        Delta of dictionaries.\n    num_replaced_dictionaries : int\n        Number of replaced dictionaries.\n    I/O operation on closed file\n        If True, the number of expected buffers is only\n        lower-bounded by num_buffers.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> pa.int64().has_variadic_buffers\n        False\n        >>> pa.string_view().has_variadic_buffers\n        True\n        Implemented only"" for data on CPU deviceImplemented only for data on CPU device or data with equal addressesIncompatible storage type Incompatible storage type for Index must either be string or integerIndices must be integer typeInvalid file mode: Invalid promote_options: Invalid time unit: Invalid time unit for time32: Invalid time unit for time64: Invalid union mode Invalid value for compression: Invalid value for 'maps_as_pydicts': valid values are 'lossy', 'strict' or `None` (default). Received Invalid value for 'maps_as_pydicts': valid values are 'lossy', 'strict' or `None` (default). Received 'Invalid value of whence: \n        Is this tensor contiguous in memory.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> import numpy as np\n        >>> x = np.array([[2, 2, 4], [4, 5, 100]], np.int32)\n        >>> tensor = pa.Tensor.from_numpy(x, dim_names=[\"dim1\",\"dim2\"])\n        >>> tensor.is_contiguous\n        True\n        \n        Is this tensor mutable or immutable.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> import numpy as np\n        >>> x = np.array([[2, 2, 4], [4, 5, 100]], np.int32)\n        >>> tensor = pa.Tensor.from_numpy(x, dim_names=[\"dim1\",\"dim2\"])\n        >>> tensor.is_mutable\n        True\n        Iterable should contain Array objects, got \n        Iterator over all columns in their numerical order.\n\n        Yields\n        ------\n        Array (for RecordBatch) or ChunkedArray (for Table)\n\n        Examples\n        --------\n        Table (works similarly for RecordBatch)\n\n        >>> import pyarrow as pa\n        >>> import pandas as pd\n        >>> df = pd.DataFrame({'n_legs': [None, 4, 5, None],\n        ...                    'animals': [\"Flamingo\", \"Horse\", None, \"Centipede\"]})\n        >>> table = pa.Table.from_pandas(df)\n        >>> for i in table.itercolumns():\n        ...     print(i.null_count)\n        ...\n        2\n        1\n        LargeListArra""y.values.__get__ (line 2909)LargeListType.value_type.__get__ (line 620)LargeListViewArray.from_arrays (line 3225)LargeListViewArray.offsets.__get__ (line 3385)LargeListViewArray.sizes.__get__ (line 3416)LargeListViewArray.values.__get__ (line 3326)LargeListViewType.value_field.__get__ (line 702)LargeListViewType.value_type.__get__ (line 715)LargeListView requires DataType or FieldLength must be non-negativeLength of names (Less than one byteListArray.from_arrays (line 2678)ListArray.offsets.__get__ (line 2827)ListArray.values.__get__ (line 2756)ListType.value_field.__get__ (line 568)ListType.value_type.__get__ (line 581)ListViewArray.from_arrays (line 3003)ListViewArray.offsets.__get__ (line 3158)ListViewArray.sizes.__get__ (line 3188)ListViewArray.values.__get__ (line 3104)ListViewType.value_field.__get__ (line 654)ListViewType.value_type.__get__ (line 667)ListView requires DataType or Field\n        List of all columns in numerical order.\n\n        Returns\n        -------\n        columns : list of Array (for RecordBatch) or list of ChunkedArray (for Table)\n\n        Examples\n        --------\n        Table (works similarly for RecordBatch)\n\n        >>> import pyarrow as pa\n        >>> import pandas as pd\n        >>> df = pd.DataFrame({'n_legs': [None, 4, 5, None],\n        ...                    'animals': [\"Flamingo\", \"Horse\", None, \"Centipede\"]})\n        >>> table = pa.Table.from_pandas(df)\n        >>> table.columns\n        [<pyarrow.lib.ChunkedArray object at ...>\n        [\n          [\n            null,\n            4,\n            5,\n            null\n          ]\n        ], <pyarrow.lib.ChunkedArray object at ...>\n        [\n          [\n            \"Flamingo\",\n            \"Horse\",\n            null,\n            \"Centipede\"\n          ]\n        ]]\n        List requires DataType or Field\n        Lists all fields within the StructType.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> struct_t""ype = pa.struct([('a', pa.int64()), ('b', pa.float64()), ('c', pa.string())])\n        >>> struct_type.fields\n        [pyarrow.Field<a: int64>, pyarrow.Field<b: double>, pyarrow.Field<c: string>]\n        \n        Lists the field names.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> struct_type = pa.struct([('a', pa.int64()), ('b', pa.float64()), ('c', pa.string())])\n        >>> struct_type.names\n        ['a', 'b', 'c']\n        \n        Make a new table by combining the chunks this table has.\n\n        All the underlying chunks in the ChunkedArray of each column are\n        concatenated into zero or one chunk.\n\n        To avoid buffer overflow, binary columns may be combined into\n        multiple chunks. Chunks will have the maximum possible length.\n\n        Parameters\n        ----------\n        memory_pool : MemoryPool, default None\n            For memory allocations, if required, otherwise use default pool.\n\n        Returns\n        -------\n        Table\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> n_legs = pa.chunked_array([[2, 2, 4], [4, 5, 100]])\n        >>> animals = pa.chunked_array([[\"Flamingo\", \"Parrot\", \"Dog\"], [\"Horse\", \"Brittle stars\", \"Centipede\"]])\n        >>> names = [\"n_legs\", \"animals\"]\n        >>> table = pa.table([n_legs, animals], names=names)\n        >>> table\n        pyarrow.Table\n        n_legs: int64\n        animals: string\n        ----\n        n_legs: [[2,2,4],[4,5,100]]\n        animals: [[\"Flamingo\",\"Parrot\",\"Dog\"],[\"Horse\",\"Brittle stars\",\"Centipede\"]]\n        >>> table.combine_chunks()\n        pyarrow.Table\n        n_legs: int64\n        animals: string\n        ----\n        n_legs: [[2,2,4,4,5,100]]\n        animals: [[\"Flamingo\",\"Parrot\",\"Dog\",\"Horse\",\"Brittle stars\",\"Centipede\"]]\n        MapArray.from_arrays (line 3453)MapType.item_field.__get__ (line 777)MapType.item_type.__get__ (line"" 790)MapType.key_field.__get__ (line 751)MapType.key_type.__get__ (line 764)MapType.keys_sorted.__get__ (line 803)Map key field should be non-nullableMask is a different length from sequence being convertedMask must be 1D arrayMask must be a numpy array when converting numpy arraysMask must be a pyarrow.Array of type booleanMask must be boolean dtypeMask must not contain nullsMust pass a DictionaryType instanceMust pass decompressed_sizeMust pass either fields or type, not bothMust pass either names or fieldsMust pass either names or fields, not bothMust pass names or schema when constructing Table or RecordBatch.Must pass schema, or at least one RecordBatch\n        Names of the Table or RecordBatch columns.\n\n        Returns\n        -------\n        list of str\n\n        Examples\n        --------\n        Table (works similarly for RecordBatch)\n\n        >>> import pyarrow as pa\n        >>> table = pa.Table.from_arrays([[2, 4, 5, 100],\n        ...                               [\"Flamingo\", \"Horse\", \"Brittle stars\", \"Centipede\"]],\n        ...                               names=['n_legs', 'animals'])\n        >>> table.column_names\n        ['n_legs', 'animals']\n        \n        Names of this tensor dimensions.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> import numpy as np\n        >>> x = np.array([[2, 2, 4], [4, 5, 100]], np.int32)\n        >>> tensor = pa.Tensor.from_numpy(x, dim_names=[\"dim1\",\"dim2\"])\n        >>> tensor.dim_names\n        ['dim1', 'dim2']\n        Nanosecond duration Nanosecond resolution temporal type No type alias for Non-fixed width typeNoneNot a metadata version: Not an ArrowSchema objectNot an alignment: Note that Cython is deliberately stricter than PEP-484 and rejects subclasses of builtin types. If you need to pass subclasses then set the 'annotation_typing' directive to False.Null pointer (value before cast = \n        Number of columns\n\n        Returns\n        -------""\n        int\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> n_legs = pa.array([2, 2, 4, 4, 5, 100])\n        >>> animals = pa.array([\"Flamingo\", \"Parrot\", \"Dog\", \"Horse\", \"Brittle stars\", \"Centipede\"])\n        >>> batch = pa.RecordBatch.from_arrays([n_legs, animals],\n        ...                                     names=[\"n_legs\", \"animals\"])\n        >>> batch.num_columns\n        2\n        \n        Number of columns in this table.\n\n        Returns\n        -------\n        int\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> import pandas as pd\n        >>> df = pd.DataFrame({'n_legs': [None, 4, 5, None],\n        ...                    'animals': [\"Flamingo\", \"Horse\", None, \"Centipede\"]})\n        >>> table = pa.Table.from_pandas(df)\n        >>> table.num_columns\n        2\n        \n        Number of data buffers required to construct Array type\n        excluding children.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> pa.int64().num_buffers\n        2\n        >>> pa.string().num_buffers\n        3\n        \n        Number of null entries\n\n        Returns\n        -------\n        int\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> n_legs = pa.chunked_array([[2, 2, 4], [4, None, 100]])\n        >>> n_legs.null_count\n        1\n        \n        Number of rows\n\n        Due to the definition of a RecordBatch, all columns have the same\n        number of rows.\n\n        Returns\n        -------\n        int\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> n_legs = pa.array([2, 2, 4, 4, 5, 100])\n        >>> animals = pa.array([\"Flamingo\", \"Parrot\", \"Dog\", \"Horse\", \"Brittle stars\", \"Centipede\"])\n        >>> batch = pa.RecordBatch.from_arrays([n_legs, animals],\n        ...                                     names=[\"n_legs\", \"ani""mals\"])\n        >>> batch.num_rows\n        6\n        \n        Number of rows in this table.\n\n        Due to the definition of a table, all columns have the same number of\n        rows.\n\n        Returns\n        -------\n        int\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> import pandas as pd\n        >>> df = pd.DataFrame({'n_legs': [None, 4, 5, None],\n        ...                    'animals': [\"Flamingo\", \"Horse\", None, \"Centipede\"]})\n        >>> table = pa.Table.from_pandas(df)\n        >>> table.num_rows\n        4\n        \n        Number of underlying chunks.\n\n        Returns\n        -------\n        int\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> n_legs = pa.chunked_array([[2, 2, None], [4, 5, 100]])\n        >>> n_legs.num_chunks\n        2\n        Offset must be non-negativeOnly extension types can be registeredOnly stream=None is supported.\n    Open memory map at file path. Size of the memory map cannot change.\n\n    Parameters\n    ----------\n    path : str\n    mode : {'r', 'r+', 'w'}, default 'r'\n        Whether the file is opened for reading ('r'), writing ('w')\n        or both ('r+').\n\n    Returns\n    -------\n    mmap : MemoryMappedFile\n\n    Examples\n    --------\n    Reading from a memory map without any memory allocation or copying:\n\n    >>> import pyarrow as pa\n    >>> with pa.output_stream('example_mmap.txt') as stream:\n    ...     stream.write(b'Constructing a buffer referencing the mapped memory')\n    ...\n    51\n    >>> with pa.memory_map('example_mmap.txt') as mmap:\n    ...     mmap.read_at(6,45)\n    ...\n    b'memory'\n    Operation on closed readerOperation on closed writer_PandasConvertible.to_pandas (line 866)Passing a pointer value as a float is unsafe and only supported for compatibility with older versions of the R Arrow library\n        Perform a join between this table and another one.\n\n        Result of the"" join will be a new Table, where further\n        operations can be applied.\n\n        Parameters\n        ----------\n        right_table : Table\n            The table to join to the current one, acting as the right table\n            in the join operation.\n        keys : str or list[str]\n            The columns from current table that should be used as keys\n            of the join operation left side.\n        right_keys : str or list[str], default None\n            The columns from the right_table that should be used as keys\n            on the join operation right side.\n            When ``None`` use the same key names as the left table.\n        join_type : str, default \"left outer\"\n            The kind of join that should be performed, one of\n            (\"left semi\", \"right semi\", \"left anti\", \"right anti\",\n            \"inner\", \"left outer\", \"right outer\", \"full outer\")\n        left_suffix : str, default None\n            Which suffix to add to left column names. This prevents confusion\n            when the columns in left and right tables have colliding names.\n        right_suffix : str, default None\n            Which suffix to add to the right column names. This prevents confusion\n            when the columns in left and right tables have colliding names.\n        coalesce_keys : bool, default True\n            If the duplicated keys should be omitted from one of the sides\n            in the join result.\n        use_threads : bool, default True\n            Whether to use multithreading or not.\n        filter_expression : pyarrow.compute.Expression\n            Residual filter which is applied to matching row.\n\n        Returns\n        -------\n        Table\n\n        Examples\n        --------\n        >>> import pandas as pd\n        >>> import pyarrow as pa\n        >>> import pyarrow.compute as pc\n        >>> df1 = pd.DataFrame({'id': [1, 2, 3],\n        ...                     'year': [2020, 2022, 2019]})\n        "">>> df2 = pd.DataFrame({'id': [3, 4],\n        ...                     'n_legs': [5, 100],\n        ...                     'animal': [\"Brittle stars\", \"Centipede\"]})\n        >>> t1 = pa.Table.from_pandas(df1)\n        >>> t2 = pa.Table.from_pandas(df2)\n\n        Left outer join:\n\n        >>> t1.join(t2, 'id').combine_chunks().sort_by('year')\n        pyarrow.Table\n        id: int64\n        year: int64\n        n_legs: int64\n        animal: string\n        ----\n        id: [[3,1,2]]\n        year: [[2019,2020,2022]]\n        n_legs: [[5,null,null]]\n        animal: [[\"Brittle stars\",null,null]]\n\n        Full outer join:\n\n        >>> t1.join(t2, 'id', join_type=\"full outer\").combine_chunks().sort_by('year')\n        pyarrow.Table\n        id: int64\n        year: int64\n        n_legs: int64\n        animal: string\n        ----\n        id: [[3,1,2,4]]\n        year: [[2019,2020,2022,null]]\n        n_legs: [[5,null,null,100]]\n        animal: [[\"Brittle stars\",null,null,\"Centipede\"]]\n\n        Right outer join:\n\n        >>> t1.join(t2, 'id', join_type=\"right outer\").combine_chunks().sort_by('year')\n        pyarrow.Table\n        year: int64\n        id: int64\n        n_legs: int64\n        animal: string\n        ----\n        year: [[2019,null]]\n        id: [[3,4]]\n        n_legs: [[5,100]]\n        animal: [[\"Brittle stars\",\"Centipede\"]]\n\n        Right anti join:\n\n        >>> t1.join(t2, 'id', join_type=\"right anti\")\n        pyarrow.Table\n        id: int64\n        n_legs: int64\n        animal: string\n        ----\n        id: [[4]]\n        n_legs: [[100]]\n        animal: [[\"Centipede\"]]\n\n        Inner join with intended mismatch filter expression:\n\n        >>> t1.join(t2, 'id', join_type=\"inner\", filter_expression=pc.equal(pc.field(\"n_legs\"), 100))\n        pyarrow.Table\n        id: int64\n        year: int64\n        n_legs: int64\n        animal: string\n        ----\n        id: []\n        year: []""\n        n_legs: []\n        animal: []\n        \n        Perform an aggregation over the grouped columns of the table.\n\n        Parameters\n        ----------\n        aggregations : list[tuple(str, str)] or list[tuple(str, str, FunctionOptions)]\n            List of tuples, where each tuple is one aggregation specification\n            and consists of: aggregation column name followed\n            by function name and optionally aggregation function option.\n            Pass empty list to get a single row for each group.\n            The column name can be a string, an empty list or a list of\n            column names, for unary, nullary and n-ary aggregation functions\n            respectively.\n\n            For the list of function names and respective aggregation\n            function options see :ref:`py-grouped-aggrs`.\n\n        Returns\n        -------\n        Table\n            Results of the aggregation functions.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> t = pa.table([\n        ...       pa.array([\"a\", \"a\", \"b\", \"b\", \"c\"]),\n        ...       pa.array([1, 2, 3, 4, 5]),\n        ... ], names=[\"keys\", \"values\"])\n\n        Sum the column \"values\" over the grouped column \"keys\":\n\n        >>> t.group_by(\"keys\").aggregate([(\"values\", \"sum\")])\n        pyarrow.Table\n        keys: string\n        values_sum: int64\n        ----\n        keys: [[\"a\",\"b\",\"c\"]]\n        values_sum: [[3,7,5]]\n\n        Count the rows over the grouped column \"keys\":\n\n        >>> t.group_by(\"keys\").aggregate([([], \"count_all\")])\n        pyarrow.Table\n        keys: string\n        count_all: int64\n        ----\n        keys: [[\"a\",\"b\",\"c\"]]\n        count_all: [[2,2,1]]\n\n        Do multiple aggregations:\n\n        >>> t.group_by(\"keys\").aggregate([\n        ...    (\"values\", \"sum\"),\n        ...    (\"keys\", \"count\")\n        ... ])\n        pyarrow.Table\n        keys: stri""ng\n        values_sum: int64\n        keys_count: int64\n        ----\n        keys: [[\"a\",\"b\",\"c\"]]\n        values_sum: [[3,7,5]]\n        keys_count: [[2,2,1]]\n\n        Count the number of non-null values for column \"values\"\n        over the grouped column \"keys\":\n\n        >>> import pyarrow.compute as pc\n        >>> t.group_by([\"keys\"]).aggregate([\n        ...    (\"values\", \"count\", pc.CountOptions(mode=\"only_valid\"))\n        ... ])\n        pyarrow.Table\n        keys: string\n        values_count: int64\n        ----\n        keys: [[\"a\",\"b\",\"c\"]]\n        values_count: [[2,2,1]]\n\n        Get a single row for each group in column \"keys\":\n\n        >>> t.group_by(\"keys\").aggregate([])\n        pyarrow.Table\n        keys: string\n        ----\n        keys: [[\"a\",\"b\",\"c\"]]\n        \n        Perform an asof join between this table and another one.\n\n        This is similar to a left-join except that we match on nearest key rather\n        than equal keys. Both tables must be sorted by the key. This type of join\n        is most useful for time series data that are not perfectly aligned.\n\n        Optionally match on equivalent keys with \"by\" before searching with \"on\".\n\n        Result of the join will be a new Table, where further\n        operations can be applied.\n\n        Parameters\n        ----------\n        right_table : Table\n            The table to join to the current one, acting as the right table\n            in the join operation.\n        on : str\n            The column from current table that should be used as the \"on\" key\n            of the join operation left side.\n\n            An inexact match is used on the \"on\" key, i.e. a row is considered a\n            match if and only if ``right.on - left.on`` is in the range\n            ``[min(0, tolerance), max(0, tolerance)]``.\n\n            The input dataset must be sorted by the \"on\" key. Must be a single\n            field of a c""ommon type.\n\n            Currently, the \"on\" key must be an integer, date, or timestamp type.\n        by : str or list[str]\n            The columns from current table that should be used as the keys\n            of the join operation left side. The join operation is then done\n            only for the matches in these columns.\n        tolerance : int\n            The tolerance for inexact \"on\" key matching. A right row is considered\n            a match with a left row if ``right.on - left.on`` is in the range\n            ``[min(0, tolerance), max(0, tolerance)]``. ``tolerance`` may be:\n\n            - negative, in which case a past-as-of-join occurs\n              (match iff ``tolerance <= right.on - left.on <= 0``);\n            - or positive, in which case a future-as-of-join occurs\n              (match iff ``0 <= right.on - left.on <= tolerance``);\n            - or zero, in which case an exact-as-of-join occurs\n              (match iff ``right.on == left.on``).\n\n            The tolerance is interpreted in the same units as the \"on\" key.\n        right_on : str or list[str], default None\n            The columns from the right_table that should be used as the on key\n            on the join operation right side.\n            When ``None`` use the same key name as the left table.\n        right_by : str or list[str], default None\n            The columns from the right_table that should be used as keys\n            on the join operation right side.\n            When ``None`` use the same key names as the left table.\n\n        Returns\n        -------\n        Table\n\n        Example\n        --------\n        >>> import pyarrow as pa\n        >>> t1 = pa.table({'id': [1, 3, 2, 3, 3],\n        ...                'year': [2020, 2021, 2022, 2022, 2023]})\n        >>> t2 = pa.table({'id': [3, 4],\n        ...                'year': [2020, 2021],\n        ...                'n_legs': [5, 100],\n        ...                'animal': [\"Brittle stars""\", \"Centipede\"]})\n\n        >>> t1.join_asof(t2, on='year', by='id', tolerance=-2)\n        pyarrow.Table\n        id: int64\n        year: int64\n        n_legs: int64\n        animal: string\n        ----\n        id: [[1,3,2,3,3]]\n        year: [[2020,2021,2022,2022,2023]]\n        n_legs: [[null,5,null,5,null]]\n        animal: [[null,\"Brittle stars\",null,\"Brittle stars\",null]]\n        Property `compression` must be None, str, or pyarrow.Codec\n        Provide an empty table according to the schema.\n\n        Returns\n        -------\n        table: pyarrow.Table\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> schema = pa.schema([\n        ...     pa.field('n_legs', pa.int64()),\n        ...     pa.field('animals', pa.string())])\n\n        Create an empty table with schema's fields:\n\n        >>> schema.empty_table()\n        pyarrow.Table\n        n_legs: int64\n        animals: string\n        ----\n        n_legs: [[]]\n        animals: [[]]\n        Received unsupported keyword argument(s): RecordBatch.add_column (line 2836)RecordBatch.cast (line 3301)RecordBatch.equals (line 3198)RecordBatch.from_arrays (line 3462)RecordBatch.from_pandas (line 3367)RecordBatch.from_struct_array (line 3561)RecordBatch.get_total_buffer_size (line 2805)RecordBatch.nbytes.__get__ (line 2770)RecordBatch.num_columns.__get__ (line 2682)RecordBatch.num_rows.__get__ (line 2703)RecordBatch.remove_column (line 2917)RecordBatch.rename_columns (line 3017)RecordBatch.replace_schema_metadata (line 2636)RecordBatch.schema.__get__ (line 2727)RecordBatch.select (line 3247)RecordBatch.serialize (line 3092)RecordBatch.set_column (line 2951)RecordBatch.slice (line 3141)RecordBatch.to_tensor (line 3612)RecordBatch with its custom metadata\n\n    Parameters\n    ----------\n    batch : RecordBatch\n    custom_metadata : KeyValueMetadata\n    \n    Register a Python extension type.\n\n    Registration is based on the extension name (so different re""gistered types\n    need unique extension names). Registration needs an extension type\n    instance, but then works for any instance of the same subclass regardless\n    of parametrization of the type.\n\n    Parameters\n    ----------\n    ext_type : BaseExtensionType instance\n        The ExtensionType subclass to register.\n\n    Examples\n    --------\n    Define a RationalType extension type subclassing ExtensionType:\n\n    >>> import pyarrow as pa\n    >>> class RationalType(pa.ExtensionType):\n    ...     def __init__(self, data_type: pa.DataType):\n    ...         if not pa.types.is_integer(data_type):\n    ...             raise TypeError(f\"data_type must be an integer type not {data_type}\")\n    ...         super().__init__(\n    ...             pa.struct(\n    ...                 [\n    ...                     (\"numer\", data_type),\n    ...                     (\"denom\", data_type),\n    ...                 ],\n    ...             ),\n    ...             # N.B. This name does _not_ reference `data_type` so deserialization\n    ...             # will work for _any_ integer `data_type` after registration\n    ...             \"my_package.rational\",\n    ...         )\n    ...     def __arrow_ext_serialize__(self) -> bytes:\n    ...         # No parameters are necessary\n    ...         return b\"\"\n    ...     @classmethod\n    ...     def __arrow_ext_deserialize__(cls, storage_type, serialized):\n    ...         # return an instance of this subclass\n    ...         return RationalType(storage_type[0].type)\n\n    Register the extension type:\n\n    >>> pa.register_extension_type(RationalType(pa.int64()))\n\n    Unregister the extension type:\n\n    >>> pa.unregister_extension_type(\"my_package.rational\")\n    \n        Remove missing values from a chunked array.\n        See :func:`pyarrow.compute.drop_null` for full description.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> n_legs = pa.chunked_array([[2, 2,"" None], [4, 5, 100]])\n        >>> n_legs\n        <pyarrow.lib.ChunkedArray object at ...>\n        [\n          [\n            2,\n            2,\n            null\n          ],\n          [\n            4,\n            5,\n            100\n          ]\n        ]\n        >>> n_legs.drop_null()\n        <pyarrow.lib.ChunkedArray object at ...>\n        [\n          [\n            2,\n            2\n          ],\n          [\n            4,\n            5,\n            100\n          ]\n        ]\n        \n        Remove rows that contain missing values from a Table or RecordBatch.\n\n        See :func:`pyarrow.compute.drop_null` for full usage.\n\n        Returns\n        -------\n        Table or RecordBatch\n            A tabular object with the same schema, with rows containing\n            no missing values.\n\n        Examples\n        --------\n        Table (works similarly for RecordBatch)\n\n        >>> import pyarrow as pa\n        >>> import pandas as pd\n        >>> df = pd.DataFrame({'year': [None, 2022, 2019, 2021],\n        ...                   'n_legs': [2, 4, 5, 100],\n        ...                   'animals': [\"Flamingo\", \"Horse\", None, \"Centipede\"]})\n        >>> table = pa.Table.from_pandas(df)\n        >>> table.drop_null()\n        pyarrow.Table\n        year: double\n        n_legs: int64\n        animals: string\n        ----\n        year: [[2022,2021]]\n        n_legs: [[4,100]]\n        animals: [[\"Horse\",\"Centipede\"]]\n        \n        Remove the field at index i from the schema.\n\n        Parameters\n        ----------\n        i : int\n\n        Returns\n        -------\n        schema: Schema\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> schema = pa.schema([\n        ...     pa.field('n_legs', pa.int64()),\n        ...     pa.field('animals', pa.string())])\n\n        Remove the second field of the schema:\n\n        >>> schema.remove(1)\n        n_legs: int64\n        \n        Ren""der a \"pretty-printed\" string representation of the ChunkedArray\n\n        Parameters\n        ----------\n        indent : int\n            How much to indent right the content of the array,\n            by default ``0``.\n        window : int\n            How many items to preview within each chunk at the begin and end\n            of the chunk when the chunk is bigger than the window.\n            The other elements will be ellipsed.\n        container_window : int\n            How many chunks to preview at the begin and end\n            of the array when the array is bigger than the window.\n            The other elements will be ellipsed.\n            This setting also applies to list columns.\n        skip_new_lines : bool\n            If the array should be rendered as a single line of text\n            or if each element should be on its own line.\n        element_size_limit : int, default 100\n            Maximum number of characters of a single element before it is truncated.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> n_legs = pa.chunked_array([[2, 2, 4], [4, 5, 100]])\n        >>> n_legs.to_string(skip_new_lines=True)\n        '[[2,2,4],[4,5,100]]'\n        \n        Replace a field at position i in the schema.\n\n        Parameters\n        ----------\n        i : int\n        field : Field\n\n        Returns\n        -------\n        schema: Schema\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> schema = pa.schema([\n        ...     pa.field('n_legs', pa.int64()),\n        ...     pa.field('animals', pa.string())])\n\n        Replace the second field of the schema with a new field 'extra':\n\n        >>> schema.set(1, pa.field('replaced', pa.bool_()))\n        n_legs: int64\n        replaced: bool\n        \n        Replace column in RecordBatch at position.\n\n        Parameters\n        ----------\n        i : int\n            Index to place the column at.\n        field""_ : str or Field\n            If a string is passed then the type is deduced from the column\n            data.\n        column : Array or value coercible to array\n            Column data.\n\n        Returns\n        -------\n        RecordBatch\n            New record batch with the passed column set.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> import pandas as pd\n        >>> df = pd.DataFrame({'n_legs': [2, 4, 5, 100],\n        ...                    'animals': [\"Flamingo\", \"Horse\", \"Brittle stars\", \"Centipede\"]})\n        >>> batch = pa.RecordBatch.from_pandas(df)\n\n        Replace a column:\n\n        >>> year = [2021, 2022, 2019, 2021]\n        >>> batch.set_column(1,'year', year)\n        pyarrow.RecordBatch\n        n_legs: int64\n        year: int64\n        ----\n        n_legs: [2,4,5,100]\n        year: [2021,2022,2019,2021]\n        \n        Replace column in Table at position.\n\n        Parameters\n        ----------\n        i : int\n            Index to place the column at.\n        field_ : str or Field\n            If a string is passed then the type is deduced from the column\n            data.\n        column : Array, list of Array, or values coercible to arrays\n            Column data.\n\n        Returns\n        -------\n        Table\n            New table with the passed column set.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> import pandas as pd\n        >>> df = pd.DataFrame({'n_legs': [2, 4, 5, 100],\n        ...                    'animals': [\"Flamingo\", \"Horse\", \"Brittle stars\", \"Centipede\"]})\n        >>> table = pa.Table.from_pandas(df)\n\n        Replace a column:\n\n        >>> year = [2021, 2022, 2019, 2021]\n        >>> table.set_column(1,'year', [year])\n        pyarrow.Table\n        n_legs: int64\n        year: int64\n        ----\n        n_legs: [[2,4,5,100]]\n        year: [[2021,2022,2019,2021]]\n        \n        Replace ea""ch null element in values with fill_value.\n\n        See :func:`pyarrow.compute.fill_null` for full usage.\n\n        Parameters\n        ----------\n        fill_value : any\n            The replacement value for null entries.\n\n        Returns\n        -------\n        result : Array or ChunkedArray\n            A new array with nulls replaced by the given value.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> fill_value = pa.scalar(5, type=pa.int8())\n        >>> n_legs = pa.chunked_array([[2, 2, 4], [4, None, 100]])\n        >>> n_legs.fill_null(fill_value)\n        <pyarrow.lib.ChunkedArray object at ...>\n        [\n          [\n            2,\n            2,\n            4,\n            4,\n            5,\n            100\n          ]\n        ]\n        \n        Return a NumPy copy of this array (experimental).\n\n        Parameters\n        ----------\n        zero_copy_only : bool, default False\n            Introduced for signature consistence with pyarrow.Array.to_numpy.\n            This must be False here since NumPy arrays' buffer must be contiguous.\n\n        Returns\n        -------\n        array : numpy.ndarray\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> n_legs = pa.chunked_array([[2, 2, 4], [4, 5, 100]])\n        >>> n_legs.to_numpy()\n        array([  2,   2,   4,   4,   5, 100])\n        \n        Return a child field by its numeric index.\n\n        Parameters\n        ----------\n        i : int\n\n        Returns\n        -------\n        pyarrow.Field\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> union = pa.sparse_union([pa.field('a', pa.binary(10)), pa.field('b', pa.string())])\n        >>> union[0]\n        pyarrow.Field<a: fixed_size_binary[10]>\n        \n        Return array of same length as list child values array where each\n        output value is the index of the parent list array slot containing each\n        c""hild value.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> arr = pa.array([[1, 2, 3], [], None, [4]],\n        ...                type=pa.list_(pa.int32()))\n        >>> arr.value_parent_indices()\n        <pyarrow.lib.Int64Array object at ...>\n        [\n          0,\n          0,\n          0,\n          3\n        ]\n        \n        Return boolean array indicating the null values.\n\n        Parameters\n        ----------\n        nan_is_null : bool (optional, default False)\n            Whether floating-point NaN values should also be considered null.\n\n        Returns\n        -------\n        array : boolean Array or ChunkedArray\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> n_legs = pa.chunked_array([[2, 2, 4], [4, None, 100]])\n        >>> n_legs.is_null()\n        <pyarrow.lib.ChunkedArray object at ...>\n        [\n          [\n            false,\n            false,\n            false,\n            false,\n            true,\n            false\n          ]\n        ]\n        \n        Return boolean array indicating the NaN values.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> import numpy as np\n        >>> arr = pa.chunked_array([[2, np.nan, 4], [4, None, 100]])\n        >>> arr.is_nan()\n        <pyarrow.lib.ChunkedArray object at ...>\n        [\n          [\n            false,\n            true,\n            false,\n            false,\n            null,\n            false\n          ]\n        ]\n        \n        Return boolean array indicating the non-null values.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> n_legs = pa.chunked_array([[2, 2, 4], [4, None, 100]])\n        >>> n_legs.is_valid()\n        <pyarrow.lib.ChunkedArray object at ...>\n        [\n          [\n            true,\n            true,\n            true\n          ],\n          [\n            true,\n            false,\n      ""      true\n          ]\n        ]\n        \n        Return data type of a ChunkedArray.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> n_legs = pa.chunked_array([[2, 2, 4], [4, 5, 100]])\n        >>> n_legs.type\n        DataType(int64)\n        \n        Return deserialized-from-JSON pandas metadata field (if it exists)\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> import pandas as pd\n        >>> df = pd.DataFrame({'n_legs': [2, 4, 5, 100],\n        ...                    'animals': [\"Flamingo\", \"Horse\", \"Brittle stars\", \"Centipede\"]})\n        >>> schema = pa.Table.from_pandas(df).schema\n\n        Select pandas metadata field from Arrow Schema:\n\n        >>> schema.pandas_metadata\n        {'index_columns': [{'kind': 'range', 'name': None, 'start': 0, 'stop': 4, 'step': 1}], ...\n        \n        Return index of the unique field with the given name.\n\n        Parameters\n        ----------\n        name : str\n            The name of the field to look up.\n\n        Returns\n        -------\n        index : int\n            The index of the field with the given name; -1 if the\n            name isn't found or there are several fields with the given\n            name.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> struct_type = pa.struct({'x': pa.int32(), 'y': pa.string()})\n\n        Index of the field with a name 'y':\n\n        >>> struct_type.get_field_index('y')\n        1\n\n        Index of the field that does not exist:\n\n        >>> struct_type.get_field_index('z')\n        -1\n        \n        Return index of the unique field with the given name.\n\n        Parameters\n        ----------\n        name : str\n            The name of the field to look up.\n\n        Returns\n        -------\n        index : int\n            The index of the field with the given name; -1 if the\n            name isn't found or there are several ""fields with the given\n            name.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> schema = pa.schema([\n        ...     pa.field('n_legs', pa.int64()),\n        ...     pa.field('animals', pa.string())])\n\n        Get the index of the field named 'animals':\n\n        >>> schema.get_field_index(\"animals\")\n        1\n\n        Index in case of several fields with the given name:\n\n        >>> schema = pa.schema([\n        ...     pa.field('n_legs', pa.int64()),\n        ...     pa.field('animals', pa.string()),\n        ...     pa.field('animals', pa.bool_())],\n        ...     metadata={\"n_legs\": \"Number of legs per animal\"})\n        >>> schema.get_field_index(\"animals\")\n        -1\n        \n        Return integers array with values equal to the respective length of\n        each list element. Null list values are null in the output.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> arr = pa.array([[1, 2, 3], [], None, [4]],\n        ...                type=pa.list_(pa.int32()))\n        >>> arr.value_lengths()\n        <pyarrow.lib.Int32Array object at ...>\n        [\n          3,\n          0,\n          null,\n          1\n        ]\n        \n        Return length of a ChunkedArray.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> n_legs = pa.chunked_array([[2, 2, 4], [4, 5, 100]])\n        >>> n_legs.length()\n        6\n        \n        Return sorted list of indices for the fields with the given name.\n\n        Parameters\n        ----------\n        name : str\n            The name of the field to look up.\n\n        Returns\n        -------\n        indices : List[int]\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> struct_type = pa.struct({'x': pa.int32(), 'y': pa.string()})\n        >>> struct_type.get_all_field_indices('x')\n        [0]\n        \n        Return sorted list of indices for ""the fields with the given name.\n\n        Parameters\n        ----------\n        name : str\n            The name of the field to look up.\n\n        Returns\n        -------\n        indices : List[int]\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> schema = pa.schema([\n        ...     pa.field('n_legs', pa.int64()),\n        ...     pa.field('animals', pa.string()),\n        ...     pa.field('animals', pa.bool_())])\n\n        Get the indexes of the fields named 'animals':\n\n        >>> schema.get_all_field_indices(\"animals\")\n        [1, 2]\n        \n        Return the equivalent NumPy / Pandas dtype.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> pa.int64().to_pandas_dtype()\n        <class 'numpy.int64'>\n        \n        Return the list offsets as an int32 array.\n\n        The returned array will not have a validity bitmap, so you cannot\n        expect to pass it to `ListArray.from_arrays` and get back the same\n        list array if the original one has nulls.\n\n        Returns\n        -------\n        offsets : Int32Array\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> array = pa.array([[1, 2], None, [3, 4, 5]])\n        >>> array.offsets\n        <pyarrow.lib.Int32Array object at ...>\n        [\n          0,\n          2,\n          2,\n          5\n        ]\n        \n        Return the list offsets as an int32 array.\n\n        The returned array will not have a validity bitmap, so you cannot\n        expect to pass it to `ListViewArray.from_arrays` and get back the same\n        list array if the original one has nulls.\n\n        Returns\n        -------\n        offsets : Int32Array\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> values = [1, 2, None, 3, 4]\n        >>> offsets = [0, 0, 1]\n        >>> sizes = [2, 0, 4]\n        >>> array = pa.ListViewArray.from_arrays(offsets, sizes, values"")\n        >>> array.offsets\n        <pyarrow.lib.Int32Array object at ...>\n        [\n          0,\n          0,\n          1\n        ]\n        \n        Return the list sizes as an int32 array.\n\n        The returned array will not have a validity bitmap, so you cannot\n        expect to pass it to `ListViewArray.from_arrays` and get back the same\n        list array if the original one has nulls.\n\n        Returns\n        -------\n        sizes : Int32Array\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> values = [1, 2, None, 3, 4]\n        >>> offsets = [0, 0, 1]\n        >>> sizes = [2, 0, 4]\n        >>> array = pa.ListViewArray.from_arrays(offsets, sizes, values)\n        >>> array.sizes\n        <pyarrow.lib.Int32Array object at ...>\n        [\n          2,\n          0,\n          4\n        ]\n        \n        Return the list view offsets as an int64 array.\n\n        The returned array will not have a validity bitmap, so you cannot\n        expect to pass it to `LargeListViewArray.from_arrays` and get back the\n        same list array if the original one has nulls.\n\n        Returns\n        -------\n        offsets : Int64Array\n\n        Examples\n        --------\n\n        >>> import pyarrow as pa\n        >>> values = [1, 2, None, 3, 4]\n        >>> offsets = [0, 0, 1]\n        >>> sizes = [2, 0, 4]\n        >>> array = pa.LargeListViewArray.from_arrays(offsets, sizes, values)\n        >>> array.offsets\n        <pyarrow.lib.Int64Array object at ...>\n        [\n          0,\n          0,\n          1\n        ]\n        \n        Return the list view sizes as an int64 array.\n\n        The returned array will not have a validity bitmap, so you cannot\n        expect to pass it to `LargeListViewArray.from_arrays` and get back the\n        same list array if the original one has nulls.\n\n        Returns\n        -------\n        sizes : Int64Array\n\n        Examples\n        --------\n\n        >>> impo""rt pyarrow as pa\n        >>> values = [1, 2, None, 3, 4]\n        >>> offsets = [0, 0, 1]\n        >>> sizes = [2, 0, 4]\n        >>> array = pa.LargeListViewArray.from_arrays(offsets, sizes, values)\n        >>> array.sizes\n        <pyarrow.lib.Int64Array object at ...>\n        [\n          2,\n          0,\n          4\n        ]\n        \n    Return the process-global memory pool.\n\n    Examples\n    --------\n    >>> default_memory_pool()\n    <pyarrow.MemoryPool backend_name=... bytes_allocated=0 max_memory=...>\n    \n        Return the underlying array of values which backs the ListArray\n        ignoring the array's offset.\n\n        If any of the list elements are null, but are backed by a\n        non-empty sub-list, those elements will be included in the\n        output.\n\n        Compare with :meth:`flatten`, which returns only the non-null\n        values taking into consideration the array's offset.\n\n        Returns\n        -------\n        values : Array\n\n        See Also\n        --------\n        ListArray.flatten : ...\n\n        Examples\n        --------\n\n        The values include null elements from sub-lists:\n\n        >>> import pyarrow as pa\n        >>> array = pa.array([[1, 2], None, [3, 4, None, 6]])\n        >>> array.values\n        <pyarrow.lib.Int64Array object at ...>\n        [\n          1,\n          2,\n          3,\n          4,\n          null,\n          6\n        ]\n\n        If an array is sliced, the slice still uses the same\n        underlying data as the original array, just with an\n        offset. Since values ignores the offset, the values are the\n        same:\n\n        >>> sliced = array.slice(1, 2)\n        >>> sliced\n        <pyarrow.lib.ListArray object at ...>\n        [\n          null,\n          [\n            3,\n            4,\n            null,\n            6\n          ]\n        ]\n        >>> sliced.values\n        <pyarrow.lib.Int64Array object at ...>\n        [\n          1,\n      ""    2,\n          3,\n          4,\n          null,\n          6\n        ]\n\n        \n        Return the underlying array of values which backs the LargeListArray\n        ignoring the array's offset.\n\n        If any of the list elements are null, but are backed by a\n        non-empty sub-list, those elements will be included in the\n        output.\n\n        Compare with :meth:`flatten`, which returns only the non-null\n        values taking into consideration the array's offset.\n\n        Returns\n        -------\n        values : Array\n\n        See Also\n        --------\n        LargeListArray.flatten : ...\n\n        Examples\n        --------\n\n        The values include null elements from the sub-lists:\n\n        >>> import pyarrow as pa\n        >>> array = pa.array(\n        ...     [[1, 2], None, [3, 4, None, 6]],\n        ...     type=pa.large_list(pa.int32()),\n        ... )\n        >>> array.values\n        <pyarrow.lib.Int32Array object at ...>\n        [\n          1,\n          2,\n          3,\n          4,\n          null,\n          6\n        ]\n\n        If an array is sliced, the slice still uses the same\n        underlying data as the original array, just with an\n        offset. Since values ignores the offset, the values are the\n        same:\n\n        >>> sliced = array.slice(1, 2)\n        >>> sliced\n        <pyarrow.lib.LargeListArray object at ...>\n        [\n          null,\n          [\n            3,\n            4,\n            null,\n            6\n          ]\n        ]\n        >>> sliced.values\n        <pyarrow.lib.Int32Array object at ...>\n        [\n          1,\n          2,\n          3,\n          4,\n          null,\n          6\n        ]\n        \n        Return the underlying array of values which backs the ListViewArray\n        ignoring the array's offset and sizes.\n\n        The values array may be out of order and/or contain additional values\n        that are not found in the logical representa""tion of the array. The only\n        guarantee is that each non-null value in the ListView Array is contiguous.\n\n        Compare with :meth:`flatten`, which returns only the non-null\n        values taking into consideration the array's order and offset.\n\n        Returns\n        -------\n        values : Array\n\n        Examples\n        --------\n        The values include null elements from sub-lists:\n\n        >>> import pyarrow as pa\n        >>> values = [1, 2, None, 3, 4]\n        >>> offsets = [0, 0, 1]\n        >>> sizes = [2, 0, 4]\n        >>> array = pa.ListViewArray.from_arrays(offsets, sizes, values)\n        >>> array\n        <pyarrow.lib.ListViewArray object at ...>\n        [\n          [\n            1,\n            2\n          ],\n          [],\n          [\n            2,\n            null,\n            3,\n            4\n          ]\n        ]\n        >>> array.values\n        <pyarrow.lib.Int64Array object at ...>\n        [\n          1,\n          2,\n          null,\n          3,\n          4\n        ]\n        \n        Return the underlying array of values which backs the LargeListArray\n        ignoring the array's offset.\n\n        The values array may be out of order and/or contain additional values\n        that are not found in the logical representation of the array. The only\n        guarantee is that each non-null value in the ListView Array is contiguous.\n\n        Compare with :meth:`flatten`, which returns only the non-null\n        values taking into consideration the array's order and offset.\n\n        Returns\n        -------\n        values : Array\n\n        See Also\n        --------\n        LargeListArray.flatten : ...\n\n        Examples\n        --------\n\n        The values include null elements from sub-lists:\n\n        >>> import pyarrow as pa\n        >>> values = [1, 2, None, 3, 4]\n        >>> offsets = [0, 0, 1]\n        >>> sizes = [2, 0, 4]\n        >>> array = pa.LargeListViewArray.from_arrays(""offsets, sizes, values)\n        >>> array\n        <pyarrow.lib.LargeListViewArray object at ...>\n        [\n          [\n            1,\n            2\n          ],\n          [],\n          [\n            2,\n            null,\n            3,\n            4\n          ]\n        ]\n        >>> array.values\n        <pyarrow.lib.Int64Array object at ...>\n        [\n          1,\n          2,\n          null,\n          3,\n          4\n        ]\n        \n        Return the underlying array of values which backs the\n        FixedSizeListArray ignoring the array's offset.\n\n        Note even null elements are included.\n\n        Compare with :meth:`flatten`, which returns only the non-null\n        sub-list values.\n\n        Returns\n        -------\n        values : Array\n\n        See Also\n        --------\n        FixedSizeListArray.flatten : ...\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> array = pa.array(\n        ...     [[1, 2], None, [3, None]],\n        ...     type=pa.list_(pa.int32(), 2)\n        ... )\n        >>> array.values\n        <pyarrow.lib.Int32Array object at ...>\n        [\n          1,\n          2,\n          null,\n          null,\n          3,\n          null\n        ]\n\n        \n        Return true if the tensors contains exactly equal data.\n\n        Parameters\n        ----------\n        other : Tensor\n            The other tensor to compare for equality.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> import numpy as np\n        >>> x = np.array([[2, 2, 4], [4, 5, 100]], np.int32)\n        >>> tensor = pa.Tensor.from_numpy(x, dim_names=[\"dim1\",\"dim2\"])\n        >>> y = np.array([[2, 2, 4], [4, 5, 10]], np.int32)\n        >>> tensor2 = pa.Tensor.from_numpy(y, dim_names=[\"a\",\"b\"])\n        >>> tensor.equals(tensor)\n        True\n        >>> tensor.equals(tensor2)\n        False\n        \n        Return true if type is equivalent to pa""ssed value.\n\n        Parameters\n        ----------\n        other : DataType or string convertible to DataType\n        check_metadata : bool\n            Whether nested Field metadata equality should be checked as well.\n\n        Returns\n        -------\n        is_equal : bool\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> pa.int64().equals(pa.string())\n        False\n        >>> pa.int64().equals(pa.int64())\n        True\n        \n        Return whether the contents of two chunked arrays are equal.\n\n        Parameters\n        ----------\n        other : pyarrow.ChunkedArray\n            Chunked array to compare against.\n\n        Returns\n        -------\n        are_equal : bool\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> n_legs = pa.chunked_array([[2, 2, 4], [4, 5, 100]])\n        >>> animals = pa.chunked_array((\n        ...             [\"Flamingo\", \"Parrot\", \"Dog\"],\n        ...             [\"Horse\", \"Brittle stars\", \"Centipede\"]\n        ...             ))\n        >>> n_legs.equals(n_legs)\n        True\n        >>> n_legs.equals(animals)\n        False\n        \n        Returns implied schema from dataframe\n\n        Parameters\n        ----------\n        df : pandas.DataFrame\n\n        preserve_index : bool, optional\n            Whether to store the index as an additional field in the resulting\n            ``Schema``. The default of None will store the index as a field,\n            except for RangeIndex which is stored as metadata only. Use\n            ``preserve_index=True`` to force it to be stored as a field.\n\n        Returns\n        -------\n        pyarrow.Schema\n\n        Examples\n        --------\n        >>> import pandas as pd\n        >>> import pyarrow as pa\n        >>> df = pd.DataFrame({\n        ...     'int': [1, 2],\n        ...     'str': ['a', 'b']\n        ... })\n\n        Create an Arrow Schema from the schema of a pand""as dataframe:\n\n        >>> pa.Schema.from_pandas(df)\n        int: int64\n        str: string\n        -- schema metadata --\n        pandas: '{\"index_columns\": [{\"kind\": \"range\", \"name\": null, ...\n        \n        Returns the name of the i-th tensor dimension.\n\n        Parameters\n        ----------\n        i : int\n            The physical index of the tensor dimension.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> import numpy as np\n        >>> x = np.array([[2, 2, 4], [4, 5, 100]], np.int32)\n        >>> tensor = pa.Tensor.from_numpy(x, dim_names=[\"dim1\",\"dim2\"])\n        >>> tensor.dim_name(0)\n        'dim1'\n        >>> tensor.dim_name(1)\n        'dim2'\n        RunEndEncodedType expects None as validity bitmap, buffers[0] is not NoneRunEndEncodedType's expected null_count (0) did not match passed number (RunEndEncodedType's expected number of children (RunEndEncodedType's expected number of buffers (Scalar data type was NULLScalar type not supportedScalar was NULLSchema and number of arrays unequalSchema.append (line 3309)Schema.empty_table (line 3044)Schema.equals (line 3072)Schema.field (line 3157)Schema field name corresponds to more than one fieldSchema.from_pandas (line 3111)Schema.get_all_field_indices (line 3281)Schema.get_field_index (line 3241)Schema.insert (line 3348)Schema.metadata.__get__ (line 3010)Schema must be an instance of pyarrow.SchemaSchema.names.__get__ (line 2959)\n        Schema of the RecordBatch and its columns\n\n        Returns\n        -------\n        pyarrow.Schema\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> n_legs = pa.array([2, 2, 4, 4, 5, 100])\n        >>> animals = pa.array([\"Flamingo\", \"Parrot\", \"Dog\", \"Horse\", \"Brittle stars\", \"Centipede\"])\n        >>> batch = pa.RecordBatch.from_arrays([n_legs, animals],\n        ...                                     names=[\"n_legs\", \"animals\"])\n        >>> batch.sche""ma\n        n_legs: int64\n        animals: string\n        \n        Schema of the table and its columns.\n\n        Returns\n        -------\n        Schema\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> import pandas as pd\n        >>> df = pd.DataFrame({'n_legs': [2, 4, 5, 100],\n        ...                    'animals': [\"Flamingo\", \"Horse\", \"Brittle stars\", \"Centipede\"]})\n        >>> table = pa.Table.from_pandas(df)\n        >>> table.schema\n        n_legs: int64\n        animals: string\n        -- schema metadata --\n        pandas: '{\"index_columns\": [{\"kind\": \"range\", \"name\": null, \"start\": 0, \"' ...\n        Schema.pandas_metadata.__get__ (line 2933)Schema passed to names= option, please pass schema= explicitly. Will raise exception in futureSchema.remove (line 3386)Schema.remove_metadata (line 3537)Schema.serialize (line 3503)Schema.set (line 3417)Schema.types.__get__ (line 2987)Schema.with_metadata (line 3467)\n        Select a chunk by its index.\n\n        Parameters\n        ----------\n        i : int\n\n        Returns\n        -------\n        pyarrow.Array\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> n_legs = pa.chunked_array([[2, 2, None], [4, 5, 100]])\n        >>> n_legs.chunk(1)\n        <pyarrow.lib.Int64Array object at ...>\n        [\n          4,\n          5,\n          100\n        ]\n        \n        Select a field by its column name or numeric index.\n\n        Parameters\n        ----------\n        i : int or str\n\n        Returns\n        -------\n        pyarrow.Field\n\n        Examples\n        --------\n\n        >>> import pyarrow as pa\n        >>> struct_type = pa.struct({'x': pa.int32(), 'y': pa.string()})\n\n        Select the second field:\n\n        >>> struct_type.field(1)\n        pyarrow.Field<y: string>\n\n        Select the field named 'x':\n\n        >>> struct_type.field('x')\n        pyarrow.Field<x: int32>\n     ""   \n        Select a field by its column name or numeric index.\n\n        Parameters\n        ----------\n        i : int or string\n\n        Returns\n        -------\n        pyarrow.Field\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> schema = pa.schema([\n        ...     pa.field('n_legs', pa.int64()),\n        ...     pa.field('animals', pa.string())])\n\n        Select the second field:\n\n        >>> schema.field(1)\n        pyarrow.Field<animals: string>\n\n        Select the field of the column named 'n_legs':\n\n        >>> schema.field('n_legs')\n        pyarrow.Field<n_legs: int64>\n        \n        Select a schema field by its column name or numeric index.\n\n        Parameters\n        ----------\n        i : int or string\n            The index or name of the field to retrieve.\n\n        Returns\n        -------\n        Field\n\n        Examples\n        --------\n        Table (works similarly for RecordBatch)\n\n        >>> import pyarrow as pa\n        >>> import pandas as pd\n        >>> df = pd.DataFrame({'n_legs': [2, 4, 5, 100],\n        ...                    'animals': [\"Flamingo\", \"Horse\", \"Brittle stars\", \"Centipede\"]})\n        >>> table = pa.Table.from_pandas(df)\n        >>> table.field(0)\n        pyarrow.Field<n_legs: int64>\n        >>> table.field(1)\n        pyarrow.Field<animals: string>\n        \n        Select columns of the RecordBatch.\n\n        Returns a new RecordBatch with the specified columns, and metadata\n        preserved.\n\n        Parameters\n        ----------\n        columns : list-like\n            The column names or integer indices to select.\n\n        Returns\n        -------\n        RecordBatch\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> n_legs = pa.array([2, 2, 4, 4, 5, 100])\n        >>> animals = pa.array([\"Flamingo\", \"Parrot\", \"Dog\", \"Horse\", \"Brittle stars\", \"Centipede\"])\n        >>> batch = pa.re""cord_batch([n_legs, animals],\n        ...                          names=[\"n_legs\", \"animals\"])\n\n        Select columns my indices:\n\n        >>> batch.select([1])\n        pyarrow.RecordBatch\n        animals: string\n        ----\n        animals: [\"Flamingo\",\"Parrot\",\"Dog\",\"Horse\",\"Brittle stars\",\"Centipede\"]\n\n        Select columns by names:\n\n        >>> batch.select([\"n_legs\"])\n        pyarrow.RecordBatch\n        n_legs: int64\n        ----\n        n_legs: [2,2,4,4,5,100]\n        \n        Select columns of the Table.\n\n        Returns a new Table with the specified columns, and metadata\n        preserved.\n\n        Parameters\n        ----------\n        columns : list-like\n            The column names or integer indices to select.\n\n        Returns\n        -------\n        Table\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> import pandas as pd\n        >>> df = pd.DataFrame({'year': [2020, 2022, 2019, 2021],\n        ...                    'n_legs': [2, 4, 5, 100],\n        ...                    'animals': [\"Flamingo\", \"Horse\", \"Brittle stars\", \"Centipede\"]})\n        >>> table = pa.Table.from_pandas(df)\n        >>> table.select([0,1])\n        pyarrow.Table\n        year: int64\n        n_legs: int64\n        ----\n        year: [[2020,2022,2019,2021]]\n        n_legs: [[2,4,5,100]]\n        >>> table.select([\"year\"])\n        pyarrow.Table\n        year: int64\n        ----\n        year: [[2020,2022,2019,2021]]\n        \n        Select rows from a Table or RecordBatch.\n\n        See :func:`pyarrow.compute.take` for full usage.\n\n        Parameters\n        ----------\n        indices : Array or array-like\n            The indices in the tabular object whose rows will be returned.\n\n        Returns\n        -------\n        Table or RecordBatch\n            A tabular object with the same schema, containing the taken rows.\n\n        Examples\n        --------\n       "" Table (works similarly for RecordBatch)\n\n        >>> import pyarrow as pa\n        >>> import pandas as pd\n        >>> df = pd.DataFrame({'year': [2020, 2022, 2019, 2021],\n        ...                    'n_legs': [2, 4, 5, 100],\n        ...                    'animals': [\"Flamingo\", \"Horse\", \"Brittle stars\", \"Centipede\"]})\n        >>> table = pa.Table.from_pandas(df)\n        >>> table.take([1,3])\n        pyarrow.Table\n        year: int64\n        n_legs: int64\n        animals: string\n        ----\n        year: [[2022,2021]]\n        n_legs: [[4,100]]\n        animals: [[\"Horse\",\"Centipede\"]]\n        \n        Select rows from the table or record batch based on a boolean mask.\n\n        The Table can be filtered based on a mask, which will be passed to\n        :func:`pyarrow.compute.filter` to perform the filtering, or it can\n        be filtered through a boolean :class:`.Expression`\n\n        Parameters\n        ----------\n        mask : Array or array-like or .Expression\n            The boolean mask or the :class:`.Expression` to filter the table with.\n        null_selection_behavior : str, default \"drop\"\n            How nulls in the mask should be handled, does nothing if\n            an :class:`.Expression` is used.\n\n        Returns\n        -------\n        filtered : Table or RecordBatch\n            A tabular object of the same schema, with only the rows selected\n            by applied filtering\n\n        Examples\n        --------\n        Using a Table (works similarly for RecordBatch):\n\n        >>> import pyarrow as pa\n        >>> table = pa.table({'year': [2020, 2022, 2019, 2021],\n        ...                   'n_legs': [2, 4, 5, 100],\n        ...                   'animals': [\"Flamingo\", \"Horse\", \"Brittle stars\", \"Centipede\"]})\n\n        Define an expression and select rows:\n\n        >>> import pyarrow.compute as pc\n        >>> expr = pc.field(\"year\") <= 2020\n        >>> table.filter(expr)\n     ""   pyarrow.Table\n        year: int64\n        n_legs: int64\n        animals: string\n        ----\n        year: [[2020,2019]]\n        n_legs: [[2,5]]\n        animals: [[\"Flamingo\",\"Brittle stars\"]]\n\n        Define a mask and select rows:\n\n        >>> mask=[True, True, False, None]\n        >>> table.filter(mask)\n        pyarrow.Table\n        year: int64\n        n_legs: int64\n        animals: string\n        ----\n        year: [[2020,2022]]\n        n_legs: [[2,4]]\n        animals: [[\"Flamingo\",\"Horse\"]]\n        >>> table.filter(mask, null_selection_behavior='emit_null')\n        pyarrow.Table\n        year: int64\n        n_legs: int64\n        animals: string\n        ----\n        year: [[2020,2022,null]]\n        n_legs: [[2,4,null]]\n        animals: [[\"Flamingo\",\"Horse\",null]]\n        \n        Select single column from Table or RecordBatch.\n\n        Parameters\n        ----------\n        i : int or string\n            The index or name of the column to retrieve.\n\n        Returns\n        -------\n        column : Array (for RecordBatch) or ChunkedArray (for Table)\n\n        Examples\n        --------\n        Table (works similarly for RecordBatch)\n\n        >>> import pyarrow as pa\n        >>> import pandas as pd\n        >>> df = pd.DataFrame({'n_legs': [2, 4, 5, 100],\n        ...                    'animals': [\"Flamingo\", \"Horse\", \"Brittle stars\", \"Centipede\"]})\n        >>> table = pa.Table.from_pandas(df)\n\n        Select a column by numeric index:\n\n        >>> table.column(0)\n        <pyarrow.lib.ChunkedArray object at ...>\n        [\n          [\n            2,\n            4,\n            5,\n            100\n          ]\n        ]\n\n        Select a column by its name:\n\n        >>> table.column(\"animals\")\n        <pyarrow.lib.ChunkedArray object at ...>\n        [\n          [\n            \"Flamingo\",\n            \"Horse\",\n            \"Brittle stars\",\n            \"Centipede\"\n         "" ]\n        ]\n        \n        Select values from the chunked array.\n\n        See :func:`pyarrow.compute.filter` for full usage.\n\n        Parameters\n        ----------\n        mask : Array or array-like\n            The boolean mask to filter the chunked array with.\n        null_selection_behavior : str, default \"drop\"\n            How nulls in the mask should be handled.\n\n        Returns\n        -------\n        filtered : Array or ChunkedArray\n            An array of the same type, with only the elements selected by\n            the boolean mask.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> n_legs = pa.chunked_array([[2, 2, 4], [4, 5, 100]])\n        >>> n_legs\n        <pyarrow.lib.ChunkedArray object at ...>\n        [\n          [\n            2,\n            2,\n            4\n          ],\n          [\n            4,\n            5,\n            100\n          ]\n        ]\n        >>> mask = pa.array([True, False, None, True, False, True])\n        >>> n_legs.filter(mask)\n        <pyarrow.lib.ChunkedArray object at ...>\n        [\n          [\n            2\n          ],\n          [\n            4,\n            100\n          ]\n        ]\n        >>> n_legs.filter(mask, null_selection_behavior=\"emit_null\")\n        <pyarrow.lib.ChunkedArray object at ...>\n        [\n          [\n            2,\n            null\n          ],\n          [\n            4,\n            100\n          ]\n        ]\n        \n        Select values from the chunked array.\n\n        See :func:`pyarrow.compute.take` for full usage.\n\n        Parameters\n        ----------\n        indices : Array or array-like\n            The indices in the array whose values will be returned.\n\n        Returns\n        -------\n        taken : Array or ChunkedArray\n            An array with the same datatype, containing the taken values.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> n_legs = pa"".chunked_array([[2, 2, 4], [4, 5, 100]])\n        >>> n_legs\n        <pyarrow.lib.ChunkedArray object at ...>\n        [\n          [\n            2,\n            2,\n            4\n          ],\n          [\n            4,\n            5,\n            100\n          ]\n        ]\n        >>> n_legs.take([1,4,5])\n        <pyarrow.lib.ChunkedArray object at ...>\n        [\n          [\n            2,\n            5,\n            100\n          ]\n        ]\n        Should specify one of list_size and type\n        Should the entries be sorted according to keys.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> pa.map_(pa.string(), pa.int32(), keys_sorted=True).keys_sorted\n        True\n        \n        Sort the Table or RecordBatch by one or multiple columns.\n\n        Parameters\n        ----------\n        sorting : str or list[tuple(name, order)]\n            Name of the column to use to sort (ascending), or\n            a list of multiple sorting conditions where\n            each entry is a tuple with column name\n            and sorting order (\"ascending\" or \"descending\")\n        **kwargs : dict, optional\n            Additional sorting options.\n            As allowed by :class:`SortOptions`\n\n        Returns\n        -------\n        Table or RecordBatch\n            A new tabular object sorted according to the sort keys.\n\n        Examples\n        --------\n        Table (works similarly for RecordBatch)\n\n        >>> import pandas as pd\n        >>> import pyarrow as pa\n        >>> df = pd.DataFrame({'year': [2020, 2022, 2021, 2022, 2019, 2021],\n        ...                    'n_legs': [2, 2, 4, 4, 5, 100],\n        ...                    'animal': [\"Flamingo\", \"Parrot\", \"Dog\", \"Horse\",\n        ...                    \"Brittle stars\", \"Centipede\"]})\n        >>> table = pa.Table.from_pandas(df)\n        >>> table.sort_by('animal')\n        pyarrow.Table\n        year: int64\n        n_legs: int""64\n        animal: string\n        ----\n        year: [[2019,2021,2021,2020,2022,2022]]\n        n_legs: [[5,100,4,2,4,2]]\n        animal: [[\"Brittle stars\",\"Centipede\",\"Dog\",\"Flamingo\",\"Horse\",\"Parrot\"]]\n        SparseCOOTensor was NULLSparseCSCMatrix was NULLSparseCSFTensor was NULLSparseCSRMatrix was NULL\n        Strides of this tensor.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> import numpy as np\n        >>> x = np.array([[2, 2, 4], [4, 5, 100]], np.int32)\n        >>> tensor = pa.Tensor.from_numpy(x, dim_names=[\"dim1\",\"dim2\"])\n        >>> tensor.strides\n        (12, 4)\n        StringBuilder only accepts string objectsStringViewBuilder only accepts string objectsStructType.field (line 979)StructType.fields.__get__ (line 1074)StructType.get_all_field_indices (line 1014)StructType.get_field_index (line 946)StructType.names.__get__ (line 1060)Struct field name corresponds to more than one fieldTableGroupBy.aggregate (line 6512)Table.add_column (line 5338)Table.cast (line 4670)Table.combine_chunks (line 4511)Table.equals (line 4621)Table.flatten (line 4445)Table.from_arrays (line 4813)Table.from_batches (line 4972)Table.from_pandas (line 4733)Table.from_struct_array (line 4916)Table.get_total_buffer_size (line 5307)Table.group_by (line 5597)Table.join_asof (line 5775)Table.join (line 5640)Table.nbytes.__get__ (line 5272)Table.num_columns.__get__ (line 5227)Table.num_rows.__get__ (line 5248)Table.remove_column (line 5412)Table.rename_columns (line 5505)Table.replace_schema_metadata (line 4382)Table.schema.__get__ (line 5184)Table.select (line 4331)Table.set_column (line 5446)Table.slice (line 4266)Table.to_batches (line 5045)Table.to_reader (line 5115)Table.unify_dictionaries (line 4562)_Tabular.append_column (line 2456)_Tabular.column (line 1747)_Tabular.column_names.__get__ (line 1798)_Tabular.columns.__get__ (line 1820)_Tabular.drop_columns (line 2389)_Tabular.drop_null (line 1859)_Tabular.field (l""ine 1894)_Tabular.filter (line 2202)_Tabular.from_pydict (line 1923)_Tabular.from_pylist (line 1990)_Tabular.itercolumns (line 2054)_Tabular.shape.__get__ (line 2088)_Tabular.sort_by (line 2112)_Tabular.take (line 2163)_Tabular.to_pydict (line 2275)_Tabular.to_pylist (line 2315)Target schema's field names are not matching the record batch's field names: Target schema's field names are not matching the table's field names: Tensor.dim_name (line 148)Tensor.dim_names.__get__ (line 170)Tensor.equals (line 118)Tensor.from_numpy (line 61)Tensor.is_contiguous.__get__ (line 202)Tensor.is_mutable.__get__ (line 186)Tensor.ndim.__get__ (line 218)Tensor.shape.__get__ (line 250)Tensor.size.__get__ (line 234)Tensor.strides.__get__ (line 267)Tensor.to_numpy (line 96)Tensor was NULL\n        Test if this field is equal to the other\n\n        Parameters\n        ----------\n        other : pyarrow.Field\n        check_metadata : bool, default False\n            Whether Field metadata equality should be checked as well.\n\n        Returns\n        -------\n        is_equal : bool\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> f1 = pa.field('key', pa.int32())\n        >>> f2 = pa.field('key', pa.int32(), nullable=False)\n        >>> f1.equals(f2)\n        False\n        >>> f1.equals(f1)\n        True\n        \n        Test if this schema is equal to the other\n\n        Parameters\n        ----------\n        other :  pyarrow.Schema\n        check_metadata : bool, default False\n            Key/value metadata must be equal too\n\n        Returns\n        -------\n        is_equal : bool\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> schema1 = pa.schema([\n        ...     pa.field('n_legs', pa.int64()),\n        ...     pa.field('animals', pa.string())],\n        ...     metadata={\"n_legs\": \"Number of legs per animal\"})\n        >>> schema2 = pa.schema([\n        ...     ('some_int', pa.int32()),\n      ""  ...     ('some_string', pa.string())\n        ... ])\n\n        Test two equal schemas:\n\n        >>> schema1.equals(schema1)\n        True\n\n        Test two unequal schemas:\n\n        >>> schema1.equals(schema2)\n        False\n        The Array passed as dictionary must have identical type to the dictionary type's value_typeThe Scalar value passed as index must have identical type to the dictionary type's index_typeThe 'add_metadata' method is deprecated, use 'with_metadata' insteadThe column must be allocated on the same device as the RecordBatch. Got column on device \n        The data type of dictionary indices (a signed integer type).\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> pa.dictionary(pa.int16(), pa.utf8()).index_type\n        DataType(int16)\n        \n        The data type of items in the map entries.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> pa.map_(pa.string(), pa.int32()).item_type\n        DataType(int32)\n        \n        The data type of keys in the map entries.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> pa.map_(pa.string(), pa.int32()).key_type\n        DataType(string)\n        \n        The data type of large list values.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> pa.large_list(pa.string()).value_type\n        DataType(string)\n        \n        The data type of large list values.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> pa.list_(pa.int32(), 2).value_type\n        DataType(int32)\n        \n        The data type of large list view values.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> pa.large_list_view(pa.string()).value_type\n        DataType(string)\n        \n        The data type of list values.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> pa.lis""t_(pa.string()).value_type\n        DataType(string)\n        \n        The data type of list view values.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> pa.list_view(pa.string()).value_type\n        DataType(string)\n        \n        The decimal precision, in number of decimal digits (an integer).\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> t = pa.decimal32(5, 2)\n        >>> t.precision\n        5\n        \n        The decimal precision, in number of decimal digits (an integer).\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> t = pa.decimal64(5, 2)\n        >>> t.precision\n        5\n        \n        The decimal precision, in number of decimal digits (an integer).\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> t = pa.decimal128(5, 2)\n        >>> t.precision\n        5\n        \n        The decimal precision, in number of decimal digits (an integer).\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> t = pa.decimal256(76, 38)\n        >>> t.precision\n        76\n        \n        The decimal scale (an integer).\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> t = pa.decimal32(5, 2)\n        >>> t.scale\n        2\n        \n        The decimal scale (an integer).\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> t = pa.decimal64(5, 2)\n        >>> t.scale\n        2\n        \n        The decimal scale (an integer).\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> t = pa.decimal128(5, 2)\n        >>> t.scale\n        2\n        \n        The decimal scale (an integer).\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> t = pa.decimal256(76, 38)\n        >>> t.scale\n        38\n        The dictionary index type should be integer.\n    ""    The dictionary value type.\n\n        The dictionary values are found in an instance of DictionaryArray.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> pa.dictionary(pa.int16(), pa.utf8()).value_type\n        DataType(string)\n        \n        The dimension (n) of this tensor.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> import numpy as np\n        >>> x = np.array([[2, 2, 4], [4, 5, 100]], np.int32)\n        >>> tensor = pa.Tensor.from_numpy(x, dim_names=[\"dim1\",\"dim2\"])\n        >>> tensor.ndim\n        2\n        The dtype of the 'categories' of the passed categorical values (\n        The duration unit ('s', 'ms', 'us' or 'ns').\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> t = pa.duration('s')\n        >>> t.unit\n        's'\n        The 'field_by_name' method is deprecated, use 'field' instead\n        The field for items in the map entries.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> pa.map_(pa.string(), pa.int32()).item_field\n        pyarrow.Field<value: int32>\n        \n        The field for keys in the map entries.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> pa.map_(pa.string(), pa.int32()).key_field\n        pyarrow.Field<key: string not null>\n        \n        The field for large list view values.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> pa.large_list_view(pa.string()).value_field\n        pyarrow.Field<item: string>\n        \n        The field for list values.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> pa.list_(pa.string()).value_field\n        pyarrow.Field<item: string>\n        \n        The field for list values.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> pa.list_(pa.int32(), 2).value_field\n        pyarrow.Field<i""tem: int32>\n        \n        The field for list view values.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> pa.list_view(pa.string()).value_field\n        pyarrow.Field<item: string>\n        \n        The field metadata (if any is set).\n\n        Returns\n        -------\n        metadata : dict or None\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> field = pa.field('key', pa.int32(),\n        ...                  metadata={\"key\": \"Something important\"})\n        >>> field.metadata\n        {b'key': b'Something important'}\n        \n        The field name.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> field = pa.field('key', pa.int32())\n        >>> field.name\n        'key'\n        \n        The field nullability.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> f1 = pa.field('key', pa.int32())\n        >>> f2 = pa.field('key', pa.int32(), nullable=False)\n        >>> f1.nullable\n        True\n        >>> f2.nullable\n        False\n        The length of dim_names (\n        The mode of the union (\"dense\" or \"sparse\").\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> union = pa.sparse_union([pa.field('a', pa.binary(10)), pa.field('b', pa.string())])\n        >>> union.mode\n        'sparse'\n        The 'names' and 'metadata' arguments are not valid when passing a pandas DataFrameThe 'names' and 'metadata' arguments are not valid when using Arrow PyCapsule InterfaceThe 'names' argument is not valid when passing a dictionary\n        The number of child fields.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> pa.int64()\n        DataType(int64)\n        >>> pa.int64().num_fields\n        0\n        >>> pa.list_(pa.string())\n        ListType(list<item: string>)\n        >>> pa.list_(pa.string()).num_fields\n        1\n        >>> st""ruct = pa.struct({'x': pa.int32(), 'y': pa.string()})\n        >>> struct.num_fields\n        2\n        The object's __arrow_array__ method does not return a pyarrow Array or ChunkedArray.The 'ordered' flag of the passed categorical values does not match the 'ordered' of the specified type. The passed mapping doesn't contain the following field(s) of the schema: {}The run_end_type should be 'int16', 'int32', or 'int64'\n        The schema's field names.\n\n        Returns\n        -------\n        list of str\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> schema = pa.schema([\n        ...     pa.field('n_legs', pa.int64()),\n        ...     pa.field('animals', pa.string())])\n\n        Get the names of the schema's fields:\n\n        >>> schema.names\n        ['n_legs', 'animals']\n        \n        The schema's field types.\n\n        Returns\n        -------\n        list of DataType\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> schema = pa.schema([\n        ...     pa.field('n_legs', pa.int64()),\n        ...     pa.field('animals', pa.string())])\n\n        Get the types of the schema's fields:\n\n        >>> schema.types\n        [DataType(int64), DataType(string)]\n        \n        The schema's metadata (if any is set).\n\n        Returns\n        -------\n        metadata: dict or None\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> schema = pa.schema([\n        ...     pa.field('n_legs', pa.int64()),\n        ...     pa.field('animals', pa.string())],\n        ...     metadata={\"n_legs\": \"Number of legs per animal\"})\n\n        Get the metadata of the schema's fields:\n\n        >>> schema.metadata\n        {b'n_legs': b'Number of legs per animal'}\n        \n        The shape of this tensor.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> import numpy as np\n        >>> x = np.array([[2, 2, 4], [4, 5, 1""00]], np.int32)\n        >>> tensor = pa.Tensor.from_numpy(x, dim_names=[\"dim1\",\"dim2\"])\n        >>> tensor.shape\n        (2, 3)\n        \n        The size of the fixed size lists.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> pa.list_(pa.int32(), 2).list_size\n        2\n        \n        The size of this tensor.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> import numpy as np\n        >>> x = np.array([[2, 2, 4], [4, 5, 100]], np.int32)\n        >>> tensor = pa.Tensor.from_numpy(x, dim_names=[\"dim1\",\"dim2\"])\n        >>> tensor.size\n        6\n        \n        The sum of bytes in each buffer referenced by the chunked array.\n\n        An array may only reference a portion of a buffer.\n        This method will overestimate in this case and return the\n        byte size of the entire buffer.\n\n        If a buffer is referenced multiple times then it will\n        only be counted once.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> n_legs = pa.chunked_array([[2, 2, 4], [4, None, 100]])\n        >>> n_legs.get_total_buffer_size()\n        49\n        \n        The sum of bytes in each buffer referenced by the record batch\n\n        An array may only reference a portion of a buffer.\n        This method will overestimate in this case and return the\n        byte size of the entire buffer.\n\n        If a buffer is referenced multiple times then it will\n        only be counted once.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> n_legs = pa.array([2, 2, 4, 4, 5, 100])\n        >>> animals = pa.array([\"Flamingo\", \"Parrot\", \"Dog\", \"Horse\", \"Brittle stars\", \"Centipede\"])\n        >>> batch = pa.RecordBatch.from_arrays([n_legs, animals],\n        ...                                     names=[\"n_legs\", \"animals\"])\n        >>> batch.get_total_buffer_size()\n        120\n        \n        Th""e sum of bytes in each buffer referenced by the table.\n\n        An array may only reference a portion of a buffer.\n        This method will overestimate in this case and return the\n        byte size of the entire buffer.\n\n        If a buffer is referenced multiple times then it will\n        only be counted once.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> import pandas as pd\n        >>> df = pd.DataFrame({'n_legs': [None, 4, 5, None],\n        ...                    'animals': [\"Flamingo\", \"Horse\", None, \"Centipede\"]})\n        >>> table = pa.Table.from_pandas(df)\n        >>> table.get_total_buffer_size()\n        76\n        \n        The time unit ('s' or 'ms').\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> t = pa.time32('ms')\n        >>> t.unit\n        'ms'\n        \n        The time unit ('us' or 'ns').\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> t = pa.time64('us')\n        >>> t.unit\n        'us'\n        \n        The timestamp time zone, if any, or None.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> t = pa.timestamp('s', tz='UTC')\n        >>> t.tz\n        'UTC'\n        \n        The timestamp unit ('s', 'ms', 'us' or 'ns').\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> t = pa.timestamp('us')\n        >>> t.unit\n        'us'\n        \n        The type code to indicate each data type in this union.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> union = pa.sparse_union([pa.field('a', pa.binary(10)), pa.field('b', pa.string())])\n        >>> union.type_codes\n        [0, 1]\n        This object's internal pointer is NULL, do not use any methods or attributes on this objectTime32Type.unit.__get__ (line 1323)Time64Type.unit.__get__ (line 1358)TimestampType.tz.__get__ (line 1282)TimestampType.unit.__get__ (li""ne 1268)\n        Total number of bytes consumed by the elements of the chunked array.\n\n        In other words, the sum of bytes from all buffer ranges referenced.\n\n        Unlike `get_total_buffer_size` this method will account for array\n        offsets.\n\n        If buffers are shared between arrays then the shared\n        portion will only be counted multiple times.\n\n        The dictionary of dictionary arrays will always be counted in their\n        entirety even if the array only references a portion of the dictionary.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> n_legs = pa.chunked_array([[2, 2, 4], [4, None, 100]])\n        >>> n_legs.nbytes\n        49\n        \n        Total number of bytes consumed by the elements of the record batch.\n\n        In other words, the sum of bytes from all buffer ranges referenced.\n\n        Unlike `get_total_buffer_size` this method will account for array\n        offsets.\n\n        If buffers are shared between arrays then the shared\n        portion will only be counted multiple times.\n\n        The dictionary of dictionary arrays will always be counted in their\n        entirety even if the array only references a portion of the dictionary.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> n_legs = pa.array([2, 2, 4, 4, 5, 100])\n        >>> animals = pa.array([\"Flamingo\", \"Parrot\", \"Dog\", \"Horse\", \"Brittle stars\", \"Centipede\"])\n        >>> batch = pa.RecordBatch.from_arrays([n_legs, animals],\n        ...                                     names=[\"n_legs\", \"animals\"])\n        >>> batch.nbytes\n        116\n        \n        Total number of bytes consumed by the elements of the table.\n\n        In other words, the sum of bytes from all buffer ranges referenced.\n\n        Unlike `get_total_buffer_size` this method will account for array\n        offsets.\n\n        If buffers are shared between arrays then the share""d\n        portion will only be counted multiple times.\n\n        The dictionary of dictionary arrays will always be counted in their\n        entirety even if the array only references a portion of the dictionary.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> import pandas as pd\n        >>> df = pd.DataFrame({'n_legs': [None, 4, 5, None],\n        ...                    'animals': [\"Flamingo\", \"Horse\", None, \"Centipede\"]})\n        >>> table = pa.Table.from_pandas(df)\n        >>> table.nbytes\n        72\n        Trying to import data on a CUDA device, but PyArrow is not built with CUDA support.\n(importing 'pyarrow.cuda' resulted in \"Type's expected number of buffers is at least Type's expected number of buffers (Type's expected number of children (Unable to avoid a copy while creating a numpy array as requested.\nIf using `np.array(obj, copy=False)` replace it with `np.asarray(obj)` to allow a copy when neededUnable to avoid a copy while creating a numpy array as requested (converting a pyarrow.ChunkedArray always results in a copy).\nIf using `np.array(obj, copy=False)` replace it with `np.asarray(obj)` to allow a copy when neededUnable to avoid a copy while creating a numpy array as requested (converting a pyarrow.Unable to read message from object with type: Unable to wrap Datum in a Python objectUnable to write to object of type: \n        Unify dictionaries across all chunks.\n\n        This method returns an equivalent chunked array, but where all\n        chunks share the same dictionary values.  Dictionary indices are\n        transposed accordingly.\n\n        If there are no dictionaries in the chunked array, it is returned\n        unchanged.\n\n        Parameters\n        ----------\n        memory_pool : MemoryPool, default None\n            For memory allocations, if required, otherwise use default pool\n\n        Returns\n        -------\n        result : ChunkedArray\n\n        Examples\n        ---""-----\n        >>> import pyarrow as pa\n        >>> arr_1 = pa.array([\"Flamingo\", \"Parrot\", \"Dog\"]).dictionary_encode()\n        >>> arr_2 = pa.array([\"Horse\", \"Brittle stars\", \"Centipede\"]).dictionary_encode()\n        >>> c_arr = pa.chunked_array([arr_1, arr_2])\n        >>> c_arr\n        <pyarrow.lib.ChunkedArray object at ...>\n        [\n        ...\n          -- dictionary:\n            [\n              \"Flamingo\",\n              \"Parrot\",\n              \"Dog\"\n            ]\n          -- indices:\n            [\n              0,\n              1,\n              2\n            ],\n        ...\n          -- dictionary:\n            [\n              \"Horse\",\n              \"Brittle stars\",\n              \"Centipede\"\n            ]\n          -- indices:\n            [\n              0,\n              1,\n              2\n            ]\n        ]\n        >>> c_arr.unify_dictionaries()\n        <pyarrow.lib.ChunkedArray object at ...>\n        [\n        ...\n          -- dictionary:\n            [\n              \"Flamingo\",\n              \"Parrot\",\n              \"Dog\",\n              \"Horse\",\n              \"Brittle stars\",\n              \"Centipede\"\n            ]\n          -- indices:\n            [\n              0,\n              1,\n              2\n            ],\n        ...\n          -- dictionary:\n            [\n              \"Flamingo\",\n              \"Parrot\",\n              \"Dog\",\n              \"Horse\",\n              \"Brittle stars\",\n              \"Centipede\"\n            ]\n          -- indices:\n            [\n              3,\n              4,\n              5\n            ]\n        ]\n        \n        Unify dictionaries across all chunks.\n\n        This method returns an equivalent table, but where all chunks of\n        each column share the same dictionary values.  Dictionary indices\n        are transposed accordingly.\n\n        Columns without dictionaries are returned unchanged.""\n\n        Parameters\n        ----------\n        memory_pool : MemoryPool, default None\n            For memory allocations, if required, otherwise use default pool\n\n        Returns\n        -------\n        Table\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> arr_1 = pa.array([\"Flamingo\", \"Parrot\", \"Dog\"]).dictionary_encode()\n        >>> arr_2 = pa.array([\"Horse\", \"Brittle stars\", \"Centipede\"]).dictionary_encode()\n        >>> c_arr = pa.chunked_array([arr_1, arr_2])\n        >>> table = pa.table([c_arr], names=[\"animals\"])\n        >>> table\n        pyarrow.Table\n        animals: dictionary<values=string, indices=int32, ordered=0>\n        ----\n        animals: [  -- dictionary:\n        [\"Flamingo\",\"Parrot\",\"Dog\"]  -- indices:\n        [0,1,2],  -- dictionary:\n        [\"Horse\",\"Brittle stars\",\"Centipede\"]  -- indices:\n        [0,1,2]]\n\n        Unify dictionaries across both chunks:\n\n        >>> table.unify_dictionaries()\n        pyarrow.Table\n        animals: dictionary<values=string, indices=int32, ordered=0>\n        ----\n        animals: [  -- dictionary:\n        [\"Flamingo\",\"Parrot\",\"Dog\",\"Horse\",\"Brittle stars\",\"Centipede\"]  -- indices:\n        [0,1,2],  -- dictionary:\n        [\"Flamingo\",\"Parrot\",\"Dog\",\"Horse\",\"Brittle stars\",\"Centipede\"]  -- indices:\n        [3,4,5]]\n        UnionArray does not have child UnionType.field (line 1169)UnionType.mode.__get__ (line 1121)UnionType.type_codes.__get__ (line 1141)\n        Unnest this [Large]ListArray/[Large]ListViewArray/FixedSizeListArray\n        according to 'recursive'.\n\n        Note that this method is different from ``self.values`` in that\n        it takes care of the slicing offset as well as null elements backed\n        by non-empty sub-lists.\n\n        Parameters\n        ----------\n        recursive : bool, default False, optional\n            When True, flatten this logical list-array rec""ursively until an\n            array of non-list values is formed.\n\n            When False, flatten only the top level.\n\n        Returns\n        -------\n        result : Array\n\n        Examples\n        --------\n\n        Basic logical list-array's flatten\n        >>> import pyarrow as pa\n        >>> values = [1, 2, 3, 4]\n        >>> offsets = [2, 1, 0]\n        >>> sizes = [2, 2, 2]\n        >>> array = pa.ListViewArray.from_arrays(offsets, sizes, values)\n        >>> array\n        <pyarrow.lib.ListViewArray object at ...>\n        [\n          [\n            3,\n            4\n          ],\n          [\n            2,\n            3\n          ],\n          [\n            1,\n            2\n          ]\n        ]\n        >>> array.flatten()\n        <pyarrow.lib.Int64Array object at ...>\n        [\n          3,\n          4,\n          2,\n          3,\n          1,\n          2\n        ]\n\n        When recursive=True, nested list arrays are flattened recursively\n        until an array of non-list values is formed.\n\n        >>> array = pa.array([\n        ...    None,\n        ...    [\n        ...        [1, None, 2],\n        ...        None,\n        ...        [3, 4]\n        ...    ],\n        ...    [],\n        ...    [\n        ...        [],\n        ...        [5, 6],\n        ...        None\n        ...    ],\n        ...    [\n        ...        [7, 8]\n        ...    ]\n        ... ], type=pa.list_(pa.list_(pa.int64())))\n        >>> array.flatten(True)\n        <pyarrow.lib.Int64Array object at ...>\n        [\n          1,\n          null,\n          2,\n          3,\n          4,\n          5,\n          6,\n          7,\n          8\n        ]\n        \n    Unregister a Python extension type.\n\n    Parameters\n    ----------\n    type_name : str\n        The name of the ExtensionType subclass to unregister.\n\n    Examples\n    --------\n    Define a RationalType extension type subclassing ExtensionType:\n\n    >>> import py""arrow as pa\n    >>> class RationalType(pa.ExtensionType):\n    ...     def __init__(self, data_type: pa.DataType):\n    ...         if not pa.types.is_integer(data_type):\n    ...             raise TypeError(f\"data_type must be an integer type not {data_type}\")\n    ...         super().__init__(\n    ...             pa.struct(\n    ...                 [\n    ...                     (\"numer\", data_type),\n    ...                     (\"denom\", data_type),\n    ...                 ],\n    ...             ),\n    ...             # N.B. This name does _not_ reference `data_type` so deserialization\n    ...             # will work for _any_ integer `data_type` after registration\n    ...             \"my_package.rational\",\n    ...         )\n    ...     def __arrow_ext_serialize__(self) -> bytes:\n    ...         # No parameters are necessary\n    ...         return b\"\"\n    ...     @classmethod\n    ...     def __arrow_ext_deserialize__(cls, storage_type, serialized):\n    ...         # return an instance of this subclass\n    ...         return RationalType(storage_type[0].type)\n\n    Register the extension type:\n\n    >>> pa.register_extension_type(RationalType(pa.int64()))\n\n    Unregister the extension type:\n\n    >>> pa.unregister_extension_type(\"my_package.rational\")\n    \n        Whether the dictionary is ordered, i.e. whether the ordering of values\n        in the dictionary is important.\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> pa.dictionary(pa.int64(), pa.utf8()).ordered\n        False\n        Wrapping scalar of type Writable buffer requested but Arrow buffer was not mutable\n        Write RecordBatch to Buffer as encapsulated IPC message, which does not\n        include a Schema.\n\n        To reconstruct a RecordBatch from the encapsulated IPC message Buffer\n        returned by this function, a Schema must be passed separately. See\n        Examples.\n\n        Parameters\n        ----------\n   ""     memory_pool : MemoryPool, default None\n            Uses default memory pool if not specified\n\n        Returns\n        -------\n        serialized : Buffer\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> n_legs = pa.array([2, 2, 4, 4, 5, 100])\n        >>> animals = pa.array([\"Flamingo\", \"Parrot\", \"Dog\", \"Horse\", \"Brittle stars\", \"Centipede\"])\n        >>> batch = pa.RecordBatch.from_arrays([n_legs, animals],\n        ...                                     names=[\"n_legs\", \"animals\"])\n        >>> buf = batch.serialize()\n        >>> buf\n        <pyarrow.Buffer address=0x... size=... is_cpu=True is_mutable=True>\n\n        Reconstruct RecordBatch from IPC message Buffer and original Schema\n\n        >>> pa.ipc.read_record_batch(buf, batch.schema)\n        pyarrow.RecordBatch\n        n_legs: int64\n        animals: string\n        ----\n        n_legs: [2,2,4,4,5,100]\n        animals: [\"Flamingo\",\"Parrot\",\"Dog\",\"Horse\",\"Brittle stars\",\"Centipede\"]\n        \n        Write Schema to Buffer as encapsulated IPC message\n\n        Parameters\n        ----------\n        memory_pool : MemoryPool, default None\n            Uses default memory pool if not specified\n\n        Returns\n        -------\n        serialized : Buffer\n\n        Examples\n        --------\n        >>> import pyarrow as pa\n        >>> schema = pa.schema([\n        ...     pa.field('n_legs', pa.int64()),\n        ...     pa.field('animals', pa.string())])\n\n        Write schema to Buffer:\n\n        >>> schema.serialize()\n        <pyarrow.Buffer address=0x... size=... is_cpu=True is_mutable=True>\n        %Y-%m-%dT%H:%M:%S%z: ').'.).\n----..., \").\"  ?<>)'(add_note address= always results in a copy).\nIf using `np.array(obj, copy=False)` replace it with `np.asarray(obj)` to allow a copy when needed and array (line 129)arrow.ArrayStatistics<null_count= backend_name=binary file expected, got text filebinary (line 4784)b""inary_view (line 4921)\nbody length: bool8 (line 5660)bool_ (line 3880), but expected , but the passed number is  bytes bytes_allocated=.bz2cannot specify 'type' when creating a Field from an ArrowSchemachild is deprecated, use fieldchunked_array (line 1475) closed=compression=\" compression_level=concat_arrays (line 4970)concat_batches (line 6327)concat_tables (line 6247)could not infer open mode for file-like object create_memory_map (line 1152)date32[day]date32 (line 4408)date64 (line 4429)date64[ms]datetime64[ms]datetime64[ns]datetime64[s]datetime64[us]decimal128 (line 4648)decimal32 (line 4538)decimal64 (line 4593)default_memory_pool (line 146)dictionary (line 5225)) did not match the passed number (dim_names must be a tuple or listdisable, distinct_count= does not exist in schema\" does not exist in schema) does not match length of arrays () does not match the specified type () does not matchthe number of tensor dimensions (duration (line 4337)duration[ms]duration[ns]duration[s]duration[us] emit_dictionary_deltas=enable ensure_alignment=\" exists : expected field (line 3761)field or tuple expected, got Nonefixed_shape_tensor (line 5559)float16 (line 4450)float32 (line 4484)float64 (line 4511) for extension type .from_*` functions instead.from_numpy_dtype (line 5948)gc, got got null buffer.gz included_fields= incompatible with bool8 storageindex out of boundsinput_stream (line 2738) insteadint16 (line 3984)int32 (line 4038)int64 (line 4092)int8 (line 3930) is a directory is_cpu= is installed is installed. Therefore, pandas-specific integration is not used., is_max_exact=, is_min_exact= is_mutable= is not safely convertible to microseconds to convert to datetime.datetime. Install pandas to return as Timestamp with nanosecond support or access the .value attribute. is not safely convertible to microseconds to convert to datetime.timedelta. Install pandas to return as Timedelta with nanosecond support or access the .value attribute. is_readable= is_seekable= is_wr""itable=isenabledjson_ (line 5506)large_binary (line 4836)large_list (line 5017)large_list_view (line 5112)large_string (line 4864)large_utf8 (line 4894)left outerlist_ (line 4951)list_size should be a positive integerlist_view (line 5074).lz4map_ (line 5150)mask not implemented with Arrow array inputs yet, max='max_chunksize' should be strictly positive max_memory=memory_map (line 1111)\nmetadata length:  metadata_version=, min=month_day_nano_interval (line 4387) name=names must be a list or dict not no default __reduce__ due to non-trivial __cinit__ not found not supported for buffer protocol np.arrays for SparseCSFTensor.indptr np.arrays for SparseCSFTensor.indicesnull (line 3858)nulls (line 408)only slices with step 1 supportedonly valid on readable filesonly valid on seekable filesonly valid on writable filesopaque (line 5703) out of rangeoutput_stream (line 2824) own_file=pa.input_stream() called with instance of 'pa.output_stream() called with instance of ', please pass it explicitlyprecision should be between 1 and 9precision should be between 1 and 18precision should be between 1 and 38precision should be between 1 and 76promote has been superseded by promote_options='default'.pyarrow.<pyarrow.<pyarrow.Device: pyarrow.Field<<pyarrow.MemoryManager device: pyarrow.Message\ntype: pyarrow.Message(uninitialized)<pyarrow.SparseCOOTensor>\ntype: {self.type}\nshape: {self.shape}<pyarrow.SparseCSCMatrix>\ntype: <pyarrow.SparseCSFTensor>\ntype: <pyarrow.SparseCSRMatrix>\ntype: <pyarrow.Tensor>\ntype: pyarrow/array.pxipyarrow/benchmark.pxipyarrow/builder.pxipyarrow/compat.pxipyarrow/config.pxipyarrow/device.pxipyarrow/error.pxipyarrow/io.pxi<pyarrow.ipc.IpcReadOptions ensure_native_endian=<pyarrow.ipc.IpcWriteOptions allow_64bit=pyarrow/ipc.pxipyarrow.libpyarrow/lib.pyxpyarrow/memory.pxipyarrow/pandas-shim.pxipyarrow requires pandas 1.0.0 or above, pandas pyarrow/scalar.pxipyarrow/table.pxipyarrow/tensor.pxipyarrow/types.pxipyarrow.unknownr+r+brb+readable file expected""record_batch (line 5908)register_extension_type (line 2169)repeat (line 458)'s constructor directly's constructor directly, use one of the `pyarrow.Array.from_*` functions instead.'s constructor directly, use one of the `'s constructor directly, use one of the RecordBatchReader.from_* functions instead.'s constructor directly, use pa.scalar() instead.'s constructor directly, use public functions like pyarrow.int64, pyarrow.list_, etc. instead.'s constructor directly, use pyarrow.*_memory_pool instead.'s constructor directly, use pyarrow.logging_memory_pool instead.'s constructor directly, use pyarrow.proxy_memory_pool instead.'s constructor directly, use `pyarrow.ipc.read_message` function instead.'s constructor directly, use `pyarrow.ipc.MessageReader.open_stream` function instead.scalar (line 1601)schema (line 5855)self.c_options cannot be converted to a Python object for picklingself.device cannot be converted to a Python object for picklingself.logging_pool,self.pool cannot be converted to a Python object for picklingself.memory_manager cannot be converted to a Python object for picklingself.pool cannot be converted to a Python object for picklingself.pool,self.proxy_pool cannot be converted to a Python object for picklingself.reader cannot be converted to a Python object for picklingself.sp_sparse_tensor,self.stp cannot be converted to a Python object for picklingself.sp_statistics cannot be converted to a Python object for picklingself.sp_tensor,self.tp cannot be converted to a Python object for picklingself.stop_token cannot be converted to a Python object for picklingself.wrapped cannot be converted to a Python object for picklingself.writer cannot be converted to a Python object for pickling\nshape:  size=\nstrides: string (line 4734)string_view (line 4936)struct (line 5284)table (line 6085)time32 (line 4251)time32[ms]time32[s]time64 (line 4294)time64[ns]time64[us]timedelta64[ms]timedelta64[ns]timedelta64[s]timedelta64[us] times in schematimestamp (line 419""2)timestamp[ms]timestamp[ns]timestamp[s]timestamp[us]' to pointer address to requested schema  to requested type (tree fragment)type type_codes should have the same length as fieldsuint16 (line 3957)uint32 (line 4011)uint64 (line 4065)uint8 (line 3903) unify_dictionaries=unregister_extension_type (line 2233) use_legacy_format= use_threads=use_threads=utf8 (line 4759)utf-8 vs ' which was already encountered. with null values to non-nullablewritable file expectedzero_copy_only must be False for pyarrow.ChunkedArray.to_numpy.zstAlignmentAnyArrayArrayStatisticsArrayStatistics.__reduce_cython__ArrayStatistics.__setstate_cython__Array.__array__Array.__arrow_c_array__Array.__arrow_c_device_array__Array.__dlpack__Array.__dlpack_device__Array.__iter__Array.__reduce__Array.__sizeof__Array._debug_printArray._export_to_cArray._export_to_c_deviceArray._import_from_cArray._import_from_c_capsuleArray._import_from_c_deviceArray._import_from_c_device_capsuleArray._to_pandasArray.buffersArray.castArray.copy_toArray.dictionary_encodeArray.diffArray.drop_nullArray.equalsArray.fill_nullArray.filterArray.from_buffersArray.from_pandasArray.get_total_buffer_sizeArray.indexArray.is_nanArray.is_nullArray.is_validArray.sliceArray.sortArray.sumArray.takeArray.to_numpyArray.to_pylistArray.to_stringArray.tolistArray.uniqueArray.validateArray.value_countsArray.viewArrowCancelledArrowCancelled.__init__ArrowCapacityErrorArrowExceptionArrowIOErrorArrowIndexErrorArrowInvalidArrowKeyErrorArrowKeyError.__str__ArrowMemoryErrorArrowNotImplementedErrorArrowSerializationErrorArrowTypeErrorAt64ByteBROTLIBZ2BaseExtensionTypeBaseExtensionType.__arrow_ext_class__BaseExtensionType.__arrow_ext_scalar_class__BaseExtensionType.wrap_arrayBaseListArrayBaseListArray.flattenBaseListArray.value_lengthsBaseListArray.value_parent_indicesBinaryArrayBinaryScalarBinaryScalar.__bytes__BinaryScalar.as_bufferBinaryScalar.as_pyBinaryViewArrayBinaryViewScalarBool8ArrayBool8Array.from_numpyBool8Array.from_storageBool8Array.to_num""pyBool8ScalarBool8Scalar.as_pyBool8TypeBool8Type.__arrow_ext_class__Bool8Type.__arrow_ext_scalar_class__Bool8Type.__reduce__BooleanArrayBooleanScalarBooleanScalar.as_pyBufferBufferOutputStreamBufferOutputStream.__reduce_cython__BufferOutputStream.__setstate_cython__BufferOutputStream.getvalueBufferReaderBufferReader.__reduce_cython__BufferReader.__setstate_cython__Buffer.__reduce_ex__Buffer._assert_cpuBuffer.equalsBuffer.hexBuffer.sliceBuffer.to_pybytesBufferedIOBaseBufferedInputStreamBufferedInputStream.__reduce_cython__BufferedInputStream.__setstate_cython__BufferedInputStream.detachBufferedOutputStreamBufferedOutputStream.__reduce_cython__BufferedOutputStream.__setstate_cython__BufferedOutputStream.detachBuildInfoCCOOCPU_CRecordBatchWriter_CRecordBatchWriter.__enter___CRecordBatchWriter.__exit___CRecordBatchWriter.__reduce_cython___CRecordBatchWriter.__setstate_cython___CRecordBatchWriter.close_CRecordBatchWriter.write_CRecordBatchWriter.write_batch_CRecordBatchWriter.write_tableCUDACUDA_HOSTCUDA_MANAGEDCacheOptionsCacheOptions.__reduce__CacheOptions._reconstructCacheOptions.from_network_metricsCategoricalChunkedArrayChunkedArray.__array__ChunkedArray.__arrow_c_stream__ChunkedArray.__iter__ChunkedArray.__reduce__ChunkedArray.__sizeof__ChunkedArray._assert_cpuChunkedArray._import_from_c_capsuleChunkedArray._to_pandasChunkedArray.castChunkedArray.chunkChunkedArray.combine_chunksChunkedArray.dictionary_encodeChunkedArray.drop_nullChunkedArray.equalsChunkedArray.fill_nullChunkedArray.filterChunkedArray.flattenChunkedArray.formatChunkedArray.get_total_buffer_sizeChunkedArray.indexChunkedArray.is_nanChunkedArray.is_nullChunkedArray.is_validChunkedArray.iterchunksChunkedArray.lengthChunkedArray.sliceChunkedArray.sortChunkedArray.takeChunkedArray.to_numpyChunkedArray.to_pylistChunkedArray.to_stringChunkedArray.unify_dictionariesChunkedArray.uniqueChunkedArray.validateChunkedArray.value_countsCodecCodec.__reduce_cython__Codec.__setstate_cython__Codec.compressCodec.decompr""essCodec.default_compression_levelCodec.detectCodec.is_availableCodec.maximum_compression_levelCodec.minimum_compression_levelCodec.supports_compression_levelCompressedInputStreamCompressedInputStream.__reduce_cython__CompressedInputStream.__setstate_cython__CompressedOutputStreamCompressedOutputStream.__reduce_cython__CompressedOutputStream.__setstate_cython__CppBuildInfoDEFAULT_BUFFER_SIZEDataFrameDataTypeDataTypeSpecificDataType.__arrow_c_schema__DataType.__reduce__DataType._export_to_cDataType._import_from_cDataType._import_from_c_capsuleDataType.equalsDataType.fieldDataType.to_pandas_dtypeDate32ArrayDate32ScalarDate32Scalar.as_pyDate64ArrayDate64ScalarDate64Scalar.as_pyDatetimeTZDtypeDecima32ArrayDecimalDecimal128ArrayDecimal128ScalarDecimal128Scalar.as_pyDecimal128TypeDecimal128Type.__reduce__Decimal256ArrayDecimal256ScalarDecimal256Scalar.as_pyDecimal256TypeDecimal256Type.__reduce__Decimal32ArrayDecimal32ScalarDecimal32Scalar.as_pyDecimal32TypeDecimal32Type.__reduce__Decimal64ArrayDecimal64ScalarDecimal64Scalar.as_pyDecimal64TypeDecimal64Type.__reduce__DenseUnionTypeDeviceDeviceAllocationTypeDevice.__reduce_cython__Device.__setstate_cython__DictionaryArrayDictionaryArray.dictionary_decodeDictionaryArray.dictionary_encodeDictionaryArray.from_arraysDictionaryArray.from_buffersDictionaryEncodeOptionsDictionaryMemoDictionaryMemo.__reduce_cython__DictionaryMemo.__setstate_cython__DictionaryScalarDictionaryScalar.__reduce__DictionaryScalar._reconstructDictionaryScalar.as_pyDictionaryTypeDictionaryType.__reduce__DoubleArrayDoubleScalarDoubleScalar.as_pyDurationArrayDurationScalarDurationScalar.as_pyDurationTypeEXT_DEVEmptyExpressionExtensionArrayExtensionArray.from_storageExtensionDtype_ExtensionRegistryNanny_ExtensionRegistryNanny.__reduce_cython___ExtensionRegistryNanny.__setstate_cython___ExtensionRegistryNanny.release_registryExtensionScalarExtensionScalar.as_pyExtensionScalar.from_storageExtensionTypeExtensionType.__arrow_ext_class__ExtensionType.__arrow_ext_de""serialize__ExtensionType.__arrow_ext_scalar_class__ExtensionType.__arrow_ext_serialize__ExtensionType.__reduce__FalseFieldField.__arrow_c_schema__Field.__reduce__Field._export_to_cField._import_from_cField._import_from_c_capsuleField.equalsField.flattenField.remove_metadataField.with_metadataField.with_nameField.with_nullableField.with_typeFixedShapeTensorArrayFixedShapeTensorArray.from_numpy_ndarrayFixedShapeTensorArray.to_numpy_ndarrayFixedShapeTensorArray.to_tensorFixedShapeTensorScalarFixedShapeTensorScalar.to_numpyFixedShapeTensorScalar.to_tensorFixedShapeTensorTypeFixedShapeTensorType.__arrow_ext_class__FixedShapeTensorType.__arrow_ext_scalar_class__FixedShapeTensorType.__reduce__FixedSizeBinaryArrayFixedSizeBinaryScalarFixedSizeBinaryTypeFixedSizeBinaryType.__reduce__FixedSizeBufferWriterFixedSizeBufferWriter.__reduce_cython__FixedSizeBufferWriter.__setstate_cython__FixedSizeBufferWriter.set_memcopy_threadsFixedSizeBufferWriter.set_memcopy_blocksizeFixedSizeBufferWriter.set_memcopy_thresholdFixedSizeListArrayFixedSizeListArray.from_arraysFixedSizeListScalarFixedSizeListTypeFixedSizeListType.__reduce__FloatArrayFloatScalarFloatScalar.as_pyFloatingPointArrayGZIPHEXAGONHalfFloatArrayHalfFloatScalarHalfFloatScalar.as_pyIOBaseIndexInt16ArrayInt16ScalarInt16Scalar.as_pyInt32ArrayInt32ScalarInt32Scalar.as_pyInt64ArrayInt64ScalarInt64Scalar.as_pyInt8ArrayInt8ScalarInt8Scalar.as_pyIntEnumIntFlagIntegerArrayIntervalDtypeIpcReadOptionsIpcReadOptions.__reduce_cython__IpcReadOptions.__setstate_cython__IpcWriteOptionsIpcWriteOptions.__reduce_cython__IpcWriteOptions.__setstate_cython__JsonArrayJsonScalarJsonTypeJsonType.__arrow_ext_class__JsonType.__arrow_ext_scalar_class__JsonType.__reduce__KKeyValueMetadataKeyValueMetadata.__reduce__KeyValueMetadata.equalsKeyValueMetadata.get_allKeyValueMetadata.itemsKeyValueMetadata.keyKeyValueMetadata.keysKeyValueMetadata.to_dictKeyValueMetadata.valueKeyValueMetadata.valuesLZ4LZ4_FRAMELZ4_RAWLargeBinaryArrayLargeBinaryScalarLargeListArr""ayLargeListArray.from_arraysLargeListScalarLargeListTypeLargeListType.__reduce__LargeListViewArrayLargeListViewArray.from_arraysLargeListViewScalarLargeListViewTypeLargeListViewType.__reduce__LargeStringArrayLargeStringArray.from_buffersLargeStringScalarListArrayListArray.from_arraysListFlattenOptionsListScalarListScalar.as_pyListTypeListType.__reduce__ListViewArrayListViewArray.from_arraysListViewScalarListViewTypeListViewType.__reduce__LockLoggingMemoryPoolLoggingMemoryPool.__reduce_cython__LoggingMemoryPool.__setstate_cython__MMETALMapArrayMapArray.from_arraysMapScalarMapScalar.__iter__MapScalar.as_pyMapScalar.keysMapTypeMapType.__reduce__MappingMaskedArrayMemoryManagerMemoryManager.__reduce_cython__MemoryManager.__setstate_cython__MemoryMappedFileMemoryMappedFile.__reduce_cython__MemoryMappedFile.__setstate_cython__MemoryMappedFile._openMemoryMappedFile.createMemoryMappedFile.filenoMemoryMappedFile.resizeMemoryPoolMemoryPool.__reduce_cython__MemoryPool.__setstate_cython__MemoryPool.bytes_allocatedMemoryPool.max_memoryMemoryPool.num_allocationsMemoryPool.print_statsMemoryPool.release_unusedMemoryPool.total_bytes_allocatedMessageMessageReaderMessageReader.__reduce_cython__MessageReader.__setstate_cython__MessageReader.open_streamMessageReader.read_next_messageMessage.__reduce_cython__Message.__setstate_cython__Message.equalsMessage.serializeMessage.serialize_to_MetadataMetadataVersionMockOutputStreamMockOutputStream.__reduce_cython__MockOutputStream.__setstate_cython__MockOutputStream.sizeMonthDayNanoMonthDayNanoIntervalArrayMonthDayNanoIntervalArray.to_pylistMonthDayNanoIntervalScalarMonthDayNanoIntervalScalar.as_pyNA_NULLNativeFileNativeFile.__enter__NativeFile.__exit__NativeFile.__reduce_cython__NativeFile.__setstate_cython__NativeFile._assert_openNativeFile._assert_readableNativeFile._assert_seekableNativeFile._assert_writableNativeFile._download_nothreadsNativeFile._upload_nothreadsNativeFile.closeNativeFile.downloadNativeFile.filenoNativeFile.flushNativeFile"".get_streamNativeFile.isattyNativeFile.metadataNativeFile.readNativeFile.read1NativeFile.read_atNativeFile.read_bufferNativeFile.readableNativeFile.readallNativeFile.readintoNativeFile.readlineNativeFile.readlinesNativeFile.seekNativeFile.seekableNativeFile.sizeNativeFile.tellNativeFile.truncateNativeFile.uploadNativeFile.writableNativeFile.writeNativeFile.writelinesNotImplementedNullArrayNullOptionsNullScalarNullScalar.as_pyNumericArrayONEAPIOPENCLOSFileOSFile.__reduce_cython__OSFile.__setstate_cython__OSFile.filenoOpaqueArrayOpaqueScalarOpaqueTypeOpaqueType.__arrow_ext_class__OpaqueType.__arrow_ext_scalar_class__OpaqueType.__reduce__PYARROW_IGNORE_TIMEZONE_PandasAPIShim_PandasAPIShim.__reduce_cython___PandasAPIShim.__setstate_cython___PandasAPIShim.data_frame_PandasAPIShim.get_rangeindex_attribute_PandasAPIShim.get_values_PandasAPIShim.infer_dtype_PandasAPIShim.is_array_like_PandasAPIShim.is_categorical_PandasAPIShim.is_data_frame_PandasAPIShim.is_datetimetz_PandasAPIShim.is_extension_array_dtype_PandasAPIShim.is_ge_v21_PandasAPIShim.is_ge_v23_PandasAPIShim.is_ge_v3_PandasAPIShim.is_ge_v3_strict_PandasAPIShim.is_index_PandasAPIShim.is_series_PandasAPIShim.is_sparse_PandasAPIShim.is_v1_PandasAPIShim.pandas_dtype_PandasAPIShim.series_PandasAPIShim.uses_string_dtype_PandasConvertible_PandasConvertible.__reduce_cython___PandasConvertible.__setstate_cython___PandasConvertible.to_pandasPeriodDtypePickleBufferProxyMemoryPoolProxyMemoryPool.__reduce_cython__ProxyMemoryPool.__setstate_cython___PyArrowDataFramePythonFilePythonFile.__reduce_cython__PythonFile.__setstate_cython__PythonFile.readlinePythonFile.readlinesPythonFile.truncate__Pyx_PyDict_NextRefQueueQueueEmptyROCMROCM_HOST_ReadPandasMixin_ReadPandasMixin.read_pandasReadStats_ReadStatsRecordBatch_RecordBatchFileReader_RecordBatchFileReader.__enter___RecordBatchFileReader.__exit___RecordBatchFileReader.__reduce_cython___RecordBatchFileReader.__setstate_cython___RecordBatchFileReader._open_RecordBatchFileReader.get_ba""tch_RecordBatchFileReader.get_batch_with_custom_metadata_RecordBatchFileReader.read_all_RecordBatchFileWriter_RecordBatchFileWriter.__reduce_cython___RecordBatchFileWriter.__setstate_cython___RecordBatchFileWriter._openRecordBatchReaderRecordBatchReader.__arrow_c_stream__RecordBatchReader.__enter__RecordBatchReader.__exit__RecordBatchReader.__reduce_cython__RecordBatchReader.__setstate_cython__RecordBatchReader._export_to_cRecordBatchReader._import_from_cRecordBatchReader._import_from_c_capsuleRecordBatchReader.castRecordBatchReader.closeRecordBatchReader.from_batchesRecordBatchReader.from_streamRecordBatchReader.iter_batches_with_custom_metadataRecordBatchReader.read_allRecordBatchReader.read_next_batchRecordBatchReader.read_next_batch_with_custom_metadata_RecordBatchStreamReader_RecordBatchStreamReader.__reduce_cython___RecordBatchStreamReader.__setstate_cython___RecordBatchStreamReader._open_RecordBatchStreamWriter_RecordBatchStreamWriter.__reduce_cython___RecordBatchStreamWriter.__setstate_cython___RecordBatchStreamWriter._openRecordBatchWithMetadata_RecordBatchWithMetadataRecordBatch.__arrow_c_array__RecordBatch.__arrow_c_device_array__RecordBatch.__arrow_c_stream__RecordBatch.__reduce__RecordBatch.__sizeof__RecordBatch._columnRecordBatch._export_to_cRecordBatch._export_to_c_deviceRecordBatch._import_from_cRecordBatch._import_from_c_capsuleRecordBatch._import_from_c_deviceRecordBatch._import_from_c_device_capsuleRecordBatch._is_initializedRecordBatch._to_pandasRecordBatch.add_columnRecordBatch.castRecordBatch.copy_toRecordBatch.equalsRecordBatch.from_arraysRecordBatch.from_pandasRecordBatch.from_struct_arrayRecordBatch.get_total_buffer_sizeRecordBatch.remove_columnRecordBatch.rename_columnsRecordBatch.replace_schema_metadataRecordBatch.selectRecordBatch.serializeRecordBatch.set_columnRecordBatch.sliceRecordBatch.to_struct_arrayRecordBatch.to_tensorRecordBatch.validateResizableBufferResizableBuffer.resizeRunEndEncodedArrayRunEndEncodedArray._from_arraysRunEndEnc""odedArray.find_physical_offsetRunEndEncodedArray.find_physical_lengthRunEndEncodedArray.from_arraysRunEndEncodedArray.from_buffersRunEndEncodedScalarRunEndEncodedScalar.as_pyRunEndEncodedTypeRunEndEncodedType.__reduce__RuntimeInfoSIGINTSIGTERMSIG_DFLSIG_IGNSNAPPYScalarScalarAggregateOptionsScalar.__reduce__Scalar.as_pyScalar.castScalar.equalsScalar.validateSchemaSchema.__arrow_c_schema__Schema.__iter__Schema.__reduce__Schema.__sizeof__Schema._export_to_cSchema._fieldSchema._import_from_cSchema._import_from_c_capsuleSchema.add_metadataSchema.appendSchema.empty_tableSchema.equalsSchema.fieldSchema.field_by_nameSchema.from_pandasSchema.get_all_field_indicesSchema.get_field_indexSchema.insertSchema.removeSchema.remove_metadataSchema.serializeSchema.setSchema.to_stringSchema.with_metadataSequenceSeriesSignalStopHandlerSignalStopHandler.__enter__SignalStopHandler.__exit__SignalStopHandler.__reduce_cython__SignalStopHandler.__setstate_cython__SignalStopHandler._init_signalsSortOptionsSparseCOOTensorSparseCOOTensor.__get__.<locals>.genexprSparseCOOTensor.__reduce_cython__SparseCOOTensor.__setstate_cython__SparseCOOTensor.dim_nameSparseCOOTensor.equalsSparseCOOTensor.from_dense_numpySparseCOOTensor.from_numpySparseCOOTensor.from_pydata_sparseSparseCOOTensor.from_scipySparseCOOTensor.from_tensorSparseCOOTensor.to_numpySparseCOOTensor.to_pydata_sparseSparseCOOTensor.to_scipySparseCOOTensor.to_tensorSparseCSCMatrixSparseCSCMatrix.__get__.<locals>.genexprSparseCSCMatrix.__reduce_cython__SparseCSCMatrix.__setstate_cython__SparseCSCMatrix.dim_nameSparseCSCMatrix.equalsSparseCSCMatrix.from_dense_numpySparseCSCMatrix.from_numpySparseCSCMatrix.from_scipySparseCSCMatrix.from_tensorSparseCSCMatrix.to_numpySparseCSCMatrix.to_scipySparseCSCMatrix.to_tensorSparseCSFTensorSparseCSFTensor.__get__.<locals>.genexprSparseCSFTensor.__reduce_cython__SparseCSFTensor.__setstate_cython__SparseCSFTensor.dim_nameSparseCSFTensor.equalsSparseCSFTensor.from_dense_numpySparseCSFTensor.from_numpySparseCSF""Tensor.from_tensorSparseCSFTensor.to_numpySparseCSFTensor.to_tensorSparseCSRMatrixSparseCSRMatrix.__get__.<locals>.genexprSparseCSRMatrix.__reduce_cython__SparseCSRMatrix.__setstate_cython__SparseCSRMatrix.dim_nameSparseCSRMatrix.equalsSparseCSRMatrix.from_dense_numpySparseCSRMatrix.from_numpySparseCSRMatrix.from_scipySparseCSRMatrix.from_tensorSparseCSRMatrix.to_numpySparseCSRMatrix.to_scipySparseCSRMatrix.to_tensorSparseDtypeSparseUnionTypeStopTokenStopToken.__reduce_cython__StopToken.__setstate_cython__StringArrayStringArray.from_buffersStringBuilderStringBuilder.__reduce_cython__StringBuilder.__setstate_cython__StringBuilder.appendStringBuilder.append_valuesStringBuilder.finishStringScalarStringScalar.as_pyStringViewArrayStringViewBuilderStringViewBuilder.__reduce_cython__StringViewBuilder.__setstate_cython__StringViewBuilder.appendStringViewBuilder.append_valuesStringViewBuilder.finishStringViewScalarStructArrayStructArray._flattened_fieldStructArray.fieldStructArray.flattenStructArray.from_arraysStructArray.sortStructScalarStructScalar.__iter__StructScalar._as_py_tupleStructScalar.as_pyStructScalar.itemsStructTypeStructType.__iter__StructType.__reduce__StructType.fieldStructType.get_all_field_indicesStructType.get_field_indexTTableTableGroupByTableGroupBy.__init__TableGroupBy.aggregateTable.__arrow_c_stream__Table.__get__.<locals>.genexprTable.__reduce__Table.__sizeof__Table._columnTable._is_initializedTable._to_pandasTable.add_columnTable.castTable.combine_chunksTable.dropTable.equalsTable.flattenTable.from_arraysTable.from_batchesTable.from_pandasTable.from_struct_arrayTable.get_total_buffer_sizeTable.group_byTable.joinTable.join_asofTable.remove_columnTable.rename_columnsTable.replace_schema_metadataTable.selectTable.set_columnTable.sliceTable.to_batchesTable.to_readerTable.to_struct_arrayTable.unify_dictionariesTable.validate_Tabular_Tabular.__array___Tabular.__dataframe___Tabular.__reduce_cython___Tabular.__setstate_cython___Tabular._column_Tabular._ensur""e_integer_index_Tabular._is_initialized_Tabular.add_column_Tabular.append_column_Tabular.column_Tabular.drop_columns_Tabular.drop_null_Tabular.field_Tabular.filter_Tabular.from_pydict_Tabular.from_pylist_Tabular.itercolumns_Tabular.remove_column_Tabular.sort_by_Tabular.take_Tabular.to_pydict_Tabular.to_pylist_Tabular.to_stringTensorTensor.__dlpack__Tensor.__dlpack_device__Tensor.__reduce_cython__Tensor.__setstate_cython__Tensor._make_shape_or_strides_bufferTensor.dim_nameTensor.equalsTensor.from_numpyTensor.to_numpyTextIOBaseThreadTime32ArrayTime32ScalarTime32Scalar.as_pyTime32TypeTime64ArrayTime64ScalarTime64Scalar.as_pyTime64TypeTimedeltaTimestampTimestampArrayTimestampScalarTimestampScalar.as_pyTimestampTypeTimestampType.__reduce__TranscoderTranscoder.__call__Transcoder.__init__TransformInputStreamTransformInputStream.__reduce_cython__TransformInputStream.__setstate_cython__TrueType_BINARYType_BINARY_VIEWType_BOOLType_DATE32Type_DATE64Type_DECIMAL128Type_DECIMAL256Type_DECIMAL32Type_DECIMAL64Type_DENSE_UNIONType_DICTIONARYType_DOUBLEType_DURATIONType_FIXED_SIZE_BINARYType_FIXED_SIZE_LISTType_FLOATType_HALF_FLOATType_INT16Type_INT32Type_INT64Type_INT8Type_INTERVAL_DAY_TIMEType_INTERVAL_MONTHSType_INTERVAL_MONTH_DAY_NANOType_LARGE_BINARYType_LARGE_LISTType_LARGE_LIST_VIEWType_LARGE_STRINGType_LISTType_LIST_VIEWType_MAPType_NAType_RUN_END_ENCODEDType_SPARSE_UNIONType_STRINGType_STRING_VIEWType_STRUCTType_TIME32Type_TIME64Type_TIMESTAMPType_UINT16Type_UINT32Type_UINT64Type_UINT8UInt16ArrayUInt16ScalarUInt16Scalar.as_pyUInt32ArrayUInt32ScalarUInt32Scalar.as_pyUInt64ArrayUInt64ScalarUInt64Scalar.as_pyUInt8ArrayUInt8ScalarUInt8Scalar.as_pyUUIDUnionArrayUnionArray.childUnionArray.fieldUnionArray.from_denseUnionArray.from_sparseUnionMode_DENSEUnionMode_SPARSEUnionScalarUnionScalar.as_pyUnionTypeUnionType.__iter__UnionType.__reduce__UnionType.fieldUnknownExtensionTypeUnknownExtensionType.__arrow_ext_serialize__UnknownExtensionType.__arrow_ext_deserialize__UnsupportedOperat""ionUuidArrayUuidScalarUuidScalar.as_pyUuidTypeUuidType.__arrow_ext_class__UuidType.__arrow_ext_scalar_class__UuidType.__reduce__V1V2V3V4V5VPIVULKANVersionVersionInfoWEBGPU_WeakrefableWriteStats_WriteStatsZSTD_aabaceroadadd_columnadd_metadataaddressaggraggr_nameaggregateaggregationsaliasalignmentallocate_bufferallow_64bitallow_copyallow_noneallow_none_for_typeanyapiappendappend_columnappend_valuesarange__arg0__arg_dict_memoargsargsortarrarray__array__array_capsulearray_dataarrays__arrow_array____arrow_c_array____arrow_c_device_array____arrow_c_schema____arrow_c_stream____arrow_ext_class____arrow_ext_deserialize____arrow_ext_scalar_class____arrow_ext_serialize__arrow_objarrow_typeas_bufferas_py_as_py_tupleasarrayasbytesascending_assert_cpu_assert_open_assert_readable_assert_seekable_assert_writableastimezoneastypeasyncio.coroutinesatexitaxisaxis_orderbbackendbackend_namebackendsbasebatchbatch_with_metadatabatchesbenchmark_PandasObjectIsNullbg_writebinarybinary_viewbit_widthblocksizebodybody_lengthbool_bool8boolboolean_break_traceback_cycle_from_framebsbufbuf_lenbufferbuffer_sizebufferedbuffersbufobj_build_infobuild_infobuild_typebybyte_widthbytes__bytes__bytes_allocatedbytes_readbz2cc_addrc_arrc_arrayc_arraysc_axis_orderc_batchc_batchesc_bufc_bufferc_buffer_sizec_buffersc_check_metadatac_child_datac_chunked_arrayc_concatenatedc_cpp_infoc_datac_datatypec_device_arrayc_dim_namesc_fieldc_field_namesc_fieldsc_file_offsetc_from_pandasc_indicesc_infoc_json_ext_typec_maskc_max_chunksizec_memory_managerc_metac_metadatac_modec_namesc_nbytesc_nullablec_offsetc_opaque_typec_optionsc_orderedc_pathc_permutationc_poolc_ptrc_rawc_readerc_record_batchc_recordbatchesc_resultc_result_recordbatchc_result_tablec_rz_bufferc_scalarc_schemac_schema_ptrc_schemasc_shapec_shrink_to_fitc_sinkc_sizec_storage_typec_streamc_tablec_tablesc_tensorc_tensor_ext_typec_timezonec_typec_type_codesc_type_namec_type_ptrc_uuid_ext_typec_vendor_name__call__call_functioncapsulecastcastedcasted_arraycasted_batc""hcatcategorical_typecategoriescheck_metadatachildchild_fieldschildrenchunkchunkedchunked_arraychunks__class____class_getitem__cleanupcline_in_tracebackcloseclosedcloudpickleclscoalesce_keyscodeccodecscodercodescoerce_temporal_nanosecondscoerce_to_nscolcollectionscollections.abccolumn_columncolumn_arrayscolumn_namescolumnscombine_chunkscombinedcompatcompiler_flagscompiler_idcompiler_versioncompresscompressioncompression_levelcomputeconcat_arraysconcat_batchesconcat_tablescontainer_windowcontextlibcontextmanagerconverted_arrayscoo_arraycoo_matrixcoordscopycopy_tocountcpoolcpp_build_infocpp_filecpp_versioncpp_version_infocpu_countcreatecreate_memory_mapcsc_arraycsc_matrixcsparse_tensorcsr_arraycsr_matrixctensor__cuda_loadedcurrent_threadcustom_metadatadatadata_frame__dataframe__dataframe_to_arraysdataframe_to_typesdatedate32date64date_as_objectdatetime_datetime_from_intdays_debug_printdecay_msdecimaldecimal128decimal256decimal32decimal64decodedecoder_decoderdecompressdecompressed_sizededuplicate_objectsdefault_default_chunk_sizedefault_compression_leveldefault_cpu_memory_managerdefault_memory_pooldeltadensedense_uniondestdest_codecdest_encodingdestinationdetachdetect_detect_compressiondetected_simd_leveldevicedevice_typedf__dict___dictdictionarydictionary__dictionarydictionary_decodedictionary_encodedictionary_memodiffdim_namedim_namesdistinct_countdlm_tensor__dlpack____dlpack_device____doc__donedoubledownloaddownload.<locals>.bg_writedownload.<locals>.cleanup_download_nothreads_download_nothreads.<locals>.cleanupdropdrop_columnsdrop_nulldtdtypedurationeelement_size_limitemit_dictionary_deltasempty_empty_arrayempty_tableenableenable_signal_handlersencodeencode_file_pathencoded_pathencoder_encoderendendswithensure_alignment_ensure_cuda_loaded_ensure_integer_indexensure_metadataensure_native_endianensure_type__enter__entriesenumenumerateenvironequalserrorsexcexc_infoexc_tbexc_typeexc_valexc_value__exit___export_to_c_export_to_c_deviceext_arrayext_scalarext_typeextension_""columnsextension_nameextension_typeextensionsff2f4f8field_fieldfield_field_by_namefield_indexfield_indicesfield_namesfieldsfile_descriptorfile_offsetfilenofill_nullfill_valuefilterfilter_expression_filter_tablefinalfind_physical_lengthfind_physical_offsetfinishfixed_shape_tensorfixed_size_binary_typeflagsflattenflattened_flattened_fieldfloatfloat16float32float64flushfooter_offsetforeign_bufferformatfrom_arrays_from_arrays__from_arrow__from_batchesfrom_buffersfrom_codesfrom_densefrom_dense_numpyfrom_network_metricsfrom_numpyfrom_numpy_dtypefrom_numpy_ndarrayfrom_numpy_ndarray.<locals>.genexprfrom_pandasfrom_pydata_sparse_from_pydictfrom_pydict_from_pylistfrom_pylistfrom_scipyfrom_sparsefrom_storagefrom_streamfrom_struct_arrayfrom_tensorfrombytesfullfull_so_version__func__funcfunc_nohashfuture_gdb_test_sessiongenexprgetget_allget_all_field_indicesget_batchget_batch_with_custom_metadataget_datetimetz_typeget_field_index_get_pandas_type_get_pandas_type_map_get_pandas_tz_typeget_rangeindex_attributeget_record_batchget_record_batch_sizeget_streamget_tensor_sizeget_total_buffer_sizeget_values_getframegetsignalgetsizeof__getstate__getvaluegit_descriptiongit_id_group_bygroup_bygroup_by_aggrsgziphalffloathandle_handle_arrow_array_protocolhas_canonical_formathas_variadic_buffershash_have_libhdfshave_pandashave_signal_refcyclehexhinthole_size_limitii1i2i4i8idideal_bandwidth_utilization_fracidentidxidx_to_new_nameignore_metadata_import_from_c_import_from_c_capsule_import_from_c_device_import_from_c_device_capsulein_ptrin_streamincluded_fieldsincrementaldecoderincrementalencoderindentindexindex_index_typeindices_indicesindptrinfer_dtypeinfer_stringinfer_type__init____init__.<locals>.genexpr_init_signalsinner_arrayinner_batchinput_streaminsertint16int32int64int8int_indexinteger_object_nullsinvertioio_thread_countis_aliveis_array_likeis_availableis_boolean_valueis_categorical_is_coroutineis_cpuis_data_frameis_datetimetzis_extension_array_dtypeis_float_valueis_ge_v21is_ge_v23is_ge_v""3is_ge_v3_strictis_index_is_initializedis_integer_valueis_max_exactis_min_exactis_mutableis_nanis_nullis_pandas_object_is_path_like_is_primitiveis_seriesis_sparseis_threading_enabledis_v1is_validisattyisdirisnanitemitem_fielditem_typeitems_itemsitems.<locals>.genexpr__iter__iter_batches_with_custom_metadataiterchunksitercolumnsjemalloc_memory_pooljemalloc_set_decay_msjoinjoin_asofjoin_typejson_jsonkkeykey_fieldkey_typekeys_keyskeys_sortedkindkwargslarge_binarylarge_listlarge_list_viewlarge_strlarge_stringlarge_utf8lazyleft_suffixlengthlevellexsortliblinelineslist_list_flattenlist_parent_indiceslist_size_list_sizelist_typelist_value_lengthlist_viewloadslog_memory_allocationslogging_memory_poollogical_length_logical_lengthlogical_offset_logical_offsetlookuplossylowerlz4ma__main__main_threadmajormake_datetimetz_make_shape_or_strides_buffermake_tz_awaremap_mappingmaps_as_pydictsmaskmathmaxmax_chunksizemax_ideal_request_size_mibmax_memorymax_output_sizemaximum_compression_levelmaybe_py_list_member_names___members__memory_mapmemory_poolmessagemeta__metaclass__metadatametadata_lengthmetadata_versionmicrosecondsmillisecondsmimalloc_memory_poolminminimum_compression_levelminormissingmmapmodemodule__module__month_day_nano_interval__mro_entries__msnn_rowsname__name___namenamedtuplenamesnan_as_nullnan_is_nullnbatchesnbytesndarray_ndarray_to_arrow_typendim__new__new_fieldnew_namenew_schemanew_sizenew_typenewcolsnextnfnomasknon_default_kwargsnone_normalize_slicenot_equalnpnsntnthreadsnullnull_bitmapnull_countnull_encodingnull_selection_behaviornull_to_nannullablenullsnum_allocationsnum_arraysnum_buffersnum_chunksnum_columnsnum_dictionary_batchesnum_dictionary_deltasnum_fieldsnum_messagesnum_record_batchesnum_replaced_dictionariesnum_rowsnum_threadsnumpyoobjobjectobject_offsetoffsets_offsetsonopaqueopen_openopen_streamoptoptionsorderorderedordered_dictosotherother_arrother_batchother_tableother_typeoutout_arrayout_bufout_coordsout_dataout_indicesout_indptrout_ptrout_schemaout_sche""ma_ptroutputoutput_bufferoutput_lengthoutput_sizeoutput_streamoutput_typeowned_buf__pac_pacpacpackpackage_kindpandas_pandas_apipandas_compatpandas_dtypepandas_typepandas_type_mapparentpatchpath__pc_pcpcpd_perform_join_perform_join_asofpermissivepermutationpicklepiecespoolpoppospositionprecisionprefetch_limit__prepare__presentpreserve_indexpreview_colsprint_statsprodpromotepromote_optionsprotocolproxy_memory_poolput_nowaitpy_bufpy_bufferpy_fieldpy_listpy_valpyarrowpyarrow.aceropyarrow.computepyarrow.cudapyarrow.interchange.dataframepyarrow.libpyarrow.pandas_compatpyarrow.utilpyarrow.vendored.versionpybuf_pydecimalpydictpylistpyobj_python_extension_types_registry__pyx_capi____pyx_checksum__pyx_result__pyx_state__pyx_type__pyx_unpickle__PandasAPIShim__pyx_unpickle__PandasConvertible__pyx_unpickle__Tabular__pyx_vtable__qsize__qualname__queuerrange_size_limitravelrawrbrd_handlerereadread1read_allread_atread_bufferread_messageread_next_batchread_next_batch_with_custom_metadataread_next_messageread_pandasread_record_batchread_schemaread_tensorreadablereadallreaderreadintoreadlinereadlines_reconstruct_reconstruct_record_batch_reconstruct_tablerecord_batchrecordbatchrecordbatchesrecursive__reduce____reduce_cython____reduce_ex__ree_arrayree_typeregisterregister_extension_type_registry_nannyrelease_registryrelease_unusedremoveremove_columnremove_metadatarename_columnsrepeatreplacereplace_schema_metadata__repr__requestedrequested_schemarequested_typerequirerequirementsresresizableresize_restore_arrayresultresult_dictresult_objresultsretreturnright_byright_keysright_onright_suffixright_tablerowrow_majorrun_end_encoderun_end_encodedrun_end_type_run_end_typerun_ends_run_endsruntime_infossafesarrscalarscaleschemaschema_as_stringschema_capsuleschemasscipyscipy.sparsesecondsseekseekableselectselfself_destructsendserializeserialize_toserializedseriessetset_columnset_cpu_countset_io_thread_countset_memcopy_blocksizeset_memcopy_threadsset_memcopy_thresholdset_memory_pool__set_name__set_""timezone_db_pathsetdefault__setstate____setstate_cython__shapeshow_field_metadatashow_metadatashow_schema_metadatashrink_to_fitsigsignalsignumsimd_levelsinksize__sizeof__sizes_sizesskip_new_linesskipnasleepslice__slots__snappyso_versionsortsort_bysort_indicessort_keyssortingsourcesource_pathspsp_scalarsp_storagesp_tensorsparsesparse_unionsplit_blockssrc_codecsrc_encodingstablestackstacklevelstartstartswithstatestaticmethodstepstopstoragestorage_arrstorage_type__str__strstreamstream_capsulestream_or_pathstrftimestrictstridesstringstring_to_tzinfostring_view_stringify_pathstrings_to_categoricalstruct_structstruct_arraystruct_typesumsum_duplicatessupersupported_memory_backendssupports_compression_levelsyssystem_memory_poolt_readertable_tabletable_or_batchtable_to_blockstable_to_dataframetablestaketargettarget_schematarget_typetbtelltemp_memotensor__test__this_arrthis_batchthis_tablethreadingthresholdthrowtimetime32time64time_to_first_byte_millistimedeltatimeouttimestamptimestamp_as_objecttimezonetitleto_batchesto_dictto_numpyto_numpy_ndarray_to_pandasto_pandas_to_pandas_dtypeto_pandas_dtypeto_pybytesto_pydata_sparseto_pydictto_pylistto_readerto_scipyto_stringto_struct_arrayto_tensortobytestolerancetolisttop_level_indenttosorttotal_allocated_bytestotal_buffer_sizetotal_bytestotal_bytes_allocatedtracebacktranscoding_input_streamtransfer_bandwidth_mib_per_sectransform_functruncatetruncate_metadatatytyptype_typetype_type_codestype_for_aliastype_idtype_nametypestypes_mappertztzinfotzinfo_to_stringu1u2u4u8uint16uint32uint64uint8unify_dictionariesunify_schemasunionuniqueunitunit_codeunregister_extension_typeupdateuploadupload.<locals>.bg_write_upload_nothreadsupperususe_legacy_formatuse_pandas_sentinelsuse_setstateuse_threads_use_threadsuses_string_dtypeutcutf8uuidvvalvalidatevaluevalue_countsvalue_fieldvalue_lengthsvalue_offsetsvalue_parent_indicesvalue_type_value_typevalues_valuesvendor_nameversion__version__version_infoviewvstackwwarnwarningswbwhencewindowwith_metadatawith""_namewith_nullablewith_typewr_handlewrap_arraywrappedwritablewritewrite_batchwrite_queuewrite_tablewrite_tensorwriteablewritelineswriterwriter_threadxzero_copy_onlyzipzstd= arrow::Field::MergeOptions (PyObject *)\000 arrow::MemoryPool *(struct __pyx_obj_7pyarrow_3lib_MemoryPool *)\000PyObject *( arrow::Datum const &)\000PyObject *( arrow::MemoryPool *)\000PyObject *( arrow::ipc::ReadStats)\000PyObject *(PyObject *)\000PyObject *(PyObject *, bool, std::shared_ptr< arrow::io::InputStream>  *)\000PyObject *(PyObject *, bool, std::shared_ptr< arrow::io::RandomAccessFile>  *)\000PyObject *(PyObject *, std::shared_ptr< arrow::io::OutputStream>  *)\000PyObject *(arrow::Status const &)\000\000PyObject *(enum  arrow::TimeUnit::type)\000PyObject *(std::shared_ptr< arrow::Array>  const &)\000PyObject *(std::shared_ptr< arrow::Buffer>  const &)\000PyObject *(std::shared_ptr< arrow::ChunkedArray>  const &)\000PyObject *(std::shared_ptr< arrow::DataType>  const &)\000PyObject *(std::shared_ptr< arrow::Field>  const &)\000PyObject *(std::shared_ptr< arrow::KeyValueMetadata const >  const &)\000PyObject *(std::shared_ptr< arrow::RecordBatch>  const &)\000PyObject *(std::shared_ptr< arrow::ResizableBuffer>  const &)\000PyObject *(std::shared_ptr< arrow::Scalar>  const &)\000PyObject *(std::shared_ptr< arrow::Schema>  const &)\000PyObject *(std::shared_ptr< arrow::SparseCOOTensor>  const &)\000PyObject *(std::shared_ptr< arrow::SparseCSCMatrix>  const &)\000PyObject *(std::shared_ptr< arrow::SparseCSFTensor>  const &)\000PyObject *(std::shared_ptr< arrow::SparseCSRMatrix>  const &)\000PyObject *(std::shared_ptr< arrow::Table>  const &)\000PyObject *(std::shared_ptr< arrow::Tensor>  const &)\000enum  arrow::TimeUnit::type (PyObject *)\000int (PyObject *)\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000int (arrow::Status const &)\000\000std::shared_ptr< arrow::Array>  (PyObject *)\000std::shared_ptr< arrow::Buffer>  (PyObject *)\000std::shared_ptr< arrow::ChunkedArray>  (PyO""bject *)\000std::shared_ptr< arrow::DataType>  (PyObject *)\000std::shared_ptr< arrow::Field>  (PyObject *)\000std::shared_ptr< arrow::KeyValueMetadata const >  (PyObject *)\000std::shared_ptr< arrow::RecordBatch>  (PyObject *)\000std::shared_ptr< arrow::Scalar>  (PyObject *)\000std::shared_ptr< arrow::Schema>  (PyObject *)\000std::shared_ptr< arrow::SparseCOOTensor>  (PyObject *)\000std::shared_ptr< arrow::SparseCSCMatrix>  (PyObject *)\000std::shared_ptr< arrow::SparseCSFTensor>  (PyObject *)\000std::shared_ptr< arrow::SparseCSRMatrix>  (PyObject *)\000std::shared_ptr< arrow::Table>  (PyObject *)\000std::shared_ptr< arrow::Tensor>  (PyObject *)\000std::shared_ptr< arrow::io::InputStream>  (std::shared_ptr< arrow::io::InputStream> , PyObject *, PyObject *)\000std::shared_ptr<std::function<__pyx_t_7pyarrow_8includes_8libarrow_StreamWrapFunc> >  (PyObject *, PyObject *)\000struct __pyx_obj_7pyarrow_3lib_DataType *(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7pyarrow_3lib_ensure_type *__pyx_optional_args)\000struct __pyx_obj_7pyarrow_3lib_DataType *(enum  arrow::Type::type)\000struct __pyx_obj_7pyarrow_3lib_IpcReadOptions *( arrow::ipc::IpcReadOptions)\000struct __pyx_obj_7pyarrow_3lib_IpcWriteOptions *( arrow::ipc::IpcWriteOptions)\000struct __pyx_obj_7pyarrow_3lib_NativeFile *(PyObject *, bool)\000_parse_field_merge_options\000maybe_unbox_memory_pool\000wrap_datum\000box_memory_pool\000_wrap_read_stats\000wrap_array_output\000get_input_stream\000get_reader\000get_writer\000convert_status\000pyarrow_internal_convert_status\000timeunit_to_string\000pyarrow_wrap_array\000pyarrow_wrap_buffer\000pyarrow_wrap_chunked_array\000pyarrow_wrap_data_type\000pyarrow_wrap_field\000pyarrow_wrap_metadata\000pyarrow_wrap_batch\000pyarrow_wrap_resizable_buffer\000pyarrow_wrap_scalar\000pyarrow_wrap_schema\000pyarrow_wrap_sparse_coo_tensor\000pyarrow_wrap_sparse_csc_matrix\000pyarrow_wrap_sparse_csf_tensor\000pyarrow_wrap_sparse_csr_matrix\000pyarrow_wrap_table\000pyarr""ow_wrap_tensor\000string_to_timeunit\000pyarrow_is_array\000pyarrow_is_batch\000pyarrow_is_buffer\000pyarrow_is_chunked_array\000pyarrow_is_data_type\000pyarrow_is_field\000pyarrow_is_metadata\000pyarrow_is_scalar\000pyarrow_is_schema\000pyarrow_is_sparse_coo_tensor\000pyarrow_is_sparse_csc_matrix\000pyarrow_is_sparse_csf_tensor\000pyarrow_is_sparse_csr_matrix\000pyarrow_is_table\000pyarrow_is_tensor\000check_status\000pyarrow_internal_check_status\000pyarrow_unwrap_array\000pyarrow_unwrap_buffer\000pyarrow_unwrap_chunked_array\000pyarrow_unwrap_data_type\000pyarrow_unwrap_field\000pyarrow_unwrap_metadata\000pyarrow_unwrap_batch\000pyarrow_unwrap_scalar\000pyarrow_unwrap_schema\000pyarrow_unwrap_sparse_coo_tensor\000pyarrow_unwrap_sparse_csc_matrix\000pyarrow_unwrap_sparse_csf_tensor\000pyarrow_unwrap_sparse_csr_matrix\000pyarrow_unwrap_table\000pyarrow_unwrap_tensor\000native_transcoding_input_stream\000make_streamwrap_func\000ensure_type\000primitive_type\000wrap_ipc_read_options\000wrap_ipc_write_options\000get_native_file\200\001\3600\000\005\014\210>\230\021\230!\320\004)\250\027\3200C\3007\310!\3604\000\t\016\320\r2\260!\340\010\017\320\017 \240\001\240\026\240}\260A\320\0040\260\001\3600\000\t\022\220\024\320\025,\250A\340\r\016\330\014\017\210w\220c\230\021\330\020\031\230\021\330\021\030\230\003\2301\330\020\031\230\036\240q\250\006\250d\260\"\260E\270\021\330\020\031\230\027\240\002\240!\330\021\030\230\003\2301\330\020\031\230\036\240q\250\006\250d\260\"\260H\270A\330\020\031\230\027\240\002\240!\340\025\026\330\024\032\230*\240A\320%@\300\001\300\021\330\014\030\230\001\230\026\230t\2402\240U\250!\2501\340\010\017\210t\2205\230\001\200\001\3600\000\005\r\210B\210f\220A\220Q\330\004\013\320\013!\240\021\240.\260\001\3201B\300!\3001\200\001\3600\000\005\014\210<\220q\200\001\330\0040\260\001\260\026\260q\320\000\032\320\0320\260\001\360x\001\000\005\006\330\010\026\220o\240Q\240a\330\013\014\330\010\026\220a\340\004\007\200z\220\021\220(\230!\330\010\021""\220\021\330\t\025\220W\230A\330\010\021\220\026\220q\230\r\240Q\330\t\023\2201\220I\230X\240Q\330\010\021\320\021&\240a\240y\260\001\260\021\330\n\021\220\021\220(\230)\2401\330\n\021\220\021\220(\230)\2401\330\n\021\220\021\220(\230!\330\010\021\220\032\2301\230H\240A\340\010\016\210i\220q\330\014:\270!\2706\300\021\340\004\007\200|\2203\220a\330\010\026\320\026)\250\021\250!\340\004\007\200|\2207\230%\230t\240<\250s\260!\330\010\021\320\021%\240Q\240h\250a\340\004\007\200|\2207\230!\330\010\021\320\021'\240q\250\010\260\001\340\004\013\2101\200\001\360\036\000\005\014\320\013#\2401\320\0041\3201A\300\021\330\031,\320,@\300\001\330\0311\260\021\360t\003\000\t\r\210L\230\001\330\010\013\210;\220c\230\021\330\014\031\230\021\330\010\017\210t\2202\220^\2401\330\014\027\220v\230V\240=\260\001\330\014\030\230\r\240]\260!\330\014\030\230\r\240^\2601\330\014\030\230\001\330\014\036\230a\320\004+\2501\3602\000\t\r\210L\230\001\330\010\021\220\021\330\010\014\210E\220\025\220a\220t\2301\330\014\026\220d\230&\240\001\240\022\240:\250Q\320.>\270a\330\010\017\210q\320\000(\320(;\2701\3608\000\005\036\320\0354\260A\260Q\330\t\n\330\010\022\220.\240\001\240\026\240q\250\007\250v\260V\2701\330\004\013\320\013\035\230Q\230a\320\004\"\240/\260\021\360\036\000\t\022\320\021#\2401\240A\330\010\014\210M\230\021\230(\240*\250K\260|\3001\330\010\017\210v\220Y\230a\320\004+\2501\360B\001\000\t\023\220!\330\010\014\210E\220\025\220a\220t\2301\330\014\023\2204\220v\230Q\230b\240\001\330\014\025\220T\230\021\230\"\230J\240a\320'7\260q\330\014\023\2207\230\"\230F\240!\330\010\017\210|\2301\230A\320\004+\2501\360B\001\000\t\022\220\024\220Z\230q\320 0\260\001\330\010\020\220\004\220G\2301\330\010\021\220\021\220!\2208\2306\240\021\240'\250\021\250%\250t\260:\270Q\330\022\026\220g\230U\240!\2404\240q\330\010\017\210q\320\000\023\2201\360B\002\000\005\010\200w\210a\210x\220q\330\010\021\220\026\320\027.\250a\250v\3205H\310\001\330\010\013\2109\220G\2301\330\014\025\220V\230>\250\021\250!\330""\010\017\210q\340\004\007\200z\220\021\220(\230!\330\010\021\220\026\220v\230Q\340\004\010\210\010\220\001\330\010\013\210:\220Q\220f\230A\330\014\027\220u\230B\230a\340\014\027\220q\330\010\013\2109\220C\220q\330\014\022\220)\2301\230A\330\010\020\220\n\230!\2308\2401\340\004\017\210\177\230a\320\0374\260A\330\004\r\320\r$\240A\240Q\340\004\014\210F\220!\220;\230a\230z\250\021\330\004\r\210V\2208\2301\230A\330\004\n\210,\220a\220q\340\004\013\2101\320\000\020\220\013\2301\360D\001\000\t\035\320\0343\2601\260A\330\010\031\230\021\360\010\000\005\014\210;\220a\320\027(\250\001\330\004\007\200u\210C\210q\330\010\017\210t\2201\340\004\t\320\t!\240\021\240!\330\t\n\330\010\016\210n\230A\230_\250A\250T\260\030\270\021\340\004\013\320\013\035\230Q\230a\200\001\360\010\000\005&\320%@\300\001\330\004\013\2101\210G\2207\230#\230T\240\033\250A\200\001\360\030\000\005\016\320\r\035\230]\250!\330\004\021\220\031\320\032*\250!\340\004\025\220\\\240\021\240(\250)\2601\260J\270a\330\"/\250{\270!\270:\300Q\330;E\300Q\330;E\300Q\330\"-\250Y\260a\260z\300\021\330\"2\260)\2701\270J\300a\330\".\250i\260q\270\n\300!\330\"3\2609\270A\330&0\260\001\330\"1\260\031\270!\270:\300Q\330\")\250\031\260!\260:\270Q\330\"2\260)\2701\270J\300a\330\"/\250y\270\001\270\032\3001\330\"-\250Y\260a\260z\300\034\310V\320ST\360\006\000\005\014\2109\220A\220[\240\006\240k\260\027\270\001\270\030\300\026\300q\330\025$\240A\200\013\2101\360X\001\000\005\010\200w\210d\220!\330\010\017\210~\230Q\230a\360\006\000\005\033\230&\240\001\320!9\270\021\270!\330\004\013\320\013!\240\021\240!\320\004\033\2301\360\036\000\t\014\2107\220#\220Q\360\n\000\r\026\220T\230\021\330\010\017\210t\2205\230\001\230\021\320\004\033\2301\360\014\000\t\r\210G\2209\230A\230Q\320\0041\260\021\360$\000\t\r\210L\230\001\360\016\000\t\014\320\013\034\230G\2401\330\014\032\230(\320\"9\270\021\270!\340\014\017\210|\2303\230d\240!\330\020\021\330\024#\2403\240b\250\005\250Q\250f\260M\300\025\300a\330\024\"\320\"6\260a\260q\330\020\027\320""\027'\240q\330\024\032\230*\240A\330\030)\250\021\250$\320.G\300q\310\016\320VW\320WX\360\006\000\021\037\230d\240!\340\014\032\230$\230a\340\010\031\230\036\240q\250\001\250\021\330\010\030\230\r\240Q\240a\240q\340\r\016\330\014\030\230\001\230\033\240A\240V\250>\270\031\300!\340\010\017\320\017\037\230q\320\0041\260\021\360$\000\t\r\210L\230\001\360\n\000\t\014\320\013\034\230G\2401\330\014\034\230F\320\"9\270\021\270!\340\014\017\210~\230S\240\004\240A\330\020\021\330\024#\2404\240u\250A\250_\270E\300\021\330\024\"\320\"6\260a\260q\330\020\027\320\027'\240q\330\024\032\230*\240A\330\030)\250\021\250$\320.K\3101\320L\\\320\\]\320]^\360\006\000\021\037\230d\240!\340\014\032\230$\230a\340\010\031\230\036\240q\250\001\250\021\330\010\030\230\r\240Q\240a\240q\340\r\016\330\014\030\230\001\320\031*\250!\2506\260\036\270y\310\001\340\010\017\320\017\037\230q\320\004+\2501\360,\000\t\r\210L\230\001\330\010\017\210q\220\001\220\026\220q\320\030(\320(9\270\024\270U\300!\320\000\"\240!\360,\000\t\034\2301\330\010\031\230\021\360\006\000\005\021\320\020 \240\005\240Q\240k\260\030\270\021\330&,\250A\250Q\330\004\013\320\013\036\230a\230q\320\004+\2501\360(\000\t\021\320\020-\250T\260\031\270$\270a\330\010\030\320\0309\270\021\270&\300\001\330\010\022\220.\240\001\240\021\330\010\017\320\017!\240\021\240!\200\001\360\026\000\005\016\210^\2301\340\004\013\210;\220a\330\010\023\2209\230A\230V\2401\330\010\034\230I\240Q\240f\250A\320\000\033\2301\360\022\000\005\010\200q\330\010\027\220q\230\001\340\010\027\220q\230\001\200\001\3602\000\005\014\210>\230\021\230!\200\001\360\024\000\005\"\320!2\260(\270!\330\010\033\2301\330\004\007\200}\220F\230!\320\0331\260\021\260&\270\001\330\004\007\200u\210A\210S\220\r\230T\240\021\330\004\013\2101\200\001\330\004\013\320\013!\240\021\320\"2\260!\2608\2701\320\0042\260!\360&\000\t\014\320\013\034\230G\2401\330\014\031\230\026\320\0376\260a\260q\330\014\017\210t\2208\2303\230a\330\020\027\220t\2305\240\001\240\033\320,?\270q\340\010\031\230""\036\240q\250\001\250\021\340\r\016\330\014\030\230\001\320\0310\260\001\260\024\260Y\270a\340\010\017\210q\320\0042\260!\360 \000\t\r\210L\230\001\360\006\000\r*\250\021\340\010\013\320\013\034\230G\2401\330\014\032\230(\320\"9\270\021\270!\340\014\017\210|\2303\230d\240!\330\020\021\330\024\036\230d\240%\240q\250\r\260U\270!\330\020\027\320\027'\240q\330\024\032\230*\240A\330\030)\250\021\250$\320.G\300q\310\016\320VW\320WX\360\006\000\021\033\230!\340\014\026\220a\340\010\031\230\036\240q\250\001\250\021\340\r\016\330\014\030\230\001\320\031+\2501\250G\3203F\300a\340\010\017\210q\320\0042\260!\360\"\000\t\r\210L\230\001\330\010\017\210t\220:\230R\320\0372\260!\2601\320\0042\260!\360\"\000\t\r\210L\230\001\330\010\017\210u\220M\240\021\240!\2406\320)<\270A\270Q\320\000\022\220.\320 2\260!\360Z\001\000\t!\240\001\360\006\000\005\014\210;\220a\320\027(\250\001\330\004\013\320\013\"\240!\2401\340\004\025\220Q\330\004\007\200u\210G\2205\230\004\230D\240\004\240C\240q\330\010\031\230\021\330\010\017\210t\2201\340\004\007\200~\220Q\220a\330\010\020\220\n\230!\2307\240!\2401\340\004\013\2108\2201\340\004\007\200u\210G\2201\330\010\r\210[\230\001\230\021\330\010\017\210x\220r\230\021\340\004\007\200|\2203\220a\330\010\017\210\177\230a\340\010\017\210\177\230a\340\004\014\210A\210Q\330\t\n\330\010\022\220.\240\001\320!2\260!\2607\270&\300\t\310\021\360\006\000\005\014\2107\220$\220b\230\013\2403\240c\250\021\330\004\014\210G\2204\220r\230\026\230q\240\001\360\006\000\005\016\210^\2301\230E\240\024\240R\240z\260\021\260!\330\004\023\2205\230\001\230\021\340\004\007\200\177\220g\230Q\330\010\021\220\037\240\r\250Q\320.>\270a\330\004\013\2101\320\0002\260!\360b\001\000\005\010\200z\220\022\2202\220S\230\n\240\"\240A\330\010\016\210j\230\001\230\021\330\004\020\220\006\220a\320\027)\250\021\250+\260Q\330\004\013\320\013!\240\021\240!\200\001\3602\000\005\010\200u\210C\210q\330\010\024\220A\330\t\016\210c\220\021\330\010\024\220A\340\010\016\210j\230\001\320\0319\270\021\270!""\340\004\007\200z\220\023\220A\330\010\017\320\017\037\230q\240\001\340\004\032\230*\240H\250A\250Q\340\004\007\200u\210A\210W\220A\220Q\330\004\024\220A\220]\240!\340\004\013\2101\320\0003\2601\3602\000\005\010\200z\220\022\2202\220S\230\n\240\"\240A\330\010\016\210j\230\001\230\021\330\004\020\220\006\220a\320\027*\250!\250;\260a\330\004\013\320\013!\240\021\240!\320\0043\2601\360\036\000\r\"\240\021\360\006\000\t\014\2104\320\017#\2401\330\014\023\2204\320\027+\2501\320,<\270A\340\010\021\220\024\320\025&\240a\340\010\026\220l\240#\240Q\340\010\026\220e\2301\230A\340\010\013\2104\210w\220a\320\027'\240q\330\014\025\220T\230\021\320\032*\250!\340\014\r\360\006\000\r\026\220Q\340\014\r\360\006\000\t\020\210q\330\010\023\2201\340\010\t\360\032\000\t\r\210E\220\021\220!\340\010\030\230\t\240\027\250\001\250\027\260\001\360\010\000\t\017\210k\230\026\230q\240\001\330\010\013\2104\210s\220!\330\014\022\220+\230Q\320\0363\2601\260A\340\010\025\220V\2301\340\010#\2401\330\010%\240Q\340\010\t\330\014\r\330\025\026\330\024!\240\036\250q\330\030\036\230d\240\"\240E\250\021\250/\270\021\340\020\037\230q\360\006\000\021\024\220;\230c\240\021\330\024\025\340\020\032\320\0324\260A\260]\300!\33056\340\020\023\220=\240\t\250\021\330\024\032\230+\240U\250!\330\030\034\230F\240!\2401\340\024\025\340\020\033\230;\240a\240q\340\014\020\220\001\220\021\330\014\023\2201\340\010\025\220U\230!\330\010\013\2109\220G\2301\330\014\022\220(\230!\2304\230x\240q\250\004\250H\260A\260Q\320\004*\250!\330%3\2601\330%&\330\010\014\210K\220w\230a\330\010\014\210H\220O\320#:\270!\2701\330\010\t\330\014\025\220Y\230a\230q\330\017\020\360\006\000\t\023\220!\2208\2307\240!\2404\240q\340\010\036\230a\330\010\013\210>\230\027\240\001\330\014\025\220Q\340\r\016\330\014\017\210w\220c\230\021\330\020\024\220J\230n\250A\330*0\260\001\260\024\260U\270$\270d\300!\33015\260Q\360\006\000\021\025\220J\230n\250A\330*/\250q\260\004\260E\270\024\270Q\33004\260A\340\010\014\210J\320\026)\250\021\250$\250g\260T\270""\022\2707\300!\320\000\033\320\0333\2601\330\017\036\230a\360,\000\005\032\230\025\230a\230q\330\004\013\2107\220+\230Q\230e\2408\2509\260L\300\001\330\0360\260\001\320\0043\2601\360&\000\r\033\230-\240q\250\001\330\014!\240\035\250a\250q\330:;\330\r\016\330\014\030\230\001\320\031*\250!\2506\260\024\260Q\330+9\270\021\330+:\270!\320\0043\2601\360&\000\r\033\230-\240q\250\001\330\014!\240\035\250a\250q\330:;\330\r\016\330\014\030\230\001\230\033\240A\240V\2504\250q\330%3\2601\330%4\260A\320\0003\2601\360b\001\000\005\010\200z\220\022\2202\220S\230\n\240\"\240A\330\010\016\210j\230\001\230\021\330\004\020\220\006\220a\320\027*\250!\250;\260a\330\004\013\320\013!\240\021\240!\320\0003\3203C\3001\360X\002\000\005\014\210;\220g\230Q\330\004\013\2106\220\027\230\001\340\004\010\210\005\210Q\330\010\017\210z\230\021\230!\340\004\007\200|\2207\230!\330\010\014\210E\220\021\330\014\031\230\032\2401\240A\340\004\007\200z\220\027\230\001\330\010\014\210E\220\021\330\014\027\220z\240\021\240'\250\021\250!\340\004$\320$8\270\010\300\001\300\021\340\t\n\330\010\034\230N\320*@\300\005\300Q\330\014\026\220j\240\t\250\037\270\001\340\004\007\200u\210A\210Q\340\004\013\2101\320\0043\260>\300\021\330%&\330\010\014\210K\220w\230a\330\010\014\210H\220O\320#:\270!\2701\330\010\031\230\021\230(\240!\2404\240q\330\r\016\330\014\020\220\n\230.\320(A\300\025\300a\330\020\024\220L\240\004\240A\330\014\020\320\020!\320!=\270T\300\027\310\004\310A\320\004\031\320\031)\250\021\360(\000\t\014\2103\210g\220Q\330\014\024\220L\240\004\320$5\260Q\260e\2702\270T\300\021\340\014\024\220L\240\006\240b\250\005\250W\260G\2704\270y\310\004\310A\330\010\022\220#\220R\220}\240A\330\014\024\220H\230C\230r\240\034\250Q\250j\270\r\300Q\340\010\017\210t\2205\230\001\230\021\320\000\"\240!\330\024\025\360&\000\t\036\320\0354\260A\260Q\360\010\000\005\010\200q\330\r\016\330\014\032\230)\2401\240N\260!\330\020'\240q\250\006\250a\330\010\017\320\017,\250A\250Q\340\r\016\330\014\027\220y\240\001\240\036\250q\260""\016\270a\270v\300Q\330\010\017\320\017\"\240!\2401\320\0044\260A\360R\001\000\t\r\210L\230\001\360\006\000\r!\320 7\260q\270\001\340\r\016\330\014\027\220~\240Q\240d\250&\260\016\270a\270q\340\010\017\320\017!\240\021\240!\320\0044\260A\360T\001\000\t\r\210L\230\001\330\010\013\2104\210|\2303\230a\330\014\023\2205\230\001\230\024\230U\240$\240a\340\014\023\220=\240\001\240\024\240Q\320\0044\260A\360\n\000\t\r\320\014\035\230Q\340\010\026\220l\240#\240Q\340\010\t\330\014\022\220&\230\005\230Q\230a\330\014\017\210t\2201\330\020\021\360\006\000\r\021\220\006\220a\220q\320\000!\240\021\330\004\030\230\n\240!\330\004 \320 4\260A\330\004\007\200x\210w\220a\330\010\017\210q\330\004\007\200q\340\010\013\2108\2203\220a\330\014\023\2202\220V\2301\230A\330\010\017\210r\220\026\220q\230\001\330\004\022\220/\240\021\240!\330\004\007\200z\220\021\220-\230q\330\010\017\210w\220a\220|\2408\2501\330\010\026\220k\240\024\240Q\240f\250A\330\004\013\2101\320\0004\260A\360l\001\000\t\027\220g\230X\240Q\240a\340\004\007\200z\220\021\220*\230A\330\010\013\2108\2201\330\014\022\220)\2301\230A\330\010\025\220Q\340\010\025\220U\230!\2307\240+\250Q\320.C\3001\330\033$\240A\340\004\007\200z\220\021\220+\230Q\330\010\026\220a\340\010\026\220e\2301\230I\240[\260\001\3201G\300q\340\004\014\210F\220!\220<\230q\240\n\250+\260[\300\001\330 !\330\004\007\200u\210A\210Q\330\004\013\2101\320\004)\250\021\360\026\000\t\014\2104\320\017#\2401\330\014\023\2204\320\027)\250\021\250(\260!\340\010\026\220e\2301\230A\330\010\014\320\014\035\230Q\340\010\026\220l\240#\240Q\340\010\017\210q\330\010\023\2201\340\010\t\360\032\000\t\031\230\t\240\027\250\001\250\027\260\001\330\010\025\220V\2301\340\010\t\330\014\r\330\020\026\220f\230E\240\021\240!\330\020\023\2204\220q\330\024\025\340\020\023\220=\240\t\250\021\330\024\032\230+\240U\250!\330\030\034\230F\240!\2401\340\024\025\340\020\033\230;\240a\240q\340\014\023\2201\340\010\025\220U\230!\330\010\013\2109\220G\2301\330\014\022\220(\230!\2304\230x\240q\250""\004\250H\260A\260Q\200\001\360\032\000\005\014\2104\210v\220Q\330\004\005\330\010\020\220\r\230Q\230a\330\013\014\330\010\016\210j\230\001\320\031-\250Q\250a\340\004\007\200z\220\021\220'\230\021\330\010\017\210q\330\004\013\2105\220\001\320\0045\260Q\360\032\000\t'\240a\330\r\016\330\014\030\230\002\320\032.\250d\260'\270\024\270Q\330\031 \240\001\240\032\2501\320\0045\260Q\360\032\000\r(\240q\340\010\013\210>\230\027\240\001\330\014\036\230a\340\r\016\330\014\030\230\001\230\024\230W\240D\250\002\250+\260Q\260e\2706\300\021\300!\33067\320\0005\260Q\330\004\007\200u\210C\210q\330\010\020\220\010\230\n\240!\2408\2501\330\t\016\210c\220\021\330\010\020\220\010\230\n\240!\240=\260\001\330\t\016\210c\220\021\330\010\020\220\010\230\n\240!\240=\260\001\360\006\000\t\014\210;\220a\330\014\023\220;\230c\240\032\2501\250G\2603\260h\270e\3001\340\010\013\2106\220\022\2205\230\003\2301\330\014\022\220*\230A\330\0206\260a\260q\360\n\000\t\021\220\010\230\n\240!\240=\260\006\260c\270\021\340\004\t\210\030\220\031\230!\2306\240\023\240C\240r\250\021\340\004\007\200w\210g\220Q\330\010\r\210R\210x\220q\230\007\230x\240y\260\005\260[\300\001\300\021\340\004\013\2101\200\001\360\010\000\005\014\2105\220\014\230A\230X\240W\250A\200\001\360,\000\005\014\2106\220\021\200\001\3606\000\005\014\210>\230\021\230!\200\001\3606\000\005\014\320\013\033\2307\240!\2406\250\021\200\001\3606\000\005\010\200z\220\021\220,\230a\330\010\021\220\025\220a\220x\230q\330\t\023\2201\220L\240\001\330\010\021\220\021\340\010\016\210i\220q\230\001\340\004\025\320\025+\2501\250F\260!\330\004\013\320\013!\240\021\240!\200\001\3606\000\005\010\200z\220\021\220,\230a\330\010\021\220\025\220a\220x\230q\330\t\023\2201\220L\240\001\330\010\021\220\021\340\010\016\210i\220q\230\001\340\004\025\320\025&\240a\240v\250Q\330\004\013\320\013!\240\021\240!\320\0046\260a\3600\000\t\020\210t\2206\230\027\240\001\240\026\240u\250I\260Q\320\0046\260a\360F\001\000\t\r\210L\230\001\330\010\013\2106\220\023\220A\330\014\023""\2201\360\006\000\r\"\240\024\240Q\330\014\"\240%\240q\360\006\000\016\017\330\014\025\220Z\230w\240a\240v\250^\2701\340\010\017\210q\320\0006\260a\330\004\007\200{\220$\220c\230\023\230A\330\010\017\210q\330\t\023\2201\220D\230\001\330\010\017\210q\330\t\023\2201\220D\230\001\330\010\017\210~\230Q\230a\340\010\016\210i\220q\320\0301\260\021\260$\260a\260q\320\0046\260o\300Q\360\032\000\r%\240A\360\010\000\t\020\210}\230A\330\010\016\210d\320\022$\240B\240d\250!\330\r\016\330\014\030\230\001\230\024\230X\240T\250\021\330\031%\240Q\240e\2509\260A\260Q\200\001\360\022\000\005\014\2107\220!\2201\320\0047\260~\300Q\330\037 \360.\000\r&\240Q\340\010\024\220K\230q\240\001\330\010\020\220\t\230\024\230Q\340\010\013\320\013\035\230S\240\001\330\014\022\220*\230A\330\020\021\360\006\000\t\027\220a\340\010\013\2101\330\014\026\320\0260\260\001\260\026\260q\330\014\034\230M\320);\2701\270A\340\014\026\220o\240Q\240m\260<\270q\330\014\034\230G\2407\250$\250b\260\r\270Q\340\r\016\330\014\032\230!\330\020\024\220G\2302\230[\250\001\330\024\031\230\025\230a\330\024\031\230\025\230a\330\024\025\330\024\025\360\010\000\t\020\210y\230\r\240Q\320\004 \240\001\360 \000\t\014\2107\220#\220Q\330\014\031\230\036\240q\320(;\2701\270D\300\001\340\014\023\220=\240\001\240\034\250\\\270\021\340\014\022\320\022%\240Q\330\020\021\320\004 \240\001\360 \000\t\014\2107\220#\220Q\330\014\031\230\036\240q\320(<\270A\270T\300\021\340\014\023\220=\240\001\240\034\250\\\270\021\340\014\022\320\022%\240Q\330\020\021\320\004\032\230!\360 \000\r\"\240\021\360\006\000\t\014\2107\220#\220Q\330\014\017\210t\2204\220q\340\020\025\220T\230\021\330\020\031\230\021\330\020\021\330\024\034\230D\240\005\240Q\240a\330\024\027\220t\2301\330\030\031\330\024\032\230'\240\021\240!\330\020\027\220s\230%\230q\240\001\340\014\027\220t\2305\240\003\2402\240T\250\025\250a\340\014\027\220q\340\010\021\220\024\320\025&\240a\360\006\000\t\017\320\016-\250Q\250f\260A\340\010\034\230M\320);\2701\270I\300Q\330\r\016\330\014\031""\230\036\240q\250\006\250d\260\"\260E\270\021\270*\300A\340\010\013\210;\220b\230\001\330\016\036\230a\230q\240\005\240]\260!\340\010\017\320\017!\240\021\240!\320\0047\260q\360F\001\000\t\r\210L\230\001\340\014'\240t\2501\330\0143\3203G\300q\310\001\360\006\000\t\014\2104\210q\330\014\023\2201\340\r\016\330\014\025\220Z\230w\240a\240v\250^\2701\340\010\017\210q\320\000\032\320\0327\260q\360j\001\000\t\035\320\0343\2601\260A\340\010\t\330%.\250a\340\004\007\200z\220\023\220A\330\010\020\220\005\220Q\330\014\r\330\014\033\230;\240a\330\010\013\2106\220\021\220+\230S\240\001\330\014\036\230a\340\004\010\210\t\220\021\330\010\020\220\n\230!\2305\240\001\340\004\013\320\013\"\320\"<\270A\330\010\025\320\025%\240S\250\014\260A\360\006\000\005\014\320\013\034\320\034,\250C\250q\330\t\n\330\010\031\230\036\240q\330\014\035\230Q\230j\250\t\260\021\340\004\013\320\013\035\230Q\230a\200\001\360\022\000\005\014\2108\2201\220A\320\0048\270\001\3608\000\t\036\230Q\330\014\021\220\024\220V\2309\240F\250&\260\003\2603\260f\270G\3001\340\010\013\2101\330\014\022\320\022%\240Q\330\020<\270A\270Q\360\006\000\t\014\320\013\034\230G\2401\330\014\032\230(\320\"9\270\021\270!\340\014\017\210|\2303\230d\240!\330\020\023\2204\220t\2301\330\024\032\320\032-\250Q\330\030\031\340\020\021\330\024#\2403\240b\250\005\250Q\250f\260M\300\025\300a\330\024\"\320\"6\260a\260q\330\020\027\320\027'\240q\330\024\032\230*\240A\330\030)\250\021\250$\320.G\300q\310\016\320VW\320WX\360\006\000\021\037\230d\240!\340\014\032\230$\230a\340\010\031\230\036\240q\250\001\250\021\330\010\030\320\030,\250A\250Q\250a\340\r\016\330\014\030\230\001\320\031*\250!\330\020\026\220n\320$<\270A\330\020\031\230\021\340\010\017\320\017\037\230q\320\0048\270\001\3608\000\t\036\230Q\330\014\021\220\024\220V\2309\240F\250&\260\003\2603\260f\270G\3001\340\010\013\2101\330\014\022\320\022%\240Q\330\020<\270A\270Q\360\006\000\t\014\320\013\034\230G\2401\330\014\034\230F\320\"9\270\021\270!\340\014\017\210~\230S\240\004\240A\330""\020\023\2204\220t\2301\330\024\032\320\032-\250Q\330\030\031\340\020\021\330\024#\2404\240u\250A\250_\270E\300\021\330\024\"\320\"6\260a\260q\330\020\027\320\027'\240q\330\024\032\230*\240A\330\030)\250\021\250$\320.K\3101\320L\\\320\\]\320]^\360\006\000\021\037\230d\240!\340\014\032\230$\230a\340\010\031\230\036\240q\250\001\250\021\330\010\030\320\030,\250A\250Q\250a\340\r\016\330\014\030\230\001\320\0310\260\001\330\020\026\220n\320$<\270F\300)\3101\340\010\017\320\017\037\230q\320\0048\270\001\360`\001\000\t\r\210L\230\001\340\014 \320 7\260q\270\001\360\006\000\016\017\330\014\027\220~\320%8\270\013\3001\330\020\026\220d\230)\2401\340\010\017\320\017!\240\021\240!\320\0048\270\001\360z\002\000\t\r\210L\230\001\340\014 \320 7\260q\270\001\360\006\000\016\017\330\014\027\220~\320%8\3208J\310!\330\020\024\320\024'\240q\340\010\017\320\017)\250\021\250!\200\001\360\022\000\005\014\2109\220A\220Q\200\001\360$\000\005\014\2109\220A\220^\2401\240N\260!\260;\270a\200\001\360\n\000\t#\320\"9\270\021\270!\340\004\007\200{\220'\230\021\330\010\021\320\021(\250\013\3203L\310A\330\031#\2401\240A\240W\250A\250U\260$\260g\270Q\330\004\007\320\007\031\230\027\240\001\330\010\021\320\021&\240k\3201J\310!\330\031#\2401\240A\240W\250A\250U\260$\260g\270Q\340\004\007\200z\220\026\220q\340\010\021\320\0210\260\001\340\004\007\200y\220\001\340\010\022\220$\220a\220u\230A\330\010\r\210Y\220a\340\010\022\220%\220q\340\t\n\330\010\024\220A\330\0330\260\001\260\033\270D\300\001\300\021\33012\260!\360\006\000\005\014\320\013\035\230Q\230a\200A\200A\3600\000\t\014\2102\210S\220\004\220L\240\003\2402\240R\240q\330\014\022\220*\230A\230Q\340\010\017\320\017!\240\021\240$\240n\260F\270!\2701\200A\3600\000\016\017\330\014\030\230\004\230F\240(\250!\330\010\017\210q\320\020\"\240!\2403\240d\250%\250q\200A\33023\360&\000\t\r\210E\220\021\330\014\023\220:\230Q\230a\330\010\013\210:\220W\230A\330\014\020\220\005\220Q\330\020\033\230:\240Q\240g\250Q\250a\360\006\000\t\022\220\022\2208\2301\230H""\240F\250&\260\r\270Q\330\010\013\2106\220\026\220s\230!\330\014\022\220*\230A\230Q\360\006\000\t\025\220A\320\025.\250a\320/D\300A\330/5\260X\270Q\330/<\270A\270Q\330\010\017\320\017-\250Q\250a\200A\3602\000\t\022\220\021\220,\230a\230u\240G\2504\250y\270\001\330\010\017\210u\220L\240\001\240\030\250\027\260\001\200A\3303I\310\033\320TU\3600\000\t#\320\"9\270\021\270!\340\010\023\2207\230!\2309\240E\250\021\330\010\022\220'\230\021\230!\340\010\021\320\021)\250\021\250&\260\001\340\010\013\2105\220\007\220q\330\021\022\330\020\026\220n\240A\330#5\260Q\330\030\034\230J\240h\250c\260\021\260$\260g\270S\300\001\300\024\300W\310A\340\021\022\330\020\026\220n\240A\330#.\250a\330\030 \240\003\2401\240D\250\007\250s\260!\2604\260w\270a\330\010\034\320\034.\250a\250q\330\010\016\210i\220q\330\010\017\210q\200A\3303I\310\033\320TU\360p\001\000\t#\320\"9\270\021\270!\340\010\023\2207\230!\2309\240E\250\021\330\010\022\220'\230\021\230!\340\010\021\320\021)\250\021\250&\260\001\340\010\013\2105\220\007\220q\330\021\022\330\020\026\220n\240A\330\0360\260\001\330\030\034\230J\240h\250c\260\021\260$\260g\270S\300\001\300\024\300W\310A\340\021\022\330\020\026\220n\240A\330\036)\250\021\330\030 \240\003\2401\240D\250\007\250s\260!\2604\260w\270a\330\010\034\320\034.\250a\250q\330\010\016\210i\220q\330\010\017\210q\200A\3604\000\t\r\210L\230\001\330\010\013\2106\220\023\220A\330\014\023\2201\360\006\000\r'\240d\250!\330\014'\240u\250A\360\006\000\016\017\330\014\025\220X\230W\240A\240V\2501\340\010\017\210q\200A\3604\000\016\017\330\014\031\230\036\240q\250\004\250G\260<\270q\300\001\340\010\017\320\017\"\240!\2401\200A\3604\000\t\020\210t\2207\320\032-\250Q\250g\260Q\260a\320\004$\240A\3606\000\r!\320 7\260q\270\001\340\r\016\330\014\025\220^\2401\240O\2601\260F\270$\270a\33045\330\010\017\320\017\"\240!\2401\200A\3606\000\t\014\210:\220Q\220n\240A\330\014\023\2205\230\r\240Q\240a\240{\3202D\300A\300Q\340\014\023\2205\230\r\240Q\240a\330\020\033\320\033-\250Q\250a\330\020\024\220I""\230\\\250\021\200A\3606\000\t\020\210t\2207\230&\240\001\240\021\200A\3308N\310k\320YZ\360@\003\000\t#\320\"9\270\021\270!\340\010\023\2207\230!\2309\240E\250\021\330\010\020\220\007\220q\230\001\330\010\021\220\027\230\001\230\021\340\010\021\320\021)\250\021\250&\260\001\340\010\013\2105\220\007\220q\330\021\022\330\020\026\220n\240A\330\035/\250q\330\030\034\230J\240h\250a\330\030\035\230[\250\006\250k\270\027\300\001\340\021\022\330\020\026\220n\240A\330\035(\250\001\250\030\260\021\330).\250a\330)/\250{\270'\300\021\330\010\034\320\034.\250a\250q\330\010\016\210i\220q\330\010\017\210q\200A\3608\000\t\014\2103\210f\220C\220q\330\014\022\220*\230A\320\035.\250a\250s\260!\340\010\013\2103\210g\220X\230R\230x\240r\250\021\330\014\022\220)\2301\230N\250!\2503\250a\340\010\026\220e\2301\230C\230u\240A\240R\240x\250u\260D\270\001\330\010\017\210z\230\035\240a\240q\200A\3608\000\t\014\210:\220Q\220d\230'\240\021\330\014\023\2204\220~\240Q\240a\330\r\027\220q\230\003\2301\330\014\033\2306\240\021\240&\250\001\340\014\022\220)\2301\230A\200A\3608\000\016\017\330\014\031\230\024\230W\240O\2601\330\010\017\320\017\"\240!\2401\200A\3608\000\t\020\210\177\230a\320\0374\260A\330\r\016\330\014\026\220d\230&\240\r\250Q\250d\260'\270\021\340\010\017\320\017!\240\021\240!\200A\3608\000\t\023\220$\220f\230I\240Q\240g\250Q\250a\340\010\017\320\017!\240\021\240!\200A\330AB\330$%\360.\000\t\r\210I\220Q\330\014\r\210Z\220q\230\005\230Q\330\010\013\210<\220w\230a\330\014\020\220\005\220Q\330\020\035\230Z\240q\250\007\250q\260\001\330\010\013\210;\220g\230Q\330\014\020\220\005\220Q\330\020\034\230J\240a\240q\340\r\016\330\014\022\220.\320 2\260%\260q\330\020\026\220e\2306\240\023\240O\2601\340\010\034\320\034.\250a\250q\330\010\016\210i\220q\330\010\017\210q\200A\330AK\3101\330\036\037\360<\000\t\024\2209\230C\230q\340\010\013\2104\210|\2303\230c\240\021\240!\330\014\022\220*\230A\230Q\330\035 \240\001\240\024\240Q\330\035 \240\001\240\023\240A\240Q\360\n\000\t\014\2103\210a\210y\230""\003\2301\330\014\026\220a\220q\330\010\013\2107\220!\2203\220g\230Q\330\014\022\220*\230A\230Q\340\010\013\2104\210}\230C\230s\240!\2401\330\014\022\220*\230A\230Q\330\035 \240\001\240\024\240Q\330\035 \240\001\240\023\240A\240Q\360\006\000\t\014\210;\220d\230\"\230D\240\013\2503\250a\330\014\022\220*\230A\230Q\330\035<\270A\270Q\340\010\017\320\017!\240\035\250a\250v\260W\270H\300H\310A\310Q\330/7\260q\270\004\270A\200A\330AK\3101\330\036\037\360D\001\000\t\024\2209\230C\230q\340\010\013\2104\210|\2303\230c\240\021\240!\330\014\022\220*\230A\230Q\330\035 \240\001\240\024\240Q\330\035 \240\001\240\023\240A\240Q\340\010\013\2104\210q\330\014\017\210t\220=\240\002\240#\240Q\240a\330\020\026\220j\240\001\240\021\330!#\2401\240D\250\001\330!#\2401\240C\240q\250\001\330\r\021\220\035\230c\240\023\240A\240Q\330\014\022\220*\230A\230Q\330\035 \240\001\240\024\240Q\330\035 \240\001\240\023\240A\240Q\340\010\014\210G\2201\340\014\025\220Z\230q\320 5\260Q\260a\340\010\014\210I\220Q\330\014\030\230\n\240!\2405\250\003\2505\260\001\340\010\037\320\0370\260\001\260\024\260Z\270q\3301<\270A\3301=\270Q\330\010\034\320\034.\250a\250y\270\001\270\021\330\010\016\210i\220q\330\010\017\210q\200A\360B\001\000\t\026\220T\230\021\230!\330\r\016\330\014\026\220d\230&\240\r\250Q\250a\340\010\017\320\017!\240\021\240!\200A\360D\001\000\t\r\210L\230\001\330\010\017\210s\220\"\220J\230a\230v\240Q\200A\360F\001\000\t\r\210L\230\001\330\010\017\210s\220\"\220N\240!\240:\250Q\250a\200A\360H\001\000\t\r\210L\230\001\330\010\017\210s\220\"\220E\230\021\230&\240\001\200A\360J\001\000\t\r\210L\230\001\330\010\017\210s\220\"\220J\230a\230q\200A\360J\001\000\t\020\210t\2207\230!\2304\230w\240k\260\024\260Q\200A\360L\001\000\t\020\210t\2207\230.\250\001\250\027\260\001\260\021\200A\360L\001\000\t\020\210t\220;\230a\230t\240>\260\030\270\021\320\004$\240A\360N\001\000\t\r\210L\230\001\340\0108\270\t\300\021\330\010\017\210\177\320\0365\260Q\260a\340\r\016\330\014\025\220^\2401\330\020$\240A\240V\2504""\250y\270\001\330\010\017\320\017\"\240!\2401\320\000\024\220A\360P\001\000\005\021\320\020\"\240!\2401\340\004\035\230]\250(\260!\2601\340\004\007\200s\210#\210Q\330\010\013\2105\220\001\220\032\2301\230A\330\010\013\210:\220S\230\001\330\014\023\320\023(\250\001\250\021\330\010\035\230Q\230m\2501\340\010\013\2104\210z\230\021\230%\230w\240a\330\014\021\320\021!\240\021\240!\340\010\025\220W\230A\230Q\330\010\013\2105\220\001\220\032\2301\230K\240q\340\004\013\2101\200\001\360\010\000\005&\320%<\270A\270Q\330\004\013\320\013\035\230Q\230i\240q\250\001\200A\360R\001\000\t\r\210G\2201\330\014\022\220$\320\026,\250A\250Q\330\014\022\320\022\"\240!\2405\250\004\250A\330\014\025\220Z\230q\240\006\240a\340\r\016\330\014\026\220n\240A\240T\250\026\250~\270Q\270d\300!\3001\340\010\017\320\017!\240\021\240!\200A\360R\001\000\t\r\210L\230\001\330\010\013\210:\220Q\220i\230q\330\014\026\220b\230\t\240\021\340\010\022\220#\220R\220}\240A\330\014\r\330\014\024\220C\220r\230\034\240Q\240j\260\013\2701\340\010\017\210t\2205\230\001\230\021\200A\360T\001\000\r1\260\004\260I\270T\300\022\300<\310q\340\010\013\210:\220Q\220h\230a\330\014\024\220A\340\014\024\220E\230\021\230!\340\010\013\210<\220s\230%\230y\250\004\250B\250l\270!\330\014\022\220)\2301\230A\340\034%\240Q\240e\2501\330\034\036\230a\230t\2401\340\010\013\210:\220Q\220h\230a\330\014\026\220a\340\014\026\220e\2301\230H\240E\250\021\340\r\016\330\014\026\220n\240A\240T\250\026\250z\270\021\330\020\023\2207\230+\240U\250!\340\010\017\320\017!\240\021\240!\200\001\330\004,\250A\250V\2601\200A\360V\001\000\t\014\210:\220Q\220h\230a\330\014\024\220A\340\014\024\220M\240\021\240!\340\010\013\210:\220Q\220h\230a\330\014\026\220a\340\014\026\220e\2301\230H\240E\250\021\340\r\016\330\014\026\220n\240A\240T\250\026\250z\270\021\330\020\023\2207\230+\240U\250!\340\010\017\320\017!\240\021\240!\200A\360X\001\000\t\r\210G\2201\330\014\022\220$\320\026,\250A\250Q\330\014\022\320\022\"\240!\2405\250\004\250A\330\014\025\220Z\230q\240""\006\240a\340\r\016\330\014\026\220n\240A\240T\250\026\250~\270Q\270d\300!\3001\340\010\017\320\017!\240\021\240!\200A\360X\001\000\t\r\210L\230\001\330\010\017\210s\220\"\220E\230\021\230&\240\001\200A\360X\001\000\t\r\210L\230\001\330\010\017\210s\220\"\220N\240!\320#3\2601\260A\200A\360X\001\000\t\014\210:\220Q\220i\230q\330\014\026\220a\220q\340\010\022\220!\330\010\014\210G\2201\330\014\022\220$\220g\320\035-\250Q\250a\330\014\017\210t\2204\220q\330\020\026\220h\230a\230y\250\001\250\021\330\014\023\2207\230!\2301\340\010\017\210u\220A\330\010\017\210x\220q\340\010\016\210a\330\010\014\210G\2201\330\014\022\220#\220^\2401\240A\340\010\017\210q\200A\360\026\000\t,\320+@\300\001\300\021\340\r\016\330\014\030\230\001\320\0310\260\001\260\031\270!\2701\340\010\017\320\017-\250Q\250a\200A\360\034\000\r!\320 0\260\004\260A\360\006\000\t\014\210:\220Q\220h\230g\240Q\330\014\024\220C\220\177\240a\240w\250a\250q\330\014\017\210v\220S\230\001\330\020\026\220h\230a\230q\330\r\027\220q\230\007\230q\330\014\024\220C\220v\230Q\330\020\025\320\025%\240Q\240g\250T\260\023\260K\270q\340\014\022\220)\2301\230A\340\010\017\320\017!\240\021\240!\200A\360\"\000\r0\320/B\300-\310q\320PQ\360\010\000\t\014\210>\230\035\240c\250\021\330\014\037\230q\340\010\021\320\021)\250\021\250!\330\010\013\2107\220#\220Q\340\014\031\230\035\240a\240q\330\021\022\330\020\032\230.\250\001\330\024%\240Q\320&6\260o\300Q\360\006\000\022\023\330\020\032\230.\250\001\330\024%\240Q\320&6\260a\340\010\017\320\017!\240\021\240!\200A\360\"\000\r0\320/B\300-\310q\320PQ\360\010\000\t\014\210>\230\035\240c\250\021\330\014\037\230q\340\010\023\320\023(\250\001\250\021\330\010\013\2109\220C\220q\340\014\033\230=\250\001\320)<\270A\330\021\022\330\020\032\230.\250\001\320)@\300\001\330\024$\240O\2601\340\021\022\330\020\032\230.\250\001\320)@\300\001\330\024$\240A\330\010\017\320\017!\240\021\240!\200A\340$:\270!\3600\000\t\r\210I\220Q\330\014\r\210Z\220q\230\005\230Q\330\010\013\210<\220w\230a\330\014\020\220""\005\220Q\330\020\035\230Z\240q\250\007\250q\260\001\330\010\013\210;\220g\230Q\330\014\020\220\005\220Q\330\020\034\230J\240a\240q\340\r\016\330\014\022\220.\320 1\260\025\260a\330\020\026\220e\2306\240\026\240}\260F\270#\270Q\330\020\021\340\010\034\320\034.\250a\250q\330\010\016\210i\220q\330\010\017\210q\200A\340\010\017\320\017#\2401\200A\360&\000\r1\3200J\310$\310a\340\r\016\330\014\026\220i\230y\250\001\330\010\017\320\017\"\240!\240>\260\021\260!\200A\330\010\017\320\017 \240\003\2401\240A\200A\330\010\020\220\003\2201\220E\230\023\230A\330\010\017\210t\2209\230G\2401\240D\250\t\260\027\270\001\270\025\270h\300a\200A\330\r\016\330\014\030\230\001\230\032\2401\240F\250$\250f\260A\200A\360\016\000\t\023\220.\240\001\240\021\240!\340\r\016\330\014\030\230\001\230\032\2401\240F\250$\250h\260a\340\010\017\210q\200A\360\016\000\t\034\230=\250\001\250\021\330\r\016\330\014\025\220^\2401\240K\250q\260\017\270q\330\010\017\320\017!\240\021\240!\200A\360\016\000\t\034\230=\250\001\250\021\330\r\016\330\014\025\220^\2401\240L\260\001\260\037\300\001\330\010\017\320\017\"\240!\2401\200A\330\"/\250{\270!\330 +\2501\360L\001\000\t\014\2107\220'\230\025\230d\240%\240w\250a\330\014\022\220*\230A\230Q\340\010\013\2105\220\007\220q\330\014\025\220Q\330\014\020\220\t\230\021\330\020\026\220g\230Q\230a\340\010\013\2106\220\023\220E\230\024\230W\240C\240q\330\014\022\220*\230A\230Q\330\010\013\2106\220\027\230\005\230T\240\027\250\007\250q\330\014\022\220*\230A\230Q\340\010\021\320\021)\250\021\250&\260\001\340\010\021\220\021\220'\230\021\230#\230T\240\025\240a\330\010\014\210G\2201\330\014\026\320\026*\250!\2501\330\014\017\210x\220s\230!\330\020\026\220i\230q\320 6\260a\260s\270!\330\014\024\220J\230a\230q\330\010\013\2106\220\027\230\001\330\014\020\220\010\230\001\330\020\027\220z\240\021\240'\250\021\250!\340\014\020\220\010\230\001\330\020\023\220:\230Q\230f\240A\330\024\037\230u\240B\240a\340\024\037\230q\330\020\030\230\n\240!\2408\2501\340\010\014\210H\220E\230\023""\230C\230r\240\024\240W\250E\260\023\260C\260r\270\021\330\020\030\230\005\230S\240\003\2401\340\014\017\210u\220C\220q\330\020\027\220u\230A\230T\240\026\240q\250\001\340\020\027\220u\230A\230Q\230f\240C\240q\250\007\250v\260Q\260e\2705\300\001\340\010\013\2106\220\027\230\001\360\006\000\r$\320#6\260a\330\020\032\230)\2409\250C\250q\340\014#\240?\260!\330\020\032\230*\240I\250S\260\001\330\010\034\320\034.\250a\250~\270Q\270a\330\010\016\210i\220q\330\010\017\210q\200A\360\024\000\t\033\230)\2401\330\010\032\230)\2401\340\010\017\210{\230!\320\033,\250A\330\010\013\2105\220\007\220q\330\014\030\230\007\230q\240\n\250%\250t\2601\330\014\026\220g\230Q\230h\240e\2504\250q\330\014\025\320\025-\250Q\250a\330\021\022\330\020\034\230N\320*>\270e\3001\330\024\034\320\034-\250Y\260k\300\027\310\013\320ST\340\014\030\230\007\230q\240\001\330\014\026\220g\230Q\230a\330\021\022\330\020\034\230N\320*>\270o\310Q\330\024%\240Y\250k\270\027\300\013\3101\330\010\034\320\034.\250a\320/C\3001\330\010\016\210i\220q\230\005\230Q\330\010\017\210q\200A\360 \000\r\"\240\021\360\006\000\t\024\2201\340\010\023\2201\340\010\021\220\024\320\025,\250A\360\006\000\t\017\320\016-\250Q\250f\260A\340\010\034\230M\320);\2701\270I\300Q\330\r\016\330\014\031\230\036\240q\250\006\250d\260\"\260A\330./\250z\270\032\3001\340\010\013\210;\220b\230\001\330\016\036\230a\230q\240\005\240]\260!\340\010\017\320\017!\240\021\240!\200A\330+@\300\001\330\035+\2501\360`\002\000\t\016\320\r*\250!\330\010\020\220\010\230\t\320!4\260A\330\014\020\220\010\320\030(\250\t\260\032\2708\3001\360\n\000\t\014\2101\330\014\023\320\023%\240]\260%\260r\270\031\300'\310\021\3308@\300\001\340\014\023\2203\220l\240!\2408\2507\260!\200A\360\030\000\r$\240=\260\010\270\001\270\021\360\010\000\t\032\230\021\230(\240!\2401\330\r\016\330\014#\2405\250\001\250\021\330\014\022\220'\230\026\230q\240\006\240h\250a\340\010\017\210q\200A\360,\000\t\031\230\001\330\010\023\2201\340\010\021\220\024\320\025,\250A\340\010\017\210~\230Q\330""\035'\240q\250\010\260\017\270q\340\010\021\220\032\2301\330\010\016\320\016\037\230q\240\001\330\010\016\210o\230Q\340\010\017\210q\200A\360\010\000\t\016\210^\2301\360\010\000\t\025\220A\320\025-\250Q\250d\3202E\300Q\330./\250z\270\021\270!\330\010\017\320\017!\240\021\240!\330\010\021\320\021#\2401\240A\330\010\021\220\023\220A\220U\230$\230d\240$\240g\250V\2604\260v\270T\300\021\330\010\017\210q\200A\340);\2701\360<\000\t\r\210G\2201\330\014\025\220Z\230q\320 5\260Q\260a\340\010\021\320\021)\250\021\250!\340\r\016\330\014\037\230u\240A\330\020\030\230\010\240\013\250<\260q\330\014\022\220$\220b\230\016\240j\260\t\270\024\270R\270u\300A\330\014\024\220F\230!\320\033/\250q\260\001\340\010\034\320\034.\250a\250q\330\010\016\210i\220q\330\010\017\210q\200A\360\022\000\t\021\220\013\2301\320\034-\250Q\330\010\013\2104\210z\230\021\230'\240\021\330\014\022\220)\2301\230A\340\010\013\210:\220Q\220g\230Q\330\014\017\210t\2205\230\005\230W\240A\240T\250\021\330\020\026\220i\230q\240\001\360\006\000\r\026\220Q\340\014\025\220V\2301\230G\2405\250\005\250Q\340\010\013\210:\220Q\220l\240!\330\014\017\210t\220:\230U\240'\250\021\250$\250a\330\020\026\220i\230q\240\001\360\006\000\r\033\230!\340\014\032\230%\230q\240\014\250E\260\025\260a\340\010\r\210Y\320\026+\2501\250A\330\010\r\210^\320\033/\250q\260\001\340\010\022\220+\320\0350\260\001\330\014\023\320\023+\2501\250H\260I\270Q\340\010\025\220U\230!\320\0331\260\021\200A\330+@\300\001\330\035+\320+;\2701\360x\001\000\t\016\320\r*\250!\330\010\020\220\010\230\t\320!4\260A\330\014\r\330\014\023\2201\330\014\033\2301\330\014\025\220Q\330\014\024\220A\330\014\021\220\021\360\n\000\t\014\2101\330\014\023\320\023%\240Q\330\026#\2402\240Y\250g\260\\\300\032\3101\340\014\023\2203\220l\240!\2408\2507\260!\210A\200A\360$\000\t\014\2102\210R\210r\220\023\220B\220c\230\024\230Q\330\014\022\220*\230A\230_\250A\250Q\340\r\016\330\014\"\240.\260\001\330\020\024\220G\2304\230r\320!C\3001\300A\340\010\017\320\017/\250q\260\001\200A\360""\036\000\t\014\2102\210R\210r\220\023\220B\220c\230\024\230Q\330\014\022\220*\230A\230_\250A\250Q\340\r\016\330\014\024\220N\240!\2404\240w\250d\260\"\3204D\300A\300Q\340\010\017\320\017!\240\021\240!\200A\360\026\000\t\"\320!2\260!\330\r\016\330\014\020\220\016\230a\200A\360\016\000\016\017\330\014\020\220\005\220[\240\001\200A\360\010\000\t\020\210|\2303\230a\200A\360\034\000\t\014\2103\210c\220\021\330\014\022\220+\230Q\330\020\021\360\006\000\t\025\220A\220_\240A\240T\250\034\260V\2701\270A\330\010\017\320\017!\240\021\240!\200A\360\010\000\t\014\2103\210c\220\021\330\014\022\220+\230Q\330\020\021\360\010\000\t\025\220A\320\025-\250Q\250d\3202E\300Q\330./\250z\270\021\270!\330\010\017\320\017!\240\021\240+\320-?\270q\300\001\200A\360\010\000\t\014\2103\210c\220\021\330\014\022\220+\230Q\330\020\021\360\n\000\t\025\220A\320\025-\250Q\250d\3202E\300Q\330./\250z\270\021\270!\330./\250q\330\010\020\320\020\"\240!\240;\320.@\300\001\300\021\330\020\"\240!\2401\200A\330\010\021\220\021\200A\330'4\260O\3001\360L\002\000\t\014\2103\210a\210x\220r\230\021\330\014\027\220s\230!\2306\240\021\240!\340\014\027\220q\340\010\013\210:\220Q\220g\230Q\330\023\024\330\014\024\220E\230\021\230!\340<=\330\014\025\220Q\330\014\024\220A\340\010\033\320\033+\2501\250H\260G\2708\3001\330,-\250Q\340\010\020\220\010\230\001\230\023\230A\230Q\330\010\014\210G\2201\330\014\017\210s\220!\2205\230\003\2301\330\020\026\220j\240\001\240\021\330!#\2401\240C\240q\250\t\260\021\260!\330\014\024\220J\230a\230s\240!\340\010\021\320\021#\240=\260\005\260Q\260j\300\001\33067\330\010\016\210i\220q\330\010\017\210q\200A\360\036\000\t\014\2104\320\017 \240\001\240\030\250\021\330\014\022\220)\2301\330\020\021\340\010\023\220?\320\"6\260a\260x\270q\340\r\016\330\014\025\220^\2401\240J\250a\250q\340\010\017\320\017%\240Q\240a\200A\330\010\017\210|\2304\230|\2504\250q\200A\360\034\000\t\014\2104\320\017 \240\001\240\030\250\021\330\014\022\220*\230A\330\020\021\340\010\023\220?\320\"6\260a\260x\270q\340""\r\016\330\014\025\220^\2401\240L\260\001\260\021\340\010\017\320\017\"\240!\2401\200A\360\036\000\t\014\2104\320\017 \240\001\240\030\250\021\330\014\022\220*\230A\330\020\021\340\010\023\220?\320\"6\260a\260x\270q\340\r\016\330\014\026\220n\240A\240[\260\001\260\021\340\010\017\320\017!\240\021\240!\200A\330\010\013\2104\320\017%\240Q\330\014\023\220:\230Q\230c\240\030\250\024\250S\260\001\340\014\023\2201\200A\330\010\013\2104\320\017%\240Q\330\014\023\220:\230Q\230e\2404\240q\340\014\023\2201\200A\330\"#\3604\000\t\014\210:\220W\230A\330\014\020\220\005\220Q\330\020\033\230:\240Q\240g\250Q\250a\340\010\024\220A\220_\240A\320%:\270$\270a\330%2\260!\2601\330\010\017\320\017\"\240!\2401\200A\330\010\013\2104\320\017\037\230q\330\014\023\2201\330\010\t\330\014\017\210t\220:\230S\240\004\240D\250\003\2508\2607\270!\330\020\027\220q\360\006\000\t\020\210q\200A\330\010\017\210|\2304\230q\200A\360\006\000\t\014\2104\210q\330\014\023\2202\220U\230$\230a\230r\240\026\240t\2504\250s\260'\270\031\300!\3001\340\014\023\2201\200A\360\014\000\t\014\2104\210q\330\014\030\230\004\320\0343\2601\330\021\022\330\020\033\230>\250\021\250)\2604\260r\270\025\270a\340\014\030\230\004\320\034.\250a\330\021\022\330\020\033\230>\250\021\250)\2604\260r\270\025\270a\340\010\017\210q\200A\330\010\013\2104\210q\330\014\030\230\001\320\0318\270\001\270\024\270Q\330\010\017\210q\200A\330\010\013\2104\210q\330\014\022\220*\230A\230Q\200A\330\010\013\2104\210q\330\014-\250Q\330\010\013\210:\220S\230\001\340\014\r\330\020\034\230A\230T\240\034\250[\270\005\270Q\330\014\023\320\023%\240Q\330\020\034\230A\330\010\013\210:\220Q\220k\240\021\330\014\017\210y\230\001\360\006\000\021\024\2202\220V\2303\230a\330\024\036\230a\230y\250\001\340\024&\240a\240y\260\001\330'0\260\014\270B\270a\360\n\000\021#\240!\360\010\000\r\037\230a\200A\360\022\000\t\024\2204\220q\340\010\017\210w\220a\220q\330\r\016\330\014\020\220\005\220U\230!\2301\330\020\027\220q\230\005\230^\2501\250D\260\007\260t\2701\330,<\270A""\270Q\330\014\024\220N\240!\330\026(\250\001\250\024\250W\260L\300\004\300A\300Q\340\010\017\320\017!\240\021\240!\200A\360\020\000\016\017\330\014\030\230\001\230\024\230^\2504\250r\260\026\260q\330\010\017\320\017\"\240!\320#9\270\024\270Q\200A\330\010\013\2104\210t\2201\330\021\022\330\020\023\2204\220q\330\024 \240\001\240\024\240]\260$\260b\270\006\270a\340\024 \240\001\240\024\240^\2604\260r\270\026\270q\200A\330\010\013\2104\210t\2201\330\014\022\320\022%\240Q\240a\200A\330!\"\360*\000\t\014\2104\210w\220a\220v\230Q\330\014\022\220)\2301\330\020\021\340\020\026\220a\220t\2301\230A\360\006\000\t\014\2107\220'\230\021\330\014\017\210t\2207\230!\2308\2401\330\020\026\220i\230q\330\024\025\340\024\032\230!\2304\230q\240\001\340\014\030\230\006\320\0361\260\021\340\014\030\230\001\340\010\022\220$\320\026)\250\021\250!\330\010\017\320\017 \320 7\260q\270\001\200A\330\010\017\210|\2304\230w\240d\250!\200A\360&\000\t\014\2104\210w\220g\230S\240\r\250Q\330\014\022\220*\230A\230Q\330\0358\270\001\270\024\270W\300A\330\037 \240\r\250Q\340\010\023\320\023(\250\001\250\021\330\010\023\220>\320!;\2705\300\001\330\014\020\220\t\230\021\340\010\016\320\016\037\230x\240q\250\001\330\010\013\210:\220Q\330\010\017\210q\200A\360\032\000\t\014\2104\210x\220s\230%\230q\330\014\022\220*\230A\330\020\021\330\020\022\220!\2204\220w\320\036.\250a\250u\260G\2701\340\010\013\2104\210t\2201\330\014\017\210t\2209\230C\230u\240A\330\020\026\320\026)\250\021\330\024\025\360\010\000\t\036\230Q\330\r\016\330\014\025\220T\230\027\240\004\240B\240g\250Q\250f\260E\270\027\300\004\300A\330\010\017\210q\200A\360\024\000\t\014\2104\210z\230\021\230#\230Q\330\014\022\220)\2301\320\034<\270A\270T\300\021\300!\330\010\031\230\026\320\037/\250q\260\003\2604\260u\270K\300q\330\010\017\320\017!\240\021\240$\240e\2506\260\021\260!\200A\330\"#\360\026\000\020\021\330\010\013\2104\210z\230\021\230&\240\005\240W\250L\270\005\270W\300A\330\014\022\220)\2301\330\020R\320RS\320SW\320WX\320XY\360\014\000\t\r""\210E\220\023\220A\330\014\023\220:\230Q\230a\330\010\013\210:\220W\230A\330\014\020\220\005\220Q\330\020\033\230:\240Q\240g\250Q\250a\340\010\016\210c\220\021\330\010\016\210c\220\021\360\016\000\t\014\2103\210a\330\014\024\220B\220h\230b\240\005\240Q\330\014\022\220#\220Q\220a\330\014\022\220#\220Q\220a\330\010\021\220\022\2207\230!\2301\230E\240\025\240a\330\010\021\220\022\2208\2301\230H\240F\250&\260\r\270Q\340\010\024\220A\320\025.\250a\320/D\300A\330/2\260'\270\030\300\021\330/<\270A\270Q\330\010\017\320\017-\250Q\250a\200A\330\"#\360\026\000\020\021\330\010\013\2104\210z\230\021\230&\240\005\240W\250L\270\005\270W\300A\330\014\022\220)\2301\330\020R\320RS\320SW\320WX\320XY\360\014\000\t\r\210E\220\023\220A\330\014\023\220:\230Q\230a\330\010\013\210:\220W\230A\330\014\020\220\005\220Q\330\020\033\230:\240Q\240g\250Q\250a\360\006\000\t\022\220\022\2208\2301\230C\230y\250\006\250a\330\010\022\220\"\220H\230A\230S\240\n\250&\260\001\340\010\024\220A\320\025.\250a\320/D\300A\330/2\260'\270\030\300\021\330/8\270\001\330/0\260\001\330\010\017\320\017-\250Q\250a\200A\330*+\360\026\000\020\021\330\010\013\2104\210z\230\021\230%\230v\240Q\330\014\022\220)\2301\330\020+\2501\250D\260\001\260\021\360\014\000\t\r\210E\220\023\220A\330\014\023\220:\230Q\230a\330\010\013\210:\220W\230A\330\014\020\220\005\220Q\330\020\033\230:\240Q\240g\250Q\250a\340\010\021\220\022\2208\2301\230C\230w\240d\250&\260\006\260m\3001\340\010\024\220A\320\025.\250a\320/D\300A\330/2\260'\270\030\300\021\330/<\270A\270Q\330\010\017\320\017-\250Q\250a\200A\360\010\000\t\017\320\016\"\240!\200A\330&5\260Q\330\027\030\360\n\000\t\r\210K\220w\230a\330\010\022\220!\2206\230\021\230!\340\010\023\220?\240!\320#8\270\001\330\010\021\320\021(\250\001\250\021\340\r\016\330\014\020\220\n\230.\250\001\330\020\036\230a\230x\240v\250\\\270\024\270Z\300q\200A\330&5\260Q\360\010\000\t\r\210K\220w\230a\330\010\022\220!\2206\230\021\230!\330\r\016\330\014\020\220\n\230.\250\001\330\020 \240\001\240\030\250\026""\250q\330!%\240Q\200A\360\034\000\t\020\210~\230]\250!\2505\260\004\260A\320\004\034\230A\360\030\000\t\017\320\016\"\240!\200A\360*\000\t\014\2106\220\023\220A\330\014\026\220a\330\r\027\220q\230\007\230q\330\014\017\210u\220F\230#\230S\240\001\330\020\026\220i\230q\320 <\270A\270U\300!\33056\260a\330\014\026\220a\340\014\026\220f\230A\230W\240C\240q\340\010\037\230x\240w\250e\2604\260w\270a\330\010\013\2101\330\014\031\320\031.\250a\250q\340\014\031\230\036\240r\250\033\260C\260~\300Q\330\010\024\220K\320\0371\260\021\260,\270c\300\021\33023\330\r\016\330\014\030\230\001\230\031\240$\240b\250\t\260\021\330\010\017\320\017\"\240!\320#9\270\021\200\001\360\024\000\n\013\330\010\024\220A\220]\240!\2406\250\026\250v\260Q\260a\330\004\013\2101\200A\360\016\000\t\024\220?\320\"6\260a\3207G\300q\330\010\022\320\022&\320&:\270!\330\014\033\2301\360\006\000\016\017\330\014\024\220N\240!\320#4\260A\260Y\270a\340\010\017\320\017!\240\021\240!\200A\360,\000\t\024\220?\320\"6\260a\3207G\300q\330\010\022\320\022&\320&:\270!\330\014\033\2301\360\006\000\016\017\330\014\024\220N\240!\320#:\270!\2709\300A\340\010\017\320\017!\240\021\240!\200A\360\016\000\t\024\220?\320\"6\260a\3207G\300q\330\010\022\220.\320 4\260A\260_\300A\340\r\016\330\014\024\220N\240!\240;\250a\250y\270\001\340\010\017\320\017!\240\021\240!\200A\360,\000\t\024\220?\320\"6\260a\3207G\300q\330\010\022\220.\320 4\260A\260_\300A\340\r\016\330\014\026\220n\240A\320%6\260a\260y\300\001\340\010\017\320\017!\240\021\240!\200A\360*\000\t\024\320\023(\250\001\250\021\330\010\023\220>\320!6\260e\2701\330\014\026\220a\340\010\017\320\017 \240\010\250\001\250\021\330\010\014\210J\220a\330\010\017\210q\200A\360&\000\t\014\2107\220&\230\003\2303\230a\330\014\022\220)\2301\320\0348\270\001\270\027\300\001\33012\260!\340\010\024\220K\320\0370\260\001\260\023\260J\270g\300Q\330\010\034\320\034.\250a\320/D\300A\330\010\016\210i\220q\330\010\017\210q\200A\360\036\000\t%\320$7\260q\270\001\330\010\025\220\\\240\021\240!\200A""\360\030\000\t%\320$7\260q\270\001\330\010\017\210~\230W\320$<\270A\270Q\200A\360\026\000\t%\320$7\260q\270\001\330\010\017\210~\230W\320$<\270A\270Q\200A\360\030\000\t%\320$7\260q\270\001\330\010\025\320\025.\250a\250q\200A\330)8\270\001\360t\001\000\t\020\210|\2301\230D\240\001\330\034$\240A\330\034#\2401\330\034%\240Q\200A\330)8\270\001\360z\001\000\t\020\210|\2301\230D\240\001\330\034$\240A\330\034#\2401\330\034%\240Q\200A\330\036)\320)9\270\021\330+,\360B\001\000\t\020\210u\220A\220U\230%\230v\240U\250&\260\005\260V\270<\300q\330\025!\240\021\200A\360\036\000\t\024\220<\320\0379\270\021\330\014\020\220\r\230T\240\021\330\010\017\210y\230\003\2301\340\r\016\330\014\024\220N\240!\2408\2507\260!\340\010\016\210j\230\001\330\010\013\210?\230!\360\010\000\t\014\210<\320\027-\250Q\250e\2604\260t\2703\270a\330\014\017\320\017&\240a\330\020#\320#D\300A\300Q\340\014\017\320\017 \240\001\240\021\330\010\017\210q\200A\360\020\000\t\025\220A\220T\230\027\240\004\240B\240g\250Q\250a\200A\360\016\000\t\023\220.\240\001\240\021\240!\340\r\016\330\014\030\230\001\230\033\240A\240V\2504\250y\270\001\340\010\017\210q\200A\360\020\000\t\025\220A\220Z\230q\240\006\240d\250!\330 /\250}\270A\270Q\200A\330\010\014\320\014$\240A\330\020\031\230\037\250\003\2503\250i\260|\3001\330\014\020\220\014\230A\330\020\024\220D\230\007\230q\240\006\240i\250v\260Q\330\020\023\2206\230\032\2401\240E\250\030\260\026\260q\33017\260z\300\021\200A\330.A\300\021\330%6\260a\330+,\360@\001\000\t\014\210:\220Q\220i\230q\330\014\017\210u\220G\2301\330\020\026\320\026)\250\021\330\024\025\330\014\027\220q\340\014\017\210q\330\020\033\320\033,\250A\250Y\260f\270F\300!\340\020\033\2305\240\001\240\031\250%\250v\260\\\300\021\340\010\013\210:\220Q\220l\240!\330\014\032\230!\340\014\032\230%\230q\240\014\250L\270\001\340\010\013\2104\210z\230\021\230*\240A\330\014\022\220*\230A\230Q\340\010 \240\001\340\010\016\210f\220A\320\025(\250\001\250\030\260\025\260a\330)4\260I\270T\300\022\3005\310\001\330)*\340\010""\013\2101\330\021\022\330\020\033\230>\250\021\330$/\250q\260\010\270\010\300\001\3300;\2701\340\014\024\220F\230!\320\033/\250q\260\010\270\010\300\001\3300;\2701\340\010\034\320\034.\250a\250q\330\010\016\210i\220q\330\010\017\210q\200A\360\020\000\t\025\220A\220\\\240\021\240&\250\004\250A\330\"1\260\035\270a\270q\200A\360\014\000\t\022\220\024\320\025,\250A\330\r\016\330\014\023\220>\240\021\240&\250\004\250B\250h\260a\340\010\017\210q\200A\360&\000\t\024\320\023&\320&:\270!\330\014\024\220A\360\006\000\016\017\330\014\027\220~\240Q\320&=\270Q\270a\340\010\017\320\017 \240\010\250\001\250\021\330\010\014\210J\220a\330\010\017\210q\200A\360\010\000\t\016\320\r!\240\021\360\010\000\t\025\220A\320\025-\250Q\250d\3202E\300Q\330./\250z\270\021\270!\330\010\017\320\017!\240\021\240!\330\010\021\320\021#\2401\240A\330\010\r\210V\2206\230\024\230T\240\026\240t\2501\330\010\021\220\031\230\"\230D\240\004\240E\250\025\250g\260V\2704\270q\360\014\000\t\014\2104\210q\330\014\022\220/\240\021\330\010\017\210q\200A\360\010\000\t\016\320\r!\240\021\360\n\000\t\025\220A\320\025-\250Q\250d\3202E\300Q\330./\250z\270\021\270!\330./\250q\340\010\017\320\017!\240\021\240!\330\010\021\320\021#\2401\240A\330\010\022\320\022$\240A\240Q\330\010\021\220\031\230\"\230D\240\004\240D\250\t\260\031\270&\300\004\300A\330\010\017\210q\200A\360&\000\t\024\320\023&\320&:\270!\330\014\024\220A\360\006\000\016\017\330\014\036\230n\250A\320-?\270q\300\001\340\010\017\210|\2308\2401\240A\330\010\014\210E\220\021\220!\330\010\017\210q\200A\360\020\000\t\025\220A\220[\240\001\240\026\240t\2501\330!0\260\r\270Q\270a\200A\360\022\000\016\017\330\014\020\220\010\230\004\230B\230g\240Q\240a\240q\330\010\017\320\017!\240\021\240!\200A\330\010\017\210}\230D\240\001\200A\330\010\017\210}\230D\240\014\250D\260\001\200A\330\010\017\320\017$\240D\250\r\260T\270\021\330$(\250\014\260D\270\001\200A\330\010\017\210}\230D\240\r\250T\260\035\270d\300!\200A\360\022\000\t/\320.E\300T\310\021\330\010\017\210y\320\030+""\2501\200A\360\024\000\t/\320.E\300T\310\021\330\010\017\210y\320\030+\2501\200A\330<=\330\035\036\360>\000\t\r\210E\220\021\330\014\023\220:\230Q\230a\330\010\013\2104\210q\330\014\031\230\022\2308\2401\240A\330\010\014\210E\220\021\330\014\030\230\n\240!\2401\330\010\013\210:\220W\230A\330\014\020\220\005\220Q\330\020\033\230:\240Q\240g\250Q\250a\360\006\000\t\014\2105\220\n\230!\2309\240F\250(\260!\330\020\032\230!\230:\240V\2501\330\014\022\220)\2301\330\020.\250a\250t\2601\260J\270a\270t\3001\300A\330\010\013\2103\210a\210x\220s\230#\230Q\230g\240R\240q\330\014\022\220*\230A\320\0350\260\001\260\023\260A\260Q\340\010\013\2103\210a\210y\230\003\2303\230a\230q\330\014\022\220*\230A\320\0350\260\001\260\023\260A\260Q\340\010\013\2103\210a\210q\220\001\220\026\220s\230\"\230D\240\005\240Q\330\014\022\220*\230A\230Q\340\010\013\2103\210a\210q\220\001\220\026\220s\230\"\230D\240\005\240Q\330\014\022\220*\230A\230Q\340\010\021\220\021\220\"\220H\230A\230U\240&\250\006\250d\260'\270\021\330\010\022\220!\2202\220X\230Q\230e\2406\250\026\250t\2607\270!\340\010\024\220A\320\025.\250a\320/D\300D\310\001\330/7\260y\300\001\330/=\270Q\330/0\260\001\330\010\017\320\017-\250Q\250a\200A\330;<\360,\000\t\r\210E\220\021\330\014\023\220:\230Q\230a\330\010\013\210:\220W\230A\330\014\020\220\005\220Q\330\020\033\230:\240Q\240g\250Q\250a\360\006\000\t\022\220\022\2208\2301\230H\240F\250!\330\010\022\220\"\220H\230A\230Y\240f\250A\330\010\013\2106\220\026\220s\230!\330\014\022\220*\230A\230Q\340\010\013\2107\220&\230\003\2301\330\014\022\220*\230A\230Q\360\006\000\t\025\220A\320\025.\250a\320/D\300A\330/5\260X\270Y\300a\330/<\270A\270Q\330\010\017\320\017-\250Q\250a\200A\360,\000\016\017\330\014\030\230\004\230F\240/\260\021\330\010\017\320\017!\240\021\240!\200A\330\010\014\210F\220!\200A\330,-\360F\001\000\t\016\320\r*\250!\330\010\017\210w\220k\320!3\2601\330\014\r\330\014\033\2301\340\010\021\220\021\330\010\014\210F\220)\2303\230a\230w\240a\330\014\022\220'\230\021\230%\230q\240""\006\240a\330\010\017\210v\220Q\220h\230a\200\001\360 \000\t\"\240\033\250A\320-F\300a\330\010\037\230{\250!\320+B\300!\360\006\000\005\014\210=\230\005\230S\240\003\2404\240}\260M\300\021\330\010\016\210j\230\001\230\021\330\004\017\320\017%\240Q\240m\260:\270[\310\001\330\004\013\320\013!\240\021\240!\200\001\360\010\000\005\r\210A\330\004\014\210G\2201\220F\230,\240a\330\004\007\200v\210W\220E\230\024\230Q\330\010\022\220!\330\010\027\220q\340\010\027\220q\330\004\007\200q\330\010\017\320\0173\2604\260q\270\007\270{\310'\320QR\340\010\017\320\0173\2604\260q\270\007\270{\310!\200\001\360\010\000\005\r\210A\330\004\014\210G\2201\220F\230,\240a\330\004\007\200v\210W\220E\230\024\230Q\330\010\022\220!\330\010\027\220q\340\010\027\220q\330\004\007\200q\330\010\017\320\017)\250\024\250Q\250g\260[\300\007\300q\340\010\017\320\017)\250\024\250Q\250g\260[\300\001\200A\360\022\000\t\r\210I\220Q\330\014\020\220\007\220q\230\001\200A\360 \000\t\021\220\004\220I\230Q\330\010\017\210u\220J\230c\240\021\200A\330\010\014\210I\220V\2301\200A\360\036\000\t\r\210L\230\001\330\010\035\230[\250\001\250\021\340\r\016\330\014\025\220^\2401\240D\250\003\2505\260\001\260\024\260Q\330\010\017\320\017!\240\021\240!\200A\360\010\000\t\r\210L\230\001\340\010\021\320\021+\2501\330\014\031\230\024\230W\240D\250\002\250%\250q\330\014\020\220\007\220t\2302\230U\240!\200A\360\006\000\t\r\210L\230\001\330\010\022\220!\2204\220t\2307\240$\240a\330\010\017\320\017$\240I\250T\260\021\200A\330\010\014\210L\230\001\330\010\017\320\017+\2504\250z\270\024\270Q\200A\330\010\014\210L\230\001\340\010\013\2109\220C\220q\330\014\025\220V\230=\250\001\250\021\330\r\021\220\027\230\004\230B\230k\250\021\360\006\000\r\026\320\0252\260!\330\020\035\230T\240\027\250\004\250B\250e\2601\330\020\024\220G\2304\230r\240\025\240a\340\014\025\220T\230\033\240A\330\010\017\210|\2301\200A\330\010\014\210L\230\001\330\010\014\210L\230\001\200A\360\026\000\t\r\210L\230\001\340\010\034\230O\2501\250F\260$\260a\330\010\017""\210q\200A\360$\000\t\r\210L\230\001\360\010\000\t\035\230O\2501\250F\260$\260a\330\010\017\210q\200A\360*\000\t\r\210L\230\001\360\010\000\t\035\230O\2501\250F\260$\260a\330\010\017\210q\200A\360\010\000\t\r\210L\230\001\360\n\000\t\032\320\031-\250Q\250a\330\r\016\330\014\026\220n\240A\330\020-\250V\260?\300.\320PQ\330\010\017\320\017!\240\021\240!\200A\360 \000\t\r\210L\230\001\330\010\022\220#\220R\320\027.\250c\260\021\330\010\017\210s\220\"\220N\240!\2407\250!\2507\260!\200A\360>\000\t\r\210L\230\001\340\r\016\330\014\025\220T\230\023\230E\240\021\240&\250\005\250Q\330\010\017\210y\230\001\230\030\240\025\240a\320\004,\250A\360\034\000\t\r\210L\230\001\330\010\021\220\021\330\014\021\320\021!\240\021\330\014\020\220\t\230\024\230[\250\001\250\036\260q\340\010\017\210}\230A\230X\240U\250&\260\001\260\024\260Q\200A\330\010\014\210L\230\001\330\010\017\210q\330\r\037\230q\240\004\240I\250T\260\022\2605\270\002\270$\270a\200A\360 \000\t\r\210L\230\001\330\010\017\210s\220\"\220E\230\021\230&\240\001\200A\360,\000\t\r\210L\230\001\330\010\017\210s\220\"\220G\2301\230A\200A\360\010\000\t\r\210L\230\001\330\010\017\210s\220\"\220I\230Q\230a\200A\360.\000\t\r\210L\230\001\330\010\017\210s\220\"\220I\230Q\230a\200A\360\010\000\t\r\210L\230\001\330\010\017\210s\220\"\220J\230a\230q\200A\360@\001\000\t\r\210L\230\001\330\010\017\210s\220\"\220J\230a\230q\200A\360\034\000\t\r\210L\230\001\330\010\017\210s\220\"\220J\230a\230v\240Q\200A\360\022\000\t\r\210L\230\001\330\010\017\210s\220\"\220N\240!\320#3\2601\260A\200A\360\022\000\t\r\210L\230\001\330\010\017\210s\220\"\220N\240!\240:\250Q\250a\200A\360\020\000\t\r\210L\230\001\330\010\017\210s\220\"\220N\240!\240:\250Q\250a\200A\360\024\000\t\r\210L\230\001\330\010\r\210\\\230\021\330\010\017\210t\2203\220g\230Q\230f\240E\250\021\200A\360\020\000\t\r\210L\230\001\330\010\017\210t\2207\230$\230b\240\014\250A\200A\330\010\014\210L\230\001\330\010\017\320\017\037\230t\2409\250D\260\001\200A\330\010\014\210L\230\001\330\010""\017\210u\220A\220W\230E\240\033\250C\250r\260\024\260Q\200A\330\010\014\210L\230\001\330\010\017\210u\220M\240\021\240!\2406\250\033\260A\260[\300\001\200A\360\014\000\t\r\210M\230\021\340\010\013\2104\210q\330\014\025\220T\320\031+\2501\330\021\022\330\020\034\230A\230V\2404\240r\250\026\250q\200A\330\010\014\210M\230\021\330\010\013\2104\210t\2201\340\014\022\220'\230\021\230!\200A\330\010\014\210M\230\021\330\010\013\2104\210t\2201\330\014\022\220'\230\021\230!\200A\330\010\014\210M\230\021\330\010\017\210q\200A\330\010\014\210M\230\021\330\010\017\210t\2201\200A\330\010\014\210M\230\021\330\010\017\210t\2207\320\032*\250!\200A\330\010\014\210M\230\021\330\010\017\210t\2207\230$\230b\320 0\260\001\200A\330\010\014\210N\230!\330\010\t\330\014\023\2204\220{\240,\250a\250u\260G\2701\330\017\020\330\014\023\2204\220t\2304\230|\2501\250A\200A\330\010\014\210N\230!\330\010\t\330\014\023\2204\220{\240-\250q\260\001\330\017\020\330\014\023\2201\200A\330\010\014\210N\230!\330\010\013\2104\210q\330\014\023\2204\320\0271\260\021\260!\340\014\023\2201\200A\340\010\014\210N\230!\330\010\013\2107\220!\2207\230!\330\014\023\2207\230!\2307\240!\330\010\017\210w\220a\220w\230d\240\"\240A\200A\360\016\000\t\r\210N\230!\330\010\013\210:\220Q\220c\230\031\240$\240c\250\024\250V\2601\330\"&\240c\250\024\250V\2601\330\014\023\2203\220a\330\010\017\210s\220!\200A\330\010\014\210N\230!\330\010\017\210t\2201\200A\330\010\014\210N\230!\330\010\017\210t\2208\2302\230X\240Q\200A\330\010\014\210N\230!\330\010\017\210t\220<\230r\240\030\250\021\200A\330\010\014\210N\230!\330\010\017\210z\230\021\230%\230t\2401\200A\330:P\320P[\320[\\\360\\\002\000\r\"\320!8\270\001\270\021\340\010\023\2207\230!\2309\240E\250\021\330\010\021\220\027\230\001\230\027\240\005\240Q\330\010\022\220'\230\021\230!\340\010\021\320\021)\250\021\250&\260\001\340\010\013\2105\220\007\220q\330\021\022\330\020\026\220n\240A\330\"4\260A\330\030\034\230J\240h\250c\260\021\260$\260f\270C\270q\300\004\300G\3103\310a\310t\320S""Z\320Z[\340\021\022\330\020\026\220n\240A\330\"-\250Q\330\030 \240\003\2401\240D\250\006\250c\260\021\260$\260g\270S\300\001\300\024\300W\310A\330\010\034\320\034.\250a\250q\330\010\016\210i\220q\330\010\017\210q\200A\330:P\320P[\320[\\\360\\\002\000\r\"\320!8\270\001\270\021\340\010\023\2207\230!\2309\240E\250\021\330\010\021\220\027\230\001\230\027\240\005\240Q\330\010\022\220'\230\021\230!\340\010\021\320\021)\250\021\250&\260\001\340\010\013\2105\220\007\220q\330\021\022\330\020\026\220n\240A\330'9\270\021\330\030\034\230J\240h\250c\260\021\260$\260f\270C\270q\300\004\300G\3103\310a\310t\320SZ\320Z[\340\021\022\330\020\026\220n\240A\330'2\260!\330\030 \240\003\2401\240D\250\006\250c\260\021\260$\260g\270S\300\001\300\024\300W\310A\330\010\034\320\034.\250a\250q\330\010\016\210i\220q\330\010\017\210q\320\004A\300\037\320PQ\360d\002\000\t\r\210L\230\001\330\010\013\2109\220C\220q\330\014\027\220q\330\010\013\2109\220C\220q\330\014\027\220q\330\010\017\210t\2202\320\025(\250\001\250\026\250t\2601\330)6\260j\300\001\330)4\260L\300\001\200A\330\010\017\320\017!\240\024\240Q\200A\330&:\270+\300Q\360~\001\000\t\023\220'\230\021\230!\340\010\021\320\021)\250\021\250&\260\001\340\010\013\2105\220\007\220q\330\014\017\210z\230\027\240\001\330\020\026\220j\240\001\240\021\330\021\022\330\020.\320.@\300\001\330\024\033\230;\240d\250*\260A\340\014\017\210z\230\023\230A\330\020\026\220j\240\001\240\021\330\014\031\230\031\240!\330\021\022\330\020.\250k\270\021\330\024\033\230;\240l\260!\330\010\034\320\034.\250a\250~\270Q\270a\330\010\016\210i\220q\330\010\017\210q\200A\360\034\000\020\021\330\010\020\220\005\220Q\320\0268\270\001\330\010\017\210t\2206\230\021\230!\200A\330\010\025\220Q\330\014\034\230D\240\001\330\014\035\230T\240\021\330\014\021\220\024\220Q\330\014\033\2304\230q\340\010\017\210|\320\033+\2501\200A\360\014\000\t\022\220\034\230Q\330\010\014\210E\220\025\220a\220t\2309\240E\250\021\330\014\022\220$\220i\230t\2401\240A\330\014\017\210t\2207\230!\330\020\026""\220a\220w\230d\240)\2506\260\021\260!\330\010\017\210q\200A\360\022\000\t\r\320\014\035\230Q\340\010\014\210H\220A\330\014\020\220\006\220a\220q\200A\360\020\000\t\014\210:\220Q\320\026&\240a\330\014\020\220\014\230A\230Q\330\r\027\220q\320\030(\250\001\330\014\020\220\014\230A\230Q\340\014\022\220*\230A\230T\240\021\240!\200A\360\036\000\t\021\220\005\220Q\330\014\r\330\014\033\230;\240a\340\010\022\220$\220g\320\0350\260\001\260\027\270\001\270\021\330\010\013\2107\220%\220s\230#\230Q\330\014\023\2201\330\r\024\220E\230\023\230B\230a\330\014\024\220E\230\021\230!\330,-\330\014\023\2201\340\014\023\320\023%\240Q\240g\250Q\250a\200A\360\032\000\t\r\320\014\035\230Q\330\010\021\220\024\320\025'\240q\340\010'\240{\260!\2601\340\r\016\330\014\030\230\001\230\026\230t\2402\240\\\260\021\260!\330\010\017\210s\220$\220b\230\005\230Q\200A\360\022\000\t\021\220\005\220Q\220a\3301@\300\013\3101\330\010\017\210t\220>\240\021\240!\200A\360:\000\t\026\320\025-\250Q\250a\330\r\016\330\014\026\220d\230&\240\t\250\021\250!\340\010\017\320\017!\240\021\240!\200A\360\030\000\020\021\330\010\020\220\005\220Q\220a\340\010\017\210t\220:\230S\240\001\200A\360&\000\t\014\210:\220Q\220c\230\021\330\014\033\2306\240\021\240&\250\001\340\014\022\220)\2301\230A\200A\360\010\000\t\014\210:\220Q\220d\230'\240\021\330\014\034\230D\240\007\320'=\270Q\270a\340\014\017\210s\220!\220?\240#\240Q\330\020\026\220h\230a\230y\250\001\250\021\330\021\024\220A\220_\240B\240a\330\020\026\220h\230a\330\024\035\230Q\230k\250\021\250#\250Q\250a\340\020\027\220}\240A\240Q\330\r\027\220q\230\003\2301\330\014\023\2201\340\014\022\220)\2301\230A\200A\360:\000\t\014\210:\220Q\220d\230'\240\021\330\014\032\230$\320\036.\250a\250q\330\014\017\210|\2302\230Q\330\020\026\220h\230a\230y\250\001\250\021\340\020\027\220t\2307\240!\2401\330\r\027\220q\230\003\2301\330\014\023\2204\220w\230a\230q\340\014\022\220)\2301\230A\320\004$\240A\330\010\013\210:\220Q\220f\230A\330\014\023\2201\220A\340\010\014\210J\220a\330\010""\014\210H\220A\330\010\014\320\014\034\230A\200A\360\016\000\t\023\220.\240\001\240\021\240!\340\r\016\330\014\030\230\001\230\034\240Q\240f\250D\260\n\270!\340\010\017\210q\200A\360\030\000\t\014\210:\220Q\220h\230g\240Q\330\014\020\220\010\230\004\230B\230g\240Q\240g\250Q\250a\330\r\023\2203\220e\2303\230d\240&\250\001\250\021\330\014\020\220\010\230\004\230B\230k\250\021\340\014\022\220)\2301\230A\200A\360 \000\t\014\210:\220Q\220i\230q\330\014\036\230h\240h\250c\260\025\260a\330\r\027\220q\230\t\240\021\330\014\036\230o\250X\260^\3005\310\001\340\014\022\220)\2301\330\0207\260q\270\007\270q\340\010\013\2104\210~\230T\240\022\2407\250!\2506\260\024\260Q\330+8\270\004\270A\330\014\022\220)\2301\330\0200\260\001\260\021\330\020\033\2301\230D\320 4\260A\260W\270A\340\010\013\210:\220Q\220i\230q\330\014\023\320\023%\240Q\330\020\024\220I\230Z\240q\330\024\030\230\013\2408\2508\2601\340\014\023\320\023-\250Q\330\020\024\220I\230Z\240q\330\024\030\230\013\240?\260(\270!\200A\360,\000\t\014\210:\220Q\220m\2401\330\014 \240\010\250\014\260G\2702\270T\300\022\320CZ\320Z[\330\r\027\220q\230\r\240Q\330\014 \240\017\250|\2707\300!\340\014\022\220)\2301\330\020\021\330\0207\260q\270\004\270A\270Q\360\006\000\016\017\330\014\026\220n\240A\240T\250\023\250G\2601\260A\330\010\017\320\017!\240\021\240!\200A\360*\000\t\014\210:\220Q\220m\2401\330\014 \240\010\250\014\260G\2702\270T\300\022\320CZ\320Z[\330\r\027\220q\230\r\240Q\330\014 \240\017\250|\2707\300!\340\014\022\220)\2301\330\020\021\330\0207\260q\270\004\270A\270Q\360\006\000\016\017\330\014\026\220n\240A\240T\250\026\250w\260a\260q\330\010\017\320\017!\240\021\240!\200A\330*+\360T\001\000\t\014\2103\210a\210s\220(\230\"\230A\330\014\022\220*\230A\330\020\021\330\010\013\2102\210U\220!\2203\220h\230c\240\021\330\014\022\220*\230A\230Q\330\010\013\210:\220W\230A\330\014\017\210t\220:\230Q\230k\250\021\330\020\026\220i\230q\240\001\330\014\017\210s\220!\220;\230c\240\023\240A\240S\250\006\250a\250q\330\020\026\220j\240\001""\330\0250\260\001\260\023\260A\260Q\330\0258\270\001\270\023\270A\270S\300\006\300a\300q\360\006\000\r\020\320\017!\240\021\330\020\026\220i\230q\240\001\340\010\027\220q\230\002\230&\240\001\240\023\240J\250h\260a\260u\270A\330\010\013\210;\220a\220s\230#\230Q\330\014\022\220*\230A\230Q\360\006\000\t\026\320\025%\240Q\240c\250\021\330\010\020\220\002\220%\220q\230\003\2308\2401\330\010\021\220\022\2206\230\021\230%\230v\240Q\340\010\017\210~\230]\250!\330\014\036\230a\230|\2505\260\001\260\021\330\037)\250\021\330\037+\250;\260a\260t\2702\270Q\330\014\036\230l\250!\2508\2605\270\001\270\023\270E\300\021\200A\360\032\000\016\017\330\014\025\220T\230\030\240\024\240R\240w\250a\250v\260U\270(\300$\300a\330\010\017\210q\200A\360(\000\t\023\220/\240\024\240T\250\026\250q\260\001\330\010\013\2107\220#\220Q\330\014\023\320\023%\240Q\240a\330\010\016\210h\220a\320\0278\270\001\270\021\200A\360\010\000\016\017\330\014\030\230\001\230\024\230W\240D\250\002\250&\260\001\200A\360\036\000\016\017\330\014\030\230\001\230\024\230W\240D\250\002\250)\2601\260A\260Q\340\010\013\2105\220\004\220C\220s\230!\330\014\022\220!\340\010\017\320\017!\240\021\240!\200A\360\"\000\016\017\330\014\"\240.\260\001\260\024\260W\270D\300\002\300)\3101\340\010\013\320\013\036\230f\240D\250\003\2503\250a\330\014\022\220!\340\010\017\320\017/\250q\260\001\200A\360\022\000\016\017\330\014\030\230\001\230\024\230W\240D\250\002\250(\260\"\260F\270!\2701\270A\330\010\017\320\017!\240\021\240!\200A\340\010\017\210~\230X\240Q\240a\200A\340>^\320^_\3602\000\t\034\2305\240\016\320.E\300Q\330\014'\240q\330\014.\250a\200A\330\010\017\320\017!\240\024\240_\260D\270\001\200A\330\010\016\210a\200A\360*\000\t\022\220\024\320\025&\240a\340\010\021\220\031\230!\2301\330\010\022\220&\230\001\330\010\016\210f\220G\2304\230r\240\035\250a\340\r\016\330\014\031\230\036\240q\250\006\250d\260\"\260E\270\021\270)\3001\340\010\017\210q\200A\340\010\016\210a\200A\360<\000\t\020\210\177\230a\320\0374\260A\330\r\016\330\014\027""\220t\2307\240-\250q\260\004\260G\2701\340\010\017\320\017\"\240!\2401\320\000$\240A\330\004\t\320\t&\240a\330\004\013\2108\320\023%\240Z\250q\330\004\013\210?\230!\2306\240\032\2501\200A\360\020\000\t\017\210a\330\010\035\230Q\230d\240)\2504\250r\260\025\260b\270\004\270D\300\001\330\010\017\210q\200A\360\016\000\t\022\220\024\320\025&\240a\330\r\016\330\014\031\230\036\240q\250\006\250d\260\"\260M\300\021\340\010\023\2201\330\010\013\210:\220T\230\023\230C\230q\330\014\020\220\005\220U\230!\230:\240T\250\022\2505\260\001\330\020\030\230\001\230\031\240!\240:\250T\260\022\2604\260q\270\001\330\024\036\230d\240\"\240F\250!\2501\330\010\017\210q\200A\340(>\270a\330 !\360&\000\t\020\210u\220M\240\021\240*\250D\260\001\330\"#\240=\260\017\270q\330\".\250a\200A\340(>\270a\330 !\360&\000\t\020\210u\220M\240\021\240$\240d\250!\330\"#\240=\260\017\270q\330\".\250a\200A\330\"/\250\177\270a\360`\002\000\r\030\220v\230S\240\001\240\021\340\010\033\320\033+\2501\250H\260G\2708\3001\330,-\250Q\340\010\017\210x\220q\230\001\330\010\014\210H\220A\330\014\017\210z\230\021\230&\240\001\330\020\027\220z\240\021\330\024\037\230\177\250a\330\031!\240\025\240a\360\006\000\022\034\2301\230F\240!\330\020\027\220z\240\022\240?\260%\260q\340\020\026\220i\230q\240\004\240A\240Q\340\010\021\320\021#\2407\250%\250q\260\n\270!\330\010\016\210i\220q\330\010\017\210q\200A\360\032\000\r-\320,?\320?a\320ab\330\020\024\220H\230D\240\002\240&\250\004\250A\330\0142\3202E\320E`\320`a\320ae\320ef\360\006\000\016\017\330\014\026\220n\240A\240V\250;\260a\260q\330\010\017\320\017\"\240!\2401\200A\360\034\000\r\037\320\036.\250a\250q\330\014\035\230Q\340\r\016\330\014\025\220^\320#5\260W\270A\270X\300Q\340\010'\320'7\260q\330\010\016\210h\220a\330\010\016\210o\230Q\330\010\016\210o\230Q\330\010\016\320\016 \240\001\320!=\270Q\330\010\016\320\016%\240Q\320&F\300a\330\010\016\210j\230\001\340\010\017\210q\200A\330\010\017\320\017\"\240$\240a\240t\2506\260\021\200A\360\010\000\t\017\210d\220!\330\010\013\2104""\210s\220!\330\014\023\2201\330\010\024\220D\230\005\230Z\240q\330\010\017\210q\220\001\220\026\220s\230$\230e\2403\240f\250A\250Q\200A\360\014\000\t\n\330\014&\240d\250.\270\004\270A\330\010\016\320\016\"\240!\2401\200A\360\014\000\t\n\330\014&\240d\250.\270\004\270A\330\010\016\320\016$\240A\240Q\200A\330\010\021\320\021&\240d\250.\270\004\270A\330\010\017\210v\320\025+\2501\200A\360\020\000\t\017\210d\220%\220{\240!\330\010\017\210w\220d\230#\230W\240A\200A\360\036\000\t\024\220<\320\037:\270!\330\014\020\220\016\230d\240!\330\010\017\210y\230\003\2301\340\r\016\330\014\024\220N\240!\2408\2507\260!\340\010\016\210j\230\001\330\010\013\210?\230!\330\010\013\320\013\035\230Q\230a\330\010\017\210q\210A\330\020\026\220f\230A\200A\360\024\000\t\017\210g\220Q\220a\330\010\017\210q\220\002\220$\220c\230\025\230d\240&\250\003\2503\250b\260\003\2601\200A\360\022\000\t\037\230g\240X\250Q\250a\340\r\016\330\014\022\220+\230T\240\021\240.\260\001\260\024\260W\270D\300\001\3301A\300\021\340\010\013\2106\220\030\230\024\230S\240\003\2401\330\014\022\220!\340\010\017\210q\200A\340\030\031\330\027\030\330()\330 !\330&'\330 !\330%&\330\035\036\330%&\330!\"\330\026\027\330\036\037\330\037 \330 !\330\031\032\330-.\360h\004\000\t\027\220a\330\014\021\220\021\330\014#\2401\330\014\033\2301\330\014!\240\021\330\014\033\2301\330\014 \240\001\330\014\030\230\001\330\014 \240\001\330\014\021\220\021\330\014\031\230\021\330\014\032\230!\330\014\034\230A\330\014(\250\001\340\010\017\210t\220;\230a\230y\250\013\2601\330\037/\250q\330\037,\250A\200A\360\010\000\t&\320%:\270$\270h\300d\310!\330\010\017\320\017\"\240!\2402\240[\260\002\260/\300\021\200A\360:\000\016\017\330\014\026\220n\240A\240T\250\026\250}\270A\270Q\340\010\017\320\017!\240\021\240!\200A\360\014\000\016\017\330\014\026\220n\240A\240T\250\024\250Y\260a\340\010\017\320\017\"\240!\2401\200A\360\n\000\016\017\330\014\026\220n\240A\240T\250\024\250Y\260a\340\010\017\320\017\"\240!\2401\320\000 \240\004\240A\360@\001\000\005\031""\230\010\240\010\250\001\250\021\330\004\026\220n\240J\250e\2601\260L\300\001\330\004\007\200u\210A\210Q\330\004\013\2101\200A\330,-\360n\001\000\t\r\210I\220Q\330\014\025\220Z\230q\240\005\240Q\340\010\013\2107\220#\220Q\330\014\017\210y\230\005\230S\240\003\2401\330\020\026\220j\240\001\240\021\340\014\027\220y\240\001\240\022\2404\240r\250\027\260\001\340\014\027\220v\230Q\340\r\016\330\014\026\220n\240A\330\026(\250\001\250\032\2604\260q\270\001\340\010\017\320\017!\240\021\240!\200A\360\024\000\t\020\320\017\037\230q\240\001\200A\360\034\000\r\033\230-\240q\250\001\330\r\016\330\014\030\230\001\320\0310\260\001\330\020\024\220I\320\0351\260\021\200A\360\016\000\t\022\220\036\230q\240\n\250!\2501\330+8\270\001\270\021\330\010\017\320\017%\240Q\240a\200A\360\010\000\t\020\210q\200A\360\024\000\t\020\210q\200A\360\020\000\t\020\210q\200A\360\032\000\t\032\230\026\320\037/\250q\260\003\2604\260q\330\010#\320#=\270Q\330\014\020\220\006\220g\230Q\230a\330\010\016\210i\220t\2307\240!\2406\250\021\330\010\017\210q\200A\330\010\017\210q\330\010\013\2104\210q\330\014\020\220\005\220Y\230d\240)\2506\260\021\330\020\030\230\003\230:\240Q\240a\330\020\030\230\003\230:\240Q\240a\340\010\017\210u\220B\220e\2301\230H\240E\250\033\260A\200A\360\032\000\t\032\230\026\320\037/\250q\260\003\2604\260q\330\010\034\320\034.\250a\250t\2606\270\027\300\001\300\021\330\010\016\210i\220t\2307\240!\2406\250\021\330\010\017\210q\200A\360\030\000\t\032\230\026\320\037/\250q\260\003\2604\260w\270k\310\021\330\010\017\320\017!\240\021\240$\240g\250V\2601\260A\200A\330\010\017\210q\200A\360\"\000\r\033\230-\240q\250\001\360\010\000\t\022\320\021)\250\021\250!\330\010\013\2107\220#\220Q\340\014\031\230\035\240a\240q\330\021\022\330\020\032\230.\250\001\250\033\260A\330\024\"\240'\250\037\270\001\340\021\022\330\020\032\230.\250\001\250\033\260A\260^\3001\33056\330\010\017\320\017!\240\021\240!\200A\360\"\000\r\033\230-\240q\250\001\360\010\000\t\024\320\023(\250\001\250\021\330\010\013\2109""\220C\220q\340\014\033\230=\250\001\320)<\270A\330\021\022\330\020\032\230.\250\001\320):\270!\330\024\"\240'\250\037\270\001\340\021\022\330\020\032\230.\250\001\320):\270!\330\024\"\240'\250\021\330\010\017\320\017!\240\021\240!\200A\360\026\000\t\022\220\036\230q\240\014\250A\250T\260\021\330\010\017\210v\220^\2406\250\021\200A\360\034\000\r\033\230-\240q\250\001\360\010\000\016\017\330\014\027\220~\240Q\320&=\270Q\330\020$\240A\340\010\017\320\017 \240\010\250\001\250\021\330\010\014\210J\220a\330\010\017\210q\200A\330+,\360\"\000\t\032\230\026\230q\240\010\250\002\250#\250V\2606\270\023\270A\270Z\300r\310\027\320PQ\330\010\017\320\017!\240\035\250a\250v\260V\2701\330/9\270\030\300\021\200\001\360\024\000\n\013\330\010\024\220A\320\025'\240q\250\006\250e\2609\270A\270Q\330\004\013\2101\200\001\360\010\000\005\006\330\r\016\330\014\030\230\001\230\033\240A\330\010\017\210q\330\013\014\330\010\017\210q\200A\360>\000\t\023\220%\220q\340\r\016\330\014\031\230\036\240q\250\004\250G\2609\270A\270S\300\001\340\010\017\320\017\"\240!\2401\200A\360<\000\t\023\220%\220q\340\r\016\330\014\031\230\036\240q\250\004\250G\2609\270A\270S\300\001\340\010\017\320\017\"\240!\2401\320\000\024\220A\360\026\000\005\010\200q\330\010\017\210q\220\007\220q\230\010\240\007\240q\340\010\017\210q\220\007\220q\230\001\200A\330\010\017\320\017\037\230q\330\014\020\220\007\220t\230;\240d\250(\260$\260a\200A\360(\000\t\020\210s\220\"\320\024(\250\001\250\021\200A\360&\000\t\020\210s\220\"\320\024&\240a\240q\200A\330-.\360\036\000\t\020\210s\220,\230a\230v\240[\260\001\260\025\260j\300\001\200A\360\026\000\t\020\210t\220>\240\027\250\001\200A\330\010\017\210t\2201\200A\360,\000\t\020\210t\2203\220g\230Q\230f\240E\250\021\200A\360\022\000\t\020\210t\2204\220w\230a\230v\240U\250!\200A\360\n\000\t\020\210t\2205\320\030(\250\001\200A\330\010\017\210t\2205\230\001\200A\360\n\000\t\020\210t\2205\320\030.\250a\200A\330\010\017\210t\2206\230\021\320\004\034\230A\360\026\000\t\020\210t\2207\230)\2401""\240A\200A\330\010\017\210t\2207\230#\230Q\200A\360\024\000\t\020\210t\2208\2304\230r\240\027\250\001\250\025\250g\260R\260t\2702\270Q\270a\200A\360\024\000\t\020\210t\2209\230D\240\001\240\021\200A\360\024\000\t\020\210t\2209\230F\240!\2401\200A\360\024\000\t\020\210t\2209\230G\2401\240F\250%\250q\200A\330\010\017\210t\320\0230\260\004\260O\3004\320G_\320_`\200A\360 \000\t\020\210t\220=\240\001\240\021\200A\360(\000\t\020\210t\220<\320\0372\260!\2607\270!\2701\200A\360\010\000\t\020\210t\220:\230Q\200A\360>\000\t\020\210t\220<\230~\250Q\250g\260Q\260a\200A\360\030\000\t\020\210t\220:\230R\230y\250\001\200A\360$\000\t\020\210t\220:\230R\230y\250\001\200A\360\010\000\t\020\210t\220;\230e\2401\240D\250\001\200A\360*\000\t\020\210u\220A\320\025(\250\001\250\037\270\001\270\021\200A\330\010\017\210u\220A\220W\230E\240\033\250C\250r\260\024\260Q\200A\330\010\017\210u\220A\220^\2405\250\013\2603\260b\270\004\270A\200A\330\010\017\210u\220A\220]\240%\240{\260#\260R\260t\2701\200A\330\010\017\210v\220Q\200A\330\010\017\210w\220a\200A\330\010\017\210w\220d\230,\240d\250!\200A\360\010\000\t\020\210w\220e\2301\230B\230a\230s\240!\240=\260\001\200A\330\010\017\210x\220t\2301\200A\330\010\017\210x\220t\2301\230G\2404\240w\250d\260!\200A\330\010\017\210x\220t\2307\240$\240g\250T\260\033\270D\300\001\200A\330\010\017\210x\220t\230=\250\004\250A\200A\330\010\017\210y\230\004\230A\200A\330\010\017\210y\230\004\230A\230Q\200A\330\010\017\210y\230\004\230A\230W\240D\250\001\200A\360:\000\t\014\210<\220y\240\004\240B\240l\260#\260S\270\001\330\014\022\320\022%\240Q\240a\330\r\016\330\014\035\230^\2501\330\034,\250A\250\\\270\021\330\010\017\320\017!\240\021\240!\200A\330\010\017\210y\230\004\230F\240$\240d\250!\200A\330\010\017\210y\230\004\230O\2504\250|\2704\270q\200A\360(\000\t\020\210y\230\001\230\024\230S\240\t\250\021\250!\200A\360\032\000\t\020\210y\230\001\230\024\230T\240\031\250!\2501\320\000\024\220A\360$\000\005\010\200z\220\021\220)\2307\240!\330\010\013\2105\220\007\220u""\230D\240\004\240F\250%\250w\260a\260q\330\014\025\220V\2305\240\001\240\021\330\010\017\210q\340\010\017\210u\220A\220X\230U\240!\200A\360b\001\000\t\020\210t\2208\2301\230D\320 6\260a\260q\200A\360d\001\000\t\014\210:\220Q\220h\230f\240A\330\014\020\220\010\230\001\330\020\027\220z\240\021\240'\250\021\250!\330\r\027\220q\230\007\230q\330\014\036\230a\330\014\020\220\006\220l\240%\240v\250Q\330\020\032\230$\230g\320%;\2701\270A\340\020\023\2204\220q\330\024\032\230(\240!\2409\250A\250Q\340\020\024\220I\230Q\330\024#\2401\240I\250Q\340\014\020\220\005\220U\230!\2304\230q\330\020\033\230?\250$\250a\250s\260$\260m\3001\300A\330\020\027\220z\240\021\240'\250\021\250!\340\014\022\220)\2301\320\034?\270q\300\004\300A\300Q\340\r\016\330\014\026\220n\240A\240T\250\026\250~\270Q\270d\300!\3001\340\010\017\320\017!\240\021\240!\200A\360d\001\000\t\014\210:\220Q\220h\230f\240A\330\014\020\220\010\230\001\330\020\027\220z\240\021\240'\250\021\250!\330\r\027\220q\230\007\230q\330\014\036\230a\330\014\020\220\006\220l\240%\240v\250Q\330\020\032\230$\230g\320%;\2701\270A\340\020\023\2204\220q\330\024\032\230(\240!\2409\250A\250Q\340\020\024\220I\230Q\330\024#\2401\240I\250Q\340\014\020\220\005\220U\230!\2304\230q\330\020\027\220z\240\021\240'\250\021\250/\270\024\270Q\270c\300\024\300W\310A\310R\310q\340\014\022\220)\2301\320\034?\270q\300\004\300A\300Q\340\r\016\330\014\026\220n\240A\240T\250\026\250~\270Q\270d\300!\3001\340\010\017\320\017!\240\021\240!\200A\360r\001\000\r1\260\004\260I\270T\300\022\300<\310q\340\010\013\210:\220Q\220h\230a\330\014\024\220A\340\014\024\220E\230\021\230!\340\010\013\210<\220s\230%\230y\250\004\250B\250l\270!\330\014\022\220)\2301\230A\340\034%\240Q\240e\2501\330\034\036\230a\230t\2401\340\010\013\210:\220Q\220h\230a\330\014\026\220a\340\014\026\220e\2301\230H\240E\250\021\340\r\016\330\014\026\220n\240A\240T\250\026\250z\270\021\330\020\023\2207\230+\240U\250!\340\010\017\320\017!\240\021\240!\200A\360r\002\000\t\032\230\021\330\010\014\210H""\220A\340\014\017\210s\220!\2206\230\023\230A\330\020\030\230\007\230q\330\020\026\220a\340\020\030\230\006\230f\240A\340\014\017\210t\220:\230Q\230i\240v\250Q\330\020\031\230\021\230!\340\014\017\210s\220!\2204\220w\230b\240\002\240$\240d\250$\250k\270\021\270!\330\020\027\220x\230r\240\021\330\014\017\210s\220!\2204\220w\230c\240\022\2404\240t\250;\260a\260q\330\020\027\220t\2301\230A\340\014\032\230(\240$\240d\250+\260Q\260n\300D\310\001\310\021\330\014\017\210s\220!\2208\2303\230a\330\020\034\230A\340\020\034\230C\230u\240A\240X\250R\250t\2602\260Q\330\014\032\230'\240\022\2408\2506\260\025\260a\340\010\017\210t\2202\220Z\230q\330\014\020\220\t\320\031)\250\024\250W\260L\300\004\300A\200A\360t\001\000\t\014\210:\220Q\220h\230a\330\014\024\220A\340\014\024\220M\240\021\240!\340\010\013\210:\220Q\220h\230a\330\014\026\220a\340\014\026\220e\2301\230H\240E\250\021\340\r\016\330\014\026\220n\240A\240T\250\026\250z\270\021\330\020\023\2207\230+\240U\250!\340\010\017\320\017!\240\021\240!\320\004-\320-C\3001\330 !\330\010\014\210L\230\001\330\010\r\320\r*\250!\330\010\r\320\r\037\230q\330\014\025\220V\2301\330\014\034\230A\330\014\031\230\021\330\010\017\210q\320\004+\320+C\320C`\320`a\360H\002\000\t\r\210L\230\001\360\010\000\r!\320 7\260q\270\001\340\010\031\320\031-\250Q\250a\330\r\016\330\014\027\220~\240Q\330\020.\250f\260O\3009\310A\310Q\330MX\320XY\330\010\017\320\017\"\240!\2401\320\004*\320*D\300A\330'@\300\001\360,\000\r<\2709\300A\340\010\017\210z\230\021\330\010\017\320\017$\240A\330\010\017\320\017&\240a\330\010\017\320\017'\240q\330\010\017\320\017%\240Q\340\r\016\330\014\030\230\001\330\020\033\2301\330\024\032\230$\230a\330\024\025\330\024\025\220Q\360\010\000\t\020\210y\230\001\230\030\240\025\240a\200\001\360D\001\000\005\032\230\031\240(\250!\2501\340\004\r\210^\230;\240e\2501\340\004\007\200u\210A\210Q\340\004\013\2101\320\000E\300Q\360T\001\000\t \230{\250!\320+B\300!\330\010\037\230{\250!\320+B\300!\330\010\035\230^\2508\2601\260A\360\006\000\005""\010\200{\220$\220a\330\010\023\220<\230|\2501\330\010\024\220M\240\035\250a\340\010\016\210i\220q\230\001\340\004\r\210V\2201\320\024'\240q\250\013\2601\330(3\260:\270X\300S\310\001\330\004\007\200u\210A\210Q\330\004\013\2101\320\004:\270!\360F\002\000\t\r\210L\230\001\330\010\013\210:\220Q\220f\230C\230r\240\021\330\014\023\2204\220r\230\036\240q\250\006\250a\340\014\023\2203\220b\230\007\230q\240\006\240f\250A\320\000F\300a\330\004\007\200{\220$\220e\2303\230a\330\010\017\210q\330\t\023\2201\220F\230!\330\010\017\210q\340\010\017\320\017\037\230q\240\001\200\001\360\n\000\t\033\230*\240H\250A\250Q\330\004\010\210\005\210Q\320\016\"\240!\330\004\013\2101\200\001\360\024\000\t\033\230*\240H\250A\250Q\330\004\010\210\005\210Q\320\016\037\230q\330\004\013\2101\200\001\360\020\000\t\033\230*\240H\250A\250Q\330\004\020\220\001\320\021'\240q\250\001\250\021\330\004\010\210\005\210Q\210a\330\004\013\2101\320\000!\240\021\330\004\024\220H\230D\240\007\240t\2501\320,K\3108\320ST\330\010\023\2206\230\023\230D\240\n\250$\250a\330\t\027\220~\320%6\260a\340\004\007\200w\210a\210|\2306\240\021\330\010\020\320\020#\2401\240L\260\001\340\010\020\320\020 \240\001\240\034\250Q\340\004\007\200t\2101\330\010\016\320\016!\240\021\240#\240Q\240a\340\004\013\2101\320\004@\300\001\360H\001\000\t\020\210t\220:\230T\240\022\2407\250!\2506\260\025\260a\330+,\200\001\360J\001\000\005\021\320\020\"\240!\2401\340\004\007\200z\220\023\220A\330\010\017\320\017#\2401\240A\340\004\034\230L\250\010\260\001\260\021\340\004\007\200u\210A\210Y\220a\220q\330\004\030\230\001\230\035\240a\340\004\013\2101\320\000\027\220|\240=\260\001\360J\004\000\005\010\200z\220\021\220'\230\030\240\024\240W\250C\250q\330\010\021\220\021\330\010\020\220\001\340\004\007\200z\220\021\220'\230\026\230q\330\010\017\210{\230,\240a\240v\250V\2607\270'\300\021\330'0\260\001\330\t\023\2201\220F\230!\330\010\013\2106\220\027\230\001\330\014\022\220*\230A\330\020\021\330\010\017\210{\230,\240a\240v\250W\260H\270I\300Q\330\t\020""\220\001\220\026\220q\330\010\013\2107\220'\230\021\330\014\037\230v\320%8\270\001\340\014\037\230q\330\010\030\320\030(\250\004\320,E\300Q\300a\330\010\020\220\013\320\0339\270\021\320:J\310!\330\010\013\2107\220'\230\025\230d\240%\240x\250s\260!\360\006\000\r\025\220E\230\025\230a\230q\330\010\017\210q\330\t\020\220\001\220\026\220q\330\010\013\2107\220'\230\021\330\014\037\230v\320%8\270\001\340\014\037\230q\330\010\030\320\030(\250\004\320,>\270a\270q\330\010\020\220\013\320\0332\260!\3203C\3001\330\010\013\2107\220'\230\025\230d\240%\240x\250s\260!\360\006\000\r\025\220E\230\025\230a\230q\330\010\017\210q\340\t\024\220N\240!\2401\330\010\017\210{\230,\240a\240v\250W\260A\360\006\000\t\017\210i\220q\230\001\320\000\032\230!\360L\001\000\t\035\320\0343\2601\260A\340\004\010\210\t\220\021\330\010\013\2104\210z\230\021\230'\240\021\330\014\022\220)\2301\230A\330\034\"\240!\2404\240q\250\001\330\010\020\220\n\230!\320\033/\250q\260\001\340\t\n\330\010\031\230\036\240q\250\013\2601\260J\270a\340\004\013\320\013\035\230Q\230a\320\004\031\230\021\360\"\000\t\r\210L\230\001\330\010\022\220#\220R\220}\240A\330\014\r\330\014\024\220C\220r\230\034\240Q\240j\260\002\260$\260k\300\021\340\010\017\210t\2205\230\001\230\021\320\004!\240\032\320+@\300\001\360,\000\t\r\210L\230\001\330\010\017\210s\220\"\220F\230!\2306\240\027\250\007\250u\260L\300\001\320\004:\270!\360|\001\000\t\r\210L\230\001\330\010\017\210s\220\"\220G\2301\230F\240&\250\001\320\000\020\220\014\230M\250\037\270\001\360f\003\000\005\010\200z\220\021\220'\230\030\240\024\240W\250C\250q\330\010\021\220\021\330\010\020\220\001\340\004\007\200z\220\021\220'\230\026\230q\330\010\017\210u\220L\240\001\240\026\240v\250W\260G\2701\330!*\250!\330\t\023\2201\220F\230!\330\010\013\2106\220\027\230\001\330\014\022\220*\230A\330\020\021\330\010\017\210u\220L\240\001\240\026\240w\250h\260i\270q\330\t\024\220N\240!\2401\330\010\013\2106\220\027\230\005\230S\240\t\250\027\260\001\330\014\022\220*\230A\330\020\021\340\010""\017\210u\220L\240\001\240\026\240w\250h\260i\270q\330\t\020\220\001\220\026\220q\330\010\013\2106\220\027\230\005\230S\240\t\250\027\260\001\330\014\022\220*\230A\330\020\021\340\010\013\2107\220'\230\021\330\014\030\230\006\320\0361\260\021\340\014\030\230\001\330\010\022\220$\320\026)\250\021\250!\330\010\021\320\021\"\320\"9\270\021\270!\330\010\020\220\006\220i\230q\330\010\013\2107\220'\230\025\230d\240%\240x\250s\260!\360\006\000\r\025\220E\230\025\230a\230q\330\010\017\210q\330\t\020\220\001\220\026\320\027,\250C\250w\260a\260v\270Q\330\010\013\2106\220\027\230\005\230S\240\t\250\027\260\001\330\014\022\220*\230A\330\020\021\340\010\020\220\014\230A\230V\2401\330\010\017\210u\220M\240\021\240!\2401\340\010\016\210i\220q\330\014\r\320\000\"\240!\360N\001\000\t\035\320\0343\2601\260A\340\004\010\210\017\220q\330\010\027\220z\240\021\240+\250Q\340\t\n\330\010\037\230~\250Q\330\014$\240A\320%6\260a\340\004\013\320\013\035\230Q\230a\320\000\030\230\001\360N\002\000\t\035\320\0343\2601\260A\330\010\031\230\021\360\010\000\005\010\200t\210:\220Q\220g\230Q\330\010\020\220\006\220a\220w\230l\250!\340\004\020\220\t\230\026\230w\240a\330\t\n\330\010\022\220.\240\001\330\014\037\230q\240\006\240k\260\030\270\021\360\006\000\005\014\320\013\035\230Q\230a\320\004)\250\021\360P\001\000\t\r\210L\230\001\330\010\017\210|\2301\230F\240&\250\014\260A\320\004=\270Q\360\"\000\r!\320 0\260\004\260A\340\014 \320 7\260q\270\001\340\010\013\210:\220Q\220h\230g\240Q\330\014\030\230\004\230E\320!1\260\021\260!\330\014\017\210z\230\022\2301\330\020\026\220h\230a\230q\330\r\027\220q\230\007\230q\330\014\030\320\030(\250\001\250\027\260\004\260C\260{\300!\340\014\022\220)\2301\230A\340\010\020\220\016\230a\230s\320\"4\260A\260[\300\001\330\010\017\320\017!\240\021\240!\320\000\025\220Q\360:\000\005\023\220!\2201\340\004!\320!1\260\021\330\004\010\210\006\210a\210v\220Q\330\004\013\2101\200\001\330\004\n\210+\220Q\200\001\360\014\000\005\031\230\005\230Q\320\036:\270!\320\004\035\230Q""\360\020\000\t\017\320\016\"\240!\320\004)\320)=\270Q\360 \000\t\034\2304\230w\240j\260\001\330\014 \240\001\330\014!\240\021\340\010\020\220\n\230!\2304\230q\240\005\240\\\260\021\260!\330\010\021\220\021\220!\330\010\013\2101\330\014\022\220'\230\021\230!\330\014\020\220\005\220U\230%\230t\240>\260\021\330\020\026\220g\230Q\330\024\026\220a\220t\2306\240\021\240\"\240H\250A\250T\260\027\270\001\270\022\270:\300Q\300g\310S\320P_\320_`\330\014\017\210}\230B\230d\240!\330\020\026\220g\230Q\230a\330\010\017\210t\2205\230\001\230\021\320\004\033\230:\240Q\360*\000\t\014\2107\220\"\220A\330\014\022\220*\230A\230Q\340\010\013\2107\220#\220Q\330\014\025\220^\2401\240O\2601\260D\270\t\300\021\340\014\025\220^\2401\240O\2601\260D\270\t\300\021\33045\330\010\017\320\017\"\240!\2401\320\004\033\230:\240Q\360&\000\t\014\2107\220\"\220A\330\014\022\220*\230A\230Q\340\010\024\220A\220S\230\001\230\027\240\001\330\010\013\2107\220#\220Q\330\014\025\220T\230\023\230F\240!\2401\340\014\017\210w\220b\230\001\330\020\026\220j\240\001\240\021\330\014\025\220T\230\023\230F\240!\2408\2501\340\010\017\320\017!\240\021\240!\320\004\033\230:\240Q\360^\001\000\t\014\2107\220\"\220A\330\014\022\220*\230A\230Q\340\010\024\220A\220S\230\001\230\027\240\001\330\010\013\2107\220#\220Q\330\014\025\220T\230\036\240v\250Q\250a\340\014\025\220T\230\036\240v\250Q\250h\260a\340\010\017\320\017)\250\021\250!\320\004\033\230:\240Q\360\\\001\000\t\014\2107\220\"\220A\330\014\022\220*\230A\230Q\340\010\024\220A\220S\230\001\230\027\240\001\330\010\013\2107\220#\220Q\330\014\025\220T\230\026\230v\240Q\240a\340\014\025\220T\230\026\230v\240Q\240h\250a\340\010\017\320\017!\240\021\240!\320\004-\250Q\360\036\000\r!\320 7\260q\270\001\330\014!\320!1\260\024\260Q\340\r\016\330\014\025\220^\2401\240D\250\010\260\001\260\021\340\010\017\210q\320\020\"\240!\2405\250\004\250G\2601\320\004%\240Q\360\032\000\t\r\210L\230\001\330\010\022\220#\220R\220|\2401\240L\260\001\330\010\017\210s\220\"\220N\240!\240;\250a\250w""\260a\320\004%\240Q\360<\000\t\r\210L\230\001\330\010\022\220#\220R\220|\2401\240L\260\001\330\010\017\210s\220\"\220N\240!\240;\250a\250w\260a\320\004=\270Q\360&\000\t\r\210L\230\001\330\010\017\210s\220\"\220G\2301\230F\240!\330\0344\260A\320\004=\270Q\360\024\000\t\024\220?\240!\320#?\270q\330\010\021\320\021(\250\001\250\021\340\r\016\330\014\030\230\001\230\024\230W\240D\250\001\330\031*\250!\2506\260\025\260i\270q\320\004\035\230Q\360\022\000\t\020\210t\2207\230*\240A\240Q\320\000\025\220Q\360,\000\005\010\320\007\027\220w\230a\330\010\030\230\017\240q\340\010\030\230\001\230\021\340\004\007\200z\220\021\220%\220q\330\010\022\220!\330\r\016\330\014\025\220^\2401\240J\250a\330\020\026\220g\230X\240T\250\025\250a\340\010\022\220!\2205\230\007\230q\240\001\330\r\016\330\014\025\220^\2401\240J\250a\250x\260t\2704\270q\340\004\013\320\013\036\230a\230q\200\001\360(\000\005\016\210Q\330\004\007\200w\210c\220\021\330\010\020\220\001\330\010\013\2101\330\014\024\220D\230\001\230\027\240\001\240\022\2405\250\001\330\010\014\210E\220\021\330\014\020\220\001\220\023\220A\220V\2302\230S\240\t\250\025\250d\260'\270\021\330\014\022\220'\230\021\230!\330\010\017\210s\220,\230a\230x\240w\250i\260q\340\010\013\210:\220Q\220h\230a\330\014\020\220\005\220V\2301\330\020\024\220A\220S\230\001\230\026\230r\240\023\240I\250U\260$\260g\270Q\330\020\026\220g\230Q\230a\340\014\023\2203\220l\240!\2408\2507\260(\270)\3001\340\014\022\220)\2301\230A\200\001\360&\000\005\016\210Q\330\004\007\200w\210c\220\021\330\010\020\220\001\330\010\014\210C\210u\220G\2306\240\021\330\014\021\220\027\230\001\230\021\330\014\022\220'\230\021\230'\240\021\240!\330\010\017\210s\220,\230a\230x\240w\250i\260q\330\t\023\2201\220H\230A\330\010\014\210I\220Q\330\014\r\330\020\024\220G\2301\230E\240\021\330\023\024\330\020\021\330\024\030\230\007\230q\240\007\240q\250\005\250Q\330\027\030\330\024\036\230g\240U\250!\330\024\036\230a\230r\240\024\240U\250&\260\007\260s\270\"\270G\3001\330\024\032\230(\240!\330""\030\031\330>?\330\036\037\230t\2405\250\001\250\021\340\014\022\220'\230\021\230'\240\021\240#\240U\250%\250q\340\010\017\210s\220,\230a\230x\240w\250h\260i\270q\340\010\016\210i\220q\230\001\200\001\360\022\000\005\036\230Q\230d\240!\320\004\033\230:\240Q\360l\001\000\t\014\2107\220\"\220A\330\014\022\220*\230A\230Q\340\010\024\220A\220S\230\001\230\027\240\001\330\010\013\2107\220#\220Q\330\014\025\220T\230\026\230v\240Q\240a\340\014\025\220T\230\026\230v\240Q\240h\250a\340\010\017\320\017!\240\021\240!\320\004-\250Q\360p\001\000\t\r\210L\230\001\360\006\000\r!\320 7\260q\270\001\340\r\016\330\014\030\230\016\240a\240t\2506\260\030\270\021\270!\340\010\017\320\017!\240\021\240!\320\004-\250Q\360z\001\000\t\r\210L\230\001\360\006\000\r!\320 7\260q\270\001\340\r\016\330\014\030\230\016\240a\240t\250>\270\030\300\021\300!\340\010\017\210q\320\020*\250!\2505\260\004\260G\2701\320\004 \240\001\330\010\r\210R\210y\230\001\230\021\330\010\014\210J\220a\200\001\360\006\000\005\006\330\004\007\200~\220S\230\001\330\010\t\330\023\024\330\014\034\230A\330\010\017\210\177\230a\330\014\034\230C\230q\240\001\340\004\007\200~\220W\230A\330\010\016\210k\230\021\330\014\r\330\014E\300Q\300a\200\001\360$\000\005\016\210T\320\021#\2401\340\t\n\330\010\024\220A\330\014\027\220q\230\006\230f\240F\250&\260\004\260A\330\030\031\320\031*\250!\2501\340\004\013\320\013\033\2302\230Q\200\001\360\010\000\005\016\210T\320\021%\240T\320)=\270T\320AR\320RV\320Vd\320dh\320h{\320{\177\360\000\000@\002S\002\360\000\000S\002W\002\360\000\000W\002j\002\360\000\000j\002n\002\360\000\000n\002}\002\360\000\000}\002A\003\360\000\000A\003J\003\360\000\000J\003N\003\360\000\000N\003j\003\360\000\000j\003n\003\360\000\000n\003{\003\360\000\000{\003\177\003\360\000\000\177\003L\004\360\000\000L\004P\004\360\000\000P\004\\\004\360\000\000\\\004`\004\360\000\000`\004s\004\360\000\000s\004w\004\360\000\000w\004@\005\360\000\000@\005D\005\360\000\000D\005L\005\360\000\000L\005P\005\360\000\000P\005a\005\360""\000\000a\005e\005\360\000\000e\005k\005\360\000\000k\005o\005\360\000\000o\005x\005\360\000\000x\005|\005\360\000\000|\005F\006\360\000\000F\006J\006\360\000\000J\006d\006\360\000\000d\006h\006\360\000\000h\006u\006\360\000\000u\006y\006\360\000\000y\006D\007\360\000\000D\007H\007\360\000\000H\007I\007\330\004\014\210G\2201\220F\230,\240a\330\004\007\200v\210W\220E\230\024\230Q\330\010\022\220!\330\010\027\220q\340\010\027\220t\320\033.\250g\260U\270#\270T\320AT\320T[\320[`\320`c\320cg\320gw\320w~\360\000\000\177\001D\002\360\000\000D\002G\002\360\000\000G\002K\002\360\000\000K\002X\002\360\000\000X\002_\002\360\000\000_\002d\002\360\000\000d\002g\002\360\000\000g\002k\002\360\000\000k\002}\002\360\000\000}\002D\003\360\000\000D\003I\003\360\000\000I\003L\003\360\000\000L\003P\003\360\000\000P\003b\003\360\000\000b\003i\003\360\000\000i\003n\003\360\000\000n\003q\003\360\000\000q\003u\003\360\000\000u\003G\004\360\000\000G\004N\004\360\000\000N\004S\004\360\000\000S\004V\004\360\000\000V\004Z\004\360\000\000Z\004b\004\360\000\000b\004i\004\360\000\000i\004n\004\360\000\000n\004q\004\360\000\000q\004u\004\360\000\000u\004P\005\360\000\000P\005W\005\360\000\000W\005\\\005\360\000\000\\\005_\005\360\000\000_\005c\005\360\000\000c\005j\005\360\000\000j\005q\005\360\000\000q\005v\005\360\000\000v\005y\005\360\000\000y\005}\005\360\000\000}\005M\006\360\000\000M\006T\006\360\000\000T\006Y\006\360\000\000Y\006\\\006\360\000\000\\\006`\006\360\000\000`\006e\006\360\000\000e\006l\006\360\000\000l\006q\006\360\000\000q\006t\006\360\000\000t\006x\006\360\000\000x\006A\007\360\000\000A\007H\007\360\000\000H\007M\007\360\000\000M\007P\007\360\000\000P\007T\007\360\000\000T\007`\007\360\000\000`\007g\007\360\000\000g\007l\007\360\000\000l\007o\007\360\000\000o\007s\007\360\000\000s\007}\007\360\000\000}\007D\010\360\000\000D\010E\010\330\004\007\200q\330\010\017\320\017/\250t\2601\260G\270;\300g\310Q\340\010\017\320\017/\250t\2601\260G\270;\300a\200\001\360V\001\000\t\035\230M""\250\030\260\021\260!\340\004\007\200z\220\021\220,\230a\330\010\021\220\025\220a\220x\230q\330\t\023\2201\220L\240\001\330\010\021\220\021\340\010\016\210i\220q\230\001\340\004\r\210V\2201\320\024&\240a\240v\250Q\330\004\007\200u\210A\210Q\330\004\013\2101\320\004!\240\032\320+@\300\001\360Z\001\000\t\r\210L\230\001\330\010\017\210s\220\"\220F\230!\2306\240\027\250\007\250u\260L\300\001\230!\220\021\240\021\240\001\200\001\330\004\022\220!\200\001\360\036\000\005\021\220\001\320\021(\250\001\250\021\200\001\360&\000\005\014\210>\230\021\230!\200\001\360(\000\005\014\210>\230\021\230!\200\001\360$\000\005\014\210>\230\021\230!\200\001\360>\000\005\014\210>\230\021\230!\200\001\360,\000\005\014\210>\230\021\230!\200\001\360\030\000\005\014\210>\230\021\230!\200\001\360\034\000\005\014\320\013\"\240!\200\001\330\004 \240\001\240\021\320\000\036\230a\3600\000\005\010\200z\220\021\220&\230\001\330\010\013\2105\220\010\320\030+\2501\330\014\022\220*\230A\320\0352\260!\2601\340\010\013\2105\220\003\2201\330\014\023\2201\330\r\022\220#\220Q\330\014\023\2201\340\014\022\220*\230A\320\0352\260!\2601\340\004\007\200u\210C\210q\330\010\017\210|\2301\230N\250!\340\010\017\210{\230!\230>\250\021\320\004.\250a\3604\000\t\026\220[\240\001\240\021\330\010\033\2301\330\010\017\210t\2205\230\007\230q\240\006\240j\260\010\270\001\320\000\036\230a\360N\001\000\005\t\210\n\220!\330\010\013\2104\210z\230\021\230(\240!\330\014\022\220)\2301\320\0343\2601\260D\270\001\270\021\330\010\021\220\032\2301\320\0341\260\021\260!\340\004\020\320\020*\250!\2501\340\004\013\320\013\036\230a\330\010\026\220a\220|\2401\240K\250q\320\004&\240a\360`\001\000\t\024\220;\320\0360\260\001\260\024\260Q\340\010\013\210>\230\027\240\001\330\014\024\220D\230\002\230.\250\001\250\021\340\010\023\320\023'\320'M\310Q\330\014\r\330\010\021\320\021\"\240(\250!\2501\330\010\016\210j\230\001\330\010\017\210q\230a\200\001\360 \000\005\006\330\004\036\230a\200\001\360\n\000\005\036\320\035.\250a\330\004\013\2104\320""\017\037\230q\320\004!\240\021\360\026\000\r\"\240\021\360\006\000\t\022\220\024\320\025&\240a\340\010\013\2107\220#\220Q\330\014\017\210t\2204\220q\340\020\027\220y\240\001\240\024\240U\250!\330\014\027\220t\2305\240\003\2402\240T\250\025\250a\340\014\027\220q\340\r\016\330\014\025\220^\2401\240F\250$\250b\260\013\2701\270A\340\010\017\320\017\"\240!\2401\320\004&\240a\360*\000\t\r\210L\230\001\330\010\013\2103\210c\220\021\330\014\022\220+\230Q\330\020\021\330\010\013\2101\330\014\022\220*\230A\330\020\021\360\016\000\t\022\220\034\230Q\340\r\016\330\014\030\230\001\330\020+\2501\330\024\025\330\024\030\230\001\330\024\025\330\024\025\220Q\360\014\000\t\022\320\021#\2401\240A\340\010\013\210:\220Q\220h\230a\330\014\025\220R\220u\230A\230V\2401\240O\2606\270\021\270!\340\010\017\210q\320\004.\250a\360 \000\t\r\210L\230\001\330\010\022\220#\220R\320\027/\250q\260\001\330\010\017\210s\220\"\220N\240!\320#8\270\001\270\027\300\001\320\000\036\230a\360\020\000\005\033\320\032-\250Q\320\004+\320+>\270a\360.\000\r&\240Q\340\010\024\220K\230q\240\001\330\010\020\220\t\230\024\230Q\340\010\032\230$\230h\240d\250\"\320,=\270Q\330\014\021\220\025\220d\230%\230u\240A\360\006\000\t\014\2101\330\014\024\320\0243\2601\260F\270!\330\014\034\230M\320);\2701\270I\300Q\340\014\026\220o\240Q\330\020!\240\034\250]\270*\300A\340\014\034\230G\2407\250$\250b\260\r\270Q\340\r\016\330\014\034\230N\250!\330\020\024\220G\2302\230Y\240a\330\024\031\230\025\230a\330\024\031\230\025\230a\330\024\025\330\024\025\360\010\000\t\014\2101\330\016\036\230a\230q\240\007\240}\260A\330\014\023\320\023%\240Q\240a\340\014\023\2207\230!\2301\330\014\023\2201\320\000\036\230a\360<\000\005\032\230\021\230.\250\001\330\032\033\230:\240Q\240a\340\004\013\320\013!\240\021\330\010\033\2301\230D\240\001\240\033\250D\260\001\260\021\200\001\360&\000\005\031\230\016\240a\240~\260Q\260d\270'\300\021\300!\330\004\013\320\013\035\230Q\230a\320\004>\270a\360\014\000\r\"\240\021\360\006\000\t\022\220\024\320\025&\240a""\340\010\026\220l\240#\240Q\340\010\013\2104\210w\220a\320\027'\240q\330\014\025\220T\230\021\320\032*\250!\340\014\r\360\006\000\r\026\220Q\340\014\r\360\006\000\t\r\210E\220\021\220!\360\010\000\t\017\210k\230\026\230q\240\001\330\010\013\2104\210s\220!\330\014\022\220+\230Q\320\0363\2601\260A\340\010#\2401\330\010%\240Q\340\010\t\330\014\r\330\025\026\330\024!\240\036\250q\330\030\036\230d\240\"\240E\250\021\250/\270\021\340\020\037\230q\360\006\000\021\024\220;\230c\240\021\330\024\025\340\020\032\320\0324\260A\260]\300!\33056\360\006\000\021\027\220f\230A\230Q\340\014\020\220\001\220\021\330\014\023\2201\320\000\027\220{\240!\360(\000\t'\240a\340\004\007\200u\210G\2205\230\004\230D\240\n\250!\2506\260\022\2601\330\010\017\210r\220\026\220q\230\006\230f\240A\340\004\n\210.\230\001\230\036\240q\250\010\260\006\260a\330\004\013\320\013!\240\021\240!\320\000\032\230!\360^\001\000\005\014\210;\220a\320\027(\250\001\340\004\007\200z\220\021\220(\230!\330\010\021\220\021\220!\330\t\020\220\001\220\030\230\021\330\010\013\2105\220\007\220q\330\014\035\230T\320!4\260A\340\014\035\230Q\330\010\022\220&\320\030+\2501\250A\330\010\021\220\034\320\0354\260A\260Q\330\010\013\2105\220\007\220u\230D\240\006\240f\250C\250q\360\006\000\r\026\220V\2305\240\001\240\021\330\010\017\210q\330\t\020\220\001\220\030\230\021\330\010\016\210e\2201\220H\230E\240\021\330\010\021\220\021\220!\340\004\010\210\005\210Q\330\010\016\210e\220:\230Q\230c\240\034\250U\260!\2603\260e\2701\340\010\013\2105\220\003\2201\360\010\000\r\024\2203\220a\340\010\020\220\n\230!\2303\230a\340\004\r\320\r%\240Q\240a\330\t\n\330\010\023\220>\240\036\250u\260A\260Z\270q\330\004\013\320\013%\240Q\240a\320\000\026\220a\360b\001\000\005\010\200z\220\021\220,\230a\330\010\021\220\025\220a\220x\230q\330\t\023\2201\220L\240\001\330\010\021\220\021\340\010\016\210i\220q\230\001\340\004\007\200z\220\024\220Q\330\010\021\220\026\220q\230\r\240Q\240f\250A\340\010\013\210:\220R\220q\330\014\022\220*\230A\230Q\330\010\021""\220\026\220q\320\030.\250a\250v\260[\300\001\340\004\013\320\013!\240\021\240!\200\001\360\024\000\005\013\210.\230\t\240\035\250a\250q\330\004\013\320\013\036\230a\230q\200\001\360$\000\t\031\230\016\240a\240q\340\004\017\210r\320\021\"\240\"\240D\250\001\330\t\n\330\010\024\220N\240!\240:\250Q\250a\330\004\013\320\013\036\230a\230q\200\001\330\004&\240a\240v\250Q\320\004.\250a\360x\001\000\t\r\210L\230\001\330\010\022\220#\220R\320\027/\250q\260\001\330\010\017\210s\220\"\220N\240!\320#8\270\001\270\027\300\001\320\000\020\220\013\230?\250!\360b\001\000\005\010\200w\210a\210v\220Q\330\010\013\2105\220\007\220q\330\014\022\220*\230A\330\020\021\340\010\020\220\005\320\025,\250A\250T\3201D\300A\330\010\013\2109\220G\2301\330\014\024\220E\230\036\240q\250\001\330\010\013\2109\220G\2301\330\014\024\220E\230\036\240q\250\001\330\010\017\210q\360\006\000\t\030\220u\230H\240A\240Q\330\010\031\230\033\240A\320%6\260a\360\006\000\005\020\210x\220y\240\003\240:\250Q\340\004\017\210\177\230a\320\0374\260A\330\004\r\320\r$\240A\240Q\340\004\007\200u\210E\220\023\220C\220s\230)\2404\240t\2501\330\010\016\210j\230\001\230\021\340\004\n\210)\2206\230\021\330\010\022\220!\2207\230!\2307\240%\240z\260\032\2701\340\004\n\210)\2206\230\031\240$\240a\330\004\n\210(\220!\340\004\013\2101\210\001\330\014\r\330\020\026\220d\230%\230s\240+\250V\2603\260b\270\001\330\024\025\330\030\036\230k\250\024\250Q\250h\260a\330\033\034\330\030\031\330\024\032\230&\240\001\240\021\330\014\023\220=\240\001\330\020\033\2303\230i\240q\340\020\027\220q\210\001\330\014\r\330\020\026\220d\230%\230s\240+\250V\2603\260b\270\001\330\024\025\330\030\036\230k\250\024\250Q\250h\260a\330\033\034\330\030\031\340\024\030\230\006\230a\230q\340\014\023\220=\240\001\330\020\033\2303\230i\240q\200\001\360f\001\000\t\032\230\033\240A\320%:\270!\340\004\007\200t\210:\220Q\220g\230Q\330\010\016\210i\220q\230\001\360\006\000\005\021\220\001\330\010\037\230q\320 8\270\005\270Q\360\006\000\005%\240G\2501\250A\200\001\360f""\001\000\005\010\200z\220\021\220(\230!\330\010\021\220\026\220v\230Q\340\004\010\210\010\220\001\330\010\013\210:\220Q\220f\230A\330\014\027\220u\230B\230a\340\014\027\220q\330\010\020\220\n\230!\2308\2401\340\004\017\210v\220Q\220o\240Q\240a\330\004\013\320\013!\240\021\240!\200\001\360\036\000\005\021\220\006\220g\230Q\230a\330\004\021\220\026\220w\230a\230q\330\004\007\200y\220\006\220c\230\032\2401\360\006\000\t\020\210q\330\004\013\320\013\037\230q\240\001\330 *\250!\2509\3204G\300q\330+5\3205H\310\001\200\001\360\024\000\005 \230\177\250h\260a\260q\330\004\007\200{\220&\230\001\320\031-\250Q\250f\260A\330\004\007\200u\210A\210S\220\013\2304\230q\330\004\013\2101\320\000\026\220k\240\033\250K\260q\330\n\032\230!\360P\003\000\t\035\320\0343\2601\260A\330\010 \240\001\360\006\000\005\014\210;\220a\320\027(\250\001\340\004\025\220Q\330\004\007\200u\210G\2205\230\004\230D\240\004\240C\240q\330\010\031\230\021\330\010\017\210t\2201\340\004\007\200|\2203\220a\330\010\030\230\001\340\010\030\230\001\340\004\007\200z\220\021\220%\220q\330\010\013\2105\220\007\220u\230D\240\004\240C\240u\250G\2601\260A\330\014\022\220#\220U\230!\2306\240\025\240f\250L\270\001\330\010\017\210q\340\004\007\200w\210a\210u\220A\330\010\017\320\017+\2501\250E\260\026\260v\270Q\330\t\020\220\001\220\025\220a\330\010\013\2105\220\007\220q\330\014\035\230T\320!4\260A\340\014\035\230Q\330\010\030\320\030(\250\003\320+D\300A\300Q\330\010\024\220E\320\0317\260q\3208H\310\001\330\010\013\2105\220\007\220u\230D\240\t\250\026\250s\260!\360\006\000\r\031\230\005\230U\240!\2406\250\025\250f\260L\300\001\330\010\017\210q\330\t\020\220\001\220\025\220a\330\010\013\2105\220\007\220q\330\014\035\230T\320!4\260A\340\014\035\230Q\330\010\030\320\030(\250\003\320+=\270Q\270a\330\010\024\220E\320\0310\260\001\3201A\300\021\330\010\013\2105\220\007\220u\230D\240\t\250\026\250s\260!\360\006\000\r\031\230\005\230U\240!\2406\250\025\250f\260L\300\001\330\010\017\210q\330\t\027\220q\230\001\330\010\013\2105\220""\007\220q\330\014\017\210~\230Q\230a\330\020\027\220z\240\021\240&\250\001\250\021\340\020\026\220i\230q\240\001\360\006\000\t\022\220\032\2301\230E\240\021\240!\330\010\013\320\013\034\230D\240\014\250C\250q\330\014\034\230A\340\010\013\210:\220Q\220h\230b\240\003\2401\330\014\017\210u\220G\2301\330\020\026\220j\240\001\240\021\360\010\000\021\030\220x\230v\240V\2503\250b\260\003\260=\300\006\300a\330\020\031\230\026\230q\340\010\013\2105\220\007\220q\330\014\017\210t\2207\230#\230R\230q\330\020\026\220i\230q\240\001\330\014\017\210t\2206\230\023\230A\330\020\026\220j\240\001\240\021\330\014\017\210s\220!\2208\2303\230c\240\021\240!\330\020\026\220j\240\001\330\024\025\340\010\013\2107\220!\2208\2301\330\014\023\320\023/\250q\260\010\270\006\270f\300A\330\016\030\230\017\240q\250\010\260\001\330\016\023\2207\230%\230t\2404\240t\2503\250a\330\014\025\320\025&\240a\330\020\022\220(\230!\2309\240F\250&\260\017\270v\300Q\340\r\027\220\177\240a\240q\330\014\017\210u\220G\2301\330\020\035\230T\240\021\330\020\035\230T\240\021\330\020\023\2206\230\031\240#\240T\250\021\330\024\032\230*\240A\330\030\031\360\006\000\021\036\230Q\330\020\035\230Q\340\014\026\320\026'\240q\330\020\026\220h\230f\240L\260\001\330\014\r\330\020\035\230U\240!\330\024\032\230+\240Y\250e\2601\330\024 \240\001\330\023\024\360\010\000\021\024\220;\230g\240Q\330\024\034\230E\240\021\330\030\031\330\030.\250a\250v\260[\300\001\330\030*\250!\2501\360\006\000\031(\240{\260!\330\024!\240\025\240a\330\030\036\230k\250\031\260,\270a\340\024\025\340\014\023\220?\240,\250a\330\020\031\230\034\240X\250V\260:\270U\300!\340\014\017\210z\230\021\330\020\030\230\007\230z\250\027\3200D\300A\330\024\034\230C\230x\240q\330\014\017\210u\220D\230\004\230D\240\003\2401\330\020\026\320\026'\240q\330\024\034\230F\240$\240m\260?\300&\310\001\330\020\031\230\023\230B\230o\250Q\250e\260=\300\004\300A\330.:\270!\340\020\031\320\031*\250!\2508\2606\270\026\270\177\310a\330+,\340\010\013\2105\220\004\220D\230\004\230C\230q\330""\014\022\320\022$\240A\330\020\025\220V\2306\240\024\240]\260&\270\001\330\014\025\220S\230\002\230/\250\021\250%\250}\270D\300\001\330*6\260a\360\006\000\r\026\320\025'\240q\250\005\250V\2606\270\026\270v\300Q\340\004\007\200\177\220g\230Q\330\010\021\220\036\230}\250A\320-=\270Q\330\004\013\2101\320\004\036\230k\250\021\330\010\014\210L\230\001\330\010\013\2105\220\003\2201\330\014\022\220*\230A\330\020\021\360\014\000\t\022\220\024\220Y\230a\330\010\013\2106\220\023\220A\330\014\023\2201\330\010\017\210v\220W\230A\230W\240E\250\021\320\004\036\230k\250\021\330\010\014\210L\230\001\330\010\013\2105\220\003\2201\330\014\022\220*\230A\330\020\021\330\020(\250\001\250\024\250Z\260q\360\014\000\t\031\230\001\330\014\016\210h\220a\220t\2307\240!\2404\240v\250W\260D\270\005\270U\300!\3004\300q\340\010\013\2101\330\014\022\220\"\220F\230!\230?\250%\250q\340\014\022\220\"\220F\230\"\230D\240\013\2504\250v\260Q\330\010\017\210q\320\004\036\230k\250\021\330\010\014\210L\230\001\340\010\013\2105\220\003\2201\330\014\r\330\020\031\230\024\230Y\240a\240\177\260a\330\023\024\330\020\026\220j\240\001\330\024\025\360\014\000\r\024\2202\220V\2301\230H\240F\250'\260\025\260a\340\010\021\220\024\220Y\230a\230\177\250a\330\010\013\2105\220\003\2205\230\004\230J\240a\240t\2505\260\005\260T\270\024\270\\\310\023\310A\340\014\023\2202\220V\2301\230H\240F\250'\260\025\260a\340\010\013\2106\220\023\220A\330\014\023\2201\330\010\017\210r\220\030\230\021\230(\240&\250\001\320\004&\240k\260\036\320?Q\320QR\360*\000\t\r\210L\230\001\330\010\017\210s\220\"\220E\230\021\230&\240\r\250U\260!\330\032\"\240)\250<\260q\320\004&\240k\260\036\320?Q\320QR\360*\000\t\020\210s\220\"\220E\230\021\230&\240\r\250U\260!\330\032\"\240)\250<\260q\320\004&\240k\260\036\270q\360@\001\000\t\r\210L\230\001\330\010\017\210s\220\"\220E\230\021\230&\240\r\250U\260&\270\010\300\001\200\001\360\010\000\005\014\210;\220l\240!\2409\250G\2601\320\004&\240n\3204L\310A\330(F\300a\360F\001\000\016\017\330\014\026\320\026(""\250\001\250\030\260\021\330\014\023\320\023%\240Q\330\014\023\320\023'\240q\330\014\023\320\023)\250\021\330\014\030\230\001\330\020\033\2301\330\024\032\230$\230a\330\024\025\330\024\025\220Q\360\010\000\t\020\210y\230\001\230\030\240\025\240a\320\004.\250n\270A\360X\001\000\t\r\210L\230\001\360\010\000\r\034\2301\340\010\013\2104\210w\220g\230S\240\r\250Q\330\014\022\220*\230A\230Q\330\0358\270\001\270\024\270W\300K\310q\320P]\320]^\340\010\014\210H\220I\230S\240\001\240\024\240\\\260\024\260Q\330\014\017\210t\2205\230\n\240$\240f\250L\270\002\270!\330\020\026\220j\240\001\330\024$\240A\240U\250!\330\014\025\220V\2305\240\001\240\025\240g\250U\260&\270\010\300\001\330\014\023\2207\230!\2301\340\010\017\210u\220L\240\001\240\031\250'\260\021\320\004.\250n\270A\360^\001\000\r\034\2301\340\010\013\2104\210w\220g\230S\240\r\250Q\330\014\022\220*\230A\230Q\330\035?\270q\300\004\300G\310;\320VW\320Wd\320de\340\010\014\210H\220I\230S\240\001\240\024\240\\\260\024\260Q\330\014\017\210t\2205\230\n\240$\240f\250L\270\002\270!\330\020\026\220j\240\001\330\024$\240A\240U\250!\330\014\025\220V\2305\240\001\240\025\240g\250U\260&\270\010\300\001\330\014\023\2207\230!\2301\340\010\017\210{\230,\240a\240y\260\007\260q\320\004&\320&>\270n\310A\330'@\300\001\330)*\360B\001\000\016\017\330\014\026\320\026(\250\001\320);\2701\330\014\023\320\023%\240Q\330\014\023\220?\240!\330\014\023\320\023)\250\021\330\014\030\230\001\330\020\033\2301\330\024\032\230$\230a\330\024\025\330\024\025\220Q\360\010\000\t\020\210y\230\001\230\030\240\025\240a\200\001\360\022\000\005\031\230\010\240\010\250\001\250\021\330\004\026\220n\240J\250e\2601\330\004\007\200u\210A\210Q\330\004\013\2101\320\004&\240o\260Q\3606\000\t\r\210L\230\001\340\010\013\2103\210c\220\021\330\014\022\220+\230Q\330\020\021\360\014\000\t\014\210?\230$\230a\330\014\022\220*\230A\330\020\021\360\014\000\t\022\320\021(\250\001\330\010\021\320\021#\2401\330\010\021\220\034\230Q\340\r\016\330\014\030\230\001\320\031-\250Q\250k\270""\024\270Q\330.4\260A\260Q\360\010\000\t\021\320\020\"\240!\2401\340\010\013\2109\220D\230\004\230E\240\026\240q\340\014\024\220E\230\025\230a\330\010\017\210q\320\004&\240o\260Q\360.\000\t\014\2104\210q\330\014\r\330\020\027\220t\2308\2409\250B\250e\2601\260B\260a\330\014\023\320\023#\2401\330\020\023\2201\330\024\032\230!\340\010\017\210s\220\"\220J\230a\230t\240:\250R\250y\270\001\270\037\320HX\320Xa\320ab\320\000\031\230\035\240o\260Q\360&\000\005\030\220u\230A\230Q\330\004\013\2105\220\t\230\021\230%\230x\240y\260\014\270A\320\000\037\230q\3606\000\005\032\230\021\230.\250\001\330\032\033\230:\240Q\240a\340\004\013\320\013!\240\021\330\010\034\230A\230T\240\021\240+\250T\260\021\260!\320\004/\250q\360N\001\000\t\024\220?\240!\320#8\270\001\330\010\021\320\021(\250\001\250\021\330\r\016\330\014\026\220d\230&\320 6\260a\260q\340\010\017\320\017!\240\021\240!\320\004'\240q\360\024\000\t!\320 0\260\004\260H\270D\300\001\330\010\017\210r\220\032\2302\230_\250A\200\001\340\004\037\230q\320 0\260\013\270;\300k\320QR\330\004\023\220>\240\030\250\021\250!\330\004\007\200|\2207\230!\330\0100\260\001\3201B\300.\320PQ\330\004\013\2101\200\001\340\004\037\230q\320 0\260\013\270;\300k\320QR\330\004\023\2208\2308\2401\240A\330\004\007\200|\2207\230!\330\010*\250!\250;\260n\300A\330\004\013\2101\200\001\340\004\037\230q\320 0\260\013\270;\300k\320QR\330\004\023\320\023%\240X\250Q\250a\330\004\007\200|\2207\230!\330\0104\260A\3205J\310.\320XY\330\004\013\2101\320\004\037\230q\360 \000\t\014\2101\330\021\022\330\020\034\230A\230T\240\030\250\024\250R\250}\270A\340\021\022\330\020\034\230A\230T\240\030\250\024\250R\250y\270\001\320\004\037\230q\360 \000\t\014\2101\330\014\020\220\014\230A\330\021\022\330\020\034\230A\230T\320!2\260$\260b\270\r\300Q\340\021\022\330\020\034\230A\230T\320!2\260$\260b\270\t\300\021\320\004\037\230q\360 \000\t\014\2101\330\014\020\220\014\230A\330\021\022\330\020\034\230A\230T\240\026\240}\260A\340\021\022\330\020\034\230A\230T\240\026\240y\260\001""\320\004\037\230q\360 \000\t\014\2101\330\014\020\220\014\230A\330\021\022\330\020\034\230A\230T\240\023\240M\260\021\340\021\022\330\020\034\230A\230T\240\023\240I\250Q\320\004'\240q\360\026\000\r!\320 1\260\024\260X\270T\300\021\330\014!\240\037\260\002\260%\260t\2701\340\010\013\2102\210Q\330\014\023\320\023%\240Q\240b\250\010\260\005\260U\270%\270s\300%\300q\340\014\023\2201\200\001\340\004\013\210<\220q\230\001\320\004'\240q\360\024\000\t\"\320!2\260$\260h\270d\300!\340\010\013\2102\210Q\330\014\r\330\020\030\230\005\230Q\230f\240C\240s\250!\330\020\030\230\n\240!\2405\250\002\250'\260\022\2601\360\006\000\r\024\2201\320\004'\240q\360\024\000\t\"\320!2\260$\260h\270d\300!\340\010\013\2102\210Q\340\014\r\330\020\030\230\005\230Q\230f\240C\240s\250\"\250H\260J\270a\270u\300B\300a\360\006\000\r\024\2201\320\004'\240q\360\024\000\t\"\320!2\260$\260h\270d\300!\330\010\017\210r\220\032\2302\230_\250A\320\004'\240q\360$\000\t\017\320\016!\240\021\320\004'\240q\360\024\000\t#\320\"4\260D\270\010\300\004\300A\330\010\017\210r\220\032\2302\230_\250A\320\004'\240q\360$\000\t\014\2104\210q\330\014\r\330\020\027\220q\230\003\2304\230q\240\002\240&\250\001\320)9\3209J\310$\310e\320SW\320W\\\320\\]\330\023\024\330\020\026\220j\240\001\330\024\025\360\006\000\r\024\2201\320\004'\240q\360\032\000\r#\320\"5\260T\270\030\300\024\300Q\330\014#\320#4\260B\260e\2704\270q\330\014\034\230E\240\025\240a\340\010\013\2104\210r\220\021\330\014\023\2201\340\010\013\2105\220\003\2201\330\014\023\2208\230:\240Q\240h\250b\260\001\330\r\022\220#\220Q\330\014\023\2208\230:\240Q\240m\2602\260Q\330\r\022\220#\220Q\330\014\023\2208\230:\240Q\240m\2602\260Q\360\006\000\r\020\210{\230!\330\020\027\220{\240#\240Z\250q\260\002\260(\270%\270q\340\014\017\210r\220\027\230\002\230%\230s\240!\330\020\026\220j\240\001\330\024*\250!\2502\250Q\360\n\000\r\024\2208\230:\240Q\240m\2602\260W\270C\270q\320\004'\240q\360\026\000\r$\320#7\260t\2708\3004\300q\330\014$\320$6\260b\270\005\270T\300\021\330\010\013""\2102\210Q\330\014\023\220:\230X\240Q\330\020\031\230\021\230\"\230F\240)\2501\250E\260\026\260q\360\006\000\r\024\2201\320\004'\240q\360\032\000\r$\320#7\260t\2708\3004\300q\330\014$\320$6\260b\270\005\270T\300\021\340\010\013\2104\210r\220\021\330\014\023\2201\340\010\013\2104\210u\220I\230R\230v\240Q\330\014\025\320\025%\240Q\240i\250q\260\005\260Y\270a\340\014\025\220Q\340\010\017\320\017!\240\021\240\"\240H\250E\260\025\260e\2704\270w\300a\320\004'\240q\360$\000\t\014\320\013\033\2308\2406\250\031\260!\330\014\022\220*\230A\330\020\021\340\022\035\230Q\230a\340\010\013\2104\210t\2201\330\014\023\2201\330\010\013\2104\210q\330\014\023\2204\220q\230\001\330\010\026\220a\330\010\013\2104\210x\220s\230!\330\014\023\2201\340\010\014\210E\220\031\230#\230Q\230d\240%\240t\2504\250w\260f\270A\270T\300\025\300k\320QR\330\014\017\210t\2203\220a\330\020\023\320\023#\2403\240a\330\024\032\230(\240!\330\030\031\330\030N\310a\310q\360\006\000\025\035\230E\240\021\330\030+\2501\250A\330\014\027\220q\230\007\230u\240F\250!\320+;\2701\330\010\017\210q\320\004'\240q\360\024\000\t%\320$8\270\004\270H\300D\310\001\330\010\017\320\017\037\230q\240\002\240+\250R\250\177\270a\320\004'\240q\360\026\000\r%\320$9\270\024\270X\300T\310\021\330\014%\320%8\270\002\270%\270t\3001\330\010\013\2102\210Q\330\014\023\220:\230X\240Q\330\020\031\230\021\230\"\230F\240)\2501\250E\260\026\260q\360\006\000\r\024\2201\320\004'\240q\360$\000\t\021\220\004\220A\330\010\017\210x\220v\230S\240\n\250%\250v\260Q\3206F\300a\320\004\037\230q\330\010\014\210H\220A\360\n\000\r\037\320\036.\250a\250q\340\010\013\2105\220\004\220E\230\021\330\014\025\220Q\330\014\020\220\017\230q\330\r\022\220$\220e\2301\330\014\025\220Q\330\014\020\220\017\230q\330\r\022\220$\220f\230G\2401\330\014\025\220Q\330\014\020\220\017\230q\330\014\020\220\017\230q\340\014\022\220*\230A\320\0352\260!\2601\340\r\016\330\014\025\220^\320#5\260U\270!\2708\3001\340\010\014\320\014\036\230a\320\037;\2701\330\010\014\320\014#\2401\320$D\300A""\330\010\014\210J\220a\320\004/\250q\330\010\014\210L\230\001\330\010\017\320\017$\240A\240V\320+A\300\021\320\004'\240q\360\024\000\t\022\220\024\220Z\230q\330\010\017\210x\220w\230c\240\032\2503\250a\250x\260q\320\004'\240q\360\024\000\t\022\220\024\220Z\230q\330\010\017\210x\220w\230c\240\032\2506\260\033\270A\320\004:\270!\360&\000\r\033\230-\240q\250\001\330\014!\240\035\250a\250q\330:;\330\r\016\330\014\030\230\001\320\0310\260\001\330\020\026\220d\230,\320&>\270a\330\020$\240G\250?\270!\320\004:\270!\360&\000\r\033\230-\240q\250\001\330\014!\240\035\250a\250q\330:;\330\r\016\330\014\030\230\001\320\031*\250!\330\020\026\220d\230,\320&>\270a\330\020$\240G\250?\270!\320\004'\240q\360\024\000\t\022\220\025\220b\230\006\230a\330\010\017\210x\220w\230c\240\032\2507\260#\260Q\320\004'\240q\360\024\000\t \230\177\250d\260(\270$\270a\330\010\017\210r\220\032\2302\230_\250A\320\004'\240q\360$\000\t\017\210d\220!\330\010\017\210x\220t\2303\230j\250\003\250:\260Q\3206F\300a\320\004'\240q\360`\001\000\r\033\230!\360\006\000\t\017\210f\220A\320\025)\250\021\250&\260\004\260A\340\010\013\210>\230\027\240\001\330\014\017\210t\220>\240\022\2401\330\020\026\220j\240\001\240\021\330\014\036\230a\330\014\022\220$\220b\230\016\240a\240q\340\010\t\330\021\022\330\020\034\230A\230V\2404\240r\250\031\260!\2601\260A\340\014\017\210u\220D\230\003\2303\230a\330\020\021\340\014\022\220'\230\021\320\032,\250A\250Q\340\010\017\210q\320\004'\240q\360\024\000\t\020\210q\200\001\360\032\000\t\032\230\027\240\010\250\001\250\021\360\006\000\005\032\230\036\240q\250\001\330\004\017\210r\320\021\"\240\"\240D\250\001\340\t\n\330\010\016\210k\230\024\230Q\330\014\032\230!\230;\240a\240z\3201F\300a\340\004\007\200v\210Y\220c\230\021\330\010\016\210h\220a\220q\340\004\013\2101\320\004'\240q\360$\000\t\020\210t\2206\230\026\230q\320 0\260\001\320\004'\240q\360$\000\t\020\210t\2206\230\026\230q\320 0\3200D\300D\310\017\320WX\320\004'\240q\360\032\000\t\022\320\021/\250t\2608\2704\270q\330\010\016""\210n\230A\320\035A\300\021\330\014\022\220!\330\010\017\320\017!\240\021\240!\320\004\027\220q\360\024\000\t\020\210x\220t\2307\240#\240Z\250t\2601\260F\270$\270f\300F\310!\320\004'\240q\360$\000\t\020\210x\220t\2307\240#\240Z\250t\2606\270\026\270q\320@P\320PQ\320\000\031\320\031/\250q\360l\001\000\005\006\330\010\026\220o\240Q\240a\330\013\014\330\010\026\220a\340\004\007\200z\220\021\220(\230!\330\010\021\220\021\330\t\025\220W\230A\330\010\021\220\026\220q\230\r\240Q\330\t\023\2201\220I\230X\240Q\330\010\021\220\034\230Q\230i\240q\250\001\330\n\021\220\021\220(\230(\240!\330\n\021\220\021\220(\230)\2401\330\n\021\220\021\220(\230!\330\010\021\220\032\2301\230H\240A\340\010\016\210i\220q\330\0149\270\021\270&\300\001\340\004\007\200|\2203\220a\340\010\026\320\026)\250\021\250!\340\004\007\200|\2207\230%\230t\240<\250s\260!\330\010\021\320\021$\240A\240X\250Q\340\004\007\200|\2207\230!\330\010\021\320\021&\240a\240x\250q\340\004\013\2101\320\004/\250q\360p\001\000\t\024\220?\240!\320#8\270\001\330\010\021\320\021(\250\001\250\021\330\r\016\330\014\026\220d\230&\320 6\260a\260q\340\010\017\320\017!\240\021\240!\200\001\360\016\000\t\030\220s\230!\2301\340\004\013\2106\220\027\230\003\2308\2401\240A\340\004\007\200u\210C\210q\330\010\017\210y\230\005\230Q\230f\240A\240W\250F\260!\340\010\024\220A\220U\230\"\230G\2401\330\010\017\210y\230\006\230a\230w\240a\200\001\330\004\005\330\004\007\200t\2101\330\010\030\230\007\230q\330\014\026\220b\230\001\330\014\030\230\002\230!\330\014\030\230\002\230!\330\014\031\230\022\2301\330\014\031\230\022\2301\330\014\031\230\022\2301\330\014\031\230\022\2301\330\014\032\230\"\230A\330\014\032\230\"\230A\330\014\032\230\"\230A\330\014\036\230b\240\001\330\014\031\230\022\2301\330\014\032\230\"\230A\340\014\032\230\"\230F\240!\2401\330\014\032\230\"\230F\240!\2401\330\014\r\330\020\025\220R\220v\230Q\230a\330\020\026\220b\230\006\230a\230q\330\020\026\220b\230\006\230a\230q\330\020\026\220b\230\006\230a\230q\340\014\r\330\020\025""\220R\220v\230Q\230a\330\020\026\220b\230\006\230a\230q\330\020\026\220b\230\006\230a\230q\330\020\026\220b\230\006\230a\230q\340\014\032\230\"\230A\330\014 \240\002\240!\330\014\037\230r\240\021\330\014%\240R\240q\330\014\032\230\"\230A\330\014 \240\002\240!\330\014\037\230r\240\021\330\014\030\230\002\230!\330\014\027\220r\230\021\330\014\035\230R\230q\330\014\035\230R\230q\330\014\036\230b\240\001\330\014\036\230b\240\001\340\004\013\2101\200\001\360\010\000\005\010\200t\2104\210s\220!\330\010\016\210o\230\\\250\021\330\014\030\230\001\230\024\230^\250<\260q\270\004\270A\330\014\024\220D\230\001\340\010\016\210e\2201\220D\230\005\230Q\330\004\013\2101\200\001\330\004\005\330\004\007\200u\210C\210q\330\017\020\330\010\017\210q\330\004\013\2101\200\001\360\030\000\005\010\200u\210G\2201\330\010\017\320\017#\240:\250W\260A\260Q\340\004\020\220\001\220\032\2301\230A\200\001\330\004\007\200u\210G\2205\230\003\2305\240\007\240q\330\010\016\210j\230\001\330\014\r\340\004\n\210#\320\r\035\230Q\230e\2401\330\004\007\200t\210:\220Q\220f\230G\2401\330\010\016\210i\220q\230\001\340\004\007\200z\220\021\220%\220~\240T\250\023\250K\260r\270\021\330\010\016\210c\220\026\220q\230\001\330\004\007\200u\210G\2205\230\004\230C\230v\240S\250\001\330\010\016\210c\220\025\220a\220q\330\004\013\2101\200\001\360\034\000\005\010\200v\210R\210q\330\010\016\210j\230\001\230\021\330\004\020\220\001\320\021)\250\021\250!\200\001\360$\000\005\010\200v\210R\210q\330\010\016\210j\230\001\230\021\330\004\020\220\001\320\021(\250\001\250\021\200\001\330\004\005\330\004\007\200v\210S\220\001\330\017\020\330\010\020\220\001\330\004\013\2101\320\004 \240\001\360v\002\000\t\023\220#\220R\320\027*\250!\2501\330\010\017\210s\220\"\220M\240\021\240&\250\010\260\001\200\001\360`\001\000\t \230w\240a\240q\330\010!\240\027\250\001\250\021\330\0100\260\013\270=\310\001\330\014\030\230\n\240-\250q\330\010'\320':\320:R\320RS\320ST\330\010\031\230\032\2408\2501\250A\330\004\007\200u\210A\210Q\330\004\013\2101""\200\001\360\\\001\000\t \230w\240a\240q\330\004\020\220\001\320\021*\250!\2501\200\001\330\004\007\200z\220\021\220&\230\001\330\010\013\2104\210y\230\001\230\021\330\014\023\2201\330\r\021\220\031\230!\2301\330\014\023\2201\330\r\021\220\031\230!\2301\330\014\023\2201\330\r\021\220\031\230!\2301\330\014\023\2201\200\001\330\004\007\200z\220\021\220#\220Q\330\010\017\210q\330\004\013\2109\220A\220Q\200\001\360\022\000\005\010\200z\220\021\220#\220Q\330\010\017\210q\220\007\220q\230\001\340\010\017\210q\200\001\330\026\027\360.\000\005\010\200z\220\021\220%\220q\330\010\022\220!\340\010\022\220,\230a\230q\340\004\007\320\007\027\220w\230a\330\010\030\230\017\240q\340\010\030\230\001\230\021\340\t\n\330\010\021\220\036\230q\330\014\033\2301\230F\240'\250\030\260\024\260Q\330\034\"\240!\330\034\035\330+4\260A\340\004\013\320\013\035\230Q\230a\200\001\330\004\007\200z\220\021\220&\230\001\360\006\000\t\030\220t\2307\240!\2401\340\010\027\220q\360\010\000\005\014\2101BHINoneQbbBhHiIqQdefhipandasqr_extptr";
    PyObject *data = NULL;
    CYTHON_UNUSED_VAR(__Pyx_DecompressString);
    #endif
    PyObject **stringtab = __pyx_mstate->__pyx_string_tab;
    Py_ssize_t pos = 0;
    for (int i = 0; i < 3091; i++) {
      Py_ssize_t bytes_length = index[i].length;
      PyObject *string = PyUnicode_DecodeUTF8(bytes + pos, bytes_length, NULL);
      if (likely(string) && i >= 938) PyUnicode_InternInPlace(&string);
      if (unlikely(!string)) {
        Py_XDECREF(data);
        __PYX_ERR(0, 1, __pyx_L1_error)
      }
      stringtab[i] = string;
      pos += bytes_length;
    }
    for (int i = 3091; i < 3699; i++) {
      Py_ssize_t bytes_length = index[i].length;
      PyObject *string = PyBytes_FromStringAndSize(bytes + pos, bytes_length);
      stringtab[i] = string;
      pos += bytes_length;
      if (unlikely(!string)) {
        Py_XDECREF(data);
        __PYX_ERR(0, 1, __pyx_L1_error)
      }
    }
    Py_XDECREF(data);
    for (Py_ssize_t i = 0; i < 3699; i++) {
      if (unlikely(PyObject_Hash(stringtab[i]) == -1)) {
        __PYX_ERR(0, 1, __pyx_L1_error)
      }
    }
    #if CYTHON_IMMORTAL_CONSTANTS
    {
      PyObject **table = stringtab + 3091;
      for (Py_ssize_t i=0; i<608; ++i) {
        #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
        #if PY_VERSION_HEX < 0x030E0000
        if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1)
        #else
        if (PyUnstable_Object_IsUniquelyReferenced(table[i]))
        #endif
        {
          Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL);
        }
        #else
        Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT);
        #endif
      }
    }
    #endif
  }
  {
    PyObject **numbertab = __pyx_mstate->__pyx_number_tab;
    double const c_constants[] = {0.9,0.01};
    for (int i = 0; i < 2; i++) {
      numbertab[i] = PyFloat_FromDouble(c_constants[i]);
      if (unlikely(!numbertab[i])) __PYX_ERR(0, 1, __pyx_L1_error)
    }
  }
  {
    PyObject **numbertab = __pyx_mstate->__pyx_number_tab + 2;
    int8_t const cint_constants_1[] = {0,-1,1,2,3,5,8,9,10,50,64,100};
    int16_t const cint_constants_2[] = {1970};
    int32_t const cint_constants_4[] = {65536L,262144L,65821749L,238750788L};
    for (int i = 0; i < 17; i++) {
      numbertab[i] = PyLong_FromLong((i < 12 ? cint_constants_1[i - 0] : (i < 13 ? cint_constants_2[i - 12] : cint_constants_4[i - 13])));
      if (unlikely(!numbertab[i])) __PYX_ERR(0, 1, __pyx_L1_error)
    }
  }
  #if CYTHON_IMMORTAL_CONSTANTS
  {
    PyObject **table = __pyx_mstate->__pyx_number_tab;
    for (Py_ssize_t i=0; i<19; ++i) {
      #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
      #if PY_VERSION_HEX < 0x030E0000
      if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1)
      #else
      if (PyUnstable_Object_IsUniquelyReferenced(table[i]))
      #endif
      {
        Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL);
      }
      #else
      Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT);
      #endif
    }
  }
  #endif
  return 0;
  __pyx_L1_error:;
  return -1;
}
/* #### Code section: init_codeobjects ### */
typedef struct {
    unsigned int argcount : 5;
    unsigned int num_posonly_args : 1;
    unsigned int num_kwonly_args : 3;
    unsigned int nlocals : 5;
    unsigned int flags : 10;
    unsigned int first_line : 13;
} __Pyx_PyCode_New_function_description;
/* NewCodeObj.proto */
static PyObject* __Pyx_PyCode_New(
        const __Pyx_PyCode_New_function_description descr,
        PyObject * const *varnames,
        PyObject *filename,
        PyObject *funcname,
        PyObject *line_table,
        PyObject *tuple_dedup_map
);


static int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate) {
  PyObject* tuple_dedup_map = PyDict_New();
  if (unlikely(!tuple_dedup_map)) return -1;
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 1042};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_i};
    __pyx_mstate_global->__pyx_codeobj_tab[0] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_iter, __pyx_mstate->__pyx_kp_b_iso88591_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[0])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 1162};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_i};
    __pyx_mstate_global->__pyx_codeobj_tab[1] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_iter, __pyx_mstate->__pyx_kp_b_iso88591_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[1])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 2304};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_k, __pyx_mstate->__pyx_n_u_v};
    __pyx_mstate_global->__pyx_codeobj_tab[2] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_kp_b_iso88591__28, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[2])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 2407};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_i};
    __pyx_mstate_global->__pyx_codeobj_tab[3] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_keys, __pyx_mstate->__pyx_kp_b_iso88591_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[3])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 2411};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_i};
    __pyx_mstate_global->__pyx_codeobj_tab[4] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_values, __pyx_mstate->__pyx_kp_b_iso88591_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[4])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 2415};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_i};
    __pyx_mstate_global->__pyx_codeobj_tab[5] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_items, __pyx_mstate->__pyx_kp_b_iso88591_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[5])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 2905};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_i};
    __pyx_mstate_global->__pyx_codeobj_tab[6] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_iter, __pyx_mstate->__pyx_kp_b_iso88591_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[6])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 1018};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_sp, __pyx_mstate->__pyx_n_u_dtype, __pyx_mstate->__pyx_n_u_fields, __pyx_mstate->__pyx_n_u_i};
    __pyx_mstate_global->__pyx_codeobj_tab[7] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_scalar_pxi, __pyx_mstate->__pyx_n_u_iter, __pyx_mstate->__pyx_kp_b_iso88591_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[7])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 1028};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_key};
    __pyx_mstate_global->__pyx_codeobj_tab[8] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_scalar_pxi, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_kp_b_iso88591__29, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[8])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 1137};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_arr, __pyx_mstate->__pyx_n_u_k, __pyx_mstate->__pyx_n_u_v};
    __pyx_mstate_global->__pyx_codeobj_tab[9] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_scalar_pxi, __pyx_mstate->__pyx_n_u_iter, __pyx_mstate->__pyx_kp_b_iso88591_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[9])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 1409};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_i};
    __pyx_mstate_global->__pyx_codeobj_tab[10] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_array_pxi, __pyx_mstate->__pyx_n_u_iter, __pyx_mstate->__pyx_kp_b_iso88591_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[10])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 4717};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_name};
    __pyx_mstate_global->__pyx_codeobj_tab[11] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_array_pxi, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_kp_b_iso88591__30, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[11])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 293};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_chunk, __pyx_mstate->__pyx_n_u_item};
    __pyx_mstate_global->__pyx_codeobj_tab[12] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_iter, __pyx_mstate->__pyx_kp_b_iso88591_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[12])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 1338};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_i};
    __pyx_mstate_global->__pyx_codeobj_tab[13] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_iterchunks, __pyx_mstate->__pyx_kp_b_iso88591_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[13])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 2054};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_i};
    __pyx_mstate_global->__pyx_codeobj_tab[14] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_itercolumns, __pyx_mstate->__pyx_kp_b_iso88591_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[14])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 5892};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_c};
    __pyx_mstate_global->__pyx_codeobj_tab[15] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_kp_b_iso88591__31, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[15])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 635};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_x};
    __pyx_mstate_global->__pyx_codeobj_tab[16] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_tensor_pxi, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_kp_b_iso88591_a_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[16])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 886};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_x};
    __pyx_mstate_global->__pyx_codeobj_tab[17] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_tensor_pxi, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_kp_b_iso88591_a_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[17])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 1128};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_x};
    __pyx_mstate_global->__pyx_codeobj_tab[18] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_tensor_pxi, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_kp_b_iso88591_a_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[18])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 1347};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_x};
    __pyx_mstate_global->__pyx_codeobj_tab[19] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_tensor_pxi, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_kp_b_iso88591_a_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[19])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 672};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[20] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_io_pxi, __pyx_mstate->__pyx_n_u_cleanup, __pyx_mstate->__pyx_kp_b_iso88591_A_fA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[20])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 677};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[21] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_io_pxi, __pyx_mstate->__pyx_n_u_cleanup, __pyx_mstate->__pyx_kp_b_iso88591_A_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[21])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 683};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_buf, __pyx_mstate->__pyx_n_u_e, __pyx_mstate->__pyx_n_u_exc_info};
    __pyx_mstate_global->__pyx_codeobj_tab[22] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_io_pxi, __pyx_mstate->__pyx_n_u_bg_write, __pyx_mstate->__pyx_kp_b_iso88591_d_s_V3b_k_Qha_3iq_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[22])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 757};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[23] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_io_pxi, __pyx_mstate->__pyx_n_u_cleanup, __pyx_mstate->__pyx_kp_b_iso88591_A_fA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[23])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 762};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[24] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_io_pxi, __pyx_mstate->__pyx_n_u_cleanup, __pyx_mstate->__pyx_kp_b_iso88591_A_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[24])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 819};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_buf, __pyx_mstate->__pyx_n_u_e, __pyx_mstate->__pyx_n_u_exc_info};
    __pyx_mstate_global->__pyx_codeobj_tab[25] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_io_pxi, __pyx_mstate->__pyx_n_u_bg_write, __pyx_mstate->__pyx_kp_b_iso88591_d_s_V3b_k_Qha_aq_3iq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[25])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 823};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[26] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_ipc_pxi, __pyx_mstate->__pyx_n_u_iter_batches_with_custom_metadat, __pyx_mstate->__pyx_kp_b_iso88591_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[26])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 51};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[27] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_lib_pyx, __pyx_mstate->__pyx_n_u_cpu_count, __pyx_mstate->__pyx_kp_b_iso88591_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[27])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 69};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_count};
    __pyx_mstate_global->__pyx_codeobj_tab[28] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_lib_pyx, __pyx_mstate->__pyx_n_u_set_cpu_count, __pyx_mstate->__pyx_kp_b_iso88591_vRq_j, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[28])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 88};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[29] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_lib_pyx, __pyx_mstate->__pyx_n_u_is_threading_enabled, __pyx_mstate->__pyx_kp_b_iso88591_a_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[29])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 152};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pc_3};
    __pyx_mstate_global->__pyx_codeobj_tab[30] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_lib_pyx, __pyx_mstate->__pyx_n_u_pc_2, __pyx_mstate->__pyx_kp_b_iso88591_uCq_q_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[30])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 160};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pac_3};
    __pyx_mstate_global->__pyx_codeobj_tab[31] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_lib_pyx, __pyx_mstate->__pyx_n_u_pac_2, __pyx_mstate->__pyx_kp_b_iso88591_vS_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[31])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 168};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pyarrow_3, __pyx_mstate->__pyx_n_u_exc};
    __pyx_mstate_global->__pyx_codeobj_tab[32] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_lib_pyx, __pyx_mstate->__pyx_n_u_ensure_cuda_loaded, __pyx_mstate->__pyx_kp_b_iso88591_S_A_a_Cq_WA_k_EQa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[32])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 186};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[33] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_lib_pyx, __pyx_mstate->__pyx_n_u_gdb_test_session, __pyx_mstate->__pyx_kp_b_iso88591__32, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[33])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 19};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_path, __pyx_mstate->__pyx_n_u_encoded_path};
    __pyx_mstate_global->__pyx_codeobj_tab[34] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_compat_pxi, __pyx_mstate->__pyx_n_u_encode_file_path, __pyx_mstate->__pyx_kp_b_iso88591_z_t7_1_q_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[34])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 42};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_o};
    __pyx_mstate_global->__pyx_codeobj_tab[35] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_compat_pxi, __pyx_mstate->__pyx_n_u_tobytes, __pyx_mstate->__pyx_kp_b_iso88591_z_Q_q_q_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[35])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 1, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 57};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_o, __pyx_mstate->__pyx_n_u_safe};
    __pyx_mstate_global->__pyx_codeobj_tab[36] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_compat_pxi, __pyx_mstate->__pyx_n_u_frombytes, __pyx_mstate->__pyx_kp_b_iso88591_A_q_q_q_q_q_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[36])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 46};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[37] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_error_pxi, __pyx_mstate->__pyx_n_u_str, __pyx_mstate->__pyx_kp_b_iso88591_A_XQa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[37])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 72};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_message, __pyx_mstate->__pyx_n_u_signum};
    __pyx_mstate_global->__pyx_codeobj_tab[38] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_error_pxi, __pyx_mstate->__pyx_n_u_init, __pyx_mstate->__pyx_kp_b_iso88591_Ry_Ja, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[38])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[39] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[39])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state};
    __pyx_mstate_global->__pyx_codeobj_tab[40] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[40])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 169};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_enable};
    __pyx_mstate_global->__pyx_codeobj_tab[41] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_error_pxi, __pyx_mstate->__pyx_n_u_enable_signal_handlers, __pyx_mstate->__pyx_kp_b_iso88591_a_3, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[41])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 225};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_sig};
    __pyx_mstate_global->__pyx_codeobj_tab[42] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_error_pxi, __pyx_mstate->__pyx_n_u_init_signals, __pyx_mstate->__pyx_kp_b_iso88591_A_A_3i_1_A_D_q_ivQ_6_1E_q17z, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[42])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 233};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[43] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_error_pxi, __pyx_mstate->__pyx_n_u_enter, __pyx_mstate->__pyx_kp_b_iso88591_A_4q_8_Q_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[43])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 238};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_exc_type, __pyx_mstate->__pyx_n_u_exc_value, __pyx_mstate->__pyx_n_u_exc_tb, __pyx_mstate->__pyx_n_u_e};
    __pyx_mstate_global->__pyx_codeobj_tab[44] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_error_pxi, __pyx_mstate->__pyx_n_u_exit, __pyx_mstate->__pyx_kp_b_iso88591_A_4q_Q_S_AT_Q_Q_A_Qk_y_2V3a_ay_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[44])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[45] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[45])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state};
    __pyx_mstate_global->__pyx_codeobj_tab[46] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[46])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 31};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_c_info};
    __pyx_mstate_global->__pyx_codeobj_tab[47] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_config_pxi, __pyx_mstate->__pyx_n_u_runtime_info, __pyx_mstate->__pyx_kp_b_iso88591_1_a_9AV1_IQfA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[47])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 60};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_c_info, __pyx_mstate->__pyx_n_u_c_cpp_info, __pyx_mstate->__pyx_n_u_cpp_build_info};
    __pyx_mstate_global->__pyx_codeobj_tab[48] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_config_pxi, __pyx_mstate->__pyx_n_u_build_info, __pyx_mstate->__pyx_kp_b_iso88591_1Ja_Q_EQ_EQ_Yaz_2_1Ja_iq_39A_0, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[48])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 101};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_path, __pyx_mstate->__pyx_n_u_options};
    __pyx_mstate_global->__pyx_codeobj_tab[49] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_config_pxi, __pyx_mstate->__pyx_n_u_set_timezone_db_path, __pyx_mstate->__pyx_kp_b_iso88591_uG1_WAQ_1A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[49])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS), 118};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_args, __pyx_mstate->__pyx_n_u_kwargs};
    __pyx_mstate_global->__pyx_codeobj_tab[50] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_pandas_shim_pxi, __pyx_mstate->__pyx_n_u_series, __pyx_mstate->__pyx_kp_b_iso88591_A_N_t82XQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[50])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS), 122};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_args, __pyx_mstate->__pyx_n_u_kwargs};
    __pyx_mstate_global->__pyx_codeobj_tab[51] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_pandas_shim_pxi, __pyx_mstate->__pyx_n_u_data_frame, __pyx_mstate->__pyx_kp_b_iso88591_A_N_t_r, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[51])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 145};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_obj};
    __pyx_mstate_global->__pyx_codeobj_tab[52] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_pandas_shim_pxi, __pyx_mstate->__pyx_n_u_infer_dtype, __pyx_mstate->__pyx_kp_b_iso88591_A_N_4_auG1_4t4_1A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[52])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 152};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_dtype};
    __pyx_mstate_global->__pyx_codeobj_tab[53] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_pandas_shim_pxi, __pyx_mstate->__pyx_n_u_pandas_dtype, __pyx_mstate->__pyx_kp_b_iso88591_A_N_4_q_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[53])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 169};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[54] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_pandas_shim_pxi, __pyx_mstate->__pyx_n_u_is_v1, __pyx_mstate->__pyx_kp_b_iso88591_A_N_t1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[54])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 173};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[55] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_pandas_shim_pxi, __pyx_mstate->__pyx_n_u_is_ge_v21, __pyx_mstate->__pyx_kp_b_iso88591_A_N_t1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[55])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 177};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[56] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_pandas_shim_pxi, __pyx_mstate->__pyx_n_u_is_ge_v23, __pyx_mstate->__pyx_kp_b_iso88591_A_N_t1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[56])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 181};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[57] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_pandas_shim_pxi, __pyx_mstate->__pyx_n_u_is_ge_v3, __pyx_mstate->__pyx_kp_b_iso88591_A_N_t1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[57])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 185};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[58] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_pandas_shim_pxi, __pyx_mstate->__pyx_n_u_is_ge_v3_strict, __pyx_mstate->__pyx_kp_b_iso88591_A_N_t1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[58])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 189};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[59] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_pandas_shim_pxi, __pyx_mstate->__pyx_n_u_uses_string_dtype, __pyx_mstate->__pyx_kp_b_iso88591_A_4_q_1_t_S_D_87_q_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[59])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 214};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_obj};
    __pyx_mstate_global->__pyx_codeobj_tab[60] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_pandas_shim_pxi, __pyx_mstate->__pyx_n_u_is_array_like, __pyx_mstate->__pyx_kp_b_iso88591_A_N_z_t1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[60])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 218};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_obj};
    __pyx_mstate_global->__pyx_codeobj_tab[61] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_pandas_shim_pxi, __pyx_mstate->__pyx_n_u_is_categorical, __pyx_mstate->__pyx_kp_b_iso88591_A_4_Q_Qe4q_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[61])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 224};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_obj};
    __pyx_mstate_global->__pyx_codeobj_tab[62] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_pandas_shim_pxi, __pyx_mstate->__pyx_n_u_is_datetimetz, __pyx_mstate->__pyx_kp_b_iso88591_A_4_Q_Qe4q_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[62])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 230};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_obj};
    __pyx_mstate_global->__pyx_codeobj_tab[63] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_pandas_shim_pxi, __pyx_mstate->__pyx_n_u_is_extension_array_dtype, __pyx_mstate->__pyx_kp_b_iso88591_A_N_4q_4_1_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[63])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 237};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_obj};
    __pyx_mstate_global->__pyx_codeobj_tab[64] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_pandas_shim_pxi, __pyx_mstate->__pyx_n_u_is_sparse, __pyx_mstate->__pyx_kp_b_iso88591_A_4_Q_Qc_S_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[64])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 243};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_obj};
    __pyx_mstate_global->__pyx_codeobj_tab[65] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_pandas_shim_pxi, __pyx_mstate->__pyx_n_u_is_data_frame, __pyx_mstate->__pyx_kp_b_iso88591_A_4_Q_Qe4q_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[65])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 249};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_obj};
    __pyx_mstate_global->__pyx_codeobj_tab[66] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_pandas_shim_pxi, __pyx_mstate->__pyx_n_u_is_series, __pyx_mstate->__pyx_kp_b_iso88591_A_4_Q_Qe4q_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[66])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 255};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_obj};
    __pyx_mstate_global->__pyx_codeobj_tab[67] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_pandas_shim_pxi, __pyx_mstate->__pyx_n_u_is_index, __pyx_mstate->__pyx_kp_b_iso88591_A_4_Q_Qe4q_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[67])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 261};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_obj};
    __pyx_mstate_global->__pyx_codeobj_tab[68] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_pandas_shim_pxi, __pyx_mstate->__pyx_n_u_get_values, __pyx_mstate->__pyx_kp_b_iso88591_A_N_Qc_c_V1_c_V1_3a_s, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[68])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 274};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_level, __pyx_mstate->__pyx_n_u_name};
    __pyx_mstate_global->__pyx_codeobj_tab[69] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_pandas_shim_pxi, __pyx_mstate->__pyx_n_u_get_rangeindex_attribute, __pyx_mstate->__pyx_kp_b_iso88591_A_N_7_7_7_7_wawd_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[69])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_state, __pyx_mstate->__pyx_n_u_dict_2, __pyx_mstate->__pyx_n_u_use_setstate};
    __pyx_mstate_global->__pyx_codeobj_tab[70] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_T_T_TARRVVddhh_S_S_W_W_j_j_n_n, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[70])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 16};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state};
    __pyx_mstate_global->__pyx_codeobj_tab[71] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_AV1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[71])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 38};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pool};
    __pyx_mstate_global->__pyx_codeobj_tab[72] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_memory_pxi, __pyx_mstate->__pyx_n_u_release_unused, __pyx_mstate->__pyx_kp_b_iso88591_A_2_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[72])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 53};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[73] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_memory_pxi, __pyx_mstate->__pyx_n_u_bytes_allocated_2, __pyx_mstate->__pyx_kp_b_iso88591_A_t5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[73])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 60};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[74] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_memory_pxi, __pyx_mstate->__pyx_n_u_total_bytes_allocated, __pyx_mstate->__pyx_kp_b_iso88591_A_t5_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[74])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 67};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_ret};
    __pyx_mstate_global->__pyx_codeobj_tab[75] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_memory_pxi, __pyx_mstate->__pyx_n_u_max_memory_2, __pyx_mstate->__pyx_kp_b_iso88591_A_d_wd_WA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[75])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 78};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[76] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_memory_pxi, __pyx_mstate->__pyx_n_u_num_allocations, __pyx_mstate->__pyx_kp_b_iso88591_A_t5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[76])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 85};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[77] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_memory_pxi, __pyx_mstate->__pyx_n_u_print_stats, __pyx_mstate->__pyx_kp_b_iso88591_A_3, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[77])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[78] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[78])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state};
    __pyx_mstate_global->__pyx_codeobj_tab[79] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[79])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[80] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[80])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state};
    __pyx_mstate_global->__pyx_codeobj_tab[81] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[81])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[82] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[82])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state};
    __pyx_mstate_global->__pyx_codeobj_tab[83] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[83])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 146};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pool};
    __pyx_mstate_global->__pyx_codeobj_tab[84] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_memory_pxi, __pyx_mstate->__pyx_n_u_default_memory_pool, __pyx_mstate->__pyx_kp_b_iso88591_HAQ_Q_q_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[84])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 161};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_parent, __pyx_mstate->__pyx_n_u_out};
    __pyx_mstate_global->__pyx_codeobj_tab[85] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_memory_pxi, __pyx_mstate->__pyx_n_u_proxy_memory_pool, __pyx_mstate->__pyx_kp_b_iso88591_haq_QfA_uAS_4q_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[85])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 177};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_parent, __pyx_mstate->__pyx_n_u_out};
    __pyx_mstate_global->__pyx_codeobj_tab[86] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_memory_pxi, __pyx_mstate->__pyx_n_u_logging_memory_pool, __pyx_mstate->__pyx_kp_b_iso88591_2_1_F_1_uAS_T_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[86])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 194};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pool};
    __pyx_mstate_global->__pyx_codeobj_tab[87] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_memory_pxi, __pyx_mstate->__pyx_n_u_system_memory_pool, __pyx_mstate->__pyx_kp_b_iso88591_HAQ_Q_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[87])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 204};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_c_pool, __pyx_mstate->__pyx_n_u_pool};
    __pyx_mstate_global->__pyx_codeobj_tab[88] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_memory_pxi, __pyx_mstate->__pyx_n_u_jemalloc_memory_pool, __pyx_mstate->__pyx_kp_b_iso88591_HAQ_q_Qa_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[88])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 218};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_c_pool, __pyx_mstate->__pyx_n_u_pool};
    __pyx_mstate_global->__pyx_codeobj_tab[89] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_memory_pxi, __pyx_mstate->__pyx_n_u_mimalloc_memory_pool, __pyx_mstate->__pyx_kp_b_iso88591_HAQ_q_Qa_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[89])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 232};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pool};
    __pyx_mstate_global->__pyx_codeobj_tab[90] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_memory_pxi, __pyx_mstate->__pyx_n_u_set_memory_pool, __pyx_mstate->__pyx_kp_b_iso88591_Qd, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[90])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 249};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_enable};
    __pyx_mstate_global->__pyx_codeobj_tab[91] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_memory_pxi, __pyx_mstate->__pyx_n_u_log_memory_allocations, __pyx_mstate->__pyx_kp_b_iso88591_1_q_q_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[91])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 264};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pool};
    __pyx_mstate_global->__pyx_codeobj_tab[92] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_memory_pxi, __pyx_mstate->__pyx_n_u_total_allocated_bytes, __pyx_mstate->__pyx_kp_b_iso88591_a_4_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[92])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 273};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_decay_ms};
    __pyx_mstate_global->__pyx_codeobj_tab[93] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_memory_pxi, __pyx_mstate->__pyx_n_u_jemalloc_set_decay_ms, __pyx_mstate->__pyx_kp_b_iso88591__33, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[93])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 291};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_backends, __pyx_mstate->__pyx_n_u_backend};
    __pyx_mstate_global->__pyx_codeobj_tab[94] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_memory_pxi, __pyx_mstate->__pyx_n_u_supported_memory_backends, __pyx_mstate->__pyx_kp_b_iso88591_1G7_T_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[94])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[95] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[95])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state};
    __pyx_mstate_global->__pyx_codeobj_tab[96] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[96])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[97] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[97])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state};
    __pyx_mstate_global->__pyx_codeobj_tab[98] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[98])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 161};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[99] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_device_pxi, __pyx_mstate->__pyx_n_u_default_cpu_memory_manager, __pyx_mstate->__pyx_kp_b_iso88591_Q_3, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[99])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 39};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[100] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_get_pandas_type_map, __pyx_mstate->__pyx_kp_b_iso88591_t1_q_b_1_1_1_1_A_A_A_b_1_A_F_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[100])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 160};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_type};
    __pyx_mstate_global->__pyx_codeobj_tab[101] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_is_primitive, __pyx_mstate->__pyx_kp_b_iso88591_q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[101])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 165};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_arrow_type, __pyx_mstate->__pyx_n_u_coerce_to_ns, __pyx_mstate->__pyx_n_u_type_id, __pyx_mstate->__pyx_n_u_pandas_type_map, __pyx_mstate->__pyx_n_u_pandas_type, __pyx_mstate->__pyx_n_u_unit};
    __pyx_mstate_global->__pyx_codeobj_tab[102] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_get_pandas_type, __pyx_mstate->__pyx_kp_b_iso88591_4A_xwa_q_q_83a_2V1A_r_q_z_q_wa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[102])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 182};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_arrow_type, __pyx_mstate->__pyx_n_u_coerce_to_ns, __pyx_mstate->__pyx_n_u_make_datetimetz, __pyx_mstate->__pyx_n_u_unit};
    __pyx_mstate_global->__pyx_codeobj_tab[103] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_get_pandas_tz_type, __pyx_mstate->__pyx_kp_b_iso88591_A_a_8_Zq_6_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[103])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 188};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_arrow_type, __pyx_mstate->__pyx_n_u_options, __pyx_mstate->__pyx_n_u_coerce_to_ns, __pyx_mstate->__pyx_n_u_dtype};
    __pyx_mstate_global->__pyx_codeobj_tab[104] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_to_pandas_dtype, __pyx_mstate->__pyx_kp_b_iso88591_HD_t1_K8ST_6_D_a_6a_wa_6_1L_Q_t, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[104])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 238};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_i};
    __pyx_mstate_global->__pyx_codeobj_tab[105] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_field, __pyx_mstate->__pyx_kp_b_iso88591_A_4z_Q_1_AT_q_4uKq_e6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[105])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 358};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[106] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_reduce, __pyx_mstate->__pyx_kp_b_iso88591_A_1A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[106])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 1, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 370};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_other, __pyx_mstate->__pyx_n_u_check_metadata, __pyx_mstate->__pyx_n_u_other_type, __pyx_mstate->__pyx_n_u_c_check_metadata};
    __pyx_mstate_global->__pyx_codeobj_tab[107] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_equals, __pyx_mstate->__pyx_kp_b_iso88591_a4_1_t5_q_j, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[107])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 400};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[108] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_to_pandas_dtype_2, __pyx_mstate->__pyx_kp_b_iso88591_A_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[108])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 412};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_out_ptr};
    __pyx_mstate_global->__pyx_codeobj_tab[109] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_export_to_c, __pyx_mstate->__pyx_kp_b_iso88591_A_AZq_d_AQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[109])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 423};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_in_ptr, __pyx_mstate->__pyx_n_u_result};
    __pyx_mstate_global->__pyx_codeobj_tab[110] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_import_from_c, __pyx_mstate->__pyx_kp_b_iso88591_A_q_1_8_Qa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[110])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 434};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_c_schema, __pyx_mstate->__pyx_n_u_capsule};
    __pyx_mstate_global->__pyx_codeobj_tab[111] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_arrow_c_schema, __pyx_mstate->__pyx_kp_b_iso88591_A_1F_ha_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[111])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 448};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_schema, __pyx_mstate->__pyx_n_u_c_schema, __pyx_mstate->__pyx_n_u_c_type};
    __pyx_mstate_global->__pyx_codeobj_tab[112] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_import_from_c_capsule, __pyx_mstate->__pyx_kp_b_iso88591_A_4_1_6axq_1Jaq_Qa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[112])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[113] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[113])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state};
    __pyx_mstate_global->__pyx_codeobj_tab[114] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[114])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 502};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[115] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_reduce, __pyx_mstate->__pyx_kp_b_iso88591_A_D_T_d, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[115])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 565};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[116] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_reduce, __pyx_mstate->__pyx_kp_b_iso88591_A_xt1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[116])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 613};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[117] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_reduce, __pyx_mstate->__pyx_kp_b_iso88591_A_D, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[117])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 651};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[118] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_reduce, __pyx_mstate->__pyx_kp_b_iso88591_A_4q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[118])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 699};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[119] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_reduce, __pyx_mstate->__pyx_kp_b_iso88591_A_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[119])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 748};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[120] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_reduce, __pyx_mstate->__pyx_kp_b_iso88591_A_wd_d, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[120])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 834};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[121] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_reduce, __pyx_mstate->__pyx_kp_b_iso88591_A_xt_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[121])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 946};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_name};
    __pyx_mstate_global->__pyx_codeobj_tab[122] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_get_field_index, __pyx_mstate->__pyx_kp_b_iso88591_A_t_QgQa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[122])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 979};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_i};
    __pyx_mstate_global->__pyx_codeobj_tab[123] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_field, __pyx_mstate->__pyx_kp_b_iso88591_A8_Qd_4_Qa_q_1_6_1A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[123])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1014};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_name};
    __pyx_mstate_global->__pyx_codeobj_tab[124] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_get_all_field_indices, __pyx_mstate->__pyx_kp_b_iso88591_A_t_2_7_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[124])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1057};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[125] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_reduce, __pyx_mstate->__pyx_kp_b_iso88591_A_y_AQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[125])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1169};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_i};
    __pyx_mstate_global->__pyx_codeobj_tab[126] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_field, __pyx_mstate->__pyx_kp_b_iso88591_A_Qc_6_1A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[126])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1201};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[127] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_reduce, __pyx_mstate->__pyx_kp_b_iso88591_A_xt1G4wd, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[127])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1299};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[128] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_reduce, __pyx_mstate->__pyx_kp_b_iso88591_A_4wd, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[128])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1423};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[129] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_reduce, __pyx_mstate->__pyx_kp_b_iso88591_A_y_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[129])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1444};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[130] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_reduce, __pyx_mstate->__pyx_kp_b_iso88591_A_4_4q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[130])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1493};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[131] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_reduce, __pyx_mstate->__pyx_kp_b_iso88591_A_4_4q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[131])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1542};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[132] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_reduce, __pyx_mstate->__pyx_kp_b_iso88591_A_D_D, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[132])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1591};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[133] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_reduce, __pyx_mstate->__pyx_kp_b_iso88591_A_D_D, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[133])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1632};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[134] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_reduce, __pyx_mstate->__pyx_kp_b_iso88591_A__D, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[134])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1653};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[135] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_arrow_ext_class, __pyx_mstate->__pyx_kp_b_iso88591_A_q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[135])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1659};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[136] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_arrow_ext_scalar_class, __pyx_mstate->__pyx_kp_b_iso88591_A_q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[136])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1697};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_storage, __pyx_mstate->__pyx_n_u_c_storage_type};
    __pyx_mstate_global->__pyx_codeobj_tab[137] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_wrap_array, __pyx_mstate->__pyx_kp_b_iso88591_A_Qiq_hhc_a_q_oX_5_1_7q_q_4_T_7, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[137])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1887};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[138] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_arrow_ext_serialize, __pyx_mstate->__pyx_kp_b_iso88591_A_q_3, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[138])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1899};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_storage_type, __pyx_mstate->__pyx_n_u_serialized};
    __pyx_mstate_global->__pyx_codeobj_tab[139] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_arrow_ext_deserialize, __pyx_mstate->__pyx_kp_b_iso88591_A_q_3, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[139])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1911};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[140] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_reduce, __pyx_mstate->__pyx_kp_b_iso88591_A_t_0_O4G, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[140])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1914};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[141] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_arrow_ext_class, __pyx_mstate->__pyx_kp_b_iso88591_A_q_4, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[141])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1924};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[142] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_arrow_ext_scalar_class, __pyx_mstate->__pyx_kp_b_iso88591_A_q_4, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[142])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1962};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[143] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_arrow_ext_class, __pyx_mstate->__pyx_kp_b_iso88591_A_q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[143])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1965};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[144] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_reduce, __pyx_mstate->__pyx_kp_b_iso88591_A_xt1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[144])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1968};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[145] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_arrow_ext_scalar_class, __pyx_mstate->__pyx_kp_b_iso88591_A_q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[145])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1981};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[146] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_arrow_ext_class, __pyx_mstate->__pyx_kp_b_iso88591_A_q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[146])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1984};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[147] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_reduce, __pyx_mstate->__pyx_kp_b_iso88591_A_vQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[147])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1987};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[148] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_arrow_ext_scalar_class, __pyx_mstate->__pyx_kp_b_iso88591_A_q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[148])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2052};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[149] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_arrow_ext_class, __pyx_mstate->__pyx_kp_b_iso88591_A_q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[149])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2055};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[150] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_reduce, __pyx_mstate->__pyx_kp_b_iso88591_A_D_T_D, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[150])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2059};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[151] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_arrow_ext_scalar_class, __pyx_mstate->__pyx_kp_b_iso88591_A_q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[151])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2084};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[152] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_arrow_ext_class, __pyx_mstate->__pyx_kp_b_iso88591_A_q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[152])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2087};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[153] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_reduce, __pyx_mstate->__pyx_kp_b_iso88591_A_wa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[153])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2090};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[154] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_arrow_ext_scalar_class, __pyx_mstate->__pyx_kp_b_iso88591_A_q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[154])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2128};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[155] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_arrow_ext_class, __pyx_mstate->__pyx_kp_b_iso88591_A_q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[155])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2131};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[156] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_reduce, __pyx_mstate->__pyx_kp_b_iso88591_A_y_O4_4q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[156])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2134};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[157] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_arrow_ext_scalar_class, __pyx_mstate->__pyx_kp_b_iso88591_A_q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[157])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2158};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[158] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_arrow_ext_serialize, __pyx_mstate->__pyx_kp_b_iso88591_A_t1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[158])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2161};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_storage_type, __pyx_mstate->__pyx_n_u_serialized};
    __pyx_mstate_global->__pyx_codeobj_tab[159] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_arrow_ext_deserialize, __pyx_mstate->__pyx_kp_b_iso88591_A_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[159])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2169};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_ext_type, __pyx_mstate->__pyx_n_u_type_3};
    __pyx_mstate_global->__pyx_codeobj_tab[160] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_register_extension_type, __pyx_mstate->__pyx_kp_b_iso88591_f_A_t_QgQ_iq_q_8_Q_G1A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[160])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2233};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_type_name, __pyx_mstate->__pyx_n_u_c_type_name};
    __pyx_mstate_global->__pyx_codeobj_tab[161] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_unregister_extension_type, __pyx_mstate->__pyx_kp_b_iso88591_waq_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[161])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2335};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_other};
    __pyx_mstate_global->__pyx_codeobj_tab[162] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_equals, __pyx_mstate->__pyx_kp_b_iso88591_A_t9G1F_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[162])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2380};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[163] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_reduce, __pyx_mstate->__pyx_kp_b_iso88591_A_at6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[163])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2383};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_i};
    __pyx_mstate_global->__pyx_codeobj_tab[164] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_key, __pyx_mstate->__pyx_kp_b_iso88591_A_t9D, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[164])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2395};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_i};
    __pyx_mstate_global->__pyx_codeobj_tab[165] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_kp_b_iso88591_A_t9F_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[165])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2419};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_key, __pyx_mstate->__pyx_n_u_k, __pyx_mstate->__pyx_n_u_v};
    __pyx_mstate_global->__pyx_codeobj_tab[166] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_get_all, __pyx_mstate->__pyx_kp_b_iso88591_A_gQa_q_c_d_3b_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[166])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2432};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_key, __pyx_mstate->__pyx_n_u_result, __pyx_mstate->__pyx_n_u_i};
    __pyx_mstate_global->__pyx_codeobj_tab[167] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_to_dict, __pyx_mstate->__pyx_kp_b_iso88591_A_Q_E_at9E_it1A_t7_awd_6_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[167])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2446};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_meta, __pyx_mstate->__pyx_n_u_allow_none};
    __pyx_mstate_global->__pyx_codeobj_tab[168] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_ensure_metadata, __pyx_mstate->__pyx_kp_b_iso88591_Fa_e3a_q_1F_q_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[168])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2497};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_other, __pyx_mstate->__pyx_n_u_check_metadata};
    __pyx_mstate_global->__pyx_codeobj_tab[169] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_equals, __pyx_mstate->__pyx_kp_b_iso88591_6a0_t6_uIQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[169])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2529};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[170] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_reduce, __pyx_mstate->__pyx_kp_b_iso88591_A_xt7_gT_D, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[170])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2595};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_metadata, __pyx_mstate->__pyx_n_u_c_field, __pyx_mstate->__pyx_n_u_meta};
    __pyx_mstate_global->__pyx_codeobj_tab[171] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_with_metadata, __pyx_mstate->__pyx_kp_b_iso88591_A8_a_4A_d_Qd, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[171])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2629};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_new_field};
    __pyx_mstate_global->__pyx_codeobj_tab[172] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_remove_metadata, __pyx_mstate->__pyx_kp_b_iso88591_A_F, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[172])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2655};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_new_type, __pyx_mstate->__pyx_n_u_c_field, __pyx_mstate->__pyx_n_u_c_datatype};
    __pyx_mstate_global->__pyx_codeobj_tab[173] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_with_type, __pyx_mstate->__pyx_kp_b_iso88591_A_Qa_d, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[173])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2690};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_name, __pyx_mstate->__pyx_n_u_c_field};
    __pyx_mstate_global->__pyx_codeobj_tab[174] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_with_name, __pyx_mstate->__pyx_kp_b_iso88591_A8_fIQgQa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[174])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2722};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_nullable, __pyx_mstate->__pyx_n_u_field, __pyx_mstate->__pyx_n_u_c_nullable, __pyx_mstate->__pyx_n_u_c_field};
    __pyx_mstate_global->__pyx_codeobj_tab[175] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_with_nullable, __pyx_mstate->__pyx_kp_b_iso88591_AB_T_d_Qa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[175])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2761};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_flattened, __pyx_mstate->__pyx_n_u_f};
    __pyx_mstate_global->__pyx_codeobj_tab[176] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_flatten, __pyx_mstate->__pyx_kp_b_iso88591_A0_F_q_3d_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[176])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2789};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_out_ptr};
    __pyx_mstate_global->__pyx_codeobj_tab[177] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_export_to_c, __pyx_mstate->__pyx_kp_b_iso88591_A_A_t1_0_Qa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[177])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2800};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_in_ptr, __pyx_mstate->__pyx_n_u_c_ptr, __pyx_mstate->__pyx_n_u_result};
    __pyx_mstate_global->__pyx_codeobj_tab[178] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_import_from_c, __pyx_mstate->__pyx_kp_b_iso88591_A_1Kq_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[178])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2812};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_c_schema, __pyx_mstate->__pyx_n_u_capsule};
    __pyx_mstate_global->__pyx_codeobj_tab[179] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_arrow_c_schema, __pyx_mstate->__pyx_kp_b_iso88591_A_AV4y_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[179])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2826};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_schema, __pyx_mstate->__pyx_n_u_c_schema, __pyx_mstate->__pyx_n_u_c_field};
    __pyx_mstate_global->__pyx_codeobj_tab[180] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_import_from_c_capsule, __pyx_mstate->__pyx_kp_b_iso88591_A_4_A_6axq_nA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[180])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2917};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[181] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_reduce, __pyx_mstate->__pyx_kp_b_iso88591_A_y_AWD, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[181])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2924};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_size, __pyx_mstate->__pyx_n_u_key, __pyx_mstate->__pyx_n_u_value};
    __pyx_mstate_global->__pyx_codeobj_tab[182] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_sizeof, __pyx_mstate->__pyx_kp_b_iso88591_A_q_4q_Yd_6_Qa_Qa_uBe1HE_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[182])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3044};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_arrays, __pyx_mstate->__pyx_n_u_field};
    __pyx_mstate_global->__pyx_codeobj_tab[183] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_empty_table, __pyx_mstate->__pyx_kp_b_iso88591_A2_auG4y_uL, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[183])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3072};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_other, __pyx_mstate->__pyx_n_u_check_metadata};
    __pyx_mstate_global->__pyx_codeobj_tab[184] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_equals, __pyx_mstate->__pyx_kp_b_iso88591_H_t_T_7_6_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[184])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 10, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3111};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_df, __pyx_mstate->__pyx_n_u_preserve_index, __pyx_mstate->__pyx_n_u_dataframe_to_types, __pyx_mstate->__pyx_n_u_names, __pyx_mstate->__pyx_n_u_types, __pyx_mstate->__pyx_n_u_metadata, __pyx_mstate->__pyx_n_u_fields, __pyx_mstate->__pyx_n_u_name, __pyx_mstate->__pyx_n_u_type_4};
    __pyx_mstate_global->__pyx_codeobj_tab[185] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_from_pandas, __pyx_mstate->__pyx_kp_b_iso88591_A_F_wk_31_1_F_3awa_q_a_vQha, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[185])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3157};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_field_index};
    __pyx_mstate_global->__pyx_codeobj_tab[186] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_field, __pyx_mstate->__pyx_kp_b_iso88591_A_Qd_aq_2Q_hay_t7_1_q_1_4waq_1A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[186])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3197};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_index};
    __pyx_mstate_global->__pyx_codeobj_tab[187] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_field_2, __pyx_mstate->__pyx_kp_b_iso88591_A_q_4wk_gV1A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[187])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3212};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_name, __pyx_mstate->__pyx_n_u_results};
    __pyx_mstate_global->__pyx_codeobj_tab[188] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_field_by_name, __pyx_mstate->__pyx_kp_b_iso88591_A_Q_a_g_0_7_s_Q_1_E_Ba_E_1_QgQa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[188])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3241};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_name};
    __pyx_mstate_global->__pyx_codeobj_tab[189] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_get_field_index, __pyx_mstate->__pyx_kp_b_iso88591_AL_t7, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[189])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3281};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_name};
    __pyx_mstate_global->__pyx_codeobj_tab[190] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_get_all_field_indices, __pyx_mstate->__pyx_kp_b_iso88591_A4_t7_QgQa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[190])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3309};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_field};
    __pyx_mstate_global->__pyx_codeobj_tab[191] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_append, __pyx_mstate->__pyx_kp_b_iso88591_AJ_t7_4wk_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[191])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3348};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_field, __pyx_mstate->__pyx_n_u_new_schema, __pyx_mstate->__pyx_n_u_c_field};
    __pyx_mstate_global->__pyx_codeobj_tab[192] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_insert, __pyx_mstate->__pyx_kp_b_iso88591_A_q_q_G9AS_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[192])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3386};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_new_schema};
    __pyx_mstate_global->__pyx_codeobj_tab[193] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_remove, __pyx_mstate->__pyx_kp_b_iso88591_A4_q_G_q_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[193])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3417};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_field, __pyx_mstate->__pyx_n_u_new_schema, __pyx_mstate->__pyx_n_u_c_field};
    __pyx_mstate_global->__pyx_codeobj_tab[194] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_set, __pyx_mstate->__pyx_kp_b_iso88591_A_q_q_G9AS_1_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[194])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3454};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_metadata};
    __pyx_mstate_global->__pyx_codeobj_tab[195] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_add_metadata, __pyx_mstate->__pyx_kp_b_iso88591_A_Qa1_1_t, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[195])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3467};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_metadata, __pyx_mstate->__pyx_n_u_c_schema, __pyx_mstate->__pyx_n_u_meta};
    __pyx_mstate_global->__pyx_codeobj_tab[196] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_with_metadata, __pyx_mstate->__pyx_kp_b_iso88591_A_a_4A_t7_q_G1_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[196])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3503};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_memory_pool, __pyx_mstate->__pyx_n_u_buffer, __pyx_mstate->__pyx_n_u_pool};
    __pyx_mstate_global->__pyx_codeobj_tab[197] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_serialize, __pyx_mstate->__pyx_kp_b_iso88591_A6_7q_1O1F_a45_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[197])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3537};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_new_schema};
    __pyx_mstate_global->__pyx_codeobj_tab[198] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_remove_metadata, __pyx_mstate->__pyx_kp_b_iso88591_A8_WO1_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[198])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3569};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_truncate_metadata, __pyx_mstate->__pyx_n_u_show_field_metadata, __pyx_mstate->__pyx_n_u_show_schema_metadata, __pyx_mstate->__pyx_n_u_element_size_limit, __pyx_mstate->__pyx_n_u_result, __pyx_mstate->__pyx_n_u_options};
    __pyx_mstate_global->__pyx_codeobj_tab[199] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_to_string, __pyx_mstate->__pyx_kp_b_iso88591_DA_9A_z_A_a_q_Q_1_a_Q_y_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[199])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3611};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_out_ptr};
    __pyx_mstate_global->__pyx_codeobj_tab[200] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_export_to_c, __pyx_mstate->__pyx_kp_b_iso88591_A_A_A_1_aq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[200])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3622};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_in_ptr, __pyx_mstate->__pyx_n_u_c_ptr, __pyx_mstate->__pyx_n_u_result};
    __pyx_mstate_global->__pyx_codeobj_tab[201] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_import_from_c, __pyx_mstate->__pyx_kp_b_iso88591_A_1L_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[201])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3640};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_c_schema, __pyx_mstate->__pyx_n_u_capsule};
    __pyx_mstate_global->__pyx_codeobj_tab[202] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_arrow_c_schema, __pyx_mstate->__pyx_kp_b_iso88591_A_QfD_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[202])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3654};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_schema, __pyx_mstate->__pyx_n_u_c_schema, __pyx_mstate->__pyx_n_u_result};
    __pyx_mstate_global->__pyx_codeobj_tab[203] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_import_from_c_capsule, __pyx_mstate->__pyx_kp_b_iso88591_A_4_A_6axq_1L_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[203])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 1, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3693};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_schemas, __pyx_mstate->__pyx_n_u_promote_options, __pyx_mstate->__pyx_n_u_schema, __pyx_mstate->__pyx_n_u_c_options, __pyx_mstate->__pyx_n_u_c_schemas};
    __pyx_mstate_global->__pyx_codeobj_tab[204] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_unify_schemas, __pyx_mstate->__pyx_kp_b_iso88591_aN_4z_1_31D_1_1_1_a_a_1Kq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[204])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 8, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3761};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_name, __pyx_mstate->__pyx_n_u_type, __pyx_mstate->__pyx_n_u_nullable, __pyx_mstate->__pyx_n_u_metadata, __pyx_mstate->__pyx_n_u_field, __pyx_mstate->__pyx_n_u_result, __pyx_mstate->__pyx_n_u_type_3, __pyx_mstate->__pyx_n_u_c_meta};
    __pyx_mstate_global->__pyx_codeobj_tab[205] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_field, __pyx_mstate->__pyx_kp_b_iso88591_b_wavQ_5_q_A_AT1DA_9G1_E_q_9G1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[205])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3858};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[206] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_null, __pyx_mstate->__pyx_kp_b_iso88591__34, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[206])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3880};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[207] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_bool, __pyx_mstate->__pyx_kp_b_iso88591__35, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[207])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3903};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[208] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_uint8, __pyx_mstate->__pyx_kp_b_iso88591_0, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[208])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3930};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[209] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_int8, __pyx_mstate->__pyx_kp_b_iso88591_0, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[209])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3957};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[210] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_uint16, __pyx_mstate->__pyx_kp_b_iso88591_0, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[210])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3984};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[211] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_int16, __pyx_mstate->__pyx_kp_b_iso88591_0, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[211])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4011};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[212] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_uint32, __pyx_mstate->__pyx_kp_b_iso88591_0, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[212])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4038};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[213] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_int32, __pyx_mstate->__pyx_kp_b_iso88591_0, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[213])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4065};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[214] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_uint64, __pyx_mstate->__pyx_kp_b_iso88591_0, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[214])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4092};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[215] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_int64, __pyx_mstate->__pyx_kp_b_iso88591_0, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[215])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4148};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_tz};
    __pyx_mstate_global->__pyx_codeobj_tab[216] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_tzinfo_to_string, __pyx_mstate->__pyx_kp_b_iso88591_9A_1N_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[216])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4169};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_name, __pyx_mstate->__pyx_n_u_tz};
    __pyx_mstate_global->__pyx_codeobj_tab[217] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_string_to_tzinfo, __pyx_mstate->__pyx_kp_b_iso88591_a_Qd_Qa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[217])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4192};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_unit, __pyx_mstate->__pyx_n_u_tz, __pyx_mstate->__pyx_n_u_unit_code, __pyx_mstate->__pyx_n_u_c_timezone, __pyx_mstate->__pyx_n_u_out};
    __pyx_mstate_global->__pyx_codeobj_tab[218] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_timestamp, __pyx_mstate->__pyx_kp_b_iso88591_AP_1_1_s_Q_5_1A_S_Qm1_4z_wa_WAQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[218])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4251};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_unit, __pyx_mstate->__pyx_n_u_unit_code, __pyx_mstate->__pyx_n_u_c_timezone, __pyx_mstate->__pyx_n_u_out};
    __pyx_mstate_global->__pyx_codeobj_tab[219] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_time32, __pyx_mstate->__pyx_kp_b_iso88591_2_uCq_A_c_A_j_9_z_A_q_HAQ_uAWAQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[219])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4294};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_unit, __pyx_mstate->__pyx_n_u_unit_code, __pyx_mstate->__pyx_n_u_c_timezone, __pyx_mstate->__pyx_n_u_out};
    __pyx_mstate_global->__pyx_codeobj_tab[220] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_time64, __pyx_mstate->__pyx_kp_b_iso88591_2_uCq_A_c_A_j_9_z_A_q_HAQ_uAWAQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[220])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4337};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_unit, __pyx_mstate->__pyx_n_u_unit_code, __pyx_mstate->__pyx_n_u_out};
    __pyx_mstate_global->__pyx_codeobj_tab[221] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_duration, __pyx_mstate->__pyx_kp_b_iso88591_J_1_z_A_1A_L_uAYaq_a_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[221])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4387};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[222] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_month_day_nano_interval, __pyx_mstate->__pyx_kp_b_iso88591__36, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[222])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4408};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[223] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_date32, __pyx_mstate->__pyx_kp_b_iso88591__36, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[223])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4429};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[224] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_date64, __pyx_mstate->__pyx_kp_b_iso88591__36, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[224])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4450};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[225] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_float16, __pyx_mstate->__pyx_kp_b_iso88591__37, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[225])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4484};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[226] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_float32, __pyx_mstate->__pyx_kp_b_iso88591_0, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[226])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4511};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[227] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_float64, __pyx_mstate->__pyx_kp_b_iso88591_0, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[227])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4538};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_precision, __pyx_mstate->__pyx_n_u_scale};
    __pyx_mstate_global->__pyx_codeobj_tab[228] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_decimal32, __pyx_mstate->__pyx_kp_b_iso88591_2_b_z_2S_A_j_a_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[228])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4593};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_precision, __pyx_mstate->__pyx_n_u_scale};
    __pyx_mstate_global->__pyx_codeobj_tab[229] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_decimal64, __pyx_mstate->__pyx_kp_b_iso88591_2_b_z_2S_A_j_a_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[229])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4648};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_precision, __pyx_mstate->__pyx_n_u_scale};
    __pyx_mstate_global->__pyx_codeobj_tab[230] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_decimal128, __pyx_mstate->__pyx_kp_b_iso88591_31b_z_2S_A_j_a_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[230])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4703};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_precision, __pyx_mstate->__pyx_n_u_scale};
    __pyx_mstate_global->__pyx_codeobj_tab[231] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_decimal256, __pyx_mstate->__pyx_kp_b_iso88591_312_z_2S_A_j_a_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[231])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4734};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[232] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_string, __pyx_mstate->__pyx_kp_b_iso88591__38, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[232])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4759};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[233] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_utf8, __pyx_mstate->__pyx_kp_b_iso88591_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[233])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4784};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_length, __pyx_mstate->__pyx_n_u_fixed_size_binary_type};
    __pyx_mstate_global->__pyx_codeobj_tab[234] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_binary, __pyx_mstate->__pyx_kp_b_iso88591_1X_wd_Qa_9, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[234])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4836};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[235] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_large_binary, __pyx_mstate->__pyx_kp_b_iso88591_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[235])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4864};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[236] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_large_string, __pyx_mstate->__pyx_kp_b_iso88591_6_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[236])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4894};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[237] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_large_utf8, __pyx_mstate->__pyx_kp_b_iso88591_0_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[237])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4921};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[238] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_binary_view, __pyx_mstate->__pyx_kp_b_iso88591__39, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[238])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4936};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[239] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_string_view, __pyx_mstate->__pyx_kp_b_iso88591__39, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[239])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4951};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_value_type, __pyx_mstate->__pyx_n_u_list_size, __pyx_mstate->__pyx_n_u_field_2, __pyx_mstate->__pyx_n_u_list_type};
    __pyx_mstate_global->__pyx_codeobj_tab[240] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_list, __pyx_mstate->__pyx_kp_b_iso88591_ab_z_a_axq_1L_iq_z_Q_q_QfA_Rq_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[240])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5017};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_value_type};
    __pyx_mstate_global->__pyx_codeobj_tab[241] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_large_list, __pyx_mstate->__pyx_kp_b_iso88591_V_M_z_a_axq_1L_iq_V1_avQ_uAQ_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[241])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5074};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_value_type};
    __pyx_mstate_global->__pyx_codeobj_tab[242] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_list_view, __pyx_mstate->__pyx_kp_b_iso88591_6_z_a_axq_1L_iq_avQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[242])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5112};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_value_type};
    __pyx_mstate_global->__pyx_codeobj_tab[243] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_large_list_view, __pyx_mstate->__pyx_kp_b_iso88591_6_z_a_axq_1L_iq_1F, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[243])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5150};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_key_type, __pyx_mstate->__pyx_n_u_item_type, __pyx_mstate->__pyx_n_u_keys_sorted};
    __pyx_mstate_global->__pyx_codeobj_tab[244] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_map, __pyx_mstate->__pyx_kp_b_iso88591_4Al_gXQa_z_A_81_1A_Q_U_7_Q_C1_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[244])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5225};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_index_type, __pyx_mstate->__pyx_n_u_value_type, __pyx_mstate->__pyx_n_u_ordered};
    __pyx_mstate_global->__pyx_codeobj_tab[245] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_dictionary, __pyx_mstate->__pyx_kp_b_iso88591_EQT_B_B_81A_a_1_M_a_iq_V1_q_1_3, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[245])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5284};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_fields, __pyx_mstate->__pyx_n_u_py_field, __pyx_mstate->__pyx_n_u_c_fields, __pyx_mstate->__pyx_n_u_struct_type, __pyx_mstate->__pyx_n_u_item};
    __pyx_mstate_global->__pyx_codeobj_tab[246] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_struct, __pyx_mstate->__pyx_kp_b_iso88591_f_z_vQ_QfA_uBa_q_81_vQoQa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[246])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5368};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_child_fields, __pyx_mstate->__pyx_n_u_type_codes, __pyx_mstate->__pyx_n_u_c_fields, __pyx_mstate->__pyx_n_u_c_type_codes};
    __pyx_mstate_global->__pyx_codeobj_tab[247] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_sparse_union, __pyx_mstate->__pyx_kp_b_iso88591_q6_Qa_AT_T, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[247])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5402};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_child_fields, __pyx_mstate->__pyx_n_u_type_codes, __pyx_mstate->__pyx_n_u_c_fields, __pyx_mstate->__pyx_n_u_c_type_codes};
    __pyx_mstate_global->__pyx_codeobj_tab[248] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_dense_union, __pyx_mstate->__pyx_kp_b_iso88591_a_Qa_1D_D, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[248])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5439};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_child_fields, __pyx_mstate->__pyx_n_u_mode, __pyx_mstate->__pyx_n_u_type_codes};
    __pyx_mstate_global->__pyx_codeobj_tab[249] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_union, __pyx_mstate->__pyx_kp_b_iso88591_a0_z_5_1_A_2_1_5_1_1_Q_1_A_2_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[249])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5480};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_run_end_type, __pyx_mstate->__pyx_n_u_value_type, __pyx_mstate->__pyx_n_u_run_end_type_2, __pyx_mstate->__pyx_n_u_value_type_2, __pyx_mstate->__pyx_n_u_ree_type};
    __pyx_mstate_global->__pyx_codeobj_tab[250] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_run_end_encoded, __pyx_mstate->__pyx_kp_b_iso88591_A_Fa_B_S_4_M_j_Qm, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[250])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5506};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_storage_type, __pyx_mstate->__pyx_n_u_out, __pyx_mstate->__pyx_n_u_c_json_ext_type};
    __pyx_mstate_global->__pyx_codeobj_tab[251] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_json, __pyx_mstate->__pyx_kp_b_iso88591_A_nJe1L_uAQ_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[251])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5544};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_out, __pyx_mstate->__pyx_n_u_c_uuid_ext_type};
    __pyx_mstate_global->__pyx_codeobj_tab[252] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_uuid, __pyx_mstate->__pyx_kp_b_iso88591_nJe1_uAQ_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[252])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 11, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5559};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_value_type, __pyx_mstate->__pyx_n_u_shape, __pyx_mstate->__pyx_n_u_dim_names, __pyx_mstate->__pyx_n_u_permutation, __pyx_mstate->__pyx_n_u_c_shape, __pyx_mstate->__pyx_n_u_c_permutation, __pyx_mstate->__pyx_n_u_c_dim_names, __pyx_mstate->__pyx_n_u_c_tensor_ext_type, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_x, __pyx_mstate->__pyx_n_u_out};
    __pyx_mstate_global->__pyx_codeobj_tab[253] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_fixed_shape_tensor, __pyx_mstate->__pyx_kp_b_iso88591_33C1X_gQ_6_Q_z_7_E_1A_z_E_z_8_N, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[253])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5660};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_out, __pyx_mstate->__pyx_n_u_c_type};
    __pyx_mstate_global->__pyx_codeobj_tab[254] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_bool8, __pyx_mstate->__pyx_kp_b_iso88591_D_1_e1_uAQ_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[254])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 8, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5703};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_storage_type, __pyx_mstate->__pyx_n_u_type_name, __pyx_mstate->__pyx_n_u_vendor_name, __pyx_mstate->__pyx_n_u_c_type_name, __pyx_mstate->__pyx_n_u_c_vendor_name, __pyx_mstate->__pyx_n_u_c_opaque_type, __pyx_mstate->__pyx_n_u_c_type, __pyx_mstate->__pyx_n_u_out};
    __pyx_mstate_global->__pyx_codeobj_tab[255] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_opaque, __pyx_mstate->__pyx_kp_b_iso88591_waq_0_q_RRSST_81A_uAQ_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[255])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5820};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_name, __pyx_mstate->__pyx_n_u_alias};
    __pyx_mstate_global->__pyx_codeobj_tab[256] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_type_for_alias, __pyx_mstate->__pyx_kp_b_iso88591_4vQ_Qa_j_Qa_z_q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[256])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5844};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_ty, __pyx_mstate->__pyx_n_u_allow_none};
    __pyx_mstate_global->__pyx_codeobj_tab[257] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_ensure_type, __pyx_mstate->__pyx_kp_b_iso88591_6a_c_A_q_1D_q_1D_Qa_iq_1_aq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[257])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 8, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5855};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_fields, __pyx_mstate->__pyx_n_u_metadata, __pyx_mstate->__pyx_n_u_c_meta, __pyx_mstate->__pyx_n_u_c_schema, __pyx_mstate->__pyx_n_u_result, __pyx_mstate->__pyx_n_u_py_field, __pyx_mstate->__pyx_n_u_c_fields, __pyx_mstate->__pyx_n_u_item};
    __pyx_mstate_global->__pyx_codeobj_tab[258] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_schema, __pyx_mstate->__pyx_kp_b_iso88591_1B_waxq_av5H_9G1_V_q_z_vQ_QfA_u, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[258])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5948};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_dtype};
    __pyx_mstate_global->__pyx_codeobj_tab[259] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_from_numpy_dtype, __pyx_mstate->__pyx_kp_b_iso88591_0_BfAQ_1B_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[259])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5976};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_obj};
    __pyx_mstate_global->__pyx_codeobj_tab[260] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_is_boolean_value, __pyx_mstate->__pyx_kp_b_iso88591_81A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[260])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5988};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_obj};
    __pyx_mstate_global->__pyx_codeobj_tab[261] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_is_integer_value, __pyx_mstate->__pyx_kp_b_iso88591_7_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[261])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 6000};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_obj};
    __pyx_mstate_global->__pyx_codeobj_tab[262] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_is_float_value, __pyx_mstate->__pyx_kp_b_iso88591_9AQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[262])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 6020};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[263] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_types_pxi, __pyx_mstate->__pyx_n_u_release_registry, __pyx_mstate->__pyx_kp_b_iso88591_A_IV1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[263])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[264] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[264])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state};
    __pyx_mstate_global->__pyx_codeobj_tab[265] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[265])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 73};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_target_type, __pyx_mstate->__pyx_n_u_safe, __pyx_mstate->__pyx_n_u_options, __pyx_mstate->__pyx_n_u_memory_pool};
    __pyx_mstate_global->__pyx_codeobj_tab[266] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_scalar_pxi, __pyx_mstate->__pyx_n_u_cast, __pyx_mstate->__pyx_kp_b_iso88591_k_QQR_s_E_U_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[266])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 1, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 97};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_full};
    __pyx_mstate_global->__pyx_codeobj_tab[267] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_scalar_pxi, __pyx_mstate->__pyx_n_u_validate, __pyx_mstate->__pyx_kp_b_iso88591_q_1_AT_R_A_AT_Ry, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[267])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 126};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_other};
    __pyx_mstate_global->__pyx_codeobj_tab[268] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_scalar_pxi, __pyx_mstate->__pyx_n_u_equals, __pyx_mstate->__pyx_kp_b_iso88591_A_t84r_gRt2Qa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[268])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 148};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[269] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_scalar_pxi, __pyx_mstate->__pyx_n_u_reduce, __pyx_mstate->__pyx_kp_b_iso88591_A_y_F_d, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[269])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 1, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 151};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_maps_as_pydicts};
    __pyx_mstate_global->__pyx_codeobj_tab[270] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_scalar_pxi, __pyx_mstate->__pyx_n_u_as_py, __pyx_mstate->__pyx_kp_b_iso88591_q_3, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[270])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 1, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 189};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_maps_as_pydicts};
    __pyx_mstate_global->__pyx_codeobj_tab[271] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_scalar_pxi, __pyx_mstate->__pyx_n_u_as_py, __pyx_mstate->__pyx_kp_b_iso88591_q_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[271])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 1, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 210};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_maps_as_pydicts, __pyx_mstate->__pyx_n_u_sp};
    __pyx_mstate_global->__pyx_codeobj_tab[272] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_scalar_pxi, __pyx_mstate->__pyx_n_u_as_py, __pyx_mstate->__pyx_kp_b_iso88591_q_4D_A_r_2_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[272])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 1, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 231};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_maps_as_pydicts, __pyx_mstate->__pyx_n_u_sp};
    __pyx_mstate_global->__pyx_codeobj_tab[273] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_scalar_pxi, __pyx_mstate->__pyx_n_u_as_py, __pyx_mstate->__pyx_kp_b_iso88591_q_0_HD_r_2_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[273])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 1, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 253};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_maps_as_pydicts, __pyx_mstate->__pyx_n_u_sp};
    __pyx_mstate_global->__pyx_codeobj_tab[274] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_scalar_pxi, __pyx_mstate->__pyx_n_u_as_py, __pyx_mstate->__pyx_kp_b_iso88591_q_d_a_r_2_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[274])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 1, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 275};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_maps_as_pydicts, __pyx_mstate->__pyx_n_u_sp};
    __pyx_mstate_global->__pyx_codeobj_tab[275] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_scalar_pxi, __pyx_mstate->__pyx_n_u_as_py, __pyx_mstate->__pyx_kp_b_iso88591_q_2_hd_r_2_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[275])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 1, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 297};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_maps_as_pydicts, __pyx_mstate->__pyx_n_u_sp};
    __pyx_mstate_global->__pyx_codeobj_tab[276] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_scalar_pxi, __pyx_mstate->__pyx_n_u_as_py, __pyx_mstate->__pyx_kp_b_iso88591_q_0_HD_r_2_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[276])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 1, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 319};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_maps_as_pydicts, __pyx_mstate->__pyx_n_u_sp};
    __pyx_mstate_global->__pyx_codeobj_tab[277] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_scalar_pxi, __pyx_mstate->__pyx_n_u_as_py, __pyx_mstate->__pyx_kp_b_iso88591_q_2_hd_r_2_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[277])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 1, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 341};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_maps_as_pydicts, __pyx_mstate->__pyx_n_u_sp};
    __pyx_mstate_global->__pyx_codeobj_tab[278] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_scalar_pxi, __pyx_mstate->__pyx_n_u_as_py, __pyx_mstate->__pyx_kp_b_iso88591_q_0_HD_r_2_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[278])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 1, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 363};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_maps_as_pydicts, __pyx_mstate->__pyx_n_u_sp};
    __pyx_mstate_global->__pyx_codeobj_tab[279] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_scalar_pxi, __pyx_mstate->__pyx_n_u_as_py, __pyx_mstate->__pyx_kp_b_iso88591_q_2_hd_r_2_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[279])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 1, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 385};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_maps_as_pydicts, __pyx_mstate->__pyx_n_u_sp};
    __pyx_mstate_global->__pyx_codeobj_tab[280] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_scalar_pxi, __pyx_mstate->__pyx_n_u_as_py, __pyx_mstate->__pyx_kp_b_iso88591_q_0_HD_r_2_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[280])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 1, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 407};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_maps_as_pydicts, __pyx_mstate->__pyx_n_u_sp};
    __pyx_mstate_global->__pyx_codeobj_tab[281] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_scalar_pxi, __pyx_mstate->__pyx_n_u_as_py, __pyx_mstate->__pyx_kp_b_iso88591_q_8_HD_q_R_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[281])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 1, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 432};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_maps_as_pydicts, __pyx_mstate->__pyx_n_u_sp};
    __pyx_mstate_global->__pyx_codeobj_tab[282] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_scalar_pxi, __pyx_mstate->__pyx_n_u_as_py, __pyx_mstate->__pyx_kp_b_iso88591_q_0_HD_r_2_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[282])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 1, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 457};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_maps_as_pydicts, __pyx_mstate->__pyx_n_u_sp};
    __pyx_mstate_global->__pyx_codeobj_tab[283] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_scalar_pxi, __pyx_mstate->__pyx_n_u_as_py, __pyx_mstate->__pyx_kp_b_iso88591_q_2_hd_r_2_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[283])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 1, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 482};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_maps_as_pydicts, __pyx_mstate->__pyx_n_u_sp, __pyx_mstate->__pyx_n_u_dtype};
    __pyx_mstate_global->__pyx_codeobj_tab[284] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_scalar_pxi, __pyx_mstate->__pyx_n_u_as_py, __pyx_mstate->__pyx_kp_b_iso88591_q_7t84q_6b_T_2Q_XQ_F_1E_q_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[284])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 1, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 508};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_maps_as_pydicts, __pyx_mstate->__pyx_n_u_sp, __pyx_mstate->__pyx_n_u_dtype};
    __pyx_mstate_global->__pyx_codeobj_tab[285] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_scalar_pxi, __pyx_mstate->__pyx_n_u_as_py, __pyx_mstate->__pyx_kp_b_iso88591_q_7t84q_6b_T_2Q_XQ_F_1E_q_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[285])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 1, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 534};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_maps_as_pydicts, __pyx_mstate->__pyx_n_u_sp, __pyx_mstate->__pyx_n_u_dtype};
    __pyx_mstate_global->__pyx_codeobj_tab[286] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_scalar_pxi, __pyx_mstate->__pyx_n_u_as_py, __pyx_mstate->__pyx_kp_b_iso88591_q_9_XT_8_t1_2Q_XQ_F_1E_q_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[286])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 1, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 560};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_maps_as_pydicts, __pyx_mstate->__pyx_n_u_sp, __pyx_mstate->__pyx_n_u_dtype};
    __pyx_mstate_global->__pyx_codeobj_tab[287] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_scalar_pxi, __pyx_mstate->__pyx_n_u_as_py, __pyx_mstate->__pyx_kp_b_iso88591_q_9_XT_8_t1_2Q_XQ_F_1E_q_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[287])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 1, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 591};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_maps_as_pydicts, __pyx_mstate->__pyx_n_u_sp};
    __pyx_mstate_global->__pyx_codeobj_tab[288] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_scalar_pxi, __pyx_mstate->__pyx_n_u_as_py, __pyx_mstate->__pyx_kp_b_iso88591_q_2_hd_2Q_QfCs_HJauBa_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[288])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 1, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 622};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_maps_as_pydicts, __pyx_mstate->__pyx_n_u_sp};
    __pyx_mstate_global->__pyx_codeobj_tab[289] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_scalar_pxi, __pyx_mstate->__pyx_n_u_as_py, __pyx_mstate->__pyx_kp_b_iso88591_q_2_hd_2Q_QfCs_5_1_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[289])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 643};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_unit, __pyx_mstate->__pyx_n_u_tzinfo, __pyx_mstate->__pyx_n_u_delta, __pyx_mstate->__pyx_n_u_dt};
    __pyx_mstate_global->__pyx_codeobj_tab[290] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_scalar_pxi, __pyx_mstate->__pyx_n_u_datetime_from_int, __pyx_mstate->__pyx_kp_b_iso88591_5Q_uCq_81_c_c_a_c_1G3he1_6_5_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[290])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 1, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 682};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_maps_as_pydicts, __pyx_mstate->__pyx_n_u_sp, __pyx_mstate->__pyx_n_u_dtype};
    __pyx_mstate_global->__pyx_codeobj_tab[291] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_scalar_pxi, __pyx_mstate->__pyx_n_u_as_py, __pyx_mstate->__pyx_kp_b_iso88591_q_1_XT_t1_2Q_Qb_U_s_q_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[291])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 1, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 712};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_maps_as_pydicts, __pyx_mstate->__pyx_n_u_sp, __pyx_mstate->__pyx_n_u_dtype};
    __pyx_mstate_global->__pyx_codeobj_tab[292] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_scalar_pxi, __pyx_mstate->__pyx_n_u_as_py, __pyx_mstate->__pyx_kp_b_iso88591_q_1_XT_t1_2Q_Qb_U_s_q_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[292])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 1, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 742};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_maps_as_pydicts, __pyx_mstate->__pyx_n_u_sp, __pyx_mstate->__pyx_n_u_dtype, __pyx_mstate->__pyx_n_u_tzinfo};
    __pyx_mstate_global->__pyx_codeobj_tab[293] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_scalar_pxi, __pyx_mstate->__pyx_n_u_as_py, __pyx_mstate->__pyx_kp_b_iso88591_q_7t84q_6b_T_4r_1_4uIRvQ_Qiq_Ya, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[293])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 1, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 794};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_maps_as_pydicts, __pyx_mstate->__pyx_n_u_sp, __pyx_mstate->__pyx_n_u_dtype, __pyx_mstate->__pyx_n_u_unit};
    __pyx_mstate_global->__pyx_codeobj_tab[294] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_scalar_pxi, __pyx_mstate->__pyx_n_u_as_py, __pyx_mstate->__pyx_kp_b_iso88591_q_5T_Q_4Be4q_E_a_4r_1_5_1_8_Qhb, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[294])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 1, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 847};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_maps_as_pydicts, __pyx_mstate->__pyx_n_u_val, __pyx_mstate->__pyx_n_u_scalar};
    __pyx_mstate_global->__pyx_codeobj_tab[295] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_scalar_pxi, __pyx_mstate->__pyx_n_u_as_py, __pyx_mstate->__pyx_kp_b_iso88591_q_t84q_nA_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[295])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 871};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_sp};
    __pyx_mstate_global->__pyx_codeobj_tab[296] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_scalar_pxi, __pyx_mstate->__pyx_n_u_as_buffer, __pyx_mstate->__pyx_kp_b_iso88591_A_hd_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[296])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 1, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 878};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_maps_as_pydicts, __pyx_mstate->__pyx_n_u_buffer};
    __pyx_mstate_global->__pyx_codeobj_tab[297] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_scalar_pxi, __pyx_mstate->__pyx_n_u_as_py, __pyx_mstate->__pyx_kp_b_iso88591_q_Zq_xwc_6_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[297])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 891};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[298] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_scalar_pxi, __pyx_mstate->__pyx_n_u_bytes_3, __pyx_mstate->__pyx_kp_b_iso88591_A_t6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[298])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 1, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 914};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_maps_as_pydicts, __pyx_mstate->__pyx_n_u_buffer};
    __pyx_mstate_global->__pyx_codeobj_tab[299] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_scalar_pxi, __pyx_mstate->__pyx_n_u_as_py, __pyx_mstate->__pyx_kp_b_iso88591_q_Zq_xwc_3axq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[299])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 1, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 971};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_maps_as_pydicts, __pyx_mstate->__pyx_n_u_arr};
    __pyx_mstate_global->__pyx_codeobj_tab[300] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_scalar_pxi, __pyx_mstate->__pyx_n_u_as_py, __pyx_mstate->__pyx_kp_b_iso88591_q_d_xt3j_Q6Fa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[300])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1027};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_n_u_genexpr};
    __pyx_mstate_global->__pyx_codeobj_tab[301] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_scalar_pxi, __pyx_mstate->__pyx_n_u_items, __pyx_mstate->__pyx_kp_b_iso88591_A_4, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[301])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 1, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1065};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_maps_as_pydicts, __pyx_mstate->__pyx_n_u_k};
    __pyx_mstate_global->__pyx_codeobj_tab[302] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_scalar_pxi, __pyx_mstate->__pyx_n_u_as_py, __pyx_mstate->__pyx_kp_b_iso88591_q_4q_q_4q_99J_eSWW_j_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[302])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1093};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_key};
    __pyx_mstate_global->__pyx_codeobj_tab[303] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_scalar_pxi, __pyx_mstate->__pyx_n_u_as_py_tuple, __pyx_mstate->__pyx_kp_b_iso88591_A_4q_2U_ar_t4s_1_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[303])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 1, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1147};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_maps_as_pydicts, __pyx_mstate->__pyx_n_u_result_dict, __pyx_mstate->__pyx_n_u_key, __pyx_mstate->__pyx_n_u_value};
    __pyx_mstate_global->__pyx_codeobj_tab[304] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_scalar_pxi, __pyx_mstate->__pyx_n_u_as_py, __pyx_mstate->__pyx_kp_b_iso88591_q_86_A_Qa_4t1_1_4q_4q_a_4xs_1_E, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[304])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1192};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_arr, __pyx_mstate->__pyx_n_u_key_field, __pyx_mstate->__pyx_n_u_k};
    __pyx_mstate_global->__pyx_codeobj_tab[305] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_scalar_pxi, __pyx_mstate->__pyx_n_u_keys, __pyx_mstate->__pyx_kp_b_iso88591_A_d_4s_1_D_Zq_q_s_e3fAQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[305])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 9, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1208};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_type, __pyx_mstate->__pyx_n_u_is_valid, __pyx_mstate->__pyx_n_u_index, __pyx_mstate->__pyx_n_u_dictionary, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_wrapped, __pyx_mstate->__pyx_n_u_type_4, __pyx_mstate->__pyx_n_u_index_2, __pyx_mstate->__pyx_n_u_dictionary_2};
    __pyx_mstate_global->__pyx_codeobj_tab[306] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_scalar_pxi, __pyx_mstate->__pyx_n_u_reconstruct, __pyx_mstate->__pyx_kp_b_iso88591_A_1_Q_4z_1A_QgQ_t5_WAT_iq_Q_V1G5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[306])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1247};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[307] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_scalar_pxi, __pyx_mstate->__pyx_n_u_reduce, __pyx_mstate->__pyx_kp_b_iso88591_A_q_t_d_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[307])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 1, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1273};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_maps_as_pydicts};
    __pyx_mstate_global->__pyx_codeobj_tab[308] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_scalar_pxi, __pyx_mstate->__pyx_n_u_as_py, __pyx_mstate->__pyx_kp_b_iso88591_q_t6_q_00DD_WX, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[308])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 1, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1306};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_maps_as_pydicts};
    __pyx_mstate_global->__pyx_codeobj_tab[309] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_scalar_pxi, __pyx_mstate->__pyx_n_u_as_py, __pyx_mstate->__pyx_kp_b_iso88591_q_t6_q_0, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[309])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 1, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1346};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_maps_as_pydicts, __pyx_mstate->__pyx_n_u_value};
    __pyx_mstate_global->__pyx_codeobj_tab[310] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_scalar_pxi, __pyx_mstate->__pyx_n_u_as_py, __pyx_mstate->__pyx_kp_b_iso88591_q_A_xvS_vQ6Fa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[310])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 1, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1389};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_maps_as_pydicts};
    __pyx_mstate_global->__pyx_codeobj_tab[311] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_scalar_pxi, __pyx_mstate->__pyx_n_u_as_py, __pyx_mstate->__pyx_kp_b_iso88591_q_xt7_Zt6_q_PPQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[311])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1409};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_typ, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_sp_scalar, __pyx_mstate->__pyx_n_u_sp_storage, __pyx_mstate->__pyx_n_u_ext_scalar, __pyx_mstate->__pyx_n_u_storage, __pyx_mstate->__pyx_n_u_is_valid};
    __pyx_mstate_global->__pyx_codeobj_tab[312] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_scalar_pxi, __pyx_mstate->__pyx_n_u_from_storage, __pyx_mstate->__pyx_kp_b_iso88591_A_6_A_a_q_q_uF_S_iq_AU_56a_a_fAW, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[312])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 1, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1463};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_maps_as_pydicts};
    __pyx_mstate_global->__pyx_codeobj_tab[313] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_scalar_pxi, __pyx_mstate->__pyx_n_u_as_py, __pyx_mstate->__pyx_kp_b_iso88591_q_xt7_Zt1F_fF, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[313])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1481};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[314] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_scalar_pxi, __pyx_mstate->__pyx_n_u_to_numpy, __pyx_mstate->__pyx_kp_b_iso88591_A_t_Ry, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[314])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1495};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_c_type, __pyx_mstate->__pyx_n_u_scalar, __pyx_mstate->__pyx_n_u_ctensor};
    __pyx_mstate_global->__pyx_codeobj_tab[315] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_scalar_pxi, __pyx_mstate->__pyx_n_u_to_tensor, __pyx_mstate->__pyx_kp_b_iso88591_A_aab_HD_A_22EE_aaeef_nAV_aq_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[315])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 1, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1529};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_maps_as_pydicts, __pyx_mstate->__pyx_n_u_py_val};
    __pyx_mstate_global->__pyx_codeobj_tab[316] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_scalar_pxi, __pyx_mstate->__pyx_n_u_as_py, __pyx_mstate->__pyx_kp_b_iso88591_q_b_a_xwc_7_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[316])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 2, 13, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1601};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_type, __pyx_mstate->__pyx_n_u_from_pandas, __pyx_mstate->__pyx_n_u_memory_pool, __pyx_mstate->__pyx_n_u_ty, __pyx_mstate->__pyx_n_u_options, __pyx_mstate->__pyx_n_u_scalar, __pyx_mstate->__pyx_n_u_array, __pyx_mstate->__pyx_n_u_chunked, __pyx_mstate->__pyx_n_u_is_pandas_object, __pyx_mstate->__pyx_n_u_pool, __pyx_mstate->__pyx_n_u_extension_type, __pyx_mstate->__pyx_n_u_result};
    __pyx_mstate_global->__pyx_codeobj_tab[317] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_scalar_pxi, __pyx_mstate->__pyx_n_u_scalar, __pyx_mstate->__pyx_kp_b_iso88591_2_Z_a_1_Q_uG5_D_Cq_t1_Qa_7_1_81, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[317])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 64};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_values, __pyx_mstate->__pyx_n_u_type};
    __pyx_mstate_global->__pyx_codeobj_tab[318] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_array_pxi, __pyx_mstate->__pyx_n_u_ndarray_to_arrow_type, __pyx_mstate->__pyx_kp_b_iso88591_2_81, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[318])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 113};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_obj, __pyx_mstate->__pyx_n_u_type, __pyx_mstate->__pyx_n_u_mask, __pyx_mstate->__pyx_n_u_size, __pyx_mstate->__pyx_n_u_res};
    __pyx_mstate_global->__pyx_codeobj_tab[319] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_array_pxi, __pyx_mstate->__pyx_n_u_handle_arrow_array_protocol, __pyx_mstate->__pyx_kp_b_iso88591_uG5_5_q_j_Qe1_t_QfG1_iq_z_T_Kr, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[319])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {7, 0, 0, 22, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 129};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_obj, __pyx_mstate->__pyx_n_u_type, __pyx_mstate->__pyx_n_u_mask, __pyx_mstate->__pyx_n_u_size, __pyx_mstate->__pyx_n_u_from_pandas, __pyx_mstate->__pyx_n_u_safe, __pyx_mstate->__pyx_n_u_memory_pool, __pyx_mstate->__pyx_n_u_pool, __pyx_mstate->__pyx_n_u_is_pandas_object, __pyx_mstate->__pyx_n_u_c_from_pandas, __pyx_mstate->__pyx_n_u_extension_type, __pyx_mstate->__pyx_n_u_requested_type, __pyx_mstate->__pyx_n_u_schema_capsule, __pyx_mstate->__pyx_n_u_array_capsule, __pyx_mstate->__pyx_n_u_out_array, __pyx_mstate->__pyx_n_u_values, __pyx_mstate->__pyx_n_u_result, __pyx_mstate->__pyx_n_u_index_type, __pyx_mstate->__pyx_n_u_value_type, __pyx_mstate->__pyx_n_u_indices, __pyx_mstate->__pyx_n_u_dictionary, __pyx_mstate->__pyx_n_u_arr};
    __pyx_mstate_global->__pyx_codeobj_tab[320] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_array_pxi, __pyx_mstate->__pyx_n_u_array, __pyx_mstate->__pyx_kp_b_iso88591_k_Kq_P_31A_a_Q_uG5_D_Cq_t1_3a_z, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[320])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 382};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_values, __pyx_mstate->__pyx_n_u_type};
    __pyx_mstate_global->__pyx_codeobj_tab[321] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_array_pxi, __pyx_mstate->__pyx_n_u_asarray, __pyx_mstate->__pyx_kp_b_iso88591_A_z_7_5_uD_F_waq_V5_q_uAXU, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[321])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 408};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_size, __pyx_mstate->__pyx_n_u_type, __pyx_mstate->__pyx_n_u_memory_pool, __pyx_mstate->__pyx_n_u_pool, __pyx_mstate->__pyx_n_u_length, __pyx_mstate->__pyx_n_u_ty, __pyx_mstate->__pyx_n_u_arr};
    __pyx_mstate_global->__pyx_codeobj_tab[322] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_array_pxi, __pyx_mstate->__pyx_n_u_nulls, __pyx_mstate->__pyx_kp_b_iso88591_1D_31A_a_uCq_t1_nA_AT_Qa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[322])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 458};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_size, __pyx_mstate->__pyx_n_u_memory_pool, __pyx_mstate->__pyx_n_u_pool, __pyx_mstate->__pyx_n_u_length, __pyx_mstate->__pyx_n_u_c_array, __pyx_mstate->__pyx_n_u_c_scalar};
    __pyx_mstate_global->__pyx_codeobj_tab[323] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_array_pxi, __pyx_mstate->__pyx_n_u_repeat, __pyx_mstate->__pyx_kp_b_iso88591_N_31A_t_QgQ_awl_wa_q_k_Qa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[323])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 546};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_values, __pyx_mstate->__pyx_n_u_mask, __pyx_mstate->__pyx_n_u_from_pandas, __pyx_mstate->__pyx_n_u_out, __pyx_mstate->__pyx_n_u_use_pandas_sentinels};
    __pyx_mstate_global->__pyx_codeobj_tab[324] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_array_pxi, __pyx_mstate->__pyx_n_u_infer_type, __pyx_mstate->__pyx_kp_b_iso88591_a_uG5_D_6_1_r_q_fA_q_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[324])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 1, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 575};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_start, __pyx_mstate->__pyx_n_u_stop, __pyx_mstate->__pyx_n_u_step, __pyx_mstate->__pyx_n_u_memory_pool, __pyx_mstate->__pyx_n_u_pool, __pyx_mstate->__pyx_n_u_c_array};
    __pyx_mstate_global->__pyx_codeobj_tab[325] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_array_pxi, __pyx_mstate->__pyx_n_u_arange, __pyx_mstate->__pyx_kp_b_iso88591_18_4AQ_q_vV1_Qa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[325])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 609};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_arrow_obj, __pyx_mstate->__pyx_n_u_key, __pyx_mstate->__pyx_n_u_start, __pyx_mstate->__pyx_n_u_stop, __pyx_mstate->__pyx_n_u_step, __pyx_mstate->__pyx_n_u_n, __pyx_mstate->__pyx_n_u_length};
    __pyx_mstate_global->__pyx_codeobj_tab[326] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_array_pxi, __pyx_mstate->__pyx_n_u_normalize_slice, __pyx_mstate->__pyx_kp_b_iso88591_s_1_6_81A_uCq_y_QfAWF_AU_G1_y_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[326])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 735};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_data, __pyx_mstate->__pyx_n_u_ad};
    __pyx_mstate_global->__pyx_codeobj_tab[327] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_array_pxi, __pyx_mstate->__pyx_n_u_restore_array, __pyx_mstate->__pyx_kp_b_iso88591_AQ_Qiq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[327])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[328] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[328])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state};
    __pyx_mstate_global->__pyx_codeobj_tab[329] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[329])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {17, 0, 0, 18, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 866};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_memory_pool, __pyx_mstate->__pyx_n_u_categories, __pyx_mstate->__pyx_n_u_strings_to_categorical, __pyx_mstate->__pyx_n_u_zero_copy_only, __pyx_mstate->__pyx_n_u_integer_object_nulls, __pyx_mstate->__pyx_n_u_date_as_object, __pyx_mstate->__pyx_n_u_timestamp_as_object, __pyx_mstate->__pyx_n_u_use_threads, __pyx_mstate->__pyx_n_u_deduplicate_objects, __pyx_mstate->__pyx_n_u_ignore_metadata, __pyx_mstate->__pyx_n_u_safe, __pyx_mstate->__pyx_n_u_split_blocks, __pyx_mstate->__pyx_n_u_self_destruct, __pyx_mstate->__pyx_n_u_maps_as_pydicts, __pyx_mstate->__pyx_n_u_types_mapper, __pyx_mstate->__pyx_n_u_coerce_temporal_nanoseconds, __pyx_mstate->__pyx_n_u_options};
    __pyx_mstate_global->__pyx_codeobj_tab[330] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_array_pxi, __pyx_mstate->__pyx_n_u_to_pandas_2, __pyx_mstate->__pyx_kp_b_iso88591_A_h_a_1_1_1_A_t_ay_1_q_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[330])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_state, __pyx_mstate->__pyx_n_u_dict_2, __pyx_mstate->__pyx_n_u_use_setstate};
    __pyx_mstate_global->__pyx_codeobj_tab[331] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_A_G1F_a_vWE_Q_q_q_q_34q_QR_34q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[331])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 16};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state};
    __pyx_mstate_global->__pyx_codeobj_tab[332] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_0_q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[332])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1098};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[333] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_array_pxi, __pyx_mstate->__pyx_n_u_debug_print, __pyx_mstate->__pyx_kp_b_iso88591_A_1F_fA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[333])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1102};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_other, __pyx_mstate->__pyx_n_u_result};
    __pyx_mstate_global->__pyx_codeobj_tab[334] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_array_pxi, __pyx_mstate->__pyx_n_u_diff, __pyx_mstate->__pyx_kp_b_iso88591_A_L_T_E_Q_y_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[334])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1139};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_target_type, __pyx_mstate->__pyx_n_u_safe, __pyx_mstate->__pyx_n_u_options, __pyx_mstate->__pyx_n_u_memory_pool};
    __pyx_mstate_global->__pyx_codeobj_tab[335] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_array_pxi, __pyx_mstate->__pyx_n_u_cast, __pyx_mstate->__pyx_kp_b_iso88591_k_QQR_L_s_E_U_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[335])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1164};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_target_type, __pyx_mstate->__pyx_n_u_type, __pyx_mstate->__pyx_n_u_result};
    __pyx_mstate_global->__pyx_codeobj_tab[336] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_array_pxi, __pyx_mstate->__pyx_n_u_view, __pyx_mstate->__pyx_kp_b_iso88591_A_L_1D_5_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[336])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS), 1186};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_kwargs, __pyx_mstate->__pyx_n_u_options};
    __pyx_mstate_global->__pyx_codeobj_tab[337] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_array_pxi, __pyx_mstate->__pyx_n_u_sum, __pyx_mstate->__pyx_kp_b_iso88591_A_L_R_c_s_N_7_7, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[337])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1206};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[338] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_array_pxi, __pyx_mstate->__pyx_n_u_unique, __pyx_mstate->__pyx_kp_b_iso88591_A_L_s_N_Qa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[338])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1218};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_null_encoding, __pyx_mstate->__pyx_n_u_options};
    __pyx_mstate_global->__pyx_codeobj_tab[339] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_array_pxi, __pyx_mstate->__pyx_n_u_dictionary_encode, __pyx_mstate->__pyx_kp_b_iso88591_a_L_R_q_s_N_8, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[339])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1238};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[340] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_array_pxi, __pyx_mstate->__pyx_n_u_value_counts, __pyx_mstate->__pyx_kp_b_iso88591_A_L_s_N_31A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[340])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1250};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_obj, __pyx_mstate->__pyx_n_u_mask, __pyx_mstate->__pyx_n_u_type, __pyx_mstate->__pyx_n_u_safe, __pyx_mstate->__pyx_n_u_memory_pool};
    __pyx_mstate_global->__pyx_codeobj_tab[341] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_array_pxi, __pyx_mstate->__pyx_n_u_from_pandas, __pyx_mstate->__pyx_kp_b_iso88591_A_9_B_uAU_vU_V_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[341])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1288};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[342] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_array_pxi, __pyx_mstate->__pyx_n_u_reduce, __pyx_mstate->__pyx_kp_b_iso88591_A_L_q_q_IT_5_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[342])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {6, 0, 0, 12, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1293};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_type, __pyx_mstate->__pyx_n_u_length, __pyx_mstate->__pyx_n_u_buffers, __pyx_mstate->__pyx_n_u_null_count, __pyx_mstate->__pyx_n_u_offset, __pyx_mstate->__pyx_n_u_children, __pyx_mstate->__pyx_n_u_buf, __pyx_mstate->__pyx_n_u_child, __pyx_mstate->__pyx_n_u_c_buffers, __pyx_mstate->__pyx_n_u_c_child_data, __pyx_mstate->__pyx_n_u_array_data, __pyx_mstate->__pyx_n_u_result};
    __pyx_mstate_global->__pyx_codeobj_tab[343] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_array_pxi, __pyx_mstate->__pyx_n_u_from_buffers, __pyx_mstate->__pyx_kp_b_iso88591_AAK1_D_9Cq_4_3c_AQ_Q_AQ_4q_t_Qa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[343])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1389};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_total_buffer_size};
    __pyx_mstate_global->__pyx_codeobj_tab[344] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_array_pxi, __pyx_mstate->__pyx_n_u_get_total_buffer_size, __pyx_mstate->__pyx_kp_b_iso88591_A_L_O1F_a_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[344])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1405};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[345] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_array_pxi, __pyx_mstate->__pyx_n_u_sizeof, __pyx_mstate->__pyx_kp_b_iso88591_A_L_uAWE_Cr_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[345])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 6, 9, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1418};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_indent, __pyx_mstate->__pyx_n_u_top_level_indent, __pyx_mstate->__pyx_n_u_window, __pyx_mstate->__pyx_n_u_container_window, __pyx_mstate->__pyx_n_u_skip_new_lines, __pyx_mstate->__pyx_n_u_element_size_limit, __pyx_mstate->__pyx_n_u_result, __pyx_mstate->__pyx_n_u_options};
    __pyx_mstate_global->__pyx_codeobj_tab[346] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_array_pxi, __pyx_mstate->__pyx_n_u_to_string, __pyx_mstate->__pyx_kp_b_iso88591_nA_B_1_Q_1_a_Q_y_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[346])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1479};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_other};
    __pyx_mstate_global->__pyx_codeobj_tab[347] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_array_pxi, __pyx_mstate->__pyx_n_u_equals, __pyx_mstate->__pyx_kp_b_iso88591_A_L_t3gQfE, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[347])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 1, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1502};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_nan_is_null, __pyx_mstate->__pyx_n_u_options};
    __pyx_mstate_global->__pyx_codeobj_tab[348] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_array_pxi, __pyx_mstate->__pyx_n_u_is_null, __pyx_mstate->__pyx_kp_b_iso88591_Q_L_R_1L_s_N_awa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[348])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1519};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[349] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_array_pxi, __pyx_mstate->__pyx_n_u_is_nan, __pyx_mstate->__pyx_kp_b_iso88591_A_L_s_N_Qa_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[349])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1530};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[350] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_array_pxi, __pyx_mstate->__pyx_n_u_is_valid, __pyx_mstate->__pyx_kp_b_iso88591_A_L_s_IQa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[350])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1537};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_fill_value};
    __pyx_mstate_global->__pyx_codeobj_tab[351] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_array_pxi, __pyx_mstate->__pyx_n_u_fill_null, __pyx_mstate->__pyx_kp_b_iso88591_A_L_s_JavQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[351])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1578};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_offset, __pyx_mstate->__pyx_n_u_length, __pyx_mstate->__pyx_n_u_result};
    __pyx_mstate_global->__pyx_codeobj_tab[352] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_array_pxi, __pyx_mstate->__pyx_n_u_slice, __pyx_mstate->__pyx_kp_b_iso88591_Q_7_A_AQ_AS_7_Q_T_F_1_wb_j_T_F, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[352])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1610};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_indices};
    __pyx_mstate_global->__pyx_codeobj_tab[353] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_array_pxi, __pyx_mstate->__pyx_n_u_take, __pyx_mstate->__pyx_kp_b_iso88591_A_L_s_E, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[353])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1629};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[354] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_array_pxi, __pyx_mstate->__pyx_n_u_drop_null, __pyx_mstate->__pyx_kp_b_iso88591_A_L_s_Jaq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[354])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 1, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1636};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_mask, __pyx_mstate->__pyx_n_u_null_selection_behavior};
    __pyx_mstate_global->__pyx_codeobj_tab[355] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_array_pxi, __pyx_mstate->__pyx_n_u_filter, __pyx_mstate->__pyx_kp_b_iso88591_Q_L_s_G1F_4A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[355])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 1, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1659};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_start, __pyx_mstate->__pyx_n_u_end, __pyx_mstate->__pyx_n_u_memory_pool};
    __pyx_mstate_global->__pyx_codeobj_tab[356] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_array_pxi, __pyx_mstate->__pyx_n_u_index, __pyx_mstate->__pyx_kp_b_iso88591_L_s_F_6_uL, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[356])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS), 1684};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_order, __pyx_mstate->__pyx_n_u_kwargs, __pyx_mstate->__pyx_n_u_indices};
    __pyx_mstate_global->__pyx_codeobj_tab[357] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_array_pxi, __pyx_mstate->__pyx_n_u_sort, __pyx_mstate->__pyx_kp_b_iso88591_L_R_A_Cr_Qj_k_t5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[357])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS), 1708};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_options, __pyx_mstate->__pyx_n_u_types_mapper, __pyx_mstate->__pyx_n_u_kwargs};
    __pyx_mstate_global->__pyx_codeobj_tab[358] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_array_pxi, __pyx_mstate->__pyx_n_u_to_pandas, __pyx_mstate->__pyx_kp_b_iso88591_q_L_AV_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[358])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1712};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_dtype, __pyx_mstate->__pyx_n_u_copy, __pyx_mstate->__pyx_n_u_values};
    __pyx_mstate_global->__pyx_codeobj_tab[359] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_array_pxi, __pyx_mstate->__pyx_n_u_array_2, __pyx_mstate->__pyx_kp_b_iso88591_k_L_5_1_Ya_a_j_2V1HF_a_Ya_a_5_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[359])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1737};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_zero_copy_only, __pyx_mstate->__pyx_n_u_writable, __pyx_mstate->__pyx_n_u_out, __pyx_mstate->__pyx_n_u_c_options, __pyx_mstate->__pyx_n_u_values, __pyx_mstate->__pyx_n_u_array};
    __pyx_mstate_global->__pyx_codeobj_tab[360] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_array_pxi, __pyx_mstate->__pyx_n_u_to_numpy, __pyx_mstate->__pyx_kp_b_iso88591_oQ6_L_3c_Q_a_A_1_Q_Qk_Q_4AQ_1_9, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[360])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 1, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1799};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_maps_as_pydicts, __pyx_mstate->__pyx_n_u_x};
    __pyx_mstate_global->__pyx_codeobj_tab[361] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_array_pxi, __pyx_mstate->__pyx_n_u_to_pylist, __pyx_mstate->__pyx_kp_b_iso88591_1_L_q_q_9_U, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[361])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1824};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[362] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_array_pxi, __pyx_mstate->__pyx_n_u_tolist, __pyx_mstate->__pyx_kp_b_iso88591_A_t_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[362])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 1, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1830};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_full};
    __pyx_mstate_global->__pyx_codeobj_tab[363] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_array_pxi, __pyx_mstate->__pyx_n_u_validate, __pyx_mstate->__pyx_kp_b_iso88591_q_1_A_AT_M_AT_IQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[363])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1865};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_res};
    __pyx_mstate_global->__pyx_codeobj_tab[364] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_array_pxi, __pyx_mstate->__pyx_n_u_buffers, __pyx_mstate->__pyx_kp_b_iso88591_A_a_Qd_4r_b_D_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[364])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1877};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_destination, __pyx_mstate->__pyx_n_u_c_array, __pyx_mstate->__pyx_n_u_c_memory_manager};
    __pyx_mstate_global->__pyx_codeobj_tab[365] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_array_pxi, __pyx_mstate->__pyx_n_u_copy_to, __pyx_mstate->__pyx_kp_b_iso88591_A_Qm1_G2T_CZZ_q_Q_7_1_7q_AQ_nAT, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[365])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1913};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_out_ptr, __pyx_mstate->__pyx_n_u_out_schema_ptr, __pyx_mstate->__pyx_n_u_c_ptr, __pyx_mstate->__pyx_n_u_c_schema_ptr};
    __pyx_mstate_global->__pyx_codeobj_tab[366] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_array_pxi, __pyx_mstate->__pyx_n_u_export_to_c, __pyx_mstate->__pyx_kp_b_iso88591_31_q_aq_AV4q_31_4A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[366])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1940};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_in_ptr, __pyx_mstate->__pyx_n_u_type, __pyx_mstate->__pyx_n_u_c_ptr, __pyx_mstate->__pyx_n_u_c_type_ptr, __pyx_mstate->__pyx_n_u_c_array, __pyx_mstate->__pyx_n_u_c_type};
    __pyx_mstate_global->__pyx_codeobj_tab[367] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_array_pxi, __pyx_mstate->__pyx_n_u_import_from_c, __pyx_mstate->__pyx_kp_b_iso88591_A_q_7_Q_aq_A_A_156, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[367])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 10, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1974};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_requested_schema, __pyx_mstate->__pyx_n_u_c_array, __pyx_mstate->__pyx_n_u_c_schema, __pyx_mstate->__pyx_n_u_inner_array, __pyx_mstate->__pyx_n_u_target_type, __pyx_mstate->__pyx_n_u_casted_array, __pyx_mstate->__pyx_n_u_e, __pyx_mstate->__pyx_n_u_schema_capsule, __pyx_mstate->__pyx_n_u_array_capsule};
    __pyx_mstate_global->__pyx_codeobj_tab[368] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_array_pxi, __pyx_mstate->__pyx_n_u_arrow_c_array, __pyx_mstate->__pyx_kp_b_iso88591_1_L_G1_9_3d_3b_QfM_a_6aq_q_A_Gq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[368])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2023};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_schema_capsule, __pyx_mstate->__pyx_n_u_array_capsule, __pyx_mstate->__pyx_n_u_c_schema, __pyx_mstate->__pyx_n_u_c_array, __pyx_mstate->__pyx_n_u_array};
    __pyx_mstate_global->__pyx_codeobj_tab[369] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_array_pxi, __pyx_mstate->__pyx_n_u_import_from_c_capsule, __pyx_mstate->__pyx_kp_b_iso88591_A_6a7Gq_4A_A_N_ay, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[369])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2038};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_out_ptr, __pyx_mstate->__pyx_n_u_out_schema_ptr, __pyx_mstate->__pyx_n_u_c_ptr, __pyx_mstate->__pyx_n_u_c_schema_ptr};
    __pyx_mstate_global->__pyx_codeobj_tab[370] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_array_pxi, __pyx_mstate->__pyx_n_u_export_to_c_device, __pyx_mstate->__pyx_kp_b_iso88591_q_aq_d_a_G, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[370])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2065};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_in_ptr, __pyx_mstate->__pyx_n_u_type, __pyx_mstate->__pyx_n_u_c_device_array, __pyx_mstate->__pyx_n_u_c_type_ptr, __pyx_mstate->__pyx_n_u_c_array, __pyx_mstate->__pyx_n_u_c_type};
    __pyx_mstate_global->__pyx_codeobj_tab[371] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_array_pxi, __pyx_mstate->__pyx_n_u_import_from_c_device, __pyx_mstate->__pyx_kp_b_iso88591_A_0_B_qPQ_c_q_7_Q_aq_Q_6oQ_Q_6a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[371])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 14, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS), 2104};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_requested_schema, __pyx_mstate->__pyx_n_u_kwargs, __pyx_mstate->__pyx_n_u_c_array, __pyx_mstate->__pyx_n_u_c_schema, __pyx_mstate->__pyx_n_u_inner_array, __pyx_mstate->__pyx_n_u_non_default_kwargs, __pyx_mstate->__pyx_n_u_target_type, __pyx_mstate->__pyx_n_u_casted_array, __pyx_mstate->__pyx_n_u_e, __pyx_mstate->__pyx_n_u_schema_capsule, __pyx_mstate->__pyx_n_u_array_capsule, __pyx_mstate->__pyx_n_u_name, __pyx_mstate->__pyx_n_u_value};
    __pyx_mstate_global->__pyx_codeobj_tab[372] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_array_pxi, __pyx_mstate->__pyx_n_u_arrow_c_device_array, __pyx_mstate->__pyx_kp_b_iso88591_8_8_Q_V9F_3fG1_1_Q_AQ_G1_9_3d_4, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[372])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2170};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_schema_capsule, __pyx_mstate->__pyx_n_u_array_capsule, __pyx_mstate->__pyx_n_u_c_schema, __pyx_mstate->__pyx_n_u_c_array, __pyx_mstate->__pyx_n_u_array};
    __pyx_mstate_global->__pyx_codeobj_tab[373] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_array_pxi, __pyx_mstate->__pyx_n_u_import_from_c_device_capsule, __pyx_mstate->__pyx_kp_b_iso88591_A_6a7Gq_1_N_4AYa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[373])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2187};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_stream, __pyx_mstate->__pyx_n_u_dlm_tensor};
    __pyx_mstate_global->__pyx_codeobj_tab[374] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_array_pxi, __pyx_mstate->__pyx_n_u_dlpack, __pyx_mstate->__pyx_kp_b_iso88591_7_Q_q_1D_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[374])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2212};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_device};
    __pyx_mstate_global->__pyx_codeobj_tab[375] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_array_pxi, __pyx_mstate->__pyx_n_u_dlpack_device, __pyx_mstate->__pyx_kp_b_iso88591_A_q_AT_v_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[375])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 1, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2463};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_maps_as_pydicts, __pyx_mstate->__pyx_n_u_maybe_py_list, __pyx_mstate->__pyx_n_u_py_list, __pyx_mstate->__pyx_n_u_array};
    __pyx_mstate_global->__pyx_codeobj_tab[376] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_array_pxi, __pyx_mstate->__pyx_n_u_to_pylist, __pyx_mstate->__pyx_kp_b_iso88591_1_T_a_9, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[376])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2535};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_recursive, __pyx_mstate->__pyx_n_u_options};
    __pyx_mstate_global->__pyx_codeobj_tab[377] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_array_pxi, __pyx_mstate->__pyx_n_u_flatten, __pyx_mstate->__pyx_kp_b_iso88591_v_R_1_s_M, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[377])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2629};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[378] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_array_pxi, __pyx_mstate->__pyx_n_u_value_parent_indices, __pyx_mstate->__pyx_kp_b_iso88591_A_s, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[378])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2651};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[379] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_array_pxi, __pyx_mstate->__pyx_n_u_value_lengths, __pyx_mstate->__pyx_kp_b_iso88591_A_s_aq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[379])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 11, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2678};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_offsets, __pyx_mstate->__pyx_n_u_values, __pyx_mstate->__pyx_n_u_type, __pyx_mstate->__pyx_n_u_pool, __pyx_mstate->__pyx_n_u_mask, __pyx_mstate->__pyx_n_u_offsets_2, __pyx_mstate->__pyx_n_u_values_2, __pyx_mstate->__pyx_n_u_out, __pyx_mstate->__pyx_n_u_c_mask, __pyx_mstate->__pyx_n_u_cpool, __pyx_mstate->__pyx_n_u_result};
    __pyx_mstate_global->__pyx_codeobj_tab[380] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_array_pxi, __pyx_mstate->__pyx_n_u_from_arrays, __pyx_mstate->__pyx_kp_b_iso88591_A3I_TUp_9_7_9E_5_q_nA_0_Jhc_gS_W, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[380])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 11, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2863};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_offsets, __pyx_mstate->__pyx_n_u_values, __pyx_mstate->__pyx_n_u_type, __pyx_mstate->__pyx_n_u_pool, __pyx_mstate->__pyx_n_u_mask, __pyx_mstate->__pyx_n_u_offsets_2, __pyx_mstate->__pyx_n_u_values_2, __pyx_mstate->__pyx_n_u_out, __pyx_mstate->__pyx_n_u_c_mask, __pyx_mstate->__pyx_n_u_cpool, __pyx_mstate->__pyx_n_u_result};
    __pyx_mstate_global->__pyx_codeobj_tab[381] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_array_pxi, __pyx_mstate->__pyx_n_u_from_arrays, __pyx_mstate->__pyx_kp_b_iso88591_A3I_TU0_9_7_9E_5_q_nA_5Q_Jhc_gS, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[381])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {6, 0, 0, 13, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3003};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_offsets, __pyx_mstate->__pyx_n_u_sizes, __pyx_mstate->__pyx_n_u_values, __pyx_mstate->__pyx_n_u_type, __pyx_mstate->__pyx_n_u_pool, __pyx_mstate->__pyx_n_u_mask, __pyx_mstate->__pyx_n_u_offsets_2, __pyx_mstate->__pyx_n_u_sizes_2, __pyx_mstate->__pyx_n_u_values_2, __pyx_mstate->__pyx_n_u_out, __pyx_mstate->__pyx_n_u_c_mask, __pyx_mstate->__pyx_n_u_cpool, __pyx_mstate->__pyx_n_u_result};
    __pyx_mstate_global->__pyx_codeobj_tab[382] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_array_pxi, __pyx_mstate->__pyx_n_u_from_arrays, __pyx_mstate->__pyx_kp_b_iso88591_A_PP_8_7_9E_Q_5_q_nA_4A_Jhc_fCq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[382])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {6, 0, 0, 13, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3225};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_offsets, __pyx_mstate->__pyx_n_u_sizes, __pyx_mstate->__pyx_n_u_values, __pyx_mstate->__pyx_n_u_type, __pyx_mstate->__pyx_n_u_pool, __pyx_mstate->__pyx_n_u_mask, __pyx_mstate->__pyx_n_u_offsets_2, __pyx_mstate->__pyx_n_u_sizes_2, __pyx_mstate->__pyx_n_u_values_2, __pyx_mstate->__pyx_n_u_out, __pyx_mstate->__pyx_n_u_c_mask, __pyx_mstate->__pyx_n_u_cpool, __pyx_mstate->__pyx_n_u_result};
    __pyx_mstate_global->__pyx_codeobj_tab[383] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_array_pxi, __pyx_mstate->__pyx_n_u_from_arrays, __pyx_mstate->__pyx_kp_b_iso88591_A_PP_8_7_9E_Q_5_q_nA_9_Jhc_fCq_G, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[383])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {6, 0, 0, 13, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3453};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_offsets, __pyx_mstate->__pyx_n_u_keys, __pyx_mstate->__pyx_n_u_items, __pyx_mstate->__pyx_n_u_type, __pyx_mstate->__pyx_n_u_pool, __pyx_mstate->__pyx_n_u_mask, __pyx_mstate->__pyx_n_u_offsets_2, __pyx_mstate->__pyx_n_u_keys_2, __pyx_mstate->__pyx_n_u_items_2, __pyx_mstate->__pyx_n_u_out, __pyx_mstate->__pyx_n_u_c_mask, __pyx_mstate->__pyx_n_u_cpool, __pyx_mstate->__pyx_n_u_result};
    __pyx_mstate_global->__pyx_codeobj_tab[384] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_array_pxi, __pyx_mstate->__pyx_n_u_from_arrays, __pyx_mstate->__pyx_kp_b_iso88591_A8NkYZ_9_7_9E_q_5_q_nA_q_Jha_k_n, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[384])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 9, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3590};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_values, __pyx_mstate->__pyx_n_u_list_size, __pyx_mstate->__pyx_n_u_type, __pyx_mstate->__pyx_n_u_mask, __pyx_mstate->__pyx_n_u_values_2, __pyx_mstate->__pyx_n_u_list_size_2, __pyx_mstate->__pyx_n_u_c_result, __pyx_mstate->__pyx_n_u_c_mask, __pyx_mstate->__pyx_n_u_result};
    __pyx_mstate_global->__pyx_codeobj_tab[385] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_array_pxi, __pyx_mstate->__pyx_n_u_from_arrays, __pyx_mstate->__pyx_kp_b_iso88591_A_Q_5_q_z_j_d_A_z_A_j_k_l_a_Qa_i, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[385])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3722};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pos, __pyx_mstate->__pyx_n_u_warnings};
    __pyx_mstate_global->__pyx_codeobj_tab[386] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_array_pxi, __pyx_mstate->__pyx_n_u_child, __pyx_mstate->__pyx_kp_b_iso88591_A_Q_8_t6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[386])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3740};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pos, __pyx_mstate->__pyx_n_u_result};
    __pyx_mstate_global->__pyx_codeobj_tab[387] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_array_pxi, __pyx_mstate->__pyx_n_u_field, __pyx_mstate->__pyx_kp_b_iso88591_A_T_q_7_Q_Qa_ha_8, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[387])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 12, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3784};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_types, __pyx_mstate->__pyx_n_u_value_offsets, __pyx_mstate->__pyx_n_u_children, __pyx_mstate->__pyx_n_u_field_names, __pyx_mstate->__pyx_n_u_type_codes, __pyx_mstate->__pyx_n_u_out, __pyx_mstate->__pyx_n_u_c, __pyx_mstate->__pyx_n_u_child, __pyx_mstate->__pyx_n_u_c_field_names, __pyx_mstate->__pyx_n_u_c_type_codes, __pyx_mstate->__pyx_n_u_x, __pyx_mstate->__pyx_n_u_result};
    __pyx_mstate_global->__pyx_codeobj_tab[388] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_array_pxi, __pyx_mstate->__pyx_n_u_from_dense, __pyx_mstate->__pyx_kp_b_iso88591_A_0_IQ_Zq_Q_wa_Q_Zq_q_gQ_Q_Jaq_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[388])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 11, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3828};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_types, __pyx_mstate->__pyx_n_u_children, __pyx_mstate->__pyx_n_u_field_names, __pyx_mstate->__pyx_n_u_type_codes, __pyx_mstate->__pyx_n_u_out, __pyx_mstate->__pyx_n_u_c, __pyx_mstate->__pyx_n_u_child, __pyx_mstate->__pyx_n_u_c_field_names, __pyx_mstate->__pyx_n_u_c_type_codes, __pyx_mstate->__pyx_n_u_x, __pyx_mstate->__pyx_n_u_result};
    __pyx_mstate_global->__pyx_codeobj_tab[389] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_array_pxi, __pyx_mstate->__pyx_n_u_from_sparse, __pyx_mstate->__pyx_kp_b_iso88591_AAB_IQ_Zq_Q_wa_Q_Zq_q_gQ_Q_Jaq_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[389])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {6, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3876};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_length, __pyx_mstate->__pyx_n_u_value_offsets, __pyx_mstate->__pyx_n_u_data, __pyx_mstate->__pyx_n_u_null_bitmap, __pyx_mstate->__pyx_n_u_null_count, __pyx_mstate->__pyx_n_u_offset};
    __pyx_mstate_global->__pyx_codeobj_tab[390] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_array_pxi, __pyx_mstate->__pyx_n_u_from_buffers, __pyx_mstate->__pyx_kp_b_iso88591_A_a_uM_d_q_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[390])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {6, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3908};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_length, __pyx_mstate->__pyx_n_u_value_offsets, __pyx_mstate->__pyx_n_u_data, __pyx_mstate->__pyx_n_u_null_bitmap, __pyx_mstate->__pyx_n_u_null_count, __pyx_mstate->__pyx_n_u_offset};
    __pyx_mstate_global->__pyx_codeobj_tab[391] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_array_pxi, __pyx_mstate->__pyx_n_u_from_buffers, __pyx_mstate->__pyx_kp_b_iso88591_A_a_uM_D_q_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[391])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3978};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[392] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_array_pxi, __pyx_mstate->__pyx_n_u_dictionary_encode, __pyx_mstate->__pyx_kp_b_iso88591_A_q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[392])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3981};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[393] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_array_pxi, __pyx_mstate->__pyx_n_u_dictionary_decode, __pyx_mstate->__pyx_kp_b_iso88591_A_t_e1D, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[393])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {6, 0, 0, 12, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4005};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_type, __pyx_mstate->__pyx_n_u_length, __pyx_mstate->__pyx_n_u_buffers, __pyx_mstate->__pyx_n_u_dictionary, __pyx_mstate->__pyx_n_u_null_count, __pyx_mstate->__pyx_n_u_offset, __pyx_mstate->__pyx_n_u_c_buffers, __pyx_mstate->__pyx_n_u_c_type, __pyx_mstate->__pyx_n_u_c_data, __pyx_mstate->__pyx_n_u_c_result, __pyx_mstate->__pyx_n_u_buf, __pyx_mstate->__pyx_n_u_result};
    __pyx_mstate_global->__pyx_codeobj_tab[394] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_array_pxi, __pyx_mstate->__pyx_n_u_from_buffers, __pyx_mstate->__pyx_kp_b_iso88591_A_1_G1_Zq_5Qa_uA_q_b_j_RuA_F_q_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[394])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {7, 0, 0, 13, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4052};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_indices, __pyx_mstate->__pyx_n_u_dictionary, __pyx_mstate->__pyx_n_u_mask, __pyx_mstate->__pyx_n_u_ordered, __pyx_mstate->__pyx_n_u_from_pandas, __pyx_mstate->__pyx_n_u_safe, __pyx_mstate->__pyx_n_u_memory_pool, __pyx_mstate->__pyx_n_u_indices_2, __pyx_mstate->__pyx_n_u_dictionary_3, __pyx_mstate->__pyx_n_u_c_type, __pyx_mstate->__pyx_n_u_c_result, __pyx_mstate->__pyx_n_u_c_ordered, __pyx_mstate->__pyx_n_u_result};
    __pyx_mstate_global->__pyx_codeobj_tab[395] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_array_pxi, __pyx_mstate->__pyx_n_u_from_arrays, __pyx_mstate->__pyx_kp_b_iso88591_A_A_6a_Qiq_uG1_q_q_AYfF_5_v_Ql_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[395])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4131};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_index, __pyx_mstate->__pyx_n_u_arr, __pyx_mstate->__pyx_n_u_child};
    __pyx_mstate_global->__pyx_codeobj_tab[396] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_array_pxi, __pyx_mstate->__pyx_n_u_field, __pyx_mstate->__pyx_kp_b_iso88591_A_0_A_QhgQ_C_awaq_vS_haq_q_q_CvQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[396])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4160};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_index, __pyx_mstate->__pyx_n_u_memory_pool, __pyx_mstate->__pyx_n_u_arr, __pyx_mstate->__pyx_n_u_child, __pyx_mstate->__pyx_n_u_pool, __pyx_mstate->__pyx_n_u_int_index};
    __pyx_mstate_global->__pyx_codeobj_tab[397] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_array_pxi, __pyx_mstate->__pyx_n_u_flattened_field, __pyx_mstate->__pyx_kp_b_iso88591_Q_0_A_7q_QhgQ_E_1_z_1_haq_q_q_C, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[397])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4193};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_memory_pool, __pyx_mstate->__pyx_n_u_arrays, __pyx_mstate->__pyx_n_u_pool, __pyx_mstate->__pyx_n_u_sarr, __pyx_mstate->__pyx_n_u_arr};
    __pyx_mstate_global->__pyx_codeobj_tab[398] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_array_pxi, __pyx_mstate->__pyx_n_u_flatten, __pyx_mstate->__pyx_kp_b_iso88591_Q_7q_1_Q_1D_q_5_G1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[398])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {6, 0, 0, 23, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4216};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_arrays, __pyx_mstate->__pyx_n_u_names, __pyx_mstate->__pyx_n_u_fields, __pyx_mstate->__pyx_n_u_mask, __pyx_mstate->__pyx_n_u_memory_pool, __pyx_mstate->__pyx_n_u_type, __pyx_mstate->__pyx_n_u_c_array, __pyx_mstate->__pyx_n_u_c_mask, __pyx_mstate->__pyx_n_u_c_arrays, __pyx_mstate->__pyx_n_u_c_names, __pyx_mstate->__pyx_n_u_c_fields, __pyx_mstate->__pyx_n_u_c_result, __pyx_mstate->__pyx_n_u_num_arrays, __pyx_mstate->__pyx_n_u_length, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_py_field, __pyx_mstate->__pyx_n_u_struct_type, __pyx_mstate->__pyx_n_u_field, __pyx_mstate->__pyx_n_u_arr, __pyx_mstate->__pyx_n_u_name, __pyx_mstate->__pyx_n_u_item, __pyx_mstate->__pyx_n_u_result, __pyx_mstate->__pyx_n_u_x};
    __pyx_mstate_global->__pyx_codeobj_tab[399] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_array_pxi, __pyx_mstate->__pyx_n_u_from_arrays, __pyx_mstate->__pyx_kp_b_iso88591_A_1L_7_d_wa_AQ_5_q_Q_gQa_6_E_WCq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[399])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 8, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS), 4308};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_order, __pyx_mstate->__pyx_n_u_by, __pyx_mstate->__pyx_n_u_kwargs, __pyx_mstate->__pyx_n_u_tosort, __pyx_mstate->__pyx_n_u_sort_keys, __pyx_mstate->__pyx_n_u_indices, __pyx_mstate->__pyx_n_u_field};
    __pyx_mstate_global->__pyx_codeobj_tab[400] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_array_pxi, __pyx_mstate->__pyx_n_u_sort, __pyx_mstate->__pyx_kp_b_iso88591_3gQ_L_5Qe2T_L_b_WG4y_A_R_A_HCr, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[400])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {6, 0, 0, 13, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4343};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_type, __pyx_mstate->__pyx_n_u_allow_none_for_type, __pyx_mstate->__pyx_n_u_logical_length, __pyx_mstate->__pyx_n_u_run_ends, __pyx_mstate->__pyx_n_u_values, __pyx_mstate->__pyx_n_u_logical_offset, __pyx_mstate->__pyx_n_u_logical_length_2, __pyx_mstate->__pyx_n_u_run_ends_2, __pyx_mstate->__pyx_n_u_values_2, __pyx_mstate->__pyx_n_u_logical_offset_2, __pyx_mstate->__pyx_n_u_c_type, __pyx_mstate->__pyx_n_u_ree_array, __pyx_mstate->__pyx_n_u_result};
    __pyx_mstate_global->__pyx_codeobj_tab[401] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_array_pxi, __pyx_mstate->__pyx_n_u_from_arrays_2, __pyx_mstate->__pyx_kp_b_iso88591_A_1_1_A_5_q_q_t1_gQhe4q_Qa_N_e1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[401])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4374};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_run_ends, __pyx_mstate->__pyx_n_u_values, __pyx_mstate->__pyx_n_u_type, __pyx_mstate->__pyx_n_u_logical_length};
    __pyx_mstate_global->__pyx_codeobj_tab[402] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_array_pxi, __pyx_mstate->__pyx_n_u_from_arrays, __pyx_mstate->__pyx_kp_b_iso88591_A_q_V6_AZr_PQ_avV1_9, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[402])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {6, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4396};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_type, __pyx_mstate->__pyx_n_u_length, __pyx_mstate->__pyx_n_u_buffers, __pyx_mstate->__pyx_n_u_null_count, __pyx_mstate->__pyx_n_u_offset, __pyx_mstate->__pyx_n_u_children};
    __pyx_mstate_global->__pyx_codeobj_tab[403] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_array_pxi, __pyx_mstate->__pyx_n_u_from_buffers, __pyx_mstate->__pyx_kp_b_iso88591_AAK1_9Cq_4_3c_AQ_Q_AQ_3ay_1_aq_7, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[403])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4476};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_ree_array};
    __pyx_mstate_global->__pyx_codeobj_tab[404] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_array_pxi, __pyx_mstate->__pyx_n_u_find_physical_offset, __pyx_mstate->__pyx_kp_b_iso88591_A_ET_y_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[404])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4488};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_ree_array};
    __pyx_mstate_global->__pyx_codeobj_tab[405] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_array_pxi, __pyx_mstate->__pyx_n_u_find_physical_length, __pyx_mstate->__pyx_kp_b_iso88591_A_ET_y_1_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[405])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4514};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_typ, __pyx_mstate->__pyx_n_u_storage, __pyx_mstate->__pyx_n_u_ext_array, __pyx_mstate->__pyx_n_u_result};
    __pyx_mstate_global->__pyx_codeobj_tab[406] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_array_pxi, __pyx_mstate->__pyx_n_u_from_storage, __pyx_mstate->__pyx_kp_b_iso88591_A_7_3a_1_8_12_K_0_JgQ_a_DA_iq_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[406])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4615};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[407] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_array_pxi, __pyx_mstate->__pyx_n_u_to_numpy_ndarray, __pyx_mstate->__pyx_kp_b_iso88591_A_t_Ry_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[407])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4635};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_ext_array, __pyx_mstate->__pyx_n_u_ctensor};
    __pyx_mstate_global->__pyx_codeobj_tab[408] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_array_pxi, __pyx_mstate->__pyx_n_u_to_tensor, __pyx_mstate->__pyx_kp_b_iso88591_A_10J_a_iy, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[408])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 8, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4660};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_obj, __pyx_mstate->__pyx_n_u_dim_names, __pyx_mstate->__pyx_n_u_permutation, __pyx_mstate->__pyx_n_u_arrow_type, __pyx_mstate->__pyx_n_u_shape, __pyx_mstate->__pyx_n_u_values, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_n_u_genexpr};
    __pyx_mstate_global->__pyx_codeobj_tab[409] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_array_pxi, __pyx_mstate->__pyx_n_u_from_numpy_ndarray, __pyx_mstate->__pyx_kp_b_iso88591_A_T_3as_A_A_2U_3hc_AQ_WA_t_Qk_iq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[409])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4791};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_zero_copy_only, __pyx_mstate->__pyx_n_u_writable, __pyx_mstate->__pyx_n_u_e};
    __pyx_mstate_global->__pyx_codeobj_tab[410] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_array_pxi, __pyx_mstate->__pyx_n_u_to_numpy, __pyx_mstate->__pyx_kp_b_iso88591_oQ_4q_t89Be1Ba_1_1_s_Jat_Ry_HXX, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[410])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4823};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_storage};
    __pyx_mstate_global->__pyx_codeobj_tab[411] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_array_pxi, __pyx_mstate->__pyx_n_u_from_storage, __pyx_mstate->__pyx_kp_b_iso88591_A_5_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[411])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4839};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_obj, __pyx_mstate->__pyx_n_u_storage_arr};
    __pyx_mstate_global->__pyx_codeobj_tab[412] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_array_pxi, __pyx_mstate->__pyx_n_u_from_numpy, __pyx_mstate->__pyx_kp_b_iso88591_A8_3fCq_A_as_3gXRxr_1N_3a_e1CuAR, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[412])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4970};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_arrays, __pyx_mstate->__pyx_n_u_memory_pool, __pyx_mstate->__pyx_n_u_c_arrays, __pyx_mstate->__pyx_n_u_c_concatenated, __pyx_mstate->__pyx_n_u_pool, __pyx_mstate->__pyx_n_u_array};
    __pyx_mstate_global->__pyx_codeobj_tab[413] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_array_pxi, __pyx_mstate->__pyx_n_u_concat_arrays, __pyx_mstate->__pyx_kp_b_iso88591_L_31A_4z_1A_4q_q_q_1Ja_Qa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[413])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5022};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_type, __pyx_mstate->__pyx_n_u_arr};
    __pyx_mstate_global->__pyx_codeobj_tab[414] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_array_pxi, __pyx_mstate->__pyx_n_u_empty_array, __pyx_mstate->__pyx_kp_b_iso88591_t4s_o_q_A_D_e1D_Q_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[414])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 35};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_value};
    __pyx_mstate_global->__pyx_codeobj_tab[415] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_builder_pxi, __pyx_mstate->__pyx_n_u_append, __pyx_mstate->__pyx_kp_b_iso88591_A_QhgQ_BgQgQa_3e3d_Bk_1A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[415])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 54};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_values, __pyx_mstate->__pyx_n_u_value};
    __pyx_mstate_global->__pyx_codeobj_tab[416] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_builder_pxi, __pyx_mstate->__pyx_n_u_append_values, __pyx_mstate->__pyx_kp_b_iso88591_A_IQ_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[416])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 66};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_out};
    __pyx_mstate_global->__pyx_codeobj_tab[417] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_builder_pxi, __pyx_mstate->__pyx_n_u_finish, __pyx_mstate->__pyx_kp_b_iso88591_A_BgQaq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[417])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[418] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[418])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state};
    __pyx_mstate_global->__pyx_codeobj_tab[419] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[419])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 101};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_value};
    __pyx_mstate_global->__pyx_codeobj_tab[420] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_builder_pxi, __pyx_mstate->__pyx_n_u_append, __pyx_mstate->__pyx_kp_b_iso88591_A_QhgQ_BgQgQa_3e3d_Bk_1A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[420])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 120};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_values, __pyx_mstate->__pyx_n_u_value};
    __pyx_mstate_global->__pyx_codeobj_tab[421] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_builder_pxi, __pyx_mstate->__pyx_n_u_append_values, __pyx_mstate->__pyx_kp_b_iso88591_A_IQ_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[421])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 132};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_out};
    __pyx_mstate_global->__pyx_codeobj_tab[422] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_builder_pxi, __pyx_mstate->__pyx_n_u_finish, __pyx_mstate->__pyx_kp_b_iso88591_A_BgQaq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[422])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[423] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[423])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state};
    __pyx_mstate_global->__pyx_codeobj_tab[424] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[424])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 73};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[425] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_reduce, __pyx_mstate->__pyx_kp_b_iso88591_A_L_t9D, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[425])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 99};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[426] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_length, __pyx_mstate->__pyx_kp_b_iso88591_A_t, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[426])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 5, 8, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 119};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_indent, __pyx_mstate->__pyx_n_u_window, __pyx_mstate->__pyx_n_u_container_window, __pyx_mstate->__pyx_n_u_skip_new_lines, __pyx_mstate->__pyx_n_u_element_size_limit, __pyx_mstate->__pyx_n_u_result, __pyx_mstate->__pyx_n_u_options};
    __pyx_mstate_global->__pyx_codeobj_tab[427] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_to_string, __pyx_mstate->__pyx_kp_b_iso88591_n4LA_FaF_Q_q_1_a_Q_y_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[427])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS), 170};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_kwargs, __pyx_mstate->__pyx_n_u_warnings};
    __pyx_mstate_global->__pyx_codeobj_tab[428] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_format, __pyx_mstate->__pyx_kp_b_iso88591_A_Qa_t_S, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[428])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 1, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 190};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_full};
    __pyx_mstate_global->__pyx_codeobj_tab[429] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_validate, __pyx_mstate->__pyx_kp_b_iso88591_q_1_A_AT_2_b_Q_AT_2_b, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[429])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 265};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_total_buffer_size};
    __pyx_mstate_global->__pyx_codeobj_tab[430] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_get_total_buffer_size, __pyx_mstate->__pyx_kp_b_iso88591_A_L_O1F_a_q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[430])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 290};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[431] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_sizeof, __pyx_mstate->__pyx_kp_b_iso88591_A_uA_5_3b_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[431])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 1, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 322};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_nan_is_null, __pyx_mstate->__pyx_n_u_options};
    __pyx_mstate_global->__pyx_codeobj_tab[432] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_is_null, __pyx_mstate->__pyx_kp_b_iso88591_Q_L_R_1L_s_N_awa_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[432])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 356};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[433] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_is_nan, __pyx_mstate->__pyx_kp_b_iso88591_A_L_s_G1A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[433])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 381};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[434] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_is_valid, __pyx_mstate->__pyx_kp_b_iso88591_A_L_s_IQa_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[434])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 413};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_fill_value};
    __pyx_mstate_global->__pyx_codeobj_tab[435] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_fill_null, __pyx_mstate->__pyx_kp_b_iso88591_AD_L_s_JavQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[435])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 450};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_other, __pyx_mstate->__pyx_n_u_this_arr, __pyx_mstate->__pyx_n_u_other_arr, __pyx_mstate->__pyx_n_u_result};
    __pyx_mstate_global->__pyx_codeobj_tab[436] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_equals, __pyx_mstate->__pyx_kp_b_iso88591_A4_L_6_A_1_d_uA_XWAV1_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[436])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS), 490};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_options, __pyx_mstate->__pyx_n_u_types_mapper, __pyx_mstate->__pyx_n_u_kwargs};
    __pyx_mstate_global->__pyx_codeobj_tab[437] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_to_pandas, __pyx_mstate->__pyx_kp_b_iso88591_q_L_AV_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[437])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 494};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_zero_copy_only, __pyx_mstate->__pyx_n_u_out, __pyx_mstate->__pyx_n_u_c_options, __pyx_mstate->__pyx_n_u_values};
    __pyx_mstate_global->__pyx_codeobj_tab[438] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_to_numpy, __pyx_mstate->__pyx_kp_b_iso88591_a_L_3c_Q_1_A_Q_1_Q_1A_Qha_RuAV1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[438])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 549};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_dtype, __pyx_mstate->__pyx_n_u_copy, __pyx_mstate->__pyx_n_u_values};
    __pyx_mstate_global->__pyx_codeobj_tab[439] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_array_2, __pyx_mstate->__pyx_kp_b_iso88591_k_L_5_1_A_Ya_6_A_1_vWAWE, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[439])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 564};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_target_type, __pyx_mstate->__pyx_n_u_safe, __pyx_mstate->__pyx_n_u_options};
    __pyx_mstate_global->__pyx_codeobj_tab[440] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_cast, __pyx_mstate->__pyx_kp_b_iso88591_k_q_L_s_E_U, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[440])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 599};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_null_encoding, __pyx_mstate->__pyx_n_u_options};
    __pyx_mstate_global->__pyx_codeobj_tab[441] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_dictionary_encode, __pyx_mstate->__pyx_kp_b_iso88591_ax_L_R_q_s_N_8, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[441])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 663};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_memory_pool, __pyx_mstate->__pyx_n_u_flattened, __pyx_mstate->__pyx_n_u_pool, __pyx_mstate->__pyx_n_u_col};
    __pyx_mstate_global->__pyx_codeobj_tab[442] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_flatten, __pyx_mstate->__pyx_kp_b_iso88591_Qz_L_7q_at_q_5_G1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[442])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 734};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_memory_pool};
    __pyx_mstate_global->__pyx_codeobj_tab[443] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_combine_chunks, __pyx_mstate->__pyx_kp_b_iso88591_4AT_L_4_3a_5_U_a_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[443])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 782};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[444] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_unique, __pyx_mstate->__pyx_kp_b_iso88591_AF_L_s_N_Qa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[444])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 820};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[445] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_value_counts, __pyx_mstate->__pyx_kp_b_iso88591_AX_L_s_N_31A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[445])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 867};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_offset, __pyx_mstate->__pyx_n_u_length, __pyx_mstate->__pyx_n_u_result};
    __pyx_mstate_global->__pyx_codeobj_tab[446] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_slice, __pyx_mstate->__pyx_kp_b_iso88591_Q_7_A_AQ_AS_7_Q_T_vQa_T_vQha, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[446])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 925};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_mask, __pyx_mstate->__pyx_n_u_null_selection_behavior};
    __pyx_mstate_global->__pyx_codeobj_tab[447] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_filter, __pyx_mstate->__pyx_kp_b_iso88591_L_s_G1F, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[447])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 1, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 990};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_start, __pyx_mstate->__pyx_n_u_end, __pyx_mstate->__pyx_n_u_memory_pool};
    __pyx_mstate_global->__pyx_codeobj_tab[448] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_index, __pyx_mstate->__pyx_kp_b_iso88591_Z_L_s_F_6_uL, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[448])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1038};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_indices};
    __pyx_mstate_global->__pyx_codeobj_tab[449] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_take, __pyx_mstate->__pyx_kp_b_iso88591_AX_L_s_E, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[449])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1085};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[450] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_drop_null, __pyx_mstate->__pyx_kp_b_iso88591_AJ_L_s_Jaq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[450])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS), 1125};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_order, __pyx_mstate->__pyx_n_u_kwargs, __pyx_mstate->__pyx_n_u_indices};
    __pyx_mstate_global->__pyx_codeobj_tab[451] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_sort, __pyx_mstate->__pyx_kp_b_iso88591_L_R_A_Cr_Qj_k_t5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[451])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1149};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_memory_pool, __pyx_mstate->__pyx_n_u_pool, __pyx_mstate->__pyx_n_u_c_result};
    __pyx_mstate_global->__pyx_codeobj_tab[452] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_unify_dictionaries, __pyx_mstate->__pyx_kp_b_iso88591_8_z_L_7q_88J_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[452])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1271};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_i};
    __pyx_mstate_global->__pyx_codeobj_tab[453] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_chunk, __pyx_mstate->__pyx_kp_b_iso88591_A0_2S_L_2Rq_AQ_nF_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[453])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 1, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1356};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_maps_as_pydicts, __pyx_mstate->__pyx_n_u_result, __pyx_mstate->__pyx_n_u_i};
    __pyx_mstate_global->__pyx_codeobj_tab[454] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_to_pylist, __pyx_mstate->__pyx_kp_b_iso88591_12_L_E_at1_d_Q_a_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[454])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1387};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_requested_schema, __pyx_mstate->__pyx_n_u_chunked, __pyx_mstate->__pyx_n_u_c_stream, __pyx_mstate->__pyx_n_u_target_type, __pyx_mstate->__pyx_n_u_e, __pyx_mstate->__pyx_n_u_stream_capsule};
    __pyx_mstate_global->__pyx_codeobj_tab[455] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_arrow_c_stream, __pyx_mstate->__pyx_kp_b_iso88591_2_L_G1_9_3d_d_q_U_q_A_Gq_VWWX_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[455])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1430};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_stream, __pyx_mstate->__pyx_n_u_c_stream, __pyx_mstate->__pyx_n_u_c_chunked_array, __pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[456] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_import_from_c_capsule, __pyx_mstate->__pyx_kp_b_iso88591_A_A_nA_q_81A_E_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[456])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1470};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[457] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_assert_cpu, __pyx_mstate->__pyx_kp_b_iso88591_A_4t1_Qa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[457])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 10, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1475};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_arrays, __pyx_mstate->__pyx_n_u_type, __pyx_mstate->__pyx_n_u_arr, __pyx_mstate->__pyx_n_u_c_arrays, __pyx_mstate->__pyx_n_u_c_result, __pyx_mstate->__pyx_n_u_c_type, __pyx_mstate->__pyx_n_u_requested_type, __pyx_mstate->__pyx_n_u_capsule, __pyx_mstate->__pyx_n_u_result, __pyx_mstate->__pyx_n_u_x};
    __pyx_mstate_global->__pyx_codeobj_tab[458] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_chunked_array, __pyx_mstate->__pyx_kp_b_iso88591_a_z_5_q_T_4A_Q_1A_4AQ_5_uD_fCq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[458])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1637};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_dtype, __pyx_mstate->__pyx_n_u_copy, __pyx_mstate->__pyx_n_u_column_arrays, __pyx_mstate->__pyx_n_u_arr, __pyx_mstate->__pyx_n_u_i};
    __pyx_mstate_global->__pyx_codeobj_tab[459] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_array_2, __pyx_mstate->__pyx_kp_b_iso88591_k_L_5_1_A_Zq_hat7_4vWD_U_4q_1_F, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[459])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1657};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_nan_as_null, __pyx_mstate->__pyx_n_u_allow_copy, __pyx_mstate->__pyx_n_u_PyArrowDataFrame};
    __pyx_mstate_global->__pyx_codeobj_tab[460] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_dataframe, __pyx_mstate->__pyx_kp_b_iso88591_0C7_4_2_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[460])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1722};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_i};
    __pyx_mstate_global->__pyx_codeobj_tab[461] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_column_2, __pyx_mstate->__pyx_kp_b_iso88591_A_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[461])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1725};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_field_indices};
    __pyx_mstate_global->__pyx_codeobj_tab[462] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_ensure_integer_index, __pyx_mstate->__pyx_kp_b_iso88591_A_Qd_D_Qa_s_Q_hay_A_Ba_ha_Qk_Qa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[462])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1744};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[463] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_is_initialized, __pyx_mstate->__pyx_kp_b_iso88591_A_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[463])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1747};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_i};
    __pyx_mstate_global->__pyx_codeobj_tab[464] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_column, __pyx_mstate->__pyx_kp_b_iso88591_Ab_t81D_6aq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[464])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1859};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[465] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_drop_null, __pyx_mstate->__pyx_kp_b_iso88591_A_L_s_Jaq_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[465])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1894};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_i};
    __pyx_mstate_global->__pyx_codeobj_tab[466] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_field, __pyx_mstate->__pyx_kp_b_iso88591_A6_t7, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[466])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1923};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_mapping, __pyx_mstate->__pyx_n_u_schema, __pyx_mstate->__pyx_n_u_metadata};
    __pyx_mstate_global->__pyx_codeobj_tab[467] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_from_pydict_2, __pyx_mstate->__pyx_kp_b_iso88591_A_8_z_1D_A_1_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[467])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1990};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_mapping, __pyx_mstate->__pyx_n_u_schema, __pyx_mstate->__pyx_n_u_metadata};
    __pyx_mstate_global->__pyx_codeobj_tab[468] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_from_pylist_2, __pyx_mstate->__pyx_kp_b_iso88591_A_8_t_1D_A_1_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[468])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS), 2112};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_sorting, __pyx_mstate->__pyx_n_u_kwargs, __pyx_mstate->__pyx_n_u_indices};
    __pyx_mstate_global->__pyx_codeobj_tab[469] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_sort_by, __pyx_mstate->__pyx_kp_b_iso88591_AR_L_Qiq_b_R_A_Cr_Qj_1_t5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[469])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2163};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_indices};
    __pyx_mstate_global->__pyx_codeobj_tab[470] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_take, __pyx_mstate->__pyx_kp_b_iso88591_AH_L_s_E, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[470])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2202};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_mask, __pyx_mstate->__pyx_n_u_null_selection_behavior};
    __pyx_mstate_global->__pyx_codeobj_tab[471] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_filter, __pyx_mstate->__pyx_kp_b_iso88591_F_L_QfCr_4r_q_a_3b_q_fA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[471])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 1, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2275};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_maps_as_pydicts, __pyx_mstate->__pyx_n_u_entries, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_name, __pyx_mstate->__pyx_n_u_column};
    __pyx_mstate_global->__pyx_codeobj_tab[472] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_to_pydict, __pyx_mstate->__pyx_kp_b_iso88591_1B_E_at1_4vQb_T_Ja_7q_7_F_1A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[472])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 1, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2315};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_maps_as_pydicts, __pyx_mstate->__pyx_n_u_pydict, __pyx_mstate->__pyx_n_u_names, __pyx_mstate->__pyx_n_u_pylist, __pyx_mstate->__pyx_n_u_row, __pyx_mstate->__pyx_n_u_column};
    __pyx_mstate_global->__pyx_codeobj_tab[473] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_to_pylist, __pyx_mstate->__pyx_kp_b_iso88591_1B_Zq_0_G1_86_t_Q_gU_4q_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[473])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 2, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2354};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_show_metadata, __pyx_mstate->__pyx_n_u_preview_cols, __pyx_mstate->__pyx_n_u_schema_as_string, __pyx_mstate->__pyx_n_u_title, __pyx_mstate->__pyx_n_u_pieces, __pyx_mstate->__pyx_n_u_i};
    __pyx_mstate_global->__pyx_codeobj_tab[474] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_to_string, __pyx_mstate->__pyx_kp_b_iso88591_Q_4wj_4q_1_U_t_gQ_at6_HAT_QgSP, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[474])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2385};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_i};
    __pyx_mstate_global->__pyx_codeobj_tab[475] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_remove_column, __pyx_mstate->__pyx_kp_b_iso88591_A_a_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[475])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2389};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_columns, __pyx_mstate->__pyx_n_u_indices, __pyx_mstate->__pyx_n_u_col, __pyx_mstate->__pyx_n_u_idx, __pyx_mstate->__pyx_n_u_res};
    __pyx_mstate_global->__pyx_codeobj_tab[476] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_drop_columns, __pyx_mstate->__pyx_kp_b_iso88591_AX_Qiq_aq_G1_g_Qa_t4q_hay_7_1_uA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[476])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2452};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_field_3, __pyx_mstate->__pyx_n_u_column};
    __pyx_mstate_global->__pyx_codeobj_tab[477] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_add_column, __pyx_mstate->__pyx_kp_b_iso88591_A_a_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[477])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2456};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_field_3, __pyx_mstate->__pyx_n_u_column};
    __pyx_mstate_global->__pyx_codeobj_tab[478] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_append_column, __pyx_mstate->__pyx_kp_b_iso88591_AL_t_at, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[478])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_state, __pyx_mstate->__pyx_n_u_dict_2, __pyx_mstate->__pyx_n_u_use_setstate};
    __pyx_mstate_global->__pyx_codeobj_tab[479] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_A_G1F_a_vWE_Q_q_q_q_Qg_q_Qg, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[479])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 16};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state};
    __pyx_mstate_global->__pyx_codeobj_tab[480] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_avQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[480])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2605};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[481] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_is_initialized, __pyx_mstate->__pyx_kp_b_iso88591_A_t7_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[481])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2608};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[482] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_reduce, __pyx_mstate->__pyx_kp_b_iso88591_A_L_4z_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[482])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 1, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2612};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_full};
    __pyx_mstate_global->__pyx_codeobj_tab[483] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_validate, __pyx_mstate->__pyx_kp_b_iso88591_q_1_A_AT_A_AT_y, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[483])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2636};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_metadata, __pyx_mstate->__pyx_n_u_c_meta, __pyx_mstate->__pyx_n_u_c_batch};
    __pyx_mstate_global->__pyx_codeobj_tab[484] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_replace_schema_metadata, __pyx_mstate->__pyx_kp_b_iso88591_qN_8_d_6aq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[484])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2752};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_index, __pyx_mstate->__pyx_n_u_result};
    __pyx_mstate_global->__pyx_codeobj_tab[485] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_column_2, __pyx_mstate->__pyx_kp_b_iso88591_A_q_4q_at6_it7_6_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[485])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2805};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_total_buffer_size};
    __pyx_mstate_global->__pyx_codeobj_tab[486] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_get_total_buffer_size, __pyx_mstate->__pyx_kp_b_iso88591_A_L_O1F_a_q_3, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[486])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2833};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[487] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_sizeof, __pyx_mstate->__pyx_kp_b_iso88591_A_uA_Rt1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[487])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 8, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2836};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_field_3, __pyx_mstate->__pyx_n_u_column, __pyx_mstate->__pyx_n_u_c_batch, __pyx_mstate->__pyx_n_u_c_field, __pyx_mstate->__pyx_n_u_c_arr, __pyx_mstate->__pyx_n_u_device_type};
    __pyx_mstate_global->__pyx_codeobj_tab[488] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_add_column, __pyx_mstate->__pyx_kp_b_iso88591_Ar_1_IT_q_Qha_A_E_s_y_Bl_1A_Qe1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[488])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2917};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_c_batch};
    __pyx_mstate_global->__pyx_codeobj_tab[489] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_remove_column, __pyx_mstate->__pyx_kp_b_iso88591_A_nAT_AQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[489])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 8, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2951};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_field_3, __pyx_mstate->__pyx_n_u_column, __pyx_mstate->__pyx_n_u_c_batch, __pyx_mstate->__pyx_n_u_c_field, __pyx_mstate->__pyx_n_u_c_arr, __pyx_mstate->__pyx_n_u_device_type};
    __pyx_mstate_global->__pyx_codeobj_tab[490] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_set_column, __pyx_mstate->__pyx_kp_b_iso88591_AT_1_IT_q_Qha_A_E_s_y_Bl_1A_Qe1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[490])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 10, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3017};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_names, __pyx_mstate->__pyx_n_u_c_batch, __pyx_mstate->__pyx_n_u_c_names, __pyx_mstate->__pyx_n_u_name, __pyx_mstate->__pyx_n_u_idx_to_new_name, __pyx_mstate->__pyx_n_u_new_name, __pyx_mstate->__pyx_n_u_indices, __pyx_mstate->__pyx_n_u_index, __pyx_mstate->__pyx_n_u_i};
    __pyx_mstate_global->__pyx_codeobj_tab[491] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_rename_columns, __pyx_mstate->__pyx_kp_b_iso88591_Ad_QhfA_z_q_q_a_l_vQ_g_1A_4q_9AQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[491])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3092};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_memory_pool, __pyx_mstate->__pyx_n_u_buffer, __pyx_mstate->__pyx_n_u_options};
    __pyx_mstate_global->__pyx_codeobj_tab[492] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_serialize, __pyx_mstate->__pyx_kp_b_iso88591_AN_L_8_5Qa_1_AV4y_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[492])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3141};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_offset, __pyx_mstate->__pyx_n_u_length, __pyx_mstate->__pyx_n_u_result};
    __pyx_mstate_global->__pyx_codeobj_tab[493] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_slice, __pyx_mstate->__pyx_kp_b_iso88591_Q_7_A_AQ_AS_7_Q_T_vQa_T_vQha_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[493])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3198};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_other, __pyx_mstate->__pyx_n_u_check_metadata, __pyx_mstate->__pyx_n_u_this_batch, __pyx_mstate->__pyx_n_u_other_batch, __pyx_mstate->__pyx_n_u_result};
    __pyx_mstate_global->__pyx_codeobj_tab[494] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_equals, __pyx_mstate->__pyx_kp_b_iso88591_7qF_L_t1_33Gq_4q_1_Zwav_1_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[494])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3247};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_columns, __pyx_mstate->__pyx_n_u_c_batch, __pyx_mstate->__pyx_n_u_c_indices, __pyx_mstate->__pyx_n_u_idx};
    __pyx_mstate_global->__pyx_codeobj_tab[495] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_select, __pyx_mstate->__pyx_kp_b_iso88591_AX_G1_AQ_5_A_Zq_a_nAT_Qd_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[495])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 8, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3301};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_target_schema, __pyx_mstate->__pyx_n_u_safe, __pyx_mstate->__pyx_n_u_options, __pyx_mstate->__pyx_n_u_column, __pyx_mstate->__pyx_n_u_casted, __pyx_mstate->__pyx_n_u_field, __pyx_mstate->__pyx_n_u_newcols};
    __pyx_mstate_global->__pyx_codeobj_tab[496] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_cast, __pyx_mstate->__pyx_kp_b_iso88591_nA_1_4wgS_Q_AQ_q_G_VWWdde_HIS_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[496])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS), 3363};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_options, __pyx_mstate->__pyx_n_u_kwargs};
    __pyx_mstate_global->__pyx_codeobj_tab[497] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_to_pandas, __pyx_mstate->__pyx_kp_b_iso88591_A_L_uM_6_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[497])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {6, 0, 0, 10, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3367};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_df, __pyx_mstate->__pyx_n_u_schema, __pyx_mstate->__pyx_n_u_preserve_index, __pyx_mstate->__pyx_n_u_nthreads, __pyx_mstate->__pyx_n_u_columns, __pyx_mstate->__pyx_n_u_dataframe_to_arrays, __pyx_mstate->__pyx_n_u_arrays, __pyx_mstate->__pyx_n_u_n_rows, __pyx_mstate->__pyx_n_u_c_arrays};
    __pyx_mstate_global->__pyx_codeobj_tab[498] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_from_pandas, __pyx_mstate->__pyx_kp_b_iso88591_A_1_4A_81_1_r_8_3l_87, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[498])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 11, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3462};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_arrays, __pyx_mstate->__pyx_n_u_names, __pyx_mstate->__pyx_n_u_schema, __pyx_mstate->__pyx_n_u_metadata, __pyx_mstate->__pyx_n_u_arr, __pyx_mstate->__pyx_n_u_c_schema, __pyx_mstate->__pyx_n_u_c_arrays, __pyx_mstate->__pyx_n_u_num_rows, __pyx_mstate->__pyx_n_u_warnings, __pyx_mstate->__pyx_n_u_converted_arrays, __pyx_mstate->__pyx_n_u_result};
    __pyx_mstate_global->__pyx_codeobj_tab[499] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_from_arrays, __pyx_mstate->__pyx_kp_b_iso88591_A_4O1L_3axr_s_6_q_QgQ_E_Q_A_1HG8, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[499])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3561};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_struct_array, __pyx_mstate->__pyx_n_u_c_record_batch};
    __pyx_mstate_global->__pyx_codeobj_tab[500] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_from_struct_array, __pyx_mstate->__pyx_kp_b_iso88591_A_y_Bl_S_Qa_1_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[500])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3597};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_c_record_batch, __pyx_mstate->__pyx_n_u_c_array};
    __pyx_mstate_global->__pyx_codeobj_tab[501] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_to_struct_array, __pyx_mstate->__pyx_kp_b_iso88591_A_L_Qa_nA_V_PQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[501])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3612};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_null_to_nan, __pyx_mstate->__pyx_n_u_row_major, __pyx_mstate->__pyx_n_u_memory_pool, __pyx_mstate->__pyx_n_u_c_record_batch, __pyx_mstate->__pyx_n_u_c_tensor, __pyx_mstate->__pyx_n_u_pool};
    __pyx_mstate_global->__pyx_codeobj_tab[502] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_to_tensor, __pyx_mstate->__pyx_kp_b_iso88591_CC_aH_L_7q_Qa_Q_fO9AQMXXY_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[502])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3693};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_destination, __pyx_mstate->__pyx_n_u_c_batch, __pyx_mstate->__pyx_n_u_c_memory_manager};
    __pyx_mstate_global->__pyx_codeobj_tab[503] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_copy_to, __pyx_mstate->__pyx_kp_b_iso88591_A_Qm1_G2T_CZZ_q_Q_7_1_7q_AQ_nAT_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[503])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3728};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_out_ptr, __pyx_mstate->__pyx_n_u_out_schema_ptr, __pyx_mstate->__pyx_n_u_c_ptr, __pyx_mstate->__pyx_n_u_c_schema_ptr};
    __pyx_mstate_global->__pyx_codeobj_tab[504] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_export_to_c, __pyx_mstate->__pyx_kp_b_iso88591_31_q_aq_6_Q_9, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[504])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3755};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_in_ptr, __pyx_mstate->__pyx_n_u_schema, __pyx_mstate->__pyx_n_u_c_ptr, __pyx_mstate->__pyx_n_u_c_schema_ptr, __pyx_mstate->__pyx_n_u_c_batch, __pyx_mstate->__pyx_n_u_c_schema};
    __pyx_mstate_global->__pyx_codeobj_tab[505] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_import_from_c, __pyx_mstate->__pyx_kp_b_iso88591_A_q_9Cq_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[505])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 10, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3789};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_requested_schema, __pyx_mstate->__pyx_n_u_c_array, __pyx_mstate->__pyx_n_u_c_schema, __pyx_mstate->__pyx_n_u_target_schema, __pyx_mstate->__pyx_n_u_casted_batch, __pyx_mstate->__pyx_n_u_inner_batch, __pyx_mstate->__pyx_n_u_e, __pyx_mstate->__pyx_n_u_schema_capsule, __pyx_mstate->__pyx_n_u_array_capsule};
    __pyx_mstate_global->__pyx_codeobj_tab[506] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_arrow_c_array, __pyx_mstate->__pyx_kp_b_iso88591_1_L_G1_F_9_S_A_4uA_E_6aq_q_A_K1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[506])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3836};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_requested_schema};
    __pyx_mstate_global->__pyx_codeobj_tab[507] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_arrow_c_stream, __pyx_mstate->__pyx_kp_b_iso88591_2_L_uM_6_AQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[507])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3856};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_schema_capsule, __pyx_mstate->__pyx_n_u_array_capsule, __pyx_mstate->__pyx_n_u_c_schema, __pyx_mstate->__pyx_n_u_c_array, __pyx_mstate->__pyx_n_u_c_batch};
    __pyx_mstate_global->__pyx_codeobj_tab[508] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_import_from_c_capsule, __pyx_mstate->__pyx_kp_b_iso88591_A_6a7Gq_4A_A_nA_6ay, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[508])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3886};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_out_ptr, __pyx_mstate->__pyx_n_u_out_schema_ptr, __pyx_mstate->__pyx_n_u_c_ptr, __pyx_mstate->__pyx_n_u_c_schema_ptr};
    __pyx_mstate_global->__pyx_codeobj_tab[509] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_export_to_c_device, __pyx_mstate->__pyx_kp_b_iso88591_q_aq_0_d_a_G, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[509])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3914};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_in_ptr, __pyx_mstate->__pyx_n_u_schema, __pyx_mstate->__pyx_n_u_c_device_array, __pyx_mstate->__pyx_n_u_c_schema_ptr, __pyx_mstate->__pyx_n_u_c_batch, __pyx_mstate->__pyx_n_u_c_schema};
    __pyx_mstate_global->__pyx_codeobj_tab[510] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_import_from_c_device, __pyx_mstate->__pyx_kp_b_iso88591_A_0_B_qPQ_c_q_9Cq_A_O1_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[510])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 14, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS), 3951};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_requested_schema, __pyx_mstate->__pyx_n_u_kwargs, __pyx_mstate->__pyx_n_u_c_array, __pyx_mstate->__pyx_n_u_c_schema, __pyx_mstate->__pyx_n_u_inner_batch, __pyx_mstate->__pyx_n_u_non_default_kwargs, __pyx_mstate->__pyx_n_u_target_schema, __pyx_mstate->__pyx_n_u_casted_batch, __pyx_mstate->__pyx_n_u_e, __pyx_mstate->__pyx_n_u_schema_capsule, __pyx_mstate->__pyx_n_u_array_capsule, __pyx_mstate->__pyx_n_u_name, __pyx_mstate->__pyx_n_u_value};
    __pyx_mstate_global->__pyx_codeobj_tab[511] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_arrow_c_device_array, __pyx_mstate->__pyx_kp_b_iso88591_8_8_Q_V9F_3fG1_1_Q_AQ_G1_F_9_S, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[511])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4016};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_schema_capsule, __pyx_mstate->__pyx_n_u_array_capsule, __pyx_mstate->__pyx_n_u_c_schema, __pyx_mstate->__pyx_n_u_c_array, __pyx_mstate->__pyx_n_u_batch};
    __pyx_mstate_global->__pyx_codeobj_tab[512] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_import_from_c_device_capsule, __pyx_mstate->__pyx_kp_b_iso88591_A_6a7Gq_1_N_9A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[512])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4071};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_columns, __pyx_mstate->__pyx_n_u_schema};
    __pyx_mstate_global->__pyx_codeobj_tab[513] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_reconstruct_record_batch, __pyx_mstate->__pyx_kp_b_iso88591_l_9G1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[513])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 10, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4078};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_options, __pyx_mstate->__pyx_n_u_table, __pyx_mstate->__pyx_n_u_categories, __pyx_mstate->__pyx_n_u_extension_columns, __pyx_mstate->__pyx_n_u_result_obj, __pyx_mstate->__pyx_n_u_c_table, __pyx_mstate->__pyx_n_u_pool, __pyx_mstate->__pyx_n_u_c_options, __pyx_mstate->__pyx_n_u_cat, __pyx_mstate->__pyx_n_u_col};
    __pyx_mstate_global->__pyx_codeobj_tab[514] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_table_to_blocks, __pyx_mstate->__pyx_kp_b_iso88591_9_3LA_1AWAU_gQ_k1J_1AWAU_gQ_z_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[514])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4232};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[515] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_is_initialized, __pyx_mstate->__pyx_kp_b_iso88591_A_t7_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[515])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 1, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4235};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_full};
    __pyx_mstate_global->__pyx_codeobj_tab[516] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_validate, __pyx_mstate->__pyx_kp_b_iso88591_q_1_A_AT_A_AT_y, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[516])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4259};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_columns, __pyx_mstate->__pyx_n_u_col};
    __pyx_mstate_global->__pyx_codeobj_tab[517] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_reduce, __pyx_mstate->__pyx_kp_b_iso88591_A_L_4t7_a_IT, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[517])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4266};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_offset, __pyx_mstate->__pyx_n_u_length, __pyx_mstate->__pyx_n_u_result};
    __pyx_mstate_global->__pyx_codeobj_tab[518] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_slice, __pyx_mstate->__pyx_kp_b_iso88591_Ql_7_A_AQ_AS_7_Q_T_vQa_T_vQha, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[518])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4331};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_columns, __pyx_mstate->__pyx_n_u_c_table, __pyx_mstate->__pyx_n_u_c_indices, __pyx_mstate->__pyx_n_u_idx};
    __pyx_mstate_global->__pyx_codeobj_tab[519] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_select, __pyx_mstate->__pyx_kp_b_iso88591_AR_G1_AQ_5_A_Zq_a_nAT_Qd_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[519])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4382};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_metadata, __pyx_mstate->__pyx_n_u_c_meta, __pyx_mstate->__pyx_n_u_c_table};
    __pyx_mstate_global->__pyx_codeobj_tab[520] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_replace_schema_metadata, __pyx_mstate->__pyx_kp_b_iso88591_qp_8_d_6aq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[520])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4445};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_memory_pool, __pyx_mstate->__pyx_n_u_flattened, __pyx_mstate->__pyx_n_u_pool};
    __pyx_mstate_global->__pyx_codeobj_tab[521] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_flatten, __pyx_mstate->__pyx_kp_b_iso88591_Qp_L_7q_at6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[521])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4511};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_memory_pool, __pyx_mstate->__pyx_n_u_combined, __pyx_mstate->__pyx_n_u_pool};
    __pyx_mstate_global->__pyx_codeobj_tab[522] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_combine_chunks, __pyx_mstate->__pyx_kp_b_iso88591_4AR_L_7q_Qd_aq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[522])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4562};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_memory_pool, __pyx_mstate->__pyx_n_u_pool, __pyx_mstate->__pyx_n_u_c_result};
    __pyx_mstate_global->__pyx_codeobj_tab[523] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_unify_dictionaries, __pyx_mstate->__pyx_kp_b_iso88591_8_L_7q_8_1_d_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[523])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4621};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_other, __pyx_mstate->__pyx_n_u_check_metadata, __pyx_mstate->__pyx_n_u_this_table, __pyx_mstate->__pyx_n_u_other_table, __pyx_mstate->__pyx_n_u_result};
    __pyx_mstate_global->__pyx_codeobj_tab[524] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_equals, __pyx_mstate->__pyx_kp_b_iso88591_6aF_L_6_A_1_Q_q_Zwav_1_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[524])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 8, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4670};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_target_schema, __pyx_mstate->__pyx_n_u_safe, __pyx_mstate->__pyx_n_u_options, __pyx_mstate->__pyx_n_u_column, __pyx_mstate->__pyx_n_u_casted, __pyx_mstate->__pyx_n_u_field, __pyx_mstate->__pyx_n_u_newcols};
    __pyx_mstate_global->__pyx_codeobj_tab[525] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_cast, __pyx_mstate->__pyx_kp_b_iso88591_nAX_L_1_4wgS_Q_AQ_8_WKqP_HIS_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[525])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {7, 0, 0, 11, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4733};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_df, __pyx_mstate->__pyx_n_u_schema, __pyx_mstate->__pyx_n_u_preserve_index, __pyx_mstate->__pyx_n_u_nthreads, __pyx_mstate->__pyx_n_u_columns, __pyx_mstate->__pyx_n_u_safe, __pyx_mstate->__pyx_n_u_dataframe_to_arrays, __pyx_mstate->__pyx_n_u_arrays, __pyx_mstate->__pyx_n_u_n_rows, __pyx_mstate->__pyx_n_u_c_arrays};
    __pyx_mstate_global->__pyx_codeobj_tab[526] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_from_pandas, __pyx_mstate->__pyx_kp_b_iso88591_A_1x_4A_1_1_Q_A_1_Q_2Yg_1_3l_87, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[526])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 11, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4813};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_arrays, __pyx_mstate->__pyx_n_u_names, __pyx_mstate->__pyx_n_u_schema, __pyx_mstate->__pyx_n_u_metadata, __pyx_mstate->__pyx_n_u_columns, __pyx_mstate->__pyx_n_u_c_schema, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_K, __pyx_mstate->__pyx_n_u_converted_arrays, __pyx_mstate->__pyx_n_u_item, __pyx_mstate->__pyx_n_u_result};
    __pyx_mstate_global->__pyx_codeobj_tab[527] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_from_arrays, __pyx_mstate->__pyx_kp_b_iso88591_A_a_vS_1HG81_Q_xq_HA_z_z_a_a_1F, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[527])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4916};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_struct_array, __pyx_mstate->__pyx_n_u_chunk};
    __pyx_mstate_global->__pyx_codeobj_tab[528] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_from_struct_array, __pyx_mstate->__pyx_kp_b_iso88591_A6_QnA_5_Qa_2DAQ_5_Qa_Qa_I, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[528])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4951};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_max_chunksize, __pyx_mstate->__pyx_n_u_chunks, __pyx_mstate->__pyx_n_u_batch};
    __pyx_mstate_global->__pyx_codeobj_tab[529] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_to_struct_array, __pyx_mstate->__pyx_kp_b_iso88591_A_L_q_AXU_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[529])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4972};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_batches, __pyx_mstate->__pyx_n_u_schema, __pyx_mstate->__pyx_n_u_c_batches, __pyx_mstate->__pyx_n_u_c_table, __pyx_mstate->__pyx_n_u_c_schema, __pyx_mstate->__pyx_n_u_batch};
    __pyx_mstate_global->__pyx_codeobj_tab[530] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_from_batches, __pyx_mstate->__pyx_kp_b_iso88591_A_n_IQ_Zq_Q_7_Q_y_S_1_j_y_4r_vQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[530])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5045};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_max_chunksize, __pyx_mstate->__pyx_n_u_reader, __pyx_mstate->__pyx_n_u_c_max_chunksize, __pyx_mstate->__pyx_n_u_result, __pyx_mstate->__pyx_n_u_batch};
    __pyx_mstate_global->__pyx_codeobj_tab[531] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_to_batches, __pyx_mstate->__pyx_kp_b_iso88591_q_fA_A_t_1_j_a_b_aq_AV4r_1A_uD, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[531])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5115};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_max_chunksize, __pyx_mstate->__pyx_n_u_c_reader, __pyx_mstate->__pyx_n_u_reader, __pyx_mstate->__pyx_n_u_t_reader};
    __pyx_mstate_global->__pyx_codeobj_tab[532] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_to_reader, __pyx_mstate->__pyx_kp_b_iso88591_a_0_Q_D_MQ_1_j_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[532])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5174};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_options, __pyx_mstate->__pyx_n_u_categories, __pyx_mstate->__pyx_n_u_ignore_metadata, __pyx_mstate->__pyx_n_u_types_mapper, __pyx_mstate->__pyx_n_u_table_to_dataframe, __pyx_mstate->__pyx_n_u_df};
    __pyx_mstate_global->__pyx_codeobj_tab[533] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_to_pandas, __pyx_mstate->__pyx_kp_b_iso88591_C1_L_q_V1_A_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[533])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5208};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_index, __pyx_mstate->__pyx_n_u_result};
    __pyx_mstate_global->__pyx_codeobj_tab[534] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_column_2, __pyx_mstate->__pyx_kp_b_iso88591_A_q_4q_Q_gQa_it7_6_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[534])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5307};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_total_buffer_size};
    __pyx_mstate_global->__pyx_codeobj_tab[535] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_get_total_buffer_size, __pyx_mstate->__pyx_kp_b_iso88591_A_L_O1F_a_q_3, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[535])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5335};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[536] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_sizeof, __pyx_mstate->__pyx_kp_b_iso88591_A_uAWE_Cr_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[536])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5338};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_field_3, __pyx_mstate->__pyx_n_u_column, __pyx_mstate->__pyx_n_u_c_table, __pyx_mstate->__pyx_n_u_c_field, __pyx_mstate->__pyx_n_u_c_arr};
    __pyx_mstate_global->__pyx_codeobj_tab[537] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_add_column, __pyx_mstate->__pyx_kp_b_iso88591_At_Qha_A_M_Qha_a_e1HE_nAT_z_7_U, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[537])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5412};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_c_table};
    __pyx_mstate_global->__pyx_codeobj_tab[538] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_remove_column, __pyx_mstate->__pyx_kp_b_iso88591_A_nAT_AQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[538])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5446};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_field_3, __pyx_mstate->__pyx_n_u_column, __pyx_mstate->__pyx_n_u_c_table, __pyx_mstate->__pyx_n_u_c_field, __pyx_mstate->__pyx_n_u_c_arr};
    __pyx_mstate_global->__pyx_codeobj_tab[539] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_set_column, __pyx_mstate->__pyx_kp_b_iso88591_AV_Qha_A_M_Qha_a_e1HE_nAT_z_7_U, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[539])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 10, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5505};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_names, __pyx_mstate->__pyx_n_u_c_table, __pyx_mstate->__pyx_n_u_c_names, __pyx_mstate->__pyx_n_u_name, __pyx_mstate->__pyx_n_u_idx_to_new_name, __pyx_mstate->__pyx_n_u_new_name, __pyx_mstate->__pyx_n_u_indices, __pyx_mstate->__pyx_n_u_index, __pyx_mstate->__pyx_n_u_i};
    __pyx_mstate_global->__pyx_codeobj_tab[540] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_rename_columns, __pyx_mstate->__pyx_kp_b_iso88591_Ad_QhfA_z_q_q_a_l_vQ_g_1A_4q_9AQ_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[540])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5579};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_columns};
    __pyx_mstate_global->__pyx_codeobj_tab[541] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_drop, __pyx_mstate->__pyx_kp_b_iso88591_A_t_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[541])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5597};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_keys, __pyx_mstate->__pyx_n_u_use_threads};
    __pyx_mstate_global->__pyx_codeobj_tab[542] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_group_by_2, __pyx_mstate->__pyx_kp_b_iso88591_P_L_1F_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[542])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {10, 0, 0, 10, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5640};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_right_table, __pyx_mstate->__pyx_n_u_keys, __pyx_mstate->__pyx_n_u_right_keys, __pyx_mstate->__pyx_n_u_join_type, __pyx_mstate->__pyx_n_u_left_suffix, __pyx_mstate->__pyx_n_u_right_suffix, __pyx_mstate->__pyx_n_u_coalesce_keys, __pyx_mstate->__pyx_n_u_use_threads, __pyx_mstate->__pyx_n_u_filter_expression};
    __pyx_mstate_global->__pyx_codeobj_tab[543] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_join, __pyx_mstate->__pyx_kp_b_iso88591_11A_1_t_L_c_t2_1_vV_1_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[543])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {7, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5775};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_right_table, __pyx_mstate->__pyx_n_u_on, __pyx_mstate->__pyx_n_u_by, __pyx_mstate->__pyx_n_u_tolerance, __pyx_mstate->__pyx_n_u_right_on, __pyx_mstate->__pyx_n_u_right_by};
    __pyx_mstate_global->__pyx_codeobj_tab[544] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_join_asof, __pyx_mstate->__pyx_kp_b_iso88591_A_PQd_L_9Cq_q_9Cq_q_t2_t1_6j_4L, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[544])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5866};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_requested_schema};
    __pyx_mstate_global->__pyx_codeobj_tab[545] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_arrow_c_stream, __pyx_mstate->__pyx_kp_b_iso88591_2_L_t_R_2_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[545])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5901};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_arrays, __pyx_mstate->__pyx_n_u_schema};
    __pyx_mstate_global->__pyx_codeobj_tab[546] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_reconstruct_table, __pyx_mstate->__pyx_kp_b_iso88591_5_AXWA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[546])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 8, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5908};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_data, __pyx_mstate->__pyx_n_u_names, __pyx_mstate->__pyx_n_u_schema, __pyx_mstate->__pyx_n_u_metadata, __pyx_mstate->__pyx_n_u_requested_schema, __pyx_mstate->__pyx_n_u_schema_capsule, __pyx_mstate->__pyx_n_u_array_capsule, __pyx_mstate->__pyx_n_u_batch};
    __pyx_mstate_global->__pyx_codeobj_tab[547] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_record_batch, __pyx_mstate->__pyx_kp_b_iso88591_J_z_WCq_z_q_avV7_0_1F_6_A_avWHI, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[547])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 10, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 6085};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_data, __pyx_mstate->__pyx_n_u_names, __pyx_mstate->__pyx_n_u_schema, __pyx_mstate->__pyx_n_u_metadata, __pyx_mstate->__pyx_n_u_nthreads, __pyx_mstate->__pyx_n_u_requested, __pyx_mstate->__pyx_n_u_capsule, __pyx_mstate->__pyx_n_u_reader, __pyx_mstate->__pyx_n_u_table, __pyx_mstate->__pyx_n_u_batch};
    __pyx_mstate_global->__pyx_codeobj_tab[548] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_table, __pyx_mstate->__pyx_kp_b_iso88591_M_f_z_WCq_z_q_uL_vWG1_1F_6_A_uL, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[548])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 9, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS), 6247};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_tables, __pyx_mstate->__pyx_n_u_memory_pool, __pyx_mstate->__pyx_n_u_promote_options, __pyx_mstate->__pyx_n_u_kwargs, __pyx_mstate->__pyx_n_u_c_tables, __pyx_mstate->__pyx_n_u_c_result_table, __pyx_mstate->__pyx_n_u_pool, __pyx_mstate->__pyx_n_u_table, __pyx_mstate->__pyx_n_u_options};
    __pyx_mstate_global->__pyx_codeobj_tab[549] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_concat_tables, __pyx_mstate->__pyx_kp_b_iso88591_7qj_31A_a_z_A_Q_a_6_S_a_5_A_S_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[549])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 6327};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_recordbatches, __pyx_mstate->__pyx_n_u_memory_pool, __pyx_mstate->__pyx_n_u_c_recordbatches, __pyx_mstate->__pyx_n_u_c_result_recordbatch, __pyx_mstate->__pyx_n_u_recordbatch, __pyx_mstate->__pyx_n_u_pool};
    __pyx_mstate_global->__pyx_codeobj_tab[550] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_concat_batches, __pyx_mstate->__pyx_kp_b_iso88591_N_31A_q_z_Q_Q_A_6a_Qa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[550])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 12, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 6378};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_mapping, __pyx_mstate->__pyx_n_u_schema, __pyx_mstate->__pyx_n_u_metadata, __pyx_mstate->__pyx_n_u_arrays, __pyx_mstate->__pyx_n_u_names, __pyx_mstate->__pyx_n_u_k, __pyx_mstate->__pyx_n_u_v, __pyx_mstate->__pyx_n_u_field, __pyx_mstate->__pyx_n_u_present, __pyx_mstate->__pyx_n_u_missing, __pyx_mstate->__pyx_n_u_n};
    __pyx_mstate_global->__pyx_codeobj_tab[551] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_from_pydict, __pyx_mstate->__pyx_kp_b_iso88591_Q_wc_CuG6_s_axwiq_1HA_IQ_G1E_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[551])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 10, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 6426};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_mapping, __pyx_mstate->__pyx_n_u_schema, __pyx_mstate->__pyx_n_u_metadata, __pyx_mstate->__pyx_n_u_arrays, __pyx_mstate->__pyx_n_u_names, __pyx_mstate->__pyx_n_u_n, __pyx_mstate->__pyx_n_u_v, __pyx_mstate->__pyx_n_u_row, __pyx_mstate->__pyx_n_u_row};
    __pyx_mstate_global->__pyx_codeobj_tab[552] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_from_pylist, __pyx_mstate->__pyx_kp_b_iso88591_Q_wc_1_D_5_E_AV2S_d_s_axwiq_Qha, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[552])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 6504};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_table, __pyx_mstate->__pyx_n_u_keys, __pyx_mstate->__pyx_n_u_use_threads};
    __pyx_mstate_global->__pyx_codeobj_tab[553] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_init, __pyx_mstate->__pyx_kp_b_iso88591_A_QfA_1A_Ja_HA_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[553])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 9, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 6512};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_aggregations, __pyx_mstate->__pyx_n_u_group_by_aggrs, __pyx_mstate->__pyx_n_u_aggr, __pyx_mstate->__pyx_n_u_target, __pyx_mstate->__pyx_n_u_func_2, __pyx_mstate->__pyx_n_u_opt, __pyx_mstate->__pyx_n_u_func_nohash, __pyx_mstate->__pyx_n_u_aggr_name};
    __pyx_mstate_global->__pyx_codeobj_tab[554] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_table_pxi, __pyx_mstate->__pyx_n_u_aggregate, __pyx_mstate->__pyx_kp_b_iso88591_Ar_HA_s_6_A_q_a_fA_t_QivQ_s_4wb, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[554])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 49};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_values};
    __pyx_mstate_global->__pyx_codeobj_tab[555] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_tensor_pxi, __pyx_mstate->__pyx_n_u_make_shape_or_strides_buffer, __pyx_mstate->__pyx_kp_b_iso88591_A_we1Bas, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[555])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 61};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_obj, __pyx_mstate->__pyx_n_u_dim_names, __pyx_mstate->__pyx_n_u_c_dim_names, __pyx_mstate->__pyx_n_u_ctensor, __pyx_mstate->__pyx_n_u_x};
    __pyx_mstate_global->__pyx_codeobj_tab[556] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_tensor_pxi, __pyx_mstate->__pyx_n_u_from_numpy, __pyx_mstate->__pyx_kp_b_iso88591_A_4_WA_Q_QgQa_A_A_a_2_1_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[556])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 96};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_out};
    __pyx_mstate_global->__pyx_codeobj_tab[557] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_tensor_pxi, __pyx_mstate->__pyx_n_u_to_numpy, __pyx_mstate->__pyx_kp_b_iso88591_A_3c_Q_A_AT_V1A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[557])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 118};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_other};
    __pyx_mstate_global->__pyx_codeobj_tab[558] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_tensor_pxi, __pyx_mstate->__pyx_n_u_equals, __pyx_mstate->__pyx_kp_b_iso88591_A_t3gQfE, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[558])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 148};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_i};
    __pyx_mstate_global->__pyx_codeobj_tab[559] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_tensor_pxi, __pyx_mstate->__pyx_n_u_dim_name, __pyx_mstate->__pyx_kp_b_iso88591_A_y_S, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[559])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 303};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_stream, __pyx_mstate->__pyx_n_u_dlm_tensor};
    __pyx_mstate_global->__pyx_codeobj_tab[560] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_tensor_pxi, __pyx_mstate->__pyx_n_u_dlpack, __pyx_mstate->__pyx_kp_b_iso88591_7_Q_q_AT_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[560])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 328};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_device};
    __pyx_mstate_global->__pyx_codeobj_tab[561] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_tensor_pxi, __pyx_mstate->__pyx_n_u_dlpack_device, __pyx_mstate->__pyx_kp_b_iso88591_A_q_AT_v_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[561])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[562] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[562])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state};
    __pyx_mstate_global->__pyx_codeobj_tab[563] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[563])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 366};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_obj, __pyx_mstate->__pyx_n_u_dim_names};
    __pyx_mstate_global->__pyx_codeobj_tab[564] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_tensor_pxi, __pyx_mstate->__pyx_n_u_from_dense_numpy, __pyx_mstate->__pyx_kp_b_iso88591_A_s_av_j, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[564])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 8, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 384};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_data, __pyx_mstate->__pyx_n_u_coords, __pyx_mstate->__pyx_n_u_shape, __pyx_mstate->__pyx_n_u_dim_names, __pyx_mstate->__pyx_n_u_csparse_tensor, __pyx_mstate->__pyx_n_u_c_shape, __pyx_mstate->__pyx_n_u_c_dim_names, __pyx_mstate->__pyx_n_u_x};
    __pyx_mstate_global->__pyx_codeobj_tab[565] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_tensor_pxi, __pyx_mstate->__pyx_n_u_from_numpy, __pyx_mstate->__pyx_kp_b_iso88591_A23_E_Qa_WA_Q_QgQa_81HF_Q_6_s_AQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[565])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 11, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 421};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_obj, __pyx_mstate->__pyx_n_u_dim_names, __pyx_mstate->__pyx_n_u_scipy, __pyx_mstate->__pyx_n_u_csparse_tensor, __pyx_mstate->__pyx_n_u_c_shape, __pyx_mstate->__pyx_n_u_c_dim_names, __pyx_mstate->__pyx_n_u_x, __pyx_mstate->__pyx_n_u_row, __pyx_mstate->__pyx_n_u_col, __pyx_mstate->__pyx_n_u_order, __pyx_mstate->__pyx_n_u_coords};
    __pyx_mstate_global->__pyx_codeobj_tab[566] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_tensor_pxi, __pyx_mstate->__pyx_n_u_from_scipy, __pyx_mstate->__pyx_kp_b_iso88591_A_4z_WL_WA_1_RRSSWWXXY_E_A_Qa_WA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[566])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 8, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 468};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_obj, __pyx_mstate->__pyx_n_u_dim_names, __pyx_mstate->__pyx_n_u_sparse, __pyx_mstate->__pyx_n_u_csparse_tensor, __pyx_mstate->__pyx_n_u_c_shape, __pyx_mstate->__pyx_n_u_c_dim_names, __pyx_mstate->__pyx_n_u_x, __pyx_mstate->__pyx_n_u_coords};
    __pyx_mstate_global->__pyx_codeobj_tab[567] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_tensor_pxi, __pyx_mstate->__pyx_n_u_from_pydata_sparse, __pyx_mstate->__pyx_kp_b_iso88591_A_4z_vQ_1_1D_E_A_Qa_WA_Q_QgQa_81, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[567])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 502};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_obj, __pyx_mstate->__pyx_n_u_csparse_tensor, __pyx_mstate->__pyx_n_u_ctensor};
    __pyx_mstate_global->__pyx_codeobj_tab[568] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_tensor_pxi, __pyx_mstate->__pyx_n_u_from_tensor, __pyx_mstate->__pyx_kp_b_iso88591_A_0_1_Qa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[568])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 520};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_out_data, __pyx_mstate->__pyx_n_u_out_coords};
    __pyx_mstate_global->__pyx_codeobj_tab[569] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_tensor_pxi, __pyx_mstate->__pyx_n_u_to_numpy, __pyx_mstate->__pyx_kp_b_iso88591_A_3c_Q_A_Qd2EQ_z_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[569])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 9, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 534};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_coo_array, __pyx_mstate->__pyx_n_u_out_data, __pyx_mstate->__pyx_n_u_out_coords, __pyx_mstate->__pyx_n_u_data, __pyx_mstate->__pyx_n_u_coords, __pyx_mstate->__pyx_n_u_row, __pyx_mstate->__pyx_n_u_col, __pyx_mstate->__pyx_n_u_result};
    __pyx_mstate_global->__pyx_codeobj_tab[570] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_tensor_pxi, __pyx_mstate->__pyx_n_u_to_scipy, __pyx_mstate->__pyx_kp_b_iso88591_A_A_Qd2EQ_z_1A_V6_T_t1_D_E_gV4q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[570])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 557};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_COO, __pyx_mstate->__pyx_n_u_out_data, __pyx_mstate->__pyx_n_u_out_coords, __pyx_mstate->__pyx_n_u_data, __pyx_mstate->__pyx_n_u_coords, __pyx_mstate->__pyx_n_u_result};
    __pyx_mstate_global->__pyx_codeobj_tab[571] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_tensor_pxi, __pyx_mstate->__pyx_n_u_to_pydata_sparse, __pyx_mstate->__pyx_kp_b_iso88591_A_1_A_Qd2EQ_z_1A_AU_d_gV4vT_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[571])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 572};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_ctensor};
    __pyx_mstate_global->__pyx_codeobj_tab[572] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_tensor_pxi, __pyx_mstate->__pyx_n_u_to_tensor, __pyx_mstate->__pyx_kp_b_iso88591_A_nAT_Ya_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[572])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 583};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_other};
    __pyx_mstate_global->__pyx_codeobj_tab[573] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_tensor_pxi, __pyx_mstate->__pyx_n_u_equals, __pyx_mstate->__pyx_kp_b_iso88591_A_t4wavU, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[573])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 617};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_i};
    __pyx_mstate_global->__pyx_codeobj_tab[574] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_tensor_pxi, __pyx_mstate->__pyx_n_u_dim_name, __pyx_mstate->__pyx_kp_b_iso88591_A_y_T_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[574])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[575] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[575])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state};
    __pyx_mstate_global->__pyx_codeobj_tab[576] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[576])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 671};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_obj, __pyx_mstate->__pyx_n_u_dim_names};
    __pyx_mstate_global->__pyx_codeobj_tab[577] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_tensor_pxi, __pyx_mstate->__pyx_n_u_from_dense_numpy, __pyx_mstate->__pyx_kp_b_iso88591_A_s_av_j, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[577])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 9, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 689};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_data, __pyx_mstate->__pyx_n_u_indptr, __pyx_mstate->__pyx_n_u_indices, __pyx_mstate->__pyx_n_u_shape, __pyx_mstate->__pyx_n_u_dim_names, __pyx_mstate->__pyx_n_u_csparse_tensor, __pyx_mstate->__pyx_n_u_c_shape, __pyx_mstate->__pyx_n_u_c_dim_names, __pyx_mstate->__pyx_n_u_x};
    __pyx_mstate_global->__pyx_codeobj_tab[578] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_tensor_pxi, __pyx_mstate->__pyx_n_u_from_numpy, __pyx_mstate->__pyx_kp_b_iso88591_A_E_Qa_WA_Q_QgQa_81HF_HAYfA_6_s, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[578])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 9, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 733};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_obj, __pyx_mstate->__pyx_n_u_dim_names, __pyx_mstate->__pyx_n_u_scipy, __pyx_mstate->__pyx_n_u_csparse_tensor, __pyx_mstate->__pyx_n_u_c_shape, __pyx_mstate->__pyx_n_u_c_dim_names, __pyx_mstate->__pyx_n_u_x, __pyx_mstate->__pyx_n_u_indptr, __pyx_mstate->__pyx_n_u_indices};
    __pyx_mstate_global->__pyx_codeobj_tab[579] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_tensor_pxi, __pyx_mstate->__pyx_n_u_from_scipy, __pyx_mstate->__pyx_kp_b_iso88591_A_4z_WL_WA_1_RRSSWWXXY_E_A_Qa_WA_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[579])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 770};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_obj, __pyx_mstate->__pyx_n_u_csparse_tensor, __pyx_mstate->__pyx_n_u_ctensor};
    __pyx_mstate_global->__pyx_codeobj_tab[580] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_tensor_pxi, __pyx_mstate->__pyx_n_u_from_tensor, __pyx_mstate->__pyx_kp_b_iso88591_A_0_1_Qa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[580])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 788};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_out_data, __pyx_mstate->__pyx_n_u_out_indptr, __pyx_mstate->__pyx_n_u_out_indices};
    __pyx_mstate_global->__pyx_codeobj_tab[581] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_tensor_pxi, __pyx_mstate->__pyx_n_u_to_numpy, __pyx_mstate->__pyx_kp_b_iso88591_A_3c_Q_A_Qd2EQ_z_q_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[581])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 9, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 805};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_csr_array, __pyx_mstate->__pyx_n_u_out_data, __pyx_mstate->__pyx_n_u_out_indptr, __pyx_mstate->__pyx_n_u_out_indices, __pyx_mstate->__pyx_n_u_data, __pyx_mstate->__pyx_n_u_indptr, __pyx_mstate->__pyx_n_u_indices, __pyx_mstate->__pyx_n_u_result};
    __pyx_mstate_global->__pyx_codeobj_tab[582] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_tensor_pxi, __pyx_mstate->__pyx_n_u_to_scipy, __pyx_mstate->__pyx_kp_b_iso88591_A_A_Qd2EQ_z_q_1A_AQ_D_D_A_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[582])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 824};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_ctensor};
    __pyx_mstate_global->__pyx_codeobj_tab[583] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_tensor_pxi, __pyx_mstate->__pyx_n_u_to_tensor, __pyx_mstate->__pyx_kp_b_iso88591_A_nAT_Ya_1_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[583])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 834};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_other};
    __pyx_mstate_global->__pyx_codeobj_tab[584] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_tensor_pxi, __pyx_mstate->__pyx_n_u_equals, __pyx_mstate->__pyx_kp_b_iso88591_A_t4wavU, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[584])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 868};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_i};
    __pyx_mstate_global->__pyx_codeobj_tab[585] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_tensor_pxi, __pyx_mstate->__pyx_n_u_dim_name, __pyx_mstate->__pyx_kp_b_iso88591_A_y_T_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[585])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[586] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[586])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state};
    __pyx_mstate_global->__pyx_codeobj_tab[587] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[587])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 912};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_obj, __pyx_mstate->__pyx_n_u_dim_names};
    __pyx_mstate_global->__pyx_codeobj_tab[588] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_tensor_pxi, __pyx_mstate->__pyx_n_u_from_dense_numpy, __pyx_mstate->__pyx_kp_b_iso88591_A_s_av_j, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[588])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 9, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 930};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_data, __pyx_mstate->__pyx_n_u_indptr, __pyx_mstate->__pyx_n_u_indices, __pyx_mstate->__pyx_n_u_shape, __pyx_mstate->__pyx_n_u_dim_names, __pyx_mstate->__pyx_n_u_csparse_tensor, __pyx_mstate->__pyx_n_u_c_shape, __pyx_mstate->__pyx_n_u_c_dim_names, __pyx_mstate->__pyx_n_u_x};
    __pyx_mstate_global->__pyx_codeobj_tab[589] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_tensor_pxi, __pyx_mstate->__pyx_n_u_from_numpy, __pyx_mstate->__pyx_kp_b_iso88591_A_E_Qa_WA_Q_QgQa_81HF_HAYfA_6_s, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[589])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 9, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 974};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_obj, __pyx_mstate->__pyx_n_u_dim_names, __pyx_mstate->__pyx_n_u_scipy, __pyx_mstate->__pyx_n_u_csparse_tensor, __pyx_mstate->__pyx_n_u_c_shape, __pyx_mstate->__pyx_n_u_c_dim_names, __pyx_mstate->__pyx_n_u_x, __pyx_mstate->__pyx_n_u_indptr, __pyx_mstate->__pyx_n_u_indices};
    __pyx_mstate_global->__pyx_codeobj_tab[590] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_tensor_pxi, __pyx_mstate->__pyx_n_u_from_scipy, __pyx_mstate->__pyx_kp_b_iso88591_A_4z_WL_WA_1_RRSSWWXXY_E_A_Qa_WA_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[590])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1011};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_obj, __pyx_mstate->__pyx_n_u_csparse_tensor, __pyx_mstate->__pyx_n_u_ctensor};
    __pyx_mstate_global->__pyx_codeobj_tab[591] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_tensor_pxi, __pyx_mstate->__pyx_n_u_from_tensor, __pyx_mstate->__pyx_kp_b_iso88591_A_0_1_Qa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[591])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1029};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_out_data, __pyx_mstate->__pyx_n_u_out_indptr, __pyx_mstate->__pyx_n_u_out_indices};
    __pyx_mstate_global->__pyx_codeobj_tab[592] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_tensor_pxi, __pyx_mstate->__pyx_n_u_to_numpy, __pyx_mstate->__pyx_kp_b_iso88591_A_3c_Q_A_Qd2EQ_z_q_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[592])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 9, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1046};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_csc_array, __pyx_mstate->__pyx_n_u_out_data, __pyx_mstate->__pyx_n_u_out_indptr, __pyx_mstate->__pyx_n_u_out_indices, __pyx_mstate->__pyx_n_u_data, __pyx_mstate->__pyx_n_u_indptr, __pyx_mstate->__pyx_n_u_indices, __pyx_mstate->__pyx_n_u_result};
    __pyx_mstate_global->__pyx_codeobj_tab[593] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_tensor_pxi, __pyx_mstate->__pyx_n_u_to_scipy, __pyx_mstate->__pyx_kp_b_iso88591_A_A_Qd2EQ_z_q_1A_AQ_D_D_A_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[593])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1065};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_ctensor};
    __pyx_mstate_global->__pyx_codeobj_tab[594] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_tensor_pxi, __pyx_mstate->__pyx_n_u_to_tensor, __pyx_mstate->__pyx_kp_b_iso88591_A_nAT_Ya_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[594])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1076};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_other};
    __pyx_mstate_global->__pyx_codeobj_tab[595] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_tensor_pxi, __pyx_mstate->__pyx_n_u_equals, __pyx_mstate->__pyx_kp_b_iso88591_A_t4wavU, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[595])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1110};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_i};
    __pyx_mstate_global->__pyx_codeobj_tab[596] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_tensor_pxi, __pyx_mstate->__pyx_n_u_dim_name, __pyx_mstate->__pyx_kp_b_iso88591_A_y_T_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[596])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[597] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[597])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state};
    __pyx_mstate_global->__pyx_codeobj_tab[598] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[598])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1162};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_obj, __pyx_mstate->__pyx_n_u_dim_names};
    __pyx_mstate_global->__pyx_codeobj_tab[599] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_tensor_pxi, __pyx_mstate->__pyx_n_u_from_dense_numpy, __pyx_mstate->__pyx_kp_b_iso88591_A_s_av_j, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[599])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {6, 0, 0, 15, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1180};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_data, __pyx_mstate->__pyx_n_u_indptr, __pyx_mstate->__pyx_n_u_indices, __pyx_mstate->__pyx_n_u_shape, __pyx_mstate->__pyx_n_u_axis_order, __pyx_mstate->__pyx_n_u_dim_names, __pyx_mstate->__pyx_n_u_csparse_tensor, __pyx_mstate->__pyx_n_u_c_axis_order, __pyx_mstate->__pyx_n_u_c_shape, __pyx_mstate->__pyx_n_u_c_dim_names, __pyx_mstate->__pyx_n_u_x, __pyx_mstate->__pyx_n_u_x, __pyx_mstate->__pyx_n_u_x, __pyx_mstate->__pyx_n_u_arr, __pyx_mstate->__pyx_n_u_arr};
    __pyx_mstate_global->__pyx_codeobj_tab[600] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_tensor_pxi, __pyx_mstate->__pyx_n_u_from_numpy, __pyx_mstate->__pyx_kp_b_iso88591_A_E_Qa_4q_81A_E_1_WA_Q_QgQa_5_9F, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[600])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1249};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_obj, __pyx_mstate->__pyx_n_u_csparse_tensor, __pyx_mstate->__pyx_n_u_ctensor};
    __pyx_mstate_global->__pyx_codeobj_tab[601] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_tensor_pxi, __pyx_mstate->__pyx_n_u_from_tensor, __pyx_mstate->__pyx_kp_b_iso88591_A_0_1_Qa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[601])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1267};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_out_data, __pyx_mstate->__pyx_n_u_out_indptr, __pyx_mstate->__pyx_n_u_out_indices};
    __pyx_mstate_global->__pyx_codeobj_tab[602] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_tensor_pxi, __pyx_mstate->__pyx_n_u_to_numpy, __pyx_mstate->__pyx_kp_b_iso88591_A_3c_Q_A_Qd2EQ_z_q_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[602])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1284};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_ctensor};
    __pyx_mstate_global->__pyx_codeobj_tab[603] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_tensor_pxi, __pyx_mstate->__pyx_n_u_to_tensor, __pyx_mstate->__pyx_kp_b_iso88591_A_nAT_Ya_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[603])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1295};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_other};
    __pyx_mstate_global->__pyx_codeobj_tab[604] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_tensor_pxi, __pyx_mstate->__pyx_n_u_equals, __pyx_mstate->__pyx_kp_b_iso88591_A_t4wavU, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[604])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1329};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_i};
    __pyx_mstate_global->__pyx_codeobj_tab[605] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_tensor_pxi, __pyx_mstate->__pyx_n_u_dim_name, __pyx_mstate->__pyx_kp_b_iso88591_A_y_T_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[605])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[606] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[606])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state};
    __pyx_mstate_global->__pyx_codeobj_tab[607] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[607])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 49};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[608] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_io_pxi, __pyx_mstate->__pyx_n_u_have_libhdfs, __pyx_mstate->__pyx_kp_b_iso88591_A_q_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[608])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 61};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[609] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_io_pxi, __pyx_mstate->__pyx_n_u_io_thread_count, __pyx_mstate->__pyx_kp_b_iso88591__40, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[609])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 78};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_count};
    __pyx_mstate_global->__pyx_codeobj_tab[610] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_io_pxi, __pyx_mstate->__pyx_n_u_set_io_thread_count, __pyx_mstate->__pyx_kp_b_iso88591_vRq_j_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[610])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 132};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[611] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_io_pxi, __pyx_mstate->__pyx_n_u_enter, __pyx_mstate->__pyx_kp_b_iso88591_A_q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[611])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 135};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_exc_type, __pyx_mstate->__pyx_n_u_exc_value, __pyx_mstate->__pyx_n_u_tb};
    __pyx_mstate_global->__pyx_codeobj_tab[612] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_io_pxi, __pyx_mstate->__pyx_n_u_exit, __pyx_mstate->__pyx_kp_b_iso88591_A_F_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[612])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 169};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[613] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_io_pxi, __pyx_mstate->__pyx_n_u_readable, __pyx_mstate->__pyx_kp_b_iso88591_A_M_t1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[613])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 173};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[614] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_io_pxi, __pyx_mstate->__pyx_n_u_writable, __pyx_mstate->__pyx_kp_b_iso88591_A_M_t1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[614])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 177};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[615] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_io_pxi, __pyx_mstate->__pyx_n_u_seekable, __pyx_mstate->__pyx_kp_b_iso88591_A_M_t1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[615])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 181};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[616] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_io_pxi, __pyx_mstate->__pyx_n_u_isatty, __pyx_mstate->__pyx_kp_b_iso88591_A_M_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[616])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 185};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[617] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_io_pxi, __pyx_mstate->__pyx_n_u_fileno, __pyx_mstate->__pyx_kp_b_iso88591_A_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[617])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 200};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[618] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_io_pxi, __pyx_mstate->__pyx_n_u_close, __pyx_mstate->__pyx_kp_b_iso88591_A_4t1_4q_b_a_4r_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[618])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 234};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[619] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_io_pxi, __pyx_mstate->__pyx_n_u_assert_open, __pyx_mstate->__pyx_kp_b_iso88591_A_4q_AQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[619])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 238};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[620] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_io_pxi, __pyx_mstate->__pyx_n_u_assert_readable, __pyx_mstate->__pyx_kp_b_iso88591_A_M_4t1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[620])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 244};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[621] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_io_pxi, __pyx_mstate->__pyx_n_u_assert_writable, __pyx_mstate->__pyx_kp_b_iso88591_A_M_4t1_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[621])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 249};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[622] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_io_pxi, __pyx_mstate->__pyx_n_u_assert_seekable, __pyx_mstate->__pyx_kp_b_iso88591_A_M_4t1_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[622])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 254};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_size, __pyx_mstate->__pyx_n_u_handle};
    __pyx_mstate_global->__pyx_codeobj_tab[623] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_io_pxi, __pyx_mstate->__pyx_n_u_size, __pyx_mstate->__pyx_kp_b_iso88591_A_A_Bha_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[623])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 266};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_c_metadata, __pyx_mstate->__pyx_n_u_handle, __pyx_mstate->__pyx_n_u_metadata, __pyx_mstate->__pyx_n_u_i};
    __pyx_mstate_global->__pyx_codeobj_tab[624] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_io_pxi, __pyx_mstate->__pyx_n_u_metadata, __pyx_mstate->__pyx_kp_b_iso88591_A_a_q_d_M_1_T_Cq_U_T_5_T_4q_d_F, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[624])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 284};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_position, __pyx_mstate->__pyx_n_u_rd_handle, __pyx_mstate->__pyx_n_u_wr_handle};
    __pyx_mstate_global->__pyx_codeobj_tab[625] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_io_pxi, __pyx_mstate->__pyx_n_u_tell, __pyx_mstate->__pyx_kp_b_iso88591_A_4q_31_4r_a_a_4r_a_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[625])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 301};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_position, __pyx_mstate->__pyx_n_u_whence, __pyx_mstate->__pyx_n_u_offset, __pyx_mstate->__pyx_n_u_handle};
    __pyx_mstate_global->__pyx_codeobj_tab[626] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_io_pxi, __pyx_mstate->__pyx_n_u_seek, __pyx_mstate->__pyx_kp_b_iso88591_0_0_A_wc_1_q_d_E_1_q_d_HA_A_t2U, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[626])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 343};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_handle};
    __pyx_mstate_global->__pyx_codeobj_tab[627] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_io_pxi, __pyx_mstate->__pyx_n_u_flush, __pyx_mstate->__pyx_kp_b_iso88591_A_M_4q_T_1_AV4r_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[627])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 356};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_data, __pyx_mstate->__pyx_n_u_handle, __pyx_mstate->__pyx_n_u_buf};
    __pyx_mstate_global->__pyx_codeobj_tab[628] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_io_pxi, __pyx_mstate->__pyx_n_u_write, __pyx_mstate->__pyx_kp_b_iso88591_A_Q_q_1_t2_s_b_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[628])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 10, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 378};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_nbytes, __pyx_mstate->__pyx_n_u_c_nbytes, __pyx_mstate->__pyx_n_u_bytes_read, __pyx_mstate->__pyx_n_u_obj, __pyx_mstate->__pyx_n_u_bs, __pyx_mstate->__pyx_n_u_chunks, __pyx_mstate->__pyx_n_u_chunk, __pyx_mstate->__pyx_n_u_handle, __pyx_mstate->__pyx_n_u_buf};
    __pyx_mstate_global->__pyx_codeobj_tab[629] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_io_pxi, __pyx_mstate->__pyx_n_u_read, __pyx_mstate->__pyx_kp_b_iso88591_7_Q_t4q_T_D_Qa_t1_s_q_t5_2T_a_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[629])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 8, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 427};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_file_offset, __pyx_mstate->__pyx_n_u_nbytes, __pyx_mstate->__pyx_n_u_data, __pyx_mstate->__pyx_n_u_c_file_offset, __pyx_mstate->__pyx_n_u_c_nbytes, __pyx_mstate->__pyx_n_u_handle, __pyx_mstate->__pyx_n_u_stream};
    __pyx_mstate_global->__pyx_codeobj_tab[630] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_io_pxi, __pyx_mstate->__pyx_n_u_get_stream, __pyx_mstate->__pyx_kp_b_iso88591_A_1_A_Q_q_q_1_q_oQ_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[630])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 9, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 463};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_nbytes, __pyx_mstate->__pyx_n_u_offset, __pyx_mstate->__pyx_n_u_c_nbytes, __pyx_mstate->__pyx_n_u_c_offset, __pyx_mstate->__pyx_n_u_bytes_read, __pyx_mstate->__pyx_n_u_obj, __pyx_mstate->__pyx_n_u_handle, __pyx_mstate->__pyx_n_u_buf};
    __pyx_mstate_global->__pyx_codeobj_tab[631] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_io_pxi, __pyx_mstate->__pyx_n_u_read_at, __pyx_mstate->__pyx_kp_b_iso88591_A_1_1_A_QfA_M_1IQ_q_d_A_z_1_b_aq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[631])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 501};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_nbytes};
    __pyx_mstate_global->__pyx_codeobj_tab[632] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_io_pxi, __pyx_mstate->__pyx_n_u_read1, __pyx_mstate->__pyx_kp_b_iso88591_1_7_Q_T_t5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[632])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 524};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[633] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_io_pxi, __pyx_mstate->__pyx_n_u_readall, __pyx_mstate->__pyx_kp_b_iso88591_A_t5_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[633])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 527};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_b, __pyx_mstate->__pyx_n_u_bytes_read, __pyx_mstate->__pyx_n_u_buf, __pyx_mstate->__pyx_n_u_py_buf, __pyx_mstate->__pyx_n_u_buf_len, __pyx_mstate->__pyx_n_u_handle};
    __pyx_mstate_global->__pyx_codeobj_tab[634] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_io_pxi, __pyx_mstate->__pyx_n_u_readinto, __pyx_mstate->__pyx_kp_b_iso88591_A_a_1_fG4r_a_q_d_E_1_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[634])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 559};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_size};
    __pyx_mstate_global->__pyx_codeobj_tab[635] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_io_pxi, __pyx_mstate->__pyx_n_u_readline, __pyx_mstate->__pyx_kp_b_iso88591_A_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[635])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 573};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_hint};
    __pyx_mstate_global->__pyx_codeobj_tab[636] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_io_pxi, __pyx_mstate->__pyx_n_u_readlines, __pyx_mstate->__pyx_kp_b_iso88591_Q_4, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[636])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 593};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_nbytes, __pyx_mstate->__pyx_n_u_c_nbytes, __pyx_mstate->__pyx_n_u_bytes_read, __pyx_mstate->__pyx_n_u_output, __pyx_mstate->__pyx_n_u_handle};
    __pyx_mstate_global->__pyx_codeobj_tab[637] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_io_pxi, __pyx_mstate->__pyx_n_u_read_buffer, __pyx_mstate->__pyx_kp_b_iso88591_a_7_Q_t4q_y_U_t5_2T_a_q_1F_b_1A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[637])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 622};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[638] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_io_pxi, __pyx_mstate->__pyx_n_u_truncate, __pyx_mstate->__pyx_kp_b_iso88591_A_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[638])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 628};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_lines, __pyx_mstate->__pyx_n_u_line};
    __pyx_mstate_global->__pyx_codeobj_tab[639] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_io_pxi, __pyx_mstate->__pyx_n_u_writelines, __pyx_mstate->__pyx_kp_b_iso88591_A_Q_HA_aq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[639])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 19, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 642};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_stream_or_path, __pyx_mstate->__pyx_n_u_buffer_size, __pyx_mstate->__pyx_n_u_bytes_read, __pyx_mstate->__pyx_n_u_buf, __pyx_mstate->__pyx_n_u_handle, __pyx_mstate->__pyx_n_u_write_queue, __pyx_mstate->__pyx_n_u_stream, __pyx_mstate->__pyx_n_u_cleanup, __pyx_mstate->__pyx_n_u_cleanup, __pyx_mstate->__pyx_n_u_cleanup, __pyx_mstate->__pyx_n_u_done, __pyx_mstate->__pyx_n_u_exc_info, __pyx_mstate->__pyx_n_u_bg_write, __pyx_mstate->__pyx_n_u_bg_write, __pyx_mstate->__pyx_n_u_writer_thread, __pyx_mstate->__pyx_n_u_total_bytes, __pyx_mstate->__pyx_n_u_c_buffer_size, __pyx_mstate->__pyx_n_u_pybuf};
    __pyx_mstate_global->__pyx_codeobj_tab[640] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_io_pxi, __pyx_mstate->__pyx_n_u_download, __pyx_mstate->__pyx_kp_b_iso88591_31_4_1_4_1_A_a_l_Q_e1A_4wa_q_T, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[640])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 13, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 741};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_stream_or_path, __pyx_mstate->__pyx_n_u_buffer_size, __pyx_mstate->__pyx_n_u_bytes_read, __pyx_mstate->__pyx_n_u_buf, __pyx_mstate->__pyx_n_u_handle, __pyx_mstate->__pyx_n_u_stream, __pyx_mstate->__pyx_n_u_cleanup, __pyx_mstate->__pyx_n_u_cleanup, __pyx_mstate->__pyx_n_u_cleanup, __pyx_mstate->__pyx_n_u_total_bytes, __pyx_mstate->__pyx_n_u_c_buffer_size, __pyx_mstate->__pyx_n_u_pybuf};
    __pyx_mstate_global->__pyx_codeobj_tab[641] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_io_pxi, __pyx_mstate->__pyx_n_u_download_nothreads, __pyx_mstate->__pyx_kp_b_iso88591_a_a_l_Q_4wa_q_T_Q_E_k_q_4s_Q_31, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[641])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 10, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 797};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_stream, __pyx_mstate->__pyx_n_u_buffer_size, __pyx_mstate->__pyx_n_u_write_queue, __pyx_mstate->__pyx_n_u_done, __pyx_mstate->__pyx_n_u_exc_info, __pyx_mstate->__pyx_n_u_bg_write, __pyx_mstate->__pyx_n_u_bg_write, __pyx_mstate->__pyx_n_u_writer_thread, __pyx_mstate->__pyx_n_u_buf};
    __pyx_mstate_global->__pyx_codeobj_tab[642] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_io_pxi, __pyx_mstate->__pyx_n_u_upload, __pyx_mstate->__pyx_kp_b_iso88591_4_1_4_e1A_Q_l_Q_q_1_V1_fE_4q_U, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[642])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 855};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_stream, __pyx_mstate->__pyx_n_u_buffer_size, __pyx_mstate->__pyx_n_u_buf};
    __pyx_mstate_global->__pyx_codeobj_tab[643] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_io_pxi, __pyx_mstate->__pyx_n_u_upload_nothreads, __pyx_mstate->__pyx_kp_b_iso88591_4A_Q_l_Q_Qa_t1_aq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[643])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[644] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[644])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state};
    __pyx_mstate_global->__pyx_codeobj_tab[645] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[645])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 978};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pos};
    __pyx_mstate_global->__pyx_codeobj_tab[646] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_io_pxi, __pyx_mstate->__pyx_n_u_truncate, __pyx_mstate->__pyx_kp_b_iso88591_1_G9AQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[646])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 986};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_size};
    __pyx_mstate_global->__pyx_codeobj_tab[647] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_io_pxi, __pyx_mstate->__pyx_n_u_readline, __pyx_mstate->__pyx_kp_b_iso88591_A_t7_1A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[647])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 999};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_hint};
    __pyx_mstate_global->__pyx_codeobj_tab[648] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_io_pxi, __pyx_mstate->__pyx_n_u_readlines, __pyx_mstate->__pyx_kp_b_iso88591_Q_t7_AQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[648])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[649] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[649])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state};
    __pyx_mstate_global->__pyx_codeobj_tab[650] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[650])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1038};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_path, __pyx_mstate->__pyx_n_u_size, __pyx_mstate->__pyx_n_u_handle, __pyx_mstate->__pyx_n_u_c_path, __pyx_mstate->__pyx_n_u_c_size, __pyx_mstate->__pyx_n_u_result};
    __pyx_mstate_global->__pyx_codeobj_tab[651] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_io_pxi, __pyx_mstate->__pyx_n_u_create, __pyx_mstate->__pyx_kp_b_iso88591_A_aq_Q_5WAXQ_7q_ha_oQ_oQ_Q_Q_Fa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[651])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1068};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_path, __pyx_mstate->__pyx_n_u_mode, __pyx_mstate->__pyx_n_u_c_mode, __pyx_mstate->__pyx_n_u_handle, __pyx_mstate->__pyx_n_u_c_path};
    __pyx_mstate_global->__pyx_codeobj_tab[652] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_io_pxi, __pyx_mstate->__pyx_n_u_open_2, __pyx_mstate->__pyx_kp_b_iso88591_q_HA_aq_5_E_Q_q_e1_Q_q_fG1_Q_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[652])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1096};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_new_size};
    __pyx_mstate_global->__pyx_codeobj_tab[653] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_io_pxi, __pyx_mstate->__pyx_n_u_resize, __pyx_mstate->__pyx_kp_b_iso88591_A_AT_BgQa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[653])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1106};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[654] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_io_pxi, __pyx_mstate->__pyx_n_u_fileno, __pyx_mstate->__pyx_kp_b_iso88591_A_M_t7_b_0, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[654])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[655] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[655])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state};
    __pyx_mstate_global->__pyx_codeobj_tab[656] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[656])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1111};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_path, __pyx_mstate->__pyx_n_u_mode, __pyx_mstate->__pyx_n_u_mmap};
    __pyx_mstate_global->__pyx_codeobj_tab[657] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_io_pxi, __pyx_mstate->__pyx_n_u_memory_map, __pyx_mstate->__pyx_kp_b_iso88591_Q_1_1_avQ_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[657])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1152};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_path, __pyx_mstate->__pyx_n_u_size};
    __pyx_mstate_global->__pyx_codeobj_tab[658] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_io_pxi, __pyx_mstate->__pyx_n_u_create_memory_map, __pyx_mstate->__pyx_kp_b_iso88591_6_7_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[658])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1265};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[659] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_io_pxi, __pyx_mstate->__pyx_n_u_fileno, __pyx_mstate->__pyx_kp_b_iso88591_A_M_t7, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[659])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[660] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[660])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state};
    __pyx_mstate_global->__pyx_codeobj_tab[661] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[661])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1299};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_num_threads, __pyx_mstate->__pyx_n_u_writer};
    __pyx_mstate_global->__pyx_codeobj_tab[662] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_io_pxi, __pyx_mstate->__pyx_n_u_set_memcopy_threads, __pyx_mstate->__pyx_kp_b_iso88591_A_d_A_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[662])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1309};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_blocksize, __pyx_mstate->__pyx_n_u_writer};
    __pyx_mstate_global->__pyx_codeobj_tab[663] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_io_pxi, __pyx_mstate->__pyx_n_u_set_memcopy_blocksize, __pyx_mstate->__pyx_kp_b_iso88591_A_d_A_AQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[663])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1319};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_threshold, __pyx_mstate->__pyx_n_u_writer};
    __pyx_mstate_global->__pyx_codeobj_tab[664] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_io_pxi, __pyx_mstate->__pyx_n_u_set_memcopy_threshold, __pyx_mstate->__pyx_kp_b_iso88591_A_d_A_AQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[664])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[665] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[665])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state};
    __pyx_mstate_global->__pyx_codeobj_tab[666] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[666])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1365};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[667] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_io_pxi, __pyx_mstate->__pyx_n_u_assert_cpu, __pyx_mstate->__pyx_kp_b_iso88591_A_4t1_Qa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[667])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1386};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[668] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_io_pxi, __pyx_mstate->__pyx_n_u_hex, __pyx_mstate->__pyx_kp_b_iso88591_A_L_t7_b_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[668])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1465};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_offset, __pyx_mstate->__pyx_n_u_length, __pyx_mstate->__pyx_n_u_result};
    __pyx_mstate_global->__pyx_codeobj_tab[669] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_io_pxi, __pyx_mstate->__pyx_n_u_slice, __pyx_mstate->__pyx_kp_b_iso88591_Q_7_A_AQ_7_Q_1O1D_1O1D_45_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[669])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1496};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_other, __pyx_mstate->__pyx_n_u_result};
    __pyx_mstate_global->__pyx_codeobj_tab[670] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_io_pxi, __pyx_mstate->__pyx_n_u_equals, __pyx_mstate->__pyx_kp_b_iso88591_A_4xs_q_A_4w_auG1_4t1_t9CuA_Q_T, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[670])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1532};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_protocol, __pyx_mstate->__pyx_n_u_bufobj};
    __pyx_mstate_global->__pyx_codeobj_tab[671] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_io_pxi, __pyx_mstate->__pyx_n_u_reduce_ex, __pyx_mstate->__pyx_kp_b_iso88591_A_L_9Cq_V_Bk_2_T_Be1_G4r_a_T_A_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[671])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1547};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[672] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_io_pxi, __pyx_mstate->__pyx_n_u_to_pybytes, __pyx_mstate->__pyx_kp_b_iso88591_A_L_1_WD_q_t2U, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[672])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1591};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_new_size, __pyx_mstate->__pyx_n_u_shrink_to_fit, __pyx_mstate->__pyx_n_u_c_shrink_to_fit};
    __pyx_mstate_global->__pyx_codeobj_tab[673] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_io_pxi, __pyx_mstate->__pyx_n_u_resize, __pyx_mstate->__pyx_kp_b_iso88591_5Q_a_d_Q_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[673])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1615};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_size, __pyx_mstate->__pyx_n_u_memory_pool, __pyx_mstate->__pyx_n_u_resizable, __pyx_mstate->__pyx_n_u_cpool, __pyx_mstate->__pyx_n_u_c_rz_buffer, __pyx_mstate->__pyx_n_u_c_buffer};
    __pyx_mstate_global->__pyx_codeobj_tab[674] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_io_pxi, __pyx_mstate->__pyx_n_u_allocate_buffer, __pyx_mstate->__pyx_kp_b_iso88591_4AQ_q_1N_q_a_AQ_y_q_avQ_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[674])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1682};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[675] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_io_pxi, __pyx_mstate->__pyx_n_u_getvalue, __pyx_mstate->__pyx_kp_b_iso88591_A_4r_q_9_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[675])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[676] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[676])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state};
    __pyx_mstate_global->__pyx_codeobj_tab[677] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[677])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1701};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_handle};
    __pyx_mstate_global->__pyx_codeobj_tab[678] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_io_pxi, __pyx_mstate->__pyx_n_u_size, __pyx_mstate->__pyx_kp_b_iso88591_A_d_A_v_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[678])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[679] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[679])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state};
    __pyx_mstate_global->__pyx_codeobj_tab[680] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[680])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[681] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[681])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state};
    __pyx_mstate_global->__pyx_codeobj_tab[682] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[682])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[683] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[683])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state};
    __pyx_mstate_global->__pyx_codeobj_tab[684] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[684])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[685] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[685])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state};
    __pyx_mstate_global->__pyx_codeobj_tab[686] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[686])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1874};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_c_raw, __pyx_mstate->__pyx_n_u_buffered, __pyx_mstate->__pyx_n_u_raw};
    __pyx_mstate_global->__pyx_codeobj_tab[687] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_io_pxi, __pyx_mstate->__pyx_n_u_detach, __pyx_mstate->__pyx_kp_b_iso88591_A_9_T_y_1_N_87_j_Qe4t3a_a_DAQ_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[687])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[688] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[688])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state};
    __pyx_mstate_global->__pyx_codeobj_tab[689] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[689])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1938};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_c_raw, __pyx_mstate->__pyx_n_u_buffered, __pyx_mstate->__pyx_n_u_raw};
    __pyx_mstate_global->__pyx_codeobj_tab[690] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_io_pxi, __pyx_mstate->__pyx_n_u_detach, __pyx_mstate->__pyx_kp_b_iso88591_A_d_y_1_N_87_j_Qa_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[690])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[691] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[691])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state};
    __pyx_mstate_global->__pyx_codeobj_tab[692] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[692])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[693] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[693])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state};
    __pyx_mstate_global->__pyx_codeobj_tab[694] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[694])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2003};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_decoder, __pyx_mstate->__pyx_n_u_encoder};
    __pyx_mstate_global->__pyx_codeobj_tab[695] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_io_pxi, __pyx_mstate->__pyx_n_u_init, __pyx_mstate->__pyx_kp_b_iso88591_A_L_L, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[695])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2007};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_buf, __pyx_mstate->__pyx_n_u_final};
    __pyx_mstate_global->__pyx_codeobj_tab[696] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_io_pxi, __pyx_mstate->__pyx_n_u_call, __pyx_mstate->__pyx_kp_b_iso88591_A_1E_A_t9G1D_ha, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[696])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2039};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_stream, __pyx_mstate->__pyx_n_u_src_encoding, __pyx_mstate->__pyx_n_u_dest_encoding, __pyx_mstate->__pyx_n_u_src_codec, __pyx_mstate->__pyx_n_u_dest_codec};
    __pyx_mstate_global->__pyx_codeobj_tab[697] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_io_pxi, __pyx_mstate->__pyx_n_u_transcoding_input_stream, __pyx_mstate->__pyx_kp_b_iso88591_gQa_waq_y_c_1_q_q_94Gq_55H, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[697])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2079};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_obj, __pyx_mstate->__pyx_n_u_buf};
    __pyx_mstate_global->__pyx_codeobj_tab[698] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_io_pxi, __pyx_mstate->__pyx_n_u_py_buffer, __pyx_mstate->__pyx_kp_b_iso88591_aq_aq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[698])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2093};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_address_2, __pyx_mstate->__pyx_n_u_size, __pyx_mstate->__pyx_n_u_base, __pyx_mstate->__pyx_n_u_c_addr, __pyx_mstate->__pyx_n_u_c_size, __pyx_mstate->__pyx_n_u_buf};
    __pyx_mstate_global->__pyx_codeobj_tab[699] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_io_pxi, __pyx_mstate->__pyx_n_u_foreign_buffer, __pyx_mstate->__pyx_kp_b_iso88591_1_Qk_AQ_aq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[699])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2124};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_o};
    __pyx_mstate_global->__pyx_codeobj_tab[700] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_io_pxi, __pyx_mstate->__pyx_n_u_as_buffer, __pyx_mstate->__pyx_kp_b_iso88591_z_Q_q_9AQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[700])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2217};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_path};
    __pyx_mstate_global->__pyx_codeobj_tab[701] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_io_pxi, __pyx_mstate->__pyx_n_u_detect_compression, __pyx_mstate->__pyx_kp_b_iso88591_z_4y_1_1_1_1_1_1_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[701])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2335};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_time_to_first_byte_millis, __pyx_mstate->__pyx_n_u_transfer_bandwidth_mib_per_sec, __pyx_mstate->__pyx_n_u_ideal_bandwidth_utilization_frac, __pyx_mstate->__pyx_n_u_max_ideal_request_size_mib};
    __pyx_mstate_global->__pyx_codeobj_tab[702] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_io_pxi, __pyx_mstate->__pyx_n_u_from_network_metrics, __pyx_mstate->__pyx_kp_b_iso88591_A__2_5_EQ_q_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[702])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2366};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_kwargs};
    __pyx_mstate_global->__pyx_codeobj_tab[703] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_io_pxi, __pyx_mstate->__pyx_n_u_reconstruct, __pyx_mstate->__pyx_kp_b_iso88591_A_3a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[703])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2372};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_kwargs};
    __pyx_mstate_global->__pyx_codeobj_tab[704] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_io_pxi, __pyx_mstate->__pyx_n_u_reduce, __pyx_mstate->__pyx_kp_b_iso88591_A_Q_D_T_Q_4q_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[704])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2456};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_path};
    __pyx_mstate_global->__pyx_codeobj_tab[705] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_io_pxi, __pyx_mstate->__pyx_n_u_detect, __pyx_mstate->__pyx_kp_b_iso88591_A_uA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[705])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2479};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_compression, __pyx_mstate->__pyx_n_u_typ};
    __pyx_mstate_global->__pyx_codeobj_tab[706] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_io_pxi, __pyx_mstate->__pyx_n_u_is_available, __pyx_mstate->__pyx_kp_b_iso88591_A_7q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[706])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2497};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_compression, __pyx_mstate->__pyx_n_u_typ};
    __pyx_mstate_global->__pyx_codeobj_tab[707] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_io_pxi, __pyx_mstate->__pyx_n_u_supports_compression_level, __pyx_mstate->__pyx_kp_b_iso88591_A_7q_aq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[707])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2512};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_compression, __pyx_mstate->__pyx_n_u_typ};
    __pyx_mstate_global->__pyx_codeobj_tab[708] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_io_pxi, __pyx_mstate->__pyx_n_u_default_compression_level, __pyx_mstate->__pyx_kp_b_iso88591_A_7q_W_AQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[708])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2527};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_compression, __pyx_mstate->__pyx_n_u_typ};
    __pyx_mstate_global->__pyx_codeobj_tab[709] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_io_pxi, __pyx_mstate->__pyx_n_u_minimum_compression_level, __pyx_mstate->__pyx_kp_b_iso88591_A_7q_W_AQ_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[709])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2541};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_compression, __pyx_mstate->__pyx_n_u_typ};
    __pyx_mstate_global->__pyx_codeobj_tab[710] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_io_pxi, __pyx_mstate->__pyx_n_u_maximum_compression_level, __pyx_mstate->__pyx_kp_b_iso88591_A_7q_W_AQ_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[710])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 11, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2567};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_buf, __pyx_mstate->__pyx_n_u_asbytes, __pyx_mstate->__pyx_n_u_memory_pool, __pyx_mstate->__pyx_n_u_owned_buf, __pyx_mstate->__pyx_n_u_c_buf, __pyx_mstate->__pyx_n_u_pyobj, __pyx_mstate->__pyx_n_u_out_buf, __pyx_mstate->__pyx_n_u_max_output_size, __pyx_mstate->__pyx_n_u_output_length, __pyx_mstate->__pyx_n_u_output_buffer};
    __pyx_mstate_global->__pyx_codeobj_tab[711] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_io_pxi, __pyx_mstate->__pyx_n_u_compress, __pyx_mstate->__pyx_kp_b_iso88591_a_Q_Kq_Q_hd_Q_d_uA_1_31F_M_1IQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[711])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 11, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2625};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_buf, __pyx_mstate->__pyx_n_u_decompressed_size, __pyx_mstate->__pyx_n_u_asbytes, __pyx_mstate->__pyx_n_u_memory_pool, __pyx_mstate->__pyx_n_u_owned_buf, __pyx_mstate->__pyx_n_u_c_buf, __pyx_mstate->__pyx_n_u_out_buf, __pyx_mstate->__pyx_n_u_output_size, __pyx_mstate->__pyx_n_u_output_buffer, __pyx_mstate->__pyx_n_u_pybuf};
    __pyx_mstate_global->__pyx_codeobj_tab[712] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_io_pxi, __pyx_mstate->__pyx_n_u_decompress, __pyx_mstate->__pyx_kp_b_iso88591_7_Q_Q_Kq_Q_S_A_a_1_0_q_M_1A_oQm, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[712])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[713] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[713])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state};
    __pyx_mstate_global->__pyx_codeobj_tab[714] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[714])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2687};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_buf, __pyx_mstate->__pyx_n_u_codec, __pyx_mstate->__pyx_n_u_asbytes, __pyx_mstate->__pyx_n_u_memory_pool, __pyx_mstate->__pyx_n_u_coder};
    __pyx_mstate_global->__pyx_codeobj_tab[715] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_io_pxi, __pyx_mstate->__pyx_n_u_compress, __pyx_mstate->__pyx_kp_b_iso88591_oQ_uAQ_5_xy_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[715])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2710};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_buf, __pyx_mstate->__pyx_n_u_decompressed_size, __pyx_mstate->__pyx_n_u_codec, __pyx_mstate->__pyx_n_u_asbytes, __pyx_mstate->__pyx_n_u_memory_pool, __pyx_mstate->__pyx_n_u_decoder};
    __pyx_mstate_global->__pyx_codeobj_tab[716] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_io_pxi, __pyx_mstate->__pyx_n_u_decompress, __pyx_mstate->__pyx_kp_b_iso88591_31_a_aq_7_Qe89L_0, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[716])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2738};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_source, __pyx_mstate->__pyx_n_u_compression, __pyx_mstate->__pyx_n_u_buffer_size, __pyx_mstate->__pyx_n_u_stream, __pyx_mstate->__pyx_n_u_source_path};
    __pyx_mstate_global->__pyx_codeobj_tab[717] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_io_pxi, __pyx_mstate->__pyx_n_u_input_stream, __pyx_mstate->__pyx_kp_b_iso88591_ql_oQa_a_z_WA_q_Q_1IXQ_Qiq_1_1H, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[717])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2824};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_source, __pyx_mstate->__pyx_n_u_compression, __pyx_mstate->__pyx_n_u_buffer_size, __pyx_mstate->__pyx_n_u_stream, __pyx_mstate->__pyx_n_u_source_path};
    __pyx_mstate_global->__pyx_codeobj_tab[718] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_io_pxi, __pyx_mstate->__pyx_n_u_output_stream, __pyx_mstate->__pyx_kp_b_iso88591_0_x_oQa_a_z_WA_q_Q_1IXQ_ay_1_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[718])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[719] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[719])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state};
    __pyx_mstate_global->__pyx_codeobj_tab[720] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[720])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[721] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[721])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state};
    __pyx_mstate_global->__pyx_codeobj_tab[722] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[722])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 415};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_other, __pyx_mstate->__pyx_n_u_result};
    __pyx_mstate_global->__pyx_codeobj_tab[723] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_ipc_pxi, __pyx_mstate->__pyx_n_u_equals, __pyx_mstate->__pyx_kp_b_iso88591_A_T_RwavU_a_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[723])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 432};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_sink, __pyx_mstate->__pyx_n_u_alignment, __pyx_mstate->__pyx_n_u_memory_pool, __pyx_mstate->__pyx_n_u_output_length, __pyx_mstate->__pyx_n_u_out, __pyx_mstate->__pyx_n_u_options};
    __pyx_mstate_global->__pyx_codeobj_tab[724] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_ipc_pxi, __pyx_mstate->__pyx_n_u_serialize_to, __pyx_mstate->__pyx_kp_b_iso88591_6oQ_A_A_d_Bd_XT_Qe9AQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[724])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 455};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_alignment, __pyx_mstate->__pyx_n_u_memory_pool, __pyx_mstate->__pyx_n_u_stream};
    __pyx_mstate_global->__pyx_codeobj_tab[725] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_ipc_pxi, __pyx_mstate->__pyx_n_u_serialize, __pyx_mstate->__pyx_kp_b_iso88591_1A_M_K_1_vYa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[725])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[726] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[726])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state};
    __pyx_mstate_global->__pyx_codeobj_tab[727] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[727])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 504};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_source, __pyx_mstate->__pyx_n_u_result, __pyx_mstate->__pyx_n_u_in_stream, __pyx_mstate->__pyx_n_u_reader};
    __pyx_mstate_global->__pyx_codeobj_tab[728] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_ipc_pxi, __pyx_mstate->__pyx_n_u_open_stream, __pyx_mstate->__pyx_kp_b_iso88591_A_1_5_q_ha_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[728])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 533};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_result};
    __pyx_mstate_global->__pyx_codeobj_tab[729] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_ipc_pxi, __pyx_mstate->__pyx_n_u_read_next_message, __pyx_mstate->__pyx_kp_b_iso88591_A_gXQa_T_WD_1A_6_S_1_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[729])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[730] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[730])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state};
    __pyx_mstate_global->__pyx_codeobj_tab[731] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[731])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 565};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_table_or_batch};
    __pyx_mstate_global->__pyx_codeobj_tab[732] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_ipc_pxi, __pyx_mstate->__pyx_n_u_write, __pyx_mstate->__pyx_kp_b_iso88591_A_Q_a_AQ_q_AQ_AT, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[732])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 580};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_batch, __pyx_mstate->__pyx_n_u_custom_metadata, __pyx_mstate->__pyx_n_u_metadata, __pyx_mstate->__pyx_n_u_c_meta};
    __pyx_mstate_global->__pyx_codeobj_tab[733] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_ipc_pxi, __pyx_mstate->__pyx_n_u_write_batch, __pyx_mstate->__pyx_kp_b_iso88591_Q_q_WD_6_iq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[733])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 597};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_table, __pyx_mstate->__pyx_n_u_max_chunksize, __pyx_mstate->__pyx_n_u_c_max_chunksize};
    __pyx_mstate_global->__pyx_codeobj_tab[734] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_ipc_pxi, __pyx_mstate->__pyx_n_u_write_table, __pyx_mstate->__pyx_kp_b_iso88591_5Q_q_a_WD_Qe6_67, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[734])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 619};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[735] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_ipc_pxi, __pyx_mstate->__pyx_n_u_close, __pyx_mstate->__pyx_kp_b_iso88591_A_WD, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[735])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 626};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[736] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_ipc_pxi, __pyx_mstate->__pyx_n_u_enter, __pyx_mstate->__pyx_kp_b_iso88591_A_q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[736])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 629};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_exc_type, __pyx_mstate->__pyx_n_u_exc_val, __pyx_mstate->__pyx_n_u_exc_tb};
    __pyx_mstate_global->__pyx_codeobj_tab[737] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_ipc_pxi, __pyx_mstate->__pyx_n_u_exit, __pyx_mstate->__pyx_kp_b_iso88591_A_F_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[737])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[738] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[738])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state};
    __pyx_mstate_global->__pyx_codeobj_tab[739] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[739])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 663};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_sink, __pyx_mstate->__pyx_n_u_schema, __pyx_mstate->__pyx_n_u_options, __pyx_mstate->__pyx_n_u_c_sink};
    __pyx_mstate_global->__pyx_codeobj_tab[740] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_ipc_pxi, __pyx_mstate->__pyx_n_u_open_2, __pyx_mstate->__pyx_kp_b_iso88591_A_5Q_Kwa_6_q_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[740])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[741] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[741])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state};
    __pyx_mstate_global->__pyx_codeobj_tab[742] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[742])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS), 688};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_options, __pyx_mstate->__pyx_n_u_table};
    __pyx_mstate_global->__pyx_codeobj_tab[743] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_ipc_pxi, __pyx_mstate->__pyx_n_u_read_pandas, __pyx_mstate->__pyx_kp_b_iso88591_A_IQ_uJc, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[743])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 775};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_batch};
    __pyx_mstate_global->__pyx_codeobj_tab[744] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_ipc_pxi, __pyx_mstate->__pyx_n_u_read_next_batch, __pyx_mstate->__pyx_kp_b_iso88591_A_WD_1AQ_5_Cs, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[744])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 798};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_batch_with_metadata};
    __pyx_mstate_global->__pyx_codeobj_tab[745] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_ipc_pxi, __pyx_mstate->__pyx_n_u_read_next_batch_with_custom_meta, __pyx_mstate->__pyx_kp_b_iso88591_A_WD_1_fD_3a_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[745])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 838};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_table};
    __pyx_mstate_global->__pyx_codeobj_tab[746] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_ipc_pxi, __pyx_mstate->__pyx_n_u_read_all, __pyx_mstate->__pyx_kp_b_iso88591_A_WD_F_1A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[746])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 853};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[747] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_ipc_pxi, __pyx_mstate->__pyx_n_u_close, __pyx_mstate->__pyx_kp_b_iso88591_A_WD, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[747])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 860};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[748] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_ipc_pxi, __pyx_mstate->__pyx_n_u_enter, __pyx_mstate->__pyx_kp_b_iso88591_A_q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[748])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 863};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_exc_type, __pyx_mstate->__pyx_n_u_exc_val, __pyx_mstate->__pyx_n_u_exc_tb};
    __pyx_mstate_global->__pyx_codeobj_tab[749] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_ipc_pxi, __pyx_mstate->__pyx_n_u_exit, __pyx_mstate->__pyx_kp_b_iso88591_A_F_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[749])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 866};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_target_schema, __pyx_mstate->__pyx_n_u_c_schema, __pyx_mstate->__pyx_n_u_c_reader, __pyx_mstate->__pyx_n_u_out};
    __pyx_mstate_global->__pyx_codeobj_tab[750] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_ipc_pxi, __pyx_mstate->__pyx_n_u_cast, __pyx_mstate->__pyx_kp_b_iso88591_A_4wgS_Q_AQ_8_WA_Q_5_xq_Q_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[750])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 898};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_out_ptr, __pyx_mstate->__pyx_n_u_c_ptr};
    __pyx_mstate_global->__pyx_codeobj_tab[751] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_ipc_pxi, __pyx_mstate->__pyx_n_u_export_to_c, __pyx_mstate->__pyx_kp_b_iso88591_A_q_0_I_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[751])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 917};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_in_ptr, __pyx_mstate->__pyx_n_u_c_ptr, __pyx_mstate->__pyx_n_u_c_reader, __pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[752] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_ipc_pxi, __pyx_mstate->__pyx_n_u_import_from_c, __pyx_mstate->__pyx_kp_b_iso88591_A_q_Q_Q_A_Ja_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[752])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 943};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_requested_schema, __pyx_mstate->__pyx_n_u_c_stream, __pyx_mstate->__pyx_n_u_out_schema, __pyx_mstate->__pyx_n_u_stream_capsule};
    __pyx_mstate_global->__pyx_codeobj_tab[753] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_ipc_pxi, __pyx_mstate->__pyx_n_u_arrow_c_stream, __pyx_mstate->__pyx_kp_b_iso88591_2_G1_6aq_t83a_t5_q_q_0_Ya_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[753])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 974};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_stream, __pyx_mstate->__pyx_n_u_c_stream, __pyx_mstate->__pyx_n_u_c_reader, __pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[754] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_ipc_pxi, __pyx_mstate->__pyx_n_u_import_from_c_capsule, __pyx_mstate->__pyx_kp_b_iso88591_A_A_Q_Qa_Ja_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[754])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1004};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_data, __pyx_mstate->__pyx_n_u_schema, __pyx_mstate->__pyx_n_u_requested, __pyx_mstate->__pyx_n_u_capsule};
    __pyx_mstate_global->__pyx_codeobj_tab[755] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_ipc_pxi, __pyx_mstate->__pyx_n_u_from_stream, __pyx_mstate->__pyx_kp_b_iso88591_A_4wavQ_1_at1A_7_t7_81_iq_4q_1_7, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[755])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1047};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_schema, __pyx_mstate->__pyx_n_u_batches, __pyx_mstate->__pyx_n_u_c_schema, __pyx_mstate->__pyx_n_u_c_reader, __pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[756] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_ipc_pxi, __pyx_mstate->__pyx_n_u_from_batches, __pyx_mstate->__pyx_kp_b_iso88591_A_6e1_a_Ja_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[756])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[757] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[757])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state};
    __pyx_mstate_global->__pyx_codeobj_tab[758] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[758])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1086};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_source, __pyx_mstate->__pyx_n_u_options, __pyx_mstate->__pyx_n_u_memory_pool};
    __pyx_mstate_global->__pyx_codeobj_tab[759] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_ipc_pxi, __pyx_mstate->__pyx_n_u_open_2, __pyx_mstate->__pyx_kp_b_iso88591_3_Kwa_HO_1_4q_A_a_L_A_T_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[759])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[760] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[760])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state};
    __pyx_mstate_global->__pyx_codeobj_tab[761] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[761])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1108};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_sink, __pyx_mstate->__pyx_n_u_schema, __pyx_mstate->__pyx_n_u_options, __pyx_mstate->__pyx_n_u_metadata, __pyx_mstate->__pyx_n_u_c_sink, __pyx_mstate->__pyx_n_u_c_meta};
    __pyx_mstate_global->__pyx_codeobj_tab[762] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_ipc_pxi, __pyx_mstate->__pyx_n_u_open_2, __pyx_mstate->__pyx_kp_b_iso88591_A_5Q_Kwa_6_8_axv_Zq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[762])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[763] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[763])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state};
    __pyx_mstate_global->__pyx_codeobj_tab[764] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[764])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1159};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_source, __pyx_mstate->__pyx_n_u_footer_offset, __pyx_mstate->__pyx_n_u_options, __pyx_mstate->__pyx_n_u_memory_pool, __pyx_mstate->__pyx_n_u_offset};
    __pyx_mstate_global->__pyx_codeobj_tab[765] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_ipc_pxi, __pyx_mstate->__pyx_n_u_open_2, __pyx_mstate->__pyx_kp_b_iso88591_31_Kwa_HO_1_Yaq_87_4q_a_Q_wc_Jn, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[765])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1195};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_batch};
    __pyx_mstate_global->__pyx_codeobj_tab[766] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_ipc_pxi, __pyx_mstate->__pyx_n_u_get_batch, __pyx_mstate->__pyx_kp_b_iso88591_A_2Rr_Bc_Q_A_AQ_N_4wd_4DAQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[766])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1222};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_batch_with_metadata};
    __pyx_mstate_global->__pyx_codeobj_tab[767] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_ipc_pxi, __pyx_mstate->__pyx_n_u_get_batch_with_custom_metadata, __pyx_mstate->__pyx_kp_b_iso88591_A_2Rr_Bc_Q_A_AQ_G4r_C1A_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[767])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1249};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_batches, __pyx_mstate->__pyx_n_u_table, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_nbatches};
    __pyx_mstate_global->__pyx_codeobj_tab[768] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_ipc_pxi, __pyx_mstate->__pyx_n_u_read_all, __pyx_mstate->__pyx_kp_b_iso88591_A_4q_waq_U_1_q_1D_t1_AQ_N_WL_AQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[768])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1272};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[769] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_ipc_pxi, __pyx_mstate->__pyx_n_u_enter, __pyx_mstate->__pyx_kp_b_iso88591_A_q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[769])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1275};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_exc_type, __pyx_mstate->__pyx_n_u_exc_value, __pyx_mstate->__pyx_n_u_traceback};
    __pyx_mstate_global->__pyx_codeobj_tab[770] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_ipc_pxi, __pyx_mstate->__pyx_n_u_exit, __pyx_mstate->__pyx_kp_b_iso88591_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[770])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[771] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[771])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state};
    __pyx_mstate_global->__pyx_codeobj_tab[772] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[772])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1297};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_tensor, __pyx_mstate->__pyx_n_u_size};
    __pyx_mstate_global->__pyx_codeobj_tab[773] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_ipc_pxi, __pyx_mstate->__pyx_n_u_get_tensor_size, __pyx_mstate->__pyx_kp_b_iso88591_A_6_vQa_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[773])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1312};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_batch, __pyx_mstate->__pyx_n_u_size};
    __pyx_mstate_global->__pyx_codeobj_tab[774] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_ipc_pxi, __pyx_mstate->__pyx_n_u_get_record_batch_size, __pyx_mstate->__pyx_kp_b_iso88591_A_q_e9AQ_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[774])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1327};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_tensor, __pyx_mstate->__pyx_n_u_dest, __pyx_mstate->__pyx_n_u_metadata_length_2, __pyx_mstate->__pyx_n_u_body_length_2, __pyx_mstate->__pyx_n_u_handle};
    __pyx_mstate_global->__pyx_codeobj_tab[775] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_ipc_pxi, __pyx_mstate->__pyx_n_u_write_tensor, __pyx_mstate->__pyx_kp_b_iso88591_T_1_A_q_fF_A_1_2Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[775])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1368};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_source, __pyx_mstate->__pyx_n_u_sp_tensor, __pyx_mstate->__pyx_n_u_c_stream, __pyx_mstate->__pyx_n_u_nf};
    __pyx_mstate_global->__pyx_codeobj_tab[776] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_ipc_pxi, __pyx_mstate->__pyx_n_u_read_tensor, __pyx_mstate->__pyx_kp_b_iso88591_aq_r_D_N_Qa_aq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[776])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1394};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_source, __pyx_mstate->__pyx_n_u_result, __pyx_mstate->__pyx_n_u_c_stream, __pyx_mstate->__pyx_n_u_nf};
    __pyx_mstate_global->__pyx_codeobj_tab[777] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_ipc_pxi, __pyx_mstate->__pyx_n_u_read_message, __pyx_mstate->__pyx_kp_b_iso88591_q_r_D_k_Q_az1Fa_vYc_haq_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[777])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1423};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_obj, __pyx_mstate->__pyx_n_u_dictionary_memo, __pyx_mstate->__pyx_n_u_result, __pyx_mstate->__pyx_n_u_cpp_file, __pyx_mstate->__pyx_n_u_message, __pyx_mstate->__pyx_n_u_temp_memo, __pyx_mstate->__pyx_n_u_arg_dict_memo};
    __pyx_mstate_global->__pyx_codeobj_tab[778] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_ipc_pxi, __pyx_mstate->__pyx_n_u_read_schema, __pyx_mstate->__pyx_kp_b_iso88591_Q_wa_q_z_q_1Ja_gXT_a_5_q_1Jaxt4, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[778])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1463};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_obj, __pyx_mstate->__pyx_n_u_schema, __pyx_mstate->__pyx_n_u_dictionary_memo, __pyx_mstate->__pyx_n_u_result, __pyx_mstate->__pyx_n_u_message, __pyx_mstate->__pyx_n_u_temp_memo, __pyx_mstate->__pyx_n_u_arg_dict_memo};
    __pyx_mstate_global->__pyx_codeobj_tab[779] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_ipc_pxi, __pyx_mstate->__pyx_n_u_read_record_batch, __pyx_mstate->__pyx_kp_b_iso88591_z_q_aq_wa_q_q_1F_Q_4A_Qa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[779])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 19};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_obj};
    __pyx_mstate_global->__pyx_codeobj_tab[780] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyarrow_benchmark_pxi, __pyx_mstate->__pyx_n_u_benchmark_PandasObjectIsNull, __pyx_mstate->__pyx_kp_b_iso88591__41, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[780])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pyx_type, __pyx_mstate->__pyx_n_u_pyx_checksum, __pyx_mstate->__pyx_n_u_pyx_state, __pyx_mstate->__pyx_n_u_pyx_result};
    __pyx_mstate_global->__pyx_codeobj_tab[781] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_pyx_unpickle__PandasAPIShim, __pyx_mstate->__pyx_kp_b_iso88591_q_0_kQR_7_0_1B_PQ_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[781])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pyx_type, __pyx_mstate->__pyx_n_u_pyx_checksum, __pyx_mstate->__pyx_n_u_pyx_state, __pyx_mstate->__pyx_n_u_pyx_result};
    __pyx_mstate_global->__pyx_codeobj_tab[782] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_pyx_unpickle__PandasConvertibl, __pyx_mstate->__pyx_kp_b_iso88591_q_0_kQR_XQa_7_4A5J_XY_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[782])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pyx_type, __pyx_mstate->__pyx_n_u_pyx_checksum, __pyx_mstate->__pyx_n_u_pyx_state, __pyx_mstate->__pyx_n_u_pyx_result};
    __pyx_mstate_global->__pyx_codeobj_tab[783] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_pyx_unpickle__Tabular, __pyx_mstate->__pyx_kp_b_iso88591_q_0_kQR_881A_7_nA_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[783])) goto bad;
  }
  Py_DECREF(tuple_dedup_map);
  return 0;
  bad:
  Py_DECREF(tuple_dedup_map);
  return -1;
}
/* #### Code section: init_globals ### */

static int __Pyx_InitGlobals(void) {
  /* PythonCompatibility.init */
  if (likely(__Pyx_init_co_variables() == 0)); else
  
  if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)

  /* AssertionsEnabled.init */
  if (likely(__Pyx_init_assertions_enabled() == 0)); else
  
  if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)

  /* CommonTypesMetaclass.init */
  if (likely(__pyx_CommonTypesMetaclass_init(__pyx_m) == 0)); else
  
  if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)

  /* CachedMethodType.init */
  #if CYTHON_COMPILING_IN_LIMITED_API
  {
      PyObject *typesModule=NULL;
      typesModule = PyImport_ImportModule("types");
      if (typesModule) {
          __pyx_mstate_global->__Pyx_CachedMethodType = PyObject_GetAttrString(typesModule, "MethodType");
          Py_DECREF(typesModule);
      }
  } // error handling follows
  #endif
  
  if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)

  /* CythonFunctionShared.init */
  if (likely(__pyx_CyFunction_init(__pyx_m) == 0)); else
  
  if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)

  /* Generator.init */
  if (likely(__pyx_Generator_init(__pyx_m) == 0)); else
  
  if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)

  return 0;
  __pyx_L1_error:;
  return -1;
}
/* #### Code section: cleanup_globals ### */
/* #### Code section: cleanup_module ### */
/* #### Code section: main_method ### */
/* #### Code section: utility_code_pragmas ### */
#ifdef _MSC_VER
#pragma warning( push )
/* Warning 4127: conditional expression is constant
 * Cython uses constant conditional expressions to allow in inline functions to be optimized at
 * compile-time, so this warning is not useful
 */
#pragma warning( disable : 4127 )
#endif



/* #### Code section: utility_code_def ### */

/* --- 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

/* PyErrExceptionMatches (used by PyObjectGetAttrStrNoError) */
#if CYTHON_FAST_THREAD_STATE
static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
    Py_ssize_t i, n;
    n = PyTuple_GET_SIZE(tuple);
    for (i=0; i<n; i++) {
        if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
    }
    for (i=0; i<n; i++) {
        if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1;
    }
    return 0;
}
static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
    int result;
    PyObject *exc_type;
#if PY_VERSION_HEX >= 0x030C00A6
    PyObject *current_exception = tstate->current_exception;
    if (unlikely(!current_exception)) return 0;
    exc_type = (PyObject*) Py_TYPE(current_exception);
    if (exc_type == err) return 1;
#else
    exc_type = tstate->curexc_type;
    if (exc_type == err) return 1;
    if (unlikely(!exc_type)) return 0;
#endif
    #if CYTHON_AVOID_BORROWED_REFS
    Py_INCREF(exc_type);
    #endif
    if (unlikely(PyTuple_Check(err))) {
        result = __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
    } else {
        result = __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
    }
    #if CYTHON_AVOID_BORROWED_REFS
    Py_DECREF(exc_type);
    #endif
    return result;
}
#endif

/* PyErrFetchRestore (used by PyObjectGetAttrStrNoError) */
#if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
#if PY_VERSION_HEX >= 0x030C00A6
    PyObject *tmp_value;
    assert(type == NULL || (value != NULL && type == (PyObject*) Py_TYPE(value)));
    if (value) {
        #if CYTHON_COMPILING_IN_CPYTHON
        if (unlikely(((PyBaseExceptionObject*) value)->traceback != tb))
        #endif
            PyException_SetTraceback(value, tb);
    }
    tmp_value = tstate->current_exception;
    tstate->current_exception = value;
    Py_XDECREF(tmp_value);
    Py_XDECREF(type);
    Py_XDECREF(tb);
#else
    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);
#endif
}
static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
#if PY_VERSION_HEX >= 0x030C00A6
    PyObject* exc_value;
    exc_value = tstate->current_exception;
    tstate->current_exception = 0;
    *value = exc_value;
    *type = NULL;
    *tb = NULL;
    if (exc_value) {
        *type = (PyObject*) Py_TYPE(exc_value);
        Py_INCREF(*type);
        #if CYTHON_COMPILING_IN_CPYTHON
        *tb = ((PyBaseExceptionObject*) exc_value)->traceback;
        Py_XINCREF(*tb);
        #else
        *tb = PyException_GetTraceback(exc_value);
        #endif
    }
#else
    *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
}
#endif

/* PyObjectGetAttrStr (used by PyObjectGetAttrStrNoError) */
#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);
    return PyObject_GetAttr(obj, attr_name);
}
#endif

/* PyObjectGetAttrStrNoError (used by GetBuiltinName) */
#if __PYX_LIMITED_VERSION_HEX < 0x030d0000
static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
        __Pyx_PyErr_Clear();
}
#endif
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) {
    PyObject *result;
#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
    (void) PyObject_GetOptionalAttr(obj, attr_name, &result);
    return result;
#else
#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) {
        return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1);
    }
#endif
    result = __Pyx_PyObject_GetAttrStr(obj, attr_name);
    if (unlikely(!result)) {
        __Pyx_PyObject_GetAttrStr_ClearAttributeError();
    }
    return result;
#endif
}

/* GetBuiltinName */
static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
    PyObject* result = __Pyx_PyObject_GetAttrStrNoError(__pyx_mstate_global->__pyx_b, name);
    if (unlikely(!result) && !PyErr_Occurred()) {
        PyErr_Format(PyExc_NameError,
            "name '%U' is not defined", name);
    }
    return result;
}

/* PyDictVersioning (used by GetModuleGlobalName) */
#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_COMPILING_IN_LIMITED_API
    if (unlikely(!__pyx_m)) {
        if (!PyErr_Occurred())
            PyErr_SetNone(PyExc_NameError);
        return NULL;
    }
    result = PyObject_GetAttr(__pyx_m, name);
    if (likely(result)) {
        return result;
    }
    PyErr_Clear();
#elif CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
    if (unlikely(__Pyx_PyDict_GetItemRef(__pyx_mstate_global->__pyx_d, name, &result) == -1)) PyErr_Clear();
    __PYX_UPDATE_DICT_CACHE(__pyx_mstate_global->__pyx_d, result, *dict_cached_value, *dict_version)
    if (likely(result)) {
        return result;
    }
#else
    result = _PyDict_GetItem_KnownHash(__pyx_mstate_global->__pyx_d, name, ((PyASCIIObject *) name)->hash);
    __PYX_UPDATE_DICT_CACHE(__pyx_mstate_global->__pyx_d, result, *dict_cached_value, *dict_version)
    if (likely(result)) {
        return __Pyx_NewRef(result);
    }
    PyErr_Clear();
#endif
    return __Pyx_GetBuiltinName(name);
}

/* PyObjectCall (used by PyObjectFastCall) */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
    PyObject *result;
    ternaryfunc call = Py_TYPE(func)->tp_call;
    if (unlikely(!call))
        return PyObject_Call(func, arg, kw);
    if (unlikely(Py_EnterRecursiveCall(" 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 (used by PyObjectFastCall) */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
    PyObject *self, *result;
    PyCFunction cfunc;
    cfunc = __Pyx_CyOrPyCFunction_GET_FUNCTION(func);
    self = __Pyx_CyOrPyCFunction_GET_SELF(func);
    if (unlikely(Py_EnterRecursiveCall(" 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

/* PyObjectFastCall */
#if PY_VERSION_HEX < 0x03090000 || CYTHON_COMPILING_IN_LIMITED_API
static PyObject* __Pyx_PyObject_FastCall_fallback(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs) {
    PyObject *argstuple;
    PyObject *result = 0;
    size_t i;
    argstuple = PyTuple_New((Py_ssize_t)nargs);
    if (unlikely(!argstuple)) return NULL;
    for (i = 0; i < nargs; i++) {
        Py_INCREF(args[i]);
        if (__Pyx_PyTuple_SET_ITEM(argstuple, (Py_ssize_t)i, args[i]) != (0)) goto bad;
    }
    result = __Pyx_PyObject_Call(func, argstuple, kwargs);
  bad:
    Py_DECREF(argstuple);
    return result;
}
#endif
#if CYTHON_VECTORCALL && !CYTHON_COMPILING_IN_LIMITED_API
  #if PY_VERSION_HEX < 0x03090000
    #define __Pyx_PyVectorcall_Function(callable) _PyVectorcall_Function(callable)
  #elif CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE vectorcallfunc __Pyx_PyVectorcall_Function(PyObject *callable) {
    PyTypeObject *tp = Py_TYPE(callable);
    #if defined(__Pyx_CyFunction_USED)
    if (__Pyx_CyFunction_CheckExact(callable)) {
        return __Pyx_CyFunction_func_vectorcall(callable);
    }
    #endif
    if (!PyType_HasFeature(tp, Py_TPFLAGS_HAVE_VECTORCALL)) {
        return NULL;
    }
    assert(PyCallable_Check(callable));
    Py_ssize_t offset = tp->tp_vectorcall_offset;
    assert(offset > 0);
    vectorcallfunc ptr;
    memcpy(&ptr, (char *) callable + offset, sizeof(ptr));
    return ptr;
}
  #else
    #define __Pyx_PyVectorcall_Function(callable) PyVectorcall_Function(callable)
  #endif
#endif
static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject *const *args, size_t _nargs, PyObject *kwargs) {
    Py_ssize_t nargs = __Pyx_PyVectorcall_NARGS(_nargs);
#if CYTHON_COMPILING_IN_CPYTHON
    if (nargs == 0 && kwargs == NULL) {
        if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_NOARGS))
            return __Pyx_PyObject_CallMethO(func, NULL);
    }
    else if (nargs == 1 && kwargs == NULL) {
        if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_O))
            return __Pyx_PyObject_CallMethO(func, args[0]);
    }
#endif
    if (kwargs == NULL) {
        #if CYTHON_VECTORCALL
          #if CYTHON_COMPILING_IN_LIMITED_API
            return PyObject_Vectorcall(func, args, _nargs, NULL);
          #else
            vectorcallfunc f = __Pyx_PyVectorcall_Function(func);
            if (f) {
                return f(func, args, _nargs, NULL);
            }
          #endif
        #endif
    }
    if (nargs == 0) {
        return __Pyx_PyObject_Call(func, __pyx_mstate_global->__pyx_empty_tuple, kwargs);
    }
    #if PY_VERSION_HEX >= 0x03090000 && !CYTHON_COMPILING_IN_LIMITED_API
    return PyObject_VectorcallDict(func, args, (size_t)nargs, kwargs);
    #else
    return __Pyx_PyObject_FastCall_fallback(func, args, (size_t)nargs, kwargs);
    #endif
}

/* ExtTypeTest */
static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
    __Pyx_TypeName obj_type_name;
    __Pyx_TypeName type_name;
    if (unlikely(!type)) {
        PyErr_SetString(PyExc_SystemError, "Missing type object");
        return 0;
    }
    if (likely(__Pyx_TypeCheck(obj, type)))
        return 1;
    obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj));
    type_name = __Pyx_PyType_GetFullyQualifiedName(type);
    PyErr_Format(PyExc_TypeError,
                 "Cannot convert " __Pyx_FMT_TYPENAME " to " __Pyx_FMT_TYPENAME,
                 obj_type_name, type_name);
    __Pyx_DECREF_TypeName(obj_type_name);
    __Pyx_DECREF_TypeName(type_name);
    return 0;
}

/* TupleAndListFromArray (used by fastcall) */
#if !CYTHON_COMPILING_IN_CPYTHON && CYTHON_METH_FASTCALL
static CYTHON_INLINE PyObject *
__Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n)
{
    PyObject *res;
    Py_ssize_t i;
    if (n <= 0) {
        return __Pyx_NewRef(__pyx_mstate_global->__pyx_empty_tuple);
    }
    res = PyTuple_New(n);
    if (unlikely(res == NULL)) return NULL;
    for (i = 0; i < n; i++) {
        if (unlikely(__Pyx_PyTuple_SET_ITEM(res, i, src[i]) < (0))) {
            Py_DECREF(res);
            return NULL;
        }
        Py_INCREF(src[i]);
    }
    return res;
}
#elif CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE void __Pyx_copy_object_array(PyObject *const *CYTHON_RESTRICT src, PyObject** CYTHON_RESTRICT dest, Py_ssize_t length) {
    PyObject *v;
    Py_ssize_t i;
    for (i = 0; i < length; i++) {
        v = dest[i] = src[i];
        Py_INCREF(v);
    }
}
static CYTHON_INLINE PyObject *
__Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n)
{
    PyObject *res;
    if (n <= 0) {
        return __Pyx_NewRef(__pyx_mstate_global->__pyx_empty_tuple);
    }
    res = PyTuple_New(n);
    if (unlikely(res == NULL)) return NULL;
    __Pyx_copy_object_array(src, ((PyTupleObject*)res)->ob_item, n);
    return res;
}
static CYTHON_INLINE PyObject *
__Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n)
{
    PyObject *res;
    if (n <= 0) {
        return PyList_New(0);
    }
    res = PyList_New(n);
    if (unlikely(res == NULL)) return NULL;
    __Pyx_copy_object_array(src, ((PyListObject*)res)->ob_item, n);
    return res;
}
#endif

/* BytesEquals (used by UnicodeEquals) */
static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_GRAAL ||\
        !(CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS)
    return PyObject_RichCompareBool(s1, s2, equals);
#else
    if (s1 == s2) {
        return (equals == Py_EQ);
    } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
        const char *ps1, *ps2;
        Py_ssize_t length = PyBytes_GET_SIZE(s1);
        if (length != PyBytes_GET_SIZE(s2))
            return (equals == Py_NE);
        ps1 = PyBytes_AS_STRING(s1);
        ps2 = PyBytes_AS_STRING(s2);
        if (ps1[0] != ps2[0]) {
            return (equals == Py_NE);
        } else if (length == 1) {
            return (equals == Py_EQ);
        } else {
            int result;
#if CYTHON_USE_UNICODE_INTERNALS && (PY_VERSION_HEX < 0x030B0000)
            Py_hash_t hash1, hash2;
            hash1 = ((PyBytesObject*)s1)->ob_shash;
            hash2 = ((PyBytesObject*)s2)->ob_shash;
            if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
                return (equals == Py_NE);
            }
#endif
            result = memcmp(ps1, ps2, (size_t)length);
            return (equals == Py_EQ) ? (result == 0) : (result != 0);
        }
    } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
        return (equals == Py_NE);
    } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {
        return (equals == Py_NE);
    } else {
        int result;
        PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
        if (!py_result)
            return -1;
        result = __Pyx_PyObject_IsTrue(py_result);
        Py_DECREF(py_result);
        return result;
    }
#endif
}

/* UnicodeEquals (used by fastcall) */
static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_GRAAL
    return PyObject_RichCompareBool(s1, s2, equals);
#else
    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 (s1_is_unicode & s2_is_unicode) {
        Py_ssize_t length, length2;
        int kind;
        void *data1, *data2;
        #if !CYTHON_COMPILING_IN_LIMITED_API
        if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0))
            return -1;
        #endif
        length = __Pyx_PyUnicode_GET_LENGTH(s1);
        #if !CYTHON_ASSUME_SAFE_SIZE
        if (unlikely(length < 0)) return -1;
        #endif
        length2 = __Pyx_PyUnicode_GET_LENGTH(s2);
        #if !CYTHON_ASSUME_SAFE_SIZE
        if (unlikely(length2 < 0)) return -1;
        #endif
        if (length != length2) {
            goto return_ne;
        }
#if CYTHON_USE_UNICODE_INTERNALS
        {
            Py_hash_t hash1, hash2;
            hash1 = ((PyASCIIObject*)s1)->hash;
            hash2 = ((PyASCIIObject*)s2)->hash;
            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));
            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_result)
            return -1;
        result = __Pyx_PyObject_IsTrue(py_result);
        Py_DECREF(py_result);
        return result;
    }
return_eq:
    return (equals == Py_EQ);
return_ne:
    return (equals == Py_NE);
#endif
}

/* fastcall */
#if CYTHON_METH_FASTCALL
static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s)
{
    Py_ssize_t i, n = __Pyx_PyTuple_GET_SIZE(kwnames);
    #if !CYTHON_ASSUME_SAFE_SIZE
    if (unlikely(n == -1)) return NULL;
    #endif
    for (i = 0; i < n; i++)
    {
        PyObject *namei = __Pyx_PyTuple_GET_ITEM(kwnames, i);
        #if !CYTHON_ASSUME_SAFE_MACROS
        if (unlikely(!namei)) return NULL;
        #endif
        if (s == namei) return kwvalues[i];
    }
    for (i = 0; i < n; i++)
    {
        PyObject *namei = __Pyx_PyTuple_GET_ITEM(kwnames, i);
        #if !CYTHON_ASSUME_SAFE_MACROS
        if (unlikely(!namei)) return NULL;
        #endif
        int eq = __Pyx_PyUnicode_Equals(s, namei, Py_EQ);
        if (unlikely(eq != 0)) {
            if (unlikely(eq < 0)) return NULL;
            return kwvalues[i];
        }
    }
    return NULL;
}
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API
CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues) {
    Py_ssize_t i, nkwargs;
    PyObject *dict;
#if !CYTHON_ASSUME_SAFE_SIZE
    nkwargs = PyTuple_Size(kwnames);
    if (unlikely(nkwargs < 0)) return NULL;
#else
    nkwargs = PyTuple_GET_SIZE(kwnames);
#endif
    dict = PyDict_New();
    if (unlikely(!dict))
        return NULL;
    for (i=0; i<nkwargs; i++) {
#if !CYTHON_ASSUME_SAFE_MACROS
        PyObject *key = PyTuple_GetItem(kwnames, i);
        if (!key) goto bad;
#else
        PyObject *key = PyTuple_GET_ITEM(kwnames, i);
#endif
        if (unlikely(PyDict_SetItem(dict, key, kwvalues[i]) < 0))
            goto bad;
    }
    return dict;
bad:
    Py_DECREF(dict);
    return NULL;
}
#endif
#endif

/* PyObjectCallOneArg (used by CallUnboundCMethod0) */
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
    PyObject *args[2] = {NULL, arg};
    return __Pyx_PyObject_FastCall(func, args+1, 1 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
}

/* UnpackUnboundCMethod (used by CallUnboundCMethod0) */
#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030C0000
static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject *args, PyObject *kwargs) {
    PyObject *result;
    PyObject *selfless_args = PyTuple_GetSlice(args, 1, PyTuple_Size(args));
    if (unlikely(!selfless_args)) return NULL;
    result = PyObject_Call(method, selfless_args, kwargs);
    Py_DECREF(selfless_args);
    return result;
}
#elif CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03090000
static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject **args, Py_ssize_t nargs, PyObject *kwnames) {
        return _PyObject_Vectorcall
            (method, args ? args+1 : NULL, nargs ? nargs-1 : 0, kwnames);
}
#else
static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) {
    return
#if PY_VERSION_HEX < 0x03090000
    _PyObject_Vectorcall
#else
    PyObject_Vectorcall
#endif
        (method, args ? args+1 : NULL, nargs ? (size_t) nargs-1 : 0, kwnames);
}
#endif
static PyMethodDef __Pyx_UnboundCMethod_Def = {
     "CythonUnboundCMethod",
     __PYX_REINTERPRET_FUNCION(PyCFunction, __Pyx_SelflessCall),
#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030C0000
     METH_VARARGS | METH_KEYWORDS,
#else
     METH_FASTCALL | METH_KEYWORDS,
#endif
     NULL
};
static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target) {
    PyObject *method, *result=NULL;
    method = __Pyx_PyObject_GetAttrStr(target->type, *target->method_name);
    if (unlikely(!method))
        return -1;
    result = method;
#if CYTHON_COMPILING_IN_CPYTHON
    if (likely(__Pyx_TypeCheck(method, &PyMethodDescr_Type)))
    {
        PyMethodDescrObject *descr = (PyMethodDescrObject*) method;
        target->func = descr->d_method->ml_meth;
        target->flag = descr->d_method->ml_flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_STACKLESS);
    } else
#endif
#if CYTHON_COMPILING_IN_PYPY
#else
    if (PyCFunction_Check(method))
#endif
    {
        PyObject *self;
        int self_found;
#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY
        self = PyObject_GetAttrString(method, "__self__");
        if (!self) {
            PyErr_Clear();
        }
#else
        self = PyCFunction_GET_SELF(method);
#endif
        self_found = (self && self != Py_None);
#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY
        Py_XDECREF(self);
#endif
        if (self_found) {
            PyObject *unbound_method = PyCFunction_New(&__Pyx_UnboundCMethod_Def, method);
            if (unlikely(!unbound_method)) return -1;
            Py_DECREF(method);
            result = unbound_method;
        }
    }
#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    if (unlikely(target->method)) {
        Py_DECREF(result);
    } else
#endif
    target->method = result;
    return 0;
}

/* CallUnboundCMethod0 */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) {
    int was_initialized = __Pyx_CachedCFunction_GetAndSetInitializing(cfunc);
    if (likely(was_initialized == 2 && cfunc->func)) {
        if (likely(cfunc->flag == METH_NOARGS))
            return __Pyx_CallCFunction(cfunc, self, NULL);
        if (likely(cfunc->flag == METH_FASTCALL))
            return __Pyx_CallCFunctionFast(cfunc, self, NULL, 0);
        if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS))
            return __Pyx_CallCFunctionFastWithKeywords(cfunc, self, NULL, 0, NULL);
        if (likely(cfunc->flag == (METH_VARARGS | METH_KEYWORDS)))
            return __Pyx_CallCFunctionWithKeywords(cfunc, self, __pyx_mstate_global->__pyx_empty_tuple, NULL);
        if (cfunc->flag == METH_VARARGS)
            return __Pyx_CallCFunction(cfunc, self, __pyx_mstate_global->__pyx_empty_tuple);
        return __Pyx__CallUnboundCMethod0(cfunc, self);
    }
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    else if (unlikely(was_initialized == 1)) {
        __Pyx_CachedCFunction tmp_cfunc = {
#ifndef __cplusplus
            0
#endif
        };
        tmp_cfunc.type = cfunc->type;
        tmp_cfunc.method_name = cfunc->method_name;
        return __Pyx__CallUnboundCMethod0(&tmp_cfunc, self);
    }
#endif
    PyObject *result = __Pyx__CallUnboundCMethod0(cfunc, self);
    __Pyx_CachedCFunction_SetFinishedInitializing(cfunc);
    return result;
}
#endif
static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) {
    PyObject *result;
    if (unlikely(!cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
    result = __Pyx_PyObject_CallOneArg(cfunc->method, self);
    return result;
}

/* py_dict_items (used by OwnedDictNext) */
static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d) {
    return __Pyx_CallUnboundCMethod0(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_items, d);
}

/* py_dict_values (used by OwnedDictNext) */
static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d) {
    return __Pyx_CallUnboundCMethod0(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_values, d);
}

/* OwnedDictNext (used by ParseKeywordsImpl) */
#if CYTHON_AVOID_BORROWED_REFS
static int __Pyx_PyDict_NextRef(PyObject *p, PyObject **ppos, PyObject **pkey, PyObject **pvalue) {
    PyObject *next = NULL;
    if (!*ppos) {
        if (pvalue) {
            PyObject *dictview = pkey ? __Pyx_PyDict_Items(p) : __Pyx_PyDict_Values(p);
            if (unlikely(!dictview)) goto bad;
            *ppos = PyObject_GetIter(dictview);
            Py_DECREF(dictview);
        } else {
            *ppos = PyObject_GetIter(p);
        }
        if (unlikely(!*ppos)) goto bad;
    }
    next = PyIter_Next(*ppos);
    if (!next) {
        if (PyErr_Occurred()) goto bad;
        return 0;
    }
    if (pkey && pvalue) {
        *pkey = __Pyx_PySequence_ITEM(next, 0);
        if (unlikely(*pkey)) goto bad;
        *pvalue = __Pyx_PySequence_ITEM(next, 1);
        if (unlikely(*pvalue)) goto bad;
        Py_DECREF(next);
    } else if (pkey) {
        *pkey = next;
    } else {
        assert(pvalue);
        *pvalue = next;
    }
    return 1;
  bad:
    Py_XDECREF(next);
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d0000
    PyErr_FormatUnraisable("Exception ignored in __Pyx_PyDict_NextRef");
#else
    PyErr_WriteUnraisable(__pyx_mstate_global->__pyx_n_u_Pyx_PyDict_NextRef);
#endif
    if (pkey) *pkey = NULL;
    if (pvalue) *pvalue = NULL;
    return 0;
}
#else // !CYTHON_AVOID_BORROWED_REFS
static int __Pyx_PyDict_NextRef(PyObject *p, Py_ssize_t *ppos, PyObject **pkey, PyObject **pvalue) {
    int result = PyDict_Next(p, ppos, pkey, pvalue);
    if (likely(result == 1)) {
        if (pkey) Py_INCREF(*pkey);
        if (pvalue) Py_INCREF(*pvalue);
    }
    return result;
}
#endif

/* RaiseDoubleKeywords (used by ParseKeywordsImpl) */
static void __Pyx_RaiseDoubleKeywordsError(
    const char* func_name,
    PyObject* kw_name)
{
    PyErr_Format(PyExc_TypeError,
        "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
}

/* CallUnboundCMethod2 */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2) {
    int was_initialized = __Pyx_CachedCFunction_GetAndSetInitializing(cfunc);
    if (likely(was_initialized == 2 && cfunc->func)) {
        PyObject *args[2] = {arg1, arg2};
        if (cfunc->flag == METH_FASTCALL) {
            return __Pyx_CallCFunctionFast(cfunc, self, args, 2);
        }
        if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS))
            return __Pyx_CallCFunctionFastWithKeywords(cfunc, self, args, 2, NULL);
    }
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    else if (unlikely(was_initialized == 1)) {
        __Pyx_CachedCFunction tmp_cfunc = {
#ifndef __cplusplus
            0
#endif
        };
        tmp_cfunc.type = cfunc->type;
        tmp_cfunc.method_name = cfunc->method_name;
        return __Pyx__CallUnboundCMethod2(&tmp_cfunc, self, arg1, arg2);
    }
#endif
    PyObject *result = __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2);
    __Pyx_CachedCFunction_SetFinishedInitializing(cfunc);
    return result;
}
#endif
static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2){
    if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
#if CYTHON_COMPILING_IN_CPYTHON
    if (cfunc->func && (cfunc->flag & METH_VARARGS)) {
        PyObject *result = NULL;
        PyObject *args = PyTuple_New(2);
        if (unlikely(!args)) return NULL;
        Py_INCREF(arg1);
        PyTuple_SET_ITEM(args, 0, arg1);
        Py_INCREF(arg2);
        PyTuple_SET_ITEM(args, 1, arg2);
        if (cfunc->flag & METH_KEYWORDS)
            result = __Pyx_CallCFunctionWithKeywords(cfunc, self, args, NULL);
        else
            result = __Pyx_CallCFunction(cfunc, self, args);
        Py_DECREF(args);
        return result;
    }
#endif
    {
        PyObject *args[4] = {NULL, self, arg1, arg2};
        return __Pyx_PyObject_FastCall(cfunc->method, args+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
    }
}

/* ParseKeywordsImpl (used by ParseKeywords) */
static int __Pyx_ValidateDuplicatePosArgs(
    PyObject *kwds,
    PyObject ** const argnames[],
    PyObject ** const *first_kw_arg,
    const char* function_name)
{
    PyObject ** const *name = argnames;
    while (name != first_kw_arg) {
        PyObject *key = **name;
        int found = PyDict_Contains(kwds, key);
        if (unlikely(found)) {
            if (found == 1) __Pyx_RaiseDoubleKeywordsError(function_name, key);
            goto bad;
        }
        name++;
    }
    return 0;
bad:
    return -1;
}
#if CYTHON_USE_UNICODE_INTERNALS
static CYTHON_INLINE int __Pyx_UnicodeKeywordsEqual(PyObject *s1, PyObject *s2) {
    int kind;
    Py_ssize_t len = PyUnicode_GET_LENGTH(s1);
    if (len != PyUnicode_GET_LENGTH(s2)) return 0;
    kind = PyUnicode_KIND(s1);
    if (kind != PyUnicode_KIND(s2)) return 0;
    const void *data1 = PyUnicode_DATA(s1);
    const void *data2 = PyUnicode_DATA(s2);
    return (memcmp(data1, data2, (size_t) len * (size_t) kind) == 0);
}
#endif
static int __Pyx_MatchKeywordArg_str(
    PyObject *key,
    PyObject ** const argnames[],
    PyObject ** const *first_kw_arg,
    size_t *index_found,
    const char *function_name)
{
    PyObject ** const *name;
    #if CYTHON_USE_UNICODE_INTERNALS
    Py_hash_t key_hash = ((PyASCIIObject*)key)->hash;
    if (unlikely(key_hash == -1)) {
        key_hash = PyObject_Hash(key);
        if (unlikely(key_hash == -1))
            goto bad;
    }
    #endif
    name = first_kw_arg;
    while (*name) {
        PyObject *name_str = **name;
        #if CYTHON_USE_UNICODE_INTERNALS
        if (key_hash == ((PyASCIIObject*)name_str)->hash && __Pyx_UnicodeKeywordsEqual(name_str, key)) {
            *index_found = (size_t) (name - argnames);
            return 1;
        }
        #else
        #if CYTHON_ASSUME_SAFE_SIZE
        if (PyUnicode_GET_LENGTH(name_str) == PyUnicode_GET_LENGTH(key))
        #endif
        {
            int cmp = PyUnicode_Compare(name_str, key);
            if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
            if (cmp == 0) {
                *index_found = (size_t) (name - argnames);
                return 1;
            }
        }
        #endif
        name++;
    }
    name = argnames;
    while (name != first_kw_arg) {
        PyObject *name_str = **name;
        #if CYTHON_USE_UNICODE_INTERNALS
        if (unlikely(key_hash == ((PyASCIIObject*)name_str)->hash)) {
            if (__Pyx_UnicodeKeywordsEqual(name_str, key))
                goto arg_passed_twice;
        }
        #else
        #if CYTHON_ASSUME_SAFE_SIZE
        if (PyUnicode_GET_LENGTH(name_str) == PyUnicode_GET_LENGTH(key))
        #endif
        {
            if (unlikely(name_str == key)) goto arg_passed_twice;
            int cmp = PyUnicode_Compare(name_str, key);
            if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
            if (cmp == 0) goto arg_passed_twice;
        }
        #endif
        name++;
    }
    return 0;
arg_passed_twice:
    __Pyx_RaiseDoubleKeywordsError(function_name, key);
    goto bad;
bad:
    return -1;
}
static int __Pyx_MatchKeywordArg_nostr(
    PyObject *key,
    PyObject ** const argnames[],
    PyObject ** const *first_kw_arg,
    size_t *index_found,
    const char *function_name)
{
    PyObject ** const *name;
    if (unlikely(!PyUnicode_Check(key))) goto invalid_keyword_type;
    name = first_kw_arg;
    while (*name) {
        int cmp = PyObject_RichCompareBool(**name, key, Py_EQ);
        if (cmp == 1) {
            *index_found = (size_t) (name - argnames);
            return 1;
        }
        if (unlikely(cmp == -1)) goto bad;
        name++;
    }
    name = argnames;
    while (name != first_kw_arg) {
        int cmp = PyObject_RichCompareBool(**name, key, Py_EQ);
        if (unlikely(cmp != 0)) {
            if (cmp == 1) goto arg_passed_twice;
            else goto bad;
        }
        name++;
    }
    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;
bad:
    return -1;
}
static CYTHON_INLINE int __Pyx_MatchKeywordArg(
    PyObject *key,
    PyObject ** const argnames[],
    PyObject ** const *first_kw_arg,
    size_t *index_found,
    const char *function_name)
{
    return likely(PyUnicode_CheckExact(key)) ?
        __Pyx_MatchKeywordArg_str(key, argnames, first_kw_arg, index_found, function_name) :
        __Pyx_MatchKeywordArg_nostr(key, argnames, first_kw_arg, index_found, function_name);
}
static void __Pyx_RejectUnknownKeyword(
    PyObject *kwds,
    PyObject ** const argnames[],
    PyObject ** const *first_kw_arg,
    const char *function_name)
{
    #if CYTHON_AVOID_BORROWED_REFS
    PyObject *pos = NULL;
    #else
    Py_ssize_t pos = 0;
    #endif
    PyObject *key = NULL;
    __Pyx_BEGIN_CRITICAL_SECTION(kwds);
    while (
        #if CYTHON_AVOID_BORROWED_REFS
        __Pyx_PyDict_NextRef(kwds, &pos, &key, NULL)
        #else
        PyDict_Next(kwds, &pos, &key, NULL)
        #endif
    ) {
        PyObject** const *name = first_kw_arg;
        while (*name && (**name != key)) name++;
        if (!*name) {
            size_t index_found = 0;
            int cmp = __Pyx_MatchKeywordArg(key, argnames, first_kw_arg, &index_found, function_name);
            if (cmp != 1) {
                if (cmp == 0) {
                    PyErr_Format(PyExc_TypeError,
                        "%s() got an unexpected keyword argument '%U'",
                        function_name, key);
                }
                #if CYTHON_AVOID_BORROWED_REFS
                Py_DECREF(key);
                #endif
                break;
            }
        }
        #if CYTHON_AVOID_BORROWED_REFS
        Py_DECREF(key);
        #endif
    }
    __Pyx_END_CRITICAL_SECTION();
    #if CYTHON_AVOID_BORROWED_REFS
    Py_XDECREF(pos);
    #endif
    assert(PyErr_Occurred());
}
static int __Pyx_ParseKeywordDict(
    PyObject *kwds,
    PyObject ** const argnames[],
    PyObject *values[],
    Py_ssize_t num_pos_args,
    Py_ssize_t num_kwargs,
    const char* function_name,
    int ignore_unknown_kwargs)
{
    PyObject** const *name;
    PyObject** const *first_kw_arg = argnames + num_pos_args;
    Py_ssize_t extracted = 0;
#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments)
    if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return -1;
#endif
    name = first_kw_arg;
    while (*name && num_kwargs > extracted) {
        PyObject * key = **name;
        PyObject *value;
        int found = 0;
        #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
        found = PyDict_GetItemRef(kwds, key, &value);
        #else
        value = PyDict_GetItemWithError(kwds, key);
        if (value) {
            Py_INCREF(value);
            found = 1;
        } else {
            if (unlikely(PyErr_Occurred())) goto bad;
        }
        #endif
        if (found) {
            if (unlikely(found < 0)) goto bad;
            values[name-argnames] = value;
            extracted++;
        }
        name++;
    }
    if (num_kwargs > extracted) {
        if (ignore_unknown_kwargs) {
            if (unlikely(__Pyx_ValidateDuplicatePosArgs(kwds, argnames, first_kw_arg, function_name) == -1))
                goto bad;
        } else {
            __Pyx_RejectUnknownKeyword(kwds, argnames, first_kw_arg, function_name);
            goto bad;
        }
    }
    return 0;
bad:
    return -1;
}
static int __Pyx_ParseKeywordDictToDict(
    PyObject *kwds,
    PyObject ** const argnames[],
    PyObject *kwds2,
    PyObject *values[],
    Py_ssize_t num_pos_args,
    const char* function_name)
{
    PyObject** const *name;
    PyObject** const *first_kw_arg = argnames + num_pos_args;
    Py_ssize_t len;
#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments)
    if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return -1;
#endif
    if (PyDict_Update(kwds2, kwds) < 0) goto bad;
    name = first_kw_arg;
    while (*name) {
        PyObject *key = **name;
        PyObject *value;
#if !CYTHON_COMPILING_IN_LIMITED_API && (PY_VERSION_HEX >= 0x030d00A2 || defined(PyDict_Pop))
        int found = PyDict_Pop(kwds2, key, &value);
        if (found) {
            if (unlikely(found < 0)) goto bad;
            values[name-argnames] = value;
        }
#elif __PYX_LIMITED_VERSION_HEX >= 0x030d0000
        int found = PyDict_GetItemRef(kwds2, key, &value);
        if (found) {
            if (unlikely(found < 0)) goto bad;
            values[name-argnames] = value;
            if (unlikely(PyDict_DelItem(kwds2, key) < 0)) goto bad;
        }
#else
    #if CYTHON_COMPILING_IN_CPYTHON
        value = _PyDict_Pop(kwds2, key, kwds2);
    #else
        value = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_pop, kwds2, key, kwds2);
    #endif
        if (value == kwds2) {
            Py_DECREF(value);
        } else {
            if (unlikely(!value)) goto bad;
            values[name-argnames] = value;
        }
#endif
        name++;
    }
    len = PyDict_Size(kwds2);
    if (len > 0) {
        return __Pyx_ValidateDuplicatePosArgs(kwds, argnames, first_kw_arg, function_name);
    } else if (unlikely(len == -1)) {
        goto bad;
    }
    return 0;
bad:
    return -1;
}
static int __Pyx_ParseKeywordsTuple(
    PyObject *kwds,
    PyObject * const *kwvalues,
    PyObject ** const argnames[],
    PyObject *kwds2,
    PyObject *values[],
    Py_ssize_t num_pos_args,
    Py_ssize_t num_kwargs,
    const char* function_name,
    int ignore_unknown_kwargs)
{
    PyObject *key = NULL;
    PyObject** const * name;
    PyObject** const *first_kw_arg = argnames + num_pos_args;
    for (Py_ssize_t pos = 0; pos < num_kwargs; pos++) {
#if CYTHON_AVOID_BORROWED_REFS
        key = __Pyx_PySequence_ITEM(kwds, pos);
#else
        key = __Pyx_PyTuple_GET_ITEM(kwds, pos);
#endif
#if !CYTHON_ASSUME_SAFE_MACROS
        if (unlikely(!key)) goto bad;
#endif
        name = first_kw_arg;
        while (*name && (**name != key)) name++;
        if (*name) {
            PyObject *value = kwvalues[pos];
            values[name-argnames] = __Pyx_NewRef(value);
        } else {
            size_t index_found = 0;
            int cmp = __Pyx_MatchKeywordArg(key, argnames, first_kw_arg, &index_found, function_name);
            if (cmp == 1) {
                PyObject *value = kwvalues[pos];
                values[index_found] = __Pyx_NewRef(value);
            } else {
                if (unlikely(cmp == -1)) goto bad;
                if (kwds2) {
                    PyObject *value = kwvalues[pos];
                    if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
                } else if (!ignore_unknown_kwargs) {
                    goto invalid_keyword;
                }
            }
        }
        #if CYTHON_AVOID_BORROWED_REFS
        Py_DECREF(key);
        key = NULL;
        #endif
    }
    return 0;
invalid_keyword:
    PyErr_Format(PyExc_TypeError,
        "%s() got an unexpected keyword argument '%U'",
        function_name, key);
    goto bad;
bad:
    #if CYTHON_AVOID_BORROWED_REFS
    Py_XDECREF(key);
    #endif
    return -1;
}

/* ParseKeywords */
static int __Pyx_ParseKeywords(
    PyObject *kwds,
    PyObject * const *kwvalues,
    PyObject ** const argnames[],
    PyObject *kwds2,
    PyObject *values[],
    Py_ssize_t num_pos_args,
    Py_ssize_t num_kwargs,
    const char* function_name,
    int ignore_unknown_kwargs)
{
    if (CYTHON_METH_FASTCALL && likely(PyTuple_Check(kwds)))
        return __Pyx_ParseKeywordsTuple(kwds, kwvalues, argnames, kwds2, values, num_pos_args, num_kwargs, function_name, ignore_unknown_kwargs);
    else if (kwds2)
        return __Pyx_ParseKeywordDictToDict(kwds, argnames, kwds2, values, num_pos_args, function_name);
    else
        return __Pyx_ParseKeywordDict(kwds, argnames, values, num_pos_args, num_kwargs, function_name, ignore_unknown_kwargs);
}

/* 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);
}

/* RaiseException */
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 PY_VERSION_HEX >= 0x030C00A6
        PyException_SetTraceback(value, tb);
#elif CYTHON_FAST_THREAD_STATE
        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);
        }
#else
        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);
#endif
    }
bad:
    Py_XDECREF(owned_instance);
    return;
}

/* HasAttr (used by ImportImpl) */
#if __PYX_LIMITED_VERSION_HEX < 0x030d0000
static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) {
    PyObject *r;
    if (unlikely(!PyUnicode_Check(n))) {
        PyErr_SetString(PyExc_TypeError,
                        "hasattr(): attribute name must be string");
        return -1;
    }
    r = __Pyx_PyObject_GetAttrStrNoError(o, n);
    if (!r) {
        return (unlikely(PyErr_Occurred())) ? -1 : 0;
    } else {
        Py_DECREF(r);
        return 1;
    }
}
#endif

/* ImportImpl (used by Import) */
static int __Pyx__Import_GetModule(PyObject *qualname, PyObject **module) {
    PyObject *imported_module = PyImport_GetModule(qualname);
    if (unlikely(!imported_module)) {
        *module = NULL;
        if (PyErr_Occurred()) {
            return -1;
        }
        return 0;
    }
    *module = imported_module;
    return 1;
}
static int __Pyx__Import_Lookup(PyObject *qualname, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject **module) {
    PyObject *imported_module;
    PyObject *top_level_package_name;
    Py_ssize_t i;
    int status, module_found;
    Py_ssize_t dot_index;
    module_found = __Pyx__Import_GetModule(qualname, &imported_module);
    if (unlikely(!module_found || module_found == -1)) {
        *module = NULL;
        return module_found;
    }
    if (imported_names) {
        for (i = 0; i < len_imported_names; i++) {
            PyObject *imported_name = imported_names[i];
#if __PYX_LIMITED_VERSION_HEX < 0x030d0000
            int has_imported_attribute = PyObject_HasAttr(imported_module, imported_name);
#else
            int has_imported_attribute = PyObject_HasAttrWithError(imported_module, imported_name);
            if (unlikely(has_imported_attribute == -1)) goto error;
#endif
            if (!has_imported_attribute) {
                goto not_found;
            }
        }
        *module = imported_module;
        return 1;
    }
    dot_index = PyUnicode_FindChar(qualname, '.', 0, PY_SSIZE_T_MAX, 1);
    if (dot_index == -1) {
        *module = imported_module;
        return 1;
    }
    if (unlikely(dot_index == -2)) goto error;
    top_level_package_name = PyUnicode_Substring(qualname, 0, dot_index);
    if (unlikely(!top_level_package_name)) goto error;
    Py_DECREF(imported_module);
    status = __Pyx__Import_GetModule(top_level_package_name, module);
    Py_DECREF(top_level_package_name);
    return status;
error:
    Py_DECREF(imported_module);
    *module = NULL;
    return -1;
not_found:
    Py_DECREF(imported_module);
    *module = NULL;
    return 0;
}
static PyObject *__Pyx__Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, PyObject *moddict, int level) {
    PyObject *module = 0;
    PyObject *empty_dict = 0;
    PyObject *from_list = 0;
    int module_found;
    if (!qualname) {
        qualname = name;
    }
    module_found = __Pyx__Import_Lookup(qualname, imported_names, len_imported_names, &module);
    if (likely(module_found == 1)) {
        return module;
    } else if (unlikely(module_found == -1)) {
        return NULL;
    }
    empty_dict = PyDict_New();
    if (unlikely(!empty_dict))
        goto bad;
    if (imported_names) {
#if CYTHON_COMPILING_IN_CPYTHON
        from_list = __Pyx_PyList_FromArray(imported_names, len_imported_names);
        if (unlikely(!from_list))
            goto bad;
#else
        from_list = PyList_New(len_imported_names);
        if (unlikely(!from_list)) goto bad;
        for (Py_ssize_t i=0; i<len_imported_names; ++i) {
            if (PyList_SetItem(from_list, i, __Pyx_NewRef(imported_names[i])) < 0) goto bad;
        }
#endif
    }
    if (level == -1) {
        const char* package_sep = strchr(__Pyx_MODULE_NAME, '.');
        if (package_sep != (0)) {
            module = PyImport_ImportModuleLevelObject(
                name, moddict, empty_dict, from_list, 1);
            if (unlikely(!module)) {
                if (unlikely(!PyErr_ExceptionMatches(PyExc_ImportError)))
                    goto bad;
                PyErr_Clear();
            }
        }
        level = 0;
    }
    if (!module) {
        module = PyImport_ImportModuleLevelObject(
            name, moddict, empty_dict, from_list, level);
    }
bad:
    Py_XDECREF(from_list);
    Py_XDECREF(empty_dict);
    return module;
}

/* Import */
static PyObject *__Pyx_Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, int level) {
    return __Pyx__Import(name, imported_names, len_imported_names, qualname, __pyx_mstate_global->__pyx_d, level);
}

/* ImportFrom */
static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
    PyObject* value = __Pyx_PyObject_GetAttrStr(module, name);
    if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) {
        const char* module_name_str = 0;
        PyObject* module_name = 0;
        PyObject* module_dot = 0;
        PyObject* full_name = 0;
        PyErr_Clear();
        module_name_str = PyModule_GetName(module);
        if (unlikely(!module_name_str)) { goto modbad; }
        module_name = PyUnicode_FromString(module_name_str);
        if (unlikely(!module_name)) { goto modbad; }
        module_dot = PyUnicode_Concat(module_name, __pyx_mstate_global->__pyx_kp_u_);
        if (unlikely(!module_dot)) { goto modbad; }
        full_name = PyUnicode_Concat(module_dot, name);
        if (unlikely(!full_name)) { goto modbad; }
        #if (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM  < 0x07030400) ||\
                CYTHON_COMPILING_IN_GRAAL
        {
            PyObject *modules = PyImport_GetModuleDict();
            if (unlikely(!modules))
                goto modbad;
            value = PyObject_GetItem(modules, full_name);
        }
        #else
        value = PyImport_GetModule(full_name);
        #endif
      modbad:
        Py_XDECREF(full_name);
        Py_XDECREF(module_dot);
        Py_XDECREF(module_name);
    }
    if (unlikely(!value)) {
        PyErr_Format(PyExc_ImportError, "cannot import name %S", name);
    }
    return value;
}

/* GetTopmostException (used by SaveResetException) */
#if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE
static _PyErr_StackItem *
__Pyx_PyErr_GetTopmostException(PyThreadState *tstate)
{
    _PyErr_StackItem *exc_info = tstate->exc_info;
    while ((exc_info->exc_value == NULL || exc_info->exc_value == 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 && PY_VERSION_HEX >= 0x030B00a4
    _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
    PyObject *exc_value = exc_info->exc_value;
    if (exc_value == NULL || exc_value == Py_None) {
        *value = NULL;
        *type = NULL;
        *tb = NULL;
    } else {
        *value = exc_value;
        Py_INCREF(*value);
        *type = (PyObject*) Py_TYPE(exc_value);
        Py_INCREF(*type);
        *tb = PyException_GetTraceback(exc_value);
    }
  #elif 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;
    Py_XINCREF(*type);
    Py_XINCREF(*value);
    Py_XINCREF(*tb);
  #else
    *type = tstate->exc_type;
    *value = tstate->exc_value;
    *tb = tstate->exc_traceback;
    Py_XINCREF(*type);
    Py_XINCREF(*value);
    Py_XINCREF(*tb);
  #endif
}
static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
  #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4
    _PyErr_StackItem *exc_info = tstate->exc_info;
    PyObject *tmp_value = exc_info->exc_value;
    exc_info->exc_value = value;
    Py_XDECREF(tmp_value);
    Py_XDECREF(type);
    Py_XDECREF(tb);
  #else
    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
}
#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 = NULL, *local_value, *local_tb = NULL;
#if CYTHON_FAST_THREAD_STATE
    PyObject *tmp_type, *tmp_value, *tmp_tb;
  #if PY_VERSION_HEX >= 0x030C0000
    local_value = tstate->current_exception;
    tstate->current_exception = 0;
  #else
    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;
  #endif
#elif __PYX_LIMITED_VERSION_HEX > 0x030C0000
    local_value = PyErr_GetRaisedException();
#else
    PyErr_Fetch(&local_type, &local_value, &local_tb);
#endif
#if __PYX_LIMITED_VERSION_HEX > 0x030C0000
    if (likely(local_value)) {
        local_type = (PyObject*) Py_TYPE(local_value);
        Py_INCREF(local_type);
        local_tb = PyException_GetTraceback(local_value);
    }
#else
    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 (local_tb) {
        if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
            goto bad;
    }
#endif // __PYX_LIMITED_VERSION_HEX > 0x030C0000
    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;
      #if PY_VERSION_HEX >= 0x030B00a4
        tmp_value = exc_info->exc_value;
        exc_info->exc_value = local_value;
        tmp_type = NULL;
        tmp_tb = NULL;
        Py_XDECREF(local_type);
        Py_XDECREF(local_tb);
      #else
        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;
      #endif
    }
    #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);
#elif __PYX_LIMITED_VERSION_HEX >= 0x030b0000
    PyErr_SetHandledException(local_value);
    Py_XDECREF(local_value);
    Py_XDECREF(local_type);
    Py_XDECREF(local_tb);
#else
    PyErr_SetExcInfo(local_type, local_value, local_tb);
#endif
    return 0;
#if __PYX_LIMITED_VERSION_HEX <= 0x030C0000
bad:
    *type = 0;
    *value = 0;
    *tb = 0;
    Py_XDECREF(local_type);
    Py_XDECREF(local_value);
    Py_XDECREF(local_tb);
    return -1;
#endif
}

/* SwapException */
#if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
  #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4
    _PyErr_StackItem *exc_info = tstate->exc_info;
    tmp_value = exc_info->exc_value;
    exc_info->exc_value = *value;
    if (tmp_value == NULL || tmp_value == Py_None) {
        Py_XDECREF(tmp_value);
        tmp_value = NULL;
        tmp_type = NULL;
        tmp_tb = NULL;
    } else {
        tmp_type = (PyObject*) Py_TYPE(tmp_value);
        Py_INCREF(tmp_type);
        #if CYTHON_COMPILING_IN_CPYTHON
        tmp_tb = ((PyBaseExceptionObject*) tmp_value)->traceback;
        Py_XINCREF(tmp_tb);
        #else
        tmp_tb = PyException_GetTraceback(tmp_value);
        #endif
    }
  #elif CYTHON_USE_EXC_INFO_STACK
    _PyErr_StackItem *exc_info = tstate->exc_info;
    tmp_type = exc_info->exc_type;
    tmp_value = exc_info->exc_value;
    tmp_tb = exc_info->exc_traceback;
    exc_info->exc_type = *type;
    exc_info->exc_value = *value;
    exc_info->exc_traceback = *tb;
  #else
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = *type;
    tstate->exc_value = *value;
    tstate->exc_traceback = *tb;
  #endif
    *type = tmp_type;
    *value = tmp_value;
    *tb = tmp_tb;
}
#else
static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb);
    PyErr_SetExcInfo(*type, *value, *tb);
    *type = tmp_type;
    *value = tmp_value;
    *tb = tmp_tb;
}
#endif

/* JoinPyUnicode */
static PyObject* __Pyx_PyUnicode_Join(PyObject** values, Py_ssize_t value_count, Py_ssize_t result_ulength,
                                      Py_UCS4 max_char) {
#if CYTHON_USE_UNICODE_INTERNALS && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    PyObject *result_uval;
    int result_ukind, kind_shift;
    Py_ssize_t i, char_pos;
    void *result_udata;
    if (max_char > 1114111) max_char = 1114111;
    result_uval = PyUnicode_New(result_ulength, max_char);
    if (unlikely(!result_uval)) return NULL;
    result_ukind = (max_char <= 255) ? PyUnicode_1BYTE_KIND : (max_char <= 65535) ? PyUnicode_2BYTE_KIND : PyUnicode_4BYTE_KIND;
    kind_shift = (result_ukind == PyUnicode_4BYTE_KIND) ? 2 : result_ukind - 1;
    result_udata = PyUnicode_DATA(result_uval);
    assert(kind_shift == 2 || kind_shift == 1 || kind_shift == 0);
    if (unlikely((PY_SSIZE_T_MAX >> kind_shift) - result_ulength < 0))
        goto overflow;
    char_pos = 0;
    for (i=0; i < value_count; i++) {
        int ukind;
        Py_ssize_t ulength;
        void *udata;
        PyObject *uval = values[i];
        #if !CYTHON_COMPILING_IN_LIMITED_API
        if (__Pyx_PyUnicode_READY(uval) == (-1))
            goto bad;
        #endif
        ulength = __Pyx_PyUnicode_GET_LENGTH(uval);
        #if !CYTHON_ASSUME_SAFE_SIZE
        if (unlikely(ulength < 0)) goto bad;
        #endif
        if (unlikely(!ulength))
            continue;
        if (unlikely((PY_SSIZE_T_MAX >> kind_shift) - ulength < char_pos))
            goto overflow;
        ukind = __Pyx_PyUnicode_KIND(uval);
        udata = __Pyx_PyUnicode_DATA(uval);
        if (ukind == result_ukind) {
            memcpy((char *)result_udata + (char_pos << kind_shift), udata, (size_t) (ulength << kind_shift));
        } else {
            #if PY_VERSION_HEX >= 0x030d0000
            if (unlikely(PyUnicode_CopyCharacters(result_uval, char_pos, uval, 0, ulength) < 0)) goto bad;
            #elif CYTHON_COMPILING_IN_CPYTHON || defined(_PyUnicode_FastCopyCharacters)
            _PyUnicode_FastCopyCharacters(result_uval, char_pos, uval, 0, ulength);
            #else
            Py_ssize_t j;
            for (j=0; j < ulength; j++) {
                Py_UCS4 uchar = __Pyx_PyUnicode_READ(ukind, udata, j);
                __Pyx_PyUnicode_WRITE(result_ukind, result_udata, char_pos+j, uchar);
            }
            #endif
        }
        char_pos += ulength;
    }
    return result_uval;
overflow:
    PyErr_SetString(PyExc_OverflowError, "join() result is too long for a Python string");
bad:
    Py_DECREF(result_uval);
    return NULL;
#else
    Py_ssize_t i;
    PyObject *result = NULL;
    PyObject *value_tuple = PyTuple_New(value_count);
    if (unlikely(!value_tuple)) return NULL;
    CYTHON_UNUSED_VAR(max_char);
    CYTHON_UNUSED_VAR(result_ulength);
    for (i=0; i<value_count; i++) {
        if (__Pyx_PyTuple_SET_ITEM(value_tuple, i, values[i]) != (0)) goto bad;
        Py_INCREF(values[i]);
    }
    result = PyUnicode_Join(__pyx_mstate_global->__pyx_empty_unicode, value_tuple);
bad:
    Py_DECREF(value_tuple);
    return result;
#endif
}

/* PyObjectFastCallMethod */
#if !CYTHON_VECTORCALL || PY_VERSION_HEX < 0x03090000
static PyObject *__Pyx_PyObject_FastCallMethod(PyObject *name, PyObject *const *args, size_t nargsf) {
    PyObject *result;
    PyObject *attr = PyObject_GetAttr(args[0], name);
    if (unlikely(!attr))
        return NULL;
    result = __Pyx_PyObject_FastCall(attr, args+1, nargsf - 1);
    Py_DECREF(attr);
    return result;
}
#endif

/* PyObjectVectorCallKwBuilder (used by PyObjectVectorCallMethodKwBuilder) */
#if CYTHON_VECTORCALL
static int __Pyx_VectorcallBuilder_AddArg(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n) {
    (void)__Pyx_PyObject_FastCallDict;
    if (__Pyx_PyTuple_SET_ITEM(builder, n, key) != (0)) return -1;
    Py_INCREF(key);
    args[n] = value;
    return 0;
}
CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n) {
    (void)__Pyx_VectorcallBuilder_AddArgStr;
    if (unlikely(!PyUnicode_Check(key))) {
        PyErr_SetString(PyExc_TypeError, "keywords must be strings");
        return -1;
    }
    return __Pyx_VectorcallBuilder_AddArg(key, value, builder, args, n);
}
static int __Pyx_VectorcallBuilder_AddArgStr(const char *key, PyObject *value, PyObject *builder, PyObject **args, int n) {
    PyObject *pyKey = PyUnicode_FromString(key);
    if (!pyKey) return -1;
    return __Pyx_VectorcallBuilder_AddArg(pyKey, value, builder, args, n);
}
#else // CYTHON_VECTORCALL
CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, CYTHON_UNUSED PyObject **args, CYTHON_UNUSED int n) {
    if (unlikely(!PyUnicode_Check(key))) {
        PyErr_SetString(PyExc_TypeError, "keywords must be strings");
        return -1;
    }
    return PyDict_SetItem(builder, key, value);
}
#endif

/* PyObjectVectorCallMethodKwBuilder */
#if !CYTHON_VECTORCALL || PY_VERSION_HEX < 0x03090000
static PyObject *__Pyx_Object_VectorcallMethod_CallFromBuilder(PyObject *name, PyObject *const *args, size_t nargsf, PyObject *kwnames) {
    PyObject *result;
    PyObject *obj = PyObject_GetAttr(args[0], name);
    if (unlikely(!obj))
        return NULL;
    result = __Pyx_Object_Vectorcall_CallFromBuilder(obj, args+1, nargsf-1, kwnames);
    Py_DECREF(obj);
    return result;
}
#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);
    return PyObject_SetAttr(obj, attr_name, value);
}
#endif

/* RejectKeywords */
static void __Pyx_RejectKeywords(const char* function_name, PyObject *kwds) {
    PyObject *key = NULL;
    if (CYTHON_METH_FASTCALL && likely(PyTuple_Check(kwds))) {
        key = __Pyx_PySequence_ITEM(kwds, 0);
    } else {
#if CYTHON_AVOID_BORROWED_REFS
        PyObject *pos = NULL;
#else
        Py_ssize_t pos = 0;
#endif
#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments)
        if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return;
#endif
        __Pyx_PyDict_NextRef(kwds, &pos, &key, NULL);
#if CYTHON_AVOID_BORROWED_REFS
        Py_XDECREF(pos);
#endif
    }
    if (likely(key)) {
        PyErr_Format(PyExc_TypeError,
            "%s() got an unexpected keyword argument '%U'",
            function_name, key);
        Py_DECREF(key);
    }
}

/* FastTypeChecks */
#if CYTHON_COMPILING_IN_CPYTHON
static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
    while (a) {
        a = __Pyx_PyType_GetSlot(a, tp_base, PyTypeObject*);
        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);
}
static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b) {
    PyObject *mro;
    if (cls == a || cls == b) return 1;
    mro = cls->tp_mro;
    if (likely(mro)) {
        Py_ssize_t i, n;
        n = PyTuple_GET_SIZE(mro);
        for (i = 0; i < n; i++) {
            PyObject *base = PyTuple_GET_ITEM(mro, i);
            if (base == (PyObject *)a || base == (PyObject *)b)
                return 1;
        }
        return 0;
    }
    return __Pyx_InBases(cls, a) || __Pyx_InBases(cls, b);
}
static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
    if (exc_type1) {
        return __Pyx_IsAnySubtype2((PyTypeObject*)err, (PyTypeObject*)exc_type1, (PyTypeObject*)exc_type2);
    } else {
        return __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
    }
}
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);
    for (i=0; i<n; i++) {
        if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
    }
    for (i=0; i<n; i++) {
        PyObject *t = PyTuple_GET_ITEM(tuple, i);
        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

/* WriteUnraisableException */
static void __Pyx_WriteUnraisable(const char *name, int clineno,
                                  int lineno, const char *filename,
                                  int full_traceback, int nogil) {
    PyObject *old_exc, *old_val, *old_tb;
    PyObject *ctx;
    __Pyx_PyThreadState_declare
    PyGILState_STATE state;
    if (nogil)
        state = PyGILState_Ensure();
    else state = (PyGILState_STATE)0;
    CYTHON_UNUSED_VAR(clineno);
    CYTHON_UNUSED_VAR(lineno);
    CYTHON_UNUSED_VAR(filename);
    CYTHON_MAYBE_UNUSED_VAR(nogil);
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&old_exc, &old_val, &old_tb);
    if (full_traceback) {
        Py_XINCREF(old_exc);
        Py_XINCREF(old_val);
        Py_XINCREF(old_tb);
        __Pyx_ErrRestore(old_exc, old_val, old_tb);
        PyErr_PrintEx(0);
    }
    ctx = PyUnicode_FromString(name);
    __Pyx_ErrRestore(old_exc, old_val, old_tb);
    if (!ctx) {
        PyErr_WriteUnraisable(Py_None);
    } else {
        PyErr_WriteUnraisable(ctx);
        Py_DECREF(ctx);
    }
    if (nogil)
        PyGILState_Release(state);
}

/* decode_c_bytes (used by decode_cpp_string) */
static CYTHON_INLINE PyObject* __Pyx_decode_c_bytes(
         const char* cstring, Py_ssize_t length, Py_ssize_t start, Py_ssize_t stop,
         const char* encoding, const char* errors,
         PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) {
    if (unlikely((start < 0) | (stop < 0))) {
        if (start < 0) {
            start += length;
            if (start < 0)
                start = 0;
        }
        if (stop < 0)
            stop += length;
    }
    if (stop > length)
        stop = length;
    if (unlikely(stop <= start))
        return __Pyx_NewRef(__pyx_mstate_global->__pyx_empty_unicode);
    length = stop - start;
    cstring += start;
    if (decode_func) {
        return decode_func(cstring, length, errors);
    } else {
        return PyUnicode_Decode(cstring, length, encoding, errors);
    }
}

/* PyObjectLookupSpecial */
#if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject* __Pyx__PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name, int with_error) {
    PyObject *res;
    PyTypeObject *tp = Py_TYPE(obj);
    res = _PyType_Lookup(tp, attr_name);
    if (likely(res)) {
        descrgetfunc f = Py_TYPE(res)->tp_descr_get;
        if (!f) {
            Py_INCREF(res);
        } else {
            res = f(res, obj, (PyObject *)tp);
        }
    } else if (with_error) {
        PyErr_SetObject(PyExc_AttributeError, attr_name);
    }
    return res;
}
#endif

/* KeywordStringCheck */
static int __Pyx_CheckKeywordStrings(
    const char* function_name,
    PyObject *kw)
{
#if CYTHON_COMPILING_IN_PYPY && !defined(PyArg_ValidateKeywordArguments)
    CYTHON_UNUSED_VAR(function_name);
    CYTHON_UNUSED_VAR(kw);
    return 0;
#else
    if (CYTHON_METH_FASTCALL && likely(PyTuple_Check(kw))) {
#if PY_VERSION_HEX >= 0x03090000
        CYTHON_UNUSED_VAR(function_name);
#else
        Py_ssize_t kwsize;
        #if CYTHON_ASSUME_SAFE_SIZE
        kwsize = PyTuple_GET_SIZE(kw);
        #else
        kwsize = PyTuple_Size(kw);
        if (unlikely(kwsize < 0)) return -1;
        #endif
        for (Py_ssize_t pos = 0; pos < kwsize; pos++) {
            PyObject* key = NULL;
            #if CYTHON_ASSUME_SAFE_MACROS
            key = PyTuple_GET_ITEM(kw, pos);
            #else
            key = PyTuple_GetItem(kw, pos);
            if (unlikely(!key)) return -1;
            #endif
            if (unlikely(!PyUnicode_Check(key))) {
                PyErr_Format(PyExc_TypeError,
                    "%.200s() keywords must be strings", function_name);
                return -1;
            }
        }
#endif
    } else {
        if (unlikely(!PyArg_ValidateKeywordArguments(kw))) return -1;
    }
    return 0;
#endif
}

/* GetAttr */
static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) {
#if CYTHON_USE_TYPE_SLOTS
    if (likely(PyUnicode_Check(n)))
        return __Pyx_PyObject_GetAttrStr(o, n);
#endif
    return PyObject_GetAttr(o, n);
}

/* GetAttr3 */
#if __PYX_LIMITED_VERSION_HEX < 0x030d0000
static PyObject *__Pyx_GetAttr3Default(PyObject *d) {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
        return NULL;
    __Pyx_PyErr_Clear();
    Py_INCREF(d);
    return d;
}
#endif
static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) {
    PyObject *r;
#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
    int res = PyObject_GetOptionalAttr(o, n, &r);
    return (res != 0) ? r : __Pyx_NewRef(d);
#else
  #if CYTHON_USE_TYPE_SLOTS
    if (likely(PyUnicode_Check(n))) {
        r = __Pyx_PyObject_GetAttrStrNoError(o, n);
        if (unlikely(!r) && likely(!PyErr_Occurred())) {
            r = __Pyx_NewRef(d);
        }
        return r;
    }
  #endif
    r = PyObject_GetAttr(o, n);
    return (likely(r)) ? r : __Pyx_GetAttr3Default(d);
#endif
}

/* RaiseUnexpectedTypeError */
static int
__Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj)
{
    __Pyx_TypeName obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj));
    PyErr_Format(PyExc_TypeError, "Expected %s, got " __Pyx_FMT_TYPENAME,
                 expected, obj_type_name);
    __Pyx_DECREF_TypeName(obj_type_name);
    return 0;
}

/* PyObjectCallNoArg */
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
    PyObject *arg[2] = {NULL, NULL};
    return __Pyx_PyObject_FastCall(func, arg + 1, 0 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
}

/* ArgTypeTestFunc (used by ArgTypeTest) */
static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact)
{
    __Pyx_TypeName type_name;
    __Pyx_TypeName obj_type_name;
    PyObject *extra_info = __pyx_mstate_global->__pyx_empty_unicode;
    int from_annotation_subclass = 0;
    if (unlikely(!type)) {
        PyErr_SetString(PyExc_SystemError, "Missing type object");
        return 0;
    }
    else if (!exact) {
        if (likely(__Pyx_TypeCheck(obj, type))) return 1;
    } else if (exact == 2) {
        if (__Pyx_TypeCheck(obj, type)) {
            from_annotation_subclass = 1;
            extra_info = __pyx_mstate_global->__pyx_kp_u_Note_that_Cython_is_deliberately;
        }
    }
    type_name = __Pyx_PyType_GetFullyQualifiedName(type);
    obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj));
    PyErr_Format(PyExc_TypeError,
        "Argument '%.200s' has incorrect type (expected " __Pyx_FMT_TYPENAME
        ", got " __Pyx_FMT_TYPENAME ")"
#if __PYX_LIMITED_VERSION_HEX < 0x030C0000
        "%s%U"
#endif
        , name, type_name, obj_type_name
#if __PYX_LIMITED_VERSION_HEX < 0x030C0000
        , (from_annotation_subclass ? ". " : ""), extra_info
#endif
        );
#if __PYX_LIMITED_VERSION_HEX >= 0x030C0000
    if (exact == 2 && from_annotation_subclass) {
        PyObject *res;
        PyObject *vargs[2];
        vargs[0] = PyErr_GetRaisedException();
        vargs[1] = extra_info;
        res = PyObject_VectorcallMethod(__pyx_mstate_global->__pyx_kp_u_add_note, vargs, 2, NULL);
        Py_XDECREF(res);
        PyErr_SetRaisedException(vargs[0]);
    }
#endif
    __Pyx_DECREF_TypeName(type_name);
    __Pyx_DECREF_TypeName(obj_type_name);
    return 0;
}

/* PyObjectCall2Args (used by CallUnboundCMethod1) */
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) {
    PyObject *args[3] = {NULL, arg1, arg2};
    return __Pyx_PyObject_FastCall(function, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
}

/* CallUnboundCMethod1 */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg) {
    int was_initialized =  __Pyx_CachedCFunction_GetAndSetInitializing(cfunc);
    if (likely(was_initialized == 2 && cfunc->func)) {
        int flag = cfunc->flag;
        if (flag == METH_O) {
            return __Pyx_CallCFunction(cfunc, self, arg);
        } else if (flag == METH_FASTCALL) {
            return __Pyx_CallCFunctionFast(cfunc, self, &arg, 1);
        } else if (flag == (METH_FASTCALL | METH_KEYWORDS)) {
            return __Pyx_CallCFunctionFastWithKeywords(cfunc, self, &arg, 1, NULL);
        }
    }
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    else if (unlikely(was_initialized == 1)) {
        __Pyx_CachedCFunction tmp_cfunc = {
#ifndef __cplusplus
            0
#endif
        };
        tmp_cfunc.type = cfunc->type;
        tmp_cfunc.method_name = cfunc->method_name;
        return __Pyx__CallUnboundCMethod1(&tmp_cfunc, self, arg);
    }
#endif
    PyObject* result = __Pyx__CallUnboundCMethod1(cfunc, self, arg);
    __Pyx_CachedCFunction_SetFinishedInitializing(cfunc);
    return result;
}
#endif
static PyObject* __Pyx__CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg){
    PyObject *result = NULL;
    if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
#if CYTHON_COMPILING_IN_CPYTHON
    if (cfunc->func && (cfunc->flag & METH_VARARGS)) {
        PyObject *args = PyTuple_New(1);
        if (unlikely(!args)) return NULL;
        Py_INCREF(arg);
        PyTuple_SET_ITEM(args, 0, arg);
        if (cfunc->flag & METH_KEYWORDS)
            result = __Pyx_CallCFunctionWithKeywords(cfunc, self, args, NULL);
        else
            result = __Pyx_CallCFunction(cfunc, self, args);
        Py_DECREF(args);
    } else
#endif
    {
        result = __Pyx_PyObject_Call2Args(cfunc->method, self, arg);
    }
    return result;
}

/* DictGetItem */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) {
    PyObject *value;
    if (unlikely(__Pyx_PyDict_GetItemRef(d, key, &value) == 0)) { // no value, no error
        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 value;
}
#endif

/* decode_c_string */
static CYTHON_INLINE PyObject* __Pyx_decode_c_string(
         const char* cstring, Py_ssize_t start, Py_ssize_t stop,
         const char* encoding, const char* errors,
         PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) {
    Py_ssize_t length;
    if (unlikely((start < 0) | (stop < 0))) {
        size_t slen = strlen(cstring);
        if (unlikely(slen > (size_t) PY_SSIZE_T_MAX)) {
            PyErr_SetString(PyExc_OverflowError,
                            "c-string too long to convert to Python");
            return NULL;
        }
        length = (Py_ssize_t) slen;
        if (start < 0) {
            start += length;
            if (start < 0)
                start = 0;
        }
        if (stop < 0)
            stop += length;
    }
    if (unlikely(stop <= start))
        return __Pyx_NewRef(__pyx_mstate_global->__pyx_empty_unicode);
    length = stop - start;
    cstring += start;
    if (decode_func) {
        return decode_func(cstring, length, errors);
    } else {
        return PyUnicode_Decode(cstring, length, encoding, errors);
    }
}

/* PyObjectFormatAndDecref */
static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatSimpleAndDecref(PyObject* s, PyObject* f) {
    if (unlikely(!s)) return NULL;
    if (likely(PyUnicode_CheckExact(s))) return s;
    return __Pyx_PyObject_FormatAndDecref(s, f);
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatAndDecref(PyObject* s, PyObject* f) {
    PyObject *result;
    if (unlikely(!s)) return NULL;
    result = PyObject_Format(s, f);
    Py_DECREF(s);
    return result;
}

/* PyLongCompare */
static CYTHON_INLINE int __Pyx_PyLong_BoolNeObjC(PyObject *op1, PyObject *op2, long intval, long inplace) {
    CYTHON_MAYBE_UNUSED_VAR(intval);
    CYTHON_UNUSED_VAR(inplace);
    if (op1 == op2) {
        return 0;
    }
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        int unequal;
        unsigned long uintval;
        Py_ssize_t size = __Pyx_PyLong_DigitCount(op1);
        const digit* digits = __Pyx_PyLong_Digits(op1);
        if (intval == 0) {
            return (__Pyx_PyLong_IsZero(op1) != 1);
        } else if (intval < 0) {
            if (__Pyx_PyLong_IsNonNeg(op1))
                return 1;
            intval = -intval;
        } else {
            if (__Pyx_PyLong_IsNeg(op1))
                return 1;
        }
        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));
        return (unequal != 0);
    }
    #endif
    if (PyFloat_CheckExact(op1)) {
        const long b = intval;
        double a = __Pyx_PyFloat_AS_DOUBLE(op1);
        return ((double)a != (double)b);
    }
    return __Pyx_PyObject_IsTrueAndDecref(
        PyObject_RichCompare(op1, op2, Py_NE));
}

/* ErrOccurredWithGIL */
static CYTHON_INLINE int __Pyx_ErrOccurredWithGIL(void) {
  int err;
  PyGILState_STATE _save = PyGILState_Ensure();
  err = !!PyErr_Occurred();
  PyGILState_Release(_save);
  return err;
}

/* GetItemInt */
static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
    PyObject *r;
    if (unlikely(!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,
                                                              int wraparound, int boundscheck, int unsafe_shared) {
    CYTHON_MAYBE_UNUSED_VAR(unsafe_shared);
#if CYTHON_ASSUME_SAFE_SIZE
    Py_ssize_t wrapped_i = i;
    if (wraparound & unlikely(i < 0)) {
        wrapped_i += PyList_GET_SIZE(o);
    }
    if ((CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS || !CYTHON_ASSUME_SAFE_MACROS)) {
        return __Pyx_PyList_GetItemRefFast(o, wrapped_i, unsafe_shared);
    } else
    if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) {
        return __Pyx_NewRef(PyList_GET_ITEM(o, wrapped_i));
    }
    return __Pyx_GetItemInt_Generic(o, PyLong_FromSsize_t(i));
#else
    (void)wraparound;
    (void)boundscheck;
    return PySequence_GetItem(o, i);
#endif
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
                                                              int wraparound, int boundscheck, int unsafe_shared) {
    CYTHON_MAYBE_UNUSED_VAR(unsafe_shared);
#if CYTHON_ASSUME_SAFE_SIZE && 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)))) {
        return __Pyx_NewRef(PyTuple_GET_ITEM(o, wrapped_i));
    }
    return __Pyx_GetItemInt_Generic(o, PyLong_FromSsize_t(i));
#else
    (void)wraparound;
    (void)boundscheck;
    return PySequence_GetItem(o, i);
#endif
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list,
                                                     int wraparound, int boundscheck, int unsafe_shared) {
    CYTHON_MAYBE_UNUSED_VAR(unsafe_shared);
#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE
    if (is_list || PyList_CheckExact(o)) {
        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
        if ((CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS)) {
            return __Pyx_PyList_GetItemRefFast(o, n, unsafe_shared);
        } else if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) {
            return __Pyx_NewRef(PyList_GET_ITEM(o, n));
        }
    } else
    #if !CYTHON_AVOID_BORROWED_REFS
    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)))) {
            return __Pyx_NewRef(PyTuple_GET_ITEM(o, n));
        }
    } else
    #endif
#endif
#if CYTHON_USE_TYPE_SLOTS && !CYTHON_COMPILING_IN_PYPY
    {
        PyMappingMethods *mm = Py_TYPE(o)->tp_as_mapping;
        PySequenceMethods *sm = Py_TYPE(o)->tp_as_sequence;
        if (!is_list && mm && mm->mp_subscript) {
            PyObject *r, *key = PyLong_FromSsize_t(i);
            if (unlikely(!key)) return NULL;
            r = mm->mp_subscript(o, key);
            Py_DECREF(key);
            return r;
        }
        if (is_list || likely(sm && sm->sq_item)) {
            if (wraparound && unlikely(i < 0) && likely(sm->sq_length)) {
                Py_ssize_t l = sm->sq_length(o);
                if (likely(l >= 0)) {
                    i += l;
                } else {
                    if (!PyErr_ExceptionMatches(PyExc_OverflowError))
                        return NULL;
                    PyErr_Clear();
                }
            }
            return sm->sq_item(o, i);
        }
    }
#else
    if (is_list || !PyMapping_Check(o)) {
        return PySequence_GetItem(o, i);
    }
#endif
    (void)wraparound;
    (void)boundscheck;
    return __Pyx_GetItemInt_Generic(o, PyLong_FromSsize_t(i));
}

/* pep479 */
static void __Pyx_Generator_Replace_StopIteration(int in_async_gen) {
    PyObject *exc, *val, *tb, *cur_exc, *new_exc;
    __Pyx_PyThreadState_declare
    int is_async_stopiteration = 0;
    CYTHON_MAYBE_UNUSED_VAR(in_async_gen);
    __Pyx_PyThreadState_assign
    cur_exc = __Pyx_PyErr_CurrentExceptionType();
    if (likely(!__Pyx_PyErr_GivenExceptionMatches(cur_exc, PyExc_StopIteration))) {
        if (in_async_gen && unlikely(__Pyx_PyErr_GivenExceptionMatches(cur_exc, PyExc_StopAsyncIteration))) {
            is_async_stopiteration = 1;
        } else {
            return;
        }
    }
    __Pyx_GetException(&exc, &val, &tb);
    Py_XDECREF(exc);
    Py_XDECREF(tb);
    new_exc = PyObject_CallFunction(PyExc_RuntimeError, "s",
        is_async_stopiteration ? "async generator raised StopAsyncIteration" :
        in_async_gen ? "async generator raised StopIteration" :
        "generator raised StopIteration");
    if (!new_exc) {
        Py_XDECREF(val);
        return;
    }
    PyException_SetCause(new_exc, val); // steals ref to val
    PyErr_SetObject(PyExc_RuntimeError, new_exc);
}

/* PyUnicode_Unicode */
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_Unicode(PyObject *obj) {
    if (unlikely(obj == Py_None))
        obj = __pyx_mstate_global->__pyx_kp_u_None;
    return __Pyx_NewRef(obj);
}

/* PyObjectGetMethod (used by PyObjectCallMethod1) */
#if !(CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000)))
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
    __Pyx_TypeName type_name;
    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 defined(Py_TPFLAGS_METHOD_DESCRIPTOR) && Py_TPFLAGS_METHOD_DESCRIPTOR
        if (__Pyx_PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_METHOD_DESCRIPTOR))
#else
        #ifdef __Pyx_CyFunction_USED
        if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr)))
        #else
        if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type)))
        #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 (likely(descr != NULL)) {
        *method = descr;
        return 0;
    }
    type_name = __Pyx_PyType_GetFullyQualifiedName(tp);
    PyErr_Format(PyExc_AttributeError,
                 "'" __Pyx_FMT_TYPENAME "' object has no attribute '%U'",
                 type_name, name);
    __Pyx_DECREF_TypeName(type_name);
    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;
}
#endif

/* PyObjectCallMethod1 (used by append) */
#if !(CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000)))
static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) {
    PyObject *result = __Pyx_PyObject_CallOneArg(method, arg);
    Py_DECREF(method);
    return result;
}
#endif
static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) {
#if CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000))
    PyObject *args[2] = {obj, arg};
    (void) __Pyx_PyObject_CallOneArg;
    (void) __Pyx_PyObject_Call2Args;
    return PyObject_VectorcallMethod(method_name, args, 2 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL);
#else
    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);
#endif
}

/* 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_mstate_global->__pyx_n_u_append, x);
        if (unlikely(!retval))
            return -1;
        Py_DECREF(retval);
    }
    return 0;
}

/* RaiseUnboundLocalError */
static 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) {
    PyObject* exc_type;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    exc_type = __Pyx_PyErr_CurrentExceptionType();
    if (unlikely(exc_type)) {
        if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)))
            return -1;
        __Pyx_PyErr_Clear();
        return 0;
    }
    return 0;
}

/* UnpackItemEndCheck */
static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) {
    if (unlikely(retval)) {
        Py_DECREF(retval);
        __Pyx_RaiseTooManyValuesError(expected);
        return -1;
    }
    return __Pyx_IterFinish();
}

/* PyObjectCallMethod0 (used by dict_iter) */
static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) {
#if CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000))
    PyObject *args[1] = {obj};
    (void) __Pyx_PyObject_CallOneArg;
    (void) __Pyx_PyObject_CallNoArg;
    return PyObject_VectorcallMethod(method_name, args, 1 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL);
#else
    PyObject *method = NULL, *result = NULL;
    int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method);
    if (likely(is_method)) {
        result = __Pyx_PyObject_CallOneArg(method, obj);
        Py_DECREF(method);
        return result;
    }
    if (unlikely(!method)) goto bad;
    result = __Pyx_PyObject_CallNoArg(method);
    Py_DECREF(method);
bad:
    return result;
#endif
}

/* RaiseNoneIterError (used by UnpackTupleError) */
static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
}

/* UnpackTupleError (used by UnpackTuple2) */
static void __Pyx_UnpackTupleError(PyObject *t, Py_ssize_t index) {
    if (t == Py_None) {
      __Pyx_RaiseNoneNotIterableError();
    } else {
      Py_ssize_t size = __Pyx_PyTuple_GET_SIZE(t);
 #if !CYTHON_ASSUME_SAFE_SIZE
      if (unlikely(size < 0)) return;
 #endif
      if (size < index) {
        __Pyx_RaiseNeedMoreValuesError(size);
      } else {
        __Pyx_RaiseTooManyValuesError(index);
      }
    }
}

/* UnpackTuple2 (used by dict_iter) */
static CYTHON_INLINE int __Pyx_unpack_tuple2(
        PyObject* tuple, PyObject** value1, PyObject** value2, int is_tuple, int has_known_size, int decref_tuple) {
    if (likely(is_tuple || PyTuple_Check(tuple))) {
        Py_ssize_t size;
        if (has_known_size) {
            return __Pyx_unpack_tuple2_exact(tuple, value1, value2, decref_tuple);
        }
        size = __Pyx_PyTuple_GET_SIZE(tuple);
        if (likely(size == 2)) {
            return __Pyx_unpack_tuple2_exact(tuple, value1, value2, decref_tuple);
        }
        if (size >= 0) {
            __Pyx_UnpackTupleError(tuple, 2);
        }
        return -1;
    } else {
        return __Pyx_unpack_tuple2_generic(tuple, value1, value2, has_known_size, decref_tuple);
    }
}
static CYTHON_INLINE int __Pyx_unpack_tuple2_exact(
        PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2, int decref_tuple) {
    PyObject *value1 = NULL, *value2 = NULL;
#if CYTHON_AVOID_BORROWED_REFS || !CYTHON_ASSUME_SAFE_MACROS
    value1 = __Pyx_PySequence_ITEM(tuple, 0);  if (unlikely(!value1)) goto bad;
    value2 = __Pyx_PySequence_ITEM(tuple, 1);  if (unlikely(!value2)) goto bad;
#else
    value1 = PyTuple_GET_ITEM(tuple, 0);  Py_INCREF(value1);
    value2 = PyTuple_GET_ITEM(tuple, 1);  Py_INCREF(value2);
#endif
    if (decref_tuple) {
        Py_DECREF(tuple);
    }
    *pvalue1 = value1;
    *pvalue2 = value2;
    return 0;
#if CYTHON_AVOID_BORROWED_REFS || !CYTHON_ASSUME_SAFE_MACROS
bad:
    Py_XDECREF(value1);
    Py_XDECREF(value2);
    if (decref_tuple) { Py_XDECREF(tuple); }
    return -1;
#endif
}
static int __Pyx_unpack_tuple2_generic(PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2,
                                       int has_known_size, int decref_tuple) {
    Py_ssize_t index;
    PyObject *value1 = NULL, *value2 = NULL, *iter = NULL;
    iternextfunc iternext;
    iter = PyObject_GetIter(tuple);
    if (unlikely(!iter)) goto bad;
    if (decref_tuple) { Py_DECREF(tuple); tuple = NULL; }
    iternext = __Pyx_PyObject_GetIterNextFunc(iter);
    value1 = iternext(iter); if (unlikely(!value1)) { index = 0; goto unpacking_failed; }
    value2 = iternext(iter); if (unlikely(!value2)) { index = 1; goto unpacking_failed; }
    if (!has_known_size && unlikely(__Pyx_IternextUnpackEndCheck(iternext(iter), 2))) goto bad;
    Py_DECREF(iter);
    *pvalue1 = value1;
    *pvalue2 = value2;
    return 0;
unpacking_failed:
    if (!has_known_size && __Pyx_IterFinish() == 0)
        __Pyx_RaiseNeedMoreValuesError(index);
bad:
    Py_XDECREF(iter);
    Py_XDECREF(value1);
    Py_XDECREF(value2);
    if (decref_tuple) { Py_XDECREF(tuple); }
    return -1;
}

/* dict_iter */
#if CYTHON_COMPILING_IN_PYPY
#include <string.h>
#endif
static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* iterable, int is_dict, PyObject* method_name,
                                                   Py_ssize_t* p_orig_length, int* p_source_is_dict) {
    is_dict = is_dict || likely(PyDict_CheckExact(iterable));
    *p_source_is_dict = is_dict;
    if (is_dict) {
#if !CYTHON_COMPILING_IN_PYPY
        *p_orig_length = PyDict_Size(iterable);
        Py_INCREF(iterable);
        return iterable;
#else
        static PyObject *py_items = NULL, *py_keys = NULL, *py_values = NULL;
        PyObject **pp = NULL;
        if (method_name) {
            const char *name = PyUnicode_AsUTF8(method_name);
            if (strcmp(name, "iteritems") == 0) pp = &py_items;
            else if (strcmp(name, "iterkeys") == 0) pp = &py_keys;
            else if (strcmp(name, "itervalues") == 0) pp = &py_values;
            if (pp) {
                if (!*pp) {
                    *pp = PyUnicode_FromString(name + 4);
                    if (!*pp)
                        return NULL;
                }
                method_name = *pp;
            }
        }
#endif
    }
    *p_orig_length = 0;
    if (method_name) {
        PyObject* iter;
        iterable = __Pyx_PyObject_CallMethod0(iterable, method_name);
        if (!iterable)
            return NULL;
#if !CYTHON_COMPILING_IN_PYPY
        if (PyTuple_CheckExact(iterable) || PyList_CheckExact(iterable))
            return iterable;
#endif
        iter = PyObject_GetIter(iterable);
        Py_DECREF(iterable);
        return iter;
    }
    return PyObject_GetIter(iterable);
}
#if !CYTHON_AVOID_BORROWED_REFS
static CYTHON_INLINE int __Pyx_dict_iter_next_source_is_dict(
        PyObject* iter_obj, CYTHON_NCP_UNUSED Py_ssize_t orig_length, CYTHON_NCP_UNUSED Py_ssize_t* ppos,
        PyObject** pkey, PyObject** pvalue, PyObject** pitem) {
    PyObject *key, *value;
    if (unlikely(orig_length != PyDict_Size(iter_obj))) {
        PyErr_SetString(PyExc_RuntimeError, "dictionary changed size during iteration");
        return -1;
    }
    if (unlikely(!PyDict_Next(iter_obj, ppos, &key, &value))) {
        return 0;
    }
    if (pitem) {
        PyObject* tuple = PyTuple_New(2);
        if (unlikely(!tuple)) {
            return -1;
        }
        Py_INCREF(key);
        Py_INCREF(value);
        #if CYTHON_ASSUME_SAFE_MACROS
        PyTuple_SET_ITEM(tuple, 0, key);
        PyTuple_SET_ITEM(tuple, 1, value);
        #else
        if (unlikely(PyTuple_SetItem(tuple, 0, key) < 0)) {
            Py_DECREF(value);
            Py_DECREF(tuple);
            return -1;
        }
        if (unlikely(PyTuple_SetItem(tuple, 1, value) < 0)) {
            Py_DECREF(tuple);
            return -1;
        }
        #endif
        *pitem = tuple;
    } else {
        if (pkey) {
            Py_INCREF(key);
            *pkey = key;
        }
        if (pvalue) {
            Py_INCREF(value);
            *pvalue = value;
        }
    }
    return 1;
}
#endif
static CYTHON_INLINE int __Pyx_dict_iter_next(
        PyObject* iter_obj, CYTHON_NCP_UNUSED Py_ssize_t orig_length, CYTHON_NCP_UNUSED Py_ssize_t* ppos,
        PyObject** pkey, PyObject** pvalue, PyObject** pitem, int source_is_dict) {
    PyObject* next_item;
#if !CYTHON_AVOID_BORROWED_REFS
    if (source_is_dict) {
        int result;
#if PY_VERSION_HEX >= 0x030d0000 && !CYTHON_COMPILING_IN_LIMITED_API
        Py_BEGIN_CRITICAL_SECTION(iter_obj);
#endif
        result = __Pyx_dict_iter_next_source_is_dict(iter_obj, orig_length, ppos, pkey, pvalue, pitem);
#if PY_VERSION_HEX >= 0x030d0000 && !CYTHON_COMPILING_IN_LIMITED_API
        Py_END_CRITICAL_SECTION();
#endif
        return result;
    } else if (PyTuple_CheckExact(iter_obj)) {
        Py_ssize_t pos = *ppos;
        Py_ssize_t tuple_size = __Pyx_PyTuple_GET_SIZE(iter_obj);
        #if !CYTHON_ASSUME_SAFE_SIZE
        if (unlikely(tuple_size < 0)) return -1;
        #endif
        if (unlikely(pos >= tuple_size)) return 0;
        *ppos = pos + 1;
        #if CYTHON_ASSUME_SAFE_MACROS
        next_item = PyTuple_GET_ITEM(iter_obj, pos);
        #else
        next_item = PyTuple_GetItem(iter_obj, pos);
        if (unlikely(!next_item)) return -1;
        #endif
        Py_INCREF(next_item);
    } else if (PyList_CheckExact(iter_obj)) {
        Py_ssize_t pos = *ppos;
        Py_ssize_t list_size = __Pyx_PyList_GET_SIZE(iter_obj);
        #if !CYTHON_ASSUME_SAFE_SIZE
        if (unlikely(list_size < 0)) return -1;
        #endif
        if (unlikely(pos >= list_size)) return 0;
        *ppos = pos + 1;
        next_item = __Pyx_PyList_GetItemRef(iter_obj, pos);
        if (unlikely(!next_item)) return -1;
    } else
#endif
    {
        next_item = PyIter_Next(iter_obj);
        if (unlikely(!next_item)) {
            return __Pyx_IterFinish();
        }
    }
    if (pitem) {
        *pitem = next_item;
    } else if (pkey && pvalue) {
        if (__Pyx_unpack_tuple2(next_item, pkey, pvalue, source_is_dict, source_is_dict, 1))
            return -1;
    } else if (pkey) {
        *pkey = next_item;
    } else {
        *pvalue = next_item;
    }
    return 1;
}

/* pyfrozenset_new (used by PySetContains) */
static CYTHON_INLINE PyObject* __Pyx_PyFrozenSet_New(PyObject* it) {
    if (it) {
        PyObject* result;
#if CYTHON_COMPILING_IN_PYPY
        PyObject* args;
        args = PyTuple_Pack(1, it);
        if (unlikely(!args))
            return NULL;
        result = PyObject_Call((PyObject*)&PyFrozenSet_Type, args, NULL);
        Py_DECREF(args);
        return result;
#else
        if (PyFrozenSet_CheckExact(it)) {
            Py_INCREF(it);
            return it;
        }
        result = PyFrozenSet_New(it);
        if (unlikely(!result))
            return NULL;
        if ((__PYX_LIMITED_VERSION_HEX >= 0x030A0000)
#if CYTHON_COMPILING_IN_LIMITED_API
            || __Pyx_get_runtime_version() >= 0x030A0000
#endif
            )
            return result;
        {
            Py_ssize_t size = __Pyx_PySet_GET_SIZE(result);
            if (likely(size > 0))
                return result;
#if !CYTHON_ASSUME_SAFE_SIZE
            if (unlikely(size < 0)) {
                Py_DECREF(result);
                return NULL;
            }
#endif
        }
        Py_DECREF(result);
#endif
    }
    return __Pyx_PyObject_CallNoArg((PyObject*) &PyFrozenSet_Type);
}

/* PySetContains */
static int __Pyx_PySet_ContainsUnhashable(PyObject *set, PyObject *key) {
    int result = -1;
    if (PySet_Check(key) && PyErr_ExceptionMatches(PyExc_TypeError)) {
        PyObject *tmpkey;
        PyErr_Clear();
        tmpkey = __Pyx_PyFrozenSet_New(key);
        if (tmpkey != NULL) {
            result = PySet_Contains(set, tmpkey);
            Py_DECREF(tmpkey);
        }
    }
    return result;
}
static CYTHON_INLINE int __Pyx_PySet_ContainsTF(PyObject* key, PyObject* set, int eq) {
    int result = PySet_Contains(set, key);
    if (unlikely(result < 0)) {
        result = __Pyx_PySet_ContainsUnhashable(set, key);
    }
    return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
}

/* ObjectGetItem */
#if CYTHON_USE_TYPE_SLOTS
static PyObject *__Pyx_PyObject_GetIndex(PyObject *obj, PyObject *index) {
    PyObject *runerr = NULL;
    Py_ssize_t key_value;
    key_value = __Pyx_PyIndex_AsSsize_t(index);
    if (likely(key_value != -1 || !(runerr = PyErr_Occurred()))) {
        return __Pyx_GetItemInt_Fast(obj, key_value, 0, 1, 1, 1);
    }
    if (PyErr_GivenExceptionMatches(runerr, PyExc_OverflowError)) {
        __Pyx_TypeName index_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(index));
        PyErr_Clear();
        PyErr_Format(PyExc_IndexError,
            "cannot fit '" __Pyx_FMT_TYPENAME "' into an index-sized integer", index_type_name);
        __Pyx_DECREF_TypeName(index_type_name);
    }
    return NULL;
}
static PyObject *__Pyx_PyObject_GetItem_Slow(PyObject *obj, PyObject *key) {
    __Pyx_TypeName obj_type_name;
    if (likely(PyType_Check(obj))) {
        PyObject *meth = __Pyx_PyObject_GetAttrStrNoError(obj, __pyx_mstate_global->__pyx_n_u_class_getitem);
        if (!meth) {
            PyErr_Clear();
        } else {
            PyObject *result = __Pyx_PyObject_CallOneArg(meth, key);
            Py_DECREF(meth);
            return result;
        }
    }
    obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj));
    PyErr_Format(PyExc_TypeError,
        "'" __Pyx_FMT_TYPENAME "' object is not subscriptable", obj_type_name);
    __Pyx_DECREF_TypeName(obj_type_name);
    return NULL;
}
static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject *key) {
    PyTypeObject *tp = Py_TYPE(obj);
    PyMappingMethods *mm = tp->tp_as_mapping;
    PySequenceMethods *sm = tp->tp_as_sequence;
    if (likely(mm && mm->mp_subscript)) {
        return mm->mp_subscript(obj, key);
    }
    if (likely(sm && sm->sq_item)) {
        return __Pyx_PyObject_GetIndex(obj, key);
    }
    return __Pyx_PyObject_GetItem_Slow(obj, key);
}
#endif

/* pybytes_as_double (used by pynumber_float) */
static double __Pyx_SlowPyString_AsDouble(PyObject *obj) {
    PyObject *float_value = PyFloat_FromString(obj);
    if (likely(float_value)) {
        double value = __Pyx_PyFloat_AS_DOUBLE(float_value);
        Py_DECREF(float_value);
        return value;
    }
    return (double)-1;
}
static const char* __Pyx__PyBytes_AsDouble_Copy(const char* start, char* buffer, Py_ssize_t length) {
    int last_was_punctuation = 1;
    int parse_error_found = 0;
    Py_ssize_t i;
    for (i=0; i < length; i++) {
        char chr = start[i];
        int is_punctuation = (chr == '_') | (chr == '.') | (chr == 'e') | (chr == 'E');
        *buffer = chr;
        buffer += (chr != '_');
        parse_error_found |= last_was_punctuation & is_punctuation;
        last_was_punctuation = is_punctuation;
    }
    parse_error_found |= last_was_punctuation;
    *buffer = '\0';
    return unlikely(parse_error_found) ? NULL : buffer;
}
static double __Pyx__PyBytes_AsDouble_inf_nan(const char* start, Py_ssize_t length) {
    int matches = 1;
    char sign = start[0];
    int is_signed = (sign == '+') | (sign == '-');
    start += is_signed;
    length -= is_signed;
    switch (start[0]) {
        #ifdef Py_NAN
        case 'n':
        case 'N':
            if (unlikely(length != 3)) goto parse_failure;
            matches &= (start[1] == 'a' || start[1] == 'A');
            matches &= (start[2] == 'n' || start[2] == 'N');
            if (unlikely(!matches)) goto parse_failure;
            return (sign == '-') ? -Py_NAN : Py_NAN;
        #endif
        case 'i':
        case 'I':
            if (unlikely(length < 3)) goto parse_failure;
            matches &= (start[1] == 'n' || start[1] == 'N');
            matches &= (start[2] == 'f' || start[2] == 'F');
            if (likely(length == 3 && matches))
                return (sign == '-') ? -Py_HUGE_VAL : Py_HUGE_VAL;
            if (unlikely(length != 8)) goto parse_failure;
            matches &= (start[3] == 'i' || start[3] == 'I');
            matches &= (start[4] == 'n' || start[4] == 'N');
            matches &= (start[5] == 'i' || start[5] == 'I');
            matches &= (start[6] == 't' || start[6] == 'T');
            matches &= (start[7] == 'y' || start[7] == 'Y');
            if (unlikely(!matches)) goto parse_failure;
            return (sign == '-') ? -Py_HUGE_VAL : Py_HUGE_VAL;
        case '.': case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9':
            break;
        default:
            goto parse_failure;
    }
    return 0.0;
parse_failure:
    return -1.0;
}
static CYTHON_INLINE int __Pyx__PyBytes_AsDouble_IsSpace(char ch) {
    return (ch == 0x20) | !((ch < 0x9) | (ch > 0xd));
}
CYTHON_UNUSED static double __Pyx__PyBytes_AsDouble(PyObject *obj, const char* start, Py_ssize_t length) {
    double value;
    Py_ssize_t i, digits;
    const char *last = start + length;
    char *end;
    while (__Pyx__PyBytes_AsDouble_IsSpace(*start))
        start++;
    while (start < last - 1 && __Pyx__PyBytes_AsDouble_IsSpace(last[-1]))
        last--;
    length = last - start;
    if (unlikely(length <= 0)) goto fallback;
    value = __Pyx__PyBytes_AsDouble_inf_nan(start, length);
    if (unlikely(value == -1.0)) goto fallback;
    if (value != 0.0) return value;
    digits = 0;
    for (i=0; i < length; digits += start[i++] != '_');
    if (likely(digits == length)) {
        value = PyOS_string_to_double(start, &end, NULL);
    } else if (digits < 40) {
        char number[40];
        last = __Pyx__PyBytes_AsDouble_Copy(start, number, length);
        if (unlikely(!last)) goto fallback;
        value = PyOS_string_to_double(number, &end, NULL);
    } else {
        char *number = (char*) PyMem_Malloc((digits + 1) * sizeof(char));
        if (unlikely(!number)) goto fallback;
        last = __Pyx__PyBytes_AsDouble_Copy(start, number, length);
        if (unlikely(!last)) {
            PyMem_Free(number);
            goto fallback;
        }
        value = PyOS_string_to_double(number, &end, NULL);
        PyMem_Free(number);
    }
    if (likely(end == last) || (value == (double)-1 && PyErr_Occurred())) {
        return value;
    }
fallback:
    return __Pyx_SlowPyString_AsDouble(obj);
}

/* pynumber_float */
static CYTHON_INLINE PyObject* __Pyx__PyNumber_Float(PyObject* obj) {
    double val;
    if (PyLong_CheckExact(obj)) {
#if CYTHON_USE_PYLONG_INTERNALS
        if (likely(__Pyx_PyLong_IsCompact(obj))) {
            val = (double) __Pyx_PyLong_CompactValue(obj);
            goto no_error;
        }
#endif
        val = PyLong_AsDouble(obj);
    } else if (PyUnicode_CheckExact(obj)) {
        val = __Pyx_PyUnicode_AsDouble(obj);
    } else if (PyBytes_CheckExact(obj)) {
        val = __Pyx_PyBytes_AsDouble(obj);
    } else if (PyByteArray_CheckExact(obj)) {
        val = __Pyx_PyByteArray_AsDouble(obj);
    } else {
        return PyNumber_Float(obj);
    }
    if (unlikely(val == -1 && PyErr_Occurred())) {
        return NULL;
    }
#if CYTHON_USE_PYLONG_INTERNALS
no_error:
#endif
    return PyFloat_FromDouble(val);
}

/* ModInt[int64_t] */
static CYTHON_INLINE int64_t __Pyx_mod_int64_t(int64_t a, int64_t b, int b_is_constant) {
    int64_t r = a % b;
    int64_t adapt_python = (b_is_constant ?
        ((r != 0) & ((r < 0) ^ (b < 0))) :
        ((r != 0) & ((r ^ b) < 0))
    );
    return r + adapt_python * b;
}

/* CIntToDigits (used by CIntToPyUnicode) */
static const char DIGIT_PAIRS_10[2*10*10+1] = {
    "00010203040506070809"
    "10111213141516171819"
    "20212223242526272829"
    "30313233343536373839"
    "40414243444546474849"
    "50515253545556575859"
    "60616263646566676869"
    "70717273747576777879"
    "80818283848586878889"
    "90919293949596979899"
};
static const char DIGIT_PAIRS_8[2*8*8+1] = {
    "0001020304050607"
    "1011121314151617"
    "2021222324252627"
    "3031323334353637"
    "4041424344454647"
    "5051525354555657"
    "6061626364656667"
    "7071727374757677"
};
static const char DIGITS_HEX[2*16+1] = {
    "0123456789abcdef"
    "0123456789ABCDEF"
};

/* BuildPyUnicode (used by COrdinalToPyUnicode) */
static PyObject* __Pyx_PyUnicode_BuildFromAscii(Py_ssize_t ulength, const char* chars, int clength,
                                                int prepend_sign, char padding_char) {
    PyObject *uval;
    Py_ssize_t uoffset = ulength - clength;
#if CYTHON_USE_UNICODE_INTERNALS
    Py_ssize_t i;
    void *udata;
    uval = PyUnicode_New(ulength, 127);
    if (unlikely(!uval)) return NULL;
    udata = PyUnicode_DATA(uval);
    if (uoffset > 0) {
        i = 0;
        if (prepend_sign) {
            __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, 0, '-');
            i++;
        }
        for (; i < uoffset; i++) {
            __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, i, padding_char);
        }
    }
    for (i=0; i < clength; i++) {
        __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, uoffset+i, chars[i]);
    }
#else
    {
        PyObject *sign = NULL, *padding = NULL;
        uval = NULL;
        if (uoffset > 0) {
            prepend_sign = !!prepend_sign;
            if (uoffset > prepend_sign) {
                padding = PyUnicode_FromOrdinal(padding_char);
                if (likely(padding) && uoffset > prepend_sign + 1) {
                    PyObject *tmp = PySequence_Repeat(padding, uoffset - prepend_sign);
                    Py_DECREF(padding);
                    padding = tmp;
                }
                if (unlikely(!padding)) goto done_or_error;
            }
            if (prepend_sign) {
                sign = PyUnicode_FromOrdinal('-');
                if (unlikely(!sign)) goto done_or_error;
            }
        }
        uval = PyUnicode_DecodeASCII(chars, clength, NULL);
        if (likely(uval) && padding) {
            PyObject *tmp = PyUnicode_Concat(padding, uval);
            Py_DECREF(uval);
            uval = tmp;
        }
        if (likely(uval) && sign) {
            PyObject *tmp = PyUnicode_Concat(sign, uval);
            Py_DECREF(uval);
            uval = tmp;
        }
done_or_error:
        Py_XDECREF(padding);
        Py_XDECREF(sign);
    }
#endif
    return uval;
}

/* COrdinalToPyUnicode (used by CIntToPyUnicode) */
static CYTHON_INLINE int __Pyx_CheckUnicodeValue(int value) {
    return value <= 1114111;
}
static PyObject* __Pyx_PyUnicode_FromOrdinal_Padded(int value, Py_ssize_t ulength, char padding_char) {
    Py_ssize_t padding_length = ulength - 1;
    if (likely((padding_length <= 250) && (value < 0xD800 || value > 0xDFFF))) {
        char chars[256];
        if (value <= 255) {
            memset(chars, padding_char, (size_t) padding_length);
            chars[ulength-1] = (char) value;
            return PyUnicode_DecodeLatin1(chars, ulength, NULL);
        }
        char *cpos = chars + sizeof(chars);
        if (value < 0x800) {
            *--cpos = (char) (0x80 | (value & 0x3f));
            value >>= 6;
            *--cpos = (char) (0xc0 | (value & 0x1f));
        } else if (value < 0x10000) {
            *--cpos = (char) (0x80 | (value & 0x3f));
            value >>= 6;
            *--cpos = (char) (0x80 | (value & 0x3f));
            value >>= 6;
            *--cpos = (char) (0xe0 | (value & 0x0f));
        } else {
            *--cpos = (char) (0x80 | (value & 0x3f));
            value >>= 6;
            *--cpos = (char) (0x80 | (value & 0x3f));
            value >>= 6;
            *--cpos = (char) (0x80 | (value & 0x3f));
            value >>= 6;
            *--cpos = (char) (0xf0 | (value & 0x07));
        }
        cpos -= padding_length;
        memset(cpos, padding_char, (size_t) padding_length);
        return PyUnicode_DecodeUTF8(cpos, chars + sizeof(chars) - cpos, NULL);
    }
    if (value <= 127 && CYTHON_USE_UNICODE_INTERNALS) {
        const char chars[1] = {(char) value};
        return __Pyx_PyUnicode_BuildFromAscii(ulength, chars, 1, 0, padding_char);
    }
    {
        PyObject *uchar, *padding_uchar, *padding, *result;
        padding_uchar = PyUnicode_FromOrdinal(padding_char);
        if (unlikely(!padding_uchar)) return NULL;
        padding = PySequence_Repeat(padding_uchar, padding_length);
        Py_DECREF(padding_uchar);
        if (unlikely(!padding)) return NULL;
        uchar = PyUnicode_FromOrdinal(value);
        if (unlikely(!uchar)) {
            Py_DECREF(padding);
            return NULL;
        }
        result = PyUnicode_Concat(padding, uchar);
        Py_DECREF(padding);
        Py_DECREF(uchar);
        return result;
    }
}

/* CIntToPyUnicode */
static CYTHON_INLINE PyObject* __Pyx_uchar___Pyx_PyUnicode_From_int64_t(int64_t value, Py_ssize_t width, char padding_char) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const int64_t neg_one = (int64_t) -1, const_zero = (int64_t) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (unlikely(!(is_unsigned || value == 0 || value > 0) ||
                    !(sizeof(value) <= 2 || value & ~ (int64_t) 0x01fffff || __Pyx_CheckUnicodeValue((int) value)))) {
        PyErr_SetString(PyExc_OverflowError, "%c arg not in range(0x110000)");
        return NULL;
    }
    if (width <= 1) {
        return PyUnicode_FromOrdinal((int) value);
    }
    return __Pyx_PyUnicode_FromOrdinal_Padded((int) value, width, padding_char);
}
static CYTHON_INLINE PyObject* __Pyx____Pyx_PyUnicode_From_int64_t(int64_t value, Py_ssize_t width, char padding_char, char format_char) {
    char digits[sizeof(int64_t)*3+2];
    char *dpos, *end = digits + sizeof(int64_t)*3+2;
    const char *hex_digits = DIGITS_HEX;
    Py_ssize_t length, ulength;
    int prepend_sign, last_one_off;
    int64_t remaining;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const int64_t neg_one = (int64_t) -1, const_zero = (int64_t) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (format_char == 'X') {
        hex_digits += 16;
        format_char = 'x';
    }
    remaining = value;
    last_one_off = 0;
    dpos = end;
    do {
        int digit_pos;
        switch (format_char) {
        case 'o':
            digit_pos = abs((int)(remaining % (8*8)));
            remaining = (int64_t) (remaining / (8*8));
            dpos -= 2;
            memcpy(dpos, DIGIT_PAIRS_8 + digit_pos * 2, 2);
            last_one_off = (digit_pos < 8);
            break;
        case 'd':
            digit_pos = abs((int)(remaining % (10*10)));
            remaining = (int64_t) (remaining / (10*10));
            dpos -= 2;
            memcpy(dpos, DIGIT_PAIRS_10 + digit_pos * 2, 2);
            last_one_off = (digit_pos < 10);
            break;
        case 'x':
            *(--dpos) = hex_digits[abs((int)(remaining % 16))];
            remaining = (int64_t) (remaining / 16);
            break;
        default:
            assert(0);
            break;
        }
    } while (unlikely(remaining != 0));
    assert(!last_one_off || *dpos == '0');
    dpos += last_one_off;
    length = end - dpos;
    ulength = length;
    prepend_sign = 0;
    if (!is_unsigned && value <= neg_one) {
        if (padding_char == ' ' || width <= length + 1) {
            *(--dpos) = '-';
            ++length;
        } else {
            prepend_sign = 1;
        }
        ++ulength;
    }
    if (width > ulength) {
        ulength = width;
    }
    if (ulength == 1) {
        return PyUnicode_FromOrdinal(*dpos);
    }
    return __Pyx_PyUnicode_BuildFromAscii(ulength, dpos, (int) length, prepend_sign, padding_char);
}

/* DivInt[int64_t] */
static CYTHON_INLINE int64_t __Pyx_div_int64_t(int64_t a, int64_t b, int b_is_constant) {
    int64_t q = a / b;
    int64_t r = a - q*b;
    int64_t adapt_python = (b_is_constant ?
        ((r != 0) & ((r < 0) ^ (b < 0))) :
        ((r != 0) & ((r ^ b) < 0))
    );
    return q - adapt_python;
}

/* PyLongBinop */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_Fallback___Pyx_PyLong_AddObjC(PyObject *op1, PyObject *op2, int inplace) {
    return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);
}
#if CYTHON_USE_PYLONG_INTERNALS
static PyObject* __Pyx_Unpacked___Pyx_PyLong_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) {
    CYTHON_MAYBE_UNUSED_VAR(inplace);
    CYTHON_UNUSED_VAR(zerodivision_check);
    const long b = intval;
    long a;
    const PY_LONG_LONG llb = intval;
    PY_LONG_LONG lla;
    if (unlikely(__Pyx_PyLong_IsZero(op1))) {
        return __Pyx_NewRef(op2);
    }
    const int is_positive = __Pyx_PyLong_IsPos(op1);
    const digit* digits = __Pyx_PyLong_Digits(op1);
    const Py_ssize_t size = __Pyx_PyLong_DigitCount(op1);
    if (likely(size == 1)) {
        a = (long) digits[0];
        if (!is_positive) a *= -1;
    } 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]));
                    if (!is_positive) a *= -1;
                    goto calculate_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]));
                    if (!is_positive) lla *= -1;
                    goto calculate_long_long;
                }
                break;
            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]));
                    if (!is_positive) a *= -1;
                    goto calculate_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]));
                    if (!is_positive) lla *= -1;
                    goto calculate_long_long;
                }
                break;
            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]));
                    if (!is_positive) a *= -1;
                    goto calculate_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]));
                    if (!is_positive) lla *= -1;
                    goto calculate_long_long;
                }
                break;
        }
        return PyLong_Type.tp_as_number->nb_add(op1, op2);
    }
    calculate_long:
        {
            long x;
            x = a + b;
            return PyLong_FromLong(x);
        }
    calculate_long_long:
        {
            PY_LONG_LONG llx;
            llx = lla + llb;
            return PyLong_FromLongLong(llx);
        }
    
}
#endif
static PyObject* __Pyx_Float___Pyx_PyLong_AddObjC(PyObject *float_val, long intval, int zerodivision_check) {
    CYTHON_UNUSED_VAR(zerodivision_check);
    const long b = intval;
    double a = __Pyx_PyFloat_AS_DOUBLE(float_val);
        double result;
        
        result = ((double)a) + (double)b;
        return PyFloat_FromDouble(result);
}
static CYTHON_INLINE PyObject* __Pyx_PyLong_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) {
    CYTHON_MAYBE_UNUSED_VAR(intval);
    CYTHON_UNUSED_VAR(zerodivision_check);
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        return __Pyx_Unpacked___Pyx_PyLong_AddObjC(op1, op2, intval, inplace, zerodivision_check);
    }
    #endif
    if (PyFloat_CheckExact(op1)) {
        return __Pyx_Float___Pyx_PyLong_AddObjC(op1, intval, zerodivision_check);
    }
    return __Pyx_Fallback___Pyx_PyLong_AddObjC(op1, op2, inplace);
}
#endif

/* RaiseClosureNameError */
static void __Pyx_RaiseClosureNameError(const char *varname) {
    PyErr_Format(PyExc_NameError, "free variable '%s' referenced before assignment in enclosing scope", varname);
}

/* PyLongCompare */
static CYTHON_INLINE PyObject* __Pyx_PyLong_NeObjC(PyObject *op1, PyObject *op2, long intval, long inplace) {
    CYTHON_MAYBE_UNUSED_VAR(intval);
    CYTHON_UNUSED_VAR(inplace);
    if (op1 == op2) {
        Py_RETURN_FALSE;
    }
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        int unequal;
        unsigned long uintval;
        Py_ssize_t size = __Pyx_PyLong_DigitCount(op1);
        const digit* digits = __Pyx_PyLong_Digits(op1);
        if (intval == 0) {
            if (__Pyx_PyLong_IsZero(op1) != 1) Py_RETURN_TRUE; else Py_RETURN_FALSE;
        } else if (intval < 0) {
            if (__Pyx_PyLong_IsNonNeg(op1))
                Py_RETURN_TRUE;
            intval = -intval;
        } else {
            if (__Pyx_PyLong_IsNeg(op1))
                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 = __Pyx_PyFloat_AS_DOUBLE(op1);
        if ((double)a != (double)b) Py_RETURN_TRUE; else Py_RETURN_FALSE;
    }
    return (
        PyObject_RichCompare(op1, op2, Py_NE));
}

/* PyLongCompare */
static CYTHON_INLINE PyObject* __Pyx_PyLong_EqObjC(PyObject *op1, PyObject *op2, long intval, long inplace) {
    CYTHON_MAYBE_UNUSED_VAR(intval);
    CYTHON_UNUSED_VAR(inplace);
    if (op1 == op2) {
        Py_RETURN_TRUE;
    }
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        int unequal;
        unsigned long uintval;
        Py_ssize_t size = __Pyx_PyLong_DigitCount(op1);
        const digit* digits = __Pyx_PyLong_Digits(op1);
        if (intval == 0) {
            if (__Pyx_PyLong_IsZero(op1) == 1) Py_RETURN_TRUE; else Py_RETURN_FALSE;
        } else if (intval < 0) {
            if (__Pyx_PyLong_IsNonNeg(op1))
                Py_RETURN_FALSE;
            intval = -intval;
        } else {
            if (__Pyx_PyLong_IsNeg(op1))
                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 = __Pyx_PyFloat_AS_DOUBLE(op1);
        if ((double)a == (double)b) Py_RETURN_TRUE; else Py_RETURN_FALSE;
    }
    return (
        PyObject_RichCompare(op1, op2, Py_EQ));
}

/* PyLongCompare */
static CYTHON_INLINE int __Pyx_PyLong_BoolEqObjC(PyObject *op1, PyObject *op2, long intval, long inplace) {
    CYTHON_MAYBE_UNUSED_VAR(intval);
    CYTHON_UNUSED_VAR(inplace);
    if (op1 == op2) {
        return 1;
    }
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        int unequal;
        unsigned long uintval;
        Py_ssize_t size = __Pyx_PyLong_DigitCount(op1);
        const digit* digits = __Pyx_PyLong_Digits(op1);
        if (intval == 0) {
            return (__Pyx_PyLong_IsZero(op1) == 1);
        } else if (intval < 0) {
            if (__Pyx_PyLong_IsNonNeg(op1))
                return 0;
            intval = -intval;
        } else {
            if (__Pyx_PyLong_IsNeg(op1))
                return 0;
        }
        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));
        return (unequal == 0);
    }
    #endif
    if (PyFloat_CheckExact(op1)) {
        const long b = intval;
        double a = __Pyx_PyFloat_AS_DOUBLE(op1);
        return ((double)a == (double)b);
    }
    return __Pyx_PyObject_IsTrueAndDecref(
        PyObject_RichCompare(op1, op2, Py_EQ));
}

/* CIntToPyUnicode */
static CYTHON_INLINE PyObject* __Pyx_uchar___Pyx_PyUnicode_From_Py_ssize_t(Py_ssize_t value, Py_ssize_t width, char padding_char) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const Py_ssize_t neg_one = (Py_ssize_t) -1, const_zero = (Py_ssize_t) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (unlikely(!(is_unsigned || value == 0 || value > 0) ||
                    !(sizeof(value) <= 2 || value & ~ (Py_ssize_t) 0x01fffff || __Pyx_CheckUnicodeValue((int) value)))) {
        PyErr_SetString(PyExc_OverflowError, "%c arg not in range(0x110000)");
        return NULL;
    }
    if (width <= 1) {
        return PyUnicode_FromOrdinal((int) value);
    }
    return __Pyx_PyUnicode_FromOrdinal_Padded((int) value, width, padding_char);
}
static CYTHON_INLINE PyObject* __Pyx____Pyx_PyUnicode_From_Py_ssize_t(Py_ssize_t value, Py_ssize_t width, char padding_char, char format_char) {
    char digits[sizeof(Py_ssize_t)*3+2];
    char *dpos, *end = digits + sizeof(Py_ssize_t)*3+2;
    const char *hex_digits = DIGITS_HEX;
    Py_ssize_t length, ulength;
    int prepend_sign, last_one_off;
    Py_ssize_t remaining;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const Py_ssize_t neg_one = (Py_ssize_t) -1, const_zero = (Py_ssize_t) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (format_char == 'X') {
        hex_digits += 16;
        format_char = 'x';
    }
    remaining = value;
    last_one_off = 0;
    dpos = end;
    do {
        int digit_pos;
        switch (format_char) {
        case 'o':
            digit_pos = abs((int)(remaining % (8*8)));
            remaining = (Py_ssize_t) (remaining / (8*8));
            dpos -= 2;
            memcpy(dpos, DIGIT_PAIRS_8 + digit_pos * 2, 2);
            last_one_off = (digit_pos < 8);
            break;
        case 'd':
            digit_pos = abs((int)(remaining % (10*10)));
            remaining = (Py_ssize_t) (remaining / (10*10));
            dpos -= 2;
            memcpy(dpos, DIGIT_PAIRS_10 + digit_pos * 2, 2);
            last_one_off = (digit_pos < 10);
            break;
        case 'x':
            *(--dpos) = hex_digits[abs((int)(remaining % 16))];
            remaining = (Py_ssize_t) (remaining / 16);
            break;
        default:
            assert(0);
            break;
        }
    } while (unlikely(remaining != 0));
    assert(!last_one_off || *dpos == '0');
    dpos += last_one_off;
    length = end - dpos;
    ulength = length;
    prepend_sign = 0;
    if (!is_unsigned && value <= neg_one) {
        if (padding_char == ' ' || width <= length + 1) {
            *(--dpos) = '-';
            ++length;
        } else {
            prepend_sign = 1;
        }
        ++ulength;
    }
    if (width > ulength) {
        ulength = width;
    }
    if (ulength == 1) {
        return PyUnicode_FromOrdinal(*dpos);
    }
    return __Pyx_PyUnicode_BuildFromAscii(ulength, dpos, (int) length, prepend_sign, padding_char);
}

/* MergeKeywords */
static int __Pyx_MergeKeywords_dict(PyObject *kwdict, PyObject *source_dict) {
    Py_ssize_t len1, len2;
    len2 = PyDict_Size(source_dict);
    if (unlikely(len2 == -1)) return -1;
    if (len2 == 0) {
        return 0;
    }
    len1 = PyDict_Size(kwdict);
    if (unlikely(len1 == -1)) return -1;
    if (len1 > 0) {
        PyObject *key, *smaller_dict, *larger_dict;
        #if CYTHON_AVOID_BORROWED_REFS
        PyObject *ppos = NULL;
        #else
        Py_ssize_t ppos = 0;
        #endif
        int duplicates_found = 0;
        if (len1 <= len2) {
            smaller_dict = kwdict;
            larger_dict = source_dict;
        } else {
            smaller_dict = source_dict;
            larger_dict = kwdict;
        }
        __Pyx_BEGIN_CRITICAL_SECTION(smaller_dict);
        while (
            #if CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
            __Pyx_PyDict_NextRef(smaller_dict, &ppos, &key, NULL)
            #else
            PyDict_Next(smaller_dict, &ppos, &key, NULL)
            #endif
        ) {
            if (unlikely(PyDict_Contains(larger_dict, key))) {
                __Pyx_RaiseDoubleKeywordsError("function", key);
                #if CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
                Py_DECREF(key);
                #endif
                duplicates_found = 1;
                break;
            };
            #if CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
            Py_DECREF(key);
            #endif
        }
        __Pyx_END_CRITICAL_SECTION();
        #if CYTHON_AVOID_BORROWED_REFS
        Py_XDECREF(ppos);
        #endif
        if (unlikely(duplicates_found))
            return -1;
    }
    return PyDict_Update(kwdict, source_dict);
}
static int __Pyx_MergeKeywords_any(PyObject *kwdict, PyObject *source_mapping) {
    PyObject *iter, *key = NULL, *value = NULL;
    int source_is_dict, result;
    Py_ssize_t orig_length, ppos = 0;
    iter = __Pyx_dict_iterator(source_mapping, 0, __pyx_mstate_global->__pyx_n_u_items, &orig_length, &source_is_dict);
    if (unlikely(!iter)) {
        PyObject *args;
        if (unlikely(!PyErr_ExceptionMatches(PyExc_AttributeError))) goto bad;
        PyErr_Clear();
        args = PyTuple_Pack(1, source_mapping);
        if (likely(args)) {
            PyObject *fallback = PyObject_Call((PyObject*)&PyDict_Type, args, NULL);
            Py_DECREF(args);
            if (likely(fallback)) {
                result = __Pyx_MergeKeywords_dict(kwdict, fallback);
                Py_DECREF(fallback);
                return result;
            }
        }
        if (unlikely(!iter)) goto bad;
    }
    while (1) {
        result = __Pyx_dict_iter_next(iter, orig_length, &ppos, &key, &value, NULL, source_is_dict);
        if (unlikely(result < 0)) goto bad;
        if (!result) break;
    #if PY_VERSION_HEX >= 0x030d0000 && !CYTHON_COMPILING_IN_LIMITED_API
        {
            int inserted = PyDict_SetDefaultRef(kwdict, key, value, NULL);
            if (unlikely(inserted != 0)) {
                if (inserted == 1) __Pyx_RaiseDoubleKeywordsError("function", key);
                result = -1;
            }
        }
    #else
        if (unlikely(PyDict_Contains(kwdict, key))) {
            __Pyx_RaiseDoubleKeywordsError("function", key);
            result = -1;
        } else {
            result = PyDict_SetItem(kwdict, key, value);
        }
    #endif
        Py_DECREF(key);
        Py_DECREF(value);
        if (unlikely(result < 0)) goto bad;
    }
    Py_XDECREF(iter);
    return 0;
bad:
    Py_XDECREF(iter);
    return -1;
}
static CYTHON_INLINE int __Pyx_MergeKeywords(PyObject *kwdict, PyObject *source_mapping) {
    assert(PyDict_Check(kwdict));
    if (likely(PyDict_Check(source_mapping))) {
        return __Pyx_MergeKeywords_dict(kwdict, source_mapping);
    } else {
        return __Pyx_MergeKeywords_any(kwdict, source_mapping);
    }
}

/* CIntToPyUnicode */
static CYTHON_INLINE PyObject* __Pyx_uchar___Pyx_PyUnicode_From_int(int value, Py_ssize_t width, char padding_char) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const int neg_one = (int) -1, const_zero = (int) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (unlikely(!(is_unsigned || value == 0 || value > 0) ||
                    !(sizeof(value) <= 2 || value & ~ (int) 0x01fffff || __Pyx_CheckUnicodeValue((int) value)))) {
        PyErr_SetString(PyExc_OverflowError, "%c arg not in range(0x110000)");
        return NULL;
    }
    if (width <= 1) {
        return PyUnicode_FromOrdinal((int) value);
    }
    return __Pyx_PyUnicode_FromOrdinal_Padded((int) value, width, padding_char);
}
static CYTHON_INLINE PyObject* __Pyx____Pyx_PyUnicode_From_int(int value, Py_ssize_t width, char padding_char, char format_char) {
    char digits[sizeof(int)*3+2];
    char *dpos, *end = digits + sizeof(int)*3+2;
    const char *hex_digits = DIGITS_HEX;
    Py_ssize_t length, ulength;
    int prepend_sign, last_one_off;
    int remaining;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const int neg_one = (int) -1, const_zero = (int) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (format_char == 'X') {
        hex_digits += 16;
        format_char = 'x';
    }
    remaining = value;
    last_one_off = 0;
    dpos = end;
    do {
        int digit_pos;
        switch (format_char) {
        case 'o':
            digit_pos = abs((int)(remaining % (8*8)));
            remaining = (int) (remaining / (8*8));
            dpos -= 2;
            memcpy(dpos, DIGIT_PAIRS_8 + digit_pos * 2, 2);
            last_one_off = (digit_pos < 8);
            break;
        case 'd':
            digit_pos = abs((int)(remaining % (10*10)));
            remaining = (int) (remaining / (10*10));
            dpos -= 2;
            memcpy(dpos, DIGIT_PAIRS_10 + digit_pos * 2, 2);
            last_one_off = (digit_pos < 10);
            break;
        case 'x':
            *(--dpos) = hex_digits[abs((int)(remaining % 16))];
            remaining = (int) (remaining / 16);
            break;
        default:
            assert(0);
            break;
        }
    } while (unlikely(remaining != 0));
    assert(!last_one_off || *dpos == '0');
    dpos += last_one_off;
    length = end - dpos;
    ulength = length;
    prepend_sign = 0;
    if (!is_unsigned && value <= neg_one) {
        if (padding_char == ' ' || width <= length + 1) {
            *(--dpos) = '-';
            ++length;
        } else {
            prepend_sign = 1;
        }
        ++ulength;
    }
    if (width > ulength) {
        ulength = width;
    }
    if (ulength == 1) {
        return PyUnicode_FromOrdinal(*dpos);
    }
    return __Pyx_PyUnicode_BuildFromAscii(ulength, dpos, (int) length, prepend_sign, padding_char);
}

/* 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) {
    __Pyx_TypeName obj_type_name;
#if CYTHON_USE_TYPE_SLOTS
    PyMappingMethods* 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 = PyLong_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 = PyLong_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;
    }
    obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj));
    PyErr_Format(PyExc_TypeError,
        "'" __Pyx_FMT_TYPENAME "' object is unsliceable", obj_type_name);
    __Pyx_DECREF_TypeName(obj_type_name);
bad:
    return NULL;
}

/* PyLongBinop */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_Fallback___Pyx_PyLong_SubtractObjC(PyObject *op1, PyObject *op2, int inplace) {
    return (inplace ? PyNumber_InPlaceSubtract : PyNumber_Subtract)(op1, op2);
}
#if CYTHON_USE_PYLONG_INTERNALS
static PyObject* __Pyx_Unpacked___Pyx_PyLong_SubtractObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) {
    CYTHON_MAYBE_UNUSED_VAR(inplace);
    CYTHON_UNUSED_VAR(zerodivision_check);
    const long b = intval;
    long a;
    const PY_LONG_LONG llb = intval;
    PY_LONG_LONG lla;
    if (unlikely(__Pyx_PyLong_IsZero(op1))) {
        return PyLong_FromLong(-intval);
    }
    const int is_positive = __Pyx_PyLong_IsPos(op1);
    const digit* digits = __Pyx_PyLong_Digits(op1);
    const Py_ssize_t size = __Pyx_PyLong_DigitCount(op1);
    if (likely(size == 1)) {
        a = (long) digits[0];
        if (!is_positive) a *= -1;
    } 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]));
                    if (!is_positive) a *= -1;
                    goto calculate_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]));
                    if (!is_positive) lla *= -1;
                    goto calculate_long_long;
                }
                break;
            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]));
                    if (!is_positive) a *= -1;
                    goto calculate_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]));
                    if (!is_positive) lla *= -1;
                    goto calculate_long_long;
                }
                break;
            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]));
                    if (!is_positive) a *= -1;
                    goto calculate_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]));
                    if (!is_positive) lla *= -1;
                    goto calculate_long_long;
                }
                break;
        }
        return PyLong_Type.tp_as_number->nb_subtract(op1, op2);
    }
    calculate_long:
        {
            long x;
            x = a - b;
            return PyLong_FromLong(x);
        }
    calculate_long_long:
        {
            PY_LONG_LONG llx;
            llx = lla - llb;
            return PyLong_FromLongLong(llx);
        }
    
}
#endif
static PyObject* __Pyx_Float___Pyx_PyLong_SubtractObjC(PyObject *float_val, long intval, int zerodivision_check) {
    CYTHON_UNUSED_VAR(zerodivision_check);
    const long b = intval;
    double a = __Pyx_PyFloat_AS_DOUBLE(float_val);
        double result;
        
        result = ((double)a) - (double)b;
        return PyFloat_FromDouble(result);
}
static CYTHON_INLINE PyObject* __Pyx_PyLong_SubtractObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) {
    CYTHON_MAYBE_UNUSED_VAR(intval);
    CYTHON_UNUSED_VAR(zerodivision_check);
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        return __Pyx_Unpacked___Pyx_PyLong_SubtractObjC(op1, op2, intval, inplace, zerodivision_check);
    }
    #endif
    if (PyFloat_CheckExact(op1)) {
        return __Pyx_Float___Pyx_PyLong_SubtractObjC(op1, intval, zerodivision_check);
    }
    return __Pyx_Fallback___Pyx_PyLong_SubtractObjC(op1, op2, inplace);
}
#endif

/* dict_getitem_default */
static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObject* default_value) {
    PyObject* value;
#if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07020000
    value = PyDict_GetItemWithError(d, key);
    if (unlikely(!value)) {
        if (unlikely(PyErr_Occurred()))
            return NULL;
        value = default_value;
    }
    Py_INCREF(value);
    if ((1));
#else
    if (PyBytes_CheckExact(key) || PyUnicode_CheckExact(key) || PyLong_CheckExact(key)) {
        value = PyDict_GetItem(d, key);
        if (unlikely(!value)) {
            value = default_value;
        }
        Py_INCREF(value);
    }
#endif
    else {
        if (default_value == Py_None)
            value = __Pyx_CallUnboundCMethod1(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_get, d, key);
        else
            value = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_get, d, key, default_value);
    }
    return value;
}

/* UnicodeConcatInPlace */
# if CYTHON_COMPILING_IN_CPYTHON
static int
__Pyx_unicode_modifiable(PyObject *unicode, int unsafe_shared)
{
    if (!__Pyx_IS_UNIQUELY_REFERENCED(unicode, unsafe_shared))
        return 0;
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX > 0x030F0000
    if (PyUnstable_Unicode_GET_CACHED_HASH(unicode) != -1)
        return 0;
#endif
    if (!PyUnicode_CheckExact(unicode))
        return 0;
    if (PyUnicode_CHECK_INTERNED(unicode))
        return 0;
    return 1;
}
static CYTHON_INLINE PyObject *__Pyx_PyUnicode_ConcatInPlaceImpl(PyObject **p_left, PyObject *right, int unsafe_shared
        #if CYTHON_REFNANNY
        , void* __pyx_refnanny
        #endif
    ) {
    PyObject *left = *p_left;
    Py_ssize_t left_len, right_len, new_len;
    if (unlikely(__Pyx_PyUnicode_READY(left) == -1))
        return NULL;
    if (unlikely(__Pyx_PyUnicode_READY(right) == -1))
        return NULL;
    left_len = PyUnicode_GET_LENGTH(left);
    if (left_len == 0) {
        Py_INCREF(right);
        return right;
    }
    right_len = PyUnicode_GET_LENGTH(right);
    if (right_len == 0) {
        Py_INCREF(left);
        return left;
    }
    if (unlikely(left_len > PY_SSIZE_T_MAX - right_len)) {
        PyErr_SetString(PyExc_OverflowError,
                        "strings are too large to concat");
        return NULL;
    }
    new_len = left_len + right_len;
    if (__Pyx_unicode_modifiable(left, unsafe_shared)
            && PyUnicode_CheckExact(right)
            && PyUnicode_KIND(right) <= PyUnicode_KIND(left)
            && !(PyUnicode_IS_ASCII(left) && !PyUnicode_IS_ASCII(right))) {
        int ret;
        __Pyx_GIVEREF(*p_left);
        ret = PyUnicode_Resize(p_left, new_len);
        __Pyx_GOTREF(*p_left);
        if (unlikely(ret != 0))
            return NULL;
        #if PY_VERSION_HEX >= 0x030d0000
        if (unlikely(PyUnicode_CopyCharacters(*p_left, left_len, right, 0, right_len) < 0)) return NULL;
        #else
        _PyUnicode_FastCopyCharacters(*p_left, left_len, right, 0, right_len);
        #endif
        __Pyx_INCREF(*p_left);
        __Pyx_GIVEREF(*p_left);
        return *p_left;
    } else {
        return __Pyx_PyUnicode_Concat(left, right);
    }
  }
#endif

/* PyLongBinop */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_Fallback___Pyx_PyLong_FloorDivideObjC(PyObject *op1, PyObject *op2, int inplace) {
    return (inplace ? PyNumber_InPlaceFloorDivide : PyNumber_FloorDivide)(op1, op2);
}
#if CYTHON_USE_PYLONG_INTERNALS
static PyObject* __Pyx_Unpacked___Pyx_PyLong_FloorDivideObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) {
    CYTHON_MAYBE_UNUSED_VAR(inplace);
    CYTHON_UNUSED_VAR(zerodivision_check);
    const long b = intval;
    long a;
    const PY_LONG_LONG llb = intval;
    PY_LONG_LONG lla;
    if (unlikely(__Pyx_PyLong_IsZero(op1))) {
        return __Pyx_NewRef(op1);
    }
    const int is_positive = __Pyx_PyLong_IsPos(op1);
    const digit* digits = __Pyx_PyLong_Digits(op1);
    const Py_ssize_t size = __Pyx_PyLong_DigitCount(op1);
    if (likely(size == 1)) {
        a = (long) digits[0];
        if (!is_positive) a *= -1;
    } 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]));
                    if (!is_positive) a *= -1;
                    goto calculate_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]));
                    if (!is_positive) lla *= -1;
                    goto calculate_long_long;
                }
                break;
            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]));
                    if (!is_positive) a *= -1;
                    goto calculate_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]));
                    if (!is_positive) lla *= -1;
                    goto calculate_long_long;
                }
                break;
            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]));
                    if (!is_positive) a *= -1;
                    goto calculate_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]));
                    if (!is_positive) lla *= -1;
                    goto calculate_long_long;
                }
                break;
        }
        return PyLong_Type.tp_as_number->nb_floor_divide(op1, op2);
    }
    calculate_long:
        {
            long q, r;
            q = a / b;
            r = a - q*b;
            q -= ((r != 0) & ((r ^ b) < 0));
            return PyLong_FromLong(q);
        }
    calculate_long_long:
        {
            PY_LONG_LONG q, r;
            q = lla / llb;
            r = lla - q*llb;
            q -= ((r != 0) & ((r ^ llb) < 0));
            return PyLong_FromLongLong(q);
        }
    
}
#endif
static CYTHON_INLINE PyObject* __Pyx_PyLong_FloorDivideObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) {
    CYTHON_MAYBE_UNUSED_VAR(intval);
    CYTHON_UNUSED_VAR(zerodivision_check);
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        return __Pyx_Unpacked___Pyx_PyLong_FloorDivideObjC(op1, op2, intval, inplace, zerodivision_check);
    }
    #endif
    return __Pyx_Fallback___Pyx_PyLong_FloorDivideObjC(op1, op2, inplace);
}
#endif

/* StringJoin */
static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* values) {
    (void) __Pyx_PyObject_CallMethod1;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030e0000 || defined(PyBytes_Join)
    return PyBytes_Join(sep, values);
#elif CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030d0000 || defined(_PyBytes_Join)
    return _PyBytes_Join(sep, values);
#else
    return __Pyx_PyObject_CallMethod1(sep, __pyx_mstate_global->__pyx_n_u_join, values);
#endif
}

/* dict_setdefault (used by FetchCommonType) */
static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value) {
    PyObject* value;
#if __PYX_LIMITED_VERSION_HEX >= 0x030F0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4)
    PyDict_SetDefaultRef(d, key, default_value, &value);
#elif CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX >= 0x030C0000
    PyObject *args[] = {d, key, default_value};
    value = PyObject_VectorcallMethod(__pyx_mstate_global->__pyx_n_u_setdefault, args, 3 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL);
#elif CYTHON_COMPILING_IN_LIMITED_API
    value = PyObject_CallMethodObjArgs(d, __pyx_mstate_global->__pyx_n_u_setdefault, key, default_value, NULL);
#else
    value = PyDict_SetDefault(d, key, default_value);
    if (unlikely(!value)) return NULL;
    Py_INCREF(value);
#endif
    return value;
}

/* LimitedApiGetTypeDict (used by SetItemOnTypeDict) */
#if CYTHON_COMPILING_IN_LIMITED_API
static Py_ssize_t __Pyx_GetTypeDictOffset(void) {
    PyObject *tp_dictoffset_o;
    Py_ssize_t tp_dictoffset;
    tp_dictoffset_o = PyObject_GetAttrString((PyObject*)(&PyType_Type), "__dictoffset__");
    if (unlikely(!tp_dictoffset_o)) return -1;
    tp_dictoffset = PyLong_AsSsize_t(tp_dictoffset_o);
    Py_DECREF(tp_dictoffset_o);
    if (unlikely(tp_dictoffset == 0)) {
        PyErr_SetString(
            PyExc_TypeError,
            "'type' doesn't have a dictoffset");
        return -1;
    } else if (unlikely(tp_dictoffset < 0)) {
        PyErr_SetString(
            PyExc_TypeError,
            "'type' has an unexpected negative dictoffset. "
            "Please report this as Cython bug");
        return -1;
    }
    return tp_dictoffset;
}
static PyObject *__Pyx_GetTypeDict(PyTypeObject *tp) {
    static Py_ssize_t tp_dictoffset = 0;
    if (unlikely(tp_dictoffset == 0)) {
        tp_dictoffset = __Pyx_GetTypeDictOffset();
        if (unlikely(tp_dictoffset == -1 && PyErr_Occurred())) {
            tp_dictoffset = 0; // try again next time?
            return NULL;
        }
    }
    return *(PyObject**)((char*)tp + tp_dictoffset);
}
#endif

/* SetItemOnTypeDict (used by FixUpExtensionType) */
static int __Pyx__SetItemOnTypeDict(PyTypeObject *tp, PyObject *k, PyObject *v) {
    int result;
    PyObject *tp_dict;
#if CYTHON_COMPILING_IN_LIMITED_API
    tp_dict = __Pyx_GetTypeDict(tp);
    if (unlikely(!tp_dict)) return -1;
#else
    tp_dict = tp->tp_dict;
#endif
    result = PyDict_SetItem(tp_dict, k, v);
    if (likely(!result)) {
        PyType_Modified(tp);
        if (unlikely(PyObject_HasAttr(v, __pyx_mstate_global->__pyx_n_u_set_name))) {
            PyObject *setNameResult = PyObject_CallMethodObjArgs(v, __pyx_mstate_global->__pyx_n_u_set_name,  (PyObject *) tp, k, NULL);
            if (!setNameResult) return -1;
            Py_DECREF(setNameResult);
        }
    }
    return result;
}

/* FixUpExtensionType (used by FetchCommonType) */
static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type) {
#if __PYX_LIMITED_VERSION_HEX > 0x030900B1
    CYTHON_UNUSED_VAR(spec);
    CYTHON_UNUSED_VAR(type);
    CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict);
#else
    const PyType_Slot *slot = spec->slots;
    int changed = 0;
#if !CYTHON_COMPILING_IN_LIMITED_API
    while (slot && slot->slot && slot->slot != Py_tp_members)
        slot++;
    if (slot && slot->slot == Py_tp_members) {
#if !CYTHON_COMPILING_IN_CPYTHON
        const
#endif  // !CYTHON_COMPILING_IN_CPYTHON)
            PyMemberDef *memb = (PyMemberDef*) slot->pfunc;
        while (memb && memb->name) {
            if (memb->name[0] == '_' && memb->name[1] == '_') {
                if (strcmp(memb->name, "__weaklistoffset__") == 0) {
                    assert(memb->type == T_PYSSIZET);
                    assert(memb->flags == READONLY);
                    type->tp_weaklistoffset = memb->offset;
                    changed = 1;
                }
                else if (strcmp(memb->name, "__dictoffset__") == 0) {
                    assert(memb->type == T_PYSSIZET);
                    assert(memb->flags == READONLY);
                    type->tp_dictoffset = memb->offset;
                    changed = 1;
                }
#if CYTHON_METH_FASTCALL
                else if (strcmp(memb->name, "__vectorcalloffset__") == 0) {
                    assert(memb->type == T_PYSSIZET);
                    assert(memb->flags == READONLY);
                    type->tp_vectorcall_offset = memb->offset;
                    changed = 1;
                }
#endif  // CYTHON_METH_FASTCALL
#if !CYTHON_COMPILING_IN_PYPY
                else if (strcmp(memb->name, "__module__") == 0) {
                    PyObject *descr;
                    assert(memb->type == T_OBJECT);
                    assert(memb->flags == 0 || memb->flags == READONLY);
                    descr = PyDescr_NewMember(type, memb);
                    if (unlikely(!descr))
                        return -1;
                    int set_item_result = PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr);
                    Py_DECREF(descr);
                    if (unlikely(set_item_result < 0)) {
                        return -1;
                    }
                    changed = 1;
                }
#endif  // !CYTHON_COMPILING_IN_PYPY
            }
            memb++;
        }
    }
#endif  // !CYTHON_COMPILING_IN_LIMITED_API
#if !CYTHON_COMPILING_IN_PYPY
    slot = spec->slots;
    while (slot && slot->slot && slot->slot != Py_tp_getset)
        slot++;
    if (slot && slot->slot == Py_tp_getset) {
        PyGetSetDef *getset = (PyGetSetDef*) slot->pfunc;
        while (getset && getset->name) {
            if (getset->name[0] == '_' && getset->name[1] == '_' && strcmp(getset->name, "__module__") == 0) {
                PyObject *descr = PyDescr_NewGetSet(type, getset);
                if (unlikely(!descr))
                    return -1;
                #if CYTHON_COMPILING_IN_LIMITED_API
                PyObject *pyname = PyUnicode_FromString(getset->name);
                if (unlikely(!pyname)) {
                    Py_DECREF(descr);
                    return -1;
                }
                int set_item_result = __Pyx_SetItemOnTypeDict(type, pyname, descr);
                Py_DECREF(pyname);
                #else
                CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict);
                int set_item_result = PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr);
                #endif
                Py_DECREF(descr);
                if (unlikely(set_item_result < 0)) {
                    return -1;
                }
                changed = 1;
            }
            ++getset;
        }
    }
#else
    CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict);
#endif  // !CYTHON_COMPILING_IN_PYPY
    if (changed)
        PyType_Modified(type);
#endif  // PY_VERSION_HEX > 0x030900B1
    return 0;
}

/* AddModuleRef (used by FetchSharedCythonModule) */
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
  static PyObject *__Pyx_PyImport_AddModuleObjectRef(PyObject *name) {
      PyObject *module_dict = PyImport_GetModuleDict();
      PyObject *m;
      if (PyMapping_GetOptionalItem(module_dict, name, &m) < 0) {
          return NULL;
      }
      if (m != NULL && PyModule_Check(m)) {
          return m;
      }
      Py_XDECREF(m);
      m = PyModule_NewObject(name);
      if (m == NULL)
          return NULL;
      if (PyDict_CheckExact(module_dict)) {
          PyObject *new_m;
          (void)PyDict_SetDefaultRef(module_dict, name, m, &new_m);
          Py_DECREF(m);
          return new_m;
      } else {
           if (PyObject_SetItem(module_dict, name, m) != 0) {
                Py_DECREF(m);
                return NULL;
            }
            return m;
      }
  }
  static PyObject *__Pyx_PyImport_AddModuleRef(const char *name) {
      PyObject *py_name = PyUnicode_FromString(name);
      if (!py_name) return NULL;
      PyObject *module = __Pyx_PyImport_AddModuleObjectRef(py_name);
      Py_DECREF(py_name);
      return module;
  }
#elif __PYX_LIMITED_VERSION_HEX >= 0x030d0000
  #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name)
#else
  static PyObject *__Pyx_PyImport_AddModuleRef(const char *name) {
      PyObject *module = PyImport_AddModule(name);
      Py_XINCREF(module);
      return module;
  }
#endif

/* FetchSharedCythonModule (used by FetchCommonType) */
static PyObject *__Pyx_FetchSharedCythonABIModule(void) {
    return __Pyx_PyImport_AddModuleRef(__PYX_ABI_MODULE_NAME);
}

/* FetchCommonType (used by CommonTypesMetaclass) */
#if __PYX_LIMITED_VERSION_HEX < 0x030C0000
static PyObject* __Pyx_PyType_FromMetaclass(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases) {
    PyObject *result = __Pyx_PyType_FromModuleAndSpec(module, spec, bases);
    if (result && metaclass) {
        PyObject *old_tp = (PyObject*)Py_TYPE(result);
    Py_INCREF((PyObject*)metaclass);
#if __PYX_LIMITED_VERSION_HEX >= 0x03090000
        Py_SET_TYPE(result, metaclass);
#else
        result->ob_type = metaclass;
#endif
        Py_DECREF(old_tp);
    }
    return result;
}
#else
#define __Pyx_PyType_FromMetaclass(me, mo, s, b) PyType_FromMetaclass(me, mo, s, b)
#endif
static int __Pyx_VerifyCachedType(PyObject *cached_type,
                               const char *name,
                               Py_ssize_t expected_basicsize) {
    Py_ssize_t basicsize;
    if (!PyType_Check(cached_type)) {
        PyErr_Format(PyExc_TypeError,
            "Shared Cython type %.200s is not a type object", name);
        return -1;
    }
    if (expected_basicsize == 0) {
        return 0; // size is inherited, nothing useful to check
    }
#if CYTHON_COMPILING_IN_LIMITED_API
    PyObject *py_basicsize;
    py_basicsize = PyObject_GetAttrString(cached_type, "__basicsize__");
    if (unlikely(!py_basicsize)) return -1;
    basicsize = PyLong_AsSsize_t(py_basicsize);
    Py_DECREF(py_basicsize);
    py_basicsize = NULL;
    if (unlikely(basicsize == (Py_ssize_t)-1) && PyErr_Occurred()) return -1;
#else
    basicsize = ((PyTypeObject*) cached_type)->tp_basicsize;
#endif
    if (basicsize != expected_basicsize) {
        PyErr_Format(PyExc_TypeError,
            "Shared Cython type %.200s has the wrong size, try recompiling",
            name);
        return -1;
    }
    return 0;
}
static PyTypeObject *__Pyx_FetchCommonTypeFromSpec(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases) {
    PyObject *abi_module = NULL, *cached_type = NULL, *abi_module_dict, *new_cached_type, *py_object_name;
    int get_item_ref_result;
    const char* object_name = strrchr(spec->name, '.');
    object_name = object_name ? object_name+1 : spec->name;
    py_object_name = PyUnicode_FromString(object_name);
    if (!py_object_name) return NULL;
    abi_module = __Pyx_FetchSharedCythonABIModule();
    if (!abi_module) goto done;
    abi_module_dict = PyModule_GetDict(abi_module);
    if (!abi_module_dict) goto done;
    get_item_ref_result = __Pyx_PyDict_GetItemRef(abi_module_dict, py_object_name, &cached_type);
    if (get_item_ref_result == 1) {
        if (__Pyx_VerifyCachedType(
              cached_type,
              object_name,
              spec->basicsize) < 0) {
            goto bad;
        }
        goto done;
    } else if (unlikely(get_item_ref_result == -1)) {
        goto bad;
    }
    cached_type = __Pyx_PyType_FromMetaclass(
        metaclass,
        CYTHON_USE_MODULE_STATE ? module : abi_module,
        spec, bases);
    if (unlikely(!cached_type)) goto bad;
    if (unlikely(__Pyx_fix_up_extension_type_from_spec(spec, (PyTypeObject *) cached_type) < 0)) goto bad;
    new_cached_type = __Pyx_PyDict_SetDefault(abi_module_dict, py_object_name, cached_type);
    if (unlikely(new_cached_type != cached_type)) {
        if (unlikely(!new_cached_type)) goto bad;
        Py_DECREF(cached_type);
        cached_type = new_cached_type;
        if (__Pyx_VerifyCachedType(
                cached_type,
                object_name,
                spec->basicsize) < 0) {
            goto bad;
        }
        goto done;
    } else {
        Py_DECREF(new_cached_type);
    }
done:
    Py_XDECREF(abi_module);
    Py_DECREF(py_object_name);
    assert(cached_type == NULL || PyType_Check(cached_type));
    return (PyTypeObject *) cached_type;
bad:
    Py_XDECREF(cached_type);
    cached_type = NULL;
    goto done;
}

/* CommonTypesMetaclass (used by CythonFunctionShared) */
static PyObject* __pyx_CommonTypesMetaclass_get_module(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED void* context) {
    return PyUnicode_FromString(__PYX_ABI_MODULE_NAME);
}
#if __PYX_LIMITED_VERSION_HEX < 0x030A0000
static PyObject* __pyx_CommonTypesMetaclass_call(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED PyObject *args, CYTHON_UNUSED PyObject *kwds) {
    PyErr_SetString(PyExc_TypeError, "Cannot instantiate Cython internal types");
    return NULL;
}
static int __pyx_CommonTypesMetaclass_setattr(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED PyObject *attr, CYTHON_UNUSED PyObject *value) {
    PyErr_SetString(PyExc_TypeError, "Cython internal types are immutable");
    return -1;
}
#endif
static PyGetSetDef __pyx_CommonTypesMetaclass_getset[] = {
    {"__module__", __pyx_CommonTypesMetaclass_get_module, NULL, NULL, NULL},
    {0, 0, 0, 0, 0}
};
static PyType_Slot __pyx_CommonTypesMetaclass_slots[] = {
    {Py_tp_getset, (void *)__pyx_CommonTypesMetaclass_getset},
    #if __PYX_LIMITED_VERSION_HEX < 0x030A0000
    {Py_tp_call, (void*)__pyx_CommonTypesMetaclass_call},
    {Py_tp_new, (void*)__pyx_CommonTypesMetaclass_call},
    {Py_tp_setattro, (void*)__pyx_CommonTypesMetaclass_setattr},
    #endif
    {0, 0}
};
static PyType_Spec __pyx_CommonTypesMetaclass_spec = {
    __PYX_TYPE_MODULE_PREFIX "_common_types_metatype",
    0,
    0,
    Py_TPFLAGS_IMMUTABLETYPE |
    Py_TPFLAGS_DISALLOW_INSTANTIATION |
    Py_TPFLAGS_DEFAULT,
    __pyx_CommonTypesMetaclass_slots
};
static int __pyx_CommonTypesMetaclass_init(PyObject *module) {
    __pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module);
    PyObject *bases = PyTuple_Pack(1, &PyType_Type);
    if (unlikely(!bases)) {
        return -1;
    }
    mstate->__pyx_CommonTypesMetaclassType = __Pyx_FetchCommonTypeFromSpec(NULL, module, &__pyx_CommonTypesMetaclass_spec, bases);
    Py_DECREF(bases);
    if (unlikely(mstate->__pyx_CommonTypesMetaclassType == NULL)) {
        return -1;
    }
    return 0;
}

/* CallTypeTraverse (used by CythonFunctionShared) */
#if !CYTHON_USE_TYPE_SPECS || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x03090000)
#else
static int __Pyx_call_type_traverse(PyObject *o, int always_call, visitproc visit, void *arg) {
    #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x03090000
    if (__Pyx_get_runtime_version() < 0x03090000) return 0;
    #endif
    if (!always_call) {
        PyTypeObject *base = __Pyx_PyObject_GetSlot(o, tp_base, PyTypeObject*);
        unsigned long flags = PyType_GetFlags(base);
        if (flags & Py_TPFLAGS_HEAPTYPE) {
            return 0;
        }
    }
    Py_VISIT((PyObject*)Py_TYPE(o));
    return 0;
}
#endif

/* PyMethodNew (used by CythonFunctionShared) */
#if CYTHON_COMPILING_IN_LIMITED_API
static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) {
    PyObject *result;
    CYTHON_UNUSED_VAR(typ);
    if (!self)
        return __Pyx_NewRef(func);
    #if __PYX_LIMITED_VERSION_HEX >= 0x030C0000
    {
        PyObject *args[] = {func, self};
        result = PyObject_Vectorcall(__pyx_mstate_global->__Pyx_CachedMethodType, args, 2, NULL);
    }
    #else
    result = PyObject_CallFunctionObjArgs(__pyx_mstate_global->__Pyx_CachedMethodType, func, self, NULL);
    #endif
    return result;
}
#else
static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) {
    CYTHON_UNUSED_VAR(typ);
    if (!self)
        return __Pyx_NewRef(func);
    return PyMethod_New(func, self);
}
#endif

/* PyVectorcallFastCallDict (used by CythonFunctionShared) */
#if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL
static PyObject *__Pyx_PyVectorcall_FastCallDict_kw(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw)
{
    PyObject *res = NULL;
    PyObject *kwnames;
    PyObject **newargs;
    PyObject **kwvalues;
    Py_ssize_t i;
    #if CYTHON_AVOID_BORROWED_REFS
    PyObject *pos;
    #else
    Py_ssize_t pos;
    #endif
    size_t j;
    PyObject *key, *value;
    unsigned long keys_are_strings;
    #if !CYTHON_ASSUME_SAFE_SIZE
    Py_ssize_t nkw = PyDict_Size(kw);
    if (unlikely(nkw == -1)) return NULL;
    #else
    Py_ssize_t nkw = PyDict_GET_SIZE(kw);
    #endif
    newargs = (PyObject **)PyMem_Malloc((nargs + (size_t)nkw) * sizeof(args[0]));
    if (unlikely(newargs == NULL)) {
        PyErr_NoMemory();
        return NULL;
    }
    for (j = 0; j < nargs; j++) newargs[j] = args[j];
    kwnames = PyTuple_New(nkw);
    if (unlikely(kwnames == NULL)) {
        PyMem_Free(newargs);
        return NULL;
    }
    kwvalues = newargs + nargs;
    pos = 0;
    i = 0;
    keys_are_strings = Py_TPFLAGS_UNICODE_SUBCLASS;
    while (__Pyx_PyDict_NextRef(kw, &pos, &key, &value)) {
        keys_are_strings &=
        #if CYTHON_COMPILING_IN_LIMITED_API
            PyType_GetFlags(Py_TYPE(key));
        #else
            Py_TYPE(key)->tp_flags;
        #endif
        #if !CYTHON_ASSUME_SAFE_MACROS
        if (unlikely(PyTuple_SetItem(kwnames, i, key) < 0)) goto cleanup;
        #else
        PyTuple_SET_ITEM(kwnames, i, key);
        #endif
        kwvalues[i] = value;
        i++;
    }
    if (unlikely(!keys_are_strings)) {
        PyErr_SetString(PyExc_TypeError, "keywords must be strings");
        goto cleanup;
    }
    res = vc(func, newargs, nargs, kwnames);
cleanup:
    #if CYTHON_AVOID_BORROWED_REFS
    Py_DECREF(pos);
    #endif
    Py_DECREF(kwnames);
    for (i = 0; i < nkw; i++)
        Py_DECREF(kwvalues[i]);
    PyMem_Free(newargs);
    return res;
}
static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw)
{
    Py_ssize_t kw_size =
        likely(kw == NULL) ?
        0 :
#if !CYTHON_ASSUME_SAFE_SIZE
        PyDict_Size(kw);
#else
        PyDict_GET_SIZE(kw);
#endif
    if (kw_size == 0) {
        return vc(func, args, nargs, NULL);
    }
#if !CYTHON_ASSUME_SAFE_SIZE
    else if (unlikely(kw_size == -1)) {
        return NULL;
    }
#endif
    return __Pyx_PyVectorcall_FastCallDict_kw(func, vc, args, nargs, kw);
}
#endif

/* CythonFunctionShared (used by CythonFunction) */
#if CYTHON_COMPILING_IN_LIMITED_API
static CYTHON_INLINE int __Pyx__IsSameCyOrCFunctionNoMethod(PyObject *func, void (*cfunc)(void)) {
    if (__Pyx_CyFunction_Check(func)) {
        return PyCFunction_GetFunction(((__pyx_CyFunctionObject*)func)->func) == (PyCFunction) cfunc;
    } else if (PyCFunction_Check(func)) {
        return PyCFunction_GetFunction(func) == (PyCFunction) cfunc;
    }
    return 0;
}
static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)) {
    if ((PyObject*)Py_TYPE(func) == __pyx_mstate_global->__Pyx_CachedMethodType) {
        int result;
        PyObject *newFunc = PyObject_GetAttr(func, __pyx_mstate_global->__pyx_n_u_func);
        if (unlikely(!newFunc)) {
            PyErr_Clear(); // It's only an optimization, so don't throw an error
            return 0;
        }
        result = __Pyx__IsSameCyOrCFunctionNoMethod(newFunc, cfunc);
        Py_DECREF(newFunc);
        return result;
    }
    return __Pyx__IsSameCyOrCFunctionNoMethod(func, cfunc);
}
#else
static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)) {
    if (PyMethod_Check(func)) {
        func = PyMethod_GET_FUNCTION(func);
    }
    return __Pyx_CyOrPyCFunction_Check(func) && __Pyx_CyOrPyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc;
}
#endif
static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj) {
#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
    __Pyx_Py_XDECREF_SET(
        __Pyx_CyFunction_GetClassObj(f),
            ((classobj) ? __Pyx_NewRef(classobj) : NULL));
#else
    __Pyx_Py_XDECREF_SET(
        ((PyCMethodObject *) (f))->mm_class,
        (PyTypeObject*)((classobj) ? __Pyx_NewRef(classobj) : NULL));
#endif
}
static PyObject *
__Pyx_CyFunction_get_doc_locked(__pyx_CyFunctionObject *op)
{
    if (unlikely(op->func_doc == NULL)) {
#if CYTHON_COMPILING_IN_LIMITED_API
        op->func_doc = PyObject_GetAttrString(op->func, "__doc__");
        if (unlikely(!op->func_doc)) return NULL;
#else
        if (((PyCFunctionObject*)op)->m_ml->ml_doc) {
            op->func_doc = PyUnicode_FromString(((PyCFunctionObject*)op)->m_ml->ml_doc);
            if (unlikely(op->func_doc == NULL))
                return NULL;
        } else {
            Py_INCREF(Py_None);
            return Py_None;
        }
#endif
    }
    Py_INCREF(op->func_doc);
    return op->func_doc;
}
static PyObject *
__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, void *closure) {
    PyObject *result;
    CYTHON_UNUSED_VAR(closure);
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    result = __Pyx_CyFunction_get_doc_locked(op);
    __Pyx_END_CRITICAL_SECTION();
    return result;
}
static int
__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, void *context)
{
    CYTHON_UNUSED_VAR(context);
    if (value == NULL) {
        value = Py_None;
    }
    Py_INCREF(value);
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    __Pyx_Py_XDECREF_SET(op->func_doc, value);
    __Pyx_END_CRITICAL_SECTION();
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_name_locked(__pyx_CyFunctionObject *op)
{
    if (unlikely(op->func_name == NULL)) {
#if CYTHON_COMPILING_IN_LIMITED_API
        op->func_name = PyObject_GetAttrString(op->func, "__name__");
#else
        op->func_name = PyUnicode_InternFromString(((PyCFunctionObject*)op)->m_ml->ml_name);
#endif
        if (unlikely(op->func_name == NULL))
            return NULL;
    }
    Py_INCREF(op->func_name);
    return op->func_name;
}
static PyObject *
__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, void *context)
{
    PyObject *result = NULL;
    CYTHON_UNUSED_VAR(context);
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    result = __Pyx_CyFunction_get_name_locked(op);
    __Pyx_END_CRITICAL_SECTION();
    return result;
}
static int
__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, void *context)
{
    CYTHON_UNUSED_VAR(context);
    if (unlikely(value == NULL || !PyUnicode_Check(value))) {
        PyErr_SetString(PyExc_TypeError,
                        "__name__ must be set to a string object");
        return -1;
    }
    Py_INCREF(value);
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    __Pyx_Py_XDECREF_SET(op->func_name, value);
    __Pyx_END_CRITICAL_SECTION();
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, void *context)
{
    CYTHON_UNUSED_VAR(context);
    PyObject *result;
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    Py_INCREF(op->func_qualname);
    result = op->func_qualname;
    __Pyx_END_CRITICAL_SECTION();
    return result;
}
static int
__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, void *context)
{
    CYTHON_UNUSED_VAR(context);
    if (unlikely(value == NULL || !PyUnicode_Check(value))) {
        PyErr_SetString(PyExc_TypeError,
                        "__qualname__ must be set to a string object");
        return -1;
    }
    Py_INCREF(value);
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    __Pyx_Py_XDECREF_SET(op->func_qualname, value);
    __Pyx_END_CRITICAL_SECTION();
    return 0;
}
#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
static PyObject *
__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, void *context)
{
    CYTHON_UNUSED_VAR(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;
}
#endif
static PyObject *
__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, void *context)
{
    CYTHON_UNUSED_VAR(context);
    Py_INCREF(op->func_globals);
    return op->func_globals;
}
static PyObject *
__Pyx_CyFunction_get_closure(__pyx_CyFunctionObject *op, void *context)
{
    CYTHON_UNUSED_VAR(op);
    CYTHON_UNUSED_VAR(context);
    Py_INCREF(Py_None);
    return Py_None;
}
static PyObject *
__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, void *context)
{
    PyObject* result = (op->func_code) ? op->func_code : Py_None;
    CYTHON_UNUSED_VAR(context);
    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 = __Pyx_PySequence_ITEM(res, 0);
    if (unlikely(!op->defaults_tuple)) result = -1;
    else {
        op->defaults_kwdict = __Pyx_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, void *context) {
    CYTHON_UNUSED_VAR(context);
    if (!value) {
        value = Py_None;
    } else if (unlikely(value != Py_None && !PyTuple_Check(value))) {
        PyErr_SetString(PyExc_TypeError,
                        "__defaults__ must be set to a tuple object");
        return -1;
    }
    PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__defaults__ will not "
                 "currently affect the values used in function calls", 1);
    Py_INCREF(value);
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    __Pyx_Py_XDECREF_SET(op->defaults_tuple, value);
    __Pyx_END_CRITICAL_SECTION();
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_defaults_locked(__pyx_CyFunctionObject *op) {
    PyObject* result = op->defaults_tuple;
    if (unlikely(!result)) {
        if (op->defaults_getter) {
            if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL;
            result = op->defaults_tuple;
        } else {
            result = Py_None;
        }
    }
    Py_INCREF(result);
    return result;
}
static PyObject *
__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, void *context) {
    PyObject* result = NULL;
    CYTHON_UNUSED_VAR(context);
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    result = __Pyx_CyFunction_get_defaults_locked(op);
    __Pyx_END_CRITICAL_SECTION();
    return result;
}
static int
__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
    CYTHON_UNUSED_VAR(context);
    if (!value) {
        value = Py_None;
    } else if (unlikely(value != Py_None && !PyDict_Check(value))) {
        PyErr_SetString(PyExc_TypeError,
                        "__kwdefaults__ must be set to a dict object");
        return -1;
    }
    PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__kwdefaults__ will not "
                 "currently affect the values used in function calls", 1);
    Py_INCREF(value);
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    __Pyx_Py_XDECREF_SET(op->defaults_kwdict, value);
    __Pyx_END_CRITICAL_SECTION();
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_kwdefaults_locked(__pyx_CyFunctionObject *op) {
    PyObject* result = op->defaults_kwdict;
    if (unlikely(!result)) {
        if (op->defaults_getter) {
            if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL;
            result = op->defaults_kwdict;
        } else {
            result = Py_None;
        }
    }
    Py_INCREF(result);
    return result;
}
static PyObject *
__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, void *context) {
    PyObject* result;
    CYTHON_UNUSED_VAR(context);
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    result = __Pyx_CyFunction_get_kwdefaults_locked(op);
    __Pyx_END_CRITICAL_SECTION();
    return result;
}
static int
__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
    CYTHON_UNUSED_VAR(context);
    if (!value || value == Py_None) {
        value = NULL;
    } else if (unlikely(!PyDict_Check(value))) {
        PyErr_SetString(PyExc_TypeError,
                        "__annotations__ must be set to a dict object");
        return -1;
    }
    Py_XINCREF(value);
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    __Pyx_Py_XDECREF_SET(op->func_annotations, value);
    __Pyx_END_CRITICAL_SECTION();
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_annotations_locked(__pyx_CyFunctionObject *op) {
    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 PyObject *
__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, void *context) {
    PyObject *result;
    CYTHON_UNUSED_VAR(context);
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    result = __Pyx_CyFunction_get_annotations_locked(op);
    __Pyx_END_CRITICAL_SECTION();
    return result;
}
static PyObject *
__Pyx_CyFunction_get_is_coroutine_value(__pyx_CyFunctionObject *op) {
    int is_coroutine = op->flags & __Pyx_CYFUNCTION_COROUTINE;
    if (is_coroutine) {
        PyObject *is_coroutine_value, *module, *fromlist, *marker = __pyx_mstate_global->__pyx_n_u_is_coroutine;
        fromlist = PyList_New(1);
        if (unlikely(!fromlist)) return NULL;
        Py_INCREF(marker);
#if CYTHON_ASSUME_SAFE_MACROS
        PyList_SET_ITEM(fromlist, 0, marker);
#else
        if (unlikely(PyList_SetItem(fromlist, 0, marker) < 0)) {
            Py_DECREF(marker);
            Py_DECREF(fromlist);
            return NULL;
        }
#endif
        module = PyImport_ImportModuleLevelObject(__pyx_mstate_global->__pyx_n_u_asyncio_coroutines, NULL, NULL, fromlist, 0);
        Py_DECREF(fromlist);
        if (unlikely(!module)) goto ignore;
        is_coroutine_value = __Pyx_PyObject_GetAttrStr(module, marker);
        Py_DECREF(module);
        if (likely(is_coroutine_value)) {
            return is_coroutine_value;
        }
ignore:
        PyErr_Clear();
    }
    return __Pyx_PyBool_FromLong(is_coroutine);
}
static PyObject *
__Pyx_CyFunction_get_is_coroutine(__pyx_CyFunctionObject *op, void *context) {
    PyObject *result;
    CYTHON_UNUSED_VAR(context);
    if (op->func_is_coroutine) {
        return __Pyx_NewRef(op->func_is_coroutine);
    }
    result = __Pyx_CyFunction_get_is_coroutine_value(op);
    if (unlikely(!result))
        return NULL;
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    if (op->func_is_coroutine) {
        Py_DECREF(result);
        result = __Pyx_NewRef(op->func_is_coroutine);
    } else {
        op->func_is_coroutine = __Pyx_NewRef(result);
    }
    __Pyx_END_CRITICAL_SECTION();
    return result;
}
static void __Pyx_CyFunction_raise_argument_count_error(__pyx_CyFunctionObject *func, const char* message, Py_ssize_t size) {
#if CYTHON_COMPILING_IN_LIMITED_API
    PyObject *py_name = __Pyx_CyFunction_get_name(func, NULL);
    if (!py_name) return;
    PyErr_Format(PyExc_TypeError,
        "%.200S() %s (%" CYTHON_FORMAT_SSIZE_T "d given)",
        py_name, message, size);
    Py_DECREF(py_name);
#else
    const char* name = ((PyCFunctionObject*)func)->m_ml->ml_name;
    PyErr_Format(PyExc_TypeError,
        "%.200s() %s (%" CYTHON_FORMAT_SSIZE_T "d given)",
        name, message, size);
#endif
}
static void __Pyx_CyFunction_raise_type_error(__pyx_CyFunctionObject *func, const char* message) {
#if CYTHON_COMPILING_IN_LIMITED_API
    PyObject *py_name = __Pyx_CyFunction_get_name(func, NULL);
    if (!py_name) return;
    PyErr_Format(PyExc_TypeError,
        "%.200S() %s",
        py_name, message);
    Py_DECREF(py_name);
#else
    const char* name = ((PyCFunctionObject*)func)->m_ml->ml_name;
    PyErr_Format(PyExc_TypeError,
        "%.200s() %s",
        name, message);
#endif
}
#if CYTHON_COMPILING_IN_LIMITED_API
static PyObject *
__Pyx_CyFunction_get_module(__pyx_CyFunctionObject *op, void *context) {
    CYTHON_UNUSED_VAR(context);
    return PyObject_GetAttrString(op->func, "__module__");
}
static int
__Pyx_CyFunction_set_module(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
    CYTHON_UNUSED_VAR(context);
    return PyObject_SetAttrString(op->func, "__module__", value);
}
#endif
static PyGetSetDef __pyx_CyFunction_getsets[] = {
    {"func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
    {"__doc__",  (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
    {"func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
    {"__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
    {"__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0},
#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
    {"func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)PyObject_GenericSetDict, 0, 0},
    {"__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)PyObject_GenericSetDict, 0, 0},
#else
    {"func_dict", (getter)PyObject_GenericGetDict, (setter)PyObject_GenericSetDict, 0, 0},
    {"__dict__", (getter)PyObject_GenericGetDict, (setter)PyObject_GenericSetDict, 0, 0},
#endif
    {"func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
    {"__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
    {"func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
    {"__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
    {"func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
    {"__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
    {"func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
    {"__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
    {"__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0},
    {"__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0},
    {"_is_coroutine", (getter)__Pyx_CyFunction_get_is_coroutine, 0, 0, 0},
#if CYTHON_COMPILING_IN_LIMITED_API
    {"__module__", (getter)__Pyx_CyFunction_get_module, (setter)__Pyx_CyFunction_set_module, 0, 0},
#endif
    {0, 0, 0, 0, 0}
};
static PyMemberDef __pyx_CyFunction_members[] = {
#if !CYTHON_COMPILING_IN_LIMITED_API
    {"__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), 0, 0},
#endif
#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API
    {"__dictoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_dict), READONLY, 0},
#endif
#if CYTHON_METH_FASTCALL
#if CYTHON_COMPILING_IN_LIMITED_API
    {"__vectorcalloffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_vectorcall), READONLY, 0},
#else
    {"__vectorcalloffset__", T_PYSSIZET, offsetof(PyCFunctionObject, vectorcall), READONLY, 0},
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
    {"__weaklistoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_weakreflist), READONLY, 0},
#else
    {"__weaklistoffset__", T_PYSSIZET, offsetof(PyCFunctionObject, m_weakreflist), READONLY, 0},
#endif
#endif
    {0, 0, 0,  0, 0}
};
static PyObject *
__Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, PyObject *args)
{
    PyObject *result = NULL;
    CYTHON_UNUSED_VAR(args);
    __Pyx_BEGIN_CRITICAL_SECTION(m);
    Py_INCREF(m->func_qualname);
    result = m->func_qualname;
    __Pyx_END_CRITICAL_SECTION();
    return result;
}
static PyMethodDef __pyx_CyFunction_methods[] = {
    {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0},
    {0, 0, 0, 0}
};
#if CYTHON_COMPILING_IN_LIMITED_API
#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist)
#else
#define __Pyx_CyFunction_weakreflist(cyfunc) (((PyCFunctionObject*)cyfunc)->m_weakreflist)
#endif
static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject *op, PyMethodDef *ml, int flags, PyObject* qualname,
                                       PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
#if !CYTHON_COMPILING_IN_LIMITED_API
    PyCFunctionObject *cf = (PyCFunctionObject*) op;
#endif
    if (unlikely(op == NULL))
        return NULL;
#if CYTHON_COMPILING_IN_LIMITED_API
    op->func = PyCFunction_NewEx(ml, (PyObject*)op, module);
    if (unlikely(!op->func)) return NULL;
#endif
    op->flags = flags;
    __Pyx_CyFunction_weakreflist(op) = NULL;
#if !CYTHON_COMPILING_IN_LIMITED_API
    cf->m_ml = ml;
    cf->m_self = (PyObject *) op;
#endif
    Py_XINCREF(closure);
    op->func_closure = closure;
#if !CYTHON_COMPILING_IN_LIMITED_API
    Py_XINCREF(module);
    cf->m_module = module;
#endif
#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API
    op->func_dict = NULL;
#endif
    op->func_name = NULL;
    Py_INCREF(qualname);
    op->func_qualname = qualname;
    op->func_doc = NULL;
#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
    op->func_classobj = NULL;
#else
    ((PyCMethodObject*)op)->mm_class = NULL;
#endif
    op->func_globals = globals;
    Py_INCREF(op->func_globals);
    Py_XINCREF(code);
    op->func_code = code;
    op->defaults = NULL;
    op->defaults_tuple = NULL;
    op->defaults_kwdict = NULL;
    op->defaults_getter = NULL;
    op->func_annotations = NULL;
    op->func_is_coroutine = NULL;
#if CYTHON_METH_FASTCALL
    switch (ml->ml_flags & (METH_VARARGS | METH_FASTCALL | METH_NOARGS | METH_O | METH_KEYWORDS | METH_METHOD)) {
    case METH_NOARGS:
        __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_NOARGS;
        break;
    case METH_O:
        __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_O;
        break;
    case METH_METHOD | METH_FASTCALL | METH_KEYWORDS:
        __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD;
        break;
    case METH_FASTCALL | METH_KEYWORDS:
        __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS;
        break;
    case METH_VARARGS | METH_KEYWORDS:
        __Pyx_CyFunction_func_vectorcall(op) = NULL;
        break;
    default:
        PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction");
        Py_DECREF(op);
        return NULL;
    }
#endif
    return (PyObject *) op;
}
static int
__Pyx_CyFunction_clear(__pyx_CyFunctionObject *m)
{
    Py_CLEAR(m->func_closure);
#if CYTHON_COMPILING_IN_LIMITED_API
    Py_CLEAR(m->func);
#else
    Py_CLEAR(((PyCFunctionObject*)m)->m_module);
#endif
#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API
    Py_CLEAR(m->func_dict);
#elif PY_VERSION_HEX < 0x030d0000
    _PyObject_ClearManagedDict((PyObject*)m);
#else
    PyObject_ClearManagedDict((PyObject*)m);
#endif
    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);
#if !CYTHON_COMPILING_IN_LIMITED_API
#if PY_VERSION_HEX < 0x030900B1
    Py_CLEAR(__Pyx_CyFunction_GetClassObj(m));
#else
    {
        PyObject *cls = (PyObject*) ((PyCMethodObject *) (m))->mm_class;
        ((PyCMethodObject *) (m))->mm_class = NULL;
        Py_XDECREF(cls);
    }
#endif
#endif
    Py_CLEAR(m->defaults_tuple);
    Py_CLEAR(m->defaults_kwdict);
    Py_CLEAR(m->func_annotations);
    Py_CLEAR(m->func_is_coroutine);
    Py_CLEAR(m->defaults);
    return 0;
}
static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m)
{
    if (__Pyx_CyFunction_weakreflist(m) != NULL)
        PyObject_ClearWeakRefs((PyObject *) m);
    __Pyx_CyFunction_clear(m);
    __Pyx_PyHeapTypeObject_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)
{
    {
        int e = __Pyx_call_type_traverse((PyObject*)m, 1, visit, arg);
        if (e) return e;
    }
    Py_VISIT(m->func_closure);
#if CYTHON_COMPILING_IN_LIMITED_API
    Py_VISIT(m->func);
#else
    Py_VISIT(((PyCFunctionObject*)m)->m_module);
#endif
#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API
    Py_VISIT(m->func_dict);
#else
    {
        int e =
#if PY_VERSION_HEX < 0x030d0000
            _PyObject_VisitManagedDict
#else
            PyObject_VisitManagedDict
#endif
                ((PyObject*)m, visit, arg);
        if (e != 0) return e;
    }
#endif
    __Pyx_VISIT_CONST(m->func_name);
    __Pyx_VISIT_CONST(m->func_qualname);
    Py_VISIT(m->func_doc);
    Py_VISIT(m->func_globals);
    __Pyx_VISIT_CONST(m->func_code);
#if !CYTHON_COMPILING_IN_LIMITED_API
    Py_VISIT(__Pyx_CyFunction_GetClassObj(m));
#endif
    Py_VISIT(m->defaults_tuple);
    Py_VISIT(m->defaults_kwdict);
    Py_VISIT(m->func_is_coroutine);
    Py_VISIT(m->defaults);
    return 0;
}
static PyObject*
__Pyx_CyFunction_repr(__pyx_CyFunctionObject *op)
{
    PyObject *repr;
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    repr = PyUnicode_FromFormat("<cyfunction %U at %p>",
                                op->func_qualname, (void *)op);
    __Pyx_END_CRITICAL_SECTION();
    return repr;
}
static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) {
#if CYTHON_COMPILING_IN_LIMITED_API
    PyObject *f = ((__pyx_CyFunctionObject*)func)->func;
    PyCFunction meth;
    int flags;
    meth = PyCFunction_GetFunction(f);
    if (unlikely(!meth)) return NULL;
    flags = PyCFunction_GetFlags(f);
    if (unlikely(flags < 0)) return NULL;
#else
    PyCFunctionObject* f = (PyCFunctionObject*)func;
    PyCFunction meth = f->m_ml->ml_meth;
    int flags = f->m_ml->ml_flags;
#endif
    Py_ssize_t size;
    switch (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(*)(void))meth)(self, arg, kw);
    case METH_NOARGS:
        if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
#if CYTHON_ASSUME_SAFE_SIZE
            size = PyTuple_GET_SIZE(arg);
#else
            size = PyTuple_Size(arg);
            if (unlikely(size < 0)) return NULL;
#endif
            if (likely(size == 0))
                return (*meth)(self, NULL);
            __Pyx_CyFunction_raise_argument_count_error(
                (__pyx_CyFunctionObject*)func,
                "takes no arguments", size);
            return NULL;
        }
        break;
    case METH_O:
        if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
#if CYTHON_ASSUME_SAFE_SIZE
            size = PyTuple_GET_SIZE(arg);
#else
            size = PyTuple_Size(arg);
            if (unlikely(size < 0)) return NULL;
#endif
            if (likely(size == 1)) {
                PyObject *result, *arg0;
                #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                arg0 = PyTuple_GET_ITEM(arg, 0);
                #else
                arg0 = __Pyx_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;
            }
            __Pyx_CyFunction_raise_argument_count_error(
                (__pyx_CyFunctionObject*)func,
                "takes exactly one argument", size);
            return NULL;
        }
        break;
    default:
        PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction");
        return NULL;
    }
    __Pyx_CyFunction_raise_type_error(
        (__pyx_CyFunctionObject*)func, "takes no keyword arguments");
    return NULL;
}
static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
    PyObject *self, *result;
#if CYTHON_COMPILING_IN_LIMITED_API
    self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)func)->func);
    if (unlikely(!self) && PyErr_Occurred()) return NULL;
#else
    self = ((PyCFunctionObject*)func)->m_self;
#endif
    result = __Pyx_CyFunction_CallMethod(func, self, arg, kw);
    return result;
}
static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) {
    PyObject *result;
    __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func;
#if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL
     __pyx_vectorcallfunc vc = __Pyx_CyFunction_func_vectorcall(cyfunc);
    if (vc) {
#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE
        return __Pyx_PyVectorcall_FastCallDict(func, vc, &PyTuple_GET_ITEM(args, 0), (size_t)PyTuple_GET_SIZE(args), kw);
#else
        (void) &__Pyx_PyVectorcall_FastCallDict;
        return PyVectorcall_Call(func, args, kw);
#endif
    }
#endif
    if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
        Py_ssize_t argc;
        PyObject *new_args;
        PyObject *self;
#if CYTHON_ASSUME_SAFE_SIZE
        argc = PyTuple_GET_SIZE(args);
#else
        argc = PyTuple_Size(args);
        if (unlikely(argc < 0)) return NULL;
#endif
        new_args = PyTuple_GetSlice(args, 1, argc);
        if (unlikely(!new_args))
            return NULL;
        self = PyTuple_GetItem(args, 0);
        if (unlikely(!self)) {
            Py_DECREF(new_args);
            PyErr_Format(PyExc_TypeError,
                         "unbound method %.200S() needs an argument",
                         cyfunc->func_qualname);
            return NULL;
        }
        result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw);
        Py_DECREF(new_args);
    } else {
        result = __Pyx_CyFunction_Call(func, args, kw);
    }
    return result;
}
#if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL
static CYTHON_INLINE int __Pyx_CyFunction_Vectorcall_CheckArgs(__pyx_CyFunctionObject *cyfunc, Py_ssize_t nargs, PyObject *kwnames)
{
    int ret = 0;
    if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
        if (unlikely(nargs < 1)) {
            __Pyx_CyFunction_raise_type_error(
                cyfunc, "needs an argument");
            return -1;
        }
        ret = 1;
    }
    if (unlikely(kwnames) && unlikely(__Pyx_PyTuple_GET_SIZE(kwnames))) {
        __Pyx_CyFunction_raise_type_error(
            cyfunc, "takes no keyword arguments");
        return -1;
    }
    return ret;
}
static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
{
    __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
    Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
    PyObject *self;
#if CYTHON_COMPILING_IN_LIMITED_API
    PyCFunction meth = PyCFunction_GetFunction(cyfunc->func);
    if (unlikely(!meth)) return NULL;
#else
    PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth;
#endif
    switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) {
    case 1:
        self = args[0];
        args += 1;
        nargs -= 1;
        break;
    case 0:
#if CYTHON_COMPILING_IN_LIMITED_API
        self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func);
        if (unlikely(!self) && PyErr_Occurred()) return NULL;
#else
        self = ((PyCFunctionObject*)cyfunc)->m_self;
#endif
        break;
    default:
        return NULL;
    }
    if (unlikely(nargs != 0)) {
        __Pyx_CyFunction_raise_argument_count_error(
            cyfunc, "takes no arguments", nargs);
        return NULL;
    }
    return meth(self, NULL);
}
static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
{
    __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
    Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
    PyObject *self;
#if CYTHON_COMPILING_IN_LIMITED_API
    PyCFunction meth = PyCFunction_GetFunction(cyfunc->func);
    if (unlikely(!meth)) return NULL;
#else
    PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth;
#endif
    switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) {
    case 1:
        self = args[0];
        args += 1;
        nargs -= 1;
        break;
    case 0:
#if CYTHON_COMPILING_IN_LIMITED_API
        self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func);
        if (unlikely(!self) && PyErr_Occurred()) return NULL;
#else
        self = ((PyCFunctionObject*)cyfunc)->m_self;
#endif
        break;
    default:
        return NULL;
    }
    if (unlikely(nargs != 1)) {
        __Pyx_CyFunction_raise_argument_count_error(
            cyfunc, "takes exactly one argument", nargs);
        return NULL;
    }
    return meth(self, args[0]);
}
static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
{
    __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
    Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
    PyObject *self;
#if CYTHON_COMPILING_IN_LIMITED_API
    PyCFunction meth = PyCFunction_GetFunction(cyfunc->func);
    if (unlikely(!meth)) return NULL;
#else
    PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth;
#endif
    switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) {
    case 1:
        self = args[0];
        args += 1;
        nargs -= 1;
        break;
    case 0:
#if CYTHON_COMPILING_IN_LIMITED_API
        self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func);
        if (unlikely(!self) && PyErr_Occurred()) return NULL;
#else
        self = ((PyCFunctionObject*)cyfunc)->m_self;
#endif
        break;
    default:
        return NULL;
    }
    return ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))meth)(self, args, nargs, kwnames);
}
static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
{
    __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
    PyTypeObject *cls = (PyTypeObject *) __Pyx_CyFunction_GetClassObj(cyfunc);
    Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
    PyObject *self;
#if CYTHON_COMPILING_IN_LIMITED_API
    PyCFunction meth = PyCFunction_GetFunction(cyfunc->func);
    if (unlikely(!meth)) return NULL;
#else
    PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth;
#endif
    switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) {
    case 1:
        self = args[0];
        args += 1;
        nargs -= 1;
        break;
    case 0:
#if CYTHON_COMPILING_IN_LIMITED_API
        self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func);
        if (unlikely(!self) && PyErr_Occurred()) return NULL;
#else
        self = ((PyCFunctionObject*)cyfunc)->m_self;
#endif
        break;
    default:
        return NULL;
    }
    #if PY_VERSION_HEX < 0x030e00A6
    size_t nargs_value = (size_t) nargs;
    #else
    Py_ssize_t nargs_value = nargs;
    #endif
    return ((__Pyx_PyCMethod)(void(*)(void))meth)(self, cls, args, nargs_value, kwnames);
}
#endif
static PyType_Slot __pyx_CyFunctionType_slots[] = {
    {Py_tp_dealloc, (void *)__Pyx_CyFunction_dealloc},
    {Py_tp_repr, (void *)__Pyx_CyFunction_repr},
    {Py_tp_call, (void *)__Pyx_CyFunction_CallAsMethod},
    {Py_tp_traverse, (void *)__Pyx_CyFunction_traverse},
    {Py_tp_clear, (void *)__Pyx_CyFunction_clear},
    {Py_tp_methods, (void *)__pyx_CyFunction_methods},
    {Py_tp_members, (void *)__pyx_CyFunction_members},
    {Py_tp_getset, (void *)__pyx_CyFunction_getsets},
    {Py_tp_descr_get, (void *)__Pyx_PyMethod_New},
    {0, 0},
};
static PyType_Spec __pyx_CyFunctionType_spec = {
    __PYX_TYPE_MODULE_PREFIX "cython_function_or_method",
    sizeof(__pyx_CyFunctionObject),
    0,
#ifdef Py_TPFLAGS_METHOD_DESCRIPTOR
    Py_TPFLAGS_METHOD_DESCRIPTOR |
#endif
#if CYTHON_METH_FASTCALL
#if defined(Py_TPFLAGS_HAVE_VECTORCALL)
    Py_TPFLAGS_HAVE_VECTORCALL |
#elif defined(_Py_TPFLAGS_HAVE_VECTORCALL)
    _Py_TPFLAGS_HAVE_VECTORCALL |
#endif
#endif // CYTHON_METH_FASTCALL
#if PY_VERSION_HEX >= 0x030C0000 && !CYTHON_COMPILING_IN_LIMITED_API
    Py_TPFLAGS_MANAGED_DICT |
#endif
    Py_TPFLAGS_IMMUTABLETYPE | Py_TPFLAGS_DISALLOW_INSTANTIATION |
    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE,
    __pyx_CyFunctionType_slots
};
static int __pyx_CyFunction_init(PyObject *module) {
    __pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module);
    mstate->__pyx_CyFunctionType = __Pyx_FetchCommonTypeFromSpec(
        mstate->__pyx_CommonTypesMetaclassType, module, &__pyx_CyFunctionType_spec, NULL);
    if (unlikely(mstate->__pyx_CyFunctionType == NULL)) {
        return -1;
    }
    return 0;
}
static CYTHON_INLINE PyObject *__Pyx_CyFunction_InitDefaults(PyObject *func, PyTypeObject *defaults_type) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults = PyObject_CallObject((PyObject*)defaults_type, NULL); // _PyObject_New(defaults_type);
    if (unlikely(!m->defaults))
        return NULL;
    return m->defaults;
}
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults_tuple = tuple;
    Py_INCREF(tuple);
}
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults_kwdict = dict;
    Py_INCREF(dict);
}
static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->func_annotations = dict;
    Py_INCREF(dict);
}

/* CythonFunction */
static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname,
                                      PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
    PyObject *op = __Pyx_CyFunction_Init(
        PyObject_GC_New(__pyx_CyFunctionObject, __pyx_mstate_global->__pyx_CyFunctionType),
        ml, flags, qualname, closure, module, globals, code
    );
    if (likely(op)) {
        PyObject_GC_Track(op);
    }
    return op;
}

/* AllocateExtensionType */
static PyObject *__Pyx_AllocateExtensionType(PyTypeObject *t, int is_final) {
    if (is_final || likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) {
        allocfunc alloc_func = __Pyx_PyType_GetSlot(t, tp_alloc, allocfunc);
        return alloc_func(t, 0);
    } else {
        newfunc tp_new = __Pyx_PyType_TryGetSlot(&PyBaseObject_Type, tp_new, newfunc);
    #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
        if (!tp_new) {
            PyObject *new_str = PyUnicode_FromString("__new__");
            if (likely(new_str)) {
                PyObject *o = PyObject_CallMethodObjArgs((PyObject *)&PyBaseObject_Type, new_str, t, NULL);
                Py_DECREF(new_str);
                return o;
            } else
                return NULL;
        } else
    #endif
        return tp_new(t, __pyx_mstate_global->__pyx_empty_tuple, 0);
    }
}

/* CallNextTpTraverse */
static int __Pyx_call_next_tp_traverse(PyObject* obj, visitproc v, void *a, traverseproc current_tp_traverse) {
    PyTypeObject* type = Py_TYPE(obj);
    traverseproc tp_traverse = NULL;
    while (type && __Pyx_PyType_GetSlot(type, tp_traverse, traverseproc) != current_tp_traverse)
        type = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*);
    while (type && (tp_traverse = __Pyx_PyType_GetSlot(type, tp_traverse, traverseproc)) == current_tp_traverse)
        type = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*);
    if (type && tp_traverse)
        return tp_traverse(obj, v, a);
    return 0;
}

/* CallNextTpClear */
static void __Pyx_call_next_tp_clear(PyObject* obj, inquiry current_tp_clear) {
    PyTypeObject* type = Py_TYPE(obj);
    inquiry tp_clear = NULL;
    while (type && __Pyx_PyType_GetSlot(type, tp_clear, inquiry) != current_tp_clear)
        type = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*);
    while (type && (tp_clear = __Pyx_PyType_GetSlot(type, tp_clear, inquiry)) == current_tp_clear)
        type = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*);
    if (type && tp_clear)
        tp_clear(obj);
}

/* FunctionExport */
static int __Pyx_ExportFunction(PyObject *api_dict, const char *name, void (*f)(void), const char *sig) {
    PyObject *cobj;
    union {
        void (*fp)(void);
        void *p;
    } tmp;
    tmp.fp = f;
    cobj = PyCapsule_New(tmp.p, sig, 0);
    if (!cobj)
        goto bad;
    if (PyDict_SetItemString(api_dict, name, cobj) < 0)
        goto bad;
    Py_DECREF(cobj);
    return 0;
bad:
    Py_XDECREF(cobj);
    return -1;
}

/* GetApiDict */
static PyObject *__Pyx_ApiExport_GetApiDict(void) {
    PyObject *d;
    if (__Pyx_PyDict_GetItemRef(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_capi, &d) == -1)
        return NULL;
    if (!d) {
        d = PyDict_New();
        if (!d)
            goto bad;
        if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_pyx_capi, d) < 0)
            goto bad;
    }
    return d;
bad:
    Py_XDECREF(d);
    return NULL;
}

/* ValidateBasesTuple (used by PyType_Ready) */
#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS
static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases) {
    Py_ssize_t i, n;
#if CYTHON_ASSUME_SAFE_SIZE
    n = PyTuple_GET_SIZE(bases);
#else
    n = PyTuple_Size(bases);
    if (unlikely(n < 0)) return -1;
#endif
    for (i = 1; i < n; i++)
    {
        PyTypeObject *b;
#if CYTHON_AVOID_BORROWED_REFS
        PyObject *b0 = PySequence_GetItem(bases, i);
        if (!b0) return -1;
#elif CYTHON_ASSUME_SAFE_MACROS
        PyObject *b0 = PyTuple_GET_ITEM(bases, i);
#else
        PyObject *b0 = PyTuple_GetItem(bases, i);
        if (!b0) return -1;
#endif
        b = (PyTypeObject*) b0;
        if (!__Pyx_PyType_HasFeature(b, Py_TPFLAGS_HEAPTYPE))
        {
            __Pyx_TypeName b_name = __Pyx_PyType_GetFullyQualifiedName(b);
            PyErr_Format(PyExc_TypeError,
                "base class '" __Pyx_FMT_TYPENAME "' is not a heap type", b_name);
            __Pyx_DECREF_TypeName(b_name);
#if CYTHON_AVOID_BORROWED_REFS
            Py_DECREF(b0);
#endif
            return -1;
        }
        if (dictoffset == 0)
        {
            Py_ssize_t b_dictoffset = 0;
#if CYTHON_USE_TYPE_SLOTS
            b_dictoffset = b->tp_dictoffset;
#else
            PyObject *py_b_dictoffset = PyObject_GetAttrString((PyObject*)b, "__dictoffset__");
            if (!py_b_dictoffset) goto dictoffset_return;
            b_dictoffset = PyLong_AsSsize_t(py_b_dictoffset);
            Py_DECREF(py_b_dictoffset);
            if (b_dictoffset == -1 && PyErr_Occurred()) goto dictoffset_return;
#endif
            if (b_dictoffset) {
                {
                    __Pyx_TypeName b_name = __Pyx_PyType_GetFullyQualifiedName(b);
                    PyErr_Format(PyExc_TypeError,
                        "extension type '%.200s' has no __dict__ slot, "
                        "but base type '" __Pyx_FMT_TYPENAME "' has: "
                        "either add 'cdef dict __dict__' to the extension type "
                        "or add '__slots__ = [...]' to the base type",
                        type_name, b_name);
                    __Pyx_DECREF_TypeName(b_name);
                }
#if !CYTHON_USE_TYPE_SLOTS
              dictoffset_return:
#endif
#if CYTHON_AVOID_BORROWED_REFS
                Py_DECREF(b0);
#endif
                return -1;
            }
        }
#if CYTHON_AVOID_BORROWED_REFS
        Py_DECREF(b0);
#endif
    }
    return 0;
}
#endif

/* PyType_Ready */
CYTHON_UNUSED static int __Pyx_PyType_HasMultipleInheritance(PyTypeObject *t) {
    while (t) {
        PyObject *bases = __Pyx_PyType_GetSlot(t, tp_bases, PyObject*);
        if (bases) {
            return 1;
        }
        t = __Pyx_PyType_GetSlot(t, tp_base, PyTypeObject*);
    }
    return 0;
}
static int __Pyx_PyType_Ready(PyTypeObject *t) {
#if CYTHON_USE_TYPE_SPECS || !CYTHON_COMPILING_IN_CPYTHON || defined(PYSTON_MAJOR_VERSION)
    (void)__Pyx_PyObject_CallMethod0;
#if CYTHON_USE_TYPE_SPECS
    (void)__Pyx_validate_bases_tuple;
#endif
    return PyType_Ready(t);
#else
    int r;
    if (!__Pyx_PyType_HasMultipleInheritance(t)) {
        return PyType_Ready(t);
    }
    PyObject *bases = __Pyx_PyType_GetSlot(t, tp_bases, PyObject*);
    if (bases && unlikely(__Pyx_validate_bases_tuple(t->tp_name, t->tp_dictoffset, bases) == -1))
        return -1;
#if !defined(PYSTON_MAJOR_VERSION)
    {
        int gc_was_enabled;
    #if PY_VERSION_HEX >= 0x030A00b1
        gc_was_enabled = PyGC_Disable();
        (void)__Pyx_PyObject_CallMethod0;
    #else
        PyObject *ret, *py_status;
        PyObject *gc = NULL;
        #if (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM+0 >= 0x07030400) &&\
                !CYTHON_COMPILING_IN_GRAAL
        gc = PyImport_GetModule(__pyx_mstate_global->__pyx_kp_u_gc);
        #endif
        if (unlikely(!gc)) gc = PyImport_Import(__pyx_mstate_global->__pyx_kp_u_gc);
        if (unlikely(!gc)) return -1;
        py_status = __Pyx_PyObject_CallMethod0(gc, __pyx_mstate_global->__pyx_kp_u_isenabled);
        if (unlikely(!py_status)) {
            Py_DECREF(gc);
            return -1;
        }
        gc_was_enabled = __Pyx_PyObject_IsTrue(py_status);
        Py_DECREF(py_status);
        if (gc_was_enabled > 0) {
            ret = __Pyx_PyObject_CallMethod0(gc, __pyx_mstate_global->__pyx_kp_u_disable);
            if (unlikely(!ret)) {
                Py_DECREF(gc);
                return -1;
            }
            Py_DECREF(ret);
        } else if (unlikely(gc_was_enabled == -1)) {
            Py_DECREF(gc);
            return -1;
        }
    #endif
        t->tp_flags |= Py_TPFLAGS_HEAPTYPE;
#if PY_VERSION_HEX >= 0x030A0000
        t->tp_flags |= Py_TPFLAGS_IMMUTABLETYPE;
#endif
#else
        (void)__Pyx_PyObject_CallMethod0;
#endif
    r = PyType_Ready(t);
#if !defined(PYSTON_MAJOR_VERSION)
        t->tp_flags &= ~Py_TPFLAGS_HEAPTYPE;
    #if PY_VERSION_HEX >= 0x030A00b1
        if (gc_was_enabled)
            PyGC_Enable();
    #else
        if (gc_was_enabled) {
            PyObject *tp, *v, *tb;
            PyErr_Fetch(&tp, &v, &tb);
            ret = __Pyx_PyObject_CallMethod0(gc, __pyx_mstate_global->__pyx_kp_u_enable);
            if (likely(ret || r == -1)) {
                Py_XDECREF(ret);
                PyErr_Restore(tp, v, tb);
            } else {
                Py_XDECREF(tp);
                Py_XDECREF(v);
                Py_XDECREF(tb);
                r = -1;
            }
        }
        Py_DECREF(gc);
    #endif
    }
#endif
    return r;
#endif
}

/* DelItemOnTypeDict (used by SetupReduce) */
static int __Pyx__DelItemOnTypeDict(PyTypeObject *tp, PyObject *k) {
    int result;
    PyObject *tp_dict;
#if CYTHON_COMPILING_IN_LIMITED_API
    tp_dict = __Pyx_GetTypeDict(tp);
    if (unlikely(!tp_dict)) return -1;
#else
    tp_dict = tp->tp_dict;
#endif
    result = PyDict_DelItem(tp_dict, k);
    if (likely(!result)) PyType_Modified(tp);
    return result;
}

/* SetupReduce */
static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) {
  int ret;
  PyObject *name_attr;
  name_attr = __Pyx_PyObject_GetAttrStrNoError(meth, __pyx_mstate_global->__pyx_n_u_name_2);
  if (likely(name_attr)) {
      ret = PyObject_RichCompareBool(name_attr, name, Py_EQ);
  } else {
      ret = -1;
  }
  if (unlikely(ret < 0)) {
      PyErr_Clear();
      ret = 0;
  }
  Py_XDECREF(name_attr);
  return ret;
}
static int __Pyx_setup_reduce(PyObject* type_obj) {
    int ret = 0;
    PyObject *object_reduce = NULL;
    PyObject *object_getstate = NULL;
    PyObject *object_reduce_ex = NULL;
    PyObject *reduce = NULL;
    PyObject *reduce_ex = NULL;
    PyObject *reduce_cython = NULL;
    PyObject *setstate = NULL;
    PyObject *setstate_cython = NULL;
    PyObject *getstate = NULL;
#if CYTHON_USE_PYTYPE_LOOKUP
    getstate = _PyType_Lookup((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_getstate);
#else
    getstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_mstate_global->__pyx_n_u_getstate);
    if (!getstate && PyErr_Occurred()) {
        goto __PYX_BAD;
    }
#endif
    if (getstate) {
#if CYTHON_USE_PYTYPE_LOOKUP
        object_getstate = _PyType_Lookup(&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_getstate);
#else
        object_getstate = __Pyx_PyObject_GetAttrStrNoError((PyObject*)&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_getstate);
        if (!object_getstate && PyErr_Occurred()) {
            goto __PYX_BAD;
        }
#endif
        if (object_getstate != getstate) {
            goto __PYX_GOOD;
        }
    }
#if CYTHON_USE_PYTYPE_LOOKUP
    object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
#else
    object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
#endif
    reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_mstate_global->__pyx_n_u_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD;
    if (reduce_ex == object_reduce_ex) {
#if CYTHON_USE_PYTYPE_LOOKUP
        object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_reduce); if (!object_reduce) goto __PYX_BAD;
#else
        object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_reduce); if (!object_reduce) goto __PYX_BAD;
#endif
        reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_mstate_global->__pyx_n_u_reduce); if (unlikely(!reduce)) goto __PYX_BAD;
        if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_mstate_global->__pyx_n_u_reduce_cython)) {
            reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_mstate_global->__pyx_n_u_reduce_cython);
            if (likely(reduce_cython)) {
                ret = __Pyx_SetItemOnTypeDict((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
                ret = __Pyx_DelItemOnTypeDict((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
            } else if (reduce == object_reduce || PyErr_Occurred()) {
                goto __PYX_BAD;
            }
            setstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_mstate_global->__pyx_n_u_setstate);
            if (!setstate) PyErr_Clear();
            if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_mstate_global->__pyx_n_u_setstate_cython)) {
                setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_mstate_global->__pyx_n_u_setstate_cython);
                if (likely(setstate_cython)) {
                    ret = __Pyx_SetItemOnTypeDict((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
                    ret = __Pyx_DelItemOnTypeDict((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
                } else if (!setstate || PyErr_Occurred()) {
                    goto __PYX_BAD;
                }
            }
            PyType_Modified((PyTypeObject*)type_obj);
        }
    }
    goto __PYX_GOOD;
__PYX_BAD:
    if (!PyErr_Occurred()) {
        __Pyx_TypeName type_obj_name =
            __Pyx_PyType_GetFullyQualifiedName((PyTypeObject*)type_obj);
        PyErr_Format(PyExc_RuntimeError,
            "Unable to initialize pickling for " __Pyx_FMT_TYPENAME, type_obj_name);
        __Pyx_DECREF_TypeName(type_obj_name);
    }
    ret = -1;
__PYX_GOOD:
#if !CYTHON_USE_PYTYPE_LOOKUP
    Py_XDECREF(object_reduce);
    Py_XDECREF(object_reduce_ex);
    Py_XDECREF(object_getstate);
    Py_XDECREF(getstate);
#endif
    Py_XDECREF(reduce);
    Py_XDECREF(reduce_ex);
    Py_XDECREF(reduce_cython);
    Py_XDECREF(setstate);
    Py_XDECREF(setstate_cython);
    return ret;
}

/* SetVTable */
static int __Pyx_SetVtable(PyTypeObject *type, void *vtable) {
    PyObject *ob = PyCapsule_New(vtable, 0, 0);
    if (unlikely(!ob))
        goto bad;
#if CYTHON_COMPILING_IN_LIMITED_API
    if (unlikely(PyObject_SetAttr((PyObject *) type, __pyx_mstate_global->__pyx_n_u_pyx_vtable, ob) < 0))
#else
    if (unlikely(PyDict_SetItem(type->tp_dict, __pyx_mstate_global->__pyx_n_u_pyx_vtable, ob) < 0))
#endif
        goto bad;
    Py_DECREF(ob);
    return 0;
bad:
    Py_XDECREF(ob);
    return -1;
}

/* GetVTable (used by MergeVTables) */
static void* __Pyx_GetVtable(PyTypeObject *type) {
    void* ptr;
#if CYTHON_COMPILING_IN_LIMITED_API
    PyObject *ob = PyObject_GetAttr((PyObject *)type, __pyx_mstate_global->__pyx_n_u_pyx_vtable);
#else
    PyObject *ob = PyObject_GetItem(type->tp_dict, __pyx_mstate_global->__pyx_n_u_pyx_vtable);
#endif
    if (!ob)
        goto bad;
    ptr = PyCapsule_GetPointer(ob, 0);
    if (!ptr && !PyErr_Occurred())
        PyErr_SetString(PyExc_RuntimeError, "invalid vtable found for imported type");
    Py_DECREF(ob);
    return ptr;
bad:
    Py_XDECREF(ob);
    return NULL;
}

/* MergeVTables */
static int __Pyx_MergeVtables(PyTypeObject *type) {
    int i=0;
    Py_ssize_t size;
    void** base_vtables;
    __Pyx_TypeName tp_base_name = NULL;
    __Pyx_TypeName base_name = NULL;
    void* unknown = (void*)-1;
    PyObject* bases = __Pyx_PyType_GetSlot(type, tp_bases, PyObject*);
    int base_depth = 0;
    {
        PyTypeObject* base = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*);
        while (base) {
            base_depth += 1;
            base = __Pyx_PyType_GetSlot(base, tp_base, PyTypeObject*);
        }
    }
    base_vtables = (void**) PyMem_Malloc(sizeof(void*) * (size_t)(base_depth + 1));
    base_vtables[0] = unknown;
#if CYTHON_COMPILING_IN_LIMITED_API
    size = PyTuple_Size(bases);
    if (size < 0) goto other_failure;
#else
    size = PyTuple_GET_SIZE(bases);
#endif
    for (i = 1; i < size; i++) {
        PyObject *basei;
        void* base_vtable;
#if CYTHON_AVOID_BORROWED_REFS
        basei = PySequence_GetItem(bases, i);
        if (unlikely(!basei)) goto other_failure;
#elif !CYTHON_ASSUME_SAFE_MACROS
        basei = PyTuple_GetItem(bases, i);
        if (unlikely(!basei)) goto other_failure;
#else
        basei = PyTuple_GET_ITEM(bases, i);
#endif
        base_vtable = __Pyx_GetVtable((PyTypeObject*)basei);
#if CYTHON_AVOID_BORROWED_REFS
        Py_DECREF(basei);
#endif
        if (base_vtable != NULL) {
            int j;
            PyTypeObject* base = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*);
            for (j = 0; j < base_depth; j++) {
                if (base_vtables[j] == unknown) {
                    base_vtables[j] = __Pyx_GetVtable(base);
                    base_vtables[j + 1] = unknown;
                }
                if (base_vtables[j] == base_vtable) {
                    break;
                } else if (base_vtables[j] == NULL) {
                    goto bad;
                }
                base = __Pyx_PyType_GetSlot(base, tp_base, PyTypeObject*);
            }
        }
    }
    PyErr_Clear();
    PyMem_Free(base_vtables);
    return 0;
bad:
    {
        PyTypeObject* basei = NULL;
        PyTypeObject* tp_base = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*);
        tp_base_name = __Pyx_PyType_GetFullyQualifiedName(tp_base);
#if CYTHON_AVOID_BORROWED_REFS
        basei = (PyTypeObject*)PySequence_GetItem(bases, i);
        if (unlikely(!basei)) goto really_bad;
#elif !CYTHON_ASSUME_SAFE_MACROS
        basei = (PyTypeObject*)PyTuple_GetItem(bases, i);
        if (unlikely(!basei)) goto really_bad;
#else
        basei = (PyTypeObject*)PyTuple_GET_ITEM(bases, i);
#endif
        base_name = __Pyx_PyType_GetFullyQualifiedName(basei);
#if CYTHON_AVOID_BORROWED_REFS
        Py_DECREF(basei);
#endif
    }
    PyErr_Format(PyExc_TypeError,
        "multiple bases have vtable conflict: '" __Pyx_FMT_TYPENAME "' and '" __Pyx_FMT_TYPENAME "'", tp_base_name, base_name);
#if CYTHON_AVOID_BORROWED_REFS || !CYTHON_ASSUME_SAFE_MACROS
really_bad: // bad has failed!
#endif
    __Pyx_DECREF_TypeName(tp_base_name);
    __Pyx_DECREF_TypeName(base_name);
#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_AVOID_BORROWED_REFS || !CYTHON_ASSUME_SAFE_MACROS
other_failure:
#endif
    PyMem_Free(base_vtables);
    return -1;
}

/* TypeImport */
#ifndef __PYX_HAVE_RT_ImportType_3_2_4
#define __PYX_HAVE_RT_ImportType_3_2_4
static PyTypeObject *__Pyx_ImportType_3_2_4(PyObject *module, const char *module_name, const char *class_name,
    size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_2_4 check_size)
{
    PyObject *result = 0;
    Py_ssize_t basicsize;
    Py_ssize_t itemsize;
#if defined(Py_LIMITED_API) || (defined(CYTHON_COMPILING_IN_LIMITED_API) && CYTHON_COMPILING_IN_LIMITED_API)
    PyObject *py_basicsize;
    PyObject *py_itemsize;
#endif
    result = PyObject_GetAttrString(module, class_name);
    if (!result)
        goto bad;
    if (!PyType_Check(result)) {
        PyErr_Format(PyExc_TypeError,
            "%.200s.%.200s is not a type object",
            module_name, class_name);
        goto bad;
    }
#if !( defined(Py_LIMITED_API) || (defined(CYTHON_COMPILING_IN_LIMITED_API) && CYTHON_COMPILING_IN_LIMITED_API) )
    basicsize = ((PyTypeObject *)result)->tp_basicsize;
    itemsize = ((PyTypeObject *)result)->tp_itemsize;
#else
    if (size == 0) {
        return (PyTypeObject *)result;
    }
    py_basicsize = PyObject_GetAttrString(result, "__basicsize__");
    if (!py_basicsize)
        goto bad;
    basicsize = PyLong_AsSsize_t(py_basicsize);
    Py_DECREF(py_basicsize);
    py_basicsize = 0;
    if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred())
        goto bad;
    py_itemsize = PyObject_GetAttrString(result, "__itemsize__");
    if (!py_itemsize)
        goto bad;
    itemsize = PyLong_AsSsize_t(py_itemsize);
    Py_DECREF(py_itemsize);
    py_itemsize = 0;
    if (itemsize == (Py_ssize_t)-1 && PyErr_Occurred())
        goto bad;
#endif
    if (itemsize) {
        if (size % alignment) {
            alignment = size % alignment;
        }
        if (itemsize < (Py_ssize_t)alignment)
            itemsize = (Py_ssize_t)alignment;
    }
    if ((size_t)(basicsize + itemsize) < size) {
        PyErr_Format(PyExc_ValueError,
            "%.200s.%.200s size changed, may indicate binary incompatibility. "
            "Expected %zd from C header, got %zd from PyObject",
            module_name, class_name, size, basicsize+itemsize);
        goto bad;
    }
    if (check_size == __Pyx_ImportType_CheckSize_Error_3_2_4 &&
            ((size_t)basicsize > size || (size_t)(basicsize + itemsize) < size)) {
        PyErr_Format(PyExc_ValueError,
            "%.200s.%.200s size changed, may indicate binary incompatibility. "
            "Expected %zd from C header, got %zd-%zd from PyObject",
            module_name, class_name, size, basicsize, basicsize+itemsize);
        goto bad;
    }
    else if (check_size == __Pyx_ImportType_CheckSize_Warn_3_2_4 && (size_t)basicsize > size) {
        if (PyErr_WarnFormat(NULL, 0,
                "%.200s.%.200s size changed, may indicate binary incompatibility. "
                "Expected %zd from C header, got %zd from PyObject",
                module_name, class_name, size, basicsize) < 0) {
            goto bad;
        }
    }
    return (PyTypeObject *)result;
bad:
    Py_XDECREF(result);
    return NULL;
}
#endif

/* ListPack */
static PyObject *__Pyx_PyList_Pack(Py_ssize_t n, ...) {
    va_list va;
    PyObject *l = PyList_New(n);
    va_start(va, n);
    if (unlikely(!l)) goto end;
    for (Py_ssize_t i=0; i<n; ++i) {
        PyObject *arg = va_arg(va, PyObject*);
        Py_INCREF(arg);
        if (__Pyx_PyList_SET_ITEM(l, i, arg) != (0)) {
            Py_CLEAR(l);
            goto end;
        }
    }
    end:
    va_end(va);
    return l;
}

/* Globals */
static PyObject* __Pyx_Globals(void) {
    return __Pyx_NewRef(__pyx_mstate_global->__pyx_d);
}

/* Py3UpdateBases */
static PyObject*
__Pyx_PEP560_update_bases(PyObject *bases)
{
    Py_ssize_t i, j, size_bases;
    PyObject *base = NULL, *meth, *new_base, *result, *new_bases = NULL;
#if CYTHON_ASSUME_SAFE_SIZE
    size_bases = PyTuple_GET_SIZE(bases);
#else
    size_bases = PyTuple_Size(bases);
    if (size_bases < 0) return NULL;
#endif
    for (i = 0; i < size_bases; i++) {
#if CYTHON_AVOID_BORROWED_REFS
        Py_CLEAR(base);
#endif
#if CYTHON_ASSUME_SAFE_MACROS
        base = PyTuple_GET_ITEM(bases, i);
#else
        base = PyTuple_GetItem(bases, i);
        if (!base) goto error;
#endif
#if CYTHON_AVOID_BORROWED_REFS
        Py_INCREF(base);
#endif
        if (PyType_Check(base)) {
            if (new_bases) {
                if (PyList_Append(new_bases, base) < 0) {
                    goto error;
                }
            }
            continue;
        }
        meth = __Pyx_PyObject_GetAttrStrNoError(base, __pyx_mstate_global->__pyx_n_u_mro_entries);
        if (!meth && PyErr_Occurred()) {
            goto error;
        }
        if (!meth) {
            if (new_bases) {
                if (PyList_Append(new_bases, base) < 0) {
                    goto error;
                }
            }
            continue;
        }
        new_base = __Pyx_PyObject_CallOneArg(meth, bases);
        Py_DECREF(meth);
        if (!new_base) {
            goto error;
        }
        if (!PyTuple_Check(new_base)) {
            PyErr_SetString(PyExc_TypeError,
                            "__mro_entries__ must return a tuple");
            Py_DECREF(new_base);
            goto error;
        }
        if (!new_bases) {
            if (!(new_bases = PyList_New(i))) {
                goto error;
            }
            for (j = 0; j < i; j++) {
                PyObject *base_from_list;
#if CYTHON_ASSUME_SAFE_MACROS
                base_from_list = PyTuple_GET_ITEM(bases, j);
                PyList_SET_ITEM(new_bases, j, base_from_list);
                Py_INCREF(base_from_list);
#else
                base_from_list = PyTuple_GetItem(bases, j);
                if (!base_from_list) goto error;
                Py_INCREF(base_from_list);
                if (PyList_SetItem(new_bases, j, base_from_list) < 0) goto error;
#endif
            }
        }
#if CYTHON_ASSUME_SAFE_SIZE
        j = PyList_GET_SIZE(new_bases);
#else
        j = PyList_Size(new_bases);
        if (j < 0) goto error;
#endif
        if (PyList_SetSlice(new_bases, j, j, new_base) < 0) {
            goto error;
        }
        Py_DECREF(new_base);
    }
    if (!new_bases) {
        Py_INCREF(bases);
        return bases;
    }
    result = PyList_AsTuple(new_bases);
    Py_DECREF(new_bases);
#if CYTHON_AVOID_BORROWED_REFS
    Py_XDECREF(base);
#endif
    return result;
error:
    Py_XDECREF(new_bases);
#if CYTHON_AVOID_BORROWED_REFS
    Py_XDECREF(base);
#endif
    return NULL;
}

/* CalculateMetaclass */
static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) {
    Py_ssize_t i, nbases;
#if CYTHON_ASSUME_SAFE_SIZE
    nbases = PyTuple_GET_SIZE(bases);
#else
    nbases = PyTuple_Size(bases);
    if (nbases < 0) return NULL;
#endif
    for (i=0; i < nbases; i++) {
        PyTypeObject *tmptype;
#if CYTHON_ASSUME_SAFE_MACROS
        PyObject *tmp = PyTuple_GET_ITEM(bases, i);
#else
        PyObject *tmp = PyTuple_GetItem(bases, i);
        if (!tmp) return NULL;
#endif
        tmptype = Py_TYPE(tmp);
        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) {
        metaclass = &PyType_Type;
    }
    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_GetAttrStrNoError(metaclass, __pyx_mstate_global->__pyx_n_u_prepare);
        if (prep) {
            PyObject *pargs[3] = {NULL, name, bases};
            ns = __Pyx_PyObject_FastCallDict(prep, pargs+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, mkw);
            Py_DECREF(prep);
        } else {
            if (unlikely(PyErr_Occurred()))
                return NULL;
            ns = PyDict_New();
        }
    } else {
        ns = PyDict_New();
    }
    if (unlikely(!ns))
        return NULL;
    if (unlikely(PyObject_SetItem(ns, __pyx_mstate_global->__pyx_n_u_module_2, modname) < 0)) goto bad;
    if (unlikely(PyObject_SetItem(ns, __pyx_mstate_global->__pyx_n_u_qualname, qualname) < 0)) goto bad;
    if (unlikely(doc && PyObject_SetItem(ns, __pyx_mstate_global->__pyx_n_u_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;
    PyObject *owned_metaclass = NULL;
    PyObject *margs[4] = {NULL, name, bases, dict};
    if (allow_py2_metaclass) {
        owned_metaclass = PyObject_GetItem(dict, __pyx_mstate_global->__pyx_n_u_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;
    }
    result = __Pyx_PyObject_FastCallDict(metaclass, margs+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, mkw);
    Py_XDECREF(owned_metaclass);
    return result;
}

/* CyFunctionClassCell */
static int __Pyx_CyFunction_InitClassCell(PyObject *cyfunctions, PyObject *classobj) {
    Py_ssize_t i, count = __Pyx_PyList_GET_SIZE(cyfunctions);
    #if !CYTHON_ASSUME_SAFE_SIZE
    if (unlikely(count < 0)) return -1;
    #endif
    for (i = 0; i < count; i++) {
        __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *)
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && !CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
            PyList_GET_ITEM(cyfunctions, i);
#else
            __Pyx_PySequence_ITEM(cyfunctions, i);
        if (unlikely(!m))
            return -1;
#endif
        __Pyx_CyFunction_SetClassObj(m, classobj);
#if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && !CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS)
        Py_DECREF((PyObject*)m);
#endif
    }
    return 0;
}

/* GetNameInClass */
static PyObject *__Pyx__GetNameInClass(PyObject *nmspace, PyObject *name) {
    PyObject *result;
    PyObject *dict;
    assert(PyType_Check(nmspace));
#if CYTHON_USE_TYPE_SLOTS
    dict = ((PyTypeObject*)nmspace)->tp_dict;
    Py_XINCREF(dict);
#else
    dict = PyObject_GetAttr(nmspace, __pyx_mstate_global->__pyx_n_u_dict);
#endif
    if (likely(dict)) {
        result = PyObject_GetItem(dict, name);
        Py_DECREF(dict);
        if (result) {
            return result;
        }
    }
    PyErr_Clear();
    __Pyx_GetModuleGlobalNameUncached(result, name);
    return result;
}

/* ClassMethod */
static PyObject* __Pyx_Method_ClassMethod(PyObject *method) {
#if CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM <= 0x05080000
    if (PyObject_TypeCheck(method, &PyWrapperDescr_Type)) {
        return PyClassMethod_New(method);
    }
#else
#if CYTHON_COMPILING_IN_PYPY
    if (PyMethodDescr_Check(method))
#else
    if (__Pyx_TypeCheck(method, &PyMethodDescr_Type))
#endif
    {
#if CYTHON_COMPILING_IN_LIMITED_API
        return PyErr_Format(
            PyExc_SystemError,
            "Cython cannot yet handle classmethod on a MethodDescriptorType (%S) in limited API mode. "
            "This is most likely a classmethod in a cdef class method with binding=False. "
            "Try setting 'binding' to True.",
            method);
#elif CYTHON_COMPILING_IN_GRAAL && defined(GRAALPY_VERSION_NUM) && GRAALPY_VERSION_NUM > 0x19000000
        PyTypeObject *d_type = GraalPyDescrObject_GetType(method);
        return PyDescr_NewClassMethod(d_type, GraalPyMethodDescrObject_GetMethod(method));
#elif CYTHON_COMPILING_IN_GRAAL
        PyTypeObject *d_type = PyDescrObject_GetType(method);
        return PyDescr_NewClassMethod(d_type, PyMethodDescrObject_GetMethod(method));
#else
        PyMethodDescrObject *descr = (PyMethodDescrObject *)method;
        PyTypeObject *d_type = descr->d_common.d_type;
        return PyDescr_NewClassMethod(d_type, descr->d_method);
#endif
    }
#endif
#if !CYTHON_COMPILING_IN_LIMITED_API
    else if (PyMethod_Check(method)) {
        return PyClassMethod_New(PyMethod_GET_FUNCTION(method));
    }
    else {
        return PyClassMethod_New(method);
    }
#else
    {
        PyObject *func=NULL;
        PyObject *builtins, *classmethod, *classmethod_str, *result=NULL;
        if (__Pyx_TypeCheck(method, __pyx_mstate_global->__Pyx_CachedMethodType)) {
            func = PyObject_GetAttrString(method, "__func__");
            if (!func) goto bad;
        } else {
            func = method;
            Py_INCREF(func);
        }
        builtins = PyEval_GetBuiltins(); // borrowed
        if (unlikely(!builtins)) goto bad;
        classmethod_str = PyUnicode_FromString("classmethod");
        if (unlikely(!classmethod_str)) goto bad;
        classmethod = PyObject_GetItem(builtins, classmethod_str);
        Py_DECREF(classmethod_str);
        if (unlikely(!classmethod)) goto bad;
        result = PyObject_CallFunctionObjArgs(classmethod, func, NULL);
        Py_DECREF(classmethod);
        bad:
        Py_XDECREF(func);
        return result;
    }
#endif
}

/* CLineInTraceback (used by AddTraceback) */
#if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME
#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
#define __Pyx_PyProbablyModule_GetDict(o) __Pyx_XNewRef(PyModule_GetDict(o))
#elif !CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
#define __Pyx_PyProbablyModule_GetDict(o) PyObject_GenericGetDict(o, NULL);
#else
PyObject* __Pyx_PyProbablyModule_GetDict(PyObject *o) {
    PyObject **dict_ptr = _PyObject_GetDictPtr(o);
    return dict_ptr ? __Pyx_XNewRef(*dict_ptr) : NULL;
}
#endif
static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) {
    PyObject *use_cline = NULL;
    PyObject *ptype, *pvalue, *ptraceback;
    PyObject *cython_runtime_dict;
    CYTHON_MAYBE_UNUSED_VAR(tstate);
    if (unlikely(!__pyx_mstate_global->__pyx_cython_runtime)) {
        return c_line;
    }
    __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
    cython_runtime_dict = __Pyx_PyProbablyModule_GetDict(__pyx_mstate_global->__pyx_cython_runtime);
    if (likely(cython_runtime_dict)) {
        __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
            use_cline, cython_runtime_dict,
            __Pyx_PyDict_SetDefault(cython_runtime_dict, __pyx_mstate_global->__pyx_n_u_cline_in_traceback, Py_False))
    }
    if (use_cline == NULL || use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
        c_line = 0;
    }
    Py_XDECREF(use_cline);
    Py_XDECREF(cython_runtime_dict);
    __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
    return c_line;
}
#endif

/* CodeObjectCache (used by AddTraceback) */
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 __Pyx_CachedCodeObjectType *__pyx__find_code_object(struct __Pyx_CodeObjectCache *code_cache, int code_line) {
    __Pyx_CachedCodeObjectType* code_object;
    int pos;
    if (unlikely(!code_line) || unlikely(!code_cache->entries)) {
        return NULL;
    }
    pos = __pyx_bisect_code_objects(code_cache->entries, code_cache->count, code_line);
    if (unlikely(pos >= code_cache->count) || unlikely(code_cache->entries[pos].code_line != code_line)) {
        return NULL;
    }
    code_object = code_cache->entries[pos].code_object;
    Py_INCREF(code_object);
    return code_object;
}
static __Pyx_CachedCodeObjectType *__pyx_find_code_object(int code_line) {
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS
    (void)__pyx__find_code_object;
    return NULL; // Most implementation should have atomics. But otherwise, don't make it thread-safe, just miss.
#else
    struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache;
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    __pyx_nonatomic_int_type old_count = __pyx_atomic_incr_acq_rel(&code_cache->accessor_count);
    if (old_count < 0) {
        __pyx_atomic_decr_acq_rel(&code_cache->accessor_count);
        return NULL;
    }
#endif
    __Pyx_CachedCodeObjectType *result = __pyx__find_code_object(code_cache, code_line);
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    __pyx_atomic_decr_acq_rel(&code_cache->accessor_count);
#endif
    return result;
#endif
}
static void __pyx__insert_code_object(struct __Pyx_CodeObjectCache *code_cache, int code_line, __Pyx_CachedCodeObjectType* code_object)
{
    int pos, i;
    __Pyx_CodeObjectCacheEntry* entries = code_cache->entries;
    if (unlikely(!code_line)) {
        return;
    }
    if (unlikely(!entries)) {
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
        if (likely(entries)) {
            code_cache->entries = entries;
            code_cache->max_count = 64;
            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(code_cache->entries, code_cache->count, code_line);
    if ((pos < code_cache->count) && unlikely(code_cache->entries[pos].code_line == code_line)) {
        __Pyx_CachedCodeObjectType* tmp = entries[pos].code_object;
        entries[pos].code_object = code_object;
        Py_INCREF(code_object);
        Py_DECREF(tmp);
        return;
    }
    if (code_cache->count == code_cache->max_count) {
        int new_max = code_cache->max_count + 64;
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
            code_cache->entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry));
        if (unlikely(!entries)) {
            return;
        }
        code_cache->entries = entries;
        code_cache->max_count = new_max;
    }
    for (i=code_cache->count; i>pos; i--) {
        entries[i] = entries[i-1];
    }
    entries[pos].code_line = code_line;
    entries[pos].code_object = code_object;
    code_cache->count++;
    Py_INCREF(code_object);
}
static void __pyx_insert_code_object(int code_line, __Pyx_CachedCodeObjectType* code_object) {
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS
    (void)__pyx__insert_code_object;
    return; // Most implementation should have atomics. But otherwise, don't make it thread-safe, just fail.
#else
    struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache;
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    __pyx_nonatomic_int_type expected = 0;
    if (!__pyx_atomic_int_cmp_exchange(&code_cache->accessor_count, &expected, INT_MIN)) {
        return;
    }
#endif
    __pyx__insert_code_object(code_cache, code_line, code_object);
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    __pyx_atomic_sub(&code_cache->accessor_count, INT_MIN);
#endif
#endif
}

/* AddTraceback */
#include "compile.h"
#include "frameobject.h"
#include "traceback.h"
#if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API && !defined(PYPY_VERSION)
  #ifndef Py_BUILD_CORE
    #define Py_BUILD_CORE 1
  #endif
  #include "internal/pycore_frame.h"
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
static PyObject *__Pyx_PyCode_Replace_For_AddTraceback(PyObject *code, PyObject *scratch_dict,
                                                       PyObject *firstlineno, PyObject *name) {
    PyObject *replace = NULL;
    if (unlikely(PyDict_SetItemString(scratch_dict, "co_firstlineno", firstlineno))) return NULL;
    if (unlikely(PyDict_SetItemString(scratch_dict, "co_name", name))) return NULL;
    replace = PyObject_GetAttrString(code, "replace");
    if (likely(replace)) {
        PyObject *result = PyObject_Call(replace, __pyx_mstate_global->__pyx_empty_tuple, scratch_dict);
        Py_DECREF(replace);
        return result;
    }
    PyErr_Clear();
    return NULL;
}
static void __Pyx_AddTraceback(const char *funcname, int c_line,
                               int py_line, const char *filename) {
    PyObject *code_object = NULL, *py_py_line = NULL, *py_funcname = NULL, *dict = NULL;
    PyObject *replace = NULL, *getframe = NULL, *frame = NULL;
    PyObject *exc_type, *exc_value, *exc_traceback;
    int success = 0;
    if (c_line) {
        c_line = __Pyx_CLineForTraceback(__Pyx_PyThreadState_Current, c_line);
    }
    PyErr_Fetch(&exc_type, &exc_value, &exc_traceback);
    code_object = __pyx_find_code_object(c_line ? -c_line : py_line);
    if (!code_object) {
        code_object = Py_CompileString("_getframe()", filename, Py_eval_input);
        if (unlikely(!code_object)) goto bad;
        py_py_line = PyLong_FromLong(py_line);
        if (unlikely(!py_py_line)) goto bad;
        if (c_line) {
            py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        } else {
            py_funcname = PyUnicode_FromString(funcname);
        }
        if (unlikely(!py_funcname)) goto bad;
        dict = PyDict_New();
        if (unlikely(!dict)) goto bad;
        {
            PyObject *old_code_object = code_object;
            code_object = __Pyx_PyCode_Replace_For_AddTraceback(code_object, dict, py_py_line, py_funcname);
            Py_DECREF(old_code_object);
        }
        if (unlikely(!code_object)) goto bad;
        __pyx_insert_code_object(c_line ? -c_line : py_line, code_object);
    } else {
        dict = PyDict_New();
    }
    getframe = PySys_GetObject("_getframe");
    if (unlikely(!getframe)) goto bad;
    if (unlikely(PyDict_SetItemString(dict, "_getframe", getframe))) goto bad;
    frame = PyEval_EvalCode(code_object, dict, dict);
    if (unlikely(!frame) || frame == Py_None) goto bad;
    success = 1;
  bad:
    PyErr_Restore(exc_type, exc_value, exc_traceback);
    Py_XDECREF(code_object);
    Py_XDECREF(py_py_line);
    Py_XDECREF(py_funcname);
    Py_XDECREF(dict);
    Py_XDECREF(replace);
    if (success) {
        PyTraceBack_Here(
            (struct _frame*)frame);
    }
    Py_XDECREF(frame);
}
#else
static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
            const char *funcname, int c_line,
            int py_line, const char *filename) {
    PyCodeObject *py_code = NULL;
    PyObject *py_funcname = NULL;
    if (c_line) {
        py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        if (!py_funcname) goto bad;
        funcname = PyUnicode_AsUTF8(py_funcname);
        if (!funcname) goto bad;
    }
    py_code = PyCode_NewEmpty(filename, funcname, py_line);
    Py_XDECREF(py_funcname);
    return py_code;
bad:
    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;
    PyObject *ptype, *pvalue, *ptraceback;
    if (c_line) {
        c_line = __Pyx_CLineForTraceback(tstate, c_line);
    }
    py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
    if (!py_code) {
        __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
        py_code = __Pyx_CreateCodeObjectForTraceback(
            funcname, c_line, py_line, filename);
        if (!py_code) {
            /* If the code object creation fails, then we should clear the
               fetched exception references and propagate the new exception */
            Py_XDECREF(ptype);
            Py_XDECREF(pvalue);
            Py_XDECREF(ptraceback);
            goto bad;
        }
        __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
        __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
    }
    py_frame = PyFrame_New(
        tstate,            /*PyThreadState *tstate,*/
        py_code,           /*PyCodeObject *code,*/
        __pyx_mstate_global->__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);
}
#endif

/* CheckUnpickleChecksum */
static void __Pyx_RaiseUnpickleChecksumError(long checksum, long checksum1, long checksum2, long checksum3, const char *members) {
    PyObject *pickle_module = PyImport_ImportModule("pickle");
    if (unlikely(!pickle_module)) return;
    PyObject *pickle_error = PyObject_GetAttrString(pickle_module, "PickleError");
    Py_DECREF(pickle_module);
    if (unlikely(!pickle_error)) return;
    if (checksum2 == checksum1) {
        PyErr_Format(pickle_error, "Incompatible checksums (0x%x vs (0x%x) = (%s))",
            checksum, checksum1, members);
    } else if (checksum3 == checksum2) {
        PyErr_Format(pickle_error, "Incompatible checksums (0x%x vs (0x%x, 0x%x) = (%s))",
            checksum, checksum1, checksum2, members);
    } else {
        PyErr_Format(pickle_error, "Incompatible checksums (0x%x vs (0x%x, 0x%x, 0x%x) = (%s))",
            checksum, checksum1, checksum2, checksum3, members);
    }
    Py_DECREF(pickle_error);
}
static int __Pyx_CheckUnpickleChecksum(long checksum, long checksum1, long checksum2, long checksum3, const char *members) {
    int found = 0;
    found |= checksum1 == checksum;
    found |= checksum2 == checksum;
    found |= checksum3 == checksum;
    if (likely(found))
        return 0;
    __Pyx_RaiseUnpickleChecksumError(checksum, checksum1, checksum2, checksum3, members);
    return -1;
}

/* 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 int __Pyx_PyLong_As_int(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const int neg_one = (int) -1, const_zero = (int) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (unlikely(!PyLong_Check(x))) {
        int val;
        PyObject *tmp = __Pyx_PyNumber_Long(x);
        if (!tmp) return (int) -1;
        val = __Pyx_PyLong_As_int(tmp);
        Py_DECREF(tmp);
        return val;
    }
    if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
        if (unlikely(__Pyx_PyLong_IsNeg(x))) {
            goto raise_neg_overflow;
        } else if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_DigitCount(x)) {
                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 && PY_VERSION_HEX < 0x030C00A7
        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))
        } else if ((sizeof(int) <= sizeof(unsigned PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
        }
    } else {
#if CYTHON_USE_PYLONG_INTERNALS
        if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_SignedDigitCount(x)) {
                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))
        } else if ((sizeof(int) <= sizeof(PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
        }
    }
    {
        int val;
        int ret = -1;
#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
        Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
            x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
        if (unlikely(bytes_copied == -1)) {
        } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
            goto raise_overflow;
        } else {
            ret = 0;
        }
#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
        int one = 1; int is_little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&val;
        ret = _PyLong_AsByteArray((PyLongObject *)x,
                                    bytes, sizeof(val),
                                    is_little, !is_unsigned);
#else
        PyObject *v;
        PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
        int bits, remaining_bits, is_negative = 0;
        int chunk_size = (sizeof(long) < 8) ? 30 : 62;
        if (likely(PyLong_CheckExact(x))) {
            v = __Pyx_NewRef(x);
        } else {
            v = PyNumber_Long(x);
            if (unlikely(!v)) return (int) -1;
            assert(PyLong_CheckExact(v));
        }
        {
            int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
            if (unlikely(result < 0)) {
                Py_DECREF(v);
                return (int) -1;
            }
            is_negative = result == 1;
        }
        if (is_unsigned && unlikely(is_negative)) {
            Py_DECREF(v);
            goto raise_neg_overflow;
        } else if (is_negative) {
            stepval = PyNumber_Invert(v);
            Py_DECREF(v);
            if (unlikely(!stepval))
                return (int) -1;
        } else {
            stepval = v;
        }
        v = NULL;
        val = (int) 0;
        mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
        shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
        for (bits = 0; bits < (int) sizeof(int) * 8 - chunk_size; bits += chunk_size) {
            PyObject *tmp, *digit;
            long idigit;
            digit = PyNumber_And(stepval, mask);
            if (unlikely(!digit)) goto done;
            idigit = PyLong_AsLong(digit);
            Py_DECREF(digit);
            if (unlikely(idigit < 0)) goto done;
            val |= ((int) idigit) << bits;
            tmp = PyNumber_Rshift(stepval, shift);
            if (unlikely(!tmp)) goto done;
            Py_DECREF(stepval); stepval = tmp;
        }
        Py_DECREF(shift); shift = NULL;
        Py_DECREF(mask); mask = NULL;
        {
            long idigit = PyLong_AsLong(stepval);
            if (unlikely(idigit < 0)) goto done;
            remaining_bits = ((int) sizeof(int) * 8) - bits - (is_unsigned ? 0 : 1);
            if (unlikely(idigit >= (1L << remaining_bits)))
                goto raise_overflow;
            val |= ((int) idigit) << bits;
        }
        if (!is_unsigned) {
            if (unlikely(val & (((int) 1) << (sizeof(int) * 8 - 1))))
                goto raise_overflow;
            if (is_negative)
                val = ~val;
        }
        ret = 0;
    done:
        Py_XDECREF(shift);
        Py_XDECREF(mask);
        Py_XDECREF(stepval);
#endif
        if (unlikely(ret))
            return (int) -1;
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to int");
    return (int) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to int");
    return (int) -1;
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_enum____arrow_3a__3a_Type_3a__3a_type(enum  arrow::Type::type value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum  arrow::Type::type neg_one = (enum  arrow::Type::type) -1, const_zero = (enum  arrow::Type::type) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum  arrow::Type::type) < sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(enum  arrow::Type::type) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } else if (sizeof(enum  arrow::Type::type) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum  arrow::Type::type) <= sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(enum  arrow::Type::type) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(enum  arrow::Type::type),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(enum  arrow::Type::type));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_enum____arrow_3a__3a_UnionMode_3a__3a_type(enum  arrow::UnionMode::type value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum  arrow::UnionMode::type neg_one = (enum  arrow::UnionMode::type) -1, const_zero = (enum  arrow::UnionMode::type) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum  arrow::UnionMode::type) < sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(enum  arrow::UnionMode::type) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } else if (sizeof(enum  arrow::UnionMode::type) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum  arrow::UnionMode::type) <= sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(enum  arrow::UnionMode::type) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(enum  arrow::UnionMode::type),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(enum  arrow::UnionMode::type));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntFromPy */
static CYTHON_INLINE enum  arrow::Type::type __Pyx_PyLong_As_enum____arrow_3a__3a_Type_3a__3a_type(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum  arrow::Type::type neg_one = (enum  arrow::Type::type) -1, const_zero = (enum  arrow::Type::type) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (unlikely(!PyLong_Check(x))) {
        enum  arrow::Type::type val;
        PyObject *tmp = __Pyx_PyNumber_Long(x);
        if (!tmp) return (enum  arrow::Type::type) -1;
        val = __Pyx_PyLong_As_enum____arrow_3a__3a_Type_3a__3a_type(tmp);
        Py_DECREF(tmp);
        return val;
    }
    if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
        if (unlikely(__Pyx_PyLong_IsNeg(x))) {
            goto raise_neg_overflow;
        } else if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(enum  arrow::Type::type, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_DigitCount(x)) {
                case 2:
                    if ((8 * sizeof(enum  arrow::Type::type) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(enum  arrow::Type::type, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(enum  arrow::Type::type) >= 2 * PyLong_SHIFT)) {
                            return (enum  arrow::Type::type) (((((enum  arrow::Type::type)digits[1]) << PyLong_SHIFT) | (enum  arrow::Type::type)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(enum  arrow::Type::type) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(enum  arrow::Type::type, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(enum  arrow::Type::type) >= 3 * PyLong_SHIFT)) {
                            return (enum  arrow::Type::type) (((((((enum  arrow::Type::type)digits[2]) << PyLong_SHIFT) | (enum  arrow::Type::type)digits[1]) << PyLong_SHIFT) | (enum  arrow::Type::type)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(enum  arrow::Type::type) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(enum  arrow::Type::type, 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(enum  arrow::Type::type) >= 4 * PyLong_SHIFT)) {
                            return (enum  arrow::Type::type) (((((((((enum  arrow::Type::type)digits[3]) << PyLong_SHIFT) | (enum  arrow::Type::type)digits[2]) << PyLong_SHIFT) | (enum  arrow::Type::type)digits[1]) << PyLong_SHIFT) | (enum  arrow::Type::type)digits[0]));
                        }
                    }
                    break;
            }
        }
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
        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 (enum  arrow::Type::type) -1;
            if (unlikely(result == 1))
                goto raise_neg_overflow;
        }
#endif
        if ((sizeof(enum  arrow::Type::type) <= sizeof(unsigned long))) {
            __PYX_VERIFY_RETURN_INT_EXC(enum  arrow::Type::type, unsigned long, PyLong_AsUnsignedLong(x))
        } else if ((sizeof(enum  arrow::Type::type) <= sizeof(unsigned PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(enum  arrow::Type::type, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
        }
    } else {
#if CYTHON_USE_PYLONG_INTERNALS
        if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(enum  arrow::Type::type, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_SignedDigitCount(x)) {
                case -2:
                    if ((8 * sizeof(enum  arrow::Type::type) - 1 > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(enum  arrow::Type::type, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(enum  arrow::Type::type) - 1 > 2 * PyLong_SHIFT)) {
                            return (enum  arrow::Type::type) (((enum  arrow::Type::type)-1)*(((((enum  arrow::Type::type)digits[1]) << PyLong_SHIFT) | (enum  arrow::Type::type)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if ((8 * sizeof(enum  arrow::Type::type) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(enum  arrow::Type::type, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(enum  arrow::Type::type) - 1 > 2 * PyLong_SHIFT)) {
                            return (enum  arrow::Type::type) ((((((enum  arrow::Type::type)digits[1]) << PyLong_SHIFT) | (enum  arrow::Type::type)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if ((8 * sizeof(enum  arrow::Type::type) - 1 > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(enum  arrow::Type::type, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(enum  arrow::Type::type) - 1 > 3 * PyLong_SHIFT)) {
                            return (enum  arrow::Type::type) (((enum  arrow::Type::type)-1)*(((((((enum  arrow::Type::type)digits[2]) << PyLong_SHIFT) | (enum  arrow::Type::type)digits[1]) << PyLong_SHIFT) | (enum  arrow::Type::type)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(enum  arrow::Type::type) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(enum  arrow::Type::type, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(enum  arrow::Type::type) - 1 > 3 * PyLong_SHIFT)) {
                            return (enum  arrow::Type::type) ((((((((enum  arrow::Type::type)digits[2]) << PyLong_SHIFT) | (enum  arrow::Type::type)digits[1]) << PyLong_SHIFT) | (enum  arrow::Type::type)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if ((8 * sizeof(enum  arrow::Type::type) - 1 > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(enum  arrow::Type::type, 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(enum  arrow::Type::type) - 1 > 4 * PyLong_SHIFT)) {
                            return (enum  arrow::Type::type) (((enum  arrow::Type::type)-1)*(((((((((enum  arrow::Type::type)digits[3]) << PyLong_SHIFT) | (enum  arrow::Type::type)digits[2]) << PyLong_SHIFT) | (enum  arrow::Type::type)digits[1]) << PyLong_SHIFT) | (enum  arrow::Type::type)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(enum  arrow::Type::type) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(enum  arrow::Type::type, 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(enum  arrow::Type::type) - 1 > 4 * PyLong_SHIFT)) {
                            return (enum  arrow::Type::type) ((((((((((enum  arrow::Type::type)digits[3]) << PyLong_SHIFT) | (enum  arrow::Type::type)digits[2]) << PyLong_SHIFT) | (enum  arrow::Type::type)digits[1]) << PyLong_SHIFT) | (enum  arrow::Type::type)digits[0])));
                        }
                    }
                    break;
            }
        }
#endif
        if ((sizeof(enum  arrow::Type::type) <= sizeof(long))) {
            __PYX_VERIFY_RETURN_INT_EXC(enum  arrow::Type::type, long, PyLong_AsLong(x))
        } else if ((sizeof(enum  arrow::Type::type) <= sizeof(PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(enum  arrow::Type::type, PY_LONG_LONG, PyLong_AsLongLong(x))
        }
    }
    {
        enum  arrow::Type::type val;
        int ret = -1;
#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
        Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
            x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
        if (unlikely(bytes_copied == -1)) {
        } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
            goto raise_overflow;
        } else {
            ret = 0;
        }
#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
        int one = 1; int is_little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&val;
        ret = _PyLong_AsByteArray((PyLongObject *)x,
                                    bytes, sizeof(val),
                                    is_little, !is_unsigned);
#else
        PyErr_SetString(PyExc_RuntimeError,
                        "_PyLong_AsByteArray() or PyLong_AsNativeBytes() not available, cannot convert large enums");
        val = (enum  arrow::Type::type) -1;
#endif
        if (unlikely(ret))
            return (enum  arrow::Type::type) -1;
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to enum  arrow::Type::type");
    return (enum  arrow::Type::type) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to enum  arrow::Type::type");
    return (enum  arrow::Type::type) -1;
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_int(int value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const int neg_one = (int) -1, const_zero = (int) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(int) < sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(int) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(int) <= sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(int),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(int));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntFromPy */
static CYTHON_INLINE int64_t __Pyx_PyLong_As_int64_t(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const int64_t neg_one = (int64_t) -1, const_zero = (int64_t) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (unlikely(!PyLong_Check(x))) {
        int64_t val;
        PyObject *tmp = __Pyx_PyNumber_Long(x);
        if (!tmp) return (int64_t) -1;
        val = __Pyx_PyLong_As_int64_t(tmp);
        Py_DECREF(tmp);
        return val;
    }
    if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
        if (unlikely(__Pyx_PyLong_IsNeg(x))) {
            goto raise_neg_overflow;
        } else if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(int64_t, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_DigitCount(x)) {
                case 2:
                    if ((8 * sizeof(int64_t) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int64_t) >= 2 * PyLong_SHIFT)) {
                            return (int64_t) (((((int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(int64_t) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int64_t) >= 3 * PyLong_SHIFT)) {
                            return (int64_t) (((((((int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(int64_t) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int64_t, 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(int64_t) >= 4 * PyLong_SHIFT)) {
                            return (int64_t) (((((((((int64_t)digits[3]) << PyLong_SHIFT) | (int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0]));
                        }
                    }
                    break;
            }
        }
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
        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 (int64_t) -1;
            if (unlikely(result == 1))
                goto raise_neg_overflow;
        }
#endif
        if ((sizeof(int64_t) <= sizeof(unsigned long))) {
            __PYX_VERIFY_RETURN_INT_EXC(int64_t, unsigned long, PyLong_AsUnsignedLong(x))
        } else if ((sizeof(int64_t) <= sizeof(unsigned PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(int64_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
        }
    } else {
#if CYTHON_USE_PYLONG_INTERNALS
        if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(int64_t, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_SignedDigitCount(x)) {
                case -2:
                    if ((8 * sizeof(int64_t) - 1 > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int64_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int64_t) - 1 > 2 * PyLong_SHIFT)) {
                            return (int64_t) (((int64_t)-1)*(((((int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if ((8 * sizeof(int64_t) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int64_t) - 1 > 2 * PyLong_SHIFT)) {
                            return (int64_t) ((((((int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if ((8 * sizeof(int64_t) - 1 > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int64_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int64_t) - 1 > 3 * PyLong_SHIFT)) {
                            return (int64_t) (((int64_t)-1)*(((((((int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(int64_t) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int64_t) - 1 > 3 * PyLong_SHIFT)) {
                            return (int64_t) ((((((((int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if ((8 * sizeof(int64_t) - 1 > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int64_t, 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(int64_t) - 1 > 4 * PyLong_SHIFT)) {
                            return (int64_t) (((int64_t)-1)*(((((((((int64_t)digits[3]) << PyLong_SHIFT) | (int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(int64_t) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int64_t, 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(int64_t) - 1 > 4 * PyLong_SHIFT)) {
                            return (int64_t) ((((((((((int64_t)digits[3]) << PyLong_SHIFT) | (int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])));
                        }
                    }
                    break;
            }
        }
#endif
        if ((sizeof(int64_t) <= sizeof(long))) {
            __PYX_VERIFY_RETURN_INT_EXC(int64_t, long, PyLong_AsLong(x))
        } else if ((sizeof(int64_t) <= sizeof(PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(int64_t, PY_LONG_LONG, PyLong_AsLongLong(x))
        }
    }
    {
        int64_t val;
        int ret = -1;
#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
        Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
            x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
        if (unlikely(bytes_copied == -1)) {
        } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
            goto raise_overflow;
        } else {
            ret = 0;
        }
#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
        int one = 1; int is_little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&val;
        ret = _PyLong_AsByteArray((PyLongObject *)x,
                                    bytes, sizeof(val),
                                    is_little, !is_unsigned);
#else
        PyObject *v;
        PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
        int bits, remaining_bits, is_negative = 0;
        int chunk_size = (sizeof(long) < 8) ? 30 : 62;
        if (likely(PyLong_CheckExact(x))) {
            v = __Pyx_NewRef(x);
        } else {
            v = PyNumber_Long(x);
            if (unlikely(!v)) return (int64_t) -1;
            assert(PyLong_CheckExact(v));
        }
        {
            int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
            if (unlikely(result < 0)) {
                Py_DECREF(v);
                return (int64_t) -1;
            }
            is_negative = result == 1;
        }
        if (is_unsigned && unlikely(is_negative)) {
            Py_DECREF(v);
            goto raise_neg_overflow;
        } else if (is_negative) {
            stepval = PyNumber_Invert(v);
            Py_DECREF(v);
            if (unlikely(!stepval))
                return (int64_t) -1;
        } else {
            stepval = v;
        }
        v = NULL;
        val = (int64_t) 0;
        mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
        shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
        for (bits = 0; bits < (int) sizeof(int64_t) * 8 - chunk_size; bits += chunk_size) {
            PyObject *tmp, *digit;
            long idigit;
            digit = PyNumber_And(stepval, mask);
            if (unlikely(!digit)) goto done;
            idigit = PyLong_AsLong(digit);
            Py_DECREF(digit);
            if (unlikely(idigit < 0)) goto done;
            val |= ((int64_t) idigit) << bits;
            tmp = PyNumber_Rshift(stepval, shift);
            if (unlikely(!tmp)) goto done;
            Py_DECREF(stepval); stepval = tmp;
        }
        Py_DECREF(shift); shift = NULL;
        Py_DECREF(mask); mask = NULL;
        {
            long idigit = PyLong_AsLong(stepval);
            if (unlikely(idigit < 0)) goto done;
            remaining_bits = ((int) sizeof(int64_t) * 8) - bits - (is_unsigned ? 0 : 1);
            if (unlikely(idigit >= (1L << remaining_bits)))
                goto raise_overflow;
            val |= ((int64_t) idigit) << bits;
        }
        if (!is_unsigned) {
            if (unlikely(val & (((int64_t) 1) << (sizeof(int64_t) * 8 - 1))))
                goto raise_overflow;
            if (is_negative)
                val = ~val;
        }
        ret = 0;
    done:
        Py_XDECREF(shift);
        Py_XDECREF(mask);
        Py_XDECREF(stepval);
#endif
        if (unlikely(ret))
            return (int64_t) -1;
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to int64_t");
    return (int64_t) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to int64_t");
    return (int64_t) -1;
}

/* CIntFromPy */
static CYTHON_INLINE enum  arrow::TimeUnit::type __Pyx_PyLong_As_enum____arrow_3a__3a_TimeUnit_3a__3a_type(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum  arrow::TimeUnit::type neg_one = (enum  arrow::TimeUnit::type) -1, const_zero = (enum  arrow::TimeUnit::type) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (unlikely(!PyLong_Check(x))) {
        enum  arrow::TimeUnit::type val;
        PyObject *tmp = __Pyx_PyNumber_Long(x);
        if (!tmp) return (enum  arrow::TimeUnit::type) -1;
        val = __Pyx_PyLong_As_enum____arrow_3a__3a_TimeUnit_3a__3a_type(tmp);
        Py_DECREF(tmp);
        return val;
    }
    if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
        if (unlikely(__Pyx_PyLong_IsNeg(x))) {
            goto raise_neg_overflow;
        } else if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(enum  arrow::TimeUnit::type, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_DigitCount(x)) {
                case 2:
                    if ((8 * sizeof(enum  arrow::TimeUnit::type) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(enum  arrow::TimeUnit::type, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(enum  arrow::TimeUnit::type) >= 2 * PyLong_SHIFT)) {
                            return (enum  arrow::TimeUnit::type) (((((enum  arrow::TimeUnit::type)digits[1]) << PyLong_SHIFT) | (enum  arrow::TimeUnit::type)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(enum  arrow::TimeUnit::type) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(enum  arrow::TimeUnit::type, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(enum  arrow::TimeUnit::type) >= 3 * PyLong_SHIFT)) {
                            return (enum  arrow::TimeUnit::type) (((((((enum  arrow::TimeUnit::type)digits[2]) << PyLong_SHIFT) | (enum  arrow::TimeUnit::type)digits[1]) << PyLong_SHIFT) | (enum  arrow::TimeUnit::type)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(enum  arrow::TimeUnit::type) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(enum  arrow::TimeUnit::type, 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(enum  arrow::TimeUnit::type) >= 4 * PyLong_SHIFT)) {
                            return (enum  arrow::TimeUnit::type) (((((((((enum  arrow::TimeUnit::type)digits[3]) << PyLong_SHIFT) | (enum  arrow::TimeUnit::type)digits[2]) << PyLong_SHIFT) | (enum  arrow::TimeUnit::type)digits[1]) << PyLong_SHIFT) | (enum  arrow::TimeUnit::type)digits[0]));
                        }
                    }
                    break;
            }
        }
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
        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 (enum  arrow::TimeUnit::type) -1;
            if (unlikely(result == 1))
                goto raise_neg_overflow;
        }
#endif
        if ((sizeof(enum  arrow::TimeUnit::type) <= sizeof(unsigned long))) {
            __PYX_VERIFY_RETURN_INT_EXC(enum  arrow::TimeUnit::type, unsigned long, PyLong_AsUnsignedLong(x))
        } else if ((sizeof(enum  arrow::TimeUnit::type) <= sizeof(unsigned PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(enum  arrow::TimeUnit::type, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
        }
    } else {
#if CYTHON_USE_PYLONG_INTERNALS
        if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(enum  arrow::TimeUnit::type, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_SignedDigitCount(x)) {
                case -2:
                    if ((8 * sizeof(enum  arrow::TimeUnit::type) - 1 > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(enum  arrow::TimeUnit::type, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(enum  arrow::TimeUnit::type) - 1 > 2 * PyLong_SHIFT)) {
                            return (enum  arrow::TimeUnit::type) (((enum  arrow::TimeUnit::type)-1)*(((((enum  arrow::TimeUnit::type)digits[1]) << PyLong_SHIFT) | (enum  arrow::TimeUnit::type)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if ((8 * sizeof(enum  arrow::TimeUnit::type) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(enum  arrow::TimeUnit::type, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(enum  arrow::TimeUnit::type) - 1 > 2 * PyLong_SHIFT)) {
                            return (enum  arrow::TimeUnit::type) ((((((enum  arrow::TimeUnit::type)digits[1]) << PyLong_SHIFT) | (enum  arrow::TimeUnit::type)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if ((8 * sizeof(enum  arrow::TimeUnit::type) - 1 > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(enum  arrow::TimeUnit::type, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(enum  arrow::TimeUnit::type) - 1 > 3 * PyLong_SHIFT)) {
                            return (enum  arrow::TimeUnit::type) (((enum  arrow::TimeUnit::type)-1)*(((((((enum  arrow::TimeUnit::type)digits[2]) << PyLong_SHIFT) | (enum  arrow::TimeUnit::type)digits[1]) << PyLong_SHIFT) | (enum  arrow::TimeUnit::type)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(enum  arrow::TimeUnit::type) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(enum  arrow::TimeUnit::type, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(enum  arrow::TimeUnit::type) - 1 > 3 * PyLong_SHIFT)) {
                            return (enum  arrow::TimeUnit::type) ((((((((enum  arrow::TimeUnit::type)digits[2]) << PyLong_SHIFT) | (enum  arrow::TimeUnit::type)digits[1]) << PyLong_SHIFT) | (enum  arrow::TimeUnit::type)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if ((8 * sizeof(enum  arrow::TimeUnit::type) - 1 > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(enum  arrow::TimeUnit::type, 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(enum  arrow::TimeUnit::type) - 1 > 4 * PyLong_SHIFT)) {
                            return (enum  arrow::TimeUnit::type) (((enum  arrow::TimeUnit::type)-1)*(((((((((enum  arrow::TimeUnit::type)digits[3]) << PyLong_SHIFT) | (enum  arrow::TimeUnit::type)digits[2]) << PyLong_SHIFT) | (enum  arrow::TimeUnit::type)digits[1]) << PyLong_SHIFT) | (enum  arrow::TimeUnit::type)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(enum  arrow::TimeUnit::type) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(enum  arrow::TimeUnit::type, 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(enum  arrow::TimeUnit::type) - 1 > 4 * PyLong_SHIFT)) {
                            return (enum  arrow::TimeUnit::type) ((((((((((enum  arrow::TimeUnit::type)digits[3]) << PyLong_SHIFT) | (enum  arrow::TimeUnit::type)digits[2]) << PyLong_SHIFT) | (enum  arrow::TimeUnit::type)digits[1]) << PyLong_SHIFT) | (enum  arrow::TimeUnit::type)digits[0])));
                        }
                    }
                    break;
            }
        }
#endif
        if ((sizeof(enum  arrow::TimeUnit::type) <= sizeof(long))) {
            __PYX_VERIFY_RETURN_INT_EXC(enum  arrow::TimeUnit::type, long, PyLong_AsLong(x))
        } else if ((sizeof(enum  arrow::TimeUnit::type) <= sizeof(PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(enum  arrow::TimeUnit::type, PY_LONG_LONG, PyLong_AsLongLong(x))
        }
    }
    {
        enum  arrow::TimeUnit::type val;
        int ret = -1;
#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
        Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
            x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
        if (unlikely(bytes_copied == -1)) {
        } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
            goto raise_overflow;
        } else {
            ret = 0;
        }
#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
        int one = 1; int is_little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&val;
        ret = _PyLong_AsByteArray((PyLongObject *)x,
                                    bytes, sizeof(val),
                                    is_little, !is_unsigned);
#else
        PyErr_SetString(PyExc_RuntimeError,
                        "_PyLong_AsByteArray() or PyLong_AsNativeBytes() not available, cannot convert large enums");
        val = (enum  arrow::TimeUnit::type) -1;
#endif
        if (unlikely(ret))
            return (enum  arrow::TimeUnit::type) -1;
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to enum  arrow::TimeUnit::type");
    return (enum  arrow::TimeUnit::type) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to enum  arrow::TimeUnit::type");
    return (enum  arrow::TimeUnit::type) -1;
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_int64_t(int64_t value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const int64_t neg_one = (int64_t) -1, const_zero = (int64_t) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(int64_t) < sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(int64_t) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } else if (sizeof(int64_t) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(int64_t) <= sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(int64_t) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(int64_t),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(int64_t));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntFromPy */
static CYTHON_INLINE enum __pyx_t_7pyarrow_3lib_Alignment __Pyx_PyLong_As_enum____pyx_t_7pyarrow_3lib_Alignment(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum __pyx_t_7pyarrow_3lib_Alignment neg_one = (enum __pyx_t_7pyarrow_3lib_Alignment) -1, const_zero = (enum __pyx_t_7pyarrow_3lib_Alignment) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (unlikely(!PyLong_Check(x))) {
        enum __pyx_t_7pyarrow_3lib_Alignment val;
        PyObject *tmp = __Pyx_PyNumber_Long(x);
        if (!tmp) return (enum __pyx_t_7pyarrow_3lib_Alignment) -1;
        val = __Pyx_PyLong_As_enum____pyx_t_7pyarrow_3lib_Alignment(tmp);
        Py_DECREF(tmp);
        return val;
    }
    if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
        if (unlikely(__Pyx_PyLong_IsNeg(x))) {
            goto raise_neg_overflow;
        } else if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(enum __pyx_t_7pyarrow_3lib_Alignment, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_DigitCount(x)) {
                case 2:
                    if ((8 * sizeof(enum __pyx_t_7pyarrow_3lib_Alignment) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(enum __pyx_t_7pyarrow_3lib_Alignment, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(enum __pyx_t_7pyarrow_3lib_Alignment) >= 2 * PyLong_SHIFT)) {
                            return (enum __pyx_t_7pyarrow_3lib_Alignment) (((((enum __pyx_t_7pyarrow_3lib_Alignment)digits[1]) << PyLong_SHIFT) | (enum __pyx_t_7pyarrow_3lib_Alignment)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(enum __pyx_t_7pyarrow_3lib_Alignment) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(enum __pyx_t_7pyarrow_3lib_Alignment, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(enum __pyx_t_7pyarrow_3lib_Alignment) >= 3 * PyLong_SHIFT)) {
                            return (enum __pyx_t_7pyarrow_3lib_Alignment) (((((((enum __pyx_t_7pyarrow_3lib_Alignment)digits[2]) << PyLong_SHIFT) | (enum __pyx_t_7pyarrow_3lib_Alignment)digits[1]) << PyLong_SHIFT) | (enum __pyx_t_7pyarrow_3lib_Alignment)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(enum __pyx_t_7pyarrow_3lib_Alignment) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(enum __pyx_t_7pyarrow_3lib_Alignment, 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(enum __pyx_t_7pyarrow_3lib_Alignment) >= 4 * PyLong_SHIFT)) {
                            return (enum __pyx_t_7pyarrow_3lib_Alignment) (((((((((enum __pyx_t_7pyarrow_3lib_Alignment)digits[3]) << PyLong_SHIFT) | (enum __pyx_t_7pyarrow_3lib_Alignment)digits[2]) << PyLong_SHIFT) | (enum __pyx_t_7pyarrow_3lib_Alignment)digits[1]) << PyLong_SHIFT) | (enum __pyx_t_7pyarrow_3lib_Alignment)digits[0]));
                        }
                    }
                    break;
            }
        }
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
        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 (enum __pyx_t_7pyarrow_3lib_Alignment) -1;
            if (unlikely(result == 1))
                goto raise_neg_overflow;
        }
#endif
        if ((sizeof(enum __pyx_t_7pyarrow_3lib_Alignment) <= sizeof(unsigned long))) {
            __PYX_VERIFY_RETURN_INT_EXC(enum __pyx_t_7pyarrow_3lib_Alignment, unsigned long, PyLong_AsUnsignedLong(x))
        } else if ((sizeof(enum __pyx_t_7pyarrow_3lib_Alignment) <= sizeof(unsigned PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(enum __pyx_t_7pyarrow_3lib_Alignment, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
        }
    } else {
#if CYTHON_USE_PYLONG_INTERNALS
        if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(enum __pyx_t_7pyarrow_3lib_Alignment, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_SignedDigitCount(x)) {
                case -2:
                    if ((8 * sizeof(enum __pyx_t_7pyarrow_3lib_Alignment) - 1 > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(enum __pyx_t_7pyarrow_3lib_Alignment, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(enum __pyx_t_7pyarrow_3lib_Alignment) - 1 > 2 * PyLong_SHIFT)) {
                            return (enum __pyx_t_7pyarrow_3lib_Alignment) (((enum __pyx_t_7pyarrow_3lib_Alignment)-1)*(((((enum __pyx_t_7pyarrow_3lib_Alignment)digits[1]) << PyLong_SHIFT) | (enum __pyx_t_7pyarrow_3lib_Alignment)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if ((8 * sizeof(enum __pyx_t_7pyarrow_3lib_Alignment) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(enum __pyx_t_7pyarrow_3lib_Alignment, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(enum __pyx_t_7pyarrow_3lib_Alignment) - 1 > 2 * PyLong_SHIFT)) {
                            return (enum __pyx_t_7pyarrow_3lib_Alignment) ((((((enum __pyx_t_7pyarrow_3lib_Alignment)digits[1]) << PyLong_SHIFT) | (enum __pyx_t_7pyarrow_3lib_Alignment)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if ((8 * sizeof(enum __pyx_t_7pyarrow_3lib_Alignment) - 1 > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(enum __pyx_t_7pyarrow_3lib_Alignment, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(enum __pyx_t_7pyarrow_3lib_Alignment) - 1 > 3 * PyLong_SHIFT)) {
                            return (enum __pyx_t_7pyarrow_3lib_Alignment) (((enum __pyx_t_7pyarrow_3lib_Alignment)-1)*(((((((enum __pyx_t_7pyarrow_3lib_Alignment)digits[2]) << PyLong_SHIFT) | (enum __pyx_t_7pyarrow_3lib_Alignment)digits[1]) << PyLong_SHIFT) | (enum __pyx_t_7pyarrow_3lib_Alignment)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(enum __pyx_t_7pyarrow_3lib_Alignment) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(enum __pyx_t_7pyarrow_3lib_Alignment, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(enum __pyx_t_7pyarrow_3lib_Alignment) - 1 > 3 * PyLong_SHIFT)) {
                            return (enum __pyx_t_7pyarrow_3lib_Alignment) ((((((((enum __pyx_t_7pyarrow_3lib_Alignment)digits[2]) << PyLong_SHIFT) | (enum __pyx_t_7pyarrow_3lib_Alignment)digits[1]) << PyLong_SHIFT) | (enum __pyx_t_7pyarrow_3lib_Alignment)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if ((8 * sizeof(enum __pyx_t_7pyarrow_3lib_Alignment) - 1 > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(enum __pyx_t_7pyarrow_3lib_Alignment, 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(enum __pyx_t_7pyarrow_3lib_Alignment) - 1 > 4 * PyLong_SHIFT)) {
                            return (enum __pyx_t_7pyarrow_3lib_Alignment) (((enum __pyx_t_7pyarrow_3lib_Alignment)-1)*(((((((((enum __pyx_t_7pyarrow_3lib_Alignment)digits[3]) << PyLong_SHIFT) | (enum __pyx_t_7pyarrow_3lib_Alignment)digits[2]) << PyLong_SHIFT) | (enum __pyx_t_7pyarrow_3lib_Alignment)digits[1]) << PyLong_SHIFT) | (enum __pyx_t_7pyarrow_3lib_Alignment)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(enum __pyx_t_7pyarrow_3lib_Alignment) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(enum __pyx_t_7pyarrow_3lib_Alignment, 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(enum __pyx_t_7pyarrow_3lib_Alignment) - 1 > 4 * PyLong_SHIFT)) {
                            return (enum __pyx_t_7pyarrow_3lib_Alignment) ((((((((((enum __pyx_t_7pyarrow_3lib_Alignment)digits[3]) << PyLong_SHIFT) | (enum __pyx_t_7pyarrow_3lib_Alignment)digits[2]) << PyLong_SHIFT) | (enum __pyx_t_7pyarrow_3lib_Alignment)digits[1]) << PyLong_SHIFT) | (enum __pyx_t_7pyarrow_3lib_Alignment)digits[0])));
                        }
                    }
                    break;
            }
        }
#endif
        if ((sizeof(enum __pyx_t_7pyarrow_3lib_Alignment) <= sizeof(long))) {
            __PYX_VERIFY_RETURN_INT_EXC(enum __pyx_t_7pyarrow_3lib_Alignment, long, PyLong_AsLong(x))
        } else if ((sizeof(enum __pyx_t_7pyarrow_3lib_Alignment) <= sizeof(PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(enum __pyx_t_7pyarrow_3lib_Alignment, PY_LONG_LONG, PyLong_AsLongLong(x))
        }
    }
    {
        enum __pyx_t_7pyarrow_3lib_Alignment val;
        int ret = -1;
#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
        Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
            x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
        if (unlikely(bytes_copied == -1)) {
        } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
            goto raise_overflow;
        } else {
            ret = 0;
        }
#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
        int one = 1; int is_little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&val;
        ret = _PyLong_AsByteArray((PyLongObject *)x,
                                    bytes, sizeof(val),
                                    is_little, !is_unsigned);
#else
        PyErr_SetString(PyExc_RuntimeError,
                        "_PyLong_AsByteArray() or PyLong_AsNativeBytes() not available, cannot convert large enums");
        val = (enum __pyx_t_7pyarrow_3lib_Alignment) -1;
#endif
        if (unlikely(ret))
            return (enum __pyx_t_7pyarrow_3lib_Alignment) -1;
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to enum __pyx_t_7pyarrow_3lib_Alignment");
    return (enum __pyx_t_7pyarrow_3lib_Alignment) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to enum __pyx_t_7pyarrow_3lib_Alignment");
    return (enum __pyx_t_7pyarrow_3lib_Alignment) -1;
}

/* CIntFromPy */
static CYTHON_INLINE long __Pyx_PyLong_As_long(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const long neg_one = (long) -1, const_zero = (long) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (unlikely(!PyLong_Check(x))) {
        long val;
        PyObject *tmp = __Pyx_PyNumber_Long(x);
        if (!tmp) return (long) -1;
        val = __Pyx_PyLong_As_long(tmp);
        Py_DECREF(tmp);
        return val;
    }
    if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
        if (unlikely(__Pyx_PyLong_IsNeg(x))) {
            goto raise_neg_overflow;
        } else if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_DigitCount(x)) {
                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 && PY_VERSION_HEX < 0x030C00A7
        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))
        } else if ((sizeof(long) <= sizeof(unsigned PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
        }
    } else {
#if CYTHON_USE_PYLONG_INTERNALS
        if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_SignedDigitCount(x)) {
                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))
        } else if ((sizeof(long) <= sizeof(PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
        }
    }
    {
        long val;
        int ret = -1;
#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
        Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
            x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
        if (unlikely(bytes_copied == -1)) {
        } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
            goto raise_overflow;
        } else {
            ret = 0;
        }
#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
        int one = 1; int is_little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&val;
        ret = _PyLong_AsByteArray((PyLongObject *)x,
                                    bytes, sizeof(val),
                                    is_little, !is_unsigned);
#else
        PyObject *v;
        PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
        int bits, remaining_bits, is_negative = 0;
        int chunk_size = (sizeof(long) < 8) ? 30 : 62;
        if (likely(PyLong_CheckExact(x))) {
            v = __Pyx_NewRef(x);
        } else {
            v = PyNumber_Long(x);
            if (unlikely(!v)) return (long) -1;
            assert(PyLong_CheckExact(v));
        }
        {
            int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
            if (unlikely(result < 0)) {
                Py_DECREF(v);
                return (long) -1;
            }
            is_negative = result == 1;
        }
        if (is_unsigned && unlikely(is_negative)) {
            Py_DECREF(v);
            goto raise_neg_overflow;
        } else if (is_negative) {
            stepval = PyNumber_Invert(v);
            Py_DECREF(v);
            if (unlikely(!stepval))
                return (long) -1;
        } else {
            stepval = v;
        }
        v = NULL;
        val = (long) 0;
        mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
        shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
        for (bits = 0; bits < (int) sizeof(long) * 8 - chunk_size; bits += chunk_size) {
            PyObject *tmp, *digit;
            long idigit;
            digit = PyNumber_And(stepval, mask);
            if (unlikely(!digit)) goto done;
            idigit = PyLong_AsLong(digit);
            Py_DECREF(digit);
            if (unlikely(idigit < 0)) goto done;
            val |= ((long) idigit) << bits;
            tmp = PyNumber_Rshift(stepval, shift);
            if (unlikely(!tmp)) goto done;
            Py_DECREF(stepval); stepval = tmp;
        }
        Py_DECREF(shift); shift = NULL;
        Py_DECREF(mask); mask = NULL;
        {
            long idigit = PyLong_AsLong(stepval);
            if (unlikely(idigit < 0)) goto done;
            remaining_bits = ((int) sizeof(long) * 8) - bits - (is_unsigned ? 0 : 1);
            if (unlikely(idigit >= (1L << remaining_bits)))
                goto raise_overflow;
            val |= ((long) idigit) << bits;
        }
        if (!is_unsigned) {
            if (unlikely(val & (((long) 1) << (sizeof(long) * 8 - 1))))
                goto raise_overflow;
            if (is_negative)
                val = ~val;
        }
        ret = 0;
    done:
        Py_XDECREF(shift);
        Py_XDECREF(mask);
        Py_XDECREF(stepval);
#endif
        if (unlikely(ret))
            return (long) -1;
        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 uint64_t __Pyx_PyLong_As_uint64_t(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const uint64_t neg_one = (uint64_t) -1, const_zero = (uint64_t) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (unlikely(!PyLong_Check(x))) {
        uint64_t val;
        PyObject *tmp = __Pyx_PyNumber_Long(x);
        if (!tmp) return (uint64_t) -1;
        val = __Pyx_PyLong_As_uint64_t(tmp);
        Py_DECREF(tmp);
        return val;
    }
    if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
        if (unlikely(__Pyx_PyLong_IsNeg(x))) {
            goto raise_neg_overflow;
        } else if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(uint64_t, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_DigitCount(x)) {
                case 2:
                    if ((8 * sizeof(uint64_t) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(uint64_t) >= 2 * PyLong_SHIFT)) {
                            return (uint64_t) (((((uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(uint64_t) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(uint64_t) >= 3 * PyLong_SHIFT)) {
                            return (uint64_t) (((((((uint64_t)digits[2]) << PyLong_SHIFT) | (uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(uint64_t) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(uint64_t, 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(uint64_t) >= 4 * PyLong_SHIFT)) {
                            return (uint64_t) (((((((((uint64_t)digits[3]) << PyLong_SHIFT) | (uint64_t)digits[2]) << PyLong_SHIFT) | (uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0]));
                        }
                    }
                    break;
            }
        }
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
        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 (uint64_t) -1;
            if (unlikely(result == 1))
                goto raise_neg_overflow;
        }
#endif
        if ((sizeof(uint64_t) <= sizeof(unsigned long))) {
            __PYX_VERIFY_RETURN_INT_EXC(uint64_t, unsigned long, PyLong_AsUnsignedLong(x))
        } else if ((sizeof(uint64_t) <= sizeof(unsigned PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(uint64_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
        }
    } else {
#if CYTHON_USE_PYLONG_INTERNALS
        if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(uint64_t, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_SignedDigitCount(x)) {
                case -2:
                    if ((8 * sizeof(uint64_t) - 1 > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(uint64_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(uint64_t) - 1 > 2 * PyLong_SHIFT)) {
                            return (uint64_t) (((uint64_t)-1)*(((((uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if ((8 * sizeof(uint64_t) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(uint64_t) - 1 > 2 * PyLong_SHIFT)) {
                            return (uint64_t) ((((((uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if ((8 * sizeof(uint64_t) - 1 > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(uint64_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(uint64_t) - 1 > 3 * PyLong_SHIFT)) {
                            return (uint64_t) (((uint64_t)-1)*(((((((uint64_t)digits[2]) << PyLong_SHIFT) | (uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(uint64_t) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(uint64_t) - 1 > 3 * PyLong_SHIFT)) {
                            return (uint64_t) ((((((((uint64_t)digits[2]) << PyLong_SHIFT) | (uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if ((8 * sizeof(uint64_t) - 1 > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(uint64_t, 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(uint64_t) - 1 > 4 * PyLong_SHIFT)) {
                            return (uint64_t) (((uint64_t)-1)*(((((((((uint64_t)digits[3]) << PyLong_SHIFT) | (uint64_t)digits[2]) << PyLong_SHIFT) | (uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(uint64_t) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(uint64_t, 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(uint64_t) - 1 > 4 * PyLong_SHIFT)) {
                            return (uint64_t) ((((((((((uint64_t)digits[3]) << PyLong_SHIFT) | (uint64_t)digits[2]) << PyLong_SHIFT) | (uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0])));
                        }
                    }
                    break;
            }
        }
#endif
        if ((sizeof(uint64_t) <= sizeof(long))) {
            __PYX_VERIFY_RETURN_INT_EXC(uint64_t, long, PyLong_AsLong(x))
        } else if ((sizeof(uint64_t) <= sizeof(PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(uint64_t, PY_LONG_LONG, PyLong_AsLongLong(x))
        }
    }
    {
        uint64_t val;
        int ret = -1;
#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
        Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
            x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
        if (unlikely(bytes_copied == -1)) {
        } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
            goto raise_overflow;
        } else {
            ret = 0;
        }
#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
        int one = 1; int is_little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&val;
        ret = _PyLong_AsByteArray((PyLongObject *)x,
                                    bytes, sizeof(val),
                                    is_little, !is_unsigned);
#else
        PyObject *v;
        PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
        int bits, remaining_bits, is_negative = 0;
        int chunk_size = (sizeof(long) < 8) ? 30 : 62;
        if (likely(PyLong_CheckExact(x))) {
            v = __Pyx_NewRef(x);
        } else {
            v = PyNumber_Long(x);
            if (unlikely(!v)) return (uint64_t) -1;
            assert(PyLong_CheckExact(v));
        }
        {
            int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
            if (unlikely(result < 0)) {
                Py_DECREF(v);
                return (uint64_t) -1;
            }
            is_negative = result == 1;
        }
        if (is_unsigned && unlikely(is_negative)) {
            Py_DECREF(v);
            goto raise_neg_overflow;
        } else if (is_negative) {
            stepval = PyNumber_Invert(v);
            Py_DECREF(v);
            if (unlikely(!stepval))
                return (uint64_t) -1;
        } else {
            stepval = v;
        }
        v = NULL;
        val = (uint64_t) 0;
        mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
        shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
        for (bits = 0; bits < (int) sizeof(uint64_t) * 8 - chunk_size; bits += chunk_size) {
            PyObject *tmp, *digit;
            long idigit;
            digit = PyNumber_And(stepval, mask);
            if (unlikely(!digit)) goto done;
            idigit = PyLong_AsLong(digit);
            Py_DECREF(digit);
            if (unlikely(idigit < 0)) goto done;
            val |= ((uint64_t) idigit) << bits;
            tmp = PyNumber_Rshift(stepval, shift);
            if (unlikely(!tmp)) goto done;
            Py_DECREF(stepval); stepval = tmp;
        }
        Py_DECREF(shift); shift = NULL;
        Py_DECREF(mask); mask = NULL;
        {
            long idigit = PyLong_AsLong(stepval);
            if (unlikely(idigit < 0)) goto done;
            remaining_bits = ((int) sizeof(uint64_t) * 8) - bits - (is_unsigned ? 0 : 1);
            if (unlikely(idigit >= (1L << remaining_bits)))
                goto raise_overflow;
            val |= ((uint64_t) idigit) << bits;
        }
        if (!is_unsigned) {
            if (unlikely(val & (((uint64_t) 1) << (sizeof(uint64_t) * 8 - 1))))
                goto raise_overflow;
            if (is_negative)
                val = ~val;
        }
        ret = 0;
    done:
        Py_XDECREF(shift);
        Py_XDECREF(mask);
        Py_XDECREF(stepval);
#endif
        if (unlikely(ret))
            return (uint64_t) -1;
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to uint64_t");
    return (uint64_t) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to uint64_t");
    return (uint64_t) -1;
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_char(char value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const char neg_one = (char) -1, const_zero = (char) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(char) < sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(char) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } else if (sizeof(char) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(char) <= sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(char) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(char),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(char));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntFromPy */
static CYTHON_INLINE size_t __Pyx_PyLong_As_size_t(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const size_t neg_one = (size_t) -1, const_zero = (size_t) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (unlikely(!PyLong_Check(x))) {
        size_t val;
        PyObject *tmp = __Pyx_PyNumber_Long(x);
        if (!tmp) return (size_t) -1;
        val = __Pyx_PyLong_As_size_t(tmp);
        Py_DECREF(tmp);
        return val;
    }
    if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
        if (unlikely(__Pyx_PyLong_IsNeg(x))) {
            goto raise_neg_overflow;
        } else if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(size_t, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_DigitCount(x)) {
                case 2:
                    if ((8 * sizeof(size_t) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(size_t) >= 2 * PyLong_SHIFT)) {
                            return (size_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(size_t) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(size_t) >= 3 * PyLong_SHIFT)) {
                            return (size_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(size_t) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(size_t, 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(size_t) >= 4 * PyLong_SHIFT)) {
                            return (size_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
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
        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 (size_t) -1;
            if (unlikely(result == 1))
                goto raise_neg_overflow;
        }
#endif
        if ((sizeof(size_t) <= sizeof(unsigned long))) {
            __PYX_VERIFY_RETURN_INT_EXC(size_t, unsigned long, PyLong_AsUnsignedLong(x))
        } else if ((sizeof(size_t) <= sizeof(unsigned PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(size_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
        }
    } else {
#if CYTHON_USE_PYLONG_INTERNALS
        if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(size_t, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_SignedDigitCount(x)) {
                case -2:
                    if ((8 * sizeof(size_t) - 1 > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT)) {
                            return (size_t) (((size_t)-1)*(((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if ((8 * sizeof(size_t) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT)) {
                            return (size_t) ((((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if ((8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT)) {
                            return (size_t) (((size_t)-1)*(((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(size_t) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT)) {
                            return (size_t) ((((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if ((8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(size_t, 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(size_t) - 1 > 4 * PyLong_SHIFT)) {
                            return (size_t) (((size_t)-1)*(((((((((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(size_t) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(size_t, 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(size_t) - 1 > 4 * PyLong_SHIFT)) {
                            return (size_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
        if ((sizeof(size_t) <= sizeof(long))) {
            __PYX_VERIFY_RETURN_INT_EXC(size_t, long, PyLong_AsLong(x))
        } else if ((sizeof(size_t) <= sizeof(PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(size_t, PY_LONG_LONG, PyLong_AsLongLong(x))
        }
    }
    {
        size_t val;
        int ret = -1;
#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
        Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
            x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
        if (unlikely(bytes_copied == -1)) {
        } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
            goto raise_overflow;
        } else {
            ret = 0;
        }
#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
        int one = 1; int is_little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&val;
        ret = _PyLong_AsByteArray((PyLongObject *)x,
                                    bytes, sizeof(val),
                                    is_little, !is_unsigned);
#else
        PyObject *v;
        PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
        int bits, remaining_bits, is_negative = 0;
        int chunk_size = (sizeof(long) < 8) ? 30 : 62;
        if (likely(PyLong_CheckExact(x))) {
            v = __Pyx_NewRef(x);
        } else {
            v = PyNumber_Long(x);
            if (unlikely(!v)) return (size_t) -1;
            assert(PyLong_CheckExact(v));
        }
        {
            int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
            if (unlikely(result < 0)) {
                Py_DECREF(v);
                return (size_t) -1;
            }
            is_negative = result == 1;
        }
        if (is_unsigned && unlikely(is_negative)) {
            Py_DECREF(v);
            goto raise_neg_overflow;
        } else if (is_negative) {
            stepval = PyNumber_Invert(v);
            Py_DECREF(v);
            if (unlikely(!stepval))
                return (size_t) -1;
        } else {
            stepval = v;
        }
        v = NULL;
        val = (size_t) 0;
        mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
        shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
        for (bits = 0; bits < (int) sizeof(size_t) * 8 - chunk_size; bits += chunk_size) {
            PyObject *tmp, *digit;
            long idigit;
            digit = PyNumber_And(stepval, mask);
            if (unlikely(!digit)) goto done;
            idigit = PyLong_AsLong(digit);
            Py_DECREF(digit);
            if (unlikely(idigit < 0)) goto done;
            val |= ((size_t) idigit) << bits;
            tmp = PyNumber_Rshift(stepval, shift);
            if (unlikely(!tmp)) goto done;
            Py_DECREF(stepval); stepval = tmp;
        }
        Py_DECREF(shift); shift = NULL;
        Py_DECREF(mask); mask = NULL;
        {
            long idigit = PyLong_AsLong(stepval);
            if (unlikely(idigit < 0)) goto done;
            remaining_bits = ((int) sizeof(size_t) * 8) - bits - (is_unsigned ? 0 : 1);
            if (unlikely(idigit >= (1L << remaining_bits)))
                goto raise_overflow;
            val |= ((size_t) idigit) << bits;
        }
        if (!is_unsigned) {
            if (unlikely(val & (((size_t) 1) << (sizeof(size_t) * 8 - 1))))
                goto raise_overflow;
            if (is_negative)
                val = ~val;
        }
        ret = 0;
    done:
        Py_XDECREF(shift);
        Py_XDECREF(mask);
        Py_XDECREF(stepval);
#endif
        if (unlikely(ret))
            return (size_t) -1;
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to size_t");
    return (size_t) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to size_t");
    return (size_t) -1;
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_int32_t(int32_t value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const int32_t neg_one = (int32_t) -1, const_zero = (int32_t) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(int32_t) < sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(int32_t) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } else if (sizeof(int32_t) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(int32_t) <= sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(int32_t) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(int32_t),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(int32_t));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_int8_t(int8_t value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const int8_t neg_one = (int8_t) -1, const_zero = (int8_t) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(int8_t) < sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(int8_t) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } else if (sizeof(int8_t) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(int8_t) <= sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(int8_t) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(int8_t),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(int8_t));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_enum____arrow_3a__3a_TimeUnit_3a__3a_type(enum  arrow::TimeUnit::type value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum  arrow::TimeUnit::type neg_one = (enum  arrow::TimeUnit::type) -1, const_zero = (enum  arrow::TimeUnit::type) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum  arrow::TimeUnit::type) < sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(enum  arrow::TimeUnit::type) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } else if (sizeof(enum  arrow::TimeUnit::type) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum  arrow::TimeUnit::type) <= sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(enum  arrow::TimeUnit::type) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(enum  arrow::TimeUnit::type),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(enum  arrow::TimeUnit::type));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntFromPy */
static CYTHON_INLINE int8_t __Pyx_PyLong_As_int8_t(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const int8_t neg_one = (int8_t) -1, const_zero = (int8_t) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (unlikely(!PyLong_Check(x))) {
        int8_t val;
        PyObject *tmp = __Pyx_PyNumber_Long(x);
        if (!tmp) return (int8_t) -1;
        val = __Pyx_PyLong_As_int8_t(tmp);
        Py_DECREF(tmp);
        return val;
    }
    if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
        if (unlikely(__Pyx_PyLong_IsNeg(x))) {
            goto raise_neg_overflow;
        } else if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(int8_t, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_DigitCount(x)) {
                case 2:
                    if ((8 * sizeof(int8_t) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int8_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int8_t) >= 2 * PyLong_SHIFT)) {
                            return (int8_t) (((((int8_t)digits[1]) << PyLong_SHIFT) | (int8_t)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(int8_t) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int8_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int8_t) >= 3 * PyLong_SHIFT)) {
                            return (int8_t) (((((((int8_t)digits[2]) << PyLong_SHIFT) | (int8_t)digits[1]) << PyLong_SHIFT) | (int8_t)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(int8_t) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int8_t, 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(int8_t) >= 4 * PyLong_SHIFT)) {
                            return (int8_t) (((((((((int8_t)digits[3]) << PyLong_SHIFT) | (int8_t)digits[2]) << PyLong_SHIFT) | (int8_t)digits[1]) << PyLong_SHIFT) | (int8_t)digits[0]));
                        }
                    }
                    break;
            }
        }
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
        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 (int8_t) -1;
            if (unlikely(result == 1))
                goto raise_neg_overflow;
        }
#endif
        if ((sizeof(int8_t) <= sizeof(unsigned long))) {
            __PYX_VERIFY_RETURN_INT_EXC(int8_t, unsigned long, PyLong_AsUnsignedLong(x))
        } else if ((sizeof(int8_t) <= sizeof(unsigned PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(int8_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
        }
    } else {
#if CYTHON_USE_PYLONG_INTERNALS
        if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(int8_t, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_SignedDigitCount(x)) {
                case -2:
                    if ((8 * sizeof(int8_t) - 1 > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int8_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int8_t) - 1 > 2 * PyLong_SHIFT)) {
                            return (int8_t) (((int8_t)-1)*(((((int8_t)digits[1]) << PyLong_SHIFT) | (int8_t)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if ((8 * sizeof(int8_t) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int8_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int8_t) - 1 > 2 * PyLong_SHIFT)) {
                            return (int8_t) ((((((int8_t)digits[1]) << PyLong_SHIFT) | (int8_t)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if ((8 * sizeof(int8_t) - 1 > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int8_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int8_t) - 1 > 3 * PyLong_SHIFT)) {
                            return (int8_t) (((int8_t)-1)*(((((((int8_t)digits[2]) << PyLong_SHIFT) | (int8_t)digits[1]) << PyLong_SHIFT) | (int8_t)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(int8_t) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int8_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int8_t) - 1 > 3 * PyLong_SHIFT)) {
                            return (int8_t) ((((((((int8_t)digits[2]) << PyLong_SHIFT) | (int8_t)digits[1]) << PyLong_SHIFT) | (int8_t)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if ((8 * sizeof(int8_t) - 1 > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int8_t, 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(int8_t) - 1 > 4 * PyLong_SHIFT)) {
                            return (int8_t) (((int8_t)-1)*(((((((((int8_t)digits[3]) << PyLong_SHIFT) | (int8_t)digits[2]) << PyLong_SHIFT) | (int8_t)digits[1]) << PyLong_SHIFT) | (int8_t)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(int8_t) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int8_t, 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(int8_t) - 1 > 4 * PyLong_SHIFT)) {
                            return (int8_t) ((((((((((int8_t)digits[3]) << PyLong_SHIFT) | (int8_t)digits[2]) << PyLong_SHIFT) | (int8_t)digits[1]) << PyLong_SHIFT) | (int8_t)digits[0])));
                        }
                    }
                    break;
            }
        }
#endif
        if ((sizeof(int8_t) <= sizeof(long))) {
            __PYX_VERIFY_RETURN_INT_EXC(int8_t, long, PyLong_AsLong(x))
        } else if ((sizeof(int8_t) <= sizeof(PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(int8_t, PY_LONG_LONG, PyLong_AsLongLong(x))
        }
    }
    {
        int8_t val;
        int ret = -1;
#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
        Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
            x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
        if (unlikely(bytes_copied == -1)) {
        } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
            goto raise_overflow;
        } else {
            ret = 0;
        }
#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
        int one = 1; int is_little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&val;
        ret = _PyLong_AsByteArray((PyLongObject *)x,
                                    bytes, sizeof(val),
                                    is_little, !is_unsigned);
#else
        PyObject *v;
        PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
        int bits, remaining_bits, is_negative = 0;
        int chunk_size = (sizeof(long) < 8) ? 30 : 62;
        if (likely(PyLong_CheckExact(x))) {
            v = __Pyx_NewRef(x);
        } else {
            v = PyNumber_Long(x);
            if (unlikely(!v)) return (int8_t) -1;
            assert(PyLong_CheckExact(v));
        }
        {
            int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
            if (unlikely(result < 0)) {
                Py_DECREF(v);
                return (int8_t) -1;
            }
            is_negative = result == 1;
        }
        if (is_unsigned && unlikely(is_negative)) {
            Py_DECREF(v);
            goto raise_neg_overflow;
        } else if (is_negative) {
            stepval = PyNumber_Invert(v);
            Py_DECREF(v);
            if (unlikely(!stepval))
                return (int8_t) -1;
        } else {
            stepval = v;
        }
        v = NULL;
        val = (int8_t) 0;
        mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
        shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
        for (bits = 0; bits < (int) sizeof(int8_t) * 8 - chunk_size; bits += chunk_size) {
            PyObject *tmp, *digit;
            long idigit;
            digit = PyNumber_And(stepval, mask);
            if (unlikely(!digit)) goto done;
            idigit = PyLong_AsLong(digit);
            Py_DECREF(digit);
            if (unlikely(idigit < 0)) goto done;
            val |= ((int8_t) idigit) << bits;
            tmp = PyNumber_Rshift(stepval, shift);
            if (unlikely(!tmp)) goto done;
            Py_DECREF(stepval); stepval = tmp;
        }
        Py_DECREF(shift); shift = NULL;
        Py_DECREF(mask); mask = NULL;
        {
            long idigit = PyLong_AsLong(stepval);
            if (unlikely(idigit < 0)) goto done;
            remaining_bits = ((int) sizeof(int8_t) * 8) - bits - (is_unsigned ? 0 : 1);
            if (unlikely(idigit >= (1L << remaining_bits)))
                goto raise_overflow;
            val |= ((int8_t) idigit) << bits;
        }
        if (!is_unsigned) {
            if (unlikely(val & (((int8_t) 1) << (sizeof(int8_t) * 8 - 1))))
                goto raise_overflow;
            if (is_negative)
                val = ~val;
        }
        ret = 0;
    done:
        Py_XDECREF(shift);
        Py_XDECREF(mask);
        Py_XDECREF(stepval);
#endif
        if (unlikely(ret))
            return (int8_t) -1;
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to int8_t");
    return (int8_t) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to int8_t");
    return (int8_t) -1;
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_uint8_t(uint8_t value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const uint8_t neg_one = (uint8_t) -1, const_zero = (uint8_t) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(uint8_t) < sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(uint8_t) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } else if (sizeof(uint8_t) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(uint8_t) <= sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(uint8_t) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(uint8_t),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(uint8_t));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_uint16_t(uint16_t value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const uint16_t neg_one = (uint16_t) -1, const_zero = (uint16_t) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(uint16_t) < sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(uint16_t) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } else if (sizeof(uint16_t) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(uint16_t) <= sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(uint16_t) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(uint16_t),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(uint16_t));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_int16_t(int16_t value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const int16_t neg_one = (int16_t) -1, const_zero = (int16_t) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(int16_t) < sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(int16_t) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } else if (sizeof(int16_t) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(int16_t) <= sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(int16_t) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(int16_t),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(int16_t));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_uint32_t(uint32_t value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const uint32_t neg_one = (uint32_t) -1, const_zero = (uint32_t) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(uint32_t) < sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(uint32_t) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } else if (sizeof(uint32_t) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(uint32_t) <= sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(uint32_t) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(uint32_t),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(uint32_t));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_uint64_t(uint64_t value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const uint64_t neg_one = (uint64_t) -1, const_zero = (uint64_t) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(uint64_t) < sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(uint64_t) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } else if (sizeof(uint64_t) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(uint64_t) <= sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(uint64_t) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(uint64_t),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(uint64_t));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_DLDeviceType(DLDeviceType value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const DLDeviceType neg_one = (DLDeviceType) -1, const_zero = (DLDeviceType) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(DLDeviceType) < sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(DLDeviceType) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } else if (sizeof(DLDeviceType) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(DLDeviceType) <= sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(DLDeviceType) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(DLDeviceType),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(DLDeviceType));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntFromPy */
static CYTHON_INLINE int32_t __Pyx_PyLong_As_int32_t(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const int32_t neg_one = (int32_t) -1, const_zero = (int32_t) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (unlikely(!PyLong_Check(x))) {
        int32_t val;
        PyObject *tmp = __Pyx_PyNumber_Long(x);
        if (!tmp) return (int32_t) -1;
        val = __Pyx_PyLong_As_int32_t(tmp);
        Py_DECREF(tmp);
        return val;
    }
    if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
        if (unlikely(__Pyx_PyLong_IsNeg(x))) {
            goto raise_neg_overflow;
        } else if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(int32_t, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_DigitCount(x)) {
                case 2:
                    if ((8 * sizeof(int32_t) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int32_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int32_t) >= 2 * PyLong_SHIFT)) {
                            return (int32_t) (((((int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(int32_t) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int32_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int32_t) >= 3 * PyLong_SHIFT)) {
                            return (int32_t) (((((((int32_t)digits[2]) << PyLong_SHIFT) | (int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(int32_t) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int32_t, 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(int32_t) >= 4 * PyLong_SHIFT)) {
                            return (int32_t) (((((((((int32_t)digits[3]) << PyLong_SHIFT) | (int32_t)digits[2]) << PyLong_SHIFT) | (int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0]));
                        }
                    }
                    break;
            }
        }
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
        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 (int32_t) -1;
            if (unlikely(result == 1))
                goto raise_neg_overflow;
        }
#endif
        if ((sizeof(int32_t) <= sizeof(unsigned long))) {
            __PYX_VERIFY_RETURN_INT_EXC(int32_t, unsigned long, PyLong_AsUnsignedLong(x))
        } else if ((sizeof(int32_t) <= sizeof(unsigned PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(int32_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
        }
    } else {
#if CYTHON_USE_PYLONG_INTERNALS
        if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(int32_t, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_SignedDigitCount(x)) {
                case -2:
                    if ((8 * sizeof(int32_t) - 1 > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int32_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int32_t) - 1 > 2 * PyLong_SHIFT)) {
                            return (int32_t) (((int32_t)-1)*(((((int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if ((8 * sizeof(int32_t) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int32_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int32_t) - 1 > 2 * PyLong_SHIFT)) {
                            return (int32_t) ((((((int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if ((8 * sizeof(int32_t) - 1 > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int32_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int32_t) - 1 > 3 * PyLong_SHIFT)) {
                            return (int32_t) (((int32_t)-1)*(((((((int32_t)digits[2]) << PyLong_SHIFT) | (int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(int32_t) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int32_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int32_t) - 1 > 3 * PyLong_SHIFT)) {
                            return (int32_t) ((((((((int32_t)digits[2]) << PyLong_SHIFT) | (int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if ((8 * sizeof(int32_t) - 1 > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int32_t, 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(int32_t) - 1 > 4 * PyLong_SHIFT)) {
                            return (int32_t) (((int32_t)-1)*(((((((((int32_t)digits[3]) << PyLong_SHIFT) | (int32_t)digits[2]) << PyLong_SHIFT) | (int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(int32_t) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int32_t, 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(int32_t) - 1 > 4 * PyLong_SHIFT)) {
                            return (int32_t) ((((((((((int32_t)digits[3]) << PyLong_SHIFT) | (int32_t)digits[2]) << PyLong_SHIFT) | (int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0])));
                        }
                    }
                    break;
            }
        }
#endif
        if ((sizeof(int32_t) <= sizeof(long))) {
            __PYX_VERIFY_RETURN_INT_EXC(int32_t, long, PyLong_AsLong(x))
        } else if ((sizeof(int32_t) <= sizeof(PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(int32_t, PY_LONG_LONG, PyLong_AsLongLong(x))
        }
    }
    {
        int32_t val;
        int ret = -1;
#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
        Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
            x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
        if (unlikely(bytes_copied == -1)) {
        } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
            goto raise_overflow;
        } else {
            ret = 0;
        }
#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
        int one = 1; int is_little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&val;
        ret = _PyLong_AsByteArray((PyLongObject *)x,
                                    bytes, sizeof(val),
                                    is_little, !is_unsigned);
#else
        PyObject *v;
        PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
        int bits, remaining_bits, is_negative = 0;
        int chunk_size = (sizeof(long) < 8) ? 30 : 62;
        if (likely(PyLong_CheckExact(x))) {
            v = __Pyx_NewRef(x);
        } else {
            v = PyNumber_Long(x);
            if (unlikely(!v)) return (int32_t) -1;
            assert(PyLong_CheckExact(v));
        }
        {
            int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
            if (unlikely(result < 0)) {
                Py_DECREF(v);
                return (int32_t) -1;
            }
            is_negative = result == 1;
        }
        if (is_unsigned && unlikely(is_negative)) {
            Py_DECREF(v);
            goto raise_neg_overflow;
        } else if (is_negative) {
            stepval = PyNumber_Invert(v);
            Py_DECREF(v);
            if (unlikely(!stepval))
                return (int32_t) -1;
        } else {
            stepval = v;
        }
        v = NULL;
        val = (int32_t) 0;
        mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
        shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
        for (bits = 0; bits < (int) sizeof(int32_t) * 8 - chunk_size; bits += chunk_size) {
            PyObject *tmp, *digit;
            long idigit;
            digit = PyNumber_And(stepval, mask);
            if (unlikely(!digit)) goto done;
            idigit = PyLong_AsLong(digit);
            Py_DECREF(digit);
            if (unlikely(idigit < 0)) goto done;
            val |= ((int32_t) idigit) << bits;
            tmp = PyNumber_Rshift(stepval, shift);
            if (unlikely(!tmp)) goto done;
            Py_DECREF(stepval); stepval = tmp;
        }
        Py_DECREF(shift); shift = NULL;
        Py_DECREF(mask); mask = NULL;
        {
            long idigit = PyLong_AsLong(stepval);
            if (unlikely(idigit < 0)) goto done;
            remaining_bits = ((int) sizeof(int32_t) * 8) - bits - (is_unsigned ? 0 : 1);
            if (unlikely(idigit >= (1L << remaining_bits)))
                goto raise_overflow;
            val |= ((int32_t) idigit) << bits;
        }
        if (!is_unsigned) {
            if (unlikely(val & (((int32_t) 1) << (sizeof(int32_t) * 8 - 1))))
                goto raise_overflow;
            if (is_negative)
                val = ~val;
        }
        ret = 0;
    done:
        Py_XDECREF(shift);
        Py_XDECREF(mask);
        Py_XDECREF(stepval);
#endif
        if (unlikely(ret))
            return (int32_t) -1;
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to int32_t");
    return (int32_t) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to int32_t");
    return (int32_t) -1;
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const long neg_one = (long) -1, const_zero = (long) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(long) < sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(long) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } 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 PyLong_FromLong((long) value);
        } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(long),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(long));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From___arrow_3a__3a_ipc_3a__3a_Alignment( arrow::ipc::Alignment value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const  arrow::ipc::Alignment neg_one = ( arrow::ipc::Alignment) -1, const_zero = ( arrow::ipc::Alignment) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof( arrow::ipc::Alignment) < sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof( arrow::ipc::Alignment) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } else if (sizeof( arrow::ipc::Alignment) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof( arrow::ipc::Alignment) <= sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof( arrow::ipc::Alignment) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof( arrow::ipc::Alignment),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof( arrow::ipc::Alignment));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntFromPy */
static CYTHON_INLINE enum __pyx_t_7pyarrow_3lib_MetadataVersion __Pyx_PyLong_As_enum____pyx_t_7pyarrow_3lib_MetadataVersion(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum __pyx_t_7pyarrow_3lib_MetadataVersion neg_one = (enum __pyx_t_7pyarrow_3lib_MetadataVersion) -1, const_zero = (enum __pyx_t_7pyarrow_3lib_MetadataVersion) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (unlikely(!PyLong_Check(x))) {
        enum __pyx_t_7pyarrow_3lib_MetadataVersion val;
        PyObject *tmp = __Pyx_PyNumber_Long(x);
        if (!tmp) return (enum __pyx_t_7pyarrow_3lib_MetadataVersion) -1;
        val = __Pyx_PyLong_As_enum____pyx_t_7pyarrow_3lib_MetadataVersion(tmp);
        Py_DECREF(tmp);
        return val;
    }
    if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
        if (unlikely(__Pyx_PyLong_IsNeg(x))) {
            goto raise_neg_overflow;
        } else if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(enum __pyx_t_7pyarrow_3lib_MetadataVersion, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_DigitCount(x)) {
                case 2:
                    if ((8 * sizeof(enum __pyx_t_7pyarrow_3lib_MetadataVersion) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(enum __pyx_t_7pyarrow_3lib_MetadataVersion, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(enum __pyx_t_7pyarrow_3lib_MetadataVersion) >= 2 * PyLong_SHIFT)) {
                            return (enum __pyx_t_7pyarrow_3lib_MetadataVersion) (((((enum __pyx_t_7pyarrow_3lib_MetadataVersion)digits[1]) << PyLong_SHIFT) | (enum __pyx_t_7pyarrow_3lib_MetadataVersion)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(enum __pyx_t_7pyarrow_3lib_MetadataVersion) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(enum __pyx_t_7pyarrow_3lib_MetadataVersion, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(enum __pyx_t_7pyarrow_3lib_MetadataVersion) >= 3 * PyLong_SHIFT)) {
                            return (enum __pyx_t_7pyarrow_3lib_MetadataVersion) (((((((enum __pyx_t_7pyarrow_3lib_MetadataVersion)digits[2]) << PyLong_SHIFT) | (enum __pyx_t_7pyarrow_3lib_MetadataVersion)digits[1]) << PyLong_SHIFT) | (enum __pyx_t_7pyarrow_3lib_MetadataVersion)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(enum __pyx_t_7pyarrow_3lib_MetadataVersion) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(enum __pyx_t_7pyarrow_3lib_MetadataVersion, 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(enum __pyx_t_7pyarrow_3lib_MetadataVersion) >= 4 * PyLong_SHIFT)) {
                            return (enum __pyx_t_7pyarrow_3lib_MetadataVersion) (((((((((enum __pyx_t_7pyarrow_3lib_MetadataVersion)digits[3]) << PyLong_SHIFT) | (enum __pyx_t_7pyarrow_3lib_MetadataVersion)digits[2]) << PyLong_SHIFT) | (enum __pyx_t_7pyarrow_3lib_MetadataVersion)digits[1]) << PyLong_SHIFT) | (enum __pyx_t_7pyarrow_3lib_MetadataVersion)digits[0]));
                        }
                    }
                    break;
            }
        }
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
        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 (enum __pyx_t_7pyarrow_3lib_MetadataVersion) -1;
            if (unlikely(result == 1))
                goto raise_neg_overflow;
        }
#endif
        if ((sizeof(enum __pyx_t_7pyarrow_3lib_MetadataVersion) <= sizeof(unsigned long))) {
            __PYX_VERIFY_RETURN_INT_EXC(enum __pyx_t_7pyarrow_3lib_MetadataVersion, unsigned long, PyLong_AsUnsignedLong(x))
        } else if ((sizeof(enum __pyx_t_7pyarrow_3lib_MetadataVersion) <= sizeof(unsigned PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(enum __pyx_t_7pyarrow_3lib_MetadataVersion, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
        }
    } else {
#if CYTHON_USE_PYLONG_INTERNALS
        if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(enum __pyx_t_7pyarrow_3lib_MetadataVersion, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_SignedDigitCount(x)) {
                case -2:
                    if ((8 * sizeof(enum __pyx_t_7pyarrow_3lib_MetadataVersion) - 1 > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(enum __pyx_t_7pyarrow_3lib_MetadataVersion, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(enum __pyx_t_7pyarrow_3lib_MetadataVersion) - 1 > 2 * PyLong_SHIFT)) {
                            return (enum __pyx_t_7pyarrow_3lib_MetadataVersion) (((enum __pyx_t_7pyarrow_3lib_MetadataVersion)-1)*(((((enum __pyx_t_7pyarrow_3lib_MetadataVersion)digits[1]) << PyLong_SHIFT) | (enum __pyx_t_7pyarrow_3lib_MetadataVersion)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if ((8 * sizeof(enum __pyx_t_7pyarrow_3lib_MetadataVersion) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(enum __pyx_t_7pyarrow_3lib_MetadataVersion, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(enum __pyx_t_7pyarrow_3lib_MetadataVersion) - 1 > 2 * PyLong_SHIFT)) {
                            return (enum __pyx_t_7pyarrow_3lib_MetadataVersion) ((((((enum __pyx_t_7pyarrow_3lib_MetadataVersion)digits[1]) << PyLong_SHIFT) | (enum __pyx_t_7pyarrow_3lib_MetadataVersion)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if ((8 * sizeof(enum __pyx_t_7pyarrow_3lib_MetadataVersion) - 1 > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(enum __pyx_t_7pyarrow_3lib_MetadataVersion, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(enum __pyx_t_7pyarrow_3lib_MetadataVersion) - 1 > 3 * PyLong_SHIFT)) {
                            return (enum __pyx_t_7pyarrow_3lib_MetadataVersion) (((enum __pyx_t_7pyarrow_3lib_MetadataVersion)-1)*(((((((enum __pyx_t_7pyarrow_3lib_MetadataVersion)digits[2]) << PyLong_SHIFT) | (enum __pyx_t_7pyarrow_3lib_MetadataVersion)digits[1]) << PyLong_SHIFT) | (enum __pyx_t_7pyarrow_3lib_MetadataVersion)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(enum __pyx_t_7pyarrow_3lib_MetadataVersion) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(enum __pyx_t_7pyarrow_3lib_MetadataVersion, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(enum __pyx_t_7pyarrow_3lib_MetadataVersion) - 1 > 3 * PyLong_SHIFT)) {
                            return (enum __pyx_t_7pyarrow_3lib_MetadataVersion) ((((((((enum __pyx_t_7pyarrow_3lib_MetadataVersion)digits[2]) << PyLong_SHIFT) | (enum __pyx_t_7pyarrow_3lib_MetadataVersion)digits[1]) << PyLong_SHIFT) | (enum __pyx_t_7pyarrow_3lib_MetadataVersion)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if ((8 * sizeof(enum __pyx_t_7pyarrow_3lib_MetadataVersion) - 1 > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(enum __pyx_t_7pyarrow_3lib_MetadataVersion, 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(enum __pyx_t_7pyarrow_3lib_MetadataVersion) - 1 > 4 * PyLong_SHIFT)) {
                            return (enum __pyx_t_7pyarrow_3lib_MetadataVersion) (((enum __pyx_t_7pyarrow_3lib_MetadataVersion)-1)*(((((((((enum __pyx_t_7pyarrow_3lib_MetadataVersion)digits[3]) << PyLong_SHIFT) | (enum __pyx_t_7pyarrow_3lib_MetadataVersion)digits[2]) << PyLong_SHIFT) | (enum __pyx_t_7pyarrow_3lib_MetadataVersion)digits[1]) << PyLong_SHIFT) | (enum __pyx_t_7pyarrow_3lib_MetadataVersion)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(enum __pyx_t_7pyarrow_3lib_MetadataVersion) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(enum __pyx_t_7pyarrow_3lib_MetadataVersion, 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(enum __pyx_t_7pyarrow_3lib_MetadataVersion) - 1 > 4 * PyLong_SHIFT)) {
                            return (enum __pyx_t_7pyarrow_3lib_MetadataVersion) ((((((((((enum __pyx_t_7pyarrow_3lib_MetadataVersion)digits[3]) << PyLong_SHIFT) | (enum __pyx_t_7pyarrow_3lib_MetadataVersion)digits[2]) << PyLong_SHIFT) | (enum __pyx_t_7pyarrow_3lib_MetadataVersion)digits[1]) << PyLong_SHIFT) | (enum __pyx_t_7pyarrow_3lib_MetadataVersion)digits[0])));
                        }
                    }
                    break;
            }
        }
#endif
        if ((sizeof(enum __pyx_t_7pyarrow_3lib_MetadataVersion) <= sizeof(long))) {
            __PYX_VERIFY_RETURN_INT_EXC(enum __pyx_t_7pyarrow_3lib_MetadataVersion, long, PyLong_AsLong(x))
        } else if ((sizeof(enum __pyx_t_7pyarrow_3lib_MetadataVersion) <= sizeof(PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(enum __pyx_t_7pyarrow_3lib_MetadataVersion, PY_LONG_LONG, PyLong_AsLongLong(x))
        }
    }
    {
        enum __pyx_t_7pyarrow_3lib_MetadataVersion val;
        int ret = -1;
#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
        Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
            x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
        if (unlikely(bytes_copied == -1)) {
        } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
            goto raise_overflow;
        } else {
            ret = 0;
        }
#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
        int one = 1; int is_little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&val;
        ret = _PyLong_AsByteArray((PyLongObject *)x,
                                    bytes, sizeof(val),
                                    is_little, !is_unsigned);
#else
        PyErr_SetString(PyExc_RuntimeError,
                        "_PyLong_AsByteArray() or PyLong_AsNativeBytes() not available, cannot convert large enums");
        val = (enum __pyx_t_7pyarrow_3lib_MetadataVersion) -1;
#endif
        if (unlikely(ret))
            return (enum __pyx_t_7pyarrow_3lib_MetadataVersion) -1;
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to enum __pyx_t_7pyarrow_3lib_MetadataVersion");
    return (enum __pyx_t_7pyarrow_3lib_MetadataVersion) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to enum __pyx_t_7pyarrow_3lib_MetadataVersion");
    return (enum __pyx_t_7pyarrow_3lib_MetadataVersion) -1;
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From___arrow_3a__3a_ipc_3a__3a_MetadataVersion( arrow::ipc::MetadataVersion value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const  arrow::ipc::MetadataVersion neg_one = ( arrow::ipc::MetadataVersion) -1, const_zero = ( arrow::ipc::MetadataVersion) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof( arrow::ipc::MetadataVersion) < sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof( arrow::ipc::MetadataVersion) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } else if (sizeof( arrow::ipc::MetadataVersion) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof( arrow::ipc::MetadataVersion) <= sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof( arrow::ipc::MetadataVersion) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof( arrow::ipc::MetadataVersion),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof( arrow::ipc::MetadataVersion));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_Alignment(enum __pyx_t_7pyarrow_3lib_Alignment value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum __pyx_t_7pyarrow_3lib_Alignment neg_one = (enum __pyx_t_7pyarrow_3lib_Alignment) -1, const_zero = (enum __pyx_t_7pyarrow_3lib_Alignment) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum __pyx_t_7pyarrow_3lib_Alignment) < sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(enum __pyx_t_7pyarrow_3lib_Alignment) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } else if (sizeof(enum __pyx_t_7pyarrow_3lib_Alignment) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum __pyx_t_7pyarrow_3lib_Alignment) <= sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(enum __pyx_t_7pyarrow_3lib_Alignment) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(enum __pyx_t_7pyarrow_3lib_Alignment),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(enum __pyx_t_7pyarrow_3lib_Alignment));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_DeviceAllocationType(enum __pyx_t_7pyarrow_3lib_DeviceAllocationType value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum __pyx_t_7pyarrow_3lib_DeviceAllocationType neg_one = (enum __pyx_t_7pyarrow_3lib_DeviceAllocationType) -1, const_zero = (enum __pyx_t_7pyarrow_3lib_DeviceAllocationType) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum __pyx_t_7pyarrow_3lib_DeviceAllocationType) < sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(enum __pyx_t_7pyarrow_3lib_DeviceAllocationType) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } else if (sizeof(enum __pyx_t_7pyarrow_3lib_DeviceAllocationType) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum __pyx_t_7pyarrow_3lib_DeviceAllocationType) <= sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(enum __pyx_t_7pyarrow_3lib_DeviceAllocationType) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(enum __pyx_t_7pyarrow_3lib_DeviceAllocationType),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(enum __pyx_t_7pyarrow_3lib_DeviceAllocationType));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_enum____pyx_t_7pyarrow_3lib_MetadataVersion(enum __pyx_t_7pyarrow_3lib_MetadataVersion value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum __pyx_t_7pyarrow_3lib_MetadataVersion neg_one = (enum __pyx_t_7pyarrow_3lib_MetadataVersion) -1, const_zero = (enum __pyx_t_7pyarrow_3lib_MetadataVersion) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum __pyx_t_7pyarrow_3lib_MetadataVersion) < sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(enum __pyx_t_7pyarrow_3lib_MetadataVersion) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } else if (sizeof(enum __pyx_t_7pyarrow_3lib_MetadataVersion) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum __pyx_t_7pyarrow_3lib_MetadataVersion) <= sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(enum __pyx_t_7pyarrow_3lib_MetadataVersion) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(enum __pyx_t_7pyarrow_3lib_MetadataVersion),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(enum __pyx_t_7pyarrow_3lib_MetadataVersion));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* UpdateUnpickledDict */
static int __Pyx__UpdateUnpickledDict(PyObject *obj, PyObject *state, Py_ssize_t index) {
    PyObject *state_dict = __Pyx_PySequence_ITEM(state, index);
    if (unlikely(!state_dict)) {
        return -1;
    }
    int non_empty = PyObject_IsTrue(state_dict);
    if (non_empty == 0) {
        Py_DECREF(state_dict);
        return 0;
    } else if (unlikely(non_empty == -1)) {
        return -1;
    }
    PyObject *dict;
    #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
    dict = PyObject_GetAttrString(obj, "__dict__");
    #else
    dict = PyObject_GenericGetDict(obj, NULL);
    #endif
    if (unlikely(!dict)) {
        Py_DECREF(state_dict);
        return -1;
    }
    int result;
    if (likely(PyDict_CheckExact(dict))) {
        result = PyDict_Update(dict, state_dict);
    } else {
        PyObject *obj_result = __Pyx_PyObject_CallMethod1(dict, __pyx_mstate_global->__pyx_n_u_update, state_dict);
        if (likely(obj_result)) {
            Py_DECREF(obj_result);
            result = 0;
        } else {
            result = -1;
        }
    }
    Py_DECREF(state_dict);
    Py_DECREF(dict);
    return result;
}
static int __Pyx_UpdateUnpickledDict(PyObject *obj, PyObject *state, Py_ssize_t index) {
    Py_ssize_t state_size = __Pyx_PyTuple_GET_SIZE(state);
    #if !CYTHON_ASSUME_SAFE_SIZE
    if (unlikely(state_size == -1)) return -1;
    #endif
    if (state_size <= index) {
        return 0;
    }
    return __Pyx__UpdateUnpickledDict(obj, state, index);
}

/* FormatTypeName */
#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000
static __Pyx_TypeName
__Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp)
{
    PyObject *module = NULL, *name = NULL, *result = NULL;
    #if __PYX_LIMITED_VERSION_HEX < 0x030b0000
    name = __Pyx_PyObject_GetAttrStr((PyObject *)tp,
                                               __pyx_mstate_global->__pyx_n_u_qualname);
    #else
    name = PyType_GetQualName(tp);
    #endif
    if (unlikely(name == NULL) || unlikely(!PyUnicode_Check(name))) goto bad;
    module = __Pyx_PyObject_GetAttrStr((PyObject *)tp,
                                               __pyx_mstate_global->__pyx_n_u_module_2);
    if (unlikely(module == NULL) || unlikely(!PyUnicode_Check(module))) goto bad;
    if (PyUnicode_CompareWithASCIIString(module, "builtins") == 0) {
        result = name;
        name = NULL;
        goto done;
    }
    result = PyUnicode_FromFormat("%U.%U", module, name);
    if (unlikely(result == NULL)) goto bad;
  done:
    Py_XDECREF(name);
    Py_XDECREF(module);
    return result;
  bad:
    PyErr_Clear();
    if (name) {
        result = name;
        name = NULL;
    } else {
        result = __Pyx_NewRef(__pyx_mstate_global->__pyx_kp_u__27);
    }
    goto done;
}
#endif

/* GetRuntimeVersion */
#if __PYX_LIMITED_VERSION_HEX < 0x030b0000
void __Pyx_init_runtime_version(void) {
    if (__Pyx_cached_runtime_version == 0) {
        const char* rt_version = Py_GetVersion();
        unsigned long version = 0;
        unsigned long factor = 0x01000000UL;
        unsigned int digit = 0;
        int i = 0;
        while (factor) {
            while ('0' <= rt_version[i] && rt_version[i] <= '9') {
                digit = digit * 10 + (unsigned int) (rt_version[i] - '0');
                ++i;
            }
            version += factor * digit;
            if (rt_version[i] != '.')
                break;
            digit = 0;
            factor >>= 8;
            ++i;
        }
        __Pyx_cached_runtime_version = version;
    }
}
#endif
static unsigned long __Pyx_get_runtime_version(void) {
#if __PYX_LIMITED_VERSION_HEX >= 0x030b0000
    return Py_Version & ~0xFFUL;
#else
    return __Pyx_cached_runtime_version;
#endif
}

/* IterNextPlain (used by CoroutineBase) */
#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
static PyObject *__Pyx_GetBuiltinNext_LimitedAPI(void) {
    if (unlikely(!__pyx_mstate_global->__Pyx_GetBuiltinNext_LimitedAPI_cache))
        __pyx_mstate_global->__Pyx_GetBuiltinNext_LimitedAPI_cache = __Pyx_GetBuiltinName(__pyx_mstate_global->__pyx_n_u_next);
    return __pyx_mstate_global->__Pyx_GetBuiltinNext_LimitedAPI_cache;
}
#endif
static CYTHON_INLINE PyObject *__Pyx_PyIter_Next_Plain(PyObject *iterator) {
#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
    PyObject *result;
    PyObject *next = __Pyx_GetBuiltinNext_LimitedAPI();
    if (unlikely(!next)) return NULL;
    result = PyObject_CallFunctionObjArgs(next, iterator, NULL);
    return result;
#else
    (void)__Pyx_GetBuiltinName; // only for early limited API
    iternextfunc iternext = __Pyx_PyObject_GetIterNextFunc(iterator);
    assert(iternext);
    return iternext(iterator);
#endif
}

/* ReturnWithStopIteration (used by CoroutineBase) */
static void __Pyx__ReturnWithStopIteration(PyObject* value, int async);
static CYTHON_INLINE void __Pyx_ReturnWithStopIteration(PyObject* value, int async, int iternext) {
    if (value == Py_None) {
        if (async || !iternext)
            PyErr_SetNone(async ? PyExc_StopAsyncIteration : PyExc_StopIteration);
        return;
    }
    __Pyx__ReturnWithStopIteration(value, async);
}
static void __Pyx__ReturnWithStopIteration(PyObject* value, int async) {
#if CYTHON_COMPILING_IN_CPYTHON
    __Pyx_PyThreadState_declare
#endif
    PyObject *exc;
    PyObject *exc_type = async ? PyExc_StopAsyncIteration : PyExc_StopIteration;
#if CYTHON_COMPILING_IN_CPYTHON
    if ((PY_VERSION_HEX >= (0x030C00A6)) || unlikely(PyTuple_Check(value) || PyExceptionInstance_Check(value))) {
        if (PY_VERSION_HEX >= (0x030e00A1)) {
            exc = __Pyx_PyObject_CallOneArg(exc_type, value);
        } else {
            PyObject *args_tuple = PyTuple_New(1);
            if (unlikely(!args_tuple)) return;
            Py_INCREF(value);
            PyTuple_SET_ITEM(args_tuple, 0, value);
            exc = PyObject_Call(exc_type, args_tuple, NULL);
            Py_DECREF(args_tuple);
        }
        if (unlikely(!exc)) return;
    } else {
        Py_INCREF(value);
        exc = value;
    }
    #if CYTHON_FAST_THREAD_STATE
    __Pyx_PyThreadState_assign
    #if CYTHON_USE_EXC_INFO_STACK
    if (!__pyx_tstate->exc_info->exc_value)
    #else
    if (!__pyx_tstate->exc_type)
    #endif
    {
        Py_INCREF(exc_type);
        __Pyx_ErrRestore(exc_type, exc, NULL);
        return;
    }
    #endif
#else
    exc = __Pyx_PyObject_CallOneArg(exc_type, value);
    if (unlikely(!exc)) return;
#endif
    PyErr_SetObject(exc_type, exc);
    Py_DECREF(exc);
}

/* CoroutineBase (used by Generator) */
#if !CYTHON_COMPILING_IN_LIMITED_API
#include <frameobject.h>
#if PY_VERSION_HEX >= 0x030b00a6 && !defined(PYPY_VERSION)
  #ifndef Py_BUILD_CORE
    #define Py_BUILD_CORE 1
  #endif
  #include "internal/pycore_frame.h"
#endif
#endif // CYTHON_COMPILING_IN_LIMITED_API
static CYTHON_INLINE void
__Pyx_Coroutine_Undelegate(__pyx_CoroutineObject *gen) {
#if CYTHON_USE_AM_SEND
    gen->yieldfrom_am_send = NULL;
#endif
    Py_CLEAR(gen->yieldfrom);
}
static int __Pyx_PyGen__FetchStopIterationValue(PyThreadState *__pyx_tstate, PyObject **pvalue) {
    PyObject *et, *ev, *tb;
    PyObject *value = NULL;
    CYTHON_UNUSED_VAR(__pyx_tstate);
    __Pyx_ErrFetch(&et, &ev, &tb);
    if (!et) {
        Py_XDECREF(tb);
        Py_XDECREF(ev);
        Py_INCREF(Py_None);
        *pvalue = Py_None;
        return 0;
    }
    if (likely(et == PyExc_StopIteration)) {
        if (!ev) {
            Py_INCREF(Py_None);
            value = Py_None;
        }
        else if (likely(__Pyx_IS_TYPE(ev, (PyTypeObject*)PyExc_StopIteration))) {
            #if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_GRAAL
            value = PyObject_GetAttr(ev, __pyx_mstate_global->__pyx_n_u_value);
            if (unlikely(!value)) goto limited_api_failure;
            #else
            value = ((PyStopIterationObject *)ev)->value;
            Py_INCREF(value);
            #endif
            Py_DECREF(ev);
        }
        else if (unlikely(PyTuple_Check(ev))) {
            Py_ssize_t tuple_size = __Pyx_PyTuple_GET_SIZE(ev);
            #if !CYTHON_ASSUME_SAFE_SIZE
            if (unlikely(tuple_size < 0)) {
                Py_XDECREF(tb);
                Py_DECREF(ev);
                Py_DECREF(et);
                return -1;
            }
            #endif
            if (tuple_size >= 1) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                value = PyTuple_GET_ITEM(ev, 0);
                Py_INCREF(value);
#elif CYTHON_ASSUME_SAFE_MACROS
                value = PySequence_ITEM(ev, 0);
#else
                value = PySequence_GetItem(ev, 0);
                if (!value) goto limited_api_failure;
#endif
            } else {
                Py_INCREF(Py_None);
                value = Py_None;
            }
            Py_DECREF(ev);
        }
        else if (!__Pyx_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration)) {
            value = ev;
        }
        if (likely(value)) {
            Py_XDECREF(tb);
            Py_DECREF(et);
            *pvalue = value;
            return 0;
        }
    } else if (!__Pyx_PyErr_GivenExceptionMatches(et, PyExc_StopIteration)) {
        __Pyx_ErrRestore(et, ev, tb);
        return -1;
    }
    PyErr_NormalizeException(&et, &ev, &tb);
    if (unlikely(!PyObject_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration))) {
        __Pyx_ErrRestore(et, ev, tb);
        return -1;
    }
    Py_XDECREF(tb);
    Py_DECREF(et);
#if CYTHON_COMPILING_IN_LIMITED_API
    value = PyObject_GetAttr(ev, __pyx_mstate_global->__pyx_n_u_value);
#else
    value = ((PyStopIterationObject *)ev)->value;
    Py_INCREF(value);
#endif
    Py_DECREF(ev);
#if CYTHON_COMPILING_IN_LIMITED_API
    if (unlikely(!value)) return -1;
#endif
    *pvalue = value;
    return 0;
#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_GRAAL || !CYTHON_ASSUME_SAFE_MACROS
  limited_api_failure:
    Py_XDECREF(et);
    Py_XDECREF(tb);
    Py_XDECREF(ev);
    return -1;
#endif
}
static CYTHON_INLINE
__Pyx_PySendResult __Pyx_Coroutine_status_from_result(PyObject **retval) {
    if (*retval) {
        return PYGEN_NEXT;
    } else if (likely(__Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, retval) == 0)) {
        return PYGEN_RETURN;
    } else {
        return PYGEN_ERROR;
    }
}
static CYTHON_INLINE
void __Pyx_Coroutine_ExceptionClear(__Pyx_ExcInfoStruct *exc_state) {
#if PY_VERSION_HEX >= 0x030B00a4
    Py_CLEAR(exc_state->exc_value);
#else
    PyObject *t, *v, *tb;
    t = exc_state->exc_type;
    v = exc_state->exc_value;
    tb = exc_state->exc_traceback;
    exc_state->exc_type = NULL;
    exc_state->exc_value = NULL;
    exc_state->exc_traceback = NULL;
    Py_XDECREF(t);
    Py_XDECREF(v);
    Py_XDECREF(tb);
#endif
}
#define __Pyx_Coroutine_AlreadyRunningError(gen)  (__Pyx__Coroutine_AlreadyRunningError(gen), (PyObject*)NULL)
static void __Pyx__Coroutine_AlreadyRunningError(__pyx_CoroutineObject *gen) {
    const char *msg;
    CYTHON_MAYBE_UNUSED_VAR(gen);
    if ((0)) {
    #ifdef __Pyx_Coroutine_USED
    } else if (__Pyx_Coroutine_Check((PyObject*)gen)) {
        msg = "coroutine already executing";
    #endif
    #ifdef __Pyx_AsyncGen_USED
    } else if (__Pyx_AsyncGen_CheckExact((PyObject*)gen)) {
        msg = "async generator already executing";
    #endif
    } else {
        msg = "generator already executing";
    }
    PyErr_SetString(PyExc_ValueError, msg);
}
static void __Pyx_Coroutine_AlreadyTerminatedError(PyObject *gen, PyObject *value, int closing) {
    CYTHON_MAYBE_UNUSED_VAR(gen);
    CYTHON_MAYBE_UNUSED_VAR(closing);
    #ifdef __Pyx_Coroutine_USED
    if (!closing && __Pyx_Coroutine_Check(gen)) {
        PyErr_SetString(PyExc_RuntimeError, "cannot reuse already awaited coroutine");
    } else
    #endif
    if (value) {
        #ifdef __Pyx_AsyncGen_USED
        if (__Pyx_AsyncGen_CheckExact(gen))
            PyErr_SetNone(PyExc_StopAsyncIteration);
        else
        #endif
        PyErr_SetNone(PyExc_StopIteration);
    }
}
static
__Pyx_PySendResult __Pyx_Coroutine_SendEx(__pyx_CoroutineObject *self, PyObject *value, PyObject **result, int closing) {
    __Pyx_PyThreadState_declare
    PyThreadState *tstate;
    __Pyx_ExcInfoStruct *exc_state;
    PyObject *retval;
    assert(__Pyx_Coroutine_get_is_running(self));  // Callers should ensure is_running
    if (unlikely(self->resume_label == -1)) {
        __Pyx_Coroutine_AlreadyTerminatedError((PyObject*)self, value, closing);
        return PYGEN_ERROR;
    }
#if CYTHON_FAST_THREAD_STATE
    __Pyx_PyThreadState_assign
    tstate = __pyx_tstate;
#else
    tstate = __Pyx_PyThreadState_Current;
#endif
    exc_state = &self->gi_exc_state;
    if (exc_state->exc_value) {
        #if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY
        #else
        PyObject *exc_tb;
        #if PY_VERSION_HEX >= 0x030B00a4 && !CYTHON_COMPILING_IN_CPYTHON
        exc_tb = PyException_GetTraceback(exc_state->exc_value);
        #elif PY_VERSION_HEX >= 0x030B00a4
        exc_tb = ((PyBaseExceptionObject*) exc_state->exc_value)->traceback;
        #else
        exc_tb = exc_state->exc_traceback;
        #endif
        if (exc_tb) {
            PyTracebackObject *tb = (PyTracebackObject *) exc_tb;
            PyFrameObject *f = tb->tb_frame;
            assert(f->f_back == NULL);
            #if PY_VERSION_HEX >= 0x030B00A1
            f->f_back = PyThreadState_GetFrame(tstate);
            #else
            Py_XINCREF(tstate->frame);
            f->f_back = tstate->frame;
            #endif
            #if PY_VERSION_HEX >= 0x030B00a4 && !CYTHON_COMPILING_IN_CPYTHON
            Py_DECREF(exc_tb);
            #endif
        }
        #endif
    }
#if CYTHON_USE_EXC_INFO_STACK
    exc_state->previous_item = tstate->exc_info;
    tstate->exc_info = exc_state;
#else
    if (exc_state->exc_type) {
        __Pyx_ExceptionSwap(&exc_state->exc_type, &exc_state->exc_value, &exc_state->exc_traceback);
    } else {
        __Pyx_Coroutine_ExceptionClear(exc_state);
        __Pyx_ExceptionSave(&exc_state->exc_type, &exc_state->exc_value, &exc_state->exc_traceback);
    }
#endif
    retval = self->body(self, tstate, value);
#if CYTHON_USE_EXC_INFO_STACK
    exc_state = &self->gi_exc_state;
    tstate->exc_info = exc_state->previous_item;
    exc_state->previous_item = NULL;
    __Pyx_Coroutine_ResetFrameBackpointer(exc_state);
#endif
    *result = retval;
    if (self->resume_label == -1) {
        return likely(retval) ? PYGEN_RETURN : PYGEN_ERROR;
    }
    return PYGEN_NEXT;
}
static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__Pyx_ExcInfoStruct *exc_state) {
#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API
    CYTHON_UNUSED_VAR(exc_state);
#else
    PyObject *exc_tb;
    #if PY_VERSION_HEX >= 0x030B00a4
    if (!exc_state->exc_value) return;
    exc_tb = PyException_GetTraceback(exc_state->exc_value);
    #else
    exc_tb = exc_state->exc_traceback;
    #endif
    if (likely(exc_tb)) {
        PyTracebackObject *tb = (PyTracebackObject *) exc_tb;
        PyFrameObject *f = tb->tb_frame;
        Py_CLEAR(f->f_back);
        #if PY_VERSION_HEX >= 0x030B00a4
        Py_DECREF(exc_tb);
        #endif
    }
#endif
}
#define __Pyx_Coroutine_MethodReturnFromResult(gen, result, retval, iternext)\
    ((result) == PYGEN_NEXT ? (retval) : __Pyx__Coroutine_MethodReturnFromResult(gen, result, retval, iternext))
static PyObject *
__Pyx__Coroutine_MethodReturnFromResult(PyObject* gen, __Pyx_PySendResult result, PyObject *retval, int iternext) {
    CYTHON_MAYBE_UNUSED_VAR(gen);
    if (likely(result == PYGEN_RETURN)) {
        int is_async = 0;
        #ifdef __Pyx_AsyncGen_USED
        is_async = __Pyx_AsyncGen_CheckExact(gen);
        #endif
        __Pyx_ReturnWithStopIteration(retval, is_async, iternext);
        Py_XDECREF(retval);
    }
    return NULL;
}
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE
PyObject *__Pyx_PyGen_Send(PyGenObject *gen, PyObject *arg) {
#if PY_VERSION_HEX <= 0x030A00A1
    return _PyGen_Send(gen, arg);
#else
    PyObject *result;
    if (PyIter_Send((PyObject*)gen, arg ? arg : Py_None, &result) == PYGEN_RETURN) {
        if (PyAsyncGen_CheckExact(gen)) {
            assert(result == Py_None);
            PyErr_SetNone(PyExc_StopAsyncIteration);
        }
        else if (result == Py_None) {
            PyErr_SetNone(PyExc_StopIteration);
        }
        else {
#if PY_VERSION_HEX < 0x030d00A1
            _PyGen_SetStopIterationValue(result);
#else
            if (!PyTuple_Check(result) && !PyExceptionInstance_Check(result)) {
                PyErr_SetObject(PyExc_StopIteration, result);
            } else {
                PyObject *exc = __Pyx_PyObject_CallOneArg(PyExc_StopIteration, result);
                if (likely(exc != NULL)) {
                    PyErr_SetObject(PyExc_StopIteration, exc);
                    Py_DECREF(exc);
                }
            }
#endif
        }
        Py_DECREF(result);
        result = NULL;
    }
    return result;
#endif
}
#endif
static CYTHON_INLINE __Pyx_PySendResult
__Pyx_Coroutine_FinishDelegation(__pyx_CoroutineObject *gen, PyObject** retval) {
    __Pyx_PySendResult result;
    PyObject *val = NULL;
    assert(__Pyx_Coroutine_get_is_running(gen));
    __Pyx_Coroutine_Undelegate(gen);
    __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, &val);
    result = __Pyx_Coroutine_SendEx(gen, val, retval, 0);
    Py_XDECREF(val);
    return result;
}
#if CYTHON_USE_AM_SEND
static __Pyx_PySendResult
__Pyx_Coroutine_SendToDelegate(__pyx_CoroutineObject *gen, __Pyx_pyiter_sendfunc gen_am_send, PyObject *value, PyObject **retval) {
    PyObject *ret = NULL;
    __Pyx_PySendResult delegate_result, result;
    assert(__Pyx_Coroutine_get_is_running(gen));
    delegate_result = gen_am_send(gen->yieldfrom, value, &ret);
    if (delegate_result == PYGEN_NEXT) {
        assert (ret != NULL);
        *retval = ret;
        return PYGEN_NEXT;
    }
    assert (delegate_result != PYGEN_ERROR || ret == NULL);
    __Pyx_Coroutine_Undelegate(gen);
    result = __Pyx_Coroutine_SendEx(gen, ret, retval, 0);
    Py_XDECREF(ret);
    return result;
}
#endif
static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value) {
    PyObject *retval = NULL;
    __Pyx_PySendResult result = __Pyx_Coroutine_AmSend(self, value, &retval);
    return __Pyx_Coroutine_MethodReturnFromResult(self, result, retval, 0);
}
static __Pyx_PySendResult
__Pyx_Coroutine_AmSend(PyObject *self, PyObject *value, PyObject **retval) {
    __Pyx_PySendResult result;
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self;
    if (unlikely(__Pyx_Coroutine_test_and_set_is_running(gen))) {
        *retval = __Pyx_Coroutine_AlreadyRunningError(gen);
        return PYGEN_ERROR;
    }
    #if CYTHON_USE_AM_SEND
    if (gen->yieldfrom_am_send) {
        result = __Pyx_Coroutine_SendToDelegate(gen, gen->yieldfrom_am_send, value, retval);
    } else
    #endif
    if (gen->yieldfrom) {
        PyObject *yf = gen->yieldfrom;
        PyObject *ret;
      #if !CYTHON_USE_AM_SEND
        #ifdef __Pyx_Generator_USED
        if (__Pyx_Generator_CheckExact(yf)) {
            ret = __Pyx_Coroutine_Send(yf, value);
        } else
        #endif
        #ifdef __Pyx_Coroutine_USED
        if (__Pyx_Coroutine_Check(yf)) {
            ret = __Pyx_Coroutine_Send(yf, value);
        } else
        #endif
        #ifdef __Pyx_AsyncGen_USED
        if (__pyx_PyAsyncGenASend_CheckExact(yf)) {
            ret = __Pyx_async_gen_asend_send(yf, value);
        } else
        #endif
        #if CYTHON_COMPILING_IN_CPYTHON
        if (PyGen_CheckExact(yf)) {
            ret = __Pyx_PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
        } else
        if (PyCoro_CheckExact(yf)) {
            ret = __Pyx_PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
        } else
        #endif
      #endif
        {
            #if !CYTHON_COMPILING_IN_LIMITED_API || __PYX_LIMITED_VERSION_HEX >= 0x03080000
            if (value == Py_None && PyIter_Check(yf))
                ret = __Pyx_PyIter_Next_Plain(yf);
            else
            #endif
                ret = __Pyx_PyObject_CallMethod1(yf, __pyx_mstate_global->__pyx_n_u_send, value);
        }
        if (likely(ret)) {
            __Pyx_Coroutine_unset_is_running(gen);
            *retval = ret;
            return PYGEN_NEXT;
        }
        result = __Pyx_Coroutine_FinishDelegation(gen, retval);
    } else {
        result = __Pyx_Coroutine_SendEx(gen, value, retval, 0);
    }
    __Pyx_Coroutine_unset_is_running(gen);
    return result;
}
static int __Pyx_Coroutine_CloseIter(__pyx_CoroutineObject *gen, PyObject *yf) {
    __Pyx_PySendResult result;
    PyObject *retval = NULL;
    CYTHON_UNUSED_VAR(gen);
    assert(__Pyx_Coroutine_get_is_running(gen));
    #ifdef __Pyx_Generator_USED
    if (__Pyx_Generator_CheckExact(yf)) {
        result = __Pyx_Coroutine_Close(yf, &retval);
    } else
    #endif
    #ifdef __Pyx_Coroutine_USED
    if (__Pyx_Coroutine_Check(yf)) {
        result = __Pyx_Coroutine_Close(yf, &retval);
    } else
    if (__Pyx_CoroutineAwait_CheckExact(yf)) {
        result = __Pyx_CoroutineAwait_Close((__pyx_CoroutineAwaitObject*)yf);
    } else
    #endif
    #ifdef __Pyx_AsyncGen_USED
    if (__pyx_PyAsyncGenASend_CheckExact(yf)) {
        retval = __Pyx_async_gen_asend_close(yf, NULL);
        result = PYGEN_RETURN;
    } else
    if (__pyx_PyAsyncGenAThrow_CheckExact(yf)) {
        retval = __Pyx_async_gen_athrow_close(yf, NULL);
        result = PYGEN_RETURN;
    } else
    #endif
    {
        PyObject *meth;
        result = PYGEN_RETURN;
        meth = __Pyx_PyObject_GetAttrStrNoError(yf, __pyx_mstate_global->__pyx_n_u_close);
        if (unlikely(!meth)) {
            if (unlikely(PyErr_Occurred())) {
                PyErr_WriteUnraisable(yf);
            }
        } else {
            retval = __Pyx_PyObject_CallNoArg(meth);
            Py_DECREF(meth);
            if (unlikely(!retval)) {
                result = PYGEN_ERROR;
            }
        }
    }
    Py_XDECREF(retval);
    return result == PYGEN_ERROR ? -1 : 0;
}
static PyObject *__Pyx_Generator_Next(PyObject *self) {
    __Pyx_PySendResult result;
    PyObject *retval = NULL;
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self;
    if (unlikely(__Pyx_Coroutine_test_and_set_is_running(gen))) {
        return __Pyx_Coroutine_AlreadyRunningError(gen);
    }
    #if CYTHON_USE_AM_SEND
    if (gen->yieldfrom_am_send) {
        result = __Pyx_Coroutine_SendToDelegate(gen, gen->yieldfrom_am_send, Py_None, &retval);
    } else
    #endif
    if (gen->yieldfrom) {
        PyObject *yf = gen->yieldfrom;
        PyObject *ret;
        #ifdef __Pyx_Generator_USED
        if (__Pyx_Generator_CheckExact(yf)) {
            ret = __Pyx_Generator_Next(yf);
        } else
        #endif
        #ifdef __Pyx_Coroutine_USED
        if (__Pyx_Coroutine_CheckExact(yf)) {
            ret = __Pyx_Coroutine_Send(yf, Py_None);
        } else
        #endif
        #if CYTHON_COMPILING_IN_CPYTHON && (PY_VERSION_HEX < 0x030A00A3 || !CYTHON_USE_AM_SEND)
        if (PyGen_CheckExact(yf)) {
            ret = __Pyx_PyGen_Send((PyGenObject*)yf, NULL);
        } else
        #endif
            ret = __Pyx_PyIter_Next_Plain(yf);
        if (likely(ret)) {
            __Pyx_Coroutine_unset_is_running(gen);
            return ret;
        }
        result = __Pyx_Coroutine_FinishDelegation(gen, &retval);
    } else {
        result = __Pyx_Coroutine_SendEx(gen, Py_None, &retval, 0);
    }
    __Pyx_Coroutine_unset_is_running(gen);
    return __Pyx_Coroutine_MethodReturnFromResult(self, result, retval, 1);
}
static PyObject *__Pyx_Coroutine_Close_Method(PyObject *self, PyObject *arg) {
    PyObject *retval = NULL;
    __Pyx_PySendResult result;
    CYTHON_UNUSED_VAR(arg);
    result = __Pyx_Coroutine_Close(self, &retval);
    if (unlikely(result == PYGEN_ERROR))
        return NULL;
    Py_XDECREF(retval);
    Py_RETURN_NONE;
}
static __Pyx_PySendResult
__Pyx_Coroutine_Close(PyObject *self, PyObject **retval) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
    __Pyx_PySendResult result;
    PyObject *yf;
    int err = 0;
    if (unlikely(__Pyx_Coroutine_test_and_set_is_running(gen))) {
        *retval = __Pyx_Coroutine_AlreadyRunningError(gen);
        return PYGEN_ERROR;
    }
    yf = gen->yieldfrom;
    if (yf) {
        Py_INCREF(yf);
        err = __Pyx_Coroutine_CloseIter(gen, yf);
        __Pyx_Coroutine_Undelegate(gen);
        Py_DECREF(yf);
    }
    if (err == 0)
        PyErr_SetNone(PyExc_GeneratorExit);
    result = __Pyx_Coroutine_SendEx(gen, NULL, retval, 1);
    if (result == PYGEN_ERROR) {
        __Pyx_PyThreadState_declare
        __Pyx_PyThreadState_assign
        __Pyx_Coroutine_unset_is_running(gen);
        if (!__Pyx_PyErr_Occurred()) {
            return PYGEN_RETURN;
        } else if (likely(__Pyx_PyErr_ExceptionMatches2(PyExc_GeneratorExit, PyExc_StopIteration))) {
            __Pyx_PyErr_Clear();
            return PYGEN_RETURN;
        }
        return PYGEN_ERROR;
    } else if (likely(result == PYGEN_RETURN && *retval == Py_None)) {
        __Pyx_Coroutine_unset_is_running(gen);
        return PYGEN_RETURN;
    } else {
        const char *msg;
        Py_DECREF(*retval);
        *retval = NULL;
        if ((0)) {
        #ifdef __Pyx_Coroutine_USED
        } else if (__Pyx_Coroutine_Check(self)) {
            msg = "coroutine ignored GeneratorExit";
        #endif
        #ifdef __Pyx_AsyncGen_USED
        } else if (__Pyx_AsyncGen_CheckExact(self)) {
            msg = "async generator ignored GeneratorExit";
        #endif
        } else {
            msg = "generator ignored GeneratorExit";
        }
        PyErr_SetString(PyExc_RuntimeError, msg);
        __Pyx_Coroutine_unset_is_running(gen);
        return PYGEN_ERROR;
    }
}
static PyObject *__Pyx__Coroutine_Throw(PyObject *self, PyObject *typ, PyObject *val, PyObject *tb,
                                        PyObject *args, int close_on_genexit) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
    PyObject *yf;
    if (unlikely(__Pyx_Coroutine_test_and_set_is_running(gen)))
        return __Pyx_Coroutine_AlreadyRunningError(gen);
    yf = gen->yieldfrom;
    if (yf) {
        __Pyx_PySendResult result;
        PyObject *ret;
        Py_INCREF(yf);
        if (__Pyx_PyErr_GivenExceptionMatches(typ, PyExc_GeneratorExit) && close_on_genexit) {
            int err = __Pyx_Coroutine_CloseIter(gen, yf);
            Py_DECREF(yf);
            __Pyx_Coroutine_Undelegate(gen);
            if (err < 0)
                goto propagate_exception;
            goto throw_here;
        }
        if (0
        #ifdef __Pyx_Generator_USED
            || __Pyx_Generator_CheckExact(yf)
        #endif
        #ifdef __Pyx_Coroutine_USED
            || __Pyx_Coroutine_Check(yf)
        #endif
            ) {
            ret = __Pyx__Coroutine_Throw(yf, typ, val, tb, args, close_on_genexit);
        #ifdef __Pyx_Coroutine_USED
        } else if (__Pyx_CoroutineAwait_CheckExact(yf)) {
            ret = __Pyx__Coroutine_Throw(((__pyx_CoroutineAwaitObject*)yf)->coroutine, typ, val, tb, args, close_on_genexit);
        #endif
        } else {
            PyObject *meth = __Pyx_PyObject_GetAttrStrNoError(yf, __pyx_mstate_global->__pyx_n_u_throw);
            if (unlikely(!meth)) {
                Py_DECREF(yf);
                if (unlikely(PyErr_Occurred())) {
                    __Pyx_Coroutine_unset_is_running(gen);
                    return NULL;
                }
                __Pyx_Coroutine_Undelegate(gen);
                goto throw_here;
            }
            if (likely(args)) {
                ret = __Pyx_PyObject_Call(meth, args, NULL);
            } else {
                PyObject *cargs[4] = {NULL, typ, val, tb};
                ret = __Pyx_PyObject_FastCall(meth, cargs+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
            }
            Py_DECREF(meth);
        }
        Py_DECREF(yf);
        if (ret) {
            __Pyx_Coroutine_unset_is_running(gen);
            return ret;
        }
        result = __Pyx_Coroutine_FinishDelegation(gen, &ret);
        __Pyx_Coroutine_unset_is_running(gen);
        return __Pyx_Coroutine_MethodReturnFromResult(self, result, ret, 0);
    }
throw_here:
    __Pyx_Raise(typ, val, tb, NULL);
propagate_exception:
    {
        PyObject *retval = NULL;
        __Pyx_PySendResult result = __Pyx_Coroutine_SendEx(gen, NULL, &retval, 0);
        __Pyx_Coroutine_unset_is_running(gen);
        return __Pyx_Coroutine_MethodReturnFromResult(self, result, retval, 0);
    }
}
static PyObject *__Pyx_Coroutine_Throw(PyObject *self, PyObject *args) {
    PyObject *typ;
    PyObject *val = NULL;
    PyObject *tb = NULL;
    if (unlikely(!PyArg_UnpackTuple(args, "throw", 1, 3, &typ, &val, &tb)))
        return NULL;
    return __Pyx__Coroutine_Throw(self, typ, val, tb, args, 1);
}
static CYTHON_INLINE int __Pyx_Coroutine_traverse_excstate(__Pyx_ExcInfoStruct *exc_state, visitproc visit, void *arg) {
#if PY_VERSION_HEX >= 0x030B00a4
    Py_VISIT(exc_state->exc_value);
#else
    Py_VISIT(exc_state->exc_type);
    Py_VISIT(exc_state->exc_value);
    Py_VISIT(exc_state->exc_traceback);
#endif
    return 0;
}
static int __Pyx_Coroutine_traverse(__pyx_CoroutineObject *gen, visitproc visit, void *arg) {
    {
        int e = __Pyx_call_type_traverse((PyObject*)gen, 1, visit, arg);
        if (e) return e;
    }
    Py_VISIT(gen->closure);
    Py_VISIT(gen->classobj);
    Py_VISIT(gen->yieldfrom);
    return __Pyx_Coroutine_traverse_excstate(&gen->gi_exc_state, visit, arg);
}
static int __Pyx_Coroutine_clear(PyObject *self) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
    Py_CLEAR(gen->closure);
    Py_CLEAR(gen->classobj);
    __Pyx_Coroutine_Undelegate(gen);
    __Pyx_Coroutine_ExceptionClear(&gen->gi_exc_state);
#ifdef __Pyx_AsyncGen_USED
    if (__Pyx_AsyncGen_CheckExact(self)) {
        Py_CLEAR(((__pyx_PyAsyncGenObject*)gen)->ag_finalizer);
    }
#endif
    Py_CLEAR(gen->gi_code);
    Py_CLEAR(gen->gi_frame);
    Py_CLEAR(gen->gi_name);
    Py_CLEAR(gen->gi_qualname);
    Py_CLEAR(gen->gi_modulename);
    return 0;
}
static void __Pyx_Coroutine_dealloc(PyObject *self) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
    PyObject_GC_UnTrack(gen);
    #if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API
    if (gen->gi_weakreflist != NULL)
    #endif
        PyObject_ClearWeakRefs(self);
    if (gen->resume_label >= 0) {
        PyObject_GC_Track(self);
#if CYTHON_USE_TP_FINALIZE
        if (unlikely(PyObject_CallFinalizerFromDealloc(self)))
#else
        {
            destructor del = __Pyx_PyObject_GetSlot(gen, tp_del, destructor);
            if (del) del(self);
        }
        if (unlikely(Py_REFCNT(self) > 0))
#endif
        {
            return;
        }
        PyObject_GC_UnTrack(self);
    }
#ifdef __Pyx_AsyncGen_USED
    if (__Pyx_AsyncGen_CheckExact(self)) {
        /* We have to handle this case for asynchronous generators
           right here, because this code has to be between UNTRACK
           and GC_Del. */
        Py_CLEAR(((__pyx_PyAsyncGenObject*)self)->ag_finalizer);
    }
#endif
    __Pyx_Coroutine_clear(self);
    __Pyx_PyHeapTypeObject_GC_Del(gen);
}
#if CYTHON_USE_TP_FINALIZE
static void __Pyx_Coroutine_del(PyObject *self) {
    PyObject *error_type, *error_value, *error_traceback;
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
    __Pyx_PyThreadState_declare
    if (gen->resume_label < 0) {
        return;
    }
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&error_type, &error_value, &error_traceback);
#ifdef __Pyx_AsyncGen_USED
    if (__Pyx_AsyncGen_CheckExact(self)) {
        __pyx_PyAsyncGenObject *agen = (__pyx_PyAsyncGenObject*)self;
        PyObject *finalizer = agen->ag_finalizer;
        if (finalizer && !agen->ag_closed) {
            PyObject *res = __Pyx_PyObject_CallOneArg(finalizer, self);
            if (unlikely(!res)) {
                PyErr_WriteUnraisable(self);
            } else {
                Py_DECREF(res);
            }
            __Pyx_ErrRestore(error_type, error_value, error_traceback);
            return;
        }
    }
#endif
    if (unlikely(gen->resume_label == 0 && !error_value)) {
#ifdef __Pyx_Coroutine_USED
#ifdef __Pyx_Generator_USED
    if (!__Pyx_Generator_CheckExact(self))
#endif
        {
        PyObject_GC_UnTrack(self);
        if (unlikely(PyErr_WarnFormat(PyExc_RuntimeWarning, 1, "coroutine '%.50S' was never awaited", gen->gi_qualname) < 0))
            PyErr_WriteUnraisable(self);
        PyObject_GC_Track(self);
        }
#endif
    } else {
        PyObject *retval = NULL;
        __Pyx_PySendResult result = __Pyx_Coroutine_Close(self, &retval);
        if (result == PYGEN_ERROR) {
            PyErr_WriteUnraisable(self);
        } else {
            Py_XDECREF(retval);
        }
    }
    __Pyx_ErrRestore(error_type, error_value, error_traceback);
}
#endif
static PyObject *
__Pyx_Coroutine_get_name(__pyx_CoroutineObject *self, void *context)
{
    PyObject *name = self->gi_name;
    CYTHON_UNUSED_VAR(context);
    if (unlikely(!name)) name = Py_None;
    Py_INCREF(name);
    return name;
}
static int
__Pyx_Coroutine_set_name(__pyx_CoroutineObject *self, PyObject *value, void *context)
{
    CYTHON_UNUSED_VAR(context);
    if (unlikely(value == NULL || !PyUnicode_Check(value))) {
        PyErr_SetString(PyExc_TypeError,
                        "__name__ must be set to a string object");
        return -1;
    }
    Py_INCREF(value);
    __Pyx_Py_XDECREF_SET(self->gi_name, value);
    return 0;
}
static PyObject *
__Pyx_Coroutine_get_qualname(__pyx_CoroutineObject *self, void *context)
{
    PyObject *name = self->gi_qualname;
    CYTHON_UNUSED_VAR(context);
    if (unlikely(!name)) name = Py_None;
    Py_INCREF(name);
    return name;
}
static int
__Pyx_Coroutine_set_qualname(__pyx_CoroutineObject *self, PyObject *value, void *context)
{
    CYTHON_UNUSED_VAR(context);
    if (unlikely(value == NULL || !PyUnicode_Check(value))) {
        PyErr_SetString(PyExc_TypeError,
                        "__qualname__ must be set to a string object");
        return -1;
    }
    Py_INCREF(value);
    __Pyx_Py_XDECREF_SET(self->gi_qualname, value);
    return 0;
}
static PyObject *
__Pyx__Coroutine_get_frame(__pyx_CoroutineObject *self)
{
#if !CYTHON_COMPILING_IN_LIMITED_API
    PyObject *frame;
    #if PY_VERSION_HEX >= 0x030d0000
    Py_BEGIN_CRITICAL_SECTION(self);
    #endif
    frame = self->gi_frame;
    if (!frame) {
        if (unlikely(!self->gi_code)) {
            Py_RETURN_NONE;
        }
        PyObject *globals = PyDict_New();
        if (unlikely(!globals)) return NULL;
        frame = (PyObject *) PyFrame_New(
            PyThreadState_Get(),            /*PyThreadState *tstate,*/
            (PyCodeObject*) self->gi_code,  /*PyCodeObject *code,*/
            globals,                        /*PyObject *globals,*/
            0                               /*PyObject *locals*/
        );
        Py_DECREF(globals);
        if (unlikely(!frame))
            return NULL;
        if (unlikely(self->gi_frame)) {
            Py_DECREF(frame);
            frame = self->gi_frame;
        } else {
            self->gi_frame = frame;
        }
    }
    Py_INCREF(frame);
    #if PY_VERSION_HEX >= 0x030d0000
    Py_END_CRITICAL_SECTION();
    #endif
    return frame;
#else
    CYTHON_UNUSED_VAR(self);
    Py_RETURN_NONE;
#endif
}
static PyObject *
__Pyx_Coroutine_get_frame(__pyx_CoroutineObject *self, void *context) {
    CYTHON_UNUSED_VAR(context);
    PyObject *frame = self->gi_frame;
    if (frame)
        return __Pyx_NewRef(frame);
    return __Pyx__Coroutine_get_frame(self);
}
static __pyx_CoroutineObject *__Pyx__Coroutine_New(
            PyTypeObject* type, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
            PyObject *name, PyObject *qualname, PyObject *module_name) {
    __pyx_CoroutineObject *gen = PyObject_GC_New(__pyx_CoroutineObject, type);
    if (unlikely(!gen))
        return NULL;
    return __Pyx__Coroutine_NewInit(gen, body, code, closure, name, qualname, module_name);
}
static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit(
            __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
            PyObject *name, PyObject *qualname, PyObject *module_name) {
    gen->body = body;
    gen->closure = closure;
    Py_XINCREF(closure);
    gen->is_running = 0;
    gen->resume_label = 0;
    gen->classobj = NULL;
    gen->yieldfrom = NULL;
    gen->yieldfrom_am_send = NULL;
    #if PY_VERSION_HEX >= 0x030B00a4 && !CYTHON_COMPILING_IN_LIMITED_API
    gen->gi_exc_state.exc_value = NULL;
    #else
    gen->gi_exc_state.exc_type = NULL;
    gen->gi_exc_state.exc_value = NULL;
    gen->gi_exc_state.exc_traceback = NULL;
    #endif
#if CYTHON_USE_EXC_INFO_STACK
    gen->gi_exc_state.previous_item = NULL;
#endif
#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API
    gen->gi_weakreflist = NULL;
#endif
    Py_XINCREF(qualname);
    gen->gi_qualname = qualname;
    Py_XINCREF(name);
    gen->gi_name = name;
    Py_XINCREF(module_name);
    gen->gi_modulename = module_name;
    Py_XINCREF(code);
    gen->gi_code = code;
    gen->gi_frame = NULL;
    PyObject_GC_Track(gen);
    return gen;
}
static char __Pyx_Coroutine_test_and_set_is_running(__pyx_CoroutineObject *gen) {
    char result;
    #if PY_VERSION_HEX >= 0x030d0000 && !CYTHON_COMPILING_IN_LIMITED_API
    Py_BEGIN_CRITICAL_SECTION(gen);
    #endif
    result = gen->is_running;
    gen->is_running = 1;
    #if PY_VERSION_HEX >= 0x030d0000 && !CYTHON_COMPILING_IN_LIMITED_API
    Py_END_CRITICAL_SECTION();
    #endif
    return result;
}
static void __Pyx_Coroutine_unset_is_running(__pyx_CoroutineObject *gen) {
    #if PY_VERSION_HEX >= 0x030d0000 && !CYTHON_COMPILING_IN_LIMITED_API
    Py_BEGIN_CRITICAL_SECTION(gen);
    #endif
    assert(gen->is_running);
    gen->is_running = 0;
    #if PY_VERSION_HEX >= 0x030d0000 && !CYTHON_COMPILING_IN_LIMITED_API
    Py_END_CRITICAL_SECTION();
    #endif
}
static char __Pyx_Coroutine_get_is_running(__pyx_CoroutineObject *gen) {
    char result;
    #if PY_VERSION_HEX >= 0x030d0000 && !CYTHON_COMPILING_IN_LIMITED_API
    Py_BEGIN_CRITICAL_SECTION(gen);
    #endif
    result = gen->is_running;
    #if PY_VERSION_HEX >= 0x030d0000 && !CYTHON_COMPILING_IN_LIMITED_API
    Py_END_CRITICAL_SECTION();
    #endif
    return result;
}
static PyObject *__Pyx_Coroutine_get_is_running_getter(PyObject *gen, void *closure) {
    CYTHON_UNUSED_VAR(closure);
    char result = __Pyx_Coroutine_get_is_running((__pyx_CoroutineObject*)gen);
    if (result) Py_RETURN_TRUE;
    else Py_RETURN_FALSE;
}
#if __PYX_HAS_PY_AM_SEND == 2
static void __Pyx_SetBackportTypeAmSend(PyTypeObject *type, __Pyx_PyAsyncMethodsStruct *static_amsend_methods, __Pyx_pyiter_sendfunc am_send) {
    Py_ssize_t ptr_offset = (char*)(type->tp_as_async) - (char*)type;
    if (ptr_offset < 0 || ptr_offset > type->tp_basicsize) {
        return;
    }
    memcpy((void*)static_amsend_methods, (void*)(type->tp_as_async), sizeof(*type->tp_as_async));
    static_amsend_methods->am_send = am_send;
    type->tp_as_async = __Pyx_SlotTpAsAsync(static_amsend_methods);
}
#endif
static PyObject *__Pyx_Coroutine_fail_reduce_ex(PyObject *self, PyObject *arg) {
    CYTHON_UNUSED_VAR(arg);
    __Pyx_TypeName self_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE((PyObject*)self));
    PyErr_Format(PyExc_TypeError, "cannot pickle '" __Pyx_FMT_TYPENAME "' object",
                         self_type_name);
    __Pyx_DECREF_TypeName(self_type_name);
    return NULL;
}

/* Generator */
static PyMethodDef __pyx_Generator_methods[] = {
    {"send", (PyCFunction) __Pyx_Coroutine_Send, METH_O,
     PyDoc_STR("send(arg) -> send 'arg' into generator,\nreturn next yielded value or raise StopIteration.")},
    {"throw", (PyCFunction) __Pyx_Coroutine_Throw, METH_VARARGS,
     PyDoc_STR("throw(typ[,val[,tb]]) -> raise exception in generator,\nreturn next yielded value or raise StopIteration.")},
    {"close", (PyCFunction) __Pyx_Coroutine_Close_Method, METH_NOARGS,
     PyDoc_STR("close() -> raise GeneratorExit inside generator.")},
    {"__reduce_ex__", (PyCFunction) __Pyx_Coroutine_fail_reduce_ex, METH_O, 0},
    {"__reduce__", (PyCFunction) __Pyx_Coroutine_fail_reduce_ex, METH_NOARGS, 0},
    {0, 0, 0, 0}
};
static PyMemberDef __pyx_Generator_memberlist[] = {
    {"gi_yieldfrom", T_OBJECT, offsetof(__pyx_CoroutineObject, yieldfrom), READONLY,
     PyDoc_STR("object being iterated by 'yield from', or None")},
    {"gi_code", T_OBJECT, offsetof(__pyx_CoroutineObject, gi_code), READONLY, NULL},
    {"__module__", T_OBJECT, offsetof(__pyx_CoroutineObject, gi_modulename), 0, 0},
#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API
    {"__weaklistoffset__", T_PYSSIZET, offsetof(__pyx_CoroutineObject, gi_weakreflist), READONLY, 0},
#endif
    {0, 0, 0, 0, 0}
};
static PyGetSetDef __pyx_Generator_getsets[] = {
    {"__name__", (getter)__Pyx_Coroutine_get_name, (setter)__Pyx_Coroutine_set_name,
     PyDoc_STR("name of the generator"), 0},
    {"__qualname__", (getter)__Pyx_Coroutine_get_qualname, (setter)__Pyx_Coroutine_set_qualname,
     PyDoc_STR("qualified name of the generator"), 0},
    {"gi_frame", (getter)__Pyx_Coroutine_get_frame, NULL,
     PyDoc_STR("Frame of the generator"), 0},
    {"gi_running", __Pyx_Coroutine_get_is_running_getter, NULL, NULL, NULL},
    {0, 0, 0, 0, 0}
};
static PyType_Slot __pyx_GeneratorType_slots[] = {
    {Py_tp_dealloc, (void *)__Pyx_Coroutine_dealloc},
    {Py_tp_traverse, (void *)__Pyx_Coroutine_traverse},
    {Py_tp_iter, (void *)PyObject_SelfIter},
    {Py_tp_iternext, (void *)__Pyx_Generator_Next},
    {Py_tp_methods, (void *)__pyx_Generator_methods},
    {Py_tp_members, (void *)__pyx_Generator_memberlist},
    {Py_tp_getset, (void *)__pyx_Generator_getsets},
    {Py_tp_getattro, (void *) PyObject_GenericGetAttr},
#if CYTHON_USE_TP_FINALIZE
    {Py_tp_finalize, (void *)__Pyx_Coroutine_del},
#endif
#if __PYX_HAS_PY_AM_SEND == 1
    {Py_am_send, (void *)__Pyx_Coroutine_AmSend},
#endif
    {0, 0},
};
static PyType_Spec __pyx_GeneratorType_spec = {
    __PYX_TYPE_MODULE_PREFIX "generator",
    sizeof(__pyx_CoroutineObject),
    0,
#if PY_VERSION_HEX >= 0x030C0000 && !CYTHON_COMPILING_IN_LIMITED_API
    Py_TPFLAGS_MANAGED_WEAKREF |
#endif
    Py_TPFLAGS_IMMUTABLETYPE | Py_TPFLAGS_DISALLOW_INSTANTIATION |
    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | __Pyx_TPFLAGS_HAVE_AM_SEND,
    __pyx_GeneratorType_slots
};
#if __PYX_HAS_PY_AM_SEND == 2
static __Pyx_PyAsyncMethodsStruct __pyx_Generator_as_async;
#endif
static int __pyx_Generator_init(PyObject *module) {
    __pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module);
    mstate->__pyx_GeneratorType = __Pyx_FetchCommonTypeFromSpec(
        mstate->__pyx_CommonTypesMetaclassType, module, &__pyx_GeneratorType_spec, NULL);
    if (unlikely(!mstate->__pyx_GeneratorType)) {
        return -1;
    }
#if __PYX_HAS_PY_AM_SEND == 2
    __Pyx_SetBackportTypeAmSend(mstate->__pyx_GeneratorType, &__pyx_Generator_as_async, &__Pyx_Coroutine_AmSend);
#endif
    return 0;
}
static PyObject *__Pyx_Generator_GetInlinedResult(PyObject *self) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self;
    PyObject *retval = NULL;
    if (unlikely(__Pyx_Coroutine_test_and_set_is_running(gen))) {
        return __Pyx_Coroutine_AlreadyRunningError(gen);
    }
    __Pyx_PySendResult result = __Pyx_Coroutine_SendEx(gen, Py_None, &retval, 0);
    __Pyx_Coroutine_unset_is_running(gen);
    (void) result;
    assert (result == PYGEN_RETURN || result == PYGEN_ERROR);
    assert ((result == PYGEN_RETURN && retval != NULL) || (result == PYGEN_ERROR && retval == NULL));
    return retval;
}

/* CheckBinaryVersion */
static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer) {
    const unsigned long MAJOR_MINOR = 0xFFFF0000UL;
    if ((rt_version & MAJOR_MINOR) == (ct_version & MAJOR_MINOR))
        return 0;
    if (likely(allow_newer && (rt_version & MAJOR_MINOR) > (ct_version & MAJOR_MINOR)))
        return 1;
    {
        char message[200];
        PyOS_snprintf(message, sizeof(message),
                      "compile time Python version %d.%d "
                      "of module '%.100s' "
                      "%s "
                      "runtime version %d.%d",
                       (int) (ct_version >> 24), (int) ((ct_version >> 16) & 0xFF),
                       __Pyx_MODULE_NAME,
                       (allow_newer) ? "was newer than" : "does not match",
                       (int) (rt_version >> 24), (int) ((rt_version >> 16) & 0xFF)
       );
        return PyErr_WarnEx(NULL, message, 1);
    }
}

/* NewCodeObj */
#if CYTHON_COMPILING_IN_LIMITED_API
    static PyObject* __Pyx__PyCode_New(int a, int p, int k, int l, int s, int f,
                                       PyObject *code, PyObject *c, PyObject* n, PyObject *v,
                                       PyObject *fv, PyObject *cell, PyObject* fn,
                                       PyObject *name, int fline, PyObject *lnos) {
        PyObject *exception_table = NULL;
        PyObject *types_module=NULL, *code_type=NULL, *result=NULL;
        #if __PYX_LIMITED_VERSION_HEX < 0x030b0000
        PyObject *version_info;
        PyObject *py_minor_version = NULL;
        #endif
        long minor_version = 0;
        PyObject *type, *value, *traceback;
        PyErr_Fetch(&type, &value, &traceback);
        #if __PYX_LIMITED_VERSION_HEX >= 0x030b0000
        minor_version = 11;
        #else
        if (!(version_info = PySys_GetObject("version_info"))) goto end;
        if (!(py_minor_version = PySequence_GetItem(version_info, 1))) goto end;
        minor_version = PyLong_AsLong(py_minor_version);
        Py_DECREF(py_minor_version);
        if (minor_version == -1 && PyErr_Occurred()) goto end;
        #endif
        if (!(types_module = PyImport_ImportModule("types"))) goto end;
        if (!(code_type = PyObject_GetAttrString(types_module, "CodeType"))) goto end;
        if (minor_version <= 7) {
            (void)p;
            result = PyObject_CallFunction(code_type, "iiiiiOOOOOOiOOO", a, k, l, s, f, code,
                          c, n, v, fn, name, fline, lnos, fv, cell);
        } else if (minor_version <= 10) {
            result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOiOOO", a,p, k, l, s, f, code,
                          c, n, v, fn, name, fline, lnos, fv, cell);
        } else {
            if (!(exception_table = PyBytes_FromStringAndSize(NULL, 0))) goto end;
            result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOOiOOOO", a,p, k, l, s, f, code,
                          c, n, v, fn, name, name, fline, lnos, exception_table, fv, cell);
        }
    end:
        Py_XDECREF(code_type);
        Py_XDECREF(exception_table);
        Py_XDECREF(types_module);
        if (type) {
            PyErr_Restore(type, value, traceback);
        }
        return result;
    }
#elif PY_VERSION_HEX >= 0x030B0000
  static PyCodeObject* __Pyx__PyCode_New(int a, int p, int k, int l, int s, int f,
                                         PyObject *code, PyObject *c, PyObject* n, PyObject *v,
                                         PyObject *fv, PyObject *cell, PyObject* fn,
                                         PyObject *name, int fline, PyObject *lnos) {
    PyCodeObject *result;
    result =
      #if PY_VERSION_HEX >= 0x030C0000
        PyUnstable_Code_NewWithPosOnlyArgs
      #else
        PyCode_NewWithPosOnlyArgs
      #endif
        (a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, name, fline, lnos, __pyx_mstate_global->__pyx_empty_bytes);
    #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030c00A1
    if (likely(result))
        result->_co_firsttraceable = 0;
    #endif
    return result;
  }
#elif !CYTHON_COMPILING_IN_PYPY
  #define __Pyx__PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
          PyCode_NewWithPosOnlyArgs(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
#else
  #define __Pyx__PyCode_New(a, p, 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
static PyObject* __Pyx_PyCode_New(
        const __Pyx_PyCode_New_function_description descr,
        PyObject * const *varnames,
        PyObject *filename,
        PyObject *funcname,
        PyObject *line_table,
        PyObject *tuple_dedup_map
) {
    PyObject *code_obj = NULL, *varnames_tuple_dedup = NULL, *code_bytes = NULL;
    Py_ssize_t var_count = (Py_ssize_t) descr.nlocals;
    PyObject *varnames_tuple = PyTuple_New(var_count);
    if (unlikely(!varnames_tuple)) return NULL;
    for (Py_ssize_t i=0; i < var_count; i++) {
        Py_INCREF(varnames[i]);
        if (__Pyx_PyTuple_SET_ITEM(varnames_tuple, i, varnames[i]) != (0)) goto done;
    }
    #if CYTHON_COMPILING_IN_LIMITED_API
    varnames_tuple_dedup = PyDict_GetItem(tuple_dedup_map, varnames_tuple);
    if (!varnames_tuple_dedup) {
        if (unlikely(PyDict_SetItem(tuple_dedup_map, varnames_tuple, varnames_tuple) < 0)) goto done;
        varnames_tuple_dedup = varnames_tuple;
    }
    #else
    varnames_tuple_dedup = PyDict_SetDefault(tuple_dedup_map, varnames_tuple, varnames_tuple);
    if (unlikely(!varnames_tuple_dedup)) goto done;
    #endif
    #if CYTHON_AVOID_BORROWED_REFS
    Py_INCREF(varnames_tuple_dedup);
    #endif
    if (__PYX_LIMITED_VERSION_HEX >= (0x030b0000) && line_table != NULL && !CYTHON_COMPILING_IN_GRAAL) {
        Py_ssize_t line_table_length = __Pyx_PyBytes_GET_SIZE(line_table);
        #if !CYTHON_ASSUME_SAFE_SIZE
        if (unlikely(line_table_length == -1)) goto done;
        #endif
        Py_ssize_t code_len = (line_table_length * 2 + 4) & ~3LL;
        code_bytes = PyBytes_FromStringAndSize(NULL, code_len);
        if (unlikely(!code_bytes)) goto done;
        char* c_code_bytes = PyBytes_AsString(code_bytes);
        if (unlikely(!c_code_bytes)) goto done;
        memset(c_code_bytes, 0, (size_t) code_len);
    }
    code_obj = (PyObject*) __Pyx__PyCode_New(
        (int) descr.argcount,
        (int) descr.num_posonly_args,
        (int) descr.num_kwonly_args,
        (int) descr.nlocals,
        0,
        (int) descr.flags,
        code_bytes ? code_bytes : __pyx_mstate_global->__pyx_empty_bytes,
        __pyx_mstate_global->__pyx_empty_tuple,
        __pyx_mstate_global->__pyx_empty_tuple,
        varnames_tuple_dedup,
        __pyx_mstate_global->__pyx_empty_tuple,
        __pyx_mstate_global->__pyx_empty_tuple,
        filename,
        funcname,
        (int) descr.first_line,
        (__PYX_LIMITED_VERSION_HEX >= (0x030b0000) && line_table) ? line_table : __pyx_mstate_global->__pyx_empty_bytes
    );
done:
    Py_XDECREF(code_bytes);
    #if CYTHON_AVOID_BORROWED_REFS
    Py_XDECREF(varnames_tuple_dedup);
    #endif
    Py_DECREF(varnames_tuple);
    return code_obj;
}

/* DecompressString */
static PyObject *__Pyx_DecompressString(const char *s, Py_ssize_t length, int algo) {
    PyObject *module = NULL, *decompress, *compressed_bytes, *decompressed;
    const char* module_name = algo == 3 ? "compression.zstd" : algo == 2 ? "bz2" : "zlib";
    PyObject *methodname = PyUnicode_FromString("decompress");
    if (unlikely(!methodname)) return NULL;
    #if __PYX_LIMITED_VERSION_HEX >= 0x030e0000
    if (algo == 3) {
        PyObject *fromlist = Py_BuildValue("[O]", methodname);
        if (unlikely(!fromlist)) goto bad;
        module = PyImport_ImportModuleLevel("compression.zstd", NULL, NULL, fromlist, 0);
        Py_DECREF(fromlist);
    } else
    #endif
        module = PyImport_ImportModule(module_name);
    if (unlikely(!module)) goto import_failed;
    decompress = PyObject_GetAttr(module, methodname);
    if (unlikely(!decompress)) goto import_failed;
    {
        #ifdef __cplusplus
            char *memview_bytes = const_cast<char*>(s);
        #else
            #if defined(__clang__)
              #pragma clang diagnostic push
              #pragma clang diagnostic ignored "-Wcast-qual"
            #elif !defined(__INTEL_COMPILER) && defined(__GNUC__)
              #pragma GCC diagnostic push
              #pragma GCC diagnostic ignored "-Wcast-qual"
            #endif
            char *memview_bytes = (char*) s;
            #if defined(__clang__)
              #pragma clang diagnostic pop
            #elif !defined(__INTEL_COMPILER) && defined(__GNUC__)
              #pragma GCC diagnostic pop
            #endif
        #endif
        #if CYTHON_COMPILING_IN_LIMITED_API && !defined(PyBUF_READ)
        int memview_flags = 0x100;
        #else
        int memview_flags = PyBUF_READ;
        #endif
        compressed_bytes = PyMemoryView_FromMemory(memview_bytes, length, memview_flags);
    }
    if (unlikely(!compressed_bytes)) {
        Py_DECREF(decompress);
        goto bad;
    }
    decompressed = PyObject_CallFunctionObjArgs(decompress, compressed_bytes, NULL);
    Py_DECREF(compressed_bytes);
    Py_DECREF(decompress);
    Py_DECREF(module);
    Py_DECREF(methodname);
    return decompressed;
import_failed:
    PyErr_Format(PyExc_ImportError,
        "Failed to import '%.20s.decompress' - cannot initialise module strings. "
        "String compression was configured with the C macro 'CYTHON_COMPRESS_STRINGS=%d'.",
        module_name, algo);
bad:
    Py_XDECREF(module);
    Py_DECREF(methodname);
    return NULL;
}

#include <string.h>
static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s) {
    size_t len = strlen(s);
    if (unlikely(len > (size_t) PY_SSIZE_T_MAX)) {
        PyErr_SetString(PyExc_OverflowError, "byte string is too long");
        return -1;
    }
    return (Py_ssize_t) len;
}
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
    Py_ssize_t len = __Pyx_ssize_strlen(c_str);
    if (unlikely(len < 0)) return NULL;
    return __Pyx_PyUnicode_FromStringAndSize(c_str, len);
}
static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char* c_str) {
    Py_ssize_t len = __Pyx_ssize_strlen(c_str);
    if (unlikely(len < 0)) return NULL;
    return PyByteArray_FromStringAndSize(c_str, len);
}
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_UTF8
static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
    if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
#if CYTHON_COMPILING_IN_LIMITED_API
    {
        const char* result;
        Py_ssize_t unicode_length;
        CYTHON_MAYBE_UNUSED_VAR(unicode_length); // only for __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
        #if __PYX_LIMITED_VERSION_HEX < 0x030A0000
        if (unlikely(PyArg_Parse(o, "s#", &result, length) < 0)) return NULL;
        #else
        result = PyUnicode_AsUTF8AndSize(o, length);
        #endif
        #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
        unicode_length = PyUnicode_GetLength(o);
        if (unlikely(unicode_length < 0)) return NULL;
        if (unlikely(unicode_length != *length)) {
            PyUnicode_AsASCIIString(o);
            return NULL;
        }
        #endif
        return result;
    }
#else
#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_UTF8
    if (PyUnicode_Check(o)) {
        return __Pyx_PyUnicode_AsStringAndSize(o, length);
    } else
#endif
    if (PyByteArray_Check(o)) {
#if (CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS) || (CYTHON_COMPILING_IN_PYPY && (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE)))
        *length = PyByteArray_GET_SIZE(o);
        return PyByteArray_AS_STRING(o);
#else
        *length = PyByteArray_Size(o);
        if (*length == -1) return NULL;
        return PyByteArray_AsString(o);
#endif
    } else
    {
        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_LongWrongResultType(PyObject* result) {
    __Pyx_TypeName result_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(result));
    if (PyLong_Check(result)) {
        if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
                "__int__ returned non-int (type " __Pyx_FMT_TYPENAME ").  "
                "The ability to return an instance of a strict subclass of int is deprecated, "
                "and may be removed in a future version of Python.",
                result_type_name)) {
            __Pyx_DECREF_TypeName(result_type_name);
            Py_DECREF(result);
            return NULL;
        }
        __Pyx_DECREF_TypeName(result_type_name);
        return result;
    }
    PyErr_Format(PyExc_TypeError,
                 "__int__ returned non-int (type " __Pyx_FMT_TYPENAME ")",
                 result_type_name);
    __Pyx_DECREF_TypeName(result_type_name);
    Py_DECREF(result);
    return NULL;
}
static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x) {
#if CYTHON_USE_TYPE_SLOTS
  PyNumberMethods *m;
#endif
  PyObject *res = NULL;
  if (likely(PyLong_Check(x)))
      return __Pyx_NewRef(x);
#if CYTHON_USE_TYPE_SLOTS
  m = Py_TYPE(x)->tp_as_number;
  if (likely(m && m->nb_int)) {
      res = m->nb_int(x);
  }
#else
  if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
      res = PyNumber_Long(x);
  }
#endif
  if (likely(res)) {
      if (unlikely(!PyLong_CheckExact(res))) {
          return __Pyx_PyNumber_LongWrongResultType(res);
      }
  }
  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 (likely(PyLong_CheckExact(b))) {
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(__Pyx_PyLong_IsCompact(b))) {
        return __Pyx_PyLong_CompactValue(b);
    } else {
      const digit* digits = __Pyx_PyLong_Digits(b);
      const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(b);
      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 = PyLong_AsSsize_t(x);
  Py_DECREF(x);
  return ival;
}
static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) {
  if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) {
    return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o);
  } else {
    Py_ssize_t ival;
    PyObject *x;
    x = PyNumber_Index(o);
    if (!x) return -1;
    ival = PyLong_AsLong(x);
    Py_DECREF(x);
    return ival;
  }
}
static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b) {
    CYTHON_UNUSED_VAR(b);
    return __Pyx_NewRef(Py_None);
}
static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) {
  return __Pyx_NewRef(b ? Py_True: Py_False);
}
static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t ival) {
    return PyLong_FromSize_t(ival);
}


/* MultiPhaseInitModuleState */
#if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE
#ifndef CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
#if (CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX >= 0x030C0000)
  #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 1
#else
  #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 0
#endif
#endif
#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE && !CYTHON_ATOMICS
#error "Module state with PEP489 requires atomics. Currently that's one of\
 C11, C++11, gcc atomic intrinsics or MSVC atomic intrinsics"
#endif
#if !CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
#define __Pyx_ModuleStateLookup_Lock()
#define __Pyx_ModuleStateLookup_Unlock()
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d0000
static PyMutex __Pyx_ModuleStateLookup_mutex = {0};
#define __Pyx_ModuleStateLookup_Lock() PyMutex_Lock(&__Pyx_ModuleStateLookup_mutex)
#define __Pyx_ModuleStateLookup_Unlock() PyMutex_Unlock(&__Pyx_ModuleStateLookup_mutex)
#elif defined(__cplusplus) && __cplusplus >= 201103L
#include <mutex>
static std::mutex __Pyx_ModuleStateLookup_mutex;
#define __Pyx_ModuleStateLookup_Lock() __Pyx_ModuleStateLookup_mutex.lock()
#define __Pyx_ModuleStateLookup_Unlock() __Pyx_ModuleStateLookup_mutex.unlock()
#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ > 201112L) && !defined(__STDC_NO_THREADS__)
#include <threads.h>
static mtx_t __Pyx_ModuleStateLookup_mutex;
static once_flag __Pyx_ModuleStateLookup_mutex_once_flag = ONCE_FLAG_INIT;
static void __Pyx_ModuleStateLookup_initialize_mutex(void) {
    mtx_init(&__Pyx_ModuleStateLookup_mutex, mtx_plain);
}
#define __Pyx_ModuleStateLookup_Lock()\
  call_once(&__Pyx_ModuleStateLookup_mutex_once_flag, __Pyx_ModuleStateLookup_initialize_mutex);\
  mtx_lock(&__Pyx_ModuleStateLookup_mutex)
#define __Pyx_ModuleStateLookup_Unlock() mtx_unlock(&__Pyx_ModuleStateLookup_mutex)
#elif defined(HAVE_PTHREAD_H)
#include <pthread.h>
static pthread_mutex_t __Pyx_ModuleStateLookup_mutex = PTHREAD_MUTEX_INITIALIZER;
#define __Pyx_ModuleStateLookup_Lock() pthread_mutex_lock(&__Pyx_ModuleStateLookup_mutex)
#define __Pyx_ModuleStateLookup_Unlock() pthread_mutex_unlock(&__Pyx_ModuleStateLookup_mutex)
#elif defined(_WIN32)
#include <Windows.h>  // synchapi.h on its own doesn't work
static SRWLOCK __Pyx_ModuleStateLookup_mutex = SRWLOCK_INIT;
#define __Pyx_ModuleStateLookup_Lock() AcquireSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex)
#define __Pyx_ModuleStateLookup_Unlock() ReleaseSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex)
#else
#error "No suitable lock available for CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE.\
 Requires C standard >= C11, or C++ standard >= C++11,\
 or pthreads, or the Windows 32 API, or Python >= 3.13."
#endif
typedef struct {
    int64_t id;
    PyObject *module;
} __Pyx_InterpreterIdAndModule;
typedef struct {
    char interpreter_id_as_index;
    Py_ssize_t count;
    Py_ssize_t allocated;
    __Pyx_InterpreterIdAndModule table[1];
} __Pyx_ModuleStateLookupData;
#define __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE 32
#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
static __pyx_atomic_int_type __Pyx_ModuleStateLookup_read_counter = 0;
#endif
#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
static __pyx_atomic_ptr_type __Pyx_ModuleStateLookup_data = 0;
#else
static __Pyx_ModuleStateLookupData* __Pyx_ModuleStateLookup_data = NULL;
#endif
static __Pyx_InterpreterIdAndModule* __Pyx_State_FindModuleStateLookupTableLowerBound(
        __Pyx_InterpreterIdAndModule* table,
        Py_ssize_t count,
        int64_t interpreterId) {
    __Pyx_InterpreterIdAndModule* begin = table;
    __Pyx_InterpreterIdAndModule* end = begin + count;
    if (begin->id == interpreterId) {
        return begin;
    }
    while ((end - begin) > __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) {
        __Pyx_InterpreterIdAndModule* halfway = begin + (end - begin)/2;
        if (halfway->id == interpreterId) {
            return halfway;
        }
        if (halfway->id < interpreterId) {
            begin = halfway;
        } else {
            end = halfway;
        }
    }
    for (; begin < end; ++begin) {
        if (begin->id >= interpreterId) return begin;
    }
    return begin;
}
static PyObject *__Pyx_State_FindModule(CYTHON_UNUSED void* dummy) {
    int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get());
    if (interpreter_id == -1) return NULL;
#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
    __Pyx_ModuleStateLookupData* data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data);
    {
        __pyx_atomic_incr_acq_rel(&__Pyx_ModuleStateLookup_read_counter);
        if (likely(data)) {
            __Pyx_ModuleStateLookupData* new_data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_acquire(&__Pyx_ModuleStateLookup_data);
            if (likely(data == new_data)) {
                goto read_finished;
            }
        }
        __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter);
        __Pyx_ModuleStateLookup_Lock();
        __pyx_atomic_incr_relaxed(&__Pyx_ModuleStateLookup_read_counter);
        data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data);
        __Pyx_ModuleStateLookup_Unlock();
    }
  read_finished:;
#else
    __Pyx_ModuleStateLookupData* data = __Pyx_ModuleStateLookup_data;
#endif
    __Pyx_InterpreterIdAndModule* found = NULL;
    if (unlikely(!data)) goto end;
    if (data->interpreter_id_as_index) {
        if (interpreter_id < data->count) {
            found = data->table+interpreter_id;
        }
    } else {
        found = __Pyx_State_FindModuleStateLookupTableLowerBound(
            data->table, data->count, interpreter_id);
    }
  end:
    {
        PyObject *result=NULL;
        if (found && found->id == interpreter_id) {
            result = found->module;
        }
#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
        __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter);
#endif
        return result;
    }
}
#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
static void __Pyx_ModuleStateLookup_wait_until_no_readers(void) {
    while (__pyx_atomic_load(&__Pyx_ModuleStateLookup_read_counter) != 0);
}
#else
#define __Pyx_ModuleStateLookup_wait_until_no_readers()
#endif
static int __Pyx_State_AddModuleInterpIdAsIndex(__Pyx_ModuleStateLookupData **old_data, PyObject* module, int64_t interpreter_id) {
    Py_ssize_t to_allocate = (*old_data)->allocated;
    while (to_allocate <= interpreter_id) {
        if (to_allocate == 0) to_allocate = 1;
        else to_allocate *= 2;
    }
    __Pyx_ModuleStateLookupData *new_data = *old_data;
    if (to_allocate != (*old_data)->allocated) {
         new_data = (__Pyx_ModuleStateLookupData *)realloc(
            *old_data,
            sizeof(__Pyx_ModuleStateLookupData)+(to_allocate-1)*sizeof(__Pyx_InterpreterIdAndModule));
        if (!new_data) {
            PyErr_NoMemory();
            return -1;
        }
        for (Py_ssize_t i = new_data->allocated; i < to_allocate; ++i) {
            new_data->table[i].id = i;
            new_data->table[i].module = NULL;
        }
        new_data->allocated = to_allocate;
    }
    new_data->table[interpreter_id].module = module;
    if (new_data->count < interpreter_id+1) {
        new_data->count = interpreter_id+1;
    }
    *old_data = new_data;
    return 0;
}
static void __Pyx_State_ConvertFromInterpIdAsIndex(__Pyx_ModuleStateLookupData *data) {
    __Pyx_InterpreterIdAndModule *read = data->table;
    __Pyx_InterpreterIdAndModule *write = data->table;
    __Pyx_InterpreterIdAndModule *end = read + data->count;
    for (; read<end; ++read) {
        if (read->module) {
            write->id = read->id;
            write->module = read->module;
            ++write;
        }
    }
    data->count = write - data->table;
    for (; write<end; ++write) {
        write->id = 0;
        write->module = NULL;
    }
    data->interpreter_id_as_index = 0;
}
static int __Pyx_State_AddModule(PyObject* module, CYTHON_UNUSED void* dummy) {
    int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get());
    if (interpreter_id == -1) return -1;
    int result = 0;
    __Pyx_ModuleStateLookup_Lock();
#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
    __Pyx_ModuleStateLookupData *old_data = (__Pyx_ModuleStateLookupData *)
            __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0);
#else
    __Pyx_ModuleStateLookupData *old_data = __Pyx_ModuleStateLookup_data;
#endif
    __Pyx_ModuleStateLookupData *new_data = old_data;
    if (!new_data) {
        new_data = (__Pyx_ModuleStateLookupData *)calloc(1, sizeof(__Pyx_ModuleStateLookupData));
        if (!new_data) {
            result = -1;
            PyErr_NoMemory();
            goto end;
        }
        new_data->allocated = 1;
        new_data->interpreter_id_as_index = 1;
    }
    __Pyx_ModuleStateLookup_wait_until_no_readers();
    if (new_data->interpreter_id_as_index) {
        if (interpreter_id < __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) {
            result = __Pyx_State_AddModuleInterpIdAsIndex(&new_data, module, interpreter_id);
            goto end;
        }
        __Pyx_State_ConvertFromInterpIdAsIndex(new_data);
    }
    {
        Py_ssize_t insert_at = 0;
        {
            __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound(
                new_data->table, new_data->count, interpreter_id);
            assert(lower_bound);
            insert_at = lower_bound - new_data->table;
            if (unlikely(insert_at < new_data->count && lower_bound->id == interpreter_id)) {
                lower_bound->module = module;
                goto end;  // already in table, nothing more to do
            }
        }
        if (new_data->count+1 >= new_data->allocated) {
            Py_ssize_t to_allocate = (new_data->count+1)*2;
            new_data =
                (__Pyx_ModuleStateLookupData*)realloc(
                    new_data,
                    sizeof(__Pyx_ModuleStateLookupData) +
                    (to_allocate-1)*sizeof(__Pyx_InterpreterIdAndModule));
            if (!new_data) {
                result = -1;
                new_data = old_data;
                PyErr_NoMemory();
                goto end;
            }
            new_data->allocated = to_allocate;
        }
        ++new_data->count;
        int64_t last_id = interpreter_id;
        PyObject *last_module = module;
        for (Py_ssize_t i=insert_at; i<new_data->count; ++i) {
            int64_t current_id = new_data->table[i].id;
            new_data->table[i].id = last_id;
            last_id = current_id;
            PyObject *current_module = new_data->table[i].module;
            new_data->table[i].module = last_module;
            last_module = current_module;
        }
    }
  end:
#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
    __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, new_data);
#else
    __Pyx_ModuleStateLookup_data = new_data;
#endif
    __Pyx_ModuleStateLookup_Unlock();
    return result;
}
static int __Pyx_State_RemoveModule(CYTHON_UNUSED void* dummy) {
    int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get());
    if (interpreter_id == -1) return -1;
    __Pyx_ModuleStateLookup_Lock();
#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
    __Pyx_ModuleStateLookupData *data = (__Pyx_ModuleStateLookupData *)
            __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0);
#else
    __Pyx_ModuleStateLookupData *data = __Pyx_ModuleStateLookup_data;
#endif
    if (data->interpreter_id_as_index) {
        if (interpreter_id < data->count) {
            data->table[interpreter_id].module = NULL;
        }
        goto done;
    }
    {
        __Pyx_ModuleStateLookup_wait_until_no_readers();
        __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound(
            data->table, data->count, interpreter_id);
        if (!lower_bound) goto done;
        if (lower_bound->id != interpreter_id) goto done;
        __Pyx_InterpreterIdAndModule *end = data->table+data->count;
        for (;lower_bound<end-1; ++lower_bound) {
            lower_bound->id = (lower_bound+1)->id;
            lower_bound->module = (lower_bound+1)->module;
        }
    }
    --data->count;
    if (data->count == 0) {
        free(data);
        data = NULL;
    }
  done:
#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
    __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, data);
#else
    __Pyx_ModuleStateLookup_data = data;
#endif
    __Pyx_ModuleStateLookup_Unlock();
    return 0;
}
#endif

/* #### Code section: utility_code_pragmas_end ### */
#ifdef _MSC_VER
#pragma warning( pop )
#endif



/* #### Code section: end ### */
#endif /* Py_PYTHON_H */
